summaryrefslogtreecommitdiff
path: root/node_modules
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-04-20 03:09:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-04-24 16:14:29 +0200
commit82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch)
tree965f6eb89b84d65a62b49008fd972c004832ccd1 /node_modules
parente6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff)
downloadwallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.gz
wallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.bz2
wallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.zip
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node.
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/.yarn-integrity2
-rw-r--r--node_modules/ansi-regex/index.js2
-rw-r--r--node_modules/ansi-regex/license21
-rw-r--r--node_modules/ansi-regex/package.json11
-rw-r--r--node_modules/ansi-regex/readme.md4
-rw-r--r--node_modules/archiver/CHANGELOG.md6
-rw-r--r--node_modules/archiver/README.md50
-rw-r--r--node_modules/archiver/lib/core.js111
-rw-r--r--node_modules/archiver/package.json7
-rwxr-xr-xnode_modules/arr-flatten/LICENSE2
-rwxr-xr-xnode_modules/arr-flatten/README.md100
-rw-r--r--[-rwxr-xr-x]node_modules/arr-flatten/index.js20
-rw-r--r--[-rwxr-xr-x]node_modules/arr-flatten/package.json67
-rw-r--r--node_modules/async/CHANGELOG.md20
-rw-r--r--node_modules/async/LICENSE2
-rw-r--r--node_modules/async/README.md2
-rw-r--r--node_modules/async/dist/async.js1581
-rw-r--r--node_modules/async/dist/async.min.js2
-rw-r--r--node_modules/async/package.json7
-rw-r--r--node_modules/babel-code-frame/README.md3
-rw-r--r--node_modules/babel-code-frame/lib/index.js54
-rw-r--r--node_modules/babel-code-frame/package.json4
-rw-r--r--node_modules/babel-generator/README.md4
-rw-r--r--node_modules/babel-generator/lib/buffer.js47
-rw-r--r--node_modules/babel-generator/lib/generators/base.js7
-rw-r--r--node_modules/babel-generator/lib/generators/expressions.js15
-rw-r--r--node_modules/babel-generator/lib/generators/flow.js10
-rw-r--r--node_modules/babel-generator/lib/generators/jsx.js8
-rw-r--r--node_modules/babel-generator/lib/generators/modules.js11
-rw-r--r--node_modules/babel-generator/lib/generators/statements.js3
-rw-r--r--node_modules/babel-generator/lib/generators/template-literals.js2
-rw-r--r--node_modules/babel-generator/lib/generators/types.js20
-rw-r--r--node_modules/babel-generator/lib/index.js22
-rw-r--r--node_modules/babel-generator/lib/node/parentheses.js119
-rw-r--r--node_modules/babel-generator/lib/node/whitespace.js25
-rw-r--r--node_modules/babel-generator/lib/printer.js2
-rw-r--r--node_modules/babel-generator/lib/source-map.js48
-rw-r--r--node_modules/babel-generator/package.json13
-rw-r--r--node_modules/babel-messages/README.md2
-rw-r--r--node_modules/babel-messages/lib/index.js33
-rw-r--r--node_modules/babel-messages/package.json4
-rw-r--r--node_modules/babel-runtime/helpers/asyncGenerator.js8
-rw-r--r--node_modules/babel-runtime/helpers/asyncIterator.js8
-rw-r--r--node_modules/babel-runtime/package.json8
-rw-r--r--node_modules/babel-template/README.md14
-rw-r--r--node_modules/babel-template/lib/index.js4
-rw-r--r--node_modules/babel-template/package.json8
-rw-r--r--node_modules/babel-traverse/lib/cache.js10
-rw-r--r--node_modules/babel-traverse/lib/index.js3
-rw-r--r--node_modules/babel-traverse/lib/path/ancestry.js12
-rw-r--r--node_modules/babel-traverse/lib/path/comments.js2
-rw-r--r--node_modules/babel-traverse/lib/path/evaluation.js10
-rw-r--r--node_modules/babel-traverse/lib/path/family.js101
-rw-r--r--node_modules/babel-traverse/lib/path/index.js12
-rw-r--r--node_modules/babel-traverse/lib/path/inference/inferer-reference.js12
-rw-r--r--node_modules/babel-traverse/lib/path/introspection.js26
-rw-r--r--node_modules/babel-traverse/lib/path/lib/hoister.js91
-rw-r--r--node_modules/babel-traverse/lib/path/lib/removal-hooks.js21
-rw-r--r--node_modules/babel-traverse/lib/path/lib/virtual-types.js20
-rw-r--r--node_modules/babel-traverse/lib/path/modification.js4
-rw-r--r--node_modules/babel-traverse/lib/path/replacement.js14
-rw-r--r--node_modules/babel-traverse/lib/scope/binding.js10
-rw-r--r--node_modules/babel-traverse/lib/scope/index.js177
-rw-r--r--node_modules/babel-traverse/lib/scope/lib/renamer.js10
-rw-r--r--node_modules/babel-traverse/package.json15
-rw-r--r--node_modules/babel-types/README.md1009
-rw-r--r--node_modules/babel-types/lib/converters.js12
-rw-r--r--node_modules/babel-types/lib/definitions/es2015.js3
-rw-r--r--node_modules/babel-types/lib/definitions/experimental.js4
-rw-r--r--node_modules/babel-types/lib/definitions/jsx.js12
-rw-r--r--node_modules/babel-types/lib/index.js32
-rw-r--r--node_modules/babel-types/lib/retrievers.js4
-rw-r--r--node_modules/babel-types/lib/validators.js64
-rw-r--r--node_modules/babel-types/package.json7
-rw-r--r--node_modules/babylon/CHANGELOG.md327
-rw-r--r--node_modules/babylon/README.md16
-rw-r--r--node_modules/babylon/bin/generate-identifier-regex.js2
-rw-r--r--node_modules/babylon/lib/index.js1625
-rw-r--r--node_modules/babylon/package.json51
-rw-r--r--node_modules/bl/.travis.yml4
-rw-r--r--node_modules/bl/LICENSE.md2
-rw-r--r--node_modules/bl/README.md10
-rw-r--r--node_modules/bl/bl.js55
-rw-r--r--node_modules/bl/package.json6
-rw-r--r--node_modules/bl/test/test.js59
-rw-r--r--node_modules/brace-expansion/README.md1
-rw-r--r--node_modules/brace-expansion/index.js2
-rw-r--r--node_modules/brace-expansion/package.json6
-rw-r--r--node_modules/buffer-crc32/.npmignore1
-rw-r--r--node_modules/buffer-crc32/.travis.yml8
-rw-r--r--node_modules/buffer-crc32/index.js30
-rw-r--r--node_modules/buffer-crc32/package.json9
-rw-r--r--node_modules/buffer-crc32/tests/crc.test.js89
-rw-r--r--node_modules/camelcase/index.js37
-rw-r--r--node_modules/camelcase/package.json7
-rw-r--r--node_modules/camelcase/readme.md27
-rw-r--r--node_modules/clone-stats/package.json2
-rw-r--r--node_modules/cloneable-readable/package.json2
-rw-r--r--node_modules/compress-commons/README.md2
-rw-r--r--node_modules/compress-commons/lib/archivers/zip/constants.js2
-rw-r--r--node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js186
-rw-r--r--node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js3
-rw-r--r--node_modules/compress-commons/package.json6
-rw-r--r--node_modules/concat-stream/package.json10
-rw-r--r--node_modules/concat-stream/readme.md2
-rw-r--r--node_modules/convert-source-map/.travis.yml8
-rw-r--r--node_modules/convert-source-map/README.md20
-rw-r--r--node_modules/convert-source-map/example/comment-to-json.js6
-rw-r--r--node_modules/convert-source-map/index.js67
-rw-r--r--node_modules/convert-source-map/package.json8
-rw-r--r--node_modules/convert-source-map/test/comment-regex.js9
-rw-r--r--node_modules/convert-source-map/test/convert-source-map.js52
-rw-r--r--node_modules/core-js/CHANGELOG.md188
-rw-r--r--node_modules/core-js/LICENSE2
-rw-r--r--node_modules/core-js/bower.json19
-rw-r--r--node_modules/core-js/build/Gruntfile.ls24
-rw-r--r--node_modules/core-js/build/build.ls226
-rw-r--r--node_modules/core-js/build/config.js251
-rw-r--r--node_modules/core-js/build/index.js152
-rw-r--r--node_modules/core-js/client/core.js6907
-rw-r--r--node_modules/core-js/client/core.min.js7
-rw-r--r--node_modules/core-js/client/core.min.js.map2
-rw-r--r--node_modules/core-js/client/library.js6494
-rw-r--r--node_modules/core-js/client/library.min.js7
-rw-r--r--node_modules/core-js/client/library.min.js.map2
-rw-r--r--node_modules/core-js/client/shim.js6705
-rw-r--r--node_modules/core-js/client/shim.min.js7
-rw-r--r--node_modules/core-js/client/shim.min.js.map2
-rw-r--r--node_modules/core-js/core/_.js2
-rw-r--r--node_modules/core-js/core/delay.js2
-rw-r--r--node_modules/core-js/core/dict.js2
-rw-r--r--node_modules/core-js/core/function.js2
-rw-r--r--node_modules/core-js/core/index.js4
-rw-r--r--node_modules/core-js/core/number.js2
-rw-r--r--node_modules/core-js/core/object.js2
-rw-r--r--node_modules/core-js/core/regexp.js2
-rw-r--r--node_modules/core-js/core/string.js2
-rw-r--r--node_modules/core-js/es5/index.js32
-rw-r--r--node_modules/core-js/es6/array.js19
-rw-r--r--node_modules/core-js/es6/date.js6
-rw-r--r--node_modules/core-js/es6/function.js3
-rw-r--r--node_modules/core-js/es6/index.js73
-rw-r--r--node_modules/core-js/es6/map.js2
-rw-r--r--node_modules/core-js/es6/math.js2
-rw-r--r--node_modules/core-js/es6/number.js4
-rw-r--r--node_modules/core-js/es6/object.js21
-rw-r--r--node_modules/core-js/es6/parse-float.js2
-rw-r--r--node_modules/core-js/es6/parse-int.js2
-rw-r--r--node_modules/core-js/es6/promise.js2
-rw-r--r--node_modules/core-js/es6/reflect.js2
-rw-r--r--node_modules/core-js/es6/regexp.js3
-rw-r--r--node_modules/core-js/es6/set.js2
-rw-r--r--node_modules/core-js/es6/string.js15
-rw-r--r--node_modules/core-js/es6/symbol.js2
-rw-r--r--node_modules/core-js/es6/typed.js13
-rw-r--r--node_modules/core-js/es6/weak-map.js2
-rw-r--r--node_modules/core-js/es6/weak-set.js2
-rw-r--r--node_modules/core-js/es7/array.js2
-rw-r--r--node_modules/core-js/es7/asap.js2
-rw-r--r--node_modules/core-js/es7/error.js2
-rw-r--r--node_modules/core-js/es7/index.js31
-rw-r--r--node_modules/core-js/es7/map.js2
-rw-r--r--node_modules/core-js/es7/math.js5
-rw-r--r--node_modules/core-js/es7/object.js6
-rw-r--r--node_modules/core-js/es7/observable.js7
-rw-r--r--node_modules/core-js/es7/reflect.js10
-rw-r--r--node_modules/core-js/es7/set.js2
-rw-r--r--node_modules/core-js/es7/string.js7
-rw-r--r--node_modules/core-js/es7/symbol.js3
-rw-r--r--node_modules/core-js/es7/system.js2
-rw-r--r--node_modules/core-js/fn/_.js2
-rw-r--r--node_modules/core-js/fn/array/concat.js6
-rw-r--r--node_modules/core-js/fn/array/copy-within.js2
-rw-r--r--node_modules/core-js/fn/array/entries.js2
-rw-r--r--node_modules/core-js/fn/array/every.js4
-rw-r--r--node_modules/core-js/fn/array/fill.js2
-rw-r--r--node_modules/core-js/fn/array/filter.js4
-rw-r--r--node_modules/core-js/fn/array/find-index.js2
-rw-r--r--node_modules/core-js/fn/array/find.js2
-rw-r--r--node_modules/core-js/fn/array/for-each.js4
-rw-r--r--node_modules/core-js/fn/array/from.js2
-rw-r--r--node_modules/core-js/fn/array/includes.js2
-rw-r--r--node_modules/core-js/fn/array/index-of.js4
-rw-r--r--node_modules/core-js/fn/array/index.js20
-rw-r--r--node_modules/core-js/fn/array/is-array.js2
-rw-r--r--node_modules/core-js/fn/array/iterator.js2
-rw-r--r--node_modules/core-js/fn/array/join.js4
-rw-r--r--node_modules/core-js/fn/array/keys.js2
-rw-r--r--node_modules/core-js/fn/array/last-index-of.js4
-rw-r--r--node_modules/core-js/fn/array/map.js4
-rw-r--r--node_modules/core-js/fn/array/of.js2
-rw-r--r--node_modules/core-js/fn/array/pop.js6
-rw-r--r--node_modules/core-js/fn/array/push.js6
-rw-r--r--node_modules/core-js/fn/array/reduce-right.js4
-rw-r--r--node_modules/core-js/fn/array/reduce.js4
-rw-r--r--node_modules/core-js/fn/array/reverse.js6
-rw-r--r--node_modules/core-js/fn/array/shift.js6
-rw-r--r--node_modules/core-js/fn/array/slice.js4
-rw-r--r--node_modules/core-js/fn/array/some.js4
-rw-r--r--node_modules/core-js/fn/array/sort.js4
-rw-r--r--node_modules/core-js/fn/array/splice.js6
-rw-r--r--node_modules/core-js/fn/array/unshift.js6
-rw-r--r--node_modules/core-js/fn/array/values.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/copy-within.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/entries.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/every.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/fill.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/filter.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/find-index.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/find.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/for-each.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/includes.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/index-of.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/index.js20
-rw-r--r--node_modules/core-js/fn/array/virtual/iterator.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/join.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/keys.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/last-index-of.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/map.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/reduce-right.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/reduce.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/slice.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/some.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/sort.js2
-rw-r--r--node_modules/core-js/fn/array/virtual/values.js2
-rw-r--r--node_modules/core-js/fn/asap.js2
-rw-r--r--node_modules/core-js/fn/clear-immediate.js2
-rw-r--r--node_modules/core-js/fn/date/index.js6
-rw-r--r--node_modules/core-js/fn/date/now.js2
-rw-r--r--node_modules/core-js/fn/date/to-iso-string.js3
-rw-r--r--node_modules/core-js/fn/date/to-json.js2
-rw-r--r--node_modules/core-js/fn/date/to-primitive.js5
-rw-r--r--node_modules/core-js/fn/date/to-string.js5
-rw-r--r--node_modules/core-js/fn/delay.js2
-rw-r--r--node_modules/core-js/fn/dict.js2
-rw-r--r--node_modules/core-js/fn/dom-collections/index.js8
-rw-r--r--node_modules/core-js/fn/dom-collections/iterator.js2
-rw-r--r--node_modules/core-js/fn/error/index.js2
-rw-r--r--node_modules/core-js/fn/error/is-error.js2
-rw-r--r--node_modules/core-js/fn/function/bind.js2
-rw-r--r--node_modules/core-js/fn/function/has-instance.js2
-rw-r--r--node_modules/core-js/fn/function/index.js3
-rw-r--r--node_modules/core-js/fn/function/part.js2
-rw-r--r--node_modules/core-js/fn/function/virtual/bind.js2
-rw-r--r--node_modules/core-js/fn/function/virtual/index.js3
-rw-r--r--node_modules/core-js/fn/function/virtual/part.js2
-rw-r--r--node_modules/core-js/fn/json/index.js2
-rw-r--r--node_modules/core-js/fn/json/stringify.js5
-rw-r--r--node_modules/core-js/fn/map.js2
-rw-r--r--node_modules/core-js/fn/math/acosh.js2
-rw-r--r--node_modules/core-js/fn/math/asinh.js2
-rw-r--r--node_modules/core-js/fn/math/atanh.js2
-rw-r--r--node_modules/core-js/fn/math/cbrt.js2
-rw-r--r--node_modules/core-js/fn/math/clz32.js2
-rw-r--r--node_modules/core-js/fn/math/cosh.js2
-rw-r--r--node_modules/core-js/fn/math/expm1.js2
-rw-r--r--node_modules/core-js/fn/math/fround.js2
-rw-r--r--node_modules/core-js/fn/math/hypot.js2
-rw-r--r--node_modules/core-js/fn/math/iaddh.js2
-rw-r--r--node_modules/core-js/fn/math/imul.js2
-rw-r--r--node_modules/core-js/fn/math/imulh.js2
-rw-r--r--node_modules/core-js/fn/math/index.js6
-rw-r--r--node_modules/core-js/fn/math/isubh.js2
-rw-r--r--node_modules/core-js/fn/math/log10.js2
-rw-r--r--node_modules/core-js/fn/math/log1p.js2
-rw-r--r--node_modules/core-js/fn/math/log2.js2
-rw-r--r--node_modules/core-js/fn/math/sign.js2
-rw-r--r--node_modules/core-js/fn/math/sinh.js2
-rw-r--r--node_modules/core-js/fn/math/tanh.js2
-rw-r--r--node_modules/core-js/fn/math/trunc.js2
-rw-r--r--node_modules/core-js/fn/math/umulh.js2
-rw-r--r--node_modules/core-js/fn/number/constructor.js2
-rw-r--r--node_modules/core-js/fn/number/index.js4
-rw-r--r--node_modules/core-js/fn/number/is-finite.js2
-rw-r--r--node_modules/core-js/fn/number/is-integer.js2
-rw-r--r--node_modules/core-js/fn/number/is-nan.js2
-rw-r--r--node_modules/core-js/fn/number/is-safe-integer.js2
-rw-r--r--node_modules/core-js/fn/number/iterator.js2
-rw-r--r--node_modules/core-js/fn/number/to-fixed.js2
-rw-r--r--node_modules/core-js/fn/number/to-precision.js2
-rw-r--r--node_modules/core-js/fn/number/virtual/index.js4
-rw-r--r--node_modules/core-js/fn/number/virtual/iterator.js2
-rw-r--r--node_modules/core-js/fn/number/virtual/to-fixed.js2
-rw-r--r--node_modules/core-js/fn/number/virtual/to-precision.js2
-rw-r--r--node_modules/core-js/fn/object/assign.js2
-rw-r--r--node_modules/core-js/fn/object/classof.js2
-rw-r--r--node_modules/core-js/fn/object/create.js5
-rw-r--r--node_modules/core-js/fn/object/define-getter.js2
-rw-r--r--node_modules/core-js/fn/object/define-properties.js5
-rw-r--r--node_modules/core-js/fn/object/define-property.js5
-rw-r--r--node_modules/core-js/fn/object/define-setter.js2
-rw-r--r--node_modules/core-js/fn/object/define.js2
-rw-r--r--node_modules/core-js/fn/object/entries.js2
-rw-r--r--node_modules/core-js/fn/object/freeze.js2
-rw-r--r--node_modules/core-js/fn/object/get-own-property-descriptor.js4
-rw-r--r--node_modules/core-js/fn/object/get-own-property-descriptors.js2
-rw-r--r--node_modules/core-js/fn/object/get-own-property-names.js4
-rw-r--r--node_modules/core-js/fn/object/get-own-property-symbols.js2
-rw-r--r--node_modules/core-js/fn/object/get-prototype-of.js2
-rw-r--r--node_modules/core-js/fn/object/index.js25
-rw-r--r--node_modules/core-js/fn/object/is-extensible.js2
-rw-r--r--node_modules/core-js/fn/object/is-frozen.js2
-rw-r--r--node_modules/core-js/fn/object/is-object.js2
-rw-r--r--node_modules/core-js/fn/object/is-sealed.js2
-rw-r--r--node_modules/core-js/fn/object/is.js2
-rw-r--r--node_modules/core-js/fn/object/keys.js2
-rw-r--r--node_modules/core-js/fn/object/lookup-getter.js2
-rw-r--r--node_modules/core-js/fn/object/lookup-setter.js2
-rw-r--r--node_modules/core-js/fn/object/make.js2
-rw-r--r--node_modules/core-js/fn/object/prevent-extensions.js2
-rw-r--r--node_modules/core-js/fn/object/seal.js2
-rw-r--r--node_modules/core-js/fn/object/set-prototype-of.js2
-rw-r--r--node_modules/core-js/fn/object/values.js2
-rw-r--r--node_modules/core-js/fn/observable.js7
-rw-r--r--node_modules/core-js/fn/parse-float.js2
-rw-r--r--node_modules/core-js/fn/parse-int.js2
-rw-r--r--node_modules/core-js/fn/promise.js2
-rw-r--r--node_modules/core-js/fn/reflect/apply.js2
-rw-r--r--node_modules/core-js/fn/reflect/construct.js2
-rw-r--r--node_modules/core-js/fn/reflect/define-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/define-property.js2
-rw-r--r--node_modules/core-js/fn/reflect/delete-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/delete-property.js2
-rw-r--r--node_modules/core-js/fn/reflect/enumerate.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-metadata-keys.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-own-metadata-keys.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-own-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-own-property-descriptor.js2
-rw-r--r--node_modules/core-js/fn/reflect/get-prototype-of.js2
-rw-r--r--node_modules/core-js/fn/reflect/get.js2
-rw-r--r--node_modules/core-js/fn/reflect/has-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/has-own-metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/has.js2
-rw-r--r--node_modules/core-js/fn/reflect/index.js11
-rw-r--r--node_modules/core-js/fn/reflect/is-extensible.js2
-rw-r--r--node_modules/core-js/fn/reflect/metadata.js2
-rw-r--r--node_modules/core-js/fn/reflect/own-keys.js2
-rw-r--r--node_modules/core-js/fn/reflect/prevent-extensions.js2
-rw-r--r--node_modules/core-js/fn/reflect/set-prototype-of.js2
-rw-r--r--node_modules/core-js/fn/reflect/set.js2
-rw-r--r--node_modules/core-js/fn/regexp/constructor.js2
-rw-r--r--node_modules/core-js/fn/regexp/escape.js4
-rw-r--r--node_modules/core-js/fn/regexp/flags.js5
-rw-r--r--node_modules/core-js/fn/regexp/index.js5
-rw-r--r--node_modules/core-js/fn/regexp/match.js5
-rw-r--r--node_modules/core-js/fn/regexp/replace.js5
-rw-r--r--node_modules/core-js/fn/regexp/search.js5
-rw-r--r--node_modules/core-js/fn/regexp/split.js5
-rw-r--r--node_modules/core-js/fn/regexp/to-string.js5
-rw-r--r--node_modules/core-js/fn/set-immediate.js2
-rw-r--r--node_modules/core-js/fn/set-interval.js2
-rw-r--r--node_modules/core-js/fn/set-timeout.js2
-rw-r--r--node_modules/core-js/fn/set.js2
-rw-r--r--node_modules/core-js/fn/string/anchor.js2
-rw-r--r--node_modules/core-js/fn/string/at.js2
-rw-r--r--node_modules/core-js/fn/string/big.js2
-rw-r--r--node_modules/core-js/fn/string/blink.js2
-rw-r--r--node_modules/core-js/fn/string/bold.js2
-rw-r--r--node_modules/core-js/fn/string/code-point-at.js2
-rw-r--r--node_modules/core-js/fn/string/ends-with.js2
-rw-r--r--node_modules/core-js/fn/string/escape-html.js2
-rw-r--r--node_modules/core-js/fn/string/fixed.js2
-rw-r--r--node_modules/core-js/fn/string/fontcolor.js2
-rw-r--r--node_modules/core-js/fn/string/fontsize.js2
-rw-r--r--node_modules/core-js/fn/string/from-code-point.js2
-rw-r--r--node_modules/core-js/fn/string/includes.js2
-rw-r--r--node_modules/core-js/fn/string/index.js20
-rw-r--r--node_modules/core-js/fn/string/italics.js2
-rw-r--r--node_modules/core-js/fn/string/iterator.js2
-rw-r--r--node_modules/core-js/fn/string/link.js2
-rw-r--r--node_modules/core-js/fn/string/match-all.js2
-rw-r--r--node_modules/core-js/fn/string/pad-end.js2
-rw-r--r--node_modules/core-js/fn/string/pad-start.js2
-rw-r--r--node_modules/core-js/fn/string/raw.js2
-rw-r--r--node_modules/core-js/fn/string/repeat.js2
-rw-r--r--node_modules/core-js/fn/string/small.js2
-rw-r--r--node_modules/core-js/fn/string/starts-with.js2
-rw-r--r--node_modules/core-js/fn/string/strike.js2
-rw-r--r--node_modules/core-js/fn/string/sub.js2
-rw-r--r--node_modules/core-js/fn/string/sup.js2
-rw-r--r--node_modules/core-js/fn/string/trim-end.js2
-rw-r--r--node_modules/core-js/fn/string/trim-left.js2
-rw-r--r--node_modules/core-js/fn/string/trim-right.js2
-rw-r--r--node_modules/core-js/fn/string/trim-start.js2
-rw-r--r--node_modules/core-js/fn/string/trim.js2
-rw-r--r--node_modules/core-js/fn/string/unescape-html.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/anchor.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/at.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/big.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/blink.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/bold.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/code-point-at.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/ends-with.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/escape-html.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/fixed.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/fontcolor.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/fontsize.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/includes.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/index.js33
-rw-r--r--node_modules/core-js/fn/string/virtual/italics.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/iterator.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/link.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/match-all.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/pad-end.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/pad-start.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/repeat.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/small.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/starts-with.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/strike.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/sub.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/sup.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/trim-end.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/trim-left.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/trim-right.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/trim-start.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/trim.js2
-rw-r--r--node_modules/core-js/fn/string/virtual/unescape-html.js2
-rw-r--r--node_modules/core-js/fn/symbol/async-iterator.js2
-rw-r--r--node_modules/core-js/fn/symbol/for.js2
-rw-r--r--node_modules/core-js/fn/symbol/has-instance.js3
-rw-r--r--node_modules/core-js/fn/symbol/index.js4
-rw-r--r--node_modules/core-js/fn/symbol/is-concat-spreadable.js2
-rw-r--r--node_modules/core-js/fn/symbol/iterator.js2
-rw-r--r--node_modules/core-js/fn/symbol/key-for.js2
-rw-r--r--node_modules/core-js/fn/symbol/match.js2
-rw-r--r--node_modules/core-js/fn/symbol/observable.js2
-rw-r--r--node_modules/core-js/fn/symbol/replace.js2
-rw-r--r--node_modules/core-js/fn/symbol/search.js2
-rw-r--r--node_modules/core-js/fn/symbol/species.js2
-rw-r--r--node_modules/core-js/fn/symbol/split.js2
-rw-r--r--node_modules/core-js/fn/symbol/to-primitive.js2
-rw-r--r--node_modules/core-js/fn/symbol/to-string-tag.js2
-rw-r--r--node_modules/core-js/fn/symbol/unscopables.js2
-rw-r--r--node_modules/core-js/fn/system/global.js2
-rw-r--r--node_modules/core-js/fn/system/index.js2
-rw-r--r--node_modules/core-js/fn/typed/array-buffer.js3
-rw-r--r--node_modules/core-js/fn/typed/data-view.js3
-rw-r--r--node_modules/core-js/fn/typed/float32-array.js2
-rw-r--r--node_modules/core-js/fn/typed/float64-array.js2
-rw-r--r--node_modules/core-js/fn/typed/index.js13
-rw-r--r--node_modules/core-js/fn/typed/int16-array.js2
-rw-r--r--node_modules/core-js/fn/typed/int32-array.js2
-rw-r--r--node_modules/core-js/fn/typed/int8-array.js2
-rw-r--r--node_modules/core-js/fn/typed/uint16-array.js2
-rw-r--r--node_modules/core-js/fn/typed/uint32-array.js2
-rw-r--r--node_modules/core-js/fn/typed/uint8-array.js2
-rw-r--r--node_modules/core-js/fn/typed/uint8-clamped-array.js2
-rw-r--r--node_modules/core-js/fn/weak-map.js2
-rw-r--r--node_modules/core-js/fn/weak-set.js2
-rw-r--r--node_modules/core-js/index.js4
-rw-r--r--node_modules/core-js/library/core/_.js2
-rw-r--r--node_modules/core-js/library/core/delay.js2
-rw-r--r--node_modules/core-js/library/core/dict.js2
-rw-r--r--node_modules/core-js/library/core/function.js2
-rw-r--r--node_modules/core-js/library/core/index.js4
-rw-r--r--node_modules/core-js/library/core/number.js2
-rw-r--r--node_modules/core-js/library/core/object.js2
-rw-r--r--node_modules/core-js/library/core/regexp.js2
-rw-r--r--node_modules/core-js/library/core/string.js2
-rw-r--r--node_modules/core-js/library/es5/index.js32
-rw-r--r--node_modules/core-js/library/es6/array.js19
-rw-r--r--node_modules/core-js/library/es6/date.js6
-rw-r--r--node_modules/core-js/library/es6/function.js3
-rw-r--r--node_modules/core-js/library/es6/index.js73
-rw-r--r--node_modules/core-js/library/es6/map.js2
-rw-r--r--node_modules/core-js/library/es6/math.js2
-rw-r--r--node_modules/core-js/library/es6/number.js4
-rw-r--r--node_modules/core-js/library/es6/object.js21
-rw-r--r--node_modules/core-js/library/es6/parse-float.js2
-rw-r--r--node_modules/core-js/library/es6/parse-int.js2
-rw-r--r--node_modules/core-js/library/es6/promise.js2
-rw-r--r--node_modules/core-js/library/es6/reflect.js2
-rw-r--r--node_modules/core-js/library/es6/regexp.js3
-rw-r--r--node_modules/core-js/library/es6/set.js2
-rw-r--r--node_modules/core-js/library/es6/string.js15
-rw-r--r--node_modules/core-js/library/es6/symbol.js2
-rw-r--r--node_modules/core-js/library/es6/typed.js13
-rw-r--r--node_modules/core-js/library/es6/weak-map.js2
-rw-r--r--node_modules/core-js/library/es6/weak-set.js2
-rw-r--r--node_modules/core-js/library/es7/array.js2
-rw-r--r--node_modules/core-js/library/es7/asap.js2
-rw-r--r--node_modules/core-js/library/es7/error.js2
-rw-r--r--node_modules/core-js/library/es7/index.js31
-rw-r--r--node_modules/core-js/library/es7/map.js2
-rw-r--r--node_modules/core-js/library/es7/math.js5
-rw-r--r--node_modules/core-js/library/es7/object.js6
-rw-r--r--node_modules/core-js/library/es7/observable.js7
-rw-r--r--node_modules/core-js/library/es7/reflect.js10
-rw-r--r--node_modules/core-js/library/es7/set.js2
-rw-r--r--node_modules/core-js/library/es7/string.js7
-rw-r--r--node_modules/core-js/library/es7/symbol.js3
-rw-r--r--node_modules/core-js/library/es7/system.js2
-rw-r--r--node_modules/core-js/library/fn/_.js2
-rw-r--r--node_modules/core-js/library/fn/array/concat.js6
-rw-r--r--node_modules/core-js/library/fn/array/copy-within.js2
-rw-r--r--node_modules/core-js/library/fn/array/entries.js2
-rw-r--r--node_modules/core-js/library/fn/array/every.js4
-rw-r--r--node_modules/core-js/library/fn/array/fill.js2
-rw-r--r--node_modules/core-js/library/fn/array/filter.js4
-rw-r--r--node_modules/core-js/library/fn/array/find-index.js2
-rw-r--r--node_modules/core-js/library/fn/array/find.js2
-rw-r--r--node_modules/core-js/library/fn/array/for-each.js4
-rw-r--r--node_modules/core-js/library/fn/array/from.js2
-rw-r--r--node_modules/core-js/library/fn/array/includes.js2
-rw-r--r--node_modules/core-js/library/fn/array/index-of.js4
-rw-r--r--node_modules/core-js/library/fn/array/index.js20
-rw-r--r--node_modules/core-js/library/fn/array/is-array.js2
-rw-r--r--node_modules/core-js/library/fn/array/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/array/join.js4
-rw-r--r--node_modules/core-js/library/fn/array/keys.js2
-rw-r--r--node_modules/core-js/library/fn/array/last-index-of.js4
-rw-r--r--node_modules/core-js/library/fn/array/map.js4
-rw-r--r--node_modules/core-js/library/fn/array/of.js2
-rw-r--r--node_modules/core-js/library/fn/array/pop.js6
-rw-r--r--node_modules/core-js/library/fn/array/push.js6
-rw-r--r--node_modules/core-js/library/fn/array/reduce-right.js4
-rw-r--r--node_modules/core-js/library/fn/array/reduce.js4
-rw-r--r--node_modules/core-js/library/fn/array/reverse.js6
-rw-r--r--node_modules/core-js/library/fn/array/shift.js6
-rw-r--r--node_modules/core-js/library/fn/array/slice.js4
-rw-r--r--node_modules/core-js/library/fn/array/some.js4
-rw-r--r--node_modules/core-js/library/fn/array/sort.js4
-rw-r--r--node_modules/core-js/library/fn/array/splice.js6
-rw-r--r--node_modules/core-js/library/fn/array/unshift.js6
-rw-r--r--node_modules/core-js/library/fn/array/values.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/copy-within.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/entries.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/every.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/fill.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/filter.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/find-index.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/find.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/for-each.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/includes.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/index-of.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/index.js20
-rw-r--r--node_modules/core-js/library/fn/array/virtual/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/join.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/keys.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/last-index-of.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/map.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/reduce-right.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/reduce.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/slice.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/some.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/sort.js2
-rw-r--r--node_modules/core-js/library/fn/array/virtual/values.js2
-rw-r--r--node_modules/core-js/library/fn/asap.js2
-rw-r--r--node_modules/core-js/library/fn/clear-immediate.js2
-rw-r--r--node_modules/core-js/library/fn/date/index.js6
-rw-r--r--node_modules/core-js/library/fn/date/now.js2
-rw-r--r--node_modules/core-js/library/fn/date/to-iso-string.js3
-rw-r--r--node_modules/core-js/library/fn/date/to-json.js2
-rw-r--r--node_modules/core-js/library/fn/date/to-primitive.js5
-rw-r--r--node_modules/core-js/library/fn/date/to-string.js5
-rw-r--r--node_modules/core-js/library/fn/delay.js2
-rw-r--r--node_modules/core-js/library/fn/dict.js2
-rw-r--r--node_modules/core-js/library/fn/dom-collections/index.js8
-rw-r--r--node_modules/core-js/library/fn/dom-collections/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/error/index.js2
-rw-r--r--node_modules/core-js/library/fn/error/is-error.js2
-rw-r--r--node_modules/core-js/library/fn/function/bind.js2
-rw-r--r--node_modules/core-js/library/fn/function/has-instance.js2
-rw-r--r--node_modules/core-js/library/fn/function/index.js3
-rw-r--r--node_modules/core-js/library/fn/function/part.js2
-rw-r--r--node_modules/core-js/library/fn/function/virtual/bind.js2
-rw-r--r--node_modules/core-js/library/fn/function/virtual/index.js3
-rw-r--r--node_modules/core-js/library/fn/function/virtual/part.js2
-rw-r--r--node_modules/core-js/library/fn/json/index.js2
-rw-r--r--node_modules/core-js/library/fn/json/stringify.js5
-rw-r--r--node_modules/core-js/library/fn/map.js2
-rw-r--r--node_modules/core-js/library/fn/math/acosh.js2
-rw-r--r--node_modules/core-js/library/fn/math/asinh.js2
-rw-r--r--node_modules/core-js/library/fn/math/atanh.js2
-rw-r--r--node_modules/core-js/library/fn/math/cbrt.js2
-rw-r--r--node_modules/core-js/library/fn/math/clz32.js2
-rw-r--r--node_modules/core-js/library/fn/math/cosh.js2
-rw-r--r--node_modules/core-js/library/fn/math/expm1.js2
-rw-r--r--node_modules/core-js/library/fn/math/fround.js2
-rw-r--r--node_modules/core-js/library/fn/math/hypot.js2
-rw-r--r--node_modules/core-js/library/fn/math/iaddh.js2
-rw-r--r--node_modules/core-js/library/fn/math/imul.js2
-rw-r--r--node_modules/core-js/library/fn/math/imulh.js2
-rw-r--r--node_modules/core-js/library/fn/math/index.js6
-rw-r--r--node_modules/core-js/library/fn/math/isubh.js2
-rw-r--r--node_modules/core-js/library/fn/math/log10.js2
-rw-r--r--node_modules/core-js/library/fn/math/log1p.js2
-rw-r--r--node_modules/core-js/library/fn/math/log2.js2
-rw-r--r--node_modules/core-js/library/fn/math/sign.js2
-rw-r--r--node_modules/core-js/library/fn/math/sinh.js2
-rw-r--r--node_modules/core-js/library/fn/math/tanh.js2
-rw-r--r--node_modules/core-js/library/fn/math/trunc.js2
-rw-r--r--node_modules/core-js/library/fn/math/umulh.js2
-rw-r--r--node_modules/core-js/library/fn/number/constructor.js2
-rw-r--r--node_modules/core-js/library/fn/number/index.js4
-rw-r--r--node_modules/core-js/library/fn/number/is-finite.js2
-rw-r--r--node_modules/core-js/library/fn/number/is-integer.js2
-rw-r--r--node_modules/core-js/library/fn/number/is-nan.js2
-rw-r--r--node_modules/core-js/library/fn/number/is-safe-integer.js2
-rw-r--r--node_modules/core-js/library/fn/number/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/number/to-fixed.js2
-rw-r--r--node_modules/core-js/library/fn/number/to-precision.js2
-rw-r--r--node_modules/core-js/library/fn/number/virtual/index.js4
-rw-r--r--node_modules/core-js/library/fn/number/virtual/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/number/virtual/to-fixed.js2
-rw-r--r--node_modules/core-js/library/fn/number/virtual/to-precision.js2
-rw-r--r--node_modules/core-js/library/fn/object/assign.js2
-rw-r--r--node_modules/core-js/library/fn/object/classof.js2
-rw-r--r--node_modules/core-js/library/fn/object/create.js5
-rw-r--r--node_modules/core-js/library/fn/object/define-getter.js2
-rw-r--r--node_modules/core-js/library/fn/object/define-properties.js5
-rw-r--r--node_modules/core-js/library/fn/object/define-property.js5
-rw-r--r--node_modules/core-js/library/fn/object/define-setter.js2
-rw-r--r--node_modules/core-js/library/fn/object/define.js2
-rw-r--r--node_modules/core-js/library/fn/object/entries.js2
-rw-r--r--node_modules/core-js/library/fn/object/freeze.js2
-rw-r--r--node_modules/core-js/library/fn/object/get-own-property-descriptor.js4
-rw-r--r--node_modules/core-js/library/fn/object/get-own-property-descriptors.js2
-rw-r--r--node_modules/core-js/library/fn/object/get-own-property-names.js4
-rw-r--r--node_modules/core-js/library/fn/object/get-own-property-symbols.js2
-rw-r--r--node_modules/core-js/library/fn/object/get-prototype-of.js2
-rw-r--r--node_modules/core-js/library/fn/object/index.js25
-rw-r--r--node_modules/core-js/library/fn/object/is-extensible.js2
-rw-r--r--node_modules/core-js/library/fn/object/is-frozen.js2
-rw-r--r--node_modules/core-js/library/fn/object/is-object.js2
-rw-r--r--node_modules/core-js/library/fn/object/is-sealed.js2
-rw-r--r--node_modules/core-js/library/fn/object/is.js2
-rw-r--r--node_modules/core-js/library/fn/object/keys.js2
-rw-r--r--node_modules/core-js/library/fn/object/lookup-getter.js2
-rw-r--r--node_modules/core-js/library/fn/object/lookup-setter.js2
-rw-r--r--node_modules/core-js/library/fn/object/make.js2
-rw-r--r--node_modules/core-js/library/fn/object/prevent-extensions.js2
-rw-r--r--node_modules/core-js/library/fn/object/seal.js2
-rw-r--r--node_modules/core-js/library/fn/object/set-prototype-of.js2
-rw-r--r--node_modules/core-js/library/fn/object/values.js2
-rw-r--r--node_modules/core-js/library/fn/observable.js7
-rw-r--r--node_modules/core-js/library/fn/parse-float.js2
-rw-r--r--node_modules/core-js/library/fn/parse-int.js2
-rw-r--r--node_modules/core-js/library/fn/promise.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/apply.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/construct.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/define-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/define-property.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/delete-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/delete-property.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/enumerate.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-metadata-keys.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-own-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get-prototype-of.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/get.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/has-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/has-own-metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/has.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/index.js11
-rw-r--r--node_modules/core-js/library/fn/reflect/is-extensible.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/metadata.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/own-keys.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/prevent-extensions.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/set-prototype-of.js2
-rw-r--r--node_modules/core-js/library/fn/reflect/set.js2
-rw-r--r--node_modules/core-js/library/fn/regexp/constructor.js2
-rw-r--r--node_modules/core-js/library/fn/regexp/escape.js4
-rw-r--r--node_modules/core-js/library/fn/regexp/flags.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/index.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/match.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/replace.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/search.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/split.js5
-rw-r--r--node_modules/core-js/library/fn/regexp/to-string.js5
-rw-r--r--node_modules/core-js/library/fn/set-immediate.js2
-rw-r--r--node_modules/core-js/library/fn/set-interval.js2
-rw-r--r--node_modules/core-js/library/fn/set-timeout.js2
-rw-r--r--node_modules/core-js/library/fn/set.js2
-rw-r--r--node_modules/core-js/library/fn/string/anchor.js2
-rw-r--r--node_modules/core-js/library/fn/string/at.js2
-rw-r--r--node_modules/core-js/library/fn/string/big.js2
-rw-r--r--node_modules/core-js/library/fn/string/blink.js2
-rw-r--r--node_modules/core-js/library/fn/string/bold.js2
-rw-r--r--node_modules/core-js/library/fn/string/code-point-at.js2
-rw-r--r--node_modules/core-js/library/fn/string/ends-with.js2
-rw-r--r--node_modules/core-js/library/fn/string/escape-html.js2
-rw-r--r--node_modules/core-js/library/fn/string/fixed.js2
-rw-r--r--node_modules/core-js/library/fn/string/fontcolor.js2
-rw-r--r--node_modules/core-js/library/fn/string/fontsize.js2
-rw-r--r--node_modules/core-js/library/fn/string/from-code-point.js2
-rw-r--r--node_modules/core-js/library/fn/string/includes.js2
-rw-r--r--node_modules/core-js/library/fn/string/index.js20
-rw-r--r--node_modules/core-js/library/fn/string/italics.js2
-rw-r--r--node_modules/core-js/library/fn/string/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/string/link.js2
-rw-r--r--node_modules/core-js/library/fn/string/match-all.js2
-rw-r--r--node_modules/core-js/library/fn/string/pad-end.js2
-rw-r--r--node_modules/core-js/library/fn/string/pad-start.js2
-rw-r--r--node_modules/core-js/library/fn/string/raw.js2
-rw-r--r--node_modules/core-js/library/fn/string/repeat.js2
-rw-r--r--node_modules/core-js/library/fn/string/small.js2
-rw-r--r--node_modules/core-js/library/fn/string/starts-with.js2
-rw-r--r--node_modules/core-js/library/fn/string/strike.js2
-rw-r--r--node_modules/core-js/library/fn/string/sub.js2
-rw-r--r--node_modules/core-js/library/fn/string/sup.js2
-rw-r--r--node_modules/core-js/library/fn/string/trim-end.js2
-rw-r--r--node_modules/core-js/library/fn/string/trim-left.js2
-rw-r--r--node_modules/core-js/library/fn/string/trim-right.js2
-rw-r--r--node_modules/core-js/library/fn/string/trim-start.js2
-rw-r--r--node_modules/core-js/library/fn/string/trim.js2
-rw-r--r--node_modules/core-js/library/fn/string/unescape-html.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/anchor.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/at.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/big.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/blink.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/bold.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/code-point-at.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/ends-with.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/escape-html.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/fixed.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/fontcolor.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/fontsize.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/includes.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/index.js33
-rw-r--r--node_modules/core-js/library/fn/string/virtual/italics.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/link.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/match-all.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/pad-end.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/pad-start.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/repeat.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/small.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/starts-with.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/strike.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/sub.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/sup.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/trim-end.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/trim-left.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/trim-right.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/trim-start.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/trim.js2
-rw-r--r--node_modules/core-js/library/fn/string/virtual/unescape-html.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/async-iterator.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/for.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/has-instance.js3
-rw-r--r--node_modules/core-js/library/fn/symbol/index.js4
-rw-r--r--node_modules/core-js/library/fn/symbol/is-concat-spreadable.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/iterator.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/key-for.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/match.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/observable.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/replace.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/search.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/species.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/split.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/to-primitive.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/to-string-tag.js2
-rw-r--r--node_modules/core-js/library/fn/symbol/unscopables.js2
-rw-r--r--node_modules/core-js/library/fn/system/global.js2
-rw-r--r--node_modules/core-js/library/fn/system/index.js2
-rw-r--r--node_modules/core-js/library/fn/typed/array-buffer.js3
-rw-r--r--node_modules/core-js/library/fn/typed/data-view.js3
-rw-r--r--node_modules/core-js/library/fn/typed/float32-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/float64-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/index.js13
-rw-r--r--node_modules/core-js/library/fn/typed/int16-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/int32-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/int8-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/uint16-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/uint32-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/uint8-array.js2
-rw-r--r--node_modules/core-js/library/fn/typed/uint8-clamped-array.js2
-rw-r--r--node_modules/core-js/library/fn/weak-map.js2
-rw-r--r--node_modules/core-js/library/fn/weak-set.js2
-rw-r--r--node_modules/core-js/library/index.js4
-rw-r--r--node_modules/core-js/library/modules/_a-function.js4
-rw-r--r--node_modules/core-js/library/modules/_a-number-value.js5
-rw-r--r--node_modules/core-js/library/modules/_add-to-unscopables.js1
-rw-r--r--node_modules/core-js/library/modules/_an-instance.js5
-rw-r--r--node_modules/core-js/library/modules/_an-object.js5
-rw-r--r--node_modules/core-js/library/modules/_array-copy-within.js26
-rw-r--r--node_modules/core-js/library/modules/_array-fill.js15
-rw-r--r--node_modules/core-js/library/modules/_array-from-iterable.js7
-rw-r--r--node_modules/core-js/library/modules/_array-includes.js21
-rw-r--r--node_modules/core-js/library/modules/_array-methods.js44
-rw-r--r--node_modules/core-js/library/modules/_array-reduce.js28
-rw-r--r--node_modules/core-js/library/modules/_array-species-constructor.js16
-rw-r--r--node_modules/core-js/library/modules/_array-species-create.js6
-rw-r--r--node_modules/core-js/library/modules/_bind.js24
-rw-r--r--node_modules/core-js/library/modules/_classof.js23
-rw-r--r--node_modules/core-js/library/modules/_cof.js5
-rw-r--r--node_modules/core-js/library/modules/_collection-strong.js142
-rw-r--r--node_modules/core-js/library/modules/_collection-to-json.js9
-rw-r--r--node_modules/core-js/library/modules/_collection-weak.js83
-rw-r--r--node_modules/core-js/library/modules/_collection.js59
-rw-r--r--node_modules/core-js/library/modules/_core.js2
-rw-r--r--node_modules/core-js/library/modules/_create-property.js8
-rw-r--r--node_modules/core-js/library/modules/_ctx.js20
-rw-r--r--node_modules/core-js/library/modules/_date-to-primitive.js9
-rw-r--r--node_modules/core-js/library/modules/_defined.js5
-rw-r--r--node_modules/core-js/library/modules/_descriptors.js4
-rw-r--r--node_modules/core-js/library/modules/_dom-create.js7
-rw-r--r--node_modules/core-js/library/modules/_entry-virtual.js5
-rw-r--r--node_modules/core-js/library/modules/_enum-bug-keys.js4
-rw-r--r--node_modules/core-js/library/modules/_enum-keys.js15
-rw-r--r--node_modules/core-js/library/modules/_export.js61
-rw-r--r--node_modules/core-js/library/modules/_fails-is-regexp.js12
-rw-r--r--node_modules/core-js/library/modules/_fails.js7
-rw-r--r--node_modules/core-js/library/modules/_fix-re-wks.js28
-rw-r--r--node_modules/core-js/library/modules/_flags.js13
-rw-r--r--node_modules/core-js/library/modules/_for-of.js25
-rw-r--r--node_modules/core-js/library/modules/_global.js4
-rw-r--r--node_modules/core-js/library/modules/_has.js4
-rw-r--r--node_modules/core-js/library/modules/_hide.js8
-rw-r--r--node_modules/core-js/library/modules/_html.js1
-rw-r--r--node_modules/core-js/library/modules/_ie8-dom-define.js3
-rw-r--r--node_modules/core-js/library/modules/_inherit-if-required.js8
-rw-r--r--node_modules/core-js/library/modules/_invoke.js16
-rw-r--r--node_modules/core-js/library/modules/_iobject.js5
-rw-r--r--node_modules/core-js/library/modules/_is-array-iter.js8
-rw-r--r--node_modules/core-js/library/modules/_is-array.js5
-rw-r--r--node_modules/core-js/library/modules/_is-integer.js6
-rw-r--r--node_modules/core-js/library/modules/_is-object.js3
-rw-r--r--node_modules/core-js/library/modules/_is-regexp.js8
-rw-r--r--node_modules/core-js/library/modules/_iter-call.js12
-rw-r--r--node_modules/core-js/library/modules/_iter-create.js13
-rw-r--r--node_modules/core-js/library/modules/_iter-define.js70
-rw-r--r--node_modules/core-js/library/modules/_iter-detect.js21
-rw-r--r--node_modules/core-js/library/modules/_iter-step.js3
-rw-r--r--node_modules/core-js/library/modules/_iterators.js1
-rw-r--r--node_modules/core-js/library/modules/_keyof.js10
-rw-r--r--node_modules/core-js/library/modules/_library.js1
-rw-r--r--node_modules/core-js/library/modules/_math-expm1.js10
-rw-r--r--node_modules/core-js/library/modules/_math-log1p.js4
-rw-r--r--node_modules/core-js/library/modules/_math-sign.js4
-rw-r--r--node_modules/core-js/library/modules/_meta.js53
-rw-r--r--node_modules/core-js/library/modules/_metadata.js51
-rw-r--r--node_modules/core-js/library/modules/_microtask.js68
-rw-r--r--node_modules/core-js/library/modules/_object-assign.js33
-rw-r--r--node_modules/core-js/library/modules/_object-create.js41
-rw-r--r--node_modules/core-js/library/modules/_object-define.js12
-rw-r--r--node_modules/core-js/library/modules/_object-dp.js16
-rw-r--r--node_modules/core-js/library/modules/_object-dps.js13
-rw-r--r--node_modules/core-js/library/modules/_object-forced-pam.js7
-rw-r--r--node_modules/core-js/library/modules/_object-gopd.js16
-rw-r--r--node_modules/core-js/library/modules/_object-gopn-ext.js19
-rw-r--r--node_modules/core-js/library/modules/_object-gopn.js7
-rw-r--r--node_modules/core-js/library/modules/_object-gops.js1
-rw-r--r--node_modules/core-js/library/modules/_object-gpo.js13
-rw-r--r--node_modules/core-js/library/modules/_object-keys-internal.js17
-rw-r--r--node_modules/core-js/library/modules/_object-keys.js7
-rw-r--r--node_modules/core-js/library/modules/_object-pie.js1
-rw-r--r--node_modules/core-js/library/modules/_object-sap.js10
-rw-r--r--node_modules/core-js/library/modules/_object-to-array.js16
-rw-r--r--node_modules/core-js/library/modules/_own-keys.js10
-rw-r--r--node_modules/core-js/library/modules/_parse-float.js8
-rw-r--r--node_modules/core-js/library/modules/_parse-int.js9
-rw-r--r--node_modules/core-js/library/modules/_partial.js23
-rw-r--r--node_modules/core-js/library/modules/_path.js1
-rw-r--r--node_modules/core-js/library/modules/_property-desc.js8
-rw-r--r--node_modules/core-js/library/modules/_redefine-all.js7
-rw-r--r--node_modules/core-js/library/modules/_redefine.js1
-rw-r--r--node_modules/core-js/library/modules/_replacer.js8
-rw-r--r--node_modules/core-js/library/modules/_same-value.js4
-rw-r--r--node_modules/core-js/library/modules/_set-proto.js25
-rw-r--r--node_modules/core-js/library/modules/_set-species.js14
-rw-r--r--node_modules/core-js/library/modules/_set-to-string-tag.js7
-rw-r--r--node_modules/core-js/library/modules/_shared-key.js5
-rw-r--r--node_modules/core-js/library/modules/_shared.js6
-rw-r--r--node_modules/core-js/library/modules/_species-constructor.js8
-rw-r--r--node_modules/core-js/library/modules/_strict-method.js7
-rw-r--r--node_modules/core-js/library/modules/_string-at.js17
-rw-r--r--node_modules/core-js/library/modules/_string-context.js8
-rw-r--r--node_modules/core-js/library/modules/_string-html.js19
-rw-r--r--node_modules/core-js/library/modules/_string-pad.js16
-rw-r--r--node_modules/core-js/library/modules/_string-repeat.js12
-rw-r--r--node_modules/core-js/library/modules/_string-trim.js30
-rw-r--r--node_modules/core-js/library/modules/_string-ws.js2
-rw-r--r--node_modules/core-js/library/modules/_task.js75
-rw-r--r--node_modules/core-js/library/modules/_to-index.js7
-rw-r--r--node_modules/core-js/library/modules/_to-integer.js6
-rw-r--r--node_modules/core-js/library/modules/_to-iobject.js6
-rw-r--r--node_modules/core-js/library/modules/_to-length.js6
-rw-r--r--node_modules/core-js/library/modules/_to-object.js5
-rw-r--r--node_modules/core-js/library/modules/_to-primitive.js12
-rw-r--r--node_modules/core-js/library/modules/_typed-array.js479
-rw-r--r--node_modules/core-js/library/modules/_typed-buffer.js273
-rw-r--r--node_modules/core-js/library/modules/_typed.js26
-rw-r--r--node_modules/core-js/library/modules/_uid.js5
-rw-r--r--node_modules/core-js/library/modules/_wks-define.js9
-rw-r--r--node_modules/core-js/library/modules/_wks-ext.js1
-rw-r--r--node_modules/core-js/library/modules/_wks.js11
-rw-r--r--node_modules/core-js/library/modules/core.delay.js8
-rw-r--r--node_modules/core-js/library/modules/core.dict.js40
-rw-r--r--node_modules/core-js/library/modules/core.function.part.js8
-rw-r--r--node_modules/core-js/library/modules/core.get-iterator-method.js8
-rw-r--r--node_modules/core-js/library/modules/core.get-iterator.js4
-rw-r--r--node_modules/core-js/library/modules/core.is-iterable.js8
-rw-r--r--node_modules/core-js/library/modules/core.number.iterator.js2
-rw-r--r--node_modules/core-js/library/modules/core.object.classof.js4
-rw-r--r--node_modules/core-js/library/modules/core.object.define.js4
-rw-r--r--node_modules/core-js/library/modules/core.object.is-object.js4
-rw-r--r--node_modules/core-js/library/modules/core.object.make.js6
-rw-r--r--node_modules/core-js/library/modules/core.regexp.escape.js5
-rw-r--r--node_modules/core-js/library/modules/core.string.escape-html.js4
-rw-r--r--node_modules/core-js/library/modules/core.string.unescape-html.js4
-rw-r--r--node_modules/core-js/library/modules/es5.js311
-rw-r--r--node_modules/core-js/library/modules/es6.array.copy-within.js6
-rw-r--r--node_modules/core-js/library/modules/es6.array.every.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.fill.js6
-rw-r--r--node_modules/core-js/library/modules/es6.array.filter.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.find-index.js6
-rw-r--r--node_modules/core-js/library/modules/es6.array.find.js6
-rw-r--r--node_modules/core-js/library/modules/es6.array.for-each.js11
-rw-r--r--node_modules/core-js/library/modules/es6.array.from.js29
-rw-r--r--node_modules/core-js/library/modules/es6.array.index-of.js15
-rw-r--r--node_modules/core-js/library/modules/es6.array.is-array.js4
-rw-r--r--node_modules/core-js/library/modules/es6.array.iterator.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.join.js12
-rw-r--r--node_modules/core-js/library/modules/es6.array.last-index-of.js22
-rw-r--r--node_modules/core-js/library/modules/es6.array.map.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.of.js14
-rw-r--r--node_modules/core-js/library/modules/es6.array.reduce-right.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.reduce.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.slice.js28
-rw-r--r--node_modules/core-js/library/modules/es6.array.some.js10
-rw-r--r--node_modules/core-js/library/modules/es6.array.sort.js23
-rw-r--r--node_modules/core-js/library/modules/es6.array.species.js2
-rw-r--r--node_modules/core-js/library/modules/es6.date.now.js4
-rw-r--r--node_modules/core-js/library/modules/es6.date.to-iso-string.js28
-rw-r--r--node_modules/core-js/library/modules/es6.date.to-json.js14
-rw-r--r--node_modules/core-js/library/modules/es6.date.to-primitive.js0
-rw-r--r--node_modules/core-js/library/modules/es6.function.bind.js4
-rw-r--r--node_modules/core-js/library/modules/es6.function.has-instance.js12
-rw-r--r--node_modules/core-js/library/modules/es6.map.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.acosh.js12
-rw-r--r--node_modules/core-js/library/modules/es6.math.asinh.js6
-rw-r--r--node_modules/core-js/library/modules/es6.math.atanh.js6
-rw-r--r--node_modules/core-js/library/modules/es6.math.cbrt.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.clz32.js2
-rw-r--r--node_modules/core-js/library/modules/es6.math.cosh.js2
-rw-r--r--node_modules/core-js/library/modules/es6.math.expm1.js5
-rw-r--r--node_modules/core-js/library/modules/es6.math.fround.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.hypot.js15
-rw-r--r--node_modules/core-js/library/modules/es6.math.imul.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.log10.js2
-rw-r--r--node_modules/core-js/library/modules/es6.math.log1p.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.log2.js2
-rw-r--r--node_modules/core-js/library/modules/es6.math.sign.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.sinh.js6
-rw-r--r--node_modules/core-js/library/modules/es6.math.tanh.js4
-rw-r--r--node_modules/core-js/library/modules/es6.math.trunc.js2
-rw-r--r--node_modules/core-js/library/modules/es6.number.epsilon.js2
-rw-r--r--node_modules/core-js/library/modules/es6.number.is-finite.js4
-rw-r--r--node_modules/core-js/library/modules/es6.number.is-integer.js4
-rw-r--r--node_modules/core-js/library/modules/es6.number.is-nan.js2
-rw-r--r--node_modules/core-js/library/modules/es6.number.is-safe-integer.js4
-rw-r--r--node_modules/core-js/library/modules/es6.number.max-safe-integer.js2
-rw-r--r--node_modules/core-js/library/modules/es6.number.min-safe-integer.js2
-rw-r--r--node_modules/core-js/library/modules/es6.number.parse-float.js6
-rw-r--r--node_modules/core-js/library/modules/es6.number.parse-int.js6
-rw-r--r--node_modules/core-js/library/modules/es6.number.to-fixed.js113
-rw-r--r--node_modules/core-js/library/modules/es6.number.to-precision.js18
-rw-r--r--node_modules/core-js/library/modules/es6.object.assign.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.create.js3
-rw-r--r--node_modules/core-js/library/modules/es6.object.define-properties.js3
-rw-r--r--node_modules/core-js/library/modules/es6.object.define-property.js3
-rw-r--r--node_modules/core-js/library/modules/es6.object.freeze.js7
-rw-r--r--node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js5
-rw-r--r--node_modules/core-js/library/modules/es6.object.get-own-property-names.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.get-prototype-of.js5
-rw-r--r--node_modules/core-js/library/modules/es6.object.is-extensible.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.is-frozen.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.is-sealed.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.is.js4
-rw-r--r--node_modules/core-js/library/modules/es6.object.keys.js5
-rw-r--r--node_modules/core-js/library/modules/es6.object.prevent-extensions.js7
-rw-r--r--node_modules/core-js/library/modules/es6.object.seal.js7
-rw-r--r--node_modules/core-js/library/modules/es6.object.set-prototype-of.js4
-rw-r--r--node_modules/core-js/library/modules/es6.parse-float.js4
-rw-r--r--node_modules/core-js/library/modules/es6.parse-int.js4
-rw-r--r--node_modules/core-js/library/modules/es6.promise.js312
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.apply.js18
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.construct.js30
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.define-property.js15
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.delete-property.js8
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.enumerate.js6
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js8
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js6
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.get.js15
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.has.js2
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.is-extensible.js4
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.own-keys.js4
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js4
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js4
-rw-r--r--node_modules/core-js/library/modules/es6.reflect.set.js22
-rw-r--r--node_modules/core-js/library/modules/es6.regexp.constructor.js2
-rw-r--r--node_modules/core-js/library/modules/es6.regexp.to-string.js0
-rw-r--r--node_modules/core-js/library/modules/es6.set.js4
-rw-r--r--node_modules/core-js/library/modules/es6.string.anchor.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.big.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.blink.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.bold.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.code-point-at.js4
-rw-r--r--node_modules/core-js/library/modules/es6.string.ends-with.js11
-rw-r--r--node_modules/core-js/library/modules/es6.string.fixed.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.fontcolor.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.fontsize.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.from-code-point.js15
-rw-r--r--node_modules/core-js/library/modules/es6.string.includes.js6
-rw-r--r--node_modules/core-js/library/modules/es6.string.italics.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.iterator.js4
-rw-r--r--node_modules/core-js/library/modules/es6.string.link.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.raw.js19
-rw-r--r--node_modules/core-js/library/modules/es6.string.repeat.js4
-rw-r--r--node_modules/core-js/library/modules/es6.string.small.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.starts-with.js11
-rw-r--r--node_modules/core-js/library/modules/es6.string.strike.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.sub.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.sup.js7
-rw-r--r--node_modules/core-js/library/modules/es6.string.trim.js2
-rw-r--r--node_modules/core-js/library/modules/es6.symbol.js250
-rw-r--r--node_modules/core-js/library/modules/es6.typed.array-buffer.js81
-rw-r--r--node_modules/core-js/library/modules/es6.typed.data-view.js8
-rw-r--r--node_modules/core-js/library/modules/es6.typed.float32-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.float64-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.int16-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.int32-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.int8-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.uint16-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.uint32-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.uint8-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js2
-rw-r--r--node_modules/core-js/library/modules/es6.weak-map.js51
-rw-r--r--node_modules/core-js/library/modules/es6.weak-set.js4
-rw-r--r--node_modules/core-js/library/modules/es7.array.includes.js8
-rw-r--r--node_modules/core-js/library/modules/es7.asap.js12
-rw-r--r--node_modules/core-js/library/modules/es7.error.is-error.js9
-rw-r--r--node_modules/core-js/library/modules/es7.map.to-json.js4
-rw-r--r--node_modules/core-js/library/modules/es7.math.iaddh.js11
-rw-r--r--node_modules/core-js/library/modules/es7.math.imulh.js16
-rw-r--r--node_modules/core-js/library/modules/es7.math.isubh.js11
-rw-r--r--node_modules/core-js/library/modules/es7.math.umulh.js16
-rw-r--r--node_modules/core-js/library/modules/es7.object.define-getter.js12
-rw-r--r--node_modules/core-js/library/modules/es7.object.define-setter.js12
-rw-r--r--node_modules/core-js/library/modules/es7.object.entries.js6
-rw-r--r--node_modules/core-js/library/modules/es7.object.enumerable-entries.js12
-rw-r--r--node_modules/core-js/library/modules/es7.object.enumerable-keys.js12
-rw-r--r--node_modules/core-js/library/modules/es7.object.enumerable-values.js12
-rw-r--r--node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js24
-rw-r--r--node_modules/core-js/library/modules/es7.object.lookup-getter.js18
-rw-r--r--node_modules/core-js/library/modules/es7.object.lookup-setter.js18
-rw-r--r--node_modules/core-js/library/modules/es7.object.values.js6
-rw-r--r--node_modules/core-js/library/modules/es7.observable.js199
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.define-metadata.js8
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.delete-metadata.js15
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js19
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.get-metadata.js17
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js8
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js9
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.has-metadata.js16
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js9
-rw-r--r--node_modules/core-js/library/modules/es7.reflect.metadata.js15
-rw-r--r--node_modules/core-js/library/modules/es7.set.to-json.js4
-rw-r--r--node_modules/core-js/library/modules/es7.string.at.js4
-rw-r--r--node_modules/core-js/library/modules/es7.string.match-all.js30
-rw-r--r--node_modules/core-js/library/modules/es7.string.pad-end.js10
-rw-r--r--node_modules/core-js/library/modules/es7.string.pad-start.js10
-rw-r--r--node_modules/core-js/library/modules/es7.string.trim-left.js4
-rw-r--r--node_modules/core-js/library/modules/es7.string.trim-right.js4
-rw-r--r--node_modules/core-js/library/modules/es7.symbol.async-iterator.js1
-rw-r--r--node_modules/core-js/library/modules/es7.symbol.observable.js1
-rw-r--r--node_modules/core-js/library/modules/es7.system.global.js4
-rw-r--r--node_modules/core-js/library/modules/web.dom.iterable.js14
-rw-r--r--node_modules/core-js/library/modules/web.immediate.js4
-rw-r--r--node_modules/core-js/library/modules/web.timers.js8
-rw-r--r--node_modules/core-js/library/shim.js104
-rw-r--r--node_modules/core-js/library/stage/0.js10
-rw-r--r--node_modules/core-js/library/stage/1.js6
-rw-r--r--node_modules/core-js/library/stage/2.js3
-rw-r--r--node_modules/core-js/library/stage/3.js4
-rw-r--r--node_modules/core-js/library/stage/4.js8
-rw-r--r--node_modules/core-js/library/stage/index.js1
-rw-r--r--node_modules/core-js/library/stage/pre.js10
-rw-r--r--node_modules/core-js/library/web/dom-collections.js2
-rw-r--r--node_modules/core-js/library/web/immediate.js2
-rw-r--r--node_modules/core-js/library/web/index.js2
-rw-r--r--node_modules/core-js/library/web/timers.js2
-rw-r--r--node_modules/core-js/modules/_a-function.js4
-rw-r--r--node_modules/core-js/modules/_a-number-value.js5
-rw-r--r--node_modules/core-js/modules/_add-to-unscopables.js7
-rw-r--r--node_modules/core-js/modules/_an-instance.js5
-rw-r--r--node_modules/core-js/modules/_an-object.js5
-rw-r--r--node_modules/core-js/modules/_array-copy-within.js26
-rw-r--r--node_modules/core-js/modules/_array-fill.js15
-rw-r--r--node_modules/core-js/modules/_array-from-iterable.js7
-rw-r--r--node_modules/core-js/modules/_array-includes.js21
-rw-r--r--node_modules/core-js/modules/_array-methods.js44
-rw-r--r--node_modules/core-js/modules/_array-reduce.js28
-rw-r--r--node_modules/core-js/modules/_array-species-constructor.js16
-rw-r--r--node_modules/core-js/modules/_array-species-create.js6
-rw-r--r--node_modules/core-js/modules/_bind.js24
-rw-r--r--node_modules/core-js/modules/_classof.js23
-rw-r--r--node_modules/core-js/modules/_cof.js5
-rw-r--r--node_modules/core-js/modules/_collection-strong.js142
-rw-r--r--node_modules/core-js/modules/_collection-to-json.js9
-rw-r--r--node_modules/core-js/modules/_collection-weak.js83
-rw-r--r--node_modules/core-js/modules/_collection.js85
-rw-r--r--node_modules/core-js/modules/_core.js2
-rw-r--r--node_modules/core-js/modules/_create-property.js8
-rw-r--r--node_modules/core-js/modules/_ctx.js20
-rw-r--r--node_modules/core-js/modules/_date-to-primitive.js9
-rw-r--r--node_modules/core-js/modules/_defined.js5
-rw-r--r--node_modules/core-js/modules/_descriptors.js4
-rw-r--r--node_modules/core-js/modules/_dom-create.js7
-rw-r--r--node_modules/core-js/modules/_entry-virtual.js5
-rw-r--r--node_modules/core-js/modules/_enum-bug-keys.js4
-rw-r--r--node_modules/core-js/modules/_enum-keys.js15
-rw-r--r--node_modules/core-js/modules/_export.js43
-rw-r--r--node_modules/core-js/modules/_fails-is-regexp.js12
-rw-r--r--node_modules/core-js/modules/_fails.js7
-rw-r--r--node_modules/core-js/modules/_fix-re-wks.js28
-rw-r--r--node_modules/core-js/modules/_flags.js13
-rw-r--r--node_modules/core-js/modules/_for-of.js25
-rw-r--r--node_modules/core-js/modules/_global.js4
-rw-r--r--node_modules/core-js/modules/_has.js4
-rw-r--r--node_modules/core-js/modules/_hide.js8
-rw-r--r--node_modules/core-js/modules/_html.js1
-rw-r--r--node_modules/core-js/modules/_ie8-dom-define.js3
-rw-r--r--node_modules/core-js/modules/_inherit-if-required.js8
-rw-r--r--node_modules/core-js/modules/_invoke.js16
-rw-r--r--node_modules/core-js/modules/_iobject.js5
-rw-r--r--node_modules/core-js/modules/_is-array-iter.js8
-rw-r--r--node_modules/core-js/modules/_is-array.js5
-rw-r--r--node_modules/core-js/modules/_is-integer.js6
-rw-r--r--node_modules/core-js/modules/_is-object.js3
-rw-r--r--node_modules/core-js/modules/_is-regexp.js8
-rw-r--r--node_modules/core-js/modules/_iter-call.js12
-rw-r--r--node_modules/core-js/modules/_iter-create.js13
-rw-r--r--node_modules/core-js/modules/_iter-define.js70
-rw-r--r--node_modules/core-js/modules/_iter-detect.js21
-rw-r--r--node_modules/core-js/modules/_iter-step.js3
-rw-r--r--node_modules/core-js/modules/_iterators.js1
-rw-r--r--node_modules/core-js/modules/_keyof.js10
-rw-r--r--node_modules/core-js/modules/_library.js1
-rw-r--r--node_modules/core-js/modules/_math-expm1.js10
-rw-r--r--node_modules/core-js/modules/_math-log1p.js4
-rw-r--r--node_modules/core-js/modules/_math-sign.js4
-rw-r--r--node_modules/core-js/modules/_meta.js53
-rw-r--r--node_modules/core-js/modules/_metadata.js51
-rw-r--r--node_modules/core-js/modules/_microtask.js68
-rw-r--r--node_modules/core-js/modules/_object-assign.js33
-rw-r--r--node_modules/core-js/modules/_object-create.js41
-rw-r--r--node_modules/core-js/modules/_object-define.js12
-rw-r--r--node_modules/core-js/modules/_object-dp.js16
-rw-r--r--node_modules/core-js/modules/_object-dps.js13
-rw-r--r--node_modules/core-js/modules/_object-forced-pam.js7
-rw-r--r--node_modules/core-js/modules/_object-gopd.js16
-rw-r--r--node_modules/core-js/modules/_object-gopn-ext.js19
-rw-r--r--node_modules/core-js/modules/_object-gopn.js7
-rw-r--r--node_modules/core-js/modules/_object-gops.js1
-rw-r--r--node_modules/core-js/modules/_object-gpo.js13
-rw-r--r--node_modules/core-js/modules/_object-keys-internal.js17
-rw-r--r--node_modules/core-js/modules/_object-keys.js7
-rw-r--r--node_modules/core-js/modules/_object-pie.js1
-rw-r--r--node_modules/core-js/modules/_object-sap.js10
-rw-r--r--node_modules/core-js/modules/_object-to-array.js16
-rw-r--r--node_modules/core-js/modules/_own-keys.js10
-rw-r--r--node_modules/core-js/modules/_parse-float.js8
-rw-r--r--node_modules/core-js/modules/_parse-int.js9
-rw-r--r--node_modules/core-js/modules/_partial.js23
-rw-r--r--node_modules/core-js/modules/_path.js1
-rw-r--r--node_modules/core-js/modules/_property-desc.js8
-rw-r--r--node_modules/core-js/modules/_redefine-all.js5
-rw-r--r--node_modules/core-js/modules/_redefine.js32
-rw-r--r--node_modules/core-js/modules/_replacer.js8
-rw-r--r--node_modules/core-js/modules/_same-value.js4
-rw-r--r--node_modules/core-js/modules/_set-proto.js25
-rw-r--r--node_modules/core-js/modules/_set-species.js13
-rw-r--r--node_modules/core-js/modules/_set-to-string-tag.js7
-rw-r--r--node_modules/core-js/modules/_shared-key.js5
-rw-r--r--node_modules/core-js/modules/_shared.js6
-rw-r--r--node_modules/core-js/modules/_species-constructor.js8
-rw-r--r--node_modules/core-js/modules/_strict-method.js7
-rw-r--r--node_modules/core-js/modules/_string-at.js17
-rw-r--r--node_modules/core-js/modules/_string-context.js8
-rw-r--r--node_modules/core-js/modules/_string-html.js19
-rw-r--r--node_modules/core-js/modules/_string-pad.js16
-rw-r--r--node_modules/core-js/modules/_string-repeat.js12
-rw-r--r--node_modules/core-js/modules/_string-trim.js30
-rw-r--r--node_modules/core-js/modules/_string-ws.js2
-rw-r--r--node_modules/core-js/modules/_task.js75
-rw-r--r--node_modules/core-js/modules/_to-index.js7
-rw-r--r--node_modules/core-js/modules/_to-integer.js6
-rw-r--r--node_modules/core-js/modules/_to-iobject.js6
-rw-r--r--node_modules/core-js/modules/_to-length.js6
-rw-r--r--node_modules/core-js/modules/_to-object.js5
-rw-r--r--node_modules/core-js/modules/_to-primitive.js12
-rw-r--r--node_modules/core-js/modules/_typed-array.js479
-rw-r--r--node_modules/core-js/modules/_typed-buffer.js273
-rw-r--r--node_modules/core-js/modules/_typed.js26
-rw-r--r--node_modules/core-js/modules/_uid.js5
-rw-r--r--node_modules/core-js/modules/_wks-define.js9
-rw-r--r--node_modules/core-js/modules/_wks-ext.js1
-rw-r--r--node_modules/core-js/modules/_wks.js11
-rw-r--r--node_modules/core-js/modules/core.delay.js8
-rw-r--r--node_modules/core-js/modules/core.dict.js40
-rw-r--r--node_modules/core-js/modules/core.function.part.js8
-rw-r--r--node_modules/core-js/modules/core.get-iterator-method.js8
-rw-r--r--node_modules/core-js/modules/core.get-iterator.js4
-rw-r--r--node_modules/core-js/modules/core.is-iterable.js8
-rw-r--r--node_modules/core-js/modules/core.number.iterator.js2
-rw-r--r--node_modules/core-js/modules/core.object.classof.js4
-rw-r--r--node_modules/core-js/modules/core.object.define.js4
-rw-r--r--node_modules/core-js/modules/core.object.is-object.js4
-rw-r--r--node_modules/core-js/modules/core.object.make.js6
-rw-r--r--node_modules/core-js/modules/core.regexp.escape.js5
-rw-r--r--node_modules/core-js/modules/core.string.escape-html.js4
-rw-r--r--node_modules/core-js/modules/core.string.unescape-html.js4
-rw-r--r--node_modules/core-js/modules/es5.js311
-rw-r--r--node_modules/core-js/modules/es6.array.copy-within.js6
-rw-r--r--node_modules/core-js/modules/es6.array.every.js10
-rw-r--r--node_modules/core-js/modules/es6.array.fill.js6
-rw-r--r--node_modules/core-js/modules/es6.array.filter.js10
-rw-r--r--node_modules/core-js/modules/es6.array.find-index.js6
-rw-r--r--node_modules/core-js/modules/es6.array.find.js6
-rw-r--r--node_modules/core-js/modules/es6.array.for-each.js11
-rw-r--r--node_modules/core-js/modules/es6.array.from.js29
-rw-r--r--node_modules/core-js/modules/es6.array.index-of.js15
-rw-r--r--node_modules/core-js/modules/es6.array.is-array.js4
-rw-r--r--node_modules/core-js/modules/es6.array.iterator.js10
-rw-r--r--node_modules/core-js/modules/es6.array.join.js12
-rw-r--r--node_modules/core-js/modules/es6.array.last-index-of.js22
-rw-r--r--node_modules/core-js/modules/es6.array.map.js10
-rw-r--r--node_modules/core-js/modules/es6.array.of.js14
-rw-r--r--node_modules/core-js/modules/es6.array.reduce-right.js10
-rw-r--r--node_modules/core-js/modules/es6.array.reduce.js10
-rw-r--r--node_modules/core-js/modules/es6.array.slice.js28
-rw-r--r--node_modules/core-js/modules/es6.array.some.js10
-rw-r--r--node_modules/core-js/modules/es6.array.sort.js23
-rw-r--r--node_modules/core-js/modules/es6.array.species.js2
-rw-r--r--node_modules/core-js/modules/es6.date.now.js4
-rw-r--r--node_modules/core-js/modules/es6.date.to-iso-string.js28
-rw-r--r--node_modules/core-js/modules/es6.date.to-json.js14
-rw-r--r--node_modules/core-js/modules/es6.date.to-primitive.js4
-rw-r--r--node_modules/core-js/modules/es6.date.to-string.js7
-rw-r--r--node_modules/core-js/modules/es6.function.bind.js4
-rw-r--r--node_modules/core-js/modules/es6.function.has-instance.js12
-rw-r--r--node_modules/core-js/modules/es6.function.name.js25
-rw-r--r--node_modules/core-js/modules/es6.map.js4
-rw-r--r--node_modules/core-js/modules/es6.math.acosh.js12
-rw-r--r--node_modules/core-js/modules/es6.math.asinh.js6
-rw-r--r--node_modules/core-js/modules/es6.math.atanh.js6
-rw-r--r--node_modules/core-js/modules/es6.math.cbrt.js4
-rw-r--r--node_modules/core-js/modules/es6.math.clz32.js2
-rw-r--r--node_modules/core-js/modules/es6.math.cosh.js2
-rw-r--r--node_modules/core-js/modules/es6.math.expm1.js5
-rw-r--r--node_modules/core-js/modules/es6.math.fround.js4
-rw-r--r--node_modules/core-js/modules/es6.math.hypot.js15
-rw-r--r--node_modules/core-js/modules/es6.math.imul.js4
-rw-r--r--node_modules/core-js/modules/es6.math.log10.js2
-rw-r--r--node_modules/core-js/modules/es6.math.log1p.js4
-rw-r--r--node_modules/core-js/modules/es6.math.log2.js2
-rw-r--r--node_modules/core-js/modules/es6.math.sign.js4
-rw-r--r--node_modules/core-js/modules/es6.math.sinh.js6
-rw-r--r--node_modules/core-js/modules/es6.math.tanh.js4
-rw-r--r--node_modules/core-js/modules/es6.math.trunc.js2
-rw-r--r--node_modules/core-js/modules/es6.number.constructor.js43
-rw-r--r--node_modules/core-js/modules/es6.number.epsilon.js2
-rw-r--r--node_modules/core-js/modules/es6.number.is-finite.js4
-rw-r--r--node_modules/core-js/modules/es6.number.is-integer.js4
-rw-r--r--node_modules/core-js/modules/es6.number.is-nan.js2
-rw-r--r--node_modules/core-js/modules/es6.number.is-safe-integer.js4
-rw-r--r--node_modules/core-js/modules/es6.number.max-safe-integer.js2
-rw-r--r--node_modules/core-js/modules/es6.number.min-safe-integer.js2
-rw-r--r--node_modules/core-js/modules/es6.number.parse-float.js6
-rw-r--r--node_modules/core-js/modules/es6.number.parse-int.js6
-rw-r--r--node_modules/core-js/modules/es6.number.to-fixed.js113
-rw-r--r--node_modules/core-js/modules/es6.number.to-precision.js18
-rw-r--r--node_modules/core-js/modules/es6.object.assign.js4
-rw-r--r--node_modules/core-js/modules/es6.object.create.js3
-rw-r--r--node_modules/core-js/modules/es6.object.define-properties.js3
-rw-r--r--node_modules/core-js/modules/es6.object.define-property.js3
-rw-r--r--node_modules/core-js/modules/es6.object.freeze.js7
-rw-r--r--node_modules/core-js/modules/es6.object.get-own-property-descriptor.js5
-rw-r--r--node_modules/core-js/modules/es6.object.get-own-property-names.js4
-rw-r--r--node_modules/core-js/modules/es6.object.get-prototype-of.js5
-rw-r--r--node_modules/core-js/modules/es6.object.is-extensible.js4
-rw-r--r--node_modules/core-js/modules/es6.object.is-frozen.js4
-rw-r--r--node_modules/core-js/modules/es6.object.is-sealed.js4
-rw-r--r--node_modules/core-js/modules/es6.object.is.js4
-rw-r--r--node_modules/core-js/modules/es6.object.keys.js5
-rw-r--r--node_modules/core-js/modules/es6.object.prevent-extensions.js7
-rw-r--r--node_modules/core-js/modules/es6.object.seal.js7
-rw-r--r--node_modules/core-js/modules/es6.object.set-prototype-of.js4
-rw-r--r--node_modules/core-js/modules/es6.object.to-string.js6
-rw-r--r--node_modules/core-js/modules/es6.parse-float.js4
-rw-r--r--node_modules/core-js/modules/es6.parse-int.js4
-rw-r--r--node_modules/core-js/modules/es6.promise.js312
-rw-r--r--node_modules/core-js/modules/es6.reflect.apply.js18
-rw-r--r--node_modules/core-js/modules/es6.reflect.construct.js30
-rw-r--r--node_modules/core-js/modules/es6.reflect.define-property.js15
-rw-r--r--node_modules/core-js/modules/es6.reflect.delete-property.js8
-rw-r--r--node_modules/core-js/modules/es6.reflect.enumerate.js6
-rw-r--r--node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js8
-rw-r--r--node_modules/core-js/modules/es6.reflect.get-prototype-of.js6
-rw-r--r--node_modules/core-js/modules/es6.reflect.get.js15
-rw-r--r--node_modules/core-js/modules/es6.reflect.has.js2
-rw-r--r--node_modules/core-js/modules/es6.reflect.is-extensible.js4
-rw-r--r--node_modules/core-js/modules/es6.reflect.own-keys.js4
-rw-r--r--node_modules/core-js/modules/es6.reflect.prevent-extensions.js4
-rw-r--r--node_modules/core-js/modules/es6.reflect.set-prototype-of.js4
-rw-r--r--node_modules/core-js/modules/es6.reflect.set.js22
-rw-r--r--node_modules/core-js/modules/es6.regexp.constructor.js47
-rw-r--r--node_modules/core-js/modules/es6.regexp.flags.js5
-rw-r--r--node_modules/core-js/modules/es6.regexp.match.js6
-rw-r--r--node_modules/core-js/modules/es6.regexp.replace.js6
-rw-r--r--node_modules/core-js/modules/es6.regexp.search.js6
-rw-r--r--node_modules/core-js/modules/es6.regexp.split.js72
-rw-r--r--node_modules/core-js/modules/es6.regexp.to-string.js25
-rw-r--r--node_modules/core-js/modules/es6.set.js4
-rw-r--r--node_modules/core-js/modules/es6.string.anchor.js7
-rw-r--r--node_modules/core-js/modules/es6.string.big.js7
-rw-r--r--node_modules/core-js/modules/es6.string.blink.js7
-rw-r--r--node_modules/core-js/modules/es6.string.bold.js7
-rw-r--r--node_modules/core-js/modules/es6.string.code-point-at.js4
-rw-r--r--node_modules/core-js/modules/es6.string.ends-with.js11
-rw-r--r--node_modules/core-js/modules/es6.string.fixed.js7
-rw-r--r--node_modules/core-js/modules/es6.string.fontcolor.js7
-rw-r--r--node_modules/core-js/modules/es6.string.fontsize.js7
-rw-r--r--node_modules/core-js/modules/es6.string.from-code-point.js15
-rw-r--r--node_modules/core-js/modules/es6.string.includes.js6
-rw-r--r--node_modules/core-js/modules/es6.string.italics.js7
-rw-r--r--node_modules/core-js/modules/es6.string.iterator.js4
-rw-r--r--node_modules/core-js/modules/es6.string.link.js7
-rw-r--r--node_modules/core-js/modules/es6.string.raw.js19
-rw-r--r--node_modules/core-js/modules/es6.string.repeat.js4
-rw-r--r--node_modules/core-js/modules/es6.string.small.js7
-rw-r--r--node_modules/core-js/modules/es6.string.starts-with.js11
-rw-r--r--node_modules/core-js/modules/es6.string.strike.js7
-rw-r--r--node_modules/core-js/modules/es6.string.sub.js7
-rw-r--r--node_modules/core-js/modules/es6.string.sup.js7
-rw-r--r--node_modules/core-js/modules/es6.string.trim.js2
-rw-r--r--node_modules/core-js/modules/es6.symbol.js250
-rw-r--r--node_modules/core-js/modules/es6.typed.array-buffer.js81
-rw-r--r--node_modules/core-js/modules/es6.typed.data-view.js8
-rw-r--r--node_modules/core-js/modules/es6.typed.float32-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.float64-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.int16-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.int32-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.int8-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.uint16-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.uint32-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.uint8-array.js2
-rw-r--r--node_modules/core-js/modules/es6.typed.uint8-clamped-array.js2
-rw-r--r--node_modules/core-js/modules/es6.weak-map.js51
-rw-r--r--node_modules/core-js/modules/es6.weak-set.js4
-rw-r--r--node_modules/core-js/modules/es7.array.includes.js8
-rw-r--r--node_modules/core-js/modules/es7.asap.js12
-rw-r--r--node_modules/core-js/modules/es7.error.is-error.js9
-rw-r--r--node_modules/core-js/modules/es7.map.to-json.js4
-rw-r--r--node_modules/core-js/modules/es7.math.iaddh.js11
-rw-r--r--node_modules/core-js/modules/es7.math.imulh.js16
-rw-r--r--node_modules/core-js/modules/es7.math.isubh.js11
-rw-r--r--node_modules/core-js/modules/es7.math.umulh.js16
-rw-r--r--node_modules/core-js/modules/es7.object.define-getter.js12
-rw-r--r--node_modules/core-js/modules/es7.object.define-setter.js12
-rw-r--r--node_modules/core-js/modules/es7.object.entries.js6
-rw-r--r--node_modules/core-js/modules/es7.object.enumerable-entries.js12
-rw-r--r--node_modules/core-js/modules/es7.object.enumerable-keys.js12
-rw-r--r--node_modules/core-js/modules/es7.object.enumerable-values.js12
-rw-r--r--node_modules/core-js/modules/es7.object.get-own-property-descriptors.js24
-rw-r--r--node_modules/core-js/modules/es7.object.lookup-getter.js18
-rw-r--r--node_modules/core-js/modules/es7.object.lookup-setter.js18
-rw-r--r--node_modules/core-js/modules/es7.object.values.js6
-rw-r--r--node_modules/core-js/modules/es7.observable.js199
-rw-r--r--node_modules/core-js/modules/es7.reflect.define-metadata.js8
-rw-r--r--node_modules/core-js/modules/es7.reflect.delete-metadata.js15
-rw-r--r--node_modules/core-js/modules/es7.reflect.get-metadata-keys.js19
-rw-r--r--node_modules/core-js/modules/es7.reflect.get-metadata.js17
-rw-r--r--node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js8
-rw-r--r--node_modules/core-js/modules/es7.reflect.get-own-metadata.js9
-rw-r--r--node_modules/core-js/modules/es7.reflect.has-metadata.js16
-rw-r--r--node_modules/core-js/modules/es7.reflect.has-own-metadata.js9
-rw-r--r--node_modules/core-js/modules/es7.reflect.metadata.js15
-rw-r--r--node_modules/core-js/modules/es7.set.to-json.js4
-rw-r--r--node_modules/core-js/modules/es7.string.at.js4
-rw-r--r--node_modules/core-js/modules/es7.string.match-all.js30
-rw-r--r--node_modules/core-js/modules/es7.string.pad-end.js10
-rw-r--r--node_modules/core-js/modules/es7.string.pad-start.js10
-rw-r--r--node_modules/core-js/modules/es7.string.trim-left.js4
-rw-r--r--node_modules/core-js/modules/es7.string.trim-right.js4
-rw-r--r--node_modules/core-js/modules/es7.symbol.async-iterator.js1
-rw-r--r--node_modules/core-js/modules/es7.symbol.observable.js1
-rw-r--r--node_modules/core-js/modules/es7.system.global.js4
-rw-r--r--node_modules/core-js/modules/library/_add-to-unscopables.js1
-rw-r--r--node_modules/core-js/modules/library/_collection.js59
-rw-r--r--node_modules/core-js/modules/library/_export.js61
-rw-r--r--node_modules/core-js/modules/library/_library.js1
-rw-r--r--node_modules/core-js/modules/library/_path.js1
-rw-r--r--node_modules/core-js/modules/library/_redefine-all.js7
-rw-r--r--node_modules/core-js/modules/library/_redefine.js1
-rw-r--r--node_modules/core-js/modules/library/_set-species.js14
-rw-r--r--node_modules/core-js/modules/library/es6.date.to-primitive.js0
-rw-r--r--node_modules/core-js/modules/library/es6.regexp.constructor.js2
-rw-r--r--node_modules/core-js/modules/library/es6.regexp.to-string.js0
-rw-r--r--node_modules/core-js/modules/library/web.dom.iterable.js14
-rw-r--r--node_modules/core-js/modules/web.dom.iterable.js34
-rw-r--r--node_modules/core-js/modules/web.immediate.js4
-rw-r--r--node_modules/core-js/modules/web.timers.js8
-rw-r--r--node_modules/core-js/package.json56
-rw-r--r--node_modules/core-js/shim.js104
-rw-r--r--node_modules/core-js/stage/0.js10
-rw-r--r--node_modules/core-js/stage/1.js6
-rw-r--r--node_modules/core-js/stage/2.js3
-rw-r--r--node_modules/core-js/stage/3.js4
-rw-r--r--node_modules/core-js/stage/4.js8
-rw-r--r--node_modules/core-js/stage/index.js1
-rw-r--r--node_modules/core-js/stage/pre.js10
-rw-r--r--node_modules/core-js/web/dom-collections.js2
-rw-r--r--node_modules/core-js/web/immediate.js2
-rw-r--r--node_modules/core-js/web/index.js2
-rw-r--r--node_modules/core-js/web/timers.js2
-rw-r--r--node_modules/crc32-stream/README.md4
-rw-r--r--node_modules/crc32-stream/lib/crc32-stream.js12
-rw-r--r--node_modules/crc32-stream/lib/deflate-crc32-stream.js12
-rw-r--r--node_modules/crc32-stream/package.json10
-rw-r--r--node_modules/dateformat/.npmignore59
-rw-r--r--node_modules/dateformat/.travis.yml4
-rw-r--r--node_modules/dateformat/Readme.md157
-rwxr-xr-xnode_modules/dateformat/bin/cli.js75
-rw-r--r--node_modules/dateformat/package.json12
-rw-r--r--node_modules/dateformat/test/test_dayofweek.js15
-rw-r--r--node_modules/dateformat/test/test_formats.js76
-rw-r--r--node_modules/dateformat/test/test_isoutcdatetime.js11
-rw-r--r--node_modules/dateformat/test/weekofyear/test_weekofyear.js4
-rw-r--r--node_modules/dateformat/test/weekofyear/test_weekofyear.sh27
-rw-r--r--node_modules/debug/.jshintrc3
-rw-r--r--node_modules/debug/.npmignore2
-rw-r--r--node_modules/debug/History.md195
-rw-r--r--node_modules/debug/Makefile42
-rw-r--r--node_modules/debug/Readme.md188
-rw-r--r--node_modules/debug/bower.json7
-rw-r--r--node_modules/debug/browser.js168
-rw-r--r--node_modules/debug/component.json8
-rw-r--r--node_modules/debug/debug.js197
-rw-r--r--node_modules/debug/node.js210
-rw-r--r--node_modules/debug/package.json27
-rw-r--r--node_modules/error-ex/index.js34
-rw-r--r--node_modules/error-ex/package.json4
-rw-r--r--node_modules/fancy-log/LICENSE2
-rw-r--r--node_modules/fancy-log/README.md18
-rw-r--r--node_modules/fancy-log/index.js24
-rw-r--r--node_modules/fancy-log/package.json10
-rw-r--r--node_modules/for-in/LICENSE2
-rw-r--r--node_modules/for-in/README.md51
-rw-r--r--node_modules/for-in/index.js10
-rw-r--r--node_modules/for-in/package.json20
-rw-r--r--node_modules/for-own/LICENSE2
-rw-r--r--node_modules/for-own/README.md67
-rw-r--r--node_modules/for-own/index.js12
-rw-r--r--node_modules/for-own/package.json20
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/.npmignore4
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/.travis.yml8
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/LICENSE15
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/README.md43
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/index.js10
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/package.json35
-rw-r--r--node_modules/glob-base/node_modules/glob-parent/test.js28
-rw-r--r--node_modules/glob-parent/.travis.yml8
-rw-r--r--node_modules/glob-parent/README.md22
-rw-r--r--node_modules/glob-parent/appveyor.yml25
-rw-r--r--node_modules/glob-parent/index.js5
-rw-r--r--node_modules/glob-parent/node_modules/is-extglob/LICENSE21
-rw-r--r--node_modules/glob-parent/node_modules/is-extglob/README.md107
-rw-r--r--node_modules/glob-parent/node_modules/is-extglob/index.js20
-rw-r--r--node_modules/glob-parent/node_modules/is-extglob/package.json69
-rw-r--r--node_modules/glob-parent/node_modules/is-glob/LICENSE21
-rw-r--r--node_modules/glob-parent/node_modules/is-glob/README.md142
-rw-r--r--node_modules/glob-parent/node_modules/is-glob/index.js25
-rw-r--r--node_modules/glob-parent/node_modules/is-glob/package.json80
-rw-r--r--node_modules/glob-parent/package.json16
-rw-r--r--node_modules/glob-parent/test.js103
-rw-r--r--node_modules/global-prefix/index.js16
-rw-r--r--node_modules/global-prefix/package.json21
-rw-r--r--node_modules/globals/globals.json4
-rw-r--r--node_modules/globals/package.json2
-rw-r--r--node_modules/graceful-fs/package.json2
-rw-r--r--node_modules/graceful-fs/polyfills.js12
-rw-r--r--node_modules/gulp-debug/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-debug/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-debug/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-debug/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-debug/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-debug/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp-debug/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp-debug/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp-debug/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp-debug/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp-debug/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp-debug/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp-debug/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp-debug/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp-debug/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp-debug/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-debug/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-debug/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp-debug/node_modules/vinyl/package.json37
-rw-r--r--node_modules/gulp-json-transform/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-json-transform/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-json-transform/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-json-transform/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-json-transform/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-json-transform/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp-json-transform/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-json-transform/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp-json-transform/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp-json-transform/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp-json-transform/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp-json-transform/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp-json-transform/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-json-transform/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-json-transform/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp-json-transform/node_modules/vinyl/package.json37
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/clone-stats/test.js36
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-sourcemaps/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-sourcemaps/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-tar/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-tar/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-tar/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-tar/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-tar/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-tar/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp-tar/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp-tar/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp-tar/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp-tar/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp-tar/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp-tar/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp-tar/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp-tar/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp-tar/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp-tar/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-tar/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-tar/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp-tar/node_modules/vinyl/package.json37
-rw-r--r--node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-typescript/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-typescript/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-typescript/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-typescript/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-typescript/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-typescript/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp-typescript/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp-typescript/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp-typescript/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp-typescript/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp-typescript/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-typescript/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-typescript/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp-typescript/node_modules/vinyl/package.json37
-rw-r--r--node_modules/gulp-typescript/package.json5
-rw-r--r--node_modules/gulp-typescript/release/compiler.d.ts4
-rw-r--r--node_modules/gulp-typescript/release/compiler.js101
-rw-r--r--node_modules/gulp-typescript/release/output.js4
-rw-r--r--node_modules/gulp-typescript/release/project.d.ts1
-rw-r--r--node_modules/gulp-typescript/release/project.js1
-rw-r--r--node_modules/gulp-util/.npmignore7
-rw-r--r--node_modules/gulp-util/.travis.yml5
-rw-r--r--node_modules/gulp-util/README.md33
-rw-r--r--node_modules/gulp-util/index.js14
-rw-r--r--node_modules/gulp-util/lib/File.js1
-rw-r--r--node_modules/gulp-util/lib/PluginError.js114
-rw-r--r--node_modules/gulp-util/lib/beep.js3
-rw-r--r--node_modules/gulp-util/lib/buffer.js2
-rw-r--r--node_modules/gulp-util/lib/colors.js1
-rw-r--r--node_modules/gulp-util/lib/date.js1
-rw-r--r--node_modules/gulp-util/lib/env.js2
-rw-r--r--node_modules/gulp-util/lib/isBuffer.js2
-rw-r--r--node_modules/gulp-util/lib/isNull.js2
-rw-r--r--node_modules/gulp-util/lib/isStream.js2
-rw-r--r--node_modules/gulp-util/lib/linefeed.js1
-rw-r--r--node_modules/gulp-util/lib/log.js16
-rw-r--r--node_modules/gulp-util/lib/replaceExtension.js9
-rw-r--r--node_modules/gulp-util/lib/template.js14
l---------node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-util/node_modules/ansi-regex/index.js4
-rw-r--r--node_modules/gulp-util/node_modules/ansi-regex/package.json51
-rw-r--r--node_modules/gulp-util/node_modules/ansi-regex/readme.md33
-rw-r--r--node_modules/gulp-util/node_modules/ansi-styles/index.js40
-rw-r--r--node_modules/gulp-util/node_modules/ansi-styles/package.json46
-rw-r--r--node_modules/gulp-util/node_modules/ansi-styles/readme.md70
-rw-r--r--node_modules/gulp-util/node_modules/chalk/index.js95
l---------node_modules/gulp-util/node_modules/chalk/node_modules/.bin/has-ansi1
l---------node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi1
l---------node_modules/gulp-util/node_modules/chalk/node_modules/.bin/supports-color1
-rw-r--r--node_modules/gulp-util/node_modules/chalk/package.json53
-rw-r--r--node_modules/gulp-util/node_modules/chalk/readme.md175
-rw-r--r--node_modules/gulp-util/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-util/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-util/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-util/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-util/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-util/node_modules/has-ansi/cli.js53
-rw-r--r--node_modules/gulp-util/node_modules/has-ansi/index.js4
-rw-r--r--node_modules/gulp-util/node_modules/has-ansi/package.json57
-rw-r--r--node_modules/gulp-util/node_modules/has-ansi/readme.md45
-rw-r--r--node_modules/gulp-util/node_modules/isarray/README.md54
-rw-r--r--node_modules/gulp-util/node_modules/isarray/build/build.js209
-rw-r--r--node_modules/gulp-util/node_modules/isarray/component.json19
-rw-r--r--node_modules/gulp-util/node_modules/isarray/index.js3
-rw-r--r--node_modules/gulp-util/node_modules/isarray/package.json25
-rw-r--r--node_modules/gulp-util/node_modules/minimist/.travis.yml4
-rw-r--r--node_modules/gulp-util/node_modules/minimist/LICENSE18
-rw-r--r--node_modules/gulp-util/node_modules/minimist/example/parse.js2
-rw-r--r--node_modules/gulp-util/node_modules/minimist/index.js200
-rw-r--r--node_modules/gulp-util/node_modules/minimist/package.json40
-rw-r--r--node_modules/gulp-util/node_modules/minimist/readme.markdown86
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/all_bool.js32
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/bool.js119
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/dash.js31
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/default_bool.js20
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/dotted.js22
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/long.js31
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/num.js36
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/parse.js197
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/parse_modified.js9
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/short.js67
-rw-r--r--node_modules/gulp-util/node_modules/minimist/test/whitespace.js8
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/.npmignore5
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/LICENSE18
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/README.md15
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js89
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js46
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js982
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js210
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js386
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/package.json32
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/readable.js11
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/gulp-util/node_modules/readable-stream/writable.js1
-rwxr-xr-xnode_modules/gulp-util/node_modules/strip-ansi/cli.js39
-rw-r--r--node_modules/gulp-util/node_modules/strip-ansi/index.js6
-rw-r--r--node_modules/gulp-util/node_modules/strip-ansi/package.json56
-rw-r--r--node_modules/gulp-util/node_modules/strip-ansi/readme.md43
-rwxr-xr-xnode_modules/gulp-util/node_modules/supports-color/cli.js28
-rw-r--r--node_modules/gulp-util/node_modules/supports-color/index.js32
-rw-r--r--node_modules/gulp-util/node_modules/supports-color/package.json50
-rw-r--r--node_modules/gulp-util/node_modules/supports-color/readme.md44
-rw-r--r--node_modules/gulp-util/node_modules/through2/.npmignore3
-rw-r--r--node_modules/gulp-util/node_modules/through2/LICENSE39
-rw-r--r--node_modules/gulp-util/node_modules/through2/README.md140
-rw-r--r--node_modules/gulp-util/node_modules/through2/package.json32
-rw-r--r--node_modules/gulp-util/node_modules/through2/through2.js78
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/.npmignore6
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/.travis.yml6
-rw-r--r--[-rwxr-xr-x]node_modules/gulp-util/node_modules/vinyl/LICENSE0
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/README.md156
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/index.js125
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js2
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js5
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js8
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/lib/isNull.js2
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/package.json40
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/File.js540
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js28
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js53
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js29
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/isNull.js23
-rw-r--r--node_modules/gulp-util/node_modules/vinyl/test/isStream.js29
-rw-r--r--node_modules/gulp-util/node_modules/xtend/.jshintrc30
-rw-r--r--node_modules/gulp-util/node_modules/xtend/.npmignore1
-rw-r--r--node_modules/gulp-util/node_modules/xtend/LICENCE19
-rw-r--r--node_modules/gulp-util/node_modules/xtend/Makefile4
-rw-r--r--node_modules/gulp-util/node_modules/xtend/README.md28
-rw-r--r--node_modules/gulp-util/node_modules/xtend/index.js17
-rw-r--r--node_modules/gulp-util/node_modules/xtend/mutable.js15
-rw-r--r--node_modules/gulp-util/node_modules/xtend/package.json60
-rw-r--r--node_modules/gulp-util/node_modules/xtend/test.js63
-rw-r--r--node_modules/gulp-util/package.json69
-rw-r--r--node_modules/gulp-zip/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp-zip/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp-zip/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp-zip/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp-zip/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp-zip/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp-zip/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp-zip/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp-zip/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp-zip/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp-zip/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp-zip/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp-zip/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp-zip/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp-zip/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp-zip/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp-zip/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp-zip/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp-zip/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp-zip/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp-zip/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp-zip/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp-zip/node_modules/vinyl/package.json37
l---------node_modules/gulp/node_modules/.bin/semver2
-rw-r--r--node_modules/gulp/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/gulp/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/gulp/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/gulp/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/gulp/node_modules/clone-stats/test.js36
-rwxr-xr-xnode_modules/gulp/node_modules/gulp-util/LICENSE20
-rw-r--r--node_modules/gulp/node_modules/gulp-util/README.md146
-rw-r--r--node_modules/gulp/node_modules/gulp-util/index.js18
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/PluginError.js130
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/buffer.js15
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/combine.js11
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/env.js4
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/isBuffer.js7
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/isNull.js3
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/isStream.js5
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/log.js14
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/noop.js5
-rw-r--r--node_modules/gulp/node_modules/gulp-util/lib/template.js23
l---------node_modules/gulp/node_modules/gulp-util/node_modules/.bin/dateformat1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/.npmignore1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/.travis.yml3
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/LICENSE18
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/README.md126
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/clone.js160
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/package.json51
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/test-apart-ctx.html22
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.html148
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.js372
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.npmignore5
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.travis.yml52
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.zuul.yml1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/LICENSE18
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/README.md36
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/stream.markdown1760
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js75
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js26
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js880
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js180
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js516
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/package.json37
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/readable.js12
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/writable.js1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/through2/.npmignore3
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/through2/LICENSE39
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md133
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json32
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js96
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE20
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md195
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js213
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js7
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js11
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js1
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js3
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js5
-rw-r--r--node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json37
-rw-r--r--node_modules/gulp/node_modules/gulp-util/package.json51
-rw-r--r--node_modules/gulp/node_modules/lodash._reinterpolate/LICENSE.txt22
-rw-r--r--node_modules/gulp/node_modules/lodash._reinterpolate/README.md20
-rw-r--r--node_modules/gulp/node_modules/lodash._reinterpolate/index.js13
-rw-r--r--node_modules/gulp/node_modules/lodash._reinterpolate/package.json18
-rw-r--r--node_modules/gulp/node_modules/lodash.template/LICENSE22
-rw-r--r--node_modules/gulp/node_modules/lodash.template/README.md20
-rw-r--r--node_modules/gulp/node_modules/lodash.template/index.js389
-rw-r--r--node_modules/gulp/node_modules/lodash.template/package.json30
-rw-r--r--node_modules/gulp/node_modules/object-assign/index.js39
-rw-r--r--node_modules/gulp/node_modules/object-assign/license21
-rw-r--r--node_modules/gulp/node_modules/object-assign/package.json38
-rw-r--r--node_modules/gulp/node_modules/object-assign/readme.md51
-rw-r--r--node_modules/gulp/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/gulp/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/gulp/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/gulp/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/gulp/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/gulp/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/gulp/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/hosted-git-info/.npmignore2
-rw-r--r--node_modules/hosted-git-info/README.md61
-rw-r--r--node_modules/hosted-git-info/git-host-info.js16
-rw-r--r--node_modules/hosted-git-info/git-host.js84
-rw-r--r--node_modules/hosted-git-info/index.js56
-rw-r--r--node_modules/hosted-git-info/package.json15
-rw-r--r--node_modules/iconv-lite/.travis.yml14
-rw-r--r--node_modules/iconv-lite/Changelog.md15
-rw-r--r--node_modules/iconv-lite/README.md4
-rw-r--r--node_modules/iconv-lite/encodings/dbcs-data.js22
-rw-r--r--node_modules/iconv-lite/encodings/utf16.js2
-rw-r--r--node_modules/iconv-lite/package.json9
-rw-r--r--node_modules/interpret/CHANGELOG12
-rw-r--r--node_modules/interpret/README.md11
-rw-r--r--node_modules/interpret/index.js17
-rw-r--r--node_modules/interpret/package.json2
-rw-r--r--node_modules/is-buffer/.travis.yml8
-rw-r--r--node_modules/is-buffer/.zuul.yml14
-rw-r--r--node_modules/is-buffer/package.json4
-rw-r--r--node_modules/is-unc-path/LICENSE2
-rw-r--r--node_modules/is-unc-path/README.md151
-rw-r--r--node_modules/is-unc-path/package.json39
-rw-r--r--node_modules/isexe/README.md14
-rw-r--r--node_modules/isexe/access.js15
-rw-r--r--node_modules/isexe/index.js2
-rw-r--r--node_modules/isexe/mode.js10
-rw-r--r--node_modules/isexe/package.json9
-rw-r--r--node_modules/isexe/test/basic.js10
-rw-r--r--node_modules/isexe/windows.js14
-rw-r--r--node_modules/istanbul-lib-coverage/CHANGELOG.md16
-rw-r--r--node_modules/istanbul-lib-coverage/README.md1
-rw-r--r--node_modules/istanbul-lib-coverage/lib/file.js4
-rw-r--r--node_modules/istanbul-lib-coverage/package.json12
-rw-r--r--node_modules/istanbul-lib-instrument/CHANGELOG.md70
-rw-r--r--node_modules/istanbul-lib-instrument/dist/instrumenter.js3
-rw-r--r--node_modules/istanbul-lib-instrument/dist/source-coverage.js8
-rw-r--r--node_modules/istanbul-lib-instrument/dist/visitor.js11
l---------node_modules/istanbul-lib-instrument/node_modules/.bin/semver2
-rw-r--r--node_modules/istanbul-lib-instrument/node_modules/semver/LICENSE15
-rw-r--r--node_modules/istanbul-lib-instrument/node_modules/semver/README.md350
-rwxr-xr-xnode_modules/istanbul-lib-instrument/node_modules/semver/bin/semver133
-rw-r--r--node_modules/istanbul-lib-instrument/node_modules/semver/package.json22
-rw-r--r--node_modules/istanbul-lib-instrument/node_modules/semver/range.bnf16
-rw-r--r--node_modules/istanbul-lib-instrument/node_modules/semver/semver.js1203
-rw-r--r--node_modules/istanbul-lib-instrument/package.json24
-rw-r--r--node_modules/js-tokens/LICENSE2
-rw-r--r--node_modules/js-tokens/changelog.md82
-rw-r--r--node_modules/js-tokens/index.js12
-rw-r--r--node_modules/js-tokens/package.json8
-rw-r--r--node_modules/js-tokens/readme.md217
-rw-r--r--node_modules/kind-of/README.md17
-rw-r--r--node_modules/kind-of/index.js3
-rw-r--r--node_modules/kind-of/package.json12
-rw-r--r--node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt22
-rw-r--r--node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md15
-rw-r--r--node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js36
-rw-r--r--node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json22
-rw-r--r--node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt22
-rw-r--r--node_modules/lodash.defaults/node_modules/lodash.keys/README.md15
-rw-r--r--node_modules/lodash.defaults/node_modules/lodash.keys/index.js36
-rw-r--r--node_modules/lodash.defaults/node_modules/lodash.keys/package.json22
-rw-r--r--node_modules/lodash.escape/LICENSE22
-rw-r--r--node_modules/lodash.escape/README.md23
-rw-r--r--node_modules/lodash.escape/index.js181
-rw-r--r--node_modules/lodash.escape/package.json22
-rw-r--r--node_modules/lodash.isequal/LICENSE2
-rw-r--r--node_modules/lodash.isequal/README.md6
-rw-r--r--node_modules/lodash.isequal/index.js497
-rw-r--r--node_modules/lodash.isequal/package.json5
-rw-r--r--node_modules/lodash.keys/LICENSE22
-rw-r--r--node_modules/lodash.keys/README.md25
-rw-r--r--node_modules/lodash.keys/index.js240
-rw-r--r--node_modules/lodash.keys/package.json22
-rw-r--r--node_modules/lodash.template/LICENSE.txt22
-rw-r--r--node_modules/lodash.template/README.md25
-rw-r--r--node_modules/lodash.template/index.js387
-rw-r--r--node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt22
-rw-r--r--node_modules/lodash.template/node_modules/lodash.escape/README.md23
-rw-r--r--node_modules/lodash.template/node_modules/lodash.escape/index.js181
-rw-r--r--node_modules/lodash.template/node_modules/lodash.escape/package.json22
-rw-r--r--node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt22
-rw-r--r--node_modules/lodash.template/node_modules/lodash.keys/README.md25
-rw-r--r--node_modules/lodash.template/node_modules/lodash.keys/index.js240
-rw-r--r--node_modules/lodash.template/node_modules/lodash.keys/package.json22
-rw-r--r--node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt22
-rw-r--r--node_modules/lodash.template/node_modules/lodash.templatesettings/README.md15
-rw-r--r--node_modules/lodash.template/node_modules/lodash.templatesettings/index.js73
-rw-r--r--node_modules/lodash.template/node_modules/lodash.templatesettings/package.json21
-rw-r--r--node_modules/lodash.template/package.json32
-rw-r--r--node_modules/lodash.values/node_modules/lodash.keys/LICENSE.txt22
-rw-r--r--node_modules/lodash.values/node_modules/lodash.keys/README.md15
-rw-r--r--node_modules/lodash.values/node_modules/lodash.keys/index.js36
-rw-r--r--node_modules/lodash.values/node_modules/lodash.keys/package.json22
-rw-r--r--node_modules/lodash/README.md6
-rw-r--r--node_modules/lodash/_assignInDefaults.js27
-rw-r--r--node_modules/lodash/_baseGetTag.js3
-rw-r--r--node_modules/lodash/_baseIsEqual.js3
-rw-r--r--node_modules/lodash/_baseIsEqualDeep.js15
-rw-r--r--node_modules/lodash/_basePick.js1
-rw-r--r--node_modules/lodash/_basePickBy.js5
-rw-r--r--node_modules/lodash/_basePullAt.js17
-rw-r--r--node_modules/lodash/_baseUnset.js9
-rw-r--r--node_modules/lodash/_createFlow.js6
-rw-r--r--node_modules/lodash/_createRound.js2
-rw-r--r--node_modules/lodash/_createWrap.js2
-rw-r--r--node_modules/lodash/_equalObjects.js6
-rw-r--r--node_modules/lodash/_getSymbols.js18
-rw-r--r--node_modules/lodash/_hashHas.js2
-rw-r--r--node_modules/lodash/_lazyValue.js6
-rw-r--r--node_modules/lodash/_mergeDefaults.js27
-rw-r--r--node_modules/lodash/core.js67
-rw-r--r--node_modules/lodash/core.min.js44
-rw-r--r--node_modules/lodash/defaults.js6
-rw-r--r--node_modules/lodash/defaultsDeep.js4
-rw-r--r--node_modules/lodash/fp/_baseConvert.js42
-rw-r--r--node_modules/lodash/fp/_mapping.js3
-rw-r--r--node_modules/lodash/fp/_util.js1
-rw-r--r--node_modules/lodash/isEqual.js2
-rw-r--r--node_modules/lodash/lodash.js222
-rw-r--r--node_modules/lodash/lodash.min.js218
-rw-r--r--node_modules/lodash/omit.js11
-rw-r--r--node_modules/lodash/package.json2
-rw-r--r--node_modules/lodash/result.js2
-rw-r--r--node_modules/lodash/spread.js6
-rw-r--r--node_modules/lodash/startsWith.js5
-rw-r--r--node_modules/lodash/takeWhile.js2
-rw-r--r--node_modules/lodash/template.js8
-rw-r--r--node_modules/lodash/templateSettings.js4
-rw-r--r--node_modules/lodash/toSafeInteger.js4
-rw-r--r--node_modules/lodash/wrapperLodash.js6
-rw-r--r--node_modules/loose-envify/package.json4
-rw-r--r--node_modules/loose-envify/replace.js2
-rw-r--r--node_modules/merge-stream/README.md12
-rw-r--r--node_modules/merge-stream/index.js1
-rw-r--r--node_modules/merge-stream/package.json3
l---------node_modules/mocha/node_modules/.bin/supports-color2
-rw-r--r--node_modules/ms/.npmignore5
-rw-r--r--node_modules/ms/History.md66
-rw-r--r--node_modules/ms/LICENSE20
-rw-r--r--node_modules/ms/README.md33
-rw-r--r--node_modules/ms/index.js102
-rw-r--r--node_modules/ms/package.json34
-rw-r--r--node_modules/normalize-package-data/.npmignore2
-rw-r--r--node_modules/normalize-package-data/AUTHORS2
-rw-r--r--node_modules/normalize-package-data/LICENSE2
-rw-r--r--node_modules/normalize-package-data/README.md13
-rw-r--r--node_modules/normalize-package-data/lib/make_warning.js2
-rw-r--r--node_modules/normalize-package-data/lib/normalize.js6
-rw-r--r--node_modules/normalize-package-data/lib/safe_format.js2
-rw-r--r--node_modules/normalize-package-data/lib/typos.json2
l---------node_modules/normalize-package-data/node_modules/.bin/semver2
-rw-r--r--node_modules/normalize-package-data/node_modules/semver/LICENSE15
-rw-r--r--node_modules/normalize-package-data/node_modules/semver/README.md350
-rwxr-xr-xnode_modules/normalize-package-data/node_modules/semver/bin/semver133
-rw-r--r--node_modules/normalize-package-data/node_modules/semver/package.json22
-rw-r--r--node_modules/normalize-package-data/node_modules/semver/range.bnf16
-rw-r--r--node_modules/normalize-package-data/node_modules/semver/semver.js1203
-rw-r--r--node_modules/normalize-package-data/package.json2
-rw-r--r--node_modules/normalize-package-data/test/consistency.js4
-rw-r--r--node_modules/normalize-package-data/test/dependencies.js4
-rw-r--r--node_modules/normalize-package-data/test/fixtures/async.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/bcrypt.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/coffee-script.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/http-server.json8
-rw-r--r--node_modules/normalize-package-data/test/fixtures/movefile.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/no-description.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/node-module_exist.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/npm.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/request.json2
-rw-r--r--node_modules/normalize-package-data/test/fixtures/underscore.json2
-rw-r--r--node_modules/normalize-package-data/test/normalize.js6
-rw-r--r--node_modules/normalize-package-data/test/normalize.js~253
-rw-r--r--node_modules/normalize-package-data/test/typo.js2
-rw-r--r--node_modules/normalize-path/LICENSE2
-rw-r--r--node_modules/normalize-path/README.md73
-rw-r--r--node_modules/normalize-path/index.js8
-rw-r--r--node_modules/normalize-path/package.json29
-rw-r--r--node_modules/object-assign/index.js15
-rw-r--r--node_modules/object-assign/package.json12
-rw-r--r--node_modules/object-assign/readme.md11
-rw-r--r--node_modules/osenv/.npmignore13
-rw-r--r--node_modules/osenv/.travis.yml9
-rw-r--r--node_modules/osenv/LICENSE15
-rw-r--r--node_modules/osenv/README.md63
-rw-r--r--node_modules/osenv/osenv.js72
-rw-r--r--node_modules/osenv/package.json31
-rw-r--r--node_modules/osenv/test/unix.js71
-rw-r--r--node_modules/osenv/test/windows.js74
-rw-r--r--node_modules/osenv/x.tap39
-rwxr-xr-xnode_modules/randomatic/LICENSE2
-rw-r--r--node_modules/randomatic/README.md66
-rw-r--r--node_modules/randomatic/package.json27
-rw-r--r--node_modules/readable-stream/.npmignore6
-rw-r--r--node_modules/readable-stream/.travis.yml15
-rw-r--r--node_modules/readable-stream/LICENSE29
-rw-r--r--node_modules/readable-stream/README.md29
-rw-r--r--node_modules/readable-stream/duplex.js2
-rw-r--r--node_modules/readable-stream/lib/_stream_readable.js305
-rw-r--r--node_modules/readable-stream/lib/_stream_transform.js16
-rw-r--r--node_modules/readable-stream/lib/_stream_writable.js112
-rw-r--r--node_modules/readable-stream/package.json33
-rw-r--r--node_modules/readable-stream/passthrough.js2
-rw-r--r--node_modules/readable-stream/readable.js31
-rw-r--r--node_modules/readable-stream/transform.js2
-rw-r--r--node_modules/readable-stream/writable.js9
-rw-r--r--node_modules/regenerator-runtime/package.json2
-rw-r--r--node_modules/regenerator-runtime/runtime.js266
-rwxr-xr-xnode_modules/replace-ext/LICENSE35
-rw-r--r--node_modules/replace-ext/README.md62
-rw-r--r--node_modules/replace-ext/index.js19
-rw-r--r--node_modules/replace-ext/package.json65
-rwxr-xr-xnode_modules/rimraf/bin.js16
-rw-r--r--node_modules/rimraf/package.json4
-rw-r--r--node_modules/rimraf/rimraf.js24
-rw-r--r--node_modules/sax/LICENSE-W3C.html188
-rw-r--r--node_modules/sax/lib/sax.js41
-rw-r--r--node_modules/sax/package.json9
-rw-r--r--node_modules/selenium-webdriver/CHANGES.md39
-rw-r--r--node_modules/selenium-webdriver/README.md18
-rw-r--r--node_modules/selenium-webdriver/chrome.js6
-rw-r--r--node_modules/selenium-webdriver/edge.js2
-rw-r--r--node_modules/selenium-webdriver/firefox/binary.js171
-rw-r--r--node_modules/selenium-webdriver/firefox/extension.js2
-rw-r--r--node_modules/selenium-webdriver/firefox/index.js88
-rw-r--r--node_modules/selenium-webdriver/index.js4
-rw-r--r--node_modules/selenium-webdriver/lib/README5
-rw-r--r--node_modules/selenium-webdriver/lib/actions.js8
-rw-r--r--node_modules/selenium-webdriver/lib/by.js2
-rw-r--r--node_modules/selenium-webdriver/lib/capabilities.js8
-rw-r--r--node_modules/selenium-webdriver/lib/error.js19
-rw-r--r--node_modules/selenium-webdriver/lib/events.js2
-rw-r--r--node_modules/selenium-webdriver/lib/firefox/amd64/libnoblur64.sobin41623 -> 0 bytes
-rw-r--r--node_modules/selenium-webdriver/lib/firefox/i386/libnoblur.sobin36934 -> 0 bytes
-rw-r--r--node_modules/selenium-webdriver/lib/firefox/webdriver.json3
-rw-r--r--node_modules/selenium-webdriver/lib/firefox/webdriver.xpibin707042 -> 703396 bytes
-rw-r--r--node_modules/selenium-webdriver/lib/http.js102
-rw-r--r--node_modules/selenium-webdriver/lib/input.js2
-rw-r--r--node_modules/selenium-webdriver/lib/promise.js286
-rw-r--r--node_modules/selenium-webdriver/lib/symbols.js2
-rw-r--r--node_modules/selenium-webdriver/lib/test/index.js6
-rw-r--r--node_modules/selenium-webdriver/lib/until.js2
-rw-r--r--node_modules/selenium-webdriver/lib/webdriver.js24
-rw-r--r--node_modules/selenium-webdriver/opera.js2
-rw-r--r--node_modules/selenium-webdriver/package.json2
-rw-r--r--node_modules/selenium-webdriver/remote/index.js7
-rw-r--r--node_modules/selenium-webdriver/safari.js51
-rw-r--r--node_modules/selenium-webdriver/test/firefox/firefox_test.js40
-rw-r--r--node_modules/selenium-webdriver/test/lib/http_test.js31
-rw-r--r--node_modules/selenium-webdriver/test/lib/promise_test.js19
-rw-r--r--node_modules/selenium-webdriver/test/lib/until_test.js41
-rw-r--r--node_modules/selenium-webdriver/testing/index.js21
-rw-r--r--node_modules/semver/.npmignore4
-rw-r--r--node_modules/semver/.travis.yml5
-rw-r--r--node_modules/semver/Makefile24
-rw-r--r--node_modules/semver/README.md63
-rw-r--r--node_modules/semver/foot.js.txt6
-rw-r--r--node_modules/semver/head.js.txt2
-rw-r--r--node_modules/semver/package.json19
-rw-r--r--node_modules/semver/semver.browser.js1201
-rw-r--r--node_modules/semver/semver.browser.js.gzbin7992 -> 0 bytes
-rw-r--r--node_modules/semver/semver.js46
-rw-r--r--node_modules/semver/semver.min.js1
-rw-r--r--node_modules/semver/semver.min.js.gzbin3790 -> 0 bytes
-rw-r--r--node_modules/semver/test/amd.js15
-rw-r--r--node_modules/semver/test/big-numbers.js31
-rw-r--r--node_modules/semver/test/clean.js29
-rw-r--r--node_modules/semver/test/gtr.js173
-rw-r--r--node_modules/semver/test/index.js685
-rw-r--r--node_modules/semver/test/ltr.js181
-rw-r--r--node_modules/semver/test/major-minor-patch.js72
-rw-r--r--node_modules/semver/test/no-module.js19
-rw-r--r--node_modules/signal-exit/index.js9
-rw-r--r--node_modules/signal-exit/package.json4
-rw-r--r--node_modules/supports-color/index.js81
-rw-r--r--node_modules/supports-color/package.json41
-rw-r--r--node_modules/supports-color/readme.md42
-rw-r--r--node_modules/systemjs/README.md3
-rw-r--r--node_modules/systemjs/dist/system-csp-production.js6
-rw-r--r--node_modules/systemjs/dist/system-csp-production.js.map2
-rw-r--r--node_modules/systemjs/dist/system-csp-production.src.js162
-rw-r--r--node_modules/systemjs/dist/system-polyfills.js2
-rw-r--r--node_modules/systemjs/dist/system-polyfills.js.map2
-rw-r--r--node_modules/systemjs/dist/system-register-only.js4
-rw-r--r--node_modules/systemjs/dist/system-register-only.js.map2
-rw-r--r--node_modules/systemjs/dist/system-register-only.src.js99
-rw-r--r--node_modules/systemjs/dist/system.js6
-rw-r--r--node_modules/systemjs/dist/system.js.map2
-rw-r--r--node_modules/systemjs/dist/system.src.js188
-rw-r--r--node_modules/systemjs/index.js11
-rw-r--r--node_modules/systemjs/package.json2
-rw-r--r--node_modules/through2/LICENSE39
-rw-r--r--node_modules/through2/README.md3
-rw-r--r--node_modules/through2/package.json10
-rw-r--r--node_modules/typescript/.mailmap82
-rw-r--r--node_modules/typescript/.npmignore3
-rw-r--r--node_modules/typescript/AUTHORS.md68
-rw-r--r--node_modules/typescript/Gulpfile.ts1046
-rw-r--r--node_modules/typescript/README.md8
-rw-r--r--node_modules/typescript/lib/README.md10
-rw-r--r--node_modules/typescript/lib/cancellationToken.js52
-rw-r--r--node_modules/typescript/lib/lib.d.ts37891
-rw-r--r--node_modules/typescript/lib/lib.dom.d.ts28794
-rw-r--r--node_modules/typescript/lib/lib.dom.iterable.d.ts125
-rw-r--r--node_modules/typescript/lib/lib.es2015.collection.d.ts176
-rw-r--r--node_modules/typescript/lib/lib.es2015.core.d.ts1098
-rw-r--r--node_modules/typescript/lib/lib.es2015.d.ts50
-rw-r--r--node_modules/typescript/lib/lib.es2015.generator.d.ts96
-rw-r--r--node_modules/typescript/lib/lib.es2015.iterable.d.ts968
-rw-r--r--node_modules/typescript/lib/lib.es2015.promise.d.ts487
-rw-r--r--node_modules/typescript/lib/lib.es2015.proxy.d.ts76
-rw-r--r--node_modules/typescript/lib/lib.es2015.reflect.d.ts62
-rw-r--r--node_modules/typescript/lib/lib.es2015.symbol.d.ts110
-rw-r--r--node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts694
-rw-r--r--node_modules/typescript/lib/lib.es2016.array.include.d.ts217
-rw-r--r--node_modules/typescript/lib/lib.es2016.d.ts34
-rw-r--r--node_modules/typescript/lib/lib.es2017.d.ts40
-rw-r--r--node_modules/typescript/lib/lib.es2017.object.d.ts79
-rw-r--r--node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts92
-rw-r--r--node_modules/typescript/lib/lib.es5.d.ts8537
-rw-r--r--node_modules/typescript/lib/lib.es6.d.ts41452
-rw-r--r--node_modules/typescript/lib/lib.scripthost.d.ts622
-rw-r--r--node_modules/typescript/lib/lib.webworker.d.ts3135
-rw-r--r--node_modules/typescript/lib/protocol.d.ts1031
-rw-r--r--node_modules/typescript/lib/tsc.js24060
-rw-r--r--node_modules/typescript/lib/tsserver.js40142
-rw-r--r--node_modules/typescript/lib/tsserverlibrary.d.ts10859
-rw-r--r--node_modules/typescript/lib/tsserverlibrary.js38321
-rw-r--r--node_modules/typescript/lib/typescript.d.ts1641
-rw-r--r--node_modules/typescript/lib/typescript.js37612
-rw-r--r--node_modules/typescript/lib/typescriptServices.d.ts1641
-rw-r--r--node_modules/typescript/lib/typescriptServices.js37612
-rw-r--r--node_modules/typescript/lib/typingsInstaller.js2435
-rw-r--r--node_modules/typescript/package.json6
-rw-r--r--node_modules/v8flags/README.md2
-rw-r--r--node_modules/v8flags/index.js8
-rw-r--r--node_modules/v8flags/package.json2
-rw-r--r--node_modules/vinyl-fs/node_modules/clone-stats/LICENSE.md21
-rw-r--r--node_modules/vinyl-fs/node_modules/clone-stats/README.md17
-rw-r--r--node_modules/vinyl-fs/node_modules/clone-stats/index.js13
-rw-r--r--node_modules/vinyl-fs/node_modules/clone-stats/package.json31
-rw-r--r--node_modules/vinyl-fs/node_modules/clone-stats/test.js36
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/.npmignore6
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/.travis.yml8
-rwxr-xr-xnode_modules/vinyl-fs/node_modules/replace-ext/LICENSE20
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/README.md44
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/index.js9
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/package.json35
-rw-r--r--node_modules/vinyl-fs/node_modules/replace-ext/test/main.js51
-rw-r--r--node_modules/vinyl/index.js2
-rw-r--r--node_modules/vinyl/package.json4
-rw-r--r--node_modules/when/dist/browser/when.debug.js70
-rw-r--r--node_modules/when/dist/browser/when.debug.js.map10
-rw-r--r--node_modules/when/dist/browser/when.js70
-rw-r--r--node_modules/when/dist/browser/when.js.map10
-rw-r--r--node_modules/when/dist/browser/when.min.js4
-rw-r--r--node_modules/when/dist/browser/when.min.js.map2
-rw-r--r--node_modules/when/es6-shim/Promise.js52
-rw-r--r--node_modules/when/es6-shim/Promise.js.map8
-rw-r--r--node_modules/when/es6-shim/Promise.min.js4
-rw-r--r--node_modules/when/es6-shim/Promise.min.js.map2
-rw-r--r--node_modules/when/lib/decorators/array.js18
-rw-r--r--node_modules/when/lib/env.js4
-rw-r--r--node_modules/when/lib/makePromise.js48
-rw-r--r--node_modules/when/package.json18
-rw-r--r--node_modules/which/CHANGELOG.md12
-rw-r--r--node_modules/which/package.json6
-rw-r--r--node_modules/zip-stream/README.md8
-rw-r--r--node_modules/zip-stream/index.js2
-rw-r--r--node_modules/zip-stream/package.json9
2311 files changed, 197650 insertions, 206477 deletions
diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity
index f58d3746d..a45758dbc 100644
--- a/node_modules/.yarn-integrity
+++ b/node_modules/.yarn-integrity
@@ -1 +1 @@
-7ed29847ffe108e16d5c053f27c2c2be64cd4091dc26a19a2d6cfb0f78807183 \ No newline at end of file
+0dc42bcf25ec3d59c7bd394b1d9f751da1a3446ef6012260b277831cef6de2bf \ No newline at end of file
diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js
index 4906755bc..783c5c7bb 100644
--- a/node_modules/ansi-regex/index.js
+++ b/node_modules/ansi-regex/index.js
@@ -1,4 +1,4 @@
'use strict';
module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
+ return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g;
};
diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json
index bca8b6d29..2734a7873 100644
--- a/node_modules/ansi-regex/package.json
+++ b/node_modules/ansi-regex/package.json
@@ -1,24 +1,19 @@
{
"name": "ansi-regex",
- "version": "2.0.0",
+ "version": "0.2.1",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": "sindresorhus/ansi-regex",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
+ "url": "http://sindresorhus.com"
},
- "maintainers": [
- "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
- "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
- ],
"engines": {
"node": ">=0.10.0"
},
"scripts": {
- "test": "mocha test/test.js",
- "view-supported": "node test/viewCodes.js"
+ "test": "mocha"
},
"files": [
"index.js"
diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md
index 1a4894ec1..ae876e729 100644
--- a/node_modules/ansi-regex/readme.md
+++ b/node_modules/ansi-regex/readme.md
@@ -5,7 +5,7 @@
## Install
-```
+```sh
$ npm install --save ansi-regex
```
@@ -25,6 +25,8 @@ ansiRegex().test('cake');
//=> ['\u001b[4m', '\u001b[0m']
```
+*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
+
## License
diff --git a/node_modules/archiver/CHANGELOG.md b/node_modules/archiver/CHANGELOG.md
index d98d1e930..3b8e106b9 100644
--- a/node_modules/archiver/CHANGELOG.md
+++ b/node_modules/archiver/CHANGELOG.md
@@ -1,5 +1,11 @@
## Changelog
+**1.3.0** — <small> December 13, 2016_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/1.2.0...1.3.0)
+
+- improve `directory` and `glob` methods to use events rather than callbacks. (#203)
+- fix bulk warning spam (#208)
+- updated mocha (#205)
+
**1.2.0** — <small> November 2, 2016_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/1.1.0...1.2.0)
- Add a `process.emitWarning` for `deprecated` (#202)
diff --git a/node_modules/archiver/README.md b/node_modules/archiver/README.md
index 0eaa2b725..654d7db34 100644
--- a/node_modules/archiver/README.md
+++ b/node_modules/archiver/README.md
@@ -1,4 +1,4 @@
-# Archiver v1.2.0
+# Archiver v1.3.0
[![Build Status](https://travis-ci.org/archiverjs/node-archiver.svg?branch=master)](https://travis-ci.org/archiverjs/node-archiver) [![Build status](https://ci.appveyor.com/api/projects/status/38kqu3yp159nodxe/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-archiver/branch/master)
@@ -12,11 +12,55 @@ Visit the [API documentation](http://archiverjs.com/docs) for a list of all meth
npm install archiver --save
```
-## Usage
+## Quick Start
```js
+// require modules
+var fs = require('fs');
var archiver = require('archiver');
-var archive = archiver.create('zip', {}); // or archiver('zip', {});
+
+// create a file to stream archive data to.
+var output = fs.createWriteStream(__dirname + '/example.zip');
+var archive = archiver('zip', {
+ store: true // Sets the compression method to STORE.
+});
+
+// listen for all archive data to be written
+output.on('close', function() {
+ console.log(archive.pointer() + ' total bytes');
+ console.log('archiver has been finalized and the output file descriptor has closed.');
+});
+
+// good practice to catch this error explicitly
+archive.on('error', function(err) {
+ throw err;
+});
+
+// pipe archive data to the file
+archive.pipe(output);
+
+// append a file from stream
+var file1 = __dirname + '/file1.txt';
+archive.append(fs.createReadStream(file1), { name: 'file1.txt' });
+
+// append a file from string
+archive.append('string cheese!', { name: 'file2.txt' });
+
+// append a file from buffer
+var buffer3 = new Buffer('buff it!');
+archive.append(buffer3, { name: 'file3.txt' });
+
+// append a file
+archive.file('file1.txt', { name: 'file4.txt' });
+
+// append files from a directory
+archive.directory('subdir/');
+
+// append files from a glob pattern
+archive.glob('subdir/*.txt');
+
+// finalize the archive (ie we are done appending files but streams have to finish yet)
+archive.finalize();
```
## Formats
diff --git a/node_modules/archiver/lib/core.js b/node_modules/archiver/lib/core.js
index 6103d43e4..9bb80711c 100644
--- a/node_modules/archiver/lib/core.js
+++ b/node_modules/archiver/lib/core.js
@@ -9,6 +9,8 @@ var fs = require('fs');
var glob = require('glob');
var async = require('async');
var _ = require('lodash');
+var path = require('path');
+var walkdir = require('walkdir');
var util = require('archiver-utils');
var inherits = require('util').inherits;
@@ -16,6 +18,10 @@ var Transform = require('readable-stream').Transform;
var win32 = process.platform === 'win32';
+if (process._loggedBulkDeprecation === undefined) {
+ process._loggedBulkDeprecation = false;
+}
+
/**
* @constructor
* @param {String} format The archive format to use.
@@ -58,8 +64,6 @@ var Archiver = function(format, options) {
};
this._streams = [];
-
- this._loggedBulkDeprecation = false;
};
inherits(Archiver, Transform);
@@ -557,8 +561,8 @@ Archiver.prototype.append = function(source, data) {
* @return {this}
*/
Archiver.prototype.bulk = function(mappings) {
- if (!this._loggedBulkDeprecation) {
- this._loggedBulkDeprecation = true;
+ if (process._loggedBulkDeprecation === false) {
+ process._loggedBulkDeprecation = true;
var warning = 'Archiver.bulk() deprecated since 0.21.0';
if (typeof process !== 'undefined' && typeof process.emitWarning !== 'undefined') {
process.emitWarning(warning, 'DeprecationWarning');
@@ -655,38 +659,43 @@ Archiver.prototype.directory = function(dirpath, destpath, data) {
data = {};
}
- var self = this;
+ function onWalkPath(filepath, stats){
+ var entryData = _.extend({}, data);
+ entryData.name = path.relative(dirpath, filepath).replace(/\\/g, '/');
+ entryData.prefix = destpath;
+ entryData.stats = stats;
- util.walkdir(dirpath, function(err, results) {
- if (err) {
- self.emit('error', err);
- } else {
- results.forEach(function(file) {
- var entryData = _.extend({}, data);
- entryData.name = file.relative;
- entryData.prefix = destpath;
- entryData.stats = file.stats;
-
- try {
- if (dataFunction) {
- entryData = dataFunction(entryData);
-
- if (typeof entryData !== 'object') {
- throw new Error('directory: invalid data returned from custom function');
- }
- }
- } catch(e) {
- self.emit('error', e);
- return;
- }
+ try {
+ if (dataFunction) {
+ entryData = dataFunction(entryData);
- self._append(file.path, entryData);
- });
+ if (typeof entryData !== 'object') {
+ throw new Error('directory: invalid data returned from custom function');
+ }
+ }
+ } catch(e) {
+ this.emit('error', e);
+ return;
}
- self._pending--;
- self._maybeFinalize();
- });
+ this._append(filepath, entryData);
+ }
+
+ function onWalkEnd() {
+ this._pending--;
+ this._maybeFinalize();
+ }
+
+ function onWalkError(err) {
+ this.emit('error', 'directory: ' + err);
+ }
+
+ var walker = walkdir(dirpath);
+
+ walker.on('error', onWalkError.bind(this));
+ walker.on('directory', onWalkPath.bind(this));
+ walker.on('file', onWalkPath.bind(this));
+ walker.on('end', onWalkEnd.bind(this));
return this;
};
@@ -736,26 +745,30 @@ Archiver.prototype.glob = function(pattern, options, data) {
stat: false
});
- var globber = glob(pattern, options, function(err, files) {
- if (err) {
- this.emit('error', err);
- return this;
- }
+ function onGlobEnd() {
+ this._pending--;
+ this._maybeFinalize();
+ }
- files.forEach(function(file) {
- entryData = _.extend({}, data);
+ function onGlobError(err) {
+ this.emit('error', 'glob: ' + err);
+ }
- if (options.cwd) {
- entryData.name = file;
- file = globber._makeAbs(file);
- }
+ function onGlobMatch(match){
+ entryData = _.extend({}, data);
- this._append(file, entryData);
- }, this);
+ if (options.cwd) {
+ entryData.name = match;
+ match = globber._makeAbs(match);
+ }
- this._pending--;
- this._maybeFinalize();
- }.bind(this));
+ this._append(match, entryData);
+ }
+
+ var globber = glob(pattern, options);
+ globber.on('error', onGlobError.bind(this));
+ globber.on('match', onGlobMatch.bind(this));
+ globber.on('end', onGlobEnd.bind(this));
return this;
};
@@ -890,4 +903,4 @@ module.exports = Archiver;
* when working with methods like `directory` or `glob`.
* @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
* for reduction of fs stat calls when stat data is already known.
- */ \ No newline at end of file
+ */
diff --git a/node_modules/archiver/package.json b/node_modules/archiver/package.json
index c0f9c1a0a..44b3ed7de 100644
--- a/node_modules/archiver/package.json
+++ b/node_modules/archiver/package.json
@@ -1,6 +1,6 @@
{
"name": "archiver",
- "version": "1.2.0",
+ "version": "1.3.0",
"description": "a streaming interface for archive generation",
"homepage": "https://github.com/archiverjs/node-archiver",
"author": {
@@ -36,13 +36,14 @@
"lodash": "^4.8.0",
"readable-stream": "^2.0.0",
"tar-stream": "^1.5.0",
- "zip-stream": "^1.1.0"
+ "zip-stream": "^1.1.0",
+ "walkdir": "^0.0.11"
},
"devDependencies": {
"archiver-jsdoc-theme": "^1.0.0",
"jsdoc": "~3.4.0",
"chai": "^3.4.0",
- "mocha": "^2.3.3",
+ "mocha": "^3.1.1",
"rimraf": "^2.4.2",
"mkdirp": "^0.5.0",
"stream-bench": "^0.1.2",
diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE
index fa30c4cb3..d290fe00b 100755
--- a/node_modules/arr-flatten/LICENSE
+++ b/node_modules/arr-flatten/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2015, Jon Schlinkert.
+Copyright (c) 2014-2015, 2017, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md
index bd696e660..71c1d3b4c 100755
--- a/node_modules/arr-flatten/README.md
+++ b/node_modules/arr-flatten/README.md
@@ -1,73 +1,85 @@
-# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten)
+# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
-> Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
+> Recursively flatten an array or arrays.
-Why another flatten utility? I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
+## Install
-## Run benchmarks
+Install with [npm](https://www.npmjs.com/):
-```bash
-npm run benchmarks
+```sh
+$ npm install --save arr-flatten
```
-Benchmark results comparing this library to [array-flatten]:
+Install with [yarn](https://yarnpkg.com):
-```bash
-#1: large.js
- arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled)
- array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled)
+```sh
+$ yarn add arr-flatten
+```
+
+## Install
-#2: medium.js
- arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled)
- array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled)
+Install with [bower](https://bower.io/)
-#3: small.js
- arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled)
- array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled)
+```sh
+$ bower install arr-flatten --save
```
-## Run tests
+## Usage
-Install dev dependencies:
+```js
+var flatten = require('arr-flatten');
-```bash
-npm i -d && npm test
+flatten(['a', ['b', ['c']], 'd', ['e']]);
+//=> ['a', 'b', 'c', 'd', 'e']
```
-## Install with [npm](npmjs.org)
+## Why another flatten utility?
-```bash
-npm i arr-flatten --save
-```
-### Install with [bower](https://github.com/bower/bower)
+I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
-```bash
-bower install arr-flatten --save
-```
+## About
+### Related projects
-## Usage
+* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
+* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
+* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
+* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
-```js
-var flatten = require('arr-flatten');
+### Contributing
-flatten(['a', ['b', ['c']], 'd', ['e']]);
-//=> ['a', 'b', 'c', 'd', 'e']
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
```
-## Author
+### Author
**Jon Schlinkert**
-
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-## License
-Copyright (c) 2014-2015 Jon Schlinkert
-Released under the MIT license
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
-***
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._
+***
-[array-flatten]: https://github.com/blakeembrey/array-flatten \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 16, 2017._ \ No newline at end of file
diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js
index f74e48c29..d9d4c0319 100755..100644
--- a/node_modules/arr-flatten/index.js
+++ b/node_modules/arr-flatten/index.js
@@ -1,8 +1,8 @@
/*!
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
*
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
'use strict';
@@ -11,17 +11,17 @@ module.exports = function flatten(arr) {
return flat(arr, []);
};
-function flat(arr, res) {
+function flat(arr, acc) {
var len = arr.length;
- var i = -1;
+ var idx = -1;
- while (len--) {
- var cur = arr[++i];
+ while (++idx < len) {
+ var cur = arr[idx];
if (Array.isArray(cur)) {
- flat(cur, res);
+ flat(cur, acc);
} else {
- res.push(cur);
+ acc.push(cur);
}
}
- return res;
-} \ No newline at end of file
+ return acc;
+}
diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json
index 8d0322de2..d6a4836bc 100755..100644
--- a/node_modules/arr-flatten/package.json
+++ b/node_modules/arr-flatten/package.json
@@ -1,23 +1,14 @@
{
"name": "arr-flatten",
- "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.",
- "version": "1.0.1",
+ "description": "Recursively flatten an array or arrays.",
+ "version": "1.0.3",
"homepage": "https://github.com/jonschlinkert/arr-flatten",
- "author": {
- "name": "Jon Schlinkert",
- "url": "https://github.com/jonschlinkert"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/jonschlinkert/arr-flatten.git"
- },
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "repository": "jonschlinkert/arr-flatten",
"bugs": {
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
},
- "license": {
- "type": "MIT",
- "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE"
- },
+ "license": "MIT",
"files": [
"index.js"
],
@@ -26,16 +17,25 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "mocha",
- "benchmarks": "node benchmark"
+ "test": "mocha"
},
"devDependencies": {
- "array-flatten": "^1.0.2",
- "array-slice": "^0.2.2",
- "benchmarked": "^0.1.3",
- "chalk": "^0.5.1",
- "glob": "^4.3.5",
- "kind-of": "^1.0.0"
+ "ansi-bold": "^0.1.1",
+ "array-flatten": "^2.1.1",
+ "array-slice": "^1.0.0",
+ "benchmarked": "^1.0.0",
+ "compute-flatten": "^1.0.0",
+ "flatit": "^1.1.1",
+ "flatten": "^1.0.2",
+ "flatten-array": "^1.0.0",
+ "glob": "^7.1.1",
+ "gulp-format-md": "^0.1.12",
+ "just-flatten-it": "^1.1.23",
+ "lodash.flattendeep": "^4.4.0",
+ "m_flattened": "^1.0.1",
+ "mocha": "^3.2.0",
+ "utils-flatten": "^1.0.0",
+ "write": "^0.3.3"
},
"keywords": [
"arr",
@@ -47,5 +47,26 @@
"recurse",
"recursive",
"recursively"
- ]
+ ],
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "related": {
+ "list": [
+ "arr-union",
+ "array-unique",
+ "array-each",
+ "arr-filter"
+ ]
+ },
+ "lint": {
+ "reflinks": true
+ }
+ }
}
diff --git a/node_modules/async/CHANGELOG.md b/node_modules/async/CHANGELOG.md
index a82f6fe7f..e5bfa24d5 100644
--- a/node_modules/async/CHANGELOG.md
+++ b/node_modules/async/CHANGELOG.md
@@ -1,3 +1,23 @@
+# v2.3.0
+- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will onyl work if `async` functions are supported nateively in your environment, transpilied implementations can't be detected. (#1386, #1390)
+- Small doc fix (#1392)
+
+# v2.2.0
+- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) (#1364)
+- Fixed `transform` bug when `callback` was not passed (#1381)
+- Added note about `reflect` to `parallel` docs (#1385)
+
+# v2.1.5
+- Fix `auto` bug when function names collided with Array.prototype (#1358)
+- Improve some error messages (#1349)
+- Avoid stack overflow case in queue
+- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined.
+- Cleanup implementations of `some`, `every` and `find`
+
+# v2.1.3
+- Make bundle size smaller
+- Create optimized hotpath for `filter` in array case.
+
# v2.1.2
- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs (#1293).
diff --git a/node_modules/async/LICENSE b/node_modules/async/LICENSE
index 9fe85b9d8..d807c05ac 100644
--- a/node_modules/async/LICENSE
+++ b/node_modules/async/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010-2016 Caolan McMahon
+Copyright (c) 2010-2017 Caolan McMahon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/async/README.md b/node_modules/async/README.md
index aece50987..f59b13cdf 100644
--- a/node_modules/async/README.md
+++ b/node_modules/async/README.md
@@ -4,6 +4,8 @@
[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async)
[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![libhive - Open source examples](https://www.libhive.com/providers/npm/packages/async/examples/badge.svg)](https://www.libhive.com/providers/npm/packages/async)
+
Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser.
diff --git a/node_modules/async/dist/async.js b/node_modules/async/dist/async.js
index bb95651b4..4d2aa0882 100644
--- a/node_modules/async/dist/async.js
+++ b/node_modules/async/dist/async.js
@@ -5,26 +5,6 @@
}(this, (function (exports) { 'use strict';
/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
-function identity(value) {
- return value;
-}
-
-/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
@@ -56,7 +36,7 @@ var nativeMax = Math.max;
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
-function overRest(func, start, transform) {
+function overRest$1(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
@@ -78,30 +58,38 @@ function overRest(func, start, transform) {
}
/**
- * Creates a function that returns `value`.
+ * This method returns the first argument it receives.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 2.4.0
* @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new constant function.
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
- * var objects = _.times(2, _.constant({ 'a': 1 }));
- *
- * console.log(objects);
- * // => [{ 'a': 1 }, { 'a': 1 }]
+ * var object = { 'a': 1 };
*
- * console.log(objects[0] === objects[1]);
+ * console.log(_.identity(object) === object);
* // => true
*/
-function constant(value) {
- return function() {
- return value;
- };
+function identity(value) {
+ return value;
}
+// Lodash rest function without function.toString()
+// remappings
+function rest(func, start) {
+ return overRest$1(func, start, identity);
+}
+
+var initialParams = function (fn) {
+ return rest(function (args /*..., callback*/) {
+ var callback = args.pop();
+ fn.call(this, args, callback);
+ });
+};
+
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
@@ -132,269 +120,253 @@ function isObject(value) {
return value != null && (type == 'object' || type == 'function');
}
-/** `Object#toString` result references. */
-var funcTag = '[object Function]';
-var genTag = '[object GeneratorFunction]';
-var proxyTag = '[object Proxy]';
-
-/** Used for built-in method references. */
-var objectProto$1 = Object.prototype;
-
/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto$1.toString;
-
-/**
- * Checks if `value` is classified as a `Function` object.
+ * Take a sync function and make it async, passing its return value to a
+ * callback. This is useful for plugging sync functions into a waterfall,
+ * series, or other async functions. Any arguments passed to the generated
+ * function will be passed to the wrapped function (except for the final
+ * callback argument). Errors thrown will be passed to the callback.
+ *
+ * If the function passed to `asyncify` returns a Promise, that promises's
+ * resolved/rejected state will be used to call the callback, rather than simply
+ * the synchronous return value.
+ *
+ * This also means you can asyncify ES2017 `async` functions.
*
+ * @name asyncify
* @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @memberOf module:Utils
+ * @method
+ * @alias wrapSync
+ * @category Util
+ * @param {Function} func - The synchronous funuction, or Promise-returning
+ * function to convert to an {@link AsyncFunction}.
+ * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
+ * invoked with `(args..., callback)`.
* @example
*
- * _.isFunction(_);
- * // => true
+ * // passing a regular synchronous function
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(JSON.parse),
+ * function (data, next) {
+ * // data is the result of parsing the text.
+ * // If there was a parsing error, it would have been caught.
+ * }
+ * ], callback);
*
- * _.isFunction(/abc/);
- * // => false
+ * // passing a function returning a promise
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(function (contents) {
+ * return db.model.create(contents);
+ * }),
+ * function (model, next) {
+ * // `model` is the instantiated model object.
+ * // If there was an error, this function would be skipped.
+ * }
+ * ], callback);
+ *
+ * // es2017 example, though `asyncify` is not needed if your JS environment
+ * // supports async functions out of the box
+ * var q = async.queue(async.asyncify(async function(file) {
+ * var intermediateStep = await processFile(file);
+ * return await somePromise(intermediateStep)
+ * }));
+ *
+ * q.push(files);
*/
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag || tag == proxyTag;
+function asyncify(func) {
+ return initialParams(function (args, callback) {
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
+ }
+ // if result is Promise object
+ if (isObject(result) && typeof result.then === 'function') {
+ result.then(function (value) {
+ callback(null, value);
+ }, function (err) {
+ callback(err.message ? err : new Error(err));
+ });
+ } else {
+ callback(null, result);
+ }
+ });
}
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+var supportsSymbol = typeof Symbol === 'function';
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+function supportsAsync() {
+ var supported;
+ try {
+ /* eslint no-eval: 0 */
+ supported = isAsync(eval('(async function () {})'));
+ } catch (e) {
+ supported = false;
+ }
+ return supported;
+}
-/** Used as a reference to the global object. */
-var root = freeGlobal || freeSelf || Function('return this')();
+function isAsync(fn) {
+ return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
+}
-/** Used to detect overreaching core-js shims. */
-var coreJsData = root['__core-js_shared__'];
+function wrapAsync(asyncFn) {
+ return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
+}
-/** Used to detect methods masquerading as native. */
-var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
-}());
+var wrapAsync$1 = supportsAsync() ? wrapAsync : identity;
-/**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
-function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
+function applyEach$1(eachfn) {
+ return rest(function (fns, args) {
+ var go = initialParams(function (args, callback) {
+ var that = this;
+ return eachfn(fns, function (fn, cb) {
+ wrapAsync$1(fn).apply(that, args.concat(cb));
+ }, callback);
+ });
+ if (args.length) {
+ return go.apply(this, args);
+ } else {
+ return go;
+ }
+ });
}
-/** Used for built-in method references. */
-var funcProto$1 = Function.prototype;
-
-/** Used to resolve the decompiled source of functions. */
-var funcToString$1 = funcProto$1.toString;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-/**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
-function toSource(func) {
- if (func != null) {
- try {
- return funcToString$1.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
-}
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-/**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
-/** Used to detect host constructors (Safari). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
+/** Built-in value references. */
+var Symbol$1 = root.Symbol;
/** Used for built-in method references. */
-var funcProto = Function.prototype;
var objectProto = Object.prototype;
-/** Used to resolve the decompiled source of functions. */
-var funcToString = funcProto.toString;
-
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
/**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
*/
-function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
-}
+var nativeObjectToString = objectProto.toString;
-/**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
-function getValue(object, key) {
- return object == null ? undefined : object[key];
-}
+/** Built-in value references. */
+var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
/**
- * Gets the native function at `key` of `object`.
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
*/
-function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
-}
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1),
+ tag = value[symToStringTag$1];
-var defineProperty = (function() {
try {
- var func = getNative(Object, 'defineProperty');
- func({}, '', {});
- return func;
+ value[symToStringTag$1] = undefined;
+ var unmasked = true;
} catch (e) {}
-}());
-/**
- * The base implementation of `setToString` without support for hot loop shorting.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
-var baseSetToString = !defineProperty ? identity : function(func, string) {
- return defineProperty(func, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': constant(string),
- 'writable': true
- });
-};
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag$1] = tag;
+ } else {
+ delete value[symToStringTag$1];
+ }
+ }
+ return result;
+}
-/** Used to detect hot functions by number of calls within a span of milliseconds. */
-var HOT_COUNT = 500;
-var HOT_SPAN = 16;
+/** Used for built-in method references. */
+var objectProto$1 = Object.prototype;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeNow = Date.now;
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString$1 = objectProto$1.toString;
/**
- * Creates a function that'll short out and invoke `identity` instead
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
- * milliseconds.
+ * Converts `value` to a string using `Object.prototype.toString`.
*
* @private
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new shortable function.
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
*/
-function shortOut(func) {
- var count = 0,
- lastCalled = 0;
+function objectToString(value) {
+ return nativeObjectToString$1.call(value);
+}
- return function() {
- var stamp = nativeNow(),
- remaining = HOT_SPAN - (stamp - lastCalled);
+/** `Object#toString` result references. */
+var nullTag = '[object Null]';
+var undefinedTag = '[object Undefined]';
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
- return func.apply(undefined, arguments);
- };
-}
+/** Built-in value references. */
+var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
/**
- * Sets the `toString` method of `func` to return `string`.
+ * The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
*/
-var setToString = shortOut(baseSetToString);
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ value = Object(value);
+ return (symToStringTag && symToStringTag in value)
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]';
+var funcTag = '[object Function]';
+var genTag = '[object GeneratorFunction]';
+var proxyTag = '[object Proxy]';
/**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ * Checks if `value` is classified as a `Function` object.
*
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
*/
-function baseRest$1(func, start) {
- return setToString(overRest(func, start, identity), func + '');
-}
-
-var initialParams = function (fn) {
- return baseRest$1(function (args /*..., callback*/) {
- var callback = args.pop();
- fn.call(this, args, callback);
- });
-};
-
-function applyEach$1(eachfn) {
- return baseRest$1(function (fns, args) {
- var go = initialParams(function (args, callback) {
- var that = this;
- return eachfn(fns, function (fn, cb) {
- fn.apply(that, args.concat([cb]));
- }, callback);
- });
- if (args.length) {
- return go.apply(this, args);
- } else {
- return go;
- }
- });
+function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/** Used as references for various `Number` constants. */
@@ -460,6 +432,10 @@ function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
+// A temporary value used to identify if the loop should be broken.
+// See #1064, #1293
+var breakLoop = {};
+
/**
* This method returns `undefined`.
*
@@ -541,16 +517,6 @@ function isObjectLike(value) {
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
-/** Used for built-in method references. */
-var objectProto$4 = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString$1 = objectProto$4.toString;
-
/**
* The base implementation of `_.isArguments`.
*
@@ -559,7 +525,7 @@ var objectToString$1 = objectProto$4.toString;
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
- return isObjectLike(value) && objectToString$1.call(value) == argsTag;
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/** Used for built-in method references. */
@@ -734,16 +700,6 @@ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
-/** Used for built-in method references. */
-var objectProto$5 = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString$2 = objectProto$5.toString;
-
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
@@ -753,7 +709,7 @@ var objectToString$2 = objectProto$5.toString;
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString$2.call(value)];
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
@@ -852,7 +808,7 @@ function arrayLikeKeys(value, inherited) {
}
/** Used for built-in method references. */
-var objectProto$7 = Object.prototype;
+var objectProto$5 = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
@@ -863,7 +819,7 @@ var objectProto$7 = Object.prototype;
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
return value === proto;
}
@@ -886,10 +842,10 @@ function overArg(func, transform) {
var nativeKeys = overArg(Object.keys, Object);
/** Used for built-in method references. */
-var objectProto$6 = Object.prototype;
+var objectProto$4 = Object.prototype;
/** Used to check objects for own properties. */
-var hasOwnProperty$3 = objectProto$6.hasOwnProperty;
+var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -989,10 +945,6 @@ function onlyOnce(fn) {
};
}
-// A temporary value used to identify if the loop should be broken.
-// See #1064, #1293
-var breakLoop = {};
-
function _eachOfLimit(limit) {
return function (obj, iteratee, callback) {
callback = once(callback || noop);
@@ -1048,17 +1000,15 @@ function _eachOfLimit(limit) {
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A function to apply to each
+ * @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
- * array. The iteratee is passed a `callback(err)` which must be called once it
- * has completed. If no error has occurred, the callback should be run without
- * arguments or with an explicit `null` argument. Invoked with
- * (item, key, callback).
+ * array.
+ * Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
*/
function eachOfLimit(coll, limit, iteratee, callback) {
- _eachOfLimit(limit)(coll, iteratee, callback);
+ _eachOfLimit(limit)(coll, wrapAsync$1(iteratee), callback);
}
function doLimit(fn, limit) {
@@ -1077,10 +1027,10 @@ function eachOfArrayLike(coll, iteratee, callback) {
callback(null);
}
- function iteratorCallback(err) {
+ function iteratorCallback(err, value) {
if (err) {
callback(err);
- } else if (++completed === length) {
+ } else if (++completed === length || value === breakLoop) {
callback(null);
}
}
@@ -1105,12 +1055,10 @@ var eachOfGeneric = doLimit(eachOfLimit, Infinity);
* @category Collection
* @see [async.each]{@link module:Collections.each}
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each
- * item in `coll`. The `key` is the item's key, or index in the case of an
- * array. The iteratee is passed a `callback(err)` which must be called once it
- * has completed. If no error has occurred, the callback should be run without
- * arguments or with an explicit `null` argument. Invoked with
- * (item, key, callback).
+ * @param {AsyncFunction} iteratee - A function to apply to each
+ * item in `coll`.
+ * The `key` is the item's key, or index in the case of an array.
+ * Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @example
@@ -1136,24 +1084,25 @@ var eachOfGeneric = doLimit(eachOfLimit, Infinity);
*/
var eachOf = function (coll, iteratee, callback) {
var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
- eachOfImplementation(coll, iteratee, callback);
+ eachOfImplementation(coll, wrapAsync$1(iteratee), callback);
};
function doParallel(fn) {
return function (obj, iteratee, callback) {
- return fn(eachOf, obj, iteratee, callback);
+ return fn(eachOf, obj, wrapAsync$1(iteratee), callback);
};
}
function _asyncMap(eachfn, arr, iteratee, callback) {
- callback = once(callback || noop);
+ callback = callback || noop;
arr = arr || [];
var results = [];
var counter = 0;
+ var _iteratee = wrapAsync$1(iteratee);
eachfn(arr, function (value, _, callback) {
var index = counter++;
- iteratee(value, function (err, v) {
+ _iteratee(value, function (err, v) {
results[index] = v;
callback(err);
});
@@ -1177,7 +1126,7 @@ function _asyncMap(eachfn, arr, iteratee, callback) {
*
* If `map` is passed an Object, the results will be an Array. The results
* will roughly be in the order of the original Objects' keys (but this can
- * vary across JavaScript engines)
+ * vary across JavaScript engines).
*
* @name map
* @static
@@ -1185,10 +1134,10 @@ function _asyncMap(eachfn, arr, iteratee, callback) {
* @method
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, transformed)` which must be called
- * once it has completed with an error (which can be `null`) and a
- * transformed item. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Results is an Array of the
* transformed items from the `coll`. Invoked with (err, results).
@@ -1212,7 +1161,7 @@ var map = doParallel(_asyncMap);
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} fns - A collection of asynchronous functions
+ * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
* to all call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
@@ -1237,7 +1186,7 @@ var applyEach = applyEach$1(map);
function doParallelLimit(fn) {
return function (obj, limit, iteratee, callback) {
- return fn(_eachOfLimit(limit), obj, iteratee, callback);
+ return fn(_eachOfLimit(limit), obj, wrapAsync$1(iteratee), callback);
};
}
@@ -1252,10 +1201,10 @@ function doParallelLimit(fn) {
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, transformed)` which must be called
- * once it has completed with an error (which can be `null`) and a transformed
- * item. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Results is an array of the
* transformed items from the `coll`. Invoked with (err, results).
@@ -1272,10 +1221,10 @@ var mapLimit = doParallelLimit(_asyncMap);
* @see [async.map]{@link module:Collections.map}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, transformed)` which must be called
- * once it has completed with an error (which can be `null`) and a
- * transformed item. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Results is an array of the
* transformed items from the `coll`. Invoked with (err, results).
@@ -1291,7 +1240,7 @@ var mapSeries = doLimit(mapLimit, 1);
* @method
* @see [async.applyEach]{@link module:ControlFlow.applyEach}
* @category Control Flow
- * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all
+ * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
* call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
@@ -1347,89 +1296,13 @@ var applyEachSeries = applyEach$1(mapSeries);
* two
* three
*/
-var apply$2 = baseRest$1(function (fn, args) {
- return baseRest$1(function (callArgs) {
+var apply$2 = rest(function (fn, args) {
+ return rest(function (callArgs) {
return fn.apply(null, args.concat(callArgs));
});
});
/**
- * Take a sync function and make it async, passing its return value to a
- * callback. This is useful for plugging sync functions into a waterfall,
- * series, or other async functions. Any arguments passed to the generated
- * function will be passed to the wrapped function (except for the final
- * callback argument). Errors thrown will be passed to the callback.
- *
- * If the function passed to `asyncify` returns a Promise, that promises's
- * resolved/rejected state will be used to call the callback, rather than simply
- * the synchronous return value.
- *
- * This also means you can asyncify ES2016 `async` functions.
- *
- * @name asyncify
- * @static
- * @memberOf module:Utils
- * @method
- * @alias wrapSync
- * @category Util
- * @param {Function} func - The synchronous function to convert to an
- * asynchronous function.
- * @returns {Function} An asynchronous wrapper of the `func`. To be invoked with
- * (callback).
- * @example
- *
- * // passing a regular synchronous function
- * async.waterfall([
- * async.apply(fs.readFile, filename, "utf8"),
- * async.asyncify(JSON.parse),
- * function (data, next) {
- * // data is the result of parsing the text.
- * // If there was a parsing error, it would have been caught.
- * }
- * ], callback);
- *
- * // passing a function returning a promise
- * async.waterfall([
- * async.apply(fs.readFile, filename, "utf8"),
- * async.asyncify(function (contents) {
- * return db.model.create(contents);
- * }),
- * function (model, next) {
- * // `model` is the instantiated model object.
- * // If there was an error, this function would be skipped.
- * }
- * ], callback);
- *
- * // es6 example
- * var q = async.queue(async.asyncify(async function(file) {
- * var intermediateStep = await processFile(file);
- * return await somePromise(intermediateStep)
- * }));
- *
- * q.push(files);
- */
-function asyncify(func) {
- return initialParams(function (args, callback) {
- var result;
- try {
- result = func.apply(this, args);
- } catch (e) {
- return callback(e);
- }
- // if result is Promise object
- if (isObject(result) && typeof result.then === 'function') {
- result.then(function (value) {
- callback(null, value);
- }, function (err) {
- callback(err.message ? err : new Error(err));
- });
- } else {
- callback(null, result);
- }
- });
-}
-
-/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
@@ -1440,7 +1313,7 @@ function asyncify(func) {
*/
function arrayEach(array, iteratee) {
var index = -1,
- length = array ? array.length : 0;
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
@@ -1571,17 +1444,17 @@ function baseIndexOf(array, value, fromIndex) {
}
/**
- * Determines the best order for running the functions in `tasks`, based on
+ * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
* their requirements. Each function can optionally depend on other functions
* being completed first, and each function is run as soon as its requirements
* are satisfied.
*
- * If any of the functions pass an error to their callback, the `auto` sequence
+ * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
* will stop. Further tasks will not execute (so any other functions depending
* on it will not run), and the main `callback` is immediately called with the
* error.
*
- * Functions also receive an object containing the results of functions which
+ * {@link AsyncFunction}s also receive an object containing the results of functions which
* have completed so far as the first argument, if they have dependencies. If a
* task function has no dependencies, it will only be passed a callback.
*
@@ -1591,7 +1464,7 @@ function baseIndexOf(array, value, fromIndex) {
* @method
* @category Control Flow
* @param {Object} tasks - An object. Each of its properties is either a
- * function or an array of requirements, with the function itself the last item
+ * function or an array of requirements, with the {@link AsyncFunction} itself the last item
* in the array. The object's key of a property serves as the name of the task
* defined by that property, i.e. can be used when specifying requirements for
* other tasks. The function receives one or two arguments:
@@ -1669,7 +1542,7 @@ var auto = function (tasks, concurrency, callback) {
var runningTasks = 0;
var hasError = false;
- var listeners = {};
+ var listeners = Object.create(null);
var readyTasks = [];
@@ -1697,7 +1570,7 @@ var auto = function (tasks, concurrency, callback) {
arrayEach(dependencies, function (dependencyName) {
if (!tasks[dependencyName]) {
- throw new Error('async.auto task `' + key + '` has a non-existent dependency in ' + dependencies.join(', '));
+ throw new Error('async.auto task `' + key + '` has a non-existent dependency `' + dependencyName + '` in ' + dependencies.join(', '));
}
addListener(dependencyName, function () {
remainingDependencies--;
@@ -1747,7 +1620,7 @@ var auto = function (tasks, concurrency, callback) {
function runTask(key, task) {
if (hasError) return;
- var taskCallback = onlyOnce(baseRest$1(function (err, args) {
+ var taskCallback = onlyOnce(rest(function (err, args) {
runningTasks--;
if (args.length <= 1) {
args = args[0];
@@ -1759,7 +1632,7 @@ var auto = function (tasks, concurrency, callback) {
});
safeResults[key] = args;
hasError = true;
- listeners = [];
+ listeners = Object.create(null);
callback(err, safeResults);
} else {
@@ -1769,7 +1642,7 @@ var auto = function (tasks, concurrency, callback) {
}));
runningTasks++;
- var taskFn = task[task.length - 1];
+ var taskFn = wrapAsync$1(task[task.length - 1]);
if (task.length > 1) {
taskFn(results, taskCallback);
} else {
@@ -1820,7 +1693,7 @@ var auto = function (tasks, concurrency, callback) {
*/
function arrayMap(array, iteratee) {
var index = -1,
- length = array ? array.length : 0,
+ length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
@@ -1829,41 +1702,9 @@ function arrayMap(array, iteratee) {
return result;
}
-/**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
-function copyArray(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
-}
-
-/** Built-in value references. */
-var Symbol$1 = root.Symbol;
-
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
-/** Used for built-in method references. */
-var objectProto$8 = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString$3 = objectProto$8.toString;
-
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
@@ -1883,7 +1724,7 @@ var objectToString$3 = objectProto$8.toString;
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString$3.call(value) == symbolTag);
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
}
/** Used as references for various `Number` constants. */
@@ -2145,7 +1986,7 @@ function trim(string, chars, guard) {
return castSlice(strSymbols, start, end).join('');
}
-var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
+var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
@@ -2179,7 +2020,7 @@ function parseParams(func) {
* @method
* @see [async.auto]{@link module:ControlFlow.auto}
* @category Control Flow
- * @param {Object} tasks - An object, each of whose properties is a function of
+ * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
* the form 'func([dependencies...], callback). The object's key of a property
* serves as the name of the task defined by that property, i.e. can be used
* when specifying requirements for other tasks.
@@ -2247,22 +2088,25 @@ function autoInject(tasks, callback) {
baseForOwn(tasks, function (taskFn, key) {
var params;
+ var fnIsAsync = isAsync(taskFn);
+ var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0;
if (isArray(taskFn)) {
- params = copyArray(taskFn);
- taskFn = params.pop();
+ params = taskFn.slice(0, -1);
+ taskFn = taskFn[taskFn.length - 1];
newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
- } else if (taskFn.length === 1) {
+ } else if (hasNoDeps) {
// no dependencies, use the function as-is
newTasks[key] = taskFn;
} else {
params = parseParams(taskFn);
- if (taskFn.length === 0 && params.length === 0) {
+ if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
throw new Error("autoInject task functions require explicit parameters.");
}
- params.pop();
+ // remove callback param
+ if (!fnIsAsync) params.pop();
newTasks[key] = params.concat(newTask);
}
@@ -2272,7 +2116,7 @@ function autoInject(tasks, callback) {
return results[name];
});
newArgs.push(taskCb);
- taskFn.apply(null, newArgs);
+ wrapAsync$1(taskFn).apply(null, newArgs);
}
});
@@ -2287,7 +2131,7 @@ function fallback(fn) {
}
function wrap(defer) {
- return baseRest$1(function (fn, args) {
+ return rest(function (fn, args) {
defer(function () {
fn.apply(null, args);
});
@@ -2370,6 +2214,10 @@ function queue(worker, concurrency, payload) {
throw new Error('Concurrency must not be zero');
}
+ var _worker = wrapAsync$1(worker);
+ var numRunning = 0;
+ var workersList = [];
+
function _insert(data, insertAtFront, callback) {
if (callback != null && typeof callback !== 'function') {
throw new Error('task callback must be a function');
@@ -2401,8 +2249,8 @@ function queue(worker, concurrency, payload) {
}
function _next(tasks) {
- return baseRest$1(function (args) {
- workers -= 1;
+ return rest(function (args) {
+ numRunning -= 1;
for (var i = 0, l = tasks.length; i < l; i++) {
var task = tasks[i];
@@ -2418,7 +2266,7 @@ function queue(worker, concurrency, payload) {
}
}
- if (workers <= q.concurrency - q.buffer) {
+ if (numRunning <= q.concurrency - q.buffer) {
q.unsaturated();
}
@@ -2429,8 +2277,7 @@ function queue(worker, concurrency, payload) {
});
}
- var workers = 0;
- var workersList = [];
+ var isProcessing = false;
var q = {
_tasks: new DLL(),
concurrency: concurrency,
@@ -2454,7 +2301,13 @@ function queue(worker, concurrency, payload) {
_insert(data, true, callback);
},
process: function () {
- while (!q.paused && workers < q.concurrency && q._tasks.length) {
+ // Avoid trying to start too many processing operations. This can occur
+ // when callbacks resolve synchronously (#1267).
+ if (isProcessing) {
+ return;
+ }
+ isProcessing = true;
+ while (!q.paused && numRunning < q.concurrency && q._tasks.length) {
var tasks = [],
data = [];
var l = q._tasks.length;
@@ -2468,28 +2321,29 @@ function queue(worker, concurrency, payload) {
if (q._tasks.length === 0) {
q.empty();
}
- workers += 1;
+ numRunning += 1;
workersList.push(tasks[0]);
- if (workers === q.concurrency) {
+ if (numRunning === q.concurrency) {
q.saturated();
}
var cb = onlyOnce(_next(tasks));
- worker(data, cb);
+ _worker(data, cb);
}
+ isProcessing = false;
},
length: function () {
return q._tasks.length;
},
running: function () {
- return workers;
+ return numRunning;
},
workersList: function () {
return workersList;
},
idle: function () {
- return q._tasks.length + workers === 0;
+ return q._tasks.length + numRunning === 0;
},
pause: function () {
q.paused = true;
@@ -2499,12 +2353,7 @@ function queue(worker, concurrency, payload) {
return;
}
q.paused = false;
- var resumeCount = Math.min(q.concurrency, q._tasks.length);
- // Need to call q.process once per concurrent
- // worker to preserve full concurrency after pause
- for (var w = 1; w <= resumeCount; w++) {
- setImmediate$1(q.process);
- }
+ setImmediate$1(q.process);
}
};
return q;
@@ -2558,9 +2407,8 @@ function queue(worker, concurrency, payload) {
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @category Control Flow
- * @param {Function} worker - An asynchronous function for processing an array
- * of queued tasks, which must call its `callback(err)` argument when finished,
- * with an optional `err` argument. Invoked with `(tasks, callback)`.
+ * @param {AsyncFunction} worker - An asynchronous function for processing an array
+ * of queued tasks. Invoked with `(tasks, callback)`.
* @param {number} [payload=Infinity] - An optional `integer` for determining
* how many tasks should be processed per round; if omitted, the default is
* unlimited.
@@ -2603,11 +2451,9 @@ function cargo(worker, payload) {
* @alias forEachOfSeries
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`. The
- * `key` is the item's key, or index in the case of an array. The iteratee is
- * passed a `callback(err)` which must be called once it has completed. If no
- * error has occurred, the callback should be run without arguments or with an
- * explicit `null` argument. Invoked with (item, key, callback).
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Invoked with (err).
*/
@@ -2633,12 +2479,12 @@ var eachOfSeries = doLimit(eachOfLimit, 1);
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
- * @param {Function} iteratee - A function applied to each item in the
- * array to produce the next step in the reduction. The `iteratee` is passed a
- * `callback(err, reduction)` which accepts an optional error as its first
- * argument, and the state of the reduction as the second. If an error is
- * passed to the callback, the reduction is stopped and the main `callback` is
- * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction.
+ * The `iteratee` should complete with the next state of the reduction.
+ * If the iteratee complete with an error, the reduction is stopped and the
+ * main `callback` is immediately called with the error.
+ * Invoked with (memo, item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
@@ -2655,8 +2501,9 @@ var eachOfSeries = doLimit(eachOfLimit, 1);
*/
function reduce(coll, memo, iteratee, callback) {
callback = once(callback || noop);
+ var _iteratee = wrapAsync$1(iteratee);
eachOfSeries(coll, function (x, i, callback) {
- iteratee(memo, x, function (err, v) {
+ _iteratee(memo, x, function (err, v) {
memo = v;
callback(err);
});
@@ -2678,7 +2525,7 @@ function reduce(coll, memo, iteratee, callback) {
* @method
* @see [async.compose]{@link module:ControlFlow.compose}
* @category Control Flow
- * @param {...Function} functions - the asynchronous functions to compose
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
* @returns {Function} a function that composes the `functions` in order
* @example
*
@@ -2703,8 +2550,9 @@ function reduce(coll, memo, iteratee, callback) {
* });
* });
*/
-var seq$1 = baseRest$1(function seq(functions) {
- return baseRest$1(function (args) {
+var seq$1 = rest(function seq(functions) {
+ var _functions = arrayMap(functions, wrapAsync$1);
+ return rest(function (args) {
var that = this;
var cb = args[args.length - 1];
@@ -2714,10 +2562,10 @@ var seq$1 = baseRest$1(function seq(functions) {
cb = noop;
}
- reduce(functions, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([baseRest$1(function (err, nextargs) {
+ reduce(_functions, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat(rest(function (err, nextargs) {
cb(err, nextargs);
- })]));
+ })));
}, function (err, results) {
cb.apply(that, [err].concat(results));
});
@@ -2737,7 +2585,7 @@ var seq$1 = baseRest$1(function seq(functions) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {...Function} functions - the asynchronous functions to compose
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
* @returns {Function} an asynchronous function that is the composed
* asynchronous `functions`
* @example
@@ -2759,7 +2607,7 @@ var seq$1 = baseRest$1(function seq(functions) {
* // result now equals 15
* });
*/
-var compose = baseRest$1(function (args) {
+var compose = rest(function (args) {
return seq$1.apply(null, args.reverse());
});
@@ -2788,10 +2636,8 @@ function concat$1(eachfn, arr, fn, callback) {
* @method
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, results)` which must be called once
- * it has completed with an error (which can be `null`) and an array of results.
- * Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
+ * which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback(err)] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
@@ -2806,7 +2652,7 @@ var concat = doParallel(concat$1);
function doSeries(fn) {
return function (obj, iteratee, callback) {
- return fn(eachOfSeries, obj, iteratee, callback);
+ return fn(eachOfSeries, obj, wrapAsync$1(iteratee), callback);
};
}
@@ -2820,9 +2666,8 @@ function doSeries(fn) {
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, results)` which must be called once
- * it has completed with an error (which can be `null`) and an array of results.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
+ * The iteratee should complete with an array an array of results.
* Invoked with (item, callback).
* @param {Function} [callback(err)] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
@@ -2843,7 +2688,7 @@ var concatSeries = doSeries(concat$1);
* @category Util
* @param {...*} arguments... - Any number of arguments to automatically invoke
* callback with.
- * @returns {Function} Returns a function that when invoked, automatically
+ * @returns {AsyncFunction} Returns a function that when invoked, automatically
* invokes the callback with the previous given arguments.
* @example
*
@@ -2873,43 +2718,37 @@ var concatSeries = doSeries(concat$1);
* //...
* }, callback);
*/
-var constant$2 = baseRest$1(function (values) {
+var constant = rest(function (values) {
var args = [null].concat(values);
return initialParams(function (ignoredArgs, callback) {
return callback.apply(this, args);
});
});
-function _createTester(eachfn, check, getResult) {
- return function (arr, limit, iteratee, cb) {
- function done() {
- if (cb) {
- cb(null, getResult(false));
- }
- }
- function wrappedIteratee(x, _, callback) {
- if (!cb) return callback();
- iteratee(x, function (err, v) {
- // Check cb as another iteratee may have resolved with a
- // value or error since we started this iteratee
- if (cb && (err || check(v))) {
- if (err) cb(err);else cb(err, getResult(true, x));
- cb = iteratee = false;
- callback(err, breakLoop);
+function _createTester(check, getResult) {
+ return function (eachfn, arr, iteratee, cb) {
+ cb = cb || noop;
+ var testPassed = false;
+ var testResult;
+ eachfn(arr, function (value, _, callback) {
+ iteratee(value, function (err, result) {
+ if (err) {
+ callback(err);
+ } else if (check(result) && !testResult) {
+ testPassed = true;
+ testResult = getResult(true, value);
+ callback(null, breakLoop);
} else {
callback();
}
});
- }
- if (arguments.length > 3) {
- cb = cb || noop;
- eachfn(arr, limit, wrappedIteratee, done);
- } else {
- cb = iteratee;
- cb = cb || noop;
- iteratee = limit;
- eachfn(arr, wrappedIteratee, done);
- }
+ }, function (err) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, testPassed ? testResult : getResult(false));
+ }
+ });
};
}
@@ -2934,9 +2773,9 @@ function _findGetResult(v, x) {
* @alias find
* @category Collections
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, truthValue)` which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
@@ -2952,7 +2791,7 @@ function _findGetResult(v, x) {
* // result now equals the first file in the list that exists
* });
*/
-var detect = _createTester(eachOf, identity, _findGetResult);
+var detect = doParallel(_createTester(identity, _findGetResult));
/**
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
@@ -2967,16 +2806,16 @@ var detect = _createTester(eachOf, identity, _findGetResult);
* @category Collections
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, truthValue)` which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
*/
-var detectLimit = _createTester(eachOfLimit, identity, _findGetResult);
+var detectLimit = doParallelLimit(_createTester(identity, _findGetResult));
/**
* The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
@@ -2989,20 +2828,20 @@ var detectLimit = _createTester(eachOfLimit, identity, _findGetResult);
* @alias findSeries
* @category Collections
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, truthValue)` which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
*/
-var detectSeries = _createTester(eachOfSeries, identity, _findGetResult);
+var detectSeries = doLimit(detectLimit, 1);
function consoleFunc(name) {
- return baseRest$1(function (fn, args) {
- fn.apply(null, args.concat([baseRest$1(function (err, args) {
+ return rest(function (fn, args) {
+ wrapAsync$1(fn).apply(null, args.concat(rest(function (err, args) {
if (typeof console === 'object') {
if (err) {
if (console.error) {
@@ -3014,15 +2853,16 @@ function consoleFunc(name) {
});
}
}
- })]));
+ })));
});
}
/**
- * Logs the result of an `async` function to the `console` using `console.dir`
- * to display the properties of the resulting object. Only works in Node.js or
- * in browsers that support `console.dir` and `console.error` (such as FF and
- * Chrome). If multiple arguments are returned from the async function,
+ * Logs the result of an [`async` function]{@link AsyncFunction} to the
+ * `console` using `console.dir` to display the properties of the resulting object.
+ * Only works in Node.js or in browsers that support `console.dir` and
+ * `console.error` (such as FF and Chrome).
+ * If multiple arguments are returned from the async function,
* `console.dir` is called on each argument in order.
*
* @name dir
@@ -3030,8 +2870,8 @@ function consoleFunc(name) {
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} function - The function you want to eventually apply all
- * arguments to.
+ * @param {AsyncFunction} function - The function you want to eventually apply
+ * all arguments to.
* @param {...*} arguments... - Any number of arguments to apply to the function.
* @example
*
@@ -3059,29 +2899,30 @@ var dir = consoleFunc('dir');
* @method
* @see [async.during]{@link module:ControlFlow.during}
* @category Control Flow
- * @param {Function} fn - A function which is called each time `test` passes.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
- * @param {Function} test - asynchronous truth test to perform before each
+ * @param {AsyncFunction} fn - An async function which is called each time
+ * `test` passes. Invoked with (callback).
+ * @param {AsyncFunction} test - asynchronous truth test to perform before each
* execution of `fn`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `fn`.
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error if one occured, otherwise `null`.
+ * will be passed an error if one occurred, otherwise `null`.
*/
function doDuring(fn, test, callback) {
callback = onlyOnce(callback || noop);
+ var _fn = wrapAsync$1(fn);
+ var _test = wrapAsync$1(test);
- var next = baseRest$1(function (err, args) {
+ var next = rest(function (err, args) {
if (err) return callback(err);
args.push(check);
- test.apply(this, args);
+ _test.apply(this, args);
});
function check(err, truth) {
if (err) return callback(err);
if (!truth) return callback(null);
- fn(next);
+ _fn(next);
}
check(null, true);
@@ -3099,11 +2940,10 @@ function doDuring(fn, test, callback) {
* @method
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
- * @param {Function} iteratee - A function which is called each time `test`
- * passes. The function is passed a `callback(err)`, which must be called once
- * it has completed with an optional `err` argument. Invoked with (callback).
+ * @param {AsyncFunction} iteratee - A function which is called each time `test`
+ * passes. Invoked with (callback).
* @param {Function} test - synchronous truth test to perform after each
- * execution of `iteratee`. Invoked with the non-error callback results of
+ * execution of `iteratee`. Invoked with any non-error callback results of
* `iteratee`.
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped.
@@ -3112,12 +2952,13 @@ function doDuring(fn, test, callback) {
*/
function doWhilst(iteratee, test, callback) {
callback = onlyOnce(callback || noop);
- var next = baseRest$1(function (err, args) {
+ var _iteratee = wrapAsync$1(iteratee);
+ var next = rest(function (err, args) {
if (err) return callback(err);
- if (test.apply(this, args)) return iteratee(next);
+ if (test.apply(this, args)) return _iteratee(next);
callback.apply(null, [null].concat(args));
});
- iteratee(next);
+ _iteratee(next);
}
/**
@@ -3130,18 +2971,18 @@ function doWhilst(iteratee, test, callback) {
* @method
* @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
* @category Control Flow
- * @param {Function} fn - A function which is called each time `test` fails.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
+ * @param {AsyncFunction} iteratee - An async function which is called each time
+ * `test` fails. Invoked with (callback).
* @param {Function} test - synchronous truth test to perform after each
- * execution of `fn`. Invoked with the non-error callback results of `fn`.
+ * execution of `iteratee`. Invoked with any non-error callback results of
+ * `iteratee`.
* @param {Function} [callback] - A callback which is called after the test
- * function has passed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `fn`'s
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
*/
-function doUntil(fn, test, callback) {
- doWhilst(fn, function () {
+function doUntil(iteratee, test, callback) {
+ doWhilst(iteratee, function () {
return !test.apply(this, arguments);
}, callback);
}
@@ -3158,14 +2999,13 @@ function doUntil(fn, test, callback) {
* @method
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
- * @param {Function} test - asynchronous truth test to perform before each
+ * @param {AsyncFunction} test - asynchronous truth test to perform before each
* execution of `fn`. Invoked with (callback).
- * @param {Function} fn - A function which is called each time `test` passes.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
+ * @param {AsyncFunction} fn - An async function which is called each time
+ * `test` passes. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error, if one occured, otherwise `null`.
+ * will be passed an error, if one occurred, otherwise `null`.
* @example
*
* var count = 0;
@@ -3185,19 +3025,21 @@ function doUntil(fn, test, callback) {
*/
function during(test, fn, callback) {
callback = onlyOnce(callback || noop);
+ var _fn = wrapAsync$1(fn);
+ var _test = wrapAsync$1(test);
function next(err) {
if (err) return callback(err);
- test(check);
+ _test(check);
}
function check(err, truth) {
if (err) return callback(err);
if (!truth) return callback(null);
- fn(next);
+ _fn(next);
}
- test(check);
+ _test(check);
}
function _withoutIndex(iteratee) {
@@ -3223,12 +3065,10 @@ function _withoutIndex(iteratee) {
* @alias forEach
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item
- * in `coll`. The iteratee is passed a `callback(err)` which must be called once
- * it has completed. If no error has occurred, the `callback` should be run
- * without arguments or with an explicit `null` argument. The array index is not
- * passed to the iteratee. Invoked with (item, callback). If you need the index,
- * use `eachOf`.
+ * @param {AsyncFunction} iteratee - An async function to apply to
+ * each item in `coll`. Invoked with (item, callback).
+ * The array index is not passed to the iteratee.
+ * If you need the index, use `eachOf`.
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @example
@@ -3266,7 +3106,7 @@ function _withoutIndex(iteratee) {
* });
*/
function eachLimit(coll, iteratee, callback) {
- eachOf(coll, _withoutIndex(iteratee), callback);
+ eachOf(coll, _withoutIndex(wrapAsync$1(iteratee)), callback);
}
/**
@@ -3281,17 +3121,16 @@ function eachLimit(coll, iteratee, callback) {
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A function to apply to each item in `coll`. The
- * iteratee is passed a `callback(err)` which must be called once it has
- * completed. If no error has occurred, the `callback` should be run without
- * arguments or with an explicit `null` argument. The array index is not passed
- * to the iteratee. Invoked with (item, callback). If you need the index, use
- * `eachOfLimit`.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The array index is not passed to the iteratee.
+ * If you need the index, use `eachOfLimit`.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
*/
function eachLimit$1(coll, limit, iteratee, callback) {
- _eachOfLimit(limit)(coll, _withoutIndex(iteratee), callback);
+ _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync$1(iteratee)), callback);
}
/**
@@ -3305,12 +3144,11 @@ function eachLimit$1(coll, limit, iteratee, callback) {
* @alias forEachSeries
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each
- * item in `coll`. The iteratee is passed a `callback(err)` which must be called
- * once it has completed. If no error has occurred, the `callback` should be run
- * without arguments or with an explicit `null` argument. The array index is
- * not passed to the iteratee. Invoked with (item, callback). If you need the
- * index, use `eachOfSeries`.
+ * @param {AsyncFunction} iteratee - An async function to apply to each
+ * item in `coll`.
+ * The array index is not passed to the iteratee.
+ * If you need the index, use `eachOfSeries`.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
*/
@@ -3322,16 +3160,17 @@ var eachSeries = doLimit(eachLimit$1, 1);
* no extra deferral is added. This is useful for preventing stack overflows
* (`RangeError: Maximum call stack size exceeded`) and generally keeping
* [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
- * contained.
+ * contained. ES2017 `async` functions are returned as-is -- they are immune
+ * to Zalgo's corrupting influences, as they always resolve on a later tick.
*
* @name ensureAsync
* @static
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} fn - an async function, one that expects a node-style
+ * @param {AsyncFunction} fn - an async function, one that expects a node-style
* callback as its last argument.
- * @returns {Function} Returns a wrapped function with the exact same call
+ * @returns {AsyncFunction} Returns a wrapped function with the exact same call
* signature as the function passed in.
* @example
*
@@ -3351,6 +3190,7 @@ var eachSeries = doLimit(eachLimit$1, 1);
* async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
*/
function ensureAsync(fn) {
+ if (isAsync(fn)) return fn;
return initialParams(function (args, callback) {
var sync = true;
args.push(function () {
@@ -3383,10 +3223,10 @@ function notId(v) {
* @alias all
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in the
- * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
- * which must be called with a boolean argument once it has completed. Invoked
- * with (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collection in parallel.
+ * The iteratee must complete with a boolean result value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
@@ -3400,7 +3240,7 @@ function notId(v) {
* // if result is true then every file exists
* });
*/
-var every = _createTester(eachOf, notId, notId);
+var every = doParallel(_createTester(notId, notId));
/**
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
@@ -3414,15 +3254,15 @@ var every = _createTester(eachOf, notId, notId);
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A truth test to apply to each item in the
- * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
- * which must be called with a boolean argument once it has completed. Invoked
- * with (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collection in parallel.
+ * The iteratee must complete with a boolean result value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
*/
-var everyLimit = _createTester(eachOfLimit, notId, notId);
+var everyLimit = doParallelLimit(_createTester(notId, notId));
/**
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
@@ -3435,10 +3275,10 @@ var everyLimit = _createTester(eachOfLimit, notId, notId);
* @alias allSeries
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in the
- * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
- * which must be called with a boolean argument once it has completed. Invoked
- * with (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collection in series.
+ * The iteratee must complete with a boolean result value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
@@ -3458,11 +3298,27 @@ function baseProperty(key) {
};
}
-function _filter(eachfn, arr, iteratee, callback) {
- callback = once(callback || noop);
- var results = [];
+function filterArray(eachfn, arr, iteratee, callback) {
+ var truthValues = new Array(arr.length);
eachfn(arr, function (x, index, callback) {
iteratee(x, function (err, v) {
+ truthValues[index] = !!v;
+ callback(err);
+ });
+ }, function (err) {
+ if (err) return callback(err);
+ var results = [];
+ for (var i = 0; i < arr.length; i++) {
+ if (truthValues[i]) results.push(arr[i]);
+ }
+ callback(null, results);
+ });
+}
+
+function filterGeneric(eachfn, coll, iteratee, callback) {
+ var results = [];
+ eachfn(coll, function (x, index, callback) {
+ iteratee(x, function (err, v) {
if (err) {
callback(err);
} else {
@@ -3483,6 +3339,11 @@ function _filter(eachfn, arr, iteratee, callback) {
});
}
+function _filter(eachfn, coll, iteratee, callback) {
+ var filter = isArrayLike(coll) ? filterArray : filterGeneric;
+ filter(eachfn, coll, wrapAsync$1(iteratee), callback || noop);
+}
+
/**
* Returns a new array of all the values in `coll` which pass an async truth
* test. This operation is performed in parallel, but the results array will be
@@ -3556,16 +3417,16 @@ var filterSeries = doLimit(filterLimit, 1);
* Calls the asynchronous function `fn` with a callback parameter that allows it
* to call itself again, in series, indefinitely.
- * If an error is passed to the
- * callback then `errback` is called with the error, and execution stops,
- * otherwise it will never be called.
+ * If an error is passed to the callback then `errback` is called with the
+ * error, and execution stops, otherwise it will never be called.
*
* @name forever
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Function} fn - a function to call repeatedly. Invoked with (next).
+ * @param {AsyncFunction} fn - an async function to call repeatedly.
+ * Invoked with (next).
* @param {Function} [errback] - when `fn` passes an error to it's callback,
* this function will be called, and execution stops. Invoked with (err).
* @example
@@ -3583,7 +3444,7 @@ var filterSeries = doLimit(filterLimit, 1);
*/
function forever(fn, errback) {
var done = onlyOnce(errback || noop);
- var task = ensureAsync(fn);
+ var task = wrapAsync$1(ensureAsync(fn));
function next(err) {
if (err) return done(err);
@@ -3593,6 +3454,114 @@ function forever(fn, errback) {
}
/**
+ * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name groupByLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.groupBy]{@link module:Collections.groupBy}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with a `key` to group the value under.
+ * Invoked with (value, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Result is an `Object` whoses
+ * properties are arrays of values which returned the corresponding key.
+ */
+var groupByLimit = function (coll, limit, iteratee, callback) {
+ callback = callback || noop;
+ var _iteratee = wrapAsync$1(iteratee);
+ mapLimit(coll, limit, function (val, callback) {
+ _iteratee(val, function (err, key) {
+ if (err) return callback(err);
+ return callback(null, { key: key, val: val });
+ });
+ }, function (err, mapResults) {
+ var result = {};
+ // from MDN, handle object having an `hasOwnProperty` prop
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+ for (var i = 0; i < mapResults.length; i++) {
+ if (mapResults[i]) {
+ var key = mapResults[i].key;
+ var val = mapResults[i].val;
+
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(val);
+ } else {
+ result[key] = [val];
+ }
+ }
+ }
+
+ return callback(err, result);
+ });
+};
+
+/**
+ * Returns a new object, where each value corresponds to an array of items, from
+ * `coll`, that returned the corresponding key. That is, the keys of the object
+ * correspond to the values passed to the `iteratee` callback.
+ *
+ * Note: Since this function applies the `iteratee` to each item in parallel,
+ * there is no guarantee that the `iteratee` functions will complete in order.
+ * However, the values for each key in the `result` will be in the same order as
+ * the original `coll`. For Objects, the values will roughly be in the order of
+ * the original Objects' keys (but this can vary across JavaScript engines).
+ *
+ * @name groupBy
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with a `key` to group the value under.
+ * Invoked with (value, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Result is an `Object` whoses
+ * properties are arrays of values which returned the corresponding key.
+ * @example
+ *
+ * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
+ * db.findById(userId, function(err, user) {
+ * if (err) return callback(err);
+ * return callback(null, user.age);
+ * });
+ * }, function(err, result) {
+ * // result is object containing the userIds grouped by age
+ * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
+ * });
+ */
+var groupBy = doLimit(groupByLimit, Infinity);
+
+/**
+ * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
+ *
+ * @name groupBySeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.groupBy]{@link module:Collections.groupBy}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with a `key` to group the value under.
+ * Invoked with (value, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Result is an `Object` whoses
+ * properties are arrays of values which returned the corresponding key.
+ */
+var groupBySeries = doLimit(groupByLimit, 1);
+
+/**
* Logs the result of an `async` function to the `console`. Only works in
* Node.js or in browsers that support `console.log` and `console.error` (such
* as FF and Chrome). If multiple arguments are returned from the async
@@ -3603,8 +3572,8 @@ function forever(fn, errback) {
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} function - The function you want to eventually apply all
- * arguments to.
+ * @param {AsyncFunction} function - The function you want to eventually apply
+ * all arguments to.
* @param {...*} arguments... - Any number of arguments to apply to the function.
* @example
*
@@ -3633,10 +3602,10 @@ var log = consoleFunc('log');
* @category Collection
* @param {Object} obj - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A function to apply to each value in `obj`.
- * The iteratee is passed a `callback(err, transformed)` which must be called
- * once it has completed with an error (which can be `null`) and a
- * transformed value. Invoked with (value, key, callback).
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
+ * in `coll`.
+ * The iteratee should complete with the transformed value as its result.
+ * Invoked with (value, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. `result` is a new object consisting
* of each key from `obj`, with each transformed value on the right-hand side.
@@ -3645,8 +3614,9 @@ var log = consoleFunc('log');
function mapValuesLimit(obj, limit, iteratee, callback) {
callback = once(callback || noop);
var newObj = {};
+ var _iteratee = wrapAsync$1(iteratee);
eachOfLimit(obj, limit, function (val, key, next) {
- iteratee(val, key, function (err, result) {
+ _iteratee(val, key, function (err, result) {
if (err) return next(err);
newObj[key] = result;
next();
@@ -3675,10 +3645,10 @@ function mapValuesLimit(obj, limit, iteratee, callback) {
* @method
* @category Collection
* @param {Object} obj - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each value and key in
- * `coll`. The iteratee is passed a `callback(err, transformed)` which must be
- * called once it has completed with an error (which can be `null`) and a
- * transformed value. Invoked with (value, key, callback).
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
+ * in `coll`.
+ * The iteratee should complete with the transformed value as its result.
+ * Invoked with (value, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. `result` is a new object consisting
* of each key from `obj`, with each transformed value on the right-hand side.
@@ -3713,10 +3683,10 @@ var mapValues = doLimit(mapValuesLimit, Infinity);
* @see [async.mapValues]{@link module:Collections.mapValues}
* @category Collection
* @param {Object} obj - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each value in `obj`.
- * The iteratee is passed a `callback(err, transformed)` which must be called
- * once it has completed with an error (which can be `null`) and a
- * transformed value. Invoked with (value, key, callback).
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
+ * in `coll`.
+ * The iteratee should complete with the transformed value as its result.
+ * Invoked with (value, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. `result` is a new object consisting
* of each key from `obj`, with each transformed value on the right-hand side.
@@ -3729,7 +3699,7 @@ function has(obj, key) {
}
/**
- * Caches the results of an `async` function. When creating a hash to store
+ * Caches the results of an async function. When creating a hash to store
* function results against, the callback is omitted from the hash and an
* optional hash function can be used.
*
@@ -3747,11 +3717,11 @@ function has(obj, key) {
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} fn - The function to proxy and cache results from.
+ * @param {AsyncFunction} fn - The async function to proxy and cache results from.
* @param {Function} hasher - An optional function for generating a custom hash
* for storing results. It has all the arguments applied to it apart from the
* callback, and must be synchronous.
- * @returns {Function} a memoized version of `fn`
+ * @returns {AsyncFunction} a memoized version of `fn`
* @example
*
* var slow_fn = function(name, callback) {
@@ -3769,6 +3739,7 @@ function memoize(fn, hasher) {
var memo = Object.create(null);
var queues = Object.create(null);
hasher = hasher || identity;
+ var _fn = wrapAsync$1(fn);
var memoized = initialParams(function memoized(args, callback) {
var key = hasher.apply(null, args);
if (has(memo, key)) {
@@ -3779,14 +3750,14 @@ function memoize(fn, hasher) {
queues[key].push(callback);
} else {
queues[key] = [callback];
- fn.apply(null, args.concat([baseRest$1(function (args) {
+ _fn.apply(null, args.concat(rest(function (args) {
memo[key] = args;
var q = queues[key];
delete queues[key];
for (var i = 0, l = q.length; i < l; i++) {
q[i].apply(null, args);
}
- })]));
+ })));
}
});
memoized.memo = memo;
@@ -3842,7 +3813,7 @@ function _parallel(eachfn, tasks, callback) {
var results = isArrayLike(tasks) ? [] : {};
eachfn(tasks, function (task, key, callback) {
- task(baseRest$1(function (err, args) {
+ wrapAsync$1(task)(rest(function (err, args) {
if (args.length <= 1) {
args = args[0];
}
@@ -3867,6 +3838,9 @@ function _parallel(eachfn, tasks, callback) {
* sections for each task will happen one after the other. JavaScript remains
* single-threaded.
*
+ * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
+ * execution of other tasks when a task fails.
+ *
* It is also possible to use an object instead of an array. Each property will
* be run as a function and the results will be passed to the final `callback`
* as an object instead of an array. This can be a more readable way of handling
@@ -3877,14 +3851,14 @@ function _parallel(eachfn, tasks, callback) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection containing functions to run.
- * Each function is passed a `callback(err, result)` which it must call on
- * completion with an error `err` (which can be `null`) and an optional `result`
- * value.
+ * @param {Array|Iterable|Object} tasks - A collection of
+ * [async functions]{@link AsyncFunction} to run.
+ * Each async function can complete with any number of optional `result` values.
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed successfully. This function gets a results array
* (or object) containing all the result arguments passed to the task callbacks.
* Invoked with (err, results).
+ *
* @example
* async.parallel([
* function(callback) {
@@ -3934,10 +3908,9 @@ function parallelLimit(tasks, callback) {
* @method
* @see [async.parallel]{@link module:ControlFlow.parallel}
* @category Control Flow
- * @param {Array|Collection} tasks - A collection containing functions to run.
- * Each function is passed a `callback(err, result)` which it must call on
- * completion with an error `err` (which can be `null`) and an optional `result`
- * value.
+ * @param {Array|Iterable|Object} tasks - A collection of
+ * [async functions]{@link AsyncFunction} to run.
+ * Each async function can complete with any number of optional `result` values.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed successfully. This function gets a results array
@@ -4006,11 +3979,9 @@ function parallelLimit$1(tasks, limit, callback) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Function} worker - An asynchronous function for processing a queued
- * task, which must call its `callback(err)` argument when finished, with an
- * optional `error` as an argument. If you want to handle errors from an
- * individual task, pass a callback to `q.push()`. Invoked with
- * (task, callback).
+ * @param {AsyncFunction} worker - An async function for processing a queued task.
+ * If you want to handle errors from an individual task, pass a callback to
+ * `q.push()`. Invoked with (task, callback).
* @param {number} [concurrency=1] - An `integer` for determining how many
* `worker` functions should be run in parallel. If omitted, the concurrency
* defaults to `1`. If the concurrency is `0`, an error is thrown.
@@ -4049,8 +4020,9 @@ function parallelLimit$1(tasks, limit, callback) {
* });
*/
var queue$1 = function (worker, concurrency) {
+ var _worker = wrapAsync$1(worker);
return queue(function (items, cb) {
- worker(items[0], cb);
+ _worker(items[0], cb);
}, concurrency, 1);
};
@@ -4064,11 +4036,10 @@ var queue$1 = function (worker, concurrency) {
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @category Control Flow
- * @param {Function} worker - An asynchronous function for processing a queued
- * task, which must call its `callback(err)` argument when finished, with an
- * optional `error` as an argument. If you want to handle errors from an
- * individual task, pass a callback to `q.push()`. Invoked with
- * (task, callback).
+ * @param {AsyncFunction} worker - An async function for processing a queued task.
+ * If you want to handle errors from an individual task, pass a callback to
+ * `q.push()`.
+ * Invoked with (task, callback).
* @param {number} concurrency - An `integer` for determining how many `worker`
* functions should be run in parallel. If omitted, the concurrency defaults to
* `1`. If the concurrency is `0`, an error is thrown.
@@ -4138,9 +4109,8 @@ var priorityQueue = function (worker, concurrency) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array} tasks - An array containing functions to run. Each function
- * is passed a `callback(err, result)` which it must call on completion with an
- * error `err` (which can be `null`) and an optional `result` value.
+ * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
+ * to run. Each function can complete with an optional `result` value.
* @param {Function} callback - A callback to run once any of the functions have
* completed. This function gets an error or result from the first function that
* completed. Invoked with (err, result).
@@ -4169,7 +4139,7 @@ function race(tasks, callback) {
if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
if (!tasks.length) return callback();
for (var i = 0, l = tasks.length; i < l; i++) {
- tasks[i](callback);
+ wrapAsync$1(tasks[i])(callback);
}
}
@@ -4187,12 +4157,12 @@ var slice = Array.prototype.slice;
* @category Collection
* @param {Array} array - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
- * @param {Function} iteratee - A function applied to each item in the
- * array to produce the next step in the reduction. The `iteratee` is passed a
- * `callback(err, reduction)` which accepts an optional error as its first
- * argument, and the state of the reduction as the second. If an error is
- * passed to the callback, the reduction is stopped and the main `callback` is
- * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction.
+ * The `iteratee` should complete with the next state of the reduction.
+ * If the iteratee complete with an error, the reduction is stopped and the
+ * main `callback` is immediately called with the error.
+ * Invoked with (memo, item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
@@ -4203,17 +4173,17 @@ function reduceRight(array, memo, iteratee, callback) {
}
/**
- * Wraps the function in another function that always returns data even when it
- * errors.
+ * Wraps the async function in another function that always completes with a
+ * result object, even when it errors.
*
- * The object returned has either the property `error` or `value`.
+ * The result object has either the property `error` or `value`.
*
* @name reflect
* @static
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} fn - The function you want to wrap
+ * @param {AsyncFunction} fn - The async function you want to wrap
* @returns {Function} - A function that always passes null to it's callback as
* the error. The second argument to the callback will be an `object` with
* either an `error` or a `value` property.
@@ -4242,8 +4212,9 @@ function reduceRight(array, memo, iteratee, callback) {
* });
*/
function reflect(fn) {
+ var _fn = wrapAsync$1(fn);
return initialParams(function reflectOn(args, reflectCallback) {
- args.push(baseRest$1(function callback(err, cbArgs) {
+ args.push(rest(function callback(err, cbArgs) {
if (err) {
reflectCallback(null, {
error: err
@@ -4261,18 +4232,14 @@ function reflect(fn) {
}
}));
- return fn.apply(this, args);
+ return _fn.apply(this, args);
});
}
function reject$1(eachfn, arr, iteratee, callback) {
_filter(eachfn, arr, function (value, cb) {
iteratee(value, function (err, v) {
- if (err) {
- cb(err);
- } else {
- cb(null, !v);
- }
+ cb(err, !v);
});
}, callback);
}
@@ -4287,9 +4254,10 @@ function reject$1(eachfn, arr, iteratee, callback) {
* @see [async.filter]{@link module:Collections.filter}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} iteratee - An async truth test to apply to each item in
+ * `coll`.
+ * The should complete with a boolean value as its `result`.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @example
@@ -4306,7 +4274,7 @@ function reject$1(eachfn, arr, iteratee, callback) {
var reject = doParallel(reject$1);
/**
- * A helper function that wraps an array or an object of functions with reflect.
+ * A helper function that wraps an array or an object of functions with `reflect`.
*
* @name reflectAll
* @static
@@ -4314,8 +4282,9 @@ var reject = doParallel(reject$1);
* @method
* @see [async.reflect]{@link module:Utils.reflect}
* @category Util
- * @param {Array} tasks - The array of functions to wrap in `async.reflect`.
- * @returns {Array} Returns an array of functions, each function wrapped in
+ * @param {Array|Object|Iterable} tasks - The collection of
+ * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
+ * @returns {Array} Returns an array of async functions, each wrapped in
* `async.reflect`
* @example
*
@@ -4396,9 +4365,10 @@ function reflectAll(tasks) {
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} iteratee - An async truth test to apply to each item in
+ * `coll`.
+ * The should complete with a boolean value as its `result`.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
*/
@@ -4414,15 +4384,41 @@ var rejectLimit = doParallelLimit(reject$1);
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} iteratee - An async truth test to apply to each item in
+ * `coll`.
+ * The should complete with a boolean value as its `result`.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
*/
var rejectSeries = doLimit(rejectLimit, 1);
/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant$1(value) {
+ return function() {
+ return value;
+ };
+}
+
+/**
* Attempts to get a successful response from `task` no more than `times` times
* before returning an error. If the task is successful, the `callback` will be
* passed the result of the successful task. If all attempts fail, the callback
@@ -4433,6 +4429,7 @@ var rejectSeries = doLimit(rejectLimit, 1);
* @memberOf module:ControlFlow
* @method
* @category Control Flow
+ * @see [async.retryable]{@link module:ControlFlow.retryable}
* @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
* object with `times` and `interval` or a number.
* * `times` - The number of attempts to make before giving up. The default
@@ -4447,16 +4444,13 @@ var rejectSeries = doLimit(rejectLimit, 1);
* Invoked with (err).
* * If `opts` is a number, the number specifies the number of times to retry,
* with the default interval of `0`.
- * @param {Function} task - A function which receives two arguments: (1) a
- * `callback(err, result)` which must be called when finished, passing `err`
- * (which can be `null`) and the `result` of the function's execution, and (2)
- * a `results` object, containing the results of the previously executed
- * functions (if nested inside another control flow). Invoked with
- * (callback, results).
+ * @param {AsyncFunction} task - An async function to retry.
+ * Invoked with (callback).
* @param {Function} [callback] - An optional callback which is called when the
* task has succeeded, or after the final failed attempt. It receives the `err`
* and `result` arguments of the last attempt at completing the `task`. Invoked
* with (err, results).
+ *
* @example
*
* // The `retry` function can be used as a stand-alone control flow by passing
@@ -4502,7 +4496,7 @@ var rejectSeries = doLimit(rejectLimit, 1);
* // individual methods that are not as reliable, like this:
* async.auto({
* users: api.getUsers.bind(api),
- * payments: async.retry(3, api.getPayments.bind(api))
+ * payments: async.retryable(3, api.getPayments.bind(api))
* }, function(err, results) {
* // do something with the results
* });
@@ -4514,14 +4508,14 @@ function retry(opts, task, callback) {
var options = {
times: DEFAULT_TIMES,
- intervalFunc: constant(DEFAULT_INTERVAL)
+ intervalFunc: constant$1(DEFAULT_INTERVAL)
};
function parseTimes(acc, t) {
if (typeof t === 'object') {
acc.times = +t.times || DEFAULT_TIMES;
- acc.intervalFunc = typeof t.interval === 'function' ? t.interval : constant(+t.interval || DEFAULT_INTERVAL);
+ acc.intervalFunc = typeof t.interval === 'function' ? t.interval : constant$1(+t.interval || DEFAULT_INTERVAL);
acc.errorFilter = t.errorFilter;
} else if (typeof t === 'number' || typeof t === 'string') {
@@ -4543,9 +4537,11 @@ function retry(opts, task, callback) {
throw new Error("Invalid arguments for async.retry");
}
+ var _task = wrapAsync$1(task);
+
var attempt = 1;
function retryAttempt() {
- task(function (err) {
+ _task(function (err) {
if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) {
setTimeout(retryAttempt, options.intervalFunc(attempt));
} else {
@@ -4558,8 +4554,9 @@ function retry(opts, task, callback) {
}
/**
- * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it
- * retryable, rather than immediately calling it with retries.
+ * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method
+ * wraps a task and makes it retryable, rather than immediately calling it
+ * with retries.
*
* @name retryable
* @static
@@ -4569,9 +4566,12 @@ function retry(opts, task, callback) {
* @category Control Flow
* @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
* options, exactly the same as from `retry`
- * @param {Function} task - the asynchronous function to wrap
- * @returns {Functions} The wrapped function, which when invoked, will retry on
- * an error, based on the parameters specified in `opts`.
+ * @param {AsyncFunction} task - the asynchronous function to wrap.
+ * This function will be passed any arguments passed to the returned wrapper.
+ * Invoked with (...args, callback).
+ * @returns {AsyncFunction} The wrapped function, which when invoked, will
+ * retry on an error, based on the parameters specified in `opts`.
+ * This function will accept the same parameters as `task`.
* @example
*
* async.auto({
@@ -4586,9 +4586,10 @@ var retryable = function (opts, task) {
task = opts;
opts = null;
}
+ var _task = wrapAsync$1(task);
return initialParams(function (args, callback) {
function taskFn(cb) {
- task.apply(null, args.concat([cb]));
+ _task.apply(null, args.concat(cb));
}
if (opts) retry(opts, taskFn, callback);else retry(taskFn, callback);
@@ -4621,9 +4622,9 @@ var retryable = function (opts, task) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array|Iterable|Object} tasks - A collection containing functions to run, each
- * function is passed a `callback(err, result)` it must call on completion with
- * an error `err` (which can be `null`) and an optional `result` value.
+ * @param {Array|Iterable|Object} tasks - A collection containing
+ * [async functions]{@link AsyncFunction} to run in series.
+ * Each function can complete with any number of optional `result` values.
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed. This function gets a results array (or object)
* containing all the result arguments passed to the `task` callbacks. Invoked
@@ -4675,10 +4676,10 @@ function series(tasks, callback) {
* @alias any
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in the array
- * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
- * be called with a boolean argument once it has completed. Invoked with
- * (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collections in parallel.
+ * The iteratee should complete with a boolean `result` value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
@@ -4693,7 +4694,7 @@ function series(tasks, callback) {
* // if result is true then at least one of the files exists
* });
*/
-var some = _createTester(eachOf, Boolean, identity);
+var some = doParallel(_createTester(Boolean, identity));
/**
* The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
@@ -4707,16 +4708,16 @@ var some = _createTester(eachOf, Boolean, identity);
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A truth test to apply to each item in the array
- * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
- * be called with a boolean argument once it has completed. Invoked with
- * (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collections in parallel.
+ * The iteratee should complete with a boolean `result` value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
* tests. Invoked with (err, result).
*/
-var someLimit = _createTester(eachOfLimit, Boolean, identity);
+var someLimit = doParallelLimit(_createTester(Boolean, identity));
/**
* The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
@@ -4729,10 +4730,10 @@ var someLimit = _createTester(eachOfLimit, Boolean, identity);
* @alias anySeries
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in the array
- * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
- * be called with a boolean argument once it has completed. Invoked with
- * (item, callback).
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
+ * in the collections in series.
+ * The iteratee should complete with a boolean `result` value.
+ * Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
@@ -4750,10 +4751,11 @@ var someSeries = doLimit(someLimit, 1);
* @method
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A function to apply to each item in `coll`.
- * The iteratee is passed a `callback(err, sortValue)` which must be called once
- * it has completed with an error (which can be `null`) and a value to use as
- * the sort criteria. Invoked with (item, callback).
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with a value to use as the sort criteria as
+ * its `result`.
+ * Invoked with (item, callback).
* @param {Function} callback - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is the items
* from the original `coll` sorted by the values returned by the `iteratee`
@@ -4787,8 +4789,9 @@ var someSeries = doLimit(someLimit, 1);
* });
*/
function sortBy(coll, iteratee, callback) {
+ var _iteratee = wrapAsync$1(iteratee);
map(coll, function (x, callback) {
- iteratee(x, function (err, criteria) {
+ _iteratee(x, function (err, criteria) {
if (err) return callback(err);
callback(null, { value: x, criteria: criteria });
});
@@ -4814,14 +4817,13 @@ function sortBy(coll, iteratee, callback) {
* @memberOf module:Utils
* @method
* @category Util
- * @param {Function} asyncFn - The asynchronous function you want to set the
- * time limit.
+ * @param {AsyncFunction} asyncFn - The async function to limit in time.
* @param {number} milliseconds - The specified time limit.
* @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
* to timeout Error for more information..
- * @returns {Function} Returns a wrapped function that can be used with any of
- * the control flow functions. Invoke this function with the same
- * parameters as you would `asyncFunc`.
+ * @returns {AsyncFunction} Returns a wrapped function that can be used with any
+ * of the control flow functions.
+ * Invoke this function with the same parameters as you would `asyncFunc`.
* @example
*
* function myFunction(foo, callback) {
@@ -4868,11 +4870,13 @@ function timeout(asyncFn, milliseconds, info) {
originalCallback(error);
}
+ var fn = wrapAsync$1(asyncFn);
+
return initialParams(function (args, origCallback) {
originalCallback = origCallback;
// setup timer and call original function
timer = setTimeout(timeoutCallback, milliseconds);
- asyncFn.apply(null, args.concat(injectedCallback));
+ fn.apply(null, args.concat(injectedCallback));
});
}
@@ -4915,12 +4919,13 @@ function baseRange(start, end, step, fromRight) {
* @category Control Flow
* @param {number} count - The number of times to run the function.
* @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - The function to call `n` times. Invoked with the
- * iteration index and a callback (n, next).
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
+ * Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see [async.map]{@link module:Collections.map}.
*/
function timeLimit(count, limit, iteratee, callback) {
- mapLimit(baseRange(0, count, 1), limit, iteratee, callback);
+ var _iteratee = wrapAsync$1(iteratee);
+ mapLimit(baseRange(0, count, 1), limit, _iteratee, callback);
}
/**
@@ -4934,8 +4939,8 @@ function timeLimit(count, limit, iteratee, callback) {
* @see [async.map]{@link module:Collections.map}
* @category Control Flow
* @param {number} n - The number of times to run the function.
- * @param {Function} iteratee - The function to call `n` times. Invoked with the
- * iteration index and a callback (n, next).
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
+ * Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see {@link module:Collections.map}.
* @example
*
@@ -4967,8 +4972,8 @@ var times = doLimit(timeLimit, Infinity);
* @see [async.times]{@link module:ControlFlow.times}
* @category Control Flow
* @param {number} n - The number of times to run the function.
- * @param {Function} iteratee - The function to call `n` times. Invoked with the
- * iteration index and a callback (n, next).
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
+ * Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see {@link module:Collections.map}.
*/
var timesSeries = doLimit(timeLimit, 1);
@@ -4986,11 +4991,8 @@ var timesSeries = doLimit(timeLimit, 1);
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {*} [accumulator] - The initial state of the transform. If omitted,
* it will default to an empty Object or Array, depending on the type of `coll`
- * @param {Function} iteratee - A function applied to each item in the
- * collection that potentially modifies the accumulator. The `iteratee` is
- * passed a `callback(err)` which accepts an optional error as its first
- * argument. If an error is passed to the callback, the transform is stopped
- * and the main `callback` is immediately called with the error.
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
+ * collection that potentially modifies the accumulator.
* Invoked with (accumulator, item, key, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the transformed accumulator.
@@ -5019,15 +5021,16 @@ var timesSeries = doLimit(timeLimit, 1);
* })
*/
function transform(coll, accumulator, iteratee, callback) {
- if (arguments.length === 3) {
+ if (arguments.length <= 3) {
callback = iteratee;
iteratee = accumulator;
accumulator = isArray(coll) ? [] : {};
}
callback = once(callback || noop);
+ var _iteratee = wrapAsync$1(iteratee);
eachOf(coll, function (v, k, cb) {
- iteratee(accumulator, v, k, cb);
+ _iteratee(accumulator, v, k, cb);
}, function (err) {
callback(err, accumulator);
});
@@ -5043,8 +5046,8 @@ function transform(coll, accumulator, iteratee, callback) {
* @method
* @see [async.memoize]{@link module:Utils.memoize}
* @category Util
- * @param {Function} fn - the memoized function
- * @returns {Function} a function that calls the original unmemoized function
+ * @param {AsyncFunction} fn - the memoized function
+ * @returns {AsyncFunction} a function that calls the original unmemoized function
*/
function unmemoize(fn) {
return function () {
@@ -5063,9 +5066,8 @@ function unmemoize(fn) {
* @category Control Flow
* @param {Function} test - synchronous truth test to perform before each
* execution of `iteratee`. Invoked with ().
- * @param {Function} iteratee - A function which is called each time `test` passes.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
+ * @param {AsyncFunction} iteratee - An async function which is called each time
+ * `test` passes. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped. `callback`
* will be passed an error and any arguments passed to the final `iteratee`'s
@@ -5089,19 +5091,20 @@ function unmemoize(fn) {
*/
function whilst(test, iteratee, callback) {
callback = onlyOnce(callback || noop);
+ var _iteratee = wrapAsync$1(iteratee);
if (!test()) return callback(null);
- var next = baseRest$1(function (err, args) {
+ var next = rest(function (err, args) {
if (err) return callback(err);
- if (test()) return iteratee(next);
+ if (test()) return _iteratee(next);
callback.apply(null, [null].concat(args));
});
- iteratee(next);
+ _iteratee(next);
}
/**
- * Repeatedly call `fn` until `test` returns `true`. Calls `callback` when
+ * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
* stopped, or an error occurs. `callback` will be passed an error and any
- * arguments passed to the final `fn`'s callback.
+ * arguments passed to the final `iteratee`'s callback.
*
* The inverse of [whilst]{@link module:ControlFlow.whilst}.
*
@@ -5112,19 +5115,18 @@ function whilst(test, iteratee, callback) {
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
* @param {Function} test - synchronous truth test to perform before each
- * execution of `fn`. Invoked with ().
- * @param {Function} fn - A function which is called each time `test` fails.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
+ * execution of `iteratee`. Invoked with ().
+ * @param {AsyncFunction} iteratee - An async function which is called each time
+ * `test` fails. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
- * function has passed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `fn`'s
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
*/
-function until(test, fn, callback) {
+function until(test, iteratee, callback) {
whilst(function () {
return !test.apply(this, arguments);
- }, fn, callback);
+ }, iteratee, callback);
}
/**
@@ -5138,10 +5140,10 @@ function until(test, fn, callback) {
* @memberOf module:ControlFlow
* @method
* @category Control Flow
- * @param {Array} tasks - An array of functions to run, each function is passed
- * a `callback(err, result1, result2, ...)` it must call on completion. The
- * first argument is an error (which can be `null`) and any further arguments
- * will be passed as arguments in order to the next task.
+ * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
+ * to run.
+ * Each function should complete with any number of `result` values.
+ * The `result` values will be passed as arguments, in order, to the next task.
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed. This will be passed the results of the last task's
* callback. Invoked with (err, [results]).
@@ -5195,7 +5197,7 @@ var waterfall = function (tasks, callback) {
return callback.apply(null, [null].concat(args));
}
- var taskCallback = onlyOnce(baseRest$1(function (err, args) {
+ var taskCallback = onlyOnce(rest(function (err, args) {
if (err) {
return callback.apply(null, [err].concat(args));
}
@@ -5204,7 +5206,7 @@ var waterfall = function (tasks, callback) {
args.push(taskCallback);
- var task = tasks[taskIndex++];
+ var task = wrapAsync$1(tasks[taskIndex++]);
task.apply(null, args);
}
@@ -5212,11 +5214,51 @@ var waterfall = function (tasks, callback) {
};
/**
+ * An "async function" in the context of Async is an asynchronous function with
+ * a variable number of parameters, with the final parameter being a callback.
+ * (`function (arg1, arg2, ..., callback) {}`)
+ * The final callback is of the form `callback(err, results...)`, which must be
+ * called once the function is completed. The callback should be called with a
+ * Error as its first argument to signal that an error occurred.
+ * Otherwise, if no error occurred, it should be called with `null` as the first
+ * argument, and any additional `result` arguments that may apply, to signal
+ * successful completion.
+ * The callback must be called exactly once, ideally on a later tick of the
+ * JavaScript event loop.
+ *
+ * This type of function is also referred to as a "Node-style async function",
+ * or a "continuation passing-style function" (CPS). Most of the methods of this
+ * library are themselves CPS/Node-style async functions, or functions that
+ * return CPS/Node-style async functions.
+ *
+ * Wherever we accept a Node-style async function, we also directly accept an
+ * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
+ * In this case, the `async` function will not be passed a final callback
+ * argument, and any thrown error will be used as the `err` argument of the
+ * implicit callback, and the return value will be used as the `result` value.
+ * (i.e. a `rejected` of the returned Promise becomes the `err` callback
+ * argument, and a `resolved` value becomes the `result`.)
+ *
+ * Note, due to JavaScript limitations, we can only detect native `async`
+ * functions and not transpilied implementations.
+ * Your environment must have `async`/`await` support for this to work.
+ * (e.g. Node > v7.6, or a recent version of a modern browser).
+ * If you are using `async` functions through a transpiler (e.g. Babel), you
+ * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
+ * because the `async function` will be compiled to an ordinary function that
+ * returns a promise.
+ *
+ * @typedef {Function} AsyncFunction
+ * @static
+ */
+
+/**
* Async is a utility module which provides straight-forward, powerful functions
* for working with asynchronous JavaScript. Although originally designed for
* use with [Node.js](http://nodejs.org) and installable via
* `npm install --save async`, it can also be used directly in the browser.
* @module async
+ * @see AsyncFunction
*/
/**
@@ -5234,6 +5276,7 @@ var waterfall = function (tasks, callback) {
* A collection of `async` utility functions.
* @module Utils
*/
+
var index = {
applyEach: applyEach,
applyEachSeries: applyEachSeries,
@@ -5245,7 +5288,7 @@ var index = {
compose: compose,
concat: concat,
concatSeries: concatSeries,
- constant: constant$2,
+ constant: constant,
detect: detect,
detectLimit: detectLimit,
detectSeries: detectSeries,
@@ -5268,6 +5311,9 @@ var index = {
filterLimit: filterLimit,
filterSeries: filterSeries,
forever: forever,
+ groupBy: groupBy,
+ groupByLimit: groupByLimit,
+ groupBySeries: groupBySeries,
log: log,
map: map,
mapLimit: mapLimit,
@@ -5337,7 +5383,7 @@ exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
exports.concatSeries = concatSeries;
-exports.constant = constant$2;
+exports.constant = constant;
exports.detect = detect;
exports.detectLimit = detectLimit;
exports.detectSeries = detectSeries;
@@ -5360,6 +5406,9 @@ exports.filter = filter;
exports.filterLimit = filterLimit;
exports.filterSeries = filterSeries;
exports.forever = forever;
+exports.groupBy = groupBy;
+exports.groupByLimit = groupByLimit;
+exports.groupBySeries = groupBySeries;
exports.log = log;
exports.map = map;
exports.mapLimit = mapLimit;
diff --git a/node_modules/async/dist/async.min.js b/node_modules/async/dist/async.min.js
index 15c4a33d5..afd1022c1 100644
--- a/node_modules/async/dist/async.min.js
+++ b/node_modules/async/dist/async.min.js
@@ -1,2 +1,2 @@
-!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n){return n}function e(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function r(n,t,r){return t=ot(void 0===t?n.length-1:t,0),function(){for(var u=arguments,o=-1,i=ot(u.length-t,0),c=Array(i);++o<i;)c[o]=u[t+o];o=-1;for(var f=Array(t+1);++o<t;)f[o]=u[o];return f[t]=r(c),e(n,this,f)}}function u(n){return function(){return n}}function o(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function i(n){var t=o(n)?lt.call(n):"";return t==it||t==ct||t==ft}function c(n){return!!vt&&vt in n}function f(n){if(null!=n){try{return mt.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function a(n){if(!o(n)||c(n))return!1;var t=i(n)?wt:bt;return t.test(f(n))}function l(n,t){return null==n?void 0:n[t]}function s(n,t){var e=l(n,t);return a(e)?e:void 0}function p(n){var t=0,e=0;return function(){var r=_t(),u=At-(r-e);if(e=r,u>0){if(++t>=Lt)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function h(n,e){return Tt(r(n,e,t),n+"")}function y(n){return h(function(t,e){var r=Ft(function(e,r){var u=this;return n(t,function(n,t){n.apply(u,e.concat([t]))},r)});return e.length?r.apply(this,e):r})}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=It}function d(n){return null!=n&&v(n.length)&&!i(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function j(n){return null!=n&&"object"==typeof n}function S(n){return j(n)&&zt.call(n)==Mt}function k(){return!1}function O(n,t){return t=null==t?Jt:t,!!t&&("number"==typeof n||Kt.test(n))&&n>-1&&n%1==0&&n<t}function w(n){return j(n)&&v(n.length)&&!!Se[we.call(n)]}function x(n){return function(t){return n(t)}}function E(n,t){var e=qt(n),r=!e&&Dt(n),u=!e&&!r&&Ht(n),o=!e&&!r&&!u&&Fe(n),i=e||r||u||o,c=i?b(n.length,String):[],f=c.length;for(var a in n)!t&&!Be.call(n,a)||i&&("length"==a||u&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||O(a,f))||c.push(a);return c}function L(n){var t=n&&n.constructor,e="function"==typeof t&&t.prototype||$e;return n===e}function A(n,t){return function(e){return n(t(e))}}function _(n){if(!L(n))return Me(n);var t=[];for(var e in Object(n))ze.call(n,e)&&"constructor"!=e&&t.push(e);return t}function T(n){return d(n)?E(n):_(n)}function F(n){var t=-1,e=n.length;return function(){return++t<e?{value:n[t],key:t}:null}}function I(n){var t=-1;return function(){var e=n.next();return e.done?null:(t++,{value:e.value,key:t})}}function B(n){var t=T(n),e=-1,r=t.length;return function(){var u=t[++e];return e<r?{value:n[u],key:u}:null}}function $(n){if(d(n))return F(n);var t=$t(n);return t?I(t):B(n)}function M(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function P(n){return function(t,e,r){function u(n,t){if(f-=1,n)c=!0,r(n);else{if(t===Re||c&&f<=0)return c=!0,r(null);o()}}function o(){for(;f<n&&!c;){var t=i();if(null===t)return c=!0,void(f<=0&&r(null));f+=1,e(t.value,t.key,M(u))}}if(r=g(r||m),n<=0||!t)return r(null);var i=$(t),c=!1,f=0;o()}}function z(n,t,e,r){P(t)(n,e,r)}function R(n,t){return function(e,r,u){return n(e,t,r,u)}}function U(n,t,e){function r(n){n?e(n):++o===i&&e(null)}e=g(e||m);var u=0,o=0,i=n.length;for(0===i&&e(null);u<i;u++)t(n[u],u,M(r))}function V(n){return function(t,e,r){return n(Ve,t,e,r)}}function D(n,t,e,r){r=g(r||m),t=t||[];var u=[],o=0;n(t,function(n,t,r){var i=o++;e(n,function(n,t){u[i]=t,r(n)})},function(n){r(n,u)})}function q(n){return function(t,e,r,u){return n(P(e),t,r,u)}}function C(n){return Ft(function(t,e){var r;try{r=n.apply(this,t)}catch(n){return e(n)}o(r)&&"function"==typeof r.then?r.then(function(n){e(null,n)},function(n){e(n.message?n:new Error(n))}):e(null,r)})}function W(n,t){for(var e=-1,r=n?n.length:0;++e<r&&t(n[e],e,n)!==!1;);return n}function Q(n){return function(t,e,r){for(var u=-1,o=Object(t),i=r(t),c=i.length;c--;){var f=i[n?c:++u];if(e(o[f],f,o)===!1)break}return t}}function G(n,t){return n&&Ne(n,t,T)}function N(n,t,e,r){for(var u=n.length,o=e+(r?1:-1);r?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function H(n){return n!==n}function J(n,t,e){for(var r=e-1,u=n.length;++r<u;)if(n[r]===t)return r;return-1}function K(n,t,e){return t===t?J(n,t,e):N(n,H,e)}function X(n,t){for(var e=-1,r=n?n.length:0,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function Y(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}function Z(n){return"symbol"==typeof n||j(n)&&Ye.call(n)==Ke}function nn(n){if("string"==typeof n)return n;if(qt(n))return X(n,nn)+"";if(Z(n))return tr?tr.call(n):"";var t=n+"";return"0"==t&&1/n==-Ze?"-0":t}function tn(n,t,e){var r=-1,u=n.length;t<0&&(t=-t>u?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(u);++r<u;)o[r]=n[r+t];return o}function en(n,t,e){var r=n.length;return e=void 0===e?r:e,!t&&e>=r?n:tn(n,t,e)}function rn(n,t){for(var e=n.length;e--&&K(t,n[e],0)>-1;);return e}function un(n,t){for(var e=-1,r=n.length;++e<r&&K(t,n[e],0)>-1;);return e}function on(n){return n.split("")}function cn(n){return cr.test(n)}function fn(n){return n.match(xr)||[]}function an(n){return cn(n)?fn(n):on(n)}function ln(n){return null==n?"":nn(n)}function sn(n,t,e){if(n=ln(n),n&&(e||void 0===t))return n.replace(Er,"");if(!n||!(t=nn(t)))return n;var r=an(n),u=an(t),o=un(r,u),i=rn(r,u)+1;return en(r,o,i).join("")}function pn(n){return n=n.toString().replace(Tr,""),n=n.match(Lr)[2].replace(" ",""),n=n?n.split(Ar):[],n=n.map(function(n){return sn(n.replace(_r,""))})}function hn(n,t){var e={};G(n,function(n,t){function r(t,e){var r=X(u,function(n){return t[n]});r.push(e),n.apply(null,r)}var u;if(qt(n))u=Y(n),n=u.pop(),e[t]=u.concat(u.length>0?r:n);else if(1===n.length)e[t]=n;else{if(u=pn(n),0===n.length&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");u.pop(),e[t]=u.concat(r)}}),He(e,t)}function yn(n){setTimeout(n,0)}function vn(n){return h(function(t,e){n(function(){t.apply(null,e)})})}function dn(){this.head=this.tail=null,this.length=0}function mn(n,t){n.length=1,n.head=n.tail=t}function gn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(c.started=!0,qt(n)||(n=[n]),0===n.length&&c.idle())return Br(function(){c.drain()});for(var r=0,u=n.length;r<u;r++){var o={data:n[r],callback:e||m};t?c._tasks.unshift(o):c._tasks.push(o)}Br(c.process)}function u(n){return h(function(t){o-=1;for(var e=0,r=n.length;e<r;e++){var u=n[e],f=K(i,u,0);f>=0&&i.splice(f),u.callback.apply(u,t),null!=t[0]&&c.error(t[0],u.data)}o<=c.concurrency-c.buffer&&c.unsaturated(),c.idle()&&c.drain(),c.process()})}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=0,i=[],c={_tasks:new dn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){c.drain=m,c._tasks.empty()},unshift:function(n,t){r(n,!0,t)},process:function(){for(;!c.paused&&o<c.concurrency&&c._tasks.length;){var t=[],e=[],r=c._tasks.length;c.payload&&(r=Math.min(r,c.payload));for(var f=0;f<r;f++){var a=c._tasks.shift();t.push(a),e.push(a.data)}0===c._tasks.length&&c.empty(),o+=1,i.push(t[0]),o===c.concurrency&&c.saturated();var l=M(u(t));n(e,l)}},length:function(){return c._tasks.length},running:function(){return o},workersList:function(){return i},idle:function(){return c._tasks.length+o===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var n=Math.min(c.concurrency,c._tasks.length),t=1;t<=n;t++)Br(c.process)}}};return c}function bn(n,t){return gn(n,1,t)}function jn(n,t,e,r){r=g(r||m),Mr(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})}function Sn(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function kn(n){return function(t,e,r){return n(Mr,t,e,r)}}function On(n,t,e){return function(r,u,o,i){function c(){i&&i(null,e(!1))}function f(n,r,u){return i?void o(n,function(r,c){i&&(r||t(c))?(r?i(r):i(r,e(!0,n)),i=o=!1,u(r,Re)):u()}):u()}arguments.length>3?(i=i||m,n(r,u,f,c)):(i=o,i=i||m,o=u,n(r,f,c))}}function wn(n,t){return t}function xn(n){return h(function(t,e){t.apply(null,e.concat([h(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&W(e,function(t){console[n](t)}))})]))})}function En(n,t,e){function r(t,r){return t?e(t):r?void n(u):e(null)}e=M(e||m);var u=h(function(n,u){return n?e(n):(u.push(r),void t.apply(this,u))});r(null,!0)}function Ln(n,t,e){e=M(e||m);var r=h(function(u,o){return u?e(u):t.apply(this,o)?n(r):void e.apply(null,[null].concat(o))});n(r)}function An(n,t,e){Ln(n,function(){return!t.apply(this,arguments)},e)}function _n(n,t,e){function r(t){return t?e(t):void n(u)}function u(n,u){return n?e(n):u?void t(r):e(null)}e=M(e||m),n(u)}function Tn(n){return function(t,e,r){return n(t,r)}}function Fn(n,t,e){Ve(n,Tn(t),e)}function In(n,t,e,r){P(t)(n,Tn(e),r)}function Bn(n){return Ft(function(t,e){var r=!0;t.push(function(){var n=arguments;r?Br(function(){e.apply(null,n)}):e.apply(null,n)}),n.apply(this,t),r=!1})}function $n(n){return!n}function Mn(n){return function(t){return null==t?void 0:t[n]}}function Pn(n,t,e,r){r=g(r||m);var u=[];n(t,function(n,t,r){e(n,function(e,o){e?r(e):(o&&u.push({index:t,value:n}),r())})},function(n){n?r(n):r(null,X(u.sort(function(n,t){return n.index-t.index}),Mn("value")))})}function zn(n,t){function e(n){return n?r(n):void u(e)}var r=M(t||m),u=Bn(n);e()}function Rn(n,t,e,r){r=g(r||m);var u={};z(n,t,function(n,t,r){e(n,t,function(n,e){return n?r(n):(u[t]=e,void r())})},function(n){r(n,u)})}function Un(n,t){return t in n}function Vn(n,e){var r=Object.create(null),u=Object.create(null);e=e||t;var o=Ft(function(t,o){var i=e.apply(null,t);Un(r,i)?Br(function(){o.apply(null,r[i])}):Un(u,i)?u[i].push(o):(u[i]=[o],n.apply(null,t.concat([h(function(n){r[i]=n;var t=u[i];delete u[i];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o}function Dn(n,t,e){e=e||m;var r=d(t)?[]:{};n(t,function(n,t,e){n(h(function(n,u){u.length<=1&&(u=u[0]),r[t]=u,e(n)}))},function(n){e(n,r)})}function qn(n,t){Dn(Ve,n,t)}function Cn(n,t,e){Dn(P(t),n,e)}function Wn(n,t){if(t=g(t||m),!qt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;e<r;e++)n[e](t)}function Qn(n,t,e,r){var u=uu.call(n).reverse();jn(u,t,e,r)}function Gn(n){return Ft(function(t,e){return t.push(h(function(n,t){if(n)e(null,{error:n});else{var r=null;1===t.length?r=t[0]:t.length>1&&(r=t),e(null,{value:r})}})),n.apply(this,t)})}function Nn(n,t,e,r){Pn(n,t,function(n,t){e(n,function(n,e){n?t(n):t(null,!e)})},r)}function Hn(n){var t;return qt(n)?t=X(n,Gn):(t={},G(n,function(n,e){t[e]=Gn.call(this,n)})),t}function Jn(n,t,e){function r(n,t){if("object"==typeof t)n.times=+t.times||i,n.intervalFunc="function"==typeof t.interval?t.interval:u(+t.interval||c),n.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||i}}function o(){t(function(n){n&&a++<f.times&&("function"!=typeof f.errorFilter||f.errorFilter(n))?setTimeout(o,f.intervalFunc(a)):e.apply(null,arguments)})}var i=5,c=0,f={times:i,intervalFunc:u(c)};if(arguments.length<3&&"function"==typeof n?(e=t||m,t=n):(r(f,n),e=e||m),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var a=1;o()}function Kn(n,t){Dn(Mr,n,t)}function Xn(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}De(n,function(n,e){t(n,function(t,r){return t?e(t):void e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,X(t.sort(r),Mn("value")))})}function Yn(n,t,e){function r(){c||(o.apply(null,arguments),clearTimeout(i))}function u(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),c=!0,o(r)}var o,i,c=!1;return Ft(function(e,c){o=c,i=setTimeout(u,t),n.apply(null,e.concat(r))})}function Zn(n,t,e,r){for(var u=-1,o=hu(pu((t-n)/(e||1)),0),i=Array(o);o--;)i[r?o:++u]=n,n+=e;return i}function nt(n,t,e,r){Ce(Zn(0,n,1),t,e,r)}function tt(n,t,e,r){3===arguments.length&&(r=e,e=t,t=qt(n)?[]:{}),r=g(r||m),Ve(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,t,e){if(e=M(e||m),!n())return e(null);var r=h(function(u,o){return u?e(u):n()?t(r):void e.apply(null,[null].concat(o))});t(r)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var ot=Math.max,it="[object Function]",ct="[object GeneratorFunction]",ft="[object Proxy]",at=Object.prototype,lt=at.toString,st="object"==typeof global&&global&&global.Object===Object&&global,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=st||pt||Function("return this")(),yt=ht["__core-js_shared__"],vt=function(){var n=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),dt=Function.prototype,mt=dt.toString,gt=/[\\^$.*+?()[\]{}|]/g,bt=/^\[object .+?Constructor\]$/,jt=Function.prototype,St=Object.prototype,kt=jt.toString,Ot=St.hasOwnProperty,wt=RegExp("^"+kt.call(Ot).replace(gt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xt=function(){try{var n=s(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),Et=xt?function(n,t){return xt(n,"toString",{configurable:!0,enumerable:!1,value:u(t),writable:!0})}:t,Lt=500,At=16,_t=Date.now,Tt=p(Et),Ft=function(n){return h(function(t){var e=t.pop();n.call(this,t,e)})},It=9007199254740991,Bt="function"==typeof Symbol&&Symbol.iterator,$t=function(n){return Bt&&n[Bt]&&n[Bt]()},Mt="[object Arguments]",Pt=Object.prototype,zt=Pt.toString,Rt=Object.prototype,Ut=Rt.hasOwnProperty,Vt=Rt.propertyIsEnumerable,Dt=S(function(){return arguments}())?S:function(n){return j(n)&&Ut.call(n,"callee")&&!Vt.call(n,"callee")},qt=Array.isArray,Ct="object"==typeof n&&n&&!n.nodeType&&n,Wt=Ct&&"object"==typeof module&&module&&!module.nodeType&&module,Qt=Wt&&Wt.exports===Ct,Gt=Qt?ht.Buffer:void 0,Nt=Gt?Gt.isBuffer:void 0,Ht=Nt||k,Jt=9007199254740991,Kt=/^(?:0|[1-9]\d*)$/,Xt="[object Arguments]",Yt="[object Array]",Zt="[object Boolean]",ne="[object Date]",te="[object Error]",ee="[object Function]",re="[object Map]",ue="[object Number]",oe="[object Object]",ie="[object RegExp]",ce="[object Set]",fe="[object String]",ae="[object WeakMap]",le="[object ArrayBuffer]",se="[object DataView]",pe="[object Float32Array]",he="[object Float64Array]",ye="[object Int8Array]",ve="[object Int16Array]",de="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",be="[object Uint16Array]",je="[object Uint32Array]",Se={};Se[pe]=Se[he]=Se[ye]=Se[ve]=Se[de]=Se[me]=Se[ge]=Se[be]=Se[je]=!0,Se[Xt]=Se[Yt]=Se[le]=Se[Zt]=Se[se]=Se[ne]=Se[te]=Se[ee]=Se[re]=Se[ue]=Se[oe]=Se[ie]=Se[ce]=Se[fe]=Se[ae]=!1;var ke,Oe=Object.prototype,we=Oe.toString,xe="object"==typeof n&&n&&!n.nodeType&&n,Ee=xe&&"object"==typeof module&&module&&!module.nodeType&&module,Le=Ee&&Ee.exports===xe,Ae=Le&&st.process,_e=function(){try{return Ae&&Ae.binding("util")}catch(n){}}(),Te=_e&&_e.isTypedArray,Fe=Te?x(Te):w,Ie=Object.prototype,Be=Ie.hasOwnProperty,$e=Object.prototype,Me=A(Object.keys,Object),Pe=Object.prototype,ze=Pe.hasOwnProperty,Re={},Ue=R(z,1/0),Ve=function(n,t,e){var r=d(n)?U:Ue;r(n,t,e)},De=V(D),qe=y(De),Ce=q(D),We=R(Ce,1),Qe=y(We),Ge=h(function(n,t){return h(function(e){return n.apply(null,t.concat(e))})}),Ne=Q(),He=function(n,t,e){function r(n,t){b.push(function(){c(n,t)})}function u(){if(0===b.length&&0===y)return e(null,p);for(;b.length&&y<t;){var n=b.shift();n()}}function o(n,t){var e=d[n];e||(e=d[n]=[]),e.push(t)}function i(n){var t=d[n]||[];W(t,function(n){n()}),u()}function c(n,t){if(!v){var r=M(h(function(t,r){if(y--,r.length<=1&&(r=r[0]),t){var u={};G(p,function(n,t){u[t]=n}),u[n]=r,v=!0,d=[],e(t,u)}else p[n]=r,i(n)}));y++;var u=t[t.length-1];t.length>1?u(p,r):u(r)}}function f(){for(var n,t=0;j.length;)n=j.pop(),t++,W(a(n),function(n){0===--S[n]&&j.push(n)});if(t!==s)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function a(t){var e=[];return G(n,function(n,r){qt(n)&&K(n,t,0)>=0&&e.push(r)}),e}"function"==typeof t&&(e=t,t=null),e=g(e||m);var l=T(n),s=l.length;if(!s)return e(null);t||(t=s);var p={},y=0,v=!1,d={},b=[],j=[],S={};G(n,function(t,e){if(!qt(t))return r(e,[t]),void j.push(e);var u=t.slice(0,t.length-1),i=u.length;return 0===i?(r(e,t),void j.push(e)):(S[e]=i,void W(u,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency in "+u.join(", "));o(c,function(){i--,0===i&&r(e,t)})}))}),f(),u()},Je=ht.Symbol,Ke="[object Symbol]",Xe=Object.prototype,Ye=Xe.toString,Ze=1/0,nr=Je?Je.prototype:void 0,tr=nr?nr.toString:void 0,er="\\ud800-\\udfff",rr="\\u0300-\\u036f\\ufe20-\\ufe23",ur="\\u20d0-\\u20f0",or="\\ufe0e\\ufe0f",ir="\\u200d",cr=RegExp("["+ir+er+rr+ur+or+"]"),fr="\\ud800-\\udfff",ar="\\u0300-\\u036f\\ufe20-\\ufe23",lr="\\u20d0-\\u20f0",sr="\\ufe0e\\ufe0f",pr="["+fr+"]",hr="["+ar+lr+"]",yr="\\ud83c[\\udffb-\\udfff]",vr="(?:"+hr+"|"+yr+")",dr="[^"+fr+"]",mr="(?:\\ud83c[\\udde6-\\uddff]){2}",gr="[\\ud800-\\udbff][\\udc00-\\udfff]",br="\\u200d",jr=vr+"?",Sr="["+sr+"]?",kr="(?:"+br+"(?:"+[dr,mr,gr].join("|")+")"+Sr+jr+")*",Or=Sr+jr+kr,wr="(?:"+[dr+hr+"?",hr,mr,gr,pr].join("|")+")",xr=RegExp(yr+"(?="+yr+")|"+wr+Or,"g"),Er=/^\s+|\s+$/g,Lr=/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,Ar=/,/,_r=/(=.+)?(\s*)$/,Tr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Fr="function"==typeof setImmediate&&setImmediate,Ir="object"==typeof process&&"function"==typeof process.nextTick;ke=Fr?setImmediate:Ir?process.nextTick:yn;var Br=vn(ke);dn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},dn.prototype.empty=dn,dn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},dn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},dn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):mn(this,n)},dn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):mn(this,n)},dn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},dn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)};var $r,Mr=R(z,1),Pr=h(function(n){return h(function(t){var e=this,r=t[t.length-1];"function"==typeof r?t.pop():r=m,jn(n,t,function(n,t,r){t.apply(e,n.concat([h(function(n,t){r(n,t)})]))},function(n,t){r.apply(e,[n].concat(t))})})}),zr=h(function(n){return Pr.apply(null,n.reverse())}),Rr=V(Sn),Ur=kn(Sn),Vr=h(function(n){var t=[null].concat(n);return Ft(function(n,e){return e.apply(this,t)})}),Dr=On(Ve,t,wn),qr=On(z,t,wn),Cr=On(Mr,t,wn),Wr=xn("dir"),Qr=R(In,1),Gr=On(Ve,$n,$n),Nr=On(z,$n,$n),Hr=R(Nr,1),Jr=V(Pn),Kr=q(Pn),Xr=R(Kr,1),Yr=xn("log"),Zr=R(Rn,1/0),nu=R(Rn,1);$r=Ir?process.nextTick:Fr?setImmediate:yn;var tu=vn($r),eu=function(n,t){return gn(function(t,e){n(t[0],e)},t,1)},ru=function(n,t){var e=eu(n,t);return e.push=function(n,t,r){if(null==r&&(r=m),"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,qt(n)||(n=[n]),0===n.length)return Br(function(){e.drain()});t=t||0;for(var u=e._tasks.head;u&&t>=u.priority;)u=u.next;for(var o=0,i=n.length;o<i;o++){var c={data:n[o],priority:t,callback:r};u?e._tasks.insertBefore(u,c):e._tasks.push(c)}Br(e.process)},delete e.unshift,e},uu=Array.prototype.slice,ou=V(Nn),iu=q(Nn),cu=R(iu,1),fu=function(n,t){return t||(t=n,n=null),Ft(function(e,r){function u(n){t.apply(null,e.concat([n]))}n?Jn(n,u,r):Jn(u,r)})},au=On(Ve,Boolean,t),lu=On(z,Boolean,t),su=R(lu,1),pu=Math.ceil,hu=Math.max,yu=R(nt,1/0),vu=R(nt,1),du=function(n,t){function e(u){if(r===n.length)return t.apply(null,[null].concat(u));var o=M(h(function(n,r){return n?t.apply(null,[n].concat(r)):void e(r)}));u.push(o);var i=n[r++];i.apply(null,u)}if(t=g(t||m),!qt(n))return t(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return t();var r=0;e([])},mu={applyEach:qe,applyEachSeries:Qe,apply:Ge,asyncify:C,auto:He,autoInject:hn,cargo:bn,compose:zr,concat:Rr,concatSeries:Ur,constant:Vr,detect:Dr,detectLimit:qr,detectSeries:Cr,dir:Wr,doDuring:En,doUntil:An,doWhilst:Ln,during:_n,each:Fn,eachLimit:In,eachOf:Ve,eachOfLimit:z,eachOfSeries:Mr,eachSeries:Qr,ensureAsync:Bn,every:Gr,everyLimit:Nr,everySeries:Hr,filter:Jr,filterLimit:Kr,filterSeries:Xr,forever:zn,log:Yr,map:De,mapLimit:Ce,mapSeries:We,mapValues:Zr,mapValuesLimit:Rn,mapValuesSeries:nu,memoize:Vn,nextTick:tu,parallel:qn,parallelLimit:Cn,priorityQueue:ru,queue:eu,race:Wn,reduce:jn,reduceRight:Qn,reflect:Gn,reflectAll:Hn,reject:ou,rejectLimit:iu,rejectSeries:cu,retry:Jn,retryable:fu,seq:Pr,series:Kn,setImmediate:Br,some:au,someLimit:lu,someSeries:su,sortBy:Xn,timeout:Yn,times:yu,timesLimit:nt,timesSeries:vu,transform:tt,unmemoize:et,until:ut,waterfall:du,whilst:rt,all:Gr,any:au,forEach:Fn,forEachSeries:Qr,forEachLimit:In,forEachOf:Ve,forEachOfSeries:Mr,forEachOfLimit:z,inject:jn,foldl:jn,foldr:Qn,select:Jr,selectLimit:Kr,selectSeries:Xr,wrapSync:C};n.default=mu,n.applyEach=qe,n.applyEachSeries=Qe,n.apply=Ge,n.asyncify=C,n.auto=He,n.autoInject=hn,n.cargo=bn,n.compose=zr,n.concat=Rr,n.concatSeries=Ur,n.constant=Vr,n.detect=Dr,n.detectLimit=qr,n.detectSeries=Cr,n.dir=Wr,n.doDuring=En,n.doUntil=An,n.doWhilst=Ln,n.during=_n,n.each=Fn,n.eachLimit=In,n.eachOf=Ve,n.eachOfLimit=z,n.eachOfSeries=Mr,n.eachSeries=Qr,n.ensureAsync=Bn,n.every=Gr,n.everyLimit=Nr,n.everySeries=Hr,n.filter=Jr,n.filterLimit=Kr,n.filterSeries=Xr,n.forever=zn,n.log=Yr,n.map=De,n.mapLimit=Ce,n.mapSeries=We,n.mapValues=Zr,n.mapValuesLimit=Rn,n.mapValuesSeries=nu,n.memoize=Vn,n.nextTick=tu,n.parallel=qn,n.parallelLimit=Cn,n.priorityQueue=ru,n.queue=eu,n.race=Wn,n.reduce=jn,n.reduceRight=Qn,n.reflect=Gn,n.reflectAll=Hn,n.reject=ou,n.rejectLimit=iu,n.rejectSeries=cu,n.retry=Jn,n.retryable=fu,n.seq=Pr,n.series=Kn,n.setImmediate=Br,n.some=au,n.someLimit=lu,n.someSeries=su,n.sortBy=Xn,n.timeout=Yn,n.times=yu,n.timesLimit=nt,n.timesSeries=vu,n.transform=tt,n.unmemoize=et,n.until=ut,n.waterfall=du,n.whilst=rt,n.all=Gr,n.allLimit=Nr,n.allSeries=Hr,n.any=au,n.anyLimit=lu,n.anySeries=su,n.find=Dr,n.findLimit=qr,n.findSeries=Cr,n.forEach=Fn,n.forEachSeries=Qr,n.forEachLimit=In,n.forEachOf=Ve,n.forEachOfSeries=Mr,n.forEachOfLimit=z,n.inject=jn,n.foldl=jn,n.foldr=Qn,n.select=Jr,n.selectLimit=Kr,n.selectSeries=Xr,n.wrapSync=C,Object.defineProperty(n,"__esModule",{value:!0})});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.async=e.async||{})}(this,function(exports){"use strict";function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function overRest$1(e,t,r){return t=nativeMax(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=nativeMax(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),apply(e,this,s)}}function identity(e){return e}function rest(e,t){return overRest$1(e,t,identity)}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function asyncify(e){return initialParams(function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}isObject(n)&&"function"==typeof n.then?n.then(function(e){r(null,e)},function(e){r(e.message?e:new Error(e))}):r(null,n)})}function supportsAsync(){var supported;try{supported=isAsync(eval("(async function () {})"))}catch(e){supported=!1}return supported}function isAsync(e){return supportsSymbol&&"AsyncFunction"===e[Symbol.toStringTag]}function wrapAsync(e){return isAsync(e)?asyncify(e):e}function applyEach$1(e){return rest(function(t,r){var n=initialParams(function(r,n){var o=this;return e(t,function(e,t){wrapAsync$1(e).apply(o,r.concat(t))},n)});return r.length?n.apply(this,r):n})}function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch(e){}var o=nativeObjectToString.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}function objectToString(e){return nativeObjectToString$1.call(e)}function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:(e=Object(e),symToStringTag&&symToStringTag in e?getRawTag(e):objectToString(e))}function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function noop(){}function once(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}function baseTimes(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function isObjectLike(e){return null!=e&&"object"==typeof e}function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==argsTag}function stubFalse(){return!1}function isIndex(e,t){return t=null==t?MAX_SAFE_INTEGER$1:t,!!t&&("number"==typeof e||reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseUnary(e){return function(t){return e(t)}}function arrayLikeKeys(e,t){var r=isArray(e),n=!r&&isArguments(e),o=!r&&!n&&isBuffer(e),i=!r&&!n&&!o&&isTypedArray(e),a=r||n||o||i,s=a?baseTimes(e.length,String):[],c=s.length;for(var u in e)!t&&!hasOwnProperty$1.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||isIndex(u,c))||s.push(u);return s}function isPrototype(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||objectProto$5;return e===r}function overArg(e,t){return function(r){return e(t(r))}}function baseKeys(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$3.call(e,r)&&"constructor"!=r&&t.push(r);return t}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function createArrayIterator(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function createES2015Iterator(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}function createObjectIterator(e){var t=keys(e),r=-1,n=t.length;return function(){var o=t[++r];return r<n?{value:e[o],key:o}:null}}function iterator(e){if(isArrayLike(e))return createArrayIterator(e);var t=getIterator(e);return t?createES2015Iterator(t):createObjectIterator(e)}function onlyOnce(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}}function _eachOfLimit(e){return function(t,r,n){function o(e,t){if(c-=1,e)s=!0,n(e);else{if(t===breakLoop||s&&c<=0)return s=!0,n(null);i()}}function i(){for(;c<e&&!s;){var t=a();if(null===t)return s=!0,void(c<=0&&n(null));c+=1,r(t.value,t.key,onlyOnce(o))}}if(n=once(n||noop),e<=0||!t)return n(null);var a=iterator(t),s=!1,c=0;i()}}function eachOfLimit(e,t,r,n){_eachOfLimit(t)(e,wrapAsync$1(r),n)}function doLimit(e,t){return function(r,n,o){return e(r,t,n,o)}}function eachOfArrayLike(e,t,r){function n(e,t){e?r(e):++i!==a&&t!==breakLoop||r(null)}r=once(r||noop);var o=0,i=0,a=e.length;for(0===a&&r(null);o<a;o++)t(e[o],o,onlyOnce(n))}function doParallel(e){return function(t,r,n){return e(eachOf,t,wrapAsync$1(r),n)}}function _asyncMap(e,t,r,n){n=n||noop,t=t||[];var o=[],i=0,a=wrapAsync$1(r);e(t,function(e,t,r){var n=i++;a(e,function(e,t){o[n]=t,r(e)})},function(e){n(e,o)})}function doParallelLimit(e){return function(t,r,n,o){return e(_eachOfLimit(r),t,wrapAsync$1(n),o)}}function arrayEach(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function createBaseFor(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(r(i[c],c,i)===!1)break}return t}}function baseForOwn(e,t){return e&&baseFor(e,t,keys)}function baseFindIndex(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function baseIsNaN(e){return e!==e}function strictIndexOf(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function baseIndexOf(e,t,r){return t===t?strictIndexOf(e,t,r):baseFindIndex(e,baseIsNaN,r)}function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==symbolTag}function baseToString(e){if("string"==typeof e)return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}function baseSlice(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function castSlice(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:baseSlice(e,t,r)}function charsEndIndex(e,t){for(var r=e.length;r--&&baseIndexOf(t,e[r],0)>-1;);return r}function charsStartIndex(e,t){for(var r=-1,n=e.length;++r<n&&baseIndexOf(t,e[r],0)>-1;);return r}function asciiToArray(e){return e.split("")}function hasUnicode(e){return reHasUnicode.test(e)}function unicodeToArray(e){return e.match(reUnicode)||[]}function stringToArray(e){return hasUnicode(e)?unicodeToArray(e):asciiToArray(e)}function toString(e){return null==e?"":baseToString(e)}function trim(e,t,r){if(e=toString(e),e&&(r||void 0===t))return e.replace(reTrim,"");if(!e||!(t=baseToString(t)))return e;var n=stringToArray(e),o=stringToArray(t),i=charsStartIndex(n,o),a=charsEndIndex(n,o)+1;return castSlice(n,i,a).join("")}function parseParams(e){return e=e.toString().replace(STRIP_COMMENTS,""),e=e.match(FN_ARGS)[2].replace(" ",""),e=e?e.split(FN_ARG_SPLIT):[],e=e.map(function(e){return trim(e.replace(FN_ARG,""))})}function autoInject(e,t){var r={};baseForOwn(e,function(e,t){function n(t,r){var n=arrayMap(o,function(e){return t[e]});n.push(r),wrapAsync$1(e).apply(null,n)}var o,i=isAsync(e),a=!i&&1===e.length||i&&0===e.length;if(isArray(e))o=e.slice(0,-1),e=e[e.length-1],r[t]=o.concat(o.length>0?n:e);else if(a)r[t]=e;else{if(o=parseParams(e),0===e.length&&!i&&0===o.length)throw new Error("autoInject task functions require explicit parameters.");i||o.pop(),r[t]=o.concat(n)}}),auto(r,t)}function fallback(e){setTimeout(e,0)}function wrap(e){return rest(function(t,r){e(function(){t.apply(null,r)})})}function DLL(){this.head=this.tail=null,this.length=0}function setInitial(e,t){e.length=1,e.head=e.tail=t}function queue(e,t,r){function n(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(u.started=!0,isArray(e)||(e=[e]),0===e.length&&u.idle())return setImmediate$1(function(){u.drain()});for(var n=0,o=e.length;n<o;n++){var i={data:e[n],callback:r||noop};t?u._tasks.unshift(i):u._tasks.push(i)}setImmediate$1(u.process)}function o(e){return rest(function(t){a-=1;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=baseIndexOf(s,o,0);i>=0&&s.splice(i),o.callback.apply(o,t),null!=t[0]&&u.error(t[0],o.data)}a<=u.concurrency-u.buffer&&u.unsaturated(),u.idle()&&u.drain(),u.process()})}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var i=wrapAsync$1(e),a=0,s=[],c=!1,u={_tasks:new DLL,concurrency:t,payload:r,saturated:noop,unsaturated:noop,buffer:t/4,empty:noop,drain:noop,error:noop,started:!1,paused:!1,push:function(e,t){n(e,!1,t)},kill:function(){u.drain=noop,u._tasks.empty()},unshift:function(e,t){n(e,!0,t)},process:function(){if(!c){for(c=!0;!u.paused&&a<u.concurrency&&u._tasks.length;){var e=[],t=[],r=u._tasks.length;u.payload&&(r=Math.min(r,u.payload));for(var n=0;n<r;n++){var l=u._tasks.shift();e.push(l),t.push(l.data)}0===u._tasks.length&&u.empty(),a+=1,s.push(e[0]),a===u.concurrency&&u.saturated();var f=onlyOnce(o(e));i(t,f)}c=!1}},length:function(){return u._tasks.length},running:function(){return a},workersList:function(){return s},idle:function(){return u._tasks.length+a===0},pause:function(){u.paused=!0},resume:function(){u.paused!==!1&&(u.paused=!1,setImmediate$1(u.process))}};return u}function cargo(e,t){return queue(e,1,t)}function reduce(e,t,r,n){n=once(n||noop);var o=wrapAsync$1(r);eachOfSeries(e,function(e,r,n){o(t,e,function(e,r){t=r,n(e)})},function(e){n(e,t)})}function concat$1(e,t,r,n){var o=[];e(t,function(e,t,n){r(e,function(e,t){o=o.concat(t||[]),n(e)})},function(e){n(e,o)})}function doSeries(e){return function(t,r,n){return e(eachOfSeries,t,wrapAsync$1(r),n)}}function _createTester(e,t){return function(r,n,o,i){i=i||noop;var a,s=!1;r(n,function(r,n,i){o(r,function(n,o){n?i(n):e(o)&&!a?(s=!0,a=t(!0,r),i(null,breakLoop)):i()})},function(e){e?i(e):i(null,s?a:t(!1))})}}function _findGetResult(e,t){return t}function consoleFunc(e){return rest(function(t,r){wrapAsync$1(t).apply(null,r.concat(rest(function(t,r){"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&arrayEach(r,function(t){console[e](t)}))})))})}function doDuring(e,t,r){function n(e,t){return e?r(e):t?void o(a):r(null)}r=onlyOnce(r||noop);var o=wrapAsync$1(e),i=wrapAsync$1(t),a=rest(function(e,t){return e?r(e):(t.push(n),void i.apply(this,t))});n(null,!0)}function doWhilst(e,t,r){r=onlyOnce(r||noop);var n=wrapAsync$1(e),o=rest(function(e,i){return e?r(e):t.apply(this,i)?n(o):void r.apply(null,[null].concat(i))});n(o)}function doUntil(e,t,r){doWhilst(e,function(){return!t.apply(this,arguments)},r)}function during(e,t,r){function n(e){return e?r(e):void a(o)}function o(e,t){return e?r(e):t?void i(n):r(null)}r=onlyOnce(r||noop);var i=wrapAsync$1(t),a=wrapAsync$1(e);a(o)}function _withoutIndex(e){return function(t,r,n){return e(t,n)}}function eachLimit(e,t,r){eachOf(e,_withoutIndex(wrapAsync$1(t)),r)}function eachLimit$1(e,t,r,n){_eachOfLimit(t)(e,_withoutIndex(wrapAsync$1(r)),n)}function ensureAsync(e){return isAsync(e)?e:initialParams(function(t,r){var n=!0;t.push(function(){var e=arguments;n?setImmediate$1(function(){r.apply(null,e)}):r.apply(null,e)}),e.apply(this,t),n=!1})}function notId(e){return!e}function baseProperty(e){return function(t){return null==t?void 0:t[e]}}function filterArray(e,t,r,n){var o=new Array(t.length);e(t,function(e,t,n){r(e,function(e,r){o[t]=!!r,n(e)})},function(e){if(e)return n(e);for(var r=[],i=0;i<t.length;i++)o[i]&&r.push(t[i]);n(null,r)})}function filterGeneric(e,t,r,n){var o=[];e(t,function(e,t,n){r(e,function(r,i){r?n(r):(i&&o.push({index:t,value:e}),n())})},function(e){e?n(e):n(null,arrayMap(o.sort(function(e,t){return e.index-t.index}),baseProperty("value")))})}function _filter(e,t,r,n){var o=isArrayLike(t)?filterArray:filterGeneric;o(e,t,wrapAsync$1(r),n||noop)}function forever(e,t){function r(e){return e?n(e):void o(r)}var n=onlyOnce(t||noop),o=wrapAsync$1(ensureAsync(e));r()}function mapValuesLimit(e,t,r,n){n=once(n||noop);var o={},i=wrapAsync$1(r);eachOfLimit(e,t,function(e,t,r){i(e,t,function(e,n){return e?r(e):(o[t]=n,void r())})},function(e){n(e,o)})}function has(e,t){return t in e}function memoize(e,t){var r=Object.create(null),n=Object.create(null);t=t||identity;var o=wrapAsync$1(e),i=initialParams(function(e,i){var a=t.apply(null,e);has(r,a)?setImmediate$1(function(){i.apply(null,r[a])}):has(n,a)?n[a].push(i):(n[a]=[i],o.apply(null,e.concat(rest(function(e){r[a]=e;var t=n[a];delete n[a];for(var o=0,i=t.length;o<i;o++)t[o].apply(null,e)}))))});return i.memo=r,i.unmemoized=e,i}function _parallel(e,t,r){r=r||noop;var n=isArrayLike(t)?[]:{};e(t,function(e,t,r){wrapAsync$1(e)(rest(function(e,o){o.length<=1&&(o=o[0]),n[t]=o,r(e)}))},function(e){r(e,n)})}function parallelLimit(e,t){_parallel(eachOf,e,t)}function parallelLimit$1(e,t,r){_parallel(_eachOfLimit(t),e,r)}function race(e,t){if(t=once(t||noop),!isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)wrapAsync$1(e[r])(t)}function reduceRight(e,t,r,n){var o=slice.call(e).reverse();reduce(o,t,r,n)}function reflect(e){var t=wrapAsync$1(e);return initialParams(function(e,r){return e.push(rest(function(e,t){if(e)r(null,{error:e});else{var n=null;1===t.length?n=t[0]:t.length>1&&(n=t),r(null,{value:n})}})),t.apply(this,e)})}function reject$1(e,t,r,n){_filter(e,t,function(e,t){r(e,function(e,r){t(e,!r)})},n)}function reflectAll(e){var t;return isArray(e)?t=arrayMap(e,reflect):(t={},baseForOwn(e,function(e,r){t[r]=reflect.call(this,e)})),t}function constant$1(e){return function(){return e}}function retry(e,t,r){function n(e,t){if("object"==typeof t)e.times=+t.times||i,e.intervalFunc="function"==typeof t.interval?t.interval:constant$1(+t.interval||a),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||i}}function o(){c(function(e){e&&u++<s.times&&("function"!=typeof s.errorFilter||s.errorFilter(e))?setTimeout(o,s.intervalFunc(u)):r.apply(null,arguments)})}var i=5,a=0,s={times:i,intervalFunc:constant$1(a)};if(arguments.length<3&&"function"==typeof e?(r=t||noop,t=e):(n(s,e),r=r||noop),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var c=wrapAsync$1(t),u=1;o()}function series(e,t){_parallel(eachOfSeries,e,t)}function sortBy(e,t,r){function n(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}var o=wrapAsync$1(t);map(e,function(e,t){o(e,function(r,n){return r?t(r):void t(null,{value:e,criteria:n})})},function(e,t){return e?r(e):void r(null,arrayMap(t.sort(n),baseProperty("value")))})}function timeout(e,t,r){function n(){s||(i.apply(null,arguments),clearTimeout(a))}function o(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),s=!0,i(n)}var i,a,s=!1,c=wrapAsync$1(e);return initialParams(function(e,r){i=r,a=setTimeout(o,t),c.apply(null,e.concat(n))})}function baseRange(e,t,r,n){for(var o=-1,i=nativeMax$1(nativeCeil((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a}function timeLimit(e,t,r,n){var o=wrapAsync$1(r);mapLimit(baseRange(0,e,1),t,o,n)}function transform(e,t,r,n){arguments.length<=3&&(n=r,r=t,t=isArray(e)?[]:{}),n=once(n||noop);var o=wrapAsync$1(r);eachOf(e,function(e,r,n){o(t,e,r,n)},function(e){n(e,t)})}function unmemoize(e){return function(){return(e.unmemoized||e).apply(null,arguments)}}function whilst(e,t,r){r=onlyOnce(r||noop);var n=wrapAsync$1(t);if(!e())return r(null);var o=rest(function(t,i){return t?r(t):e()?n(o):void r.apply(null,[null].concat(i))});n(o)}function until(e,t,r){whilst(function(){return!e.apply(this,arguments)},t,r)}var nativeMax=Math.max,initialParams=function(e){return rest(function(t){var r=t.pop();e.call(this,t,r)})},supportsSymbol="function"==typeof Symbol,wrapAsync$1=supportsAsync()?wrapAsync:identity,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]",MAX_SAFE_INTEGER=9007199254740991,breakLoop={},iteratorSymbol="function"==typeof Symbol&&Symbol.iterator,getIterator=function(e){return iteratorSymbol&&e[iteratorSymbol]&&e[iteratorSymbol]()},argsTag="[object Arguments]",objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&hasOwnProperty$2.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArray=Array.isArray,freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/,argsTag$1="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag$1="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var freeExports$1="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$2=Object.prototype,hasOwnProperty$1=objectProto$2.hasOwnProperty,objectProto$5=Object.prototype,nativeKeys=overArg(Object.keys,Object),objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,eachOfGeneric=doLimit(eachOfLimit,1/0),eachOf=function(e,t,r){var n=isArrayLike(e)?eachOfArrayLike:eachOfGeneric;n(e,wrapAsync$1(t),r)},map=doParallel(_asyncMap),applyEach=applyEach$1(map),mapLimit=doParallelLimit(_asyncMap),mapSeries=doLimit(mapLimit,1),applyEachSeries=applyEach$1(mapSeries),apply$2=rest(function(e,t){return rest(function(r){return e.apply(null,t.concat(r))})}),baseFor=createBaseFor(),auto=function(e,t,r){function n(e,t){g.push(function(){s(e,t)})}function o(){if(0===g.length&&0===y)return r(null,p);for(;g.length&&y<t;){var e=g.shift();e()}}function i(e,t){var r=d[e];r||(r=d[e]=[]),r.push(t)}function a(e){var t=d[e]||[];arrayEach(t,function(e){e()}),o()}function s(e,t){if(!m){var n=onlyOnce(rest(function(t,n){if(y--,n.length<=1&&(n=n[0]),t){var o={};baseForOwn(p,function(e,t){o[t]=e}),o[e]=n,m=!0,d=Object.create(null),r(t,o)}else p[e]=n,a(e)}));y++;var o=wrapAsync$1(t[t.length-1]);t.length>1?o(p,n):o(n)}}function c(){for(var e,t=0;h.length;)e=h.pop(),t++,arrayEach(u(e),function(e){0===--b[e]&&h.push(e)});if(t!==f)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function u(t){var r=[];return baseForOwn(e,function(e,n){isArray(e)&&baseIndexOf(e,t,0)>=0&&r.push(n)}),r}"function"==typeof t&&(r=t,t=null),r=once(r||noop);var l=keys(e),f=l.length;if(!f)return r(null);t||(t=f);var p={},y=0,m=!1,d=Object.create(null),g=[],h=[],b={};baseForOwn(e,function(t,r){if(!isArray(t))return n(r,[t]),void h.push(r);var o=t.slice(0,t.length-1),a=o.length;return 0===a?(n(r,t),void h.push(r)):(b[r]=a,void arrayEach(o,function(s){if(!e[s])throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+s+"` in "+o.join(", "));i(s,function(){a--,0===a&&n(r,t)})}))}),c(),o()},symbolTag="[object Symbol]",INFINITY=1/0,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange="\\u20d0-\\u20f0",rsVarRange="\\ufe0e\\ufe0f",rsZWJ="\\u200d",reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboMarksRange+rsComboSymbolsRange+rsVarRange+"]"),rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange$1="\\u20d0-\\u20f0",rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo="["+rsComboMarksRange$1+rsComboSymbolsRange$1+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange$1+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange$1+"]?",rsOptJoin="(?:"+rsZWJ$1+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reTrim=/^\s+|\s+$/g,FN_ARGS=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/(=.+)?(\s*)$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,hasSetImmediate="function"==typeof setImmediate&&setImmediate,hasNextTick="object"==typeof process&&"function"==typeof process.nextTick,_defer;_defer=hasSetImmediate?setImmediate:hasNextTick?process.nextTick:fallback;var setImmediate$1=wrap(_defer);DLL.prototype.removeLink=function(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e},DLL.prototype.empty=DLL,DLL.prototype.insertAfter=function(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1},DLL.prototype.insertBefore=function(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1},DLL.prototype.unshift=function(e){this.head?this.insertBefore(this.head,e):setInitial(this,e)},DLL.prototype.push=function(e){this.tail?this.insertAfter(this.tail,e):setInitial(this,e)},DLL.prototype.shift=function(){return this.head&&this.removeLink(this.head)},DLL.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)};var eachOfSeries=doLimit(eachOfLimit,1),seq$1=rest(function(e){var t=arrayMap(e,wrapAsync$1);return rest(function(e){var r=this,n=e[e.length-1];"function"==typeof n?e.pop():n=noop,reduce(t,e,function(e,t,n){t.apply(r,e.concat(rest(function(e,t){n(e,t)})))},function(e,t){n.apply(r,[e].concat(t))})})}),compose=rest(function(e){return seq$1.apply(null,e.reverse())}),concat=doParallel(concat$1),concatSeries=doSeries(concat$1),constant=rest(function(e){var t=[null].concat(e);return initialParams(function(e,r){return r.apply(this,t)})}),detect=doParallel(_createTester(identity,_findGetResult)),detectLimit=doParallelLimit(_createTester(identity,_findGetResult)),detectSeries=doLimit(detectLimit,1),dir=consoleFunc("dir"),eachSeries=doLimit(eachLimit$1,1),every=doParallel(_createTester(notId,notId)),everyLimit=doParallelLimit(_createTester(notId,notId)),everySeries=doLimit(everyLimit,1),filter=doParallel(_filter),filterLimit=doParallelLimit(_filter),filterSeries=doLimit(filterLimit,1),groupByLimit=function(e,t,r,n){n=n||noop;var o=wrapAsync$1(r);mapLimit(e,t,function(e,t){o(e,function(r,n){return r?t(r):t(null,{key:n,val:e})})},function(e,t){for(var r={},o=Object.prototype.hasOwnProperty,i=0;i<t.length;i++)if(t[i]){var a=t[i].key,s=t[i].val;o.call(r,a)?r[a].push(s):r[a]=[s]}return n(e,r)})},groupBy=doLimit(groupByLimit,1/0),groupBySeries=doLimit(groupByLimit,1),log=consoleFunc("log"),mapValues=doLimit(mapValuesLimit,1/0),mapValuesSeries=doLimit(mapValuesLimit,1),_defer$1;_defer$1=hasNextTick?process.nextTick:hasSetImmediate?setImmediate:fallback;var nextTick=wrap(_defer$1),queue$1=function(e,t){var r=wrapAsync$1(e);return queue(function(e,t){r(e[0],t)},t,1)},priorityQueue=function(e,t){var r=queue$1(e,t);return r.push=function(e,t,n){if(null==n&&(n=noop),"function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,isArray(e)||(e=[e]),0===e.length)return setImmediate$1(function(){r.drain()});t=t||0;for(var o=r._tasks.head;o&&t>=o.priority;)o=o.next;for(var i=0,a=e.length;i<a;i++){var s={data:e[i],priority:t,callback:n};o?r._tasks.insertBefore(o,s):r._tasks.push(s)}setImmediate$1(r.process)},delete r.unshift,r},slice=Array.prototype.slice,reject=doParallel(reject$1),rejectLimit=doParallelLimit(reject$1),rejectSeries=doLimit(rejectLimit,1),retryable=function(e,t){t||(t=e,e=null);var r=wrapAsync$1(t);return initialParams(function(t,n){function o(e){r.apply(null,t.concat(e))}e?retry(e,o,n):retry(o,n)})},some=doParallel(_createTester(Boolean,identity)),someLimit=doParallelLimit(_createTester(Boolean,identity)),someSeries=doLimit(someLimit,1),nativeCeil=Math.ceil,nativeMax$1=Math.max,times=doLimit(timeLimit,1/0),timesSeries=doLimit(timeLimit,1),waterfall=function(e,t){function r(o){if(n===e.length)return t.apply(null,[null].concat(o));var i=onlyOnce(rest(function(e,n){return e?t.apply(null,[e].concat(n)):void r(n)}));o.push(i);var a=wrapAsync$1(e[n++]);a.apply(null,o)}if(t=once(t||noop),!isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;r([])},index={applyEach:applyEach,applyEachSeries:applyEachSeries,apply:apply$2,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,compose:compose,concat:concat,concatSeries:concatSeries,constant:constant,detect:detect,detectLimit:detectLimit,detectSeries:detectSeries,dir:dir,doDuring:doDuring,doUntil:doUntil,doWhilst:doWhilst,during:during,each:eachLimit,eachLimit:eachLimit$1,eachOf:eachOf,eachOfLimit:eachOfLimit,eachOfSeries:eachOfSeries,eachSeries:eachSeries,ensureAsync:ensureAsync,every:every,everyLimit:everyLimit,everySeries:everySeries,filter:filter,filterLimit:filterLimit,filterSeries:filterSeries,forever:forever,groupBy:groupBy,groupByLimit:groupByLimit,groupBySeries:groupBySeries,log:log,map:map,mapLimit:mapLimit,mapSeries:mapSeries,mapValues:mapValues,mapValuesLimit:mapValuesLimit,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:nextTick,parallel:parallelLimit,parallelLimit:parallelLimit$1,priorityQueue:priorityQueue,queue:queue$1,race:race,reduce:reduce,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:reject,rejectLimit:rejectLimit,rejectSeries:rejectSeries,retry:retry,retryable:retryable,seq:seq$1,series:series,setImmediate:setImmediate$1,some:some,someLimit:someLimit,someSeries:someSeries,sortBy:sortBy,timeout:timeout,times:times,timesLimit:timeLimit,timesSeries:timesSeries,transform:transform,unmemoize:unmemoize,until:until,waterfall:waterfall,whilst:whilst,all:every,any:some,forEach:eachLimit,forEachSeries:eachSeries,forEachLimit:eachLimit$1,forEachOf:eachOf,forEachOfSeries:eachOfSeries,forEachOfLimit:eachOfLimit,inject:reduce,foldl:reduce,foldr:reduceRight,select:filter,selectLimit:filterLimit,selectSeries:filterSeries,wrapSync:asyncify};exports.default=index,exports.applyEach=applyEach,exports.applyEachSeries=applyEachSeries,exports.apply=apply$2,exports.asyncify=asyncify,exports.auto=auto,exports.autoInject=autoInject,exports.cargo=cargo,exports.compose=compose,exports.concat=concat,exports.concatSeries=concatSeries,exports.constant=constant,exports.detect=detect,exports.detectLimit=detectLimit,exports.detectSeries=detectSeries,exports.dir=dir,exports.doDuring=doDuring,exports.doUntil=doUntil,exports.doWhilst=doWhilst,exports.during=during,exports.each=eachLimit,exports.eachLimit=eachLimit$1,exports.eachOf=eachOf,exports.eachOfLimit=eachOfLimit,exports.eachOfSeries=eachOfSeries,exports.eachSeries=eachSeries,exports.ensureAsync=ensureAsync,exports.every=every,exports.everyLimit=everyLimit,exports.everySeries=everySeries,exports.filter=filter,exports.filterLimit=filterLimit,exports.filterSeries=filterSeries,exports.forever=forever,exports.groupBy=groupBy,exports.groupByLimit=groupByLimit,exports.groupBySeries=groupBySeries,exports.log=log,exports.map=map,exports.mapLimit=mapLimit,exports.mapSeries=mapSeries,exports.mapValues=mapValues,exports.mapValuesLimit=mapValuesLimit,exports.mapValuesSeries=mapValuesSeries,exports.memoize=memoize,exports.nextTick=nextTick,exports.parallel=parallelLimit,exports.parallelLimit=parallelLimit$1,exports.priorityQueue=priorityQueue,exports.queue=queue$1,exports.race=race,exports.reduce=reduce,exports.reduceRight=reduceRight,exports.reflect=reflect,exports.reflectAll=reflectAll,exports.reject=reject,exports.rejectLimit=rejectLimit,exports.rejectSeries=rejectSeries,exports.retry=retry,exports.retryable=retryable,exports.seq=seq$1,exports.series=series,exports.setImmediate=setImmediate$1,exports.some=some,exports.someLimit=someLimit,exports.someSeries=someSeries,exports.sortBy=sortBy,exports.timeout=timeout,exports.times=times,exports.timesLimit=timeLimit,exports.timesSeries=timesSeries,exports.transform=transform,exports.unmemoize=unmemoize,exports.until=until,exports.waterfall=waterfall,exports.whilst=whilst,exports.all=every,exports.allLimit=everyLimit,exports.allSeries=everySeries,exports.any=some,exports.anyLimit=someLimit,exports.anySeries=someSeries,exports.find=detect,exports.findLimit=detectLimit,exports.findSeries=detectSeries,exports.forEach=eachLimit,exports.forEachSeries=eachSeries,exports.forEachLimit=eachLimit$1,exports.forEachOf=eachOf,exports.forEachOfSeries=eachOfSeries,exports.forEachOfLimit=eachOfLimit,exports.inject=reduce,exports.foldl=reduce,exports.foldr=reduceRight,exports.select=filter,exports.selectLimit=filterLimit,exports.selectSeries=filterSeries,exports.wrapSync=asyncify,Object.defineProperty(exports,"__esModule",{value:!0})});
//# sourceMappingURL=async.min.map \ No newline at end of file
diff --git a/node_modules/async/package.json b/node_modules/async/package.json
index 8bcde1ec5..51428e096 100644
--- a/node_modules/async/package.json
+++ b/node_modules/async/package.json
@@ -1,7 +1,7 @@
{
"name": "async",
"description": "Higher-order functions and common patterns for asynchronous code",
- "version": "2.1.2",
+ "version": "2.3.0",
"main": "dist/async.js",
"author": "Caolan McMahon",
"repository": {
@@ -21,12 +21,13 @@
"lodash": "^4.14.0"
},
"devDependencies": {
- "babel-cli": "^6.16.0",
- "babel-core": "^6.3.26",
+ "babel-cli": "^6.24.0",
+ "babel-core": "^6.24.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-istanbul": "^2.0.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.3.16",
"babel-preset-es2015": "^6.3.13",
+ "babel-preset-es2017": "^6.22.0",
"babelify": "^7.2.0",
"benchmark": "^2.1.1",
"bluebird": "^3.4.6",
diff --git a/node_modules/babel-code-frame/README.md b/node_modules/babel-code-frame/README.md
index 7e61e3ea5..0257a2da1 100644
--- a/node_modules/babel-code-frame/README.md
+++ b/node_modules/babel-code-frame/README.md
@@ -5,7 +5,7 @@
## Install
```sh
-$ npm install babel-code-frame
+npm install --save-dev babel-code-frame
```
## Usage
@@ -40,3 +40,4 @@ name | type | default | description
highlightCode | boolean | `false` | Syntax highlight the code as JavaScript for terminals
linesAbove | number | 2 | The number of lines to show above the error
linesBelow | number | 3 | The number of lines to show below the error
+forceColor | boolean | `false` | Forcibly syntax highlight the code as JavaScript (for non-terminals); overrides highlightCode
diff --git a/node_modules/babel-code-frame/lib/index.js b/node_modules/babel-code-frame/lib/index.js
index 54c838c3b..ff49b9082 100644
--- a/node_modules/babel-code-frame/lib/index.js
+++ b/node_modules/babel-code-frame/lib/index.js
@@ -3,15 +3,20 @@
exports.__esModule = true;
exports.default = function (rawLines, lineNumber, colNumber) {
- var opts = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
colNumber = Math.max(colNumber, 0);
- var highlighted = opts.highlightCode && _chalk2.default.supportsColor;
+ var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor;
+ var chalk = _chalk2.default;
+ if (opts.forceColor) {
+ chalk = new _chalk2.default.constructor({ enabled: true });
+ }
var maybeHighlight = function maybeHighlight(chalkFn, string) {
return highlighted ? chalkFn(string) : string;
};
- if (highlighted) rawLines = highlight(rawLines);
+ var defs = getDefs(chalk);
+ if (highlighted) rawLines = highlight(defs, rawLines);
var linesAbove = opts.linesAbove || 2;
var linesBelow = opts.linesBelow || 3;
@@ -44,7 +49,7 @@ exports.default = function (rawLines, lineNumber, colNumber) {
}).join("\n");
if (highlighted) {
- return _chalk2.default.reset(frame);
+ return chalk.reset(frame);
} else {
return frame;
}
@@ -64,20 +69,22 @@ var _chalk2 = _interopRequireDefault(_chalk);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var defs = {
- keyword: _chalk2.default.cyan,
- capitalized: _chalk2.default.yellow,
- jsx_tag: _chalk2.default.yellow,
- punctuator: _chalk2.default.yellow,
-
- number: _chalk2.default.magenta,
- string: _chalk2.default.green,
- regex: _chalk2.default.magenta,
- comment: _chalk2.default.grey,
- invalid: _chalk2.default.white.bgRed.bold,
- gutter: _chalk2.default.grey,
- marker: _chalk2.default.red.bold
-};
+function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsx_tag: chalk.yellow,
+ punctuator: chalk.yellow,
+
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold,
+ gutter: chalk.grey,
+ marker: chalk.red.bold
+ };
+}
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -86,12 +93,11 @@ var JSX_TAG = /^[a-z][\w-]*$/i;
var BRACKET = /^[()\[\]{}]$/;
function getTokenType(match) {
- var _match$slice = match.slice(-2);
-
- var offset = _match$slice[0];
- var text = _match$slice[1];
+ var _match$slice = match.slice(-2),
+ offset = _match$slice[0],
+ text = _match$slice[1];
- var token = _jsTokens2.default.matchToToken(match);
+ var token = (0, _jsTokens.matchToToken)(match);
if (token.type === "name") {
if (_esutils2.default.keyword.isReservedWordES6(token.value)) {
@@ -114,7 +120,7 @@ function getTokenType(match) {
return token.type;
}
-function highlight(text) {
+function highlight(defs, text) {
return text.replace(_jsTokens2.default, function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
diff --git a/node_modules/babel-code-frame/package.json b/node_modules/babel-code-frame/package.json
index 113ac80fb..692187128 100644
--- a/node_modules/babel-code-frame/package.json
+++ b/node_modules/babel-code-frame/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-code-frame",
- "version": "6.16.0",
+ "version": "6.22.0",
"description": "Generate errors that contain a code frame that point to source locations.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -10,6 +10,6 @@
"dependencies": {
"chalk": "^1.1.0",
"esutils": "^2.0.2",
- "js-tokens": "^2.0.0"
+ "js-tokens": "^3.0.0"
}
}
diff --git a/node_modules/babel-generator/README.md b/node_modules/babel-generator/README.md
index 5de763278..a33719135 100644
--- a/node_modules/babel-generator/README.md
+++ b/node_modules/babel-generator/README.md
@@ -5,7 +5,7 @@
## Install
```sh
-$ npm install babel-generator
+npm install --save-dev babel-generator
```
## Usage
@@ -37,6 +37,8 @@ minified | boolean | `false` | Should the output be minif
concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`)
quotes | `'single'` or `'double'` | autodetect based on `ast.tokens` | The type of quote to use in the output
filename | string | | Used in warning messages
+flowCommaSeparator | boolean | `false` | Set to `true` to use commas instead of semicolons as Flow property separators
+jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©";
Options for source maps:
diff --git a/node_modules/babel-generator/lib/buffer.js b/node_modules/babel-generator/lib/buffer.js
index 8919d2c29..40b6c2561 100644
--- a/node_modules/babel-generator/lib/buffer.js
+++ b/node_modules/babel-generator/lib/buffer.js
@@ -6,9 +6,9 @@ var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _trimEnd = require("lodash/trimEnd");
+var _trimRight = require("trim-right");
-var _trimEnd2 = _interopRequireDefault(_trimEnd);
+var _trimRight2 = _interopRequireDefault(_trimRight);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -38,19 +38,36 @@ var Buffer = function () {
Buffer.prototype.get = function get() {
this._flush();
- return {
- code: (0, _trimEnd2.default)(this._buf.join("")),
- map: this._map ? this._map.get() : null
+ var map = this._map;
+ var result = {
+ code: (0, _trimRight2.default)(this._buf.join("")),
+ map: null,
+ rawMappings: map && map.getRawMappings()
};
+
+ if (map) {
+ Object.defineProperty(result, "map", {
+ configurable: true,
+ enumerable: true,
+ get: function get() {
+ return this.map = map.get();
+ },
+ set: function set(value) {
+ Object.defineProperty(this, "map", { value: value, writable: true });
+ }
+ });
+ }
+
+ return result;
};
Buffer.prototype.append = function append(str) {
this._flush();
- var _sourcePosition = this._sourcePosition;
- var line = _sourcePosition.line;
- var column = _sourcePosition.column;
- var filename = _sourcePosition.filename;
- var identifierName = _sourcePosition.identifierName;
+ var _sourcePosition = this._sourcePosition,
+ line = _sourcePosition.line,
+ column = _sourcePosition.column,
+ filename = _sourcePosition.filename,
+ identifierName = _sourcePosition.identifierName;
this._append(str, line, column, identifierName, filename);
};
@@ -58,11 +75,11 @@ var Buffer = function () {
Buffer.prototype.queue = function queue(str) {
if (str === "\n") while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
this._queue.shift();
- }var _sourcePosition2 = this._sourcePosition;
- var line = _sourcePosition2.line;
- var column = _sourcePosition2.column;
- var filename = _sourcePosition2.filename;
- var identifierName = _sourcePosition2.identifierName;
+ }var _sourcePosition2 = this._sourcePosition,
+ line = _sourcePosition2.line,
+ column = _sourcePosition2.column,
+ filename = _sourcePosition2.filename,
+ identifierName = _sourcePosition2.identifierName;
this._queue.unshift([str, line, column, identifierName, filename]);
};
diff --git a/node_modules/babel-generator/lib/generators/base.js b/node_modules/babel-generator/lib/generators/base.js
index 3be3a8a53..938022f76 100644
--- a/node_modules/babel-generator/lib/generators/base.js
+++ b/node_modules/babel-generator/lib/generators/base.js
@@ -31,11 +31,14 @@ function Program(node) {
function BlockStatement(node) {
this.token("{");
this.printInnerComments(node);
- if (node.body.length) {
+
+ var hasDirectives = node.directives && node.directives.length;
+
+ if (node.body.length || hasDirectives) {
this.newline();
this.printSequence(node.directives, node, { indent: true });
- if (node.directives && node.directives.length) this.newline();
+ if (hasDirectives) this.newline();
this.printSequence(node.body, node, { indent: true });
this.removeTrailingNewline();
diff --git a/node_modules/babel-generator/lib/generators/expressions.js b/node_modules/babel-generator/lib/generators/expressions.js
index c6c070788..d65fa78c0 100644
--- a/node_modules/babel-generator/lib/generators/expressions.js
+++ b/node_modules/babel-generator/lib/generators/expressions.js
@@ -13,6 +13,7 @@ exports.ThisExpression = ThisExpression;
exports.Super = Super;
exports.Decorator = Decorator;
exports.CallExpression = CallExpression;
+exports.Import = Import;
exports.EmptyStatement = EmptyStatement;
exports.ExpressionStatement = ExpressionStatement;
exports.AssignmentPattern = AssignmentPattern;
@@ -21,10 +22,6 @@ exports.BindExpression = BindExpression;
exports.MemberExpression = MemberExpression;
exports.MetaProperty = MetaProperty;
-var _isNumber = require("lodash/isNumber");
-
-var _isNumber2 = _interopRequireDefault(_isNumber);
-
var _babelTypes = require("babel-types");
var t = _interopRequireWildcard(_babelTypes);
@@ -35,8 +32,6 @@ var n = _interopRequireWildcard(_node);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
function UnaryExpression(node) {
if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") {
this.word(node.operator);
@@ -142,6 +137,10 @@ function CallExpression(node) {
this.token(")");
}
+function Import() {
+ this.word("import");
+}
+
function buildYieldAwait(keyword) {
return function (node) {
this.word(keyword);
@@ -173,6 +172,8 @@ function ExpressionStatement(node) {
function AssignmentPattern(node) {
this.print(node.left, node);
+ if (node.left.optional) this.token("?");
+ this.print(node.left.typeAnnotation, node);
this.space();
this.token("=");
this.space();
@@ -219,7 +220,7 @@ function MemberExpression(node) {
}
var computed = node.computed;
- if (t.isLiteral(node.property) && (0, _isNumber2.default)(node.property.value)) {
+ if (t.isLiteral(node.property) && typeof node.property.value === "number") {
computed = true;
}
diff --git a/node_modules/babel-generator/lib/generators/flow.js b/node_modules/babel-generator/lib/generators/flow.js
index cc52ffe83..077f75cf8 100644
--- a/node_modules/babel-generator/lib/generators/flow.js
+++ b/node_modules/babel-generator/lib/generators/flow.js
@@ -321,11 +321,19 @@ function ObjectTypeAnnotation(node) {
this.space();
this.printJoin(props, node, {
+ addNewlines: function addNewlines(leading) {
+ if (leading && !props[0]) return 1;
+ },
+
indent: true,
statement: true,
iterator: function iterator() {
if (props.length !== 1) {
- _this.semicolon();
+ if (_this.format.flowCommaSeparator) {
+ _this.token(",");
+ } else {
+ _this.semicolon();
+ }
_this.space();
}
}
diff --git a/node_modules/babel-generator/lib/generators/jsx.js b/node_modules/babel-generator/lib/generators/jsx.js
index 492452899..6632db1c2 100644
--- a/node_modules/babel-generator/lib/generators/jsx.js
+++ b/node_modules/babel-generator/lib/generators/jsx.js
@@ -12,6 +12,7 @@ exports.JSXNamespacedName = JSXNamespacedName;
exports.JSXMemberExpression = JSXMemberExpression;
exports.JSXSpreadAttribute = JSXSpreadAttribute;
exports.JSXExpressionContainer = JSXExpressionContainer;
+exports.JSXSpreadChild = JSXSpreadChild;
exports.JSXText = JSXText;
exports.JSXElement = JSXElement;
exports.JSXOpeningElement = JSXOpeningElement;
@@ -57,6 +58,13 @@ function JSXExpressionContainer(node) {
this.token("}");
}
+function JSXSpreadChild(node) {
+ this.token("{");
+ this.token("...");
+ this.print(node.expression, node);
+ this.token("}");
+}
+
function JSXText(node) {
this.token(node.value);
}
diff --git a/node_modules/babel-generator/lib/generators/modules.js b/node_modules/babel-generator/lib/generators/modules.js
index 3dcda7cca..608053540 100644
--- a/node_modules/babel-generator/lib/generators/modules.js
+++ b/node_modules/babel-generator/lib/generators/modules.js
@@ -19,6 +19,11 @@ var t = _interopRequireWildcard(_babelTypes);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function ImportSpecifier(node) {
+ if (node.importKind === "type" || node.importKind === "typeof") {
+ this.word(node.importKind);
+ this.space();
+ }
+
this.print(node.imported, node);
if (node.local && node.local.name !== node.imported.name) {
this.space();
@@ -58,12 +63,6 @@ function ExportAllDeclaration(node) {
this.word("export");
this.space();
this.token("*");
- if (node.exported) {
- this.space();
- this.word("as");
- this.space();
- this.print(node.exported, node);
- }
this.space();
this.word("from");
this.space();
diff --git a/node_modules/babel-generator/lib/generators/statements.js b/node_modules/babel-generator/lib/generators/statements.js
index 1866fe00f..d74b19102 100644
--- a/node_modules/babel-generator/lib/generators/statements.js
+++ b/node_modules/babel-generator/lib/generators/statements.js
@@ -115,13 +115,12 @@ var buildForXStatement = function buildForXStatement(op) {
if (op === "await") {
this.word("await");
this.space();
- op = "of";
}
this.token("(");
this.print(node.left, node);
this.space();
- this.word(op);
+ this.word(op === "await" ? "of" : op);
this.space();
this.print(node.right, node);
this.token(")");
diff --git a/node_modules/babel-generator/lib/generators/template-literals.js b/node_modules/babel-generator/lib/generators/template-literals.js
index c1cdabbe0..32467eb42 100644
--- a/node_modules/babel-generator/lib/generators/template-literals.js
+++ b/node_modules/babel-generator/lib/generators/template-literals.js
@@ -15,9 +15,7 @@ function TemplateElement(node, parent) {
var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
- if (!isFirst) this.space();
this.token(value);
- if (!isLast) this.space();
}
function TemplateLiteral(node) {
diff --git a/node_modules/babel-generator/lib/generators/types.js b/node_modules/babel-generator/lib/generators/types.js
index 4dfa83735..d5e081fd2 100644
--- a/node_modules/babel-generator/lib/generators/types.js
+++ b/node_modules/babel-generator/lib/generators/types.js
@@ -128,21 +128,31 @@ function NullLiteral() {
function NumericLiteral(node) {
var raw = this.getPossibleRaw(node);
-
- this.number(raw == null ? node.value + "" : raw);
+ var value = node.value + "";
+ if (raw == null) {
+ this.number(value);
+ } else if (this.format.minified) {
+ this.number(raw.length < value.length ? raw : value);
+ } else {
+ this.number(raw);
+ }
}
function StringLiteral(node, parent) {
var raw = this.getPossibleRaw(node);
- if (raw != null) {
+ if (!this.format.minified && raw != null) {
this.token(raw);
return;
}
- var val = (0, _jsesc2.default)(node.value, {
+ var opts = {
quotes: t.isJSX(parent) ? "double" : this.format.quotes,
wrap: true
- });
+ };
+ if (this.format.jsonCompatibleStrings) {
+ opts.json = true;
+ }
+ var val = (0, _jsesc2.default)(node.value, opts);
return this.token(val);
} \ No newline at end of file
diff --git a/node_modules/babel-generator/lib/index.js b/node_modules/babel-generator/lib/index.js
index 6c7037c35..e8da09ebf 100644
--- a/node_modules/babel-generator/lib/index.js
+++ b/node_modules/babel-generator/lib/index.js
@@ -43,11 +43,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var Generator = function (_Printer) {
(0, _inherits3.default)(Generator, _Printer);
- function Generator(ast, opts, code) {
+ function Generator(ast) {
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var code = arguments[2];
(0, _classCallCheck3.default)(this, Generator);
- opts = opts || {};
-
var tokens = ast.tokens || [];
var format = normalizeOptions(code, opts, tokens);
var map = opts.sourceMaps ? new _sourceMap2.default(opts, code) : null;
@@ -83,11 +83,13 @@ function normalizeOptions(code, opts, tokens) {
minified: opts.minified,
concise: opts.concise,
quotes: opts.quotes || findCommonStringDelimiter(code, tokens),
+ jsonCompatibleStrings: opts.jsonCompatibleStrings,
indent: {
adjustMultilineComment: true,
style: style,
base: 0
- }
+ },
+ flowCommaSeparator: opts.flowCommaSeparator
};
if (format.minified) {
@@ -103,10 +105,10 @@ function normalizeOptions(code, opts, tokens) {
}
if (format.compact === "auto") {
- format.compact = code.length > 100000;
+ format.compact = code.length > 500000;
if (format.compact) {
- console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "100KB"));
+ console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
}
}
@@ -123,7 +125,7 @@ function findCommonStringDelimiter(code, tokens) {
return DEFAULT_STRING_DELIMITER;
}
- var occurences = {
+ var occurrences = {
single: 0,
double: 0
};
@@ -136,15 +138,15 @@ function findCommonStringDelimiter(code, tokens) {
var raw = code.slice(token.start, token.end);
if (raw[0] === "'") {
- occurences.single++;
+ occurrences.single++;
} else {
- occurences.double++;
+ occurrences.double++;
}
checked++;
if (checked >= 3) break;
}
- if (occurences.single > occurences.double) {
+ if (occurrences.single > occurrences.double) {
return "single";
} else {
return "double";
diff --git a/node_modules/babel-generator/lib/node/parentheses.js b/node_modules/babel-generator/lib/node/parentheses.js
index 10eba8e2c..471af71cb 100644
--- a/node_modules/babel-generator/lib/node/parentheses.js
+++ b/node_modules/babel-generator/lib/node/parentheses.js
@@ -5,6 +5,7 @@ exports.AwaitExpression = exports.FunctionTypeAnnotation = undefined;
exports.NullableTypeAnnotation = NullableTypeAnnotation;
exports.UpdateExpression = UpdateExpression;
exports.ObjectExpression = ObjectExpression;
+exports.DoExpression = DoExpression;
exports.Binary = Binary;
exports.BinaryExpression = BinaryExpression;
exports.SequenceExpression = SequenceExpression;
@@ -55,27 +56,19 @@ function NullableTypeAnnotation(node, parent) {
exports.FunctionTypeAnnotation = NullableTypeAnnotation;
function UpdateExpression(node, parent) {
- if (t.isMemberExpression(parent) && parent.object === node) {
- return true;
- }
-
- return false;
+ return t.isMemberExpression(parent) && parent.object === node;
}
function ObjectExpression(node, parent, printStack) {
return isFirstInStatement(printStack, { considerArrow: true });
}
-function Binary(node, parent) {
- if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node) {
- return true;
- }
-
- if (t.isUnaryLike(parent)) {
- return true;
- }
+function DoExpression(node, parent, printStack) {
+ return isFirstInStatement(printStack);
+}
- if (t.isMemberExpression(parent) && parent.object === node) {
+function Binary(node, parent) {
+ if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isUnaryLike(parent) || t.isMemberExpression(parent) && parent.object === node || t.isAwaitExpression(parent)) {
return true;
}
@@ -86,11 +79,7 @@ function Binary(node, parent) {
var nodeOp = node.operator;
var nodePos = PRECEDENCE[nodeOp];
- if (parentPos > nodePos) {
- return true;
- }
-
- if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent)) {
+ if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) {
return true;
}
}
@@ -99,49 +88,12 @@ function Binary(node, parent) {
}
function BinaryExpression(node, parent) {
- if (node.operator === "in") {
- if (t.isVariableDeclarator(parent)) {
- return true;
- }
-
- if (t.isFor(parent)) {
- return true;
- }
- }
-
- return false;
+ return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent));
}
function SequenceExpression(node, parent) {
- if (t.isForStatement(parent)) {
- return false;
- }
-
- if (t.isExpressionStatement(parent) && parent.expression === node) {
- return false;
- }
-
- if (t.isReturnStatement(parent)) {
- return false;
- }
-
- if (t.isThrowStatement(parent)) {
- return false;
- }
-
- if (t.isSwitchStatement(parent) && parent.discriminant === node) {
- return false;
- }
-
- if (t.isWhileStatement(parent) && parent.test === node) {
- return false;
- }
- if (t.isIfStatement(parent) && parent.test === node) {
- return false;
- }
-
- if (t.isForInStatement(parent) && parent.right === node) {
+ if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) {
return false;
}
@@ -158,15 +110,7 @@ function ClassExpression(node, parent, printStack) {
}
function UnaryLike(node, parent) {
- if (t.isMemberExpression(parent, { object: node })) {
- return true;
- }
-
- if (t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node })) {
- return true;
- }
-
- return false;
+ return t.isMemberExpression(parent, { object: node }) || t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node });
}
function FunctionExpression(node, parent, printStack) {
@@ -174,15 +118,7 @@ function FunctionExpression(node, parent, printStack) {
}
function ArrowFunctionExpression(node, parent) {
- if (t.isExportDeclaration(parent)) {
- return true;
- }
-
- if (t.isBinaryExpression(parent) || t.isLogicalExpression(parent)) {
- return true;
- }
-
- if (t.isUnaryExpression(parent)) {
+ if (t.isExportDeclaration(parent) || t.isBinaryExpression(parent) || t.isLogicalExpression(parent) || t.isUnaryExpression(parent) || t.isTaggedTemplateExpression(parent)) {
return true;
}
@@ -190,15 +126,7 @@ function ArrowFunctionExpression(node, parent) {
}
function ConditionalExpression(node, parent) {
- if (t.isUnaryLike(parent)) {
- return true;
- }
-
- if (t.isBinary(parent)) {
- return true;
- }
-
- if (t.isConditionalExpression(parent, { test: node })) {
+ if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent)) {
return true;
}
@@ -214,27 +142,18 @@ function AssignmentExpression(node) {
}
function isFirstInStatement(printStack) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var _ref$considerArrow = _ref.considerArrow;
- var considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow;
- var _ref$considerDefaultE = _ref.considerDefaultExports;
- var considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE;
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ _ref$considerArrow = _ref.considerArrow,
+ considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow,
+ _ref$considerDefaultE = _ref.considerDefaultExports,
+ considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE;
var i = printStack.length - 1;
var node = printStack[i];
i--;
var parent = printStack[i];
while (i > 0) {
- if (t.isExpressionStatement(parent, { expression: node })) {
- return true;
- }
-
- if (considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node })) {
- return true;
- }
-
- if (considerArrow && t.isArrowFunctionExpression(parent, { body: node })) {
+ if (t.isExpressionStatement(parent, { expression: node }) || t.isTaggedTemplateExpression(parent) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node }) || considerArrow && t.isArrowFunctionExpression(parent, { body: node })) {
return true;
}
diff --git a/node_modules/babel-generator/lib/node/whitespace.js b/node_modules/babel-generator/lib/node/whitespace.js
index d3690a84a..f39e75525 100644
--- a/node_modules/babel-generator/lib/node/whitespace.js
+++ b/node_modules/babel-generator/lib/node/whitespace.js
@@ -1,13 +1,5 @@
"use strict";
-var _isBoolean = require("lodash/isBoolean");
-
-var _isBoolean2 = _interopRequireDefault(_isBoolean);
-
-var _each = require("lodash/each");
-
-var _each2 = _interopRequireDefault(_each);
-
var _map = require("lodash/map");
var _map2 = _interopRequireDefault(_map);
@@ -144,19 +136,14 @@ exports.list = {
}
};
-(0, _each2.default)({
- Function: true,
- Class: true,
- Loop: true,
- LabeledStatement: true,
- SwitchStatement: true,
- TryStatement: true
-}, function (amounts, type) {
- if ((0, _isBoolean2.default)(amounts)) {
+[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
+ var type = _ref[0],
+ amounts = _ref[1];
+
+ if (typeof amounts === "boolean") {
amounts = { after: amounts, before: amounts };
}
-
- (0, _each2.default)([type].concat(t.FLIPPED_ALIAS_KEYS[type] || []), function (type) {
+ [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
exports.nodes[type] = function () {
return amounts;
};
diff --git a/node_modules/babel-generator/lib/printer.js b/node_modules/babel-generator/lib/printer.js
index 058ad72b7..8eb3eddac 100644
--- a/node_modules/babel-generator/lib/printer.js
+++ b/node_modules/babel-generator/lib/printer.js
@@ -340,8 +340,6 @@ var Printer = function () {
};
Printer.prototype.getPossibleRaw = function getPossibleRaw(node) {
- if (this.format.minified) return;
-
var extra = node.extra;
if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
return extra.raw;
diff --git a/node_modules/babel-generator/lib/source-map.js b/node_modules/babel-generator/lib/source-map.js
index 192d8bca0..b44d1f080 100644
--- a/node_modules/babel-generator/lib/source-map.js
+++ b/node_modules/babel-generator/lib/source-map.js
@@ -22,27 +22,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var SourceMap = function () {
function SourceMap(opts, code) {
- var _this = this;
-
(0, _classCallCheck3.default)(this, SourceMap);
+ this._cachedMap = null;
+ this._code = code;
this._opts = opts;
- this._map = new _sourceMap2.default.SourceMapGenerator({
- file: opts.sourceMapTarget,
- sourceRoot: opts.sourceRoot
- });
+ this._rawMappings = [];
+ }
- if (typeof code === "string") {
- this._map.setSourceContent(opts.sourceFileName, code);
- } else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") {
- (0, _keys2.default)(code).forEach(function (sourceFileName) {
- _this._map.setSourceContent(sourceFileName, code[sourceFileName]);
+ SourceMap.prototype.get = function get() {
+ if (!this._cachedMap) {
+ var map = this._cachedMap = new _sourceMap2.default.SourceMapGenerator({
+ file: this._opts.sourceMapTarget,
+ sourceRoot: this._opts.sourceRoot
});
+
+ var code = this._code;
+ if (typeof code === "string") {
+ map.setSourceContent(this._opts.sourceFileName, code);
+ } else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") {
+ (0, _keys2.default)(code).forEach(function (sourceFileName) {
+ map.setSourceContent(sourceFileName, code[sourceFileName]);
+ });
+ }
+
+ this._rawMappings.forEach(map.addMapping, map);
}
- }
- SourceMap.prototype.get = function get() {
- return this._map.toJSON();
+ return this._cachedMap.toJSON();
+ };
+
+ SourceMap.prototype.getRawMappings = function getRawMappings() {
+ return this._rawMappings.slice();
};
SourceMap.prototype.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) {
@@ -52,18 +63,19 @@ var SourceMap = function () {
return;
}
+ this._cachedMap = null;
this._lastGenLine = generatedLine;
this._lastSourceLine = line;
this._lastSourceColumn = column;
- this._map.addMapping({
- name: identifierName,
+ this._rawMappings.push({
+ name: identifierName || undefined,
generated: {
line: generatedLine,
column: generatedColumn
},
- source: line == null ? null : filename || this._opts.sourceFileName,
- original: line == null ? null : {
+ source: line == null ? undefined : filename || this._opts.sourceFileName,
+ original: line == null ? undefined : {
line: line,
column: column
}
diff --git a/node_modules/babel-generator/package.json b/node_modules/babel-generator/package.json
index 9464e5fd4..989f200e7 100644
--- a/node_modules/babel-generator/package.json
+++ b/node_modules/babel-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-generator",
- "version": "6.18.0",
+ "version": "6.24.1",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -11,16 +11,17 @@
"lib"
],
"dependencies": {
- "babel-messages": "^6.8.0",
- "babel-runtime": "^6.9.0",
- "babel-types": "^6.18.0",
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.2.0",
- "source-map": "^0.5.0"
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
},
"devDependencies": {
- "babel-helper-fixtures": "^6.18.0",
+ "babel-helper-fixtures": "^6.22.0",
"babylon": "^6.11.0"
}
}
diff --git a/node_modules/babel-messages/README.md b/node_modules/babel-messages/README.md
index 297cd0c83..98ecf8b2c 100644
--- a/node_modules/babel-messages/README.md
+++ b/node_modules/babel-messages/README.md
@@ -5,7 +5,7 @@
## Install
```sh
-$ npm install babel-messages
+npm install --save-dev babel-messages
```
## Usage
diff --git a/node_modules/babel-messages/lib/index.js b/node_modules/babel-messages/lib/index.js
index 9565195a6..39e023ece 100644
--- a/node_modules/babel-messages/lib/index.js
+++ b/node_modules/babel-messages/lib/index.js
@@ -1,4 +1,4 @@
-/*istanbul ignore next*/"use strict";
+"use strict";
exports.__esModule = true;
exports.MESSAGES = undefined;
@@ -8,24 +8,17 @@ var _stringify = require("babel-runtime/core-js/json/stringify");
var _stringify2 = _interopRequireDefault(_stringify);
exports.get = get;
-/*istanbul ignore next*/exports.parseArgs = parseArgs;
+exports.parseArgs = parseArgs;
-var /*istanbul ignore next*/_util = require("util");
+var _util = require("util");
-/*istanbul ignore next*/
var util = _interopRequireWildcard(_util);
-/*istanbul ignore next*/
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * Mapping of messages to be used in Babel.
- * Messages can include $0-style placeholders.
- */
-
-var MESSAGES = /*istanbul ignore next*/exports.MESSAGES = {
+var MESSAGES = exports.MESSAGES = {
tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
classesIllegalBareSuper: "Illegal use of bare super",
classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead",
@@ -61,42 +54,28 @@ var MESSAGES = /*istanbul ignore next*/exports.MESSAGES = {
pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3"
};
-/**
- * Get a message with $0 placeholders replaced by arguments.
- */
-
-/* eslint max-len: 0 */
-
function get(key) {
- /*istanbul ignore next*/
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var msg = MESSAGES[key];
- if (!msg) throw new ReferenceError( /*istanbul ignore next*/"Unknown message " + /*istanbul ignore next*/(0, _stringify2.default)(key));
+ if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key));
- // stringify args
args = parseArgs(args);
- // replace $0 placeholders with args
return msg.replace(/\$(\d+)/g, function (str, i) {
return args[i - 1];
});
}
-/**
- * Stingify arguments to be used inside messages.
- */
-
function parseArgs(args) {
return args.map(function (val) {
if (val != null && val.inspect) {
return val.inspect();
} else {
try {
- return (/*istanbul ignore next*/(0, _stringify2.default)(val) || val + ""
- );
+ return (0, _stringify2.default)(val) || val + "";
} catch (e) {
return util.inspect(val);
}
diff --git a/node_modules/babel-messages/package.json b/node_modules/babel-messages/package.json
index 5f621dc45..348dc5ee0 100644
--- a/node_modules/babel-messages/package.json
+++ b/node_modules/babel-messages/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-messages",
- "version": "6.8.0",
+ "version": "6.23.0",
"description": "Collection of debug messages used by Babel.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,6 +8,6 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-messages",
"main": "lib/index.js",
"dependencies": {
- "babel-runtime": "^6.0.0"
+ "babel-runtime": "^6.22.0"
}
}
diff --git a/node_modules/babel-runtime/helpers/asyncGenerator.js b/node_modules/babel-runtime/helpers/asyncGenerator.js
index 574b28a50..ebbea0964 100644
--- a/node_modules/babel-runtime/helpers/asyncGenerator.js
+++ b/node_modules/babel-runtime/helpers/asyncGenerator.js
@@ -2,10 +2,6 @@
exports.__esModule = true;
-var _asyncIterator = require("../core-js/symbol/async-iterator");
-
-var _asyncIterator2 = _interopRequireDefault(_asyncIterator);
-
var _symbol = require("../core-js/symbol");
var _symbol2 = _interopRequireDefault(_symbol);
@@ -99,8 +95,8 @@ exports.default = function () {
}
}
- if (typeof _symbol2.default === "function" && _asyncIterator2.default) {
- AsyncGenerator.prototype[_asyncIterator2.default] = function () {
+ if (typeof _symbol2.default === "function" && _symbol2.default.asyncIterator) {
+ AsyncGenerator.prototype[_symbol2.default.asyncIterator] = function () {
return this;
};
}
diff --git a/node_modules/babel-runtime/helpers/asyncIterator.js b/node_modules/babel-runtime/helpers/asyncIterator.js
index 03409891f..b542b6c78 100644
--- a/node_modules/babel-runtime/helpers/asyncIterator.js
+++ b/node_modules/babel-runtime/helpers/asyncIterator.js
@@ -10,10 +10,6 @@ var _iterator = require("../core-js/symbol/iterator");
var _iterator2 = _interopRequireDefault(_iterator);
-var _asyncIterator = require("../core-js/symbol/async-iterator");
-
-var _asyncIterator2 = _interopRequireDefault(_asyncIterator);
-
var _symbol = require("../core-js/symbol");
var _symbol2 = _interopRequireDefault(_symbol);
@@ -22,8 +18,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.default = function (iterable) {
if (typeof _symbol2.default === "function") {
- if (_asyncIterator2.default) {
- var method = iterable[_asyncIterator2.default];
+ if (_symbol2.default.asyncIterator) {
+ var method = iterable[_symbol2.default.asyncIterator];
if (method != null) return method.call(iterable);
}
diff --git a/node_modules/babel-runtime/package.json b/node_modules/babel-runtime/package.json
index 05c419af1..aa64eadd5 100644
--- a/node_modules/babel-runtime/package.json
+++ b/node_modules/babel-runtime/package.json
@@ -1,16 +1,16 @@
{
"name": "babel-runtime",
- "version": "6.18.0",
+ "version": "6.23.0",
"description": "babel selfContained runtime",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-runtime",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {
"core-js": "^2.4.0",
- "regenerator-runtime": "^0.9.5"
+ "regenerator-runtime": "^0.10.0"
},
"devDependencies": {
- "babel-helpers": "^6.6.0",
- "babel-plugin-transform-runtime": "^6.9.0"
+ "babel-helpers": "^6.22.0",
+ "babel-plugin-transform-runtime": "^6.23.0"
}
}
diff --git a/node_modules/babel-template/README.md b/node_modules/babel-template/README.md
index 77f73a8c2..c73507af5 100644
--- a/node_modules/babel-template/README.md
+++ b/node_modules/babel-template/README.md
@@ -7,30 +7,30 @@ In computer science, this is known as an implementation of quasiquotes.
## Install
```sh
-$ npm install babel-template
+npm install --save-dev babel-template
```
## Usage
```js
-import template from 'babel-template';
-import generate from 'babel-generator';
-import * as t from 'babel-types';
+import template from "babel-template";
+import generate from "babel-generator";
+import * as t from "babel-types";
const buildRequire = template(`
var IMPORT_NAME = require(SOURCE);
`);
const ast = buildRequire({
- IMPORT_NAME: t.identifier('myModule'),
- SOURCE: t.stringLiteral('my-module')
+ IMPORT_NAME: t.identifier("myModule"),
+ SOURCE: t.stringLiteral("my-module")
});
console.log(generate(ast).code);
```
```js
-var myModule = require('my-module');
+const myModule = require("my-module");
```
## API
diff --git a/node_modules/babel-template/lib/index.js b/node_modules/babel-template/lib/index.js
index ecf0da4cc..ab5ec9938 100644
--- a/node_modules/babel-template/lib/index.js
+++ b/node_modules/babel-template/lib/index.js
@@ -87,8 +87,8 @@ var TEMPLATE_SKIP = (0, _symbol2.default)();
function useTemplate(ast, nodes) {
ast = (0, _cloneDeep2.default)(ast);
- var _ast = ast;
- var program = _ast.program;
+ var _ast = ast,
+ program = _ast.program;
if (nodes.length) {
diff --git a/node_modules/babel-template/package.json b/node_modules/babel-template/package.json
index 4446d9c5d..e07a8025b 100644
--- a/node_modules/babel-template/package.json
+++ b/node_modules/babel-template/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-template",
- "version": "6.16.0",
+ "version": "6.24.1",
"description": "Generate an AST from a string template.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -9,9 +9,9 @@
"main": "lib/index.js",
"dependencies": {
"babylon": "^6.11.0",
- "babel-traverse": "^6.16.0",
- "babel-types": "^6.16.0",
- "babel-runtime": "^6.9.0",
+ "babel-traverse": "^6.24.1",
+ "babel-types": "^6.24.1",
+ "babel-runtime": "^6.22.0",
"lodash": "^4.2.0"
}
}
diff --git a/node_modules/babel-traverse/lib/cache.js b/node_modules/babel-traverse/lib/cache.js
index c88cdba83..b337eec6b 100644
--- a/node_modules/babel-traverse/lib/cache.js
+++ b/node_modules/babel-traverse/lib/cache.js
@@ -8,6 +8,8 @@ var _weakMap = require("babel-runtime/core-js/weak-map");
var _weakMap2 = _interopRequireDefault(_weakMap);
exports.clear = clear;
+exports.clearPath = clearPath;
+exports.clearScope = clearScope;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -15,6 +17,14 @@ var path = exports.path = new _weakMap2.default();
var scope = exports.scope = new _weakMap2.default();
function clear() {
+ clearPath();
+ clearScope();
+}
+
+function clearPath() {
exports.path = path = new _weakMap2.default();
+}
+
+function clearScope() {
exports.scope = scope = new _weakMap2.default();
} \ No newline at end of file
diff --git a/node_modules/babel-traverse/lib/index.js b/node_modules/babel-traverse/lib/index.js
index a5d1468d3..19a14cea5 100644
--- a/node_modules/babel-traverse/lib/index.js
+++ b/node_modules/babel-traverse/lib/index.js
@@ -155,6 +155,9 @@ traverse.clearCache = function () {
cache.clear();
};
+traverse.clearCache.clearPath = cache.clearPath;
+traverse.clearCache.clearScope = cache.clearScope;
+
traverse.copyCache = function (source, destination) {
if (cache.path.has(source)) {
cache.path.set(destination, cache.path.get(source));
diff --git a/node_modules/babel-traverse/lib/path/ancestry.js b/node_modules/babel-traverse/lib/path/ancestry.js
index 30f675b04..2a8c32272 100644
--- a/node_modules/babel-traverse/lib/path/ancestry.js
+++ b/node_modules/babel-traverse/lib/path/ancestry.js
@@ -13,6 +13,8 @@ exports.getStatementParent = getStatementParent;
exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
exports.getAncestry = getAncestry;
+exports.isAncestor = isAncestor;
+exports.isDescendant = isDescendant;
exports.inType = inType;
exports.inShadow = inShadow;
@@ -181,6 +183,16 @@ function getAncestry() {
return paths;
}
+function isAncestor(maybeDescendant) {
+ return maybeDescendant.isDescendant(this);
+}
+
+function isDescendant(maybeAncestor) {
+ return !!this.findParent(function (parent) {
+ return parent === maybeAncestor;
+ });
+}
+
function inType() {
var path = this;
while (path) {
diff --git a/node_modules/babel-traverse/lib/path/comments.js b/node_modules/babel-traverse/lib/path/comments.js
index 215add0d2..800018cc3 100644
--- a/node_modules/babel-traverse/lib/path/comments.js
+++ b/node_modules/babel-traverse/lib/path/comments.js
@@ -5,6 +5,8 @@ exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
exports.addComment = addComment;
exports.addComments = addComments;
function shareCommentsWithSiblings() {
+ if (typeof this.key === "string") return;
+
var node = this.node;
if (!node) return;
diff --git a/node_modules/babel-traverse/lib/path/evaluation.js b/node_modules/babel-traverse/lib/path/evaluation.js
index 724d4728e..86aac21b5 100644
--- a/node_modules/babel-traverse/lib/path/evaluation.js
+++ b/node_modules/babel-traverse/lib/path/evaluation.js
@@ -156,15 +156,19 @@ function evaluate() {
return deopt(binding.path);
}
+ if (binding && path.node.start < binding.path.node.end) {
+ return deopt(binding.path);
+ }
+
if (binding && binding.hasValue) {
return binding.value;
} else {
if (node.name === "undefined") {
- return undefined;
+ return binding ? deopt(binding.path) : undefined;
} else if (node.name === "Infinity") {
- return Infinity;
+ return binding ? deopt(binding.path) : Infinity;
} else if (node.name === "NaN") {
- return NaN;
+ return binding ? deopt(binding.path) : NaN;
}
var resolved = path.resolve();
diff --git a/node_modules/babel-traverse/lib/path/family.js b/node_modules/babel-traverse/lib/path/family.js
index c3a60fdfd..4dd375298 100644
--- a/node_modules/babel-traverse/lib/path/family.js
+++ b/node_modules/babel-traverse/lib/path/family.js
@@ -2,6 +2,10 @@
exports.__esModule = true;
+var _create = require("babel-runtime/core-js/object/create");
+
+var _create2 = _interopRequireDefault(_create);
+
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
@@ -10,11 +14,17 @@ exports.getStatementParent = getStatementParent;
exports.getOpposite = getOpposite;
exports.getCompletionRecords = getCompletionRecords;
exports.getSibling = getSibling;
+exports.getPrevSibling = getPrevSibling;
+exports.getNextSibling = getNextSibling;
+exports.getAllNextSiblings = getAllNextSiblings;
+exports.getAllPrevSiblings = getAllPrevSiblings;
exports.get = get;
exports._getKey = _getKey;
exports._getPattern = _getPattern;
exports.getBindingIdentifiers = getBindingIdentifiers;
exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
+exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
+exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
var _index = require("./index");
@@ -91,6 +101,36 @@ function getSibling(key) {
});
}
+function getPrevSibling() {
+ return this.getSibling(this.key - 1);
+}
+
+function getNextSibling() {
+ return this.getSibling(this.key + 1);
+}
+
+function getAllNextSiblings() {
+ var _key = this.key;
+ var sibling = this.getSibling(++_key);
+ var siblings = [];
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(++_key);
+ }
+ return siblings;
+}
+
+function getAllPrevSiblings() {
+ var _key = this.key;
+ var sibling = this.getSibling(--_key);
+ var siblings = [];
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(--_key);
+ }
+ return siblings;
+}
+
function get(key, context) {
if (context === true) context = this.context;
var parts = key.split(".");
@@ -162,4 +202,65 @@ function getBindingIdentifiers(duplicates) {
function getOuterBindingIdentifiers(duplicates) {
return t.getOuterBindingIdentifiers(this.node, duplicates);
+}
+
+function getBindingIdentifierPaths() {
+ var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+ var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ var path = this;
+ var search = [].concat(path);
+ var ids = (0, _create2.default)(null);
+
+ while (search.length) {
+ var id = search.shift();
+ if (!id) continue;
+ if (!id.node) continue;
+
+ var keys = t.getBindingIdentifiers.keys[id.node.type];
+
+ if (id.isIdentifier()) {
+ if (duplicates) {
+ var _ids = ids[id.node.name] = ids[id.node.name] || [];
+ _ids.push(id);
+ } else {
+ ids[id.node.name] = id;
+ }
+ continue;
+ }
+
+ if (id.isExportDeclaration()) {
+ var declaration = id.get("declaration");
+ if (declaration.isDeclaration()) {
+ search.push(declaration);
+ }
+ continue;
+ }
+
+ if (outerOnly) {
+ if (id.isFunctionDeclaration()) {
+ search.push(id.get("id"));
+ continue;
+ }
+ if (id.isFunctionExpression()) {
+ continue;
+ }
+ }
+
+ if (keys) {
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var child = id.get(key);
+ if (Array.isArray(child) || child.node) {
+ search = search.concat(child);
+ }
+ }
+ }
+ }
+
+ return ids;
+}
+
+function getOuterBindingIdentifierPaths(duplicates) {
+ return this.getBindingIdentifierPaths(duplicates, true);
} \ No newline at end of file
diff --git a/node_modules/babel-traverse/lib/path/index.js b/node_modules/babel-traverse/lib/path/index.js
index d97a3d190..dd8ae2464 100644
--- a/node_modules/babel-traverse/lib/path/index.js
+++ b/node_modules/babel-traverse/lib/path/index.js
@@ -74,12 +74,12 @@ var NodePath = function () {
}
NodePath.get = function get(_ref) {
- var hub = _ref.hub;
- var parentPath = _ref.parentPath;
- var parent = _ref.parent;
- var container = _ref.container;
- var listKey = _ref.listKey;
- var key = _ref.key;
+ var hub = _ref.hub,
+ parentPath = _ref.parentPath,
+ parent = _ref.parent,
+ container = _ref.container,
+ listKey = _ref.listKey,
+ key = _ref.key;
if (!hub && parentPath) {
hub = parentPath.hub;
diff --git a/node_modules/babel-traverse/lib/path/inference/inferer-reference.js b/node_modules/babel-traverse/lib/path/inference/inferer-reference.js
index 22ab3053a..3a8ff31e6 100644
--- a/node_modules/babel-traverse/lib/path/inference/inferer-reference.js
+++ b/node_modules/babel-traverse/lib/path/inference/inferer-reference.js
@@ -44,15 +44,13 @@ function getTypeAnnotationBindingConstantViolations(path, name) {
var testType = getConditionalAnnotation(path, name);
if (testType) {
- (function () {
- var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
+ var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
- constantViolations = constantViolations.filter(function (path) {
- return testConstantViolations.indexOf(path) < 0;
- });
+ constantViolations = constantViolations.filter(function (path) {
+ return testConstantViolations.indexOf(path) < 0;
+ });
- types.push(testType.typeAnnotation);
- })();
+ types.push(testType.typeAnnotation);
}
if (constantViolations.length) {
diff --git a/node_modules/babel-traverse/lib/path/introspection.js b/node_modules/babel-traverse/lib/path/introspection.js
index a84f9d219..27be03912 100644
--- a/node_modules/babel-traverse/lib/path/introspection.js
+++ b/node_modules/babel-traverse/lib/path/introspection.js
@@ -3,10 +3,6 @@
exports.__esModule = true;
exports.is = undefined;
-var _typeof2 = require("babel-runtime/helpers/typeof");
-
-var _typeof3 = _interopRequireDefault(_typeof2);
-
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
@@ -319,8 +315,6 @@ function resolve(dangerous, resolved) {
}
function _resolve(dangerous, resolved) {
- var _this = this;
-
if (resolved && resolved.indexOf(this) >= 0) return;
resolved = resolved || [];
@@ -339,20 +333,12 @@ function _resolve(dangerous, resolved) {
if (binding.kind === "module") return;
if (binding.path !== this) {
- var _ret = function () {
- var ret = binding.path.resolve(dangerous, resolved);
-
- if (_this.find(function (parent) {
- return parent.node === ret.node;
- })) return {
- v: void 0
- };
- return {
- v: ret
- };
- }();
-
- if ((typeof _ret === "undefined" ? "undefined" : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
+ var ret = binding.path.resolve(dangerous, resolved);
+
+ if (this.find(function (parent) {
+ return parent.node === ret.node;
+ })) return;
+ return ret;
}
} else if (this.isTypeCastExpression()) {
return this.get("expression").resolve(dangerous, resolved);
diff --git a/node_modules/babel-traverse/lib/path/lib/hoister.js b/node_modules/babel-traverse/lib/path/lib/hoister.js
index bcf8d78c4..3cdcdeb56 100644
--- a/node_modules/babel-traverse/lib/path/lib/hoister.js
+++ b/node_modules/babel-traverse/lib/path/lib/hoister.js
@@ -2,14 +2,14 @@
exports.__esModule = true;
-var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
+var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
var _babelTypes = require("babel-types");
var t = _interopRequireWildcard(_babelTypes);
@@ -20,35 +20,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var referenceVisitor = {
ReferencedIdentifier: function ReferencedIdentifier(path, state) {
- if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name)) {
+ if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
return;
}
+ if (path.node.name === "this") {
+ var scope = path.scope;
+ do {
+ if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
+ } while (scope = scope.parent);
+ if (scope) state.breakOnScopePaths.push(scope.path);
+ }
+
var binding = path.scope.getBinding(path.node.name);
if (!binding) return;
if (binding !== state.scope.getBinding(path.node.name)) return;
- if (binding.constant) {
- state.bindings[path.node.name] = binding;
- } else {
- for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- var violationPath = _ref;
-
- state.breakOnScopePaths = state.breakOnScopePaths.concat(violationPath.getAncestry());
- }
- }
+ state.bindings[path.node.name] = binding;
}
};
@@ -57,10 +46,15 @@ var PathHoister = function () {
(0, _classCallCheck3.default)(this, PathHoister);
this.breakOnScopePaths = [];
+
this.bindings = {};
+
this.scopes = [];
+
this.scope = scope;
this.path = path;
+
+ this.attachAfter = false;
}
PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) {
@@ -107,7 +101,29 @@ var PathHoister = function () {
if (binding.kind === "param") continue;
- if (binding.path.getStatementParent().key > path.key) return;
+ if (this.getAttachmentParentForPath(binding.path).key > path.key) {
+ this.attachAfter = true;
+ path = binding.path;
+
+ for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
+ var _ref;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
+ }
+
+ var violationPath = _ref;
+
+ if (this.getAttachmentParentForPath(violationPath).key > path.key) {
+ path = violationPath;
+ }
+ }
+ }
}
}
@@ -118,6 +134,7 @@ var PathHoister = function () {
var scopes = this.scopes;
var scope = scopes.pop();
+
if (!scope) return;
if (scope.path.isFunction()) {
@@ -126,16 +143,22 @@ var PathHoister = function () {
return scope.path.get("body").get("body")[0];
} else {
- return this.getNextScopeStatementParent();
+ return this.getNextScopeAttachmentParent();
}
} else if (scope.path.isProgram()) {
- return this.getNextScopeStatementParent();
+ return this.getNextScopeAttachmentParent();
}
};
- PathHoister.prototype.getNextScopeStatementParent = function getNextScopeStatementParent() {
+ PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
var scope = this.scopes.pop();
- if (scope) return scope.path.getStatementParent();
+ if (scope) return this.getAttachmentParentForPath(scope.path);
+ };
+
+ PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
+ do {
+ if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path;
+ } while (path = path.parentPath);
};
PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) {
@@ -143,7 +166,8 @@ var PathHoister = function () {
if (!scope.hasOwnBinding(name)) continue;
var binding = this.bindings[name];
- if (binding.kind === "param") return true;
+
+ if (binding.kind === "param" && binding.constant) return true;
}
return false;
};
@@ -163,7 +187,10 @@ var PathHoister = function () {
if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
var uid = attachTo.scope.generateUidIdentifier("ref");
- attachTo.insertBefore([t.variableDeclaration("var", [t.variableDeclarator(uid, this.path.node)])]);
+ var declarator = t.variableDeclarator(uid, this.path.node);
+
+ var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
+ attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
var parent = this.path.parentPath;
if (parent.isJSXElement() && this.path.container === parent.node.children) {
diff --git a/node_modules/babel-traverse/lib/path/lib/removal-hooks.js b/node_modules/babel-traverse/lib/path/lib/removal-hooks.js
index 6838b74d4..6058ec1fb 100644
--- a/node_modules/babel-traverse/lib/path/lib/removal-hooks.js
+++ b/node_modules/babel-traverse/lib/path/lib/removal-hooks.js
@@ -2,22 +2,7 @@
exports.__esModule = true;
var hooks = exports.hooks = [function (self, parent) {
- if (self.key === "body" && parent.isArrowFunctionExpression()) {
- self.replaceWith(self.scope.buildUndefinedNode());
- return true;
- }
-}, function (self, parent) {
- var removeParent = false;
-
- removeParent = removeParent || self.key === "test" && (parent.isWhile() || parent.isSwitchCase());
-
- removeParent = removeParent || self.key === "declaration" && parent.isExportDeclaration();
-
- removeParent = removeParent || self.key === "body" && parent.isLabeledStatement();
-
- removeParent = removeParent || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1;
-
- removeParent = removeParent || self.key === "expression" && parent.isExpressionStatement();
+ var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
if (removeParent) {
parent.remove();
@@ -38,9 +23,9 @@ var hooks = exports.hooks = [function (self, parent) {
return true;
}
}, function (self, parent) {
- if (parent.isIfStatement() && (self.key === 'consequent' || self.key === 'alternate') || parent.isLoop() && self.key === 'body') {
+ if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
self.replaceWith({
- type: 'BlockStatement',
+ type: "BlockStatement",
body: []
});
return true;
diff --git a/node_modules/babel-traverse/lib/path/lib/virtual-types.js b/node_modules/babel-traverse/lib/path/lib/virtual-types.js
index 1cb61cc8c..80bb5b925 100644
--- a/node_modules/babel-traverse/lib/path/lib/virtual-types.js
+++ b/node_modules/babel-traverse/lib/path/lib/virtual-types.js
@@ -12,8 +12,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
var ReferencedIdentifier = exports.ReferencedIdentifier = {
types: ["Identifier", "JSXIdentifier"],
checkPath: function checkPath(_ref, opts) {
- var node = _ref.node;
- var parent = _ref.parent;
+ var node = _ref.node,
+ parent = _ref.parent;
if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
if (t.isJSXIdentifier(node, opts)) {
@@ -30,8 +30,8 @@ var ReferencedIdentifier = exports.ReferencedIdentifier = {
var ReferencedMemberExpression = exports.ReferencedMemberExpression = {
types: ["MemberExpression"],
checkPath: function checkPath(_ref2) {
- var node = _ref2.node;
- var parent = _ref2.parent;
+ var node = _ref2.node,
+ parent = _ref2.parent;
return t.isMemberExpression(node) && t.isReferenced(node, parent);
}
@@ -40,8 +40,8 @@ var ReferencedMemberExpression = exports.ReferencedMemberExpression = {
var BindingIdentifier = exports.BindingIdentifier = {
types: ["Identifier"],
checkPath: function checkPath(_ref3) {
- var node = _ref3.node;
- var parent = _ref3.parent;
+ var node = _ref3.node,
+ parent = _ref3.parent;
return t.isIdentifier(node) && t.isBinding(node, parent);
}
@@ -50,8 +50,8 @@ var BindingIdentifier = exports.BindingIdentifier = {
var Statement = exports.Statement = {
types: ["Statement"],
checkPath: function checkPath(_ref4) {
- var node = _ref4.node;
- var parent = _ref4.parent;
+ var node = _ref4.node,
+ parent = _ref4.parent;
if (t.isStatement(node)) {
if (t.isVariableDeclaration(node)) {
@@ -122,7 +122,7 @@ var Pure = exports.Pure = {
};
var Flow = exports.Flow = {
- types: ["Flow", "ImportDeclaration", "ExportDeclaration"],
+ types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
checkPath: function checkPath(_ref5) {
var node = _ref5.node;
@@ -132,6 +132,8 @@ var Flow = exports.Flow = {
return node.importKind === "type" || node.importKind === "typeof";
} else if (t.isExportDeclaration(node)) {
return node.exportKind === "type";
+ } else if (t.isImportSpecifier(node)) {
+ return node.importKind === "type" || node.importKind === "typeof";
} else {
return false;
}
diff --git a/node_modules/babel-traverse/lib/path/modification.js b/node_modules/babel-traverse/lib/path/modification.js
index a763f6d7b..30fb165b7 100644
--- a/node_modules/babel-traverse/lib/path/modification.js
+++ b/node_modules/babel-traverse/lib/path/modification.js
@@ -58,7 +58,7 @@ function insertBefore(nodes) {
if (this.node) nodes.push(this.node);
this._replaceWith(t.blockStatement(nodes));
} else {
- throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
+ throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
}
}
@@ -172,7 +172,7 @@ function insertAfter(nodes) {
if (this.node) nodes.unshift(this.node);
this._replaceWith(t.blockStatement(nodes));
} else {
- throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
+ throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
}
}
diff --git a/node_modules/babel-traverse/lib/path/replacement.js b/node_modules/babel-traverse/lib/path/replacement.js
index dc852334d..a60c73d54 100644
--- a/node_modules/babel-traverse/lib/path/replacement.js
+++ b/node_modules/babel-traverse/lib/path/replacement.js
@@ -230,10 +230,16 @@ function replaceExpressionWithStatements(nodes) {
return path.isLoop();
});
if (loop) {
- var callee = this.get("callee");
-
- var uid = callee.scope.generateDeclaredUidIdentifier("ret");
- callee.get("body").pushContainer("body", t.returnStatement(uid));
+ var uid = loop.getData("expressionReplacementReturnUid");
+
+ if (!uid) {
+ var callee = this.get("callee");
+ uid = callee.scope.generateDeclaredUidIdentifier("ret");
+ callee.get("body").pushContainer("body", t.returnStatement(uid));
+ loop.setData("expressionReplacementReturnUid", uid);
+ } else {
+ uid = t.identifier(uid.name);
+ }
path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression));
} else {
diff --git a/node_modules/babel-traverse/lib/scope/binding.js b/node_modules/babel-traverse/lib/scope/binding.js
index b1acf1b10..0730cdfc0 100644
--- a/node_modules/babel-traverse/lib/scope/binding.js
+++ b/node_modules/babel-traverse/lib/scope/binding.js
@@ -10,11 +10,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var Binding = function () {
function Binding(_ref) {
- var existing = _ref.existing;
- var identifier = _ref.identifier;
- var scope = _ref.scope;
- var path = _ref.path;
- var kind = _ref.kind;
+ var existing = _ref.existing,
+ identifier = _ref.identifier,
+ scope = _ref.scope,
+ path = _ref.path,
+ kind = _ref.kind;
(0, _classCallCheck3.default)(this, Binding);
this.identifier = identifier;
diff --git a/node_modules/babel-traverse/lib/scope/index.js b/node_modules/babel-traverse/lib/scope/index.js
index 36cfb3429..c960a7322 100644
--- a/node_modules/babel-traverse/lib/scope/index.js
+++ b/node_modules/babel-traverse/lib/scope/index.js
@@ -93,21 +93,76 @@ function getCache(path, parentScope, self) {
}
}
+function gatherNodeParts(node, parts) {
+ if (t.isModuleDeclaration(node)) {
+ if (node.source) {
+ gatherNodeParts(node.source, parts);
+ } else if (node.specifiers && node.specifiers.length) {
+ for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
+ var _ref2;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
+
+ var specifier = _ref2;
+
+ gatherNodeParts(specifier, parts);
+ }
+ } else if (node.declaration) {
+ gatherNodeParts(node.declaration, parts);
+ }
+ } else if (t.isModuleSpecifier(node)) {
+ gatherNodeParts(node.local, parts);
+ } else if (t.isMemberExpression(node)) {
+ gatherNodeParts(node.object, parts);
+ gatherNodeParts(node.property, parts);
+ } else if (t.isIdentifier(node)) {
+ parts.push(node.name);
+ } else if (t.isLiteral(node)) {
+ parts.push(node.value);
+ } else if (t.isCallExpression(node)) {
+ gatherNodeParts(node.callee, parts);
+ } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) {
+ for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
+ var _ref3;
+
+ if (_isArray3) {
+ if (_i3 >= _iterator3.length) break;
+ _ref3 = _iterator3[_i3++];
+ } else {
+ _i3 = _iterator3.next();
+ if (_i3.done) break;
+ _ref3 = _i3.value;
+ }
+
+ var prop = _ref3;
+
+ gatherNodeParts(prop.key || prop.argument, parts);
+ }
+ }
+}
+
var collectorVisitor = {
For: function For(path) {
- for (var _iterator2 = t.FOR_INIT_KEYS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
- var _ref2;
+ for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
+ var _ref4;
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
+ if (_isArray4) {
+ if (_i4 >= _iterator4.length) break;
+ _ref4 = _iterator4[_i4++];
} else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
+ _i4 = _iterator4.next();
+ if (_i4.done) break;
+ _ref4 = _i4.value;
}
- var key = _ref2;
+ var key = _ref4;
var declar = path.get(key);
if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar);
@@ -133,8 +188,8 @@ var collectorVisitor = {
ExportDeclaration: {
exit: function exit(path) {
- var node = path.node;
- var scope = path.scope;
+ var node = path.node,
+ scope = path.scope;
var declar = node.declaration;
if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) {
@@ -144,19 +199,19 @@ var collectorVisitor = {
var binding = scope.getBinding(_id.name);
if (binding) binding.reference(path);
} else if (t.isVariableDeclaration(declar)) {
- for (var _iterator3 = declar.declarations, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
- var _ref3;
+ for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
+ var _ref5;
- if (_isArray3) {
- if (_i3 >= _iterator3.length) break;
- _ref3 = _iterator3[_i3++];
+ if (_isArray5) {
+ if (_i5 >= _iterator5.length) break;
+ _ref5 = _iterator5[_i5++];
} else {
- _i3 = _iterator3.next();
- if (_i3.done) break;
- _ref3 = _i3.value;
+ _i5 = _iterator5.next();
+ if (_i5.done) break;
+ _ref5 = _i5.value;
}
- var decl = _ref3;
+ var decl = _ref5;
var ids = t.getBindingIdentifiers(decl);
for (var name in ids) {
@@ -197,19 +252,19 @@ var collectorVisitor = {
},
Block: function Block(path) {
var paths = path.get("body");
- for (var _iterator4 = paths, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
- var _ref4;
+ for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
+ var _ref6;
- if (_isArray4) {
- if (_i4 >= _iterator4.length) break;
- _ref4 = _iterator4[_i4++];
+ if (_isArray6) {
+ if (_i6 >= _iterator6.length) break;
+ _ref6 = _iterator6[_i6++];
} else {
- _i4 = _iterator4.next();
- if (_i4.done) break;
- _ref4 = _i4.value;
+ _i6 = _iterator6.next();
+ if (_i6.done) break;
+ _ref6 = _i6.value;
}
- var bodyPath = _ref4;
+ var bodyPath = _ref6;
if (bodyPath.isFunctionDeclaration()) {
path.scope.getBlockParent().registerDeclaration(bodyPath);
@@ -297,63 +352,7 @@ var Scope = function () {
}
var parts = [];
-
- var add = function add(node) {
- if (t.isModuleDeclaration(node)) {
- if (node.source) {
- add(node.source);
- } else if (node.specifiers && node.specifiers.length) {
- for (var _iterator5 = node.specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
- var _ref5;
-
- if (_isArray5) {
- if (_i5 >= _iterator5.length) break;
- _ref5 = _iterator5[_i5++];
- } else {
- _i5 = _iterator5.next();
- if (_i5.done) break;
- _ref5 = _i5.value;
- }
-
- var specifier = _ref5;
-
- add(specifier);
- }
- } else if (node.declaration) {
- add(node.declaration);
- }
- } else if (t.isModuleSpecifier(node)) {
- add(node.local);
- } else if (t.isMemberExpression(node)) {
- add(node.object);
- add(node.property);
- } else if (t.isIdentifier(node)) {
- parts.push(node.name);
- } else if (t.isLiteral(node)) {
- parts.push(node.value);
- } else if (t.isCallExpression(node)) {
- add(node.callee);
- } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) {
- for (var _iterator6 = node.properties, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
- var _ref6;
-
- if (_isArray6) {
- if (_i6 >= _iterator6.length) break;
- _ref6 = _iterator6[_i6++];
- } else {
- _i6 = _iterator6.next();
- if (_i6.done) break;
- _ref6 = _i6.value;
- }
-
- var prop = _ref6;
-
- add(prop.key || prop.argument);
- }
- }
- };
-
- add(node);
+ gatherNodeParts(node, parts);
var id = parts.join("$");
id = id.replace(/^_/, "") || defaultName || "ref";
@@ -393,11 +392,7 @@ var Scope = function () {
if (kind === "hoisted" && local.kind === "let") return;
- var duplicate = false;
-
- if (!duplicate) duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module";
-
- if (!duplicate) duplicate = local.kind === "param" && (kind === "let" || kind === "const");
+ var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
if (duplicate) {
throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError);
diff --git a/node_modules/babel-traverse/lib/scope/lib/renamer.js b/node_modules/babel-traverse/lib/scope/lib/renamer.js
index b159e7754..a3b970515 100644
--- a/node_modules/babel-traverse/lib/scope/lib/renamer.js
+++ b/node_modules/babel-traverse/lib/scope/lib/renamer.js
@@ -108,11 +108,11 @@ var Renamer = function () {
};
Renamer.prototype.rename = function rename(block) {
- var binding = this.binding;
- var oldName = this.oldName;
- var newName = this.newName;
- var scope = binding.scope;
- var path = binding.path;
+ var binding = this.binding,
+ oldName = this.oldName,
+ newName = this.newName;
+ var scope = binding.scope,
+ path = binding.path;
var parentDeclar = path.find(function (path) {
diff --git a/node_modules/babel-traverse/package.json b/node_modules/babel-traverse/package.json
index 3aea61676..cf762e7eb 100644
--- a/node_modules/babel-traverse/package.json
+++ b/node_modules/babel-traverse/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-traverse",
- "version": "6.18.0",
+ "version": "6.24.1",
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,14 +8,17 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-traverse",
"main": "lib/index.js",
"dependencies": {
- "babel-code-frame": "^6.16.0",
- "babel-messages": "^6.8.0",
- "babel-runtime": "^6.9.0",
- "babel-types": "^6.18.0",
- "babylon": "^6.11.0",
+ "babel-code-frame": "^6.22.0",
+ "babel-messages": "^6.23.0",
+ "babel-runtime": "^6.22.0",
+ "babel-types": "^6.24.1",
+ "babylon": "^6.15.0",
"debug": "^2.2.0",
"globals": "^9.0.0",
"invariant": "^2.2.0",
"lodash": "^4.2.0"
+ },
+ "devDependencies": {
+ "babel-generator": "^6.24.1"
}
}
diff --git a/node_modules/babel-types/README.md b/node_modules/babel-types/README.md
index 4c0162feb..683388362 100644
--- a/node_modules/babel-types/README.md
+++ b/node_modules/babel-types/README.md
@@ -1,19 +1,33 @@
# babel-types
-This module contains methods for building ASTs manually and for checking the types of AST nodes.
+> This module contains methods for building ASTs manually and for checking the types of AST nodes.
+
+## Install
+
+```sh
+npm install --save-dev babel-types
+```
## API
<!-- begin generated section -->
-### t.anyTypeAnnotation()
+### anyTypeAnnotation
+```javascript
+t.anyTypeAnnotation()
+```
See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.arrayExpression(elements)
+---
+
+### arrayExpression
+```javascript
+t.arrayExpression(elements)
+```
See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`.
@@ -21,7 +35,12 @@ Aliases: `Expression`
- `elements`: `Array<null | Expression | SpreadElement>` (default: `[]`)
-### t.arrayPattern(elements, typeAnnotation)
+---
+
+### arrayPattern
+```javascript
+t.arrayPattern(elements, typeAnnotation)
+```
See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`.
@@ -31,7 +50,12 @@ Aliases: `Pattern`, `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.arrayTypeAnnotation(elementType)
+---
+
+### arrayTypeAnnotation
+```javascript
+t.arrayTypeAnnotation(elementType)
+```
See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`.
@@ -39,7 +63,12 @@ Aliases: `Flow`
- `elementType` (required)
-### t.arrowFunctionExpression(params, body, async)
+---
+
+### arrowFunctionExpression
+```javascript
+t.arrowFunctionExpression(params, body, async)
+```
See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`.
@@ -51,7 +80,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`,
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.assignmentExpression(operator, left, right)
+---
+
+### assignmentExpression
+```javascript
+t.assignmentExpression(operator, left, right)
+```
See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`.
@@ -61,7 +95,12 @@ Aliases: `Expression`
- `left`: `LVal` (required)
- `right`: `Expression` (required)
-### t.assignmentPattern(left, right)
+---
+
+### assignmentPattern
+```javascript
+t.assignmentPattern(left, right)
+```
See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`.
@@ -71,7 +110,12 @@ Aliases: `Pattern`, `LVal`
- `right`: `Expression` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.awaitExpression(argument)
+---
+
+### awaitExpression
+```javascript
+t.awaitExpression(argument)
+```
See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`.
@@ -79,7 +123,12 @@ Aliases: `Expression`, `Terminatorless`
- `argument`: `Expression` (required)
-### t.binaryExpression(operator, left, right)
+---
+
+### binaryExpression
+```javascript
+t.binaryExpression(operator, left, right)
+```
See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`.
@@ -89,7 +138,12 @@ Aliases: `Binary`, `Expression`
- `left`: `Expression` (required)
- `right`: `Expression` (required)
-### t.bindExpression(object, callee)
+---
+
+### bindExpression
+```javascript
+t.bindExpression(object, callee)
+```
See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`.
@@ -98,7 +152,12 @@ Aliases: `Expression`
- `object` (required)
- `callee` (required)
-### t.blockStatement(body, directives)
+---
+
+### blockStatement
+```javascript
+t.blockStatement(body, directives)
+```
See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`.
@@ -107,7 +166,12 @@ Aliases: `Scopable`, `BlockParent`, `Block`, `Statement`
- `body`: `Array<Statement>` (required)
- `directives`: `Array<Directive>` (default: `[]`)
-### t.booleanLiteral(value)
+---
+
+### booleanLiteral
+```javascript
+t.booleanLiteral(value)
+```
See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`.
@@ -115,21 +179,36 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `boolean` (required)
-### t.booleanLiteralTypeAnnotation()
+---
+
+### booleanLiteralTypeAnnotation
+```javascript
+t.booleanLiteralTypeAnnotation()
+```
See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.booleanTypeAnnotation()
+---
+
+### booleanTypeAnnotation
+```javascript
+t.booleanTypeAnnotation()
+```
See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.breakStatement(label)
+---
+
+### breakStatement
+```javascript
+t.breakStatement(label)
+```
See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`.
@@ -137,7 +216,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `label`: `Identifier` (default: `null`)
-### t.callExpression(callee, arguments)
+---
+
+### callExpression
+```javascript
+t.callExpression(callee, arguments)
+```
See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`.
@@ -146,7 +230,12 @@ Aliases: `Expression`
- `callee`: `Expression` (required)
- `arguments`: `Array<Expression | SpreadElement>` (required)
-### t.catchClause(param, body)
+---
+
+### catchClause
+```javascript
+t.catchClause(param, body)
+```
See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`.
@@ -155,13 +244,23 @@ Aliases: `Scopable`
- `param`: `Identifier` (required)
- `body`: `BlockStatement` (required)
-### t.classBody(body)
+---
+
+### classBody
+```javascript
+t.classBody(body)
+```
See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`.
- `body`: `Array<ClassMethod | ClassProperty>` (required)
-### t.classDeclaration(id, superClass, body, decorators)
+---
+
+### classDeclaration
+```javascript
+t.classDeclaration(id, superClass, body, decorators)
+```
See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`.
@@ -176,7 +275,12 @@ Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish`
- `superTypeParameters` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classExpression(id, superClass, body, decorators)
+---
+
+### classExpression
+```javascript
+t.classExpression(id, superClass, body, decorators)
+```
See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`.
@@ -191,7 +295,12 @@ Aliases: `Scopable`, `Class`, `Expression`, `Pureish`
- `superTypeParameters` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classImplements(id, typeParameters)
+---
+
+### classImplements
+```javascript
+t.classImplements(id, typeParameters)
+```
See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`.
@@ -200,7 +309,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.classMethod(kind, key, params, body, computed, static)
+---
+
+### classMethod
+```javascript
+t.classMethod(kind, key, params, body, computed, static)
+```
See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`.
@@ -218,7 +332,12 @@ Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.classProperty(key, value, typeAnnotation, decorators, computed)
+---
+
+### classProperty
+```javascript
+t.classProperty(key, value, typeAnnotation, decorators, computed)
+```
See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`.
@@ -230,7 +349,12 @@ Aliases: `Property`
- `decorators` (required)
- `computed`: `boolean` (default: `false`)
-### t.conditionalExpression(test, consequent, alternate)
+---
+
+### conditionalExpression
+```javascript
+t.conditionalExpression(test, consequent, alternate)
+```
See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`.
@@ -240,7 +364,12 @@ Aliases: `Expression`, `Conditional`
- `consequent`: `Expression` (required)
- `alternate`: `Expression` (required)
-### t.continueStatement(label)
+---
+
+### continueStatement
+```javascript
+t.continueStatement(label)
+```
See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`.
@@ -248,14 +377,24 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `label`: `Identifier` (default: `null`)
-### t.debuggerStatement()
+---
+
+### debuggerStatement
+```javascript
+t.debuggerStatement()
+```
See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`.
Aliases: `Statement`
-### t.declareClass(id, typeParameters, extends, body)
+---
+
+### declareClass
+```javascript
+t.declareClass(id, typeParameters, extends, body)
+```
See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`.
@@ -266,7 +405,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.declareFunction(id)
+---
+
+### declareFunction
+```javascript
+t.declareFunction(id)
+```
See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`.
@@ -274,7 +418,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
-### t.declareInterface(id, typeParameters, extends, body)
+---
+
+### declareInterface
+```javascript
+t.declareInterface(id, typeParameters, extends, body)
+```
See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`.
@@ -285,7 +434,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.declareModule(id, body)
+---
+
+### declareModule
+```javascript
+t.declareModule(id, body)
+```
See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`.
@@ -294,7 +448,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
- `body` (required)
-### t.declareModuleExports(typeAnnotation)
+---
+
+### declareModuleExports
+```javascript
+t.declareModuleExports(typeAnnotation)
+```
See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`.
@@ -302,7 +461,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeAnnotation` (required)
-### t.declareTypeAlias(id, typeParameters, right)
+---
+
+### declareTypeAlias
+```javascript
+t.declareTypeAlias(id, typeParameters, right)
+```
See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`.
@@ -312,7 +476,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeParameters` (required)
- `right` (required)
-### t.declareVariable(id)
+---
+
+### declareVariable
+```javascript
+t.declareVariable(id)
+```
See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`.
@@ -320,25 +489,45 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id` (required)
-### t.decorator(expression)
+---
+
+### decorator
+```javascript
+t.decorator(expression)
+```
See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`.
- `expression`: `Expression` (required)
-### t.directive(value)
+---
+
+### directive
+```javascript
+t.directive(value)
+```
See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`.
- `value`: `DirectiveLiteral` (required)
-### t.directiveLiteral(value)
+---
+
+### directiveLiteral
+```javascript
+t.directiveLiteral(value)
+```
See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`.
- `value`: `string` (required)
-### t.doExpression(body)
+---
+
+### doExpression
+```javascript
+t.doExpression(body)
+```
See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`.
@@ -346,7 +535,12 @@ Aliases: `Expression`
- `body`: `BlockStatement` (required)
-### t.doWhileStatement(test, body)
+---
+
+### doWhileStatement
+```javascript
+t.doWhileStatement(test, body)
+```
See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`.
@@ -355,28 +549,48 @@ Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
- `test`: `Expression` (required)
- `body`: `Statement` (required)
-### t.emptyStatement()
+---
+
+### emptyStatement
+```javascript
+t.emptyStatement()
+```
See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`.
Aliases: `Statement`
-### t.emptyTypeAnnotation()
+---
+
+### emptyTypeAnnotation
+```javascript
+t.emptyTypeAnnotation()
+```
See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.existentialTypeParam()
+---
+
+### existentialTypeParam
+```javascript
+t.existentialTypeParam()
+```
See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`.
Aliases: `Flow`
-### t.exportAllDeclaration(source)
+---
+
+### exportAllDeclaration
+```javascript
+t.exportAllDeclaration(source)
+```
See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`.
@@ -384,7 +598,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `source`: `StringLiteral` (required)
-### t.exportDefaultDeclaration(declaration)
+---
+
+### exportDefaultDeclaration
+```javascript
+t.exportDefaultDeclaration(declaration)
+```
See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`.
@@ -392,7 +611,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required)
-### t.exportDefaultSpecifier(exported)
+---
+
+### exportDefaultSpecifier
+```javascript
+t.exportDefaultSpecifier(exported)
+```
See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`.
@@ -400,7 +624,12 @@ Aliases: `ModuleSpecifier`
- `exported`: `Identifier` (required)
-### t.exportNamedDeclaration(declaration, specifiers, source)
+---
+
+### exportNamedDeclaration
+```javascript
+t.exportNamedDeclaration(declaration, specifiers, source)
+```
See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`.
@@ -410,7 +639,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration`
- `specifiers`: `Array<ExportSpecifier>` (required)
- `source`: `StringLiteral` (default: `null`)
-### t.exportNamespaceSpecifier(exported)
+---
+
+### exportNamespaceSpecifier
+```javascript
+t.exportNamespaceSpecifier(exported)
+```
See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`.
@@ -418,7 +652,12 @@ Aliases: `ModuleSpecifier`
- `exported`: `Identifier` (required)
-### t.exportSpecifier(local, exported)
+---
+
+### exportSpecifier
+```javascript
+t.exportSpecifier(local, exported)
+```
See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`.
@@ -427,7 +666,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
- `exported`: `Identifier` (required)
-### t.expressionStatement(expression)
+---
+
+### expressionStatement
+```javascript
+t.expressionStatement(expression)
+```
See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`.
@@ -435,7 +679,12 @@ Aliases: `Statement`, `ExpressionWrapper`
- `expression`: `Expression` (required)
-### t.file(program, comments, tokens)
+---
+
+### file
+```javascript
+t.file(program, comments, tokens)
+```
See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
@@ -443,7 +692,12 @@ See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`.
- `comments` (required)
- `tokens` (required)
-### t.forAwaitStatement(left, right, body)
+---
+
+### forAwaitStatement
+```javascript
+t.forAwaitStatement(left, right, body)
+```
See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`.
@@ -453,7 +707,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forInStatement(left, right, body)
+---
+
+### forInStatement
+```javascript
+t.forInStatement(left, right, body)
+```
See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`.
@@ -463,7 +722,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forOfStatement(left, right, body)
+---
+
+### forOfStatement
+```javascript
+t.forOfStatement(left, right, body)
+```
See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`.
@@ -473,7 +737,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement`
- `right`: `Expression` (required)
- `body`: `Statement` (required)
-### t.forStatement(init, test, update, body)
+---
+
+### forStatement
+```javascript
+t.forStatement(init, test, update, body)
+```
See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`.
@@ -484,7 +753,12 @@ Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`
- `update`: `Expression` (default: `null`)
- `body`: `Statement` (required)
-### t.functionDeclaration(id, params, body, generator, async)
+---
+
+### functionDeclaration
+```javascript
+t.functionDeclaration(id, params, body, generator, async)
+```
See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`.
@@ -498,7 +772,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.functionExpression(id, params, body, generator, async)
+---
+
+### functionExpression
+```javascript
+t.functionExpression(id, params, body, generator, async)
+```
See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`.
@@ -512,7 +791,12 @@ Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`,
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.functionTypeAnnotation(typeParameters, params, rest, returnType)
+---
+
+### functionTypeAnnotation
+```javascript
+t.functionTypeAnnotation(typeParameters, params, rest, returnType)
+```
See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`.
@@ -523,7 +807,12 @@ Aliases: `Flow`
- `rest` (required)
- `returnType` (required)
-### t.functionTypeParam(name, typeAnnotation)
+---
+
+### functionTypeParam
+```javascript
+t.functionTypeParam(name, typeAnnotation)
+```
See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`.
@@ -532,7 +821,12 @@ Aliases: `Flow`
- `name` (required)
- `typeAnnotation` (required)
-### t.genericTypeAnnotation(id, typeParameters)
+---
+
+### genericTypeAnnotation
+```javascript
+t.genericTypeAnnotation(id, typeParameters)
+```
See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`.
@@ -541,7 +835,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.identifier(name)
+---
+
+### identifier
+```javascript
+t.identifier(name)
+```
See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`.
@@ -551,7 +850,12 @@ Aliases: `Expression`, `LVal`
- `decorators`: `Array<Decorator>` (default: `null`)
- `typeAnnotation` (default: `null`)
-### t.ifStatement(test, consequent, alternate)
+---
+
+### ifStatement
+```javascript
+t.ifStatement(test, consequent, alternate)
+```
See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`.
@@ -561,7 +865,24 @@ Aliases: `Statement`, `Conditional`
- `consequent`: `Statement` (required)
- `alternate`: `Statement` (default: `null`)
-### t.importDeclaration(specifiers, source)
+---
+
+### import
+```javascript
+t.import()
+```
+
+See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
+
+Aliases: `Expression`
+
+
+---
+
+### importDeclaration
+```javascript
+t.importDeclaration(specifiers, source)
+```
See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`.
@@ -570,7 +891,12 @@ Aliases: `Statement`, `Declaration`, `ModuleDeclaration`
- `specifiers`: `Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>` (required)
- `source`: `StringLiteral` (required)
-### t.importDefaultSpecifier(local)
+---
+
+### importDefaultSpecifier
+```javascript
+t.importDefaultSpecifier(local)
+```
See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`.
@@ -578,7 +904,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
-### t.importNamespaceSpecifier(local)
+---
+
+### importNamespaceSpecifier
+```javascript
+t.importNamespaceSpecifier(local)
+```
See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`.
@@ -586,7 +917,12 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
-### t.importSpecifier(local, imported)
+---
+
+### importSpecifier
+```javascript
+t.importSpecifier(local, imported)
+```
See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`.
@@ -594,8 +930,14 @@ Aliases: `ModuleSpecifier`
- `local`: `Identifier` (required)
- `imported`: `Identifier` (required)
+ - `importKind`: `null | 'type' | 'typeof'` (default: `null`)
-### t.interfaceDeclaration(id, typeParameters, extends, body)
+---
+
+### interfaceDeclaration
+```javascript
+t.interfaceDeclaration(id, typeParameters, extends, body)
+```
See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`.
@@ -606,7 +948,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `extends` (required)
- `body` (required)
-### t.interfaceExtends(id, typeParameters)
+---
+
+### interfaceExtends
+```javascript
+t.interfaceExtends(id, typeParameters)
+```
See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`.
@@ -615,7 +962,12 @@ Aliases: `Flow`
- `id` (required)
- `typeParameters` (required)
-### t.intersectionTypeAnnotation(types)
+---
+
+### intersectionTypeAnnotation
+```javascript
+t.intersectionTypeAnnotation(types)
+```
See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`.
@@ -623,7 +975,12 @@ Aliases: `Flow`
- `types` (required)
-### t.jSXAttribute(name, value)
+---
+
+### jSXAttribute
+```javascript
+t.jSXAttribute(name, value)
+```
See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`.
@@ -632,7 +989,12 @@ Aliases: `JSX`, `Immutable`
- `name`: `JSXIdentifier | JSXNamespacedName` (required)
- `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`)
-### t.jSXClosingElement(name)
+---
+
+### jSXClosingElement
+```javascript
+t.jSXClosingElement(name)
+```
See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`.
@@ -640,7 +1002,12 @@ Aliases: `JSX`, `Immutable`
- `name`: `JSXIdentifier | JSXMemberExpression` (required)
-### t.jSXElement(openingElement, closingElement, children, selfClosing)
+---
+
+### jSXElement
+```javascript
+t.jSXElement(openingElement, closingElement, children, selfClosing)
+```
See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`.
@@ -648,17 +1015,27 @@ Aliases: `JSX`, `Immutable`, `Expression`
- `openingElement`: `JSXOpeningElement` (required)
- `closingElement`: `JSXClosingElement` (default: `null`)
- - `children`: `Array<JSXText | JSXExpressionContainer | JSXElement>` (required)
+ - `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement>` (required)
- `selfClosing` (required)
-### t.jSXEmptyExpression()
+---
+
+### jSXEmptyExpression
+```javascript
+t.jSXEmptyExpression()
+```
See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`.
Aliases: `JSX`, `Expression`
-### t.jSXExpressionContainer(expression)
+---
+
+### jSXExpressionContainer
+```javascript
+t.jSXExpressionContainer(expression)
+```
See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`.
@@ -666,7 +1043,12 @@ Aliases: `JSX`, `Immutable`
- `expression`: `Expression` (required)
-### t.jSXIdentifier(name)
+---
+
+### jSXIdentifier
+```javascript
+t.jSXIdentifier(name)
+```
See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`.
@@ -674,7 +1056,12 @@ Aliases: `JSX`, `Expression`
- `name`: `string` (required)
-### t.jSXMemberExpression(object, property)
+---
+
+### jSXMemberExpression
+```javascript
+t.jSXMemberExpression(object, property)
+```
See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`.
@@ -683,7 +1070,12 @@ Aliases: `JSX`, `Expression`
- `object`: `JSXMemberExpression | JSXIdentifier` (required)
- `property`: `JSXIdentifier` (required)
-### t.jSXNamespacedName(namespace, name)
+---
+
+### jSXNamespacedName
+```javascript
+t.jSXNamespacedName(namespace, name)
+```
See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`.
@@ -692,7 +1084,12 @@ Aliases: `JSX`
- `namespace`: `JSXIdentifier` (required)
- `name`: `JSXIdentifier` (required)
-### t.jSXOpeningElement(name, attributes, selfClosing)
+---
+
+### jSXOpeningElement
+```javascript
+t.jSXOpeningElement(name, attributes, selfClosing)
+```
See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`.
@@ -702,7 +1099,12 @@ Aliases: `JSX`, `Immutable`
- `attributes`: `Array<JSXAttribute | JSXSpreadAttribute>` (required)
- `selfClosing`: `boolean` (default: `false`)
-### t.jSXSpreadAttribute(argument)
+---
+
+### jSXSpreadAttribute
+```javascript
+t.jSXSpreadAttribute(argument)
+```
See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`.
@@ -710,7 +1112,25 @@ Aliases: `JSX`
- `argument`: `Expression` (required)
-### t.jSXText(value)
+---
+
+### jSXSpreadChild
+```javascript
+t.jSXSpreadChild(expression)
+```
+
+See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
+
+Aliases: `JSX`, `Immutable`
+
+ - `expression`: `Expression` (required)
+
+---
+
+### jSXText
+```javascript
+t.jSXText(value)
+```
See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`.
@@ -718,7 +1138,12 @@ Aliases: `JSX`, `Immutable`
- `value`: `string` (required)
-### t.labeledStatement(label, body)
+---
+
+### labeledStatement
+```javascript
+t.labeledStatement(label, body)
+```
See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`.
@@ -727,7 +1152,12 @@ Aliases: `Statement`
- `label`: `Identifier` (required)
- `body`: `Statement` (required)
-### t.logicalExpression(operator, left, right)
+---
+
+### logicalExpression
+```javascript
+t.logicalExpression(operator, left, right)
+```
See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`.
@@ -737,7 +1167,12 @@ Aliases: `Binary`, `Expression`
- `left`: `Expression` (required)
- `right`: `Expression` (required)
-### t.memberExpression(object, property, computed)
+---
+
+### memberExpression
+```javascript
+t.memberExpression(object, property, computed)
+```
See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`.
@@ -747,7 +1182,12 @@ Aliases: `Expression`, `LVal`
- `property`if computed then `Expression` else `Identifier` (required)
- `computed`: `boolean` (default: `false`)
-### t.metaProperty(meta, property)
+---
+
+### metaProperty
+```javascript
+t.metaProperty(meta, property)
+```
See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`.
@@ -756,14 +1196,24 @@ Aliases: `Expression`
- `meta`: `string` (required)
- `property`: `string` (required)
-### t.mixedTypeAnnotation()
+---
+
+### mixedTypeAnnotation
+```javascript
+t.mixedTypeAnnotation()
+```
See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.newExpression(callee, arguments)
+---
+
+### newExpression
+```javascript
+t.newExpression(callee, arguments)
+```
See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`.
@@ -772,26 +1222,46 @@ Aliases: `Expression`
- `callee`: `Expression` (required)
- `arguments`: `Array<Expression | SpreadElement>` (required)
-### t.noop()
+---
+
+### noop
+```javascript
+t.noop()
+```
See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`.
-### t.nullLiteral()
+---
+
+### nullLiteral
+```javascript
+t.nullLiteral()
+```
See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`.
Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
-### t.nullLiteralTypeAnnotation()
+---
+
+### nullLiteralTypeAnnotation
+```javascript
+t.nullLiteralTypeAnnotation()
+```
See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.nullableTypeAnnotation(typeAnnotation)
+---
+
+### nullableTypeAnnotation
+```javascript
+t.nullableTypeAnnotation(typeAnnotation)
+```
See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`.
@@ -799,14 +1269,24 @@ Aliases: `Flow`
- `typeAnnotation` (required)
-### t.numberTypeAnnotation()
+---
+
+### numberTypeAnnotation
+```javascript
+t.numberTypeAnnotation()
+```
See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.numericLiteral(value)
+---
+
+### numericLiteral
+```javascript
+t.numericLiteral(value)
+```
See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`.
@@ -814,14 +1294,24 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `number` (required)
-### t.numericLiteralTypeAnnotation()
+---
+
+### numericLiteralTypeAnnotation
+```javascript
+t.numericLiteralTypeAnnotation()
+```
See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.objectExpression(properties)
+---
+
+### objectExpression
+```javascript
+t.objectExpression(properties)
+```
See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`.
@@ -829,7 +1319,12 @@ Aliases: `Expression`
- `properties`: `Array<ObjectMethod | ObjectProperty | SpreadProperty>` (required)
-### t.objectMethod(kind, key, params, body, computed)
+---
+
+### objectMethod
+```javascript
+t.objectMethod(kind, key, params, body, computed)
+```
See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`.
@@ -846,7 +1341,12 @@ Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionPa
- `returnType` (default: `null`)
- `typeParameters` (default: `null`)
-### t.objectPattern(properties, typeAnnotation)
+---
+
+### objectPattern
+```javascript
+t.objectPattern(properties, typeAnnotation)
+```
See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`.
@@ -856,7 +1356,12 @@ Aliases: `Pattern`, `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.objectProperty(key, value, computed, shorthand, decorators)
+---
+
+### objectProperty
+```javascript
+t.objectProperty(key, value, computed, shorthand, decorators)
+```
See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`.
@@ -868,7 +1373,12 @@ Aliases: `UserWhitespacable`, `Property`, `ObjectMember`
- `shorthand`: `boolean` (default: `false`)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.objectTypeAnnotation(properties, indexers, callProperties)
+---
+
+### objectTypeAnnotation
+```javascript
+t.objectTypeAnnotation(properties, indexers, callProperties)
+```
See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`.
@@ -878,7 +1388,12 @@ Aliases: `Flow`
- `indexers` (required)
- `callProperties` (required)
-### t.objectTypeCallProperty(value)
+---
+
+### objectTypeCallProperty
+```javascript
+t.objectTypeCallProperty(value)
+```
See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`.
@@ -886,7 +1401,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `value` (required)
-### t.objectTypeIndexer(id, key, value)
+---
+
+### objectTypeIndexer
+```javascript
+t.objectTypeIndexer(id, key, value)
+```
See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`.
@@ -896,7 +1416,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `key` (required)
- `value` (required)
-### t.objectTypeProperty(key, value)
+---
+
+### objectTypeProperty
+```javascript
+t.objectTypeProperty(key, value)
+```
See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`.
@@ -905,7 +1430,12 @@ Aliases: `Flow`, `UserWhitespacable`
- `key` (required)
- `value` (required)
-### t.parenthesizedExpression(expression)
+---
+
+### parenthesizedExpression
+```javascript
+t.parenthesizedExpression(expression)
+```
See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`.
@@ -913,7 +1443,12 @@ Aliases: `Expression`, `ExpressionWrapper`
- `expression`: `Expression` (required)
-### t.program(body, directives)
+---
+
+### program
+```javascript
+t.program(body, directives)
+```
See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`.
@@ -922,7 +1457,12 @@ Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent`
- `body`: `Array<Statement>` (required)
- `directives`: `Array<Directive>` (default: `[]`)
-### t.qualifiedTypeIdentifier(id, qualification)
+---
+
+### qualifiedTypeIdentifier
+```javascript
+t.qualifiedTypeIdentifier(id, qualification)
+```
See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`.
@@ -931,7 +1471,12 @@ Aliases: `Flow`
- `id` (required)
- `qualification` (required)
-### t.regExpLiteral(pattern, flags)
+---
+
+### regExpLiteral
+```javascript
+t.regExpLiteral(pattern, flags)
+```
See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`.
@@ -940,7 +1485,12 @@ Aliases: `Expression`, `Literal`
- `pattern`: `string` (required)
- `flags`: `string` (default: `''`)
-### t.restElement(argument, typeAnnotation)
+---
+
+### restElement
+```javascript
+t.restElement(argument, typeAnnotation)
+```
See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`.
@@ -950,7 +1500,12 @@ Aliases: `LVal`
- `typeAnnotation` (required)
- `decorators`: `Array<Decorator>` (default: `null`)
-### t.restProperty(argument)
+---
+
+### restProperty
+```javascript
+t.restProperty(argument)
+```
See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`.
@@ -958,7 +1513,12 @@ Aliases: `UnaryLike`
- `argument`: `LVal` (required)
-### t.returnStatement(argument)
+---
+
+### returnStatement
+```javascript
+t.returnStatement(argument)
+```
See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`.
@@ -966,7 +1526,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `argument`: `Expression` (default: `null`)
-### t.sequenceExpression(expressions)
+---
+
+### sequenceExpression
+```javascript
+t.sequenceExpression(expressions)
+```
See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`.
@@ -974,7 +1539,12 @@ Aliases: `Expression`
- `expressions`: `Array<Expression>` (required)
-### t.spreadElement(argument)
+---
+
+### spreadElement
+```javascript
+t.spreadElement(argument)
+```
See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`.
@@ -982,7 +1552,12 @@ Aliases: `UnaryLike`
- `argument`: `Expression` (required)
-### t.spreadProperty(argument)
+---
+
+### spreadProperty
+```javascript
+t.spreadProperty(argument)
+```
See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`.
@@ -990,7 +1565,12 @@ Aliases: `UnaryLike`
- `argument`: `Expression` (required)
-### t.stringLiteral(value)
+---
+
+### stringLiteral
+```javascript
+t.stringLiteral(value)
+```
See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`.
@@ -998,35 +1578,60 @@ Aliases: `Expression`, `Pureish`, `Literal`, `Immutable`
- `value`: `string` (required)
-### t.stringLiteralTypeAnnotation()
+---
+
+### stringLiteralTypeAnnotation
+```javascript
+t.stringLiteralTypeAnnotation()
+```
See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`.
Aliases: `Flow`
-### t.stringTypeAnnotation()
+---
+
+### stringTypeAnnotation
+```javascript
+t.stringTypeAnnotation()
+```
See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.super()
+---
+
+### super
+```javascript
+t.super()
+```
See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`.
Aliases: `Expression`
-### t.switchCase(test, consequent)
+---
+
+### switchCase
+```javascript
+t.switchCase(test, consequent)
+```
See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`.
- `test`: `Expression` (default: `null`)
- `consequent`: `Array<Statement>` (required)
-### t.switchStatement(discriminant, cases)
+---
+
+### switchStatement
+```javascript
+t.switchStatement(discriminant, cases)
+```
See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`.
@@ -1035,7 +1640,12 @@ Aliases: `Statement`, `BlockParent`, `Scopable`
- `discriminant`: `Expression` (required)
- `cases`: `Array<SwitchCase>` (required)
-### t.taggedTemplateExpression(tag, quasi)
+---
+
+### taggedTemplateExpression
+```javascript
+t.taggedTemplateExpression(tag, quasi)
+```
See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`.
@@ -1044,14 +1654,24 @@ Aliases: `Expression`
- `tag`: `Expression` (required)
- `quasi`: `TemplateLiteral` (required)
-### t.templateElement(value, tail)
+---
+
+### templateElement
+```javascript
+t.templateElement(value, tail)
+```
See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`.
- `value` (required)
- `tail`: `boolean` (default: `false`)
-### t.templateLiteral(quasis, expressions)
+---
+
+### templateLiteral
+```javascript
+t.templateLiteral(quasis, expressions)
+```
See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`.
@@ -1060,21 +1680,36 @@ Aliases: `Expression`, `Literal`
- `quasis`: `Array<TemplateElement>` (required)
- `expressions`: `Array<Expression>` (required)
-### t.thisExpression()
+---
+
+### thisExpression
+```javascript
+t.thisExpression()
+```
See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`.
Aliases: `Expression`
-### t.thisTypeAnnotation()
+---
+
+### thisTypeAnnotation
+```javascript
+t.thisTypeAnnotation()
+```
See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.throwStatement(argument)
+---
+
+### throwStatement
+```javascript
+t.throwStatement(argument)
+```
See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`.
@@ -1082,7 +1717,12 @@ Aliases: `Statement`, `Terminatorless`, `CompletionStatement`
- `argument`: `Expression` (required)
-### t.tryStatement(block, handler, finalizer)
+---
+
+### tryStatement
+```javascript
+t.tryStatement(block, handler, finalizer)
+```
See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`.
@@ -1093,7 +1733,12 @@ Aliases: `Statement`
- `finalizer`: `BlockStatement` (default: `null`)
- `body`: `BlockStatement` (default: `null`)
-### t.tupleTypeAnnotation(types)
+---
+
+### tupleTypeAnnotation
+```javascript
+t.tupleTypeAnnotation(types)
+```
See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`.
@@ -1101,7 +1746,12 @@ Aliases: `Flow`
- `types` (required)
-### t.typeAlias(id, typeParameters, right)
+---
+
+### typeAlias
+```javascript
+t.typeAlias(id, typeParameters, right)
+```
See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`.
@@ -1111,7 +1761,12 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeParameters` (required)
- `right` (required)
-### t.typeAnnotation(typeAnnotation)
+---
+
+### typeAnnotation
+```javascript
+t.typeAnnotation(typeAnnotation)
+```
See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`.
@@ -1119,7 +1774,12 @@ Aliases: `Flow`
- `typeAnnotation` (required)
-### t.typeCastExpression(expression, typeAnnotation)
+---
+
+### typeCastExpression
+```javascript
+t.typeCastExpression(expression, typeAnnotation)
+```
See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`.
@@ -1128,7 +1788,12 @@ Aliases: `Flow`, `ExpressionWrapper`, `Expression`
- `expression` (required)
- `typeAnnotation` (required)
-### t.typeParameter(bound)
+---
+
+### typeParameter
+```javascript
+t.typeParameter(bound)
+```
See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`.
@@ -1136,7 +1801,12 @@ Aliases: `Flow`
- `bound` (required)
-### t.typeParameterDeclaration(params)
+---
+
+### typeParameterDeclaration
+```javascript
+t.typeParameterDeclaration(params)
+```
See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`.
@@ -1144,7 +1814,12 @@ Aliases: `Flow`
- `params` (required)
-### t.typeParameterInstantiation(params)
+---
+
+### typeParameterInstantiation
+```javascript
+t.typeParameterInstantiation(params)
+```
See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`.
@@ -1152,7 +1827,12 @@ Aliases: `Flow`
- `params` (required)
-### t.typeofTypeAnnotation(argument)
+---
+
+### typeofTypeAnnotation
+```javascript
+t.typeofTypeAnnotation(argument)
+```
See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`.
@@ -1160,7 +1840,12 @@ Aliases: `Flow`
- `argument` (required)
-### t.unaryExpression(operator, argument, prefix)
+---
+
+### unaryExpression
+```javascript
+t.unaryExpression(operator, argument, prefix)
+```
See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`.
@@ -1170,7 +1855,12 @@ Aliases: `UnaryLike`, `Expression`
- `argument`: `Expression` (required)
- `prefix`: `boolean` (default: `true`)
-### t.unionTypeAnnotation(types)
+---
+
+### unionTypeAnnotation
+```javascript
+t.unionTypeAnnotation(types)
+```
See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`.
@@ -1178,7 +1868,12 @@ Aliases: `Flow`
- `types` (required)
-### t.updateExpression(operator, argument, prefix)
+---
+
+### updateExpression
+```javascript
+t.updateExpression(operator, argument, prefix)
+```
See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`.
@@ -1188,7 +1883,12 @@ Aliases: `Expression`
- `argument`: `Expression` (required)
- `prefix`: `boolean` (default: `false`)
-### t.variableDeclaration(kind, declarations)
+---
+
+### variableDeclaration
+```javascript
+t.variableDeclaration(kind, declarations)
+```
See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`.
@@ -1197,21 +1897,36 @@ Aliases: `Statement`, `Declaration`
- `kind`: `"var" | "let" | "const"` (required)
- `declarations`: `Array<VariableDeclarator>` (required)
-### t.variableDeclarator(id, init)
+---
+
+### variableDeclarator
+```javascript
+t.variableDeclarator(id, init)
+```
See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`.
- `id`: `LVal` (required)
- `init`: `Expression` (default: `null`)
-### t.voidTypeAnnotation()
+---
+
+### voidTypeAnnotation
+```javascript
+t.voidTypeAnnotation()
+```
See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`.
Aliases: `Flow`, `FlowBaseAnnotation`
-### t.whileStatement(test, body)
+---
+
+### whileStatement
+```javascript
+t.whileStatement(test, body)
+```
See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`.
@@ -1220,7 +1935,12 @@ Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable`
- `test`: `Expression` (required)
- `body`: `BlockStatement | Statement` (required)
-### t.withStatement(object, body)
+---
+
+### withStatement
+```javascript
+t.withStatement(object, body)
+```
See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`.
@@ -1229,7 +1949,12 @@ Aliases: `Statement`
- `object` (required)
- `body`: `BlockStatement | Statement` (required)
-### t.yieldExpression(argument, delegate)
+---
+
+### yieldExpression
+```javascript
+t.yieldExpression(argument, delegate)
+```
See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`.
@@ -1238,6 +1963,8 @@ Aliases: `Expression`, `Terminatorless`
- `argument`: `Expression` (default: `null`)
- `delegate`: `boolean` (default: `false`)
+---
+
<!-- end generated section -->
diff --git a/node_modules/babel-types/lib/converters.js b/node_modules/babel-types/lib/converters.js
index bcf3942c2..94db954bd 100644
--- a/node_modules/babel-types/lib/converters.js
+++ b/node_modules/babel-types/lib/converters.js
@@ -28,18 +28,10 @@ var _isPlainObject = require("lodash/isPlainObject");
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
-var _isNumber = require("lodash/isNumber");
-
-var _isNumber2 = _interopRequireDefault(_isNumber);
-
var _isRegExp = require("lodash/isRegExp");
var _isRegExp2 = _interopRequireDefault(_isRegExp);
-var _isString = require("lodash/isString");
-
-var _isString2 = _interopRequireDefault(_isString);
-
var _index = require("./index");
var t = _interopRequireWildcard(_index);
@@ -310,11 +302,11 @@ function valueToNode(value) {
return t.nullLiteral();
}
- if ((0, _isString2.default)(value)) {
+ if (typeof value === "string") {
return t.stringLiteral(value);
}
- if ((0, _isNumber2.default)(value)) {
+ if (typeof value === "number") {
return t.numericLiteral(value);
}
diff --git a/node_modules/babel-types/lib/definitions/es2015.js b/node_modules/babel-types/lib/definitions/es2015.js
index cbce5536d..a823aa22f 100644
--- a/node_modules/babel-types/lib/definitions/es2015.js
+++ b/node_modules/babel-types/lib/definitions/es2015.js
@@ -213,6 +213,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
},
imported: {
validate: (0, _index.assertNodeType)("Identifier")
+ },
+ importKind: {
+ validate: (0, _index.assertOneOf)(null, "type", "typeof")
}
}
});
diff --git a/node_modules/babel-types/lib/definitions/experimental.js b/node_modules/babel-types/lib/definitions/experimental.js
index 184bf3597..d65d60968 100644
--- a/node_modules/babel-types/lib/definitions/experimental.js
+++ b/node_modules/babel-types/lib/definitions/experimental.js
@@ -39,6 +39,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
fields: {}
});
+(0, _index2.default)("Import", {
+ aliases: ["Expression"]
+});
+
(0, _index2.default)("Decorator", {
visitor: ["expression"],
fields: {
diff --git a/node_modules/babel-types/lib/definitions/jsx.js b/node_modules/babel-types/lib/definitions/jsx.js
index 920332a4b..1c0c0665a 100644
--- a/node_modules/babel-types/lib/definitions/jsx.js
+++ b/node_modules/babel-types/lib/definitions/jsx.js
@@ -43,7 +43,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
validate: (0, _index.assertNodeType)("JSXClosingElement")
},
children: {
- validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXElement")))
+ validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement")))
}
}
});
@@ -62,6 +62,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
}
});
+(0, _index2.default)("JSXSpreadChild", {
+ visitor: ["expression"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _index.assertNodeType)("Expression")
+ }
+ }
+});
+
(0, _index2.default)("JSXIdentifier", {
builder: ["name"],
aliases: ["JSX", "Expression"],
diff --git a/node_modules/babel-types/lib/index.js b/node_modules/babel-types/lib/index.js
index 93619fe9e..4c0070300 100644
--- a/node_modules/babel-types/lib/index.js
+++ b/node_modules/babel-types/lib/index.js
@@ -1,7 +1,7 @@
"use strict";
exports.__esModule = true;
-exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
+exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
var _getOwnPropertySymbols = require("babel-runtime/core-js/object/get-own-property-symbols");
@@ -229,6 +229,12 @@ Object.defineProperty(exports, "isImmutable", {
return _validators.isImmutable;
}
});
+Object.defineProperty(exports, "isNodesEquivalent", {
+ enumerable: true,
+ get: function get() {
+ return _validators.isNodesEquivalent;
+ }
+});
var _converters = require("./converters");
@@ -312,18 +318,10 @@ var _toFastProperties = require("to-fast-properties");
var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
-var _compact = require("lodash/compact");
-
-var _compact2 = _interopRequireDefault(_compact);
-
var _clone = require("lodash/clone");
var _clone2 = _interopRequireDefault(_clone);
-var _each = require("lodash/each");
-
-var _each2 = _interopRequireDefault(_each);
-
var _uniq = require("lodash/uniq");
var _uniq2 = _interopRequireDefault(_uniq);
@@ -372,15 +370,15 @@ for (var type in t.VISITOR_KEYS) {
t.FLIPPED_ALIAS_KEYS = {};
-(0, _each2.default)(t.ALIAS_KEYS, function (aliases, type) {
- (0, _each2.default)(aliases, function (alias) {
+(0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) {
+ t.ALIAS_KEYS[type].forEach(function (alias) {
var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
types.push(type);
});
});
-(0, _each2.default)(t.FLIPPED_ALIAS_KEYS, function (types, type) {
- t[type.toUpperCase() + "_TYPES"] = types;
+(0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) {
+ t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type];
registerType(type);
});
@@ -429,7 +427,9 @@ function isType(nodeType, targetType) {
return false;
}
-(0, _each2.default)(t.BUILDER_KEYS, function (keys, type) {
+(0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) {
+ var keys = t.BUILDER_KEYS[type];
+
function builder() {
if (arguments.length > keys.length) {
throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
@@ -549,6 +549,7 @@ function ensureBlock(node) {
}
function clone(node) {
+ if (!node) return node;
var newNode = {};
for (var key in node) {
if (key[0] === "_") continue;
@@ -564,6 +565,7 @@ function cloneWithoutLoc(node) {
}
function cloneDeep(node) {
+ if (!node) return node;
var newNode = {};
for (var key in node) {
@@ -667,7 +669,7 @@ function inheritInnerComments(child, parent) {
function _inheritComments(key, child, parent) {
if (child && parent) {
- child[key] = (0, _uniq2.default)((0, _compact2.default)([].concat(child[key], parent[key])));
+ child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean));
}
}
diff --git a/node_modules/babel-types/lib/retrievers.js b/node_modules/babel-types/lib/retrievers.js
index e141aad68..e5782e083 100644
--- a/node_modules/babel-types/lib/retrievers.js
+++ b/node_modules/babel-types/lib/retrievers.js
@@ -38,8 +38,8 @@ function getBindingIdentifiers(node, duplicates, outerOnly) {
}
if (t.isExportDeclaration(id)) {
- if (t.isDeclaration(node.declaration)) {
- search.push(node.declaration);
+ if (t.isDeclaration(id.declaration)) {
+ search.push(id.declaration);
}
continue;
}
diff --git a/node_modules/babel-types/lib/validators.js b/node_modules/babel-types/lib/validators.js
index 7597f6489..ec30e55bd 100644
--- a/node_modules/babel-types/lib/validators.js
+++ b/node_modules/babel-types/lib/validators.js
@@ -2,6 +2,14 @@
exports.__esModule = true;
+var _keys = require("babel-runtime/core-js/object/keys");
+
+var _keys2 = _interopRequireDefault(_keys);
+
+var _typeof2 = require("babel-runtime/helpers/typeof");
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
@@ -15,6 +23,7 @@ exports.isVar = isVar;
exports.isSpecifierDefault = isSpecifierDefault;
exports.isScope = isScope;
exports.isImmutable = isImmutable;
+exports.isNodesEquivalent = isNodesEquivalent;
var _retrievers = require("./retrievers");
@@ -157,6 +166,8 @@ function isReferenced(node, parent) {
function isValidIdentifier(name) {
if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
return false;
+ } else if (name === "await") {
+ return false;
} else {
return _esutils2.default.keyword.isIdentifierNameES6(name);
}
@@ -198,4 +209,57 @@ function isImmutable(node) {
}
return false;
+}
+
+function isNodesEquivalent(a, b) {
+ if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) {
+ return a === b;
+ }
+
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type);
+
+ for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
+ var _ref2;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
+
+ var field = _ref2;
+
+ if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) {
+ return false;
+ }
+
+ if (Array.isArray(a[field])) {
+ if (!Array.isArray(b[field])) {
+ return false;
+ }
+ if (a[field].length !== b[field].length) {
+ return false;
+ }
+
+ for (var i = 0; i < a[field].length; i++) {
+ if (!isNodesEquivalent(a[field][i], b[field][i])) {
+ return false;
+ }
+ }
+ continue;
+ }
+
+ if (!isNodesEquivalent(a[field], b[field])) {
+ return false;
+ }
+ }
+
+ return true;
} \ No newline at end of file
diff --git a/node_modules/babel-types/package.json b/node_modules/babel-types/package.json
index d95ef6227..35f4b8554 100644
--- a/node_modules/babel-types/package.json
+++ b/node_modules/babel-types/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-types",
- "version": "6.18.0",
+ "version": "6.24.1",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
@@ -8,9 +8,12 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-types",
"main": "lib/index.js",
"dependencies": {
- "babel-runtime": "^6.9.1",
+ "babel-runtime": "^6.22.0",
"esutils": "^2.0.2",
"lodash": "^4.2.0",
"to-fast-properties": "^1.0.1"
+ },
+ "devDependencies": {
+ "babylon": "^6.8.2"
}
}
diff --git a/node_modules/babylon/CHANGELOG.md b/node_modules/babylon/CHANGELOG.md
index db6f1e6f8..bb482fc5c 100644
--- a/node_modules/babylon/CHANGELOG.md
+++ b/node_modules/babylon/CHANGELOG.md
@@ -15,10 +15,331 @@ _Note: Gaps between patch versions are faulty, broken or test releases._
See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
+## 6.16.0 (2017-02-23)
+
+### :rocket: New Feature
+
+***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder)
+
+We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/)
+
+We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc.
+
+To enable `estree` mode simply add the plugin in the config:
+```json
+{
+ "plugins": [ "estree" ]
+}
+```
+
+If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned.
+
+Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew)
+
+Babylon exports a new function to parse a single expression
+
+```js
+import { parseExpression } from 'babylon';
+
+const ast = parseExpression('x || y && z', options);
+```
+
+The returned AST will only consist of the expression. The options are the same as for `parse()`
+
+Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu)
+
+A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`.
+Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ...
+
+Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris)
+
+Added support for function predicates which flow introduced in version 0.33.0
+
+```js
+declare function is_number(x: mixed): boolean %checks(typeof x === "number");
+```
+
+Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder)
+
+Added support for imports within module declarations which flow introduced in version 0.37.0
+
+```js
+declare module "C" {
+ import type { DT } from "D";
+ declare export type CT = { D: DT };
+}
+```
+
+### :eyeglasses: Spec Compliancy
+
+Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
+
+This example now correctly throws an error when there is a semicolon after the decorator:
+
+```js
+class A {
+@a;
+foo(){}
+}
+```
+
+Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder)
+
+Using keywords in imports is not allowed anymore:
+
+```js
+import { default } from "foo";
+import { a as debugger } from "foo";
+```
+
+Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder)
+
+In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration.
+
+Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder)
+
+The following code now correctly throws an error
+
+```js
+import type { type a } from "foo";
+```
+
+Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine)
+
+Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour.
+
+If you enable the flow plugin you can only define the type of the class properties, but not initialize them.
+
+Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder)
+
+Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`.
+
+```js
+export default async function bar() {};
+```
+
+### :nail_care: Polish
+
+Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng)
+
+### :bug: Bug Fix
+
+Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder)
+
+Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng)
+
+ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder)
+
+Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder)
+
+Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder)
+
+Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder)
+
+Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng)
+
+Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper)
+
+
+### :house: Internal
+
+Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray)
+
+Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray)
+
+Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder)
+
+chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot])
+
+Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder)
+
+Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot])
+
+Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot])
+
+devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo)
+
+Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder)
+
+Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder)
+
+### :memo: Documentation
+
+Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng)
+
+Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu)
+
+Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro)
+
+AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens)
+
+## 6.15.0 (2017-01-10)
+
+### :eyeglasses: Spec Compliancy
+
+Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
+
+This change implements flows new shorthand import syntax
+and where previously you had to write this code:
+
+```js
+import {someValue} from "blah";
+import type {someType} from "blah";
+import typeof {someOtherValue} from "blah";
+```
+
+you can now write it like this:
+
+```js
+import {
+ someValue,
+ type someType,
+ typeof someOtherValue,
+} from "blah";
+```
+
+For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request.
+
+flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin)
+
+This change now allows a leading pipe everywhere types can be used:
+```js
+var f = (x): | 1 | 2 => 1;
+```
+
+Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo)
+
+Previously babylon parsed the following exports, although they are not valid:
+```js
+export typeof foo;
+export new Foo();
+export function() {};
+export for (;;);
+export while(foo);
+```
+
+### :bug: Bug Fix
+
+Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin)
+
+This fixes parsing of this case:
+
+```js
+const map = {
+ [age <= 17] : 'Too young'
+};
+```
+
+Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long)
+
+The following case produced an invalid AST
+```js
+<div>{/* foo */}</div>
+```
+
+Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy)
+
+When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST.
+
+Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant)
+
+Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray)
+
+### :house: Internal
+
+User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder)
+
+Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo)
+
+Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine)
+
+Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder)
+
+Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine)
+
+Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU)
+
+Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot])
+
+chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot])
+
+chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot])
+
+## 6.14.1 (2016-11-17)
+
+### :bug: Bug Fix
+
+Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder)
+
+```js
+{
+ "plugins": ["*"]
+}
+```
+
+Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer.
+
+## 6.14.0 (2016-11-16)
+
+### :eyeglasses: Spec Compliancy
+
+Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
+
+[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words)
+
+Babylon will throw for more reserved words such as `enum` or `await` (in strict mode).
+
+```
+class enum {} // throws
+class await {} // throws in strict mode (module)
+```
+
+Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi)
+
+So where you used to have to write
+
+```js
+type A = (x: string, y: boolean) => number;
+type B = (z: string) => number;
+type C = { [key: string]: number };
+```
+
+you can now write (with flow 0.34.0)
+
+```js
+type A = (string, boolean) => number;
+type B = string => number;
+type C = { [string]: number };
+```
+
+Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner)
+
+Supports these form now of specifying array types:
+
+```js
+var a: number[][][][];
+var b: string[][];
+```
+
+### :bug: Bug Fix
+
+Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder)
+
+```
+declare module "foo" { declare module.exports: number }
+declare module "foo" { declare module.exports: number; } // also allowed now
+```
+
+### :house: Internal
+
+ * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman)
+ * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger)
+ * Add node 7 (Daniel Tschinder)
+ * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper)
## v6.13.1 (2016-10-26)
-### 💅 Polish
+### :nail_care: Polish
- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML))
@@ -40,7 +361,7 @@ With that test case, there was a ~95ms savings by removing the need for node to
## v6.13.0 (2016-10-21)
-### 👓 Spec Compliancy
+### :eyeglasses: Spec Compliancy
Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
@@ -98,7 +419,7 @@ Fixes two tests that are failing after the merge of #172 ([#177](https://github.
## v6.12.0 (2016-10-14)
-### 👓 Spec Compliancy
+### :eyeglasses: Spec Compliancy
Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
diff --git a/node_modules/babylon/README.md b/node_modules/babylon/README.md
index 3c6d730f0..cbe528885 100644
--- a/node_modules/babylon/README.md
+++ b/node_modules/babylon/README.md
@@ -14,7 +14,7 @@
- The latest ECMAScript version enabled by default (ES2017).
- Comment attachment.
- Support for JSX and Flow.
- - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md).
+ - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)).
## Credits
@@ -27,6 +27,12 @@ Significant diversions are expected to occur in the future such as streaming, EB
### `babylon.parse(code, [options])`
+### `babylon.parseExpression(code, [options])`
+
+`parse()` parses the provided `code` as an entire ECMAScript program, while
+`parseExpression()` tries to parse a single Expression with performance in
+mind. When in doubt, use `.parse()`.
+
### Options
- **allowImportExportEverywhere**: By default, `import` and `export`
@@ -37,15 +43,19 @@ Significant diversions are expected to occur in the future such as streaming, EB
the top level raises an error. Set this to `true` to accept such
code.
-- **allowSuperOutsideMethod** TODO
+- **allowSuperOutsideMethod**: TODO
- **sourceType**: Indicate the mode the code should be parsed in. Can be
either `"script"` or `"module"`.
- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files.
+- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools.
+
- **plugins**: Array containing the plugins that you want to enable.
+- **strictMode**: TODO
+
### Output
Babylon generates AST according to [Babel AST format][].
@@ -111,7 +121,7 @@ require("babylon").parse("code", {
- `flow`
- `doExpressions`
- `objectRestSpread`
- - `decorators`
+ - `decorators` (Based on an outdated version of the Decorators proposal. Will be removed in a future version of `Babylon`)
- `classProperties`
- `exportExtensions`
- `asyncGenerators`
diff --git a/node_modules/babylon/bin/generate-identifier-regex.js b/node_modules/babylon/bin/generate-identifier-regex.js
index 76cc7f304..9b0ae7d6b 100644
--- a/node_modules/babylon/bin/generate-identifier-regex.js
+++ b/node_modules/babylon/bin/generate-identifier-regex.js
@@ -50,7 +50,7 @@ function generate(chars) {
at = to;
}
}
- return {nonASCII: re, astral: astral};
+ return { nonASCII: re, astral: astral };
}
const startData = generate(start);
diff --git a/node_modules/babylon/lib/index.js b/node_modules/babylon/lib/index.js
index 55b333359..f64e4b116 100644
--- a/node_modules/babylon/lib/index.js
+++ b/node_modules/babylon/lib/index.js
@@ -30,7 +30,7 @@ var reservedWords = {
// And the keywords
-var isKeyword$1 = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");
+var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");
// ## Character categories
@@ -53,7 +53,9 @@ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
// offset starts at 0x10000, and each pair of numbers represents an
// offset to the next range, and then a size of the range. They were
// generated by `bin/generate-identifier-regex.js`.
+// eslint-disable-next-line comma-spacing
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 264, 8, 2, 36, 18, 0, 50, 29, 881, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 0, 32, 6124, 20, 754, 9486, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541];
+// eslint-disable-next-line comma-spacing
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239];
// This has a complexity linear to the value of the code. The
@@ -100,6 +102,9 @@ var defaultOptions = {
sourceType: "script",
// Source filename.
sourceFilename: undefined,
+ // Line from which to start counting source. Useful for
+ // integration with other tools.
+ startLine: 1,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: false,
@@ -124,7 +129,71 @@ function getOptions(opts) {
return options;
}
-function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
+ return typeof obj;
+} : function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+};
+
+
+
+
+
+
+
+
+
+
+
+var classCallCheck = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+
+
+
+
+
+
+
+
+
+
+var inherits = function (subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
+ }
+
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
+};
+
+
+
+
+
+
+
+
+
+
+
+var possibleConstructorReturn = function (self, call) {
+ if (!self) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return call && (typeof call === "object" || typeof call === "function") ? call : self;
+};
// ## Token types
@@ -144,10 +213,16 @@ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Co
// to know when parsing a label, in order to allow or disallow
// continue jumps to that label.
+var beforeExpr = true;
+var startsExpr = true;
+var isLoop = true;
+var isAssign = true;
+var prefix = true;
+var postfix = true;
+
var TokenType = function TokenType(label) {
var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck$2(this, TokenType);
+ classCallCheck(this, TokenType);
this.label = label;
this.keyword = conf.keyword;
@@ -162,39 +237,59 @@ var TokenType = function TokenType(label) {
this.updateContext = null;
};
-function binop(name, prec) {
- return new TokenType(name, { beforeExpr: true, binop: prec });
-}
-var beforeExpr = { beforeExpr: true };
-var startsExpr = { startsExpr: true };
+var KeywordTokenType = function (_TokenType) {
+ inherits(KeywordTokenType, _TokenType);
+
+ function KeywordTokenType(name) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ classCallCheck(this, KeywordTokenType);
+
+ options.keyword = name;
+
+ return possibleConstructorReturn(this, _TokenType.call(this, name, options));
+ }
+
+ return KeywordTokenType;
+}(TokenType);
+
+var BinopTokenType = function (_TokenType2) {
+ inherits(BinopTokenType, _TokenType2);
+
+ function BinopTokenType(name, prec) {
+ classCallCheck(this, BinopTokenType);
+ return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec }));
+ }
+
+ return BinopTokenType;
+}(TokenType);
var types = {
- num: new TokenType("num", startsExpr),
- regexp: new TokenType("regexp", startsExpr),
- string: new TokenType("string", startsExpr),
- name: new TokenType("name", startsExpr),
+ num: new TokenType("num", { startsExpr: startsExpr }),
+ regexp: new TokenType("regexp", { startsExpr: startsExpr }),
+ string: new TokenType("string", { startsExpr: startsExpr }),
+ name: new TokenType("name", { startsExpr: startsExpr }),
eof: new TokenType("eof"),
// Punctuation token types.
- bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
+ bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
bracketR: new TokenType("]"),
- braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
- braceBarL: new TokenType("{|", { beforeExpr: true, startsExpr: true }),
+ braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
+ braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
braceR: new TokenType("}"),
braceBarR: new TokenType("|}"),
- parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
+ parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
parenR: new TokenType(")"),
- comma: new TokenType(",", beforeExpr),
- semi: new TokenType(";", beforeExpr),
- colon: new TokenType(":", beforeExpr),
- doubleColon: new TokenType("::", beforeExpr),
+ comma: new TokenType(",", { beforeExpr: beforeExpr }),
+ semi: new TokenType(";", { beforeExpr: beforeExpr }),
+ colon: new TokenType(":", { beforeExpr: beforeExpr }),
+ doubleColon: new TokenType("::", { beforeExpr: beforeExpr }),
dot: new TokenType("."),
- question: new TokenType("?", beforeExpr),
- arrow: new TokenType("=>", beforeExpr),
+ question: new TokenType("?", { beforeExpr: beforeExpr }),
+ arrow: new TokenType("=>", { beforeExpr: beforeExpr }),
template: new TokenType("template"),
- ellipsis: new TokenType("...", beforeExpr),
- backQuote: new TokenType("`", startsExpr),
- dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
+ ellipsis: new TokenType("...", { beforeExpr: beforeExpr }),
+ backQuote: new TokenType("`", { startsExpr: startsExpr }),
+ dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
at: new TokenType("@"),
// Operators. These carry several kinds of properties to help the
@@ -211,74 +306,69 @@ var types = {
// binary operators with a very low precedence, that should result
// in AssignmentExpression nodes.
- eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
- assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
- incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
- prefix: new TokenType("prefix", { beforeExpr: true, prefix: true, startsExpr: true }),
- logicalOR: binop("||", 1),
- logicalAND: binop("&&", 2),
- bitwiseOR: binop("|", 3),
- bitwiseXOR: binop("^", 4),
- bitwiseAND: binop("&", 5),
- equality: binop("==/!=", 6),
- relational: binop("</>", 7),
- bitShift: binop("<</>>", 8),
- plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
- modulo: binop("%", 10),
- star: binop("*", 10),
- slash: binop("/", 10),
- exponent: new TokenType("**", { beforeExpr: true, binop: 11, rightAssociative: true })
+ eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }),
+ assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }),
+ incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }),
+ prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
+ logicalOR: new BinopTokenType("||", 1),
+ logicalAND: new BinopTokenType("&&", 2),
+ bitwiseOR: new BinopTokenType("|", 3),
+ bitwiseXOR: new BinopTokenType("^", 4),
+ bitwiseAND: new BinopTokenType("&", 5),
+ equality: new BinopTokenType("==/!=", 6),
+ relational: new BinopTokenType("</>", 7),
+ bitShift: new BinopTokenType("<</>>", 8),
+ plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }),
+ modulo: new BinopTokenType("%", 10),
+ star: new BinopTokenType("*", 10),
+ slash: new BinopTokenType("/", 10),
+ exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true })
+};
+
+var keywords = {
+ "break": new KeywordTokenType("break"),
+ "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }),
+ "catch": new KeywordTokenType("catch"),
+ "continue": new KeywordTokenType("continue"),
+ "debugger": new KeywordTokenType("debugger"),
+ "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }),
+ "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }),
+ "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }),
+ "finally": new KeywordTokenType("finally"),
+ "for": new KeywordTokenType("for", { isLoop: isLoop }),
+ "function": new KeywordTokenType("function", { startsExpr: startsExpr }),
+ "if": new KeywordTokenType("if"),
+ "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }),
+ "switch": new KeywordTokenType("switch"),
+ "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }),
+ "try": new KeywordTokenType("try"),
+ "var": new KeywordTokenType("var"),
+ "let": new KeywordTokenType("let"),
+ "const": new KeywordTokenType("const"),
+ "while": new KeywordTokenType("while", { isLoop: isLoop }),
+ "with": new KeywordTokenType("with"),
+ "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
+ "this": new KeywordTokenType("this", { startsExpr: startsExpr }),
+ "super": new KeywordTokenType("super", { startsExpr: startsExpr }),
+ "class": new KeywordTokenType("class"),
+ "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }),
+ "export": new KeywordTokenType("export"),
+ "import": new KeywordTokenType("import"),
+ "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
+ "null": new KeywordTokenType("null", { startsExpr: startsExpr }),
+ "true": new KeywordTokenType("true", { startsExpr: startsExpr }),
+ "false": new KeywordTokenType("false", { startsExpr: startsExpr }),
+ "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }),
+ "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }),
+ "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
+ "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
+ "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr })
};
// Map keyword names to token types.
-
-var keywords = {};
-
-// Succinct definitions of keyword token types
-function kw(name) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- options.keyword = name;
- keywords[name] = types["_" + name] = new TokenType(name, options);
-}
-
-kw("break");
-kw("case", beforeExpr);
-kw("catch");
-kw("continue");
-kw("debugger");
-kw("default", beforeExpr);
-kw("do", { isLoop: true, beforeExpr: true });
-kw("else", beforeExpr);
-kw("finally");
-kw("for", { isLoop: true });
-kw("function", startsExpr);
-kw("if");
-kw("return", beforeExpr);
-kw("switch");
-kw("throw", beforeExpr);
-kw("try");
-kw("var");
-kw("let");
-kw("const");
-kw("while", { isLoop: true });
-kw("with");
-kw("new", { beforeExpr: true, startsExpr: true });
-kw("this", startsExpr);
-kw("super", startsExpr);
-kw("class");
-kw("extends", beforeExpr);
-kw("export");
-kw("import");
-kw("yield", { beforeExpr: true, startsExpr: true });
-kw("null", startsExpr);
-kw("true", startsExpr);
-kw("false", startsExpr);
-kw("in", { beforeExpr: true, binop: 7 });
-kw("instanceof", { beforeExpr: true, binop: 7 });
-kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("void", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("delete", { beforeExpr: true, prefix: true, startsExpr: true });
+Object.keys(keywords).forEach(function (name) {
+ types["_" + name] = keywords[name];
+});
// Matches a whole line break (where CRLF is considered a single
// line break). Used to count lines.
@@ -292,14 +382,12 @@ function isNewLine(code) {
var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// The algorithm used to determine whether a regexp can appear at a
// given point in the program is loosely based on sweet.js' approach.
// See https://github.com/mozilla/sweet.js/wiki/design
var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
- _classCallCheck$3(this, TokContext);
+ classCallCheck(this, TokContext);
this.token = token;
this.isExpr = !!isExpr;
@@ -385,20 +473,18 @@ types.backQuote.updateContext = function () {
this.state.exprAllowed = false;
};
-function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// These are used when `options.locations` is on, for the
// `startLoc` and `endLoc` properties.
var Position = function Position(line, col) {
- _classCallCheck$4(this, Position);
+ classCallCheck(this, Position);
this.line = line;
this.column = col;
};
var SourceLocation = function SourceLocation(start, end) {
- _classCallCheck$4(this, SourceLocation);
+ classCallCheck(this, SourceLocation);
this.start = start;
this.end = end;
@@ -423,11 +509,9 @@ function getLineInfo(input, offset) {
}
}
-function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
var State = function () {
function State() {
- _classCallCheck$5(this, State);
+ classCallCheck(this, State);
}
State.prototype.init = function init(options, input) {
@@ -437,7 +521,7 @@ var State = function () {
this.potentialArrowAt = -1;
- this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inType = false;
+ this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.noAnonFunctionType = false;
this.labels = [];
@@ -452,7 +536,7 @@ var State = function () {
this.commentStack = [];
this.pos = this.lineStart = 0;
- this.curLine = 1;
+ this.curLine = options.startLine;
this.type = types.eof;
this.value = null;
@@ -558,16 +642,12 @@ var State = function () {
return State;
}();
-function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/* eslint indent: 0 */
-
// Object type used to represent tokens. Note that normally, tokens
// simply exist as properties on the parser object. This is only
// used for the onToken callback and the external tokenizer.
var Token = function Token(state) {
- _classCallCheck$1(this, Token);
+ classCallCheck(this, Token);
this.type = state.type;
this.value = state.value;
@@ -589,7 +669,7 @@ function codePointToString(code) {
var Tokenizer = function () {
function Tokenizer(options, input) {
- _classCallCheck$1(this, Tokenizer);
+ classCallCheck(this, Tokenizer);
this.state = new State();
this.state.init(options, input);
@@ -628,8 +708,8 @@ var Tokenizer = function () {
// TODO
- Tokenizer.prototype.isKeyword = function isKeyword(word) {
- return isKeyword$1(word);
+ Tokenizer.prototype.isKeyword = function isKeyword$$1(word) {
+ return isKeyword(word);
};
// TODO
@@ -721,8 +801,8 @@ var Tokenizer = function () {
Tokenizer.prototype.skipBlockComment = function skipBlockComment() {
var startLoc = this.state.curPosition();
- var start = this.state.pos,
- end = this.input.indexOf("*/", this.state.pos += 2);
+ var start = this.state.pos;
+ var end = this.input.indexOf("*/", this.state.pos += 2);
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
this.state.pos = end + 2;
@@ -1072,9 +1152,9 @@ var Tokenizer = function () {
};
Tokenizer.prototype.readRegexp = function readRegexp() {
+ var start = this.state.pos;
var escaped = void 0,
- inClass = void 0,
- start = this.state.pos;
+ inClass = void 0;
for (;;) {
if (this.state.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
var ch = this.input.charAt(this.state.pos);
@@ -1115,11 +1195,12 @@ var Tokenizer = function () {
// will return `null` unless the integer has exactly `len` digits.
Tokenizer.prototype.readInt = function readInt(radix, len) {
- var start = this.state.pos,
- total = 0;
+ var start = this.state.pos;
+ var total = 0;
+
for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- var code = this.input.charCodeAt(this.state.pos),
- val = void 0;
+ var code = this.input.charCodeAt(this.state.pos);
+ var val = void 0;
if (code >= 97) {
val = code - 97 + 10; // a
} else if (code >= 65) {
@@ -1149,9 +1230,10 @@ var Tokenizer = function () {
// Read an integer, octal integer, or floating-point number.
Tokenizer.prototype.readNumber = function readNumber(startsWithDot) {
- var start = this.state.pos,
- isFloat = false,
- octal = this.input.charCodeAt(this.state.pos) === 48;
+ var start = this.state.pos;
+ var octal = this.input.charCodeAt(this.state.pos) === 48;
+ var isFloat = false;
+
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
var next = this.input.charCodeAt(this.state.pos);
if (next === 46) {
@@ -1170,8 +1252,8 @@ var Tokenizer = function () {
}
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
- var str = this.input.slice(start, this.state.pos),
- val = void 0;
+ var str = this.input.slice(start, this.state.pos);
+ var val = void 0;
if (isFloat) {
val = parseFloat(str);
} else if (!octal || str.length === 1) {
@@ -1187,8 +1269,8 @@ var Tokenizer = function () {
// Read a string value, interpreting backslash-escapes.
Tokenizer.prototype.readCodePoint = function readCodePoint() {
- var ch = this.input.charCodeAt(this.state.pos),
- code = void 0;
+ var ch = this.input.charCodeAt(this.state.pos);
+ var code = void 0;
if (ch === 123) {
var codePos = ++this.state.pos;
@@ -1412,8 +1494,9 @@ var Tokenizer = function () {
};
Tokenizer.prototype.updateContext = function updateContext(prevType) {
- var update = void 0,
- type = this.state.type;
+ var type = this.state.type;
+ var update = void 0;
+
if (type.keyword && prevType === types.dot) {
this.state.exprAllowed = false;
} else if (update = type.updateContext) {
@@ -1426,27 +1509,21 @@ var Tokenizer = function () {
return Tokenizer;
}();
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
var plugins = {};
+var frozenDeprecatedWildcardPluginList = ["jsx", "doExpressions", "objectRestSpread", "decorators", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport", "flow"];
var Parser = function (_Tokenizer) {
- _inherits(Parser, _Tokenizer);
+ inherits(Parser, _Tokenizer);
function Parser(options, input) {
- _classCallCheck(this, Parser);
+ classCallCheck(this, Parser);
options = getOptions(options);
- var _this = _possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
+ var _this = possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
_this.options = options;
_this.inModule = _this.options.sourceType === "module";
- _this.isReservedWord = reservedWords[6];
_this.input = input;
_this.plugins = _this.loadPlugins(_this.options.plugins);
_this.filename = options.sourceFilename;
@@ -1458,15 +1535,49 @@ var Parser = function (_Tokenizer) {
return _this;
}
+ Parser.prototype.isReservedWord = function isReservedWord(word) {
+ if (word === "await") {
+ return this.inModule;
+ } else {
+ return reservedWords[6](word);
+ }
+ };
+
Parser.prototype.hasPlugin = function hasPlugin(name) {
- return !!(this.plugins["*"] || this.plugins[name]);
+ if (this.plugins["*"] && frozenDeprecatedWildcardPluginList.indexOf(name) > -1) {
+ return true;
+ }
+
+ return !!this.plugins[name];
};
Parser.prototype.extend = function extend(name, f) {
this[name] = f(this[name]);
};
+ Parser.prototype.loadAllPlugins = function loadAllPlugins() {
+ var _this2 = this;
+
+ // ensure flow plugin loads last, also ensure estree is not loaded with *
+ var pluginNames = Object.keys(plugins).filter(function (name) {
+ return name !== "flow" && name !== "estree";
+ });
+ pluginNames.push("flow");
+
+ pluginNames.forEach(function (name) {
+ var plugin = plugins[name];
+ if (plugin) plugin(_this2);
+ });
+ };
+
Parser.prototype.loadPlugins = function loadPlugins(pluginList) {
+ // TODO: Deprecate "*" option in next major version of Babylon
+ if (pluginList.indexOf("*") >= 0) {
+ this.loadAllPlugins();
+
+ return { "*": true };
+ }
+
var pluginMap = {};
if (pluginList.indexOf("flow") >= 0) {
@@ -1477,6 +1588,14 @@ var Parser = function (_Tokenizer) {
pluginList.push("flow");
}
+ if (pluginList.indexOf("estree") >= 0) {
+ // ensure estree plugin loads first
+ pluginList = pluginList.filter(function (plugin) {
+ return plugin !== "estree";
+ });
+ pluginList.unshift("estree");
+ }
+
for (var _iterator = pluginList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
@@ -1512,8 +1631,6 @@ var Parser = function (_Tokenizer) {
return Parser;
}(Tokenizer);
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var pp = Parser.prototype;
// ## Parser utilities
@@ -1599,7 +1716,6 @@ pp.unexpected = function (pos) {
this.raise(pos != null ? pos : this.state.start, messageOrType);
};
-/* eslint indent: 0 */
/* eslint max-len: 0 */
var pp$1 = Parser.prototype;
@@ -1657,8 +1773,8 @@ pp$1.parseStatement = function (declaration, topLevel) {
this.parseDecorators(true);
}
- var starttype = this.state.type,
- node = this.startNode();
+ var starttype = this.state.type;
+ var node = this.startNode();
// Most types of statements are recognized by the keyword they
// start with. Many are trivial to parse, some require a bit of
@@ -1679,7 +1795,6 @@ pp$1.parseStatement = function (declaration, topLevel) {
case types._class:
if (!declaration) this.unexpected();
- this.takeDecorators(node);
return this.parseClass(node, true);
case types._if:
@@ -1761,7 +1876,8 @@ pp$1.takeDecorators = function (node) {
pp$1.parseDecorators = function (allowExport) {
while (this.match(types.at)) {
- this.state.decorators.push(this.parseDecorator());
+ var decorator = this.parseDecorator();
+ this.state.decorators.push(decorator);
}
if (allowExport && this.match(types._export)) {
@@ -1854,8 +1970,8 @@ pp$1.parseForStatement = function (node) {
}
if (this.match(types._var) || this.match(types._let) || this.match(types._const)) {
- var _init = this.startNode(),
- varKind = this.state.type;
+ var _init = this.startNode();
+ var varKind = this.state.type;
this.next();
this.parseVar(_init, true, varKind);
this.finishNode(_init, "VariableDeclaration");
@@ -2087,7 +2203,9 @@ pp$1.parseBlock = function (allowDirectives) {
return this.finishNode(node, "BlockStatement");
};
-// TODO
+pp$1.isValidDirective = function (stmt) {
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
+};
pp$1.parseBlockBody = function (node, allowDirectives, topLevel, end) {
node.body = [];
@@ -2104,7 +2222,7 @@ pp$1.parseBlockBody = function (node, allowDirectives, topLevel, end) {
var stmt = this.parseStatement(true, topLevel);
- if (allowDirectives && !parsedNonDirective && stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized) {
+ if (allowDirectives && !parsedNonDirective && this.isValidDirective(stmt)) {
var directive = this.stmtToDirective(stmt);
node.directives.push(directive);
@@ -2237,6 +2355,7 @@ pp$1.parseFunctionParams = function (node) {
pp$1.parseClass = function (node, isStatement, optionalId) {
this.next();
+ this.takeDecorators(node);
this.parseClassId(node, isStatement, optionalId);
this.parseClassSuper(node);
this.parseClassBody(node);
@@ -2267,6 +2386,9 @@ pp$1.parseClassBody = function (node) {
while (!this.eat(types.braceR)) {
if (this.eat(types.semi)) {
+ if (decorators.length > 0) {
+ this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon");
+ }
continue;
}
@@ -2331,7 +2453,9 @@ pp$1.parseClassBody = function (node) {
}
// disallow invalid constructors
- var isConstructor = !isConstructorCall && !method.static && (key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor");
+ var isConstructor = !isConstructorCall && !method.static && (key.name === "constructor" || // Identifier
+ key.value === "constructor" // Literal
+ );
if (isConstructor) {
if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
@@ -2342,7 +2466,9 @@ pp$1.parseClassBody = function (node) {
}
// disallow static prototype method
- var isStaticPrototype = method.static && (key.type === "Identifier" && key.name === "prototype" || key.type === "StringLiteral" && key.value === "prototype");
+ var isStaticPrototype = method.static && (key.name === "prototype" || // Identifier
+ key.value === "prototype" // Literal
+ );
if (isStaticPrototype) {
this.raise(key.start, "Classes may not have static property named prototype");
}
@@ -2362,18 +2488,8 @@ pp$1.parseClassBody = function (node) {
this.parseClassMethod(classBody, method, isGenerator, isAsync);
- // get methods aren't allowed to have any parameters
- // set methods must have exactly 1 parameter
if (isGetSet) {
- var paramCount = method.kind === "get" ? 0 : 1;
- if (method.params.length !== paramCount) {
- var start = method.start;
- if (method.kind === "get") {
- this.raise(start, "getter should have no params");
- } else {
- this.raise(start, "setter should have exactly one param");
- }
- }
+ this.checkGetterSetterParamCount(method);
}
}
@@ -2467,7 +2583,7 @@ pp$1.parseExport = function (node) {
if (needsSemi) this.semicolon();
this.checkExport(node, true, true);
return this.finishNode(node, "ExportDefaultDeclaration");
- } else if (this.state.type.keyword || this.shouldParseExportDeclaration()) {
+ } else if (this.shouldParseExportDeclaration()) {
node.specifiers = [];
node.source = null;
node.declaration = this.parseExportDeclaration(node);
@@ -2520,7 +2636,7 @@ pp$1.parseExportFrom = function (node, expect) {
};
pp$1.shouldParseExportDeclaration = function () {
- return this.isContextual("async");
+ return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async");
};
pp$1.checkExport = function (node, checkNames, isDefault) {
@@ -2676,7 +2792,7 @@ pp$1.parseExportSpecifiers = function () {
// Parses import declaration.
pp$1.parseImport = function (node) {
- this.next();
+ this.eat(types._import);
// import '...'
if (this.match(types.string)) {
@@ -2698,8 +2814,8 @@ pp$1.parseImportSpecifiers = function (node) {
var first = true;
if (this.match(types.name)) {
// import defaultObj, { x, y as z } from '...'
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
if (!this.eat(types.comma)) return;
}
@@ -2719,16 +2835,30 @@ pp$1.parseImportSpecifiers = function (node) {
if (first) {
first = false;
} else {
+ // Detect an attempt to deep destructure
+ if (this.eat(types.colon)) {
+ this.unexpected(null, "ES2015 named imports do not destructure. Use another statement for destructuring after the import.");
+ }
+
this.expect(types.comma);
if (this.eat(types.braceR)) break;
}
- var _specifier3 = this.startNode();
- _specifier3.imported = this.parseIdentifier(true);
- _specifier3.local = this.eatContextual("as") ? this.parseIdentifier() : _specifier3.imported.__clone();
- this.checkLVal(_specifier3.local, true, undefined, "import specifier");
- node.specifiers.push(this.finishNode(_specifier3, "ImportSpecifier"));
+ this.parseImportSpecifier(node);
+ }
+};
+
+pp$1.parseImportSpecifier = function (node) {
+ var specifier = this.startNode();
+ specifier.imported = this.parseIdentifier(true);
+ if (this.eatContextual("as")) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ this.checkReservedWord(specifier.imported.name, specifier.start, true, true);
+ specifier.local = specifier.imported.__clone();
}
+ this.checkLVal(specifier.local, true, undefined, "import specifier");
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
};
pp$1.parseImportSpecifierDefault = function (id, startPos, startLoc) {
@@ -2738,8 +2868,6 @@ pp$1.parseImportSpecifierDefault = function (id, startPos, startLoc) {
return this.finishNode(node, "ImportDefaultSpecifier");
};
-/* eslint indent: 0 */
-
var pp$2 = Parser.prototype;
// Convert existing expression atom to assignable pattern
@@ -2953,9 +3081,7 @@ pp$2.parseMaybeDefault = function (startPos, startLoc, left) {
pp$2.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
switch (expr.type) {
case "Identifier":
- if (this.state.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) {
- this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
- }
+ this.checkReservedWord(expr.name, expr.start, false, true);
if (checkClashes) {
// we need to prefix this with an underscore for the cases where we have a key of
@@ -3042,7 +3168,6 @@ pp$2.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
}
};
-/* eslint indent: 0 */
/* eslint max-len: 0 */
// A recursive descent parser operates by defining functions for all
@@ -3071,31 +3196,28 @@ var pp$3 = Parser.prototype;
// strict mode, init properties are also not allowed to be repeated.
pp$3.checkPropClash = function (prop, propHash) {
- if (prop.computed) return;
+ if (prop.computed || prop.kind) return;
var key = prop.key;
- var name = void 0;
- switch (key.type) {
- case "Identifier":
- name = key.name;
- break;
-
- case "StringLiteral":
- case "NumericLiteral":
- name = String(key.value);
- break;
-
- // istanbul ignore next: non-computed property keys are always one of the above
- default:
- return;
- }
+ // It is either an Identifier or a String/NumericLiteral
+ var name = key.type === "Identifier" ? key.name : String(key.value);
- if (name === "__proto__" && !prop.kind) {
+ if (name === "__proto__") {
if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
propHash.proto = true;
}
};
+// Convenience method to parse an Expression only
+pp$3.getExpression = function () {
+ this.nextToken();
+ var expr = this.parseExpression();
+ if (!this.match(types.eof)) {
+ this.unexpected();
+ }
+ return expr;
+};
+
// ### Expression parsing
// These nest, from the most general expression type at the top to
@@ -3112,8 +3234,8 @@ pp$3.checkPropClash = function (prop, propHash) {
// delayed syntax error at correct position).
pp$3.parseExpression = function (noIn, refShorthandDefaultPos) {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
if (this.match(types.comma)) {
var node = this.startNodeAt(startPos, startLoc);
@@ -3187,8 +3309,8 @@ pp$3.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse,
// Parse a ternary conditional (`?:`) operator.
pp$3.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrowPos) {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
@@ -3210,8 +3332,8 @@ pp$3.parseConditional = function (expr, noIn, startPos, startLoc) {
// Start the precedence parser.
pp$3.parseExprOps = function (noIn, refShorthandDefaultPos) {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var expr = this.parseMaybeUnary(refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
return expr;
@@ -3280,8 +3402,8 @@ pp$3.parseMaybeUnary = function (refShorthandDefaultPos) {
return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
}
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var expr = this.parseExprSubscripts(refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
while (this.state.type.postfix && !this.canInsertSemicolon()) {
@@ -3299,8 +3421,8 @@ pp$3.parseMaybeUnary = function (refShorthandDefaultPos) {
// Parse call, dot, and `[]`-subscript expressions.
pp$3.parseExprSubscripts = function (refShorthandDefaultPos) {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var potentialArrowAt = this.state.potentialArrowAt;
var expr = this.parseExprAtom(refShorthandDefaultPos);
@@ -3364,10 +3486,10 @@ pp$3.parseSubscripts = function (base, startPos, startLoc, noCalls) {
};
pp$3.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
+ var elts = [];
var innerParenStart = void 0;
+ var first = true;
- var elts = [],
- first = true;
while (!this.eat(close)) {
if (first) {
first = false;
@@ -3381,7 +3503,7 @@ pp$3.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
innerParenStart = this.state.start;
}
- elts.push(this.parseExprListItem(undefined, possibleAsyncArrow ? { start: 0 } : undefined));
+ elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { start: 0 } : undefined, possibleAsyncArrow ? { start: 0 } : undefined));
}
// we found an async arrow function so let's not allow any inner parens
@@ -3404,8 +3526,8 @@ pp$3.parseAsyncArrowFromCallExpression = function (node, call) {
// Parse a no-call expression (like argument of `new` or `::` operators).
pp$3.parseNoCallExpr = function () {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
};
@@ -3415,8 +3537,9 @@ pp$3.parseNoCallExpr = function () {
// or `{}`.
pp$3.parseExprAtom = function (refShorthandDefaultPos) {
- var node = void 0,
- canBeArrow = this.state.potentialArrowAt === this.state.start;
+ var canBeArrow = this.state.potentialArrowAt === this.state.start;
+ var node = void 0;
+
switch (this.state.type) {
case types._super:
if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
@@ -3582,10 +3705,13 @@ pp$3.parseMetaProperty = function (node, meta, propertyName) {
return this.finishNode(node, "MetaProperty");
};
-pp$3.parseLiteral = function (value, type) {
- var node = this.startNode();
+pp$3.parseLiteral = function (value, type, startPos, startLoc) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+
+ var node = this.startNodeAt(startPos, startLoc);
this.addExtra(node, "rawValue", value);
- this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
+ this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
node.value = value;
this.next();
return this.finishNode(node, type);
@@ -3605,14 +3731,15 @@ pp$3.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArr
var val = void 0;
this.expect(types.parenL);
- var innerStartPos = this.state.start,
- innerStartLoc = this.state.startLoc;
- var exprList = [],
- first = true;
- var refShorthandDefaultPos = { start: 0 },
- spreadStart = void 0,
- optionalCommaStart = void 0;
+ var innerStartPos = this.state.start;
+ var innerStartLoc = this.state.startLoc;
+ var exprList = [];
+ var refShorthandDefaultPos = { start: 0 };
var refNeedsArrowPos = { start: 0 };
+ var first = true;
+ var spreadStart = void 0;
+ var optionalCommaStart = void 0;
+
while (!this.match(types.parenR)) {
if (first) {
first = false;
@@ -3625,8 +3752,8 @@ pp$3.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArr
}
if (this.match(types.ellipsis)) {
- var spreadNodeStartPos = this.state.start,
- spreadNodeStartLoc = this.state.startLoc;
+ var spreadNodeStartPos = this.state.start;
+ var spreadNodeStartLoc = this.state.startLoc;
spreadStart = this.state.start;
exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartLoc, spreadNodeStartPos));
break;
@@ -3787,8 +3914,9 @@ pp$3.parseObj = function (isPattern, refShorthandDefaultPos) {
}
if (this.hasPlugin("objectRestSpread") && this.match(types.ellipsis)) {
- prop = this.parseSpread();
+ prop = this.parseSpread(isPattern ? { start: 0 } : undefined);
prop.type = isPattern ? "RestProperty" : "SpreadProperty";
+ if (isPattern) this.toAssignable(prop.argument, true, "object pattern");
node.properties.push(prop);
if (isPattern) {
var position = this.state.start;
@@ -3827,6 +3955,7 @@ pp$3.parseObj = function (isPattern, refShorthandDefaultPos) {
var asyncId = this.parseIdentifier();
if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {
prop.key = asyncId;
+ prop.computed = false;
} else {
isAsync = true;
if (this.hasPlugin("asyncGenerators")) isGenerator = this.eat(types.star);
@@ -3857,46 +3986,60 @@ pp$3.parseObj = function (isPattern, refShorthandDefaultPos) {
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
};
-pp$3.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
+pp$3.isGetterOrSetterMethod = function (prop, isPattern) {
+ return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || // get "string"() {}
+ this.match(types.num) || // get 1() {}
+ this.match(types.bracketL) || // get ["string"]() {}
+ this.match(types.name) || // get foo() {}
+ this.state.type.keyword // get debugger() {}
+ );
+};
+
+// get methods aren't allowed to have any parameters
+// set methods must have exactly 1 parameter
+pp$3.checkGetterSetterParamCount = function (method) {
+ var paramCount = method.kind === "get" ? 0 : 1;
+ if (method.params.length !== paramCount) {
+ var start = method.start;
+ if (method.kind === "get") {
+ this.raise(start, "getter should have no params");
+ } else {
+ this.raise(start, "setter should have exactly one param");
+ }
+ }
+};
+
+pp$3.parseObjectMethod = function (prop, isGenerator, isAsync, isPattern) {
if (isAsync || isGenerator || this.match(types.parenL)) {
if (isPattern) this.unexpected();
prop.kind = "method";
prop.method = true;
this.parseMethod(prop, isGenerator, isAsync);
- return this.finishNode(prop, "ObjectMethod");
- }
- if (this.eat(types.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
- return this.finishNode(prop, "ObjectProperty");
+ return this.finishNode(prop, "ObjectMethod");
}
- if (!isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && !this.match(types.comma) && !this.match(types.braceR)) {
+ if (this.isGetterOrSetterMethod(prop, isPattern)) {
if (isGenerator || isAsync) this.unexpected();
prop.kind = prop.key.name;
this.parsePropertyName(prop);
- this.parseMethod(prop, false);
- var paramCount = prop.kind === "get" ? 0 : 1;
- if (prop.params.length !== paramCount) {
- var start = prop.start;
- if (prop.kind === "get") {
- this.raise(start, "getter should have no params");
- } else {
- this.raise(start, "setter should have exactly one param");
- }
- }
+ this.parseMethod(prop);
+ this.checkGetterSetterParamCount(prop);
+
return this.finishNode(prop, "ObjectMethod");
}
+};
+
+pp$3.parseObjectProperty = function (prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
+ if (this.eat(types.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
+
+ return this.finishNode(prop, "ObjectProperty");
+ }
if (!prop.computed && prop.key.type === "Identifier") {
if (isPattern) {
- var illegalBinding = this.isKeyword(prop.key.name);
- if (!illegalBinding && this.state.strict) {
- illegalBinding = reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name);
- }
- if (illegalBinding) {
- this.raise(prop.key.start, "Binding " + prop.key.name);
- }
+ this.checkReservedWord(prop.key.name, prop.key.start, true, true);
prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
} else if (this.match(types.eq) && refShorthandDefaultPos) {
if (!refShorthandDefaultPos.start) {
@@ -3907,10 +4050,17 @@ pp$3.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsyn
prop.value = prop.key.__clone();
}
prop.shorthand = true;
+
return this.finishNode(prop, "ObjectProperty");
}
+};
- this.unexpected();
+pp$3.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
+ var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
+
+ if (!node) this.unexpected();
+
+ return node;
};
pp$3.parsePropertyName = function (prop) {
@@ -3918,11 +4068,14 @@ pp$3.parsePropertyName = function (prop) {
prop.computed = true;
prop.key = this.parseMaybeAssign();
this.expect(types.bracketR);
- return prop.key;
} else {
prop.computed = false;
- return prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+ var oldInPropertyName = this.state.inPropertyName;
+ this.state.inPropertyName = true;
+ prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+ this.state.inPropertyName = oldInPropertyName;
}
+ return prop.key;
};
// Initialize empty function node.
@@ -3942,7 +4095,7 @@ pp$3.parseMethod = function (node, isGenerator, isAsync) {
this.initFunction(node, isAsync);
this.expect(types.parenL);
node.params = this.parseBindingList(types.parenR);
- node.generator = isGenerator;
+ node.generator = !!isGenerator;
this.parseFunctionBody(node);
this.state.inMethod = oldInMethod;
return node;
@@ -3957,8 +4110,32 @@ pp$3.parseArrowExpression = function (node, params, isAsync) {
return this.finishNode(node, "ArrowFunctionExpression");
};
-// Parse function body and check parameters.
+pp$3.isStrictBody = function (node, isExpression) {
+ if (!isExpression && node.body.directives.length) {
+ for (var _iterator2 = node.body.directives, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
+ var _ref2;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
+
+ var directive = _ref2;
+
+ if (directive.value.value === "use strict") {
+ return true;
+ }
+ }
+ }
+
+ return false;
+};
+// Parse function body and check parameters.
pp$3.parseFunctionBody = function (node, allowExpression) {
var isExpression = allowExpression && !this.match(types.braceL);
@@ -3970,9 +4147,9 @@ pp$3.parseFunctionBody = function (node, allowExpression) {
} else {
// Start a new scope with regard to labels and the `inFunction`
// flag (restore them to their old value afterwards).
- var oldInFunc = this.state.inFunction,
- oldInGen = this.state.inGenerator,
- oldLabels = this.state.labels;
+ var oldInFunc = this.state.inFunction;
+ var oldInGen = this.state.inGenerator;
+ var oldLabels = this.state.labels;
this.state.inFunction = true;this.state.inGenerator = node.generator;this.state.labels = [];
node.body = this.parseBlock(true);
node.expression = false;
@@ -3983,37 +4160,10 @@ pp$3.parseFunctionBody = function (node, allowExpression) {
// If this is a strict mode function, verify that argument names
// are not repeated, and it does not try to bind the words `eval`
// or `arguments`.
- var checkLVal = this.state.strict;
- var isStrict = false;
-
- // arrow function
- if (allowExpression) checkLVal = true;
-
- // normal function
- if (!isExpression && node.body.directives.length) {
- for (var _iterator2 = node.body.directives, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
- var _ref2;
-
- if (_isArray2) {
- if (_i2 >= _iterator2.length) break;
- _ref2 = _iterator2[_i2++];
- } else {
- _i2 = _iterator2.next();
- if (_i2.done) break;
- _ref2 = _i2.value;
- }
-
- var directive = _ref2;
+ var isStrict = this.isStrictBody(node, isExpression);
+ // Also check when allowExpression === true for arrow functions
+ var checkLVal = this.state.strict || allowExpression || isStrict;
- if (directive.value.value === "use strict") {
- isStrict = true;
- checkLVal = true;
- break;
- }
- }
- }
-
- //
if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") {
this.raise(node.id.start, "Binding yield in strict mode");
}
@@ -4055,8 +4205,9 @@ pp$3.parseFunctionBody = function (node, allowExpression) {
// for array literals).
pp$3.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
- var elts = [],
- first = true;
+ var elts = [];
+ var first = true;
+
while (!this.eat(close)) {
if (first) {
first = false;
@@ -4070,14 +4221,14 @@ pp$3.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
return elts;
};
-pp$3.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
+pp$3.parseExprListItem = function (allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) {
var elt = void 0;
if (allowEmpty && this.match(types.comma)) {
elt = null;
} else if (this.match(types.ellipsis)) {
elt = this.parseSpread(refShorthandDefaultPos);
} else {
- elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem);
+ elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
}
return elt;
};
@@ -4088,14 +4239,13 @@ pp$3.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
pp$3.parseIdentifier = function (liberal) {
var node = this.startNode();
+ if (!liberal) {
+ this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false);
+ }
if (this.match(types.name)) {
- if (!liberal && this.state.strict && reservedWords.strict(this.state.value)) {
- this.raise(this.state.start, "The keyword '" + this.state.value + "' is reserved");
- }
-
node.name = this.state.value;
- } else if (liberal && this.state.type.keyword) {
+ } else if (this.state.type.keyword) {
node.name = this.state.type.keyword;
} else {
this.unexpected();
@@ -4111,6 +4261,16 @@ pp$3.parseIdentifier = function (liberal) {
return this.finishNode(node, "Identifier");
};
+pp$3.checkReservedWord = function (word, startLoc, checkKeywords, isBinding) {
+ if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) {
+ this.raise(startLoc, word + " is a reserved word");
+ }
+
+ if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) {
+ this.raise(startLoc, word + " is a reserved word in strict mode");
+ }
+};
+
// Parses await expression inside async function.
pp$3.parseAwait = function (node) {
@@ -4140,8 +4300,6 @@ pp$3.parseYield = function () {
return this.finishNode(node, "YieldExpression");
};
-function _classCallCheck$6(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// Start an AST node, attaching a start offset.
var pp$4 = Parser.prototype;
@@ -4149,7 +4307,7 @@ var commentKeys = ["leadingComments", "trailingComments", "innerComments"];
var Node = function () {
function Node(pos, loc, filename) {
- _classCallCheck$6(this, Node);
+ classCallCheck(this, Node);
this.type = "";
this.start = pos;
@@ -4376,32 +4534,373 @@ pp$6.processComment = function (node) {
stack.push(node);
};
-/* eslint indent: 0 */
+var pp$7 = Parser.prototype;
+
+pp$7.estreeParseRegExpLiteral = function (_ref) {
+ var pattern = _ref.pattern,
+ flags = _ref.flags;
+
+ var regex = null;
+ try {
+ regex = new RegExp(pattern, flags);
+ } catch (e) {
+ // In environments that don't support these flags value will
+ // be null as the regex can't be represented natively.
+ }
+ var node = this.estreeParseLiteral(regex);
+ node.regex = { pattern: pattern, flags: flags };
+
+ return node;
+};
+
+pp$7.estreeParseLiteral = function (value) {
+ return this.parseLiteral(value, "Literal");
+};
+
+pp$7.directiveToStmt = function (directive) {
+ var directiveLiteral = directive.value;
+
+ var stmt = this.startNodeAt(directive.start, directive.loc.start);
+ var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
+
+ expression.value = directiveLiteral.value;
+ expression.raw = directiveLiteral.extra.raw;
+
+ stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
+ stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
+
+ return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
+};
+
+function isSimpleProperty(node) {
+ return node && node.type === "Property" && node.kind === "init" && node.method === false;
+}
+
+var estreePlugin = function (instance) {
+ instance.extend("checkDeclaration", function (inner) {
+ return function (node) {
+ if (isSimpleProperty(node)) {
+ this.checkDeclaration(node.value);
+ } else {
+ inner.call(this, node);
+ }
+ };
+ });
+
+ instance.extend("checkGetterSetterParamCount", function () {
+ return function (prop) {
+ var paramCount = prop.kind === "get" ? 0 : 1;
+ if (prop.value.params.length !== paramCount) {
+ var start = prop.start;
+ if (prop.kind === "get") {
+ this.raise(start, "getter should have no params");
+ } else {
+ this.raise(start, "setter should have exactly one param");
+ }
+ }
+ };
+ });
+
+ instance.extend("checkLVal", function (inner) {
+ return function (expr, isBinding, checkClashes) {
+ var _this = this;
+
+ switch (expr.type) {
+ case "ObjectPattern":
+ expr.properties.forEach(function (prop) {
+ _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern");
+ });
+ break;
+ default:
+ for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
+ args[_key - 3] = arguments[_key];
+ }
+
+ inner.call.apply(inner, [this, expr, isBinding, checkClashes].concat(args));
+ }
+ };
+ });
+
+ instance.extend("checkPropClash", function () {
+ return function (prop, propHash) {
+ if (prop.computed || !isSimpleProperty(prop)) return;
+
+ var key = prop.key;
+ // It is either an Identifier or a String/NumericLiteral
+ var name = key.type === "Identifier" ? key.name : String(key.value);
+
+ if (name === "__proto__") {
+ if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
+ propHash.proto = true;
+ }
+ };
+ });
+
+ instance.extend("isStrictBody", function () {
+ return function (node, isExpression) {
+ if (!isExpression && node.body.body.length > 0) {
+ for (var _iterator = node.body.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
+ var _ref2;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref2 = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref2 = _i.value;
+ }
+
+ var directive = _ref2;
+
+ if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") {
+ if (directive.expression.value === "use strict") return true;
+ } else {
+ // Break for the first non literal expression
+ break;
+ }
+ }
+ }
+
+ return false;
+ };
+ });
+
+ instance.extend("isValidDirective", function () {
+ return function (stmt) {
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
+ };
+ });
+
+ instance.extend("parseBlockBody", function (inner) {
+ return function (node) {
+ var _this2 = this;
+
+ for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ args[_key2 - 1] = arguments[_key2];
+ }
+
+ inner.call.apply(inner, [this, node].concat(args));
+
+ node.directives.reverse().forEach(function (directive) {
+ node.body.unshift(_this2.directiveToStmt(directive));
+ });
+ delete node.directives;
+ };
+ });
+
+ instance.extend("parseClassMethod", function (inner) {
+ return function (classBody) {
+ for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
+ args[_key3 - 1] = arguments[_key3];
+ }
+
+ inner.call.apply(inner, [this, classBody].concat(args));
+
+ var body = classBody.body;
+ body[body.length - 1].type = "MethodDefinition";
+ };
+ });
+
+ instance.extend("parseExprAtom", function (inner) {
+ return function () {
+ switch (this.state.type) {
+ case types.regexp:
+ return this.estreeParseRegExpLiteral(this.state.value);
+
+ case types.num:
+ case types.string:
+ return this.estreeParseLiteral(this.state.value);
+
+ case types._null:
+ return this.estreeParseLiteral(null);
+
+ case types._true:
+ return this.estreeParseLiteral(true);
+
+ case types._false:
+ return this.estreeParseLiteral(false);
+
+ default:
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ args[_key4] = arguments[_key4];
+ }
+
+ return inner.call.apply(inner, [this].concat(args));
+ }
+ };
+ });
+
+ instance.extend("parseLiteral", function (inner) {
+ return function () {
+ for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
+ args[_key5] = arguments[_key5];
+ }
+
+ var node = inner.call.apply(inner, [this].concat(args));
+ node.raw = node.extra.raw;
+ delete node.extra;
+
+ return node;
+ };
+ });
+
+ instance.extend("parseMethod", function (inner) {
+ return function (node) {
+ var funcNode = this.startNode();
+ funcNode.kind = node.kind; // provide kind, so inner method correctly sets state
+
+ for (var _len6 = arguments.length, args = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
+ args[_key6 - 1] = arguments[_key6];
+ }
+
+ funcNode = inner.call.apply(inner, [this, funcNode].concat(args));
+ delete funcNode.kind;
+ node.value = this.finishNode(funcNode, "FunctionExpression");
+
+ return node;
+ };
+ });
+
+ instance.extend("parseObjectMethod", function (inner) {
+ return function () {
+ for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
+ args[_key7] = arguments[_key7];
+ }
+
+ var node = inner.call.apply(inner, [this].concat(args));
+
+ if (node) {
+ if (node.kind === "method") node.kind = "init";
+ node.type = "Property";
+ }
+
+ return node;
+ };
+ });
+
+ instance.extend("parseObjectProperty", function (inner) {
+ return function () {
+ for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
+ args[_key8] = arguments[_key8];
+ }
+
+ var node = inner.call.apply(inner, [this].concat(args));
+
+ if (node) {
+ node.kind = "init";
+ node.type = "Property";
+ }
+
+ return node;
+ };
+ });
+
+ instance.extend("toAssignable", function (inner) {
+ return function (node, isBinding) {
+ for (var _len9 = arguments.length, args = Array(_len9 > 2 ? _len9 - 2 : 0), _key9 = 2; _key9 < _len9; _key9++) {
+ args[_key9 - 2] = arguments[_key9];
+ }
+
+ if (isSimpleProperty(node)) {
+ this.toAssignable.apply(this, [node.value, isBinding].concat(args));
+
+ return node;
+ } else if (node.type === "ObjectExpression") {
+ node.type = "ObjectPattern";
+ for (var _iterator2 = node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
+ var _ref3;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref3 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref3 = _i2.value;
+ }
+
+ var prop = _ref3;
+
+ if (prop.kind === "get" || prop.kind === "set") {
+ this.raise(prop.key.start, "Object pattern can't contain getter or setter");
+ } else if (prop.method) {
+ this.raise(prop.key.start, "Object pattern can't contain methods");
+ } else {
+ this.toAssignable(prop, isBinding, "object destructuring pattern");
+ }
+ }
+
+ return node;
+ }
+
+ return inner.call.apply(inner, [this, node, isBinding].concat(args));
+ };
+ });
+};
+
/* eslint max-len: 0 */
-var pp$7 = Parser.prototype;
+var primitiveTypes = ["any", "mixed", "empty", "bool", "boolean", "number", "string", "void", "null"];
-pp$7.flowParseTypeInitialiser = function (tok, allowLeadingPipeOrAnd) {
+var pp$8 = Parser.prototype;
+
+pp$8.flowParseTypeInitialiser = function (tok) {
var oldInType = this.state.inType;
this.state.inType = true;
this.expect(tok || types.colon);
- if (allowLeadingPipeOrAnd) {
- if (this.match(types.bitwiseAND) || this.match(types.bitwiseOR)) {
- this.next();
- }
- }
+
var type = this.flowParseType();
this.state.inType = oldInType;
return type;
};
-pp$7.flowParseDeclareClass = function (node) {
+pp$8.flowParsePredicate = function () {
+ var node = this.startNode();
+ var moduloLoc = this.state.startLoc;
+ var moduloPos = this.state.start;
+ this.expect(types.modulo);
+ var checksLoc = this.state.startLoc;
+ this.expectContextual("checks");
+ // Force '%' and 'checks' to be adjacent
+ if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
+ this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here.");
+ }
+ if (this.eat(types.parenL)) {
+ node.expression = this.parseExpression();
+ this.expect(types.parenR);
+ return this.finishNode(node, "DeclaredPredicate");
+ } else {
+ return this.finishNode(node, "InferredPredicate");
+ }
+};
+
+pp$8.flowParseTypeAndPredicateInitialiser = function () {
+ var oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(types.colon);
+ var type = null;
+ var predicate = null;
+ if (this.match(types.modulo)) {
+ this.state.inType = oldInType;
+ predicate = this.flowParsePredicate();
+ } else {
+ type = this.flowParseType();
+ this.state.inType = oldInType;
+ if (this.match(types.modulo)) {
+ predicate = this.flowParsePredicate();
+ }
+ }
+ return [type, predicate];
+};
+
+pp$8.flowParseDeclareClass = function (node) {
this.next();
this.flowParseInterfaceish(node, true);
return this.finishNode(node, "DeclareClass");
};
-pp$7.flowParseDeclareFunction = function (node) {
+pp$8.flowParseDeclareFunction = function (node) {
this.next();
var id = node.id = this.parseIdentifier();
@@ -4420,9 +4919,15 @@ pp$7.flowParseDeclareFunction = function (node) {
typeNode.params = tmp.params;
typeNode.rest = tmp.rest;
this.expect(types.parenR);
- typeNode.returnType = this.flowParseTypeInitialiser();
+ var predicate = null;
+
+ var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser();
+
+ typeNode.returnType = _flowParseTypeAndPred[0];
+ predicate = _flowParseTypeAndPred[1];
typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
+ typeContainer.predicate = predicate;
id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
this.finishNode(id, id.type);
@@ -4432,7 +4937,7 @@ pp$7.flowParseDeclareFunction = function (node) {
return this.finishNode(node, "DeclareFunction");
};
-pp$7.flowParseDeclare = function (node) {
+pp$8.flowParseDeclare = function (node) {
if (this.match(types._class)) {
return this.flowParseDeclareClass(node);
} else if (this.match(types._function)) {
@@ -4454,14 +4959,14 @@ pp$7.flowParseDeclare = function (node) {
}
};
-pp$7.flowParseDeclareVariable = function (node) {
+pp$8.flowParseDeclareVariable = function (node) {
this.next();
node.id = this.flowParseTypeAnnotatableIdentifier();
this.semicolon();
return this.finishNode(node, "DeclareVariable");
};
-pp$7.flowParseDeclareModule = function (node) {
+pp$8.flowParseDeclareModule = function (node) {
this.next();
if (this.match(types.string)) {
@@ -4474,11 +4979,22 @@ pp$7.flowParseDeclareModule = function (node) {
var body = bodyNode.body = [];
this.expect(types.braceL);
while (!this.match(types.braceR)) {
- var node2 = this.startNode();
+ var _bodyNode = this.startNode();
+
+ if (this.match(types._import)) {
+ var lookahead = this.lookahead();
+ if (lookahead.value !== "type" && lookahead.value !== "typeof") {
+ this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`");
+ }
- this.expectContextual("declare", "Unexpected token. Only declares are allowed inside declare module");
+ this.parseImport(_bodyNode);
+ } else {
+ this.expectContextual("declare", "Only declares and type imports are allowed inside declare module");
- body.push(this.flowParseDeclare(node2));
+ _bodyNode = this.flowParseDeclare(_bodyNode, true);
+ }
+
+ body.push(_bodyNode);
}
this.expect(types.braceR);
@@ -4486,21 +5002,23 @@ pp$7.flowParseDeclareModule = function (node) {
return this.finishNode(node, "DeclareModule");
};
-pp$7.flowParseDeclareModuleExports = function (node) {
+pp$8.flowParseDeclareModuleExports = function (node) {
this.expectContextual("module");
this.expect(types.dot);
this.expectContextual("exports");
node.typeAnnotation = this.flowParseTypeAnnotation();
+ this.semicolon();
+
return this.finishNode(node, "DeclareModuleExports");
};
-pp$7.flowParseDeclareTypeAlias = function (node) {
+pp$8.flowParseDeclareTypeAlias = function (node) {
this.next();
this.flowParseTypeAlias(node);
return this.finishNode(node, "DeclareTypeAlias");
};
-pp$7.flowParseDeclareInterface = function (node) {
+pp$8.flowParseDeclareInterface = function (node) {
this.next();
this.flowParseInterfaceish(node);
return this.finishNode(node, "DeclareInterface");
@@ -4508,7 +5026,7 @@ pp$7.flowParseDeclareInterface = function (node) {
// Interfaces
-pp$7.flowParseInterfaceish = function (node, allowStatic) {
+pp$8.flowParseInterfaceish = function (node, allowStatic) {
node.id = this.parseIdentifier();
if (this.isRelational("<")) {
@@ -4536,7 +5054,7 @@ pp$7.flowParseInterfaceish = function (node, allowStatic) {
node.body = this.flowParseObjectType(allowStatic);
};
-pp$7.flowParseInterfaceExtends = function () {
+pp$8.flowParseInterfaceExtends = function () {
var node = this.startNode();
node.id = this.flowParseQualifiedTypeIdentifier();
@@ -4549,15 +5067,23 @@ pp$7.flowParseInterfaceExtends = function () {
return this.finishNode(node, "InterfaceExtends");
};
-pp$7.flowParseInterface = function (node) {
+pp$8.flowParseInterface = function (node) {
this.flowParseInterfaceish(node, false);
return this.finishNode(node, "InterfaceDeclaration");
};
+pp$8.flowParseRestrictedIdentifier = function (liberal) {
+ if (primitiveTypes.indexOf(this.state.value) > -1) {
+ this.raise(this.state.start, "Cannot overwrite primitive type " + this.state.value);
+ }
+
+ return this.parseIdentifier(liberal);
+};
+
// Type aliases
-pp$7.flowParseTypeAlias = function (node) {
- node.id = this.parseIdentifier();
+pp$8.flowParseTypeAlias = function (node) {
+ node.id = this.flowParseRestrictedIdentifier();
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterDeclaration();
@@ -4565,8 +5091,7 @@ pp$7.flowParseTypeAlias = function (node) {
node.typeParameters = null;
}
- node.right = this.flowParseTypeInitialiser(types.eq,
- /*allowLeadingPipeOrAnd*/true);
+ node.right = this.flowParseTypeInitialiser(types.eq);
this.semicolon();
return this.finishNode(node, "TypeAlias");
@@ -4574,7 +5099,7 @@ pp$7.flowParseTypeAlias = function (node) {
// Type annotations
-pp$7.flowParseTypeParameter = function () {
+pp$8.flowParseTypeParameter = function () {
var node = this.startNode();
var variance = this.flowParseVariance();
@@ -4592,7 +5117,7 @@ pp$7.flowParseTypeParameter = function () {
return this.finishNode(node, "TypeParameter");
};
-pp$7.flowParseTypeParameterDeclaration = function () {
+pp$8.flowParseTypeParameterDeclaration = function () {
var oldInType = this.state.inType;
var node = this.startNode();
node.params = [];
@@ -4619,9 +5144,9 @@ pp$7.flowParseTypeParameterDeclaration = function () {
return this.finishNode(node, "TypeParameterDeclaration");
};
-pp$7.flowParseTypeParameterInstantiation = function () {
- var node = this.startNode(),
- oldInType = this.state.inType;
+pp$8.flowParseTypeParameterInstantiation = function () {
+ var node = this.startNode();
+ var oldInType = this.state.inType;
node.params = [];
this.state.inType = true;
@@ -4640,16 +5165,21 @@ pp$7.flowParseTypeParameterInstantiation = function () {
return this.finishNode(node, "TypeParameterInstantiation");
};
-pp$7.flowParseObjectPropertyKey = function () {
+pp$8.flowParseObjectPropertyKey = function () {
return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
};
-pp$7.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
+pp$8.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
node.static = isStatic;
this.expect(types.bracketL);
- node.id = this.flowParseObjectPropertyKey();
- node.key = this.flowParseTypeInitialiser();
+ if (this.lookahead().type === types.colon) {
+ node.id = this.flowParseObjectPropertyKey();
+ node.key = this.flowParseTypeInitialiser();
+ } else {
+ node.id = null;
+ node.key = this.flowParseType();
+ }
this.expect(types.bracketR);
node.value = this.flowParseTypeInitialiser();
node.variance = variance;
@@ -4658,7 +5188,7 @@ pp$7.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
return this.finishNode(node, "ObjectTypeIndexer");
};
-pp$7.flowParseObjectTypeMethodish = function (node) {
+pp$8.flowParseObjectTypeMethodish = function (node) {
node.params = [];
node.rest = null;
node.typeParameters = null;
@@ -4684,7 +5214,7 @@ pp$7.flowParseObjectTypeMethodish = function (node) {
return this.finishNode(node, "FunctionTypeAnnotation");
};
-pp$7.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
+pp$8.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
var node = this.startNodeAt(startPos, startLoc);
node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
node.static = isStatic;
@@ -4694,7 +5224,7 @@ pp$7.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
return this.finishNode(node, "ObjectTypeProperty");
};
-pp$7.flowParseObjectTypeCallProperty = function (node, isStatic) {
+pp$8.flowParseObjectTypeCallProperty = function (node, isStatic) {
var valueNode = this.startNode();
node.static = isStatic;
node.value = this.flowParseObjectTypeMethodish(valueNode);
@@ -4702,7 +5232,7 @@ pp$7.flowParseObjectTypeCallProperty = function (node, isStatic) {
return this.finishNode(node, "ObjectTypeCallProperty");
};
-pp$7.flowParseObjectType = function (allowStatic, allowExact) {
+pp$8.flowParseObjectType = function (allowStatic, allowExact) {
var oldInType = this.state.inType;
this.state.inType = true;
@@ -4731,8 +5261,8 @@ pp$7.flowParseObjectType = function (allowStatic, allowExact) {
while (!this.match(endDelim)) {
var optional = false;
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
node = this.startNode();
if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) {
this.next();
@@ -4748,7 +5278,7 @@ pp$7.flowParseObjectType = function (allowStatic, allowExact) {
if (variance) {
this.unexpected(variancePos);
}
- nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, allowStatic));
+ nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
} else {
propertyKey = this.flowParseObjectPropertyKey();
if (this.isRelational("<") || this.match(types.parenL)) {
@@ -4783,13 +5313,13 @@ pp$7.flowParseObjectType = function (allowStatic, allowExact) {
return out;
};
-pp$7.flowObjectTypeSemicolon = function () {
+pp$8.flowObjectTypeSemicolon = function () {
if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
this.unexpected();
}
};
-pp$7.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
+pp$8.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
startPos = startPos || this.state.start;
startLoc = startLoc || this.state.startLoc;
var node = id || this.parseIdentifier();
@@ -4804,7 +5334,7 @@ pp$7.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
return node;
};
-pp$7.flowParseGenericType = function (startPos, startLoc, id) {
+pp$8.flowParseGenericType = function (startPos, startLoc, id) {
var node = this.startNodeAt(startPos, startLoc);
node.typeParameters = null;
@@ -4817,14 +5347,14 @@ pp$7.flowParseGenericType = function (startPos, startLoc, id) {
return this.finishNode(node, "GenericTypeAnnotation");
};
-pp$7.flowParseTypeofType = function () {
+pp$8.flowParseTypeofType = function () {
var node = this.startNode();
this.expect(types._typeof);
node.argument = this.flowParsePrimaryType();
return this.finishNode(node, "TypeofTypeAnnotation");
};
-pp$7.flowParseTupleType = function () {
+pp$8.flowParseTupleType = function () {
var node = this.startNode();
node.types = [];
this.expect(types.bracketL);
@@ -4838,21 +5368,40 @@ pp$7.flowParseTupleType = function () {
return this.finishNode(node, "TupleTypeAnnotation");
};
-pp$7.flowParseFunctionTypeParam = function () {
+pp$8.flowParseFunctionTypeParam = function () {
+ var name = null;
var optional = false;
+ var typeAnnotation = null;
var node = this.startNode();
- node.name = this.parseIdentifier();
- if (this.eat(types.question)) {
- optional = true;
+ var lh = this.lookahead();
+ if (lh.type === types.colon || lh.type === types.question) {
+ name = this.parseIdentifier();
+ if (this.eat(types.question)) {
+ optional = true;
+ }
+ typeAnnotation = this.flowParseTypeInitialiser();
+ } else {
+ typeAnnotation = this.flowParseType();
}
+ node.name = name;
node.optional = optional;
- node.typeAnnotation = this.flowParseTypeInitialiser();
+ node.typeAnnotation = typeAnnotation;
return this.finishNode(node, "FunctionTypeParam");
};
-pp$7.flowParseFunctionTypeParams = function () {
- var ret = { params: [], rest: null };
- while (this.match(types.name)) {
+pp$8.reinterpretTypeAsFunctionTypeParam = function (type) {
+ var node = this.startNodeAt(type.start, type.loc);
+ node.name = null;
+ node.optional = false;
+ node.typeAnnotation = type;
+ return this.finishNode(node, "FunctionTypeParam");
+};
+
+pp$8.flowParseFunctionTypeParams = function () {
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+
+ var ret = { params: params, rest: null };
+ while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
ret.params.push(this.flowParseFunctionTypeParam());
if (!this.match(types.parenR)) {
this.expect(types.comma);
@@ -4864,7 +5413,7 @@ pp$7.flowParseFunctionTypeParams = function () {
return ret;
};
-pp$7.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
+pp$8.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
switch (id.name) {
case "any":
return this.finishNode(node, "AnyTypeAnnotation");
@@ -4896,13 +5445,14 @@ pp$7.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
// The parsing of types roughly parallels the parsing of expressions, and
// primary types are kind of like primary expressions...they're the
// primitives with which other types are constructed.
-pp$7.flowParsePrimaryType = function () {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+pp$8.flowParsePrimaryType = function () {
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var node = this.startNode();
var tmp = void 0;
var type = void 0;
var isGroupedType = false;
+ var oldNoAnonFunctionType = this.state.noAnonFunctionType;
switch (this.state.type) {
case types.name:
@@ -4948,12 +5498,26 @@ pp$7.flowParsePrimaryType = function () {
}
if (isGroupedType) {
+ this.state.noAnonFunctionType = false;
type = this.flowParseType();
- this.expect(types.parenR);
- return type;
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+
+ // A `,` or a `) =>` means this is an anonymous function type
+ if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
+ this.expect(types.parenR);
+ return type;
+ } else {
+ // Eat a comma if there is one
+ this.eat(types.comma);
+ }
+ }
+
+ if (type) {
+ tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
+ } else {
+ tmp = this.flowParseFunctionTypeParams();
}
- tmp = this.flowParseFunctionTypeParams();
node.params = tmp.params;
node.rest = tmp.rest;
@@ -4962,16 +5526,13 @@ pp$7.flowParsePrimaryType = function () {
this.expect(types.arrow);
node.returnType = this.flowParseType();
+
node.typeParameters = null;
return this.finishNode(node, "FunctionTypeAnnotation");
case types.string:
- node.value = this.state.value;
- this.addExtra(node, "rawValue", node.value);
- this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
- this.next();
- return this.finishNode(node, "StringLiteralTypeAnnotation");
+ return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
case types._true:case types._false:
node.value = this.match(types._true);
@@ -4981,21 +5542,14 @@ pp$7.flowParsePrimaryType = function () {
case types.plusMin:
if (this.state.value === "-") {
this.next();
- if (!this.match(types.num)) this.unexpected();
+ if (!this.match(types.num)) this.unexpected(null, "Unexpected token, expected number");
- node.value = -this.state.value;
- this.addExtra(node, "rawValue", node.value);
- this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
- this.next();
- return this.finishNode(node, "NumericLiteralTypeAnnotation");
+ return this.parseLiteral(-this.state.value, "NumericLiteralTypeAnnotation", node.start, node.loc.start);
}
+ this.unexpected();
case types.num:
- node.value = this.state.value;
- this.addExtra(node, "rawValue", node.value);
- this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
- this.next();
- return this.finishNode(node, "NumericLiteralTypeAnnotation");
+ return this.parseLiteral(this.state.value, "NumericLiteralTypeAnnotation");
case types._null:
node.value = this.match(types._null);
@@ -5020,19 +5574,21 @@ pp$7.flowParsePrimaryType = function () {
this.unexpected();
};
-pp$7.flowParsePostfixType = function () {
- var node = this.startNode();
- var type = node.elementType = this.flowParsePrimaryType();
- if (this.match(types.bracketL)) {
+pp$8.flowParsePostfixType = function () {
+ var startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ var type = this.flowParsePrimaryType();
+ while (!this.canInsertSemicolon() && this.match(types.bracketL)) {
+ var node = this.startNodeAt(startPos, startLoc);
+ node.elementType = type;
this.expect(types.bracketL);
this.expect(types.bracketR);
- return this.finishNode(node, "ArrayTypeAnnotation");
- } else {
- return type;
+ type = this.finishNode(node, "ArrayTypeAnnotation");
}
+ return type;
};
-pp$7.flowParsePrefixType = function () {
+pp$8.flowParsePrefixType = function () {
var node = this.startNode();
if (this.eat(types.question)) {
node.typeAnnotation = this.flowParsePrefixType();
@@ -5042,18 +5598,33 @@ pp$7.flowParsePrefixType = function () {
}
};
-pp$7.flowParseIntersectionType = function () {
+pp$8.flowParseAnonFunctionWithoutParens = function () {
+ var param = this.flowParsePrefixType();
+ if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
+ var node = this.startNodeAt(param.start, param.loc);
+ node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
+ node.rest = null;
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+ return param;
+};
+
+pp$8.flowParseIntersectionType = function () {
var node = this.startNode();
- var type = this.flowParsePrefixType();
+ this.eat(types.bitwiseAND);
+ var type = this.flowParseAnonFunctionWithoutParens();
node.types = [type];
while (this.eat(types.bitwiseAND)) {
- node.types.push(this.flowParsePrefixType());
+ node.types.push(this.flowParseAnonFunctionWithoutParens());
}
return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
};
-pp$7.flowParseUnionType = function () {
+pp$8.flowParseUnionType = function () {
var node = this.startNode();
+ this.eat(types.bitwiseOR);
var type = this.flowParseIntersectionType();
node.types = [type];
while (this.eat(types.bitwiseOR)) {
@@ -5062,7 +5633,7 @@ pp$7.flowParseUnionType = function () {
return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
};
-pp$7.flowParseType = function () {
+pp$8.flowParseType = function () {
var oldInType = this.state.inType;
this.state.inType = true;
var type = this.flowParseUnionType();
@@ -5070,14 +5641,25 @@ pp$7.flowParseType = function () {
return type;
};
-pp$7.flowParseTypeAnnotation = function () {
+pp$8.flowParseTypeAnnotation = function () {
var node = this.startNode();
node.typeAnnotation = this.flowParseTypeInitialiser();
return this.finishNode(node, "TypeAnnotation");
};
-pp$7.flowParseTypeAnnotatableIdentifier = function () {
- var ident = this.parseIdentifier();
+pp$8.flowParseTypeAndPredicateAnnotation = function () {
+ var node = this.startNode();
+
+ var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser();
+
+ node.typeAnnotation = _flowParseTypeAndPred2[0];
+ node.predicate = _flowParseTypeAndPred2[1];
+
+ return this.finishNode(node, "TypeAnnotation");
+};
+
+pp$8.flowParseTypeAnnotatableIdentifier = function () {
+ var ident = this.flowParseRestrictedIdentifier();
if (this.match(types.colon)) {
ident.typeAnnotation = this.flowParseTypeAnnotation();
this.finishNode(ident, ident.type);
@@ -5085,13 +5667,13 @@ pp$7.flowParseTypeAnnotatableIdentifier = function () {
return ident;
};
-pp$7.typeCastToParameter = function (node) {
+pp$8.typeCastToParameter = function (node) {
node.expression.typeAnnotation = node.typeAnnotation;
return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
};
-pp$7.flowParseVariance = function () {
+pp$8.flowParseVariance = function () {
var variance = null;
if (this.match(types.plusMin)) {
if (this.state.value === "+") {
@@ -5111,7 +5693,7 @@ var flowPlugin = function (instance) {
if (this.match(types.colon) && !allowExpression) {
// if allowExpression is true then we're parsing an arrow function and if
// there's a return type then it's been handled elsewhere
- node.returnType = this.flowParseTypeAnnotation();
+ node.returnType = this.flowParseTypeAndPredicateAnnotation();
}
return inner.call(this, node, allowExpression);
@@ -5262,17 +5844,6 @@ var flowPlugin = function (instance) {
};
});
- // ensure that inside property names, < isn't interpreted as JSX, but as a type parameter
- instance.extend("parsePropertyName", function (inner) {
- return function (prop) {
- var oldInType = this.state.inType;
- this.state.inType = true;
- var out = inner.call(this, prop);
- this.state.inType = oldInType;
- return out;
- };
- });
-
// ensure that inside flow types, we bypass the jsx parser plugin
instance.extend("readToken", function (inner) {
return function (code) {
@@ -5332,9 +5903,14 @@ var flowPlugin = function (instance) {
// parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
// the position where this function is called
instance.extend("parseExprListItem", function (inner) {
- return function (allowEmpty, refShorthandDefaultPos) {
+ return function () {
var container = this.startNode();
- var node = inner.call(this, allowEmpty, refShorthandDefaultPos);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var node = inner.call.apply(inner, [this].concat(args));
if (this.match(types.colon)) {
container._exprListItem = true;
container.expression = node;
@@ -5373,8 +5949,8 @@ var flowPlugin = function (instance) {
});
// parse type parameters for class methods
- instance.extend("parseClassMethod", function () {
- return function (classBody, method, isGenerator, isAsync) {
+ instance.extend("parseClassMethod", function (inner) {
+ return function (classBody, method) {
if (method.variance) {
this.unexpected(method.variancePos);
}
@@ -5383,8 +5959,12 @@ var flowPlugin = function (instance) {
if (this.isRelational("<")) {
method.typeParameters = this.flowParseTypeParameterDeclaration();
}
- this.parseMethod(method, isGenerator, isAsync);
- classBody.body.push(this.finishNode(method, "ClassMethod"));
+
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ inner.call.apply(inner, [this, classBody, method].concat(args));
};
});
@@ -5464,8 +6044,8 @@ var flowPlugin = function (instance) {
instance.extend("parseMaybeDefault", function (inner) {
return function () {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
}
var node = inner.apply(this, args);
@@ -5501,6 +6081,62 @@ var flowPlugin = function (instance) {
};
});
+ // parse import-type/typeof shorthand
+ instance.extend("parseImportSpecifier", function () {
+ return function (node) {
+ var specifier = this.startNode();
+ var firstIdentLoc = this.state.start;
+ var firstIdent = this.parseIdentifier(true);
+
+ var specifierTypeKind = null;
+ if (firstIdent.name === "type") {
+ specifierTypeKind = "type";
+ } else if (firstIdent.name === "typeof") {
+ specifierTypeKind = "typeof";
+ }
+
+ var isBinding = false;
+ if (this.isContextual("as")) {
+ var as_ident = this.parseIdentifier(true);
+ if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
+ // `import {type as ,` or `import {type as }`
+ specifier.imported = as_ident;
+ specifier.importKind = specifierTypeKind;
+ specifier.local = as_ident.__clone();
+ } else {
+ // `import {type as foo`
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ specifier.local = this.parseIdentifier();
+ }
+ } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
+ // `import {type foo`
+ specifier.imported = this.parseIdentifier(true);
+ specifier.importKind = specifierTypeKind;
+ if (this.eatContextual("as")) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ isBinding = true;
+ specifier.local = specifier.imported.__clone();
+ }
+ } else {
+ isBinding = true;
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ specifier.local = specifier.imported.__clone();
+ }
+
+ if ((node.importKind === "type" || node.importKind === "typeof") && (specifier.importKind === "type" || specifier.importKind === "typeof")) {
+ this.raise(firstIdentLoc, "`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`");
+ }
+
+ if (isBinding) this.checkReservedWord(specifier.local.name, specifier.start, true, true);
+
+ this.checkLVal(specifier.local, true, undefined, "import specifier");
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ };
+ });
+
// parse function type parameters - function foo<T>() {}
instance.extend("parseFunctionParams", function (inner) {
return function (node) {
@@ -5526,7 +6162,10 @@ var flowPlugin = function (instance) {
instance.extend("parseAsyncArrowFromCallExpression", function (inner) {
return function (node, call) {
if (this.match(types.colon)) {
+ var oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
node.returnType = this.flowParseTypeAnnotation();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
}
return inner.call(this, node, call);
@@ -5554,8 +6193,8 @@ var flowPlugin = function (instance) {
return function () {
var jsxError = null;
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ args[_key4] = arguments[_key4];
}
if (types.jsxTagStart && this.match(types.jsxTagStart)) {
@@ -5610,7 +6249,11 @@ var flowPlugin = function (instance) {
if (this.match(types.colon)) {
var state = this.state.clone();
try {
- var returnType = this.flowParseTypeAnnotation();
+ var oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
+ var returnType = this.flowParseTypeAndPredicateAnnotation();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+
if (this.canInsertSemicolon()) this.unexpected();
if (!this.match(types.arrow)) this.unexpected();
// assign after it is clear it is an arrow
@@ -5646,6 +6289,74 @@ var flowPlugin = function (instance) {
});
};
+// Adapted from String.fromcodepoint to export the function without modifying String
+/*! https://mths.be/fromcodepoint v0.2.1 by @mathias */
+
+// The MIT License (MIT)
+// Copyright (c) Mathias Bynens
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+// associated documentation files (the "Software"), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge, publish, distribute,
+// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+// NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var fromCodePoint = String.fromCodePoint;
+
+if (!fromCodePoint) {
+ var stringFromCharCode = String.fromCharCode;
+ var floor = Math.floor;
+ fromCodePoint = function fromCodePoint() {
+ var MAX_SIZE = 0x4000;
+ var codeUnits = [];
+ var highSurrogate = void 0;
+ var lowSurrogate = void 0;
+ var index = -1;
+ var length = arguments.length;
+ if (!length) {
+ return "";
+ }
+ var result = "";
+ while (++index < length) {
+ var codePoint = Number(arguments[index]);
+ if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
+ codePoint < 0 || // not a valid Unicode code point
+ codePoint > 0x10FFFF || // not a valid Unicode code point
+ floor(codePoint) != codePoint // not an integer
+ ) {
+ throw RangeError("Invalid code point: " + codePoint);
+ }
+ if (codePoint <= 0xFFFF) {
+ // BMP code point
+ codeUnits.push(codePoint);
+ } else {
+ // Astral code point; split in surrogate halves
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ codePoint -= 0x10000;
+ highSurrogate = (codePoint >> 10) + 0xD800;
+ lowSurrogate = codePoint % 0x400 + 0xDC00;
+ codeUnits.push(highSurrogate, lowSurrogate);
+ }
+ if (index + 1 == length || codeUnits.length > MAX_SIZE) {
+ result += stringFromCharCode.apply(null, codeUnits);
+ codeUnits.length = 0;
+ }
+ }
+ return result;
+ };
+}
+
+var fromCodePoint$1 = fromCodePoint;
+
var XHTMLEntities = {
quot: "\"",
amp: "&",
@@ -5902,8 +6613,6 @@ var XHTMLEntities = {
diams: "\u2666"
};
-/* eslint indent: 0 */
-
var HEX_NUMBER = /^[\da-fA-F]+$/;
var DECIMAL_NUMBER = /^\d+$/;
@@ -5932,11 +6641,11 @@ types.jsxTagEnd.updateContext = function (prevType) {
}
};
-var pp$8 = Parser.prototype;
+var pp$9 = Parser.prototype;
// Reads inline JSX contents token.
-pp$8.jsxReadToken = function () {
+pp$9.jsxReadToken = function () {
var out = "";
var chunkStart = this.state.pos;
for (;;) {
@@ -5979,7 +6688,7 @@ pp$8.jsxReadToken = function () {
}
};
-pp$8.jsxReadNewLine = function (normalizeCRLF) {
+pp$9.jsxReadNewLine = function (normalizeCRLF) {
var ch = this.input.charCodeAt(this.state.pos);
var out = void 0;
++this.state.pos;
@@ -5995,7 +6704,7 @@ pp$8.jsxReadNewLine = function (normalizeCRLF) {
return out;
};
-pp$8.jsxReadString = function (quote) {
+pp$9.jsxReadString = function (quote) {
var out = "";
var chunkStart = ++this.state.pos;
for (;;) {
@@ -6022,7 +6731,7 @@ pp$8.jsxReadString = function (quote) {
return this.finishToken(types.string, out);
};
-pp$8.jsxReadEntity = function () {
+pp$9.jsxReadEntity = function () {
var str = "";
var count = 0;
var entity = void 0;
@@ -6035,10 +6744,10 @@ pp$8.jsxReadEntity = function () {
if (str[0] === "#") {
if (str[1] === "x") {
str = str.substr(2);
- if (HEX_NUMBER.test(str)) entity = String.fromCharCode(parseInt(str, 16));
+ if (HEX_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 16));
} else {
str = str.substr(1);
- if (DECIMAL_NUMBER.test(str)) entity = String.fromCharCode(parseInt(str, 10));
+ if (DECIMAL_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 10));
}
} else {
entity = XHTMLEntities[str];
@@ -6061,7 +6770,7 @@ pp$8.jsxReadEntity = function () {
// Also assumes that first character was already checked
// by isIdentifierStart in readToken.
-pp$8.jsxReadWord = function () {
+pp$9.jsxReadWord = function () {
var ch = void 0;
var start = this.state.pos;
do {
@@ -6088,7 +6797,7 @@ function getQualifiedJSXName(object) {
// Parse next token as JSX identifier
-pp$8.jsxParseIdentifier = function () {
+pp$9.jsxParseIdentifier = function () {
var node = this.startNode();
if (this.match(types.jsxName)) {
node.name = this.state.value;
@@ -6103,9 +6812,9 @@ pp$8.jsxParseIdentifier = function () {
// Parse namespaced identifier.
-pp$8.jsxParseNamespacedName = function () {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+pp$9.jsxParseNamespacedName = function () {
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var name = this.jsxParseIdentifier();
if (!this.eat(types.colon)) return name;
@@ -6118,9 +6827,9 @@ pp$8.jsxParseNamespacedName = function () {
// Parses element name in any form - namespaced, member
// or single identifier.
-pp$8.jsxParseElementName = function () {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+pp$9.jsxParseElementName = function () {
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
var node = this.jsxParseNamespacedName();
while (this.eat(types.dot)) {
var newNode = this.startNodeAt(startPos, startLoc);
@@ -6133,7 +6842,7 @@ pp$8.jsxParseElementName = function () {
// Parses any type of JSX attribute value.
-pp$8.jsxParseAttributeValue = function () {
+pp$9.jsxParseAttributeValue = function () {
var node = void 0;
switch (this.state.type) {
case types.braceL:
@@ -6159,14 +6868,14 @@ pp$8.jsxParseAttributeValue = function () {
// and so it should start at the end of last read token (left brace) and finish
// at the beginning of the next one (right brace).
-pp$8.jsxParseEmptyExpression = function () {
- var node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
- return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc);
+pp$9.jsxParseEmptyExpression = function () {
+ var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
+ return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
};
// Parse JSX spread child
-pp$8.jsxParseSpreadChild = function () {
+pp$9.jsxParseSpreadChild = function () {
var node = this.startNode();
this.expect(types.braceL);
this.expect(types.ellipsis);
@@ -6179,7 +6888,7 @@ pp$8.jsxParseSpreadChild = function () {
// Parses JSX expression enclosed into curly brackets.
-pp$8.jsxParseExpressionContainer = function () {
+pp$9.jsxParseExpressionContainer = function () {
var node = this.startNode();
this.next();
if (this.match(types.braceR)) {
@@ -6193,7 +6902,7 @@ pp$8.jsxParseExpressionContainer = function () {
// Parses following JSX attribute name-value pair.
-pp$8.jsxParseAttribute = function () {
+pp$9.jsxParseAttribute = function () {
var node = this.startNode();
if (this.eat(types.braceL)) {
this.expect(types.ellipsis);
@@ -6208,7 +6917,7 @@ pp$8.jsxParseAttribute = function () {
// Parses JSX opening tag starting after "<".
-pp$8.jsxParseOpeningElementAt = function (startPos, startLoc) {
+pp$9.jsxParseOpeningElementAt = function (startPos, startLoc) {
var node = this.startNodeAt(startPos, startLoc);
node.attributes = [];
node.name = this.jsxParseElementName();
@@ -6222,7 +6931,7 @@ pp$8.jsxParseOpeningElementAt = function (startPos, startLoc) {
// Parses JSX closing tag starting after "</".
-pp$8.jsxParseClosingElementAt = function (startPos, startLoc) {
+pp$9.jsxParseClosingElementAt = function (startPos, startLoc) {
var node = this.startNodeAt(startPos, startLoc);
node.name = this.jsxParseElementName();
this.expect(types.jsxTagEnd);
@@ -6232,7 +6941,7 @@ pp$8.jsxParseClosingElementAt = function (startPos, startLoc) {
// Parses entire JSX element, including it"s opening tag
// (starting after "<"), attributes, contents and closing tag.
-pp$8.jsxParseElementAt = function (startPos, startLoc) {
+pp$9.jsxParseElementAt = function (startPos, startLoc) {
var node = this.startNodeAt(startPos, startLoc);
var children = [];
var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
@@ -6286,9 +6995,9 @@ pp$8.jsxParseElementAt = function (startPos, startLoc) {
// Parses entire JSX element from current position.
-pp$8.jsxParseElement = function () {
- var startPos = this.state.start,
- startLoc = this.state.startLoc;
+pp$9.jsxParseElement = function () {
+ var startPos = this.state.start;
+ var startLoc = this.state.startLoc;
this.next();
return this.jsxParseElementAt(startPos, startLoc);
};
@@ -6311,6 +7020,8 @@ var jsxPlugin = function (instance) {
instance.extend("readToken", function (inner) {
return function (code) {
+ if (this.state.inPropertyName) return inner.call(this, code);
+
var context = this.curContext();
if (context === types$1.j_expr) {
@@ -6364,12 +7075,22 @@ var jsxPlugin = function (instance) {
});
};
+plugins.estree = estreePlugin;
plugins.flow = flowPlugin;
plugins.jsx = jsxPlugin;
-function parse$1(input, options) {
+function parse(input, options) {
return new Parser(options, input).parse();
}
-exports.parse = parse$1;
+function parseExpression(input, options) {
+ var parser = new Parser(options, input);
+ if (parser.options.strictMode) {
+ parser.state.strict = true;
+ }
+ return parser.getExpression();
+}
+
+exports.parse = parse;
+exports.parseExpression = parseExpression;
exports.tokTypes = types;
diff --git a/node_modules/babylon/package.json b/node_modules/babylon/package.json
index 79eebc2d6..b068ce7ae 100644
--- a/node_modules/babylon/package.json
+++ b/node_modules/babylon/package.json
@@ -1,10 +1,16 @@
{
"name": "babylon",
- "version": "6.13.1",
+ "version": "6.16.1",
"description": "A JavaScript parser",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
+ "keywords": [
+ "babel",
+ "javascript",
+ "parser",
+ "babylon"
+ ],
"repository": "https://github.com/babel/babylon",
"main": "lib/index.js",
"files": [
@@ -12,25 +18,25 @@
"lib"
],
"devDependencies": {
- "ava": "^0.16.0",
+ "ava": "^0.17.0",
"babel-cli": "^6.14.0",
"babel-eslint": "^7.0.0",
"babel-helper-fixtures": "^6.9.0",
- "babel-plugin-istanbul": "^2.0.1",
+ "babel-plugin-external-helpers": "^6.18.0",
+ "babel-plugin-istanbul": "^3.0.0",
"babel-plugin-transform-flow-strip-types": "^6.14.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-stage-0": "^6.5.0",
+ "chalk": "^1.1.3",
"codecov": "^1.0.1",
- "cross-env": "^2.0.1",
+ "cross-env": "^2.0.0",
"eslint": "^3.7.1",
- "eslint-config-babel": "^2.0.1",
- "eslint-plugin-babel": "^3.3.0",
+ "eslint-config-babel": "^6.0.0",
"eslint-plugin-flowtype": "^2.20.0",
- "flow-bin": "^0.33.0",
- "lodash": "^4.15.0",
- "nyc": "^8.1.0",
+ "flow-bin": "^0.38.0",
+ "nyc": "^10.0.0",
"rimraf": "^2.5.4",
- "rollup": "^0.36.3",
+ "rollup": "^0.41.0",
"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-node-resolve": "^2.0.0",
"unicode-9.0.0": "~0.7.0"
@@ -39,17 +45,18 @@
"babylon": "./bin/babylon.js"
},
"scripts": {
- "build": "rollup -c",
+ "build": "npm run clean && rollup -c",
"coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json",
"lint": "eslint src bin",
"clean": "rimraf lib",
"flow": "flow",
- "prepublish": "npm run clean && cross-env BABEL_ENV=production npm run build",
+ "prepublish": "cross-env BABEL_ENV=production npm run build",
"preversion": "npm run test && npm run changelog",
- "test": "npm run lint && npm run flow && npm run build && npm run test-only",
- "test-only": "ava test",
+ "test": "npm run lint && npm run flow && npm run build -- -m && npm run test-only",
+ "test-only": "ava",
"test-ci": "nyc npm run test-only",
- "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'"
+ "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'",
+ "watch": "npm run clean && cross-env BABEL_ENV=watch babel src --out-dir lib --watch"
},
"nyc": {
"include": [
@@ -58,5 +65,19 @@
],
"sourceMap": false,
"instrument": false
+ },
+ "ava": {
+ "files": [
+ "test/*.js"
+ ],
+ "source": [
+ "src/**/*.js",
+ "bin/**/*.js"
+ ]
+ },
+ "greenkeeper": {
+ "ignore": [
+ "cross-env"
+ ]
}
}
diff --git a/node_modules/bl/.travis.yml b/node_modules/bl/.travis.yml
index 5cb0480b4..8c6fc4810 100644
--- a/node_modules/bl/.travis.yml
+++ b/node_modules/bl/.travis.yml
@@ -4,10 +4,12 @@ node_js:
- '0.10'
- '0.12'
- '4'
- - '5'
+ - '6'
+ - '7'
branches:
only:
- master
notifications:
email:
- rod@vagg.org
+ - matteo.collina@gmail.com
diff --git a/node_modules/bl/LICENSE.md b/node_modules/bl/LICENSE.md
index ccb24797c..ff35a3472 100644
--- a/node_modules/bl/LICENSE.md
+++ b/node_modules/bl/LICENSE.md
@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================
-Copyright (c) 2014 bl contributors
+Copyright (c) 2013-2016 bl contributors
----------------------------------
*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
diff --git a/node_modules/bl/README.md b/node_modules/bl/README.md
index f7044db26..da0c18338 100644
--- a/node_modules/bl/README.md
+++ b/node_modules/bl/README.md
@@ -87,6 +87,7 @@ bl.pipe(fs.createWriteStream('gibberish.txt'))
* <a href="#append"><code>bl.<b>append(buffer)</b></code></a>
* <a href="#get"><code>bl.<b>get(index)</b></code></a>
* <a href="#slice"><code>bl.<b>slice([ start[, end ] ])</b></code></a>
+ * <a href="#shallowSlice"><code>bl.<b>shallowSlice([ start[, end ] ])</b></code></a>
* <a href="#copy"><code>bl.<b>copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])</b></code></a>
* <a href="#duplicate"><code>bl.<b>duplicate()</b></code></a>
* <a href="#consume"><code>bl.<b>consume(bytes)</b></code></a>
@@ -136,6 +137,13 @@ Get the length of the list in bytes. This is the sum of the lengths of all of th
If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
--------------------------------------------------------
+<a name="shallowSlice"></a>
+### bl.shallowSlice([ start, [ end ] ])
+`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
+
+No copies will be performed. All buffers in the result share memory with the original list.
+
+--------------------------------------------------------
<a name="copy"></a>
### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
@@ -195,6 +203,6 @@ See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code><
<a name="license"></a>
## License &amp; copyright
-Copyright (c) 2013-2014 bl contributors (listed above).
+Copyright (c) 2013-2016 bl contributors (listed above).
bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/node_modules/bl/bl.js b/node_modules/bl/bl.js
index f585df172..701c1e564 100644
--- a/node_modules/bl/bl.js
+++ b/node_modules/bl/bl.js
@@ -38,9 +38,10 @@ util.inherits(BufferList, DuplexStream)
BufferList.prototype._offset = function _offset (offset) {
var tot = 0, i = 0, _t
+ if (offset === 0) return [ 0, 0 ]
for (; i < this._bufs.length; i++) {
_t = tot + this._bufs[i].length
- if (offset < _t)
+ if (offset < _t || i == this._bufs.length - 1)
return [ i, offset - tot ]
tot = _t
}
@@ -49,9 +50,10 @@ BufferList.prototype._offset = function _offset (offset) {
BufferList.prototype.append = function append (buf) {
var i = 0
- , newBuf
- if (Array.isArray(buf)) {
+ if (Buffer.isBuffer(buf)) {
+ this._appendBuffer(buf);
+ } else if (Array.isArray(buf)) {
for (; i < buf.length; i++)
this.append(buf[i])
} else if (buf instanceof BufferList) {
@@ -64,17 +66,21 @@ BufferList.prototype.append = function append (buf) {
if (typeof buf == 'number')
buf = buf.toString()
- newBuf = Buffer.isBuffer(buf) ? buf : new Buffer(buf)
- this._bufs.push(newBuf)
- this.length += newBuf.length
+ this._appendBuffer(new Buffer(buf));
}
return this
}
+BufferList.prototype._appendBuffer = function appendBuffer (buf) {
+ this._bufs.push(buf)
+ this.length += buf.length
+}
+
+
BufferList.prototype._write = function _write (buf, encoding, callback) {
- this.append(buf)
+ this._appendBuffer(buf)
if (typeof callback == 'function')
callback()
@@ -107,6 +113,10 @@ BufferList.prototype.get = function get (index) {
BufferList.prototype.slice = function slice (start, end) {
+ if (typeof start == 'number' && start < 0)
+ start += this.length
+ if (typeof end == 'number' && end < 0)
+ end += this.length
return this.copy(null, 0, start, end)
}
@@ -132,8 +142,11 @@ BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
// copy/slice everything
if (srcStart === 0 && srcEnd == this.length) {
- if (!copy) // slice, just return a full concat
- return Buffer.concat(this._bufs)
+ if (!copy) { // slice, but full concat if multiple buffers
+ return this._bufs.length === 1
+ ? this._bufs[0]
+ : Buffer.concat(this._bufs, this.length)
+ }
// copy, need to copy individual buffers
for (i = 0; i < this._bufs.length; i++) {
@@ -174,6 +187,30 @@ BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
return dst
}
+BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
+ start = start || 0
+ end = end || this.length
+
+ if (start < 0)
+ start += this.length
+ if (end < 0)
+ end += this.length
+
+ var startOffset = this._offset(start)
+ , endOffset = this._offset(end)
+ , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
+
+ if (startOffset[1] != 0)
+ buffers[0] = buffers[0].slice(startOffset[1])
+
+ if (endOffset[1] == 0)
+ buffers.pop()
+ else
+ buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1])
+
+ return new BufferList(buffers)
+}
+
BufferList.prototype.toString = function toString (encoding, start, end) {
return this.slice(start, end).toString(encoding)
}
diff --git a/node_modules/bl/package.json b/node_modules/bl/package.json
index aac62e364..3cb33acf1 100644
--- a/node_modules/bl/package.json
+++ b/node_modules/bl/package.json
@@ -1,6 +1,6 @@
{
"name": "bl",
- "version": "1.1.2",
+ "version": "1.2.0",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
"main": "bl.js",
"scripts": {
@@ -24,11 +24,11 @@
],
"license": "MIT",
"dependencies": {
- "readable-stream": "~2.0.5"
+ "readable-stream": "^2.0.5"
},
"devDependencies": {
"faucet": "0.0.1",
"hash_file": "~0.1.1",
- "tape": "~4.4.0"
+ "tape": "~4.6.0"
}
}
diff --git a/node_modules/bl/test/test.js b/node_modules/bl/test/test.js
index c95b1ba48..989534c91 100644
--- a/node_modules/bl/test/test.js
+++ b/node_modules/bl/test/test.js
@@ -53,6 +53,20 @@ tape('multi bytes from single buffer', function (t) {
t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
+ t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
+
+ t.end()
+})
+
+tape('multi bytes from single buffer (negative indexes)', function (t) {
+ var bl = new BufferList()
+ bl.append(new Buffer('buffer'))
+
+ t.equal(bl.length, 6)
+
+ t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
+ t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
+ t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
t.end()
})
@@ -72,6 +86,7 @@ tape('multiple bytes from multiple buffers', function (t) {
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+ t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
t.end()
})
@@ -537,6 +552,50 @@ tape('copy an interval between two buffers', function (t) {
t.end()
})
+tape('shallow slice across buffer boundaries', function (t) {
+ var bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
+ t.end()
+})
+
+tape('shallow slice within single buffer', function (t) {
+ var bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
+ t.end()
+})
+
+tape('shallow slice single buffer', function (t) {
+ t.plan(3)
+ var bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(0, 5).toString(), 'First')
+ t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
+ t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
+})
+
+tape('shallow slice with negative or omitted indices', function (t) {
+ t.plan(4)
+ var bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
+ t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
+ t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
+ t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
+})
+
+tape('shallow slice does not make a copy', function (t) {
+ t.plan(1)
+ var buffers = [new Buffer('First'), new Buffer('Second'), new Buffer('Third')]
+ var bl = (new BufferList(buffers)).shallowSlice(5, -3)
+
+ buffers[1].fill('h')
+ buffers[2].fill('h')
+
+ t.equal(bl.toString(), 'hhhhhhhh')
+})
+
tape('duplicate', function (t) {
t.plan(2)
diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md
index 179392978..ed2ec1fdd 100644
--- a/node_modules/brace-expansion/README.md
+++ b/node_modules/brace-expansion/README.md
@@ -5,6 +5,7 @@ as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
+[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js
index 955f27c81..0478be81e 100644
--- a/node_modules/brace-expansion/index.js
+++ b/node_modules/brace-expansion/index.js
@@ -106,7 +106,7 @@ function expand(str, isTop) {
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = /^(.*,)+(.+)?$/.test(m.body);
+ var isOptions = m.body.indexOf(',') >= 0;
if (!isSequence && !isOptions) {
// {a},b}
if (m.post.match(/,.*\}/)) {
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
index 0ce582989..0deba3273 100644
--- a/node_modules/brace-expansion/package.json
+++ b/node_modules/brace-expansion/package.json
@@ -1,7 +1,7 @@
{
"name": "brace-expansion",
"description": "Brace expansion as known from sh/bash",
- "version": "1.1.6",
+ "version": "1.1.7",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
@@ -10,13 +10,15 @@
"main": "index.js",
"scripts": {
"test": "tape test/*.js",
- "gentest": "bash test/generate.sh"
+ "gentest": "bash test/generate.sh",
+ "bench": "matcha test/perf/bench.js"
},
"dependencies": {
"balanced-match": "^0.4.1",
"concat-map": "0.0.1"
},
"devDependencies": {
+ "matcha": "^0.7.0",
"tape": "^4.6.0"
},
"keywords": [],
diff --git a/node_modules/buffer-crc32/.npmignore b/node_modules/buffer-crc32/.npmignore
deleted file mode 100644
index b512c09d4..000000000
--- a/node_modules/buffer-crc32/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules \ No newline at end of file
diff --git a/node_modules/buffer-crc32/.travis.yml b/node_modules/buffer-crc32/.travis.yml
deleted file mode 100644
index 7a902e8c8..000000000
--- a/node_modules/buffer-crc32/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - 0.6
- - 0.8
-notifications:
- email:
- recipients:
- - brianloveswords@gmail.com \ No newline at end of file
diff --git a/node_modules/buffer-crc32/index.js b/node_modules/buffer-crc32/index.js
index 8694c6372..6727dd39b 100644
--- a/node_modules/buffer-crc32/index.js
+++ b/node_modules/buffer-crc32/index.js
@@ -55,19 +55,39 @@ var CRC_TABLE = [
0x2d02ef8d
];
-if (typeof Int32Array !== 'undefined')
+if (typeof Int32Array !== 'undefined') {
CRC_TABLE = new Int32Array(CRC_TABLE);
+}
+
+function ensureBuffer(input) {
+ if (Buffer.isBuffer(input)) {
+ return input;
+ }
+
+ var hasNewBufferAPI =
+ typeof Buffer.alloc === "function" &&
+ typeof Buffer.from === "function";
+
+ if (typeof input === "number") {
+ return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input);
+ }
+ else if (typeof input === "string") {
+ return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input);
+ }
+ else {
+ throw new Error("input must be buffer, number, or string, received " +
+ typeof input);
+ }
+}
function bufferizeInt(num) {
- var tmp = Buffer(4);
+ var tmp = ensureBuffer(4);
tmp.writeInt32BE(num, 0);
return tmp;
}
function _crc32(buf, previous) {
- if (!Buffer.isBuffer(buf)) {
- buf = Buffer(buf);
- }
+ buf = ensureBuffer(buf);
if (Buffer.isBuffer(previous)) {
previous = previous.readUInt32BE(0);
}
diff --git a/node_modules/buffer-crc32/package.json b/node_modules/buffer-crc32/package.json
index 59605aa9c..e896bec58 100644
--- a/node_modules/buffer-crc32/package.json
+++ b/node_modules/buffer-crc32/package.json
@@ -1,8 +1,8 @@
{
- "author": "Brian J. Brennan <brianloveswords@gmail.com> (http://bjb.io)",
+ "author": "Brian J. Brennan <brianloveswords@gmail.com>",
"name": "buffer-crc32",
"description": "A pure javascript CRC32 algorithm that plays nice with binary data",
- "version": "0.2.5",
+ "version": "0.2.13",
"licenses": [
{
"type": "MIT",
@@ -32,5 +32,8 @@
"engines": {
"node": "*"
},
- "license": "MIT"
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ]
}
diff --git a/node_modules/buffer-crc32/tests/crc.test.js b/node_modules/buffer-crc32/tests/crc.test.js
deleted file mode 100644
index bb0f9efcc..000000000
--- a/node_modules/buffer-crc32/tests/crc.test.js
+++ /dev/null
@@ -1,89 +0,0 @@
-var crc32 = require('..');
-var test = require('tap').test;
-
-test('simple crc32 is no problem', function (t) {
- var input = Buffer('hey sup bros');
- var expected = Buffer([0x47, 0xfa, 0x55, 0x70]);
- t.same(crc32(input), expected);
- t.end();
-});
-
-test('another simple one', function (t) {
- var input = Buffer('IEND');
- var expected = Buffer([0xae, 0x42, 0x60, 0x82]);
- t.same(crc32(input), expected);
- t.end();
-});
-
-test('slightly more complex', function (t) {
- var input = Buffer([0x00, 0x00, 0x00]);
- var expected = Buffer([0xff, 0x41, 0xd9, 0x12]);
- t.same(crc32(input), expected);
- t.end();
-});
-
-test('complex crc32 gets calculated like a champ', function (t) {
- var input = Buffer('शीर्षक');
- var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]);
- t.same(crc32(input), expected);
- t.end();
-});
-
-test('casts to buffer if necessary', function (t) {
- var input = 'शीर्षक';
- var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]);
- t.same(crc32(input), expected);
- t.end();
-});
-
-test('can do signed', function (t) {
- var input = 'ham sandwich';
- var expected = -1891873021;
- t.same(crc32.signed(input), expected);
- t.end();
-});
-
-test('can do unsigned', function (t) {
- var input = 'bear sandwich';
- var expected = 3711466352;
- t.same(crc32.unsigned(input), expected);
- t.end();
-});
-
-
-test('simple crc32 in append mode', function (t) {
- var input = [Buffer('hey'), Buffer(' '), Buffer('sup'), Buffer(' '), Buffer('bros')];
- var expected = Buffer([0x47, 0xfa, 0x55, 0x70]);
- for (var crc = 0, i = 0; i < input.length; i++) {
- crc = crc32(input[i], crc);
- }
- t.same(crc, expected);
- t.end();
-});
-
-
-test('can do signed in append mode', function (t) {
- var input1 = 'ham';
- var input2 = ' ';
- var input3 = 'sandwich';
- var expected = -1891873021;
-
- var crc = crc32.signed(input1);
- crc = crc32.signed(input2, crc);
- crc = crc32.signed(input3, crc);
-
- t.same(crc, expected);
- t.end();
-});
-
-test('can do unsigned in append mode', function (t) {
- var input1 = 'bear san';
- var input2 = 'dwich';
- var expected = 3711466352;
-
- var crc = crc32.unsigned(input1);
- crc = crc32.unsigned(input2, crc);
- t.same(crc, expected);
- t.end();
-});
-
diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js
index b46e10094..5670f73f2 100644
--- a/node_modules/camelcase/index.js
+++ b/node_modules/camelcase/index.js
@@ -1,4 +1,23 @@
'use strict';
+
+function preserveCamelCase(str) {
+ var isLastCharLower = false;
+
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charAt(i);
+
+ if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) {
+ str = str.substr(0, i) + '-' + str.substr(i);
+ isLastCharLower = false;
+ i++;
+ } else {
+ isLastCharLower = (c.toLowerCase() === c);
+ }
+ }
+
+ return str;
+}
+
module.exports = function () {
var str = [].map.call(arguments, function (str) {
return str.trim();
@@ -10,14 +29,24 @@ module.exports = function () {
return '';
}
- if (str.length === 1 || !(/[_.\- ]+/).test(str) ) {
- if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) {
- return str;
+ if (str.length === 1) {
+ return str.toLowerCase();
+ }
+
+ if (!(/[_.\- ]+/).test(str)) {
+ if (str === str.toUpperCase()) {
+ return str.toLowerCase();
}
- return str.toLowerCase();
+ if (str[0] !== str[0].toLowerCase()) {
+ return str[0].toLowerCase() + str.slice(1);
+ }
+
+ return str;
}
+ str = preserveCamelCase(str);
+
return str
.replace(/^[_.\- ]+/, '')
.toLowerCase()
diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json
index 34f75e745..a404754ee 100644
--- a/node_modules/camelcase/package.json
+++ b/node_modules/camelcase/package.json
@@ -1,6 +1,6 @@
{
"name": "camelcase",
- "version": "1.2.1",
+ "version": "3.0.0",
"description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar",
"license": "MIT",
"repository": "sindresorhus/camelcase",
@@ -13,7 +13,7 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "node test.js"
+ "test": "xo && ava"
},
"files": [
"index.js"
@@ -33,6 +33,7 @@
"convert"
],
"devDependencies": {
- "ava": "0.0.4"
+ "ava": "*",
+ "xo": "*"
}
}
diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md
index 516dc3984..080b2a103 100644
--- a/node_modules/camelcase/readme.md
+++ b/node_modules/camelcase/readme.md
@@ -5,7 +5,7 @@
## Install
-```sh
+```
$ npm install --save camelcase
```
@@ -13,42 +13,43 @@ $ npm install --save camelcase
## Usage
```js
-var camelCase = require('camelcase');
+const camelCase = require('camelcase');
camelCase('foo-bar');
-//=> fooBar
+//=> 'fooBar'
camelCase('foo_bar');
-//=> fooBar
+//=> 'fooBar'
camelCase('Foo-Bar');
-//=> fooBar
+//=> 'fooBar'
camelCase('--foo.bar');
-//=> fooBar
+//=> 'fooBar'
camelCase('__foo__bar__');
-//=> fooBar
+//=> 'fooBar'
camelCase('foo bar');
-//=> fooBar
+//=> 'fooBar'
console.log(process.argv[3]);
-//=> --foo-bar
+//=> '--foo-bar'
camelCase(process.argv[3]);
-//=> fooBar
+//=> 'fooBar'
camelCase('foo', 'bar');
-//=> fooBar
+//=> 'fooBar'
camelCase('__foo__', '--bar');
-//=> fooBar
+//=> 'fooBar'
```
## Related
-See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse.
+- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
+- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
## License
diff --git a/node_modules/clone-stats/package.json b/node_modules/clone-stats/package.json
index acef8550c..2880625c1 100644
--- a/node_modules/clone-stats/package.json
+++ b/node_modules/clone-stats/package.json
@@ -1,7 +1,7 @@
{
"name": "clone-stats",
"description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "1.0.0",
+ "version": "0.0.1",
"main": "index.js",
"browser": "index.js",
"dependencies": {},
diff --git a/node_modules/cloneable-readable/package.json b/node_modules/cloneable-readable/package.json
index 7579ebb15..30ad00c47 100644
--- a/node_modules/cloneable-readable/package.json
+++ b/node_modules/cloneable-readable/package.json
@@ -1,6 +1,6 @@
{
"name": "cloneable-readable",
- "version": "0.5.0",
+ "version": "1.0.0",
"description": "Clone a Readable stream, safely",
"main": "index.js",
"scripts": {
diff --git a/node_modules/compress-commons/README.md b/node_modules/compress-commons/README.md
index 258e68acc..80055ca32 100644
--- a/node_modules/compress-commons/README.md
+++ b/node_modules/compress-commons/README.md
@@ -1,4 +1,4 @@
-# Compress Commons v1.0.0 [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons) [![Build status](https://ci.appveyor.com/api/projects/status/fx3066dufdpar0it/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-compress-commons/branch/master)
+# Compress Commons v1.2.0 [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons) [![Build status](https://ci.appveyor.com/api/projects/status/fx3066dufdpar0it/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-compress-commons/branch/master)
Compress Commons is a library that defines a common interface for working with archive formats within node.
diff --git a/node_modules/compress-commons/lib/archivers/zip/constants.js b/node_modules/compress-commons/lib/archivers/zip/constants.js
index d17b16e7b..34181ecf8 100644
--- a/node_modules/compress-commons/lib/archivers/zip/constants.js
+++ b/node_modules/compress-commons/lib/archivers/zip/constants.js
@@ -68,4 +68,4 @@ module.exports = {
S_DOS_S: 4, // 04 System
S_DOS_H: 2, // 02 Hidden
S_DOS_R: 1 // 01 Read Only
-}; \ No newline at end of file
+};
diff --git a/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js b/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
index 03d2b7dcf..e5b0d69a7 100644
--- a/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
+++ b/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
@@ -10,6 +10,7 @@ var normalizePath = require('normalize-path');
var ArchiveEntry = require('../archive-entry');
var GeneralPurposeBit = require('./general-purpose-bit');
+var UnixStat = require('./unix-stat');
var constants = require('./constants');
var zipUtil = require('./util');
@@ -45,78 +46,173 @@ var ZipArchiveEntry = module.exports = function(name) {
inherits(ZipArchiveEntry, ArchiveEntry);
+/**
+ * Returns the extra fields related to the entry.
+ *
+ * @returns {Buffer}
+ */
ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() {
return this.getExtra();
};
+/**
+ * Returns the comment set for the entry.
+ *
+ * @returns {string}
+ */
ZipArchiveEntry.prototype.getComment = function() {
return this.comment !== null ? this.comment : '';
};
+/**
+ * Returns the compressed size of the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getCompressedSize = function() {
return this.csize;
};
+/**
+ * Returns the CRC32 digest for the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getCrc = function() {
return this.crc;
};
+/**
+ * Returns the external file attributes for the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getExternalAttributes = function() {
return this.exattr;
};
+/**
+ * Returns the extra fields related to the entry.
+ *
+ * @returns {Buffer}
+ */
ZipArchiveEntry.prototype.getExtra = function() {
return this.extra !== null ? this.extra : constants.EMPTY;
};
+/**
+ * Returns the general purpose bits related to the entry.
+ *
+ * @returns {GeneralPurposeBit}
+ */
ZipArchiveEntry.prototype.getGeneralPurposeBit = function() {
return this.gpb;
};
+/**
+ * Returns the internal file attributes for the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getInternalAttributes = function() {
return this.inattr;
};
+/**
+ * Returns the last modified date of the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getLastModifiedDate = function() {
return this.getTime();
};
+/**
+ * Returns the extra fields related to the entry.
+ *
+ * @returns {Buffer}
+ */
ZipArchiveEntry.prototype.getLocalFileDataExtra = function() {
return this.getExtra();
};
+/**
+ * Returns the compression method used on the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getMethod = function() {
return this.method;
};
+/**
+ * Returns the filename of the entry.
+ *
+ * @returns {string}
+ */
ZipArchiveEntry.prototype.getName = function() {
return this.name;
};
+/**
+ * Returns the platform on which the entry was made.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getPlatform = function() {
return this.platform;
};
+/**
+ * Returns the size of the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getSize = function() {
return this.size;
};
+/**
+ * Returns a date object representing the last modified date of the entry.
+ *
+ * @returns {number|Date}
+ */
ZipArchiveEntry.prototype.getTime = function() {
return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
};
+/**
+ * Returns the DOS timestamp for the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getTimeDos = function() {
return this.time !== -1 ? this.time : 0;
};
+/**
+ * Returns the UNIX file permissions for the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getUnixMode = function() {
- return this.platform !== constants.PLATFORM_UNIX ? 0 : ((this.getExternalAttributes() >> constants.SHORT_SHIFT) & constants.SHORT_MASK) & constants.MODE_MASK;
+ return this.platform !== constants.PLATFORM_UNIX ? 0 : ((this.getExternalAttributes() >> constants.SHORT_SHIFT) & constants.SHORT_MASK);
};
+/**
+ * Returns the version of ZIP needed to extract the entry.
+ *
+ * @returns {number}
+ */
ZipArchiveEntry.prototype.getVersionNeededToExtract = function() {
return this.minver;
};
+/**
+ * Sets the comment of the entry.
+ *
+ * @param comment
+ */
ZipArchiveEntry.prototype.setComment = function(comment) {
if (Buffer.byteLength(comment) !== comment.length) {
this.getGeneralPurposeBit().useUTF8ForNames(true);
@@ -125,6 +221,11 @@ ZipArchiveEntry.prototype.setComment = function(comment) {
this.comment = comment;
};
+/**
+ * Sets the compressed size of the entry.
+ *
+ * @param size
+ */
ZipArchiveEntry.prototype.setCompressedSize = function(size) {
if (size < 0) {
throw new Error('invalid entry compressed size');
@@ -133,6 +234,11 @@ ZipArchiveEntry.prototype.setCompressedSize = function(size) {
this.csize = size;
};
+/**
+ * Sets the checksum of the entry.
+ *
+ * @param crc
+ */
ZipArchiveEntry.prototype.setCrc = function(crc) {
if (crc < 0) {
throw new Error('invalid entry crc32');
@@ -141,14 +247,29 @@ ZipArchiveEntry.prototype.setCrc = function(crc) {
this.crc = crc;
};
+/**
+ * Sets the external file attributes of the entry.
+ *
+ * @param attr
+ */
ZipArchiveEntry.prototype.setExternalAttributes = function(attr) {
this.exattr = attr >>> 0;
};
+/**
+ * Sets the extra fields related to the entry.
+ *
+ * @param extra
+ */
ZipArchiveEntry.prototype.setExtra = function(extra) {
this.extra = extra;
};
+/**
+ * Sets the general purpose bits related to the entry.
+ *
+ * @param gpb
+ */
ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
if (!(gpb instanceof GeneralPurposeBit)) {
throw new Error('invalid entry GeneralPurposeBit');
@@ -157,10 +278,20 @@ ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
this.gpb = gpb;
};
+/**
+ * Sets the internal file attributes of the entry.
+ *
+ * @param attr
+ */
ZipArchiveEntry.prototype.setInternalAttributes = function(attr) {
this.inattr = attr;
};
+/**
+ * Sets the compression method of the entry.
+ *
+ * @param method
+ */
ZipArchiveEntry.prototype.setMethod = function(method) {
if (method < 0) {
throw new Error('invalid entry compression method');
@@ -169,6 +300,11 @@ ZipArchiveEntry.prototype.setMethod = function(method) {
this.method = method;
};
+/**
+ * Sets the name of the entry.
+ *
+ * @param name
+ */
ZipArchiveEntry.prototype.setName = function(name) {
name = normalizePath(name, false).replace(/^\w+:/, '').replace(/^(\.\.\/|\/)+/, '');
@@ -179,10 +315,20 @@ ZipArchiveEntry.prototype.setName = function(name) {
this.name = name;
};
+/**
+ * Sets the platform on which the entry was made.
+ *
+ * @param platform
+ */
ZipArchiveEntry.prototype.setPlatform = function(platform) {
this.platform = platform;
};
+/**
+ * Sets the size of the entry.
+ *
+ * @param size
+ */
ZipArchiveEntry.prototype.setSize = function(size) {
if (size < 0) {
throw new Error('invalid entry size');
@@ -191,6 +337,12 @@ ZipArchiveEntry.prototype.setSize = function(size) {
this.size = size;
};
+/**
+ * Sets the time of the entry.
+ *
+ * @param time
+ * @param forceLocalTime
+ */
ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) {
if (!(time instanceof Date)) {
throw new Error('invalid entry time');
@@ -199,8 +351,12 @@ ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) {
this.time = zipUtil.dateToDos(time, forceLocalTime);
};
+/**
+ * Sets the UNIX file permissions for the entry.
+ *
+ * @param mode
+ */
ZipArchiveEntry.prototype.setUnixMode = function(mode) {
- mode &= ~constants.S_IFMT;
mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
var extattr = 0;
@@ -211,18 +367,40 @@ ZipArchiveEntry.prototype.setUnixMode = function(mode) {
this.platform = constants.PLATFORM_UNIX;
};
+/**
+ * Sets the version of ZIP needed to extract this entry.
+ *
+ * @param minver
+ */
ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) {
this.minver = minver;
};
+/**
+ * Returns true if this entry represents a directory.
+ *
+ * @returns {boolean}
+ */
ZipArchiveEntry.prototype.isDirectory = function() {
return this.getName().slice(-1) === '/';
};
+/**
+ * Returns true if this entry represents a unix symlink,
+ * in which case the entry's content contains the target path
+ * for the symlink.
+ *
+ * @returns {boolean}
+ */
ZipArchiveEntry.prototype.isUnixSymlink = function() {
- return (this.getUnixMode() & constants.S_IFLINK) === constants.S_IFLINK;
+ return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG;
};
+/**
+ * Returns true if this entry is using the ZIP64 extension of ZIP.
+ *
+ * @returns {boolean}
+ */
ZipArchiveEntry.prototype.isZip64 = function() {
return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
-}; \ No newline at end of file
+};
diff --git a/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js b/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
index 02cb8b36c..d74c1e770 100644
--- a/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
+++ b/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
@@ -168,7 +168,8 @@ ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) {
var error = null;
function handleStuff() {
- ae.setCrc(process.digest());
+ var digest = process.digest().readUInt32BE(0);
+ ae.setCrc(digest);
ae.setSize(process.size());
ae.setCompressedSize(process.size(true));
this._afterAppend(ae);
diff --git a/node_modules/compress-commons/package.json b/node_modules/compress-commons/package.json
index 48fd81a29..2058d0778 100644
--- a/node_modules/compress-commons/package.json
+++ b/node_modules/compress-commons/package.json
@@ -1,6 +1,6 @@
{
"name": "compress-commons",
- "version": "1.1.0",
+ "version": "1.2.0",
"description": "a library that defines a common interface for working with archive formats within node",
"homepage": "https://github.com/archiverjs/node-compress-commons",
"author": {
@@ -27,13 +27,13 @@
},
"dependencies": {
"buffer-crc32": "^0.2.1",
- "crc32-stream": "^1.0.0",
+ "crc32-stream": "^2.0.0",
"normalize-path": "^2.0.0",
"readable-stream": "^2.0.0"
},
"devDependencies": {
"chai": "^3.4.0",
- "mocha": "^2.3.3",
+ "mocha": "^3.2.0",
"rimraf": "^2.4.3",
"mkdirp": "^0.5.0"
},
diff --git a/node_modules/concat-stream/package.json b/node_modules/concat-stream/package.json
index 69bebdf4c..cd908ed50 100644
--- a/node_modules/concat-stream/package.json
+++ b/node_modules/concat-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "concat-stream",
- "version": "1.5.2",
+ "version": "1.6.0",
"description": "writable stream that concatenates strings or binary data and calls a callback with the result",
"tags": [
"stream",
@@ -28,12 +28,12 @@
},
"license": "MIT",
"dependencies": {
- "inherits": "~2.0.1",
- "typedarray": "~0.0.5",
- "readable-stream": "~2.0.0"
+ "inherits": "^2.0.3",
+ "typedarray": "^0.0.6",
+ "readable-stream": "^2.2.2"
},
"devDependencies": {
- "tape": "~2.3.2"
+ "tape": "^4.6.3"
},
"testling": {
"files": "test/*.js",
diff --git a/node_modules/concat-stream/readme.md b/node_modules/concat-stream/readme.md
index 8ad4197c9..f45e6fc87 100644
--- a/node_modules/concat-stream/readme.md
+++ b/node_modules/concat-stream/readme.md
@@ -16,7 +16,7 @@ There are also `objectMode` streams that emit things other than Buffers, and you
## Related
-`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
### examples
diff --git a/node_modules/convert-source-map/.travis.yml b/node_modules/convert-source-map/.travis.yml
index a55b235f9..86bd20065 100644
--- a/node_modules/convert-source-map/.travis.yml
+++ b/node_modules/convert-source-map/.travis.yml
@@ -1,5 +1,7 @@
language: node_js
node_js:
- - 0.8
- - 0.10
- - 0.11 \ No newline at end of file
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
+ - "node"
diff --git a/node_modules/convert-source-map/README.md b/node_modules/convert-source-map/README.md
index 8ce7d4817..2a2b6e7a3 100644
--- a/node_modules/convert-source-map/README.md
+++ b/node_modules/convert-source-map/README.md
@@ -8,12 +8,12 @@ Converts a source-map from/to different formats and allows adding/changing prop
var convert = require('convert-source-map');
var json = convert
- .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
.toJSON();
var modified = convert
- .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
- .setProperty('sources', [ 'CONSOLE.LOG("HI");' ])
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .setProperty('sources', [ 'SRC/FOO.JS' ])
.toJSON();
console.log(json);
@@ -21,8 +21,8 @@ console.log(modified);
```
```json
-{"version":3,"file":"foo.js","sources":["console.log(\"hi\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
-{"version":3,"file":"foo.js","sources":["CONSOLE.LOG(\"HI\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
+{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
+{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
```
## API
@@ -50,14 +50,10 @@ Returns source map converter from given `filename` by parsing `//# sourceMapping
`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the
generated file, i.e. the one containing the source map.
-### fromSource(source[, largeSource])
+### fromSource(source)
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
-If `largeSource` is set to `true`, an algorithm that does not use regex is applied to find the source map. This is faster and especially useful if you're running into "call stack size exceeded" errors with the default algorithm.
-
-However, it is less accurate and may match content that isn't a source map comment.
-
### fromMapFileSource(source, mapFileDir)
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was
@@ -111,11 +107,11 @@ Returns `src` with all source map comments pointing to map files removed.
### commentRegex
-Returns the regex used to find source map comments.
+Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments.
### mapFileCommentRegex
-Returns the regex used to find source map comments pointing to map files.
+Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files.
### generateMapFileComment(file, [options])
diff --git a/node_modules/convert-source-map/example/comment-to-json.js b/node_modules/convert-source-map/example/comment-to-json.js
index dfab18617..a9bc2f128 100644
--- a/node_modules/convert-source-map/example/comment-to-json.js
+++ b/node_modules/convert-source-map/example/comment-to-json.js
@@ -3,12 +3,12 @@
var convert = require('..');
var json = convert
- .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
.toJSON();
var modified = convert
- .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
- .setProperty('sources', [ 'CONSOLE.LOG("HI");' ])
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .setProperty('sources', [ 'SRC/FOO.JS' ])
.toJSON();
console.log(json);
diff --git a/node_modules/convert-source-map/index.js b/node_modules/convert-source-map/index.js
index 3e6fe2934..e171a673c 100644
--- a/node_modules/convert-source-map/index.js
+++ b/node_modules/convert-source-map/index.js
@@ -2,11 +2,20 @@
var fs = require('fs');
var path = require('path');
-var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/mg;
-var mapFileCommentRx =
- //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
- // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
- /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg
+Object.defineProperty(exports, 'commentRegex', {
+ get: function getCommentRegex () {
+ return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
+ }
+});
+
+Object.defineProperty(exports, 'mapFileCommentRegex', {
+ get: function getMapFileCommentRegex () {
+ //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
+ // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
+ return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
+ }
+});
+
function decodeBase64(base64) {
return new Buffer(base64, 'base64').toString();
@@ -19,8 +28,7 @@ function stripComment(sm) {
function readFromFileMap(sm, dir) {
// NOTE: this will only work on the server since it attempts to read the map file
- var r = mapFileCommentRx.exec(sm);
- mapFileCommentRx.lastIndex = 0;
+ var r = exports.mapFileCommentRegex.exec(sm);
// for some odd reason //# .. captures in 1 and /* .. */ in 2
var filename = r[1] || r[2];
@@ -44,16 +52,6 @@ function Converter (sm, opts) {
this.sourcemap = sm;
}
-function convertFromLargeSource(content){
- var lines = content.split('\n');
- var line;
- // find first line which contains a source map starting at end of content
- for (var i = lines.length - 1; i > 0; i--) {
- line = lines[i]
- if (~line.indexOf('sourceMappingURL=data:')) return exports.fromComment(line);
- }
-}
-
Converter.prototype.toJSON = function (space) {
return JSON.stringify(this.sourcemap, null, space);
};
@@ -65,7 +63,7 @@ Converter.prototype.toBase64 = function () {
Converter.prototype.toComment = function (options) {
var base64 = this.toBase64();
- var data = 'sourceMappingURL=data:application/json;base64,' + base64;
+ var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
};
@@ -113,49 +111,26 @@ exports.fromMapFileComment = function (comment, dir) {
};
// Finds last sourcemap comment in file or returns null if none was found
-exports.fromSource = function (content, largeSource) {
- if (largeSource) {
- var res = convertFromLargeSource(content);
- return res ? res : null;
- }
-
- var m = content.match(commentRx);
- commentRx.lastIndex = 0;
+exports.fromSource = function (content) {
+ var m = content.match(exports.commentRegex);
return m ? exports.fromComment(m.pop()) : null;
};
// Finds last sourcemap comment in file or returns null if none was found
exports.fromMapFileSource = function (content, dir) {
- var m = content.match(mapFileCommentRx);
- mapFileCommentRx.lastIndex = 0;
+ var m = content.match(exports.mapFileCommentRegex);
return m ? exports.fromMapFileComment(m.pop(), dir) : null;
};
exports.removeComments = function (src) {
- commentRx.lastIndex = 0;
- return src.replace(commentRx, '');
+ return src.replace(exports.commentRegex, '');
};
exports.removeMapFileComments = function (src) {
- mapFileCommentRx.lastIndex = 0;
- return src.replace(mapFileCommentRx, '');
+ return src.replace(exports.mapFileCommentRegex, '');
};
exports.generateMapFileComment = function (file, options) {
var data = 'sourceMappingURL=' + file;
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
};
-
-Object.defineProperty(exports, 'commentRegex', {
- get: function getCommentRegex () {
- commentRx.lastIndex = 0;
- return commentRx;
- }
-});
-
-Object.defineProperty(exports, 'mapFileCommentRegex', {
- get: function getMapFileCommentRegex () {
- mapFileCommentRx.lastIndex = 0;
- return mapFileCommentRx;
- }
-});
diff --git a/node_modules/convert-source-map/package.json b/node_modules/convert-source-map/package.json
index 4225190e4..6d25f40ab 100644
--- a/node_modules/convert-source-map/package.json
+++ b/node_modules/convert-source-map/package.json
@@ -1,10 +1,10 @@
{
"name": "convert-source-map",
- "version": "1.3.0",
+ "version": "1.5.0",
"description": "Converts a source-map from/to different formats and allows adding/changing properties.",
"main": "index.js",
"scripts": {
- "test": "tap test/*.js"
+ "test": "tap test/*.js --color"
},
"repository": {
"type": "git",
@@ -13,8 +13,8 @@
"homepage": "https://github.com/thlorenz/convert-source-map",
"dependencies": {},
"devDependencies": {
- "inline-source-map": "~0.3.1",
- "tap": "~0.4.13"
+ "inline-source-map": "~0.6.2",
+ "tap": "~9.0.0"
},
"keywords": [
"convert",
diff --git a/node_modules/convert-source-map/test/comment-regex.js b/node_modules/convert-source-map/test/comment-regex.js
index 16331ccb8..7e588dad4 100644
--- a/node_modules/convert-source-map/test/comment-regex.js
+++ b/node_modules/convert-source-map/test/comment-regex.js
@@ -3,17 +3,16 @@
var test = require('tap').test
, generator = require('inline-source-map')
- , rx = require('..').commentRegex
- , mapFileRx = require('..').mapFileCommentRegex
+ , convert = require('..')
function comment(prefix, suffix) {
- rx.lastIndex = 0;
+ var rx = convert.commentRegex;
return rx.test(prefix + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
}
function commentWithCharSet(prefix, suffix, sep) {
sep = sep || ':';
- rx.lastIndex = 0;
+ var rx = convert.commentRegex;
return rx.test(prefix + 'sourceMappingURL=data:application/json;charset' + sep +'utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + suffix)
}
@@ -66,7 +65,7 @@ test('comment regex new spec - #', function (t) {
})
function mapFileCommentWrap(s1, s2) {
- mapFileRx.lastIndex = 0;
+ var mapFileRx = convert.mapFileCommentRegex;
return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2)
}
diff --git a/node_modules/convert-source-map/test/convert-source-map.js b/node_modules/convert-source-map/test/convert-source-map.js
index ea243f5f7..d57d69d14 100644
--- a/node_modules/convert-source-map/test/convert-source-map.js
+++ b/node_modules/convert-source-map/test/convert-source-map.js
@@ -5,7 +5,7 @@ var test = require('tap').test
, generator = require('inline-source-map')
, convert = require('..')
-var gen = generator()
+var gen = generator({charset:"utf-8"})
.addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 })
.addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 })
@@ -64,8 +64,8 @@ test('from source', function (t) {
, 'foo();'
, ''
].join('\n')
- , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
+ , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
+ , otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
function getComment(src) {
var map = convert.fromSource(src);
@@ -91,8 +91,8 @@ test('from source with a large source', function (t) {
, 'foo();'
, ''
].join('\n')
- , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
- , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
+ , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
+ , otherMap = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
function getComment(src) {
var map = convert.fromSource(src, true);
@@ -211,3 +211,45 @@ test('return null fromSource when largeSource is true', function(t) {
)
t.end()
})
+
+test('commentRegex returns new RegExp on each get', function(t) {
+ var foo = [
+ 'function foo() {'
+ , ' console.log("hello I am foo");'
+ , ' console.log("who are you");'
+ , '}'
+ , ''
+ , 'foo();'
+ , ''
+ ].join('\n')
+ , map = '//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9'
+ , re = convert.commentRegex
+
+ re.exec(foo + map)
+
+ t.equal(re.lastIndex, 372, 'has an updated lastIndex')
+ t.equal(convert.commentRegex.lastIndex, 0, 'a fresh RegExp has lastIndex of 0')
+
+ t.end()
+})
+
+test('mapFileCommentRegex returns new RegExp on each get', function(t) {
+ var foo = [
+ 'function foo() {'
+ , ' console.log("hello I am foo");'
+ , ' console.log("who are you");'
+ , '}'
+ , ''
+ , 'foo();'
+ , ''
+ ].join('\n')
+ , map = '//# sourceMappingURL=foo.js.map'
+ , re = convert.mapFileCommentRegex
+
+ re.exec(foo + map)
+
+ t.equal(re.lastIndex, 119, 'has an updated lastIndex')
+ t.equal(convert.mapFileCommentRegex.lastIndex, 0, 'a fresh RegExp has lastIndex of 0')
+
+ t.end()
+})
diff --git a/node_modules/core-js/CHANGELOG.md b/node_modules/core-js/CHANGELOG.md
index b597d55d6..6fbcbb412 100644
--- a/node_modules/core-js/CHANGELOG.md
+++ b/node_modules/core-js/CHANGELOG.md
@@ -1,158 +1,6 @@
## Changelog
-##### 2.4.1 - 2016.07.18
-- fixed `script` tag for some parsers, [#204](https://github.com/zloirock/core-js/issues/204), [#216](https://github.com/zloirock/core-js/issues/216)
-- removed some unused variables, [#217](https://github.com/zloirock/core-js/issues/217), [#218](https://github.com/zloirock/core-js/issues/218)
-- fixed MS Edge `Reflect.construct` and `Reflect.apply` - they should not allow primitive as `argumentsList` argument
-
##### 1.2.7 [LEGACY] - 2016.07.18
-- some fixes for issues like [#159](https://github.com/zloirock/core-js/issues/159), [#186](https://github.com/zloirock/core-js/issues/186), [#194](https://github.com/zloirock/core-js/issues/194), [#207](https://github.com/zloirock/core-js/issues/207)
-
-##### 2.4.0 - 2016.05.08
-- Added `Observable`, [stage 1 proposal](https://github.com/zenparsing/es-observable)
-- Fixed behavior `Object.{getOwnPropertySymbols, getOwnPropertyDescriptor}` and `Object#propertyIsEnumerable` on `Object.prototype`
-- `Reflect.construct` and `Reflect.apply` should throw an error if `argumentsList` argument is not an object, [#194](https://github.com/zloirock/core-js/issues/194)
-
-##### 2.3.0 - 2016.04.24
-- Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask)
-- Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration)
-- Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable)
-- `String#{padStart, padEnd}` returns original string if filler is empty string, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend)
-- `Object.values` and `Object.entries` moved to stage 4 from 3, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries)
-- `System.global` moved to stage 2 from 1, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal)
-- `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson)
-- `Error.isError` withdrawn and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror)
-- Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193)
-
-##### 2.2.2 - 2016.04.06
-- Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316)
-- Added fixes for some `Math` methods in Tor Browser
-- `Array.{from, of}` no longer calls prototype setters
-- Added workaround over Chrome DevTools strange behavior, [#186](https://github.com/zloirock/core-js/issues/186)
-
-##### 2.2.1 - 2016.03.19
-- Fixed `Object.getOwnPropertyNames(window)` `2.1+` versions bug, [#181](https://github.com/zloirock/core-js/issues/181)
-
-##### 2.2.0 - 2016.03.15
-- Added `String#matchAll`, [proposal](https://github.com/tc39/String.prototype.matchAll)
-- Added `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381)
-- Added `@@toPrimitive` methods to `Date` and `Symbol`
-- Fixed `%TypedArray%#slice` in Edge ~ 13 (throws with `@@species` and wrapped / inherited constructor)
-- Some other minor fixes
-
-##### 2.1.5 - 2016.03.12
-- Improved support NodeJS domains in `Promise#then`, [#180](https://github.com/zloirock/core-js/issues/180)
-- Added fallback for `Date#toJSON` bug in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173#issuecomment-193972502)
-
-##### 2.1.4 - 2016.03.08
-- Added fallback for `Symbol` polyfill in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173)
-- Added one more fallback for IE11 `Script Access Denied` error with iframes, [#165](https://github.com/zloirock/core-js/issues/165)
-
-##### 2.1.3 - 2016.02.29
-- Added fallback for [`es6-promise` package bug](https://github.com/stefanpenner/es6-promise/issues/169), [#176](https://github.com/zloirock/core-js/issues/176)
-
-##### 2.1.2 - 2016.02.29
-- Some minor `Promise` fixes:
- - Browsers `rejectionhandled` event better HTML spec complaint
- - Errors in unhandled rejection handlers should not cause any problems
- - Fixed typo in feature detection
-
-##### 2.1.1 - 2016.02.22
-- Some `Promise` improvements:
- - Feature detection:
- - **Added detection unhandled rejection tracking support - now it's available everywhere**, [#140](https://github.com/zloirock/core-js/issues/140)
- - Added detection `@@species` pattern support for completely correct subclassing
- - Removed usage `Object.setPrototypeOf` from feature detection and noisy console message about it in FF
- - `Promise.all` fixed for some very specific cases
-
-##### 2.1.0 - 2016.02.09
-- **API**:
- - ES5 polyfills are split and logic, used in other polyfills, moved to internal modules
- - **All entry point works in ES3 environment like IE8- without `core-js/(library/)es5`**
- - **Added all missed single entry points for ES5 polyfills**
- - Separated ES5 polyfills moved to the ES6 namespace. Why?
- - Mainly, for prevent duplication features in different namespaces - logic of most required ES5 polyfills changed in ES6+:
- - Already added changes for: `Object` statics - should accept primitives, new whitespaces lists in `String#trim`, `parse(Int|float)`, `RegExp#toString` logic, `String#split`, etc
- - Should be changed in the future: `@@species` and `ToLength` logic in `Array` methods, `Date` parsing, `Function#bind`, etc
- - Should not be changed only several features like `Array.isArray` and `Date.now`
- - Some ES5 polyfills required for modern engines
- - All old entry points should work fine, but in the next major release API can be changed
- - `Object.getOwnPropertyDescriptors` moved to the stage 3, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#objectgetownpropertydescriptors-to-stage-3-jordan-harband-low-priority-but-super-quick)
- - Added `umd` option for [custom build process](https://github.com/zloirock/core-js#custom-build-from-external-scripts), [#169](https://github.com/zloirock/core-js/issues/169)
- - Returned entry points for `Array` statics, removed in `2.0`, for compatibility with `babel` `6` and for future fixes
-- **Deprecated**:
- - `Reflect.enumerate` deprecated and will be removed from the next major release, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#5xix-revisit-proxy-enumerate---revisit-decision-to-exhaust-iterator)
-- **New Features**:
- - Added [`Reflect` metadata API](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) as a pre-strawman feature, [#152](https://github.com/zloirock/core-js/issues/152):
- - `Reflect.defineMetadata`
- - `Reflect.deleteMetadata`
- - `Reflect.getMetadata`
- - `Reflect.getMetadataKeys`
- - `Reflect.getOwnMetadata`
- - `Reflect.getOwnMetadataKeys`
- - `Reflect.hasMetadata`
- - `Reflect.hasOwnMetadata`
- - `Reflect.metadata`
- - Implementation / fixes `Date#toJSON`
- - Fixes for `parseInt` and `Number.parseInt`
- - Fixes for `parseFloat` and `Number.parseFloat`
- - Fixes for `RegExp#toString`
- - Fixes for `Array#sort`
- - Fixes for `Number#toFixed`
- - Fixes for `Number#toPrecision`
- - Additional fixes for `String#split` (`RegExp#@@split`)
-- **Improvements**:
- - Correct subclassing wrapped collections, `Number` and `RegExp` constructors with native class syntax
- - Correct support `SharedArrayBuffer` and buffers from other realms in typed arrays wrappers
- - Additional validations for `Object.{defineProperty, getOwnPropertyDescriptor}` and `Reflect.defineProperty`
-- **Bug Fixes**:
- - Fixed some cases `Array#lastIndexOf` with negative second argument
-
-##### 2.0.3 - 2016.01.11
-- Added fallback for V8 ~ Chrome 49 `Promise` subclassing bug causes unhandled rejection on feature detection, [#159](https://github.com/zloirock/core-js/issues/159)
-- Added fix for very specific environments with global `window === null`
-
-##### 2.0.2 - 2016.01.04
-- Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`.
-
-##### 2.0.1 - 2015.12.31
-- forced usage `Promise.resolve` polyfill in the `library` version for correct work with wrapper
-- `Object.assign` should be defined in the strict mode -> throw an error on extension non-extensible objects, [#154](https://github.com/zloirock/core-js/issues/154)
-
-##### 2.0.0 - 2015.12.24
-- added implementations and fixes [Typed Arrays](https://github.com/zloirock/core-js#ecmascript-6-typed-arrays)-related features
- - `ArrayBuffer`, `ArrayBuffer.isView`, `ArrayBuffer#slice`
- - `DataView` with all getter / setter methods
- - `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array` and `Float64Array` constructors
- - `%TypedArray%.{for, of}`, `%TypedArray%#{copyWithin, every, fill, filter, find, findIndex, forEach, indexOf, includes, join, lastIndexOf, map, reduce, reduceRight, reverse, set, slice, some, sort, subarray, values, keys, entries, @@iterator, ...}`
-- added [`System.global`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-global), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#systemglobal-jhd)
-- added [`Error.isError`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/ljharb/proposal-is-error), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#jhd-erroriserror)
-- added [`Math.{iaddh, isubh, imulh, umulh}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703)
-- `RegExp.escape` moved from the `es7` to the non-standard `core` namespace, [July TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-28.md#62-regexpescape) - too slow, but it's condition of stability, [#116](https://github.com/zloirock/core-js/issues/116)
-- [`Promise`](https://github.com/zloirock/core-js#ecmascript-6-promise)
- - some performance optimisations
- - added basic support [`rejectionHandled` event / `onrejectionhandled` handler](https://github.com/zloirock/core-js#unhandled-rejection-tracking) to the polyfill
- - removed usage `@@species` from `Promise.{all, race}`, [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-18.md#conclusionresolution-2)
-- some improvements [collections polyfills](https://github.com/zloirock/core-js#ecmascript-6-collections)
- - `O(1)` and preventing possible leaks with frozen keys, [#134](https://github.com/zloirock/core-js/issues/134)
- - correct observable state object keys
-- renamed `String#{padLeft, padRight}` -> [`String#{padStart, padEnd}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-string-pad-start-end), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) (they want to rename it on each meeting?O_o), [#132](https://github.com/zloirock/core-js/issues/132)
-- added [`String#{trimStart, trimEnd}` as aliases for `String#{trimLeft, trimRight}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2)
-- added [annex B HTML methods](https://github.com/zloirock/core-js#ecmascript-6-string) - ugly, but also [the part of the spec](http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.anchor)
-- added little fix for [`Date#toString`](https://github.com/zloirock/core-js#ecmascript-6-date) - `new Date(NaN).toString()` [should be `'Invalid Date'`](http://www.ecma-international.org/ecma-262/6.0/#sec-todatestring)
-- added [`{keys, values, entries, @@iterator}` methods to DOM collections](https://github.com/zloirock/core-js#iterable-dom-collections) which should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass) - `NodeList`, `DOMTokenList`, `MediaList`, `StyleSheetList`, `CSSRuleList`.
-- removed Mozilla `Array` generics - [deprecated and will be removed from FF](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Array_generic_methods), [looks like strawman is dead](http://wiki.ecmascript.org/doku.php?id=strawman:array_statics), available [alternative shim](https://github.com/plusdude/array-generics)
-- removed `core.log` module
-- CommonJS API
- - added entry points for [virtual methods](https://github.com/zloirock/core-js#commonjs-and-prototype-methods-without-global-namespace-pollution)
- - added entry points for [stages proposals](https://github.com/zloirock/core-js#ecmascript-7-proposals)
- - some other minor changes
-- [custom build from external scripts](https://github.com/zloirock/core-js#custom-build-from-external-scripts) moved to the separate package for preventing problems with dependencies
-- changed `$` prefix for internal modules file names because Team Foundation Server does not support it, [#129](https://github.com/zloirock/core-js/issues/129)
-- additional fix for `SameValueZero` in V8 ~ Chromium 39-42 collections
-- additional fix for FF27 `Array` iterator
-- removed usage shortcuts for `arguments` object - old WebKit bug, [#150](https://github.com/zloirock/core-js/issues/150)
-- `{Map, Set}#forEach` non-generic, [#144](https://github.com/zloirock/core-js/issues/144)
-- many other improvements
+* some fixes for issues like #159, #186, #194, #207
##### 1.2.6 - 2015.11.09
* reject with `TypeError` on attempt resolve promise itself
@@ -190,9 +38,9 @@
##### 1.2.0 - 2015.09.27
* added browser [`Promise` rejection hook](#unhandled-rejection-tracking), [#106](https://github.com/zloirock/core-js/issues/106)
* added correct [`IsRegExp`](http://www.ecma-international.org/ecma-262/6.0/#sec-isregexp) logic to [`String#{includes, startsWith, endsWith}`](https://github.com/zloirock/core-js/#ecmascript-6-string) and [`RegExp` constructor](https://github.com/zloirock/core-js/#ecmascript-6-regexp), `@@match` case, [example](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match#Disabling_the_isRegExp_check)
-* updated [`String#leftPad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) [with proposal](https://github.com/ljharb/proposal-string-pad-left-right/issues/6): string filler truncated from the right side
+* updated [`String#leftPad`](https://github.com/zloirock/core-js/#ecmascript-7) [with proposal](https://github.com/ljharb/proposal-string-pad-left-right/issues/6): string filler truncated from the right side
* replaced V8 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) - its properties order not only [incorrect](https://github.com/sindresorhus/object-assign/issues/22), it is non-deterministic and it causes some problems
-* fixed behavior with deleted in getters properties for `Object.{`[`assign`](https://github.com/zloirock/core-js/#ecmascript-6-object)`, `[`entries, values`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)`}`, [example](http://goo.gl/iQE01c)
+* fixed behavior with deleted in getters properties for `Object.{`[`assign`](https://github.com/zloirock/core-js/#ecmascript-6-object)`, `[`entries, values`](https://github.com/zloirock/core-js/#ecmascript-7)`}`, [example](http://goo.gl/iQE01c)
* fixed [`Math.sinh`](https://github.com/zloirock/core-js/#ecmascript-6-math) with very small numbers in V8 near Chromium 38
* some other fixes and optimizations
@@ -214,10 +62,10 @@
* added more correct microtask implementation for [`Promise`](#ecmascript-6-promise)
##### 1.1.0 - 2015.08.17
-* updated [string padding](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to [actual proposal](https://github.com/ljharb/proposal-string-pad-left-right) - renamed, minor internal changes:
+* updated [string padding](https://github.com/zloirock/core-js/#ecmascript-7) to [actual proposal](https://github.com/ljharb/proposal-string-pad-left-right) - renamed, minor internal changes:
* `String#lpad` -> `String#padLeft`
* `String#rpad` -> `String#padRight`
-* added [string trim functions](#ecmascript-7-proposals) - [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), defacto standard - required only for IE11- and fixed for some old engines:
+* added [string trim functions](#ecmascript-7) - [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), defacto standard - required only for IE11- and fixed for some old engines:
* `String#trimLeft`
* `String#trimRight`
* [`String#trim`](https://github.com/zloirock/core-js/#ecmascript-6-string) fixed for some engines by es6 spec and moved from `es5` to single `es6` module
@@ -257,9 +105,9 @@
* [`es6.regexp`](https://github.com/zloirock/core-js/#ecmascript-6-regexp)
* [`es6.math`](https://github.com/zloirock/core-js/#ecmascript-6-math)
* [`es6.number`](https://github.com/zloirock/core-js/#ecmascript-6-number)
- * [`es7.object.to-array`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+ * [`es7.object.to-array`](https://github.com/zloirock/core-js/#ecmascript-7)
* [`core.object`](https://github.com/zloirock/core-js/#object)
- * [`core.string`](https://github.com/zloirock/core-js/#escaping-strings)
+ * [`core.string`](https://github.com/zloirock/core-js/#escaping-html)
* [`core.iter-helpers`](https://github.com/zloirock/core-js/#ecmascript-6-iterators)
* internal modules (`$`, `$.iter`, etc)
* many other optimizations
@@ -275,10 +123,10 @@
* fixed [#89](https://github.com/zloirock/core-js/issues/89) - behavior `Number` constructor in strange case
##### 0.9.18 - 2015.06.17
-* removed `/` from [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) escaped characters
+* removed `/` from [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7) escaped characters
##### 0.9.17 - 2015.06.14
-* updated [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to the [latest proposal](https://github.com/benjamingr/RexExp.escape)
+* updated [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7) to the [latest proposal](https://github.com/benjamingr/RexExp.escape)
* fixed conflict with webpack dev server + IE buggy behavior
##### 0.9.16 - 2015.06.11
@@ -326,7 +174,7 @@
* added [support DOM collections](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice#Streamlining_cross-browser_behavior) to IE8- `Array#slice`
##### 0.9.6 - 2015.05.01
-* added [`String#lpad`, `String#rpad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+* added [`String#lpad`, `String#rpad`](https://github.com/zloirock/core-js/#ecmascript-7)
##### 0.9.5 - 2015.04.30
* added cap for `Function#@@hasInstance`
@@ -348,7 +196,7 @@
* added correct [symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol) descriptors
* fixed behavior `Object.{assign, create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors}` with symbols
* added [single entry points](https://github.com/zloirock/core-js/#commonjs) for `Object.{create, defineProperty, defineProperties}`
-* added [`Map#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+* added [`Map#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7)
* removed non-standard methods `Object#[_]` and `Function#only` - they solves syntax problems, but now in compilers available arrows and ~~in near future will be available~~ [available](http://babeljs.io/blog/2015/05/14/function-bind/) [bind syntax](https://github.com/zenparsing/es-function-bind)
* removed non-standard undocumented methods `Symbol.{pure, set}`
* some fixes and internal changes
@@ -361,7 +209,7 @@
##### 0.8.2 - 2015.04.13
* [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) now also works in IE9-
-* added [`Set#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+* added [`Set#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7)
* some optimizations and fixes
##### 0.8.1 - 2015.04.03
@@ -391,8 +239,8 @@
##### 0.6.0 - 2015.02.23
* added support safe closing iteration - calling `iterator.return` on abort iteration, if it exists
* added basic support [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking in shim
-* added [`Object.getOwnPropertyDescriptors`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
-* removed `console` cap - creates too many problems
+* added [`Object.getOwnPropertyDescriptors`](https://github.com/zloirock/core-js/#ecmascript-7)
+* removed `console` cap - creates too many problems - you can use [`core.log`](https://github.com/zloirock/core-js/#console) module as that
* restructuring [namespaces](https://github.com/zloirock/core-js/#custom-build)
* some fixes
@@ -412,7 +260,7 @@
##### 0.5.0 - 2015.02.08
* systematization of modules
* splitted [`es6` module](https://github.com/zloirock/core-js/#ecmascript-6)
-* splitted `console` module: `web.console` - only cap for missing methods, `core.log` - bound methods & additional features
+* splitted [`console` module](https://github.com/zloirock/core-js/#console): `web.console` - only cap for missing methods, `core.log` - bound methods & additional features
* added [`delay` method](https://github.com/zloirock/core-js/#delay)
* some fixes
@@ -519,8 +367,8 @@
* repair converting -0 to +0 in [native collections](https://github.com/zloirock/core-js/#ecmascript-6-collections)
##### 0.2.0 - 2014.12.06
-* added [`es7.proposals`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) and [`es7.abstract-refs`](https://github.com/zenparsing/es-abstract-refs) modules
-* added [`String#at`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+* added [`es7.proposals`](https://github.com/zloirock/core-js/#ecmascript-7) and [`es7.abstract-refs`](https://github.com/zenparsing/es-abstract-refs) modules
+* added [`String#at`](https://github.com/zloirock/core-js/#ecmascript-7)
* added real [`String Iterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), older versions used Array Iterator
* added abstract references support:
* added `Symbol.referenceGet`
@@ -549,7 +397,7 @@
* [TC39 November meeting](https://github.com/rwaldron/tc39-notes/tree/master/es6/2014-11):
* [`.contains` -> `.includes`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains)
* `String#contains` -> [`String#includes`](https://github.com/zloirock/core-js/#ecmascript-6-string)
- * `Array#contains` -> [`Array#includes`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)
+ * `Array#contains` -> [`Array#includes`](https://github.com/zloirock/core-js/#ecmascript-7)
* `Dict.contains` -> [`Dict.includes`](https://github.com/zloirock/core-js/#dict)
* [removed `WeakMap#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm)
* [removed `WeakSet#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm)
diff --git a/node_modules/core-js/LICENSE b/node_modules/core-js/LICENSE
index c99b842d7..669bcc98e 100644
--- a/node_modules/core-js/LICENSE
+++ b/node_modules/core-js/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2016 Denis Pushkarev
+Copyright (c) 2015 Denis Pushkarev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/core-js/bower.json b/node_modules/core-js/bower.json
index f6eb784be..056881972 100644
--- a/node_modules/core-js/bower.json
+++ b/node_modules/core-js/bower.json
@@ -1,34 +1,21 @@
{
"name": "core.js",
"main": "client/core.js",
- "version": "2.4.1",
+ "version": "1.2.7",
"description": "Standard Library",
"keywords": [
- "ES3",
- "ECMAScript 3",
- "ES5",
- "ECMAScript 5",
"ES6",
- "ES2015",
"ECMAScript 6",
- "ECMAScript 2015",
"ES7",
- "ES2016",
"ECMAScript 7",
- "ECMAScript 2016",
- "Harmony",
- "Strawman",
"Map",
"Set",
"WeakMap",
"WeakSet",
+ "Dict",
"Promise",
"Symbol",
- "TypedArray",
- "setImmediate",
- "Dict",
- "polyfill",
- "shim"
+ "console"
],
"authors": [
"Denis Pushkarev <zloirock@zloirock.ru> (http://zloirock.ru/)"
diff --git a/node_modules/core-js/build/Gruntfile.ls b/node_modules/core-js/build/Gruntfile.ls
index f4b53809a..615184241 100644
--- a/node_modules/core-js/build/Gruntfile.ls
+++ b/node_modules/core-js/build/Gruntfile.ls
@@ -1,4 +1,5 @@
require! <[./build fs ./config]>
+library-tests = <[client/library.js tests/helpers.js tests/library.js]>map -> src: it
module.exports = (grunt)->
grunt.loadNpmTasks \grunt-contrib-clean
grunt.loadNpmTasks \grunt-contrib-copy
@@ -26,7 +27,7 @@ module.exports = (grunt)->
copy: lib: files:
* expand: on
cwd: './'
- src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]>
+ src: <[es5/** es6/** es7/** js/** web/** core/** fn/** index.js shim.js]>
dest: './library/'
* expand: on
cwd: './'
@@ -49,22 +50,21 @@ module.exports = (grunt)->
configFile: './tests/karma.conf.js'
browsers: <[PhantomJS]>
singleRun: on
- 'default': {}
- 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it
+ 'continuous': {}
+ 'continuous-library':
+ files: library-tests
grunt.registerTask \build (options)->
done = @async!
- build {
- modules: (options || 'es5,es6,es7,js,web,core')split \,
+ err, it <- build {
+ modules: (options || 'es5,es6,es7,js,web,core')split \,
blacklist: (grunt.option(\blacklist) || '')split \,
- library: grunt.option(\library) in <[yes on true]>
- umd: grunt.option(\umd) not in <[no off false]>
+ library: !!grunt.option \library
}
- .then !->
- grunt.option(\path) || grunt.option(\path, './custom')
- fs.writeFile grunt.option(\path) + '.js', it, done
- .catch !->
- console.error it
+ if err
+ console.error err
process.exit 1
+ grunt.option(\path) || grunt.option(\path, './custom')
+ fs.writeFile grunt.option(\path) + '.js', it, done
grunt.registerTask \client ->
grunt.option \library ''
grunt.option \path './client/core'
diff --git a/node_modules/core-js/build/build.ls b/node_modules/core-js/build/build.ls
index 0cf210de5..274ffc423 100644
--- a/node_modules/core-js/build/build.ls
+++ b/node_modules/core-js/build/build.ls
@@ -1,14 +1,181 @@
-require! {
- '../library/fn/promise': Promise
- './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner}
- fs: {readFile, writeFile, unlink}
- path: {join}
- webpack, temp
-}
-
-module.exports = ({modules = [], blacklist = [], library = no, umd = on})->
- resolve, reject <~! new Promise _
+require! {'./config': {banner}, fs: {readFile, writeFile, unlink}, path, webpack}
+
+list = <[
+ es5
+ es6.symbol
+ es6.object.assign
+ es6.object.is
+ es6.object.set-prototype-of
+ es6.object.to-string
+ es6.object.freeze
+ es6.object.seal
+ es6.object.prevent-extensions
+ es6.object.is-frozen
+ es6.object.is-sealed
+ es6.object.is-extensible
+ es6.object.get-own-property-descriptor
+ es6.object.get-prototype-of
+ es6.object.keys
+ es6.object.get-own-property-names
+ es6.function.name
+ es6.function.has-instance
+ es6.number.constructor
+ es6.number.epsilon
+ es6.number.is-finite
+ es6.number.is-integer
+ es6.number.is-nan
+ es6.number.is-safe-integer
+ es6.number.max-safe-integer
+ es6.number.min-safe-integer
+ es6.number.parse-float
+ es6.number.parse-int
+ es6.math.acosh
+ es6.math.asinh
+ es6.math.atanh
+ es6.math.cbrt
+ es6.math.clz32
+ es6.math.cosh
+ es6.math.expm1
+ es6.math.fround
+ es6.math.hypot
+ es6.math.imul
+ es6.math.log10
+ es6.math.log1p
+ es6.math.log2
+ es6.math.sign
+ es6.math.sinh
+ es6.math.tanh
+ es6.math.trunc
+ es6.string.from-code-point
+ es6.string.raw
+ es6.string.trim
+ es6.string.code-point-at
+ es6.string.ends-with
+ es6.string.includes
+ es6.string.repeat
+ es6.string.starts-with
+ es6.string.iterator
+ es6.array.from
+ es6.array.of
+ es6.array.iterator
+ es6.array.species
+ es6.array.copy-within
+ es6.array.fill
+ es6.array.find
+ es6.array.find-index
+ es6.regexp.constructor
+ es6.regexp.flags
+ es6.regexp.match
+ es6.regexp.replace
+ es6.regexp.search
+ es6.regexp.split
+ es6.promise
+ es6.map
+ es6.set
+ es6.weak-map
+ es6.weak-set
+ es6.reflect.apply
+ es6.reflect.construct
+ es6.reflect.define-property
+ es6.reflect.delete-property
+ es6.reflect.enumerate
+ es6.reflect.get
+ es6.reflect.get-own-property-descriptor
+ es6.reflect.get-prototype-of
+ es6.reflect.has
+ es6.reflect.is-extensible
+ es6.reflect.own-keys
+ es6.reflect.prevent-extensions
+ es6.reflect.set
+ es6.reflect.set-prototype-of
+ es6.date.to-string
+ es6.typed.array-buffer
+ es6.typed.data-view
+ es6.typed.int8-array
+ es6.typed.uint8-array
+ es6.typed.uint8-clamped-array
+ es6.typed.int16-array
+ es6.typed.uint16-array
+ es6.typed.int32-array
+ es6.typed.uint32-array
+ es6.typed.float32-array
+ es6.typed.float64-array
+ es7.array.includes
+ es7.string.at
+ es7.string.pad-left
+ es7.string.pad-right
+ es7.string.trim-left
+ es7.string.trim-right
+ es7.regexp.escape
+ es7.object.get-own-property-descriptors
+ es7.object.values
+ es7.object.entries
+ es7.map.to-json
+ es7.set.to-json
+ web.immediate
+ web.dom.iterable
+ web.timers
+ core.dict
+ core.get-iterator-method
+ core.get-iterator
+ core.is-iterable
+ core.delay
+ core.function.part
+ core.object.is-object
+ core.object.classof
+ core.object.define
+ core.object.make
+ core.number.iterator
+ core.string.escape-html
+ core.string.unescape-html
+ core.log
+ js.array.statics
+]>
+
+experimental = <[
+ es6.date.to-string
+ es6.typed.array-buffer
+ es6.typed.data-view
+ es6.typed.int8-array
+ es6.typed.uint8-array
+ es6.typed.uint8-clamped-array
+ es6.typed.int16-array
+ es6.typed.uint16-array
+ es6.typed.int32-array
+ es6.typed.uint32-array
+ es6.typed.float32-array
+ es6.typed.float64-array
+]>
+
+libraryBlacklist = <[
+ es6.object.to-string
+ es6.function.name
+ es6.regexp.constructor
+ es6.regexp.flags
+ es6.regexp.match
+ es6.regexp.replace
+ es6.regexp.search
+ es6.regexp.split
+ es6.number.constructor
+]>
+
+es5SpecialCase = <[
+ es6.object.freeze
+ es6.object.seal
+ es6.object.prevent-extensions
+ es6.object.is-frozen
+ es6.object.is-sealed
+ es6.object.is-extensible
+ es6.string.trim
+]>
+
+module.exports = ({modules = [], blacklist = [], library = no}, next)!->
let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {}
+ check = (err)->
+ if err
+ next err, ''
+ on
+
if @exp => for experimental => @[..] = on
if @es5 => for es5SpecialCase => @[..] = on
for ns of @
@@ -23,40 +190,29 @@ module.exports = ({modules = [], blacklist = [], library = no, umd = on})->
if name is ns or name.indexOf("#ns.") is 0
@[name] = no
- TARGET = temp.path {suffix: '.js'}
-
+ TARGET = "./__tmp#{ Math.random! }__.js"
err, info <~! webpack do
entry: list.filter(~> @[it]).map ~>
- if library => join __dirname, '..', 'library', 'modules', it
- else join __dirname, '..', 'modules', it
+ path.join(__dirname, '../', "#{ if library => '/library' else '' }/modules/#it")
output:
path: ''
filename: TARGET
- if err => return reject err
-
+ if check err => return
err, script <~! readFile TARGET
- if err => return reject err
-
+ if check err => return
err <~! unlink TARGET
- if err => return reject err
-
- if umd
- exportScript = """
- // CommonJS export
- if(typeof module != 'undefined' && module.exports)module.exports = __e;
- // RequireJS export
- else if(typeof define == 'function' && define.amd)define(function(){return __e});
- // Export to global object
- else __g.core = __e;
- """
- else
- exportScript = ""
-
- resolve """
+ if check err => return
+
+ next null """
#banner
!function(__e, __g, undefined){
'use strict';
#script
- #exportScript
+ // CommonJS export
+ if(typeof module != 'undefined' && module.exports)module.exports = __e;
+ // RequireJS export
+ else if(typeof define == 'function' && define.amd)define(function(){return __e});
+ // Export to global object
+ else __g.core = __e;
}(1, 1);
- """ \ No newline at end of file
+ """
diff --git a/node_modules/core-js/build/config.js b/node_modules/core-js/build/config.js
index df09eb12d..8df3dc6eb 100644
--- a/node_modules/core-js/build/config.js
+++ b/node_modules/core-js/build/config.js
@@ -1,255 +1,4 @@
module.exports = {
- list: [
- 'es6.symbol',
- 'es6.object.define-property',
- 'es6.object.define-properties',
- 'es6.object.get-own-property-descriptor',
- 'es6.object.create',
- 'es6.object.get-prototype-of',
- 'es6.object.keys',
- 'es6.object.get-own-property-names',
- 'es6.object.freeze',
- 'es6.object.seal',
- 'es6.object.prevent-extensions',
- 'es6.object.is-frozen',
- 'es6.object.is-sealed',
- 'es6.object.is-extensible',
- 'es6.object.assign',
- 'es6.object.is',
- 'es6.object.set-prototype-of',
- 'es6.object.to-string',
- 'es6.function.bind',
- 'es6.function.name',
- 'es6.function.has-instance',
- 'es6.number.constructor',
- 'es6.number.to-fixed',
- 'es6.number.to-precision',
- 'es6.number.epsilon',
- 'es6.number.is-finite',
- 'es6.number.is-integer',
- 'es6.number.is-nan',
- 'es6.number.is-safe-integer',
- 'es6.number.max-safe-integer',
- 'es6.number.min-safe-integer',
- 'es6.number.parse-float',
- 'es6.number.parse-int',
- 'es6.parse-int',
- 'es6.parse-float',
- 'es6.math.acosh',
- 'es6.math.asinh',
- 'es6.math.atanh',
- 'es6.math.cbrt',
- 'es6.math.clz32',
- 'es6.math.cosh',
- 'es6.math.expm1',
- 'es6.math.fround',
- 'es6.math.hypot',
- 'es6.math.imul',
- 'es6.math.log10',
- 'es6.math.log1p',
- 'es6.math.log2',
- 'es6.math.sign',
- 'es6.math.sinh',
- 'es6.math.tanh',
- 'es6.math.trunc',
- 'es6.string.from-code-point',
- 'es6.string.raw',
- 'es6.string.trim',
- 'es6.string.code-point-at',
- 'es6.string.ends-with',
- 'es6.string.includes',
- 'es6.string.repeat',
- 'es6.string.starts-with',
- 'es6.string.iterator',
- 'es6.string.anchor',
- 'es6.string.big',
- 'es6.string.blink',
- 'es6.string.bold',
- 'es6.string.fixed',
- 'es6.string.fontcolor',
- 'es6.string.fontsize',
- 'es6.string.italics',
- 'es6.string.link',
- 'es6.string.small',
- 'es6.string.strike',
- 'es6.string.sub',
- 'es6.string.sup',
- 'es6.array.is-array',
- 'es6.array.from',
- 'es6.array.of',
- 'es6.array.join',
- 'es6.array.slice',
- 'es6.array.sort',
- 'es6.array.for-each',
- 'es6.array.map',
- 'es6.array.filter',
- 'es6.array.some',
- 'es6.array.every',
- 'es6.array.reduce',
- 'es6.array.reduce-right',
- 'es6.array.index-of',
- 'es6.array.last-index-of',
- 'es6.array.copy-within',
- 'es6.array.fill',
- 'es6.array.find',
- 'es6.array.find-index',
- 'es6.array.iterator',
- 'es6.array.species',
- 'es6.regexp.constructor',
- 'es6.regexp.to-string',
- 'es6.regexp.flags',
- 'es6.regexp.match',
- 'es6.regexp.replace',
- 'es6.regexp.search',
- 'es6.regexp.split',
- 'es6.promise',
- 'es6.map',
- 'es6.set',
- 'es6.weak-map',
- 'es6.weak-set',
- 'es6.reflect.apply',
- 'es6.reflect.construct',
- 'es6.reflect.define-property',
- 'es6.reflect.delete-property',
- 'es6.reflect.enumerate',
- 'es6.reflect.get',
- 'es6.reflect.get-own-property-descriptor',
- 'es6.reflect.get-prototype-of',
- 'es6.reflect.has',
- 'es6.reflect.is-extensible',
- 'es6.reflect.own-keys',
- 'es6.reflect.prevent-extensions',
- 'es6.reflect.set',
- 'es6.reflect.set-prototype-of',
- 'es6.date.now',
- 'es6.date.to-json',
- 'es6.date.to-iso-string',
- 'es6.date.to-string',
- 'es6.date.to-primitive',
- 'es6.typed.array-buffer',
- 'es6.typed.data-view',
- 'es6.typed.int8-array',
- 'es6.typed.uint8-array',
- 'es6.typed.uint8-clamped-array',
- 'es6.typed.int16-array',
- 'es6.typed.uint16-array',
- 'es6.typed.int32-array',
- 'es6.typed.uint32-array',
- 'es6.typed.float32-array',
- 'es6.typed.float64-array',
- 'es7.array.includes',
- 'es7.string.at',
- 'es7.string.pad-start',
- 'es7.string.pad-end',
- 'es7.string.trim-left',
- 'es7.string.trim-right',
- 'es7.string.match-all',
- 'es7.symbol.async-iterator',
- 'es7.symbol.observable',
- 'es7.object.get-own-property-descriptors',
- 'es7.object.values',
- 'es7.object.entries',
- 'es7.object.enumerable-keys',
- 'es7.object.enumerable-values',
- 'es7.object.enumerable-entries',
- 'es7.object.define-getter',
- 'es7.object.define-setter',
- 'es7.object.lookup-getter',
- 'es7.object.lookup-setter',
- 'es7.map.to-json',
- 'es7.set.to-json',
- 'es7.system.global',
- 'es7.error.is-error',
- 'es7.math.iaddh',
- 'es7.math.isubh',
- 'es7.math.imulh',
- 'es7.math.umulh',
- 'es7.reflect.define-metadata',
- 'es7.reflect.delete-metadata',
- 'es7.reflect.get-metadata',
- 'es7.reflect.get-metadata-keys',
- 'es7.reflect.get-own-metadata',
- 'es7.reflect.get-own-metadata-keys',
- 'es7.reflect.has-metadata',
- 'es7.reflect.has-own-metadata',
- 'es7.reflect.metadata',
- 'es7.asap',
- 'es7.observable',
- 'web.immediate',
- 'web.dom.iterable',
- 'web.timers',
- 'core.dict',
- 'core.get-iterator-method',
- 'core.get-iterator',
- 'core.is-iterable',
- 'core.delay',
- 'core.function.part',
- 'core.object.is-object',
- 'core.object.classof',
- 'core.object.define',
- 'core.object.make',
- 'core.number.iterator',
- 'core.regexp.escape',
- 'core.string.escape-html',
- 'core.string.unescape-html',
- ],
- experimental: [
- 'es7.object.enumerable-keys',
- 'es7.object.enumerable-values',
- 'es7.object.enumerable-entries',
- ],
- libraryBlacklist: [
- 'es6.object.to-string',
- 'es6.function.name',
- 'es6.regexp.constructor',
- 'es6.regexp.to-string',
- 'es6.regexp.flags',
- 'es6.regexp.match',
- 'es6.regexp.replace',
- 'es6.regexp.search',
- 'es6.regexp.split',
- 'es6.number.constructor',
- 'es6.date.to-string',
- 'es6.date.to-primitive',
- ],
- es5SpecialCase: [
- 'es6.object.create',
- 'es6.object.define-property',
- 'es6.object.define-properties',
- 'es6.object.get-own-property-descriptor',
- 'es6.object.get-prototype-of',
- 'es6.object.keys',
- 'es6.object.get-own-property-names',
- 'es6.object.freeze',
- 'es6.object.seal',
- 'es6.object.prevent-extensions',
- 'es6.object.is-frozen',
- 'es6.object.is-sealed',
- 'es6.object.is-extensible',
- 'es6.function.bind',
- 'es6.array.is-array',
- 'es6.array.join',
- 'es6.array.slice',
- 'es6.array.sort',
- 'es6.array.for-each',
- 'es6.array.map',
- 'es6.array.filter',
- 'es6.array.some',
- 'es6.array.every',
- 'es6.array.reduce',
- 'es6.array.reduce-right',
- 'es6.array.index-of',
- 'es6.array.last-index-of',
- 'es6.number.to-fixed',
- 'es6.number.to-precision',
- 'es6.date.now',
- 'es6.date.to-iso-string',
- 'es6.date.to-json',
- 'es6.string.trim',
- 'es6.regexp.to-string',
- 'es6.parse-int',
- 'es6.parse-float',
- ],
banner: '/**\n' +
' * core-js ' + require('../package').version + '\n' +
' * https://github.com/zloirock/core-js\n' +
diff --git a/node_modules/core-js/build/index.js b/node_modules/core-js/build/index.js
index 26bdec415..d9cf11f35 100644
--- a/node_modules/core-js/build/index.js
+++ b/node_modules/core-js/build/index.js
@@ -1,100 +1,94 @@
-// Generated by LiveScript 1.4.0
+// Generated by LiveScript 1.3.1
(function(){
- var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, join, webpack, temp;
- Promise = require('../library/fn/promise');
- ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner;
+ var banner, ref$, readFile, writeFile, unlink, path, webpack, list, experimental, libraryBlacklist, es5SpecialCase;
+ banner = require('./config').banner;
ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink;
- join = require('path').join;
+ path = require('path');
webpack = require('webpack');
- temp = require('temp');
- module.exports = function(arg$){
- var modules, ref$, blacklist, library, umd, this$ = this;
+ list = ['es5', 'es6.symbol', 'es6.object.assign', 'es6.object.is', 'es6.object.set-prototype-of', 'es6.object.to-string', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.object.get-own-property-descriptor', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.function.name', 'es6.function.has-instance', 'es6.number.constructor', 'es6.number.epsilon', 'es6.number.is-finite', 'es6.number.is-integer', 'es6.number.is-nan', 'es6.number.is-safe-integer', 'es6.number.max-safe-integer', 'es6.number.min-safe-integer', 'es6.number.parse-float', 'es6.number.parse-int', 'es6.math.acosh', 'es6.math.asinh', 'es6.math.atanh', 'es6.math.cbrt', 'es6.math.clz32', 'es6.math.cosh', 'es6.math.expm1', 'es6.math.fround', 'es6.math.hypot', 'es6.math.imul', 'es6.math.log10', 'es6.math.log1p', 'es6.math.log2', 'es6.math.sign', 'es6.math.sinh', 'es6.math.tanh', 'es6.math.trunc', 'es6.string.from-code-point', 'es6.string.raw', 'es6.string.trim', 'es6.string.code-point-at', 'es6.string.ends-with', 'es6.string.includes', 'es6.string.repeat', 'es6.string.starts-with', 'es6.string.iterator', 'es6.array.from', 'es6.array.of', 'es6.array.iterator', 'es6.array.species', 'es6.array.copy-within', 'es6.array.fill', 'es6.array.find', 'es6.array.find-index', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.promise', 'es6.map', 'es6.set', 'es6.weak-map', 'es6.weak-set', 'es6.reflect.apply', 'es6.reflect.construct', 'es6.reflect.define-property', 'es6.reflect.delete-property', 'es6.reflect.enumerate', 'es6.reflect.get', 'es6.reflect.get-own-property-descriptor', 'es6.reflect.get-prototype-of', 'es6.reflect.has', 'es6.reflect.is-extensible', 'es6.reflect.own-keys', 'es6.reflect.prevent-extensions', 'es6.reflect.set', 'es6.reflect.set-prototype-of', 'es6.date.to-string', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.array.includes', 'es7.string.at', 'es7.string.pad-left', 'es7.string.pad-right', 'es7.string.trim-left', 'es7.string.trim-right', 'es7.regexp.escape', 'es7.object.get-own-property-descriptors', 'es7.object.values', 'es7.object.entries', 'es7.map.to-json', 'es7.set.to-json', 'web.immediate', 'web.dom.iterable', 'web.timers', 'core.dict', 'core.get-iterator-method', 'core.get-iterator', 'core.is-iterable', 'core.delay', 'core.function.part', 'core.object.is-object', 'core.object.classof', 'core.object.define', 'core.object.make', 'core.number.iterator', 'core.string.escape-html', 'core.string.unescape-html', 'core.log', 'js.array.statics'];
+ experimental = ['es6.date.to-string', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array'];
+ libraryBlacklist = ['es6.object.to-string', 'es6.function.name', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.number.constructor'];
+ es5SpecialCase = ['es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.string.trim'];
+ module.exports = function(arg$, next){
+ var modules, ref$, blacklist, library;
modules = (ref$ = arg$.modules) != null
? ref$
: [], blacklist = (ref$ = arg$.blacklist) != null
? ref$
- : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true;
- return new Promise(function(resolve, reject){
- (function(){
- var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this;
- if (this.exp) {
- for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) {
- x$ = ref$[i$];
- this[x$] = true;
- }
- }
- if (this.es5) {
- for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) {
- y$ = ref$[i$];
- this[y$] = true;
- }
+ : [], library = (ref$ = arg$.library) != null ? ref$ : false;
+ (function(){
+ var check, i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this;
+ check = function(err){
+ if (err) {
+ next(err, '');
+ return true;
}
- for (ns in this) {
- if (this[ns]) {
- for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) {
- name = ref$[i$];
- if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) {
- this[name] = true;
- }
- }
- }
+ };
+ if (this.exp) {
+ for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) {
+ x$ = ref$[i$];
+ this[x$] = true;
}
- if (library) {
- blacklist = blacklist.concat(libraryBlacklist);
+ }
+ if (this.es5) {
+ for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) {
+ y$ = ref$[i$];
+ this[y$] = true;
}
- for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) {
- ns = blacklist[i$];
- for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) {
- name = ref$[j$];
- if (name === ns || name.indexOf(ns + ".") === 0) {
- this[name] = false;
+ }
+ for (ns in this) {
+ if (this[ns]) {
+ for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) {
+ name = ref$[i$];
+ if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) {
+ this[name] = true;
}
}
}
- TARGET = temp.path({
- suffix: '.js'
- });
- webpack({
- entry: list.filter(function(it){
- return this$[it];
- }).map(function(it){
- if (library) {
- return join(__dirname, '..', 'library', 'modules', it);
- } else {
- return join(__dirname, '..', 'modules', it);
- }
- }),
- output: {
- path: '',
- filename: TARGET
+ }
+ if (library) {
+ blacklist = blacklist.concat(libraryBlacklist);
+ }
+ for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) {
+ ns = blacklist[i$];
+ for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) {
+ name = ref$[j$];
+ if (name === ns || name.indexOf(ns + ".") === 0) {
+ this[name] = false;
}
- }, function(err, info){
- if (err) {
- return reject(err);
+ }
+ }
+ TARGET = "./__tmp" + Math.random() + "__.js";
+ webpack({
+ entry: list.filter(function(it){
+ return this$[it];
+ }).map(function(it){
+ return path.join(__dirname, '../', (library ? '/library' : '') + "/modules/" + it);
+ }),
+ output: {
+ path: '',
+ filename: TARGET
+ }
+ }, function(err, info){
+ if (check(err)) {
+ return;
+ }
+ readFile(TARGET, function(err, script){
+ if (check(err)) {
+ return;
}
- readFile(TARGET, function(err, script){
- if (err) {
- return reject(err);
+ unlink(TARGET, function(err){
+ if (check(err)) {
+ return;
}
- unlink(TARGET, function(err){
- var exportScript;
- if (err) {
- return reject(err);
- }
- if (umd) {
- exportScript = "// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;";
- } else {
- exportScript = "";
- }
- resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);");
- });
+ next(null, "" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;\n}(1, 1);");
});
});
- }.call(modules.reduce(function(memo, it){
- memo[it] = true;
- return memo;
- }, {})));
- });
+ });
+ }.call(modules.reduce(function(memo, it){
+ memo[it] = true;
+ return memo;
+ }, {})));
};
function in$(x, xs){
var i = -1, l = xs.length >>> 0;
diff --git a/node_modules/core-js/client/core.js b/node_modules/core-js/client/core.js
index 1e470de77..b9bac6c55 100644
--- a/node_modules/core-js/client/core.js
+++ b/node_modules/core-js/client/core.js
@@ -1,5 +1,5 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
@@ -53,194 +53,122 @@
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1);
+ __webpack_require__(34);
+ __webpack_require__(40);
+ __webpack_require__(42);
+ __webpack_require__(44);
+ __webpack_require__(46);
+ __webpack_require__(48);
__webpack_require__(50);
__webpack_require__(51);
__webpack_require__(52);
+ __webpack_require__(53);
__webpack_require__(54);
__webpack_require__(55);
+ __webpack_require__(56);
+ __webpack_require__(57);
__webpack_require__(58);
__webpack_require__(59);
__webpack_require__(60);
__webpack_require__(61);
- __webpack_require__(62);
- __webpack_require__(63);
__webpack_require__(64);
__webpack_require__(65);
__webpack_require__(66);
__webpack_require__(68);
+ __webpack_require__(69);
__webpack_require__(70);
+ __webpack_require__(71);
__webpack_require__(72);
+ __webpack_require__(73);
__webpack_require__(74);
+ __webpack_require__(76);
__webpack_require__(77);
__webpack_require__(78);
- __webpack_require__(79);
- __webpack_require__(83);
+ __webpack_require__(80);
+ __webpack_require__(81);
+ __webpack_require__(82);
+ __webpack_require__(84);
+ __webpack_require__(85);
__webpack_require__(86);
__webpack_require__(87);
__webpack_require__(88);
__webpack_require__(89);
+ __webpack_require__(90);
__webpack_require__(91);
__webpack_require__(92);
__webpack_require__(93);
__webpack_require__(94);
__webpack_require__(95);
+ __webpack_require__(96);
__webpack_require__(97);
__webpack_require__(99);
- __webpack_require__(100);
- __webpack_require__(101);
__webpack_require__(103);
__webpack_require__(104);
- __webpack_require__(105);
+ __webpack_require__(106);
__webpack_require__(107);
- __webpack_require__(108);
- __webpack_require__(109);
__webpack_require__(111);
- __webpack_require__(112);
- __webpack_require__(113);
- __webpack_require__(114);
- __webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
- __webpack_require__(118);
- __webpack_require__(119);
__webpack_require__(120);
- __webpack_require__(121);
__webpack_require__(122);
- __webpack_require__(123);
__webpack_require__(124);
__webpack_require__(126);
+ __webpack_require__(127);
+ __webpack_require__(128);
__webpack_require__(130);
__webpack_require__(131);
- __webpack_require__(132);
__webpack_require__(133);
- __webpack_require__(137);
- __webpack_require__(139);
- __webpack_require__(140);
- __webpack_require__(141);
- __webpack_require__(142);
+ __webpack_require__(134);
+ __webpack_require__(135);
+ __webpack_require__(136);
__webpack_require__(143);
- __webpack_require__(144);
- __webpack_require__(145);
__webpack_require__(146);
__webpack_require__(147);
- __webpack_require__(148);
__webpack_require__(149);
__webpack_require__(150);
__webpack_require__(151);
__webpack_require__(152);
+ __webpack_require__(153);
+ __webpack_require__(154);
+ __webpack_require__(155);
+ __webpack_require__(156);
+ __webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
- __webpack_require__(161);
+ __webpack_require__(160);
__webpack_require__(162);
__webpack_require__(163);
+ __webpack_require__(164);
+ __webpack_require__(165);
+ __webpack_require__(166);
__webpack_require__(167);
- __webpack_require__(168);
__webpack_require__(169);
__webpack_require__(170);
__webpack_require__(171);
- __webpack_require__(173);
+ __webpack_require__(172);
__webpack_require__(174);
__webpack_require__(175);
- __webpack_require__(176);
- __webpack_require__(179);
+ __webpack_require__(177);
+ __webpack_require__(178);
+ __webpack_require__(180);
__webpack_require__(181);
__webpack_require__(182);
__webpack_require__(183);
- __webpack_require__(185);
+ __webpack_require__(186);
+ __webpack_require__(114);
+ __webpack_require__(188);
__webpack_require__(187);
__webpack_require__(189);
__webpack_require__(190);
__webpack_require__(191);
+ __webpack_require__(192);
__webpack_require__(193);
- __webpack_require__(194);
__webpack_require__(195);
__webpack_require__(196);
- __webpack_require__(203);
- __webpack_require__(206);
- __webpack_require__(207);
- __webpack_require__(209);
- __webpack_require__(210);
- __webpack_require__(211);
- __webpack_require__(212);
- __webpack_require__(213);
- __webpack_require__(214);
- __webpack_require__(215);
- __webpack_require__(216);
- __webpack_require__(217);
- __webpack_require__(218);
- __webpack_require__(219);
- __webpack_require__(220);
- __webpack_require__(222);
- __webpack_require__(223);
- __webpack_require__(224);
- __webpack_require__(225);
- __webpack_require__(226);
- __webpack_require__(227);
- __webpack_require__(228);
- __webpack_require__(229);
- __webpack_require__(231);
- __webpack_require__(234);
- __webpack_require__(235);
- __webpack_require__(237);
- __webpack_require__(238);
- __webpack_require__(239);
- __webpack_require__(240);
- __webpack_require__(241);
- __webpack_require__(242);
- __webpack_require__(243);
- __webpack_require__(244);
- __webpack_require__(245);
- __webpack_require__(246);
- __webpack_require__(247);
- __webpack_require__(249);
- __webpack_require__(250);
- __webpack_require__(251);
- __webpack_require__(252);
- __webpack_require__(253);
- __webpack_require__(254);
- __webpack_require__(255);
- __webpack_require__(256);
- __webpack_require__(258);
- __webpack_require__(259);
- __webpack_require__(261);
- __webpack_require__(262);
- __webpack_require__(263);
- __webpack_require__(264);
- __webpack_require__(267);
- __webpack_require__(268);
- __webpack_require__(269);
- __webpack_require__(270);
- __webpack_require__(271);
- __webpack_require__(272);
- __webpack_require__(273);
- __webpack_require__(274);
- __webpack_require__(276);
- __webpack_require__(277);
- __webpack_require__(278);
- __webpack_require__(279);
- __webpack_require__(280);
- __webpack_require__(281);
- __webpack_require__(282);
- __webpack_require__(283);
- __webpack_require__(284);
- __webpack_require__(285);
- __webpack_require__(286);
- __webpack_require__(287);
- __webpack_require__(288);
- __webpack_require__(291);
- __webpack_require__(156);
- __webpack_require__(293);
- __webpack_require__(292);
- __webpack_require__(294);
- __webpack_require__(295);
- __webpack_require__(296);
- __webpack_require__(297);
- __webpack_require__(298);
- __webpack_require__(300);
- __webpack_require__(301);
- __webpack_require__(302);
- __webpack_require__(304);
- module.exports = __webpack_require__(305);
+ __webpack_require__(197);
+ __webpack_require__(198);
+ __webpack_require__(199);
+ module.exports = __webpack_require__(200);
/***/ },
@@ -248,289 +176,309 @@
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // ECMAScript 6 symbols shim
- var global = __webpack_require__(2)
- , has = __webpack_require__(3)
- , DESCRIPTORS = __webpack_require__(4)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , META = __webpack_require__(20).KEY
- , $fails = __webpack_require__(5)
- , shared = __webpack_require__(21)
- , setToStringTag = __webpack_require__(22)
- , uid = __webpack_require__(17)
- , wks = __webpack_require__(23)
- , wksExt = __webpack_require__(24)
- , wksDefine = __webpack_require__(25)
- , keyOf = __webpack_require__(27)
- , enumKeys = __webpack_require__(40)
- , isArray = __webpack_require__(43)
- , anObject = __webpack_require__(10)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(14)
- , createDesc = __webpack_require__(15)
- , _create = __webpack_require__(44)
- , gOPNExt = __webpack_require__(47)
- , $GOPD = __webpack_require__(49)
- , $DP = __webpack_require__(9)
- , $keys = __webpack_require__(28)
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
- , $Symbol = global.Symbol
- , $JSON = global.JSON
- , _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
- , HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
- , SymbolRegistry = shared('symbol-registry')
- , AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
- })).a != 7;
- }) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
- if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
- } : dP;
-
- var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , DESCRIPTORS = __webpack_require__(8)
+ , createDesc = __webpack_require__(7)
+ , html = __webpack_require__(14)
+ , cel = __webpack_require__(15)
+ , has = __webpack_require__(17)
+ , cof = __webpack_require__(18)
+ , invoke = __webpack_require__(19)
+ , fails = __webpack_require__(9)
+ , anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , isObject = __webpack_require__(16)
+ , toObject = __webpack_require__(21)
+ , toIObject = __webpack_require__(23)
+ , toInteger = __webpack_require__(25)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27)
+ , IObject = __webpack_require__(24)
+ , IE_PROTO = __webpack_require__(11)('__proto__')
+ , createArrayMethod = __webpack_require__(28)
+ , arrayIndexOf = __webpack_require__(33)(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+ if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+ }
+ $export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+ });
+
+ // IE 8- don't enum bug keys
+ var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+ // Create object with `null` prototype: use iframe Object with cleared prototype
+ var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write('<script>document.F=Object</script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict.prototype[keys1[i]];
+ return createDict();
};
-
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
- return typeof it == 'symbol';
- } : function(it){
- return it instanceof $Symbol;
+ var createGetKeys = function(names, length){
+ return function(object){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
};
+ var Empty = function(){};
+ $export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+ });
- var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
- if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
- D = _create(D, {enumerable: createDesc(0, false)});
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P){
- anObject(it);
- var keys = enumKeys(P = toIObject(P))
- , i = 0
- , l = keys.length
- , key;
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P){
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
+ var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
};
- // 19.4.1.1 Symbol([description])
- if(!USE_NATIVE){
- $Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
+ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+ $export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
};
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(42).f = $propertyIsEnumerable;
- __webpack_require__(41).f = $getOwnPropertySymbols;
-
- if(DESCRIPTORS && !__webpack_require__(26)){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
}
-
- wksExt.f = function(name){
- return wrap(wks(name));
- }
- }
-
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
- for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
- for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function(key){
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function(){ setter = true; },
- useSimple: function(){ setter = false; }
});
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
+ // fallback for not array-like ES3 strings and DOM objects
+ $export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+ }), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
});
-
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
- })), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
+ $export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
}
});
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
+ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+ $export($export.S, 'Array', {isArray: __webpack_require__(30)});
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
+ var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+ };
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+ var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+ };
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
+ $export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+ });
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
- };
+ // 20.3.3.1 / 15.9.4.4 Date.now()
+ $export($export.S, 'Date', {now: function(){ return +new Date; }});
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+ var lz = function(num){
+ return num > 9 ? num : '0' + num;
+ };
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(5)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+ // PhantomJS / old WebKit has a broken implementations
+ $export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+ }) || !fails(function(){
+ new Date(NaN).toISOString();
+ })), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
});
/***/ },
-/* 5 */
+/* 2 */
/***/ function(module, exports) {
- module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
+ var $Object = Object;
+ module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
};
/***/ },
-/* 6 */
+/* 3 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , hide = __webpack_require__(8)
- , redefine = __webpack_require__(16)
- , ctx = __webpack_require__(18)
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(5)
+ , hide = __webpack_require__(6)
+ , redefine = __webpack_require__(10)
+ , ctx = __webpack_require__(12)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
@@ -546,13 +494,13 @@
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
+ own = !IS_FORCED && target && key in target;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
- if(target)redefine(target, key, out, type & $export.U);
+ if(target && !own)redefine(target, key, out);
// export
if(exports[key] != out)hide(exports, key, exp);
if(IS_PROTO && expProto[key] != out)expProto[key] = out;
@@ -560,164 +508,111 @@
};
global.core = core;
// type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
module.exports = $export;
/***/ },
-/* 7 */
+/* 4 */
+/***/ function(module, exports) {
+
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ },
+/* 5 */
/***/ function(module, exports) {
- var core = module.exports = {version: '2.4.0'};
+ var core = module.exports = {version: '1.2.6'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
-/* 8 */
+/* 6 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9)
- , createDesc = __webpack_require__(15);
- module.exports = __webpack_require__(4) ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
+ var $ = __webpack_require__(2)
+ , createDesc = __webpack_require__(7);
+ module.exports = __webpack_require__(8) ? function(object, key, value){
+ return $.setDesc(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- var anObject = __webpack_require__(10)
- , IE8_DOM_DEFINE = __webpack_require__(12)
- , toPrimitive = __webpack_require__(14)
- , dP = Object.defineProperty;
-
- exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
- };
-
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11);
- module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
- };
-
-/***/ },
-/* 11 */
+/* 7 */
/***/ function(module, exports) {
- module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
+ module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
};
/***/ },
-/* 12 */
+/* 8 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){
- return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(9)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
-/* 13 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11)
- , document = __webpack_require__(2).document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
- module.exports = function(it){
- return is ? document.createElement(it) : {};
- };
-
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(11);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
- };
-
-/***/ },
-/* 15 */
+/* 9 */
/***/ function(module, exports) {
- module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
};
/***/ },
-/* 16 */
+/* 10 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , has = __webpack_require__(3)
- , SRC = __webpack_require__(17)('src')
+ // add fake Function#toString
+ // for correct work wrapped methods / constructors with methods like LoDash isNative
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(6)
+ , SRC = __webpack_require__(11)('src')
, TO_STRING = 'toString'
, $toString = Function[TO_STRING]
, TPL = ('' + $toString).split(TO_STRING);
- __webpack_require__(7).inspectSource = function(it){
+ __webpack_require__(5).inspectSource = function(it){
return $toString.call(it);
};
(module.exports = function(O, key, val, safe){
- var isFunction = typeof val == 'function';
- if(isFunction)has(val, 'name') || hide(val, 'name', key);
- if(O[key] === val)return;
- if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ if(typeof val == 'function'){
+ val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ val.hasOwnProperty('name') || hide(val, 'name', key);
+ }
if(O === global){
O[key] = val;
} else {
- if(!safe){
- delete O[key];
- hide(O, key, val);
- } else {
- if(O[key])O[key] = val;
- else hide(O, key, val);
- }
+ if(!safe)delete O[key];
+ hide(O, key, val);
}
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString(){
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ },
-/* 17 */
+/* 11 */
/***/ function(module, exports) {
var id = 0
@@ -727,11 +622,11 @@
};
/***/ },
-/* 18 */
+/* 12 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
- var aFunction = __webpack_require__(19);
+ var aFunction = __webpack_require__(13);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
@@ -752,7 +647,7 @@
};
/***/ },
-/* 19 */
+/* 13 */
/***/ function(module, exports) {
module.exports = function(it){
@@ -761,210 +656,93 @@
};
/***/ },
-/* 20 */
-/***/ function(module, exports, __webpack_require__) {
-
- var META = __webpack_require__(17)('meta')
- , isObject = __webpack_require__(11)
- , has = __webpack_require__(3)
- , setDesc = __webpack_require__(9).f
- , id = 0;
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
- var FREEZE = !__webpack_require__(5)(function(){
- return isExtensible(Object.preventExtensions({}));
- });
- var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
- };
- var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
- };
- var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
- };
- // add metadata on freeze-family methods calling
- var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
- };
- var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
- };
-
-/***/ },
-/* 21 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
- };
-
-/***/ },
-/* 22 */
+/* 14 */
/***/ function(module, exports, __webpack_require__) {
- var def = __webpack_require__(9).f
- , has = __webpack_require__(3)
- , TAG = __webpack_require__(23)('toStringTag');
-
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
- };
+ module.exports = __webpack_require__(4).document && document.documentElement;
/***/ },
-/* 23 */
+/* 15 */
/***/ function(module, exports, __webpack_require__) {
- var store = __webpack_require__(21)('wks')
- , uid = __webpack_require__(17)
- , Symbol = __webpack_require__(2).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
- var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ var isObject = __webpack_require__(16)
+ , document = __webpack_require__(4).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+ module.exports = function(it){
+ return is ? document.createElement(it) : {};
};
- $exports.store = store;
-
-/***/ },
-/* 24 */
-/***/ function(module, exports, __webpack_require__) {
-
- exports.f = __webpack_require__(23);
-
/***/ },
-/* 25 */
-/***/ function(module, exports, __webpack_require__) {
+/* 16 */
+/***/ function(module, exports) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , LIBRARY = __webpack_require__(26)
- , wksExt = __webpack_require__(24)
- , defineProperty = __webpack_require__(9).f;
- module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
+ module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ },
-/* 26 */
+/* 17 */
/***/ function(module, exports) {
- module.exports = false;
-
-/***/ },
-/* 27 */
-/***/ function(module, exports, __webpack_require__) {
-
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30);
- module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
};
/***/ },
-/* 28 */
-/***/ function(module, exports, __webpack_require__) {
+/* 18 */
+/***/ function(module, exports) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(29)
- , enumBugKeys = __webpack_require__(39);
+ var toString = {}.toString;
- module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
+ module.exports = function(it){
+ return toString.call(it).slice(8, -1);
};
/***/ },
-/* 29 */
-/***/ function(module, exports, __webpack_require__) {
-
- var has = __webpack_require__(3)
- , toIObject = __webpack_require__(30)
- , arrayIndexOf = __webpack_require__(34)(false)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO');
+/* 19 */
+/***/ function(module, exports) {
- module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
+ // fast apply, http://jsperf.lnkit.com/fast-apply/5
+ module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
};
/***/ },
-/* 30 */
+/* 20 */
/***/ function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(31)
- , defined = __webpack_require__(33);
+ var isObject = __webpack_require__(16);
module.exports = function(it){
- return IObject(defined(it));
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
};
/***/ },
-/* 31 */
+/* 21 */
/***/ function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(32);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
-
-/***/ },
-/* 32 */
-/***/ function(module, exports) {
-
- var toString = {}.toString;
-
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(22);
module.exports = function(it){
- return toString.call(it).slice(8, -1);
+ return Object(defined(it));
};
/***/ },
-/* 33 */
+/* 22 */
/***/ function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
@@ -974,44 +752,28 @@
};
/***/ },
-/* 34 */
+/* 23 */
/***/ function(module, exports, __webpack_require__) {
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37);
- module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
- // Array#includes uses SameValueZero equality algorithm
- if(IS_INCLUDES && el != el)while(length > index){
- value = O[index++];
- if(value != value)return true;
- // Array#toIndex ignores holes, Array#includes - not
- } else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(24)
+ , defined = __webpack_require__(22);
+ module.exports = function(it){
+ return IObject(defined(it));
};
/***/ },
-/* 35 */
+/* 24 */
/***/ function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(36)
- , min = Math.min;
- module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(18);
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ },
-/* 36 */
+/* 25 */
/***/ function(module, exports) {
// 7.1.4 ToInteger
@@ -1022,10 +784,10 @@
};
/***/ },
-/* 37 */
+/* 26 */
/***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(36)
+ var toInteger = __webpack_require__(25)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
@@ -1034,451 +796,510 @@
};
/***/ },
-/* 38 */
+/* 27 */
/***/ function(module, exports, __webpack_require__) {
- var shared = __webpack_require__(21)('keys')
- , uid = __webpack_require__(17);
- module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(25)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ },
-/* 39 */
-/***/ function(module, exports) {
-
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
-
-/***/ },
-/* 40 */
+/* 28 */
/***/ function(module, exports, __webpack_require__) {
- // all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42);
- module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
+ // 0 -> Array#forEach
+ // 1 -> Array#map
+ // 2 -> Array#filter
+ // 3 -> Array#some
+ // 4 -> Array#every
+ // 5 -> Array#find
+ // 6 -> Array#findIndex
+ var ctx = __webpack_require__(12)
+ , IObject = __webpack_require__(24)
+ , toObject = __webpack_require__(21)
+ , toLength = __webpack_require__(27)
+ , asc = __webpack_require__(29);
+ module.exports = function(TYPE){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
};
/***/ },
-/* 41 */
-/***/ function(module, exports) {
-
- exports.f = Object.getOwnPropertySymbols;
-
-/***/ },
-/* 42 */
-/***/ function(module, exports) {
+/* 29 */
+/***/ function(module, exports, __webpack_require__) {
- exports.f = {}.propertyIsEnumerable;
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ var isObject = __webpack_require__(16)
+ , isArray = __webpack_require__(30)
+ , SPECIES = __webpack_require__(31)('species');
+ module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
+ };
/***/ },
-/* 43 */
+/* 30 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
- var cof = __webpack_require__(32);
- module.exports = Array.isArray || function isArray(arg){
+ var cof = __webpack_require__(18);
+ module.exports = Array.isArray || function(arg){
return cof(arg) == 'Array';
};
/***/ },
-/* 44 */
+/* 31 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(10)
- , dPs = __webpack_require__(45)
- , enumBugKeys = __webpack_require__(39)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(13)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(46).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
+ var store = __webpack_require__(32)('wks')
+ , uid = __webpack_require__(11)
+ , Symbol = __webpack_require__(4).Symbol;
+ module.exports = function(name){
+ return store[name] || (store[name] =
+ Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
};
-
/***/ },
-/* 45 */
+/* 32 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9)
- , anObject = __webpack_require__(10)
- , getKeys = __webpack_require__(28);
-
- module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
+ var global = __webpack_require__(4)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
};
/***/ },
-/* 46 */
+/* 33 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(2).document && document.documentElement;
+ // false -> Array#indexOf
+ // true -> Array#includes
+ var toIObject = __webpack_require__(23)
+ , toLength = __webpack_require__(27)
+ , toIndex = __webpack_require__(26);
+ module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+ };
/***/ },
-/* 47 */
+/* 34 */
/***/ function(module, exports, __webpack_require__) {
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(30)
- , gOPN = __webpack_require__(48).f
- , toString = {}.toString;
+ 'use strict';
+ // ECMAScript 6 symbols shim
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , has = __webpack_require__(17)
+ , DESCRIPTORS = __webpack_require__(8)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , $fails = __webpack_require__(9)
+ , shared = __webpack_require__(32)
+ , setToStringTag = __webpack_require__(35)
+ , uid = __webpack_require__(11)
+ , wks = __webpack_require__(31)
+ , keyOf = __webpack_require__(36)
+ , $names = __webpack_require__(37)
+ , enumKeys = __webpack_require__(38)
+ , isArray = __webpack_require__(30)
+ , anObject = __webpack_require__(20)
+ , toIObject = __webpack_require__(23)
+ , createDesc = __webpack_require__(7)
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = $.isEnum
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+ var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
+ })).a != 7;
+ }) ? function(it, key, D){
+ var protoDesc = getDesc(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+ } : setDesc;
- var getWindowNames = function(it){
- try {
- return gOPN(it);
- } catch(e){
- return windowNames.slice();
- }
+ var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
};
- module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+ var isSymbol = function(it){
+ return typeof it == 'symbol';
};
-
-/***/ },
-/* 48 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(29)
- , hiddenKeys = __webpack_require__(39).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
+ var $defineProperty = function defineProperty(it, key, D){
+ if(D && has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return setDesc(it, key, D);
};
-
-/***/ },
-/* 49 */
-/***/ function(module, exports, __webpack_require__) {
-
- var pIE = __webpack_require__(42)
- , createDesc = __webpack_require__(15)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(14)
- , has = __webpack_require__(3)
- , IE8_DOM_DEFINE = __webpack_require__(12)
- , gOPD = Object.getOwnPropertyDescriptor;
-
- exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+ var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
};
-
-/***/ },
-/* 50 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f});
-
-/***/ },
-/* 51 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)});
-
-/***/ },
-/* 52 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- var toIObject = __webpack_require__(30)
- , $getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- __webpack_require__(53)('getOwnPropertyDescriptor', function(){
- return function getOwnPropertyDescriptor(it, key){
- return $getOwnPropertyDescriptor(toIObject(it), key);
- };
- });
-
-/***/ },
-/* 53 */
-/***/ function(module, exports, __webpack_require__) {
-
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(6)
- , core = __webpack_require__(7)
- , fails = __webpack_require__(5);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
-
-/***/ },
-/* 54 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- $export($export.S, 'Object', {create: __webpack_require__(44)});
-
-/***/ },
-/* 55 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.9 Object.getPrototypeOf(O)
- var toObject = __webpack_require__(56)
- , $getPrototypeOf = __webpack_require__(57);
-
- __webpack_require__(53)('getPrototypeOf', function(){
- return function getPrototypeOf(it){
- return $getPrototypeOf(toObject(it));
+ var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
+ };
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = getDesc(it = toIObject(it), key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+ };
+ var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
+ };
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+ };
+ var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
};
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+ };
+ var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
});
-/***/ },
-/* 56 */
-/***/ function(module, exports, __webpack_require__) {
+ // 19.4.1.1 Symbol([description])
+ if(!useNative){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
+ };
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(33);
- module.exports = function(it){
- return Object(defined(it));
- };
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
-/***/ },
-/* 57 */
-/***/ function(module, exports, __webpack_require__) {
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(3)
- , toObject = __webpack_require__(56)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , ObjectProto = Object.prototype;
+ if(DESCRIPTORS && !__webpack_require__(39)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+ }
- module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
+ var symbolStatics = {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
};
+ // 19.4.2.2 Symbol.hasInstance
+ // 19.4.2.3 Symbol.isConcatSpreadable
+ // 19.4.2.4 Symbol.iterator
+ // 19.4.2.6 Symbol.match
+ // 19.4.2.8 Symbol.replace
+ // 19.4.2.9 Symbol.search
+ // 19.4.2.10 Symbol.species
+ // 19.4.2.11 Symbol.split
+ // 19.4.2.12 Symbol.toPrimitive
+ // 19.4.2.13 Symbol.toStringTag
+ // 19.4.2.14 Symbol.unscopables
+ $.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
+ });
-/***/ },
-/* 58 */
-/***/ function(module, exports, __webpack_require__) {
+ setter = true;
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(56)
- , $keys = __webpack_require__(28);
+ $export($export.G + $export.W, {Symbol: $Symbol});
- __webpack_require__(53)('keys', function(){
- return function keys(it){
- return $keys(toObject(it));
- };
+ $export($export.S, 'Symbol', symbolStatics);
+
+ $export($export.S + $export.F * !useNative, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
});
-/***/ },
-/* 59 */
-/***/ function(module, exports, __webpack_require__) {
+ // 24.3.2 JSON.stringify(value [, replacer [, space]])
+ $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- __webpack_require__(53)('getOwnPropertyNames', function(){
- return __webpack_require__(47).f;
- });
+ // 19.4.3.5 Symbol.prototype[@@toStringTag]
+ setToStringTag($Symbol, 'Symbol');
+ // 20.2.1.9 Math[@@toStringTag]
+ setToStringTag(Math, 'Math', true);
+ // 24.3.3 JSON[@@toStringTag]
+ setToStringTag(global.JSON, 'JSON', true);
/***/ },
-/* 60 */
+/* 35 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.5 Object.freeze(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
+ var def = __webpack_require__(2).setDesc
+ , has = __webpack_require__(17)
+ , TAG = __webpack_require__(31)('toStringTag');
- __webpack_require__(53)('freeze', function($freeze){
- return function freeze(it){
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
- };
- });
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ };
/***/ },
-/* 61 */
+/* 36 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.17 Object.seal(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
-
- __webpack_require__(53)('seal', function($seal){
- return function seal(it){
- return $seal && isObject(it) ? $seal(meta(it)) : it;
- };
- });
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(23);
+ module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+ };
/***/ },
-/* 62 */
+/* 37 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.15 Object.preventExtensions(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
-
- __webpack_require__(53)('preventExtensions', function($preventExtensions){
- return function preventExtensions(it){
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
- };
- });
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+ var toIObject = __webpack_require__(23)
+ , getNames = __webpack_require__(2).getNames
+ , toString = {}.toString;
-/***/ },
-/* 63 */
-/***/ function(module, exports, __webpack_require__) {
+ var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
- // 19.1.2.12 Object.isFrozen(O)
- var isObject = __webpack_require__(11);
+ var getWindowNames = function(it){
+ try {
+ return getNames(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+ };
- __webpack_require__(53)('isFrozen', function($isFrozen){
- return function isFrozen(it){
- return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
- };
- });
+ module.exports.get = function getOwnPropertyNames(it){
+ if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
+ return getNames(toIObject(it));
+ };
/***/ },
-/* 64 */
+/* 38 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.13 Object.isSealed(O)
- var isObject = __webpack_require__(11);
-
- __webpack_require__(53)('isSealed', function($isSealed){
- return function isSealed(it){
- return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
- };
- });
+ // all enumerable object keys, includes symbols
+ var $ = __webpack_require__(2);
+ module.exports = function(it){
+ var keys = $.getKeys(it)
+ , getSymbols = $.getSymbols;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = $.isEnum
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
+ }
+ return keys;
+ };
/***/ },
-/* 65 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.11 Object.isExtensible(O)
- var isObject = __webpack_require__(11);
+/* 39 */
+/***/ function(module, exports) {
- __webpack_require__(53)('isExtensible', function($isExtensible){
- return function isExtensible(it){
- return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
- };
- });
+ module.exports = false;
/***/ },
-/* 66 */
+/* 40 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)});
+ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(41)});
/***/ },
-/* 67 */
+/* 41 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
// 19.1.2.1 Object.assign(target, source, ...)
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , $assign = Object.assign;
+ var $ = __webpack_require__(2)
+ , toObject = __webpack_require__(21)
+ , IObject = __webpack_require__(24);
// should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(5)(function(){
- var A = {}
+ module.exports = __webpack_require__(9)(function(){
+ var a = Object.assign
+ , A = {}
, B = {}
, S = Symbol()
, K = 'abcdefghijklmnopqrst';
A[S] = 7;
K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+ return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
var T = toObject(target)
- , aLen = arguments.length
+ , $$ = arguments
+ , $$len = $$.length
, index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
+ , getKeys = $.getKeys
+ , getSymbols = $.getSymbols
+ , isEnum = $.isEnum;
+ while($$len > index){
+ var S = IObject($$[index++])
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
, length = keys.length
, j = 0
, key;
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
- } : $assign;
+ }
+ return T;
+ } : Object.assign;
/***/ },
-/* 68 */
+/* 42 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {is: __webpack_require__(69)});
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {is: __webpack_require__(43)});
/***/ },
-/* 69 */
+/* 43 */
/***/ function(module, exports) {
// 7.2.9 SameValue(x, y)
@@ -1487,21 +1308,22 @@
};
/***/ },
-/* 70 */
+/* 44 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set});
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(45).set});
/***/ },
-/* 71 */
+/* 45 */
/***/ function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
- var isObject = __webpack_require__(11)
- , anObject = __webpack_require__(10);
+ var getDesc = __webpack_require__(2).getDesc
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20);
var check = function(O, proto){
anObject(O);
if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
@@ -1510,7 +1332,7 @@
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function(test, buggy, set){
try {
- set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2);
+ set = __webpack_require__(12)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch(e){ buggy = true; }
@@ -1525,42 +1347,35 @@
};
/***/ },
-/* 72 */
+/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 19.1.3.6 Object.prototype.toString()
- var classof = __webpack_require__(73)
+ var classof = __webpack_require__(47)
, test = {};
- test[__webpack_require__(23)('toStringTag')] = 'z';
+ test[__webpack_require__(31)('toStringTag')] = 'z';
if(test + '' != '[object z]'){
- __webpack_require__(16)(Object.prototype, 'toString', function toString(){
+ __webpack_require__(10)(Object.prototype, 'toString', function toString(){
return '[object ' + classof(this) + ']';
}, true);
}
/***/ },
-/* 73 */
+/* 47 */
/***/ function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(32)
- , TAG = __webpack_require__(23)('toStringTag')
+ var cof = __webpack_require__(18)
+ , TAG = __webpack_require__(31)('toStringTag')
// ES3 wrong here
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
- // fallback for IE11 Script Access Denied error
- var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
- };
-
module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
@@ -1568,134 +1383,204 @@
};
/***/ },
-/* 74 */
+/* 48 */
/***/ function(module, exports, __webpack_require__) {
- // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
- var $export = __webpack_require__(6);
+ // 19.1.2.5 Object.freeze(O)
+ var isObject = __webpack_require__(16);
- $export($export.P, 'Function', {bind: __webpack_require__(75)});
+ __webpack_require__(49)('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(it) : it;
+ };
+ });
/***/ },
-/* 75 */
+/* 49 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var aFunction = __webpack_require__(19)
- , isObject = __webpack_require__(11)
- , invoke = __webpack_require__(76)
- , arraySlice = [].slice
- , factories = {};
-
- var construct = function(F, len, args){
- if(!(len in factories)){
- for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(3)
+ , core = __webpack_require__(5)
+ , fails = __webpack_require__(9);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
- module.exports = Function.bind || function bind(that /*, args... */){
- var fn = aFunction(this)
- , partArgs = arraySlice.call(arguments, 1);
- var bound = function(/* args... */){
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.17 Object.seal(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(it) : it;
};
- if(isObject(fn.prototype))bound.prototype = fn.prototype;
- return bound;
- };
+ });
/***/ },
-/* 76 */
-/***/ function(module, exports) {
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
- // fast apply, http://jsperf.lnkit.com/fast-apply/5
- module.exports = function(fn, args, that){
- var un = that === undefined;
- switch(args.length){
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
- };
+ // 19.1.2.15 Object.preventExtensions(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
+ };
+ });
/***/ },
-/* 77 */
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.12 Object.isFrozen(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.13 Object.isSealed(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.11 Object.isExtensible(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+ });
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ var toIObject = __webpack_require__(23);
+
+ __webpack_require__(49)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+ });
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.9 Object.getPrototypeOf(O)
+ var toObject = __webpack_require__(21);
+
+ __webpack_require__(49)('getPrototypeOf', function($getPrototypeOf){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+ });
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 Object.keys(O)
+ var toObject = __webpack_require__(21);
+
+ __webpack_require__(49)('keys', function($keys){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+ });
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ __webpack_require__(49)('getOwnPropertyNames', function(){
+ return __webpack_require__(37).get;
+ });
+
+/***/ },
+/* 59 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9).f
- , createDesc = __webpack_require__(15)
- , has = __webpack_require__(3)
+ var setDesc = __webpack_require__(2).setDesc
+ , createDesc = __webpack_require__(7)
+ , has = __webpack_require__(17)
, FProto = Function.prototype
, nameRE = /^\s*function ([^ (]*)/
, NAME = 'name';
-
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
-
// 19.2.4.2 name
- NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, {
+ NAME in FProto || __webpack_require__(8) && setDesc(FProto, NAME, {
configurable: true,
get: function(){
- try {
- var that = this
- , name = ('' + that).match(nameRE)[1];
- has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name));
- return name;
- } catch(e){
- return '';
- }
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || setDesc(this, NAME, createDesc(5, name));
+ return name;
}
});
/***/ },
-/* 78 */
+/* 60 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var isObject = __webpack_require__(11)
- , getPrototypeOf = __webpack_require__(57)
- , HAS_INSTANCE = __webpack_require__(23)('hasInstance')
- , FunctionProto = Function.prototype;
+ var $ = __webpack_require__(2)
+ , isObject = __webpack_require__(16)
+ , HAS_INSTANCE = __webpack_require__(31)('hasInstance')
+ , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
- if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}});
/***/ },
-/* 79 */
+/* 61 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , has = __webpack_require__(3)
- , cof = __webpack_require__(32)
- , inheritIfRequired = __webpack_require__(80)
- , toPrimitive = __webpack_require__(14)
- , fails = __webpack_require__(5)
- , gOPN = __webpack_require__(48).f
- , gOPD = __webpack_require__(49).f
- , dP = __webpack_require__(9).f
- , $trim = __webpack_require__(81).trim
- , NUMBER = 'Number'
- , $Number = global[NUMBER]
- , Base = $Number
- , proto = $Number.prototype
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , has = __webpack_require__(17)
+ , cof = __webpack_require__(18)
+ , toPrimitive = __webpack_require__(62)
+ , fails = __webpack_require__(9)
+ , $trim = __webpack_require__(63).trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
// Opera ~12 has broken Object#toString
- , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER
- , TRIM = 'trim' in String.prototype;
+ , BROKEN_COF = cof($.create(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function(argument){
@@ -1730,58 +1615,61 @@
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ ? new Base(toNumber(it)) : toNumber(it);
};
- for(var keys = __webpack_require__(4) ? gOPN(Base) : (
+ $.each.call(__webpack_require__(8) ? $.getNames(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++){
- if(has(Base, key = keys[j]) && !has($Number, key)){
- dP($Number, key, gOPD(Base, key));
+ ).split(','), function(key){
+ if(has(Base, key) && !has($Number, key)){
+ $.setDesc($Number, key, $.getDesc(Base, key));
}
- }
+ });
$Number.prototype = proto;
proto.constructor = $Number;
- __webpack_require__(16)(global, NUMBER, $Number);
+ __webpack_require__(10)(global, NUMBER, $Number);
}
/***/ },
-/* 80 */
+/* 62 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(11)
- , setPrototypeOf = __webpack_require__(71).set;
- module.exports = function(that, target, C){
- var P, S = target.constructor;
- if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
- setPrototypeOf(that, P);
- } return that;
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(16);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
};
/***/ },
-/* 81 */
+/* 63 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , fails = __webpack_require__(5)
- , spaces = __webpack_require__(82)
+ var $export = __webpack_require__(3)
+ , defined = __webpack_require__(22)
+ , fails = __webpack_require__(9)
+ , spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
, space = '[' + spaces + ']'
, non = '\u200b\u0085'
, ltrim = RegExp('^' + space + space + '*')
, rtrim = RegExp(space + space + '*$');
- var exporter = function(KEY, exec, ALIAS){
- var exp = {};
- var FORCE = fails(function(){
+ var exporter = function(KEY, exec){
+ var exp = {};
+ exp[KEY] = exec(trim);
+ $export($export.P + $export.F * fails(function(){
return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if(ALIAS)exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
+ }), 'String', exp);
};
// 1 -> String#trimLeft
@@ -1797,196 +1685,21 @@
module.exports = exporter;
/***/ },
-/* 82 */
-/***/ function(module, exports) {
-
- module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
-/***/ },
-/* 83 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toInteger = __webpack_require__(36)
- , aNumberValue = __webpack_require__(84)
- , repeat = __webpack_require__(85)
- , $toFixed = 1..toFixed
- , floor = Math.floor
- , data = [0, 0, 0, 0, 0, 0]
- , ERROR = 'Number.toFixed: incorrect invocation!'
- , ZERO = '0';
-
- var multiply = function(n, c){
- var i = -1
- , c2 = c;
- while(++i < 6){
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
- };
- var divide = function(n){
- var i = 6
- , c = 0;
- while(--i >= 0){
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
- };
- var numToString = function(){
- var i = 6
- , s = '';
- while(--i >= 0){
- if(s !== '' || i === 0 || data[i] !== 0){
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
- };
- var pow = function(x, n, acc){
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
- };
- var log = function(x){
- var n = 0
- , x2 = x;
- while(x2 >= 4096){
- n += 12;
- x2 /= 4096;
- }
- while(x2 >= 2){
- n += 1;
- x2 /= 2;
- } return n;
- };
-
- $export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128..toFixed(0) !== '1000000000000000128'
- ) || !__webpack_require__(5)(function(){
- // V8 ~ Android 4.3-
- $toFixed.call({});
- })), 'Number', {
- toFixed: function toFixed(fractionDigits){
- var x = aNumberValue(this, ERROR)
- , f = toInteger(fractionDigits)
- , s = ''
- , m = ZERO
- , e, z, j, k;
- if(f < 0 || f > 20)throw RangeError(ERROR);
- if(x != x)return 'NaN';
- if(x <= -1e21 || x >= 1e21)return String(x);
- if(x < 0){
- s = '-';
- x = -x;
- }
- if(x > 1e-21){
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if(e > 0){
- multiply(0, z);
- j = f;
- while(j >= 7){
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while(j >= 23){
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if(f > 0){
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
- });
-
-/***/ },
-/* 84 */
-/***/ function(module, exports, __webpack_require__) {
-
- var cof = __webpack_require__(32);
- module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
- };
-
-/***/ },
-/* 85 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
-
- module.exports = function repeat(count){
- var str = String(defined(this))
- , res = ''
- , n = toInteger(count);
- if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
- for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
- return res;
- };
-
-/***/ },
-/* 86 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $fails = __webpack_require__(5)
- , aNumberValue = __webpack_require__(84)
- , $toPrecision = 1..toPrecision;
-
- $export($export.P + $export.F * ($fails(function(){
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
- }) || !$fails(function(){
- // V8 ~ Android 4.3-
- $toPrecision.call({});
- })), 'Number', {
- toPrecision: function toPrecision(precision){
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
- });
-
-/***/ },
-/* 87 */
+/* 64 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
/***/ },
-/* 88 */
+/* 65 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
- var $export = __webpack_require__(6)
- , _isFinite = __webpack_require__(2).isFinite;
+ var $export = __webpack_require__(3)
+ , _isFinite = __webpack_require__(4).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
@@ -1995,31 +1708,31 @@
});
/***/ },
-/* 89 */
+/* 66 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Number', {isInteger: __webpack_require__(90)});
+ $export($export.S, 'Number', {isInteger: __webpack_require__(67)});
/***/ },
-/* 90 */
+/* 67 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
- var isObject = __webpack_require__(11)
+ var isObject = __webpack_require__(16)
, floor = Math.floor;
module.exports = function isInteger(it){
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ },
-/* 91 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {
isNaN: function isNaN(number){
@@ -2028,12 +1741,12 @@
});
/***/ },
-/* 92 */
+/* 69 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
- var $export = __webpack_require__(6)
- , isInteger = __webpack_require__(90)
+ var $export = __webpack_require__(3)
+ , isInteger = __webpack_require__(67)
, abs = Math.abs;
$export($export.S, 'Number', {
@@ -2043,102 +1756,53 @@
});
/***/ },
-/* 93 */
+/* 70 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
/***/ },
-/* 94 */
+/* 71 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
/***/ },
-/* 95 */
+/* 72 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(96);
// 20.1.2.12 Number.parseFloat(string)
- $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
-
-/***/ },
-/* 96 */
-/***/ function(module, exports, __webpack_require__) {
+ var $export = __webpack_require__(3);
- var $parseFloat = __webpack_require__(2).parseFloat
- , $trim = __webpack_require__(81).trim;
-
- module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){
- var string = $trim(String(str), 3)
- , result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
- } : $parseFloat;
+ $export($export.S, 'Number', {parseFloat: parseFloat});
/***/ },
-/* 97 */
+/* 73 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(98);
// 20.1.2.13 Number.parseInt(string, radix)
- $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
-
-/***/ },
-/* 98 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $parseInt = __webpack_require__(2).parseInt
- , $trim = __webpack_require__(81).trim
- , ws = __webpack_require__(82)
- , hex = /^[\-+]?0[xX]/;
-
- module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
- } : $parseInt;
-
-/***/ },
-/* 99 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(98);
- // 18.2.5 parseInt(string, radix)
- $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
-
-/***/ },
-/* 100 */
-/***/ function(module, exports, __webpack_require__) {
+ var $export = __webpack_require__(3);
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(96);
- // 18.2.4 parseFloat(string)
- $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
+ $export($export.S, 'Number', {parseInt: parseInt});
/***/ },
-/* 101 */
+/* 74 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
- var $export = __webpack_require__(6)
- , log1p = __webpack_require__(102)
+ var $export = __webpack_require__(3)
+ , log1p = __webpack_require__(75)
, sqrt = Math.sqrt
, $acosh = Math.acosh;
- $export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
- ), 'Math', {
+ // V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+ $export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
@@ -2147,7 +1811,7 @@
});
/***/ },
-/* 102 */
+/* 75 */
/***/ function(module, exports) {
// 20.2.2.20 Math.log1p(x)
@@ -2156,42 +1820,38 @@
};
/***/ },
-/* 103 */
+/* 76 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
- var $export = __webpack_require__(6)
- , $asinh = Math.asinh;
+ var $export = __webpack_require__(3);
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
- // Tor Browser bug: Math.asinh(0) -> -0
- $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
+ $export($export.S, 'Math', {asinh: asinh});
/***/ },
-/* 104 */
+/* 77 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
- var $export = __webpack_require__(6)
- , $atanh = Math.atanh;
+ var $export = __webpack_require__(3);
- // Tor Browser bug: Math.atanh(-0) -> 0
- $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+ $export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ },
-/* 105 */
+/* 78 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(106);
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(79);
$export($export.S, 'Math', {
cbrt: function cbrt(x){
@@ -2200,7 +1860,7 @@
});
/***/ },
-/* 106 */
+/* 79 */
/***/ function(module, exports) {
// 20.2.2.28 Math.sign(x)
@@ -2209,11 +1869,11 @@
};
/***/ },
-/* 107 */
+/* 80 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
clz32: function clz32(x){
@@ -2222,11 +1882,11 @@
});
/***/ },
-/* 108 */
+/* 81 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2236,37 +1896,30 @@
});
/***/ },
-/* 109 */
+/* 82 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
- var $export = __webpack_require__(6)
- , $expm1 = __webpack_require__(110);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
+ $export($export.S, 'Math', {expm1: __webpack_require__(83)});
/***/ },
-/* 110 */
+/* 83 */
/***/ function(module, exports) {
// 20.2.2.14 Math.expm1(x)
- var $expm1 = Math.expm1;
- module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
- ) ? function expm1(x){
+ module.exports = Math.expm1 || function expm1(x){
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
- } : $expm1;
+ };
/***/ },
-/* 111 */
+/* 84 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(106)
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(79)
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
@@ -2292,22 +1945,23 @@
});
/***/ },
-/* 112 */
+/* 85 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
- var sum = 0
- , i = 0
- , aLen = arguments.length
- , larg = 0
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
, arg, div;
- while(i < aLen){
- arg = abs(arguments[i++]);
+ while(i < $$len){
+ arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
@@ -2322,15 +1976,15 @@
});
/***/ },
-/* 113 */
+/* 86 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
@@ -2344,11 +1998,11 @@
});
/***/ },
-/* 114 */
+/* 87 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log10: function log10(x){
@@ -2357,20 +2011,20 @@
});
/***/ },
-/* 115 */
+/* 88 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {log1p: __webpack_require__(102)});
+ $export($export.S, 'Math', {log1p: __webpack_require__(75)});
/***/ },
-/* 116 */
+/* 89 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log2: function log2(x){
@@ -2379,25 +2033,25 @@
});
/***/ },
-/* 117 */
+/* 90 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {sign: __webpack_require__(106)});
+ $export($export.S, 'Math', {sign: __webpack_require__(79)});
/***/ },
-/* 118 */
+/* 91 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(110)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(83)
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
@@ -2408,12 +2062,12 @@
});
/***/ },
-/* 119 */
+/* 92 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(110)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(83)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2425,11 +2079,11 @@
});
/***/ },
-/* 120 */
+/* 93 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
trunc: function trunc(it){
@@ -2438,11 +2092,11 @@
});
/***/ },
-/* 121 */
+/* 94 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIndex = __webpack_require__(37)
+ var $export = __webpack_require__(3)
+ , toIndex = __webpack_require__(26)
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
@@ -2450,12 +2104,13 @@
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
- var res = []
- , aLen = arguments.length
- , i = 0
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
, code;
- while(aLen > i){
- code = +arguments[i++];
+ while($$len > i){
+ code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
@@ -2466,47 +2121,48 @@
});
/***/ },
-/* 122 */
+/* 95 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35);
+ var $export = __webpack_require__(3)
+ , toIObject = __webpack_require__(23)
+ , toLength = __webpack_require__(27);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
- var tpl = toIObject(callSite.raw)
- , len = toLength(tpl.length)
- , aLen = arguments.length
- , res = []
- , i = 0;
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
while(len > i){
res.push(String(tpl[i++]));
- if(i < aLen)res.push(String(arguments[i]));
+ if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
});
/***/ },
-/* 123 */
+/* 96 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.1.3.25 String.prototype.trim()
- __webpack_require__(81)('trim', function($trim){
+ __webpack_require__(63)('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
});
/***/ },
-/* 124 */
+/* 97 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(125)(false);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(98)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
@@ -2515,11 +2171,11 @@
});
/***/ },
-/* 125 */
+/* 98 */
/***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
+ var toInteger = __webpack_require__(25)
+ , defined = __webpack_require__(22);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
@@ -2537,21 +2193,22 @@
};
/***/ },
-/* 126 */
+/* 99 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(27)
+ , context = __webpack_require__(100)
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
- $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
- , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
@@ -2562,12 +2219,12 @@
});
/***/ },
-/* 127 */
+/* 100 */
/***/ function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
- var isRegExp = __webpack_require__(128)
- , defined = __webpack_require__(33);
+ var isRegExp = __webpack_require__(101)
+ , defined = __webpack_require__(22);
module.exports = function(that, searchString, NAME){
if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
@@ -2575,23 +2232,23 @@
};
/***/ },
-/* 128 */
+/* 101 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
- var isObject = __webpack_require__(11)
- , cof = __webpack_require__(32)
- , MATCH = __webpack_require__(23)('match');
+ var isObject = __webpack_require__(16)
+ , cof = __webpack_require__(18)
+ , MATCH = __webpack_require__(31)('match');
module.exports = function(it){
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ },
-/* 129 */
+/* 102 */
/***/ function(module, exports, __webpack_require__) {
- var MATCH = __webpack_require__(23)('match');
+ var MATCH = __webpack_require__(31)('match');
module.exports = function(KEY){
var re = /./;
try {
@@ -2605,16 +2262,16 @@
};
/***/ },
-/* 130 */
+/* 103 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
- var $export = __webpack_require__(6)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , context = __webpack_require__(100)
, INCLUDES = 'includes';
- $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
@@ -2622,32 +2279,50 @@
});
/***/ },
-/* 131 */
+/* 104 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
- repeat: __webpack_require__(85)
+ repeat: __webpack_require__(105)
});
/***/ },
-/* 132 */
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var toInteger = __webpack_require__(25)
+ , defined = __webpack_require__(22);
+
+ module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ };
+
+/***/ },
+/* 106 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(27)
+ , context = __webpack_require__(100)
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
- $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
@@ -2656,14 +2331,14 @@
});
/***/ },
-/* 133 */
+/* 107 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $at = __webpack_require__(125)(true);
+ var $at = __webpack_require__(98)(true);
// 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(134)(String, 'String', function(iterated){
+ __webpack_require__(108)(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
@@ -2678,20 +2353,20 @@
});
/***/ },
-/* 134 */
+/* 108 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(26)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , hide = __webpack_require__(8)
- , has = __webpack_require__(3)
- , Iterators = __webpack_require__(135)
- , $iterCreate = __webpack_require__(136)
- , setToStringTag = __webpack_require__(22)
- , getPrototypeOf = __webpack_require__(57)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var LIBRARY = __webpack_require__(39)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , hide = __webpack_require__(6)
+ , has = __webpack_require__(17)
+ , Iterators = __webpack_require__(109)
+ , $iterCreate = __webpack_require__(110)
+ , setToStringTag = __webpack_require__(35)
+ , getProto = __webpack_require__(2).getProto
+ , ITERATOR = __webpack_require__(31)('iterator')
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
, FF_ITERATOR = '@@iterator'
, KEYS = 'keys'
@@ -2714,24 +2389,20 @@
, proto = Base.prototype
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
, $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
+ , methods, key;
// Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ if($native){
+ var IteratorPrototype = getProto($default.call(new Base));
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // FF fix
+ if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
}
}
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
// Define iterator
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
hide(proto, ITERATOR, $default);
@@ -2741,9 +2412,9 @@
Iterators[TAG] = returnThis;
if(DEFAULT){
methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: !DEF_VALUES ? $default : getMethod('entries')
};
if(FORCED)for(key in methods){
if(!(key in proto))redefine(proto, key, methods[key]);
@@ -2753,253 +2424,63 @@
};
/***/ },
-/* 135 */
+/* 109 */
/***/ function(module, exports) {
module.exports = {};
/***/ },
-/* 136 */
+/* 110 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var create = __webpack_require__(44)
- , descriptor = __webpack_require__(15)
- , setToStringTag = __webpack_require__(22)
+ var $ = __webpack_require__(2)
+ , descriptor = __webpack_require__(7)
+ , setToStringTag = __webpack_require__(35)
, IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; });
+ __webpack_require__(6)(IteratorPrototype, __webpack_require__(31)('iterator'), function(){ return this; });
module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ },
-/* 137 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.2 String.prototype.anchor(name)
- __webpack_require__(138)('anchor', function(createHTML){
- return function anchor(name){
- return createHTML(this, 'a', 'name', name);
- }
- });
-
-/***/ },
-/* 138 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , defined = __webpack_require__(33)
- , quot = /"/g;
- // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
- var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
- return p1 + '>' + S + '</' + tag + '>';
- };
- module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
- };
-
-/***/ },
-/* 139 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.3 String.prototype.big()
- __webpack_require__(138)('big', function(createHTML){
- return function big(){
- return createHTML(this, 'big', '', '');
- }
- });
-
-/***/ },
-/* 140 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.4 String.prototype.blink()
- __webpack_require__(138)('blink', function(createHTML){
- return function blink(){
- return createHTML(this, 'blink', '', '');
- }
- });
-
-/***/ },
-/* 141 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.5 String.prototype.bold()
- __webpack_require__(138)('bold', function(createHTML){
- return function bold(){
- return createHTML(this, 'b', '', '');
- }
- });
-
-/***/ },
-/* 142 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.6 String.prototype.fixed()
- __webpack_require__(138)('fixed', function(createHTML){
- return function fixed(){
- return createHTML(this, 'tt', '', '');
- }
- });
-
-/***/ },
-/* 143 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.7 String.prototype.fontcolor(color)
- __webpack_require__(138)('fontcolor', function(createHTML){
- return function fontcolor(color){
- return createHTML(this, 'font', 'color', color);
- }
- });
-
-/***/ },
-/* 144 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.8 String.prototype.fontsize(size)
- __webpack_require__(138)('fontsize', function(createHTML){
- return function fontsize(size){
- return createHTML(this, 'font', 'size', size);
- }
- });
-
-/***/ },
-/* 145 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.9 String.prototype.italics()
- __webpack_require__(138)('italics', function(createHTML){
- return function italics(){
- return createHTML(this, 'i', '', '');
- }
- });
-
-/***/ },
-/* 146 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.10 String.prototype.link(url)
- __webpack_require__(138)('link', function(createHTML){
- return function link(url){
- return createHTML(this, 'a', 'href', url);
- }
- });
-
-/***/ },
-/* 147 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.11 String.prototype.small()
- __webpack_require__(138)('small', function(createHTML){
- return function small(){
- return createHTML(this, 'small', '', '');
- }
- });
-
-/***/ },
-/* 148 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.12 String.prototype.strike()
- __webpack_require__(138)('strike', function(createHTML){
- return function strike(){
- return createHTML(this, 'strike', '', '');
- }
- });
-
-/***/ },
-/* 149 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.13 String.prototype.sub()
- __webpack_require__(138)('sub', function(createHTML){
- return function sub(){
- return createHTML(this, 'sub', '', '');
- }
- });
-
-/***/ },
-/* 150 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.14 String.prototype.sup()
- __webpack_require__(138)('sup', function(createHTML){
- return function sup(){
- return createHTML(this, 'sup', '', '');
- }
- });
-
-/***/ },
-/* 151 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Array', {isArray: __webpack_require__(43)});
-
-/***/ },
-/* 152 */
+/* 111 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var ctx = __webpack_require__(18)
- , $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , call = __webpack_require__(153)
- , isArrayIter = __webpack_require__(154)
- , toLength = __webpack_require__(35)
- , createProperty = __webpack_require__(155)
- , getIterFn = __webpack_require__(156);
-
- $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', {
+ var ctx = __webpack_require__(12)
+ , $export = __webpack_require__(3)
+ , toObject = __webpack_require__(21)
+ , call = __webpack_require__(112)
+ , isArrayIter = __webpack_require__(113)
+ , toLength = __webpack_require__(27)
+ , getIterFn = __webpack_require__(114);
+ $export($export.S + $export.F * !__webpack_require__(115)(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
@@ -3009,11 +2490,11 @@
/***/ },
-/* 153 */
+/* 112 */
/***/ function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
- var anObject = __webpack_require__(10);
+ var anObject = __webpack_require__(20);
module.exports = function(iterator, fn, value, entries){
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
@@ -3026,12 +2507,12 @@
};
/***/ },
-/* 154 */
+/* 113 */
/***/ function(module, exports, __webpack_require__) {
// check on default Array iterator
- var Iterators = __webpack_require__(135)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var Iterators = __webpack_require__(109)
+ , ITERATOR = __webpack_require__(31)('iterator')
, ArrayProto = Array.prototype;
module.exports = function(it){
@@ -3039,36 +2520,23 @@
};
/***/ },
-/* 155 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $defineProperty = __webpack_require__(9)
- , createDesc = __webpack_require__(15);
-
- module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
-
-/***/ },
-/* 156 */
+/* 114 */
/***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(73)
- , ITERATOR = __webpack_require__(23)('iterator')
- , Iterators = __webpack_require__(135);
- module.exports = __webpack_require__(7).getIteratorMethod = function(it){
+ var classof = __webpack_require__(47)
+ , ITERATOR = __webpack_require__(31)('iterator')
+ , Iterators = __webpack_require__(109);
+ module.exports = __webpack_require__(5).getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ },
-/* 157 */
+/* 115 */
/***/ function(module, exports, __webpack_require__) {
- var ITERATOR = __webpack_require__(23)('iterator')
+ var ITERATOR = __webpack_require__(31)('iterator')
, SAFE_CLOSING = false;
try {
@@ -3091,413 +2559,140 @@
};
/***/ },
-/* 158 */
+/* 116 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , createProperty = __webpack_require__(155);
+ var $export = __webpack_require__(3);
// WebKit Array.of isn't generic
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
- , aLen = arguments.length
- , result = new (typeof this == 'function' ? this : Array)(aLen);
- while(aLen > index)createProperty(result, index, arguments[index++]);
- result.length = aLen;
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
return result;
}
});
/***/ },
-/* 159 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 22.1.3.13 Array.prototype.join(separator)
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , arrayJoin = [].join;
-
- // fallback for not array-like strings
- $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', {
- join: function join(separator){
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
- });
-
-/***/ },
-/* 160 */
-/***/ function(module, exports, __webpack_require__) {
-
- var fails = __webpack_require__(5);
-
- module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
- };
-
-/***/ },
-/* 161 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , html = __webpack_require__(46)
- , cof = __webpack_require__(32)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , arraySlice = [].slice;
-
- // fallback for not array-like ES3 strings and DOM objects
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- if(html)arraySlice.call(html);
- }), 'Array', {
- slice: function slice(begin, end){
- var len = toLength(this.length)
- , klass = cof(this);
- end = end === undefined ? len : end;
- if(klass == 'Array')return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len)
- , upTo = toIndex(end, len)
- , size = toLength(upTo - start)
- , cloned = Array(size)
- , i = 0;
- for(; i < size; i++)cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
- });
-
-/***/ },
-/* 162 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(19)
- , toObject = __webpack_require__(56)
- , fails = __webpack_require__(5)
- , $sort = [].sort
- , test = [1, 2, 3];
-
- $export($export.P + $export.F * (fails(function(){
- // IE8-
- test.sort(undefined);
- }) || !fails(function(){
- // V8 bug
- test.sort(null);
- // Old WebKit
- }) || !__webpack_require__(160)($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn){
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
- });
-
-/***/ },
-/* 163 */
+/* 117 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $forEach = __webpack_require__(164)(0)
- , STRICT = __webpack_require__(160)([].forEach, true);
+ var addToUnscopables = __webpack_require__(118)
+ , step = __webpack_require__(119)
+ , Iterators = __webpack_require__(109)
+ , toIObject = __webpack_require__(23);
- $export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */){
- return $forEach(this, callbackfn, arguments[1]);
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(108)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
}
- });
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
-/***/ },
-/* 164 */
-/***/ function(module, exports, __webpack_require__) {
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
- // 0 -> Array#forEach
- // 1 -> Array#map
- // 2 -> Array#filter
- // 3 -> Array#some
- // 4 -> Array#every
- // 5 -> Array#find
- // 6 -> Array#findIndex
- var ctx = __webpack_require__(18)
- , IObject = __webpack_require__(31)
- , toObject = __webpack_require__(56)
- , toLength = __webpack_require__(35)
- , asc = __webpack_require__(165);
- module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
- };
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
/***/ },
-/* 165 */
+/* 118 */
/***/ function(module, exports, __webpack_require__) {
- // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
- var speciesConstructor = __webpack_require__(166);
-
- module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
+ // 22.1.3.31 Array.prototype[@@unscopables]
+ var UNSCOPABLES = __webpack_require__(31)('unscopables')
+ , ArrayProto = Array.prototype;
+ if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(6)(ArrayProto, UNSCOPABLES, {});
+ module.exports = function(key){
+ ArrayProto[UNSCOPABLES][key] = true;
};
/***/ },
-/* 166 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11)
- , isArray = __webpack_require__(43)
- , SPECIES = __webpack_require__(23)('species');
+/* 119 */
+/***/ function(module, exports) {
- module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
+ module.exports = function(done, value){
+ return {value: value, done: !!done};
};
/***/ },
-/* 167 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $map = __webpack_require__(164)(1);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */){
- return $map(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 168 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $filter = __webpack_require__(164)(2);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */){
- return $filter(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 169 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $some = __webpack_require__(164)(3);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */){
- return $some(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 170 */
+/* 120 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var $export = __webpack_require__(6)
- , $every = __webpack_require__(164)(4);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */){
- return $every(this, callbackfn, arguments[1]);
- }
- });
+ __webpack_require__(121)('Array');
/***/ },
-/* 171 */
+/* 121 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(172);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
- });
-
-/***/ },
-/* 172 */
-/***/ function(module, exports, __webpack_require__) {
+ var global = __webpack_require__(4)
+ , $ = __webpack_require__(2)
+ , DESCRIPTORS = __webpack_require__(8)
+ , SPECIES = __webpack_require__(31)('species');
- var aFunction = __webpack_require__(19)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , toLength = __webpack_require__(35);
-
- module.exports = function(that, callbackfn, aLen, memo, isRight){
- aFunction(callbackfn);
- var O = toObject(that)
- , self = IObject(O)
- , length = toLength(O.length)
- , index = isRight ? length - 1 : 0
- , i = isRight ? -1 : 1;
- if(aLen < 2)for(;;){
- if(index in self){
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if(isRight ? index < 0 : length <= index){
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
+ module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
};
/***/ },
-/* 173 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(172);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
- });
-
-/***/ },
-/* 174 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $indexOf = __webpack_require__(34)(false)
- , $native = [].indexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
- });
-
-/***/ },
-/* 175 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , $native = [].lastIndexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
- // convert -0 to +0
- if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
- var O = toIObject(this)
- , length = toLength(O.length)
- , index = length - 1;
- if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
- if(index < 0)index = length + index;
- for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
- return -1;
- }
- });
-
-/***/ },
-/* 176 */
+/* 122 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {copyWithin: __webpack_require__(177)});
+ $export($export.P, 'Array', {copyWithin: __webpack_require__(123)});
- __webpack_require__(178)('copyWithin');
+ __webpack_require__(118)('copyWithin');
/***/ },
-/* 177 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
+ var toObject = __webpack_require__(21)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27);
module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
var O = toObject(this)
, len = toLength(O.length)
, to = toIndex(target, len)
, from = toIndex(start, len)
- , end = arguments.length > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , end = $$.length > 2 ? $$[2] : undefined
, count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
, inc = 1;
if(from < to && to < from + count){
@@ -3514,56 +2709,45 @@
};
/***/ },
-/* 178 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 22.1.3.31 Array.prototype[@@unscopables]
- var UNSCOPABLES = __webpack_require__(23)('unscopables')
- , ArrayProto = Array.prototype;
- if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {});
- module.exports = function(key){
- ArrayProto[UNSCOPABLES][key] = true;
- };
-
-/***/ },
-/* 179 */
+/* 124 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {fill: __webpack_require__(180)});
+ $export($export.P, 'Array', {fill: __webpack_require__(125)});
- __webpack_require__(178)('fill');
+ __webpack_require__(118)('fill');
/***/ },
-/* 180 */
+/* 125 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
- module.exports = function fill(value /*, start = 0, end = @length */){
+ var toObject = __webpack_require__(21)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27);
+ module.exports = [].fill || function fill(value /*, start = 0, end = @length */){
var O = toObject(this)
, length = toLength(O.length)
- , aLen = arguments.length
- , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
- , end = aLen > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , index = toIndex($$len > 1 ? $$[1] : undefined, length)
+ , end = $$len > 2 ? $$[2] : undefined
, endPos = end === undefined ? length : toIndex(end, length);
while(endPos > index)O[index++] = value;
return O;
};
/***/ },
-/* 181 */
+/* 126 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(164)(5)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(28)(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
@@ -3573,16 +2757,16 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)(KEY);
+ __webpack_require__(118)(KEY);
/***/ },
-/* 182 */
+/* 127 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(164)(6)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(28)(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
@@ -3592,134 +2776,58 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)(KEY);
-
-/***/ },
-/* 183 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var addToUnscopables = __webpack_require__(178)
- , step = __webpack_require__(184)
- , Iterators = __webpack_require__(135)
- , toIObject = __webpack_require__(30);
-
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
- this._t = undefined;
- return step(1);
- }
- if(kind == 'keys' )return step(0, index);
- if(kind == 'values')return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
-
-/***/ },
-/* 184 */
-/***/ function(module, exports) {
-
- module.exports = function(done, value){
- return {value: value, done: !!done};
- };
+ __webpack_require__(118)(KEY);
/***/ },
-/* 185 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(186)('Array');
-
-/***/ },
-/* 186 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var global = __webpack_require__(2)
- , dP = __webpack_require__(9)
- , DESCRIPTORS = __webpack_require__(4)
- , SPECIES = __webpack_require__(23)('species');
-
- module.exports = function(KEY){
- var C = global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
- };
-
-/***/ },
-/* 187 */
+/* 128 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , inheritIfRequired = __webpack_require__(80)
- , dP = __webpack_require__(9).f
- , gOPN = __webpack_require__(48).f
- , isRegExp = __webpack_require__(128)
- , $flags = __webpack_require__(188)
- , $RegExp = global.RegExp
- , Base = $RegExp
- , proto = $RegExp.prototype
- , re1 = /a/g
- , re2 = /a/g
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , isRegExp = __webpack_require__(101)
+ , $flags = __webpack_require__(129)
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
// "new" creates a new object, old webkit buggy here
- , CORRECT_NEW = new $RegExp(re1) !== re1;
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
- if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){
- re2[__webpack_require__(23)('match')] = false;
+ if(__webpack_require__(8) && (!CORRECT_NEW || __webpack_require__(9)(function(){
+ re2[__webpack_require__(31)('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))){
$RegExp = function RegExp(p, f){
- var tiRE = this instanceof $RegExp
- , piRE = isRegExp(p)
+ var piRE = isRegExp(p)
, fiU = f === undefined;
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
- : inheritIfRequired(CORRECT_NEW
+ return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p
+ : CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
- , tiRE ? this : proto, $RegExp);
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);
};
- var proxy = function(key){
- key in $RegExp || dP($RegExp, key, {
+ $.each.call($.getNames(Base), function(key){
+ key in $RegExp || $.setDesc($RegExp, key, {
configurable: true,
get: function(){ return Base[key]; },
set: function(it){ Base[key] = it; }
});
- };
- for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ });
proto.constructor = $RegExp;
$RegExp.prototype = proto;
- __webpack_require__(16)(global, 'RegExp', $RegExp);
+ __webpack_require__(10)(global, 'RegExp', $RegExp);
}
- __webpack_require__(186)('RegExp');
+ __webpack_require__(121)('RegExp');
/***/ },
-/* 188 */
+/* 129 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.2.5.3 get RegExp.prototype.flags
- var anObject = __webpack_require__(10);
+ var anObject = __webpack_require__(20);
module.exports = function(){
var that = anObject(this)
, result = '';
@@ -3732,259 +2840,198 @@
};
/***/ },
-/* 189 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- __webpack_require__(190);
- var anObject = __webpack_require__(10)
- , $flags = __webpack_require__(188)
- , DESCRIPTORS = __webpack_require__(4)
- , TO_STRING = 'toString'
- , $toString = /./[TO_STRING];
-
- var define = function(fn){
- __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true);
- };
-
- // 21.2.5.14 RegExp.prototype.toString()
- if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
- define(function toString(){
- var R = anObject(this);
- return '/'.concat(R.source, '/',
- 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
- });
- // FF44- RegExp#toString has a wrong name
- } else if($toString.name != TO_STRING){
- define(function toString(){
- return $toString.call(this);
- });
- }
-
-/***/ },
-/* 190 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
- if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', {
+ var $ = __webpack_require__(2);
+ if(__webpack_require__(8) && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {
configurable: true,
- get: __webpack_require__(188)
+ get: __webpack_require__(129)
});
/***/ },
-/* 191 */
+/* 131 */
/***/ function(module, exports, __webpack_require__) {
// @@match logic
- __webpack_require__(192)('match', 1, function(defined, MATCH, $match){
+ __webpack_require__(132)('match', 1, function(defined, MATCH){
// 21.1.3.11 String.prototype.match(regexp)
- return [function match(regexp){
+ return function match(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- }, $match];
+ };
});
/***/ },
-/* 192 */
+/* 132 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var hide = __webpack_require__(8)
- , redefine = __webpack_require__(16)
- , fails = __webpack_require__(5)
- , defined = __webpack_require__(33)
- , wks = __webpack_require__(23);
+ var hide = __webpack_require__(6)
+ , redefine = __webpack_require__(10)
+ , fails = __webpack_require__(9)
+ , defined = __webpack_require__(22)
+ , wks = __webpack_require__(31);
module.exports = function(KEY, length, exec){
var SYMBOL = wks(KEY)
- , fns = exec(defined, SYMBOL, ''[KEY])
- , strfn = fns[0]
- , rxfn = fns[1];
+ , original = ''[KEY];
if(fails(function(){
var O = {};
O[SYMBOL] = function(){ return 7; };
return ''[KEY](O) != 7;
})){
- redefine(String.prototype, KEY, strfn);
+ redefine(String.prototype, KEY, exec(defined, SYMBOL, original));
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function(string, arg){ return rxfn.call(string, this, arg); }
+ ? function(string, arg){ return original.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
- : function(string){ return rxfn.call(string, this); }
+ : function(string){ return original.call(string, this); }
);
}
};
/***/ },
-/* 193 */
+/* 133 */
/***/ function(module, exports, __webpack_require__) {
// @@replace logic
- __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){
+ __webpack_require__(132)('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
- return [function replace(searchValue, replaceValue){
+ return function replace(searchValue, replaceValue){
'use strict';
var O = defined(this)
, fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
- }, $replace];
+ };
});
/***/ },
-/* 194 */
+/* 134 */
/***/ function(module, exports, __webpack_require__) {
// @@search logic
- __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){
+ __webpack_require__(132)('search', 1, function(defined, SEARCH){
// 21.1.3.15 String.prototype.search(regexp)
- return [function search(regexp){
+ return function search(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
- }, $search];
+ };
});
/***/ },
-/* 195 */
+/* 135 */
/***/ function(module, exports, __webpack_require__) {
// @@split logic
- __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){
- 'use strict';
- var isRegExp = __webpack_require__(128)
- , _split = $split
- , $push = [].push
- , $SPLIT = 'split'
- , LENGTH = 'length'
- , LAST_INDEX = 'lastIndex';
- if(
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
- ''[$SPLIT](/.?/)[LENGTH]
- ){
- var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
- // based on es5-shim implementation, need to rework it
- $split = function(separator, limit){
- var string = String(this);
- if(separator === undefined && limit === 0)return [];
- // If `separator` is not a regex, use native split
- if(!isRegExp(separator))return _split.call(string, separator, limit);
- var output = [];
- var flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.unicode ? 'u' : '') +
- (separator.sticky ? 'y' : '');
- var lastLastIndex = 0;
- var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
- // Make `global` and avoid `lastIndex` issues by working with a copy
- var separatorCopy = new RegExp(separator.source, flags + 'g');
- var separator2, match, lastIndex, lastLength, i;
- // Doesn't need flags gy, but they don't hurt
- if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
- while(match = separatorCopy.exec(string)){
- // `separatorCopy.lastIndex` is not reliable cross-browser
- lastIndex = match.index + match[0][LENGTH];
- if(lastIndex > lastLastIndex){
- output.push(string.slice(lastLastIndex, match.index));
- // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
- if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
- for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
- });
- if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
- lastLength = match[0][LENGTH];
- lastLastIndex = lastIndex;
- if(output[LENGTH] >= splitLimit)break;
- }
- if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
- }
- if(lastLastIndex === string[LENGTH]){
- if(lastLength || !separatorCopy.test(''))output.push('');
- } else output.push(string.slice(lastLastIndex));
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
- };
- // Chakra, V8
- } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
- $split = function(separator, limit){
- return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
- };
- }
+ __webpack_require__(132)('split', 2, function(defined, SPLIT, $split){
// 21.1.3.17 String.prototype.split(separator, limit)
- return [function split(separator, limit){
+ return function split(separator, limit){
+ 'use strict';
var O = defined(this)
, fn = separator == undefined ? undefined : separator[SPLIT];
- return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
- }, $split];
+ return fn !== undefined
+ ? fn.call(separator, O, limit)
+ : $split.call(String(O), separator, limit);
+ };
});
/***/ },
-/* 196 */
+/* 136 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , ctx = __webpack_require__(18)
- , classof = __webpack_require__(73)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(11)
- , aFunction = __webpack_require__(19)
- , anInstance = __webpack_require__(197)
- , forOf = __webpack_require__(198)
- , speciesConstructor = __webpack_require__(199)
- , task = __webpack_require__(200).set
- , microtask = __webpack_require__(201)()
- , PROMISE = 'Promise'
- , TypeError = global.TypeError
- , process = global.process
- , $Promise = global[PROMISE]
- , process = global.process
- , isNode = classof(process) == 'process'
- , empty = function(){ /* empty */ }
- , Internal, GenericPromiseCapability, Wrapper;
+ var $ = __webpack_require__(2)
+ , LIBRARY = __webpack_require__(39)
+ , global = __webpack_require__(4)
+ , ctx = __webpack_require__(12)
+ , classof = __webpack_require__(47)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , strictNew = __webpack_require__(137)
+ , forOf = __webpack_require__(138)
+ , setProto = __webpack_require__(45).set
+ , same = __webpack_require__(43)
+ , SPECIES = __webpack_require__(31)('species')
+ , speciesConstructor = __webpack_require__(139)
+ , asap = __webpack_require__(140)
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , empty = function(){ /* empty */ }
+ , Wrapper;
+
+ var testResolve = function(sub){
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
+ };
- var USE_NATIVE = !!function(){
+ var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1)
- , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch(e){ /* empty */ }
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && __webpack_require__(8)){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
}();
// helpers
var sameConstructor = function(a, b){
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+ };
+ var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
- var newPromiseCapability = function(C){
- return sameConstructor($Promise, C)
- ? new PromiseCapability(C)
- : new GenericPromiseCapability(C);
- };
- var PromiseCapability = GenericPromiseCapability = function(C){
+ var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
};
var perform = function(exec){
try {
@@ -3993,32 +3040,23 @@
return {error: e};
}
};
- var notify = function(promise, isReject){
- if(promise._n)return;
- promise._n = true;
- var chain = promise._c;
- microtask(function(){
- var value = promise._v
- , ok = promise._s == 1
+ var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
- , domain = reaction.domain
, result, then;
try {
if(handler){
- if(!ok){
- if(promise._h == 2)onHandleUnhandled(promise);
- promise._h = 1;
- }
- if(handler === true)result = value;
- else {
- if(domain)domain.enter();
- result = handler(value);
- if(domain)domain.exit();
- }
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
@@ -4030,17 +3068,12 @@
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if(isReject && !promise._h)onUnhandled(promise);
- });
- };
- var onUnhandled = function(promise){
- task.call(global, function(){
- var value = promise._v
- , abrupt, handler, console;
- if(isUnhandled(promise)){
- abrupt = perform(function(){
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
@@ -4048,54 +3081,42 @@
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if(abrupt)throw abrupt.error;
+ } record.a = undefined;
+ }, 1);
});
};
var isUnhandled = function(promise){
- if(promise._h == 1)return false;
- var chain = promise._a || promise._c
- , i = 0
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
, reaction;
+ if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
- var onHandleUnhandled = function(promise){
- task.call(global, function(){
- var handler;
- if(isNode){
- process.emit('rejectionHandled', promise);
- } else if(handler = global.onrejectionhandled){
- handler({promise: promise, reason: promise._v});
- }
- });
- };
var $reject = function(value){
- var promise = this;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if(!promise._a)promise._a = promise._c.slice();
- notify(promise, true);
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
};
var $resolve = function(value){
- var promise = this
+ var record = this
, then;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
try {
- if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
- microtask(function(){
- var wrapper = {_w: promise, _d: false}; // wrap
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
@@ -4103,122 +3124,114 @@
}
});
} else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
}
} catch(e){
- $reject.call({_w: promise, _d: false}, e); // wrap
+ $reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor){
- anInstance(this, $Promise, PROMISE, '_h');
+ P = function Promise(executor){
aFunction(executor);
- Internal.call(this);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
- $reject.call(this, err);
+ $reject.call(record, err);
}
};
- Internal = function Promise(executor){
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = __webpack_require__(202)($Promise.prototype, {
+ __webpack_require__(142)(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if(this._a)this._a.push(reaction);
- if(this._s)notify(this, false);
- return reaction.promise;
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- PromiseCapability = function(){
- var promise = new Internal;
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
}
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
- __webpack_require__(22)($Promise, PROMISE);
- __webpack_require__(186)(PROMISE);
- Wrapper = __webpack_require__(7)[PROMISE];
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+ __webpack_require__(35)(P, PROMISE);
+ __webpack_require__(121)(PROMISE);
+ Wrapper = __webpack_require__(5)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
- var capability = newPromiseCapability(this)
+ var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
- $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ $export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
- var capability = newPromiseCapability(this)
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
- $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){
- $Promise.all(iter)['catch'](empty);
+ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(115)(function(iter){
+ P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, resolve = capability.resolve
- , reject = capability.reject;
+ , reject = capability.reject
+ , values = [];
var abrupt = perform(function(){
- var values = []
- , index = 0
- , remaining = 1;
- forOf(iterable, false, function(promise){
- var $index = index++
- , alreadyCalled = false;
- values.push(undefined);
- remaining++;
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
}, reject);
});
- --remaining || resolve(values);
+ else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
@@ -4231,67 +3244,129 @@
});
/***/ },
-/* 197 */
+/* 137 */
/***/ function(module, exports) {
- module.exports = function(it, Constructor, name, forbiddenField){
- if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
- throw TypeError(name + ': incorrect invocation!');
- } return it;
+ module.exports = function(it, Constructor, name){
+ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
+ return it;
};
/***/ },
-/* 198 */
+/* 138 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(18)
- , call = __webpack_require__(153)
- , isArrayIter = __webpack_require__(154)
- , anObject = __webpack_require__(10)
- , toLength = __webpack_require__(35)
- , getIterFn = __webpack_require__(156)
- , BREAK = {}
- , RETURN = {};
- var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
- var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ var ctx = __webpack_require__(12)
+ , call = __webpack_require__(112)
+ , isArrayIter = __webpack_require__(113)
+ , anObject = __webpack_require__(20)
+ , toLength = __webpack_require__(27)
+ , getIterFn = __webpack_require__(114);
+ module.exports = function(iterable, entries, fn, that){
+ var iterFn = getIterFn(iterable)
, f = ctx(fn, that, entries ? 2 : 1)
, index = 0
- , length, step, iterator, result;
+ , length, step, iterator;
if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if(result === BREAK || result === RETURN)return result;
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
} else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
- result = call(iterator, f, step.value, entries);
- if(result === BREAK || result === RETURN)return result;
+ call(iterator, f, step.value, entries);
}
};
- exports.BREAK = BREAK;
- exports.RETURN = RETURN;
/***/ },
-/* 199 */
+/* 139 */
/***/ function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
- var anObject = __webpack_require__(10)
- , aFunction = __webpack_require__(19)
- , SPECIES = __webpack_require__(23)('species');
+ var anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , SPECIES = __webpack_require__(31)('species');
module.exports = function(O, D){
var C = anObject(O).constructor, S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ },
-/* 200 */
+/* 140 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , macrotask = __webpack_require__(141).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(18)(process) == 'process'
+ , head, last, notify;
+
+ var flush = function(){
+ var parent, domain, fn;
+ if(isNode && (parent = process.domain)){
+ process.domain = null;
+ parent.exit();
+ }
+ while(head){
+ domain = head.domain;
+ fn = head.fn;
+ if(domain)domain.enter();
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ if(domain)domain.exit();
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = 1
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = -toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ module.exports = function asap(fn){
+ var task = {fn: fn, next: undefined, domain: isNode && process.domain};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+
+/***/ },
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(18)
- , invoke = __webpack_require__(76)
- , html = __webpack_require__(46)
- , cel = __webpack_require__(13)
- , global = __webpack_require__(2)
+ var ctx = __webpack_require__(12)
+ , invoke = __webpack_require__(19)
+ , html = __webpack_require__(14)
+ , cel = __webpack_require__(15)
+ , global = __webpack_require__(4)
, process = global.process
, setTask = global.setImmediate
, clearTask = global.clearImmediate
@@ -4308,7 +3383,7 @@
fn();
}
};
- var listener = function(event){
+ var listner = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -4326,7 +3401,7 @@
delete queue[id];
};
// Node.js 0.8-
- if(__webpack_require__(32)(process) == 'process'){
+ if(__webpack_require__(18)(process) == 'process'){
defer = function(id){
process.nextTick(ctx(run, id, 1));
};
@@ -4334,7 +3409,7 @@
} else if(MessageChannel){
channel = new MessageChannel;
port = channel.port2;
- channel.port1.onmessage = listener;
+ channel.port1.onmessage = listner;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
@@ -4342,7 +3417,7 @@
defer = function(id){
global.postMessage(id + '', '*');
};
- global.addEventListener('message', listener, false);
+ global.addEventListener('message', listner, false);
// IE8-
} else if(ONREADYSTATECHANGE in cel('script')){
defer = function(id){
@@ -4364,97 +3439,24 @@
};
/***/ },
-/* 201 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , macrotask = __webpack_require__(200).set
- , Observer = global.MutationObserver || global.WebKitMutationObserver
- , process = global.process
- , Promise = global.Promise
- , isNode = __webpack_require__(32)(process) == 'process';
-
- module.exports = function(){
- var head, last, notify;
-
- var flush = function(){
- var parent, fn;
- if(isNode && (parent = process.domain))parent.exit();
- while(head){
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch(e){
- if(head)notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if(parent)parent.enter();
- };
-
- // Node.js
- if(isNode){
- notify = function(){
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if(Observer){
- var toggle = true
- , node = document.createTextNode('');
- new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
- notify = function(){
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if(Promise && Promise.resolve){
- var promise = Promise.resolve();
- notify = function(){
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function(){
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function(fn){
- var task = {fn: fn, next: undefined};
- if(last)last.next = task;
- if(!head){
- head = task;
- notify();
- } last = task;
- };
- };
-
-/***/ },
-/* 202 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
- var redefine = __webpack_require__(16);
- module.exports = function(target, src, safe){
- for(var key in src)redefine(target, key, src[key], safe);
+ var redefine = __webpack_require__(10);
+ module.exports = function(target, src){
+ for(var key in src)redefine(target, key, src[key]);
return target;
};
/***/ },
-/* 203 */
+/* 143 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(204);
+ var strong = __webpack_require__(144);
// 23.1 Map Objects
- module.exports = __webpack_require__(205)('Map', function(get){
+ __webpack_require__(145)('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
@@ -4469,23 +3471,41 @@
}, strong, true);
/***/ },
-/* 204 */
+/* 144 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var dP = __webpack_require__(9).f
- , create = __webpack_require__(44)
- , redefineAll = __webpack_require__(202)
- , ctx = __webpack_require__(18)
- , anInstance = __webpack_require__(197)
- , defined = __webpack_require__(33)
- , forOf = __webpack_require__(198)
- , $iterDefine = __webpack_require__(134)
- , step = __webpack_require__(184)
- , setSpecies = __webpack_require__(186)
- , DESCRIPTORS = __webpack_require__(4)
- , fastKey = __webpack_require__(20).fastKey
- , SIZE = DESCRIPTORS ? '_s' : 'size';
+ var $ = __webpack_require__(2)
+ , hide = __webpack_require__(6)
+ , redefineAll = __webpack_require__(142)
+ , ctx = __webpack_require__(12)
+ , strictNew = __webpack_require__(137)
+ , defined = __webpack_require__(22)
+ , forOf = __webpack_require__(138)
+ , $iterDefine = __webpack_require__(108)
+ , step = __webpack_require__(119)
+ , ID = __webpack_require__(11)('id')
+ , $has = __webpack_require__(17)
+ , isObject = __webpack_require__(16)
+ , setSpecies = __webpack_require__(121)
+ , DESCRIPTORS = __webpack_require__(8)
+ , isExtensible = Object.isExtensible || isObject
+ , SIZE = DESCRIPTORS ? '_s' : 'size'
+ , id = 0;
+
+ var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!$has(it, ID)){
+ // can't set id to frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add id
+ if(!create)return 'E';
+ // add missing object id
+ hide(it, ID, ++id);
+ // return object id with prefix
+ } return 'O' + it[ID];
+ };
var getEntry = function(that, key){
// fast case
@@ -4500,11 +3520,11 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
+ strictNew(that, C, NAME);
+ that._i = $.create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4539,7 +3559,6 @@
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /*, that = undefined */){
- anInstance(this, C, 'forEach');
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
, entry;
while(entry = entry ? entry.n : this._f){
@@ -4554,7 +3573,7 @@
return !!getEntry(this, key);
}
});
- if(DESCRIPTORS)dP(C.prototype, 'size', {
+ if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {
get: function(){
return defined(this[SIZE]);
}
@@ -4616,22 +3635,20 @@
};
/***/ },
-/* 205 */
+/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , redefineAll = __webpack_require__(202)
- , meta = __webpack_require__(20)
- , forOf = __webpack_require__(198)
- , anInstance = __webpack_require__(197)
- , isObject = __webpack_require__(11)
- , fails = __webpack_require__(5)
- , $iterDetect = __webpack_require__(157)
- , setToStringTag = __webpack_require__(22)
- , inheritIfRequired = __webpack_require__(80);
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , redefineAll = __webpack_require__(142)
+ , forOf = __webpack_require__(138)
+ , strictNew = __webpack_require__(137)
+ , isObject = __webpack_require__(16)
+ , fails = __webpack_require__(9)
+ , $iterDetect = __webpack_require__(115)
+ , setToStringTag = __webpack_require__(35);
module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var Base = global[NAME]
@@ -4658,7 +3675,6 @@
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
- meta.NEED = true;
} else {
var instance = new C
// early implementations not supports chaining
@@ -4668,23 +3684,20 @@
// most early implementations doesn't supports iterables, most modern - not close it correctly
, ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
// for early implementations -0 and +0 not the same
- , BUGGY_ZERO = !IS_WEAK && fails(function(){
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new C()
- , index = 5;
- while(index--)$instance[ADDER](index, index);
- return !$instance.has(-0);
- });
+ , BUGGY_ZERO;
if(!ACCEPT_ITERABLES){
C = wrapper(function(target, iterable){
- anInstance(target, C, NAME);
- var that = inheritIfRequired(new Base, target, C);
+ strictNew(target, C, NAME);
+ var that = new Base;
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
return that;
});
C.prototype = proto;
proto.constructor = C;
}
+ IS_WEAK || instance.forEach(function(val, key){
+ BUGGY_ZERO = 1 / key === -Infinity;
+ });
if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
fixMethod('delete');
fixMethod('has');
@@ -4706,14 +3719,14 @@
};
/***/ },
-/* 206 */
+/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(204);
+ var strong = __webpack_require__(144);
// 23.2 Set Objects
- module.exports = __webpack_require__(205)('Set', function(get){
+ __webpack_require__(145)('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
@@ -4723,59 +3736,46 @@
}, strong);
/***/ },
-/* 207 */
+/* 147 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var each = __webpack_require__(164)(0)
- , redefine = __webpack_require__(16)
- , meta = __webpack_require__(20)
- , assign = __webpack_require__(67)
- , weak = __webpack_require__(208)
- , isObject = __webpack_require__(11)
- , getWeak = meta.getWeak
- , isExtensible = Object.isExtensible
- , uncaughtFrozenStore = weak.ufstore
- , tmp = {}
- , InternalMap;
-
- var wrapper = function(get){
- return function WeakMap(){
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
- };
+ var $ = __webpack_require__(2)
+ , redefine = __webpack_require__(10)
+ , weak = __webpack_require__(148)
+ , isObject = __webpack_require__(16)
+ , has = __webpack_require__(17)
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
- var methods = {
+ // 23.3 WeakMap Objects
+ var $WeakMap = __webpack_require__(145)('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).get(key);
- return data ? data[this._i] : undefined;
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
- };
-
- // 23.3 WeakMap Objects
- var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true);
+ }, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
- InternalMap = weak.getConstructor(wrapper);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function(key){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
- // store frozen objects on internal weakmap shim
+ // store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
- if(!this._f)this._f = new InternalMap;
- var result = this._f[key](a, b);
+ var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
@@ -4784,44 +3784,46 @@
}
/***/ },
-/* 208 */
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var redefineAll = __webpack_require__(202)
- , getWeak = __webpack_require__(20).getWeak
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11)
- , anInstance = __webpack_require__(197)
- , forOf = __webpack_require__(198)
- , createArrayMethod = __webpack_require__(164)
- , $has = __webpack_require__(3)
+ var hide = __webpack_require__(6)
+ , redefineAll = __webpack_require__(142)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16)
+ , strictNew = __webpack_require__(137)
+ , forOf = __webpack_require__(138)
+ , createArrayMethod = __webpack_require__(28)
+ , $has = __webpack_require__(17)
+ , WEAK = __webpack_require__(11)('weak')
+ , isExtensible = Object.isExtensible || isObject
, arrayFind = createArrayMethod(5)
, arrayFindIndex = createArrayMethod(6)
, id = 0;
- // fallback for uncaught frozen keys
- var uncaughtFrozenStore = function(that){
- return that._l || (that._l = new UncaughtFrozenStore);
+ // fallback for frozen keys
+ var frozenStore = function(that){
+ return that._l || (that._l = new FrozenStore);
};
- var UncaughtFrozenStore = function(){
+ var FrozenStore = function(){
this.a = [];
};
- var findUncaughtFrozen = function(store, key){
+ var findFrozen = function(store, key){
return arrayFind(store.a, function(it){
return it[0] === key;
});
};
- UncaughtFrozenStore.prototype = {
+ FrozenStore.prototype = {
get: function(key){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)return entry[1];
},
has: function(key){
- return !!findUncaughtFrozen(this, key);
+ return !!findFrozen(this, key);
},
set: function(key, value){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)entry[1] = value;
else this.a.push([key, value]);
},
@@ -4837,9 +3839,9 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
+ strictNew(that, C, NAME);
that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
+ that._l = undefined; // leak store for frozen objects
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4847,39 +3849,40 @@
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this)['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
+ if(!isExtensible(key))return frozenStore(this)['delete'](key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).has(key);
- return data && $has(data, this._i);
+ if(!isExtensible(key))return frozenStore(this).has(key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i);
}
});
return C;
},
def: function(that, key, value){
- var data = getWeak(anObject(key), true);
- if(data === true)uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
+ if(!isExtensible(anObject(key))){
+ frozenStore(that).set(key, value);
+ } else {
+ $has(key, WEAK) || hide(key, WEAK, {});
+ key[WEAK][that._i] = value;
+ } return that;
},
- ufstore: uncaughtFrozenStore
+ frozenStore: frozenStore,
+ WEAK: WEAK
};
/***/ },
-/* 209 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var weak = __webpack_require__(208);
+ var weak = __webpack_require__(148);
// 23.4 WeakSet Objects
- __webpack_require__(205)('WeakSet', function(get){
+ __webpack_require__(145)('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
@@ -4889,56 +3892,42 @@
}, weak, false, true);
/***/ },
-/* 210 */
+/* 150 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , rApply = (__webpack_require__(2).Reflect || {}).apply
- , fApply = Function.apply;
- // MS Edge argumentsList argument is optional
- $export($export.S + $export.F * !__webpack_require__(5)(function(){
- rApply(function(){});
- }), 'Reflect', {
+ var $export = __webpack_require__(3)
+ , _apply = Function.apply
+ , anObject = __webpack_require__(20);
+
+ $export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
- var T = aFunction(target)
- , L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ return _apply.call(target, thisArgument, anObject(argumentsList));
}
});
/***/ },
-/* 211 */
+/* 151 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
- var $export = __webpack_require__(6)
- , create = __webpack_require__(44)
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11)
- , fails = __webpack_require__(5)
- , bind = __webpack_require__(75)
- , rConstruct = (__webpack_require__(2).Reflect || {}).construct;
-
- // MS Edge supports only 2 arguments and argumentsList argument is optional
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , aFunction = __webpack_require__(13)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16)
+ , bind = Function.bind || __webpack_require__(5).Function.prototype.bind;
+
+ // MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
- var NEW_TARGET_BUG = fails(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
- return !(rConstruct(function(){}, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function(){
- rConstruct(function(){});
- });
-
- $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+ }), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
switch(args.length){
@@ -4955,32 +3944,29 @@
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
- , instance = create(isObject(proto) ? proto : Object.prototype)
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ },
-/* 212 */
+/* 152 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
- var dP = __webpack_require__(9)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
- , toPrimitive = __webpack_require__(14);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
- $export($export.S + $export.F * __webpack_require__(5)(function(){
- Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
try {
- dP.f(target, propertyKey, attributes);
+ $.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
@@ -4989,29 +3975,29 @@
});
/***/ },
-/* 213 */
+/* 153 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
- var $export = __webpack_require__(6)
- , gOPD = __webpack_require__(49).f
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , getDesc = __webpack_require__(2).getDesc
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
- var desc = gOPD(anObject(target), propertyKey);
+ var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ },
-/* 214 */
+/* 154 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 26.1.5 Reflect.enumerate(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
@@ -5019,7 +4005,7 @@
, key;
for(key in iterated)keys.push(key);
};
- __webpack_require__(136)(Enumerate, 'Object', function(){
+ __webpack_require__(110)(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
@@ -5036,54 +4022,53 @@
});
/***/ },
-/* 215 */
+/* 155 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
- var gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(11)
- , anObject = __webpack_require__(10);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(17)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20);
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
- if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
- if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get});
/***/ },
-/* 216 */
+/* 156 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
- var gOPD = __webpack_require__(49)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(10);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
- return gOPD.f(anObject(target), propertyKey);
+ return $.getDesc(anObject(target), propertyKey);
}
});
/***/ },
-/* 217 */
+/* 157 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
- var $export = __webpack_require__(6)
- , getProto = __webpack_require__(57)
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , getProto = __webpack_require__(2).getProto
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
@@ -5092,11 +4077,11 @@
});
/***/ },
-/* 218 */
+/* 158 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
@@ -5105,12 +4090,12 @@
});
/***/ },
-/* 219 */
+/* 159 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20)
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
@@ -5121,36 +4106,35 @@
});
/***/ },
-/* 220 */
+/* 160 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)});
+ $export($export.S, 'Reflect', {ownKeys: __webpack_require__(161)});
/***/ },
-/* 221 */
+/* 161 */
/***/ function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
- var gOPN = __webpack_require__(48)
- , gOPS = __webpack_require__(41)
- , anObject = __webpack_require__(10)
- , Reflect = __webpack_require__(2).Reflect;
+ var $ = __webpack_require__(2)
+ , anObject = __webpack_require__(20)
+ , Reflect = __webpack_require__(4).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
- var keys = gOPN.f(anObject(it))
- , getSymbols = gOPS.f;
+ var keys = $.getNames(anObject(it))
+ , getSymbols = $.getSymbols;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ },
-/* 222 */
+/* 162 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20)
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
@@ -5166,34 +4150,32 @@
});
/***/ },
-/* 223 */
+/* 163 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
- var dP = __webpack_require__(9)
- , gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , createDesc = __webpack_require__(15)
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(17)
+ , $export = __webpack_require__(3)
+ , createDesc = __webpack_require__(7)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16);
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
- , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
- if(isObject(proto = getPrototypeOf(target))){
+ if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ $.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
@@ -5202,12 +4184,12 @@
$export($export.S, 'Reflect', {set: set});
/***/ },
-/* 224 */
+/* 164 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
- var $export = __webpack_require__(6)
- , setProto = __webpack_require__(71);
+ var $export = __webpack_require__(3)
+ , setProto = __webpack_require__(45);
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
@@ -5222,1073 +4204,30 @@
});
/***/ },
-/* 225 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 20.3.3.1 / 15.9.4.4 Date.now()
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
-
-/***/ },
-/* 226 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14);
-
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
- }), 'Date', {
- toJSON: function toJSON(key){
- var O = toObject(this)
- , pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
- });
-
-/***/ },
-/* 227 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , getTime = Date.prototype.getTime;
-
- var lz = function(num){
- return num > 9 ? num : '0' + num;
- };
-
- // PhantomJS / old WebKit has a broken implementations
- $export($export.P + $export.F * (fails(function(){
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
- }) || !fails(function(){
- new Date(NaN).toISOString();
- })), 'Date', {
- toISOString: function toISOString(){
- if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
- var d = this
- , y = d.getUTCFullYear()
- , m = d.getUTCMilliseconds()
- , s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }
- });
-
-/***/ },
-/* 228 */
-/***/ function(module, exports, __webpack_require__) {
-
- var DateProto = Date.prototype
- , INVALID_DATE = 'Invalid Date'
- , TO_STRING = 'toString'
- , $toString = DateProto[TO_STRING]
- , getTime = DateProto.getTime;
- if(new Date(NaN) + '' != INVALID_DATE){
- __webpack_require__(16)(DateProto, TO_STRING, function toString(){
- var value = getTime.call(this);
- return value === value ? $toString.call(this) : INVALID_DATE;
- });
- }
-
-/***/ },
-/* 229 */
-/***/ function(module, exports, __webpack_require__) {
-
- var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive')
- , proto = Date.prototype;
-
- if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230));
-
-/***/ },
-/* 230 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var anObject = __webpack_require__(10)
- , toPrimitive = __webpack_require__(14)
- , NUMBER = 'number';
-
- module.exports = function(hint){
- if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
- };
-
-/***/ },
-/* 231 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $typed = __webpack_require__(232)
- , buffer = __webpack_require__(233)
- , anObject = __webpack_require__(10)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , isObject = __webpack_require__(11)
- , ArrayBuffer = __webpack_require__(2).ArrayBuffer
- , speciesConstructor = __webpack_require__(199)
- , $ArrayBuffer = buffer.ArrayBuffer
- , $DataView = buffer.DataView
- , $isView = $typed.ABV && ArrayBuffer.isView
- , $slice = $ArrayBuffer.prototype.slice
- , VIEW = $typed.VIEW
- , ARRAY_BUFFER = 'ArrayBuffer';
-
- $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
-
- $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it){
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
- });
-
- $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
- }), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end){
- if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength
- , first = toIndex(start, len)
- , final = toIndex(end === undefined ? len : end, len)
- , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
- , viewS = new $DataView(this)
- , viewT = new $DataView(result)
- , index = 0;
- while(first < final){
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
- });
-
- __webpack_require__(186)(ARRAY_BUFFER);
-
-/***/ },
-/* 232 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , uid = __webpack_require__(17)
- , TYPED = uid('typed_array')
- , VIEW = uid('view')
- , ABV = !!(global.ArrayBuffer && global.DataView)
- , CONSTR = ABV
- , i = 0, l = 9, Typed;
-
- var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
- ).split(',');
-
- while(i < l){
- if(Typed = global[TypedArrayConstructors[i++]]){
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
- }
-
- module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
- };
-
-/***/ },
-/* 233 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var global = __webpack_require__(2)
- , DESCRIPTORS = __webpack_require__(4)
- , LIBRARY = __webpack_require__(26)
- , $typed = __webpack_require__(232)
- , hide = __webpack_require__(8)
- , redefineAll = __webpack_require__(202)
- , fails = __webpack_require__(5)
- , anInstance = __webpack_require__(197)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , gOPN = __webpack_require__(48).f
- , dP = __webpack_require__(9).f
- , arrayFill = __webpack_require__(180)
- , setToStringTag = __webpack_require__(22)
- , ARRAY_BUFFER = 'ArrayBuffer'
- , DATA_VIEW = 'DataView'
- , PROTOTYPE = 'prototype'
- , WRONG_LENGTH = 'Wrong length!'
- , WRONG_INDEX = 'Wrong index!'
- , $ArrayBuffer = global[ARRAY_BUFFER]
- , $DataView = global[DATA_VIEW]
- , Math = global.Math
- , RangeError = global.RangeError
- , Infinity = global.Infinity
- , BaseBuffer = $ArrayBuffer
- , abs = Math.abs
- , pow = Math.pow
- , floor = Math.floor
- , log = Math.log
- , LN2 = Math.LN2
- , BUFFER = 'buffer'
- , BYTE_LENGTH = 'byteLength'
- , BYTE_OFFSET = 'byteOffset'
- , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
- , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
- , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
- // IEEE754 conversions based on https://github.com/feross/ieee754
- var packIEEE754 = function(value, mLen, nBytes){
- var buffer = Array(nBytes)
- , eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
- , i = 0
- , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
- , e, m, c;
- value = abs(value)
- if(value != value || value === Infinity){
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if(value * (c = pow(2, -e)) < 1){
- e--;
- c *= 2;
- }
- if(e + eBias >= 1){
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if(value * c >= 2){
- e++;
- c /= 2;
- }
- if(e + eBias >= eMax){
- m = 0;
- e = eMax;
- } else if(e + eBias >= 1){
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
- };
- var unpackIEEE754 = function(buffer, mLen, nBytes){
- var eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , nBits = eLen - 7
- , i = nBytes - 1
- , s = buffer[i--]
- , e = s & 127
- , m;
- s >>= 7;
- for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if(e === 0){
- e = 1 - eBias;
- } else if(e === eMax){
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
- };
-
- var unpackI32 = function(bytes){
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
- };
- var packI8 = function(it){
- return [it & 0xff];
- };
- var packI16 = function(it){
- return [it & 0xff, it >> 8 & 0xff];
- };
- var packI32 = function(it){
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
- };
- var packF64 = function(it){
- return packIEEE754(it, 52, 8);
- };
- var packF32 = function(it){
- return packIEEE754(it, 23, 4);
- };
-
- var addGetter = function(C, key, internal){
- dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
- };
-
- var get = function(view, bytes, index, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
- };
- var set = function(view, bytes, index, conversion, value, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = conversion(+value);
- for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
- };
-
- var validateArrayBufferArguments = function(that, length){
- anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
- var numberLength = +length
- , byteLength = toLength(numberLength);
- if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
- return byteLength;
- };
-
- if(!$typed.ABV){
- $ArrayBuffer = function ArrayBuffer(length){
- var byteLength = validateArrayBufferArguments(this, length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength){
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH]
- , offset = toInteger(byteOffset);
- if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if(DESCRIPTORS){
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset){
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset){
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
- } else {
- if(!fails(function(){
- new $ArrayBuffer; // eslint-disable-line no-new
- }) || !fails(function(){
- new $ArrayBuffer(.5); // eslint-disable-line no-new
- })){
- $ArrayBuffer = function ArrayBuffer(length){
- return new BaseBuffer(validateArrayBufferArguments(this, length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
- if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
- };
- if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2))
- , $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
- }
- setToStringTag($ArrayBuffer, ARRAY_BUFFER);
- setToStringTag($DataView, DATA_VIEW);
- hide($DataView[PROTOTYPE], $typed.VIEW, true);
- exports[ARRAY_BUFFER] = $ArrayBuffer;
- exports[DATA_VIEW] = $DataView;
-
-/***/ },
-/* 234 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, {
- DataView: __webpack_require__(233).DataView
- });
-
-/***/ },
-/* 235 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int8', 1, function(init){
- return function Int8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 236 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- if(__webpack_require__(4)){
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , fails = __webpack_require__(5)
- , $export = __webpack_require__(6)
- , $typed = __webpack_require__(232)
- , $buffer = __webpack_require__(233)
- , ctx = __webpack_require__(18)
- , anInstance = __webpack_require__(197)
- , propertyDesc = __webpack_require__(15)
- , hide = __webpack_require__(8)
- , redefineAll = __webpack_require__(202)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37)
- , toPrimitive = __webpack_require__(14)
- , has = __webpack_require__(3)
- , same = __webpack_require__(69)
- , classof = __webpack_require__(73)
- , isObject = __webpack_require__(11)
- , toObject = __webpack_require__(56)
- , isArrayIter = __webpack_require__(154)
- , create = __webpack_require__(44)
- , getPrototypeOf = __webpack_require__(57)
- , gOPN = __webpack_require__(48).f
- , getIterFn = __webpack_require__(156)
- , uid = __webpack_require__(17)
- , wks = __webpack_require__(23)
- , createArrayMethod = __webpack_require__(164)
- , createArrayIncludes = __webpack_require__(34)
- , speciesConstructor = __webpack_require__(199)
- , ArrayIterators = __webpack_require__(183)
- , Iterators = __webpack_require__(135)
- , $iterDetect = __webpack_require__(157)
- , setSpecies = __webpack_require__(186)
- , arrayFill = __webpack_require__(180)
- , arrayCopyWithin = __webpack_require__(177)
- , $DP = __webpack_require__(9)
- , $GOPD = __webpack_require__(49)
- , dP = $DP.f
- , gOPD = $GOPD.f
- , RangeError = global.RangeError
- , TypeError = global.TypeError
- , Uint8Array = global.Uint8Array
- , ARRAY_BUFFER = 'ArrayBuffer'
- , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
- , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
- , PROTOTYPE = 'prototype'
- , ArrayProto = Array[PROTOTYPE]
- , $ArrayBuffer = $buffer.ArrayBuffer
- , $DataView = $buffer.DataView
- , arrayForEach = createArrayMethod(0)
- , arrayFilter = createArrayMethod(2)
- , arraySome = createArrayMethod(3)
- , arrayEvery = createArrayMethod(4)
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , arrayIncludes = createArrayIncludes(true)
- , arrayIndexOf = createArrayIncludes(false)
- , arrayValues = ArrayIterators.values
- , arrayKeys = ArrayIterators.keys
- , arrayEntries = ArrayIterators.entries
- , arrayLastIndexOf = ArrayProto.lastIndexOf
- , arrayReduce = ArrayProto.reduce
- , arrayReduceRight = ArrayProto.reduceRight
- , arrayJoin = ArrayProto.join
- , arraySort = ArrayProto.sort
- , arraySlice = ArrayProto.slice
- , arrayToString = ArrayProto.toString
- , arrayToLocaleString = ArrayProto.toLocaleString
- , ITERATOR = wks('iterator')
- , TAG = wks('toStringTag')
- , TYPED_CONSTRUCTOR = uid('typed_constructor')
- , DEF_CONSTRUCTOR = uid('def_constructor')
- , ALL_CONSTRUCTORS = $typed.CONSTR
- , TYPED_ARRAY = $typed.TYPED
- , VIEW = $typed.VIEW
- , WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function(O, length){
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function(){
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
- new Uint8Array(1).set({});
- });
-
- var strictToLength = function(it, SAME){
- if(it === undefined)throw TypeError(WRONG_LENGTH);
- var number = +it
- , length = toLength(it);
- if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
- return length;
- };
-
- var toOffset = function(it, BYTES){
- var offset = toInteger(it);
- if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function(it){
- if(isObject(it) && TYPED_ARRAY in it)return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function(C, length){
- if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function(O, list){
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function(C, list){
- var index = 0
- , length = list.length
- , result = allocate(C, length);
- while(length > index)result[index] = list[index++];
- return result;
- };
-
- var addGetter = function(it, key, internal){
- dP(it, key, {get: function(){ return this._d[internal]; }});
- };
-
- var $from = function from(source /*, mapfn, thisArg */){
- var O = toObject(source)
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , iterFn = getIterFn(O)
- , i, length, values, result, step, iterator;
- if(iterFn != undefined && !isArrayIter(iterFn)){
- for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
- values.push(step.value);
- } O = values;
- }
- if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
- for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/*...items*/){
- var index = 0
- , length = arguments.length
- , result = allocate(this, length);
- while(length > index)result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString(){
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /*, end */){
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /*, thisArg */){
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /*, thisArg */){
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /*, thisArg */){
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /*, thisArg */){
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /*, thisArg */){
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /*, fromIndex */){
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /*, fromIndex */){
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator){ // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /*, thisArg */){
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse(){
- var that = this
- , length = validate(that).length
- , middle = Math.floor(length / 2)
- , index = 0
- , value;
- while(index < middle){
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /*, thisArg */){
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn){
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end){
- var O = validate(this)
- , length = O.length
- , $begin = toIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end){
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /*, offset */){
- validate(this);
- var offset = toOffset(arguments[1], 1)
- , length = this.length
- , src = toObject(arrayLike)
- , len = toLength(src.length)
- , index = 0;
- if(len + offset > length)throw RangeError(WRONG_LENGTH);
- while(index < len)this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries(){
- return arrayEntries.call(validate(this));
- },
- keys: function keys(){
- return arrayKeys.call(validate(this));
- },
- values: function values(){
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function(target, key){
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key){
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc){
- if(isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ){
- target[key] = desc.value;
- return target;
- } else return dP(target, key, desc);
- };
-
- if(!ALL_CONSTRUCTORS){
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if(fails(function(){ arrayToString.call({}); })){
- arrayToString = arrayToLocaleString = function toString(){
- return arrayJoin.call(this);
- }
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function(){ /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function(){ return this[TYPED_ARRAY]; }
- });
-
- module.exports = function(KEY, BYTES, wrapper, CLAMPED){
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
- , ISNT_UINT8 = NAME != 'Uint8Array'
- , GETTER = 'get' + KEY
- , SETTER = 'set' + KEY
- , TypedArray = global[NAME]
- , Base = TypedArray || {}
- , TAC = TypedArray && getPrototypeOf(TypedArray)
- , FORCED = !TypedArray || !$typed.ABV
- , O = {}
- , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function(that, index){
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function(that, index, value){
- var data = that._d;
- if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function(that, index){
- dP(that, index, {
- get: function(){
- return getter(this, index);
- },
- set: function(value){
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if(FORCED){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0
- , offset = 0
- , buffer, byteLength, length, klass;
- if(!isObject(data)){
- length = strictToLength(data, true)
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if($length === undefined){
- if($len % BYTES)throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if(byteLength < 0)throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if(TYPED_ARRAY in data){
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while(index < length)addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if(!$iterDetect(function(iter){
- // V8 works with iterators, but fails in many other cases
- // https://code.google.com/p/v8/issues/detail?id=4552
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
- if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if(TYPED_ARRAY in data)return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
- if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR]
- , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
- , $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
- dP(TypedArrayPrototype, TAG, {
- get: function(){ return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES,
- from: $from,
- of: $of
- });
-
- if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
-
- $export($export.P + $export.F * fails(function(){
- new TypedArray(1).slice();
- }), NAME, {slice: $slice});
-
- $export($export.P + $export.F * (fails(function(){
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
- }) || !fails(function(){
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, {toLocaleString: $toLocaleString});
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
- } else module.exports = function(){ /* empty */ };
-
-/***/ },
-/* 237 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint8', 1, function(init){
- return function Uint8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 238 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint8', 1, function(init){
- return function Uint8ClampedArray(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- }, true);
-
-/***/ },
-/* 239 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int16', 2, function(init){
- return function Int16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 240 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint16', 2, function(init){
- return function Uint16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 241 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int32', 4, function(init){
- return function Int32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 242 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint32', 4, function(init){
- return function Uint32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 243 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Float32', 4, function(init){
- return function Float32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 244 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Float64', 8, function(init){
- return function Float64Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 245 */
+/* 165 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/Array.prototype.includes
- var $export = __webpack_require__(6)
- , $includes = __webpack_require__(34)(true);
+ var $export = __webpack_require__(3)
+ , $includes = __webpack_require__(33)(true);
$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)('includes');
+ __webpack_require__(118)('includes');
/***/ },
-/* 246 */
+/* 166 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(125)(true);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(98)(true);
$export($export.P, 'String', {
at: function at(pos){
@@ -6297,159 +4236,138 @@
});
/***/ },
-/* 247 */
+/* 167 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(248);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(168);
$export($export.P, 'String', {
- padStart: function padStart(maxLength /*, fillString = ' ' */){
+ padLeft: function padLeft(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ },
-/* 248 */
+/* 168 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-string-pad-start-end
- var toLength = __webpack_require__(35)
- , repeat = __webpack_require__(85)
- , defined = __webpack_require__(33);
+ // https://github.com/ljharb/proposal-string-pad-left-right
+ var toLength = __webpack_require__(27)
+ , repeat = __webpack_require__(105)
+ , defined = __webpack_require__(22);
module.exports = function(that, maxLength, fillString, left){
var S = String(defined(that))
, stringLength = S.length
, fillStr = fillString === undefined ? ' ' : String(fillString)
, intMaxLength = toLength(maxLength);
- if(intMaxLength <= stringLength || fillStr == '')return S;
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
var fillLen = intMaxLength - stringLength
, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
-
/***/ },
-/* 249 */
+/* 169 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(248);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(168);
$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ padRight: function padRight(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ },
-/* 250 */
+/* 170 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(81)('trimLeft', function($trim){
+ __webpack_require__(63)('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
- }, 'trimStart');
+ });
/***/ },
-/* 251 */
+/* 171 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(81)('trimRight', function($trim){
+ __webpack_require__(63)('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
- }, 'trimEnd');
+ });
/***/ },
-/* 252 */
+/* 172 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- // https://tc39.github.io/String.prototype.matchAll/
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , toLength = __webpack_require__(35)
- , isRegExp = __webpack_require__(128)
- , getFlags = __webpack_require__(188)
- , RegExpProto = RegExp.prototype;
-
- var $RegExpStringIterator = function(regexp, string){
- this._r = regexp;
- this._s = string;
- };
-
- __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){
- var match = this._r.exec(this._s);
- return {value: match, done: match === null};
- });
-
- $export($export.P, 'String', {
- matchAll: function matchAll(regexp){
- defined(this);
- if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
- var S = String(this)
- , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
- , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
- });
+ // https://github.com/benjamingr/RexExp.escape
+ var $export = __webpack_require__(3)
+ , $re = __webpack_require__(173)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-/***/ },
-/* 253 */
-/***/ function(module, exports, __webpack_require__) {
+ $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
- __webpack_require__(25)('asyncIterator');
/***/ },
-/* 254 */
-/***/ function(module, exports, __webpack_require__) {
+/* 173 */
+/***/ function(module, exports) {
- __webpack_require__(25)('observable');
+ module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+ };
/***/ },
-/* 255 */
+/* 174 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-getownpropertydescriptors
- var $export = __webpack_require__(6)
- , ownKeys = __webpack_require__(221)
- , toIObject = __webpack_require__(30)
- , gOPD = __webpack_require__(49)
- , createProperty = __webpack_require__(155);
+ // https://gist.github.com/WebReflection/9353781
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , ownKeys = __webpack_require__(161)
+ , toIObject = __webpack_require__(23)
+ , createDesc = __webpack_require__(7);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
- , getDesc = gOPD.f
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
- while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
- return result;
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
}
});
/***/ },
-/* 256 */
+/* 175 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $values = __webpack_require__(257)(false);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $values = __webpack_require__(176)(false);
$export($export.S, 'Object', {
values: function values(it){
@@ -6458,16 +4376,16 @@
});
/***/ },
-/* 257 */
+/* 176 */
/***/ function(module, exports, __webpack_require__) {
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30)
- , isEnum = __webpack_require__(42).f;
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(23)
+ , isEnum = $.isEnum;
module.exports = function(isEntries){
return function(it){
var O = toIObject(it)
- , keys = getKeys(O)
+ , keys = $.getKeys(O)
, length = keys.length
, i = 0
, result = []
@@ -6479,12 +4397,12 @@
};
/***/ },
-/* 258 */
+/* 177 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $entries = __webpack_require__(257)(true);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $entries = __webpack_require__(176)(true);
$export($export.S, 'Object', {
entries: function entries(it){
@@ -6493,724 +4411,76 @@
});
/***/ },
-/* 259 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(19)
- , $defineProperty = __webpack_require__(9);
-
- // B.2.2.2 Object.prototype.__defineGetter__(P, getter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter){
- $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 260 */
-/***/ function(module, exports, __webpack_require__) {
-
- // Forced replacement prototype accessors methods
- module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){
- var K = Math.random();
- // In FF throws only define methods
- __defineSetter__.call(null, K, function(){ /* empty */});
- delete __webpack_require__(2)[K];
- });
-
-/***/ },
-/* 261 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(19)
- , $defineProperty = __webpack_require__(9);
-
- // B.2.2.3 Object.prototype.__defineSetter__(P, setter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter){
- $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 262 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.4 Object.prototype.__lookupGetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __lookupGetter__: function __lookupGetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.get;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 263 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.5 Object.prototype.__lookupSetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __lookupSetter__: function __lookupSetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.set;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 264 */
+/* 178 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')});
+ $export($export.P, 'Map', {toJSON: __webpack_require__(179)('Map')});
/***/ },
-/* 265 */
+/* 179 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var classof = __webpack_require__(73)
- , from = __webpack_require__(266);
+ var forOf = __webpack_require__(138)
+ , classof = __webpack_require__(47);
module.exports = function(NAME){
return function toJSON(){
if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
+ var arr = [];
+ forOf(this, false, arr.push, arr);
+ return arr;
};
};
/***/ },
-/* 266 */
-/***/ function(module, exports, __webpack_require__) {
-
- var forOf = __webpack_require__(198);
-
- module.exports = function(iter, ITERATOR){
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
- };
-
-
-/***/ },
-/* 267 */
+/* 180 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
-
- $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')});
-
-/***/ },
-/* 268 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-global
- var $export = __webpack_require__(6);
-
- $export($export.S, 'System', {global: __webpack_require__(2)});
-
-/***/ },
-/* 269 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-is-error
- var $export = __webpack_require__(6)
- , cof = __webpack_require__(32);
-
- $export($export.S, 'Error', {
- isError: function isError(it){
- return cof(it) === 'Error';
- }
- });
-
-/***/ },
-/* 270 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 271 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 272 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- imulh: function imulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >> 16
- , v1 = $v >> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
- });
-
-/***/ },
-/* 273 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- umulh: function umulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >>> 16
- , v1 = $v >>> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
- });
-
-/***/ },
-/* 274 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
- }});
-
-/***/ },
-/* 275 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Map = __webpack_require__(203)
- , $export = __webpack_require__(6)
- , shared = __webpack_require__(21)('metadata')
- , store = shared.store || (shared.store = new (__webpack_require__(207)));
-
- var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
- };
- var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
- };
- var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
- };
- var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
- };
- var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
- };
- var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
- };
- var exp = function(O){
- $export($export.S, 'Reflect', O);
- };
-
- module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
- };
-
-/***/ },
-/* 276 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , toMetaKey = metadata.key
- , getOrCreateMetadataMap = metadata.map
- , store = metadata.store;
-
- metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
- , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
- if(metadataMap.size)return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
- }});
-
-/***/ },
-/* 277 */
-/***/ function(module, exports, __webpack_require__) {
+ var $export = __webpack_require__(3);
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- var ordinaryGetMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
- };
-
- metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 278 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Set = __webpack_require__(206)
- , from = __webpack_require__(266)
- , metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- var ordinaryMetadataKeys = function(O, P){
- var oKeys = ordinaryOwnMetadataKeys(O, P)
- , parent = getPrototypeOf(O);
- if(parent === null)return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
- };
-
- metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 279 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
+ $export($export.P, 'Set', {toJSON: __webpack_require__(179)('Set')});
/***/ },
-/* 280 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 281 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
- var ordinaryHasMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
- };
-
- metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 282 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
- metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 283 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , aFunction = __webpack_require__(19)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({metadata: function metadata(metadataKey, metadataValue){
- return function decorator(target, targetKey){
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
- }});
-
-/***/ },
-/* 284 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
- var $export = __webpack_require__(6)
- , microtask = __webpack_require__(201)()
- , process = __webpack_require__(2).process
- , isNode = __webpack_require__(32)(process) == 'process';
-
- $export($export.G, {
- asap: function asap(fn){
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
- });
-
-/***/ },
-/* 285 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // https://github.com/zenparsing/es-observable
- var $export = __webpack_require__(6)
- , global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , microtask = __webpack_require__(201)()
- , OBSERVABLE = __webpack_require__(23)('observable')
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , anInstance = __webpack_require__(197)
- , redefineAll = __webpack_require__(202)
- , hide = __webpack_require__(8)
- , forOf = __webpack_require__(198)
- , RETURN = forOf.RETURN;
-
- var getMethod = function(fn){
- return fn == null ? undefined : aFunction(fn);
- };
-
- var cleanupSubscription = function(subscription){
- var cleanup = subscription._c;
- if(cleanup){
- subscription._c = undefined;
- cleanup();
- }
- };
-
- var subscriptionClosed = function(subscription){
- return subscription._o === undefined;
- };
-
- var closeSubscription = function(subscription){
- if(!subscriptionClosed(subscription)){
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
- };
-
- var Subscription = function(observer, subscriber){
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer)
- , subscription = cleanup;
- if(cleanup != null){
- if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch(e){
- observer.error(e);
- return;
- } if(subscriptionClosed(this))cleanupSubscription(this);
- };
-
- Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe(){ closeSubscription(this); }
- });
-
- var SubscriptionObserver = function(subscription){
- this._s = subscription;
- };
-
- SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if(m)return m.call(observer, value);
- } catch(e){
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value){
- var subscription = this._s;
- if(subscriptionClosed(subscription))throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if(!m)throw value;
- value = m.call(observer, value);
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
- });
-
- var $Observable = function Observable(subscriber){
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
- };
-
- redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer){
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn){
- var that = this;
- return new (core.Promise || global.Promise)(function(resolve, reject){
- aFunction(fn);
- var subscription = that.subscribe({
- next : function(value){
- try {
- return fn(value);
- } catch(e){
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
- });
-
- redefineAll($Observable, {
- from: function from(x){
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if(method){
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function(observer){
- return observable.subscribe(observer);
- });
- }
- return new C(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- try {
- if(forOf(x, false, function(it){
- observer.next(it);
- if(done)return RETURN;
- }) === RETURN)return;
- } catch(e){
- if(done)throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- },
- of: function of(){
- for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- for(var i = 0; i < items.length; ++i){
- observer.next(items[i]);
- if(done)return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- }
- });
-
- hide($Observable.prototype, OBSERVABLE, function(){ return this; });
-
- $export($export.G, {Observable: $Observable});
-
- __webpack_require__(186)('Observable');
-
-/***/ },
-/* 286 */
+/* 181 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $task = __webpack_require__(200);
+ var $export = __webpack_require__(3)
+ , $task = __webpack_require__(141);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ },
-/* 287 */
+/* 182 */
/***/ function(module, exports, __webpack_require__) {
- var $iterators = __webpack_require__(183)
- , redefine = __webpack_require__(16)
- , global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , Iterators = __webpack_require__(135)
- , wks = __webpack_require__(23)
- , ITERATOR = wks('iterator')
- , TO_STRING_TAG = wks('toStringTag')
- , ArrayValues = Iterators.Array;
-
- for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype
- , key;
- if(proto){
- if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
- if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
- }
- }
+ __webpack_require__(117);
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(6)
+ , Iterators = __webpack_require__(109)
+ , ITERATOR = __webpack_require__(31)('iterator')
+ , NL = global.NodeList
+ , HTC = global.HTMLCollection
+ , NLProto = NL && NL.prototype
+ , HTCProto = HTC && HTC.prototype
+ , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
+ if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
+ if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);
/***/ },
-/* 288 */
+/* 183 */
/***/ function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , invoke = __webpack_require__(76)
- , partial = __webpack_require__(289)
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , invoke = __webpack_require__(19)
+ , partial = __webpack_require__(184)
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
@@ -7228,13 +4498,13 @@
});
/***/ },
-/* 289 */
+/* 184 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var path = __webpack_require__(290)
- , invoke = __webpack_require__(76)
- , aFunction = __webpack_require__(19);
+ var path = __webpack_require__(185)
+ , invoke = __webpack_require__(19)
+ , aFunction = __webpack_require__(13);
module.exports = function(/* ...pargs */){
var fn = aFunction(this)
, length = arguments.length
@@ -7244,46 +4514,45 @@
, holder = false;
while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
return function(/* ...args */){
- var that = this
- , aLen = arguments.length
+ var that = this
+ , $$ = arguments
+ , $$len = $$.length
, j = 0, k = 0, args;
- if(!holder && !aLen)return invoke(fn, pargs, that);
+ if(!holder && !$$len)return invoke(fn, pargs, that);
args = pargs.slice();
- if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
- while(aLen > k)args.push(arguments[k++]);
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];
+ while($$len > k)args.push($$[k++]);
return invoke(fn, args, that);
};
};
/***/ },
-/* 290 */
+/* 185 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(2);
+ module.exports = __webpack_require__(4);
/***/ },
-/* 291 */
+/* 186 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var ctx = __webpack_require__(18)
- , $export = __webpack_require__(6)
- , createDesc = __webpack_require__(15)
- , assign = __webpack_require__(67)
- , create = __webpack_require__(44)
- , getPrototypeOf = __webpack_require__(57)
- , getKeys = __webpack_require__(28)
- , dP = __webpack_require__(9)
- , keyOf = __webpack_require__(27)
- , aFunction = __webpack_require__(19)
- , forOf = __webpack_require__(198)
- , isIterable = __webpack_require__(292)
- , $iterCreate = __webpack_require__(136)
- , step = __webpack_require__(184)
- , isObject = __webpack_require__(11)
- , toIObject = __webpack_require__(30)
- , DESCRIPTORS = __webpack_require__(4)
- , has = __webpack_require__(3);
+ var $ = __webpack_require__(2)
+ , ctx = __webpack_require__(12)
+ , $export = __webpack_require__(3)
+ , createDesc = __webpack_require__(7)
+ , assign = __webpack_require__(41)
+ , keyOf = __webpack_require__(36)
+ , aFunction = __webpack_require__(13)
+ , forOf = __webpack_require__(138)
+ , isIterable = __webpack_require__(187)
+ , $iterCreate = __webpack_require__(110)
+ , step = __webpack_require__(119)
+ , isObject = __webpack_require__(16)
+ , toIObject = __webpack_require__(23)
+ , DESCRIPTORS = __webpack_require__(8)
+ , has = __webpack_require__(17)
+ , getKeys = $.getKeys;
// 0 -> Dict.forEach
// 1 -> Dict.map
@@ -7350,7 +4619,7 @@
});
function Dict(iterable){
- var dict = create(null);
+ var dict = $.create(null);
if(iterable != undefined){
if(isIterable(iterable)){
forOf(iterable, true, function(key, value){
@@ -7389,13 +4658,13 @@
if(has(object, key))return object[key];
}
function set(object, key, value){
- if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value));
+ if(DESCRIPTORS && key in Object)$.setDesc(object, key, createDesc(0, value));
else object[key] = value;
return object;
}
function isDict(it){
- return isObject(it) && getPrototypeOf(it) === Dict.prototype;
+ return isObject(it) && $.getProto(it) === Dict.prototype;
}
$export($export.G + $export.F, {Dict: Dict});
@@ -7422,13 +4691,13 @@
});
/***/ },
-/* 292 */
+/* 187 */
/***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(73)
- , ITERATOR = __webpack_require__(23)('iterator')
- , Iterators = __webpack_require__(135);
- module.exports = __webpack_require__(7).isIterable = function(it){
+ var classof = __webpack_require__(47)
+ , ITERATOR = __webpack_require__(31)('iterator')
+ , Iterators = __webpack_require__(109);
+ module.exports = __webpack_require__(5).isIterable = function(it){
var O = Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
@@ -7436,25 +4705,25 @@
};
/***/ },
-/* 293 */
+/* 188 */
/***/ function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(10)
- , get = __webpack_require__(156);
- module.exports = __webpack_require__(7).getIterator = function(it){
+ var anObject = __webpack_require__(20)
+ , get = __webpack_require__(114);
+ module.exports = __webpack_require__(5).getIterator = function(it){
var iterFn = get(it);
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
/***/ },
-/* 294 */
+/* 189 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , $export = __webpack_require__(6)
- , partial = __webpack_require__(289);
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(5)
+ , $export = __webpack_require__(3)
+ , partial = __webpack_require__(184);
// https://esdiscuss.org/topic/promise-returning-delay-function
$export($export.G + $export.F, {
delay: function delay(time){
@@ -7465,66 +4734,65 @@
});
/***/ },
-/* 295 */
+/* 190 */
/***/ function(module, exports, __webpack_require__) {
- var path = __webpack_require__(290)
- , $export = __webpack_require__(6);
+ var path = __webpack_require__(185)
+ , $export = __webpack_require__(3);
// Placeholder
- __webpack_require__(7)._ = path._ = path._ || {};
+ __webpack_require__(5)._ = path._ = path._ || {};
- $export($export.P + $export.F, 'Function', {part: __webpack_require__(289)});
+ $export($export.P + $export.F, 'Function', {part: __webpack_require__(184)});
/***/ },
-/* 296 */
+/* 191 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(11)});
+ $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(16)});
/***/ },
-/* 297 */
+/* 192 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F, 'Object', {classof: __webpack_require__(73)});
+ $export($export.S + $export.F, 'Object', {classof: __webpack_require__(47)});
/***/ },
-/* 298 */
+/* 193 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , define = __webpack_require__(299);
+ var $export = __webpack_require__(3)
+ , define = __webpack_require__(194);
$export($export.S + $export.F, 'Object', {define: define});
/***/ },
-/* 299 */
+/* 194 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9)
- , gOPD = __webpack_require__(49)
- , ownKeys = __webpack_require__(221)
- , toIObject = __webpack_require__(30);
+ var $ = __webpack_require__(2)
+ , ownKeys = __webpack_require__(161)
+ , toIObject = __webpack_require__(23);
module.exports = function define(target, mixin){
var keys = ownKeys(toIObject(mixin))
, length = keys.length
, i = 0, key;
- while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key));
+ while(length > i)$.setDesc(target, key = keys[i++], $.getDesc(mixin, key));
return target;
};
/***/ },
-/* 300 */
+/* 195 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , define = __webpack_require__(299)
- , create = __webpack_require__(44);
+ var $export = __webpack_require__(3)
+ , define = __webpack_require__(194)
+ , create = __webpack_require__(2).create;
$export($export.S + $export.F, 'Object', {
make: function(proto, mixin){
@@ -7533,11 +4801,11 @@
});
/***/ },
-/* 301 */
+/* 196 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- __webpack_require__(134)(Number, 'Number', function(iterated){
+ __webpack_require__(108)(Number, 'Number', function(iterated){
this._l = +iterated;
this._i = 0;
}, function(){
@@ -7547,36 +4815,12 @@
});
/***/ },
-/* 302 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/benjamingr/RexExp.escape
- var $export = __webpack_require__(6)
- , $re = __webpack_require__(303)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-
- $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
-
-
-/***/ },
-/* 303 */
-/***/ function(module, exports) {
-
- module.exports = function(regExp, replace){
- var replacer = replace === Object(replace) ? function(part){
- return replace[part];
- } : replace;
- return function(it){
- return String(it).replace(regExp, replacer);
- };
- };
-
-/***/ },
-/* 304 */
+/* 197 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6);
- var $re = __webpack_require__(303)(/[&<>"']/g, {
+ var $export = __webpack_require__(3);
+ var $re = __webpack_require__(173)(/[&<>"']/g, {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
@@ -7587,12 +4831,12 @@
$export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }});
/***/ },
-/* 305 */
+/* 198 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6);
- var $re = __webpack_require__(303)(/&(?:amp|lt|gt|quot|apos);/g, {
+ var $export = __webpack_require__(3);
+ var $re = __webpack_require__(173)(/&(?:amp|lt|gt|quot|apos);/g, {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
@@ -7602,6 +4846,59 @@
$export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }});
+/***/ },
+/* 199 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , log = {}
+ , enabled = true;
+ // Methods from https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
+ $.each.call((
+ 'assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,' +
+ 'info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,' +
+ 'time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn'
+ ).split(','), function(key){
+ log[key] = function(){
+ var $console = global.console;
+ if(enabled && $console && $console[key]){
+ return Function.apply.call($console[key], $console, arguments);
+ }
+ };
+ });
+ $export($export.G + $export.F, {log: __webpack_require__(41)(log.log, log, {
+ enable: function(){
+ enabled = true;
+ },
+ disable: function(){
+ enabled = false;
+ }
+ })});
+
+/***/ },
+/* 200 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // JavaScript 1.6 / Strawman array statics shim
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , $ctx = __webpack_require__(12)
+ , $Array = __webpack_require__(5).Array || Array
+ , statics = {};
+ var setStatics = function(keys, length){
+ $.each.call(keys.split(','), function(key){
+ if(length == undefined && key in $Array)statics[key] = $Array[key];
+ else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
+ });
+ };
+ setStatics('pop,reverse,shift,keys,values,entries', 1);
+ setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
+ setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
+ 'reduce,reduceRight,copyWithin,fill');
+ $export($export.S, 'Array', statics);
+
/***/ }
/******/ ]);
// CommonJS export
diff --git a/node_modules/core-js/client/core.min.js b/node_modules/core-js/client/core.min.js
index 4c43b467f..7a080f0ba 100644
--- a/node_modules/core-js/client/core.min.js
+++ b/node_modules/core-js/client/core.min.js
@@ -1,10 +1,9 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
*/
-!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),c(288),c(291),c(156),c(293),c(292),c(294),c(295),c(296),c(297),c(298),c(300),c(301),c(302),c(304),a.exports=c(305)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e<b;e++)d[e]="a["+e+"]";h[b]=Function("F,a","return new F("+d.join(",")+")")}return h[b](a,c)};a.exports=Function.bind||function bind(a){var b=d(this),c=g.call(arguments,1),h=function(){var d=c.concat(g.call(arguments));return this instanceof h?i(b,d.length,d):f(b,d,a)};return e(b.prototype)&&(h.prototype=b.prototype),h}},function(a,b){a.exports=function(a,b,d){var e=d===c;switch(b.length){case 0:return e?a():a.call(d);case 1:return e?a(b[0]):a.call(d,b[0]);case 2:return e?a(b[0],b[1]):a.call(d,b[0],b[1]);case 3:return e?a(b[0],b[1],b[2]):a.call(d,b[0],b[1],b[2]);case 4:return e?a(b[0],b[1],b[2],b[3]):a.call(d,b[0],b[1],b[2],b[3])}return a.apply(d,b)}},function(a,b,c){var d=c(9).f,e=c(15),f=c(3),g=Function.prototype,h=/^\s*function ([^ (]*)/,i="name",j=Object.isExtensible||function(){return!0};i in g||c(4)&&d(g,i,{configurable:!0,get:function(){try{var a=this,b=(""+a).match(h)[1];return f(a,i)||!j(a)||d(a,i,e(5,b)),b}catch(c){return""}}})},function(a,b,c){var d=c(11),e=c(57),f=c(23)("hasInstance"),g=Function.prototype;f in g||c(9).f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},function(a,b,c){var d=c(2),e=c(3),f=c(32),g=c(80),h=c(14),i=c(5),j=c(48).f,k=c(49).f,l=c(9).f,m=c(81).trim,n="Number",o=d[n],p=o,q=o.prototype,r=f(c(44)(q))==n,s="trim"in String.prototype,t=function(a){var b=h(a,!1);if("string"==typeof b&&b.length>2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;j<k;j++)if(g=i.charCodeAt(j),g<48||g>e)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<<d),m(1,1),n(2),s=o()}else m(0,c),m(1<<-b,0),s=o()+g.call(l,j);return j>0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return d<j?f*k(d/j/h)*j*h:(b=(1+h/g)*d,c=b-(b-d),c>i||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g<h;)c=e(arguments[g++]),i<c?(d=i/c,f=f*d*d+1,i=c):c>0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h<d&&g.push(String(arguments[h]));return g.join("")}})},function(a,b,c){c(81)("trim",function(a){return function trim(){return a(this,3)}})},function(a,b,c){var d=c(6),e=c(125)(!1);d(d.P,"String",{codePointAt:function codePointAt(a){return e(this,a)}})},function(a,b,d){var e=d(36),f=d(33);a.exports=function(a){return function(b,d){var g,h,i=String(f(b)),j=e(d),k=i.length;return j<0||j>=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,"&quot;")+'"'),h+">"+e+"</"+b+">"};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){
-if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;n<l;n++)m[n]="String"==e?this.charAt(f+n):this[f+n];return m}})},function(a,b,d){var e=d(6),f=d(19),g=d(56),h=d(5),i=[].sort,j=[1,2,3];e(e.P+e.F*(h(function(){j.sort(c)})||!h(function(){j.sort(null)})||!d(160)(i)),"Array",{sort:function sort(a){return a===c?i.call(g(this)):i.call(g(this),f(a))}})},function(a,b,c){var d=c(6),e=c(164)(0),f=c(160)([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function forEach(a){return e(this,a,arguments[1])}})},function(a,b,d){var e=d(18),f=d(31),g=d(56),h=d(35),i=d(165);a.exports=function(a,b){var d=1==a,j=2==a,k=3==a,l=4==a,m=6==a,n=5==a||m,o=b||i;return function(b,i,p){for(var q,r,s=g(b),t=f(s),u=e(i,p,3),v=h(t.length),w=0,x=d?o(b,v):j?o(b,0):c;v>w;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j<i&&i<j+l&&(m=-1,j+=l-1,i+=l-1);l-- >0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o<arguments[j]-2;o++)arguments[o]===c&&(i[o]=c)}),i[j]>1&&i.index<d[j]&&h.apply(p,i.slice(1)),n=i[0][j],r=m,p[j]>=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e<f;)l.setUint8(p++,k.getUint8(e++));return g}}),d(186)(s)},function(a,b,c){for(var d,e=c(2),f=c(8),g=c(17),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<m;)(d=e[n[l++]])?(f(d.prototype,h,!0),f(d.prototype,i,!0)):k=!1;a.exports={ABV:j,CONSTR:k,TYPED:h,VIEW:i}},function(a,b,d){var e=d(2),f=d(4),g=d(26),h=d(232),i=d(8),j=d(202),k=d(5),l=d(197),m=d(36),n=d(35),o=d(48).f,p=d(9).f,q=d(180),r=d(22),s="ArrayBuffer",t="DataView",u="prototype",v="Wrong length!",w="Wrong index!",x=e[s],y=e[t],z=e.Math,A=e.RangeError,B=e.Infinity,C=x,D=z.abs,E=z.pow,F=z.floor,G=z.log,H=z.LN2,I="buffer",J="byteLength",K="byteOffset",L=f?"_b":I,M=f?"_l":J,N=f?"_o":K,O=function(a,b,c){var d,e,f,g=Array(c),h=8*c-b-1,i=(1<<h)-1,j=i>>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<<b|e,h+=b;h>0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<<e)-1,g=f>>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;l<b;l++)i[j+l]=k[f?l:b-l-1]},Z=function(a,b){l(a,x,s);var c=+b,d=n(c);if(c!=d)throw A(v);return d};if(h.ABV){if(!k(function(){new x})||!k(function(){new x(.5)})){x=function ArrayBuffer(a){return new C(Z(this,a))};for(var $,_=x[u]=C[u],aa=o(C),ba=0;aa.length>ba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c);
-},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e<d;)a=b[e],b[e++]=b[--c],b[c]=a;return b},some:function some(a){return ca(Ga(this),a,arguments.length>1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f<e;)this[b+f]=d[f++]},Sa={entries:function entries(){return ka.call(Ga(this))},keys:function keys(){return ja.call(Ga(this))},values:function values(){return ia.call(Ga(this))}},Ta=function(a,b){return w(a)&&a[ya]&&"symbol"!=typeof b&&b in a&&String(+b)==String(b)},Ua=function getOwnPropertyDescriptor(a,b){return Ta(a,b=s(b,!0))?m(2,a[b]):R(a,b)},Va=function defineProperty(a,b,c){return!(Ta(a,b=s(b,!0))&&w(c)&&t(c,"value"))||t(c,"get")||t(c,"set")||c.configurable||t(c,"writable")&&!c.writable||t(c,"enumerable")&&!c.enumerable?Q(a,b,c):(a[b]=c.value,a)};xa||(P.f=Ua,O.f=Va),h(h.S+h.F*!xa,"Object",{getOwnPropertyDescriptor:Ua,defineProperty:Va}),g(function(){ra.call({})})&&(ra=sa=function toString(){return oa.call(this)});var Wa=o({},Pa);o(Wa,Sa),n(Wa,ta,Sa.values),o(Wa,{slice:Qa,set:Ra,constructor:function(){},toString:ra,toLocaleString:Oa}),Ka(Wa,"buffer","b"),Ka(Wa,"byteOffset","o"),Ka(Wa,"byteLength","l"),Ka(Wa,"length","e"),Q(Wa,ua,{get:function(){return this[ya]}}),a.exports=function(a,b,d,j){j=!!j;var k=a+(j?"Clamped":"")+"Array",m="Uint8Array"!=k,o="get"+a,p="set"+a,r=f[k],s=r||{},t=r&&A(r),u=!r||!i.ABV,x={},y=r&&r[Y],C=function(a,c){var d=a._d;return d.v[o](c*b+d.o,Ca)},D=function(a,c,d){var e=a._d;j&&(d=(d=Math.round(d))<0?0:d>255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m<i;)E(a,m++)}),y=r[Y]=z(Wa),n(y,"constructor",r)):K(function(a){new r(null),new r(a)},!0)||(r=d(function(a,d,e,f){l(a,r,k);var g;return w(d)?d instanceof $||(g=v(d))==V||g==W?f!==c?new s(d,Fa(e,b),f):e!==c?new s(d,Fa(e,b)):new s(d):ya in d?Ja(r,d):La.call(r,d):new s(Ea(d,m))}),aa(t!==Function.prototype?B(s).concat(B(t)):B(s),function(a){a in r||n(r,a,s[a])}),r[Y]=y,e||(y.constructor=r));var F=y[ta],G=!!F&&("values"==F.name||F.name==c),H=Sa.values;n(r,va,!0),n(y,ya,k),n(y,za,!0),n(y,wa,r),(j?new r(1)[ua]==k:ua in y)||Q(y,ua,{get:function(){return k}}),x[k]=r,h(h.G+h.W+h.F*(r!=s),x),h(h.S,k,{BYTES_PER_ELEMENT:b,from:La,of:Ma}),X in y||n(y,X,b),h(h.P,k,Pa),L(k),h(h.P+h.F*Da,k,{set:Ra}),h(h.P+h.F*!G,k,Sa),h(h.P+h.F*(y.toString!=ra),k,{toString:ra}),h(h.P+h.F*g(function(){new r(1).slice()}),k,{slice:Qa}),h(h.P+h.F*(g(function(){return[1,2].toLocaleString()!=new r([1,2]).toLocaleString()})||!g(function(){y.toLocaleString.call([1,2])})),k,{toLocaleString:Oa}),J[k]=G?F:H,e||G||n(y,ta,H)}}else a.exports=function(){}},function(a,b,c){c(236)("Uint8",1,function(a){return function Uint8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint8",1,function(a){return function Uint8ClampedArray(b,c,d){return a(this,b,c,d)}},!0)},function(a,b,c){c(236)("Int16",2,function(a){return function Int16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint16",2,function(a){return function Uint16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Int32",4,function(a){return function Int32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint32",4,function(a){return function Uint32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Float32",4,function(a){return function Float32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Float64",8,function(a){return function Float64Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){var e=d(6),f=d(34)(!0);e(e.P,"Array",{includes:function includes(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);a<b;)c[a]=arguments[a++];return new("function"==typeof this?this:w)(function(a){var b=!1;return h(function(){if(!b){for(var d=0;d<c.length;++d)if(a.next(c[d]),b)return;a.complete()}}),function(){b=!0}})}}),n(w.prototype,i,function(){return this}),e(e.G,{Observable:w}),d(186)("Observable")},function(a,b,c){var d=c(6),e=c(200);d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},function(a,b,c){for(var d=c(183),e=c(16),f=c(2),g=c(8),h=c(135),i=c(23),j=i("iterator"),k=i("toStringTag"),l=h.Array,m=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],n=0;n<5;n++){var o,p=m[n],q=f[p],r=q&&q.prototype;if(r){r[j]||g(r,j,l),r[k]||g(r,k,p),h[p]=l;for(o in d)r[o]||e(r,o,d[o],!0)}}},function(a,b,c){var d=c(2),e=c(6),f=c(76),g=c(289),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},function(a,b,c){var d=c(290),e=c(76),f=c(19);a.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(18),f=d(6),g=d(15),h=d(67),i=d(44),j=d(57),k=d(28),l=d(9),m=d(27),n=d(19),o=d(198),p=d(292),q=d(136),r=d(184),s=d(11),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(10),e=c(156);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(289);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(290),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(289)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(11)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(73)})},function(a,b,c){var d=c(6),e=c(299);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(9),e=c(49),f=c(221),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(299),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(134)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a<this._l);return{done:b,value:b?c:a}})},function(a,b,c){var d=c(6),e=c(303)(/[\\^$*+?.()|[\]{}]/g,"\\$&");d(d.S,"RegExp",{escape:function escape(a){return e(a)}})},function(a,b){a.exports=function(a,b){var c=b===Object(b)?function(a){return b[a]}:b;return function(b){return String(b).replace(a,c)}}},function(a,b,c){var d=c(6),e=c(303)(/[&<>"']/g,{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(303)(/&(?:amp|lt|gt|quot|apos);/g,{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1);
+!function(b,c,a){"use strict";!function(b){function __webpack_require__(c){if(a[c])return a[c].exports;var d=a[c]={exports:{},id:c,loaded:!1};return b[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var a={};return __webpack_require__.m=b,__webpack_require__.c=a,__webpack_require__.p="",__webpack_require__(0)}([function(b,c,a){a(1),a(34),a(40),a(42),a(44),a(46),a(48),a(50),a(51),a(52),a(53),a(54),a(55),a(56),a(57),a(58),a(59),a(60),a(61),a(64),a(65),a(66),a(68),a(69),a(70),a(71),a(72),a(73),a(74),a(76),a(77),a(78),a(80),a(81),a(82),a(84),a(85),a(86),a(87),a(88),a(89),a(90),a(91),a(92),a(93),a(94),a(95),a(96),a(97),a(99),a(103),a(104),a(106),a(107),a(111),a(116),a(117),a(120),a(122),a(124),a(126),a(127),a(128),a(130),a(131),a(133),a(134),a(135),a(136),a(143),a(146),a(147),a(149),a(150),a(151),a(152),a(153),a(154),a(155),a(156),a(157),a(158),a(159),a(160),a(162),a(163),a(164),a(165),a(166),a(167),a(169),a(170),a(171),a(172),a(174),a(175),a(177),a(178),a(180),a(181),a(182),a(183),a(186),a(114),a(188),a(187),a(189),a(190),a(191),a(192),a(193),a(195),a(196),a(197),a(198),a(199),b.exports=a(200)},function(S,R,b){var r,d=b(2),c=b(3),x=b(8),O=b(7),o=b(14),E=b(15),n=b(17),N=b(18),J=b(19),j=b(9),p=b(20),v=b(13),I=b(16),Q=b(21),y=b(23),K=b(25),w=b(26),h=b(27),s=b(24),m=b(11)("__proto__"),g=b(28),A=b(33)(!1),B=Object.prototype,C=Array.prototype,k=C.slice,M=C.join,F=d.setDesc,L=d.getDesc,q=d.setDescs,u={};x||(r=!j(function(){return 7!=F(E("div"),"a",{get:function(){return 7}}).a}),d.setDesc=function(b,c,a){if(r)try{return F(b,c,a)}catch(d){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(p(b)[c]=a.value),b},d.getDesc=function(a,b){if(r)try{return L(a,b)}catch(c){}return n(a,b)?O(!B.propertyIsEnumerable.call(a,b),a[b]):void 0},d.setDescs=q=function(a,b){p(a);for(var c,e=d.getKeys(b),g=e.length,f=0;g>f;)d.setDesc(a,c=e[f++],b[c]);return a}),c(c.S+c.F*!x,"Object",{getOwnPropertyDescriptor:d.getDesc,defineProperty:d.setDesc,defineProperties:q});var i="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),H=i.concat("length","prototype"),G=i.length,l=function(){var a,b=E("iframe"),c=G,d=">";for(b.style.display="none",o.appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write("<script>document.F=Object</script"+d),a.close(),l=a.F;c--;)delete l.prototype[i[c]];return l()},D=function(a,b){return function(g){var c,e=y(g),f=0,d=[];for(c in e)c!=m&&n(e,c)&&d.push(c);for(;b>f;)n(e,c=a[f++])&&(~A(d,c)||d.push(c));return d}},t=function(){};c(c.S,"Object",{getPrototypeOf:d.getProto=d.getProto||function(a){return a=Q(a),n(a,m)?a[m]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?B:null},getOwnPropertyNames:d.getNames=d.getNames||D(H,H.length,!0),create:d.create=d.create||function(c,d){var b;return null!==c?(t.prototype=p(c),b=new t,t.prototype=null,b[m]=c):b=l(),d===a?b:q(b,d)},keys:d.getKeys=d.getKeys||D(i,G,!1)});var P=function(d,a,e){if(!(a in u)){for(var c=[],b=0;a>b;b++)c[b]="a["+b+"]";u[a]=Function("F,a","return new F("+c.join(",")+")")}return u[a](d,e)};c(c.P,"Function",{bind:function bind(c){var a=v(this),d=k.call(arguments,1),b=function(){var e=d.concat(k.call(arguments));return this instanceof b?P(a,e.length,e):J(a,e,c)};return I(a.prototype)&&(b.prototype=a.prototype),b}}),c(c.P+c.F*j(function(){o&&k.call(o)}),"Array",{slice:function(f,b){var d=h(this.length),g=N(this);if(b=b===a?d:b,"Array"==g)return k.call(this,f,b);for(var e=w(f,d),l=w(b,d),i=h(l-e),j=Array(i),c=0;i>c;c++)j[c]="String"==g?this.charAt(e+c):this[e+c];return j}}),c(c.P+c.F*(s!=Object),"Array",{join:function join(b){return M.call(s(this),b===a?",":b)}}),c(c.S,"Array",{isArray:b(30)});var z=function(a){return function(g,d){v(g);var c=s(this),e=h(c.length),b=a?e-1:0,f=a?-1:1;if(arguments.length<2)for(;;){if(b in c){d=c[b],b+=f;break}if(b+=f,a?0>b:b>=e)throw TypeError("Reduce of empty array with no initial value")}for(;a?b>=0:e>b;b+=f)b in c&&(d=g(d,c[b],b,this));return d}},f=function(a){return function(b){return a(this,b,arguments[1])}};c(c.P,"Array",{forEach:d.each=d.each||f(g(0)),map:f(g(1)),filter:f(g(2)),some:f(g(3)),every:f(g(4)),reduce:z(!1),reduceRight:z(!0),indexOf:f(A),lastIndexOf:function(d,e){var b=y(this),c=h(b.length),a=c-1;for(arguments.length>1&&(a=Math.min(a,K(e))),0>a&&(a=h(c+a));a>=0;a--)if(a in b&&b[a]===d)return a;return-1}}),c(c.S,"Date",{now:function(){return+new Date}});var e=function(a){return a>9?a:"0"+a};c(c.P+c.F*(j(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!j(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(this))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+e(a.getUTCMonth()+1)+"-"+e(a.getUTCDate())+"T"+e(a.getUTCHours())+":"+e(a.getUTCMinutes())+":"+e(a.getUTCSeconds())+"."+(c>99?c:"0"+e(c))+"Z"}})},function(b,c){var a=Object;b.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},function(g,j,c){var b=c(4),d=c(5),h=c(6),i=c(10),f=c(12),e="prototype",a=function(k,j,o){var g,m,c,s,v=k&a.F,p=k&a.G,u=k&a.S,r=k&a.P,t=k&a.B,l=p?b:u?b[j]||(b[j]={}):(b[j]||{})[e],n=p?d:d[j]||(d[j]={}),q=n[e]||(n[e]={});p&&(o=j);for(g in o)m=!v&&l&&g in l,c=(m?l:o)[g],s=t&&m?f(c,b):r&&"function"==typeof c?f(Function.call,c):c,l&&!m&&i(l,g,c),n[g]!=c&&h(n,g,s),r&&q[g]!=c&&(q[g]=c)};b.core=d,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,g.exports=a},function(a,d){var b=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof c&&(c=b)},function(a,d){var c=a.exports={version:"1.2.6"};"number"==typeof b&&(b=c)},function(b,e,a){var c=a(2),d=a(7);b.exports=a(8)?function(a,b,e){return c.setDesc(a,b,d(1,e))}:function(a,b,c){return a[b]=c,a}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,c,b){a.exports=!b(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(f,i,a){var g=a(4),b=a(6),c=a(11)("src"),d="toString",e=Function[d],h=(""+e).split(d);a(5).inspectSource=function(a){return e.call(a)},(f.exports=function(e,a,d,f){"function"==typeof d&&(d.hasOwnProperty(c)||b(d,c,e[a]?""+e[a]:h.join(String(a))),d.hasOwnProperty("name")||b(d,"name",a)),e===g?e[a]=d:(f||delete e[a],b(e,a,d))})(Function.prototype,d,function toString(){return"function"==typeof this&&this[c]||e.call(this)})},function(b,e){var c=0,d=Math.random();b.exports=function(b){return"Symbol(".concat(b===a?"":b,")_",(++c+d).toString(36))}},function(b,e,c){var d=c(13);b.exports=function(b,c,e){if(d(b),c===a)return b;switch(e){case 1:return function(a){return b.call(c,a)};case 2:return function(a,d){return b.call(c,a,d)};case 3:return function(a,d,e){return b.call(c,a,d,e)}}return function(){return b.apply(c,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,c,b){a.exports=b(4).document&&document.documentElement},function(d,f,b){var c=b(16),a=b(4).document,e=c(a)&&c(a.createElement);d.exports=function(b){return e?a.createElement(b):{}}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,c){var b={}.hasOwnProperty;a.exports=function(a,c){return b.call(a,c)}},function(a,c){var b={}.toString;a.exports=function(a){return b.call(a).slice(8,-1)}},function(b,c){b.exports=function(c,b,d){var e=d===a;switch(b.length){case 0:return e?c():c.call(d);case 1:return e?c(b[0]):c.call(d,b[0]);case 2:return e?c(b[0],b[1]):c.call(d,b[0],b[1]);case 3:return e?c(b[0],b[1],b[2]):c.call(d,b[0],b[1],b[2]);case 4:return e?c(b[0],b[1],b[2],b[3]):c.call(d,b[0],b[1],b[2],b[3])}return c.apply(d,b)}},function(a,d,b){var c=b(16);a.exports=function(a){if(!c(a))throw TypeError(a+" is not an object!");return a}},function(a,d,b){var c=b(22);a.exports=function(a){return Object(c(a))}},function(b,c){b.exports=function(b){if(b==a)throw TypeError("Can't call method on "+b);return b}},function(b,e,a){var c=a(24),d=a(22);b.exports=function(a){return c(d(a))}},function(a,d,b){var c=b(18);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==c(a)?a.split(""):Object(a)}},function(a,d){var b=Math.ceil,c=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?c:b)(a)}},function(a,f,b){var c=b(25),d=Math.max,e=Math.min;a.exports=function(a,b){return a=c(a),0>a?d(a+b,0):e(a,b)}},function(a,e,b){var c=b(25),d=Math.min;a.exports=function(a){return a>0?d(c(a),9007199254740991):0}},function(d,i,b){var e=b(12),f=b(24),g=b(21),h=b(27),c=b(29);d.exports=function(b){var i=1==b,k=2==b,l=3==b,d=4==b,j=6==b,m=5==b||j;return function(p,v,x){for(var o,r,u=g(p),s=f(u),w=e(v,x,3),t=h(s.length),n=0,q=i?c(p,t):k?c(p,0):a;t>n;n++)if((m||n in s)&&(o=s[n],r=w(o,n,u),b))if(i)q[n]=r;else if(r)switch(b){case 3:return!0;case 5:return o;case 6:return n;case 2:q.push(o)}else if(d)return!1;return j?-1:l||d?d:q}}},function(d,g,b){var e=b(16),c=b(30),f=b(31)("species");d.exports=function(d,g){var b;return c(d)&&(b=d.constructor,"function"!=typeof b||b!==Array&&!c(b.prototype)||(b=a),e(b)&&(b=b[f],null===b&&(b=a))),new(b===a?Array:b)(g)}},function(a,d,b){var c=b(18);a.exports=Array.isArray||function(a){return"Array"==c(a)}},function(d,f,a){var c=a(32)("wks"),e=a(11),b=a(4).Symbol;d.exports=function(a){return c[a]||(c[a]=b&&b[a]||(b||e)("Symbol."+a))}},function(d,f,e){var a=e(4),b="__core-js_shared__",c=a[b]||(a[b]={});d.exports=function(a){return c[a]||(c[a]={})}},function(b,f,a){var c=a(23),d=a(27),e=a(26);b.exports=function(a){return function(j,g,k){var h,f=c(j),i=d(f.length),b=e(k,i);if(a&&g!=g){for(;i>b;)if(h=f[b++],h!=h)return!0}else for(;i>b;b++)if((a||b in f)&&f[b]===g)return a||b;return!a&&-1}}},function(W,V,b){var e=b(2),x=b(4),d=b(17),w=b(8),f=b(3),G=b(10),H=b(9),J=b(32),s=b(35),S=b(11),A=b(31),R=b(36),C=b(37),Q=b(38),P=b(30),O=b(20),p=b(23),v=b(7),I=e.getDesc,i=e.setDesc,k=e.create,z=C.get,g=x.Symbol,l=x.JSON,m=l&&l.stringify,n=!1,c=A("_hidden"),N=e.isEnum,o=J("symbol-registry"),h=J("symbols"),q="function"==typeof g,j=Object.prototype,y=w&&H(function(){return 7!=k(i({},"a",{get:function(){return i(this,"a",{value:7}).a}})).a})?function(c,a,d){var b=I(j,a);b&&delete j[a],i(c,a,d),b&&c!==j&&i(j,a,b)}:i,L=function(a){var b=h[a]=k(g.prototype);return b._k=a,w&&n&&y(j,a,{configurable:!0,set:function(b){d(this,c)&&d(this[c],a)&&(this[c][a]=!1),y(this,a,v(1,b))}}),b},r=function(a){return"symbol"==typeof a},t=function defineProperty(a,b,e){return e&&d(h,b)?(e.enumerable?(d(a,c)&&a[c][b]&&(a[c][b]=!1),e=k(e,{enumerable:v(0,!1)})):(d(a,c)||i(a,c,v(1,{})),a[c][b]=!0),y(a,b,e)):i(a,b,e)},u=function defineProperties(a,b){O(a);for(var c,d=Q(b=p(b)),e=0,f=d.length;f>e;)t(a,c=d[e++],b[c]);return a},F=function create(b,c){return c===a?k(b):u(k(b),c)},E=function propertyIsEnumerable(a){var b=N.call(this,a);return b||!d(this,a)||!d(h,a)||d(this,c)&&this[c][a]?b:!0},D=function getOwnPropertyDescriptor(a,b){var e=I(a=p(a),b);return!e||!d(h,b)||d(a,c)&&a[c][b]||(e.enumerable=!0),e},B=function getOwnPropertyNames(g){for(var a,b=z(p(g)),e=[],f=0;b.length>f;)d(h,a=b[f++])||a==c||e.push(a);return e},M=function getOwnPropertySymbols(f){for(var a,b=z(p(f)),c=[],e=0;b.length>e;)d(h,a=b[e++])&&c.push(h[a]);return c},T=function stringify(e){if(e!==a&&!r(e)){for(var b,c,d=[e],f=1,g=arguments;g.length>f;)d.push(g[f++]);return b=d[1],"function"==typeof b&&(c=b),(c||!P(b))&&(b=function(b,a){return c&&(a=c.call(this,b,a)),r(a)?void 0:a}),d[1]=b,m.apply(l,d)}},U=H(function(){var a=g();return"[null]"!=m([a])||"{}"!=m({a:a})||"{}"!=m(Object(a))});q||(g=function Symbol(){if(r(this))throw TypeError("Symbol is not a constructor");return L(S(arguments.length>0?arguments[0]:a))},G(g.prototype,"toString",function toString(){return this._k}),r=function(a){return a instanceof g},e.create=F,e.isEnum=E,e.getDesc=D,e.setDesc=t,e.setDescs=u,e.getNames=C.get=B,e.getSymbols=M,w&&!b(39)&&G(j,"propertyIsEnumerable",E,!0));var K={"for":function(a){return d(o,a+="")?o[a]:o[a]=g(a)},keyFor:function keyFor(a){return R(o,a)},useSetter:function(){n=!0},useSimple:function(){n=!1}};e.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=A(a);K[a]=q?b:L(b)}),n=!0,f(f.G+f.W,{Symbol:g}),f(f.S,"Symbol",K),f(f.S+f.F*!q,"Object",{create:F,defineProperty:t,defineProperties:u,getOwnPropertyDescriptor:D,getOwnPropertyNames:B,getOwnPropertySymbols:M}),l&&f(f.S+f.F*(!q||U),"JSON",{stringify:T}),s(g,"Symbol"),s(Math,"Math",!0),s(x.JSON,"JSON",!0)},function(c,f,a){var d=a(2).setDesc,e=a(17),b=a(31)("toStringTag");c.exports=function(a,c,f){a&&!e(a=f?a:a.prototype,b)&&d(a,b,{configurable:!0,value:c})}},function(b,e,a){var c=a(2),d=a(23);b.exports=function(g,h){for(var a,b=d(g),e=c.getKeys(b),i=e.length,f=0;i>f;)if(b[a=e[f++]]===h)return a}},function(d,h,a){var e=a(23),b=a(2).getNames,f={}.toString,c="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(a){try{return b(a)}catch(d){return c.slice()}};d.exports.get=function getOwnPropertyNames(a){return c&&"[object Window]"==f.call(a)?g(a):b(e(a))}},function(b,d,c){var a=c(2);b.exports=function(b){var c=a.getKeys(b),d=a.getSymbols;if(d)for(var e,f=d(b),h=a.isEnum,g=0;f.length>g;)h.call(b,e=f[g++])&&c.push(e);return c}},function(a,b){a.exports=!1},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{assign:b(41)})},function(c,f,a){var b=a(2),d=a(21),e=a(24);c.exports=a(9)(function(){var a=Object.assign,b={},c={},d=Symbol(),e="abcdefghijklmnopqrst";return b[d]=7,e.split("").forEach(function(a){c[a]=a}),7!=a({},b)[d]||Object.keys(a({},c)).join("")!=e})?function assign(n,q){for(var g=d(n),h=arguments,o=h.length,j=1,f=b.getKeys,l=b.getSymbols,m=b.isEnum;o>j;)for(var c,a=e(h[j++]),k=l?f(a).concat(l(a)):f(a),p=k.length,i=0;p>i;)m.call(a,c=k[i++])&&(g[c]=a[c]);return g}:Object.assign},function(c,d,a){var b=a(3);b(b.S,"Object",{is:a(43)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(c,d,a){var b=a(3);b(b.S,"Object",{setPrototypeOf:a(45).set})},function(d,h,b){var e=b(2).getDesc,f=b(16),g=b(20),c=function(b,a){if(g(b),!f(a)&&null!==a)throw TypeError(a+": can't set as prototype!")};d.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(f,a,d){try{d=b(12)(Function.call,e(Object.prototype,"__proto__").set,2),d(f,[]),a=!(f instanceof Array)}catch(g){a=!0}return function setPrototypeOf(b,e){return c(b,e),a?b.__proto__=e:d(b,e),b}}({},!1):a),check:c}},function(d,e,a){var c=a(47),b={};b[a(31)("toStringTag")]="z",b+""!="[object z]"&&a(10)(Object.prototype,"toString",function toString(){return"[object "+c(this)+"]"},!0)},function(d,g,c){var b=c(18),e=c(31)("toStringTag"),f="Arguments"==b(function(){return arguments}());d.exports=function(d){var c,g,h;return d===a?"Undefined":null===d?"Null":"string"==typeof(g=(c=Object(d))[e])?g:f?b(c):"Object"==(h=b(c))&&"function"==typeof c.callee?"Arguments":h}},function(c,d,a){var b=a(16);a(49)("freeze",function(a){return function freeze(c){return a&&b(c)?a(c):c}})},function(c,f,a){var b=a(3),d=a(5),e=a(9);c.exports=function(a,g){var c=(d.Object||{})[a]||Object[a],f={};f[a]=g(c),b(b.S+b.F*e(function(){c(1)}),"Object",f)}},function(c,d,a){var b=a(16);a(49)("seal",function(a){return function seal(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(16);a(49)("preventExtensions",function(a){return function preventExtensions(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(16);a(49)("isFrozen",function(a){return function isFrozen(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(16);a(49)("isSealed",function(a){return function isSealed(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(16);a(49)("isExtensible",function(a){return function isExtensible(c){return b(c)?a?a(c):!0:!1}})},function(c,d,a){var b=a(23);a(49)("getOwnPropertyDescriptor",function(a){return function getOwnPropertyDescriptor(c,d){return a(b(c),d)}})},function(c,d,a){var b=a(21);a(49)("getPrototypeOf",function(a){return function getPrototypeOf(c){return a(b(c))}})},function(c,d,a){var b=a(21);a(49)("keys",function(a){return function keys(c){return a(b(c))}})},function(b,c,a){a(49)("getOwnPropertyNames",function(){return a(37).get})},function(h,i,a){var c=a(2).setDesc,e=a(7),f=a(17),d=Function.prototype,g=/^\s*function ([^ (]*)/,b="name";b in d||a(8)&&c(d,b,{configurable:!0,get:function(){var a=(""+this).match(g),d=a?a[1]:"";return f(this,b)||c(this,b,e(5,d)),d}})},function(f,g,a){var b=a(2),c=a(16),d=a(31)("hasInstance"),e=Function.prototype;d in e||b.setDesc(e,d,{value:function(a){if("function"!=typeof this||!c(a))return!1;if(!c(this.prototype))return a instanceof this;for(;a=b.getProto(a);)if(this.prototype===a)return!0;return!1}})},function(q,p,b){var c=b(2),h=b(4),i=b(17),j=b(18),l=b(62),k=b(9),n=b(63).trim,d="Number",a=h[d],e=a,f=a.prototype,o=j(c.create(f))==d,m="trim"in String.prototype,g=function(i){var a=l(i,!1);if("string"==typeof a&&a.length>2){a=m?a.trim():n(a,3);var b,c,d,e=a.charCodeAt(0);if(43===e||45===e){if(b=a.charCodeAt(2),88===b||120===b)return NaN}else if(48===e){switch(a.charCodeAt(1)){case 66:case 98:c=2,d=49;break;case 79:case 111:c=8,d=55;break;default:return+a}for(var f,g=a.slice(2),h=0,j=g.length;j>h;h++)if(f=g.charCodeAt(h),48>f||f>d)return NaN;return parseInt(g,c)}}return+a};a(" 0o1")&&a("0b1")&&!a("+0x1")||(a=function Number(h){var c=arguments.length<1?0:h,b=this;return b instanceof a&&(o?k(function(){f.valueOf.call(b)}):j(b)!=d)?new e(g(c)):g(c)},c.each.call(b(8)?c.getNames(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(b){i(e,b)&&!i(a,b)&&c.setDesc(a,b,c.getDesc(e,b))}),a.prototype=f,f.constructor=a,b(10)(h,d,a))},function(b,d,c){var a=c(16);b.exports=function(b,e){if(!a(b))return b;var c,d;if(e&&"function"==typeof(c=b.toString)&&!a(d=c.call(b)))return d;if("function"==typeof(c=b.valueOf)&&!a(d=c.call(b)))return d;if(!e&&"function"==typeof(c=b.toString)&&!a(d=c.call(b)))return d;throw TypeError("Can't convert object to primitive value")}},function(g,m,b){var c=b(3),h=b(22),i=b(9),d=" \n \f\r   ᠎              \u2028\u2029\ufeff",a="["+d+"]",f="​…",j=RegExp("^"+a+a+"*"),k=RegExp(a+a+"*$"),e=function(a,e){var b={};b[a]=e(l),c(c.P+c.F*i(function(){return!!d[a]()||f[a]()!=f}),"String",b)},l=e.trim=function(a,b){return a=String(h(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};g.exports=e},function(c,d,b){var a=b(3);a(a.S,"Number",{EPSILON:Math.pow(2,-52)})},function(d,e,a){var b=a(3),c=a(4).isFinite;b(b.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&c(a)}})},function(c,d,a){var b=a(3);b(b.S,"Number",{isInteger:a(67)})},function(a,e,b){var c=b(16),d=Math.floor;a.exports=function isInteger(a){return!c(a)&&isFinite(a)&&d(a)===a}},function(c,d,b){var a=b(3);a(a.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(e,f,a){var b=a(3),c=a(67),d=Math.abs;b(b.S,"Number",{isSafeInteger:function isSafeInteger(a){return c(a)&&d(a)<=9007199254740991}})},function(c,d,b){var a=b(3);a(a.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseFloat:parseFloat})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseInt:parseInt})},function(f,g,b){var a=b(3),e=b(75),c=Math.sqrt,d=Math.acosh;a(a.S+a.F*!(d&&710==Math.floor(d(Number.MAX_VALUE))),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+c(a-1)*c(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&1e-8>a?a-a*a/2:Math.log(1+a)}},function(c,d,b){function asinh(a){return isFinite(a=+a)&&0!=a?0>a?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var a=b(3);a(a.S,"Math",{asinh:asinh})},function(c,d,b){var a=b(3);a(a.S,"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(d,e,a){var b=a(3),c=a(79);b(b.S,"Math",{cbrt:function cbrt(a){return c(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:0>a?-1:1}},function(c,d,b){var a=b(3);a(a.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(d,e,c){var a=c(3),b=Math.exp;a(a.S,"Math",{cosh:function cosh(a){return(b(a=+a)+b(-a))/2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{expm1:a(83)})},function(a,b){a.exports=Math.expm1||function expm1(a){return 0==(a=+a)?a:a>-1e-6&&1e-6>a?a+a*a/2:Math.exp(a)-1}},function(k,j,e){var f=e(3),g=e(79),a=Math.pow,d=a(2,-52),b=a(2,-23),i=a(2,127)*(2-b),c=a(2,-126),h=function(a){return a+1/d-1/d};f(f.S,"Math",{fround:function fround(k){var f,a,e=Math.abs(k),j=g(k);return c>e?j*h(e/c/b)*c*b:(f=(1+b/d)*e,a=f-(f-e),a>i||a!=a?j*(1/0):j*a)}})},function(d,e,b){var a=b(3),c=Math.abs;a(a.S,"Math",{hypot:function hypot(i,j){for(var a,b,e=0,f=0,g=arguments,h=g.length,d=0;h>f;)a=c(g[f++]),a>d?(b=d/a,e=e*b*b+1,d=a):a>0?(b=a/d,e+=b*b):e+=a;return d===1/0?1/0:d*Math.sqrt(e)}})},function(d,e,b){var a=b(3),c=Math.imul;a(a.S+a.F*b(9)(function(){return-5!=c(4294967295,5)||2!=c.length}),"Math",{imul:function imul(f,g){var a=65535,b=+f,c=+g,d=a&b,e=a&c;return 0|d*e+((a&b>>>16)*e+d*(a&c>>>16)<<16>>>0)}})},function(c,d,b){var a=b(3);a(a.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(c,d,a){var b=a(3);b(b.S,"Math",{log1p:a(75)})},function(c,d,b){var a=b(3);a(a.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{sign:a(79)})},function(e,f,a){var b=a(3),c=a(83),d=Math.exp;b(b.S+b.F*a(9)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(c(a)-c(-a))/2:(d(a-1)-d(-a-1))*(Math.E/2)}})},function(e,f,a){var b=a(3),c=a(83),d=Math.exp;b(b.S,"Math",{tanh:function tanh(a){var b=c(a=+a),e=c(-a);return b==1/0?1:e==1/0?-1:(b-e)/(d(a)+d(-a))}})},function(c,d,b){var a=b(3);a(a.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(f,g,b){var a=b(3),e=b(26),c=String.fromCharCode,d=String.fromCodePoint;a(a.S+a.F*(!!d&&1!=d.length),"String",{fromCodePoint:function fromCodePoint(h){for(var a,b=[],d=arguments,g=d.length,f=0;g>f;){if(a=+d[f++],e(a,1114111)!==a)throw RangeError(a+" is not a valid code point");b.push(65536>a?c(a):c(((a-=65536)>>10)+55296,a%1024+56320))}return b.join("")}})},function(e,f,a){var b=a(3),c=a(23),d=a(27);b(b.S,"String",{raw:function raw(g){for(var e=c(g.raw),h=d(e.length),f=arguments,i=f.length,b=[],a=0;h>a;)b.push(String(e[a++])),i>a&&b.push(String(f[a]));return b.join("")}})},function(b,c,a){a(63)("trim",function(a){return function trim(){return a(this,3)}})},function(d,e,a){var b=a(3),c=a(98)(!1);b(b.P,"String",{codePointAt:function codePointAt(a){return c(this,a)}})},function(c,f,b){var d=b(25),e=b(22);c.exports=function(b){return function(j,k){var f,h,g=String(e(j)),c=d(k),i=g.length;return 0>c||c>=i?b?"":a:(f=g.charCodeAt(c),55296>f||f>56319||c+1===i||(h=g.charCodeAt(c+1))<56320||h>57343?b?g.charAt(c):f:b?g.slice(c,c+2):(f-55296<<10)+(h-56320)+65536)}}},function(h,i,b){var c=b(3),e=b(27),g=b(100),d="endsWith",f=""[d];c(c.P+c.F*b(102)(d),"String",{endsWith:function endsWith(i){var b=g(this,i,d),j=arguments,k=j.length>1?j[1]:a,l=e(b.length),c=k===a?l:Math.min(e(k),l),h=String(i);return f?f.call(b,h,c):b.slice(c-h.length,c)===h}})},function(b,e,a){var c=a(101),d=a(22);b.exports=function(a,b,e){if(c(b))throw TypeError("String#"+e+" doesn't accept regex!");return String(d(a))}},function(c,g,b){var d=b(16),e=b(18),f=b(31)("match");c.exports=function(b){var c;return d(b)&&((c=b[f])!==a?!!c:"RegExp"==e(b))}},function(a,d,b){var c=b(31)("match");a.exports=function(b){var a=/./;try{"/./"[b](a)}catch(d){try{return a[c]=!1,!"/./"[b](a)}catch(e){}}return!0}},function(f,g,b){var c=b(3),e=b(100),d="includes";c(c.P+c.F*b(102)(d),"String",{includes:function includes(b){return!!~e(this,b,d).indexOf(b,arguments.length>1?arguments[1]:a)}})},function(c,d,a){var b=a(3);b(b.P,"String",{repeat:a(105)})},function(b,e,a){var c=a(25),d=a(22);b.exports=function repeat(f){var b=String(d(this)),e="",a=c(f);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(b+=b))1&a&&(e+=b);return e}},function(h,i,b){var c=b(3),f=b(27),g=b(100),d="startsWith",e=""[d];c(c.P+c.F*b(102)(d),"String",{startsWith:function startsWith(i){var b=g(this,i,d),j=arguments,c=f(Math.min(j.length>1?j[1]:a,b.length)),h=String(i);return e?e.call(b,h,c):b.slice(c,c+h.length)===h}})},function(d,e,b){var c=b(98)(!0);b(108)(String,"String",function(a){this._t=String(a),this._i=0},function(){var b,d=this._t,e=this._i;return e>=d.length?{value:a,done:!0}:(b=c(d,e),this._i+=b.length,{value:b,done:!1})})},function(o,r,a){var i=a(39),d=a(3),n=a(10),h=a(6),m=a(17),f=a(109),q=a(110),p=a(35),l=a(2).getProto,c=a(31)("iterator"),e=!([].keys&&"next"in[].keys()),j="@@iterator",k="keys",b="values",g=function(){return this};o.exports=function(B,v,u,F,s,E,A){q(u,v,F);var r,x,w=function(c){if(!e&&c in a)return a[c];switch(c){case k:return function keys(){return new u(this,c)};case b:return function values(){return new u(this,c)}}return function entries(){return new u(this,c)}},C=v+" Iterator",y=s==b,z=!1,a=B.prototype,t=a[c]||a[j]||s&&a[s],o=t||w(s);if(t){var D=l(o.call(new B));p(D,C,!0),!i&&m(a,j)&&h(D,c,g),y&&t.name!==b&&(z=!0,o=function values(){return t.call(this)})}if(i&&!A||!e&&!z&&a[c]||h(a,c,o),f[v]=o,f[C]=g,s)if(r={values:y?o:w(b),keys:E?o:w(k),entries:y?w("entries"):o},A)for(x in r)x in a||n(a,x,r[x]);else d(d.P+d.F*(e||z),v,r);return r}},function(a,b){a.exports={}},function(c,g,a){var d=a(2),e=a(7),f=a(35),b={};a(6)(b,a(31)("iterator"),function(){return this}),c.exports=function(a,c,g){a.prototype=d.create(b,{next:e(1,g)}),f(a,c+" Iterator")}},function(j,k,b){var d=b(12),c=b(3),e=b(21),f=b(112),g=b(113),h=b(27),i=b(114);c(c.S+c.F*!b(115)(function(a){Array.from(a)}),"Array",{from:function from(t){var n,c,r,m,j=e(t),l="function"==typeof this?this:Array,p=arguments,s=p.length,k=s>1?p[1]:a,q=k!==a,b=0,o=i(j);if(q&&(k=d(k,s>2?p[2]:a,2)),o==a||l==Array&&g(o))for(n=h(j.length),c=new l(n);n>b;b++)c[b]=q?k(j[b],b):j[b];else for(m=o.call(j),c=new l;!(r=m.next()).done;b++)c[b]=q?f(m,k,[r.value,b],!0):r.value;return c.length=b,c}})},function(c,e,d){var b=d(20);c.exports=function(d,e,c,g){try{return g?e(b(c)[0],c[1]):e(c)}catch(h){var f=d["return"];throw f!==a&&b(f.call(d)),h}}},function(c,g,b){var d=b(109),e=b(31)("iterator"),f=Array.prototype;c.exports=function(b){return b!==a&&(d.Array===b||f[e]===b)}},function(c,g,b){var d=b(47),e=b(31)("iterator"),f=b(109);c.exports=b(5).getIteratorMethod=function(b){return b!=a?b[e]||b["@@iterator"]||f[d(b)]:void 0}},function(d,f,e){var a=e(31)("iterator"),b=!1;try{var c=[7][a]();c["return"]=function(){b=!0},Array.from(c,function(){throw 2})}catch(g){}d.exports=function(f,g){if(!g&&!b)return!1;var d=!1;try{var c=[7],e=c[a]();e.next=function(){return{done:d=!0}},c[a]=function(){return e},f(c)}catch(h){}return d}},function(c,d,b){var a=b(3);a(a.S+a.F*b(9)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,d=arguments,b=d.length,c=new("function"==typeof this?this:Array)(b);b>a;)c[a]=d[a++];return c.length=b,c}})},function(f,h,b){var d=b(118),c=b(119),e=b(109),g=b(23);f.exports=b(108)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var d=this._t,e=this._k,b=this._i++;return!d||b>=d.length?(this._t=a,c(1)):"keys"==e?c(0,b):"values"==e?c(0,d[b]):c(0,[b,d[b]])},"values"),e.Arguments=e.Array,d("keys"),d("values"),d("entries")},function(e,f,d){var b=d(31)("unscopables"),c=Array.prototype;c[b]==a&&d(6)(c,b,{}),e.exports=function(a){c[b][a]=!0}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(b,c,a){a(121)("Array")},function(c,g,a){var d=a(4),e=a(2),f=a(8),b=a(31)("species");c.exports=function(c){var a=d[c];f&&a&&!a[b]&&e.setDesc(a,b,{configurable:!0,get:function(){return this}})}},function(c,d,a){var b=a(3);b(b.P,"Array",{copyWithin:a(123)}),a(118)("copyWithin")},function(d,g,b){var e=b(21),c=b(26),f=b(27);d.exports=[].copyWithin||function copyWithin(m,n){var g=e(this),h=f(g.length),b=c(m,h),d=c(n,h),k=arguments,l=k.length>2?k[2]:a,i=Math.min((l===a?h:c(l,h))-d,h-b),j=1;for(b>d&&d+i>b&&(j=-1,d+=i-1,b+=i-1);i-->0;)d in g?g[b]=g[d]:delete g[b],b+=j,d+=j;return g}},function(c,d,a){var b=a(3);b(b.P,"Array",{fill:a(125)}),a(118)("fill")},function(d,g,b){var e=b(21),c=b(26),f=b(27);d.exports=[].fill||function fill(k){for(var b=e(this),d=f(b.length),g=arguments,h=g.length,i=c(h>1?g[1]:a,d),j=h>2?g[2]:a,l=j===a?d:c(j,d);l>i;)b[i++]=k;return b}},function(g,h,b){var c=b(3),f=b(28)(5),d="find",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{find:function find(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(118)(d)},function(g,h,b){var c=b(3),f=b(28)(6),d="findIndex",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{findIndex:function findIndex(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(118)(d)},function(n,m,c){var f=c(2),i=c(4),k=c(101),l=c(129),b=i.RegExp,d=b,j=b.prototype,e=/a/g,g=/a/g,h=new b(e)!==e;!c(8)||h&&!c(9)(function(){return g[c(31)("match")]=!1,b(e)!=e||b(g)==g||"/a/i"!=b(e,"i")})||(b=function RegExp(c,f){var e=k(c),g=f===a;return this instanceof b||!e||c.constructor!==b||!g?h?new d(e&&!g?c.source:c,f):d((e=c instanceof b)?c.source:c,e&&g?l.call(c):f):c},f.each.call(f.getNames(d),function(a){a in b||f.setDesc(b,a,{configurable:!0,get:function(){return d[a]},set:function(b){d[a]=b}})}),j.constructor=b,b.prototype=j,c(10)(i,"RegExp",b)),c(121)("RegExp")},function(a,d,b){var c=b(20);a.exports=function(){var b=c(this),a="";return b.global&&(a+="g"),b.ignoreCase&&(a+="i"),b.multiline&&(a+="m"),b.unicode&&(a+="u"),b.sticky&&(a+="y"),a}},function(c,d,a){var b=a(2);a(8)&&"g"!=/./g.flags&&b.setDesc(RegExp.prototype,"flags",{configurable:!0,get:a(129)})},function(c,d,b){b(132)("match",1,function(c,b){return function match(d){var e=c(this),f=d==a?a:d[b];return f!==a?f.call(d,e):new RegExp(d)[b](String(e))}})},function(b,h,a){var c=a(6),d=a(10),e=a(9),f=a(22),g=a(31);b.exports=function(a,i,j){var b=g(a),h=""[a];e(function(){var c={};return c[b]=function(){return 7},7!=""[a](c)})&&(d(String.prototype,a,j(f,b,h)),c(RegExp.prototype,b,2==i?function(a,b){return h.call(a,this,b)}:function(a){return h.call(a,this)}))}},function(c,d,b){b(132)("replace",2,function(b,c,d){return function replace(e,f){var g=b(this),h=e==a?a:e[c];return h!==a?h.call(e,g,f):d.call(String(g),e,f)}})},function(c,d,b){b(132)("search",1,function(c,b){return function search(d){var e=c(this),f=d==a?a:d[b];return f!==a?f.call(d,e):new RegExp(d)[b](String(e))}})},function(c,d,b){b(132)("split",2,function(b,c,d){return function split(e,f){var g=b(this),h=e==a?a:e[c];return h!==a?h.call(e,g,f):d.call(String(g),e,f)}})},function(K,J,b){var s,l=b(2),F=b(39),k=b(4),j=b(12),I=b(47),d=b(3),D=b(16),E=b(20),m=b(13),G=b(137),p=b(138),q=b(45).set,A=b(43),B=b(31)("species"),z=b(139),v=b(140),e="Promise",o=k.process,H="process"==I(o),c=k[e],i=function(){},r=function(d){var b,a=new c(i);return d&&(a.constructor=function(a){a(i,i)}),(b=c.resolve(a))["catch"](i),b===a},h=function(){function P2(b){var a=new c(b);return q(a,P2.prototype),a}var a=!1;try{if(a=c&&c.resolve&&r(),q(P2,c),
+P2.prototype=l.create(c.prototype,{constructor:{value:P2}}),P2.resolve(5).then(function(){})instanceof P2||(a=!1),a&&b(8)){var d=!1;c.resolve(l.setDesc({},"then",{get:function(){d=!0}})),a=d}}catch(e){a=!1}return a}(),C=function(a,b){return F&&a===c&&b===s?!0:A(a,b)},t=function(b){var c=E(b)[B];return c!=a?c:b},u=function(a){var b;return D(a)&&"function"==typeof(b=a.then)?b:!1},g=function(d){var b,c;this.promise=new d(function(d,e){if(b!==a||c!==a)throw TypeError("Bad Promise constructor");b=d,c=e}),this.resolve=m(b),this.reject=m(c)},w=function(a){try{a()}catch(b){return{error:b}}},n=function(b,d){if(!b.n){b.n=!0;var c=b.c;v(function(){for(var e=b.v,f=1==b.s,g=0,h=function(a){var c,h,g=f?a.ok:a.fail,i=a.resolve,d=a.reject;try{g?(f||(b.h=!0),c=g===!0?e:g(e),c===a.promise?d(TypeError("Promise-chain cycle")):(h=u(c))?h.call(c,i,d):i(c)):d(e)}catch(j){d(j)}};c.length>g;)h(c[g++]);c.length=0,b.n=!1,d&&setTimeout(function(){var f,c,d=b.p;y(d)&&(H?o.emit("unhandledRejection",e,d):(f=k.onunhandledrejection)?f({promise:d,reason:e}):(c=k.console)&&c.error&&c.error("Unhandled promise rejection",e)),b.a=a},1)})}},y=function(e){var a,b=e._d,c=b.a||b.c,d=0;if(b.h)return!1;for(;c.length>d;)if(a=c[d++],a.fail||!y(a.promise))return!1;return!0},f=function(b){var a=this;a.d||(a.d=!0,a=a.r||a,a.v=b,a.s=2,a.a=a.c.slice(),n(a,!0))},x=function(b){var c,a=this;if(!a.d){a.d=!0,a=a.r||a;try{if(a.p===b)throw TypeError("Promise can't be resolved itself");(c=u(b))?v(function(){var d={r:a,d:!1};try{c.call(b,j(x,d,1),j(f,d,1))}catch(e){f.call(d,e)}}):(a.v=b,a.s=1,n(a,!1))}catch(d){f.call({r:a,d:!1},d)}}};h||(c=function Promise(d){m(d);var b=this._d={p:G(this,c,e),c:[],a:a,s:0,d:!1,v:a,h:!1,n:!1};try{d(j(x,b,1),j(f,b,1))}catch(g){f.call(b,g)}},b(142)(c.prototype,{then:function then(d,e){var a=new g(z(this,c)),f=a.promise,b=this._d;return a.ok="function"==typeof d?d:!0,a.fail="function"==typeof e&&e,b.c.push(a),b.a&&b.a.push(a),b.s&&n(b,!1),f},"catch":function(b){return this.then(a,b)}})),d(d.G+d.W+d.F*!h,{Promise:c}),b(35)(c,e),b(121)(e),s=b(5)[e],d(d.S+d.F*!h,e,{reject:function reject(b){var a=new g(this),c=a.reject;return c(b),a.promise}}),d(d.S+d.F*(!h||r(!0)),e,{resolve:function resolve(a){if(a instanceof c&&C(a.constructor,this))return a;var b=new g(this),d=b.resolve;return d(a),b.promise}}),d(d.S+d.F*!(h&&b(115)(function(a){c.all(a)["catch"](function(){})})),e,{all:function all(h){var c=t(this),b=new g(c),d=b.resolve,e=b.reject,a=[],f=w(function(){p(h,!1,a.push,a);var b=a.length,f=Array(b);b?l.each.call(a,function(g,h){var a=!1;c.resolve(g).then(function(c){a||(a=!0,f[h]=c,--b||d(f))},e)}):d(f)});return f&&e(f.error),b.promise},race:function race(e){var b=t(this),a=new g(b),c=a.reject,d=w(function(){p(e,!1,function(d){b.resolve(d).then(a.resolve,c)})});return d&&c(d.error),a.promise}})},function(a,b){a.exports=function(a,b,c){if(!(a instanceof b))throw TypeError(c+": use the 'new' operator!");return a}},function(b,i,a){var c=a(12),d=a(112),e=a(113),f=a(20),g=a(27),h=a(114);b.exports=function(a,j,o,p){var n,b,k,l=h(a),m=c(o,p,j?2:1),i=0;if("function"!=typeof l)throw TypeError(a+" is not iterable!");if(e(l))for(n=g(a.length);n>i;i++)j?m(f(b=a[i])[0],b[1]):m(a[i]);else for(k=l.call(a);!(b=k.next()).done;)d(k,m,b.value,j)}},function(d,g,b){var c=b(20),e=b(13),f=b(31)("species");d.exports=function(g,h){var b,d=c(g).constructor;return d===a||(b=c(d)[f])==a?h:e(b)}},function(n,p,h){var b,f,g,c=h(4),o=h(141).set,k=c.MutationObserver||c.WebKitMutationObserver,d=c.process,i=c.Promise,j="process"==h(18)(d),e=function(){var e,c,g;for(j&&(e=d.domain)&&(d.domain=null,e.exit());b;)c=b.domain,g=b.fn,c&&c.enter(),g(),c&&c.exit(),b=b.next;f=a,e&&e.enter()};if(j)g=function(){d.nextTick(e)};else if(k){var m=1,l=document.createTextNode("");new k(e).observe(l,{characterData:!0}),g=function(){l.data=m=-m}}else g=i&&i.resolve?function(){i.resolve().then(e)}:function(){o.call(c,e)};n.exports=function asap(e){var c={fn:e,next:a,domain:j&&d.domain};f&&(f.next=c),b||(b=c,g()),f=c}},function(s,t,b){var c,g,f,k=b(12),r=b(19),n=b(14),p=b(15),a=b(4),l=a.process,h=a.setImmediate,i=a.clearImmediate,o=a.MessageChannel,j=0,d={},q="onreadystatechange",e=function(){var a=+this;if(d.hasOwnProperty(a)){var b=d[a];delete d[a],b()}},m=function(a){e.call(a.data)};h&&i||(h=function setImmediate(a){for(var b=[],e=1;arguments.length>e;)b.push(arguments[e++]);return d[++j]=function(){r("function"==typeof a?a:Function(a),b)},c(j),j},i=function clearImmediate(a){delete d[a]},"process"==b(18)(l)?c=function(a){l.nextTick(k(e,a,1))}:o?(g=new o,f=g.port2,g.port1.onmessage=m,c=k(f.postMessage,f,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts?(c=function(b){a.postMessage(b+"","*")},a.addEventListener("message",m,!1)):c=q in p("script")?function(a){n.appendChild(p("script"))[q]=function(){n.removeChild(this),e.call(a)}}:function(a){setTimeout(k(e,a,1),0)}),s.exports={set:h,clear:i}},function(a,d,b){var c=b(10);a.exports=function(a,b){for(var d in b)c(a,d,b[d]);return a}},function(d,e,c){var b=c(144);c(145)("Map",function(b){return function Map(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(c){var a=b.getEntry(this,c);return a&&a.v},set:function set(a,c){return b.def(this,0===a?0:a,c)}},b,!0)},function(v,w,b){var j=b(2),m=b(6),o=b(142),n=b(12),p=b(137),r=b(22),t=b(138),l=b(108),d=b(119),f=b(11)("id"),k=b(17),h=b(16),q=b(121),i=b(8),s=Object.isExtensible||h,c=i?"_s":"size",u=0,g=function(a,b){if(!h(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!k(a,f)){if(!s(a))return"F";if(!b)return"E";m(a,f,++u)}return"O"+a[f]},e=function(b,c){var a,d=g(c);if("F"!==d)return b._i[d];for(a=b._f;a;a=a.n)if(a.k==c)return a};v.exports={getConstructor:function(d,f,g,h){var b=d(function(d,e){p(d,b,f),d._i=j.create(null),d._f=a,d._l=a,d[c]=0,e!=a&&t(e,g,d[h],d)});return o(b.prototype,{clear:function clear(){for(var d=this,e=d._i,b=d._f;b;b=b.n)b.r=!0,b.p&&(b.p=b.p.n=a),delete e[b.i];d._f=d._l=a,d[c]=0},"delete":function(g){var b=this,a=e(b,g);if(a){var d=a.n,f=a.p;delete b._i[a.i],a.r=!0,f&&(f.n=d),d&&(d.p=f),b._f==a&&(b._f=d),b._l==a&&(b._l=f),b[c]--}return!!a},forEach:function forEach(c){for(var b,d=n(c,arguments.length>1?arguments[1]:a,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!e(this,a)}}),i&&j.setDesc(b.prototype,"size",{get:function(){return r(this[c])}}),b},def:function(b,f,j){var h,i,d=e(b,f);return d?d.v=j:(b._l=d={i:i=g(f,!0),k:f,v:j,p:h=b._l,n:a,r:!1},b._f||(b._f=d),h&&(h.n=d),b[c]++,"F"!==i&&(b._i[i]=d)),b},getEntry:e,setStrong:function(e,b,c){l(e,b,function(b,c){this._t=b,this._k=c,this._l=a},function(){for(var c=this,e=c._k,b=c._l;b&&b.r;)b=b.p;return c._t&&(c._l=b=b?b.n:c._t._f)?"keys"==e?d(0,b.k):"values"==e?d(0,b.v):d(0,[b.k,b.v]):(c._t=a,d(1))},c?"entries":"values",!c,!0),q(b)}}},function(l,n,b){var k=b(4),c=b(3),g=b(10),f=b(142),i=b(138),j=b(137),d=b(16),e=b(9),h=b(115),m=b(35);l.exports=function(o,v,y,x,p,l){var t=k[o],b=t,s=p?"set":"add",n=b&&b.prototype,w={},r=function(b){var c=n[b];g(n,b,"delete"==b?function(a){return l&&!d(a)?!1:c.call(this,0===a?0:a)}:"has"==b?function has(a){return l&&!d(a)?!1:c.call(this,0===a?0:a)}:"get"==b?function get(b){return l&&!d(b)?a:c.call(this,0===b?0:b)}:"add"==b?function add(a){return c.call(this,0===a?0:a),this}:function set(a,b){return c.call(this,0===a?0:a,b),this})};if("function"==typeof b&&(l||n.forEach&&!e(function(){(new b).entries().next()}))){var u,q=new b,z=q[s](l?{}:-0,1)!=q,A=e(function(){q.has(1)}),B=h(function(a){new b(a)});B||(b=v(function(e,d){j(e,b,o);var c=new t;return d!=a&&i(d,p,c[s],c),c}),b.prototype=n,n.constructor=b),l||q.forEach(function(b,a){u=1/a===-(1/0)}),(A||u)&&(r("delete"),r("has"),p&&r("get")),(u||z)&&r(s),l&&n.clear&&delete n.clear}else b=x.getConstructor(v,o,p,s),f(b.prototype,y);return m(b,o),w[o]=b,c(c.G+c.W+c.F*(b!=t),w),l||x.setStrong(b,o,p),b}},function(d,e,b){var c=b(144);b(145)("Set",function(b){return function Set(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a=0===a?0:a,a)}},c)},function(n,m,b){var l=b(2),k=b(10),c=b(148),d=b(16),j=b(17),i=c.frozenStore,h=c.WEAK,f=Object.isExtensible||d,e={},g=b(145)("WeakMap",function(b){return function WeakMap(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(a){if(d(a)){if(!f(a))return i(this).get(a);if(j(a,h))return a[h][this._i]}},set:function set(a,b){return c.def(this,a,b)}},c,!0,!0);7!=(new g).set((Object.freeze||Object)(e),7).get(e)&&l.each.call(["delete","has","get","set"],function(a){var b=g.prototype,c=b[a];k(b,a,function(b,e){if(d(b)&&!f(b)){var g=i(this)[a](b,e);return"set"==a?this:g}return c.call(this,b,e)})})},function(s,t,b){var r=b(6),q=b(142),m=b(20),h=b(16),l=b(137),k=b(138),j=b(28),d=b(17),c=b(11)("weak"),g=Object.isExtensible||h,n=j(5),o=j(6),p=0,e=function(a){return a._l||(a._l=new i)},i=function(){this.a=[]},f=function(a,b){return n(a.a,function(a){return a[0]===b})};i.prototype={get:function(b){var a=f(this,b);return a?a[1]:void 0},has:function(a){return!!f(this,a)},set:function(a,b){var c=f(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(b){var a=o(this.a,function(a){return a[0]===b});return~a&&this.a.splice(a,1),!!~a}},s.exports={getConstructor:function(f,i,j,m){var b=f(function(c,d){l(c,b,i),c._i=p++,c._l=a,d!=a&&k(d,j,c[m],c)});return q(b.prototype,{"delete":function(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i)&&delete a[c][this._i]:e(this)["delete"](a):!1},has:function has(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i):e(this).has(a):!1}}),b},def:function(b,a,f){return g(m(a))?(d(a,c)||r(a,c,{}),a[c][b._i]=f):e(b).set(a,f),b},frozenStore:e,WEAK:c}},function(d,e,b){var c=b(148);b(145)("WeakSet",function(b){return function WeakSet(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a,!0)}},c,!1,!0)},function(e,f,a){var b=a(3),c=Function.apply,d=a(20);b(b.S,"Reflect",{apply:function apply(a,b,e){return c.call(a,b,d(e))}})},function(h,i,a){var e=a(2),b=a(3),c=a(13),f=a(20),d=a(16),g=Function.bind||a(5).Function.prototype.bind;b(b.S+b.F*a(9)(function(){function F(){}return!(Reflect.construct(function(){},[],F)instanceof F)}),"Reflect",{construct:function construct(b,a){c(b),f(a);var i=arguments.length<3?b:c(arguments[2]);if(b==i){switch(a.length){case 0:return new b;case 1:return new b(a[0]);case 2:return new b(a[0],a[1]);case 3:return new b(a[0],a[1],a[2]);case 4:return new b(a[0],a[1],a[2],a[3])}var h=[null];return h.push.apply(h,a),new(g.apply(b,h))}var j=i.prototype,k=e.create(d(j)?j:Object.prototype),l=Function.apply.call(b,k,a);return d(l)?l:k}})},function(e,f,a){var c=a(2),b=a(3),d=a(20);b(b.S+b.F*a(9)(function(){Reflect.defineProperty(c.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,e){d(a);try{return c.setDesc(a,b,e),!0}catch(f){return!1}}})},function(e,f,a){var b=a(3),c=a(2).getDesc,d=a(20);b(b.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var e=c(d(a),b);return e&&!e.configurable?!1:delete a[b]}})},function(f,g,b){var c=b(3),e=b(20),d=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};b(110)(d,"Object",function(){var c,b=this,d=b._k;do if(b._i>=d.length)return{value:a,done:!0};while(!((c=d[b._i++])in b._t));return{value:c,done:!1}}),c(c.S,"Reflect",{enumerate:function enumerate(a){return new d(a)}})},function(h,i,b){function get(b,h){var d,j,i=arguments.length<3?b:arguments[2];return g(b)===i?b[h]:(d=c.getDesc(b,h))?e(d,"value")?d.value:d.get!==a?d.get.call(i):a:f(j=c.getProto(b))?get(j,h,i):void 0}var c=b(2),e=b(17),d=b(3),f=b(16),g=b(20);d(d.S,"Reflect",{get:get})},function(e,f,a){var c=a(2),b=a(3),d=a(20);b(b.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return c.getDesc(d(a),b)}})},function(e,f,a){var b=a(3),c=a(2).getProto,d=a(20);b(b.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return c(d(a))}})},function(c,d,b){var a=b(3);a(a.S,"Reflect",{has:function has(a,b){return b in a}})},function(e,f,a){var b=a(3),d=a(20),c=Object.isExtensible;b(b.S,"Reflect",{isExtensible:function isExtensible(a){return d(a),c?c(a):!0}})},function(c,d,a){var b=a(3);b(b.S,"Reflect",{ownKeys:a(161)})},function(d,f,a){var b=a(2),e=a(20),c=a(4).Reflect;d.exports=c&&c.ownKeys||function ownKeys(a){var c=b.getNames(e(a)),d=b.getSymbols;return d?c.concat(d(a)):c}},function(e,f,a){var b=a(3),d=a(20),c=Object.preventExtensions;b(b.S,"Reflect",{preventExtensions:function preventExtensions(a){d(a);try{return c&&c(a),!0}catch(b){return!1}}})},function(i,j,b){function set(j,i,k){var l,m,d=arguments.length<4?j:arguments[3],b=c.getDesc(h(j),i);if(!b){if(f(m=c.getProto(j)))return set(m,i,k,d);b=e(0)}return g(b,"value")?b.writable!==!1&&f(d)?(l=c.getDesc(d,i)||e(0),l.value=k,c.setDesc(d,i,l),!0):!1:b.set===a?!1:(b.set.call(d,k),!0)}var c=b(2),g=b(17),d=b(3),e=b(7),h=b(20),f=b(16);d(d.S,"Reflect",{set:set})},function(d,e,b){var c=b(3),a=b(45);a&&c(c.S,"Reflect",{setPrototypeOf:function setPrototypeOf(b,c){a.check(b,c);try{return a.set(b,c),!0}catch(d){return!1}}})},function(e,f,b){var c=b(3),d=b(33)(!0);c(c.P,"Array",{includes:function includes(b){return d(this,b,arguments.length>1?arguments[1]:a)}}),b(118)("includes")},function(d,e,a){var b=a(3),c=a(98)(!0);b(b.P,"String",{at:function at(a){return c(this,a)}})},function(e,f,b){var c=b(3),d=b(168);c(c.P,"String",{padLeft:function padLeft(b){return d(this,b,arguments.length>1?arguments[1]:a,!0)}})},function(c,g,b){var d=b(27),e=b(105),f=b(22);c.exports=function(l,m,i,n){var c=String(f(l)),j=c.length,g=i===a?" ":String(i),k=d(m);if(j>=k)return c;""==g&&(g=" ");var h=k-j,b=e.call(g,Math.ceil(h/g.length));return b.length>h&&(b=b.slice(0,h)),n?b+c:c+b}},function(e,f,b){var c=b(3),d=b(168);c(c.P,"String",{padRight:function padRight(b){return d(this,b,arguments.length>1?arguments[1]:a,!1)}})},function(b,c,a){a(63)("trimLeft",function(a){return function trimLeft(){return a(this,1)}})},function(b,c,a){a(63)("trimRight",function(a){return function trimRight(){return a(this,2)}})},function(d,e,a){var b=a(3),c=a(173)(/[\\^$*+?.()|[\]{}]/g,"\\$&");b(b.S,"RegExp",{escape:function escape(a){return c(a)}})},function(a,b){a.exports=function(b,a){var c=a===Object(a)?function(b){return a[b]}:a;return function(a){return String(a).replace(b,c)}}},function(g,h,a){var b=a(2),c=a(3),d=a(161),e=a(23),f=a(7);c(c.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(k){for(var a,g,h=e(k),l=b.setDesc,m=b.getDesc,i=d(h),c={},j=0;i.length>j;)g=m(h,a=i[j++]),a in c?l(c,a,f(0,g)):c[a]=g;return c}})},function(d,e,a){var b=a(3),c=a(176)(!1);b(b.S,"Object",{values:function values(a){return c(a)}})},function(c,f,a){var b=a(2),d=a(23),e=b.isEnum;c.exports=function(a){return function(j){for(var c,f=d(j),g=b.getKeys(f),k=g.length,h=0,i=[];k>h;)e.call(f,c=g[h++])&&i.push(a?[c,f[c]]:f[c]);return i}}},function(d,e,a){var b=a(3),c=a(176)(!0);b(b.S,"Object",{entries:function entries(a){return c(a)}})},function(c,d,a){var b=a(3);b(b.P,"Map",{toJSON:a(179)("Map")})},function(b,e,a){var c=a(138),d=a(47);b.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");var b=[];return c(this,!1,b.push,b),b}}},function(c,d,a){var b=a(3);b(b.P,"Set",{toJSON:a(179)("Set")})},function(d,e,b){var a=b(3),c=b(141);a(a.G+a.B,{setImmediate:c.set,clearImmediate:c.clear})},function(l,k,a){a(117);var g=a(4),j=a(6),c=a(109),b=a(31)("iterator"),h=g.NodeList,i=g.HTMLCollection,e=h&&h.prototype,d=i&&i.prototype,f=c.NodeList=c.HTMLCollection=c.Array;e&&!e[b]&&j(e,b,f),d&&!d[b]&&j(d,b,f)},function(i,j,a){var c=a(4),b=a(3),g=a(19),h=a(184),d=c.navigator,e=!!d&&/MSIE .\./.test(d.userAgent),f=function(a){return e?function(b,c){return a(g(h,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};b(b.G+b.B+b.F*e,{setTimeout:f(c.setTimeout),setInterval:f(c.setInterval)})},function(c,f,a){var d=a(185),b=a(19),e=a(13);c.exports=function(){for(var h=e(this),a=arguments.length,c=Array(a),f=0,i=d._,g=!1;a>f;)(c[f]=arguments[f++])===i&&(g=!0);return function(){var d,k=this,f=arguments,l=f.length,e=0,j=0;if(!g&&!l)return b(h,c,k);if(d=c.slice(),g)for(;a>e;e++)d[e]===i&&(d[e]=f[j++]);for(;l>j;)d.push(f[j++]);return b(h,d,k)}}},function(a,c,b){a.exports=b(4)},function(x,w,b){function Dict(b){var c=f.create(null);return b!=a&&(r(b)?q(b,!0,function(a,b){c[a]=b}):o(c,b)),c}function reduce(g,h,l){p(h);var a,c,b=i(g),e=k(b),j=e.length,f=0;if(arguments.length<3){if(!j)throw TypeError("Reduce of empty object with no initial value");a=b[e[f++]]}else a=Object(l);for(;j>f;)d(b,c=e[f++])&&(a=h(a,b[c],c,g));return a}function includes(c,b){return(b==b?j(c,b):l(c,function(a){return a!=a}))!==a}function get(a,b){return d(a,b)?a[b]:void 0}function set(a,b,c){return v&&b in Object?f.setDesc(a,b,t(0,c)):a[b]=c,a}function isDict(a){return u(a)&&f.getProto(a)===Dict.prototype}var f=b(2),n=b(12),e=b(3),t=b(7),o=b(41),j=b(36),p=b(13),q=b(138),r=b(187),s=b(110),g=b(119),u=b(16),i=b(23),v=b(8),d=b(17),k=f.getKeys,c=function(b){var e=1==b,c=4==b;return function(l,m,o){var f,h,g,p=n(m,o,3),k=i(l),j=e||7==b||2==b?new("function"==typeof this?this:Dict):a;for(f in k)if(d(k,f)&&(h=k[f],g=p(h,f,l),b))if(e)j[f]=g;else if(g)switch(b){case 2:j[f]=h;break;case 3:return!0;case 5:return h;case 6:return f;case 7:j[g[0]]=g[1]}else if(c)return!1;return 3==b||c?c:j}},l=c(6),h=function(a){return function(b){return new m(b,a)}},m=function(a,b){this._t=i(a),this._a=k(a),this._i=0,this._k=b};s(m,"Dict",function(){var c,b=this,e=b._t,f=b._a,h=b._k;do if(b._i>=f.length)return b._t=a,g(1);while(!d(e,c=f[b._i++]));return"keys"==h?g(0,c):"values"==h?g(0,e[c]):g(0,[c,e[c]])}),Dict.prototype=null,e(e.G+e.F,{Dict:Dict}),e(e.S,"Dict",{keys:h("keys"),values:h("values"),entries:h("entries"),forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findKey:l,mapPairs:c(7),reduce:reduce,keyOf:j,includes:includes,has:d,get:get,set:set,isDict:isDict})},function(c,g,b){var d=b(47),e=b(31)("iterator"),f=b(109);c.exports=b(5).isIterable=function(c){var b=Object(c);return b[e]!==a||"@@iterator"in b||f.hasOwnProperty(d(b))}},function(b,e,a){var c=a(20),d=a(114);b.exports=a(5).getIterator=function(a){var b=d(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return c(b.call(a))}},function(f,g,a){var c=a(4),d=a(5),b=a(3),e=a(184);b(b.G+b.F,{delay:function delay(a){return new(d.Promise||c.Promise)(function(b){setTimeout(e.call(b,!0),a)})}})},function(d,e,a){var c=a(185),b=a(3);a(5)._=c._=c._||{},b(b.P+b.F,"Function",{part:a(184)})},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{isObject:b(16)})},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{classof:b(47)})},function(d,e,b){var a=b(3),c=b(194);a(a.S+a.F,"Object",{define:c})},function(c,f,a){var b=a(2),d=a(161),e=a(23);c.exports=function define(a,c){for(var f,g=d(e(c)),i=g.length,h=0;i>h;)b.setDesc(a,f=g[h++],b.getDesc(c,f));return a}},function(e,f,a){var b=a(3),c=a(194),d=a(2).create;b(b.S+b.F,"Object",{make:function(a,b){return c(d(a),b)}})},function(c,d,b){b(108)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var b=this._i++,c=!(this._l>b);return{done:c,value:c?a:b}})},function(d,e,b){var a=b(3),c=b(173)(/[&<>"']/g,{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});a(a.P+a.F,"String",{escapeHTML:function escapeHTML(){return c(this)}})},function(d,e,b){var a=b(3),c=b(173)(/&(?:amp|lt|gt|quot|apos);/g,{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"});a(a.P+a.F,"String",{unescapeHTML:function unescapeHTML(){return c(this)}})},function(g,h,a){var e=a(2),f=a(4),b=a(3),c={},d=!0;e.each.call("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(","),function(a){c[a]=function(){var b=f.console;return d&&b&&b[a]?Function.apply.call(b[a],b,arguments):void 0}}),b(b.G+b.F,{log:a(41)(c.log,c,{enable:function(){d=!0},disable:function(){d=!1}})})},function(i,j,b){var g=b(2),e=b(3),h=b(12),f=b(5).Array||Array,c={},d=function(d,b){g.each.call(d.split(","),function(d){b==a&&d in f?c[d]=f[d]:d in[]&&(c[d]=h(Function.call,[][d],b))})};d("pop,reverse,shift,keys,values,entries",1),d("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),d("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),e(e.S,"Array",c)}]),"undefined"!=typeof module&&module.exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):c.core=b}(1,1);
//# sourceMappingURL=core.min.js.map \ No newline at end of file
diff --git a/node_modules/core-js/client/core.min.js.map b/node_modules/core-js/client/core.min.js.map
index bc3ffc583..fab30694f 100644
--- a/node_modules/core-js/client/core.min.js.map
+++ b/node_modules/core-js/client/core.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&amp;","&lt;","&gt;","&quot;","&apos;","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"core.min.js"} \ No newline at end of file
+{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","IE8_DOM_DEFINE","$","$export","DESCRIPTORS","createDesc","html","cel","has","cof","invoke","fails","anObject","aFunction","isObject","toObject","toIObject","toInteger","toIndex","toLength","IObject","IE_PROTO","createArrayMethod","arrayIndexOf","ObjectProto","Object","prototype","ArrayProto","Array","arraySlice","slice","arrayJoin","join","defineProperty","setDesc","getOwnDescriptor","getDesc","defineProperties","setDescs","factories","get","a","O","P","Attributes","e","TypeError","value","propertyIsEnumerable","Properties","keys","getKeys","length","i","S","F","getOwnPropertyDescriptor","keys1","split","keys2","concat","keysLen1","createDict","iframeDocument","iframe","gt","style","display","appendChild","src","contentWindow","document","open","write","close","createGetKeys","names","object","key","result","push","Empty","getPrototypeOf","getProto","constructor","getOwnPropertyNames","getNames","create","construct","len","args","n","Function","bind","that","fn","this","partArgs","arguments","bound","begin","end","klass","start","upTo","size","cloned","charAt","separator","isArray","createArrayReduce","isRight","callbackfn","memo","index","methodize","$fn","arg1","forEach","each","map","filter","some","every","reduce","reduceRight","indexOf","lastIndexOf","el","fromIndex","Math","min","now","Date","lz","num","toISOString","NaN","isFinite","RangeError","d","y","getUTCFullYear","getUTCMilliseconds","s","abs","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$Object","isEnum","getSymbols","getOwnPropertySymbols","global","core","hide","redefine","ctx","PROTOTYPE","type","name","source","own","out","exp","IS_FORCED","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","W","window","self","version","bitmap","enumerable","configurable","writable","exec","SRC","TO_STRING","$toString","TPL","inspectSource","it","val","safe","hasOwnProperty","String","toString","px","random","b","apply","documentElement","is","createElement","un","defined","ceil","floor","isNaN","max","asc","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$this","res","f","SPECIES","original","C","arg","store","uid","Symbol","SHARED","IS_INCLUDES","$fails","shared","setToStringTag","wks","keyOf","$names","enumKeys","_create","$Symbol","$JSON","JSON","_stringify","stringify","setter","HIDDEN","SymbolRegistry","AllSymbols","useNative","setSymbolDesc","D","protoDesc","wrap","tag","sym","_k","set","isSymbol","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","$stringify","replacer","$replacer","$$","buggyJSON","symbolStatics","for","keyFor","useSetter","useSimple","def","TAG","stat","windowNames","getWindowNames","symbols","assign","A","K","k","T","$$len","j","x","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","callee","$freeze","freeze","KEY","$seal","seal","$preventExtensions","preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","isExtensible","$getPrototypeOf","$keys","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","toPrimitive","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","code","digits","parseInt","Number","valueOf","spaces","space","non","ltrim","RegExp","rtrim","exporter","string","replace","EPSILON","pow","_isFinite","isInteger","number","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","parseFloat","log1p","sqrt","$acosh","acosh","MAX_VALUE","log","LN2","asinh","atanh","sign","cbrt","clz32","LOG2E","cosh","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","Infinity","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","search","isRegExp","MATCH","re","INCLUDES","includes","repeat","count","str","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","LIBRARY","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","IteratorPrototype","descriptor","isArrayIter","getIterFn","iter","from","arrayLike","step","iterator","mapfn","mapping","iterFn","ret","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","addToUnscopables","Arguments","UNSCOPABLES","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","$flags","$RegExp","re1","re2","CORRECT_NEW","piRE","fiU","ignoreCase","multiline","unicode","sticky","flags","regexp","SYMBOL","REPLACE","$replace","searchValue","replaceValue","SEARCH","SPLIT","$split","limit","Wrapper","strictNew","forOf","setProto","same","speciesConstructor","asap","PROMISE","process","isNode","empty","testResolve","sub","promise","resolve","USE_NATIVE","P2","works","then","thenableThenGotten","sameConstructor","getConstructor","isThenable","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","record","isReject","chain","v","ok","run","reaction","handler","fail","h","setTimeout","console","isUnhandled","emit","onunhandledrejection","reason","_d","$reject","r","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","capability","all","iterable","abrupt","remaining","results","alreadyCalled","race","head","last","macrotask","Observer","MutationObserver","WebKitMutationObserver","flush","parent","domain","exit","enter","nextTick","toggle","node","createTextNode","observe","characterData","data","task","defer","channel","port","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listner","event","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","clear","strong","Map","entry","getEntry","redefineAll","$iterDefine","ID","$has","setSpecies","SIZE","fastKey","_f","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","BUGGY_ZERO","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","Set","weak","frozenStore","WEAK","tmp","$WeakMap","WeakMap","method","arrayFind","arrayFindIndex","FrozenStore","findFrozen","splice","WeakSet","_apply","thisArgument","argumentsList","Reflect","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","ownKeys","V","existingDescriptor","ownDesc","$includes","at","$pad","padLeft","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padRight","trimLeft","trimRight","$re","escape","regExp","part","getOwnPropertyDescriptors","$values","isEntries","$entries","toJSON","$task","NL","NodeList","HTC","HTMLCollection","NLProto","HTCProto","ArrayValues","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","_","holder","Dict","dict","isIterable","init","findKey","isDict","createDictMethod","createDictIter","DictIterator","_a","mapPairs","getIterator","delay","define","mixin","make","&","<",">","\"","'","escapeHTML","&amp;","&lt;","&gt;","&quot;","&apos;","unescapeHTML","enabled","$console","enable","disable","$ctx","$Array","statics","setStatics","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBI,EAAOD,QAAUH,EAAoB,MAKhC,SAASI,EAAQD,EAASH,GAG/B,GA8BIW,GA9BAC,EAAoBZ,EAAoB,GACxCa,EAAoBb,EAAoB,GACxCc,EAAoBd,EAAoB,GACxCe,EAAoBf,EAAoB,GACxCgB,EAAoBhB,EAAoB,IACxCiB,EAAoBjB,EAAoB,IACxCkB,EAAoBlB,EAAoB,IACxCmB,EAAoBnB,EAAoB,IACxCoB,EAAoBpB,EAAoB,IACxCqB,EAAoBrB,EAAoB,GACxCsB,EAAoBtB,EAAoB,IACxCuB,EAAoBvB,EAAoB,IACxCwB,EAAoBxB,EAAoB,IACxCyB,EAAoBzB,EAAoB,IACxC0B,EAAoB1B,EAAoB,IACxC2B,EAAoB3B,EAAoB,IACxC4B,EAAoB5B,EAAoB,IACxC6B,EAAoB7B,EAAoB,IACxC8B,EAAoB9B,EAAoB,IACxC+B,EAAoB/B,EAAoB,IAAI,aAC5CgC,EAAoBhC,EAAoB,IACxCiC,EAAoBjC,EAAoB,KAAI,GAC5CkC,EAAoBC,OAAOC,UAC3BC,EAAoBC,MAAMF,UAC1BG,EAAoBF,EAAWG,MAC/BC,EAAoBJ,EAAWK,KAC/BC,EAAoB/B,EAAEgC,QACtBC,EAAoBjC,EAAEkC,QACtBC,EAAoBnC,EAAEoC,SACtBC,IAGAnC,KACFH,GAAkBU,EAAM,WACtB,MAA4E,IAArEsB,EAAe1B,EAAI,OAAQ,KAAMiC,IAAK,WAAY,MAAO,MAAOC,IAEzEvC,EAAEgC,QAAU,SAASQ,EAAGC,EAAGC,GACzB,GAAG3C,EAAe,IAChB,MAAOgC,GAAeS,EAAGC,EAAGC,GAC5B,MAAMC,IACR,GAAG,OAASD,IAAc,OAASA,GAAW,KAAME,WAAU,2BAE9D,OADG,SAAWF,KAAWhC,EAAS8B,GAAGC,GAAKC,EAAWG,OAC9CL,GAETxC,EAAEkC,QAAU,SAASM,EAAGC,GACtB,GAAG1C,EAAe,IAChB,MAAOkC,GAAiBO,EAAGC,GAC3B,MAAME,IACR,MAAGrC,GAAIkC,EAAGC,GAAUtC,GAAYmB,EAAYwB,qBAAqBnD,KAAK6C,EAAGC,GAAID,EAAEC,IAA/E,QAEFzC,EAAEoC,SAAWD,EAAmB,SAASK,EAAGO,GAC1CrC,EAAS8B,EAKT,KAJA,GAGIC,GAHAO,EAAShD,EAAEiD,QAAQF,GACnBG,EAASF,EAAKE,OACdC,EAAI,EAEFD,EAASC,GAAEnD,EAAEgC,QAAQQ,EAAGC,EAAIO,EAAKG,KAAMJ,EAAWN,GACxD,OAAOD,KAGXvC,EAAQA,EAAQmD,EAAInD,EAAQoD,GAAKnD,EAAa,UAE5CoD,yBAA0BtD,EAAEkC,QAE5BH,eAAgB/B,EAAEgC,QAElBG,iBAAkBA,GAIpB,IAAIoB,GAAQ,gGACmCC,MAAM,KAEjDC,EAAQF,EAAMG,OAAO,SAAU,aAC/BC,EAAWJ,EAAML,OAGjBU,EAAa,WAEf,GAGIC,GAHAC,EAASzD,EAAI,UACb8C,EAASQ,EACTI,EAAS,GAYb,KAVAD,EAAOE,MAAMC,QAAU,OACvB7D,EAAK8D,YAAYJ,GACjBA,EAAOK,IAAM,cAGbN,EAAiBC,EAAOM,cAAcC,SACtCR,EAAeS,OACfT,EAAeU,MAAM,oCAAsCR,GAC3DF,EAAeW,QACfZ,EAAaC,EAAeR,EACtBF,WAAWS,GAAWpC,UAAU+B,EAAMJ,GAC5C,OAAOS,MAELa,EAAgB,SAASC,EAAOxB,GAClC,MAAO,UAASyB,GACd,GAGIC,GAHApC,EAAS1B,EAAU6D,GACnBxB,EAAS,EACT0B,IAEJ,KAAID,IAAOpC,GAAKoC,GAAOzD,GAASb,EAAIkC,EAAGoC,IAAQC,EAAOC,KAAKF,EAE3D,MAAM1B,EAASC,GAAK7C,EAAIkC,EAAGoC,EAAMF,EAAMvB,SACpC9B,EAAawD,EAAQD,IAAQC,EAAOC,KAAKF,GAE5C,OAAOC,KAGPE,EAAQ,YACZ9E,GAAQA,EAAQmD,EAAG,UAEjB4B,eAAgBhF,EAAEiF,SAAWjF,EAAEiF,UAAY,SAASzC,GAElD,MADAA,GAAI3B,EAAS2B,GACVlC,EAAIkC,EAAGrB,GAAiBqB,EAAErB,GACF,kBAAjBqB,GAAE0C,aAA6B1C,YAAaA,GAAE0C,YAC/C1C,EAAE0C,YAAY1D,UACdgB,YAAajB,QAASD,EAAc,MAG/C6D,oBAAqBnF,EAAEoF,SAAWpF,EAAEoF,UAAYX,EAAchB,EAAOA,EAAMP,QAAQ,GAEnFmC,OAAQrF,EAAEqF,OAASrF,EAAEqF,QAAU,SAAS7C,EAAQO,GAC9C,GAAI8B,EAQJ,OAPS,QAANrC,GACDuC,EAAMvD,UAAYd,EAAS8B,GAC3BqC,EAAS,GAAIE,GACbA,EAAMvD,UAAY,KAElBqD,EAAO1D,GAAYqB,GACdqC,EAASjB,IACTb,IAAe7D,EAAY2F,EAAS1C,EAAiB0C,EAAQ9B,IAGtEC,KAAMhD,EAAEiD,QAAUjD,EAAEiD,SAAWwB,EAAclB,EAAOI,GAAU,IAGhE,IAAI2B,GAAY,SAASjC,EAAGkC,EAAKC,GAC/B,KAAKD,IAAOlD,IAAW,CACrB,IAAI,GAAIoD,MAAQtC,EAAI,EAAOoC,EAAJpC,EAASA,IAAIsC,EAAEtC,GAAK,KAAOA,EAAI,GACtDd,GAAUkD,GAAOG,SAAS,MAAO,gBAAkBD,EAAE3D,KAAK,KAAO,KAEnE,MAAOO,GAAUkD,GAAKlC,EAAGmC,GAI3BvF,GAAQA,EAAQwC,EAAG,YACjBkD,KAAM,QAASA,MAAKC,GAClB,GAAIC,GAAWlF,EAAUmF,MACrBC,EAAWpE,EAAWhC,KAAKqG,UAAW,GACtCC,EAAQ,WACV,GAAIT,GAAOO,EAASrC,OAAO/B,EAAWhC,KAAKqG,WAC3C,OAAOF,gBAAgBG,GAAQX,EAAUO,EAAIL,EAAKtC,OAAQsC,GAAQhF,EAAOqF,EAAIL,EAAMI,GAGrF,OADGhF,GAASiF,EAAGrE,aAAWyE,EAAMzE,UAAYqE,EAAGrE,WACxCyE,KAKXhG,EAAQA,EAAQwC,EAAIxC,EAAQoD,EAAI5C,EAAM,WACjCL,GAAKuB,EAAWhC,KAAKS,KACtB,SACFwB,MAAO,SAASsE,EAAOC,GACrB,GAAIZ,GAAQtE,EAAS6E,KAAK5C,QACtBkD,EAAQ7F,EAAIuF,KAEhB,IADAK,EAAMA,IAAQjH,EAAYqG,EAAMY,EACpB,SAATC,EAAiB,MAAOzE,GAAWhC,KAAKmG,KAAMI,EAAOC,EAMxD,KALA,GAAIE,GAASrF,EAAQkF,EAAOX,GACxBe,EAAStF,EAAQmF,EAAKZ,GACtBgB,EAAStF,EAASqF,EAAOD,GACzBG,EAAS9E,MAAM6E,GACfpD,EAAS,EACHoD,EAAJpD,EAAUA,IAAIqD,EAAOrD,GAAc,UAATiD,EAC5BN,KAAKW,OAAOJ,EAAQlD,GACpB2C,KAAKO,EAAQlD,EACjB,OAAOqD,MAGXvG,EAAQA,EAAQwC,EAAIxC,EAAQoD,GAAKnC,GAAWK,QAAS,SACnDO,KAAM,QAASA,MAAK4E,GAClB,MAAO7E,GAAUlC,KAAKuB,EAAQ4E,MAAOY,IAAcxH,EAAY,IAAMwH,MAKzEzG,EAAQA,EAAQmD,EAAG,SAAUuD,QAASvH,EAAoB,KAE1D,IAAIwH,GAAoB,SAASC,GAC/B,MAAO,UAASC,EAAYC,GAC1BpG,EAAUmG,EACV,IAAItE,GAAStB,EAAQ4E,MACjB5C,EAASjC,EAASuB,EAAEU,QACpB8D,EAASH,EAAU3D,EAAS,EAAI,EAChCC,EAAS0D,EAAU,GAAK,CAC5B,IAAGb,UAAU9C,OAAS,EAAE,OAAO,CAC7B,GAAG8D,IAASxE,GAAE,CACZuE,EAAOvE,EAAEwE,GACTA,GAAS7D,CACT,OAGF,GADA6D,GAAS7D,EACN0D,EAAkB,EAARG,EAAsBA,GAAV9D,EACvB,KAAMN,WAAU,+CAGpB,KAAKiE,EAAUG,GAAS,EAAI9D,EAAS8D,EAAOA,GAAS7D,EAAK6D,IAASxE,KACjEuE,EAAOD,EAAWC,EAAMvE,EAAEwE,GAAQA,EAAOlB,MAE3C,OAAOiB,KAIPE,EAAY,SAASC,GACvB,MAAO,UAASC,GACd,MAAOD,GAAIpB,KAAMqB,EAAMnB,UAAU,KAIrC/F,GAAQA,EAAQwC,EAAG,SAEjB2E,QAASpH,EAAEqH,KAAOrH,EAAEqH,MAAQJ,EAAU7F,EAAkB,IAExDkG,IAAKL,EAAU7F,EAAkB,IAEjCmG,OAAQN,EAAU7F,EAAkB,IAEpCoG,KAAMP,EAAU7F,EAAkB,IAElCqG,MAAOR,EAAU7F,EAAkB,IAEnCsG,OAAQd,GAAkB,GAE1Be,YAAaf,GAAkB,GAE/BgB,QAASX,EAAU5F,GAEnBwG,YAAa,SAASC,EAAIC,GACxB,GAAIvF,GAAS1B,EAAUgF,MACnB5C,EAASjC,EAASuB,EAAEU,QACpB8D,EAAS9D,EAAS,CAGtB,KAFG8C,UAAU9C,OAAS,IAAE8D,EAAQgB,KAAKC,IAAIjB,EAAOjG,EAAUgH,KAC/C,EAARf,IAAUA,EAAQ/F,EAASiC,EAAS8D,IAClCA,GAAS,EAAGA,IAAQ,GAAGA,IAASxE,IAAKA,EAAEwE,KAAWc,EAAG,MAAOd,EACjE,OAAO,MAKX/G,EAAQA,EAAQmD,EAAG,QAAS8E,IAAK,WAAY,OAAQ,GAAIC,QAEzD,IAAIC,GAAK,SAASC,GAChB,MAAOA,GAAM,EAAIA,EAAM,IAAMA,EAK/BpI,GAAQA,EAAQwC,EAAIxC,EAAQoD,GAAK5C,EAAM,WACrC,MAA4C,4BAArC,GAAI0H,MAAK,MAAQ,GAAGG,kBACtB7H,EAAM,WACX,GAAI0H,MAAKI,KAAKD,iBACX,QACHA,YAAa,QAASA,eACpB,IAAIE,SAAS1C,MAAM,KAAM2C,YAAW,qBACpC,IAAIC,GAAI5C,KACJ6C,EAAID,EAAEE,iBACNhJ,EAAI8I,EAAEG,qBACNC,EAAQ,EAAJH,EAAQ,IAAMA,EAAI,KAAO,IAAM,EACvC,OAAOG,IAAK,QAAUd,KAAKe,IAAIJ,IAAI/G,MAAMkH,EAAI,GAAK,IAChD,IAAMV,EAAGM,EAAEM,cAAgB,GAAK,IAAMZ,EAAGM,EAAEO,cAC3C,IAAMb,EAAGM,EAAEQ,eAAiB,IAAMd,EAAGM,EAAES,iBACvC,IAAMf,EAAGM,EAAEU,iBAAmB,KAAOxJ,EAAI,GAAKA,EAAI,IAAMwI,EAAGxI,IAAM,QAMlE,SAASJ,EAAQD,GAEtB,GAAI8J,GAAU9H,MACd/B,GAAOD,SACL8F,OAAYgE,EAAQhE,OACpBJ,SAAYoE,EAAQrE,eACpBsE,UAAexG,qBACfZ,QAAYmH,EAAQ/F,yBACpBtB,QAAYqH,EAAQtH,eACpBK,SAAYiH,EAAQlH,iBACpBc,QAAYoG,EAAQrG,KACpBoC,SAAYiE,EAAQlE,oBACpBoE,WAAYF,EAAQG,sBACpBnC,QAAeD,UAKZ,SAAS5H,EAAQD,EAASH,GAE/B,GAAIqK,GAAYrK,EAAoB,GAChCsK,EAAYtK,EAAoB,GAChCuK,EAAYvK,EAAoB,GAChCwK,EAAYxK,EAAoB,IAChCyK,EAAYzK,EAAoB,IAChC0K,EAAY,YAEZ7J,EAAU,SAAS8J,EAAMC,EAAMC,GACjC,GAQIrF,GAAKsF,EAAKC,EAAKC,EARfC,EAAYN,EAAO9J,EAAQoD,EAC3BiH,EAAYP,EAAO9J,EAAQsK,EAC3BC,EAAYT,EAAO9J,EAAQmD,EAC3BqH,EAAYV,EAAO9J,EAAQwC,EAC3BiI,EAAYX,EAAO9J,EAAQ0K,EAC3BC,EAAYN,EAAYb,EAASe,EAAYf,EAAOO,KAAUP,EAAOO,QAAeP,EAAOO,QAAaF,GACxGvK,EAAY+K,EAAYZ,EAAOA,EAAKM,KAAUN,EAAKM,OACnDa,EAAYtL,EAAQuK,KAAevK,EAAQuK,MAE5CQ,KAAUL,EAASD,EACtB,KAAIpF,IAAOqF,GAETC,GAAOG,GAAaO,GAAUhG,IAAOgG,GAErCT,GAAOD,EAAMU,EAASX,GAAQrF,GAE9BwF,EAAMM,GAAWR,EAAML,EAAIM,EAAKV,GAAUgB,GAA0B,kBAAPN,GAAoBN,EAAInE,SAAS/F,KAAMwK,GAAOA,EAExGS,IAAWV,GAAIN,EAASgB,EAAQhG,EAAKuF,GAErC5K,EAAQqF,IAAQuF,GAAIR,EAAKpK,EAASqF,EAAKwF,GACvCK,GAAYI,EAASjG,IAAQuF,IAAIU,EAASjG,GAAOuF,GAGxDV,GAAOC,KAAOA,EAEdzJ,EAAQoD,EAAI,EACZpD,EAAQsK,EAAI,EACZtK,EAAQmD,EAAI,EACZnD,EAAQwC,EAAI,EACZxC,EAAQ0K,EAAI,GACZ1K,EAAQ6K,EAAI,GACZtL,EAAOD,QAAUU,GAIZ,SAAST,EAAQD,GAGtB,GAAIkK,GAASjK,EAAOD,QAA2B,mBAAVwL,SAAyBA,OAAO/C,MAAQA,KACzE+C,OAAwB,mBAARC,OAAuBA,KAAKhD,MAAQA,KAAOgD,KAAOtF,SAAS,gBAC9D,iBAAPzG,KAAgBA,EAAMwK,IAI3B,SAASjK,EAAQD,GAEtB,GAAImK,GAAOlK,EAAOD,SAAW0L,QAAS,QACrB,iBAAPjM,KAAgBA,EAAM0K,IAI3B,SAASlK,EAAQD,EAASH,GAE/B,GAAIY,GAAaZ,EAAoB,GACjCe,EAAaf,EAAoB,EACrCI,GAAOD,QAAUH,EAAoB,GAAK,SAASuF,EAAQC,EAAK/B,GAC9D,MAAO7C,GAAEgC,QAAQ2C,EAAQC,EAAKzE,EAAW,EAAG0C,KAC1C,SAAS8B,EAAQC,EAAK/B,GAExB,MADA8B,GAAOC,GAAO/B,EACP8B,IAKJ,SAASnF,EAAQD,GAEtBC,EAAOD,QAAU,SAAS2L,EAAQrI,GAChC,OACEsI,aAAyB,EAATD,GAChBE,eAAyB,EAATF,GAChBG,WAAyB,EAATH,GAChBrI,MAAcA,KAMb,SAASrD,EAAQD,EAASH,GAG/BI,EAAOD,SAAWH,EAAoB,GAAG,WACvC,MAA2E,IAApEmC,OAAOQ,kBAAmB,KAAMO,IAAK,WAAY,MAAO,MAAOC,KAKnE,SAAS/C,EAAQD,GAEtBC,EAAOD,QAAU,SAAS+L,GACxB,IACE,QAASA,IACT,MAAM3I,GACN,OAAO,KAMN,SAASnD,EAAQD,EAASH,GAI/B,GAAIqK,GAAYrK,EAAoB,GAChCuK,EAAYvK,EAAoB,GAChCmM,EAAYnM,EAAoB,IAAI,OACpCoM,EAAY,WACZC,EAAY/F,SAAS8F,GACrBE,GAAa,GAAKD,GAAWjI,MAAMgI,EAEvCpM,GAAoB,GAAGuM,cAAgB,SAASC,GAC9C,MAAOH,GAAU9L,KAAKiM,KAGvBpM,EAAOD,QAAU,SAASiD,EAAGoC,EAAKiH,EAAKC,GACrB,kBAAPD,KACRA,EAAIE,eAAeR,IAAQ5B,EAAKkC,EAAKN,EAAK/I,EAAEoC,GAAO,GAAKpC,EAAEoC,GAAO8G,EAAI5J,KAAKkK,OAAOpH,KACjFiH,EAAIE,eAAe,SAAWpC,EAAKkC,EAAK,OAAQjH,IAE/CpC,IAAMiH,EACPjH,EAAEoC,GAAOiH,GAELC,SAAYtJ,GAAEoC,GAClB+E,EAAKnH,EAAGoC,EAAKiH,MAEdnG,SAASlE,UAAWgK,EAAW,QAASS,YACzC,MAAsB,kBAARnG,OAAsBA,KAAKyF,IAAQE,EAAU9L,KAAKmG,SAK7D,SAAStG,EAAQD,GAEtB,GAAIE,GAAK,EACLyM,EAAKlE,KAAKmE,QACd3M,GAAOD,QAAU,SAASqF,GACxB,MAAO,UAAUlB,OAAOkB,IAAQ1F,EAAY,GAAK0F,EAAK,QAASnF,EAAKyM,GAAID,SAAS,OAK9E,SAASzM,EAAQD,EAASH,GAG/B,GAAIuB,GAAYvB,EAAoB,GACpCI,GAAOD,QAAU,SAASsG,EAAID,EAAM1C,GAElC,GADAvC,EAAUkF,GACPD,IAAS1G,EAAU,MAAO2G,EAC7B,QAAO3C,GACL,IAAK,GAAG,MAAO,UAASX,GACtB,MAAOsD,GAAGlG,KAAKiG,EAAMrD,GAEvB,KAAK,GAAG,MAAO,UAASA,EAAG6J,GACzB,MAAOvG,GAAGlG,KAAKiG,EAAMrD,EAAG6J,GAE1B,KAAK,GAAG,MAAO,UAAS7J,EAAG6J,EAAGvM,GAC5B,MAAOgG,GAAGlG,KAAKiG,EAAMrD,EAAG6J,EAAGvM,IAG/B,MAAO,YACL,MAAOgG,GAAGwG,MAAMzG,EAAMI,cAMrB,SAASxG,EAAQD,GAEtBC,EAAOD,QAAU,SAASqM,GACxB,GAAgB,kBAANA,GAAiB,KAAMhJ,WAAUgJ,EAAK,sBAChD,OAAOA,KAKJ,SAASpM,EAAQD,EAASH,GAE/BI,EAAOD,QAAUH,EAAoB,GAAGiF,UAAYA,SAASiI,iBAIxD,SAAS9M,EAAQD,EAASH,GAE/B,GAAIwB,GAAWxB,EAAoB,IAC/BiF,EAAWjF,EAAoB,GAAGiF,SAElCkI,EAAK3L,EAASyD,IAAazD,EAASyD,EAASmI,cACjDhN,GAAOD,QAAU,SAASqM,GACxB,MAAOW,GAAKlI,EAASmI,cAAcZ,QAKhC,SAASpM,EAAQD,GAEtBC,EAAOD,QAAU,SAASqM,GACxB,MAAqB,gBAAPA,GAAyB,OAAPA,EAA4B,kBAAPA,KAKlD,SAASpM,EAAQD,GAEtB,GAAIwM,MAAoBA,cACxBvM,GAAOD,QAAU,SAASqM,EAAIhH,GAC5B,MAAOmH,GAAepM,KAAKiM,EAAIhH,KAK5B,SAASpF,EAAQD,GAEtB,GAAI0M,MAAcA,QAElBzM,GAAOD,QAAU,SAASqM,GACxB,MAAOK,GAAStM,KAAKiM,GAAIhK,MAAM,EAAG,MAK/B,SAASpC,EAAQD,GAGtBC,EAAOD,QAAU,SAASsG,EAAIL,EAAMI,GAClC,GAAI6G,GAAK7G,IAAS1G,CAClB,QAAOsG,EAAKtC,QACV,IAAK,GAAG,MAAOuJ,GAAK5G,IACAA,EAAGlG,KAAKiG,EAC5B,KAAK,GAAG,MAAO6G,GAAK5G,EAAGL,EAAK,IACRK,EAAGlG,KAAKiG,EAAMJ,EAAK,GACvC,KAAK,GAAG,MAAOiH,GAAK5G,EAAGL,EAAK,GAAIA,EAAK,IACjBK,EAAGlG,KAAKiG,EAAMJ,EAAK,GAAIA,EAAK,GAChD,KAAK,GAAG,MAAOiH,GAAK5G,EAAGL,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAC1BK,EAAGlG,KAAKiG,EAAMJ,EAAK,GAAIA,EAAK,GAAIA,EAAK,GACzD,KAAK,GAAG,MAAOiH,GAAK5G,EAAGL,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACnCK,EAAGlG,KAAKiG,EAAMJ,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAClE,MAAoBK,GAAGwG,MAAMzG,EAAMJ,KAKlC,SAAShG,EAAQD,EAASH,GAE/B,GAAIwB,GAAWxB,EAAoB,GACnCI,GAAOD,QAAU,SAASqM,GACxB,IAAIhL,EAASgL,GAAI,KAAMhJ,WAAUgJ,EAAK,qBACtC,OAAOA,KAKJ,SAASpM,EAAQD,EAASH,GAG/B,GAAIsN,GAAUtN,EAAoB,GAClCI,GAAOD,QAAU,SAASqM,GACxB,MAAOrK,QAAOmL,EAAQd,MAKnB,SAASpM,EAAQD,GAGtBC,EAAOD,QAAU,SAASqM,GACxB,GAAGA,GAAM1M,EAAU,KAAM0D,WAAU,yBAA2BgJ,EAC9D,OAAOA,KAKJ,SAASpM,EAAQD,EAASH,GAG/B,GAAI8B,GAAU9B,EAAoB,IAC9BsN,EAAUtN,EAAoB,GAClCI,GAAOD,QAAU,SAASqM,GACxB,MAAO1K,GAAQwL,EAAQd,MAKpB,SAASpM,EAAQD,EAASH,GAG/B,GAAImB,GAAMnB,EAAoB,GAC9BI,GAAOD,QAAUgC,OAAO,KAAKuB,qBAAqB,GAAKvB,OAAS,SAASqK,GACvE,MAAkB,UAAXrL,EAAIqL,GAAkBA,EAAGpI,MAAM,IAAMjC,OAAOqK,KAKhD,SAASpM,EAAQD,GAGtB,GAAIoN,GAAQ3E,KAAK2E,KACbC,EAAQ5E,KAAK4E,KACjBpN,GAAOD,QAAU,SAASqM,GACxB,MAAOiB,OAAMjB,GAAMA,GAAM,GAAKA,EAAK,EAAIgB,EAAQD,GAAMf,KAKlD,SAASpM,EAAQD,EAASH,GAE/B,GAAI2B,GAAY3B,EAAoB,IAChC0N,EAAY9E,KAAK8E,IACjB7E,EAAYD,KAAKC,GACrBzI,GAAOD,QAAU,SAASyH,EAAO9D,GAE/B,MADA8D,GAAQjG,EAAUiG,GACH,EAARA,EAAY8F,EAAI9F,EAAQ9D,EAAQ,GAAK+E,EAAIjB,EAAO9D,KAKpD,SAAS1D,EAAQD,EAASH,GAG/B,GAAI2B,GAAY3B,EAAoB,IAChC6I,EAAYD,KAAKC,GACrBzI,GAAOD,QAAU,SAASqM,GACxB,MAAOA,GAAK,EAAI3D,EAAIlH,EAAU6K,GAAK,kBAAoB,IAKpD,SAASpM,EAAQD,EAASH,GAS/B,GAAIyK,GAAWzK,EAAoB,IAC/B8B,EAAW9B,EAAoB,IAC/ByB,EAAWzB,EAAoB,IAC/B6B,EAAW7B,EAAoB,IAC/B2N,EAAW3N,EAAoB,GACnCI,GAAOD,QAAU,SAASyN,GACxB,GAAIC,GAAwB,GAARD,EAChBE,EAAwB,GAARF,EAChBG,EAAwB,GAARH,EAChBI,EAAwB,GAARJ,EAChBK,EAAwB,GAARL,EAChBM,EAAwB,GAARN,GAAaK,CACjC,OAAO,UAASE,EAAOzG,EAAYlB,GAQjC,IAPA,GAMIiG,GAAK2B,EANLhL,EAAS3B,EAAS0M,GAClBvC,EAAS9J,EAAQsB,GACjBiL,EAAS5D,EAAI/C,EAAYlB,EAAM,GAC/B1C,EAASjC,EAAS+J,EAAK9H,QACvB8D,EAAS,EACTnC,EAASoI,EAASF,EAAIQ,EAAOrK,GAAUgK,EAAYH,EAAIQ,EAAO,GAAKrO,EAElEgE,EAAS8D,EAAOA,IAAQ,IAAGsG,GAAYtG,IAASgE,MACnDa,EAAMb,EAAKhE,GACXwG,EAAMC,EAAE5B,EAAK7E,EAAOxE,GACjBwK,GACD,GAAGC,EAAOpI,EAAOmC,GAASwG,MACrB,IAAGA,EAAI,OAAOR,GACjB,IAAK,GAAG,OAAO,CACf,KAAK,GAAG,MAAOnB,EACf,KAAK,GAAG,MAAO7E,EACf,KAAK,GAAGnC,EAAOC,KAAK+G,OACf,IAAGuB,EAAS,OAAO,CAG9B,OAAOC,GAAgB,GAAKF,GAAWC,EAAWA,EAAWvI,KAM5D,SAASrF,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,IAC/BuH,EAAWvH,EAAoB,IAC/BsO,EAAWtO,EAAoB,IAAI,UACvCI,GAAOD,QAAU,SAASoO,EAAUzK,GAClC,GAAI0K,EASF,OARCjH,GAAQgH,KACTC,EAAID,EAASzI,YAEE,kBAAL0I,IAAoBA,IAAMlM,QAASiF,EAAQiH,EAAEpM,aAAYoM,EAAI1O,GACpE0B,EAASgN,KACVA,EAAIA,EAAEF,GACG,OAANE,IAAWA,EAAI1O,KAEb,IAAK0O,IAAM1O,EAAYwC,MAAQkM,GAAG1K,KAKxC,SAAS1D,EAAQD,EAASH,GAG/B,GAAImB,GAAMnB,EAAoB,GAC9BI,GAAOD,QAAUmC,MAAMiF,SAAW,SAASkH,GACzC,MAAmB,SAAZtN,EAAIsN,KAKR,SAASrO,EAAQD,EAASH,GAE/B,GAAI0O,GAAS1O,EAAoB,IAAI,OACjC2O,EAAS3O,EAAoB,IAC7B4O,EAAS5O,EAAoB,GAAG4O,MACpCxO,GAAOD,QAAU,SAASyK,GACxB,MAAO8D,GAAM9D,KAAU8D,EAAM9D,GAC3BgE,GAAUA,EAAOhE,KAAUgE,GAAUD,GAAK,UAAY/D,MAKrD,SAASxK,EAAQD,EAASH,GAE/B,GAAIqK,GAASrK,EAAoB,GAC7B6O,EAAS,qBACTH,EAASrE,EAAOwE,KAAYxE,EAAOwE,MACvCzO,GAAOD,QAAU,SAASqF,GACxB,MAAOkJ,GAAMlJ,KAASkJ,EAAMlJ,SAKzB,SAASpF,EAAQD,EAASH,GAI/B,GAAI0B,GAAY1B,EAAoB,IAChC6B,EAAY7B,EAAoB,IAChC4B,EAAY5B,EAAoB,GACpCI,GAAOD,QAAU,SAAS2O,GACxB,MAAO,UAASX,EAAOzF,EAAIC,GACzB,GAGIlF,GAHAL,EAAS1B,EAAUyM,GACnBrK,EAASjC,EAASuB,EAAEU,QACpB8D,EAAShG,EAAQ+G,EAAW7E,EAGhC,IAAGgL,GAAepG,GAAMA,GAAG,KAAM5E,EAAS8D,GAExC,GADAnE,EAAQL,EAAEwE,KACPnE,GAASA,EAAM,OAAO,MAEpB,MAAKK,EAAS8D,EAAOA,IAAQ,IAAGkH,GAAelH,IAASxE,KAC1DA,EAAEwE,KAAWc,EAAG,MAAOoG,IAAelH,CACzC,QAAQkH,GAAe,MAMxB,SAAS1O,EAAQD,EAASH,GAI/B,GAAIY,GAAiBZ,EAAoB,GACrCqK,EAAiBrK,EAAoB,GACrCkB,EAAiBlB,EAAoB,IACrCc,EAAiBd,EAAoB,GACrCa,EAAiBb,EAAoB,GACrCwK,EAAiBxK,EAAoB,IACrC+O,EAAiB/O,EAAoB,GACrCgP,EAAiBhP,EAAoB,IACrCiP,EAAiBjP,EAAoB,IACrC2O,EAAiB3O,EAAoB,IACrCkP,EAAiBlP,EAAoB,IACrCmP,EAAiBnP,EAAoB,IACrCoP,EAAiBpP,EAAoB,IACrCqP,EAAiBrP,EAAoB,IACrCuH,EAAiBvH,EAAoB,IACrCsB,EAAiBtB,EAAoB,IACrC0B,EAAiB1B,EAAoB,IACrCe,EAAiBf,EAAoB,GACrC8C,EAAiBlC,EAAEkC,QACnBF,EAAiBhC,EAAEgC,QACnB0M,EAAiB1O,EAAEqF,OACnBD,EAAiBoJ,EAAOlM,IACxBqM,EAAiBlF,EAAOuE,OACxBY,EAAiBnF,EAAOoF,KACxBC,EAAiBF,GAASA,EAAMG,UAChCC,GAAiB,EACjBC,EAAiBX,EAAI,WACrBhF,EAAiBtJ,EAAEsJ,OACnB4F,EAAiBd,EAAO,mBACxBe,EAAiBf,EAAO,WACxBgB,EAAmC,kBAAXT,GACxBrN,EAAiBC,OAAOC,UAGxB6N,EAAgBnP,GAAeiO,EAAO,WACxC,MAES,IAFFO,EAAQ1M,KAAY,KACzBM,IAAK,WAAY,MAAON,GAAQ8D,KAAM,KAAMjD,MAAO,IAAIN,MACrDA,IACD,SAASqJ,EAAIhH,EAAK0K,GACrB,GAAIC,GAAYrN,EAAQZ,EAAasD,EAClC2K,UAAiBjO,GAAYsD,GAChC5C,EAAQ4J,EAAIhH,EAAK0K,GACdC,GAAa3D,IAAOtK,GAAYU,EAAQV,EAAasD,EAAK2K,IAC3DvN,EAEAwN,EAAO,SAASC,GAClB,GAAIC,GAAMP,EAAWM,GAAOf,EAAQC,EAAQnN,UAS5C,OARAkO,GAAIC,GAAKF,EACTvP,GAAe8O,GAAUK,EAAc/N,EAAamO,GAClDrE,cAAc,EACdwE,IAAK,SAAS/M,GACTvC,EAAIwF,KAAMmJ,IAAW3O,EAAIwF,KAAKmJ,GAASQ,KAAK3J,KAAKmJ,GAAQQ,IAAO,GACnEJ,EAAcvJ,KAAM2J,EAAKtP,EAAW,EAAG0C,OAGpC6M,GAGLG,EAAW,SAASjE,GACtB,MAAoB,gBAANA,IAGZkE,EAAkB,QAAS/N,gBAAe6J,EAAIhH,EAAK0K,GACrD,MAAGA,IAAKhP,EAAI6O,EAAYvK,IAClB0K,EAAEnE,YAID7K,EAAIsL,EAAIqD,IAAWrD,EAAGqD,GAAQrK,KAAKgH,EAAGqD,GAAQrK,IAAO,GACxD0K,EAAIZ,EAAQY,GAAInE,WAAYhL,EAAW,GAAG,OAJtCG,EAAIsL,EAAIqD,IAAQjN,EAAQ4J,EAAIqD,EAAQ9O,EAAW,OACnDyL,EAAGqD,GAAQrK,IAAO,GAIXyK,EAAczD,EAAIhH,EAAK0K,IACzBtN,EAAQ4J,EAAIhH,EAAK0K,IAExBS,EAAoB,QAAS5N,kBAAiByJ,EAAInJ,GACpD/B,EAASkL,EAKT,KAJA,GAGIhH,GAHA5B,EAAOyL,EAAShM,EAAI3B,EAAU2B,IAC9BU,EAAO,EACP6M,EAAIhN,EAAKE,OAEP8M,EAAI7M,GAAE2M,EAAgBlE,EAAIhH,EAAM5B,EAAKG,KAAMV,EAAEmC,GACnD,OAAOgH,IAELqE,EAAU,QAAS5K,QAAOuG,EAAInJ,GAChC,MAAOA,KAAMvD,EAAYwP,EAAQ9C,GAAMmE,EAAkBrB,EAAQ9C,GAAKnJ,IAEpEyN,EAAwB,QAASpN,sBAAqB8B,GACxD,GAAIuL,GAAI7G,EAAO3J,KAAKmG,KAAMlB,EAC1B,OAAOuL,KAAM7P,EAAIwF,KAAMlB,KAAStE,EAAI6O,EAAYvK,IAAQtE,EAAIwF,KAAMmJ,IAAWnJ,KAAKmJ,GAAQrK,GACtFuL,GAAI,GAENC,EAA4B,QAAS9M,0BAAyBsI,EAAIhH,GACpE,GAAI0K,GAAIpN,EAAQ0J,EAAK9K,EAAU8K,GAAKhH,EAEpC,QADG0K,IAAKhP,EAAI6O,EAAYvK,IAAUtE,EAAIsL,EAAIqD,IAAWrD,EAAGqD,GAAQrK,KAAM0K,EAAEnE,YAAa,GAC9EmE,GAELe,EAAuB,QAASlL,qBAAoByG,GAKtD,IAJA,GAGIhH,GAHAF,EAASU,EAAStE,EAAU8K,IAC5B/G,KACA1B,EAAS,EAEPuB,EAAMxB,OAASC,GAAM7C,EAAI6O,EAAYvK,EAAMF,EAAMvB,OAASyB,GAAOqK,GAAOpK,EAAOC,KAAKF,EAC1F,OAAOC,IAELyL,EAAyB,QAAS9G,uBAAsBoC,GAK1D,IAJA,GAGIhH,GAHAF,EAASU,EAAStE,EAAU8K,IAC5B/G,KACA1B,EAAS,EAEPuB,EAAMxB,OAASC,GAAK7C,EAAI6O,EAAYvK,EAAMF,EAAMvB,OAAM0B,EAAOC,KAAKqK,EAAWvK,GACnF,OAAOC,IAEL0L,EAAa,QAASxB,WAAUnD,GAClC,GAAGA,IAAO1M,IAAa2Q,EAASjE,GAAhC,CAKA,IAJA,GAGI4E,GAAUC,EAHVjL,GAAQoG,GACRzI,EAAO,EACPuN,EAAO1K,UAEL0K,EAAGxN,OAASC,GAAEqC,EAAKV,KAAK4L,EAAGvN,KAQjC,OAPAqN,GAAWhL,EAAK,GACM,kBAAZgL,KAAuBC,EAAYD,IAC1CC,IAAc9J,EAAQ6J,MAAUA,EAAW,SAAS5L,EAAK/B,GAE1D,MADG4N,KAAU5N,EAAQ4N,EAAU9Q,KAAKmG,KAAMlB,EAAK/B,IAC3CgN,EAAShN,GAAb,OAA2BA,IAE7B2C,EAAK,GAAKgL,EACH1B,EAAWzC,MAAMuC,EAAOpJ,KAE7BmL,EAAYxC,EAAO,WACrB,GAAI/K,GAAIuL,GAIR,OAA0B,UAAnBG,GAAY1L,KAAyC,MAAtB0L,GAAYvM,EAAGa,KAAwC,MAAzB0L,EAAWvN,OAAO6B,KAIpFgM,KACFT,EAAU,QAASX,UACjB,GAAG6B,EAAS/J,MAAM,KAAMlD,WAAU,8BAClC,OAAO4M,GAAKzB,EAAI/H,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,KAExD0K,EAAS+E,EAAQnN,UAAW,WAAY,QAASyK,YAC/C,MAAOnG,MAAK6J,KAGdE,EAAW,SAASjE,GAClB,MAAOA,aAAc+C,IAGvB3O,EAAEqF,OAAa4K,EACfjQ,EAAEsJ,OAAa4G,EACflQ,EAAEkC,QAAakO,EACfpQ,EAAEgC,QAAa8N,EACf9P,EAAEoC,SAAa2N,EACf/P,EAAEoF,SAAaoJ,EAAOlM,IAAM+N,EAC5BrQ,EAAEuJ,WAAa+G,EAEZpQ,IAAgBd,EAAoB,KACrCwK,EAAStI,EAAa,uBAAwB4O,GAAuB,GAIzE,IAAIU,IAEFC,MAAO,SAASjM,GACd,MAAOtE,GAAI4O,EAAgBtK,GAAO,IAC9BsK,EAAetK,GACfsK,EAAetK,GAAO+J,EAAQ/J,IAGpCkM,OAAQ,QAASA,QAAOlM,GACtB,MAAO2J,GAAMW,EAAgBtK,IAE/BmM,UAAW,WAAY/B,GAAS,GAChCgC,UAAW,WAAYhC,GAAS,GAalChP,GAAEqH,KAAK1H,KAAK,iHAGV6D,MAAM,KAAM,SAASoI,GACrB,GAAI8D,GAAMpB,EAAI1C,EACdgF,GAAchF,GAAMwD,EAAYM,EAAMF,EAAKE,KAG7CV,GAAS,EAET/O,EAAQA,EAAQsK,EAAItK,EAAQ6K,GAAIkD,OAAQW,IAExC1O,EAAQA,EAAQmD,EAAG,SAAUwN,GAE7B3Q,EAAQA,EAAQmD,EAAInD,EAAQoD,GAAK+L,EAAW,UAE1C/J,OAAQ4K,EAERlO,eAAgB+N,EAEhB3N,iBAAkB4N,EAElBzM,yBAA0B8M,EAE1BjL,oBAAqBkL,EAErB7G,sBAAuB8G,IAIzB1B,GAAS3O,EAAQA,EAAQmD,EAAInD,EAAQoD,IAAM+L,GAAauB,GAAY,QAAS5B,UAAWwB,IAGxFlC,EAAeM,EAAS,UAExBN,EAAerG,KAAM,QAAQ,GAE7BqG,EAAe5E,EAAOoF,KAAM,QAAQ,IAI/B,SAASrP,EAAQD,EAASH,GAE/B,GAAI6R,GAAM7R,EAAoB,GAAG4C,QAC7B1B,EAAMlB,EAAoB,IAC1B8R,EAAM9R,EAAoB,IAAI,cAElCI,GAAOD,QAAU,SAASqM,EAAI6D,EAAK0B,GAC9BvF,IAAOtL,EAAIsL,EAAKuF,EAAOvF,EAAKA,EAAGpK,UAAW0P,IAAKD,EAAIrF,EAAIsF,GAAM9F,cAAc,EAAMvI,MAAO4M,MAKxF,SAASjQ,EAAQD,EAASH,GAE/B,GAAIY,GAAYZ,EAAoB,GAChC0B,EAAY1B,EAAoB,GACpCI,GAAOD,QAAU,SAASoF,EAAQmD,GAMhC,IALA,GAIIlD,GAJApC,EAAS1B,EAAU6D,GACnB3B,EAAShD,EAAEiD,QAAQT,GACnBU,EAASF,EAAKE,OACd8D,EAAS,EAEP9D,EAAS8D,GAAM,GAAGxE,EAAEoC,EAAM5B,EAAKgE,QAAcc,EAAG,MAAOlD,KAK1D,SAASpF,EAAQD,EAASH,GAG/B,GAAI0B,GAAY1B,EAAoB,IAChCgG,EAAYhG,EAAoB,GAAGgG,SACnC6G,KAAeA,SAEfmF,EAA+B,gBAAVrG,SAAsBxJ,OAAO4D,oBAClD5D,OAAO4D,oBAAoB4F,WAE3BsG,EAAiB,SAASzF,GAC5B,IACE,MAAOxG,GAASwG,GAChB,MAAMjJ,GACN,MAAOyO,GAAYxP,SAIvBpC,GAAOD,QAAQ+C,IAAM,QAAS6C,qBAAoByG,GAChD,MAAGwF,IAAoC,mBAArBnF,EAAStM,KAAKiM,GAAgCyF,EAAezF,GACxExG,EAAStE,EAAU8K,MAKvB,SAASpM,EAAQD,EAASH,GAG/B,GAAIY,GAAIZ,EAAoB,EAC5BI,GAAOD,QAAU,SAASqM,GACxB,GAAI5I,GAAahD,EAAEiD,QAAQ2I,GACvBrC,EAAavJ,EAAEuJ,UACnB,IAAGA,EAKD,IAJA,GAGI3E,GAHA0M,EAAU/H,EAAWqC,GACrBtC,EAAUtJ,EAAEsJ,OACZnG,EAAU,EAERmO,EAAQpO,OAASC,GAAKmG,EAAO3J,KAAKiM,EAAIhH,EAAM0M,EAAQnO,OAAMH,EAAK8B,KAAKF,EAE5E,OAAO5B,KAKJ,SAASxD,EAAQD,GAEtBC,EAAOD,SAAU,GAIZ,SAASC,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAG,UAAWkO,OAAQnS,EAAoB,OAIjE,SAASI,EAAQD,EAASH,GAG/B,GAAIY,GAAWZ,EAAoB,GAC/ByB,EAAWzB,EAAoB,IAC/B8B,EAAW9B,EAAoB,GAGnCI,GAAOD,QAAUH,EAAoB,GAAG,WACtC,GAAImD,GAAIhB,OAAOgQ,OACXC,KACA7G,KACAvH,EAAI4K,SACJyD,EAAI,sBAGR,OAFAD,GAAEpO,GAAK,EACPqO,EAAEjO,MAAM,IAAI4D,QAAQ,SAASsK,GAAI/G,EAAE+G,GAAKA,IAClB,GAAfnP,KAAMiP,GAAGpO,IAAW7B,OAAOyB,KAAKT,KAAMoI,IAAI7I,KAAK,KAAO2P,IAC1D,QAASF,QAAO3G,EAAQX,GAQ3B,IAPA,GAAI0H,GAAQ9Q,EAAS+J,GACjB8F,EAAQ1K,UACR4L,EAAQlB,EAAGxN,OACX8D,EAAQ,EACR/D,EAAajD,EAAEiD,QACfsG,EAAavJ,EAAEuJ,WACfD,EAAatJ,EAAEsJ,OACbsI,EAAQ5K,GAMZ,IALA,GAIIpC,GAJAxB,EAASlC,EAAQwP,EAAG1J,MACpBhE,EAASuG,EAAatG,EAAQG,GAAGM,OAAO6F,EAAWnG,IAAMH,EAAQG,GACjEF,EAASF,EAAKE,OACd2O,EAAS,EAEP3O,EAAS2O,GAAKvI,EAAO3J,KAAKyD,EAAGwB,EAAM5B,EAAK6O,QAAMF,EAAE/M,GAAOxB,EAAEwB,GAEjE,OAAO+M,IACLpQ,OAAOgQ,QAIN,SAAS/R,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAClCa,GAAQA,EAAQmD,EAAG,UAAWmJ,GAAInN,EAAoB,OAIjD,SAASI,EAAQD,GAGtBC,EAAOD,QAAUgC,OAAOgL,IAAM,QAASA,IAAGuF,EAAGnJ,GAC3C,MAAOmJ,KAAMnJ,EAAU,IAANmJ,GAAW,EAAIA,IAAM,EAAInJ,EAAImJ,GAAKA,GAAKnJ,GAAKA,IAK1D,SAASnJ,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAClCa,GAAQA,EAAQmD,EAAG,UAAW2O,eAAgB3S,EAAoB,IAAIwQ,OAIjE,SAASpQ,EAAQD,EAASH,GAI/B,GAAI8C,GAAW9C,EAAoB,GAAG8C,QAClCtB,EAAWxB,EAAoB,IAC/BsB,EAAWtB,EAAoB,IAC/B4S,EAAQ,SAASxP,EAAGyP,GAEtB,GADAvR,EAAS8B,IACL5B,EAASqR,IAAoB,OAAVA,EAAe,KAAMrP,WAAUqP,EAAQ,6BAEhEzS,GAAOD,SACLqQ,IAAKrO,OAAOwQ,iBAAmB,gBAC7B,SAASG,EAAMC,EAAOvC,GACpB,IACEA,EAAMxQ,EAAoB,IAAIsG,SAAS/F,KAAMuC,EAAQX,OAAOC,UAAW,aAAaoO,IAAK,GACzFA,EAAIsC,MACJC,IAAUD,YAAgBxQ,QAC1B,MAAMiB,GAAIwP,GAAQ,EACpB,MAAO,SAASJ,gBAAevP,EAAGyP,GAIhC,MAHAD,GAAMxP,EAAGyP,GACNE,EAAM3P,EAAE4P,UAAYH,EAClBrC,EAAIpN,EAAGyP,GACLzP,QAEL,GAAStD,GACjB8S,MAAOA,IAKJ,SAASxS,EAAQD,EAASH,GAI/B,GAAIiT,GAAUjT,EAAoB,IAC9B8S,IACJA,GAAK9S,EAAoB,IAAI,gBAAkB,IAC5C8S,EAAO,IAAM,cACd9S,EAAoB,IAAImC,OAAOC,UAAW,WAAY,QAASyK,YAC7D,MAAO,WAAaoG,EAAQvM,MAAQ,MACnC,IAKA,SAAStG,EAAQD,EAASH,GAG/B,GAAImB,GAAMnB,EAAoB,IAC1B8R,EAAM9R,EAAoB,IAAI,eAE9BkT,EAAgD,aAA1C/R,EAAI,WAAY,MAAOyF,cAEjCxG,GAAOD,QAAU,SAASqM,GACxB,GAAIpJ,GAAGmP,EAAGhH,CACV,OAAOiB,KAAO1M,EAAY,YAAqB,OAAP0M,EAAc,OAEZ,iBAA9B+F,GAAKnP,EAAIjB,OAAOqK,IAAKsF,IAAoBS,EAEjDW,EAAM/R,EAAIiC,GAEM,WAAfmI,EAAIpK,EAAIiC,KAAsC,kBAAZA,GAAE+P,OAAuB,YAAc5H,IAK3E,SAASnL,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,SAAU,SAASoT,GACzC,MAAO,SAASC,QAAO7G,GACrB,MAAO4G,IAAW5R,EAASgL,GAAM4G,EAAQ5G,GAAMA,MAM9C,SAASpM,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BsK,EAAUtK,EAAoB,GAC9BqB,EAAUrB,EAAoB,EAClCI,GAAOD,QAAU,SAASmT,EAAKpH,GAC7B,GAAIzF,IAAO6D,EAAKnI,YAAcmR,IAAQnR,OAAOmR,GACzCtI,IACJA,GAAIsI,GAAOpH,EAAKzF,GAChB5F,EAAQA,EAAQmD,EAAInD,EAAQoD,EAAI5C,EAAM,WAAYoF,EAAG,KAAQ,SAAUuE,KAKpE,SAAS5K,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,OAAQ,SAASuT,GACvC,MAAO,SAASC,MAAKhH,GACnB,MAAO+G,IAAS/R,EAASgL,GAAM+G,EAAM/G,GAAMA,MAM1C,SAASpM,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,oBAAqB,SAASyT,GACpD,MAAO,SAASC,mBAAkBlH,GAChC,MAAOiH,IAAsBjS,EAASgL,GAAMiH,EAAmBjH,GAAMA,MAMpE,SAASpM,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,WAAY,SAAS2T,GAC3C,MAAO,SAASC,UAASpH,GACvB,MAAOhL,GAASgL,GAAMmH,EAAYA,EAAUnH,IAAM,GAAQ,MAMzD,SAASpM,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,WAAY,SAAS6T,GAC3C,MAAO,SAASC,UAAStH,GACvB,MAAOhL,GAASgL,GAAMqH,EAAYA,EAAUrH,IAAM,GAAQ,MAMzD,SAASpM,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAEnCA,GAAoB,IAAI,eAAgB,SAAS+T,GAC/C,MAAO,SAASC,cAAaxH,GAC3B,MAAOhL,GAASgL,GAAMuH,EAAgBA,EAAcvH,IAAM,GAAO,MAMhE,SAASpM,EAAQD,EAASH,GAG/B,GAAI0B,GAAY1B,EAAoB,GAEpCA,GAAoB,IAAI,2BAA4B,SAASgR,GAC3D,MAAO,SAAS9M,0BAAyBsI,EAAIhH,GAC3C,MAAOwL,GAA0BtP,EAAU8K,GAAKhH,OAM/C,SAASpF,EAAQD,EAASH,GAG/B,GAAIyB,GAAWzB,EAAoB,GAEnCA,GAAoB,IAAI,iBAAkB,SAASiU,GACjD,MAAO,SAASrO,gBAAe4G,GAC7B,MAAOyH,GAAgBxS,EAAS+K,QAM/B,SAASpM,EAAQD,EAASH,GAG/B,GAAIyB,GAAWzB,EAAoB,GAEnCA,GAAoB,IAAI,OAAQ,SAASkU,GACvC,MAAO,SAAStQ,MAAK4I,GACnB,MAAO0H,GAAMzS,EAAS+K,QAMrB,SAASpM,EAAQD,EAASH,GAG/BA,EAAoB,IAAI,sBAAuB,WAC7C,MAAOA,GAAoB,IAAIkD,OAK5B,SAAS9C,EAAQD,EAASH,GAE/B,GAAI4C,GAAa5C,EAAoB,GAAG4C,QACpC7B,EAAaf,EAAoB,GACjCkB,EAAalB,EAAoB,IACjCmU,EAAa7N,SAASlE,UACtBgS,EAAa,wBACbC,EAAa,MAEjBA,KAAQF,IAAUnU,EAAoB,IAAM4C,EAAQuR,EAAQE,GAC1DrI,cAAc,EACd9I,IAAK,WACH,GAAIoR,IAAS,GAAK5N,MAAM4N,MAAMF,GAC1BxJ,EAAQ0J,EAAQA,EAAM,GAAK,EAE/B,OADApT,GAAIwF,KAAM2N,IAASzR,EAAQ8D,KAAM2N,EAAMtT,EAAW,EAAG6J,IAC9CA,MAMN,SAASxK,EAAQD,EAASH,GAG/B,GAAIY,GAAgBZ,EAAoB,GACpCwB,EAAgBxB,EAAoB,IACpCuU,EAAgBvU,EAAoB,IAAI,eACxCwU,EAAgBlO,SAASlE,SAExBmS,KAAgBC,IAAe5T,EAAEgC,QAAQ4R,EAAeD,GAAe9Q,MAAO,SAASL,GAC1F,GAAkB,kBAARsD,QAAuBlF,EAAS4B,GAAG,OAAO,CACpD,KAAI5B,EAASkF,KAAKtE,WAAW,MAAOgB,aAAasD,KAEjD,MAAMtD,EAAIxC,EAAEiF,SAASzC,IAAG,GAAGsD,KAAKtE,YAAcgB,EAAE,OAAO,CACvD,QAAO,MAKJ,SAAShD,EAAQD,EAASH,GAG/B,GAAIY,GAAcZ,EAAoB,GAClCqK,EAAcrK,EAAoB,GAClCkB,EAAclB,EAAoB,IAClCmB,EAAcnB,EAAoB,IAClCyU,EAAczU,EAAoB,IAClCqB,EAAcrB,EAAoB,GAClC0U,EAAc1U,EAAoB,IAAI2U,KACtCC,EAAc,SACdC,EAAcxK,EAAOuK,GACrBE,EAAcD,EACdhC,EAAcgC,EAAQzS,UAEtB2S,EAAc5T,EAAIP,EAAEqF,OAAO4M,KAAW+B,EACtCI,EAAc,QAAUpI,QAAOxK,UAG/B6S,EAAW,SAASC,GACtB,GAAI1I,GAAKiI,EAAYS,GAAU,EAC/B,IAAgB,gBAAN1I,IAAkBA,EAAG1I,OAAS,EAAE,CACxC0I,EAAKwI,EAAOxI,EAAGmI,OAASD,EAAMlI,EAAI,EAClC,IACI2I,GAAOC,EAAOC,EADdC,EAAQ9I,EAAG+I,WAAW,EAE1B,IAAa,KAAVD,GAA0B,KAAVA,GAEjB,GADAH,EAAQ3I,EAAG+I,WAAW,GACT,KAAVJ,GAA0B,MAAVA,EAAc,MAAOhM,SACnC,IAAa,KAAVmM,EAAa,CACrB,OAAO9I,EAAG+I,WAAW,IACnB,IAAK,IAAK,IAAK,IAAMH,EAAQ,EAAGC,EAAU,EAAI,MAC9C,KAAK,IAAK,IAAK,KAAMD,EAAQ,EAAGC,EAAU,EAAI,MAC9C,SAAU,OAAQ7I,EAEpB,IAAI,GAAoDgJ,GAAhDC,EAASjJ,EAAGhK,MAAM,GAAIuB,EAAI,EAAG6M,EAAI6E,EAAO3R,OAAkB8M,EAAJ7M,EAAOA,IAInE,GAHAyR,EAAOC,EAAOF,WAAWxR,GAGf,GAAPyR,GAAaA,EAAOH,EAAQ,MAAOlM,IACtC,OAAOuM,UAASD,EAAQL,IAE5B,OAAQ5I,EAGRqI,GAAQ,SAAYA,EAAQ,SAAUA,EAAQ,UAChDA,EAAU,QAASc,QAAOlS,GACxB,GAAI+I,GAAK5F,UAAU9C,OAAS,EAAI,EAAIL,EAChC+C,EAAOE,IACX,OAAOF,aAAgBqO,KAEjBE,EAAa1T,EAAM,WAAYwR,EAAM+C,QAAQrV,KAAKiG,KAAYrF,EAAIqF,IAASoO,GAC3E,GAAIE,GAAKG,EAASzI,IAAOyI,EAASzI,IAE1C5L,EAAEqH,KAAK1H,KAAKP,EAAoB,GAAKY,EAAEoF,SAAS8O,GAAQ,6KAMtD1Q,MAAM,KAAM,SAASoB,GAClBtE,EAAI4T,EAAMtP,KAAStE,EAAI2T,EAASrP,IACjC5E,EAAEgC,QAAQiS,EAASrP,EAAK5E,EAAEkC,QAAQgS,EAAMtP,MAG5CqP,EAAQzS,UAAYyQ,EACpBA,EAAM/M,YAAc+O,EACpB7U,EAAoB,IAAIqK,EAAQuK,EAAQC,KAKrC,SAASzU,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,GAGnCI,GAAOD,QAAU,SAASqM,EAAIxI,GAC5B,IAAIxC,EAASgL,GAAI,MAAOA,EACxB,IAAI/F,GAAIgG,CACR,IAAGzI,GAAkC,mBAArByC,EAAK+F,EAAGK,YAA4BrL,EAASiL,EAAMhG,EAAGlG,KAAKiM,IAAK,MAAOC,EACvF,IAA+B,mBAApBhG,EAAK+F,EAAGoJ,WAA2BpU,EAASiL,EAAMhG,EAAGlG,KAAKiM,IAAK,MAAOC,EACjF,KAAIzI,GAAkC,mBAArByC,EAAK+F,EAAGK,YAA4BrL,EAASiL,EAAMhG,EAAGlG,KAAKiM,IAAK,MAAOC,EACxF,MAAMjJ,WAAU,6CAKb,SAASpD,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,GAC9BsN,EAAUtN,EAAoB,IAC9BqB,EAAUrB,EAAoB,GAC9B6V,EAAU,+CAEVC,EAAU,IAAMD,EAAS,IACzBE,EAAU,KACVC,EAAUC,OAAO,IAAMH,EAAQA,EAAQ,KACvCI,EAAUD,OAAOH,EAAQA,EAAQ,MAEjCK,EAAW,SAAS7C,EAAKpH,GAC3B,GAAIlB,KACJA,GAAIsI,GAAOpH,EAAKyI,GAChB9T,EAAQA,EAAQwC,EAAIxC,EAAQoD,EAAI5C,EAAM,WACpC,QAASwU,EAAOvC,MAAUyC,EAAIzC,MAAUyC,IACtC,SAAU/K,IAMZ2J,EAAOwB,EAASxB,KAAO,SAASyB,EAAQxI,GAI1C,MAHAwI,GAASxJ,OAAOU,EAAQ8I,IACd,EAAPxI,IAASwI,EAASA,EAAOC,QAAQL,EAAO,KACjC,EAAPpI,IAASwI,EAASA,EAAOC,QAAQH,EAAO,KACpCE,EAGThW,GAAOD,QAAUgW,GAIZ,SAAS/V,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAWsS,QAAS1N,KAAK2N,IAAI,EAAG,QAI9C,SAASnW,EAAQD,EAASH,GAG/B,GAAIa,GAAYb,EAAoB,GAChCwW,EAAYxW,EAAoB,GAAGoJ,QAEvCvI,GAAQA,EAAQmD,EAAG,UACjBoF,SAAU,QAASA,UAASoD,GAC1B,MAAoB,gBAANA,IAAkBgK,EAAUhK,OAMzC,SAASpM,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAWyS,UAAWzW,EAAoB,OAIxD,SAASI,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,IAC/BwN,EAAW5E,KAAK4E,KACpBpN,GAAOD,QAAU,QAASsW,WAAUjK,GAClC,OAAQhL,EAASgL,IAAOpD,SAASoD,IAAOgB,EAAMhB,KAAQA,IAKnD,SAASpM,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UACjByJ,MAAO,QAASA,OAAMiJ,GACpB,MAAOA,IAAUA,MAMhB,SAAStW,EAAQD,EAASH,GAG/B,GAAIa,GAAYb,EAAoB,GAChCyW,EAAYzW,EAAoB,IAChC2J,EAAYf,KAAKe,GAErB9I,GAAQA,EAAQmD,EAAG,UACjB2S,cAAe,QAASA,eAAcD,GACpC,MAAOD,GAAUC,IAAW/M,EAAI+M,IAAW,qBAM1C,SAAStW,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAW4S,iBAAkB,oBAI3C,SAASxW,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAW6S,iBAAkB,qBAI3C,SAASzW,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAW8S,WAAYA,cAIrC,SAAS1W,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,UAAW0R,SAAUA,YAInC,SAAStV,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B+W,EAAU/W,EAAoB,IAC9BgX,EAAUpO,KAAKoO,KACfC,EAAUrO,KAAKsO,KAGnBrW,GAAQA,EAAQmD,EAAInD,EAAQoD,IAAMgT,GAAkD,KAAxCrO,KAAK4E,MAAMyJ,EAAOtB,OAAOwB,aAAqB,QACxFD,MAAO,QAASA,OAAMxE,GACpB,OAAQA,GAAKA,GAAK,EAAIvJ,IAAMuJ,EAAI,kBAC5B9J,KAAKwO,IAAI1E,GAAK9J,KAAKyO,IACnBN,EAAMrE,EAAI,EAAIsE,EAAKtE,EAAI,GAAKsE,EAAKtE,EAAI,QAMxC,SAAStS,EAAQD,GAGtBC,EAAOD,QAAUyI,KAAKmO,OAAS,QAASA,OAAMrE,GAC5C,OAAQA,GAAKA,GAAK,OAAa,KAAJA,EAAWA,EAAIA,EAAIA,EAAI,EAAI9J,KAAKwO,IAAI,EAAI1E,KAKhE,SAAStS,EAAQD,EAASH,GAK/B,QAASsX,OAAM5E,GACb,MAAQtJ,UAASsJ,GAAKA,IAAW,GAALA,EAAiB,EAAJA,GAAS4E,OAAO5E,GAAK9J,KAAKwO,IAAI1E,EAAI9J,KAAKoO,KAAKtE,EAAIA,EAAI,IAAxDA,EAHvC,GAAI7R,GAAUb,EAAoB,EAMlCa,GAAQA,EAAQmD,EAAG,QAASsT,MAAOA,SAI9B,SAASlX,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QACjBuT,MAAO,QAASA,OAAM7E,GACpB,MAAmB,KAAXA,GAAKA,GAAUA,EAAI9J,KAAKwO,KAAK,EAAI1E,IAAM,EAAIA,IAAM,MAMxD,SAAStS,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BwX,EAAUxX,EAAoB,GAElCa,GAAQA,EAAQmD,EAAG,QACjByT,KAAM,QAASA,MAAK/E,GAClB,MAAO8E,GAAK9E,GAAKA,GAAK9J,KAAK2N,IAAI3N,KAAKe,IAAI+I,GAAI,EAAI,OAM/C,SAAStS,EAAQD,GAGtBC,EAAOD,QAAUyI,KAAK4O,MAAQ,QAASA,MAAK9E,GAC1C,MAAmB,KAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAQ,EAAJA,EAAQ,GAAK,IAK/C,SAAStS,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QACjB0T,MAAO,QAASA,OAAMhF,GACpB,OAAQA,KAAO,GAAK,GAAK9J,KAAK4E,MAAM5E,KAAKwO,IAAI1E,EAAI,IAAO9J,KAAK+O,OAAS,OAMrE,SAASvX,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BgL,EAAUpC,KAAKoC,GAEnBnK,GAAQA,EAAQmD,EAAG,QACjB4T,KAAM,QAASA,MAAKlF,GAClB,OAAQ1H,EAAI0H,GAAKA,GAAK1H,GAAK0H,IAAM,MAMhC,SAAStS,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QAAS6T,MAAO7X,EAAoB,OAIlD,SAASI,EAAQD,GAGtBC,EAAOD,QAAUyI,KAAKiP,OAAS,QAASA,OAAMnF,GAC5C,MAAmB,KAAXA,GAAKA,GAAUA,EAAIA,GAAK,MAAY,KAAJA,EAAWA,EAAIA,EAAIA,EAAI,EAAI9J,KAAKoC,IAAI0H,GAAK,IAK9E,SAAStS,EAAQD,EAASH,GAG/B,GAAIa,GAAYb,EAAoB,GAChCwX,EAAYxX,EAAoB,IAChCuW,EAAY3N,KAAK2N,IACjBD,EAAYC,EAAI,EAAG,KACnBuB,EAAYvB,EAAI,EAAG,KACnBwB,EAAYxB,EAAI,EAAG,MAAQ,EAAIuB,GAC/BE,EAAYzB,EAAI,EAAG,MAEnB0B,EAAkB,SAAS5R,GAC7B,MAAOA,GAAI,EAAIiQ,EAAU,EAAIA,EAI/BzV,GAAQA,EAAQmD,EAAG,QACjBkU,OAAQ,QAASA,QAAOxF,GACtB,GAEIvP,GAAGsC,EAFH0S,EAAQvP,KAAKe,IAAI+I,GACjB0F,EAAQZ,EAAK9E,EAEjB,OAAUsF,GAAPG,EAAoBC,EAAQH,EAAgBE,EAAOH,EAAQF,GAAaE,EAAQF,GACnF3U,GAAK,EAAI2U,EAAYxB,GAAW6B,EAChC1S,EAAStC,GAAKA,EAAIgV,GACf1S,EAASsS,GAAStS,GAAUA,EAAc2S,GAAQC,EAAAA,GAC9CD,EAAQ3S,OAMd,SAASrF,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B2J,EAAUf,KAAKe,GAEnB9I,GAAQA,EAAQmD,EAAG,QACjBsU,MAAO,QAASA,OAAMC,EAAQC,GAO5B,IANA,GAKI/J,GAAKgK,EALLC,EAAQ,EACR3U,EAAQ,EACRuN,EAAQ1K,UACR4L,EAAQlB,EAAGxN,OACX6U,EAAQ,EAEFnG,EAAJzO,GACJ0K,EAAM9E,EAAI2H,EAAGvN,MACH0K,EAAPkK,GACDF,EAAOE,EAAOlK,EACdiK,EAAOA,EAAMD,EAAMA,EAAM,EACzBE,EAAOlK,GACCA,EAAM,GACdgK,EAAOhK,EAAMkK,EACbD,GAAOD,EAAMA,GACRC,GAAOjK,CAEhB,OAAOkK,KAASN,EAAAA,EAAWA,EAAAA,EAAWM,EAAO/P,KAAKoO,KAAK0B,OAMtD,SAAStY,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B4Y,EAAUhQ,KAAKiQ,IAGnBhY,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAIjE,EAAoB,GAAG,WACrD,MAA+B,IAAxB4Y,EAAM,WAAY,IAA4B,GAAhBA,EAAM9U,SACzC,QACF+U,KAAM,QAASA,MAAKnG,EAAGnJ,GACrB,GAAIuP,GAAS,MACTC,GAAMrG,EACNsG,GAAMzP,EACN0P,EAAKH,EAASC,EACdG,EAAKJ,EAASE,CAClB,OAAO,GAAIC,EAAKC,IAAOJ,EAASC,IAAO,IAAMG,EAAKD,GAAMH,EAASE,IAAO,KAAO,KAAO,OAMrF,SAAS5Y,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QACjBmV,MAAO,QAASA,OAAMzG,GACpB,MAAO9J,MAAKwO,IAAI1E,GAAK9J,KAAKwQ,SAMzB,SAAShZ,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QAAS+S,MAAO/W,EAAoB,OAIlD,SAASI,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QACjBqV,KAAM,QAASA,MAAK3G,GAClB,MAAO9J,MAAKwO,IAAI1E,GAAK9J,KAAKyO,QAMzB,SAASjX,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QAASwT,KAAMxX,EAAoB,OAIjD,SAASI,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B6X,EAAU7X,EAAoB,IAC9BgL,EAAUpC,KAAKoC,GAGnBnK,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAIjE,EAAoB,GAAG,WACrD,MAA6B,SAArB4I,KAAK0Q,KAAK,UAChB,QACFA,KAAM,QAASA,MAAK5G,GAClB,MAAO9J,MAAKe,IAAI+I,GAAKA,GAAK,GACrBmF,EAAMnF,GAAKmF,GAAOnF,IAAM,GACxB1H,EAAI0H,EAAI,GAAK1H,GAAK0H,EAAI,KAAO9J,KAAKmI,EAAI,OAM1C,SAAS3Q,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B6X,EAAU7X,EAAoB,IAC9BgL,EAAUpC,KAAKoC,GAEnBnK,GAAQA,EAAQmD,EAAG,QACjBuV,KAAM,QAASA,MAAK7G,GAClB,GAAIvP,GAAI0U,EAAMnF,GAAKA,GACf1F,EAAI6K,GAAOnF,EACf,OAAOvP,IAAKkV,EAAAA,EAAW,EAAIrL,GAAKqL,EAAAA,EAAW,IAAMlV,EAAI6J,IAAMhC,EAAI0H,GAAK1H,GAAK0H,QAMxE,SAAStS,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,QACjBwV,MAAO,QAASA,OAAMhN,GACpB,OAAQA,EAAK,EAAI5D,KAAK4E,MAAQ5E,KAAK2E,MAAMf,OAMxC,SAASpM,EAAQD,EAASH,GAE/B,GAAIa,GAAiBb,EAAoB,GACrC4B,EAAiB5B,EAAoB,IACrCyZ,EAAiB7M,OAAO6M,aACxBC,EAAiB9M,OAAO+M,aAG5B9Y,GAAQA,EAAQmD,EAAInD,EAAQoD,KAAOyV,GAA2C,GAAzBA,EAAe5V,QAAc,UAEhF6V,cAAe,QAASA,eAAcjH,GAMpC,IALA,GAII8C,GAJApH,KACAkD,EAAQ1K,UACR4L,EAAQlB,EAAGxN,OACXC,EAAQ,EAENyO,EAAQzO,GAAE,CAEd,GADAyR,GAAQlE,EAAGvN,KACRnC,EAAQ4T,EAAM,WAAcA,EAAK,KAAMnM,YAAWmM,EAAO,6BAC5DpH,GAAI1I,KAAY,MAAP8P,EACLiE,EAAajE,GACbiE,IAAejE,GAAQ,QAAY,IAAM,MAAQA,EAAO,KAAQ,QAEpE,MAAOpH,GAAI1L,KAAK,QAMjB,SAAStC,EAAQD,EAASH,GAE/B,GAAIa,GAAYb,EAAoB,GAChC0B,EAAY1B,EAAoB,IAChC6B,EAAY7B,EAAoB,GAEpCa,GAAQA,EAAQmD,EAAG,UAEjB4V,IAAK,QAASA,KAAIC,GAOhB,IANA,GAAIC,GAAQpY,EAAUmY,EAASD,KAC3BzT,EAAQtE,EAASiY,EAAIhW,QACrBwN,EAAQ1K,UACR4L,EAAQlB,EAAGxN,OACXsK,KACArK,EAAQ,EACNoC,EAAMpC,GACVqK,EAAI1I,KAAKkH,OAAOkN,EAAI/V,OACbyO,EAAJzO,GAAUqK,EAAI1I,KAAKkH,OAAO0E,EAAGvN,IAChC,OAAOqK,GAAI1L,KAAK,QAMjB,SAAStC,EAAQD,EAASH,GAI/BA,EAAoB,IAAI,OAAQ,SAAS0U,GACvC,MAAO,SAASC,QACd,MAAOD,GAAMhO,KAAM,OAMlB,SAAStG,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B+Z,EAAU/Z,EAAoB,KAAI,EACtCa,GAAQA,EAAQwC,EAAG,UAEjB2W,YAAa,QAASA,aAAYC,GAChC,MAAOF,GAAIrT,KAAMuT,OAMhB,SAAS7Z,EAAQD,EAASH,GAE/B,GAAI2B,GAAY3B,EAAoB,IAChCsN,EAAYtN,EAAoB,GAGpCI,GAAOD,QAAU,SAASiM,GACxB,MAAO,UAAS5F,EAAMyT,GACpB,GAGI9W,GAAG6J,EAHHtD,EAAIkD,OAAOU,EAAQ9G,IACnBzC,EAAIpC,EAAUsY,GACdrJ,EAAIlH,EAAE5F,MAEV,OAAO,GAAJC,GAASA,GAAK6M,EAASxE,EAAY,GAAKtM,GAC3CqD,EAAIuG,EAAE6L,WAAWxR,GACN,MAAJZ,GAAcA,EAAI,OAAUY,EAAI,IAAM6M,IAAM5D,EAAItD,EAAE6L,WAAWxR,EAAI,IAAM,OAAUiJ,EAAI,MACxFZ,EAAY1C,EAAErC,OAAOtD,GAAKZ,EAC1BiJ,EAAY1C,EAAElH,MAAMuB,EAAGA,EAAI,IAAMZ,EAAI,OAAU,KAAO6J,EAAI,OAAU,UAMvE,SAAS5M,EAAQD,EAASH,GAI/B,GAAIa,GAAYb,EAAoB,GAChC6B,EAAY7B,EAAoB,IAChCka,EAAYla,EAAoB,KAChCma,EAAY,WACZC,EAAY,GAAGD,EAEnBtZ,GAAQA,EAAQwC,EAAIxC,EAAQoD,EAAIjE,EAAoB,KAAKma,GAAY,UACnEE,SAAU,QAASA,UAASC,GAC1B,GAAI9T,GAAO0T,EAAQxT,KAAM4T,EAAcH,GACnC7I,EAAO1K,UACP2T,EAAcjJ,EAAGxN,OAAS,EAAIwN,EAAG,GAAKxR,EACtCqG,EAAStE,EAAS2E,EAAK1C,QACvBiD,EAASwT,IAAgBza,EAAYqG,EAAMyC,KAAKC,IAAIhH,EAAS0Y,GAAcpU,GAC3EqU,EAAS5N,OAAO0N,EACpB,OAAOF,GACHA,EAAU7Z,KAAKiG,EAAMgU,EAAQzT,GAC7BP,EAAKhE,MAAMuE,EAAMyT,EAAO1W,OAAQiD,KAASyT,MAM5C,SAASpa,EAAQD,EAASH,GAG/B,GAAIya,GAAWza,EAAoB,KAC/BsN,EAAWtN,EAAoB,GAEnCI,GAAOD,QAAU,SAASqG,EAAM8T,EAAcjG,GAC5C,GAAGoG,EAASH,GAAc,KAAM9W,WAAU,UAAY6Q,EAAO,yBAC7D,OAAOzH,QAAOU,EAAQ9G,MAKnB,SAASpG,EAAQD,EAASH,GAG/B,GAAIwB,GAAWxB,EAAoB,IAC/BmB,EAAWnB,EAAoB,IAC/B0a,EAAW1a,EAAoB,IAAI,QACvCI,GAAOD,QAAU,SAASqM,GACxB,GAAIiO,EACJ,OAAOjZ,GAASgL,MAASiO,EAAWjO,EAAGkO,MAAY5a,IAAc2a,EAAsB,UAAXtZ,EAAIqL,MAK7E,SAASpM,EAAQD,EAASH,GAE/B,GAAI0a,GAAQ1a,EAAoB,IAAI,QACpCI,GAAOD,QAAU,SAASmT,GACxB,GAAIqH,GAAK,GACT,KACE,MAAMrH,GAAKqH,GACX,MAAMpX,GACN,IAEE,MADAoX,GAAGD,IAAS,GACJ,MAAMpH,GAAKqH,GACnB,MAAMtM,KACR,OAAO,IAKN,SAASjO,EAAQD,EAASH,GAI/B,GAAIa,GAAWb,EAAoB,GAC/Bka,EAAWla,EAAoB,KAC/B4a,EAAW,UAEf/Z,GAAQA,EAAQwC,EAAIxC,EAAQoD,EAAIjE,EAAoB,KAAK4a,GAAW,UAClEC,SAAU,QAASA,UAASP,GAC1B,SAAUJ,EAAQxT,KAAM4T,EAAcM,GACnCpS,QAAQ8R,EAAc1T,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,OAM9D,SAASM,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQwC,EAAG,UAEjByX,OAAQ9a,EAAoB,QAKzB,SAASI,EAAQD,EAASH,GAG/B,GAAI2B,GAAY3B,EAAoB,IAChCsN,EAAYtN,EAAoB,GAEpCI,GAAOD,QAAU,QAAS2a,QAAOC,GAC/B,GAAIC,GAAMpO,OAAOU,EAAQ5G,OACrB0H,EAAM,GACN/H,EAAM1E,EAAUoZ,EACpB,IAAO,EAAJ1U,GAASA,GAAKgS,EAAAA,EAAS,KAAMhP,YAAW,0BAC3C,MAAKhD,EAAI,GAAIA,KAAO,KAAO2U,GAAOA,GAAY,EAAJ3U,IAAM+H,GAAO4M,EACvD,OAAO5M,KAKJ,SAAShO,EAAQD,EAASH,GAI/B,GAAIa,GAAcb,EAAoB,GAClC6B,EAAc7B,EAAoB,IAClCka,EAAcla,EAAoB,KAClCib,EAAc,aACdC,EAAc,GAAGD,EAErBpa,GAAQA,EAAQwC,EAAIxC,EAAQoD,EAAIjE,EAAoB,KAAKib,GAAc,UACrEE,WAAY,QAASA,YAAWb,GAC9B,GAAI9T,GAAS0T,EAAQxT,KAAM4T,EAAcW,GACrC3J,EAAS1K,UACTgB,EAAS/F,EAAS+G,KAAKC,IAAIyI,EAAGxN,OAAS,EAAIwN,EAAG,GAAKxR,EAAW0G,EAAK1C,SACnE0W,EAAS5N,OAAO0N,EACpB,OAAOY,GACHA,EAAY3a,KAAKiG,EAAMgU,EAAQ5S,GAC/BpB,EAAKhE,MAAMoF,EAAOA,EAAQ4S,EAAO1W,UAAY0W,MAMhD,SAASpa,EAAQD,EAASH,GAG/B,GAAI+Z,GAAO/Z,EAAoB,KAAI,EAGnCA,GAAoB,KAAK4M,OAAQ,SAAU,SAASwO,GAClD1U,KAAK2U,GAAKzO,OAAOwO,GACjB1U,KAAK4U,GAAK,GAET,WACD,GAEIC,GAFAnY,EAAQsD,KAAK2U,GACbzT,EAAQlB,KAAK4U,EAEjB,OAAG1T,IAASxE,EAAEU,QAAeL,MAAO3D,EAAW0b,MAAM,IACrDD,EAAQxB,EAAI3W,EAAGwE,GACflB,KAAK4U,IAAMC,EAAMzX,QACTL,MAAO8X,EAAOC,MAAM,OAKzB,SAASpb,EAAQD,EAASH,GAG/B,GAAIyb,GAAiBzb,EAAoB,IACrCa,EAAiBb,EAAoB,GACrCwK,EAAiBxK,EAAoB,IACrCuK,EAAiBvK,EAAoB,GACrCkB,EAAiBlB,EAAoB,IACrC0b,EAAiB1b,EAAoB,KACrC2b,EAAiB3b,EAAoB,KACrCiP,EAAiBjP,EAAoB,IACrC6F,EAAiB7F,EAAoB,GAAG6F,SACxC+V,EAAiB5b,EAAoB,IAAI,YACzC6b,OAAsBjY,MAAQ,WAAaA,QAC3CkY,EAAiB,aACjBC,EAAiB,OACjBC,EAAiB,SAEjBC,EAAa,WAAY,MAAOvV,MAEpCtG,GAAOD,QAAU,SAAS2U,EAAMT,EAAM6H,EAAaC,EAAMC,EAASC,EAAQC,GACxEX,EAAYO,EAAa7H,EAAM8H,EAC/B,IAaII,GAAS/W,EAbTgX,EAAY,SAASC,GACvB,IAAIZ,GAASY,IAAQ5J,GAAM,MAAOA,GAAM4J,EACxC,QAAOA,GACL,IAAKV,GAAM,MAAO,SAASnY,QAAQ,MAAO,IAAIsY,GAAYxV,KAAM+V,GAChE,KAAKT,GAAQ,MAAO,SAASU,UAAU,MAAO,IAAIR,GAAYxV,KAAM+V,IACpE,MAAO,SAASE,WAAW,MAAO,IAAIT,GAAYxV,KAAM+V,KAExD3K,EAAauC,EAAO,YACpBuI,EAAaR,GAAWJ,EACxBa,GAAa,EACbhK,EAAaiC,EAAK1S,UAClB0a,EAAajK,EAAM+I,IAAa/I,EAAMiJ,IAAgBM,GAAWvJ,EAAMuJ,GACvEW,EAAaD,GAAWN,EAAUJ,EAGtC,IAAGU,EAAQ,CACT,GAAIE,GAAoBnX,EAASkX,EAASxc,KAAK,GAAIuU,IAEnD7F,GAAe+N,EAAmBlL,GAAK,IAEnC2J,GAAWva,EAAI2R,EAAOiJ,IAAavR,EAAKyS,EAAmBpB,EAAUK,GAEtEW,GAAcE,EAAQlS,OAASoR,IAChCa,GAAa,EACbE,EAAW,QAASL,UAAU,MAAOI,GAAQvc,KAAKmG,QAUtD,GANK+U,IAAWa,IAAYT,IAASgB,GAAehK,EAAM+I,IACxDrR,EAAKsI,EAAO+I,EAAUmB,GAGxBrB,EAAUrH,GAAQ0I,EAClBrB,EAAU5J,GAAQmK,EACfG,EAMD,GALAG,GACEG,OAASE,EAAcG,EAAWP,EAAUR,GAC5CpY,KAASyY,EAAcU,EAAWP,EAAUT,GAC5CY,QAAUC,EAAwBJ,EAAU,WAArBO,GAEtBT,EAAO,IAAI9W,IAAO+W,GACd/W,IAAOqN,IAAOrI,EAASqI,EAAOrN,EAAK+W,EAAQ/W,QAC3C3E,GAAQA,EAAQwC,EAAIxC,EAAQoD,GAAK4X,GAASgB,GAAaxI,EAAMkI,EAEtE,OAAOA,KAKJ,SAASnc,EAAQD,GAEtBC,EAAOD,YAIF,SAASC,EAAQD,EAASH,GAG/B,GAAIY,GAAiBZ,EAAoB,GACrCid,EAAiBjd,EAAoB,GACrCiP,EAAiBjP,EAAoB,IACrCgd,IAGJhd,GAAoB,GAAGgd,EAAmBhd,EAAoB,IAAI,YAAa,WAAY,MAAO0G,QAElGtG,EAAOD,QAAU,SAAS+b,EAAa7H,EAAM8H,GAC3CD,EAAY9Z,UAAYxB,EAAEqF,OAAO+W,GAAoBb,KAAMc,EAAW,EAAGd,KACzElN,EAAeiN,EAAa7H,EAAO,eAKhC,SAASjU,EAAQD,EAASH,GAG/B,GAAIyK,GAAczK,EAAoB,IAClCa,EAAcb,EAAoB,GAClCyB,EAAczB,EAAoB,IAClCO,EAAcP,EAAoB,KAClCkd,EAAcld,EAAoB,KAClC6B,EAAc7B,EAAoB,IAClCmd,EAAcnd,EAAoB,IACtCa,GAAQA,EAAQmD,EAAInD,EAAQoD,GAAKjE,EAAoB,KAAK,SAASod,GAAO9a,MAAM+a,KAAKD,KAAW,SAE9FC,KAAM,QAASA,MAAKC,GAClB,GAQIxZ,GAAQ2B,EAAQ8X,EAAMC,EARtBpa,EAAU3B,EAAS6b,GACnB9O,EAAyB,kBAAR9H,MAAqBA,KAAOpE,MAC7CgP,EAAU1K,UACV4L,EAAUlB,EAAGxN,OACb2Z,EAAUjL,EAAQ,EAAIlB,EAAG,GAAKxR,EAC9B4d,EAAUD,IAAU3d,EACpB8H,EAAU,EACV+V,EAAUR,EAAU/Z,EAIxB,IAFGsa,IAAQD,EAAQhT,EAAIgT,EAAOjL,EAAQ,EAAIlB,EAAG,GAAKxR,EAAW,IAE1D6d,GAAU7d,GAAe0O,GAAKlM,OAAS4a,EAAYS,GAMpD,IADA7Z,EAASjC,EAASuB,EAAEU,QAChB2B,EAAS,GAAI+I,GAAE1K,GAASA,EAAS8D,EAAOA,IAC1CnC,EAAOmC,GAAS8V,EAAUD,EAAMra,EAAEwE,GAAQA,GAASxE,EAAEwE,OANvD,KAAI4V,EAAWG,EAAOpd,KAAK6C,GAAIqC,EAAS,GAAI+I,KAAK+O,EAAOC,EAASrB,QAAQX,KAAM5T,IAC7EnC,EAAOmC,GAAS8V,EAAUnd,EAAKid,EAAUC,GAAQF,EAAK9Z,MAAOmE,IAAQ,GAAQ2V,EAAK9Z,KAStF,OADAgC,GAAO3B,OAAS8D,EACTnC,MAON,SAASrF,EAAQD,EAASH,GAG/B,GAAIsB,GAAWtB,EAAoB,GACnCI,GAAOD,QAAU,SAASqd,EAAU/W,EAAIhD,EAAOkZ,GAC7C,IACE,MAAOA,GAAUlW,EAAGnF,EAASmC,GAAO,GAAIA,EAAM,IAAMgD,EAAGhD,GAEvD,MAAMF,GACN,GAAIqa,GAAMJ,EAAS,SAEnB,MADGI,KAAQ9d,GAAUwB,EAASsc,EAAIrd,KAAKid,IACjCja,KAML,SAASnD,EAAQD,EAASH,GAG/B,GAAI0b,GAAa1b,EAAoB,KACjC4b,EAAa5b,EAAoB,IAAI,YACrCqC,EAAaC,MAAMF,SAEvBhC,GAAOD,QAAU,SAASqM,GACxB,MAAOA,KAAO1M,IAAc4b,EAAUpZ,QAAUkK,GAAMnK,EAAWuZ,KAAcpP,KAK5E,SAASpM,EAAQD,EAASH,GAE/B,GAAIiT,GAAYjT,EAAoB,IAChC4b,EAAY5b,EAAoB,IAAI,YACpC0b,EAAY1b,EAAoB,IACpCI,GAAOD,QAAUH,EAAoB,GAAG6d,kBAAoB,SAASrR,GACnE,MAAGA,IAAM1M,EAAiB0M,EAAGoP,IACxBpP,EAAG,eACHkP,EAAUzI,EAAQzG,IAFvB,SAOG,SAASpM,EAAQD,EAASH,GAE/B,GAAI4b,GAAe5b,EAAoB,IAAI,YACvC8d,GAAe,CAEnB,KACE,GAAIC,IAAS,GAAGnC,IAChBmC,GAAM,UAAY,WAAYD,GAAe,GAC7Cxb,MAAM+a,KAAKU,EAAO,WAAY,KAAM,KACpC,MAAMxa,IAERnD,EAAOD,QAAU,SAAS+L,EAAM8R,GAC9B,IAAIA,IAAgBF,EAAa,OAAO,CACxC,IAAIpR,IAAO,CACX,KACE,GAAIuR,IAAQ,GACRb,EAAOa,EAAIrC,IACfwB,GAAKjB,KAAO,WAAY,OAAQX,KAAM9O,GAAO,IAC7CuR,EAAIrC,GAAY,WAAY,MAAOwB,IACnClR,EAAK+R,GACL,MAAM1a,IACR,MAAOmJ,KAKJ,SAAStM,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAGlCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAIjE,EAAoB,GAAG,WACrD,QAASiE,MACT,QAAS3B,MAAM4b,GAAG3d,KAAK0D,YAAcA,MACnC,SAEFia,GAAI,QAASA,MAKX,IAJA,GAAItW,GAAS,EACT0J,EAAS1K,UACT4L,EAASlB,EAAGxN,OACZ2B,EAAS,IAAoB,kBAARiB,MAAqBA,KAAOpE,OAAOkQ,GACtDA,EAAQ5K,GAAMnC,EAAOmC,GAAS0J,EAAG1J,IAEvC,OADAnC,GAAO3B,OAAS0O,EACT/M,MAMN,SAASrF,EAAQD,EAASH,GAG/B,GAAIme,GAAmBne,EAAoB,KACvCud,EAAmBvd,EAAoB,KACvC0b,EAAmB1b,EAAoB,KACvC0B,EAAmB1B,EAAoB,GAM3CI,GAAOD,QAAUH,EAAoB,KAAKsC,MAAO,QAAS,SAAS8Y,EAAUqB,GAC3E/V,KAAK2U,GAAK3Z,EAAU0Z,GACpB1U,KAAK4U,GAAK,EACV5U,KAAK6J,GAAKkM,GAET,WACD,GAAIrZ,GAAQsD,KAAK2U,GACboB,EAAQ/V,KAAK6J,GACb3I,EAAQlB,KAAK4U,IACjB,QAAIlY,GAAKwE,GAASxE,EAAEU,QAClB4C,KAAK2U,GAAKvb,EACHyd,EAAK,IAEH,QAARd,EAAwBc,EAAK,EAAG3V,GACxB,UAAR6U,EAAwBc,EAAK,EAAGna,EAAEwE,IAC9B2V,EAAK,GAAI3V,EAAOxE,EAAEwE,MACxB,UAGH8T,EAAU0C,UAAY1C,EAAUpZ,MAEhC6b,EAAiB,QACjBA,EAAiB,UACjBA,EAAiB,YAIZ,SAAS/d,EAAQD,EAASH,GAG/B,GAAIqe,GAAcre,EAAoB,IAAI,eACtCqC,EAAcC,MAAMF,SACrBC,GAAWgc,IAAgBve,GAAUE,EAAoB,GAAGqC,EAAYgc,MAC3Eje,EAAOD,QAAU,SAASqF,GACxBnD,EAAWgc,GAAa7Y,IAAO,IAK5B,SAASpF,EAAQD,GAEtBC,EAAOD,QAAU,SAASqb,EAAM/X,GAC9B,OAAQA,MAAOA,EAAO+X,OAAQA,KAK3B,SAASpb,EAAQD,EAASH,GAE/BA,EAAoB,KAAK,UAIpB,SAASI,EAAQD,EAASH,GAG/B,GAAIqK,GAAcrK,EAAoB,GAClCY,EAAcZ,EAAoB,GAClCc,EAAcd,EAAoB,GAClCsO,EAActO,EAAoB,IAAI,UAE1CI,GAAOD,QAAU,SAASmT,GACxB,GAAI9E,GAAInE,EAAOiJ,EACZxS,IAAe0N,IAAMA,EAAEF,IAAS1N,EAAEgC,QAAQ4L,EAAGF,GAC9CtC,cAAc,EACd9I,IAAK,WAAY,MAAOwD,WAMvB,SAAStG,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQwC,EAAG,SAAUib,WAAYte,EAAoB,OAE7DA,EAAoB,KAAK,eAIpB,SAASI,EAAQD,EAASH,GAI/B,GAAIyB,GAAWzB,EAAoB,IAC/B4B,EAAW5B,EAAoB,IAC/B6B,EAAW7B,EAAoB,GAEnCI,GAAOD,WAAame,YAAc,QAASA,YAAW9S,EAAevE,GACnE,GAAI7D,GAAQ3B,EAASiF,MACjBP,EAAQtE,EAASuB,EAAEU,QACnBya,EAAQ3c,EAAQ4J,EAAQrF,GACxBkX,EAAQzb,EAAQqF,EAAOd,GACvBmL,EAAQ1K,UACRG,EAAQuK,EAAGxN,OAAS,EAAIwN,EAAG,GAAKxR,EAChCib,EAAQnS,KAAKC,KAAK9B,IAAQjH,EAAYqG,EAAMvE,EAAQmF,EAAKZ,IAAQkX,EAAMlX,EAAMoY,GAC7EC,EAAQ,CAMZ,KALUD,EAAPlB,GAAkBA,EAAOtC,EAAZwD,IACdC,EAAO,GACPnB,GAAQtC,EAAQ,EAChBwD,GAAQxD,EAAQ,GAEZA,IAAU,GACXsC,IAAQja,GAAEA,EAAEmb,GAAMnb,EAAEia,SACXja,GAAEmb,GACdA,GAAQC,EACRnB,GAAQmB,CACR,OAAOpb,KAKN,SAAShD,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQwC,EAAG,SAAUob,KAAMze,EAAoB,OAEvDA,EAAoB,KAAK,SAIpB,SAASI,EAAQD,EAASH,GAI/B,GAAIyB,GAAWzB,EAAoB,IAC/B4B,EAAW5B,EAAoB,IAC/B6B,EAAW7B,EAAoB,GACnCI,GAAOD,WAAase,MAAQ,QAASA,MAAKhb,GAQxC,IAPA,GAAIL,GAAS3B,EAASiF,MAClB5C,EAASjC,EAASuB,EAAEU,QACpBwN,EAAS1K,UACT4L,EAASlB,EAAGxN,OACZ8D,EAAShG,EAAQ4Q,EAAQ,EAAIlB,EAAG,GAAKxR,EAAWgE,GAChDiD,EAASyL,EAAQ,EAAIlB,EAAG,GAAKxR,EAC7B4e,EAAS3X,IAAQjH,EAAYgE,EAASlC,EAAQmF,EAAKjD,GACjD4a,EAAS9W,GAAMxE,EAAEwE,KAAWnE,CAClC,OAAOL,KAKJ,SAAShD,EAAQD,EAASH,GAI/B,GAAIa,GAAUb,EAAoB,GAC9B2e,EAAU3e,EAAoB,IAAI,GAClCsT,EAAU,OACVsL,GAAU,CAEXtL,SAAUhR,MAAM,GAAGgR,GAAK,WAAYsL,GAAS,IAChD/d,EAAQA,EAAQwC,EAAIxC,EAAQoD,EAAI2a,EAAQ,SACtCC,KAAM,QAASA,MAAKnX,GAClB,MAAOiX,GAAMjY,KAAMgB,EAAYd,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAGzEE,EAAoB,KAAKsT,IAIpB,SAASlT,EAAQD,EAASH,GAI/B,GAAIa,GAAUb,EAAoB,GAC9B2e,EAAU3e,EAAoB,IAAI,GAClCsT,EAAU,YACVsL,GAAU,CAEXtL,SAAUhR,MAAM,GAAGgR,GAAK,WAAYsL,GAAS,IAChD/d,EAAQA,EAAQwC,EAAIxC,EAAQoD,EAAI2a,EAAQ,SACtCE,UAAW,QAASA,WAAUpX,GAC5B,MAAOiX,GAAMjY,KAAMgB,EAAYd,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAGzEE,EAAoB,KAAKsT,IAIpB,SAASlT,EAAQD,EAASH,GAE/B,GAAIY,GAAWZ,EAAoB,GAC/BqK,EAAWrK,EAAoB,GAC/Bya,EAAWza,EAAoB,KAC/B+e,EAAW/e,EAAoB,KAC/Bgf,EAAW3U,EAAO4L,OAClBnB,EAAWkK,EACXnM,EAAWmM,EAAQ5c,UACnB6c,EAAW,KACXC,EAAW,KAEXC,EAAc,GAAIH,GAAQC,KAASA,GAEpCjf,EAAoB,IAAQmf,IAAenf,EAAoB,GAAG,WAGnE,MAFAkf,GAAIlf,EAAoB,IAAI,WAAY,EAEjCgf,EAAQC,IAAQA,GAAOD,EAAQE,IAAQA,GAA4B,QAArBF,EAAQC,EAAK,SAElED,EAAU,QAAS/I,QAAOvV,EAAG2N,GAC3B,GAAI+Q,GAAO3E,EAAS/Z,GAChB2e,EAAOhR,IAAMvO,CACjB,OAAS4G,gBAAgBsY,KAAYI,GAAQ1e,EAAEoF,cAAgBkZ,IAAWK,EACtEF,EACE,GAAIrK,GAAKsK,IAASC,EAAM3e,EAAEmK,OAASnK,EAAG2N,GACtCyG,GAAMsK,EAAO1e,YAAase,IAAWte,EAAEmK,OAASnK,EAAG0e,GAAQC,EAAMN,EAAOxe,KAAKG,GAAK2N,GAHR3N,GAKlFE,EAAEqH,KAAK1H,KAAKK,EAAEoF,SAAS8O,GAAO,SAAStP,GACrCA,IAAOwZ,IAAWpe,EAAEgC,QAAQoc,EAASxZ,GACnCwG,cAAc,EACd9I,IAAK,WAAY,MAAO4R,GAAKtP,IAC7BgL,IAAK,SAAShE,GAAKsI,EAAKtP,GAAOgH,OAGnCqG,EAAM/M,YAAckZ,EACpBA,EAAQ5c,UAAYyQ,EACpB7S,EAAoB,IAAIqK,EAAQ,SAAU2U,IAG5Chf,EAAoB,KAAK,WAIpB,SAASI,EAAQD,EAASH,GAI/B,GAAIsB,GAAWtB,EAAoB,GACnCI,GAAOD,QAAU,WACf,GAAIqG,GAASlF,EAASoF,MAClBjB,EAAS,EAMb,OALGe,GAAK6D,SAAY5E,GAAU,KAC3Be,EAAK8Y,aAAY7Z,GAAU,KAC3Be,EAAK+Y,YAAY9Z,GAAU,KAC3Be,EAAKgZ,UAAY/Z,GAAU,KAC3Be,EAAKiZ,SAAYha,GAAU,KACvBA,IAKJ,SAASrF,EAAQD,EAASH,GAG/B,GAAIY,GAAIZ,EAAoB,EACzBA,GAAoB,IAAoB,KAAd,KAAK0f,OAAa9e,EAAEgC,QAAQqT,OAAO7T,UAAW,SACzE4J,cAAc,EACd9I,IAAKlD,EAAoB,QAKtB,SAASI,EAAQD,EAASH,GAG/BA,EAAoB,KAAK,QAAS,EAAG,SAASsN,EAASoN,GAErD,MAAO,SAASpG,OAAMqL,GAEpB,GAAIvc,GAAKkK,EAAQ5G,MACbD,EAAKkZ,GAAU7f,EAAYA,EAAY6f,EAAOjF,EAClD,OAAOjU,KAAO3G,EAAY2G,EAAGlG,KAAKof,EAAQvc,GAAK,GAAI6S,QAAO0J,GAAQjF,GAAO9N,OAAOxJ,QAM/E,SAAShD,EAAQD,EAASH,GAG/B,GAAIuK,GAAWvK,EAAoB,GAC/BwK,EAAWxK,EAAoB,IAC/BqB,EAAWrB,EAAoB,GAC/BsN,EAAWtN,EAAoB,IAC/BkP,EAAWlP,EAAoB,GAEnCI,GAAOD,QAAU,SAASmT,EAAKxP,EAAQoI,GACrC,GAAI0T,GAAW1Q,EAAIoE,GACf/E,EAAW,GAAG+E,EACfjS,GAAM,WACP,GAAI+B,KAEJ,OADAA,GAAEwc,GAAU,WAAY,MAAO,IACV,GAAd,GAAGtM,GAAKlQ,OAEfoH,EAASoC,OAAOxK,UAAWkR,EAAKpH,EAAKoB,EAASsS,EAAQrR,IACtDhE,EAAK0L,OAAO7T,UAAWwd,EAAkB,GAAV9b,EAG3B,SAASsS,EAAQ3H,GAAM,MAAOF,GAAShO,KAAK6V,EAAQ1P,KAAM+H,IAG1D,SAAS2H,GAAS,MAAO7H,GAAShO,KAAK6V,EAAQ1P,WAOlD,SAAStG,EAAQD,EAASH,GAG/BA,EAAoB,KAAK,UAAW,EAAG,SAASsN,EAASuS,EAASC,GAEhE,MAAO,SAASzJ,SAAQ0J,EAAaC,GAEnC,GAAI5c,GAAKkK,EAAQ5G,MACbD,EAAKsZ,GAAejgB,EAAYA,EAAYigB,EAAYF,EAC5D,OAAOpZ,KAAO3G,EACV2G,EAAGlG,KAAKwf,EAAa3c,EAAG4c,GACxBF,EAASvf,KAAKqM,OAAOxJ,GAAI2c,EAAaC,OAMzC,SAAS5f,EAAQD,EAASH,GAG/BA,EAAoB,KAAK,SAAU,EAAG,SAASsN,EAAS2S,GAEtD,MAAO,SAASzF,QAAOmF,GAErB,GAAIvc,GAAKkK,EAAQ5G,MACbD,EAAKkZ,GAAU7f,EAAYA,EAAY6f,EAAOM,EAClD,OAAOxZ,KAAO3G,EAAY2G,EAAGlG,KAAKof,EAAQvc,GAAK,GAAI6S,QAAO0J,GAAQM,GAAQrT,OAAOxJ,QAMhF,SAAShD,EAAQD,EAASH,GAG/BA,EAAoB,KAAK,QAAS,EAAG,SAASsN,EAAS4S,EAAOC,GAE5D,MAAO,SAAS/b,OAAMkD,EAAW8Y,GAE/B,GAAIhd,GAAKkK,EAAQ5G,MACbD,EAAKa,GAAaxH,EAAYA,EAAYwH,EAAU4Y,EACxD,OAAOzZ,KAAO3G,EACV2G,EAAGlG,KAAK+G,EAAWlE,EAAGgd,GACtBD,EAAO5f,KAAKqM,OAAOxJ,GAAIkE,EAAW8Y,OAMrC,SAAShgB,EAAQD,EAASH,GAG/B,GAqBIqgB,GArBAzf,EAAaZ,EAAoB,GACjCyb,EAAazb,EAAoB,IACjCqK,EAAarK,EAAoB,GACjCyK,EAAazK,EAAoB,IACjCiT,EAAajT,EAAoB,IACjCa,EAAab,EAAoB,GACjCwB,EAAaxB,EAAoB,IACjCsB,EAAatB,EAAoB,IACjCuB,EAAavB,EAAoB,IACjCsgB,EAAatgB,EAAoB,KACjCugB,EAAavgB,EAAoB,KACjCwgB,EAAaxgB,EAAoB,IAAIwQ,IACrCiQ,EAAazgB,EAAoB,IACjCsO,EAAatO,EAAoB,IAAI,WACrC0gB,EAAqB1gB,EAAoB,KACzC2gB,EAAa3gB,EAAoB,KACjC4gB,EAAa,UACbC,EAAaxW,EAAOwW,QACpBC,EAAiC,WAApB7N,EAAQ4N,GACrBxd,EAAagH,EAAOuW,GACpBG,EAAa,aAGbC,EAAc,SAASC,GACzB,GAAyBC,GAArBpO,EAAO,GAAIzP,GAAE0d,EAKjB,OAJGE,KAAInO,EAAKhN,YAAc,SAASoG,GACjCA,EAAK6U,EAAOA,MAEbG,EAAU7d,EAAE8d,QAAQrO,IAAO,SAASiO,GAC9BG,IAAYpO,GAGjBsO,EAAa,WAEf,QAASC,IAAG3O,GACV,GAAI9G,GAAO,GAAIvI,GAAEqP,EAEjB,OADA8N,GAAS5U,EAAMyV,GAAGjf,WACXwJ,EAJT,GAAI0V,IAAQ,CAMZ,KASE,GARAA,EAAQje,GAAKA,EAAE8d,SAAWH,IAC1BR,EAASa,GAAIhe;AACbge,GAAGjf,UAAYxB,EAAEqF,OAAO5C,EAAEjB,WAAY0D,aAAcrC,MAAO4d,MAEtDA,GAAGF,QAAQ,GAAGI,KAAK,uBAAyBF,MAC/CC,GAAQ,GAGPA,GAASthB,EAAoB,GAAG,CACjC,GAAIwhB,IAAqB,CACzBne,GAAE8d,QAAQvgB,EAAEgC,WAAY,QACtBM,IAAK,WAAYse,GAAqB,MAExCF,EAAQE,GAEV,MAAMje,GAAI+d,GAAQ,EACpB,MAAOA,MAILG,EAAkB,SAASte,EAAG6J,GAEhC,MAAGyO,IAAWtY,IAAME,GAAK2J,IAAMqT,GAAe,EACvCI,EAAKtd,EAAG6J,IAEb0U,EAAiB,SAASlT,GAC5B,GAAIxK,GAAI1C,EAASkN,GAAGF,EACpB,OAAOtK,IAAKlE,EAAYkE,EAAIwK,GAE1BmT,EAAa,SAASnV,GACxB,GAAI+U,EACJ,OAAO/f,GAASgL,IAAkC,mBAAnB+U,EAAO/U,EAAG+U,MAAsBA,GAAO,GAEpEK,EAAoB,SAASpT,GAC/B,GAAI2S,GAASU,CACbnb,MAAKwa,QAAU,GAAI1S,GAAE,SAASsT,EAAWC,GACvC,GAAGZ,IAAYrhB,GAAa+hB,IAAW/hB,EAAU,KAAM0D,WAAU,0BACjE2d,GAAUW,EACVD,EAAUE,IAEZrb,KAAKya,QAAU5f,EAAU4f,GACzBza,KAAKmb,OAAUtgB,EAAUsgB,IAEvBG,EAAU,SAAS9V,GACrB,IACEA,IACA,MAAM3I,GACN,OAAQ0e,MAAO1e,KAGf2e,EAAS,SAASC,EAAQC,GAC5B,IAAGD,EAAO9b,EAAV,CACA8b,EAAO9b,GAAI,CACX,IAAIgc,GAAQF,EAAO1hB,CACnBkgB,GAAK,WAuBH,IAtBA,GAAIld,GAAQ0e,EAAOG,EACfC,EAAoB,GAAZJ,EAAOzY,EACf3F,EAAQ,EACRye,EAAM,SAASC,GACjB,GAGIhd,GAAQ8b,EAHRmB,EAAUH,EAAKE,EAASF,GAAKE,EAASE,KACtCxB,EAAUsB,EAAStB,QACnBU,EAAUY,EAASZ,MAEvB,KACKa,GACGH,IAAGJ,EAAOS,GAAI,GAClBnd,EAASid,KAAY,EAAOjf,EAAQif,EAAQjf,GACzCgC,IAAWgd,EAASvB,QACrBW,EAAOre,UAAU,yBACT+d,EAAOI,EAAWlc,IAC1B8b,EAAKhhB,KAAKkF,EAAQ0b,EAASU,GACtBV,EAAQ1b,IACVoc,EAAOpe,GACd,MAAMF,GACNse,EAAOte,KAGL8e,EAAMve,OAASC,GAAEye,EAAIH,EAAMte,KACjCse,GAAMve,OAAS,EACfqe,EAAO9b,GAAI,EACR+b,GAASS,WAAW,WACrB,GACIH,GAASI,EADT5B,EAAUiB,EAAOzhB,CAElBqiB,GAAY7B,KACVJ,EACDD,EAAQmC,KAAK,qBAAsBvf,EAAOyd,IAClCwB,EAAUrY,EAAO4Y,sBACzBP,GAASxB,QAASA,EAASgC,OAAQzf,KAC1Bqf,EAAUzY,EAAOyY,UAAYA,EAAQb,OAC9Ca,EAAQb,MAAM,8BAA+Bxe,IAE/C0e,EAAOhf,EAAIrD,GACZ,OAGHijB,EAAc,SAAS7B,GACzB,GAGIuB,GAHAN,EAASjB,EAAQiC,GACjBd,EAASF,EAAOhf,GAAKgf,EAAO1hB,EAC5BsD,EAAS,CAEb,IAAGoe,EAAOS,EAAE,OAAO,CACnB,MAAMP,EAAMve,OAASC,GAEnB,GADA0e,EAAWJ,EAAMte,KACd0e,EAASE,OAASI,EAAYN,EAASvB,SAAS,OAAO,CAC1D,QAAO,GAEPkC,EAAU,SAAS3f,GACrB,GAAI0e,GAASzb,IACVyb,GAAO7Y,IACV6Y,EAAO7Y,GAAI,EACX6Y,EAASA,EAAOkB,GAAKlB,EACrBA,EAAOG,EAAI7e,EACX0e,EAAOzY,EAAI,EACXyY,EAAOhf,EAAIgf,EAAO1hB,EAAE+B,QACpB0f,EAAOC,GAAQ,KAEbmB,EAAW,SAAS7f,GACtB,GACI8d,GADAY,EAASzb,IAEb,KAAGyb,EAAO7Y,EAAV,CACA6Y,EAAO7Y,GAAI,EACX6Y,EAASA,EAAOkB,GAAKlB,CACrB,KACE,GAAGA,EAAOzhB,IAAM+C,EAAM,KAAMD,WAAU,qCACnC+d,EAAOI,EAAWle,IACnBkd,EAAK,WACH,GAAI4C,IAAWF,EAAGlB,EAAQ7Y,GAAG,EAC7B,KACEiY,EAAKhhB,KAAKkD,EAAOgH,EAAI6Y,EAAUC,EAAS,GAAI9Y,EAAI2Y,EAASG,EAAS,IAClE,MAAMhgB,GACN6f,EAAQ7iB,KAAKgjB,EAAShgB,OAI1B4e,EAAOG,EAAI7e,EACX0e,EAAOzY,EAAI,EACXwY,EAAOC,GAAQ,IAEjB,MAAM5e,GACN6f,EAAQ7iB,MAAM8iB,EAAGlB,EAAQ7Y,GAAG,GAAQ/F,KAKpC6d,KAEF/d,EAAI,QAASmgB,SAAQC,GACnBliB,EAAUkiB,EACV,IAAItB,GAASzb,KAAKyc,IAChBziB,EAAG4f,EAAU5Z,KAAMrD,EAAGud,GACtBngB,KACA0C,EAAGrD,EACH4J,EAAG,EACHJ,GAAG,EACHgZ,EAAGxiB,EACH8iB,GAAG,EACHvc,GAAG,EAEL,KACEod,EAAShZ,EAAI6Y,EAAUnB,EAAQ,GAAI1X,EAAI2Y,EAASjB,EAAQ,IACxD,MAAMuB,GACNN,EAAQ7iB,KAAK4hB,EAAQuB,KAGzB1jB,EAAoB,KAAKqD,EAAEjB,WAEzBmf,KAAM,QAASA,MAAKoC,EAAaC,GAC/B,GAAInB,GAAW,GAAIb,GAAkBlB,EAAmBha,KAAMrD,IAC1D6d,EAAWuB,EAASvB,QACpBiB,EAAWzb,KAAKyc,EAMpB,OALAV,GAASF,GAA6B,kBAAfoB,GAA4BA,GAAc,EACjElB,EAASE,KAA4B,kBAAdiB,IAA4BA,EACnDzB,EAAO1hB,EAAEiF,KAAK+c,GACXN,EAAOhf,GAAEgf,EAAOhf,EAAEuC,KAAK+c,GACvBN,EAAOzY,GAAEwY,EAAOC,GAAQ,GACpBjB,GAGT2C,QAAS,SAASD,GAChB,MAAOld,MAAK6a,KAAKzhB,EAAW8jB,OAKlC/iB,EAAQA,EAAQsK,EAAItK,EAAQ6K,EAAI7K,EAAQoD,GAAKmd,GAAaoC,QAASngB,IACnErD,EAAoB,IAAIqD,EAAGud,GAC3B5gB,EAAoB,KAAK4gB,GACzBP,EAAUrgB,EAAoB,GAAG4gB,GAGjC/f,EAAQA,EAAQmD,EAAInD,EAAQoD,GAAKmd,EAAYR,GAE3CiB,OAAQ,QAASA,QAAOwB,GACtB,GAAIS,GAAa,GAAIlC,GAAkBlb,MACnCqb,EAAa+B,EAAWjC,MAE5B,OADAE,GAASsB,GACFS,EAAW5C,WAGtBrgB,EAAQA,EAAQmD,EAAInD,EAAQoD,IAAMmd,GAAcJ,GAAY,IAAQJ,GAElEO,QAAS,QAASA,SAAQzO,GAExB,GAAGA,YAAarP,IAAKoe,EAAgB/O,EAAE5M,YAAaY,MAAM,MAAOgM,EACjE,IAAIoR,GAAa,GAAIlC,GAAkBlb,MACnCob,EAAagC,EAAW3C,OAE5B,OADAW,GAAUpP,GACHoR,EAAW5C,WAGtBrgB,EAAQA,EAAQmD,EAAInD,EAAQoD,IAAMmd,GAAcphB,EAAoB,KAAK,SAASod,GAChF/Z,EAAE0gB,IAAI3G,GAAM,SAAS,iBAClBwD,GAEHmD,IAAK,QAASA,KAAIC,GAChB,GAAIxV,GAAakT,EAAehb,MAC5Bod,EAAa,GAAIlC,GAAkBpT,GACnC2S,EAAa2C,EAAW3C,QACxBU,EAAaiC,EAAWjC,OACxBnF,KACAuH,EAASjC,EAAQ,WACnBzB,EAAMyD,GAAU,EAAOtH,EAAOhX,KAAMgX,EACpC,IAAIwH,GAAYxH,EAAO5Y,OACnBqgB,EAAY7hB,MAAM4hB,EACnBA,GAAUtjB,EAAEqH,KAAK1H,KAAKmc,EAAQ,SAASwE,EAAStZ,GACjD,GAAIwc,IAAgB,CACpB5V,GAAE2S,QAAQD,GAASK,KAAK,SAAS9d,GAC5B2gB,IACHA,GAAgB,EAChBD,EAAQvc,GAASnE,IACfygB,GAAa/C,EAAQgD,KACtBtC,KAEAV,EAAQgD,IAGf,OADGF,IAAOpC,EAAOoC,EAAOhC,OACjB6B,EAAW5C,SAGpBmD,KAAM,QAASA,MAAKL,GAClB,GAAIxV,GAAakT,EAAehb,MAC5Bod,EAAa,GAAIlC,GAAkBpT,GACnCqT,EAAaiC,EAAWjC,OACxBoC,EAASjC,EAAQ,WACnBzB,EAAMyD,GAAU,EAAO,SAAS9C,GAC9B1S,EAAE2S,QAAQD,GAASK,KAAKuC,EAAW3C,QAASU,MAIhD,OADGoC,IAAOpC,EAAOoC,EAAOhC,OACjB6B,EAAW5C,YAMjB,SAAS9gB,EAAQD,GAEtBC,EAAOD,QAAU,SAASqM,EAAI0P,EAAatR,GACzC,KAAK4B,YAAc0P,IAAa,KAAM1Y,WAAUoH,EAAO,4BACvD,OAAO4B,KAKJ,SAASpM,EAAQD,EAASH,GAE/B,GAAIyK,GAAczK,EAAoB,IAClCO,EAAcP,EAAoB,KAClCkd,EAAcld,EAAoB,KAClCsB,EAActB,EAAoB,IAClC6B,EAAc7B,EAAoB,IAClCmd,EAAcnd,EAAoB,IACtCI,GAAOD,QAAU,SAAS6jB,EAAUrH,EAASlW,EAAID,GAC/C,GAGI1C,GAAQyZ,EAAMC,EAHdG,EAASR,EAAU6G,GACnB3V,EAAS5D,EAAIhE,EAAID,EAAMmW,EAAU,EAAI,GACrC/U,EAAS,CAEb,IAAoB,kBAAV+V,GAAqB,KAAMna,WAAUwgB,EAAW,oBAE1D,IAAG9G,EAAYS,GAAQ,IAAI7Z,EAASjC,EAASmiB,EAASlgB,QAASA,EAAS8D,EAAOA,IAC7E+U,EAAUtO,EAAE/M,EAASic,EAAOyG,EAASpc,IAAQ,GAAI2V,EAAK,IAAMlP,EAAE2V,EAASpc,QAClE,KAAI4V,EAAWG,EAAOpd,KAAKyjB,KAAazG,EAAOC,EAASrB,QAAQX,MACrEjb,EAAKid,EAAUnP,EAAGkP,EAAK9Z,MAAOkZ,KAM7B,SAASvc,EAAQD,EAASH,GAG/B,GAAIsB,GAAYtB,EAAoB,IAChCuB,EAAYvB,EAAoB,IAChCsO,EAAYtO,EAAoB,IAAI,UACxCI,GAAOD,QAAU,SAASiD,EAAG8M,GAC3B,GAAiClM,GAA7BwK,EAAIlN,EAAS8B,GAAG0C,WACpB,OAAO0I,KAAM1O,IAAckE,EAAI1C,EAASkN,GAAGF,KAAaxO,EAAYoQ,EAAI3O,EAAUyC,KAK/E,SAAS5D,EAAQD,EAASH,GAE/B,GAMIskB,GAAMC,EAAMrC,EANZ7X,EAAYrK,EAAoB,GAChCwkB,EAAYxkB,EAAoB,KAAKwQ,IACrCiU,EAAYpa,EAAOqa,kBAAoBra,EAAOsa,uBAC9C9D,EAAYxW,EAAOwW,QACnB2C,EAAYnZ,EAAOmZ,QACnB1C,EAAgD,WAApC9gB,EAAoB,IAAI6gB,GAGpC+D,EAAQ,WACV,GAAIC,GAAQC,EAAQre,CAKpB,KAJGqa,IAAW+D,EAAShE,EAAQiE,UAC7BjE,EAAQiE,OAAS,KACjBD,EAAOE,QAEHT,GACJQ,EAASR,EAAKQ,OACdre,EAAS6d,EAAK7d,GACXqe,GAAOA,EAAOE,QACjBve,IACGqe,GAAOA,EAAOC,OACjBT,EAAOA,EAAKnI,IACZoI,GAAOzkB,EACN+kB,GAAOA,EAAOG,QAInB,IAAGlE,EACDoB,EAAS,WACPrB,EAAQoE,SAASL,QAGd,IAAGH,EAAS,CACjB,GAAIS,GAAS,EACTC,EAASlgB,SAASmgB,eAAe,GACrC,IAAIX,GAASG,GAAOS,QAAQF,GAAOG,eAAe,IAClDpD,EAAS,WACPiD,EAAKI,KAAOL,GAAUA,OAIxBhD,GADQsB,GAAWA,EAAQrC,QAClB,WACPqC,EAAQrC,UAAUI,KAAKqD,IAShB,WAEPJ,EAAUjkB,KAAK8J,EAAQua,GAI3BxkB,GAAOD,QAAU,QAASwgB,MAAKla,GAC7B,GAAI+e,IAAQ/e,GAAIA,EAAI0V,KAAMrc,EAAWglB,OAAQhE,GAAUD,EAAQiE,OAC5DP,KAAKA,EAAKpI,KAAOqJ,GAChBlB,IACFA,EAAOkB,EACPtD,KACAqC,EAAOiB,IAKN,SAASplB,EAAQD,EAASH,GAE/B,GAYIylB,GAAOC,EAASC,EAZhBlb,EAAqBzK,EAAoB,IACzCoB,EAAqBpB,EAAoB,IACzCgB,EAAqBhB,EAAoB,IACzCiB,EAAqBjB,EAAoB,IACzCqK,EAAqBrK,EAAoB,GACzC6gB,EAAqBxW,EAAOwW,QAC5B+E,EAAqBvb,EAAOwb,aAC5BC,EAAqBzb,EAAO0b,eAC5BC,EAAqB3b,EAAO2b,eAC5BC,EAAqB,EACrBC,KACAC,EAAqB,qBAErB3D,EAAM,WACR,GAAIniB,IAAMqG,IACV,IAAGwf,EAAMvZ,eAAetM,GAAI,CAC1B,GAAIoG,GAAKyf,EAAM7lB,SACR6lB,GAAM7lB,GACboG,MAGA2f,EAAU,SAASC,GACrB7D,EAAIjiB,KAAK8lB,EAAMd,MAGbK,IAAYE,IACdF,EAAU,QAASC,cAAapf,GAE9B,IADA,GAAIL,MAAWrC,EAAI,EACb6C,UAAU9C,OAASC,GAAEqC,EAAKV,KAAKkB,UAAU7C,KAK/C,OAJAmiB,KAAQD,GAAW,WACjB7kB,EAAoB,kBAANqF,GAAmBA,EAAKH,SAASG,GAAKL,IAEtDqf,EAAMQ,GACCA,GAETH,EAAY,QAASC,gBAAe1lB,SAC3B6lB,GAAM7lB,IAGwB,WAApCL,EAAoB,IAAI6gB,GACzB4E,EAAQ,SAASplB,GACfwgB,EAAQoE,SAASxa,EAAI+X,EAAKniB,EAAI,KAGxB2lB,GACRN,EAAU,GAAIM,GACdL,EAAUD,EAAQY,MAClBZ,EAAQa,MAAMC,UAAYJ,EAC1BX,EAAQhb,EAAIkb,EAAKc,YAAad,EAAM,IAG5Btb,EAAOqc,kBAA0C,kBAAfD,eAA8Bpc,EAAOsc,eAC/ElB,EAAQ,SAASplB,GACfgK,EAAOoc,YAAYpmB,EAAK,GAAI,MAE9BgK,EAAOqc,iBAAiB,UAAWN,GAAS,IAG5CX,EADQU,IAAsBllB,GAAI,UAC1B,SAASZ,GACfW,EAAK8D,YAAY7D,EAAI,WAAWklB,GAAsB,WACpDnlB,EAAK4lB,YAAYlgB,MACjB8b,EAAIjiB,KAAKF,KAKL,SAASA,GACfwiB,WAAWpY,EAAI+X,EAAKniB,EAAI,GAAI,KAIlCD,EAAOD,SACLqQ,IAAOoV,EACPiB,MAAOf,IAKJ,SAAS1lB,EAAQD,EAASH,GAE/B,GAAIwK,GAAWxK,EAAoB,GACnCI,GAAOD,QAAU,SAASqL,EAAQzG,GAChC,IAAI,GAAIS,KAAOT,GAAIyF,EAASgB,EAAQhG,EAAKT,EAAIS,GAC7C,OAAOgG,KAKJ,SAASpL,EAAQD,EAASH,GAG/B,GAAI8mB,GAAS9mB,EAAoB,IAGjCA,GAAoB,KAAK,MAAO,SAASkD,GACvC,MAAO,SAAS6jB,OAAO,MAAO7jB,GAAIwD,KAAME,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAG9EoD,IAAK,QAASA,KAAIsC,GAChB,GAAIwhB,GAAQF,EAAOG,SAASvgB,KAAMlB,EAClC,OAAOwhB,IAASA,EAAM1E,GAGxB9R,IAAK,QAASA,KAAIhL,EAAK/B,GACrB,MAAOqjB,GAAOjV,IAAInL,KAAc,IAARlB,EAAY,EAAIA,EAAK/B,KAE9CqjB,GAAQ,IAIN,SAAS1mB,EAAQD,EAASH,GAG/B,GAAIY,GAAeZ,EAAoB,GACnCuK,EAAevK,EAAoB,GACnCknB,EAAelnB,EAAoB,KACnCyK,EAAezK,EAAoB,IACnCsgB,EAAetgB,EAAoB,KACnCsN,EAAetN,EAAoB,IACnCugB,EAAevgB,EAAoB,KACnCmnB,EAAennB,EAAoB,KACnCud,EAAevd,EAAoB,KACnConB,EAAepnB,EAAoB,IAAI,MACvCqnB,EAAernB,EAAoB,IACnCwB,EAAexB,EAAoB,IACnCsnB,EAAetnB,EAAoB,KACnCc,EAAed,EAAoB,GACnCgU,EAAe7R,OAAO6R,cAAgBxS,EACtC+lB,EAAezmB,EAAc,KAAO,OACpCT,EAAe,EAEfmnB,EAAU,SAAShb,EAAIvG,GAEzB,IAAIzE,EAASgL,GAAI,MAAoB,gBAANA,GAAiBA,GAAmB,gBAANA,GAAiB,IAAM,KAAOA,CAC3F,KAAI6a,EAAK7a,EAAI4a,GAAI,CAEf,IAAIpT,EAAaxH,GAAI,MAAO,GAE5B,KAAIvG,EAAO,MAAO,GAElBsE,GAAKiC,EAAI4a,IAAM/mB,GAEf,MAAO,IAAMmM,EAAG4a,IAGhBH,EAAW,SAASzgB,EAAMhB,GAE5B,GAA0BwhB,GAAtBpf,EAAQ4f,EAAQhiB,EACpB,IAAa,MAAVoC,EAAc,MAAOpB,GAAK8U,GAAG1T,EAEhC,KAAIof,EAAQxgB,EAAKihB,GAAIT,EAAOA,EAAQA,EAAM3gB,EACxC,GAAG2gB,EAAM1U,GAAK9M,EAAI,MAAOwhB,GAI7B5mB,GAAOD,SACLuhB,eAAgB,SAAS6B,EAASlP,EAAMxG,EAAQ6Z,GAC9C,GAAIlZ,GAAI+U,EAAQ,SAAS/c,EAAMwd,GAC7B1D,EAAU9Z,EAAMgI,EAAG6F,GACnB7N,EAAK8U,GAAK1a,EAAEqF,OAAO,MACnBO,EAAKihB,GAAK3nB,EACV0G,EAAKmhB,GAAK7nB,EACV0G,EAAK+gB,GAAQ,EACVvD,GAAYlkB,GAAUygB,EAAMyD,EAAUnW,EAAQrH,EAAKkhB,GAAQlhB,IAqDhE,OAnDA0gB,GAAY1Y,EAAEpM,WAGZykB,MAAO,QAASA,SACd,IAAI,GAAIrgB,GAAOE,KAAM6e,EAAO/e,EAAK8U,GAAI0L,EAAQxgB,EAAKihB,GAAIT,EAAOA,EAAQA,EAAM3gB,EACzE2gB,EAAM3D,GAAI,EACP2D,EAAMtmB,IAAEsmB,EAAMtmB,EAAIsmB,EAAMtmB,EAAE2F,EAAIvG,SAC1BylB,GAAKyB,EAAMjjB,EAEpByC,GAAKihB,GAAKjhB,EAAKmhB,GAAK7nB,EACpB0G,EAAK+gB,GAAQ,GAIfK,SAAU,SAASpiB,GACjB,GAAIgB,GAAQE,KACRsgB,EAAQC,EAASzgB,EAAMhB,EAC3B,IAAGwhB,EAAM,CACP,GAAI7K,GAAO6K,EAAM3gB,EACbwhB,EAAOb,EAAMtmB,QACV8F,GAAK8U,GAAG0L,EAAMjjB,GACrBijB,EAAM3D,GAAI,EACPwE,IAAKA,EAAKxhB,EAAI8V,GACdA,IAAKA,EAAKzb,EAAImnB,GACdrhB,EAAKihB,IAAMT,IAAMxgB,EAAKihB,GAAKtL,GAC3B3V,EAAKmhB,IAAMX,IAAMxgB,EAAKmhB,GAAKE,GAC9BrhB,EAAK+gB,KACL,QAASP,GAIbhf,QAAS,QAASA,SAAQN,GAGxB,IAFA,GACIsf,GADA3Y,EAAI5D,EAAI/C,EAAYd,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,EAAW,GAEnEknB,EAAQA,EAAQA,EAAM3gB,EAAIK,KAAK+gB,IAGnC,IAFApZ,EAAE2Y,EAAM1E,EAAG0E,EAAM1U,EAAG5L,MAEdsgB,GAASA,EAAM3D,GAAE2D,EAAQA,EAAMtmB,GAKzCQ,IAAK,QAASA,KAAIsE,GAChB,QAASyhB,EAASvgB,KAAMlB,MAGzB1E,GAAYF,EAAEgC,QAAQ4L,EAAEpM,UAAW,QACpCc,IAAK,WACH,MAAOoK,GAAQ5G,KAAK6gB,OAGjB/Y,GAETqD,IAAK,SAASrL,EAAMhB,EAAK/B,GACvB,GACIokB,GAAMjgB,EADNof,EAAQC,EAASzgB,EAAMhB,EAoBzB,OAjBCwhB,GACDA,EAAM1E,EAAI7e,GAGV+C,EAAKmhB,GAAKX,GACRjjB,EAAG6D,EAAQ4f,EAAQhiB,GAAK,GACxB8M,EAAG9M,EACH8c,EAAG7e,EACH/C,EAAGmnB,EAAOrhB,EAAKmhB,GACfthB,EAAGvG,EACHujB,GAAG,GAED7c,EAAKihB,KAAGjhB,EAAKihB,GAAKT,GACnBa,IAAKA,EAAKxhB,EAAI2gB,GACjBxgB,EAAK+gB,KAEQ,MAAV3f,IAAcpB,EAAK8U,GAAG1T,GAASof,IAC3BxgB,GAEXygB,SAAUA,EACVa,UAAW,SAAStZ,EAAG6F,EAAMxG,GAG3BsZ,EAAY3Y,EAAG6F,EAAM,SAAS+G,EAAUqB,GACtC/V,KAAK2U,GAAKD,EACV1U,KAAK6J,GAAKkM,EACV/V,KAAKihB,GAAK7nB,GACT,WAKD,IAJA,GAAI0G,GAAQE,KACR+V,EAAQjW,EAAK+J,GACbyW,EAAQxgB,EAAKmhB,GAEXX,GAASA,EAAM3D,GAAE2D,EAAQA,EAAMtmB,CAErC,OAAI8F,GAAK6U,KAAQ7U,EAAKmhB,GAAKX,EAAQA,EAAQA,EAAM3gB,EAAIG,EAAK6U,GAAGoM,IAMlD,QAARhL,EAAwBc,EAAK,EAAGyJ,EAAM1U,GAC9B,UAARmK,EAAwBc,EAAK,EAAGyJ,EAAM1E,GAClC/E,EAAK,GAAIyJ,EAAM1U,EAAG0U,EAAM1E,KAN7B9b,EAAK6U,GAAKvb,EACHyd,EAAK,KAMb1P,EAAS,UAAY,UAAYA,GAAQ,GAG5CyZ,EAAWjT,MAMV,SAASjU,EAAQD,EAASH,GAG/B,GAAIqK,GAAiBrK,EAAoB,GACrCa,EAAiBb,EAAoB,GACrCwK,EAAiBxK,EAAoB,IACrCknB,EAAiBlnB,EAAoB,KACrCugB,EAAiBvgB,EAAoB,KACrCsgB,EAAiBtgB,EAAoB,KACrCwB,EAAiBxB,EAAoB,IACrCqB,EAAiBrB,EAAoB,GACrC+nB,EAAiB/nB,EAAoB,KACrCiP,EAAiBjP,EAAoB,GAEzCI,GAAOD,QAAU,SAASkU,EAAMkP,EAAShH,EAASyL,EAAQna,EAAQoa,GAChE,GAAInT,GAAQzK,EAAOgK,GACf7F,EAAQsG,EACR4S,EAAQ7Z,EAAS,MAAQ,MACzBgF,EAAQrE,GAAKA,EAAEpM,UACfgB,KACA8kB,EAAY,SAAS5U,GACvB,GAAI7M,GAAKoM,EAAMS,EACf9I,GAASqI,EAAOS,EACP,UAAPA,EAAkB,SAASnQ,GACzB,MAAO8kB,KAAYzmB,EAAS2B,IAAK,EAAQsD,EAAGlG,KAAKmG,KAAY,IAANvD,EAAU,EAAIA,IAC5D,OAAPmQ,EAAe,QAASpS,KAAIiC,GAC9B,MAAO8kB,KAAYzmB,EAAS2B,IAAK,EAAQsD,EAAGlG,KAAKmG,KAAY,IAANvD,EAAU,EAAIA,IAC5D,OAAPmQ,EAAe,QAASpQ,KAAIC,GAC9B,MAAO8kB,KAAYzmB,EAAS2B,GAAKrD,EAAY2G,EAAGlG,KAAKmG,KAAY,IAANvD,EAAU,EAAIA,IAChE,OAAPmQ,EAAe,QAAS6U,KAAIhlB,GAAoC,MAAhCsD,GAAGlG,KAAKmG,KAAY,IAANvD,EAAU,EAAIA,GAAWuD,MACvE,QAAS8J,KAAIrN,EAAG6J,GAAuC,MAAnCvG,GAAGlG,KAAKmG,KAAY,IAANvD,EAAU,EAAIA,EAAG6J,GAAWtG,OAGtE,IAAe,kBAAL8H,KAAqByZ,GAAWpV,EAAM7K,UAAY3G,EAAM,YAChE,GAAImN,IAAImO,UAAUR,UAKb,CACL,GAQIiM,GARAC,EAAuB,GAAI7Z,GAE3B8Z,EAAuBD,EAASX,GAAOO,MAAgB,EAAG,IAAMI,EAEhEE,EAAuBlnB,EAAM,WAAYgnB,EAASnnB,IAAI,KAEtDsnB,EAAuBT,EAAY,SAAS3K,GAAO,GAAI5O,GAAE4O,IAGzDoL,KACFha,EAAI+U,EAAQ,SAAS/X,EAAQwY,GAC3B1D,EAAU9U,EAAQgD,EAAG6F,EACrB,IAAI7N,GAAO,GAAIsO,EAEf,OADGkP,IAAYlkB,GAAUygB,EAAMyD,EAAUnW,EAAQrH,EAAKkhB,GAAQlhB,GACvDA,IAETgI,EAAEpM,UAAYyQ,EACdA,EAAM/M,YAAc0I,GAEtByZ,GAAWI,EAASrgB,QAAQ,SAASyE,EAAKjH,GACxC4iB,EAAa,EAAI5iB,MAAS6S,EAAAA,MAEzBkQ,GAAwBH,KACzBF,EAAU,UACVA,EAAU,OACVra,GAAUqa,EAAU,SAEnBE,GAAcE,IAAeJ,EAAUR,GAEvCO,GAAWpV,EAAMgU,aAAahU,GAAMgU,UAhCvCrY,GAAIwZ,EAAOtG,eAAe6B,EAASlP,EAAMxG,EAAQ6Z,GACjDR,EAAY1Y,EAAEpM,UAAWma,EAyC3B,OAPAtN,GAAeT,EAAG6F,GAElBjR,EAAEiR,GAAQ7F,EACV3N,EAAQA,EAAQsK,EAAItK,EAAQ6K,EAAI7K,EAAQoD,GAAKuK,GAAKsG,GAAO1R,GAErD6kB,GAAQD,EAAOF,UAAUtZ,EAAG6F,EAAMxG,GAE/BW,IAKJ,SAASpO,EAAQD,EAASH,GAG/B,GAAI8mB,GAAS9mB,EAAoB,IAGjCA,GAAoB,KAAK,MAAO,SAASkD,GACvC,MAAO,SAASulB,OAAO,MAAOvlB,GAAIwD,KAAME,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAG9EqoB,IAAK,QAASA,KAAI1kB,GAChB,MAAOqjB,GAAOjV,IAAInL,KAAMjD,EAAkB,IAAVA,EAAc,EAAIA,EAAOA,KAE1DqjB,IAIE,SAAS1mB,EAAQD,EAASH,GAG/B,GAAIY,GAAeZ,EAAoB,GACnCwK,EAAexK,EAAoB,IACnC0oB,EAAe1oB,EAAoB,KACnCwB,EAAexB,EAAoB,IACnCkB,EAAelB,EAAoB,IACnC2oB,EAAeD,EAAKC,YACpBC,EAAeF,EAAKE,KACpB5U,EAAe7R,OAAO6R,cAAgBxS,EACtCqnB,KAGAC,EAAW9oB,EAAoB,KAAK,UAAW,SAASkD,GAC1D,MAAO,SAAS6lB,WAAW,MAAO7lB,GAAIwD,KAAME,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAGlFoD,IAAK,QAASA,KAAIsC,GAChB,GAAGhE,EAASgE,GAAK,CACf,IAAIwO,EAAaxO,GAAK,MAAOmjB,GAAYjiB,MAAMxD,IAAIsC,EACnD,IAAGtE,EAAIsE,EAAKojB,GAAM,MAAOpjB,GAAIojB,GAAMliB,KAAK4U,MAI5C9K,IAAK,QAASA,KAAIhL,EAAK/B,GACrB,MAAOilB,GAAK7W,IAAInL,KAAMlB,EAAK/B,KAE5BilB,GAAM,GAAM,EAGsD,KAAlE,GAAII,IAAWtY,KAAKrO,OAAOkR,QAAUlR,QAAQ0mB,GAAM,GAAG3lB,IAAI2lB,IAC3DjoB,EAAEqH,KAAK1H,MAAM,SAAU,MAAO,MAAO,OAAQ,SAASiF,GACpD,GAAIqN,GAASiW,EAAS1mB,UAClB4mB,EAASnW,EAAMrN,EACnBgF,GAASqI,EAAOrN,EAAK,SAASrC,EAAG6J,GAE/B,GAAGxL,EAAS2B,KAAO6Q,EAAa7Q,GAAG,CACjC,GAAIsC,GAASkjB,EAAYjiB,MAAMlB,GAAKrC,EAAG6J,EACvC,OAAc,OAAPxH,EAAekB,KAAOjB,EAE7B,MAAOujB,GAAOzoB,KAAKmG,KAAMvD,EAAG6J,QAO/B,SAAS5M,EAAQD,EAASH,GAG/B,GAAIuK,GAAoBvK,EAAoB,GACxCknB,EAAoBlnB,EAAoB,KACxCsB,EAAoBtB,EAAoB,IACxCwB,EAAoBxB,EAAoB,IACxCsgB,EAAoBtgB,EAAoB,KACxCugB,EAAoBvgB,EAAoB,KACxCgC,EAAoBhC,EAAoB,IACxCqnB,EAAoBrnB,EAAoB,IACxC4oB,EAAoB5oB,EAAoB,IAAI,QAC5CgU,EAAoB7R,OAAO6R,cAAgBxS,EAC3CynB,EAAoBjnB,EAAkB,GACtCknB,EAAoBlnB,EAAkB,GACtC3B,EAAoB,EAGpBsoB,EAAc,SAASniB,GACzB,MAAOA,GAAKmhB,KAAOnhB,EAAKmhB,GAAK,GAAIwB,KAE/BA,EAAc,WAChBziB,KAAKvD,MAEHimB,EAAa,SAAS1a,EAAOlJ,GAC/B,MAAOyjB,GAAUva,EAAMvL,EAAG,SAASqJ,GACjC,MAAOA,GAAG,KAAOhH,IAGrB2jB,GAAY/mB,WACVc,IAAK,SAASsC,GACZ,GAAIwhB,GAAQoC,EAAW1iB,KAAMlB,EAC7B,OAAGwhB,GAAaA,EAAM,GAAtB,QAEF9lB,IAAK,SAASsE,GACZ,QAAS4jB,EAAW1iB,KAAMlB,IAE5BgL,IAAK,SAAShL,EAAK/B,GACjB,GAAIujB,GAAQoC,EAAW1iB,KAAMlB,EAC1BwhB,GAAMA,EAAM,GAAKvjB,EACfiD,KAAKvD,EAAEuC,MAAMF,EAAK/B,KAEzBmkB,SAAU,SAASpiB,GACjB,GAAIoC,GAAQshB,EAAexiB,KAAKvD,EAAG,SAASqJ,GAC1C,MAAOA,GAAG,KAAOhH,GAGnB,QADIoC,GAAMlB,KAAKvD,EAAEkmB,OAAOzhB,EAAO,MACrBA,IAIdxH,EAAOD,SACLuhB,eAAgB,SAAS6B,EAASlP,EAAMxG,EAAQ6Z,GAC9C,GAAIlZ,GAAI+U,EAAQ,SAAS/c,EAAMwd,GAC7B1D,EAAU9Z,EAAMgI,EAAG6F,GACnB7N,EAAK8U,GAAKjb,IACVmG,EAAKmhB,GAAK7nB,EACPkkB,GAAYlkB,GAAUygB,EAAMyD,EAAUnW,EAAQrH,EAAKkhB,GAAQlhB,IAkBhE,OAhBA0gB,GAAY1Y,EAAEpM,WAGZwlB,SAAU,SAASpiB,GACjB,MAAIhE,GAASgE,GACTwO,EAAaxO,GACV6hB,EAAK7hB,EAAKojB,IAASvB,EAAK7hB,EAAIojB,GAAOliB,KAAK4U,WAAc9V,GAAIojB,GAAMliB,KAAK4U,IAD/CqN,EAAYjiB,MAAM,UAAUlB,IADhC,GAM3BtE,IAAK,QAASA,KAAIsE,GAChB,MAAIhE,GAASgE,GACTwO,EAAaxO,GACV6hB,EAAK7hB,EAAKojB,IAASvB,EAAK7hB,EAAIojB,GAAOliB,KAAK4U,IADlBqN,EAAYjiB,MAAMxF,IAAIsE,IAD1B,KAKtBgJ,GAETqD,IAAK,SAASrL,EAAMhB,EAAK/B,GAMrB,MALEuQ,GAAa1S,EAASkE,KAGxB6hB,EAAK7hB,EAAKojB,IAASre,EAAK/E,EAAKojB,MAC7BpjB,EAAIojB,GAAMpiB,EAAK8U,IAAM7X,GAHrBklB,EAAYniB,GAAMgK,IAAIhL,EAAK/B,GAIpB+C,GAEXmiB,YAAaA,EACbC,KAAMA,IAKH,SAASxoB,EAAQD,EAASH,GAG/B,GAAI0oB,GAAO1oB,EAAoB,IAG/BA,GAAoB,KAAK,UAAW,SAASkD,GAC3C,MAAO,SAASomB,WAAW,MAAOpmB,GAAIwD,KAAME,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAGlFqoB,IAAK,QAASA,KAAI1kB,GAChB,MAAOilB,GAAK7W,IAAInL,KAAMjD,GAAO,KAE9BilB,GAAM,GAAO,IAIX,SAAStoB,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,GAC/BupB,EAAWjjB,SAAS2G,MACpB3L,EAAWtB,EAAoB,GAEnCa,GAAQA,EAAQmD,EAAG,WACjBiJ,MAAO,QAASA,OAAMzB,EAAQge,EAAcC,GAC1C,MAAOF,GAAOhpB,KAAKiL,EAAQge,EAAcloB,EAASmoB,QAMjD,SAASrpB,EAAQD,EAASH,GAG/B,GAAIY,GAAYZ,EAAoB,GAChCa,EAAYb,EAAoB,GAChCuB,EAAYvB,EAAoB,IAChCsB,EAAYtB,EAAoB,IAChCwB,EAAYxB,EAAoB,IAChCuG,EAAYD,SAASC,MAAQvG,EAAoB,GAAGsG,SAASlE,UAAUmE,IAI3E1F,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAIjE,EAAoB,GAAG,WACrD,QAASiE,MACT,QAASylB,QAAQxjB,UAAU,gBAAkBjC,YAAcA,MACzD,WACFiC,UAAW,QAASA,WAAUyjB,EAAQvjB,GACpC7E,EAAUooB,GACVroB,EAAS8E,EACT,IAAIwjB,GAAYhjB,UAAU9C,OAAS,EAAI6lB,EAASpoB,EAAUqF,UAAU,GACpE,IAAG+iB,GAAUC,EAAU,CAErB,OAAOxjB,EAAKtC,QACV,IAAK,GAAG,MAAO,IAAI6lB,EACnB,KAAK,GAAG,MAAO,IAAIA,GAAOvjB,EAAK,GAC/B,KAAK,GAAG,MAAO,IAAIujB,GAAOvjB,EAAK,GAAIA,EAAK,GACxC,KAAK,GAAG,MAAO,IAAIujB,GAAOvjB,EAAK,GAAIA,EAAK,GAAIA,EAAK,GACjD,KAAK,GAAG,MAAO,IAAIujB,GAAOvjB,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAG5D,GAAIyjB,IAAS,KAEb,OADAA,GAAMnkB,KAAKuH,MAAM4c,EAAOzjB,GACjB,IAAKG,EAAK0G,MAAM0c,EAAQE,IAGjC,GAAIhX,GAAW+W,EAAUxnB,UACrBimB,EAAWznB,EAAEqF,OAAOzE,EAASqR,GAASA,EAAQ1Q,OAAOC,WACrDqD,EAAWa,SAAS2G,MAAM1M,KAAKopB,EAAQtB,EAAUjiB,EACrD,OAAO5E,GAASiE,GAAUA,EAAS4iB,MAMlC,SAASjoB,EAAQD,EAASH,GAG/B,GAAIY,GAAWZ,EAAoB,GAC/Ba,EAAWb,EAAoB,GAC/BsB,EAAWtB,EAAoB,GAGnCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAIjE,EAAoB,GAAG,WACrD0pB,QAAQ/mB,eAAe/B,EAAEgC,WAAY,GAAIa,MAAO,IAAK,GAAIA,MAAO,MAC9D,WACFd,eAAgB,QAASA,gBAAe6I,EAAQse,EAAaC,GAC3DzoB,EAASkK,EACT,KAEE,MADA5K,GAAEgC,QAAQ4I,EAAQse,EAAaC,IACxB,EACP,MAAMxmB,GACN,OAAO,OAOR,SAASnD,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,GAC/B8C,EAAW9C,EAAoB,GAAG8C,QAClCxB,EAAWtB,EAAoB,GAEnCa,GAAQA,EAAQmD,EAAG,WACjBgmB,eAAgB,QAASA,gBAAexe,EAAQse,GAC9C,GAAIG,GAAOnnB,EAAQxB,EAASkK,GAASse,EACrC,OAAOG,KAASA,EAAKje,cAAe,QAAeR,GAAOse,OAMzD,SAAS1pB,EAAQD,EAASH,GAI/B,GAAIa,GAAWb,EAAoB,GAC/BsB,EAAWtB,EAAoB,IAC/BkqB,EAAY,SAAS9O,GACvB1U,KAAK2U,GAAK/Z,EAAS8Z,GACnB1U,KAAK4U,GAAK,CACV,IACI9V,GADA5B,EAAO8C,KAAK6J,KAEhB,KAAI/K,IAAO4V,GAASxX,EAAK8B,KAAKF,GAEhCxF,GAAoB,KAAKkqB,EAAW,SAAU,WAC5C,GAEI1kB,GAFAgB,EAAOE,KACP9C,EAAO4C,EAAK+J,EAEhB,GACE,IAAG/J,EAAK8U,IAAM1X,EAAKE,OAAO,OAAQL,MAAO3D,EAAW0b,MAAM,YACjDhW,EAAM5B,EAAK4C,EAAK8U,QAAU9U,GAAK6U,IAC1C,QAAQ5X,MAAO+B,EAAKgW,MAAM,KAG5B3a,EAAQA,EAAQmD,EAAG,WACjBmmB,UAAW,QAASA,WAAU3e,GAC5B,MAAO,IAAI0e,GAAU1e,OAMpB,SAASpL,EAAQD,EAASH,GAS/B,QAASkD,KAAIsI,EAAQse,GACnB,GACIG,GAAMpX,EADNuX,EAAWxjB,UAAU9C,OAAS,EAAI0H,EAAS5E,UAAU,EAEzD,OAAGtF,GAASkK,KAAY4e,EAAgB5e,EAAOse,IAC5CG,EAAOrpB,EAAEkC,QAAQ0I,EAAQse,IAAoB5oB,EAAI+oB,EAAM,SACtDA,EAAKxmB,MACLwmB,EAAK/mB,MAAQpD,EACXmqB,EAAK/mB,IAAI3C,KAAK6pB,GACdtqB,EACH0B,EAASqR,EAAQjS,EAAEiF,SAAS2F,IAAgBtI,IAAI2P,EAAOiX,EAAaM,GAAvE,OAfF,GAAIxpB,GAAWZ,EAAoB,GAC/BkB,EAAWlB,EAAoB,IAC/Ba,EAAWb,EAAoB,GAC/BwB,EAAWxB,EAAoB,IAC/BsB,EAAWtB,EAAoB,GAcnCa,GAAQA,EAAQmD,EAAG,WAAYd,IAAKA,OAI/B,SAAS9C,EAAQD,EAASH,GAG/B,GAAIY,GAAWZ,EAAoB,GAC/Ba,EAAWb,EAAoB,GAC/BsB,EAAWtB,EAAoB,GAEnCa,GAAQA,EAAQmD,EAAG,WACjBE,yBAA0B,QAASA,0BAAyBsH,EAAQse,GAClE,MAAOlpB,GAAEkC,QAAQxB,EAASkK,GAASse,OAMlC,SAAS1pB,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,GAC/B6F,EAAW7F,EAAoB,GAAG6F,SAClCvE,EAAWtB,EAAoB,GAEnCa,GAAQA,EAAQmD,EAAG,WACjB4B,eAAgB,QAASA,gBAAe4F,GACtC,MAAO3F,GAASvE,EAASkK,QAMxB,SAASpL,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,WACjB9C,IAAK,QAASA,KAAIsK,EAAQse,GACxB,MAAOA,KAAete,OAMrB,SAASpL,EAAQD,EAASH,GAG/B,GAAIa,GAAgBb,EAAoB,GACpCsB,EAAgBtB,EAAoB,IACpC+T,EAAgB5R,OAAO6R,YAE3BnT,GAAQA,EAAQmD,EAAG,WACjBgQ,aAAc,QAASA,cAAaxI,GAElC,MADAlK,GAASkK,GACFuI,EAAgBA,EAAcvI,IAAU,MAM9C,SAASpL,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAG,WAAYqmB,QAASrqB,EAAoB,QAIvD,SAASI,EAAQD,EAASH,GAG/B,GAAIY,GAAWZ,EAAoB,GAC/BsB,EAAWtB,EAAoB,IAC/B0pB,EAAW1pB,EAAoB,GAAG0pB,OACtCtpB,GAAOD,QAAUupB,GAAWA,EAAQW,SAAW,QAASA,SAAQ7d,GAC9D,GAAI5I,GAAahD,EAAEoF,SAAS1E,EAASkL,IACjCrC,EAAavJ,EAAEuJ,UACnB,OAAOA,GAAavG,EAAKU,OAAO6F,EAAWqC,IAAO5I,IAK/C,SAASxD,EAAQD,EAASH,GAG/B,GAAIa,GAAqBb,EAAoB,GACzCsB,EAAqBtB,EAAoB,IACzCyT,EAAqBtR,OAAOuR,iBAEhC7S,GAAQA,EAAQmD,EAAG,WACjB0P,kBAAmB,QAASA,mBAAkBlI,GAC5ClK,EAASkK,EACT,KAEE,MADGiI,IAAmBA,EAAmBjI,IAClC,EACP,MAAMjI,GACN,OAAO,OAOR,SAASnD,EAAQD,EAASH,GAU/B,QAASwQ,KAAIhF,EAAQse,EAAaQ,GAChC,GAEIC,GAAoB1X,EAFpBuX,EAAWxjB,UAAU9C,OAAS,EAAI0H,EAAS5E,UAAU,GACrD4jB,EAAW5pB,EAAEkC,QAAQxB,EAASkK,GAASse,EAE3C,KAAIU,EAAQ,CACV,GAAGhpB,EAASqR,EAAQjS,EAAEiF,SAAS2F,IAC7B,MAAOgF,KAAIqC,EAAOiX,EAAaQ,EAAGF,EAEpCI,GAAUzpB,EAAW,GAEvB,MAAGG,GAAIspB,EAAS,SACXA,EAAQve,YAAa,GAAUzK,EAAS4oB,IAC3CG,EAAqB3pB,EAAEkC,QAAQsnB,EAAUN,IAAgB/oB,EAAW,GACpEwpB,EAAmB9mB,MAAQ6mB,EAC3B1pB,EAAEgC,QAAQwnB,EAAUN,EAAaS,IAC1B,IAJqD,EAMvDC,EAAQha,MAAQ1Q,GAAY,GAAS0qB,EAAQha,IAAIjQ,KAAK6pB,EAAUE,IAAI,GAxB7E,GAAI1pB,GAAaZ,EAAoB,GACjCkB,EAAalB,EAAoB,IACjCa,EAAab,EAAoB,GACjCe,EAAaf,EAAoB,GACjCsB,EAAatB,EAAoB,IACjCwB,EAAaxB,EAAoB,GAsBrCa,GAAQA,EAAQmD,EAAG,WAAYwM,IAAKA,OAI/B,SAASpQ,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,GAC/BwgB,EAAWxgB,EAAoB,GAEhCwgB,IAAS3f,EAAQA,EAAQmD,EAAG,WAC7B2O,eAAgB,QAASA,gBAAenH,EAAQqH,GAC9C2N,EAAS5N,MAAMpH,EAAQqH,EACvB,KAEE,MADA2N,GAAShQ,IAAIhF,EAAQqH,IACd,EACP,MAAMtP,GACN,OAAO,OAOR,SAASnD,EAAQD,EAASH,GAG/B,GAAIa,GAAYb,EAAoB,GAChCyqB,EAAYzqB,EAAoB,KAAI,EAExCa,GAAQA,EAAQwC,EAAG,SAEjBwX,SAAU,QAASA,UAASnS,GAC1B,MAAO+hB,GAAU/jB,KAAMgC,EAAI9B,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,MAIrEE,EAAoB,KAAK,aAIpB,SAASI,EAAQD,EAASH,GAI/B,GAAIa,GAAUb,EAAoB,GAC9B+Z,EAAU/Z,EAAoB,KAAI,EAEtCa,GAAQA,EAAQwC,EAAG,UACjBqnB,GAAI,QAASA,IAAGzQ,GACd,MAAOF,GAAIrT,KAAMuT,OAMhB,SAAS7Z,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B2qB,EAAU3qB,EAAoB,IAElCa,GAAQA,EAAQwC,EAAG,UACjBunB,QAAS,QAASA,SAAQC,GACxB,MAAOF,GAAKjkB,KAAMmkB,EAAWjkB,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,GAAW,OAM7E,SAASM,EAAQD,EAASH,GAG/B,GAAI6B,GAAW7B,EAAoB,IAC/B8a,EAAW9a,EAAoB,KAC/BsN,EAAWtN,EAAoB,GAEnCI,GAAOD,QAAU,SAASqG,EAAMqkB,EAAWC,EAAYC,GACrD,GAAI/mB,GAAe4I,OAAOU,EAAQ9G,IAC9BwkB,EAAehnB,EAAEF,OACjBmnB,EAAeH,IAAehrB,EAAY,IAAM8M,OAAOke,GACvDI,EAAerpB,EAASgpB,EAC5B,IAAmBG,GAAhBE,EAA6B,MAAOlnB,EACzB,KAAXinB,IAAcA,EAAU,IAC3B,IAAIE,GAAUD,EAAeF,EACzBI,EAAetQ,EAAOva,KAAK0qB,EAASriB,KAAK2E,KAAK4d,EAAUF,EAAQnnB,QAEpE,OADGsnB,GAAatnB,OAASqnB,IAAQC,EAAeA,EAAa5oB,MAAM,EAAG2oB,IAC/DJ,EAAOK,EAAepnB,EAAIA,EAAIonB,IAKlC,SAAShrB,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B2qB,EAAU3qB,EAAoB,IAElCa,GAAQA,EAAQwC,EAAG,UACjBgoB,SAAU,QAASA,UAASR,GAC1B,MAAOF,GAAKjkB,KAAMmkB,EAAWjkB,UAAU9C,OAAS,EAAI8C,UAAU,GAAK9G,GAAW,OAM7E,SAASM,EAAQD,EAASH,GAI/BA,EAAoB,IAAI,WAAY,SAAS0U,GAC3C,MAAO,SAAS4W,YACd,MAAO5W,GAAMhO,KAAM,OAMlB,SAAStG,EAAQD,EAASH,GAI/BA,EAAoB,IAAI,YAAa,SAAS0U,GAC5C,MAAO,SAAS6W,aACd,MAAO7W,GAAMhO,KAAM,OAMlB,SAAStG,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BwrB,EAAUxrB,EAAoB,KAAK,sBAAuB,OAE9Da,GAAQA,EAAQmD,EAAG,UAAWynB,OAAQ,QAASA,QAAOjf,GAAK,MAAOgf,GAAIhf,OAKjE,SAASpM,EAAQD,GAEtBC,EAAOD,QAAU,SAASurB,EAAQrV,GAChC,GAAIjF,GAAWiF,IAAYlU,OAAOkU,GAAW,SAASsV,GACpD,MAAOtV,GAAQsV,IACbtV,CACJ,OAAO,UAAS7J,GACd,MAAOI,QAAOJ,GAAI6J,QAAQqV,EAAQta,MAMjC,SAAShR,EAAQD,EAASH,GAG/B,GAAIY,GAAaZ,EAAoB,GACjCa,EAAab,EAAoB,GACjCqqB,EAAarqB,EAAoB,KACjC0B,EAAa1B,EAAoB,IACjCe,EAAaf,EAAoB,EAErCa,GAAQA,EAAQmD,EAAG,UACjB4nB,0BAA2B,QAASA,2BAA0BrmB,GAQ5D,IAPA,GAMIC,GAAK0K,EANL9M,EAAU1B,EAAU6D,GACpB3C,EAAUhC,EAAEgC,QACZE,EAAUlC,EAAEkC,QACZc,EAAUymB,EAAQjnB,GAClBqC,KACA1B,EAAU,EAERH,EAAKE,OAASC,GAClBmM,EAAIpN,EAAQM,EAAGoC,EAAM5B,EAAKG,MACvByB,IAAOC,GAAO7C,EAAQ6C,EAAQD,EAAKzE,EAAW,EAAGmP,IAC/CzK,EAAOD,GAAO0K,CACnB,OAAOzK,OAMR,SAASrF,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9B6rB,EAAU7rB,EAAoB,MAAK,EAEvCa,GAAQA,EAAQmD,EAAG,UACjB0Y,OAAQ,QAASA,QAAOlQ,GACtB,MAAOqf,GAAQrf,OAMd,SAASpM,EAAQD,EAASH,GAE/B,GAAIY,GAAYZ,EAAoB,GAChC0B,EAAY1B,EAAoB,IAChCkK,EAAYtJ,EAAEsJ,MAClB9J,GAAOD,QAAU,SAAS2rB,GACxB,MAAO,UAAStf,GAOd,IANA,GAKIhH,GALApC,EAAS1B,EAAU8K,GACnB5I,EAAShD,EAAEiD,QAAQT,GACnBU,EAASF,EAAKE,OACdC,EAAS,EACT0B,KAEE3B,EAASC,GAAKmG,EAAO3J,KAAK6C,EAAGoC,EAAM5B,EAAKG,OAC5C0B,EAAOC,KAAKomB,GAAatmB,EAAKpC,EAAEoC,IAAQpC,EAAEoC,GAC1C,OAAOC,MAMR,SAASrF,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,GAC/B+rB,EAAW/rB,EAAoB,MAAK,EAExCa,GAAQA,EAAQmD,EAAG,UACjB2Y,QAAS,QAASA,SAAQnQ,GACxB,MAAOuf,GAASvf,OAMf,SAASpM,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,EAEnCa,GAAQA,EAAQwC,EAAG,OAAQ2oB,OAAQhsB,EAAoB,KAAK,UAIvD,SAASI,EAAQD,EAASH,GAG/B,GAAIugB,GAAUvgB,EAAoB,KAC9BiT,EAAUjT,EAAoB,GAClCI,GAAOD,QAAU,SAASkU,GACxB,MAAO,SAAS2X,UACd,GAAG/Y,EAAQvM,OAAS2N,EAAK,KAAM7Q,WAAU6Q,EAAO,wBAChD,IAAI4J,KAEJ,OADAsC,GAAM7Z,MAAM,EAAOuX,EAAIvY,KAAMuY,GACtBA,KAMN,SAAS7d,EAAQD,EAASH,GAG/B,GAAIa,GAAWb,EAAoB,EAEnCa,GAAQA,EAAQwC,EAAG,OAAQ2oB,OAAQhsB,EAAoB,KAAK,UAIvD,SAASI,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,GAC9BisB,EAAUjsB,EAAoB,IAClCa,GAAQA,EAAQsK,EAAItK,EAAQ0K,GAC1Bsa,aAAgBoG,EAAMzb,IACtBuV,eAAgBkG,EAAMpF,SAKnB,SAASzmB,EAAQD,EAASH,GAE/BA,EAAoB,IACpB,IAAIqK,GAAcrK,EAAoB,GAClCuK,EAAcvK,EAAoB,GAClC0b,EAAc1b,EAAoB,KAClC4b,EAAc5b,EAAoB,IAAI,YACtCksB,EAAc7hB,EAAO8hB,SACrBC,EAAc/hB,EAAOgiB,eACrBC,EAAcJ,GAAMA,EAAG9pB,UACvBmqB,EAAcH,GAAOA,EAAIhqB,UACzBoqB,EAAc9Q,EAAUyQ,SAAWzQ,EAAU2Q,eAAiB3Q,EAAUpZ,KACzEgqB,KAAYA,EAAQ1Q,IAAUrR,EAAK+hB,EAAS1Q,EAAU4Q,GACtDD,IAAaA,EAAS3Q,IAAUrR,EAAKgiB,EAAU3Q,EAAU4Q,IAIvD,SAASpsB,EAAQD,EAASH,GAG/B,GAAIqK,GAAarK,EAAoB,GACjCa,EAAab,EAAoB,GACjCoB,EAAapB,EAAoB,IACjCysB,EAAazsB,EAAoB,KACjC0sB,EAAariB,EAAOqiB,UACpBC,IAAeD,GAAa,WAAW5Z,KAAK4Z,EAAUE,WACtDxc,EAAO,SAASI,GAClB,MAAOmc,GAAO,SAASlmB,EAAIomB,GACzB,MAAOrc,GAAIpP,EACTqrB,KACGjqB,MAAMjC,KAAKqG,UAAW,GACZ,kBAANH,GAAmBA,EAAKH,SAASG,IACvComB,IACDrc,EAEN3P,GAAQA,EAAQsK,EAAItK,EAAQ0K,EAAI1K,EAAQoD,EAAI0oB,GAC1C9J,WAAazS,EAAK/F,EAAOwY,YACzBiK,YAAa1c,EAAK/F,EAAOyiB,gBAKtB,SAAS1sB,EAAQD,EAASH,GAG/B,GAAI+sB,GAAY/sB,EAAoB,KAChCoB,EAAYpB,EAAoB,IAChCuB,EAAYvB,EAAoB,GACpCI,GAAOD,QAAU,WAOf,IANA,GAAIsG,GAASlF,EAAUmF,MACnB5C,EAAS8C,UAAU9C,OACnBkpB,EAAS1qB,MAAMwB,GACfC,EAAS,EACTkpB,EAASF,EAAKE,EACdC,GAAS,EACPppB,EAASC,IAAMipB,EAAMjpB,GAAK6C,UAAU7C,QAAUkpB,IAAEC,GAAS,EAC/D,OAAO,YACL,GAGkB9mB,GAHdI,EAAQE,KACR4K,EAAQ1K,UACR4L,EAAQlB,EAAGxN,OACX2O,EAAI,EAAGH,EAAI,CACf,KAAI4a,IAAW1a,EAAM,MAAOpR,GAAOqF,EAAIumB,EAAOxmB,EAE9C,IADAJ,EAAO4mB,EAAMxqB,QACV0qB,EAAO,KAAKppB,EAAS2O,EAAGA,IAAOrM,EAAKqM,KAAOwa,IAAE7mB,EAAKqM,GAAKnB,EAAGgB,KAC7D,MAAME,EAAQF,GAAElM,EAAKV,KAAK4L,EAAGgB,KAC7B,OAAOlR,GAAOqF,EAAIL,EAAMI,MAMvB,SAASpG,EAAQD,EAASH,GAE/BI,EAAOD,QAAUH,EAAoB,IAIhC,SAASI,EAAQD,EAASH,GAoF/B,QAASmtB,MAAKnJ,GACZ,GAAIoJ,GAAOxsB,EAAEqF,OAAO,KAQpB,OAPG+d,IAAYlkB,IACVutB,EAAWrJ,GACZzD,EAAMyD,GAAU,EAAM,SAASxe,EAAK/B,GAClC2pB,EAAK5nB,GAAO/B,IAET0O,EAAOib,EAAMpJ,IAEfoJ,EAIT,QAAS9kB,QAAO/C,EAAQkY,EAAO6P,GAC7B/rB,EAAUkc,EACV,IAII9V,GAAMnC,EAJNpC,EAAS1B,EAAU6D,GACnB3B,EAASC,EAAQT,GACjBU,EAASF,EAAKE,OACdC,EAAS,CAEb,IAAG6C,UAAU9C,OAAS,EAAE,CACtB,IAAIA,EAAO,KAAMN,WAAU,+CAC3BmE,GAAOvE,EAAEQ,EAAKG,UACT4D,GAAOxF,OAAOmrB,EACrB,MAAMxpB,EAASC,GAAK7C,EAAIkC,EAAGoC,EAAM5B,EAAKG,QACpC4D,EAAO8V,EAAM9V,EAAMvE,EAAEoC,GAAMA,EAAKD,GAElC,OAAOoC,GAGT,QAASkT,UAAStV,EAAQmD,GACxB,OAAQA,GAAMA,EAAKyG,EAAM5J,EAAQmD,GAAM6kB,EAAQhoB,EAAQ,SAASiH,GAC9D,MAAOA,IAAMA,OACP1M,EAGV,QAASoD,KAAIqC,EAAQC,GACnB,MAAGtE,GAAIqE,EAAQC,GAAYD,EAAOC,GAAlC,OAEF,QAASgL,KAAIjL,EAAQC,EAAK/B,GAGxB,MAFG3C,IAAe0E,IAAOrD,QAAOvB,EAAEgC,QAAQ2C,EAAQC,EAAKzE,EAAW,EAAG0C,IAChE8B,EAAOC,GAAO/B,EACZ8B,EAGT,QAASioB,QAAOhhB,GACd,MAAOhL,GAASgL,IAAO5L,EAAEiF,SAAS2G,KAAQ2gB,KAAK/qB,UA/HjD,GAAIxB,GAAcZ,EAAoB,GAClCyK,EAAczK,EAAoB,IAClCa,EAAcb,EAAoB,GAClCe,EAAcf,EAAoB,GAClCmS,EAAcnS,EAAoB,IAClCmP,EAAcnP,EAAoB,IAClCuB,EAAcvB,EAAoB,IAClCugB,EAAcvgB,EAAoB,KAClCqtB,EAAcrtB,EAAoB,KAClC2b,EAAc3b,EAAoB,KAClCud,EAAcvd,EAAoB,KAClCwB,EAAcxB,EAAoB,IAClC0B,EAAc1B,EAAoB,IAClCc,EAAcd,EAAoB,GAClCkB,EAAclB,EAAoB,IAClC6D,EAAcjD,EAAEiD,QAUhB4pB,EAAmB,SAAS7f,GAC9B,GAAIC,GAAmB,GAARD,EACXI,EAAmB,GAARJ,CACf,OAAO,UAASrI,EAAQmC,EAAYlB,GAClC,GAIIhB,GAAKiH,EAAK2B,EAJVC,EAAS5D,EAAI/C,EAAYlB,EAAM,GAC/BpD,EAAS1B,EAAU6D,GACnBE,EAASoI,GAAkB,GAARD,GAAqB,GAARA,EAC5B,IAAoB,kBAARlH,MAAqBA,KAAOymB,MAAQrtB,CAExD,KAAI0F,IAAOpC,GAAE,GAAGlC,EAAIkC,EAAGoC,KACrBiH,EAAMrJ,EAAEoC,GACR4I,EAAMC,EAAE5B,EAAKjH,EAAKD,GACfqI,GACD,GAAGC,EAAOpI,EAAOD,GAAO4I,MACnB,IAAGA,EAAI,OAAOR,GACjB,IAAK,GAAGnI,EAAOD,GAAOiH,CAAK,MAC3B,KAAK,GAAG,OAAO,CACf,KAAK,GAAG,MAAOA,EACf,KAAK,GAAG,MAAOjH,EACf,KAAK,GAAGC,EAAO2I,EAAI,IAAMA,EAAI,OACxB,IAAGJ,EAAS,OAAO,CAG9B,OAAe,IAARJ,GAAaI,EAAWA,EAAWvI,IAG1C8nB,EAAUE,EAAiB,GAE3BC,EAAiB,SAASjR,GAC5B,MAAO,UAASjQ,GACd,MAAO,IAAImhB,GAAanhB,EAAIiQ,KAG5BkR,EAAe,SAASvS,EAAUqB,GACpC/V,KAAK2U,GAAK3Z,EAAU0Z,GACpB1U,KAAKknB,GAAK/pB,EAAQuX,GAClB1U,KAAK4U,GAAK,EACV5U,KAAK6J,GAAKkM,EAEZd,GAAYgS,EAAc,OAAQ,WAChC,GAIInoB,GAJAgB,EAAOE,KACPtD,EAAOoD,EAAK6U,GACZzX,EAAO4C,EAAKonB,GACZnR,EAAOjW,EAAK+J,EAEhB,GACE,IAAG/J,EAAK8U,IAAM1X,EAAKE,OAEjB,MADA0C,GAAK6U,GAAKvb,EACHyd,EAAK,UAEPrc,EAAIkC,EAAGoC,EAAM5B,EAAK4C,EAAK8U,OAChC,OAAW,QAARmB,EAAwBc,EAAK,EAAG/X,GACxB,UAARiX,EAAwBc,EAAK,EAAGna,EAAEoC,IAC9B+X,EAAK,GAAI/X,EAAKpC,EAAEoC,OAczB2nB,KAAK/qB,UAAY,KAsCjBvB,EAAQA,EAAQsK,EAAItK,EAAQoD,GAAIkpB,KAAMA,OAEtCtsB,EAAQA,EAAQmD,EAAG,QACjBJ,KAAU8pB,EAAe,QACzBhR,OAAUgR,EAAe,UACzB/Q,QAAU+Q,EAAe,WACzB1lB,QAAUylB,EAAiB,GAC3BvlB,IAAUulB,EAAiB,GAC3BtlB,OAAUslB,EAAiB,GAC3BrlB,KAAUqlB,EAAiB,GAC3BplB,MAAUolB,EAAiB,GAC3B5O,KAAU4O,EAAiB,GAC3BF,QAAUA,EACVM,SAAUJ,EAAiB,GAC3BnlB,OAAUA,OACV6G,MAAUA,EACV0L,SAAUA,SACV3Z,IAAUA,EACVgC,IAAUA,IACVsN,IAAUA,IACVgd,OAAUA,UAKP,SAASptB,EAAQD,EAASH,GAE/B,GAAIiT,GAAYjT,EAAoB,IAChC4b,EAAY5b,EAAoB,IAAI,YACpC0b,EAAY1b,EAAoB,IACpCI,GAAOD,QAAUH,EAAoB,GAAGqtB,WAAa,SAAS7gB,GAC5D,GAAIpJ,GAAIjB,OAAOqK,EACf,OAAOpJ,GAAEwY,KAAc9b,GAClB,cAAgBsD,IAChBsY,EAAU/O,eAAesG,EAAQ7P,MAKnC,SAAShD,EAAQD,EAASH,GAE/B,GAAIsB,GAAWtB,EAAoB,IAC/BkD,EAAWlD,EAAoB,IACnCI,GAAOD,QAAUH,EAAoB,GAAG8tB,YAAc,SAASthB,GAC7D,GAAImR,GAASza,EAAIsJ,EACjB,IAAoB,kBAAVmR,GAAqB,KAAMna,WAAUgJ,EAAK,oBACpD,OAAOlL,GAASqc,EAAOpd,KAAKiM,MAKzB,SAASpM,EAAQD,EAASH,GAE/B,GAAIqK,GAAUrK,EAAoB,GAC9BsK,EAAUtK,EAAoB,GAC9Ba,EAAUb,EAAoB,GAC9BysB,EAAUzsB,EAAoB,IAElCa,GAAQA,EAAQsK,EAAItK,EAAQoD,GAC1B8pB,MAAO,QAASA,OAAMlB,GACpB,MAAO,KAAKviB,EAAKkZ,SAAWnZ,EAAOmZ,SAAS,SAASrC,GACnD0B,WAAW4J,EAAQlsB,KAAK4gB,GAAS,GAAO0L,SAOzC,SAASzsB,EAAQD,EAASH,GAE/B,GAAI+sB,GAAU/sB,EAAoB,KAC9Ba,EAAUb,EAAoB,EAGlCA,GAAoB,GAAGitB,EAAIF,EAAKE,EAAIF,EAAKE,MAEzCpsB,EAAQA,EAAQwC,EAAIxC,EAAQoD,EAAG,YAAa0nB,KAAM3rB,EAAoB,QAIjE,SAASI,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAG,UAAWzC,SAAUxB,EAAoB,OAInE,SAASI,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,EAElCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAG,UAAWgP,QAASjT,EAAoB,OAIlE,SAASI,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,GAC9BguB,EAAUhuB,EAAoB,IAElCa,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAG,UAAW+pB,OAAQA,KAI7C,SAAS5tB,EAAQD,EAASH,GAE/B,GAAIY,GAAYZ,EAAoB,GAChCqqB,EAAYrqB,EAAoB,KAChC0B,EAAY1B,EAAoB,GAEpCI,GAAOD,QAAU,QAAS6tB,QAAOxiB,EAAQyiB,GAIvC,IAHA,GAEWzoB,GAFP5B,EAASymB,EAAQ3oB,EAAUusB,IAC3BnqB,EAASF,EAAKE,OACdC,EAAI,EACFD,EAASC,GAAEnD,EAAEgC,QAAQ4I,EAAQhG,EAAM5B,EAAKG,KAAMnD,EAAEkC,QAAQmrB,EAAOzoB,GACrE,OAAOgG,KAKJ,SAASpL,EAAQD,EAASH,GAE/B,GAAIa,GAAUb,EAAoB,GAC9BguB,EAAUhuB,EAAoB,KAC9BiG,EAAUjG,EAAoB,GAAGiG,MAErCpF,GAAQA,EAAQmD,EAAInD,EAAQoD,EAAG,UAC7BiqB,KAAM,SAASrb,EAAOob,GACpB,MAAOD,GAAO/nB,EAAO4M,GAAQob,OAM5B,SAAS7tB,EAAQD,EAASH,GAG/BA,EAAoB,KAAK2V,OAAQ,SAAU,SAASyF,GAClD1U,KAAKihB,IAAMvM,EACX1U,KAAK4U,GAAK,GACT,WACD,GAAIvX,GAAO2C,KAAK4U,KACZE,IAAa9U,KAAKihB,GAAT5jB,EACb,QAAQyX,KAAMA,EAAM/X,MAAO+X,EAAO1b,EAAYiE,MAK3C,SAAS3D,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BwrB,EAAMxrB,EAAoB,KAAK,YACjCmuB,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,UAGP1tB,GAAQA,EAAQwC,EAAIxC,EAAQoD,EAAG,UAAWuqB,WAAY,QAASA,cAAc,MAAOhD,GAAI9kB,UAInF,SAAStG,EAAQD,EAASH,GAG/B,GAAIa,GAAUb,EAAoB,GAC9BwrB,EAAMxrB,EAAoB,KAAK,8BACjCyuB,QAAU,IACVC,OAAU,IACVC,OAAU,IACVC,SAAU,IACVC,SAAU,KAGZhuB,GAAQA,EAAQwC,EAAIxC,EAAQoD,EAAG,UAAW6qB,aAAe,QAASA,gBAAgB,MAAOtD,GAAI9kB,UAIxF,SAAStG,EAAQD,EAASH,GAE/B,GAAIY,GAAUZ,EAAoB,GAC9BqK,EAAUrK,EAAoB,GAC9Ba,EAAUb,EAAoB,GAC9BoX,KACA2X,GAAU,CAEdnuB,GAAEqH,KAAK1H,KAAK,kNAIV6D,MAAM,KAAM,SAASoB,GACrB4R,EAAI5R,GAAO,WACT,GAAIwpB,GAAW3kB,EAAOyY,OACtB,OAAGiM,IAAWC,GAAYA,EAASxpB,GAC1Bc,SAAS2G,MAAM1M,KAAKyuB,EAASxpB,GAAMwpB,EAAUpoB,WADtD,UAKJ/F,EAAQA,EAAQsK,EAAItK,EAAQoD,GAAImT,IAAKpX,EAAoB,IAAIoX,EAAIA,IAAKA,GACpE6X,OAAQ,WACNF,GAAU,GAEZG,QAAS,WACPH,GAAU,QAMT,SAAS3uB,EAAQD,EAASH,GAG/B,GAAIY,GAAUZ,EAAoB,GAC9Ba,EAAUb,EAAoB,GAC9BmvB,EAAUnvB,EAAoB,IAC9BovB,EAAUpvB,EAAoB,GAAGsC,OAASA,MAC1C+sB,KACAC,EAAa,SAAS1rB,EAAME,GAC9BlD,EAAEqH,KAAK1H,KAAKqD,EAAKQ,MAAM,KAAM,SAASoB,GACjC1B,GAAUhE,GAAa0F,IAAO4pB,GAAOC,EAAQ7pB,GAAO4pB,EAAO5pB,GACtDA,SAAU6pB,EAAQ7pB,GAAO2pB,EAAK7oB,SAAS/F,QAASiF,GAAM1B,MAGlEwrB,GAAW,wCAAyC,GACpDA,EAAW,gEAAiE,GAC5EA,EAAW,6FAEXzuB,EAAQA,EAAQmD,EAAG,QAASqrB,MAKT,mBAAVjvB,SAAyBA,OAAOD,QAAQC,OAAOD,QAAUP,EAE1C,kBAAVouB,SAAwBA,OAAOuB,IAAIvB,OAAO,WAAW,MAAOpuB,KAEtEC,EAAIyK,KAAO1K,GACd,EAAG","file":"core.min.js"} \ No newline at end of file
diff --git a/node_modules/core-js/client/library.js b/node_modules/core-js/client/library.js
index b332abde9..65385ef01 100644
--- a/node_modules/core-js/client/library.js
+++ b/node_modules/core-js/client/library.js
@@ -1,5 +1,5 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
@@ -53,67 +53,68 @@
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1);
+ __webpack_require__(32);
+ __webpack_require__(40);
+ __webpack_require__(42);
+ __webpack_require__(44);
+ __webpack_require__(46);
+ __webpack_require__(48);
+ __webpack_require__(49);
__webpack_require__(50);
__webpack_require__(51);
__webpack_require__(52);
+ __webpack_require__(53);
__webpack_require__(54);
__webpack_require__(55);
+ __webpack_require__(56);
+ __webpack_require__(57);
__webpack_require__(58);
__webpack_require__(59);
__webpack_require__(60);
- __webpack_require__(61);
__webpack_require__(62);
__webpack_require__(63);
__webpack_require__(64);
__webpack_require__(65);
__webpack_require__(66);
+ __webpack_require__(67);
__webpack_require__(68);
__webpack_require__(70);
+ __webpack_require__(71);
__webpack_require__(72);
+ __webpack_require__(74);
__webpack_require__(75);
__webpack_require__(76);
+ __webpack_require__(78);
__webpack_require__(79);
__webpack_require__(80);
__webpack_require__(81);
__webpack_require__(82);
+ __webpack_require__(83);
__webpack_require__(84);
__webpack_require__(85);
__webpack_require__(86);
__webpack_require__(87);
__webpack_require__(88);
+ __webpack_require__(89);
+ __webpack_require__(90);
__webpack_require__(92);
__webpack_require__(94);
- __webpack_require__(95);
- __webpack_require__(96);
__webpack_require__(98);
__webpack_require__(99);
- __webpack_require__(100);
+ __webpack_require__(101);
__webpack_require__(102);
- __webpack_require__(103);
- __webpack_require__(104);
__webpack_require__(106);
- __webpack_require__(107);
- __webpack_require__(108);
- __webpack_require__(109);
- __webpack_require__(110);
- __webpack_require__(111);
__webpack_require__(112);
__webpack_require__(113);
- __webpack_require__(114);
- __webpack_require__(115);
__webpack_require__(116);
- __webpack_require__(117);
__webpack_require__(118);
- __webpack_require__(119);
- __webpack_require__(121);
- __webpack_require__(125);
- __webpack_require__(126);
- __webpack_require__(127);
- __webpack_require__(128);
- __webpack_require__(132);
+ __webpack_require__(120);
+ __webpack_require__(122);
+ __webpack_require__(123);
+ __webpack_require__(124);
+ __webpack_require__(131);
__webpack_require__(134);
__webpack_require__(135);
- __webpack_require__(136);
__webpack_require__(137);
__webpack_require__(138);
__webpack_require__(139);
@@ -125,110 +126,40 @@
__webpack_require__(145);
__webpack_require__(146);
__webpack_require__(147);
+ __webpack_require__(148);
+ __webpack_require__(150);
+ __webpack_require__(151);
+ __webpack_require__(152);
+ __webpack_require__(153);
__webpack_require__(154);
__webpack_require__(155);
__webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
+ __webpack_require__(160);
+ __webpack_require__(162);
__webpack_require__(163);
- __webpack_require__(164);
__webpack_require__(165);
__webpack_require__(166);
- __webpack_require__(167);
+ __webpack_require__(168);
__webpack_require__(169);
__webpack_require__(170);
__webpack_require__(171);
- __webpack_require__(172);
+ __webpack_require__(174);
+ __webpack_require__(109);
+ __webpack_require__(176);
__webpack_require__(175);
__webpack_require__(177);
__webpack_require__(178);
__webpack_require__(179);
+ __webpack_require__(180);
__webpack_require__(181);
__webpack_require__(183);
- __webpack_require__(190);
- __webpack_require__(193);
- __webpack_require__(194);
- __webpack_require__(196);
- __webpack_require__(197);
- __webpack_require__(198);
- __webpack_require__(199);
- __webpack_require__(200);
- __webpack_require__(201);
- __webpack_require__(202);
- __webpack_require__(203);
- __webpack_require__(204);
- __webpack_require__(205);
- __webpack_require__(206);
- __webpack_require__(207);
- __webpack_require__(209);
- __webpack_require__(210);
- __webpack_require__(211);
- __webpack_require__(212);
- __webpack_require__(213);
- __webpack_require__(214);
- __webpack_require__(215);
- __webpack_require__(218);
- __webpack_require__(219);
- __webpack_require__(221);
- __webpack_require__(222);
- __webpack_require__(223);
- __webpack_require__(224);
- __webpack_require__(225);
- __webpack_require__(226);
- __webpack_require__(227);
- __webpack_require__(228);
- __webpack_require__(229);
- __webpack_require__(230);
- __webpack_require__(231);
- __webpack_require__(233);
- __webpack_require__(234);
- __webpack_require__(235);
- __webpack_require__(236);
- __webpack_require__(238);
- __webpack_require__(239);
- __webpack_require__(240);
- __webpack_require__(241);
- __webpack_require__(243);
- __webpack_require__(244);
- __webpack_require__(246);
- __webpack_require__(247);
- __webpack_require__(248);
- __webpack_require__(249);
- __webpack_require__(252);
- __webpack_require__(253);
- __webpack_require__(254);
- __webpack_require__(255);
- __webpack_require__(256);
- __webpack_require__(257);
- __webpack_require__(258);
- __webpack_require__(259);
- __webpack_require__(261);
- __webpack_require__(262);
- __webpack_require__(263);
- __webpack_require__(264);
- __webpack_require__(265);
- __webpack_require__(266);
- __webpack_require__(267);
- __webpack_require__(268);
- __webpack_require__(269);
- __webpack_require__(270);
- __webpack_require__(271);
- __webpack_require__(272);
- __webpack_require__(273);
- __webpack_require__(276);
- __webpack_require__(151);
- __webpack_require__(278);
- __webpack_require__(277);
- __webpack_require__(279);
- __webpack_require__(280);
- __webpack_require__(281);
- __webpack_require__(282);
- __webpack_require__(283);
- __webpack_require__(285);
- __webpack_require__(286);
- __webpack_require__(287);
- __webpack_require__(289);
- module.exports = __webpack_require__(290);
+ __webpack_require__(184);
+ __webpack_require__(185);
+ __webpack_require__(186);
+ __webpack_require__(187);
+ module.exports = __webpack_require__(188);
/***/ },
@@ -236,288 +167,307 @@
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // ECMAScript 6 symbols shim
- var global = __webpack_require__(2)
- , has = __webpack_require__(3)
- , DESCRIPTORS = __webpack_require__(4)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(18)
- , META = __webpack_require__(19).KEY
- , $fails = __webpack_require__(5)
- , shared = __webpack_require__(21)
- , setToStringTag = __webpack_require__(22)
- , uid = __webpack_require__(20)
- , wks = __webpack_require__(23)
- , wksExt = __webpack_require__(24)
- , wksDefine = __webpack_require__(25)
- , keyOf = __webpack_require__(27)
- , enumKeys = __webpack_require__(40)
- , isArray = __webpack_require__(43)
- , anObject = __webpack_require__(12)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(16)
- , createDesc = __webpack_require__(17)
- , _create = __webpack_require__(44)
- , gOPNExt = __webpack_require__(47)
- , $GOPD = __webpack_require__(49)
- , $DP = __webpack_require__(11)
- , $keys = __webpack_require__(28)
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
- , $Symbol = global.Symbol
- , $JSON = global.JSON
- , _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
- , HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
- , SymbolRegistry = shared('symbol-registry')
- , AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
- })).a != 7;
- }) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
- if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
- } : dP;
-
- var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , DESCRIPTORS = __webpack_require__(8)
+ , createDesc = __webpack_require__(10)
+ , html = __webpack_require__(11)
+ , cel = __webpack_require__(12)
+ , has = __webpack_require__(14)
+ , cof = __webpack_require__(15)
+ , invoke = __webpack_require__(16)
+ , fails = __webpack_require__(9)
+ , anObject = __webpack_require__(17)
+ , aFunction = __webpack_require__(7)
+ , isObject = __webpack_require__(13)
+ , toObject = __webpack_require__(18)
+ , toIObject = __webpack_require__(20)
+ , toInteger = __webpack_require__(22)
+ , toIndex = __webpack_require__(23)
+ , toLength = __webpack_require__(24)
+ , IObject = __webpack_require__(21)
+ , IE_PROTO = __webpack_require__(25)('__proto__')
+ , createArrayMethod = __webpack_require__(26)
+ , arrayIndexOf = __webpack_require__(31)(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+ if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+ }
+ $export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+ });
+
+ // IE 8- don't enum bug keys
+ var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+ // Create object with `null` prototype: use iframe Object with cleared prototype
+ var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write('<script>document.F=Object</script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict.prototype[keys1[i]];
+ return createDict();
};
-
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
- return typeof it == 'symbol';
- } : function(it){
- return it instanceof $Symbol;
+ var createGetKeys = function(names, length){
+ return function(object){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
};
+ var Empty = function(){};
+ $export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+ });
- var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
- if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
- D = _create(D, {enumerable: createDesc(0, false)});
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P){
- anObject(it);
- var keys = enumKeys(P = toIObject(P))
- , i = 0
- , l = keys.length
- , key;
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P){
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
+ var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
};
- // 19.4.1.1 Symbol([description])
- if(!USE_NATIVE){
- $Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
+ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+ $export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
};
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(42).f = $propertyIsEnumerable;
- __webpack_require__(41).f = $getOwnPropertySymbols;
-
- if(DESCRIPTORS && !__webpack_require__(26)){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function(name){
- return wrap(wks(name));
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
}
- }
-
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
- for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
- for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function(key){
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function(){ setter = true; },
- useSimple: function(){ setter = false; }
});
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
+ // fallback for not array-like ES3 strings and DOM objects
+ $export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+ }), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
});
-
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
- })), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
+ $export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
}
});
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
+ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+ $export($export.S, 'Array', {isArray: __webpack_require__(28)});
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
+ var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+ };
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+ var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+ };
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
+ $export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+ });
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
- };
+ // 20.3.3.1 / 15.9.4.4 Date.now()
+ $export($export.S, 'Date', {now: function(){ return +new Date; }});
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+ var lz = function(num){
+ return num > 9 ? num : '0' + num;
+ };
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(5)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+ // PhantomJS / old WebKit has a broken implementations
+ $export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+ }) || !fails(function(){
+ new Date(NaN).toISOString();
+ })), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
});
/***/ },
-/* 5 */
+/* 2 */
/***/ function(module, exports) {
- module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
+ var $Object = Object;
+ module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
};
/***/ },
-/* 6 */
+/* 3 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , ctx = __webpack_require__(8)
- , hide = __webpack_require__(10)
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(5)
+ , ctx = __webpack_require__(6)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
@@ -528,13 +478,12 @@
, IS_BIND = type & $export.B
, IS_WRAP = type & $export.W
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE]
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
, key, own, out;
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
+ own = !IS_FORCED && target && key in target;
if(own && key in exports)continue;
// export native or passed
out = own ? target[key] : source[key];
@@ -544,51 +493,47 @@
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function(C){
- var F = function(a, b, c){
- if(this instanceof C){
- switch(arguments.length){
- case 0: return new C;
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
+ var F = function(param){
+ return this instanceof C ? new C(param) : C(param);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if(IS_PROTO){
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
- }
+ if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
}
};
// type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
module.exports = $export;
/***/ },
-/* 7 */
+/* 4 */
/***/ function(module, exports) {
- var core = module.exports = {version: '2.4.0'};
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ var core = module.exports = {version: '1.2.6'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
-/* 8 */
+/* 6 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
- var aFunction = __webpack_require__(9);
+ var aFunction = __webpack_require__(7);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
@@ -609,7 +554,7 @@
};
/***/ },
-/* 9 */
+/* 7 */
/***/ function(module, exports) {
module.exports = function(it){
@@ -618,47 +563,55 @@
};
/***/ },
-/* 10 */
+/* 8 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(11)
- , createDesc = __webpack_require__(17);
- module.exports = __webpack_require__(4) ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
- } : function(object, key, value){
- object[key] = value;
- return object;
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(9)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ });
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+ };
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
};
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(12)
- , IE8_DOM_DEFINE = __webpack_require__(14)
- , toPrimitive = __webpack_require__(16)
- , dP = Object.defineProperty;
-
- exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
- };
+ module.exports = __webpack_require__(4).document && document.documentElement;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(13);
+ var isObject = __webpack_require__(13)
+ , document = __webpack_require__(4).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
+ return is ? document.createElement(it) : {};
};
/***/ },
@@ -671,292 +624,250 @@
/***/ },
/* 14 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ function(module, exports) {
- module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){
- return Object.defineProperty(__webpack_require__(15)('div'), 'a', {get: function(){ return 7; }}).a != 7;
- });
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+ };
/***/ },
/* 15 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ function(module, exports) {
+
+ var toString = {}.toString;
- var isObject = __webpack_require__(13)
- , document = __webpack_require__(2).document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
- return is ? document.createElement(it) : {};
+ return toString.call(it).slice(8, -1);
};
/***/ },
/* 16 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ function(module, exports) {
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(13);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
+ // fast apply, http://jsperf.lnkit.com/fast-apply/5
+ module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
};
/***/ },
/* 17 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
- module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
+ var isObject = __webpack_require__(13);
+ module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
};
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(10);
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(19);
+ module.exports = function(it){
+ return Object(defined(it));
+ };
/***/ },
/* 19 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ function(module, exports) {
- var META = __webpack_require__(20)('meta')
- , isObject = __webpack_require__(13)
- , has = __webpack_require__(3)
- , setDesc = __webpack_require__(11).f
- , id = 0;
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
- var FREEZE = !__webpack_require__(5)(function(){
- return isExtensible(Object.preventExtensions({}));
- });
- var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
- };
- var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
- };
- var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
- };
- // add metadata on freeze-family methods calling
- var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
+ // 7.2.1 RequireObjectCoercible(argument)
+ module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
return it;
};
- var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
- };
/***/ },
/* 20 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
- var id = 0
- , px = Math.random();
- module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(21)
+ , defined = __webpack_require__(19);
+ module.exports = function(it){
+ return IObject(defined(it));
};
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(15);
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ },
/* 22 */
-/***/ function(module, exports, __webpack_require__) {
-
- var def = __webpack_require__(11).f
- , has = __webpack_require__(3)
- , TAG = __webpack_require__(23)('toStringTag');
+/***/ function(module, exports) {
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil
+ , floor = Math.floor;
+ module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
- var store = __webpack_require__(21)('wks')
- , uid = __webpack_require__(20)
- , Symbol = __webpack_require__(2).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
- var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ var toInteger = __webpack_require__(22)
+ , max = Math.max
+ , min = Math.min;
+ module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
};
- $exports.store = store;
-
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
- exports.f = __webpack_require__(23);
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(22)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
/***/ },
/* 25 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ function(module, exports) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , LIBRARY = __webpack_require__(26)
- , wksExt = __webpack_require__(24)
- , defineProperty = __webpack_require__(11).f;
- module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
+ var id = 0
+ , px = Math.random();
+ module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ },
/* 26 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
- module.exports = true;
+ // 0 -> Array#forEach
+ // 1 -> Array#map
+ // 2 -> Array#filter
+ // 3 -> Array#some
+ // 4 -> Array#every
+ // 5 -> Array#find
+ // 6 -> Array#findIndex
+ var ctx = __webpack_require__(6)
+ , IObject = __webpack_require__(21)
+ , toObject = __webpack_require__(18)
+ , toLength = __webpack_require__(24)
+ , asc = __webpack_require__(27);
+ module.exports = function(TYPE){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+ };
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30);
- module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ var isObject = __webpack_require__(13)
+ , isArray = __webpack_require__(28)
+ , SPECIES = __webpack_require__(29)('species');
+ module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
};
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(29)
- , enumBugKeys = __webpack_require__(39);
-
- module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
+ // 7.2.2 IsArray(argument)
+ var cof = __webpack_require__(15);
+ module.exports = Array.isArray || function(arg){
+ return cof(arg) == 'Array';
};
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
- var has = __webpack_require__(3)
- , toIObject = __webpack_require__(30)
- , arrayIndexOf = __webpack_require__(34)(false)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO');
-
- module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
+ var store = __webpack_require__(30)('wks')
+ , uid = __webpack_require__(25)
+ , Symbol = __webpack_require__(4).Symbol;
+ module.exports = function(name){
+ return store[name] || (store[name] =
+ Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
};
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(31)
- , defined = __webpack_require__(33);
- module.exports = function(it){
- return IObject(defined(it));
+ var global = __webpack_require__(4)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
};
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(32);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
-
-/***/ },
-/* 32 */
-/***/ function(module, exports) {
-
- var toString = {}.toString;
-
- module.exports = function(it){
- return toString.call(it).slice(8, -1);
- };
-
-/***/ },
-/* 33 */
-/***/ function(module, exports) {
-
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
- };
-
-/***/ },
-/* 34 */
-/***/ function(module, exports, __webpack_require__) {
-
// false -> Array#indexOf
// true -> Array#includes
- var toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37);
+ var toIObject = __webpack_require__(20)
+ , toLength = __webpack_require__(24)
+ , toIndex = __webpack_require__(23);
module.exports = function(IS_INCLUDES){
return function($this, el, fromIndex){
var O = toIObject($this)
@@ -969,797 +880,617 @@
if(value != value)return true;
// Array#toIndex ignores holes, Array#includes - not
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
+ if(O[index] === el)return IS_INCLUDES || index;
} return !IS_INCLUDES && -1;
};
};
/***/ },
-/* 35 */
+/* 32 */
/***/ function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(36)
- , min = Math.min;
- module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
+ 'use strict';
+ // ECMAScript 6 symbols shim
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , has = __webpack_require__(14)
+ , DESCRIPTORS = __webpack_require__(8)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(33)
+ , $fails = __webpack_require__(9)
+ , shared = __webpack_require__(30)
+ , setToStringTag = __webpack_require__(35)
+ , uid = __webpack_require__(25)
+ , wks = __webpack_require__(29)
+ , keyOf = __webpack_require__(36)
+ , $names = __webpack_require__(37)
+ , enumKeys = __webpack_require__(38)
+ , isArray = __webpack_require__(28)
+ , anObject = __webpack_require__(17)
+ , toIObject = __webpack_require__(20)
+ , createDesc = __webpack_require__(10)
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = $.isEnum
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
-/***/ },
-/* 36 */
-/***/ function(module, exports) {
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+ var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
+ })).a != 7;
+ }) ? function(it, key, D){
+ var protoDesc = getDesc(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+ } : setDesc;
- // 7.1.4 ToInteger
- var ceil = Math.ceil
- , floor = Math.floor;
- module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
};
-/***/ },
-/* 37 */
-/***/ function(module, exports, __webpack_require__) {
-
- var toInteger = __webpack_require__(36)
- , max = Math.max
- , min = Math.min;
- module.exports = function(index, length){
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
+ var isSymbol = function(it){
+ return typeof it == 'symbol';
};
-/***/ },
-/* 38 */
-/***/ function(module, exports, __webpack_require__) {
-
- var shared = __webpack_require__(21)('keys')
- , uid = __webpack_require__(20);
- module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
+ var $defineProperty = function defineProperty(it, key, D){
+ if(D && has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return setDesc(it, key, D);
+ };
+ var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+ };
+ var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+ };
+ var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
+ };
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = getDesc(it = toIObject(it), key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+ };
+ var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
};
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+ };
+ var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+ };
+ var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+ });
-/***/ },
-/* 39 */
-/***/ function(module, exports) {
+ // 19.4.1.1 Symbol([description])
+ if(!useNative){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
+ };
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
-/***/ },
-/* 40 */
-/***/ function(module, exports, __webpack_require__) {
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
- // all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42);
- module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
+ if(DESCRIPTORS && !__webpack_require__(39)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+ }
+
+ var symbolStatics = {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
};
+ // 19.4.2.2 Symbol.hasInstance
+ // 19.4.2.3 Symbol.isConcatSpreadable
+ // 19.4.2.4 Symbol.iterator
+ // 19.4.2.6 Symbol.match
+ // 19.4.2.8 Symbol.replace
+ // 19.4.2.9 Symbol.search
+ // 19.4.2.10 Symbol.species
+ // 19.4.2.11 Symbol.split
+ // 19.4.2.12 Symbol.toPrimitive
+ // 19.4.2.13 Symbol.toStringTag
+ // 19.4.2.14 Symbol.unscopables
+ $.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
+ });
-/***/ },
-/* 41 */
-/***/ function(module, exports) {
+ setter = true;
- exports.f = Object.getOwnPropertySymbols;
+ $export($export.G + $export.W, {Symbol: $Symbol});
-/***/ },
-/* 42 */
-/***/ function(module, exports) {
+ $export($export.S, 'Symbol', symbolStatics);
- exports.f = {}.propertyIsEnumerable;
+ $export($export.S + $export.F * !useNative, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+ });
-/***/ },
-/* 43 */
-/***/ function(module, exports, __webpack_require__) {
+ // 24.3.2 JSON.stringify(value [, replacer [, space]])
+ $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
- // 7.2.2 IsArray(argument)
- var cof = __webpack_require__(32);
- module.exports = Array.isArray || function isArray(arg){
- return cof(arg) == 'Array';
- };
+ // 19.4.3.5 Symbol.prototype[@@toStringTag]
+ setToStringTag($Symbol, 'Symbol');
+ // 20.2.1.9 Math[@@toStringTag]
+ setToStringTag(Math, 'Math', true);
+ // 24.3.3 JSON[@@toStringTag]
+ setToStringTag(global.JSON, 'JSON', true);
/***/ },
-/* 44 */
+/* 33 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(12)
- , dPs = __webpack_require__(45)
- , enumBugKeys = __webpack_require__(39)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
+ module.exports = __webpack_require__(34);
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(15)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(46).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
- module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
+ var $ = __webpack_require__(2)
+ , createDesc = __webpack_require__(10);
+ module.exports = __webpack_require__(8) ? function(object, key, value){
+ return $.setDesc(object, key, createDesc(1, value));
+ } : function(object, key, value){
+ object[key] = value;
+ return object;
};
-
/***/ },
-/* 45 */
+/* 35 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(11)
- , anObject = __webpack_require__(12)
- , getKeys = __webpack_require__(28);
+ var def = __webpack_require__(2).setDesc
+ , has = __webpack_require__(14)
+ , TAG = __webpack_require__(29)('toStringTag');
- module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
/***/ },
-/* 46 */
+/* 36 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(2).document && document.documentElement;
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(20);
+ module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+ };
/***/ },
-/* 47 */
+/* 37 */
/***/ function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(30)
- , gOPN = __webpack_require__(48).f
+ var toIObject = __webpack_require__(20)
+ , getNames = __webpack_require__(2).getNames
, toString = {}.toString;
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function(it){
try {
- return gOPN(it);
+ return getNames(it);
} catch(e){
return windowNames.slice();
}
};
- module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+ module.exports.get = function getOwnPropertyNames(it){
+ if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
+ return getNames(toIObject(it));
};
-
/***/ },
-/* 48 */
+/* 38 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(29)
- , hiddenKeys = __webpack_require__(39).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
+ // all enumerable object keys, includes symbols
+ var $ = __webpack_require__(2);
+ module.exports = function(it){
+ var keys = $.getKeys(it)
+ , getSymbols = $.getSymbols;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = $.isEnum
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
+ }
+ return keys;
};
/***/ },
-/* 49 */
-/***/ function(module, exports, __webpack_require__) {
-
- var pIE = __webpack_require__(42)
- , createDesc = __webpack_require__(17)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(16)
- , has = __webpack_require__(3)
- , IE8_DOM_DEFINE = __webpack_require__(14)
- , gOPD = Object.getOwnPropertyDescriptor;
+/* 39 */
+/***/ function(module, exports) {
- exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
- };
+ module.exports = true;
/***/ },
-/* 50 */
+/* 40 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(11).f});
-
-/***/ },
-/* 51 */
-/***/ function(module, exports, __webpack_require__) {
+ // 19.1.3.1 Object.assign(target, source)
+ var $export = __webpack_require__(3);
- var $export = __webpack_require__(6);
- // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)});
+ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(41)});
/***/ },
-/* 52 */
+/* 41 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- var toIObject = __webpack_require__(30)
- , $getOwnPropertyDescriptor = __webpack_require__(49).f;
+ // 19.1.2.1 Object.assign(target, source, ...)
+ var $ = __webpack_require__(2)
+ , toObject = __webpack_require__(18)
+ , IObject = __webpack_require__(21);
- __webpack_require__(53)('getOwnPropertyDescriptor', function(){
- return function getOwnPropertyDescriptor(it, key){
- return $getOwnPropertyDescriptor(toIObject(it), key);
- };
- });
+ // should work with symbols and should have deterministic property order (V8 bug)
+ module.exports = __webpack_require__(9)(function(){
+ var a = Object.assign
+ , A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function(k){ B[k] = k; });
+ return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
+ }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , $$ = arguments
+ , $$len = $$.length
+ , index = 1
+ , getKeys = $.getKeys
+ , getSymbols = $.getSymbols
+ , isEnum = $.isEnum;
+ while($$len > index){
+ var S = IObject($$[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
+ }
+ return T;
+ } : Object.assign;
/***/ },
-/* 53 */
+/* 42 */
/***/ function(module, exports, __webpack_require__) {
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(6)
- , core = __webpack_require__(7)
- , fails = __webpack_require__(5);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
- };
+ // 19.1.3.10 Object.is(value1, value2)
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {is: __webpack_require__(43)});
/***/ },
-/* 54 */
-/***/ function(module, exports, __webpack_require__) {
+/* 43 */
+/***/ function(module, exports) {
- var $export = __webpack_require__(6)
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- $export($export.S, 'Object', {create: __webpack_require__(44)});
+ // 7.2.9 SameValue(x, y)
+ module.exports = Object.is || function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+ };
/***/ },
-/* 55 */
+/* 44 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.9 Object.getPrototypeOf(O)
- var toObject = __webpack_require__(56)
- , $getPrototypeOf = __webpack_require__(57);
-
- __webpack_require__(53)('getPrototypeOf', function(){
- return function getPrototypeOf(it){
- return $getPrototypeOf(toObject(it));
- };
- });
+ // 19.1.3.19 Object.setPrototypeOf(O, proto)
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(45).set});
/***/ },
-/* 56 */
+/* 45 */
/***/ function(module, exports, __webpack_require__) {
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(33);
- module.exports = function(it){
- return Object(defined(it));
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
+ /* eslint-disable no-proto */
+ var getDesc = __webpack_require__(2).getDesc
+ , isObject = __webpack_require__(13)
+ , anObject = __webpack_require__(17);
+ var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
};
-
-/***/ },
-/* 57 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(3)
- , toObject = __webpack_require__(56)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , ObjectProto = Object.prototype;
-
- module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
+ module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = __webpack_require__(6)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
};
/***/ },
-/* 58 */
+/* 46 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(56)
- , $keys = __webpack_require__(28);
+ // 19.1.2.5 Object.freeze(O)
+ var isObject = __webpack_require__(13);
- __webpack_require__(53)('keys', function(){
- return function keys(it){
- return $keys(toObject(it));
+ __webpack_require__(47)('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(it) : it;
};
});
/***/ },
-/* 59 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- __webpack_require__(53)('getOwnPropertyNames', function(){
- return __webpack_require__(47).f;
- });
-
-/***/ },
-/* 60 */
+/* 47 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.5 Object.freeze(O)
- var isObject = __webpack_require__(13)
- , meta = __webpack_require__(19).onFreeze;
-
- __webpack_require__(53)('freeze', function($freeze){
- return function freeze(it){
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
- };
- });
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(3)
+ , core = __webpack_require__(5)
+ , fails = __webpack_require__(9);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ };
/***/ },
-/* 61 */
+/* 48 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.17 Object.seal(O)
- var isObject = __webpack_require__(13)
- , meta = __webpack_require__(19).onFreeze;
+ var isObject = __webpack_require__(13);
- __webpack_require__(53)('seal', function($seal){
+ __webpack_require__(47)('seal', function($seal){
return function seal(it){
- return $seal && isObject(it) ? $seal(meta(it)) : it;
+ return $seal && isObject(it) ? $seal(it) : it;
};
});
/***/ },
-/* 62 */
+/* 49 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.15 Object.preventExtensions(O)
- var isObject = __webpack_require__(13)
- , meta = __webpack_require__(19).onFreeze;
+ var isObject = __webpack_require__(13);
- __webpack_require__(53)('preventExtensions', function($preventExtensions){
+ __webpack_require__(47)('preventExtensions', function($preventExtensions){
return function preventExtensions(it){
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
};
});
/***/ },
-/* 63 */
+/* 50 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(13);
- __webpack_require__(53)('isFrozen', function($isFrozen){
+ __webpack_require__(47)('isFrozen', function($isFrozen){
return function isFrozen(it){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
/***/ },
-/* 64 */
+/* 51 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(13);
- __webpack_require__(53)('isSealed', function($isSealed){
+ __webpack_require__(47)('isSealed', function($isSealed){
return function isSealed(it){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
/***/ },
-/* 65 */
+/* 52 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(13);
- __webpack_require__(53)('isExtensible', function($isExtensible){
+ __webpack_require__(47)('isExtensible', function($isExtensible){
return function isExtensible(it){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
/***/ },
-/* 66 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(6);
-
- $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)});
-
-/***/ },
-/* 67 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 19.1.2.1 Object.assign(target, source, ...)
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , $assign = Object.assign;
-
- // should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(5)(function(){
- var A = {}
- , B = {}
- , S = Symbol()
- , K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
- }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
- var T = toObject(target)
- , aLen = arguments.length
- , index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
- , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
- , length = keys.length
- , j = 0
- , key;
- while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
- } : $assign;
-
-/***/ },
-/* 68 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.3.10 Object.is(value1, value2)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {is: __webpack_require__(69)});
-
-/***/ },
-/* 69 */
-/***/ function(module, exports) {
-
- // 7.2.9 SameValue(x, y)
- module.exports = Object.is || function is(x, y){
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
- };
-
-/***/ },
-/* 70 */
+/* 53 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.3.19 Object.setPrototypeOf(O, proto)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set});
-
-/***/ },
-/* 71 */
-/***/ function(module, exports, __webpack_require__) {
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ var toIObject = __webpack_require__(20);
- // Works with __proto__ only. Old v8 can't work with null proto objects.
- /* eslint-disable no-proto */
- var isObject = __webpack_require__(13)
- , anObject = __webpack_require__(12);
- var check = function(O, proto){
- anObject(O);
- if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
- };
- module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function(test, buggy, set){
- try {
- set = __webpack_require__(8)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch(e){ buggy = true; }
- return function setPrototypeOf(O, proto){
- check(O, proto);
- if(buggy)O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
- };
+ __webpack_require__(47)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+ });
/***/ },
-/* 72 */
+/* 54 */
/***/ function(module, exports, __webpack_require__) {
- // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
- var $export = __webpack_require__(6);
+ // 19.1.2.9 Object.getPrototypeOf(O)
+ var toObject = __webpack_require__(18);
- $export($export.P, 'Function', {bind: __webpack_require__(73)});
+ __webpack_require__(47)('getPrototypeOf', function($getPrototypeOf){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+ });
/***/ },
-/* 73 */
+/* 55 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var aFunction = __webpack_require__(9)
- , isObject = __webpack_require__(13)
- , invoke = __webpack_require__(74)
- , arraySlice = [].slice
- , factories = {};
-
- var construct = function(F, len, args){
- if(!(len in factories)){
- for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
- };
+ // 19.1.2.14 Object.keys(O)
+ var toObject = __webpack_require__(18);
- module.exports = Function.bind || function bind(that /*, args... */){
- var fn = aFunction(this)
- , partArgs = arraySlice.call(arguments, 1);
- var bound = function(/* args... */){
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ __webpack_require__(47)('keys', function($keys){
+ return function keys(it){
+ return $keys(toObject(it));
};
- if(isObject(fn.prototype))bound.prototype = fn.prototype;
- return bound;
- };
+ });
/***/ },
-/* 74 */
-/***/ function(module, exports) {
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
- // fast apply, http://jsperf.lnkit.com/fast-apply/5
- module.exports = function(fn, args, that){
- var un = that === undefined;
- switch(args.length){
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
- };
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ __webpack_require__(47)('getOwnPropertyNames', function(){
+ return __webpack_require__(37).get;
+ });
/***/ },
-/* 75 */
+/* 57 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var isObject = __webpack_require__(13)
- , getPrototypeOf = __webpack_require__(57)
- , HAS_INSTANCE = __webpack_require__(23)('hasInstance')
- , FunctionProto = Function.prototype;
+ var $ = __webpack_require__(2)
+ , isObject = __webpack_require__(13)
+ , HAS_INSTANCE = __webpack_require__(29)('hasInstance')
+ , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
- if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(11).f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}});
/***/ },
-/* 76 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toInteger = __webpack_require__(36)
- , aNumberValue = __webpack_require__(77)
- , repeat = __webpack_require__(78)
- , $toFixed = 1..toFixed
- , floor = Math.floor
- , data = [0, 0, 0, 0, 0, 0]
- , ERROR = 'Number.toFixed: incorrect invocation!'
- , ZERO = '0';
-
- var multiply = function(n, c){
- var i = -1
- , c2 = c;
- while(++i < 6){
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
- };
- var divide = function(n){
- var i = 6
- , c = 0;
- while(--i >= 0){
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
- };
- var numToString = function(){
- var i = 6
- , s = '';
- while(--i >= 0){
- if(s !== '' || i === 0 || data[i] !== 0){
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
- };
- var pow = function(x, n, acc){
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
- };
- var log = function(x){
- var n = 0
- , x2 = x;
- while(x2 >= 4096){
- n += 12;
- x2 /= 4096;
- }
- while(x2 >= 2){
- n += 1;
- x2 /= 2;
- } return n;
- };
-
- $export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128..toFixed(0) !== '1000000000000000128'
- ) || !__webpack_require__(5)(function(){
- // V8 ~ Android 4.3-
- $toFixed.call({});
- })), 'Number', {
- toFixed: function toFixed(fractionDigits){
- var x = aNumberValue(this, ERROR)
- , f = toInteger(fractionDigits)
- , s = ''
- , m = ZERO
- , e, z, j, k;
- if(f < 0 || f > 20)throw RangeError(ERROR);
- if(x != x)return 'NaN';
- if(x <= -1e21 || x >= 1e21)return String(x);
- if(x < 0){
- s = '-';
- x = -x;
- }
- if(x > 1e-21){
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if(e > 0){
- multiply(0, z);
- j = f;
- while(j >= 7){
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while(j >= 23){
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if(f > 0){
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
- });
-
-/***/ },
-/* 77 */
-/***/ function(module, exports, __webpack_require__) {
-
- var cof = __webpack_require__(32);
- module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
- };
-
-/***/ },
-/* 78 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
-
- module.exports = function repeat(count){
- var str = String(defined(this))
- , res = ''
- , n = toInteger(count);
- if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
- for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
- return res;
- };
-
-/***/ },
-/* 79 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $fails = __webpack_require__(5)
- , aNumberValue = __webpack_require__(77)
- , $toPrecision = 1..toPrecision;
-
- $export($export.P + $export.F * ($fails(function(){
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
- }) || !$fails(function(){
- // V8 ~ Android 4.3-
- $toPrecision.call({});
- })), 'Number', {
- toPrecision: function toPrecision(precision){
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
- });
-
-/***/ },
-/* 80 */
+/* 58 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
/***/ },
-/* 81 */
+/* 59 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
- var $export = __webpack_require__(6)
- , _isFinite = __webpack_require__(2).isFinite;
+ var $export = __webpack_require__(3)
+ , _isFinite = __webpack_require__(4).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
@@ -1768,16 +1499,16 @@
});
/***/ },
-/* 82 */
+/* 60 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Number', {isInteger: __webpack_require__(83)});
+ $export($export.S, 'Number', {isInteger: __webpack_require__(61)});
/***/ },
-/* 83 */
+/* 61 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
@@ -1788,11 +1519,11 @@
};
/***/ },
-/* 84 */
+/* 62 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {
isNaN: function isNaN(number){
@@ -1801,12 +1532,12 @@
});
/***/ },
-/* 85 */
+/* 63 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
- var $export = __webpack_require__(6)
- , isInteger = __webpack_require__(83)
+ var $export = __webpack_require__(3)
+ , isInteger = __webpack_require__(61)
, abs = Math.abs;
$export($export.S, 'Number', {
@@ -1816,144 +1547,53 @@
});
/***/ },
-/* 86 */
+/* 64 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
/***/ },
-/* 87 */
+/* 65 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
/***/ },
-/* 88 */
+/* 66 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(89);
// 20.1.2.12 Number.parseFloat(string)
- $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
-
-/***/ },
-/* 89 */
-/***/ function(module, exports, __webpack_require__) {
+ var $export = __webpack_require__(3);
- var $parseFloat = __webpack_require__(2).parseFloat
- , $trim = __webpack_require__(90).trim;
-
- module.exports = 1 / $parseFloat(__webpack_require__(91) + '-0') !== -Infinity ? function parseFloat(str){
- var string = $trim(String(str), 3)
- , result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
- } : $parseFloat;
+ $export($export.S, 'Number', {parseFloat: parseFloat});
/***/ },
-/* 90 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , fails = __webpack_require__(5)
- , spaces = __webpack_require__(91)
- , space = '[' + spaces + ']'
- , non = '\u200b\u0085'
- , ltrim = RegExp('^' + space + space + '*')
- , rtrim = RegExp(space + space + '*$');
-
- var exporter = function(KEY, exec, ALIAS){
- var exp = {};
- var FORCE = fails(function(){
- return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if(ALIAS)exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
- };
-
- // 1 -> String#trimLeft
- // 2 -> String#trimRight
- // 3 -> String#trim
- var trim = exporter.trim = function(string, TYPE){
- string = String(defined(string));
- if(TYPE & 1)string = string.replace(ltrim, '');
- if(TYPE & 2)string = string.replace(rtrim, '');
- return string;
- };
-
- module.exports = exporter;
-
-/***/ },
-/* 91 */
-/***/ function(module, exports) {
-
- module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
-/***/ },
-/* 92 */
+/* 67 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(93);
// 20.1.2.13 Number.parseInt(string, radix)
- $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
+ var $export = __webpack_require__(3);
-/***/ },
-/* 93 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $parseInt = __webpack_require__(2).parseInt
- , $trim = __webpack_require__(90).trim
- , ws = __webpack_require__(91)
- , hex = /^[\-+]?0[xX]/;
-
- module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
- } : $parseInt;
+ $export($export.S, 'Number', {parseInt: parseInt});
/***/ },
-/* 94 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(93);
- // 18.2.5 parseInt(string, radix)
- $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
-
-/***/ },
-/* 95 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(89);
- // 18.2.4 parseFloat(string)
- $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
-
-/***/ },
-/* 96 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
- var $export = __webpack_require__(6)
- , log1p = __webpack_require__(97)
+ var $export = __webpack_require__(3)
+ , log1p = __webpack_require__(69)
, sqrt = Math.sqrt
, $acosh = Math.acosh;
- $export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
- ), 'Math', {
+ // V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+ $export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
@@ -1962,7 +1602,7 @@
});
/***/ },
-/* 97 */
+/* 69 */
/***/ function(module, exports) {
// 20.2.2.20 Math.log1p(x)
@@ -1971,42 +1611,38 @@
};
/***/ },
-/* 98 */
+/* 70 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
- var $export = __webpack_require__(6)
- , $asinh = Math.asinh;
+ var $export = __webpack_require__(3);
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
- // Tor Browser bug: Math.asinh(0) -> -0
- $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
+ $export($export.S, 'Math', {asinh: asinh});
/***/ },
-/* 99 */
+/* 71 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
- var $export = __webpack_require__(6)
- , $atanh = Math.atanh;
+ var $export = __webpack_require__(3);
- // Tor Browser bug: Math.atanh(-0) -> 0
- $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+ $export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ },
-/* 100 */
+/* 72 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(101);
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(73);
$export($export.S, 'Math', {
cbrt: function cbrt(x){
@@ -2015,7 +1651,7 @@
});
/***/ },
-/* 101 */
+/* 73 */
/***/ function(module, exports) {
// 20.2.2.28 Math.sign(x)
@@ -2024,11 +1660,11 @@
};
/***/ },
-/* 102 */
+/* 74 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
clz32: function clz32(x){
@@ -2037,11 +1673,11 @@
});
/***/ },
-/* 103 */
+/* 75 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2051,37 +1687,30 @@
});
/***/ },
-/* 104 */
+/* 76 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
- var $export = __webpack_require__(6)
- , $expm1 = __webpack_require__(105);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
+ $export($export.S, 'Math', {expm1: __webpack_require__(77)});
/***/ },
-/* 105 */
+/* 77 */
/***/ function(module, exports) {
// 20.2.2.14 Math.expm1(x)
- var $expm1 = Math.expm1;
- module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
- ) ? function expm1(x){
+ module.exports = Math.expm1 || function expm1(x){
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
- } : $expm1;
+ };
/***/ },
-/* 106 */
+/* 78 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(101)
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(73)
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
@@ -2107,22 +1736,23 @@
});
/***/ },
-/* 107 */
+/* 79 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
- var sum = 0
- , i = 0
- , aLen = arguments.length
- , larg = 0
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
, arg, div;
- while(i < aLen){
- arg = abs(arguments[i++]);
+ while(i < $$len){
+ arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
@@ -2137,15 +1767,15 @@
});
/***/ },
-/* 108 */
+/* 80 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
@@ -2159,11 +1789,11 @@
});
/***/ },
-/* 109 */
+/* 81 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log10: function log10(x){
@@ -2172,20 +1802,20 @@
});
/***/ },
-/* 110 */
+/* 82 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {log1p: __webpack_require__(97)});
+ $export($export.S, 'Math', {log1p: __webpack_require__(69)});
/***/ },
-/* 111 */
+/* 83 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log2: function log2(x){
@@ -2194,25 +1824,25 @@
});
/***/ },
-/* 112 */
+/* 84 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {sign: __webpack_require__(101)});
+ $export($export.S, 'Math', {sign: __webpack_require__(73)});
/***/ },
-/* 113 */
+/* 85 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(105)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(77)
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
@@ -2223,12 +1853,12 @@
});
/***/ },
-/* 114 */
+/* 86 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(105)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(77)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2240,11 +1870,11 @@
});
/***/ },
-/* 115 */
+/* 87 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
trunc: function trunc(it){
@@ -2253,11 +1883,11 @@
});
/***/ },
-/* 116 */
+/* 88 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIndex = __webpack_require__(37)
+ var $export = __webpack_require__(3)
+ , toIndex = __webpack_require__(23)
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
@@ -2265,12 +1895,13 @@
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
- var res = []
- , aLen = arguments.length
- , i = 0
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
, code;
- while(aLen > i){
- code = +arguments[i++];
+ while($$len > i){
+ code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
@@ -2281,47 +1912,82 @@
});
/***/ },
-/* 117 */
+/* 89 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35);
+ var $export = __webpack_require__(3)
+ , toIObject = __webpack_require__(20)
+ , toLength = __webpack_require__(24);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
- var tpl = toIObject(callSite.raw)
- , len = toLength(tpl.length)
- , aLen = arguments.length
- , res = []
- , i = 0;
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
while(len > i){
res.push(String(tpl[i++]));
- if(i < aLen)res.push(String(arguments[i]));
+ if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
});
/***/ },
-/* 118 */
+/* 90 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.1.3.25 String.prototype.trim()
- __webpack_require__(90)('trim', function($trim){
+ __webpack_require__(91)('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
});
/***/ },
-/* 119 */
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(3)
+ , defined = __webpack_require__(19)
+ , fails = __webpack_require__(9)
+ , spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
+ , space = '[' + spaces + ']'
+ , non = '\u200b\u0085'
+ , ltrim = RegExp('^' + space + space + '*')
+ , rtrim = RegExp(space + space + '*$');
+
+ var exporter = function(KEY, exec){
+ var exp = {};
+ exp[KEY] = exec(trim);
+ $export($export.P + $export.F * fails(function(){
+ return !!spaces[KEY]() || non[KEY]() != non;
+ }), 'String', exp);
+ };
+
+ // 1 -> String#trimLeft
+ // 2 -> String#trimRight
+ // 3 -> String#trim
+ var trim = exporter.trim = function(string, TYPE){
+ string = String(defined(string));
+ if(TYPE & 1)string = string.replace(ltrim, '');
+ if(TYPE & 2)string = string.replace(rtrim, '');
+ return string;
+ };
+
+ module.exports = exporter;
+
+/***/ },
+/* 92 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(120)(false);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(93)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
@@ -2330,11 +1996,11 @@
});
/***/ },
-/* 120 */
+/* 93 */
/***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
+ var toInteger = __webpack_require__(22)
+ , defined = __webpack_require__(19);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
@@ -2352,21 +2018,22 @@
};
/***/ },
-/* 121 */
+/* 94 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(122)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(24)
+ , context = __webpack_require__(95)
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
- $export($export.P + $export.F * __webpack_require__(124)(ENDS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(97)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
- , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
@@ -2377,12 +2044,12 @@
});
/***/ },
-/* 122 */
+/* 95 */
/***/ function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
- var isRegExp = __webpack_require__(123)
- , defined = __webpack_require__(33);
+ var isRegExp = __webpack_require__(96)
+ , defined = __webpack_require__(19);
module.exports = function(that, searchString, NAME){
if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
@@ -2390,23 +2057,23 @@
};
/***/ },
-/* 123 */
+/* 96 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(13)
- , cof = __webpack_require__(32)
- , MATCH = __webpack_require__(23)('match');
+ , cof = __webpack_require__(15)
+ , MATCH = __webpack_require__(29)('match');
module.exports = function(it){
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ },
-/* 124 */
+/* 97 */
/***/ function(module, exports, __webpack_require__) {
- var MATCH = __webpack_require__(23)('match');
+ var MATCH = __webpack_require__(29)('match');
module.exports = function(KEY){
var re = /./;
try {
@@ -2420,16 +2087,16 @@
};
/***/ },
-/* 125 */
+/* 98 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
- var $export = __webpack_require__(6)
- , context = __webpack_require__(122)
+ var $export = __webpack_require__(3)
+ , context = __webpack_require__(95)
, INCLUDES = 'includes';
- $export($export.P + $export.F * __webpack_require__(124)(INCLUDES), 'String', {
+ $export($export.P + $export.F * __webpack_require__(97)(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
@@ -2437,32 +2104,50 @@
});
/***/ },
-/* 126 */
+/* 99 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
- repeat: __webpack_require__(78)
+ repeat: __webpack_require__(100)
});
/***/ },
-/* 127 */
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var toInteger = __webpack_require__(22)
+ , defined = __webpack_require__(19);
+
+ module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ };
+
+/***/ },
+/* 101 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(122)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(24)
+ , context = __webpack_require__(95)
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
- $export($export.P + $export.F * __webpack_require__(124)(STARTS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(97)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
@@ -2471,14 +2156,14 @@
});
/***/ },
-/* 128 */
+/* 102 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $at = __webpack_require__(120)(true);
+ var $at = __webpack_require__(93)(true);
// 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(129)(String, 'String', function(iterated){
+ __webpack_require__(103)(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
@@ -2493,20 +2178,20 @@
});
/***/ },
-/* 129 */
+/* 103 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(26)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(18)
- , hide = __webpack_require__(10)
- , has = __webpack_require__(3)
- , Iterators = __webpack_require__(130)
- , $iterCreate = __webpack_require__(131)
- , setToStringTag = __webpack_require__(22)
- , getPrototypeOf = __webpack_require__(57)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var LIBRARY = __webpack_require__(39)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(33)
+ , hide = __webpack_require__(34)
+ , has = __webpack_require__(14)
+ , Iterators = __webpack_require__(104)
+ , $iterCreate = __webpack_require__(105)
+ , setToStringTag = __webpack_require__(35)
+ , getProto = __webpack_require__(2).getProto
+ , ITERATOR = __webpack_require__(29)('iterator')
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
, FF_ITERATOR = '@@iterator'
, KEYS = 'keys'
@@ -2529,24 +2214,20 @@
, proto = Base.prototype
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
, $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
+ , methods, key;
// Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ if($native){
+ var IteratorPrototype = getProto($default.call(new Base));
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // FF fix
+ if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
}
}
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
// Define iterator
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
hide(proto, ITERATOR, $default);
@@ -2556,9 +2237,9 @@
Iterators[TAG] = returnThis;
if(DEFAULT){
methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: !DEF_VALUES ? $default : getMethod('entries')
};
if(FORCED)for(key in methods){
if(!(key in proto))redefine(proto, key, methods[key]);
@@ -2568,253 +2249,63 @@
};
/***/ },
-/* 130 */
+/* 104 */
/***/ function(module, exports) {
module.exports = {};
/***/ },
-/* 131 */
+/* 105 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var create = __webpack_require__(44)
- , descriptor = __webpack_require__(17)
- , setToStringTag = __webpack_require__(22)
+ var $ = __webpack_require__(2)
+ , descriptor = __webpack_require__(10)
+ , setToStringTag = __webpack_require__(35)
, IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(10)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; });
+ __webpack_require__(34)(IteratorPrototype, __webpack_require__(29)('iterator'), function(){ return this; });
module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ },
-/* 132 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.2 String.prototype.anchor(name)
- __webpack_require__(133)('anchor', function(createHTML){
- return function anchor(name){
- return createHTML(this, 'a', 'name', name);
- }
- });
-
-/***/ },
-/* 133 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , defined = __webpack_require__(33)
- , quot = /"/g;
- // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
- var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
- return p1 + '>' + S + '</' + tag + '>';
- };
- module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
- };
-
-/***/ },
-/* 134 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.3 String.prototype.big()
- __webpack_require__(133)('big', function(createHTML){
- return function big(){
- return createHTML(this, 'big', '', '');
- }
- });
-
-/***/ },
-/* 135 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.4 String.prototype.blink()
- __webpack_require__(133)('blink', function(createHTML){
- return function blink(){
- return createHTML(this, 'blink', '', '');
- }
- });
-
-/***/ },
-/* 136 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.5 String.prototype.bold()
- __webpack_require__(133)('bold', function(createHTML){
- return function bold(){
- return createHTML(this, 'b', '', '');
- }
- });
-
-/***/ },
-/* 137 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.6 String.prototype.fixed()
- __webpack_require__(133)('fixed', function(createHTML){
- return function fixed(){
- return createHTML(this, 'tt', '', '');
- }
- });
-
-/***/ },
-/* 138 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.7 String.prototype.fontcolor(color)
- __webpack_require__(133)('fontcolor', function(createHTML){
- return function fontcolor(color){
- return createHTML(this, 'font', 'color', color);
- }
- });
-
-/***/ },
-/* 139 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.8 String.prototype.fontsize(size)
- __webpack_require__(133)('fontsize', function(createHTML){
- return function fontsize(size){
- return createHTML(this, 'font', 'size', size);
- }
- });
-
-/***/ },
-/* 140 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.9 String.prototype.italics()
- __webpack_require__(133)('italics', function(createHTML){
- return function italics(){
- return createHTML(this, 'i', '', '');
- }
- });
-
-/***/ },
-/* 141 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.10 String.prototype.link(url)
- __webpack_require__(133)('link', function(createHTML){
- return function link(url){
- return createHTML(this, 'a', 'href', url);
- }
- });
-
-/***/ },
-/* 142 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.11 String.prototype.small()
- __webpack_require__(133)('small', function(createHTML){
- return function small(){
- return createHTML(this, 'small', '', '');
- }
- });
-
-/***/ },
-/* 143 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.12 String.prototype.strike()
- __webpack_require__(133)('strike', function(createHTML){
- return function strike(){
- return createHTML(this, 'strike', '', '');
- }
- });
-
-/***/ },
-/* 144 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.13 String.prototype.sub()
- __webpack_require__(133)('sub', function(createHTML){
- return function sub(){
- return createHTML(this, 'sub', '', '');
- }
- });
-
-/***/ },
-/* 145 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.14 String.prototype.sup()
- __webpack_require__(133)('sup', function(createHTML){
- return function sup(){
- return createHTML(this, 'sup', '', '');
- }
- });
-
-/***/ },
-/* 146 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Array', {isArray: __webpack_require__(43)});
-
-/***/ },
-/* 147 */
+/* 106 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var ctx = __webpack_require__(8)
- , $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , call = __webpack_require__(148)
- , isArrayIter = __webpack_require__(149)
- , toLength = __webpack_require__(35)
- , createProperty = __webpack_require__(150)
- , getIterFn = __webpack_require__(151);
-
- $export($export.S + $export.F * !__webpack_require__(153)(function(iter){ Array.from(iter); }), 'Array', {
+ var ctx = __webpack_require__(6)
+ , $export = __webpack_require__(3)
+ , toObject = __webpack_require__(18)
+ , call = __webpack_require__(107)
+ , isArrayIter = __webpack_require__(108)
+ , toLength = __webpack_require__(24)
+ , getIterFn = __webpack_require__(109);
+ $export($export.S + $export.F * !__webpack_require__(111)(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
@@ -2824,11 +2315,11 @@
/***/ },
-/* 148 */
+/* 107 */
/***/ function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
- var anObject = __webpack_require__(12);
+ var anObject = __webpack_require__(17);
module.exports = function(iterator, fn, value, entries){
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
@@ -2841,12 +2332,12 @@
};
/***/ },
-/* 149 */
+/* 108 */
/***/ function(module, exports, __webpack_require__) {
// check on default Array iterator
- var Iterators = __webpack_require__(130)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var Iterators = __webpack_require__(104)
+ , ITERATOR = __webpack_require__(29)('iterator')
, ArrayProto = Array.prototype;
module.exports = function(it){
@@ -2854,53 +2345,33 @@
};
/***/ },
-/* 150 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $defineProperty = __webpack_require__(11)
- , createDesc = __webpack_require__(17);
-
- module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
-
-/***/ },
-/* 151 */
+/* 109 */
/***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(152)
- , ITERATOR = __webpack_require__(23)('iterator')
- , Iterators = __webpack_require__(130);
- module.exports = __webpack_require__(7).getIteratorMethod = function(it){
+ var classof = __webpack_require__(110)
+ , ITERATOR = __webpack_require__(29)('iterator')
+ , Iterators = __webpack_require__(104);
+ module.exports = __webpack_require__(5).getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ },
-/* 152 */
+/* 110 */
/***/ function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(32)
- , TAG = __webpack_require__(23)('toStringTag')
+ var cof = __webpack_require__(15)
+ , TAG = __webpack_require__(29)('toStringTag')
// ES3 wrong here
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
- // fallback for IE11 Script Access Denied error
- var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
- };
-
module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
@@ -2908,10 +2379,10 @@
};
/***/ },
-/* 153 */
+/* 111 */
/***/ function(module, exports, __webpack_require__) {
- var ITERATOR = __webpack_require__(23)('iterator')
+ var ITERATOR = __webpack_require__(29)('iterator')
, SAFE_CLOSING = false;
try {
@@ -2934,413 +2405,134 @@
};
/***/ },
-/* 154 */
+/* 112 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , createProperty = __webpack_require__(150);
+ var $export = __webpack_require__(3);
// WebKit Array.of isn't generic
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
- , aLen = arguments.length
- , result = new (typeof this == 'function' ? this : Array)(aLen);
- while(aLen > index)createProperty(result, index, arguments[index++]);
- result.length = aLen;
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
return result;
}
});
/***/ },
-/* 155 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 22.1.3.13 Array.prototype.join(separator)
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , arrayJoin = [].join;
-
- // fallback for not array-like strings
- $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(156)(arrayJoin)), 'Array', {
- join: function join(separator){
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
- });
-
-/***/ },
-/* 156 */
-/***/ function(module, exports, __webpack_require__) {
-
- var fails = __webpack_require__(5);
-
- module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
- };
-
-/***/ },
-/* 157 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , html = __webpack_require__(46)
- , cof = __webpack_require__(32)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , arraySlice = [].slice;
-
- // fallback for not array-like ES3 strings and DOM objects
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- if(html)arraySlice.call(html);
- }), 'Array', {
- slice: function slice(begin, end){
- var len = toLength(this.length)
- , klass = cof(this);
- end = end === undefined ? len : end;
- if(klass == 'Array')return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len)
- , upTo = toIndex(end, len)
- , size = toLength(upTo - start)
- , cloned = Array(size)
- , i = 0;
- for(; i < size; i++)cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
- });
-
-/***/ },
-/* 158 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(9)
- , toObject = __webpack_require__(56)
- , fails = __webpack_require__(5)
- , $sort = [].sort
- , test = [1, 2, 3];
-
- $export($export.P + $export.F * (fails(function(){
- // IE8-
- test.sort(undefined);
- }) || !fails(function(){
- // V8 bug
- test.sort(null);
- // Old WebKit
- }) || !__webpack_require__(156)($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn){
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
- });
-
-/***/ },
-/* 159 */
+/* 113 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $forEach = __webpack_require__(160)(0)
- , STRICT = __webpack_require__(156)([].forEach, true);
+ var addToUnscopables = __webpack_require__(114)
+ , step = __webpack_require__(115)
+ , Iterators = __webpack_require__(104)
+ , toIObject = __webpack_require__(20);
- $export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */){
- return $forEach(this, callbackfn, arguments[1]);
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(103)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
}
- });
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
-/***/ },
-/* 160 */
-/***/ function(module, exports, __webpack_require__) {
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
- // 0 -> Array#forEach
- // 1 -> Array#map
- // 2 -> Array#filter
- // 3 -> Array#some
- // 4 -> Array#every
- // 5 -> Array#find
- // 6 -> Array#findIndex
- var ctx = __webpack_require__(8)
- , IObject = __webpack_require__(31)
- , toObject = __webpack_require__(56)
- , toLength = __webpack_require__(35)
- , asc = __webpack_require__(161);
- module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
- };
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
/***/ },
-/* 161 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
- var speciesConstructor = __webpack_require__(162);
+/* 114 */
+/***/ function(module, exports) {
- module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
- };
+ module.exports = function(){ /* empty */ };
/***/ },
-/* 162 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(13)
- , isArray = __webpack_require__(43)
- , SPECIES = __webpack_require__(23)('species');
+/* 115 */
+/***/ function(module, exports) {
- module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
+ module.exports = function(done, value){
+ return {value: value, done: !!done};
};
/***/ },
-/* 163 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $map = __webpack_require__(160)(1);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */){
- return $map(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 164 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $filter = __webpack_require__(160)(2);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */){
- return $filter(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 165 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $some = __webpack_require__(160)(3);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */){
- return $some(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 166 */
+/* 116 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var $export = __webpack_require__(6)
- , $every = __webpack_require__(160)(4);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */){
- return $every(this, callbackfn, arguments[1]);
- }
- });
+ __webpack_require__(117)('Array');
/***/ },
-/* 167 */
+/* 117 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(168);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
- });
-
-/***/ },
-/* 168 */
-/***/ function(module, exports, __webpack_require__) {
+ var core = __webpack_require__(5)
+ , $ = __webpack_require__(2)
+ , DESCRIPTORS = __webpack_require__(8)
+ , SPECIES = __webpack_require__(29)('species');
- var aFunction = __webpack_require__(9)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , toLength = __webpack_require__(35);
-
- module.exports = function(that, callbackfn, aLen, memo, isRight){
- aFunction(callbackfn);
- var O = toObject(that)
- , self = IObject(O)
- , length = toLength(O.length)
- , index = isRight ? length - 1 : 0
- , i = isRight ? -1 : 1;
- if(aLen < 2)for(;;){
- if(index in self){
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if(isRight ? index < 0 : length <= index){
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
+ module.exports = function(KEY){
+ var C = core[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
};
/***/ },
-/* 169 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(168);
-
- $export($export.P + $export.F * !__webpack_require__(156)([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
- });
-
-/***/ },
-/* 170 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $indexOf = __webpack_require__(34)(false)
- , $native = [].indexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
- });
-
-/***/ },
-/* 171 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , $native = [].lastIndexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
- // convert -0 to +0
- if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
- var O = toIObject(this)
- , length = toLength(O.length)
- , index = length - 1;
- if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
- if(index < 0)index = length + index;
- for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
- return -1;
- }
- });
-
-/***/ },
-/* 172 */
+/* 118 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {copyWithin: __webpack_require__(173)});
+ $export($export.P, 'Array', {copyWithin: __webpack_require__(119)});
- __webpack_require__(174)('copyWithin');
+ __webpack_require__(114)('copyWithin');
/***/ },
-/* 173 */
+/* 119 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
+ var toObject = __webpack_require__(18)
+ , toIndex = __webpack_require__(23)
+ , toLength = __webpack_require__(24);
module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
var O = toObject(this)
, len = toLength(O.length)
, to = toIndex(target, len)
, from = toIndex(start, len)
- , end = arguments.length > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , end = $$.length > 2 ? $$[2] : undefined
, count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
, inc = 1;
if(from < to && to < from + count){
@@ -3357,50 +2549,45 @@
};
/***/ },
-/* 174 */
-/***/ function(module, exports) {
-
- module.exports = function(){ /* empty */ };
-
-/***/ },
-/* 175 */
+/* 120 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {fill: __webpack_require__(176)});
+ $export($export.P, 'Array', {fill: __webpack_require__(121)});
- __webpack_require__(174)('fill');
+ __webpack_require__(114)('fill');
/***/ },
-/* 176 */
+/* 121 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
- module.exports = function fill(value /*, start = 0, end = @length */){
+ var toObject = __webpack_require__(18)
+ , toIndex = __webpack_require__(23)
+ , toLength = __webpack_require__(24);
+ module.exports = [].fill || function fill(value /*, start = 0, end = @length */){
var O = toObject(this)
, length = toLength(O.length)
- , aLen = arguments.length
- , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
- , end = aLen > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , index = toIndex($$len > 1 ? $$[1] : undefined, length)
+ , end = $$len > 2 ? $$[2] : undefined
, endPos = end === undefined ? length : toIndex(end, length);
while(endPos > index)O[index++] = value;
return O;
};
/***/ },
-/* 177 */
+/* 122 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(160)(5)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(26)(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
@@ -3410,16 +2597,16 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(174)(KEY);
+ __webpack_require__(114)(KEY);
/***/ },
-/* 178 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(160)(6)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(26)(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
@@ -3429,139 +2616,95 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(174)(KEY);
+ __webpack_require__(114)(KEY);
/***/ },
-/* 179 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var addToUnscopables = __webpack_require__(174)
- , step = __webpack_require__(180)
- , Iterators = __webpack_require__(130)
- , toIObject = __webpack_require__(30);
-
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(129)(Array, 'Array', function(iterated, kind){
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
- this._t = undefined;
- return step(1);
- }
- if(kind == 'keys' )return step(0, index);
- if(kind == 'values')return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
-
-/***/ },
-/* 180 */
-/***/ function(module, exports) {
-
- module.exports = function(done, value){
- return {value: value, done: !!done};
- };
-
-/***/ },
-/* 181 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(182)('Array');
-
-/***/ },
-/* 182 */
+/* 124 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , dP = __webpack_require__(11)
- , DESCRIPTORS = __webpack_require__(4)
- , SPECIES = __webpack_require__(23)('species');
-
- module.exports = function(KEY){
- var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
+ var $ = __webpack_require__(2)
+ , LIBRARY = __webpack_require__(39)
+ , global = __webpack_require__(4)
+ , ctx = __webpack_require__(6)
+ , classof = __webpack_require__(110)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(13)
+ , anObject = __webpack_require__(17)
+ , aFunction = __webpack_require__(7)
+ , strictNew = __webpack_require__(125)
+ , forOf = __webpack_require__(126)
+ , setProto = __webpack_require__(45).set
+ , same = __webpack_require__(43)
+ , SPECIES = __webpack_require__(29)('species')
+ , speciesConstructor = __webpack_require__(127)
+ , asap = __webpack_require__(128)
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , empty = function(){ /* empty */ }
+ , Wrapper;
+
+ var testResolve = function(sub){
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
};
-/***/ },
-/* 183 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , ctx = __webpack_require__(8)
- , classof = __webpack_require__(152)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(13)
- , aFunction = __webpack_require__(9)
- , anInstance = __webpack_require__(184)
- , forOf = __webpack_require__(185)
- , speciesConstructor = __webpack_require__(186)
- , task = __webpack_require__(187).set
- , microtask = __webpack_require__(188)()
- , PROMISE = 'Promise'
- , TypeError = global.TypeError
- , process = global.process
- , $Promise = global[PROMISE]
- , process = global.process
- , isNode = classof(process) == 'process'
- , empty = function(){ /* empty */ }
- , Internal, GenericPromiseCapability, Wrapper;
-
- var USE_NATIVE = !!function(){
+ var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1)
- , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch(e){ /* empty */ }
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && __webpack_require__(8)){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
}();
// helpers
var sameConstructor = function(a, b){
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+ };
+ var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
- var newPromiseCapability = function(C){
- return sameConstructor($Promise, C)
- ? new PromiseCapability(C)
- : new GenericPromiseCapability(C);
- };
- var PromiseCapability = GenericPromiseCapability = function(C){
+ var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
};
var perform = function(exec){
try {
@@ -3570,32 +2713,23 @@
return {error: e};
}
};
- var notify = function(promise, isReject){
- if(promise._n)return;
- promise._n = true;
- var chain = promise._c;
- microtask(function(){
- var value = promise._v
- , ok = promise._s == 1
+ var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
- , domain = reaction.domain
, result, then;
try {
if(handler){
- if(!ok){
- if(promise._h == 2)onHandleUnhandled(promise);
- promise._h = 1;
- }
- if(handler === true)result = value;
- else {
- if(domain)domain.enter();
- result = handler(value);
- if(domain)domain.exit();
- }
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
@@ -3607,17 +2741,12 @@
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if(isReject && !promise._h)onUnhandled(promise);
- });
- };
- var onUnhandled = function(promise){
- task.call(global, function(){
- var value = promise._v
- , abrupt, handler, console;
- if(isUnhandled(promise)){
- abrupt = perform(function(){
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
@@ -3625,54 +2754,42 @@
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if(abrupt)throw abrupt.error;
+ } record.a = undefined;
+ }, 1);
});
};
var isUnhandled = function(promise){
- if(promise._h == 1)return false;
- var chain = promise._a || promise._c
- , i = 0
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
, reaction;
+ if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
- var onHandleUnhandled = function(promise){
- task.call(global, function(){
- var handler;
- if(isNode){
- process.emit('rejectionHandled', promise);
- } else if(handler = global.onrejectionhandled){
- handler({promise: promise, reason: promise._v});
- }
- });
- };
var $reject = function(value){
- var promise = this;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if(!promise._a)promise._a = promise._c.slice();
- notify(promise, true);
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
};
var $resolve = function(value){
- var promise = this
+ var record = this
, then;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
try {
- if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
- microtask(function(){
- var wrapper = {_w: promise, _d: false}; // wrap
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
@@ -3680,122 +2797,114 @@
}
});
} else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
}
} catch(e){
- $reject.call({_w: promise, _d: false}, e); // wrap
+ $reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor){
- anInstance(this, $Promise, PROMISE, '_h');
+ P = function Promise(executor){
aFunction(executor);
- Internal.call(this);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
- $reject.call(this, err);
+ $reject.call(record, err);
}
};
- Internal = function Promise(executor){
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = __webpack_require__(189)($Promise.prototype, {
+ __webpack_require__(130)(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if(this._a)this._a.push(reaction);
- if(this._s)notify(this, false);
- return reaction.promise;
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- PromiseCapability = function(){
- var promise = new Internal;
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
}
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
- __webpack_require__(22)($Promise, PROMISE);
- __webpack_require__(182)(PROMISE);
- Wrapper = __webpack_require__(7)[PROMISE];
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+ __webpack_require__(35)(P, PROMISE);
+ __webpack_require__(117)(PROMISE);
+ Wrapper = __webpack_require__(5)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
- var capability = newPromiseCapability(this)
+ var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
- $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ $export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
- var capability = newPromiseCapability(this)
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
- $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(153)(function(iter){
- $Promise.all(iter)['catch'](empty);
+ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(111)(function(iter){
+ P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, resolve = capability.resolve
- , reject = capability.reject;
+ , reject = capability.reject
+ , values = [];
var abrupt = perform(function(){
- var values = []
- , index = 0
- , remaining = 1;
- forOf(iterable, false, function(promise){
- var $index = index++
- , alreadyCalled = false;
- values.push(undefined);
- remaining++;
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
}, reject);
});
- --remaining || resolve(values);
+ else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
@@ -3808,67 +2917,129 @@
});
/***/ },
-/* 184 */
+/* 125 */
/***/ function(module, exports) {
- module.exports = function(it, Constructor, name, forbiddenField){
- if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
- throw TypeError(name + ': incorrect invocation!');
- } return it;
+ module.exports = function(it, Constructor, name){
+ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
+ return it;
};
/***/ },
-/* 185 */
+/* 126 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(8)
- , call = __webpack_require__(148)
- , isArrayIter = __webpack_require__(149)
- , anObject = __webpack_require__(12)
- , toLength = __webpack_require__(35)
- , getIterFn = __webpack_require__(151)
- , BREAK = {}
- , RETURN = {};
- var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
- var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ var ctx = __webpack_require__(6)
+ , call = __webpack_require__(107)
+ , isArrayIter = __webpack_require__(108)
+ , anObject = __webpack_require__(17)
+ , toLength = __webpack_require__(24)
+ , getIterFn = __webpack_require__(109);
+ module.exports = function(iterable, entries, fn, that){
+ var iterFn = getIterFn(iterable)
, f = ctx(fn, that, entries ? 2 : 1)
, index = 0
- , length, step, iterator, result;
+ , length, step, iterator;
if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if(result === BREAK || result === RETURN)return result;
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
} else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
- result = call(iterator, f, step.value, entries);
- if(result === BREAK || result === RETURN)return result;
+ call(iterator, f, step.value, entries);
}
};
- exports.BREAK = BREAK;
- exports.RETURN = RETURN;
/***/ },
-/* 186 */
+/* 127 */
/***/ function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
- var anObject = __webpack_require__(12)
- , aFunction = __webpack_require__(9)
- , SPECIES = __webpack_require__(23)('species');
+ var anObject = __webpack_require__(17)
+ , aFunction = __webpack_require__(7)
+ , SPECIES = __webpack_require__(29)('species');
module.exports = function(O, D){
var C = anObject(O).constructor, S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ },
-/* 187 */
+/* 128 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(8)
- , invoke = __webpack_require__(74)
- , html = __webpack_require__(46)
- , cel = __webpack_require__(15)
- , global = __webpack_require__(2)
+ var global = __webpack_require__(4)
+ , macrotask = __webpack_require__(129).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(15)(process) == 'process'
+ , head, last, notify;
+
+ var flush = function(){
+ var parent, domain, fn;
+ if(isNode && (parent = process.domain)){
+ process.domain = null;
+ parent.exit();
+ }
+ while(head){
+ domain = head.domain;
+ fn = head.fn;
+ if(domain)domain.enter();
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ if(domain)domain.exit();
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = 1
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = -toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ module.exports = function asap(fn){
+ var task = {fn: fn, next: undefined, domain: isNode && process.domain};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+
+/***/ },
+/* 129 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ctx = __webpack_require__(6)
+ , invoke = __webpack_require__(16)
+ , html = __webpack_require__(11)
+ , cel = __webpack_require__(12)
+ , global = __webpack_require__(4)
, process = global.process
, setTask = global.setImmediate
, clearTask = global.clearImmediate
@@ -3885,7 +3056,7 @@
fn();
}
};
- var listener = function(event){
+ var listner = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -3903,7 +3074,7 @@
delete queue[id];
};
// Node.js 0.8-
- if(__webpack_require__(32)(process) == 'process'){
+ if(__webpack_require__(15)(process) == 'process'){
defer = function(id){
process.nextTick(ctx(run, id, 1));
};
@@ -3911,7 +3082,7 @@
} else if(MessageChannel){
channel = new MessageChannel;
port = channel.port2;
- channel.port1.onmessage = listener;
+ channel.port1.onmessage = listner;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
@@ -3919,7 +3090,7 @@
defer = function(id){
global.postMessage(id + '', '*');
};
- global.addEventListener('message', listener, false);
+ global.addEventListener('message', listner, false);
// IE8-
} else if(ONREADYSTATECHANGE in cel('script')){
defer = function(id){
@@ -3941,99 +3112,24 @@
};
/***/ },
-/* 188 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , macrotask = __webpack_require__(187).set
- , Observer = global.MutationObserver || global.WebKitMutationObserver
- , process = global.process
- , Promise = global.Promise
- , isNode = __webpack_require__(32)(process) == 'process';
-
- module.exports = function(){
- var head, last, notify;
-
- var flush = function(){
- var parent, fn;
- if(isNode && (parent = process.domain))parent.exit();
- while(head){
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch(e){
- if(head)notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if(parent)parent.enter();
- };
-
- // Node.js
- if(isNode){
- notify = function(){
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if(Observer){
- var toggle = true
- , node = document.createTextNode('');
- new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
- notify = function(){
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if(Promise && Promise.resolve){
- var promise = Promise.resolve();
- notify = function(){
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function(){
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function(fn){
- var task = {fn: fn, next: undefined};
- if(last)last.next = task;
- if(!head){
- head = task;
- notify();
- } last = task;
- };
- };
-
-/***/ },
-/* 189 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
- var hide = __webpack_require__(10);
- module.exports = function(target, src, safe){
- for(var key in src){
- if(safe && target[key])target[key] = src[key];
- else hide(target, key, src[key]);
- } return target;
+ var redefine = __webpack_require__(33);
+ module.exports = function(target, src){
+ for(var key in src)redefine(target, key, src[key]);
+ return target;
};
/***/ },
-/* 190 */
+/* 131 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(191);
+ var strong = __webpack_require__(132);
// 23.1 Map Objects
- module.exports = __webpack_require__(192)('Map', function(get){
+ __webpack_require__(133)('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
@@ -4048,23 +3144,41 @@
}, strong, true);
/***/ },
-/* 191 */
+/* 132 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var dP = __webpack_require__(11).f
- , create = __webpack_require__(44)
- , redefineAll = __webpack_require__(189)
- , ctx = __webpack_require__(8)
- , anInstance = __webpack_require__(184)
- , defined = __webpack_require__(33)
- , forOf = __webpack_require__(185)
- , $iterDefine = __webpack_require__(129)
- , step = __webpack_require__(180)
- , setSpecies = __webpack_require__(182)
- , DESCRIPTORS = __webpack_require__(4)
- , fastKey = __webpack_require__(19).fastKey
- , SIZE = DESCRIPTORS ? '_s' : 'size';
+ var $ = __webpack_require__(2)
+ , hide = __webpack_require__(34)
+ , redefineAll = __webpack_require__(130)
+ , ctx = __webpack_require__(6)
+ , strictNew = __webpack_require__(125)
+ , defined = __webpack_require__(19)
+ , forOf = __webpack_require__(126)
+ , $iterDefine = __webpack_require__(103)
+ , step = __webpack_require__(115)
+ , ID = __webpack_require__(25)('id')
+ , $has = __webpack_require__(14)
+ , isObject = __webpack_require__(13)
+ , setSpecies = __webpack_require__(117)
+ , DESCRIPTORS = __webpack_require__(8)
+ , isExtensible = Object.isExtensible || isObject
+ , SIZE = DESCRIPTORS ? '_s' : 'size'
+ , id = 0;
+
+ var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!$has(it, ID)){
+ // can't set id to frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add id
+ if(!create)return 'E';
+ // add missing object id
+ hide(it, ID, ++id);
+ // return object id with prefix
+ } return 'O' + it[ID];
+ };
var getEntry = function(that, key){
// fast case
@@ -4079,11 +3193,11 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
+ strictNew(that, C, NAME);
+ that._i = $.create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4118,7 +3232,6 @@
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /*, that = undefined */){
- anInstance(this, C, 'forEach');
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
, entry;
while(entry = entry ? entry.n : this._f){
@@ -4133,7 +3246,7 @@
return !!getEntry(this, key);
}
});
- if(DESCRIPTORS)dP(C.prototype, 'size', {
+ if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {
get: function(){
return defined(this[SIZE]);
}
@@ -4195,23 +3308,21 @@
};
/***/ },
-/* 192 */
+/* 133 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , meta = __webpack_require__(19)
- , fails = __webpack_require__(5)
- , hide = __webpack_require__(10)
- , redefineAll = __webpack_require__(189)
- , forOf = __webpack_require__(185)
- , anInstance = __webpack_require__(184)
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , fails = __webpack_require__(9)
+ , hide = __webpack_require__(34)
+ , redefineAll = __webpack_require__(130)
+ , forOf = __webpack_require__(126)
+ , strictNew = __webpack_require__(125)
, isObject = __webpack_require__(13)
- , setToStringTag = __webpack_require__(22)
- , dP = __webpack_require__(11).f
- , each = __webpack_require__(160)(0)
- , DESCRIPTORS = __webpack_require__(4);
+ , setToStringTag = __webpack_require__(35)
+ , DESCRIPTORS = __webpack_require__(8);
module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var Base = global[NAME]
@@ -4225,23 +3336,21 @@
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
- meta.NEED = true;
} else {
C = wrapper(function(target, iterable){
- anInstance(target, C, NAME, '_c');
+ strictNew(target, C, NAME);
target._c = new Base;
if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target);
});
- each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){
+ $.each.call('add,clear,delete,forEach,get,has,set,keys,values,entries'.split(','),function(KEY){
var IS_ADDER = KEY == 'add' || KEY == 'set';
if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){
- anInstance(this, C, KEY);
if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false;
var result = this._c[KEY](a === 0 ? 0 : a, b);
return IS_ADDER ? this : result;
});
});
- if('size' in proto)dP(C.prototype, 'size', {
+ if('size' in proto)$.setDesc(C.prototype, 'size', {
get: function(){
return this._c.size;
}
@@ -4259,14 +3368,14 @@
};
/***/ },
-/* 193 */
+/* 134 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(191);
+ var strong = __webpack_require__(132);
// 23.2 Set Objects
- module.exports = __webpack_require__(192)('Set', function(get){
+ __webpack_require__(133)('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
@@ -4276,59 +3385,46 @@
}, strong);
/***/ },
-/* 194 */
+/* 135 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var each = __webpack_require__(160)(0)
- , redefine = __webpack_require__(18)
- , meta = __webpack_require__(19)
- , assign = __webpack_require__(67)
- , weak = __webpack_require__(195)
+ var $ = __webpack_require__(2)
+ , redefine = __webpack_require__(33)
+ , weak = __webpack_require__(136)
, isObject = __webpack_require__(13)
- , getWeak = meta.getWeak
- , isExtensible = Object.isExtensible
- , uncaughtFrozenStore = weak.ufstore
- , tmp = {}
- , InternalMap;
-
- var wrapper = function(get){
- return function WeakMap(){
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
- };
+ , has = __webpack_require__(14)
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
- var methods = {
+ // 23.3 WeakMap Objects
+ var $WeakMap = __webpack_require__(133)('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).get(key);
- return data ? data[this._i] : undefined;
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
- };
-
- // 23.3 WeakMap Objects
- var $WeakMap = module.exports = __webpack_require__(192)('WeakMap', wrapper, methods, weak, true, true);
+ }, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
- InternalMap = weak.getConstructor(wrapper);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function(key){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
- // store frozen objects on internal weakmap shim
+ // store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
- if(!this._f)this._f = new InternalMap;
- var result = this._f[key](a, b);
+ var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
@@ -4337,44 +3433,46 @@
}
/***/ },
-/* 195 */
+/* 136 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var redefineAll = __webpack_require__(189)
- , getWeak = __webpack_require__(19).getWeak
- , anObject = __webpack_require__(12)
+ var hide = __webpack_require__(34)
+ , redefineAll = __webpack_require__(130)
+ , anObject = __webpack_require__(17)
, isObject = __webpack_require__(13)
- , anInstance = __webpack_require__(184)
- , forOf = __webpack_require__(185)
- , createArrayMethod = __webpack_require__(160)
- , $has = __webpack_require__(3)
+ , strictNew = __webpack_require__(125)
+ , forOf = __webpack_require__(126)
+ , createArrayMethod = __webpack_require__(26)
+ , $has = __webpack_require__(14)
+ , WEAK = __webpack_require__(25)('weak')
+ , isExtensible = Object.isExtensible || isObject
, arrayFind = createArrayMethod(5)
, arrayFindIndex = createArrayMethod(6)
, id = 0;
- // fallback for uncaught frozen keys
- var uncaughtFrozenStore = function(that){
- return that._l || (that._l = new UncaughtFrozenStore);
+ // fallback for frozen keys
+ var frozenStore = function(that){
+ return that._l || (that._l = new FrozenStore);
};
- var UncaughtFrozenStore = function(){
+ var FrozenStore = function(){
this.a = [];
};
- var findUncaughtFrozen = function(store, key){
+ var findFrozen = function(store, key){
return arrayFind(store.a, function(it){
return it[0] === key;
});
};
- UncaughtFrozenStore.prototype = {
+ FrozenStore.prototype = {
get: function(key){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)return entry[1];
},
has: function(key){
- return !!findUncaughtFrozen(this, key);
+ return !!findFrozen(this, key);
},
set: function(key, value){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)entry[1] = value;
else this.a.push([key, value]);
},
@@ -4390,9 +3488,9 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
+ strictNew(that, C, NAME);
that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
+ that._l = undefined; // leak store for frozen objects
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4400,39 +3498,40 @@
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this)['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
+ if(!isExtensible(key))return frozenStore(this)['delete'](key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).has(key);
- return data && $has(data, this._i);
+ if(!isExtensible(key))return frozenStore(this).has(key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i);
}
});
return C;
},
def: function(that, key, value){
- var data = getWeak(anObject(key), true);
- if(data === true)uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
+ if(!isExtensible(anObject(key))){
+ frozenStore(that).set(key, value);
+ } else {
+ $has(key, WEAK) || hide(key, WEAK, {});
+ key[WEAK][that._i] = value;
+ } return that;
},
- ufstore: uncaughtFrozenStore
+ frozenStore: frozenStore,
+ WEAK: WEAK
};
/***/ },
-/* 196 */
+/* 137 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var weak = __webpack_require__(195);
+ var weak = __webpack_require__(136);
// 23.4 WeakSet Objects
- __webpack_require__(192)('WeakSet', function(get){
+ __webpack_require__(133)('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
@@ -4442,56 +3541,42 @@
}, weak, false, true);
/***/ },
-/* 197 */
+/* 138 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(9)
- , anObject = __webpack_require__(12)
- , rApply = (__webpack_require__(2).Reflect || {}).apply
- , fApply = Function.apply;
- // MS Edge argumentsList argument is optional
- $export($export.S + $export.F * !__webpack_require__(5)(function(){
- rApply(function(){});
- }), 'Reflect', {
+ var $export = __webpack_require__(3)
+ , _apply = Function.apply
+ , anObject = __webpack_require__(17);
+
+ $export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
- var T = aFunction(target)
- , L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ return _apply.call(target, thisArgument, anObject(argumentsList));
}
});
/***/ },
-/* 198 */
+/* 139 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
- var $export = __webpack_require__(6)
- , create = __webpack_require__(44)
- , aFunction = __webpack_require__(9)
- , anObject = __webpack_require__(12)
- , isObject = __webpack_require__(13)
- , fails = __webpack_require__(5)
- , bind = __webpack_require__(73)
- , rConstruct = (__webpack_require__(2).Reflect || {}).construct;
-
- // MS Edge supports only 2 arguments and argumentsList argument is optional
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , aFunction = __webpack_require__(7)
+ , anObject = __webpack_require__(17)
+ , isObject = __webpack_require__(13)
+ , bind = Function.bind || __webpack_require__(5).Function.prototype.bind;
+
+ // MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
- var NEW_TARGET_BUG = fails(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
- return !(rConstruct(function(){}, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function(){
- rConstruct(function(){});
- });
-
- $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+ }), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
switch(args.length){
@@ -4508,32 +3593,29 @@
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
- , instance = create(isObject(proto) ? proto : Object.prototype)
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ },
-/* 199 */
+/* 140 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
- var dP = __webpack_require__(11)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(12)
- , toPrimitive = __webpack_require__(16);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(17);
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
- $export($export.S + $export.F * __webpack_require__(5)(function(){
- Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
try {
- dP.f(target, propertyKey, attributes);
+ $.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
@@ -4542,29 +3624,29 @@
});
/***/ },
-/* 200 */
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
- var $export = __webpack_require__(6)
- , gOPD = __webpack_require__(49).f
- , anObject = __webpack_require__(12);
+ var $export = __webpack_require__(3)
+ , getDesc = __webpack_require__(2).getDesc
+ , anObject = __webpack_require__(17);
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
- var desc = gOPD(anObject(target), propertyKey);
+ var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ },
-/* 201 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 26.1.5 Reflect.enumerate(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(12);
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(17);
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
@@ -4572,7 +3654,7 @@
, key;
for(key in iterated)keys.push(key);
};
- __webpack_require__(131)(Enumerate, 'Object', function(){
+ __webpack_require__(105)(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
@@ -4589,54 +3671,53 @@
});
/***/ },
-/* 202 */
+/* 143 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
- var gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(13)
- , anObject = __webpack_require__(12);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(14)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(13)
+ , anObject = __webpack_require__(17);
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
- if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
- if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get});
/***/ },
-/* 203 */
+/* 144 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
- var gOPD = __webpack_require__(49)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(12);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(17);
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
- return gOPD.f(anObject(target), propertyKey);
+ return $.getDesc(anObject(target), propertyKey);
}
});
/***/ },
-/* 204 */
+/* 145 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
- var $export = __webpack_require__(6)
- , getProto = __webpack_require__(57)
- , anObject = __webpack_require__(12);
+ var $export = __webpack_require__(3)
+ , getProto = __webpack_require__(2).getProto
+ , anObject = __webpack_require__(17);
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
@@ -4645,11 +3726,11 @@
});
/***/ },
-/* 205 */
+/* 146 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
@@ -4658,12 +3739,12 @@
});
/***/ },
-/* 206 */
+/* 147 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(12)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(17)
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
@@ -4674,36 +3755,35 @@
});
/***/ },
-/* 207 */
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Reflect', {ownKeys: __webpack_require__(208)});
+ $export($export.S, 'Reflect', {ownKeys: __webpack_require__(149)});
/***/ },
-/* 208 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
- var gOPN = __webpack_require__(48)
- , gOPS = __webpack_require__(41)
- , anObject = __webpack_require__(12)
- , Reflect = __webpack_require__(2).Reflect;
+ var $ = __webpack_require__(2)
+ , anObject = __webpack_require__(17)
+ , Reflect = __webpack_require__(4).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
- var keys = gOPN.f(anObject(it))
- , getSymbols = gOPS.f;
+ var keys = $.getNames(anObject(it))
+ , getSymbols = $.getSymbols;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ },
-/* 209 */
+/* 150 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(12)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(17)
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
@@ -4719,34 +3799,32 @@
});
/***/ },
-/* 210 */
+/* 151 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
- var dP = __webpack_require__(11)
- , gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , createDesc = __webpack_require__(17)
- , anObject = __webpack_require__(12)
- , isObject = __webpack_require__(13);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(14)
+ , $export = __webpack_require__(3)
+ , createDesc = __webpack_require__(10)
+ , anObject = __webpack_require__(17)
+ , isObject = __webpack_require__(13);
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
- , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
- if(isObject(proto = getPrototypeOf(target))){
+ if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ $.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
@@ -4755,12 +3833,12 @@
$export($export.S, 'Reflect', {set: set});
/***/ },
-/* 211 */
+/* 152 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
- var $export = __webpack_require__(6)
- , setProto = __webpack_require__(71);
+ var $export = __webpack_require__(3)
+ , setProto = __webpack_require__(45);
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
@@ -4775,1034 +3853,30 @@
});
/***/ },
-/* 212 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 20.3.3.1 / 15.9.4.4 Date.now()
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
-
-/***/ },
-/* 213 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(16);
-
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
- }), 'Date', {
- toJSON: function toJSON(key){
- var O = toObject(this)
- , pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
- });
-
-/***/ },
-/* 214 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , getTime = Date.prototype.getTime;
-
- var lz = function(num){
- return num > 9 ? num : '0' + num;
- };
-
- // PhantomJS / old WebKit has a broken implementations
- $export($export.P + $export.F * (fails(function(){
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
- }) || !fails(function(){
- new Date(NaN).toISOString();
- })), 'Date', {
- toISOString: function toISOString(){
- if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
- var d = this
- , y = d.getUTCFullYear()
- , m = d.getUTCMilliseconds()
- , s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }
- });
-
-/***/ },
-/* 215 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $typed = __webpack_require__(216)
- , buffer = __webpack_require__(217)
- , anObject = __webpack_require__(12)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , isObject = __webpack_require__(13)
- , ArrayBuffer = __webpack_require__(2).ArrayBuffer
- , speciesConstructor = __webpack_require__(186)
- , $ArrayBuffer = buffer.ArrayBuffer
- , $DataView = buffer.DataView
- , $isView = $typed.ABV && ArrayBuffer.isView
- , $slice = $ArrayBuffer.prototype.slice
- , VIEW = $typed.VIEW
- , ARRAY_BUFFER = 'ArrayBuffer';
-
- $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
-
- $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it){
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
- });
-
- $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
- }), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end){
- if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength
- , first = toIndex(start, len)
- , final = toIndex(end === undefined ? len : end, len)
- , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
- , viewS = new $DataView(this)
- , viewT = new $DataView(result)
- , index = 0;
- while(first < final){
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
- });
-
- __webpack_require__(182)(ARRAY_BUFFER);
-
-/***/ },
-/* 216 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , hide = __webpack_require__(10)
- , uid = __webpack_require__(20)
- , TYPED = uid('typed_array')
- , VIEW = uid('view')
- , ABV = !!(global.ArrayBuffer && global.DataView)
- , CONSTR = ABV
- , i = 0, l = 9, Typed;
-
- var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
- ).split(',');
-
- while(i < l){
- if(Typed = global[TypedArrayConstructors[i++]]){
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
- }
-
- module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
- };
-
-/***/ },
-/* 217 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var global = __webpack_require__(2)
- , DESCRIPTORS = __webpack_require__(4)
- , LIBRARY = __webpack_require__(26)
- , $typed = __webpack_require__(216)
- , hide = __webpack_require__(10)
- , redefineAll = __webpack_require__(189)
- , fails = __webpack_require__(5)
- , anInstance = __webpack_require__(184)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , gOPN = __webpack_require__(48).f
- , dP = __webpack_require__(11).f
- , arrayFill = __webpack_require__(176)
- , setToStringTag = __webpack_require__(22)
- , ARRAY_BUFFER = 'ArrayBuffer'
- , DATA_VIEW = 'DataView'
- , PROTOTYPE = 'prototype'
- , WRONG_LENGTH = 'Wrong length!'
- , WRONG_INDEX = 'Wrong index!'
- , $ArrayBuffer = global[ARRAY_BUFFER]
- , $DataView = global[DATA_VIEW]
- , Math = global.Math
- , RangeError = global.RangeError
- , Infinity = global.Infinity
- , BaseBuffer = $ArrayBuffer
- , abs = Math.abs
- , pow = Math.pow
- , floor = Math.floor
- , log = Math.log
- , LN2 = Math.LN2
- , BUFFER = 'buffer'
- , BYTE_LENGTH = 'byteLength'
- , BYTE_OFFSET = 'byteOffset'
- , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
- , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
- , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
- // IEEE754 conversions based on https://github.com/feross/ieee754
- var packIEEE754 = function(value, mLen, nBytes){
- var buffer = Array(nBytes)
- , eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
- , i = 0
- , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
- , e, m, c;
- value = abs(value)
- if(value != value || value === Infinity){
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if(value * (c = pow(2, -e)) < 1){
- e--;
- c *= 2;
- }
- if(e + eBias >= 1){
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if(value * c >= 2){
- e++;
- c /= 2;
- }
- if(e + eBias >= eMax){
- m = 0;
- e = eMax;
- } else if(e + eBias >= 1){
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
- };
- var unpackIEEE754 = function(buffer, mLen, nBytes){
- var eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , nBits = eLen - 7
- , i = nBytes - 1
- , s = buffer[i--]
- , e = s & 127
- , m;
- s >>= 7;
- for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if(e === 0){
- e = 1 - eBias;
- } else if(e === eMax){
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
- };
-
- var unpackI32 = function(bytes){
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
- };
- var packI8 = function(it){
- return [it & 0xff];
- };
- var packI16 = function(it){
- return [it & 0xff, it >> 8 & 0xff];
- };
- var packI32 = function(it){
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
- };
- var packF64 = function(it){
- return packIEEE754(it, 52, 8);
- };
- var packF32 = function(it){
- return packIEEE754(it, 23, 4);
- };
-
- var addGetter = function(C, key, internal){
- dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
- };
-
- var get = function(view, bytes, index, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
- };
- var set = function(view, bytes, index, conversion, value, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = conversion(+value);
- for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
- };
-
- var validateArrayBufferArguments = function(that, length){
- anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
- var numberLength = +length
- , byteLength = toLength(numberLength);
- if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
- return byteLength;
- };
-
- if(!$typed.ABV){
- $ArrayBuffer = function ArrayBuffer(length){
- var byteLength = validateArrayBufferArguments(this, length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength){
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH]
- , offset = toInteger(byteOffset);
- if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if(DESCRIPTORS){
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset){
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset){
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
- } else {
- if(!fails(function(){
- new $ArrayBuffer; // eslint-disable-line no-new
- }) || !fails(function(){
- new $ArrayBuffer(.5); // eslint-disable-line no-new
- })){
- $ArrayBuffer = function ArrayBuffer(length){
- return new BaseBuffer(validateArrayBufferArguments(this, length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
- if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
- };
- if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2))
- , $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
- }
- setToStringTag($ArrayBuffer, ARRAY_BUFFER);
- setToStringTag($DataView, DATA_VIEW);
- hide($DataView[PROTOTYPE], $typed.VIEW, true);
- exports[ARRAY_BUFFER] = $ArrayBuffer;
- exports[DATA_VIEW] = $DataView;
-
-/***/ },
-/* 218 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- $export($export.G + $export.W + $export.F * !__webpack_require__(216).ABV, {
- DataView: __webpack_require__(217).DataView
- });
-
-/***/ },
-/* 219 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Int8', 1, function(init){
- return function Int8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 220 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- if(__webpack_require__(4)){
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , fails = __webpack_require__(5)
- , $export = __webpack_require__(6)
- , $typed = __webpack_require__(216)
- , $buffer = __webpack_require__(217)
- , ctx = __webpack_require__(8)
- , anInstance = __webpack_require__(184)
- , propertyDesc = __webpack_require__(17)
- , hide = __webpack_require__(10)
- , redefineAll = __webpack_require__(189)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37)
- , toPrimitive = __webpack_require__(16)
- , has = __webpack_require__(3)
- , same = __webpack_require__(69)
- , classof = __webpack_require__(152)
- , isObject = __webpack_require__(13)
- , toObject = __webpack_require__(56)
- , isArrayIter = __webpack_require__(149)
- , create = __webpack_require__(44)
- , getPrototypeOf = __webpack_require__(57)
- , gOPN = __webpack_require__(48).f
- , getIterFn = __webpack_require__(151)
- , uid = __webpack_require__(20)
- , wks = __webpack_require__(23)
- , createArrayMethod = __webpack_require__(160)
- , createArrayIncludes = __webpack_require__(34)
- , speciesConstructor = __webpack_require__(186)
- , ArrayIterators = __webpack_require__(179)
- , Iterators = __webpack_require__(130)
- , $iterDetect = __webpack_require__(153)
- , setSpecies = __webpack_require__(182)
- , arrayFill = __webpack_require__(176)
- , arrayCopyWithin = __webpack_require__(173)
- , $DP = __webpack_require__(11)
- , $GOPD = __webpack_require__(49)
- , dP = $DP.f
- , gOPD = $GOPD.f
- , RangeError = global.RangeError
- , TypeError = global.TypeError
- , Uint8Array = global.Uint8Array
- , ARRAY_BUFFER = 'ArrayBuffer'
- , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
- , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
- , PROTOTYPE = 'prototype'
- , ArrayProto = Array[PROTOTYPE]
- , $ArrayBuffer = $buffer.ArrayBuffer
- , $DataView = $buffer.DataView
- , arrayForEach = createArrayMethod(0)
- , arrayFilter = createArrayMethod(2)
- , arraySome = createArrayMethod(3)
- , arrayEvery = createArrayMethod(4)
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , arrayIncludes = createArrayIncludes(true)
- , arrayIndexOf = createArrayIncludes(false)
- , arrayValues = ArrayIterators.values
- , arrayKeys = ArrayIterators.keys
- , arrayEntries = ArrayIterators.entries
- , arrayLastIndexOf = ArrayProto.lastIndexOf
- , arrayReduce = ArrayProto.reduce
- , arrayReduceRight = ArrayProto.reduceRight
- , arrayJoin = ArrayProto.join
- , arraySort = ArrayProto.sort
- , arraySlice = ArrayProto.slice
- , arrayToString = ArrayProto.toString
- , arrayToLocaleString = ArrayProto.toLocaleString
- , ITERATOR = wks('iterator')
- , TAG = wks('toStringTag')
- , TYPED_CONSTRUCTOR = uid('typed_constructor')
- , DEF_CONSTRUCTOR = uid('def_constructor')
- , ALL_CONSTRUCTORS = $typed.CONSTR
- , TYPED_ARRAY = $typed.TYPED
- , VIEW = $typed.VIEW
- , WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function(O, length){
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function(){
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
- new Uint8Array(1).set({});
- });
-
- var strictToLength = function(it, SAME){
- if(it === undefined)throw TypeError(WRONG_LENGTH);
- var number = +it
- , length = toLength(it);
- if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
- return length;
- };
-
- var toOffset = function(it, BYTES){
- var offset = toInteger(it);
- if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function(it){
- if(isObject(it) && TYPED_ARRAY in it)return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function(C, length){
- if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function(O, list){
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function(C, list){
- var index = 0
- , length = list.length
- , result = allocate(C, length);
- while(length > index)result[index] = list[index++];
- return result;
- };
-
- var addGetter = function(it, key, internal){
- dP(it, key, {get: function(){ return this._d[internal]; }});
- };
-
- var $from = function from(source /*, mapfn, thisArg */){
- var O = toObject(source)
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , iterFn = getIterFn(O)
- , i, length, values, result, step, iterator;
- if(iterFn != undefined && !isArrayIter(iterFn)){
- for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
- values.push(step.value);
- } O = values;
- }
- if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
- for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/*...items*/){
- var index = 0
- , length = arguments.length
- , result = allocate(this, length);
- while(length > index)result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString(){
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /*, end */){
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /*, thisArg */){
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /*, thisArg */){
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /*, thisArg */){
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /*, thisArg */){
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /*, thisArg */){
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /*, fromIndex */){
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /*, fromIndex */){
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator){ // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /*, thisArg */){
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse(){
- var that = this
- , length = validate(that).length
- , middle = Math.floor(length / 2)
- , index = 0
- , value;
- while(index < middle){
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /*, thisArg */){
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn){
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end){
- var O = validate(this)
- , length = O.length
- , $begin = toIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end){
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /*, offset */){
- validate(this);
- var offset = toOffset(arguments[1], 1)
- , length = this.length
- , src = toObject(arrayLike)
- , len = toLength(src.length)
- , index = 0;
- if(len + offset > length)throw RangeError(WRONG_LENGTH);
- while(index < len)this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries(){
- return arrayEntries.call(validate(this));
- },
- keys: function keys(){
- return arrayKeys.call(validate(this));
- },
- values: function values(){
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function(target, key){
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key){
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc){
- if(isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ){
- target[key] = desc.value;
- return target;
- } else return dP(target, key, desc);
- };
-
- if(!ALL_CONSTRUCTORS){
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if(fails(function(){ arrayToString.call({}); })){
- arrayToString = arrayToLocaleString = function toString(){
- return arrayJoin.call(this);
- }
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function(){ /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function(){ return this[TYPED_ARRAY]; }
- });
-
- module.exports = function(KEY, BYTES, wrapper, CLAMPED){
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
- , ISNT_UINT8 = NAME != 'Uint8Array'
- , GETTER = 'get' + KEY
- , SETTER = 'set' + KEY
- , TypedArray = global[NAME]
- , Base = TypedArray || {}
- , TAC = TypedArray && getPrototypeOf(TypedArray)
- , FORCED = !TypedArray || !$typed.ABV
- , O = {}
- , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function(that, index){
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function(that, index, value){
- var data = that._d;
- if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function(that, index){
- dP(that, index, {
- get: function(){
- return getter(this, index);
- },
- set: function(value){
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if(FORCED){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0
- , offset = 0
- , buffer, byteLength, length, klass;
- if(!isObject(data)){
- length = strictToLength(data, true)
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if($length === undefined){
- if($len % BYTES)throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if(byteLength < 0)throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if(TYPED_ARRAY in data){
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while(index < length)addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if(!$iterDetect(function(iter){
- // V8 works with iterators, but fails in many other cases
- // https://code.google.com/p/v8/issues/detail?id=4552
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
- if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if(TYPED_ARRAY in data)return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
- if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR]
- , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
- , $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
- dP(TypedArrayPrototype, TAG, {
- get: function(){ return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES,
- from: $from,
- of: $of
- });
-
- if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
-
- $export($export.P + $export.F * fails(function(){
- new TypedArray(1).slice();
- }), NAME, {slice: $slice});
-
- $export($export.P + $export.F * (fails(function(){
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
- }) || !fails(function(){
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, {toLocaleString: $toLocaleString});
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
- } else module.exports = function(){ /* empty */ };
-
-/***/ },
-/* 221 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Uint8', 1, function(init){
- return function Uint8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 222 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Uint8', 1, function(init){
- return function Uint8ClampedArray(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- }, true);
-
-/***/ },
-/* 223 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Int16', 2, function(init){
- return function Int16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 224 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Uint16', 2, function(init){
- return function Uint16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 225 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Int32', 4, function(init){
- return function Int32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 226 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Uint32', 4, function(init){
- return function Uint32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 227 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Float32', 4, function(init){
- return function Float32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 228 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(220)('Float64', 8, function(init){
- return function Float64Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 229 */
+/* 153 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/Array.prototype.includes
- var $export = __webpack_require__(6)
- , $includes = __webpack_require__(34)(true);
+ var $export = __webpack_require__(3)
+ , $includes = __webpack_require__(31)(true);
$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(174)('includes');
+ __webpack_require__(114)('includes');
/***/ },
-/* 230 */
+/* 154 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(120)(true);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(93)(true);
$export($export.P, 'String', {
at: function at(pos){
@@ -5811,177 +3885,138 @@
});
/***/ },
-/* 231 */
+/* 155 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(232);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(156);
$export($export.P, 'String', {
- padStart: function padStart(maxLength /*, fillString = ' ' */){
+ padLeft: function padLeft(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ },
-/* 232 */
+/* 156 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-string-pad-start-end
- var toLength = __webpack_require__(35)
- , repeat = __webpack_require__(78)
- , defined = __webpack_require__(33);
+ // https://github.com/ljharb/proposal-string-pad-left-right
+ var toLength = __webpack_require__(24)
+ , repeat = __webpack_require__(100)
+ , defined = __webpack_require__(19);
module.exports = function(that, maxLength, fillString, left){
var S = String(defined(that))
, stringLength = S.length
, fillStr = fillString === undefined ? ' ' : String(fillString)
, intMaxLength = toLength(maxLength);
- if(intMaxLength <= stringLength || fillStr == '')return S;
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
var fillLen = intMaxLength - stringLength
, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
-
/***/ },
-/* 233 */
+/* 157 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(232);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(156);
$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ padRight: function padRight(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ },
-/* 234 */
+/* 158 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(90)('trimLeft', function($trim){
+ __webpack_require__(91)('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
- }, 'trimStart');
+ });
/***/ },
-/* 235 */
+/* 159 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(90)('trimRight', function($trim){
+ __webpack_require__(91)('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
- }, 'trimEnd');
-
-/***/ },
-/* 236 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // https://tc39.github.io/String.prototype.matchAll/
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , toLength = __webpack_require__(35)
- , isRegExp = __webpack_require__(123)
- , getFlags = __webpack_require__(237)
- , RegExpProto = RegExp.prototype;
-
- var $RegExpStringIterator = function(regexp, string){
- this._r = regexp;
- this._s = string;
- };
-
- __webpack_require__(131)($RegExpStringIterator, 'RegExp String', function next(){
- var match = this._r.exec(this._s);
- return {value: match, done: match === null};
- });
-
- $export($export.P, 'String', {
- matchAll: function matchAll(regexp){
- defined(this);
- if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
- var S = String(this)
- , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
- , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
});
/***/ },
-/* 237 */
+/* 160 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- // 21.2.5.3 get RegExp.prototype.flags
- var anObject = __webpack_require__(12);
- module.exports = function(){
- var that = anObject(this)
- , result = '';
- if(that.global) result += 'g';
- if(that.ignoreCase) result += 'i';
- if(that.multiline) result += 'm';
- if(that.unicode) result += 'u';
- if(that.sticky) result += 'y';
- return result;
- };
+ // https://github.com/benjamingr/RexExp.escape
+ var $export = __webpack_require__(3)
+ , $re = __webpack_require__(161)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-/***/ },
-/* 238 */
-/***/ function(module, exports, __webpack_require__) {
+ $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
- __webpack_require__(25)('asyncIterator');
/***/ },
-/* 239 */
-/***/ function(module, exports, __webpack_require__) {
+/* 161 */
+/***/ function(module, exports) {
- __webpack_require__(25)('observable');
+ module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+ };
/***/ },
-/* 240 */
+/* 162 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-getownpropertydescriptors
- var $export = __webpack_require__(6)
- , ownKeys = __webpack_require__(208)
- , toIObject = __webpack_require__(30)
- , gOPD = __webpack_require__(49)
- , createProperty = __webpack_require__(150);
+ // https://gist.github.com/WebReflection/9353781
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , ownKeys = __webpack_require__(149)
+ , toIObject = __webpack_require__(20)
+ , createDesc = __webpack_require__(10);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
- , getDesc = gOPD.f
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
- while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
- return result;
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
}
});
/***/ },
-/* 241 */
+/* 163 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $values = __webpack_require__(242)(false);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $values = __webpack_require__(164)(false);
$export($export.S, 'Object', {
values: function values(it){
@@ -5990,16 +4025,16 @@
});
/***/ },
-/* 242 */
+/* 164 */
/***/ function(module, exports, __webpack_require__) {
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30)
- , isEnum = __webpack_require__(42).f;
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(20)
+ , isEnum = $.isEnum;
module.exports = function(isEntries){
return function(it){
var O = toIObject(it)
- , keys = getKeys(O)
+ , keys = $.getKeys(O)
, length = keys.length
, i = 0
, result = []
@@ -6011,12 +4046,12 @@
};
/***/ },
-/* 243 */
+/* 165 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $entries = __webpack_require__(242)(true);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $entries = __webpack_require__(164)(true);
$export($export.S, 'Object', {
entries: function entries(it){
@@ -6025,715 +4060,67 @@
});
/***/ },
-/* 244 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(9)
- , $defineProperty = __webpack_require__(11);
-
- // B.2.2.2 Object.prototype.__defineGetter__(P, getter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter){
- $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 245 */
-/***/ function(module, exports, __webpack_require__) {
-
- // Forced replacement prototype accessors methods
- module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){
- var K = Math.random();
- // In FF throws only define methods
- __defineSetter__.call(null, K, function(){ /* empty */});
- delete __webpack_require__(2)[K];
- });
-
-/***/ },
-/* 246 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(9)
- , $defineProperty = __webpack_require__(11);
-
- // B.2.2.3 Object.prototype.__defineSetter__(P, setter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter){
- $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 247 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(16)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.4 Object.prototype.__lookupGetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', {
- __lookupGetter__: function __lookupGetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.get;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 248 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(16)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.5 Object.prototype.__lookupSetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', {
- __lookupSetter__: function __lookupSetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.set;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 249 */
+/* 166 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(250)('Map')});
+ $export($export.P, 'Map', {toJSON: __webpack_require__(167)('Map')});
/***/ },
-/* 250 */
+/* 167 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var classof = __webpack_require__(152)
- , from = __webpack_require__(251);
+ var forOf = __webpack_require__(126)
+ , classof = __webpack_require__(110);
module.exports = function(NAME){
return function toJSON(){
if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
+ var arr = [];
+ forOf(this, false, arr.push, arr);
+ return arr;
};
};
/***/ },
-/* 251 */
-/***/ function(module, exports, __webpack_require__) {
-
- var forOf = __webpack_require__(185);
-
- module.exports = function(iter, ITERATOR){
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
- };
-
-
-/***/ },
-/* 252 */
+/* 168 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
-
- $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(250)('Set')});
+ var $export = __webpack_require__(3);
-/***/ },
-/* 253 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-global
- var $export = __webpack_require__(6);
-
- $export($export.S, 'System', {global: __webpack_require__(2)});
+ $export($export.P, 'Set', {toJSON: __webpack_require__(167)('Set')});
/***/ },
-/* 254 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-is-error
- var $export = __webpack_require__(6)
- , cof = __webpack_require__(32);
-
- $export($export.S, 'Error', {
- isError: function isError(it){
- return cof(it) === 'Error';
- }
- });
-
-/***/ },
-/* 255 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 256 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 257 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- imulh: function imulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >> 16
- , v1 = $v >> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
- });
-
-/***/ },
-/* 258 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- umulh: function umulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >>> 16
- , v1 = $v >>> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
- });
-
-/***/ },
-/* 259 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
- }});
-
-/***/ },
-/* 260 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Map = __webpack_require__(190)
- , $export = __webpack_require__(6)
- , shared = __webpack_require__(21)('metadata')
- , store = shared.store || (shared.store = new (__webpack_require__(194)));
-
- var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
- };
- var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
- };
- var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
- };
- var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
- };
- var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
- };
- var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
- };
- var exp = function(O){
- $export($export.S, 'Reflect', O);
- };
-
- module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
- };
-
-/***/ },
-/* 261 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , toMetaKey = metadata.key
- , getOrCreateMetadataMap = metadata.map
- , store = metadata.store;
-
- metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
- , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
- if(metadataMap.size)return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
- }});
-
-/***/ },
-/* 262 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- var ordinaryGetMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
- };
-
- metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 263 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Set = __webpack_require__(193)
- , from = __webpack_require__(251)
- , metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- var ordinaryMetadataKeys = function(O, P){
- var oKeys = ordinaryOwnMetadataKeys(O, P)
- , parent = getPrototypeOf(O);
- if(parent === null)return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
- };
-
- metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 264 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 265 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 266 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
- var ordinaryHasMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
- };
-
- metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 267 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
- metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 268 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(260)
- , anObject = __webpack_require__(12)
- , aFunction = __webpack_require__(9)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({metadata: function metadata(metadataKey, metadataValue){
- return function decorator(target, targetKey){
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
- }});
-
-/***/ },
-/* 269 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
- var $export = __webpack_require__(6)
- , microtask = __webpack_require__(188)()
- , process = __webpack_require__(2).process
- , isNode = __webpack_require__(32)(process) == 'process';
-
- $export($export.G, {
- asap: function asap(fn){
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
- });
-
-/***/ },
-/* 270 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // https://github.com/zenparsing/es-observable
- var $export = __webpack_require__(6)
- , global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , microtask = __webpack_require__(188)()
- , OBSERVABLE = __webpack_require__(23)('observable')
- , aFunction = __webpack_require__(9)
- , anObject = __webpack_require__(12)
- , anInstance = __webpack_require__(184)
- , redefineAll = __webpack_require__(189)
- , hide = __webpack_require__(10)
- , forOf = __webpack_require__(185)
- , RETURN = forOf.RETURN;
-
- var getMethod = function(fn){
- return fn == null ? undefined : aFunction(fn);
- };
-
- var cleanupSubscription = function(subscription){
- var cleanup = subscription._c;
- if(cleanup){
- subscription._c = undefined;
- cleanup();
- }
- };
-
- var subscriptionClosed = function(subscription){
- return subscription._o === undefined;
- };
-
- var closeSubscription = function(subscription){
- if(!subscriptionClosed(subscription)){
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
- };
-
- var Subscription = function(observer, subscriber){
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer)
- , subscription = cleanup;
- if(cleanup != null){
- if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch(e){
- observer.error(e);
- return;
- } if(subscriptionClosed(this))cleanupSubscription(this);
- };
-
- Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe(){ closeSubscription(this); }
- });
-
- var SubscriptionObserver = function(subscription){
- this._s = subscription;
- };
-
- SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if(m)return m.call(observer, value);
- } catch(e){
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value){
- var subscription = this._s;
- if(subscriptionClosed(subscription))throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if(!m)throw value;
- value = m.call(observer, value);
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
- });
-
- var $Observable = function Observable(subscriber){
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
- };
-
- redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer){
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn){
- var that = this;
- return new (core.Promise || global.Promise)(function(resolve, reject){
- aFunction(fn);
- var subscription = that.subscribe({
- next : function(value){
- try {
- return fn(value);
- } catch(e){
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
- });
-
- redefineAll($Observable, {
- from: function from(x){
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if(method){
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function(observer){
- return observable.subscribe(observer);
- });
- }
- return new C(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- try {
- if(forOf(x, false, function(it){
- observer.next(it);
- if(done)return RETURN;
- }) === RETURN)return;
- } catch(e){
- if(done)throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- },
- of: function of(){
- for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- for(var i = 0; i < items.length; ++i){
- observer.next(items[i]);
- if(done)return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- }
- });
-
- hide($Observable.prototype, OBSERVABLE, function(){ return this; });
-
- $export($export.G, {Observable: $Observable});
-
- __webpack_require__(182)('Observable');
-
-/***/ },
-/* 271 */
+/* 169 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $task = __webpack_require__(187);
+ var $export = __webpack_require__(3)
+ , $task = __webpack_require__(129);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ },
-/* 272 */
+/* 170 */
/***/ function(module, exports, __webpack_require__) {
- __webpack_require__(179);
- var global = __webpack_require__(2)
- , hide = __webpack_require__(10)
- , Iterators = __webpack_require__(130)
- , TO_STRING_TAG = __webpack_require__(23)('toStringTag');
-
- for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype;
- if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = Iterators.Array;
- }
+ __webpack_require__(113);
+ var Iterators = __webpack_require__(104);
+ Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
/***/ },
-/* 273 */
+/* 171 */
/***/ function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , invoke = __webpack_require__(74)
- , partial = __webpack_require__(274)
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , invoke = __webpack_require__(16)
+ , partial = __webpack_require__(172)
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
@@ -6751,13 +4138,13 @@
});
/***/ },
-/* 274 */
+/* 172 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var path = __webpack_require__(275)
- , invoke = __webpack_require__(74)
- , aFunction = __webpack_require__(9);
+ var path = __webpack_require__(173)
+ , invoke = __webpack_require__(16)
+ , aFunction = __webpack_require__(7);
module.exports = function(/* ...pargs */){
var fn = aFunction(this)
, length = arguments.length
@@ -6767,46 +4154,45 @@
, holder = false;
while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
return function(/* ...args */){
- var that = this
- , aLen = arguments.length
+ var that = this
+ , $$ = arguments
+ , $$len = $$.length
, j = 0, k = 0, args;
- if(!holder && !aLen)return invoke(fn, pargs, that);
+ if(!holder && !$$len)return invoke(fn, pargs, that);
args = pargs.slice();
- if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
- while(aLen > k)args.push(arguments[k++]);
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];
+ while($$len > k)args.push($$[k++]);
return invoke(fn, args, that);
};
};
/***/ },
-/* 275 */
+/* 173 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(7);
+ module.exports = __webpack_require__(5);
/***/ },
-/* 276 */
+/* 174 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var ctx = __webpack_require__(8)
- , $export = __webpack_require__(6)
- , createDesc = __webpack_require__(17)
- , assign = __webpack_require__(67)
- , create = __webpack_require__(44)
- , getPrototypeOf = __webpack_require__(57)
- , getKeys = __webpack_require__(28)
- , dP = __webpack_require__(11)
- , keyOf = __webpack_require__(27)
- , aFunction = __webpack_require__(9)
- , forOf = __webpack_require__(185)
- , isIterable = __webpack_require__(277)
- , $iterCreate = __webpack_require__(131)
- , step = __webpack_require__(180)
- , isObject = __webpack_require__(13)
- , toIObject = __webpack_require__(30)
- , DESCRIPTORS = __webpack_require__(4)
- , has = __webpack_require__(3);
+ var $ = __webpack_require__(2)
+ , ctx = __webpack_require__(6)
+ , $export = __webpack_require__(3)
+ , createDesc = __webpack_require__(10)
+ , assign = __webpack_require__(41)
+ , keyOf = __webpack_require__(36)
+ , aFunction = __webpack_require__(7)
+ , forOf = __webpack_require__(126)
+ , isIterable = __webpack_require__(175)
+ , $iterCreate = __webpack_require__(105)
+ , step = __webpack_require__(115)
+ , isObject = __webpack_require__(13)
+ , toIObject = __webpack_require__(20)
+ , DESCRIPTORS = __webpack_require__(8)
+ , has = __webpack_require__(14)
+ , getKeys = $.getKeys;
// 0 -> Dict.forEach
// 1 -> Dict.map
@@ -6873,7 +4259,7 @@
});
function Dict(iterable){
- var dict = create(null);
+ var dict = $.create(null);
if(iterable != undefined){
if(isIterable(iterable)){
forOf(iterable, true, function(key, value){
@@ -6912,13 +4298,13 @@
if(has(object, key))return object[key];
}
function set(object, key, value){
- if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value));
+ if(DESCRIPTORS && key in Object)$.setDesc(object, key, createDesc(0, value));
else object[key] = value;
return object;
}
function isDict(it){
- return isObject(it) && getPrototypeOf(it) === Dict.prototype;
+ return isObject(it) && $.getProto(it) === Dict.prototype;
}
$export($export.G + $export.F, {Dict: Dict});
@@ -6945,13 +4331,13 @@
});
/***/ },
-/* 277 */
+/* 175 */
/***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(152)
- , ITERATOR = __webpack_require__(23)('iterator')
- , Iterators = __webpack_require__(130);
- module.exports = __webpack_require__(7).isIterable = function(it){
+ var classof = __webpack_require__(110)
+ , ITERATOR = __webpack_require__(29)('iterator')
+ , Iterators = __webpack_require__(104);
+ module.exports = __webpack_require__(5).isIterable = function(it){
var O = Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
@@ -6959,25 +4345,25 @@
};
/***/ },
-/* 278 */
+/* 176 */
/***/ function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(12)
- , get = __webpack_require__(151);
- module.exports = __webpack_require__(7).getIterator = function(it){
+ var anObject = __webpack_require__(17)
+ , get = __webpack_require__(109);
+ module.exports = __webpack_require__(5).getIterator = function(it){
var iterFn = get(it);
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
/***/ },
-/* 279 */
+/* 177 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , $export = __webpack_require__(6)
- , partial = __webpack_require__(274);
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(5)
+ , $export = __webpack_require__(3)
+ , partial = __webpack_require__(172);
// https://esdiscuss.org/topic/promise-returning-delay-function
$export($export.G + $export.F, {
delay: function delay(time){
@@ -6988,66 +4374,65 @@
});
/***/ },
-/* 280 */
+/* 178 */
/***/ function(module, exports, __webpack_require__) {
- var path = __webpack_require__(275)
- , $export = __webpack_require__(6);
+ var path = __webpack_require__(173)
+ , $export = __webpack_require__(3);
// Placeholder
- __webpack_require__(7)._ = path._ = path._ || {};
+ __webpack_require__(5)._ = path._ = path._ || {};
- $export($export.P + $export.F, 'Function', {part: __webpack_require__(274)});
+ $export($export.P + $export.F, 'Function', {part: __webpack_require__(172)});
/***/ },
-/* 281 */
+/* 179 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S + $export.F, 'Object', {isObject: __webpack_require__(13)});
/***/ },
-/* 282 */
+/* 180 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F, 'Object', {classof: __webpack_require__(152)});
+ $export($export.S + $export.F, 'Object', {classof: __webpack_require__(110)});
/***/ },
-/* 283 */
+/* 181 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , define = __webpack_require__(284);
+ var $export = __webpack_require__(3)
+ , define = __webpack_require__(182);
$export($export.S + $export.F, 'Object', {define: define});
/***/ },
-/* 284 */
+/* 182 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(11)
- , gOPD = __webpack_require__(49)
- , ownKeys = __webpack_require__(208)
- , toIObject = __webpack_require__(30);
+ var $ = __webpack_require__(2)
+ , ownKeys = __webpack_require__(149)
+ , toIObject = __webpack_require__(20);
module.exports = function define(target, mixin){
var keys = ownKeys(toIObject(mixin))
, length = keys.length
, i = 0, key;
- while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key));
+ while(length > i)$.setDesc(target, key = keys[i++], $.getDesc(mixin, key));
return target;
};
/***/ },
-/* 285 */
+/* 183 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , define = __webpack_require__(284)
- , create = __webpack_require__(44);
+ var $export = __webpack_require__(3)
+ , define = __webpack_require__(182)
+ , create = __webpack_require__(2).create;
$export($export.S + $export.F, 'Object', {
make: function(proto, mixin){
@@ -7056,11 +4441,11 @@
});
/***/ },
-/* 286 */
+/* 184 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- __webpack_require__(129)(Number, 'Number', function(iterated){
+ __webpack_require__(103)(Number, 'Number', function(iterated){
this._l = +iterated;
this._i = 0;
}, function(){
@@ -7070,36 +4455,12 @@
});
/***/ },
-/* 287 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/benjamingr/RexExp.escape
- var $export = __webpack_require__(6)
- , $re = __webpack_require__(288)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-
- $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
-
-
-/***/ },
-/* 288 */
-/***/ function(module, exports) {
-
- module.exports = function(regExp, replace){
- var replacer = replace === Object(replace) ? function(part){
- return replace[part];
- } : replace;
- return function(it){
- return String(it).replace(regExp, replacer);
- };
- };
-
-/***/ },
-/* 289 */
+/* 185 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6);
- var $re = __webpack_require__(288)(/[&<>"']/g, {
+ var $export = __webpack_require__(3);
+ var $re = __webpack_require__(161)(/[&<>"']/g, {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
@@ -7110,12 +4471,12 @@
$export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }});
/***/ },
-/* 290 */
+/* 186 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6);
- var $re = __webpack_require__(288)(/&(?:amp|lt|gt|quot|apos);/g, {
+ var $export = __webpack_require__(3);
+ var $re = __webpack_require__(161)(/&(?:amp|lt|gt|quot|apos);/g, {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
@@ -7125,6 +4486,59 @@
$export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }});
+/***/ },
+/* 187 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , log = {}
+ , enabled = true;
+ // Methods from https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
+ $.each.call((
+ 'assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,' +
+ 'info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,' +
+ 'time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn'
+ ).split(','), function(key){
+ log[key] = function(){
+ var $console = global.console;
+ if(enabled && $console && $console[key]){
+ return Function.apply.call($console[key], $console, arguments);
+ }
+ };
+ });
+ $export($export.G + $export.F, {log: __webpack_require__(41)(log.log, log, {
+ enable: function(){
+ enabled = true;
+ },
+ disable: function(){
+ enabled = false;
+ }
+ })});
+
+/***/ },
+/* 188 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // JavaScript 1.6 / Strawman array statics shim
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , $ctx = __webpack_require__(6)
+ , $Array = __webpack_require__(5).Array || Array
+ , statics = {};
+ var setStatics = function(keys, length){
+ $.each.call(keys.split(','), function(key){
+ if(length == undefined && key in $Array)statics[key] = $Array[key];
+ else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
+ });
+ };
+ setStatics('pop,reverse,shift,keys,values,entries', 1);
+ setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
+ setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
+ 'reduce,reduceRight,copyWithin,fill');
+ $export($export.S, 'Array', statics);
+
/***/ }
/******/ ]);
// CommonJS export
diff --git a/node_modules/core-js/client/library.min.js b/node_modules/core-js/client/library.min.js
index d69a0de9b..f665bedfa 100644
--- a/node_modules/core-js/client/library.min.js
+++ b/node_modules/core-js/client/library.min.js
@@ -1,10 +1,9 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
*/
-!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(75),c(76),c(79),c(80),c(81),c(82),c(84),c(85),c(86),c(87),c(88),c(92),c(94),c(95),c(96),c(98),c(99),c(100),c(102),c(103),c(104),c(106),c(107),c(108),c(109),c(110),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(121),c(125),c(126),c(127),c(128),c(132),c(134),c(135),c(136),c(137),c(138),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(154),c(155),c(157),c(158),c(159),c(163),c(164),c(165),c(166),c(167),c(169),c(170),c(171),c(172),c(175),c(177),c(178),c(179),c(181),c(183),c(190),c(193),c(194),c(196),c(197),c(198),c(199),c(200),c(201),c(202),c(203),c(204),c(205),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(218),c(219),c(221),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(230),c(231),c(233),c(234),c(235),c(236),c(238),c(239),c(240),c(241),c(243),c(244),c(246),c(247),c(248),c(249),c(252),c(253),c(254),c(255),c(256),c(257),c(258),c(259),c(261),c(262),c(263),c(264),c(265),c(266),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(276),c(151),c(278),c(277),c(279),c(280),c(281),c(282),c(283),c(285),c(286),c(287),c(289),a.exports=c(290)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(18),j=d(19).KEY,k=d(5),l=d(21),m=d(22),n=d(20),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(12),v=d(30),w=d(16),x=d(17),y=d(44),z=d(47),A=d(49),B=d(11),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(10)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(10),i="prototype",j=function(a,b,d){var k,l,m,n=a&j.F,o=a&j.G,p=a&j.S,q=a&j.P,r=a&j.B,s=a&j.W,t=o?f:f[b]||(f[b]={}),u=t[i],v=o?e:p?e[b]:(e[b]||{})[i];o&&(d=b);for(k in d)l=!n&&v&&v[k]!==c,l&&k in t||(m=l?v[k]:d[k],t[k]=o&&"function"!=typeof v[k]?d[k]:r&&l?g(m,e):s&&v[k]==m?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[i]=a[i],b}(m):q&&"function"==typeof m?g(Function.call,m):m,q&&((t.virtual||(t.virtual={}))[k]=m,a&j.R&&u&&!u[k]&&h(u,k,m)))};j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,a.exports=j},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,d){var e=d(9);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(11),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(12),e=c(14),f=c(16),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(13);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(15)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(13),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(13);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){a.exports=c(10)},function(a,b,c){var d=c(20)("meta"),e=c(13),f=c(3),g=c(11).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(11).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(20),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(11).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!0},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(20);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(12),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(15)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(11),e=c(12),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(17),f=c(30),g=c(16),h=c(3),i=c(14),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(11).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(13),f=d(12),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(8)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(73)})},function(a,b,c){var d=c(9),e=c(13),f=c(74),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e<b;e++)d[e]="a["+e+"]";h[b]=Function("F,a","return new F("+d.join(",")+")")}return h[b](a,c)};a.exports=Function.bind||function bind(a){var b=d(this),c=g.call(arguments,1),h=function(){var d=c.concat(g.call(arguments));return this instanceof h?i(b,d.length,d):f(b,d,a)};return e(b.prototype)&&(h.prototype=b.prototype),h}},function(a,b){a.exports=function(a,b,d){var e=d===c;switch(b.length){case 0:return e?a():a.call(d);case 1:return e?a(b[0]):a.call(d,b[0]);case 2:return e?a(b[0],b[1]):a.call(d,b[0],b[1]);case 3:return e?a(b[0],b[1],b[2]):a.call(d,b[0],b[1],b[2]);case 4:return e?a(b[0],b[1],b[2],b[3]):a.call(d,b[0],b[1],b[2],b[3])}return a.apply(d,b)}},function(a,b,c){var d=c(13),e=c(57),f=c(23)("hasInstance"),g=Function.prototype;f in g||c(11).f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},function(a,b,c){var d=c(6),e=c(36),f=c(77),g=c(78),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<<d),m(1,1),n(2),s=o()}else m(0,c),m(1<<-b,0),s=o()+g.call(l,j);return j>0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(77),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(83)})},function(a,b,c){var d=c(13),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(83),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(89);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(90).trim;a.exports=1/d(c(91)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(91),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(93);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(90).trim,f=c(91),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(93);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(89);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(97),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(101);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(105);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(101),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return d<j?f*k(d/j/h)*j*h:(b=(1+h/g)*d,c=b-(b-d),c>i||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g<h;)c=e(arguments[g++]),i<c?(d=i/c,f=f*d*d+1,i=c):c>0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(97)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(101)})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h<d&&g.push(String(arguments[h]));return g.join("")}})},function(a,b,c){c(90)("trim",function(a){return function trim(){return a(this,3)}})},function(a,b,c){var d=c(6),e=c(120)(!1);d(d.P,"String",{codePointAt:function codePointAt(a){return e(this,a)}})},function(a,b,d){var e=d(36),f=d(33);a.exports=function(a){return function(b,d){var g,h,i=String(f(b)),j=e(d),k=i.length;return j<0||j>=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="endsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(123),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(13),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(122),g="includes";e(e.P+e.F*d(124)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(78)})},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="startsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(120)(!0);d(129)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(18),h=d(10),i=d(3),j=d(130),k=d(131),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(17),f=c(22),g={};c(10)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(133)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,"&quot;")+'"'),h+">"+e+"</"+b+">"};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(133)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(133)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(133)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(133)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(133)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(133)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(133)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(133)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(133)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(133)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(133)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(133)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(8),f=d(6),g=d(56),h=d(148),i=d(149),j=d(35),k=d(150),l=d(151);f(f.S+f.F*!d(153)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(12);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(130),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(11),e=c(17);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(150);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(156)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;n<l;n++)m[n]="String"==e?this.charAt(f+n):this[f+n];return m}})},function(a,b,d){var e=d(6),f=d(9),g=d(56),h=d(5),i=[].sort,j=[1,2,3];e(e.P+e.F*(h(function(){j.sort(c)})||!h(function(){j.sort(null)})||!d(156)(i)),"Array",{sort:function sort(a){return a===c?i.call(g(this)):i.call(g(this),f(a))}})},function(a,b,c){var d=c(6),e=c(160)(0),f=c(156)([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function forEach(a){return e(this,a,arguments[1])}})},function(a,b,d){var e=d(8),f=d(31),g=d(56),h=d(35),i=d(161);a.exports=function(a,b){var d=1==a,j=2==a,k=3==a,l=4==a,m=6==a,n=5==a||m,o=b||i;return function(b,i,p){for(var q,r,s=g(b),t=f(s),u=e(i,p,3),v=h(t.length),w=0,x=d?o(b,v):j?o(b,0):c;v>w;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:
-return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(162);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(13),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(160)(1);d(d.P+d.F*!c(156)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(2);d(d.P+d.F*!c(156)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(3);d(d.P+d.F*!c(156)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(4);d(d.P+d.F*!c(156)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(9),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(156)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(156)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(173)}),c(174)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j<i&&i<j+l&&(m=-1,j+=l-1,i+=l-1);l-- >0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b){a.exports=function(){}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(176)}),c(174)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(160)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(6),f=d(160)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(174),f=d(180),g=d(130),h=d(30);a.exports=d(129)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(182)("Array")},function(a,b,c){var d=c(2),e=c(7),f=c(11),g=c(4),h=c(23)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(8),k=d(152),l=d(6),m=d(13),n=d(9),o=d(184),p=d(185),q=d(186),r=d(187).set,s=d(188)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(189)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(182)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(153)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(8),e=c(148),f=c(149),g=c(12),h=c(35),i=c(151),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(12),f=d(9),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(8),h=c(74),i=c(46),j=c(15),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(187).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(10);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,d){var e=d(191);a.exports=d(192)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(11).f,f=d(44),g=d(189),h=d(8),i=d(184),j=d(33),k=d(185),l=d(129),m=d(180),n=d(182),o=d(4),p=d(19).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(19),h=d(5),i=d(10),j=d(189),k=d(185),l=d(184),m=d(13),n=d(22),o=d(11).f,p=d(160)(0),q=d(4);a.exports=function(a,b,d,r,s,t){var u=e[a],v=u,w=s?"set":"add",x=v&&v.prototype,y={};return q&&"function"==typeof v&&(t||x.forEach&&!h(function(){(new v).entries().next()}))?(v=b(function(b,d){l(b,v,a,"_c"),b._c=new u,d!=c&&k(d,s,b[w],b)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(a){var b="add"==a||"set"==a;a in x&&(!t||"clear"!=a)&&i(v.prototype,a,function(d,e){if(l(this,v,a),!b&&t&&!m(d))return"get"==a&&c;var f=this._c[a](0===d?0:d,e);return b?this:f})}),"size"in x&&o(v.prototype,"size",{get:function(){return this._c.size}})):(v=r.getConstructor(b,a,s,w),j(v.prototype,d),g.NEED=!0),n(v,a),y[a]=v,f(f.G+f.W+f.F,y),t||r.setStrong(v,a,s),v}},function(a,b,d){var e=d(191);a.exports=d(192)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(160)(0),g=d(18),h=d(19),i=d(67),j=d(195),k=d(13),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(192)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(189),f=d(19).getWeak,g=d(12),h=d(13),i=d(184),j=d(185),k=d(160),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(195);d(192)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(9),f=c(12),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(9),g=c(12),h=c(13),i=c(5),j=c(73),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(11),e=c(6),f=c(12),g=c(16);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(12);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(12),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(131)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(13),j=d(12);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(12);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(12);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(12),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(208)})},function(a,b,c){var d=c(48),e=c(41),f=c(12),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(12),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(11),f=d(49),g=d(57),h=d(3),i=d(6),j=d(17),k=d(12),l=d(13);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(16);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,d){var e=d(6),f=d(216),g=d(217),h=d(12),i=d(37),j=d(35),k=d(13),l=d(2).ArrayBuffer,m=d(186),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e<f;)l.setUint8(p++,k.getUint8(e++));return g}}),d(182)(s)},function(a,b,c){for(var d,e=c(2),f=c(10),g=c(20),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<m;)(d=e[n[l++]])?(f(d.prototype,h,!0),f(d.prototype,i,!0)):k=!1;a.exports={ABV:j,CONSTR:k,TYPED:h,VIEW:i}},function(a,b,d){var e=d(2),f=d(4),g=d(26),h=d(216),i=d(10),j=d(189),k=d(5),l=d(184),m=d(36),n=d(35),o=d(48).f,p=d(11).f,q=d(176),r=d(22),s="ArrayBuffer",t="DataView",u="prototype",v="Wrong length!",w="Wrong index!",x=e[s],y=e[t],z=e.Math,A=e.RangeError,B=e.Infinity,C=x,D=z.abs,E=z.pow,F=z.floor,G=z.log,H=z.LN2,I="buffer",J="byteLength",K="byteOffset",L=f?"_b":I,M=f?"_l":J,N=f?"_o":K,O=function(a,b,c){var d,e,f,g=Array(c),h=8*c-b-1,i=(1<<h)-1,j=i>>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<<b|e,h+=b;h>0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<<e)-1,g=f>>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;l<b;l++)i[j+l]=k[f?l:b-l-1]},Z=function(a,b){l(a,x,s);var c=+b,d=n(c);if(c!=d)throw A(v);return d};if(h.ABV){if(!k(function(){new x})||!k(function(){new x(.5)})){x=function ArrayBuffer(a){return new C(Z(this,a))};for(var $,_=x[u]=C[u],aa=o(C),ba=0;aa.length>ba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(216).ABV,{DataView:c(217).DataView})},function(a,b,c){c(220)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(216),j=d(217),k=d(8),l=d(184),m=d(17),n=d(10),o=d(189),p=d(36),q=d(35),r=d(37),s=d(16),t=d(3),u=d(69),v=d(152),w=d(13),x=d(56),y=d(149),z=d(44),A=d(57),B=d(48).f,C=d(151),D=d(20),E=d(23),F=d(160),G=d(34),H=d(186),I=d(179),J=d(130),K=d(153),L=d(182),M=d(176),N=d(173),O=d(11),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e<d;)a=b[e],b[e++]=b[--c],b[c]=a;return b},some:function some(a){return ca(Ga(this),a,arguments.length>1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f<e;)this[b+f]=d[f++]},Sa={entries:function entries(){return ka.call(Ga(this))},keys:function keys(){return ja.call(Ga(this))},values:function values(){return ia.call(Ga(this))}},Ta=function(a,b){return w(a)&&a[ya]&&"symbol"!=typeof b&&b in a&&String(+b)==String(b)},Ua=function getOwnPropertyDescriptor(a,b){return Ta(a,b=s(b,!0))?m(2,a[b]):R(a,b)},Va=function defineProperty(a,b,c){return!(Ta(a,b=s(b,!0))&&w(c)&&t(c,"value"))||t(c,"get")||t(c,"set")||c.configurable||t(c,"writable")&&!c.writable||t(c,"enumerable")&&!c.enumerable?Q(a,b,c):(a[b]=c.value,a)};xa||(P.f=Ua,O.f=Va),h(h.S+h.F*!xa,"Object",{getOwnPropertyDescriptor:Ua,defineProperty:Va}),g(function(){ra.call({})})&&(ra=sa=function toString(){return oa.call(this)});var Wa=o({},Pa);o(Wa,Sa),n(Wa,ta,Sa.values),o(Wa,{slice:Qa,set:Ra,constructor:function(){},toString:ra,toLocaleString:Oa}),Ka(Wa,"buffer","b"),Ka(Wa,"byteOffset","o"),Ka(Wa,"byteLength","l"),Ka(Wa,"length","e"),Q(Wa,ua,{get:function(){return this[ya]}}),a.exports=function(a,b,d,j){j=!!j;var k=a+(j?"Clamped":"")+"Array",m="Uint8Array"!=k,o="get"+a,p="set"+a,r=f[k],s=r||{},t=r&&A(r),u=!r||!i.ABV,x={},y=r&&r[Y],C=function(a,c){var d=a._d;return d.v[o](c*b+d.o,Ca)},D=function(a,c,d){var e=a._d;j&&(d=(d=Math.round(d))<0?0:d>255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m<i;)E(a,m++)}),y=r[Y]=z(Wa),n(y,"constructor",r)):K(function(a){new r(null),new r(a)},!0)||(r=d(function(a,d,e,f){l(a,r,k);var g;return w(d)?d instanceof $||(g=v(d))==V||g==W?f!==c?new s(d,Fa(e,b),f):e!==c?new s(d,Fa(e,b)):new s(d):ya in d?Ja(r,d):La.call(r,d):new s(Ea(d,m))}),aa(t!==Function.prototype?B(s).concat(B(t)):B(s),function(a){a in r||n(r,a,s[a])}),r[Y]=y,e||(y.constructor=r));var F=y[ta],G=!!F&&("values"==F.name||F.name==c),H=Sa.values;n(r,va,!0),n(y,ya,k),n(y,za,!0),n(y,wa,r),(j?new r(1)[ua]==k:ua in y)||Q(y,ua,{get:function(){return k}}),x[k]=r,h(h.G+h.W+h.F*(r!=s),x),h(h.S,k,{BYTES_PER_ELEMENT:b,from:La,of:Ma}),X in y||n(y,X,b),h(h.P,k,Pa),L(k),h(h.P+h.F*Da,k,{set:Ra}),h(h.P+h.F*!G,k,Sa),h(h.P+h.F*(y.toString!=ra),k,{toString:ra}),h(h.P+h.F*g(function(){new r(1).slice()}),k,{slice:Qa}),h(h.P+h.F*(g(function(){return[1,2].toLocaleString()!=new r([1,2]).toLocaleString()})||!g(function(){y.toLocaleString.call([1,2])})),k,{toLocaleString:Oa}),J[k]=G?F:H,e||G||n(y,ta,H)}}else a.exports=function(){}},function(a,b,c){c(220)("Uint8",1,function(a){return function Uint8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Uint8",1,function(a){return function Uint8ClampedArray(b,c,d){return a(this,b,c,d)}},!0)},function(a,b,c){c(220)("Int16",2,function(a){return function Int16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Uint16",2,function(a){return function Uint16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Int32",4,function(a){return function Int32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Uint32",4,function(a){return function Uint32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Float32",4,function(a){return function Float32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(220)("Float64",8,function(a){return function Float64Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){var e=d(6),f=d(34)(!0);e(e.P,"Array",{includes:function includes(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)("includes")},function(a,b,c){var d=c(6),e=c(120)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(78),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(90)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(90)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(123),h=c(237),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(131)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);
-return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){var d=c(12);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(208),f=c(30),g=c(49),h=c(150);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(242)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(242)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(250)("Map")})},function(a,b,c){var d=c(152),e=c(251);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(185);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(250)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(260),e=c(12),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(190),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(194))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(260),f=d(12),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(193),f=d(251),g=d(260),h=d(12),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(9),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(188)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(188)(),i=d(23)("observable"),j=d(9),k=d(12),l=d(184),m=d(189),n=d(10),o=d(185),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);a<b;)c[a]=arguments[a++];return new("function"==typeof this?this:w)(function(a){var b=!1;return h(function(){if(!b){for(var d=0;d<c.length;++d)if(a.next(c[d]),b)return;a.complete()}}),function(){b=!0}})}}),n(w.prototype,i,function(){return this}),e(e.G,{Observable:w}),d(182)("Observable")},function(a,b,c){var d=c(6),e=c(187);d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},function(a,b,c){c(179);for(var d=c(2),e=c(10),f=c(130),g=c(23)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b,c){var d=c(2),e=c(6),f=c(74),g=c(274),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},function(a,b,c){var d=c(275),e=c(74),f=c(9);a.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(7)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(8),f=d(6),g=d(17),h=d(67),i=d(44),j=d(57),k=d(28),l=d(11),m=d(27),n=d(9),o=d(185),p=d(277),q=d(131),r=d(180),s=d(13),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(12),e=c(151);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(274);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(275),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(274)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(13)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(152)})},function(a,b,c){var d=c(6),e=c(284);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(11),e=c(49),f=c(208),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(284),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(129)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a<this._l);return{done:b,value:b?c:a}})},function(a,b,c){var d=c(6),e=c(288)(/[\\^$*+?.()|[\]{}]/g,"\\$&");d(d.S,"RegExp",{escape:function escape(a){return e(a)}})},function(a,b){a.exports=function(a,b){var c=b===Object(b)?function(a){return b[a]}:b;return function(b){return String(b).replace(a,c)}}},function(a,b,c){var d=c(6),e=c(288)(/[&<>"']/g,{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(288)(/&(?:amp|lt|gt|quot|apos);/g,{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1);
+!function(b,c,a){"use strict";!function(b){function __webpack_require__(c){if(a[c])return a[c].exports;var d=a[c]={exports:{},id:c,loaded:!1};return b[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var a={};return __webpack_require__.m=b,__webpack_require__.c=a,__webpack_require__.p="",__webpack_require__(0)}([function(b,c,a){a(1),a(32),a(40),a(42),a(44),a(46),a(48),a(49),a(50),a(51),a(52),a(53),a(54),a(55),a(56),a(57),a(58),a(59),a(60),a(62),a(63),a(64),a(65),a(66),a(67),a(68),a(70),a(71),a(72),a(74),a(75),a(76),a(78),a(79),a(80),a(81),a(82),a(83),a(84),a(85),a(86),a(87),a(88),a(89),a(90),a(92),a(94),a(98),a(99),a(101),a(102),a(106),a(112),a(113),a(116),a(118),a(120),a(122),a(123),a(124),a(131),a(134),a(135),a(137),a(138),a(139),a(140),a(141),a(142),a(143),a(144),a(145),a(146),a(147),a(148),a(150),a(151),a(152),a(153),a(154),a(155),a(157),a(158),a(159),a(160),a(162),a(163),a(165),a(166),a(168),a(169),a(170),a(171),a(174),a(109),a(176),a(175),a(177),a(178),a(179),a(180),a(181),a(183),a(184),a(185),a(186),a(187),b.exports=a(188)},function(S,R,b){var r,d=b(2),c=b(3),x=b(8),O=b(10),o=b(11),E=b(12),n=b(14),N=b(15),J=b(16),j=b(9),p=b(17),v=b(7),I=b(13),Q=b(18),y=b(20),K=b(22),w=b(23),h=b(24),s=b(21),m=b(25)("__proto__"),g=b(26),A=b(31)(!1),B=Object.prototype,C=Array.prototype,k=C.slice,M=C.join,F=d.setDesc,L=d.getDesc,q=d.setDescs,u={};x||(r=!j(function(){return 7!=F(E("div"),"a",{get:function(){return 7}}).a}),d.setDesc=function(b,c,a){if(r)try{return F(b,c,a)}catch(d){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(p(b)[c]=a.value),b},d.getDesc=function(a,b){if(r)try{return L(a,b)}catch(c){}return n(a,b)?O(!B.propertyIsEnumerable.call(a,b),a[b]):void 0},d.setDescs=q=function(a,b){p(a);for(var c,e=d.getKeys(b),g=e.length,f=0;g>f;)d.setDesc(a,c=e[f++],b[c]);return a}),c(c.S+c.F*!x,"Object",{getOwnPropertyDescriptor:d.getDesc,defineProperty:d.setDesc,defineProperties:q});var i="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),H=i.concat("length","prototype"),G=i.length,l=function(){var a,b=E("iframe"),c=G,d=">";for(b.style.display="none",o.appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write("<script>document.F=Object</script"+d),a.close(),l=a.F;c--;)delete l.prototype[i[c]];return l()},D=function(a,b){return function(g){var c,e=y(g),f=0,d=[];for(c in e)c!=m&&n(e,c)&&d.push(c);for(;b>f;)n(e,c=a[f++])&&(~A(d,c)||d.push(c));return d}},t=function(){};c(c.S,"Object",{getPrototypeOf:d.getProto=d.getProto||function(a){return a=Q(a),n(a,m)?a[m]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?B:null},getOwnPropertyNames:d.getNames=d.getNames||D(H,H.length,!0),create:d.create=d.create||function(c,d){var b;return null!==c?(t.prototype=p(c),b=new t,t.prototype=null,b[m]=c):b=l(),d===a?b:q(b,d)},keys:d.getKeys=d.getKeys||D(i,G,!1)});var P=function(d,a,e){if(!(a in u)){for(var c=[],b=0;a>b;b++)c[b]="a["+b+"]";u[a]=Function("F,a","return new F("+c.join(",")+")")}return u[a](d,e)};c(c.P,"Function",{bind:function bind(c){var a=v(this),d=k.call(arguments,1),b=function(){var e=d.concat(k.call(arguments));return this instanceof b?P(a,e.length,e):J(a,e,c)};return I(a.prototype)&&(b.prototype=a.prototype),b}}),c(c.P+c.F*j(function(){o&&k.call(o)}),"Array",{slice:function(f,b){var d=h(this.length),g=N(this);if(b=b===a?d:b,"Array"==g)return k.call(this,f,b);for(var e=w(f,d),l=w(b,d),i=h(l-e),j=Array(i),c=0;i>c;c++)j[c]="String"==g?this.charAt(e+c):this[e+c];return j}}),c(c.P+c.F*(s!=Object),"Array",{join:function join(b){return M.call(s(this),b===a?",":b)}}),c(c.S,"Array",{isArray:b(28)});var z=function(a){return function(g,d){v(g);var c=s(this),e=h(c.length),b=a?e-1:0,f=a?-1:1;if(arguments.length<2)for(;;){if(b in c){d=c[b],b+=f;break}if(b+=f,a?0>b:b>=e)throw TypeError("Reduce of empty array with no initial value")}for(;a?b>=0:e>b;b+=f)b in c&&(d=g(d,c[b],b,this));return d}},f=function(a){return function(b){return a(this,b,arguments[1])}};c(c.P,"Array",{forEach:d.each=d.each||f(g(0)),map:f(g(1)),filter:f(g(2)),some:f(g(3)),every:f(g(4)),reduce:z(!1),reduceRight:z(!0),indexOf:f(A),lastIndexOf:function(d,e){var b=y(this),c=h(b.length),a=c-1;for(arguments.length>1&&(a=Math.min(a,K(e))),0>a&&(a=h(c+a));a>=0;a--)if(a in b&&b[a]===d)return a;return-1}}),c(c.S,"Date",{now:function(){return+new Date}});var e=function(a){return a>9?a:"0"+a};c(c.P+c.F*(j(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!j(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(this))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+e(a.getUTCMonth()+1)+"-"+e(a.getUTCDate())+"T"+e(a.getUTCHours())+":"+e(a.getUTCMinutes())+":"+e(a.getUTCSeconds())+"."+(c>99?c:"0"+e(c))+"Z"}})},function(b,c){var a=Object;b.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},function(g,h,d){var c=d(4),e=d(5),f=d(6),b="prototype",a=function(h,j,l){var d,k,g,p=h&a.F,n=h&a.G,q=h&a.S,o=h&a.P,r=h&a.B,s=h&a.W,m=n?e:e[j]||(e[j]={}),i=n?c:q?c[j]:(c[j]||{})[b];n&&(l=j);for(d in l)k=!p&&i&&d in i,k&&d in m||(g=k?i[d]:l[d],m[d]=n&&"function"!=typeof i[d]?l[d]:r&&k?f(g,c):s&&i[d]==g?function(a){var c=function(b){return this instanceof a?new a(b):a(b)};return c[b]=a[b],c}(g):o&&"function"==typeof g?f(Function.call,g):g,o&&((m[b]||(m[b]={}))[d]=g))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,g.exports=a},function(a,d){var b=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof c&&(c=b)},function(a,d){var c=a.exports={version:"1.2.6"};"number"==typeof b&&(b=c)},function(b,e,c){var d=c(7);b.exports=function(b,c,e){if(d(b),c===a)return b;switch(e){case 1:return function(a){return b.call(c,a)};case 2:return function(a,d){return b.call(c,a,d)};case 3:return function(a,d,e){return b.call(c,a,d,e)}}return function(){return b.apply(c,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,c,b){a.exports=!b(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,c,b){a.exports=b(4).document&&document.documentElement},function(d,f,b){var c=b(13),a=b(4).document,e=c(a)&&c(a.createElement);d.exports=function(b){return e?a.createElement(b):{}}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,c){var b={}.hasOwnProperty;a.exports=function(a,c){return b.call(a,c)}},function(a,c){var b={}.toString;a.exports=function(a){return b.call(a).slice(8,-1)}},function(b,c){b.exports=function(c,b,d){var e=d===a;switch(b.length){case 0:return e?c():c.call(d);case 1:return e?c(b[0]):c.call(d,b[0]);case 2:return e?c(b[0],b[1]):c.call(d,b[0],b[1]);case 3:return e?c(b[0],b[1],b[2]):c.call(d,b[0],b[1],b[2]);case 4:return e?c(b[0],b[1],b[2],b[3]):c.call(d,b[0],b[1],b[2],b[3])}return c.apply(d,b)}},function(a,d,b){var c=b(13);a.exports=function(a){if(!c(a))throw TypeError(a+" is not an object!");return a}},function(a,d,b){var c=b(19);a.exports=function(a){return Object(c(a))}},function(b,c){b.exports=function(b){if(b==a)throw TypeError("Can't call method on "+b);return b}},function(b,e,a){var c=a(21),d=a(19);b.exports=function(a){return c(d(a))}},function(a,d,b){var c=b(15);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==c(a)?a.split(""):Object(a)}},function(a,d){var b=Math.ceil,c=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?c:b)(a)}},function(a,f,b){var c=b(22),d=Math.max,e=Math.min;a.exports=function(a,b){return a=c(a),0>a?d(a+b,0):e(a,b)}},function(a,e,b){var c=b(22),d=Math.min;a.exports=function(a){return a>0?d(c(a),9007199254740991):0}},function(b,e){var c=0,d=Math.random();b.exports=function(b){return"Symbol(".concat(b===a?"":b,")_",(++c+d).toString(36))}},function(d,i,b){var e=b(6),f=b(21),g=b(18),h=b(24),c=b(27);d.exports=function(b){var i=1==b,k=2==b,l=3==b,d=4==b,j=6==b,m=5==b||j;return function(p,v,x){for(var o,r,u=g(p),s=f(u),w=e(v,x,3),t=h(s.length),n=0,q=i?c(p,t):k?c(p,0):a;t>n;n++)if((m||n in s)&&(o=s[n],r=w(o,n,u),b))if(i)q[n]=r;else if(r)switch(b){case 3:return!0;case 5:return o;case 6:return n;case 2:q.push(o)}else if(d)return!1;return j?-1:l||d?d:q}}},function(d,g,b){var e=b(13),c=b(28),f=b(29)("species");d.exports=function(d,g){var b;return c(d)&&(b=d.constructor,"function"!=typeof b||b!==Array&&!c(b.prototype)||(b=a),e(b)&&(b=b[f],null===b&&(b=a))),new(b===a?Array:b)(g)}},function(a,d,b){var c=b(15);a.exports=Array.isArray||function(a){return"Array"==c(a)}},function(d,f,a){var c=a(30)("wks"),e=a(25),b=a(4).Symbol;d.exports=function(a){return c[a]||(c[a]=b&&b[a]||(b||e)("Symbol."+a))}},function(d,f,e){var a=e(4),b="__core-js_shared__",c=a[b]||(a[b]={});d.exports=function(a){return c[a]||(c[a]={})}},function(b,f,a){var c=a(20),d=a(24),e=a(23);b.exports=function(a){return function(j,g,k){var h,f=c(j),i=d(f.length),b=e(k,i);if(a&&g!=g){for(;i>b;)if(h=f[b++],h!=h)return!0}else for(;i>b;b++)if((a||b in f)&&f[b]===g)return a||b;return!a&&-1}}},function(W,V,b){var e=b(2),x=b(4),d=b(14),w=b(8),f=b(3),G=b(33),H=b(9),J=b(30),s=b(35),S=b(25),A=b(29),R=b(36),C=b(37),Q=b(38),P=b(28),O=b(17),p=b(20),v=b(10),I=e.getDesc,i=e.setDesc,k=e.create,z=C.get,g=x.Symbol,l=x.JSON,m=l&&l.stringify,n=!1,c=A("_hidden"),N=e.isEnum,o=J("symbol-registry"),h=J("symbols"),q="function"==typeof g,j=Object.prototype,y=w&&H(function(){return 7!=k(i({},"a",{get:function(){return i(this,"a",{value:7}).a}})).a})?function(c,a,d){var b=I(j,a);b&&delete j[a],i(c,a,d),b&&c!==j&&i(j,a,b)}:i,L=function(a){var b=h[a]=k(g.prototype);return b._k=a,w&&n&&y(j,a,{configurable:!0,set:function(b){d(this,c)&&d(this[c],a)&&(this[c][a]=!1),y(this,a,v(1,b))}}),b},r=function(a){return"symbol"==typeof a},t=function defineProperty(a,b,e){return e&&d(h,b)?(e.enumerable?(d(a,c)&&a[c][b]&&(a[c][b]=!1),e=k(e,{enumerable:v(0,!1)})):(d(a,c)||i(a,c,v(1,{})),a[c][b]=!0),y(a,b,e)):i(a,b,e)},u=function defineProperties(a,b){O(a);for(var c,d=Q(b=p(b)),e=0,f=d.length;f>e;)t(a,c=d[e++],b[c]);return a},F=function create(b,c){return c===a?k(b):u(k(b),c)},E=function propertyIsEnumerable(a){var b=N.call(this,a);return b||!d(this,a)||!d(h,a)||d(this,c)&&this[c][a]?b:!0},D=function getOwnPropertyDescriptor(a,b){var e=I(a=p(a),b);return!e||!d(h,b)||d(a,c)&&a[c][b]||(e.enumerable=!0),e},B=function getOwnPropertyNames(g){for(var a,b=z(p(g)),e=[],f=0;b.length>f;)d(h,a=b[f++])||a==c||e.push(a);return e},M=function getOwnPropertySymbols(f){for(var a,b=z(p(f)),c=[],e=0;b.length>e;)d(h,a=b[e++])&&c.push(h[a]);return c},T=function stringify(e){if(e!==a&&!r(e)){for(var b,c,d=[e],f=1,g=arguments;g.length>f;)d.push(g[f++]);return b=d[1],"function"==typeof b&&(c=b),(c||!P(b))&&(b=function(b,a){return c&&(a=c.call(this,b,a)),r(a)?void 0:a}),d[1]=b,m.apply(l,d)}},U=H(function(){var a=g();return"[null]"!=m([a])||"{}"!=m({a:a})||"{}"!=m(Object(a))});q||(g=function Symbol(){if(r(this))throw TypeError("Symbol is not a constructor");return L(S(arguments.length>0?arguments[0]:a))},G(g.prototype,"toString",function toString(){return this._k}),r=function(a){return a instanceof g},e.create=F,e.isEnum=E,e.getDesc=D,e.setDesc=t,e.setDescs=u,e.getNames=C.get=B,e.getSymbols=M,w&&!b(39)&&G(j,"propertyIsEnumerable",E,!0));var K={"for":function(a){return d(o,a+="")?o[a]:o[a]=g(a)},keyFor:function keyFor(a){return R(o,a)},useSetter:function(){n=!0},useSimple:function(){n=!1}};e.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=A(a);K[a]=q?b:L(b)}),n=!0,f(f.G+f.W,{Symbol:g}),f(f.S,"Symbol",K),f(f.S+f.F*!q,"Object",{create:F,defineProperty:t,defineProperties:u,getOwnPropertyDescriptor:D,getOwnPropertyNames:B,getOwnPropertySymbols:M}),l&&f(f.S+f.F*(!q||U),"JSON",{stringify:T}),s(g,"Symbol"),s(Math,"Math",!0),s(x.JSON,"JSON",!0)},function(a,c,b){a.exports=b(34)},function(b,e,a){var c=a(2),d=a(10);b.exports=a(8)?function(a,b,e){return c.setDesc(a,b,d(1,e))}:function(a,b,c){return a[b]=c,a}},function(c,f,a){var d=a(2).setDesc,e=a(14),b=a(29)("toStringTag");c.exports=function(a,c,f){a&&!e(a=f?a:a.prototype,b)&&d(a,b,{configurable:!0,value:c})}},function(b,e,a){var c=a(2),d=a(20);b.exports=function(g,h){for(var a,b=d(g),e=c.getKeys(b),i=e.length,f=0;i>f;)if(b[a=e[f++]]===h)return a}},function(d,h,a){var e=a(20),b=a(2).getNames,f={}.toString,c="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(a){try{return b(a)}catch(d){return c.slice()}};d.exports.get=function getOwnPropertyNames(a){return c&&"[object Window]"==f.call(a)?g(a):b(e(a))}},function(b,d,c){var a=c(2);b.exports=function(b){var c=a.getKeys(b),d=a.getSymbols;if(d)for(var e,f=d(b),h=a.isEnum,g=0;f.length>g;)h.call(b,e=f[g++])&&c.push(e);return c}},function(a,b){a.exports=!0},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{assign:b(41)})},function(c,f,a){var b=a(2),d=a(18),e=a(21);c.exports=a(9)(function(){var a=Object.assign,b={},c={},d=Symbol(),e="abcdefghijklmnopqrst";return b[d]=7,e.split("").forEach(function(a){c[a]=a}),7!=a({},b)[d]||Object.keys(a({},c)).join("")!=e})?function assign(n,q){for(var g=d(n),h=arguments,o=h.length,j=1,f=b.getKeys,l=b.getSymbols,m=b.isEnum;o>j;)for(var c,a=e(h[j++]),k=l?f(a).concat(l(a)):f(a),p=k.length,i=0;p>i;)m.call(a,c=k[i++])&&(g[c]=a[c]);return g}:Object.assign},function(c,d,a){var b=a(3);b(b.S,"Object",{is:a(43)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(c,d,a){var b=a(3);b(b.S,"Object",{setPrototypeOf:a(45).set})},function(d,h,b){var e=b(2).getDesc,f=b(13),g=b(17),c=function(b,a){if(g(b),!f(a)&&null!==a)throw TypeError(a+": can't set as prototype!")};d.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(f,a,d){try{d=b(6)(Function.call,e(Object.prototype,"__proto__").set,2),d(f,[]),a=!(f instanceof Array)}catch(g){a=!0}return function setPrototypeOf(b,e){return c(b,e),a?b.__proto__=e:d(b,e),b}}({},!1):a),check:c}},function(c,d,a){var b=a(13);a(47)("freeze",function(a){return function freeze(c){return a&&b(c)?a(c):c}})},function(c,f,a){var b=a(3),d=a(5),e=a(9);c.exports=function(a,g){var c=(d.Object||{})[a]||Object[a],f={};f[a]=g(c),b(b.S+b.F*e(function(){c(1)}),"Object",f)}},function(c,d,a){var b=a(13);a(47)("seal",function(a){return function seal(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(13);a(47)("preventExtensions",function(a){return function preventExtensions(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(13);a(47)("isFrozen",function(a){return function isFrozen(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(13);a(47)("isSealed",function(a){return function isSealed(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(13);a(47)("isExtensible",function(a){return function isExtensible(c){return b(c)?a?a(c):!0:!1}})},function(c,d,a){var b=a(20);a(47)("getOwnPropertyDescriptor",function(a){return function getOwnPropertyDescriptor(c,d){return a(b(c),d)}})},function(c,d,a){var b=a(18);a(47)("getPrototypeOf",function(a){return function getPrototypeOf(c){return a(b(c))}})},function(c,d,a){var b=a(18);a(47)("keys",function(a){return function keys(c){return a(b(c))}})},function(b,c,a){a(47)("getOwnPropertyNames",function(){return a(37).get})},function(f,g,a){var b=a(2),c=a(13),d=a(29)("hasInstance"),e=Function.prototype;d in e||b.setDesc(e,d,{value:function(a){if("function"!=typeof this||!c(a))return!1;if(!c(this.prototype))return a instanceof this;for(;a=b.getProto(a);)if(this.prototype===a)return!0;return!1}})},function(c,d,b){var a=b(3);a(a.S,"Number",{EPSILON:Math.pow(2,-52)})},function(d,e,a){var b=a(3),c=a(4).isFinite;b(b.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&c(a)}})},function(c,d,a){var b=a(3);b(b.S,"Number",{isInteger:a(61)})},function(a,e,b){var c=b(13),d=Math.floor;a.exports=function isInteger(a){return!c(a)&&isFinite(a)&&d(a)===a}},function(c,d,b){var a=b(3);a(a.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(e,f,a){var b=a(3),c=a(61),d=Math.abs;b(b.S,"Number",{isSafeInteger:function isSafeInteger(a){return c(a)&&d(a)<=9007199254740991}})},function(c,d,b){var a=b(3);a(a.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseFloat:parseFloat})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseInt:parseInt})},function(f,g,b){var a=b(3),e=b(69),c=Math.sqrt,d=Math.acosh;a(a.S+a.F*!(d&&710==Math.floor(d(Number.MAX_VALUE))),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+c(a-1)*c(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&1e-8>a?a-a*a/2:Math.log(1+a)}},function(c,d,b){function asinh(a){return isFinite(a=+a)&&0!=a?0>a?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var a=b(3);a(a.S,"Math",{asinh:asinh})},function(c,d,b){var a=b(3);a(a.S,"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(d,e,a){var b=a(3),c=a(73);b(b.S,"Math",{cbrt:function cbrt(a){return c(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:0>a?-1:1}},function(c,d,b){var a=b(3);a(a.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(d,e,c){var a=c(3),b=Math.exp;a(a.S,"Math",{cosh:function cosh(a){return(b(a=+a)+b(-a))/2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{expm1:a(77)})},function(a,b){a.exports=Math.expm1||function expm1(a){return 0==(a=+a)?a:a>-1e-6&&1e-6>a?a+a*a/2:Math.exp(a)-1}},function(k,j,e){var f=e(3),g=e(73),a=Math.pow,d=a(2,-52),b=a(2,-23),i=a(2,127)*(2-b),c=a(2,-126),h=function(a){return a+1/d-1/d};f(f.S,"Math",{fround:function fround(k){var f,a,e=Math.abs(k),j=g(k);return c>e?j*h(e/c/b)*c*b:(f=(1+b/d)*e,a=f-(f-e),a>i||a!=a?j*(1/0):j*a)}})},function(d,e,b){var a=b(3),c=Math.abs;a(a.S,"Math",{hypot:function hypot(i,j){for(var a,b,e=0,f=0,g=arguments,h=g.length,d=0;h>f;)a=c(g[f++]),a>d?(b=d/a,e=e*b*b+1,d=a):a>0?(b=a/d,e+=b*b):e+=a;return d===1/0?1/0:d*Math.sqrt(e)}})},function(d,e,b){var a=b(3),c=Math.imul;a(a.S+a.F*b(9)(function(){return-5!=c(4294967295,5)||2!=c.length}),"Math",{imul:function imul(f,g){var a=65535,b=+f,c=+g,d=a&b,e=a&c;return 0|d*e+((a&b>>>16)*e+d*(a&c>>>16)<<16>>>0)}})},function(c,d,b){var a=b(3);a(a.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(c,d,a){var b=a(3);b(b.S,"Math",{log1p:a(69)})},function(c,d,b){var a=b(3);a(a.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{sign:a(73)})},function(e,f,a){var b=a(3),c=a(77),d=Math.exp;b(b.S+b.F*a(9)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(c(a)-c(-a))/2:(d(a-1)-d(-a-1))*(Math.E/2)}})},function(e,f,a){var b=a(3),c=a(77),d=Math.exp;b(b.S,"Math",{tanh:function tanh(a){var b=c(a=+a),e=c(-a);return b==1/0?1:e==1/0?-1:(b-e)/(d(a)+d(-a))}})},function(c,d,b){var a=b(3);a(a.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(f,g,b){var a=b(3),e=b(23),c=String.fromCharCode,d=String.fromCodePoint;a(a.S+a.F*(!!d&&1!=d.length),"String",{fromCodePoint:function fromCodePoint(h){for(var a,b=[],d=arguments,g=d.length,f=0;g>f;){if(a=+d[f++],e(a,1114111)!==a)throw RangeError(a+" is not a valid code point");b.push(65536>a?c(a):c(((a-=65536)>>10)+55296,a%1024+56320))}return b.join("")}})},function(e,f,a){var b=a(3),c=a(20),d=a(24);b(b.S,"String",{raw:function raw(g){for(var e=c(g.raw),h=d(e.length),f=arguments,i=f.length,b=[],a=0;h>a;)b.push(String(e[a++])),i>a&&b.push(String(f[a]));return b.join("")}})},function(b,c,a){a(91)("trim",function(a){return function trim(){return a(this,3)}})},function(g,m,b){var c=b(3),h=b(19),i=b(9),d=" \n \f\r   ᠎              \u2028\u2029\ufeff",a="["+d+"]",f="​…",j=RegExp("^"+a+a+"*"),k=RegExp(a+a+"*$"),e=function(a,e){var b={};b[a]=e(l),c(c.P+c.F*i(function(){return!!d[a]()||f[a]()!=f}),"String",b)},l=e.trim=function(a,b){return a=String(h(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};g.exports=e},function(d,e,a){var b=a(3),c=a(93)(!1);b(b.P,"String",{codePointAt:function codePointAt(a){return c(this,a)}})},function(c,f,b){var d=b(22),e=b(19);c.exports=function(b){return function(j,k){var f,h,g=String(e(j)),c=d(k),i=g.length;return 0>c||c>=i?b?"":a:(f=g.charCodeAt(c),55296>f||f>56319||c+1===i||(h=g.charCodeAt(c+1))<56320||h>57343?b?g.charAt(c):f:b?g.slice(c,c+2):(f-55296<<10)+(h-56320)+65536)}}},function(h,i,b){var c=b(3),e=b(24),g=b(95),d="endsWith",f=""[d];c(c.P+c.F*b(97)(d),"String",{endsWith:function endsWith(i){var b=g(this,i,d),j=arguments,k=j.length>1?j[1]:a,l=e(b.length),c=k===a?l:Math.min(e(k),l),h=String(i);return f?f.call(b,h,c):b.slice(c-h.length,c)===h}})},function(b,e,a){var c=a(96),d=a(19);b.exports=function(a,b,e){if(c(b))throw TypeError("String#"+e+" doesn't accept regex!");return String(d(a))}},function(c,g,b){var d=b(13),e=b(15),f=b(29)("match");c.exports=function(b){var c;return d(b)&&((c=b[f])!==a?!!c:"RegExp"==e(b))}},function(a,d,b){var c=b(29)("match");a.exports=function(b){var a=/./;try{"/./"[b](a)}catch(d){try{return a[c]=!1,!"/./"[b](a)}catch(e){}}return!0}},function(f,g,b){var c=b(3),e=b(95),d="includes";c(c.P+c.F*b(97)(d),"String",{includes:function includes(b){return!!~e(this,b,d).indexOf(b,arguments.length>1?arguments[1]:a)}})},function(c,d,a){var b=a(3);b(b.P,"String",{repeat:a(100)})},function(b,e,a){var c=a(22),d=a(19);b.exports=function repeat(f){var b=String(d(this)),e="",a=c(f);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(b+=b))1&a&&(e+=b);return e}},function(h,i,b){var c=b(3),f=b(24),g=b(95),d="startsWith",e=""[d];c(c.P+c.F*b(97)(d),"String",{startsWith:function startsWith(i){var b=g(this,i,d),j=arguments,c=f(Math.min(j.length>1?j[1]:a,b.length)),h=String(i);return e?e.call(b,h,c):b.slice(c,c+h.length)===h}})},function(d,e,b){var c=b(93)(!0);b(103)(String,"String",function(a){this._t=String(a),this._i=0},function(){var b,d=this._t,e=this._i;return e>=d.length?{value:a,done:!0}:(b=c(d,e),this._i+=b.length,{value:b,done:!1})})},function(o,r,a){var i=a(39),d=a(3),n=a(33),h=a(34),m=a(14),f=a(104),q=a(105),p=a(35),l=a(2).getProto,c=a(29)("iterator"),e=!([].keys&&"next"in[].keys()),j="@@iterator",k="keys",b="values",g=function(){return this};o.exports=function(B,v,u,F,s,E,A){q(u,v,F);var r,x,w=function(c){if(!e&&c in a)return a[c];switch(c){case k:return function keys(){return new u(this,c)};case b:return function values(){return new u(this,c)}}return function entries(){return new u(this,c)}},C=v+" Iterator",y=s==b,z=!1,a=B.prototype,t=a[c]||a[j]||s&&a[s],o=t||w(s);if(t){var D=l(o.call(new B));p(D,C,!0),!i&&m(a,j)&&h(D,c,g),y&&t.name!==b&&(z=!0,o=function values(){return t.call(this)})}if(i&&!A||!e&&!z&&a[c]||h(a,c,o),f[v]=o,f[C]=g,s)if(r={values:y?o:w(b),keys:E?o:w(k),entries:y?w("entries"):o},A)for(x in r)x in a||n(a,x,r[x]);else d(d.P+d.F*(e||z),v,r);return r}},function(a,b){a.exports={}},function(c,g,a){var d=a(2),e=a(10),f=a(35),b={};a(34)(b,a(29)("iterator"),function(){return this}),c.exports=function(a,c,g){a.prototype=d.create(b,{next:e(1,g)}),f(a,c+" Iterator")}},function(j,k,b){var d=b(6),c=b(3),e=b(18),f=b(107),g=b(108),h=b(24),i=b(109);c(c.S+c.F*!b(111)(function(a){Array.from(a)}),"Array",{from:function from(t){var n,c,r,m,j=e(t),l="function"==typeof this?this:Array,p=arguments,s=p.length,k=s>1?p[1]:a,q=k!==a,b=0,o=i(j);if(q&&(k=d(k,s>2?p[2]:a,2)),o==a||l==Array&&g(o))for(n=h(j.length),c=new l(n);n>b;b++)c[b]=q?k(j[b],b):j[b];else for(m=o.call(j),c=new l;!(r=m.next()).done;b++)c[b]=q?f(m,k,[r.value,b],!0):r.value;return c.length=b,c}})},function(c,e,d){var b=d(17);c.exports=function(d,e,c,g){try{return g?e(b(c)[0],c[1]):e(c)}catch(h){var f=d["return"];throw f!==a&&b(f.call(d)),h}}},function(c,g,b){var d=b(104),e=b(29)("iterator"),f=Array.prototype;c.exports=function(b){return b!==a&&(d.Array===b||f[e]===b)}},function(c,g,b){var d=b(110),e=b(29)("iterator"),f=b(104);c.exports=b(5).getIteratorMethod=function(b){return b!=a?b[e]||b["@@iterator"]||f[d(b)]:void 0}},function(d,g,c){var b=c(15),e=c(29)("toStringTag"),f="Arguments"==b(function(){return arguments}());d.exports=function(d){var c,g,h;return d===a?"Undefined":null===d?"Null":"string"==typeof(g=(c=Object(d))[e])?g:f?b(c):"Object"==(h=b(c))&&"function"==typeof c.callee?"Arguments":h}},function(d,f,e){var a=e(29)("iterator"),b=!1;try{var c=[7][a]();c["return"]=function(){b=!0},Array.from(c,function(){throw 2})}catch(g){}d.exports=function(f,g){if(!g&&!b)return!1;var d=!1;try{var c=[7],e=c[a]();e.next=function(){return{done:d=!0}},c[a]=function(){return e},f(c)}catch(h){}return d}},function(c,d,b){var a=b(3);a(a.S+a.F*b(9)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,d=arguments,b=d.length,c=new("function"==typeof this?this:Array)(b);b>a;)c[a]=d[a++];return c.length=b,c}})},function(f,h,b){var d=b(114),c=b(115),e=b(104),g=b(20);f.exports=b(103)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var d=this._t,e=this._k,b=this._i++;return!d||b>=d.length?(this._t=a,c(1)):"keys"==e?c(0,b):"values"==e?c(0,d[b]):c(0,[b,d[b]])},"values"),e.Arguments=e.Array,d("keys"),d("values"),d("entries")},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(b,c,a){a(117)("Array")},function(c,g,a){var d=a(5),e=a(2),f=a(8),b=a(29)("species");c.exports=function(c){var a=d[c];f&&a&&!a[b]&&e.setDesc(a,b,{configurable:!0,get:function(){return this}})}},function(c,d,a){var b=a(3);b(b.P,"Array",{copyWithin:a(119)}),a(114)("copyWithin")},function(d,g,b){var e=b(18),c=b(23),f=b(24);d.exports=[].copyWithin||function copyWithin(m,n){var g=e(this),h=f(g.length),b=c(m,h),d=c(n,h),k=arguments,l=k.length>2?k[2]:a,i=Math.min((l===a?h:c(l,h))-d,h-b),j=1;for(b>d&&d+i>b&&(j=-1,d+=i-1,b+=i-1);i-->0;)d in g?g[b]=g[d]:delete g[b],b+=j,d+=j;return g}},function(c,d,a){var b=a(3);b(b.P,"Array",{fill:a(121)}),a(114)("fill")},function(d,g,b){var e=b(18),c=b(23),f=b(24);d.exports=[].fill||function fill(k){for(var b=e(this),d=f(b.length),g=arguments,h=g.length,i=c(h>1?g[1]:a,d),j=h>2?g[2]:a,l=j===a?d:c(j,d);l>i;)b[i++]=k;return b}},function(g,h,b){var c=b(3),f=b(26)(5),d="find",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{find:function find(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(114)(d)},function(g,h,b){var c=b(3),f=b(26)(6),d="findIndex",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{findIndex:function findIndex(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(114)(d)},function(K,J,b){var s,l=b(2),F=b(39),k=b(4),j=b(6),I=b(110),d=b(3),D=b(13),E=b(17),m=b(7),G=b(125),p=b(126),q=b(45).set,A=b(43),B=b(29)("species"),z=b(127),v=b(128),e="Promise",o=k.process,H="process"==I(o),c=k[e],i=function(){},r=function(d){var b,a=new c(i);return d&&(a.constructor=function(a){a(i,i)}),(b=c.resolve(a))["catch"](i),b===a},h=function(){function P2(b){var a=new c(b);return q(a,P2.prototype),a}var a=!1;try{if(a=c&&c.resolve&&r(),q(P2,c),P2.prototype=l.create(c.prototype,{constructor:{value:P2}}),P2.resolve(5).then(function(){})instanceof P2||(a=!1),a&&b(8)){var d=!1;c.resolve(l.setDesc({},"then",{get:function(){d=!0}})),a=d}}catch(e){a=!1}return a}(),C=function(a,b){return F&&a===c&&b===s?!0:A(a,b)},t=function(b){var c=E(b)[B];return c!=a?c:b},u=function(a){var b;return D(a)&&"function"==typeof(b=a.then)?b:!1},g=function(d){var b,c;this.promise=new d(function(d,e){if(b!==a||c!==a)throw TypeError("Bad Promise constructor");b=d,c=e}),this.resolve=m(b),this.reject=m(c)},w=function(a){try{a()}catch(b){return{error:b}}},n=function(b,d){if(!b.n){b.n=!0;var c=b.c;v(function(){for(var e=b.v,f=1==b.s,g=0,h=function(a){var c,h,g=f?a.ok:a.fail,i=a.resolve,d=a.reject;try{g?(f||(b.h=!0),c=g===!0?e:g(e),c===a.promise?d(TypeError("Promise-chain cycle")):(h=u(c))?h.call(c,i,d):i(c)):d(e)}catch(j){d(j)}};c.length>g;)h(c[g++]);c.length=0,b.n=!1,d&&setTimeout(function(){var f,c,d=b.p;y(d)&&(H?o.emit("unhandledRejection",e,d):(f=k.onunhandledrejection)?f({promise:d,reason:e}):(c=k.console)&&c.error&&c.error("Unhandled promise rejection",e)),b.a=a},1)})}},y=function(e){var a,b=e._d,c=b.a||b.c,d=0;if(b.h)return!1;for(;c.length>d;)if(a=c[d++],a.fail||!y(a.promise))return!1;return!0},f=function(b){var a=this;a.d||(a.d=!0,a=a.r||a,a.v=b,a.s=2,a.a=a.c.slice(),n(a,!0))},x=function(b){var c,a=this;if(!a.d){a.d=!0,a=a.r||a;try{if(a.p===b)throw TypeError("Promise can't be resolved itself");(c=u(b))?v(function(){var d={r:a,d:!1};try{c.call(b,j(x,d,1),j(f,d,1))}catch(e){f.call(d,e)}}):(a.v=b,a.s=1,n(a,!1))}catch(d){f.call({r:a,d:!1},d)}}};h||(c=function Promise(d){m(d);var b=this._d={p:G(this,c,e),c:[],a:a,s:0,d:!1,v:a,h:!1,n:!1};try{d(j(x,b,1),j(f,b,1))}catch(g){f.call(b,g)}},b(130)(c.prototype,{then:function then(d,e){var a=new g(z(this,c)),f=a.promise,b=this._d;return a.ok="function"==typeof d?d:!0,a.fail="function"==typeof e&&e,b.c.push(a),b.a&&b.a.push(a),b.s&&n(b,!1),f},"catch":function(b){return this.then(a,b)}})),d(d.G+d.W+d.F*!h,{Promise:c}),b(35)(c,e),b(117)(e),s=b(5)[e],d(d.S+d.F*!h,e,{reject:function reject(b){var a=new g(this),c=a.reject;return c(b),a.promise}}),d(d.S+d.F*(!h||r(!0)),e,{resolve:function resolve(a){if(a instanceof c&&C(a.constructor,this))return a;var b=new g(this),d=b.resolve;return d(a),b.promise}}),d(d.S+d.F*!(h&&b(111)(function(a){c.all(a)["catch"](function(){})})),e,{all:function all(h){var c=t(this),b=new g(c),d=b.resolve,e=b.reject,a=[],f=w(function(){p(h,!1,a.push,a);var b=a.length,f=Array(b);b?l.each.call(a,function(g,h){var a=!1;c.resolve(g).then(function(c){a||(a=!0,f[h]=c,--b||d(f))},e)}):d(f)});return f&&e(f.error),b.promise},race:function race(e){var b=t(this),a=new g(b),c=a.reject,d=w(function(){p(e,!1,function(d){b.resolve(d).then(a.resolve,c)})});return d&&c(d.error),a.promise}})},function(a,b){a.exports=function(a,b,c){if(!(a instanceof b))throw TypeError(c+": use the 'new' operator!");return a}},function(b,i,a){var c=a(6),d=a(107),e=a(108),f=a(17),g=a(24),h=a(109);b.exports=function(a,j,o,p){var n,b,k,l=h(a),m=c(o,p,j?2:1),i=0;if("function"!=typeof l)throw TypeError(a+" is not iterable!");if(e(l))for(n=g(a.length);n>i;i++)j?m(f(b=a[i])[0],b[1]):m(a[i]);else for(k=l.call(a);!(b=k.next()).done;)d(k,m,b.value,j)}},function(d,g,b){var c=b(17),e=b(7),f=b(29)("species");d.exports=function(g,h){var b,d=c(g).constructor;return d===a||(b=c(d)[f])==a?h:e(b)}},function(n,p,h){var b,f,g,c=h(4),o=h(129).set,k=c.MutationObserver||c.WebKitMutationObserver,d=c.process,i=c.Promise,j="process"==h(15)(d),e=function(){var e,c,g;for(j&&(e=d.domain)&&(d.domain=null,e.exit());b;)c=b.domain,g=b.fn,c&&c.enter(),g(),c&&c.exit(),b=b.next;f=a,e&&e.enter()};if(j)g=function(){d.nextTick(e)};else if(k){var m=1,l=document.createTextNode("");new k(e).observe(l,{characterData:!0}),g=function(){l.data=m=-m}}else g=i&&i.resolve?function(){i.resolve().then(e)}:function(){o.call(c,e)};n.exports=function asap(e){var c={fn:e,next:a,domain:j&&d.domain};f&&(f.next=c),b||(b=c,g()),f=c}},function(s,t,b){var c,g,f,k=b(6),r=b(16),n=b(11),p=b(12),a=b(4),l=a.process,h=a.setImmediate,i=a.clearImmediate,o=a.MessageChannel,j=0,d={},q="onreadystatechange",e=function(){
+var a=+this;if(d.hasOwnProperty(a)){var b=d[a];delete d[a],b()}},m=function(a){e.call(a.data)};h&&i||(h=function setImmediate(a){for(var b=[],e=1;arguments.length>e;)b.push(arguments[e++]);return d[++j]=function(){r("function"==typeof a?a:Function(a),b)},c(j),j},i=function clearImmediate(a){delete d[a]},"process"==b(15)(l)?c=function(a){l.nextTick(k(e,a,1))}:o?(g=new o,f=g.port2,g.port1.onmessage=m,c=k(f.postMessage,f,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts?(c=function(b){a.postMessage(b+"","*")},a.addEventListener("message",m,!1)):c=q in p("script")?function(a){n.appendChild(p("script"))[q]=function(){n.removeChild(this),e.call(a)}}:function(a){setTimeout(k(e,a,1),0)}),s.exports={set:h,clear:i}},function(a,d,b){var c=b(33);a.exports=function(a,b){for(var d in b)c(a,d,b[d]);return a}},function(d,e,c){var b=c(132);c(133)("Map",function(b){return function Map(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(c){var a=b.getEntry(this,c);return a&&a.v},set:function set(a,c){return b.def(this,0===a?0:a,c)}},b,!0)},function(v,w,b){var j=b(2),m=b(34),o=b(130),n=b(6),p=b(125),r=b(19),t=b(126),l=b(103),d=b(115),f=b(25)("id"),k=b(14),h=b(13),q=b(117),i=b(8),s=Object.isExtensible||h,c=i?"_s":"size",u=0,g=function(a,b){if(!h(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!k(a,f)){if(!s(a))return"F";if(!b)return"E";m(a,f,++u)}return"O"+a[f]},e=function(b,c){var a,d=g(c);if("F"!==d)return b._i[d];for(a=b._f;a;a=a.n)if(a.k==c)return a};v.exports={getConstructor:function(d,f,g,h){var b=d(function(d,e){p(d,b,f),d._i=j.create(null),d._f=a,d._l=a,d[c]=0,e!=a&&t(e,g,d[h],d)});return o(b.prototype,{clear:function clear(){for(var d=this,e=d._i,b=d._f;b;b=b.n)b.r=!0,b.p&&(b.p=b.p.n=a),delete e[b.i];d._f=d._l=a,d[c]=0},"delete":function(g){var b=this,a=e(b,g);if(a){var d=a.n,f=a.p;delete b._i[a.i],a.r=!0,f&&(f.n=d),d&&(d.p=f),b._f==a&&(b._f=d),b._l==a&&(b._l=f),b[c]--}return!!a},forEach:function forEach(c){for(var b,d=n(c,arguments.length>1?arguments[1]:a,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!e(this,a)}}),i&&j.setDesc(b.prototype,"size",{get:function(){return r(this[c])}}),b},def:function(b,f,j){var h,i,d=e(b,f);return d?d.v=j:(b._l=d={i:i=g(f,!0),k:f,v:j,p:h=b._l,n:a,r:!1},b._f||(b._f=d),h&&(h.n=d),b[c]++,"F"!==i&&(b._i[i]=d)),b},getEntry:e,setStrong:function(e,b,c){l(e,b,function(b,c){this._t=b,this._k=c,this._l=a},function(){for(var c=this,e=c._k,b=c._l;b&&b.r;)b=b.p;return c._t&&(c._l=b=b?b.n:c._t._f)?"keys"==e?d(0,b.k):"values"==e?d(0,b.v):d(0,[b.k,b.v]):(c._t=a,d(1))},c?"entries":"values",!c,!0),q(b)}}},function(g,o,b){var d=b(2),f=b(4),c=b(3),h=b(9),e=b(34),j=b(130),k=b(126),l=b(125),m=b(13),i=b(35),n=b(8);g.exports=function(g,s,w,r,p,o){var t=f[g],b=t,u=p?"set":"add",q=b&&b.prototype,v={};return n&&"function"==typeof b&&(o||q.forEach&&!h(function(){(new b).entries().next()}))?(b=s(function(c,d){l(c,b,g),c._c=new t,d!=a&&k(d,p,c[u],c)}),d.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(c){var d="add"==c||"set"==c;c in q&&(!o||"clear"!=c)&&e(b.prototype,c,function(b,e){if(!d&&o&&!m(b))return"get"==c?a:!1;var f=this._c[c](0===b?0:b,e);return d?this:f})}),"size"in q&&d.setDesc(b.prototype,"size",{get:function(){return this._c.size}})):(b=r.getConstructor(s,g,p,u),j(b.prototype,w)),i(b,g),v[g]=b,c(c.G+c.W+c.F,v),o||r.setStrong(b,g,p),b}},function(d,e,b){var c=b(132);b(133)("Set",function(b){return function Set(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a=0===a?0:a,a)}},c)},function(n,m,b){var l=b(2),k=b(33),c=b(136),d=b(13),j=b(14),i=c.frozenStore,h=c.WEAK,f=Object.isExtensible||d,e={},g=b(133)("WeakMap",function(b){return function WeakMap(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(a){if(d(a)){if(!f(a))return i(this).get(a);if(j(a,h))return a[h][this._i]}},set:function set(a,b){return c.def(this,a,b)}},c,!0,!0);7!=(new g).set((Object.freeze||Object)(e),7).get(e)&&l.each.call(["delete","has","get","set"],function(a){var b=g.prototype,c=b[a];k(b,a,function(b,e){if(d(b)&&!f(b)){var g=i(this)[a](b,e);return"set"==a?this:g}return c.call(this,b,e)})})},function(s,t,b){var r=b(34),q=b(130),m=b(17),h=b(13),l=b(125),k=b(126),j=b(26),d=b(14),c=b(25)("weak"),g=Object.isExtensible||h,n=j(5),o=j(6),p=0,e=function(a){return a._l||(a._l=new i)},i=function(){this.a=[]},f=function(a,b){return n(a.a,function(a){return a[0]===b})};i.prototype={get:function(b){var a=f(this,b);return a?a[1]:void 0},has:function(a){return!!f(this,a)},set:function(a,b){var c=f(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(b){var a=o(this.a,function(a){return a[0]===b});return~a&&this.a.splice(a,1),!!~a}},s.exports={getConstructor:function(f,i,j,m){var b=f(function(c,d){l(c,b,i),c._i=p++,c._l=a,d!=a&&k(d,j,c[m],c)});return q(b.prototype,{"delete":function(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i)&&delete a[c][this._i]:e(this)["delete"](a):!1},has:function has(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i):e(this).has(a):!1}}),b},def:function(b,a,f){return g(m(a))?(d(a,c)||r(a,c,{}),a[c][b._i]=f):e(b).set(a,f),b},frozenStore:e,WEAK:c}},function(d,e,b){var c=b(136);b(133)("WeakSet",function(b){return function WeakSet(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a,!0)}},c,!1,!0)},function(e,f,a){var b=a(3),c=Function.apply,d=a(17);b(b.S,"Reflect",{apply:function apply(a,b,e){return c.call(a,b,d(e))}})},function(h,i,a){var e=a(2),b=a(3),c=a(7),f=a(17),d=a(13),g=Function.bind||a(5).Function.prototype.bind;b(b.S+b.F*a(9)(function(){function F(){}return!(Reflect.construct(function(){},[],F)instanceof F)}),"Reflect",{construct:function construct(b,a){c(b),f(a);var i=arguments.length<3?b:c(arguments[2]);if(b==i){switch(a.length){case 0:return new b;case 1:return new b(a[0]);case 2:return new b(a[0],a[1]);case 3:return new b(a[0],a[1],a[2]);case 4:return new b(a[0],a[1],a[2],a[3])}var h=[null];return h.push.apply(h,a),new(g.apply(b,h))}var j=i.prototype,k=e.create(d(j)?j:Object.prototype),l=Function.apply.call(b,k,a);return d(l)?l:k}})},function(e,f,a){var c=a(2),b=a(3),d=a(17);b(b.S+b.F*a(9)(function(){Reflect.defineProperty(c.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,e){d(a);try{return c.setDesc(a,b,e),!0}catch(f){return!1}}})},function(e,f,a){var b=a(3),c=a(2).getDesc,d=a(17);b(b.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var e=c(d(a),b);return e&&!e.configurable?!1:delete a[b]}})},function(f,g,b){var c=b(3),e=b(17),d=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};b(105)(d,"Object",function(){var c,b=this,d=b._k;do if(b._i>=d.length)return{value:a,done:!0};while(!((c=d[b._i++])in b._t));return{value:c,done:!1}}),c(c.S,"Reflect",{enumerate:function enumerate(a){return new d(a)}})},function(h,i,b){function get(b,h){var d,j,i=arguments.length<3?b:arguments[2];return g(b)===i?b[h]:(d=c.getDesc(b,h))?e(d,"value")?d.value:d.get!==a?d.get.call(i):a:f(j=c.getProto(b))?get(j,h,i):void 0}var c=b(2),e=b(14),d=b(3),f=b(13),g=b(17);d(d.S,"Reflect",{get:get})},function(e,f,a){var c=a(2),b=a(3),d=a(17);b(b.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return c.getDesc(d(a),b)}})},function(e,f,a){var b=a(3),c=a(2).getProto,d=a(17);b(b.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return c(d(a))}})},function(c,d,b){var a=b(3);a(a.S,"Reflect",{has:function has(a,b){return b in a}})},function(e,f,a){var b=a(3),d=a(17),c=Object.isExtensible;b(b.S,"Reflect",{isExtensible:function isExtensible(a){return d(a),c?c(a):!0}})},function(c,d,a){var b=a(3);b(b.S,"Reflect",{ownKeys:a(149)})},function(d,f,a){var b=a(2),e=a(17),c=a(4).Reflect;d.exports=c&&c.ownKeys||function ownKeys(a){var c=b.getNames(e(a)),d=b.getSymbols;return d?c.concat(d(a)):c}},function(e,f,a){var b=a(3),d=a(17),c=Object.preventExtensions;b(b.S,"Reflect",{preventExtensions:function preventExtensions(a){d(a);try{return c&&c(a),!0}catch(b){return!1}}})},function(i,j,b){function set(j,i,k){var l,m,d=arguments.length<4?j:arguments[3],b=c.getDesc(h(j),i);if(!b){if(f(m=c.getProto(j)))return set(m,i,k,d);b=e(0)}return g(b,"value")?b.writable!==!1&&f(d)?(l=c.getDesc(d,i)||e(0),l.value=k,c.setDesc(d,i,l),!0):!1:b.set===a?!1:(b.set.call(d,k),!0)}var c=b(2),g=b(14),d=b(3),e=b(10),h=b(17),f=b(13);d(d.S,"Reflect",{set:set})},function(d,e,b){var c=b(3),a=b(45);a&&c(c.S,"Reflect",{setPrototypeOf:function setPrototypeOf(b,c){a.check(b,c);try{return a.set(b,c),!0}catch(d){return!1}}})},function(e,f,b){var c=b(3),d=b(31)(!0);c(c.P,"Array",{includes:function includes(b){return d(this,b,arguments.length>1?arguments[1]:a)}}),b(114)("includes")},function(d,e,a){var b=a(3),c=a(93)(!0);b(b.P,"String",{at:function at(a){return c(this,a)}})},function(e,f,b){var c=b(3),d=b(156);c(c.P,"String",{padLeft:function padLeft(b){return d(this,b,arguments.length>1?arguments[1]:a,!0)}})},function(c,g,b){var d=b(24),e=b(100),f=b(19);c.exports=function(l,m,i,n){var c=String(f(l)),j=c.length,g=i===a?" ":String(i),k=d(m);if(j>=k)return c;""==g&&(g=" ");var h=k-j,b=e.call(g,Math.ceil(h/g.length));return b.length>h&&(b=b.slice(0,h)),n?b+c:c+b}},function(e,f,b){var c=b(3),d=b(156);c(c.P,"String",{padRight:function padRight(b){return d(this,b,arguments.length>1?arguments[1]:a,!1)}})},function(b,c,a){a(91)("trimLeft",function(a){return function trimLeft(){return a(this,1)}})},function(b,c,a){a(91)("trimRight",function(a){return function trimRight(){return a(this,2)}})},function(d,e,a){var b=a(3),c=a(161)(/[\\^$*+?.()|[\]{}]/g,"\\$&");b(b.S,"RegExp",{escape:function escape(a){return c(a)}})},function(a,b){a.exports=function(b,a){var c=a===Object(a)?function(b){return a[b]}:a;return function(a){return String(a).replace(b,c)}}},function(g,h,a){var b=a(2),c=a(3),d=a(149),e=a(20),f=a(10);c(c.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(k){for(var a,g,h=e(k),l=b.setDesc,m=b.getDesc,i=d(h),c={},j=0;i.length>j;)g=m(h,a=i[j++]),a in c?l(c,a,f(0,g)):c[a]=g;return c}})},function(d,e,a){var b=a(3),c=a(164)(!1);b(b.S,"Object",{values:function values(a){return c(a)}})},function(c,f,a){var b=a(2),d=a(20),e=b.isEnum;c.exports=function(a){return function(j){for(var c,f=d(j),g=b.getKeys(f),k=g.length,h=0,i=[];k>h;)e.call(f,c=g[h++])&&i.push(a?[c,f[c]]:f[c]);return i}}},function(d,e,a){var b=a(3),c=a(164)(!0);b(b.S,"Object",{entries:function entries(a){return c(a)}})},function(c,d,a){var b=a(3);b(b.P,"Map",{toJSON:a(167)("Map")})},function(b,e,a){var c=a(126),d=a(110);b.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");var b=[];return c(this,!1,b.push,b),b}}},function(c,d,a){var b=a(3);b(b.P,"Set",{toJSON:a(167)("Set")})},function(d,e,b){var a=b(3),c=b(129);a(a.G+a.B,{setImmediate:c.set,clearImmediate:c.clear})},function(c,d,b){b(113);var a=b(104);a.NodeList=a.HTMLCollection=a.Array},function(i,j,a){var c=a(4),b=a(3),g=a(16),h=a(172),d=c.navigator,e=!!d&&/MSIE .\./.test(d.userAgent),f=function(a){return e?function(b,c){return a(g(h,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};b(b.G+b.B+b.F*e,{setTimeout:f(c.setTimeout),setInterval:f(c.setInterval)})},function(c,f,a){var d=a(173),b=a(16),e=a(7);c.exports=function(){for(var h=e(this),a=arguments.length,c=Array(a),f=0,i=d._,g=!1;a>f;)(c[f]=arguments[f++])===i&&(g=!0);return function(){var d,k=this,f=arguments,l=f.length,e=0,j=0;if(!g&&!l)return b(h,c,k);if(d=c.slice(),g)for(;a>e;e++)d[e]===i&&(d[e]=f[j++]);for(;l>j;)d.push(f[j++]);return b(h,d,k)}}},function(a,c,b){a.exports=b(5)},function(x,w,b){function Dict(b){var c=f.create(null);return b!=a&&(r(b)?q(b,!0,function(a,b){c[a]=b}):o(c,b)),c}function reduce(g,h,l){p(h);var a,c,b=i(g),e=k(b),j=e.length,f=0;if(arguments.length<3){if(!j)throw TypeError("Reduce of empty object with no initial value");a=b[e[f++]]}else a=Object(l);for(;j>f;)d(b,c=e[f++])&&(a=h(a,b[c],c,g));return a}function includes(c,b){return(b==b?j(c,b):l(c,function(a){return a!=a}))!==a}function get(a,b){return d(a,b)?a[b]:void 0}function set(a,b,c){return v&&b in Object?f.setDesc(a,b,t(0,c)):a[b]=c,a}function isDict(a){return u(a)&&f.getProto(a)===Dict.prototype}var f=b(2),n=b(6),e=b(3),t=b(10),o=b(41),j=b(36),p=b(7),q=b(126),r=b(175),s=b(105),g=b(115),u=b(13),i=b(20),v=b(8),d=b(14),k=f.getKeys,c=function(b){var e=1==b,c=4==b;return function(l,m,o){var f,h,g,p=n(m,o,3),k=i(l),j=e||7==b||2==b?new("function"==typeof this?this:Dict):a;for(f in k)if(d(k,f)&&(h=k[f],g=p(h,f,l),b))if(e)j[f]=g;else if(g)switch(b){case 2:j[f]=h;break;case 3:return!0;case 5:return h;case 6:return f;case 7:j[g[0]]=g[1]}else if(c)return!1;return 3==b||c?c:j}},l=c(6),h=function(a){return function(b){return new m(b,a)}},m=function(a,b){this._t=i(a),this._a=k(a),this._i=0,this._k=b};s(m,"Dict",function(){var c,b=this,e=b._t,f=b._a,h=b._k;do if(b._i>=f.length)return b._t=a,g(1);while(!d(e,c=f[b._i++]));return"keys"==h?g(0,c):"values"==h?g(0,e[c]):g(0,[c,e[c]])}),Dict.prototype=null,e(e.G+e.F,{Dict:Dict}),e(e.S,"Dict",{keys:h("keys"),values:h("values"),entries:h("entries"),forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findKey:l,mapPairs:c(7),reduce:reduce,keyOf:j,includes:includes,has:d,get:get,set:set,isDict:isDict})},function(c,g,b){var d=b(110),e=b(29)("iterator"),f=b(104);c.exports=b(5).isIterable=function(c){var b=Object(c);return b[e]!==a||"@@iterator"in b||f.hasOwnProperty(d(b))}},function(b,e,a){var c=a(17),d=a(109);b.exports=a(5).getIterator=function(a){var b=d(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return c(b.call(a))}},function(f,g,a){var c=a(4),d=a(5),b=a(3),e=a(172);b(b.G+b.F,{delay:function delay(a){return new(d.Promise||c.Promise)(function(b){setTimeout(e.call(b,!0),a)})}})},function(d,e,a){var c=a(173),b=a(3);a(5)._=c._=c._||{},b(b.P+b.F,"Function",{part:a(172)})},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{isObject:b(13)})},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{classof:b(110)})},function(d,e,b){var a=b(3),c=b(182);a(a.S+a.F,"Object",{define:c})},function(c,f,a){var b=a(2),d=a(149),e=a(20);c.exports=function define(a,c){for(var f,g=d(e(c)),i=g.length,h=0;i>h;)b.setDesc(a,f=g[h++],b.getDesc(c,f));return a}},function(e,f,a){var b=a(3),c=a(182),d=a(2).create;b(b.S+b.F,"Object",{make:function(a,b){return c(d(a),b)}})},function(c,d,b){b(103)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var b=this._i++,c=!(this._l>b);return{done:c,value:c?a:b}})},function(d,e,b){var a=b(3),c=b(161)(/[&<>"']/g,{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});a(a.P+a.F,"String",{escapeHTML:function escapeHTML(){return c(this)}})},function(d,e,b){var a=b(3),c=b(161)(/&(?:amp|lt|gt|quot|apos);/g,{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"});a(a.P+a.F,"String",{unescapeHTML:function unescapeHTML(){return c(this)}})},function(g,h,a){var e=a(2),f=a(4),b=a(3),c={},d=!0;e.each.call("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(","),function(a){c[a]=function(){var b=f.console;return d&&b&&b[a]?Function.apply.call(b[a],b,arguments):void 0}}),b(b.G+b.F,{log:a(41)(c.log,c,{enable:function(){d=!0},disable:function(){d=!1}})})},function(i,j,b){var g=b(2),e=b(3),h=b(6),f=b(5).Array||Array,c={},d=function(d,b){g.each.call(d.split(","),function(d){b==a&&d in f?c[d]=f[d]:d in[]&&(c[d]=h(Function.call,[][d],b))})};d("pop,reverse,shift,keys,values,entries",1),d("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),d("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),e(e.S,"Array",c)}]),"undefined"!=typeof module&&module.exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):c.core=b}(1,1);
//# sourceMappingURL=library.min.js.map \ No newline at end of file
diff --git a/node_modules/core-js/client/library.min.js.map b/node_modules/core-js/client/library.min.js.map
index d62fab82e..56305ad67 100644
--- a/node_modules/core-js/client/library.min.js.map
+++ b/node_modules/core-js/client/library.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","ctx","hide","type","source","own","out","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","IS_WRAP","expProto","target","C","b","virtual","R","U","version","aFunction","fn","that","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","val","bitmap","writable","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","px","random","concat","SHARED","def","TAG","stat","prototype","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","exp","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","join","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","HAS_INSTANCE","FunctionProto","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","String","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","Number","parseFloat","$trim","trim","string","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","TYPE","replace","$parseInt","parseInt","ws","hex","radix","log1p","sqrt","$acosh","acosh","MAX_VALUE","NaN","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$at","codePointAt","pos","TO_STRING","charCodeAt","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","NAME","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","classof","getIteratorMethod","ARG","tryGet","callee","SAFE_CLOSING","riter","skipClosing","safe","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","each","common","IS_WEAK","IS_ADDER","Set","add","InternalMap","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","first","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","$iterDetect","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","match","matchAll","flags","rx","lastIndex","ignoreCase","multiline","unicode","sticky","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","define","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&amp;","&lt;","&gt;","&quot;","&apos;","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"library.min.js"} \ No newline at end of file
+{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","IE8_DOM_DEFINE","$","$export","DESCRIPTORS","createDesc","html","cel","has","cof","invoke","fails","anObject","aFunction","isObject","toObject","toIObject","toInteger","toIndex","toLength","IObject","IE_PROTO","createArrayMethod","arrayIndexOf","ObjectProto","Object","prototype","ArrayProto","Array","arraySlice","slice","arrayJoin","join","defineProperty","setDesc","getOwnDescriptor","getDesc","defineProperties","setDescs","factories","get","a","O","P","Attributes","e","TypeError","value","propertyIsEnumerable","Properties","keys","getKeys","length","i","S","F","getOwnPropertyDescriptor","keys1","split","keys2","concat","keysLen1","createDict","iframeDocument","iframe","gt","style","display","appendChild","src","contentWindow","document","open","write","close","createGetKeys","names","object","key","result","push","Empty","getPrototypeOf","getProto","constructor","getOwnPropertyNames","getNames","create","construct","len","args","n","Function","bind","that","fn","this","partArgs","arguments","bound","begin","end","klass","start","upTo","size","cloned","charAt","separator","isArray","createArrayReduce","isRight","callbackfn","memo","index","methodize","$fn","arg1","forEach","each","map","filter","some","every","reduce","reduceRight","indexOf","lastIndexOf","el","fromIndex","Math","min","now","Date","lz","num","toISOString","NaN","isFinite","RangeError","d","y","getUTCFullYear","getUTCMilliseconds","s","abs","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$Object","isEnum","getSymbols","getOwnPropertySymbols","global","core","ctx","PROTOTYPE","type","name","source","own","out","IS_FORCED","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","IS_WRAP","W","target","C","param","window","self","version","b","apply","it","exec","bitmap","enumerable","configurable","writable","documentElement","is","createElement","hasOwnProperty","toString","un","defined","ceil","floor","isNaN","max","px","random","asc","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$this","val","res","f","SPECIES","original","arg","store","uid","Symbol","SHARED","IS_INCLUDES","redefine","$fails","shared","setToStringTag","wks","keyOf","$names","enumKeys","_create","$Symbol","$JSON","JSON","_stringify","stringify","setter","HIDDEN","SymbolRegistry","AllSymbols","useNative","setSymbolDesc","D","protoDesc","wrap","tag","sym","_k","set","isSymbol","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","$stringify","replacer","$replacer","$$","buggyJSON","symbolStatics","for","keyFor","useSetter","useSimple","def","TAG","stat","windowNames","getWindowNames","symbols","assign","A","K","k","T","$$len","j","x","setPrototypeOf","check","proto","test","buggy","__proto__","$freeze","freeze","KEY","exp","$seal","seal","$preventExtensions","preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","isExtensible","$getPrototypeOf","$keys","HAS_INSTANCE","FunctionProto","EPSILON","pow","_isFinite","isInteger","number","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","parseFloat","parseInt","log1p","sqrt","$acosh","acosh","Number","MAX_VALUE","log","LN2","asinh","atanh","sign","cbrt","clz32","LOG2E","cosh","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","Infinity","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","String","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$trim","trim","spaces","space","non","ltrim","RegExp","rtrim","exporter","string","replace","$at","codePointAt","pos","TO_STRING","charCodeAt","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","search","isRegExp","NAME","MATCH","re","INCLUDES","includes","repeat","count","str","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","LIBRARY","hide","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","Constructor","next","DEFAULT","IS_SET","FORCED","methods","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","IteratorPrototype","descriptor","isArrayIter","getIterFn","iter","from","arrayLike","step","iterator","mapfn","mapping","iterFn","ret","classof","getIteratorMethod","ARG","callee","SAFE_CLOSING","riter","skipClosing","safe","arr","of","addToUnscopables","Arguments","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","Wrapper","strictNew","forOf","setProto","same","speciesConstructor","asap","PROMISE","process","isNode","empty","testResolve","sub","promise","resolve","USE_NATIVE","P2","works","then","thenableThenGotten","sameConstructor","getConstructor","isThenable","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","record","isReject","chain","v","ok","run","reaction","handler","fail","h","setTimeout","console","isUnhandled","emit","onunhandledrejection","reason","_d","$reject","r","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","capability","all","iterable","abrupt","remaining","results","alreadyCalled","race","head","last","macrotask","Observer","MutationObserver","WebKitMutationObserver","flush","parent","domain","exit","enter","nextTick","toggle","node","createTextNode","observe","characterData","data","task","defer","channel","port","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listner","event","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","clear","strong","Map","entry","getEntry","redefineAll","$iterDefine","ID","$has","setSpecies","SIZE","fastKey","_f","ADDER","_l","delete","prev","setStrong","common","IS_WEAK","_c","IS_ADDER","Set","add","weak","frozenStore","WEAK","tmp","$WeakMap","WeakMap","method","arrayFind","arrayFindIndex","FrozenStore","findFrozen","splice","WeakSet","_apply","thisArgument","argumentsList","Reflect","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","ownKeys","V","existingDescriptor","ownDesc","$includes","at","$pad","padLeft","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padRight","trimLeft","trimRight","$re","escape","regExp","part","getOwnPropertyDescriptors","$values","isEntries","$entries","toJSON","$task","NodeList","HTMLCollection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","_","holder","Dict","dict","isIterable","init","findKey","isDict","createDictMethod","createDictIter","DictIterator","_a","mapPairs","getIterator","delay","define","mixin","make","&","<",">","\"","'","escapeHTML","&amp;","&lt;","&gt;","&quot;","&apos;","unescapeHTML","enabled","$console","enable","disable","$ctx","$Array","statics","setStatics","amd"],"mappings":"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","file":"library.min.js"} \ No newline at end of file
diff --git a/node_modules/core-js/client/shim.js b/node_modules/core-js/client/shim.js
index 2947f9375..7a24843dd 100644
--- a/node_modules/core-js/client/shim.js
+++ b/node_modules/core-js/client/shim.js
@@ -1,5 +1,5 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
@@ -53,180 +53,108 @@
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1);
+ __webpack_require__(34);
+ __webpack_require__(40);
+ __webpack_require__(42);
+ __webpack_require__(44);
+ __webpack_require__(46);
+ __webpack_require__(48);
__webpack_require__(50);
__webpack_require__(51);
__webpack_require__(52);
+ __webpack_require__(53);
__webpack_require__(54);
__webpack_require__(55);
+ __webpack_require__(56);
+ __webpack_require__(57);
__webpack_require__(58);
__webpack_require__(59);
__webpack_require__(60);
__webpack_require__(61);
- __webpack_require__(62);
- __webpack_require__(63);
__webpack_require__(64);
__webpack_require__(65);
__webpack_require__(66);
__webpack_require__(68);
+ __webpack_require__(69);
__webpack_require__(70);
+ __webpack_require__(71);
__webpack_require__(72);
+ __webpack_require__(73);
__webpack_require__(74);
+ __webpack_require__(76);
__webpack_require__(77);
__webpack_require__(78);
- __webpack_require__(79);
- __webpack_require__(83);
+ __webpack_require__(80);
+ __webpack_require__(81);
+ __webpack_require__(82);
+ __webpack_require__(84);
+ __webpack_require__(85);
__webpack_require__(86);
__webpack_require__(87);
__webpack_require__(88);
__webpack_require__(89);
+ __webpack_require__(90);
__webpack_require__(91);
__webpack_require__(92);
__webpack_require__(93);
__webpack_require__(94);
__webpack_require__(95);
+ __webpack_require__(96);
__webpack_require__(97);
__webpack_require__(99);
- __webpack_require__(100);
- __webpack_require__(101);
__webpack_require__(103);
__webpack_require__(104);
- __webpack_require__(105);
+ __webpack_require__(106);
__webpack_require__(107);
- __webpack_require__(108);
- __webpack_require__(109);
__webpack_require__(111);
- __webpack_require__(112);
- __webpack_require__(113);
- __webpack_require__(114);
- __webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
- __webpack_require__(118);
- __webpack_require__(119);
__webpack_require__(120);
- __webpack_require__(121);
__webpack_require__(122);
- __webpack_require__(123);
__webpack_require__(124);
__webpack_require__(126);
+ __webpack_require__(127);
+ __webpack_require__(128);
__webpack_require__(130);
__webpack_require__(131);
- __webpack_require__(132);
__webpack_require__(133);
- __webpack_require__(137);
- __webpack_require__(139);
- __webpack_require__(140);
- __webpack_require__(141);
- __webpack_require__(142);
+ __webpack_require__(134);
+ __webpack_require__(135);
+ __webpack_require__(136);
__webpack_require__(143);
- __webpack_require__(144);
- __webpack_require__(145);
__webpack_require__(146);
__webpack_require__(147);
- __webpack_require__(148);
__webpack_require__(149);
__webpack_require__(150);
__webpack_require__(151);
__webpack_require__(152);
+ __webpack_require__(153);
+ __webpack_require__(154);
+ __webpack_require__(155);
+ __webpack_require__(156);
+ __webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
- __webpack_require__(161);
+ __webpack_require__(160);
__webpack_require__(162);
__webpack_require__(163);
+ __webpack_require__(164);
+ __webpack_require__(165);
+ __webpack_require__(166);
__webpack_require__(167);
- __webpack_require__(168);
__webpack_require__(169);
__webpack_require__(170);
__webpack_require__(171);
- __webpack_require__(173);
+ __webpack_require__(172);
__webpack_require__(174);
__webpack_require__(175);
- __webpack_require__(176);
- __webpack_require__(179);
+ __webpack_require__(177);
+ __webpack_require__(178);
+ __webpack_require__(180);
__webpack_require__(181);
__webpack_require__(182);
__webpack_require__(183);
- __webpack_require__(185);
- __webpack_require__(187);
- __webpack_require__(189);
- __webpack_require__(190);
- __webpack_require__(191);
- __webpack_require__(193);
- __webpack_require__(194);
- __webpack_require__(195);
- __webpack_require__(196);
- __webpack_require__(203);
- __webpack_require__(206);
- __webpack_require__(207);
- __webpack_require__(209);
- __webpack_require__(210);
- __webpack_require__(211);
- __webpack_require__(212);
- __webpack_require__(213);
- __webpack_require__(214);
- __webpack_require__(215);
- __webpack_require__(216);
- __webpack_require__(217);
- __webpack_require__(218);
- __webpack_require__(219);
- __webpack_require__(220);
- __webpack_require__(222);
- __webpack_require__(223);
- __webpack_require__(224);
- __webpack_require__(225);
- __webpack_require__(226);
- __webpack_require__(227);
- __webpack_require__(228);
- __webpack_require__(229);
- __webpack_require__(231);
- __webpack_require__(234);
- __webpack_require__(235);
- __webpack_require__(237);
- __webpack_require__(238);
- __webpack_require__(239);
- __webpack_require__(240);
- __webpack_require__(241);
- __webpack_require__(242);
- __webpack_require__(243);
- __webpack_require__(244);
- __webpack_require__(245);
- __webpack_require__(246);
- __webpack_require__(247);
- __webpack_require__(249);
- __webpack_require__(250);
- __webpack_require__(251);
- __webpack_require__(252);
- __webpack_require__(253);
- __webpack_require__(254);
- __webpack_require__(255);
- __webpack_require__(256);
- __webpack_require__(258);
- __webpack_require__(259);
- __webpack_require__(261);
- __webpack_require__(262);
- __webpack_require__(263);
- __webpack_require__(264);
- __webpack_require__(267);
- __webpack_require__(268);
- __webpack_require__(269);
- __webpack_require__(270);
- __webpack_require__(271);
- __webpack_require__(272);
- __webpack_require__(273);
- __webpack_require__(274);
- __webpack_require__(276);
- __webpack_require__(277);
- __webpack_require__(278);
- __webpack_require__(279);
- __webpack_require__(280);
- __webpack_require__(281);
- __webpack_require__(282);
- __webpack_require__(283);
- __webpack_require__(284);
- __webpack_require__(285);
- __webpack_require__(286);
- __webpack_require__(287);
- module.exports = __webpack_require__(288);
+ module.exports = __webpack_require__(186);
/***/ },
@@ -234,289 +162,309 @@
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // ECMAScript 6 symbols shim
- var global = __webpack_require__(2)
- , has = __webpack_require__(3)
- , DESCRIPTORS = __webpack_require__(4)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , META = __webpack_require__(20).KEY
- , $fails = __webpack_require__(5)
- , shared = __webpack_require__(21)
- , setToStringTag = __webpack_require__(22)
- , uid = __webpack_require__(17)
- , wks = __webpack_require__(23)
- , wksExt = __webpack_require__(24)
- , wksDefine = __webpack_require__(25)
- , keyOf = __webpack_require__(27)
- , enumKeys = __webpack_require__(40)
- , isArray = __webpack_require__(43)
- , anObject = __webpack_require__(10)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(14)
- , createDesc = __webpack_require__(15)
- , _create = __webpack_require__(44)
- , gOPNExt = __webpack_require__(47)
- , $GOPD = __webpack_require__(49)
- , $DP = __webpack_require__(9)
- , $keys = __webpack_require__(28)
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
- , $Symbol = global.Symbol
- , $JSON = global.JSON
- , _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
- , HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
- , SymbolRegistry = shared('symbol-registry')
- , AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
- })).a != 7;
- }) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
- if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
- } : dP;
-
- var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , DESCRIPTORS = __webpack_require__(8)
+ , createDesc = __webpack_require__(7)
+ , html = __webpack_require__(14)
+ , cel = __webpack_require__(15)
+ , has = __webpack_require__(17)
+ , cof = __webpack_require__(18)
+ , invoke = __webpack_require__(19)
+ , fails = __webpack_require__(9)
+ , anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , isObject = __webpack_require__(16)
+ , toObject = __webpack_require__(21)
+ , toIObject = __webpack_require__(23)
+ , toInteger = __webpack_require__(25)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27)
+ , IObject = __webpack_require__(24)
+ , IE_PROTO = __webpack_require__(11)('__proto__')
+ , createArrayMethod = __webpack_require__(28)
+ , arrayIndexOf = __webpack_require__(33)(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+ if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+ }
+ $export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+ });
+
+ // IE 8- don't enum bug keys
+ var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+ // Create object with `null` prototype: use iframe Object with cleared prototype
+ var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write('<script>document.F=Object</script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict.prototype[keys1[i]];
+ return createDict();
};
-
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
- return typeof it == 'symbol';
- } : function(it){
- return it instanceof $Symbol;
+ var createGetKeys = function(names, length){
+ return function(object){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
};
+ var Empty = function(){};
+ $export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+ });
- var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
- if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
- D = _create(D, {enumerable: createDesc(0, false)});
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P){
- anObject(it);
- var keys = enumKeys(P = toIObject(P))
- , i = 0
- , l = keys.length
- , key;
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P){
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
+ var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
};
- // 19.4.1.1 Symbol([description])
- if(!USE_NATIVE){
- $Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
+ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+ $export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
};
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(42).f = $propertyIsEnumerable;
- __webpack_require__(41).f = $getOwnPropertySymbols;
-
- if(DESCRIPTORS && !__webpack_require__(26)){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function(name){
- return wrap(wks(name));
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
}
- }
-
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
- for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
- for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function(key){
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function(){ setter = true; },
- useSimple: function(){ setter = false; }
});
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
+ // fallback for not array-like ES3 strings and DOM objects
+ $export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+ }), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
});
-
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
- })), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
+ $export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
}
});
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
+ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+ $export($export.S, 'Array', {isArray: __webpack_require__(30)});
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
+ var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+ };
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+ var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+ };
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
+ $export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+ });
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
- };
+ // 20.3.3.1 / 15.9.4.4 Date.now()
+ $export($export.S, 'Date', {now: function(){ return +new Date; }});
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+ var lz = function(num){
+ return num > 9 ? num : '0' + num;
+ };
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(5)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+ // PhantomJS / old WebKit has a broken implementations
+ $export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+ }) || !fails(function(){
+ new Date(NaN).toISOString();
+ })), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
});
/***/ },
-/* 5 */
+/* 2 */
/***/ function(module, exports) {
- module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
+ var $Object = Object;
+ module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
};
/***/ },
-/* 6 */
+/* 3 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , hide = __webpack_require__(8)
- , redefine = __webpack_require__(16)
- , ctx = __webpack_require__(18)
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(5)
+ , hide = __webpack_require__(6)
+ , redefine = __webpack_require__(10)
+ , ctx = __webpack_require__(12)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
@@ -532,13 +480,13 @@
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
+ own = !IS_FORCED && target && key in target;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
- if(target)redefine(target, key, out, type & $export.U);
+ if(target && !own)redefine(target, key, out);
// export
if(exports[key] != out)hide(exports, key, exp);
if(IS_PROTO && expProto[key] != out)expProto[key] = out;
@@ -546,164 +494,111 @@
};
global.core = core;
// type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
module.exports = $export;
/***/ },
-/* 7 */
+/* 4 */
/***/ function(module, exports) {
- var core = module.exports = {version: '2.4.0'};
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ var core = module.exports = {version: '1.2.6'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
-/* 8 */
+/* 6 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9)
- , createDesc = __webpack_require__(15);
- module.exports = __webpack_require__(4) ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
+ var $ = __webpack_require__(2)
+ , createDesc = __webpack_require__(7);
+ module.exports = __webpack_require__(8) ? function(object, key, value){
+ return $.setDesc(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- var anObject = __webpack_require__(10)
- , IE8_DOM_DEFINE = __webpack_require__(12)
- , toPrimitive = __webpack_require__(14)
- , dP = Object.defineProperty;
-
- exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
- };
-
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11);
- module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
- };
-
-/***/ },
-/* 11 */
+/* 7 */
/***/ function(module, exports) {
- module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
+ module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
};
/***/ },
-/* 12 */
+/* 8 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){
- return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(9)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
-/* 13 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11)
- , document = __webpack_require__(2).document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
- module.exports = function(it){
- return is ? document.createElement(it) : {};
- };
-
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(11);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
- };
-
-/***/ },
-/* 15 */
+/* 9 */
/***/ function(module, exports) {
- module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
};
/***/ },
-/* 16 */
+/* 10 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , has = __webpack_require__(3)
- , SRC = __webpack_require__(17)('src')
+ // add fake Function#toString
+ // for correct work wrapped methods / constructors with methods like LoDash isNative
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(6)
+ , SRC = __webpack_require__(11)('src')
, TO_STRING = 'toString'
, $toString = Function[TO_STRING]
, TPL = ('' + $toString).split(TO_STRING);
- __webpack_require__(7).inspectSource = function(it){
+ __webpack_require__(5).inspectSource = function(it){
return $toString.call(it);
};
(module.exports = function(O, key, val, safe){
- var isFunction = typeof val == 'function';
- if(isFunction)has(val, 'name') || hide(val, 'name', key);
- if(O[key] === val)return;
- if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ if(typeof val == 'function'){
+ val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ val.hasOwnProperty('name') || hide(val, 'name', key);
+ }
if(O === global){
O[key] = val;
} else {
- if(!safe){
- delete O[key];
- hide(O, key, val);
- } else {
- if(O[key])O[key] = val;
- else hide(O, key, val);
- }
+ if(!safe)delete O[key];
+ hide(O, key, val);
}
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString(){
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ },
-/* 17 */
+/* 11 */
/***/ function(module, exports) {
var id = 0
@@ -713,11 +608,11 @@
};
/***/ },
-/* 18 */
+/* 12 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
- var aFunction = __webpack_require__(19);
+ var aFunction = __webpack_require__(13);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
@@ -738,7 +633,7 @@
};
/***/ },
-/* 19 */
+/* 13 */
/***/ function(module, exports) {
module.exports = function(it){
@@ -747,210 +642,93 @@
};
/***/ },
-/* 20 */
-/***/ function(module, exports, __webpack_require__) {
-
- var META = __webpack_require__(17)('meta')
- , isObject = __webpack_require__(11)
- , has = __webpack_require__(3)
- , setDesc = __webpack_require__(9).f
- , id = 0;
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
- var FREEZE = !__webpack_require__(5)(function(){
- return isExtensible(Object.preventExtensions({}));
- });
- var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
- };
- var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
- };
- var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
- };
- // add metadata on freeze-family methods calling
- var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
- };
- var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
- };
-
-/***/ },
-/* 21 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
- };
-
-/***/ },
-/* 22 */
+/* 14 */
/***/ function(module, exports, __webpack_require__) {
- var def = __webpack_require__(9).f
- , has = __webpack_require__(3)
- , TAG = __webpack_require__(23)('toStringTag');
-
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
- };
+ module.exports = __webpack_require__(4).document && document.documentElement;
/***/ },
-/* 23 */
+/* 15 */
/***/ function(module, exports, __webpack_require__) {
- var store = __webpack_require__(21)('wks')
- , uid = __webpack_require__(17)
- , Symbol = __webpack_require__(2).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
- var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ var isObject = __webpack_require__(16)
+ , document = __webpack_require__(4).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+ module.exports = function(it){
+ return is ? document.createElement(it) : {};
};
- $exports.store = store;
-
-/***/ },
-/* 24 */
-/***/ function(module, exports, __webpack_require__) {
-
- exports.f = __webpack_require__(23);
-
/***/ },
-/* 25 */
-/***/ function(module, exports, __webpack_require__) {
+/* 16 */
+/***/ function(module, exports) {
- var global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , LIBRARY = __webpack_require__(26)
- , wksExt = __webpack_require__(24)
- , defineProperty = __webpack_require__(9).f;
- module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
+ module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ },
-/* 26 */
+/* 17 */
/***/ function(module, exports) {
- module.exports = false;
-
-/***/ },
-/* 27 */
-/***/ function(module, exports, __webpack_require__) {
-
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30);
- module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
};
/***/ },
-/* 28 */
-/***/ function(module, exports, __webpack_require__) {
+/* 18 */
+/***/ function(module, exports) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(29)
- , enumBugKeys = __webpack_require__(39);
+ var toString = {}.toString;
- module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
+ module.exports = function(it){
+ return toString.call(it).slice(8, -1);
};
/***/ },
-/* 29 */
-/***/ function(module, exports, __webpack_require__) {
-
- var has = __webpack_require__(3)
- , toIObject = __webpack_require__(30)
- , arrayIndexOf = __webpack_require__(34)(false)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO');
+/* 19 */
+/***/ function(module, exports) {
- module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
+ // fast apply, http://jsperf.lnkit.com/fast-apply/5
+ module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
};
/***/ },
-/* 30 */
+/* 20 */
/***/ function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(31)
- , defined = __webpack_require__(33);
+ var isObject = __webpack_require__(16);
module.exports = function(it){
- return IObject(defined(it));
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
};
/***/ },
-/* 31 */
+/* 21 */
/***/ function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(32);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
-
-/***/ },
-/* 32 */
-/***/ function(module, exports) {
-
- var toString = {}.toString;
-
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(22);
module.exports = function(it){
- return toString.call(it).slice(8, -1);
+ return Object(defined(it));
};
/***/ },
-/* 33 */
+/* 22 */
/***/ function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
@@ -960,44 +738,28 @@
};
/***/ },
-/* 34 */
+/* 23 */
/***/ function(module, exports, __webpack_require__) {
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37);
- module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
- // Array#includes uses SameValueZero equality algorithm
- if(IS_INCLUDES && el != el)while(length > index){
- value = O[index++];
- if(value != value)return true;
- // Array#toIndex ignores holes, Array#includes - not
- } else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(24)
+ , defined = __webpack_require__(22);
+ module.exports = function(it){
+ return IObject(defined(it));
};
/***/ },
-/* 35 */
+/* 24 */
/***/ function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(36)
- , min = Math.min;
- module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(18);
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ },
-/* 36 */
+/* 25 */
/***/ function(module, exports) {
// 7.1.4 ToInteger
@@ -1008,10 +770,10 @@
};
/***/ },
-/* 37 */
+/* 26 */
/***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(36)
+ var toInteger = __webpack_require__(25)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
@@ -1020,451 +782,510 @@
};
/***/ },
-/* 38 */
+/* 27 */
/***/ function(module, exports, __webpack_require__) {
- var shared = __webpack_require__(21)('keys')
- , uid = __webpack_require__(17);
- module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(25)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ },
-/* 39 */
-/***/ function(module, exports) {
-
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
-
-/***/ },
-/* 40 */
+/* 28 */
/***/ function(module, exports, __webpack_require__) {
- // all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42);
- module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
+ // 0 -> Array#forEach
+ // 1 -> Array#map
+ // 2 -> Array#filter
+ // 3 -> Array#some
+ // 4 -> Array#every
+ // 5 -> Array#find
+ // 6 -> Array#findIndex
+ var ctx = __webpack_require__(12)
+ , IObject = __webpack_require__(24)
+ , toObject = __webpack_require__(21)
+ , toLength = __webpack_require__(27)
+ , asc = __webpack_require__(29);
+ module.exports = function(TYPE){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
};
/***/ },
-/* 41 */
-/***/ function(module, exports) {
-
- exports.f = Object.getOwnPropertySymbols;
-
-/***/ },
-/* 42 */
-/***/ function(module, exports) {
+/* 29 */
+/***/ function(module, exports, __webpack_require__) {
- exports.f = {}.propertyIsEnumerable;
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ var isObject = __webpack_require__(16)
+ , isArray = __webpack_require__(30)
+ , SPECIES = __webpack_require__(31)('species');
+ module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
+ };
/***/ },
-/* 43 */
+/* 30 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
- var cof = __webpack_require__(32);
- module.exports = Array.isArray || function isArray(arg){
+ var cof = __webpack_require__(18);
+ module.exports = Array.isArray || function(arg){
return cof(arg) == 'Array';
};
/***/ },
-/* 44 */
+/* 31 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(10)
- , dPs = __webpack_require__(45)
- , enumBugKeys = __webpack_require__(39)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(13)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(46).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
+ var store = __webpack_require__(32)('wks')
+ , uid = __webpack_require__(11)
+ , Symbol = __webpack_require__(4).Symbol;
+ module.exports = function(name){
+ return store[name] || (store[name] =
+ Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
};
-
/***/ },
-/* 45 */
+/* 32 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9)
- , anObject = __webpack_require__(10)
- , getKeys = __webpack_require__(28);
-
- module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
+ var global = __webpack_require__(4)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
};
/***/ },
-/* 46 */
+/* 33 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(2).document && document.documentElement;
+ // false -> Array#indexOf
+ // true -> Array#includes
+ var toIObject = __webpack_require__(23)
+ , toLength = __webpack_require__(27)
+ , toIndex = __webpack_require__(26);
+ module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+ };
/***/ },
-/* 47 */
+/* 34 */
/***/ function(module, exports, __webpack_require__) {
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(30)
- , gOPN = __webpack_require__(48).f
- , toString = {}.toString;
+ 'use strict';
+ // ECMAScript 6 symbols shim
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , has = __webpack_require__(17)
+ , DESCRIPTORS = __webpack_require__(8)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , $fails = __webpack_require__(9)
+ , shared = __webpack_require__(32)
+ , setToStringTag = __webpack_require__(35)
+ , uid = __webpack_require__(11)
+ , wks = __webpack_require__(31)
+ , keyOf = __webpack_require__(36)
+ , $names = __webpack_require__(37)
+ , enumKeys = __webpack_require__(38)
+ , isArray = __webpack_require__(30)
+ , anObject = __webpack_require__(20)
+ , toIObject = __webpack_require__(23)
+ , createDesc = __webpack_require__(7)
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = $.isEnum
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+ var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
+ })).a != 7;
+ }) ? function(it, key, D){
+ var protoDesc = getDesc(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+ } : setDesc;
- var getWindowNames = function(it){
- try {
- return gOPN(it);
- } catch(e){
- return windowNames.slice();
- }
+ var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
};
- module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+ var isSymbol = function(it){
+ return typeof it == 'symbol';
};
-
-/***/ },
-/* 48 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(29)
- , hiddenKeys = __webpack_require__(39).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
+ var $defineProperty = function defineProperty(it, key, D){
+ if(D && has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return setDesc(it, key, D);
};
-
-/***/ },
-/* 49 */
-/***/ function(module, exports, __webpack_require__) {
-
- var pIE = __webpack_require__(42)
- , createDesc = __webpack_require__(15)
- , toIObject = __webpack_require__(30)
- , toPrimitive = __webpack_require__(14)
- , has = __webpack_require__(3)
- , IE8_DOM_DEFINE = __webpack_require__(12)
- , gOPD = Object.getOwnPropertyDescriptor;
-
- exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+ var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
};
-
-/***/ },
-/* 50 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f});
-
-/***/ },
-/* 51 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
- $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)});
-
-/***/ },
-/* 52 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- var toIObject = __webpack_require__(30)
- , $getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- __webpack_require__(53)('getOwnPropertyDescriptor', function(){
- return function getOwnPropertyDescriptor(it, key){
- return $getOwnPropertyDescriptor(toIObject(it), key);
+ var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+ };
+ var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
+ };
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = getDesc(it = toIObject(it), key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+ };
+ var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
+ };
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+ };
+ var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
};
- });
-
-/***/ },
-/* 53 */
-/***/ function(module, exports, __webpack_require__) {
-
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(6)
- , core = __webpack_require__(7)
- , fails = __webpack_require__(5);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
};
+ var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+ });
-/***/ },
-/* 54 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- $export($export.S, 'Object', {create: __webpack_require__(44)});
-
-/***/ },
-/* 55 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.9 Object.getPrototypeOf(O)
- var toObject = __webpack_require__(56)
- , $getPrototypeOf = __webpack_require__(57);
-
- __webpack_require__(53)('getPrototypeOf', function(){
- return function getPrototypeOf(it){
- return $getPrototypeOf(toObject(it));
+ // 19.4.1.1 Symbol([description])
+ if(!useNative){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
};
- });
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
-/***/ },
-/* 56 */
-/***/ function(module, exports, __webpack_require__) {
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(33);
- module.exports = function(it){
- return Object(defined(it));
- };
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
-/***/ },
-/* 57 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(3)
- , toObject = __webpack_require__(56)
- , IE_PROTO = __webpack_require__(38)('IE_PROTO')
- , ObjectProto = Object.prototype;
+ if(DESCRIPTORS && !__webpack_require__(39)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+ }
- module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
+ var symbolStatics = {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
};
+ // 19.4.2.2 Symbol.hasInstance
+ // 19.4.2.3 Symbol.isConcatSpreadable
+ // 19.4.2.4 Symbol.iterator
+ // 19.4.2.6 Symbol.match
+ // 19.4.2.8 Symbol.replace
+ // 19.4.2.9 Symbol.search
+ // 19.4.2.10 Symbol.species
+ // 19.4.2.11 Symbol.split
+ // 19.4.2.12 Symbol.toPrimitive
+ // 19.4.2.13 Symbol.toStringTag
+ // 19.4.2.14 Symbol.unscopables
+ $.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
+ });
-/***/ },
-/* 58 */
-/***/ function(module, exports, __webpack_require__) {
+ setter = true;
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(56)
- , $keys = __webpack_require__(28);
+ $export($export.G + $export.W, {Symbol: $Symbol});
- __webpack_require__(53)('keys', function(){
- return function keys(it){
- return $keys(toObject(it));
- };
+ $export($export.S, 'Symbol', symbolStatics);
+
+ $export($export.S + $export.F * !useNative, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
});
-/***/ },
-/* 59 */
-/***/ function(module, exports, __webpack_require__) {
+ // 24.3.2 JSON.stringify(value [, replacer [, space]])
+ $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- __webpack_require__(53)('getOwnPropertyNames', function(){
- return __webpack_require__(47).f;
- });
+ // 19.4.3.5 Symbol.prototype[@@toStringTag]
+ setToStringTag($Symbol, 'Symbol');
+ // 20.2.1.9 Math[@@toStringTag]
+ setToStringTag(Math, 'Math', true);
+ // 24.3.3 JSON[@@toStringTag]
+ setToStringTag(global.JSON, 'JSON', true);
/***/ },
-/* 60 */
+/* 35 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.5 Object.freeze(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
+ var def = __webpack_require__(2).setDesc
+ , has = __webpack_require__(17)
+ , TAG = __webpack_require__(31)('toStringTag');
- __webpack_require__(53)('freeze', function($freeze){
- return function freeze(it){
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
- };
- });
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ };
/***/ },
-/* 61 */
+/* 36 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.17 Object.seal(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
-
- __webpack_require__(53)('seal', function($seal){
- return function seal(it){
- return $seal && isObject(it) ? $seal(meta(it)) : it;
- };
- });
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(23);
+ module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+ };
/***/ },
-/* 62 */
+/* 37 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.15 Object.preventExtensions(O)
- var isObject = __webpack_require__(11)
- , meta = __webpack_require__(20).onFreeze;
-
- __webpack_require__(53)('preventExtensions', function($preventExtensions){
- return function preventExtensions(it){
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
- };
- });
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+ var toIObject = __webpack_require__(23)
+ , getNames = __webpack_require__(2).getNames
+ , toString = {}.toString;
-/***/ },
-/* 63 */
-/***/ function(module, exports, __webpack_require__) {
+ var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
- // 19.1.2.12 Object.isFrozen(O)
- var isObject = __webpack_require__(11);
+ var getWindowNames = function(it){
+ try {
+ return getNames(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+ };
- __webpack_require__(53)('isFrozen', function($isFrozen){
- return function isFrozen(it){
- return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
- };
- });
+ module.exports.get = function getOwnPropertyNames(it){
+ if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
+ return getNames(toIObject(it));
+ };
/***/ },
-/* 64 */
+/* 38 */
/***/ function(module, exports, __webpack_require__) {
- // 19.1.2.13 Object.isSealed(O)
- var isObject = __webpack_require__(11);
-
- __webpack_require__(53)('isSealed', function($isSealed){
- return function isSealed(it){
- return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
- };
- });
+ // all enumerable object keys, includes symbols
+ var $ = __webpack_require__(2);
+ module.exports = function(it){
+ var keys = $.getKeys(it)
+ , getSymbols = $.getSymbols;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = $.isEnum
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
+ }
+ return keys;
+ };
/***/ },
-/* 65 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 19.1.2.11 Object.isExtensible(O)
- var isObject = __webpack_require__(11);
+/* 39 */
+/***/ function(module, exports) {
- __webpack_require__(53)('isExtensible', function($isExtensible){
- return function isExtensible(it){
- return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
- };
- });
+ module.exports = false;
/***/ },
-/* 66 */
+/* 40 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)});
+ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(41)});
/***/ },
-/* 67 */
+/* 41 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
// 19.1.2.1 Object.assign(target, source, ...)
- var getKeys = __webpack_require__(28)
- , gOPS = __webpack_require__(41)
- , pIE = __webpack_require__(42)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , $assign = Object.assign;
+ var $ = __webpack_require__(2)
+ , toObject = __webpack_require__(21)
+ , IObject = __webpack_require__(24);
// should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(5)(function(){
- var A = {}
+ module.exports = __webpack_require__(9)(function(){
+ var a = Object.assign
+ , A = {}
, B = {}
, S = Symbol()
, K = 'abcdefghijklmnopqrst';
A[S] = 7;
K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+ return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
var T = toObject(target)
- , aLen = arguments.length
+ , $$ = arguments
+ , $$len = $$.length
, index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
+ , getKeys = $.getKeys
+ , getSymbols = $.getSymbols
+ , isEnum = $.isEnum;
+ while($$len > index){
+ var S = IObject($$[index++])
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
, length = keys.length
, j = 0
, key;
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
- } : $assign;
+ }
+ return T;
+ } : Object.assign;
/***/ },
-/* 68 */
+/* 42 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {is: __webpack_require__(69)});
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {is: __webpack_require__(43)});
/***/ },
-/* 69 */
+/* 43 */
/***/ function(module, exports) {
// 7.2.9 SameValue(x, y)
@@ -1473,21 +1294,22 @@
};
/***/ },
-/* 70 */
+/* 44 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
- var $export = __webpack_require__(6);
- $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set});
+ var $export = __webpack_require__(3);
+ $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(45).set});
/***/ },
-/* 71 */
+/* 45 */
/***/ function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
- var isObject = __webpack_require__(11)
- , anObject = __webpack_require__(10);
+ var getDesc = __webpack_require__(2).getDesc
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20);
var check = function(O, proto){
anObject(O);
if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
@@ -1496,7 +1318,7 @@
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function(test, buggy, set){
try {
- set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2);
+ set = __webpack_require__(12)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch(e){ buggy = true; }
@@ -1511,42 +1333,35 @@
};
/***/ },
-/* 72 */
+/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 19.1.3.6 Object.prototype.toString()
- var classof = __webpack_require__(73)
+ var classof = __webpack_require__(47)
, test = {};
- test[__webpack_require__(23)('toStringTag')] = 'z';
+ test[__webpack_require__(31)('toStringTag')] = 'z';
if(test + '' != '[object z]'){
- __webpack_require__(16)(Object.prototype, 'toString', function toString(){
+ __webpack_require__(10)(Object.prototype, 'toString', function toString(){
return '[object ' + classof(this) + ']';
}, true);
}
/***/ },
-/* 73 */
+/* 47 */
/***/ function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(32)
- , TAG = __webpack_require__(23)('toStringTag')
+ var cof = __webpack_require__(18)
+ , TAG = __webpack_require__(31)('toStringTag')
// ES3 wrong here
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
- // fallback for IE11 Script Access Denied error
- var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
- };
-
module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
@@ -1554,134 +1369,204 @@
};
/***/ },
-/* 74 */
+/* 48 */
/***/ function(module, exports, __webpack_require__) {
- // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
- var $export = __webpack_require__(6);
+ // 19.1.2.5 Object.freeze(O)
+ var isObject = __webpack_require__(16);
- $export($export.P, 'Function', {bind: __webpack_require__(75)});
+ __webpack_require__(49)('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(it) : it;
+ };
+ });
/***/ },
-/* 75 */
+/* 49 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var aFunction = __webpack_require__(19)
- , isObject = __webpack_require__(11)
- , invoke = __webpack_require__(76)
- , arraySlice = [].slice
- , factories = {};
-
- var construct = function(F, len, args){
- if(!(len in factories)){
- for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(3)
+ , core = __webpack_require__(5)
+ , fails = __webpack_require__(9);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
- module.exports = Function.bind || function bind(that /*, args... */){
- var fn = aFunction(this)
- , partArgs = arraySlice.call(arguments, 1);
- var bound = function(/* args... */){
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.17 Object.seal(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(it) : it;
};
- if(isObject(fn.prototype))bound.prototype = fn.prototype;
- return bound;
- };
+ });
/***/ },
-/* 76 */
-/***/ function(module, exports) {
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
- // fast apply, http://jsperf.lnkit.com/fast-apply/5
- module.exports = function(fn, args, that){
- var un = that === undefined;
- switch(args.length){
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
- };
+ // 19.1.2.15 Object.preventExtensions(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
+ };
+ });
/***/ },
-/* 77 */
+/* 52 */
/***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(9).f
- , createDesc = __webpack_require__(15)
- , has = __webpack_require__(3)
+ // 19.1.2.12 Object.isFrozen(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.13 Object.isSealed(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.11 Object.isExtensible(O)
+ var isObject = __webpack_require__(16);
+
+ __webpack_require__(49)('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+ });
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ var toIObject = __webpack_require__(23);
+
+ __webpack_require__(49)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+ });
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.9 Object.getPrototypeOf(O)
+ var toObject = __webpack_require__(21);
+
+ __webpack_require__(49)('getPrototypeOf', function($getPrototypeOf){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+ });
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 Object.keys(O)
+ var toObject = __webpack_require__(21);
+
+ __webpack_require__(49)('keys', function($keys){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+ });
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ __webpack_require__(49)('getOwnPropertyNames', function(){
+ return __webpack_require__(37).get;
+ });
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var setDesc = __webpack_require__(2).setDesc
+ , createDesc = __webpack_require__(7)
+ , has = __webpack_require__(17)
, FProto = Function.prototype
, nameRE = /^\s*function ([^ (]*)/
, NAME = 'name';
-
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
-
// 19.2.4.2 name
- NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, {
+ NAME in FProto || __webpack_require__(8) && setDesc(FProto, NAME, {
configurable: true,
get: function(){
- try {
- var that = this
- , name = ('' + that).match(nameRE)[1];
- has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name));
- return name;
- } catch(e){
- return '';
- }
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || setDesc(this, NAME, createDesc(5, name));
+ return name;
}
});
/***/ },
-/* 78 */
+/* 60 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var isObject = __webpack_require__(11)
- , getPrototypeOf = __webpack_require__(57)
- , HAS_INSTANCE = __webpack_require__(23)('hasInstance')
- , FunctionProto = Function.prototype;
+ var $ = __webpack_require__(2)
+ , isObject = __webpack_require__(16)
+ , HAS_INSTANCE = __webpack_require__(31)('hasInstance')
+ , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
- if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}});
/***/ },
-/* 79 */
+/* 61 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , has = __webpack_require__(3)
- , cof = __webpack_require__(32)
- , inheritIfRequired = __webpack_require__(80)
- , toPrimitive = __webpack_require__(14)
- , fails = __webpack_require__(5)
- , gOPN = __webpack_require__(48).f
- , gOPD = __webpack_require__(49).f
- , dP = __webpack_require__(9).f
- , $trim = __webpack_require__(81).trim
- , NUMBER = 'Number'
- , $Number = global[NUMBER]
- , Base = $Number
- , proto = $Number.prototype
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , has = __webpack_require__(17)
+ , cof = __webpack_require__(18)
+ , toPrimitive = __webpack_require__(62)
+ , fails = __webpack_require__(9)
+ , $trim = __webpack_require__(63).trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
// Opera ~12 has broken Object#toString
- , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER
- , TRIM = 'trim' in String.prototype;
+ , BROKEN_COF = cof($.create(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function(argument){
@@ -1716,58 +1601,61 @@
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ ? new Base(toNumber(it)) : toNumber(it);
};
- for(var keys = __webpack_require__(4) ? gOPN(Base) : (
+ $.each.call(__webpack_require__(8) ? $.getNames(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++){
- if(has(Base, key = keys[j]) && !has($Number, key)){
- dP($Number, key, gOPD(Base, key));
+ ).split(','), function(key){
+ if(has(Base, key) && !has($Number, key)){
+ $.setDesc($Number, key, $.getDesc(Base, key));
}
- }
+ });
$Number.prototype = proto;
proto.constructor = $Number;
- __webpack_require__(16)(global, NUMBER, $Number);
+ __webpack_require__(10)(global, NUMBER, $Number);
}
/***/ },
-/* 80 */
+/* 62 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(11)
- , setPrototypeOf = __webpack_require__(71).set;
- module.exports = function(that, target, C){
- var P, S = target.constructor;
- if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
- setPrototypeOf(that, P);
- } return that;
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(16);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
};
/***/ },
-/* 81 */
+/* 63 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , fails = __webpack_require__(5)
- , spaces = __webpack_require__(82)
+ var $export = __webpack_require__(3)
+ , defined = __webpack_require__(22)
+ , fails = __webpack_require__(9)
+ , spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
, space = '[' + spaces + ']'
, non = '\u200b\u0085'
, ltrim = RegExp('^' + space + space + '*')
, rtrim = RegExp(space + space + '*$');
- var exporter = function(KEY, exec, ALIAS){
- var exp = {};
- var FORCE = fails(function(){
+ var exporter = function(KEY, exec){
+ var exp = {};
+ exp[KEY] = exec(trim);
+ $export($export.P + $export.F * fails(function(){
return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if(ALIAS)exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
+ }), 'String', exp);
};
// 1 -> String#trimLeft
@@ -1783,196 +1671,21 @@
module.exports = exporter;
/***/ },
-/* 82 */
-/***/ function(module, exports) {
-
- module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
-/***/ },
-/* 83 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toInteger = __webpack_require__(36)
- , aNumberValue = __webpack_require__(84)
- , repeat = __webpack_require__(85)
- , $toFixed = 1..toFixed
- , floor = Math.floor
- , data = [0, 0, 0, 0, 0, 0]
- , ERROR = 'Number.toFixed: incorrect invocation!'
- , ZERO = '0';
-
- var multiply = function(n, c){
- var i = -1
- , c2 = c;
- while(++i < 6){
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
- };
- var divide = function(n){
- var i = 6
- , c = 0;
- while(--i >= 0){
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
- };
- var numToString = function(){
- var i = 6
- , s = '';
- while(--i >= 0){
- if(s !== '' || i === 0 || data[i] !== 0){
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
- };
- var pow = function(x, n, acc){
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
- };
- var log = function(x){
- var n = 0
- , x2 = x;
- while(x2 >= 4096){
- n += 12;
- x2 /= 4096;
- }
- while(x2 >= 2){
- n += 1;
- x2 /= 2;
- } return n;
- };
-
- $export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128..toFixed(0) !== '1000000000000000128'
- ) || !__webpack_require__(5)(function(){
- // V8 ~ Android 4.3-
- $toFixed.call({});
- })), 'Number', {
- toFixed: function toFixed(fractionDigits){
- var x = aNumberValue(this, ERROR)
- , f = toInteger(fractionDigits)
- , s = ''
- , m = ZERO
- , e, z, j, k;
- if(f < 0 || f > 20)throw RangeError(ERROR);
- if(x != x)return 'NaN';
- if(x <= -1e21 || x >= 1e21)return String(x);
- if(x < 0){
- s = '-';
- x = -x;
- }
- if(x > 1e-21){
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if(e > 0){
- multiply(0, z);
- j = f;
- while(j >= 7){
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while(j >= 23){
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if(f > 0){
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
- });
-
-/***/ },
-/* 84 */
-/***/ function(module, exports, __webpack_require__) {
-
- var cof = __webpack_require__(32);
- module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
- };
-
-/***/ },
-/* 85 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
-
- module.exports = function repeat(count){
- var str = String(defined(this))
- , res = ''
- , n = toInteger(count);
- if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
- for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
- return res;
- };
-
-/***/ },
-/* 86 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $fails = __webpack_require__(5)
- , aNumberValue = __webpack_require__(84)
- , $toPrecision = 1..toPrecision;
-
- $export($export.P + $export.F * ($fails(function(){
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
- }) || !$fails(function(){
- // V8 ~ Android 4.3-
- $toPrecision.call({});
- })), 'Number', {
- toPrecision: function toPrecision(precision){
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
- });
-
-/***/ },
-/* 87 */
+/* 64 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
/***/ },
-/* 88 */
+/* 65 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
- var $export = __webpack_require__(6)
- , _isFinite = __webpack_require__(2).isFinite;
+ var $export = __webpack_require__(3)
+ , _isFinite = __webpack_require__(4).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
@@ -1981,31 +1694,31 @@
});
/***/ },
-/* 89 */
+/* 66 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Number', {isInteger: __webpack_require__(90)});
+ $export($export.S, 'Number', {isInteger: __webpack_require__(67)});
/***/ },
-/* 90 */
+/* 67 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
- var isObject = __webpack_require__(11)
+ var isObject = __webpack_require__(16)
, floor = Math.floor;
module.exports = function isInteger(it){
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ },
-/* 91 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {
isNaN: function isNaN(number){
@@ -2014,12 +1727,12 @@
});
/***/ },
-/* 92 */
+/* 69 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
- var $export = __webpack_require__(6)
- , isInteger = __webpack_require__(90)
+ var $export = __webpack_require__(3)
+ , isInteger = __webpack_require__(67)
, abs = Math.abs;
$export($export.S, 'Number', {
@@ -2029,102 +1742,53 @@
});
/***/ },
-/* 93 */
+/* 70 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
/***/ },
-/* 94 */
+/* 71 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
/***/ },
-/* 95 */
+/* 72 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(96);
// 20.1.2.12 Number.parseFloat(string)
- $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
+ var $export = __webpack_require__(3);
-/***/ },
-/* 96 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $parseFloat = __webpack_require__(2).parseFloat
- , $trim = __webpack_require__(81).trim;
-
- module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){
- var string = $trim(String(str), 3)
- , result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
- } : $parseFloat;
+ $export($export.S, 'Number', {parseFloat: parseFloat});
/***/ },
-/* 97 */
+/* 73 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(98);
// 20.1.2.13 Number.parseInt(string, radix)
- $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
+ var $export = __webpack_require__(3);
-/***/ },
-/* 98 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $parseInt = __webpack_require__(2).parseInt
- , $trim = __webpack_require__(81).trim
- , ws = __webpack_require__(82)
- , hex = /^[\-+]?0[xX]/;
-
- module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
- } : $parseInt;
-
-/***/ },
-/* 99 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , $parseInt = __webpack_require__(98);
- // 18.2.5 parseInt(string, radix)
- $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
+ $export($export.S, 'Number', {parseInt: parseInt});
/***/ },
-/* 100 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , $parseFloat = __webpack_require__(96);
- // 18.2.4 parseFloat(string)
- $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
-
-/***/ },
-/* 101 */
+/* 74 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
- var $export = __webpack_require__(6)
- , log1p = __webpack_require__(102)
+ var $export = __webpack_require__(3)
+ , log1p = __webpack_require__(75)
, sqrt = Math.sqrt
, $acosh = Math.acosh;
- $export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
- ), 'Math', {
+ // V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+ $export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
@@ -2133,7 +1797,7 @@
});
/***/ },
-/* 102 */
+/* 75 */
/***/ function(module, exports) {
// 20.2.2.20 Math.log1p(x)
@@ -2142,42 +1806,38 @@
};
/***/ },
-/* 103 */
+/* 76 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
- var $export = __webpack_require__(6)
- , $asinh = Math.asinh;
+ var $export = __webpack_require__(3);
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
- // Tor Browser bug: Math.asinh(0) -> -0
- $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
+ $export($export.S, 'Math', {asinh: asinh});
/***/ },
-/* 104 */
+/* 77 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
- var $export = __webpack_require__(6)
- , $atanh = Math.atanh;
+ var $export = __webpack_require__(3);
- // Tor Browser bug: Math.atanh(-0) -> 0
- $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+ $export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ },
-/* 105 */
+/* 78 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(106);
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(79);
$export($export.S, 'Math', {
cbrt: function cbrt(x){
@@ -2186,7 +1846,7 @@
});
/***/ },
-/* 106 */
+/* 79 */
/***/ function(module, exports) {
// 20.2.2.28 Math.sign(x)
@@ -2195,11 +1855,11 @@
};
/***/ },
-/* 107 */
+/* 80 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
clz32: function clz32(x){
@@ -2208,11 +1868,11 @@
});
/***/ },
-/* 108 */
+/* 81 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2222,37 +1882,30 @@
});
/***/ },
-/* 109 */
+/* 82 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
- var $export = __webpack_require__(6)
- , $expm1 = __webpack_require__(110);
+ var $export = __webpack_require__(3);
- $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
+ $export($export.S, 'Math', {expm1: __webpack_require__(83)});
/***/ },
-/* 110 */
+/* 83 */
/***/ function(module, exports) {
// 20.2.2.14 Math.expm1(x)
- var $expm1 = Math.expm1;
- module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
- ) ? function expm1(x){
+ module.exports = Math.expm1 || function expm1(x){
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
- } : $expm1;
+ };
/***/ },
-/* 111 */
+/* 84 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
- var $export = __webpack_require__(6)
- , sign = __webpack_require__(106)
+ var $export = __webpack_require__(3)
+ , sign = __webpack_require__(79)
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
@@ -2278,22 +1931,23 @@
});
/***/ },
-/* 112 */
+/* 85 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
- var sum = 0
- , i = 0
- , aLen = arguments.length
- , larg = 0
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
, arg, div;
- while(i < aLen){
- arg = abs(arguments[i++]);
+ while(i < $$len){
+ arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
@@ -2308,15 +1962,15 @@
});
/***/ },
-/* 113 */
+/* 86 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
- var $export = __webpack_require__(6)
+ var $export = __webpack_require__(3)
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
@@ -2330,11 +1984,11 @@
});
/***/ },
-/* 114 */
+/* 87 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log10: function log10(x){
@@ -2343,20 +1997,20 @@
});
/***/ },
-/* 115 */
+/* 88 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {log1p: __webpack_require__(102)});
+ $export($export.S, 'Math', {log1p: __webpack_require__(75)});
/***/ },
-/* 116 */
+/* 89 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
log2: function log2(x){
@@ -2365,25 +2019,25 @@
});
/***/ },
-/* 117 */
+/* 90 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Math', {sign: __webpack_require__(106)});
+ $export($export.S, 'Math', {sign: __webpack_require__(79)});
/***/ },
-/* 118 */
+/* 91 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(110)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(83)
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
@@ -2394,12 +2048,12 @@
});
/***/ },
-/* 119 */
+/* 92 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
- var $export = __webpack_require__(6)
- , expm1 = __webpack_require__(110)
+ var $export = __webpack_require__(3)
+ , expm1 = __webpack_require__(83)
, exp = Math.exp;
$export($export.S, 'Math', {
@@ -2411,11 +2065,11 @@
});
/***/ },
-/* 120 */
+/* 93 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Math', {
trunc: function trunc(it){
@@ -2424,11 +2078,11 @@
});
/***/ },
-/* 121 */
+/* 94 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIndex = __webpack_require__(37)
+ var $export = __webpack_require__(3)
+ , toIndex = __webpack_require__(26)
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
@@ -2436,12 +2090,13 @@
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
- var res = []
- , aLen = arguments.length
- , i = 0
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
, code;
- while(aLen > i){
- code = +arguments[i++];
+ while($$len > i){
+ code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
@@ -2452,47 +2107,48 @@
});
/***/ },
-/* 122 */
+/* 95 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toLength = __webpack_require__(35);
+ var $export = __webpack_require__(3)
+ , toIObject = __webpack_require__(23)
+ , toLength = __webpack_require__(27);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
- var tpl = toIObject(callSite.raw)
- , len = toLength(tpl.length)
- , aLen = arguments.length
- , res = []
- , i = 0;
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
while(len > i){
res.push(String(tpl[i++]));
- if(i < aLen)res.push(String(arguments[i]));
+ if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
});
/***/ },
-/* 123 */
+/* 96 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.1.3.25 String.prototype.trim()
- __webpack_require__(81)('trim', function($trim){
+ __webpack_require__(63)('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
});
/***/ },
-/* 124 */
+/* 97 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(125)(false);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(98)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
@@ -2501,11 +2157,11 @@
});
/***/ },
-/* 125 */
+/* 98 */
/***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(36)
- , defined = __webpack_require__(33);
+ var toInteger = __webpack_require__(25)
+ , defined = __webpack_require__(22);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
@@ -2523,21 +2179,22 @@
};
/***/ },
-/* 126 */
+/* 99 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(27)
+ , context = __webpack_require__(100)
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
- $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
- , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
@@ -2548,12 +2205,12 @@
});
/***/ },
-/* 127 */
+/* 100 */
/***/ function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
- var isRegExp = __webpack_require__(128)
- , defined = __webpack_require__(33);
+ var isRegExp = __webpack_require__(101)
+ , defined = __webpack_require__(22);
module.exports = function(that, searchString, NAME){
if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
@@ -2561,23 +2218,23 @@
};
/***/ },
-/* 128 */
+/* 101 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
- var isObject = __webpack_require__(11)
- , cof = __webpack_require__(32)
- , MATCH = __webpack_require__(23)('match');
+ var isObject = __webpack_require__(16)
+ , cof = __webpack_require__(18)
+ , MATCH = __webpack_require__(31)('match');
module.exports = function(it){
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ },
-/* 129 */
+/* 102 */
/***/ function(module, exports, __webpack_require__) {
- var MATCH = __webpack_require__(23)('match');
+ var MATCH = __webpack_require__(31)('match');
module.exports = function(KEY){
var re = /./;
try {
@@ -2591,16 +2248,16 @@
};
/***/ },
-/* 130 */
+/* 103 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
- var $export = __webpack_require__(6)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , context = __webpack_require__(100)
, INCLUDES = 'includes';
- $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
@@ -2608,32 +2265,50 @@
});
/***/ },
-/* 131 */
+/* 104 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
- repeat: __webpack_require__(85)
+ repeat: __webpack_require__(105)
});
/***/ },
-/* 132 */
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var toInteger = __webpack_require__(25)
+ , defined = __webpack_require__(22);
+
+ module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ };
+
+/***/ },
+/* 106 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
- var $export = __webpack_require__(6)
- , toLength = __webpack_require__(35)
- , context = __webpack_require__(127)
+ var $export = __webpack_require__(3)
+ , toLength = __webpack_require__(27)
+ , context = __webpack_require__(100)
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
- $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', {
+ $export($export.P + $export.F * __webpack_require__(102)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
@@ -2642,14 +2317,14 @@
});
/***/ },
-/* 133 */
+/* 107 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $at = __webpack_require__(125)(true);
+ var $at = __webpack_require__(98)(true);
// 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(134)(String, 'String', function(iterated){
+ __webpack_require__(108)(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
@@ -2664,20 +2339,20 @@
});
/***/ },
-/* 134 */
+/* 108 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(26)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , hide = __webpack_require__(8)
- , has = __webpack_require__(3)
- , Iterators = __webpack_require__(135)
- , $iterCreate = __webpack_require__(136)
- , setToStringTag = __webpack_require__(22)
- , getPrototypeOf = __webpack_require__(57)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var LIBRARY = __webpack_require__(39)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , hide = __webpack_require__(6)
+ , has = __webpack_require__(17)
+ , Iterators = __webpack_require__(109)
+ , $iterCreate = __webpack_require__(110)
+ , setToStringTag = __webpack_require__(35)
+ , getProto = __webpack_require__(2).getProto
+ , ITERATOR = __webpack_require__(31)('iterator')
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
, FF_ITERATOR = '@@iterator'
, KEYS = 'keys'
@@ -2700,24 +2375,20 @@
, proto = Base.prototype
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
, $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
+ , methods, key;
// Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ if($native){
+ var IteratorPrototype = getProto($default.call(new Base));
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // FF fix
+ if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
}
}
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
// Define iterator
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
hide(proto, ITERATOR, $default);
@@ -2727,9 +2398,9 @@
Iterators[TAG] = returnThis;
if(DEFAULT){
methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: !DEF_VALUES ? $default : getMethod('entries')
};
if(FORCED)for(key in methods){
if(!(key in proto))redefine(proto, key, methods[key]);
@@ -2739,253 +2410,63 @@
};
/***/ },
-/* 135 */
+/* 109 */
/***/ function(module, exports) {
module.exports = {};
/***/ },
-/* 136 */
+/* 110 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var create = __webpack_require__(44)
- , descriptor = __webpack_require__(15)
- , setToStringTag = __webpack_require__(22)
+ var $ = __webpack_require__(2)
+ , descriptor = __webpack_require__(7)
+ , setToStringTag = __webpack_require__(35)
, IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; });
+ __webpack_require__(6)(IteratorPrototype, __webpack_require__(31)('iterator'), function(){ return this; });
module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ },
-/* 137 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.2 String.prototype.anchor(name)
- __webpack_require__(138)('anchor', function(createHTML){
- return function anchor(name){
- return createHTML(this, 'a', 'name', name);
- }
- });
-
-/***/ },
-/* 138 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , defined = __webpack_require__(33)
- , quot = /"/g;
- // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
- var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
- return p1 + '>' + S + '</' + tag + '>';
- };
- module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
- };
-
-/***/ },
-/* 139 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.3 String.prototype.big()
- __webpack_require__(138)('big', function(createHTML){
- return function big(){
- return createHTML(this, 'big', '', '');
- }
- });
-
-/***/ },
-/* 140 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.4 String.prototype.blink()
- __webpack_require__(138)('blink', function(createHTML){
- return function blink(){
- return createHTML(this, 'blink', '', '');
- }
- });
-
-/***/ },
-/* 141 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.5 String.prototype.bold()
- __webpack_require__(138)('bold', function(createHTML){
- return function bold(){
- return createHTML(this, 'b', '', '');
- }
- });
-
-/***/ },
-/* 142 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.6 String.prototype.fixed()
- __webpack_require__(138)('fixed', function(createHTML){
- return function fixed(){
- return createHTML(this, 'tt', '', '');
- }
- });
-
-/***/ },
-/* 143 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.7 String.prototype.fontcolor(color)
- __webpack_require__(138)('fontcolor', function(createHTML){
- return function fontcolor(color){
- return createHTML(this, 'font', 'color', color);
- }
- });
-
-/***/ },
-/* 144 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.8 String.prototype.fontsize(size)
- __webpack_require__(138)('fontsize', function(createHTML){
- return function fontsize(size){
- return createHTML(this, 'font', 'size', size);
- }
- });
-
-/***/ },
-/* 145 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.9 String.prototype.italics()
- __webpack_require__(138)('italics', function(createHTML){
- return function italics(){
- return createHTML(this, 'i', '', '');
- }
- });
-
-/***/ },
-/* 146 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.10 String.prototype.link(url)
- __webpack_require__(138)('link', function(createHTML){
- return function link(url){
- return createHTML(this, 'a', 'href', url);
- }
- });
-
-/***/ },
-/* 147 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.11 String.prototype.small()
- __webpack_require__(138)('small', function(createHTML){
- return function small(){
- return createHTML(this, 'small', '', '');
- }
- });
-
-/***/ },
-/* 148 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.12 String.prototype.strike()
- __webpack_require__(138)('strike', function(createHTML){
- return function strike(){
- return createHTML(this, 'strike', '', '');
- }
- });
-
-/***/ },
-/* 149 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.13 String.prototype.sub()
- __webpack_require__(138)('sub', function(createHTML){
- return function sub(){
- return createHTML(this, 'sub', '', '');
- }
- });
-
-/***/ },
-/* 150 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // B.2.3.14 String.prototype.sup()
- __webpack_require__(138)('sup', function(createHTML){
- return function sup(){
- return createHTML(this, 'sup', '', '');
- }
- });
-
-/***/ },
-/* 151 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Array', {isArray: __webpack_require__(43)});
-
-/***/ },
-/* 152 */
+/* 111 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var ctx = __webpack_require__(18)
- , $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , call = __webpack_require__(153)
- , isArrayIter = __webpack_require__(154)
- , toLength = __webpack_require__(35)
- , createProperty = __webpack_require__(155)
- , getIterFn = __webpack_require__(156);
-
- $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', {
+ var ctx = __webpack_require__(12)
+ , $export = __webpack_require__(3)
+ , toObject = __webpack_require__(21)
+ , call = __webpack_require__(112)
+ , isArrayIter = __webpack_require__(113)
+ , toLength = __webpack_require__(27)
+ , getIterFn = __webpack_require__(114);
+ $export($export.S + $export.F * !__webpack_require__(115)(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
@@ -2995,11 +2476,11 @@
/***/ },
-/* 153 */
+/* 112 */
/***/ function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
- var anObject = __webpack_require__(10);
+ var anObject = __webpack_require__(20);
module.exports = function(iterator, fn, value, entries){
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
@@ -3012,12 +2493,12 @@
};
/***/ },
-/* 154 */
+/* 113 */
/***/ function(module, exports, __webpack_require__) {
// check on default Array iterator
- var Iterators = __webpack_require__(135)
- , ITERATOR = __webpack_require__(23)('iterator')
+ var Iterators = __webpack_require__(109)
+ , ITERATOR = __webpack_require__(31)('iterator')
, ArrayProto = Array.prototype;
module.exports = function(it){
@@ -3025,36 +2506,23 @@
};
/***/ },
-/* 155 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $defineProperty = __webpack_require__(9)
- , createDesc = __webpack_require__(15);
-
- module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
-
-/***/ },
-/* 156 */
+/* 114 */
/***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(73)
- , ITERATOR = __webpack_require__(23)('iterator')
- , Iterators = __webpack_require__(135);
- module.exports = __webpack_require__(7).getIteratorMethod = function(it){
+ var classof = __webpack_require__(47)
+ , ITERATOR = __webpack_require__(31)('iterator')
+ , Iterators = __webpack_require__(109);
+ module.exports = __webpack_require__(5).getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ },
-/* 157 */
+/* 115 */
/***/ function(module, exports, __webpack_require__) {
- var ITERATOR = __webpack_require__(23)('iterator')
+ var ITERATOR = __webpack_require__(31)('iterator')
, SAFE_CLOSING = false;
try {
@@ -3077,413 +2545,140 @@
};
/***/ },
-/* 158 */
+/* 116 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , createProperty = __webpack_require__(155);
+ var $export = __webpack_require__(3);
// WebKit Array.of isn't generic
- $export($export.S + $export.F * __webpack_require__(5)(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
- , aLen = arguments.length
- , result = new (typeof this == 'function' ? this : Array)(aLen);
- while(aLen > index)createProperty(result, index, arguments[index++]);
- result.length = aLen;
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
return result;
}
});
/***/ },
-/* 159 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 22.1.3.13 Array.prototype.join(separator)
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , arrayJoin = [].join;
-
- // fallback for not array-like strings
- $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', {
- join: function join(separator){
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
- });
-
-/***/ },
-/* 160 */
-/***/ function(module, exports, __webpack_require__) {
-
- var fails = __webpack_require__(5);
-
- module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
- };
-
-/***/ },
-/* 161 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , html = __webpack_require__(46)
- , cof = __webpack_require__(32)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , arraySlice = [].slice;
-
- // fallback for not array-like ES3 strings and DOM objects
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- if(html)arraySlice.call(html);
- }), 'Array', {
- slice: function slice(begin, end){
- var len = toLength(this.length)
- , klass = cof(this);
- end = end === undefined ? len : end;
- if(klass == 'Array')return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len)
- , upTo = toIndex(end, len)
- , size = toLength(upTo - start)
- , cloned = Array(size)
- , i = 0;
- for(; i < size; i++)cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
- });
-
-/***/ },
-/* 162 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(19)
- , toObject = __webpack_require__(56)
- , fails = __webpack_require__(5)
- , $sort = [].sort
- , test = [1, 2, 3];
-
- $export($export.P + $export.F * (fails(function(){
- // IE8-
- test.sort(undefined);
- }) || !fails(function(){
- // V8 bug
- test.sort(null);
- // Old WebKit
- }) || !__webpack_require__(160)($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn){
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
- });
-
-/***/ },
-/* 163 */
+/* 117 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $forEach = __webpack_require__(164)(0)
- , STRICT = __webpack_require__(160)([].forEach, true);
+ var addToUnscopables = __webpack_require__(118)
+ , step = __webpack_require__(119)
+ , Iterators = __webpack_require__(109)
+ , toIObject = __webpack_require__(23);
- $export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */){
- return $forEach(this, callbackfn, arguments[1]);
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(108)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
}
- });
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
-/***/ },
-/* 164 */
-/***/ function(module, exports, __webpack_require__) {
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
- // 0 -> Array#forEach
- // 1 -> Array#map
- // 2 -> Array#filter
- // 3 -> Array#some
- // 4 -> Array#every
- // 5 -> Array#find
- // 6 -> Array#findIndex
- var ctx = __webpack_require__(18)
- , IObject = __webpack_require__(31)
- , toObject = __webpack_require__(56)
- , toLength = __webpack_require__(35)
- , asc = __webpack_require__(165);
- module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
- };
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
/***/ },
-/* 165 */
+/* 118 */
/***/ function(module, exports, __webpack_require__) {
- // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
- var speciesConstructor = __webpack_require__(166);
-
- module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
+ // 22.1.3.31 Array.prototype[@@unscopables]
+ var UNSCOPABLES = __webpack_require__(31)('unscopables')
+ , ArrayProto = Array.prototype;
+ if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(6)(ArrayProto, UNSCOPABLES, {});
+ module.exports = function(key){
+ ArrayProto[UNSCOPABLES][key] = true;
};
/***/ },
-/* 166 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(11)
- , isArray = __webpack_require__(43)
- , SPECIES = __webpack_require__(23)('species');
+/* 119 */
+/***/ function(module, exports) {
- module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
+ module.exports = function(done, value){
+ return {value: value, done: !!done};
};
/***/ },
-/* 167 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $map = __webpack_require__(164)(1);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */){
- return $map(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 168 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $filter = __webpack_require__(164)(2);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */){
- return $filter(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 169 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $some = __webpack_require__(164)(3);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */){
- return $some(this, callbackfn, arguments[1]);
- }
- });
-
-/***/ },
-/* 170 */
+/* 120 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var $export = __webpack_require__(6)
- , $every = __webpack_require__(164)(4);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */){
- return $every(this, callbackfn, arguments[1]);
- }
- });
+ __webpack_require__(121)('Array');
/***/ },
-/* 171 */
+/* 121 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(172);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
- });
-
-/***/ },
-/* 172 */
-/***/ function(module, exports, __webpack_require__) {
-
- var aFunction = __webpack_require__(19)
- , toObject = __webpack_require__(56)
- , IObject = __webpack_require__(31)
- , toLength = __webpack_require__(35);
+ var global = __webpack_require__(4)
+ , $ = __webpack_require__(2)
+ , DESCRIPTORS = __webpack_require__(8)
+ , SPECIES = __webpack_require__(31)('species');
- module.exports = function(that, callbackfn, aLen, memo, isRight){
- aFunction(callbackfn);
- var O = toObject(that)
- , self = IObject(O)
- , length = toLength(O.length)
- , index = isRight ? length - 1 : 0
- , i = isRight ? -1 : 1;
- if(aLen < 2)for(;;){
- if(index in self){
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if(isRight ? index < 0 : length <= index){
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
+ module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
};
/***/ },
-/* 173 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $reduce = __webpack_require__(172);
-
- $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
- });
-
-/***/ },
-/* 174 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $indexOf = __webpack_require__(34)(false)
- , $native = [].indexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
- });
-
-/***/ },
-/* 175 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toIObject = __webpack_require__(30)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , $native = [].lastIndexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
- $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
- // convert -0 to +0
- if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
- var O = toIObject(this)
- , length = toLength(O.length)
- , index = length - 1;
- if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
- if(index < 0)index = length + index;
- for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
- return -1;
- }
- });
-
-/***/ },
-/* 176 */
+/* 122 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {copyWithin: __webpack_require__(177)});
+ $export($export.P, 'Array', {copyWithin: __webpack_require__(123)});
- __webpack_require__(178)('copyWithin');
+ __webpack_require__(118)('copyWithin');
/***/ },
-/* 177 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
+ var toObject = __webpack_require__(21)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27);
module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
var O = toObject(this)
, len = toLength(O.length)
, to = toIndex(target, len)
, from = toIndex(start, len)
- , end = arguments.length > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , end = $$.length > 2 ? $$[2] : undefined
, count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
, inc = 1;
if(from < to && to < from + count){
@@ -3500,56 +2695,45 @@
};
/***/ },
-/* 178 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 22.1.3.31 Array.prototype[@@unscopables]
- var UNSCOPABLES = __webpack_require__(23)('unscopables')
- , ArrayProto = Array.prototype;
- if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {});
- module.exports = function(key){
- ArrayProto[UNSCOPABLES][key] = true;
- };
-
-/***/ },
-/* 179 */
+/* 124 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P, 'Array', {fill: __webpack_require__(180)});
+ $export($export.P, 'Array', {fill: __webpack_require__(125)});
- __webpack_require__(178)('fill');
+ __webpack_require__(118)('fill');
/***/ },
-/* 180 */
+/* 125 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
'use strict';
- var toObject = __webpack_require__(56)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35);
- module.exports = function fill(value /*, start = 0, end = @length */){
+ var toObject = __webpack_require__(21)
+ , toIndex = __webpack_require__(26)
+ , toLength = __webpack_require__(27);
+ module.exports = [].fill || function fill(value /*, start = 0, end = @length */){
var O = toObject(this)
, length = toLength(O.length)
- , aLen = arguments.length
- , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
- , end = aLen > 2 ? arguments[2] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , index = toIndex($$len > 1 ? $$[1] : undefined, length)
+ , end = $$len > 2 ? $$[2] : undefined
, endPos = end === undefined ? length : toIndex(end, length);
while(endPos > index)O[index++] = value;
return O;
};
/***/ },
-/* 181 */
+/* 126 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(164)(5)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(28)(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
@@ -3559,16 +2743,16 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)(KEY);
+ __webpack_require__(118)(KEY);
/***/ },
-/* 182 */
+/* 127 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
- var $export = __webpack_require__(6)
- , $find = __webpack_require__(164)(6)
+ var $export = __webpack_require__(3)
+ , $find = __webpack_require__(28)(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
@@ -3578,134 +2762,58 @@
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)(KEY);
-
-/***/ },
-/* 183 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var addToUnscopables = __webpack_require__(178)
- , step = __webpack_require__(184)
- , Iterators = __webpack_require__(135)
- , toIObject = __webpack_require__(30);
-
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
- this._t = undefined;
- return step(1);
- }
- if(kind == 'keys' )return step(0, index);
- if(kind == 'values')return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
-
-/***/ },
-/* 184 */
-/***/ function(module, exports) {
-
- module.exports = function(done, value){
- return {value: value, done: !!done};
- };
-
-/***/ },
-/* 185 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(186)('Array');
+ __webpack_require__(118)(KEY);
/***/ },
-/* 186 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var global = __webpack_require__(2)
- , dP = __webpack_require__(9)
- , DESCRIPTORS = __webpack_require__(4)
- , SPECIES = __webpack_require__(23)('species');
-
- module.exports = function(KEY){
- var C = global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
- };
-
-/***/ },
-/* 187 */
+/* 128 */
/***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(2)
- , inheritIfRequired = __webpack_require__(80)
- , dP = __webpack_require__(9).f
- , gOPN = __webpack_require__(48).f
- , isRegExp = __webpack_require__(128)
- , $flags = __webpack_require__(188)
- , $RegExp = global.RegExp
- , Base = $RegExp
- , proto = $RegExp.prototype
- , re1 = /a/g
- , re2 = /a/g
+ var $ = __webpack_require__(2)
+ , global = __webpack_require__(4)
+ , isRegExp = __webpack_require__(101)
+ , $flags = __webpack_require__(129)
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
// "new" creates a new object, old webkit buggy here
- , CORRECT_NEW = new $RegExp(re1) !== re1;
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
- if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){
- re2[__webpack_require__(23)('match')] = false;
+ if(__webpack_require__(8) && (!CORRECT_NEW || __webpack_require__(9)(function(){
+ re2[__webpack_require__(31)('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))){
$RegExp = function RegExp(p, f){
- var tiRE = this instanceof $RegExp
- , piRE = isRegExp(p)
+ var piRE = isRegExp(p)
, fiU = f === undefined;
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
- : inheritIfRequired(CORRECT_NEW
+ return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p
+ : CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
- , tiRE ? this : proto, $RegExp);
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);
};
- var proxy = function(key){
- key in $RegExp || dP($RegExp, key, {
+ $.each.call($.getNames(Base), function(key){
+ key in $RegExp || $.setDesc($RegExp, key, {
configurable: true,
get: function(){ return Base[key]; },
set: function(it){ Base[key] = it; }
});
- };
- for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ });
proto.constructor = $RegExp;
$RegExp.prototype = proto;
- __webpack_require__(16)(global, 'RegExp', $RegExp);
+ __webpack_require__(10)(global, 'RegExp', $RegExp);
}
- __webpack_require__(186)('RegExp');
+ __webpack_require__(121)('RegExp');
/***/ },
-/* 188 */
+/* 129 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.2.5.3 get RegExp.prototype.flags
- var anObject = __webpack_require__(10);
+ var anObject = __webpack_require__(20);
module.exports = function(){
var that = anObject(this)
, result = '';
@@ -3718,259 +2826,198 @@
};
/***/ },
-/* 189 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- __webpack_require__(190);
- var anObject = __webpack_require__(10)
- , $flags = __webpack_require__(188)
- , DESCRIPTORS = __webpack_require__(4)
- , TO_STRING = 'toString'
- , $toString = /./[TO_STRING];
-
- var define = function(fn){
- __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true);
- };
-
- // 21.2.5.14 RegExp.prototype.toString()
- if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
- define(function toString(){
- var R = anObject(this);
- return '/'.concat(R.source, '/',
- 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
- });
- // FF44- RegExp#toString has a wrong name
- } else if($toString.name != TO_STRING){
- define(function toString(){
- return $toString.call(this);
- });
- }
-
-/***/ },
-/* 190 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
- if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', {
+ var $ = __webpack_require__(2);
+ if(__webpack_require__(8) && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {
configurable: true,
- get: __webpack_require__(188)
+ get: __webpack_require__(129)
});
/***/ },
-/* 191 */
+/* 131 */
/***/ function(module, exports, __webpack_require__) {
// @@match logic
- __webpack_require__(192)('match', 1, function(defined, MATCH, $match){
+ __webpack_require__(132)('match', 1, function(defined, MATCH){
// 21.1.3.11 String.prototype.match(regexp)
- return [function match(regexp){
+ return function match(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- }, $match];
+ };
});
/***/ },
-/* 192 */
+/* 132 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var hide = __webpack_require__(8)
- , redefine = __webpack_require__(16)
- , fails = __webpack_require__(5)
- , defined = __webpack_require__(33)
- , wks = __webpack_require__(23);
+ var hide = __webpack_require__(6)
+ , redefine = __webpack_require__(10)
+ , fails = __webpack_require__(9)
+ , defined = __webpack_require__(22)
+ , wks = __webpack_require__(31);
module.exports = function(KEY, length, exec){
var SYMBOL = wks(KEY)
- , fns = exec(defined, SYMBOL, ''[KEY])
- , strfn = fns[0]
- , rxfn = fns[1];
+ , original = ''[KEY];
if(fails(function(){
var O = {};
O[SYMBOL] = function(){ return 7; };
return ''[KEY](O) != 7;
})){
- redefine(String.prototype, KEY, strfn);
+ redefine(String.prototype, KEY, exec(defined, SYMBOL, original));
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function(string, arg){ return rxfn.call(string, this, arg); }
+ ? function(string, arg){ return original.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
- : function(string){ return rxfn.call(string, this); }
+ : function(string){ return original.call(string, this); }
);
}
};
/***/ },
-/* 193 */
+/* 133 */
/***/ function(module, exports, __webpack_require__) {
// @@replace logic
- __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){
+ __webpack_require__(132)('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
- return [function replace(searchValue, replaceValue){
+ return function replace(searchValue, replaceValue){
'use strict';
var O = defined(this)
, fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
- }, $replace];
+ };
});
/***/ },
-/* 194 */
+/* 134 */
/***/ function(module, exports, __webpack_require__) {
// @@search logic
- __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){
+ __webpack_require__(132)('search', 1, function(defined, SEARCH){
// 21.1.3.15 String.prototype.search(regexp)
- return [function search(regexp){
+ return function search(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
- }, $search];
+ };
});
/***/ },
-/* 195 */
+/* 135 */
/***/ function(module, exports, __webpack_require__) {
// @@split logic
- __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){
- 'use strict';
- var isRegExp = __webpack_require__(128)
- , _split = $split
- , $push = [].push
- , $SPLIT = 'split'
- , LENGTH = 'length'
- , LAST_INDEX = 'lastIndex';
- if(
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
- ''[$SPLIT](/.?/)[LENGTH]
- ){
- var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
- // based on es5-shim implementation, need to rework it
- $split = function(separator, limit){
- var string = String(this);
- if(separator === undefined && limit === 0)return [];
- // If `separator` is not a regex, use native split
- if(!isRegExp(separator))return _split.call(string, separator, limit);
- var output = [];
- var flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.unicode ? 'u' : '') +
- (separator.sticky ? 'y' : '');
- var lastLastIndex = 0;
- var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
- // Make `global` and avoid `lastIndex` issues by working with a copy
- var separatorCopy = new RegExp(separator.source, flags + 'g');
- var separator2, match, lastIndex, lastLength, i;
- // Doesn't need flags gy, but they don't hurt
- if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
- while(match = separatorCopy.exec(string)){
- // `separatorCopy.lastIndex` is not reliable cross-browser
- lastIndex = match.index + match[0][LENGTH];
- if(lastIndex > lastLastIndex){
- output.push(string.slice(lastLastIndex, match.index));
- // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
- if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
- for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
- });
- if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
- lastLength = match[0][LENGTH];
- lastLastIndex = lastIndex;
- if(output[LENGTH] >= splitLimit)break;
- }
- if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
- }
- if(lastLastIndex === string[LENGTH]){
- if(lastLength || !separatorCopy.test(''))output.push('');
- } else output.push(string.slice(lastLastIndex));
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
- };
- // Chakra, V8
- } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
- $split = function(separator, limit){
- return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
- };
- }
+ __webpack_require__(132)('split', 2, function(defined, SPLIT, $split){
// 21.1.3.17 String.prototype.split(separator, limit)
- return [function split(separator, limit){
+ return function split(separator, limit){
+ 'use strict';
var O = defined(this)
, fn = separator == undefined ? undefined : separator[SPLIT];
- return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
- }, $split];
+ return fn !== undefined
+ ? fn.call(separator, O, limit)
+ : $split.call(String(O), separator, limit);
+ };
});
/***/ },
-/* 196 */
+/* 136 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , ctx = __webpack_require__(18)
- , classof = __webpack_require__(73)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(11)
- , aFunction = __webpack_require__(19)
- , anInstance = __webpack_require__(197)
- , forOf = __webpack_require__(198)
- , speciesConstructor = __webpack_require__(199)
- , task = __webpack_require__(200).set
- , microtask = __webpack_require__(201)()
- , PROMISE = 'Promise'
- , TypeError = global.TypeError
- , process = global.process
- , $Promise = global[PROMISE]
- , process = global.process
- , isNode = classof(process) == 'process'
- , empty = function(){ /* empty */ }
- , Internal, GenericPromiseCapability, Wrapper;
+ var $ = __webpack_require__(2)
+ , LIBRARY = __webpack_require__(39)
+ , global = __webpack_require__(4)
+ , ctx = __webpack_require__(12)
+ , classof = __webpack_require__(47)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , strictNew = __webpack_require__(137)
+ , forOf = __webpack_require__(138)
+ , setProto = __webpack_require__(45).set
+ , same = __webpack_require__(43)
+ , SPECIES = __webpack_require__(31)('species')
+ , speciesConstructor = __webpack_require__(139)
+ , asap = __webpack_require__(140)
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , empty = function(){ /* empty */ }
+ , Wrapper;
+
+ var testResolve = function(sub){
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
+ };
- var USE_NATIVE = !!function(){
+ var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1)
- , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch(e){ /* empty */ }
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && __webpack_require__(8)){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
}();
// helpers
var sameConstructor = function(a, b){
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+ };
+ var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
- var newPromiseCapability = function(C){
- return sameConstructor($Promise, C)
- ? new PromiseCapability(C)
- : new GenericPromiseCapability(C);
- };
- var PromiseCapability = GenericPromiseCapability = function(C){
+ var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
};
var perform = function(exec){
try {
@@ -3979,32 +3026,23 @@
return {error: e};
}
};
- var notify = function(promise, isReject){
- if(promise._n)return;
- promise._n = true;
- var chain = promise._c;
- microtask(function(){
- var value = promise._v
- , ok = promise._s == 1
+ var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
- , domain = reaction.domain
, result, then;
try {
if(handler){
- if(!ok){
- if(promise._h == 2)onHandleUnhandled(promise);
- promise._h = 1;
- }
- if(handler === true)result = value;
- else {
- if(domain)domain.enter();
- result = handler(value);
- if(domain)domain.exit();
- }
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
@@ -4016,17 +3054,12 @@
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if(isReject && !promise._h)onUnhandled(promise);
- });
- };
- var onUnhandled = function(promise){
- task.call(global, function(){
- var value = promise._v
- , abrupt, handler, console;
- if(isUnhandled(promise)){
- abrupt = perform(function(){
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
@@ -4034,54 +3067,42 @@
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if(abrupt)throw abrupt.error;
+ } record.a = undefined;
+ }, 1);
});
};
var isUnhandled = function(promise){
- if(promise._h == 1)return false;
- var chain = promise._a || promise._c
- , i = 0
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
, reaction;
+ if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
- var onHandleUnhandled = function(promise){
- task.call(global, function(){
- var handler;
- if(isNode){
- process.emit('rejectionHandled', promise);
- } else if(handler = global.onrejectionhandled){
- handler({promise: promise, reason: promise._v});
- }
- });
- };
var $reject = function(value){
- var promise = this;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if(!promise._a)promise._a = promise._c.slice();
- notify(promise, true);
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
};
var $resolve = function(value){
- var promise = this
+ var record = this
, then;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
try {
- if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
- microtask(function(){
- var wrapper = {_w: promise, _d: false}; // wrap
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
@@ -4089,122 +3110,114 @@
}
});
} else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
}
} catch(e){
- $reject.call({_w: promise, _d: false}, e); // wrap
+ $reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor){
- anInstance(this, $Promise, PROMISE, '_h');
+ P = function Promise(executor){
aFunction(executor);
- Internal.call(this);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
- $reject.call(this, err);
+ $reject.call(record, err);
}
};
- Internal = function Promise(executor){
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = __webpack_require__(202)($Promise.prototype, {
+ __webpack_require__(142)(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if(this._a)this._a.push(reaction);
- if(this._s)notify(this, false);
- return reaction.promise;
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- PromiseCapability = function(){
- var promise = new Internal;
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
}
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
- __webpack_require__(22)($Promise, PROMISE);
- __webpack_require__(186)(PROMISE);
- Wrapper = __webpack_require__(7)[PROMISE];
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+ __webpack_require__(35)(P, PROMISE);
+ __webpack_require__(121)(PROMISE);
+ Wrapper = __webpack_require__(5)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
- var capability = newPromiseCapability(this)
+ var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
- $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ $export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
- var capability = newPromiseCapability(this)
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
- $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){
- $Promise.all(iter)['catch'](empty);
+ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(115)(function(iter){
+ P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, resolve = capability.resolve
- , reject = capability.reject;
+ , reject = capability.reject
+ , values = [];
var abrupt = perform(function(){
- var values = []
- , index = 0
- , remaining = 1;
- forOf(iterable, false, function(promise){
- var $index = index++
- , alreadyCalled = false;
- values.push(undefined);
- remaining++;
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
}, reject);
});
- --remaining || resolve(values);
+ else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
@@ -4217,67 +3230,129 @@
});
/***/ },
-/* 197 */
+/* 137 */
/***/ function(module, exports) {
- module.exports = function(it, Constructor, name, forbiddenField){
- if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
- throw TypeError(name + ': incorrect invocation!');
- } return it;
+ module.exports = function(it, Constructor, name){
+ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
+ return it;
};
/***/ },
-/* 198 */
+/* 138 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(18)
- , call = __webpack_require__(153)
- , isArrayIter = __webpack_require__(154)
- , anObject = __webpack_require__(10)
- , toLength = __webpack_require__(35)
- , getIterFn = __webpack_require__(156)
- , BREAK = {}
- , RETURN = {};
- var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
- var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ var ctx = __webpack_require__(12)
+ , call = __webpack_require__(112)
+ , isArrayIter = __webpack_require__(113)
+ , anObject = __webpack_require__(20)
+ , toLength = __webpack_require__(27)
+ , getIterFn = __webpack_require__(114);
+ module.exports = function(iterable, entries, fn, that){
+ var iterFn = getIterFn(iterable)
, f = ctx(fn, that, entries ? 2 : 1)
, index = 0
- , length, step, iterator, result;
+ , length, step, iterator;
if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if(result === BREAK || result === RETURN)return result;
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
} else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
- result = call(iterator, f, step.value, entries);
- if(result === BREAK || result === RETURN)return result;
+ call(iterator, f, step.value, entries);
}
};
- exports.BREAK = BREAK;
- exports.RETURN = RETURN;
/***/ },
-/* 199 */
+/* 139 */
/***/ function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
- var anObject = __webpack_require__(10)
- , aFunction = __webpack_require__(19)
- , SPECIES = __webpack_require__(23)('species');
+ var anObject = __webpack_require__(20)
+ , aFunction = __webpack_require__(13)
+ , SPECIES = __webpack_require__(31)('species');
module.exports = function(O, D){
var C = anObject(O).constructor, S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ },
-/* 200 */
+/* 140 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , macrotask = __webpack_require__(141).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(18)(process) == 'process'
+ , head, last, notify;
+
+ var flush = function(){
+ var parent, domain, fn;
+ if(isNode && (parent = process.domain)){
+ process.domain = null;
+ parent.exit();
+ }
+ while(head){
+ domain = head.domain;
+ fn = head.fn;
+ if(domain)domain.enter();
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ if(domain)domain.exit();
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = 1
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = -toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ module.exports = function asap(fn){
+ var task = {fn: fn, next: undefined, domain: isNode && process.domain};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+
+/***/ },
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
- var ctx = __webpack_require__(18)
- , invoke = __webpack_require__(76)
- , html = __webpack_require__(46)
- , cel = __webpack_require__(13)
- , global = __webpack_require__(2)
+ var ctx = __webpack_require__(12)
+ , invoke = __webpack_require__(19)
+ , html = __webpack_require__(14)
+ , cel = __webpack_require__(15)
+ , global = __webpack_require__(4)
, process = global.process
, setTask = global.setImmediate
, clearTask = global.clearImmediate
@@ -4294,7 +3369,7 @@
fn();
}
};
- var listener = function(event){
+ var listner = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -4312,7 +3387,7 @@
delete queue[id];
};
// Node.js 0.8-
- if(__webpack_require__(32)(process) == 'process'){
+ if(__webpack_require__(18)(process) == 'process'){
defer = function(id){
process.nextTick(ctx(run, id, 1));
};
@@ -4320,7 +3395,7 @@
} else if(MessageChannel){
channel = new MessageChannel;
port = channel.port2;
- channel.port1.onmessage = listener;
+ channel.port1.onmessage = listner;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
@@ -4328,7 +3403,7 @@
defer = function(id){
global.postMessage(id + '', '*');
};
- global.addEventListener('message', listener, false);
+ global.addEventListener('message', listner, false);
// IE8-
} else if(ONREADYSTATECHANGE in cel('script')){
defer = function(id){
@@ -4350,97 +3425,24 @@
};
/***/ },
-/* 201 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , macrotask = __webpack_require__(200).set
- , Observer = global.MutationObserver || global.WebKitMutationObserver
- , process = global.process
- , Promise = global.Promise
- , isNode = __webpack_require__(32)(process) == 'process';
-
- module.exports = function(){
- var head, last, notify;
-
- var flush = function(){
- var parent, fn;
- if(isNode && (parent = process.domain))parent.exit();
- while(head){
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch(e){
- if(head)notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if(parent)parent.enter();
- };
-
- // Node.js
- if(isNode){
- notify = function(){
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if(Observer){
- var toggle = true
- , node = document.createTextNode('');
- new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
- notify = function(){
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if(Promise && Promise.resolve){
- var promise = Promise.resolve();
- notify = function(){
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function(){
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function(fn){
- var task = {fn: fn, next: undefined};
- if(last)last.next = task;
- if(!head){
- head = task;
- notify();
- } last = task;
- };
- };
-
-/***/ },
-/* 202 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
- var redefine = __webpack_require__(16);
- module.exports = function(target, src, safe){
- for(var key in src)redefine(target, key, src[key], safe);
+ var redefine = __webpack_require__(10);
+ module.exports = function(target, src){
+ for(var key in src)redefine(target, key, src[key]);
return target;
};
/***/ },
-/* 203 */
+/* 143 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(204);
+ var strong = __webpack_require__(144);
// 23.1 Map Objects
- module.exports = __webpack_require__(205)('Map', function(get){
+ __webpack_require__(145)('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
@@ -4455,23 +3457,41 @@
}, strong, true);
/***/ },
-/* 204 */
+/* 144 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var dP = __webpack_require__(9).f
- , create = __webpack_require__(44)
- , redefineAll = __webpack_require__(202)
- , ctx = __webpack_require__(18)
- , anInstance = __webpack_require__(197)
- , defined = __webpack_require__(33)
- , forOf = __webpack_require__(198)
- , $iterDefine = __webpack_require__(134)
- , step = __webpack_require__(184)
- , setSpecies = __webpack_require__(186)
- , DESCRIPTORS = __webpack_require__(4)
- , fastKey = __webpack_require__(20).fastKey
- , SIZE = DESCRIPTORS ? '_s' : 'size';
+ var $ = __webpack_require__(2)
+ , hide = __webpack_require__(6)
+ , redefineAll = __webpack_require__(142)
+ , ctx = __webpack_require__(12)
+ , strictNew = __webpack_require__(137)
+ , defined = __webpack_require__(22)
+ , forOf = __webpack_require__(138)
+ , $iterDefine = __webpack_require__(108)
+ , step = __webpack_require__(119)
+ , ID = __webpack_require__(11)('id')
+ , $has = __webpack_require__(17)
+ , isObject = __webpack_require__(16)
+ , setSpecies = __webpack_require__(121)
+ , DESCRIPTORS = __webpack_require__(8)
+ , isExtensible = Object.isExtensible || isObject
+ , SIZE = DESCRIPTORS ? '_s' : 'size'
+ , id = 0;
+
+ var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!$has(it, ID)){
+ // can't set id to frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add id
+ if(!create)return 'E';
+ // add missing object id
+ hide(it, ID, ++id);
+ // return object id with prefix
+ } return 'O' + it[ID];
+ };
var getEntry = function(that, key){
// fast case
@@ -4486,11 +3506,11 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
+ strictNew(that, C, NAME);
+ that._i = $.create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4525,7 +3545,6 @@
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /*, that = undefined */){
- anInstance(this, C, 'forEach');
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
, entry;
while(entry = entry ? entry.n : this._f){
@@ -4540,7 +3559,7 @@
return !!getEntry(this, key);
}
});
- if(DESCRIPTORS)dP(C.prototype, 'size', {
+ if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {
get: function(){
return defined(this[SIZE]);
}
@@ -4602,22 +3621,20 @@
};
/***/ },
-/* 205 */
+/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , redefine = __webpack_require__(16)
- , redefineAll = __webpack_require__(202)
- , meta = __webpack_require__(20)
- , forOf = __webpack_require__(198)
- , anInstance = __webpack_require__(197)
- , isObject = __webpack_require__(11)
- , fails = __webpack_require__(5)
- , $iterDetect = __webpack_require__(157)
- , setToStringTag = __webpack_require__(22)
- , inheritIfRequired = __webpack_require__(80);
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , redefine = __webpack_require__(10)
+ , redefineAll = __webpack_require__(142)
+ , forOf = __webpack_require__(138)
+ , strictNew = __webpack_require__(137)
+ , isObject = __webpack_require__(16)
+ , fails = __webpack_require__(9)
+ , $iterDetect = __webpack_require__(115)
+ , setToStringTag = __webpack_require__(35);
module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var Base = global[NAME]
@@ -4644,7 +3661,6 @@
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
- meta.NEED = true;
} else {
var instance = new C
// early implementations not supports chaining
@@ -4654,23 +3670,20 @@
// most early implementations doesn't supports iterables, most modern - not close it correctly
, ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
// for early implementations -0 and +0 not the same
- , BUGGY_ZERO = !IS_WEAK && fails(function(){
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new C()
- , index = 5;
- while(index--)$instance[ADDER](index, index);
- return !$instance.has(-0);
- });
+ , BUGGY_ZERO;
if(!ACCEPT_ITERABLES){
C = wrapper(function(target, iterable){
- anInstance(target, C, NAME);
- var that = inheritIfRequired(new Base, target, C);
+ strictNew(target, C, NAME);
+ var that = new Base;
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
return that;
});
C.prototype = proto;
proto.constructor = C;
}
+ IS_WEAK || instance.forEach(function(val, key){
+ BUGGY_ZERO = 1 / key === -Infinity;
+ });
if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
fixMethod('delete');
fixMethod('has');
@@ -4692,14 +3705,14 @@
};
/***/ },
-/* 206 */
+/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var strong = __webpack_require__(204);
+ var strong = __webpack_require__(144);
// 23.2 Set Objects
- module.exports = __webpack_require__(205)('Set', function(get){
+ __webpack_require__(145)('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
@@ -4709,59 +3722,46 @@
}, strong);
/***/ },
-/* 207 */
+/* 147 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var each = __webpack_require__(164)(0)
- , redefine = __webpack_require__(16)
- , meta = __webpack_require__(20)
- , assign = __webpack_require__(67)
- , weak = __webpack_require__(208)
- , isObject = __webpack_require__(11)
- , getWeak = meta.getWeak
- , isExtensible = Object.isExtensible
- , uncaughtFrozenStore = weak.ufstore
- , tmp = {}
- , InternalMap;
-
- var wrapper = function(get){
- return function WeakMap(){
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
- };
+ var $ = __webpack_require__(2)
+ , redefine = __webpack_require__(10)
+ , weak = __webpack_require__(148)
+ , isObject = __webpack_require__(16)
+ , has = __webpack_require__(17)
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
- var methods = {
+ // 23.3 WeakMap Objects
+ var $WeakMap = __webpack_require__(145)('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).get(key);
- return data ? data[this._i] : undefined;
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
- };
-
- // 23.3 WeakMap Objects
- var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true);
+ }, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
- InternalMap = weak.getConstructor(wrapper);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function(key){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
- // store frozen objects on internal weakmap shim
+ // store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
- if(!this._f)this._f = new InternalMap;
- var result = this._f[key](a, b);
+ var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
@@ -4770,44 +3770,46 @@
}
/***/ },
-/* 208 */
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var redefineAll = __webpack_require__(202)
- , getWeak = __webpack_require__(20).getWeak
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11)
- , anInstance = __webpack_require__(197)
- , forOf = __webpack_require__(198)
- , createArrayMethod = __webpack_require__(164)
- , $has = __webpack_require__(3)
+ var hide = __webpack_require__(6)
+ , redefineAll = __webpack_require__(142)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16)
+ , strictNew = __webpack_require__(137)
+ , forOf = __webpack_require__(138)
+ , createArrayMethod = __webpack_require__(28)
+ , $has = __webpack_require__(17)
+ , WEAK = __webpack_require__(11)('weak')
+ , isExtensible = Object.isExtensible || isObject
, arrayFind = createArrayMethod(5)
, arrayFindIndex = createArrayMethod(6)
, id = 0;
- // fallback for uncaught frozen keys
- var uncaughtFrozenStore = function(that){
- return that._l || (that._l = new UncaughtFrozenStore);
+ // fallback for frozen keys
+ var frozenStore = function(that){
+ return that._l || (that._l = new FrozenStore);
};
- var UncaughtFrozenStore = function(){
+ var FrozenStore = function(){
this.a = [];
};
- var findUncaughtFrozen = function(store, key){
+ var findFrozen = function(store, key){
return arrayFind(store.a, function(it){
return it[0] === key;
});
};
- UncaughtFrozenStore.prototype = {
+ FrozenStore.prototype = {
get: function(key){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)return entry[1];
},
has: function(key){
- return !!findUncaughtFrozen(this, key);
+ return !!findFrozen(this, key);
},
set: function(key, value){
- var entry = findUncaughtFrozen(this, key);
+ var entry = findFrozen(this, key);
if(entry)entry[1] = value;
else this.a.push([key, value]);
},
@@ -4823,9 +3825,9 @@
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
+ strictNew(that, C, NAME);
that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
+ that._l = undefined; // leak store for frozen objects
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
@@ -4833,39 +3835,40 @@
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this)['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
+ if(!isExtensible(key))return frozenStore(this)['delete'](key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key){
if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).has(key);
- return data && $has(data, this._i);
+ if(!isExtensible(key))return frozenStore(this).has(key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i);
}
});
return C;
},
def: function(that, key, value){
- var data = getWeak(anObject(key), true);
- if(data === true)uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
+ if(!isExtensible(anObject(key))){
+ frozenStore(that).set(key, value);
+ } else {
+ $has(key, WEAK) || hide(key, WEAK, {});
+ key[WEAK][that._i] = value;
+ } return that;
},
- ufstore: uncaughtFrozenStore
+ frozenStore: frozenStore,
+ WEAK: WEAK
};
/***/ },
-/* 209 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var weak = __webpack_require__(208);
+ var weak = __webpack_require__(148);
// 23.4 WeakSet Objects
- __webpack_require__(205)('WeakSet', function(get){
+ __webpack_require__(145)('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
@@ -4875,56 +3878,42 @@
}, weak, false, true);
/***/ },
-/* 210 */
+/* 150 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
- var $export = __webpack_require__(6)
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , rApply = (__webpack_require__(2).Reflect || {}).apply
- , fApply = Function.apply;
- // MS Edge argumentsList argument is optional
- $export($export.S + $export.F * !__webpack_require__(5)(function(){
- rApply(function(){});
- }), 'Reflect', {
+ var $export = __webpack_require__(3)
+ , _apply = Function.apply
+ , anObject = __webpack_require__(20);
+
+ $export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
- var T = aFunction(target)
- , L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ return _apply.call(target, thisArgument, anObject(argumentsList));
}
});
/***/ },
-/* 211 */
+/* 151 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
- var $export = __webpack_require__(6)
- , create = __webpack_require__(44)
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11)
- , fails = __webpack_require__(5)
- , bind = __webpack_require__(75)
- , rConstruct = (__webpack_require__(2).Reflect || {}).construct;
-
- // MS Edge supports only 2 arguments and argumentsList argument is optional
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , aFunction = __webpack_require__(13)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16)
+ , bind = Function.bind || __webpack_require__(5).Function.prototype.bind;
+
+ // MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
- var NEW_TARGET_BUG = fails(function(){
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
function F(){}
- return !(rConstruct(function(){}, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function(){
- rConstruct(function(){});
- });
-
- $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+ }), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
switch(args.length){
@@ -4941,32 +3930,29 @@
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
- , instance = create(isObject(proto) ? proto : Object.prototype)
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ },
-/* 212 */
+/* 152 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
- var dP = __webpack_require__(9)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
- , toPrimitive = __webpack_require__(14);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
- $export($export.S + $export.F * __webpack_require__(5)(function(){
- Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+ $export($export.S + $export.F * __webpack_require__(9)(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
try {
- dP.f(target, propertyKey, attributes);
+ $.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
@@ -4975,29 +3961,29 @@
});
/***/ },
-/* 213 */
+/* 153 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
- var $export = __webpack_require__(6)
- , gOPD = __webpack_require__(49).f
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , getDesc = __webpack_require__(2).getDesc
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
- var desc = gOPD(anObject(target), propertyKey);
+ var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ },
-/* 214 */
+/* 154 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 26.1.5 Reflect.enumerate(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
@@ -5005,7 +3991,7 @@
, key;
for(key in iterated)keys.push(key);
};
- __webpack_require__(136)(Enumerate, 'Object', function(){
+ __webpack_require__(110)(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
@@ -5022,54 +4008,53 @@
});
/***/ },
-/* 215 */
+/* 155 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
- var gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , isObject = __webpack_require__(11)
- , anObject = __webpack_require__(10);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(17)
+ , $export = __webpack_require__(3)
+ , isObject = __webpack_require__(16)
+ , anObject = __webpack_require__(20);
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
- if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
- if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get});
/***/ },
-/* 216 */
+/* 156 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
- var gOPD = __webpack_require__(49)
- , $export = __webpack_require__(6)
- , anObject = __webpack_require__(10);
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
- return gOPD.f(anObject(target), propertyKey);
+ return $.getDesc(anObject(target), propertyKey);
}
});
/***/ },
-/* 217 */
+/* 157 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
- var $export = __webpack_require__(6)
- , getProto = __webpack_require__(57)
- , anObject = __webpack_require__(10);
+ var $export = __webpack_require__(3)
+ , getProto = __webpack_require__(2).getProto
+ , anObject = __webpack_require__(20);
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
@@ -5078,11 +4063,11 @@
});
/***/ },
-/* 218 */
+/* 158 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
@@ -5091,12 +4076,12 @@
});
/***/ },
-/* 219 */
+/* 159 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20)
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
@@ -5107,36 +4092,35 @@
});
/***/ },
-/* 220 */
+/* 160 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)});
+ $export($export.S, 'Reflect', {ownKeys: __webpack_require__(161)});
/***/ },
-/* 221 */
+/* 161 */
/***/ function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
- var gOPN = __webpack_require__(48)
- , gOPS = __webpack_require__(41)
- , anObject = __webpack_require__(10)
- , Reflect = __webpack_require__(2).Reflect;
+ var $ = __webpack_require__(2)
+ , anObject = __webpack_require__(20)
+ , Reflect = __webpack_require__(4).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
- var keys = gOPN.f(anObject(it))
- , getSymbols = gOPS.f;
+ var keys = $.getNames(anObject(it))
+ , getSymbols = $.getSymbols;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ },
-/* 222 */
+/* 162 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
- var $export = __webpack_require__(6)
- , anObject = __webpack_require__(10)
+ var $export = __webpack_require__(3)
+ , anObject = __webpack_require__(20)
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
@@ -5152,34 +4136,32 @@
});
/***/ },
-/* 223 */
+/* 163 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
- var dP = __webpack_require__(9)
- , gOPD = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(57)
- , has = __webpack_require__(3)
- , $export = __webpack_require__(6)
- , createDesc = __webpack_require__(15)
- , anObject = __webpack_require__(10)
- , isObject = __webpack_require__(11);
+ var $ = __webpack_require__(2)
+ , has = __webpack_require__(17)
+ , $export = __webpack_require__(3)
+ , createDesc = __webpack_require__(7)
+ , anObject = __webpack_require__(20)
+ , isObject = __webpack_require__(16);
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
- , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
- if(isObject(proto = getPrototypeOf(target))){
+ if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ $.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
@@ -5188,12 +4170,12 @@
$export($export.S, 'Reflect', {set: set});
/***/ },
-/* 224 */
+/* 164 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
- var $export = __webpack_require__(6)
- , setProto = __webpack_require__(71);
+ var $export = __webpack_require__(3)
+ , setProto = __webpack_require__(45);
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
@@ -5208,1073 +4190,30 @@
});
/***/ },
-/* 225 */
-/***/ function(module, exports, __webpack_require__) {
-
- // 20.3.3.1 / 15.9.4.4 Date.now()
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
-
-/***/ },
-/* 226 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14);
-
- $export($export.P + $export.F * __webpack_require__(5)(function(){
- return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
- }), 'Date', {
- toJSON: function toJSON(key){
- var O = toObject(this)
- , pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
- });
-
-/***/ },
-/* 227 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
- var $export = __webpack_require__(6)
- , fails = __webpack_require__(5)
- , getTime = Date.prototype.getTime;
-
- var lz = function(num){
- return num > 9 ? num : '0' + num;
- };
-
- // PhantomJS / old WebKit has a broken implementations
- $export($export.P + $export.F * (fails(function(){
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
- }) || !fails(function(){
- new Date(NaN).toISOString();
- })), 'Date', {
- toISOString: function toISOString(){
- if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
- var d = this
- , y = d.getUTCFullYear()
- , m = d.getUTCMilliseconds()
- , s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }
- });
-
-/***/ },
-/* 228 */
-/***/ function(module, exports, __webpack_require__) {
-
- var DateProto = Date.prototype
- , INVALID_DATE = 'Invalid Date'
- , TO_STRING = 'toString'
- , $toString = DateProto[TO_STRING]
- , getTime = DateProto.getTime;
- if(new Date(NaN) + '' != INVALID_DATE){
- __webpack_require__(16)(DateProto, TO_STRING, function toString(){
- var value = getTime.call(this);
- return value === value ? $toString.call(this) : INVALID_DATE;
- });
- }
-
-/***/ },
-/* 229 */
-/***/ function(module, exports, __webpack_require__) {
-
- var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive')
- , proto = Date.prototype;
-
- if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230));
-
-/***/ },
-/* 230 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var anObject = __webpack_require__(10)
- , toPrimitive = __webpack_require__(14)
- , NUMBER = 'number';
-
- module.exports = function(hint){
- if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
- };
-
-/***/ },
-/* 231 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , $typed = __webpack_require__(232)
- , buffer = __webpack_require__(233)
- , anObject = __webpack_require__(10)
- , toIndex = __webpack_require__(37)
- , toLength = __webpack_require__(35)
- , isObject = __webpack_require__(11)
- , ArrayBuffer = __webpack_require__(2).ArrayBuffer
- , speciesConstructor = __webpack_require__(199)
- , $ArrayBuffer = buffer.ArrayBuffer
- , $DataView = buffer.DataView
- , $isView = $typed.ABV && ArrayBuffer.isView
- , $slice = $ArrayBuffer.prototype.slice
- , VIEW = $typed.VIEW
- , ARRAY_BUFFER = 'ArrayBuffer';
-
- $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
-
- $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it){
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
- });
-
- $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
- }), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end){
- if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength
- , first = toIndex(start, len)
- , final = toIndex(end === undefined ? len : end, len)
- , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
- , viewS = new $DataView(this)
- , viewT = new $DataView(result)
- , index = 0;
- while(first < final){
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
- });
-
- __webpack_require__(186)(ARRAY_BUFFER);
-
-/***/ },
-/* 232 */
-/***/ function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , uid = __webpack_require__(17)
- , TYPED = uid('typed_array')
- , VIEW = uid('view')
- , ABV = !!(global.ArrayBuffer && global.DataView)
- , CONSTR = ABV
- , i = 0, l = 9, Typed;
-
- var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
- ).split(',');
-
- while(i < l){
- if(Typed = global[TypedArrayConstructors[i++]]){
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
- }
-
- module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
- };
-
-/***/ },
-/* 233 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var global = __webpack_require__(2)
- , DESCRIPTORS = __webpack_require__(4)
- , LIBRARY = __webpack_require__(26)
- , $typed = __webpack_require__(232)
- , hide = __webpack_require__(8)
- , redefineAll = __webpack_require__(202)
- , fails = __webpack_require__(5)
- , anInstance = __webpack_require__(197)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , gOPN = __webpack_require__(48).f
- , dP = __webpack_require__(9).f
- , arrayFill = __webpack_require__(180)
- , setToStringTag = __webpack_require__(22)
- , ARRAY_BUFFER = 'ArrayBuffer'
- , DATA_VIEW = 'DataView'
- , PROTOTYPE = 'prototype'
- , WRONG_LENGTH = 'Wrong length!'
- , WRONG_INDEX = 'Wrong index!'
- , $ArrayBuffer = global[ARRAY_BUFFER]
- , $DataView = global[DATA_VIEW]
- , Math = global.Math
- , RangeError = global.RangeError
- , Infinity = global.Infinity
- , BaseBuffer = $ArrayBuffer
- , abs = Math.abs
- , pow = Math.pow
- , floor = Math.floor
- , log = Math.log
- , LN2 = Math.LN2
- , BUFFER = 'buffer'
- , BYTE_LENGTH = 'byteLength'
- , BYTE_OFFSET = 'byteOffset'
- , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
- , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
- , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
- // IEEE754 conversions based on https://github.com/feross/ieee754
- var packIEEE754 = function(value, mLen, nBytes){
- var buffer = Array(nBytes)
- , eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
- , i = 0
- , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
- , e, m, c;
- value = abs(value)
- if(value != value || value === Infinity){
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if(value * (c = pow(2, -e)) < 1){
- e--;
- c *= 2;
- }
- if(e + eBias >= 1){
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if(value * c >= 2){
- e++;
- c /= 2;
- }
- if(e + eBias >= eMax){
- m = 0;
- e = eMax;
- } else if(e + eBias >= 1){
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
- };
- var unpackIEEE754 = function(buffer, mLen, nBytes){
- var eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , nBits = eLen - 7
- , i = nBytes - 1
- , s = buffer[i--]
- , e = s & 127
- , m;
- s >>= 7;
- for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if(e === 0){
- e = 1 - eBias;
- } else if(e === eMax){
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
- };
-
- var unpackI32 = function(bytes){
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
- };
- var packI8 = function(it){
- return [it & 0xff];
- };
- var packI16 = function(it){
- return [it & 0xff, it >> 8 & 0xff];
- };
- var packI32 = function(it){
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
- };
- var packF64 = function(it){
- return packIEEE754(it, 52, 8);
- };
- var packF32 = function(it){
- return packIEEE754(it, 23, 4);
- };
-
- var addGetter = function(C, key, internal){
- dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
- };
-
- var get = function(view, bytes, index, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
- };
- var set = function(view, bytes, index, conversion, value, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = conversion(+value);
- for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
- };
-
- var validateArrayBufferArguments = function(that, length){
- anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
- var numberLength = +length
- , byteLength = toLength(numberLength);
- if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
- return byteLength;
- };
-
- if(!$typed.ABV){
- $ArrayBuffer = function ArrayBuffer(length){
- var byteLength = validateArrayBufferArguments(this, length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength){
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH]
- , offset = toInteger(byteOffset);
- if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if(DESCRIPTORS){
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset){
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset){
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
- } else {
- if(!fails(function(){
- new $ArrayBuffer; // eslint-disable-line no-new
- }) || !fails(function(){
- new $ArrayBuffer(.5); // eslint-disable-line no-new
- })){
- $ArrayBuffer = function ArrayBuffer(length){
- return new BaseBuffer(validateArrayBufferArguments(this, length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
- if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
- };
- if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2))
- , $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
- }
- setToStringTag($ArrayBuffer, ARRAY_BUFFER);
- setToStringTag($DataView, DATA_VIEW);
- hide($DataView[PROTOTYPE], $typed.VIEW, true);
- exports[ARRAY_BUFFER] = $ArrayBuffer;
- exports[DATA_VIEW] = $DataView;
-
-/***/ },
-/* 234 */
-/***/ function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(6);
- $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, {
- DataView: __webpack_require__(233).DataView
- });
-
-/***/ },
-/* 235 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int8', 1, function(init){
- return function Int8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 236 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- if(__webpack_require__(4)){
- var LIBRARY = __webpack_require__(26)
- , global = __webpack_require__(2)
- , fails = __webpack_require__(5)
- , $export = __webpack_require__(6)
- , $typed = __webpack_require__(232)
- , $buffer = __webpack_require__(233)
- , ctx = __webpack_require__(18)
- , anInstance = __webpack_require__(197)
- , propertyDesc = __webpack_require__(15)
- , hide = __webpack_require__(8)
- , redefineAll = __webpack_require__(202)
- , toInteger = __webpack_require__(36)
- , toLength = __webpack_require__(35)
- , toIndex = __webpack_require__(37)
- , toPrimitive = __webpack_require__(14)
- , has = __webpack_require__(3)
- , same = __webpack_require__(69)
- , classof = __webpack_require__(73)
- , isObject = __webpack_require__(11)
- , toObject = __webpack_require__(56)
- , isArrayIter = __webpack_require__(154)
- , create = __webpack_require__(44)
- , getPrototypeOf = __webpack_require__(57)
- , gOPN = __webpack_require__(48).f
- , getIterFn = __webpack_require__(156)
- , uid = __webpack_require__(17)
- , wks = __webpack_require__(23)
- , createArrayMethod = __webpack_require__(164)
- , createArrayIncludes = __webpack_require__(34)
- , speciesConstructor = __webpack_require__(199)
- , ArrayIterators = __webpack_require__(183)
- , Iterators = __webpack_require__(135)
- , $iterDetect = __webpack_require__(157)
- , setSpecies = __webpack_require__(186)
- , arrayFill = __webpack_require__(180)
- , arrayCopyWithin = __webpack_require__(177)
- , $DP = __webpack_require__(9)
- , $GOPD = __webpack_require__(49)
- , dP = $DP.f
- , gOPD = $GOPD.f
- , RangeError = global.RangeError
- , TypeError = global.TypeError
- , Uint8Array = global.Uint8Array
- , ARRAY_BUFFER = 'ArrayBuffer'
- , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
- , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
- , PROTOTYPE = 'prototype'
- , ArrayProto = Array[PROTOTYPE]
- , $ArrayBuffer = $buffer.ArrayBuffer
- , $DataView = $buffer.DataView
- , arrayForEach = createArrayMethod(0)
- , arrayFilter = createArrayMethod(2)
- , arraySome = createArrayMethod(3)
- , arrayEvery = createArrayMethod(4)
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , arrayIncludes = createArrayIncludes(true)
- , arrayIndexOf = createArrayIncludes(false)
- , arrayValues = ArrayIterators.values
- , arrayKeys = ArrayIterators.keys
- , arrayEntries = ArrayIterators.entries
- , arrayLastIndexOf = ArrayProto.lastIndexOf
- , arrayReduce = ArrayProto.reduce
- , arrayReduceRight = ArrayProto.reduceRight
- , arrayJoin = ArrayProto.join
- , arraySort = ArrayProto.sort
- , arraySlice = ArrayProto.slice
- , arrayToString = ArrayProto.toString
- , arrayToLocaleString = ArrayProto.toLocaleString
- , ITERATOR = wks('iterator')
- , TAG = wks('toStringTag')
- , TYPED_CONSTRUCTOR = uid('typed_constructor')
- , DEF_CONSTRUCTOR = uid('def_constructor')
- , ALL_CONSTRUCTORS = $typed.CONSTR
- , TYPED_ARRAY = $typed.TYPED
- , VIEW = $typed.VIEW
- , WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function(O, length){
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function(){
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
- new Uint8Array(1).set({});
- });
-
- var strictToLength = function(it, SAME){
- if(it === undefined)throw TypeError(WRONG_LENGTH);
- var number = +it
- , length = toLength(it);
- if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
- return length;
- };
-
- var toOffset = function(it, BYTES){
- var offset = toInteger(it);
- if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function(it){
- if(isObject(it) && TYPED_ARRAY in it)return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function(C, length){
- if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function(O, list){
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function(C, list){
- var index = 0
- , length = list.length
- , result = allocate(C, length);
- while(length > index)result[index] = list[index++];
- return result;
- };
-
- var addGetter = function(it, key, internal){
- dP(it, key, {get: function(){ return this._d[internal]; }});
- };
-
- var $from = function from(source /*, mapfn, thisArg */){
- var O = toObject(source)
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , iterFn = getIterFn(O)
- , i, length, values, result, step, iterator;
- if(iterFn != undefined && !isArrayIter(iterFn)){
- for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
- values.push(step.value);
- } O = values;
- }
- if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
- for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/*...items*/){
- var index = 0
- , length = arguments.length
- , result = allocate(this, length);
- while(length > index)result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString(){
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /*, end */){
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /*, thisArg */){
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /*, thisArg */){
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /*, thisArg */){
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /*, thisArg */){
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /*, thisArg */){
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /*, fromIndex */){
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /*, fromIndex */){
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator){ // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /*, thisArg */){
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse(){
- var that = this
- , length = validate(that).length
- , middle = Math.floor(length / 2)
- , index = 0
- , value;
- while(index < middle){
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /*, thisArg */){
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn){
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end){
- var O = validate(this)
- , length = O.length
- , $begin = toIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end){
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /*, offset */){
- validate(this);
- var offset = toOffset(arguments[1], 1)
- , length = this.length
- , src = toObject(arrayLike)
- , len = toLength(src.length)
- , index = 0;
- if(len + offset > length)throw RangeError(WRONG_LENGTH);
- while(index < len)this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries(){
- return arrayEntries.call(validate(this));
- },
- keys: function keys(){
- return arrayKeys.call(validate(this));
- },
- values: function values(){
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function(target, key){
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key){
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc){
- if(isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ){
- target[key] = desc.value;
- return target;
- } else return dP(target, key, desc);
- };
-
- if(!ALL_CONSTRUCTORS){
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if(fails(function(){ arrayToString.call({}); })){
- arrayToString = arrayToLocaleString = function toString(){
- return arrayJoin.call(this);
- }
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function(){ /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function(){ return this[TYPED_ARRAY]; }
- });
-
- module.exports = function(KEY, BYTES, wrapper, CLAMPED){
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
- , ISNT_UINT8 = NAME != 'Uint8Array'
- , GETTER = 'get' + KEY
- , SETTER = 'set' + KEY
- , TypedArray = global[NAME]
- , Base = TypedArray || {}
- , TAC = TypedArray && getPrototypeOf(TypedArray)
- , FORCED = !TypedArray || !$typed.ABV
- , O = {}
- , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function(that, index){
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function(that, index, value){
- var data = that._d;
- if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function(that, index){
- dP(that, index, {
- get: function(){
- return getter(this, index);
- },
- set: function(value){
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if(FORCED){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0
- , offset = 0
- , buffer, byteLength, length, klass;
- if(!isObject(data)){
- length = strictToLength(data, true)
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if($length === undefined){
- if($len % BYTES)throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if(byteLength < 0)throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if(TYPED_ARRAY in data){
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while(index < length)addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if(!$iterDetect(function(iter){
- // V8 works with iterators, but fails in many other cases
- // https://code.google.com/p/v8/issues/detail?id=4552
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
- if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if(TYPED_ARRAY in data)return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
- if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR]
- , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
- , $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
- dP(TypedArrayPrototype, TAG, {
- get: function(){ return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES,
- from: $from,
- of: $of
- });
-
- if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
-
- $export($export.P + $export.F * fails(function(){
- new TypedArray(1).slice();
- }), NAME, {slice: $slice});
-
- $export($export.P + $export.F * (fails(function(){
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
- }) || !fails(function(){
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, {toLocaleString: $toLocaleString});
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
- } else module.exports = function(){ /* empty */ };
-
-/***/ },
-/* 237 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint8', 1, function(init){
- return function Uint8Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 238 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint8', 1, function(init){
- return function Uint8ClampedArray(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- }, true);
-
-/***/ },
-/* 239 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int16', 2, function(init){
- return function Int16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 240 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint16', 2, function(init){
- return function Uint16Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 241 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Int32', 4, function(init){
- return function Int32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 242 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Uint32', 4, function(init){
- return function Uint32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 243 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Float32', 4, function(init){
- return function Float32Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 244 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(236)('Float64', 8, function(init){
- return function Float64Array(data, byteOffset, length){
- return init(this, data, byteOffset, length);
- };
- });
-
-/***/ },
-/* 245 */
+/* 165 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/Array.prototype.includes
- var $export = __webpack_require__(6)
- , $includes = __webpack_require__(34)(true);
+ var $export = __webpack_require__(3)
+ , $includes = __webpack_require__(33)(true);
$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
- __webpack_require__(178)('includes');
+ __webpack_require__(118)('includes');
/***/ },
-/* 246 */
+/* 166 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
- var $export = __webpack_require__(6)
- , $at = __webpack_require__(125)(true);
+ var $export = __webpack_require__(3)
+ , $at = __webpack_require__(98)(true);
$export($export.P, 'String', {
at: function at(pos){
@@ -6283,159 +4222,138 @@
});
/***/ },
-/* 247 */
+/* 167 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(248);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(168);
$export($export.P, 'String', {
- padStart: function padStart(maxLength /*, fillString = ' ' */){
+ padLeft: function padLeft(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ },
-/* 248 */
+/* 168 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-string-pad-start-end
- var toLength = __webpack_require__(35)
- , repeat = __webpack_require__(85)
- , defined = __webpack_require__(33);
+ // https://github.com/ljharb/proposal-string-pad-left-right
+ var toLength = __webpack_require__(27)
+ , repeat = __webpack_require__(105)
+ , defined = __webpack_require__(22);
module.exports = function(that, maxLength, fillString, left){
var S = String(defined(that))
, stringLength = S.length
, fillStr = fillString === undefined ? ' ' : String(fillString)
, intMaxLength = toLength(maxLength);
- if(intMaxLength <= stringLength || fillStr == '')return S;
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
var fillLen = intMaxLength - stringLength
, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
-
/***/ },
-/* 249 */
+/* 169 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- // https://github.com/tc39/proposal-string-pad-start-end
- var $export = __webpack_require__(6)
- , $pad = __webpack_require__(248);
+ var $export = __webpack_require__(3)
+ , $pad = __webpack_require__(168);
$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ padRight: function padRight(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ },
-/* 250 */
+/* 170 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(81)('trimLeft', function($trim){
+ __webpack_require__(63)('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
- }, 'trimStart');
+ });
/***/ },
-/* 251 */
+/* 171 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
- __webpack_require__(81)('trimRight', function($trim){
+ __webpack_require__(63)('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
- }, 'trimEnd');
+ });
/***/ },
-/* 252 */
+/* 172 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
- // https://tc39.github.io/String.prototype.matchAll/
- var $export = __webpack_require__(6)
- , defined = __webpack_require__(33)
- , toLength = __webpack_require__(35)
- , isRegExp = __webpack_require__(128)
- , getFlags = __webpack_require__(188)
- , RegExpProto = RegExp.prototype;
-
- var $RegExpStringIterator = function(regexp, string){
- this._r = regexp;
- this._s = string;
- };
+ // https://github.com/benjamingr/RexExp.escape
+ var $export = __webpack_require__(3)
+ , $re = __webpack_require__(173)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
- __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){
- var match = this._r.exec(this._s);
- return {value: match, done: match === null};
- });
+ $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
- $export($export.P, 'String', {
- matchAll: function matchAll(regexp){
- defined(this);
- if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
- var S = String(this)
- , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
- , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
- });
/***/ },
-/* 253 */
-/***/ function(module, exports, __webpack_require__) {
-
- __webpack_require__(25)('asyncIterator');
-
-/***/ },
-/* 254 */
-/***/ function(module, exports, __webpack_require__) {
+/* 173 */
+/***/ function(module, exports) {
- __webpack_require__(25)('observable');
+ module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+ };
/***/ },
-/* 255 */
+/* 174 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-getownpropertydescriptors
- var $export = __webpack_require__(6)
- , ownKeys = __webpack_require__(221)
- , toIObject = __webpack_require__(30)
- , gOPD = __webpack_require__(49)
- , createProperty = __webpack_require__(155);
+ // https://gist.github.com/WebReflection/9353781
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , ownKeys = __webpack_require__(161)
+ , toIObject = __webpack_require__(23)
+ , createDesc = __webpack_require__(7);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
- , getDesc = gOPD.f
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
- while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
- return result;
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
}
});
/***/ },
-/* 256 */
+/* 175 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $values = __webpack_require__(257)(false);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $values = __webpack_require__(176)(false);
$export($export.S, 'Object', {
values: function values(it){
@@ -6444,16 +4362,16 @@
});
/***/ },
-/* 257 */
+/* 176 */
/***/ function(module, exports, __webpack_require__) {
- var getKeys = __webpack_require__(28)
- , toIObject = __webpack_require__(30)
- , isEnum = __webpack_require__(42).f;
+ var $ = __webpack_require__(2)
+ , toIObject = __webpack_require__(23)
+ , isEnum = $.isEnum;
module.exports = function(isEntries){
return function(it){
var O = toIObject(it)
- , keys = getKeys(O)
+ , keys = $.getKeys(O)
, length = keys.length
, i = 0
, result = []
@@ -6465,12 +4383,12 @@
};
/***/ },
-/* 258 */
+/* 177 */
/***/ function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-values-entries
- var $export = __webpack_require__(6)
- , $entries = __webpack_require__(257)(true);
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(3)
+ , $entries = __webpack_require__(176)(true);
$export($export.S, 'Object', {
entries: function entries(it){
@@ -6479,724 +4397,76 @@
});
/***/ },
-/* 259 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(19)
- , $defineProperty = __webpack_require__(9);
-
- // B.2.2.2 Object.prototype.__defineGetter__(P, getter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter){
- $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 260 */
-/***/ function(module, exports, __webpack_require__) {
-
- // Forced replacement prototype accessors methods
- module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){
- var K = Math.random();
- // In FF throws only define methods
- __defineSetter__.call(null, K, function(){ /* empty */});
- delete __webpack_require__(2)[K];
- });
-
-/***/ },
-/* 261 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , aFunction = __webpack_require__(19)
- , $defineProperty = __webpack_require__(9);
-
- // B.2.2.3 Object.prototype.__defineSetter__(P, setter)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter){
- $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
- }
- });
-
-/***/ },
-/* 262 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.4 Object.prototype.__lookupGetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __lookupGetter__: function __lookupGetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.get;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 263 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- var $export = __webpack_require__(6)
- , toObject = __webpack_require__(56)
- , toPrimitive = __webpack_require__(14)
- , getPrototypeOf = __webpack_require__(57)
- , getOwnPropertyDescriptor = __webpack_require__(49).f;
-
- // B.2.2.5 Object.prototype.__lookupSetter__(P)
- __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', {
- __lookupSetter__: function __lookupSetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.set;
- } while(O = getPrototypeOf(O));
- }
- });
-
-/***/ },
-/* 264 */
+/* 178 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
+ var $export = __webpack_require__(3);
- $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')});
+ $export($export.P, 'Map', {toJSON: __webpack_require__(179)('Map')});
/***/ },
-/* 265 */
+/* 179 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var classof = __webpack_require__(73)
- , from = __webpack_require__(266);
+ var forOf = __webpack_require__(138)
+ , classof = __webpack_require__(47);
module.exports = function(NAME){
return function toJSON(){
if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
+ var arr = [];
+ forOf(this, false, arr.push, arr);
+ return arr;
};
};
/***/ },
-/* 266 */
-/***/ function(module, exports, __webpack_require__) {
-
- var forOf = __webpack_require__(198);
-
- module.exports = function(iter, ITERATOR){
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
- };
-
-
-/***/ },
-/* 267 */
+/* 180 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
- var $export = __webpack_require__(6);
-
- $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')});
-
-/***/ },
-/* 268 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-global
- var $export = __webpack_require__(6);
-
- $export($export.S, 'System', {global: __webpack_require__(2)});
-
-/***/ },
-/* 269 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/ljharb/proposal-is-error
- var $export = __webpack_require__(6)
- , cof = __webpack_require__(32);
-
- $export($export.S, 'Error', {
- isError: function isError(it){
- return cof(it) === 'Error';
- }
- });
-
-/***/ },
-/* 270 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 271 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
- });
-
-/***/ },
-/* 272 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- imulh: function imulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >> 16
- , v1 = $v >> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
- });
-
-/***/ },
-/* 273 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
- var $export = __webpack_require__(6);
-
- $export($export.S, 'Math', {
- umulh: function umulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >>> 16
- , v1 = $v >>> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
- });
-
-/***/ },
-/* 274 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
- }});
-
-/***/ },
-/* 275 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Map = __webpack_require__(203)
- , $export = __webpack_require__(6)
- , shared = __webpack_require__(21)('metadata')
- , store = shared.store || (shared.store = new (__webpack_require__(207)));
-
- var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
- };
- var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
- };
- var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
- };
- var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
- };
- var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
- };
- var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
- };
- var exp = function(O){
- $export($export.S, 'Reflect', O);
- };
-
- module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
- };
-
-/***/ },
-/* 276 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , toMetaKey = metadata.key
- , getOrCreateMetadataMap = metadata.map
- , store = metadata.store;
-
- metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
- , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
- if(metadataMap.size)return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
- }});
-
-/***/ },
-/* 277 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- var ordinaryGetMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
- };
-
- metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 278 */
-/***/ function(module, exports, __webpack_require__) {
-
- var Set = __webpack_require__(206)
- , from = __webpack_require__(266)
- , metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- var ordinaryMetadataKeys = function(O, P){
- var oKeys = ordinaryOwnMetadataKeys(O, P)
- , parent = getPrototypeOf(O);
- if(parent === null)return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
- };
-
- metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 279 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 280 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
- metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
- }});
-
-/***/ },
-/* 281 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , getPrototypeOf = __webpack_require__(57)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
- var ordinaryHasMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
- };
-
- metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
-
-/***/ },
-/* 282 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
+ var $export = __webpack_require__(3);
- metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
- }});
+ $export($export.P, 'Set', {toJSON: __webpack_require__(179)('Set')});
/***/ },
-/* 283 */
-/***/ function(module, exports, __webpack_require__) {
-
- var metadata = __webpack_require__(275)
- , anObject = __webpack_require__(10)
- , aFunction = __webpack_require__(19)
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
- metadata.exp({metadata: function metadata(metadataKey, metadataValue){
- return function decorator(target, targetKey){
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
- }});
-
-/***/ },
-/* 284 */
-/***/ function(module, exports, __webpack_require__) {
-
- // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
- var $export = __webpack_require__(6)
- , microtask = __webpack_require__(201)()
- , process = __webpack_require__(2).process
- , isNode = __webpack_require__(32)(process) == 'process';
-
- $export($export.G, {
- asap: function asap(fn){
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
- });
-
-/***/ },
-/* 285 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- // https://github.com/zenparsing/es-observable
- var $export = __webpack_require__(6)
- , global = __webpack_require__(2)
- , core = __webpack_require__(7)
- , microtask = __webpack_require__(201)()
- , OBSERVABLE = __webpack_require__(23)('observable')
- , aFunction = __webpack_require__(19)
- , anObject = __webpack_require__(10)
- , anInstance = __webpack_require__(197)
- , redefineAll = __webpack_require__(202)
- , hide = __webpack_require__(8)
- , forOf = __webpack_require__(198)
- , RETURN = forOf.RETURN;
-
- var getMethod = function(fn){
- return fn == null ? undefined : aFunction(fn);
- };
-
- var cleanupSubscription = function(subscription){
- var cleanup = subscription._c;
- if(cleanup){
- subscription._c = undefined;
- cleanup();
- }
- };
-
- var subscriptionClosed = function(subscription){
- return subscription._o === undefined;
- };
-
- var closeSubscription = function(subscription){
- if(!subscriptionClosed(subscription)){
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
- };
-
- var Subscription = function(observer, subscriber){
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer)
- , subscription = cleanup;
- if(cleanup != null){
- if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch(e){
- observer.error(e);
- return;
- } if(subscriptionClosed(this))cleanupSubscription(this);
- };
-
- Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe(){ closeSubscription(this); }
- });
-
- var SubscriptionObserver = function(subscription){
- this._s = subscription;
- };
-
- SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if(m)return m.call(observer, value);
- } catch(e){
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value){
- var subscription = this._s;
- if(subscriptionClosed(subscription))throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if(!m)throw value;
- value = m.call(observer, value);
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
- });
-
- var $Observable = function Observable(subscriber){
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
- };
-
- redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer){
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn){
- var that = this;
- return new (core.Promise || global.Promise)(function(resolve, reject){
- aFunction(fn);
- var subscription = that.subscribe({
- next : function(value){
- try {
- return fn(value);
- } catch(e){
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
- });
-
- redefineAll($Observable, {
- from: function from(x){
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if(method){
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function(observer){
- return observable.subscribe(observer);
- });
- }
- return new C(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- try {
- if(forOf(x, false, function(it){
- observer.next(it);
- if(done)return RETURN;
- }) === RETURN)return;
- } catch(e){
- if(done)throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- },
- of: function of(){
- for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- for(var i = 0; i < items.length; ++i){
- observer.next(items[i]);
- if(done)return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- }
- });
-
- hide($Observable.prototype, OBSERVABLE, function(){ return this; });
-
- $export($export.G, {Observable: $Observable});
-
- __webpack_require__(186)('Observable');
-
-/***/ },
-/* 286 */
+/* 181 */
/***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(6)
- , $task = __webpack_require__(200);
+ var $export = __webpack_require__(3)
+ , $task = __webpack_require__(141);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ },
-/* 287 */
+/* 182 */
/***/ function(module, exports, __webpack_require__) {
- var $iterators = __webpack_require__(183)
- , redefine = __webpack_require__(16)
- , global = __webpack_require__(2)
- , hide = __webpack_require__(8)
- , Iterators = __webpack_require__(135)
- , wks = __webpack_require__(23)
- , ITERATOR = wks('iterator')
- , TO_STRING_TAG = wks('toStringTag')
- , ArrayValues = Iterators.Array;
-
- for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype
- , key;
- if(proto){
- if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
- if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
- }
- }
+ __webpack_require__(117);
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(6)
+ , Iterators = __webpack_require__(109)
+ , ITERATOR = __webpack_require__(31)('iterator')
+ , NL = global.NodeList
+ , HTC = global.HTMLCollection
+ , NLProto = NL && NL.prototype
+ , HTCProto = HTC && HTC.prototype
+ , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
+ if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
+ if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);
/***/ },
-/* 288 */
+/* 183 */
/***/ function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
- var global = __webpack_require__(2)
- , $export = __webpack_require__(6)
- , invoke = __webpack_require__(76)
- , partial = __webpack_require__(289)
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(3)
+ , invoke = __webpack_require__(19)
+ , partial = __webpack_require__(184)
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
@@ -7214,13 +4484,13 @@
});
/***/ },
-/* 289 */
+/* 184 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var path = __webpack_require__(290)
- , invoke = __webpack_require__(76)
- , aFunction = __webpack_require__(19);
+ var path = __webpack_require__(185)
+ , invoke = __webpack_require__(19)
+ , aFunction = __webpack_require__(13);
module.exports = function(/* ...pargs */){
var fn = aFunction(this)
, length = arguments.length
@@ -7230,22 +4500,45 @@
, holder = false;
while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
return function(/* ...args */){
- var that = this
- , aLen = arguments.length
+ var that = this
+ , $$ = arguments
+ , $$len = $$.length
, j = 0, k = 0, args;
- if(!holder && !aLen)return invoke(fn, pargs, that);
+ if(!holder && !$$len)return invoke(fn, pargs, that);
args = pargs.slice();
- if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
- while(aLen > k)args.push(arguments[k++]);
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];
+ while($$len > k)args.push($$[k++]);
return invoke(fn, args, that);
};
};
/***/ },
-/* 290 */
+/* 185 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(2);
+ module.exports = __webpack_require__(4);
+
+/***/ },
+/* 186 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // JavaScript 1.6 / Strawman array statics shim
+ var $ = __webpack_require__(2)
+ , $export = __webpack_require__(3)
+ , $ctx = __webpack_require__(12)
+ , $Array = __webpack_require__(5).Array || Array
+ , statics = {};
+ var setStatics = function(keys, length){
+ $.each.call(keys.split(','), function(key){
+ if(length == undefined && key in $Array)statics[key] = $Array[key];
+ else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
+ });
+ };
+ setStatics('pop,reverse,shift,keys,values,entries', 1);
+ setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
+ setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
+ 'reduce,reduceRight,copyWithin,fill');
+ $export($export.S, 'Array', statics);
/***/ }
/******/ ]);
diff --git a/node_modules/core-js/client/shim.min.js b/node_modules/core-js/client/shim.min.js
index e532c6830..bdfd66322 100644
--- a/node_modules/core-js/client/shim.min.js
+++ b/node_modules/core-js/client/shim.min.js
@@ -1,10 +1,9 @@
/**
- * core-js 2.4.1
+ * core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
*/
-!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),a.exports=c(288)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e<b;e++)d[e]="a["+e+"]";h[b]=Function("F,a","return new F("+d.join(",")+")")}return h[b](a,c)};a.exports=Function.bind||function bind(a){var b=d(this),c=g.call(arguments,1),h=function(){var d=c.concat(g.call(arguments));return this instanceof h?i(b,d.length,d):f(b,d,a)};return e(b.prototype)&&(h.prototype=b.prototype),h}},function(a,b){a.exports=function(a,b,d){var e=d===c;switch(b.length){case 0:return e?a():a.call(d);case 1:return e?a(b[0]):a.call(d,b[0]);case 2:return e?a(b[0],b[1]):a.call(d,b[0],b[1]);case 3:return e?a(b[0],b[1],b[2]):a.call(d,b[0],b[1],b[2]);case 4:return e?a(b[0],b[1],b[2],b[3]):a.call(d,b[0],b[1],b[2],b[3])}return a.apply(d,b)}},function(a,b,c){var d=c(9).f,e=c(15),f=c(3),g=Function.prototype,h=/^\s*function ([^ (]*)/,i="name",j=Object.isExtensible||function(){return!0};i in g||c(4)&&d(g,i,{configurable:!0,get:function(){try{var a=this,b=(""+a).match(h)[1];return f(a,i)||!j(a)||d(a,i,e(5,b)),b}catch(c){return""}}})},function(a,b,c){var d=c(11),e=c(57),f=c(23)("hasInstance"),g=Function.prototype;f in g||c(9).f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},function(a,b,c){var d=c(2),e=c(3),f=c(32),g=c(80),h=c(14),i=c(5),j=c(48).f,k=c(49).f,l=c(9).f,m=c(81).trim,n="Number",o=d[n],p=o,q=o.prototype,r=f(c(44)(q))==n,s="trim"in String.prototype,t=function(a){var b=h(a,!1);if("string"==typeof b&&b.length>2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;j<k;j++)if(g=i.charCodeAt(j),g<48||g>e)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<<d),m(1,1),n(2),s=o()}else m(0,c),m(1<<-b,0),s=o()+g.call(l,j);return j>0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return d<j?f*k(d/j/h)*j*h:(b=(1+h/g)*d,c=b-(b-d),c>i||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g<h;)c=e(arguments[g++]),i<c?(d=i/c,f=f*d*d+1,i=c):c>0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h<d&&g.push(String(arguments[h]));return g.join("")}})},function(a,b,c){c(81)("trim",function(a){return function trim(){return a(this,3)}})},function(a,b,c){var d=c(6),e=c(125)(!1);d(d.P,"String",{codePointAt:function codePointAt(a){return e(this,a)}})},function(a,b,d){var e=d(36),f=d(33);a.exports=function(a){return function(b,d){var g,h,i=String(f(b)),j=e(d),k=i.length;return j<0||j>=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,"&quot;")+'"'),h+">"+e+"</"+b+">"};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1;
-try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;n<l;n++)m[n]="String"==e?this.charAt(f+n):this[f+n];return m}})},function(a,b,d){var e=d(6),f=d(19),g=d(56),h=d(5),i=[].sort,j=[1,2,3];e(e.P+e.F*(h(function(){j.sort(c)})||!h(function(){j.sort(null)})||!d(160)(i)),"Array",{sort:function sort(a){return a===c?i.call(g(this)):i.call(g(this),f(a))}})},function(a,b,c){var d=c(6),e=c(164)(0),f=c(160)([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function forEach(a){return e(this,a,arguments[1])}})},function(a,b,d){var e=d(18),f=d(31),g=d(56),h=d(35),i=d(165);a.exports=function(a,b){var d=1==a,j=2==a,k=3==a,l=4==a,m=6==a,n=5==a||m,o=b||i;return function(b,i,p){for(var q,r,s=g(b),t=f(s),u=e(i,p,3),v=h(t.length),w=0,x=d?o(b,v):j?o(b,0):c;v>w;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j<i&&i<j+l&&(m=-1,j+=l-1,i+=l-1);l-- >0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o<arguments[j]-2;o++)arguments[o]===c&&(i[o]=c)}),i[j]>1&&i.index<d[j]&&h.apply(p,i.slice(1)),n=i[0][j],r=m,p[j]>=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e<f;)l.setUint8(p++,k.getUint8(e++));return g}}),d(186)(s)},function(a,b,c){for(var d,e=c(2),f=c(8),g=c(17),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<m;)(d=e[n[l++]])?(f(d.prototype,h,!0),f(d.prototype,i,!0)):k=!1;a.exports={ABV:j,CONSTR:k,TYPED:h,VIEW:i}},function(a,b,d){var e=d(2),f=d(4),g=d(26),h=d(232),i=d(8),j=d(202),k=d(5),l=d(197),m=d(36),n=d(35),o=d(48).f,p=d(9).f,q=d(180),r=d(22),s="ArrayBuffer",t="DataView",u="prototype",v="Wrong length!",w="Wrong index!",x=e[s],y=e[t],z=e.Math,A=e.RangeError,B=e.Infinity,C=x,D=z.abs,E=z.pow,F=z.floor,G=z.log,H=z.LN2,I="buffer",J="byteLength",K="byteOffset",L=f?"_b":I,M=f?"_l":J,N=f?"_o":K,O=function(a,b,c){var d,e,f,g=Array(c),h=8*c-b-1,i=(1<<h)-1,j=i>>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<<b|e,h+=b;h>0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<<e)-1,g=f>>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;l<b;l++)i[j+l]=k[f?l:b-l-1]},Z=function(a,b){l(a,x,s);var c=+b,d=n(c);if(c!=d)throw A(v);return d};if(h.ABV){if(!k(function(){new x})||!k(function(){new x(.5)})){x=function ArrayBuffer(a){return new C(Z(this,a))};for(var $,_=x[u]=C[u],aa=o(C),ba=0;aa.length>ba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){
-return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e<d;)a=b[e],b[e++]=b[--c],b[c]=a;return b},some:function some(a){return ca(Ga(this),a,arguments.length>1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f<e;)this[b+f]=d[f++]},Sa={entries:function entries(){return ka.call(Ga(this))},keys:function keys(){return ja.call(Ga(this))},values:function values(){return ia.call(Ga(this))}},Ta=function(a,b){return w(a)&&a[ya]&&"symbol"!=typeof b&&b in a&&String(+b)==String(b)},Ua=function getOwnPropertyDescriptor(a,b){return Ta(a,b=s(b,!0))?m(2,a[b]):R(a,b)},Va=function defineProperty(a,b,c){return!(Ta(a,b=s(b,!0))&&w(c)&&t(c,"value"))||t(c,"get")||t(c,"set")||c.configurable||t(c,"writable")&&!c.writable||t(c,"enumerable")&&!c.enumerable?Q(a,b,c):(a[b]=c.value,a)};xa||(P.f=Ua,O.f=Va),h(h.S+h.F*!xa,"Object",{getOwnPropertyDescriptor:Ua,defineProperty:Va}),g(function(){ra.call({})})&&(ra=sa=function toString(){return oa.call(this)});var Wa=o({},Pa);o(Wa,Sa),n(Wa,ta,Sa.values),o(Wa,{slice:Qa,set:Ra,constructor:function(){},toString:ra,toLocaleString:Oa}),Ka(Wa,"buffer","b"),Ka(Wa,"byteOffset","o"),Ka(Wa,"byteLength","l"),Ka(Wa,"length","e"),Q(Wa,ua,{get:function(){return this[ya]}}),a.exports=function(a,b,d,j){j=!!j;var k=a+(j?"Clamped":"")+"Array",m="Uint8Array"!=k,o="get"+a,p="set"+a,r=f[k],s=r||{},t=r&&A(r),u=!r||!i.ABV,x={},y=r&&r[Y],C=function(a,c){var d=a._d;return d.v[o](c*b+d.o,Ca)},D=function(a,c,d){var e=a._d;j&&(d=(d=Math.round(d))<0?0:d>255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m<i;)E(a,m++)}),y=r[Y]=z(Wa),n(y,"constructor",r)):K(function(a){new r(null),new r(a)},!0)||(r=d(function(a,d,e,f){l(a,r,k);var g;return w(d)?d instanceof $||(g=v(d))==V||g==W?f!==c?new s(d,Fa(e,b),f):e!==c?new s(d,Fa(e,b)):new s(d):ya in d?Ja(r,d):La.call(r,d):new s(Ea(d,m))}),aa(t!==Function.prototype?B(s).concat(B(t)):B(s),function(a){a in r||n(r,a,s[a])}),r[Y]=y,e||(y.constructor=r));var F=y[ta],G=!!F&&("values"==F.name||F.name==c),H=Sa.values;n(r,va,!0),n(y,ya,k),n(y,za,!0),n(y,wa,r),(j?new r(1)[ua]==k:ua in y)||Q(y,ua,{get:function(){return k}}),x[k]=r,h(h.G+h.W+h.F*(r!=s),x),h(h.S,k,{BYTES_PER_ELEMENT:b,from:La,of:Ma}),X in y||n(y,X,b),h(h.P,k,Pa),L(k),h(h.P+h.F*Da,k,{set:Ra}),h(h.P+h.F*!G,k,Sa),h(h.P+h.F*(y.toString!=ra),k,{toString:ra}),h(h.P+h.F*g(function(){new r(1).slice()}),k,{slice:Qa}),h(h.P+h.F*(g(function(){return[1,2].toLocaleString()!=new r([1,2]).toLocaleString()})||!g(function(){y.toLocaleString.call([1,2])})),k,{toLocaleString:Oa}),J[k]=G?F:H,e||G||n(y,ta,H)}}else a.exports=function(){}},function(a,b,c){c(236)("Uint8",1,function(a){return function Uint8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint8",1,function(a){return function Uint8ClampedArray(b,c,d){return a(this,b,c,d)}},!0)},function(a,b,c){c(236)("Int16",2,function(a){return function Int16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint16",2,function(a){return function Uint16Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Int32",4,function(a){return function Int32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Uint32",4,function(a){return function Uint32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Float32",4,function(a){return function Float32Array(b,c,d){return a(this,b,c,d)}})},function(a,b,c){c(236)("Float64",8,function(a){return function Float64Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){var e=d(6),f=d(34)(!0);e(e.P,"Array",{includes:function includes(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);a<b;)c[a]=arguments[a++];return new("function"==typeof this?this:w)(function(a){var b=!1;return h(function(){if(!b){for(var d=0;d<c.length;++d)if(a.next(c[d]),b)return;a.complete()}}),function(){b=!0}})}}),n(w.prototype,i,function(){return this}),e(e.G,{Observable:w}),d(186)("Observable")},function(a,b,c){var d=c(6),e=c(200);d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},function(a,b,c){for(var d=c(183),e=c(16),f=c(2),g=c(8),h=c(135),i=c(23),j=i("iterator"),k=i("toStringTag"),l=h.Array,m=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],n=0;n<5;n++){var o,p=m[n],q=f[p],r=q&&q.prototype;if(r){r[j]||g(r,j,l),r[k]||g(r,k,p),h[p]=l;for(o in d)r[o]||e(r,o,d[o],!0)}}},function(a,b,c){var d=c(2),e=c(6),f=c(76),g=c(289),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},function(a,b,c){var d=c(290),e=c(76),f=c(19);a.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1);
+!function(b,c,a){"use strict";!function(b){function __webpack_require__(c){if(a[c])return a[c].exports;var d=a[c]={exports:{},id:c,loaded:!1};return b[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var a={};return __webpack_require__.m=b,__webpack_require__.c=a,__webpack_require__.p="",__webpack_require__(0)}([function(b,c,a){a(1),a(34),a(40),a(42),a(44),a(46),a(48),a(50),a(51),a(52),a(53),a(54),a(55),a(56),a(57),a(58),a(59),a(60),a(61),a(64),a(65),a(66),a(68),a(69),a(70),a(71),a(72),a(73),a(74),a(76),a(77),a(78),a(80),a(81),a(82),a(84),a(85),a(86),a(87),a(88),a(89),a(90),a(91),a(92),a(93),a(94),a(95),a(96),a(97),a(99),a(103),a(104),a(106),a(107),a(111),a(116),a(117),a(120),a(122),a(124),a(126),a(127),a(128),a(130),a(131),a(133),a(134),a(135),a(136),a(143),a(146),a(147),a(149),a(150),a(151),a(152),a(153),a(154),a(155),a(156),a(157),a(158),a(159),a(160),a(162),a(163),a(164),a(165),a(166),a(167),a(169),a(170),a(171),a(172),a(174),a(175),a(177),a(178),a(180),a(181),a(182),a(183),b.exports=a(186)},function(S,R,b){var r,d=b(2),c=b(3),x=b(8),O=b(7),o=b(14),E=b(15),n=b(17),N=b(18),J=b(19),j=b(9),p=b(20),v=b(13),I=b(16),Q=b(21),y=b(23),K=b(25),w=b(26),h=b(27),s=b(24),m=b(11)("__proto__"),g=b(28),A=b(33)(!1),B=Object.prototype,C=Array.prototype,k=C.slice,M=C.join,F=d.setDesc,L=d.getDesc,q=d.setDescs,u={};x||(r=!j(function(){return 7!=F(E("div"),"a",{get:function(){return 7}}).a}),d.setDesc=function(b,c,a){if(r)try{return F(b,c,a)}catch(d){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(p(b)[c]=a.value),b},d.getDesc=function(a,b){if(r)try{return L(a,b)}catch(c){}return n(a,b)?O(!B.propertyIsEnumerable.call(a,b),a[b]):void 0},d.setDescs=q=function(a,b){p(a);for(var c,e=d.getKeys(b),g=e.length,f=0;g>f;)d.setDesc(a,c=e[f++],b[c]);return a}),c(c.S+c.F*!x,"Object",{getOwnPropertyDescriptor:d.getDesc,defineProperty:d.setDesc,defineProperties:q});var i="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),H=i.concat("length","prototype"),G=i.length,l=function(){var a,b=E("iframe"),c=G,d=">";for(b.style.display="none",o.appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write("<script>document.F=Object</script"+d),a.close(),l=a.F;c--;)delete l.prototype[i[c]];return l()},D=function(a,b){return function(g){var c,e=y(g),f=0,d=[];for(c in e)c!=m&&n(e,c)&&d.push(c);for(;b>f;)n(e,c=a[f++])&&(~A(d,c)||d.push(c));return d}},t=function(){};c(c.S,"Object",{getPrototypeOf:d.getProto=d.getProto||function(a){return a=Q(a),n(a,m)?a[m]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?B:null},getOwnPropertyNames:d.getNames=d.getNames||D(H,H.length,!0),create:d.create=d.create||function(c,d){var b;return null!==c?(t.prototype=p(c),b=new t,t.prototype=null,b[m]=c):b=l(),d===a?b:q(b,d)},keys:d.getKeys=d.getKeys||D(i,G,!1)});var P=function(d,a,e){if(!(a in u)){for(var c=[],b=0;a>b;b++)c[b]="a["+b+"]";u[a]=Function("F,a","return new F("+c.join(",")+")")}return u[a](d,e)};c(c.P,"Function",{bind:function bind(c){var a=v(this),d=k.call(arguments,1),b=function(){var e=d.concat(k.call(arguments));return this instanceof b?P(a,e.length,e):J(a,e,c)};return I(a.prototype)&&(b.prototype=a.prototype),b}}),c(c.P+c.F*j(function(){o&&k.call(o)}),"Array",{slice:function(f,b){var d=h(this.length),g=N(this);if(b=b===a?d:b,"Array"==g)return k.call(this,f,b);for(var e=w(f,d),l=w(b,d),i=h(l-e),j=Array(i),c=0;i>c;c++)j[c]="String"==g?this.charAt(e+c):this[e+c];return j}}),c(c.P+c.F*(s!=Object),"Array",{join:function join(b){return M.call(s(this),b===a?",":b)}}),c(c.S,"Array",{isArray:b(30)});var z=function(a){return function(g,d){v(g);var c=s(this),e=h(c.length),b=a?e-1:0,f=a?-1:1;if(arguments.length<2)for(;;){if(b in c){d=c[b],b+=f;break}if(b+=f,a?0>b:b>=e)throw TypeError("Reduce of empty array with no initial value")}for(;a?b>=0:e>b;b+=f)b in c&&(d=g(d,c[b],b,this));return d}},f=function(a){return function(b){return a(this,b,arguments[1])}};c(c.P,"Array",{forEach:d.each=d.each||f(g(0)),map:f(g(1)),filter:f(g(2)),some:f(g(3)),every:f(g(4)),reduce:z(!1),reduceRight:z(!0),indexOf:f(A),lastIndexOf:function(d,e){var b=y(this),c=h(b.length),a=c-1;for(arguments.length>1&&(a=Math.min(a,K(e))),0>a&&(a=h(c+a));a>=0;a--)if(a in b&&b[a]===d)return a;return-1}}),c(c.S,"Date",{now:function(){return+new Date}});var e=function(a){return a>9?a:"0"+a};c(c.P+c.F*(j(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!j(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(this))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+e(a.getUTCMonth()+1)+"-"+e(a.getUTCDate())+"T"+e(a.getUTCHours())+":"+e(a.getUTCMinutes())+":"+e(a.getUTCSeconds())+"."+(c>99?c:"0"+e(c))+"Z"}})},function(b,c){var a=Object;b.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},function(g,j,c){var b=c(4),d=c(5),h=c(6),i=c(10),f=c(12),e="prototype",a=function(k,j,o){var g,m,c,s,v=k&a.F,p=k&a.G,u=k&a.S,r=k&a.P,t=k&a.B,l=p?b:u?b[j]||(b[j]={}):(b[j]||{})[e],n=p?d:d[j]||(d[j]={}),q=n[e]||(n[e]={});p&&(o=j);for(g in o)m=!v&&l&&g in l,c=(m?l:o)[g],s=t&&m?f(c,b):r&&"function"==typeof c?f(Function.call,c):c,l&&!m&&i(l,g,c),n[g]!=c&&h(n,g,s),r&&q[g]!=c&&(q[g]=c)};b.core=d,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,g.exports=a},function(a,d){var b=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof c&&(c=b)},function(a,d){var c=a.exports={version:"1.2.6"};"number"==typeof b&&(b=c)},function(b,e,a){var c=a(2),d=a(7);b.exports=a(8)?function(a,b,e){return c.setDesc(a,b,d(1,e))}:function(a,b,c){return a[b]=c,a}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,c,b){a.exports=!b(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(f,i,a){var g=a(4),b=a(6),c=a(11)("src"),d="toString",e=Function[d],h=(""+e).split(d);a(5).inspectSource=function(a){return e.call(a)},(f.exports=function(e,a,d,f){"function"==typeof d&&(d.hasOwnProperty(c)||b(d,c,e[a]?""+e[a]:h.join(String(a))),d.hasOwnProperty("name")||b(d,"name",a)),e===g?e[a]=d:(f||delete e[a],b(e,a,d))})(Function.prototype,d,function toString(){return"function"==typeof this&&this[c]||e.call(this)})},function(b,e){var c=0,d=Math.random();b.exports=function(b){return"Symbol(".concat(b===a?"":b,")_",(++c+d).toString(36))}},function(b,e,c){var d=c(13);b.exports=function(b,c,e){if(d(b),c===a)return b;switch(e){case 1:return function(a){return b.call(c,a)};case 2:return function(a,d){return b.call(c,a,d)};case 3:return function(a,d,e){return b.call(c,a,d,e)}}return function(){return b.apply(c,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,c,b){a.exports=b(4).document&&document.documentElement},function(d,f,b){var c=b(16),a=b(4).document,e=c(a)&&c(a.createElement);d.exports=function(b){return e?a.createElement(b):{}}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,c){var b={}.hasOwnProperty;a.exports=function(a,c){return b.call(a,c)}},function(a,c){var b={}.toString;a.exports=function(a){return b.call(a).slice(8,-1)}},function(b,c){b.exports=function(c,b,d){var e=d===a;switch(b.length){case 0:return e?c():c.call(d);case 1:return e?c(b[0]):c.call(d,b[0]);case 2:return e?c(b[0],b[1]):c.call(d,b[0],b[1]);case 3:return e?c(b[0],b[1],b[2]):c.call(d,b[0],b[1],b[2]);case 4:return e?c(b[0],b[1],b[2],b[3]):c.call(d,b[0],b[1],b[2],b[3])}return c.apply(d,b)}},function(a,d,b){var c=b(16);a.exports=function(a){if(!c(a))throw TypeError(a+" is not an object!");return a}},function(a,d,b){var c=b(22);a.exports=function(a){return Object(c(a))}},function(b,c){b.exports=function(b){if(b==a)throw TypeError("Can't call method on "+b);return b}},function(b,e,a){var c=a(24),d=a(22);b.exports=function(a){return c(d(a))}},function(a,d,b){var c=b(18);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==c(a)?a.split(""):Object(a)}},function(a,d){var b=Math.ceil,c=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?c:b)(a)}},function(a,f,b){var c=b(25),d=Math.max,e=Math.min;a.exports=function(a,b){return a=c(a),0>a?d(a+b,0):e(a,b)}},function(a,e,b){var c=b(25),d=Math.min;a.exports=function(a){return a>0?d(c(a),9007199254740991):0}},function(d,i,b){var e=b(12),f=b(24),g=b(21),h=b(27),c=b(29);d.exports=function(b){var i=1==b,k=2==b,l=3==b,d=4==b,j=6==b,m=5==b||j;return function(p,v,x){for(var o,r,u=g(p),s=f(u),w=e(v,x,3),t=h(s.length),n=0,q=i?c(p,t):k?c(p,0):a;t>n;n++)if((m||n in s)&&(o=s[n],r=w(o,n,u),b))if(i)q[n]=r;else if(r)switch(b){case 3:return!0;case 5:return o;case 6:return n;case 2:q.push(o)}else if(d)return!1;return j?-1:l||d?d:q}}},function(d,g,b){var e=b(16),c=b(30),f=b(31)("species");d.exports=function(d,g){var b;return c(d)&&(b=d.constructor,"function"!=typeof b||b!==Array&&!c(b.prototype)||(b=a),e(b)&&(b=b[f],null===b&&(b=a))),new(b===a?Array:b)(g)}},function(a,d,b){var c=b(18);a.exports=Array.isArray||function(a){return"Array"==c(a)}},function(d,f,a){var c=a(32)("wks"),e=a(11),b=a(4).Symbol;d.exports=function(a){return c[a]||(c[a]=b&&b[a]||(b||e)("Symbol."+a))}},function(d,f,e){var a=e(4),b="__core-js_shared__",c=a[b]||(a[b]={});d.exports=function(a){return c[a]||(c[a]={})}},function(b,f,a){var c=a(23),d=a(27),e=a(26);b.exports=function(a){return function(j,g,k){var h,f=c(j),i=d(f.length),b=e(k,i);if(a&&g!=g){for(;i>b;)if(h=f[b++],h!=h)return!0}else for(;i>b;b++)if((a||b in f)&&f[b]===g)return a||b;return!a&&-1}}},function(W,V,b){var e=b(2),x=b(4),d=b(17),w=b(8),f=b(3),G=b(10),H=b(9),J=b(32),s=b(35),S=b(11),A=b(31),R=b(36),C=b(37),Q=b(38),P=b(30),O=b(20),p=b(23),v=b(7),I=e.getDesc,i=e.setDesc,k=e.create,z=C.get,g=x.Symbol,l=x.JSON,m=l&&l.stringify,n=!1,c=A("_hidden"),N=e.isEnum,o=J("symbol-registry"),h=J("symbols"),q="function"==typeof g,j=Object.prototype,y=w&&H(function(){return 7!=k(i({},"a",{get:function(){return i(this,"a",{value:7}).a}})).a})?function(c,a,d){var b=I(j,a);b&&delete j[a],i(c,a,d),b&&c!==j&&i(j,a,b)}:i,L=function(a){var b=h[a]=k(g.prototype);return b._k=a,w&&n&&y(j,a,{configurable:!0,set:function(b){d(this,c)&&d(this[c],a)&&(this[c][a]=!1),y(this,a,v(1,b))}}),b},r=function(a){return"symbol"==typeof a},t=function defineProperty(a,b,e){return e&&d(h,b)?(e.enumerable?(d(a,c)&&a[c][b]&&(a[c][b]=!1),e=k(e,{enumerable:v(0,!1)})):(d(a,c)||i(a,c,v(1,{})),a[c][b]=!0),y(a,b,e)):i(a,b,e)},u=function defineProperties(a,b){O(a);for(var c,d=Q(b=p(b)),e=0,f=d.length;f>e;)t(a,c=d[e++],b[c]);return a},F=function create(b,c){return c===a?k(b):u(k(b),c)},E=function propertyIsEnumerable(a){var b=N.call(this,a);return b||!d(this,a)||!d(h,a)||d(this,c)&&this[c][a]?b:!0},D=function getOwnPropertyDescriptor(a,b){var e=I(a=p(a),b);return!e||!d(h,b)||d(a,c)&&a[c][b]||(e.enumerable=!0),e},B=function getOwnPropertyNames(g){for(var a,b=z(p(g)),e=[],f=0;b.length>f;)d(h,a=b[f++])||a==c||e.push(a);return e},M=function getOwnPropertySymbols(f){for(var a,b=z(p(f)),c=[],e=0;b.length>e;)d(h,a=b[e++])&&c.push(h[a]);return c},T=function stringify(e){if(e!==a&&!r(e)){for(var b,c,d=[e],f=1,g=arguments;g.length>f;)d.push(g[f++]);return b=d[1],"function"==typeof b&&(c=b),(c||!P(b))&&(b=function(b,a){return c&&(a=c.call(this,b,a)),r(a)?void 0:a}),d[1]=b,m.apply(l,d)}},U=H(function(){var a=g();return"[null]"!=m([a])||"{}"!=m({a:a})||"{}"!=m(Object(a))});q||(g=function Symbol(){if(r(this))throw TypeError("Symbol is not a constructor");return L(S(arguments.length>0?arguments[0]:a))},G(g.prototype,"toString",function toString(){return this._k}),r=function(a){return a instanceof g},e.create=F,e.isEnum=E,e.getDesc=D,e.setDesc=t,e.setDescs=u,e.getNames=C.get=B,e.getSymbols=M,w&&!b(39)&&G(j,"propertyIsEnumerable",E,!0));var K={"for":function(a){return d(o,a+="")?o[a]:o[a]=g(a)},keyFor:function keyFor(a){return R(o,a)},useSetter:function(){n=!0},useSimple:function(){n=!1}};e.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=A(a);K[a]=q?b:L(b)}),n=!0,f(f.G+f.W,{Symbol:g}),f(f.S,"Symbol",K),f(f.S+f.F*!q,"Object",{create:F,defineProperty:t,defineProperties:u,getOwnPropertyDescriptor:D,getOwnPropertyNames:B,getOwnPropertySymbols:M}),l&&f(f.S+f.F*(!q||U),"JSON",{stringify:T}),s(g,"Symbol"),s(Math,"Math",!0),s(x.JSON,"JSON",!0)},function(c,f,a){var d=a(2).setDesc,e=a(17),b=a(31)("toStringTag");c.exports=function(a,c,f){a&&!e(a=f?a:a.prototype,b)&&d(a,b,{configurable:!0,value:c})}},function(b,e,a){var c=a(2),d=a(23);b.exports=function(g,h){for(var a,b=d(g),e=c.getKeys(b),i=e.length,f=0;i>f;)if(b[a=e[f++]]===h)return a}},function(d,h,a){var e=a(23),b=a(2).getNames,f={}.toString,c="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(a){try{return b(a)}catch(d){return c.slice()}};d.exports.get=function getOwnPropertyNames(a){return c&&"[object Window]"==f.call(a)?g(a):b(e(a))}},function(b,d,c){var a=c(2);b.exports=function(b){var c=a.getKeys(b),d=a.getSymbols;if(d)for(var e,f=d(b),h=a.isEnum,g=0;f.length>g;)h.call(b,e=f[g++])&&c.push(e);return c}},function(a,b){a.exports=!1},function(c,d,b){var a=b(3);a(a.S+a.F,"Object",{assign:b(41)})},function(c,f,a){var b=a(2),d=a(21),e=a(24);c.exports=a(9)(function(){var a=Object.assign,b={},c={},d=Symbol(),e="abcdefghijklmnopqrst";return b[d]=7,e.split("").forEach(function(a){c[a]=a}),7!=a({},b)[d]||Object.keys(a({},c)).join("")!=e})?function assign(n,q){for(var g=d(n),h=arguments,o=h.length,j=1,f=b.getKeys,l=b.getSymbols,m=b.isEnum;o>j;)for(var c,a=e(h[j++]),k=l?f(a).concat(l(a)):f(a),p=k.length,i=0;p>i;)m.call(a,c=k[i++])&&(g[c]=a[c]);return g}:Object.assign},function(c,d,a){var b=a(3);b(b.S,"Object",{is:a(43)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(c,d,a){var b=a(3);b(b.S,"Object",{setPrototypeOf:a(45).set})},function(d,h,b){var e=b(2).getDesc,f=b(16),g=b(20),c=function(b,a){if(g(b),!f(a)&&null!==a)throw TypeError(a+": can't set as prototype!")};d.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(f,a,d){try{d=b(12)(Function.call,e(Object.prototype,"__proto__").set,2),d(f,[]),a=!(f instanceof Array)}catch(g){a=!0}return function setPrototypeOf(b,e){return c(b,e),a?b.__proto__=e:d(b,e),b}}({},!1):a),check:c}},function(d,e,a){var c=a(47),b={};b[a(31)("toStringTag")]="z",b+""!="[object z]"&&a(10)(Object.prototype,"toString",function toString(){return"[object "+c(this)+"]"},!0)},function(d,g,c){var b=c(18),e=c(31)("toStringTag"),f="Arguments"==b(function(){return arguments}());d.exports=function(d){var c,g,h;return d===a?"Undefined":null===d?"Null":"string"==typeof(g=(c=Object(d))[e])?g:f?b(c):"Object"==(h=b(c))&&"function"==typeof c.callee?"Arguments":h}},function(c,d,a){var b=a(16);a(49)("freeze",function(a){return function freeze(c){return a&&b(c)?a(c):c}})},function(c,f,a){var b=a(3),d=a(5),e=a(9);c.exports=function(a,g){var c=(d.Object||{})[a]||Object[a],f={};f[a]=g(c),b(b.S+b.F*e(function(){c(1)}),"Object",f)}},function(c,d,a){var b=a(16);a(49)("seal",function(a){return function seal(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(16);a(49)("preventExtensions",function(a){return function preventExtensions(c){return a&&b(c)?a(c):c}})},function(c,d,a){var b=a(16);a(49)("isFrozen",function(a){return function isFrozen(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(16);a(49)("isSealed",function(a){return function isSealed(c){return b(c)?a?a(c):!1:!0}})},function(c,d,a){var b=a(16);a(49)("isExtensible",function(a){return function isExtensible(c){return b(c)?a?a(c):!0:!1}})},function(c,d,a){var b=a(23);a(49)("getOwnPropertyDescriptor",function(a){return function getOwnPropertyDescriptor(c,d){return a(b(c),d)}})},function(c,d,a){var b=a(21);a(49)("getPrototypeOf",function(a){return function getPrototypeOf(c){return a(b(c))}})},function(c,d,a){var b=a(21);a(49)("keys",function(a){return function keys(c){return a(b(c))}})},function(b,c,a){a(49)("getOwnPropertyNames",function(){return a(37).get})},function(h,i,a){var c=a(2).setDesc,e=a(7),f=a(17),d=Function.prototype,g=/^\s*function ([^ (]*)/,b="name";b in d||a(8)&&c(d,b,{configurable:!0,get:function(){var a=(""+this).match(g),d=a?a[1]:"";return f(this,b)||c(this,b,e(5,d)),d}})},function(f,g,a){var b=a(2),c=a(16),d=a(31)("hasInstance"),e=Function.prototype;d in e||b.setDesc(e,d,{value:function(a){if("function"!=typeof this||!c(a))return!1;if(!c(this.prototype))return a instanceof this;for(;a=b.getProto(a);)if(this.prototype===a)return!0;return!1}})},function(q,p,b){var c=b(2),h=b(4),i=b(17),j=b(18),l=b(62),k=b(9),n=b(63).trim,d="Number",a=h[d],e=a,f=a.prototype,o=j(c.create(f))==d,m="trim"in String.prototype,g=function(i){var a=l(i,!1);if("string"==typeof a&&a.length>2){a=m?a.trim():n(a,3);var b,c,d,e=a.charCodeAt(0);if(43===e||45===e){if(b=a.charCodeAt(2),88===b||120===b)return NaN}else if(48===e){switch(a.charCodeAt(1)){case 66:case 98:c=2,d=49;break;case 79:case 111:c=8,d=55;break;default:return+a}for(var f,g=a.slice(2),h=0,j=g.length;j>h;h++)if(f=g.charCodeAt(h),48>f||f>d)return NaN;return parseInt(g,c)}}return+a};a(" 0o1")&&a("0b1")&&!a("+0x1")||(a=function Number(h){var c=arguments.length<1?0:h,b=this;return b instanceof a&&(o?k(function(){f.valueOf.call(b)}):j(b)!=d)?new e(g(c)):g(c)},c.each.call(b(8)?c.getNames(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(b){i(e,b)&&!i(a,b)&&c.setDesc(a,b,c.getDesc(e,b))}),a.prototype=f,f.constructor=a,b(10)(h,d,a))},function(b,d,c){var a=c(16);b.exports=function(b,e){if(!a(b))return b;var c,d;if(e&&"function"==typeof(c=b.toString)&&!a(d=c.call(b)))return d;if("function"==typeof(c=b.valueOf)&&!a(d=c.call(b)))return d;if(!e&&"function"==typeof(c=b.toString)&&!a(d=c.call(b)))return d;throw TypeError("Can't convert object to primitive value")}},function(g,m,b){var c=b(3),h=b(22),i=b(9),d=" \n \f\r   ᠎              \u2028\u2029\ufeff",a="["+d+"]",f="​…",j=RegExp("^"+a+a+"*"),k=RegExp(a+a+"*$"),e=function(a,e){var b={};b[a]=e(l),c(c.P+c.F*i(function(){return!!d[a]()||f[a]()!=f}),"String",b)},l=e.trim=function(a,b){return a=String(h(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};g.exports=e},function(c,d,b){var a=b(3);a(a.S,"Number",{EPSILON:Math.pow(2,-52)})},function(d,e,a){var b=a(3),c=a(4).isFinite;b(b.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&c(a)}})},function(c,d,a){var b=a(3);b(b.S,"Number",{isInteger:a(67)})},function(a,e,b){var c=b(16),d=Math.floor;a.exports=function isInteger(a){return!c(a)&&isFinite(a)&&d(a)===a}},function(c,d,b){var a=b(3);a(a.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(e,f,a){var b=a(3),c=a(67),d=Math.abs;b(b.S,"Number",{isSafeInteger:function isSafeInteger(a){return c(a)&&d(a)<=9007199254740991}})},function(c,d,b){var a=b(3);a(a.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseFloat:parseFloat})},function(c,d,b){var a=b(3);a(a.S,"Number",{parseInt:parseInt})},function(f,g,b){var a=b(3),e=b(75),c=Math.sqrt,d=Math.acosh;a(a.S+a.F*!(d&&710==Math.floor(d(Number.MAX_VALUE))),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+c(a-1)*c(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&1e-8>a?a-a*a/2:Math.log(1+a)}},function(c,d,b){function asinh(a){return isFinite(a=+a)&&0!=a?0>a?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var a=b(3);a(a.S,"Math",{asinh:asinh})},function(c,d,b){var a=b(3);a(a.S,"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(d,e,a){var b=a(3),c=a(79);b(b.S,"Math",{cbrt:function cbrt(a){return c(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:0>a?-1:1}},function(c,d,b){var a=b(3);a(a.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(d,e,c){var a=c(3),b=Math.exp;a(a.S,"Math",{cosh:function cosh(a){return(b(a=+a)+b(-a))/2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{expm1:a(83)})},function(a,b){a.exports=Math.expm1||function expm1(a){return 0==(a=+a)?a:a>-1e-6&&1e-6>a?a+a*a/2:Math.exp(a)-1}},function(k,j,e){var f=e(3),g=e(79),a=Math.pow,d=a(2,-52),b=a(2,-23),i=a(2,127)*(2-b),c=a(2,-126),h=function(a){return a+1/d-1/d};f(f.S,"Math",{fround:function fround(k){var f,a,e=Math.abs(k),j=g(k);return c>e?j*h(e/c/b)*c*b:(f=(1+b/d)*e,a=f-(f-e),a>i||a!=a?j*(1/0):j*a)}})},function(d,e,b){var a=b(3),c=Math.abs;a(a.S,"Math",{hypot:function hypot(i,j){for(var a,b,e=0,f=0,g=arguments,h=g.length,d=0;h>f;)a=c(g[f++]),a>d?(b=d/a,e=e*b*b+1,d=a):a>0?(b=a/d,e+=b*b):e+=a;return d===1/0?1/0:d*Math.sqrt(e)}})},function(d,e,b){var a=b(3),c=Math.imul;a(a.S+a.F*b(9)(function(){return-5!=c(4294967295,5)||2!=c.length}),"Math",{imul:function imul(f,g){var a=65535,b=+f,c=+g,d=a&b,e=a&c;return 0|d*e+((a&b>>>16)*e+d*(a&c>>>16)<<16>>>0)}})},function(c,d,b){var a=b(3);a(a.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(c,d,a){var b=a(3);b(b.S,"Math",{log1p:a(75)})},function(c,d,b){var a=b(3);a(a.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(c,d,a){var b=a(3);b(b.S,"Math",{sign:a(79)})},function(e,f,a){var b=a(3),c=a(83),d=Math.exp;b(b.S+b.F*a(9)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(c(a)-c(-a))/2:(d(a-1)-d(-a-1))*(Math.E/2)}})},function(e,f,a){var b=a(3),c=a(83),d=Math.exp;b(b.S,"Math",{tanh:function tanh(a){var b=c(a=+a),e=c(-a);return b==1/0?1:e==1/0?-1:(b-e)/(d(a)+d(-a))}})},function(c,d,b){var a=b(3);a(a.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(f,g,b){var a=b(3),e=b(26),c=String.fromCharCode,d=String.fromCodePoint;a(a.S+a.F*(!!d&&1!=d.length),"String",{fromCodePoint:function fromCodePoint(h){for(var a,b=[],d=arguments,g=d.length,f=0;g>f;){if(a=+d[f++],e(a,1114111)!==a)throw RangeError(a+" is not a valid code point");b.push(65536>a?c(a):c(((a-=65536)>>10)+55296,a%1024+56320))}return b.join("")}})},function(e,f,a){var b=a(3),c=a(23),d=a(27);b(b.S,"String",{raw:function raw(g){for(var e=c(g.raw),h=d(e.length),f=arguments,i=f.length,b=[],a=0;h>a;)b.push(String(e[a++])),i>a&&b.push(String(f[a]));return b.join("")}})},function(b,c,a){a(63)("trim",function(a){return function trim(){return a(this,3)}})},function(d,e,a){var b=a(3),c=a(98)(!1);b(b.P,"String",{codePointAt:function codePointAt(a){return c(this,a)}})},function(c,f,b){var d=b(25),e=b(22);c.exports=function(b){return function(j,k){var f,h,g=String(e(j)),c=d(k),i=g.length;return 0>c||c>=i?b?"":a:(f=g.charCodeAt(c),55296>f||f>56319||c+1===i||(h=g.charCodeAt(c+1))<56320||h>57343?b?g.charAt(c):f:b?g.slice(c,c+2):(f-55296<<10)+(h-56320)+65536)}}},function(h,i,b){var c=b(3),e=b(27),g=b(100),d="endsWith",f=""[d];c(c.P+c.F*b(102)(d),"String",{endsWith:function endsWith(i){var b=g(this,i,d),j=arguments,k=j.length>1?j[1]:a,l=e(b.length),c=k===a?l:Math.min(e(k),l),h=String(i);return f?f.call(b,h,c):b.slice(c-h.length,c)===h}})},function(b,e,a){var c=a(101),d=a(22);b.exports=function(a,b,e){if(c(b))throw TypeError("String#"+e+" doesn't accept regex!");return String(d(a))}},function(c,g,b){var d=b(16),e=b(18),f=b(31)("match");c.exports=function(b){var c;return d(b)&&((c=b[f])!==a?!!c:"RegExp"==e(b))}},function(a,d,b){var c=b(31)("match");a.exports=function(b){var a=/./;try{"/./"[b](a)}catch(d){try{return a[c]=!1,!"/./"[b](a)}catch(e){}}return!0}},function(f,g,b){var c=b(3),e=b(100),d="includes";c(c.P+c.F*b(102)(d),"String",{includes:function includes(b){return!!~e(this,b,d).indexOf(b,arguments.length>1?arguments[1]:a)}})},function(c,d,a){var b=a(3);b(b.P,"String",{repeat:a(105)})},function(b,e,a){var c=a(25),d=a(22);b.exports=function repeat(f){var b=String(d(this)),e="",a=c(f);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(b+=b))1&a&&(e+=b);return e}},function(h,i,b){var c=b(3),f=b(27),g=b(100),d="startsWith",e=""[d];c(c.P+c.F*b(102)(d),"String",{startsWith:function startsWith(i){var b=g(this,i,d),j=arguments,c=f(Math.min(j.length>1?j[1]:a,b.length)),h=String(i);return e?e.call(b,h,c):b.slice(c,c+h.length)===h}})},function(d,e,b){var c=b(98)(!0);b(108)(String,"String",function(a){this._t=String(a),this._i=0},function(){var b,d=this._t,e=this._i;return e>=d.length?{value:a,done:!0}:(b=c(d,e),this._i+=b.length,{value:b,done:!1})})},function(o,r,a){var i=a(39),d=a(3),n=a(10),h=a(6),m=a(17),f=a(109),q=a(110),p=a(35),l=a(2).getProto,c=a(31)("iterator"),e=!([].keys&&"next"in[].keys()),j="@@iterator",k="keys",b="values",g=function(){return this};o.exports=function(B,v,u,F,s,E,A){q(u,v,F);var r,x,w=function(c){if(!e&&c in a)return a[c];switch(c){case k:return function keys(){return new u(this,c)};case b:return function values(){return new u(this,c)}}return function entries(){return new u(this,c)}},C=v+" Iterator",y=s==b,z=!1,a=B.prototype,t=a[c]||a[j]||s&&a[s],o=t||w(s);if(t){var D=l(o.call(new B));p(D,C,!0),!i&&m(a,j)&&h(D,c,g),y&&t.name!==b&&(z=!0,o=function values(){return t.call(this)})}if(i&&!A||!e&&!z&&a[c]||h(a,c,o),f[v]=o,f[C]=g,s)if(r={values:y?o:w(b),keys:E?o:w(k),entries:y?w("entries"):o},A)for(x in r)x in a||n(a,x,r[x]);else d(d.P+d.F*(e||z),v,r);return r}},function(a,b){a.exports={}},function(c,g,a){var d=a(2),e=a(7),f=a(35),b={};a(6)(b,a(31)("iterator"),function(){return this}),c.exports=function(a,c,g){a.prototype=d.create(b,{next:e(1,g)}),f(a,c+" Iterator")}},function(j,k,b){var d=b(12),c=b(3),e=b(21),f=b(112),g=b(113),h=b(27),i=b(114);c(c.S+c.F*!b(115)(function(a){Array.from(a)}),"Array",{from:function from(t){var n,c,r,m,j=e(t),l="function"==typeof this?this:Array,p=arguments,s=p.length,k=s>1?p[1]:a,q=k!==a,b=0,o=i(j);if(q&&(k=d(k,s>2?p[2]:a,2)),o==a||l==Array&&g(o))for(n=h(j.length),c=new l(n);n>b;b++)c[b]=q?k(j[b],b):j[b];else for(m=o.call(j),c=new l;!(r=m.next()).done;b++)c[b]=q?f(m,k,[r.value,b],!0):r.value;return c.length=b,c}})},function(c,e,d){var b=d(20);c.exports=function(d,e,c,g){try{return g?e(b(c)[0],c[1]):e(c)}catch(h){var f=d["return"];throw f!==a&&b(f.call(d)),h}}},function(c,g,b){var d=b(109),e=b(31)("iterator"),f=Array.prototype;c.exports=function(b){return b!==a&&(d.Array===b||f[e]===b)}},function(c,g,b){var d=b(47),e=b(31)("iterator"),f=b(109);c.exports=b(5).getIteratorMethod=function(b){return b!=a?b[e]||b["@@iterator"]||f[d(b)]:void 0}},function(d,f,e){var a=e(31)("iterator"),b=!1;try{var c=[7][a]();c["return"]=function(){b=!0},Array.from(c,function(){throw 2})}catch(g){}d.exports=function(f,g){if(!g&&!b)return!1;var d=!1;try{var c=[7],e=c[a]();e.next=function(){return{done:d=!0}},c[a]=function(){return e},f(c)}catch(h){}return d}},function(c,d,b){var a=b(3);a(a.S+a.F*b(9)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,d=arguments,b=d.length,c=new("function"==typeof this?this:Array)(b);b>a;)c[a]=d[a++];return c.length=b,c}})},function(f,h,b){var d=b(118),c=b(119),e=b(109),g=b(23);f.exports=b(108)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var d=this._t,e=this._k,b=this._i++;return!d||b>=d.length?(this._t=a,c(1)):"keys"==e?c(0,b):"values"==e?c(0,d[b]):c(0,[b,d[b]])},"values"),e.Arguments=e.Array,d("keys"),d("values"),d("entries")},function(e,f,d){var b=d(31)("unscopables"),c=Array.prototype;c[b]==a&&d(6)(c,b,{}),e.exports=function(a){c[b][a]=!0}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(b,c,a){a(121)("Array")},function(c,g,a){var d=a(4),e=a(2),f=a(8),b=a(31)("species");c.exports=function(c){var a=d[c];f&&a&&!a[b]&&e.setDesc(a,b,{configurable:!0,get:function(){return this}})}},function(c,d,a){var b=a(3);b(b.P,"Array",{copyWithin:a(123)}),a(118)("copyWithin")},function(d,g,b){var e=b(21),c=b(26),f=b(27);d.exports=[].copyWithin||function copyWithin(m,n){var g=e(this),h=f(g.length),b=c(m,h),d=c(n,h),k=arguments,l=k.length>2?k[2]:a,i=Math.min((l===a?h:c(l,h))-d,h-b),j=1;for(b>d&&d+i>b&&(j=-1,d+=i-1,b+=i-1);i-->0;)d in g?g[b]=g[d]:delete g[b],b+=j,d+=j;return g}},function(c,d,a){var b=a(3);b(b.P,"Array",{fill:a(125)}),a(118)("fill")},function(d,g,b){var e=b(21),c=b(26),f=b(27);d.exports=[].fill||function fill(k){for(var b=e(this),d=f(b.length),g=arguments,h=g.length,i=c(h>1?g[1]:a,d),j=h>2?g[2]:a,l=j===a?d:c(j,d);l>i;)b[i++]=k;return b}},function(g,h,b){var c=b(3),f=b(28)(5),d="find",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{find:function find(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(118)(d)},function(g,h,b){var c=b(3),f=b(28)(6),d="findIndex",e=!0;d in[]&&Array(1)[d](function(){e=!1}),c(c.P+c.F*e,"Array",{findIndex:function findIndex(b){return f(this,b,arguments.length>1?arguments[1]:a)}}),b(118)(d)},function(n,m,c){var f=c(2),i=c(4),k=c(101),l=c(129),b=i.RegExp,d=b,j=b.prototype,e=/a/g,g=/a/g,h=new b(e)!==e;!c(8)||h&&!c(9)(function(){return g[c(31)("match")]=!1,b(e)!=e||b(g)==g||"/a/i"!=b(e,"i")})||(b=function RegExp(c,f){var e=k(c),g=f===a;return this instanceof b||!e||c.constructor!==b||!g?h?new d(e&&!g?c.source:c,f):d((e=c instanceof b)?c.source:c,e&&g?l.call(c):f):c},f.each.call(f.getNames(d),function(a){a in b||f.setDesc(b,a,{configurable:!0,get:function(){return d[a]},set:function(b){d[a]=b}})}),j.constructor=b,b.prototype=j,c(10)(i,"RegExp",b)),c(121)("RegExp")},function(a,d,b){var c=b(20);a.exports=function(){var b=c(this),a="";return b.global&&(a+="g"),b.ignoreCase&&(a+="i"),b.multiline&&(a+="m"),b.unicode&&(a+="u"),b.sticky&&(a+="y"),a}},function(c,d,a){var b=a(2);a(8)&&"g"!=/./g.flags&&b.setDesc(RegExp.prototype,"flags",{configurable:!0,get:a(129)})},function(c,d,b){b(132)("match",1,function(c,b){return function match(d){var e=c(this),f=d==a?a:d[b];return f!==a?f.call(d,e):new RegExp(d)[b](String(e))}})},function(b,h,a){var c=a(6),d=a(10),e=a(9),f=a(22),g=a(31);b.exports=function(a,i,j){var b=g(a),h=""[a];e(function(){var c={};return c[b]=function(){return 7},7!=""[a](c)})&&(d(String.prototype,a,j(f,b,h)),c(RegExp.prototype,b,2==i?function(a,b){return h.call(a,this,b)}:function(a){return h.call(a,this)}))}},function(c,d,b){b(132)("replace",2,function(b,c,d){return function replace(e,f){var g=b(this),h=e==a?a:e[c];return h!==a?h.call(e,g,f):d.call(String(g),e,f)}})},function(c,d,b){b(132)("search",1,function(c,b){return function search(d){var e=c(this),f=d==a?a:d[b];return f!==a?f.call(d,e):new RegExp(d)[b](String(e))}})},function(c,d,b){b(132)("split",2,function(b,c,d){return function split(e,f){var g=b(this),h=e==a?a:e[c];return h!==a?h.call(e,g,f):d.call(String(g),e,f)}})},function(K,J,b){var s,l=b(2),F=b(39),k=b(4),j=b(12),I=b(47),d=b(3),D=b(16),E=b(20),m=b(13),G=b(137),p=b(138),q=b(45).set,A=b(43),B=b(31)("species"),z=b(139),v=b(140),e="Promise",o=k.process,H="process"==I(o),c=k[e],i=function(){},r=function(d){var b,a=new c(i);return d&&(a.constructor=function(a){a(i,i)}),(b=c.resolve(a))["catch"](i),b===a},h=function(){function P2(b){var a=new c(b);return q(a,P2.prototype),a}var a=!1;try{if(a=c&&c.resolve&&r(),q(P2,c),P2.prototype=l.create(c.prototype,{constructor:{value:P2}}),P2.resolve(5).then(function(){})instanceof P2||(a=!1),
+a&&b(8)){var d=!1;c.resolve(l.setDesc({},"then",{get:function(){d=!0}})),a=d}}catch(e){a=!1}return a}(),C=function(a,b){return F&&a===c&&b===s?!0:A(a,b)},t=function(b){var c=E(b)[B];return c!=a?c:b},u=function(a){var b;return D(a)&&"function"==typeof(b=a.then)?b:!1},g=function(d){var b,c;this.promise=new d(function(d,e){if(b!==a||c!==a)throw TypeError("Bad Promise constructor");b=d,c=e}),this.resolve=m(b),this.reject=m(c)},w=function(a){try{a()}catch(b){return{error:b}}},n=function(b,d){if(!b.n){b.n=!0;var c=b.c;v(function(){for(var e=b.v,f=1==b.s,g=0,h=function(a){var c,h,g=f?a.ok:a.fail,i=a.resolve,d=a.reject;try{g?(f||(b.h=!0),c=g===!0?e:g(e),c===a.promise?d(TypeError("Promise-chain cycle")):(h=u(c))?h.call(c,i,d):i(c)):d(e)}catch(j){d(j)}};c.length>g;)h(c[g++]);c.length=0,b.n=!1,d&&setTimeout(function(){var f,c,d=b.p;y(d)&&(H?o.emit("unhandledRejection",e,d):(f=k.onunhandledrejection)?f({promise:d,reason:e}):(c=k.console)&&c.error&&c.error("Unhandled promise rejection",e)),b.a=a},1)})}},y=function(e){var a,b=e._d,c=b.a||b.c,d=0;if(b.h)return!1;for(;c.length>d;)if(a=c[d++],a.fail||!y(a.promise))return!1;return!0},f=function(b){var a=this;a.d||(a.d=!0,a=a.r||a,a.v=b,a.s=2,a.a=a.c.slice(),n(a,!0))},x=function(b){var c,a=this;if(!a.d){a.d=!0,a=a.r||a;try{if(a.p===b)throw TypeError("Promise can't be resolved itself");(c=u(b))?v(function(){var d={r:a,d:!1};try{c.call(b,j(x,d,1),j(f,d,1))}catch(e){f.call(d,e)}}):(a.v=b,a.s=1,n(a,!1))}catch(d){f.call({r:a,d:!1},d)}}};h||(c=function Promise(d){m(d);var b=this._d={p:G(this,c,e),c:[],a:a,s:0,d:!1,v:a,h:!1,n:!1};try{d(j(x,b,1),j(f,b,1))}catch(g){f.call(b,g)}},b(142)(c.prototype,{then:function then(d,e){var a=new g(z(this,c)),f=a.promise,b=this._d;return a.ok="function"==typeof d?d:!0,a.fail="function"==typeof e&&e,b.c.push(a),b.a&&b.a.push(a),b.s&&n(b,!1),f},"catch":function(b){return this.then(a,b)}})),d(d.G+d.W+d.F*!h,{Promise:c}),b(35)(c,e),b(121)(e),s=b(5)[e],d(d.S+d.F*!h,e,{reject:function reject(b){var a=new g(this),c=a.reject;return c(b),a.promise}}),d(d.S+d.F*(!h||r(!0)),e,{resolve:function resolve(a){if(a instanceof c&&C(a.constructor,this))return a;var b=new g(this),d=b.resolve;return d(a),b.promise}}),d(d.S+d.F*!(h&&b(115)(function(a){c.all(a)["catch"](function(){})})),e,{all:function all(h){var c=t(this),b=new g(c),d=b.resolve,e=b.reject,a=[],f=w(function(){p(h,!1,a.push,a);var b=a.length,f=Array(b);b?l.each.call(a,function(g,h){var a=!1;c.resolve(g).then(function(c){a||(a=!0,f[h]=c,--b||d(f))},e)}):d(f)});return f&&e(f.error),b.promise},race:function race(e){var b=t(this),a=new g(b),c=a.reject,d=w(function(){p(e,!1,function(d){b.resolve(d).then(a.resolve,c)})});return d&&c(d.error),a.promise}})},function(a,b){a.exports=function(a,b,c){if(!(a instanceof b))throw TypeError(c+": use the 'new' operator!");return a}},function(b,i,a){var c=a(12),d=a(112),e=a(113),f=a(20),g=a(27),h=a(114);b.exports=function(a,j,o,p){var n,b,k,l=h(a),m=c(o,p,j?2:1),i=0;if("function"!=typeof l)throw TypeError(a+" is not iterable!");if(e(l))for(n=g(a.length);n>i;i++)j?m(f(b=a[i])[0],b[1]):m(a[i]);else for(k=l.call(a);!(b=k.next()).done;)d(k,m,b.value,j)}},function(d,g,b){var c=b(20),e=b(13),f=b(31)("species");d.exports=function(g,h){var b,d=c(g).constructor;return d===a||(b=c(d)[f])==a?h:e(b)}},function(n,p,h){var b,f,g,c=h(4),o=h(141).set,k=c.MutationObserver||c.WebKitMutationObserver,d=c.process,i=c.Promise,j="process"==h(18)(d),e=function(){var e,c,g;for(j&&(e=d.domain)&&(d.domain=null,e.exit());b;)c=b.domain,g=b.fn,c&&c.enter(),g(),c&&c.exit(),b=b.next;f=a,e&&e.enter()};if(j)g=function(){d.nextTick(e)};else if(k){var m=1,l=document.createTextNode("");new k(e).observe(l,{characterData:!0}),g=function(){l.data=m=-m}}else g=i&&i.resolve?function(){i.resolve().then(e)}:function(){o.call(c,e)};n.exports=function asap(e){var c={fn:e,next:a,domain:j&&d.domain};f&&(f.next=c),b||(b=c,g()),f=c}},function(s,t,b){var c,g,f,k=b(12),r=b(19),n=b(14),p=b(15),a=b(4),l=a.process,h=a.setImmediate,i=a.clearImmediate,o=a.MessageChannel,j=0,d={},q="onreadystatechange",e=function(){var a=+this;if(d.hasOwnProperty(a)){var b=d[a];delete d[a],b()}},m=function(a){e.call(a.data)};h&&i||(h=function setImmediate(a){for(var b=[],e=1;arguments.length>e;)b.push(arguments[e++]);return d[++j]=function(){r("function"==typeof a?a:Function(a),b)},c(j),j},i=function clearImmediate(a){delete d[a]},"process"==b(18)(l)?c=function(a){l.nextTick(k(e,a,1))}:o?(g=new o,f=g.port2,g.port1.onmessage=m,c=k(f.postMessage,f,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts?(c=function(b){a.postMessage(b+"","*")},a.addEventListener("message",m,!1)):c=q in p("script")?function(a){n.appendChild(p("script"))[q]=function(){n.removeChild(this),e.call(a)}}:function(a){setTimeout(k(e,a,1),0)}),s.exports={set:h,clear:i}},function(a,d,b){var c=b(10);a.exports=function(a,b){for(var d in b)c(a,d,b[d]);return a}},function(d,e,c){var b=c(144);c(145)("Map",function(b){return function Map(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(c){var a=b.getEntry(this,c);return a&&a.v},set:function set(a,c){return b.def(this,0===a?0:a,c)}},b,!0)},function(v,w,b){var j=b(2),m=b(6),o=b(142),n=b(12),p=b(137),r=b(22),t=b(138),l=b(108),d=b(119),f=b(11)("id"),k=b(17),h=b(16),q=b(121),i=b(8),s=Object.isExtensible||h,c=i?"_s":"size",u=0,g=function(a,b){if(!h(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!k(a,f)){if(!s(a))return"F";if(!b)return"E";m(a,f,++u)}return"O"+a[f]},e=function(b,c){var a,d=g(c);if("F"!==d)return b._i[d];for(a=b._f;a;a=a.n)if(a.k==c)return a};v.exports={getConstructor:function(d,f,g,h){var b=d(function(d,e){p(d,b,f),d._i=j.create(null),d._f=a,d._l=a,d[c]=0,e!=a&&t(e,g,d[h],d)});return o(b.prototype,{clear:function clear(){for(var d=this,e=d._i,b=d._f;b;b=b.n)b.r=!0,b.p&&(b.p=b.p.n=a),delete e[b.i];d._f=d._l=a,d[c]=0},"delete":function(g){var b=this,a=e(b,g);if(a){var d=a.n,f=a.p;delete b._i[a.i],a.r=!0,f&&(f.n=d),d&&(d.p=f),b._f==a&&(b._f=d),b._l==a&&(b._l=f),b[c]--}return!!a},forEach:function forEach(c){for(var b,d=n(c,arguments.length>1?arguments[1]:a,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!e(this,a)}}),i&&j.setDesc(b.prototype,"size",{get:function(){return r(this[c])}}),b},def:function(b,f,j){var h,i,d=e(b,f);return d?d.v=j:(b._l=d={i:i=g(f,!0),k:f,v:j,p:h=b._l,n:a,r:!1},b._f||(b._f=d),h&&(h.n=d),b[c]++,"F"!==i&&(b._i[i]=d)),b},getEntry:e,setStrong:function(e,b,c){l(e,b,function(b,c){this._t=b,this._k=c,this._l=a},function(){for(var c=this,e=c._k,b=c._l;b&&b.r;)b=b.p;return c._t&&(c._l=b=b?b.n:c._t._f)?"keys"==e?d(0,b.k):"values"==e?d(0,b.v):d(0,[b.k,b.v]):(c._t=a,d(1))},c?"entries":"values",!c,!0),q(b)}}},function(l,n,b){var k=b(4),c=b(3),g=b(10),f=b(142),i=b(138),j=b(137),d=b(16),e=b(9),h=b(115),m=b(35);l.exports=function(o,v,y,x,p,l){var t=k[o],b=t,s=p?"set":"add",n=b&&b.prototype,w={},r=function(b){var c=n[b];g(n,b,"delete"==b?function(a){return l&&!d(a)?!1:c.call(this,0===a?0:a)}:"has"==b?function has(a){return l&&!d(a)?!1:c.call(this,0===a?0:a)}:"get"==b?function get(b){return l&&!d(b)?a:c.call(this,0===b?0:b)}:"add"==b?function add(a){return c.call(this,0===a?0:a),this}:function set(a,b){return c.call(this,0===a?0:a,b),this})};if("function"==typeof b&&(l||n.forEach&&!e(function(){(new b).entries().next()}))){var u,q=new b,z=q[s](l?{}:-0,1)!=q,A=e(function(){q.has(1)}),B=h(function(a){new b(a)});B||(b=v(function(e,d){j(e,b,o);var c=new t;return d!=a&&i(d,p,c[s],c),c}),b.prototype=n,n.constructor=b),l||q.forEach(function(b,a){u=1/a===-(1/0)}),(A||u)&&(r("delete"),r("has"),p&&r("get")),(u||z)&&r(s),l&&n.clear&&delete n.clear}else b=x.getConstructor(v,o,p,s),f(b.prototype,y);return m(b,o),w[o]=b,c(c.G+c.W+c.F*(b!=t),w),l||x.setStrong(b,o,p),b}},function(d,e,b){var c=b(144);b(145)("Set",function(b){return function Set(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a=0===a?0:a,a)}},c)},function(n,m,b){var l=b(2),k=b(10),c=b(148),d=b(16),j=b(17),i=c.frozenStore,h=c.WEAK,f=Object.isExtensible||d,e={},g=b(145)("WeakMap",function(b){return function WeakMap(){return b(this,arguments.length>0?arguments[0]:a)}},{get:function get(a){if(d(a)){if(!f(a))return i(this).get(a);if(j(a,h))return a[h][this._i]}},set:function set(a,b){return c.def(this,a,b)}},c,!0,!0);7!=(new g).set((Object.freeze||Object)(e),7).get(e)&&l.each.call(["delete","has","get","set"],function(a){var b=g.prototype,c=b[a];k(b,a,function(b,e){if(d(b)&&!f(b)){var g=i(this)[a](b,e);return"set"==a?this:g}return c.call(this,b,e)})})},function(s,t,b){var r=b(6),q=b(142),m=b(20),h=b(16),l=b(137),k=b(138),j=b(28),d=b(17),c=b(11)("weak"),g=Object.isExtensible||h,n=j(5),o=j(6),p=0,e=function(a){return a._l||(a._l=new i)},i=function(){this.a=[]},f=function(a,b){return n(a.a,function(a){return a[0]===b})};i.prototype={get:function(b){var a=f(this,b);return a?a[1]:void 0},has:function(a){return!!f(this,a)},set:function(a,b){var c=f(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(b){var a=o(this.a,function(a){return a[0]===b});return~a&&this.a.splice(a,1),!!~a}},s.exports={getConstructor:function(f,i,j,m){var b=f(function(c,d){l(c,b,i),c._i=p++,c._l=a,d!=a&&k(d,j,c[m],c)});return q(b.prototype,{"delete":function(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i)&&delete a[c][this._i]:e(this)["delete"](a):!1},has:function has(a){return h(a)?g(a)?d(a,c)&&d(a[c],this._i):e(this).has(a):!1}}),b},def:function(b,a,f){return g(m(a))?(d(a,c)||r(a,c,{}),a[c][b._i]=f):e(b).set(a,f),b},frozenStore:e,WEAK:c}},function(d,e,b){var c=b(148);b(145)("WeakSet",function(b){return function WeakSet(){return b(this,arguments.length>0?arguments[0]:a)}},{add:function add(a){return c.def(this,a,!0)}},c,!1,!0)},function(e,f,a){var b=a(3),c=Function.apply,d=a(20);b(b.S,"Reflect",{apply:function apply(a,b,e){return c.call(a,b,d(e))}})},function(h,i,a){var e=a(2),b=a(3),c=a(13),f=a(20),d=a(16),g=Function.bind||a(5).Function.prototype.bind;b(b.S+b.F*a(9)(function(){function F(){}return!(Reflect.construct(function(){},[],F)instanceof F)}),"Reflect",{construct:function construct(b,a){c(b),f(a);var i=arguments.length<3?b:c(arguments[2]);if(b==i){switch(a.length){case 0:return new b;case 1:return new b(a[0]);case 2:return new b(a[0],a[1]);case 3:return new b(a[0],a[1],a[2]);case 4:return new b(a[0],a[1],a[2],a[3])}var h=[null];return h.push.apply(h,a),new(g.apply(b,h))}var j=i.prototype,k=e.create(d(j)?j:Object.prototype),l=Function.apply.call(b,k,a);return d(l)?l:k}})},function(e,f,a){var c=a(2),b=a(3),d=a(20);b(b.S+b.F*a(9)(function(){Reflect.defineProperty(c.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,e){d(a);try{return c.setDesc(a,b,e),!0}catch(f){return!1}}})},function(e,f,a){var b=a(3),c=a(2).getDesc,d=a(20);b(b.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var e=c(d(a),b);return e&&!e.configurable?!1:delete a[b]}})},function(f,g,b){var c=b(3),e=b(20),d=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};b(110)(d,"Object",function(){var c,b=this,d=b._k;do if(b._i>=d.length)return{value:a,done:!0};while(!((c=d[b._i++])in b._t));return{value:c,done:!1}}),c(c.S,"Reflect",{enumerate:function enumerate(a){return new d(a)}})},function(h,i,b){function get(b,h){var d,j,i=arguments.length<3?b:arguments[2];return g(b)===i?b[h]:(d=c.getDesc(b,h))?e(d,"value")?d.value:d.get!==a?d.get.call(i):a:f(j=c.getProto(b))?get(j,h,i):void 0}var c=b(2),e=b(17),d=b(3),f=b(16),g=b(20);d(d.S,"Reflect",{get:get})},function(e,f,a){var c=a(2),b=a(3),d=a(20);b(b.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return c.getDesc(d(a),b)}})},function(e,f,a){var b=a(3),c=a(2).getProto,d=a(20);b(b.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return c(d(a))}})},function(c,d,b){var a=b(3);a(a.S,"Reflect",{has:function has(a,b){return b in a}})},function(e,f,a){var b=a(3),d=a(20),c=Object.isExtensible;b(b.S,"Reflect",{isExtensible:function isExtensible(a){return d(a),c?c(a):!0}})},function(c,d,a){var b=a(3);b(b.S,"Reflect",{ownKeys:a(161)})},function(d,f,a){var b=a(2),e=a(20),c=a(4).Reflect;d.exports=c&&c.ownKeys||function ownKeys(a){var c=b.getNames(e(a)),d=b.getSymbols;return d?c.concat(d(a)):c}},function(e,f,a){var b=a(3),d=a(20),c=Object.preventExtensions;b(b.S,"Reflect",{preventExtensions:function preventExtensions(a){d(a);try{return c&&c(a),!0}catch(b){return!1}}})},function(i,j,b){function set(j,i,k){var l,m,d=arguments.length<4?j:arguments[3],b=c.getDesc(h(j),i);if(!b){if(f(m=c.getProto(j)))return set(m,i,k,d);b=e(0)}return g(b,"value")?b.writable!==!1&&f(d)?(l=c.getDesc(d,i)||e(0),l.value=k,c.setDesc(d,i,l),!0):!1:b.set===a?!1:(b.set.call(d,k),!0)}var c=b(2),g=b(17),d=b(3),e=b(7),h=b(20),f=b(16);d(d.S,"Reflect",{set:set})},function(d,e,b){var c=b(3),a=b(45);a&&c(c.S,"Reflect",{setPrototypeOf:function setPrototypeOf(b,c){a.check(b,c);try{return a.set(b,c),!0}catch(d){return!1}}})},function(e,f,b){var c=b(3),d=b(33)(!0);c(c.P,"Array",{includes:function includes(b){return d(this,b,arguments.length>1?arguments[1]:a)}}),b(118)("includes")},function(d,e,a){var b=a(3),c=a(98)(!0);b(b.P,"String",{at:function at(a){return c(this,a)}})},function(e,f,b){var c=b(3),d=b(168);c(c.P,"String",{padLeft:function padLeft(b){return d(this,b,arguments.length>1?arguments[1]:a,!0)}})},function(c,g,b){var d=b(27),e=b(105),f=b(22);c.exports=function(l,m,i,n){var c=String(f(l)),j=c.length,g=i===a?" ":String(i),k=d(m);if(j>=k)return c;""==g&&(g=" ");var h=k-j,b=e.call(g,Math.ceil(h/g.length));return b.length>h&&(b=b.slice(0,h)),n?b+c:c+b}},function(e,f,b){var c=b(3),d=b(168);c(c.P,"String",{padRight:function padRight(b){return d(this,b,arguments.length>1?arguments[1]:a,!1)}})},function(b,c,a){a(63)("trimLeft",function(a){return function trimLeft(){return a(this,1)}})},function(b,c,a){a(63)("trimRight",function(a){return function trimRight(){return a(this,2)}})},function(d,e,a){var b=a(3),c=a(173)(/[\\^$*+?.()|[\]{}]/g,"\\$&");b(b.S,"RegExp",{escape:function escape(a){return c(a)}})},function(a,b){a.exports=function(b,a){var c=a===Object(a)?function(b){return a[b]}:a;return function(a){return String(a).replace(b,c)}}},function(g,h,a){var b=a(2),c=a(3),d=a(161),e=a(23),f=a(7);c(c.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(k){for(var a,g,h=e(k),l=b.setDesc,m=b.getDesc,i=d(h),c={},j=0;i.length>j;)g=m(h,a=i[j++]),a in c?l(c,a,f(0,g)):c[a]=g;return c}})},function(d,e,a){var b=a(3),c=a(176)(!1);b(b.S,"Object",{values:function values(a){return c(a)}})},function(c,f,a){var b=a(2),d=a(23),e=b.isEnum;c.exports=function(a){return function(j){for(var c,f=d(j),g=b.getKeys(f),k=g.length,h=0,i=[];k>h;)e.call(f,c=g[h++])&&i.push(a?[c,f[c]]:f[c]);return i}}},function(d,e,a){var b=a(3),c=a(176)(!0);b(b.S,"Object",{entries:function entries(a){return c(a)}})},function(c,d,a){var b=a(3);b(b.P,"Map",{toJSON:a(179)("Map")})},function(b,e,a){var c=a(138),d=a(47);b.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");var b=[];return c(this,!1,b.push,b),b}}},function(c,d,a){var b=a(3);b(b.P,"Set",{toJSON:a(179)("Set")})},function(d,e,b){var a=b(3),c=b(141);a(a.G+a.B,{setImmediate:c.set,clearImmediate:c.clear})},function(l,k,a){a(117);var g=a(4),j=a(6),c=a(109),b=a(31)("iterator"),h=g.NodeList,i=g.HTMLCollection,e=h&&h.prototype,d=i&&i.prototype,f=c.NodeList=c.HTMLCollection=c.Array;e&&!e[b]&&j(e,b,f),d&&!d[b]&&j(d,b,f)},function(i,j,a){var c=a(4),b=a(3),g=a(19),h=a(184),d=c.navigator,e=!!d&&/MSIE .\./.test(d.userAgent),f=function(a){return e?function(b,c){return a(g(h,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};b(b.G+b.B+b.F*e,{setTimeout:f(c.setTimeout),setInterval:f(c.setInterval)})},function(c,f,a){var d=a(185),b=a(19),e=a(13);c.exports=function(){for(var h=e(this),a=arguments.length,c=Array(a),f=0,i=d._,g=!1;a>f;)(c[f]=arguments[f++])===i&&(g=!0);return function(){var d,k=this,f=arguments,l=f.length,e=0,j=0;if(!g&&!l)return b(h,c,k);if(d=c.slice(),g)for(;a>e;e++)d[e]===i&&(d[e]=f[j++]);for(;l>j;)d.push(f[j++]);return b(h,d,k)}}},function(a,c,b){a.exports=b(4)},function(i,j,b){var g=b(2),e=b(3),h=b(12),f=b(5).Array||Array,c={},d=function(d,b){g.each.call(d.split(","),function(d){b==a&&d in f?c[d]=f[d]:d in[]&&(c[d]=h(Function.call,[][d],b))})};d("pop,reverse,shift,keys,values,entries",1),d("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),d("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),e(e.S,"Array",c)}]),"undefined"!=typeof module&&module.exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):c.core=b}(1,1);
//# sourceMappingURL=shim.min.js.map \ No newline at end of file
diff --git a/node_modules/core-js/client/shim.min.js.map b/node_modules/core-js/client/shim.min.js.map
index dc5895617..60b23fa27 100644
--- a/node_modules/core-js/client/shim.min.js.map
+++ b/node_modules/core-js/client/shim.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["shim.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"shim.min.js"} \ No newline at end of file
+{"version":3,"sources":["shim.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","IE8_DOM_DEFINE","$","$export","DESCRIPTORS","createDesc","html","cel","has","cof","invoke","fails","anObject","aFunction","isObject","toObject","toIObject","toInteger","toIndex","toLength","IObject","IE_PROTO","createArrayMethod","arrayIndexOf","ObjectProto","Object","prototype","ArrayProto","Array","arraySlice","slice","arrayJoin","join","defineProperty","setDesc","getOwnDescriptor","getDesc","defineProperties","setDescs","factories","get","a","O","P","Attributes","e","TypeError","value","propertyIsEnumerable","Properties","keys","getKeys","length","i","S","F","getOwnPropertyDescriptor","keys1","split","keys2","concat","keysLen1","createDict","iframeDocument","iframe","gt","style","display","appendChild","src","contentWindow","document","open","write","close","createGetKeys","names","object","key","result","push","Empty","getPrototypeOf","getProto","constructor","getOwnPropertyNames","getNames","create","construct","len","args","n","Function","bind","that","fn","this","partArgs","arguments","bound","begin","end","klass","start","upTo","size","cloned","charAt","separator","isArray","createArrayReduce","isRight","callbackfn","memo","index","methodize","$fn","arg1","forEach","each","map","filter","some","every","reduce","reduceRight","indexOf","lastIndexOf","el","fromIndex","Math","min","now","Date","lz","num","toISOString","NaN","isFinite","RangeError","d","y","getUTCFullYear","getUTCMilliseconds","s","abs","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$Object","isEnum","getSymbols","getOwnPropertySymbols","global","core","hide","redefine","ctx","PROTOTYPE","type","name","source","own","out","exp","IS_FORCED","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","W","window","self","version","bitmap","enumerable","configurable","writable","exec","SRC","TO_STRING","$toString","TPL","inspectSource","it","val","safe","hasOwnProperty","String","toString","px","random","b","apply","documentElement","is","createElement","un","defined","ceil","floor","isNaN","max","asc","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$this","res","f","SPECIES","original","C","arg","store","uid","Symbol","SHARED","IS_INCLUDES","$fails","shared","setToStringTag","wks","keyOf","$names","enumKeys","_create","$Symbol","$JSON","JSON","_stringify","stringify","setter","HIDDEN","SymbolRegistry","AllSymbols","useNative","setSymbolDesc","D","protoDesc","wrap","tag","sym","_k","set","isSymbol","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","$stringify","replacer","$replacer","$$","buggyJSON","symbolStatics","for","keyFor","useSetter","useSimple","def","TAG","stat","windowNames","getWindowNames","symbols","assign","A","K","k","T","$$len","j","x","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","callee","$freeze","freeze","KEY","$seal","seal","$preventExtensions","preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","isExtensible","$getPrototypeOf","$keys","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","toPrimitive","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","code","digits","parseInt","Number","valueOf","spaces","space","non","ltrim","RegExp","rtrim","exporter","string","replace","EPSILON","pow","_isFinite","isInteger","number","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","parseFloat","log1p","sqrt","$acosh","acosh","MAX_VALUE","log","LN2","asinh","atanh","sign","cbrt","clz32","LOG2E","cosh","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","Infinity","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","search","isRegExp","MATCH","re","INCLUDES","includes","repeat","count","str","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","LIBRARY","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","IteratorPrototype","descriptor","isArrayIter","getIterFn","iter","from","arrayLike","step","iterator","mapfn","mapping","iterFn","ret","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","addToUnscopables","Arguments","UNSCOPABLES","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","$flags","$RegExp","re1","re2","CORRECT_NEW","piRE","fiU","ignoreCase","multiline","unicode","sticky","flags","regexp","SYMBOL","REPLACE","$replace","searchValue","replaceValue","SEARCH","SPLIT","$split","limit","Wrapper","strictNew","forOf","setProto","same","speciesConstructor","asap","PROMISE","process","isNode","empty","testResolve","sub","promise","resolve","USE_NATIVE","P2","works","then","thenableThenGotten","sameConstructor","getConstructor","isThenable","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","record","isReject","chain","v","ok","run","reaction","handler","fail","h","setTimeout","console","isUnhandled","emit","onunhandledrejection","reason","_d","$reject","r","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","capability","all","iterable","abrupt","remaining","results","alreadyCalled","race","head","last","macrotask","Observer","MutationObserver","WebKitMutationObserver","flush","parent","domain","exit","enter","nextTick","toggle","node","createTextNode","observe","characterData","data","task","defer","channel","port","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listner","event","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","clear","strong","Map","entry","getEntry","redefineAll","$iterDefine","ID","$has","setSpecies","SIZE","fastKey","_f","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","BUGGY_ZERO","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","Set","weak","frozenStore","WEAK","tmp","$WeakMap","WeakMap","method","arrayFind","arrayFindIndex","FrozenStore","findFrozen","splice","WeakSet","_apply","thisArgument","argumentsList","Reflect","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","ownKeys","V","existingDescriptor","ownDesc","$includes","at","$pad","padLeft","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padRight","trimLeft","trimRight","$re","escape","regExp","part","getOwnPropertyDescriptors","$values","isEntries","$entries","toJSON","$task","NL","NodeList","HTC","HTMLCollection","NLProto","HTCProto","ArrayValues","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","_","holder","$ctx","$Array","statics","setStatics","define","amd"],"mappings":"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","file":"shim.min.js"} \ No newline at end of file
diff --git a/node_modules/core-js/core/_.js b/node_modules/core-js/core/_.js
index 8a99f7062..475a66cdf 100644
--- a/node_modules/core-js/core/_.js
+++ b/node_modules/core-js/core/_.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core')._; \ No newline at end of file
+module.exports = require('../modules/$.core')._; \ No newline at end of file
diff --git a/node_modules/core-js/core/delay.js b/node_modules/core-js/core/delay.js
index 188573884..1ff9a56d5 100644
--- a/node_modules/core-js/core/delay.js
+++ b/node_modules/core-js/core/delay.js
@@ -1,2 +1,2 @@
require('../modules/core.delay');
-module.exports = require('../modules/_core').delay;
+module.exports = require('../modules/$.core').delay;
diff --git a/node_modules/core-js/core/dict.js b/node_modules/core-js/core/dict.js
index da84a8d88..ed848e2c2 100644
--- a/node_modules/core-js/core/dict.js
+++ b/node_modules/core-js/core/dict.js
@@ -1,2 +1,2 @@
require('../modules/core.dict');
-module.exports = require('../modules/_core').Dict; \ No newline at end of file
+module.exports = require('../modules/$.core').Dict; \ No newline at end of file
diff --git a/node_modules/core-js/core/function.js b/node_modules/core-js/core/function.js
index 3b8d01317..42b6dbb84 100644
--- a/node_modules/core-js/core/function.js
+++ b/node_modules/core-js/core/function.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core').Function;
+module.exports = require('../modules/$.core').Function;
diff --git a/node_modules/core-js/core/index.js b/node_modules/core-js/core/index.js
index 2b20fd9ec..3d50bdb63 100644
--- a/node_modules/core-js/core/index.js
+++ b/node_modules/core-js/core/index.js
@@ -9,7 +9,7 @@ require('../modules/core.object.classof');
require('../modules/core.object.define');
require('../modules/core.object.make');
require('../modules/core.number.iterator');
-require('../modules/core.regexp.escape');
require('../modules/core.string.escape-html');
require('../modules/core.string.unescape-html');
-module.exports = require('../modules/_core');
+require('../modules/core.log');
+module.exports = require('../modules/$.core');
diff --git a/node_modules/core-js/core/number.js b/node_modules/core-js/core/number.js
index 62f632c51..6e3cdbf6f 100644
--- a/node_modules/core-js/core/number.js
+++ b/node_modules/core-js/core/number.js
@@ -1,2 +1,2 @@
require('../modules/core.number.iterator');
-module.exports = require('../modules/_core').Number; \ No newline at end of file
+module.exports = require('../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/core/object.js b/node_modules/core-js/core/object.js
index 04e539c90..63325663a 100644
--- a/node_modules/core-js/core/object.js
+++ b/node_modules/core-js/core/object.js
@@ -2,4 +2,4 @@ require('../modules/core.object.is-object');
require('../modules/core.object.classof');
require('../modules/core.object.define');
require('../modules/core.object.make');
-module.exports = require('../modules/_core').Object;
+module.exports = require('../modules/$.core').Object;
diff --git a/node_modules/core-js/core/regexp.js b/node_modules/core-js/core/regexp.js
deleted file mode 100644
index 3e04c5119..000000000
--- a/node_modules/core-js/core/regexp.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/core.regexp.escape');
-module.exports = require('../modules/_core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/core/string.js b/node_modules/core-js/core/string.js
index 8da740c6e..829e0c61e 100644
--- a/node_modules/core-js/core/string.js
+++ b/node_modules/core-js/core/string.js
@@ -1,3 +1,3 @@
require('../modules/core.string.escape-html');
require('../modules/core.string.unescape-html');
-module.exports = require('../modules/_core').String; \ No newline at end of file
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/es5/index.js b/node_modules/core-js/es5/index.js
index 580f1a670..3c23364a8 100644
--- a/node_modules/core-js/es5/index.js
+++ b/node_modules/core-js/es5/index.js
@@ -1,37 +1,9 @@
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es5');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.function.bind');
-require('../modules/es6.array.is-array');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-json');
-require('../modules/es6.parse-int');
-require('../modules/es6.parse-float');
require('../modules/es6.string.trim');
-require('../modules/es6.regexp.to-string');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/es6/array.js b/node_modules/core-js/es6/array.js
index 428d3e8c4..36629ca04 100644
--- a/node_modules/core-js/es6/array.js
+++ b/node_modules/core-js/es6/array.js
@@ -1,23 +1,10 @@
require('../modules/es6.string.iterator');
-require('../modules/es6.array.is-array');
require('../modules/es6.array.from');
require('../modules/es6.array.of');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
+require('../modules/es6.array.species');
+require('../modules/es6.array.iterator');
require('../modules/es6.array.copy-within');
require('../modules/es6.array.fill');
require('../modules/es6.array.find');
require('../modules/es6.array.find-index');
-require('../modules/es6.array.species');
-require('../modules/es6.array.iterator');
-module.exports = require('../modules/_core').Array; \ No newline at end of file
+module.exports = require('../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/es6/date.js b/node_modules/core-js/es6/date.js
deleted file mode 100644
index dfa3be09d..000000000
--- a/node_modules/core-js/es6/date.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-json');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-string');
-require('../modules/es6.date.to-primitive');
-module.exports = Date; \ No newline at end of file
diff --git a/node_modules/core-js/es6/function.js b/node_modules/core-js/es6/function.js
index ff685da27..3e61dcd46 100644
--- a/node_modules/core-js/es6/function.js
+++ b/node_modules/core-js/es6/function.js
@@ -1,4 +1,3 @@
-require('../modules/es6.function.bind');
require('../modules/es6.function.name');
require('../modules/es6.function.has-instance');
-module.exports = require('../modules/_core').Function; \ No newline at end of file
+module.exports = require('../modules/$.core').Function; \ No newline at end of file
diff --git a/node_modules/core-js/es6/index.js b/node_modules/core-js/es6/index.js
index 59df50921..b9fc80be6 100644
--- a/node_modules/core-js/es6/index.js
+++ b/node_modules/core-js/es6/index.js
@@ -1,29 +1,21 @@
require('../modules/es6.symbol');
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es6.object.assign');
+require('../modules/es6.object.is');
+require('../modules/es6.object.set-prototype-of');
+require('../modules/es6.object.to-string');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.object.assign');
-require('../modules/es6.object.is');
-require('../modules/es6.object.set-prototype-of');
-require('../modules/es6.object.to-string');
-require('../modules/es6.function.bind');
+require('../modules/es6.object.get-own-property-descriptor');
+require('../modules/es6.object.get-prototype-of');
+require('../modules/es6.object.keys');
+require('../modules/es6.object.get-own-property-names');
require('../modules/es6.function.name');
require('../modules/es6.function.has-instance');
-require('../modules/es6.parse-int');
-require('../modules/es6.parse-float');
require('../modules/es6.number.constructor');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
require('../modules/es6.number.epsilon');
require('../modules/es6.number.is-finite');
require('../modules/es6.number.is-integer');
@@ -59,47 +51,15 @@ require('../modules/es6.string.ends-with');
require('../modules/es6.string.includes');
require('../modules/es6.string.repeat');
require('../modules/es6.string.starts-with');
-require('../modules/es6.string.anchor');
-require('../modules/es6.string.big');
-require('../modules/es6.string.blink');
-require('../modules/es6.string.bold');
-require('../modules/es6.string.fixed');
-require('../modules/es6.string.fontcolor');
-require('../modules/es6.string.fontsize');
-require('../modules/es6.string.italics');
-require('../modules/es6.string.link');
-require('../modules/es6.string.small');
-require('../modules/es6.string.strike');
-require('../modules/es6.string.sub');
-require('../modules/es6.string.sup');
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-json');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-string');
-require('../modules/es6.date.to-primitive');
-require('../modules/es6.array.is-array');
require('../modules/es6.array.from');
require('../modules/es6.array.of');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
+require('../modules/es6.array.species');
+require('../modules/es6.array.iterator');
require('../modules/es6.array.copy-within');
require('../modules/es6.array.fill');
require('../modules/es6.array.find');
require('../modules/es6.array.find-index');
-require('../modules/es6.array.species');
-require('../modules/es6.array.iterator');
require('../modules/es6.regexp.constructor');
-require('../modules/es6.regexp.to-string');
require('../modules/es6.regexp.flags');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
@@ -110,17 +70,6 @@ require('../modules/es6.map');
require('../modules/es6.set');
require('../modules/es6.weak-map');
require('../modules/es6.weak-set');
-require('../modules/es6.typed.array-buffer');
-require('../modules/es6.typed.data-view');
-require('../modules/es6.typed.int8-array');
-require('../modules/es6.typed.uint8-array');
-require('../modules/es6.typed.uint8-clamped-array');
-require('../modules/es6.typed.int16-array');
-require('../modules/es6.typed.uint16-array');
-require('../modules/es6.typed.int32-array');
-require('../modules/es6.typed.uint32-array');
-require('../modules/es6.typed.float32-array');
-require('../modules/es6.typed.float64-array');
require('../modules/es6.reflect.apply');
require('../modules/es6.reflect.construct');
require('../modules/es6.reflect.define-property');
@@ -135,4 +84,4 @@ require('../modules/es6.reflect.own-keys');
require('../modules/es6.reflect.prevent-extensions');
require('../modules/es6.reflect.set');
require('../modules/es6.reflect.set-prototype-of');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/es6/map.js b/node_modules/core-js/es6/map.js
index 50f04c1f2..521a192e4 100644
--- a/node_modules/core-js/es6/map.js
+++ b/node_modules/core-js/es6/map.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.map');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/es6/math.js b/node_modules/core-js/es6/math.js
index f26b5b296..8b5a2e799 100644
--- a/node_modules/core-js/es6/math.js
+++ b/node_modules/core-js/es6/math.js
@@ -15,4 +15,4 @@ require('../modules/es6.math.sign');
require('../modules/es6.math.sinh');
require('../modules/es6.math.tanh');
require('../modules/es6.math.trunc');
-module.exports = require('../modules/_core').Math; \ No newline at end of file
+module.exports = require('../modules/$.core').Math; \ No newline at end of file
diff --git a/node_modules/core-js/es6/number.js b/node_modules/core-js/es6/number.js
index 1dafcda43..8f4877031 100644
--- a/node_modules/core-js/es6/number.js
+++ b/node_modules/core-js/es6/number.js
@@ -1,6 +1,4 @@
require('../modules/es6.number.constructor');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
require('../modules/es6.number.epsilon');
require('../modules/es6.number.is-finite');
require('../modules/es6.number.is-integer');
@@ -10,4 +8,4 @@ require('../modules/es6.number.max-safe-integer');
require('../modules/es6.number.min-safe-integer');
require('../modules/es6.number.parse-float');
require('../modules/es6.number.parse-int');
-module.exports = require('../modules/_core').Number; \ No newline at end of file
+module.exports = require('../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/es6/object.js b/node_modules/core-js/es6/object.js
index aada8c38f..94af189f5 100644
--- a/node_modules/core-js/es6/object.js
+++ b/node_modules/core-js/es6/object.js
@@ -1,20 +1,17 @@
require('../modules/es6.symbol');
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es6.object.assign');
+require('../modules/es6.object.is');
+require('../modules/es6.object.set-prototype-of');
+require('../modules/es6.object.to-string');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.object.assign');
-require('../modules/es6.object.is');
-require('../modules/es6.object.set-prototype-of');
-require('../modules/es6.object.to-string');
+require('../modules/es6.object.get-own-property-descriptor');
+require('../modules/es6.object.get-prototype-of');
+require('../modules/es6.object.keys');
+require('../modules/es6.object.get-own-property-names');
-module.exports = require('../modules/_core').Object; \ No newline at end of file
+module.exports = require('../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/es6/parse-float.js b/node_modules/core-js/es6/parse-float.js
deleted file mode 100644
index dad94ddbe..000000000
--- a/node_modules/core-js/es6/parse-float.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-float');
-module.exports = require('../modules/_core').parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/es6/parse-int.js b/node_modules/core-js/es6/parse-int.js
deleted file mode 100644
index 08a20996b..000000000
--- a/node_modules/core-js/es6/parse-int.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-int');
-module.exports = require('../modules/_core').parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/es6/promise.js b/node_modules/core-js/es6/promise.js
index c901c8595..0a0996139 100644
--- a/node_modules/core-js/es6/promise.js
+++ b/node_modules/core-js/es6/promise.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.promise');
-module.exports = require('../modules/_core').Promise; \ No newline at end of file
+module.exports = require('../modules/$.core').Promise; \ No newline at end of file
diff --git a/node_modules/core-js/es6/reflect.js b/node_modules/core-js/es6/reflect.js
index 18bdb3c2e..3c2f74eb8 100644
--- a/node_modules/core-js/es6/reflect.js
+++ b/node_modules/core-js/es6/reflect.js
@@ -12,4 +12,4 @@ require('../modules/es6.reflect.own-keys');
require('../modules/es6.reflect.prevent-extensions');
require('../modules/es6.reflect.set');
require('../modules/es6.reflect.set-prototype-of');
-module.exports = require('../modules/_core').Reflect; \ No newline at end of file
+module.exports = require('../modules/$.core').Reflect; \ No newline at end of file
diff --git a/node_modules/core-js/es6/regexp.js b/node_modules/core-js/es6/regexp.js
index 27cc827f9..195d36d43 100644
--- a/node_modules/core-js/es6/regexp.js
+++ b/node_modules/core-js/es6/regexp.js
@@ -1,8 +1,7 @@
require('../modules/es6.regexp.constructor');
-require('../modules/es6.regexp.to-string');
require('../modules/es6.regexp.flags');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
require('../modules/es6.regexp.search');
require('../modules/es6.regexp.split');
-module.exports = require('../modules/_core').RegExp; \ No newline at end of file
+module.exports = require('../modules/$.core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/es6/set.js b/node_modules/core-js/es6/set.js
index 2a2557ced..6a84f5891 100644
--- a/node_modules/core-js/es6/set.js
+++ b/node_modules/core-js/es6/set.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.set');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/es6/string.js b/node_modules/core-js/es6/string.js
index 83033621f..bc7a1ab10 100644
--- a/node_modules/core-js/es6/string.js
+++ b/node_modules/core-js/es6/string.js
@@ -7,21 +7,8 @@ require('../modules/es6.string.ends-with');
require('../modules/es6.string.includes');
require('../modules/es6.string.repeat');
require('../modules/es6.string.starts-with');
-require('../modules/es6.string.anchor');
-require('../modules/es6.string.big');
-require('../modules/es6.string.blink');
-require('../modules/es6.string.bold');
-require('../modules/es6.string.fixed');
-require('../modules/es6.string.fontcolor');
-require('../modules/es6.string.fontsize');
-require('../modules/es6.string.italics');
-require('../modules/es6.string.link');
-require('../modules/es6.string.small');
-require('../modules/es6.string.strike');
-require('../modules/es6.string.sub');
-require('../modules/es6.string.sup');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
require('../modules/es6.regexp.search');
require('../modules/es6.regexp.split');
-module.exports = require('../modules/_core').String; \ No newline at end of file
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/es6/symbol.js b/node_modules/core-js/es6/symbol.js
index e578e3af3..ae2405b51 100644
--- a/node_modules/core-js/es6/symbol.js
+++ b/node_modules/core-js/es6/symbol.js
@@ -1,3 +1,3 @@
require('../modules/es6.symbol');
require('../modules/es6.object.to-string');
-module.exports = require('../modules/_core').Symbol; \ No newline at end of file
+module.exports = require('../modules/$.core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/es6/typed.js b/node_modules/core-js/es6/typed.js
deleted file mode 100644
index e0364e6c8..000000000
--- a/node_modules/core-js/es6/typed.js
+++ /dev/null
@@ -1,13 +0,0 @@
-require('../modules/es6.typed.array-buffer');
-require('../modules/es6.typed.data-view');
-require('../modules/es6.typed.int8-array');
-require('../modules/es6.typed.uint8-array');
-require('../modules/es6.typed.uint8-clamped-array');
-require('../modules/es6.typed.int16-array');
-require('../modules/es6.typed.uint16-array');
-require('../modules/es6.typed.int32-array');
-require('../modules/es6.typed.uint32-array');
-require('../modules/es6.typed.float32-array');
-require('../modules/es6.typed.float64-array');
-require('../modules/es6.object.to-string');
-module.exports = require('../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/es6/weak-map.js b/node_modules/core-js/es6/weak-map.js
index 655866c2d..f2c6db892 100644
--- a/node_modules/core-js/es6/weak-map.js
+++ b/node_modules/core-js/es6/weak-map.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/es6.array.iterator');
require('../modules/es6.weak-map');
-module.exports = require('../modules/_core').WeakMap; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakMap; \ No newline at end of file
diff --git a/node_modules/core-js/es6/weak-set.js b/node_modules/core-js/es6/weak-set.js
index eef1af2a8..a058c8a6a 100644
--- a/node_modules/core-js/es6/weak-set.js
+++ b/node_modules/core-js/es6/weak-set.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-set');
-module.exports = require('../modules/_core').WeakSet; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakSet; \ No newline at end of file
diff --git a/node_modules/core-js/es7/array.js b/node_modules/core-js/es7/array.js
index 9fb57fa64..e58f90579 100644
--- a/node_modules/core-js/es7/array.js
+++ b/node_modules/core-js/es7/array.js
@@ -1,2 +1,2 @@
require('../modules/es7.array.includes');
-module.exports = require('../modules/_core').Array; \ No newline at end of file
+module.exports = require('../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/es7/asap.js b/node_modules/core-js/es7/asap.js
deleted file mode 100644
index cc90f7e54..000000000
--- a/node_modules/core-js/es7/asap.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.asap');
-module.exports = require('../modules/_core').asap;
diff --git a/node_modules/core-js/es7/error.js b/node_modules/core-js/es7/error.js
deleted file mode 100644
index f0bb260b5..000000000
--- a/node_modules/core-js/es7/error.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.error.is-error');
-module.exports = require('../modules/_core').Error; \ No newline at end of file
diff --git a/node_modules/core-js/es7/index.js b/node_modules/core-js/es7/index.js
index b8c90b86e..a277b6398 100644
--- a/node_modules/core-js/es7/index.js
+++ b/node_modules/core-js/es7/index.js
@@ -1,36 +1,13 @@
require('../modules/es7.array.includes');
require('../modules/es7.string.at');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
+require('../modules/es7.string.pad-left');
+require('../modules/es7.string.pad-right');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-require('../modules/es7.symbol.async-iterator');
-require('../modules/es7.symbol.observable');
+require('../modules/es7.regexp.escape');
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
require('../modules/es7.map.to-json');
require('../modules/es7.set.to-json');
-require('../modules/es7.system.global');
-require('../modules/es7.error.is-error');
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-require('../modules/es7.asap');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core');
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/es7/map.js b/node_modules/core-js/es7/map.js
index dfa32fd26..fe5199928 100644
--- a/node_modules/core-js/es7/map.js
+++ b/node_modules/core-js/es7/map.js
@@ -1,2 +1,2 @@
require('../modules/es7.map.to-json');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/es7/math.js b/node_modules/core-js/es7/math.js
deleted file mode 100644
index bdb8a81c3..000000000
--- a/node_modules/core-js/es7/math.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-module.exports = require('../modules/_core').Math;
diff --git a/node_modules/core-js/es7/object.js b/node_modules/core-js/es7/object.js
index c76b754d4..b05853031 100644
--- a/node_modules/core-js/es7/object.js
+++ b/node_modules/core-js/es7/object.js
@@ -1,8 +1,4 @@
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
-module.exports = require('../modules/_core').Object; \ No newline at end of file
+module.exports = require('../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/es7/observable.js b/node_modules/core-js/es7/observable.js
deleted file mode 100644
index 05ca51a37..000000000
--- a/node_modules/core-js/es7/observable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-require('../modules/es6.object.to-string');
-require('../modules/es6.string.iterator');
-require('../modules/web.dom.iterable');
-require('../modules/es6.promise');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core').Observable; \ No newline at end of file
diff --git a/node_modules/core-js/es7/reflect.js b/node_modules/core-js/es7/reflect.js
deleted file mode 100644
index f0b69cbb2..000000000
--- a/node_modules/core-js/es7/reflect.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-module.exports = require('../modules/_core').Reflect;
diff --git a/node_modules/core-js/es7/set.js b/node_modules/core-js/es7/set.js
index b5c19c44f..16e945283 100644
--- a/node_modules/core-js/es7/set.js
+++ b/node_modules/core-js/es7/set.js
@@ -1,2 +1,2 @@
require('../modules/es7.set.to-json');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/es7/string.js b/node_modules/core-js/es7/string.js
index 6e413b4c2..bca0886ce 100644
--- a/node_modules/core-js/es7/string.js
+++ b/node_modules/core-js/es7/string.js
@@ -1,7 +1,6 @@
require('../modules/es7.string.at');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
+require('../modules/es7.string.pad-left');
+require('../modules/es7.string.pad-right');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-module.exports = require('../modules/_core').String;
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/es7/symbol.js b/node_modules/core-js/es7/symbol.js
deleted file mode 100644
index 14d90eec7..000000000
--- a/node_modules/core-js/es7/symbol.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../modules/es7.symbol.async-iterator');
-require('../modules/es7.symbol.observable');
-module.exports = require('../modules/_core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/es7/system.js b/node_modules/core-js/es7/system.js
deleted file mode 100644
index 6d321c780..000000000
--- a/node_modules/core-js/es7/system.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.system.global');
-module.exports = require('../modules/_core').System; \ No newline at end of file
diff --git a/node_modules/core-js/fn/_.js b/node_modules/core-js/fn/_.js
index 8a99f7062..475a66cdf 100644
--- a/node_modules/core-js/fn/_.js
+++ b/node_modules/core-js/fn/_.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core')._; \ No newline at end of file
+module.exports = require('../modules/$.core')._; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/concat.js b/node_modules/core-js/fn/array/concat.js
index de4bddf96..176ecffeb 100644
--- a/node_modules/core-js/fn/array/concat.js
+++ b/node_modules/core-js/fn/array/concat.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.concat, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.concat; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/copy-within.js b/node_modules/core-js/fn/array/copy-within.js
index 89e1de4ff..8a0113193 100644
--- a/node_modules/core-js/fn/array/copy-within.js
+++ b/node_modules/core-js/fn/array/copy-within.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.copy-within');
-module.exports = require('../../modules/_core').Array.copyWithin; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.copyWithin; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/entries.js b/node_modules/core-js/fn/array/entries.js
index f4feb26c2..bcdbc33f2 100644
--- a/node_modules/core-js/fn/array/entries.js
+++ b/node_modules/core-js/fn/array/entries.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.entries; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.entries; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/every.js b/node_modules/core-js/fn/array/every.js
index 168844cc5..0c7d0b7e2 100644
--- a/node_modules/core-js/fn/array/every.js
+++ b/node_modules/core-js/fn/array/every.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.every');
-module.exports = require('../../modules/_core').Array.every; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.every; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/fill.js b/node_modules/core-js/fn/array/fill.js
index b23ebfdee..f53621202 100644
--- a/node_modules/core-js/fn/array/fill.js
+++ b/node_modules/core-js/fn/array/fill.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.fill');
-module.exports = require('../../modules/_core').Array.fill; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.fill; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/filter.js b/node_modules/core-js/fn/array/filter.js
index 0023f0de0..3f5b17ffe 100644
--- a/node_modules/core-js/fn/array/filter.js
+++ b/node_modules/core-js/fn/array/filter.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.filter');
-module.exports = require('../../modules/_core').Array.filter; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.filter; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/find-index.js b/node_modules/core-js/fn/array/find-index.js
index 99e6bf17b..7ec6cf7a8 100644
--- a/node_modules/core-js/fn/array/find-index.js
+++ b/node_modules/core-js/fn/array/find-index.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.find-index');
-module.exports = require('../../modules/_core').Array.findIndex; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.findIndex; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/find.js b/node_modules/core-js/fn/array/find.js
index f146ec224..9c3a6b31f 100644
--- a/node_modules/core-js/fn/array/find.js
+++ b/node_modules/core-js/fn/array/find.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.find');
-module.exports = require('../../modules/_core').Array.find; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.find; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/for-each.js b/node_modules/core-js/fn/array/for-each.js
index 09e235f95..b2e79f0b1 100644
--- a/node_modules/core-js/fn/array/for-each.js
+++ b/node_modules/core-js/fn/array/for-each.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.for-each');
-module.exports = require('../../modules/_core').Array.forEach; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.forEach; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/from.js b/node_modules/core-js/fn/array/from.js
index 1f323fbc3..f0483ccf4 100644
--- a/node_modules/core-js/fn/array/from.js
+++ b/node_modules/core-js/fn/array/from.js
@@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/es6.array.from');
-module.exports = require('../../modules/_core').Array.from; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.from; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/includes.js b/node_modules/core-js/fn/array/includes.js
index 851d31fd1..420c8318f 100644
--- a/node_modules/core-js/fn/array/includes.js
+++ b/node_modules/core-js/fn/array/includes.js
@@ -1,2 +1,2 @@
require('../../modules/es7.array.includes');
-module.exports = require('../../modules/_core').Array.includes; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.includes; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/index-of.js b/node_modules/core-js/fn/array/index-of.js
index 9ed824727..9f2cd14b6 100644
--- a/node_modules/core-js/fn/array/index-of.js
+++ b/node_modules/core-js/fn/array/index-of.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.index-of');
-module.exports = require('../../modules/_core').Array.indexOf; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.indexOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/index.js b/node_modules/core-js/fn/array/index.js
index 85bc77bc8..2707be211 100644
--- a/node_modules/core-js/fn/array/index.js
+++ b/node_modules/core-js/fn/array/index.js
@@ -1,24 +1,12 @@
require('../../modules/es6.string.iterator');
-require('../../modules/es6.array.is-array');
require('../../modules/es6.array.from');
require('../../modules/es6.array.of');
-require('../../modules/es6.array.join');
-require('../../modules/es6.array.slice');
-require('../../modules/es6.array.sort');
-require('../../modules/es6.array.for-each');
-require('../../modules/es6.array.map');
-require('../../modules/es6.array.filter');
-require('../../modules/es6.array.some');
-require('../../modules/es6.array.every');
-require('../../modules/es6.array.reduce');
-require('../../modules/es6.array.reduce-right');
-require('../../modules/es6.array.index-of');
-require('../../modules/es6.array.last-index-of');
+require('../../modules/es6.array.species');
+require('../../modules/es6.array.iterator');
require('../../modules/es6.array.copy-within');
require('../../modules/es6.array.fill');
require('../../modules/es6.array.find');
require('../../modules/es6.array.find-index');
-require('../../modules/es6.array.species');
-require('../../modules/es6.array.iterator');
require('../../modules/es7.array.includes');
-module.exports = require('../../modules/_core').Array; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/is-array.js b/node_modules/core-js/fn/array/is-array.js
deleted file mode 100644
index bbe76719e..000000000
--- a/node_modules/core-js/fn/array/is-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.array.is-array');
-module.exports = require('../../modules/_core').Array.isArray; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/iterator.js b/node_modules/core-js/fn/array/iterator.js
index ca93b78ab..662f3b5c5 100644
--- a/node_modules/core-js/fn/array/iterator.js
+++ b/node_modules/core-js/fn/array/iterator.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/join.js b/node_modules/core-js/fn/array/join.js
index 9beef18d0..443639228 100644
--- a/node_modules/core-js/fn/array/join.js
+++ b/node_modules/core-js/fn/array/join.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.join');
-module.exports = require('../../modules/_core').Array.join; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.join; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/keys.js b/node_modules/core-js/fn/array/keys.js
index b44b921f7..e55d356e2 100644
--- a/node_modules/core-js/fn/array/keys.js
+++ b/node_modules/core-js/fn/array/keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.keys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.keys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/last-index-of.js b/node_modules/core-js/fn/array/last-index-of.js
index 6dcc98a10..678d0072d 100644
--- a/node_modules/core-js/fn/array/last-index-of.js
+++ b/node_modules/core-js/fn/array/last-index-of.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.last-index-of');
-module.exports = require('../../modules/_core').Array.lastIndexOf; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.lastIndexOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/map.js b/node_modules/core-js/fn/array/map.js
index 14b0f6279..a1457c7a8 100644
--- a/node_modules/core-js/fn/array/map.js
+++ b/node_modules/core-js/fn/array/map.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.map');
-module.exports = require('../../modules/_core').Array.map; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.map; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/of.js b/node_modules/core-js/fn/array/of.js
index 652ee9808..07bb5a4ad 100644
--- a/node_modules/core-js/fn/array/of.js
+++ b/node_modules/core-js/fn/array/of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.of');
-module.exports = require('../../modules/_core').Array.of; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.of; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/pop.js b/node_modules/core-js/fn/array/pop.js
index b8414f616..bd8f86109 100644
--- a/node_modules/core-js/fn/array/pop.js
+++ b/node_modules/core-js/fn/array/pop.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.pop, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.pop; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/push.js b/node_modules/core-js/fn/array/push.js
index 03539009e..3ccf07071 100644
--- a/node_modules/core-js/fn/array/push.js
+++ b/node_modules/core-js/fn/array/push.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.push, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.push; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/reduce-right.js b/node_modules/core-js/fn/array/reduce-right.js
index 1193ecbae..c592207cf 100644
--- a/node_modules/core-js/fn/array/reduce-right.js
+++ b/node_modules/core-js/fn/array/reduce-right.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.reduce-right');
-module.exports = require('../../modules/_core').Array.reduceRight; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reduceRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/reduce.js b/node_modules/core-js/fn/array/reduce.js
index e2dee913e..b8368406c 100644
--- a/node_modules/core-js/fn/array/reduce.js
+++ b/node_modules/core-js/fn/array/reduce.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.reduce');
-module.exports = require('../../modules/_core').Array.reduce; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reduce; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/reverse.js b/node_modules/core-js/fn/array/reverse.js
index 607342934..4d8d235c7 100644
--- a/node_modules/core-js/fn/array/reverse.js
+++ b/node_modules/core-js/fn/array/reverse.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.reverse, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reverse; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/shift.js b/node_modules/core-js/fn/array/shift.js
index 5002a6062..806c87cd0 100644
--- a/node_modules/core-js/fn/array/shift.js
+++ b/node_modules/core-js/fn/array/shift.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.shift, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.shift; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/slice.js b/node_modules/core-js/fn/array/slice.js
index 4914c2a98..913f7ef20 100644
--- a/node_modules/core-js/fn/array/slice.js
+++ b/node_modules/core-js/fn/array/slice.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.slice');
-module.exports = require('../../modules/_core').Array.slice; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.slice; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/some.js b/node_modules/core-js/fn/array/some.js
index de284006e..4f7c76544 100644
--- a/node_modules/core-js/fn/array/some.js
+++ b/node_modules/core-js/fn/array/some.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.some');
-module.exports = require('../../modules/_core').Array.some; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.some; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/sort.js b/node_modules/core-js/fn/array/sort.js
index 29b6f3ae7..61beed041 100644
--- a/node_modules/core-js/fn/array/sort.js
+++ b/node_modules/core-js/fn/array/sort.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.sort');
-module.exports = require('../../modules/_core').Array.sort; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.sort; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/splice.js b/node_modules/core-js/fn/array/splice.js
index 9d0bdbed4..5f5eab07b 100644
--- a/node_modules/core-js/fn/array/splice.js
+++ b/node_modules/core-js/fn/array/splice.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.splice, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.splice; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/unshift.js b/node_modules/core-js/fn/array/unshift.js
index 63fe2dd86..a11de5287 100644
--- a/node_modules/core-js/fn/array/unshift.js
+++ b/node_modules/core-js/fn/array/unshift.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.unshift, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.unshift; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/values.js b/node_modules/core-js/fn/array/values.js
index ca93b78ab..662f3b5c5 100644
--- a/node_modules/core-js/fn/array/values.js
+++ b/node_modules/core-js/fn/array/values.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/copy-within.js b/node_modules/core-js/fn/array/virtual/copy-within.js
deleted file mode 100644
index 62172a9e3..000000000
--- a/node_modules/core-js/fn/array/virtual/copy-within.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.copy-within');
-module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/entries.js b/node_modules/core-js/fn/array/virtual/entries.js
deleted file mode 100644
index 1b198e3cc..000000000
--- a/node_modules/core-js/fn/array/virtual/entries.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.iterator');
-module.exports = require('../../../modules/_entry-virtual')('Array').entries; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/every.js b/node_modules/core-js/fn/array/virtual/every.js
deleted file mode 100644
index a72e58510..000000000
--- a/node_modules/core-js/fn/array/virtual/every.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.every');
-module.exports = require('../../../modules/_entry-virtual')('Array').every; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/fill.js b/node_modules/core-js/fn/array/virtual/fill.js
deleted file mode 100644
index 6018b37bf..000000000
--- a/node_modules/core-js/fn/array/virtual/fill.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.fill');
-module.exports = require('../../../modules/_entry-virtual')('Array').fill; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/filter.js b/node_modules/core-js/fn/array/virtual/filter.js
deleted file mode 100644
index 46a14f1c4..000000000
--- a/node_modules/core-js/fn/array/virtual/filter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.filter');
-module.exports = require('../../../modules/_entry-virtual')('Array').filter; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/find-index.js b/node_modules/core-js/fn/array/virtual/find-index.js
deleted file mode 100644
index ef96165fd..000000000
--- a/node_modules/core-js/fn/array/virtual/find-index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.find-index');
-module.exports = require('../../../modules/_entry-virtual')('Array').findIndex; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/find.js b/node_modules/core-js/fn/array/virtual/find.js
deleted file mode 100644
index 6cffee5b5..000000000
--- a/node_modules/core-js/fn/array/virtual/find.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.find');
-module.exports = require('../../../modules/_entry-virtual')('Array').find; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/for-each.js b/node_modules/core-js/fn/array/virtual/for-each.js
deleted file mode 100644
index 0c3ed4492..000000000
--- a/node_modules/core-js/fn/array/virtual/for-each.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.for-each');
-module.exports = require('../../../modules/_entry-virtual')('Array').forEach; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/includes.js b/node_modules/core-js/fn/array/virtual/includes.js
deleted file mode 100644
index bf9031d74..000000000
--- a/node_modules/core-js/fn/array/virtual/includes.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.array.includes');
-module.exports = require('../../../modules/_entry-virtual')('Array').includes; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/index-of.js b/node_modules/core-js/fn/array/virtual/index-of.js
deleted file mode 100644
index cf6f36e3b..000000000
--- a/node_modules/core-js/fn/array/virtual/index-of.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.index-of');
-module.exports = require('../../../modules/_entry-virtual')('Array').indexOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/index.js b/node_modules/core-js/fn/array/virtual/index.js
deleted file mode 100644
index ff554a2a1..000000000
--- a/node_modules/core-js/fn/array/virtual/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-require('../../../modules/es6.array.join');
-require('../../../modules/es6.array.slice');
-require('../../../modules/es6.array.sort');
-require('../../../modules/es6.array.for-each');
-require('../../../modules/es6.array.map');
-require('../../../modules/es6.array.filter');
-require('../../../modules/es6.array.some');
-require('../../../modules/es6.array.every');
-require('../../../modules/es6.array.reduce');
-require('../../../modules/es6.array.reduce-right');
-require('../../../modules/es6.array.index-of');
-require('../../../modules/es6.array.last-index-of');
-require('../../../modules/es6.string.iterator');
-require('../../../modules/es6.array.iterator');
-require('../../../modules/es6.array.copy-within');
-require('../../../modules/es6.array.fill');
-require('../../../modules/es6.array.find');
-require('../../../modules/es6.array.find-index');
-require('../../../modules/es7.array.includes');
-module.exports = require('../../../modules/_entry-virtual')('Array'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/iterator.js b/node_modules/core-js/fn/array/virtual/iterator.js
deleted file mode 100644
index 7812b3c92..000000000
--- a/node_modules/core-js/fn/array/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/join.js b/node_modules/core-js/fn/array/virtual/join.js
deleted file mode 100644
index 3f7d5cff9..000000000
--- a/node_modules/core-js/fn/array/virtual/join.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.join');
-module.exports = require('../../../modules/_entry-virtual')('Array').join; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/keys.js b/node_modules/core-js/fn/array/virtual/keys.js
deleted file mode 100644
index 16c09681f..000000000
--- a/node_modules/core-js/fn/array/virtual/keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.iterator');
-module.exports = require('../../../modules/_entry-virtual')('Array').keys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/last-index-of.js b/node_modules/core-js/fn/array/virtual/last-index-of.js
deleted file mode 100644
index cdd79b7d5..000000000
--- a/node_modules/core-js/fn/array/virtual/last-index-of.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.last-index-of');
-module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/map.js b/node_modules/core-js/fn/array/virtual/map.js
deleted file mode 100644
index 14bffdac0..000000000
--- a/node_modules/core-js/fn/array/virtual/map.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.map');
-module.exports = require('../../../modules/_entry-virtual')('Array').map; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/reduce-right.js b/node_modules/core-js/fn/array/virtual/reduce-right.js
deleted file mode 100644
index 61313e8f2..000000000
--- a/node_modules/core-js/fn/array/virtual/reduce-right.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.reduce-right');
-module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/reduce.js b/node_modules/core-js/fn/array/virtual/reduce.js
deleted file mode 100644
index 1b059053d..000000000
--- a/node_modules/core-js/fn/array/virtual/reduce.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.reduce');
-module.exports = require('../../../modules/_entry-virtual')('Array').reduce; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/slice.js b/node_modules/core-js/fn/array/virtual/slice.js
deleted file mode 100644
index b28d1abcc..000000000
--- a/node_modules/core-js/fn/array/virtual/slice.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.slice');
-module.exports = require('../../../modules/_entry-virtual')('Array').slice; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/some.js b/node_modules/core-js/fn/array/virtual/some.js
deleted file mode 100644
index 58c183c55..000000000
--- a/node_modules/core-js/fn/array/virtual/some.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.some');
-module.exports = require('../../../modules/_entry-virtual')('Array').some; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/sort.js b/node_modules/core-js/fn/array/virtual/sort.js
deleted file mode 100644
index c8883150b..000000000
--- a/node_modules/core-js/fn/array/virtual/sort.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.sort');
-module.exports = require('../../../modules/_entry-virtual')('Array').sort; \ No newline at end of file
diff --git a/node_modules/core-js/fn/array/virtual/values.js b/node_modules/core-js/fn/array/virtual/values.js
deleted file mode 100644
index 7812b3c92..000000000
--- a/node_modules/core-js/fn/array/virtual/values.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/asap.js b/node_modules/core-js/fn/asap.js
deleted file mode 100644
index 9d9c80d13..000000000
--- a/node_modules/core-js/fn/asap.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.asap');
-module.exports = require('../modules/_core').asap; \ No newline at end of file
diff --git a/node_modules/core-js/fn/clear-immediate.js b/node_modules/core-js/fn/clear-immediate.js
index 86916a06c..06a975024 100644
--- a/node_modules/core-js/fn/clear-immediate.js
+++ b/node_modules/core-js/fn/clear-immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core').clearImmediate; \ No newline at end of file
+module.exports = require('../modules/$.core').clearImmediate; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/index.js b/node_modules/core-js/fn/date/index.js
deleted file mode 100644
index bd9ce0e2d..000000000
--- a/node_modules/core-js/fn/date/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../../modules/es6.date.now');
-require('../../modules/es6.date.to-json');
-require('../../modules/es6.date.to-iso-string');
-require('../../modules/es6.date.to-string');
-require('../../modules/es6.date.to-primitive');
-module.exports = require('../../modules/_core').Date; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/now.js b/node_modules/core-js/fn/date/now.js
deleted file mode 100644
index c70d37ae3..000000000
--- a/node_modules/core-js/fn/date/now.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.date.now');
-module.exports = require('../../modules/_core').Date.now; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/to-iso-string.js b/node_modules/core-js/fn/date/to-iso-string.js
deleted file mode 100644
index be4ac2187..000000000
--- a/node_modules/core-js/fn/date/to-iso-string.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.date.to-json');
-require('../../modules/es6.date.to-iso-string');
-module.exports = require('../../modules/_core').Date.toISOString; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/to-json.js b/node_modules/core-js/fn/date/to-json.js
deleted file mode 100644
index 9dc8cc902..000000000
--- a/node_modules/core-js/fn/date/to-json.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.date.to-json');
-module.exports = require('../../modules/_core').Date.toJSON; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/to-primitive.js b/node_modules/core-js/fn/date/to-primitive.js
deleted file mode 100644
index 4d7471e26..000000000
--- a/node_modules/core-js/fn/date/to-primitive.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.date.to-primitive');
-var toPrimitive = require('../../modules/_date-to-primitive');
-module.exports = function(it, hint){
- return toPrimitive.call(it, hint);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/date/to-string.js b/node_modules/core-js/fn/date/to-string.js
deleted file mode 100644
index c39d55227..000000000
--- a/node_modules/core-js/fn/date/to-string.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.date.to-string')
-var $toString = Date.prototype.toString;
-module.exports = function toString(it){
- return $toString.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/delay.js b/node_modules/core-js/fn/delay.js
index 188573884..1ff9a56d5 100644
--- a/node_modules/core-js/fn/delay.js
+++ b/node_modules/core-js/fn/delay.js
@@ -1,2 +1,2 @@
require('../modules/core.delay');
-module.exports = require('../modules/_core').delay;
+module.exports = require('../modules/$.core').delay;
diff --git a/node_modules/core-js/fn/dict.js b/node_modules/core-js/fn/dict.js
index da84a8d88..ed848e2c2 100644
--- a/node_modules/core-js/fn/dict.js
+++ b/node_modules/core-js/fn/dict.js
@@ -1,2 +1,2 @@
require('../modules/core.dict');
-module.exports = require('../modules/_core').Dict; \ No newline at end of file
+module.exports = require('../modules/$.core').Dict; \ No newline at end of file
diff --git a/node_modules/core-js/fn/dom-collections/index.js b/node_modules/core-js/fn/dom-collections/index.js
deleted file mode 100644
index 3928a09fc..000000000
--- a/node_modules/core-js/fn/dom-collections/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-require('../../modules/web.dom.iterable');
-var $iterators = require('../../modules/es6.array.iterator');
-module.exports = {
- keys: $iterators.keys,
- values: $iterators.values,
- entries: $iterators.entries,
- iterator: $iterators.values
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/dom-collections/iterator.js b/node_modules/core-js/fn/dom-collections/iterator.js
deleted file mode 100644
index ad9836457..000000000
--- a/node_modules/core-js/fn/dom-collections/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/web.dom.iterable');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/fn/error/index.js b/node_modules/core-js/fn/error/index.js
deleted file mode 100644
index 59571ac21..000000000
--- a/node_modules/core-js/fn/error/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.error.is-error');
-module.exports = require('../../modules/_core').Error; \ No newline at end of file
diff --git a/node_modules/core-js/fn/error/is-error.js b/node_modules/core-js/fn/error/is-error.js
deleted file mode 100644
index e15b7201b..000000000
--- a/node_modules/core-js/fn/error/is-error.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.error.is-error');
-module.exports = require('../../modules/_core').Error.isError; \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/bind.js b/node_modules/core-js/fn/function/bind.js
deleted file mode 100644
index 38e179e6e..000000000
--- a/node_modules/core-js/fn/function/bind.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.function.bind');
-module.exports = require('../../modules/_core').Function.bind; \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/has-instance.js b/node_modules/core-js/fn/function/has-instance.js
index 78397e5f7..78c8221c3 100644
--- a/node_modules/core-js/fn/function/has-instance.js
+++ b/node_modules/core-js/fn/function/has-instance.js
@@ -1,2 +1,2 @@
require('../../modules/es6.function.has-instance');
-module.exports = Function[require('../../modules/_wks')('hasInstance')]; \ No newline at end of file
+module.exports = Function[require('../../modules/$.wks')('hasInstance')]; \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/index.js b/node_modules/core-js/fn/function/index.js
index 206324e89..7422fca3c 100644
--- a/node_modules/core-js/fn/function/index.js
+++ b/node_modules/core-js/fn/function/index.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.function.bind');
require('../../modules/es6.function.name');
require('../../modules/es6.function.has-instance');
require('../../modules/core.function.part');
-module.exports = require('../../modules/_core').Function;
+module.exports = require('../../modules/$.core').Function;
diff --git a/node_modules/core-js/fn/function/part.js b/node_modules/core-js/fn/function/part.js
index 926e2cc2a..26271d6a0 100644
--- a/node_modules/core-js/fn/function/part.js
+++ b/node_modules/core-js/fn/function/part.js
@@ -1,2 +1,2 @@
require('../../modules/core.function.part');
-module.exports = require('../../modules/_core').Function.part; \ No newline at end of file
+module.exports = require('../../modules/$.core').Function.part; \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/virtual/bind.js b/node_modules/core-js/fn/function/virtual/bind.js
deleted file mode 100644
index 0a2f3338c..000000000
--- a/node_modules/core-js/fn/function/virtual/bind.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.function.bind');
-module.exports = require('../../../modules/_entry-virtual')('Function').bind; \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/virtual/index.js b/node_modules/core-js/fn/function/virtual/index.js
deleted file mode 100644
index f64e22023..000000000
--- a/node_modules/core-js/fn/function/virtual/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../../modules/es6.function.bind');
-require('../../../modules/core.function.part');
-module.exports = require('../../../modules/_entry-virtual')('Function'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/function/virtual/part.js b/node_modules/core-js/fn/function/virtual/part.js
deleted file mode 100644
index a382e577f..000000000
--- a/node_modules/core-js/fn/function/virtual/part.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.function.part');
-module.exports = require('../../../modules/_entry-virtual')('Function').part; \ No newline at end of file
diff --git a/node_modules/core-js/fn/json/index.js b/node_modules/core-js/fn/json/index.js
deleted file mode 100644
index a6ec3de99..000000000
--- a/node_modules/core-js/fn/json/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var core = require('../../modules/_core');
-module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify}); \ No newline at end of file
diff --git a/node_modules/core-js/fn/json/stringify.js b/node_modules/core-js/fn/json/stringify.js
index f0cac86af..fef242507 100644
--- a/node_modules/core-js/fn/json/stringify.js
+++ b/node_modules/core-js/fn/json/stringify.js
@@ -1,5 +1,4 @@
-var core = require('../../modules/_core')
- , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});
+var core = require('../../modules/$.core');
module.exports = function stringify(it){ // eslint-disable-line no-unused-vars
- return $JSON.stringify.apply($JSON, arguments);
+ return (core.JSON && core.JSON.stringify || JSON.stringify).apply(JSON, arguments);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/map.js b/node_modules/core-js/fn/map.js
index 16784c600..70998924e 100644
--- a/node_modules/core-js/fn/map.js
+++ b/node_modules/core-js/fn/map.js
@@ -3,4 +3,4 @@ require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.map');
require('../modules/es7.map.to-json');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/acosh.js b/node_modules/core-js/fn/math/acosh.js
index 9c904c2d6..d29a88cca 100644
--- a/node_modules/core-js/fn/math/acosh.js
+++ b/node_modules/core-js/fn/math/acosh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.acosh');
-module.exports = require('../../modules/_core').Math.acosh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.acosh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/asinh.js b/node_modules/core-js/fn/math/asinh.js
index 9e209c9d1..7eac2e83e 100644
--- a/node_modules/core-js/fn/math/asinh.js
+++ b/node_modules/core-js/fn/math/asinh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.asinh');
-module.exports = require('../../modules/_core').Math.asinh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.asinh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/atanh.js b/node_modules/core-js/fn/math/atanh.js
index b116296d8..a66a47d88 100644
--- a/node_modules/core-js/fn/math/atanh.js
+++ b/node_modules/core-js/fn/math/atanh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.atanh');
-module.exports = require('../../modules/_core').Math.atanh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.atanh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/cbrt.js b/node_modules/core-js/fn/math/cbrt.js
index 6ffec33a2..199f5cd86 100644
--- a/node_modules/core-js/fn/math/cbrt.js
+++ b/node_modules/core-js/fn/math/cbrt.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.cbrt');
-module.exports = require('../../modules/_core').Math.cbrt; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.cbrt; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/clz32.js b/node_modules/core-js/fn/math/clz32.js
index beeaae165..2025c6e44 100644
--- a/node_modules/core-js/fn/math/clz32.js
+++ b/node_modules/core-js/fn/math/clz32.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.clz32');
-module.exports = require('../../modules/_core').Math.clz32; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.clz32; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/cosh.js b/node_modules/core-js/fn/math/cosh.js
index bf92dc13d..17a7ddc0f 100644
--- a/node_modules/core-js/fn/math/cosh.js
+++ b/node_modules/core-js/fn/math/cosh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.cosh');
-module.exports = require('../../modules/_core').Math.cosh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.cosh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/expm1.js b/node_modules/core-js/fn/math/expm1.js
index 0b30ebb1b..732facb32 100644
--- a/node_modules/core-js/fn/math/expm1.js
+++ b/node_modules/core-js/fn/math/expm1.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.expm1');
-module.exports = require('../../modules/_core').Math.expm1; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.expm1; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/fround.js b/node_modules/core-js/fn/math/fround.js
index c75a22937..37f87069c 100644
--- a/node_modules/core-js/fn/math/fround.js
+++ b/node_modules/core-js/fn/math/fround.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.fround');
-module.exports = require('../../modules/_core').Math.fround; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.fround; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/hypot.js b/node_modules/core-js/fn/math/hypot.js
index 2126285c2..9676c0730 100644
--- a/node_modules/core-js/fn/math/hypot.js
+++ b/node_modules/core-js/fn/math/hypot.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.hypot');
-module.exports = require('../../modules/_core').Math.hypot; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.hypot; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/iaddh.js b/node_modules/core-js/fn/math/iaddh.js
deleted file mode 100644
index cae754ee1..000000000
--- a/node_modules/core-js/fn/math/iaddh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.iaddh');
-module.exports = require('../../modules/_core').Math.iaddh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/imul.js b/node_modules/core-js/fn/math/imul.js
index 1f5ce1610..2ea2913e9 100644
--- a/node_modules/core-js/fn/math/imul.js
+++ b/node_modules/core-js/fn/math/imul.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.imul');
-module.exports = require('../../modules/_core').Math.imul; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.imul; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/imulh.js b/node_modules/core-js/fn/math/imulh.js
deleted file mode 100644
index 3b47bf8c2..000000000
--- a/node_modules/core-js/fn/math/imulh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.imulh');
-module.exports = require('../../modules/_core').Math.imulh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/index.js b/node_modules/core-js/fn/math/index.js
index 8a2664b18..14628ae59 100644
--- a/node_modules/core-js/fn/math/index.js
+++ b/node_modules/core-js/fn/math/index.js
@@ -15,8 +15,4 @@ require('../../modules/es6.math.sign');
require('../../modules/es6.math.sinh');
require('../../modules/es6.math.tanh');
require('../../modules/es6.math.trunc');
-require('../../modules/es7.math.iaddh');
-require('../../modules/es7.math.isubh');
-require('../../modules/es7.math.imulh');
-require('../../modules/es7.math.umulh');
-module.exports = require('../../modules/_core').Math; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/isubh.js b/node_modules/core-js/fn/math/isubh.js
deleted file mode 100644
index e120e423f..000000000
--- a/node_modules/core-js/fn/math/isubh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.isubh');
-module.exports = require('../../modules/_core').Math.isubh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/log10.js b/node_modules/core-js/fn/math/log10.js
index 1246e0ae0..ecf7b9b2b 100644
--- a/node_modules/core-js/fn/math/log10.js
+++ b/node_modules/core-js/fn/math/log10.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log10');
-module.exports = require('../../modules/_core').Math.log10; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log10; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/log1p.js b/node_modules/core-js/fn/math/log1p.js
index 047b84c05..6db73292e 100644
--- a/node_modules/core-js/fn/math/log1p.js
+++ b/node_modules/core-js/fn/math/log1p.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log1p');
-module.exports = require('../../modules/_core').Math.log1p; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log1p; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/log2.js b/node_modules/core-js/fn/math/log2.js
index ce3e99c1e..63c74d7b8 100644
--- a/node_modules/core-js/fn/math/log2.js
+++ b/node_modules/core-js/fn/math/log2.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log2');
-module.exports = require('../../modules/_core').Math.log2; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log2; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/sign.js b/node_modules/core-js/fn/math/sign.js
index 0963ecaf9..47ab74f20 100644
--- a/node_modules/core-js/fn/math/sign.js
+++ b/node_modules/core-js/fn/math/sign.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.sign');
-module.exports = require('../../modules/_core').Math.sign; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.sign; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/sinh.js b/node_modules/core-js/fn/math/sinh.js
index c35cb7394..72c6e857a 100644
--- a/node_modules/core-js/fn/math/sinh.js
+++ b/node_modules/core-js/fn/math/sinh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.sinh');
-module.exports = require('../../modules/_core').Math.sinh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.sinh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/tanh.js b/node_modules/core-js/fn/math/tanh.js
index 3d1966db3..30ddbcc83 100644
--- a/node_modules/core-js/fn/math/tanh.js
+++ b/node_modules/core-js/fn/math/tanh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.tanh');
-module.exports = require('../../modules/_core').Math.tanh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.tanh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/trunc.js b/node_modules/core-js/fn/math/trunc.js
index 135b7dcb8..b084efa7e 100644
--- a/node_modules/core-js/fn/math/trunc.js
+++ b/node_modules/core-js/fn/math/trunc.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.trunc');
-module.exports = require('../../modules/_core').Math.trunc; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.trunc; \ No newline at end of file
diff --git a/node_modules/core-js/fn/math/umulh.js b/node_modules/core-js/fn/math/umulh.js
deleted file mode 100644
index d93b9ae05..000000000
--- a/node_modules/core-js/fn/math/umulh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.umulh');
-module.exports = require('../../modules/_core').Math.umulh; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/constructor.js b/node_modules/core-js/fn/number/constructor.js
deleted file mode 100644
index f488331ec..000000000
--- a/node_modules/core-js/fn/number/constructor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.constructor');
-module.exports = Number; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/index.js b/node_modules/core-js/fn/number/index.js
index 92890003d..d048d5901 100644
--- a/node_modules/core-js/fn/number/index.js
+++ b/node_modules/core-js/fn/number/index.js
@@ -8,7 +8,5 @@ require('../../modules/es6.number.max-safe-integer');
require('../../modules/es6.number.min-safe-integer');
require('../../modules/es6.number.parse-float');
require('../../modules/es6.number.parse-int');
-require('../../modules/es6.number.to-fixed');
-require('../../modules/es6.number.to-precision');
require('../../modules/core.number.iterator');
-module.exports = require('../../modules/_core').Number; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/is-finite.js b/node_modules/core-js/fn/number/is-finite.js
index 4ec3706b0..ff666503b 100644
--- a/node_modules/core-js/fn/number/is-finite.js
+++ b/node_modules/core-js/fn/number/is-finite.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-finite');
-module.exports = require('../../modules/_core').Number.isFinite; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isFinite; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/is-integer.js b/node_modules/core-js/fn/number/is-integer.js
index a3013bff3..682e1e348 100644
--- a/node_modules/core-js/fn/number/is-integer.js
+++ b/node_modules/core-js/fn/number/is-integer.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-integer');
-module.exports = require('../../modules/_core').Number.isInteger; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isInteger; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/is-nan.js b/node_modules/core-js/fn/number/is-nan.js
index f23b0266a..6ad6923bd 100644
--- a/node_modules/core-js/fn/number/is-nan.js
+++ b/node_modules/core-js/fn/number/is-nan.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-nan');
-module.exports = require('../../modules/_core').Number.isNaN; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isNaN; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/is-safe-integer.js b/node_modules/core-js/fn/number/is-safe-integer.js
index f68732f52..a47fd42e9 100644
--- a/node_modules/core-js/fn/number/is-safe-integer.js
+++ b/node_modules/core-js/fn/number/is-safe-integer.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-safe-integer');
-module.exports = require('../../modules/_core').Number.isSafeInteger; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isSafeInteger; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/iterator.js b/node_modules/core-js/fn/number/iterator.js
index 26feaa1f0..57cb79065 100644
--- a/node_modules/core-js/fn/number/iterator.js
+++ b/node_modules/core-js/fn/number/iterator.js
@@ -1,5 +1,5 @@
require('../../modules/core.number.iterator');
-var get = require('../../modules/_iterators').Number;
+var get = require('../../modules/$.iterators').Number;
module.exports = function(it){
return get.call(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/to-fixed.js b/node_modules/core-js/fn/number/to-fixed.js
deleted file mode 100644
index 3a041b0e8..000000000
--- a/node_modules/core-js/fn/number/to-fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.to-fixed');
-module.exports = require('../../modules/_core').Number.toFixed; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/to-precision.js b/node_modules/core-js/fn/number/to-precision.js
deleted file mode 100644
index 9e85511ab..000000000
--- a/node_modules/core-js/fn/number/to-precision.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.to-precision');
-module.exports = require('../../modules/_core').Number.toPrecision; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/virtual/index.js b/node_modules/core-js/fn/number/virtual/index.js
deleted file mode 100644
index 42360d32e..000000000
--- a/node_modules/core-js/fn/number/virtual/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-require('../../../modules/core.number.iterator');
-var $Number = require('../../../modules/_entry-virtual')('Number');
-$Number.iterator = require('../../../modules/_iterators').Number;
-module.exports = $Number; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/virtual/iterator.js b/node_modules/core-js/fn/number/virtual/iterator.js
deleted file mode 100644
index df034996a..000000000
--- a/node_modules/core-js/fn/number/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Number; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/virtual/to-fixed.js b/node_modules/core-js/fn/number/virtual/to-fixed.js
deleted file mode 100644
index b779f15c0..000000000
--- a/node_modules/core-js/fn/number/virtual/to-fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.number.to-fixed');
-module.exports = require('../../../modules/_entry-virtual')('Number').toFixed; \ No newline at end of file
diff --git a/node_modules/core-js/fn/number/virtual/to-precision.js b/node_modules/core-js/fn/number/virtual/to-precision.js
deleted file mode 100644
index 0c93fa4aa..000000000
--- a/node_modules/core-js/fn/number/virtual/to-precision.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.number.to-precision');
-module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/assign.js b/node_modules/core-js/fn/object/assign.js
index 97df6bf45..a57c54aa5 100644
--- a/node_modules/core-js/fn/object/assign.js
+++ b/node_modules/core-js/fn/object/assign.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.assign');
-module.exports = require('../../modules/_core').Object.assign; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.assign; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/classof.js b/node_modules/core-js/fn/object/classof.js
index 993d04808..3afc82686 100644
--- a/node_modules/core-js/fn/object/classof.js
+++ b/node_modules/core-js/fn/object/classof.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.classof');
-module.exports = require('../../modules/_core').Object.classof; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.classof; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/create.js b/node_modules/core-js/fn/object/create.js
index a05ca2fb0..8f5f3263b 100644
--- a/node_modules/core-js/fn/object/create.js
+++ b/node_modules/core-js/fn/object/create.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.create');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function create(P, D){
- return $Object.create(P, D);
+ return $.create(P, D);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/define-getter.js b/node_modules/core-js/fn/object/define-getter.js
deleted file mode 100644
index 5dd26070b..000000000
--- a/node_modules/core-js/fn/object/define-getter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.define-getter');
-module.exports = require('../../modules/_core').Object.__defineGetter__; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/define-properties.js b/node_modules/core-js/fn/object/define-properties.js
index 04160fb3a..a857aab81 100644
--- a/node_modules/core-js/fn/object/define-properties.js
+++ b/node_modules/core-js/fn/object/define-properties.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.define-properties');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function defineProperties(T, D){
- return $Object.defineProperties(T, D);
+ return $.setDescs(T, D);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/define-property.js b/node_modules/core-js/fn/object/define-property.js
index 078c56cbf..7384315d5 100644
--- a/node_modules/core-js/fn/object/define-property.js
+++ b/node_modules/core-js/fn/object/define-property.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.define-property');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function defineProperty(it, key, desc){
- return $Object.defineProperty(it, key, desc);
+ return $.setDesc(it, key, desc);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/define-setter.js b/node_modules/core-js/fn/object/define-setter.js
deleted file mode 100644
index b59475f82..000000000
--- a/node_modules/core-js/fn/object/define-setter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.define-setter');
-module.exports = require('../../modules/_core').Object.__defineSetter__; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/define.js b/node_modules/core-js/fn/object/define.js
index 6ec19e904..690773e2e 100644
--- a/node_modules/core-js/fn/object/define.js
+++ b/node_modules/core-js/fn/object/define.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.define');
-module.exports = require('../../modules/_core').Object.define; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.define; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/entries.js b/node_modules/core-js/fn/object/entries.js
index fca1000e8..a32fe3911 100644
--- a/node_modules/core-js/fn/object/entries.js
+++ b/node_modules/core-js/fn/object/entries.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.entries');
-module.exports = require('../../modules/_core').Object.entries; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.entries; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/freeze.js b/node_modules/core-js/fn/object/freeze.js
index 04eac5302..566eec51d 100644
--- a/node_modules/core-js/fn/object/freeze.js
+++ b/node_modules/core-js/fn/object/freeze.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.freeze');
-module.exports = require('../../modules/_core').Object.freeze; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.freeze; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/get-own-property-descriptor.js b/node_modules/core-js/fn/object/get-own-property-descriptor.js
index 7d3f03b8b..2e1845cfc 100644
--- a/node_modules/core-js/fn/object/get-own-property-descriptor.js
+++ b/node_modules/core-js/fn/object/get-own-property-descriptor.js
@@ -1,5 +1,5 @@
+var $ = require('../../modules/$');
require('../../modules/es6.object.get-own-property-descriptor');
-var $Object = require('../../modules/_core').Object;
module.exports = function getOwnPropertyDescriptor(it, key){
- return $Object.getOwnPropertyDescriptor(it, key);
+ return $.getDesc(it, key);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/get-own-property-descriptors.js b/node_modules/core-js/fn/object/get-own-property-descriptors.js
index dfeb547ce..f26341d57 100644
--- a/node_modules/core-js/fn/object/get-own-property-descriptors.js
+++ b/node_modules/core-js/fn/object/get-own-property-descriptors.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.get-own-property-descriptors');
-module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getOwnPropertyDescriptors; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/get-own-property-names.js b/node_modules/core-js/fn/object/get-own-property-names.js
index c91ce430f..496eb1970 100644
--- a/node_modules/core-js/fn/object/get-own-property-names.js
+++ b/node_modules/core-js/fn/object/get-own-property-names.js
@@ -1,5 +1,5 @@
+var $ = require('../../modules/$');
require('../../modules/es6.object.get-own-property-names');
-var $Object = require('../../modules/_core').Object;
module.exports = function getOwnPropertyNames(it){
- return $Object.getOwnPropertyNames(it);
+ return $.getNames(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/get-own-property-symbols.js b/node_modules/core-js/fn/object/get-own-property-symbols.js
index c3f528807..f78921b51 100644
--- a/node_modules/core-js/fn/object/get-own-property-symbols.js
+++ b/node_modules/core-js/fn/object/get-own-property-symbols.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Object.getOwnPropertySymbols; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getOwnPropertySymbols; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/get-prototype-of.js b/node_modules/core-js/fn/object/get-prototype-of.js
index bda934458..9a495afe7 100644
--- a/node_modules/core-js/fn/object/get-prototype-of.js
+++ b/node_modules/core-js/fn/object/get-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.get-prototype-of');
-module.exports = require('../../modules/_core').Object.getPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/index.js b/node_modules/core-js/fn/object/index.js
index 4bd9825b4..0fb75bc5e 100644
--- a/node_modules/core-js/fn/object/index.js
+++ b/node_modules/core-js/fn/object/index.js
@@ -1,30 +1,23 @@
require('../../modules/es6.symbol');
-require('../../modules/es6.object.create');
-require('../../modules/es6.object.define-property');
-require('../../modules/es6.object.define-properties');
-require('../../modules/es6.object.get-own-property-descriptor');
-require('../../modules/es6.object.get-prototype-of');
-require('../../modules/es6.object.keys');
-require('../../modules/es6.object.get-own-property-names');
+require('../../modules/es6.object.assign');
+require('../../modules/es6.object.is');
+require('../../modules/es6.object.set-prototype-of');
+require('../../modules/es6.object.to-string');
require('../../modules/es6.object.freeze');
require('../../modules/es6.object.seal');
require('../../modules/es6.object.prevent-extensions');
require('../../modules/es6.object.is-frozen');
require('../../modules/es6.object.is-sealed');
require('../../modules/es6.object.is-extensible');
-require('../../modules/es6.object.assign');
-require('../../modules/es6.object.is');
-require('../../modules/es6.object.set-prototype-of');
-require('../../modules/es6.object.to-string');
+require('../../modules/es6.object.get-own-property-descriptor');
+require('../../modules/es6.object.get-prototype-of');
+require('../../modules/es6.object.keys');
+require('../../modules/es6.object.get-own-property-names');
require('../../modules/es7.object.get-own-property-descriptors');
require('../../modules/es7.object.values');
require('../../modules/es7.object.entries');
-require('../../modules/es7.object.define-getter');
-require('../../modules/es7.object.define-setter');
-require('../../modules/es7.object.lookup-getter');
-require('../../modules/es7.object.lookup-setter');
require('../../modules/core.object.is-object');
require('../../modules/core.object.classof');
require('../../modules/core.object.define');
require('../../modules/core.object.make');
-module.exports = require('../../modules/_core').Object; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/is-extensible.js b/node_modules/core-js/fn/object/is-extensible.js
index 43fb0e78a..8bb0cf9f7 100644
--- a/node_modules/core-js/fn/object/is-extensible.js
+++ b/node_modules/core-js/fn/object/is-extensible.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-extensible');
-module.exports = require('../../modules/_core').Object.isExtensible; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isExtensible; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/is-frozen.js b/node_modules/core-js/fn/object/is-frozen.js
index cbff22421..7bf1f1270 100644
--- a/node_modules/core-js/fn/object/is-frozen.js
+++ b/node_modules/core-js/fn/object/is-frozen.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-frozen');
-module.exports = require('../../modules/_core').Object.isFrozen; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isFrozen; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/is-object.js b/node_modules/core-js/fn/object/is-object.js
index 38feeff5c..935cb6ece 100644
--- a/node_modules/core-js/fn/object/is-object.js
+++ b/node_modules/core-js/fn/object/is-object.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.is-object');
-module.exports = require('../../modules/_core').Object.isObject; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isObject; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/is-sealed.js b/node_modules/core-js/fn/object/is-sealed.js
index 169a8ae73..05416f377 100644
--- a/node_modules/core-js/fn/object/is-sealed.js
+++ b/node_modules/core-js/fn/object/is-sealed.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-sealed');
-module.exports = require('../../modules/_core').Object.isSealed; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isSealed; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/is.js b/node_modules/core-js/fn/object/is.js
index 6ac9f19e1..d07c3ae18 100644
--- a/node_modules/core-js/fn/object/is.js
+++ b/node_modules/core-js/fn/object/is.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is');
-module.exports = require('../../modules/_core').Object.is; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.is; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/keys.js b/node_modules/core-js/fn/object/keys.js
index 8eeb78eb8..ebfb8c655 100644
--- a/node_modules/core-js/fn/object/keys.js
+++ b/node_modules/core-js/fn/object/keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.keys');
-module.exports = require('../../modules/_core').Object.keys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.keys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/lookup-getter.js b/node_modules/core-js/fn/object/lookup-getter.js
deleted file mode 100644
index 3f7f674d0..000000000
--- a/node_modules/core-js/fn/object/lookup-getter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.lookup-setter');
-module.exports = require('../../modules/_core').Object.__lookupGetter__; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/lookup-setter.js b/node_modules/core-js/fn/object/lookup-setter.js
deleted file mode 100644
index d18446fe9..000000000
--- a/node_modules/core-js/fn/object/lookup-setter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.lookup-setter');
-module.exports = require('../../modules/_core').Object.__lookupSetter__; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/make.js b/node_modules/core-js/fn/object/make.js
index f4d19d128..fbfb2f858 100644
--- a/node_modules/core-js/fn/object/make.js
+++ b/node_modules/core-js/fn/object/make.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.make');
-module.exports = require('../../modules/_core').Object.make; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.make; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/prevent-extensions.js b/node_modules/core-js/fn/object/prevent-extensions.js
index e43be05b1..01d82fcbd 100644
--- a/node_modules/core-js/fn/object/prevent-extensions.js
+++ b/node_modules/core-js/fn/object/prevent-extensions.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.prevent-extensions');
-module.exports = require('../../modules/_core').Object.preventExtensions; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.preventExtensions; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/seal.js b/node_modules/core-js/fn/object/seal.js
index 8a56cd7f3..fdf84b821 100644
--- a/node_modules/core-js/fn/object/seal.js
+++ b/node_modules/core-js/fn/object/seal.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.seal');
-module.exports = require('../../modules/_core').Object.seal; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.seal; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/set-prototype-of.js b/node_modules/core-js/fn/object/set-prototype-of.js
index c25170dbc..cd94d875b 100644
--- a/node_modules/core-js/fn/object/set-prototype-of.js
+++ b/node_modules/core-js/fn/object/set-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.set-prototype-of');
-module.exports = require('../../modules/_core').Object.setPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.setPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/object/values.js b/node_modules/core-js/fn/object/values.js
index b50336cf1..b96071ff3 100644
--- a/node_modules/core-js/fn/object/values.js
+++ b/node_modules/core-js/fn/object/values.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.values');
-module.exports = require('../../modules/_core').Object.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.values; \ No newline at end of file
diff --git a/node_modules/core-js/fn/observable.js b/node_modules/core-js/fn/observable.js
deleted file mode 100644
index 05ca51a37..000000000
--- a/node_modules/core-js/fn/observable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-require('../modules/es6.object.to-string');
-require('../modules/es6.string.iterator');
-require('../modules/web.dom.iterable');
-require('../modules/es6.promise');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core').Observable; \ No newline at end of file
diff --git a/node_modules/core-js/fn/parse-float.js b/node_modules/core-js/fn/parse-float.js
deleted file mode 100644
index dad94ddbe..000000000
--- a/node_modules/core-js/fn/parse-float.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-float');
-module.exports = require('../modules/_core').parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/fn/parse-int.js b/node_modules/core-js/fn/parse-int.js
deleted file mode 100644
index 08a20996b..000000000
--- a/node_modules/core-js/fn/parse-int.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-int');
-module.exports = require('../modules/_core').parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/fn/promise.js b/node_modules/core-js/fn/promise.js
index c901c8595..0a0996139 100644
--- a/node_modules/core-js/fn/promise.js
+++ b/node_modules/core-js/fn/promise.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.promise');
-module.exports = require('../modules/_core').Promise; \ No newline at end of file
+module.exports = require('../modules/$.core').Promise; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/apply.js b/node_modules/core-js/fn/reflect/apply.js
index 725b8a699..75e5ff5b2 100644
--- a/node_modules/core-js/fn/reflect/apply.js
+++ b/node_modules/core-js/fn/reflect/apply.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.apply');
-module.exports = require('../../modules/_core').Reflect.apply; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.apply; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/construct.js b/node_modules/core-js/fn/reflect/construct.js
index 587725dad..adc40ea84 100644
--- a/node_modules/core-js/fn/reflect/construct.js
+++ b/node_modules/core-js/fn/reflect/construct.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.construct');
-module.exports = require('../../modules/_core').Reflect.construct; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.construct; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/define-metadata.js b/node_modules/core-js/fn/reflect/define-metadata.js
deleted file mode 100644
index c9876ed3b..000000000
--- a/node_modules/core-js/fn/reflect/define-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.define-metadata');
-module.exports = require('../../modules/_core').Reflect.defineMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/define-property.js b/node_modules/core-js/fn/reflect/define-property.js
index c36b4d21d..da78d62e5 100644
--- a/node_modules/core-js/fn/reflect/define-property.js
+++ b/node_modules/core-js/fn/reflect/define-property.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.define-property');
-module.exports = require('../../modules/_core').Reflect.defineProperty; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.defineProperty; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/delete-metadata.js b/node_modules/core-js/fn/reflect/delete-metadata.js
deleted file mode 100644
index 9bcc02997..000000000
--- a/node_modules/core-js/fn/reflect/delete-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.delete-metadata');
-module.exports = require('../../modules/_core').Reflect.deleteMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/delete-property.js b/node_modules/core-js/fn/reflect/delete-property.js
index 10b6392f2..411225f60 100644
--- a/node_modules/core-js/fn/reflect/delete-property.js
+++ b/node_modules/core-js/fn/reflect/delete-property.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.delete-property');
-module.exports = require('../../modules/_core').Reflect.deleteProperty; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.deleteProperty; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/enumerate.js b/node_modules/core-js/fn/reflect/enumerate.js
index 257a21eee..c19e0b6b5 100644
--- a/node_modules/core-js/fn/reflect/enumerate.js
+++ b/node_modules/core-js/fn/reflect/enumerate.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.enumerate');
-module.exports = require('../../modules/_core').Reflect.enumerate; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.enumerate; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-metadata-keys.js b/node_modules/core-js/fn/reflect/get-metadata-keys.js
deleted file mode 100644
index 9dbf5ee14..000000000
--- a/node_modules/core-js/fn/reflect/get-metadata-keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-metadata-keys');
-module.exports = require('../../modules/_core').Reflect.getMetadataKeys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-metadata.js b/node_modules/core-js/fn/reflect/get-metadata.js
deleted file mode 100644
index 3a20839eb..000000000
--- a/node_modules/core-js/fn/reflect/get-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-metadata');
-module.exports = require('../../modules/_core').Reflect.getMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-own-metadata-keys.js b/node_modules/core-js/fn/reflect/get-own-metadata-keys.js
deleted file mode 100644
index 2f8c5759b..000000000
--- a/node_modules/core-js/fn/reflect/get-own-metadata-keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-own-metadata-keys');
-module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-own-metadata.js b/node_modules/core-js/fn/reflect/get-own-metadata.js
deleted file mode 100644
index 68e288dda..000000000
--- a/node_modules/core-js/fn/reflect/get-own-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-own-metadata');
-module.exports = require('../../modules/_core').Reflect.getOwnMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-own-property-descriptor.js b/node_modules/core-js/fn/reflect/get-own-property-descriptor.js
index 9e2822fb5..22e2aa666 100644
--- a/node_modules/core-js/fn/reflect/get-own-property-descriptor.js
+++ b/node_modules/core-js/fn/reflect/get-own-property-descriptor.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get-own-property-descriptor');
-module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get-prototype-of.js b/node_modules/core-js/fn/reflect/get-prototype-of.js
index 485035960..2ff331a45 100644
--- a/node_modules/core-js/fn/reflect/get-prototype-of.js
+++ b/node_modules/core-js/fn/reflect/get-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get-prototype-of');
-module.exports = require('../../modules/_core').Reflect.getPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.getPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/get.js b/node_modules/core-js/fn/reflect/get.js
index 9ca903e82..266508c68 100644
--- a/node_modules/core-js/fn/reflect/get.js
+++ b/node_modules/core-js/fn/reflect/get.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get');
-module.exports = require('../../modules/_core').Reflect.get; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.get; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/has-metadata.js b/node_modules/core-js/fn/reflect/has-metadata.js
deleted file mode 100644
index f001f437a..000000000
--- a/node_modules/core-js/fn/reflect/has-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.has-metadata');
-module.exports = require('../../modules/_core').Reflect.hasMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/has-own-metadata.js b/node_modules/core-js/fn/reflect/has-own-metadata.js
deleted file mode 100644
index d90935f0b..000000000
--- a/node_modules/core-js/fn/reflect/has-own-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.has-own-metadata');
-module.exports = require('../../modules/_core').Reflect.hasOwnMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/has.js b/node_modules/core-js/fn/reflect/has.js
index 8e34933c8..db14fa11a 100644
--- a/node_modules/core-js/fn/reflect/has.js
+++ b/node_modules/core-js/fn/reflect/has.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.has');
-module.exports = require('../../modules/_core').Reflect.has; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.has; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/index.js b/node_modules/core-js/fn/reflect/index.js
index a725cef2f..5b2166531 100644
--- a/node_modules/core-js/fn/reflect/index.js
+++ b/node_modules/core-js/fn/reflect/index.js
@@ -12,13 +12,4 @@ require('../../modules/es6.reflect.own-keys');
require('../../modules/es6.reflect.prevent-extensions');
require('../../modules/es6.reflect.set');
require('../../modules/es6.reflect.set-prototype-of');
-require('../../modules/es7.reflect.define-metadata');
-require('../../modules/es7.reflect.delete-metadata');
-require('../../modules/es7.reflect.get-metadata');
-require('../../modules/es7.reflect.get-metadata-keys');
-require('../../modules/es7.reflect.get-own-metadata');
-require('../../modules/es7.reflect.get-own-metadata-keys');
-require('../../modules/es7.reflect.has-metadata');
-require('../../modules/es7.reflect.has-own-metadata');
-require('../../modules/es7.reflect.metadata');
-module.exports = require('../../modules/_core').Reflect; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/is-extensible.js b/node_modules/core-js/fn/reflect/is-extensible.js
index de41d683a..f0329e28b 100644
--- a/node_modules/core-js/fn/reflect/is-extensible.js
+++ b/node_modules/core-js/fn/reflect/is-extensible.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.is-extensible');
-module.exports = require('../../modules/_core').Reflect.isExtensible; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.isExtensible; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/metadata.js b/node_modules/core-js/fn/reflect/metadata.js
deleted file mode 100644
index 3f2b8ff62..000000000
--- a/node_modules/core-js/fn/reflect/metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.metadata');
-module.exports = require('../../modules/_core').Reflect.metadata; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/own-keys.js b/node_modules/core-js/fn/reflect/own-keys.js
index bfcebc740..6da1136dd 100644
--- a/node_modules/core-js/fn/reflect/own-keys.js
+++ b/node_modules/core-js/fn/reflect/own-keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.own-keys');
-module.exports = require('../../modules/_core').Reflect.ownKeys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.ownKeys; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/prevent-extensions.js b/node_modules/core-js/fn/reflect/prevent-extensions.js
index b346da3b0..48fb5d5a9 100644
--- a/node_modules/core-js/fn/reflect/prevent-extensions.js
+++ b/node_modules/core-js/fn/reflect/prevent-extensions.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.prevent-extensions');
-module.exports = require('../../modules/_core').Reflect.preventExtensions; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.preventExtensions; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/set-prototype-of.js b/node_modules/core-js/fn/reflect/set-prototype-of.js
index 16b74359c..09cddebc8 100644
--- a/node_modules/core-js/fn/reflect/set-prototype-of.js
+++ b/node_modules/core-js/fn/reflect/set-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.set-prototype-of');
-module.exports = require('../../modules/_core').Reflect.setPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.setPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/fn/reflect/set.js b/node_modules/core-js/fn/reflect/set.js
index 834929ee3..d1afec9c1 100644
--- a/node_modules/core-js/fn/reflect/set.js
+++ b/node_modules/core-js/fn/reflect/set.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.set');
-module.exports = require('../../modules/_core').Reflect.set; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.set; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/constructor.js b/node_modules/core-js/fn/regexp/constructor.js
deleted file mode 100644
index 90c13513d..000000000
--- a/node_modules/core-js/fn/regexp/constructor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.regexp.constructor');
-module.exports = RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/escape.js b/node_modules/core-js/fn/regexp/escape.js
index d657a7d91..0c8d06b4c 100644
--- a/node_modules/core-js/fn/regexp/escape.js
+++ b/node_modules/core-js/fn/regexp/escape.js
@@ -1,2 +1,2 @@
-require('../../modules/core.regexp.escape');
-module.exports = require('../../modules/_core').RegExp.escape; \ No newline at end of file
+require('../../modules/es7.regexp.escape');
+module.exports = require('../../modules/$.core').RegExp.escape; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/flags.js b/node_modules/core-js/fn/regexp/flags.js
deleted file mode 100644
index ef84ddbd1..000000000
--- a/node_modules/core-js/fn/regexp/flags.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.flags');
-var flags = require('../../modules/_flags');
-module.exports = function(it){
- return flags.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/index.js b/node_modules/core-js/fn/regexp/index.js
index 61ced0b81..7d905d67d 100644
--- a/node_modules/core-js/fn/regexp/index.js
+++ b/node_modules/core-js/fn/regexp/index.js
@@ -1,9 +1,8 @@
require('../../modules/es6.regexp.constructor');
-require('../../modules/es6.regexp.to-string');
require('../../modules/es6.regexp.flags');
require('../../modules/es6.regexp.match');
require('../../modules/es6.regexp.replace');
require('../../modules/es6.regexp.search');
require('../../modules/es6.regexp.split');
-require('../../modules/core.regexp.escape');
-module.exports = require('../../modules/_core').RegExp; \ No newline at end of file
+require('../../modules/es7.regexp.escape');
+module.exports = require('../../modules/$.core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/match.js b/node_modules/core-js/fn/regexp/match.js
deleted file mode 100644
index 400d0921e..000000000
--- a/node_modules/core-js/fn/regexp/match.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.match');
-var MATCH = require('../../modules/_wks')('match');
-module.exports = function(it, str){
- return RegExp.prototype[MATCH].call(it, str);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/replace.js b/node_modules/core-js/fn/regexp/replace.js
deleted file mode 100644
index adde0adf6..000000000
--- a/node_modules/core-js/fn/regexp/replace.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.replace');
-var REPLACE = require('../../modules/_wks')('replace');
-module.exports = function(it, str, replacer){
- return RegExp.prototype[REPLACE].call(it, str, replacer);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/search.js b/node_modules/core-js/fn/regexp/search.js
deleted file mode 100644
index 4e149d05a..000000000
--- a/node_modules/core-js/fn/regexp/search.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.search');
-var SEARCH = require('../../modules/_wks')('search');
-module.exports = function(it, str){
- return RegExp.prototype[SEARCH].call(it, str);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/split.js b/node_modules/core-js/fn/regexp/split.js
deleted file mode 100644
index b92d09fa6..000000000
--- a/node_modules/core-js/fn/regexp/split.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.split');
-var SPLIT = require('../../modules/_wks')('split');
-module.exports = function(it, str, limit){
- return RegExp.prototype[SPLIT].call(it, str, limit);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/regexp/to-string.js b/node_modules/core-js/fn/regexp/to-string.js
deleted file mode 100644
index 29d5d037a..000000000
--- a/node_modules/core-js/fn/regexp/to-string.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-require('../../modules/es6.regexp.to-string');
-module.exports = function toString(it){
- return RegExp.prototype.toString.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/set-immediate.js b/node_modules/core-js/fn/set-immediate.js
index 250831369..2dd87df21 100644
--- a/node_modules/core-js/fn/set-immediate.js
+++ b/node_modules/core-js/fn/set-immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core').setImmediate; \ No newline at end of file
+module.exports = require('../modules/$.core').setImmediate; \ No newline at end of file
diff --git a/node_modules/core-js/fn/set-interval.js b/node_modules/core-js/fn/set-interval.js
index 484447ffa..4c7dd8e97 100644
--- a/node_modules/core-js/fn/set-interval.js
+++ b/node_modules/core-js/fn/set-interval.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core').setInterval; \ No newline at end of file
+module.exports = require('../modules/$.core').setInterval; \ No newline at end of file
diff --git a/node_modules/core-js/fn/set-timeout.js b/node_modules/core-js/fn/set-timeout.js
index 8ebbb2e4f..4e7861948 100644
--- a/node_modules/core-js/fn/set-timeout.js
+++ b/node_modules/core-js/fn/set-timeout.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core').setTimeout; \ No newline at end of file
+module.exports = require('../modules/$.core').setTimeout; \ No newline at end of file
diff --git a/node_modules/core-js/fn/set.js b/node_modules/core-js/fn/set.js
index a8b496525..34615f1d2 100644
--- a/node_modules/core-js/fn/set.js
+++ b/node_modules/core-js/fn/set.js
@@ -3,4 +3,4 @@ require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.set');
require('../modules/es7.set.to-json');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/anchor.js b/node_modules/core-js/fn/string/anchor.js
deleted file mode 100644
index ba4ef8135..000000000
--- a/node_modules/core-js/fn/string/anchor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.anchor');
-module.exports = require('../../modules/_core').String.anchor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/at.js b/node_modules/core-js/fn/string/at.js
index ab6aec153..d59d2aff2 100644
--- a/node_modules/core-js/fn/string/at.js
+++ b/node_modules/core-js/fn/string/at.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.at');
-module.exports = require('../../modules/_core').String.at; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.at; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/big.js b/node_modules/core-js/fn/string/big.js
deleted file mode 100644
index ab707907c..000000000
--- a/node_modules/core-js/fn/string/big.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.big');
-module.exports = require('../../modules/_core').String.big; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/blink.js b/node_modules/core-js/fn/string/blink.js
deleted file mode 100644
index c748079b9..000000000
--- a/node_modules/core-js/fn/string/blink.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.blink');
-module.exports = require('../../modules/_core').String.blink; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/bold.js b/node_modules/core-js/fn/string/bold.js
deleted file mode 100644
index 2d36bda3a..000000000
--- a/node_modules/core-js/fn/string/bold.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.bold');
-module.exports = require('../../modules/_core').String.bold; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/code-point-at.js b/node_modules/core-js/fn/string/code-point-at.js
index be141e82d..74e933aaa 100644
--- a/node_modules/core-js/fn/string/code-point-at.js
+++ b/node_modules/core-js/fn/string/code-point-at.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.code-point-at');
-module.exports = require('../../modules/_core').String.codePointAt; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.codePointAt; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/ends-with.js b/node_modules/core-js/fn/string/ends-with.js
index 5e427753e..7fe5cb744 100644
--- a/node_modules/core-js/fn/string/ends-with.js
+++ b/node_modules/core-js/fn/string/ends-with.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.ends-with');
-module.exports = require('../../modules/_core').String.endsWith; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.endsWith; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/escape-html.js b/node_modules/core-js/fn/string/escape-html.js
index 49176ca65..a6c62fafc 100644
--- a/node_modules/core-js/fn/string/escape-html.js
+++ b/node_modules/core-js/fn/string/escape-html.js
@@ -1,2 +1,2 @@
require('../../modules/core.string.escape-html');
-module.exports = require('../../modules/_core').String.escapeHTML; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.escapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/fixed.js b/node_modules/core-js/fn/string/fixed.js
deleted file mode 100644
index 77e233a3f..000000000
--- a/node_modules/core-js/fn/string/fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fixed');
-module.exports = require('../../modules/_core').String.fixed; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/fontcolor.js b/node_modules/core-js/fn/string/fontcolor.js
deleted file mode 100644
index 079235a19..000000000
--- a/node_modules/core-js/fn/string/fontcolor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fontcolor');
-module.exports = require('../../modules/_core').String.fontcolor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/fontsize.js b/node_modules/core-js/fn/string/fontsize.js
deleted file mode 100644
index 8cb2555c6..000000000
--- a/node_modules/core-js/fn/string/fontsize.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fontsize');
-module.exports = require('../../modules/_core').String.fontsize; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/from-code-point.js b/node_modules/core-js/fn/string/from-code-point.js
index 93fc53aea..0b42e7ae4 100644
--- a/node_modules/core-js/fn/string/from-code-point.js
+++ b/node_modules/core-js/fn/string/from-code-point.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.from-code-point');
-module.exports = require('../../modules/_core').String.fromCodePoint; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.fromCodePoint; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/includes.js b/node_modules/core-js/fn/string/includes.js
index c9736404d..441bc5947 100644
--- a/node_modules/core-js/fn/string/includes.js
+++ b/node_modules/core-js/fn/string/includes.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.includes');
-module.exports = require('../../modules/_core').String.includes; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.includes; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/index.js b/node_modules/core-js/fn/string/index.js
index 6485a9b25..6be228caf 100644
--- a/node_modules/core-js/fn/string/index.js
+++ b/node_modules/core-js/fn/string/index.js
@@ -11,25 +11,11 @@ require('../../modules/es6.regexp.match');
require('../../modules/es6.regexp.replace');
require('../../modules/es6.regexp.search');
require('../../modules/es6.regexp.split');
-require('../../modules/es6.string.anchor');
-require('../../modules/es6.string.big');
-require('../../modules/es6.string.blink');
-require('../../modules/es6.string.bold');
-require('../../modules/es6.string.fixed');
-require('../../modules/es6.string.fontcolor');
-require('../../modules/es6.string.fontsize');
-require('../../modules/es6.string.italics');
-require('../../modules/es6.string.link');
-require('../../modules/es6.string.small');
-require('../../modules/es6.string.strike');
-require('../../modules/es6.string.sub');
-require('../../modules/es6.string.sup');
require('../../modules/es7.string.at');
-require('../../modules/es7.string.pad-start');
-require('../../modules/es7.string.pad-end');
+require('../../modules/es7.string.pad-left');
+require('../../modules/es7.string.pad-right');
require('../../modules/es7.string.trim-left');
require('../../modules/es7.string.trim-right');
-require('../../modules/es7.string.match-all');
require('../../modules/core.string.escape-html');
require('../../modules/core.string.unescape-html');
-module.exports = require('../../modules/_core').String;
+module.exports = require('../../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/italics.js b/node_modules/core-js/fn/string/italics.js
deleted file mode 100644
index 378450ebd..000000000
--- a/node_modules/core-js/fn/string/italics.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.italics');
-module.exports = require('../../modules/_core').String.italics; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/iterator.js b/node_modules/core-js/fn/string/iterator.js
index 947e7558b..157336458 100644
--- a/node_modules/core-js/fn/string/iterator.js
+++ b/node_modules/core-js/fn/string/iterator.js
@@ -1,5 +1,5 @@
require('../../modules/es6.string.iterator');
-var get = require('../../modules/_iterators').String;
+var get = require('../../modules/$.iterators').String;
module.exports = function(it){
return get.call(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/link.js b/node_modules/core-js/fn/string/link.js
deleted file mode 100644
index 1eb2c6dd2..000000000
--- a/node_modules/core-js/fn/string/link.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.link');
-module.exports = require('../../modules/_core').String.link; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/match-all.js b/node_modules/core-js/fn/string/match-all.js
deleted file mode 100644
index 1a1dfeb6e..000000000
--- a/node_modules/core-js/fn/string/match-all.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.match-all');
-module.exports = require('../../modules/_core').String.matchAll; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/pad-end.js b/node_modules/core-js/fn/string/pad-end.js
deleted file mode 100644
index 23eb9f95a..000000000
--- a/node_modules/core-js/fn/string/pad-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.pad-end');
-module.exports = require('../../modules/_core').String.padEnd;
diff --git a/node_modules/core-js/fn/string/pad-start.js b/node_modules/core-js/fn/string/pad-start.js
deleted file mode 100644
index ff12739fc..000000000
--- a/node_modules/core-js/fn/string/pad-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.pad-start');
-module.exports = require('../../modules/_core').String.padStart;
diff --git a/node_modules/core-js/fn/string/raw.js b/node_modules/core-js/fn/string/raw.js
index 713550fb2..0c04fd341 100644
--- a/node_modules/core-js/fn/string/raw.js
+++ b/node_modules/core-js/fn/string/raw.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.raw');
-module.exports = require('../../modules/_core').String.raw; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.raw; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/repeat.js b/node_modules/core-js/fn/string/repeat.js
index fa75b13ec..361070954 100644
--- a/node_modules/core-js/fn/string/repeat.js
+++ b/node_modules/core-js/fn/string/repeat.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.repeat');
-module.exports = require('../../modules/_core').String.repeat; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.repeat; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/small.js b/node_modules/core-js/fn/string/small.js
deleted file mode 100644
index 0438290db..000000000
--- a/node_modules/core-js/fn/string/small.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.small');
-module.exports = require('../../modules/_core').String.small; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/starts-with.js b/node_modules/core-js/fn/string/starts-with.js
index d62512a3c..edee83117 100644
--- a/node_modules/core-js/fn/string/starts-with.js
+++ b/node_modules/core-js/fn/string/starts-with.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.starts-with');
-module.exports = require('../../modules/_core').String.startsWith; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.startsWith; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/strike.js b/node_modules/core-js/fn/string/strike.js
deleted file mode 100644
index b79946c8e..000000000
--- a/node_modules/core-js/fn/string/strike.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.strike');
-module.exports = require('../../modules/_core').String.strike; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/sub.js b/node_modules/core-js/fn/string/sub.js
deleted file mode 100644
index 54d0671e3..000000000
--- a/node_modules/core-js/fn/string/sub.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.sub');
-module.exports = require('../../modules/_core').String.sub; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/sup.js b/node_modules/core-js/fn/string/sup.js
deleted file mode 100644
index 645e0372f..000000000
--- a/node_modules/core-js/fn/string/sup.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.sup');
-module.exports = require('../../modules/_core').String.sup; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/trim-end.js b/node_modules/core-js/fn/string/trim-end.js
deleted file mode 100644
index f3bdf6fb1..000000000
--- a/node_modules/core-js/fn/string/trim-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.trim-right');
-module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/trim-left.js b/node_modules/core-js/fn/string/trim-left.js
index 04671d369..579ad3978 100644
--- a/node_modules/core-js/fn/string/trim-left.js
+++ b/node_modules/core-js/fn/string/trim-left.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.trim-left');
-module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/trim-right.js b/node_modules/core-js/fn/string/trim-right.js
index f3bdf6fb1..2168d9459 100644
--- a/node_modules/core-js/fn/string/trim-right.js
+++ b/node_modules/core-js/fn/string/trim-right.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.trim-right');
-module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/trim-start.js b/node_modules/core-js/fn/string/trim-start.js
deleted file mode 100644
index 04671d369..000000000
--- a/node_modules/core-js/fn/string/trim-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.trim-left');
-module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/trim.js b/node_modules/core-js/fn/string/trim.js
index c536e12eb..61c647013 100644
--- a/node_modules/core-js/fn/string/trim.js
+++ b/node_modules/core-js/fn/string/trim.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.trim');
-module.exports = require('../../modules/_core').String.trim; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trim; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/unescape-html.js b/node_modules/core-js/fn/string/unescape-html.js
index 7c2c55c8c..de09d98b4 100644
--- a/node_modules/core-js/fn/string/unescape-html.js
+++ b/node_modules/core-js/fn/string/unescape-html.js
@@ -1,2 +1,2 @@
require('../../modules/core.string.unescape-html');
-module.exports = require('../../modules/_core').String.unescapeHTML; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.unescapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/anchor.js b/node_modules/core-js/fn/string/virtual/anchor.js
deleted file mode 100644
index 6f74b7e88..000000000
--- a/node_modules/core-js/fn/string/virtual/anchor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.anchor');
-module.exports = require('../../../modules/_entry-virtual')('String').anchor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/at.js b/node_modules/core-js/fn/string/virtual/at.js
deleted file mode 100644
index 3b9614386..000000000
--- a/node_modules/core-js/fn/string/virtual/at.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.at');
-module.exports = require('../../../modules/_entry-virtual')('String').at; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/big.js b/node_modules/core-js/fn/string/virtual/big.js
deleted file mode 100644
index 57ac7d5de..000000000
--- a/node_modules/core-js/fn/string/virtual/big.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.big');
-module.exports = require('../../../modules/_entry-virtual')('String').big; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/blink.js b/node_modules/core-js/fn/string/virtual/blink.js
deleted file mode 100644
index 5c4cea80f..000000000
--- a/node_modules/core-js/fn/string/virtual/blink.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.blink');
-module.exports = require('../../../modules/_entry-virtual')('String').blink; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/bold.js b/node_modules/core-js/fn/string/virtual/bold.js
deleted file mode 100644
index c566bf2d9..000000000
--- a/node_modules/core-js/fn/string/virtual/bold.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.bold');
-module.exports = require('../../../modules/_entry-virtual')('String').bold; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/code-point-at.js b/node_modules/core-js/fn/string/virtual/code-point-at.js
deleted file mode 100644
index 873752191..000000000
--- a/node_modules/core-js/fn/string/virtual/code-point-at.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.code-point-at');
-module.exports = require('../../../modules/_entry-virtual')('String').codePointAt; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/ends-with.js b/node_modules/core-js/fn/string/virtual/ends-with.js
deleted file mode 100644
index 90bc6e79e..000000000
--- a/node_modules/core-js/fn/string/virtual/ends-with.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.ends-with');
-module.exports = require('../../../modules/_entry-virtual')('String').endsWith; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/escape-html.js b/node_modules/core-js/fn/string/virtual/escape-html.js
deleted file mode 100644
index 3342bcec9..000000000
--- a/node_modules/core-js/fn/string/virtual/escape-html.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.string.escape-html');
-module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/fixed.js b/node_modules/core-js/fn/string/virtual/fixed.js
deleted file mode 100644
index e830654f2..000000000
--- a/node_modules/core-js/fn/string/virtual/fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fixed');
-module.exports = require('../../../modules/_entry-virtual')('String').fixed; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/fontcolor.js b/node_modules/core-js/fn/string/virtual/fontcolor.js
deleted file mode 100644
index cfb9b2c09..000000000
--- a/node_modules/core-js/fn/string/virtual/fontcolor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fontcolor');
-module.exports = require('../../../modules/_entry-virtual')('String').fontcolor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/fontsize.js b/node_modules/core-js/fn/string/virtual/fontsize.js
deleted file mode 100644
index de8f5161a..000000000
--- a/node_modules/core-js/fn/string/virtual/fontsize.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fontsize');
-module.exports = require('../../../modules/_entry-virtual')('String').fontsize; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/includes.js b/node_modules/core-js/fn/string/virtual/includes.js
deleted file mode 100644
index 1e4793d67..000000000
--- a/node_modules/core-js/fn/string/virtual/includes.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.includes');
-module.exports = require('../../../modules/_entry-virtual')('String').includes; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/index.js b/node_modules/core-js/fn/string/virtual/index.js
deleted file mode 100644
index 0e65d20c4..000000000
--- a/node_modules/core-js/fn/string/virtual/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-require('../../../modules/es6.string.trim');
-require('../../../modules/es6.string.iterator');
-require('../../../modules/es6.string.code-point-at');
-require('../../../modules/es6.string.ends-with');
-require('../../../modules/es6.string.includes');
-require('../../../modules/es6.string.repeat');
-require('../../../modules/es6.string.starts-with');
-require('../../../modules/es6.regexp.match');
-require('../../../modules/es6.regexp.replace');
-require('../../../modules/es6.regexp.search');
-require('../../../modules/es6.regexp.split');
-require('../../../modules/es6.string.anchor');
-require('../../../modules/es6.string.big');
-require('../../../modules/es6.string.blink');
-require('../../../modules/es6.string.bold');
-require('../../../modules/es6.string.fixed');
-require('../../../modules/es6.string.fontcolor');
-require('../../../modules/es6.string.fontsize');
-require('../../../modules/es6.string.italics');
-require('../../../modules/es6.string.link');
-require('../../../modules/es6.string.small');
-require('../../../modules/es6.string.strike');
-require('../../../modules/es6.string.sub');
-require('../../../modules/es6.string.sup');
-require('../../../modules/es7.string.at');
-require('../../../modules/es7.string.pad-start');
-require('../../../modules/es7.string.pad-end');
-require('../../../modules/es7.string.trim-left');
-require('../../../modules/es7.string.trim-right');
-require('../../../modules/es7.string.match-all');
-require('../../../modules/core.string.escape-html');
-require('../../../modules/core.string.unescape-html');
-module.exports = require('../../../modules/_entry-virtual')('String');
diff --git a/node_modules/core-js/fn/string/virtual/italics.js b/node_modules/core-js/fn/string/virtual/italics.js
deleted file mode 100644
index f8f1d3381..000000000
--- a/node_modules/core-js/fn/string/virtual/italics.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.italics');
-module.exports = require('../../../modules/_entry-virtual')('String').italics; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/iterator.js b/node_modules/core-js/fn/string/virtual/iterator.js
deleted file mode 100644
index 7efe2f93a..000000000
--- a/node_modules/core-js/fn/string/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').String; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/link.js b/node_modules/core-js/fn/string/virtual/link.js
deleted file mode 100644
index 4b2eea8a5..000000000
--- a/node_modules/core-js/fn/string/virtual/link.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.link');
-module.exports = require('../../../modules/_entry-virtual')('String').link; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/match-all.js b/node_modules/core-js/fn/string/virtual/match-all.js
deleted file mode 100644
index 9208873a7..000000000
--- a/node_modules/core-js/fn/string/virtual/match-all.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.match-all');
-module.exports = require('../../../modules/_entry-virtual')('String').matchAll; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/pad-end.js b/node_modules/core-js/fn/string/virtual/pad-end.js
deleted file mode 100644
index 81e5ac046..000000000
--- a/node_modules/core-js/fn/string/virtual/pad-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.pad-end');
-module.exports = require('../../../modules/_entry-virtual')('String').padEnd; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/pad-start.js b/node_modules/core-js/fn/string/virtual/pad-start.js
deleted file mode 100644
index 54cf3a59b..000000000
--- a/node_modules/core-js/fn/string/virtual/pad-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.pad-start');
-module.exports = require('../../../modules/_entry-virtual')('String').padStart; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/repeat.js b/node_modules/core-js/fn/string/virtual/repeat.js
deleted file mode 100644
index d08cf6a5e..000000000
--- a/node_modules/core-js/fn/string/virtual/repeat.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.repeat');
-module.exports = require('../../../modules/_entry-virtual')('String').repeat; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/small.js b/node_modules/core-js/fn/string/virtual/small.js
deleted file mode 100644
index 201bf9b6a..000000000
--- a/node_modules/core-js/fn/string/virtual/small.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.small');
-module.exports = require('../../../modules/_entry-virtual')('String').small; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/starts-with.js b/node_modules/core-js/fn/string/virtual/starts-with.js
deleted file mode 100644
index f8897d153..000000000
--- a/node_modules/core-js/fn/string/virtual/starts-with.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.starts-with');
-module.exports = require('../../../modules/_entry-virtual')('String').startsWith; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/strike.js b/node_modules/core-js/fn/string/virtual/strike.js
deleted file mode 100644
index 4572db915..000000000
--- a/node_modules/core-js/fn/string/virtual/strike.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.strike');
-module.exports = require('../../../modules/_entry-virtual')('String').strike; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/sub.js b/node_modules/core-js/fn/string/virtual/sub.js
deleted file mode 100644
index a13611ecc..000000000
--- a/node_modules/core-js/fn/string/virtual/sub.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.sub');
-module.exports = require('../../../modules/_entry-virtual')('String').sub; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/sup.js b/node_modules/core-js/fn/string/virtual/sup.js
deleted file mode 100644
index 07695329c..000000000
--- a/node_modules/core-js/fn/string/virtual/sup.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.sup');
-module.exports = require('../../../modules/_entry-virtual')('String').sup; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/trim-end.js b/node_modules/core-js/fn/string/virtual/trim-end.js
deleted file mode 100644
index 14c25ac84..000000000
--- a/node_modules/core-js/fn/string/virtual/trim-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-right');
-module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/trim-left.js b/node_modules/core-js/fn/string/virtual/trim-left.js
deleted file mode 100644
index aabcfb3f3..000000000
--- a/node_modules/core-js/fn/string/virtual/trim-left.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-left');
-module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/trim-right.js b/node_modules/core-js/fn/string/virtual/trim-right.js
deleted file mode 100644
index 14c25ac84..000000000
--- a/node_modules/core-js/fn/string/virtual/trim-right.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-right');
-module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/trim-start.js b/node_modules/core-js/fn/string/virtual/trim-start.js
deleted file mode 100644
index aabcfb3f3..000000000
--- a/node_modules/core-js/fn/string/virtual/trim-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-left');
-module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/trim.js b/node_modules/core-js/fn/string/virtual/trim.js
deleted file mode 100644
index 23fbcbc50..000000000
--- a/node_modules/core-js/fn/string/virtual/trim.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.trim');
-module.exports = require('../../../modules/_entry-virtual')('String').trim; \ No newline at end of file
diff --git a/node_modules/core-js/fn/string/virtual/unescape-html.js b/node_modules/core-js/fn/string/virtual/unescape-html.js
deleted file mode 100644
index 51eb59fc5..000000000
--- a/node_modules/core-js/fn/string/virtual/unescape-html.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.string.unescape-html');
-module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/async-iterator.js b/node_modules/core-js/fn/symbol/async-iterator.js
deleted file mode 100644
index aca10f966..000000000
--- a/node_modules/core-js/fn/symbol/async-iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.symbol.async-iterator');
-module.exports = require('../../modules/_wks-ext').f('asyncIterator'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/for.js b/node_modules/core-js/fn/symbol/for.js
index c9e93c139..1b05275d2 100644
--- a/node_modules/core-js/fn/symbol/for.js
+++ b/node_modules/core-js/fn/symbol/for.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Symbol['for']; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol['for']; \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/has-instance.js b/node_modules/core-js/fn/symbol/has-instance.js
index f3ec9cf6b..b264f990f 100644
--- a/node_modules/core-js/fn/symbol/has-instance.js
+++ b/node_modules/core-js/fn/symbol/has-instance.js
@@ -1,2 +1 @@
-require('../../modules/es6.function.has-instance');
-module.exports = require('../../modules/_wks-ext').f('hasInstance'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('hasInstance'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/index.js b/node_modules/core-js/fn/symbol/index.js
index 64c0f5f47..c8f81d180 100644
--- a/node_modules/core-js/fn/symbol/index.js
+++ b/node_modules/core-js/fn/symbol/index.js
@@ -1,5 +1,3 @@
require('../../modules/es6.symbol');
require('../../modules/es6.object.to-string');
-require('../../modules/es7.symbol.async-iterator');
-require('../../modules/es7.symbol.observable');
-module.exports = require('../../modules/_core').Symbol; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/is-concat-spreadable.js b/node_modules/core-js/fn/symbol/is-concat-spreadable.js
index 49ed7a1d2..17d5a2669 100644
--- a/node_modules/core-js/fn/symbol/is-concat-spreadable.js
+++ b/node_modules/core-js/fn/symbol/is-concat-spreadable.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('isConcatSpreadable'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/iterator.js b/node_modules/core-js/fn/symbol/iterator.js
index 503522809..7e1b7985f 100644
--- a/node_modules/core-js/fn/symbol/iterator.js
+++ b/node_modules/core-js/fn/symbol/iterator.js
@@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/web.dom.iterable');
-module.exports = require('../../modules/_wks-ext').f('iterator'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('iterator'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/key-for.js b/node_modules/core-js/fn/symbol/key-for.js
index d9b595ff1..e62b1abd9 100644
--- a/node_modules/core-js/fn/symbol/key-for.js
+++ b/node_modules/core-js/fn/symbol/key-for.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Symbol.keyFor; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol.keyFor; \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/match.js b/node_modules/core-js/fn/symbol/match.js
index d27db65b6..d25c1196d 100644
--- a/node_modules/core-js/fn/symbol/match.js
+++ b/node_modules/core-js/fn/symbol/match.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.match');
-module.exports = require('../../modules/_wks-ext').f('match'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('match'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/observable.js b/node_modules/core-js/fn/symbol/observable.js
deleted file mode 100644
index 884cebfdf..000000000
--- a/node_modules/core-js/fn/symbol/observable.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.symbol.observable');
-module.exports = require('../../modules/_wks-ext').f('observable'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/replace.js b/node_modules/core-js/fn/symbol/replace.js
index 3ef60f5e9..ce3154b91 100644
--- a/node_modules/core-js/fn/symbol/replace.js
+++ b/node_modules/core-js/fn/symbol/replace.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.replace');
-module.exports = require('../../modules/_wks-ext').f('replace'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('replace'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/search.js b/node_modules/core-js/fn/symbol/search.js
index aee84f9e6..ad781d404 100644
--- a/node_modules/core-js/fn/symbol/search.js
+++ b/node_modules/core-js/fn/symbol/search.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.search');
-module.exports = require('../../modules/_wks-ext').f('search'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('search'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/species.js b/node_modules/core-js/fn/symbol/species.js
index a425eb2da..de937d752 100644
--- a/node_modules/core-js/fn/symbol/species.js
+++ b/node_modules/core-js/fn/symbol/species.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('species'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('species'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/split.js b/node_modules/core-js/fn/symbol/split.js
index 8535932fb..27c516672 100644
--- a/node_modules/core-js/fn/symbol/split.js
+++ b/node_modules/core-js/fn/symbol/split.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.split');
-module.exports = require('../../modules/_wks-ext').f('split'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('split'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/to-primitive.js b/node_modules/core-js/fn/symbol/to-primitive.js
index 20c831b85..129eb8b28 100644
--- a/node_modules/core-js/fn/symbol/to-primitive.js
+++ b/node_modules/core-js/fn/symbol/to-primitive.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('toPrimitive'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('toPrimitive'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/to-string-tag.js b/node_modules/core-js/fn/symbol/to-string-tag.js
index 101baf27c..fc22c861a 100644
--- a/node_modules/core-js/fn/symbol/to-string-tag.js
+++ b/node_modules/core-js/fn/symbol/to-string-tag.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_wks-ext').f('toStringTag'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('toStringTag'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/symbol/unscopables.js b/node_modules/core-js/fn/symbol/unscopables.js
index 6c4146b23..399397007 100644
--- a/node_modules/core-js/fn/symbol/unscopables.js
+++ b/node_modules/core-js/fn/symbol/unscopables.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('unscopables'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('unscopables'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/system/global.js b/node_modules/core-js/fn/system/global.js
deleted file mode 100644
index c3219d6f3..000000000
--- a/node_modules/core-js/fn/system/global.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.system.global');
-module.exports = require('../../modules/_core').System.global; \ No newline at end of file
diff --git a/node_modules/core-js/fn/system/index.js b/node_modules/core-js/fn/system/index.js
deleted file mode 100644
index eae78ddd6..000000000
--- a/node_modules/core-js/fn/system/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.system.global');
-module.exports = require('../../modules/_core').System; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/array-buffer.js b/node_modules/core-js/fn/typed/array-buffer.js
deleted file mode 100644
index fe08f7f24..000000000
--- a/node_modules/core-js/fn/typed/array-buffer.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.typed.array-buffer');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core').ArrayBuffer; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/data-view.js b/node_modules/core-js/fn/typed/data-view.js
deleted file mode 100644
index 09dbb38aa..000000000
--- a/node_modules/core-js/fn/typed/data-view.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.typed.data-view');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core').DataView; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/float32-array.js b/node_modules/core-js/fn/typed/float32-array.js
deleted file mode 100644
index 1191fecb9..000000000
--- a/node_modules/core-js/fn/typed/float32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.float32-array');
-module.exports = require('../../modules/_core').Float32Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/float64-array.js b/node_modules/core-js/fn/typed/float64-array.js
deleted file mode 100644
index 6073a6824..000000000
--- a/node_modules/core-js/fn/typed/float64-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.float64-array');
-module.exports = require('../../modules/_core').Float64Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/index.js b/node_modules/core-js/fn/typed/index.js
deleted file mode 100644
index 7babe09d3..000000000
--- a/node_modules/core-js/fn/typed/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-require('../../modules/es6.typed.array-buffer');
-require('../../modules/es6.typed.data-view');
-require('../../modules/es6.typed.int8-array');
-require('../../modules/es6.typed.uint8-array');
-require('../../modules/es6.typed.uint8-clamped-array');
-require('../../modules/es6.typed.int16-array');
-require('../../modules/es6.typed.uint16-array');
-require('../../modules/es6.typed.int32-array');
-require('../../modules/es6.typed.uint32-array');
-require('../../modules/es6.typed.float32-array');
-require('../../modules/es6.typed.float64-array');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/int16-array.js b/node_modules/core-js/fn/typed/int16-array.js
deleted file mode 100644
index 0722549d3..000000000
--- a/node_modules/core-js/fn/typed/int16-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int16-array');
-module.exports = require('../../modules/_core').Int16Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/int32-array.js b/node_modules/core-js/fn/typed/int32-array.js
deleted file mode 100644
index 136136221..000000000
--- a/node_modules/core-js/fn/typed/int32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int32-array');
-module.exports = require('../../modules/_core').Int32Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/int8-array.js b/node_modules/core-js/fn/typed/int8-array.js
deleted file mode 100644
index edf48c792..000000000
--- a/node_modules/core-js/fn/typed/int8-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int8-array');
-module.exports = require('../../modules/_core').Int8Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/uint16-array.js b/node_modules/core-js/fn/typed/uint16-array.js
deleted file mode 100644
index 3ff11550e..000000000
--- a/node_modules/core-js/fn/typed/uint16-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint16-array');
-module.exports = require('../../modules/_core').Uint16Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/uint32-array.js b/node_modules/core-js/fn/typed/uint32-array.js
deleted file mode 100644
index 47bb4c211..000000000
--- a/node_modules/core-js/fn/typed/uint32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint32-array');
-module.exports = require('../../modules/_core').Uint32Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/uint8-array.js b/node_modules/core-js/fn/typed/uint8-array.js
deleted file mode 100644
index fd8a4b114..000000000
--- a/node_modules/core-js/fn/typed/uint8-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint8-array');
-module.exports = require('../../modules/_core').Uint8Array; \ No newline at end of file
diff --git a/node_modules/core-js/fn/typed/uint8-clamped-array.js b/node_modules/core-js/fn/typed/uint8-clamped-array.js
deleted file mode 100644
index c688657c5..000000000
--- a/node_modules/core-js/fn/typed/uint8-clamped-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint8-clamped-array');
-module.exports = require('../../modules/_core').Uint8ClampedArray; \ No newline at end of file
diff --git a/node_modules/core-js/fn/weak-map.js b/node_modules/core-js/fn/weak-map.js
index 00cac1adb..ebf46e6a5 100644
--- a/node_modules/core-js/fn/weak-map.js
+++ b/node_modules/core-js/fn/weak-map.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-map');
-module.exports = require('../modules/_core').WeakMap; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakMap; \ No newline at end of file
diff --git a/node_modules/core-js/fn/weak-set.js b/node_modules/core-js/fn/weak-set.js
index eef1af2a8..a058c8a6a 100644
--- a/node_modules/core-js/fn/weak-set.js
+++ b/node_modules/core-js/fn/weak-set.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-set');
-module.exports = require('../modules/_core').WeakSet; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakSet; \ No newline at end of file
diff --git a/node_modules/core-js/index.js b/node_modules/core-js/index.js
index 78b9e3d4b..9acb1b4ad 100644
--- a/node_modules/core-js/index.js
+++ b/node_modules/core-js/index.js
@@ -10,7 +10,7 @@ require('./modules/core.object.classof');
require('./modules/core.object.define');
require('./modules/core.object.make');
require('./modules/core.number.iterator');
-require('./modules/core.regexp.escape');
require('./modules/core.string.escape-html');
require('./modules/core.string.unescape-html');
-module.exports = require('./modules/_core'); \ No newline at end of file
+require('./modules/core.log');
+module.exports = require('./modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/core/_.js b/node_modules/core-js/library/core/_.js
index 8a99f7062..475a66cdf 100644
--- a/node_modules/core-js/library/core/_.js
+++ b/node_modules/core-js/library/core/_.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core')._; \ No newline at end of file
+module.exports = require('../modules/$.core')._; \ No newline at end of file
diff --git a/node_modules/core-js/library/core/delay.js b/node_modules/core-js/library/core/delay.js
index 188573884..1ff9a56d5 100644
--- a/node_modules/core-js/library/core/delay.js
+++ b/node_modules/core-js/library/core/delay.js
@@ -1,2 +1,2 @@
require('../modules/core.delay');
-module.exports = require('../modules/_core').delay;
+module.exports = require('../modules/$.core').delay;
diff --git a/node_modules/core-js/library/core/dict.js b/node_modules/core-js/library/core/dict.js
index da84a8d88..ed848e2c2 100644
--- a/node_modules/core-js/library/core/dict.js
+++ b/node_modules/core-js/library/core/dict.js
@@ -1,2 +1,2 @@
require('../modules/core.dict');
-module.exports = require('../modules/_core').Dict; \ No newline at end of file
+module.exports = require('../modules/$.core').Dict; \ No newline at end of file
diff --git a/node_modules/core-js/library/core/function.js b/node_modules/core-js/library/core/function.js
index 3b8d01317..42b6dbb84 100644
--- a/node_modules/core-js/library/core/function.js
+++ b/node_modules/core-js/library/core/function.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core').Function;
+module.exports = require('../modules/$.core').Function;
diff --git a/node_modules/core-js/library/core/index.js b/node_modules/core-js/library/core/index.js
index 2b20fd9ec..3d50bdb63 100644
--- a/node_modules/core-js/library/core/index.js
+++ b/node_modules/core-js/library/core/index.js
@@ -9,7 +9,7 @@ require('../modules/core.object.classof');
require('../modules/core.object.define');
require('../modules/core.object.make');
require('../modules/core.number.iterator');
-require('../modules/core.regexp.escape');
require('../modules/core.string.escape-html');
require('../modules/core.string.unescape-html');
-module.exports = require('../modules/_core');
+require('../modules/core.log');
+module.exports = require('../modules/$.core');
diff --git a/node_modules/core-js/library/core/number.js b/node_modules/core-js/library/core/number.js
index 62f632c51..6e3cdbf6f 100644
--- a/node_modules/core-js/library/core/number.js
+++ b/node_modules/core-js/library/core/number.js
@@ -1,2 +1,2 @@
require('../modules/core.number.iterator');
-module.exports = require('../modules/_core').Number; \ No newline at end of file
+module.exports = require('../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/core/object.js b/node_modules/core-js/library/core/object.js
index 04e539c90..63325663a 100644
--- a/node_modules/core-js/library/core/object.js
+++ b/node_modules/core-js/library/core/object.js
@@ -2,4 +2,4 @@ require('../modules/core.object.is-object');
require('../modules/core.object.classof');
require('../modules/core.object.define');
require('../modules/core.object.make');
-module.exports = require('../modules/_core').Object;
+module.exports = require('../modules/$.core').Object;
diff --git a/node_modules/core-js/library/core/regexp.js b/node_modules/core-js/library/core/regexp.js
deleted file mode 100644
index 3e04c5119..000000000
--- a/node_modules/core-js/library/core/regexp.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/core.regexp.escape');
-module.exports = require('../modules/_core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/library/core/string.js b/node_modules/core-js/library/core/string.js
index 8da740c6e..829e0c61e 100644
--- a/node_modules/core-js/library/core/string.js
+++ b/node_modules/core-js/library/core/string.js
@@ -1,3 +1,3 @@
require('../modules/core.string.escape-html');
require('../modules/core.string.unescape-html');
-module.exports = require('../modules/_core').String; \ No newline at end of file
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/library/es5/index.js b/node_modules/core-js/library/es5/index.js
index 580f1a670..3c23364a8 100644
--- a/node_modules/core-js/library/es5/index.js
+++ b/node_modules/core-js/library/es5/index.js
@@ -1,37 +1,9 @@
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es5');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.function.bind');
-require('../modules/es6.array.is-array');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-json');
-require('../modules/es6.parse-int');
-require('../modules/es6.parse-float');
require('../modules/es6.string.trim');
-require('../modules/es6.regexp.to-string');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/array.js b/node_modules/core-js/library/es6/array.js
index 428d3e8c4..36629ca04 100644
--- a/node_modules/core-js/library/es6/array.js
+++ b/node_modules/core-js/library/es6/array.js
@@ -1,23 +1,10 @@
require('../modules/es6.string.iterator');
-require('../modules/es6.array.is-array');
require('../modules/es6.array.from');
require('../modules/es6.array.of');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
+require('../modules/es6.array.species');
+require('../modules/es6.array.iterator');
require('../modules/es6.array.copy-within');
require('../modules/es6.array.fill');
require('../modules/es6.array.find');
require('../modules/es6.array.find-index');
-require('../modules/es6.array.species');
-require('../modules/es6.array.iterator');
-module.exports = require('../modules/_core').Array; \ No newline at end of file
+module.exports = require('../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/date.js b/node_modules/core-js/library/es6/date.js
deleted file mode 100644
index dfa3be09d..000000000
--- a/node_modules/core-js/library/es6/date.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-json');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-string');
-require('../modules/es6.date.to-primitive');
-module.exports = Date; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/function.js b/node_modules/core-js/library/es6/function.js
index ff685da27..3e61dcd46 100644
--- a/node_modules/core-js/library/es6/function.js
+++ b/node_modules/core-js/library/es6/function.js
@@ -1,4 +1,3 @@
-require('../modules/es6.function.bind');
require('../modules/es6.function.name');
require('../modules/es6.function.has-instance');
-module.exports = require('../modules/_core').Function; \ No newline at end of file
+module.exports = require('../modules/$.core').Function; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/index.js b/node_modules/core-js/library/es6/index.js
index 59df50921..b9fc80be6 100644
--- a/node_modules/core-js/library/es6/index.js
+++ b/node_modules/core-js/library/es6/index.js
@@ -1,29 +1,21 @@
require('../modules/es6.symbol');
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es6.object.assign');
+require('../modules/es6.object.is');
+require('../modules/es6.object.set-prototype-of');
+require('../modules/es6.object.to-string');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.object.assign');
-require('../modules/es6.object.is');
-require('../modules/es6.object.set-prototype-of');
-require('../modules/es6.object.to-string');
-require('../modules/es6.function.bind');
+require('../modules/es6.object.get-own-property-descriptor');
+require('../modules/es6.object.get-prototype-of');
+require('../modules/es6.object.keys');
+require('../modules/es6.object.get-own-property-names');
require('../modules/es6.function.name');
require('../modules/es6.function.has-instance');
-require('../modules/es6.parse-int');
-require('../modules/es6.parse-float');
require('../modules/es6.number.constructor');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
require('../modules/es6.number.epsilon');
require('../modules/es6.number.is-finite');
require('../modules/es6.number.is-integer');
@@ -59,47 +51,15 @@ require('../modules/es6.string.ends-with');
require('../modules/es6.string.includes');
require('../modules/es6.string.repeat');
require('../modules/es6.string.starts-with');
-require('../modules/es6.string.anchor');
-require('../modules/es6.string.big');
-require('../modules/es6.string.blink');
-require('../modules/es6.string.bold');
-require('../modules/es6.string.fixed');
-require('../modules/es6.string.fontcolor');
-require('../modules/es6.string.fontsize');
-require('../modules/es6.string.italics');
-require('../modules/es6.string.link');
-require('../modules/es6.string.small');
-require('../modules/es6.string.strike');
-require('../modules/es6.string.sub');
-require('../modules/es6.string.sup');
-require('../modules/es6.date.now');
-require('../modules/es6.date.to-json');
-require('../modules/es6.date.to-iso-string');
-require('../modules/es6.date.to-string');
-require('../modules/es6.date.to-primitive');
-require('../modules/es6.array.is-array');
require('../modules/es6.array.from');
require('../modules/es6.array.of');
-require('../modules/es6.array.join');
-require('../modules/es6.array.slice');
-require('../modules/es6.array.sort');
-require('../modules/es6.array.for-each');
-require('../modules/es6.array.map');
-require('../modules/es6.array.filter');
-require('../modules/es6.array.some');
-require('../modules/es6.array.every');
-require('../modules/es6.array.reduce');
-require('../modules/es6.array.reduce-right');
-require('../modules/es6.array.index-of');
-require('../modules/es6.array.last-index-of');
+require('../modules/es6.array.species');
+require('../modules/es6.array.iterator');
require('../modules/es6.array.copy-within');
require('../modules/es6.array.fill');
require('../modules/es6.array.find');
require('../modules/es6.array.find-index');
-require('../modules/es6.array.species');
-require('../modules/es6.array.iterator');
require('../modules/es6.regexp.constructor');
-require('../modules/es6.regexp.to-string');
require('../modules/es6.regexp.flags');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
@@ -110,17 +70,6 @@ require('../modules/es6.map');
require('../modules/es6.set');
require('../modules/es6.weak-map');
require('../modules/es6.weak-set');
-require('../modules/es6.typed.array-buffer');
-require('../modules/es6.typed.data-view');
-require('../modules/es6.typed.int8-array');
-require('../modules/es6.typed.uint8-array');
-require('../modules/es6.typed.uint8-clamped-array');
-require('../modules/es6.typed.int16-array');
-require('../modules/es6.typed.uint16-array');
-require('../modules/es6.typed.int32-array');
-require('../modules/es6.typed.uint32-array');
-require('../modules/es6.typed.float32-array');
-require('../modules/es6.typed.float64-array');
require('../modules/es6.reflect.apply');
require('../modules/es6.reflect.construct');
require('../modules/es6.reflect.define-property');
@@ -135,4 +84,4 @@ require('../modules/es6.reflect.own-keys');
require('../modules/es6.reflect.prevent-extensions');
require('../modules/es6.reflect.set');
require('../modules/es6.reflect.set-prototype-of');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/map.js b/node_modules/core-js/library/es6/map.js
index 50f04c1f2..521a192e4 100644
--- a/node_modules/core-js/library/es6/map.js
+++ b/node_modules/core-js/library/es6/map.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.map');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/math.js b/node_modules/core-js/library/es6/math.js
index f26b5b296..8b5a2e799 100644
--- a/node_modules/core-js/library/es6/math.js
+++ b/node_modules/core-js/library/es6/math.js
@@ -15,4 +15,4 @@ require('../modules/es6.math.sign');
require('../modules/es6.math.sinh');
require('../modules/es6.math.tanh');
require('../modules/es6.math.trunc');
-module.exports = require('../modules/_core').Math; \ No newline at end of file
+module.exports = require('../modules/$.core').Math; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/number.js b/node_modules/core-js/library/es6/number.js
index 1dafcda43..8f4877031 100644
--- a/node_modules/core-js/library/es6/number.js
+++ b/node_modules/core-js/library/es6/number.js
@@ -1,6 +1,4 @@
require('../modules/es6.number.constructor');
-require('../modules/es6.number.to-fixed');
-require('../modules/es6.number.to-precision');
require('../modules/es6.number.epsilon');
require('../modules/es6.number.is-finite');
require('../modules/es6.number.is-integer');
@@ -10,4 +8,4 @@ require('../modules/es6.number.max-safe-integer');
require('../modules/es6.number.min-safe-integer');
require('../modules/es6.number.parse-float');
require('../modules/es6.number.parse-int');
-module.exports = require('../modules/_core').Number; \ No newline at end of file
+module.exports = require('../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/object.js b/node_modules/core-js/library/es6/object.js
index aada8c38f..94af189f5 100644
--- a/node_modules/core-js/library/es6/object.js
+++ b/node_modules/core-js/library/es6/object.js
@@ -1,20 +1,17 @@
require('../modules/es6.symbol');
-require('../modules/es6.object.create');
-require('../modules/es6.object.define-property');
-require('../modules/es6.object.define-properties');
-require('../modules/es6.object.get-own-property-descriptor');
-require('../modules/es6.object.get-prototype-of');
-require('../modules/es6.object.keys');
-require('../modules/es6.object.get-own-property-names');
+require('../modules/es6.object.assign');
+require('../modules/es6.object.is');
+require('../modules/es6.object.set-prototype-of');
+require('../modules/es6.object.to-string');
require('../modules/es6.object.freeze');
require('../modules/es6.object.seal');
require('../modules/es6.object.prevent-extensions');
require('../modules/es6.object.is-frozen');
require('../modules/es6.object.is-sealed');
require('../modules/es6.object.is-extensible');
-require('../modules/es6.object.assign');
-require('../modules/es6.object.is');
-require('../modules/es6.object.set-prototype-of');
-require('../modules/es6.object.to-string');
+require('../modules/es6.object.get-own-property-descriptor');
+require('../modules/es6.object.get-prototype-of');
+require('../modules/es6.object.keys');
+require('../modules/es6.object.get-own-property-names');
-module.exports = require('../modules/_core').Object; \ No newline at end of file
+module.exports = require('../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/parse-float.js b/node_modules/core-js/library/es6/parse-float.js
deleted file mode 100644
index dad94ddbe..000000000
--- a/node_modules/core-js/library/es6/parse-float.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-float');
-module.exports = require('../modules/_core').parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/parse-int.js b/node_modules/core-js/library/es6/parse-int.js
deleted file mode 100644
index 08a20996b..000000000
--- a/node_modules/core-js/library/es6/parse-int.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-int');
-module.exports = require('../modules/_core').parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/promise.js b/node_modules/core-js/library/es6/promise.js
index c901c8595..0a0996139 100644
--- a/node_modules/core-js/library/es6/promise.js
+++ b/node_modules/core-js/library/es6/promise.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.promise');
-module.exports = require('../modules/_core').Promise; \ No newline at end of file
+module.exports = require('../modules/$.core').Promise; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/reflect.js b/node_modules/core-js/library/es6/reflect.js
index 18bdb3c2e..3c2f74eb8 100644
--- a/node_modules/core-js/library/es6/reflect.js
+++ b/node_modules/core-js/library/es6/reflect.js
@@ -12,4 +12,4 @@ require('../modules/es6.reflect.own-keys');
require('../modules/es6.reflect.prevent-extensions');
require('../modules/es6.reflect.set');
require('../modules/es6.reflect.set-prototype-of');
-module.exports = require('../modules/_core').Reflect; \ No newline at end of file
+module.exports = require('../modules/$.core').Reflect; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/regexp.js b/node_modules/core-js/library/es6/regexp.js
index 27cc827f9..195d36d43 100644
--- a/node_modules/core-js/library/es6/regexp.js
+++ b/node_modules/core-js/library/es6/regexp.js
@@ -1,8 +1,7 @@
require('../modules/es6.regexp.constructor');
-require('../modules/es6.regexp.to-string');
require('../modules/es6.regexp.flags');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
require('../modules/es6.regexp.search');
require('../modules/es6.regexp.split');
-module.exports = require('../modules/_core').RegExp; \ No newline at end of file
+module.exports = require('../modules/$.core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/set.js b/node_modules/core-js/library/es6/set.js
index 2a2557ced..6a84f5891 100644
--- a/node_modules/core-js/library/es6/set.js
+++ b/node_modules/core-js/library/es6/set.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.set');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/string.js b/node_modules/core-js/library/es6/string.js
index 83033621f..bc7a1ab10 100644
--- a/node_modules/core-js/library/es6/string.js
+++ b/node_modules/core-js/library/es6/string.js
@@ -7,21 +7,8 @@ require('../modules/es6.string.ends-with');
require('../modules/es6.string.includes');
require('../modules/es6.string.repeat');
require('../modules/es6.string.starts-with');
-require('../modules/es6.string.anchor');
-require('../modules/es6.string.big');
-require('../modules/es6.string.blink');
-require('../modules/es6.string.bold');
-require('../modules/es6.string.fixed');
-require('../modules/es6.string.fontcolor');
-require('../modules/es6.string.fontsize');
-require('../modules/es6.string.italics');
-require('../modules/es6.string.link');
-require('../modules/es6.string.small');
-require('../modules/es6.string.strike');
-require('../modules/es6.string.sub');
-require('../modules/es6.string.sup');
require('../modules/es6.regexp.match');
require('../modules/es6.regexp.replace');
require('../modules/es6.regexp.search');
require('../modules/es6.regexp.split');
-module.exports = require('../modules/_core').String; \ No newline at end of file
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/symbol.js b/node_modules/core-js/library/es6/symbol.js
index e578e3af3..ae2405b51 100644
--- a/node_modules/core-js/library/es6/symbol.js
+++ b/node_modules/core-js/library/es6/symbol.js
@@ -1,3 +1,3 @@
require('../modules/es6.symbol');
require('../modules/es6.object.to-string');
-module.exports = require('../modules/_core').Symbol; \ No newline at end of file
+module.exports = require('../modules/$.core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/typed.js b/node_modules/core-js/library/es6/typed.js
deleted file mode 100644
index e0364e6c8..000000000
--- a/node_modules/core-js/library/es6/typed.js
+++ /dev/null
@@ -1,13 +0,0 @@
-require('../modules/es6.typed.array-buffer');
-require('../modules/es6.typed.data-view');
-require('../modules/es6.typed.int8-array');
-require('../modules/es6.typed.uint8-array');
-require('../modules/es6.typed.uint8-clamped-array');
-require('../modules/es6.typed.int16-array');
-require('../modules/es6.typed.uint16-array');
-require('../modules/es6.typed.int32-array');
-require('../modules/es6.typed.uint32-array');
-require('../modules/es6.typed.float32-array');
-require('../modules/es6.typed.float64-array');
-require('../modules/es6.object.to-string');
-module.exports = require('../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/weak-map.js b/node_modules/core-js/library/es6/weak-map.js
index 655866c2d..f2c6db892 100644
--- a/node_modules/core-js/library/es6/weak-map.js
+++ b/node_modules/core-js/library/es6/weak-map.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/es6.array.iterator');
require('../modules/es6.weak-map');
-module.exports = require('../modules/_core').WeakMap; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakMap; \ No newline at end of file
diff --git a/node_modules/core-js/library/es6/weak-set.js b/node_modules/core-js/library/es6/weak-set.js
index eef1af2a8..a058c8a6a 100644
--- a/node_modules/core-js/library/es6/weak-set.js
+++ b/node_modules/core-js/library/es6/weak-set.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-set');
-module.exports = require('../modules/_core').WeakSet; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakSet; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/array.js b/node_modules/core-js/library/es7/array.js
index 9fb57fa64..e58f90579 100644
--- a/node_modules/core-js/library/es7/array.js
+++ b/node_modules/core-js/library/es7/array.js
@@ -1,2 +1,2 @@
require('../modules/es7.array.includes');
-module.exports = require('../modules/_core').Array; \ No newline at end of file
+module.exports = require('../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/asap.js b/node_modules/core-js/library/es7/asap.js
deleted file mode 100644
index cc90f7e54..000000000
--- a/node_modules/core-js/library/es7/asap.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.asap');
-module.exports = require('../modules/_core').asap;
diff --git a/node_modules/core-js/library/es7/error.js b/node_modules/core-js/library/es7/error.js
deleted file mode 100644
index f0bb260b5..000000000
--- a/node_modules/core-js/library/es7/error.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.error.is-error');
-module.exports = require('../modules/_core').Error; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/index.js b/node_modules/core-js/library/es7/index.js
index b8c90b86e..a277b6398 100644
--- a/node_modules/core-js/library/es7/index.js
+++ b/node_modules/core-js/library/es7/index.js
@@ -1,36 +1,13 @@
require('../modules/es7.array.includes');
require('../modules/es7.string.at');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
+require('../modules/es7.string.pad-left');
+require('../modules/es7.string.pad-right');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-require('../modules/es7.symbol.async-iterator');
-require('../modules/es7.symbol.observable');
+require('../modules/es7.regexp.escape');
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
require('../modules/es7.map.to-json');
require('../modules/es7.set.to-json');
-require('../modules/es7.system.global');
-require('../modules/es7.error.is-error');
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-require('../modules/es7.asap');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core');
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/map.js b/node_modules/core-js/library/es7/map.js
index dfa32fd26..fe5199928 100644
--- a/node_modules/core-js/library/es7/map.js
+++ b/node_modules/core-js/library/es7/map.js
@@ -1,2 +1,2 @@
require('../modules/es7.map.to-json');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/math.js b/node_modules/core-js/library/es7/math.js
deleted file mode 100644
index bdb8a81c3..000000000
--- a/node_modules/core-js/library/es7/math.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-module.exports = require('../modules/_core').Math;
diff --git a/node_modules/core-js/library/es7/object.js b/node_modules/core-js/library/es7/object.js
index c76b754d4..b05853031 100644
--- a/node_modules/core-js/library/es7/object.js
+++ b/node_modules/core-js/library/es7/object.js
@@ -1,8 +1,4 @@
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
-module.exports = require('../modules/_core').Object; \ No newline at end of file
+module.exports = require('../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/observable.js b/node_modules/core-js/library/es7/observable.js
deleted file mode 100644
index 05ca51a37..000000000
--- a/node_modules/core-js/library/es7/observable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-require('../modules/es6.object.to-string');
-require('../modules/es6.string.iterator');
-require('../modules/web.dom.iterable');
-require('../modules/es6.promise');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core').Observable; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/reflect.js b/node_modules/core-js/library/es7/reflect.js
deleted file mode 100644
index f0b69cbb2..000000000
--- a/node_modules/core-js/library/es7/reflect.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-module.exports = require('../modules/_core').Reflect;
diff --git a/node_modules/core-js/library/es7/set.js b/node_modules/core-js/library/es7/set.js
index b5c19c44f..16e945283 100644
--- a/node_modules/core-js/library/es7/set.js
+++ b/node_modules/core-js/library/es7/set.js
@@ -1,2 +1,2 @@
require('../modules/es7.set.to-json');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/string.js b/node_modules/core-js/library/es7/string.js
index 6e413b4c2..bca0886ce 100644
--- a/node_modules/core-js/library/es7/string.js
+++ b/node_modules/core-js/library/es7/string.js
@@ -1,7 +1,6 @@
require('../modules/es7.string.at');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
+require('../modules/es7.string.pad-left');
+require('../modules/es7.string.pad-right');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-module.exports = require('../modules/_core').String;
+module.exports = require('../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/symbol.js b/node_modules/core-js/library/es7/symbol.js
deleted file mode 100644
index 14d90eec7..000000000
--- a/node_modules/core-js/library/es7/symbol.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../modules/es7.symbol.async-iterator');
-require('../modules/es7.symbol.observable');
-module.exports = require('../modules/_core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/library/es7/system.js b/node_modules/core-js/library/es7/system.js
deleted file mode 100644
index 6d321c780..000000000
--- a/node_modules/core-js/library/es7/system.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.system.global');
-module.exports = require('../modules/_core').System; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/_.js b/node_modules/core-js/library/fn/_.js
index 8a99f7062..475a66cdf 100644
--- a/node_modules/core-js/library/fn/_.js
+++ b/node_modules/core-js/library/fn/_.js
@@ -1,2 +1,2 @@
require('../modules/core.function.part');
-module.exports = require('../modules/_core')._; \ No newline at end of file
+module.exports = require('../modules/$.core')._; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/concat.js b/node_modules/core-js/library/fn/array/concat.js
index de4bddf96..176ecffeb 100644
--- a/node_modules/core-js/library/fn/array/concat.js
+++ b/node_modules/core-js/library/fn/array/concat.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.concat, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.concat; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/copy-within.js b/node_modules/core-js/library/fn/array/copy-within.js
index 89e1de4ff..8a0113193 100644
--- a/node_modules/core-js/library/fn/array/copy-within.js
+++ b/node_modules/core-js/library/fn/array/copy-within.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.copy-within');
-module.exports = require('../../modules/_core').Array.copyWithin; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.copyWithin; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/entries.js b/node_modules/core-js/library/fn/array/entries.js
index f4feb26c2..bcdbc33f2 100644
--- a/node_modules/core-js/library/fn/array/entries.js
+++ b/node_modules/core-js/library/fn/array/entries.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.entries; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.entries; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/every.js b/node_modules/core-js/library/fn/array/every.js
index 168844cc5..0c7d0b7e2 100644
--- a/node_modules/core-js/library/fn/array/every.js
+++ b/node_modules/core-js/library/fn/array/every.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.every');
-module.exports = require('../../modules/_core').Array.every; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.every; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/fill.js b/node_modules/core-js/library/fn/array/fill.js
index b23ebfdee..f53621202 100644
--- a/node_modules/core-js/library/fn/array/fill.js
+++ b/node_modules/core-js/library/fn/array/fill.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.fill');
-module.exports = require('../../modules/_core').Array.fill; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.fill; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/filter.js b/node_modules/core-js/library/fn/array/filter.js
index 0023f0de0..3f5b17ffe 100644
--- a/node_modules/core-js/library/fn/array/filter.js
+++ b/node_modules/core-js/library/fn/array/filter.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.filter');
-module.exports = require('../../modules/_core').Array.filter; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.filter; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/find-index.js b/node_modules/core-js/library/fn/array/find-index.js
index 99e6bf17b..7ec6cf7a8 100644
--- a/node_modules/core-js/library/fn/array/find-index.js
+++ b/node_modules/core-js/library/fn/array/find-index.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.find-index');
-module.exports = require('../../modules/_core').Array.findIndex; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.findIndex; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/find.js b/node_modules/core-js/library/fn/array/find.js
index f146ec224..9c3a6b31f 100644
--- a/node_modules/core-js/library/fn/array/find.js
+++ b/node_modules/core-js/library/fn/array/find.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.find');
-module.exports = require('../../modules/_core').Array.find; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.find; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/for-each.js b/node_modules/core-js/library/fn/array/for-each.js
index 09e235f95..b2e79f0b1 100644
--- a/node_modules/core-js/library/fn/array/for-each.js
+++ b/node_modules/core-js/library/fn/array/for-each.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.for-each');
-module.exports = require('../../modules/_core').Array.forEach; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.forEach; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/from.js b/node_modules/core-js/library/fn/array/from.js
index 1f323fbc3..f0483ccf4 100644
--- a/node_modules/core-js/library/fn/array/from.js
+++ b/node_modules/core-js/library/fn/array/from.js
@@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/es6.array.from');
-module.exports = require('../../modules/_core').Array.from; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.from; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/includes.js b/node_modules/core-js/library/fn/array/includes.js
index 851d31fd1..420c8318f 100644
--- a/node_modules/core-js/library/fn/array/includes.js
+++ b/node_modules/core-js/library/fn/array/includes.js
@@ -1,2 +1,2 @@
require('../../modules/es7.array.includes');
-module.exports = require('../../modules/_core').Array.includes; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.includes; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/index-of.js b/node_modules/core-js/library/fn/array/index-of.js
index 9ed824727..9f2cd14b6 100644
--- a/node_modules/core-js/library/fn/array/index-of.js
+++ b/node_modules/core-js/library/fn/array/index-of.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.index-of');
-module.exports = require('../../modules/_core').Array.indexOf; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.indexOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/index.js b/node_modules/core-js/library/fn/array/index.js
index 85bc77bc8..2707be211 100644
--- a/node_modules/core-js/library/fn/array/index.js
+++ b/node_modules/core-js/library/fn/array/index.js
@@ -1,24 +1,12 @@
require('../../modules/es6.string.iterator');
-require('../../modules/es6.array.is-array');
require('../../modules/es6.array.from');
require('../../modules/es6.array.of');
-require('../../modules/es6.array.join');
-require('../../modules/es6.array.slice');
-require('../../modules/es6.array.sort');
-require('../../modules/es6.array.for-each');
-require('../../modules/es6.array.map');
-require('../../modules/es6.array.filter');
-require('../../modules/es6.array.some');
-require('../../modules/es6.array.every');
-require('../../modules/es6.array.reduce');
-require('../../modules/es6.array.reduce-right');
-require('../../modules/es6.array.index-of');
-require('../../modules/es6.array.last-index-of');
+require('../../modules/es6.array.species');
+require('../../modules/es6.array.iterator');
require('../../modules/es6.array.copy-within');
require('../../modules/es6.array.fill');
require('../../modules/es6.array.find');
require('../../modules/es6.array.find-index');
-require('../../modules/es6.array.species');
-require('../../modules/es6.array.iterator');
require('../../modules/es7.array.includes');
-module.exports = require('../../modules/_core').Array; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/is-array.js b/node_modules/core-js/library/fn/array/is-array.js
deleted file mode 100644
index bbe76719e..000000000
--- a/node_modules/core-js/library/fn/array/is-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.array.is-array');
-module.exports = require('../../modules/_core').Array.isArray; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/iterator.js b/node_modules/core-js/library/fn/array/iterator.js
index ca93b78ab..662f3b5c5 100644
--- a/node_modules/core-js/library/fn/array/iterator.js
+++ b/node_modules/core-js/library/fn/array/iterator.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/join.js b/node_modules/core-js/library/fn/array/join.js
index 9beef18d0..443639228 100644
--- a/node_modules/core-js/library/fn/array/join.js
+++ b/node_modules/core-js/library/fn/array/join.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.join');
-module.exports = require('../../modules/_core').Array.join; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.join; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/keys.js b/node_modules/core-js/library/fn/array/keys.js
index b44b921f7..e55d356e2 100644
--- a/node_modules/core-js/library/fn/array/keys.js
+++ b/node_modules/core-js/library/fn/array/keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.keys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.keys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/last-index-of.js b/node_modules/core-js/library/fn/array/last-index-of.js
index 6dcc98a10..678d0072d 100644
--- a/node_modules/core-js/library/fn/array/last-index-of.js
+++ b/node_modules/core-js/library/fn/array/last-index-of.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.last-index-of');
-module.exports = require('../../modules/_core').Array.lastIndexOf; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.lastIndexOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/map.js b/node_modules/core-js/library/fn/array/map.js
index 14b0f6279..a1457c7a8 100644
--- a/node_modules/core-js/library/fn/array/map.js
+++ b/node_modules/core-js/library/fn/array/map.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.map');
-module.exports = require('../../modules/_core').Array.map; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.map; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/of.js b/node_modules/core-js/library/fn/array/of.js
index 652ee9808..07bb5a4ad 100644
--- a/node_modules/core-js/library/fn/array/of.js
+++ b/node_modules/core-js/library/fn/array/of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.of');
-module.exports = require('../../modules/_core').Array.of; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.of; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/pop.js b/node_modules/core-js/library/fn/array/pop.js
index b8414f616..bd8f86109 100644
--- a/node_modules/core-js/library/fn/array/pop.js
+++ b/node_modules/core-js/library/fn/array/pop.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.pop, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.pop; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/push.js b/node_modules/core-js/library/fn/array/push.js
index 03539009e..3ccf07071 100644
--- a/node_modules/core-js/library/fn/array/push.js
+++ b/node_modules/core-js/library/fn/array/push.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.push, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.push; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/reduce-right.js b/node_modules/core-js/library/fn/array/reduce-right.js
index 1193ecbae..c592207cf 100644
--- a/node_modules/core-js/library/fn/array/reduce-right.js
+++ b/node_modules/core-js/library/fn/array/reduce-right.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.reduce-right');
-module.exports = require('../../modules/_core').Array.reduceRight; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reduceRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/reduce.js b/node_modules/core-js/library/fn/array/reduce.js
index e2dee913e..b8368406c 100644
--- a/node_modules/core-js/library/fn/array/reduce.js
+++ b/node_modules/core-js/library/fn/array/reduce.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.reduce');
-module.exports = require('../../modules/_core').Array.reduce; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reduce; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/reverse.js b/node_modules/core-js/library/fn/array/reverse.js
index 607342934..4d8d235c7 100644
--- a/node_modules/core-js/library/fn/array/reverse.js
+++ b/node_modules/core-js/library/fn/array/reverse.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.reverse, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.reverse; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/shift.js b/node_modules/core-js/library/fn/array/shift.js
index 5002a6062..806c87cd0 100644
--- a/node_modules/core-js/library/fn/array/shift.js
+++ b/node_modules/core-js/library/fn/array/shift.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.shift, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.shift; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/slice.js b/node_modules/core-js/library/fn/array/slice.js
index 4914c2a98..913f7ef20 100644
--- a/node_modules/core-js/library/fn/array/slice.js
+++ b/node_modules/core-js/library/fn/array/slice.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.slice');
-module.exports = require('../../modules/_core').Array.slice; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.slice; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/some.js b/node_modules/core-js/library/fn/array/some.js
index de284006e..4f7c76544 100644
--- a/node_modules/core-js/library/fn/array/some.js
+++ b/node_modules/core-js/library/fn/array/some.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.some');
-module.exports = require('../../modules/_core').Array.some; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.some; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/sort.js b/node_modules/core-js/library/fn/array/sort.js
index 29b6f3ae7..61beed041 100644
--- a/node_modules/core-js/library/fn/array/sort.js
+++ b/node_modules/core-js/library/fn/array/sort.js
@@ -1,2 +1,2 @@
-require('../../modules/es6.array.sort');
-module.exports = require('../../modules/_core').Array.sort; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.sort; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/splice.js b/node_modules/core-js/library/fn/array/splice.js
index 9d0bdbed4..5f5eab07b 100644
--- a/node_modules/core-js/library/fn/array/splice.js
+++ b/node_modules/core-js/library/fn/array/splice.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.splice, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.splice; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/unshift.js b/node_modules/core-js/library/fn/array/unshift.js
index 63fe2dd86..a11de5287 100644
--- a/node_modules/core-js/library/fn/array/unshift.js
+++ b/node_modules/core-js/library/fn/array/unshift.js
@@ -1,4 +1,2 @@
-// for a legacy code and future fixes
-module.exports = function(){
- return Function.call.apply(Array.prototype.unshift, arguments);
-}; \ No newline at end of file
+require('../../modules/js.array.statics');
+module.exports = require('../../modules/$.core').Array.unshift; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/values.js b/node_modules/core-js/library/fn/array/values.js
index ca93b78ab..662f3b5c5 100644
--- a/node_modules/core-js/library/fn/array/values.js
+++ b/node_modules/core-js/library/fn/array/values.js
@@ -1,2 +1,2 @@
require('../../modules/es6.array.iterator');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/copy-within.js b/node_modules/core-js/library/fn/array/virtual/copy-within.js
deleted file mode 100644
index 62172a9e3..000000000
--- a/node_modules/core-js/library/fn/array/virtual/copy-within.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.copy-within');
-module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/entries.js b/node_modules/core-js/library/fn/array/virtual/entries.js
deleted file mode 100644
index 1b198e3cc..000000000
--- a/node_modules/core-js/library/fn/array/virtual/entries.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.iterator');
-module.exports = require('../../../modules/_entry-virtual')('Array').entries; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/every.js b/node_modules/core-js/library/fn/array/virtual/every.js
deleted file mode 100644
index a72e58510..000000000
--- a/node_modules/core-js/library/fn/array/virtual/every.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.every');
-module.exports = require('../../../modules/_entry-virtual')('Array').every; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/fill.js b/node_modules/core-js/library/fn/array/virtual/fill.js
deleted file mode 100644
index 6018b37bf..000000000
--- a/node_modules/core-js/library/fn/array/virtual/fill.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.fill');
-module.exports = require('../../../modules/_entry-virtual')('Array').fill; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/filter.js b/node_modules/core-js/library/fn/array/virtual/filter.js
deleted file mode 100644
index 46a14f1c4..000000000
--- a/node_modules/core-js/library/fn/array/virtual/filter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.filter');
-module.exports = require('../../../modules/_entry-virtual')('Array').filter; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/find-index.js b/node_modules/core-js/library/fn/array/virtual/find-index.js
deleted file mode 100644
index ef96165fd..000000000
--- a/node_modules/core-js/library/fn/array/virtual/find-index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.find-index');
-module.exports = require('../../../modules/_entry-virtual')('Array').findIndex; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/find.js b/node_modules/core-js/library/fn/array/virtual/find.js
deleted file mode 100644
index 6cffee5b5..000000000
--- a/node_modules/core-js/library/fn/array/virtual/find.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.find');
-module.exports = require('../../../modules/_entry-virtual')('Array').find; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/for-each.js b/node_modules/core-js/library/fn/array/virtual/for-each.js
deleted file mode 100644
index 0c3ed4492..000000000
--- a/node_modules/core-js/library/fn/array/virtual/for-each.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.for-each');
-module.exports = require('../../../modules/_entry-virtual')('Array').forEach; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/includes.js b/node_modules/core-js/library/fn/array/virtual/includes.js
deleted file mode 100644
index bf9031d74..000000000
--- a/node_modules/core-js/library/fn/array/virtual/includes.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.array.includes');
-module.exports = require('../../../modules/_entry-virtual')('Array').includes; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/index-of.js b/node_modules/core-js/library/fn/array/virtual/index-of.js
deleted file mode 100644
index cf6f36e3b..000000000
--- a/node_modules/core-js/library/fn/array/virtual/index-of.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.index-of');
-module.exports = require('../../../modules/_entry-virtual')('Array').indexOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/index.js b/node_modules/core-js/library/fn/array/virtual/index.js
deleted file mode 100644
index ff554a2a1..000000000
--- a/node_modules/core-js/library/fn/array/virtual/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-require('../../../modules/es6.array.join');
-require('../../../modules/es6.array.slice');
-require('../../../modules/es6.array.sort');
-require('../../../modules/es6.array.for-each');
-require('../../../modules/es6.array.map');
-require('../../../modules/es6.array.filter');
-require('../../../modules/es6.array.some');
-require('../../../modules/es6.array.every');
-require('../../../modules/es6.array.reduce');
-require('../../../modules/es6.array.reduce-right');
-require('../../../modules/es6.array.index-of');
-require('../../../modules/es6.array.last-index-of');
-require('../../../modules/es6.string.iterator');
-require('../../../modules/es6.array.iterator');
-require('../../../modules/es6.array.copy-within');
-require('../../../modules/es6.array.fill');
-require('../../../modules/es6.array.find');
-require('../../../modules/es6.array.find-index');
-require('../../../modules/es7.array.includes');
-module.exports = require('../../../modules/_entry-virtual')('Array'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/iterator.js b/node_modules/core-js/library/fn/array/virtual/iterator.js
deleted file mode 100644
index 7812b3c92..000000000
--- a/node_modules/core-js/library/fn/array/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/join.js b/node_modules/core-js/library/fn/array/virtual/join.js
deleted file mode 100644
index 3f7d5cff9..000000000
--- a/node_modules/core-js/library/fn/array/virtual/join.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.join');
-module.exports = require('../../../modules/_entry-virtual')('Array').join; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/keys.js b/node_modules/core-js/library/fn/array/virtual/keys.js
deleted file mode 100644
index 16c09681f..000000000
--- a/node_modules/core-js/library/fn/array/virtual/keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.iterator');
-module.exports = require('../../../modules/_entry-virtual')('Array').keys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/last-index-of.js b/node_modules/core-js/library/fn/array/virtual/last-index-of.js
deleted file mode 100644
index cdd79b7d5..000000000
--- a/node_modules/core-js/library/fn/array/virtual/last-index-of.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.last-index-of');
-module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/map.js b/node_modules/core-js/library/fn/array/virtual/map.js
deleted file mode 100644
index 14bffdac0..000000000
--- a/node_modules/core-js/library/fn/array/virtual/map.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.map');
-module.exports = require('../../../modules/_entry-virtual')('Array').map; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/reduce-right.js b/node_modules/core-js/library/fn/array/virtual/reduce-right.js
deleted file mode 100644
index 61313e8f2..000000000
--- a/node_modules/core-js/library/fn/array/virtual/reduce-right.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.reduce-right');
-module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/reduce.js b/node_modules/core-js/library/fn/array/virtual/reduce.js
deleted file mode 100644
index 1b059053d..000000000
--- a/node_modules/core-js/library/fn/array/virtual/reduce.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.reduce');
-module.exports = require('../../../modules/_entry-virtual')('Array').reduce; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/slice.js b/node_modules/core-js/library/fn/array/virtual/slice.js
deleted file mode 100644
index b28d1abcc..000000000
--- a/node_modules/core-js/library/fn/array/virtual/slice.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.slice');
-module.exports = require('../../../modules/_entry-virtual')('Array').slice; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/some.js b/node_modules/core-js/library/fn/array/virtual/some.js
deleted file mode 100644
index 58c183c55..000000000
--- a/node_modules/core-js/library/fn/array/virtual/some.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.some');
-module.exports = require('../../../modules/_entry-virtual')('Array').some; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/sort.js b/node_modules/core-js/library/fn/array/virtual/sort.js
deleted file mode 100644
index c8883150b..000000000
--- a/node_modules/core-js/library/fn/array/virtual/sort.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.array.sort');
-module.exports = require('../../../modules/_entry-virtual')('Array').sort; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/array/virtual/values.js b/node_modules/core-js/library/fn/array/virtual/values.js
deleted file mode 100644
index 7812b3c92..000000000
--- a/node_modules/core-js/library/fn/array/virtual/values.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/asap.js b/node_modules/core-js/library/fn/asap.js
deleted file mode 100644
index 9d9c80d13..000000000
--- a/node_modules/core-js/library/fn/asap.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es7.asap');
-module.exports = require('../modules/_core').asap; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/clear-immediate.js b/node_modules/core-js/library/fn/clear-immediate.js
index 86916a06c..06a975024 100644
--- a/node_modules/core-js/library/fn/clear-immediate.js
+++ b/node_modules/core-js/library/fn/clear-immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core').clearImmediate; \ No newline at end of file
+module.exports = require('../modules/$.core').clearImmediate; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/index.js b/node_modules/core-js/library/fn/date/index.js
deleted file mode 100644
index bd9ce0e2d..000000000
--- a/node_modules/core-js/library/fn/date/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../../modules/es6.date.now');
-require('../../modules/es6.date.to-json');
-require('../../modules/es6.date.to-iso-string');
-require('../../modules/es6.date.to-string');
-require('../../modules/es6.date.to-primitive');
-module.exports = require('../../modules/_core').Date; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/now.js b/node_modules/core-js/library/fn/date/now.js
deleted file mode 100644
index c70d37ae3..000000000
--- a/node_modules/core-js/library/fn/date/now.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.date.now');
-module.exports = require('../../modules/_core').Date.now; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/to-iso-string.js b/node_modules/core-js/library/fn/date/to-iso-string.js
deleted file mode 100644
index be4ac2187..000000000
--- a/node_modules/core-js/library/fn/date/to-iso-string.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.date.to-json');
-require('../../modules/es6.date.to-iso-string');
-module.exports = require('../../modules/_core').Date.toISOString; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/to-json.js b/node_modules/core-js/library/fn/date/to-json.js
deleted file mode 100644
index 9dc8cc902..000000000
--- a/node_modules/core-js/library/fn/date/to-json.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.date.to-json');
-module.exports = require('../../modules/_core').Date.toJSON; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/to-primitive.js b/node_modules/core-js/library/fn/date/to-primitive.js
deleted file mode 100644
index 4d7471e26..000000000
--- a/node_modules/core-js/library/fn/date/to-primitive.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.date.to-primitive');
-var toPrimitive = require('../../modules/_date-to-primitive');
-module.exports = function(it, hint){
- return toPrimitive.call(it, hint);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/date/to-string.js b/node_modules/core-js/library/fn/date/to-string.js
deleted file mode 100644
index c39d55227..000000000
--- a/node_modules/core-js/library/fn/date/to-string.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.date.to-string')
-var $toString = Date.prototype.toString;
-module.exports = function toString(it){
- return $toString.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/delay.js b/node_modules/core-js/library/fn/delay.js
index 188573884..1ff9a56d5 100644
--- a/node_modules/core-js/library/fn/delay.js
+++ b/node_modules/core-js/library/fn/delay.js
@@ -1,2 +1,2 @@
require('../modules/core.delay');
-module.exports = require('../modules/_core').delay;
+module.exports = require('../modules/$.core').delay;
diff --git a/node_modules/core-js/library/fn/dict.js b/node_modules/core-js/library/fn/dict.js
index da84a8d88..ed848e2c2 100644
--- a/node_modules/core-js/library/fn/dict.js
+++ b/node_modules/core-js/library/fn/dict.js
@@ -1,2 +1,2 @@
require('../modules/core.dict');
-module.exports = require('../modules/_core').Dict; \ No newline at end of file
+module.exports = require('../modules/$.core').Dict; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/dom-collections/index.js b/node_modules/core-js/library/fn/dom-collections/index.js
deleted file mode 100644
index 3928a09fc..000000000
--- a/node_modules/core-js/library/fn/dom-collections/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-require('../../modules/web.dom.iterable');
-var $iterators = require('../../modules/es6.array.iterator');
-module.exports = {
- keys: $iterators.keys,
- values: $iterators.values,
- entries: $iterators.entries,
- iterator: $iterators.values
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/dom-collections/iterator.js b/node_modules/core-js/library/fn/dom-collections/iterator.js
deleted file mode 100644
index ad9836457..000000000
--- a/node_modules/core-js/library/fn/dom-collections/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/web.dom.iterable');
-module.exports = require('../../modules/_core').Array.values; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/error/index.js b/node_modules/core-js/library/fn/error/index.js
deleted file mode 100644
index 59571ac21..000000000
--- a/node_modules/core-js/library/fn/error/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.error.is-error');
-module.exports = require('../../modules/_core').Error; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/error/is-error.js b/node_modules/core-js/library/fn/error/is-error.js
deleted file mode 100644
index e15b7201b..000000000
--- a/node_modules/core-js/library/fn/error/is-error.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.error.is-error');
-module.exports = require('../../modules/_core').Error.isError; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/bind.js b/node_modules/core-js/library/fn/function/bind.js
deleted file mode 100644
index 38e179e6e..000000000
--- a/node_modules/core-js/library/fn/function/bind.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.function.bind');
-module.exports = require('../../modules/_core').Function.bind; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/has-instance.js b/node_modules/core-js/library/fn/function/has-instance.js
index 78397e5f7..78c8221c3 100644
--- a/node_modules/core-js/library/fn/function/has-instance.js
+++ b/node_modules/core-js/library/fn/function/has-instance.js
@@ -1,2 +1,2 @@
require('../../modules/es6.function.has-instance');
-module.exports = Function[require('../../modules/_wks')('hasInstance')]; \ No newline at end of file
+module.exports = Function[require('../../modules/$.wks')('hasInstance')]; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/index.js b/node_modules/core-js/library/fn/function/index.js
index 206324e89..7422fca3c 100644
--- a/node_modules/core-js/library/fn/function/index.js
+++ b/node_modules/core-js/library/fn/function/index.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.function.bind');
require('../../modules/es6.function.name');
require('../../modules/es6.function.has-instance');
require('../../modules/core.function.part');
-module.exports = require('../../modules/_core').Function;
+module.exports = require('../../modules/$.core').Function;
diff --git a/node_modules/core-js/library/fn/function/part.js b/node_modules/core-js/library/fn/function/part.js
index 926e2cc2a..26271d6a0 100644
--- a/node_modules/core-js/library/fn/function/part.js
+++ b/node_modules/core-js/library/fn/function/part.js
@@ -1,2 +1,2 @@
require('../../modules/core.function.part');
-module.exports = require('../../modules/_core').Function.part; \ No newline at end of file
+module.exports = require('../../modules/$.core').Function.part; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/virtual/bind.js b/node_modules/core-js/library/fn/function/virtual/bind.js
deleted file mode 100644
index 0a2f3338c..000000000
--- a/node_modules/core-js/library/fn/function/virtual/bind.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.function.bind');
-module.exports = require('../../../modules/_entry-virtual')('Function').bind; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/virtual/index.js b/node_modules/core-js/library/fn/function/virtual/index.js
deleted file mode 100644
index f64e22023..000000000
--- a/node_modules/core-js/library/fn/function/virtual/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../../modules/es6.function.bind');
-require('../../../modules/core.function.part');
-module.exports = require('../../../modules/_entry-virtual')('Function'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/function/virtual/part.js b/node_modules/core-js/library/fn/function/virtual/part.js
deleted file mode 100644
index a382e577f..000000000
--- a/node_modules/core-js/library/fn/function/virtual/part.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.function.part');
-module.exports = require('../../../modules/_entry-virtual')('Function').part; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/json/index.js b/node_modules/core-js/library/fn/json/index.js
deleted file mode 100644
index a6ec3de99..000000000
--- a/node_modules/core-js/library/fn/json/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var core = require('../../modules/_core');
-module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify}); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/json/stringify.js b/node_modules/core-js/library/fn/json/stringify.js
index f0cac86af..fef242507 100644
--- a/node_modules/core-js/library/fn/json/stringify.js
+++ b/node_modules/core-js/library/fn/json/stringify.js
@@ -1,5 +1,4 @@
-var core = require('../../modules/_core')
- , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});
+var core = require('../../modules/$.core');
module.exports = function stringify(it){ // eslint-disable-line no-unused-vars
- return $JSON.stringify.apply($JSON, arguments);
+ return (core.JSON && core.JSON.stringify || JSON.stringify).apply(JSON, arguments);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/map.js b/node_modules/core-js/library/fn/map.js
index 16784c600..70998924e 100644
--- a/node_modules/core-js/library/fn/map.js
+++ b/node_modules/core-js/library/fn/map.js
@@ -3,4 +3,4 @@ require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.map');
require('../modules/es7.map.to-json');
-module.exports = require('../modules/_core').Map; \ No newline at end of file
+module.exports = require('../modules/$.core').Map; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/acosh.js b/node_modules/core-js/library/fn/math/acosh.js
index 9c904c2d6..d29a88cca 100644
--- a/node_modules/core-js/library/fn/math/acosh.js
+++ b/node_modules/core-js/library/fn/math/acosh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.acosh');
-module.exports = require('../../modules/_core').Math.acosh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.acosh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/asinh.js b/node_modules/core-js/library/fn/math/asinh.js
index 9e209c9d1..7eac2e83e 100644
--- a/node_modules/core-js/library/fn/math/asinh.js
+++ b/node_modules/core-js/library/fn/math/asinh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.asinh');
-module.exports = require('../../modules/_core').Math.asinh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.asinh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/atanh.js b/node_modules/core-js/library/fn/math/atanh.js
index b116296d8..a66a47d88 100644
--- a/node_modules/core-js/library/fn/math/atanh.js
+++ b/node_modules/core-js/library/fn/math/atanh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.atanh');
-module.exports = require('../../modules/_core').Math.atanh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.atanh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/cbrt.js b/node_modules/core-js/library/fn/math/cbrt.js
index 6ffec33a2..199f5cd86 100644
--- a/node_modules/core-js/library/fn/math/cbrt.js
+++ b/node_modules/core-js/library/fn/math/cbrt.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.cbrt');
-module.exports = require('../../modules/_core').Math.cbrt; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.cbrt; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/clz32.js b/node_modules/core-js/library/fn/math/clz32.js
index beeaae165..2025c6e44 100644
--- a/node_modules/core-js/library/fn/math/clz32.js
+++ b/node_modules/core-js/library/fn/math/clz32.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.clz32');
-module.exports = require('../../modules/_core').Math.clz32; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.clz32; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/cosh.js b/node_modules/core-js/library/fn/math/cosh.js
index bf92dc13d..17a7ddc0f 100644
--- a/node_modules/core-js/library/fn/math/cosh.js
+++ b/node_modules/core-js/library/fn/math/cosh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.cosh');
-module.exports = require('../../modules/_core').Math.cosh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.cosh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/expm1.js b/node_modules/core-js/library/fn/math/expm1.js
index 0b30ebb1b..732facb32 100644
--- a/node_modules/core-js/library/fn/math/expm1.js
+++ b/node_modules/core-js/library/fn/math/expm1.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.expm1');
-module.exports = require('../../modules/_core').Math.expm1; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.expm1; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/fround.js b/node_modules/core-js/library/fn/math/fround.js
index c75a22937..37f87069c 100644
--- a/node_modules/core-js/library/fn/math/fround.js
+++ b/node_modules/core-js/library/fn/math/fround.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.fround');
-module.exports = require('../../modules/_core').Math.fround; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.fround; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/hypot.js b/node_modules/core-js/library/fn/math/hypot.js
index 2126285c2..9676c0730 100644
--- a/node_modules/core-js/library/fn/math/hypot.js
+++ b/node_modules/core-js/library/fn/math/hypot.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.hypot');
-module.exports = require('../../modules/_core').Math.hypot; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.hypot; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/iaddh.js b/node_modules/core-js/library/fn/math/iaddh.js
deleted file mode 100644
index cae754ee1..000000000
--- a/node_modules/core-js/library/fn/math/iaddh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.iaddh');
-module.exports = require('../../modules/_core').Math.iaddh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/imul.js b/node_modules/core-js/library/fn/math/imul.js
index 1f5ce1610..2ea2913e9 100644
--- a/node_modules/core-js/library/fn/math/imul.js
+++ b/node_modules/core-js/library/fn/math/imul.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.imul');
-module.exports = require('../../modules/_core').Math.imul; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.imul; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/imulh.js b/node_modules/core-js/library/fn/math/imulh.js
deleted file mode 100644
index 3b47bf8c2..000000000
--- a/node_modules/core-js/library/fn/math/imulh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.imulh');
-module.exports = require('../../modules/_core').Math.imulh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/index.js b/node_modules/core-js/library/fn/math/index.js
index 8a2664b18..14628ae59 100644
--- a/node_modules/core-js/library/fn/math/index.js
+++ b/node_modules/core-js/library/fn/math/index.js
@@ -15,8 +15,4 @@ require('../../modules/es6.math.sign');
require('../../modules/es6.math.sinh');
require('../../modules/es6.math.tanh');
require('../../modules/es6.math.trunc');
-require('../../modules/es7.math.iaddh');
-require('../../modules/es7.math.isubh');
-require('../../modules/es7.math.imulh');
-require('../../modules/es7.math.umulh');
-module.exports = require('../../modules/_core').Math; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/isubh.js b/node_modules/core-js/library/fn/math/isubh.js
deleted file mode 100644
index e120e423f..000000000
--- a/node_modules/core-js/library/fn/math/isubh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.isubh');
-module.exports = require('../../modules/_core').Math.isubh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/log10.js b/node_modules/core-js/library/fn/math/log10.js
index 1246e0ae0..ecf7b9b2b 100644
--- a/node_modules/core-js/library/fn/math/log10.js
+++ b/node_modules/core-js/library/fn/math/log10.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log10');
-module.exports = require('../../modules/_core').Math.log10; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log10; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/log1p.js b/node_modules/core-js/library/fn/math/log1p.js
index 047b84c05..6db73292e 100644
--- a/node_modules/core-js/library/fn/math/log1p.js
+++ b/node_modules/core-js/library/fn/math/log1p.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log1p');
-module.exports = require('../../modules/_core').Math.log1p; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log1p; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/log2.js b/node_modules/core-js/library/fn/math/log2.js
index ce3e99c1e..63c74d7b8 100644
--- a/node_modules/core-js/library/fn/math/log2.js
+++ b/node_modules/core-js/library/fn/math/log2.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.log2');
-module.exports = require('../../modules/_core').Math.log2; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.log2; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/sign.js b/node_modules/core-js/library/fn/math/sign.js
index 0963ecaf9..47ab74f20 100644
--- a/node_modules/core-js/library/fn/math/sign.js
+++ b/node_modules/core-js/library/fn/math/sign.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.sign');
-module.exports = require('../../modules/_core').Math.sign; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.sign; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/sinh.js b/node_modules/core-js/library/fn/math/sinh.js
index c35cb7394..72c6e857a 100644
--- a/node_modules/core-js/library/fn/math/sinh.js
+++ b/node_modules/core-js/library/fn/math/sinh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.sinh');
-module.exports = require('../../modules/_core').Math.sinh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.sinh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/tanh.js b/node_modules/core-js/library/fn/math/tanh.js
index 3d1966db3..30ddbcc83 100644
--- a/node_modules/core-js/library/fn/math/tanh.js
+++ b/node_modules/core-js/library/fn/math/tanh.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.tanh');
-module.exports = require('../../modules/_core').Math.tanh; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.tanh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/trunc.js b/node_modules/core-js/library/fn/math/trunc.js
index 135b7dcb8..b084efa7e 100644
--- a/node_modules/core-js/library/fn/math/trunc.js
+++ b/node_modules/core-js/library/fn/math/trunc.js
@@ -1,2 +1,2 @@
require('../../modules/es6.math.trunc');
-module.exports = require('../../modules/_core').Math.trunc; \ No newline at end of file
+module.exports = require('../../modules/$.core').Math.trunc; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/math/umulh.js b/node_modules/core-js/library/fn/math/umulh.js
deleted file mode 100644
index d93b9ae05..000000000
--- a/node_modules/core-js/library/fn/math/umulh.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.math.umulh');
-module.exports = require('../../modules/_core').Math.umulh; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/constructor.js b/node_modules/core-js/library/fn/number/constructor.js
deleted file mode 100644
index f488331ec..000000000
--- a/node_modules/core-js/library/fn/number/constructor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.constructor');
-module.exports = Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/index.js b/node_modules/core-js/library/fn/number/index.js
index 92890003d..d048d5901 100644
--- a/node_modules/core-js/library/fn/number/index.js
+++ b/node_modules/core-js/library/fn/number/index.js
@@ -8,7 +8,5 @@ require('../../modules/es6.number.max-safe-integer');
require('../../modules/es6.number.min-safe-integer');
require('../../modules/es6.number.parse-float');
require('../../modules/es6.number.parse-int');
-require('../../modules/es6.number.to-fixed');
-require('../../modules/es6.number.to-precision');
require('../../modules/core.number.iterator');
-module.exports = require('../../modules/_core').Number; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/is-finite.js b/node_modules/core-js/library/fn/number/is-finite.js
index 4ec3706b0..ff666503b 100644
--- a/node_modules/core-js/library/fn/number/is-finite.js
+++ b/node_modules/core-js/library/fn/number/is-finite.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-finite');
-module.exports = require('../../modules/_core').Number.isFinite; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isFinite; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/is-integer.js b/node_modules/core-js/library/fn/number/is-integer.js
index a3013bff3..682e1e348 100644
--- a/node_modules/core-js/library/fn/number/is-integer.js
+++ b/node_modules/core-js/library/fn/number/is-integer.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-integer');
-module.exports = require('../../modules/_core').Number.isInteger; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isInteger; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/is-nan.js b/node_modules/core-js/library/fn/number/is-nan.js
index f23b0266a..6ad6923bd 100644
--- a/node_modules/core-js/library/fn/number/is-nan.js
+++ b/node_modules/core-js/library/fn/number/is-nan.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-nan');
-module.exports = require('../../modules/_core').Number.isNaN; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isNaN; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/is-safe-integer.js b/node_modules/core-js/library/fn/number/is-safe-integer.js
index f68732f52..a47fd42e9 100644
--- a/node_modules/core-js/library/fn/number/is-safe-integer.js
+++ b/node_modules/core-js/library/fn/number/is-safe-integer.js
@@ -1,2 +1,2 @@
require('../../modules/es6.number.is-safe-integer');
-module.exports = require('../../modules/_core').Number.isSafeInteger; \ No newline at end of file
+module.exports = require('../../modules/$.core').Number.isSafeInteger; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/iterator.js b/node_modules/core-js/library/fn/number/iterator.js
index 26feaa1f0..57cb79065 100644
--- a/node_modules/core-js/library/fn/number/iterator.js
+++ b/node_modules/core-js/library/fn/number/iterator.js
@@ -1,5 +1,5 @@
require('../../modules/core.number.iterator');
-var get = require('../../modules/_iterators').Number;
+var get = require('../../modules/$.iterators').Number;
module.exports = function(it){
return get.call(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/to-fixed.js b/node_modules/core-js/library/fn/number/to-fixed.js
deleted file mode 100644
index 3a041b0e8..000000000
--- a/node_modules/core-js/library/fn/number/to-fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.to-fixed');
-module.exports = require('../../modules/_core').Number.toFixed; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/to-precision.js b/node_modules/core-js/library/fn/number/to-precision.js
deleted file mode 100644
index 9e85511ab..000000000
--- a/node_modules/core-js/library/fn/number/to-precision.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.number.to-precision');
-module.exports = require('../../modules/_core').Number.toPrecision; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/virtual/index.js b/node_modules/core-js/library/fn/number/virtual/index.js
deleted file mode 100644
index 42360d32e..000000000
--- a/node_modules/core-js/library/fn/number/virtual/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-require('../../../modules/core.number.iterator');
-var $Number = require('../../../modules/_entry-virtual')('Number');
-$Number.iterator = require('../../../modules/_iterators').Number;
-module.exports = $Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/virtual/iterator.js b/node_modules/core-js/library/fn/number/virtual/iterator.js
deleted file mode 100644
index df034996a..000000000
--- a/node_modules/core-js/library/fn/number/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').Number; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/virtual/to-fixed.js b/node_modules/core-js/library/fn/number/virtual/to-fixed.js
deleted file mode 100644
index b779f15c0..000000000
--- a/node_modules/core-js/library/fn/number/virtual/to-fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.number.to-fixed');
-module.exports = require('../../../modules/_entry-virtual')('Number').toFixed; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/number/virtual/to-precision.js b/node_modules/core-js/library/fn/number/virtual/to-precision.js
deleted file mode 100644
index 0c93fa4aa..000000000
--- a/node_modules/core-js/library/fn/number/virtual/to-precision.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.number.to-precision');
-module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/assign.js b/node_modules/core-js/library/fn/object/assign.js
index 97df6bf45..a57c54aa5 100644
--- a/node_modules/core-js/library/fn/object/assign.js
+++ b/node_modules/core-js/library/fn/object/assign.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.assign');
-module.exports = require('../../modules/_core').Object.assign; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.assign; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/classof.js b/node_modules/core-js/library/fn/object/classof.js
index 993d04808..3afc82686 100644
--- a/node_modules/core-js/library/fn/object/classof.js
+++ b/node_modules/core-js/library/fn/object/classof.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.classof');
-module.exports = require('../../modules/_core').Object.classof; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.classof; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/create.js b/node_modules/core-js/library/fn/object/create.js
index a05ca2fb0..8f5f3263b 100644
--- a/node_modules/core-js/library/fn/object/create.js
+++ b/node_modules/core-js/library/fn/object/create.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.create');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function create(P, D){
- return $Object.create(P, D);
+ return $.create(P, D);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/define-getter.js b/node_modules/core-js/library/fn/object/define-getter.js
deleted file mode 100644
index 5dd26070b..000000000
--- a/node_modules/core-js/library/fn/object/define-getter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.define-getter');
-module.exports = require('../../modules/_core').Object.__defineGetter__; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/define-properties.js b/node_modules/core-js/library/fn/object/define-properties.js
index 04160fb3a..a857aab81 100644
--- a/node_modules/core-js/library/fn/object/define-properties.js
+++ b/node_modules/core-js/library/fn/object/define-properties.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.define-properties');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function defineProperties(T, D){
- return $Object.defineProperties(T, D);
+ return $.setDescs(T, D);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/define-property.js b/node_modules/core-js/library/fn/object/define-property.js
index 078c56cbf..7384315d5 100644
--- a/node_modules/core-js/library/fn/object/define-property.js
+++ b/node_modules/core-js/library/fn/object/define-property.js
@@ -1,5 +1,4 @@
-require('../../modules/es6.object.define-property');
-var $Object = require('../../modules/_core').Object;
+var $ = require('../../modules/$');
module.exports = function defineProperty(it, key, desc){
- return $Object.defineProperty(it, key, desc);
+ return $.setDesc(it, key, desc);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/define-setter.js b/node_modules/core-js/library/fn/object/define-setter.js
deleted file mode 100644
index b59475f82..000000000
--- a/node_modules/core-js/library/fn/object/define-setter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.define-setter');
-module.exports = require('../../modules/_core').Object.__defineSetter__; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/define.js b/node_modules/core-js/library/fn/object/define.js
index 6ec19e904..690773e2e 100644
--- a/node_modules/core-js/library/fn/object/define.js
+++ b/node_modules/core-js/library/fn/object/define.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.define');
-module.exports = require('../../modules/_core').Object.define; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.define; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/entries.js b/node_modules/core-js/library/fn/object/entries.js
index fca1000e8..a32fe3911 100644
--- a/node_modules/core-js/library/fn/object/entries.js
+++ b/node_modules/core-js/library/fn/object/entries.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.entries');
-module.exports = require('../../modules/_core').Object.entries; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.entries; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/freeze.js b/node_modules/core-js/library/fn/object/freeze.js
index 04eac5302..566eec51d 100644
--- a/node_modules/core-js/library/fn/object/freeze.js
+++ b/node_modules/core-js/library/fn/object/freeze.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.freeze');
-module.exports = require('../../modules/_core').Object.freeze; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.freeze; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/get-own-property-descriptor.js b/node_modules/core-js/library/fn/object/get-own-property-descriptor.js
index 7d3f03b8b..2e1845cfc 100644
--- a/node_modules/core-js/library/fn/object/get-own-property-descriptor.js
+++ b/node_modules/core-js/library/fn/object/get-own-property-descriptor.js
@@ -1,5 +1,5 @@
+var $ = require('../../modules/$');
require('../../modules/es6.object.get-own-property-descriptor');
-var $Object = require('../../modules/_core').Object;
module.exports = function getOwnPropertyDescriptor(it, key){
- return $Object.getOwnPropertyDescriptor(it, key);
+ return $.getDesc(it, key);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/get-own-property-descriptors.js b/node_modules/core-js/library/fn/object/get-own-property-descriptors.js
index dfeb547ce..f26341d57 100644
--- a/node_modules/core-js/library/fn/object/get-own-property-descriptors.js
+++ b/node_modules/core-js/library/fn/object/get-own-property-descriptors.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.get-own-property-descriptors');
-module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getOwnPropertyDescriptors; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/get-own-property-names.js b/node_modules/core-js/library/fn/object/get-own-property-names.js
index c91ce430f..496eb1970 100644
--- a/node_modules/core-js/library/fn/object/get-own-property-names.js
+++ b/node_modules/core-js/library/fn/object/get-own-property-names.js
@@ -1,5 +1,5 @@
+var $ = require('../../modules/$');
require('../../modules/es6.object.get-own-property-names');
-var $Object = require('../../modules/_core').Object;
module.exports = function getOwnPropertyNames(it){
- return $Object.getOwnPropertyNames(it);
+ return $.getNames(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/get-own-property-symbols.js b/node_modules/core-js/library/fn/object/get-own-property-symbols.js
index c3f528807..f78921b51 100644
--- a/node_modules/core-js/library/fn/object/get-own-property-symbols.js
+++ b/node_modules/core-js/library/fn/object/get-own-property-symbols.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Object.getOwnPropertySymbols; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getOwnPropertySymbols; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/get-prototype-of.js b/node_modules/core-js/library/fn/object/get-prototype-of.js
index bda934458..9a495afe7 100644
--- a/node_modules/core-js/library/fn/object/get-prototype-of.js
+++ b/node_modules/core-js/library/fn/object/get-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.get-prototype-of');
-module.exports = require('../../modules/_core').Object.getPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.getPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/index.js b/node_modules/core-js/library/fn/object/index.js
index 4bd9825b4..0fb75bc5e 100644
--- a/node_modules/core-js/library/fn/object/index.js
+++ b/node_modules/core-js/library/fn/object/index.js
@@ -1,30 +1,23 @@
require('../../modules/es6.symbol');
-require('../../modules/es6.object.create');
-require('../../modules/es6.object.define-property');
-require('../../modules/es6.object.define-properties');
-require('../../modules/es6.object.get-own-property-descriptor');
-require('../../modules/es6.object.get-prototype-of');
-require('../../modules/es6.object.keys');
-require('../../modules/es6.object.get-own-property-names');
+require('../../modules/es6.object.assign');
+require('../../modules/es6.object.is');
+require('../../modules/es6.object.set-prototype-of');
+require('../../modules/es6.object.to-string');
require('../../modules/es6.object.freeze');
require('../../modules/es6.object.seal');
require('../../modules/es6.object.prevent-extensions');
require('../../modules/es6.object.is-frozen');
require('../../modules/es6.object.is-sealed');
require('../../modules/es6.object.is-extensible');
-require('../../modules/es6.object.assign');
-require('../../modules/es6.object.is');
-require('../../modules/es6.object.set-prototype-of');
-require('../../modules/es6.object.to-string');
+require('../../modules/es6.object.get-own-property-descriptor');
+require('../../modules/es6.object.get-prototype-of');
+require('../../modules/es6.object.keys');
+require('../../modules/es6.object.get-own-property-names');
require('../../modules/es7.object.get-own-property-descriptors');
require('../../modules/es7.object.values');
require('../../modules/es7.object.entries');
-require('../../modules/es7.object.define-getter');
-require('../../modules/es7.object.define-setter');
-require('../../modules/es7.object.lookup-getter');
-require('../../modules/es7.object.lookup-setter');
require('../../modules/core.object.is-object');
require('../../modules/core.object.classof');
require('../../modules/core.object.define');
require('../../modules/core.object.make');
-module.exports = require('../../modules/_core').Object; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/is-extensible.js b/node_modules/core-js/library/fn/object/is-extensible.js
index 43fb0e78a..8bb0cf9f7 100644
--- a/node_modules/core-js/library/fn/object/is-extensible.js
+++ b/node_modules/core-js/library/fn/object/is-extensible.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-extensible');
-module.exports = require('../../modules/_core').Object.isExtensible; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isExtensible; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/is-frozen.js b/node_modules/core-js/library/fn/object/is-frozen.js
index cbff22421..7bf1f1270 100644
--- a/node_modules/core-js/library/fn/object/is-frozen.js
+++ b/node_modules/core-js/library/fn/object/is-frozen.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-frozen');
-module.exports = require('../../modules/_core').Object.isFrozen; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isFrozen; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/is-object.js b/node_modules/core-js/library/fn/object/is-object.js
index 38feeff5c..935cb6ece 100644
--- a/node_modules/core-js/library/fn/object/is-object.js
+++ b/node_modules/core-js/library/fn/object/is-object.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.is-object');
-module.exports = require('../../modules/_core').Object.isObject; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isObject; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/is-sealed.js b/node_modules/core-js/library/fn/object/is-sealed.js
index 169a8ae73..05416f377 100644
--- a/node_modules/core-js/library/fn/object/is-sealed.js
+++ b/node_modules/core-js/library/fn/object/is-sealed.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is-sealed');
-module.exports = require('../../modules/_core').Object.isSealed; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.isSealed; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/is.js b/node_modules/core-js/library/fn/object/is.js
index 6ac9f19e1..d07c3ae18 100644
--- a/node_modules/core-js/library/fn/object/is.js
+++ b/node_modules/core-js/library/fn/object/is.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.is');
-module.exports = require('../../modules/_core').Object.is; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.is; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/keys.js b/node_modules/core-js/library/fn/object/keys.js
index 8eeb78eb8..ebfb8c655 100644
--- a/node_modules/core-js/library/fn/object/keys.js
+++ b/node_modules/core-js/library/fn/object/keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.keys');
-module.exports = require('../../modules/_core').Object.keys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.keys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/lookup-getter.js b/node_modules/core-js/library/fn/object/lookup-getter.js
deleted file mode 100644
index 3f7f674d0..000000000
--- a/node_modules/core-js/library/fn/object/lookup-getter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.lookup-setter');
-module.exports = require('../../modules/_core').Object.__lookupGetter__; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/lookup-setter.js b/node_modules/core-js/library/fn/object/lookup-setter.js
deleted file mode 100644
index d18446fe9..000000000
--- a/node_modules/core-js/library/fn/object/lookup-setter.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.object.lookup-setter');
-module.exports = require('../../modules/_core').Object.__lookupSetter__; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/make.js b/node_modules/core-js/library/fn/object/make.js
index f4d19d128..fbfb2f858 100644
--- a/node_modules/core-js/library/fn/object/make.js
+++ b/node_modules/core-js/library/fn/object/make.js
@@ -1,2 +1,2 @@
require('../../modules/core.object.make');
-module.exports = require('../../modules/_core').Object.make; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.make; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/prevent-extensions.js b/node_modules/core-js/library/fn/object/prevent-extensions.js
index e43be05b1..01d82fcbd 100644
--- a/node_modules/core-js/library/fn/object/prevent-extensions.js
+++ b/node_modules/core-js/library/fn/object/prevent-extensions.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.prevent-extensions');
-module.exports = require('../../modules/_core').Object.preventExtensions; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.preventExtensions; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/seal.js b/node_modules/core-js/library/fn/object/seal.js
index 8a56cd7f3..fdf84b821 100644
--- a/node_modules/core-js/library/fn/object/seal.js
+++ b/node_modules/core-js/library/fn/object/seal.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.seal');
-module.exports = require('../../modules/_core').Object.seal; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.seal; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/set-prototype-of.js b/node_modules/core-js/library/fn/object/set-prototype-of.js
index c25170dbc..cd94d875b 100644
--- a/node_modules/core-js/library/fn/object/set-prototype-of.js
+++ b/node_modules/core-js/library/fn/object/set-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.set-prototype-of');
-module.exports = require('../../modules/_core').Object.setPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.setPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/object/values.js b/node_modules/core-js/library/fn/object/values.js
index b50336cf1..b96071ff3 100644
--- a/node_modules/core-js/library/fn/object/values.js
+++ b/node_modules/core-js/library/fn/object/values.js
@@ -1,2 +1,2 @@
require('../../modules/es7.object.values');
-module.exports = require('../../modules/_core').Object.values; \ No newline at end of file
+module.exports = require('../../modules/$.core').Object.values; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/observable.js b/node_modules/core-js/library/fn/observable.js
deleted file mode 100644
index 05ca51a37..000000000
--- a/node_modules/core-js/library/fn/observable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-require('../modules/es6.object.to-string');
-require('../modules/es6.string.iterator');
-require('../modules/web.dom.iterable');
-require('../modules/es6.promise');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('../modules/_core').Observable; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/parse-float.js b/node_modules/core-js/library/fn/parse-float.js
deleted file mode 100644
index dad94ddbe..000000000
--- a/node_modules/core-js/library/fn/parse-float.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-float');
-module.exports = require('../modules/_core').parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/parse-int.js b/node_modules/core-js/library/fn/parse-int.js
deleted file mode 100644
index 08a20996b..000000000
--- a/node_modules/core-js/library/fn/parse-int.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/es6.parse-int');
-module.exports = require('../modules/_core').parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/promise.js b/node_modules/core-js/library/fn/promise.js
index c901c8595..0a0996139 100644
--- a/node_modules/core-js/library/fn/promise.js
+++ b/node_modules/core-js/library/fn/promise.js
@@ -2,4 +2,4 @@ require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.promise');
-module.exports = require('../modules/_core').Promise; \ No newline at end of file
+module.exports = require('../modules/$.core').Promise; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/apply.js b/node_modules/core-js/library/fn/reflect/apply.js
index 725b8a699..75e5ff5b2 100644
--- a/node_modules/core-js/library/fn/reflect/apply.js
+++ b/node_modules/core-js/library/fn/reflect/apply.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.apply');
-module.exports = require('../../modules/_core').Reflect.apply; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.apply; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/construct.js b/node_modules/core-js/library/fn/reflect/construct.js
index 587725dad..adc40ea84 100644
--- a/node_modules/core-js/library/fn/reflect/construct.js
+++ b/node_modules/core-js/library/fn/reflect/construct.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.construct');
-module.exports = require('../../modules/_core').Reflect.construct; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.construct; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/define-metadata.js b/node_modules/core-js/library/fn/reflect/define-metadata.js
deleted file mode 100644
index c9876ed3b..000000000
--- a/node_modules/core-js/library/fn/reflect/define-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.define-metadata');
-module.exports = require('../../modules/_core').Reflect.defineMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/define-property.js b/node_modules/core-js/library/fn/reflect/define-property.js
index c36b4d21d..da78d62e5 100644
--- a/node_modules/core-js/library/fn/reflect/define-property.js
+++ b/node_modules/core-js/library/fn/reflect/define-property.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.define-property');
-module.exports = require('../../modules/_core').Reflect.defineProperty; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.defineProperty; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/delete-metadata.js b/node_modules/core-js/library/fn/reflect/delete-metadata.js
deleted file mode 100644
index 9bcc02997..000000000
--- a/node_modules/core-js/library/fn/reflect/delete-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.delete-metadata');
-module.exports = require('../../modules/_core').Reflect.deleteMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/delete-property.js b/node_modules/core-js/library/fn/reflect/delete-property.js
index 10b6392f2..411225f60 100644
--- a/node_modules/core-js/library/fn/reflect/delete-property.js
+++ b/node_modules/core-js/library/fn/reflect/delete-property.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.delete-property');
-module.exports = require('../../modules/_core').Reflect.deleteProperty; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.deleteProperty; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/enumerate.js b/node_modules/core-js/library/fn/reflect/enumerate.js
index 257a21eee..c19e0b6b5 100644
--- a/node_modules/core-js/library/fn/reflect/enumerate.js
+++ b/node_modules/core-js/library/fn/reflect/enumerate.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.enumerate');
-module.exports = require('../../modules/_core').Reflect.enumerate; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.enumerate; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-metadata-keys.js b/node_modules/core-js/library/fn/reflect/get-metadata-keys.js
deleted file mode 100644
index 9dbf5ee14..000000000
--- a/node_modules/core-js/library/fn/reflect/get-metadata-keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-metadata-keys');
-module.exports = require('../../modules/_core').Reflect.getMetadataKeys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-metadata.js b/node_modules/core-js/library/fn/reflect/get-metadata.js
deleted file mode 100644
index 3a20839eb..000000000
--- a/node_modules/core-js/library/fn/reflect/get-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-metadata');
-module.exports = require('../../modules/_core').Reflect.getMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js b/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js
deleted file mode 100644
index 2f8c5759b..000000000
--- a/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-own-metadata-keys');
-module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-own-metadata.js b/node_modules/core-js/library/fn/reflect/get-own-metadata.js
deleted file mode 100644
index 68e288dda..000000000
--- a/node_modules/core-js/library/fn/reflect/get-own-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.get-own-metadata');
-module.exports = require('../../modules/_core').Reflect.getOwnMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js b/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js
index 9e2822fb5..22e2aa666 100644
--- a/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js
+++ b/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get-own-property-descriptor');
-module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get-prototype-of.js b/node_modules/core-js/library/fn/reflect/get-prototype-of.js
index 485035960..2ff331a45 100644
--- a/node_modules/core-js/library/fn/reflect/get-prototype-of.js
+++ b/node_modules/core-js/library/fn/reflect/get-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get-prototype-of');
-module.exports = require('../../modules/_core').Reflect.getPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.getPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/get.js b/node_modules/core-js/library/fn/reflect/get.js
index 9ca903e82..266508c68 100644
--- a/node_modules/core-js/library/fn/reflect/get.js
+++ b/node_modules/core-js/library/fn/reflect/get.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.get');
-module.exports = require('../../modules/_core').Reflect.get; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.get; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/has-metadata.js b/node_modules/core-js/library/fn/reflect/has-metadata.js
deleted file mode 100644
index f001f437a..000000000
--- a/node_modules/core-js/library/fn/reflect/has-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.has-metadata');
-module.exports = require('../../modules/_core').Reflect.hasMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/has-own-metadata.js b/node_modules/core-js/library/fn/reflect/has-own-metadata.js
deleted file mode 100644
index d90935f0b..000000000
--- a/node_modules/core-js/library/fn/reflect/has-own-metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.has-own-metadata');
-module.exports = require('../../modules/_core').Reflect.hasOwnMetadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/has.js b/node_modules/core-js/library/fn/reflect/has.js
index 8e34933c8..db14fa11a 100644
--- a/node_modules/core-js/library/fn/reflect/has.js
+++ b/node_modules/core-js/library/fn/reflect/has.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.has');
-module.exports = require('../../modules/_core').Reflect.has; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.has; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/index.js b/node_modules/core-js/library/fn/reflect/index.js
index a725cef2f..5b2166531 100644
--- a/node_modules/core-js/library/fn/reflect/index.js
+++ b/node_modules/core-js/library/fn/reflect/index.js
@@ -12,13 +12,4 @@ require('../../modules/es6.reflect.own-keys');
require('../../modules/es6.reflect.prevent-extensions');
require('../../modules/es6.reflect.set');
require('../../modules/es6.reflect.set-prototype-of');
-require('../../modules/es7.reflect.define-metadata');
-require('../../modules/es7.reflect.delete-metadata');
-require('../../modules/es7.reflect.get-metadata');
-require('../../modules/es7.reflect.get-metadata-keys');
-require('../../modules/es7.reflect.get-own-metadata');
-require('../../modules/es7.reflect.get-own-metadata-keys');
-require('../../modules/es7.reflect.has-metadata');
-require('../../modules/es7.reflect.has-own-metadata');
-require('../../modules/es7.reflect.metadata');
-module.exports = require('../../modules/_core').Reflect; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/is-extensible.js b/node_modules/core-js/library/fn/reflect/is-extensible.js
index de41d683a..f0329e28b 100644
--- a/node_modules/core-js/library/fn/reflect/is-extensible.js
+++ b/node_modules/core-js/library/fn/reflect/is-extensible.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.is-extensible');
-module.exports = require('../../modules/_core').Reflect.isExtensible; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.isExtensible; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/metadata.js b/node_modules/core-js/library/fn/reflect/metadata.js
deleted file mode 100644
index 3f2b8ff62..000000000
--- a/node_modules/core-js/library/fn/reflect/metadata.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.reflect.metadata');
-module.exports = require('../../modules/_core').Reflect.metadata; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/own-keys.js b/node_modules/core-js/library/fn/reflect/own-keys.js
index bfcebc740..6da1136dd 100644
--- a/node_modules/core-js/library/fn/reflect/own-keys.js
+++ b/node_modules/core-js/library/fn/reflect/own-keys.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.own-keys');
-module.exports = require('../../modules/_core').Reflect.ownKeys; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.ownKeys; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/prevent-extensions.js b/node_modules/core-js/library/fn/reflect/prevent-extensions.js
index b346da3b0..48fb5d5a9 100644
--- a/node_modules/core-js/library/fn/reflect/prevent-extensions.js
+++ b/node_modules/core-js/library/fn/reflect/prevent-extensions.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.prevent-extensions');
-module.exports = require('../../modules/_core').Reflect.preventExtensions; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.preventExtensions; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/set-prototype-of.js b/node_modules/core-js/library/fn/reflect/set-prototype-of.js
index 16b74359c..09cddebc8 100644
--- a/node_modules/core-js/library/fn/reflect/set-prototype-of.js
+++ b/node_modules/core-js/library/fn/reflect/set-prototype-of.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.set-prototype-of');
-module.exports = require('../../modules/_core').Reflect.setPrototypeOf; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.setPrototypeOf; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/reflect/set.js b/node_modules/core-js/library/fn/reflect/set.js
index 834929ee3..d1afec9c1 100644
--- a/node_modules/core-js/library/fn/reflect/set.js
+++ b/node_modules/core-js/library/fn/reflect/set.js
@@ -1,2 +1,2 @@
require('../../modules/es6.reflect.set');
-module.exports = require('../../modules/_core').Reflect.set; \ No newline at end of file
+module.exports = require('../../modules/$.core').Reflect.set; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/constructor.js b/node_modules/core-js/library/fn/regexp/constructor.js
deleted file mode 100644
index 90c13513d..000000000
--- a/node_modules/core-js/library/fn/regexp/constructor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.regexp.constructor');
-module.exports = RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/escape.js b/node_modules/core-js/library/fn/regexp/escape.js
index d657a7d91..0c8d06b4c 100644
--- a/node_modules/core-js/library/fn/regexp/escape.js
+++ b/node_modules/core-js/library/fn/regexp/escape.js
@@ -1,2 +1,2 @@
-require('../../modules/core.regexp.escape');
-module.exports = require('../../modules/_core').RegExp.escape; \ No newline at end of file
+require('../../modules/es7.regexp.escape');
+module.exports = require('../../modules/$.core').RegExp.escape; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/flags.js b/node_modules/core-js/library/fn/regexp/flags.js
deleted file mode 100644
index ef84ddbd1..000000000
--- a/node_modules/core-js/library/fn/regexp/flags.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.flags');
-var flags = require('../../modules/_flags');
-module.exports = function(it){
- return flags.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/index.js b/node_modules/core-js/library/fn/regexp/index.js
index 61ced0b81..7d905d67d 100644
--- a/node_modules/core-js/library/fn/regexp/index.js
+++ b/node_modules/core-js/library/fn/regexp/index.js
@@ -1,9 +1,8 @@
require('../../modules/es6.regexp.constructor');
-require('../../modules/es6.regexp.to-string');
require('../../modules/es6.regexp.flags');
require('../../modules/es6.regexp.match');
require('../../modules/es6.regexp.replace');
require('../../modules/es6.regexp.search');
require('../../modules/es6.regexp.split');
-require('../../modules/core.regexp.escape');
-module.exports = require('../../modules/_core').RegExp; \ No newline at end of file
+require('../../modules/es7.regexp.escape');
+module.exports = require('../../modules/$.core').RegExp; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/match.js b/node_modules/core-js/library/fn/regexp/match.js
deleted file mode 100644
index 400d0921e..000000000
--- a/node_modules/core-js/library/fn/regexp/match.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.match');
-var MATCH = require('../../modules/_wks')('match');
-module.exports = function(it, str){
- return RegExp.prototype[MATCH].call(it, str);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/replace.js b/node_modules/core-js/library/fn/regexp/replace.js
deleted file mode 100644
index adde0adf6..000000000
--- a/node_modules/core-js/library/fn/regexp/replace.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.replace');
-var REPLACE = require('../../modules/_wks')('replace');
-module.exports = function(it, str, replacer){
- return RegExp.prototype[REPLACE].call(it, str, replacer);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/search.js b/node_modules/core-js/library/fn/regexp/search.js
deleted file mode 100644
index 4e149d05a..000000000
--- a/node_modules/core-js/library/fn/regexp/search.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.search');
-var SEARCH = require('../../modules/_wks')('search');
-module.exports = function(it, str){
- return RegExp.prototype[SEARCH].call(it, str);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/split.js b/node_modules/core-js/library/fn/regexp/split.js
deleted file mode 100644
index b92d09fa6..000000000
--- a/node_modules/core-js/library/fn/regexp/split.js
+++ /dev/null
@@ -1,5 +0,0 @@
-require('../../modules/es6.regexp.split');
-var SPLIT = require('../../modules/_wks')('split');
-module.exports = function(it, str, limit){
- return RegExp.prototype[SPLIT].call(it, str, limit);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/regexp/to-string.js b/node_modules/core-js/library/fn/regexp/to-string.js
deleted file mode 100644
index 29d5d037a..000000000
--- a/node_modules/core-js/library/fn/regexp/to-string.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-require('../../modules/es6.regexp.to-string');
-module.exports = function toString(it){
- return RegExp.prototype.toString.call(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/set-immediate.js b/node_modules/core-js/library/fn/set-immediate.js
index 250831369..2dd87df21 100644
--- a/node_modules/core-js/library/fn/set-immediate.js
+++ b/node_modules/core-js/library/fn/set-immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core').setImmediate; \ No newline at end of file
+module.exports = require('../modules/$.core').setImmediate; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/set-interval.js b/node_modules/core-js/library/fn/set-interval.js
index 484447ffa..4c7dd8e97 100644
--- a/node_modules/core-js/library/fn/set-interval.js
+++ b/node_modules/core-js/library/fn/set-interval.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core').setInterval; \ No newline at end of file
+module.exports = require('../modules/$.core').setInterval; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/set-timeout.js b/node_modules/core-js/library/fn/set-timeout.js
index 8ebbb2e4f..4e7861948 100644
--- a/node_modules/core-js/library/fn/set-timeout.js
+++ b/node_modules/core-js/library/fn/set-timeout.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core').setTimeout; \ No newline at end of file
+module.exports = require('../modules/$.core').setTimeout; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/set.js b/node_modules/core-js/library/fn/set.js
index a8b496525..34615f1d2 100644
--- a/node_modules/core-js/library/fn/set.js
+++ b/node_modules/core-js/library/fn/set.js
@@ -3,4 +3,4 @@ require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.set');
require('../modules/es7.set.to-json');
-module.exports = require('../modules/_core').Set; \ No newline at end of file
+module.exports = require('../modules/$.core').Set; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/anchor.js b/node_modules/core-js/library/fn/string/anchor.js
deleted file mode 100644
index ba4ef8135..000000000
--- a/node_modules/core-js/library/fn/string/anchor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.anchor');
-module.exports = require('../../modules/_core').String.anchor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/at.js b/node_modules/core-js/library/fn/string/at.js
index ab6aec153..d59d2aff2 100644
--- a/node_modules/core-js/library/fn/string/at.js
+++ b/node_modules/core-js/library/fn/string/at.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.at');
-module.exports = require('../../modules/_core').String.at; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.at; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/big.js b/node_modules/core-js/library/fn/string/big.js
deleted file mode 100644
index ab707907c..000000000
--- a/node_modules/core-js/library/fn/string/big.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.big');
-module.exports = require('../../modules/_core').String.big; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/blink.js b/node_modules/core-js/library/fn/string/blink.js
deleted file mode 100644
index c748079b9..000000000
--- a/node_modules/core-js/library/fn/string/blink.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.blink');
-module.exports = require('../../modules/_core').String.blink; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/bold.js b/node_modules/core-js/library/fn/string/bold.js
deleted file mode 100644
index 2d36bda3a..000000000
--- a/node_modules/core-js/library/fn/string/bold.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.bold');
-module.exports = require('../../modules/_core').String.bold; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/code-point-at.js b/node_modules/core-js/library/fn/string/code-point-at.js
index be141e82d..74e933aaa 100644
--- a/node_modules/core-js/library/fn/string/code-point-at.js
+++ b/node_modules/core-js/library/fn/string/code-point-at.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.code-point-at');
-module.exports = require('../../modules/_core').String.codePointAt; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.codePointAt; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/ends-with.js b/node_modules/core-js/library/fn/string/ends-with.js
index 5e427753e..7fe5cb744 100644
--- a/node_modules/core-js/library/fn/string/ends-with.js
+++ b/node_modules/core-js/library/fn/string/ends-with.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.ends-with');
-module.exports = require('../../modules/_core').String.endsWith; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.endsWith; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/escape-html.js b/node_modules/core-js/library/fn/string/escape-html.js
index 49176ca65..a6c62fafc 100644
--- a/node_modules/core-js/library/fn/string/escape-html.js
+++ b/node_modules/core-js/library/fn/string/escape-html.js
@@ -1,2 +1,2 @@
require('../../modules/core.string.escape-html');
-module.exports = require('../../modules/_core').String.escapeHTML; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.escapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/fixed.js b/node_modules/core-js/library/fn/string/fixed.js
deleted file mode 100644
index 77e233a3f..000000000
--- a/node_modules/core-js/library/fn/string/fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fixed');
-module.exports = require('../../modules/_core').String.fixed; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/fontcolor.js b/node_modules/core-js/library/fn/string/fontcolor.js
deleted file mode 100644
index 079235a19..000000000
--- a/node_modules/core-js/library/fn/string/fontcolor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fontcolor');
-module.exports = require('../../modules/_core').String.fontcolor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/fontsize.js b/node_modules/core-js/library/fn/string/fontsize.js
deleted file mode 100644
index 8cb2555c6..000000000
--- a/node_modules/core-js/library/fn/string/fontsize.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.fontsize');
-module.exports = require('../../modules/_core').String.fontsize; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/from-code-point.js b/node_modules/core-js/library/fn/string/from-code-point.js
index 93fc53aea..0b42e7ae4 100644
--- a/node_modules/core-js/library/fn/string/from-code-point.js
+++ b/node_modules/core-js/library/fn/string/from-code-point.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.from-code-point');
-module.exports = require('../../modules/_core').String.fromCodePoint; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.fromCodePoint; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/includes.js b/node_modules/core-js/library/fn/string/includes.js
index c9736404d..441bc5947 100644
--- a/node_modules/core-js/library/fn/string/includes.js
+++ b/node_modules/core-js/library/fn/string/includes.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.includes');
-module.exports = require('../../modules/_core').String.includes; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.includes; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/index.js b/node_modules/core-js/library/fn/string/index.js
index 6485a9b25..6be228caf 100644
--- a/node_modules/core-js/library/fn/string/index.js
+++ b/node_modules/core-js/library/fn/string/index.js
@@ -11,25 +11,11 @@ require('../../modules/es6.regexp.match');
require('../../modules/es6.regexp.replace');
require('../../modules/es6.regexp.search');
require('../../modules/es6.regexp.split');
-require('../../modules/es6.string.anchor');
-require('../../modules/es6.string.big');
-require('../../modules/es6.string.blink');
-require('../../modules/es6.string.bold');
-require('../../modules/es6.string.fixed');
-require('../../modules/es6.string.fontcolor');
-require('../../modules/es6.string.fontsize');
-require('../../modules/es6.string.italics');
-require('../../modules/es6.string.link');
-require('../../modules/es6.string.small');
-require('../../modules/es6.string.strike');
-require('../../modules/es6.string.sub');
-require('../../modules/es6.string.sup');
require('../../modules/es7.string.at');
-require('../../modules/es7.string.pad-start');
-require('../../modules/es7.string.pad-end');
+require('../../modules/es7.string.pad-left');
+require('../../modules/es7.string.pad-right');
require('../../modules/es7.string.trim-left');
require('../../modules/es7.string.trim-right');
-require('../../modules/es7.string.match-all');
require('../../modules/core.string.escape-html');
require('../../modules/core.string.unescape-html');
-module.exports = require('../../modules/_core').String;
+module.exports = require('../../modules/$.core').String; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/italics.js b/node_modules/core-js/library/fn/string/italics.js
deleted file mode 100644
index 378450ebd..000000000
--- a/node_modules/core-js/library/fn/string/italics.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.italics');
-module.exports = require('../../modules/_core').String.italics; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/iterator.js b/node_modules/core-js/library/fn/string/iterator.js
index 947e7558b..157336458 100644
--- a/node_modules/core-js/library/fn/string/iterator.js
+++ b/node_modules/core-js/library/fn/string/iterator.js
@@ -1,5 +1,5 @@
require('../../modules/es6.string.iterator');
-var get = require('../../modules/_iterators').String;
+var get = require('../../modules/$.iterators').String;
module.exports = function(it){
return get.call(it);
}; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/link.js b/node_modules/core-js/library/fn/string/link.js
deleted file mode 100644
index 1eb2c6dd2..000000000
--- a/node_modules/core-js/library/fn/string/link.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.link');
-module.exports = require('../../modules/_core').String.link; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/match-all.js b/node_modules/core-js/library/fn/string/match-all.js
deleted file mode 100644
index 1a1dfeb6e..000000000
--- a/node_modules/core-js/library/fn/string/match-all.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.match-all');
-module.exports = require('../../modules/_core').String.matchAll; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/pad-end.js b/node_modules/core-js/library/fn/string/pad-end.js
deleted file mode 100644
index 23eb9f95a..000000000
--- a/node_modules/core-js/library/fn/string/pad-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.pad-end');
-module.exports = require('../../modules/_core').String.padEnd;
diff --git a/node_modules/core-js/library/fn/string/pad-start.js b/node_modules/core-js/library/fn/string/pad-start.js
deleted file mode 100644
index ff12739fc..000000000
--- a/node_modules/core-js/library/fn/string/pad-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.pad-start');
-module.exports = require('../../modules/_core').String.padStart;
diff --git a/node_modules/core-js/library/fn/string/raw.js b/node_modules/core-js/library/fn/string/raw.js
index 713550fb2..0c04fd341 100644
--- a/node_modules/core-js/library/fn/string/raw.js
+++ b/node_modules/core-js/library/fn/string/raw.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.raw');
-module.exports = require('../../modules/_core').String.raw; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.raw; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/repeat.js b/node_modules/core-js/library/fn/string/repeat.js
index fa75b13ec..361070954 100644
--- a/node_modules/core-js/library/fn/string/repeat.js
+++ b/node_modules/core-js/library/fn/string/repeat.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.repeat');
-module.exports = require('../../modules/_core').String.repeat; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.repeat; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/small.js b/node_modules/core-js/library/fn/string/small.js
deleted file mode 100644
index 0438290db..000000000
--- a/node_modules/core-js/library/fn/string/small.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.small');
-module.exports = require('../../modules/_core').String.small; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/starts-with.js b/node_modules/core-js/library/fn/string/starts-with.js
index d62512a3c..edee83117 100644
--- a/node_modules/core-js/library/fn/string/starts-with.js
+++ b/node_modules/core-js/library/fn/string/starts-with.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.starts-with');
-module.exports = require('../../modules/_core').String.startsWith; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.startsWith; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/strike.js b/node_modules/core-js/library/fn/string/strike.js
deleted file mode 100644
index b79946c8e..000000000
--- a/node_modules/core-js/library/fn/string/strike.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.strike');
-module.exports = require('../../modules/_core').String.strike; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/sub.js b/node_modules/core-js/library/fn/string/sub.js
deleted file mode 100644
index 54d0671e3..000000000
--- a/node_modules/core-js/library/fn/string/sub.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.sub');
-module.exports = require('../../modules/_core').String.sub; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/sup.js b/node_modules/core-js/library/fn/string/sup.js
deleted file mode 100644
index 645e0372f..000000000
--- a/node_modules/core-js/library/fn/string/sup.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.string.sup');
-module.exports = require('../../modules/_core').String.sup; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/trim-end.js b/node_modules/core-js/library/fn/string/trim-end.js
deleted file mode 100644
index f3bdf6fb1..000000000
--- a/node_modules/core-js/library/fn/string/trim-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.trim-right');
-module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/trim-left.js b/node_modules/core-js/library/fn/string/trim-left.js
index 04671d369..579ad3978 100644
--- a/node_modules/core-js/library/fn/string/trim-left.js
+++ b/node_modules/core-js/library/fn/string/trim-left.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.trim-left');
-module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/trim-right.js b/node_modules/core-js/library/fn/string/trim-right.js
index f3bdf6fb1..2168d9459 100644
--- a/node_modules/core-js/library/fn/string/trim-right.js
+++ b/node_modules/core-js/library/fn/string/trim-right.js
@@ -1,2 +1,2 @@
require('../../modules/es7.string.trim-right');
-module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/trim-start.js b/node_modules/core-js/library/fn/string/trim-start.js
deleted file mode 100644
index 04671d369..000000000
--- a/node_modules/core-js/library/fn/string/trim-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.string.trim-left');
-module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/trim.js b/node_modules/core-js/library/fn/string/trim.js
index c536e12eb..61c647013 100644
--- a/node_modules/core-js/library/fn/string/trim.js
+++ b/node_modules/core-js/library/fn/string/trim.js
@@ -1,2 +1,2 @@
require('../../modules/es6.string.trim');
-module.exports = require('../../modules/_core').String.trim; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.trim; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/unescape-html.js b/node_modules/core-js/library/fn/string/unescape-html.js
index 7c2c55c8c..de09d98b4 100644
--- a/node_modules/core-js/library/fn/string/unescape-html.js
+++ b/node_modules/core-js/library/fn/string/unescape-html.js
@@ -1,2 +1,2 @@
require('../../modules/core.string.unescape-html');
-module.exports = require('../../modules/_core').String.unescapeHTML; \ No newline at end of file
+module.exports = require('../../modules/$.core').String.unescapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/anchor.js b/node_modules/core-js/library/fn/string/virtual/anchor.js
deleted file mode 100644
index 6f74b7e88..000000000
--- a/node_modules/core-js/library/fn/string/virtual/anchor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.anchor');
-module.exports = require('../../../modules/_entry-virtual')('String').anchor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/at.js b/node_modules/core-js/library/fn/string/virtual/at.js
deleted file mode 100644
index 3b9614386..000000000
--- a/node_modules/core-js/library/fn/string/virtual/at.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.at');
-module.exports = require('../../../modules/_entry-virtual')('String').at; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/big.js b/node_modules/core-js/library/fn/string/virtual/big.js
deleted file mode 100644
index 57ac7d5de..000000000
--- a/node_modules/core-js/library/fn/string/virtual/big.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.big');
-module.exports = require('../../../modules/_entry-virtual')('String').big; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/blink.js b/node_modules/core-js/library/fn/string/virtual/blink.js
deleted file mode 100644
index 5c4cea80f..000000000
--- a/node_modules/core-js/library/fn/string/virtual/blink.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.blink');
-module.exports = require('../../../modules/_entry-virtual')('String').blink; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/bold.js b/node_modules/core-js/library/fn/string/virtual/bold.js
deleted file mode 100644
index c566bf2d9..000000000
--- a/node_modules/core-js/library/fn/string/virtual/bold.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.bold');
-module.exports = require('../../../modules/_entry-virtual')('String').bold; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/code-point-at.js b/node_modules/core-js/library/fn/string/virtual/code-point-at.js
deleted file mode 100644
index 873752191..000000000
--- a/node_modules/core-js/library/fn/string/virtual/code-point-at.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.code-point-at');
-module.exports = require('../../../modules/_entry-virtual')('String').codePointAt; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/ends-with.js b/node_modules/core-js/library/fn/string/virtual/ends-with.js
deleted file mode 100644
index 90bc6e79e..000000000
--- a/node_modules/core-js/library/fn/string/virtual/ends-with.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.ends-with');
-module.exports = require('../../../modules/_entry-virtual')('String').endsWith; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/escape-html.js b/node_modules/core-js/library/fn/string/virtual/escape-html.js
deleted file mode 100644
index 3342bcec9..000000000
--- a/node_modules/core-js/library/fn/string/virtual/escape-html.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.string.escape-html');
-module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/fixed.js b/node_modules/core-js/library/fn/string/virtual/fixed.js
deleted file mode 100644
index e830654f2..000000000
--- a/node_modules/core-js/library/fn/string/virtual/fixed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fixed');
-module.exports = require('../../../modules/_entry-virtual')('String').fixed; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/fontcolor.js b/node_modules/core-js/library/fn/string/virtual/fontcolor.js
deleted file mode 100644
index cfb9b2c09..000000000
--- a/node_modules/core-js/library/fn/string/virtual/fontcolor.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fontcolor');
-module.exports = require('../../../modules/_entry-virtual')('String').fontcolor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/fontsize.js b/node_modules/core-js/library/fn/string/virtual/fontsize.js
deleted file mode 100644
index de8f5161a..000000000
--- a/node_modules/core-js/library/fn/string/virtual/fontsize.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.fontsize');
-module.exports = require('../../../modules/_entry-virtual')('String').fontsize; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/includes.js b/node_modules/core-js/library/fn/string/virtual/includes.js
deleted file mode 100644
index 1e4793d67..000000000
--- a/node_modules/core-js/library/fn/string/virtual/includes.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.includes');
-module.exports = require('../../../modules/_entry-virtual')('String').includes; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/index.js b/node_modules/core-js/library/fn/string/virtual/index.js
deleted file mode 100644
index 0e65d20c4..000000000
--- a/node_modules/core-js/library/fn/string/virtual/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-require('../../../modules/es6.string.trim');
-require('../../../modules/es6.string.iterator');
-require('../../../modules/es6.string.code-point-at');
-require('../../../modules/es6.string.ends-with');
-require('../../../modules/es6.string.includes');
-require('../../../modules/es6.string.repeat');
-require('../../../modules/es6.string.starts-with');
-require('../../../modules/es6.regexp.match');
-require('../../../modules/es6.regexp.replace');
-require('../../../modules/es6.regexp.search');
-require('../../../modules/es6.regexp.split');
-require('../../../modules/es6.string.anchor');
-require('../../../modules/es6.string.big');
-require('../../../modules/es6.string.blink');
-require('../../../modules/es6.string.bold');
-require('../../../modules/es6.string.fixed');
-require('../../../modules/es6.string.fontcolor');
-require('../../../modules/es6.string.fontsize');
-require('../../../modules/es6.string.italics');
-require('../../../modules/es6.string.link');
-require('../../../modules/es6.string.small');
-require('../../../modules/es6.string.strike');
-require('../../../modules/es6.string.sub');
-require('../../../modules/es6.string.sup');
-require('../../../modules/es7.string.at');
-require('../../../modules/es7.string.pad-start');
-require('../../../modules/es7.string.pad-end');
-require('../../../modules/es7.string.trim-left');
-require('../../../modules/es7.string.trim-right');
-require('../../../modules/es7.string.match-all');
-require('../../../modules/core.string.escape-html');
-require('../../../modules/core.string.unescape-html');
-module.exports = require('../../../modules/_entry-virtual')('String');
diff --git a/node_modules/core-js/library/fn/string/virtual/italics.js b/node_modules/core-js/library/fn/string/virtual/italics.js
deleted file mode 100644
index f8f1d3381..000000000
--- a/node_modules/core-js/library/fn/string/virtual/italics.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.italics');
-module.exports = require('../../../modules/_entry-virtual')('String').italics; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/iterator.js b/node_modules/core-js/library/fn/string/virtual/iterator.js
deleted file mode 100644
index 7efe2f93a..000000000
--- a/node_modules/core-js/library/fn/string/virtual/iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.number.iterator');
-module.exports = require('../../../modules/_iterators').String; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/link.js b/node_modules/core-js/library/fn/string/virtual/link.js
deleted file mode 100644
index 4b2eea8a5..000000000
--- a/node_modules/core-js/library/fn/string/virtual/link.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.link');
-module.exports = require('../../../modules/_entry-virtual')('String').link; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/match-all.js b/node_modules/core-js/library/fn/string/virtual/match-all.js
deleted file mode 100644
index 9208873a7..000000000
--- a/node_modules/core-js/library/fn/string/virtual/match-all.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.match-all');
-module.exports = require('../../../modules/_entry-virtual')('String').matchAll; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/pad-end.js b/node_modules/core-js/library/fn/string/virtual/pad-end.js
deleted file mode 100644
index 81e5ac046..000000000
--- a/node_modules/core-js/library/fn/string/virtual/pad-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.pad-end');
-module.exports = require('../../../modules/_entry-virtual')('String').padEnd; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/pad-start.js b/node_modules/core-js/library/fn/string/virtual/pad-start.js
deleted file mode 100644
index 54cf3a59b..000000000
--- a/node_modules/core-js/library/fn/string/virtual/pad-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.pad-start');
-module.exports = require('../../../modules/_entry-virtual')('String').padStart; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/repeat.js b/node_modules/core-js/library/fn/string/virtual/repeat.js
deleted file mode 100644
index d08cf6a5e..000000000
--- a/node_modules/core-js/library/fn/string/virtual/repeat.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.repeat');
-module.exports = require('../../../modules/_entry-virtual')('String').repeat; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/small.js b/node_modules/core-js/library/fn/string/virtual/small.js
deleted file mode 100644
index 201bf9b6a..000000000
--- a/node_modules/core-js/library/fn/string/virtual/small.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.small');
-module.exports = require('../../../modules/_entry-virtual')('String').small; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/starts-with.js b/node_modules/core-js/library/fn/string/virtual/starts-with.js
deleted file mode 100644
index f8897d153..000000000
--- a/node_modules/core-js/library/fn/string/virtual/starts-with.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.starts-with');
-module.exports = require('../../../modules/_entry-virtual')('String').startsWith; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/strike.js b/node_modules/core-js/library/fn/string/virtual/strike.js
deleted file mode 100644
index 4572db915..000000000
--- a/node_modules/core-js/library/fn/string/virtual/strike.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.strike');
-module.exports = require('../../../modules/_entry-virtual')('String').strike; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/sub.js b/node_modules/core-js/library/fn/string/virtual/sub.js
deleted file mode 100644
index a13611ecc..000000000
--- a/node_modules/core-js/library/fn/string/virtual/sub.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.sub');
-module.exports = require('../../../modules/_entry-virtual')('String').sub; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/sup.js b/node_modules/core-js/library/fn/string/virtual/sup.js
deleted file mode 100644
index 07695329c..000000000
--- a/node_modules/core-js/library/fn/string/virtual/sup.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.sup');
-module.exports = require('../../../modules/_entry-virtual')('String').sup; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/trim-end.js b/node_modules/core-js/library/fn/string/virtual/trim-end.js
deleted file mode 100644
index 14c25ac84..000000000
--- a/node_modules/core-js/library/fn/string/virtual/trim-end.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-right');
-module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/trim-left.js b/node_modules/core-js/library/fn/string/virtual/trim-left.js
deleted file mode 100644
index aabcfb3f3..000000000
--- a/node_modules/core-js/library/fn/string/virtual/trim-left.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-left');
-module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/trim-right.js b/node_modules/core-js/library/fn/string/virtual/trim-right.js
deleted file mode 100644
index 14c25ac84..000000000
--- a/node_modules/core-js/library/fn/string/virtual/trim-right.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-right');
-module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/trim-start.js b/node_modules/core-js/library/fn/string/virtual/trim-start.js
deleted file mode 100644
index aabcfb3f3..000000000
--- a/node_modules/core-js/library/fn/string/virtual/trim-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es7.string.trim-left');
-module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/trim.js b/node_modules/core-js/library/fn/string/virtual/trim.js
deleted file mode 100644
index 23fbcbc50..000000000
--- a/node_modules/core-js/library/fn/string/virtual/trim.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/es6.string.trim');
-module.exports = require('../../../modules/_entry-virtual')('String').trim; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/string/virtual/unescape-html.js b/node_modules/core-js/library/fn/string/virtual/unescape-html.js
deleted file mode 100644
index 51eb59fc5..000000000
--- a/node_modules/core-js/library/fn/string/virtual/unescape-html.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../../modules/core.string.unescape-html');
-module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/async-iterator.js b/node_modules/core-js/library/fn/symbol/async-iterator.js
deleted file mode 100644
index aca10f966..000000000
--- a/node_modules/core-js/library/fn/symbol/async-iterator.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.symbol.async-iterator');
-module.exports = require('../../modules/_wks-ext').f('asyncIterator'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/for.js b/node_modules/core-js/library/fn/symbol/for.js
index c9e93c139..1b05275d2 100644
--- a/node_modules/core-js/library/fn/symbol/for.js
+++ b/node_modules/core-js/library/fn/symbol/for.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Symbol['for']; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol['for']; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/has-instance.js b/node_modules/core-js/library/fn/symbol/has-instance.js
index f3ec9cf6b..b264f990f 100644
--- a/node_modules/core-js/library/fn/symbol/has-instance.js
+++ b/node_modules/core-js/library/fn/symbol/has-instance.js
@@ -1,2 +1 @@
-require('../../modules/es6.function.has-instance');
-module.exports = require('../../modules/_wks-ext').f('hasInstance'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('hasInstance'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/index.js b/node_modules/core-js/library/fn/symbol/index.js
index 64c0f5f47..c8f81d180 100644
--- a/node_modules/core-js/library/fn/symbol/index.js
+++ b/node_modules/core-js/library/fn/symbol/index.js
@@ -1,5 +1,3 @@
require('../../modules/es6.symbol');
require('../../modules/es6.object.to-string');
-require('../../modules/es7.symbol.async-iterator');
-require('../../modules/es7.symbol.observable');
-module.exports = require('../../modules/_core').Symbol; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js b/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js
index 49ed7a1d2..17d5a2669 100644
--- a/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js
+++ b/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('isConcatSpreadable'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/iterator.js b/node_modules/core-js/library/fn/symbol/iterator.js
index 503522809..7e1b7985f 100644
--- a/node_modules/core-js/library/fn/symbol/iterator.js
+++ b/node_modules/core-js/library/fn/symbol/iterator.js
@@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/web.dom.iterable');
-module.exports = require('../../modules/_wks-ext').f('iterator'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('iterator'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/key-for.js b/node_modules/core-js/library/fn/symbol/key-for.js
index d9b595ff1..e62b1abd9 100644
--- a/node_modules/core-js/library/fn/symbol/key-for.js
+++ b/node_modules/core-js/library/fn/symbol/key-for.js
@@ -1,2 +1,2 @@
require('../../modules/es6.symbol');
-module.exports = require('../../modules/_core').Symbol.keyFor; \ No newline at end of file
+module.exports = require('../../modules/$.core').Symbol.keyFor; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/match.js b/node_modules/core-js/library/fn/symbol/match.js
index d27db65b6..d25c1196d 100644
--- a/node_modules/core-js/library/fn/symbol/match.js
+++ b/node_modules/core-js/library/fn/symbol/match.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.match');
-module.exports = require('../../modules/_wks-ext').f('match'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('match'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/observable.js b/node_modules/core-js/library/fn/symbol/observable.js
deleted file mode 100644
index 884cebfdf..000000000
--- a/node_modules/core-js/library/fn/symbol/observable.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.symbol.observable');
-module.exports = require('../../modules/_wks-ext').f('observable'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/replace.js b/node_modules/core-js/library/fn/symbol/replace.js
index 3ef60f5e9..ce3154b91 100644
--- a/node_modules/core-js/library/fn/symbol/replace.js
+++ b/node_modules/core-js/library/fn/symbol/replace.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.replace');
-module.exports = require('../../modules/_wks-ext').f('replace'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('replace'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/search.js b/node_modules/core-js/library/fn/symbol/search.js
index aee84f9e6..ad781d404 100644
--- a/node_modules/core-js/library/fn/symbol/search.js
+++ b/node_modules/core-js/library/fn/symbol/search.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.search');
-module.exports = require('../../modules/_wks-ext').f('search'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('search'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/species.js b/node_modules/core-js/library/fn/symbol/species.js
index a425eb2da..de937d752 100644
--- a/node_modules/core-js/library/fn/symbol/species.js
+++ b/node_modules/core-js/library/fn/symbol/species.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('species'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('species'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/split.js b/node_modules/core-js/library/fn/symbol/split.js
index 8535932fb..27c516672 100644
--- a/node_modules/core-js/library/fn/symbol/split.js
+++ b/node_modules/core-js/library/fn/symbol/split.js
@@ -1,2 +1,2 @@
require('../../modules/es6.regexp.split');
-module.exports = require('../../modules/_wks-ext').f('split'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('split'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/to-primitive.js b/node_modules/core-js/library/fn/symbol/to-primitive.js
index 20c831b85..129eb8b28 100644
--- a/node_modules/core-js/library/fn/symbol/to-primitive.js
+++ b/node_modules/core-js/library/fn/symbol/to-primitive.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('toPrimitive'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('toPrimitive'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/to-string-tag.js b/node_modules/core-js/library/fn/symbol/to-string-tag.js
index 101baf27c..fc22c861a 100644
--- a/node_modules/core-js/library/fn/symbol/to-string-tag.js
+++ b/node_modules/core-js/library/fn/symbol/to-string-tag.js
@@ -1,2 +1,2 @@
require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_wks-ext').f('toStringTag'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('toStringTag'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/symbol/unscopables.js b/node_modules/core-js/library/fn/symbol/unscopables.js
index 6c4146b23..399397007 100644
--- a/node_modules/core-js/library/fn/symbol/unscopables.js
+++ b/node_modules/core-js/library/fn/symbol/unscopables.js
@@ -1 +1 @@
-module.exports = require('../../modules/_wks-ext').f('unscopables'); \ No newline at end of file
+module.exports = require('../../modules/$.wks')('unscopables'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/system/global.js b/node_modules/core-js/library/fn/system/global.js
deleted file mode 100644
index c3219d6f3..000000000
--- a/node_modules/core-js/library/fn/system/global.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.system.global');
-module.exports = require('../../modules/_core').System.global; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/system/index.js b/node_modules/core-js/library/fn/system/index.js
deleted file mode 100644
index eae78ddd6..000000000
--- a/node_modules/core-js/library/fn/system/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es7.system.global');
-module.exports = require('../../modules/_core').System; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/array-buffer.js b/node_modules/core-js/library/fn/typed/array-buffer.js
deleted file mode 100644
index fe08f7f24..000000000
--- a/node_modules/core-js/library/fn/typed/array-buffer.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.typed.array-buffer');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core').ArrayBuffer; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/data-view.js b/node_modules/core-js/library/fn/typed/data-view.js
deleted file mode 100644
index 09dbb38aa..000000000
--- a/node_modules/core-js/library/fn/typed/data-view.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../../modules/es6.typed.data-view');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core').DataView; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/float32-array.js b/node_modules/core-js/library/fn/typed/float32-array.js
deleted file mode 100644
index 1191fecb9..000000000
--- a/node_modules/core-js/library/fn/typed/float32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.float32-array');
-module.exports = require('../../modules/_core').Float32Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/float64-array.js b/node_modules/core-js/library/fn/typed/float64-array.js
deleted file mode 100644
index 6073a6824..000000000
--- a/node_modules/core-js/library/fn/typed/float64-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.float64-array');
-module.exports = require('../../modules/_core').Float64Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/index.js b/node_modules/core-js/library/fn/typed/index.js
deleted file mode 100644
index 7babe09d3..000000000
--- a/node_modules/core-js/library/fn/typed/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-require('../../modules/es6.typed.array-buffer');
-require('../../modules/es6.typed.data-view');
-require('../../modules/es6.typed.int8-array');
-require('../../modules/es6.typed.uint8-array');
-require('../../modules/es6.typed.uint8-clamped-array');
-require('../../modules/es6.typed.int16-array');
-require('../../modules/es6.typed.uint16-array');
-require('../../modules/es6.typed.int32-array');
-require('../../modules/es6.typed.uint32-array');
-require('../../modules/es6.typed.float32-array');
-require('../../modules/es6.typed.float64-array');
-require('../../modules/es6.object.to-string');
-module.exports = require('../../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/int16-array.js b/node_modules/core-js/library/fn/typed/int16-array.js
deleted file mode 100644
index 0722549d3..000000000
--- a/node_modules/core-js/library/fn/typed/int16-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int16-array');
-module.exports = require('../../modules/_core').Int16Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/int32-array.js b/node_modules/core-js/library/fn/typed/int32-array.js
deleted file mode 100644
index 136136221..000000000
--- a/node_modules/core-js/library/fn/typed/int32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int32-array');
-module.exports = require('../../modules/_core').Int32Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/int8-array.js b/node_modules/core-js/library/fn/typed/int8-array.js
deleted file mode 100644
index edf48c792..000000000
--- a/node_modules/core-js/library/fn/typed/int8-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.int8-array');
-module.exports = require('../../modules/_core').Int8Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/uint16-array.js b/node_modules/core-js/library/fn/typed/uint16-array.js
deleted file mode 100644
index 3ff11550e..000000000
--- a/node_modules/core-js/library/fn/typed/uint16-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint16-array');
-module.exports = require('../../modules/_core').Uint16Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/uint32-array.js b/node_modules/core-js/library/fn/typed/uint32-array.js
deleted file mode 100644
index 47bb4c211..000000000
--- a/node_modules/core-js/library/fn/typed/uint32-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint32-array');
-module.exports = require('../../modules/_core').Uint32Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/uint8-array.js b/node_modules/core-js/library/fn/typed/uint8-array.js
deleted file mode 100644
index fd8a4b114..000000000
--- a/node_modules/core-js/library/fn/typed/uint8-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint8-array');
-module.exports = require('../../modules/_core').Uint8Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/typed/uint8-clamped-array.js b/node_modules/core-js/library/fn/typed/uint8-clamped-array.js
deleted file mode 100644
index c688657c5..000000000
--- a/node_modules/core-js/library/fn/typed/uint8-clamped-array.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../../modules/es6.typed.uint8-clamped-array');
-module.exports = require('../../modules/_core').Uint8ClampedArray; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/weak-map.js b/node_modules/core-js/library/fn/weak-map.js
index 00cac1adb..ebf46e6a5 100644
--- a/node_modules/core-js/library/fn/weak-map.js
+++ b/node_modules/core-js/library/fn/weak-map.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-map');
-module.exports = require('../modules/_core').WeakMap; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakMap; \ No newline at end of file
diff --git a/node_modules/core-js/library/fn/weak-set.js b/node_modules/core-js/library/fn/weak-set.js
index eef1af2a8..a058c8a6a 100644
--- a/node_modules/core-js/library/fn/weak-set.js
+++ b/node_modules/core-js/library/fn/weak-set.js
@@ -1,4 +1,4 @@
require('../modules/es6.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/es6.weak-set');
-module.exports = require('../modules/_core').WeakSet; \ No newline at end of file
+module.exports = require('../modules/$.core').WeakSet; \ No newline at end of file
diff --git a/node_modules/core-js/library/index.js b/node_modules/core-js/library/index.js
index 78b9e3d4b..9acb1b4ad 100644
--- a/node_modules/core-js/library/index.js
+++ b/node_modules/core-js/library/index.js
@@ -10,7 +10,7 @@ require('./modules/core.object.classof');
require('./modules/core.object.define');
require('./modules/core.object.make');
require('./modules/core.number.iterator');
-require('./modules/core.regexp.escape');
require('./modules/core.string.escape-html');
require('./modules/core.string.unescape-html');
-module.exports = require('./modules/_core'); \ No newline at end of file
+require('./modules/core.log');
+module.exports = require('./modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_a-function.js b/node_modules/core-js/library/modules/_a-function.js
deleted file mode 100644
index 8c35f4514..000000000
--- a/node_modules/core-js/library/modules/_a-function.js
+++ /dev/null
@@ -1,4 +0,0 @@
-module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_a-number-value.js b/node_modules/core-js/library/modules/_a-number-value.js
deleted file mode 100644
index 7bcbd7b76..000000000
--- a/node_modules/core-js/library/modules/_a-number-value.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var cof = require('./_cof');
-module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_add-to-unscopables.js b/node_modules/core-js/library/modules/_add-to-unscopables.js
deleted file mode 100644
index faf87af36..000000000
--- a/node_modules/core-js/library/modules/_add-to-unscopables.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = function(){ /* empty */ }; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_an-instance.js b/node_modules/core-js/library/modules/_an-instance.js
deleted file mode 100644
index e4dfad3d0..000000000
--- a/node_modules/core-js/library/modules/_an-instance.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = function(it, Constructor, name, forbiddenField){
- if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
- throw TypeError(name + ': incorrect invocation!');
- } return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_an-object.js b/node_modules/core-js/library/modules/_an-object.js
deleted file mode 100644
index 59a8a3a36..000000000
--- a/node_modules/core-js/library/modules/_an-object.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var isObject = require('./_is-object');
-module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-copy-within.js b/node_modules/core-js/library/modules/_array-copy-within.js
deleted file mode 100644
index d901a32f5..000000000
--- a/node_modules/core-js/library/modules/_array-copy-within.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-'use strict';
-var toObject = require('./_to-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length');
-
-module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
- var O = toObject(this)
- , len = toLength(O.length)
- , to = toIndex(target, len)
- , from = toIndex(start, len)
- , end = arguments.length > 2 ? arguments[2] : undefined
- , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
- , inc = 1;
- if(from < to && to < from + count){
- inc = -1;
- from += count - 1;
- to += count - 1;
- }
- while(count-- > 0){
- if(from in O)O[to] = O[from];
- else delete O[to];
- to += inc;
- from += inc;
- } return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-fill.js b/node_modules/core-js/library/modules/_array-fill.js
deleted file mode 100644
index b21bb7edd..000000000
--- a/node_modules/core-js/library/modules/_array-fill.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-'use strict';
-var toObject = require('./_to-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length');
-module.exports = function fill(value /*, start = 0, end = @length */){
- var O = toObject(this)
- , length = toLength(O.length)
- , aLen = arguments.length
- , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
- , end = aLen > 2 ? arguments[2] : undefined
- , endPos = end === undefined ? length : toIndex(end, length);
- while(endPos > index)O[index++] = value;
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-from-iterable.js b/node_modules/core-js/library/modules/_array-from-iterable.js
deleted file mode 100644
index b5c454fb0..000000000
--- a/node_modules/core-js/library/modules/_array-from-iterable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var forOf = require('./_for-of');
-
-module.exports = function(iter, ITERATOR){
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
-};
diff --git a/node_modules/core-js/library/modules/_array-includes.js b/node_modules/core-js/library/modules/_array-includes.js
deleted file mode 100644
index c70b064d1..000000000
--- a/node_modules/core-js/library/modules/_array-includes.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// false -> Array#indexOf
-// true -> Array#includes
-var toIObject = require('./_to-iobject')
- , toLength = require('./_to-length')
- , toIndex = require('./_to-index');
-module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
- // Array#includes uses SameValueZero equality algorithm
- if(IS_INCLUDES && el != el)while(length > index){
- value = O[index++];
- if(value != value)return true;
- // Array#toIndex ignores holes, Array#includes - not
- } else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-methods.js b/node_modules/core-js/library/modules/_array-methods.js
deleted file mode 100644
index 8ffbe1164..000000000
--- a/node_modules/core-js/library/modules/_array-methods.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// 0 -> Array#forEach
-// 1 -> Array#map
-// 2 -> Array#filter
-// 3 -> Array#some
-// 4 -> Array#every
-// 5 -> Array#find
-// 6 -> Array#findIndex
-var ctx = require('./_ctx')
- , IObject = require('./_iobject')
- , toObject = require('./_to-object')
- , toLength = require('./_to-length')
- , asc = require('./_array-species-create');
-module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-reduce.js b/node_modules/core-js/library/modules/_array-reduce.js
deleted file mode 100644
index c807d5443..000000000
--- a/node_modules/core-js/library/modules/_array-reduce.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var aFunction = require('./_a-function')
- , toObject = require('./_to-object')
- , IObject = require('./_iobject')
- , toLength = require('./_to-length');
-
-module.exports = function(that, callbackfn, aLen, memo, isRight){
- aFunction(callbackfn);
- var O = toObject(that)
- , self = IObject(O)
- , length = toLength(O.length)
- , index = isRight ? length - 1 : 0
- , i = isRight ? -1 : 1;
- if(aLen < 2)for(;;){
- if(index in self){
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if(isRight ? index < 0 : length <= index){
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-species-constructor.js b/node_modules/core-js/library/modules/_array-species-constructor.js
deleted file mode 100644
index a715389fd..000000000
--- a/node_modules/core-js/library/modules/_array-species-constructor.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var isObject = require('./_is-object')
- , isArray = require('./_is-array')
- , SPECIES = require('./_wks')('species');
-
-module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_array-species-create.js b/node_modules/core-js/library/modules/_array-species-create.js
deleted file mode 100644
index cbd18bc6c..000000000
--- a/node_modules/core-js/library/modules/_array-species-create.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
-var speciesConstructor = require('./_array-species-constructor');
-
-module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_bind.js b/node_modules/core-js/library/modules/_bind.js
deleted file mode 100644
index 1f7b0174b..000000000
--- a/node_modules/core-js/library/modules/_bind.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-var aFunction = require('./_a-function')
- , isObject = require('./_is-object')
- , invoke = require('./_invoke')
- , arraySlice = [].slice
- , factories = {};
-
-var construct = function(F, len, args){
- if(!(len in factories)){
- for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
-};
-
-module.exports = Function.bind || function bind(that /*, args... */){
- var fn = aFunction(this)
- , partArgs = arraySlice.call(arguments, 1);
- var bound = function(/* args... */){
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
- };
- if(isObject(fn.prototype))bound.prototype = fn.prototype;
- return bound;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_classof.js b/node_modules/core-js/library/modules/_classof.js
deleted file mode 100644
index dab3a80f1..000000000
--- a/node_modules/core-js/library/modules/_classof.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// getting tag from 19.1.3.6 Object.prototype.toString()
-var cof = require('./_cof')
- , TAG = require('./_wks')('toStringTag')
- // ES3 wrong here
- , ARG = cof(function(){ return arguments; }()) == 'Arguments';
-
-// fallback for IE11 Script Access Denied error
-var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
-};
-
-module.exports = function(it){
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_cof.js b/node_modules/core-js/library/modules/_cof.js
deleted file mode 100644
index 1dd2779a7..000000000
--- a/node_modules/core-js/library/modules/_cof.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var toString = {}.toString;
-
-module.exports = function(it){
- return toString.call(it).slice(8, -1);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_collection-strong.js b/node_modules/core-js/library/modules/_collection-strong.js
deleted file mode 100644
index 55e4b6158..000000000
--- a/node_modules/core-js/library/modules/_collection-strong.js
+++ /dev/null
@@ -1,142 +0,0 @@
-'use strict';
-var dP = require('./_object-dp').f
- , create = require('./_object-create')
- , redefineAll = require('./_redefine-all')
- , ctx = require('./_ctx')
- , anInstance = require('./_an-instance')
- , defined = require('./_defined')
- , forOf = require('./_for-of')
- , $iterDefine = require('./_iter-define')
- , step = require('./_iter-step')
- , setSpecies = require('./_set-species')
- , DESCRIPTORS = require('./_descriptors')
- , fastKey = require('./_meta').fastKey
- , SIZE = DESCRIPTORS ? '_s' : 'size';
-
-var getEntry = function(that, key){
- // fast case
- var index = fastKey(key), entry;
- if(index !== 'F')return that._i[index];
- // frozen object case
- for(entry = that._f; entry; entry = entry.n){
- if(entry.k == key)return entry;
- }
-};
-
-module.exports = {
- getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
- var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
- if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.1.3.1 Map.prototype.clear()
- // 23.2.3.2 Set.prototype.clear()
- clear: function clear(){
- for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
- entry.r = true;
- if(entry.p)entry.p = entry.p.n = undefined;
- delete data[entry.i];
- }
- that._f = that._l = undefined;
- that[SIZE] = 0;
- },
- // 23.1.3.3 Map.prototype.delete(key)
- // 23.2.3.4 Set.prototype.delete(value)
- 'delete': function(key){
- var that = this
- , entry = getEntry(that, key);
- if(entry){
- var next = entry.n
- , prev = entry.p;
- delete that._i[entry.i];
- entry.r = true;
- if(prev)prev.n = next;
- if(next)next.p = prev;
- if(that._f == entry)that._f = next;
- if(that._l == entry)that._l = prev;
- that[SIZE]--;
- } return !!entry;
- },
- // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
- // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
- forEach: function forEach(callbackfn /*, that = undefined */){
- anInstance(this, C, 'forEach');
- var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
- , entry;
- while(entry = entry ? entry.n : this._f){
- f(entry.v, entry.k, this);
- // revert to the last existing entry
- while(entry && entry.r)entry = entry.p;
- }
- },
- // 23.1.3.7 Map.prototype.has(key)
- // 23.2.3.7 Set.prototype.has(value)
- has: function has(key){
- return !!getEntry(this, key);
- }
- });
- if(DESCRIPTORS)dP(C.prototype, 'size', {
- get: function(){
- return defined(this[SIZE]);
- }
- });
- return C;
- },
- def: function(that, key, value){
- var entry = getEntry(that, key)
- , prev, index;
- // change existing entry
- if(entry){
- entry.v = value;
- // create new entry
- } else {
- that._l = entry = {
- i: index = fastKey(key, true), // <- index
- k: key, // <- key
- v: value, // <- value
- p: prev = that._l, // <- previous entry
- n: undefined, // <- next entry
- r: false // <- removed
- };
- if(!that._f)that._f = entry;
- if(prev)prev.n = entry;
- that[SIZE]++;
- // add to index
- if(index !== 'F')that._i[index] = entry;
- } return that;
- },
- getEntry: getEntry,
- setStrong: function(C, NAME, IS_MAP){
- // add .keys, .values, .entries, [@@iterator]
- // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
- $iterDefine(C, NAME, function(iterated, kind){
- this._t = iterated; // target
- this._k = kind; // kind
- this._l = undefined; // previous
- }, function(){
- var that = this
- , kind = that._k
- , entry = that._l;
- // revert to the last existing entry
- while(entry && entry.r)entry = entry.p;
- // get next entry
- if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
- // or finish the iteration
- that._t = undefined;
- return step(1);
- }
- // return step by kind
- if(kind == 'keys' )return step(0, entry.k);
- if(kind == 'values')return step(0, entry.v);
- return step(0, [entry.k, entry.v]);
- }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
-
- // add [@@species], 23.1.2.2, 23.2.2.2
- setSpecies(NAME);
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_collection-to-json.js b/node_modules/core-js/library/modules/_collection-to-json.js
deleted file mode 100644
index ce0282f6b..000000000
--- a/node_modules/core-js/library/modules/_collection-to-json.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var classof = require('./_classof')
- , from = require('./_array-from-iterable');
-module.exports = function(NAME){
- return function toJSON(){
- if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_collection-weak.js b/node_modules/core-js/library/modules/_collection-weak.js
deleted file mode 100644
index a8597e64d..000000000
--- a/node_modules/core-js/library/modules/_collection-weak.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-var redefineAll = require('./_redefine-all')
- , getWeak = require('./_meta').getWeak
- , anObject = require('./_an-object')
- , isObject = require('./_is-object')
- , anInstance = require('./_an-instance')
- , forOf = require('./_for-of')
- , createArrayMethod = require('./_array-methods')
- , $has = require('./_has')
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , id = 0;
-
-// fallback for uncaught frozen keys
-var uncaughtFrozenStore = function(that){
- return that._l || (that._l = new UncaughtFrozenStore);
-};
-var UncaughtFrozenStore = function(){
- this.a = [];
-};
-var findUncaughtFrozen = function(store, key){
- return arrayFind(store.a, function(it){
- return it[0] === key;
- });
-};
-UncaughtFrozenStore.prototype = {
- get: function(key){
- var entry = findUncaughtFrozen(this, key);
- if(entry)return entry[1];
- },
- has: function(key){
- return !!findUncaughtFrozen(this, key);
- },
- set: function(key, value){
- var entry = findUncaughtFrozen(this, key);
- if(entry)entry[1] = value;
- else this.a.push([key, value]);
- },
- 'delete': function(key){
- var index = arrayFindIndex(this.a, function(it){
- return it[0] === key;
- });
- if(~index)this.a.splice(index, 1);
- return !!~index;
- }
-};
-
-module.exports = {
- getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
- var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
- if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.3.3.2 WeakMap.prototype.delete(key)
- // 23.4.3.3 WeakSet.prototype.delete(value)
- 'delete': function(key){
- if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this)['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
- },
- // 23.3.3.4 WeakMap.prototype.has(key)
- // 23.4.3.4 WeakSet.prototype.has(value)
- has: function has(key){
- if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).has(key);
- return data && $has(data, this._i);
- }
- });
- return C;
- },
- def: function(that, key, value){
- var data = getWeak(anObject(key), true);
- if(data === true)uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
- },
- ufstore: uncaughtFrozenStore
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_collection.js b/node_modules/core-js/library/modules/_collection.js
deleted file mode 100644
index 0bdd7fcbb..000000000
--- a/node_modules/core-js/library/modules/_collection.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-var global = require('./_global')
- , $export = require('./_export')
- , meta = require('./_meta')
- , fails = require('./_fails')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , forOf = require('./_for-of')
- , anInstance = require('./_an-instance')
- , isObject = require('./_is-object')
- , setToStringTag = require('./_set-to-string-tag')
- , dP = require('./_object-dp').f
- , each = require('./_array-methods')(0)
- , DESCRIPTORS = require('./_descriptors');
-
-module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
- var Base = global[NAME]
- , C = Base
- , ADDER = IS_MAP ? 'set' : 'add'
- , proto = C && C.prototype
- , O = {};
- if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
- new C().entries().next();
- }))){
- // create collection constructor
- C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
- redefineAll(C.prototype, methods);
- meta.NEED = true;
- } else {
- C = wrapper(function(target, iterable){
- anInstance(target, C, NAME, '_c');
- target._c = new Base;
- if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target);
- });
- each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){
- var IS_ADDER = KEY == 'add' || KEY == 'set';
- if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){
- anInstance(this, C, KEY);
- if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false;
- var result = this._c[KEY](a === 0 ? 0 : a, b);
- return IS_ADDER ? this : result;
- });
- });
- if('size' in proto)dP(C.prototype, 'size', {
- get: function(){
- return this._c.size;
- }
- });
- }
-
- setToStringTag(C, NAME);
-
- O[NAME] = C;
- $export($export.G + $export.W + $export.F, O);
-
- if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
-
- return C;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_core.js b/node_modules/core-js/library/modules/_core.js
deleted file mode 100644
index 23d6aedeb..000000000
--- a/node_modules/core-js/library/modules/_core.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var core = module.exports = {version: '2.4.0'};
-if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_create-property.js b/node_modules/core-js/library/modules/_create-property.js
deleted file mode 100644
index 3d1bf7305..000000000
--- a/node_modules/core-js/library/modules/_create-property.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-var $defineProperty = require('./_object-dp')
- , createDesc = require('./_property-desc');
-
-module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_ctx.js b/node_modules/core-js/library/modules/_ctx.js
deleted file mode 100644
index b52d85ff3..000000000
--- a/node_modules/core-js/library/modules/_ctx.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// optional / simple context binding
-var aFunction = require('./_a-function');
-module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_date-to-primitive.js b/node_modules/core-js/library/modules/_date-to-primitive.js
deleted file mode 100644
index 561079a1b..000000000
--- a/node_modules/core-js/library/modules/_date-to-primitive.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-var anObject = require('./_an-object')
- , toPrimitive = require('./_to-primitive')
- , NUMBER = 'number';
-
-module.exports = function(hint){
- if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_defined.js b/node_modules/core-js/library/modules/_defined.js
deleted file mode 100644
index cfa476b96..000000000
--- a/node_modules/core-js/library/modules/_defined.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_descriptors.js b/node_modules/core-js/library/modules/_descriptors.js
deleted file mode 100644
index 6ccb7ee24..000000000
--- a/node_modules/core-js/library/modules/_descriptors.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Thank's IE8 for his funny defineProperty
-module.exports = !require('./_fails')(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_dom-create.js b/node_modules/core-js/library/modules/_dom-create.js
deleted file mode 100644
index 909b5ff05..000000000
--- a/node_modules/core-js/library/modules/_dom-create.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var isObject = require('./_is-object')
- , document = require('./_global').document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
-module.exports = function(it){
- return is ? document.createElement(it) : {};
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_entry-virtual.js b/node_modules/core-js/library/modules/_entry-virtual.js
deleted file mode 100644
index 0ec61272e..000000000
--- a/node_modules/core-js/library/modules/_entry-virtual.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var core = require('./_core');
-module.exports = function(CONSTRUCTOR){
- var C = core[CONSTRUCTOR];
- return (C.virtual || C.prototype);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_enum-bug-keys.js b/node_modules/core-js/library/modules/_enum-bug-keys.js
deleted file mode 100644
index 928b9fb05..000000000
--- a/node_modules/core-js/library/modules/_enum-bug-keys.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
-).split(','); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_enum-keys.js b/node_modules/core-js/library/modules/_enum-keys.js
deleted file mode 100644
index 3bf8069c1..000000000
--- a/node_modules/core-js/library/modules/_enum-keys.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// all enumerable object keys, includes symbols
-var getKeys = require('./_object-keys')
- , gOPS = require('./_object-gops')
- , pIE = require('./_object-pie');
-module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_export.js b/node_modules/core-js/library/modules/_export.js
deleted file mode 100644
index dc084b4cc..000000000
--- a/node_modules/core-js/library/modules/_export.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var global = require('./_global')
- , core = require('./_core')
- , ctx = require('./_ctx')
- , hide = require('./_hide')
- , PROTOTYPE = 'prototype';
-
-var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , IS_WRAP = type & $export.W
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE]
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
- , key, own, out;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if(own && key in exports)continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function(C){
- var F = function(a, b, c){
- if(this instanceof C){
- switch(arguments.length){
- case 0: return new C;
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if(IS_PROTO){
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
- }
- }
-};
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_fails-is-regexp.js b/node_modules/core-js/library/modules/_fails-is-regexp.js
deleted file mode 100644
index 130436bf9..000000000
--- a/node_modules/core-js/library/modules/_fails-is-regexp.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var MATCH = require('./_wks')('match');
-module.exports = function(KEY){
- var re = /./;
- try {
- '/./'[KEY](re);
- } catch(e){
- try {
- re[MATCH] = false;
- return !'/./'[KEY](re);
- } catch(f){ /* empty */ }
- } return true;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_fails.js b/node_modules/core-js/library/modules/_fails.js
deleted file mode 100644
index 184e5ea84..000000000
--- a/node_modules/core-js/library/modules/_fails.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_fix-re-wks.js b/node_modules/core-js/library/modules/_fix-re-wks.js
deleted file mode 100644
index d29368ce8..000000000
--- a/node_modules/core-js/library/modules/_fix-re-wks.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-var hide = require('./_hide')
- , redefine = require('./_redefine')
- , fails = require('./_fails')
- , defined = require('./_defined')
- , wks = require('./_wks');
-
-module.exports = function(KEY, length, exec){
- var SYMBOL = wks(KEY)
- , fns = exec(defined, SYMBOL, ''[KEY])
- , strfn = fns[0]
- , rxfn = fns[1];
- if(fails(function(){
- var O = {};
- O[SYMBOL] = function(){ return 7; };
- return ''[KEY](O) != 7;
- })){
- redefine(String.prototype, KEY, strfn);
- hide(RegExp.prototype, SYMBOL, length == 2
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function(string, arg){ return rxfn.call(string, this, arg); }
- // 21.2.5.6 RegExp.prototype[@@match](string)
- // 21.2.5.9 RegExp.prototype[@@search](string)
- : function(string){ return rxfn.call(string, this); }
- );
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_flags.js b/node_modules/core-js/library/modules/_flags.js
deleted file mode 100644
index 054f90886..000000000
--- a/node_modules/core-js/library/modules/_flags.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-// 21.2.5.3 get RegExp.prototype.flags
-var anObject = require('./_an-object');
-module.exports = function(){
- var that = anObject(this)
- , result = '';
- if(that.global) result += 'g';
- if(that.ignoreCase) result += 'i';
- if(that.multiline) result += 'm';
- if(that.unicode) result += 'u';
- if(that.sticky) result += 'y';
- return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_for-of.js b/node_modules/core-js/library/modules/_for-of.js
deleted file mode 100644
index b4824fefa..000000000
--- a/node_modules/core-js/library/modules/_for-of.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var ctx = require('./_ctx')
- , call = require('./_iter-call')
- , isArrayIter = require('./_is-array-iter')
- , anObject = require('./_an-object')
- , toLength = require('./_to-length')
- , getIterFn = require('./core.get-iterator-method')
- , BREAK = {}
- , RETURN = {};
-var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
- var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
- , f = ctx(fn, that, entries ? 2 : 1)
- , index = 0
- , length, step, iterator, result;
- if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
- // fast case for arrays with default iterator
- if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if(result === BREAK || result === RETURN)return result;
- } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
- result = call(iterator, f, step.value, entries);
- if(result === BREAK || result === RETURN)return result;
- }
-};
-exports.BREAK = BREAK;
-exports.RETURN = RETURN; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_global.js b/node_modules/core-js/library/modules/_global.js
deleted file mode 100644
index df6efb476..000000000
--- a/node_modules/core-js/library/modules/_global.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
-if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_has.js b/node_modules/core-js/library/modules/_has.js
deleted file mode 100644
index 870b40e71..000000000
--- a/node_modules/core-js/library/modules/_has.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_hide.js b/node_modules/core-js/library/modules/_hide.js
deleted file mode 100644
index 4031e8080..000000000
--- a/node_modules/core-js/library/modules/_hide.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var dP = require('./_object-dp')
- , createDesc = require('./_property-desc');
-module.exports = require('./_descriptors') ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
-} : function(object, key, value){
- object[key] = value;
- return object;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_html.js b/node_modules/core-js/library/modules/_html.js
deleted file mode 100644
index 98f5142c4..000000000
--- a/node_modules/core-js/library/modules/_html.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_global').document && document.documentElement; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_ie8-dom-define.js b/node_modules/core-js/library/modules/_ie8-dom-define.js
deleted file mode 100644
index 18ffd59da..000000000
--- a/node_modules/core-js/library/modules/_ie8-dom-define.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = !require('./_descriptors') && !require('./_fails')(function(){
- return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_inherit-if-required.js b/node_modules/core-js/library/modules/_inherit-if-required.js
deleted file mode 100644
index d3948405b..000000000
--- a/node_modules/core-js/library/modules/_inherit-if-required.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var isObject = require('./_is-object')
- , setPrototypeOf = require('./_set-proto').set;
-module.exports = function(that, target, C){
- var P, S = target.constructor;
- if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
- setPrototypeOf(that, P);
- } return that;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_invoke.js b/node_modules/core-js/library/modules/_invoke.js
deleted file mode 100644
index 08e307fd0..000000000
--- a/node_modules/core-js/library/modules/_invoke.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// fast apply, http://jsperf.lnkit.com/fast-apply/5
-module.exports = function(fn, args, that){
- var un = that === undefined;
- switch(args.length){
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iobject.js b/node_modules/core-js/library/modules/_iobject.js
deleted file mode 100644
index b58db4897..000000000
--- a/node_modules/core-js/library/modules/_iobject.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// fallback for non-array-like ES3 and non-enumerable old V8 strings
-var cof = require('./_cof');
-module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_is-array-iter.js b/node_modules/core-js/library/modules/_is-array-iter.js
deleted file mode 100644
index 8139d71c2..000000000
--- a/node_modules/core-js/library/modules/_is-array-iter.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// check on default Array iterator
-var Iterators = require('./_iterators')
- , ITERATOR = require('./_wks')('iterator')
- , ArrayProto = Array.prototype;
-
-module.exports = function(it){
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_is-array.js b/node_modules/core-js/library/modules/_is-array.js
deleted file mode 100644
index b4a3a8ed8..000000000
--- a/node_modules/core-js/library/modules/_is-array.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.2.2 IsArray(argument)
-var cof = require('./_cof');
-module.exports = Array.isArray || function isArray(arg){
- return cof(arg) == 'Array';
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_is-integer.js b/node_modules/core-js/library/modules/_is-integer.js
deleted file mode 100644
index 22db67edb..000000000
--- a/node_modules/core-js/library/modules/_is-integer.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 20.1.2.3 Number.isInteger(number)
-var isObject = require('./_is-object')
- , floor = Math.floor;
-module.exports = function isInteger(it){
- return !isObject(it) && isFinite(it) && floor(it) === it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_is-object.js b/node_modules/core-js/library/modules/_is-object.js
deleted file mode 100644
index ee694be2f..000000000
--- a/node_modules/core-js/library/modules/_is-object.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_is-regexp.js b/node_modules/core-js/library/modules/_is-regexp.js
deleted file mode 100644
index 55b2c629c..000000000
--- a/node_modules/core-js/library/modules/_is-regexp.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// 7.2.8 IsRegExp(argument)
-var isObject = require('./_is-object')
- , cof = require('./_cof')
- , MATCH = require('./_wks')('match');
-module.exports = function(it){
- var isRegExp;
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iter-call.js b/node_modules/core-js/library/modules/_iter-call.js
deleted file mode 100644
index e3565ba9f..000000000
--- a/node_modules/core-js/library/modules/_iter-call.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// call something on iterator step with safe closing on error
-var anObject = require('./_an-object');
-module.exports = function(iterator, fn, value, entries){
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch(e){
- var ret = iterator['return'];
- if(ret !== undefined)anObject(ret.call(iterator));
- throw e;
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iter-create.js b/node_modules/core-js/library/modules/_iter-create.js
deleted file mode 100644
index 9a9aa4fbb..000000000
--- a/node_modules/core-js/library/modules/_iter-create.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-var create = require('./_object-create')
- , descriptor = require('./_property-desc')
- , setToStringTag = require('./_set-to-string-tag')
- , IteratorPrototype = {};
-
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });
-
-module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
- setToStringTag(Constructor, NAME + ' Iterator');
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iter-define.js b/node_modules/core-js/library/modules/_iter-define.js
deleted file mode 100644
index f72a50214..000000000
--- a/node_modules/core-js/library/modules/_iter-define.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-var LIBRARY = require('./_library')
- , $export = require('./_export')
- , redefine = require('./_redefine')
- , hide = require('./_hide')
- , has = require('./_has')
- , Iterators = require('./_iterators')
- , $iterCreate = require('./_iter-create')
- , setToStringTag = require('./_set-to-string-tag')
- , getPrototypeOf = require('./_object-gpo')
- , ITERATOR = require('./_wks')('iterator')
- , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
- , FF_ITERATOR = '@@iterator'
- , KEYS = 'keys'
- , VALUES = 'values';
-
-var returnThis = function(){ return this; };
-
-module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
- $iterCreate(Constructor, NAME, next);
- var getMethod = function(kind){
- if(!BUGGY && kind in proto)return proto[kind];
- switch(kind){
- case KEYS: return function keys(){ return new Constructor(this, kind); };
- case VALUES: return function values(){ return new Constructor(this, kind); };
- } return function entries(){ return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator'
- , DEF_VALUES = DEFAULT == VALUES
- , VALUES_BUG = false
- , proto = Base.prototype
- , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
- , $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
- // Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
- // Define iterator
- if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if(DEFAULT){
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if(FORCED)for(key in methods){
- if(!(key in proto))redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iter-detect.js b/node_modules/core-js/library/modules/_iter-detect.js
deleted file mode 100644
index 87c7aecf4..000000000
--- a/node_modules/core-js/library/modules/_iter-detect.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var ITERATOR = require('./_wks')('iterator')
- , SAFE_CLOSING = false;
-
-try {
- var riter = [7][ITERATOR]();
- riter['return'] = function(){ SAFE_CLOSING = true; };
- Array.from(riter, function(){ throw 2; });
-} catch(e){ /* empty */ }
-
-module.exports = function(exec, skipClosing){
- if(!skipClosing && !SAFE_CLOSING)return false;
- var safe = false;
- try {
- var arr = [7]
- , iter = arr[ITERATOR]();
- iter.next = function(){ return {done: safe = true}; };
- arr[ITERATOR] = function(){ return iter; };
- exec(arr);
- } catch(e){ /* empty */ }
- return safe;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iter-step.js b/node_modules/core-js/library/modules/_iter-step.js
deleted file mode 100644
index 6ff0dc518..000000000
--- a/node_modules/core-js/library/modules/_iter-step.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(done, value){
- return {value: value, done: !!done};
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_iterators.js b/node_modules/core-js/library/modules/_iterators.js
deleted file mode 100644
index a09954537..000000000
--- a/node_modules/core-js/library/modules/_iterators.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = {}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_keyof.js b/node_modules/core-js/library/modules/_keyof.js
deleted file mode 100644
index 7b63229b0..000000000
--- a/node_modules/core-js/library/modules/_keyof.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var getKeys = require('./_object-keys')
- , toIObject = require('./_to-iobject');
-module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_library.js b/node_modules/core-js/library/modules/_library.js
deleted file mode 100644
index 73f737c59..000000000
--- a/node_modules/core-js/library/modules/_library.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_math-expm1.js b/node_modules/core-js/library/modules/_math-expm1.js
deleted file mode 100644
index 5131aa951..000000000
--- a/node_modules/core-js/library/modules/_math-expm1.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// 20.2.2.14 Math.expm1(x)
-var $expm1 = Math.expm1;
-module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
-) ? function expm1(x){
- return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
-} : $expm1; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_math-log1p.js b/node_modules/core-js/library/modules/_math-log1p.js
deleted file mode 100644
index a92bf463a..000000000
--- a/node_modules/core-js/library/modules/_math-log1p.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.2.2.20 Math.log1p(x)
-module.exports = Math.log1p || function log1p(x){
- return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_math-sign.js b/node_modules/core-js/library/modules/_math-sign.js
deleted file mode 100644
index a4848df60..000000000
--- a/node_modules/core-js/library/modules/_math-sign.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.2.2.28 Math.sign(x)
-module.exports = Math.sign || function sign(x){
- return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_meta.js b/node_modules/core-js/library/modules/_meta.js
deleted file mode 100644
index 7daca0094..000000000
--- a/node_modules/core-js/library/modules/_meta.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var META = require('./_uid')('meta')
- , isObject = require('./_is-object')
- , has = require('./_has')
- , setDesc = require('./_object-dp').f
- , id = 0;
-var isExtensible = Object.isExtensible || function(){
- return true;
-};
-var FREEZE = !require('./_fails')(function(){
- return isExtensible(Object.preventExtensions({}));
-});
-var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
-};
-var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
-};
-var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
-};
-// add metadata on freeze-family methods calling
-var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
-};
-var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_metadata.js b/node_modules/core-js/library/modules/_metadata.js
deleted file mode 100644
index eb5a762d4..000000000
--- a/node_modules/core-js/library/modules/_metadata.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var Map = require('./es6.map')
- , $export = require('./_export')
- , shared = require('./_shared')('metadata')
- , store = shared.store || (shared.store = new (require('./es6.weak-map')));
-
-var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
-};
-var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
-};
-var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
-};
-var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
-};
-var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
-};
-var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
-};
-var exp = function(O){
- $export($export.S, 'Reflect', O);
-};
-
-module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_microtask.js b/node_modules/core-js/library/modules/_microtask.js
deleted file mode 100644
index b0f2a0df0..000000000
--- a/node_modules/core-js/library/modules/_microtask.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var global = require('./_global')
- , macrotask = require('./_task').set
- , Observer = global.MutationObserver || global.WebKitMutationObserver
- , process = global.process
- , Promise = global.Promise
- , isNode = require('./_cof')(process) == 'process';
-
-module.exports = function(){
- var head, last, notify;
-
- var flush = function(){
- var parent, fn;
- if(isNode && (parent = process.domain))parent.exit();
- while(head){
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch(e){
- if(head)notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if(parent)parent.enter();
- };
-
- // Node.js
- if(isNode){
- notify = function(){
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if(Observer){
- var toggle = true
- , node = document.createTextNode('');
- new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
- notify = function(){
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if(Promise && Promise.resolve){
- var promise = Promise.resolve();
- notify = function(){
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function(){
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function(fn){
- var task = {fn: fn, next: undefined};
- if(last)last.next = task;
- if(!head){
- head = task;
- notify();
- } last = task;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-assign.js b/node_modules/core-js/library/modules/_object-assign.js
deleted file mode 100644
index c575aba21..000000000
--- a/node_modules/core-js/library/modules/_object-assign.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-// 19.1.2.1 Object.assign(target, source, ...)
-var getKeys = require('./_object-keys')
- , gOPS = require('./_object-gops')
- , pIE = require('./_object-pie')
- , toObject = require('./_to-object')
- , IObject = require('./_iobject')
- , $assign = Object.assign;
-
-// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || require('./_fails')(function(){
- var A = {}
- , B = {}
- , S = Symbol()
- , K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
-}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
- var T = toObject(target)
- , aLen = arguments.length
- , index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
- , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
- , length = keys.length
- , j = 0
- , key;
- while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
-} : $assign; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-create.js b/node_modules/core-js/library/modules/_object-create.js
deleted file mode 100644
index 3379760f9..000000000
--- a/node_modules/core-js/library/modules/_object-create.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-var anObject = require('./_an-object')
- , dPs = require('./_object-dps')
- , enumBugKeys = require('./_enum-bug-keys')
- , IE_PROTO = require('./_shared-key')('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
-// Create object with fake `null` prototype: use iframe Object with cleared prototype
-var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = require('./_dom-create')('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- require('./_html').appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
-};
-
-module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
-};
diff --git a/node_modules/core-js/library/modules/_object-define.js b/node_modules/core-js/library/modules/_object-define.js
deleted file mode 100644
index f246c4e32..000000000
--- a/node_modules/core-js/library/modules/_object-define.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var dP = require('./_object-dp')
- , gOPD = require('./_object-gopd')
- , ownKeys = require('./_own-keys')
- , toIObject = require('./_to-iobject');
-
-module.exports = function define(target, mixin){
- var keys = ownKeys(toIObject(mixin))
- , length = keys.length
- , i = 0, key;
- while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key));
- return target;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-dp.js b/node_modules/core-js/library/modules/_object-dp.js
deleted file mode 100644
index e7ca8a463..000000000
--- a/node_modules/core-js/library/modules/_object-dp.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var anObject = require('./_an-object')
- , IE8_DOM_DEFINE = require('./_ie8-dom-define')
- , toPrimitive = require('./_to-primitive')
- , dP = Object.defineProperty;
-
-exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-dps.js b/node_modules/core-js/library/modules/_object-dps.js
deleted file mode 100644
index 8cd4147ac..000000000
--- a/node_modules/core-js/library/modules/_object-dps.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var dP = require('./_object-dp')
- , anObject = require('./_an-object')
- , getKeys = require('./_object-keys');
-
-module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-forced-pam.js b/node_modules/core-js/library/modules/_object-forced-pam.js
deleted file mode 100644
index 668a07dc2..000000000
--- a/node_modules/core-js/library/modules/_object-forced-pam.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// Forced replacement prototype accessors methods
-module.exports = require('./_library')|| !require('./_fails')(function(){
- var K = Math.random();
- // In FF throws only define methods
- __defineSetter__.call(null, K, function(){ /* empty */});
- delete require('./_global')[K];
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-gopd.js b/node_modules/core-js/library/modules/_object-gopd.js
deleted file mode 100644
index 756206aba..000000000
--- a/node_modules/core-js/library/modules/_object-gopd.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var pIE = require('./_object-pie')
- , createDesc = require('./_property-desc')
- , toIObject = require('./_to-iobject')
- , toPrimitive = require('./_to-primitive')
- , has = require('./_has')
- , IE8_DOM_DEFINE = require('./_ie8-dom-define')
- , gOPD = Object.getOwnPropertyDescriptor;
-
-exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-gopn-ext.js b/node_modules/core-js/library/modules/_object-gopn-ext.js
deleted file mode 100644
index f4d10b4a1..000000000
--- a/node_modules/core-js/library/modules/_object-gopn-ext.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var toIObject = require('./_to-iobject')
- , gOPN = require('./_object-gopn').f
- , toString = {}.toString;
-
-var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
-var getWindowNames = function(it){
- try {
- return gOPN(it);
- } catch(e){
- return windowNames.slice();
- }
-};
-
-module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
-};
diff --git a/node_modules/core-js/library/modules/_object-gopn.js b/node_modules/core-js/library/modules/_object-gopn.js
deleted file mode 100644
index beebf4dac..000000000
--- a/node_modules/core-js/library/modules/_object-gopn.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
-var $keys = require('./_object-keys-internal')
- , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
-
-exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-gops.js b/node_modules/core-js/library/modules/_object-gops.js
deleted file mode 100644
index 8f93d76b1..000000000
--- a/node_modules/core-js/library/modules/_object-gops.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = Object.getOwnPropertySymbols; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-gpo.js b/node_modules/core-js/library/modules/_object-gpo.js
deleted file mode 100644
index 535dc6e94..000000000
--- a/node_modules/core-js/library/modules/_object-gpo.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
-var has = require('./_has')
- , toObject = require('./_to-object')
- , IE_PROTO = require('./_shared-key')('IE_PROTO')
- , ObjectProto = Object.prototype;
-
-module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-keys-internal.js b/node_modules/core-js/library/modules/_object-keys-internal.js
deleted file mode 100644
index e23481d7c..000000000
--- a/node_modules/core-js/library/modules/_object-keys-internal.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var has = require('./_has')
- , toIObject = require('./_to-iobject')
- , arrayIndexOf = require('./_array-includes')(false)
- , IE_PROTO = require('./_shared-key')('IE_PROTO');
-
-module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-keys.js b/node_modules/core-js/library/modules/_object-keys.js
deleted file mode 100644
index 11d4cceed..000000000
--- a/node_modules/core-js/library/modules/_object-keys.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// 19.1.2.14 / 15.2.3.14 Object.keys(O)
-var $keys = require('./_object-keys-internal')
- , enumBugKeys = require('./_enum-bug-keys');
-
-module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-pie.js b/node_modules/core-js/library/modules/_object-pie.js
deleted file mode 100644
index 13479a171..000000000
--- a/node_modules/core-js/library/modules/_object-pie.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = {}.propertyIsEnumerable; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-sap.js b/node_modules/core-js/library/modules/_object-sap.js
deleted file mode 100644
index b76fec5f4..000000000
--- a/node_modules/core-js/library/modules/_object-sap.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// most Object methods by ES6 should accept primitives
-var $export = require('./_export')
- , core = require('./_core')
- , fails = require('./_fails');
-module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_object-to-array.js b/node_modules/core-js/library/modules/_object-to-array.js
deleted file mode 100644
index b6fdf05d7..000000000
--- a/node_modules/core-js/library/modules/_object-to-array.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var getKeys = require('./_object-keys')
- , toIObject = require('./_to-iobject')
- , isEnum = require('./_object-pie').f;
-module.exports = function(isEntries){
- return function(it){
- var O = toIObject(it)
- , keys = getKeys(O)
- , length = keys.length
- , i = 0
- , result = []
- , key;
- while(length > i)if(isEnum.call(O, key = keys[i++])){
- result.push(isEntries ? [key, O[key]] : O[key]);
- } return result;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_own-keys.js b/node_modules/core-js/library/modules/_own-keys.js
deleted file mode 100644
index 045ce3d58..000000000
--- a/node_modules/core-js/library/modules/_own-keys.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// all object keys, includes non-enumerable and symbols
-var gOPN = require('./_object-gopn')
- , gOPS = require('./_object-gops')
- , anObject = require('./_an-object')
- , Reflect = require('./_global').Reflect;
-module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
- var keys = gOPN.f(anObject(it))
- , getSymbols = gOPS.f;
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_parse-float.js b/node_modules/core-js/library/modules/_parse-float.js
deleted file mode 100644
index 3d0e65312..000000000
--- a/node_modules/core-js/library/modules/_parse-float.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var $parseFloat = require('./_global').parseFloat
- , $trim = require('./_string-trim').trim;
-
-module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){
- var string = $trim(String(str), 3)
- , result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
-} : $parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_parse-int.js b/node_modules/core-js/library/modules/_parse-int.js
deleted file mode 100644
index c23ffc09c..000000000
--- a/node_modules/core-js/library/modules/_parse-int.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var $parseInt = require('./_global').parseInt
- , $trim = require('./_string-trim').trim
- , ws = require('./_string-ws')
- , hex = /^[\-+]?0[xX]/;
-
-module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
-} : $parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_partial.js b/node_modules/core-js/library/modules/_partial.js
deleted file mode 100644
index 3d411b705..000000000
--- a/node_modules/core-js/library/modules/_partial.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-var path = require('./_path')
- , invoke = require('./_invoke')
- , aFunction = require('./_a-function');
-module.exports = function(/* ...pargs */){
- var fn = aFunction(this)
- , length = arguments.length
- , pargs = Array(length)
- , i = 0
- , _ = path._
- , holder = false;
- while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
- return function(/* ...args */){
- var that = this
- , aLen = arguments.length
- , j = 0, k = 0, args;
- if(!holder && !aLen)return invoke(fn, pargs, that);
- args = pargs.slice();
- if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
- while(aLen > k)args.push(arguments[k++]);
- return invoke(fn, args, that);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_path.js b/node_modules/core-js/library/modules/_path.js
deleted file mode 100644
index e2b878dc6..000000000
--- a/node_modules/core-js/library/modules/_path.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_property-desc.js b/node_modules/core-js/library/modules/_property-desc.js
deleted file mode 100644
index e3f7ab2dc..000000000
--- a/node_modules/core-js/library/modules/_property-desc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_redefine-all.js b/node_modules/core-js/library/modules/_redefine-all.js
deleted file mode 100644
index beeb2eafc..000000000
--- a/node_modules/core-js/library/modules/_redefine-all.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var hide = require('./_hide');
-module.exports = function(target, src, safe){
- for(var key in src){
- if(safe && target[key])target[key] = src[key];
- else hide(target, key, src[key]);
- } return target;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_redefine.js b/node_modules/core-js/library/modules/_redefine.js
deleted file mode 100644
index 6bd64530c..000000000
--- a/node_modules/core-js/library/modules/_redefine.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_hide'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_replacer.js b/node_modules/core-js/library/modules/_replacer.js
deleted file mode 100644
index 5360a3d35..000000000
--- a/node_modules/core-js/library/modules/_replacer.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = function(regExp, replace){
- var replacer = replace === Object(replace) ? function(part){
- return replace[part];
- } : replace;
- return function(it){
- return String(it).replace(regExp, replacer);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_same-value.js b/node_modules/core-js/library/modules/_same-value.js
deleted file mode 100644
index 8c2b8c7f6..000000000
--- a/node_modules/core-js/library/modules/_same-value.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 7.2.9 SameValue(x, y)
-module.exports = Object.is || function is(x, y){
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_set-proto.js b/node_modules/core-js/library/modules/_set-proto.js
deleted file mode 100644
index 8d5dad3fd..000000000
--- a/node_modules/core-js/library/modules/_set-proto.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var isObject = require('./_is-object')
- , anObject = require('./_an-object');
-var check = function(O, proto){
- anObject(O);
- if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
-};
-module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function(test, buggy, set){
- try {
- set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch(e){ buggy = true; }
- return function setPrototypeOf(O, proto){
- check(O, proto);
- if(buggy)O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_set-species.js b/node_modules/core-js/library/modules/_set-species.js
deleted file mode 100644
index 4320fa510..000000000
--- a/node_modules/core-js/library/modules/_set-species.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-var global = require('./_global')
- , core = require('./_core')
- , dP = require('./_object-dp')
- , DESCRIPTORS = require('./_descriptors')
- , SPECIES = require('./_wks')('species');
-
-module.exports = function(KEY){
- var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_set-to-string-tag.js b/node_modules/core-js/library/modules/_set-to-string-tag.js
deleted file mode 100644
index ffbdddab8..000000000
--- a/node_modules/core-js/library/modules/_set-to-string-tag.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var def = require('./_object-dp').f
- , has = require('./_has')
- , TAG = require('./_wks')('toStringTag');
-
-module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_shared-key.js b/node_modules/core-js/library/modules/_shared-key.js
deleted file mode 100644
index 5ed763496..000000000
--- a/node_modules/core-js/library/modules/_shared-key.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var shared = require('./_shared')('keys')
- , uid = require('./_uid');
-module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_shared.js b/node_modules/core-js/library/modules/_shared.js
deleted file mode 100644
index 3f9e4c891..000000000
--- a/node_modules/core-js/library/modules/_shared.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var global = require('./_global')
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
-module.exports = function(key){
- return store[key] || (store[key] = {});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_species-constructor.js b/node_modules/core-js/library/modules/_species-constructor.js
deleted file mode 100644
index 7a4d1baf2..000000000
--- a/node_modules/core-js/library/modules/_species-constructor.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// 7.3.20 SpeciesConstructor(O, defaultConstructor)
-var anObject = require('./_an-object')
- , aFunction = require('./_a-function')
- , SPECIES = require('./_wks')('species');
-module.exports = function(O, D){
- var C = anObject(O).constructor, S;
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_strict-method.js b/node_modules/core-js/library/modules/_strict-method.js
deleted file mode 100644
index 96b6c6e8a..000000000
--- a/node_modules/core-js/library/modules/_strict-method.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var fails = require('./_fails');
-
-module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-at.js b/node_modules/core-js/library/modules/_string-at.js
deleted file mode 100644
index ecc0d21cb..000000000
--- a/node_modules/core-js/library/modules/_string-at.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var toInteger = require('./_to-integer')
- , defined = require('./_defined');
-// true -> String#at
-// false -> String#codePointAt
-module.exports = function(TO_STRING){
- return function(that, pos){
- var s = String(defined(that))
- , i = toInteger(pos)
- , l = s.length
- , a, b;
- if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-context.js b/node_modules/core-js/library/modules/_string-context.js
deleted file mode 100644
index 5f513483f..000000000
--- a/node_modules/core-js/library/modules/_string-context.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// helper for String#{startsWith, endsWith, includes}
-var isRegExp = require('./_is-regexp')
- , defined = require('./_defined');
-
-module.exports = function(that, searchString, NAME){
- if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
- return String(defined(that));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-html.js b/node_modules/core-js/library/modules/_string-html.js
deleted file mode 100644
index 95daf8124..000000000
--- a/node_modules/core-js/library/modules/_string-html.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var $export = require('./_export')
- , fails = require('./_fails')
- , defined = require('./_defined')
- , quot = /"/g;
-// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
-var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
- return p1 + '>' + S + '</' + tag + '>';
-};
-module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-pad.js b/node_modules/core-js/library/modules/_string-pad.js
deleted file mode 100644
index dccd155e8..000000000
--- a/node_modules/core-js/library/modules/_string-pad.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://github.com/tc39/proposal-string-pad-start-end
-var toLength = require('./_to-length')
- , repeat = require('./_string-repeat')
- , defined = require('./_defined');
-
-module.exports = function(that, maxLength, fillString, left){
- var S = String(defined(that))
- , stringLength = S.length
- , fillStr = fillString === undefined ? ' ' : String(fillString)
- , intMaxLength = toLength(maxLength);
- if(intMaxLength <= stringLength || fillStr == '')return S;
- var fillLen = intMaxLength - stringLength
- , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
- if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
- return left ? stringFiller + S : S + stringFiller;
-};
diff --git a/node_modules/core-js/library/modules/_string-repeat.js b/node_modules/core-js/library/modules/_string-repeat.js
deleted file mode 100644
index 88fd3a2d7..000000000
--- a/node_modules/core-js/library/modules/_string-repeat.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var toInteger = require('./_to-integer')
- , defined = require('./_defined');
-
-module.exports = function repeat(count){
- var str = String(defined(this))
- , res = ''
- , n = toInteger(count);
- if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
- for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
- return res;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-trim.js b/node_modules/core-js/library/modules/_string-trim.js
deleted file mode 100644
index d12de1ce4..000000000
--- a/node_modules/core-js/library/modules/_string-trim.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var $export = require('./_export')
- , defined = require('./_defined')
- , fails = require('./_fails')
- , spaces = require('./_string-ws')
- , space = '[' + spaces + ']'
- , non = '\u200b\u0085'
- , ltrim = RegExp('^' + space + space + '*')
- , rtrim = RegExp(space + space + '*$');
-
-var exporter = function(KEY, exec, ALIAS){
- var exp = {};
- var FORCE = fails(function(){
- return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if(ALIAS)exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
-};
-
-// 1 -> String#trimLeft
-// 2 -> String#trimRight
-// 3 -> String#trim
-var trim = exporter.trim = function(string, TYPE){
- string = String(defined(string));
- if(TYPE & 1)string = string.replace(ltrim, '');
- if(TYPE & 2)string = string.replace(rtrim, '');
- return string;
-};
-
-module.exports = exporter; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_string-ws.js b/node_modules/core-js/library/modules/_string-ws.js
deleted file mode 100644
index 9713d11db..000000000
--- a/node_modules/core-js/library/modules/_string-ws.js
+++ /dev/null
@@ -1,2 +0,0 @@
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_task.js b/node_modules/core-js/library/modules/_task.js
deleted file mode 100644
index 06a73f40c..000000000
--- a/node_modules/core-js/library/modules/_task.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var ctx = require('./_ctx')
- , invoke = require('./_invoke')
- , html = require('./_html')
- , cel = require('./_dom-create')
- , global = require('./_global')
- , process = global.process
- , setTask = global.setImmediate
- , clearTask = global.clearImmediate
- , MessageChannel = global.MessageChannel
- , counter = 0
- , queue = {}
- , ONREADYSTATECHANGE = 'onreadystatechange'
- , defer, channel, port;
-var run = function(){
- var id = +this;
- if(queue.hasOwnProperty(id)){
- var fn = queue[id];
- delete queue[id];
- fn();
- }
-};
-var listener = function(event){
- run.call(event.data);
-};
-// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-if(!setTask || !clearTask){
- setTask = function setImmediate(fn){
- var args = [], i = 1;
- while(arguments.length > i)args.push(arguments[i++]);
- queue[++counter] = function(){
- invoke(typeof fn == 'function' ? fn : Function(fn), args);
- };
- defer(counter);
- return counter;
- };
- clearTask = function clearImmediate(id){
- delete queue[id];
- };
- // Node.js 0.8-
- if(require('./_cof')(process) == 'process'){
- defer = function(id){
- process.nextTick(ctx(run, id, 1));
- };
- // Browsers with MessageChannel, includes WebWorkers
- } else if(MessageChannel){
- channel = new MessageChannel;
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = ctx(port.postMessage, port, 1);
- // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
- defer = function(id){
- global.postMessage(id + '', '*');
- };
- global.addEventListener('message', listener, false);
- // IE8-
- } else if(ONREADYSTATECHANGE in cel('script')){
- defer = function(id){
- html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
- html.removeChild(this);
- run.call(id);
- };
- };
- // Rest old browsers
- } else {
- defer = function(id){
- setTimeout(ctx(run, id, 1), 0);
- };
- }
-}
-module.exports = {
- set: setTask,
- clear: clearTask
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-index.js b/node_modules/core-js/library/modules/_to-index.js
deleted file mode 100644
index 4d380ce18..000000000
--- a/node_modules/core-js/library/modules/_to-index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var toInteger = require('./_to-integer')
- , max = Math.max
- , min = Math.min;
-module.exports = function(index, length){
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-integer.js b/node_modules/core-js/library/modules/_to-integer.js
deleted file mode 100644
index f63baaff8..000000000
--- a/node_modules/core-js/library/modules/_to-integer.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 7.1.4 ToInteger
-var ceil = Math.ceil
- , floor = Math.floor;
-module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-iobject.js b/node_modules/core-js/library/modules/_to-iobject.js
deleted file mode 100644
index 4eb434620..000000000
--- a/node_modules/core-js/library/modules/_to-iobject.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = require('./_iobject')
- , defined = require('./_defined');
-module.exports = function(it){
- return IObject(defined(it));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-length.js b/node_modules/core-js/library/modules/_to-length.js
deleted file mode 100644
index 4099e60b5..000000000
--- a/node_modules/core-js/library/modules/_to-length.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 7.1.15 ToLength
-var toInteger = require('./_to-integer')
- , min = Math.min;
-module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-object.js b/node_modules/core-js/library/modules/_to-object.js
deleted file mode 100644
index f2c28b3fb..000000000
--- a/node_modules/core-js/library/modules/_to-object.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.1.13 ToObject(argument)
-var defined = require('./_defined');
-module.exports = function(it){
- return Object(defined(it));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_to-primitive.js b/node_modules/core-js/library/modules/_to-primitive.js
deleted file mode 100644
index 16354eed6..000000000
--- a/node_modules/core-js/library/modules/_to-primitive.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = require('./_is-object');
-// instead of the ES6 spec version, we didn't implement @@toPrimitive case
-// and the second argument - flag - preferred type is a string
-module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_typed-array.js b/node_modules/core-js/library/modules/_typed-array.js
deleted file mode 100644
index b072b23b0..000000000
--- a/node_modules/core-js/library/modules/_typed-array.js
+++ /dev/null
@@ -1,479 +0,0 @@
-'use strict';
-if(require('./_descriptors')){
- var LIBRARY = require('./_library')
- , global = require('./_global')
- , fails = require('./_fails')
- , $export = require('./_export')
- , $typed = require('./_typed')
- , $buffer = require('./_typed-buffer')
- , ctx = require('./_ctx')
- , anInstance = require('./_an-instance')
- , propertyDesc = require('./_property-desc')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , toIndex = require('./_to-index')
- , toPrimitive = require('./_to-primitive')
- , has = require('./_has')
- , same = require('./_same-value')
- , classof = require('./_classof')
- , isObject = require('./_is-object')
- , toObject = require('./_to-object')
- , isArrayIter = require('./_is-array-iter')
- , create = require('./_object-create')
- , getPrototypeOf = require('./_object-gpo')
- , gOPN = require('./_object-gopn').f
- , getIterFn = require('./core.get-iterator-method')
- , uid = require('./_uid')
- , wks = require('./_wks')
- , createArrayMethod = require('./_array-methods')
- , createArrayIncludes = require('./_array-includes')
- , speciesConstructor = require('./_species-constructor')
- , ArrayIterators = require('./es6.array.iterator')
- , Iterators = require('./_iterators')
- , $iterDetect = require('./_iter-detect')
- , setSpecies = require('./_set-species')
- , arrayFill = require('./_array-fill')
- , arrayCopyWithin = require('./_array-copy-within')
- , $DP = require('./_object-dp')
- , $GOPD = require('./_object-gopd')
- , dP = $DP.f
- , gOPD = $GOPD.f
- , RangeError = global.RangeError
- , TypeError = global.TypeError
- , Uint8Array = global.Uint8Array
- , ARRAY_BUFFER = 'ArrayBuffer'
- , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
- , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
- , PROTOTYPE = 'prototype'
- , ArrayProto = Array[PROTOTYPE]
- , $ArrayBuffer = $buffer.ArrayBuffer
- , $DataView = $buffer.DataView
- , arrayForEach = createArrayMethod(0)
- , arrayFilter = createArrayMethod(2)
- , arraySome = createArrayMethod(3)
- , arrayEvery = createArrayMethod(4)
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , arrayIncludes = createArrayIncludes(true)
- , arrayIndexOf = createArrayIncludes(false)
- , arrayValues = ArrayIterators.values
- , arrayKeys = ArrayIterators.keys
- , arrayEntries = ArrayIterators.entries
- , arrayLastIndexOf = ArrayProto.lastIndexOf
- , arrayReduce = ArrayProto.reduce
- , arrayReduceRight = ArrayProto.reduceRight
- , arrayJoin = ArrayProto.join
- , arraySort = ArrayProto.sort
- , arraySlice = ArrayProto.slice
- , arrayToString = ArrayProto.toString
- , arrayToLocaleString = ArrayProto.toLocaleString
- , ITERATOR = wks('iterator')
- , TAG = wks('toStringTag')
- , TYPED_CONSTRUCTOR = uid('typed_constructor')
- , DEF_CONSTRUCTOR = uid('def_constructor')
- , ALL_CONSTRUCTORS = $typed.CONSTR
- , TYPED_ARRAY = $typed.TYPED
- , VIEW = $typed.VIEW
- , WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function(O, length){
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function(){
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
- new Uint8Array(1).set({});
- });
-
- var strictToLength = function(it, SAME){
- if(it === undefined)throw TypeError(WRONG_LENGTH);
- var number = +it
- , length = toLength(it);
- if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
- return length;
- };
-
- var toOffset = function(it, BYTES){
- var offset = toInteger(it);
- if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function(it){
- if(isObject(it) && TYPED_ARRAY in it)return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function(C, length){
- if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function(O, list){
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function(C, list){
- var index = 0
- , length = list.length
- , result = allocate(C, length);
- while(length > index)result[index] = list[index++];
- return result;
- };
-
- var addGetter = function(it, key, internal){
- dP(it, key, {get: function(){ return this._d[internal]; }});
- };
-
- var $from = function from(source /*, mapfn, thisArg */){
- var O = toObject(source)
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , iterFn = getIterFn(O)
- , i, length, values, result, step, iterator;
- if(iterFn != undefined && !isArrayIter(iterFn)){
- for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
- values.push(step.value);
- } O = values;
- }
- if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
- for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/*...items*/){
- var index = 0
- , length = arguments.length
- , result = allocate(this, length);
- while(length > index)result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString(){
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /*, end */){
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /*, thisArg */){
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /*, thisArg */){
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /*, thisArg */){
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /*, thisArg */){
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /*, thisArg */){
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /*, fromIndex */){
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /*, fromIndex */){
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator){ // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /*, thisArg */){
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse(){
- var that = this
- , length = validate(that).length
- , middle = Math.floor(length / 2)
- , index = 0
- , value;
- while(index < middle){
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /*, thisArg */){
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn){
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end){
- var O = validate(this)
- , length = O.length
- , $begin = toIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end){
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /*, offset */){
- validate(this);
- var offset = toOffset(arguments[1], 1)
- , length = this.length
- , src = toObject(arrayLike)
- , len = toLength(src.length)
- , index = 0;
- if(len + offset > length)throw RangeError(WRONG_LENGTH);
- while(index < len)this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries(){
- return arrayEntries.call(validate(this));
- },
- keys: function keys(){
- return arrayKeys.call(validate(this));
- },
- values: function values(){
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function(target, key){
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key){
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc){
- if(isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ){
- target[key] = desc.value;
- return target;
- } else return dP(target, key, desc);
- };
-
- if(!ALL_CONSTRUCTORS){
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if(fails(function(){ arrayToString.call({}); })){
- arrayToString = arrayToLocaleString = function toString(){
- return arrayJoin.call(this);
- }
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function(){ /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function(){ return this[TYPED_ARRAY]; }
- });
-
- module.exports = function(KEY, BYTES, wrapper, CLAMPED){
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
- , ISNT_UINT8 = NAME != 'Uint8Array'
- , GETTER = 'get' + KEY
- , SETTER = 'set' + KEY
- , TypedArray = global[NAME]
- , Base = TypedArray || {}
- , TAC = TypedArray && getPrototypeOf(TypedArray)
- , FORCED = !TypedArray || !$typed.ABV
- , O = {}
- , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function(that, index){
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function(that, index, value){
- var data = that._d;
- if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function(that, index){
- dP(that, index, {
- get: function(){
- return getter(this, index);
- },
- set: function(value){
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if(FORCED){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0
- , offset = 0
- , buffer, byteLength, length, klass;
- if(!isObject(data)){
- length = strictToLength(data, true)
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if($length === undefined){
- if($len % BYTES)throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if(byteLength < 0)throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if(TYPED_ARRAY in data){
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while(index < length)addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if(!$iterDetect(function(iter){
- // V8 works with iterators, but fails in many other cases
- // https://code.google.com/p/v8/issues/detail?id=4552
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
- if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if(TYPED_ARRAY in data)return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
- if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR]
- , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
- , $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
- dP(TypedArrayPrototype, TAG, {
- get: function(){ return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES,
- from: $from,
- of: $of
- });
-
- if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
-
- $export($export.P + $export.F * fails(function(){
- new TypedArray(1).slice();
- }), NAME, {slice: $slice});
-
- $export($export.P + $export.F * (fails(function(){
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
- }) || !fails(function(){
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, {toLocaleString: $toLocaleString});
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
-} else module.exports = function(){ /* empty */ }; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_typed-buffer.js b/node_modules/core-js/library/modules/_typed-buffer.js
deleted file mode 100644
index 2129eea40..000000000
--- a/node_modules/core-js/library/modules/_typed-buffer.js
+++ /dev/null
@@ -1,273 +0,0 @@
-'use strict';
-var global = require('./_global')
- , DESCRIPTORS = require('./_descriptors')
- , LIBRARY = require('./_library')
- , $typed = require('./_typed')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , fails = require('./_fails')
- , anInstance = require('./_an-instance')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , gOPN = require('./_object-gopn').f
- , dP = require('./_object-dp').f
- , arrayFill = require('./_array-fill')
- , setToStringTag = require('./_set-to-string-tag')
- , ARRAY_BUFFER = 'ArrayBuffer'
- , DATA_VIEW = 'DataView'
- , PROTOTYPE = 'prototype'
- , WRONG_LENGTH = 'Wrong length!'
- , WRONG_INDEX = 'Wrong index!'
- , $ArrayBuffer = global[ARRAY_BUFFER]
- , $DataView = global[DATA_VIEW]
- , Math = global.Math
- , RangeError = global.RangeError
- , Infinity = global.Infinity
- , BaseBuffer = $ArrayBuffer
- , abs = Math.abs
- , pow = Math.pow
- , floor = Math.floor
- , log = Math.log
- , LN2 = Math.LN2
- , BUFFER = 'buffer'
- , BYTE_LENGTH = 'byteLength'
- , BYTE_OFFSET = 'byteOffset'
- , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
- , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
- , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
-// IEEE754 conversions based on https://github.com/feross/ieee754
-var packIEEE754 = function(value, mLen, nBytes){
- var buffer = Array(nBytes)
- , eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
- , i = 0
- , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
- , e, m, c;
- value = abs(value)
- if(value != value || value === Infinity){
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if(value * (c = pow(2, -e)) < 1){
- e--;
- c *= 2;
- }
- if(e + eBias >= 1){
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if(value * c >= 2){
- e++;
- c /= 2;
- }
- if(e + eBias >= eMax){
- m = 0;
- e = eMax;
- } else if(e + eBias >= 1){
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
-};
-var unpackIEEE754 = function(buffer, mLen, nBytes){
- var eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , nBits = eLen - 7
- , i = nBytes - 1
- , s = buffer[i--]
- , e = s & 127
- , m;
- s >>= 7;
- for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if(e === 0){
- e = 1 - eBias;
- } else if(e === eMax){
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
-};
-
-var unpackI32 = function(bytes){
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
-};
-var packI8 = function(it){
- return [it & 0xff];
-};
-var packI16 = function(it){
- return [it & 0xff, it >> 8 & 0xff];
-};
-var packI32 = function(it){
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
-};
-var packF64 = function(it){
- return packIEEE754(it, 52, 8);
-};
-var packF32 = function(it){
- return packIEEE754(it, 23, 4);
-};
-
-var addGetter = function(C, key, internal){
- dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
-};
-
-var get = function(view, bytes, index, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
-};
-var set = function(view, bytes, index, conversion, value, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = conversion(+value);
- for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
-};
-
-var validateArrayBufferArguments = function(that, length){
- anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
- var numberLength = +length
- , byteLength = toLength(numberLength);
- if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
- return byteLength;
-};
-
-if(!$typed.ABV){
- $ArrayBuffer = function ArrayBuffer(length){
- var byteLength = validateArrayBufferArguments(this, length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength){
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH]
- , offset = toInteger(byteOffset);
- if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if(DESCRIPTORS){
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset){
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset){
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
-} else {
- if(!fails(function(){
- new $ArrayBuffer; // eslint-disable-line no-new
- }) || !fails(function(){
- new $ArrayBuffer(.5); // eslint-disable-line no-new
- })){
- $ArrayBuffer = function ArrayBuffer(length){
- return new BaseBuffer(validateArrayBufferArguments(this, length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
- if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
- };
- if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2))
- , $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
-}
-setToStringTag($ArrayBuffer, ARRAY_BUFFER);
-setToStringTag($DataView, DATA_VIEW);
-hide($DataView[PROTOTYPE], $typed.VIEW, true);
-exports[ARRAY_BUFFER] = $ArrayBuffer;
-exports[DATA_VIEW] = $DataView; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_typed.js b/node_modules/core-js/library/modules/_typed.js
deleted file mode 100644
index 6ed2ab56d..000000000
--- a/node_modules/core-js/library/modules/_typed.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var global = require('./_global')
- , hide = require('./_hide')
- , uid = require('./_uid')
- , TYPED = uid('typed_array')
- , VIEW = uid('view')
- , ABV = !!(global.ArrayBuffer && global.DataView)
- , CONSTR = ABV
- , i = 0, l = 9, Typed;
-
-var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
-).split(',');
-
-while(i < l){
- if(Typed = global[TypedArrayConstructors[i++]]){
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
-}
-
-module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_uid.js b/node_modules/core-js/library/modules/_uid.js
deleted file mode 100644
index 3be4196bb..000000000
--- a/node_modules/core-js/library/modules/_uid.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var id = 0
- , px = Math.random();
-module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_wks-define.js b/node_modules/core-js/library/modules/_wks-define.js
deleted file mode 100644
index e69603286..000000000
--- a/node_modules/core-js/library/modules/_wks-define.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var global = require('./_global')
- , core = require('./_core')
- , LIBRARY = require('./_library')
- , wksExt = require('./_wks-ext')
- , defineProperty = require('./_object-dp').f;
-module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_wks-ext.js b/node_modules/core-js/library/modules/_wks-ext.js
deleted file mode 100644
index 7901def62..000000000
--- a/node_modules/core-js/library/modules/_wks-ext.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = require('./_wks'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/_wks.js b/node_modules/core-js/library/modules/_wks.js
deleted file mode 100644
index 36f7973ae..000000000
--- a/node_modules/core-js/library/modules/_wks.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var store = require('./_shared')('wks')
- , uid = require('./_uid')
- , Symbol = require('./_global').Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
-var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-
-$exports.store = store; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/core.delay.js b/node_modules/core-js/library/modules/core.delay.js
index ea031be4a..3e19ef390 100644
--- a/node_modules/core-js/library/modules/core.delay.js
+++ b/node_modules/core-js/library/modules/core.delay.js
@@ -1,7 +1,7 @@
-var global = require('./_global')
- , core = require('./_core')
- , $export = require('./_export')
- , partial = require('./_partial');
+var global = require('./$.global')
+ , core = require('./$.core')
+ , $export = require('./$.export')
+ , partial = require('./$.partial');
// https://esdiscuss.org/topic/promise-returning-delay-function
$export($export.G + $export.F, {
delay: function delay(time){
diff --git a/node_modules/core-js/library/modules/core.dict.js b/node_modules/core-js/library/modules/core.dict.js
index 88c54e3d7..df3149887 100644
--- a/node_modules/core-js/library/modules/core.dict.js
+++ b/node_modules/core-js/library/modules/core.dict.js
@@ -1,22 +1,20 @@
'use strict';
-var ctx = require('./_ctx')
- , $export = require('./_export')
- , createDesc = require('./_property-desc')
- , assign = require('./_object-assign')
- , create = require('./_object-create')
- , getPrototypeOf = require('./_object-gpo')
- , getKeys = require('./_object-keys')
- , dP = require('./_object-dp')
- , keyOf = require('./_keyof')
- , aFunction = require('./_a-function')
- , forOf = require('./_for-of')
- , isIterable = require('./core.is-iterable')
- , $iterCreate = require('./_iter-create')
- , step = require('./_iter-step')
- , isObject = require('./_is-object')
- , toIObject = require('./_to-iobject')
- , DESCRIPTORS = require('./_descriptors')
- , has = require('./_has');
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , $export = require('./$.export')
+ , createDesc = require('./$.property-desc')
+ , assign = require('./$.object-assign')
+ , keyOf = require('./$.keyof')
+ , aFunction = require('./$.a-function')
+ , forOf = require('./$.for-of')
+ , isIterable = require('./core.is-iterable')
+ , $iterCreate = require('./$.iter-create')
+ , step = require('./$.iter-step')
+ , isObject = require('./$.is-object')
+ , toIObject = require('./$.to-iobject')
+ , DESCRIPTORS = require('./$.descriptors')
+ , has = require('./$.has')
+ , getKeys = $.getKeys;
// 0 -> Dict.forEach
// 1 -> Dict.map
@@ -83,7 +81,7 @@ $iterCreate(DictIterator, 'Dict', function(){
});
function Dict(iterable){
- var dict = create(null);
+ var dict = $.create(null);
if(iterable != undefined){
if(isIterable(iterable)){
forOf(iterable, true, function(key, value){
@@ -122,13 +120,13 @@ function get(object, key){
if(has(object, key))return object[key];
}
function set(object, key, value){
- if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value));
+ if(DESCRIPTORS && key in Object)$.setDesc(object, key, createDesc(0, value));
else object[key] = value;
return object;
}
function isDict(it){
- return isObject(it) && getPrototypeOf(it) === Dict.prototype;
+ return isObject(it) && $.getProto(it) === Dict.prototype;
}
$export($export.G + $export.F, {Dict: Dict});
diff --git a/node_modules/core-js/library/modules/core.function.part.js b/node_modules/core-js/library/modules/core.function.part.js
index ce851ff84..9943b3077 100644
--- a/node_modules/core-js/library/modules/core.function.part.js
+++ b/node_modules/core-js/library/modules/core.function.part.js
@@ -1,7 +1,7 @@
-var path = require('./_path')
- , $export = require('./_export');
+var path = require('./$.path')
+ , $export = require('./$.export');
// Placeholder
-require('./_core')._ = path._ = path._ || {};
+require('./$.core')._ = path._ = path._ || {};
-$export($export.P + $export.F, 'Function', {part: require('./_partial')}); \ No newline at end of file
+$export($export.P + $export.F, 'Function', {part: require('./$.partial')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/core.get-iterator-method.js b/node_modules/core-js/library/modules/core.get-iterator-method.js
index e2c7ecc3d..02db743c3 100644
--- a/node_modules/core-js/library/modules/core.get-iterator-method.js
+++ b/node_modules/core-js/library/modules/core.get-iterator-method.js
@@ -1,7 +1,7 @@
-var classof = require('./_classof')
- , ITERATOR = require('./_wks')('iterator')
- , Iterators = require('./_iterators');
-module.exports = require('./_core').getIteratorMethod = function(it){
+var classof = require('./$.classof')
+ , ITERATOR = require('./$.wks')('iterator')
+ , Iterators = require('./$.iterators');
+module.exports = require('./$.core').getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
diff --git a/node_modules/core-js/library/modules/core.get-iterator.js b/node_modules/core-js/library/modules/core.get-iterator.js
index c292e1ab1..7290904a6 100644
--- a/node_modules/core-js/library/modules/core.get-iterator.js
+++ b/node_modules/core-js/library/modules/core.get-iterator.js
@@ -1,6 +1,6 @@
-var anObject = require('./_an-object')
+var anObject = require('./$.an-object')
, get = require('./core.get-iterator-method');
-module.exports = require('./_core').getIterator = function(it){
+module.exports = require('./$.core').getIterator = function(it){
var iterFn = get(it);
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
diff --git a/node_modules/core-js/library/modules/core.is-iterable.js b/node_modules/core-js/library/modules/core.is-iterable.js
index b2b01b6bb..c27e6588f 100644
--- a/node_modules/core-js/library/modules/core.is-iterable.js
+++ b/node_modules/core-js/library/modules/core.is-iterable.js
@@ -1,7 +1,7 @@
-var classof = require('./_classof')
- , ITERATOR = require('./_wks')('iterator')
- , Iterators = require('./_iterators');
-module.exports = require('./_core').isIterable = function(it){
+var classof = require('./$.classof')
+ , ITERATOR = require('./$.wks')('iterator')
+ , Iterators = require('./$.iterators');
+module.exports = require('./$.core').isIterable = function(it){
var O = Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
diff --git a/node_modules/core-js/library/modules/core.number.iterator.js b/node_modules/core-js/library/modules/core.number.iterator.js
index 9700acba0..d92737808 100644
--- a/node_modules/core-js/library/modules/core.number.iterator.js
+++ b/node_modules/core-js/library/modules/core.number.iterator.js
@@ -1,5 +1,5 @@
'use strict';
-require('./_iter-define')(Number, 'Number', function(iterated){
+require('./$.iter-define')(Number, 'Number', function(iterated){
this._l = +iterated;
this._i = 0;
}, function(){
diff --git a/node_modules/core-js/library/modules/core.object.classof.js b/node_modules/core-js/library/modules/core.object.classof.js
index 342c73713..df682e446 100644
--- a/node_modules/core-js/library/modules/core.object.classof.js
+++ b/node_modules/core-js/library/modules/core.object.classof.js
@@ -1,3 +1,3 @@
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {classof: require('./_classof')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {classof: require('./$.classof')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/core.object.define.js b/node_modules/core-js/library/modules/core.object.define.js
index d60e9a951..fe4cbe9b3 100644
--- a/node_modules/core-js/library/modules/core.object.define.js
+++ b/node_modules/core-js/library/modules/core.object.define.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , define = require('./_object-define');
+var $export = require('./$.export')
+ , define = require('./$.object-define');
$export($export.S + $export.F, 'Object', {define: define}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/core.object.is-object.js b/node_modules/core-js/library/modules/core.object.is-object.js
index f2ba059fb..c60a977af 100644
--- a/node_modules/core-js/library/modules/core.object.is-object.js
+++ b/node_modules/core-js/library/modules/core.object.is-object.js
@@ -1,3 +1,3 @@
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {isObject: require('./_is-object')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {isObject: require('./$.is-object')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/core.object.make.js b/node_modules/core-js/library/modules/core.object.make.js
index 3d2a2b5f5..95b999617 100644
--- a/node_modules/core-js/library/modules/core.object.make.js
+++ b/node_modules/core-js/library/modules/core.object.make.js
@@ -1,6 +1,6 @@
-var $export = require('./_export')
- , define = require('./_object-define')
- , create = require('./_object-create');
+var $export = require('./$.export')
+ , define = require('./$.object-define')
+ , create = require('./$').create;
$export($export.S + $export.F, 'Object', {
make: function(proto, mixin){
diff --git a/node_modules/core-js/library/modules/core.regexp.escape.js b/node_modules/core-js/library/modules/core.regexp.escape.js
deleted file mode 100644
index 54f832ef8..000000000
--- a/node_modules/core-js/library/modules/core.regexp.escape.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// https://github.com/benjamingr/RexExp.escape
-var $export = require('./_export')
- , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-
-$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
diff --git a/node_modules/core-js/library/modules/core.string.escape-html.js b/node_modules/core-js/library/modules/core.string.escape-html.js
index a4b8d2f02..81737e750 100644
--- a/node_modules/core-js/library/modules/core.string.escape-html.js
+++ b/node_modules/core-js/library/modules/core.string.escape-html.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export');
-var $re = require('./_replacer')(/[&<>"']/g, {
+var $export = require('./$.export');
+var $re = require('./$.replacer')(/[&<>"']/g, {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
diff --git a/node_modules/core-js/library/modules/core.string.unescape-html.js b/node_modules/core-js/library/modules/core.string.unescape-html.js
index 413622b94..9d7a3d2c8 100644
--- a/node_modules/core-js/library/modules/core.string.unescape-html.js
+++ b/node_modules/core-js/library/modules/core.string.unescape-html.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export');
-var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
+var $export = require('./$.export');
+var $re = require('./$.replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
diff --git a/node_modules/core-js/library/modules/es5.js b/node_modules/core-js/library/modules/es5.js
index dd7ebadf8..50f72b047 100644
--- a/node_modules/core-js/library/modules/es5.js
+++ b/node_modules/core-js/library/modules/es5.js
@@ -1,35 +1,276 @@
-// This file still here for a legacy code and will be removed in a near time
-require('./es6.object.create');
-require('./es6.object.define-property');
-require('./es6.object.define-properties');
-require('./es6.object.get-own-property-descriptor');
-require('./es6.object.get-prototype-of');
-require('./es6.object.keys');
-require('./es6.object.get-own-property-names');
-require('./es6.object.freeze');
-require('./es6.object.seal');
-require('./es6.object.prevent-extensions');
-require('./es6.object.is-frozen');
-require('./es6.object.is-sealed');
-require('./es6.object.is-extensible');
-require('./es6.function.bind');
-require('./es6.array.is-array');
-require('./es6.array.join');
-require('./es6.array.slice');
-require('./es6.array.sort');
-require('./es6.array.for-each');
-require('./es6.array.map');
-require('./es6.array.filter');
-require('./es6.array.some');
-require('./es6.array.every');
-require('./es6.array.reduce');
-require('./es6.array.reduce-right');
-require('./es6.array.index-of');
-require('./es6.array.last-index-of');
-require('./es6.date.now');
-require('./es6.date.to-iso-string');
-require('./es6.date.to-json');
-require('./es6.parse-int');
-require('./es6.parse-float');
-require('./es6.string.trim');
-require('./es6.regexp.to-string'); \ No newline at end of file
+'use strict';
+var $ = require('./$')
+ , $export = require('./$.export')
+ , DESCRIPTORS = require('./$.descriptors')
+ , createDesc = require('./$.property-desc')
+ , html = require('./$.html')
+ , cel = require('./$.dom-create')
+ , has = require('./$.has')
+ , cof = require('./$.cof')
+ , invoke = require('./$.invoke')
+ , fails = require('./$.fails')
+ , anObject = require('./$.an-object')
+ , aFunction = require('./$.a-function')
+ , isObject = require('./$.is-object')
+ , toObject = require('./$.to-object')
+ , toIObject = require('./$.to-iobject')
+ , toInteger = require('./$.to-integer')
+ , toIndex = require('./$.to-index')
+ , toLength = require('./$.to-length')
+ , IObject = require('./$.iobject')
+ , IE_PROTO = require('./$.uid')('__proto__')
+ , createArrayMethod = require('./$.array-methods')
+ , arrayIndexOf = require('./$.array-includes')(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+}
+$export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+});
+
+ // IE 8- don't enum bug keys
+var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+// Create object with `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write('<script>document.F=Object</script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict.prototype[keys1[i]];
+ return createDict();
+};
+var createGetKeys = function(names, length){
+ return function(object){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+};
+var Empty = function(){};
+$export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+});
+
+var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
+};
+
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+$export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+ }
+});
+
+// fallback for not array-like ES3 strings and DOM objects
+$export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+}), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+});
+$export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
+ }
+});
+
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+$export($export.S, 'Array', {isArray: require('./$.is-array')});
+
+var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+};
+
+var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+};
+
+$export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+});
+
+// 20.3.3.1 / 15.9.4.4 Date.now()
+$export($export.S, 'Date', {now: function(){ return +new Date; }});
+
+var lz = function(num){
+ return num > 9 ? num : '0' + num;
+};
+
+// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+// PhantomJS / old WebKit has a broken implementations
+$export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+}) || !fails(function(){
+ new Date(NaN).toISOString();
+})), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.copy-within.js b/node_modules/core-js/library/modules/es6.array.copy-within.js
index 027f7550e..930ba78d4 100644
--- a/node_modules/core-js/library/modules/es6.array.copy-within.js
+++ b/node_modules/core-js/library/modules/es6.array.copy-within.js
@@ -1,6 +1,6 @@
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')});
+$export($export.P, 'Array', {copyWithin: require('./$.array-copy-within')});
-require('./_add-to-unscopables')('copyWithin'); \ No newline at end of file
+require('./$.add-to-unscopables')('copyWithin'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.every.js b/node_modules/core-js/library/modules/es6.array.every.js
deleted file mode 100644
index fb0673673..000000000
--- a/node_modules/core-js/library/modules/es6.array.every.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $every = require('./_array-methods')(4);
-
-$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */){
- return $every(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.fill.js b/node_modules/core-js/library/modules/es6.array.fill.js
index f075c0018..c3b3e2e5d 100644
--- a/node_modules/core-js/library/modules/es6.array.fill.js
+++ b/node_modules/core-js/library/modules/es6.array.fill.js
@@ -1,6 +1,6 @@
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P, 'Array', {fill: require('./_array-fill')});
+$export($export.P, 'Array', {fill: require('./$.array-fill')});
-require('./_add-to-unscopables')('fill'); \ No newline at end of file
+require('./$.add-to-unscopables')('fill'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.filter.js b/node_modules/core-js/library/modules/es6.array.filter.js
deleted file mode 100644
index f60951d37..000000000
--- a/node_modules/core-js/library/modules/es6.array.filter.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $filter = require('./_array-methods')(2);
-
-$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */){
- return $filter(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.find-index.js b/node_modules/core-js/library/modules/es6.array.find-index.js
index 530907412..7224a6062 100644
--- a/node_modules/core-js/library/modules/es6.array.find-index.js
+++ b/node_modules/core-js/library/modules/es6.array.find-index.js
@@ -1,7 +1,7 @@
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
-var $export = require('./_export')
- , $find = require('./_array-methods')(6)
+var $export = require('./$.export')
+ , $find = require('./$.array-methods')(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
@@ -11,4 +11,4 @@ $export($export.P + $export.F * forced, 'Array', {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')(KEY); \ No newline at end of file
+require('./$.add-to-unscopables')(KEY); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.find.js b/node_modules/core-js/library/modules/es6.array.find.js
index 90a9acfbe..199e987e7 100644
--- a/node_modules/core-js/library/modules/es6.array.find.js
+++ b/node_modules/core-js/library/modules/es6.array.find.js
@@ -1,7 +1,7 @@
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
-var $export = require('./_export')
- , $find = require('./_array-methods')(5)
+var $export = require('./$.export')
+ , $find = require('./$.array-methods')(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
@@ -11,4 +11,4 @@ $export($export.P + $export.F * forced, 'Array', {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')(KEY); \ No newline at end of file
+require('./$.add-to-unscopables')(KEY); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.for-each.js b/node_modules/core-js/library/modules/es6.array.for-each.js
deleted file mode 100644
index f814fe4ea..000000000
--- a/node_modules/core-js/library/modules/es6.array.for-each.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $forEach = require('./_array-methods')(0)
- , STRICT = require('./_strict-method')([].forEach, true);
-
-$export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */){
- return $forEach(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.from.js b/node_modules/core-js/library/modules/es6.array.from.js
index 69e5d4a62..4637d8d24 100644
--- a/node_modules/core-js/library/modules/es6.array.from.js
+++ b/node_modules/core-js/library/modules/es6.array.from.js
@@ -1,34 +1,33 @@
'use strict';
-var ctx = require('./_ctx')
- , $export = require('./_export')
- , toObject = require('./_to-object')
- , call = require('./_iter-call')
- , isArrayIter = require('./_is-array-iter')
- , toLength = require('./_to-length')
- , createProperty = require('./_create-property')
- , getIterFn = require('./core.get-iterator-method');
-
-$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
+var ctx = require('./$.ctx')
+ , $export = require('./$.export')
+ , toObject = require('./$.to-object')
+ , call = require('./$.iter-call')
+ , isArrayIter = require('./$.is-array-iter')
+ , toLength = require('./$.to-length')
+ , getIterFn = require('./core.get-iterator-method');
+$export($export.S + $export.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
diff --git a/node_modules/core-js/library/modules/es6.array.index-of.js b/node_modules/core-js/library/modules/es6.array.index-of.js
deleted file mode 100644
index 903763157..000000000
--- a/node_modules/core-js/library/modules/es6.array.index-of.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $indexOf = require('./_array-includes')(false)
- , $native = [].indexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.is-array.js b/node_modules/core-js/library/modules/es6.array.is-array.js
deleted file mode 100644
index cd5d8c192..000000000
--- a/node_modules/core-js/library/modules/es6.array.is-array.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = require('./_export');
-
-$export($export.S, 'Array', {isArray: require('./_is-array')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.iterator.js b/node_modules/core-js/library/modules/es6.array.iterator.js
index 100b344d7..52a546dd1 100644
--- a/node_modules/core-js/library/modules/es6.array.iterator.js
+++ b/node_modules/core-js/library/modules/es6.array.iterator.js
@@ -1,14 +1,14 @@
'use strict';
-var addToUnscopables = require('./_add-to-unscopables')
- , step = require('./_iter-step')
- , Iterators = require('./_iterators')
- , toIObject = require('./_to-iobject');
+var addToUnscopables = require('./$.add-to-unscopables')
+ , step = require('./$.iter-step')
+ , Iterators = require('./$.iterators')
+ , toIObject = require('./$.to-iobject');
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
-module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){
+module.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
diff --git a/node_modules/core-js/library/modules/es6.array.join.js b/node_modules/core-js/library/modules/es6.array.join.js
deleted file mode 100644
index 1bb656538..000000000
--- a/node_modules/core-js/library/modules/es6.array.join.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-// 22.1.3.13 Array.prototype.join(separator)
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , arrayJoin = [].join;
-
-// fallback for not array-like strings
-$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {
- join: function join(separator){
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.last-index-of.js b/node_modules/core-js/library/modules/es6.array.last-index-of.js
deleted file mode 100644
index 75c1eabfa..000000000
--- a/node_modules/core-js/library/modules/es6.array.last-index-of.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , $native = [].lastIndexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
- // convert -0 to +0
- if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
- var O = toIObject(this)
- , length = toLength(O.length)
- , index = length - 1;
- if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
- if(index < 0)index = length + index;
- for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
- return -1;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.map.js b/node_modules/core-js/library/modules/es6.array.map.js
deleted file mode 100644
index f70089f3e..000000000
--- a/node_modules/core-js/library/modules/es6.array.map.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $map = require('./_array-methods')(1);
-
-$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */){
- return $map(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.of.js b/node_modules/core-js/library/modules/es6.array.of.js
index dd4e1f816..f623f1573 100644
--- a/node_modules/core-js/library/modules/es6.array.of.js
+++ b/node_modules/core-js/library/modules/es6.array.of.js
@@ -1,19 +1,19 @@
'use strict';
-var $export = require('./_export')
- , createProperty = require('./_create-property');
+var $export = require('./$.export');
// WebKit Array.of isn't generic
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
- , aLen = arguments.length
- , result = new (typeof this == 'function' ? this : Array)(aLen);
- while(aLen > index)createProperty(result, index, arguments[index++]);
- result.length = aLen;
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
return result;
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.reduce-right.js b/node_modules/core-js/library/modules/es6.array.reduce-right.js
deleted file mode 100644
index 0c64d85e8..000000000
--- a/node_modules/core-js/library/modules/es6.array.reduce-right.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $reduce = require('./_array-reduce');
-
-$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.reduce.js b/node_modules/core-js/library/modules/es6.array.reduce.js
deleted file mode 100644
index 491f7d252..000000000
--- a/node_modules/core-js/library/modules/es6.array.reduce.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $reduce = require('./_array-reduce');
-
-$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.slice.js b/node_modules/core-js/library/modules/es6.array.slice.js
deleted file mode 100644
index 610bd3990..000000000
--- a/node_modules/core-js/library/modules/es6.array.slice.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , html = require('./_html')
- , cof = require('./_cof')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length')
- , arraySlice = [].slice;
-
-// fallback for not array-like ES3 strings and DOM objects
-$export($export.P + $export.F * require('./_fails')(function(){
- if(html)arraySlice.call(html);
-}), 'Array', {
- slice: function slice(begin, end){
- var len = toLength(this.length)
- , klass = cof(this);
- end = end === undefined ? len : end;
- if(klass == 'Array')return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len)
- , upTo = toIndex(end, len)
- , size = toLength(upTo - start)
- , cloned = Array(size)
- , i = 0;
- for(; i < size; i++)cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.some.js b/node_modules/core-js/library/modules/es6.array.some.js
deleted file mode 100644
index fa1095edc..000000000
--- a/node_modules/core-js/library/modules/es6.array.some.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $some = require('./_array-methods')(3);
-
-$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */){
- return $some(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.sort.js b/node_modules/core-js/library/modules/es6.array.sort.js
deleted file mode 100644
index 7de1fe77f..000000000
--- a/node_modules/core-js/library/modules/es6.array.sort.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , aFunction = require('./_a-function')
- , toObject = require('./_to-object')
- , fails = require('./_fails')
- , $sort = [].sort
- , test = [1, 2, 3];
-
-$export($export.P + $export.F * (fails(function(){
- // IE8-
- test.sort(undefined);
-}) || !fails(function(){
- // V8 bug
- test.sort(null);
- // Old WebKit
-}) || !require('./_strict-method')($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn){
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.array.species.js b/node_modules/core-js/library/modules/es6.array.species.js
index d63c738f7..543bdfe93 100644
--- a/node_modules/core-js/library/modules/es6.array.species.js
+++ b/node_modules/core-js/library/modules/es6.array.species.js
@@ -1 +1 @@
-require('./_set-species')('Array'); \ No newline at end of file
+require('./$.set-species')('Array'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.date.now.js b/node_modules/core-js/library/modules/es6.date.now.js
deleted file mode 100644
index c3ee5fd7f..000000000
--- a/node_modules/core-js/library/modules/es6.date.now.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = require('./_export');
-
-$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.date.to-iso-string.js b/node_modules/core-js/library/modules/es6.date.to-iso-string.js
deleted file mode 100644
index 2426c5898..000000000
--- a/node_modules/core-js/library/modules/es6.date.to-iso-string.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var $export = require('./_export')
- , fails = require('./_fails')
- , getTime = Date.prototype.getTime;
-
-var lz = function(num){
- return num > 9 ? num : '0' + num;
-};
-
-// PhantomJS / old WebKit has a broken implementations
-$export($export.P + $export.F * (fails(function(){
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
-}) || !fails(function(){
- new Date(NaN).toISOString();
-})), 'Date', {
- toISOString: function toISOString(){
- if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
- var d = this
- , y = d.getUTCFullYear()
- , m = d.getUTCMilliseconds()
- , s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.date.to-json.js b/node_modules/core-js/library/modules/es6.date.to-json.js
deleted file mode 100644
index eb419d03f..000000000
--- a/node_modules/core-js/library/modules/es6.date.to-json.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive');
-
-$export($export.P + $export.F * require('./_fails')(function(){
- return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
-}), 'Date', {
- toJSON: function toJSON(key){
- var O = toObject(this)
- , pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.date.to-primitive.js b/node_modules/core-js/library/modules/es6.date.to-primitive.js
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/core-js/library/modules/es6.date.to-primitive.js
+++ /dev/null
diff --git a/node_modules/core-js/library/modules/es6.function.bind.js b/node_modules/core-js/library/modules/es6.function.bind.js
deleted file mode 100644
index 85f103799..000000000
--- a/node_modules/core-js/library/modules/es6.function.bind.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = require('./_export');
-
-$export($export.P, 'Function', {bind: require('./_bind')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.function.has-instance.js b/node_modules/core-js/library/modules/es6.function.has-instance.js
index ae294b1f1..94d840f86 100644
--- a/node_modules/core-js/library/modules/es6.function.has-instance.js
+++ b/node_modules/core-js/library/modules/es6.function.has-instance.js
@@ -1,13 +1,13 @@
'use strict';
-var isObject = require('./_is-object')
- , getPrototypeOf = require('./_object-gpo')
- , HAS_INSTANCE = require('./_wks')('hasInstance')
- , FunctionProto = Function.prototype;
+var $ = require('./$')
+ , isObject = require('./$.is-object')
+ , HAS_INSTANCE = require('./$.wks')('hasInstance')
+ , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
-if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){
+if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.map.js b/node_modules/core-js/library/modules/es6.map.js
index a166430fc..54fd5c1ab 100644
--- a/node_modules/core-js/library/modules/es6.map.js
+++ b/node_modules/core-js/library/modules/es6.map.js
@@ -1,8 +1,8 @@
'use strict';
-var strong = require('./_collection-strong');
+var strong = require('./$.collection-strong');
// 23.1 Map Objects
-module.exports = require('./_collection')('Map', function(get){
+require('./$.collection')('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
diff --git a/node_modules/core-js/library/modules/es6.math.acosh.js b/node_modules/core-js/library/modules/es6.math.acosh.js
index 459f11990..f69282a8c 100644
--- a/node_modules/core-js/library/modules/es6.math.acosh.js
+++ b/node_modules/core-js/library/modules/es6.math.acosh.js
@@ -1,15 +1,11 @@
// 20.2.2.3 Math.acosh(x)
-var $export = require('./_export')
- , log1p = require('./_math-log1p')
+var $export = require('./$.export')
+ , log1p = require('./$.math-log1p')
, sqrt = Math.sqrt
, $acosh = Math.acosh;
-$export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
-), 'Math', {
+// V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
diff --git a/node_modules/core-js/library/modules/es6.math.asinh.js b/node_modules/core-js/library/modules/es6.math.asinh.js
index e6a74abb5..bd34adf01 100644
--- a/node_modules/core-js/library/modules/es6.math.asinh.js
+++ b/node_modules/core-js/library/modules/es6.math.asinh.js
@@ -1,10 +1,8 @@
// 20.2.2.5 Math.asinh(x)
-var $export = require('./_export')
- , $asinh = Math.asinh;
+var $export = require('./$.export');
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
-// Tor Browser bug: Math.asinh(0) -> -0
-$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); \ No newline at end of file
+$export($export.S, 'Math', {asinh: asinh}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.math.atanh.js b/node_modules/core-js/library/modules/es6.math.atanh.js
index 94575d9f0..656ea409d 100644
--- a/node_modules/core-js/library/modules/es6.math.atanh.js
+++ b/node_modules/core-js/library/modules/es6.math.atanh.js
@@ -1,9 +1,7 @@
// 20.2.2.7 Math.atanh(x)
-var $export = require('./_export')
- , $atanh = Math.atanh;
+var $export = require('./$.export');
-// Tor Browser bug: Math.atanh(-0) -> 0
-$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+$export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
diff --git a/node_modules/core-js/library/modules/es6.math.cbrt.js b/node_modules/core-js/library/modules/es6.math.cbrt.js
index 7ca7daea8..79a1fbc87 100644
--- a/node_modules/core-js/library/modules/es6.math.cbrt.js
+++ b/node_modules/core-js/library/modules/es6.math.cbrt.js
@@ -1,6 +1,6 @@
// 20.2.2.9 Math.cbrt(x)
-var $export = require('./_export')
- , sign = require('./_math-sign');
+var $export = require('./$.export')
+ , sign = require('./$.math-sign');
$export($export.S, 'Math', {
cbrt: function cbrt(x){
diff --git a/node_modules/core-js/library/modules/es6.math.clz32.js b/node_modules/core-js/library/modules/es6.math.clz32.js
index 1ec534bd0..edd11588c 100644
--- a/node_modules/core-js/library/modules/es6.math.clz32.js
+++ b/node_modules/core-js/library/modules/es6.math.clz32.js
@@ -1,5 +1,5 @@
// 20.2.2.11 Math.clz32(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
clz32: function clz32(x){
diff --git a/node_modules/core-js/library/modules/es6.math.cosh.js b/node_modules/core-js/library/modules/es6.math.cosh.js
index 4f2b21552..d1df7490c 100644
--- a/node_modules/core-js/library/modules/es6.math.cosh.js
+++ b/node_modules/core-js/library/modules/es6.math.cosh.js
@@ -1,5 +1,5 @@
// 20.2.2.12 Math.cosh(x)
-var $export = require('./_export')
+var $export = require('./$.export')
, exp = Math.exp;
$export($export.S, 'Math', {
diff --git a/node_modules/core-js/library/modules/es6.math.expm1.js b/node_modules/core-js/library/modules/es6.math.expm1.js
index 9762b7cd0..e27742fe3 100644
--- a/node_modules/core-js/library/modules/es6.math.expm1.js
+++ b/node_modules/core-js/library/modules/es6.math.expm1.js
@@ -1,5 +1,4 @@
// 20.2.2.14 Math.expm1(x)
-var $export = require('./_export')
- , $expm1 = require('./_math-expm1');
+var $export = require('./$.export');
-$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); \ No newline at end of file
+$export($export.S, 'Math', {expm1: require('./$.math-expm1')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.math.fround.js b/node_modules/core-js/library/modules/es6.math.fround.js
index 01a88862e..43cd70c7b 100644
--- a/node_modules/core-js/library/modules/es6.math.fround.js
+++ b/node_modules/core-js/library/modules/es6.math.fround.js
@@ -1,6 +1,6 @@
// 20.2.2.16 Math.fround(x)
-var $export = require('./_export')
- , sign = require('./_math-sign')
+var $export = require('./$.export')
+ , sign = require('./$.math-sign')
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
diff --git a/node_modules/core-js/library/modules/es6.math.hypot.js b/node_modules/core-js/library/modules/es6.math.hypot.js
index 508521b69..a8edf7cde 100644
--- a/node_modules/core-js/library/modules/es6.math.hypot.js
+++ b/node_modules/core-js/library/modules/es6.math.hypot.js
@@ -1,16 +1,17 @@
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
-var $export = require('./_export')
+var $export = require('./$.export')
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
- var sum = 0
- , i = 0
- , aLen = arguments.length
- , larg = 0
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
, arg, div;
- while(i < aLen){
- arg = abs(arguments[i++]);
+ while(i < $$len){
+ arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
diff --git a/node_modules/core-js/library/modules/es6.math.imul.js b/node_modules/core-js/library/modules/es6.math.imul.js
index 7f4111d27..926053def 100644
--- a/node_modules/core-js/library/modules/es6.math.imul.js
+++ b/node_modules/core-js/library/modules/es6.math.imul.js
@@ -1,9 +1,9 @@
// 20.2.2.18 Math.imul(x, y)
-var $export = require('./_export')
+var $export = require('./$.export')
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
diff --git a/node_modules/core-js/library/modules/es6.math.log10.js b/node_modules/core-js/library/modules/es6.math.log10.js
index 791dfc353..ef5ae6a96 100644
--- a/node_modules/core-js/library/modules/es6.math.log10.js
+++ b/node_modules/core-js/library/modules/es6.math.log10.js
@@ -1,5 +1,5 @@
// 20.2.2.21 Math.log10(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
log10: function log10(x){
diff --git a/node_modules/core-js/library/modules/es6.math.log1p.js b/node_modules/core-js/library/modules/es6.math.log1p.js
index a1de0258d..31c395ec8 100644
--- a/node_modules/core-js/library/modules/es6.math.log1p.js
+++ b/node_modules/core-js/library/modules/es6.math.log1p.js
@@ -1,4 +1,4 @@
// 20.2.2.20 Math.log1p(x)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Math', {log1p: require('./_math-log1p')}); \ No newline at end of file
+$export($export.S, 'Math', {log1p: require('./$.math-log1p')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.math.log2.js b/node_modules/core-js/library/modules/es6.math.log2.js
index c4ba7819c..24c0124b0 100644
--- a/node_modules/core-js/library/modules/es6.math.log2.js
+++ b/node_modules/core-js/library/modules/es6.math.log2.js
@@ -1,5 +1,5 @@
// 20.2.2.22 Math.log2(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
log2: function log2(x){
diff --git a/node_modules/core-js/library/modules/es6.math.sign.js b/node_modules/core-js/library/modules/es6.math.sign.js
index 5dbee6f66..fd8d8bc36 100644
--- a/node_modules/core-js/library/modules/es6.math.sign.js
+++ b/node_modules/core-js/library/modules/es6.math.sign.js
@@ -1,4 +1,4 @@
// 20.2.2.28 Math.sign(x)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Math', {sign: require('./_math-sign')}); \ No newline at end of file
+$export($export.S, 'Math', {sign: require('./$.math-sign')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.math.sinh.js b/node_modules/core-js/library/modules/es6.math.sinh.js
index 5464ae3e6..a01c4d374 100644
--- a/node_modules/core-js/library/modules/es6.math.sinh.js
+++ b/node_modules/core-js/library/modules/es6.math.sinh.js
@@ -1,10 +1,10 @@
// 20.2.2.30 Math.sinh(x)
-var $export = require('./_export')
- , expm1 = require('./_math-expm1')
+var $export = require('./$.export')
+ , expm1 = require('./$.math-expm1')
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
diff --git a/node_modules/core-js/library/modules/es6.math.tanh.js b/node_modules/core-js/library/modules/es6.math.tanh.js
index d2f10778c..0d081a5da 100644
--- a/node_modules/core-js/library/modules/es6.math.tanh.js
+++ b/node_modules/core-js/library/modules/es6.math.tanh.js
@@ -1,6 +1,6 @@
// 20.2.2.33 Math.tanh(x)
-var $export = require('./_export')
- , expm1 = require('./_math-expm1')
+var $export = require('./$.export')
+ , expm1 = require('./$.math-expm1')
, exp = Math.exp;
$export($export.S, 'Math', {
diff --git a/node_modules/core-js/library/modules/es6.math.trunc.js b/node_modules/core-js/library/modules/es6.math.trunc.js
index 2e42563b6..f3f085596 100644
--- a/node_modules/core-js/library/modules/es6.math.trunc.js
+++ b/node_modules/core-js/library/modules/es6.math.trunc.js
@@ -1,5 +1,5 @@
// 20.2.2.34 Math.trunc(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
trunc: function trunc(it){
diff --git a/node_modules/core-js/library/modules/es6.number.epsilon.js b/node_modules/core-js/library/modules/es6.number.epsilon.js
index d25898ccc..45c865cfa 100644
--- a/node_modules/core-js/library/modules/es6.number.epsilon.js
+++ b/node_modules/core-js/library/modules/es6.number.epsilon.js
@@ -1,4 +1,4 @@
// 20.1.2.1 Number.EPSILON
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.is-finite.js b/node_modules/core-js/library/modules/es6.number.is-finite.js
index c8c42753b..362a6c80d 100644
--- a/node_modules/core-js/library/modules/es6.number.is-finite.js
+++ b/node_modules/core-js/library/modules/es6.number.is-finite.js
@@ -1,6 +1,6 @@
// 20.1.2.2 Number.isFinite(number)
-var $export = require('./_export')
- , _isFinite = require('./_global').isFinite;
+var $export = require('./$.export')
+ , _isFinite = require('./$.global').isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
diff --git a/node_modules/core-js/library/modules/es6.number.is-integer.js b/node_modules/core-js/library/modules/es6.number.is-integer.js
index dc0f8f009..189db9a27 100644
--- a/node_modules/core-js/library/modules/es6.number.is-integer.js
+++ b/node_modules/core-js/library/modules/es6.number.is-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.3 Number.isInteger(number)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Number', {isInteger: require('./_is-integer')}); \ No newline at end of file
+$export($export.S, 'Number', {isInteger: require('./$.is-integer')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.is-nan.js b/node_modules/core-js/library/modules/es6.number.is-nan.js
index 5fedf8252..151bb4b2b 100644
--- a/node_modules/core-js/library/modules/es6.number.is-nan.js
+++ b/node_modules/core-js/library/modules/es6.number.is-nan.js
@@ -1,5 +1,5 @@
// 20.1.2.4 Number.isNaN(number)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {
isNaN: function isNaN(number){
diff --git a/node_modules/core-js/library/modules/es6.number.is-safe-integer.js b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js
index 92193e2ec..e23b4cbc5 100644
--- a/node_modules/core-js/library/modules/es6.number.is-safe-integer.js
+++ b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js
@@ -1,6 +1,6 @@
// 20.1.2.5 Number.isSafeInteger(number)
-var $export = require('./_export')
- , isInteger = require('./_is-integer')
+var $export = require('./$.export')
+ , isInteger = require('./$.is-integer')
, abs = Math.abs;
$export($export.S, 'Number', {
diff --git a/node_modules/core-js/library/modules/es6.number.max-safe-integer.js b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js
index b9d7f2a77..a1aaf7412 100644
--- a/node_modules/core-js/library/modules/es6.number.max-safe-integer.js
+++ b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.6 Number.MAX_SAFE_INTEGER
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.min-safe-integer.js b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js
index 9a2beeb3c..ab97cb5dc 100644
--- a/node_modules/core-js/library/modules/es6.number.min-safe-integer.js
+++ b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.10 Number.MIN_SAFE_INTEGER
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.parse-float.js b/node_modules/core-js/library/modules/es6.number.parse-float.js
index 7ee14da03..1d0c96741 100644
--- a/node_modules/core-js/library/modules/es6.number.parse-float.js
+++ b/node_modules/core-js/library/modules/es6.number.parse-float.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
// 20.1.2.12 Number.parseFloat(string)
-$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); \ No newline at end of file
+var $export = require('./$.export');
+
+$export($export.S, 'Number', {parseFloat: parseFloat}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.parse-int.js b/node_modules/core-js/library/modules/es6.number.parse-int.js
index 59bf14459..813b5b795 100644
--- a/node_modules/core-js/library/modules/es6.number.parse-int.js
+++ b/node_modules/core-js/library/modules/es6.number.parse-int.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
// 20.1.2.13 Number.parseInt(string, radix)
-$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); \ No newline at end of file
+var $export = require('./$.export');
+
+$export($export.S, 'Number', {parseInt: parseInt}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.to-fixed.js b/node_modules/core-js/library/modules/es6.number.to-fixed.js
deleted file mode 100644
index c54970d6a..000000000
--- a/node_modules/core-js/library/modules/es6.number.to-fixed.js
+++ /dev/null
@@ -1,113 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toInteger = require('./_to-integer')
- , aNumberValue = require('./_a-number-value')
- , repeat = require('./_string-repeat')
- , $toFixed = 1..toFixed
- , floor = Math.floor
- , data = [0, 0, 0, 0, 0, 0]
- , ERROR = 'Number.toFixed: incorrect invocation!'
- , ZERO = '0';
-
-var multiply = function(n, c){
- var i = -1
- , c2 = c;
- while(++i < 6){
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
-};
-var divide = function(n){
- var i = 6
- , c = 0;
- while(--i >= 0){
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
-};
-var numToString = function(){
- var i = 6
- , s = '';
- while(--i >= 0){
- if(s !== '' || i === 0 || data[i] !== 0){
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
-};
-var pow = function(x, n, acc){
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
-};
-var log = function(x){
- var n = 0
- , x2 = x;
- while(x2 >= 4096){
- n += 12;
- x2 /= 4096;
- }
- while(x2 >= 2){
- n += 1;
- x2 /= 2;
- } return n;
-};
-
-$export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128..toFixed(0) !== '1000000000000000128'
-) || !require('./_fails')(function(){
- // V8 ~ Android 4.3-
- $toFixed.call({});
-})), 'Number', {
- toFixed: function toFixed(fractionDigits){
- var x = aNumberValue(this, ERROR)
- , f = toInteger(fractionDigits)
- , s = ''
- , m = ZERO
- , e, z, j, k;
- if(f < 0 || f > 20)throw RangeError(ERROR);
- if(x != x)return 'NaN';
- if(x <= -1e21 || x >= 1e21)return String(x);
- if(x < 0){
- s = '-';
- x = -x;
- }
- if(x > 1e-21){
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if(e > 0){
- multiply(0, z);
- j = f;
- while(j >= 7){
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while(j >= 23){
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if(f > 0){
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.number.to-precision.js b/node_modules/core-js/library/modules/es6.number.to-precision.js
deleted file mode 100644
index 903dacdf0..000000000
--- a/node_modules/core-js/library/modules/es6.number.to-precision.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $fails = require('./_fails')
- , aNumberValue = require('./_a-number-value')
- , $toPrecision = 1..toPrecision;
-
-$export($export.P + $export.F * ($fails(function(){
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
-}) || !$fails(function(){
- // V8 ~ Android 4.3-
- $toPrecision.call({});
-})), 'Number', {
- toPrecision: function toPrecision(precision){
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.assign.js b/node_modules/core-js/library/modules/es6.object.assign.js
index 13eda2cb8..b62e7a420 100644
--- a/node_modules/core-js/library/modules/es6.object.assign.js
+++ b/node_modules/core-js/library/modules/es6.object.assign.js
@@ -1,4 +1,4 @@
// 19.1.3.1 Object.assign(target, source)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {assign: require('./$.object-assign')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.create.js b/node_modules/core-js/library/modules/es6.object.create.js
deleted file mode 100644
index 17e4b2842..000000000
--- a/node_modules/core-js/library/modules/es6.object.create.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export')
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-$export($export.S, 'Object', {create: require('./_object-create')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.define-properties.js b/node_modules/core-js/library/modules/es6.object.define-properties.js
deleted file mode 100644
index 183eec6f5..000000000
--- a/node_modules/core-js/library/modules/es6.object.define-properties.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export');
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
-$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.define-property.js b/node_modules/core-js/library/modules/es6.object.define-property.js
deleted file mode 100644
index 71807cc05..000000000
--- a/node_modules/core-js/library/modules/es6.object.define-property.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export');
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
-$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.freeze.js b/node_modules/core-js/library/modules/es6.object.freeze.js
index 34b510842..fa87c9512 100644
--- a/node_modules/core-js/library/modules/es6.object.freeze.js
+++ b/node_modules/core-js/library/modules/es6.object.freeze.js
@@ -1,9 +1,8 @@
// 19.1.2.5 Object.freeze(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('freeze', function($freeze){
+require('./$.object-sap')('freeze', function($freeze){
return function freeze(it){
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
+ return $freeze && isObject(it) ? $freeze(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js
index 60c69913a..9b253acdd 100644
--- a/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js
+++ b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js
@@ -1,8 +1,7 @@
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
-var toIObject = require('./_to-iobject')
- , $getOwnPropertyDescriptor = require('./_object-gopd').f;
+var toIObject = require('./$.to-iobject');
-require('./_object-sap')('getOwnPropertyDescriptor', function(){
+require('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
return function getOwnPropertyDescriptor(it, key){
return $getOwnPropertyDescriptor(toIObject(it), key);
};
diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-names.js b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js
index 91dd110d2..e87bcf607 100644
--- a/node_modules/core-js/library/modules/es6.object.get-own-property-names.js
+++ b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js
@@ -1,4 +1,4 @@
// 19.1.2.7 Object.getOwnPropertyNames(O)
-require('./_object-sap')('getOwnPropertyNames', function(){
- return require('./_object-gopn-ext').f;
+require('./$.object-sap')('getOwnPropertyNames', function(){
+ return require('./$.get-names').get;
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.get-prototype-of.js b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js
index b124e28fa..9ec0405b6 100644
--- a/node_modules/core-js/library/modules/es6.object.get-prototype-of.js
+++ b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js
@@ -1,8 +1,7 @@
// 19.1.2.9 Object.getPrototypeOf(O)
-var toObject = require('./_to-object')
- , $getPrototypeOf = require('./_object-gpo');
+var toObject = require('./$.to-object');
-require('./_object-sap')('getPrototypeOf', function(){
+require('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){
return function getPrototypeOf(it){
return $getPrototypeOf(toObject(it));
};
diff --git a/node_modules/core-js/library/modules/es6.object.is-extensible.js b/node_modules/core-js/library/modules/es6.object.is-extensible.js
index 94bf8a815..ada2b95a9 100644
--- a/node_modules/core-js/library/modules/es6.object.is-extensible.js
+++ b/node_modules/core-js/library/modules/es6.object.is-extensible.js
@@ -1,7 +1,7 @@
// 19.1.2.11 Object.isExtensible(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isExtensible', function($isExtensible){
+require('./$.object-sap')('isExtensible', function($isExtensible){
return function isExtensible(it){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
diff --git a/node_modules/core-js/library/modules/es6.object.is-frozen.js b/node_modules/core-js/library/modules/es6.object.is-frozen.js
index 4bdfd11b1..b3e44d1b7 100644
--- a/node_modules/core-js/library/modules/es6.object.is-frozen.js
+++ b/node_modules/core-js/library/modules/es6.object.is-frozen.js
@@ -1,7 +1,7 @@
// 19.1.2.12 Object.isFrozen(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isFrozen', function($isFrozen){
+require('./$.object-sap')('isFrozen', function($isFrozen){
return function isFrozen(it){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
diff --git a/node_modules/core-js/library/modules/es6.object.is-sealed.js b/node_modules/core-js/library/modules/es6.object.is-sealed.js
index d13aa1b06..423caf331 100644
--- a/node_modules/core-js/library/modules/es6.object.is-sealed.js
+++ b/node_modules/core-js/library/modules/es6.object.is-sealed.js
@@ -1,7 +1,7 @@
// 19.1.2.13 Object.isSealed(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isSealed', function($isSealed){
+require('./$.object-sap')('isSealed', function($isSealed){
return function isSealed(it){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
diff --git a/node_modules/core-js/library/modules/es6.object.is.js b/node_modules/core-js/library/modules/es6.object.is.js
index ad2994256..3ae3b6046 100644
--- a/node_modules/core-js/library/modules/es6.object.is.js
+++ b/node_modules/core-js/library/modules/es6.object.is.js
@@ -1,3 +1,3 @@
// 19.1.3.10 Object.is(value1, value2)
-var $export = require('./_export');
-$export($export.S, 'Object', {is: require('./_same-value')}); \ No newline at end of file
+var $export = require('./$.export');
+$export($export.S, 'Object', {is: require('./$.same-value')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.keys.js b/node_modules/core-js/library/modules/es6.object.keys.js
index bf76c07d7..e3c18c020 100644
--- a/node_modules/core-js/library/modules/es6.object.keys.js
+++ b/node_modules/core-js/library/modules/es6.object.keys.js
@@ -1,8 +1,7 @@
// 19.1.2.14 Object.keys(O)
-var toObject = require('./_to-object')
- , $keys = require('./_object-keys');
+var toObject = require('./$.to-object');
-require('./_object-sap')('keys', function(){
+require('./$.object-sap')('keys', function($keys){
return function keys(it){
return $keys(toObject(it));
};
diff --git a/node_modules/core-js/library/modules/es6.object.prevent-extensions.js b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js
index adaff7a79..20f879e28 100644
--- a/node_modules/core-js/library/modules/es6.object.prevent-extensions.js
+++ b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js
@@ -1,9 +1,8 @@
// 19.1.2.15 Object.preventExtensions(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('preventExtensions', function($preventExtensions){
+require('./$.object-sap')('preventExtensions', function($preventExtensions){
return function preventExtensions(it){
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.seal.js b/node_modules/core-js/library/modules/es6.object.seal.js
index d7e4ea958..85a7fa98f 100644
--- a/node_modules/core-js/library/modules/es6.object.seal.js
+++ b/node_modules/core-js/library/modules/es6.object.seal.js
@@ -1,9 +1,8 @@
// 19.1.2.17 Object.seal(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('seal', function($seal){
+require('./$.object-sap')('seal', function($seal){
return function seal(it){
- return $seal && isObject(it) ? $seal(meta(it)) : it;
+ return $seal && isObject(it) ? $seal(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.object.set-prototype-of.js b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js
index 5bbe4c068..79a147c3f 100644
--- a/node_modules/core-js/library/modules/es6.object.set-prototype-of.js
+++ b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js
@@ -1,3 +1,3 @@
// 19.1.3.19 Object.setPrototypeOf(O, proto)
-var $export = require('./_export');
-$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set}); \ No newline at end of file
+var $export = require('./$.export');
+$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.parse-float.js b/node_modules/core-js/library/modules/es6.parse-float.js
deleted file mode 100644
index 5201712b1..000000000
--- a/node_modules/core-js/library/modules/es6.parse-float.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
-// 18.2.4 parseFloat(string)
-$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.parse-int.js b/node_modules/core-js/library/modules/es6.parse-int.js
deleted file mode 100644
index 5a2bfaff0..000000000
--- a/node_modules/core-js/library/modules/es6.parse-int.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
-// 18.2.5 parseInt(string, radix)
-$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.promise.js b/node_modules/core-js/library/modules/es6.promise.js
index 262a93af1..fbf20177a 100644
--- a/node_modules/core-js/library/modules/es6.promise.js
+++ b/node_modules/core-js/library/modules/es6.promise.js
@@ -1,58 +1,86 @@
'use strict';
-var LIBRARY = require('./_library')
- , global = require('./_global')
- , ctx = require('./_ctx')
- , classof = require('./_classof')
- , $export = require('./_export')
- , isObject = require('./_is-object')
- , aFunction = require('./_a-function')
- , anInstance = require('./_an-instance')
- , forOf = require('./_for-of')
- , speciesConstructor = require('./_species-constructor')
- , task = require('./_task').set
- , microtask = require('./_microtask')()
- , PROMISE = 'Promise'
- , TypeError = global.TypeError
- , process = global.process
- , $Promise = global[PROMISE]
- , process = global.process
- , isNode = classof(process) == 'process'
- , empty = function(){ /* empty */ }
- , Internal, GenericPromiseCapability, Wrapper;
+var $ = require('./$')
+ , LIBRARY = require('./$.library')
+ , global = require('./$.global')
+ , ctx = require('./$.ctx')
+ , classof = require('./$.classof')
+ , $export = require('./$.export')
+ , isObject = require('./$.is-object')
+ , anObject = require('./$.an-object')
+ , aFunction = require('./$.a-function')
+ , strictNew = require('./$.strict-new')
+ , forOf = require('./$.for-of')
+ , setProto = require('./$.set-proto').set
+ , same = require('./$.same-value')
+ , SPECIES = require('./$.wks')('species')
+ , speciesConstructor = require('./$.species-constructor')
+ , asap = require('./$.microtask')
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , empty = function(){ /* empty */ }
+ , Wrapper;
-var USE_NATIVE = !!function(){
+var testResolve = function(sub){
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
+};
+
+var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1)
- , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch(e){ /* empty */ }
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && require('./$.descriptors')){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
}();
// helpers
var sameConstructor = function(a, b){
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+};
+var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
-var newPromiseCapability = function(C){
- return sameConstructor($Promise, C)
- ? new PromiseCapability(C)
- : new GenericPromiseCapability(C);
-};
-var PromiseCapability = GenericPromiseCapability = function(C){
+var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
};
var perform = function(exec){
try {
@@ -61,32 +89,23 @@ var perform = function(exec){
return {error: e};
}
};
-var notify = function(promise, isReject){
- if(promise._n)return;
- promise._n = true;
- var chain = promise._c;
- microtask(function(){
- var value = promise._v
- , ok = promise._s == 1
+var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
- , domain = reaction.domain
, result, then;
try {
if(handler){
- if(!ok){
- if(promise._h == 2)onHandleUnhandled(promise);
- promise._h = 1;
- }
- if(handler === true)result = value;
- else {
- if(domain)domain.enter();
- result = handler(value);
- if(domain)domain.exit();
- }
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
@@ -98,17 +117,12 @@ var notify = function(promise, isReject){
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if(isReject && !promise._h)onUnhandled(promise);
- });
-};
-var onUnhandled = function(promise){
- task.call(global, function(){
- var value = promise._v
- , abrupt, handler, console;
- if(isUnhandled(promise)){
- abrupt = perform(function(){
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
@@ -116,54 +130,42 @@ var onUnhandled = function(promise){
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if(abrupt)throw abrupt.error;
+ } record.a = undefined;
+ }, 1);
});
};
var isUnhandled = function(promise){
- if(promise._h == 1)return false;
- var chain = promise._a || promise._c
- , i = 0
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
, reaction;
+ if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
-var onHandleUnhandled = function(promise){
- task.call(global, function(){
- var handler;
- if(isNode){
- process.emit('rejectionHandled', promise);
- } else if(handler = global.onrejectionhandled){
- handler({promise: promise, reason: promise._v});
- }
- });
-};
var $reject = function(value){
- var promise = this;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if(!promise._a)promise._a = promise._c.slice();
- notify(promise, true);
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
};
var $resolve = function(value){
- var promise = this
+ var record = this
, then;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
try {
- if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
- microtask(function(){
- var wrapper = {_w: promise, _d: false}; // wrap
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
@@ -171,122 +173,114 @@ var $resolve = function(value){
}
});
} else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
}
} catch(e){
- $reject.call({_w: promise, _d: false}, e); // wrap
+ $reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor){
- anInstance(this, $Promise, PROMISE, '_h');
+ P = function Promise(executor){
aFunction(executor);
- Internal.call(this);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
- $reject.call(this, err);
+ $reject.call(record, err);
}
};
- Internal = function Promise(executor){
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = require('./_redefine-all')($Promise.prototype, {
+ require('./$.redefine-all')(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if(this._a)this._a.push(reaction);
- if(this._s)notify(this, false);
- return reaction.promise;
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- PromiseCapability = function(){
- var promise = new Internal;
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
}
-$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
-require('./_set-to-string-tag')($Promise, PROMISE);
-require('./_set-species')(PROMISE);
-Wrapper = require('./_core')[PROMISE];
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+require('./$.set-to-string-tag')(P, PROMISE);
+require('./$.set-species')(PROMISE);
+Wrapper = require('./$.core')[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
- var capability = newPromiseCapability(this)
+ var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
-$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+$export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
- var capability = newPromiseCapability(this)
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
-$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){
- $Promise.all(iter)['catch'](empty);
+$export($export.S + $export.F * !(USE_NATIVE && require('./$.iter-detect')(function(iter){
+ P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, resolve = capability.resolve
- , reject = capability.reject;
+ , reject = capability.reject
+ , values = [];
var abrupt = perform(function(){
- var values = []
- , index = 0
- , remaining = 1;
- forOf(iterable, false, function(promise){
- var $index = index++
- , alreadyCalled = false;
- values.push(undefined);
- remaining++;
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
}, reject);
});
- --remaining || resolve(values);
+ else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
diff --git a/node_modules/core-js/library/modules/es6.reflect.apply.js b/node_modules/core-js/library/modules/es6.reflect.apply.js
index 24ea80f51..361a2e2e5 100644
--- a/node_modules/core-js/library/modules/es6.reflect.apply.js
+++ b/node_modules/core-js/library/modules/es6.reflect.apply.js
@@ -1,16 +1,10 @@
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
-var $export = require('./_export')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , rApply = (require('./_global').Reflect || {}).apply
- , fApply = Function.apply;
-// MS Edge argumentsList argument is optional
-$export($export.S + $export.F * !require('./_fails')(function(){
- rApply(function(){});
-}), 'Reflect', {
+var $export = require('./$.export')
+ , _apply = Function.apply
+ , anObject = require('./$.an-object');
+
+$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
- var T = aFunction(target)
- , L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ return _apply.call(target, thisArgument, anObject(argumentsList));
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.reflect.construct.js b/node_modules/core-js/library/modules/es6.reflect.construct.js
index 96483d708..c3928cd92 100644
--- a/node_modules/core-js/library/modules/es6.reflect.construct.js
+++ b/node_modules/core-js/library/modules/es6.reflect.construct.js
@@ -1,29 +1,21 @@
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
-var $export = require('./_export')
- , create = require('./_object-create')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , isObject = require('./_is-object')
- , fails = require('./_fails')
- , bind = require('./_bind')
- , rConstruct = (require('./_global').Reflect || {}).construct;
+var $ = require('./$')
+ , $export = require('./$.export')
+ , aFunction = require('./$.a-function')
+ , anObject = require('./$.an-object')
+ , isObject = require('./$.is-object')
+ , bind = Function.bind || require('./$.core').Function.prototype.bind;
-// MS Edge supports only 2 arguments and argumentsList argument is optional
+// MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
function F(){}
- return !(rConstruct(function(){}, [], F) instanceof F);
-});
-var ARGS_BUG = !fails(function(){
- rConstruct(function(){});
-});
-
-$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
switch(args.length){
@@ -40,7 +32,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
- , instance = create(isObject(proto) ? proto : Object.prototype)
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
diff --git a/node_modules/core-js/library/modules/es6.reflect.define-property.js b/node_modules/core-js/library/modules/es6.reflect.define-property.js
index 485d43c45..5f7fc6a18 100644
--- a/node_modules/core-js/library/modules/es6.reflect.define-property.js
+++ b/node_modules/core-js/library/modules/es6.reflect.define-property.js
@@ -1,19 +1,16 @@
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
-var dP = require('./_object-dp')
- , $export = require('./_export')
- , anObject = require('./_an-object')
- , toPrimitive = require('./_to-primitive');
+var $ = require('./$')
+ , $export = require('./$.export')
+ , anObject = require('./$.an-object');
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
-$export($export.S + $export.F * require('./_fails')(function(){
- Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+$export($export.S + $export.F * require('./$.fails')(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
try {
- dP.f(target, propertyKey, attributes);
+ $.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
diff --git a/node_modules/core-js/library/modules/es6.reflect.delete-property.js b/node_modules/core-js/library/modules/es6.reflect.delete-property.js
index 4e8ce2078..18526e5b1 100644
--- a/node_modules/core-js/library/modules/es6.reflect.delete-property.js
+++ b/node_modules/core-js/library/modules/es6.reflect.delete-property.js
@@ -1,11 +1,11 @@
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
-var $export = require('./_export')
- , gOPD = require('./_object-gopd').f
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , getDesc = require('./$').getDesc
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
- var desc = gOPD(anObject(target), propertyKey);
+ var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.reflect.enumerate.js b/node_modules/core-js/library/modules/es6.reflect.enumerate.js
index abdb132d6..73452e2fa 100644
--- a/node_modules/core-js/library/modules/es6.reflect.enumerate.js
+++ b/node_modules/core-js/library/modules/es6.reflect.enumerate.js
@@ -1,7 +1,7 @@
'use strict';
// 26.1.5 Reflect.enumerate(target)
-var $export = require('./_export')
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , anObject = require('./$.an-object');
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
@@ -9,7 +9,7 @@ var Enumerate = function(iterated){
, key;
for(key in iterated)keys.push(key);
};
-require('./_iter-create')(Enumerate, 'Object', function(){
+require('./$.iter-create')(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
diff --git a/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js
index 741a13eba..a3a2e0160 100644
--- a/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js
+++ b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js
@@ -1,10 +1,10 @@
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
-var gOPD = require('./_object-gopd')
- , $export = require('./_export')
- , anObject = require('./_an-object');
+var $ = require('./$')
+ , $export = require('./$.export')
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
- return gOPD.f(anObject(target), propertyKey);
+ return $.getDesc(anObject(target), propertyKey);
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js
index 4f912d104..c06bfa459 100644
--- a/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js
+++ b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js
@@ -1,7 +1,7 @@
// 26.1.8 Reflect.getPrototypeOf(target)
-var $export = require('./_export')
- , getProto = require('./_object-gpo')
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , getProto = require('./$').getProto
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
diff --git a/node_modules/core-js/library/modules/es6.reflect.get.js b/node_modules/core-js/library/modules/es6.reflect.get.js
index f8c39f500..cbb0caaf3 100644
--- a/node_modules/core-js/library/modules/es6.reflect.get.js
+++ b/node_modules/core-js/library/modules/es6.reflect.get.js
@@ -1,21 +1,20 @@
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
-var gOPD = require('./_object-gopd')
- , getPrototypeOf = require('./_object-gpo')
- , has = require('./_has')
- , $export = require('./_export')
- , isObject = require('./_is-object')
- , anObject = require('./_an-object');
+var $ = require('./$')
+ , has = require('./$.has')
+ , $export = require('./$.export')
+ , isObject = require('./$.is-object')
+ , anObject = require('./$.an-object');
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
- if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
- if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.reflect.has.js b/node_modules/core-js/library/modules/es6.reflect.has.js
index bbb6dbcde..65c9e82ff 100644
--- a/node_modules/core-js/library/modules/es6.reflect.has.js
+++ b/node_modules/core-js/library/modules/es6.reflect.has.js
@@ -1,5 +1,5 @@
// 26.1.9 Reflect.has(target, propertyKey)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
diff --git a/node_modules/core-js/library/modules/es6.reflect.is-extensible.js b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js
index ffbc2848e..b92c4f66b 100644
--- a/node_modules/core-js/library/modules/es6.reflect.is-extensible.js
+++ b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js
@@ -1,6 +1,6 @@
// 26.1.10 Reflect.isExtensible(target)
-var $export = require('./_export')
- , anObject = require('./_an-object')
+var $export = require('./$.export')
+ , anObject = require('./$.an-object')
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
diff --git a/node_modules/core-js/library/modules/es6.reflect.own-keys.js b/node_modules/core-js/library/modules/es6.reflect.own-keys.js
index a1e5330c2..db79fdabc 100644
--- a/node_modules/core-js/library/modules/es6.reflect.own-keys.js
+++ b/node_modules/core-js/library/modules/es6.reflect.own-keys.js
@@ -1,4 +1,4 @@
// 26.1.11 Reflect.ownKeys(target)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')}); \ No newline at end of file
+$export($export.S, 'Reflect', {ownKeys: require('./$.own-keys')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js
index d3dad8ee4..f5ccfc2a2 100644
--- a/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js
+++ b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js
@@ -1,6 +1,6 @@
// 26.1.12 Reflect.preventExtensions(target)
-var $export = require('./_export')
- , anObject = require('./_an-object')
+var $export = require('./$.export')
+ , anObject = require('./$.an-object')
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
diff --git a/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js
index b79d9b613..e769436fc 100644
--- a/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js
+++ b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js
@@ -1,6 +1,6 @@
// 26.1.14 Reflect.setPrototypeOf(target, proto)
-var $export = require('./_export')
- , setProto = require('./_set-proto');
+var $export = require('./$.export')
+ , setProto = require('./$.set-proto');
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
diff --git a/node_modules/core-js/library/modules/es6.reflect.set.js b/node_modules/core-js/library/modules/es6.reflect.set.js
index c6b916a2e..0a938e784 100644
--- a/node_modules/core-js/library/modules/es6.reflect.set.js
+++ b/node_modules/core-js/library/modules/es6.reflect.set.js
@@ -1,28 +1,26 @@
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
-var dP = require('./_object-dp')
- , gOPD = require('./_object-gopd')
- , getPrototypeOf = require('./_object-gpo')
- , has = require('./_has')
- , $export = require('./_export')
- , createDesc = require('./_property-desc')
- , anObject = require('./_an-object')
- , isObject = require('./_is-object');
+var $ = require('./$')
+ , has = require('./$.has')
+ , $export = require('./$.export')
+ , createDesc = require('./$.property-desc')
+ , anObject = require('./$.an-object')
+ , isObject = require('./$.is-object');
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
- , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
- if(isObject(proto = getPrototypeOf(target))){
+ if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ $.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
diff --git a/node_modules/core-js/library/modules/es6.regexp.constructor.js b/node_modules/core-js/library/modules/es6.regexp.constructor.js
index 7313c52b3..087d9beb9 100644
--- a/node_modules/core-js/library/modules/es6.regexp.constructor.js
+++ b/node_modules/core-js/library/modules/es6.regexp.constructor.js
@@ -1 +1 @@
-require('./_set-species')('RegExp'); \ No newline at end of file
+require('./$.set-species')('RegExp'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.regexp.to-string.js b/node_modules/core-js/library/modules/es6.regexp.to-string.js
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/core-js/library/modules/es6.regexp.to-string.js
+++ /dev/null
diff --git a/node_modules/core-js/library/modules/es6.set.js b/node_modules/core-js/library/modules/es6.set.js
index a18808818..8e148c9e2 100644
--- a/node_modules/core-js/library/modules/es6.set.js
+++ b/node_modules/core-js/library/modules/es6.set.js
@@ -1,8 +1,8 @@
'use strict';
-var strong = require('./_collection-strong');
+var strong = require('./$.collection-strong');
// 23.2 Set Objects
-module.exports = require('./_collection')('Set', function(get){
+require('./$.collection')('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
diff --git a/node_modules/core-js/library/modules/es6.string.anchor.js b/node_modules/core-js/library/modules/es6.string.anchor.js
deleted file mode 100644
index 65db25219..000000000
--- a/node_modules/core-js/library/modules/es6.string.anchor.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.2 String.prototype.anchor(name)
-require('./_string-html')('anchor', function(createHTML){
- return function anchor(name){
- return createHTML(this, 'a', 'name', name);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.big.js b/node_modules/core-js/library/modules/es6.string.big.js
deleted file mode 100644
index aeeb1aba9..000000000
--- a/node_modules/core-js/library/modules/es6.string.big.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.3 String.prototype.big()
-require('./_string-html')('big', function(createHTML){
- return function big(){
- return createHTML(this, 'big', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.blink.js b/node_modules/core-js/library/modules/es6.string.blink.js
deleted file mode 100644
index aef8da2e3..000000000
--- a/node_modules/core-js/library/modules/es6.string.blink.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.4 String.prototype.blink()
-require('./_string-html')('blink', function(createHTML){
- return function blink(){
- return createHTML(this, 'blink', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.bold.js b/node_modules/core-js/library/modules/es6.string.bold.js
deleted file mode 100644
index 022cdb075..000000000
--- a/node_modules/core-js/library/modules/es6.string.bold.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.5 String.prototype.bold()
-require('./_string-html')('bold', function(createHTML){
- return function bold(){
- return createHTML(this, 'b', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.code-point-at.js b/node_modules/core-js/library/modules/es6.string.code-point-at.js
index cf544652a..ebac55180 100644
--- a/node_modules/core-js/library/modules/es6.string.code-point-at.js
+++ b/node_modules/core-js/library/modules/es6.string.code-point-at.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export')
- , $at = require('./_string-at')(false);
+var $export = require('./$.export')
+ , $at = require('./$.string-at')(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
diff --git a/node_modules/core-js/library/modules/es6.string.ends-with.js b/node_modules/core-js/library/modules/es6.string.ends-with.js
index 80baed9ad..a102da2d4 100644
--- a/node_modules/core-js/library/modules/es6.string.ends-with.js
+++ b/node_modules/core-js/library/modules/es6.string.ends-with.js
@@ -1,15 +1,16 @@
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
-var $export = require('./_export')
- , toLength = require('./_to-length')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , toLength = require('./$.to-length')
+ , context = require('./$.string-context')
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
-$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
- , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
diff --git a/node_modules/core-js/library/modules/es6.string.fixed.js b/node_modules/core-js/library/modules/es6.string.fixed.js
deleted file mode 100644
index d017e202a..000000000
--- a/node_modules/core-js/library/modules/es6.string.fixed.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.6 String.prototype.fixed()
-require('./_string-html')('fixed', function(createHTML){
- return function fixed(){
- return createHTML(this, 'tt', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.fontcolor.js b/node_modules/core-js/library/modules/es6.string.fontcolor.js
deleted file mode 100644
index d40711f03..000000000
--- a/node_modules/core-js/library/modules/es6.string.fontcolor.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.7 String.prototype.fontcolor(color)
-require('./_string-html')('fontcolor', function(createHTML){
- return function fontcolor(color){
- return createHTML(this, 'font', 'color', color);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.fontsize.js b/node_modules/core-js/library/modules/es6.string.fontsize.js
deleted file mode 100644
index ba3ff9809..000000000
--- a/node_modules/core-js/library/modules/es6.string.fontsize.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.8 String.prototype.fontsize(size)
-require('./_string-html')('fontsize', function(createHTML){
- return function fontsize(size){
- return createHTML(this, 'font', 'size', size);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.from-code-point.js b/node_modules/core-js/library/modules/es6.string.from-code-point.js
index c8776d871..b0bd166bf 100644
--- a/node_modules/core-js/library/modules/es6.string.from-code-point.js
+++ b/node_modules/core-js/library/modules/es6.string.from-code-point.js
@@ -1,5 +1,5 @@
-var $export = require('./_export')
- , toIndex = require('./_to-index')
+var $export = require('./$.export')
+ , toIndex = require('./$.to-index')
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
@@ -7,12 +7,13 @@ var $export = require('./_export')
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
- var res = []
- , aLen = arguments.length
- , i = 0
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
, code;
- while(aLen > i){
- code = +arguments[i++];
+ while($$len > i){
+ code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
diff --git a/node_modules/core-js/library/modules/es6.string.includes.js b/node_modules/core-js/library/modules/es6.string.includes.js
index c6b4ee2fa..e2ab8db7e 100644
--- a/node_modules/core-js/library/modules/es6.string.includes.js
+++ b/node_modules/core-js/library/modules/es6.string.includes.js
@@ -1,10 +1,10 @@
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
-var $export = require('./_export')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , context = require('./$.string-context')
, INCLUDES = 'includes';
-$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
diff --git a/node_modules/core-js/library/modules/es6.string.italics.js b/node_modules/core-js/library/modules/es6.string.italics.js
deleted file mode 100644
index d33efd3c4..000000000
--- a/node_modules/core-js/library/modules/es6.string.italics.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.9 String.prototype.italics()
-require('./_string-html')('italics', function(createHTML){
- return function italics(){
- return createHTML(this, 'i', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.iterator.js b/node_modules/core-js/library/modules/es6.string.iterator.js
index ac391ee4e..2f4c772c3 100644
--- a/node_modules/core-js/library/modules/es6.string.iterator.js
+++ b/node_modules/core-js/library/modules/es6.string.iterator.js
@@ -1,8 +1,8 @@
'use strict';
-var $at = require('./_string-at')(true);
+var $at = require('./$.string-at')(true);
// 21.1.3.27 String.prototype[@@iterator]()
-require('./_iter-define')(String, 'String', function(iterated){
+require('./$.iter-define')(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
diff --git a/node_modules/core-js/library/modules/es6.string.link.js b/node_modules/core-js/library/modules/es6.string.link.js
deleted file mode 100644
index 6a75c18a1..000000000
--- a/node_modules/core-js/library/modules/es6.string.link.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.10 String.prototype.link(url)
-require('./_string-html')('link', function(createHTML){
- return function link(url){
- return createHTML(this, 'a', 'href', url);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.raw.js b/node_modules/core-js/library/modules/es6.string.raw.js
index 1016acfa2..64279d23d 100644
--- a/node_modules/core-js/library/modules/es6.string.raw.js
+++ b/node_modules/core-js/library/modules/es6.string.raw.js
@@ -1,18 +1,19 @@
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , toLength = require('./_to-length');
+var $export = require('./$.export')
+ , toIObject = require('./$.to-iobject')
+ , toLength = require('./$.to-length');
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
- var tpl = toIObject(callSite.raw)
- , len = toLength(tpl.length)
- , aLen = arguments.length
- , res = []
- , i = 0;
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
while(len > i){
res.push(String(tpl[i++]));
- if(i < aLen)res.push(String(arguments[i]));
+ if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.repeat.js b/node_modules/core-js/library/modules/es6.string.repeat.js
index a054222d6..4ec29f66a 100644
--- a/node_modules/core-js/library/modules/es6.string.repeat.js
+++ b/node_modules/core-js/library/modules/es6.string.repeat.js
@@ -1,6 +1,6 @@
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
- repeat: require('./_string-repeat')
+ repeat: require('./$.string-repeat')
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.small.js b/node_modules/core-js/library/modules/es6.string.small.js
deleted file mode 100644
index 51b1b30d8..000000000
--- a/node_modules/core-js/library/modules/es6.string.small.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.11 String.prototype.small()
-require('./_string-html')('small', function(createHTML){
- return function small(){
- return createHTML(this, 'small', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.starts-with.js b/node_modules/core-js/library/modules/es6.string.starts-with.js
index 017805f01..21143072e 100644
--- a/node_modules/core-js/library/modules/es6.string.starts-with.js
+++ b/node_modules/core-js/library/modules/es6.string.starts-with.js
@@ -1,15 +1,16 @@
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
-var $export = require('./_export')
- , toLength = require('./_to-length')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , toLength = require('./$.to-length')
+ , context = require('./$.string-context')
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
-$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
diff --git a/node_modules/core-js/library/modules/es6.string.strike.js b/node_modules/core-js/library/modules/es6.string.strike.js
deleted file mode 100644
index c6287d3a5..000000000
--- a/node_modules/core-js/library/modules/es6.string.strike.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.12 String.prototype.strike()
-require('./_string-html')('strike', function(createHTML){
- return function strike(){
- return createHTML(this, 'strike', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.sub.js b/node_modules/core-js/library/modules/es6.string.sub.js
deleted file mode 100644
index ee18ea7ac..000000000
--- a/node_modules/core-js/library/modules/es6.string.sub.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.13 String.prototype.sub()
-require('./_string-html')('sub', function(createHTML){
- return function sub(){
- return createHTML(this, 'sub', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.sup.js b/node_modules/core-js/library/modules/es6.string.sup.js
deleted file mode 100644
index a34299881..000000000
--- a/node_modules/core-js/library/modules/es6.string.sup.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.14 String.prototype.sup()
-require('./_string-html')('sup', function(createHTML){
- return function sup(){
- return createHTML(this, 'sup', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.string.trim.js b/node_modules/core-js/library/modules/es6.string.trim.js
index 35f0fb0b8..52b75cac6 100644
--- a/node_modules/core-js/library/modules/es6.string.trim.js
+++ b/node_modules/core-js/library/modules/es6.string.trim.js
@@ -1,6 +1,6 @@
'use strict';
// 21.1.3.25 String.prototype.trim()
-require('./_string-trim')('trim', function($trim){
+require('./$.string-trim')('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
diff --git a/node_modules/core-js/library/modules/es6.symbol.js b/node_modules/core-js/library/modules/es6.symbol.js
index eae491c5a..42b7a3aaa 100644
--- a/node_modules/core-js/library/modules/es6.symbol.js
+++ b/node_modules/core-js/library/modules/es6.symbol.js
@@ -1,87 +1,77 @@
'use strict';
// ECMAScript 6 symbols shim
-var global = require('./_global')
- , has = require('./_has')
- , DESCRIPTORS = require('./_descriptors')
- , $export = require('./_export')
- , redefine = require('./_redefine')
- , META = require('./_meta').KEY
- , $fails = require('./_fails')
- , shared = require('./_shared')
- , setToStringTag = require('./_set-to-string-tag')
- , uid = require('./_uid')
- , wks = require('./_wks')
- , wksExt = require('./_wks-ext')
- , wksDefine = require('./_wks-define')
- , keyOf = require('./_keyof')
- , enumKeys = require('./_enum-keys')
- , isArray = require('./_is-array')
- , anObject = require('./_an-object')
- , toIObject = require('./_to-iobject')
- , toPrimitive = require('./_to-primitive')
- , createDesc = require('./_property-desc')
- , _create = require('./_object-create')
- , gOPNExt = require('./_object-gopn-ext')
- , $GOPD = require('./_object-gopd')
- , $DP = require('./_object-dp')
- , $keys = require('./_object-keys')
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
+var $ = require('./$')
+ , global = require('./$.global')
+ , has = require('./$.has')
+ , DESCRIPTORS = require('./$.descriptors')
+ , $export = require('./$.export')
+ , redefine = require('./$.redefine')
+ , $fails = require('./$.fails')
+ , shared = require('./$.shared')
+ , setToStringTag = require('./$.set-to-string-tag')
+ , uid = require('./$.uid')
+ , wks = require('./$.wks')
+ , keyOf = require('./$.keyof')
+ , $names = require('./$.get-names')
+ , enumKeys = require('./$.enum-keys')
+ , isArray = require('./$.is-array')
+ , anObject = require('./$.an-object')
+ , toIObject = require('./$.to-iobject')
+ , createDesc = require('./$.property-desc')
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
+ , setter = false
, HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
+ , isEnum = $.isEnum
, SymbolRegistry = shared('symbol-registry')
, AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
-// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
})).a != 7;
}) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
+ var protoDesc = getDesc(ObjectProto, key);
if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
-} : dP;
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+} : setDesc;
var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
return sym;
};
-var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
+var isSymbol = function(it){
return typeof it == 'symbol';
-} : function(it){
- return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
+ if(D && has(AllSymbols, key)){
if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
D = _create(D, {enumerable: createDesc(0, false)});
} return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
+ } return setDesc(it, key, D);
};
var $defineProperties = function defineProperties(it, P){
anObject(it);
@@ -96,80 +86,83 @@ var $create = function create(it, P){
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
+ var D = getDesc(it = toIObject(it), key);
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
+ var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
+ var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
};
+var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+};
+var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+});
// 19.4.1.1 Symbol([description])
-if(!USE_NATIVE){
+if(!useNative){
$Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
};
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
+ redefine($Symbol.prototype, 'toString', function toString(){
return this._k;
});
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
- require('./_object-pie').f = $propertyIsEnumerable;
- require('./_object-gops').f = $getOwnPropertySymbols;
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
- if(DESCRIPTORS && !require('./_library')){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
- wksExt.f = function(name){
- return wrap(wks(name));
+ if(DESCRIPTORS && !require('./$.library')){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
}
-$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
-for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
-).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
-for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
-$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
return has(SymbolRegistry, key += '')
@@ -178,14 +171,37 @@ $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
+ return keyOf(SymbolRegistry, key);
},
useSetter: function(){ setter = true; },
useSimple: function(){ setter = false; }
+};
+// 19.4.2.2 Symbol.hasInstance
+// 19.4.2.3 Symbol.isConcatSpreadable
+// 19.4.2.4 Symbol.iterator
+// 19.4.2.6 Symbol.match
+// 19.4.2.8 Symbol.replace
+// 19.4.2.9 Symbol.search
+// 19.4.2.10 Symbol.species
+// 19.4.2.11 Symbol.split
+// 19.4.2.12 Symbol.toPrimitive
+// 19.4.2.13 Symbol.toStringTag
+// 19.4.2.14 Symbol.unscopables
+$.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
});
-$export($export.S + $export.F * !USE_NATIVE, 'Object', {
+setter = true;
+
+$export($export.G + $export.W, {Symbol: $Symbol});
+
+$export($export.S, 'Symbol', symbolStatics);
+
+$export($export.S + $export.F * !useNative, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
@@ -201,32 +217,8 @@ $export($export.S + $export.F * !USE_NATIVE, 'Object', {
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
-$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
-})), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
-});
+$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
-// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
-$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
diff --git a/node_modules/core-js/library/modules/es6.typed.array-buffer.js b/node_modules/core-js/library/modules/es6.typed.array-buffer.js
index 9f47082c2..a8209bd2d 100644
--- a/node_modules/core-js/library/modules/es6.typed.array-buffer.js
+++ b/node_modules/core-js/library/modules/es6.typed.array-buffer.js
@@ -1,46 +1,43 @@
'use strict';
-var $export = require('./_export')
- , $typed = require('./_typed')
- , buffer = require('./_typed-buffer')
- , anObject = require('./_an-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length')
- , isObject = require('./_is-object')
- , ArrayBuffer = require('./_global').ArrayBuffer
- , speciesConstructor = require('./_species-constructor')
- , $ArrayBuffer = buffer.ArrayBuffer
- , $DataView = buffer.DataView
- , $isView = $typed.ABV && ArrayBuffer.isView
- , $slice = $ArrayBuffer.prototype.slice
- , VIEW = $typed.VIEW
- , ARRAY_BUFFER = 'ArrayBuffer';
+if(require('./$.descriptors')){
+ var $export = require('./$.export')
+ , $typed = require('./$.typed')
+ , buffer = require('./$.buffer')
+ , toIndex = require('./$.to-index')
+ , toLength = require('./$.to-length')
+ , isObject = require('./$.is-object')
+ , TYPED_ARRAY = require('./$.wks')('typed_array')
+ , $ArrayBuffer = buffer.ArrayBuffer
+ , $DataView = buffer.DataView
+ , $slice = $ArrayBuffer && $ArrayBuffer.prototype.slice
+ , VIEW = $typed.VIEW
+ , ARRAY_BUFFER = 'ArrayBuffer';
-$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
+ $export($export.G + $export.W + $export.F * !$typed.ABV, {ArrayBuffer: $ArrayBuffer});
-$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it){
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
-});
+ $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
+ // 24.1.3.1 ArrayBuffer.isView(arg)
+ isView: function isView(it){ // not cross-realm
+ return isObject(it) && VIEW in it;
+ }
+ });
-$export($export.P + $export.U + $export.F * require('./_fails')(function(){
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
-}), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end){
- if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength
- , first = toIndex(start, len)
- , final = toIndex(end === undefined ? len : end, len)
- , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
- , viewS = new $DataView(this)
- , viewT = new $DataView(result)
- , index = 0;
- while(first < final){
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
-});
-
-require('./_set-species')(ARRAY_BUFFER); \ No newline at end of file
+ $export($export.P + $export.F * require('./$.fails')(function(){
+ return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
+ }), ARRAY_BUFFER, {
+ // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
+ slice: function slice(start, end){
+ if($slice !== undefined && end === undefined)return $slice.call(this, start); // FF fix
+ var len = this.byteLength
+ , first = toIndex(start, len)
+ , final = toIndex(end === undefined ? len : end, len)
+ , result = new $ArrayBuffer(toLength(final - first))
+ , viewS = new $DataView(this)
+ , viewT = new $DataView(result)
+ , index = 0;
+ while(first < final){
+ viewT.setUint8(index++, viewS.getUint8(first++));
+ } return result;
+ }
+ });
+} \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.typed.data-view.js b/node_modules/core-js/library/modules/es6.typed.data-view.js
index ee7b88127..44e035320 100644
--- a/node_modules/core-js/library/modules/es6.typed.data-view.js
+++ b/node_modules/core-js/library/modules/es6.typed.data-view.js
@@ -1,4 +1,4 @@
-var $export = require('./_export');
-$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
- DataView: require('./_typed-buffer').DataView
-}); \ No newline at end of file
+if(require('./$.descriptors')){
+ var $export = require('./$.export');
+ $export($export.G + $export.W + $export.F * !require('./$.typed').ABV, {DataView: require('./$.buffer').DataView});
+} \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es6.typed.float32-array.js b/node_modules/core-js/library/modules/es6.typed.float32-array.js
index 2c4c9a699..95d78a6d4 100644
--- a/node_modules/core-js/library/modules/es6.typed.float32-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.float32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Float32', 4, function(init){
+require('./$.typed-array')('Float32', 4, function(init){
return function Float32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.float64-array.js b/node_modules/core-js/library/modules/es6.typed.float64-array.js
index 4b20257f7..16fadec9a 100644
--- a/node_modules/core-js/library/modules/es6.typed.float64-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.float64-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Float64', 8, function(init){
+require('./$.typed-array')('Float64', 8, function(init){
return function Float64Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.int16-array.js b/node_modules/core-js/library/modules/es6.typed.int16-array.js
index d3f61c564..a3d04cb63 100644
--- a/node_modules/core-js/library/modules/es6.typed.int16-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.int16-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int16', 2, function(init){
+require('./$.typed-array')('Int16', 2, function(init){
return function Int16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.int32-array.js b/node_modules/core-js/library/modules/es6.typed.int32-array.js
index df47c1bb0..1923463ac 100644
--- a/node_modules/core-js/library/modules/es6.typed.int32-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.int32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int32', 4, function(init){
+require('./$.typed-array')('Int32', 4, function(init){
return function Int32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.int8-array.js b/node_modules/core-js/library/modules/es6.typed.int8-array.js
index da4dbf0a2..e9182c4cc 100644
--- a/node_modules/core-js/library/modules/es6.typed.int8-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.int8-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int8', 1, function(init){
+require('./$.typed-array')('Int8', 1, function(init){
return function Int8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.uint16-array.js b/node_modules/core-js/library/modules/es6.typed.uint16-array.js
index cb335773d..ec6e83477 100644
--- a/node_modules/core-js/library/modules/es6.typed.uint16-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.uint16-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint16', 2, function(init){
+require('./$.typed-array')('Uint16', 2, function(init){
return function Uint16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.uint32-array.js b/node_modules/core-js/library/modules/es6.typed.uint32-array.js
index 41c9e7b80..ddfc22d88 100644
--- a/node_modules/core-js/library/modules/es6.typed.uint32-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.uint32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint32', 4, function(init){
+require('./$.typed-array')('Uint32', 4, function(init){
return function Uint32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-array.js
index f794f86cf..7ab1e4df7 100644
--- a/node_modules/core-js/library/modules/es6.typed.uint8-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.uint8-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint8', 1, function(init){
+require('./$.typed-array')('Uint8', 1, function(init){
return function Uint8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js
index b12304799..f85f9d5d7 100644
--- a/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js
+++ b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint8', 1, function(init){
+require('./$.typed-array')('Uint8', 1, function(init){
return function Uint8ClampedArray(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/library/modules/es6.weak-map.js b/node_modules/core-js/library/modules/es6.weak-map.js
index 4109db336..72a9b3244 100644
--- a/node_modules/core-js/library/modules/es6.weak-map.js
+++ b/node_modules/core-js/library/modules/es6.weak-map.js
@@ -1,53 +1,40 @@
'use strict';
-var each = require('./_array-methods')(0)
- , redefine = require('./_redefine')
- , meta = require('./_meta')
- , assign = require('./_object-assign')
- , weak = require('./_collection-weak')
- , isObject = require('./_is-object')
- , getWeak = meta.getWeak
- , isExtensible = Object.isExtensible
- , uncaughtFrozenStore = weak.ufstore
- , tmp = {}
- , InternalMap;
+var $ = require('./$')
+ , redefine = require('./$.redefine')
+ , weak = require('./$.collection-weak')
+ , isObject = require('./$.is-object')
+ , has = require('./$.has')
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
-var wrapper = function(get){
- return function WeakMap(){
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
-};
-
-var methods = {
+// 23.3 WeakMap Objects
+var $WeakMap = require('./$.collection')('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).get(key);
- return data ? data[this._i] : undefined;
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
-};
-
-// 23.3 WeakMap Objects
-var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true);
+}, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
- InternalMap = weak.getConstructor(wrapper);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function(key){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
- // store frozen objects on internal weakmap shim
+ // store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
- if(!this._f)this._f = new InternalMap;
- var result = this._f[key](a, b);
+ var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
diff --git a/node_modules/core-js/library/modules/es6.weak-set.js b/node_modules/core-js/library/modules/es6.weak-set.js
index 77d01b6ba..efdf1d76f 100644
--- a/node_modules/core-js/library/modules/es6.weak-set.js
+++ b/node_modules/core-js/library/modules/es6.weak-set.js
@@ -1,8 +1,8 @@
'use strict';
-var weak = require('./_collection-weak');
+var weak = require('./$.collection-weak');
// 23.4 WeakSet Objects
-require('./_collection')('WeakSet', function(get){
+require('./$.collection')('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
diff --git a/node_modules/core-js/library/modules/es7.array.includes.js b/node_modules/core-js/library/modules/es7.array.includes.js
index 6d5b00905..dcfad704d 100644
--- a/node_modules/core-js/library/modules/es7.array.includes.js
+++ b/node_modules/core-js/library/modules/es7.array.includes.js
@@ -1,12 +1,12 @@
'use strict';
-// https://github.com/tc39/Array.prototype.includes
-var $export = require('./_export')
- , $includes = require('./_array-includes')(true);
+var $export = require('./$.export')
+ , $includes = require('./$.array-includes')(true);
$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')('includes'); \ No newline at end of file
+require('./$.add-to-unscopables')('includes'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.asap.js b/node_modules/core-js/library/modules/es7.asap.js
deleted file mode 100644
index b762b49ab..000000000
--- a/node_modules/core-js/library/modules/es7.asap.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
-var $export = require('./_export')
- , microtask = require('./_microtask')()
- , process = require('./_global').process
- , isNode = require('./_cof')(process) == 'process';
-
-$export($export.G, {
- asap: function asap(fn){
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.error.is-error.js b/node_modules/core-js/library/modules/es7.error.is-error.js
deleted file mode 100644
index d6fe29dc6..000000000
--- a/node_modules/core-js/library/modules/es7.error.is-error.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// https://github.com/ljharb/proposal-is-error
-var $export = require('./_export')
- , cof = require('./_cof');
-
-$export($export.S, 'Error', {
- isError: function isError(it){
- return cof(it) === 'Error';
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.map.to-json.js b/node_modules/core-js/library/modules/es7.map.to-json.js
index 19f9b6d38..809370564 100644
--- a/node_modules/core-js/library/modules/es7.map.to-json.js
+++ b/node_modules/core-js/library/modules/es7.map.to-json.js
@@ -1,4 +1,4 @@
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')}); \ No newline at end of file
+$export($export.P, 'Map', {toJSON: require('./$.collection-to-json')('Map')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.math.iaddh.js b/node_modules/core-js/library/modules/es7.math.iaddh.js
deleted file mode 100644
index bb3f3d38d..000000000
--- a/node_modules/core-js/library/modules/es7.math.iaddh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.math.imulh.js b/node_modules/core-js/library/modules/es7.math.imulh.js
deleted file mode 100644
index a25da686a..000000000
--- a/node_modules/core-js/library/modules/es7.math.imulh.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- imulh: function imulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >> 16
- , v1 = $v >> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.math.isubh.js b/node_modules/core-js/library/modules/es7.math.isubh.js
deleted file mode 100644
index 3814dc29c..000000000
--- a/node_modules/core-js/library/modules/es7.math.isubh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.math.umulh.js b/node_modules/core-js/library/modules/es7.math.umulh.js
deleted file mode 100644
index 0d22cf1ba..000000000
--- a/node_modules/core-js/library/modules/es7.math.umulh.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- umulh: function umulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >>> 16
- , v1 = $v >>> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.define-getter.js b/node_modules/core-js/library/modules/es7.object.define-getter.js
deleted file mode 100644
index f206e96a2..000000000
--- a/node_modules/core-js/library/modules/es7.object.define-getter.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , aFunction = require('./_a-function')
- , $defineProperty = require('./_object-dp');
-
-// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter){
- $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.define-setter.js b/node_modules/core-js/library/modules/es7.object.define-setter.js
deleted file mode 100644
index c0f7b7000..000000000
--- a/node_modules/core-js/library/modules/es7.object.define-setter.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , aFunction = require('./_a-function')
- , $defineProperty = require('./_object-dp');
-
-// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter){
- $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.entries.js b/node_modules/core-js/library/modules/es7.object.entries.js
index cfc049dfa..fec1bc36c 100644
--- a/node_modules/core-js/library/modules/es7.object.entries.js
+++ b/node_modules/core-js/library/modules/es7.object.entries.js
@@ -1,6 +1,6 @@
-// https://github.com/tc39/proposal-object-values-entries
-var $export = require('./_export')
- , $entries = require('./_object-to-array')(true);
+// http://goo.gl/XkBrjD
+var $export = require('./$.export')
+ , $entries = require('./$.object-to-array')(true);
$export($export.S, 'Object', {
entries: function entries(it){
diff --git a/node_modules/core-js/library/modules/es7.object.enumerable-entries.js b/node_modules/core-js/library/modules/es7.object.enumerable-entries.js
deleted file mode 100644
index 5daa803b1..000000000
--- a/node_modules/core-js/library/modules/es7.object.enumerable-entries.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableEntries: function enumerableEntries(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push([key, T[key]]);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.enumerable-keys.js b/node_modules/core-js/library/modules/es7.object.enumerable-keys.js
deleted file mode 100644
index 791ec1849..000000000
--- a/node_modules/core-js/library/modules/es7.object.enumerable-keys.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableKeys: function enumerableKeys(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push(key);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.enumerable-values.js b/node_modules/core-js/library/modules/es7.object.enumerable-values.js
deleted file mode 100644
index 1d1bfaa72..000000000
--- a/node_modules/core-js/library/modules/es7.object.enumerable-values.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableValues: function enumerableValues(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push(T[key]);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js
index 0242b7a0c..e4d80a34e 100644
--- a/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js
+++ b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js
@@ -1,19 +1,23 @@
-// https://github.com/tc39/proposal-object-getownpropertydescriptors
-var $export = require('./_export')
- , ownKeys = require('./_own-keys')
- , toIObject = require('./_to-iobject')
- , gOPD = require('./_object-gopd')
- , createProperty = require('./_create-property');
+// https://gist.github.com/WebReflection/9353781
+var $ = require('./$')
+ , $export = require('./$.export')
+ , ownKeys = require('./$.own-keys')
+ , toIObject = require('./$.to-iobject')
+ , createDesc = require('./$.property-desc');
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
- , getDesc = gOPD.f
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
- while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
- return result;
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.lookup-getter.js b/node_modules/core-js/library/modules/es7.object.lookup-getter.js
deleted file mode 100644
index ec140345d..000000000
--- a/node_modules/core-js/library/modules/es7.object.lookup-getter.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive')
- , getPrototypeOf = require('./_object-gpo')
- , getOwnPropertyDescriptor = require('./_object-gopd').f;
-
-// B.2.2.4 Object.prototype.__lookupGetter__(P)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __lookupGetter__: function __lookupGetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.get;
- } while(O = getPrototypeOf(O));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.lookup-setter.js b/node_modules/core-js/library/modules/es7.object.lookup-setter.js
deleted file mode 100644
index 539dda824..000000000
--- a/node_modules/core-js/library/modules/es7.object.lookup-setter.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive')
- , getPrototypeOf = require('./_object-gpo')
- , getOwnPropertyDescriptor = require('./_object-gopd').f;
-
-// B.2.2.5 Object.prototype.__lookupSetter__(P)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __lookupSetter__: function __lookupSetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.set;
- } while(O = getPrototypeOf(O));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.object.values.js b/node_modules/core-js/library/modules/es7.object.values.js
index 42abd640b..697e93545 100644
--- a/node_modules/core-js/library/modules/es7.object.values.js
+++ b/node_modules/core-js/library/modules/es7.object.values.js
@@ -1,6 +1,6 @@
-// https://github.com/tc39/proposal-object-values-entries
-var $export = require('./_export')
- , $values = require('./_object-to-array')(false);
+// http://goo.gl/XkBrjD
+var $export = require('./$.export')
+ , $values = require('./$.object-to-array')(false);
$export($export.S, 'Object', {
values: function values(it){
diff --git a/node_modules/core-js/library/modules/es7.observable.js b/node_modules/core-js/library/modules/es7.observable.js
deleted file mode 100644
index e34fa4f28..000000000
--- a/node_modules/core-js/library/modules/es7.observable.js
+++ /dev/null
@@ -1,199 +0,0 @@
-'use strict';
-// https://github.com/zenparsing/es-observable
-var $export = require('./_export')
- , global = require('./_global')
- , core = require('./_core')
- , microtask = require('./_microtask')()
- , OBSERVABLE = require('./_wks')('observable')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , anInstance = require('./_an-instance')
- , redefineAll = require('./_redefine-all')
- , hide = require('./_hide')
- , forOf = require('./_for-of')
- , RETURN = forOf.RETURN;
-
-var getMethod = function(fn){
- return fn == null ? undefined : aFunction(fn);
-};
-
-var cleanupSubscription = function(subscription){
- var cleanup = subscription._c;
- if(cleanup){
- subscription._c = undefined;
- cleanup();
- }
-};
-
-var subscriptionClosed = function(subscription){
- return subscription._o === undefined;
-};
-
-var closeSubscription = function(subscription){
- if(!subscriptionClosed(subscription)){
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
-};
-
-var Subscription = function(observer, subscriber){
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer)
- , subscription = cleanup;
- if(cleanup != null){
- if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch(e){
- observer.error(e);
- return;
- } if(subscriptionClosed(this))cleanupSubscription(this);
-};
-
-Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe(){ closeSubscription(this); }
-});
-
-var SubscriptionObserver = function(subscription){
- this._s = subscription;
-};
-
-SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if(m)return m.call(observer, value);
- } catch(e){
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value){
- var subscription = this._s;
- if(subscriptionClosed(subscription))throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if(!m)throw value;
- value = m.call(observer, value);
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
-});
-
-var $Observable = function Observable(subscriber){
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
-};
-
-redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer){
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn){
- var that = this;
- return new (core.Promise || global.Promise)(function(resolve, reject){
- aFunction(fn);
- var subscription = that.subscribe({
- next : function(value){
- try {
- return fn(value);
- } catch(e){
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
-});
-
-redefineAll($Observable, {
- from: function from(x){
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if(method){
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function(observer){
- return observable.subscribe(observer);
- });
- }
- return new C(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- try {
- if(forOf(x, false, function(it){
- observer.next(it);
- if(done)return RETURN;
- }) === RETURN)return;
- } catch(e){
- if(done)throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- },
- of: function of(){
- for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- for(var i = 0; i < items.length; ++i){
- observer.next(items[i]);
- if(done)return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- }
-});
-
-hide($Observable.prototype, OBSERVABLE, function(){ return this; });
-
-$export($export.G, {Observable: $Observable});
-
-require('./_set-species')('Observable'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.define-metadata.js b/node_modules/core-js/library/modules/es7.reflect.define-metadata.js
deleted file mode 100644
index c833e4317..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.define-metadata.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
-metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
deleted file mode 100644
index 8a8a8253b..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , toMetaKey = metadata.key
- , getOrCreateMetadataMap = metadata.map
- , store = metadata.store;
-
-metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
- , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
- if(metadataMap.size)return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js
deleted file mode 100644
index 58c4dcc23..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var Set = require('./es6.set')
- , from = require('./_array-from-iterable')
- , metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
-var ordinaryMetadataKeys = function(O, P){
- var oKeys = ordinaryOwnMetadataKeys(O, P)
- , parent = getPrototypeOf(O);
- if(parent === null)return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
-};
-
-metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata.js
deleted file mode 100644
index 48cd9d674..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.get-metadata.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryHasOwnMetadata = metadata.has
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
-var ordinaryGetMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
-};
-
-metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js
deleted file mode 100644
index 93ecfbe5a..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
-metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js
deleted file mode 100644
index f1040f919..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
-metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.has-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-metadata.js
deleted file mode 100644
index 0ff637865..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.has-metadata.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
-var ordinaryHasMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
-};
-
-metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js
deleted file mode 100644
index d645ea3fa..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
-metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.reflect.metadata.js b/node_modules/core-js/library/modules/es7.reflect.metadata.js
deleted file mode 100644
index 3a4e3aee0..000000000
--- a/node_modules/core-js/library/modules/es7.reflect.metadata.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , aFunction = require('./_a-function')
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
-metadata.exp({metadata: function metadata(metadataKey, metadataValue){
- return function decorator(target, targetKey){
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.set.to-json.js b/node_modules/core-js/library/modules/es7.set.to-json.js
index fd68cb510..e632f2a37 100644
--- a/node_modules/core-js/library/modules/es7.set.to-json.js
+++ b/node_modules/core-js/library/modules/es7.set.to-json.js
@@ -1,4 +1,4 @@
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')}); \ No newline at end of file
+$export($export.P, 'Set', {toJSON: require('./$.collection-to-json')('Set')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.string.at.js b/node_modules/core-js/library/modules/es7.string.at.js
index 208654e6c..fee583bf6 100644
--- a/node_modules/core-js/library/modules/es7.string.at.js
+++ b/node_modules/core-js/library/modules/es7.string.at.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
-var $export = require('./_export')
- , $at = require('./_string-at')(true);
+var $export = require('./$.export')
+ , $at = require('./$.string-at')(true);
$export($export.P, 'String', {
at: function at(pos){
diff --git a/node_modules/core-js/library/modules/es7.string.match-all.js b/node_modules/core-js/library/modules/es7.string.match-all.js
deleted file mode 100644
index cb0099b36..000000000
--- a/node_modules/core-js/library/modules/es7.string.match-all.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-// https://tc39.github.io/String.prototype.matchAll/
-var $export = require('./_export')
- , defined = require('./_defined')
- , toLength = require('./_to-length')
- , isRegExp = require('./_is-regexp')
- , getFlags = require('./_flags')
- , RegExpProto = RegExp.prototype;
-
-var $RegExpStringIterator = function(regexp, string){
- this._r = regexp;
- this._s = string;
-};
-
-require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){
- var match = this._r.exec(this._s);
- return {value: match, done: match === null};
-});
-
-$export($export.P, 'String', {
- matchAll: function matchAll(regexp){
- defined(this);
- if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
- var S = String(this)
- , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
- , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.string.pad-end.js b/node_modules/core-js/library/modules/es7.string.pad-end.js
deleted file mode 100644
index 8483d82f4..000000000
--- a/node_modules/core-js/library/modules/es7.string.pad-end.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = require('./_export')
- , $pad = require('./_string-pad');
-
-$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /*, fillString = ' ' */){
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.string.pad-start.js b/node_modules/core-js/library/modules/es7.string.pad-start.js
deleted file mode 100644
index b79b605d2..000000000
--- a/node_modules/core-js/library/modules/es7.string.pad-start.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = require('./_export')
- , $pad = require('./_string-pad');
-
-$export($export.P, 'String', {
- padStart: function padStart(maxLength /*, fillString = ' ' */){
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.string.trim-left.js b/node_modules/core-js/library/modules/es7.string.trim-left.js
index e58457714..dbaf63080 100644
--- a/node_modules/core-js/library/modules/es7.string.trim-left.js
+++ b/node_modules/core-js/library/modules/es7.string.trim-left.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-require('./_string-trim')('trimLeft', function($trim){
+require('./$.string-trim')('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
-}, 'trimStart'); \ No newline at end of file
+}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.string.trim-right.js b/node_modules/core-js/library/modules/es7.string.trim-right.js
index 42a9ed33b..6b02d394a 100644
--- a/node_modules/core-js/library/modules/es7.string.trim-right.js
+++ b/node_modules/core-js/library/modules/es7.string.trim-right.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-require('./_string-trim')('trimRight', function($trim){
+require('./$.string-trim')('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
-}, 'trimEnd'); \ No newline at end of file
+}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.symbol.async-iterator.js b/node_modules/core-js/library/modules/es7.symbol.async-iterator.js
deleted file mode 100644
index cf9f74a50..000000000
--- a/node_modules/core-js/library/modules/es7.symbol.async-iterator.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./_wks-define')('asyncIterator'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.symbol.observable.js b/node_modules/core-js/library/modules/es7.symbol.observable.js
deleted file mode 100644
index 0163bca52..000000000
--- a/node_modules/core-js/library/modules/es7.symbol.observable.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./_wks-define')('observable'); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/es7.system.global.js b/node_modules/core-js/library/modules/es7.system.global.js
deleted file mode 100644
index 8c2ab82de..000000000
--- a/node_modules/core-js/library/modules/es7.system.global.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// https://github.com/ljharb/proposal-global
-var $export = require('./_export');
-
-$export($export.S, 'System', {global: require('./_global')}); \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/web.dom.iterable.js b/node_modules/core-js/library/modules/web.dom.iterable.js
index e56371a9d..988c6da20 100644
--- a/node_modules/core-js/library/modules/web.dom.iterable.js
+++ b/node_modules/core-js/library/modules/web.dom.iterable.js
@@ -1,13 +1,3 @@
require('./es6.array.iterator');
-var global = require('./_global')
- , hide = require('./_hide')
- , Iterators = require('./_iterators')
- , TO_STRING_TAG = require('./_wks')('toStringTag');
-
-for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype;
- if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = Iterators.Array;
-} \ No newline at end of file
+var Iterators = require('./$.iterators');
+Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; \ No newline at end of file
diff --git a/node_modules/core-js/library/modules/web.immediate.js b/node_modules/core-js/library/modules/web.immediate.js
index 5b9463775..fa64f08ec 100644
--- a/node_modules/core-js/library/modules/web.immediate.js
+++ b/node_modules/core-js/library/modules/web.immediate.js
@@ -1,5 +1,5 @@
-var $export = require('./_export')
- , $task = require('./_task');
+var $export = require('./$.export')
+ , $task = require('./$.task');
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
diff --git a/node_modules/core-js/library/modules/web.timers.js b/node_modules/core-js/library/modules/web.timers.js
index 1a1da57f2..74b72019c 100644
--- a/node_modules/core-js/library/modules/web.timers.js
+++ b/node_modules/core-js/library/modules/web.timers.js
@@ -1,8 +1,8 @@
// ie9- setTimeout & setInterval additional parameters fix
-var global = require('./_global')
- , $export = require('./_export')
- , invoke = require('./_invoke')
- , partial = require('./_partial')
+var global = require('./$.global')
+ , $export = require('./$.export')
+ , invoke = require('./$.invoke')
+ , partial = require('./$.partial')
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
diff --git a/node_modules/core-js/library/shim.js b/node_modules/core-js/library/shim.js
index 6db125683..6d38d2e27 100644
--- a/node_modules/core-js/library/shim.js
+++ b/node_modules/core-js/library/shim.js
@@ -1,29 +1,22 @@
+require('./modules/es5');
require('./modules/es6.symbol');
-require('./modules/es6.object.create');
-require('./modules/es6.object.define-property');
-require('./modules/es6.object.define-properties');
-require('./modules/es6.object.get-own-property-descriptor');
-require('./modules/es6.object.get-prototype-of');
-require('./modules/es6.object.keys');
-require('./modules/es6.object.get-own-property-names');
+require('./modules/es6.object.assign');
+require('./modules/es6.object.is');
+require('./modules/es6.object.set-prototype-of');
+require('./modules/es6.object.to-string');
require('./modules/es6.object.freeze');
require('./modules/es6.object.seal');
require('./modules/es6.object.prevent-extensions');
require('./modules/es6.object.is-frozen');
require('./modules/es6.object.is-sealed');
require('./modules/es6.object.is-extensible');
-require('./modules/es6.object.assign');
-require('./modules/es6.object.is');
-require('./modules/es6.object.set-prototype-of');
-require('./modules/es6.object.to-string');
-require('./modules/es6.function.bind');
+require('./modules/es6.object.get-own-property-descriptor');
+require('./modules/es6.object.get-prototype-of');
+require('./modules/es6.object.keys');
+require('./modules/es6.object.get-own-property-names');
require('./modules/es6.function.name');
require('./modules/es6.function.has-instance');
-require('./modules/es6.parse-int');
-require('./modules/es6.parse-float');
require('./modules/es6.number.constructor');
-require('./modules/es6.number.to-fixed');
-require('./modules/es6.number.to-precision');
require('./modules/es6.number.epsilon');
require('./modules/es6.number.is-finite');
require('./modules/es6.number.is-integer');
@@ -59,47 +52,15 @@ require('./modules/es6.string.ends-with');
require('./modules/es6.string.includes');
require('./modules/es6.string.repeat');
require('./modules/es6.string.starts-with');
-require('./modules/es6.string.anchor');
-require('./modules/es6.string.big');
-require('./modules/es6.string.blink');
-require('./modules/es6.string.bold');
-require('./modules/es6.string.fixed');
-require('./modules/es6.string.fontcolor');
-require('./modules/es6.string.fontsize');
-require('./modules/es6.string.italics');
-require('./modules/es6.string.link');
-require('./modules/es6.string.small');
-require('./modules/es6.string.strike');
-require('./modules/es6.string.sub');
-require('./modules/es6.string.sup');
-require('./modules/es6.date.now');
-require('./modules/es6.date.to-json');
-require('./modules/es6.date.to-iso-string');
-require('./modules/es6.date.to-string');
-require('./modules/es6.date.to-primitive');
-require('./modules/es6.array.is-array');
require('./modules/es6.array.from');
require('./modules/es6.array.of');
-require('./modules/es6.array.join');
-require('./modules/es6.array.slice');
-require('./modules/es6.array.sort');
-require('./modules/es6.array.for-each');
-require('./modules/es6.array.map');
-require('./modules/es6.array.filter');
-require('./modules/es6.array.some');
-require('./modules/es6.array.every');
-require('./modules/es6.array.reduce');
-require('./modules/es6.array.reduce-right');
-require('./modules/es6.array.index-of');
-require('./modules/es6.array.last-index-of');
+require('./modules/es6.array.iterator');
+require('./modules/es6.array.species');
require('./modules/es6.array.copy-within');
require('./modules/es6.array.fill');
require('./modules/es6.array.find');
require('./modules/es6.array.find-index');
-require('./modules/es6.array.species');
-require('./modules/es6.array.iterator');
require('./modules/es6.regexp.constructor');
-require('./modules/es6.regexp.to-string');
require('./modules/es6.regexp.flags');
require('./modules/es6.regexp.match');
require('./modules/es6.regexp.replace');
@@ -110,17 +71,6 @@ require('./modules/es6.map');
require('./modules/es6.set');
require('./modules/es6.weak-map');
require('./modules/es6.weak-set');
-require('./modules/es6.typed.array-buffer');
-require('./modules/es6.typed.data-view');
-require('./modules/es6.typed.int8-array');
-require('./modules/es6.typed.uint8-array');
-require('./modules/es6.typed.uint8-clamped-array');
-require('./modules/es6.typed.int16-array');
-require('./modules/es6.typed.uint16-array');
-require('./modules/es6.typed.int32-array');
-require('./modules/es6.typed.uint32-array');
-require('./modules/es6.typed.float32-array');
-require('./modules/es6.typed.float64-array');
require('./modules/es6.reflect.apply');
require('./modules/es6.reflect.construct');
require('./modules/es6.reflect.define-property');
@@ -137,40 +87,18 @@ require('./modules/es6.reflect.set');
require('./modules/es6.reflect.set-prototype-of');
require('./modules/es7.array.includes');
require('./modules/es7.string.at');
-require('./modules/es7.string.pad-start');
-require('./modules/es7.string.pad-end');
+require('./modules/es7.string.pad-left');
+require('./modules/es7.string.pad-right');
require('./modules/es7.string.trim-left');
require('./modules/es7.string.trim-right');
-require('./modules/es7.string.match-all');
-require('./modules/es7.symbol.async-iterator');
-require('./modules/es7.symbol.observable');
+require('./modules/es7.regexp.escape');
require('./modules/es7.object.get-own-property-descriptors');
require('./modules/es7.object.values');
require('./modules/es7.object.entries');
-require('./modules/es7.object.define-getter');
-require('./modules/es7.object.define-setter');
-require('./modules/es7.object.lookup-getter');
-require('./modules/es7.object.lookup-setter');
require('./modules/es7.map.to-json');
require('./modules/es7.set.to-json');
-require('./modules/es7.system.global');
-require('./modules/es7.error.is-error');
-require('./modules/es7.math.iaddh');
-require('./modules/es7.math.isubh');
-require('./modules/es7.math.imulh');
-require('./modules/es7.math.umulh');
-require('./modules/es7.reflect.define-metadata');
-require('./modules/es7.reflect.delete-metadata');
-require('./modules/es7.reflect.get-metadata');
-require('./modules/es7.reflect.get-metadata-keys');
-require('./modules/es7.reflect.get-own-metadata');
-require('./modules/es7.reflect.get-own-metadata-keys');
-require('./modules/es7.reflect.has-metadata');
-require('./modules/es7.reflect.has-own-metadata');
-require('./modules/es7.reflect.metadata');
-require('./modules/es7.asap');
-require('./modules/es7.observable');
+require('./modules/js.array.statics');
require('./modules/web.timers');
require('./modules/web.immediate');
require('./modules/web.dom.iterable');
-module.exports = require('./modules/_core'); \ No newline at end of file
+module.exports = require('./modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/stage/0.js b/node_modules/core-js/library/stage/0.js
deleted file mode 100644
index e89a005f0..000000000
--- a/node_modules/core-js/library/stage/0.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.string.at');
-require('../modules/es7.map.to-json');
-require('../modules/es7.set.to-json');
-require('../modules/es7.error.is-error');
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-require('../modules/es7.asap');
-module.exports = require('./1'); \ No newline at end of file
diff --git a/node_modules/core-js/library/stage/1.js b/node_modules/core-js/library/stage/1.js
deleted file mode 100644
index 230fe13ad..000000000
--- a/node_modules/core-js/library/stage/1.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../modules/es7.string.trim-left');
-require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('./2');
diff --git a/node_modules/core-js/library/stage/2.js b/node_modules/core-js/library/stage/2.js
deleted file mode 100644
index ba444e1a7..000000000
--- a/node_modules/core-js/library/stage/2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../modules/es7.system.global');
-require('../modules/es7.symbol.async-iterator');
-module.exports = require('./3');
diff --git a/node_modules/core-js/library/stage/3.js b/node_modules/core-js/library/stage/3.js
deleted file mode 100644
index c1ea400a9..000000000
--- a/node_modules/core-js/library/stage/3.js
+++ /dev/null
@@ -1,4 +0,0 @@
-require('../modules/es7.object.get-own-property-descriptors');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
-module.exports = require('./4');
diff --git a/node_modules/core-js/library/stage/4.js b/node_modules/core-js/library/stage/4.js
deleted file mode 100644
index 0fb53ddd8..000000000
--- a/node_modules/core-js/library/stage/4.js
+++ /dev/null
@@ -1,8 +0,0 @@
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
-require('../modules/es7.object.values');
-require('../modules/es7.object.entries');
-require('../modules/es7.array.includes');
-module.exports = require('../modules/_core');
diff --git a/node_modules/core-js/library/stage/index.js b/node_modules/core-js/library/stage/index.js
deleted file mode 100644
index eb959140c..000000000
--- a/node_modules/core-js/library/stage/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./pre'); \ No newline at end of file
diff --git a/node_modules/core-js/library/stage/pre.js b/node_modules/core-js/library/stage/pre.js
deleted file mode 100644
index f3bc54d95..000000000
--- a/node_modules/core-js/library/stage/pre.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-module.exports = require('./0'); \ No newline at end of file
diff --git a/node_modules/core-js/library/web/dom-collections.js b/node_modules/core-js/library/web/dom-collections.js
deleted file mode 100644
index 2118e3fe6..000000000
--- a/node_modules/core-js/library/web/dom-collections.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/web.dom.iterable');
-module.exports = require('../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/web/immediate.js b/node_modules/core-js/library/web/immediate.js
index 244ebb16f..e4e5493bf 100644
--- a/node_modules/core-js/library/web/immediate.js
+++ b/node_modules/core-js/library/web/immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/web/index.js b/node_modules/core-js/library/web/index.js
index 6687d571e..6c3221e24 100644
--- a/node_modules/core-js/library/web/index.js
+++ b/node_modules/core-js/library/web/index.js
@@ -1,4 +1,4 @@
require('../modules/web.timers');
require('../modules/web.immediate');
require('../modules/web.dom.iterable');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/library/web/timers.js b/node_modules/core-js/library/web/timers.js
index 2c66f4387..763ea44e9 100644
--- a/node_modules/core-js/library/web/timers.js
+++ b/node_modules/core-js/library/web/timers.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_a-function.js b/node_modules/core-js/modules/_a-function.js
deleted file mode 100644
index 8c35f4514..000000000
--- a/node_modules/core-js/modules/_a-function.js
+++ /dev/null
@@ -1,4 +0,0 @@
-module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_a-number-value.js b/node_modules/core-js/modules/_a-number-value.js
deleted file mode 100644
index 7bcbd7b76..000000000
--- a/node_modules/core-js/modules/_a-number-value.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var cof = require('./_cof');
-module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_add-to-unscopables.js b/node_modules/core-js/modules/_add-to-unscopables.js
deleted file mode 100644
index 0a74baeab..000000000
--- a/node_modules/core-js/modules/_add-to-unscopables.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// 22.1.3.31 Array.prototype[@@unscopables]
-var UNSCOPABLES = require('./_wks')('unscopables')
- , ArrayProto = Array.prototype;
-if(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {});
-module.exports = function(key){
- ArrayProto[UNSCOPABLES][key] = true;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_an-instance.js b/node_modules/core-js/modules/_an-instance.js
deleted file mode 100644
index e4dfad3d0..000000000
--- a/node_modules/core-js/modules/_an-instance.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = function(it, Constructor, name, forbiddenField){
- if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
- throw TypeError(name + ': incorrect invocation!');
- } return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_an-object.js b/node_modules/core-js/modules/_an-object.js
deleted file mode 100644
index 59a8a3a36..000000000
--- a/node_modules/core-js/modules/_an-object.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var isObject = require('./_is-object');
-module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-copy-within.js b/node_modules/core-js/modules/_array-copy-within.js
deleted file mode 100644
index d901a32f5..000000000
--- a/node_modules/core-js/modules/_array-copy-within.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-'use strict';
-var toObject = require('./_to-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length');
-
-module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
- var O = toObject(this)
- , len = toLength(O.length)
- , to = toIndex(target, len)
- , from = toIndex(start, len)
- , end = arguments.length > 2 ? arguments[2] : undefined
- , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
- , inc = 1;
- if(from < to && to < from + count){
- inc = -1;
- from += count - 1;
- to += count - 1;
- }
- while(count-- > 0){
- if(from in O)O[to] = O[from];
- else delete O[to];
- to += inc;
- from += inc;
- } return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-fill.js b/node_modules/core-js/modules/_array-fill.js
deleted file mode 100644
index b21bb7edd..000000000
--- a/node_modules/core-js/modules/_array-fill.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-'use strict';
-var toObject = require('./_to-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length');
-module.exports = function fill(value /*, start = 0, end = @length */){
- var O = toObject(this)
- , length = toLength(O.length)
- , aLen = arguments.length
- , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
- , end = aLen > 2 ? arguments[2] : undefined
- , endPos = end === undefined ? length : toIndex(end, length);
- while(endPos > index)O[index++] = value;
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-from-iterable.js b/node_modules/core-js/modules/_array-from-iterable.js
deleted file mode 100644
index b5c454fb0..000000000
--- a/node_modules/core-js/modules/_array-from-iterable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var forOf = require('./_for-of');
-
-module.exports = function(iter, ITERATOR){
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
-};
diff --git a/node_modules/core-js/modules/_array-includes.js b/node_modules/core-js/modules/_array-includes.js
deleted file mode 100644
index c70b064d1..000000000
--- a/node_modules/core-js/modules/_array-includes.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// false -> Array#indexOf
-// true -> Array#includes
-var toIObject = require('./_to-iobject')
- , toLength = require('./_to-length')
- , toIndex = require('./_to-index');
-module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
- // Array#includes uses SameValueZero equality algorithm
- if(IS_INCLUDES && el != el)while(length > index){
- value = O[index++];
- if(value != value)return true;
- // Array#toIndex ignores holes, Array#includes - not
- } else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-methods.js b/node_modules/core-js/modules/_array-methods.js
deleted file mode 100644
index 8ffbe1164..000000000
--- a/node_modules/core-js/modules/_array-methods.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// 0 -> Array#forEach
-// 1 -> Array#map
-// 2 -> Array#filter
-// 3 -> Array#some
-// 4 -> Array#every
-// 5 -> Array#find
-// 6 -> Array#findIndex
-var ctx = require('./_ctx')
- , IObject = require('./_iobject')
- , toObject = require('./_to-object')
- , toLength = require('./_to-length')
- , asc = require('./_array-species-create');
-module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-reduce.js b/node_modules/core-js/modules/_array-reduce.js
deleted file mode 100644
index c807d5443..000000000
--- a/node_modules/core-js/modules/_array-reduce.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var aFunction = require('./_a-function')
- , toObject = require('./_to-object')
- , IObject = require('./_iobject')
- , toLength = require('./_to-length');
-
-module.exports = function(that, callbackfn, aLen, memo, isRight){
- aFunction(callbackfn);
- var O = toObject(that)
- , self = IObject(O)
- , length = toLength(O.length)
- , index = isRight ? length - 1 : 0
- , i = isRight ? -1 : 1;
- if(aLen < 2)for(;;){
- if(index in self){
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if(isRight ? index < 0 : length <= index){
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-species-constructor.js b/node_modules/core-js/modules/_array-species-constructor.js
deleted file mode 100644
index a715389fd..000000000
--- a/node_modules/core-js/modules/_array-species-constructor.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var isObject = require('./_is-object')
- , isArray = require('./_is-array')
- , SPECIES = require('./_wks')('species');
-
-module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_array-species-create.js b/node_modules/core-js/modules/_array-species-create.js
deleted file mode 100644
index cbd18bc6c..000000000
--- a/node_modules/core-js/modules/_array-species-create.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
-var speciesConstructor = require('./_array-species-constructor');
-
-module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_bind.js b/node_modules/core-js/modules/_bind.js
deleted file mode 100644
index 1f7b0174b..000000000
--- a/node_modules/core-js/modules/_bind.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-var aFunction = require('./_a-function')
- , isObject = require('./_is-object')
- , invoke = require('./_invoke')
- , arraySlice = [].slice
- , factories = {};
-
-var construct = function(F, len, args){
- if(!(len in factories)){
- for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
-};
-
-module.exports = Function.bind || function bind(that /*, args... */){
- var fn = aFunction(this)
- , partArgs = arraySlice.call(arguments, 1);
- var bound = function(/* args... */){
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
- };
- if(isObject(fn.prototype))bound.prototype = fn.prototype;
- return bound;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_classof.js b/node_modules/core-js/modules/_classof.js
deleted file mode 100644
index dab3a80f1..000000000
--- a/node_modules/core-js/modules/_classof.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// getting tag from 19.1.3.6 Object.prototype.toString()
-var cof = require('./_cof')
- , TAG = require('./_wks')('toStringTag')
- // ES3 wrong here
- , ARG = cof(function(){ return arguments; }()) == 'Arguments';
-
-// fallback for IE11 Script Access Denied error
-var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
-};
-
-module.exports = function(it){
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_cof.js b/node_modules/core-js/modules/_cof.js
deleted file mode 100644
index 1dd2779a7..000000000
--- a/node_modules/core-js/modules/_cof.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var toString = {}.toString;
-
-module.exports = function(it){
- return toString.call(it).slice(8, -1);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_collection-strong.js b/node_modules/core-js/modules/_collection-strong.js
deleted file mode 100644
index 55e4b6158..000000000
--- a/node_modules/core-js/modules/_collection-strong.js
+++ /dev/null
@@ -1,142 +0,0 @@
-'use strict';
-var dP = require('./_object-dp').f
- , create = require('./_object-create')
- , redefineAll = require('./_redefine-all')
- , ctx = require('./_ctx')
- , anInstance = require('./_an-instance')
- , defined = require('./_defined')
- , forOf = require('./_for-of')
- , $iterDefine = require('./_iter-define')
- , step = require('./_iter-step')
- , setSpecies = require('./_set-species')
- , DESCRIPTORS = require('./_descriptors')
- , fastKey = require('./_meta').fastKey
- , SIZE = DESCRIPTORS ? '_s' : 'size';
-
-var getEntry = function(that, key){
- // fast case
- var index = fastKey(key), entry;
- if(index !== 'F')return that._i[index];
- // frozen object case
- for(entry = that._f; entry; entry = entry.n){
- if(entry.k == key)return entry;
- }
-};
-
-module.exports = {
- getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
- var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
- if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.1.3.1 Map.prototype.clear()
- // 23.2.3.2 Set.prototype.clear()
- clear: function clear(){
- for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
- entry.r = true;
- if(entry.p)entry.p = entry.p.n = undefined;
- delete data[entry.i];
- }
- that._f = that._l = undefined;
- that[SIZE] = 0;
- },
- // 23.1.3.3 Map.prototype.delete(key)
- // 23.2.3.4 Set.prototype.delete(value)
- 'delete': function(key){
- var that = this
- , entry = getEntry(that, key);
- if(entry){
- var next = entry.n
- , prev = entry.p;
- delete that._i[entry.i];
- entry.r = true;
- if(prev)prev.n = next;
- if(next)next.p = prev;
- if(that._f == entry)that._f = next;
- if(that._l == entry)that._l = prev;
- that[SIZE]--;
- } return !!entry;
- },
- // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
- // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
- forEach: function forEach(callbackfn /*, that = undefined */){
- anInstance(this, C, 'forEach');
- var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
- , entry;
- while(entry = entry ? entry.n : this._f){
- f(entry.v, entry.k, this);
- // revert to the last existing entry
- while(entry && entry.r)entry = entry.p;
- }
- },
- // 23.1.3.7 Map.prototype.has(key)
- // 23.2.3.7 Set.prototype.has(value)
- has: function has(key){
- return !!getEntry(this, key);
- }
- });
- if(DESCRIPTORS)dP(C.prototype, 'size', {
- get: function(){
- return defined(this[SIZE]);
- }
- });
- return C;
- },
- def: function(that, key, value){
- var entry = getEntry(that, key)
- , prev, index;
- // change existing entry
- if(entry){
- entry.v = value;
- // create new entry
- } else {
- that._l = entry = {
- i: index = fastKey(key, true), // <- index
- k: key, // <- key
- v: value, // <- value
- p: prev = that._l, // <- previous entry
- n: undefined, // <- next entry
- r: false // <- removed
- };
- if(!that._f)that._f = entry;
- if(prev)prev.n = entry;
- that[SIZE]++;
- // add to index
- if(index !== 'F')that._i[index] = entry;
- } return that;
- },
- getEntry: getEntry,
- setStrong: function(C, NAME, IS_MAP){
- // add .keys, .values, .entries, [@@iterator]
- // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
- $iterDefine(C, NAME, function(iterated, kind){
- this._t = iterated; // target
- this._k = kind; // kind
- this._l = undefined; // previous
- }, function(){
- var that = this
- , kind = that._k
- , entry = that._l;
- // revert to the last existing entry
- while(entry && entry.r)entry = entry.p;
- // get next entry
- if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
- // or finish the iteration
- that._t = undefined;
- return step(1);
- }
- // return step by kind
- if(kind == 'keys' )return step(0, entry.k);
- if(kind == 'values')return step(0, entry.v);
- return step(0, [entry.k, entry.v]);
- }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
-
- // add [@@species], 23.1.2.2, 23.2.2.2
- setSpecies(NAME);
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_collection-to-json.js b/node_modules/core-js/modules/_collection-to-json.js
deleted file mode 100644
index ce0282f6b..000000000
--- a/node_modules/core-js/modules/_collection-to-json.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var classof = require('./_classof')
- , from = require('./_array-from-iterable');
-module.exports = function(NAME){
- return function toJSON(){
- if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_collection-weak.js b/node_modules/core-js/modules/_collection-weak.js
deleted file mode 100644
index a8597e64d..000000000
--- a/node_modules/core-js/modules/_collection-weak.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-var redefineAll = require('./_redefine-all')
- , getWeak = require('./_meta').getWeak
- , anObject = require('./_an-object')
- , isObject = require('./_is-object')
- , anInstance = require('./_an-instance')
- , forOf = require('./_for-of')
- , createArrayMethod = require('./_array-methods')
- , $has = require('./_has')
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , id = 0;
-
-// fallback for uncaught frozen keys
-var uncaughtFrozenStore = function(that){
- return that._l || (that._l = new UncaughtFrozenStore);
-};
-var UncaughtFrozenStore = function(){
- this.a = [];
-};
-var findUncaughtFrozen = function(store, key){
- return arrayFind(store.a, function(it){
- return it[0] === key;
- });
-};
-UncaughtFrozenStore.prototype = {
- get: function(key){
- var entry = findUncaughtFrozen(this, key);
- if(entry)return entry[1];
- },
- has: function(key){
- return !!findUncaughtFrozen(this, key);
- },
- set: function(key, value){
- var entry = findUncaughtFrozen(this, key);
- if(entry)entry[1] = value;
- else this.a.push([key, value]);
- },
- 'delete': function(key){
- var index = arrayFindIndex(this.a, function(it){
- return it[0] === key;
- });
- if(~index)this.a.splice(index, 1);
- return !!~index;
- }
-};
-
-module.exports = {
- getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
- var C = wrapper(function(that, iterable){
- anInstance(that, C, NAME, '_i');
- that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
- if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.3.3.2 WeakMap.prototype.delete(key)
- // 23.4.3.3 WeakSet.prototype.delete(value)
- 'delete': function(key){
- if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this)['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
- },
- // 23.3.3.4 WeakMap.prototype.has(key)
- // 23.4.3.4 WeakSet.prototype.has(value)
- has: function has(key){
- if(!isObject(key))return false;
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).has(key);
- return data && $has(data, this._i);
- }
- });
- return C;
- },
- def: function(that, key, value){
- var data = getWeak(anObject(key), true);
- if(data === true)uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
- },
- ufstore: uncaughtFrozenStore
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_collection.js b/node_modules/core-js/modules/_collection.js
deleted file mode 100644
index 2b1834534..000000000
--- a/node_modules/core-js/modules/_collection.js
+++ /dev/null
@@ -1,85 +0,0 @@
-'use strict';
-var global = require('./_global')
- , $export = require('./_export')
- , redefine = require('./_redefine')
- , redefineAll = require('./_redefine-all')
- , meta = require('./_meta')
- , forOf = require('./_for-of')
- , anInstance = require('./_an-instance')
- , isObject = require('./_is-object')
- , fails = require('./_fails')
- , $iterDetect = require('./_iter-detect')
- , setToStringTag = require('./_set-to-string-tag')
- , inheritIfRequired = require('./_inherit-if-required');
-
-module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
- var Base = global[NAME]
- , C = Base
- , ADDER = IS_MAP ? 'set' : 'add'
- , proto = C && C.prototype
- , O = {};
- var fixMethod = function(KEY){
- var fn = proto[KEY];
- redefine(proto, KEY,
- KEY == 'delete' ? function(a){
- return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'has' ? function has(a){
- return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'get' ? function get(a){
- return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
- : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
- );
- };
- if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
- new C().entries().next();
- }))){
- // create collection constructor
- C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
- redefineAll(C.prototype, methods);
- meta.NEED = true;
- } else {
- var instance = new C
- // early implementations not supports chaining
- , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
- // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
- , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
- // most early implementations doesn't supports iterables, most modern - not close it correctly
- , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
- // for early implementations -0 and +0 not the same
- , BUGGY_ZERO = !IS_WEAK && fails(function(){
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new C()
- , index = 5;
- while(index--)$instance[ADDER](index, index);
- return !$instance.has(-0);
- });
- if(!ACCEPT_ITERABLES){
- C = wrapper(function(target, iterable){
- anInstance(target, C, NAME);
- var that = inheritIfRequired(new Base, target, C);
- if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
- return that;
- });
- C.prototype = proto;
- proto.constructor = C;
- }
- if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
- fixMethod('delete');
- fixMethod('has');
- IS_MAP && fixMethod('get');
- }
- if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
- // weak collections should not contains .clear method
- if(IS_WEAK && proto.clear)delete proto.clear;
- }
-
- setToStringTag(C, NAME);
-
- O[NAME] = C;
- $export($export.G + $export.W + $export.F * (C != Base), O);
-
- if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
-
- return C;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_core.js b/node_modules/core-js/modules/_core.js
deleted file mode 100644
index 23d6aedeb..000000000
--- a/node_modules/core-js/modules/_core.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var core = module.exports = {version: '2.4.0'};
-if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef \ No newline at end of file
diff --git a/node_modules/core-js/modules/_create-property.js b/node_modules/core-js/modules/_create-property.js
deleted file mode 100644
index 3d1bf7305..000000000
--- a/node_modules/core-js/modules/_create-property.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-var $defineProperty = require('./_object-dp')
- , createDesc = require('./_property-desc');
-
-module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_ctx.js b/node_modules/core-js/modules/_ctx.js
deleted file mode 100644
index b52d85ff3..000000000
--- a/node_modules/core-js/modules/_ctx.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// optional / simple context binding
-var aFunction = require('./_a-function');
-module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_date-to-primitive.js b/node_modules/core-js/modules/_date-to-primitive.js
deleted file mode 100644
index 561079a1b..000000000
--- a/node_modules/core-js/modules/_date-to-primitive.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-var anObject = require('./_an-object')
- , toPrimitive = require('./_to-primitive')
- , NUMBER = 'number';
-
-module.exports = function(hint){
- if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_defined.js b/node_modules/core-js/modules/_defined.js
deleted file mode 100644
index cfa476b96..000000000
--- a/node_modules/core-js/modules/_defined.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_descriptors.js b/node_modules/core-js/modules/_descriptors.js
deleted file mode 100644
index 6ccb7ee24..000000000
--- a/node_modules/core-js/modules/_descriptors.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Thank's IE8 for his funny defineProperty
-module.exports = !require('./_fails')(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_dom-create.js b/node_modules/core-js/modules/_dom-create.js
deleted file mode 100644
index 909b5ff05..000000000
--- a/node_modules/core-js/modules/_dom-create.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var isObject = require('./_is-object')
- , document = require('./_global').document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
-module.exports = function(it){
- return is ? document.createElement(it) : {};
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_entry-virtual.js b/node_modules/core-js/modules/_entry-virtual.js
deleted file mode 100644
index 0ec61272e..000000000
--- a/node_modules/core-js/modules/_entry-virtual.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var core = require('./_core');
-module.exports = function(CONSTRUCTOR){
- var C = core[CONSTRUCTOR];
- return (C.virtual || C.prototype);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_enum-bug-keys.js b/node_modules/core-js/modules/_enum-bug-keys.js
deleted file mode 100644
index 928b9fb05..000000000
--- a/node_modules/core-js/modules/_enum-bug-keys.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
-).split(','); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_enum-keys.js b/node_modules/core-js/modules/_enum-keys.js
deleted file mode 100644
index 3bf8069c1..000000000
--- a/node_modules/core-js/modules/_enum-keys.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// all enumerable object keys, includes symbols
-var getKeys = require('./_object-keys')
- , gOPS = require('./_object-gops')
- , pIE = require('./_object-pie');
-module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_export.js b/node_modules/core-js/modules/_export.js
deleted file mode 100644
index afddf3522..000000000
--- a/node_modules/core-js/modules/_export.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var global = require('./_global')
- , core = require('./_core')
- , hide = require('./_hide')
- , redefine = require('./_redefine')
- , ctx = require('./_ctx')
- , PROTOTYPE = 'prototype';
-
-var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
- , key, own, out, exp;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- // export native or passed
- out = (own ? target : source)[key];
- // bind timers to global for call from export context
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // extend global
- if(target)redefine(target, key, out, type & $export.U);
- // export
- if(exports[key] != out)hide(exports, key, exp);
- if(IS_PROTO && expProto[key] != out)expProto[key] = out;
- }
-};
-global.core = core;
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_fails-is-regexp.js b/node_modules/core-js/modules/_fails-is-regexp.js
deleted file mode 100644
index 130436bf9..000000000
--- a/node_modules/core-js/modules/_fails-is-regexp.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var MATCH = require('./_wks')('match');
-module.exports = function(KEY){
- var re = /./;
- try {
- '/./'[KEY](re);
- } catch(e){
- try {
- re[MATCH] = false;
- return !'/./'[KEY](re);
- } catch(f){ /* empty */ }
- } return true;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_fails.js b/node_modules/core-js/modules/_fails.js
deleted file mode 100644
index 184e5ea84..000000000
--- a/node_modules/core-js/modules/_fails.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_fix-re-wks.js b/node_modules/core-js/modules/_fix-re-wks.js
deleted file mode 100644
index d29368ce8..000000000
--- a/node_modules/core-js/modules/_fix-re-wks.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-var hide = require('./_hide')
- , redefine = require('./_redefine')
- , fails = require('./_fails')
- , defined = require('./_defined')
- , wks = require('./_wks');
-
-module.exports = function(KEY, length, exec){
- var SYMBOL = wks(KEY)
- , fns = exec(defined, SYMBOL, ''[KEY])
- , strfn = fns[0]
- , rxfn = fns[1];
- if(fails(function(){
- var O = {};
- O[SYMBOL] = function(){ return 7; };
- return ''[KEY](O) != 7;
- })){
- redefine(String.prototype, KEY, strfn);
- hide(RegExp.prototype, SYMBOL, length == 2
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function(string, arg){ return rxfn.call(string, this, arg); }
- // 21.2.5.6 RegExp.prototype[@@match](string)
- // 21.2.5.9 RegExp.prototype[@@search](string)
- : function(string){ return rxfn.call(string, this); }
- );
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_flags.js b/node_modules/core-js/modules/_flags.js
deleted file mode 100644
index 054f90886..000000000
--- a/node_modules/core-js/modules/_flags.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-// 21.2.5.3 get RegExp.prototype.flags
-var anObject = require('./_an-object');
-module.exports = function(){
- var that = anObject(this)
- , result = '';
- if(that.global) result += 'g';
- if(that.ignoreCase) result += 'i';
- if(that.multiline) result += 'm';
- if(that.unicode) result += 'u';
- if(that.sticky) result += 'y';
- return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_for-of.js b/node_modules/core-js/modules/_for-of.js
deleted file mode 100644
index b4824fefa..000000000
--- a/node_modules/core-js/modules/_for-of.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var ctx = require('./_ctx')
- , call = require('./_iter-call')
- , isArrayIter = require('./_is-array-iter')
- , anObject = require('./_an-object')
- , toLength = require('./_to-length')
- , getIterFn = require('./core.get-iterator-method')
- , BREAK = {}
- , RETURN = {};
-var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
- var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
- , f = ctx(fn, that, entries ? 2 : 1)
- , index = 0
- , length, step, iterator, result;
- if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
- // fast case for arrays with default iterator
- if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if(result === BREAK || result === RETURN)return result;
- } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
- result = call(iterator, f, step.value, entries);
- if(result === BREAK || result === RETURN)return result;
- }
-};
-exports.BREAK = BREAK;
-exports.RETURN = RETURN; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_global.js b/node_modules/core-js/modules/_global.js
deleted file mode 100644
index df6efb476..000000000
--- a/node_modules/core-js/modules/_global.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
-if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef \ No newline at end of file
diff --git a/node_modules/core-js/modules/_has.js b/node_modules/core-js/modules/_has.js
deleted file mode 100644
index 870b40e71..000000000
--- a/node_modules/core-js/modules/_has.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_hide.js b/node_modules/core-js/modules/_hide.js
deleted file mode 100644
index 4031e8080..000000000
--- a/node_modules/core-js/modules/_hide.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var dP = require('./_object-dp')
- , createDesc = require('./_property-desc');
-module.exports = require('./_descriptors') ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
-} : function(object, key, value){
- object[key] = value;
- return object;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_html.js b/node_modules/core-js/modules/_html.js
deleted file mode 100644
index 98f5142c4..000000000
--- a/node_modules/core-js/modules/_html.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_global').document && document.documentElement; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_ie8-dom-define.js b/node_modules/core-js/modules/_ie8-dom-define.js
deleted file mode 100644
index 18ffd59da..000000000
--- a/node_modules/core-js/modules/_ie8-dom-define.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = !require('./_descriptors') && !require('./_fails')(function(){
- return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_inherit-if-required.js b/node_modules/core-js/modules/_inherit-if-required.js
deleted file mode 100644
index d3948405b..000000000
--- a/node_modules/core-js/modules/_inherit-if-required.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var isObject = require('./_is-object')
- , setPrototypeOf = require('./_set-proto').set;
-module.exports = function(that, target, C){
- var P, S = target.constructor;
- if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
- setPrototypeOf(that, P);
- } return that;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_invoke.js b/node_modules/core-js/modules/_invoke.js
deleted file mode 100644
index 08e307fd0..000000000
--- a/node_modules/core-js/modules/_invoke.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// fast apply, http://jsperf.lnkit.com/fast-apply/5
-module.exports = function(fn, args, that){
- var un = that === undefined;
- switch(args.length){
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iobject.js b/node_modules/core-js/modules/_iobject.js
deleted file mode 100644
index b58db4897..000000000
--- a/node_modules/core-js/modules/_iobject.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// fallback for non-array-like ES3 and non-enumerable old V8 strings
-var cof = require('./_cof');
-module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_is-array-iter.js b/node_modules/core-js/modules/_is-array-iter.js
deleted file mode 100644
index 8139d71c2..000000000
--- a/node_modules/core-js/modules/_is-array-iter.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// check on default Array iterator
-var Iterators = require('./_iterators')
- , ITERATOR = require('./_wks')('iterator')
- , ArrayProto = Array.prototype;
-
-module.exports = function(it){
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_is-array.js b/node_modules/core-js/modules/_is-array.js
deleted file mode 100644
index b4a3a8ed8..000000000
--- a/node_modules/core-js/modules/_is-array.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.2.2 IsArray(argument)
-var cof = require('./_cof');
-module.exports = Array.isArray || function isArray(arg){
- return cof(arg) == 'Array';
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_is-integer.js b/node_modules/core-js/modules/_is-integer.js
deleted file mode 100644
index 22db67edb..000000000
--- a/node_modules/core-js/modules/_is-integer.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 20.1.2.3 Number.isInteger(number)
-var isObject = require('./_is-object')
- , floor = Math.floor;
-module.exports = function isInteger(it){
- return !isObject(it) && isFinite(it) && floor(it) === it;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_is-object.js b/node_modules/core-js/modules/_is-object.js
deleted file mode 100644
index ee694be2f..000000000
--- a/node_modules/core-js/modules/_is-object.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_is-regexp.js b/node_modules/core-js/modules/_is-regexp.js
deleted file mode 100644
index 55b2c629c..000000000
--- a/node_modules/core-js/modules/_is-regexp.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// 7.2.8 IsRegExp(argument)
-var isObject = require('./_is-object')
- , cof = require('./_cof')
- , MATCH = require('./_wks')('match');
-module.exports = function(it){
- var isRegExp;
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iter-call.js b/node_modules/core-js/modules/_iter-call.js
deleted file mode 100644
index e3565ba9f..000000000
--- a/node_modules/core-js/modules/_iter-call.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// call something on iterator step with safe closing on error
-var anObject = require('./_an-object');
-module.exports = function(iterator, fn, value, entries){
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch(e){
- var ret = iterator['return'];
- if(ret !== undefined)anObject(ret.call(iterator));
- throw e;
- }
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iter-create.js b/node_modules/core-js/modules/_iter-create.js
deleted file mode 100644
index 9a9aa4fbb..000000000
--- a/node_modules/core-js/modules/_iter-create.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-var create = require('./_object-create')
- , descriptor = require('./_property-desc')
- , setToStringTag = require('./_set-to-string-tag')
- , IteratorPrototype = {};
-
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });
-
-module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
- setToStringTag(Constructor, NAME + ' Iterator');
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iter-define.js b/node_modules/core-js/modules/_iter-define.js
deleted file mode 100644
index f72a50214..000000000
--- a/node_modules/core-js/modules/_iter-define.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-var LIBRARY = require('./_library')
- , $export = require('./_export')
- , redefine = require('./_redefine')
- , hide = require('./_hide')
- , has = require('./_has')
- , Iterators = require('./_iterators')
- , $iterCreate = require('./_iter-create')
- , setToStringTag = require('./_set-to-string-tag')
- , getPrototypeOf = require('./_object-gpo')
- , ITERATOR = require('./_wks')('iterator')
- , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
- , FF_ITERATOR = '@@iterator'
- , KEYS = 'keys'
- , VALUES = 'values';
-
-var returnThis = function(){ return this; };
-
-module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
- $iterCreate(Constructor, NAME, next);
- var getMethod = function(kind){
- if(!BUGGY && kind in proto)return proto[kind];
- switch(kind){
- case KEYS: return function keys(){ return new Constructor(this, kind); };
- case VALUES: return function values(){ return new Constructor(this, kind); };
- } return function entries(){ return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator'
- , DEF_VALUES = DEFAULT == VALUES
- , VALUES_BUG = false
- , proto = Base.prototype
- , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
- , $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
- // Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
- // Define iterator
- if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if(DEFAULT){
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if(FORCED)for(key in methods){
- if(!(key in proto))redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iter-detect.js b/node_modules/core-js/modules/_iter-detect.js
deleted file mode 100644
index 87c7aecf4..000000000
--- a/node_modules/core-js/modules/_iter-detect.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var ITERATOR = require('./_wks')('iterator')
- , SAFE_CLOSING = false;
-
-try {
- var riter = [7][ITERATOR]();
- riter['return'] = function(){ SAFE_CLOSING = true; };
- Array.from(riter, function(){ throw 2; });
-} catch(e){ /* empty */ }
-
-module.exports = function(exec, skipClosing){
- if(!skipClosing && !SAFE_CLOSING)return false;
- var safe = false;
- try {
- var arr = [7]
- , iter = arr[ITERATOR]();
- iter.next = function(){ return {done: safe = true}; };
- arr[ITERATOR] = function(){ return iter; };
- exec(arr);
- } catch(e){ /* empty */ }
- return safe;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iter-step.js b/node_modules/core-js/modules/_iter-step.js
deleted file mode 100644
index 6ff0dc518..000000000
--- a/node_modules/core-js/modules/_iter-step.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(done, value){
- return {value: value, done: !!done};
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_iterators.js b/node_modules/core-js/modules/_iterators.js
deleted file mode 100644
index a09954537..000000000
--- a/node_modules/core-js/modules/_iterators.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = {}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_keyof.js b/node_modules/core-js/modules/_keyof.js
deleted file mode 100644
index 7b63229b0..000000000
--- a/node_modules/core-js/modules/_keyof.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var getKeys = require('./_object-keys')
- , toIObject = require('./_to-iobject');
-module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_library.js b/node_modules/core-js/modules/_library.js
deleted file mode 100644
index 82e47dd52..000000000
--- a/node_modules/core-js/modules/_library.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = false; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_math-expm1.js b/node_modules/core-js/modules/_math-expm1.js
deleted file mode 100644
index 5131aa951..000000000
--- a/node_modules/core-js/modules/_math-expm1.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// 20.2.2.14 Math.expm1(x)
-var $expm1 = Math.expm1;
-module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
-) ? function expm1(x){
- return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
-} : $expm1; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_math-log1p.js b/node_modules/core-js/modules/_math-log1p.js
deleted file mode 100644
index a92bf463a..000000000
--- a/node_modules/core-js/modules/_math-log1p.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.2.2.20 Math.log1p(x)
-module.exports = Math.log1p || function log1p(x){
- return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_math-sign.js b/node_modules/core-js/modules/_math-sign.js
deleted file mode 100644
index a4848df60..000000000
--- a/node_modules/core-js/modules/_math-sign.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.2.2.28 Math.sign(x)
-module.exports = Math.sign || function sign(x){
- return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_meta.js b/node_modules/core-js/modules/_meta.js
deleted file mode 100644
index 7daca0094..000000000
--- a/node_modules/core-js/modules/_meta.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var META = require('./_uid')('meta')
- , isObject = require('./_is-object')
- , has = require('./_has')
- , setDesc = require('./_object-dp').f
- , id = 0;
-var isExtensible = Object.isExtensible || function(){
- return true;
-};
-var FREEZE = !require('./_fails')(function(){
- return isExtensible(Object.preventExtensions({}));
-});
-var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
-};
-var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
-};
-var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
-};
-// add metadata on freeze-family methods calling
-var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
-};
-var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_metadata.js b/node_modules/core-js/modules/_metadata.js
deleted file mode 100644
index eb5a762d4..000000000
--- a/node_modules/core-js/modules/_metadata.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var Map = require('./es6.map')
- , $export = require('./_export')
- , shared = require('./_shared')('metadata')
- , store = shared.store || (shared.store = new (require('./es6.weak-map')));
-
-var getOrCreateMetadataMap = function(target, targetKey, create){
- var targetMetadata = store.get(target);
- if(!targetMetadata){
- if(!create)return undefined;
- store.set(target, targetMetadata = new Map);
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if(!keyMetadata){
- if(!create)return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map);
- } return keyMetadata;
-};
-var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
-};
-var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
-};
-var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
-};
-var ordinaryOwnMetadataKeys = function(target, targetKey){
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
- , keys = [];
- if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
- return keys;
-};
-var toMetaKey = function(it){
- return it === undefined || typeof it == 'symbol' ? it : String(it);
-};
-var exp = function(O){
- $export($export.S, 'Reflect', O);
-};
-
-module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_microtask.js b/node_modules/core-js/modules/_microtask.js
deleted file mode 100644
index b0f2a0df0..000000000
--- a/node_modules/core-js/modules/_microtask.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var global = require('./_global')
- , macrotask = require('./_task').set
- , Observer = global.MutationObserver || global.WebKitMutationObserver
- , process = global.process
- , Promise = global.Promise
- , isNode = require('./_cof')(process) == 'process';
-
-module.exports = function(){
- var head, last, notify;
-
- var flush = function(){
- var parent, fn;
- if(isNode && (parent = process.domain))parent.exit();
- while(head){
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch(e){
- if(head)notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if(parent)parent.enter();
- };
-
- // Node.js
- if(isNode){
- notify = function(){
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if(Observer){
- var toggle = true
- , node = document.createTextNode('');
- new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
- notify = function(){
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if(Promise && Promise.resolve){
- var promise = Promise.resolve();
- notify = function(){
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function(){
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function(fn){
- var task = {fn: fn, next: undefined};
- if(last)last.next = task;
- if(!head){
- head = task;
- notify();
- } last = task;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-assign.js b/node_modules/core-js/modules/_object-assign.js
deleted file mode 100644
index c575aba21..000000000
--- a/node_modules/core-js/modules/_object-assign.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-// 19.1.2.1 Object.assign(target, source, ...)
-var getKeys = require('./_object-keys')
- , gOPS = require('./_object-gops')
- , pIE = require('./_object-pie')
- , toObject = require('./_to-object')
- , IObject = require('./_iobject')
- , $assign = Object.assign;
-
-// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || require('./_fails')(function(){
- var A = {}
- , B = {}
- , S = Symbol()
- , K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
-}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
- var T = toObject(target)
- , aLen = arguments.length
- , index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
- , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
- , length = keys.length
- , j = 0
- , key;
- while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
-} : $assign; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-create.js b/node_modules/core-js/modules/_object-create.js
deleted file mode 100644
index 3379760f9..000000000
--- a/node_modules/core-js/modules/_object-create.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-var anObject = require('./_an-object')
- , dPs = require('./_object-dps')
- , enumBugKeys = require('./_enum-bug-keys')
- , IE_PROTO = require('./_shared-key')('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
-// Create object with fake `null` prototype: use iframe Object with cleared prototype
-var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = require('./_dom-create')('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- require('./_html').appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
-};
-
-module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
-};
diff --git a/node_modules/core-js/modules/_object-define.js b/node_modules/core-js/modules/_object-define.js
deleted file mode 100644
index f246c4e32..000000000
--- a/node_modules/core-js/modules/_object-define.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var dP = require('./_object-dp')
- , gOPD = require('./_object-gopd')
- , ownKeys = require('./_own-keys')
- , toIObject = require('./_to-iobject');
-
-module.exports = function define(target, mixin){
- var keys = ownKeys(toIObject(mixin))
- , length = keys.length
- , i = 0, key;
- while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key));
- return target;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-dp.js b/node_modules/core-js/modules/_object-dp.js
deleted file mode 100644
index e7ca8a463..000000000
--- a/node_modules/core-js/modules/_object-dp.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var anObject = require('./_an-object')
- , IE8_DOM_DEFINE = require('./_ie8-dom-define')
- , toPrimitive = require('./_to-primitive')
- , dP = Object.defineProperty;
-
-exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-dps.js b/node_modules/core-js/modules/_object-dps.js
deleted file mode 100644
index 8cd4147ac..000000000
--- a/node_modules/core-js/modules/_object-dps.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var dP = require('./_object-dp')
- , anObject = require('./_an-object')
- , getKeys = require('./_object-keys');
-
-module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-forced-pam.js b/node_modules/core-js/modules/_object-forced-pam.js
deleted file mode 100644
index 668a07dc2..000000000
--- a/node_modules/core-js/modules/_object-forced-pam.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// Forced replacement prototype accessors methods
-module.exports = require('./_library')|| !require('./_fails')(function(){
- var K = Math.random();
- // In FF throws only define methods
- __defineSetter__.call(null, K, function(){ /* empty */});
- delete require('./_global')[K];
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-gopd.js b/node_modules/core-js/modules/_object-gopd.js
deleted file mode 100644
index 756206aba..000000000
--- a/node_modules/core-js/modules/_object-gopd.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var pIE = require('./_object-pie')
- , createDesc = require('./_property-desc')
- , toIObject = require('./_to-iobject')
- , toPrimitive = require('./_to-primitive')
- , has = require('./_has')
- , IE8_DOM_DEFINE = require('./_ie8-dom-define')
- , gOPD = Object.getOwnPropertyDescriptor;
-
-exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-gopn-ext.js b/node_modules/core-js/modules/_object-gopn-ext.js
deleted file mode 100644
index f4d10b4a1..000000000
--- a/node_modules/core-js/modules/_object-gopn-ext.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var toIObject = require('./_to-iobject')
- , gOPN = require('./_object-gopn').f
- , toString = {}.toString;
-
-var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
-var getWindowNames = function(it){
- try {
- return gOPN(it);
- } catch(e){
- return windowNames.slice();
- }
-};
-
-module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
-};
diff --git a/node_modules/core-js/modules/_object-gopn.js b/node_modules/core-js/modules/_object-gopn.js
deleted file mode 100644
index beebf4dac..000000000
--- a/node_modules/core-js/modules/_object-gopn.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
-var $keys = require('./_object-keys-internal')
- , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
-
-exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-gops.js b/node_modules/core-js/modules/_object-gops.js
deleted file mode 100644
index 8f93d76b1..000000000
--- a/node_modules/core-js/modules/_object-gops.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = Object.getOwnPropertySymbols; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-gpo.js b/node_modules/core-js/modules/_object-gpo.js
deleted file mode 100644
index 535dc6e94..000000000
--- a/node_modules/core-js/modules/_object-gpo.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
-var has = require('./_has')
- , toObject = require('./_to-object')
- , IE_PROTO = require('./_shared-key')('IE_PROTO')
- , ObjectProto = Object.prototype;
-
-module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-keys-internal.js b/node_modules/core-js/modules/_object-keys-internal.js
deleted file mode 100644
index e23481d7c..000000000
--- a/node_modules/core-js/modules/_object-keys-internal.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var has = require('./_has')
- , toIObject = require('./_to-iobject')
- , arrayIndexOf = require('./_array-includes')(false)
- , IE_PROTO = require('./_shared-key')('IE_PROTO');
-
-module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-keys.js b/node_modules/core-js/modules/_object-keys.js
deleted file mode 100644
index 11d4cceed..000000000
--- a/node_modules/core-js/modules/_object-keys.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// 19.1.2.14 / 15.2.3.14 Object.keys(O)
-var $keys = require('./_object-keys-internal')
- , enumBugKeys = require('./_enum-bug-keys');
-
-module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-pie.js b/node_modules/core-js/modules/_object-pie.js
deleted file mode 100644
index 13479a171..000000000
--- a/node_modules/core-js/modules/_object-pie.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = {}.propertyIsEnumerable; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-sap.js b/node_modules/core-js/modules/_object-sap.js
deleted file mode 100644
index b76fec5f4..000000000
--- a/node_modules/core-js/modules/_object-sap.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// most Object methods by ES6 should accept primitives
-var $export = require('./_export')
- , core = require('./_core')
- , fails = require('./_fails');
-module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_object-to-array.js b/node_modules/core-js/modules/_object-to-array.js
deleted file mode 100644
index b6fdf05d7..000000000
--- a/node_modules/core-js/modules/_object-to-array.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var getKeys = require('./_object-keys')
- , toIObject = require('./_to-iobject')
- , isEnum = require('./_object-pie').f;
-module.exports = function(isEntries){
- return function(it){
- var O = toIObject(it)
- , keys = getKeys(O)
- , length = keys.length
- , i = 0
- , result = []
- , key;
- while(length > i)if(isEnum.call(O, key = keys[i++])){
- result.push(isEntries ? [key, O[key]] : O[key]);
- } return result;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_own-keys.js b/node_modules/core-js/modules/_own-keys.js
deleted file mode 100644
index 045ce3d58..000000000
--- a/node_modules/core-js/modules/_own-keys.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// all object keys, includes non-enumerable and symbols
-var gOPN = require('./_object-gopn')
- , gOPS = require('./_object-gops')
- , anObject = require('./_an-object')
- , Reflect = require('./_global').Reflect;
-module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
- var keys = gOPN.f(anObject(it))
- , getSymbols = gOPS.f;
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_parse-float.js b/node_modules/core-js/modules/_parse-float.js
deleted file mode 100644
index 3d0e65312..000000000
--- a/node_modules/core-js/modules/_parse-float.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var $parseFloat = require('./_global').parseFloat
- , $trim = require('./_string-trim').trim;
-
-module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){
- var string = $trim(String(str), 3)
- , result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
-} : $parseFloat; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_parse-int.js b/node_modules/core-js/modules/_parse-int.js
deleted file mode 100644
index c23ffc09c..000000000
--- a/node_modules/core-js/modules/_parse-int.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var $parseInt = require('./_global').parseInt
- , $trim = require('./_string-trim').trim
- , ws = require('./_string-ws')
- , hex = /^[\-+]?0[xX]/;
-
-module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
-} : $parseInt; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_partial.js b/node_modules/core-js/modules/_partial.js
deleted file mode 100644
index 3d411b705..000000000
--- a/node_modules/core-js/modules/_partial.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-var path = require('./_path')
- , invoke = require('./_invoke')
- , aFunction = require('./_a-function');
-module.exports = function(/* ...pargs */){
- var fn = aFunction(this)
- , length = arguments.length
- , pargs = Array(length)
- , i = 0
- , _ = path._
- , holder = false;
- while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
- return function(/* ...args */){
- var that = this
- , aLen = arguments.length
- , j = 0, k = 0, args;
- if(!holder && !aLen)return invoke(fn, pargs, that);
- args = pargs.slice();
- if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
- while(aLen > k)args.push(arguments[k++]);
- return invoke(fn, args, that);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_path.js b/node_modules/core-js/modules/_path.js
deleted file mode 100644
index d63df9d4d..000000000
--- a/node_modules/core-js/modules/_path.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_global'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_property-desc.js b/node_modules/core-js/modules/_property-desc.js
deleted file mode 100644
index e3f7ab2dc..000000000
--- a/node_modules/core-js/modules/_property-desc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_redefine-all.js b/node_modules/core-js/modules/_redefine-all.js
deleted file mode 100644
index ec1c5f765..000000000
--- a/node_modules/core-js/modules/_redefine-all.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var redefine = require('./_redefine');
-module.exports = function(target, src, safe){
- for(var key in src)redefine(target, key, src[key], safe);
- return target;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_redefine.js b/node_modules/core-js/modules/_redefine.js
deleted file mode 100644
index 8e1bfe06c..000000000
--- a/node_modules/core-js/modules/_redefine.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var global = require('./_global')
- , hide = require('./_hide')
- , has = require('./_has')
- , SRC = require('./_uid')('src')
- , TO_STRING = 'toString'
- , $toString = Function[TO_STRING]
- , TPL = ('' + $toString).split(TO_STRING);
-
-require('./_core').inspectSource = function(it){
- return $toString.call(it);
-};
-
-(module.exports = function(O, key, val, safe){
- var isFunction = typeof val == 'function';
- if(isFunction)has(val, 'name') || hide(val, 'name', key);
- if(O[key] === val)return;
- if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
- if(O === global){
- O[key] = val;
- } else {
- if(!safe){
- delete O[key];
- hide(O, key, val);
- } else {
- if(O[key])O[key] = val;
- else hide(O, key, val);
- }
- }
-// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
-})(Function.prototype, TO_STRING, function toString(){
- return typeof this == 'function' && this[SRC] || $toString.call(this);
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_replacer.js b/node_modules/core-js/modules/_replacer.js
deleted file mode 100644
index 5360a3d35..000000000
--- a/node_modules/core-js/modules/_replacer.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = function(regExp, replace){
- var replacer = replace === Object(replace) ? function(part){
- return replace[part];
- } : replace;
- return function(it){
- return String(it).replace(regExp, replacer);
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_same-value.js b/node_modules/core-js/modules/_same-value.js
deleted file mode 100644
index 8c2b8c7f6..000000000
--- a/node_modules/core-js/modules/_same-value.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 7.2.9 SameValue(x, y)
-module.exports = Object.is || function is(x, y){
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_set-proto.js b/node_modules/core-js/modules/_set-proto.js
deleted file mode 100644
index 8d5dad3fd..000000000
--- a/node_modules/core-js/modules/_set-proto.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var isObject = require('./_is-object')
- , anObject = require('./_an-object');
-var check = function(O, proto){
- anObject(O);
- if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
-};
-module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function(test, buggy, set){
- try {
- set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch(e){ buggy = true; }
- return function setPrototypeOf(O, proto){
- check(O, proto);
- if(buggy)O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_set-species.js b/node_modules/core-js/modules/_set-species.js
deleted file mode 100644
index a21bd0395..000000000
--- a/node_modules/core-js/modules/_set-species.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-var global = require('./_global')
- , dP = require('./_object-dp')
- , DESCRIPTORS = require('./_descriptors')
- , SPECIES = require('./_wks')('species');
-
-module.exports = function(KEY){
- var C = global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_set-to-string-tag.js b/node_modules/core-js/modules/_set-to-string-tag.js
deleted file mode 100644
index ffbdddab8..000000000
--- a/node_modules/core-js/modules/_set-to-string-tag.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var def = require('./_object-dp').f
- , has = require('./_has')
- , TAG = require('./_wks')('toStringTag');
-
-module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_shared-key.js b/node_modules/core-js/modules/_shared-key.js
deleted file mode 100644
index 5ed763496..000000000
--- a/node_modules/core-js/modules/_shared-key.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var shared = require('./_shared')('keys')
- , uid = require('./_uid');
-module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_shared.js b/node_modules/core-js/modules/_shared.js
deleted file mode 100644
index 3f9e4c891..000000000
--- a/node_modules/core-js/modules/_shared.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var global = require('./_global')
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
-module.exports = function(key){
- return store[key] || (store[key] = {});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_species-constructor.js b/node_modules/core-js/modules/_species-constructor.js
deleted file mode 100644
index 7a4d1baf2..000000000
--- a/node_modules/core-js/modules/_species-constructor.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// 7.3.20 SpeciesConstructor(O, defaultConstructor)
-var anObject = require('./_an-object')
- , aFunction = require('./_a-function')
- , SPECIES = require('./_wks')('species');
-module.exports = function(O, D){
- var C = anObject(O).constructor, S;
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_strict-method.js b/node_modules/core-js/modules/_strict-method.js
deleted file mode 100644
index 96b6c6e8a..000000000
--- a/node_modules/core-js/modules/_strict-method.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var fails = require('./_fails');
-
-module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-at.js b/node_modules/core-js/modules/_string-at.js
deleted file mode 100644
index ecc0d21cb..000000000
--- a/node_modules/core-js/modules/_string-at.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var toInteger = require('./_to-integer')
- , defined = require('./_defined');
-// true -> String#at
-// false -> String#codePointAt
-module.exports = function(TO_STRING){
- return function(that, pos){
- var s = String(defined(that))
- , i = toInteger(pos)
- , l = s.length
- , a, b;
- if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-context.js b/node_modules/core-js/modules/_string-context.js
deleted file mode 100644
index 5f513483f..000000000
--- a/node_modules/core-js/modules/_string-context.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// helper for String#{startsWith, endsWith, includes}
-var isRegExp = require('./_is-regexp')
- , defined = require('./_defined');
-
-module.exports = function(that, searchString, NAME){
- if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
- return String(defined(that));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-html.js b/node_modules/core-js/modules/_string-html.js
deleted file mode 100644
index 95daf8124..000000000
--- a/node_modules/core-js/modules/_string-html.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var $export = require('./_export')
- , fails = require('./_fails')
- , defined = require('./_defined')
- , quot = /"/g;
-// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
-var createHTML = function(string, tag, attribute, value) {
- var S = String(defined(string))
- , p1 = '<' + tag;
- if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
- return p1 + '>' + S + '</' + tag + '>';
-};
-module.exports = function(NAME, exec){
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function(){
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-pad.js b/node_modules/core-js/modules/_string-pad.js
deleted file mode 100644
index dccd155e8..000000000
--- a/node_modules/core-js/modules/_string-pad.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://github.com/tc39/proposal-string-pad-start-end
-var toLength = require('./_to-length')
- , repeat = require('./_string-repeat')
- , defined = require('./_defined');
-
-module.exports = function(that, maxLength, fillString, left){
- var S = String(defined(that))
- , stringLength = S.length
- , fillStr = fillString === undefined ? ' ' : String(fillString)
- , intMaxLength = toLength(maxLength);
- if(intMaxLength <= stringLength || fillStr == '')return S;
- var fillLen = intMaxLength - stringLength
- , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
- if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
- return left ? stringFiller + S : S + stringFiller;
-};
diff --git a/node_modules/core-js/modules/_string-repeat.js b/node_modules/core-js/modules/_string-repeat.js
deleted file mode 100644
index 88fd3a2d7..000000000
--- a/node_modules/core-js/modules/_string-repeat.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var toInteger = require('./_to-integer')
- , defined = require('./_defined');
-
-module.exports = function repeat(count){
- var str = String(defined(this))
- , res = ''
- , n = toInteger(count);
- if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
- for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
- return res;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-trim.js b/node_modules/core-js/modules/_string-trim.js
deleted file mode 100644
index d12de1ce4..000000000
--- a/node_modules/core-js/modules/_string-trim.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var $export = require('./_export')
- , defined = require('./_defined')
- , fails = require('./_fails')
- , spaces = require('./_string-ws')
- , space = '[' + spaces + ']'
- , non = '\u200b\u0085'
- , ltrim = RegExp('^' + space + space + '*')
- , rtrim = RegExp(space + space + '*$');
-
-var exporter = function(KEY, exec, ALIAS){
- var exp = {};
- var FORCE = fails(function(){
- return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if(ALIAS)exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
-};
-
-// 1 -> String#trimLeft
-// 2 -> String#trimRight
-// 3 -> String#trim
-var trim = exporter.trim = function(string, TYPE){
- string = String(defined(string));
- if(TYPE & 1)string = string.replace(ltrim, '');
- if(TYPE & 2)string = string.replace(rtrim, '');
- return string;
-};
-
-module.exports = exporter; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_string-ws.js b/node_modules/core-js/modules/_string-ws.js
deleted file mode 100644
index 9713d11db..000000000
--- a/node_modules/core-js/modules/_string-ws.js
+++ /dev/null
@@ -1,2 +0,0 @@
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_task.js b/node_modules/core-js/modules/_task.js
deleted file mode 100644
index 06a73f40c..000000000
--- a/node_modules/core-js/modules/_task.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var ctx = require('./_ctx')
- , invoke = require('./_invoke')
- , html = require('./_html')
- , cel = require('./_dom-create')
- , global = require('./_global')
- , process = global.process
- , setTask = global.setImmediate
- , clearTask = global.clearImmediate
- , MessageChannel = global.MessageChannel
- , counter = 0
- , queue = {}
- , ONREADYSTATECHANGE = 'onreadystatechange'
- , defer, channel, port;
-var run = function(){
- var id = +this;
- if(queue.hasOwnProperty(id)){
- var fn = queue[id];
- delete queue[id];
- fn();
- }
-};
-var listener = function(event){
- run.call(event.data);
-};
-// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-if(!setTask || !clearTask){
- setTask = function setImmediate(fn){
- var args = [], i = 1;
- while(arguments.length > i)args.push(arguments[i++]);
- queue[++counter] = function(){
- invoke(typeof fn == 'function' ? fn : Function(fn), args);
- };
- defer(counter);
- return counter;
- };
- clearTask = function clearImmediate(id){
- delete queue[id];
- };
- // Node.js 0.8-
- if(require('./_cof')(process) == 'process'){
- defer = function(id){
- process.nextTick(ctx(run, id, 1));
- };
- // Browsers with MessageChannel, includes WebWorkers
- } else if(MessageChannel){
- channel = new MessageChannel;
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = ctx(port.postMessage, port, 1);
- // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
- defer = function(id){
- global.postMessage(id + '', '*');
- };
- global.addEventListener('message', listener, false);
- // IE8-
- } else if(ONREADYSTATECHANGE in cel('script')){
- defer = function(id){
- html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
- html.removeChild(this);
- run.call(id);
- };
- };
- // Rest old browsers
- } else {
- defer = function(id){
- setTimeout(ctx(run, id, 1), 0);
- };
- }
-}
-module.exports = {
- set: setTask,
- clear: clearTask
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-index.js b/node_modules/core-js/modules/_to-index.js
deleted file mode 100644
index 4d380ce18..000000000
--- a/node_modules/core-js/modules/_to-index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var toInteger = require('./_to-integer')
- , max = Math.max
- , min = Math.min;
-module.exports = function(index, length){
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-integer.js b/node_modules/core-js/modules/_to-integer.js
deleted file mode 100644
index f63baaff8..000000000
--- a/node_modules/core-js/modules/_to-integer.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 7.1.4 ToInteger
-var ceil = Math.ceil
- , floor = Math.floor;
-module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-iobject.js b/node_modules/core-js/modules/_to-iobject.js
deleted file mode 100644
index 4eb434620..000000000
--- a/node_modules/core-js/modules/_to-iobject.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = require('./_iobject')
- , defined = require('./_defined');
-module.exports = function(it){
- return IObject(defined(it));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-length.js b/node_modules/core-js/modules/_to-length.js
deleted file mode 100644
index 4099e60b5..000000000
--- a/node_modules/core-js/modules/_to-length.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// 7.1.15 ToLength
-var toInteger = require('./_to-integer')
- , min = Math.min;
-module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-object.js b/node_modules/core-js/modules/_to-object.js
deleted file mode 100644
index f2c28b3fb..000000000
--- a/node_modules/core-js/modules/_to-object.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// 7.1.13 ToObject(argument)
-var defined = require('./_defined');
-module.exports = function(it){
- return Object(defined(it));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_to-primitive.js b/node_modules/core-js/modules/_to-primitive.js
deleted file mode 100644
index 16354eed6..000000000
--- a/node_modules/core-js/modules/_to-primitive.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = require('./_is-object');
-// instead of the ES6 spec version, we didn't implement @@toPrimitive case
-// and the second argument - flag - preferred type is a string
-module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_typed-array.js b/node_modules/core-js/modules/_typed-array.js
deleted file mode 100644
index b072b23b0..000000000
--- a/node_modules/core-js/modules/_typed-array.js
+++ /dev/null
@@ -1,479 +0,0 @@
-'use strict';
-if(require('./_descriptors')){
- var LIBRARY = require('./_library')
- , global = require('./_global')
- , fails = require('./_fails')
- , $export = require('./_export')
- , $typed = require('./_typed')
- , $buffer = require('./_typed-buffer')
- , ctx = require('./_ctx')
- , anInstance = require('./_an-instance')
- , propertyDesc = require('./_property-desc')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , toIndex = require('./_to-index')
- , toPrimitive = require('./_to-primitive')
- , has = require('./_has')
- , same = require('./_same-value')
- , classof = require('./_classof')
- , isObject = require('./_is-object')
- , toObject = require('./_to-object')
- , isArrayIter = require('./_is-array-iter')
- , create = require('./_object-create')
- , getPrototypeOf = require('./_object-gpo')
- , gOPN = require('./_object-gopn').f
- , getIterFn = require('./core.get-iterator-method')
- , uid = require('./_uid')
- , wks = require('./_wks')
- , createArrayMethod = require('./_array-methods')
- , createArrayIncludes = require('./_array-includes')
- , speciesConstructor = require('./_species-constructor')
- , ArrayIterators = require('./es6.array.iterator')
- , Iterators = require('./_iterators')
- , $iterDetect = require('./_iter-detect')
- , setSpecies = require('./_set-species')
- , arrayFill = require('./_array-fill')
- , arrayCopyWithin = require('./_array-copy-within')
- , $DP = require('./_object-dp')
- , $GOPD = require('./_object-gopd')
- , dP = $DP.f
- , gOPD = $GOPD.f
- , RangeError = global.RangeError
- , TypeError = global.TypeError
- , Uint8Array = global.Uint8Array
- , ARRAY_BUFFER = 'ArrayBuffer'
- , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
- , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
- , PROTOTYPE = 'prototype'
- , ArrayProto = Array[PROTOTYPE]
- , $ArrayBuffer = $buffer.ArrayBuffer
- , $DataView = $buffer.DataView
- , arrayForEach = createArrayMethod(0)
- , arrayFilter = createArrayMethod(2)
- , arraySome = createArrayMethod(3)
- , arrayEvery = createArrayMethod(4)
- , arrayFind = createArrayMethod(5)
- , arrayFindIndex = createArrayMethod(6)
- , arrayIncludes = createArrayIncludes(true)
- , arrayIndexOf = createArrayIncludes(false)
- , arrayValues = ArrayIterators.values
- , arrayKeys = ArrayIterators.keys
- , arrayEntries = ArrayIterators.entries
- , arrayLastIndexOf = ArrayProto.lastIndexOf
- , arrayReduce = ArrayProto.reduce
- , arrayReduceRight = ArrayProto.reduceRight
- , arrayJoin = ArrayProto.join
- , arraySort = ArrayProto.sort
- , arraySlice = ArrayProto.slice
- , arrayToString = ArrayProto.toString
- , arrayToLocaleString = ArrayProto.toLocaleString
- , ITERATOR = wks('iterator')
- , TAG = wks('toStringTag')
- , TYPED_CONSTRUCTOR = uid('typed_constructor')
- , DEF_CONSTRUCTOR = uid('def_constructor')
- , ALL_CONSTRUCTORS = $typed.CONSTR
- , TYPED_ARRAY = $typed.TYPED
- , VIEW = $typed.VIEW
- , WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function(O, length){
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function(){
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
- new Uint8Array(1).set({});
- });
-
- var strictToLength = function(it, SAME){
- if(it === undefined)throw TypeError(WRONG_LENGTH);
- var number = +it
- , length = toLength(it);
- if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
- return length;
- };
-
- var toOffset = function(it, BYTES){
- var offset = toInteger(it);
- if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function(it){
- if(isObject(it) && TYPED_ARRAY in it)return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function(C, length){
- if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function(O, list){
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function(C, list){
- var index = 0
- , length = list.length
- , result = allocate(C, length);
- while(length > index)result[index] = list[index++];
- return result;
- };
-
- var addGetter = function(it, key, internal){
- dP(it, key, {get: function(){ return this._d[internal]; }});
- };
-
- var $from = function from(source /*, mapfn, thisArg */){
- var O = toObject(source)
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , iterFn = getIterFn(O)
- , i, length, values, result, step, iterator;
- if(iterFn != undefined && !isArrayIter(iterFn)){
- for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
- values.push(step.value);
- } O = values;
- }
- if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
- for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/*...items*/){
- var index = 0
- , length = arguments.length
- , result = allocate(this, length);
- while(length > index)result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString(){
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /*, end */){
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /*, thisArg */){
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /*, thisArg */){
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /*, thisArg */){
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /*, thisArg */){
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /*, thisArg */){
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /*, fromIndex */){
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /*, fromIndex */){
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator){ // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /*, thisArg */){
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse(){
- var that = this
- , length = validate(that).length
- , middle = Math.floor(length / 2)
- , index = 0
- , value;
- while(index < middle){
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /*, thisArg */){
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn){
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end){
- var O = validate(this)
- , length = O.length
- , $begin = toIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end){
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /*, offset */){
- validate(this);
- var offset = toOffset(arguments[1], 1)
- , length = this.length
- , src = toObject(arrayLike)
- , len = toLength(src.length)
- , index = 0;
- if(len + offset > length)throw RangeError(WRONG_LENGTH);
- while(index < len)this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries(){
- return arrayEntries.call(validate(this));
- },
- keys: function keys(){
- return arrayKeys.call(validate(this));
- },
- values: function values(){
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function(target, key){
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key){
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc){
- if(isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ){
- target[key] = desc.value;
- return target;
- } else return dP(target, key, desc);
- };
-
- if(!ALL_CONSTRUCTORS){
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if(fails(function(){ arrayToString.call({}); })){
- arrayToString = arrayToLocaleString = function toString(){
- return arrayJoin.call(this);
- }
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function(){ /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function(){ return this[TYPED_ARRAY]; }
- });
-
- module.exports = function(KEY, BYTES, wrapper, CLAMPED){
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
- , ISNT_UINT8 = NAME != 'Uint8Array'
- , GETTER = 'get' + KEY
- , SETTER = 'set' + KEY
- , TypedArray = global[NAME]
- , Base = TypedArray || {}
- , TAC = TypedArray && getPrototypeOf(TypedArray)
- , FORCED = !TypedArray || !$typed.ABV
- , O = {}
- , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function(that, index){
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function(that, index, value){
- var data = that._d;
- if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function(that, index){
- dP(that, index, {
- get: function(){
- return getter(this, index);
- },
- set: function(value){
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if(FORCED){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0
- , offset = 0
- , buffer, byteLength, length, klass;
- if(!isObject(data)){
- length = strictToLength(data, true)
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if($length === undefined){
- if($len % BYTES)throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if(byteLength < 0)throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if(TYPED_ARRAY in data){
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while(index < length)addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if(!$iterDetect(function(iter){
- // V8 works with iterators, but fails in many other cases
- // https://code.google.com/p/v8/issues/detail?id=4552
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)){
- TypedArray = wrapper(function(that, data, $offset, $length){
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
- if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if(TYPED_ARRAY in data)return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
- if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR]
- , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
- , $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
- dP(TypedArrayPrototype, TAG, {
- get: function(){ return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES,
- from: $from,
- of: $of
- });
-
- if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
-
- $export($export.P + $export.F * fails(function(){
- new TypedArray(1).slice();
- }), NAME, {slice: $slice});
-
- $export($export.P + $export.F * (fails(function(){
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
- }) || !fails(function(){
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, {toLocaleString: $toLocaleString});
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
-} else module.exports = function(){ /* empty */ }; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_typed-buffer.js b/node_modules/core-js/modules/_typed-buffer.js
deleted file mode 100644
index 2129eea40..000000000
--- a/node_modules/core-js/modules/_typed-buffer.js
+++ /dev/null
@@ -1,273 +0,0 @@
-'use strict';
-var global = require('./_global')
- , DESCRIPTORS = require('./_descriptors')
- , LIBRARY = require('./_library')
- , $typed = require('./_typed')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , fails = require('./_fails')
- , anInstance = require('./_an-instance')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , gOPN = require('./_object-gopn').f
- , dP = require('./_object-dp').f
- , arrayFill = require('./_array-fill')
- , setToStringTag = require('./_set-to-string-tag')
- , ARRAY_BUFFER = 'ArrayBuffer'
- , DATA_VIEW = 'DataView'
- , PROTOTYPE = 'prototype'
- , WRONG_LENGTH = 'Wrong length!'
- , WRONG_INDEX = 'Wrong index!'
- , $ArrayBuffer = global[ARRAY_BUFFER]
- , $DataView = global[DATA_VIEW]
- , Math = global.Math
- , RangeError = global.RangeError
- , Infinity = global.Infinity
- , BaseBuffer = $ArrayBuffer
- , abs = Math.abs
- , pow = Math.pow
- , floor = Math.floor
- , log = Math.log
- , LN2 = Math.LN2
- , BUFFER = 'buffer'
- , BYTE_LENGTH = 'byteLength'
- , BYTE_OFFSET = 'byteOffset'
- , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
- , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
- , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
-// IEEE754 conversions based on https://github.com/feross/ieee754
-var packIEEE754 = function(value, mLen, nBytes){
- var buffer = Array(nBytes)
- , eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
- , i = 0
- , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
- , e, m, c;
- value = abs(value)
- if(value != value || value === Infinity){
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if(value * (c = pow(2, -e)) < 1){
- e--;
- c *= 2;
- }
- if(e + eBias >= 1){
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if(value * c >= 2){
- e++;
- c /= 2;
- }
- if(e + eBias >= eMax){
- m = 0;
- e = eMax;
- } else if(e + eBias >= 1){
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
-};
-var unpackIEEE754 = function(buffer, mLen, nBytes){
- var eLen = nBytes * 8 - mLen - 1
- , eMax = (1 << eLen) - 1
- , eBias = eMax >> 1
- , nBits = eLen - 7
- , i = nBytes - 1
- , s = buffer[i--]
- , e = s & 127
- , m;
- s >>= 7;
- for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if(e === 0){
- e = 1 - eBias;
- } else if(e === eMax){
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
-};
-
-var unpackI32 = function(bytes){
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
-};
-var packI8 = function(it){
- return [it & 0xff];
-};
-var packI16 = function(it){
- return [it & 0xff, it >> 8 & 0xff];
-};
-var packI32 = function(it){
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
-};
-var packF64 = function(it){
- return packIEEE754(it, 52, 8);
-};
-var packF32 = function(it){
- return packIEEE754(it, 23, 4);
-};
-
-var addGetter = function(C, key, internal){
- dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
-};
-
-var get = function(view, bytes, index, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
-};
-var set = function(view, bytes, index, conversion, value, isLittleEndian){
- var numIndex = +index
- , intIndex = toInteger(numIndex);
- if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b
- , start = intIndex + view[$OFFSET]
- , pack = conversion(+value);
- for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
-};
-
-var validateArrayBufferArguments = function(that, length){
- anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
- var numberLength = +length
- , byteLength = toLength(numberLength);
- if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
- return byteLength;
-};
-
-if(!$typed.ABV){
- $ArrayBuffer = function ArrayBuffer(length){
- var byteLength = validateArrayBufferArguments(this, length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength){
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH]
- , offset = toInteger(byteOffset);
- if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if(DESCRIPTORS){
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset){
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset){
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /*, littleEndian */){
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /*, littleEndian */){
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /*, littleEndian */){
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value){
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /*, littleEndian */){
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
-} else {
- if(!fails(function(){
- new $ArrayBuffer; // eslint-disable-line no-new
- }) || !fails(function(){
- new $ArrayBuffer(.5); // eslint-disable-line no-new
- })){
- $ArrayBuffer = function ArrayBuffer(length){
- return new BaseBuffer(validateArrayBufferArguments(this, length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
- if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
- };
- if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2))
- , $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value){
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
-}
-setToStringTag($ArrayBuffer, ARRAY_BUFFER);
-setToStringTag($DataView, DATA_VIEW);
-hide($DataView[PROTOTYPE], $typed.VIEW, true);
-exports[ARRAY_BUFFER] = $ArrayBuffer;
-exports[DATA_VIEW] = $DataView; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_typed.js b/node_modules/core-js/modules/_typed.js
deleted file mode 100644
index 6ed2ab56d..000000000
--- a/node_modules/core-js/modules/_typed.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var global = require('./_global')
- , hide = require('./_hide')
- , uid = require('./_uid')
- , TYPED = uid('typed_array')
- , VIEW = uid('view')
- , ABV = !!(global.ArrayBuffer && global.DataView)
- , CONSTR = ABV
- , i = 0, l = 9, Typed;
-
-var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
-).split(',');
-
-while(i < l){
- if(Typed = global[TypedArrayConstructors[i++]]){
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
-}
-
-module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_uid.js b/node_modules/core-js/modules/_uid.js
deleted file mode 100644
index 3be4196bb..000000000
--- a/node_modules/core-js/modules/_uid.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var id = 0
- , px = Math.random();
-module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_wks-define.js b/node_modules/core-js/modules/_wks-define.js
deleted file mode 100644
index e69603286..000000000
--- a/node_modules/core-js/modules/_wks-define.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var global = require('./_global')
- , core = require('./_core')
- , LIBRARY = require('./_library')
- , wksExt = require('./_wks-ext')
- , defineProperty = require('./_object-dp').f;
-module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/_wks-ext.js b/node_modules/core-js/modules/_wks-ext.js
deleted file mode 100644
index 7901def62..000000000
--- a/node_modules/core-js/modules/_wks-ext.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.f = require('./_wks'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/_wks.js b/node_modules/core-js/modules/_wks.js
deleted file mode 100644
index 36f7973ae..000000000
--- a/node_modules/core-js/modules/_wks.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var store = require('./_shared')('wks')
- , uid = require('./_uid')
- , Symbol = require('./_global').Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
-var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-
-$exports.store = store; \ No newline at end of file
diff --git a/node_modules/core-js/modules/core.delay.js b/node_modules/core-js/modules/core.delay.js
index ea031be4a..3e19ef390 100644
--- a/node_modules/core-js/modules/core.delay.js
+++ b/node_modules/core-js/modules/core.delay.js
@@ -1,7 +1,7 @@
-var global = require('./_global')
- , core = require('./_core')
- , $export = require('./_export')
- , partial = require('./_partial');
+var global = require('./$.global')
+ , core = require('./$.core')
+ , $export = require('./$.export')
+ , partial = require('./$.partial');
// https://esdiscuss.org/topic/promise-returning-delay-function
$export($export.G + $export.F, {
delay: function delay(time){
diff --git a/node_modules/core-js/modules/core.dict.js b/node_modules/core-js/modules/core.dict.js
index 88c54e3d7..df3149887 100644
--- a/node_modules/core-js/modules/core.dict.js
+++ b/node_modules/core-js/modules/core.dict.js
@@ -1,22 +1,20 @@
'use strict';
-var ctx = require('./_ctx')
- , $export = require('./_export')
- , createDesc = require('./_property-desc')
- , assign = require('./_object-assign')
- , create = require('./_object-create')
- , getPrototypeOf = require('./_object-gpo')
- , getKeys = require('./_object-keys')
- , dP = require('./_object-dp')
- , keyOf = require('./_keyof')
- , aFunction = require('./_a-function')
- , forOf = require('./_for-of')
- , isIterable = require('./core.is-iterable')
- , $iterCreate = require('./_iter-create')
- , step = require('./_iter-step')
- , isObject = require('./_is-object')
- , toIObject = require('./_to-iobject')
- , DESCRIPTORS = require('./_descriptors')
- , has = require('./_has');
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , $export = require('./$.export')
+ , createDesc = require('./$.property-desc')
+ , assign = require('./$.object-assign')
+ , keyOf = require('./$.keyof')
+ , aFunction = require('./$.a-function')
+ , forOf = require('./$.for-of')
+ , isIterable = require('./core.is-iterable')
+ , $iterCreate = require('./$.iter-create')
+ , step = require('./$.iter-step')
+ , isObject = require('./$.is-object')
+ , toIObject = require('./$.to-iobject')
+ , DESCRIPTORS = require('./$.descriptors')
+ , has = require('./$.has')
+ , getKeys = $.getKeys;
// 0 -> Dict.forEach
// 1 -> Dict.map
@@ -83,7 +81,7 @@ $iterCreate(DictIterator, 'Dict', function(){
});
function Dict(iterable){
- var dict = create(null);
+ var dict = $.create(null);
if(iterable != undefined){
if(isIterable(iterable)){
forOf(iterable, true, function(key, value){
@@ -122,13 +120,13 @@ function get(object, key){
if(has(object, key))return object[key];
}
function set(object, key, value){
- if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value));
+ if(DESCRIPTORS && key in Object)$.setDesc(object, key, createDesc(0, value));
else object[key] = value;
return object;
}
function isDict(it){
- return isObject(it) && getPrototypeOf(it) === Dict.prototype;
+ return isObject(it) && $.getProto(it) === Dict.prototype;
}
$export($export.G + $export.F, {Dict: Dict});
diff --git a/node_modules/core-js/modules/core.function.part.js b/node_modules/core-js/modules/core.function.part.js
index ce851ff84..9943b3077 100644
--- a/node_modules/core-js/modules/core.function.part.js
+++ b/node_modules/core-js/modules/core.function.part.js
@@ -1,7 +1,7 @@
-var path = require('./_path')
- , $export = require('./_export');
+var path = require('./$.path')
+ , $export = require('./$.export');
// Placeholder
-require('./_core')._ = path._ = path._ || {};
+require('./$.core')._ = path._ = path._ || {};
-$export($export.P + $export.F, 'Function', {part: require('./_partial')}); \ No newline at end of file
+$export($export.P + $export.F, 'Function', {part: require('./$.partial')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/core.get-iterator-method.js b/node_modules/core-js/modules/core.get-iterator-method.js
index e2c7ecc3d..02db743c3 100644
--- a/node_modules/core-js/modules/core.get-iterator-method.js
+++ b/node_modules/core-js/modules/core.get-iterator-method.js
@@ -1,7 +1,7 @@
-var classof = require('./_classof')
- , ITERATOR = require('./_wks')('iterator')
- , Iterators = require('./_iterators');
-module.exports = require('./_core').getIteratorMethod = function(it){
+var classof = require('./$.classof')
+ , ITERATOR = require('./$.wks')('iterator')
+ , Iterators = require('./$.iterators');
+module.exports = require('./$.core').getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
diff --git a/node_modules/core-js/modules/core.get-iterator.js b/node_modules/core-js/modules/core.get-iterator.js
index c292e1ab1..7290904a6 100644
--- a/node_modules/core-js/modules/core.get-iterator.js
+++ b/node_modules/core-js/modules/core.get-iterator.js
@@ -1,6 +1,6 @@
-var anObject = require('./_an-object')
+var anObject = require('./$.an-object')
, get = require('./core.get-iterator-method');
-module.exports = require('./_core').getIterator = function(it){
+module.exports = require('./$.core').getIterator = function(it){
var iterFn = get(it);
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
diff --git a/node_modules/core-js/modules/core.is-iterable.js b/node_modules/core-js/modules/core.is-iterable.js
index b2b01b6bb..c27e6588f 100644
--- a/node_modules/core-js/modules/core.is-iterable.js
+++ b/node_modules/core-js/modules/core.is-iterable.js
@@ -1,7 +1,7 @@
-var classof = require('./_classof')
- , ITERATOR = require('./_wks')('iterator')
- , Iterators = require('./_iterators');
-module.exports = require('./_core').isIterable = function(it){
+var classof = require('./$.classof')
+ , ITERATOR = require('./$.wks')('iterator')
+ , Iterators = require('./$.iterators');
+module.exports = require('./$.core').isIterable = function(it){
var O = Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
diff --git a/node_modules/core-js/modules/core.number.iterator.js b/node_modules/core-js/modules/core.number.iterator.js
index 9700acba0..d92737808 100644
--- a/node_modules/core-js/modules/core.number.iterator.js
+++ b/node_modules/core-js/modules/core.number.iterator.js
@@ -1,5 +1,5 @@
'use strict';
-require('./_iter-define')(Number, 'Number', function(iterated){
+require('./$.iter-define')(Number, 'Number', function(iterated){
this._l = +iterated;
this._i = 0;
}, function(){
diff --git a/node_modules/core-js/modules/core.object.classof.js b/node_modules/core-js/modules/core.object.classof.js
index 342c73713..df682e446 100644
--- a/node_modules/core-js/modules/core.object.classof.js
+++ b/node_modules/core-js/modules/core.object.classof.js
@@ -1,3 +1,3 @@
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {classof: require('./_classof')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {classof: require('./$.classof')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/core.object.define.js b/node_modules/core-js/modules/core.object.define.js
index d60e9a951..fe4cbe9b3 100644
--- a/node_modules/core-js/modules/core.object.define.js
+++ b/node_modules/core-js/modules/core.object.define.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , define = require('./_object-define');
+var $export = require('./$.export')
+ , define = require('./$.object-define');
$export($export.S + $export.F, 'Object', {define: define}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/core.object.is-object.js b/node_modules/core-js/modules/core.object.is-object.js
index f2ba059fb..c60a977af 100644
--- a/node_modules/core-js/modules/core.object.is-object.js
+++ b/node_modules/core-js/modules/core.object.is-object.js
@@ -1,3 +1,3 @@
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {isObject: require('./_is-object')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {isObject: require('./$.is-object')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/core.object.make.js b/node_modules/core-js/modules/core.object.make.js
index 3d2a2b5f5..95b999617 100644
--- a/node_modules/core-js/modules/core.object.make.js
+++ b/node_modules/core-js/modules/core.object.make.js
@@ -1,6 +1,6 @@
-var $export = require('./_export')
- , define = require('./_object-define')
- , create = require('./_object-create');
+var $export = require('./$.export')
+ , define = require('./$.object-define')
+ , create = require('./$').create;
$export($export.S + $export.F, 'Object', {
make: function(proto, mixin){
diff --git a/node_modules/core-js/modules/core.regexp.escape.js b/node_modules/core-js/modules/core.regexp.escape.js
deleted file mode 100644
index 54f832ef8..000000000
--- a/node_modules/core-js/modules/core.regexp.escape.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// https://github.com/benjamingr/RexExp.escape
-var $export = require('./_export')
- , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-
-$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
diff --git a/node_modules/core-js/modules/core.string.escape-html.js b/node_modules/core-js/modules/core.string.escape-html.js
index a4b8d2f02..81737e750 100644
--- a/node_modules/core-js/modules/core.string.escape-html.js
+++ b/node_modules/core-js/modules/core.string.escape-html.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export');
-var $re = require('./_replacer')(/[&<>"']/g, {
+var $export = require('./$.export');
+var $re = require('./$.replacer')(/[&<>"']/g, {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
diff --git a/node_modules/core-js/modules/core.string.unescape-html.js b/node_modules/core-js/modules/core.string.unescape-html.js
index 413622b94..9d7a3d2c8 100644
--- a/node_modules/core-js/modules/core.string.unescape-html.js
+++ b/node_modules/core-js/modules/core.string.unescape-html.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export');
-var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
+var $export = require('./$.export');
+var $re = require('./$.replacer')(/&(?:amp|lt|gt|quot|apos);/g, {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
diff --git a/node_modules/core-js/modules/es5.js b/node_modules/core-js/modules/es5.js
index dd7ebadf8..50f72b047 100644
--- a/node_modules/core-js/modules/es5.js
+++ b/node_modules/core-js/modules/es5.js
@@ -1,35 +1,276 @@
-// This file still here for a legacy code and will be removed in a near time
-require('./es6.object.create');
-require('./es6.object.define-property');
-require('./es6.object.define-properties');
-require('./es6.object.get-own-property-descriptor');
-require('./es6.object.get-prototype-of');
-require('./es6.object.keys');
-require('./es6.object.get-own-property-names');
-require('./es6.object.freeze');
-require('./es6.object.seal');
-require('./es6.object.prevent-extensions');
-require('./es6.object.is-frozen');
-require('./es6.object.is-sealed');
-require('./es6.object.is-extensible');
-require('./es6.function.bind');
-require('./es6.array.is-array');
-require('./es6.array.join');
-require('./es6.array.slice');
-require('./es6.array.sort');
-require('./es6.array.for-each');
-require('./es6.array.map');
-require('./es6.array.filter');
-require('./es6.array.some');
-require('./es6.array.every');
-require('./es6.array.reduce');
-require('./es6.array.reduce-right');
-require('./es6.array.index-of');
-require('./es6.array.last-index-of');
-require('./es6.date.now');
-require('./es6.date.to-iso-string');
-require('./es6.date.to-json');
-require('./es6.parse-int');
-require('./es6.parse-float');
-require('./es6.string.trim');
-require('./es6.regexp.to-string'); \ No newline at end of file
+'use strict';
+var $ = require('./$')
+ , $export = require('./$.export')
+ , DESCRIPTORS = require('./$.descriptors')
+ , createDesc = require('./$.property-desc')
+ , html = require('./$.html')
+ , cel = require('./$.dom-create')
+ , has = require('./$.has')
+ , cof = require('./$.cof')
+ , invoke = require('./$.invoke')
+ , fails = require('./$.fails')
+ , anObject = require('./$.an-object')
+ , aFunction = require('./$.a-function')
+ , isObject = require('./$.is-object')
+ , toObject = require('./$.to-object')
+ , toIObject = require('./$.to-iobject')
+ , toInteger = require('./$.to-integer')
+ , toIndex = require('./$.to-index')
+ , toLength = require('./$.to-length')
+ , IObject = require('./$.iobject')
+ , IE_PROTO = require('./$.uid')('__proto__')
+ , createArrayMethod = require('./$.array-methods')
+ , arrayIndexOf = require('./$.array-includes')(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+}
+$export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+});
+
+ // IE 8- don't enum bug keys
+var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+// Create object with `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write('<script>document.F=Object</script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict.prototype[keys1[i]];
+ return createDict();
+};
+var createGetKeys = function(names, length){
+ return function(object){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+};
+var Empty = function(){};
+$export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+});
+
+var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
+};
+
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+$export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+ }
+});
+
+// fallback for not array-like ES3 strings and DOM objects
+$export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+}), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+});
+$export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
+ }
+});
+
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+$export($export.S, 'Array', {isArray: require('./$.is-array')});
+
+var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+};
+
+var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+};
+
+$export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+});
+
+// 20.3.3.1 / 15.9.4.4 Date.now()
+$export($export.S, 'Date', {now: function(){ return +new Date; }});
+
+var lz = function(num){
+ return num > 9 ? num : '0' + num;
+};
+
+// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+// PhantomJS / old WebKit has a broken implementations
+$export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+}) || !fails(function(){
+ new Date(NaN).toISOString();
+})), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.copy-within.js b/node_modules/core-js/modules/es6.array.copy-within.js
index 027f7550e..930ba78d4 100644
--- a/node_modules/core-js/modules/es6.array.copy-within.js
+++ b/node_modules/core-js/modules/es6.array.copy-within.js
@@ -1,6 +1,6 @@
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')});
+$export($export.P, 'Array', {copyWithin: require('./$.array-copy-within')});
-require('./_add-to-unscopables')('copyWithin'); \ No newline at end of file
+require('./$.add-to-unscopables')('copyWithin'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.every.js b/node_modules/core-js/modules/es6.array.every.js
deleted file mode 100644
index fb0673673..000000000
--- a/node_modules/core-js/modules/es6.array.every.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $every = require('./_array-methods')(4);
-
-$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */){
- return $every(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.fill.js b/node_modules/core-js/modules/es6.array.fill.js
index f075c0018..c3b3e2e5d 100644
--- a/node_modules/core-js/modules/es6.array.fill.js
+++ b/node_modules/core-js/modules/es6.array.fill.js
@@ -1,6 +1,6 @@
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P, 'Array', {fill: require('./_array-fill')});
+$export($export.P, 'Array', {fill: require('./$.array-fill')});
-require('./_add-to-unscopables')('fill'); \ No newline at end of file
+require('./$.add-to-unscopables')('fill'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.filter.js b/node_modules/core-js/modules/es6.array.filter.js
deleted file mode 100644
index f60951d37..000000000
--- a/node_modules/core-js/modules/es6.array.filter.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $filter = require('./_array-methods')(2);
-
-$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */){
- return $filter(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.find-index.js b/node_modules/core-js/modules/es6.array.find-index.js
index 530907412..7224a6062 100644
--- a/node_modules/core-js/modules/es6.array.find-index.js
+++ b/node_modules/core-js/modules/es6.array.find-index.js
@@ -1,7 +1,7 @@
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
-var $export = require('./_export')
- , $find = require('./_array-methods')(6)
+var $export = require('./$.export')
+ , $find = require('./$.array-methods')(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
@@ -11,4 +11,4 @@ $export($export.P + $export.F * forced, 'Array', {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')(KEY); \ No newline at end of file
+require('./$.add-to-unscopables')(KEY); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.find.js b/node_modules/core-js/modules/es6.array.find.js
index 90a9acfbe..199e987e7 100644
--- a/node_modules/core-js/modules/es6.array.find.js
+++ b/node_modules/core-js/modules/es6.array.find.js
@@ -1,7 +1,7 @@
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
-var $export = require('./_export')
- , $find = require('./_array-methods')(5)
+var $export = require('./$.export')
+ , $find = require('./$.array-methods')(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
@@ -11,4 +11,4 @@ $export($export.P + $export.F * forced, 'Array', {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')(KEY); \ No newline at end of file
+require('./$.add-to-unscopables')(KEY); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.for-each.js b/node_modules/core-js/modules/es6.array.for-each.js
deleted file mode 100644
index f814fe4ea..000000000
--- a/node_modules/core-js/modules/es6.array.for-each.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $forEach = require('./_array-methods')(0)
- , STRICT = require('./_strict-method')([].forEach, true);
-
-$export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */){
- return $forEach(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.from.js b/node_modules/core-js/modules/es6.array.from.js
index 69e5d4a62..4637d8d24 100644
--- a/node_modules/core-js/modules/es6.array.from.js
+++ b/node_modules/core-js/modules/es6.array.from.js
@@ -1,34 +1,33 @@
'use strict';
-var ctx = require('./_ctx')
- , $export = require('./_export')
- , toObject = require('./_to-object')
- , call = require('./_iter-call')
- , isArrayIter = require('./_is-array-iter')
- , toLength = require('./_to-length')
- , createProperty = require('./_create-property')
- , getIterFn = require('./core.get-iterator-method');
-
-$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
+var ctx = require('./$.ctx')
+ , $export = require('./$.export')
+ , toObject = require('./$.to-object')
+ , call = require('./$.iter-call')
+ , isArrayIter = require('./$.is-array-iter')
+ , toLength = require('./$.to-length')
+ , getIterFn = require('./core.get-iterator-method');
+$export($export.S + $export.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
diff --git a/node_modules/core-js/modules/es6.array.index-of.js b/node_modules/core-js/modules/es6.array.index-of.js
deleted file mode 100644
index 903763157..000000000
--- a/node_modules/core-js/modules/es6.array.index-of.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $indexOf = require('./_array-includes')(false)
- , $native = [].indexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.is-array.js b/node_modules/core-js/modules/es6.array.is-array.js
deleted file mode 100644
index cd5d8c192..000000000
--- a/node_modules/core-js/modules/es6.array.is-array.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = require('./_export');
-
-$export($export.S, 'Array', {isArray: require('./_is-array')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.iterator.js b/node_modules/core-js/modules/es6.array.iterator.js
index 100b344d7..52a546dd1 100644
--- a/node_modules/core-js/modules/es6.array.iterator.js
+++ b/node_modules/core-js/modules/es6.array.iterator.js
@@ -1,14 +1,14 @@
'use strict';
-var addToUnscopables = require('./_add-to-unscopables')
- , step = require('./_iter-step')
- , Iterators = require('./_iterators')
- , toIObject = require('./_to-iobject');
+var addToUnscopables = require('./$.add-to-unscopables')
+ , step = require('./$.iter-step')
+ , Iterators = require('./$.iterators')
+ , toIObject = require('./$.to-iobject');
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
-module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){
+module.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
diff --git a/node_modules/core-js/modules/es6.array.join.js b/node_modules/core-js/modules/es6.array.join.js
deleted file mode 100644
index 1bb656538..000000000
--- a/node_modules/core-js/modules/es6.array.join.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-// 22.1.3.13 Array.prototype.join(separator)
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , arrayJoin = [].join;
-
-// fallback for not array-like strings
-$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {
- join: function join(separator){
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.last-index-of.js b/node_modules/core-js/modules/es6.array.last-index-of.js
deleted file mode 100644
index 75c1eabfa..000000000
--- a/node_modules/core-js/modules/es6.array.last-index-of.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , toInteger = require('./_to-integer')
- , toLength = require('./_to-length')
- , $native = [].lastIndexOf
- , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
- // convert -0 to +0
- if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
- var O = toIObject(this)
- , length = toLength(O.length)
- , index = length - 1;
- if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
- if(index < 0)index = length + index;
- for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
- return -1;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.map.js b/node_modules/core-js/modules/es6.array.map.js
deleted file mode 100644
index f70089f3e..000000000
--- a/node_modules/core-js/modules/es6.array.map.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $map = require('./_array-methods')(1);
-
-$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */){
- return $map(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.of.js b/node_modules/core-js/modules/es6.array.of.js
index dd4e1f816..f623f1573 100644
--- a/node_modules/core-js/modules/es6.array.of.js
+++ b/node_modules/core-js/modules/es6.array.of.js
@@ -1,19 +1,19 @@
'use strict';
-var $export = require('./_export')
- , createProperty = require('./_create-property');
+var $export = require('./$.export');
// WebKit Array.of isn't generic
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
- , aLen = arguments.length
- , result = new (typeof this == 'function' ? this : Array)(aLen);
- while(aLen > index)createProperty(result, index, arguments[index++]);
- result.length = aLen;
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
return result;
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.reduce-right.js b/node_modules/core-js/modules/es6.array.reduce-right.js
deleted file mode 100644
index 0c64d85e8..000000000
--- a/node_modules/core-js/modules/es6.array.reduce-right.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $reduce = require('./_array-reduce');
-
-$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.reduce.js b/node_modules/core-js/modules/es6.array.reduce.js
deleted file mode 100644
index 491f7d252..000000000
--- a/node_modules/core-js/modules/es6.array.reduce.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $reduce = require('./_array-reduce');
-
-$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */){
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.slice.js b/node_modules/core-js/modules/es6.array.slice.js
deleted file mode 100644
index 610bd3990..000000000
--- a/node_modules/core-js/modules/es6.array.slice.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , html = require('./_html')
- , cof = require('./_cof')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length')
- , arraySlice = [].slice;
-
-// fallback for not array-like ES3 strings and DOM objects
-$export($export.P + $export.F * require('./_fails')(function(){
- if(html)arraySlice.call(html);
-}), 'Array', {
- slice: function slice(begin, end){
- var len = toLength(this.length)
- , klass = cof(this);
- end = end === undefined ? len : end;
- if(klass == 'Array')return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len)
- , upTo = toIndex(end, len)
- , size = toLength(upTo - start)
- , cloned = Array(size)
- , i = 0;
- for(; i < size; i++)cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.some.js b/node_modules/core-js/modules/es6.array.some.js
deleted file mode 100644
index fa1095edc..000000000
--- a/node_modules/core-js/modules/es6.array.some.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $some = require('./_array-methods')(3);
-
-$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */){
- return $some(this, callbackfn, arguments[1]);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.sort.js b/node_modules/core-js/modules/es6.array.sort.js
deleted file mode 100644
index 7de1fe77f..000000000
--- a/node_modules/core-js/modules/es6.array.sort.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , aFunction = require('./_a-function')
- , toObject = require('./_to-object')
- , fails = require('./_fails')
- , $sort = [].sort
- , test = [1, 2, 3];
-
-$export($export.P + $export.F * (fails(function(){
- // IE8-
- test.sort(undefined);
-}) || !fails(function(){
- // V8 bug
- test.sort(null);
- // Old WebKit
-}) || !require('./_strict-method')($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn){
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.array.species.js b/node_modules/core-js/modules/es6.array.species.js
index d63c738f7..543bdfe93 100644
--- a/node_modules/core-js/modules/es6.array.species.js
+++ b/node_modules/core-js/modules/es6.array.species.js
@@ -1 +1 @@
-require('./_set-species')('Array'); \ No newline at end of file
+require('./$.set-species')('Array'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.date.now.js b/node_modules/core-js/modules/es6.date.now.js
deleted file mode 100644
index c3ee5fd7f..000000000
--- a/node_modules/core-js/modules/es6.date.now.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = require('./_export');
-
-$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.date.to-iso-string.js b/node_modules/core-js/modules/es6.date.to-iso-string.js
deleted file mode 100644
index 2426c5898..000000000
--- a/node_modules/core-js/modules/es6.date.to-iso-string.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var $export = require('./_export')
- , fails = require('./_fails')
- , getTime = Date.prototype.getTime;
-
-var lz = function(num){
- return num > 9 ? num : '0' + num;
-};
-
-// PhantomJS / old WebKit has a broken implementations
-$export($export.P + $export.F * (fails(function(){
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
-}) || !fails(function(){
- new Date(NaN).toISOString();
-})), 'Date', {
- toISOString: function toISOString(){
- if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
- var d = this
- , y = d.getUTCFullYear()
- , m = d.getUTCMilliseconds()
- , s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.date.to-json.js b/node_modules/core-js/modules/es6.date.to-json.js
deleted file mode 100644
index eb419d03f..000000000
--- a/node_modules/core-js/modules/es6.date.to-json.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive');
-
-$export($export.P + $export.F * require('./_fails')(function(){
- return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
-}), 'Date', {
- toJSON: function toJSON(key){
- var O = toObject(this)
- , pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.date.to-primitive.js b/node_modules/core-js/modules/es6.date.to-primitive.js
deleted file mode 100644
index 15a823d59..000000000
--- a/node_modules/core-js/modules/es6.date.to-primitive.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var TO_PRIMITIVE = require('./_wks')('toPrimitive')
- , proto = Date.prototype;
-
-if(!(TO_PRIMITIVE in proto))require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.date.to-string.js b/node_modules/core-js/modules/es6.date.to-string.js
index 686e949e0..59bf83654 100644
--- a/node_modules/core-js/modules/es6.date.to-string.js
+++ b/node_modules/core-js/modules/es6.date.to-string.js
@@ -1,11 +1,10 @@
var DateProto = Date.prototype
, INVALID_DATE = 'Invalid Date'
, TO_STRING = 'toString'
- , $toString = DateProto[TO_STRING]
- , getTime = DateProto.getTime;
+ , $toString = DateProto[TO_STRING];
if(new Date(NaN) + '' != INVALID_DATE){
- require('./_redefine')(DateProto, TO_STRING, function toString(){
- var value = getTime.call(this);
+ require('./$.redefine')(DateProto, TO_STRING, function toString(){
+ var value = +this;
return value === value ? $toString.call(this) : INVALID_DATE;
});
} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.function.bind.js b/node_modules/core-js/modules/es6.function.bind.js
deleted file mode 100644
index 85f103799..000000000
--- a/node_modules/core-js/modules/es6.function.bind.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = require('./_export');
-
-$export($export.P, 'Function', {bind: require('./_bind')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.function.has-instance.js b/node_modules/core-js/modules/es6.function.has-instance.js
index ae294b1f1..94d840f86 100644
--- a/node_modules/core-js/modules/es6.function.has-instance.js
+++ b/node_modules/core-js/modules/es6.function.has-instance.js
@@ -1,13 +1,13 @@
'use strict';
-var isObject = require('./_is-object')
- , getPrototypeOf = require('./_object-gpo')
- , HAS_INSTANCE = require('./_wks')('hasInstance')
- , FunctionProto = Function.prototype;
+var $ = require('./$')
+ , isObject = require('./$.is-object')
+ , HAS_INSTANCE = require('./$.wks')('hasInstance')
+ , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
-if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){
+if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.function.name.js b/node_modules/core-js/modules/es6.function.name.js
index f824d86d2..0f10fc11f 100644
--- a/node_modules/core-js/modules/es6.function.name.js
+++ b/node_modules/core-js/modules/es6.function.name.js
@@ -1,25 +1,16 @@
-var dP = require('./_object-dp').f
- , createDesc = require('./_property-desc')
- , has = require('./_has')
+var setDesc = require('./$').setDesc
+ , createDesc = require('./$.property-desc')
+ , has = require('./$.has')
, FProto = Function.prototype
, nameRE = /^\s*function ([^ (]*)/
, NAME = 'name';
-
-var isExtensible = Object.isExtensible || function(){
- return true;
-};
-
// 19.2.4.2 name
-NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
+NAME in FProto || require('./$.descriptors') && setDesc(FProto, NAME, {
configurable: true,
get: function(){
- try {
- var that = this
- , name = ('' + that).match(nameRE)[1];
- has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name));
- return name;
- } catch(e){
- return '';
- }
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || setDesc(this, NAME, createDesc(5, name));
+ return name;
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.map.js b/node_modules/core-js/modules/es6.map.js
index a166430fc..54fd5c1ab 100644
--- a/node_modules/core-js/modules/es6.map.js
+++ b/node_modules/core-js/modules/es6.map.js
@@ -1,8 +1,8 @@
'use strict';
-var strong = require('./_collection-strong');
+var strong = require('./$.collection-strong');
// 23.1 Map Objects
-module.exports = require('./_collection')('Map', function(get){
+require('./$.collection')('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
diff --git a/node_modules/core-js/modules/es6.math.acosh.js b/node_modules/core-js/modules/es6.math.acosh.js
index 459f11990..f69282a8c 100644
--- a/node_modules/core-js/modules/es6.math.acosh.js
+++ b/node_modules/core-js/modules/es6.math.acosh.js
@@ -1,15 +1,11 @@
// 20.2.2.3 Math.acosh(x)
-var $export = require('./_export')
- , log1p = require('./_math-log1p')
+var $export = require('./$.export')
+ , log1p = require('./$.math-log1p')
, sqrt = Math.sqrt
, $acosh = Math.acosh;
-$export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
-), 'Math', {
+// V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
diff --git a/node_modules/core-js/modules/es6.math.asinh.js b/node_modules/core-js/modules/es6.math.asinh.js
index e6a74abb5..bd34adf01 100644
--- a/node_modules/core-js/modules/es6.math.asinh.js
+++ b/node_modules/core-js/modules/es6.math.asinh.js
@@ -1,10 +1,8 @@
// 20.2.2.5 Math.asinh(x)
-var $export = require('./_export')
- , $asinh = Math.asinh;
+var $export = require('./$.export');
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
-// Tor Browser bug: Math.asinh(0) -> -0
-$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); \ No newline at end of file
+$export($export.S, 'Math', {asinh: asinh}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.math.atanh.js b/node_modules/core-js/modules/es6.math.atanh.js
index 94575d9f0..656ea409d 100644
--- a/node_modules/core-js/modules/es6.math.atanh.js
+++ b/node_modules/core-js/modules/es6.math.atanh.js
@@ -1,9 +1,7 @@
// 20.2.2.7 Math.atanh(x)
-var $export = require('./_export')
- , $atanh = Math.atanh;
+var $export = require('./$.export');
-// Tor Browser bug: Math.atanh(-0) -> 0
-$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+$export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
diff --git a/node_modules/core-js/modules/es6.math.cbrt.js b/node_modules/core-js/modules/es6.math.cbrt.js
index 7ca7daea8..79a1fbc87 100644
--- a/node_modules/core-js/modules/es6.math.cbrt.js
+++ b/node_modules/core-js/modules/es6.math.cbrt.js
@@ -1,6 +1,6 @@
// 20.2.2.9 Math.cbrt(x)
-var $export = require('./_export')
- , sign = require('./_math-sign');
+var $export = require('./$.export')
+ , sign = require('./$.math-sign');
$export($export.S, 'Math', {
cbrt: function cbrt(x){
diff --git a/node_modules/core-js/modules/es6.math.clz32.js b/node_modules/core-js/modules/es6.math.clz32.js
index 1ec534bd0..edd11588c 100644
--- a/node_modules/core-js/modules/es6.math.clz32.js
+++ b/node_modules/core-js/modules/es6.math.clz32.js
@@ -1,5 +1,5 @@
// 20.2.2.11 Math.clz32(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
clz32: function clz32(x){
diff --git a/node_modules/core-js/modules/es6.math.cosh.js b/node_modules/core-js/modules/es6.math.cosh.js
index 4f2b21552..d1df7490c 100644
--- a/node_modules/core-js/modules/es6.math.cosh.js
+++ b/node_modules/core-js/modules/es6.math.cosh.js
@@ -1,5 +1,5 @@
// 20.2.2.12 Math.cosh(x)
-var $export = require('./_export')
+var $export = require('./$.export')
, exp = Math.exp;
$export($export.S, 'Math', {
diff --git a/node_modules/core-js/modules/es6.math.expm1.js b/node_modules/core-js/modules/es6.math.expm1.js
index 9762b7cd0..e27742fe3 100644
--- a/node_modules/core-js/modules/es6.math.expm1.js
+++ b/node_modules/core-js/modules/es6.math.expm1.js
@@ -1,5 +1,4 @@
// 20.2.2.14 Math.expm1(x)
-var $export = require('./_export')
- , $expm1 = require('./_math-expm1');
+var $export = require('./$.export');
-$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); \ No newline at end of file
+$export($export.S, 'Math', {expm1: require('./$.math-expm1')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.math.fround.js b/node_modules/core-js/modules/es6.math.fround.js
index 01a88862e..43cd70c7b 100644
--- a/node_modules/core-js/modules/es6.math.fround.js
+++ b/node_modules/core-js/modules/es6.math.fround.js
@@ -1,6 +1,6 @@
// 20.2.2.16 Math.fround(x)
-var $export = require('./_export')
- , sign = require('./_math-sign')
+var $export = require('./$.export')
+ , sign = require('./$.math-sign')
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
diff --git a/node_modules/core-js/modules/es6.math.hypot.js b/node_modules/core-js/modules/es6.math.hypot.js
index 508521b69..a8edf7cde 100644
--- a/node_modules/core-js/modules/es6.math.hypot.js
+++ b/node_modules/core-js/modules/es6.math.hypot.js
@@ -1,16 +1,17 @@
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
-var $export = require('./_export')
+var $export = require('./$.export')
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
- var sum = 0
- , i = 0
- , aLen = arguments.length
- , larg = 0
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
, arg, div;
- while(i < aLen){
- arg = abs(arguments[i++]);
+ while(i < $$len){
+ arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
diff --git a/node_modules/core-js/modules/es6.math.imul.js b/node_modules/core-js/modules/es6.math.imul.js
index 7f4111d27..926053def 100644
--- a/node_modules/core-js/modules/es6.math.imul.js
+++ b/node_modules/core-js/modules/es6.math.imul.js
@@ -1,9 +1,9 @@
// 20.2.2.18 Math.imul(x, y)
-var $export = require('./_export')
+var $export = require('./$.export')
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
diff --git a/node_modules/core-js/modules/es6.math.log10.js b/node_modules/core-js/modules/es6.math.log10.js
index 791dfc353..ef5ae6a96 100644
--- a/node_modules/core-js/modules/es6.math.log10.js
+++ b/node_modules/core-js/modules/es6.math.log10.js
@@ -1,5 +1,5 @@
// 20.2.2.21 Math.log10(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
log10: function log10(x){
diff --git a/node_modules/core-js/modules/es6.math.log1p.js b/node_modules/core-js/modules/es6.math.log1p.js
index a1de0258d..31c395ec8 100644
--- a/node_modules/core-js/modules/es6.math.log1p.js
+++ b/node_modules/core-js/modules/es6.math.log1p.js
@@ -1,4 +1,4 @@
// 20.2.2.20 Math.log1p(x)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Math', {log1p: require('./_math-log1p')}); \ No newline at end of file
+$export($export.S, 'Math', {log1p: require('./$.math-log1p')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.math.log2.js b/node_modules/core-js/modules/es6.math.log2.js
index c4ba7819c..24c0124b0 100644
--- a/node_modules/core-js/modules/es6.math.log2.js
+++ b/node_modules/core-js/modules/es6.math.log2.js
@@ -1,5 +1,5 @@
// 20.2.2.22 Math.log2(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
log2: function log2(x){
diff --git a/node_modules/core-js/modules/es6.math.sign.js b/node_modules/core-js/modules/es6.math.sign.js
index 5dbee6f66..fd8d8bc36 100644
--- a/node_modules/core-js/modules/es6.math.sign.js
+++ b/node_modules/core-js/modules/es6.math.sign.js
@@ -1,4 +1,4 @@
// 20.2.2.28 Math.sign(x)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Math', {sign: require('./_math-sign')}); \ No newline at end of file
+$export($export.S, 'Math', {sign: require('./$.math-sign')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.math.sinh.js b/node_modules/core-js/modules/es6.math.sinh.js
index 5464ae3e6..a01c4d374 100644
--- a/node_modules/core-js/modules/es6.math.sinh.js
+++ b/node_modules/core-js/modules/es6.math.sinh.js
@@ -1,10 +1,10 @@
// 20.2.2.30 Math.sinh(x)
-var $export = require('./_export')
- , expm1 = require('./_math-expm1')
+var $export = require('./$.export')
+ , expm1 = require('./$.math-expm1')
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
-$export($export.S + $export.F * require('./_fails')(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
diff --git a/node_modules/core-js/modules/es6.math.tanh.js b/node_modules/core-js/modules/es6.math.tanh.js
index d2f10778c..0d081a5da 100644
--- a/node_modules/core-js/modules/es6.math.tanh.js
+++ b/node_modules/core-js/modules/es6.math.tanh.js
@@ -1,6 +1,6 @@
// 20.2.2.33 Math.tanh(x)
-var $export = require('./_export')
- , expm1 = require('./_math-expm1')
+var $export = require('./$.export')
+ , expm1 = require('./$.math-expm1')
, exp = Math.exp;
$export($export.S, 'Math', {
diff --git a/node_modules/core-js/modules/es6.math.trunc.js b/node_modules/core-js/modules/es6.math.trunc.js
index 2e42563b6..f3f085596 100644
--- a/node_modules/core-js/modules/es6.math.trunc.js
+++ b/node_modules/core-js/modules/es6.math.trunc.js
@@ -1,5 +1,5 @@
// 20.2.2.34 Math.trunc(x)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Math', {
trunc: function trunc(it){
diff --git a/node_modules/core-js/modules/es6.number.constructor.js b/node_modules/core-js/modules/es6.number.constructor.js
index d562365bc..065af1a98 100644
--- a/node_modules/core-js/modules/es6.number.constructor.js
+++ b/node_modules/core-js/modules/es6.number.constructor.js
@@ -1,21 +1,18 @@
'use strict';
-var global = require('./_global')
- , has = require('./_has')
- , cof = require('./_cof')
- , inheritIfRequired = require('./_inherit-if-required')
- , toPrimitive = require('./_to-primitive')
- , fails = require('./_fails')
- , gOPN = require('./_object-gopn').f
- , gOPD = require('./_object-gopd').f
- , dP = require('./_object-dp').f
- , $trim = require('./_string-trim').trim
- , NUMBER = 'Number'
- , $Number = global[NUMBER]
- , Base = $Number
- , proto = $Number.prototype
+var $ = require('./$')
+ , global = require('./$.global')
+ , has = require('./$.has')
+ , cof = require('./$.cof')
+ , toPrimitive = require('./$.to-primitive')
+ , fails = require('./$.fails')
+ , $trim = require('./$.string-trim').trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
// Opera ~12 has broken Object#toString
- , BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER
- , TRIM = 'trim' in String.prototype;
+ , BROKEN_COF = cof($.create(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function(argument){
@@ -50,20 +47,20 @@ if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ ? new Base(toNumber(it)) : toNumber(it);
};
- for(var keys = require('./_descriptors') ? gOPN(Base) : (
+ $.each.call(require('./$.descriptors') ? $.getNames(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++){
- if(has(Base, key = keys[j]) && !has($Number, key)){
- dP($Number, key, gOPD(Base, key));
+ ).split(','), function(key){
+ if(has(Base, key) && !has($Number, key)){
+ $.setDesc($Number, key, $.getDesc(Base, key));
}
- }
+ });
$Number.prototype = proto;
proto.constructor = $Number;
- require('./_redefine')(global, NUMBER, $Number);
+ require('./$.redefine')(global, NUMBER, $Number);
} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.epsilon.js b/node_modules/core-js/modules/es6.number.epsilon.js
index d25898ccc..45c865cfa 100644
--- a/node_modules/core-js/modules/es6.number.epsilon.js
+++ b/node_modules/core-js/modules/es6.number.epsilon.js
@@ -1,4 +1,4 @@
// 20.1.2.1 Number.EPSILON
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.is-finite.js b/node_modules/core-js/modules/es6.number.is-finite.js
index c8c42753b..362a6c80d 100644
--- a/node_modules/core-js/modules/es6.number.is-finite.js
+++ b/node_modules/core-js/modules/es6.number.is-finite.js
@@ -1,6 +1,6 @@
// 20.1.2.2 Number.isFinite(number)
-var $export = require('./_export')
- , _isFinite = require('./_global').isFinite;
+var $export = require('./$.export')
+ , _isFinite = require('./$.global').isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
diff --git a/node_modules/core-js/modules/es6.number.is-integer.js b/node_modules/core-js/modules/es6.number.is-integer.js
index dc0f8f009..189db9a27 100644
--- a/node_modules/core-js/modules/es6.number.is-integer.js
+++ b/node_modules/core-js/modules/es6.number.is-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.3 Number.isInteger(number)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Number', {isInteger: require('./_is-integer')}); \ No newline at end of file
+$export($export.S, 'Number', {isInteger: require('./$.is-integer')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.is-nan.js b/node_modules/core-js/modules/es6.number.is-nan.js
index 5fedf8252..151bb4b2b 100644
--- a/node_modules/core-js/modules/es6.number.is-nan.js
+++ b/node_modules/core-js/modules/es6.number.is-nan.js
@@ -1,5 +1,5 @@
// 20.1.2.4 Number.isNaN(number)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {
isNaN: function isNaN(number){
diff --git a/node_modules/core-js/modules/es6.number.is-safe-integer.js b/node_modules/core-js/modules/es6.number.is-safe-integer.js
index 92193e2ec..e23b4cbc5 100644
--- a/node_modules/core-js/modules/es6.number.is-safe-integer.js
+++ b/node_modules/core-js/modules/es6.number.is-safe-integer.js
@@ -1,6 +1,6 @@
// 20.1.2.5 Number.isSafeInteger(number)
-var $export = require('./_export')
- , isInteger = require('./_is-integer')
+var $export = require('./$.export')
+ , isInteger = require('./$.is-integer')
, abs = Math.abs;
$export($export.S, 'Number', {
diff --git a/node_modules/core-js/modules/es6.number.max-safe-integer.js b/node_modules/core-js/modules/es6.number.max-safe-integer.js
index b9d7f2a77..a1aaf7412 100644
--- a/node_modules/core-js/modules/es6.number.max-safe-integer.js
+++ b/node_modules/core-js/modules/es6.number.max-safe-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.6 Number.MAX_SAFE_INTEGER
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.min-safe-integer.js b/node_modules/core-js/modules/es6.number.min-safe-integer.js
index 9a2beeb3c..ab97cb5dc 100644
--- a/node_modules/core-js/modules/es6.number.min-safe-integer.js
+++ b/node_modules/core-js/modules/es6.number.min-safe-integer.js
@@ -1,4 +1,4 @@
// 20.1.2.10 Number.MIN_SAFE_INTEGER
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.parse-float.js b/node_modules/core-js/modules/es6.number.parse-float.js
index 7ee14da03..1d0c96741 100644
--- a/node_modules/core-js/modules/es6.number.parse-float.js
+++ b/node_modules/core-js/modules/es6.number.parse-float.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
// 20.1.2.12 Number.parseFloat(string)
-$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); \ No newline at end of file
+var $export = require('./$.export');
+
+$export($export.S, 'Number', {parseFloat: parseFloat}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.parse-int.js b/node_modules/core-js/modules/es6.number.parse-int.js
index 59bf14459..813b5b795 100644
--- a/node_modules/core-js/modules/es6.number.parse-int.js
+++ b/node_modules/core-js/modules/es6.number.parse-int.js
@@ -1,4 +1,4 @@
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
// 20.1.2.13 Number.parseInt(string, radix)
-$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); \ No newline at end of file
+var $export = require('./$.export');
+
+$export($export.S, 'Number', {parseInt: parseInt}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.to-fixed.js b/node_modules/core-js/modules/es6.number.to-fixed.js
deleted file mode 100644
index c54970d6a..000000000
--- a/node_modules/core-js/modules/es6.number.to-fixed.js
+++ /dev/null
@@ -1,113 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toInteger = require('./_to-integer')
- , aNumberValue = require('./_a-number-value')
- , repeat = require('./_string-repeat')
- , $toFixed = 1..toFixed
- , floor = Math.floor
- , data = [0, 0, 0, 0, 0, 0]
- , ERROR = 'Number.toFixed: incorrect invocation!'
- , ZERO = '0';
-
-var multiply = function(n, c){
- var i = -1
- , c2 = c;
- while(++i < 6){
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
-};
-var divide = function(n){
- var i = 6
- , c = 0;
- while(--i >= 0){
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
-};
-var numToString = function(){
- var i = 6
- , s = '';
- while(--i >= 0){
- if(s !== '' || i === 0 || data[i] !== 0){
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
-};
-var pow = function(x, n, acc){
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
-};
-var log = function(x){
- var n = 0
- , x2 = x;
- while(x2 >= 4096){
- n += 12;
- x2 /= 4096;
- }
- while(x2 >= 2){
- n += 1;
- x2 /= 2;
- } return n;
-};
-
-$export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128..toFixed(0) !== '1000000000000000128'
-) || !require('./_fails')(function(){
- // V8 ~ Android 4.3-
- $toFixed.call({});
-})), 'Number', {
- toFixed: function toFixed(fractionDigits){
- var x = aNumberValue(this, ERROR)
- , f = toInteger(fractionDigits)
- , s = ''
- , m = ZERO
- , e, z, j, k;
- if(f < 0 || f > 20)throw RangeError(ERROR);
- if(x != x)return 'NaN';
- if(x <= -1e21 || x >= 1e21)return String(x);
- if(x < 0){
- s = '-';
- x = -x;
- }
- if(x > 1e-21){
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if(e > 0){
- multiply(0, z);
- j = f;
- while(j >= 7){
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while(j >= 23){
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if(f > 0){
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.number.to-precision.js b/node_modules/core-js/modules/es6.number.to-precision.js
deleted file mode 100644
index 903dacdf0..000000000
--- a/node_modules/core-js/modules/es6.number.to-precision.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , $fails = require('./_fails')
- , aNumberValue = require('./_a-number-value')
- , $toPrecision = 1..toPrecision;
-
-$export($export.P + $export.F * ($fails(function(){
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
-}) || !$fails(function(){
- // V8 ~ Android 4.3-
- $toPrecision.call({});
-})), 'Number', {
- toPrecision: function toPrecision(precision){
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.assign.js b/node_modules/core-js/modules/es6.object.assign.js
index 13eda2cb8..b62e7a420 100644
--- a/node_modules/core-js/modules/es6.object.assign.js
+++ b/node_modules/core-js/modules/es6.object.assign.js
@@ -1,4 +1,4 @@
// 19.1.3.1 Object.assign(target, source)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')}); \ No newline at end of file
+$export($export.S + $export.F, 'Object', {assign: require('./$.object-assign')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.create.js b/node_modules/core-js/modules/es6.object.create.js
deleted file mode 100644
index 17e4b2842..000000000
--- a/node_modules/core-js/modules/es6.object.create.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export')
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-$export($export.S, 'Object', {create: require('./_object-create')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.define-properties.js b/node_modules/core-js/modules/es6.object.define-properties.js
deleted file mode 100644
index 183eec6f5..000000000
--- a/node_modules/core-js/modules/es6.object.define-properties.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export');
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
-$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.define-property.js b/node_modules/core-js/modules/es6.object.define-property.js
deleted file mode 100644
index 71807cc05..000000000
--- a/node_modules/core-js/modules/es6.object.define-property.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var $export = require('./_export');
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
-$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.freeze.js b/node_modules/core-js/modules/es6.object.freeze.js
index 34b510842..fa87c9512 100644
--- a/node_modules/core-js/modules/es6.object.freeze.js
+++ b/node_modules/core-js/modules/es6.object.freeze.js
@@ -1,9 +1,8 @@
// 19.1.2.5 Object.freeze(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('freeze', function($freeze){
+require('./$.object-sap')('freeze', function($freeze){
return function freeze(it){
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
+ return $freeze && isObject(it) ? $freeze(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js
index 60c69913a..9b253acdd 100644
--- a/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js
+++ b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js
@@ -1,8 +1,7 @@
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
-var toIObject = require('./_to-iobject')
- , $getOwnPropertyDescriptor = require('./_object-gopd').f;
+var toIObject = require('./$.to-iobject');
-require('./_object-sap')('getOwnPropertyDescriptor', function(){
+require('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
return function getOwnPropertyDescriptor(it, key){
return $getOwnPropertyDescriptor(toIObject(it), key);
};
diff --git a/node_modules/core-js/modules/es6.object.get-own-property-names.js b/node_modules/core-js/modules/es6.object.get-own-property-names.js
index 91dd110d2..e87bcf607 100644
--- a/node_modules/core-js/modules/es6.object.get-own-property-names.js
+++ b/node_modules/core-js/modules/es6.object.get-own-property-names.js
@@ -1,4 +1,4 @@
// 19.1.2.7 Object.getOwnPropertyNames(O)
-require('./_object-sap')('getOwnPropertyNames', function(){
- return require('./_object-gopn-ext').f;
+require('./$.object-sap')('getOwnPropertyNames', function(){
+ return require('./$.get-names').get;
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.get-prototype-of.js b/node_modules/core-js/modules/es6.object.get-prototype-of.js
index b124e28fa..9ec0405b6 100644
--- a/node_modules/core-js/modules/es6.object.get-prototype-of.js
+++ b/node_modules/core-js/modules/es6.object.get-prototype-of.js
@@ -1,8 +1,7 @@
// 19.1.2.9 Object.getPrototypeOf(O)
-var toObject = require('./_to-object')
- , $getPrototypeOf = require('./_object-gpo');
+var toObject = require('./$.to-object');
-require('./_object-sap')('getPrototypeOf', function(){
+require('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){
return function getPrototypeOf(it){
return $getPrototypeOf(toObject(it));
};
diff --git a/node_modules/core-js/modules/es6.object.is-extensible.js b/node_modules/core-js/modules/es6.object.is-extensible.js
index 94bf8a815..ada2b95a9 100644
--- a/node_modules/core-js/modules/es6.object.is-extensible.js
+++ b/node_modules/core-js/modules/es6.object.is-extensible.js
@@ -1,7 +1,7 @@
// 19.1.2.11 Object.isExtensible(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isExtensible', function($isExtensible){
+require('./$.object-sap')('isExtensible', function($isExtensible){
return function isExtensible(it){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
diff --git a/node_modules/core-js/modules/es6.object.is-frozen.js b/node_modules/core-js/modules/es6.object.is-frozen.js
index 4bdfd11b1..b3e44d1b7 100644
--- a/node_modules/core-js/modules/es6.object.is-frozen.js
+++ b/node_modules/core-js/modules/es6.object.is-frozen.js
@@ -1,7 +1,7 @@
// 19.1.2.12 Object.isFrozen(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isFrozen', function($isFrozen){
+require('./$.object-sap')('isFrozen', function($isFrozen){
return function isFrozen(it){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
diff --git a/node_modules/core-js/modules/es6.object.is-sealed.js b/node_modules/core-js/modules/es6.object.is-sealed.js
index d13aa1b06..423caf331 100644
--- a/node_modules/core-js/modules/es6.object.is-sealed.js
+++ b/node_modules/core-js/modules/es6.object.is-sealed.js
@@ -1,7 +1,7 @@
// 19.1.2.13 Object.isSealed(O)
-var isObject = require('./_is-object');
+var isObject = require('./$.is-object');
-require('./_object-sap')('isSealed', function($isSealed){
+require('./$.object-sap')('isSealed', function($isSealed){
return function isSealed(it){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
diff --git a/node_modules/core-js/modules/es6.object.is.js b/node_modules/core-js/modules/es6.object.is.js
index ad2994256..3ae3b6046 100644
--- a/node_modules/core-js/modules/es6.object.is.js
+++ b/node_modules/core-js/modules/es6.object.is.js
@@ -1,3 +1,3 @@
// 19.1.3.10 Object.is(value1, value2)
-var $export = require('./_export');
-$export($export.S, 'Object', {is: require('./_same-value')}); \ No newline at end of file
+var $export = require('./$.export');
+$export($export.S, 'Object', {is: require('./$.same-value')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.keys.js b/node_modules/core-js/modules/es6.object.keys.js
index bf76c07d7..e3c18c020 100644
--- a/node_modules/core-js/modules/es6.object.keys.js
+++ b/node_modules/core-js/modules/es6.object.keys.js
@@ -1,8 +1,7 @@
// 19.1.2.14 Object.keys(O)
-var toObject = require('./_to-object')
- , $keys = require('./_object-keys');
+var toObject = require('./$.to-object');
-require('./_object-sap')('keys', function(){
+require('./$.object-sap')('keys', function($keys){
return function keys(it){
return $keys(toObject(it));
};
diff --git a/node_modules/core-js/modules/es6.object.prevent-extensions.js b/node_modules/core-js/modules/es6.object.prevent-extensions.js
index adaff7a79..20f879e28 100644
--- a/node_modules/core-js/modules/es6.object.prevent-extensions.js
+++ b/node_modules/core-js/modules/es6.object.prevent-extensions.js
@@ -1,9 +1,8 @@
// 19.1.2.15 Object.preventExtensions(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('preventExtensions', function($preventExtensions){
+require('./$.object-sap')('preventExtensions', function($preventExtensions){
return function preventExtensions(it){
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.seal.js b/node_modules/core-js/modules/es6.object.seal.js
index d7e4ea958..85a7fa98f 100644
--- a/node_modules/core-js/modules/es6.object.seal.js
+++ b/node_modules/core-js/modules/es6.object.seal.js
@@ -1,9 +1,8 @@
// 19.1.2.17 Object.seal(O)
-var isObject = require('./_is-object')
- , meta = require('./_meta').onFreeze;
+var isObject = require('./$.is-object');
-require('./_object-sap')('seal', function($seal){
+require('./$.object-sap')('seal', function($seal){
return function seal(it){
- return $seal && isObject(it) ? $seal(meta(it)) : it;
+ return $seal && isObject(it) ? $seal(it) : it;
};
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.set-prototype-of.js b/node_modules/core-js/modules/es6.object.set-prototype-of.js
index 5bbe4c068..79a147c3f 100644
--- a/node_modules/core-js/modules/es6.object.set-prototype-of.js
+++ b/node_modules/core-js/modules/es6.object.set-prototype-of.js
@@ -1,3 +1,3 @@
// 19.1.3.19 Object.setPrototypeOf(O, proto)
-var $export = require('./_export');
-$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set}); \ No newline at end of file
+var $export = require('./$.export');
+$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.object.to-string.js b/node_modules/core-js/modules/es6.object.to-string.js
index e644a5d1f..409d51935 100644
--- a/node_modules/core-js/modules/es6.object.to-string.js
+++ b/node_modules/core-js/modules/es6.object.to-string.js
@@ -1,10 +1,10 @@
'use strict';
// 19.1.3.6 Object.prototype.toString()
-var classof = require('./_classof')
+var classof = require('./$.classof')
, test = {};
-test[require('./_wks')('toStringTag')] = 'z';
+test[require('./$.wks')('toStringTag')] = 'z';
if(test + '' != '[object z]'){
- require('./_redefine')(Object.prototype, 'toString', function toString(){
+ require('./$.redefine')(Object.prototype, 'toString', function toString(){
return '[object ' + classof(this) + ']';
}, true);
} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.parse-float.js b/node_modules/core-js/modules/es6.parse-float.js
deleted file mode 100644
index 5201712b1..000000000
--- a/node_modules/core-js/modules/es6.parse-float.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
-// 18.2.4 parseFloat(string)
-$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.parse-int.js b/node_modules/core-js/modules/es6.parse-int.js
deleted file mode 100644
index 5a2bfaff0..000000000
--- a/node_modules/core-js/modules/es6.parse-int.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
-// 18.2.5 parseInt(string, radix)
-$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.promise.js b/node_modules/core-js/modules/es6.promise.js
index 262a93af1..fbf20177a 100644
--- a/node_modules/core-js/modules/es6.promise.js
+++ b/node_modules/core-js/modules/es6.promise.js
@@ -1,58 +1,86 @@
'use strict';
-var LIBRARY = require('./_library')
- , global = require('./_global')
- , ctx = require('./_ctx')
- , classof = require('./_classof')
- , $export = require('./_export')
- , isObject = require('./_is-object')
- , aFunction = require('./_a-function')
- , anInstance = require('./_an-instance')
- , forOf = require('./_for-of')
- , speciesConstructor = require('./_species-constructor')
- , task = require('./_task').set
- , microtask = require('./_microtask')()
- , PROMISE = 'Promise'
- , TypeError = global.TypeError
- , process = global.process
- , $Promise = global[PROMISE]
- , process = global.process
- , isNode = classof(process) == 'process'
- , empty = function(){ /* empty */ }
- , Internal, GenericPromiseCapability, Wrapper;
+var $ = require('./$')
+ , LIBRARY = require('./$.library')
+ , global = require('./$.global')
+ , ctx = require('./$.ctx')
+ , classof = require('./$.classof')
+ , $export = require('./$.export')
+ , isObject = require('./$.is-object')
+ , anObject = require('./$.an-object')
+ , aFunction = require('./$.a-function')
+ , strictNew = require('./$.strict-new')
+ , forOf = require('./$.for-of')
+ , setProto = require('./$.set-proto').set
+ , same = require('./$.same-value')
+ , SPECIES = require('./$.wks')('species')
+ , speciesConstructor = require('./$.species-constructor')
+ , asap = require('./$.microtask')
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , empty = function(){ /* empty */ }
+ , Wrapper;
-var USE_NATIVE = !!function(){
+var testResolve = function(sub){
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
+};
+
+var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1)
- , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch(e){ /* empty */ }
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && require('./$.descriptors')){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
}();
// helpers
var sameConstructor = function(a, b){
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+};
+var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
-var newPromiseCapability = function(C){
- return sameConstructor($Promise, C)
- ? new PromiseCapability(C)
- : new GenericPromiseCapability(C);
-};
-var PromiseCapability = GenericPromiseCapability = function(C){
+var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
};
var perform = function(exec){
try {
@@ -61,32 +89,23 @@ var perform = function(exec){
return {error: e};
}
};
-var notify = function(promise, isReject){
- if(promise._n)return;
- promise._n = true;
- var chain = promise._c;
- microtask(function(){
- var value = promise._v
- , ok = promise._s == 1
+var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
- , domain = reaction.domain
, result, then;
try {
if(handler){
- if(!ok){
- if(promise._h == 2)onHandleUnhandled(promise);
- promise._h = 1;
- }
- if(handler === true)result = value;
- else {
- if(domain)domain.enter();
- result = handler(value);
- if(domain)domain.exit();
- }
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
@@ -98,17 +117,12 @@ var notify = function(promise, isReject){
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if(isReject && !promise._h)onUnhandled(promise);
- });
-};
-var onUnhandled = function(promise){
- task.call(global, function(){
- var value = promise._v
- , abrupt, handler, console;
- if(isUnhandled(promise)){
- abrupt = perform(function(){
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
@@ -116,54 +130,42 @@ var onUnhandled = function(promise){
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if(abrupt)throw abrupt.error;
+ } record.a = undefined;
+ }, 1);
});
};
var isUnhandled = function(promise){
- if(promise._h == 1)return false;
- var chain = promise._a || promise._c
- , i = 0
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
, reaction;
+ if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
-var onHandleUnhandled = function(promise){
- task.call(global, function(){
- var handler;
- if(isNode){
- process.emit('rejectionHandled', promise);
- } else if(handler = global.onrejectionhandled){
- handler({promise: promise, reason: promise._v});
- }
- });
-};
var $reject = function(value){
- var promise = this;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if(!promise._a)promise._a = promise._c.slice();
- notify(promise, true);
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
};
var $resolve = function(value){
- var promise = this
+ var record = this
, then;
- if(promise._d)return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
try {
- if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
- microtask(function(){
- var wrapper = {_w: promise, _d: false}; // wrap
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
@@ -171,122 +173,114 @@ var $resolve = function(value){
}
});
} else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
}
} catch(e){
- $reject.call({_w: promise, _d: false}, e); // wrap
+ $reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor){
- anInstance(this, $Promise, PROMISE, '_h');
+ P = function Promise(executor){
aFunction(executor);
- Internal.call(this);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
- $reject.call(this, err);
+ $reject.call(record, err);
}
};
- Internal = function Promise(executor){
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = require('./_redefine-all')($Promise.prototype, {
+ require('./$.redefine-all')(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if(this._a)this._a.push(reaction);
- if(this._s)notify(this, false);
- return reaction.promise;
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- PromiseCapability = function(){
- var promise = new Internal;
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
}
-$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
-require('./_set-to-string-tag')($Promise, PROMISE);
-require('./_set-species')(PROMISE);
-Wrapper = require('./_core')[PROMISE];
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+require('./$.set-to-string-tag')(P, PROMISE);
+require('./$.set-species')(PROMISE);
+Wrapper = require('./$.core')[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
- var capability = newPromiseCapability(this)
+ var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
-$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+$export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
- var capability = newPromiseCapability(this)
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
-$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){
- $Promise.all(iter)['catch'](empty);
+$export($export.S + $export.F * !(USE_NATIVE && require('./$.iter-detect')(function(iter){
+ P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, resolve = capability.resolve
- , reject = capability.reject;
+ , reject = capability.reject
+ , values = [];
var abrupt = perform(function(){
- var values = []
- , index = 0
- , remaining = 1;
- forOf(iterable, false, function(promise){
- var $index = index++
- , alreadyCalled = false;
- values.push(undefined);
- remaining++;
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
}, reject);
});
- --remaining || resolve(values);
+ else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
- var C = this
- , capability = newPromiseCapability(C)
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
diff --git a/node_modules/core-js/modules/es6.reflect.apply.js b/node_modules/core-js/modules/es6.reflect.apply.js
index 24ea80f51..361a2e2e5 100644
--- a/node_modules/core-js/modules/es6.reflect.apply.js
+++ b/node_modules/core-js/modules/es6.reflect.apply.js
@@ -1,16 +1,10 @@
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
-var $export = require('./_export')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , rApply = (require('./_global').Reflect || {}).apply
- , fApply = Function.apply;
-// MS Edge argumentsList argument is optional
-$export($export.S + $export.F * !require('./_fails')(function(){
- rApply(function(){});
-}), 'Reflect', {
+var $export = require('./$.export')
+ , _apply = Function.apply
+ , anObject = require('./$.an-object');
+
+$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
- var T = aFunction(target)
- , L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ return _apply.call(target, thisArgument, anObject(argumentsList));
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.reflect.construct.js b/node_modules/core-js/modules/es6.reflect.construct.js
index 96483d708..c3928cd92 100644
--- a/node_modules/core-js/modules/es6.reflect.construct.js
+++ b/node_modules/core-js/modules/es6.reflect.construct.js
@@ -1,29 +1,21 @@
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
-var $export = require('./_export')
- , create = require('./_object-create')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , isObject = require('./_is-object')
- , fails = require('./_fails')
- , bind = require('./_bind')
- , rConstruct = (require('./_global').Reflect || {}).construct;
+var $ = require('./$')
+ , $export = require('./$.export')
+ , aFunction = require('./$.a-function')
+ , anObject = require('./$.an-object')
+ , isObject = require('./$.is-object')
+ , bind = Function.bind || require('./$.core').Function.prototype.bind;
-// MS Edge supports only 2 arguments and argumentsList argument is optional
+// MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function(){
+$export($export.S + $export.F * require('./$.fails')(function(){
function F(){}
- return !(rConstruct(function(){}, [], F) instanceof F);
-});
-var ARGS_BUG = !fails(function(){
- rConstruct(function(){});
-});
-
-$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
switch(args.length){
@@ -40,7 +32,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
- , instance = create(isObject(proto) ? proto : Object.prototype)
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
diff --git a/node_modules/core-js/modules/es6.reflect.define-property.js b/node_modules/core-js/modules/es6.reflect.define-property.js
index 485d43c45..5f7fc6a18 100644
--- a/node_modules/core-js/modules/es6.reflect.define-property.js
+++ b/node_modules/core-js/modules/es6.reflect.define-property.js
@@ -1,19 +1,16 @@
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
-var dP = require('./_object-dp')
- , $export = require('./_export')
- , anObject = require('./_an-object')
- , toPrimitive = require('./_to-primitive');
+var $ = require('./$')
+ , $export = require('./$.export')
+ , anObject = require('./$.an-object');
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
-$export($export.S + $export.F * require('./_fails')(function(){
- Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+$export($export.S + $export.F * require('./$.fails')(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
try {
- dP.f(target, propertyKey, attributes);
+ $.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
diff --git a/node_modules/core-js/modules/es6.reflect.delete-property.js b/node_modules/core-js/modules/es6.reflect.delete-property.js
index 4e8ce2078..18526e5b1 100644
--- a/node_modules/core-js/modules/es6.reflect.delete-property.js
+++ b/node_modules/core-js/modules/es6.reflect.delete-property.js
@@ -1,11 +1,11 @@
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
-var $export = require('./_export')
- , gOPD = require('./_object-gopd').f
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , getDesc = require('./$').getDesc
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
- var desc = gOPD(anObject(target), propertyKey);
+ var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.reflect.enumerate.js b/node_modules/core-js/modules/es6.reflect.enumerate.js
index abdb132d6..73452e2fa 100644
--- a/node_modules/core-js/modules/es6.reflect.enumerate.js
+++ b/node_modules/core-js/modules/es6.reflect.enumerate.js
@@ -1,7 +1,7 @@
'use strict';
// 26.1.5 Reflect.enumerate(target)
-var $export = require('./_export')
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , anObject = require('./$.an-object');
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
@@ -9,7 +9,7 @@ var Enumerate = function(iterated){
, key;
for(key in iterated)keys.push(key);
};
-require('./_iter-create')(Enumerate, 'Object', function(){
+require('./$.iter-create')(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
diff --git a/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js
index 741a13eba..a3a2e0160 100644
--- a/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js
+++ b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js
@@ -1,10 +1,10 @@
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
-var gOPD = require('./_object-gopd')
- , $export = require('./_export')
- , anObject = require('./_an-object');
+var $ = require('./$')
+ , $export = require('./$.export')
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
- return gOPD.f(anObject(target), propertyKey);
+ return $.getDesc(anObject(target), propertyKey);
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js
index 4f912d104..c06bfa459 100644
--- a/node_modules/core-js/modules/es6.reflect.get-prototype-of.js
+++ b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js
@@ -1,7 +1,7 @@
// 26.1.8 Reflect.getPrototypeOf(target)
-var $export = require('./_export')
- , getProto = require('./_object-gpo')
- , anObject = require('./_an-object');
+var $export = require('./$.export')
+ , getProto = require('./$').getProto
+ , anObject = require('./$.an-object');
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
diff --git a/node_modules/core-js/modules/es6.reflect.get.js b/node_modules/core-js/modules/es6.reflect.get.js
index f8c39f500..cbb0caaf3 100644
--- a/node_modules/core-js/modules/es6.reflect.get.js
+++ b/node_modules/core-js/modules/es6.reflect.get.js
@@ -1,21 +1,20 @@
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
-var gOPD = require('./_object-gopd')
- , getPrototypeOf = require('./_object-gpo')
- , has = require('./_has')
- , $export = require('./_export')
- , isObject = require('./_is-object')
- , anObject = require('./_an-object');
+var $ = require('./$')
+ , has = require('./$.has')
+ , $export = require('./$.export')
+ , isObject = require('./$.is-object')
+ , anObject = require('./$.an-object');
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
- if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
- if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.reflect.has.js b/node_modules/core-js/modules/es6.reflect.has.js
index bbb6dbcde..65c9e82ff 100644
--- a/node_modules/core-js/modules/es6.reflect.has.js
+++ b/node_modules/core-js/modules/es6.reflect.has.js
@@ -1,5 +1,5 @@
// 26.1.9 Reflect.has(target, propertyKey)
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
diff --git a/node_modules/core-js/modules/es6.reflect.is-extensible.js b/node_modules/core-js/modules/es6.reflect.is-extensible.js
index ffbc2848e..b92c4f66b 100644
--- a/node_modules/core-js/modules/es6.reflect.is-extensible.js
+++ b/node_modules/core-js/modules/es6.reflect.is-extensible.js
@@ -1,6 +1,6 @@
// 26.1.10 Reflect.isExtensible(target)
-var $export = require('./_export')
- , anObject = require('./_an-object')
+var $export = require('./$.export')
+ , anObject = require('./$.an-object')
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
diff --git a/node_modules/core-js/modules/es6.reflect.own-keys.js b/node_modules/core-js/modules/es6.reflect.own-keys.js
index a1e5330c2..db79fdabc 100644
--- a/node_modules/core-js/modules/es6.reflect.own-keys.js
+++ b/node_modules/core-js/modules/es6.reflect.own-keys.js
@@ -1,4 +1,4 @@
// 26.1.11 Reflect.ownKeys(target)
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')}); \ No newline at end of file
+$export($export.S, 'Reflect', {ownKeys: require('./$.own-keys')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js
index d3dad8ee4..f5ccfc2a2 100644
--- a/node_modules/core-js/modules/es6.reflect.prevent-extensions.js
+++ b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js
@@ -1,6 +1,6 @@
// 26.1.12 Reflect.preventExtensions(target)
-var $export = require('./_export')
- , anObject = require('./_an-object')
+var $export = require('./$.export')
+ , anObject = require('./$.an-object')
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
diff --git a/node_modules/core-js/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js
index b79d9b613..e769436fc 100644
--- a/node_modules/core-js/modules/es6.reflect.set-prototype-of.js
+++ b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js
@@ -1,6 +1,6 @@
// 26.1.14 Reflect.setPrototypeOf(target, proto)
-var $export = require('./_export')
- , setProto = require('./_set-proto');
+var $export = require('./$.export')
+ , setProto = require('./$.set-proto');
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
diff --git a/node_modules/core-js/modules/es6.reflect.set.js b/node_modules/core-js/modules/es6.reflect.set.js
index c6b916a2e..0a938e784 100644
--- a/node_modules/core-js/modules/es6.reflect.set.js
+++ b/node_modules/core-js/modules/es6.reflect.set.js
@@ -1,28 +1,26 @@
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
-var dP = require('./_object-dp')
- , gOPD = require('./_object-gopd')
- , getPrototypeOf = require('./_object-gpo')
- , has = require('./_has')
- , $export = require('./_export')
- , createDesc = require('./_property-desc')
- , anObject = require('./_an-object')
- , isObject = require('./_is-object');
+var $ = require('./$')
+ , has = require('./$.has')
+ , $export = require('./$.export')
+ , createDesc = require('./$.property-desc')
+ , anObject = require('./$.an-object')
+ , isObject = require('./$.is-object');
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
- , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
- if(isObject(proto = getPrototypeOf(target))){
+ if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
+ $.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
diff --git a/node_modules/core-js/modules/es6.regexp.constructor.js b/node_modules/core-js/modules/es6.regexp.constructor.js
index 93961168c..c7ef61c27 100644
--- a/node_modules/core-js/modules/es6.regexp.constructor.js
+++ b/node_modules/core-js/modules/es6.regexp.constructor.js
@@ -1,43 +1,38 @@
-var global = require('./_global')
- , inheritIfRequired = require('./_inherit-if-required')
- , dP = require('./_object-dp').f
- , gOPN = require('./_object-gopn').f
- , isRegExp = require('./_is-regexp')
- , $flags = require('./_flags')
- , $RegExp = global.RegExp
- , Base = $RegExp
- , proto = $RegExp.prototype
- , re1 = /a/g
- , re2 = /a/g
+var $ = require('./$')
+ , global = require('./$.global')
+ , isRegExp = require('./$.is-regexp')
+ , $flags = require('./$.flags')
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
// "new" creates a new object, old webkit buggy here
- , CORRECT_NEW = new $RegExp(re1) !== re1;
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
-if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){
- re2[require('./_wks')('match')] = false;
+if(require('./$.descriptors') && (!CORRECT_NEW || require('./$.fails')(function(){
+ re2[require('./$.wks')('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))){
$RegExp = function RegExp(p, f){
- var tiRE = this instanceof $RegExp
- , piRE = isRegExp(p)
+ var piRE = isRegExp(p)
, fiU = f === undefined;
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
- : inheritIfRequired(CORRECT_NEW
+ return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p
+ : CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
- , tiRE ? this : proto, $RegExp);
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);
};
- var proxy = function(key){
- key in $RegExp || dP($RegExp, key, {
+ $.each.call($.getNames(Base), function(key){
+ key in $RegExp || $.setDesc($RegExp, key, {
configurable: true,
get: function(){ return Base[key]; },
set: function(it){ Base[key] = it; }
});
- };
- for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ });
proto.constructor = $RegExp;
$RegExp.prototype = proto;
- require('./_redefine')(global, 'RegExp', $RegExp);
+ require('./$.redefine')(global, 'RegExp', $RegExp);
}
-require('./_set-species')('RegExp'); \ No newline at end of file
+require('./$.set-species')('RegExp'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.flags.js b/node_modules/core-js/modules/es6.regexp.flags.js
index 33ba86f72..5984c2143 100644
--- a/node_modules/core-js/modules/es6.regexp.flags.js
+++ b/node_modules/core-js/modules/es6.regexp.flags.js
@@ -1,5 +1,6 @@
// 21.2.5.3 get RegExp.prototype.flags()
-if(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', {
+var $ = require('./$');
+if(require('./$.descriptors') && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {
configurable: true,
- get: require('./_flags')
+ get: require('./$.flags')
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.match.js b/node_modules/core-js/modules/es6.regexp.match.js
index 814d37191..5cd194c28 100644
--- a/node_modules/core-js/modules/es6.regexp.match.js
+++ b/node_modules/core-js/modules/es6.regexp.match.js
@@ -1,10 +1,10 @@
// @@match logic
-require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
+require('./$.fix-re-wks')('match', 1, function(defined, MATCH){
// 21.1.3.11 String.prototype.match(regexp)
- return [function match(regexp){
+ return function match(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- }, $match];
+ };
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.replace.js b/node_modules/core-js/modules/es6.regexp.replace.js
index 4f651af37..140c5072d 100644
--- a/node_modules/core-js/modules/es6.regexp.replace.js
+++ b/node_modules/core-js/modules/es6.regexp.replace.js
@@ -1,12 +1,12 @@
// @@replace logic
-require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
+require('./$.fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
- return [function replace(searchValue, replaceValue){
+ return function replace(searchValue, replaceValue){
'use strict';
var O = defined(this)
, fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
- }, $replace];
+ };
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.search.js b/node_modules/core-js/modules/es6.regexp.search.js
index 7aac5e447..adfd5c9c4 100644
--- a/node_modules/core-js/modules/es6.regexp.search.js
+++ b/node_modules/core-js/modules/es6.regexp.search.js
@@ -1,10 +1,10 @@
// @@search logic
-require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
+require('./$.fix-re-wks')('search', 1, function(defined, SEARCH){
// 21.1.3.15 String.prototype.search(regexp)
- return [function search(regexp){
+ return function search(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
- }, $search];
+ };
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.split.js b/node_modules/core-js/modules/es6.regexp.split.js
index a991a3fc9..0607fb064 100644
--- a/node_modules/core-js/modules/es6.regexp.split.js
+++ b/node_modules/core-js/modules/es6.regexp.split.js
@@ -1,70 +1,12 @@
// @@split logic
-require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
- 'use strict';
- var isRegExp = require('./_is-regexp')
- , _split = $split
- , $push = [].push
- , $SPLIT = 'split'
- , LENGTH = 'length'
- , LAST_INDEX = 'lastIndex';
- if(
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
- ''[$SPLIT](/.?/)[LENGTH]
- ){
- var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
- // based on es5-shim implementation, need to rework it
- $split = function(separator, limit){
- var string = String(this);
- if(separator === undefined && limit === 0)return [];
- // If `separator` is not a regex, use native split
- if(!isRegExp(separator))return _split.call(string, separator, limit);
- var output = [];
- var flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.unicode ? 'u' : '') +
- (separator.sticky ? 'y' : '');
- var lastLastIndex = 0;
- var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
- // Make `global` and avoid `lastIndex` issues by working with a copy
- var separatorCopy = new RegExp(separator.source, flags + 'g');
- var separator2, match, lastIndex, lastLength, i;
- // Doesn't need flags gy, but they don't hurt
- if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
- while(match = separatorCopy.exec(string)){
- // `separatorCopy.lastIndex` is not reliable cross-browser
- lastIndex = match.index + match[0][LENGTH];
- if(lastIndex > lastLastIndex){
- output.push(string.slice(lastLastIndex, match.index));
- // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
- if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
- for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
- });
- if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
- lastLength = match[0][LENGTH];
- lastLastIndex = lastIndex;
- if(output[LENGTH] >= splitLimit)break;
- }
- if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
- }
- if(lastLastIndex === string[LENGTH]){
- if(lastLength || !separatorCopy.test(''))output.push('');
- } else output.push(string.slice(lastLastIndex));
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
- };
- // Chakra, V8
- } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
- $split = function(separator, limit){
- return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
- };
- }
+require('./$.fix-re-wks')('split', 2, function(defined, SPLIT, $split){
// 21.1.3.17 String.prototype.split(separator, limit)
- return [function split(separator, limit){
+ return function split(separator, limit){
+ 'use strict';
var O = defined(this)
, fn = separator == undefined ? undefined : separator[SPLIT];
- return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
- }, $split];
+ return fn !== undefined
+ ? fn.call(separator, O, limit)
+ : $split.call(String(O), separator, limit);
+ };
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.regexp.to-string.js b/node_modules/core-js/modules/es6.regexp.to-string.js
deleted file mode 100644
index 699aeff29..000000000
--- a/node_modules/core-js/modules/es6.regexp.to-string.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-require('./es6.regexp.flags');
-var anObject = require('./_an-object')
- , $flags = require('./_flags')
- , DESCRIPTORS = require('./_descriptors')
- , TO_STRING = 'toString'
- , $toString = /./[TO_STRING];
-
-var define = function(fn){
- require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);
-};
-
-// 21.2.5.14 RegExp.prototype.toString()
-if(require('./_fails')(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
- define(function toString(){
- var R = anObject(this);
- return '/'.concat(R.source, '/',
- 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
- });
-// FF44- RegExp#toString has a wrong name
-} else if($toString.name != TO_STRING){
- define(function toString(){
- return $toString.call(this);
- });
-} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.set.js b/node_modules/core-js/modules/es6.set.js
index a18808818..8e148c9e2 100644
--- a/node_modules/core-js/modules/es6.set.js
+++ b/node_modules/core-js/modules/es6.set.js
@@ -1,8 +1,8 @@
'use strict';
-var strong = require('./_collection-strong');
+var strong = require('./$.collection-strong');
// 23.2 Set Objects
-module.exports = require('./_collection')('Set', function(get){
+require('./$.collection')('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
diff --git a/node_modules/core-js/modules/es6.string.anchor.js b/node_modules/core-js/modules/es6.string.anchor.js
deleted file mode 100644
index 65db25219..000000000
--- a/node_modules/core-js/modules/es6.string.anchor.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.2 String.prototype.anchor(name)
-require('./_string-html')('anchor', function(createHTML){
- return function anchor(name){
- return createHTML(this, 'a', 'name', name);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.big.js b/node_modules/core-js/modules/es6.string.big.js
deleted file mode 100644
index aeeb1aba9..000000000
--- a/node_modules/core-js/modules/es6.string.big.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.3 String.prototype.big()
-require('./_string-html')('big', function(createHTML){
- return function big(){
- return createHTML(this, 'big', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.blink.js b/node_modules/core-js/modules/es6.string.blink.js
deleted file mode 100644
index aef8da2e3..000000000
--- a/node_modules/core-js/modules/es6.string.blink.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.4 String.prototype.blink()
-require('./_string-html')('blink', function(createHTML){
- return function blink(){
- return createHTML(this, 'blink', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.bold.js b/node_modules/core-js/modules/es6.string.bold.js
deleted file mode 100644
index 022cdb075..000000000
--- a/node_modules/core-js/modules/es6.string.bold.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.5 String.prototype.bold()
-require('./_string-html')('bold', function(createHTML){
- return function bold(){
- return createHTML(this, 'b', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.code-point-at.js b/node_modules/core-js/modules/es6.string.code-point-at.js
index cf544652a..ebac55180 100644
--- a/node_modules/core-js/modules/es6.string.code-point-at.js
+++ b/node_modules/core-js/modules/es6.string.code-point-at.js
@@ -1,6 +1,6 @@
'use strict';
-var $export = require('./_export')
- , $at = require('./_string-at')(false);
+var $export = require('./$.export')
+ , $at = require('./$.string-at')(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
diff --git a/node_modules/core-js/modules/es6.string.ends-with.js b/node_modules/core-js/modules/es6.string.ends-with.js
index 80baed9ad..a102da2d4 100644
--- a/node_modules/core-js/modules/es6.string.ends-with.js
+++ b/node_modules/core-js/modules/es6.string.ends-with.js
@@ -1,15 +1,16 @@
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
-var $export = require('./_export')
- , toLength = require('./_to-length')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , toLength = require('./$.to-length')
+ , context = require('./$.string-context')
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
-$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
- , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
diff --git a/node_modules/core-js/modules/es6.string.fixed.js b/node_modules/core-js/modules/es6.string.fixed.js
deleted file mode 100644
index d017e202a..000000000
--- a/node_modules/core-js/modules/es6.string.fixed.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.6 String.prototype.fixed()
-require('./_string-html')('fixed', function(createHTML){
- return function fixed(){
- return createHTML(this, 'tt', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.fontcolor.js b/node_modules/core-js/modules/es6.string.fontcolor.js
deleted file mode 100644
index d40711f03..000000000
--- a/node_modules/core-js/modules/es6.string.fontcolor.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.7 String.prototype.fontcolor(color)
-require('./_string-html')('fontcolor', function(createHTML){
- return function fontcolor(color){
- return createHTML(this, 'font', 'color', color);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.fontsize.js b/node_modules/core-js/modules/es6.string.fontsize.js
deleted file mode 100644
index ba3ff9809..000000000
--- a/node_modules/core-js/modules/es6.string.fontsize.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.8 String.prototype.fontsize(size)
-require('./_string-html')('fontsize', function(createHTML){
- return function fontsize(size){
- return createHTML(this, 'font', 'size', size);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.from-code-point.js b/node_modules/core-js/modules/es6.string.from-code-point.js
index c8776d871..b0bd166bf 100644
--- a/node_modules/core-js/modules/es6.string.from-code-point.js
+++ b/node_modules/core-js/modules/es6.string.from-code-point.js
@@ -1,5 +1,5 @@
-var $export = require('./_export')
- , toIndex = require('./_to-index')
+var $export = require('./$.export')
+ , toIndex = require('./$.to-index')
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
@@ -7,12 +7,13 @@ var $export = require('./_export')
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
- var res = []
- , aLen = arguments.length
- , i = 0
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
, code;
- while(aLen > i){
- code = +arguments[i++];
+ while($$len > i){
+ code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
diff --git a/node_modules/core-js/modules/es6.string.includes.js b/node_modules/core-js/modules/es6.string.includes.js
index c6b4ee2fa..e2ab8db7e 100644
--- a/node_modules/core-js/modules/es6.string.includes.js
+++ b/node_modules/core-js/modules/es6.string.includes.js
@@ -1,10 +1,10 @@
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
-var $export = require('./_export')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , context = require('./$.string-context')
, INCLUDES = 'includes';
-$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
diff --git a/node_modules/core-js/modules/es6.string.italics.js b/node_modules/core-js/modules/es6.string.italics.js
deleted file mode 100644
index d33efd3c4..000000000
--- a/node_modules/core-js/modules/es6.string.italics.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.9 String.prototype.italics()
-require('./_string-html')('italics', function(createHTML){
- return function italics(){
- return createHTML(this, 'i', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.iterator.js b/node_modules/core-js/modules/es6.string.iterator.js
index ac391ee4e..2f4c772c3 100644
--- a/node_modules/core-js/modules/es6.string.iterator.js
+++ b/node_modules/core-js/modules/es6.string.iterator.js
@@ -1,8 +1,8 @@
'use strict';
-var $at = require('./_string-at')(true);
+var $at = require('./$.string-at')(true);
// 21.1.3.27 String.prototype[@@iterator]()
-require('./_iter-define')(String, 'String', function(iterated){
+require('./$.iter-define')(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
diff --git a/node_modules/core-js/modules/es6.string.link.js b/node_modules/core-js/modules/es6.string.link.js
deleted file mode 100644
index 6a75c18a1..000000000
--- a/node_modules/core-js/modules/es6.string.link.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.10 String.prototype.link(url)
-require('./_string-html')('link', function(createHTML){
- return function link(url){
- return createHTML(this, 'a', 'href', url);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.raw.js b/node_modules/core-js/modules/es6.string.raw.js
index 1016acfa2..64279d23d 100644
--- a/node_modules/core-js/modules/es6.string.raw.js
+++ b/node_modules/core-js/modules/es6.string.raw.js
@@ -1,18 +1,19 @@
-var $export = require('./_export')
- , toIObject = require('./_to-iobject')
- , toLength = require('./_to-length');
+var $export = require('./$.export')
+ , toIObject = require('./$.to-iobject')
+ , toLength = require('./$.to-length');
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
- var tpl = toIObject(callSite.raw)
- , len = toLength(tpl.length)
- , aLen = arguments.length
- , res = []
- , i = 0;
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
while(len > i){
res.push(String(tpl[i++]));
- if(i < aLen)res.push(String(arguments[i]));
+ if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.repeat.js b/node_modules/core-js/modules/es6.string.repeat.js
index a054222d6..4ec29f66a 100644
--- a/node_modules/core-js/modules/es6.string.repeat.js
+++ b/node_modules/core-js/modules/es6.string.repeat.js
@@ -1,6 +1,6 @@
-var $export = require('./_export');
+var $export = require('./$.export');
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
- repeat: require('./_string-repeat')
+ repeat: require('./$.string-repeat')
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.small.js b/node_modules/core-js/modules/es6.string.small.js
deleted file mode 100644
index 51b1b30d8..000000000
--- a/node_modules/core-js/modules/es6.string.small.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.11 String.prototype.small()
-require('./_string-html')('small', function(createHTML){
- return function small(){
- return createHTML(this, 'small', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.starts-with.js b/node_modules/core-js/modules/es6.string.starts-with.js
index 017805f01..21143072e 100644
--- a/node_modules/core-js/modules/es6.string.starts-with.js
+++ b/node_modules/core-js/modules/es6.string.starts-with.js
@@ -1,15 +1,16 @@
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
-var $export = require('./_export')
- , toLength = require('./_to-length')
- , context = require('./_string-context')
+var $export = require('./$.export')
+ , toLength = require('./$.to-length')
+ , context = require('./$.string-context')
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
-$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {
+$export($export.P + $export.F * require('./$.fails-is-regexp')(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
diff --git a/node_modules/core-js/modules/es6.string.strike.js b/node_modules/core-js/modules/es6.string.strike.js
deleted file mode 100644
index c6287d3a5..000000000
--- a/node_modules/core-js/modules/es6.string.strike.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.12 String.prototype.strike()
-require('./_string-html')('strike', function(createHTML){
- return function strike(){
- return createHTML(this, 'strike', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.sub.js b/node_modules/core-js/modules/es6.string.sub.js
deleted file mode 100644
index ee18ea7ac..000000000
--- a/node_modules/core-js/modules/es6.string.sub.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.13 String.prototype.sub()
-require('./_string-html')('sub', function(createHTML){
- return function sub(){
- return createHTML(this, 'sub', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.sup.js b/node_modules/core-js/modules/es6.string.sup.js
deleted file mode 100644
index a34299881..000000000
--- a/node_modules/core-js/modules/es6.string.sup.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-// B.2.3.14 String.prototype.sup()
-require('./_string-html')('sup', function(createHTML){
- return function sup(){
- return createHTML(this, 'sup', '', '');
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.string.trim.js b/node_modules/core-js/modules/es6.string.trim.js
index 35f0fb0b8..52b75cac6 100644
--- a/node_modules/core-js/modules/es6.string.trim.js
+++ b/node_modules/core-js/modules/es6.string.trim.js
@@ -1,6 +1,6 @@
'use strict';
// 21.1.3.25 String.prototype.trim()
-require('./_string-trim')('trim', function($trim){
+require('./$.string-trim')('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
diff --git a/node_modules/core-js/modules/es6.symbol.js b/node_modules/core-js/modules/es6.symbol.js
index eae491c5a..42b7a3aaa 100644
--- a/node_modules/core-js/modules/es6.symbol.js
+++ b/node_modules/core-js/modules/es6.symbol.js
@@ -1,87 +1,77 @@
'use strict';
// ECMAScript 6 symbols shim
-var global = require('./_global')
- , has = require('./_has')
- , DESCRIPTORS = require('./_descriptors')
- , $export = require('./_export')
- , redefine = require('./_redefine')
- , META = require('./_meta').KEY
- , $fails = require('./_fails')
- , shared = require('./_shared')
- , setToStringTag = require('./_set-to-string-tag')
- , uid = require('./_uid')
- , wks = require('./_wks')
- , wksExt = require('./_wks-ext')
- , wksDefine = require('./_wks-define')
- , keyOf = require('./_keyof')
- , enumKeys = require('./_enum-keys')
- , isArray = require('./_is-array')
- , anObject = require('./_an-object')
- , toIObject = require('./_to-iobject')
- , toPrimitive = require('./_to-primitive')
- , createDesc = require('./_property-desc')
- , _create = require('./_object-create')
- , gOPNExt = require('./_object-gopn-ext')
- , $GOPD = require('./_object-gopd')
- , $DP = require('./_object-dp')
- , $keys = require('./_object-keys')
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
+var $ = require('./$')
+ , global = require('./$.global')
+ , has = require('./$.has')
+ , DESCRIPTORS = require('./$.descriptors')
+ , $export = require('./$.export')
+ , redefine = require('./$.redefine')
+ , $fails = require('./$.fails')
+ , shared = require('./$.shared')
+ , setToStringTag = require('./$.set-to-string-tag')
+ , uid = require('./$.uid')
+ , wks = require('./$.wks')
+ , keyOf = require('./$.keyof')
+ , $names = require('./$.get-names')
+ , enumKeys = require('./$.enum-keys')
+ , isArray = require('./$.is-array')
+ , anObject = require('./$.an-object')
+ , toIObject = require('./$.to-iobject')
+ , createDesc = require('./$.property-desc')
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
+ , setter = false
, HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
+ , isEnum = $.isEnum
, SymbolRegistry = shared('symbol-registry')
, AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
-// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
})).a != 7;
}) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
+ var protoDesc = getDesc(ObjectProto, key);
if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
-} : dP;
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+} : setDesc;
var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
return sym;
};
-var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
+var isSymbol = function(it){
return typeof it == 'symbol';
-} : function(it){
- return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
+ if(D && has(AllSymbols, key)){
if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
D = _create(D, {enumerable: createDesc(0, false)});
} return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
+ } return setDesc(it, key, D);
};
var $defineProperties = function defineProperties(it, P){
anObject(it);
@@ -96,80 +86,83 @@ var $create = function create(it, P){
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
+ var D = getDesc(it = toIObject(it), key);
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
+ var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
+ var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
};
+var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+};
+var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+});
// 19.4.1.1 Symbol([description])
-if(!USE_NATIVE){
+if(!useNative){
$Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
};
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
+ redefine($Symbol.prototype, 'toString', function toString(){
return this._k;
});
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
- require('./_object-pie').f = $propertyIsEnumerable;
- require('./_object-gops').f = $getOwnPropertySymbols;
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
- if(DESCRIPTORS && !require('./_library')){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
- wksExt.f = function(name){
- return wrap(wks(name));
+ if(DESCRIPTORS && !require('./$.library')){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
}
-$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
-for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
-).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
-for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
-$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
return has(SymbolRegistry, key += '')
@@ -178,14 +171,37 @@ $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
+ return keyOf(SymbolRegistry, key);
},
useSetter: function(){ setter = true; },
useSimple: function(){ setter = false; }
+};
+// 19.4.2.2 Symbol.hasInstance
+// 19.4.2.3 Symbol.isConcatSpreadable
+// 19.4.2.4 Symbol.iterator
+// 19.4.2.6 Symbol.match
+// 19.4.2.8 Symbol.replace
+// 19.4.2.9 Symbol.search
+// 19.4.2.10 Symbol.species
+// 19.4.2.11 Symbol.split
+// 19.4.2.12 Symbol.toPrimitive
+// 19.4.2.13 Symbol.toStringTag
+// 19.4.2.14 Symbol.unscopables
+$.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
});
-$export($export.S + $export.F * !USE_NATIVE, 'Object', {
+setter = true;
+
+$export($export.G + $export.W, {Symbol: $Symbol});
+
+$export($export.S, 'Symbol', symbolStatics);
+
+$export($export.S + $export.F * !useNative, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
@@ -201,32 +217,8 @@ $export($export.S + $export.F * !USE_NATIVE, 'Object', {
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
-$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
-})), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
-});
+$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
-// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
-$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
diff --git a/node_modules/core-js/modules/es6.typed.array-buffer.js b/node_modules/core-js/modules/es6.typed.array-buffer.js
index 9f47082c2..a8209bd2d 100644
--- a/node_modules/core-js/modules/es6.typed.array-buffer.js
+++ b/node_modules/core-js/modules/es6.typed.array-buffer.js
@@ -1,46 +1,43 @@
'use strict';
-var $export = require('./_export')
- , $typed = require('./_typed')
- , buffer = require('./_typed-buffer')
- , anObject = require('./_an-object')
- , toIndex = require('./_to-index')
- , toLength = require('./_to-length')
- , isObject = require('./_is-object')
- , ArrayBuffer = require('./_global').ArrayBuffer
- , speciesConstructor = require('./_species-constructor')
- , $ArrayBuffer = buffer.ArrayBuffer
- , $DataView = buffer.DataView
- , $isView = $typed.ABV && ArrayBuffer.isView
- , $slice = $ArrayBuffer.prototype.slice
- , VIEW = $typed.VIEW
- , ARRAY_BUFFER = 'ArrayBuffer';
+if(require('./$.descriptors')){
+ var $export = require('./$.export')
+ , $typed = require('./$.typed')
+ , buffer = require('./$.buffer')
+ , toIndex = require('./$.to-index')
+ , toLength = require('./$.to-length')
+ , isObject = require('./$.is-object')
+ , TYPED_ARRAY = require('./$.wks')('typed_array')
+ , $ArrayBuffer = buffer.ArrayBuffer
+ , $DataView = buffer.DataView
+ , $slice = $ArrayBuffer && $ArrayBuffer.prototype.slice
+ , VIEW = $typed.VIEW
+ , ARRAY_BUFFER = 'ArrayBuffer';
-$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
+ $export($export.G + $export.W + $export.F * !$typed.ABV, {ArrayBuffer: $ArrayBuffer});
-$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it){
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
-});
+ $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
+ // 24.1.3.1 ArrayBuffer.isView(arg)
+ isView: function isView(it){ // not cross-realm
+ return isObject(it) && VIEW in it;
+ }
+ });
-$export($export.P + $export.U + $export.F * require('./_fails')(function(){
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
-}), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end){
- if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength
- , first = toIndex(start, len)
- , final = toIndex(end === undefined ? len : end, len)
- , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
- , viewS = new $DataView(this)
- , viewT = new $DataView(result)
- , index = 0;
- while(first < final){
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
-});
-
-require('./_set-species')(ARRAY_BUFFER); \ No newline at end of file
+ $export($export.P + $export.F * require('./$.fails')(function(){
+ return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
+ }), ARRAY_BUFFER, {
+ // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
+ slice: function slice(start, end){
+ if($slice !== undefined && end === undefined)return $slice.call(this, start); // FF fix
+ var len = this.byteLength
+ , first = toIndex(start, len)
+ , final = toIndex(end === undefined ? len : end, len)
+ , result = new $ArrayBuffer(toLength(final - first))
+ , viewS = new $DataView(this)
+ , viewT = new $DataView(result)
+ , index = 0;
+ while(first < final){
+ viewT.setUint8(index++, viewS.getUint8(first++));
+ } return result;
+ }
+ });
+} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.typed.data-view.js b/node_modules/core-js/modules/es6.typed.data-view.js
index ee7b88127..44e035320 100644
--- a/node_modules/core-js/modules/es6.typed.data-view.js
+++ b/node_modules/core-js/modules/es6.typed.data-view.js
@@ -1,4 +1,4 @@
-var $export = require('./_export');
-$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
- DataView: require('./_typed-buffer').DataView
-}); \ No newline at end of file
+if(require('./$.descriptors')){
+ var $export = require('./$.export');
+ $export($export.G + $export.W + $export.F * !require('./$.typed').ABV, {DataView: require('./$.buffer').DataView});
+} \ No newline at end of file
diff --git a/node_modules/core-js/modules/es6.typed.float32-array.js b/node_modules/core-js/modules/es6.typed.float32-array.js
index 2c4c9a699..95d78a6d4 100644
--- a/node_modules/core-js/modules/es6.typed.float32-array.js
+++ b/node_modules/core-js/modules/es6.typed.float32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Float32', 4, function(init){
+require('./$.typed-array')('Float32', 4, function(init){
return function Float32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.float64-array.js b/node_modules/core-js/modules/es6.typed.float64-array.js
index 4b20257f7..16fadec9a 100644
--- a/node_modules/core-js/modules/es6.typed.float64-array.js
+++ b/node_modules/core-js/modules/es6.typed.float64-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Float64', 8, function(init){
+require('./$.typed-array')('Float64', 8, function(init){
return function Float64Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.int16-array.js b/node_modules/core-js/modules/es6.typed.int16-array.js
index d3f61c564..a3d04cb63 100644
--- a/node_modules/core-js/modules/es6.typed.int16-array.js
+++ b/node_modules/core-js/modules/es6.typed.int16-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int16', 2, function(init){
+require('./$.typed-array')('Int16', 2, function(init){
return function Int16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.int32-array.js b/node_modules/core-js/modules/es6.typed.int32-array.js
index df47c1bb0..1923463ac 100644
--- a/node_modules/core-js/modules/es6.typed.int32-array.js
+++ b/node_modules/core-js/modules/es6.typed.int32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int32', 4, function(init){
+require('./$.typed-array')('Int32', 4, function(init){
return function Int32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.int8-array.js b/node_modules/core-js/modules/es6.typed.int8-array.js
index da4dbf0a2..e9182c4cc 100644
--- a/node_modules/core-js/modules/es6.typed.int8-array.js
+++ b/node_modules/core-js/modules/es6.typed.int8-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Int8', 1, function(init){
+require('./$.typed-array')('Int8', 1, function(init){
return function Int8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.uint16-array.js b/node_modules/core-js/modules/es6.typed.uint16-array.js
index cb335773d..ec6e83477 100644
--- a/node_modules/core-js/modules/es6.typed.uint16-array.js
+++ b/node_modules/core-js/modules/es6.typed.uint16-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint16', 2, function(init){
+require('./$.typed-array')('Uint16', 2, function(init){
return function Uint16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.uint32-array.js b/node_modules/core-js/modules/es6.typed.uint32-array.js
index 41c9e7b80..ddfc22d88 100644
--- a/node_modules/core-js/modules/es6.typed.uint32-array.js
+++ b/node_modules/core-js/modules/es6.typed.uint32-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint32', 4, function(init){
+require('./$.typed-array')('Uint32', 4, function(init){
return function Uint32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.uint8-array.js b/node_modules/core-js/modules/es6.typed.uint8-array.js
index f794f86cf..7ab1e4df7 100644
--- a/node_modules/core-js/modules/es6.typed.uint8-array.js
+++ b/node_modules/core-js/modules/es6.typed.uint8-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint8', 1, function(init){
+require('./$.typed-array')('Uint8', 1, function(init){
return function Uint8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js
index b12304799..f85f9d5d7 100644
--- a/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js
+++ b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js
@@ -1,4 +1,4 @@
-require('./_typed-array')('Uint8', 1, function(init){
+require('./$.typed-array')('Uint8', 1, function(init){
return function Uint8ClampedArray(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
diff --git a/node_modules/core-js/modules/es6.weak-map.js b/node_modules/core-js/modules/es6.weak-map.js
index 4109db336..72a9b3244 100644
--- a/node_modules/core-js/modules/es6.weak-map.js
+++ b/node_modules/core-js/modules/es6.weak-map.js
@@ -1,53 +1,40 @@
'use strict';
-var each = require('./_array-methods')(0)
- , redefine = require('./_redefine')
- , meta = require('./_meta')
- , assign = require('./_object-assign')
- , weak = require('./_collection-weak')
- , isObject = require('./_is-object')
- , getWeak = meta.getWeak
- , isExtensible = Object.isExtensible
- , uncaughtFrozenStore = weak.ufstore
- , tmp = {}
- , InternalMap;
+var $ = require('./$')
+ , redefine = require('./$.redefine')
+ , weak = require('./$.collection-weak')
+ , isObject = require('./$.is-object')
+ , has = require('./$.has')
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
-var wrapper = function(get){
- return function WeakMap(){
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
-};
-
-var methods = {
+// 23.3 WeakMap Objects
+var $WeakMap = require('./$.collection')('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
- var data = getWeak(key);
- if(data === true)return uncaughtFrozenStore(this).get(key);
- return data ? data[this._i] : undefined;
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
-};
-
-// 23.3 WeakMap Objects
-var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true);
+}, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
- InternalMap = weak.getConstructor(wrapper);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function(key){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
- // store frozen objects on internal weakmap shim
+ // store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
- if(!this._f)this._f = new InternalMap;
- var result = this._f[key](a, b);
+ var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
diff --git a/node_modules/core-js/modules/es6.weak-set.js b/node_modules/core-js/modules/es6.weak-set.js
index 77d01b6ba..efdf1d76f 100644
--- a/node_modules/core-js/modules/es6.weak-set.js
+++ b/node_modules/core-js/modules/es6.weak-set.js
@@ -1,8 +1,8 @@
'use strict';
-var weak = require('./_collection-weak');
+var weak = require('./$.collection-weak');
// 23.4 WeakSet Objects
-require('./_collection')('WeakSet', function(get){
+require('./$.collection')('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
diff --git a/node_modules/core-js/modules/es7.array.includes.js b/node_modules/core-js/modules/es7.array.includes.js
index 6d5b00905..dcfad704d 100644
--- a/node_modules/core-js/modules/es7.array.includes.js
+++ b/node_modules/core-js/modules/es7.array.includes.js
@@ -1,12 +1,12 @@
'use strict';
-// https://github.com/tc39/Array.prototype.includes
-var $export = require('./_export')
- , $includes = require('./_array-includes')(true);
+var $export = require('./$.export')
+ , $includes = require('./$.array-includes')(true);
$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
-require('./_add-to-unscopables')('includes'); \ No newline at end of file
+require('./$.add-to-unscopables')('includes'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.asap.js b/node_modules/core-js/modules/es7.asap.js
deleted file mode 100644
index b762b49ab..000000000
--- a/node_modules/core-js/modules/es7.asap.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
-var $export = require('./_export')
- , microtask = require('./_microtask')()
- , process = require('./_global').process
- , isNode = require('./_cof')(process) == 'process';
-
-$export($export.G, {
- asap: function asap(fn){
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.error.is-error.js b/node_modules/core-js/modules/es7.error.is-error.js
deleted file mode 100644
index d6fe29dc6..000000000
--- a/node_modules/core-js/modules/es7.error.is-error.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// https://github.com/ljharb/proposal-is-error
-var $export = require('./_export')
- , cof = require('./_cof');
-
-$export($export.S, 'Error', {
- isError: function isError(it){
- return cof(it) === 'Error';
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.map.to-json.js b/node_modules/core-js/modules/es7.map.to-json.js
index 19f9b6d38..809370564 100644
--- a/node_modules/core-js/modules/es7.map.to-json.js
+++ b/node_modules/core-js/modules/es7.map.to-json.js
@@ -1,4 +1,4 @@
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')}); \ No newline at end of file
+$export($export.P, 'Map', {toJSON: require('./$.collection-to-json')('Map')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.math.iaddh.js b/node_modules/core-js/modules/es7.math.iaddh.js
deleted file mode 100644
index bb3f3d38d..000000000
--- a/node_modules/core-js/modules/es7.math.iaddh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.math.imulh.js b/node_modules/core-js/modules/es7.math.imulh.js
deleted file mode 100644
index a25da686a..000000000
--- a/node_modules/core-js/modules/es7.math.imulh.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- imulh: function imulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >> 16
- , v1 = $v >> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.math.isubh.js b/node_modules/core-js/modules/es7.math.isubh.js
deleted file mode 100644
index 3814dc29c..000000000
--- a/node_modules/core-js/modules/es7.math.isubh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1){
- var $x0 = x0 >>> 0
- , $x1 = x1 >>> 0
- , $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.math.umulh.js b/node_modules/core-js/modules/es7.math.umulh.js
deleted file mode 100644
index 0d22cf1ba..000000000
--- a/node_modules/core-js/modules/es7.math.umulh.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = require('./_export');
-
-$export($export.S, 'Math', {
- umulh: function umulh(u, v){
- var UINT16 = 0xffff
- , $u = +u
- , $v = +v
- , u0 = $u & UINT16
- , v0 = $v & UINT16
- , u1 = $u >>> 16
- , v1 = $v >>> 16
- , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.define-getter.js b/node_modules/core-js/modules/es7.object.define-getter.js
deleted file mode 100644
index f206e96a2..000000000
--- a/node_modules/core-js/modules/es7.object.define-getter.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , aFunction = require('./_a-function')
- , $defineProperty = require('./_object-dp');
-
-// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter){
- $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.define-setter.js b/node_modules/core-js/modules/es7.object.define-setter.js
deleted file mode 100644
index c0f7b7000..000000000
--- a/node_modules/core-js/modules/es7.object.define-setter.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , aFunction = require('./_a-function')
- , $defineProperty = require('./_object-dp');
-
-// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter){
- $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.entries.js b/node_modules/core-js/modules/es7.object.entries.js
index cfc049dfa..fec1bc36c 100644
--- a/node_modules/core-js/modules/es7.object.entries.js
+++ b/node_modules/core-js/modules/es7.object.entries.js
@@ -1,6 +1,6 @@
-// https://github.com/tc39/proposal-object-values-entries
-var $export = require('./_export')
- , $entries = require('./_object-to-array')(true);
+// http://goo.gl/XkBrjD
+var $export = require('./$.export')
+ , $entries = require('./$.object-to-array')(true);
$export($export.S, 'Object', {
entries: function entries(it){
diff --git a/node_modules/core-js/modules/es7.object.enumerable-entries.js b/node_modules/core-js/modules/es7.object.enumerable-entries.js
deleted file mode 100644
index 5daa803b1..000000000
--- a/node_modules/core-js/modules/es7.object.enumerable-entries.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableEntries: function enumerableEntries(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push([key, T[key]]);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.enumerable-keys.js b/node_modules/core-js/modules/es7.object.enumerable-keys.js
deleted file mode 100644
index 791ec1849..000000000
--- a/node_modules/core-js/modules/es7.object.enumerable-keys.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableKeys: function enumerableKeys(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push(key);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.enumerable-values.js b/node_modules/core-js/modules/es7.object.enumerable-values.js
deleted file mode 100644
index 1d1bfaa72..000000000
--- a/node_modules/core-js/modules/es7.object.enumerable-values.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// https://github.com/leobalter/object-enumerables
-var $export = require('./_export')
- , toObject = require('./_to-object');
-
-$export($export.S, 'Object', {
- enumerableValues: function enumerableValues(O){
- var T = toObject(O)
- , properties = [];
- for(var key in T)properties.push(T[key]);
- return properties;
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
index 0242b7a0c..e4d80a34e 100644
--- a/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
+++ b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
@@ -1,19 +1,23 @@
-// https://github.com/tc39/proposal-object-getownpropertydescriptors
-var $export = require('./_export')
- , ownKeys = require('./_own-keys')
- , toIObject = require('./_to-iobject')
- , gOPD = require('./_object-gopd')
- , createProperty = require('./_create-property');
+// https://gist.github.com/WebReflection/9353781
+var $ = require('./$')
+ , $export = require('./$.export')
+ , ownKeys = require('./$.own-keys')
+ , toIObject = require('./$.to-iobject')
+ , createDesc = require('./$.property-desc');
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
- , getDesc = gOPD.f
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
- while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
- return result;
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
}
}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.lookup-getter.js b/node_modules/core-js/modules/es7.object.lookup-getter.js
deleted file mode 100644
index ec140345d..000000000
--- a/node_modules/core-js/modules/es7.object.lookup-getter.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive')
- , getPrototypeOf = require('./_object-gpo')
- , getOwnPropertyDescriptor = require('./_object-gopd').f;
-
-// B.2.2.4 Object.prototype.__lookupGetter__(P)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __lookupGetter__: function __lookupGetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.get;
- } while(O = getPrototypeOf(O));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.lookup-setter.js b/node_modules/core-js/modules/es7.object.lookup-setter.js
deleted file mode 100644
index 539dda824..000000000
--- a/node_modules/core-js/modules/es7.object.lookup-setter.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-var $export = require('./_export')
- , toObject = require('./_to-object')
- , toPrimitive = require('./_to-primitive')
- , getPrototypeOf = require('./_object-gpo')
- , getOwnPropertyDescriptor = require('./_object-gopd').f;
-
-// B.2.2.5 Object.prototype.__lookupSetter__(P)
-require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
- __lookupSetter__: function __lookupSetter__(P){
- var O = toObject(this)
- , K = toPrimitive(P, true)
- , D;
- do {
- if(D = getOwnPropertyDescriptor(O, K))return D.set;
- } while(O = getPrototypeOf(O));
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.object.values.js b/node_modules/core-js/modules/es7.object.values.js
index 42abd640b..697e93545 100644
--- a/node_modules/core-js/modules/es7.object.values.js
+++ b/node_modules/core-js/modules/es7.object.values.js
@@ -1,6 +1,6 @@
-// https://github.com/tc39/proposal-object-values-entries
-var $export = require('./_export')
- , $values = require('./_object-to-array')(false);
+// http://goo.gl/XkBrjD
+var $export = require('./$.export')
+ , $values = require('./$.object-to-array')(false);
$export($export.S, 'Object', {
values: function values(it){
diff --git a/node_modules/core-js/modules/es7.observable.js b/node_modules/core-js/modules/es7.observable.js
deleted file mode 100644
index e34fa4f28..000000000
--- a/node_modules/core-js/modules/es7.observable.js
+++ /dev/null
@@ -1,199 +0,0 @@
-'use strict';
-// https://github.com/zenparsing/es-observable
-var $export = require('./_export')
- , global = require('./_global')
- , core = require('./_core')
- , microtask = require('./_microtask')()
- , OBSERVABLE = require('./_wks')('observable')
- , aFunction = require('./_a-function')
- , anObject = require('./_an-object')
- , anInstance = require('./_an-instance')
- , redefineAll = require('./_redefine-all')
- , hide = require('./_hide')
- , forOf = require('./_for-of')
- , RETURN = forOf.RETURN;
-
-var getMethod = function(fn){
- return fn == null ? undefined : aFunction(fn);
-};
-
-var cleanupSubscription = function(subscription){
- var cleanup = subscription._c;
- if(cleanup){
- subscription._c = undefined;
- cleanup();
- }
-};
-
-var subscriptionClosed = function(subscription){
- return subscription._o === undefined;
-};
-
-var closeSubscription = function(subscription){
- if(!subscriptionClosed(subscription)){
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
-};
-
-var Subscription = function(observer, subscriber){
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer)
- , subscription = cleanup;
- if(cleanup != null){
- if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch(e){
- observer.error(e);
- return;
- } if(subscriptionClosed(this))cleanupSubscription(this);
-};
-
-Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe(){ closeSubscription(this); }
-});
-
-var SubscriptionObserver = function(subscription){
- this._s = subscription;
-};
-
-SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if(m)return m.call(observer, value);
- } catch(e){
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value){
- var subscription = this._s;
- if(subscriptionClosed(subscription))throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if(!m)throw value;
- value = m.call(observer, value);
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value){
- var subscription = this._s;
- if(!subscriptionClosed(subscription)){
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch(e){
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
-});
-
-var $Observable = function Observable(subscriber){
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
-};
-
-redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer){
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn){
- var that = this;
- return new (core.Promise || global.Promise)(function(resolve, reject){
- aFunction(fn);
- var subscription = that.subscribe({
- next : function(value){
- try {
- return fn(value);
- } catch(e){
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
-});
-
-redefineAll($Observable, {
- from: function from(x){
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if(method){
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function(observer){
- return observable.subscribe(observer);
- });
- }
- return new C(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- try {
- if(forOf(x, false, function(it){
- observer.next(it);
- if(done)return RETURN;
- }) === RETURN)return;
- } catch(e){
- if(done)throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- },
- of: function of(){
- for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function(observer){
- var done = false;
- microtask(function(){
- if(!done){
- for(var i = 0; i < items.length; ++i){
- observer.next(items[i]);
- if(done)return;
- } observer.complete();
- }
- });
- return function(){ done = true; };
- });
- }
-});
-
-hide($Observable.prototype, OBSERVABLE, function(){ return this; });
-
-$export($export.G, {Observable: $Observable});
-
-require('./_set-species')('Observable'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.define-metadata.js b/node_modules/core-js/modules/es7.reflect.define-metadata.js
deleted file mode 100644
index c833e4317..000000000
--- a/node_modules/core-js/modules/es7.reflect.define-metadata.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
-metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/modules/es7.reflect.delete-metadata.js
deleted file mode 100644
index 8a8a8253b..000000000
--- a/node_modules/core-js/modules/es7.reflect.delete-metadata.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , toMetaKey = metadata.key
- , getOrCreateMetadataMap = metadata.map
- , store = metadata.store;
-
-metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
- , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
- if(metadataMap.size)return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js
deleted file mode 100644
index 58c4dcc23..000000000
--- a/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var Set = require('./es6.set')
- , from = require('./_array-from-iterable')
- , metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
-var ordinaryMetadataKeys = function(O, P){
- var oKeys = ordinaryOwnMetadataKeys(O, P)
- , parent = getPrototypeOf(O);
- if(parent === null)return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
-};
-
-metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata.js b/node_modules/core-js/modules/es7.reflect.get-metadata.js
deleted file mode 100644
index 48cd9d674..000000000
--- a/node_modules/core-js/modules/es7.reflect.get-metadata.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryHasOwnMetadata = metadata.has
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
-var ordinaryGetMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
-};
-
-metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js
deleted file mode 100644
index 93ecfbe5a..000000000
--- a/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryOwnMetadataKeys = metadata.keys
- , toMetaKey = metadata.key;
-
-metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata.js
deleted file mode 100644
index f1040f919..000000000
--- a/node_modules/core-js/modules/es7.reflect.get-own-metadata.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryGetOwnMetadata = metadata.get
- , toMetaKey = metadata.key;
-
-metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.has-metadata.js b/node_modules/core-js/modules/es7.reflect.has-metadata.js
deleted file mode 100644
index 0ff637865..000000000
--- a/node_modules/core-js/modules/es7.reflect.has-metadata.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , getPrototypeOf = require('./_object-gpo')
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
-var ordinaryHasMetadata = function(MetadataKey, O, P){
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if(hasOwn)return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
-};
-
-metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/modules/es7.reflect.has-own-metadata.js
deleted file mode 100644
index d645ea3fa..000000000
--- a/node_modules/core-js/modules/es7.reflect.has-own-metadata.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , ordinaryHasOwnMetadata = metadata.has
- , toMetaKey = metadata.key;
-
-metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.reflect.metadata.js b/node_modules/core-js/modules/es7.reflect.metadata.js
deleted file mode 100644
index 3a4e3aee0..000000000
--- a/node_modules/core-js/modules/es7.reflect.metadata.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var metadata = require('./_metadata')
- , anObject = require('./_an-object')
- , aFunction = require('./_a-function')
- , toMetaKey = metadata.key
- , ordinaryDefineOwnMetadata = metadata.set;
-
-metadata.exp({metadata: function metadata(metadataKey, metadataValue){
- return function decorator(target, targetKey){
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
-}}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.set.to-json.js b/node_modules/core-js/modules/es7.set.to-json.js
index fd68cb510..e632f2a37 100644
--- a/node_modules/core-js/modules/es7.set.to-json.js
+++ b/node_modules/core-js/modules/es7.set.to-json.js
@@ -1,4 +1,4 @@
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = require('./_export');
+var $export = require('./$.export');
-$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')}); \ No newline at end of file
+$export($export.P, 'Set', {toJSON: require('./$.collection-to-json')('Set')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.string.at.js b/node_modules/core-js/modules/es7.string.at.js
index 208654e6c..fee583bf6 100644
--- a/node_modules/core-js/modules/es7.string.at.js
+++ b/node_modules/core-js/modules/es7.string.at.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
-var $export = require('./_export')
- , $at = require('./_string-at')(true);
+var $export = require('./$.export')
+ , $at = require('./$.string-at')(true);
$export($export.P, 'String', {
at: function at(pos){
diff --git a/node_modules/core-js/modules/es7.string.match-all.js b/node_modules/core-js/modules/es7.string.match-all.js
deleted file mode 100644
index cb0099b36..000000000
--- a/node_modules/core-js/modules/es7.string.match-all.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-// https://tc39.github.io/String.prototype.matchAll/
-var $export = require('./_export')
- , defined = require('./_defined')
- , toLength = require('./_to-length')
- , isRegExp = require('./_is-regexp')
- , getFlags = require('./_flags')
- , RegExpProto = RegExp.prototype;
-
-var $RegExpStringIterator = function(regexp, string){
- this._r = regexp;
- this._s = string;
-};
-
-require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){
- var match = this._r.exec(this._s);
- return {value: match, done: match === null};
-});
-
-$export($export.P, 'String', {
- matchAll: function matchAll(regexp){
- defined(this);
- if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
- var S = String(this)
- , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
- , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.string.pad-end.js b/node_modules/core-js/modules/es7.string.pad-end.js
deleted file mode 100644
index 8483d82f4..000000000
--- a/node_modules/core-js/modules/es7.string.pad-end.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = require('./_export')
- , $pad = require('./_string-pad');
-
-$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /*, fillString = ' ' */){
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.string.pad-start.js b/node_modules/core-js/modules/es7.string.pad-start.js
deleted file mode 100644
index b79b605d2..000000000
--- a/node_modules/core-js/modules/es7.string.pad-start.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = require('./_export')
- , $pad = require('./_string-pad');
-
-$export($export.P, 'String', {
- padStart: function padStart(maxLength /*, fillString = ' ' */){
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
- }
-}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.string.trim-left.js b/node_modules/core-js/modules/es7.string.trim-left.js
index e58457714..dbaf63080 100644
--- a/node_modules/core-js/modules/es7.string.trim-left.js
+++ b/node_modules/core-js/modules/es7.string.trim-left.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-require('./_string-trim')('trimLeft', function($trim){
+require('./$.string-trim')('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
-}, 'trimStart'); \ No newline at end of file
+}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.string.trim-right.js b/node_modules/core-js/modules/es7.string.trim-right.js
index 42a9ed33b..6b02d394a 100644
--- a/node_modules/core-js/modules/es7.string.trim-right.js
+++ b/node_modules/core-js/modules/es7.string.trim-right.js
@@ -1,7 +1,7 @@
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-require('./_string-trim')('trimRight', function($trim){
+require('./$.string-trim')('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
-}, 'trimEnd'); \ No newline at end of file
+}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.symbol.async-iterator.js b/node_modules/core-js/modules/es7.symbol.async-iterator.js
deleted file mode 100644
index cf9f74a50..000000000
--- a/node_modules/core-js/modules/es7.symbol.async-iterator.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./_wks-define')('asyncIterator'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.symbol.observable.js b/node_modules/core-js/modules/es7.symbol.observable.js
deleted file mode 100644
index 0163bca52..000000000
--- a/node_modules/core-js/modules/es7.symbol.observable.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./_wks-define')('observable'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/es7.system.global.js b/node_modules/core-js/modules/es7.system.global.js
deleted file mode 100644
index 8c2ab82de..000000000
--- a/node_modules/core-js/modules/es7.system.global.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// https://github.com/ljharb/proposal-global
-var $export = require('./_export');
-
-$export($export.S, 'System', {global: require('./_global')}); \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_add-to-unscopables.js b/node_modules/core-js/modules/library/_add-to-unscopables.js
deleted file mode 100644
index faf87af36..000000000
--- a/node_modules/core-js/modules/library/_add-to-unscopables.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = function(){ /* empty */ }; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_collection.js b/node_modules/core-js/modules/library/_collection.js
deleted file mode 100644
index 0bdd7fcbb..000000000
--- a/node_modules/core-js/modules/library/_collection.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-var global = require('./_global')
- , $export = require('./_export')
- , meta = require('./_meta')
- , fails = require('./_fails')
- , hide = require('./_hide')
- , redefineAll = require('./_redefine-all')
- , forOf = require('./_for-of')
- , anInstance = require('./_an-instance')
- , isObject = require('./_is-object')
- , setToStringTag = require('./_set-to-string-tag')
- , dP = require('./_object-dp').f
- , each = require('./_array-methods')(0)
- , DESCRIPTORS = require('./_descriptors');
-
-module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
- var Base = global[NAME]
- , C = Base
- , ADDER = IS_MAP ? 'set' : 'add'
- , proto = C && C.prototype
- , O = {};
- if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
- new C().entries().next();
- }))){
- // create collection constructor
- C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
- redefineAll(C.prototype, methods);
- meta.NEED = true;
- } else {
- C = wrapper(function(target, iterable){
- anInstance(target, C, NAME, '_c');
- target._c = new Base;
- if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target);
- });
- each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){
- var IS_ADDER = KEY == 'add' || KEY == 'set';
- if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){
- anInstance(this, C, KEY);
- if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false;
- var result = this._c[KEY](a === 0 ? 0 : a, b);
- return IS_ADDER ? this : result;
- });
- });
- if('size' in proto)dP(C.prototype, 'size', {
- get: function(){
- return this._c.size;
- }
- });
- }
-
- setToStringTag(C, NAME);
-
- O[NAME] = C;
- $export($export.G + $export.W + $export.F, O);
-
- if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
-
- return C;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_export.js b/node_modules/core-js/modules/library/_export.js
deleted file mode 100644
index dc084b4cc..000000000
--- a/node_modules/core-js/modules/library/_export.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var global = require('./_global')
- , core = require('./_core')
- , ctx = require('./_ctx')
- , hide = require('./_hide')
- , PROTOTYPE = 'prototype';
-
-var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , IS_WRAP = type & $export.W
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE]
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
- , key, own, out;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if(own && key in exports)continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function(C){
- var F = function(a, b, c){
- if(this instanceof C){
- switch(arguments.length){
- case 0: return new C;
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if(IS_PROTO){
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
- }
- }
-};
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_library.js b/node_modules/core-js/modules/library/_library.js
deleted file mode 100644
index 73f737c59..000000000
--- a/node_modules/core-js/modules/library/_library.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = true; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_path.js b/node_modules/core-js/modules/library/_path.js
deleted file mode 100644
index e2b878dc6..000000000
--- a/node_modules/core-js/modules/library/_path.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_core'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_redefine-all.js b/node_modules/core-js/modules/library/_redefine-all.js
deleted file mode 100644
index beeb2eafc..000000000
--- a/node_modules/core-js/modules/library/_redefine-all.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var hide = require('./_hide');
-module.exports = function(target, src, safe){
- for(var key in src){
- if(safe && target[key])target[key] = src[key];
- else hide(target, key, src[key]);
- } return target;
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_redefine.js b/node_modules/core-js/modules/library/_redefine.js
deleted file mode 100644
index 6bd64530c..000000000
--- a/node_modules/core-js/modules/library/_redefine.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./_hide'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/_set-species.js b/node_modules/core-js/modules/library/_set-species.js
deleted file mode 100644
index 4320fa510..000000000
--- a/node_modules/core-js/modules/library/_set-species.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-var global = require('./_global')
- , core = require('./_core')
- , dP = require('./_object-dp')
- , DESCRIPTORS = require('./_descriptors')
- , SPECIES = require('./_wks')('species');
-
-module.exports = function(KEY){
- var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
- if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
- configurable: true,
- get: function(){ return this; }
- });
-}; \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/es6.date.to-primitive.js b/node_modules/core-js/modules/library/es6.date.to-primitive.js
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/core-js/modules/library/es6.date.to-primitive.js
+++ /dev/null
diff --git a/node_modules/core-js/modules/library/es6.regexp.constructor.js b/node_modules/core-js/modules/library/es6.regexp.constructor.js
index 7313c52b3..087d9beb9 100644
--- a/node_modules/core-js/modules/library/es6.regexp.constructor.js
+++ b/node_modules/core-js/modules/library/es6.regexp.constructor.js
@@ -1 +1 @@
-require('./_set-species')('RegExp'); \ No newline at end of file
+require('./$.set-species')('RegExp'); \ No newline at end of file
diff --git a/node_modules/core-js/modules/library/es6.regexp.to-string.js b/node_modules/core-js/modules/library/es6.regexp.to-string.js
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/core-js/modules/library/es6.regexp.to-string.js
+++ /dev/null
diff --git a/node_modules/core-js/modules/library/web.dom.iterable.js b/node_modules/core-js/modules/library/web.dom.iterable.js
index e56371a9d..988c6da20 100644
--- a/node_modules/core-js/modules/library/web.dom.iterable.js
+++ b/node_modules/core-js/modules/library/web.dom.iterable.js
@@ -1,13 +1,3 @@
require('./es6.array.iterator');
-var global = require('./_global')
- , hide = require('./_hide')
- , Iterators = require('./_iterators')
- , TO_STRING_TAG = require('./_wks')('toStringTag');
-
-for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype;
- if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = Iterators.Array;
-} \ No newline at end of file
+var Iterators = require('./$.iterators');
+Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; \ No newline at end of file
diff --git a/node_modules/core-js/modules/web.dom.iterable.js b/node_modules/core-js/modules/web.dom.iterable.js
index a5a4c08eb..94099b8fe 100644
--- a/node_modules/core-js/modules/web.dom.iterable.js
+++ b/node_modules/core-js/modules/web.dom.iterable.js
@@ -1,22 +1,12 @@
-var $iterators = require('./es6.array.iterator')
- , redefine = require('./_redefine')
- , global = require('./_global')
- , hide = require('./_hide')
- , Iterators = require('./_iterators')
- , wks = require('./_wks')
- , ITERATOR = wks('iterator')
- , TO_STRING_TAG = wks('toStringTag')
- , ArrayValues = Iterators.Array;
-
-for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype
- , key;
- if(proto){
- if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
- if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
- }
-} \ No newline at end of file
+require('./es6.array.iterator');
+var global = require('./$.global')
+ , hide = require('./$.hide')
+ , Iterators = require('./$.iterators')
+ , ITERATOR = require('./$.wks')('iterator')
+ , NL = global.NodeList
+ , HTC = global.HTMLCollection
+ , NLProto = NL && NL.prototype
+ , HTCProto = HTC && HTC.prototype
+ , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
+if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
+if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues); \ No newline at end of file
diff --git a/node_modules/core-js/modules/web.immediate.js b/node_modules/core-js/modules/web.immediate.js
index 5b9463775..fa64f08ec 100644
--- a/node_modules/core-js/modules/web.immediate.js
+++ b/node_modules/core-js/modules/web.immediate.js
@@ -1,5 +1,5 @@
-var $export = require('./_export')
- , $task = require('./_task');
+var $export = require('./$.export')
+ , $task = require('./$.task');
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
diff --git a/node_modules/core-js/modules/web.timers.js b/node_modules/core-js/modules/web.timers.js
index 1a1da57f2..74b72019c 100644
--- a/node_modules/core-js/modules/web.timers.js
+++ b/node_modules/core-js/modules/web.timers.js
@@ -1,8 +1,8 @@
// ie9- setTimeout & setInterval additional parameters fix
-var global = require('./_global')
- , $export = require('./_export')
- , invoke = require('./_invoke')
- , partial = require('./_partial')
+var global = require('./$.global')
+ , $export = require('./$.export')
+ , invoke = require('./$.invoke')
+ , partial = require('./$.partial')
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
diff --git a/node_modules/core-js/package.json b/node_modules/core-js/package.json
index ed659f8d2..65cfc6504 100644
--- a/node_modules/core-js/package.json
+++ b/node_modules/core-js/package.json
@@ -1,57 +1,48 @@
{
"name": "core-js",
"description": "Standard library",
- "version": "2.4.1",
+ "version": "1.2.7",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
},
"main": "index.js",
"devDependencies": {
- "webpack": "1.13.x",
+ "webpack": "1.12.x",
"LiveScript": "1.3.x",
- "grunt": "1.0.x",
- "grunt-cli": "1.2.x",
- "grunt-livescript": "0.6.x",
- "grunt-contrib-uglify": "1.0.x",
- "grunt-contrib-watch": "1.0.x",
- "grunt-contrib-clean": "1.0.x",
- "grunt-contrib-copy": "1.0.x",
- "grunt-karma": "2.0.x",
- "karma": "1.1.x",
- "karma-qunit": "1.1.x",
- "karma-chrome-launcher": "1.0.x",
- "karma-ie-launcher": "1.0.x",
- "karma-firefox-launcher": "1.0.x",
- "karma-phantomjs-launcher": "1.0.x",
- "qunitjs": "2.0.x",
- "phantomjs-prebuilt": "2.1.x",
+ "grunt": "0.4.x",
+ "grunt-cli": "0.1.x",
+ "grunt-livescript": "0.5.x",
+ "grunt-contrib-uglify": "0.10.x",
+ "grunt-contrib-watch": "0.6.x",
+ "grunt-contrib-clean": "0.6.x",
+ "grunt-contrib-copy": "0.8.x",
+ "grunt-karma": "0.12.x",
+ "karma": "0.13.x",
+ "karma-qunit": "0.1.x",
+ "karma-chrome-launcher": "0.2.x",
+ "karma-ie-launcher": "0.2.x",
+ "karma-firefox-launcher": "0.1.x",
+ "karma-phantomjs-launcher": "0.2.x",
"promises-aplus-tests": "2.1.x",
- "es-observable-tests": "0.2.x",
- "eslint": "3.1.x",
- "temp": "0.8.x"
+ "eslint": "1.9.x",
+ "qunitjs": "1.23.x",
+ "phantomjs": "1.9.x"
},
"scripts": {
"grunt": "grunt",
- "lint": "eslint es5 es6 es7 stage web core fn modules",
+ "lint": "eslint es5 es6 es7 js web core fn modules",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter",
- "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library",
- "test": "npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs"
+ "test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs"
},
"license": "MIT",
"keywords": [
- "ES3",
- "ECMAScript 3",
"ES5",
"ECMAScript 5",
"ES6",
- "ES2015",
"ECMAScript 6",
- "ECMAScript 2015",
"ES7",
- "ES2016",
"ECMAScript 7",
- "ECMAScript 2016",
"Harmony",
"Strawman",
"Map",
@@ -60,10 +51,9 @@
"WeakSet",
"Promise",
"Symbol",
- "TypedArray",
+ "Array generics",
"setImmediate",
"Dict",
- "polyfill",
- "shim"
+ "partial application"
]
} \ No newline at end of file
diff --git a/node_modules/core-js/shim.js b/node_modules/core-js/shim.js
index 6db125683..6d38d2e27 100644
--- a/node_modules/core-js/shim.js
+++ b/node_modules/core-js/shim.js
@@ -1,29 +1,22 @@
+require('./modules/es5');
require('./modules/es6.symbol');
-require('./modules/es6.object.create');
-require('./modules/es6.object.define-property');
-require('./modules/es6.object.define-properties');
-require('./modules/es6.object.get-own-property-descriptor');
-require('./modules/es6.object.get-prototype-of');
-require('./modules/es6.object.keys');
-require('./modules/es6.object.get-own-property-names');
+require('./modules/es6.object.assign');
+require('./modules/es6.object.is');
+require('./modules/es6.object.set-prototype-of');
+require('./modules/es6.object.to-string');
require('./modules/es6.object.freeze');
require('./modules/es6.object.seal');
require('./modules/es6.object.prevent-extensions');
require('./modules/es6.object.is-frozen');
require('./modules/es6.object.is-sealed');
require('./modules/es6.object.is-extensible');
-require('./modules/es6.object.assign');
-require('./modules/es6.object.is');
-require('./modules/es6.object.set-prototype-of');
-require('./modules/es6.object.to-string');
-require('./modules/es6.function.bind');
+require('./modules/es6.object.get-own-property-descriptor');
+require('./modules/es6.object.get-prototype-of');
+require('./modules/es6.object.keys');
+require('./modules/es6.object.get-own-property-names');
require('./modules/es6.function.name');
require('./modules/es6.function.has-instance');
-require('./modules/es6.parse-int');
-require('./modules/es6.parse-float');
require('./modules/es6.number.constructor');
-require('./modules/es6.number.to-fixed');
-require('./modules/es6.number.to-precision');
require('./modules/es6.number.epsilon');
require('./modules/es6.number.is-finite');
require('./modules/es6.number.is-integer');
@@ -59,47 +52,15 @@ require('./modules/es6.string.ends-with');
require('./modules/es6.string.includes');
require('./modules/es6.string.repeat');
require('./modules/es6.string.starts-with');
-require('./modules/es6.string.anchor');
-require('./modules/es6.string.big');
-require('./modules/es6.string.blink');
-require('./modules/es6.string.bold');
-require('./modules/es6.string.fixed');
-require('./modules/es6.string.fontcolor');
-require('./modules/es6.string.fontsize');
-require('./modules/es6.string.italics');
-require('./modules/es6.string.link');
-require('./modules/es6.string.small');
-require('./modules/es6.string.strike');
-require('./modules/es6.string.sub');
-require('./modules/es6.string.sup');
-require('./modules/es6.date.now');
-require('./modules/es6.date.to-json');
-require('./modules/es6.date.to-iso-string');
-require('./modules/es6.date.to-string');
-require('./modules/es6.date.to-primitive');
-require('./modules/es6.array.is-array');
require('./modules/es6.array.from');
require('./modules/es6.array.of');
-require('./modules/es6.array.join');
-require('./modules/es6.array.slice');
-require('./modules/es6.array.sort');
-require('./modules/es6.array.for-each');
-require('./modules/es6.array.map');
-require('./modules/es6.array.filter');
-require('./modules/es6.array.some');
-require('./modules/es6.array.every');
-require('./modules/es6.array.reduce');
-require('./modules/es6.array.reduce-right');
-require('./modules/es6.array.index-of');
-require('./modules/es6.array.last-index-of');
+require('./modules/es6.array.iterator');
+require('./modules/es6.array.species');
require('./modules/es6.array.copy-within');
require('./modules/es6.array.fill');
require('./modules/es6.array.find');
require('./modules/es6.array.find-index');
-require('./modules/es6.array.species');
-require('./modules/es6.array.iterator');
require('./modules/es6.regexp.constructor');
-require('./modules/es6.regexp.to-string');
require('./modules/es6.regexp.flags');
require('./modules/es6.regexp.match');
require('./modules/es6.regexp.replace');
@@ -110,17 +71,6 @@ require('./modules/es6.map');
require('./modules/es6.set');
require('./modules/es6.weak-map');
require('./modules/es6.weak-set');
-require('./modules/es6.typed.array-buffer');
-require('./modules/es6.typed.data-view');
-require('./modules/es6.typed.int8-array');
-require('./modules/es6.typed.uint8-array');
-require('./modules/es6.typed.uint8-clamped-array');
-require('./modules/es6.typed.int16-array');
-require('./modules/es6.typed.uint16-array');
-require('./modules/es6.typed.int32-array');
-require('./modules/es6.typed.uint32-array');
-require('./modules/es6.typed.float32-array');
-require('./modules/es6.typed.float64-array');
require('./modules/es6.reflect.apply');
require('./modules/es6.reflect.construct');
require('./modules/es6.reflect.define-property');
@@ -137,40 +87,18 @@ require('./modules/es6.reflect.set');
require('./modules/es6.reflect.set-prototype-of');
require('./modules/es7.array.includes');
require('./modules/es7.string.at');
-require('./modules/es7.string.pad-start');
-require('./modules/es7.string.pad-end');
+require('./modules/es7.string.pad-left');
+require('./modules/es7.string.pad-right');
require('./modules/es7.string.trim-left');
require('./modules/es7.string.trim-right');
-require('./modules/es7.string.match-all');
-require('./modules/es7.symbol.async-iterator');
-require('./modules/es7.symbol.observable');
+require('./modules/es7.regexp.escape');
require('./modules/es7.object.get-own-property-descriptors');
require('./modules/es7.object.values');
require('./modules/es7.object.entries');
-require('./modules/es7.object.define-getter');
-require('./modules/es7.object.define-setter');
-require('./modules/es7.object.lookup-getter');
-require('./modules/es7.object.lookup-setter');
require('./modules/es7.map.to-json');
require('./modules/es7.set.to-json');
-require('./modules/es7.system.global');
-require('./modules/es7.error.is-error');
-require('./modules/es7.math.iaddh');
-require('./modules/es7.math.isubh');
-require('./modules/es7.math.imulh');
-require('./modules/es7.math.umulh');
-require('./modules/es7.reflect.define-metadata');
-require('./modules/es7.reflect.delete-metadata');
-require('./modules/es7.reflect.get-metadata');
-require('./modules/es7.reflect.get-metadata-keys');
-require('./modules/es7.reflect.get-own-metadata');
-require('./modules/es7.reflect.get-own-metadata-keys');
-require('./modules/es7.reflect.has-metadata');
-require('./modules/es7.reflect.has-own-metadata');
-require('./modules/es7.reflect.metadata');
-require('./modules/es7.asap');
-require('./modules/es7.observable');
+require('./modules/js.array.statics');
require('./modules/web.timers');
require('./modules/web.immediate');
require('./modules/web.dom.iterable');
-module.exports = require('./modules/_core'); \ No newline at end of file
+module.exports = require('./modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/stage/0.js b/node_modules/core-js/stage/0.js
deleted file mode 100644
index e89a005f0..000000000
--- a/node_modules/core-js/stage/0.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.string.at');
-require('../modules/es7.map.to-json');
-require('../modules/es7.set.to-json');
-require('../modules/es7.error.is-error');
-require('../modules/es7.math.iaddh');
-require('../modules/es7.math.isubh');
-require('../modules/es7.math.imulh');
-require('../modules/es7.math.umulh');
-require('../modules/es7.asap');
-module.exports = require('./1'); \ No newline at end of file
diff --git a/node_modules/core-js/stage/1.js b/node_modules/core-js/stage/1.js
deleted file mode 100644
index 230fe13ad..000000000
--- a/node_modules/core-js/stage/1.js
+++ /dev/null
@@ -1,6 +0,0 @@
-require('../modules/es7.string.trim-left');
-require('../modules/es7.string.trim-right');
-require('../modules/es7.string.match-all');
-require('../modules/es7.symbol.observable');
-require('../modules/es7.observable');
-module.exports = require('./2');
diff --git a/node_modules/core-js/stage/2.js b/node_modules/core-js/stage/2.js
deleted file mode 100644
index ba444e1a7..000000000
--- a/node_modules/core-js/stage/2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-require('../modules/es7.system.global');
-require('../modules/es7.symbol.async-iterator');
-module.exports = require('./3');
diff --git a/node_modules/core-js/stage/3.js b/node_modules/core-js/stage/3.js
deleted file mode 100644
index c1ea400a9..000000000
--- a/node_modules/core-js/stage/3.js
+++ /dev/null
@@ -1,4 +0,0 @@
-require('../modules/es7.object.get-own-property-descriptors');
-require('../modules/es7.string.pad-start');
-require('../modules/es7.string.pad-end');
-module.exports = require('./4');
diff --git a/node_modules/core-js/stage/4.js b/node_modules/core-js/stage/4.js
deleted file mode 100644
index 0fb53ddd8..000000000
--- a/node_modules/core-js/stage/4.js
+++ /dev/null
@@ -1,8 +0,0 @@
-require('../modules/es7.object.define-getter');
-require('../modules/es7.object.define-setter');
-require('../modules/es7.object.lookup-getter');
-require('../modules/es7.object.lookup-setter');
-require('../modules/es7.object.values');
-require('../modules/es7.object.entries');
-require('../modules/es7.array.includes');
-module.exports = require('../modules/_core');
diff --git a/node_modules/core-js/stage/index.js b/node_modules/core-js/stage/index.js
deleted file mode 100644
index eb959140c..000000000
--- a/node_modules/core-js/stage/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./pre'); \ No newline at end of file
diff --git a/node_modules/core-js/stage/pre.js b/node_modules/core-js/stage/pre.js
deleted file mode 100644
index f3bc54d95..000000000
--- a/node_modules/core-js/stage/pre.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('../modules/es7.reflect.define-metadata');
-require('../modules/es7.reflect.delete-metadata');
-require('../modules/es7.reflect.get-metadata');
-require('../modules/es7.reflect.get-metadata-keys');
-require('../modules/es7.reflect.get-own-metadata');
-require('../modules/es7.reflect.get-own-metadata-keys');
-require('../modules/es7.reflect.has-metadata');
-require('../modules/es7.reflect.has-own-metadata');
-require('../modules/es7.reflect.metadata');
-module.exports = require('./0'); \ No newline at end of file
diff --git a/node_modules/core-js/web/dom-collections.js b/node_modules/core-js/web/dom-collections.js
deleted file mode 100644
index 2118e3fe6..000000000
--- a/node_modules/core-js/web/dom-collections.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('../modules/web.dom.iterable');
-module.exports = require('../modules/_core'); \ No newline at end of file
diff --git a/node_modules/core-js/web/immediate.js b/node_modules/core-js/web/immediate.js
index 244ebb16f..e4e5493bf 100644
--- a/node_modules/core-js/web/immediate.js
+++ b/node_modules/core-js/web/immediate.js
@@ -1,2 +1,2 @@
require('../modules/web.immediate');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/web/index.js b/node_modules/core-js/web/index.js
index 6687d571e..6c3221e24 100644
--- a/node_modules/core-js/web/index.js
+++ b/node_modules/core-js/web/index.js
@@ -1,4 +1,4 @@
require('../modules/web.timers');
require('../modules/web.immediate');
require('../modules/web.dom.iterable');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/core-js/web/timers.js b/node_modules/core-js/web/timers.js
index 2c66f4387..763ea44e9 100644
--- a/node_modules/core-js/web/timers.js
+++ b/node_modules/core-js/web/timers.js
@@ -1,2 +1,2 @@
require('../modules/web.timers');
-module.exports = require('../modules/_core'); \ No newline at end of file
+module.exports = require('../modules/$.core'); \ No newline at end of file
diff --git a/node_modules/crc32-stream/README.md b/node_modules/crc32-stream/README.md
index 040bdef07..a0b508054 100644
--- a/node_modules/crc32-stream/README.md
+++ b/node_modules/crc32-stream/README.md
@@ -1,9 +1,7 @@
-# crc32-stream v1.0.0 [![Build Status](https://travis-ci.org/archiverjs/node-crc32-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-crc32-stream) [![Build status](https://ci.appveyor.com/api/projects/status/sy60s39cmyvd60i3/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-crc32-stream/branch/master)
+# crc32-stream v2.0.0 [![Build Status](https://travis-ci.org/archiverjs/node-crc32-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-crc32-stream) [![Build status](https://ci.appveyor.com/api/projects/status/sy60s39cmyvd60i3/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-crc32-stream/branch/master)
crc32-stream is a streaming CRC32 checksumer. It uses [buffer-crc32](https://www.npmjs.org/package/buffer-crc32) behind the scenes to reliably handle binary data and fancy character sets. Data is passed through untouched.
-[![NPM](https://nodei.co/npm/crc32-stream.png)](https://nodei.co/npm/crc32-stream/)
-
### Install
```bash
diff --git a/node_modules/crc32-stream/lib/crc32-stream.js b/node_modules/crc32-stream/lib/crc32-stream.js
index 42cb45400..f0b0ee6c7 100644
--- a/node_modules/crc32-stream/lib/crc32-stream.js
+++ b/node_modules/crc32-stream/lib/crc32-stream.js
@@ -8,7 +8,7 @@
var inherits = require('util').inherits;
var Transform = require('readable-stream').Transform;
-var crc32 = require('buffer-crc32');
+var crc32 = require('crc').crc32;
var CRC32Stream = module.exports = function CRC32Stream(options) {
Transform.call(this, options);
@@ -29,14 +29,16 @@ CRC32Stream.prototype._transform = function(chunk, encoding, callback) {
callback(null, chunk);
};
-CRC32Stream.prototype.digest = function() {
- return crc32.unsigned(0, this.checksum);
+CRC32Stream.prototype.digest = function(encoding) {
+ var checksum = new Buffer(4);
+ checksum.writeUInt32BE(this.checksum >>> 0, 0);
+ return encoding ? checksum.toString(encoding) : checksum;
};
CRC32Stream.prototype.hex = function() {
- return this.digest().toString(16).toUpperCase();
+ return this.digest('hex').toUpperCase();
};
CRC32Stream.prototype.size = function() {
return this.rawSize;
-}; \ No newline at end of file
+};
diff --git a/node_modules/crc32-stream/lib/deflate-crc32-stream.js b/node_modules/crc32-stream/lib/deflate-crc32-stream.js
index 944eb0d0a..d55c2032c 100644
--- a/node_modules/crc32-stream/lib/deflate-crc32-stream.js
+++ b/node_modules/crc32-stream/lib/deflate-crc32-stream.js
@@ -8,7 +8,7 @@
var zlib = require('zlib');
var inherits = require('util').inherits;
-var crc32 = require('buffer-crc32');
+var crc32 = require('crc').crc32;
var DeflateCRC32Stream = module.exports = function (options) {
zlib.DeflateRaw.call(this, options);
@@ -48,12 +48,14 @@ DeflateCRC32Stream.prototype.write = function(chunk, enc, cb) {
return zlib.DeflateRaw.prototype.write.call(this, chunk, enc, cb);
};
-DeflateCRC32Stream.prototype.digest = function() {
- return crc32.unsigned(0, this.checksum);
+DeflateCRC32Stream.prototype.digest = function(encoding) {
+ var checksum = new Buffer(4);
+ checksum.writeUInt32BE(this.checksum >>> 0, 0);
+ return encoding ? checksum.toString(encoding) : checksum;
};
DeflateCRC32Stream.prototype.hex = function() {
- return this.digest().toString(16).toUpperCase();
+ return this.digest('hex').toUpperCase();
};
DeflateCRC32Stream.prototype.size = function(compressed) {
@@ -64,4 +66,4 @@ DeflateCRC32Stream.prototype.size = function(compressed) {
} else {
return this.rawSize;
}
-}; \ No newline at end of file
+};
diff --git a/node_modules/crc32-stream/package.json b/node_modules/crc32-stream/package.json
index e27b06964..d7ecbb3b5 100644
--- a/node_modules/crc32-stream/package.json
+++ b/node_modules/crc32-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "crc32-stream",
- "version": "1.0.0",
+ "version": "2.0.0",
"description": "a streaming CRC32 checksumer",
"homepage": "https://github.com/archiverjs/node-crc32-stream",
"author": {
@@ -26,12 +26,12 @@
"test": "mocha --reporter dot"
},
"dependencies": {
- "readable-stream": "^2.0.0",
- "buffer-crc32": "^0.2.1"
+ "crc": "^3.4.4",
+ "readable-stream": "^2.0.0"
},
"devDependencies": {
"chai": "^3.4.0",
- "mocha": "^2.3.0"
+ "mocha": "^3.2.0"
},
"keywords": [
"crc32-stream",
@@ -42,4 +42,4 @@
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/dateformat/.npmignore b/node_modules/dateformat/.npmignore
index 830d0ff74..efab07fb1 100644
--- a/node_modules/dateformat/.npmignore
+++ b/node_modules/dateformat/.npmignore
@@ -1,57 +1,2 @@
-# .gitignore <https://github.com/tunnckoCore/dotfiles>
-#
-# Copyright (c) 2014 Charlike Mike Reagent, contributors.
-# Released under the MIT license.
-#
-
-# Always-ignore dirs #
-# ####################
-_gh_pages
-node_modules
-bower_components
-components
-vendor
-build
-dest
-dist
-src
-lib-cov
-coverage
-nbproject
-cache
-temp
-tmp
-
-# Packages #
-# ##########
-*.7z
-*.dmg
-*.gz
-*.iso
-*.jar
-*.rar
-*.tar
-*.zip
-
-# OS, Logs and databases #
-# #########################
-*.pid
-*.dat
-*.log
-*.sql
-*.sqlite
-*~
-~*
-
-# Another files #
-# ###############
-Icon?
-.DS_Store*
-Thumbs.db
-ehthumbs.db
-Desktop.ini
-npm-debug.log
-.directory
-._*
-
-koa-better-body \ No newline at end of file
+test
+.travis.yml
diff --git a/node_modules/dateformat/.travis.yml b/node_modules/dateformat/.travis.yml
deleted file mode 100644
index 18ae2d89c..000000000
--- a/node_modules/dateformat/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
diff --git a/node_modules/dateformat/Readme.md b/node_modules/dateformat/Readme.md
index 0aaf1e822..9ee3db1dc 100644
--- a/node_modules/dateformat/Readme.md
+++ b/node_modules/dateformat/Readme.md
@@ -21,59 +21,112 @@ $ dateformat --help
As taken from Steven's post, modified to match the Modifications listed above:
```js
- var dateFormat = require('dateformat');
- var now = new Date();
-
- // Basic usage
- dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
- // Saturday, June 9th, 2007, 5:46:21 PM
-
- // You can use one of several named masks
- dateFormat(now, "isoDateTime");
- // 2007-06-09T17:46:21
-
- // ...Or add your own
- dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
- dateFormat(now, "hammerTime");
- // 17:46! Can't touch this!
-
- // When using the standalone dateFormat function,
- // you can also provide the date as a string
- dateFormat("Jun 9 2007", "fullDate");
- // Saturday, June 9, 2007
-
- // Note that if you don't include the mask argument,
- // dateFormat.masks.default is used
- dateFormat(now);
- // Sat Jun 09 2007 17:46:21
-
- // And if you don't include the date argument,
- // the current date and time is used
- dateFormat();
- // Sat Jun 09 2007 17:46:22
-
- // You can also skip the date argument (as long as your mask doesn't
- // contain any numbers), in which case the current date/time is used
- dateFormat("longTime");
- // 5:46:22 PM EST
-
- // And finally, you can convert local time to UTC time. Simply pass in
- // true as an additional argument (no argument skipping allowed in this case):
- dateFormat(now, "longTime", true);
- // 10:46:21 PM UTC
-
- // ...Or add the prefix "UTC:" or "GMT:" to your mask.
- dateFormat(now, "UTC:h:MM:ss TT Z");
- // 10:46:21 PM UTC
-
- // You can also get the ISO 8601 week of the year:
- dateFormat(now, "W");
- // 42
-
- // and also get the ISO 8601 numeric representation of the day of the week:
- dateFormat(now,"N");
- // 6
+var dateFormat = require('dateformat');
+var now = new Date();
+
+// Basic usage
+dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
+// Saturday, June 9th, 2007, 5:46:21 PM
+
+// You can use one of several named masks
+dateFormat(now, "isoDateTime");
+// 2007-06-09T17:46:21
+
+// ...Or add your own
+dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
+dateFormat(now, "hammerTime");
+// 17:46! Can't touch this!
+
+// When using the standalone dateFormat function,
+// you can also provide the date as a string
+dateFormat("Jun 9 2007", "fullDate");
+// Saturday, June 9, 2007
+
+// Note that if you don't include the mask argument,
+// dateFormat.masks.default is used
+dateFormat(now);
+// Sat Jun 09 2007 17:46:21
+
+// And if you don't include the date argument,
+// the current date and time is used
+dateFormat();
+// Sat Jun 09 2007 17:46:22
+
+// You can also skip the date argument (as long as your mask doesn't
+// contain any numbers), in which case the current date/time is used
+dateFormat("longTime");
+// 5:46:22 PM EST
+
+// And finally, you can convert local time to UTC time. Simply pass in
+// true as an additional argument (no argument skipping allowed in this case):
+dateFormat(now, "longTime", true);
+// 10:46:21 PM UTC
+
+// ...Or add the prefix "UTC:" or "GMT:" to your mask.
+dateFormat(now, "UTC:h:MM:ss TT Z");
+// 10:46:21 PM UTC
+
+// You can also get the ISO 8601 week of the year:
+dateFormat(now, "W");
+// 42
+
+// and also get the ISO 8601 numeric representation of the day of the week:
+dateFormat(now,"N");
+// 6
```
+
+### Mask options
+
+Mask | Description
+---- | -----------
+`d` | Day of the month as digits; no leading zero for single-digit days.
+`dd` | Day of the month as digits; leading zero for single-digit days.
+`ddd` | Day of the week as a three-letter abbreviation.
+`dddd` | Day of the week as its full name.
+`m` | Month as digits; no leading zero for single-digit months.
+`mm` | Month as digits; leading zero for single-digit months.
+`mmm` | Month as a three-letter abbreviation.
+`mmmm` | Month as its full name.
+`yy` | Year as last two digits; leading zero for years less than 10.
+`yyyy` | Year represented by four digits.
+`h` | Hours; no leading zero for single-digit hours (12-hour clock).
+`hh` | Hours; leading zero for single-digit hours (12-hour clock).
+`H` | Hours; no leading zero for single-digit hours (24-hour clock).
+`HH` | Hours; leading zero for single-digit hours (24-hour clock).
+`M` | Minutes; no leading zero for single-digit minutes.
+`MM` | Minutes; leading zero for single-digit minutes.
+`N` | ISO 8601 numeric representation of the day of the week.
+`o` | GMT/UTC timezone offset, e.g. -0500 or +0230.
+`s` | Seconds; no leading zero for single-digit seconds.
+`ss` | Seconds; leading zero for single-digit seconds.
+`S` | The date's ordinal suffix (st, nd, rd, or th). Works well with `d`.
+`l` | Milliseconds; gives 3 digits.
+`L` | Milliseconds; gives 2 digits.
+`t` | Lowercase, single-character time marker string: a or p.
+`tt` | Lowercase, two-character time marker string: am or pm.
+`T` | Uppercase, single-character time marker string: A or P.
+`TT` | Uppercase, two-character time marker string: AM or PM.
+`W` | ISO 8601 week number of the year, e.g. 42
+`Z` | US timezone abbreviation, e.g. EST or MDT. With non-US timezones or in the
+`'...'`, `"..."` | Literal character sequence. Surrounding quotes are removed.
+`UTC:` | Must be the first four characters of the mask. Converts the date from local time to UTC/GMT/Zulu time before applying the mask. The "UTC:" prefix is removed.
+
+### Named Formats
+
+Name | Mask | Example
+---- | ---- | -------
+`default` | `ddd mmm dd yyyy HH:MM:ss` | Sat Jun 09 2007 17:46:21
+`shortDate` | `m/d/yy` | 6/9/07
+`mediumDate` | `mmm d, yyyy` | Jun 9, 2007
+`longDate` | `mmmm d, yyyy` | June 9, 2007
+`fullDate` | `dddd, mmmm d, yyyy` | Saturday, June 9, 2007
+`shortTime` | `h:MM TT` | 5:46 PM
+`mediumTime` | `h:MM:ss TT` | 5:46:21 PM
+`longTime` | `h:MM:ss TT Z` | 5:46:21 PM EST
+`isoDate` | `yyyy-mm-dd` | 2007-06-09
+`isoTime` | `HH:MM:ss` | 17:46:21
+`isoDateTime` | `yyyy-mm-dd'T'HH:MM:ss` | 2007-06-09T17:46:21
+`isoUtcDateTime` | `UTC:yyyy-mm-dd'T'HH:MM:ss'Z'` | 2007-06-09T22:46:21Z
## License
(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.
diff --git a/node_modules/dateformat/bin/cli.js b/node_modules/dateformat/bin/cli.js
deleted file mode 100755
index e095ddc68..000000000
--- a/node_modules/dateformat/bin/cli.js
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env node
-/**
- * dateformat <https://github.com/felixge/node-dateformat>
- *
- * Copyright (c) 2014 Charlike Mike Reagent (cli), contributors.
- * Released under the MIT license.
- */
-
-'use strict';
-
-/**
- * Module dependencies.
- */
-
-var dateFormat = require('../lib/dateformat');
-var meow = require('meow');
-var stdin = require('get-stdin');
-
-var cli = meow({
- pkg: '../package.json',
- help: [
- 'Options',
- ' --help Show this help',
- ' --version Current version of package',
- ' -d | --date Date that want to format (Date object as Number or String)',
- ' -m | --mask Mask that will use to format the date',
- ' -u | --utc Convert local time to UTC time or use `UTC:` prefix in mask',
- ' -g | --gmt You can use `GMT:` prefix in mask',
- '',
- 'Usage',
- ' dateformat [date] [mask]',
- ' dateformat "Nov 26 2014" "fullDate"',
- ' dateformat 1416985417095 "dddd, mmmm dS, yyyy, h:MM:ss TT"',
- ' dateformat 1315361943159 "W"',
- ' dateformat "UTC:h:MM:ss TT Z"',
- ' dateformat "longTime" true',
- ' dateformat "longTime" false true',
- ' dateformat "Jun 9 2007" "fullDate" true',
- ' date +%s | dateformat',
- ''
- ].join('\n')
-})
-
-var date = cli.input[0] || cli.flags.d || cli.flags.date || Date.now();
-var mask = cli.input[1] || cli.flags.m || cli.flags.mask || dateFormat.masks.default;
-var utc = cli.input[2] || cli.flags.u || cli.flags.utc || false;
-var gmt = cli.input[3] || cli.flags.g || cli.flags.gmt || false;
-
-utc = utc === 'true' ? true : false;
-gmt = gmt === 'true' ? true : false;
-
-if (!cli.input.length) {
- stdin(function(date) {
- console.log(dateFormat(date, dateFormat.masks.default, utc, gmt));
- });
- return;
-}
-
-if (cli.input.length === 1 && date) {
- mask = date;
- date = Date.now();
- console.log(dateFormat(date, mask, utc, gmt));
- return;
-}
-
-if (cli.input.length >= 2 && date && mask) {
- if (mask === 'true' || mask === 'false') {
- utc = mask === 'true' ? true : false;
- gmt = !utc;
- mask = date
- date = Date.now();
- }
- console.log(dateFormat(date, mask, utc, gmt));
- return;
-}
diff --git a/node_modules/dateformat/package.json b/node_modules/dateformat/package.json
index 362956d47..da4d980dc 100644
--- a/node_modules/dateformat/package.json
+++ b/node_modules/dateformat/package.json
@@ -7,18 +7,12 @@
"contributors": [
"Steven Levithan",
"Felix Geisendörfer <felix@debuggable.com>",
- "Christoph Tavan <dev@tavan.de>"
+ "Christoph Tavan <dev@tavan.de>",
+ "Jon Schlinkert (https://github.com/jonschlinkert)"
],
- "version": "1.0.12",
+ "version": "2.0.0",
"license": "MIT",
"main": "lib/dateformat",
- "bin": {
- "dateformat": "bin/cli.js"
- },
- "dependencies": {
- "get-stdin": "^4.0.1",
- "meow": "^3.3.0"
- },
"devDependencies": {
"underscore": "1.7.0",
"mocha": "2.0.1"
diff --git a/node_modules/dateformat/test/test_dayofweek.js b/node_modules/dateformat/test/test_dayofweek.js
deleted file mode 100644
index 7f37407cd..000000000
--- a/node_modules/dateformat/test/test_dayofweek.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var assert = require('assert');
-
-var dateFormat = require('./../lib/dateformat');
-
-describe('dayOfWeek', function() {
- it('should correctly format the timezone part', function(done) {
- var start = 10; // the 10 of March 2013 is a Sunday
- for(var dow = 1; dow <= 7; dow++){
- var date = new Date('2013-03-' + (start + dow));
- var N = dateFormat(date, 'N');
- assert.strictEqual(N, String(dow));
- }
- done();
- });
-});
diff --git a/node_modules/dateformat/test/test_formats.js b/node_modules/dateformat/test/test_formats.js
deleted file mode 100644
index df186caef..000000000
--- a/node_modules/dateformat/test/test_formats.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var assert = require('assert');
-
-var _ = require('underscore');
-
-var dateFormat = require('../lib/dateformat');
-
-var expects = {
- 'default': 'Wed Nov 26 2014 13:19:44',
- 'shortDate': '11/26/14',
- 'mediumDate': 'Nov 26, 2014',
- 'longDate': 'November 26, 2014',
- 'fullDate': 'Wednesday, November 26, 2014',
- 'shortTime': '1:19 PM',
- 'mediumTime': '1:19:44 PM',
- 'longTime': '1:19:44 PM %TZ_PREFIX%%TZ_OFFSET%',
- 'isoDate': '2014-11-26',
- 'isoTime': '13:19:44',
- 'isoDateTime': '2014-11-26T13:19:44%TZ_OFFSET%',
- 'isoUtcDateTime': '',
- 'expiresHeaderFormat': 'Wed, 26 Nov 2014 13:19:44 %TZ_PREFIX%%TZ_OFFSET%'
-};
-
-function pad(num, size) {
- var s = num + '';
- while (s.length < size) {
- s = '0' + s;
- }
- return s;
-}
-
-function parseOffset(date) {
- var offset = date.getTimezoneOffset();
- var hours = Math.floor(-1 * offset / 60);
- var minutes = (-1 * offset) - (hours * 60);
- var sign = offset > 0 ? '-' : '+';
- return {
- offset: offset,
- hours: hours,
- minutes: minutes,
- sign: sign,
- };
-}
-
-function timezoneOffset(date) {
- var offset = parseOffset(date);
- return offset.sign + pad(offset.hours, 2) + pad(offset.minutes, 2);
-}
-
-describe('dateformat([now], [mask])', function() {
- _.each(dateFormat.masks, function(value, key) {
- it('should format `' + key + '` mask', function(done) {
- var now = new Date(2014, 10, 26, 13, 19, 44);
- var tzOffset = timezoneOffset(now);
- var expected = expects[key].replace(/%TZ_PREFIX%/, 'GMT')
- .replace(/%TZ_OFFSET%/g, tzOffset)
- .replace(/GMT\+0000/g, 'UTC');
- if (key === 'isoUtcDateTime') {
- var offset = parseOffset(now);
- now.setHours(now.getHours() - offset.hours,
- now.getMinutes() - offset.minutes);
- var expected = now.toISOString().replace(/\.000/g, '');
- }
- var actual = dateFormat(now, key);
- assert.strictEqual(actual, expected);
- done();
- });
- });
- it('should use `default` mask, when `mask` is empty', function(done) {
- var now = new Date(2014, 10, 26, 13, 19, 44);
- var expected = expects['default'];
- var actual = dateFormat(now);
-
- assert.strictEqual(actual, expected);
- done();
- });
-});
diff --git a/node_modules/dateformat/test/test_isoutcdatetime.js b/node_modules/dateformat/test/test_isoutcdatetime.js
deleted file mode 100644
index 886b7a5bd..000000000
--- a/node_modules/dateformat/test/test_isoutcdatetime.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var assert = require('assert');
-
-var dateFormat = require('./../lib/dateformat');
-
-describe('isoUtcDateTime', function() {
- it('should correctly format the timezone part', function(done) {
- var actual = dateFormat('2014-06-02T13:23:21-08:00', 'isoUtcDateTime');
- assert.strictEqual(actual, '2014-06-02T21:23:21Z');
- done();
- });
-});
diff --git a/node_modules/dateformat/test/weekofyear/test_weekofyear.js b/node_modules/dateformat/test/weekofyear/test_weekofyear.js
deleted file mode 100644
index d1ddbe818..000000000
--- a/node_modules/dateformat/test/weekofyear/test_weekofyear.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var dateFormat = require('../lib/dateformat.js');
-
-var val = process.argv[2] || new Date();
-console.log(dateFormat(val, 'W'));
diff --git a/node_modules/dateformat/test/weekofyear/test_weekofyear.sh b/node_modules/dateformat/test/weekofyear/test_weekofyear.sh
deleted file mode 100644
index 3c3e69b31..000000000
--- a/node_modules/dateformat/test/weekofyear/test_weekofyear.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# this just takes php's date() function as a reference to check if week of year
-# is calculated correctly in the range from 1970 .. 2038 by brute force...
-
-SEQ="seq"
-SYSTEM=`uname`
-if [ "$SYSTEM" = "Darwin" ]; then
- SEQ="jot"
-fi
-
-for YEAR in {1970..2038}; do
- for MONTH in {1..12}; do
- DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}')
- for DAY in $( $SEQ $DAYS ); do
- DATE=$YEAR-$MONTH-$DAY
- echo -n $DATE ...
- NODEVAL=$(node test_weekofyear.js $DATE)
- PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));")
- if [ "$NODEVAL" -ne "$PHPVAL" ]; then
- echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE"
- else
- echo " OK"
- fi
- done
- done
-done
diff --git a/node_modules/debug/.jshintrc b/node_modules/debug/.jshintrc
deleted file mode 100644
index 299877f26..000000000
--- a/node_modules/debug/.jshintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "laxbreak": true
-}
diff --git a/node_modules/debug/.npmignore b/node_modules/debug/.npmignore
index 7e6163db0..db2fbb9db 100644
--- a/node_modules/debug/.npmignore
+++ b/node_modules/debug/.npmignore
@@ -4,3 +4,5 @@ examples
example
*.sock
dist
+yarn.lock
+coverage
diff --git a/node_modules/debug/History.md b/node_modules/debug/History.md
deleted file mode 100644
index 854c9711c..000000000
--- a/node_modules/debug/History.md
+++ /dev/null
@@ -1,195 +0,0 @@
-
-2.2.0 / 2015-05-09
-==================
-
- * package: update "ms" to v0.7.1 (#202, @dougwilson)
- * README: add logging to file example (#193, @DanielOchoa)
- * README: fixed a typo (#191, @amir-s)
- * browser: expose `storage` (#190, @stephenmathieson)
- * Makefile: add a `distclean` target (#189, @stephenmathieson)
-
-2.1.3 / 2015-03-13
-==================
-
- * Updated stdout/stderr example (#186)
- * Updated example/stdout.js to match debug current behaviour
- * Renamed example/stderr.js to stdout.js
- * Update Readme.md (#184)
- * replace high intensity foreground color for bold (#182, #183)
-
-2.1.2 / 2015-03-01
-==================
-
- * dist: recompile
- * update "ms" to v0.7.0
- * package: update "browserify" to v9.0.3
- * component: fix "ms.js" repo location
- * changed bower package name
- * updated documentation about using debug in a browser
- * fix: security error on safari (#167, #168, @yields)
-
-2.1.1 / 2014-12-29
-==================
-
- * browser: use `typeof` to check for `console` existence
- * browser: check for `console.log` truthiness (fix IE 8/9)
- * browser: add support for Chrome apps
- * Readme: added Windows usage remarks
- * Add `bower.json` to properly support bower install
-
-2.1.0 / 2014-10-15
-==================
-
- * node: implement `DEBUG_FD` env variable support
- * package: update "browserify" to v6.1.0
- * package: add "license" field to package.json (#135, @panuhorsmalahti)
-
-2.0.0 / 2014-09-01
-==================
-
- * package: update "browserify" to v5.11.0
- * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
-
-1.0.4 / 2014-07-15
-==================
-
- * dist: recompile
- * example: remove `console.info()` log usage
- * example: add "Content-Type" UTF-8 header to browser example
- * browser: place %c marker after the space character
- * browser: reset the "content" color via `color: inherit`
- * browser: add colors support for Firefox >= v31
- * debug: prefer an instance `log()` function over the global one (#119)
- * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
-
-1.0.3 / 2014-07-09
-==================
-
- * Add support for multiple wildcards in namespaces (#122, @seegno)
- * browser: fix lint
-
-1.0.2 / 2014-06-10
-==================
-
- * browser: update color palette (#113, @gscottolson)
- * common: make console logging function configurable (#108, @timoxley)
- * node: fix %o colors on old node <= 0.8.x
- * Makefile: find node path using shell/which (#109, @timoxley)
-
-1.0.1 / 2014-06-06
-==================
-
- * browser: use `removeItem()` to clear localStorage
- * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
- * package: add "contributors" section
- * node: fix comment typo
- * README: list authors
-
-1.0.0 / 2014-06-04
-==================
-
- * make ms diff be global, not be scope
- * debug: ignore empty strings in enable()
- * node: make DEBUG_COLORS able to disable coloring
- * *: export the `colors` array
- * npmignore: don't publish the `dist` dir
- * Makefile: refactor to use browserify
- * package: add "browserify" as a dev dependency
- * Readme: add Web Inspector Colors section
- * node: reset terminal color for the debug content
- * node: map "%o" to `util.inspect()`
- * browser: map "%j" to `JSON.stringify()`
- * debug: add custom "formatters"
- * debug: use "ms" module for humanizing the diff
- * Readme: add "bash" syntax highlighting
- * browser: add Firebug color support
- * browser: add colors for WebKit browsers
- * node: apply log to `console`
- * rewrite: abstract common logic for Node & browsers
- * add .jshintrc file
-
-0.8.1 / 2014-04-14
-==================
-
- * package: re-add the "component" section
-
-0.8.0 / 2014-03-30
-==================
-
- * add `enable()` method for nodejs. Closes #27
- * change from stderr to stdout
- * remove unnecessary index.js file
-
-0.7.4 / 2013-11-13
-==================
-
- * remove "browserify" key from package.json (fixes something in browserify)
-
-0.7.3 / 2013-10-30
-==================
-
- * fix: catch localStorage security error when cookies are blocked (Chrome)
- * add debug(err) support. Closes #46
- * add .browser prop to package.json. Closes #42
-
-0.7.2 / 2013-02-06
-==================
-
- * fix package.json
- * fix: Mobile Safari (private mode) is broken with debug
- * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
-
-0.7.1 / 2013-02-05
-==================
-
- * add repository URL to package.json
- * add DEBUG_COLORED to force colored output
- * add browserify support
- * fix component. Closes #24
-
-0.7.0 / 2012-05-04
-==================
-
- * Added .component to package.json
- * Added debug.component.js build
-
-0.6.0 / 2012-03-16
-==================
-
- * Added support for "-" prefix in DEBUG [Vinay Pulim]
- * Added `.enabled` flag to the node version [TooTallNate]
-
-0.5.0 / 2012-02-02
-==================
-
- * Added: humanize diffs. Closes #8
- * Added `debug.disable()` to the CS variant
- * Removed padding. Closes #10
- * Fixed: persist client-side variant again. Closes #9
-
-0.4.0 / 2012-02-01
-==================
-
- * Added browser variant support for older browsers [TooTallNate]
- * Added `debug.enable('project:*')` to browser variant [TooTallNate]
- * Added padding to diff (moved it to the right)
-
-0.3.0 / 2012-01-26
-==================
-
- * Added millisecond diff when isatty, otherwise UTC string
-
-0.2.0 / 2012-01-22
-==================
-
- * Added wildcard support
-
-0.1.0 / 2011-12-02
-==================
-
- * Added: remove colors unless stderr isatty [TooTallNate]
-
-0.0.1 / 2010-01-03
-==================
-
- * Initial release
diff --git a/node_modules/debug/Makefile b/node_modules/debug/Makefile
index 5cf4a5962..584da8bf9 100644
--- a/node_modules/debug/Makefile
+++ b/node_modules/debug/Makefile
@@ -1,4 +1,3 @@
-
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
@@ -6,31 +5,46 @@ THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
# BIN directory
BIN := $(THIS_DIR)/node_modules/.bin
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
# applications
NODE ?= $(shell which node)
-NPM ?= $(NODE) $(shell which npm)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
-all: dist/debug.js
+.FORCE:
install: node_modules
-clean:
- @rm -rf dist
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
-dist:
- @mkdir -p $@
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
-dist/debug.js: node_modules browser.js debug.js dist
@$(BROWSERIFY) \
--standalone debug \
- . > $@
+ . > dist/debug.js
-distclean: clean
- @rm -rf node_modules
+ karma start --single-run
+ rimraf dist
-node_modules: package.json
- @NODE_ENV= $(NPM) install
- @touch node_modules
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
.PHONY: all install clean distclean
diff --git a/node_modules/debug/Readme.md b/node_modules/debug/Readme.md
deleted file mode 100644
index b4f45e3cc..000000000
--- a/node_modules/debug/Readme.md
+++ /dev/null
@@ -1,188 +0,0 @@
-# debug
-
- tiny node.js debugging utility modelled after node core's debugging technique.
-
-## Installation
-
-```bash
-$ npm install debug
-```
-
-## Usage
-
- With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
-
-Example _app.js_:
-
-```js
-var debug = require('debug')('http')
- , http = require('http')
- , name = 'My App';
-
-// fake app
-
-debug('booting %s', name);
-
-http.createServer(function(req, res){
- debug(req.method + ' ' + req.url);
- res.end('hello\n');
-}).listen(3000, function(){
- debug('listening');
-});
-
-// fake worker of some kind
-
-require('./worker');
-```
-
-Example _worker.js_:
-
-```js
-var debug = require('debug')('worker');
-
-setInterval(function(){
- debug('doing some work');
-}, 1000);
-```
-
- The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
-
- ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
-
- ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
-
-#### Windows note
-
- On Windows the environment variable is set using the `set` command.
-
- ```cmd
- set DEBUG=*,-not_this
- ```
-
-Then, run the program to be debugged as usual.
-
-## Millisecond diff
-
- When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
-
- ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
-
- When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
-
- ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
-
-## Conventions
-
- If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
-
-## Wildcards
-
- The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
-
- You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
-
-## Browser support
-
- Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
-
-```js
-window.myDebug = require("debug");
-```
-
- ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
-
-```js
-myDebug.enable("worker:*")
-```
-
- Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
-
-```js
-a = debug('worker:a');
-b = debug('worker:b');
-
-setInterval(function(){
- a('doing some work');
-}, 1000);
-
-setInterval(function(){
- b('doing some work');
-}, 1200);
-```
-
-#### Web Inspector Colors
-
- Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
- option. These are WebKit web inspectors, Firefox ([since version
- 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
- and the Firebug plugin for Firefox (any version).
-
- Colored output looks something like:
-
- ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
-
-### stderr vs stdout
-
-You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
-
-Example _stdout.js_:
-
-```js
-var debug = require('debug');
-var error = debug('app:error');
-
-// by default stderr is used
-error('goes to stderr!');
-
-var log = debug('app:log');
-// set this namespace to log via console.log
-log.log = console.log.bind(console); // don't forget to bind to console!
-log('goes to stdout');
-error('still goes to stderr!');
-
-// set all output to go via console.info
-// overrides all per-namespace log settings
-debug.log = console.info.bind(console);
-error('now goes to stdout via console.info');
-log('still goes to stdout, but via console.info now');
-```
-
-### Save debug output to a file
-
-You can save all debug statements to a file by piping them.
-
-Example:
-
-```bash
-$ DEBUG_FD=3 node your-app.js 3> whatever.log
-```
-
-## Authors
-
- - TJ Holowaychuk
- - Nathan Rajlich
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/debug/bower.json b/node_modules/debug/bower.json
index 6af573ff5..027804ce0 100644
--- a/node_modules/debug/bower.json
+++ b/node_modules/debug/bower.json
@@ -1,10 +1,11 @@
{
"name": "visionmedia-debug",
- "main": "dist/debug.js",
- "version": "2.2.0",
+ "main": "./src/browser.js",
"homepage": "https://github.com/visionmedia/debug",
"authors": [
- "TJ Holowaychuk <tj@vision-media.ca>"
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
],
"description": "visionmedia-debug",
"moduleType": [
diff --git a/node_modules/debug/browser.js b/node_modules/debug/browser.js
deleted file mode 100644
index 7c7645221..000000000
--- a/node_modules/debug/browser.js
+++ /dev/null
@@ -1,168 +0,0 @@
-
-/**
- * This is the web browser implementation of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = require('./debug');
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = 'undefined' != typeof chrome
- && 'undefined' != typeof chrome.storage
- ? chrome.storage.local
- : localstorage();
-
-/**
- * Colors.
- */
-
-exports.colors = [
- 'lightseagreen',
- 'forestgreen',
- 'goldenrod',
- 'dodgerblue',
- 'darkorchid',
- 'crimson'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-function useColors() {
- // is webkit? http://stackoverflow.com/a/16459606/376773
- return ('WebkitAppearance' in document.documentElement.style) ||
- // is firebug? http://stackoverflow.com/a/398120/376773
- (window.console && (console.firebug || (console.exception && console.table))) ||
- // is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
-}
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-exports.formatters.j = function(v) {
- return JSON.stringify(v);
-};
-
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs() {
- var args = arguments;
- var useColors = this.useColors;
-
- args[0] = (useColors ? '%c' : '')
- + this.namespace
- + (useColors ? ' %c' : ' ')
- + args[0]
- + (useColors ? '%c ' : ' ')
- + '+' + exports.humanize(this.diff);
-
- if (!useColors) return args;
-
- var c = 'color: ' + this.color;
- args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
-
- // the final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
- var index = 0;
- var lastC = 0;
- args[0].replace(/%[a-z%]/g, function(match) {
- if ('%%' === match) return;
- index++;
- if ('%c' === match) {
- // we only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
-
- args.splice(lastC, 0, c);
- return args;
-}
-
-/**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-
-function log() {
- // this hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return 'object' === typeof console
- && console.log
- && Function.prototype.apply.call(console.log, console, arguments);
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-function save(namespaces) {
- try {
- if (null == namespaces) {
- exports.storage.removeItem('debug');
- } else {
- exports.storage.debug = namespaces;
- }
- } catch(e) {}
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
- var r;
- try {
- r = exports.storage.debug;
- } catch(e) {}
- return r;
-}
-
-/**
- * Enable namespaces listed in `localStorage.debug` initially.
- */
-
-exports.enable(load());
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage(){
- try {
- return window.localStorage;
- } catch (e) {}
-}
diff --git a/node_modules/debug/component.json b/node_modules/debug/component.json
index ca1063724..4861027d4 100644
--- a/node_modules/debug/component.json
+++ b/node_modules/debug/component.json
@@ -2,16 +2,16 @@
"name": "debug",
"repo": "visionmedia/debug",
"description": "small debugging utility",
- "version": "2.2.0",
+ "version": "2.6.1",
"keywords": [
"debug",
"log",
"debugger"
],
- "main": "browser.js",
+ "main": "src/browser.js",
"scripts": [
- "browser.js",
- "debug.js"
+ "src/browser.js",
+ "src/debug.js"
],
"dependencies": {
"rauchg/ms.js": "0.7.1"
diff --git a/node_modules/debug/debug.js b/node_modules/debug/debug.js
deleted file mode 100644
index 7571a8605..000000000
--- a/node_modules/debug/debug.js
+++ /dev/null
@@ -1,197 +0,0 @@
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = debug;
-exports.coerce = coerce;
-exports.disable = disable;
-exports.enable = enable;
-exports.enabled = enabled;
-exports.humanize = require('ms');
-
-/**
- * The currently active debug mode names, and names to skip.
- */
-
-exports.names = [];
-exports.skips = [];
-
-/**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lowercased letter, i.e. "n".
- */
-
-exports.formatters = {};
-
-/**
- * Previously assigned color.
- */
-
-var prevColor = 0;
-
-/**
- * Previous log timestamp.
- */
-
-var prevTime;
-
-/**
- * Select a color.
- *
- * @return {Number}
- * @api private
- */
-
-function selectColor() {
- return exports.colors[prevColor++ % exports.colors.length];
-}
-
-/**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
-
-function debug(namespace) {
-
- // define the `disabled` version
- function disabled() {
- }
- disabled.enabled = false;
-
- // define the `enabled` version
- function enabled() {
-
- var self = enabled;
-
- // set `diff` timestamp
- var curr = +new Date();
- var ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- // add the `color` if not set
- if (null == self.useColors) self.useColors = exports.useColors();
- if (null == self.color && self.useColors) self.color = selectColor();
-
- var args = Array.prototype.slice.call(arguments);
-
- args[0] = exports.coerce(args[0]);
-
- if ('string' !== typeof args[0]) {
- // anything else let's inspect with %o
- args = ['%o'].concat(args);
- }
-
- // apply any `formatters` transformations
- var index = 0;
- args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
- // if we encounter an escaped % then don't increase the array index
- if (match === '%%') return match;
- index++;
- var formatter = exports.formatters[format];
- if ('function' === typeof formatter) {
- var val = args[index];
- match = formatter.call(self, val);
-
- // now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
-
- if ('function' === typeof exports.formatArgs) {
- args = exports.formatArgs.apply(self, args);
- }
- var logFn = enabled.log || exports.log || console.log.bind(console);
- logFn.apply(self, args);
- }
- enabled.enabled = true;
-
- var fn = exports.enabled(namespace) ? enabled : disabled;
-
- fn.namespace = namespace;
-
- return fn;
-}
-
-/**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
-
-function enable(namespaces) {
- exports.save(namespaces);
-
- var split = (namespaces || '').split(/[\s,]+/);
- var len = split.length;
-
- for (var i = 0; i < len; i++) {
- if (!split[i]) continue; // ignore empty strings
- namespaces = split[i].replace(/\*/g, '.*?');
- if (namespaces[0] === '-') {
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- exports.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
-}
-
-/**
- * Disable debug output.
- *
- * @api public
- */
-
-function disable() {
- exports.enable('');
-}
-
-/**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
-
-function enabled(name) {
- var i, len;
- for (i = 0, len = exports.skips.length; i < len; i++) {
- if (exports.skips[i].test(name)) {
- return false;
- }
- }
- for (i = 0, len = exports.names.length; i < len; i++) {
- if (exports.names[i].test(name)) {
- return true;
- }
- }
- return false;
-}
-
-/**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
-
-function coerce(val) {
- if (val instanceof Error) return val.stack || val.message;
- return val;
-}
diff --git a/node_modules/debug/node.js b/node_modules/debug/node.js
index 1d392a81d..7fc36fe6d 100644
--- a/node_modules/debug/node.js
+++ b/node_modules/debug/node.js
@@ -1,209 +1 @@
-
-/**
- * Module dependencies.
- */
-
-var tty = require('tty');
-var util = require('util');
-
-/**
- * This is the Node.js implementation of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = require('./debug');
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-/**
- * The file descriptor to write the `debug()` calls to.
- * Set the `DEBUG_FD` env variable to override with another value. i.e.:
- *
- * $ DEBUG_FD=3 node script.js 3>debug.log
- */
-
-var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
-var stream = 1 === fd ? process.stdout :
- 2 === fd ? process.stderr :
- createWritableStdioStream(fd);
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
- var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
- if (0 === debugColors.length) {
- return tty.isatty(fd);
- } else {
- return '0' !== debugColors
- && 'no' !== debugColors
- && 'false' !== debugColors
- && 'disabled' !== debugColors;
- }
-}
-
-/**
- * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
- */
-
-var inspect = (4 === util.inspect.length ?
- // node <= 0.8.x
- function (v, colors) {
- return util.inspect(v, void 0, void 0, colors);
- } :
- // node > 0.8.x
- function (v, colors) {
- return util.inspect(v, { colors: colors });
- }
-);
-
-exports.formatters.o = function(v) {
- return inspect(v, this.useColors)
- .replace(/\s*\n\s*/g, ' ');
-};
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs() {
- var args = arguments;
- var useColors = this.useColors;
- var name = this.namespace;
-
- if (useColors) {
- var c = this.color;
-
- args[0] = ' \u001b[3' + c + ';1m' + name + ' '
- + '\u001b[0m'
- + args[0] + '\u001b[3' + c + 'm'
- + ' +' + exports.humanize(this.diff) + '\u001b[0m';
- } else {
- args[0] = new Date().toUTCString()
- + ' ' + name + ' ' + args[0];
- }
- return args;
-}
-
-/**
- * Invokes `console.error()` with the specified arguments.
- */
-
-function log() {
- return stream.write(util.format.apply(this, arguments) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-function save(namespaces) {
- if (null == namespaces) {
- // If you set a process.env field to null or undefined, it gets cast to the
- // string 'null' or 'undefined'. Just delete instead.
- delete process.env.DEBUG;
- } else {
- process.env.DEBUG = namespaces;
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
- return process.env.DEBUG;
-}
-
-/**
- * Copied from `node/src/node.js`.
- *
- * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
- * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
- */
-
-function createWritableStdioStream (fd) {
- var stream;
- var tty_wrap = process.binding('tty_wrap');
-
- // Note stream._type is used for test-module-load-list.js
-
- switch (tty_wrap.guessHandleType(fd)) {
- case 'TTY':
- stream = new tty.WriteStream(fd);
- stream._type = 'tty';
-
- // Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- case 'FILE':
- var fs = require('fs');
- stream = new fs.SyncWriteStream(fd, { autoClose: false });
- stream._type = 'fs';
- break;
-
- case 'PIPE':
- case 'TCP':
- var net = require('net');
- stream = new net.Socket({
- fd: fd,
- readable: false,
- writable: true
- });
-
- // FIXME Should probably have an option in net.Socket to create a
- // stream from an existing fd which is writable only. But for now
- // we'll just add this hack and set the `readable` member to false.
- // Test: ./node test/fixtures/echo.js < /etc/passwd
- stream.readable = false;
- stream.read = null;
- stream._type = 'pipe';
-
- // FIXME Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- default:
- // Probably an error on in uv_guess_handle()
- throw new Error('Implement me. Unknown stream file type!');
- }
-
- // For supporting legacy API we put the FD here.
- stream.fd = fd;
-
- stream._isStdio = true;
-
- return stream;
-}
-
-/**
- * Enable namespaces listed in `process.env.DEBUG` initially.
- */
-
-exports.enable(load());
+module.exports = require('./src/node');
diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json
index b9f033a77..0bd80e28f 100644
--- a/node_modules/debug/package.json
+++ b/node_modules/debug/package.json
@@ -1,6 +1,6 @@
{
"name": "debug",
- "version": "2.2.0",
+ "version": "2.6.1",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
@@ -13,18 +13,33 @@
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
- "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)"
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
- "ms": "0.7.1"
+ "ms": "0.7.2"
},
"devDependencies": {
"browserify": "9.0.3",
- "mocha": "*"
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
},
- "main": "./node.js",
- "browser": "./browser.js",
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
"component": {
"scripts": {
"debug/index.js": "browser.js",
diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js
index 1bdc943bc..43641b08f 100644
--- a/node_modules/error-ex/index.js
+++ b/node_modules/error-ex/index.js
@@ -20,9 +20,8 @@ var errorEx = function errorEx(name, properties) {
Error.call(this, message);
Error.captureStackTrace(this, errorExError);
- this.name = name;
- delete this.message;
+ this.name = name;
Object.defineProperty(this, 'message', {
configurable: true,
@@ -31,9 +30,14 @@ var errorEx = function errorEx(name, properties) {
var newMessage = message.split(/\r?\n/g);
for (var key in properties) {
- if (properties.hasOwnProperty(key) && 'message' in properties[key]) {
- newMessage = properties[key].message(this[key], newMessage) ||
- newMessage;
+ if (!properties.hasOwnProperty(key)) {
+ continue;
+ }
+
+ var modifier = properties[key];
+
+ if ('message' in modifier) {
+ newMessage = modifier.message(this[key], newMessage) || newMessage;
if (!isArrayish(newMessage)) {
newMessage = [newMessage];
}
@@ -49,9 +53,18 @@ var errorEx = function errorEx(name, properties) {
var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
var stackGetter = stackDescriptor.get;
+ var stackValue = stackDescriptor.value;
+ delete stackDescriptor.value;
+ delete stackDescriptor.writable;
stackDescriptor.get = function () {
- var stack = stackGetter.call(this).split(/\r?\n+/g);
+ var stack = (stackGetter)
+ ? stackGetter.call(this).split(/\r?\n+/g)
+ : stackValue.split(/\r?\n+/g);
+
+ // starting in Node 7, the stack builder caches the message.
+ // just replace it.
+ stack[0] = this.name + ': ' + this.message;
var lineCount = 1;
for (var key in properties) {
@@ -64,7 +77,7 @@ var errorEx = function errorEx(name, properties) {
if ('line' in modifier) {
var line = modifier.line(this[key]);
if (line) {
- stack.splice(lineCount, 0, ' ' + line);
+ stack.splice(lineCount++, 0, ' ' + line);
}
}
@@ -79,7 +92,12 @@ var errorEx = function errorEx(name, properties) {
Object.defineProperty(this, 'stack', stackDescriptor);
};
- util.inherits(errorExError, Error);
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(errorExError.prototype, Error.prototype);
+ Object.setPrototypeOf(errorExError, Error);
+ } else {
+ util.inherits(errorExError, Error);
+ }
return errorExError;
};
diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json
index 4582ea14f..7a5a303a3 100644
--- a/node_modules/error-ex/package.json
+++ b/node_modules/error-ex/package.json
@@ -1,9 +1,9 @@
{
"name": "error-ex",
"description": "Easy error subclassing and stack customization",
- "version": "1.3.0",
+ "version": "1.3.1",
"maintainers": [
- "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)",
+ "Josh Junon <i.am.qix@gmail.com> (github.com/qix-)",
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)"
],
"keywords": [
diff --git a/node_modules/fancy-log/LICENSE b/node_modules/fancy-log/LICENSE
index 0dd44fbde..790981418 100644
--- a/node_modules/fancy-log/LICENSE
+++ b/node_modules/fancy-log/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015 Blaine Bublitz
+Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>
Based on gulp-util, copyright 2014 Fractal <contact@wearefractal.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/node_modules/fancy-log/README.md b/node_modules/fancy-log/README.md
index f3d227d05..dfd3a9443 100644
--- a/node_modules/fancy-log/README.md
+++ b/node_modules/fancy-log/README.md
@@ -27,7 +27,23 @@ current time in HH:MM:ss format.
### `log.error(msg...)`
-Logs ths message as if you called `console.error` but prefixes the output with the
+Logs the message as if you called `console.error` but prefixes the output with the
+current time in HH:MM:ss format.
+
+### `log.warn(msg...)`
+
+Logs the message as if you called `console.warn` but prefixes the output with the
+current time in HH:MM:ss format.
+
+
+### `log.info(msg...)`
+
+Logs the message as if you called `console.info` but prefixes the output with the
+current time in HH:MM:ss format.
+
+### `log.dir(msg...)`
+
+Logs the message as if you called `console.dir` but prefixes the output with the
current time in HH:MM:ss format.
## License
diff --git a/node_modules/fancy-log/index.js b/node_modules/fancy-log/index.js
index a9d972267..12df5c34c 100644
--- a/node_modules/fancy-log/index.js
+++ b/node_modules/fancy-log/index.js
@@ -16,6 +16,27 @@ function log(){
return this;
}
+function info(){
+ var time = getTimestamp();
+ process.stdout.write(time + ' ');
+ console.info.apply(console, arguments);
+ return this;
+}
+
+function dir(){
+ var time = getTimestamp();
+ process.stdout.write(time + ' ');
+ console.dir.apply(console, arguments);
+ return this;
+}
+
+function warn(){
+ var time = getTimestamp();
+ process.stderr.write(time + ' ');
+ console.warn.apply(console, arguments);
+ return this;
+}
+
function error(){
var time = getTimestamp();
process.stderr.write(time + ' ');
@@ -24,4 +45,7 @@ function error(){
}
module.exports = log;
+module.exports.info = info;
+module.exports.dir = dir;
+module.exports.warn = warn;
module.exports.error = error;
diff --git a/node_modules/fancy-log/package.json b/node_modules/fancy-log/package.json
index 73ed5d84c..063c4c66d 100644
--- a/node_modules/fancy-log/package.json
+++ b/node_modules/fancy-log/package.json
@@ -1,10 +1,12 @@
{
"name": "fancy-log",
- "version": "1.2.0",
+ "version": "1.3.0",
"description": "Log things, prefixed with a timestamp",
- "author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com)",
- "contributors": [],
- "repository": "phated/fancy-log",
+ "author": "Blaine Bublitz <blaine.bublitz@gmail.com>",
+ "contributors": [
+ "Aman Mittal (http://amandeepmittal.github.io/)"
+ ],
+ "repository": "js-cli/fancy-log",
"license": "MIT",
"engines": {
"node": ">= 0.10"
diff --git a/node_modules/for-in/LICENSE b/node_modules/for-in/LICENSE
index 39245ac1c..d734237bd 100644
--- a/node_modules/for-in/LICENSE
+++ b/node_modules/for-in/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2016, Jon Schlinkert.
+Copyright (c) 2014-2017, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/for-in/README.md b/node_modules/for-in/README.md
index 85141657e..874e1895a 100644
--- a/node_modules/for-in/README.md
+++ b/node_modules/for-in/README.md
@@ -1,4 +1,4 @@
-# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat)](https://travis-ci.org/jonschlinkert/for-in)
+# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![NPM total downloads](https://img.shields.io/npm/dt/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-in)
> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js
@@ -7,7 +7,7 @@
Install with [npm](https://www.npmjs.com/):
```sh
-$ npm install for-in --save
+$ npm install --save for-in
```
## Usage
@@ -31,44 +31,55 @@ console.log(values);
//=> ['foo', 'bar', 'baz'];
```
-## Contributing
+## About
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/for-in/issues/new).
+### Related projects
-## Building docs
+* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
+* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.")
+* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.")
-Generate readme and API documentation with [verb](https://github.com/verbose/verb):
+### Contributing
-```sh
-$ npm install verb && npm run docs
-```
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 16 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 2 | [paulirish](https://github.com/paulirish) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
-Or, if [verb](https://github.com/verbose/verb) is installed globally:
+To generate the readme, run the following command:
```sh
-$ verb
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
-## Running tests
+### Running tests
-Install dev dependencies:
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
-$ npm install -d && npm test
+$ npm install && npm test
```
-## Author
+### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
-## License
+### License
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/for-in/blob/master/LICENSE).
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file
diff --git a/node_modules/for-in/index.js b/node_modules/for-in/index.js
index 965755050..0b5f95f02 100644
--- a/node_modules/for-in/index.js
+++ b/node_modules/for-in/index.js
@@ -1,15 +1,15 @@
/*!
* for-in <https://github.com/jonschlinkert/for-in>
*
- * Copyright (c) 2014-2016, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
'use strict';
-module.exports = function forIn(o, fn, thisArg) {
- for (var key in o) {
- if (fn.call(thisArg, o[key], key, o) === false) {
+module.exports = function forIn(obj, fn, thisArg) {
+ for (var key in obj) {
+ if (fn.call(thisArg, obj[key], key, obj) === false) {
break;
}
}
diff --git a/node_modules/for-in/package.json b/node_modules/for-in/package.json
index ff921ef1b..48810a18d 100644
--- a/node_modules/for-in/package.json
+++ b/node_modules/for-in/package.json
@@ -1,9 +1,13 @@
{
"name": "for-in",
"description": "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js",
- "version": "0.1.6",
+ "version": "1.0.2",
"homepage": "https://github.com/jonschlinkert/for-in",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
+ "Paul Irish (http://paulirish.com)"
+ ],
"repository": "jonschlinkert/for-in",
"bugs": {
"url": "https://github.com/jonschlinkert/for-in/issues"
@@ -20,16 +24,17 @@
"test": "mocha"
},
"devDependencies": {
- "gulp-format-md": "^0.1.7",
- "mocha": "^2.4.5",
- "should": "^8.3.0"
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^3.2.0"
},
"keywords": [
+ "for",
"for-in",
"for-own",
"has",
"has-own",
"hasOwn",
+ "in",
"key",
"keys",
"object",
@@ -46,6 +51,13 @@
"plugins": [
"gulp-format-md"
],
+ "related": {
+ "list": [
+ "arr-flatten",
+ "collection-map",
+ "for-own"
+ ]
+ },
"reflinks": [
"verb"
],
diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE
index fa30c4cb3..d290fe00b 100644
--- a/node_modules/for-own/LICENSE
+++ b/node_modules/for-own/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2015, Jon Schlinkert.
+Copyright (c) 2014-2015, 2017, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/for-own/README.md b/node_modules/for-own/README.md
index 16831ab7d..fd56877ae 100644
--- a/node_modules/for-own/README.md
+++ b/node_modules/for-own/README.md
@@ -1,18 +1,13 @@
-# for-own [![NPM version](https://badge.fury.io/js/for-own.svg)](http://badge.fury.io/js/for-own)
+# for-own [![NPM version](https://img.shields.io/npm/v/for-own.svg?style=flat)](https://www.npmjs.com/package/for-own) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![NPM total downloads](https://img.shields.io/npm/dt/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-own.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-own)
-> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`.
+> Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.
## Install
-#### Install with [npm](https://www.npmjs.com/):
-```bash
-npm i for-own --save
-```
-
-## Run tests
+Install with [npm](https://www.npmjs.com/):
-```bash
-npm test
+```sh
+$ npm install --save for-own
```
## Usage
@@ -36,17 +31,55 @@ console.log(values);
//=> ['foo', 'bar', 'baz'];
```
-## Author
+## About
+
+### Related projects
+
+* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
+* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.")
+* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 10 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [javiercejudo](https://github.com/javiercejudo) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
**Jon Schlinkert**
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
-## License
-Copyright (c) 2014 Jon Schlinkert, contributors.
-Released under the MIT license
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 20, 2014._
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file
diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js
index d07256c7c..74e2d7551 100644
--- a/node_modules/for-own/index.js
+++ b/node_modules/for-own/index.js
@@ -1,8 +1,8 @@
/*!
* for-own <https://github.com/jonschlinkert/for-own>
*
- * Copyright (c) 2014-2016, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
'use strict';
@@ -10,10 +10,10 @@
var forIn = require('for-in');
var hasOwn = Object.prototype.hasOwnProperty;
-module.exports = function forOwn(o, fn, thisArg) {
- forIn(o, function(val, key) {
- if (hasOwn.call(o, key)) {
- return fn.call(thisArg, o[key], key, o);
+module.exports = function forOwn(obj, fn, thisArg) {
+ forIn(obj, function(val, key) {
+ if (hasOwn.call(obj, key)) {
+ return fn.call(thisArg, obj[key], key, obj);
}
});
};
diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json
index 02ae917b3..0f1b50245 100644
--- a/node_modules/for-own/package.json
+++ b/node_modules/for-own/package.json
@@ -1,9 +1,13 @@
{
"name": "for-own",
"description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.",
- "version": "0.1.4",
+ "version": "0.1.5",
"homepage": "https://github.com/jonschlinkert/for-own",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Javier Cejudo <javier@javiercejudo.com> (https://www.javiercejudo.com)",
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
+ ],
"repository": "jonschlinkert/for-own",
"bugs": {
"url": "https://github.com/jonschlinkert/for-own/issues"
@@ -20,13 +24,14 @@
"test": "mocha"
},
"dependencies": {
- "for-in": "^0.1.5"
+ "for-in": "^1.0.1"
},
"devDependencies": {
- "gulp-format-md": "^0.1.7",
- "mocha": "^2.4.5"
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^3.2.0"
},
"keywords": [
+ "for",
"for-in",
"for-own",
"has",
@@ -48,6 +53,13 @@
"plugins": [
"gulp-format-md"
],
+ "related": {
+ "list": [
+ "arr-flatten",
+ "collection-map",
+ "for-in"
+ ]
+ },
"reflinks": [
"verb"
],
diff --git a/node_modules/glob-base/node_modules/glob-parent/.npmignore b/node_modules/glob-base/node_modules/glob-parent/.npmignore
deleted file mode 100644
index 33e391f0e..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-.DS_Store
-npm-debug.log
-coverage
diff --git a/node_modules/glob-base/node_modules/glob-parent/.travis.yml b/node_modules/glob-base/node_modules/glob-parent/.travis.yml
deleted file mode 100644
index 18fc42f69..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "4"
- - "iojs-v3"
- - "iojs-v2"
- - "iojs-v1"
- - "0.12"
- - "0.10"
diff --git a/node_modules/glob-base/node_modules/glob-parent/LICENSE b/node_modules/glob-base/node_modules/glob-parent/LICENSE
deleted file mode 100644
index 734076d8a..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2015 Elan Shanker
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/glob-base/node_modules/glob-parent/README.md b/node_modules/glob-base/node_modules/glob-parent/README.md
deleted file mode 100644
index ff5310d3b..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)
-======
-Javascript module to extract the non-magic parent path from a glob string.
-
-[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)
-[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)
-
-Usage
------
-```sh
-npm install glob-parent --save
-```
-
-```js
-var globParent = require('glob-parent');
-
-globParent('path/to/*.js'); // 'path/to'
-globParent('/root/path/to/*.js'); // '/root/path/to'
-globParent('/*.js'); // '/'
-globParent('*.js'); // '.'
-globParent('**/*.js'); // '.'
-globParent('path/{to,from}'); // 'path'
-globParent('path/!(to|from)'); // 'path'
-globParent('path/?(to|from)'); // 'path'
-globParent('path/+(to|from)'); // 'path'
-globParent('path/*(to|from)'); // 'path'
-globParent('path/@(to|from)'); // 'path'
-globParent('path/**/*'); // 'path'
-
-// if provided a non-glob path, returns the nearest dir
-globParent('path/foo/bar.js'); // 'path/foo'
-globParent('path/foo/'); // 'path/foo'
-globParent('path/foo'); // 'path' (see issue #3 for details)
-
-```
-
-Change Log
-----------
-[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)
-
-License
--------
-[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)
diff --git a/node_modules/glob-base/node_modules/glob-parent/index.js b/node_modules/glob-base/node_modules/glob-parent/index.js
deleted file mode 100644
index 61615f1ac..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var path = require('path');
-var isglob = require('is-glob');
-
-module.exports = function globParent(str) {
- str += 'a'; // preserves full path in case of trailing path separator
- do {str = path.dirname(str)} while (isglob(str));
- return str;
-};
diff --git a/node_modules/glob-base/node_modules/glob-parent/package.json b/node_modules/glob-base/node_modules/glob-parent/package.json
deleted file mode 100644
index 5499007fb..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "glob-parent",
- "version": "2.0.0",
- "description": "Strips glob magic from a string to provide the parent path",
- "main": "index.js",
- "scripts": {
- "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/es128/glob-parent"
- },
- "keywords": [
- "glob",
- "parent",
- "strip",
- "path",
- "directory",
- "base"
- ],
- "author": "Elan Shanker",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/es128/glob-parent/issues"
- },
- "homepage": "https://github.com/es128/glob-parent",
- "dependencies": {
- "is-glob": "^2.0.0"
- },
- "devDependencies": {
- "coveralls": "^2.11.2",
- "istanbul": "^0.3.5",
- "mocha": "^2.1.0"
- }
-}
diff --git a/node_modules/glob-base/node_modules/glob-parent/test.js b/node_modules/glob-base/node_modules/glob-parent/test.js
deleted file mode 100644
index 01156d2ff..000000000
--- a/node_modules/glob-base/node_modules/glob-parent/test.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-var gp = require('./');
-var assert = require('assert');
-
-describe('glob-parent', function() {
- it('should strip glob magic to return parent path', function() {
- assert.equal(gp('path/to/*.js'), 'path/to');
- assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
- assert.equal(gp('/*.js'), '/');
- assert.equal(gp('*.js'), '.');
- assert.equal(gp('**/*.js'), '.');
- assert.equal(gp('path/{to,from}'), 'path');
- assert.equal(gp('path/!(to|from)'), 'path');
- assert.equal(gp('path/?(to|from)'), 'path');
- assert.equal(gp('path/+(to|from)'), 'path');
- assert.equal(gp('path/*(to|from)'), 'path');
- assert.equal(gp('path/@(to|from)'), 'path');
- assert.equal(gp('path/**/*'), 'path');
- assert.equal(gp('path/**/subdir/foo.*'), 'path');
- });
-
- it('should return parent dirname from non-glob paths', function() {
- assert.equal(gp('path/foo/bar.js'), 'path/foo');
- assert.equal(gp('path/foo/'), 'path/foo');
- assert.equal(gp('path/foo'), 'path');
- });
-});
diff --git a/node_modules/glob-parent/.travis.yml b/node_modules/glob-parent/.travis.yml
index a404ceb22..18fc42f69 100644
--- a/node_modules/glob-parent/.travis.yml
+++ b/node_modules/glob-parent/.travis.yml
@@ -1,8 +1,8 @@
language: node_js
node_js:
- - "6"
- - "5"
- "4"
+ - "iojs-v3"
+ - "iojs-v2"
+ - "iojs-v1"
+ - "0.12"
- "0.10"
-script:
- - npm run ci-test
diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md
index 243ff9ccf..ff5310d3b 100644
--- a/node_modules/glob-parent/README.md
+++ b/node_modules/glob-parent/README.md
@@ -11,8 +11,6 @@ Usage
npm install glob-parent --save
```
-**Examples**
-
```js
var globParent = require('glob-parent');
@@ -33,27 +31,7 @@ globParent('path/**/*'); // 'path'
globParent('path/foo/bar.js'); // 'path/foo'
globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)
-```
-
-## Escaping
-
-The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
-- `?` (question mark)
-- `*` (star)
-- `|` (pipe)
-- `(` (opening parenthesis)
-- `)` (closing parenthesis)
-- `{` (opening curly brace)
-- `}` (closing curly brace)
-- `[` (opening bracket)
-- `]` (closing bracket)
-
-**Example**
-
-```js
-globParent('foo/[bar]/') // 'foo'
-globParent('foo/\\[bar]/') // 'foo/[bar]'
```
Change Log
diff --git a/node_modules/glob-parent/appveyor.yml b/node_modules/glob-parent/appveyor.yml
deleted file mode 100644
index eb932544d..000000000
--- a/node_modules/glob-parent/appveyor.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-# Test against this version of Node.js
-environment:
- matrix:
- - nodejs_version: "6"
- - nodejs_version: "5"
- - nodejs_version: "4"
-
-# Install scripts. (runs after repo cloning)
-install:
- # Get the latest stable version of Node.js or io.js
- - ps: Install-Product node $env:nodejs_version
- # install modules
- - npm install
-
-# Post-install test scripts.
-test_script:
- # Output useful info for debugging.
- - node --version
- - npm --version
- # run tests
- - npm test
-
-# Don't actually build.
-build: off
diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js
index 9a7e59375..61615f1ac 100644
--- a/node_modules/glob-parent/index.js
+++ b/node_modules/glob-parent/index.js
@@ -2,10 +2,9 @@
var path = require('path');
var isglob = require('is-glob');
-var pathDirname = require('path-dirname');
module.exports = function globParent(str) {
str += 'a'; // preserves full path in case of trailing path separator
- do {str = pathDirname.posix(str)} while (isglob(str));
- return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1');
+ do {str = path.dirname(str)} while (isglob(str));
+ return str;
};
diff --git a/node_modules/glob-parent/node_modules/is-extglob/LICENSE b/node_modules/glob-parent/node_modules/is-extglob/LICENSE
deleted file mode 100644
index 842218cf0..000000000
--- a/node_modules/glob-parent/node_modules/is-extglob/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2016, Jon Schlinkert
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/glob-parent/node_modules/is-extglob/README.md b/node_modules/glob-parent/node_modules/is-extglob/README.md
deleted file mode 100644
index 0416af5c3..000000000
--- a/node_modules/glob-parent/node_modules/is-extglob/README.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob)
-
-> Returns true if a string has an extglob.
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-$ npm install --save is-extglob
-```
-
-## Usage
-
-```js
-var isExtglob = require('is-extglob');
-```
-
-**True**
-
-```js
-isExtglob('?(abc)');
-isExtglob('@(abc)');
-isExtglob('!(abc)');
-isExtglob('*(abc)');
-isExtglob('+(abc)');
-```
-
-**False**
-
-Escaped extglobs:
-
-```js
-isExtglob('\\?(abc)');
-isExtglob('\\@(abc)');
-isExtglob('\\!(abc)');
-isExtglob('\\*(abc)');
-isExtglob('\\+(abc)');
-```
-
-Everything else...
-
-```js
-isExtglob('foo.js');
-isExtglob('!foo.js');
-isExtglob('*.js');
-isExtglob('**/abc.js');
-isExtglob('abc/*.js');
-isExtglob('abc/(aaa|bbb).js');
-isExtglob('abc/[a-z].js');
-isExtglob('abc/{a,b}.js');
-isExtglob('abc/?.js');
-isExtglob('abc.js');
-isExtglob('abc/def/ghi.js');
-```
-
-## History
-
-**v2.0**
-
-Adds support for escaping. Escaped exglobs no longer return true.
-
-## About
-
-### Related projects
-
-* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.")
-* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
-* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
-
-### Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-### Building docs
-
-_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
-
-To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
-
-```sh
-$ npm install -g verb verb-generate-readme && verb
-```
-
-### Running tests
-
-Install dev dependencies:
-
-```sh
-$ npm install -d && npm test
-```
-
-### Author
-
-**Jon Schlinkert**
-
-* [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-
-### License
-
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE).
-
-***
-
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file
diff --git a/node_modules/glob-parent/node_modules/is-extglob/index.js b/node_modules/glob-parent/node_modules/is-extglob/index.js
deleted file mode 100644
index c1d986fc5..000000000
--- a/node_modules/glob-parent/node_modules/is-extglob/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
- *
- * Copyright (c) 2014-2016, Jon Schlinkert.
- * Licensed under the MIT License.
- */
-
-module.exports = function isExtglob(str) {
- if (typeof str !== 'string' || str === '') {
- return false;
- }
-
- var match;
- while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
- if (match[2]) return true;
- str = str.slice(match.index + match[0].length);
- }
-
- return false;
-};
diff --git a/node_modules/glob-parent/node_modules/is-extglob/package.json b/node_modules/glob-parent/node_modules/is-extglob/package.json
deleted file mode 100644
index ccfd41fa4..000000000
--- a/node_modules/glob-parent/node_modules/is-extglob/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "name": "is-extglob",
- "description": "Returns true if a string has an extglob.",
- "version": "2.1.0",
- "homepage": "https://github.com/jonschlinkert/is-extglob",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "repository": "jonschlinkert/is-extglob",
- "bugs": {
- "url": "https://github.com/jonschlinkert/is-extglob/issues"
- },
- "license": "MIT",
- "files": [
- "index.js"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "devDependencies": {
- "gulp-format-md": "^0.1.10",
- "mocha": "^3.0.2"
- },
- "keywords": [
- "bash",
- "braces",
- "check",
- "exec",
- "expression",
- "extglob",
- "glob",
- "globbing",
- "globstar",
- "is",
- "match",
- "matches",
- "pattern",
- "regex",
- "regular",
- "string",
- "test"
- ],
- "verb": {
- "toc": false,
- "layout": "default",
- "tasks": [
- "readme"
- ],
- "plugins": [
- "gulp-format-md"
- ],
- "related": {
- "list": [
- "has-glob",
- "is-glob",
- "micromatch"
- ]
- },
- "reflinks": [
- "verb",
- "verb-generate-readme"
- ],
- "lint": {
- "reflinks": true
- }
- }
-}
diff --git a/node_modules/glob-parent/node_modules/is-glob/LICENSE b/node_modules/glob-parent/node_modules/is-glob/LICENSE
deleted file mode 100644
index 39245ac1c..000000000
--- a/node_modules/glob-parent/node_modules/is-glob/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2016, Jon Schlinkert.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/glob-parent/node_modules/is-glob/README.md b/node_modules/glob-parent/node_modules/is-glob/README.md
deleted file mode 100644
index 6f4404fec..000000000
--- a/node_modules/glob-parent/node_modules/is-glob/README.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob)
-
-> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-$ npm install --save is-glob
-```
-
-You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
-
-## Usage
-
-```js
-var isGlob = require('is-glob');
-```
-
-**True**
-
-Patterns that have glob characters or regex patterns will return `true`:
-
-```js
-isGlob('!foo.js');
-isGlob('*.js');
-isGlob('**/abc.js');
-isGlob('abc/*.js');
-isGlob('abc/(aaa|bbb).js');
-isGlob('abc/[a-z].js');
-isGlob('abc/{a,b}.js');
-isGlob('abc/?.js');
-//=> true
-```
-
-Extglobs
-
-```js
-isGlob('abc/@(a).js');
-isGlob('abc/!(a).js');
-isGlob('abc/+(a).js');
-isGlob('abc/*(a).js');
-isGlob('abc/?(a).js');
-//=> true
-```
-
-**False**
-
-Escaped globs or extglobs return `false`:
-
-```js
-isGlob('abc/\\@(a).js');
-isGlob('abc/\\!(a).js');
-isGlob('abc/\\+(a).js');
-isGlob('abc/\\*(a).js');
-isGlob('abc/\\?(a).js');
-isGlob('\\!foo.js');
-isGlob('\\*.js');
-isGlob('\\*\\*/abc.js');
-isGlob('abc/\\*.js');
-isGlob('abc/\\(aaa|bbb).js');
-isGlob('abc/\\[a-z].js');
-isGlob('abc/\\{a,b}.js');
-isGlob('abc/\\?.js');
-//=> false
-```
-
-Patterns that do not have glob patterns return `false`:
-
-```js
-isGlob('abc.js');
-isGlob('abc/def/ghi.js');
-isGlob('foo.js');
-isGlob('abc/@.js');
-isGlob('abc/+.js');
-isGlob();
-isGlob(null);
-//=> false
-```
-
-Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
-
-```js
-isGlob(['**/*.js']);
-isGlob(['foo.js']);
-//=> false
-```
-
-## About
-
-### Related projects
-
-* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")
-* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.")
-* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.")
-* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.")
-
-### Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-### Contributors
-
-| **Commits** | **Contributor**<br/> |
-| --- | --- |
-| 40 | [jonschlinkert](https://github.com/jonschlinkert) |
-| 1 | [tuvistavie](https://github.com/tuvistavie) |
-
-### Building docs
-
-_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
-
-To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
-
-```sh
-$ npm install -g verb verb-generate-readme && verb
-```
-
-### Running tests
-
-Install dev dependencies:
-
-```sh
-$ npm install -d && npm test
-```
-
-### Author
-
-**Jon Schlinkert**
-
-* [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-
-### License
-
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE).
-
-***
-
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file
diff --git a/node_modules/glob-parent/node_modules/is-glob/index.js b/node_modules/glob-parent/node_modules/is-glob/index.js
deleted file mode 100644
index 2ecbe2a74..000000000
--- a/node_modules/glob-parent/node_modules/is-glob/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*!
- * is-glob <https://github.com/jonschlinkert/is-glob>
- *
- * Copyright (c) 2014-2016, Jon Schlinkert.
- * Licensed under the MIT License.
- */
-
-var isExtglob = require('is-extglob');
-
-module.exports = function isGlob(str) {
- if (typeof str !== 'string' || str === '') {
- return false;
- }
-
- if (isExtglob(str)) return true;
-
- var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/;
- var match;
-
- while ((match = regex.exec(str))) {
- if (match[2]) return true;
- str = str.slice(match.index + match[0].length);
- }
- return false;
-};
diff --git a/node_modules/glob-parent/node_modules/is-glob/package.json b/node_modules/glob-parent/node_modules/is-glob/package.json
deleted file mode 100644
index 53a137d8c..000000000
--- a/node_modules/glob-parent/node_modules/is-glob/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "name": "is-glob",
- "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
- "version": "3.1.0",
- "homepage": "https://github.com/jonschlinkert/is-glob",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "contributors": [
- "Daniel Perez <daniel@claudetech.com> (http://tuvistavie.com)",
- "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
- ],
- "repository": "jonschlinkert/is-glob",
- "bugs": {
- "url": "https://github.com/jonschlinkert/is-glob/issues"
- },
- "license": "MIT",
- "files": [
- "index.js"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "dependencies": {
- "is-extglob": "^2.1.0"
- },
- "devDependencies": {
- "gulp-format-md": "^0.1.10",
- "mocha": "^3.0.2"
- },
- "keywords": [
- "bash",
- "braces",
- "check",
- "exec",
- "expression",
- "extglob",
- "glob",
- "globbing",
- "globstar",
- "is",
- "match",
- "matches",
- "pattern",
- "regex",
- "regular",
- "string",
- "test"
- ],
- "verb": {
- "layout": "default",
- "plugins": [
- "gulp-format-md"
- ],
- "related": {
- "list": [
- "assemble",
- "base",
- "update",
- "verb"
- ]
- },
- "reflinks": [
- "assemble",
- "bach",
- "base",
- "composer",
- "gulp",
- "has-glob",
- "is-valid-glob",
- "micromatch",
- "npm",
- "scaffold",
- "verb",
- "vinyl"
- ]
- }
-}
diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json
index 61b91bcee..5499007fb 100644
--- a/node_modules/glob-parent/package.json
+++ b/node_modules/glob-parent/package.json
@@ -1,11 +1,10 @@
{
"name": "glob-parent",
- "version": "3.0.1",
- "description": "Strips glob magic from a string to provide the parent directory path",
+ "version": "2.0.0",
+ "description": "Strips glob magic from a string to provide the parent path",
"main": "index.js",
"scripts": {
- "test": "istanbul test node_modules/mocha/bin/_mocha",
- "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
+ "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
},
"repository": {
"type": "git",
@@ -16,20 +15,17 @@
"parent",
"strip",
"path",
- "dirname",
"directory",
- "base",
- "wildcard"
+ "base"
],
- "author": "Elan Shanker (https://github.com/es128)",
+ "author": "Elan Shanker",
"license": "ISC",
"bugs": {
"url": "https://github.com/es128/glob-parent/issues"
},
"homepage": "https://github.com/es128/glob-parent",
"dependencies": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
+ "is-glob": "^2.0.0"
},
"devDependencies": {
"coveralls": "^2.11.2",
diff --git a/node_modules/glob-parent/test.js b/node_modules/glob-parent/test.js
index 6548261b3..01156d2ff 100644
--- a/node_modules/glob-parent/test.js
+++ b/node_modules/glob-parent/test.js
@@ -5,119 +5,24 @@ var assert = require('assert');
describe('glob-parent', function() {
it('should strip glob magic to return parent path', function() {
- assert.equal(gp('.'), '.');
- assert.equal(gp('.*'), '.');
- assert.equal(gp('/.*'), '/');
- assert.equal(gp('/.*/'), '/');
- assert.equal(gp('a/.*/b'), 'a');
- assert.equal(gp('a*/.*/b'), '.');
- assert.equal(gp('*/a/b/c'), '.');
- assert.equal(gp('*'), '.');
- assert.equal(gp('*/'), '.');
- assert.equal(gp('*/*'), '.');
- assert.equal(gp('*/*/'), '.');
- assert.equal(gp('**'), '.');
- assert.equal(gp('**/'), '.');
- assert.equal(gp('**/*'), '.');
- assert.equal(gp('**/*/'), '.');
+ assert.equal(gp('path/to/*.js'), 'path/to');
+ assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
assert.equal(gp('/*.js'), '/');
assert.equal(gp('*.js'), '.');
assert.equal(gp('**/*.js'), '.');
- assert.equal(gp('{a,b}'), '.');
- assert.equal(gp('/{a,b}'), '/');
- assert.equal(gp('/{a,b}/'), '/');
- assert.equal(gp('(a|b)'), '.');
- assert.equal(gp('/(a|b)'), '/');
- assert.equal(gp('./(a|b)'), '.');
- assert.equal(gp('a/(b c)'), 'a', 'not an extglob');
- assert.equal(gp('a/(b c)/d'), 'a/(b c)', 'not an extglob');
- assert.equal(gp('path/to/*.js'), 'path/to');
- assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
- assert.equal(gp('chapter/foo [bar]/'), 'chapter');
- assert.equal(gp('path/[a-z]'), 'path');
assert.equal(gp('path/{to,from}'), 'path');
- assert.equal(gp('path/(to|from)'), 'path');
- assert.equal(gp('path/(foo bar)/subdir/foo.*'), 'path/(foo bar)/subdir');
assert.equal(gp('path/!(to|from)'), 'path');
assert.equal(gp('path/?(to|from)'), 'path');
assert.equal(gp('path/+(to|from)'), 'path');
assert.equal(gp('path/*(to|from)'), 'path');
assert.equal(gp('path/@(to|from)'), 'path');
- assert.equal(gp('path/!/foo'), 'path/!');
- assert.equal(gp('path/?/foo'), 'path', 'qmarks must be escaped');
- assert.equal(gp('path/+/foo'), 'path/+');
- assert.equal(gp('path/*/foo'), 'path');
- assert.equal(gp('path/@/foo'), 'path/@');
- assert.equal(gp('path/!/foo/'), 'path/!/foo');
- assert.equal(gp('path/?/foo/'), 'path', 'qmarks must be escaped');
- assert.equal(gp('path/+/foo/'), 'path/+/foo');
- assert.equal(gp('path/*/foo/'), 'path');
- assert.equal(gp('path/@/foo/'), 'path/@/foo');
assert.equal(gp('path/**/*'), 'path');
assert.equal(gp('path/**/subdir/foo.*'), 'path');
- assert.equal(gp('path/subdir/**/foo.js'), 'path/subdir');
- assert.equal(gp('path/!subdir/foo.js'), 'path/!subdir');
- });
-
- it('should respect escaped characters', function() {
- assert.equal(gp('path/\\*\\*/subdir/foo.*'), 'path/**/subdir');
- assert.equal(gp('path/\\[\\*\\]/subdir/foo.*'), 'path/[*]/subdir');
- assert.equal(gp('path/\\*(a|b)/subdir/foo.*'), 'path');
- assert.equal(gp('path/\\*/(a|b)/subdir/foo.*'), 'path/*');
- assert.equal(gp('path/\\*\\(a\\|b\\)/subdir/foo.*'), 'path/*(a|b)/subdir');
- assert.equal(gp('path/\\[foo bar\\]/subdir/foo.*'), 'path/[foo bar]/subdir');
- assert.equal(gp('path/\\[bar]/'), 'path/[bar]');
- assert.equal(gp('path/foo \\[bar]/'), 'path/foo [bar]');
});
it('should return parent dirname from non-glob paths', function() {
- assert.equal(gp('path'), '.');
- assert.equal(gp('path/foo'), 'path');
- assert.equal(gp('path/foo/'), 'path/foo');
assert.equal(gp('path/foo/bar.js'), 'path/foo');
- });
-});
-
-describe('glob2base test patterns', function() {
- it('should get a base name', function() {
- assert.equal(gp('js/*.js'), 'js');
- });
-
- it('should get a base name from a nested glob', function() {
- assert.equal(gp('js/**/test/*.js'), 'js');
- });
-
- it('should get a base name from a flat file', function() {
- assert.equal(gp('js/test/wow.js'), 'js/test');
- assert.equal(gp('js/test/wow.js'), 'js/test');
- });
-
- it('should get a base name from character class pattern', function() {
- assert.equal(gp('js/t[a-z]st}/*.js'), 'js');
- });
-
- it('should get a base name from brace , expansion', function() {
- assert.equal(gp('js/{src,test}/*.js'), 'js');
- });
-
- it('should get a base name from brace .. expansion', function() {
- assert.equal(gp('js/test{0..9}/*.js'), 'js');
- });
-
- it('should get a base name from extglob', function() {
- assert.equal(gp('js/t+(wo|est)/*.js'), 'js');
- });
-
- it('should get a base name from a path with non-exglob parens', function() {
- assert.equal(gp('js/t(wo|est)/*.js'), 'js');
- assert.equal(gp('js/t/(wo|est)/*.js'), 'js/t');
- });
-
- it('should get a base name from a complex brace glob', function() {
- assert.equal(gp('lib/{components,pages}/**/{test,another}/*.txt'), 'lib');
-
- assert.equal(gp('js/test/**/{images,components}/*.js'), 'js/test');
-
- assert.equal(gp('ooga/{booga,sooga}/**/dooga/{eooga,fooga}'), 'ooga');
+ assert.equal(gp('path/foo/'), 'path/foo');
+ assert.equal(gp('path/foo'), 'path');
});
});
diff --git a/node_modules/global-prefix/index.js b/node_modules/global-prefix/index.js
index 591f6be8b..fa19422ff 100644
--- a/node_modules/global-prefix/index.js
+++ b/node_modules/global-prefix/index.js
@@ -7,10 +7,10 @@
'use strict';
-var fs = require('fs')
+var homedir = require('homedir-polyfill');
var path = require('path');
-var osenv = require('osenv');
var ini = require('ini');
+var fs = require('fs')
var prefix;
@@ -18,8 +18,12 @@ if (process.env.PREFIX) {
prefix = process.env.PREFIX;
} else {
// Start by checking if the global prefix is set by the user
- var userConfig = path.resolve(osenv.home(), '.npmrc');
- prefix = readPrefix(userConfig);
+ var home = homedir();
+ if (home) {
+ // homedir() returns undefined if $HOME not set; path.resolve requires strings
+ var userConfig = path.resolve(home, '.npmrc');
+ prefix = readPrefix(userConfig);
+ }
if (!prefix) {
// Otherwise find the path of npm
@@ -60,10 +64,10 @@ function fallback() {
function npmPath() {
try {
- return fs.realpathSync(require('which').sync('npm'))
+ return fs.realpathSync(require('which').sync('npm'));
} catch (ex) {
}
- return false
+ return false;
}
function readPrefix(configPath) {
diff --git a/node_modules/global-prefix/package.json b/node_modules/global-prefix/package.json
index 28f595305..4dc678600 100644
--- a/node_modules/global-prefix/package.json
+++ b/node_modules/global-prefix/package.json
@@ -1,7 +1,7 @@
{
"name": "global-prefix",
"description": "Get the npm global path prefix.",
- "version": "0.1.4",
+ "version": "0.1.5",
"homepage": "https://github.com/jonschlinkert/global-prefix",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/global-prefix",
@@ -20,14 +20,15 @@
"test": "mocha"
},
"dependencies": {
+ "homedir-polyfill": "^1.0.0",
"ini": "^1.3.4",
"is-windows": "^0.2.0",
- "osenv": "^0.1.3",
- "which": "^1.2.10"
+ "which": "^1.2.12"
},
"devDependencies": {
- "gulp-format-md": "^0.1.9",
- "mocha": "^2.5.3"
+ "fs-exists-sync": "^0.1.0",
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^3.2.0"
},
"keywords": [
"global",
@@ -60,5 +61,13 @@
"lint": {
"reflinks": true
}
- }
+ },
+ "contributors": [
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
+ "Alexandr Bogachev <kuksikus@gmail.com> (https://github.com/rmbaad)",
+ "JasonChang <chaoyue.chang@qq.com> (https://packagist.org/packages/jason-chang)",
+ "Jorrit Schippers (https://www.ncode.nl)",
+ "Mathias Rasmussen (https://github.com/mathiasvr)",
+ "Charlike Mike Reagent (http://i.am.charlike.online)"
+ ]
}
diff --git a/node_modules/globals/globals.json b/node_modules/globals/globals.json
index 5002312c5..0bb6547c0 100644
--- a/node_modules/globals/globals.json
+++ b/node_modules/globals/globals.json
@@ -239,6 +239,7 @@
"CSSTransition": false,
"CSSUnknownRule": false,
"CSSViewportRule": false,
+ "customElements": false,
"CustomEvent": false,
"DataTransfer": false,
"DataTransferItem": false,
@@ -423,6 +424,7 @@
"MediaQueryList": false,
"MediaQueryListEvent": false,
"MediaSource": false,
+ "MediaRecorder": false,
"MediaStream": false,
"MediaStreamAudioDestinationNode": false,
"MediaStreamAudioSourceNode": false,
@@ -927,6 +929,7 @@
"expect": false,
"gen": false,
"it": false,
+ "fdescribe": false,
"fit": false,
"jest": false,
"pit": false,
@@ -1243,6 +1246,7 @@
"findWithAssert": false,
"keyEvent": false,
"pauseTest": false,
+ "resumeTest": false,
"triggerEvent": false,
"visit": false
},
diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json
index a439a6fa5..4ec7ff30e 100644
--- a/node_modules/globals/package.json
+++ b/node_modules/globals/package.json
@@ -1,6 +1,6 @@
{
"name": "globals",
- "version": "9.13.0",
+ "version": "9.17.0",
"description": "Global identifiers from different JavaScript environments",
"license": "MIT",
"repository": "sindresorhus/globals",
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
index 50dde5075..cde9d0dd8 100644
--- a/node_modules/graceful-fs/package.json
+++ b/node_modules/graceful-fs/package.json
@@ -1,7 +1,7 @@
{
"name": "graceful-fs",
"description": "A drop-in replacement for fs, making various improvements.",
- "version": "4.1.10",
+ "version": "4.1.11",
"repository": {
"type": "git",
"url": "https://github.com/isaacs/node-graceful-fs"
diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js
index ab6b32b67..4c6aca78a 100644
--- a/node_modules/graceful-fs/polyfills.js
+++ b/node_modules/graceful-fs/polyfills.js
@@ -3,6 +3,9 @@ var constants = require('constants')
var origCwd = process.cwd
var cwd = null
+
+var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
+
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process)
@@ -87,7 +90,7 @@ function patch (fs) {
// failures. Also, take care to yield the scheduler. Windows scheduling gives
// CPU to a busy looping process, which can cause the program causing the lock
// contention to be starved of CPU by node, so the contention doesn't resolve.
- if (process.platform === "win32") {
+ if (platform === "win32") {
fs.rename = (function (fs$rename) { return function (from, to, cb) {
var start = Date.now()
var backoff = 0;
@@ -96,7 +99,12 @@ function patch (fs) {
&& (er.code === "EACCES" || er.code === "EPERM")
&& Date.now() - start < 60000) {
setTimeout(function() {
- fs$rename(from, to, CB);
+ fs.stat(to, function (stater, st) {
+ if (stater && stater.code === "ENOENT")
+ fs$rename(from, to, CB);
+ else
+ cb(er)
+ })
}, backoff)
if (backoff < 100)
backoff += 10;
diff --git a/node_modules/gulp-debug/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-debug/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-debug/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/clone-stats/README.md b/node_modules/gulp-debug/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-debug/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-debug/node_modules/clone-stats/index.js b/node_modules/gulp-debug/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-debug/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-debug/node_modules/clone-stats/package.json b/node_modules/gulp-debug/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-debug/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-debug/node_modules/clone-stats/test.js b/node_modules/gulp-debug/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-debug/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/LICENSE b/node_modules/gulp-debug/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/README.md b/node_modules/gulp-debug/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/index.js b/node_modules/gulp-debug/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/env.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/log.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/lib/template.js b/node_modules/gulp-debug/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-debug/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/index.js b/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/license b/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/package.json b/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/readme.md b/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-debug/node_modules/gulp-util/package.json b/node_modules/gulp-debug/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp-debug/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-debug/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-debug/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-debug/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-debug/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp-debug/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp-debug/node_modules/lodash.template/LICENSE b/node_modules/gulp-debug/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp-debug/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/lodash.template/README.md b/node_modules/gulp-debug/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp-debug/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp-debug/node_modules/lodash.template/index.js b/node_modules/gulp-debug/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp-debug/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp-debug/node_modules/lodash.template/package.json b/node_modules/gulp-debug/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp-debug/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/.npmignore b/node_modules/gulp-debug/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/.travis.yml b/node_modules/gulp-debug/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/LICENSE b/node_modules/gulp-debug/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/README.md b/node_modules/gulp-debug/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/index.js b/node_modules/gulp-debug/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/package.json b/node_modules/gulp-debug/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-debug/node_modules/replace-ext/test/main.js b/node_modules/gulp-debug/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-debug/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-debug/node_modules/vinyl/LICENSE b/node_modules/gulp-debug/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-debug/node_modules/vinyl/README.md b/node_modules/gulp-debug/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-debug/node_modules/vinyl/index.js b/node_modules/gulp-debug/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp-debug/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-debug/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp-debug/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-debug/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp-debug/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-debug/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-debug/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-debug/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-debug/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-debug/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp-debug/node_modules/vinyl/package.json b/node_modules/gulp-debug/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp-debug/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-json-transform/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-json-transform/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-json-transform/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/clone-stats/README.md b/node_modules/gulp-json-transform/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-json-transform/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-json-transform/node_modules/clone-stats/index.js b/node_modules/gulp-json-transform/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-json-transform/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-json-transform/node_modules/clone-stats/package.json b/node_modules/gulp-json-transform/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-json-transform/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-json-transform/node_modules/clone-stats/test.js b/node_modules/gulp-json-transform/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-json-transform/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/LICENSE b/node_modules/gulp-json-transform/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/README.md b/node_modules/gulp-json-transform/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/index.js b/node_modules/gulp-json-transform/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/env.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/log.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/template.js b/node_modules/gulp-json-transform/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-json-transform/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/gulp-util/package.json b/node_modules/gulp-json-transform/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp-json-transform/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp-json-transform/node_modules/lodash.template/LICENSE b/node_modules/gulp-json-transform/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/lodash.template/README.md b/node_modules/gulp-json-transform/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp-json-transform/node_modules/lodash.template/index.js b/node_modules/gulp-json-transform/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp-json-transform/node_modules/lodash.template/package.json b/node_modules/gulp-json-transform/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp-json-transform/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp-json-transform/node_modules/object-assign/index.js b/node_modules/gulp-json-transform/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp-json-transform/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/object-assign/license b/node_modules/gulp-json-transform/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp-json-transform/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/object-assign/package.json b/node_modules/gulp-json-transform/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp-json-transform/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-json-transform/node_modules/object-assign/readme.md b/node_modules/gulp-json-transform/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp-json-transform/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/.npmignore b/node_modules/gulp-json-transform/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/.travis.yml b/node_modules/gulp-json-transform/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/LICENSE b/node_modules/gulp-json-transform/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/README.md b/node_modules/gulp-json-transform/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/index.js b/node_modules/gulp-json-transform/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/package.json b/node_modules/gulp-json-transform/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-json-transform/node_modules/replace-ext/test/main.js b/node_modules/gulp-json-transform/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-json-transform/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/LICENSE b/node_modules/gulp-json-transform/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/README.md b/node_modules/gulp-json-transform/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/index.js b/node_modules/gulp-json-transform/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-json-transform/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-json-transform/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-json-transform/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-json-transform/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-json-transform/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp-json-transform/node_modules/vinyl/package.json b/node_modules/gulp-json-transform/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp-json-transform/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-sourcemaps/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-sourcemaps/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-sourcemaps/node_modules/clone-stats/README.md b/node_modules/gulp-sourcemaps/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-sourcemaps/node_modules/clone-stats/index.js b/node_modules/gulp-sourcemaps/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-sourcemaps/node_modules/clone-stats/package.json b/node_modules/gulp-sourcemaps/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-sourcemaps/node_modules/clone-stats/test.js b/node_modules/gulp-sourcemaps/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/.npmignore b/node_modules/gulp-sourcemaps/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/.travis.yml b/node_modules/gulp-sourcemaps/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/LICENSE b/node_modules/gulp-sourcemaps/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/README.md b/node_modules/gulp-sourcemaps/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/index.js b/node_modules/gulp-sourcemaps/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/package.json b/node_modules/gulp-sourcemaps/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-sourcemaps/node_modules/replace-ext/test/main.js b/node_modules/gulp-sourcemaps/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-sourcemaps/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-tar/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-tar/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-tar/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/clone-stats/README.md b/node_modules/gulp-tar/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-tar/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-tar/node_modules/clone-stats/index.js b/node_modules/gulp-tar/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-tar/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-tar/node_modules/clone-stats/package.json b/node_modules/gulp-tar/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-tar/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-tar/node_modules/clone-stats/test.js b/node_modules/gulp-tar/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-tar/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/LICENSE b/node_modules/gulp-tar/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/README.md b/node_modules/gulp-tar/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/index.js b/node_modules/gulp-tar/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/env.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/log.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/lib/template.js b/node_modules/gulp-tar/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-tar/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/index.js b/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/license b/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/package.json b/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/readme.md b/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-tar/node_modules/gulp-util/package.json b/node_modules/gulp-tar/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp-tar/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-tar/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-tar/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-tar/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-tar/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp-tar/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp-tar/node_modules/lodash.template/LICENSE b/node_modules/gulp-tar/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp-tar/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/lodash.template/README.md b/node_modules/gulp-tar/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp-tar/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp-tar/node_modules/lodash.template/index.js b/node_modules/gulp-tar/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp-tar/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp-tar/node_modules/lodash.template/package.json b/node_modules/gulp-tar/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp-tar/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/.npmignore b/node_modules/gulp-tar/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/.travis.yml b/node_modules/gulp-tar/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/LICENSE b/node_modules/gulp-tar/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/README.md b/node_modules/gulp-tar/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/index.js b/node_modules/gulp-tar/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/package.json b/node_modules/gulp-tar/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-tar/node_modules/replace-ext/test/main.js b/node_modules/gulp-tar/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-tar/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-tar/node_modules/vinyl/LICENSE b/node_modules/gulp-tar/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-tar/node_modules/vinyl/README.md b/node_modules/gulp-tar/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-tar/node_modules/vinyl/index.js b/node_modules/gulp-tar/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp-tar/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-tar/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp-tar/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-tar/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp-tar/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-tar/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-tar/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-tar/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-tar/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-tar/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp-tar/node_modules/vinyl/package.json b/node_modules/gulp-tar/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp-tar/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/README.md b/node_modules/gulp-typescript/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-typescript/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/index.js b/node_modules/gulp-typescript/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-typescript/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/package.json b/node_modules/gulp-typescript/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-typescript/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/test.js b/node_modules/gulp-typescript/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-typescript/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE b/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/README.md b/node_modules/gulp-typescript/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/index.js b/node_modules/gulp-typescript/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/package.json b/node_modules/gulp-typescript/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp-typescript/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE b/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/README.md b/node_modules/gulp-typescript/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/index.js b/node_modules/gulp-typescript/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/package.json b/node_modules/gulp-typescript/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp-typescript/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp-typescript/node_modules/object-assign/index.js b/node_modules/gulp-typescript/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp-typescript/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp-typescript/node_modules/object-assign/license b/node_modules/gulp-typescript/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp-typescript/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/object-assign/package.json b/node_modules/gulp-typescript/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp-typescript/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-typescript/node_modules/object-assign/readme.md b/node_modules/gulp-typescript/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp-typescript/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore b/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml b/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE b/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/README.md b/node_modules/gulp-typescript/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/index.js b/node_modules/gulp-typescript/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/package.json b/node_modules/gulp-typescript/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js b/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/LICENSE b/node_modules/gulp-typescript/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/README.md b/node_modules/gulp-typescript/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/index.js b/node_modules/gulp-typescript/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp-typescript/node_modules/vinyl/package.json b/node_modules/gulp-typescript/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp-typescript/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-typescript/package.json b/node_modules/gulp-typescript/package.json
index c3ba228be..19a2049df 100644
--- a/node_modules/gulp-typescript/package.json
+++ b/node_modules/gulp-typescript/package.json
@@ -1,6 +1,6 @@
{
"name": "gulp-typescript",
- "version": "3.1.3",
+ "version": "3.1.6",
"description": "A typescript compiler for gulp with incremental compilation support.",
"homepage": "https://github.com/ivogabe/gulp-typescript",
"bugs": "https://github.com/ivogabe/gulp-typescript/issues",
@@ -54,6 +54,7 @@
}
],
"main": "release/main.js",
+ "types": "release/main.d.ts",
"typings": "release/main.d.ts",
"dependencies": {
"gulp-util": "~3.0.7",
@@ -80,7 +81,7 @@
"typescript": "2.0.3"
},
"peerDependencies": {
- "typescript": "~2.0.3 || >=2.0.0-dev || >=2.1.0-dev || >=2.2.0-dev"
+ "typescript": "~2.0.3 || >=2.0.0-dev || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev"
},
"scripts": {
"test": "gulp"
diff --git a/node_modules/gulp-typescript/release/compiler.d.ts b/node_modules/gulp-typescript/release/compiler.d.ts
index 1349e3040..62685b46c 100644
--- a/node_modules/gulp-typescript/release/compiler.d.ts
+++ b/node_modules/gulp-typescript/release/compiler.d.ts
@@ -18,7 +18,9 @@ export declare class ProjectCompiler implements ICompiler {
prepare(project: ProjectInfo): void;
inputFile(file: File): void;
inputDone(): void;
- private emitFile(result, currentDirectory, file?);
+ private attachContentToFile(file, fileName, content);
+ private emit(result, callback);
+ private emitFile({file, jsFileName, dtsFileName, jsContent, dtsContent, jsMapContent}, currentDirectory);
private reportDiagnostics(diagnostics);
private removeSourceMapComment(content);
}
diff --git a/node_modules/gulp-typescript/release/compiler.js b/node_modules/gulp-typescript/release/compiler.js
index f9e22a2b6..723849617 100644
--- a/node_modules/gulp-typescript/release/compiler.js
+++ b/node_modules/gulp-typescript/release/compiler.js
@@ -35,60 +35,73 @@ var ProjectCompiler = (function () {
var currentDirectory = utils.getCommonBasePathOfArray(rootFilenames.map(function (fileName) { return _this.project.input.getFile(fileName).gulp.cwd; }));
this.host = new host_1.Host(this.project.typescript, currentDirectory, this.project.input, this.project.options);
this.program = this.project.typescript.createProgram(rootFilenames, this.project.options, this.host, this.program);
- var preEmitDiagnostics = this.project.typescript.getPreEmitDiagnostics(this.program);
var result = reporter_1.emptyCompilationResult();
- result.optionsErrors = this.program.getOptionsDiagnostics().length;
- result.syntaxErrors = this.program.getSyntacticDiagnostics().length;
- result.globalErrors = this.program.getGlobalDiagnostics().length;
- result.semanticErrors = this.program.getSemanticDiagnostics().length;
+ result.optionsErrors = this.reportDiagnostics(this.program.getOptionsDiagnostics());
+ result.syntaxErrors = this.reportDiagnostics(this.program.getSyntacticDiagnostics());
+ result.globalErrors = this.reportDiagnostics(this.program.getGlobalDiagnostics());
+ result.semanticErrors = this.reportDiagnostics(this.program.getSemanticDiagnostics());
if (this.project.options.declaration) {
result.declarationErrors = this.program.getDeclarationDiagnostics().length;
}
- this.reportDiagnostics(preEmitDiagnostics);
- var emitOutput = this.program.emit();
- result.emitErrors = emitOutput.diagnostics.length;
- result.emitSkipped = emitOutput.emitSkipped;
if (this.project.singleOutput) {
- this.emitFile(result, currentDirectory);
+ var output_1 = {
+ file: undefined
+ };
+ this.emit(result, function (fileName, content) {
+ _this.attachContentToFile(output_1, fileName, content);
+ });
+ this.emitFile(output_1, currentDirectory);
}
else {
- // Emit files one by one
- for (var _i = 0, _a = this.host.input.getFileNames(true); _i < _a.length; _i++) {
- var fileName = _a[_i];
+ var output_2 = {};
+ var input = this.host.input.getFileNames(true);
+ for (var i = 0; i < input.length; i++) {
+ var fileName = utils.normalizePath(input[i]);
var file = this.project.input.getFile(fileName);
- this.emitFile(result, currentDirectory, file);
+ output_2[fileName] = { file: file };
+ }
+ this.emit(result, function (fileName, content, writeByteOrderMark, onError, sourceFiles) {
+ if (sourceFiles.length !== 1) {
+ throw new Error("Failure: sourceFiles in WriteFileCallback should have length 1, got " + sourceFiles.length);
+ }
+ var fileNameOriginal = utils.normalizePath(sourceFiles[0].fileName);
+ var file = output_2[fileNameOriginal];
+ if (!file)
+ return;
+ _this.attachContentToFile(file, fileName, content);
+ });
+ for (var i = 0; i < input.length; i++) {
+ var fileName = utils.normalizePath(input[i]);
+ this.emitFile(output_2[fileName], currentDirectory);
}
}
this.project.output.finish(result);
};
- ProjectCompiler.prototype.emitFile = function (result, currentDirectory, file) {
- var jsFileName;
- var dtsFileName;
- var jsContent;
- var dtsContent;
- var jsMapContent;
- var emitOutput = this.program.emit(file && file.ts, function (fileName, content) {
- var _a = utils.splitExtension(fileName, ['d.ts']), extension = _a[1];
- switch (extension) {
- case 'js':
- case 'jsx':
- jsFileName = fileName;
- jsContent = content;
- break;
- case 'd.ts':
- dtsFileName = fileName;
- dtsContent = content;
- break;
- case 'map':
- jsMapContent = content;
- break;
- }
- });
+ ProjectCompiler.prototype.attachContentToFile = function (file, fileName, content) {
+ var _a = utils.splitExtension(fileName, ['d.ts']), extension = _a[1];
+ switch (extension) {
+ case 'js':
+ case 'jsx':
+ file.jsFileName = fileName;
+ file.jsContent = content;
+ break;
+ case 'd.ts':
+ file.dtsFileName = fileName;
+ file.dtsContent = content;
+ break;
+ case 'map':
+ file.jsMapContent = content;
+ break;
+ }
+ };
+ ProjectCompiler.prototype.emit = function (result, callback) {
+ var emitOutput = this.program.emit(undefined, callback);
result.emitErrors += emitOutput.diagnostics.length;
this.reportDiagnostics(emitOutput.diagnostics);
- if (emitOutput.emitSkipped) {
- result.emitSkipped = true;
- }
+ result.emitSkipped = emitOutput.emitSkipped;
+ };
+ ProjectCompiler.prototype.emitFile = function (_a, currentDirectory) {
+ var file = _a.file, jsFileName = _a.jsFileName, dtsFileName = _a.dtsFileName, jsContent = _a.jsContent, dtsContent = _a.dtsContent, jsMapContent = _a.jsMapContent;
if (!jsFileName)
return;
var base;
@@ -105,9 +118,14 @@ var ProjectCompiler = (function () {
baseDeclarations = path.join(this.project.options.declarationDir, baseRelative);
}
}
+ else if (this.project.options.outFile) {
+ base = this.project.directory;
+ baseDeclarations = base;
+ }
else {
- var outFile = this.project.options.outFile || this.project.options.out;
+ var outFile = this.project.options.out;
base = jsFileName.substring(0, jsFileName.length - outFile.length);
+ baseDeclarations = base;
}
if (jsContent !== undefined) {
if (jsMapContent !== undefined) {
@@ -124,6 +142,7 @@ var ProjectCompiler = (function () {
var error = diagnostics_1[_i];
this.project.output.diagnostic(error);
}
+ return diagnostics.length;
};
ProjectCompiler.prototype.removeSourceMapComment = function (content) {
// By default the TypeScript automaticly inserts a source map comment.
diff --git a/node_modules/gulp-typescript/release/output.js b/node_modules/gulp-typescript/release/output.js
index 1331f5a60..c1f9ab143 100644
--- a/node_modules/gulp-typescript/release/output.js
+++ b/node_modules/gulp-typescript/release/output.js
@@ -58,14 +58,14 @@ var Output = (function () {
// since `generator.applySourceMap` has a really bad performance on big inputs.
if (inputMap.mappings !== '') {
var consumer = new sourceMap.SourceMapConsumer(inputMap);
- generator.applySourceMap(consumer, sourceFile.fileNameOriginal, sourceFile.gulp.base);
+ generator.applySourceMap(consumer);
}
if (!inputMap.sources || !inputMap.sourcesContent)
continue;
for (var i = 0; i < inputMap.sources.length; i++) {
var absolute = path.resolve(sourceFile.gulp.base, inputMap.sources[i]);
var relative = path.relative(output.base, absolute);
- generator.setSourceContent(relative, inputMap.sourcesContent[i]);
+ generator.setSourceContent(utils.forwardSlashes(relative), inputMap.sourcesContent[i]);
}
}
return generator.toString();
diff --git a/node_modules/gulp-typescript/release/project.d.ts b/node_modules/gulp-typescript/release/project.d.ts
index c96441314..66f107d3a 100644
--- a/node_modules/gulp-typescript/release/project.d.ts
+++ b/node_modules/gulp-typescript/release/project.d.ts
@@ -21,6 +21,7 @@ export interface ProjectInfo {
singleOutput: boolean;
options: ts.CompilerOptions;
typescript: typeof ts;
+ directory: string;
reporter: Reporter;
}
export declare function setupProject(projectDirectory: string, config: TsConfig, options: ts.CompilerOptions, typescript: typeof ts): Project;
diff --git a/node_modules/gulp-typescript/release/project.js b/node_modules/gulp-typescript/release/project.js
index 28f1244ca..595caee57 100644
--- a/node_modules/gulp-typescript/release/project.js
+++ b/node_modules/gulp-typescript/release/project.js
@@ -50,6 +50,7 @@ function setupProject(projectDirectory, config, options, typescript) {
compiler: compiler,
options: options,
typescript: typescript,
+ directory: projectDirectory,
// Set when `project` is called
output: undefined,
reporter: undefined
diff --git a/node_modules/gulp-util/.npmignore b/node_modules/gulp-util/.npmignore
deleted file mode 100644
index 5cdb2e5e9..000000000
--- a/node_modules/gulp-util/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components
-test \ No newline at end of file
diff --git a/node_modules/gulp-util/.travis.yml b/node_modules/gulp-util/.travis.yml
deleted file mode 100644
index 7c1662070..000000000
--- a/node_modules/gulp-util/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-util/README.md b/node_modules/gulp-util/README.md
index a8d9b19ef..65209b57f 100644
--- a/node_modules/gulp-util/README.md
+++ b/node_modules/gulp-util/README.md
@@ -12,7 +12,7 @@
</tr>
<tr>
<td>Node Version</td>
-<td>>= 0.9</td>
+<td>>= 0.10</td>
</tr>
</table>
@@ -21,8 +21,7 @@
```javascript
var gutil = require('gulp-util');
-gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123'));
-gutil.beep();
+gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
gutil.replaceExtension('file.coffee', '.js'); // file.js
@@ -35,13 +34,18 @@ gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
### log(msg...)
-Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.
+Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
+The default gulp coloring using gutil.colors.<color>:
```
-values (files, module names, etc.) = magenta
-numbers (times, counts, etc) = cyan
+values (files, module names, etc.) = cyan
+numbers (times, counts, etc) = magenta
```
+### colors
+
+Is an instance of [chalk](https://github.com/sindresorhus/chalk).
+
### replaceExtension(path, newExtension)
Replaces a file extension in a path. Returns the new path.
@@ -64,9 +68,9 @@ This is just [vinyl](https://github.com/wearefractal/vinyl)
```javascript
var file = new gutil.File({
- base: join(__dirname, './fixtures/'),
+ base: path.join(__dirname, './fixtures/'),
cwd: __dirname,
- path: join(__dirname, './fixtures/test.coffee')
+ path: path.join(__dirname, './fixtures/test.coffee')
});
```
@@ -81,7 +85,7 @@ gulp.task('scripts', function() {
gulp.src('src/**/*.js')
.pipe(concat('script.js'))
.pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/');
+ .pipe(gulp.dest('dist/'));
});
```
@@ -97,9 +101,9 @@ Callback is optional and receives two arguments: error and data
```javascript
gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files){
+ .pipe(gutil.buffer(function(err, files) {
- });
+ }));
```
## new PluginError(pluginName, message[, options])
@@ -109,6 +113,7 @@ gulp.src('stuff/*.js')
- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
- Note that if you pass in a custom stack string you need to include the message along with that.
+- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
These are all acceptable forms of instantiation:
@@ -130,11 +135,11 @@ var existingError = new Error('OMG');
var err = new gutil.PluginError('test', existingError, {showStack: true});
```
-[npm-url]: https://npmjs.org/package/gulp-util
+[npm-url]: https://www.npmjs.com/package/gulp-util
[npm-image]: https://badge.fury.io/js/gulp-util.svg
[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://travis-ci.org/gulpjs/gulp-util.svg?branch=master
+[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png
+[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
[depstat-url]: https://david-dm.org/gulpjs/gulp-util
[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-util/index.js b/node_modules/gulp-util/index.js
index 6746ee4be..199713c94 100644
--- a/node_modules/gulp-util/index.js
+++ b/node_modules/gulp-util/index.js
@@ -1,18 +1,18 @@
module.exports = {
- File: require('./lib/File'),
- replaceExtension: require('./lib/replaceExtension'),
- colors: require('./lib/colors'),
- date: require('./lib/date'),
+ File: require('vinyl'),
+ replaceExtension: require('replace-ext'),
+ colors: require('chalk'),
+ date: require('dateformat'),
log: require('./lib/log'),
template: require('./lib/template'),
env: require('./lib/env'),
- beep: require('./lib/beep'),
+ beep: require('beeper'),
noop: require('./lib/noop'),
isStream: require('./lib/isStream'),
isBuffer: require('./lib/isBuffer'),
isNull: require('./lib/isNull'),
- linefeed: require('./lib/linefeed'),
+ linefeed: '\n',
combine: require('./lib/combine'),
buffer: require('./lib/buffer'),
PluginError: require('./lib/PluginError')
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/lib/File.js b/node_modules/gulp-util/lib/File.js
deleted file mode 100644
index 690a508a6..000000000
--- a/node_modules/gulp-util/lib/File.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('vinyl'); \ No newline at end of file
diff --git a/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-util/lib/PluginError.js
index 6640346ed..d60159ab1 100644
--- a/node_modules/gulp-util/lib/PluginError.js
+++ b/node_modules/gulp-util/lib/PluginError.js
@@ -1,22 +1,32 @@
var util = require('util');
-var colors = require('./colors');
+var arrayDiffer = require('array-differ');
+var arrayUniq = require('array-uniq');
+var chalk = require('chalk');
+var objectAssign = require('object-assign');
+
+var nonEnumberableProperties = ['name', 'message', 'stack'];
+var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
// wow what a clusterfuck
var parseOptions = function(plugin, message, opt) {
- if (!opt) opt = {};
+ opt = opt || {};
if (typeof plugin === 'object') {
opt = plugin;
- } else if (message instanceof Error) {
- opt.error = message;
- opt.plugin = plugin;
- } else if (typeof message === 'object') {
- opt = message;
- opt.plugin = plugin;
- } else if (typeof opt === 'object') {
+ } else {
+ if (message instanceof Error) {
+ opt.error = message;
+ } else if (typeof message === 'object') {
+ opt = message;
+ } else {
+ opt.message = message;
+ }
opt.plugin = plugin;
- opt.message = message;
}
- return opt;
+
+ return objectAssign({
+ showStack: false,
+ showProperties: true
+ }, opt);
};
function PluginError(plugin, message, opt) {
@@ -25,19 +35,19 @@ function PluginError(plugin, message, opt) {
Error.call(this);
var options = parseOptions(plugin, message, opt);
-
- this.plugin = options.plugin;
- this.showStack = options.showStack === true;
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack'];
+ var self = this;
// if options has an error, grab details from it
if (options.error) {
- properties.forEach(function(prop) {
- if (prop in options.error) this[prop] = options.error[prop];
- }, this);
+ // These properties are not enumerable, so we have to add them explicitly.
+ arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
+ .forEach(function(prop) {
+ self[prop] = options.error[prop];
+ });
}
+ var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
+
// options object can override
properties.forEach(function(prop) {
if (prop in options) this[prop] = options[prop];
@@ -46,8 +56,18 @@ function PluginError(plugin, message, opt) {
// defaults
if (!this.name) this.name = 'Error';
- // TODO: figure out why this explodes mocha
- if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor);
+ if (!this.stack) {
+ // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
+ // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
+ // safety object, then we'll get stack overflow problems.
+ var safety = {
+ toString: function() {
+ return this._messageWithDetails() + '\nStack:';
+ }.bind(this)
+ };
+ Error.captureStackTrace(safety, arguments.callee || this.constructor);
+ this.__safety = safety;
+ }
if (!this.plugin) throw new Error('Missing plugin name');
if (!this.message) throw new Error('Missing error message');
@@ -55,10 +75,56 @@ function PluginError(plugin, message, opt) {
util.inherits(PluginError, Error);
+PluginError.prototype._messageWithDetails = function() {
+ var messageWithDetails = 'Message:\n ' + this.message;
+ var details = this._messageDetails();
+
+ if (details !== '') {
+ messageWithDetails += '\n' + details;
+ }
+
+ return messageWithDetails;
+};
+
+PluginError.prototype._messageDetails = function() {
+ if (!this.showProperties) {
+ return '';
+ }
+
+ var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
+
+ if (properties.length === 0) {
+ return '';
+ }
+
+ var self = this;
+ properties = properties.map(function stringifyProperty(prop) {
+ return ' ' + prop + ': ' + self[prop];
+ });
+
+ return 'Details:\n' + properties.join('\n');
+};
+
PluginError.prototype.toString = function () {
- var sig = this.name+' in plugin \''+colors.cyan(this.plugin)+'\'';
- var msg = this.showStack ? (this._stack || this.stack) : this.message;
- return sig+'\n'+msg;
+ var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
+ var detailsWithStack = function(stack) {
+ return this._messageWithDetails() + '\nStack:\n' + stack;
+ }.bind(this);
+
+ var msg;
+ if (this.showStack) {
+ if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
+ msg = this.__safety.stack;
+ } else if (this._stack) {
+ msg = detailsWithStack(this._stack);
+ } else { // Stack from wrapped error
+ msg = detailsWithStack(this.stack);
+ }
+ } else {
+ msg = this._messageWithDetails();
+ }
+
+ return sig + '\n' + msg;
};
module.exports = PluginError;
diff --git a/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-util/lib/beep.js
deleted file mode 100644
index 5473d7548..000000000
--- a/node_modules/gulp-util/lib/beep.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function() {
- process.stdout.write('\x07');
-};
diff --git a/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-util/lib/buffer.js
index 4cb064aca..26c940db1 100644
--- a/node_modules/gulp-util/lib/buffer.js
+++ b/node_modules/gulp-util/lib/buffer.js
@@ -12,4 +12,4 @@ module.exports = function(fn) {
cb();
};
return through.obj(push, end);
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-util/lib/colors.js
deleted file mode 100644
index bc8049406..000000000
--- a/node_modules/gulp-util/lib/colors.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('chalk'); \ No newline at end of file
diff --git a/node_modules/gulp-util/lib/date.js b/node_modules/gulp-util/lib/date.js
deleted file mode 100644
index 935793cc6..000000000
--- a/node_modules/gulp-util/lib/date.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('dateformat'); \ No newline at end of file
diff --git a/node_modules/gulp-util/lib/env.js b/node_modules/gulp-util/lib/env.js
index ea1e03e4a..ee17c0e30 100644
--- a/node_modules/gulp-util/lib/env.js
+++ b/node_modules/gulp-util/lib/env.js
@@ -1,4 +1,4 @@
var parseArgs = require('minimist');
var argv = parseArgs(process.argv.slice(2));
-module.exports = argv; \ No newline at end of file
+module.exports = argv;
diff --git a/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-util/lib/isBuffer.js
index 0e23782c4..7c52f78c9 100644
--- a/node_modules/gulp-util/lib/isBuffer.js
+++ b/node_modules/gulp-util/lib/isBuffer.js
@@ -4,4 +4,4 @@ var Buffer = buf.Buffer;
// could use Buffer.isBuffer but this is the same exact thing...
module.exports = function(o) {
return typeof o === 'object' && o instanceof Buffer;
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-util/lib/isNull.js
index 403bb30e8..7f22c63ae 100644
--- a/node_modules/gulp-util/lib/isNull.js
+++ b/node_modules/gulp-util/lib/isNull.js
@@ -1,3 +1,3 @@
module.exports = function(v) {
return v === null;
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-util/lib/isStream.js
index 9ce0929b0..6b54e123b 100644
--- a/node_modules/gulp-util/lib/isStream.js
+++ b/node_modules/gulp-util/lib/isStream.js
@@ -2,4 +2,4 @@ var Stream = require('stream').Stream;
module.exports = function(o) {
return !!o && o instanceof Stream;
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-util/lib/linefeed.js
deleted file mode 100644
index 5b0dfa4b1..000000000
--- a/node_modules/gulp-util/lib/linefeed.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = '\n'; \ No newline at end of file
diff --git a/node_modules/gulp-util/lib/log.js b/node_modules/gulp-util/lib/log.js
index e33d15ed9..bb843beef 100644
--- a/node_modules/gulp-util/lib/log.js
+++ b/node_modules/gulp-util/lib/log.js
@@ -1,10 +1,14 @@
-var colors = require('./colors');
-var date = require('./date');
+var hasGulplog = require('has-gulplog');
module.exports = function(){
- var time = '['+colors.grey(date(new Date(), 'HH:MM:ss'))+']';
- var args = Array.prototype.slice.call(arguments);
- args.unshift(time);
- console.log.apply(console, args);
+ if(hasGulplog()){
+ // specifically deferring loading here to keep from registering it globally
+ var gulplog = require('gulplog');
+ gulplog.info.apply(gulplog, arguments);
+ } else {
+ // specifically defering loading because it might not be used
+ var fancylog = require('fancy-log');
+ fancylog.apply(null, arguments);
+ }
return this;
};
diff --git a/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-util/lib/replaceExtension.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-util/lib/replaceExtension.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-util/lib/template.js b/node_modules/gulp-util/lib/template.js
index c467820f3..eef3bb376 100644
--- a/node_modules/gulp-util/lib/template.js
+++ b/node_modules/gulp-util/lib/template.js
@@ -1,17 +1,21 @@
var template = require('lodash.template');
+var reEscape = require('lodash._reescape');
+var reEvaluate = require('lodash._reevaluate');
var reInterpolate = require('lodash._reinterpolate');
var forcedSettings = {
- escape: /<%-([\s\S]+?)%>/g,
- evaluate: /<%([\s\S]+?)%>/g,
+ escape: reEscape,
+ evaluate: reEvaluate,
interpolate: reInterpolate
};
-module.exports = function(tmpl, data){
- var fn = template(tmpl, null, forcedSettings);
+module.exports = function(tmpl, data) {
+ var fn = template(tmpl, forcedSettings);
var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template');
+ if (typeof o === 'undefined' || typeof o.file === 'undefined') {
+ throw new Error('Failed to provide the current file as "file" to the template');
+ }
return fn(o);
};
diff --git a/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 017f21508..000000000
--- a/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/ansi-regex/index.js b/node_modules/gulp-util/node_modules/ansi-regex/index.js
deleted file mode 100644
index 783c5c7bb..000000000
--- a/node_modules/gulp-util/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g;
-};
diff --git a/node_modules/gulp-util/node_modules/ansi-regex/package.json b/node_modules/gulp-util/node_modules/ansi-regex/package.json
deleted file mode 100644
index 2734a7873..000000000
--- a/node_modules/gulp-util/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "ansi-regex",
- "version": "0.2.1",
- "description": "Regular expression for matching ANSI escape codes",
- "license": "MIT",
- "repository": "sindresorhus/ansi-regex",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/ansi-regex/readme.md b/node_modules/gulp-util/node_modules/ansi-regex/readme.md
deleted file mode 100644
index ae876e729..000000000
--- a/node_modules/gulp-util/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```sh
-$ npm install --save ansi-regex
-```
-
-
-## Usage
-
-```js
-var ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001b[4mcake\u001b[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
-```
-
-*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/ansi-styles/index.js b/node_modules/gulp-util/node_modules/ansi-styles/index.js
deleted file mode 100644
index 2d8b4726d..000000000
--- a/node_modules/gulp-util/node_modules/ansi-styles/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-var styles = module.exports;
-
-var codes = {
- reset: [0, 0],
-
- bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29],
-
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39],
-
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49]
-};
-
-Object.keys(codes).forEach(function (key) {
- var val = codes[key];
- var style = styles[key] = {};
- style.open = '\u001b[' + val[0] + 'm';
- style.close = '\u001b[' + val[1] + 'm';
-});
diff --git a/node_modules/gulp-util/node_modules/ansi-styles/package.json b/node_modules/gulp-util/node_modules/ansi-styles/package.json
deleted file mode 100644
index a9ba60766..000000000
--- a/node_modules/gulp-util/node_modules/ansi-styles/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "ansi-styles",
- "version": "1.1.0",
- "description": "ANSI escape codes for styling strings in the terminal",
- "license": "MIT",
- "repository": "sindresorhus/ansi-styles",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/ansi-styles/readme.md b/node_modules/gulp-util/node_modules/ansi-styles/readme.md
deleted file mode 100644
index 73584cc95..000000000
--- a/node_modules/gulp-util/node_modules/ansi-styles/readme.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles)
-
-> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
-
-You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.
-
-![screenshot](screenshot.png)
-
-
-## Install
-
-```sh
-$ npm install --save ansi-styles
-```
-
-
-## Usage
-
-```js
-var ansi = require('ansi-styles');
-
-console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
-```
-
-
-## API
-
-Each style has an `open` and `close` property.
-
-
-## Styles
-
-### General
-
-- `reset`
-- `bold`
-- `dim`
-- `italic` *(not widely supported)*
-- `underline`
-- `inverse`
-- `hidden`
-- `strikethrough` *(not widely supported)*
-
-### Text colors
-
-- `black`
-- `red`
-- `green`
-- `yellow`
-- `blue`
-- `magenta`
-- `cyan`
-- `white`
-- `gray`
-
-### Background colors
-
-- `bgBlack`
-- `bgRed`
-- `bgGreen`
-- `bgYellow`
-- `bgBlue`
-- `bgMagenta`
-- `bgCyan`
-- `bgWhite`
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-util/node_modules/chalk/index.js
deleted file mode 100644
index ac1f16820..000000000
--- a/node_modules/gulp-util/node_modules/chalk/index.js
+++ /dev/null
@@ -1,95 +0,0 @@
-'use strict';
-var escapeStringRegexp = require('escape-string-regexp');
-var ansiStyles = require('ansi-styles');
-var stripAnsi = require('strip-ansi');
-var hasAnsi = require('has-ansi');
-var supportsColor = require('supports-color');
-var defineProps = Object.defineProperties;
-var chalk = module.exports;
-
-function build(_styles) {
- var builder = function builder() {
- return applyStyle.apply(builder, arguments);
- };
- builder._styles = _styles;
- // __proto__ is used because we must return a function, but there is
- // no way to create a function with a different prototype.
- builder.__proto__ = proto;
- return builder;
-}
-
-var styles = (function () {
- var ret = {};
-
- ansiStyles.grey = ansiStyles.gray;
-
- Object.keys(ansiStyles).forEach(function (key) {
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
-
- ret[key] = {
- get: function () {
- return build(this._styles.concat(key));
- }
- };
- });
-
- return ret;
-})();
-
-var proto = defineProps(function chalk() {}, styles);
-
-function applyStyle() {
- // support varags, but simply cast to string in case there's only one arg
- var args = arguments;
- var argsLen = args.length;
- var str = argsLen !== 0 && String(arguments[0]);
- if (argsLen > 1) {
- // don't slice `arguments`, it prevents v8 optimizations
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
- }
- }
-
- if (!chalk.enabled || !str) {
- return str;
- }
-
- /*jshint validthis: true*/
- var nestedStyles = this._styles;
-
- for (var i = 0; i < nestedStyles.length; i++) {
- var code = ansiStyles[nestedStyles[i]];
- // Replace any instances already present with a re-opening code
- // otherwise only the part of the string until said closing code
- // will be colored, and the rest will simply be 'plain'.
- str = code.open + str.replace(code.closeRe, code.open) + code.close;
- }
-
- return str;
-}
-
-function init() {
- var ret = {};
-
- Object.keys(styles).forEach(function (name) {
- ret[name] = {
- get: function () {
- return build([name]);
- }
- };
- });
-
- return ret;
-}
-
-defineProps(chalk, init());
-
-chalk.styles = ansiStyles;
-chalk.hasColor = hasAnsi;
-chalk.stripColor = stripAnsi;
-chalk.supportsColor = supportsColor;
-
-// detect mode if not set manually
-if (chalk.enabled === undefined) {
- chalk.enabled = chalk.supportsColor;
-}
diff --git a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/has-ansi b/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/has-ansi
deleted file mode 120000
index 957e9f8cf..000000000
--- a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/has-ansi
+++ /dev/null
@@ -1 +0,0 @@
-../../../has-ansi/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi
deleted file mode 120000
index f7646606c..000000000
--- a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi
+++ /dev/null
@@ -1 +0,0 @@
-../../../strip-ansi/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/supports-color b/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/supports-color
deleted file mode 120000
index 886732fac..000000000
--- a/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/supports-color
+++ /dev/null
@@ -1 +0,0 @@
-../../../supports-color/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-util/node_modules/chalk/package.json
deleted file mode 100644
index e58fe486a..000000000
--- a/node_modules/gulp-util/node_modules/chalk/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "name": "chalk",
- "version": "0.5.1",
- "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.",
- "license": "MIT",
- "repository": "sindresorhus/chalk",
- "maintainers": [
- "Sindre Sorhus <sindresorhus@gmail.com> (http://sindresorhus.com)",
- "Joshua Appelman <joshua@jbna.nl>"
- ],
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha",
- "bench": "matcha benchmark.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "ansi",
- "styles",
- "tty",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "dependencies": {
- "ansi-styles": "^1.1.0",
- "escape-string-regexp": "^1.0.0",
- "has-ansi": "^0.1.0",
- "strip-ansi": "^0.3.0",
- "supports-color": "^0.2.0"
- },
- "devDependencies": {
- "matcha": "^0.5.0",
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/chalk/readme.md b/node_modules/gulp-util/node_modules/chalk/readme.md
deleted file mode 100644
index 239c791f8..000000000
--- a/node_modules/gulp-util/node_modules/chalk/readme.md
+++ /dev/null
@@ -1,175 +0,0 @@
-# <img width="300" src="https://cdn.rawgit.com/sindresorhus/chalk/77ae94f63ab1ac61389b190e5a59866569d1a376/logo.svg" alt="chalk">
-
-> Terminal string styling done right
-
-[![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk)
-![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)
-
-[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.
-
-**Chalk is a clean and focused alternative.**
-
-![screenshot](https://github.com/sindresorhus/ansi-styles/raw/master/screenshot.png)
-
-
-## Why
-
-- Highly performant
-- Doesn't extend String.prototype
-- Expressive API
-- Ability to nest styles
-- Clean and focused
-- Auto-detects color support
-- Actively maintained
-- [Used by 1000+ modules](https://npmjs.org/browse/depended/chalk)
-
-
-## Install
-
-```sh
-$ npm install --save chalk
-```
-
-
-## Usage
-
-Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
-
-```js
-var chalk = require('chalk');
-
-// style a string
-console.log( chalk.blue('Hello world!') );
-
-// combine styled and normal strings
-console.log( chalk.blue('Hello'), 'World' + chalk.red('!') );
-
-// compose multiple styles using the chainable API
-console.log( chalk.blue.bgRed.bold('Hello world!') );
-
-// pass in multiple arguments
-console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );
-
-// nest styles
-console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );
-
-// nest styles of the same type even (color, underline, background)
-console.log( chalk.green('I am a green line ' + chalk.blue('with a blue substring') + ' that becomes green again!') );
-```
-
-Easily define your own themes.
-
-```js
-var chalk = require('chalk');
-var error = chalk.bold.red;
-console.log(error('Error!'));
-```
-
-Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
-
-```js
-var name = 'Sindre';
-console.log(chalk.green('Hello %s'), name);
-//=> Hello Sindre
-```
-
-
-## API
-
-### chalk.`<style>[.<style>...](string, [string...])`
-
-Example: `chalk.red.bold.underline('Hello', 'world');`
-
-Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.
-
-Multiple arguments will be separated by space.
-
-### chalk.enabled
-
-Color support is automatically detected, but you can override it.
-
-### chalk.supportsColor
-
-Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color).
-
-Can be overridden by the user with the flags `--color` and `--no-color`.
-
-Used internally and handled for you, but exposed for convenience.
-
-### chalk.styles
-
-Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).
-
-Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.
-
-```js
-var chalk = require('chalk');
-
-console.log(chalk.styles.red);
-//=> {open: '\u001b[31m', close: '\u001b[39m'}
-
-console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
-```
-
-### chalk.hasColor(string)
-
-Check whether a string [has color](https://github.com/sindresorhus/has-ansi).
-
-### chalk.stripColor(string)
-
-[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.
-
-Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
-
-Example:
-
-```js
-var chalk = require('chalk');
-var styledString = getText();
-
-if (!chalk.supportsColor) {
- styledString = chalk.stripColor(styledString);
-}
-```
-
-
-## Styles
-
-### General
-
-- `reset`
-- `bold`
-- `dim`
-- `italic` *(not widely supported)*
-- `underline`
-- `inverse`
-- `hidden`
-- `strikethrough` *(not widely supported)*
-
-### Text colors
-
-- `black`
-- `red`
-- `green`
-- `yellow`
-- `blue`
-- `magenta`
-- `cyan`
-- `white`
-- `gray`
-
-### Background colors
-
-- `bgBlack`
-- `bgRed`
-- `bgGreen`
-- `bgYellow`
-- `bgBlue`
-- `bgMagenta`
-- `bgCyan`
-- `bgWhite`
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-util/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-util/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-util/node_modules/clone-stats/README.md b/node_modules/gulp-util/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-util/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-util/node_modules/clone-stats/index.js b/node_modules/gulp-util/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-util/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-util/node_modules/clone-stats/package.json b/node_modules/gulp-util/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-util/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-util/node_modules/clone-stats/test.js b/node_modules/gulp-util/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-util/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-util/node_modules/has-ansi/cli.js b/node_modules/gulp-util/node_modules/has-ansi/cli.js
deleted file mode 100755
index e0956fcc7..000000000
--- a/node_modules/gulp-util/node_modules/has-ansi/cli.js
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-var pkg = require('./package.json');
-var hasAnsi = require('./');
-var input = process.argv[2];
-
-function stdin(cb) {
- var ret = '';
- process.stdin.setEncoding('utf8');
- process.stdin.on('data', function (data) {
- ret += data;
- });
- process.stdin.on('end', function () {
- cb(ret);
- });
-}
-
-function help() {
- console.log([
- pkg.description,
- '',
- 'Usage',
- ' $ has-ansi <string>',
- ' $ echo <string> | has-ansi',
- '',
- 'Exits with code 0 if input has ANSI escape codes and 1 if not'
- ].join('\n'));
-}
-
-function init(data) {
- process.exit(hasAnsi(data) ? 0 : 1);
-}
-
-if (process.argv.indexOf('--help') !== -1) {
- help();
- return;
-}
-
-if (process.argv.indexOf('--version') !== -1) {
- console.log(pkg.version);
- return;
-}
-
-if (process.stdin.isTTY) {
- if (!input) {
- help();
- return;
- }
-
- init(input);
-} else {
- stdin(init);
-}
diff --git a/node_modules/gulp-util/node_modules/has-ansi/index.js b/node_modules/gulp-util/node_modules/has-ansi/index.js
deleted file mode 100644
index 98fae0676..000000000
--- a/node_modules/gulp-util/node_modules/has-ansi/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex');
-var re = new RegExp(ansiRegex().source); // remove the `g` flag
-module.exports = re.test.bind(re);
diff --git a/node_modules/gulp-util/node_modules/has-ansi/package.json b/node_modules/gulp-util/node_modules/has-ansi/package.json
deleted file mode 100644
index 047ff0d07..000000000
--- a/node_modules/gulp-util/node_modules/has-ansi/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "has-ansi",
- "version": "0.1.0",
- "description": "Check if a string has ANSI escape codes",
- "license": "MIT",
- "repository": "sindresorhus/has-ansi",
- "bin": {
- "has-ansi": "cli.js"
- },
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js",
- "cli.js"
- ],
- "keywords": [
- "cli",
- "bin",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern",
- "has"
- ],
- "dependencies": {
- "ansi-regex": "^0.2.0"
- },
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/has-ansi/readme.md b/node_modules/gulp-util/node_modules/has-ansi/readme.md
deleted file mode 100644
index 070221231..000000000
--- a/node_modules/gulp-util/node_modules/has-ansi/readme.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi)
-
-> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```sh
-$ npm install --save has-ansi
-```
-
-
-## Usage
-
-```js
-var hasAnsi = require('has-ansi');
-
-hasAnsi('\u001b[4mcake\u001b[0m');
-//=> true
-
-hasAnsi('cake');
-//=> false
-```
-
-
-## CLI
-
-```sh
-$ npm install --global has-ansi
-```
-
-```
-$ has-ansi --help
-
-Usage
- $ has-ansi <string>
- $ echo <string> | has-ansi
-
-Exits with code 0 if input has ANSI escape codes and 1 if not
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/isarray/README.md b/node_modules/gulp-util/node_modules/isarray/README.md
deleted file mode 100644
index 052a62b8d..000000000
--- a/node_modules/gulp-util/node_modules/isarray/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/gulp-util/node_modules/isarray/build/build.js b/node_modules/gulp-util/node_modules/isarray/build/build.js
deleted file mode 100644
index ec58596ae..000000000
--- a/node_modules/gulp-util/node_modules/isarray/build/build.js
+++ /dev/null
@@ -1,209 +0,0 @@
-
-/**
- * Require the given path.
- *
- * @param {String} path
- * @return {Object} exports
- * @api public
- */
-
-function require(path, parent, orig) {
- var resolved = require.resolve(path);
-
- // lookup failed
- if (null == resolved) {
- orig = orig || path;
- parent = parent || 'root';
- var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
- err.path = orig;
- err.parent = parent;
- err.require = true;
- throw err;
- }
-
- var module = require.modules[resolved];
-
- // perform real require()
- // by invoking the module's
- // registered function
- if (!module.exports) {
- module.exports = {};
- module.client = module.component = true;
- module.call(this, module.exports, require.relative(resolved), module);
- }
-
- return module.exports;
-}
-
-/**
- * Registered modules.
- */
-
-require.modules = {};
-
-/**
- * Registered aliases.
- */
-
-require.aliases = {};
-
-/**
- * Resolve `path`.
- *
- * Lookup:
- *
- * - PATH/index.js
- * - PATH.js
- * - PATH
- *
- * @param {String} path
- * @return {String} path or null
- * @api private
- */
-
-require.resolve = function(path) {
- if (path.charAt(0) === '/') path = path.slice(1);
- var index = path + '/index.js';
-
- var paths = [
- path,
- path + '.js',
- path + '.json',
- path + '/index.js',
- path + '/index.json'
- ];
-
- for (var i = 0; i < paths.length; i++) {
- var path = paths[i];
- if (require.modules.hasOwnProperty(path)) return path;
- }
-
- if (require.aliases.hasOwnProperty(index)) {
- return require.aliases[index];
- }
-};
-
-/**
- * Normalize `path` relative to the current path.
- *
- * @param {String} curr
- * @param {String} path
- * @return {String}
- * @api private
- */
-
-require.normalize = function(curr, path) {
- var segs = [];
-
- if ('.' != path.charAt(0)) return path;
-
- curr = curr.split('/');
- path = path.split('/');
-
- for (var i = 0; i < path.length; ++i) {
- if ('..' == path[i]) {
- curr.pop();
- } else if ('.' != path[i] && '' != path[i]) {
- segs.push(path[i]);
- }
- }
-
- return curr.concat(segs).join('/');
-};
-
-/**
- * Register module at `path` with callback `definition`.
- *
- * @param {String} path
- * @param {Function} definition
- * @api private
- */
-
-require.register = function(path, definition) {
- require.modules[path] = definition;
-};
-
-/**
- * Alias a module definition.
- *
- * @param {String} from
- * @param {String} to
- * @api private
- */
-
-require.alias = function(from, to) {
- if (!require.modules.hasOwnProperty(from)) {
- throw new Error('Failed to alias "' + from + '", it does not exist');
- }
- require.aliases[to] = from;
-};
-
-/**
- * Return a require function relative to the `parent` path.
- *
- * @param {String} parent
- * @return {Function}
- * @api private
- */
-
-require.relative = function(parent) {
- var p = require.normalize(parent, '..');
-
- /**
- * lastIndexOf helper.
- */
-
- function lastIndexOf(arr, obj) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === obj) return i;
- }
- return -1;
- }
-
- /**
- * The relative require() itself.
- */
-
- function localRequire(path) {
- var resolved = localRequire.resolve(path);
- return require(resolved, parent, path);
- }
-
- /**
- * Resolve relative to the parent.
- */
-
- localRequire.resolve = function(path) {
- var c = path.charAt(0);
- if ('/' == c) return path.slice(1);
- if ('.' == c) return require.normalize(p, path);
-
- // resolve deps by returning
- // the dep in the nearest "deps"
- // directory
- var segs = parent.split('/');
- var i = lastIndexOf(segs, 'deps') + 1;
- if (!i) i = 0;
- path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
- return path;
- };
-
- /**
- * Check if module is defined at `path`.
- */
-
- localRequire.exists = function(path) {
- return require.modules.hasOwnProperty(localRequire.resolve(path));
- };
-
- return localRequire;
-};
-require.register("isarray/index.js", function(exports, require, module){
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
-
-});
-require.alias("isarray/index.js", "isarray/index.js");
-
diff --git a/node_modules/gulp-util/node_modules/isarray/component.json b/node_modules/gulp-util/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b6838..000000000
--- a/node_modules/gulp-util/node_modules/isarray/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-util/node_modules/isarray/index.js b/node_modules/gulp-util/node_modules/isarray/index.js
deleted file mode 100644
index 5f5ad45d4..000000000
--- a/node_modules/gulp-util/node_modules/isarray/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
diff --git a/node_modules/gulp-util/node_modules/isarray/package.json b/node_modules/gulp-util/node_modules/isarray/package.json
deleted file mode 100644
index 5a1e9c109..000000000
--- a/node_modules/gulp-util/node_modules/isarray/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : {
- "type" : "git",
- "url" : "git://github.com/juliangruber/isarray.git"
- },
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : {
- "test" : "tap test/*.js"
- },
- "dependencies" : {},
- "devDependencies" : {
- "tap" : "*"
- },
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-util/node_modules/minimist/.travis.yml b/node_modules/gulp-util/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba29d..000000000
--- a/node_modules/gulp-util/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp-util/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4b4..000000000
--- a/node_modules/gulp-util/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp-util/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8ee..000000000
--- a/node_modules/gulp-util/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-util/node_modules/minimist/index.js
deleted file mode 100644
index 9549c96fb..000000000
--- a/node_modules/gulp-util/node_modules/minimist/index.js
+++ /dev/null
@@ -1,200 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
- flags.allBools = true;
- } else {
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
- }
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- if (aliases[key]) {
- flags.strings[aliases[key]] = true;
- }
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && !flags.allBools
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- if (opts['--']) {
- argv['--'] = new Array();
- notFlags.forEach(function(key) {
- argv['--'].push(key);
- });
- }
- else {
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
- }
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
diff --git a/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-util/node_modules/minimist/package.json
deleted file mode 100644
index 5935fc34a..000000000
--- a/node_modules/gulp-util/node_modules/minimist/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "minimist",
- "version": "0.2.0",
- "description": "parse argument options",
- "main": "index.js",
- "devDependencies": {
- "tape": "~1.0.4",
- "tap": "~0.4.0"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling" : {
- "files" : "test/*.js",
- "browsers" : [
- "ie/6..latest",
- "ff/5", "firefox/latest",
- "chrome/10", "chrome/latest",
- "safari/5.1", "safari/latest",
- "opera/12"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "parser",
- "optimist"
- ],
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-util/node_modules/minimist/readme.markdown
deleted file mode 100644
index 82532210a..000000000
--- a/node_modules/gulp-util/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,86 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a boolean, string or array of strings to always treat as
-booleans. if `true` will treat all double hyphenated arguments without equal signs
-as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-* `opts['--']` - when true, populate `argv._` with everything before the `--`
-and `argv['--']` with everything after the `--`. Here's an example:
-
-```
-> require('./')('one two three -- four five --six'.split(' '), { '--': true })
-{ _: [ 'one', 'two', 'three' ],
- '--': [ 'four', 'five', '--six' ] }
-```
-
-Note that with `opts['--']` set, parsing for arguments still stops after the
-`--`.
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/node_modules/gulp-util/node_modules/minimist/test/all_bool.js b/node_modules/gulp-util/node_modules/minimist/test/all_bool.js
deleted file mode 100644
index 4575ec0b4..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/all_bool.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean true (default all --args to boolean)', function (t) {
- var argv = parse(['moo', '--honk', 'cow'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
-
-test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
- var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- tacos: 'good',
- p: '55',
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/bool.js b/node_modules/gulp-util/node_modules/minimist/test/bool.js
deleted file mode 100644
index 749e083cb..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/bool.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp-util/node_modules/minimist/test/dash.js
deleted file mode 100644
index 5a4fa5be4..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
-
-test('move arguments after the -- into their own `--` array', function(t) {
- t.plan(1);
- t.deepEqual(
- parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
- { name: 'John', _: [ 'before' ], '--': [ 'after' ] });
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp-util/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee40..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp-util/node_modules/minimist/test/dotted.js
deleted file mode 100644
index d8b3e856e..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
-
-test('dotted default with no alias', function (t) {
- var argv = parse('', {default: {'a.b': 11}});
- t.equal(argv.a.b, 11);
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp-util/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e09d..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/num.js b/node_modules/gulp-util/node_modules/minimist/test/num.js
deleted file mode 100644
index 2cc77f4d6..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/num.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('already a number', function (t) {
- var argv = parse([ '-x', 1234, 789 ]);
- t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp-util/node_modules/minimist/test/parse.js
deleted file mode 100644
index 7b4a2a17c..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,197 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('string and alias', function(t) {
- var x = parse([ '--str', '000123' ], {
- string: 's',
- alias: { s: 'str' }
- });
-
- t.equal(x.str, '000123');
- t.equal(typeof x.str, 'string');
- t.equal(x.s, '000123');
- t.equal(typeof x.s, 'string');
-
- var y = parse([ '-s', '000123' ], {
- string: 'str',
- alias: { str: 's' }
- });
-
- t.equal(y.str, '000123');
- t.equal(typeof y.str, 'string');
- t.equal(y.s, '000123');
- t.equal(typeof y.s, 'string');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b036..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp-util/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c25..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp-util/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58ce..000000000
--- a/node_modules/gulp-util/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/node_modules/gulp-util/node_modules/readable-stream/.npmignore b/node_modules/gulp-util/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/readable-stream/LICENSE b/node_modules/gulp-util/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/node_modules/gulp-util/node_modules/readable-stream/README.md b/node_modules/gulp-util/node_modules/readable-stream/README.md
deleted file mode 100644
index 3fb3e8023..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# readable-stream
-
-***Node-core streams for userland***
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
-
-If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
-
-**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
-
-**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
-
diff --git a/node_modules/gulp-util/node_modules/readable-stream/duplex.js b/node_modules/gulp-util/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af87..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_duplex.js")
diff --git a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index b513d61a9..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) keys.push(key);
- return keys;
-}
-/*</replacement>*/
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-forEach(objectKeys(Writable.prototype), function(method) {
- if (!Duplex.prototype[method])
- Duplex.prototype[method] = Writable.prototype[method];
-});
-
-function Duplex(options) {
- if (!(this instanceof Duplex))
- return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false)
- this.readable = false;
-
- if (options && options.writable === false)
- this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false)
- this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended)
- return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- process.nextTick(this.end.bind(this));
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index 895ca50a1..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough))
- return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function(chunk, encoding, cb) {
- cb(null, chunk);
-};
diff --git a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 630722099..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,982 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-module.exports = Readable;
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-var EE = require('events').EventEmitter;
-
-/*<replacement>*/
-if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-var Stream = require('stream');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-function ReadableState(options, stream) {
- options = options || {};
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.buffer = [];
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = false;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // In streams that never have any data, and do push(null) right away,
- // the consumer can miss the 'end' event if they do some I/O before
- // consuming the stream. So, we don't emit('end') until some reading
- // happens.
- this.calledRead = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
-
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // when piping, we only care about 'readable' events that happen
- // after read()ing all the bytes and not getting any pushback.
- this.ranOut = false;
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- if (!(this instanceof Readable))
- return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- Stream.call(this);
-}
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function(chunk, encoding) {
- var state = this._readableState;
-
- if (typeof chunk === 'string' && !state.objectMode) {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
- encoding = '';
- }
- }
-
- return readableAddChunk(this, state, chunk, encoding, false);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function(chunk) {
- var state = this._readableState;
- return readableAddChunk(this, state, chunk, '', true);
-};
-
-function readableAddChunk(stream, state, chunk, encoding, addToFront) {
- var er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (chunk === null || chunk === undefined) {
- state.reading = false;
- if (!state.ended)
- onEofChunk(stream, state);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.ended && !addToFront) {
- var e = new Error('stream.push() after EOF');
- stream.emit('error', e);
- } else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
- } else {
- if (state.decoder && !addToFront && !encoding)
- chunk = state.decoder.write(chunk);
-
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) {
- state.buffer.unshift(chunk);
- } else {
- state.reading = false;
- state.buffer.push(chunk);
- }
-
- if (state.needReadable)
- emitReadable(stream);
-
- maybeReadMore(stream, state);
- }
- } else if (!addToFront) {
- state.reading = false;
- }
-
- return needMoreData(state);
-}
-
-
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended &&
- (state.needReadable ||
- state.length < state.highWaterMark ||
- state.length === 0);
-}
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function(enc) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
-};
-
-// Don't raise the hwm > 128MB
-var MAX_HWM = 0x800000;
-function roundUpToNextPowerOf2(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2
- n--;
- for (var p = 1; p < 32; p <<= 1) n |= n >> p;
- n++;
- }
- return n;
-}
-
-function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended)
- return 0;
-
- if (state.objectMode)
- return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length)
- return state.buffer[0].length;
- else
- return state.length;
- }
-
- if (n <= 0)
- return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
- if (n > state.highWaterMark)
- state.highWaterMark = roundUpToNextPowerOf2(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else
- return state.length;
- }
-
- return n;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function(n) {
- var state = this._readableState;
- state.calledRead = true;
- var nOrig = n;
- var ret;
-
- if (typeof n !== 'number' || n > 0)
- state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 &&
- state.needReadable &&
- (state.length >= state.highWaterMark || state.ended)) {
- emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- ret = null;
-
- // In cases where the decoder did not receive enough data
- // to produce a full chunk, then immediately received an
- // EOF, state.buffer will contain [<Buffer >, <Buffer 00 ...>].
- // howMuchToRead will see this and coerce the amount to
- // read to zero (because it's looking at the length of the
- // first <Buffer > in state.buffer), and we'll end up here.
- //
- // This can only happen via state.decoder -- no other venue
- // exists for pushing a zero-length chunk into state.buffer
- // and triggering this behavior. In this case, we return our
- // remaining data and end the stream, if appropriate.
- if (state.length > 0 && state.decoder) {
- ret = fromList(n, state);
- state.length -= ret.length;
- }
-
- if (state.length === 0)
- endReadable(this);
-
- return ret;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length - n <= state.highWaterMark)
- doRead = true;
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading)
- doRead = false;
-
- if (doRead) {
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0)
- state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- }
-
- // If _read called its callback synchronously, then `reading`
- // will be false, and we need to re-evaluate how much data we
- // can return to the user.
- if (doRead && !state.reading)
- n = howMuchToRead(nOrig, state);
-
- if (n > 0)
- ret = fromList(n, state);
- else
- ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- }
-
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended)
- state.needReadable = true;
-
- // If we happened to read() exactly the remaining amount in the
- // buffer, and the EOF has been seen at this point, then make sure
- // that we emit 'end' on the very next tick.
- if (state.ended && !state.endEmitted && state.length === 0)
- endReadable(this);
-
- return ret;
-};
-
-function chunkInvalid(state, chunk) {
- var er = null;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
- !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-
-function onEofChunk(stream, state) {
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // if we've ended and we have some data left, then emit
- // 'readable' now to make sure it gets picked up.
- if (state.length > 0)
- emitReadable(stream);
- else
- endReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (state.emittedReadable)
- return;
-
- state.emittedReadable = true;
- if (state.sync)
- process.nextTick(function() {
- emitReadable_(stream);
- });
- else
- emitReadable_(stream);
-}
-
-function emitReadable_(stream) {
- stream.emit('readable');
-}
-
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- process.nextTick(function() {
- maybeReadMore_(stream, state);
- });
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended &&
- state.length < state.highWaterMark) {
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;
- else
- len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function(n) {
- this.emit('error', new Error('not implemented'));
-};
-
-Readable.prototype.pipe = function(dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
- dest !== process.stdout &&
- dest !== process.stderr;
-
- var endFn = doEnd ? onend : cleanup;
- if (state.endEmitted)
- process.nextTick(endFn);
- else
- src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable) {
- if (readable !== src) return;
- cleanup();
- }
-
- function onend() {
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- function cleanup() {
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', cleanup);
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (!dest._writableState || dest._writableState.needDrain)
- ondrain();
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- unpipe();
- dest.removeListener('error', onerror);
- if (EE.listenerCount(dest, 'error') === 0)
- dest.emit('error', er);
- }
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error)
- dest.on('error', onerror);
- else if (isArray(dest._events.error))
- dest._events.error.unshift(onerror);
- else
- dest._events.error = [onerror, dest._events.error];
-
-
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- // the handler that waits for readable events after all
- // the data gets sucked out in flow.
- // This would be easier to follow with a .once() handler
- // in flow(), but that is too slow.
- this.on('readable', pipeOnReadable);
-
- state.flowing = true;
- process.nextTick(function() {
- flow(src);
- });
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function() {
- var dest = this;
- var state = src._readableState;
- state.awaitDrain--;
- if (state.awaitDrain === 0)
- flow(src);
- };
-}
-
-function flow(src) {
- var state = src._readableState;
- var chunk;
- state.awaitDrain = 0;
-
- function write(dest, i, list) {
- var written = dest.write(chunk);
- if (false === written) {
- state.awaitDrain++;
- }
- }
-
- while (state.pipesCount && null !== (chunk = src.read())) {
-
- if (state.pipesCount === 1)
- write(state.pipes, 0, null);
- else
- forEach(state.pipes, write);
-
- src.emit('data', chunk);
-
- // if anyone needs a drain, then we have to wait for that.
- if (state.awaitDrain > 0)
- return;
- }
-
- // if every destination was unpiped, either before entering this
- // function, or in the while loop, then stop flowing.
- //
- // NB: This is a pretty rare edge case.
- if (state.pipesCount === 0) {
- state.flowing = false;
-
- // if there were data event listeners added, then switch to old mode.
- if (EE.listenerCount(src, 'data') > 0)
- emitDataEvents(src);
- return;
- }
-
- // at this point, no one needed a drain, so we just ran out of data
- // on the next readable event, start it over again.
- state.ranOut = true;
-}
-
-function pipeOnReadable() {
- if (this._readableState.ranOut) {
- this._readableState.ranOut = false;
- flow(this);
- }
-}
-
-
-Readable.prototype.unpipe = function(dest) {
- var state = this._readableState;
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0)
- return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes)
- return this;
-
- if (!dest)
- dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
- state.flowing = false;
- if (dest)
- dest.emit('unpipe', this);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
- state.flowing = false;
-
- for (var i = 0; i < len; i++)
- dests[i].emit('unpipe', this);
- return this;
- }
-
- // try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1)
- return this;
-
- state.pipes.splice(i, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1)
- state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function(ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- if (ev === 'data' && !this._readableState.flowing)
- emitDataEvents(this);
-
- if (ev === 'readable' && this.readable) {
- var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
- state.emittedReadable = false;
- state.needReadable = true;
- if (!state.reading) {
- this.read(0);
- } else if (state.length) {
- emitReadable(this, state);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function() {
- emitDataEvents(this);
- this.read(0);
- this.emit('resume');
-};
-
-Readable.prototype.pause = function() {
- emitDataEvents(this, true);
- this.emit('pause');
-};
-
-function emitDataEvents(stream, startPaused) {
- var state = stream._readableState;
-
- if (state.flowing) {
- // https://github.com/isaacs/readable-stream/issues/16
- throw new Error('Cannot switch to old mode now.');
- }
-
- var paused = startPaused || false;
- var readable = false;
-
- // convert to an old-style stream.
- stream.readable = true;
- stream.pipe = Stream.prototype.pipe;
- stream.on = stream.addListener = Stream.prototype.on;
-
- stream.on('readable', function() {
- readable = true;
-
- var c;
- while (!paused && (null !== (c = stream.read())))
- stream.emit('data', c);
-
- if (c === null) {
- readable = false;
- stream._readableState.needReadable = true;
- }
- });
-
- stream.pause = function() {
- paused = true;
- this.emit('pause');
- };
-
- stream.resume = function() {
- paused = false;
- if (readable)
- process.nextTick(function() {
- stream.emit('readable');
- });
- else
- this.read(0);
- this.emit('resume');
- };
-
- // now make it start, just in case it hadn't already.
- stream.emit('readable');
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function(stream) {
- var state = this._readableState;
- var paused = false;
-
- var self = this;
- stream.on('end', function() {
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length)
- self.push(chunk);
- }
-
- self.push(null);
- });
-
- stream.on('data', function(chunk) {
- if (state.decoder)
- chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- //if (state.objectMode && util.isNullOrUndefined(chunk))
- if (state.objectMode && (chunk === null || chunk === undefined))
- return;
- else if (!state.objectMode && (!chunk || !chunk.length))
- return;
-
- var ret = self.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (typeof stream[i] === 'function' &&
- typeof this[i] === 'undefined') {
- this[i] = function(method) { return function() {
- return stream[method].apply(stream, arguments);
- }}(i);
- }
- }
-
- // proxy certain important events.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function(ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- self._read = function(n) {
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return self;
-};
-
-
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0)
- return null;
-
- if (length === 0)
- ret = null;
- else if (objectMode)
- ret = list.shift();
- else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode)
- ret = list.join('');
- else
- ret = Buffer.concat(list, length);
- list.length = 0;
- } else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode)
- ret = '';
- else
- ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
-
- if (stringMode)
- ret += buf.slice(0, cpy);
- else
- buf.copy(ret, c, 0, cpy);
-
- if (cpy < buf.length)
- list[0] = buf.slice(cpy);
- else
- list.shift();
-
- c += cpy;
- }
- }
- }
-
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0)
- throw new Error('endReadable called on non-empty stream');
-
- if (!state.endEmitted && state.calledRead) {
- state.ended = true;
- process.nextTick(function() {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
- });
- }
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
-
-function indexOf (xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index eb188df3e..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-
-function TransformState(options, stream) {
- this.afterTransform = function(er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb)
- return stream.emit('error', new Error('no writecb in Transform class'));
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data !== null && data !== undefined)
- stream.push(data);
-
- if (cb)
- cb(er);
-
- var rs = stream._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
- }
-}
-
-
-function Transform(options) {
- if (!(this instanceof Transform))
- return new Transform(options);
-
- Duplex.call(this, options);
-
- var ts = this._transformState = new TransformState(options, this);
-
- // when the writable side finishes, then flush out anything remaining.
- var stream = this;
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- this.once('finish', function() {
- if ('function' === typeof this._flush)
- this._flush(function(er) {
- done(stream, er);
- });
- else
- done(stream);
- });
-}
-
-Transform.prototype.push = function(chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function(chunk, encoding, cb) {
- throw new Error('not implemented');
-};
-
-Transform.prototype._write = function(chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform ||
- rs.needReadable ||
- rs.length < rs.highWaterMark)
- this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function(n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-
-function done(stream, er) {
- if (er)
- return stream.emit('error', er);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- var ws = stream._writableState;
- var rs = stream._readableState;
- var ts = stream._transformState;
-
- if (ws.length)
- throw new Error('calling transform done when ws.length != 0');
-
- if (ts.transforming)
- throw new Error('calling transform done when still transforming');
-
- return stream.push(null);
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index 4bdaa4fa4..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,386 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, cb), and it'll handle all
-// the drain event emission and buffering.
-
-module.exports = Writable;
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Stream = require('stream');
-
-util.inherits(Writable, Stream);
-
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
-}
-
-function WritableState(options, stream) {
- options = options || {};
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function(er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.buffer = [];
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-}
-
-function Writable(options) {
- var Duplex = require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(this instanceof Duplex))
- return new Writable(options);
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function() {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
-};
-
-
-function writeAfterEnd(stream, state, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
-}
-
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
- !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function(chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (Buffer.isBuffer(chunk))
- encoding = 'buffer';
- else if (!encoding)
- encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function')
- cb = function() {};
-
- if (state.ended)
- writeAfterEnd(this, state, cb);
- else if (validChunk(this, state, chunk, cb))
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
-
- return ret;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode &&
- state.decodeStrings !== false &&
- typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
- }
- return chunk;
-}
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
- if (Buffer.isBuffer(chunk))
- encoding = 'buffer';
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret)
- state.needDrain = true;
-
- if (state.writing)
- state.buffer.push(new WriteReq(chunk, encoding, cb));
- else
- doWrite(stream, state, len, chunk, encoding, cb);
-
- return ret;
-}
-
-function doWrite(stream, state, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- if (sync)
- process.nextTick(function() {
- cb(er);
- });
- else
- cb(er);
-
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er)
- onwriteError(stream, state, sync, er, cb);
- else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(stream, state);
-
- if (!finished && !state.bufferProcessing && state.buffer.length)
- clearBuffer(stream, state);
-
- if (sync) {
- process.nextTick(function() {
- afterWrite(stream, state, finished, cb);
- });
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished)
- onwriteDrain(stream, state);
- cb();
- if (finished)
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
-
- for (var c = 0; c < state.buffer.length; c++) {
- var entry = state.buffer[c];
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, len, chunk, encoding, cb);
-
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- c++;
- break;
- }
- }
-
- state.bufferProcessing = false;
- if (c < state.buffer.length)
- state.buffer = state.buffer.slice(c);
- else
- state.buffer.length = 0;
-}
-
-Writable.prototype._write = function(chunk, encoding, cb) {
- cb(new Error('not implemented'));
-};
-
-Writable.prototype.end = function(chunk, encoding, cb) {
- var state = this._writableState;
-
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (typeof chunk !== 'undefined' && chunk !== null)
- this.write(chunk, encoding);
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished)
- endWritable(this, state, cb);
-};
-
-
-function needFinish(stream, state) {
- return (state.ending &&
- state.length === 0 &&
- !state.finished &&
- !state.writing);
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(stream, state);
- if (need) {
- state.finished = true;
- stream.emit('finish');
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished)
- process.nextTick(cb);
- else
- stream.once('finish', cb);
- }
- state.ended = true;
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/package.json b/node_modules/gulp-util/node_modules/readable-stream/package.json
deleted file mode 100644
index b550f6ce4..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "readable-stream",
- "version": "1.0.34",
- "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x",
- "main": "readable.js",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x",
- "inherits": "~2.0.1"
- },
- "devDependencies": {
- "tap": "~0.2.6"
- },
- "scripts": {
- "test": "tap test/simple/*.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/readable-stream"
- },
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "browser": {
- "util": false
- },
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "license": "MIT"
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/passthrough.js b/node_modules/gulp-util/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a55..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_passthrough.js")
diff --git a/node_modules/gulp-util/node_modules/readable-stream/readable.js b/node_modules/gulp-util/node_modules/readable-stream/readable.js
deleted file mode 100644
index 26511e87b..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = Stream;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
-if (!process.browser && process.env.READABLE_STREAM === 'disable') {
- module.exports = require('stream');
-}
diff --git a/node_modules/gulp-util/node_modules/readable-stream/transform.js b/node_modules/gulp-util/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f078..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_transform.js")
diff --git a/node_modules/gulp-util/node_modules/readable-stream/writable.js b/node_modules/gulp-util/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3..000000000
--- a/node_modules/gulp-util/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_writable.js")
diff --git a/node_modules/gulp-util/node_modules/strip-ansi/cli.js b/node_modules/gulp-util/node_modules/strip-ansi/cli.js
deleted file mode 100755
index 602ae00e8..000000000
--- a/node_modules/gulp-util/node_modules/strip-ansi/cli.js
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-var fs = require('fs');
-var pkg = require('./package.json');
-var strip = require('./');
-var input = process.argv[2];
-
-function help() {
- console.log([
- pkg.description,
- '',
- 'Usage',
- ' $ strip-ansi <input-file> > <output-file>',
- ' $ cat <input-file> | strip-ansi > <output-file>',
- '',
- 'Example',
- ' $ strip-ansi unicorn.txt > unicorn-stripped.txt'
- ].join('\n'));
-}
-
-if (process.argv.indexOf('--help') !== -1) {
- help();
- return;
-}
-
-if (process.argv.indexOf('--version') !== -1) {
- console.log(pkg.version);
- return;
-}
-
-if (input) {
- process.stdout.write(strip(fs.readFileSync(input, 'utf8')));
- return;
-}
-
-process.stdin.setEncoding('utf8');
-process.stdin.on('data', function (data) {
- process.stdout.write(strip(data));
-});
diff --git a/node_modules/gulp-util/node_modules/strip-ansi/index.js b/node_modules/gulp-util/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbf..000000000
--- a/node_modules/gulp-util/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/node_modules/gulp-util/node_modules/strip-ansi/package.json b/node_modules/gulp-util/node_modules/strip-ansi/package.json
deleted file mode 100644
index 3bacc6706..000000000
--- a/node_modules/gulp-util/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "strip-ansi",
- "version": "0.3.0",
- "description": "Strip ANSI escape codes",
- "license": "MIT",
- "bin": {
- "strip-ansi": "cli.js"
- },
- "repository": "sindresorhus/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js",
- "cli.js"
- ],
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "dependencies": {
- "ansi-regex": "^0.2.1"
- },
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/strip-ansi/readme.md b/node_modules/gulp-util/node_modules/strip-ansi/readme.md
deleted file mode 100644
index 5477079d0..000000000
--- a/node_modules/gulp-util/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi)
-
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```sh
-$ npm install --save strip-ansi
-```
-
-
-## Usage
-
-```js
-var stripAnsi = require('strip-ansi');
-
-stripAnsi('\x1b[4mcake\x1b[0m');
-//=> 'cake'
-```
-
-
-## CLI
-
-```sh
-$ npm install --global strip-ansi
-```
-
-```sh
-$ strip-ansi --help
-
-Usage
- $ strip-ansi <input-file> > <output-file>
- $ cat <input-file> | strip-ansi > <output-file>
-
-Example
- $ strip-ansi unicorn.txt > unicorn-stripped.txt
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/supports-color/cli.js b/node_modules/gulp-util/node_modules/supports-color/cli.js
deleted file mode 100755
index 0617971e6..000000000
--- a/node_modules/gulp-util/node_modules/supports-color/cli.js
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-var pkg = require('./package.json');
-var supportsColor = require('./');
-var input = process.argv[2];
-
-function help() {
- console.log([
- pkg.description,
- '',
- 'Usage',
- ' $ supports-color',
- '',
- 'Exits with code 0 if color is supported and 1 if not'
- ].join('\n'));
-}
-
-if (!input || process.argv.indexOf('--help') !== -1) {
- help();
- return;
-}
-
-if (process.argv.indexOf('--version') !== -1) {
- console.log(pkg.version);
- return;
-}
-
-process.exit(supportsColor ? 0 : 1);
diff --git a/node_modules/gulp-util/node_modules/supports-color/index.js b/node_modules/gulp-util/node_modules/supports-color/index.js
deleted file mode 100644
index 092d0baef..000000000
--- a/node_modules/gulp-util/node_modules/supports-color/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-module.exports = (function () {
- if (process.argv.indexOf('--no-color') !== -1) {
- return false;
- }
-
- if (process.argv.indexOf('--color') !== -1) {
- return true;
- }
-
- if (process.stdout && !process.stdout.isTTY) {
- return false;
- }
-
- if (process.platform === 'win32') {
- return true;
- }
-
- if ('COLORTERM' in process.env) {
- return true;
- }
-
- if (process.env.TERM === 'dumb') {
- return false;
- }
-
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
- return true;
- }
-
- return false;
-})();
diff --git a/node_modules/gulp-util/node_modules/supports-color/package.json b/node_modules/gulp-util/node_modules/supports-color/package.json
deleted file mode 100644
index 02b019789..000000000
--- a/node_modules/gulp-util/node_modules/supports-color/package.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "supports-color",
- "version": "0.2.0",
- "description": "Detect whether a terminal supports color",
- "license": "MIT",
- "repository": "sindresorhus/supports-color",
- "bin": {
- "supports-color": "cli.js"
- },
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js",
- "cli.js"
- ],
- "keywords": [
- "cli",
- "bin",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "ansi",
- "styles",
- "tty",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "support",
- "supports",
- "capability",
- "detect"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/supports-color/readme.md b/node_modules/gulp-util/node_modules/supports-color/readme.md
deleted file mode 100644
index 7f07e5fb0..000000000
--- a/node_modules/gulp-util/node_modules/supports-color/readme.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color)
-
-> Detect whether a terminal supports color
-
-
-## Install
-
-```sh
-$ npm install --save supports-color
-```
-
-
-## Usage
-
-```js
-var supportsColor = require('supports-color');
-
-if (supportsColor) {
- console.log('Terminal supports color');
-}
-```
-
-It obeys the `--color` and `--no-color` CLI flags.
-
-
-## CLI
-
-```sh
-$ npm install --global supports-color
-```
-
-```sh
-$ supports-color --help
-
-Usage
- $ supports-color
-
-# Exits with code 0 if color is supported and 1 if not
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-util/node_modules/through2/.npmignore
deleted file mode 100644
index 1e1dcab34..000000000
--- a/node_modules/gulp-util/node_modules/through2/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-.jshintrc
-.travis.yml \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-util/node_modules/through2/LICENSE
deleted file mode 100644
index f6a0029de..000000000
--- a/node_modules/gulp-util/node_modules/through2/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-util/node_modules/through2/README.md
deleted file mode 100644
index 33aa01ec3..000000000
--- a/node_modules/gulp-util/node_modules/through2/README.md
+++ /dev/null
@@ -1,140 +0,0 @@
-# through2
-
-<!--
-
-soon ...
-
-[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)
-
-[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)
-
--->
-
-[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/)
-
-<!--
-not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date
-
-[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)
-[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)
--->
-
-**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
-
-Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
-
-Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations [here](http://www.nearform.com/nodecrunch/dont-use-nodes-core-stream-module).
-
-```js
-fs.createReadStream('ex.txt')
- .pipe(through2(function (chunk, enc, callback) {
-
- for (var i = 0; i < chunk.length; i++)
- if (chunk[i] == 97)
- chunk[i] = 122 // swap 'a' for 'z'
-
- this.push(chunk)
-
- callback()
-
- }))
- .pipe(fs.createWriteStream('out.txt'))
-```
-
-Or object streams:
-
-```js
-var all = []
-
-fs.createReadStream('data.csv')
- .pipe(csv2())
- .pipe(through2.obj(function (chunk, enc, callback) {
-
- var data = {
- name : chunk[0]
- , address : chunk[3]
- , phone : chunk[10]
- }
-
- this.push(data)
-
- callback()
-
- }))
- .on('data', function (data) {
- all.push(data)
- })
- .on('end', function () {
- doSomethingSpecial(all)
- })
-```
-
-Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
-
-## API
-
-<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
-
-Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
-
-### options
-
-The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
-
-The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
-
-```js
-fs.createReadStream('/tmp/important.dat')
- .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {
-
- this.push(new Buffer('wut?'))
- cb()
-
- })
- .pipe(fs.createWriteStream('/tmp/wut.txt'))
-```
-
-### transformFunction
-
-The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
-
-To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
-
-If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.
-
-### flushFunction
-
-The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
-
-<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
-
-Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
-
-```js
-var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
- if (record.temp != null && record.unit = "F") {
- record.temp = ( ( record.temp - 32 ) * 5 ) / 9
- record.unit = "C"
- }
- this.push(record)
- callback()
-})
-
-// Create instances of FToC like so:
-var converter = new FToC()
-// Or:
-var converter = FToC()
-// Or specify/override options when you instantiate, if you prefer:
-var converter = FToC({objectMode: true})
-```
-
-## See Also
-
- - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
- - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
- - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
- - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
-
-## License
-
-**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-util/node_modules/through2/package.json
deleted file mode 100644
index 079126edb..000000000
--- a/node_modules/gulp-util/node_modules/through2/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "through2",
- "version": "0.5.1",
- "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
- "main": "through2.js",
- "scripts": {
- "test": "node test/test.js",
- "test-local": "brtapsauce-local test/basic-test.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/rvagg/through2.git"
- },
- "keywords": [
- "stream",
- "streams2",
- "through",
- "transform"
- ],
- "author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
- "license": "MIT",
- "dependencies": {
- "readable-stream": "~1.0.17",
- "xtend": "~3.0.0"
- },
- "devDependencies": {
- "tape": "~2.3.0",
- "bl": "~0.6.0",
- "stream-spigot": "~3.0.1",
- "brtapsauce": "~0.2.2"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-util/node_modules/through2/through2.js
deleted file mode 100644
index d3610aa52..000000000
--- a/node_modules/gulp-util/node_modules/through2/through2.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var Transform = require('readable-stream/transform')
- , inherits = require('util').inherits
- , xtend = require('xtend')
-
-
-// a noop _transform function
-function noop (chunk, enc, callback) {
- callback(null, chunk)
-}
-
-
-// create a new export function, used by both the main export and
-// the .ctor export, contains common logic for dealing with arguments
-function through2 (construct) {
- return function (options, transform, flush) {
- if (typeof options == 'function') {
- flush = transform
- transform = options
- options = {}
- }
-
- if (typeof transform != 'function')
- transform = noop
-
- if (typeof flush != 'function')
- flush = null
-
- return construct(options, transform, flush)
- }
-}
-
-
-// main export, just make me a transform stream!
-module.exports = through2(function (options, transform, flush) {
- var t2 = new Transform(options)
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
-
-
-// make me a reusable prototype that I can `new`, or implicitly `new`
-// with a constructor call
-module.exports.ctor = through2(function (options, transform, flush) {
- function Through2 (override) {
- if (!(this instanceof Through2))
- return new Through2(override)
-
- this.options = xtend(options, override)
-
- Transform.call(this, this.options)
- }
-
- inherits(Through2, Transform)
-
- Through2.prototype._transform = transform
-
- if (flush)
- Through2.prototype._flush = flush
-
- return Through2
-})
-
-
-module.exports.obj = through2(function (options, transform, flush) {
- var t2 = new Transform(xtend({ objectMode: true, highWaterMark: 16 }, options))
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
diff --git a/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-util/node_modules/vinyl/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-util/node_modules/vinyl/.travis.yml
deleted file mode 100644
index 33ad9f8c8..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-util/node_modules/vinyl/LICENSE
index 4f482f9ba..4f482f9ba 100755..100644
--- a/node_modules/gulp-util/node_modules/vinyl/LICENSE
+++ b/node_modules/gulp-util/node_modules/vinyl/LICENSE
diff --git a/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-util/node_modules/vinyl/README.md
index 3f97efc56..2d57d8566 100644
--- a/node_modules/gulp-util/node_modules/vinyl/README.md
+++ b/node_modules/gulp-util/node_modules/vinyl/README.md
@@ -1,21 +1,9 @@
# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-
-
## Information
+<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-<table>
-<tr>
-<td>Package</td><td>vinyl</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>A virtual file format</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.9</td>
-</tr>
-</table>
+## What is this?
+Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
## File
@@ -25,80 +13,101 @@ var File = require('vinyl');
var coffeeFile = new File({
cwd: "/",
base: "/test/",
- path: "/test/file.coffee"
+ path: "/test/file.coffee",
contents: new Buffer("test = 123")
});
```
-### constructor(options)
+### isVinyl
+When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-#### options.cwd
+```js
+var File = require('vinyl');
-Type: `String`
-Default: `process.cwd()`
+var dummy = new File({stuff});
+var notAFile = {};
-#### options.base
+File.isVinyl(dummy); // true
+File.isVinyl(notAFile); // false
+```
+
+### constructor(options)
+#### options.cwd
+Type: `String`<br><br>Default: `process.cwd()`
+#### options.base
Used for relative pathing. Typically where a glob starts.
-Type: `String`
-Default: `options.cwd`
+Type: `String`<br><br>Default: `options.cwd`
#### options.path
-
Full path to the file.
-Type: `String`
-Default: `null`
+Type: `String`<br><br>Default: `undefined`
-#### options.stat
+#### options.history
+Path history. Has no effect if `options.path` is passed.
+Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
+
+#### options.stat
The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-Type: `fs.Stats`
-Default: `null`
+Type: `fs.Stats`<br><br>Default: `null`
#### options.contents
-
File contents.
-Type: `Buffer, Stream, or null`
-Default: `null`
+Type: `Buffer, Stream, or null`<br><br>Default: `null`
### isBuffer()
-
Returns true if file.contents is a Buffer.
### isStream()
-
Returns true if file.contents is a Stream.
### isNull()
-
Returns true if file.contents is null.
-### clone()
+### clone([opt])
+Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-Returns a new File object with all attributes cloned.
+If opt or opt.deep is false, custom attributes will not be deep-cloned.
-### pipe(stream[, opt])
+If opt.contents is false, it will copy file.contents Buffer's reference.
+### pipe(stream[, opt])
If file.contents is a Buffer, it will write it to the stream.
If file.contents is a Stream, it will pipe it to the stream.
If file.contents is null, it will do nothing.
-If opt.end is true, the destination stream will not be ended (same as node core).
+If opt.end is false, the destination stream will not be ended (same as node core).
Returns the stream.
### inspect()
-
Returns a pretty String interpretation of the File. Useful for console.log.
-### relative
+### contents
+The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
+
+For example:
+
+```js
+if (file.isBuffer()) {
+ console.log(file.contents.toString()); // logs out the string of contents
+}
+```
+### path
+Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
+
+### history
+Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
+
+### relative
Returns path.relative for the file base and file path.
Example:
@@ -113,6 +122,69 @@ var file = new File({
console.log(file.relative); // file.coffee
```
+### dirname
+Gets and sets path.dirname for the file path.
+
+Example:
+
+```javascript
+var file = new File({
+ cwd: "/",
+ base: "/test/",
+ path: "/test/file.coffee"
+});
+
+console.log(file.dirname); // /test
+
+file.dirname = '/specs';
+
+console.log(file.dirname); // /specs
+console.log(file.path); // /specs/file.coffee
+`
+```
+
+### basename
+Gets and sets path.basename for the file path.
+
+Example:
+
+```javascript
+var file = new File({
+ cwd: "/",
+ base: "/test/",
+ path: "/test/file.coffee"
+});
+
+console.log(file.basename); // file.coffee
+
+file.basename = 'file.js';
+
+console.log(file.basename); // file.js
+console.log(file.path); // /test/file.js
+`
+```
+
+### extname
+Gets and sets path.extname for the file path.
+
+Example:
+
+```javascript
+var file = new File({
+ cwd: "/",
+ base: "/test/",
+ path: "/test/file.coffee"
+});
+
+console.log(file.extname); // .coffee
+
+file.extname = '.js';
+
+console.log(file.extname); // .js
+console.log(file.path); // /test/file.js
+`
+```
+
[npm-url]: https://npmjs.org/package/vinyl
[npm-image]: https://badge.fury.io/js/vinyl.png
[travis-url]: https://travis-ci.org/wearefractal/vinyl
@@ -120,4 +192,4 @@ console.log(file.relative); // file.coffee
[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png \ No newline at end of file
+[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-util/node_modules/vinyl/index.js
index 97f5c7529..c8f113ffe 100644
--- a/node_modules/gulp-util/node_modules/vinyl/index.js
+++ b/node_modules/gulp-util/node_modules/vinyl/index.js
@@ -1,28 +1,31 @@
var path = require('path');
-
+var clone = require('clone');
var cloneStats = require('clone-stats');
-
+var cloneBuffer = require('./lib/cloneBuffer');
var isBuffer = require('./lib/isBuffer');
var isStream = require('./lib/isStream');
var isNull = require('./lib/isNull');
var inspectStream = require('./lib/inspectStream');
-var cloneBuffer = require('./lib/cloneBuffer');
+var Stream = require('stream');
+var replaceExt = require('replace-ext');
function File(file) {
if (!file) file = {};
- // TODO: should this be moved to vinyl-fs?
+ // record path change
+ var history = file.path ? [file.path] : file.history;
+ this.history = history || [];
+
this.cwd = file.cwd || process.cwd();
this.base = file.base || this.cwd;
- this.path = file.path || null;
-
- // stat = fs stats object
- // TODO: should this be moved to vinyl-fs?
+ // stat = files stats object
this.stat = file.stat || null;
// contents = stream, buffer, or null if not read
this.contents = file.contents || null;
+
+ this._isVinyl = true;
}
File.prototype.isBuffer = function() {
@@ -42,17 +45,50 @@ File.prototype.isDirectory = function() {
return this.isNull() && this.stat && this.stat.isDirectory();
};
-File.prototype.clone = function() {
- var clonedContents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents;
- var clonedStat = this.stat ? cloneStats(this.stat) : null;
+File.prototype.clone = function(opt) {
+ if (typeof opt === 'boolean') {
+ opt = {
+ deep: opt,
+ contents: true
+ };
+ } else if (!opt) {
+ opt = {
+ deep: true,
+ contents: true
+ };
+ } else {
+ opt.deep = opt.deep === true;
+ opt.contents = opt.contents !== false;
+ }
+
+ // clone our file contents
+ var contents;
+ if (this.isStream()) {
+ contents = this.contents.pipe(new Stream.PassThrough());
+ this.contents = this.contents.pipe(new Stream.PassThrough());
+ } else if (this.isBuffer()) {
+ contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
+ }
- return new File({
+ var file = new File({
cwd: this.cwd,
base: this.base,
- path: this.path,
- stat: clonedStat,
- contents: clonedContents
+ stat: (this.stat ? cloneStats(this.stat) : null),
+ history: this.history.slice(),
+ contents: contents
});
+
+ // clone our custom properties
+ Object.keys(this).forEach(function(key) {
+ // ignore built-in fields
+ if (key === '_contents' || key === 'stat' ||
+ key === 'history' || key === 'path' ||
+ key === 'base' || key === 'cwd') {
+ return;
+ }
+ file[key] = opt.deep ? clone(this[key], true) : this[key];
+ }, this);
+ return file;
};
File.prototype.pipe = function(stream, opt) {
@@ -70,11 +106,9 @@ File.prototype.pipe = function(stream, opt) {
}
return stream;
}
- if (this.isNull()) {
- if (opt.end) stream.end();
- return stream;
- }
+ // isNull
+ if (opt.end) stream.end();
return stream;
};
@@ -99,6 +133,10 @@ File.prototype.inspect = function() {
return '<File '+inspect.join(' ')+'>';
};
+File.isVinyl = function(file) {
+ return file && file._isVinyl === true;
+};
+
// virtual attributes
// or stuff with extra logic
Object.defineProperty(File.prototype, 'contents', {
@@ -107,7 +145,7 @@ Object.defineProperty(File.prototype, 'contents', {
},
set: function(val) {
if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error("File.contents can only be a Buffer, a Stream, or null.");
+ throw new Error('File.contents can only be a Buffer, a Stream, or null.');
}
this._contents = val;
}
@@ -125,4 +163,51 @@ Object.defineProperty(File.prototype, 'relative', {
}
});
+Object.defineProperty(File.prototype, 'dirname', {
+ get: function() {
+ if (!this.path) throw new Error('No path specified! Can not get dirname.');
+ return path.dirname(this.path);
+ },
+ set: function(dirname) {
+ if (!this.path) throw new Error('No path specified! Can not set dirname.');
+ this.path = path.join(dirname, path.basename(this.path));
+ }
+});
+
+Object.defineProperty(File.prototype, 'basename', {
+ get: function() {
+ if (!this.path) throw new Error('No path specified! Can not get basename.');
+ return path.basename(this.path);
+ },
+ set: function(basename) {
+ if (!this.path) throw new Error('No path specified! Can not set basename.');
+ this.path = path.join(path.dirname(this.path), basename);
+ }
+});
+
+Object.defineProperty(File.prototype, 'extname', {
+ get: function() {
+ if (!this.path) throw new Error('No path specified! Can not get extname.');
+ return path.extname(this.path);
+ },
+ set: function(extname) {
+ if (!this.path) throw new Error('No path specified! Can not set extname.');
+ this.path = replaceExt(this.path, extname);
+ }
+});
+
+Object.defineProperty(File.prototype, 'path', {
+ get: function() {
+ return this.history[this.history.length - 1];
+ },
+ set: function(path) {
+ if (typeof path !== 'string') throw new Error('path should be string');
+
+ // record history only when path changed
+ if (path && path !== this.path) {
+ this.history.push(path);
+ }
+ }
+});
+
module.exports = File;
diff --git a/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
index 3a861f22f..89f09eda1 100644
--- a/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
+++ b/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
@@ -4,4 +4,4 @@ module.exports = function(buf) {
var out = new Buffer(buf.length);
buf.copy(out);
return out;
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
index 2c9067892..d36df6ff6 100644
--- a/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
+++ b/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
@@ -1,12 +1,11 @@
-var Stream = require('stream').Stream;
var isStream = require('./isStream');
module.exports = function(stream) {
if (!isStream(stream)) return;
-
+
var streamType = stream.constructor.name;
// avoid StreamStream
if (streamType === 'Stream') streamType = '';
return '<'+streamType+'Stream>';
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
index 0e23782c4..8a767d174 100644
--- a/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
+++ b/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
@@ -1,7 +1 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-}; \ No newline at end of file
+module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
index 403bb30e8..7f22c63ae 100644
--- a/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
+++ b/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
@@ -1,3 +1,3 @@
module.exports = function(v) {
return v === null;
-}; \ No newline at end of file
+};
diff --git a/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-util/node_modules/vinyl/package.json
index d851cb138..6000cffb3 100644
--- a/node_modules/gulp-util/node_modules/vinyl/package.json
+++ b/node_modules/gulp-util/node_modules/vinyl/package.json
@@ -1,37 +1,37 @@
{
"name": "vinyl",
"description": "A virtual file format",
- "version": "0.2.3",
+ "version": "0.5.3",
"homepage": "http://github.com/wearefractal/vinyl",
"repository": "git://github.com/wearefractal/vinyl.git",
"author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
"main": "./index.js",
+ "files": [
+ "index.js",
+ "lib"
+ ],
"dependencies": {
- "clone-stats": "~0.0.1"
+ "clone": "^1.0.0",
+ "clone-stats": "^0.0.1",
+ "replace-ext": "0.0.1"
},
"devDependencies": {
- "mocha": "~1.17.0",
- "should": "~2.1.1",
- "mocha-lcov-reporter": "0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1",
- "buffer-equal": "0.0.0",
- "lodash.templatesettings": "~2.4.1",
- "event-stream": "~3.1.0"
+ "buffer-equal": "0.0.1",
+ "event-stream": "^3.1.0",
+ "istanbul": "^0.3.0",
+ "istanbul-coveralls": "^1.0.1",
+ "jshint": "^2.4.1",
+ "lodash.templatesettings": "^3.1.0",
+ "mocha": "^2.0.0",
+ "rimraf": "^2.2.5",
+ "should": "^7.0.0"
},
"scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
+ "test": "mocha && jshint lib",
+ "coveralls": "istanbul cover _mocha && istanbul-coveralls"
},
"engines": {
"node": ">= 0.9"
},
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE"
- }
- ]
+ "license": "MIT"
}
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-util/node_modules/vinyl/test/File.js
deleted file mode 100644
index 1f2a83a0c..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/File.js
+++ /dev/null
@@ -1,540 +0,0 @@
-var File = require('../');
-var Stream = require('stream');
-var fs = require('fs');
-
-var should = require('should');
-require('mocha');
-
-describe('File', function() {
-
- describe('constructor()', function() {
- it('should default cwd to process.cwd', function(done) {
- var file = new File();
- file.cwd.should.equal(process.cwd());
- done();
- });
-
- it('should default base to cwd', function(done) {
- var cwd = "/";
- var file = new File({cwd: cwd});
- file.base.should.equal(cwd);
- done();
- });
-
- it('should default base to cwd even when none is given', function(done) {
- var file = new File();
- file.base.should.equal(process.cwd());
- done();
- });
-
- it('should default path to null', function(done) {
- var file = new File();
- should.not.exist(file.path);
- done();
- });
-
- it('should default stat to null', function(done) {
- var file = new File();
- should.not.exist(file.stat);
- done();
- });
-
- it('should default contents to null', function(done) {
- var file = new File();
- should.not.exist(file.contents);
- done();
- });
-
- it('should set base to given value', function(done) {
- var val = "/";
- var file = new File({base: val});
- file.base.should.equal(val);
- done();
- });
-
- it('should set cwd to given value', function(done) {
- var val = "/";
- var file = new File({cwd: val});
- file.cwd.should.equal(val);
- done();
- });
-
- it('should set path to given value', function(done) {
- var val = "/test.coffee";
- var file = new File({path: val});
- file.path.should.equal(val);
- done();
- });
-
- it('should set stat to given value', function(done) {
- var val = {};
- var file = new File({stat: val});
- file.stat.should.equal(val);
- done();
- });
-
- it('should set contents to given value', function(done) {
- var val = new Buffer("test");
- var file = new File({contents: val});
- file.contents.should.equal(val);
- done();
- });
- });
-
- describe('isBuffer()', function() {
- it('should return true when the contents are a Buffer', function(done) {
- var val = new Buffer("test");
- var file = new File({contents: val});
- file.isBuffer().should.equal(true);
- done();
- });
-
- it('should return false when the contents are a Stream', function(done) {
- var val = new Stream();
- var file = new File({contents: val});
- file.isBuffer().should.equal(false);
- done();
- });
-
- it('should return false when the contents are a null', function(done) {
- var file = new File({contents: null});
- file.isBuffer().should.equal(false);
- done();
- });
- });
-
- describe('isStream()', function() {
- it('should return false when the contents are a Buffer', function(done) {
- var val = new Buffer("test");
- var file = new File({contents: val});
- file.isStream().should.equal(false);
- done();
- });
-
- it('should return true when the contents are a Stream', function(done) {
- var val = new Stream();
- var file = new File({contents: val});
- file.isStream().should.equal(true);
- done();
- });
-
- it('should return false when the contents are a null', function(done) {
- var file = new File({contents: null});
- file.isStream().should.equal(false);
- done();
- });
- });
-
- describe('isNull()', function() {
- it('should return false when the contents are a Buffer', function(done) {
- var val = new Buffer("test");
- var file = new File({contents: val});
- file.isNull().should.equal(false);
- done();
- });
-
- it('should return false when the contents are a Stream', function(done) {
- var val = new Stream();
- var file = new File({contents: val});
- file.isNull().should.equal(false);
- done();
- });
-
- it('should return true when the contents are a null', function(done) {
- var file = new File({contents: null});
- file.isNull().should.equal(true);
- done();
- });
- });
-
- describe('isDirectory()', function() {
- var fakeStat = {
- isDirectory: function() {
- return true;
- }
- };
-
- it('should return false when the contents are a Buffer', function(done) {
- var val = new Buffer("test");
- var file = new File({contents: val, stat: fakeStat});
- file.isDirectory().should.equal(false);
- done();
- });
-
- it('should return false when the contents are a Stream', function(done) {
- var val = new Stream();
- var file = new File({contents: val, stat: fakeStat});
- file.isDirectory().should.equal(false);
- done();
- });
-
- it('should return true when the contents are a null', function(done) {
- var file = new File({contents: null, stat: fakeStat});
- file.isDirectory().should.equal(true);
- done();
- });
- });
-
- describe('clone()', function() {
- it('should copy all attributes over with Buffer', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Buffer("test")
- };
- var file = new File(options);
- var file2 = file.clone();
-
- file2.should.not.equal(file, 'refs should be different');
- file2.cwd.should.equal(file.cwd);
- file2.base.should.equal(file.base);
- file2.path.should.equal(file.path);
- file2.contents.should.not.equal(file.contents, 'buffer ref should be different');
- file2.contents.toString('utf8').should.equal(file.contents.toString('utf8'));
- done();
- });
-
- it('should copy all attributes over with Stream', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Stream()
- };
- var file = new File(options);
- var file2 = file.clone();
-
- file2.should.not.equal(file, 'refs should be different');
- file2.cwd.should.equal(file.cwd);
- file2.base.should.equal(file.base);
- file2.path.should.equal(file.path);
- file2.contents.should.equal(file.contents, 'stream ref should be the same');
- done();
- });
-
- it('should copy all attributes over with null', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: null
- };
- var file = new File(options);
- var file2 = file.clone();
-
- file2.should.not.equal(file, 'refs should be different');
- file2.cwd.should.equal(file.cwd);
- file2.base.should.equal(file.base);
- file2.path.should.equal(file.path);
- should.not.exist(file2.contents);
- done();
- });
-
- it('should properly clone the `stat` property', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.js",
- contents: new Buffer("test"),
- stat: fs.statSync(__filename)
- };
-
- var file = new File(options);
- var copy = file.clone();
-
- copy.stat.isFile().should.be.true;
- copy.stat.isDirectory().should.be.false;
- should(file.stat instanceof fs.Stats).be.true;
- should(copy.stat instanceof fs.Stats).be.true;
-
- done();
- });
- });
-
- describe('pipe()', function() {
- it('should write to stream with Buffer', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Buffer("test")
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- should.exist(chunk);
- (chunk instanceof Buffer).should.equal(true, 'should write as a buffer');
- chunk.toString('utf8').should.equal(options.contents.toString('utf8'));
- });
- stream.on('end', function(chunk) {
- done();
- });
- var ret = file.pipe(stream);
- ret.should.equal(stream, 'should return the stream');
- });
-
- it('should pipe to stream with Stream', function(done) {
- var testChunk = new Buffer("test");
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Stream.PassThrough()
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- should.exist(chunk);
- (chunk instanceof Buffer).should.equal(true, 'should write as a buffer');
- chunk.toString('utf8').should.equal(testChunk.toString('utf8'));
- done();
- });
- var ret = file.pipe(stream);
- ret.should.equal(stream, 'should return the stream');
-
- file.contents.write(testChunk);
- });
-
- it('should do nothing with null', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: null
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- throw new Error("should not write");
- });
- stream.on('end', function() {
- done();
- });
- var ret = file.pipe(stream);
- ret.should.equal(stream, 'should return the stream');
- });
-
- it('should write to stream with Buffer', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Buffer("test")
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- should.exist(chunk);
- (chunk instanceof Buffer).should.equal(true, 'should write as a buffer');
- chunk.toString('utf8').should.equal(options.contents.toString('utf8'));
- done();
- });
- stream.on('end', function(chunk) {
- throw new Error("should not end");
- });
- var ret = file.pipe(stream, {end: false});
- ret.should.equal(stream, 'should return the stream');
- });
-
- it('should pipe to stream with Stream', function(done) {
- var testChunk = new Buffer("test");
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Stream.PassThrough()
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- should.exist(chunk);
- (chunk instanceof Buffer).should.equal(true, 'should write as a buffer');
- chunk.toString('utf8').should.equal(testChunk.toString('utf8'));
- done();
- });
- stream.on('end', function(chunk) {
- throw new Error("should not end");
- });
- var ret = file.pipe(stream, {end: false});
- ret.should.equal(stream, 'should return the stream');
-
- file.contents.write(testChunk);
- });
-
- it('should do nothing with null', function(done) {
- var options = {
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: null
- };
- var file = new File(options);
- var stream = new Stream.PassThrough();
- stream.on('data', function(chunk) {
- throw new Error("should not write");
- });
- stream.on('end', function(chunk) {
- throw new Error("should not end");
- });
- var ret = file.pipe(stream, {end: false});
- ret.should.equal(stream, 'should return the stream');
- process.nextTick(done);
- });
- });
-
- describe('inspect()', function() {
- it('should return correct format when no contents and no path', function(done) {
- var file = new File();
- file.inspect().should.equal('<File >');
- done();
- });
-
- it('should return correct format when Buffer and no path', function(done) {
- var val = new Buffer("test");
- var file = new File({
- contents: val
- });
- file.inspect().should.equal('<File <Buffer 74 65 73 74>>');
- done();
- });
-
- it('should return correct format when Buffer and relative path', function(done) {
- var val = new Buffer("test");
- var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: val
- });
- file.inspect().should.equal('<File "test.coffee" <Buffer 74 65 73 74>>');
- done();
- });
-
- it('should return correct format when Buffer and only path and no base', function(done) {
- var val = new Buffer("test");
- var file = new File({
- cwd: "/",
- path: "/test/test.coffee",
- contents: val
- });
- delete file.base;
- file.inspect().should.equal('<File "/test/test.coffee" <Buffer 74 65 73 74>>');
- done();
- });
-
- it('should return correct format when Stream and relative path', function(done) {
- var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: new Stream.PassThrough()
- });
- file.inspect().should.equal('<File "test.coffee" <PassThroughStream>>');
- done();
- });
-
- it('should return correct format when null and relative path', function(done) {
- var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee",
- contents: null
- });
- file.inspect().should.equal('<File "test.coffee">');
- done();
- });
- });
-
- describe('contents get/set', function() {
- it('should work with Buffer', function(done) {
- var val = new Buffer("test");
- var file = new File();
- file.contents = val;
- file.contents.should.equal(val);
- done();
- });
-
- it('should work with Stream', function(done) {
- var val = new Stream.PassThrough();
- var file = new File();
- file.contents = val;
- file.contents.should.equal(val);
- done();
- });
-
- it('should work with null', function(done) {
- var val = null;
- var file = new File();
- file.contents = val;
- (file.contents === null).should.equal(true);
- done();
- });
-
- it('should not work with string', function(done) {
- var val = "test";
- var file = new File();
- try {
- file.contents = val;
- } catch (err) {
- should.exist(err);
- done();
- }
- });
- });
-
- describe('relative get/set', function() {
- it('should error on set', function(done) {
- var file = new File();
- try {
- file.relative = "test";
- } catch (err) {
- should.exist(err);
- done();
- }
- });
-
- it('should error on get when no base', function(done) {
- var a;
- var file = new File();
- delete file.base;
- try {
- a = file.relative;
- } catch (err) {
- should.exist(err);
- done();
- }
- });
-
- it('should error on get when no path', function(done) {
- var a;
- var file = new File();
- try {
- a = file.relative;
- } catch (err) {
- should.exist(err);
- done();
- }
- });
-
- it('should return a relative path from base', function(done) {
- var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/test.coffee"
- });
- file.relative.should.equal("test.coffee");
- done();
- });
-
- it('should return a relative path from cwd', function(done) {
- var file = new File({
- cwd: "/",
- path: "/test/test.coffee"
- });
- file.relative.should.equal("test/test.coffee");
- done();
- });
- });
-
-});
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js
deleted file mode 100644
index 7d2868141..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var cloneBuffer = require('../lib/cloneBuffer');
-var Stream = require('stream');
-var should = require('should');
-require('mocha');
-
-describe('cloneBuffer()', function() {
- it('should return a new Buffer reference', function(done) {
- var testBuffer = new Buffer('test');
- var testBuffer2 = cloneBuffer(testBuffer);
-
- should.exist(testBuffer2, 'should return something');
- (testBuffer2 instanceof Buffer).should.equal(true, 'should return a Buffer');
- testBuffer2.should.not.equal(testBuffer, 'pointer should change');
- done();
- });
-
- it('should not replicate modifications to the original buffer', function(done) {
- var testBuffer = new Buffer('test');
- var testBuffer2 = cloneBuffer(testBuffer);
-
- // test that changes dont modify both pointers
- testBuffer2.write('w');
-
- testBuffer.toString('utf8').should.equal('test', 'original should stay the same');
- testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified');
- done();
- });
-}); \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js
deleted file mode 100644
index fe1802c5d..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var inspectStream = require('../lib/inspectStream');
-var Stream = require('stream');
-var should = require('should');
-require('mocha');
-
-describe('inspectStream()', function() {
- it('should work on a core Stream', function(done) {
- var testStream = new Stream();
- inspectStream(testStream).should.equal('<Stream>');
- done();
- });
-
- it('should work on a core Readable Stream', function(done) {
- var testStream = new Stream.Readable();
- inspectStream(testStream).should.equal('<ReadableStream>');
- done();
- });
-
- it('should work on a core Writable Stream', function(done) {
- var testStream = new Stream.Writable();
- inspectStream(testStream).should.equal('<WritableStream>');
- done();
- });
-
- it('should work on a core Duplex Stream', function(done) {
- var testStream = new Stream.Duplex();
- inspectStream(testStream).should.equal('<DuplexStream>');
- done();
- });
-
- it('should work on a core Transform Stream', function(done) {
- var testStream = new Stream.Transform();
- inspectStream(testStream).should.equal('<TransformStream>');
- done();
- });
-
- it('should work on a core PassThrough Stream', function(done) {
- var testStream = new Stream.PassThrough();
- inspectStream(testStream).should.equal('<PassThroughStream>');
- done();
- });
-
- it('should not work on a Buffer', function(done) {
- var testBuffer = new Buffer('test');
- should.not.exist(inspectStream(testBuffer));
- done();
- });
-
- it('should not work on a null', function(done) {
- should.not.exist(inspectStream(null));
- done();
- });
-}); \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js
deleted file mode 100644
index 5bb1cb91d..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var isBuffer = require('../lib/isBuffer');
-var Stream = require('stream');
-var should = require('should');
-require('mocha');
-
-describe('isBuffer()', function() {
- it('should return true on a Buffer', function(done) {
- var testBuffer = new Buffer('test');
- isBuffer(testBuffer).should.equal(true);
- done();
- });
-
- it('should return false on a Stream', function(done) {
- var testStream = new Stream();
- isBuffer(testStream).should.equal(false);
- done();
- });
-
- it('should return false on a null', function(done) {
- isBuffer(null).should.equal(false);
- done();
- });
-
- it('should return false on a array of numbers', function(done) {
- var testArray = [1, 2, 3];
- isBuffer(testArray).should.equal(false);
- done();
- });
-}); \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-util/node_modules/vinyl/test/isNull.js
deleted file mode 100644
index db70c0135..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/isNull.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var isNull = require('../lib/isNull');
-var Stream = require('stream');
-var should = require('should');
-require('mocha');
-
-describe('isNull()', function() {
- it('should return true on null', function(done) {
- isNull(null).should.equal(true);
- done();
- });
-
- it('should return false on undefined', function(done) {
- isNull().should.equal(false);
- isNull(undefined).should.equal(false);
- done();
- });
-
- it('should return false on defined values', function(done) {
- isNull(1).should.equal(false);
- isNull("test").should.equal(false);
- done();
- });
-}); \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-util/node_modules/vinyl/test/isStream.js
deleted file mode 100644
index f22584c51..000000000
--- a/node_modules/gulp-util/node_modules/vinyl/test/isStream.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var isStream = require('../lib/isStream');
-var Stream = require('stream');
-var should = require('should');
-require('mocha');
-
-describe('isStream()', function() {
- it('should return true on a Stream', function(done) {
- var testStream = new Stream();
- isStream(testStream).should.equal(true);
- done();
- });
-
- it('should return false on a Buffer', function(done) {
- var testBuffer = new Buffer('test');
- isStream(testBuffer).should.equal(false);
- done();
- });
-
- it('should return false on a null', function(done) {
- isStream(null).should.equal(false);
- done();
- });
-
- it('should return false on a array of numbers', function(done) {
- var testArray = [1, 2, 3];
- isStream(testArray).should.equal(false);
- done();
- });
-}); \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/xtend/.jshintrc b/node_modules/gulp-util/node_modules/xtend/.jshintrc
deleted file mode 100644
index 77887b5f0..000000000
--- a/node_modules/gulp-util/node_modules/xtend/.jshintrc
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "maxdepth": 4,
- "maxstatements": 200,
- "maxcomplexity": 12,
- "maxlen": 80,
- "maxparams": 5,
-
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "latedef": false,
- "noarg": true,
- "noempty": true,
- "nonew": true,
- "undef": true,
- "unused": "vars",
- "trailing": true,
-
- "quotmark": true,
- "expr": true,
- "asi": true,
-
- "browser": false,
- "esnext": true,
- "devel": false,
- "node": false,
- "nonstandard": false,
-
- "predef": ["require", "module", "__dirname", "__filename"]
-}
diff --git a/node_modules/gulp-util/node_modules/xtend/.npmignore b/node_modules/gulp-util/node_modules/xtend/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/gulp-util/node_modules/xtend/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/gulp-util/node_modules/xtend/LICENCE b/node_modules/gulp-util/node_modules/xtend/LICENCE
deleted file mode 100644
index 1a14b437e..000000000
--- a/node_modules/gulp-util/node_modules/xtend/LICENCE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012-2014 Raynos.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-util/node_modules/xtend/Makefile b/node_modules/gulp-util/node_modules/xtend/Makefile
deleted file mode 100644
index d583fcf49..000000000
--- a/node_modules/gulp-util/node_modules/xtend/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-browser:
- node ./support/compile
-
-.PHONY: browser \ No newline at end of file
diff --git a/node_modules/gulp-util/node_modules/xtend/README.md b/node_modules/gulp-util/node_modules/xtend/README.md
deleted file mode 100644
index e75483189..000000000
--- a/node_modules/gulp-util/node_modules/xtend/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# xtend
-
-[![browser support][3]][4]
-
-Extend like a boss
-
-xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.
-
-## Examples
-
-```js
-var extend = require("xtend")
-
-// extend returns a new object. Does not mutate arguments
-var combination = extend({
- a: "a"
-}, {
- b: "b"
-})
-// { a: "a", b: "b" }
-```
-
-
-## MIT Licenced
-
-
- [3]: http://ci.testling.com/Raynos/xtend.png
- [4]: http://ci.testling.com/Raynos/xtend
diff --git a/node_modules/gulp-util/node_modules/xtend/index.js b/node_modules/gulp-util/node_modules/xtend/index.js
deleted file mode 100644
index 5b760152b..000000000
--- a/node_modules/gulp-util/node_modules/xtend/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-module.exports = extend
-
-function extend() {
- var target = {}
-
- for (var i = 0; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (source.hasOwnProperty(key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/node_modules/gulp-util/node_modules/xtend/mutable.js b/node_modules/gulp-util/node_modules/xtend/mutable.js
deleted file mode 100644
index a34475ebd..000000000
--- a/node_modules/gulp-util/node_modules/xtend/mutable.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = extend
-
-function extend(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (source.hasOwnProperty(key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/node_modules/gulp-util/node_modules/xtend/package.json b/node_modules/gulp-util/node_modules/xtend/package.json
deleted file mode 100644
index 774bba0d2..000000000
--- a/node_modules/gulp-util/node_modules/xtend/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "xtend",
- "version": "3.0.0",
- "description": "extend like a boss",
- "keywords": [
- "extend",
- "merge",
- "options",
- "opts",
- "object",
- "array"
- ],
- "author": "Raynos <raynos2@gmail.com>",
- "repository": "git://github.com/Raynos/xtend.git",
- "main": "index",
- "scripts": {
- "test": "node test"
- },
- "dependencies": {},
- "devDependencies": {
- "tape": "~1.1.0"
- },
- "homepage": "https://github.com/Raynos/xtend",
- "contributors": [
- {
- "name": "Jake Verbaten"
- },
- {
- "name": "Matt Esch"
- }
- ],
- "bugs": {
- "url": "https://github.com/Raynos/xtend/issues",
- "email": "raynos2@gmail.com"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/raynos/xtend/raw/master/LICENSE"
- }
- ],
- "testling": {
- "files": "test.js",
- "browsers": [
- "ie/7..latest",
- "firefox/16..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest"
- ]
- },
- "engines": {
- "node": ">=0.4"
- }
-}
diff --git a/node_modules/gulp-util/node_modules/xtend/test.js b/node_modules/gulp-util/node_modules/xtend/test.js
deleted file mode 100644
index 3369d7966..000000000
--- a/node_modules/gulp-util/node_modules/xtend/test.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var test = require("tape")
-var extend = require("./")
-var mutableExtend = require("./mutable")
-
-test("merge", function(assert) {
- var a = { a: "foo" }
- var b = { b: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
- assert.end()
-})
-
-test("replace", function(assert) {
- var a = { a: "foo" }
- var b = { a: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "bar" })
- assert.end()
-})
-
-test("undefined", function(assert) {
- var a = { a: undefined }
- var b = { b: "foo" }
-
- assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
- assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
- assert.end()
-})
-
-test("handle 0", function(assert) {
- var a = { a: "default" }
- var b = { a: 0 }
-
- assert.deepEqual(extend(a, b), { a: 0 })
- assert.deepEqual(extend(b, a), { a: "default" })
- assert.end()
-})
-
-test("is immutable", function (assert) {
- var record = {}
-
- extend(record, { foo: "bar" })
- assert.equal(record.foo, undefined)
- assert.end()
-})
-
-test("null as argument", function (assert) {
- var a = { foo: "bar" }
- var b = null
- var c = void 0
-
- assert.deepEqual(extend(b, a, c), { foo: "bar" })
- assert.end()
-})
-
-test("mutable", function (assert) {
- var a = { foo: "bar" }
-
- mutableExtend(a, { bar: "baz" })
-
- assert.equal(a.bar, "baz")
- assert.end()
-})
diff --git a/node_modules/gulp-util/package.json b/node_modules/gulp-util/package.json
index f4bd92d5e..4e749b4f3 100644
--- a/node_modules/gulp-util/package.json
+++ b/node_modules/gulp-util/package.json
@@ -1,44 +1,51 @@
{
"name": "gulp-util",
"description": "Utility functions for gulp plugins",
- "version": "2.2.20",
- "homepage": "http://github.com/wearefractal/gulp-util",
- "repository": "git://github.com/wearefractal/gulp-util.git",
+ "version": "3.0.8",
+ "repository": "gulpjs/gulp-util",
"author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
+ "files": [
+ "index.js",
+ "lib"
+ ],
"dependencies": {
- "chalk": "^0.5.0",
- "dateformat": "^1.0.7-1.2.3",
- "lodash._reinterpolate": "^2.4.1",
- "lodash.template": "^2.4.1",
- "minimist": "^0.2.0",
- "multipipe": "^0.1.0",
- "through2": "^0.5.0",
- "vinyl": "^0.2.1"
+ "array-differ": "^1.0.0",
+ "array-uniq": "^1.0.2",
+ "beeper": "^1.0.0",
+ "chalk": "^1.0.0",
+ "dateformat": "^2.0.0",
+ "fancy-log": "^1.1.0",
+ "gulplog": "^1.0.0",
+ "has-gulplog": "^0.1.0",
+ "lodash._reescape": "^3.0.0",
+ "lodash._reevaluate": "^3.0.0",
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.template": "^3.0.0",
+ "minimist": "^1.1.0",
+ "multipipe": "^0.1.2",
+ "object-assign": "^3.0.0",
+ "replace-ext": "0.0.1",
+ "through2": "^2.0.0",
+ "vinyl": "^0.5.0"
},
"devDependencies": {
- "mocha": "^1.17.0",
- "should": "^4.0.0",
- "mocha-lcov-reporter": "^0.0.1",
- "coveralls": "^2.7.0",
- "istanbul": "^0.2.3",
- "rimraf": "^2.2.5",
- "jshint": "^2.4.1",
- "buffer-equal": "~0.0.1",
- "lodash.templatesettings": "^2.4.1",
- "event-stream": "^3.1.0"
+ "buffer-equal": "^0.0.1",
+ "coveralls": "^2.11.2",
+ "event-stream": "^3.1.7",
+ "istanbul": "^0.3.5",
+ "istanbul-coveralls": "^1.0.1",
+ "jshint": "^2.5.11",
+ "lodash.templatesettings": "^3.0.0",
+ "mocha": "^2.0.1",
+ "rimraf": "^2.2.8",
+ "should": "^7.0.1"
},
"scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
+ "test": "jshint *.js lib/*.js test/*.js && mocha",
+ "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
},
"engines": {
- "node": ">= 0.9"
+ "node": ">=0.10"
},
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE"
- }
- ]
+ "license": "MIT"
}
diff --git a/node_modules/gulp-zip/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-zip/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp-zip/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/clone-stats/README.md b/node_modules/gulp-zip/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp-zip/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp-zip/node_modules/clone-stats/index.js b/node_modules/gulp-zip/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp-zip/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp-zip/node_modules/clone-stats/package.json b/node_modules/gulp-zip/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp-zip/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp-zip/node_modules/clone-stats/test.js b/node_modules/gulp-zip/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp-zip/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/LICENSE b/node_modules/gulp-zip/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/README.md b/node_modules/gulp-zip/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/index.js b/node_modules/gulp-zip/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/env.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/log.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/lib/template.js b/node_modules/gulp-zip/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-zip/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/gulp-util/package.json b/node_modules/gulp-zip/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp-zip/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-zip/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-zip/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-zip/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-zip/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp-zip/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp-zip/node_modules/lodash.template/LICENSE b/node_modules/gulp-zip/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp-zip/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/lodash.template/README.md b/node_modules/gulp-zip/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp-zip/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp-zip/node_modules/lodash.template/index.js b/node_modules/gulp-zip/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp-zip/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp-zip/node_modules/lodash.template/package.json b/node_modules/gulp-zip/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp-zip/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp-zip/node_modules/object-assign/index.js b/node_modules/gulp-zip/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp-zip/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp-zip/node_modules/object-assign/license b/node_modules/gulp-zip/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp-zip/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/object-assign/package.json b/node_modules/gulp-zip/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp-zip/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp-zip/node_modules/object-assign/readme.md b/node_modules/gulp-zip/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp-zip/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/.npmignore b/node_modules/gulp-zip/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/.travis.yml b/node_modules/gulp-zip/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/LICENSE b/node_modules/gulp-zip/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/README.md b/node_modules/gulp-zip/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/index.js b/node_modules/gulp-zip/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/package.json b/node_modules/gulp-zip/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp-zip/node_modules/replace-ext/test/main.js b/node_modules/gulp-zip/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp-zip/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/gulp-zip/node_modules/vinyl/LICENSE b/node_modules/gulp-zip/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp-zip/node_modules/vinyl/README.md b/node_modules/gulp-zip/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp-zip/node_modules/vinyl/index.js b/node_modules/gulp-zip/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp-zip/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-zip/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp-zip/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-zip/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp-zip/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-zip/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp-zip/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-zip/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp-zip/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-zip/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp-zip/node_modules/vinyl/package.json b/node_modules/gulp-zip/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp-zip/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp/node_modules/.bin/semver b/node_modules/gulp/node_modules/.bin/semver
index b3ca6032f..317eb293d 120000
--- a/node_modules/gulp/node_modules/.bin/semver
+++ b/node_modules/gulp/node_modules/.bin/semver
@@ -1 +1 @@
-../../../semver/bin/semver \ No newline at end of file
+../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/clone-stats/LICENSE.md b/node_modules/gulp/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/gulp/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/clone-stats/README.md b/node_modules/gulp/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/gulp/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/gulp/node_modules/clone-stats/index.js b/node_modules/gulp/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/gulp/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/gulp/node_modules/clone-stats/package.json b/node_modules/gulp/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/gulp/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/gulp/node_modules/clone-stats/test.js b/node_modules/gulp/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/gulp/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/LICENSE b/node_modules/gulp/node_modules/gulp-util/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp/node_modules/gulp-util/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/gulp-util/README.md b/node_modules/gulp/node_modules/gulp-util/README.md
deleted file mode 100644
index 8c25a4d62..000000000
--- a/node_modules/gulp/node_modules/gulp-util/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>gulp-util</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Utility functions for gulp plugins</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.10</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var gutil = require('gulp-util');
-
-gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123'));
-gutil.beep();
-
-gutil.replaceExtension('file.coffee', '.js'); // file.js
-
-var opt = {
- name: 'todd',
- file: someGulpFile
-};
-gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
-```
-
-### log(msg...)
-
-Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
-
-The default gulp coloring using gutil.colors.<color>:
-```
-values (files, module names, etc.) = cyan
-numbers (times, counts, etc) = magenta
-```
-
-### colors
-
-Is an instance of [chalk](https://github.com/sindresorhus/chalk).
-
-### replaceExtension(path, newExtension)
-
-Replaces a file extension in a path. Returns the new path.
-
-### isStream(obj)
-
-Returns true or false if an object is a stream.
-
-### isBuffer(obj)
-
-Returns true or false if an object is a Buffer.
-
-### template(string[, data])
-
-This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.
-
-## new File(obj)
-
-This is just [vinyl](https://github.com/wearefractal/vinyl)
-
-```javascript
-var file = new gutil.File({
- base: path.join(__dirname, './fixtures/'),
- cwd: __dirname,
- path: path.join(__dirname, './fixtures/test.coffee')
-});
-```
-
-## noop()
-
-Returns a stream that does nothing but pass data straight through.
-
-```javascript
-// gulp should be called like this :
-// $ gulp --type production
-gulp.task('scripts', function() {
- gulp.src('src/**/*.js')
- .pipe(concat('script.js'))
- .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
- .pipe(gulp.dest('dist/'));
-});
-```
-
-## buffer(cb)
-
-This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
-
-Returns a stream that can be piped to.
-
-The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
-
-Callback is optional and receives two arguments: error and data
-
-```javascript
-gulp.src('stuff/*.js')
- .pipe(gutil.buffer(function(err, files) {
-
- }));
-```
-
-## new PluginError(pluginName, message[, options])
-
-- pluginName should be the module name of your plugin
-- message can be a string or an existing error
-- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
-- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
-- Note that if you pass in a custom stack string you need to include the message along with that.
-- Error properties will be included in `err.toString()`. Can be omitted by including `{showProperties: false}` in the options.
-
-These are all acceptable forms of instantiation:
-
-```javascript
-var err = new gutil.PluginError('test', {
- message: 'something broke'
-});
-
-var err = new gutil.PluginError({
- plugin: 'test',
- message: 'something broke'
-});
-
-var err = new gutil.PluginError('test', 'something broke');
-
-var err = new gutil.PluginError('test', 'something broke', {showStack: true});
-
-var existingError = new Error('OMG');
-var err = new gutil.PluginError('test', existingError, {showStack: true});
-```
-
-[npm-url]: https://www.npmjs.com/package/gulp-util
-[npm-image]: https://badge.fury.io/js/gulp-util.svg
-[travis-url]: https://travis-ci.org/gulpjs/gulp-util
-[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master
-[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util
-[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg
-[depstat-url]: https://david-dm.org/gulpjs/gulp-util
-[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg
diff --git a/node_modules/gulp/node_modules/gulp-util/index.js b/node_modules/gulp/node_modules/gulp-util/index.js
deleted file mode 100644
index 199713c94..000000000
--- a/node_modules/gulp/node_modules/gulp-util/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- File: require('vinyl'),
- replaceExtension: require('replace-ext'),
- colors: require('chalk'),
- date: require('dateformat'),
- log: require('./lib/log'),
- template: require('./lib/template'),
- env: require('./lib/env'),
- beep: require('beeper'),
- noop: require('./lib/noop'),
- isStream: require('./lib/isStream'),
- isBuffer: require('./lib/isBuffer'),
- isNull: require('./lib/isNull'),
- linefeed: '\n',
- combine: require('./lib/combine'),
- buffer: require('./lib/buffer'),
- PluginError: require('./lib/PluginError')
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js
deleted file mode 100644
index d60159ab1..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/PluginError.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var util = require('util');
-var arrayDiffer = require('array-differ');
-var arrayUniq = require('array-uniq');
-var chalk = require('chalk');
-var objectAssign = require('object-assign');
-
-var nonEnumberableProperties = ['name', 'message', 'stack'];
-var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']);
-
-// wow what a clusterfuck
-var parseOptions = function(plugin, message, opt) {
- opt = opt || {};
- if (typeof plugin === 'object') {
- opt = plugin;
- } else {
- if (message instanceof Error) {
- opt.error = message;
- } else if (typeof message === 'object') {
- opt = message;
- } else {
- opt.message = message;
- }
- opt.plugin = plugin;
- }
-
- return objectAssign({
- showStack: false,
- showProperties: true
- }, opt);
-};
-
-function PluginError(plugin, message, opt) {
- if (!(this instanceof PluginError)) throw new Error('Call PluginError using new');
-
- Error.call(this);
-
- var options = parseOptions(plugin, message, opt);
- var self = this;
-
- // if options has an error, grab details from it
- if (options.error) {
- // These properties are not enumerable, so we have to add them explicitly.
- arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties))
- .forEach(function(prop) {
- self[prop] = options.error[prop];
- });
- }
-
- var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin'];
-
- // options object can override
- properties.forEach(function(prop) {
- if (prop in options) this[prop] = options[prop];
- }, this);
-
- // defaults
- if (!this.name) this.name = 'Error';
-
- if (!this.stack) {
- // Error.captureStackTrace appends a stack property which relies on the toString method of the object it is applied to.
- // Since we are using our own toString method which controls when to display the stack trace if we don't go through this
- // safety object, then we'll get stack overflow problems.
- var safety = {
- toString: function() {
- return this._messageWithDetails() + '\nStack:';
- }.bind(this)
- };
- Error.captureStackTrace(safety, arguments.callee || this.constructor);
- this.__safety = safety;
- }
-
- if (!this.plugin) throw new Error('Missing plugin name');
- if (!this.message) throw new Error('Missing error message');
-}
-
-util.inherits(PluginError, Error);
-
-PluginError.prototype._messageWithDetails = function() {
- var messageWithDetails = 'Message:\n ' + this.message;
- var details = this._messageDetails();
-
- if (details !== '') {
- messageWithDetails += '\n' + details;
- }
-
- return messageWithDetails;
-};
-
-PluginError.prototype._messageDetails = function() {
- if (!this.showProperties) {
- return '';
- }
-
- var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay);
-
- if (properties.length === 0) {
- return '';
- }
-
- var self = this;
- properties = properties.map(function stringifyProperty(prop) {
- return ' ' + prop + ': ' + self[prop];
- });
-
- return 'Details:\n' + properties.join('\n');
-};
-
-PluginError.prototype.toString = function () {
- var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\'';
- var detailsWithStack = function(stack) {
- return this._messageWithDetails() + '\nStack:\n' + stack;
- }.bind(this);
-
- var msg;
- if (this.showStack) {
- if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor
- msg = this.__safety.stack;
- } else if (this._stack) {
- msg = detailsWithStack(this._stack);
- } else { // Stack from wrapped error
- msg = detailsWithStack(this.stack);
- }
- } else {
- msg = this._messageWithDetails();
- }
-
- return sig + '\n' + msg;
-};
-
-module.exports = PluginError;
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp/node_modules/gulp-util/lib/buffer.js
deleted file mode 100644
index 26c940db1..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/buffer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var through = require('through2');
-
-module.exports = function(fn) {
- var buf = [];
- var end = function(cb) {
- this.push(buf);
- cb();
- if(fn) fn(null, buf);
- };
- var push = function(data, enc, cb) {
- buf.push(data);
- cb();
- };
- return through.obj(push, end);
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/combine.js b/node_modules/gulp/node_modules/gulp-util/lib/combine.js
deleted file mode 100644
index f20712d20..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/combine.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var pipeline = require('multipipe');
-
-module.exports = function(){
- var args = arguments;
- if (args.length === 1 && Array.isArray(args[0])) {
- args = args[0];
- }
- return function(){
- return pipeline.apply(pipeline, args);
- };
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/env.js b/node_modules/gulp/node_modules/gulp-util/lib/env.js
deleted file mode 100644
index ee17c0e30..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/env.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var parseArgs = require('minimist');
-var argv = parseArgs(process.argv.slice(2));
-
-module.exports = argv;
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp/node_modules/gulp-util/lib/isBuffer.js
deleted file mode 100644
index 7c52f78c9..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/isBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var buf = require('buffer');
-var Buffer = buf.Buffer;
-
-// could use Buffer.isBuffer but this is the same exact thing...
-module.exports = function(o) {
- return typeof o === 'object' && o instanceof Buffer;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp/node_modules/gulp-util/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp/node_modules/gulp-util/lib/isStream.js
deleted file mode 100644
index 6b54e123b..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/log.js b/node_modules/gulp/node_modules/gulp-util/lib/log.js
deleted file mode 100644
index bb843beef..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/log.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var hasGulplog = require('has-gulplog');
-
-module.exports = function(){
- if(hasGulplog()){
- // specifically deferring loading here to keep from registering it globally
- var gulplog = require('gulplog');
- gulplog.info.apply(gulplog, arguments);
- } else {
- // specifically defering loading because it might not be used
- var fancylog = require('fancy-log');
- fancylog.apply(null, arguments);
- }
- return this;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/noop.js b/node_modules/gulp/node_modules/gulp-util/lib/noop.js
deleted file mode 100644
index 7862cb161..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var through = require('through2');
-
-module.exports = function () {
- return through.obj();
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/lib/template.js b/node_modules/gulp/node_modules/gulp-util/lib/template.js
deleted file mode 100644
index eef3bb376..000000000
--- a/node_modules/gulp/node_modules/gulp-util/lib/template.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
-var reInterpolate = require('lodash._reinterpolate');
-
-var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
- interpolate: reInterpolate
-};
-
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
-
- var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
- return fn(o);
- };
-
- return (data ? wrapped(data) : wrapped);
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp/node_modules/gulp-util/node_modules/.bin/dateformat
deleted file mode 120000
index 2a6f7e6d6..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/.bin/dateformat
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dateformat/bin/cli.js \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.npmignore b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.npmignore
deleted file mode 100644
index c2658d7d1..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.travis.yml b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.travis.yml
deleted file mode 100644
index 20fd86b6a..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - 0.10
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/LICENSE
deleted file mode 100644
index cc3c87bc3..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the “Software”), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/README.md
deleted file mode 100644
index 0b6cecae2..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/README.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# clone
-
-[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone)
-
-[![info badge](https://nodei.co/npm/clone.png?downloads=true&downloadRank=true&stars=true)](http://npm-stat.com/charts.html?package=clone)
-
-offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript.
-
-
-## Installation
-
- npm install clone
-
-(It also works with browserify, ender or standalone.)
-
-
-## Example
-
-~~~ javascript
-var clone = require('clone');
-
-var a, b;
-
-a = { foo: { bar: 'baz' } }; // initial value of a
-
-b = clone(a); // clone a -> b
-a.foo.bar = 'foo'; // change a
-
-console.log(a); // show a
-console.log(b); // show b
-~~~
-
-This will print:
-
-~~~ javascript
-{ foo: { bar: 'foo' } }
-{ foo: { bar: 'baz' } }
-~~~
-
-**clone** masters cloning simple objects (even with custom prototype), arrays,
-Date objects, and RegExp objects. Everything is cloned recursively, so that you
-can clone dates in arrays in objects, for example.
-
-
-## API
-
-`clone(val, circular, depth)`
-
- * `val` -- the value that you want to clone, any type allowed
- * `circular` -- boolean
-
- Call `clone` with `circular` set to `false` if you are certain that `obj`
- contains no circular references. This will give better performance if needed.
- There is no error if `undefined` or `null` is passed as `obj`.
- * `depth` -- depth to which the object is to be cloned (optional,
- defaults to infinity)
-
-`clone.clonePrototype(obj)`
-
- * `obj` -- the object that you want to clone
-
-Does a prototype clone as
-[described by Oran Looney](http://oranlooney.com/functional-javascript/).
-
-
-## Circular References
-
-~~~ javascript
-var a, b;
-
-a = { hello: 'world' };
-
-a.myself = a;
-b = clone(a);
-
-console.log(b);
-~~~
-
-This will print:
-
-~~~ javascript
-{ hello: "world", myself: [Circular] }
-~~~
-
-So, `b.myself` points to `b`, not `a`. Neat!
-
-
-## Test
-
- npm test
-
-
-## Caveat
-
-Some special objects like a socket or `process.stdout`/`stderr` are known to not
-be cloneable. If you find other objects that cannot be cloned, please [open an
-issue](https://github.com/pvorb/node-clone/issues/new).
-
-
-## Bugs and Issues
-
-If you encounter any bugs or issues, feel free to [open an issue at
-github](https://github.com/pvorb/node-clone/issues) or send me an email to
-<paul@vorba.ch>. I also always like to hear from you, if you’re using my code.
-
-## License
-
-Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and
-[contributors](https://github.com/pvorb/node-clone/graphs/contributors).
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the “Software”), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/clone.js b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/clone.js
deleted file mode 100644
index 626375920..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/clone.js
+++ /dev/null
@@ -1,160 +0,0 @@
-var clone = (function() {
-'use strict';
-
-/**
- * Clones (copies) an Object using deep copying.
- *
- * This function supports circular references by default, but if you are certain
- * there are no circular references in your object, you can save some CPU time
- * by calling clone(obj, false).
- *
- * Caution: if `circular` is false and `parent` contains circular references,
- * your program may enter an infinite loop and crash.
- *
- * @param `parent` - the object to be cloned
- * @param `circular` - set to true if the object to be cloned may contain
- * circular references. (optional - true by default)
- * @param `depth` - set to a number if the object is only to be cloned to
- * a particular depth. (optional - defaults to Infinity)
- * @param `prototype` - sets the prototype to be used when cloning an object.
- * (optional - defaults to parent prototype).
-*/
-function clone(parent, circular, depth, prototype) {
- var filter;
- if (typeof circular === 'object') {
- depth = circular.depth;
- prototype = circular.prototype;
- filter = circular.filter;
- circular = circular.circular
- }
- // maintain two arrays for circular references, where corresponding parents
- // and children have the same index
- var allParents = [];
- var allChildren = [];
-
- var useBuffer = typeof Buffer != 'undefined';
-
- if (typeof circular == 'undefined')
- circular = true;
-
- if (typeof depth == 'undefined')
- depth = Infinity;
-
- // recurse this function so we don't reset allParents and allChildren
- function _clone(parent, depth) {
- // cloning null always returns null
- if (parent === null)
- return null;
-
- if (depth == 0)
- return parent;
-
- var child;
- var proto;
- if (typeof parent != 'object') {
- return parent;
- }
-
- if (clone.__isArray(parent)) {
- child = [];
- } else if (clone.__isRegExp(parent)) {
- child = new RegExp(parent.source, __getRegExpFlags(parent));
- if (parent.lastIndex) child.lastIndex = parent.lastIndex;
- } else if (clone.__isDate(parent)) {
- child = new Date(parent.getTime());
- } else if (useBuffer && Buffer.isBuffer(parent)) {
- child = new Buffer(parent.length);
- parent.copy(child);
- return child;
- } else {
- if (typeof prototype == 'undefined') {
- proto = Object.getPrototypeOf(parent);
- child = Object.create(proto);
- }
- else {
- child = Object.create(prototype);
- proto = prototype;
- }
- }
-
- if (circular) {
- var index = allParents.indexOf(parent);
-
- if (index != -1) {
- return allChildren[index];
- }
- allParents.push(parent);
- allChildren.push(child);
- }
-
- for (var i in parent) {
- var attrs;
- if (proto) {
- attrs = Object.getOwnPropertyDescriptor(proto, i);
- }
-
- if (attrs && attrs.set == null) {
- continue;
- }
- child[i] = _clone(parent[i], depth - 1);
- }
-
- return child;
- }
-
- return _clone(parent, depth);
-}
-
-/**
- * Simple flat clone using prototype, accepts only objects, usefull for property
- * override on FLAT configuration object (no nested props).
- *
- * USE WITH CAUTION! This may not behave as you wish if you do not know how this
- * works.
- */
-clone.clonePrototype = function clonePrototype(parent) {
- if (parent === null)
- return null;
-
- var c = function () {};
- c.prototype = parent;
- return new c();
-};
-
-// private utility functions
-
-function __objToStr(o) {
- return Object.prototype.toString.call(o);
-};
-clone.__objToStr = __objToStr;
-
-function __isDate(o) {
- return typeof o === 'object' && __objToStr(o) === '[object Date]';
-};
-clone.__isDate = __isDate;
-
-function __isArray(o) {
- return typeof o === 'object' && __objToStr(o) === '[object Array]';
-};
-clone.__isArray = __isArray;
-
-function __isRegExp(o) {
- return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
-};
-clone.__isRegExp = __isRegExp;
-
-function __getRegExpFlags(re) {
- var flags = '';
- if (re.global) flags += 'g';
- if (re.ignoreCase) flags += 'i';
- if (re.multiline) flags += 'm';
- return flags;
-};
-clone.__getRegExpFlags = __getRegExpFlags;
-
-return clone;
-})();
-
-if (typeof module === 'object' && module.exports) {
- module.exports = clone;
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/package.json
deleted file mode 100644
index b0987ecfc..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "clone",
- "description": "deep cloning of objects and arrays",
- "tags": [
- "clone",
- "object",
- "array",
- "function",
- "date"
- ],
- "version": "1.0.2",
- "repository": {
- "type": "git",
- "url": "git://github.com/pvorb/node-clone.git"
- },
- "bugs": {
- "url": "https://github.com/pvorb/node-clone/issues"
- },
- "main": "clone.js",
- "author": "Paul Vorbach <paul@vorba.ch> (http://paul.vorba.ch/)",
- "contributors": [
- "Blake Miner <miner.blake@gmail.com> (http://www.blakeminer.com/)",
- "Tian You <axqd001@gmail.com> (http://blog.axqd.net/)",
- "George Stagas <gstagas@gmail.com> (http://stagas.com/)",
- "Tobiasz Cudnik <tobiasz.cudnik@gmail.com> (https://github.com/TobiaszCudnik)",
- "Pavel Lang <langpavel@phpskelet.org> (https://github.com/langpavel)",
- "Dan MacTough (http://yabfog.com/)",
- "w1nk (https://github.com/w1nk)",
- "Hugh Kennedy (http://twitter.com/hughskennedy)",
- "Dustin Diaz (http://dustindiaz.com)",
- "Ilya Shaisultanov (https://github.com/diversario)",
- "Nathan MacInnes <nathan@macinn.es> (http://macinn.es/)",
- "Benjamin E. Coe <ben@npmjs.com> (https://twitter.com/benjamincoe)",
- "Nathan Zadoks (https://github.com/nathan7)",
- "Róbert Oroszi <robert+gh@oroszi.net> (https://github.com/oroce)",
- "Aurélio A. Heckert (http://softwarelivre.org/aurium)",
- "Guy Ellis (http://www.guyellisrocks.com/)"
- ],
- "license": "MIT",
- "engines": {
- "node": ">=0.8"
- },
- "dependencies": {},
- "devDependencies": {
- "nodeunit": "~0.9.0"
- },
- "optionalDependencies": {},
- "scripts": {
- "test": "nodeunit test.js"
- }
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test-apart-ctx.html b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test-apart-ctx.html
deleted file mode 100644
index 4d532bb71..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test-apart-ctx.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
- <head>
- <meta charset="utf-8">
- <title>Clone Test-Suite (Browser)</title>
- </head>
- <body>
- <script>
- var data = document.location.search.substr(1).split('&');
- try {
- ctx = parent[data[0]];
- eval(decodeURIComponent(data[1]));
- window.results = results;
- } catch(e) {
- var extra = '';
- if (e.name == 'SecurityError')
- extra = 'This test suite needs to be run on an http server.';
- alert('Apart Context iFrame Error\n' + e + '\n\n' + extra);
- throw e;
- }
- </script>
- </body>
-</html>
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.html b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.html
deleted file mode 100644
index a95570251..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.html
+++ /dev/null
@@ -1,148 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Clone Test-Suite (Browser)</title>
- <script>
- var module = {};
- var tests = exports = module.exports = {};
-
- function require(moduleName) {
- if (moduleName == './') {
- return clone;
- }
- }
-
- function log(str) {
- logList.innerHTML += '<li>' + str + '</li>';
- }
- </script>
- <script src="clone.js"></script>
- <script src="test.js"></script>
- </head>
- <body>
- <h1 id="nodeunit-header">Clone Test-Suite (Browser)</h1>
- Tests started: <span id="testsStarted"></span>;
- Tests finished: <span id="testsFinished"></span>.
- <ul id="logList"></ul>
- <script>
- /* Methods copied from
- * https://github.com/caolan/nodeunit/blob/master/lib/assert.js
- */
- function isUndefinedOrNull(value) {
- return value === null || value === undefined;
- }
-
- function isArguments(object) {
- return Object.prototype.toString.call(object) == '[object Arguments]';
- }
-
- var _keys = function (obj){
- if (Object.keys) return Object.keys(obj);
- if (typeof obj != 'object' && typeof obj != 'function') {
- throw new TypeError('-');
- }
- var keys = [];
- for(var k in obj) if(obj.hasOwnProperty(k)) keys.push(k);
- return keys;
- };
-
- function objEquiv(a, b) {
- if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
- return false;
-
- if (a.prototype !== b.prototype)
- return false;
-
- if (isArguments(a)) {
- if (!isArguments(b)) return false;
- a = pSlice.call(a);
- b = pSlice.call(b);
- return _deepEqual(a, b);
- }
-
- try {
- var ka = _keys(a), kb = _keys(b), key, i;
- } catch (e) {
- return false
- }
-
- if (ka.length != kb.length)
- return false;
-
- ka.sort();
- kb.sort();
-
- for (i = ka.length - 1; i >= 0; i--) {
- if (ka[i] != kb[i]) return false;
- }
-
- for (i = ka.length - 1; i >= 0; i--) {
- key = ka[i];
- if (!_deepEqual(a[key], b[key] ))
- return false;
- }
-
- return true;
- }
- function _deepEqual(actual, expected) {
- if (actual === expected) {
- return true;
- } else if (actual instanceof Date && expected instanceof Date) {
- return actual.getTime() === expected.getTime();
- } else if (actual instanceof RegExp && expected instanceof RegExp) {
- return actual.source === expected.source &&
- actual.global === expected.global &&
- actual.ignoreCase === expected.ignoreCase &&
- actual.multiline === expected.multiline;
- } else if (typeof actual != 'object' && typeof expected != 'object') {
- return actual == expected;
- } else {
- return objEquiv(actual, expected);
- }
- }
-
- for (var testName in tests) {
- setTimeout((function (testName) {
- try {
- testsStarted.innerHTML = (parseInt(testsStarted.innerHTML) || 0) + 1;
- function incFinished() {
- testsFinished.innerHTML = (parseInt(testsFinished.innerHTML) || 0) + 1;
- }
-
- tests[testName]({
- expect: function (num) {
- this._expect = num
- },
- ok: function (val) {
- if(!val) throw new Error(val + ' is not ok.')
- },
- equal: function (a,b) {
- if (a != b) throw new Error(a + ' is not equal to ' + b)
- },
- notEqual: function (a,b) {
- if (a == b) throw new Error(a + ' is equal to ' + b)
- },
- strictEqual: function (a,b) {
- if (a !== b) throw new Error(a + ' is not strict equal to ' + b)
- },
- deepEqual: function (a,b) {
- if (!_deepEqual(a,b))
- throw new Error(JSON.stringify(a) + ' is not deep equal to ' +
- JSON.stringify(b))
- },
- done: function () {
- log(testName + ' <span style="color:blue">is ok</span>.');
- incFinished();
- }
- });
- } catch(e) {
- log(testName + ' <span style="color:red">FAIL.</span> <small>'+ e +'</small>');
- incFinished();
- console.log(e);
- }
- })(testName), 1);
- }
- </script>
- </body>
-</html>
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.js b/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.js
deleted file mode 100644
index e8b65b3fe..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/clone/test.js
+++ /dev/null
@@ -1,372 +0,0 @@
-var clone = require('./');
-
-function inspect(obj) {
- seen = [];
- return JSON.stringify(obj, function (key, val) {
- if (val != null && typeof val == "object") {
- if (seen.indexOf(val) >= 0) {
- return '[cyclic]';
- }
-
- seen.push(val);
- }
-
- return val;
- });
-}
-
-// Creates a new VM in node, or an iframe in a browser in order to run the
-// script
-function apartContext(context, script, callback) {
- var vm = require('vm');
-
- if (vm) {
- var ctx = vm.createContext({ ctx: context });
- callback(vm.runInContext(script, ctx));
- } else if (document && document.createElement) {
- var iframe = document.createElement('iframe');
- iframe.style.display = 'none';
- document.body.appendChild(iframe);
-
- var myCtxId = 'tmpCtx' + Math.random();
-
- window[myCtxId] = context;
- iframe.src = 'test-apart-ctx.html?' + myCtxId + '&' + encodeURIComponent(script);
- iframe.onload = function() {
- try {
- callback(iframe.contentWindow.results);
- } catch (e) {
- throw e;
- }
- };
- } else {
- console.log('WARNING: cannot create an apart context.');
- }
-}
-
-exports["clone string"] = function (test) {
- test.expect(2); // how many tests?
-
- var a = "foo";
- test.strictEqual(clone(a), a);
- a = "";
- test.strictEqual(clone(a), a);
-
- test.done();
-};
-
-exports["clone number"] = function (test) {
- test.expect(5); // how many tests?
-
- var a = 0;
- test.strictEqual(clone(a), a);
- a = 1;
- test.strictEqual(clone(a), a);
- a = -1000;
- test.strictEqual(clone(a), a);
- a = 3.1415927;
- test.strictEqual(clone(a), a);
- a = -3.1415927;
- test.strictEqual(clone(a), a);
-
- test.done();
-};
-
-exports["clone date"] = function (test) {
- test.expect(3); // how many tests?
-
- var a = new Date;
- var c = clone(a);
- test.ok(!!a.getUTCDate && !!a.toUTCString);
- test.ok(!!c.getUTCDate && !!c.toUTCString);
- test.equal(a.getTime(), c.getTime());
-
- test.done();
-};
-
-exports["clone object"] = function (test) {
- test.expect(1); // how many tests?
-
- var a = { foo: { bar: "baz" } };
- var b = clone(a);
-
- test.deepEqual(b, a);
-
- test.done();
-};
-
-exports["clone array"] = function (test) {
- test.expect(2); // how many tests?
-
- var a = [
- { foo: "bar" },
- "baz"
- ];
- var b = clone(a);
-
- test.ok(b instanceof Array);
- test.deepEqual(b, a);
-
- test.done();
-};
-
-exports["clone buffer"] = function (test) {
- if (typeof Buffer == 'undefined') {
- return test.done();
- }
-
- test.expect(1);
-
- var a = new Buffer("this is a test buffer");
- var b = clone(a);
-
- // no underscore equal since it has no concept of Buffers
- test.deepEqual(b, a);
- test.done();
-};
-
-exports["clone regexp"] = function (test) {
- test.expect(5);
-
- var a = /abc123/gi;
- var b = clone(a);
- test.deepEqual(b, a);
-
- var c = /a/g;
- test.ok(c.lastIndex === 0);
-
- c.exec('123a456a');
- test.ok(c.lastIndex === 4);
-
- var d = clone(c);
- test.ok(d.global);
- test.ok(d.lastIndex === 4);
-
- test.done();
-};
-
-exports["clone object containing array"] = function (test) {
- test.expect(1); // how many tests?
-
- var a = {
- arr1: [ { a: '1234', b: '2345' } ],
- arr2: [ { c: '345', d: '456' } ]
- };
-
- var b = clone(a);
-
- test.deepEqual(b, a);
-
- test.done();
-};
-
-exports["clone object with circular reference"] = function (test) {
- test.expect(8); // how many tests?
-
- var c = [1, "foo", {'hello': 'bar'}, function () {}, false, [2]];
- var b = [c, 2, 3, 4];
-
- var a = {'b': b, 'c': c};
- a.loop = a;
- a.loop2 = a;
- c.loop = c;
- c.aloop = a;
-
- var aCopy = clone(a);
- test.ok(a != aCopy);
- test.ok(a.c != aCopy.c);
- test.ok(aCopy.c == aCopy.b[0]);
- test.ok(aCopy.c.loop.loop.aloop == aCopy);
- test.ok(aCopy.c[0] == a.c[0]);
-
- test.ok(eq(a, aCopy));
- aCopy.c[0] = 2;
- test.ok(!eq(a, aCopy));
- aCopy.c = "2";
- test.ok(!eq(a, aCopy));
-
- function eq(x, y) {
- return inspect(x) === inspect(y);
- }
-
- test.done();
-};
-
-exports['clone prototype'] = function (test) {
- test.expect(3); // how many tests?
-
- var a = {
- a: "aaa",
- x: 123,
- y: 45.65
- };
- var b = clone.clonePrototype(a);
-
- test.strictEqual(b.a, a.a);
- test.strictEqual(b.x, a.x);
- test.strictEqual(b.y, a.y);
-
- test.done();
-};
-
-exports['clone within an apart context'] = function (test) {
- var results = apartContext({ clone: clone },
- "results = ctx.clone({ a: [1, 2, 3], d: new Date(), r: /^foo$/ig })",
- function (results) {
- test.ok(results.a.constructor.toString() === Array.toString());
- test.ok(results.d.constructor.toString() === Date.toString());
- test.ok(results.r.constructor.toString() === RegExp.toString());
- test.done();
- });
-};
-
-exports['clone object with no constructor'] = function (test) {
- test.expect(3);
-
- var n = null;
-
- var a = { foo: 'bar' };
- a.__proto__ = n;
- test.ok(typeof a === 'object');
- test.ok(typeof a !== null);
-
- var b = clone(a);
- test.ok(a.foo, b.foo);
-
- test.done();
-};
-
-exports['clone object with depth argument'] = function (test) {
- test.expect(6);
-
- var a = {
- foo: {
- bar : {
- baz : 'qux'
- }
- }
- };
-
- var b = clone(a, false, 1);
- test.deepEqual(b, a);
- test.notEqual(b, a);
- test.strictEqual(b.foo, a.foo);
-
- b = clone(a, true, 2);
- test.deepEqual(b, a);
- test.notEqual(b.foo, a.foo);
- test.strictEqual(b.foo.bar, a.foo.bar);
-
- test.done();
-};
-
-exports['maintain prototype chain in clones'] = function (test) {
- test.expect(1);
-
- function T() {}
-
- var a = new T();
- var b = clone(a);
- test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b));
-
- test.done();
-};
-
-exports['parent prototype is overriden with prototype provided'] = function (test) {
- test.expect(1);
-
- function T() {}
-
- var a = new T();
- var b = clone(a, true, Infinity, null);
- test.strictEqual(b.__defineSetter__, undefined);
-
- test.done();
-};
-
-exports['clone object with null children'] = function (test) {
- test.expect(1);
- var a = {
- foo: {
- bar: null,
- baz: {
- qux: false
- }
- }
- };
-
- var b = clone(a);
-
- test.deepEqual(b, a);
- test.done();
-};
-
-exports['clone instance with getter'] = function (test) {
- test.expect(1);
- function Ctor() {};
- Object.defineProperty(Ctor.prototype, 'prop', {
- configurable: true,
- enumerable: true,
- get: function() {
- return 'value';
- }
- });
-
- var a = new Ctor();
- var b = clone(a);
-
- test.strictEqual(b.prop, 'value');
- test.done();
-};
-
-exports['get RegExp flags'] = function (test) {
- test.strictEqual(clone.__getRegExpFlags(/a/), '' );
- test.strictEqual(clone.__getRegExpFlags(/a/i), 'i' );
- test.strictEqual(clone.__getRegExpFlags(/a/g), 'g' );
- test.strictEqual(clone.__getRegExpFlags(/a/gi), 'gi');
- test.strictEqual(clone.__getRegExpFlags(/a/m), 'm' );
-
- test.done();
-};
-
-exports["recognize Array object"] = function (test) {
- var results = apartContext(null, "results = [1, 2, 3]", function(alien) {
- var local = [4, 5, 6];
- test.ok(clone.__isArray(alien)); // recognize in other context.
- test.ok(clone.__isArray(local)); // recognize in local context.
- test.ok(!clone.__isDate(alien));
- test.ok(!clone.__isDate(local));
- test.ok(!clone.__isRegExp(alien));
- test.ok(!clone.__isRegExp(local));
- test.done();
- });
-};
-
-exports["recognize Date object"] = function (test) {
- var results = apartContext(null, "results = new Date()", function(alien) {
- var local = new Date();
-
- test.ok(clone.__isDate(alien)); // recognize in other context.
- test.ok(clone.__isDate(local)); // recognize in local context.
- test.ok(!clone.__isArray(alien));
- test.ok(!clone.__isArray(local));
- test.ok(!clone.__isRegExp(alien));
- test.ok(!clone.__isRegExp(local));
-
- test.done();
- });
-};
-
-exports["recognize RegExp object"] = function (test) {
- var results = apartContext(null, "results = /foo/", function(alien) {
- var local = /bar/;
-
- test.ok(clone.__isRegExp(alien)); // recognize in other context.
- test.ok(clone.__isRegExp(local)); // recognize in local context.
- test.ok(!clone.__isArray(alien));
- test.ok(!clone.__isArray(local));
- test.ok(!clone.__isDate(alien));
- test.ok(!clone.__isDate(local));
- test.done();
- });
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.npmignore b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.travis.yml b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.travis.yml
deleted file mode 100644
index 1b8211846..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.travis.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - npm install -g npm
-notifications:
- email: false
-matrix:
- fast_finish: true
- allow_failures:
- - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- include:
- - node_js: '0.8'
- env: TASK=test
- - node_js: '0.10'
- env: TASK=test
- - node_js: '0.11'
- env: TASK=test
- - node_js: '0.12'
- env: TASK=test
- - node_js: 1
- env: TASK=test
- - node_js: 2
- env: TASK=test
- - node_js: 3
- env: TASK=test
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 5
- env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
-script: "npm run $TASK"
-env:
- global:
- - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
- - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.zuul.yml b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.zuul.yml
deleted file mode 100644
index 96d9cfbd3..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/.zuul.yml
+++ /dev/null
@@ -1 +0,0 @@
-ui: tape
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/README.md
deleted file mode 100644
index 86b95a3bf..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# readable-stream
-
-***Node-core v5.8.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
-
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
-
-```bash
-npm install --save readable-stream
-```
-
-***Node-core streams for userland***
-
-This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core, including [documentation](doc/stream.markdown).
-
-If you want to guarantee a stable streams base, regardless of what version of
-Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
-
-As of version 2.0.0 **readable-stream** uses semantic versioning.
-
-# Streams WG Team Members
-
-* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
- - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
-* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
- - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
-* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
- - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
-* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
-* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
-* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/stream.markdown b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/stream.markdown
deleted file mode 100644
index 0bc3819e6..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/stream.markdown
+++ /dev/null
@@ -1,1760 +0,0 @@
-# Stream
-
- Stability: 2 - Stable
-
-A stream is an abstract interface implemented by various objects in
-Node.js. For example a [request to an HTTP server][http-incoming-message] is a
-stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All
-streams are instances of [`EventEmitter`][].
-
-You can load the Stream base classes by doing `require('stream')`.
-There are base classes provided for [Readable][] streams, [Writable][]
-streams, [Duplex][] streams, and [Transform][] streams.
-
-This document is split up into 3 sections:
-
-1. The first section explains the parts of the API that you need to be
- aware of to use streams in your programs.
-2. The second section explains the parts of the API that you need to
- use if you implement your own custom streams yourself. The API is designed to
- make this easy for you to do.
-3. The third section goes into more depth about how streams work,
- including some of the internal mechanisms and functions that you
- should probably not modify unless you definitely know what you are
- doing.
-
-
-## API for Stream Consumers
-
-<!--type=misc-->
-
-Streams can be either [Readable][], [Writable][], or both ([Duplex][]).
-
-All streams are EventEmitters, but they also have other custom methods
-and properties depending on whether they are Readable, Writable, or
-Duplex.
-
-If a stream is both Readable and Writable, then it implements all of
-the methods and events. So, a [Duplex][] or [Transform][] stream is
-fully described by this API, though their implementation may be
-somewhat different.
-
-It is not necessary to implement Stream interfaces in order to consume
-streams in your programs. If you **are** implementing streaming
-interfaces in your own program, please also refer to
-[API for Stream Implementors][].
-
-Almost all Node.js programs, no matter how simple, use Streams in some
-way. Here is an example of using Streams in an Node.js program:
-
-```js
-const http = require('http');
-
-var server = http.createServer( (req, res) => {
- // req is an http.IncomingMessage, which is a Readable Stream
- // res is an http.ServerResponse, which is a Writable Stream
-
- var body = '';
- // we want to get the data as utf8 strings
- // If you don't set an encoding, then you'll get Buffer objects
- req.setEncoding('utf8');
-
- // Readable streams emit 'data' events once a listener is added
- req.on('data', (chunk) => {
- body += chunk;
- });
-
- // the end event tells you that you have entire body
- req.on('end', () => {
- try {
- var data = JSON.parse(body);
- } catch (er) {
- // uh oh! bad json!
- res.statusCode = 400;
- return res.end(`error: ${er.message}`);
- }
-
- // write back something interesting to the user:
- res.write(typeof data);
- res.end();
- });
-});
-
-server.listen(1337);
-
-// $ curl localhost:1337 -d '{}'
-// object
-// $ curl localhost:1337 -d '"foo"'
-// string
-// $ curl localhost:1337 -d 'not json'
-// error: Unexpected token o
-```
-
-### Class: stream.Duplex
-
-Duplex streams are streams that implement both the [Readable][] and
-[Writable][] interfaces.
-
-Examples of Duplex streams include:
-
-* [TCP sockets][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-
-### Class: stream.Readable
-
-<!--type=class-->
-
-The Readable stream interface is the abstraction for a *source* of
-data that you are reading from. In other words, data comes *out* of a
-Readable stream.
-
-A Readable stream will not start emitting data until you indicate that
-you are ready to receive it.
-
-Readable streams have two "modes": a **flowing mode** and a **paused
-mode**. When in flowing mode, data is read from the underlying system
-and provided to your program as fast as possible. In paused mode, you
-must explicitly call [`stream.read()`][stream-read] to get chunks of data out.
-Streams start out in paused mode.
-
-**Note**: If no data event handlers are attached, and there are no
-[`stream.pipe()`][] destinations, and the stream is switched into flowing
-mode, then data will be lost.
-
-You can switch to flowing mode by doing any of the following:
-
-* Adding a [`'data'`][] event handler to listen for data.
-* Calling the [`stream.resume()`][stream-resume] method to explicitly open the
- flow.
-* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
-
-You can switch back to paused mode by doing either of the following:
-
-* If there are no pipe destinations, by calling the
- [`stream.pause()`][stream-pause] method.
-* If there are pipe destinations, by removing any [`'data'`][] event
- handlers, and removing all pipe destinations by calling the
- [`stream.unpipe()`][] method.
-
-Note that, for backwards compatibility reasons, removing [`'data'`][]
-event handlers will **not** automatically pause the stream. Also, if
-there are piped destinations, then calling [`stream.pause()`][stream-pause] will
-not guarantee that the stream will *remain* paused once those
-destinations drain and ask for more data.
-
-Examples of readable streams include:
-
-* [HTTP responses, on the client][http-incoming-message]
-* [HTTP requests, on the server][http-incoming-message]
-* [fs read streams][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-* [TCP sockets][]
-* [child process stdout and stderr][]
-* [`process.stdin`][]
-
-#### Event: 'close'
-
-Emitted when the stream and any of its underlying resources (a file
-descriptor, for example) have been closed. The event indicates that
-no more events will be emitted, and no further computation will occur.
-
-Not all streams will emit the `'close'` event.
-
-#### Event: 'data'
-
-* `chunk` {Buffer|String} The chunk of data.
-
-Attaching a `'data'` event listener to a stream that has not been
-explicitly paused will switch the stream into flowing mode. Data will
-then be passed as soon as it is available.
-
-If you just want to get all the data out of the stream as fast as
-possible, this is the best way to do so.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
-});
-```
-
-#### Event: 'end'
-
-This event fires when there will be no more data to read.
-
-Note that the `'end'` event **will not fire** unless the data is
-completely consumed. This can be done by switching into flowing mode,
-or by calling [`stream.read()`][stream-read] repeatedly until you get to the
-end.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
-});
-readable.on('end', () => {
- console.log('there will be no more data.');
-});
-```
-
-#### Event: 'error'
-
-* {Error Object}
-
-Emitted if there was an error receiving data.
-
-#### Event: 'readable'
-
-When a chunk of data can be read from the stream, it will emit a
-`'readable'` event.
-
-In some cases, listening for a `'readable'` event will cause some data
-to be read into the internal buffer from the underlying system, if it
-hadn't already.
-
-```javascript
-var readable = getReadableStreamSomehow();
-readable.on('readable', () => {
- // there is some data to read now
-});
-```
-
-Once the internal buffer is drained, a `'readable'` event will fire
-again when more data is available.
-
-The `'readable'` event is not emitted in the "flowing" mode with the
-sole exception of the last one, on end-of-stream.
-
-The `'readable'` event indicates that the stream has new information:
-either new data is available or the end of the stream has been reached.
-In the former case, [`stream.read()`][stream-read] will return that data. In the
-latter case, [`stream.read()`][stream-read] will return null. For instance, in
-the following example, `foo.txt` is an empty file:
-
-```js
-const fs = require('fs');
-var rr = fs.createReadStream('foo.txt');
-rr.on('readable', () => {
- console.log('readable:', rr.read());
-});
-rr.on('end', () => {
- console.log('end');
-});
-```
-
-The output of running this script is:
-
-```
-$ node test.js
-readable: null
-end
-```
-
-#### readable.isPaused()
-
-* Return: {Boolean}
-
-This method returns whether or not the `readable` has been **explicitly**
-paused by client code (using [`stream.pause()`][stream-pause] without a
-corresponding [`stream.resume()`][stream-resume]).
-
-```js
-var readable = new stream.Readable
-
-readable.isPaused() // === false
-readable.pause()
-readable.isPaused() // === true
-readable.resume()
-readable.isPaused() // === false
-```
-
-#### readable.pause()
-
-* Return: `this`
-
-This method will cause a stream in flowing mode to stop emitting
-[`'data'`][] events, switching out of flowing mode. Any data that becomes
-available will remain in the internal buffer.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
- readable.pause();
- console.log('there will be no more data for 1 second');
- setTimeout(() => {
- console.log('now data will start flowing again');
- readable.resume();
- }, 1000);
-});
-```
-
-#### readable.pipe(destination[, options])
-
-* `destination` {stream.Writable} The destination for writing data
-* `options` {Object} Pipe options
- * `end` {Boolean} End the writer when the reader ends. Default = `true`
-
-This method pulls all the data out of a readable stream, and writes it
-to the supplied destination, automatically managing the flow so that
-the destination is not overwhelmed by a fast readable stream.
-
-Multiple destinations can be piped to safely.
-
-```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
-// All the data from readable goes into 'file.txt'
-readable.pipe(writable);
-```
-
-This function returns the destination stream, so you can set up pipe
-chains like so:
-
-```js
-var r = fs.createReadStream('file.txt');
-var z = zlib.createGzip();
-var w = fs.createWriteStream('file.txt.gz');
-r.pipe(z).pipe(w);
-```
-
-For example, emulating the Unix `cat` command:
-
-```js
-process.stdin.pipe(process.stdout);
-```
-
-By default [`stream.end()`][stream-end] is called on the destination when the
-source stream emits [`'end'`][], so that `destination` is no longer writable.
-Pass `{ end: false }` as `options` to keep the destination stream open.
-
-This keeps `writer` open so that "Goodbye" can be written at the
-end.
-
-```js
-reader.pipe(writer, { end: false });
-reader.on('end', () => {
- writer.end('Goodbye\n');
-});
-```
-
-Note that [`process.stderr`][] and [`process.stdout`][] are never closed until
-the process exits, regardless of the specified options.
-
-#### readable.read([size])
-
-* `size` {Number} Optional argument to specify how much data to read.
-* Return {String|Buffer|Null}
-
-The `read()` method pulls some data out of the internal buffer and
-returns it. If there is no data available, then it will return
-`null`.
-
-If you pass in a `size` argument, then it will return that many
-bytes. If `size` bytes are not available, then it will return `null`,
-unless we've ended, in which case it will return the data remaining
-in the buffer.
-
-If you do not specify a `size` argument, then it will return all the
-data in the internal buffer.
-
-This method should only be called in paused mode. In flowing mode,
-this method is called automatically until the internal buffer is
-drained.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('readable', () => {
- var chunk;
- while (null !== (chunk = readable.read())) {
- console.log('got %d bytes of data', chunk.length);
- }
-});
-```
-
-If this method returns a data chunk, then it will also trigger the
-emission of a [`'data'`][] event.
-
-Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][]
-event has been triggered will return `null`. No runtime error will be raised.
-
-#### readable.resume()
-
-* Return: `this`
-
-This method will cause the readable stream to resume emitting [`'data'`][]
-events.
-
-This method will switch the stream into flowing mode. If you do *not*
-want to consume the data from a stream, but you *do* want to get to
-its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open
-the flow of data.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.resume();
-readable.on('end', () => {
- console.log('got to the end, but did not read anything');
-});
-```
-
-#### readable.setEncoding(encoding)
-
-* `encoding` {String} The encoding to use.
-* Return: `this`
-
-Call this function to cause the stream to return strings of the specified
-encoding instead of Buffer objects. For example, if you do
-`readable.setEncoding('utf8')`, then the output data will be interpreted as
-UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`,
-then the data will be encoded in hexadecimal string format.
-
-This properly handles multi-byte characters that would otherwise be
-potentially mangled if you simply pulled the Buffers directly and
-called [`buf.toString(encoding)`][] on them. If you want to read the data
-as strings, always use this method.
-
-Also you can disable any encoding at all with `readable.setEncoding(null)`.
-This approach is very useful if you deal with binary data or with large
-multi-byte strings spread out over multiple chunks.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.setEncoding('utf8');
-readable.on('data', (chunk) => {
- assert.equal(typeof chunk, 'string');
- console.log('got %d characters of string data', chunk.length);
-});
-```
-
-#### readable.unpipe([destination])
-
-* `destination` {stream.Writable} Optional specific stream to unpipe
-
-This method will remove the hooks set up for a previous [`stream.pipe()`][]
-call.
-
-If the destination is not specified, then all pipes are removed.
-
-If the destination is specified, but no pipe is set up for it, then
-this is a no-op.
-
-```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
-// All the data from readable goes into 'file.txt',
-// but only for the first second
-readable.pipe(writable);
-setTimeout(() => {
- console.log('stop writing to file.txt');
- readable.unpipe(writable);
- console.log('manually close the file stream');
- writable.end();
-}, 1000);
-```
-
-#### readable.unshift(chunk)
-
-* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue
-
-This is useful in certain cases where a stream is being consumed by a
-parser, which needs to "un-consume" some data that it has
-optimistically pulled out of the source, so that the stream can be
-passed on to some other party.
-
-Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event
-has been triggered; a runtime error will be raised.
-
-If you find that you must often call `stream.unshift(chunk)` in your
-programs, consider implementing a [Transform][] stream instead. (See [API
-for Stream Implementors][].)
-
-```js
-// Pull off a header delimited by \n\n
-// use unshift() if we get too much
-// Call the callback with (error, header, stream)
-const StringDecoder = require('string_decoder').StringDecoder;
-function parseHeader(stream, callback) {
- stream.on('error', callback);
- stream.on('readable', onReadable);
- var decoder = new StringDecoder('utf8');
- var header = '';
- function onReadable() {
- var chunk;
- while (null !== (chunk = stream.read())) {
- var str = decoder.write(chunk);
- if (str.match(/\n\n/)) {
- // found the header boundary
- var split = str.split(/\n\n/);
- header += split.shift();
- var remaining = split.join('\n\n');
- var buf = new Buffer(remaining, 'utf8');
- if (buf.length)
- stream.unshift(buf);
- stream.removeListener('error', callback);
- stream.removeListener('readable', onReadable);
- // now the body of the message can be read from the stream.
- callback(null, header, stream);
- } else {
- // still reading the header.
- header += str;
- }
- }
- }
-}
-```
-
-Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
-will not end the reading process by resetting the internal reading state of the
-stream. This can cause unexpected results if `unshift()` is called during a
-read (i.e. from within a [`stream._read()`][stream-_read] implementation on a
-custom stream). Following the call to `unshift()` with an immediate
-[`stream.push('')`][stream-push] will reset the reading state appropriately,
-however it is best to simply avoid calling `unshift()` while in the process of
-performing a read.
-
-#### readable.wrap(stream)
-
-* `stream` {Stream} An "old style" readable stream
-
-Versions of Node.js prior to v0.10 had streams that did not implement the
-entire Streams API as it is today. (See [Compatibility][] for
-more information.)
-
-If you are using an older Node.js library that emits [`'data'`][] events and
-has a [`stream.pause()`][stream-pause] method that is advisory only, then you
-can use the `wrap()` method to create a [Readable][] stream that uses the old
-stream as its data source.
-
-You will very rarely ever need to call this function, but it exists
-as a convenience for interacting with old Node.js programs and libraries.
-
-For example:
-
-```js
-const OldReader = require('./old-api-module.js').OldReader;
-const Readable = require('stream').Readable;
-const oreader = new OldReader;
-const myReader = new Readable().wrap(oreader);
-
-myReader.on('readable', () => {
- myReader.read(); // etc.
-});
-```
-
-### Class: stream.Transform
-
-Transform streams are [Duplex][] streams where the output is in some way
-computed from the input. They implement both the [Readable][] and
-[Writable][] interfaces.
-
-Examples of Transform streams include:
-
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-
-### Class: stream.Writable
-
-<!--type=class-->
-
-The Writable stream interface is an abstraction for a *destination*
-that you are writing data *to*.
-
-Examples of writable streams include:
-
-* [HTTP requests, on the client][]
-* [HTTP responses, on the server][]
-* [fs write streams][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-* [TCP sockets][]
-* [child process stdin][]
-* [`process.stdout`][], [`process.stderr`][]
-
-#### Event: 'drain'
-
-If a [`stream.write(chunk)`][stream-write] call returns `false`, then the
-`'drain'` event will indicate when it is appropriate to begin writing more data
-to the stream.
-
-```js
-// Write the data to the supplied writable stream one million times.
-// Be attentive to back-pressure.
-function writeOneMillionTimes(writer, data, encoding, callback) {
- var i = 1000000;
- write();
- function write() {
- var ok = true;
- do {
- i -= 1;
- if (i === 0) {
- // last time!
- writer.write(data, encoding, callback);
- } else {
- // see if we should continue, or wait
- // don't pass the callback, because we're not done yet.
- ok = writer.write(data, encoding);
- }
- } while (i > 0 && ok);
- if (i > 0) {
- // had to stop early!
- // write some more once it drains
- writer.once('drain', write);
- }
- }
-}
-```
-
-#### Event: 'error'
-
-* {Error}
-
-Emitted if there was an error when writing or piping data.
-
-#### Event: 'finish'
-
-When the [`stream.end()`][stream-end] method has been called, and all data has
-been flushed to the underlying system, this event is emitted.
-
-```javascript
-var writer = getWritableStreamSomehow();
-for (var i = 0; i < 100; i ++) {
- writer.write('hello, #${i}!\n');
-}
-writer.end('this is the end\n');
-writer.on('finish', () => {
- console.error('all writes are now complete.');
-});
-```
-
-#### Event: 'pipe'
-
-* `src` {stream.Readable} source stream that is piping to this writable
-
-This is emitted whenever the [`stream.pipe()`][] method is called on a readable
-stream, adding this writable to its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('pipe', (src) => {
- console.error('something is piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-```
-
-#### Event: 'unpipe'
-
-* `src` {[Readable][] Stream} The source stream that
- [unpiped][`stream.unpipe()`] this writable
-
-This is emitted whenever the [`stream.unpipe()`][] method is called on a
-readable stream, removing this writable from its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('unpipe', (src) => {
- console.error('something has stopped piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-reader.unpipe(writer);
-```
-
-#### writable.cork()
-
-Forces buffering of all writes.
-
-Buffered data will be flushed either at [`stream.uncork()`][] or at
-[`stream.end()`][stream-end] call.
-
-#### writable.end([chunk][, encoding][, callback])
-
-* `chunk` {String|Buffer} Optional data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Optional callback for when the stream is finished
-
-Call this method when no more data will be written to the stream. If supplied,
-the callback is attached as a listener on the [`'finish'`][] event.
-
-Calling [`stream.write()`][stream-write] after calling
-[`stream.end()`][stream-end] will raise an error.
-
-```js
-// write 'hello, ' and then end with 'world!'
-var file = fs.createWriteStream('example.txt');
-file.write('hello, ');
-file.end('world!');
-// writing more now is not allowed!
-```
-
-#### writable.setDefaultEncoding(encoding)
-
-* `encoding` {String} The new default encoding
-
-Sets the default encoding for a writable stream.
-
-#### writable.uncork()
-
-Flush all data, buffered since [`stream.cork()`][] call.
-
-#### writable.write(chunk[, encoding][, callback])
-
-* `chunk` {String|Buffer} The data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Callback for when this chunk of data is flushed
-* Returns: {Boolean} `true` if the data was handled completely.
-
-This method writes some data to the underlying system, and calls the
-supplied callback once the data has been fully handled.
-
-The return value indicates if you should continue writing right now.
-If the data had to be buffered internally, then it will return
-`false`. Otherwise, it will return `true`.
-
-This return value is strictly advisory. You MAY continue to write,
-even if it returns `false`. However, writes will be buffered in
-memory, so it is best not to do this excessively. Instead, wait for
-the [`'drain'`][] event before writing more data.
-
-
-## API for Stream Implementors
-
-<!--type=misc-->
-
-To implement any sort of stream, the pattern is the same:
-
-1. Extend the appropriate parent class in your own subclass. (The
- [`util.inherits()`][] method is particularly helpful for this.)
-2. Call the appropriate parent class constructor in your constructor,
- to be sure that the internal mechanisms are set up properly.
-3. Implement one or more specific methods, as detailed below.
-
-The class to extend and the method(s) to implement depend on the sort
-of stream class you are writing:
-
-<table>
- <thead>
- <tr>
- <th>
- <p>Use-case</p>
- </th>
- <th>
- <p>Class</p>
- </th>
- <th>
- <p>Method(s) to implement</p>
- </th>
- </tr>
- </thead>
- <tr>
- <td>
- <p>Reading only</p>
- </td>
- <td>
- <p>[Readable](#stream_class_stream_readable_1)</p>
- </td>
- <td>
- <p><code>[_read][stream-_read]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Writing only</p>
- </td>
- <td>
- <p>[Writable](#stream_class_stream_writable_1)</p>
- </td>
- <td>
- <p><code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Reading and writing</p>
- </td>
- <td>
- <p>[Duplex](#stream_class_stream_duplex_1)</p>
- </td>
- <td>
- <p><code>[_read][stream-_read]</code>, <code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Operate on written data, then read the result</p>
- </td>
- <td>
- <p>[Transform](#stream_class_stream_transform_1)</p>
- </td>
- <td>
- <p><code>[_transform][stream-_transform]</code>, <code>[_flush][stream-_flush]</code></p>
- </td>
- </tr>
-</table>
-
-In your implementation code, it is very important to never call the methods
-described in [API for Stream Consumers][]. Otherwise, you can potentially cause
-adverse side effects in programs that consume your streaming interfaces.
-
-### Class: stream.Duplex
-
-<!--type=class-->
-
-A "duplex" stream is one that is both Readable and Writable, such as a TCP
-socket connection.
-
-Note that `stream.Duplex` is an abstract class designed to be extended
-with an underlying implementation of the [`stream._read(size)`][stream-_read]
-and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you
-would with a Readable or Writable stream class.
-
-Since JavaScript doesn't have multiple prototypal inheritance, this class
-prototypally inherits from Readable, and then parasitically from Writable. It is
-thus up to the user to implement both the low-level
-[`stream._read(n)`][stream-_read] method as well as the low-level
-[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension
-duplex classes.
-
-#### new stream.Duplex(options)
-
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then
- the stream will automatically end the readable side when the
- writable side ends and vice versa.
- * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for readable side of the stream. Has no effect if `objectMode`
- is `true`.
- * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for writable side of the stream. Has no effect if `objectMode`
- is `true`.
-
-In classes that extend the Duplex class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-### Class: stream.PassThrough
-
-This is a trivial implementation of a [Transform][] stream that simply
-passes the input bytes across to the output. Its purpose is mainly
-for examples and testing, but there are occasionally use cases where
-it can come in handy as a building block for novel sorts of streams.
-
-### Class: stream.Readable
-
-<!--type=class-->
-
-`stream.Readable` is an abstract class designed to be extended with an
-underlying implementation of the [`stream._read(size)`][stream-_read] method.
-
-Please see [API for Stream Consumers][] for how to consume
-streams in your programs. What follows is an explanation of how to
-implement Readable streams in your programs.
-
-#### new stream.Readable([options])
-
-* `options` {Object}
- * `highWaterMark` {Number} The maximum number of bytes to store in
- the internal buffer before ceasing to read from the underlying
- resource. Default = `16384` (16kb), or `16` for `objectMode` streams
- * `encoding` {String} If specified, then buffers will be decoded to
- strings using the specified encoding. Default = `null`
- * `objectMode` {Boolean} Whether this stream should behave
- as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
- a single value instead of a Buffer of size n. Default = `false`
- * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
- method.
-
-In classes that extend the Readable class, make sure to call the
-Readable constructor so that the buffering settings can be properly
-initialized.
-
-#### readable.\_read(size)
-
-* `size` {Number} Number of bytes to read asynchronously
-
-Note: **Implement this method, but do NOT call it directly.**
-
-This method is prefixed with an underscore because it is internal to the
-class that defines it and should only be called by the internal Readable
-class methods. All Readable stream implementations must provide a \_read
-method to fetch data from the underlying resource.
-
-When `_read()` is called, if data is available from the resource, the `_read()`
-implementation should start pushing that data into the read queue by calling
-[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from
-the resource and pushing data until push returns `false`, at which point it
-should stop reading from the resource. Only when `_read()` is called again after
-it has stopped should it start reading more data from the resource and pushing
-that data onto the queue.
-
-Note: once the `_read()` method is called, it will not be called again until
-the [`stream.push()`][stream-push] method is called.
-
-The `size` argument is advisory. Implementations where a "read" is a
-single call that returns data can use this to know how much data to
-fetch. Implementations where that is not relevant, such as TCP or
-TLS, may ignore this argument, and simply provide data whenever it
-becomes available. There is no need, for example to "wait" until
-`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
-
-#### readable.push(chunk[, encoding])
-
-
-* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
-* `encoding` {String} Encoding of String chunks. Must be a valid
- Buffer encoding, such as `'utf8'` or `'ascii'`
-* return {Boolean} Whether or not more pushes should be performed
-
-Note: **This method should be called by Readable implementors, NOT
-by consumers of Readable streams.**
-
-If a value other than null is passed, The `push()` method adds a chunk of data
-into the queue for subsequent stream processors to consume. If `null` is
-passed, it signals the end of the stream (EOF), after which no more data
-can be written.
-
-The data added with `push()` can be pulled out by calling the
-[`stream.read()`][stream-read] method when the [`'readable'`][] event fires.
-
-This API is designed to be as flexible as possible. For example,
-you may be wrapping a lower-level source which has some sort of
-pause/resume mechanism, and a data callback. In those cases, you
-could wrap the low-level source object by doing something like this:
-
-```js
-// source is an object with readStop() and readStart() methods,
-// and an `ondata` member that gets called when it has data, and
-// an `onend` member that gets called when the data is over.
-
-util.inherits(SourceWrapper, Readable);
-
-function SourceWrapper(options) {
- Readable.call(this, options);
-
- this._source = getLowlevelSourceObject();
-
- // Every time there's data, we push it into the internal buffer.
- this._source.ondata = (chunk) => {
- // if push() returns false, then we need to stop reading from source
- if (!this.push(chunk))
- this._source.readStop();
- };
-
- // When the source ends, we push the EOF-signaling `null` chunk
- this._source.onend = () => {
- this.push(null);
- };
-}
-
-// _read will be called when the stream wants to pull more data in
-// the advisory size argument is ignored in this case.
-SourceWrapper.prototype._read = function(size) {
- this._source.readStart();
-};
-```
-
-#### Example: A Counting Stream
-
-<!--type=example-->
-
-This is a basic example of a Readable stream. It emits the numerals
-from 1 to 1,000,000 in ascending order, and then ends.
-
-```js
-const Readable = require('stream').Readable;
-const util = require('util');
-util.inherits(Counter, Readable);
-
-function Counter(opt) {
- Readable.call(this, opt);
- this._max = 1000000;
- this._index = 1;
-}
-
-Counter.prototype._read = function() {
- var i = this._index++;
- if (i > this._max)
- this.push(null);
- else {
- var str = '' + i;
- var buf = new Buffer(str, 'ascii');
- this.push(buf);
- }
-};
-```
-
-#### Example: SimpleProtocol v1 (Sub-optimal)
-
-This is similar to the `parseHeader` function described
-[here](#stream_readable_unshift_chunk), but implemented as a custom stream.
-Also, note that this implementation does not convert the incoming data to a
-string.
-
-However, this would be better implemented as a [Transform][] stream. See
-[SimpleProtocol v2][] for a better implementation.
-
-```js
-// A parser for a simple data protocol.
-// The "header" is a JSON object, followed by 2 \n characters, and
-// then a message body.
-//
-// NOTE: This can be done more simply as a Transform stream!
-// Using Readable directly for this is sub-optimal. See the
-// alternative example below under the Transform section.
-
-const Readable = require('stream').Readable;
-const util = require('util');
-
-util.inherits(SimpleProtocol, Readable);
-
-function SimpleProtocol(source, options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(source, options);
-
- Readable.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
-
- // source is a readable stream, such as a socket or file
- this._source = source;
-
- var self = this;
- source.on('end', () => {
- self.push(null);
- });
-
- // give it a kick whenever the source is readable
- // read(0) will not consume any bytes
- source.on('readable', () => {
- self.read(0);
- });
-
- this._rawHeader = [];
- this.header = null;
-}
-
-SimpleProtocol.prototype._read = function(n) {
- if (!this._inBody) {
- var chunk = this._source.read();
-
- // if the source doesn't have data, we don't have data yet.
- if (chunk === null)
- return this.push('');
-
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
-
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- this.push('');
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // now, because we got some extra data, unshift the rest
- // back into the read queue so that our consumer will see it.
- var b = chunk.slice(split);
- this.unshift(b);
- // calling unshift by itself does not reset the reading state
- // of the stream; since we're inside _read, doing an additional
- // push('') will reset the state appropriately.
- this.push('');
-
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
- }
- } else {
- // from there on, just provide the data to our consumer.
- // careful not to push(null), since that would indicate EOF.
- var chunk = this._source.read();
- if (chunk) this.push(chunk);
- }
-};
-
-// Usage:
-// var parser = new SimpleProtocol(source);
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
-```
-
-### Class: stream.Transform
-
-A "transform" stream is a duplex stream where the output is causally
-connected in some way to the input, such as a [zlib][] stream or a
-[crypto][] stream.
-
-There is no requirement that the output be the same size as the input,
-the same number of chunks, or arrive at the same time. For example, a
-Hash stream will only ever have a single chunk of output which is
-provided when the input is ended. A zlib stream will produce output
-that is either much smaller or much larger than its input.
-
-Rather than implement the [`stream._read()`][stream-_read] and
-[`stream._write()`][stream-_write] methods, Transform classes must implement the
-[`stream._transform()`][stream-_transform] method, and may optionally
-also implement the [`stream._flush()`][stream-_flush] method. (See below.)
-
-#### new stream.Transform([options])
-
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `transform` {Function} Implementation for the
- [`stream._transform()`][stream-_transform] method.
- * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
- method.
-
-In classes that extend the Transform class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-#### Events: 'finish' and 'end'
-
-The [`'finish'`][] and [`'end'`][] events are from the parent Writable
-and Readable classes respectively. The `'finish'` event is fired after
-[`stream.end()`][stream-end] is called and all chunks have been processed by
-[`stream._transform()`][stream-_transform], `'end'` is fired after all data has
-been output which is after the callback in [`stream._flush()`][stream-_flush]
-has been called.
-
-#### transform.\_flush(callback)
-
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done flushing any remaining data.
-
-Note: **This function MUST NOT be called directly.** It MAY be implemented
-by child classes, and if so, will be called by the internal Transform
-class methods only.
-
-In some cases, your transform operation may need to emit a bit more
-data at the end of the stream. For example, a `Zlib` compression
-stream will store up some internal state so that it can optimally
-compress the output. At the end, however, it needs to do the best it
-can with what is left, so that the data will be complete.
-
-In those cases, you can implement a `_flush()` method, which will be
-called at the very end, after all the written data is consumed, but
-before emitting [`'end'`][] to signal the end of the readable side. Just
-like with [`stream._transform()`][stream-_transform], call
-`transform.push(chunk)` zero or more times, as appropriate, and call `callback`
-when the flush operation is complete.
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### transform.\_transform(chunk, encoding, callback)
-
-* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument and data) when you are done processing the supplied chunk.
-
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Transform
-class methods only.
-
-All Transform stream implementations must provide a `_transform()`
-method to accept input and produce output.
-
-`_transform()` should do whatever has to be done in this specific
-Transform class, to handle the bytes being written, and pass them off
-to the readable portion of the interface. Do asynchronous I/O,
-process things, and so on.
-
-Call `transform.push(outputChunk)` 0 or more times to generate output
-from this input chunk, depending on how much data you want to output
-as a result of this chunk.
-
-Call the callback function only when the current chunk is completely
-consumed. Note that there may or may not be output as a result of any
-particular input chunk. If you supply a second argument to the callback
-it will be passed to the push method. In other words the following are
-equivalent:
-
-```js
-transform.prototype._transform = function (data, encoding, callback) {
- this.push(data);
- callback();
-};
-
-transform.prototype._transform = function (data, encoding, callback) {
- callback(null, data);
-};
-```
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### Example: `SimpleProtocol` parser v2
-
-The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple
-protocol parser can be implemented simply by using the higher level
-[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol
-v1` examples.
-
-In this example, rather than providing the input as an argument, it
-would be piped into the parser, which is a more idiomatic Node.js stream
-approach.
-
-```javascript
-const util = require('util');
-const Transform = require('stream').Transform;
-util.inherits(SimpleProtocol, Transform);
-
-function SimpleProtocol(options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(options);
-
- Transform.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
- this._rawHeader = [];
- this.header = null;
-}
-
-SimpleProtocol.prototype._transform = function(chunk, encoding, done) {
- if (!this._inBody) {
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
-
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
-
- // now, because we got some extra data, emit this first.
- this.push(chunk.slice(split));
- }
- } else {
- // from there on, just provide the data to our consumer as-is.
- this.push(chunk);
- }
- done();
-};
-
-// Usage:
-// var parser = new SimpleProtocol();
-// source.pipe(parser)
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
-```
-
-### Class: stream.Writable
-
-<!--type=class-->
-
-`stream.Writable` is an abstract class designed to be extended with an
-underlying implementation of the
-[`stream._write(chunk, encoding, callback)`][stream-_write] method.
-
-Please see [API for Stream Consumers][] for how to consume
-writable streams in your programs. What follows is an explanation of
-how to implement Writable streams in your programs.
-
-#### new stream.Writable([options])
-
-* `options` {Object}
- * `highWaterMark` {Number} Buffer level when
- [`stream.write()`][stream-write] starts returning `false`. Default = `16384`
- (16kb), or `16` for `objectMode` streams.
- * `decodeStrings` {Boolean} Whether or not to decode strings into
- Buffers before passing them to [`stream._write()`][stream-_write].
- Default = `true`
- * `objectMode` {Boolean} Whether or not the
- [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can
- write arbitrary data instead of only `Buffer` / `String` data.
- Default = `false`
- * `write` {Function} Implementation for the
- [`stream._write()`][stream-_write] method.
- * `writev` {Function} Implementation for the
- [`stream._writev()`][stream-_writev] method.
-
-In classes that extend the Writable class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-#### writable.\_write(chunk, encoding, callback)
-
-* `chunk` {Buffer|String} The chunk to be written. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunk.
-
-All Writable stream implementations must provide a
-[`stream._write()`][stream-_write] method to send data to the underlying
-resource.
-
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Writable
-class methods only.
-
-Call the callback using the standard `callback(error)` pattern to
-signal that the write completed successfully or with an error.
-
-If the `decodeStrings` flag is set in the constructor options, then
-`chunk` may be a string rather than a Buffer, and `encoding` will
-indicate the sort of string that it is. This is to support
-implementations that have an optimized handling for certain string
-data encodings. If you do not explicitly set the `decodeStrings`
-option to `false`, then you can safely ignore the `encoding` argument,
-and assume that `chunk` will always be a Buffer.
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### writable.\_writev(chunks, callback)
-
-* `chunks` {Array} The chunks to be written. Each chunk has following
- format: `{ chunk: ..., encoding: ... }`.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunks.
-
-Note: **This function MUST NOT be called directly.** It may be
-implemented by child classes, and called by the internal Writable
-class methods only.
-
-This function is completely optional to implement. In most cases it is
-unnecessary. If implemented, it will be called with all the chunks
-that are buffered in the write queue.
-
-
-## Simplified Constructor API
-
-<!--type=misc-->
-
-In simple cases there is now the added benefit of being able to construct a
-stream without inheritance.
-
-This can be done by passing the appropriate methods as constructor options:
-
-Examples:
-
-### Duplex
-
-```js
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-
-// or
-
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- writev: function(chunks, next) {
- // sets this._writev under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
-
-### Readable
-
-```js
-var readable = new stream.Readable({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- }
-});
-```
-
-### Transform
-
-```js
-var transform = new stream.Transform({
- transform: function(chunk, encoding, next) {
- // sets this._transform under the hood
-
- // generate output as many times as needed
- // this.push(chunk);
-
- // call when the current chunk is consumed
- next();
- },
- flush: function(done) {
- // sets this._flush under the hood
-
- // generate output as many times as needed
- // this.push(chunk);
-
- done();
- }
-});
-```
-
-### Writable
-
-```js
-var writable = new stream.Writable({
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-
-// or
-
-var writable = new stream.Writable({
- writev: function(chunks, next) {
- // sets this._writev under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
-
-## Streams: Under the Hood
-
-<!--type=misc-->
-
-### Buffering
-
-<!--type=misc-->
-
-Both Writable and Readable streams will buffer data on an internal
-object which can be retrieved from `_writableState.getBuffer()` or
-`_readableState.buffer`, respectively.
-
-The amount of data that will potentially be buffered depends on the
-`highWaterMark` option which is passed into the constructor.
-
-Buffering in Readable streams happens when the implementation calls
-[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
-call [`stream.read()`][stream-read], then the data will sit in the internal
-queue until it is consumed.
-
-Buffering in Writable streams happens when the user calls
-[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`.
-
-The purpose of streams, especially with the [`stream.pipe()`][] method, is to
-limit the buffering of data to acceptable levels, so that sources and
-destinations of varying speed will not overwhelm the available memory.
-
-### Compatibility with Older Node.js Versions
-
-<!--type=misc-->
-
-In versions of Node.js prior to v0.10, the Readable stream interface was
-simpler, but also less powerful and less useful.
-
-* Rather than waiting for you to call the [`stream.read()`][stream-read] method,
- [`'data'`][] events would start emitting immediately. If you needed to do
- some I/O to decide how to handle data, then you had to store the chunks
- in some kind of buffer so that they would not be lost.
-* The [`stream.pause()`][stream-pause] method was advisory, rather than
- guaranteed. This meant that you still had to be prepared to receive
- [`'data'`][] events even when the stream was in a paused state.
-
-In Node.js v0.10, the [Readable][] class was added.
-For backwards compatibility with older Node.js programs, Readable streams
-switch into "flowing mode" when a [`'data'`][] event handler is added, or
-when the [`stream.resume()`][stream-resume] method is called. The effect is
-that, even if you are not using the new [`stream.read()`][stream-read] method
-and [`'readable'`][] event, you no longer have to worry about losing
-[`'data'`][] chunks.
-
-Most programs will continue to function normally. However, this
-introduces an edge case in the following conditions:
-
-* No [`'data'`][] event handler is added.
-* The [`stream.resume()`][stream-resume] method is never called.
-* The stream is not piped to any writable destination.
-
-For example, consider the following code:
-
-```js
-// WARNING! BROKEN!
-net.createServer((socket) => {
-
- // we add an 'end' method, but never consume the data
- socket.on('end', () => {
- // It will never get here.
- socket.end('I got your message (but didnt read it)\n');
- });
-
-}).listen(1337);
-```
-
-In versions of Node.js prior to v0.10, the incoming message data would be
-simply discarded. However, in Node.js v0.10 and beyond,
-the socket will remain paused forever.
-
-The workaround in this situation is to call the
-[`stream.resume()`][stream-resume] method to start the flow of data:
-
-```js
-// Workaround
-net.createServer((socket) => {
-
- socket.on('end', () => {
- socket.end('I got your message (but didnt read it)\n');
- });
-
- // start the flow of data, discarding it.
- socket.resume();
-
-}).listen(1337);
-```
-
-In addition to new Readable streams switching into flowing mode,
-pre-v0.10 style streams can be wrapped in a Readable class using the
-[`stream.wrap()`][] method.
-
-
-### Object Mode
-
-<!--type=misc-->
-
-Normally, Streams operate on Strings and Buffers exclusively.
-
-Streams that are in **object mode** can emit generic JavaScript values
-other than Buffers and Strings.
-
-A Readable stream in object mode will always return a single item from
-a call to [`stream.read(size)`][stream-read], regardless of what the size
-argument is.
-
-A Writable stream in object mode will always ignore the `encoding`
-argument to [`stream.write(data, encoding)`][stream-write].
-
-The special value `null` still retains its special value for object
-mode streams. That is, for object mode readable streams, `null` as a
-return value from [`stream.read()`][stream-read] indicates that there is no more
-data, and [`stream.push(null)`][stream-push] will signal the end of stream data
-(`EOF`).
-
-No streams in Node.js core are object mode streams. This pattern is only
-used by userland streaming libraries.
-
-You should set `objectMode` in your stream child class constructor on
-the options object. Setting `objectMode` mid-stream is not safe.
-
-For Duplex streams `objectMode` can be set exclusively for readable or
-writable side with `readableObjectMode` and `writableObjectMode`
-respectively. These options can be used to implement parsers and
-serializers with Transform streams.
-
-```js
-const util = require('util');
-const StringDecoder = require('string_decoder').StringDecoder;
-const Transform = require('stream').Transform;
-util.inherits(JSONParseStream, Transform);
-
-// Gets \n-delimited JSON string data, and emits the parsed objects
-function JSONParseStream() {
- if (!(this instanceof JSONParseStream))
- return new JSONParseStream();
-
- Transform.call(this, { readableObjectMode : true });
-
- this._buffer = '';
- this._decoder = new StringDecoder('utf8');
-}
-
-JSONParseStream.prototype._transform = function(chunk, encoding, cb) {
- this._buffer += this._decoder.write(chunk);
- // split on newlines
- var lines = this._buffer.split(/\r?\n/);
- // keep the last partial line buffered
- this._buffer = lines.pop();
- for (var l = 0; l < lines.length; l++) {
- var line = lines[l];
- try {
- var obj = JSON.parse(line);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-
-JSONParseStream.prototype._flush = function(cb) {
- // Just handle any leftover
- var rem = this._buffer.trim();
- if (rem) {
- try {
- var obj = JSON.parse(rem);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-```
-
-### `stream.read(0)`
-
-There are some cases where you want to trigger a refresh of the
-underlying readable stream mechanisms, without actually consuming any
-data. In that case, you can call `stream.read(0)`, which will always
-return null.
-
-If the internal read buffer is below the `highWaterMark`, and the
-stream is not currently reading, then calling `stream.read(0)` will trigger
-a low-level [`stream._read()`][stream-_read] call.
-
-There is almost never a need to do this. However, you will see some
-cases in Node.js's internals where this is done, particularly in the
-Readable stream class internals.
-
-### `stream.push('')`
-
-Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an
-interesting side effect. Because it *is* a call to
-[`stream.push()`][stream-push], it will end the `reading` process. However, it
-does *not* add any data to the readable buffer, so there's nothing for
-a user to consume.
-
-Very rarely, there are cases where you have no data to provide now,
-but the consumer of your stream (or, perhaps, another bit of your own
-code) will know when to check again, by calling [`stream.read(0)`][stream-read].
-In those cases, you *may* call `stream.push('')`.
-
-So far, the only use case for this functionality is in the
-[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you
-find that you have to use `stream.push('')`, please consider another
-approach, because it almost certainly indicates that something is
-horribly wrong.
-
-[`'data'`]: #stream_event_data
-[`'drain'`]: #stream_event_drain
-[`'end'`]: #stream_event_end
-[`'finish'`]: #stream_event_finish
-[`'readable'`]: #stream_event_readable
-[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end
-[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter
-[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr
-[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin
-[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout
-[`stream.cork()`]: #stream_writable_cork
-[`stream.pipe()`]: #stream_readable_pipe_destination_options
-[`stream.uncork()`]: #stream_writable_uncork
-[`stream.unpipe()`]: #stream_readable_unpipe_destination
-[`stream.wrap()`]: #stream_readable_wrap_stream
-[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream
-[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor
-[API for Stream Consumers]: #stream_api_for_stream_consumers
-[API for Stream Implementors]: #stream_api_for_stream_implementors
-[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin
-[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout
-[Compatibility]: #stream_compatibility_with_older_node_js_versions
-[crypto]: crypto.html
-[Duplex]: #stream_class_stream_duplex
-[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream
-[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream
-[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest
-[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse
-[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage
-[Object mode]: #stream_object_mode
-[Readable]: #stream_class_stream_readable
-[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
-[stream-_flush]: #stream_transform_flush_callback
-[stream-_read]: #stream_readable_read_size_1
-[stream-_transform]: #stream_transform_transform_chunk_encoding_callback
-[stream-_write]: #stream_writable_write_chunk_encoding_callback_1
-[stream-_writev]: #stream_writable_writev_chunks_callback
-[stream-end]: #stream_writable_end_chunk_encoding_callback
-[stream-pause]: #stream_readable_pause
-[stream-push]: #stream_readable_push_chunk_encoding
-[stream-read]: #stream_readable_read_size
-[stream-resume]: #stream_readable_resume
-[stream-write]: #stream_writable_write_chunk_encoding_callback
-[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket
-[Transform]: #stream_class_stream_transform
-[Writable]: #stream_class_stream_writable
-[zlib]: zlib.html
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
deleted file mode 100644
index 83275f192..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# streams WG Meeting 2015-01-30
-
-## Links
-
-* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
-* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
-* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
-
-## Agenda
-
-Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
-
-* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
-* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
-* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
-* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
-
-## Minutes
-
-### adopt a charter
-
-* group: +1's all around
-
-### What versioning scheme should be adopted?
-* group: +1’s 3.0.0
-* domenic+group: pulling in patches from other sources where appropriate
-* mikeal: version independently, suggesting versions for io.js
-* mikeal+domenic: work with TC to notify in advance of changes
-simpler stream creation
-
-### streamline creation of streams
-* sam: streamline creation of streams
-* domenic: nice simple solution posted
- but, we lose the opportunity to change the model
- may not be backwards incompatible (double check keys)
-
- **action item:** domenic will check
-
-### remove implicit flowing of streams on(‘data’)
-* add isFlowing / isPaused
-* mikeal: worrying that we’re documenting polyfill methods – confuses users
-* domenic: more reflective API is probably good, with warning labels for users
-* new section for mad scientists (reflective stream access)
-* calvin: name the “third state”
-* mikeal: maybe borrow the name from whatwg?
-* domenic: we’re missing the “third state”
-* consensus: kind of difficult to name the third state
-* mikeal: figure out differences in states / compat
-* mathias: always flow on data – eliminates third state
- * explore what it breaks
-
-**action items:**
-* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
-* ask rod/build for infrastructure
-* **chris**: explore the “flow on data” approach
-* add isPaused/isFlowing
-* add new docs section
-* move isPaused to that section
-
-
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/duplex.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af87..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_duplex.js")
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index 736693b84..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-'use strict';
-
-/*<replacement>*/
-
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) {
- keys.push(key);
- }return keys;
-};
-/*</replacement>*/
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-var keys = objectKeys(Writable.prototype);
-for (var v = 0; v < keys.length; v++) {
- var method = keys[v];
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
-}
-
-function Duplex(options) {
- if (!(this instanceof Duplex)) return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false) this.readable = false;
-
- if (options && options.writable === false) this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended) return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- processNextTick(onEndNT, this);
-}
-
-function onEndNT(self) {
- self.end();
-}
-
-function forEach(xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-} \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index d06f71f18..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-'use strict';
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough)) return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function (chunk, encoding, cb) {
- cb(null, chunk);
-}; \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 54a9d5c55..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,880 +0,0 @@
-'use strict';
-
-module.exports = Readable;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-var EE = require('events');
-
-/*<replacement>*/
-var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
-/*</replacement>*/
-
-var Buffer = require('buffer').Buffer;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var debugUtil = require('util');
-var debug = undefined;
-if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
-} else {
- debug = function () {};
-}
-/*</replacement>*/
-
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-var Duplex;
-function ReadableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
-
- // cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
-
- this.buffer = [];
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
- this.resumeScheduled = false;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // when piping, we only care about 'readable' events that happen
- // after read()ing all the bytes and not getting any pushback.
- this.ranOut = false;
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-var Duplex;
-function Readable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- if (!(this instanceof Readable)) return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- if (options && typeof options.read === 'function') this._read = options.read;
-
- Stream.call(this);
-}
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function (chunk, encoding) {
- var state = this._readableState;
-
- if (!state.objectMode && typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
- encoding = '';
- }
- }
-
- return readableAddChunk(this, state, chunk, encoding, false);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function (chunk) {
- var state = this._readableState;
- return readableAddChunk(this, state, chunk, '', true);
-};
-
-Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
-};
-
-function readableAddChunk(stream, state, chunk, encoding, addToFront) {
- var er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.ended && !addToFront) {
- var e = new Error('stream.push() after EOF');
- stream.emit('error', e);
- } else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
- } else {
- var skipAdd;
- if (state.decoder && !addToFront && !encoding) {
- chunk = state.decoder.write(chunk);
- skipAdd = !state.objectMode && chunk.length === 0;
- }
-
- if (!addToFront) state.reading = false;
-
- // Don't add to the buffer if we've decoded to an empty string chunk and
- // we're not in object mode
- if (!skipAdd) {
- // if we want the data now, just emit it.
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-
- if (state.needReadable) emitReadable(stream);
- }
- }
-
- maybeReadMore(stream, state);
- }
- } else if (!addToFront) {
- state.reading = false;
- }
-
- return needMoreData(state);
-}
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
-}
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function (enc) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
-};
-
-// Don't raise the hwm > 8MB
-var MAX_HWM = 0x800000;
-function computeNewHighWaterMark(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
-}
-
-function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended) return 0;
-
- if (state.objectMode) return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
- }
-
- if (n <= 0) return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else {
- return state.length;
- }
- }
-
- return n;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function (n) {
- debug('read', n);
- var state = this._readableState;
- var nOrig = n;
-
- if (typeof n !== 'number' || n > 0) state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0) endReadable(this);
- return null;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- }
-
- if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- }
-
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (doRead && !state.reading) n = howMuchToRead(nOrig, state);
-
- var ret;
- if (n > 0) ret = fromList(n, state);else ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- }
-
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended) state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended && state.length === 0) endReadable(this);
-
- if (ret !== null) this.emit('data', ret);
-
- return ret;
-};
-
-function chunkInvalid(state, chunk) {
- var er = null;
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-function onEofChunk(stream, state) {
- if (state.ended) return;
- if (state.decoder) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
- }
-}
-
-function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- processNextTick(maybeReadMore_, stream, state);
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;else len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function (n) {
- this.emit('error', new Error('not implemented'));
-};
-
-Readable.prototype.pipe = function (dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-
- var endFn = doEnd ? onend : cleanup;
- if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable) {
- debug('onunpipe');
- if (readable === src) {
- cleanup();
- }
- }
-
- function onend() {
- debug('onend');
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- var cleanedUp = false;
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', cleanup);
- src.removeListener('data', ondata);
-
- cleanedUp = true;
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
- }
-
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- var ret = dest.write(chunk);
- if (false === ret) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- }
- src.pause();
- }
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error];
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function () {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain) state.awaitDrain--;
- if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
-}
-
-Readable.prototype.unpipe = function (dest) {
- var state = this._readableState;
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes) return this;
-
- if (!dest) dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest) dest.emit('unpipe', this);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
-
- for (var _i = 0; _i < len; _i++) {
- dests[_i].emit('unpipe', this);
- }return this;
- }
-
- // try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1) return this;
-
- state.pipes.splice(i, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function (ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- // If listening to data, and it has not explicitly been paused,
- // then call resume to start the flow of data on the next tick.
- if (ev === 'data' && false !== this._readableState.flowing) {
- this.resume();
- }
-
- if (ev === 'readable' && !this._readableState.endEmitted) {
- var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
- state.emittedReadable = false;
- state.needReadable = true;
- if (!state.reading) {
- processNextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this, state);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-function nReadingNextTick(self) {
- debug('readable nexttick read 0');
- self.read(0);
-}
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function () {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- resume(this, state);
- }
- return this;
-};
-
-function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- processNextTick(resume_, stream, state);
- }
-}
-
-function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
-
- state.resumeScheduled = false;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading) stream.read(0);
-}
-
-Readable.prototype.pause = function () {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
-};
-
-function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- if (state.flowing) {
- do {
- var chunk = stream.read();
- } while (null !== chunk && state.flowing);
- }
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function (stream) {
- var state = this._readableState;
- var paused = false;
-
- var self = this;
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) self.push(chunk);
- }
-
- self.push(null);
- });
-
- stream.on('data', function (chunk) {
- debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
-
- var ret = self.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
- return stream[method].apply(stream, arguments);
- };
- }(i);
- }
- }
-
- // proxy certain important events.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function (ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- self._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return self;
-};
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0) return null;
-
- if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
- list.length = 0;
- } else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode) ret = '';else ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
-
- if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy);
-
- if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift();
-
- c += cpy;
- }
- }
- }
-
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('endReadable called on non-empty stream');
-
- if (!state.endEmitted) {
- state.ended = true;
- processNextTick(endReadableNT, state, stream);
- }
-}
-
-function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
-}
-
-function forEach(xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
-
-function indexOf(xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-} \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index 625cdc176..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-'use strict';
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-function TransformState(stream) {
- this.afterTransform = function (er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
- this.writeencoding = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data !== null && data !== undefined) stream.push(data);
-
- cb(er);
-
- var rs = stream._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
- }
-}
-
-function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = new TransformState(this);
-
- // when the writable side finishes, then flush out anything remaining.
- var stream = this;
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- if (options) {
- if (typeof options.transform === 'function') this._transform = options.transform;
-
- if (typeof options.flush === 'function') this._flush = options.flush;
- }
-
- this.once('prefinish', function () {
- if (typeof this._flush === 'function') this._flush(function (er) {
- done(stream, er);
- });else done(stream);
- });
-}
-
-Transform.prototype.push = function (chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('not implemented');
-};
-
-Transform.prototype._write = function (chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function (n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-function done(stream, er) {
- if (er) return stream.emit('error', er);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- var ws = stream._writableState;
- var ts = stream._transformState;
-
- if (ws.length) throw new Error('calling transform done when ws.length != 0');
-
- if (ts.transforming) throw new Error('calling transform done when still transforming');
-
- return stream.push(null);
-} \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index 95916c992..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,516 +0,0 @@
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, encoding, cb), and it'll handle all
-// the drain event emission and buffering.
-
-'use strict';
-
-module.exports = Writable;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
-/*</replacement>*/
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var internalUtil = {
- deprecate: require('util-deprecate')
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
-/*</replacement>*/
-
-var Buffer = require('buffer').Buffer;
-
-util.inherits(Writable, Stream);
-
-function nop() {}
-
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
-}
-
-var Duplex;
-function WritableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
-
- // cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
-
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function (er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.bufferedRequest = null;
- this.lastBufferedRequest = null;
-
- // number of pending user-supplied write callbacks
- // this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
-
- // emit prefinish if the only thing we're waiting for is _write cbs
- // This is relevant for synchronous Transform streams
- this.prefinished = false;
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-
- // count buffered requests
- this.bufferedRequestCount = 0;
-
- // create the two objects needed to store the corked requests
- // they are not a linked list, as no new elements are inserted in there
- this.corkedRequestsFree = new CorkedRequest(this);
- this.corkedRequestsFree.next = new CorkedRequest(this);
-}
-
-WritableState.prototype.getBuffer = function writableStateGetBuffer() {
- var current = this.bufferedRequest;
- var out = [];
- while (current) {
- out.push(current);
- current = current.next;
- }
- return out;
-};
-
-(function () {
- try {
- Object.defineProperty(WritableState.prototype, 'buffer', {
- get: internalUtil.deprecate(function () {
- return this.getBuffer();
- }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
- });
- } catch (_) {}
-})();
-
-var Duplex;
-function Writable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- if (options) {
- if (typeof options.write === 'function') this._write = options.write;
-
- if (typeof options.writev === 'function') this._writev = options.writev;
- }
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
-};
-
-function writeAfterEnd(stream, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- processNextTick(cb, er);
-}
-
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
-
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
- stream.emit('error', er);
- processNextTick(cb, er);
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function (chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function') cb = nop;
-
- if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
- }
-
- return ret;
-};
-
-Writable.prototype.cork = function () {
- var state = this._writableState;
-
- state.corked++;
-};
-
-Writable.prototype.uncork = function () {
- var state = this._writableState;
-
- if (state.corked) {
- state.corked--;
-
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
- }
-};
-
-Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
- // node::ParseEncoding() requires lower case.
- if (typeof encoding === 'string') encoding = encoding.toLowerCase();
- if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
- this._writableState.defaultEncoding = encoding;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
- }
- return chunk;
-}
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret) state.needDrain = true;
-
- if (state.writing || state.corked) {
- var last = state.lastBufferedRequest;
- state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
- if (last) {
- last.next = state.lastBufferedRequest;
- } else {
- state.bufferedRequest = state.lastBufferedRequest;
- }
- state.bufferedRequestCount += 1;
- } else {
- doWrite(stream, state, false, len, chunk, encoding, cb);
- }
-
- return ret;
-}
-
-function doWrite(stream, state, writev, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- --state.pendingcb;
- if (sync) processNextTick(cb, er);else cb(er);
-
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er) onwriteError(stream, state, sync, er, cb);else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(state);
-
- if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
- clearBuffer(stream, state);
- }
-
- if (sync) {
- /*<replacement>*/
- asyncWrite(afterWrite, stream, state, finished, cb);
- /*</replacement>*/
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished) onwriteDrain(stream, state);
- state.pendingcb--;
- cb();
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
- var entry = state.bufferedRequest;
-
- if (stream._writev && entry && entry.next) {
- // Fast case, write everything using _writev()
- var l = state.bufferedRequestCount;
- var buffer = new Array(l);
- var holder = state.corkedRequestsFree;
- holder.entry = entry;
-
- var count = 0;
- while (entry) {
- buffer[count] = entry;
- entry = entry.next;
- count += 1;
- }
-
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
-
- // doWrite is always async, defer these to save a bit of time
- // as the hot path ends with doWrite
- state.pendingcb++;
- state.lastBufferedRequest = null;
- state.corkedRequestsFree = holder.next;
- holder.next = null;
- } else {
- // Slow case, write chunks one-by-one
- while (entry) {
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, false, len, chunk, encoding, cb);
- entry = entry.next;
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- break;
- }
- }
-
- if (entry === null) state.lastBufferedRequest = null;
- }
-
- state.bufferedRequestCount = 0;
- state.bufferedRequest = entry;
- state.bufferProcessing = false;
-}
-
-Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('not implemented'));
-};
-
-Writable.prototype._writev = null;
-
-Writable.prototype.end = function (chunk, encoding, cb) {
- var state = this._writableState;
-
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
-
- // .end() fully uncorks
- if (state.corked) {
- state.corked = 1;
- this.uncork();
- }
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
-};
-
-function needFinish(state) {
- return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
-}
-
-function prefinish(stream, state) {
- if (!state.prefinished) {
- state.prefinished = true;
- stream.emit('prefinish');
- }
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(state);
- if (need) {
- if (state.pendingcb === 0) {
- prefinish(stream, state);
- state.finished = true;
- stream.emit('finish');
- } else {
- prefinish(stream, state);
- }
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished) processNextTick(cb);else stream.once('finish', cb);
- }
- state.ended = true;
- stream.writable = false;
-}
-
-// It seems a linked list but it is not
-// there will be only 2 of these for each stream
-function CorkedRequest(state) {
- var _this = this;
-
- this.next = null;
- this.entry = null;
-
- this.finish = function (err) {
- var entry = _this.entry;
- _this.entry = null;
- while (entry) {
- var cb = entry.callback;
- state.pendingcb--;
- cb(err);
- entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = _this;
- } else {
- state.corkedRequestsFree = _this;
- }
- };
-} \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/package.json
deleted file mode 100644
index d77b090ec..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "readable-stream",
- "version": "2.0.6",
- "description": "Streams3, a user-land copy of the stream library from Node.js",
- "main": "readable.js",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "string_decoder": "~0.10.x",
- "util-deprecate": "~1.0.1"
- },
- "devDependencies": {
- "tap": "~0.2.6",
- "tape": "~4.5.1",
- "zuul": "~3.9.0"
- },
- "scripts": {
- "test": "tap test/parallel/*.js test/ours/*.js",
- "browser": "npm run write-zuul && zuul -- test/browser.js",
- "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/readable-stream"
- },
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "browser": {
- "util": false
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/passthrough.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a55..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_passthrough.js")
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/readable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/readable.js
deleted file mode 100644
index 6222a5798..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var Stream = (function (){
- try {
- return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
- } catch(_){}
-}());
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = Stream || exports;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/transform.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f078..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_transform.js")
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/writable.js b/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_writable.js")
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/.npmignore
deleted file mode 100644
index 1e1dcab34..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-.jshintrc
-.travis.yml \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/LICENSE
deleted file mode 100644
index f6a0029de..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md
deleted file mode 100644
index c84b3464a..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/README.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# through2
-
-[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
-
-**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
-
-Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
-
-Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
-
-```js
-fs.createReadStream('ex.txt')
- .pipe(through2(function (chunk, enc, callback) {
- for (var i = 0; i < chunk.length; i++)
- if (chunk[i] == 97)
- chunk[i] = 122 // swap 'a' for 'z'
-
- this.push(chunk)
-
- callback()
- }))
- .pipe(fs.createWriteStream('out.txt'))
-```
-
-Or object streams:
-
-```js
-var all = []
-
-fs.createReadStream('data.csv')
- .pipe(csv2())
- .pipe(through2.obj(function (chunk, enc, callback) {
- var data = {
- name : chunk[0]
- , address : chunk[3]
- , phone : chunk[10]
- }
- this.push(data)
-
- callback()
- }))
- .on('data', function (data) {
- all.push(data)
- })
- .on('end', function () {
- doSomethingSpecial(all)
- })
-```
-
-Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
-
-## API
-
-<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
-
-Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
-
-### options
-
-The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
-
-The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
-
-```js
-fs.createReadStream('/tmp/important.dat')
- .pipe(through2({ objectMode: true, allowHalfOpen: false },
- function (chunk, enc, cb) {
- cb(null, 'wut?') // note we can use the second argument on the callback
- // to provide data as an alternative to this.push('wut?')
- }
- )
- .pipe(fs.createWriteStream('/tmp/wut.txt'))
-```
-
-### transformFunction
-
-The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
-
-To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
-
-Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
-
-If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
-
-### flushFunction
-
-The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
-
-```js
-fs.createReadStream('/tmp/important.dat')
- .pipe(through2(
- function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
- function (cb) { // flush function
- this.push('tacking on an extra buffer to the end');
- cb();
- }
- ))
- .pipe(fs.createWriteStream('/tmp/wut.txt'));
-```
-
-<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
-
-Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
-
-```js
-var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
- if (record.temp != null && record.unit == "F") {
- record.temp = ( ( record.temp - 32 ) * 5 ) / 9
- record.unit = "C"
- }
- this.push(record)
- callback()
-})
-
-// Create instances of FToC like so:
-var converter = new FToC()
-// Or:
-var converter = FToC()
-// Or specify/override options when you instantiate, if you prefer:
-var converter = FToC({objectMode: true})
-```
-
-## See Also
-
- - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
- - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
- - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
- - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
- - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
-
-## License
-
-**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json
deleted file mode 100644
index c7afac7f0..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "through2",
- "version": "2.0.1",
- "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
- "main": "through2.js",
- "scripts": {
- "test": "node test/test.js | faucet",
- "test-local": "brtapsauce-local test/basic-test.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/rvagg/through2.git"
- },
- "keywords": [
- "stream",
- "streams2",
- "through",
- "transform"
- ],
- "author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
- "license": "MIT",
- "dependencies": {
- "readable-stream": "~2.0.0",
- "xtend": "~4.0.0"
- },
- "devDependencies": {
- "bl": "~0.9.4",
- "faucet": "0.0.1",
- "stream-spigot": "~3.0.5",
- "tape": "~4.0.0"
- }
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js
deleted file mode 100644
index 5b7a880e8..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/through2/through2.js
+++ /dev/null
@@ -1,96 +0,0 @@
-var Transform = require('readable-stream/transform')
- , inherits = require('util').inherits
- , xtend = require('xtend')
-
-function DestroyableTransform(opts) {
- Transform.call(this, opts)
- this._destroyed = false
-}
-
-inherits(DestroyableTransform, Transform)
-
-DestroyableTransform.prototype.destroy = function(err) {
- if (this._destroyed) return
- this._destroyed = true
-
- var self = this
- process.nextTick(function() {
- if (err)
- self.emit('error', err)
- self.emit('close')
- })
-}
-
-// a noop _transform function
-function noop (chunk, enc, callback) {
- callback(null, chunk)
-}
-
-
-// create a new export function, used by both the main export and
-// the .ctor export, contains common logic for dealing with arguments
-function through2 (construct) {
- return function (options, transform, flush) {
- if (typeof options == 'function') {
- flush = transform
- transform = options
- options = {}
- }
-
- if (typeof transform != 'function')
- transform = noop
-
- if (typeof flush != 'function')
- flush = null
-
- return construct(options, transform, flush)
- }
-}
-
-
-// main export, just make me a transform stream!
-module.exports = through2(function (options, transform, flush) {
- var t2 = new DestroyableTransform(options)
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
-
-
-// make me a reusable prototype that I can `new`, or implicitly `new`
-// with a constructor call
-module.exports.ctor = through2(function (options, transform, flush) {
- function Through2 (override) {
- if (!(this instanceof Through2))
- return new Through2(override)
-
- this.options = xtend(options, override)
-
- DestroyableTransform.call(this, this.options)
- }
-
- inherits(Through2, DestroyableTransform)
-
- Through2.prototype._transform = transform
-
- if (flush)
- Through2.prototype._flush = flush
-
- return Through2
-})
-
-
-module.exports.obj = through2(function (options, transform, flush) {
- var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE
deleted file mode 100644
index 4f482f9ba..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md
deleted file mode 100644
index 2d57d8566..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
-## Information
-<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table>
-
-## What is this?
-Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)
-
-## File
-
-```javascript
-var File = require('vinyl');
-
-var coffeeFile = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee",
- contents: new Buffer("test = 123")
-});
-```
-
-### isVinyl
-When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.
-
-```js
-var File = require('vinyl');
-
-var dummy = new File({stuff});
-var notAFile = {};
-
-File.isVinyl(dummy); // true
-File.isVinyl(notAFile); // false
-```
-
-### constructor(options)
-#### options.cwd
-Type: `String`<br><br>Default: `process.cwd()`
-
-#### options.base
-Used for relative pathing. Typically where a glob starts.
-
-Type: `String`<br><br>Default: `options.cwd`
-
-#### options.path
-Full path to the file.
-
-Type: `String`<br><br>Default: `undefined`
-
-#### options.history
-Path history. Has no effect if `options.path` is passed.
-
-Type: `Array`<br><br>Default: `options.path ? [options.path] : []`
-
-#### options.stat
-The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
-
-Type: `fs.Stats`<br><br>Default: `null`
-
-#### options.contents
-File contents.
-
-Type: `Buffer, Stream, or null`<br><br>Default: `null`
-
-### isBuffer()
-Returns true if file.contents is a Buffer.
-
-### isStream()
-Returns true if file.contents is a Stream.
-
-### isNull()
-Returns true if file.contents is null.
-
-### clone([opt])
-Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned.
-
-If opt or opt.deep is false, custom attributes will not be deep-cloned.
-
-If opt.contents is false, it will copy file.contents Buffer's reference.
-
-### pipe(stream[, opt])
-If file.contents is a Buffer, it will write it to the stream.
-
-If file.contents is a Stream, it will pipe it to the stream.
-
-If file.contents is null, it will do nothing.
-
-If opt.end is false, the destination stream will not be ended (same as node core).
-
-Returns the stream.
-
-### inspect()
-Returns a pretty String interpretation of the File. Useful for console.log.
-
-### contents
-The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.
-
-For example:
-
-```js
-if (file.isBuffer()) {
- console.log(file.contents.toString()); // logs out the string of contents
-}
-```
-
-### path
-Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
-
-### history
-Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
-
-### relative
-Returns path.relative for the file base and file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.relative); // file.coffee
-```
-
-### dirname
-Gets and sets path.dirname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.dirname); // /test
-
-file.dirname = '/specs';
-
-console.log(file.dirname); // /specs
-console.log(file.path); // /specs/file.coffee
-`
-```
-
-### basename
-Gets and sets path.basename for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.basename); // file.coffee
-
-file.basename = 'file.js';
-
-console.log(file.basename); // file.js
-console.log(file.path); // /test/file.js
-`
-```
-
-### extname
-Gets and sets path.extname for the file path.
-
-Example:
-
-```javascript
-var file = new File({
- cwd: "/",
- base: "/test/",
- path: "/test/file.coffee"
-});
-
-console.log(file.extname); // .coffee
-
-file.extname = '.js';
-
-console.log(file.extname); // .js
-console.log(file.path); // /test/file.js
-`
-```
-
-[npm-url]: https://npmjs.org/package/vinyl
-[npm-image]: https://badge.fury.io/js/vinyl.png
-[travis-url]: https://travis-ci.org/wearefractal/vinyl
-[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master
-[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl
-[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png
-[depstat-url]: https://david-dm.org/wearefractal/vinyl
-[depstat-image]: https://david-dm.org/wearefractal/vinyl.png
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js
deleted file mode 100644
index c8f113ffe..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-var path = require('path');
-var clone = require('clone');
-var cloneStats = require('clone-stats');
-var cloneBuffer = require('./lib/cloneBuffer');
-var isBuffer = require('./lib/isBuffer');
-var isStream = require('./lib/isStream');
-var isNull = require('./lib/isNull');
-var inspectStream = require('./lib/inspectStream');
-var Stream = require('stream');
-var replaceExt = require('replace-ext');
-
-function File(file) {
- if (!file) file = {};
-
- // record path change
- var history = file.path ? [file.path] : file.history;
- this.history = history || [];
-
- this.cwd = file.cwd || process.cwd();
- this.base = file.base || this.cwd;
-
- // stat = files stats object
- this.stat = file.stat || null;
-
- // contents = stream, buffer, or null if not read
- this.contents = file.contents || null;
-
- this._isVinyl = true;
-}
-
-File.prototype.isBuffer = function() {
- return isBuffer(this.contents);
-};
-
-File.prototype.isStream = function() {
- return isStream(this.contents);
-};
-
-File.prototype.isNull = function() {
- return isNull(this.contents);
-};
-
-// TODO: should this be moved to vinyl-fs?
-File.prototype.isDirectory = function() {
- return this.isNull() && this.stat && this.stat.isDirectory();
-};
-
-File.prototype.clone = function(opt) {
- if (typeof opt === 'boolean') {
- opt = {
- deep: opt,
- contents: true
- };
- } else if (!opt) {
- opt = {
- deep: true,
- contents: true
- };
- } else {
- opt.deep = opt.deep === true;
- opt.contents = opt.contents !== false;
- }
-
- // clone our file contents
- var contents;
- if (this.isStream()) {
- contents = this.contents.pipe(new Stream.PassThrough());
- this.contents = this.contents.pipe(new Stream.PassThrough());
- } else if (this.isBuffer()) {
- contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
- }
-
- var file = new File({
- cwd: this.cwd,
- base: this.base,
- stat: (this.stat ? cloneStats(this.stat) : null),
- history: this.history.slice(),
- contents: contents
- });
-
- // clone our custom properties
- Object.keys(this).forEach(function(key) {
- // ignore built-in fields
- if (key === '_contents' || key === 'stat' ||
- key === 'history' || key === 'path' ||
- key === 'base' || key === 'cwd') {
- return;
- }
- file[key] = opt.deep ? clone(this[key], true) : this[key];
- }, this);
- return file;
-};
-
-File.prototype.pipe = function(stream, opt) {
- if (!opt) opt = {};
- if (typeof opt.end === 'undefined') opt.end = true;
-
- if (this.isStream()) {
- return this.contents.pipe(stream, opt);
- }
- if (this.isBuffer()) {
- if (opt.end) {
- stream.end(this.contents);
- } else {
- stream.write(this.contents);
- }
- return stream;
- }
-
- // isNull
- if (opt.end) stream.end();
- return stream;
-};
-
-File.prototype.inspect = function() {
- var inspect = [];
-
- // use relative path if possible
- var filePath = (this.base && this.path) ? this.relative : this.path;
-
- if (filePath) {
- inspect.push('"'+filePath+'"');
- }
-
- if (this.isBuffer()) {
- inspect.push(this.contents.inspect());
- }
-
- if (this.isStream()) {
- inspect.push(inspectStream(this.contents));
- }
-
- return '<File '+inspect.join(' ')+'>';
-};
-
-File.isVinyl = function(file) {
- return file && file._isVinyl === true;
-};
-
-// virtual attributes
-// or stuff with extra logic
-Object.defineProperty(File.prototype, 'contents', {
- get: function() {
- return this._contents;
- },
- set: function(val) {
- if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
- throw new Error('File.contents can only be a Buffer, a Stream, or null.');
- }
- this._contents = val;
- }
-});
-
-// TODO: should this be moved to vinyl-fs?
-Object.defineProperty(File.prototype, 'relative', {
- get: function() {
- if (!this.base) throw new Error('No base specified! Can not get relative.');
- if (!this.path) throw new Error('No path specified! Can not get relative.');
- return path.relative(this.base, this.path);
- },
- set: function() {
- throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
- }
-});
-
-Object.defineProperty(File.prototype, 'dirname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get dirname.');
- return path.dirname(this.path);
- },
- set: function(dirname) {
- if (!this.path) throw new Error('No path specified! Can not set dirname.');
- this.path = path.join(dirname, path.basename(this.path));
- }
-});
-
-Object.defineProperty(File.prototype, 'basename', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get basename.');
- return path.basename(this.path);
- },
- set: function(basename) {
- if (!this.path) throw new Error('No path specified! Can not set basename.');
- this.path = path.join(path.dirname(this.path), basename);
- }
-});
-
-Object.defineProperty(File.prototype, 'extname', {
- get: function() {
- if (!this.path) throw new Error('No path specified! Can not get extname.');
- return path.extname(this.path);
- },
- set: function(extname) {
- if (!this.path) throw new Error('No path specified! Can not set extname.');
- this.path = replaceExt(this.path, extname);
- }
-});
-
-Object.defineProperty(File.prototype, 'path', {
- get: function() {
- return this.history[this.history.length - 1];
- },
- set: function(path) {
- if (typeof path !== 'string') throw new Error('path should be string');
-
- // record history only when path changed
- if (path && path !== this.path) {
- this.history.push(path);
- }
- }
-});
-
-module.exports = File;
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
deleted file mode 100644
index 89f09eda1..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var Buffer = require('buffer').Buffer;
-
-module.exports = function(buf) {
- var out = new Buffer(buf.length);
- buf.copy(out);
- return out;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
deleted file mode 100644
index d36df6ff6..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var isStream = require('./isStream');
-
-module.exports = function(stream) {
- if (!isStream(stream)) return;
-
- var streamType = stream.constructor.name;
- // avoid StreamStream
- if (streamType === 'Stream') streamType = '';
-
- return '<'+streamType+'Stream>';
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
deleted file mode 100644
index 8a767d174..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('buffer').Buffer.isBuffer;
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
deleted file mode 100644
index 7f22c63ae..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(v) {
- return v === null;
-};
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js
deleted file mode 100644
index 9ce0929b0..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Stream = require('stream').Stream;
-
-module.exports = function(o) {
- return !!o && o instanceof Stream;
-}; \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json
deleted file mode 100644
index 6000cffb3..000000000
--- a/node_modules/gulp/node_modules/gulp-util/node_modules/vinyl/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "vinyl",
- "description": "A virtual file format",
- "version": "0.5.3",
- "homepage": "http://github.com/wearefractal/vinyl",
- "repository": "git://github.com/wearefractal/vinyl.git",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main": "./index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "clone": "^1.0.0",
- "clone-stats": "^0.0.1",
- "replace-ext": "0.0.1"
- },
- "devDependencies": {
- "buffer-equal": "0.0.1",
- "event-stream": "^3.1.0",
- "istanbul": "^0.3.0",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.4.1",
- "lodash.templatesettings": "^3.1.0",
- "mocha": "^2.0.0",
- "rimraf": "^2.2.5",
- "should": "^7.0.0"
- },
- "scripts": {
- "test": "mocha && jshint lib",
- "coveralls": "istanbul cover _mocha && istanbul-coveralls"
- },
- "engines": {
- "node": ">= 0.9"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp/node_modules/gulp-util/package.json b/node_modules/gulp/node_modules/gulp-util/package.json
deleted file mode 100644
index 7ef3b82d7..000000000
--- a/node_modules/gulp/node_modules/gulp-util/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "gulp-util",
- "description": "Utility functions for gulp plugins",
- "version": "3.0.7",
- "repository": "gulpjs/gulp-util",
- "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "files": [
- "index.js",
- "lib"
- ],
- "dependencies": {
- "array-differ": "^1.0.0",
- "array-uniq": "^1.0.2",
- "beeper": "^1.0.0",
- "chalk": "^1.0.0",
- "dateformat": "^1.0.11",
- "fancy-log": "^1.1.0",
- "gulplog": "^1.0.0",
- "has-gulplog": "^0.1.0",
- "lodash._reescape": "^3.0.0",
- "lodash._reevaluate": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.template": "^3.0.0",
- "minimist": "^1.1.0",
- "multipipe": "^0.1.2",
- "object-assign": "^3.0.0",
- "replace-ext": "0.0.1",
- "through2": "^2.0.0",
- "vinyl": "^0.5.0"
- },
- "devDependencies": {
- "buffer-equal": "^0.0.1",
- "coveralls": "^2.11.2",
- "event-stream": "^3.1.7",
- "istanbul": "^0.3.5",
- "istanbul-coveralls": "^1.0.1",
- "jshint": "^2.5.11",
- "lodash.templatesettings": "^3.0.0",
- "mocha": "^2.0.1",
- "rimraf": "^2.2.8",
- "should": "^7.0.1"
- },
- "scripts": {
- "test": "jshint *.js lib/*.js test/*.js && mocha",
- "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
- },
- "engines": {
- "node": ">=0.10"
- },
- "license": "MIT"
-}
diff --git a/node_modules/gulp/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp/node_modules/lodash._reinterpolate/LICENSE.txt
deleted file mode 100644
index 17764328c..000000000
--- a/node_modules/gulp/node_modules/lodash._reinterpolate/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp/node_modules/lodash._reinterpolate/README.md
deleted file mode 100644
index 1423e502f..000000000
--- a/node_modules/gulp/node_modules/lodash._reinterpolate/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash._reinterpolate v3.0.0
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._reinterpolate
-```
-
-In Node.js/io.js:
-
-```js
-var reInterpolate = require('lodash._reinterpolate');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details.
diff --git a/node_modules/gulp/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp/node_modules/lodash._reinterpolate/index.js
deleted file mode 100644
index 5c06abcf3..000000000
--- a/node_modules/gulp/node_modules/lodash._reinterpolate/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * lodash 3.0.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/node_modules/gulp/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp/node_modules/lodash._reinterpolate/package.json
deleted file mode 100644
index 4cc9f1a53..000000000
--- a/node_modules/gulp/node_modules/lodash._reinterpolate/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "lodash._reinterpolate",
- "version": "3.0.0",
- "description": "The modern build of lodash’s internal `reInterpolate` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/node_modules/gulp/node_modules/lodash.template/LICENSE b/node_modules/gulp/node_modules/lodash.template/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/gulp/node_modules/lodash.template/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/lodash.template/README.md b/node_modules/gulp/node_modules/lodash.template/README.md
deleted file mode 100644
index f542f713b..000000000
--- a/node_modules/gulp/node_modules/lodash.template/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# lodash.template v3.6.2
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.template
-```
-
-In Node.js/io.js:
-
-```js
-var template = require('lodash.template');
-```
-
-See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/gulp/node_modules/lodash.template/index.js b/node_modules/gulp/node_modules/lodash.template/index.js
deleted file mode 100644
index e5a9629b9..000000000
--- a/node_modules/gulp/node_modules/lodash.template/index.js
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * lodash 3.6.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-var baseCopy = require('lodash._basecopy'),
- baseToString = require('lodash._basetostring'),
- baseValues = require('lodash._basevalues'),
- isIterateeCall = require('lodash._isiterateecall'),
- reInterpolate = require('lodash._reinterpolate'),
- keys = require('lodash.keys'),
- restParam = require('lodash.restparam'),
- templateSettings = require('lodash.templatesettings');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = template;
diff --git a/node_modules/gulp/node_modules/lodash.template/package.json b/node_modules/gulp/node_modules/lodash.template/package.json
deleted file mode 100644
index 88bb748e2..000000000
--- a/node_modules/gulp/node_modules/lodash.template/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "lodash.template",
- "version": "3.6.2",
- "description": "The modern build of lodash’s `_.template` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash._basecopy": "^3.0.0",
- "lodash._basetostring": "^3.0.0",
- "lodash._basevalues": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash._reinterpolate": "^3.0.0",
- "lodash.escape": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.restparam": "^3.0.0",
- "lodash.templatesettings": "^3.0.0"
- }
-}
diff --git a/node_modules/gulp/node_modules/object-assign/index.js b/node_modules/gulp/node_modules/object-assign/index.js
deleted file mode 100644
index 2164f93df..000000000
--- a/node_modules/gulp/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function ownEnumerableKeys(obj) {
- var keys = Object.getOwnPropertyNames(obj);
-
- if (Object.getOwnPropertySymbols) {
- keys = keys.concat(Object.getOwnPropertySymbols(obj));
- }
-
- return keys.filter(function (key) {
- return propIsEnumerable.call(obj, key);
- });
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = ownEnumerableKeys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
diff --git a/node_modules/gulp/node_modules/object-assign/license b/node_modules/gulp/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/gulp/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/object-assign/package.json b/node_modules/gulp/node_modules/object-assign/package.json
deleted file mode 100644
index c3b37fef7..000000000
--- a/node_modules/gulp/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "object-assign",
- "version": "3.0.0",
- "description": "ES6 Object.assign() ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/gulp/node_modules/object-assign/readme.md b/node_modules/gulp/node_modules/object-assign/readme.md
deleted file mode 100644
index aee51c12b..000000000
--- a/node_modules/gulp/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```sh
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-var objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, source, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/gulp/node_modules/replace-ext/.npmignore b/node_modules/gulp/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/gulp/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/replace-ext/.travis.yml b/node_modules/gulp/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/gulp/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/replace-ext/LICENSE b/node_modules/gulp/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/gulp/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/gulp/node_modules/replace-ext/README.md b/node_modules/gulp/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/gulp/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/replace-ext/index.js b/node_modules/gulp/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/gulp/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/gulp/node_modules/replace-ext/package.json b/node_modules/gulp/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/gulp/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/gulp/node_modules/replace-ext/test/main.js b/node_modules/gulp/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/gulp/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/hosted-git-info/.npmignore b/node_modules/hosted-git-info/.npmignore
deleted file mode 100644
index efab07fb1..000000000
--- a/node_modules/hosted-git-info/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-test
-.travis.yml
diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md
index 1db47dd65..f9db5dd95 100644
--- a/node_modules/hosted-git-info/README.md
+++ b/node_modules/hosted-git-info/README.md
@@ -4,11 +4,11 @@ This will let you identify and transform various git hosts URLs between
protocols. It also can tell you what the URL is for the raw path for
particular file for direct access without git.
-## Usage
+## Example
```javascript
var hostedGitInfo = require("hosted-git-info")
-var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git")
+var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts)
/* info looks like:
{
type: "github",
@@ -32,9 +32,39 @@ If it does match, the returned object has properties of:
* info.user -- The name of the user/org on the git host
* info.project -- The name of the project on the git host
-And methods of:
+## Version Contract
+
+The major version will be bumped any time…
+
+* The constructor stops accepting URLs that it previously accepted.
+* A method is removed.
+* A method can no longer accept the number and type of arguments it previously accepted.
+* A method can return a different type than it currently returns.
+
+Implications:
+
+* I do not consider the specific format of the urls returned from, say
+ `.https()` to be a part of the contract. The contract is that it will
+ return a string that can be used to fetch the repo via HTTPS. But what
+ that string looks like, specifically, can change.
+* Dropping support for a hosted git provider would constitute a breaking
+ change.
+
+## Usage
+
+### var info = hostedGitInfo.fromUrl(gitSpecifier[, options])
+
+* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one.
+* *options* is an optional object. It can have the following properties:
+ * *noCommittish* — If true then committishes won't be included in generated URLs.
+ * *noGitPlus* — If true then `git+` won't be prefixed on URLs.
+
+## Methods
+
+All of the methods take the same options as the `fromUrl` factory. Options
+provided to a method override those provided to the constructor.
-* info.file(path)
+* info.file(path, opts)
Given the path of a file relative to the repository, returns a URL for
directly fetching it from the githost. If no committish was set then
@@ -43,44 +73,48 @@ directly fetching it from the githost. If no committish was set then
For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`
-* info.shortcut()
+* info.shortcut(opts)
eg, `github:npm/hosted-git-info`
-* info.browse()
+* info.browse(opts)
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`
-* info.bugs()
+* info.bugs(opts)
eg, `https://github.com/npm/hosted-git-info/issues`
-* info.docs()
+* info.docs(opts)
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
-* info.https()
+* info.https(opts)
eg, `git+https://github.com/npm/hosted-git-info.git`
-* info.sshurl()
+* info.sshurl(opts)
eg, `git+ssh://git@github.com/npm/hosted-git-info.git`
-* info.ssh()
+* info.ssh(opts)
eg, `git@github.com:npm/hosted-git-info.git`
-* info.path()
+* info.path(opts)
eg, `npm/hosted-git-info`
+* info.tarball(opts)
+
+eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz`
+
* info.getDefaultRepresentation()
Returns the default output type. The default output type is based on the
string you passed in to be parsed
-* info.toString()
+* info.toString(opts)
Uses the getDefaultRepresentation to call one of the other methods to get a URL for
this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give
@@ -91,7 +125,6 @@ form of `org/project` will be normalized to `github:org/project`.
SSH connect strings will be normalized into `git+ssh` URLs.
-
## Supported hosts
Currently this supports Github, Bitbucket and Gitlab. Pull requests for
diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js
index 22343335e..93cf61744 100644
--- a/node_modules/hosted-git-info/git-host-info.js
+++ b/node_modules/hosted-git-info/git-host-info.js
@@ -9,19 +9,22 @@ var gitHosts = module.exports = {
'treepath': 'tree',
'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
'bugstemplate': 'https://{domain}/{user}/{project}/issues',
- 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}'
+ 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
},
bitbucket: {
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
'domain': 'bitbucket.org',
- 'treepath': 'src'
+ 'treepath': 'src',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz'
},
gitlab: {
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
'domain': 'gitlab.com',
'treepath': 'tree',
'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README',
- 'bugstemplate': 'https://{domain}/{user}/{project}/issues'
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}'
},
gist: {
'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ],
@@ -36,7 +39,8 @@ var gitHosts = module.exports = {
'docstemplate': 'https://{domain}/{project}{/committish}',
'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
'shortcuttemplate': '{type}:{project}{#committish}',
- 'pathtemplate': '{project}{#committish}'
+ 'pathtemplate': '{project}{#committish}',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
}
}
@@ -49,7 +53,7 @@ var gitHostDefaults = {
'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
'shortcuttemplate': '{type}:{user}/{project}{#committish}',
'pathtemplate': '{user}/{project}{#committish}',
- 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/
+ 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/
}
Object.keys(gitHosts).forEach(function (name) {
@@ -59,6 +63,6 @@ Object.keys(gitHosts).forEach(function (name) {
})
gitHosts[name].protocols_re = RegExp('^(' +
gitHosts[name].protocols.map(function (protocol) {
- return protocol.replace(/([\\+*{}()\[\]$^|])/g, '\\$1')
+ return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
}).join('|') + '):$')
})
diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js
index ea31380a4..4c6641bbf 100644
--- a/node_modules/hosted-git-info/git-host.js
+++ b/node_modules/hosted-git-info/git-host.js
@@ -1,7 +1,8 @@
'use strict'
var gitHosts = require('./git-host-info.js')
+var extend = Object.assign || require('util')._extend
-var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) {
+var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
var gitHostInfo = this
gitHostInfo.type = type
Object.keys(gitHosts[type]).forEach(function (key) {
@@ -12,6 +13,7 @@ var GitHost = module.exports = function (type, user, auth, project, committish,
gitHostInfo.project = project
gitHostInfo.committish = committish
gitHostInfo.default = defaultRepresentation
+ gitHostInfo.opts = opts || {}
}
GitHost.prototype = {}
@@ -19,9 +21,10 @@ GitHost.prototype.hash = function () {
return this.committish ? '#' + this.committish : ''
}
-GitHost.prototype._fill = function (template, vars) {
+GitHost.prototype._fill = function (template, opts) {
if (!template) return
- if (!vars) vars = {}
+ var vars = extend({}, opts)
+ opts = extend(extend({}, this.opts), opts)
var self = this
Object.keys(this).forEach(function (key) {
if (self[key] != null && vars[key] == null) vars[key] = self[key]
@@ -32,65 +35,80 @@ GitHost.prototype._fill = function (template, vars) {
vars[key] = encodeURIComponent(vars[key])
})
vars['auth@'] = rawAuth ? rawAuth + '@' : ''
- vars['#committish'] = rawComittish ? '#' + rawComittish : ''
- vars['/tree/committish'] = vars.committish
- ? '/' + vars.treepath + '/' + vars.committish
- : ''
- vars['/committish'] = vars.committish ? '/' + vars.committish : ''
- vars.committish = vars.committish || 'master'
+ if (opts.noCommittish) {
+ vars['#committish'] = ''
+ vars['/tree/committish'] = ''
+ vars['/comittish'] = ''
+ vars.comittish = ''
+ } else {
+ vars['#committish'] = rawComittish ? '#' + rawComittish : ''
+ vars['/tree/committish'] = vars.committish
+ ? '/' + vars.treepath + '/' + vars.committish
+ : ''
+ vars['/committish'] = vars.committish ? '/' + vars.committish : ''
+ vars.committish = vars.committish || 'master'
+ }
var res = template
Object.keys(vars).forEach(function (key) {
res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
})
- return res
+ if (opts.noGitPlus) {
+ return res.replace(/^git[+]/, '')
+ } else {
+ return res
+ }
}
-GitHost.prototype.ssh = function () {
- return this._fill(this.sshtemplate)
+GitHost.prototype.ssh = function (opts) {
+ return this._fill(this.sshtemplate, opts)
}
-GitHost.prototype.sshurl = function () {
- return this._fill(this.sshurltemplate)
+GitHost.prototype.sshurl = function (opts) {
+ return this._fill(this.sshurltemplate, opts)
}
-GitHost.prototype.browse = function () {
- return this._fill(this.browsetemplate)
+GitHost.prototype.browse = function (opts) {
+ return this._fill(this.browsetemplate, opts)
}
-GitHost.prototype.docs = function () {
- return this._fill(this.docstemplate)
+GitHost.prototype.docs = function (opts) {
+ return this._fill(this.docstemplate, opts)
}
-GitHost.prototype.bugs = function () {
- return this._fill(this.bugstemplate)
+GitHost.prototype.bugs = function (opts) {
+ return this._fill(this.bugstemplate, opts)
}
-GitHost.prototype.https = function () {
- return this._fill(this.httpstemplate)
+GitHost.prototype.https = function (opts) {
+ return this._fill(this.httpstemplate, opts)
}
-GitHost.prototype.git = function () {
- return this._fill(this.gittemplate)
+GitHost.prototype.git = function (opts) {
+ return this._fill(this.gittemplate, opts)
}
-GitHost.prototype.shortcut = function () {
- return this._fill(this.shortcuttemplate)
+GitHost.prototype.shortcut = function (opts) {
+ return this._fill(this.shortcuttemplate, opts)
}
-GitHost.prototype.path = function () {
- return this._fill(this.pathtemplate)
+GitHost.prototype.path = function (opts) {
+ return this._fill(this.pathtemplate, opts)
}
-GitHost.prototype.file = function (P) {
- return this._fill(this.filetemplate, {
+GitHost.prototype.tarball = function (opts) {
+ return this._fill(this.tarballtemplate, opts)
+}
+
+GitHost.prototype.file = function (P, opts) {
+ return this._fill(this.filetemplate, extend({
path: P.replace(/^[/]+/g, '')
- })
+ }, opts))
}
GitHost.prototype.getDefaultRepresentation = function () {
return this.default
}
-GitHost.prototype.toString = function () {
- return (this[this.default] || this.sshurl).call(this)
+GitHost.prototype.toString = function (opts) {
+ return (this[this.default] || this.sshurl).call(this, opts)
}
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
index 453ce87d3..8577ffb76 100644
--- a/node_modules/hosted-git-info/index.js
+++ b/node_modules/hosted-git-info/index.js
@@ -23,37 +23,43 @@ var authProtocols = {
'git+http:': true
}
-module.exports.fromUrl = function (giturl) {
+module.exports.fromUrl = function (giturl, opts) {
if (giturl == null || giturl === '') return
var url = fixupUnqualifiedGist(
isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
)
var parsed = parseGitUrl(url)
+ var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)'))
var matches = Object.keys(gitHosts).map(function (gitHostName) {
- var gitHostInfo = gitHosts[gitHostName]
- var auth = null
- if (parsed.auth && authProtocols[parsed.protocol]) {
- auth = decodeURIComponent(parsed.auth)
+ try {
+ var gitHostInfo = gitHosts[gitHostName]
+ var auth = null
+ if (parsed.auth && authProtocols[parsed.protocol]) {
+ auth = decodeURIComponent(parsed.auth)
+ }
+ var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
+ var user = null
+ var project = null
+ var defaultRepresentation = null
+ if (shortcutMatch && shortcutMatch[1] === gitHostName) {
+ user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
+ project = decodeURIComponent(shortcutMatch[3])
+ defaultRepresentation = 'shortcut'
+ } else {
+ if (parsed.host !== gitHostInfo.domain) return
+ if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
+ if (!parsed.path) return
+ var pathmatch = gitHostInfo.pathmatch
+ var matched = parsed.path.match(pathmatch)
+ if (!matched) return
+ if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, ''))
+ if (matched[2] != null) project = decodeURIComponent(matched[2])
+ defaultRepresentation = protocolToRepresentation(parsed.protocol)
+ }
+ return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)
+ } catch (ex) {
+ if (!(ex instanceof URIError)) throw ex
}
- var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
- var user = null
- var project = null
- var defaultRepresentation = null
- if (parsed.protocol === gitHostName + ':') {
- user = decodeURIComponent(parsed.host)
- project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1'))
- defaultRepresentation = 'shortcut'
- } else {
- if (parsed.host !== gitHostInfo.domain) return
- if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
- var pathmatch = gitHostInfo.pathmatch
- var matched = parsed.path.match(pathmatch)
- if (!matched) return
- if (matched[1] != null) user = decodeURIComponent(matched[1])
- if (matched[2] != null) project = decodeURIComponent(matched[2])
- defaultRepresentation = protocolToRepresentation(parsed.protocol)
- }
- return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation)
}).filter(function (gitHostInfo) { return gitHostInfo })
if (matches.length !== 1) return
return matches[0]
@@ -83,7 +89,7 @@ function fixupUnqualifiedGist (giturl) {
function parseGitUrl (giturl) {
if (typeof giturl !== 'string') giturl = '' + giturl
- var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
+ var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
if (!matched) return url.parse(giturl)
return {
protocol: 'git+ssh:',
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
index f24e39de5..a1437d402 100644
--- a/node_modules/hosted-git-info/package.json
+++ b/node_modules/hosted-git-info/package.json
@@ -1,6 +1,6 @@
{
"name": "hosted-git-info",
- "version": "2.1.5",
+ "version": "2.4.2",
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"main": "index.js",
"repository": {
@@ -20,10 +20,15 @@
},
"homepage": "https://github.com/npm/hosted-git-info",
"scripts": {
- "test": "standard && tap test/*.js"
+ "test": "standard && tap -J --coverage test/*.js"
},
"devDependencies": {
- "standard": "^3.3.2",
- "tap": "^0.4.13"
- }
+ "standard": "^9.0.2",
+ "tap": "^10.3.0"
+ },
+ "files": [
+ "index.js",
+ "git-host.js",
+ "git-host-info.js"
+ ]
}
diff --git a/node_modules/iconv-lite/.travis.yml b/node_modules/iconv-lite/.travis.yml
index f5343f193..0e82b1e83 100644
--- a/node_modules/iconv-lite/.travis.yml
+++ b/node_modules/iconv-lite/.travis.yml
@@ -1,14 +1,17 @@
sudo: false
- env:
- - CXX=g++-4.8
language: node_js
node_js:
- - "0.8"
- "0.10"
- "0.11"
- "0.12"
- "iojs"
- - "4.0"
+ - "4"
+ - "6"
+ - "node"
+
+
+ env:
+ - CXX=g++-4.8
addons:
apt:
sources:
@@ -16,5 +19,4 @@
packages:
- gcc-4.8
- g++-4.8
- before_install:
- - "test $TRAVIS_NODE_VERSION != '0.8' || npm install -g npm@1.2.8000"
+
diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md
index 421b1e2db..7471505bb 100644
--- a/node_modules/iconv-lite/Changelog.md
+++ b/node_modules/iconv-lite/Changelog.md
@@ -1,4 +1,19 @@
+# 0.4.15 / 2016-11-21
+
+ * Fixed typescript type definition (#137)
+
+
+# 0.4.14 / 2016-11-20
+
+ * Preparation for v1.0
+ * Added Node v6 and latest Node versions to Travis CI test rig
+ * Deprecated Node v0.8 support
+ * Typescript typings (@larssn)
+ * Fix encoding of Euro character in GB 18030 (inspired by @lygstate)
+ * Add ms prefix to dbcs windows encodings (@rokoroku)
+
+
# 0.4.13 / 2015-10-01
* Fix silly mistake in deprecation notice.
diff --git a/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md
index 160b7cf65..07955de2b 100644
--- a/node_modules/iconv-lite/README.md
+++ b/node_modules/iconv-lite/README.md
@@ -8,6 +8,7 @@
* Streaming support for Node v0.10+
* [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings.
* In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included).
+ * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included.
* License: MIT.
[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/)
@@ -120,6 +121,7 @@ Note: your results may vary, so please always check on your hardware.
* Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options
(f.ex. `iconv.decode(buf, enc, {stripBOM: false})`).
A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found.
+ * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module.
* Encoding: No BOM added, unless overridden by `addBOM: true` option.
## UTF-16 Encodings
@@ -154,4 +156,4 @@ $ open coverage/lcov-report/index.html
## Adoption
[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
-[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.io/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.io/projects/29053)
+[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.com/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.com/projects/29053)
diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js
index 2bf741528..a9e719b39 100644
--- a/node_modules/iconv-lite/encodings/dbcs-data.js
+++ b/node_modules/iconv-lite/encodings/dbcs-data.js
@@ -38,7 +38,6 @@ module.exports = {
//
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
-
'shiftjis': {
type: '_dbcs',
table: function() { return require('./tables/shiftjis.json') },
@@ -49,8 +48,10 @@ module.exports = {
'mskanji': 'shiftjis',
'sjis': 'shiftjis',
'windows31j': 'shiftjis',
+ 'ms31j': 'shiftjis',
'xsjis': 'shiftjis',
'windows932': 'shiftjis',
+ 'ms932': 'shiftjis',
'932': 'shiftjis',
'cp932': 'shiftjis',
@@ -64,8 +65,10 @@ module.exports = {
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
+
// == Chinese/GBK ==========================================================
// http://en.wikipedia.org/wiki/GBK
+ // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
'gb2312': 'cp936',
@@ -74,11 +77,10 @@ module.exports = {
'csgb2312': 'cp936',
'csiso58gb231280': 'cp936',
'euccn': 'cp936',
- 'isoir58': 'gbk',
// Microsoft's CP936 is a subset and approximation of GBK.
- // TODO: Euro = 0x80 in cp936, but not in GBK (where it's valid but undefined)
'windows936': 'cp936',
+ 'ms936': 'cp936',
'936': 'cp936',
'cp936': {
type: '_dbcs',
@@ -91,24 +93,28 @@ module.exports = {
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
},
'xgbk': 'gbk',
+ 'isoir58': 'gbk',
// GB18030 is an algorithmic extension of GBK.
+ // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
+ // http://icu-project.org/docs/papers/gb18030.html
+ // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
+ // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
'gb18030': {
type: '_dbcs',
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
gb18030: function() { return require('./tables/gb18030-ranges.json') },
+ encodeSkipVals: [0x80],
+ encodeAdd: {'€': 0xA2E3},
},
'chinese': 'gb18030',
- // TODO: Support GB18030 (~27000 chars + whole unicode mapping, cp54936)
- // http://icu-project.org/docs/papers/gb18030.html
- // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
- // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
// == Korean ===============================================================
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
'windows949': 'cp949',
+ 'ms949': 'cp949',
'949': 'cp949',
'cp949': {
type: '_dbcs',
@@ -149,6 +155,7 @@ module.exports = {
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
'windows950': 'cp950',
+ 'ms950': 'cp950',
'950': 'cp950',
'cp950': {
type: '_dbcs',
@@ -166,5 +173,4 @@ module.exports = {
'cnbig5': 'big5hkscs',
'csbig5': 'big5hkscs',
'xxbig5': 'big5hkscs',
-
};
diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js
index 399f55159..ac47a66d1 100644
--- a/node_modules/iconv-lite/encodings/utf16.js
+++ b/node_modules/iconv-lite/encodings/utf16.js
@@ -1,5 +1,7 @@
"use strict"
+// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
+
// == UTF16-BE codec. ==========================================================
exports.utf16be = Utf16BECodec;
diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json
index 826225ee3..a39a7e310 100644
--- a/node_modules/iconv-lite/package.json
+++ b/node_modules/iconv-lite/package.json
@@ -1,7 +1,7 @@
{
"name": "iconv-lite",
"description": "Convert character encodings in pure javascript.",
- "version": "0.4.13",
+ "version": "0.4.15",
"license": "MIT",
"keywords": ["iconv", "convert", "charset", "icu"],
@@ -22,6 +22,7 @@
],
"main": "./lib/index.js",
+ "typings": "./lib/index.d.ts",
"homepage": "https://github.com/ashtuchkin/iconv-lite",
"bugs": "https://github.com/ashtuchkin/iconv-lite/issues",
"repository": {
@@ -29,7 +30,7 @@
"url": "git://github.com/ashtuchkin/iconv-lite.git"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">=0.10.0"
},
"scripts": {
"coverage": "istanbul cover _mocha -- --grep .",
@@ -42,11 +43,11 @@
},
"devDependencies": {
"mocha": "*",
- "request": "2.47",
+ "request": "*",
"unorm": "*",
"errto": "*",
"async": "*",
"istanbul": "*",
- "iconv": "2.1"
+ "iconv": "*"
}
}
diff --git a/node_modules/interpret/CHANGELOG b/node_modules/interpret/CHANGELOG
index eeaee86bd..cbc8a8afd 100644
--- a/node_modules/interpret/CHANGELOG
+++ b/node_modules/interpret/CHANGELOG
@@ -1,3 +1,15 @@
+v1.0.3:
+ date: 2017-04-18
+ changes:
+ - fix buble support
+v1.0.2:
+ date: 2017-03-29
+ changes:
+ - add support for coffeescript (now with no hyphen)
+v1.0.1:
+ date: 2016-05-01
+ changes:
+ - add support for buble
v1.0.0:
date: 2015-11-18
changes:
diff --git a/node_modules/interpret/README.md b/node_modules/interpret/README.md
index 34ce5b644..f1b104105 100644
--- a/node_modules/interpret/README.md
+++ b/node_modules/interpret/README.md
@@ -41,16 +41,7 @@ Map file types to modules which provide a [require.extensions] loader.
}
}
],
- '.buble.js': [
- {
- module: 'buble/register',
- register: function (module) {
- module({
- extensions: '.js'
- });
- }
- }
- ],
+ '.buble.js': 'buble/register',
'.cirru': 'cirru-script/lib/register',
'.cjsx': 'node-cjsx/register',
'.co': 'coco',
diff --git a/node_modules/interpret/index.js b/node_modules/interpret/index.js
index db4cb94c3..1ef66b8ec 100644
--- a/node_modules/interpret/index.js
+++ b/node_modules/interpret/index.js
@@ -27,21 +27,12 @@ const extensions = {
}
}
],
- '.buble.js': [
- {
- module: 'buble/register',
- register: function (module) {
- module({
- extensions: '.js'
- });
- }
- }
- ],
+ '.buble.js': 'buble/register',
'.cirru': 'cirru-script/lib/register',
'.cjsx': 'node-cjsx/register',
'.co': 'coco',
- '.coffee': ['coffee-script/register', 'coffee-script'],
- '.coffee.md': ['coffee-script/register', 'coffee-script'],
+ '.coffee': ['coffee-script/register', 'coffee-script', 'coffeescript/register', 'coffeescript'],
+ '.coffee.md': ['coffee-script/register', 'coffee-script', 'coffeescript/register', 'coffeescript'],
'.csv': 'require-csv',
'.eg': 'earlgrey/register',
'.iced': ['iced-coffee-script/register', 'iced-coffee-script'],
@@ -85,7 +76,7 @@ const extensions = {
}
}
],
- '.litcoffee': ['coffee-script/register', 'coffee-script'],
+ '.litcoffee': ['coffee-script/register', 'coffee-script', 'coffeescript/register', 'coffeescript'],
'.liticed': 'iced-coffee-script/register',
'.ls': ['livescript', 'LiveScript'],
'.node': null,
diff --git a/node_modules/interpret/package.json b/node_modules/interpret/package.json
index 7eb067aab..e2bd2e4a7 100644
--- a/node_modules/interpret/package.json
+++ b/node_modules/interpret/package.json
@@ -1,7 +1,7 @@
{
"name": "interpret",
"description": "A dictionary of file extensions and associated module loaders.",
- "version": "1.0.1",
+ "version": "1.0.3",
"homepage": "https://github.com/tkellen/node-interpret",
"author": {
"name": "Tyler Kellen",
diff --git a/node_modules/is-buffer/.travis.yml b/node_modules/is-buffer/.travis.yml
deleted file mode 100644
index 24885a36d..000000000
--- a/node_modules/is-buffer/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - node
-env:
- global:
- - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps=
- - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk=
diff --git a/node_modules/is-buffer/.zuul.yml b/node_modules/is-buffer/.zuul.yml
deleted file mode 100644
index eb3cae6d9..000000000
--- a/node_modules/is-buffer/.zuul.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-ui: tape
-browsers:
- - name: chrome
- version: 39..latest
- - name: firefox
- version: 34..latest
- - name: safari
- version: 5..latest
- - name: microsoftedge
- version: latest
- - name: ie
- version: 8..latest
- - name: android
- version: 5.0..latest
diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json
index 7915353be..b83b7b892 100644
--- a/node_modules/is-buffer/package.json
+++ b/node_modules/is-buffer/package.json
@@ -1,7 +1,7 @@
{
"name": "is-buffer",
"description": "Determine if an object is a Buffer",
- "version": "1.1.4",
+ "version": "1.1.5",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
@@ -12,7 +12,7 @@
},
"dependencies": {},
"devDependencies": {
- "standard": "^7.0.0",
+ "standard": "*",
"tape": "^4.0.0",
"zuul": "^3.0.0"
},
diff --git a/node_modules/is-unc-path/LICENSE b/node_modules/is-unc-path/LICENSE
index 33754daec..652517172 100644
--- a/node_modules/is-unc-path/LICENSE
+++ b/node_modules/is-unc-path/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015 Jon Schlinkert
+Copyright (c) 2015-2016, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/is-unc-path/README.md b/node_modules/is-unc-path/README.md
index 2d609fe1f..86b0c3a22 100644
--- a/node_modules/is-unc-path/README.md
+++ b/node_modules/is-unc-path/README.md
@@ -1,11 +1,13 @@
-# is-unc-path [![NPM version](https://badge.fury.io/js/is-unc-path.svg)](http://badge.fury.io/js/is-unc-path)
+# is-unc-path [![NPM version](https://img.shields.io/npm/v/is-unc-path.svg?style=flat)](https://www.npmjs.com/package/is-unc-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![NPM total downloads](https://img.shields.io/npm/dt/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-unc-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-unc-path)
> Returns true if a filepath is a windows UNC file path.
-Install with [npm](https://www.npmjs.com/)
+## Install
+
+Install with [npm](https://www.npmjs.com/):
```sh
-$ npm i is-unc-path --save
+$ npm install --save is-unc-path
```
## Usage
@@ -21,12 +23,7 @@ Returns true for windows UNC paths:
```js
isUncPath('\\/foo/bar');
isUncPath('\\\\foo/bar');
-isUncPath('\\\\foo\\admin$');
-isUncPath('\\\\foo\\admin$\\system32');
-isUncPath('\\\\foo\\temp');
-isUncPath('\\\\/foo/bar');
-isUncPath('\\\\\\/foo/bar');
-```
+isUncPath('\\\\foo\\admin
**false**
@@ -58,39 +55,139 @@ var myRegex = new RegExp(isUncPath.source + 'foo');
* The computer name is always preceded by a double backward-slash (`\\`).
* UNC paths cannot contain a drive letter (such as `D:`)
-## Related projects
+## About
+
+### Related projects
+
+* [dirname-regex](https://www.npmjs.com/package/dirname-regex): Regular expression for matching the directory part of a file path. | [homepage](https://github.com/regexps/dirname-regex "Regular expression for matching the directory part of a file path.")
+* [dotdir-regex](https://www.npmjs.com/package/dotdir-regex): Regex for matching dot-directories, like `.git/` | [homepage](https://github.com/regexps/dotdir-regex "Regex for matching dot-directories, like `.git/`")
+* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex "Regular expresson for matching dotfiles.")
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
+* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.")
+* [path-regex](https://www.npmjs.com/package/path-regex): Regular expression for matching the parts of a file path. | [homepage](https://github.com/regexps/path-regex "Regular expression for matching the parts of a file path.")
+* [unc-path-regex](https://www.npmjs.com/package/unc-path-regex): Regular expression for testing if a file path is a windows UNC file path. Can… [more](https://github.com/regexhq/unc-path-regex) | [homepage](https://github.com/regexhq/unc-path-regex "Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property.")
+
+### Contributing
-* [dotfile-regex](https://github.com/regexps/dotfile-regex): Regular expresson for matching dotfiles.
-* [dotdir-regex](https://github.com/regexps/dotdir-regex): Regex for matching dot-directories, like `.git/`
-* [dirname-regex](https://github.com/regexps/dirname-regex): Regular expression for matching the directory part of a file path.
-* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.
-* [path-regex](https://github.com/regexps/path-regex): Regular expression for matching the parts of a file path.
-* [unc-path-regex](https://github.com/jonschlinkert/unc-path-regex): Returns true if a filepath is a windows UNC file path.
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-## Running tests
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
Install dev dependencies:
```sh
-$ npm i -d && npm test
+$ npm install -d && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/is-unc-path/blob/master/LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 07, 2016._
+
+);
+isUncPath('\\foo\admin$\system32');
+isUncPath('\\foo\temp');
+isUncPath('\\/foo/bar');
+isUncPath('\\\/foo/bar');
+
+```
+**false**
+
+Returns false for non-UNC paths:
+
+```js
+isUncPath('/foo/bar');
+isUncPath('/');
+isUncPath('/foo');
+isUncPath('/foo/');
+isUncPath('c:');
+isUncPath('c:.');
+isUncPath('c:./');
+isUncPath('c:./file');
+isUncPath('c:/');
+isUncPath('c:/file');
+```
+
+**Customization**
+
+Use `.source` to use the regex as a component of another regex:
+
+```js
+var myRegex = new RegExp(isUncPath.source + 'foo');
+```
+
+**[Rules for UNC paths](http://resources.esri.com/help/9.3/ArcGISDesktop/com/Gp_ToolRef/sharing_tools_and_toolboxes/pathnames_explained_colon_absolute_relative_unc_and_url.htm)**
+
+* The computer name is always preceded by a double backward-slash (`\\`).
+* UNC paths cannot contain a drive letter (such as `D:`)
+
+## About
+
+### Related projects
+
+* [dirname-regex](https://www.npmjs.com/package/dirname-regex): Regular expression for matching the directory part of a file path. | [homepage](https://github.com/regexps/dirname-regex "Regular expression for matching the directory part of a file path.")
+* [dotdir-regex](https://www.npmjs.com/package/dotdir-regex): Regex for matching dot-directories, like `.git/` | [homepage](https://github.com/regexps/dotdir-regex "Regex for matching dot-directories, like `.git/`")
+* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex "Regular expresson for matching dotfiles.")
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
+* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.")
+* [path-regex](https://www.npmjs.com/package/path-regex): Regular expression for matching the parts of a file path. | [homepage](https://github.com/regexps/path-regex "Regular expression for matching the parts of a file path.")
+* [unc-path-regex](https://www.npmjs.com/package/unc-path-regex): Regular expression for testing if a file path is a windows UNC file path. Can… [more](https://github.com/regexhq/unc-path-regex) | [homepage](https://github.com/regexhq/unc-path-regex "Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
```
-## Contributing
+### Running tests
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-unc-path/issues/new)
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
-## Author
+### Author
**Jon Schlinkert**
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-## License
+### License
-Copyright © 2015 Jon Schlinkert
-Released under the MIT license.
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/is-unc-path/blob/master/LICENSE).
***
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 07, 2015._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 07, 2016._ \ No newline at end of file
diff --git a/node_modules/is-unc-path/package.json b/node_modules/is-unc-path/package.json
index 6d0984a65..99985b2bf 100644
--- a/node_modules/is-unc-path/package.json
+++ b/node_modules/is-unc-path/package.json
@@ -1,7 +1,7 @@
{
"name": "is-unc-path",
"description": "Returns true if a filepath is a windows UNC file path.",
- "version": "0.1.1",
+ "version": "0.1.2",
"homepage": "https://github.com/jonschlinkert/is-unc-path",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/is-unc-path",
@@ -19,15 +19,19 @@
"scripts": {
"test": "mocha"
},
+ "dependencies": {
+ "unc-path-regex": "^0.1.0"
+ },
"devDependencies": {
- "mocha": "*",
- "should": "*"
+ "gulp-format-md": "^0.1.11",
+ "mocha": "*"
},
"keywords": [
"absolute",
"expression",
"file",
"filepath",
+ "is",
"match",
"matching",
"path",
@@ -38,7 +42,32 @@
"win",
"windows"
],
- "dependencies": {
- "unc-path-regex": "^0.1.0"
+ "verb": {
+ "related": {
+ "list": [
+ "dirname-regex",
+ "dotdir-regex",
+ "dotfile-regex",
+ "is-glob",
+ "is-unc-path",
+ "path-regex",
+ "unc-path-regex"
+ ]
+ },
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ },
+ "reflinks": [
+ "verb",
+ "verb-generate-readme"
+ ]
}
}
diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md
index 30995ad7d..35769e844 100644
--- a/node_modules/isexe/README.md
+++ b/node_modules/isexe/README.md
@@ -1,9 +1,9 @@
# isexe
-Minimal module to check if a file is executable.
+Minimal module to check if a file is executable, and a normal file.
-Uses `fs.access` if available, and tests against the `PATHEXT`
-environment variable on Windows.
+Uses `fs.stat` and tests against the `PATHEXT` environment variable on
+Windows.
## USAGE
@@ -34,8 +34,8 @@ var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
Check if the path is executable. If no callback provided, and a
global `Promise` object is available, then a Promise will be returned.
-Will raise whatever errors may be raised by `fs.access` or `fs.stat`,
-unless `options.ignoreErrors` is set to true.
+Will raise whatever errors may be raised by `fs.stat`, unless
+`options.ignoreErrors` is set to true.
### `isexe.sync(path, [options])`
@@ -45,7 +45,7 @@ Same as `isexe` but returns the value and throws any errors raised.
* `ignoreErrors` Treat all errors as "no, this is not executable", but
don't raise them.
-* `uid` Number to use as the user id when using the `mode` approach.
-* `gid` Number to use as the group id when using the `mode` approach.
+* `uid` Number to use as the user id
+* `gid` Number to use as the group id
* `pathExt` List of path extensions to use instead of `PATHEXT`
environment variable on Windows.
diff --git a/node_modules/isexe/access.js b/node_modules/isexe/access.js
deleted file mode 100644
index e67b28bd6..000000000
--- a/node_modules/isexe/access.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = isexe
-isexe.sync = sync
-
-var fs = require('fs')
-
-function isexe (path, _, cb) {
- fs.access(path, fs.X_OK, function (er) {
- cb(er, !er)
- })
-}
-
-function sync (path, _) {
- fs.accessSync(path, fs.X_OK)
- return true
-}
diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js
index ff8ef113b..553fb32b1 100644
--- a/node_modules/isexe/index.js
+++ b/node_modules/isexe/index.js
@@ -2,8 +2,6 @@ var fs = require('fs')
var core
if (process.platform === 'win32' || global.TESTING_WINDOWS) {
core = require('./windows.js')
-} else if (typeof fs.access === 'function') {
- core = require('./access.js')
} else {
core = require('./mode.js')
}
diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js
index 204428072..1995ea4a0 100644
--- a/node_modules/isexe/mode.js
+++ b/node_modules/isexe/mode.js
@@ -4,13 +4,17 @@ isexe.sync = sync
var fs = require('fs')
function isexe (path, options, cb) {
- fs.stat(path, function (er, st) {
- cb(er, er ? false : checkMode(st, options))
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, options))
})
}
function sync (path, options) {
- return checkMode(fs.statSync(path), options)
+ return checkStat(fs.statSync(path), options)
+}
+
+function checkStat (stat, options) {
+ return stat.isFile() && checkMode(stat, options)
}
function checkMode (stat, options) {
diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json
index c86fe7493..e45268944 100644
--- a/node_modules/isexe/package.json
+++ b/node_modules/isexe/package.json
@@ -1,6 +1,6 @@
{
"name": "isexe",
- "version": "1.1.2",
+ "version": "2.0.0",
"description": "Minimal module to check if a file is executable.",
"main": "index.js",
"directories": {
@@ -9,10 +9,13 @@
"devDependencies": {
"mkdirp": "^0.5.1",
"rimraf": "^2.5.0",
- "tap": "^5.1.2"
+ "tap": "^10.3.0"
},
"scripts": {
- "test": "tap test/*.js --branches=100 --statements=100 --functions=100 --lines=100"
+ "test": "tap test/*.js --100",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
},
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "ISC",
diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js
index 969fc9a0a..d926df64b 100644
--- a/node_modules/isexe/test/basic.js
+++ b/node_modules/isexe/test/basic.js
@@ -207,5 +207,15 @@ function runTest (t, options) {
})
})
+ t.test('directory is not executable', function (t) {
+ isexe(__dirname, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.notOk(is)
+ t.end()
+ })
+ })
+
t.end()
}
diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js
index aba8561f3..34996734d 100644
--- a/node_modules/isexe/windows.js
+++ b/node_modules/isexe/windows.js
@@ -24,13 +24,19 @@ function checkPathExt (path, options) {
return false
}
+function checkStat (stat, path, options) {
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
+ return false
+ }
+ return checkPathExt(path, options)
+}
+
function isexe (path, options, cb) {
- fs.stat(path, function (er, st) {
- cb(er, er ? false : checkPathExt(path, options))
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, path, options))
})
}
function sync (path, options) {
- fs.statSync(path)
- return checkPathExt(path, options)
+ return checkStat(fs.statSync(path), path, options)
}
diff --git a/node_modules/istanbul-lib-coverage/CHANGELOG.md b/node_modules/istanbul-lib-coverage/CHANGELOG.md
index 12057e61a..7b01b5c81 100644
--- a/node_modules/istanbul-lib-coverage/CHANGELOG.md
+++ b/node_modules/istanbul-lib-coverage/CHANGELOG.md
@@ -1,6 +1,20 @@
# Change Log
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+All notable changes to this project will be documented in this file.
+See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.0.2"></a>
+## [1.0.2](https://github.com/istanbuljs/istanbul-lib-coverage/compare/istanbul-lib-coverage@1.0.1...istanbul-lib-coverage@1.0.2) (2017-03-27)
+
+<a name="1.0.1"></a>
+## [1.0.1](https://github.com/istanbuljs/istanbul-lib-coverage/compare/v1.0.0...v1.0.1) (2017-01-18)
+
+
+### Bug Fixes
+
+* handle edge-case surrounding merging two file coverage reports ([22e154c](https://github.com/istanbuljs/istanbul-lib-coverage/commit/22e154c))
+
+
<a name="1.0.0"></a>
# [1.0.0](https://github.com/istanbuljs/istanbul-lib-coverage/compare/v1.0.0-alpha.3...v1.0.0) (2016-08-12)
diff --git a/node_modules/istanbul-lib-coverage/README.md b/node_modules/istanbul-lib-coverage/README.md
index 2f893e297..8e98eb579 100644
--- a/node_modules/istanbul-lib-coverage/README.md
+++ b/node_modules/istanbul-lib-coverage/README.md
@@ -1,6 +1,7 @@
istanbul-lib-coverage
---------------------
+[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-lib-coverage.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-coverage.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-coverage)
An API that provides a read-only view of coverage information with the ability
diff --git a/node_modules/istanbul-lib-coverage/lib/file.js b/node_modules/istanbul-lib-coverage/lib/file.js
index 0cfb8a4be..3cb0ce263 100644
--- a/node_modules/istanbul-lib-coverage/lib/file.js
+++ b/node_modules/istanbul-lib-coverage/lib/file.js
@@ -250,6 +250,10 @@ FileCoverage.prototype.merge = function (other) {
var i,
retArray = that.data.b[k],
secondArray = other.b[k];
+ if (!retArray) {
+ that.data.b[k] = secondArray;
+ return;
+ }
for (i = 0; i < retArray.length; i += 1) {
retArray[i] += secondArray[i];
}
diff --git a/node_modules/istanbul-lib-coverage/package.json b/node_modules/istanbul-lib-coverage/package.json
index f9ce1f2b8..2e9bc8cc9 100644
--- a/node_modules/istanbul-lib-coverage/package.json
+++ b/node_modules/istanbul-lib-coverage/package.json
@@ -1,23 +1,17 @@
{
"name": "istanbul-lib-coverage",
- "version": "1.0.0",
+ "version": "1.0.2",
"description": "Data library for istanbul coverage objects",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "index.js",
"scripts": {
- "fast": "mocha test/",
"pretest": "jshint index.js lib/ test/",
- "test": "istanbul cover -x 'docs/**' --include-all-sources --print=both _mocha -- test/",
- "posttest": "istanbul check-coverage --statements 95 --branches 80",
- "release": "standard-version"
+ "test": "mocha"
},
"devDependencies": {
"chai": "^3.0.0",
- "coveralls": "^2.11.4",
- "istanbul": "^0.4.0",
"jshint": "^2.8.0",
- "mocha": "^2.2.5",
- "standard-version": "^2.4.0"
+ "mocha": "^3.2.0"
},
"karmaDeps": {
"browserify-istanbul": "^0.2.1",
diff --git a/node_modules/istanbul-lib-instrument/CHANGELOG.md b/node_modules/istanbul-lib-instrument/CHANGELOG.md
index 92cce8615..d1c32d8a1 100644
--- a/node_modules/istanbul-lib-instrument/CHANGELOG.md
+++ b/node_modules/istanbul-lib-instrument/CHANGELOG.md
@@ -1,6 +1,74 @@
# Change Log
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+All notable changes to this project will be documented in this file.
+See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.7.0"></a>
+# [1.7.0](https://github.com/istanbuljs/istanbul-lib-instrument/compare/istanbul-lib-instrument@1.6.2...istanbul-lib-instrument@1.7.0) (2017-03-27)
+
+
+### Features
+
+* use extended babylon support; adding features such as jsx ([#22](https://github.com/istanbuljs/istanbuljs/issues/22)) ([11c2438](https://github.com/istanbuljs/istanbul-lib-instrument/commit/11c2438))
+
+<a name="1.6.2"></a>
+## [1.6.2](https://github.com/istanbuljs/istanbul-lib-instrument/compare/istanbul-lib-instrument@1.6.1...istanbul-lib-instrument@1.6.2) (2017-03-22)
+
+
+### Bug Fixes
+
+* loc is sometimes not defined, so loc.start fails see [#99](https://github.com/istanbuljs/istanbuljs/issues/99) ([#18](https://github.com/istanbuljs/istanbuljs/issues/18)) ([df85ba6](https://github.com/istanbuljs/istanbul-lib-instrument/commit/df85ba6))
+
+<a name="1.6.1"></a>
+## [1.6.1](https://github.com/istanbuljs/istanbul-lib-instrument/compare/istanbul-lib-instrument@1.6.0...istanbul-lib-instrument@1.6.1) (2017-03-21)
+
+<a name="1.6.0"></a>
+# [1.6.0](https://github.com/istanbuljs/istanbul-lib-instrument/compare/istanbul-lib-instrument@1.4.2...istanbul-lib-instrument@1.6.0) (2017-03-21)
+
+
+### Features
+
+* adds line number property back to coverage.json ([b03b927](https://github.com/istanbuljs/istanbul-lib-instrument/commit/b03b927))
+
+<a name="1.4.2"></a>
+## [1.4.2](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.4.1...v1.4.2) (2017-01-04)
+
+
+### Bug Fixes
+
+* only hoist counter for a smaller subset of function declarations ([9f8931e](https://github.com/istanbuljs/istanbul-lib-instrument/commit/9f8931e))
+
+
+
+<a name="1.4.1"></a>
+## [1.4.1](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.4.0...v1.4.1) (2017-01-04)
+
+
+### Bug Fixes
+
+* address regression discussed in https://github.com/istanbuljs/babel-plugin-istanbul/issues/78 ([#40](https://github.com/istanbuljs/istanbul-lib-instrument/issues/40)) ([7f458a3](https://github.com/istanbuljs/istanbul-lib-instrument/commit/7f458a3))
+
+
+
+<a name="1.4.0"></a>
+# [1.4.0](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.3.1...v1.4.0) (2017-01-02)
+
+
+### Features
+
+* preserve inferred function names ([#38](https://github.com/istanbuljs/istanbul-lib-instrument/issues/38)) ([312666e](https://github.com/istanbuljs/istanbul-lib-instrument/commit/312666e))
+
+
+
+<a name="1.3.1"></a>
+## [1.3.1](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.3.0...v1.3.1) (2016-12-27)
+
+
+### Bug Fixes
+
+* function declaration assignment now retains function name ([#33](https://github.com/istanbuljs/istanbul-lib-instrument/issues/33)) ([2d781da](https://github.com/istanbuljs/istanbul-lib-instrument/commit/2d781da))
+
+
<a name="1.3.0"></a>
# [1.3.0](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.2.0...v1.3.0) (2016-11-10)
diff --git a/node_modules/istanbul-lib-instrument/dist/instrumenter.js b/node_modules/istanbul-lib-instrument/dist/instrumenter.js
index 5c4e197c9..ff64c3afb 100644
--- a/node_modules/istanbul-lib-instrument/dist/instrumenter.js
+++ b/node_modules/istanbul-lib-instrument/dist/instrumenter.js
@@ -120,7 +120,8 @@ var Instrumenter = function () {
var opts = this.opts;
var ast = babylon.parse(code, {
allowReturnOutsideFunction: opts.autoWrap,
- sourceType: opts.esModules ? "module" : "script"
+ sourceType: opts.esModules ? "module" : "script",
+ plugins: ['asyncGenerators', 'dynamicImport', 'flow', 'jsx']
});
var ee = (0, _visitor2.default)(t, filename, {
coverageVariable: opts.coverageVariable,
diff --git a/node_modules/istanbul-lib-instrument/dist/source-coverage.js b/node_modules/istanbul-lib-instrument/dist/source-coverage.js
index f2fba09fc..16ece6821 100644
--- a/node_modules/istanbul-lib-instrument/dist/source-coverage.js
+++ b/node_modules/istanbul-lib-instrument/dist/source-coverage.js
@@ -73,7 +73,9 @@ var SourceCoverage = function (_classes$FileCoverage) {
this.data.fnMap[f] = {
name: name,
decl: cloneLocation(decl),
- loc: cloneLocation(loc)
+ loc: cloneLocation(loc),
+ // DEPRECATED: some legacy reports require this info.
+ line: loc && loc.start.line
};
this.data.f[f] = 0;
this.meta.last.f += 1;
@@ -87,7 +89,9 @@ var SourceCoverage = function (_classes$FileCoverage) {
this.data.branchMap[b] = {
loc: cloneLocation(loc),
type: type,
- locations: []
+ locations: [],
+ // DEPRECATED: some legacy reports require this info.
+ line: loc && loc.start.line
};
this.meta.last.b += 1;
return b;
diff --git a/node_modules/istanbul-lib-instrument/dist/visitor.js b/node_modules/istanbul-lib-instrument/dist/visitor.js
index cae5146f5..518b1e31e 100644
--- a/node_modules/istanbul-lib-instrument/dist/visitor.js
+++ b/node_modules/istanbul-lib-instrument/dist/visitor.js
@@ -184,6 +184,15 @@ var VisitState = function () {
path.node.body.unshift(T.expressionStatement(increment));
} else if (path.isStatement()) {
path.insertBefore(T.expressionStatement(increment));
+ } else if ((path.isFunctionExpression() || path.isArrowFunctionExpression()) && T.isVariableDeclarator(path.parentPath)) {
+ // make an attempt to hoist the statement counter, so that
+ // function names are maintained.
+ var parent = path.parentPath.parentPath;
+ if (parent && (T.isProgram(parent.parentPath) || T.isBlockStatement(parent.parentPath))) {
+ parent.insertBefore(T.expressionStatement(increment));
+ } else {
+ path.replaceWith(T.sequenceExpression([increment, path.node]));
+ }
} else /* istanbul ignore else: not expected */if (path.isExpression()) {
path.replaceWith(T.sequenceExpression([increment, path.node]));
} else {
@@ -210,6 +219,7 @@ var VisitState = function () {
return;
}
var n = path.node;
+
var dloc = null;
// get location for declaration
switch (n.type) {
@@ -231,6 +241,7 @@ var VisitState = function () {
end: { line: n.loc.start.line, column: n.loc.start.column + 1 }
};
}
+
var name = path.node.id ? path.node.id.name : path.node.name;
var index = this.cov.newFunction(name, dloc, path.node.body.loc);
var increment = this.increase('f', index, null);
diff --git a/node_modules/istanbul-lib-instrument/node_modules/.bin/semver b/node_modules/istanbul-lib-instrument/node_modules/.bin/semver
index 58b26795f..b3ca6032f 120000
--- a/node_modules/istanbul-lib-instrument/node_modules/.bin/semver
+++ b/node_modules/istanbul-lib-instrument/node_modules/.bin/semver
@@ -1 +1 @@
-../../../normalize-package-data/node_modules/semver/bin/semver \ No newline at end of file
+../../../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/LICENSE b/node_modules/istanbul-lib-instrument/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/README.md b/node_modules/istanbul-lib-instrument/node_modules/semver/README.md
deleted file mode 100644
index cbd956549..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/README.md
+++ /dev/null
@@ -1,350 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
- $ node
- var semver = require('semver')
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- semver.clean(' =v1.2.3 ') // '1.2.3'
- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
- semver.gt('1.2.3', '9.8.7') // false
- semver.lt('1.2.3', '9.8.7') // true
-
-As a command-line utility:
-
- $ semver -h
-
- SemVer 5.1.0
-
- A JavaScript implementation of the http://semver.org/ specification
- Copyright Isaac Z. Schlueter
-
- Usage: semver [options] <version> [<version> [...]]
- Prints valid versions sorted by SemVer precedence
-
- Options:
- -r --range <range>
- Print versions that match the specified range.
-
- -i --increment [<level>]
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
- --preid <identifier>
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
- -l --loose
- Interpret versions and ranges loosely
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no satisfying versions are found, then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'prerelease', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/bin/semver b/node_modules/istanbul-lib-instrument/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857e..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/package.json b/node_modules/istanbul-lib-instrument/node_modules/semver/package.json
deleted file mode 100644
index ec9b01643..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "semver",
- "version": "5.3.0",
- "description": "The semantic version parser used by npm.",
- "main": "semver.js",
- "scripts": {
- "test": "tap test/*.js"
- },
- "devDependencies": {
- "tap": "^2.0.0"
- },
- "license": "ISC",
- "repository": "https://github.com/npm/node-semver",
- "bin": {
- "semver": "./bin/semver"
- },
- "files": [
- "bin",
- "range.bnf",
- "semver.js"
- ]
-}
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/range.bnf b/node_modules/istanbul-lib-instrument/node_modules/semver/range.bnf
deleted file mode 100644
index 25ebd5c83..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/istanbul-lib-instrument/node_modules/semver/semver.js b/node_modules/istanbul-lib-instrument/node_modules/semver/semver.js
deleted file mode 100644
index 5f1a3c5c9..000000000
--- a/node_modules/istanbul-lib-instrument/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1203 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num;
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<';
- if (xm)
- M = +M + 1;
- else
- m = +m + 1;
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.minSatisfying = minSatisfying;
-function minSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return compare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
-
-exports.prerelease = prerelease;
-function prerelease(version, loose) {
- var parsed = parse(version, loose);
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
-}
diff --git a/node_modules/istanbul-lib-instrument/package.json b/node_modules/istanbul-lib-instrument/package.json
index 8b83b763c..48cf66cb4 100644
--- a/node_modules/istanbul-lib-instrument/package.json
+++ b/node_modules/istanbul-lib-instrument/package.json
@@ -1,16 +1,14 @@
{
"name": "istanbul-lib-instrument",
- "version": "1.3.0",
+ "version": "1.7.0",
"description": "Core istanbul API for JS code coverage",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "dist/index.js",
"scripts": {
"release": "babel src --out-dir dist && documentation build -f md -o api.md src",
- "test": "cross-env NODE_ENV=test nyc --check-coverage --statements 90 --branches 80 mocha --recursive test/",
+ "test": "mocha --require=babel-register",
"pretest": "jshint src/ test/",
- "prepublish": "npm test && npm run release",
- "version": "standard-version",
- "coverage": "nyc report --reporter=text-lcov | coveralls"
+ "prepublish": "npm run release"
},
"dependencies": {
"babel-generator": "^6.18.0",
@@ -18,7 +16,7 @@
"babel-traverse": "^6.18.0",
"babel-types": "^6.18.0",
"babylon": "^6.13.0",
- "istanbul-lib-coverage": "^1.0.0",
+ "istanbul-lib-coverage": "^1.0.2",
"semver": "^5.3.0"
},
"devDependencies": {
@@ -34,19 +32,7 @@
"js-yaml": "^3.3.1",
"jshint": "^2.8.0",
"mocha": "^3.1.2",
- "nopt": "^3.0.6",
- "nyc": "^8.3.1",
- "standard-version": "^3.0.0"
- },
- "nyc": {
- "include": [
- "src/**/*.js"
- ],
- "require": [
- "babel-register"
- ],
- "sourceMap": false,
- "instrument": false
+ "nopt": "^3.0.6"
},
"license": "BSD-3-Clause",
"bugs": {
diff --git a/node_modules/js-tokens/LICENSE b/node_modules/js-tokens/LICENSE
index c9a4e1bb4..748f42e87 100644
--- a/node_modules/js-tokens/LICENSE
+++ b/node_modules/js-tokens/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014, 2015, 2016 Simon Lydell
+Copyright (c) 2014, 2015, 2016, 2017 Simon Lydell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/js-tokens/changelog.md b/node_modules/js-tokens/changelog.md
deleted file mode 100644
index b789fdd49..000000000
--- a/node_modules/js-tokens/changelog.md
+++ /dev/null
@@ -1,82 +0,0 @@
-### Version 2.0.0 (2016-06-19) ###
-
-- Added: Support for ES2016. In other words, support for the `**` exponentiation
- operator.
-
-These are the breaking changes:
-
-- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
-- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
-
-
-### Version 1.0.3 (2016-03-27) ###
-
-- Improved: Made the regex ever so slightly smaller.
-- Updated: The readme.
-
-
-### Version 1.0.2 (2015-10-18) ###
-
-- Improved: Limited npm package contents for a smaller download. Thanks to
- @zertosh!
-
-
-### Version 1.0.1 (2015-06-20) ###
-
-- Fixed: Declared an undeclared variable.
-
-
-### Version 1.0.0 (2015-02-26) ###
-
-- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
- type is now equivalent to the Punctuator token in the ECMAScript
- specification. (Backwards-incompatible change.)
-- Fixed: A `-` followed by a number is now correctly matched as a punctuator
- followed by a number. It used to be matched as just a number, but there is no
- such thing as negative number literals. (Possibly backwards-incompatible
- change.)
-
-
-### Version 0.4.1 (2015-02-21) ###
-
-- Added: Support for the regex `u` flag.
-
-
-### Version 0.4.0 (2015-02-21) ###
-
-- Improved: `jsTokens.matchToToken` performance.
-- Added: Support for octal and binary number literals.
-- Added: Support for template strings.
-
-
-### Version 0.3.1 (2015-01-06) ###
-
-- Fixed: Support for unicode spaces. They used to be allowed in names (which is
- very confusing), and some unicode newlines were wrongly allowed in strings and
- regexes.
-
-
-### Version 0.3.0 (2014-12-19) ###
-
-- Changed: The `jsTokens.names` array has been replaced with the
- `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
- longer part of the public API; instead use said function. See this [gist] for
- an example. (Backwards-incompatible change.)
-- Changed: The empty string is now considered an “invalid” token, instead an
- “empty” token (its own group). (Backwards-incompatible change.)
-- Removed: component support. (Backwards-incompatible change.)
-
-[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
-
-
-### Version 0.2.0 (2014-06-19) ###
-
-- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
- category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
-- Added: ES6 splats (`...`) are now matched as an operator (instead of three
- punctuations). (Backwards-incompatible change.)
-
-
-### Version 0.1.0 (2014-03-08) ###
-
-- Initial release.
diff --git a/node_modules/js-tokens/index.js b/node_modules/js-tokens/index.js
index 2e070409d..a3c8a0d7b 100644
--- a/node_modules/js-tokens/index.js
+++ b/node_modules/js-tokens/index.js
@@ -1,11 +1,15 @@
-// Copyright 2014, 2015, 2016 Simon Lydell
-// X11 (“MIT”) Licensed. (See LICENSE.)
+// Copyright 2014, 2015, 2016, 2017 Simon Lydell
+// License: MIT. (See LICENSE.)
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+})
// This regex comes from regex.coffee, and is inserted here by generate-index.js
// (run `npm run build`).
-module.exports = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
+exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
-module.exports.matchToToken = function(match) {
+exports.matchToToken = function(match) {
var token = {type: "invalid", value: match[0]}
if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
else if (match[ 5]) token.type = "comment"
diff --git a/node_modules/js-tokens/package.json b/node_modules/js-tokens/package.json
index 35b0d8624..581ff21b0 100644
--- a/node_modules/js-tokens/package.json
+++ b/node_modules/js-tokens/package.json
@@ -1,6 +1,6 @@
{
"name": "js-tokens",
- "version": "2.0.0",
+ "version": "3.0.1",
"author": "Simon Lydell",
"license": "MIT",
"description": "A regex that tokenizes JavaScript.",
@@ -22,9 +22,9 @@
"dev": "npm run build && npm test"
},
"devDependencies": {
- "coffee-script": "~1.10.0",
- "esprima": "^2.7.2",
+ "coffee-script": "~1.12.2",
+ "esprima": "^3.1.3",
"everything.js": "^1.0.3",
- "mocha": "^2.5.3"
+ "mocha": "^3.2.0"
}
}
diff --git a/node_modules/js-tokens/readme.md b/node_modules/js-tokens/readme.md
deleted file mode 100644
index 68e470f0c..000000000
--- a/node_modules/js-tokens/readme.md
+++ /dev/null
@@ -1,217 +0,0 @@
-Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.png?branch=master)](https://travis-ci.org/lydell/js-tokens)
-========
-
-A regex that tokenizes JavaScript.
-
-```js
-var jsTokens = require("js-tokens")
-
-var jsString = "var foo=opts.foo;\n..."
-
-jsString.match(jsTokens)
-// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
-```
-
-
-Installation
-============
-
-`npm install js-tokens`
-
-```js
-var jsTokens = require("js-tokens")
-```
-
-
-Usage
-=====
-
-### `jsTokens` ###
-
-A regex with the `g` flag that matches JavaScript tokens.
-
-The regex _always_ matches, even invalid JavaScript and the empty string.
-
-The next match is always directly after the previous.
-
-### `var token = jsTokens.matchToToken(match)` ###
-
-Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
-String, value: String}` object. The following types are available:
-
-- string
-- comment
-- regex
-- number
-- name
-- punctuator
-- whitespace
-- invalid
-
-Multi-line comments and strings also have a `closed` property indicating if the
-token was closed or not (see below).
-
-Comments and strings both come in several flavors. To distinguish them, check if
-the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
-
-Names are ECMAScript IdentifierNames, that is, including both identifiers and
-keywords. You may use [is-keyword-js] to tell them apart.
-
-Whitespace includes both line terminators and other whitespace.
-
-For example usage, please see this [gist].
-
-[is-keyword-js]: https://github.com/crissdev/is-keyword-js
-[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
-
-
-ECMAScript support
-==================
-
-The intention is to always support the latest stable ECMAScript version.
-
-If adding support for a newer version requires changes, a new version with a
-major verion bump will be released.
-
-Currently, [ECMAScript 2016] is supported.
-
-[ECMAScript 2016]: http://www.ecma-international.org/ecma-262/7.0/index.html
-
-
-Invalid code handling
-=====================
-
-Unterminated strings are still matched as strings. JavaScript strings cannot
-contain (unescaped) newlines, so unterminated strings simply end at the end of
-the line. Unterminated template strings can contain unescaped newlines, though,
-so they go on to the end of input.
-
-Unterminated multi-line comments are also still matched as comments. They
-simply go on to the end of the input.
-
-Unterminated regex literals are likely matched as division and whatever is
-inside the regex.
-
-Invalid ASCII characters have their own capturing group.
-
-Invalid non-ASCII characters are treated as names, to simplify the matching of
-names (except unicode spaces which are treated as whitespace).
-
-Regex literals may contain invalid regex syntax. They are still matched as
-regex literals. They may also contain repeated regex flags, to keep the regex
-simple.
-
-Strings may contain invalid escape sequences.
-
-
-Limitations
-===========
-
-Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
-perfect. But that’s not the point either.
-
-You may compare jsTokens with [esprima] by using `esprima-compare.js`.
-See `npm run esprima-compare`!
-
-[esprima]: http://esprima.org/
-
-### Template string interpolation ###
-
-Template strings are matched as single tokens, from the starting `` ` `` to the
-ending `` ` ``, including interpolations (whose tokens are not matched
-individually).
-
-Matching template string interpolations requires recursive balancing of `{` and
-`}`—something that JavaScript regexes cannot do. Only one level of nesting is
-supported.
-
-### Division and regex literals collision ###
-
-Consider this example:
-
-```js
-var g = 9.82
-var number = bar / 2/g
-
-var regex = / 2/g
-```
-
-A human can easily understand that in the `number` line we’re dealing with
-division, and in the `regex` line we’re dealing with a regex literal. How come?
-Because humans can look at the whole code to put the `/` characters in context.
-A JavaScript regex cannot. It only sees forwards.
-
-When the `jsTokens` regex scans throught the above, it will see the following
-at the end of both the `number` and `regex` rows:
-
-```js
-/ 2/g
-```
-
-It is then impossible to know if that is a regex literal, or part of an
-expression dealing with division.
-
-Here is a similar case:
-
-```js
-foo /= 2/g
-foo(/= 2/g)
-```
-
-The first line divides the `foo` variable with `2/g`. The second line calls the
-`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
-sees forwards, it cannot tell the two cases apart.
-
-There are some cases where we _can_ tell division and regex literals apart,
-though.
-
-First off, we have the simple cases where there’s only one slash in the line:
-
-```js
-var foo = 2/g
-foo /= 2
-```
-
-Regex literals cannot contain newlines, so the above cases are correctly
-identified as division. Things are only problematic when there are more than
-one non-comment slash in a single line.
-
-Secondly, not every character is a valid regex flag.
-
-```js
-var number = bar / 2/e
-```
-
-The above example is also correctly identified as division, because `e` is not a
-valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
-(any letter) as flags, but it is not worth it since it increases the amount of
-ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
-allowed. This means that the above example will be identified as division as
-long as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5
-characters long.
-
-Lastly, we can look _forward_ for information.
-
-- If the token following what looks like a regex literal is not valid after a
- regex literal, but is valid in a division expression, then the regex literal
- is treated as division instead. For example, a flagless regex cannot be
- followed by a string, number or name, but all of those three can be the
- denominator of a division.
-- Generally, if what looks like a regex literal is followed by an operator, the
- regex literal is treated as division instead. This is because regexes are
- seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
- could likely be part of such an expression.
-
-Please consult the regex source and the test cases for precise information on
-when regex or division is matched (should you need to know). In short, you
-could sum it up as:
-
-If the end of a statement looks like a regex literal (even if it isn’t), it
-will be treated as one. Otherwise it should work as expected (if you write sane
-code).
-
-
-License
-=======
-
-[The X11 (“MIT”) License](LICENSE).
diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md
index 4ac4f18b1..193d3283d 100644
--- a/node_modules/kind-of/README.md
+++ b/node_modules/kind-of/README.md
@@ -1,6 +1,6 @@
-# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat)](https://travis-ci.org/jonschlinkert/kind-of)
+# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of)
-Get the native type of a value.
+> Get the native type of a value.
## Install
@@ -10,6 +10,8 @@ Install with [npm](https://www.npmjs.com/):
$ npm install --save kind-of
```
+## Install
+
Install with [bower](http://bower.io/)
```sh
@@ -212,6 +214,15 @@ In 7 out of 8 cases, this library is 2x-10x faster than other top libraries incl
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+### Contributors
+
+| **Commits** | **Contributor**<br/> |
+| --- | --- |
+| 49 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 2 | [miguelmota](https://github.com/miguelmota) |
+| 1 | [dtothefp](https://github.com/dtothefp) |
+| 1 | [pdehaan](https://github.com/pdehaan) |
+
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
@@ -244,4 +255,4 @@ Released under the [MIT license](https://github.com/jonschlinkert/kind-of/blob/m
***
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 07, 2016._ \ No newline at end of file
diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js
index 87938c9a2..85083862e 100644
--- a/node_modules/kind-of/index.js
+++ b/node_modules/kind-of/index.js
@@ -56,6 +56,9 @@ module.exports = function kindOf(val) {
if (type === '[object Arguments]') {
return 'arguments';
}
+ if (type === '[object Error]') {
+ return 'error';
+ }
// buffer
if (typeof Buffer !== 'undefined' && isBuffer(val)) {
diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json
index e64971978..7e272ebde 100644
--- a/node_modules/kind-of/package.json
+++ b/node_modules/kind-of/package.json
@@ -1,18 +1,22 @@
{
"name": "kind-of",
"description": "Get the native type of a value.",
- "version": "3.0.4",
+ "version": "3.1.0",
"homepage": "https://github.com/jonschlinkert/kind-of",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "David Fox-Powell <dtothefp@gmail.com> (https://dtothefp.github.io/me)",
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
+ "Miguel Mota <miguel@mota.email> (https://miguelmota.com)",
+ "Peter deHaan (http://about.me/peterdehaan)"
+ ],
"repository": "jonschlinkert/kind-of",
"bugs": {
"url": "https://github.com/jonschlinkert/kind-of/issues"
},
"license": "MIT",
"files": [
- "index.js",
- "LICENSE",
- "README.md"
+ "index.js"
],
"main": "index.js",
"engines": {
diff --git a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt b/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md b/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md
deleted file mode 100644
index bee29a8d6..000000000
--- a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# lodash.keys v2.4.1
-
-The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-
-## Author
-
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
-
-## Contributors
-
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js b/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js
deleted file mode 100644
index 139568a2f..000000000
--- a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
- */
-var isNative = require('lodash._isnative'),
- isObject = require('lodash.isobject'),
- shimKeys = require('lodash._shimkeys');
-
-/* Native method shortcuts for methods with the same name as other `lodash` methods */
-var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
-
-/**
- * Creates an array composed of the own enumerable property names of an object.
- *
- * @static
- * @memberOf _
- * @category Objects
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns an array of property names.
- * @example
- *
- * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
- * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
- */
-var keys = !nativeKeys ? shimKeys : function(object) {
- if (!isObject(object)) {
- return [];
- }
- return nativeKeys(object);
-};
-
-module.exports = keys;
diff --git a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json b/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json
deleted file mode 100644
index 023ebceeb..000000000
--- a/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "lodash.keys",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
- "license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
- ],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
- "dependencies": {
- "lodash._isnative": "~2.4.1",
- "lodash.isobject": "~2.4.1",
- "lodash._shimkeys": "~2.4.1"
- }
-}
diff --git a/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt b/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.defaults/node_modules/lodash.keys/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.defaults/node_modules/lodash.keys/README.md b/node_modules/lodash.defaults/node_modules/lodash.keys/README.md
deleted file mode 100644
index bee29a8d6..000000000
--- a/node_modules/lodash.defaults/node_modules/lodash.keys/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# lodash.keys v2.4.1
-
-The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-
-## Author
-
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
-
-## Contributors
-
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash.defaults/node_modules/lodash.keys/index.js b/node_modules/lodash.defaults/node_modules/lodash.keys/index.js
deleted file mode 100644
index 139568a2f..000000000
--- a/node_modules/lodash.defaults/node_modules/lodash.keys/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
- */
-var isNative = require('lodash._isnative'),
- isObject = require('lodash.isobject'),
- shimKeys = require('lodash._shimkeys');
-
-/* Native method shortcuts for methods with the same name as other `lodash` methods */
-var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
-
-/**
- * Creates an array composed of the own enumerable property names of an object.
- *
- * @static
- * @memberOf _
- * @category Objects
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns an array of property names.
- * @example
- *
- * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
- * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
- */
-var keys = !nativeKeys ? shimKeys : function(object) {
- if (!isObject(object)) {
- return [];
- }
- return nativeKeys(object);
-};
-
-module.exports = keys;
diff --git a/node_modules/lodash.defaults/node_modules/lodash.keys/package.json b/node_modules/lodash.defaults/node_modules/lodash.keys/package.json
deleted file mode 100644
index 023ebceeb..000000000
--- a/node_modules/lodash.defaults/node_modules/lodash.keys/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "lodash.keys",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
- "license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
- ],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
- "dependencies": {
- "lodash._isnative": "~2.4.1",
- "lodash.isobject": "~2.4.1",
- "lodash._shimkeys": "~2.4.1"
- }
-}
diff --git a/node_modules/lodash.escape/LICENSE b/node_modules/lodash.escape/LICENSE
deleted file mode 100644
index b054ca5a3..000000000
--- a/node_modules/lodash.escape/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/lodash.escape/README.md b/node_modules/lodash.escape/README.md
index b012def33..7cbc65384 100644
--- a/node_modules/lodash.escape/README.md
+++ b/node_modules/lodash.escape/README.md
@@ -1,18 +1,15 @@
-# lodash.escape v3.2.0
+# lodash.escape v2.4.1
-The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module.
+The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-## Installation
+## Author
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.escape
-```
+| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
+|---|
+| [John-David Dalton](http://allyoucanleet.com/) |
-In Node.js:
-```js
-var escape = require('lodash.escape');
-```
+## Contributors
-See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.escape) for more details.
+| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|---|---|
+| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash.escape/index.js b/node_modules/lodash.escape/index.js
index 0971ae8e2..343a4156d 100644
--- a/node_modules/lodash.escape/index.js
+++ b/node_modules/lodash.escape/index.js
@@ -1,180 +1,31 @@
/**
- * lodash 3.2.0 (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
+ * Build: `lodash modularize modern exports="npm" -o ./npm/`
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <http://lodash.com/license>
*/
-var root = require('lodash._root');
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to match HTML entities and HTML characters. */
-var reUnescapedHtml = /[&<>"'`]/g,
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
-/** Used to map characters to HTML entities. */
-var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
-};
-
-/**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol = root.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = Symbol ? symbolProto.toString : undefined;
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-/**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (value == null) {
- return '';
- }
- if (isSymbol(value)) {
- return Symbol ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
+var escapeHtmlChar = require('lodash._escapehtmlchar'),
+ keys = require('lodash.keys'),
+ reUnescapedHtml = require('lodash._reunescapedhtml');
/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value.
- * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
- * for more details.
- *
- * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
- * to reduce XSS vectors.
+ * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their
+ * corresponding HTML entities.
*
* @static
* @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
+ * @category Utilities
+ * @param {string} string The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
+ * _.escape('Fred, Wilma, & Pebbles');
+ * // => 'Fred, Wilma, &amp; Pebbles'
*/
function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
+ return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar);
}
module.exports = escape;
diff --git a/node_modules/lodash.escape/package.json b/node_modules/lodash.escape/package.json
index fc19009cf..efda9c603 100644
--- a/node_modules/lodash.escape/package.json
+++ b/node_modules/lodash.escape/package.json
@@ -1,20 +1,22 @@
{
"name": "lodash.escape",
- "version": "3.2.0",
- "description": "The lodash method `_.escape` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
+ "version": "2.4.1",
+ "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.",
+ "homepage": "http://lodash.com/custom-builds",
"license": "MIT",
- "keywords": "lodash-modularized, escape",
+ "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
+ "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
+ "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
+ "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "bugs": "https://github.com/lodash/lodash-cli/issues",
+ "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
"dependencies": {
- "lodash._root": "^3.0.0"
+ "lodash._escapehtmlchar": "~2.4.1",
+ "lodash.keys": "~2.4.1",
+ "lodash._reunescapedhtml": "~2.4.1"
}
}
diff --git a/node_modules/lodash.isequal/LICENSE b/node_modules/lodash.isequal/LICENSE
index e0c69d560..c6f2f6145 100644
--- a/node_modules/lodash.isequal/LICENSE
+++ b/node_modules/lodash.isequal/LICENSE
@@ -1,4 +1,4 @@
-Copyright jQuery Foundation and other contributors <https://jquery.org/>
+Copyright JS Foundation and other contributors <https://js.foundation/>
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
diff --git a/node_modules/lodash.isequal/README.md b/node_modules/lodash.isequal/README.md
index 661ebae8b..742156512 100644
--- a/node_modules/lodash.isequal/README.md
+++ b/node_modules/lodash.isequal/README.md
@@ -1,6 +1,6 @@
-# lodash.isequal v4.4.0
+# lodash.isequal v4.5.0
-The [lodash](https://lodash.com/) method `_.isEqual` exported as a [Node.js](https://nodejs.org/) module.
+The [Lodash](https://lodash.com/) method `_.isEqual` exported as a [Node.js](https://nodejs.org/) module.
## Installation
@@ -15,4 +15,4 @@ In Node.js:
var isEqual = require('lodash.isequal');
```
-See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.isequal) for more details.
+See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.isequal) for more details.
diff --git a/node_modules/lodash.isequal/index.js b/node_modules/lodash.isequal/index.js
index 9fc0281bf..c24908305 100644
--- a/node_modules/lodash.isequal/index.js
+++ b/node_modules/lodash.isequal/index.js
@@ -1,7 +1,7 @@
/**
- * lodash (Custom Build) <https://lodash.com/>
+ * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@@ -13,9 +13,9 @@ var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
-/** Used to compose bitmasks for comparison styles. */
-var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
@@ -23,6 +23,7 @@ var MAX_SAFE_INTEGER = 9007199254740991;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
@@ -30,12 +31,15 @@ var argsTag = '[object Arguments]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
+ nullTag = '[object Null]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
@@ -102,7 +106,7 @@ var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
- return freeProcess && freeProcess.binding('util');
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
@@ -110,6 +114,49 @@ var nodeUtil = (function() {
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
@@ -121,7 +168,7 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
*/
function arraySome(array, predicate) {
var index = -1,
- length = array ? array.length : 0;
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
@@ -164,34 +211,27 @@ function baseUnary(func) {
}
/**
- * Gets the value at `key` of `object`.
+ * Checks if a `cache` value for `key` exists.
*
* @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
-function getValue(object, key) {
- return object == null ? undefined : object[key];
+function cacheHas(cache, key) {
+ return cache.has(key);
}
/**
- * Checks if `value` is a host object in IE < 9.
+ * Gets the value at `key` of `object`.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
*/
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
}
/**
@@ -250,24 +290,24 @@ var arrayProto = Array.prototype,
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
-/** Used to detect methods masquerading as native. */
-var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
-}());
-
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
-var objectToString = objectProto.toString;
+var nativeObjectToString = objectProto.toString;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
@@ -276,13 +316,17 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = root.Symbol,
+var Buffer = moduleExports ? root.Buffer : undefined,
+ Symbol = root.Symbol,
Uint8Array = root.Uint8Array,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice;
+ splice = arrayProto.splice,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeKeys = overArg(Object.keys, Object);
+var nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeKeys = overArg(Object.keys, Object);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
@@ -312,7 +356,7 @@ var symbolProto = Symbol ? Symbol.prototype : undefined,
*/
function Hash(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -330,6 +374,7 @@ function Hash(entries) {
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
}
/**
@@ -343,7 +388,9 @@ function hashClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -375,7 +422,7 @@ function hashGet(key) {
*/
function hashHas(key) {
var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
/**
@@ -390,6 +437,7 @@ function hashHas(key) {
*/
function hashSet(key, value) {
var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
@@ -410,7 +458,7 @@ Hash.prototype.set = hashSet;
*/
function ListCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -428,6 +476,7 @@ function ListCache(entries) {
*/
function listCacheClear() {
this.__data__ = [];
+ this.size = 0;
}
/**
@@ -452,6 +501,7 @@ function listCacheDelete(key) {
} else {
splice.call(data, index, 1);
}
+ --this.size;
return true;
}
@@ -499,6 +549,7 @@ function listCacheSet(key, value) {
index = assocIndexOf(data, key);
if (index < 0) {
+ ++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
@@ -522,7 +573,7 @@ ListCache.prototype.set = listCacheSet;
*/
function MapCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -539,6 +590,7 @@ function MapCache(entries) {
* @memberOf MapCache
*/
function mapCacheClear() {
+ this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
@@ -556,7 +608,9 @@ function mapCacheClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -596,7 +650,11 @@ function mapCacheHas(key) {
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
return this;
}
@@ -617,7 +675,7 @@ MapCache.prototype.set = mapCacheSet;
*/
function SetCache(values) {
var index = -1,
- length = values ? values.length : 0;
+ length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
@@ -665,7 +723,8 @@ SetCache.prototype.has = setCacheHas;
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- this.__data__ = new ListCache(entries);
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
/**
@@ -677,6 +736,7 @@ function Stack(entries) {
*/
function stackClear() {
this.__data__ = new ListCache;
+ this.size = 0;
}
/**
@@ -689,7 +749,11 @@ function stackClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
- return this.__data__['delete'](key);
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
}
/**
@@ -729,16 +793,18 @@ function stackHas(key) {
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
+ this.size = ++data.size;
return this;
}
- cache = this.__data__ = new MapCache(pairs);
+ data = this.__data__ = new MapCache(pairs);
}
- cache.set(key, value);
+ data.set(key, value);
+ this.size = data.size;
return this;
}
@@ -758,18 +824,26 @@ Stack.prototype.set = stackSet;
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
-
- var length = result.length,
- skipIndexes = !!length;
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
result.push(key);
}
}
@@ -795,14 +869,46 @@ function assocIndexOf(array, key) {
}
/**
- * The base implementation of `getTag`.
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
- return objectToString.call(value);
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/**
@@ -812,22 +918,21 @@ function baseGetTag(value) {
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
- * @param {boolean} [bitmask] The bitmask of comparison flags.
- * The bitmask may be composed of the following flags:
- * 1 - Unordered comparison
- * 2 - Partial comparison
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
-function baseIsEqual(value, other, customizer, bitmask, stack) {
+function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
/**
@@ -838,38 +943,39 @@ function baseIsEqual(value, other, customizer, bitmask, stack) {
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
-function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
@@ -878,14 +984,14 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
/**
@@ -900,7 +1006,7 @@ function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
@@ -913,7 +1019,7 @@ function baseIsNative(value) {
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
@@ -943,15 +1049,14 @@ function baseKeys(object) {
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
+ * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
-function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
@@ -965,7 +1070,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
}
var index = -1,
result = true,
- seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
@@ -990,9 +1095,9 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
- if (!seen.has(othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- return seen.add(othIndex);
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
}
})) {
result = false;
@@ -1000,7 +1105,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
}
} else if (!(
arrValue === othValue ||
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
@@ -1022,14 +1127,13 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
+ * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
-function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
@@ -1067,7 +1171,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
var convert = mapToArray;
case setTag:
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
@@ -1078,11 +1182,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
if (stacked) {
return stacked == other;
}
- bitmask |= UNORDERED_COMPARE_FLAG;
+ bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
@@ -1101,18 +1205,17 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
+ * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
-function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- objProps = keys(object),
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
objLength = objProps.length,
- othProps = keys(other),
+ othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
@@ -1147,7 +1250,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
@@ -1173,6 +1276,17 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
}
/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
+
+/**
* Gets the data for `map`.
*
* @private
@@ -1201,6 +1315,50 @@ function getNative(object, key) {
}
/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
+
+/**
* Gets the `toStringTag` of `value`.
*
* @private
@@ -1209,17 +1367,16 @@ function getNative(object, key) {
*/
var getTag = baseGetTag;
-// Fallback for data views, maps, sets, and weak maps in IE 11,
-// for data views in Edge < 14, and promises in Node.js.
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
- var result = objectToString.call(value),
+ var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
+ ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
@@ -1289,10 +1446,21 @@ function isPrototype(value) {
}
/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
+
+/**
* Converts `func` to its source code.
*
* @private
- * @param {Function} func The function to process.
+ * @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
@@ -1361,11 +1529,10 @@ function eq(value, other) {
* _.isArguments([1, 2, 3]);
* // => false
*/
-function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
/**
* Checks if `value` is classified as an `Array` object.
@@ -1422,33 +1589,23 @@ function isArrayLike(value) {
}
/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
+ * Checks if `value` is a buffer.
*
* @static
* @memberOf _
- * @since 4.0.0
+ * @since 4.3.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
+ * _.isBuffer(new Buffer(2));
* // => true
*
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
+ * _.isBuffer(new Uint8Array(2));
* // => false
*/
-function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
-}
+var isBuffer = nativeIsBuffer || stubFalse;
/**
* Performs a deep comparison between two values to determine if they are
@@ -1458,7 +1615,7 @@ function isArrayLikeObject(value) {
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
+ * nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
@@ -1500,10 +1657,13 @@ function isEqual(value, other) {
* // => false
*/
function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/**
@@ -1564,7 +1724,7 @@ function isLength(value) {
*/
function isObject(value) {
var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ return value != null && (type == 'object' || type == 'function');
}
/**
@@ -1592,7 +1752,7 @@ function isObject(value) {
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
/**
@@ -1646,4 +1806,43 @@ function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
+
module.exports = isEqual;
diff --git a/node_modules/lodash.isequal/package.json b/node_modules/lodash.isequal/package.json
index 57cd36d93..3b977cafa 100644
--- a/node_modules/lodash.isequal/package.json
+++ b/node_modules/lodash.isequal/package.json
@@ -1,7 +1,7 @@
{
"name": "lodash.isequal",
- "version": "4.4.0",
- "description": "The lodash method `_.isEqual` exported as a module.",
+ "version": "4.5.0",
+ "description": "The Lodash method `_.isEqual` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
@@ -9,7 +9,6 @@
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/node_modules/lodash.keys/LICENSE b/node_modules/lodash.keys/LICENSE
deleted file mode 100644
index 9cd87e5dc..000000000
--- a/node_modules/lodash.keys/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/lodash.keys/README.md b/node_modules/lodash.keys/README.md
index 5f69a1826..bee29a8d6 100644
--- a/node_modules/lodash.keys/README.md
+++ b/node_modules/lodash.keys/README.md
@@ -1,20 +1,15 @@
-# lodash.keys v3.1.2
+# lodash.keys v2.4.1
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-## Installation
+## Author
-Using npm:
+| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
+|---|
+| [John-David Dalton](http://allyoucanleet.com/) |
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.keys
-```
+## Contributors
-In Node.js/io.js:
-
-```js
-var keys = require('lodash.keys');
-```
-
-See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details.
+| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|---|---|
+| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash.keys/index.js b/node_modules/lodash.keys/index.js
index f4c17749a..139568a2f 100644
--- a/node_modules/lodash.keys/index.js
+++ b/node_modules/lodash.keys/index.js
@@ -1,236 +1,36 @@
/**
- * lodash 3.1.2 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern modularize exports="npm" -o ./`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
+ * Build: `lodash modularize modern exports="npm" -o ./npm/`
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <http://lodash.com/license>
*/
-var getNative = require('lodash._getnative'),
- isArguments = require('lodash.isarguments'),
- isArray = require('lodash.isarray');
+var isNative = require('lodash._isnative'),
+ isObject = require('lodash.isobject'),
+ shimKeys = require('lodash._shimkeys');
-/** Used to detect unsigned integer values. */
-var reIsUint = /^\d+$/;
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeKeys = getNative(Object, 'keys');
-
-/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
-function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
-}
-
-/**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
-var getLength = baseProperty('length');
-
-/**
- * Checks if `value` is array-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- */
-function isArrayLike(value) {
- return value != null && isLength(getLength(value));
-}
-
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
-function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-/**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function shimKeys(object) {
- var props = keysIn(object),
- propsLength = props.length,
- length = propsLength && object.length;
-
- var allowIndexes = !!length && isLength(length) &&
- (isArray(object) || isArguments(object));
-
- var index = -1,
- result = [];
-
- while (++index < propsLength) {
- var key = props[index];
- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
- }
- return result;
-}
+/* Native method shortcuts for methods with the same name as other `lodash` methods */
+var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Creates an array composed of the own enumerable property names of an object.
*
* @static
* @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @category Objects
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns an array of property names.
* @example
*
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
+ * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
+ * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
*/
var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object == null ? undefined : object.constructor;
- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && isArrayLike(object))) {
- return shimKeys(object);
- }
- return isObject(object) ? nativeKeys(object) : [];
-};
-
-/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
-function keysIn(object) {
- if (object == null) {
- return [];
- }
if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
-
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
+ return [];
}
- return result;
-}
+ return nativeKeys(object);
+};
module.exports = keys;
diff --git a/node_modules/lodash.keys/package.json b/node_modules/lodash.keys/package.json
index 6fafa9345..023ebceeb 100644
--- a/node_modules/lodash.keys/package.json
+++ b/node_modules/lodash.keys/package.json
@@ -1,24 +1,22 @@
{
"name": "lodash.keys",
- "version": "3.1.2",
- "description": "The modern build of lodash’s `_.keys` as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
+ "version": "2.4.1",
+ "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.",
+ "homepage": "http://lodash.com/custom-builds",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util",
+ "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
+ "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
+ "bugs": "https://github.com/lodash/lodash-cli/issues",
+ "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
"dependencies": {
- "lodash._getnative": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "lodash._isnative": "~2.4.1",
+ "lodash.isobject": "~2.4.1",
+ "lodash._shimkeys": "~2.4.1"
}
}
diff --git a/node_modules/lodash.template/LICENSE.txt b/node_modules/lodash.template/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.template/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.template/README.md b/node_modules/lodash.template/README.md
index e89bd0db6..f542f713b 100644
--- a/node_modules/lodash.template/README.md
+++ b/node_modules/lodash.template/README.md
@@ -1,15 +1,20 @@
-# lodash.template v2.4.1
+# lodash.template v3.6.2
-The [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-## Author
+## Installation
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
+Using npm:
-## Contributors
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.template
+```
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
+In Node.js/io.js:
+
+```js
+var template = require('lodash.template');
+```
+
+See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
diff --git a/node_modules/lodash.template/index.js b/node_modules/lodash.template/index.js
index 230f8ee86..e5a9629b9 100644
--- a/node_modules/lodash.template/index.js
+++ b/node_modules/lodash.template/index.js
@@ -1,113 +1,252 @@
/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
+ * lodash 3.6.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
*/
-var defaults = require('lodash.defaults'),
- escape = require('lodash.escape'),
- escapeStringChar = require('lodash._escapestringchar'),
- keys = require('lodash.keys'),
+var baseCopy = require('lodash._basecopy'),
+ baseToString = require('lodash._basetostring'),
+ baseValues = require('lodash._basevalues'),
+ isIterateeCall = require('lodash._isiterateecall'),
reInterpolate = require('lodash._reinterpolate'),
- templateSettings = require('lodash.templatesettings'),
- values = require('lodash.values');
+ keys = require('lodash.keys'),
+ restParam = require('lodash.restparam'),
+ templateSettings = require('lodash.templatesettings');
+
+/** `Object#toString` result references. */
+var errorTag = '[object Error]';
-/** Used to match empty string literals in compiled template source */
+/** Used to match empty string literals in compiled template source. */
var reEmptyStringLeading = /\b__p \+= '';/g,
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-/**
- * Used to match ES6 template delimiters
- * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals
- */
+/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-/** Used to ensure capturing order of template delimiters */
+/** Used to ensure capturing order of template delimiters. */
var reNoMatch = /($^)/;
-/** Used to match unescaped characters in compiled string literals */
-var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g;
+/** Used to match unescaped characters in compiled string literals. */
+var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+/** Used to escape characters for inclusion in compiled string literals. */
+var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
+
+/**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+}
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
/**
- * A micro-templating method that handles arbitrary delimiters, preserves
- * whitespace, and correctly escapes quotes within interpolated code.
+ * Used by `_.template` to customize its `_.assign` use.
+ *
+ * **Note:** This function is like `assignDefaults` except that it ignores
+ * inherited property values when checking if a property is `undefined`.
*
- * Note: In the development build, `_.template` utilizes sourceURLs for easier
- * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
+ * @private
+ * @param {*} objectValue The destination object property value.
+ * @param {*} sourceValue The source object property value.
+ * @param {string} key The key associated with the object and source values.
+ * @param {Object} object The destination object.
+ * @returns {*} Returns the value to assign to the destination object.
+ */
+function assignOwnDefaults(objectValue, sourceValue, key, object) {
+ return (objectValue === undefined || !hasOwnProperty.call(object, key))
+ ? sourceValue
+ : objectValue;
+}
+
+/**
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
*
- * For more information on precompiling templates see:
- * http://lodash.com/custom-builds
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ */
+function assignWith(object, source, customizer) {
+ var index = -1,
+ props = keys(source),
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+}
+
+/**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
*
- * For more information on Chrome extension sandboxes see:
- * http://developer.chrome.com/stable/extensions/sandboxingEval.html
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+}
+
+/**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
*
* @static
* @memberOf _
- * @category Utilities
- * @param {string} text The template text.
- * @param {Object} data The data object used to populate the text.
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+function isError(value) {
+ return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
+}
+
+/**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is provided it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
* @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The "escape" delimiter.
+ * @param {RegExp} [options.escape] The HTML "escape" delimiter.
* @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as local variables.
+ * @param {Object} [options.imports] An object to import into the template as free variables.
* @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [variable] The data object variable name.
- * @returns {Function|string} Returns a compiled function when no `data` object
- * is given, else it returns the interpolated text.
+ * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
+ * @param {string} [options.variable] The data object variable name.
+ * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
+ * @returns {Function} Returns the compiled template function.
* @example
*
* // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= name %>');
- * compiled({ 'name': 'fred' });
- * // => 'hello fred'
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
*
- * // using the "escape" delimiter to escape HTML in data property values
- * _.template('<b><%- value %></b>', { 'value': '<script>' });
+ * // using the HTML "escape" delimiter to escape data property values
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
* // => '<b>&lt;script&gt;</b>'
*
- * // using the "evaluate" delimiter to generate HTML
- * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>';
- * _.template(list, { 'people': ['fred', 'barney'] });
+ * // using the "evaluate" delimiter to execute JavaScript and generate HTML
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
- * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter
- * _.template('hello ${ name }', { 'name': 'pebbles' });
- * // => 'hello pebbles'
- *
* // using the internal `print` function in "evaluate" delimiters
- * _.template('<% print("hello " + name); %>!', { 'name': 'barney' });
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
* // => 'hello barney!'
*
- * // using a custom template delimiters
- * _.templateSettings = {
- * 'interpolate': /{{([\s\S]+?)}}/g
- * };
+ * // using the ES delimiter as an alternative to the default "interpolate" delimiter
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
*
- * _.template('hello {{ name }}!', { 'name': 'mustache' });
+ * // using custom template delimiters
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
* // => 'hello mustache!'
*
- * // using the `imports` option to import jQuery
- * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>';
- * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } });
+ * // using backslashes to treat delimiters as plain text
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // using the `imports` option to import `jQuery` as `jq`
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
* // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' });
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
* compiled(data);
* // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
*
* // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' });
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
* compiled.source;
* // => function(data) {
- * var __t, __p = '', __e = _.escape;
- * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!';
- * return __p;
- * }
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
*
* // using the `source` property to inline compiled templates for meaningful
* // line numbers in error messages and a stack trace
@@ -117,27 +256,28 @@ var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g;
* };\
* ');
*/
-function template(text, data, options) {
- // based on John Resig's `tmpl` implementation
- // http://ejohn.org/blog/javascript-micro-templating/
- // and Laura Doktorova's doT.js
- // https://github.com/olado/doT
+function template(string, options, otherOptions) {
+ // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
var settings = templateSettings.imports._.templateSettings || templateSettings;
- text = String(text || '');
- // avoid missing dependencies when `iteratorTemplate` is not defined
- options = defaults({}, options, settings);
+ if (otherOptions && isIterateeCall(string, options, otherOptions)) {
+ options = otherOptions = undefined;
+ }
+ string = baseToString(string);
+ options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
- var imports = defaults({}, options.imports, settings.imports),
+ var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
importsKeys = keys(imports),
- importsValues = values(imports);
+ importsValues = baseValues(imports, importsKeys);
- var isEvaluating,
+ var isEscaping,
+ isEvaluating,
index = 0,
interpolate = options.interpolate || reNoMatch,
source = "__p += '";
- // compile the regexp to match each delimiter
+ // Compile the regexp to match each delimiter.
var reDelimiters = RegExp(
(options.escape || reNoMatch).source + '|' +
interpolate.source + '|' +
@@ -145,14 +285,18 @@ function template(text, data, options) {
(options.evaluate || reNoMatch).source + '|$'
, 'g');
- text.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ // Use a sourceURL for easier debugging.
+ var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
interpolateValue || (interpolateValue = esTemplateValue);
- // escape characters that cannot be included in string literals
- source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
- // replace delimiters with snippets
+ // Replace delimiters with snippets.
if (escapeValue) {
+ isEscaping = true;
source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
@@ -164,31 +308,35 @@ function template(text, data, options) {
}
index = offset + match.length;
- // the JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value
+ // The JS engine embedded in Adobe products requires returning the `match`
+ // string in order to produce the correct `offset` value.
return match;
});
source += "';\n";
- // if `variable` is not specified, wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain
- var variable = options.variable,
- hasVariable = variable;
-
- if (!hasVariable) {
- variable = 'obj';
- source = 'with (' + variable + ') {\n' + source + '\n}\n';
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
}
- // cleanup code by stripping empty strings
+ // Cleanup code by stripping empty strings.
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
.replace(reEmptyStringMiddle, '$1')
.replace(reEmptyStringTrailing, '$1;');
- // frame code as the function body
- source = 'function(' + variable + ') {\n' +
- (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') +
- "var __t, __p = '', __e = _.escape" +
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
(isEvaluating
? ', __j = Array.prototype.join;\n' +
"function print() { __p += __j.call(arguments, '') }\n"
@@ -197,20 +345,45 @@ function template(text, data, options) {
source +
'return __p\n}';
- try {
- var result = Function(importsKeys, 'return ' + source ).apply(undefined, importsValues);
- } catch(e) {
- e.source = source;
- throw e;
- }
- if (data) {
- return result(data);
- }
- // provide the compiled function's source by its `toString` method, in
- // supported environments, or the `source` property as a convenience for
- // inlining compiled templates during the build process
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
return result;
}
+/**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it is invoked.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Function} func The function to attempt.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // avoid throwing errors for invalid selectors
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+var attempt = restParam(function(func, args) {
+ try {
+ return func.apply(undefined, args);
+ } catch(e) {
+ return isError(e) ? e : new Error(e);
+ }
+});
+
module.exports = template;
diff --git a/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt b/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.template/node_modules/lodash.escape/README.md b/node_modules/lodash.template/node_modules/lodash.escape/README.md
index 7cbc65384..b012def33 100644
--- a/node_modules/lodash.template/node_modules/lodash.escape/README.md
+++ b/node_modules/lodash.template/node_modules/lodash.escape/README.md
@@ -1,15 +1,18 @@
-# lodash.escape v2.4.1
+# lodash.escape v3.2.0
-The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
+The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module.
-## Author
+## Installation
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.escape
+```
-## Contributors
+In Node.js:
+```js
+var escape = require('lodash.escape');
+```
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
+See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.escape) for more details.
diff --git a/node_modules/lodash.template/node_modules/lodash.escape/index.js b/node_modules/lodash.template/node_modules/lodash.escape/index.js
index 343a4156d..0971ae8e2 100644
--- a/node_modules/lodash.template/node_modules/lodash.escape/index.js
+++ b/node_modules/lodash.template/node_modules/lodash.escape/index.js
@@ -1,31 +1,180 @@
/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
+ * lodash 3.2.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
*/
-var escapeHtmlChar = require('lodash._escapehtmlchar'),
- keys = require('lodash.keys'),
- reUnescapedHtml = require('lodash._reunescapedhtml');
+var root = require('lodash._root');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match HTML entities and HTML characters. */
+var reUnescapedHtml = /[&<>"'`]/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;',
+ '`': '&#96;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+}
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = Symbol ? symbolProto.toString : undefined;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (value == null) {
+ return '';
+ }
+ if (isSymbol(value)) {
+ return Symbol ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
/**
- * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their
- * corresponding HTML entities.
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
+ * their corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value.
+ * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * Backticks are escaped because in IE < 9, they can break out of
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
+ * for more details.
+ *
+ * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
+ * to reduce XSS vectors.
*
* @static
* @memberOf _
- * @category Utilities
- * @param {string} string The string to escape.
+ * @category String
+ * @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
- * _.escape('Fred, Wilma, & Pebbles');
- * // => 'Fred, Wilma, &amp; Pebbles'
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
*/
function escape(string) {
- return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar);
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
}
module.exports = escape;
diff --git a/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/lodash.template/node_modules/lodash.escape/package.json
index efda9c603..fc19009cf 100644
--- a/node_modules/lodash.template/node_modules/lodash.escape/package.json
+++ b/node_modules/lodash.template/node_modules/lodash.escape/package.json
@@ -1,22 +1,20 @@
{
"name": "lodash.escape",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
+ "version": "3.2.0",
+ "description": "The lodash method `_.escape` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
+ "keywords": "lodash-modularized, escape",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
+ "Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
+ "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._escapehtmlchar": "~2.4.1",
- "lodash.keys": "~2.4.1",
- "lodash._reunescapedhtml": "~2.4.1"
+ "lodash._root": "^3.0.0"
}
}
diff --git a/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt b/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.template/node_modules/lodash.keys/README.md b/node_modules/lodash.template/node_modules/lodash.keys/README.md
index bee29a8d6..5f69a1826 100644
--- a/node_modules/lodash.template/node_modules/lodash.keys/README.md
+++ b/node_modules/lodash.template/node_modules/lodash.keys/README.md
@@ -1,15 +1,20 @@
-# lodash.keys v2.4.1
+# lodash.keys v3.1.2
-The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
-## Author
+## Installation
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
+Using npm:
-## Contributors
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.keys
+```
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
+In Node.js/io.js:
+
+```js
+var keys = require('lodash.keys');
+```
+
+See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details.
diff --git a/node_modules/lodash.template/node_modules/lodash.keys/index.js b/node_modules/lodash.template/node_modules/lodash.keys/index.js
index 139568a2f..f4c17749a 100644
--- a/node_modules/lodash.template/node_modules/lodash.keys/index.js
+++ b/node_modules/lodash.template/node_modules/lodash.keys/index.js
@@ -1,36 +1,236 @@
/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
+ * lodash 3.1.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
*/
-var isNative = require('lodash._isnative'),
- isObject = require('lodash.isobject'),
- shimKeys = require('lodash._shimkeys');
+var getNative = require('lodash._getnative'),
+ isArguments = require('lodash.isarguments'),
+ isArray = require('lodash.isarray');
-/* Native method shortcuts for methods with the same name as other `lodash` methods */
-var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeKeys = getNative(Object, 'keys');
+
+/**
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * A fallback implementation of `Object.keys` which creates an array of the
+ * own enumerable property names of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
/**
- * Creates an array composed of the own enumerable property names of an object.
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
- * @category Objects
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns an array of property names.
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
- * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
- * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
*/
var keys = !nativeKeys ? shimKeys : function(object) {
- if (!isObject(object)) {
- return [];
+ var Ctor = object == null ? undefined : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
}
- return nativeKeys(object);
+ return isObject(object) ? nativeKeys(object) : [];
};
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
module.exports = keys;
diff --git a/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/lodash.template/node_modules/lodash.keys/package.json
index 023ebceeb..6fafa9345 100644
--- a/node_modules/lodash.template/node_modules/lodash.keys/package.json
+++ b/node_modules/lodash.template/node_modules/lodash.keys/package.json
@@ -1,22 +1,24 @@
{
"name": "lodash.keys",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
+ "version": "3.1.2",
+ "description": "The modern build of lodash’s `_.keys` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
+ "keywords": "lodash, lodash-modularized, stdlib, util",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
+ "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._isnative": "~2.4.1",
- "lodash.isobject": "~2.4.1",
- "lodash._shimkeys": "~2.4.1"
+ "lodash._getnative": "^3.0.0",
+ "lodash.isarguments": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
}
}
diff --git a/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt b/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md b/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md
deleted file mode 100644
index d9ce72bcf..000000000
--- a/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# lodash.templatesettings v2.4.1
-
-The [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-
-## Author
-
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
-
-## Contributors
-
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js b/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js
deleted file mode 100644
index bba7e231c..000000000
--- a/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
- */
-var escape = require('lodash.escape'),
- reInterpolate = require('lodash._reinterpolate');
-
-/**
- * By default, the template delimiters used by Lo-Dash are similar to those in
- * embedded Ruby (ERB). Change the following template settings to use alternative
- * delimiters.
- *
- * @static
- * @memberOf _
- * @type Object
- */
-var templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'escape': /<%-([\s\S]+?)%>/g,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'evaluate': /<%([\s\S]+?)%>/g,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type string
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type Object
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type Function
- */
- '_': { 'escape': escape }
- }
-};
-
-module.exports = templateSettings;
diff --git a/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json
deleted file mode 100644
index e4959713d..000000000
--- a/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "lodash.templatesettings",
- "version": "2.4.1",
- "description": "The Lo-Dash object `_.templateSettings` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
- "license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
- ],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
- "dependencies": {
- "lodash.escape": "~2.4.1",
- "lodash._reinterpolate": "~2.4.1"
- }
-}
diff --git a/node_modules/lodash.template/package.json b/node_modules/lodash.template/package.json
index 56b517ec4..88bb748e2 100644
--- a/node_modules/lodash.template/package.json
+++ b/node_modules/lodash.template/package.json
@@ -1,26 +1,30 @@
{
"name": "lodash.template",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.template` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
+ "version": "3.6.2",
+ "description": "The modern build of lodash’s `_.template` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
+ "keywords": "lodash, lodash-modularized, stdlib, util",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
+ "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash.defaults": "~2.4.1",
- "lodash.escape": "~2.4.1",
- "lodash._escapestringchar": "~2.4.1",
- "lodash.keys": "~2.4.1",
- "lodash._reinterpolate": "~2.4.1",
- "lodash.templatesettings": "~2.4.1",
- "lodash.values": "~2.4.1"
+ "lodash._basecopy": "^3.0.0",
+ "lodash._basetostring": "^3.0.0",
+ "lodash._basevalues": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.escape": "^3.0.0",
+ "lodash.keys": "^3.0.0",
+ "lodash.restparam": "^3.0.0",
+ "lodash.templatesettings": "^3.0.0"
}
}
diff --git a/node_modules/lodash.values/node_modules/lodash.keys/LICENSE.txt b/node_modules/lodash.values/node_modules/lodash.keys/LICENSE.txt
deleted file mode 100644
index 49869bbab..000000000
--- a/node_modules/lodash.values/node_modules/lodash.keys/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/lodash.values/node_modules/lodash.keys/README.md b/node_modules/lodash.values/node_modules/lodash.keys/README.md
deleted file mode 100644
index bee29a8d6..000000000
--- a/node_modules/lodash.values/node_modules/lodash.keys/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# lodash.keys v2.4.1
-
-The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
-
-## Author
-
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
-
-## Contributors
-
-| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|---|---|
-| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
diff --git a/node_modules/lodash.values/node_modules/lodash.keys/index.js b/node_modules/lodash.values/node_modules/lodash.keys/index.js
deleted file mode 100644
index 139568a2f..000000000
--- a/node_modules/lodash.values/node_modules/lodash.keys/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
- * Build: `lodash modularize modern exports="npm" -o ./npm/`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
- */
-var isNative = require('lodash._isnative'),
- isObject = require('lodash.isobject'),
- shimKeys = require('lodash._shimkeys');
-
-/* Native method shortcuts for methods with the same name as other `lodash` methods */
-var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
-
-/**
- * Creates an array composed of the own enumerable property names of an object.
- *
- * @static
- * @memberOf _
- * @category Objects
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns an array of property names.
- * @example
- *
- * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
- * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
- */
-var keys = !nativeKeys ? shimKeys : function(object) {
- if (!isObject(object)) {
- return [];
- }
- return nativeKeys(object);
-};
-
-module.exports = keys;
diff --git a/node_modules/lodash.values/node_modules/lodash.keys/package.json b/node_modules/lodash.values/node_modules/lodash.keys/package.json
deleted file mode 100644
index 023ebceeb..000000000
--- a/node_modules/lodash.values/node_modules/lodash.keys/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "lodash.keys",
- "version": "2.4.1",
- "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.",
- "homepage": "http://lodash.com/custom-builds",
- "license": "MIT",
- "keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
- "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
- "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
- "Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
- ],
- "bugs": "https://github.com/lodash/lodash-cli/issues",
- "repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
- "dependencies": {
- "lodash._isnative": "~2.4.1",
- "lodash.isobject": "~2.4.1",
- "lodash._shimkeys": "~2.4.1"
- }
-}
diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md
index 813eefe3c..acdd128cd 100644
--- a/node_modules/lodash/README.md
+++ b/node_modules/lodash/README.md
@@ -1,4 +1,4 @@
-# lodash v4.17.1
+# lodash v4.17.4
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
@@ -28,12 +28,12 @@ var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
```
-See the [package source](https://github.com/lodash/lodash/tree/4.17.1-npm) for more details.
+See the [package source](https://github.com/lodash/lodash/tree/4.17.4-npm) for more details.
**Note:**<br>
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
## Support
-Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
+Tested in Chrome 54-55, Firefox 49-50, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/node_modules/lodash/_assignInDefaults.js b/node_modules/lodash/_assignInDefaults.js
deleted file mode 100644
index ea6b0e358..000000000
--- a/node_modules/lodash/_assignInDefaults.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var eq = require('./eq');
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used by `_.defaults` to customize its `_.assignIn` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
-function assignInDefaults(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
-}
-
-module.exports = assignInDefaults;
diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js
index cf869ac6e..b927ccc17 100644
--- a/node_modules/lodash/_baseGetTag.js
+++ b/node_modules/lodash/_baseGetTag.js
@@ -20,8 +20,7 @@ function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
- value = Object(value);
- return (symToStringTag && symToStringTag in value)
+ return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js
index 0c4212ea4..00a68a4f5 100644
--- a/node_modules/lodash/_baseIsEqual.js
+++ b/node_modules/lodash/_baseIsEqual.js
@@ -1,5 +1,4 @@
var baseIsEqualDeep = require('./_baseIsEqualDeep'),
- isObject = require('./isObject'),
isObjectLike = require('./isObjectLike');
/**
@@ -20,7 +19,7 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js
index b32f1f3ff..e3cfd6a8d 100644
--- a/node_modules/lodash/_baseIsEqualDeep.js
+++ b/node_modules/lodash/_baseIsEqualDeep.js
@@ -38,17 +38,12 @@ var hasOwnProperty = objectProto.hasOwnProperty;
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js
index 6afce4041..09b458a60 100644
--- a/node_modules/lodash/_basePick.js
+++ b/node_modules/lodash/_basePick.js
@@ -11,7 +11,6 @@ var basePickBy = require('./_basePickBy'),
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
- object = Object(object);
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js
index 6ada1f36a..85be68c84 100644
--- a/node_modules/lodash/_basePickBy.js
+++ b/node_modules/lodash/_basePickBy.js
@@ -1,5 +1,6 @@
var baseGet = require('./_baseGet'),
- baseSet = require('./_baseSet');
+ baseSet = require('./_baseSet'),
+ castPath = require('./_castPath');
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
@@ -20,7 +21,7 @@ function basePickBy(object, paths, predicate) {
value = baseGet(object, path);
if (predicate(value, path)) {
- baseSet(result, path, value);
+ baseSet(result, castPath(path, object), value);
}
}
return result;
diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js
index de2e0067d..c3e9e7102 100644
--- a/node_modules/lodash/_basePullAt.js
+++ b/node_modules/lodash/_basePullAt.js
@@ -1,8 +1,5 @@
-var castPath = require('./_castPath'),
- isIndex = require('./_isIndex'),
- last = require('./last'),
- parent = require('./_parent'),
- toKey = require('./_toKey');
+var baseUnset = require('./_baseUnset'),
+ isIndex = require('./_isIndex');
/** Used for built-in method references. */
var arrayProto = Array.prototype;
@@ -29,14 +26,8 @@ function basePullAt(array, indexes) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
- }
- else {
- var path = castPath(index, array),
- object = parent(array, path);
-
- if (object != null) {
- delete object[toKey(last(path))];
- }
+ } else {
+ baseUnset(array, index);
}
}
}
diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js
index f752bea4c..eefc6e37d 100644
--- a/node_modules/lodash/_baseUnset.js
+++ b/node_modules/lodash/_baseUnset.js
@@ -3,12 +3,6 @@ var castPath = require('./_castPath'),
parent = require('./_parent'),
toKey = require('./_toKey');
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
/**
* The base implementation of `_.unset`.
*
@@ -20,8 +14,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
- var key = toKey(last(path));
- return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
+ return object == null || delete object[toKey(last(path))];
}
module.exports = baseUnset;
diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js
index c6b43f799..baaddbf5e 100644
--- a/node_modules/lodash/_createFlow.js
+++ b/node_modules/lodash/_createFlow.js
@@ -5,9 +5,6 @@ var LodashWrapper = require('./_LodashWrapper'),
isArray = require('./isArray'),
isLaziable = require('./_isLaziable');
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
-
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -64,8 +61,7 @@ function createFlow(fromRight) {
var args = arguments,
value = args[0];
- if (wrapper && args.length == 1 &&
- isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index = 0,
diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js
index 74b20d408..bf9b713fc 100644
--- a/node_modules/lodash/_createRound.js
+++ b/node_modules/lodash/_createRound.js
@@ -16,7 +16,7 @@ function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
- precision = nativeMin(toInteger(precision), 292);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js
index f14b968d7..33f0633e4 100644
--- a/node_modules/lodash/_createWrap.js
+++ b/node_modules/lodash/_createWrap.js
@@ -83,7 +83,7 @@ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arit
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
- arity = newData[9] = newData[9] == null
+ arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax(newData[9] - length, 0);
diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js
index 7044ae9bb..17421f374 100644
--- a/node_modules/lodash/_equalObjects.js
+++ b/node_modules/lodash/_equalObjects.js
@@ -1,4 +1,4 @@
-var keys = require('./keys');
+var getAllKeys = require('./_getAllKeys');
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
@@ -24,9 +24,9 @@ var hasOwnProperty = objectProto.hasOwnProperty;
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = keys(object),
+ objProps = getAllKeys(object),
objLength = objProps.length,
- othProps = keys(other),
+ othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js
index b53c1270b..7d6eafebb 100644
--- a/node_modules/lodash/_getSymbols.js
+++ b/node_modules/lodash/_getSymbols.js
@@ -1,6 +1,12 @@
-var overArg = require('./_overArg'),
+var arrayFilter = require('./_arrayFilter'),
stubArray = require('./stubArray');
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
@@ -11,6 +17,14 @@ var nativeGetSymbols = Object.getOwnPropertySymbols;
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
-var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
module.exports = getSymbols;
diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js
index f30aac384..281a5517c 100644
--- a/node_modules/lodash/_hashHas.js
+++ b/node_modules/lodash/_hashHas.js
@@ -17,7 +17,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
*/
function hashHas(key) {
var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js
index 09bf14b43..371ca8d22 100644
--- a/node_modules/lodash/_lazyValue.js
+++ b/node_modules/lodash/_lazyValue.js
@@ -2,9 +2,6 @@ var baseWrapperValue = require('./_baseWrapperValue'),
getView = require('./_getView'),
isArray = require('./isArray');
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
-
/** Used to indicate the type of lazy iteratees. */
var LAZY_FILTER_FLAG = 1,
LAZY_MAP_FLAG = 2;
@@ -36,8 +33,7 @@ function lazyValue() {
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
- if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
- (arrLength == length && takeCount == length)) {
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
diff --git a/node_modules/lodash/_mergeDefaults.js b/node_modules/lodash/_mergeDefaults.js
deleted file mode 100644
index 9888f0e76..000000000
--- a/node_modules/lodash/_mergeDefaults.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var baseMerge = require('./_baseMerge'),
- isObject = require('./isObject');
-
-/**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to merge.
- * @param {Object} object The parent object of `objValue`.
- * @param {Object} source The parent object of `srcValue`.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- * @returns {*} Returns the value to assign.
- */
-function mergeDefaults(objValue, srcValue, key, object, source, stack) {
- if (isObject(objValue) && isObject(srcValue)) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, objValue);
- baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
- stack['delete'](srcValue);
- }
- return objValue;
-}
-
-module.exports = mergeDefaults;
diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js
index ffe0b0543..88c263f86 100644
--- a/node_modules/lodash/core.js
+++ b/node_modules/lodash/core.js
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.17.1';
+ var VERSION = '4.17.4';
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -249,9 +249,9 @@
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array of at least `200` elements
- * and any iteratees accept only one argument. The heuristic for whether a
- * section qualifies for shortcut fusion is subject to change.
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
@@ -397,24 +397,6 @@
/*------------------------------------------------------------------------*/
/**
- * Used by `_.defaults` to customize its `_.assignIn` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
- function assignInDefaults(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
- }
-
- /**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
@@ -673,7 +655,7 @@
if (value === other) {
return true;
}
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
@@ -696,17 +678,12 @@
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
+ objTag = objIsArr ? arrayTag : baseGetTag(object),
+ othTag = othIsArr ? arrayTag : baseGetTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
- if (!objIsArr) {
- objTag = baseGetTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = baseGetTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
@@ -1183,6 +1160,26 @@
}
/**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
@@ -2598,7 +2595,7 @@
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
+ * nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
@@ -3195,7 +3192,7 @@
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(args) {
- args.push(undefined, assignInDefaults);
+ args.push(undefined, customDefaultsAssignIn);
return assignInWith.apply(undefined, args);
});
diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js
index edbacfb5b..b909d31c7 100644
--- a/node_modules/lodash/core.min.js
+++ b/node_modules/lodash/core.min.js
@@ -3,27 +3,27 @@
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash core -o ./dist/lodash.core.js`
*/
-;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return d(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){
-if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(nn,r)},t)}function a(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nn?i===i:r(i,c)))var c=i,f=o}return f}function p(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function s(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=D),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?s(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f);
-}return o}function h(n,t){return n&&On(n,t,In)}function v(n,t){return p(t,function(t){return V(n[t])})}function y(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,r,e,b,u))}function g(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);
-var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),
-o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=u(i,f,r,e,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return n<t}function d(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function m(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function O(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),
-t},{})}function x(n){return xn(q(n,void 0,Y),n+"")}function A(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function E(n){return A(n,0,n.length)}function w(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function N(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;
-if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function F(n){return x(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function S(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function T(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];
-for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=S(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!w(t,function(n,t){if(!z(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=1&r,c=In(n),f=c.length,a=In(t).length;
-if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function q(n,t,r){
-return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?s(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,_(t))}function G(n,t,r){return e(n,_(t),r,3>arguments.length,mn);
-}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n;
-return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,In(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);
-return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
+;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
+return setTimeout(function(){n.apply(nn,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nn?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=D),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,In);
+}function h(n,t){return l(t,function(t){return V(n[t])})}function v(n,t){return n>t}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!K(t)?n!==n&&t!==t:b(n,t,r,e,y,u))}function b(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
+return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
+r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&y(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(q(n,void 0,Y),n+"");
+}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];
+pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];
+return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=F(n);return e}function T(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!E(t,function(n,t){if(!z(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function R(n,t,r,e,u,o){
+var i=1&r,c=In(n),f=c.length,a=In(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);
+return t}function q(n,t,r){return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,g(t));
+}function G(n,t,r){return e(n,g(t),r,3>arguments.length,mn)}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n);
+}function H(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=h(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,In(r)));
+var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
return function(t){return null==n?nn:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
-var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(h),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=_(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){var e=null==n?0:n.length;
-if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=x(function(n,t,r){return T(n,t,r)}),wn=x(function(n,t){return f(n,1,t)}),kn=x(function(n,t,r){return f(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=F(function(n,t){N(t,_n(t),n)}),Bn=F(function(n,t){N(t,I(t),n)}),Rn=F(function(n,t,r,e){N(t,qn(t),n,e)}),Dn=x(function(n){return n.push(nn,c),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
-}(function(n,t){return null==n?{}:O(n,t)});o.assignIn=Bn,o.before=J,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return p(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Nn(e)?E(e):[e],s(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Dn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return p(n,_(t))},o.flatten=$,o.flattenDeep=function(n){
-return(null==n?0:n.length)?s(n,tn):[]},o.iteratee=_,o.keys=In,o.map=function(n,t){return d(n,_(t))},o.matches=function(n){return m(Tn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?A(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=_(t),d(d(n,function(n,r,u){return{
-value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?E(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?E(n):N(n,_n(n)):n;
-},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,a(n,_(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
-return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?l(n,Y,y):nn},o.min=function(n){return n&&n.length?l(n,Y,j):nn},o.noConflict=function(){return on._===this&&(on._=vn),
-this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.1",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
-var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
+var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=g(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){var e=null==n?0:n.length;
+if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,I(t),n)}),Rn=N(function(n,t,r,e){k(t,qn(t),n,e)}),Dn=O(function(n){return n.push(nn,T),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
+}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=J,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Dn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){
+return(null==n?0:n.length)?p(n,tn):[]},o.iteratee=g,o.keys=In,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{
+value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?A(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?A(n):k(n,_n(n)):n;
+},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,f(n,g(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
+return y(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?a(n,Y,v):nn},o.min=function(n){return n&&n.length?a(n,Y,_):nn},o.noConflict=function(){return on._===this&&(on._=vn),
+this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.4",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
+var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js
index 5333b4256..6b75ee08c 100644
--- a/node_modules/lodash/defaults.js
+++ b/node_modules/lodash/defaults.js
@@ -1,7 +1,7 @@
var apply = require('./_apply'),
- assignInDefaults = require('./_assignInDefaults'),
assignInWith = require('./assignInWith'),
- baseRest = require('./_baseRest');
+ baseRest = require('./_baseRest'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn');
/**
* Assigns own and inherited enumerable string keyed properties of source
@@ -25,7 +25,7 @@ var apply = require('./_apply'),
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(args) {
- args.push(undefined, assignInDefaults);
+ args.push(undefined, customDefaultsAssignIn);
return apply(assignInWith, undefined, args);
});
diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js
index 41680ed2d..9b5fa3ee2 100644
--- a/node_modules/lodash/defaultsDeep.js
+++ b/node_modules/lodash/defaultsDeep.js
@@ -1,6 +1,6 @@
var apply = require('./_apply'),
baseRest = require('./_baseRest'),
- mergeDefaults = require('./_mergeDefaults'),
+ customDefaultsMerge = require('./_customDefaultsMerge'),
mergeWith = require('./mergeWith');
/**
@@ -23,7 +23,7 @@ var apply = require('./_apply'),
* // => { 'a': { 'b': 2, 'c': 3 } }
*/
var defaultsDeep = baseRest(function(args) {
- args.push(undefined, mergeDefaults);
+ args.push(undefined, customDefaultsMerge);
return apply(mergeWith, undefined, args);
});
diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js
index 524498526..7af27655b 100644
--- a/node_modules/lodash/fp/_baseConvert.js
+++ b/node_modules/lodash/fp/_baseConvert.js
@@ -1,6 +1,9 @@
var mapping = require('./_mapping'),
fallbackHolder = require('./placeholder');
+/** Built-in value reference. */
+var push = Array.prototype.push;
+
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
@@ -62,6 +65,37 @@ function createCloner(func) {
}
/**
+ * A specialized version of `_.spread` which flattens the spread array into
+ * the arguments of the invoked `func`.
+ *
+ * @private
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} start The start position of the spread.
+ * @returns {Function} Returns the new function.
+ */
+function flatSpread(func, start) {
+ return function() {
+ var length = arguments.length,
+ lastIndex = length - 1,
+ args = Array(length);
+
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var array = args[start],
+ otherArgs = args.slice(0, start);
+
+ if (array) {
+ push.apply(otherArgs, array);
+ }
+ if (start != lastIndex) {
+ push.apply(otherArgs, args.slice(start + 1));
+ }
+ return func.apply(this, otherArgs);
+ };
+}
+
+/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
@@ -141,7 +175,6 @@ function baseConvert(util, name, func, options) {
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg,
- 'spread': util.spread,
'toInteger': util.toInteger,
'toPath': util.toPath
};
@@ -155,7 +188,6 @@ function baseConvert(util, name, func, options) {
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
- spread = helpers.spread,
toInteger = helpers.toInteger,
toPath = helpers.toPath;
@@ -282,7 +314,7 @@ function baseConvert(util, name, func, options) {
var data = mapping.methodSpread[name],
start = data && data.start;
- return start === undefined ? ary(func, n) : spread(func, start);
+ return start === undefined ? ary(func, n) : flatSpread(func, start);
}
return func;
}
@@ -452,8 +484,8 @@ function baseConvert(util, name, func, options) {
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (realName == otherName) {
- var spreadData = mapping.methodSpread[realName],
- afterRearg = spreadData && spreadData.afterRearg;
+ var data = mapping.methodSpread[realName],
+ afterRearg = data && data.afterRearg;
result = afterRearg
? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js
index cbbcd99df..8f5ddf2d0 100644
--- a/node_modules/lodash/fp/_mapping.js
+++ b/node_modules/lodash/fp/_mapping.js
@@ -167,7 +167,8 @@ exports.iterateeAry = {
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
- 'mapKeys': [1]
+ 'mapKeys': [1],
+ 'reduceRight': [1, 0]
};
/** Used to map method names to rearg configs. */
diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js
index f8148129e..708446302 100644
--- a/node_modules/lodash/fp/_util.js
+++ b/node_modules/lodash/fp/_util.js
@@ -9,7 +9,6 @@ module.exports = {
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
- 'spread': require('../spread'),
'toInteger': require('../toInteger'),
'toPath': require('../toPath')
};
diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js
index 8a5412621..5e23e76c9 100644
--- a/node_modules/lodash/isEqual.js
+++ b/node_modules/lodash/isEqual.js
@@ -8,7 +8,7 @@ var baseIsEqual = require('./_baseIsEqual');
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
+ * nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js
index e64b0af32..b39ddce69 100644
--- a/node_modules/lodash/lodash.js
+++ b/node_modules/lodash/lodash.js
@@ -12,7 +12,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.17.1';
+ var VERSION = '4.17.4';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -1567,9 +1567,9 @@
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array of at least `200` elements
- * and any iteratees accept only one argument. The heuristic for whether a
- * section qualifies for shortcut fusion is subject to change.
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
@@ -1728,8 +1728,8 @@
/**
* By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
*
* @static
* @memberOf _
@@ -1876,8 +1876,7 @@
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
- if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
- (arrLength == length && takeCount == length)) {
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
@@ -1991,7 +1990,7 @@
*/
function hashHas(key) {
var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
/**
@@ -2465,24 +2464,6 @@
}
/**
- * Used by `_.defaults` to customize its `_.assignIn` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
- function assignInDefaults(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
- }
-
- /**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
@@ -3094,8 +3075,7 @@
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
- value = Object(value);
- return (symToStringTag && symToStringTag in value)
+ return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
@@ -3299,7 +3279,7 @@
if (value === other) {
return true;
}
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
@@ -3322,17 +3302,12 @@
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
@@ -3780,7 +3755,6 @@
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
- object = Object(object);
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
@@ -3805,7 +3779,7 @@
value = baseGet(object, path);
if (predicate(value, path)) {
- baseSet(result, path, value);
+ baseSet(result, castPath(path, object), value);
}
}
return result;
@@ -3881,14 +3855,8 @@
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
- }
- else {
- var path = castPath(index, array),
- object = parent(array, path);
-
- if (object != null) {
- delete object[toKey(last(path))];
- }
+ } else {
+ baseUnset(array, index);
}
}
}
@@ -4352,8 +4320,7 @@
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
- var key = toKey(last(path));
- return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
+ return object == null || delete object[toKey(last(path))];
}
/**
@@ -5180,8 +5147,7 @@
var args = arguments,
value = args[0];
- if (wrapper && args.length == 1 &&
- isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index = 0,
@@ -5488,7 +5454,7 @@
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
- precision = nativeMin(toInteger(precision), 292);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
@@ -5593,7 +5559,7 @@
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
- arity = newData[9] = newData[9] == null
+ arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax(newData[9] - length, 0);
@@ -5614,6 +5580,63 @@
}
/**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+ function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+ }
+
+ /**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
@@ -5784,9 +5807,9 @@
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = keys(object),
+ objProps = getAllKeys(object),
objLength = objProps.length,
- othProps = keys(other),
+ othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
@@ -6024,7 +6047,15 @@
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
- var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
@@ -6511,29 +6542,6 @@
}
/**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to merge.
- * @param {Object} object The parent object of `objValue`.
- * @param {Object} source The parent object of `srcValue`.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- * @returns {*} Returns the value to assign.
- */
- function mergeDefaults(objValue, srcValue, key, object, source, stack) {
- if (isObject(objValue) && isObject(srcValue)) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, objValue);
- baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
- stack['delete'](srcValue);
- }
- return objValue;
- }
-
- /**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
@@ -8275,7 +8283,7 @@
*
* var users = [
* { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
+ * { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
@@ -10844,18 +10852,14 @@
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
- lastIndex = args.length - 1,
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
- if (start != lastIndex) {
- arrayPush(otherArgs, castSlice(args, start + 1));
- }
return apply(func, this, otherArgs);
});
}
@@ -11518,7 +11522,7 @@
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
+ * nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
@@ -12538,7 +12542,9 @@
* // => 3
*/
function toSafeInteger(value) {
- return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
}
/**
@@ -12792,7 +12798,7 @@
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(args) {
- args.push(undefined, assignInDefaults);
+ args.push(undefined, customDefaultsAssignIn);
return apply(assignInWith, undefined, args);
});
@@ -12816,7 +12822,7 @@
* // => { 'a': { 'b': 2, 'c': 3 } }
*/
var defaultsDeep = baseRest(function(args) {
- args.push(undefined, mergeDefaults);
+ args.push(undefined, customDefaultsMerge);
return apply(mergeWith, undefined, args);
});
@@ -13470,16 +13476,16 @@
if (object == null) {
return result;
}
- var bitmask = CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG;
+ var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
- bitmask |= (path.length > 1 ? CLONE_DEEP_FLAG : 0);
+ isDeep || (isDeep = path.length > 1);
return path;
});
-
copyObject(object, getAllKeysIn(object), result);
- result = baseClone(result, bitmask);
-
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
@@ -13600,8 +13606,8 @@
// Ensure the loop is entered when path is empty.
if (!length) {
- object = undefined;
length = 1;
+ object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
@@ -14627,7 +14633,10 @@
*/
function startsWith(string, target, position) {
string = toString(string);
- position = baseClamp(toInteger(position), 0, string.length);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
@@ -14746,9 +14755,9 @@
options = undefined;
}
string = toString(string);
- options = assignInWith({}, options, settings, assignInDefaults);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
- var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
@@ -16832,14 +16841,13 @@
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
arrayEach(['drop', 'take'], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n) {
- var filtered = this.__filtered__;
- if (filtered && !index) {
- return new LazyWrapper(this);
- }
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
- var result = this.clone();
- if (filtered) {
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
+
+ if (result.__filtered__) {
result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({
diff --git a/node_modules/lodash/lodash.min.js b/node_modules/lodash/lodash.min.js
index d02d5085f..ca447f4e8 100644
--- a/node_modules/lodash/lodash.min.js
+++ b/node_modules/lodash/lodash.min.js
@@ -19,118 +19,118 @@ n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=
"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe",
"\u0149":"'n","\u017f":"s"}),et=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),ut=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
-this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Se(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[ar(0,t-1)]:F}function ot(n,t){return Te(Tr(n),dt(t,0,n.length))}function ft(n){return Te(Tr(n))}function ct(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n;
-}function at(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||vt(n,t,r)}function lt(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||vt(n,t,r)}function st(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function ht(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function pt(n,t){return n&&$r(t,Lu(t),n)}function _t(n,t){return n&&$r(t,Uu(t),n)}function vt(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function gt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);
-return u}function dt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function yt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ae(n),!c)return Tr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Br(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:ke(n),!c)return a?Nr(n,_t(f,n)):Fr(n,pt(f,n))}else{if(!Dn[s])return i?n:{};f=Ee(n,s,yt,c)}}if(o||(o=new Vn),
-i=o.get(n))return i;o.set(n,f);var a=l?a?ge:ve:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),lt(f,u,yt(e,t,r,u,n,o))}),f}function bt(n){var t=Lu(n);return function(r){return xt(r,n,t)}}function xt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function jt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function wt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
-if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function mt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function At(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function kt(n,t){var r=[];return oo(n,function(n,e,u){
-t(n,e,u)&&r.push(n)}),r}function Et(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Oe),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?Et(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Ot(n,t){return n&&co(n,t,Lu)}function St(n,t){return n&&ao(n,t,Lu)}function It(n,t){return f(t,function(t){return gu(n[t])})}function Rt(n,t){t=zr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function zt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function Wt(n){if(null==n)return n===F?"[object Undefined]":"[object Null]";
-n=ni(n);var t;if(ki&&ki in n){var r=ci.call(n,ki),e=n[ki];try{n[ki]=F,t=true}catch(n){}var u=si.call(n);t&&(r?n[ki]=e:delete n[ki]),t=u}else t=si.call(n);return t}function Bt(n,t){return n>t}function Lt(n,t){return null!=n&&ci.call(n,t)}function Ut(n,t){return null!=n&&t in ni(n)}function Ct(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){
-var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Dt(n,t,r){var e={};return Ot(n,function(n,u,i){t(e,r(n),u,i)}),e}function Mt(n,t,e){return t=zr(t,n),n=Ce(n,t),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Tt(n){return xu(n)&&"[object Arguments]"==Wt(n)}function $t(n){return xu(n)&&"[object ArrayBuffer]"==Wt(n)}function Ft(n){return xu(n)&&"[object Date]"==Wt(n)}function Nt(n,t,r,e,u){
-if(n===t)t=true;else if(null==n||null==t||!bu(n)&&!xu(t))t=n!==n&&t!==t;else n:{var i=af(n),o=af(t),f="[object Array]",c="[object Array]";i||(f=yo(n),f="[object Arguments]"==f?"[object Object]":f),o||(c=yo(t),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?he(n,t,r,e,Nt,u):pe(n,t,f,r,e,Nt,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),
-i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Nt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),i=1&r,f=Lu(n),o=f.length,c=Lu(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Nt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
-u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Pt(n){return xu(n)&&"[object Map]"==yo(n)}function Zt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Nt(l,a,3,e,f):!s)return false}}return true}function qt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function Vt(n){
-return xu(n)&&"[object RegExp]"==Wt(n)}function Kt(n){return xu(n)&&"[object Set]"==yo(n)}function Gt(n){return xu(n)&&yu(n.length)&&!!Cn[Wt(n)]}function Ht(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?nr(n[0],n[1]):Xt(n):Vu(n)}function Jt(n){if(!We(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Yt(n,t){return n<t}function Qt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Xt(n){
-var t=je(n);return 1==t.length&&t[0][2]?Be(t[0][0],t[0][1]):function(r){return r===n||Zt(r,n,t)}}function nr(n,t){return Re(n)&&t===t&&!bu(t)?Be($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Nt(t,e,3)}}function tr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)at(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Tr(c):p?(s=false,l=Br(a,true)):_?(s=false,l=Ur(a,true)):l=[]:wu(a)||cf(a)?(l=c,
-cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=ke(a))):s=false}s&&(f.set(a,l),tr(l,a,r,e,f),f.delete(a)),at(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),at(n,o,f)},Uu)}function rr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Se(t,r)?n[t]:F}function er(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(be())),n=Qt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Cr(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
-break n}}e=n.b-t.b}return e})}function ur(n,t){return n=ni(n),ir(n,t,function(t,r){return Bu(n,r)})}function ir(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=Rt(n,o);r(f,o)&&_r(i,o,f)}return i}function or(n){return function(t){return Rt(t,n)}}function fr(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Tr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function cr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];
-if(r==e||u!==i){var i=u;if(Se(u))wi.call(n,u,1);else{var u=zr(u,n),o=Ce(n,u);null!=o&&delete o[$e(Ge(u))]}}}}function ar(n,t){return n+zi(Fi()*(t-n+1))}function lr(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function sr(n,t){return wo(Ue(n,t,Nu),n+"")}function hr(n){return tt(Du(n))}function pr(n,t){var r=Du(n);return Te(r,dt(t,0,r.length))}function _r(n,t,r,e){if(!bu(n))return n;t=zr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){
-var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;a===F&&(a=bu(l)?l:Se(t[u+1])?[]:{})}lt(f,c,a),f=f[c]}return n}function vr(n){return Te(Du(n))}function gr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e<u;)r[e]=n[e+t];return r}function dr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function yr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i;
-}return u}return br(n,t,Nu,r)}function br(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function xr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function jr(n){return typeof n=="number"?n:Au(n)?P:+n}function wr(n){
-if(typeof n=="string")return n;if(af(n))return l(n,wr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function mr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Ar(n,t){t=zr(t,n),n=Ce(n,t);
-var r=$e(Ge(t));return!(null!=n&&ci.call(n,r))||delete n[r]}function kr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?gr(n,e?0:i,e?i+1:u):gr(n,e?i+1:0,e?u:i)}function Er(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Or(n,t,r){var e=n.length;if(2>e)return e?mr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=wt(i[u]||o,n[f],t,r));return mr(Et(i,1),t,r)}function Sr(n,t,r){
-for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);return o}function Ir(n){return _u(n)?n:[]}function Rr(n){return typeof n=="function"?n:Nu}function zr(n,t){return af(n)?n:Re(n,t)?[n]:mo(zu(n))}function Wr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:gr(n,t,r)}function Br(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Lr(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Ur(n,t){return new n.constructor(t?Lr(n.buffer):n.buffer,n.byteOffset,n.length);
-}function Cr(n,t){if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Dr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Mr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);
-for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Tr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function $r(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?vt(r,f,c):lt(r,f,c)}return r}function Fr(n,t){return $r(n,vo(n),t)}function Nr(n,t){return $r(n,go(n),t)}function Pr(n,t){return function(r,u){var i=af(r)?e:ht,o=t?t():{};return i(r,n,be(u,2),o);
-}}function Zr(n){return sr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&Ie(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function qr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Vr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
-}return t}}function Kr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Jr(n);return e}function Gr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?Wr(r,1).join(""):t.slice(1),e[n]()+t}}function Hr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Jr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
-return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Yr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=ye(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?ce(n,t,ne,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
-}var i=Jr(n);return u}function Qr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=be(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Xr(n){return _e(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==de(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=de(i),f="wrapper"==u?_o(i):F,o=f&&ze(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[de(f[0])].apply(o,f[3]):1==i.length&&ze(i)?o[u]():o.thru(i);
-return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e)&&200<=e.length)return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function ne(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=ye(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Dr(y,e,u,_)),i&&(y=Mr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),ce(n,t,ne,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;
-for(var w=Mi(f.length,x),m=Tr(y);w--;){var A=f[w];y[w]=Se(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Jr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Jr(n);return l}function te(n,t){return function(r,e){return Dt(r,n,t(e))}}function re(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=wr(r),e=wr(e)):(r=jr(r),e=jr(e)),u=n(r,e)}return u;
-}}function ee(n){return _e(function(t){return t=l(t,S(be())),sr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ue(n,t){t=t===F?" ":wr(t);var r=t.length;return 2>r?r?lr(t,n):t:(r=lr(t,Ri(n/T(t))),Bn.test(t)?Wr($(r),0,n).join(""):r.slice(0,n))}function ie(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Jr(n);return i;
-}function oe(n){return function(t,r,e){e&&typeof e!="number"&&Ie(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function fe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function ce(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),ze(n)&&xo(r,u),
-r.placeholder=e,De(r,n,t)}function ae(n){var t=Xu[n];return function(n,r){if(n=Iu(n),r=Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function le(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function se(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),
-a-=u?u.length:0,64&t){var l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Dr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Mr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],
-i[1]=t),n=i[0],t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Yr(n,t,f):32!=t&&33!=t||u.length?ne.apply(F,i):ie(n,t,r,e):Kr(n,t,r),i),n,t)}function he(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){
-if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function pe(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":
-return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=he(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function _e(n){return wo(Ue(n,F,Ve),n+"")}function ve(n){return zt(n,Lu,vo)}function ge(n){return zt(n,Uu,go)}function de(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){
-var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function ye(n){return(ci.call(On,"placeholder")?On:n).placeholder}function be(){var n=On.iteratee||Pu,n=n===Pu?Ht:n;return arguments.length?n(arguments[0],arguments[1]):n}function xe(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map}function je(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t;
-}function we(n,t){var r=null==n?F:n[t];return qt(r)?r:F}function me(n,t,r){t=zr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Se(o,u)&&(af(n)||cf(n)))}function Ae(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ke(n){return typeof n.constructor!="function"||We(n)?{}:io(bi(n))}function Ee(r,e,u,i){var o=r.constructor;
-switch(e){case"[object ArrayBuffer]":return Lr(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Lr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ur(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),
-h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Oe(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Se(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function Ie(n,t,r){if(!bu(r))return false;
-var e=typeof t;return!!("number"==e?pu(r)&&Se(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function Re(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function ze(n){var t=de(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function We(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||ii)}function Be(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)));
-}}function Le(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),tr(n,t,F,Le,i),i.delete(t)),n}function Ue(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function Ce(n,t){return 2>t.length?n:Rt(n,gr(t,0,-1))}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
-e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=ar(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
-}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Tr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,be(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
-g(n,be(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?Et(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?fr(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
-return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,be(t,3))}function eu(n,t){return(af(n)?i:fo)(n,be(t,3))}function uu(n,t){return(af(n)?l:Qt)(n,be(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,se(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
-r}}function fu(n,t,r){return t=r?F:t,n=se(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=se(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
+this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);
+}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;
+}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
+i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
+if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){
+t(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){
+var t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;
+if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
+var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
+i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Ft(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
+u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){
+return xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){
+var t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,
+cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Ur(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
+break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];
+if(r==e||u!==i){var i=u;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
+a===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);
+}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function br(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;
+if(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),
+null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
+return o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
+if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);
+for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);
+}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
+}return t}}function Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
+return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
+}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);
+return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Mi(f.length,x),m=Mr(y);w--;){
+var A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){
+return t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){
+e&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){
+var t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){
+var l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
+r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;
+for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;
+return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){
+return Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
+}function me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){
+return typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
+case"[object Uint16Array]":case"[object Uint32Array]":return Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,
+!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;
+return n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
+e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
+}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
+g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
+return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
+r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),
r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
-}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=Wt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=Wt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
-}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==Wt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=Wt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==Wt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==Wt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Tr(n);
-if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?dt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
-n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return $r(n,Uu(n))}function zu(n){return null==n?"":wr(n)}function Wu(n,t,r){return n=null==n?F:Rt(n,t),n===F?r:n}function Bu(n,t){return null!=n&&me(n,t,Ut)}function Lu(n){return pu(n)?Gn(n):Jt(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=We(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
-if(null==n)return{};var r=l(ge(n),function(n){return[n]});return t=be(t),ir(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Ht(typeof n=="function"?n:yt(n,1))}function Zu(n,t,r){
-var e=Lu(t),i=It(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=It(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return Re(n)?j($e(n)):or(n)}function Ku(){return[]}function Gu(){
+}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
+}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
+if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
+n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
+if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
+var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
-try{var n=we(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=we(En,"DataView"),Zi=we(En,"Map"),qi=we(En,"Promise"),Vi=we(En,"Set"),Ki=we(En,"WeakMap"),Gi=we(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
+try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
-this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=st(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
---this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=st(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<st(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=st(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=xe(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return xe(this,n).get(n);
-},Pn.prototype.has=function(n){return xe(this,n).has(n)},Pn.prototype.set=function(n,t){var r=xe(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
-return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=qr(Ot),fo=qr(St,true),co=Vr(),ao=Vr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
-return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?U(Wi,ni):Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=Wt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){var t=Wt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){
-case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=sr(function(n,t){return _u(n)?wt(n,Et(t,1,_u,true)):[];
-}),ko=sr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?wt(n,Et(t,1,_u,true),be(r,2)):[]}),Eo=sr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?wt(n,Et(t,1,_u,true),F,r):[]}),Oo=sr(function(n){var t=l(n,Ir);return t.length&&t[0]===n[0]?Ct(t):[]}),So=sr(function(n){var t=Ge(n),r=l(n,Ir);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ct(r,be(t,2)):[]}),Io=sr(function(n){var t=Ge(n),r=l(n,Ir);return(t=typeof t=="function"?t:F)&&r.pop(),r.length&&r[0]===n[0]?Ct(r,F,t):[]}),Ro=sr(He),zo=_e(function(n,t){
-var r=null==n?0:n.length,e=gt(n,t);return cr(n,l(t,function(n){return Se(n,r)?+n:n}).sort(Cr)),e}),Wo=sr(function(n){return mr(Et(n,1,_u,true))}),Bo=sr(function(n){var t=Ge(n);return _u(t)&&(t=F),mr(Et(n,1,_u,true),be(t,2))}),Lo=sr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return mr(Et(n,1,_u,true),F,t)}),Uo=sr(function(n,t){return _u(n)?wt(n,t):[]}),Co=sr(function(n){return Or(f(n,_u))}),Do=sr(function(n){var t=Ge(n);return _u(t)&&(t=F),Or(f(n,_u),be(t,2))}),Mo=sr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;
-return Or(f(n,_u),F,t)}),To=sr(Ye),$o=sr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=_e(function(n){function t(t){return gt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Se(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),n})):this.thru(t)}),No=Pr(function(n,t,r){ci.call(n,r)?++n[r]:vt(n,r,1);
-}),Po=Qr(Ze),Zo=Qr(qe),qo=Pr(function(n,t,r){ci.call(n,r)?n[r].push(t):vt(n,r,[t])}),Vo=sr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Mt(n,t,e)}),o}),Ko=Pr(function(n,t,r){vt(n,r,t)}),Go=Pr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=sr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&Ie(n,t[0],t[1])?t=[]:2<r&&Ie(t[0],t[1],t[2])&&(t=[t[0]]),er(n,Et(t,1),[])}),Jo=Si||function(){return Zn.Date.now();
-},Yo=sr(function(n,t,r){var e=1;if(r.length)var u=C(r,ye(Yo)),e=32|e;return se(n,e,t,r,u)}),Qo=sr(function(n,t,r){var e=3;if(r.length)var u=C(r,ye(Qo)),e=32|e;return se(t,e,n,r,u)}),Xo=sr(function(n,t){return jt(n,1,t)}),nf=sr(function(n,t,r){return jt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=sr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(be())):l(Et(t,1),S(be()));var e=t.length;return sr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);return r(n,this,u)})}),rf=sr(function(n,t){
-return se(n,32,F,t,C(t,ye(rf)))}),ef=sr(function(n,t){return se(n,64,F,t,C(t,ye(ef)))}),uf=_e(function(n,t){return se(n,256,F,F,F,t)}),of=fe(Bt),ff=fe(function(n,t){return n>=t}),cf=Tt(function(){return arguments}())?Tt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):$t,sf=Bi||Gu,hf=Jn?S(Jn):Ft,pf=Yn?S(Yn):Pt,_f=Qn?S(Qn):Vt,vf=Xn?S(Xn):Kt,gf=nt?S(nt):Gt,df=fe(Yt),yf=fe(function(n,t){return n<=t}),bf=Zr(function(n,t){if(We(t)||pu(t))$r(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&lt(n,r,t[r]);
-}),xf=Zr(function(n,t){$r(t,Uu(t),n)}),jf=Zr(function(n,t,r,e){$r(t,Uu(t),n,e)}),wf=Zr(function(n,t,r,e){$r(t,Lu(t),n,e)}),mf=_e(gt),Af=sr(function(n){return n.push(F,ct),r(jf,F,n)}),kf=sr(function(n){return n.push(F,Le),r(Rf,F,n)}),Ef=te(function(n,t,r){n[t]=r},Fu(Nu)),Of=te(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},be),Sf=sr(Mt),If=Zr(function(n,t,r){tr(n,t,r)}),Rf=Zr(function(n,t,r,e){tr(n,t,r,e)}),zf=_e(function(n,t){var r={};if(null==n)return r;var e=6;t=l(t,function(t){return t=zr(t,n),
-e|=1<t.length?1:0,t}),$r(n,ge(n),r);for(var r=yt(r,e),u=t.length;u--;)Ar(r,t[u]);return r}),Wf=_e(function(n,t){return null==n?{}:ur(n,t)}),Bf=le(Lu),Lf=le(Uu),Uf=Hr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Hr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Hr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Gr("toLowerCase"),Tf=Hr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),$f=Hr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Hr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase();
-}),Nf=Gr("toUpperCase"),Pf=sr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=_e(function(n,t){return u(t,function(t){t=$e(t),vt(n,t,Yo(n[t],n))}),n}),qf=Xr(),Vf=Xr(true),Kf=sr(function(n,t){return function(r){return Mt(r,n,t)}}),Gf=sr(function(n,t){return function(r){return Mt(n,r,t)}}),Hf=ee(l),Jf=ee(o),Yf=ee(_),Qf=oe(),Xf=oe(true),nc=re(function(n,t){return n+t},0),tc=ae("ceil"),rc=re(function(n,t){return n/t},1),ec=ae("floor"),uc=re(function(n,t){return n*t},1),ic=ae("round"),oc=re(function(n,t){
-return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?Ie(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];
-for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=gr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Tr(r):[r],Et(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=be();return n=t?l(n,function(n){if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],sr(function(e){
-for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return bt(yt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:pt(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),gr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;
-return e?(t=r||t===F?1:Ou(t),t=e-t,gr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Ie(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;return n},On.filter=function(n,t){return(af(n)?f:kt)(n,be(t,3))},On.flatMap=function(n,t){
-return Et(uu(n,t),1)},On.flatMapDeep=function(n,t){return Et(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),Et(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?Et(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),Et(n,t)):[]},On.flip=function(n){return se(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){
-return null==n?[]:It(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:It(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?gr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=be(t,3),Ot(n,function(n,e,u){vt(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){var r={};return t=be(t,3),Ot(n,function(n,e,u){
-vt(r,e,t(n,e,u))}),r},On.matches=function(n){return Xt(yt(n,1))},On.matchesProperty=function(n,t){return nr(n,yt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),sr(function(t){return rr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(be(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),r=e?F:r,af(r)||(r=null==r?[]:[r]),er(n,t,r))},On.over=Hf,
-On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:Rt(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?fr(n,t,be(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?fr(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){return(af(n)?f:kt)(n,su(be(t,3)))},
-On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=be(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return cr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),sr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?Ie(n,t,r):t===F)?1:Ou(t),(af(n)?ot:pr)(n,t)},On.set=function(n,t,r){return null==n?n:_r(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null==n?n:_r(n,t,r,e);
-},On.shuffle=function(n){return(af(n)?ft:vr)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Ie(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),gr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?xr(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?xr(n,be(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&Ie(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=wr(t),!t&&Bn.test(n))?Wr($(n),0,r):n.split(t,r):[];
-},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?0:Di(Ou(t),0),sr(function(e){var u=e[t],i=e.length-1,o=Wr(e,0,t);return u&&s(o,u),t!=i&&s(o,Wr(e,t+1)),r(n,this,o)})},On.tail=function(n){var t=null==n?0:n.length;return t?gr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),gr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,gr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
-return n&&n.length?kr(n,be(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?kr(n,be(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Tr(mo(zu(n)))},On.toPlainObject=Ru,
-On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=be(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Ot)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?mr(n):[]},On.uniqBy=function(n,t){return n&&n.length?mr(n,be(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?mr(n,F,t):[]},On.unset=function(n,t){return null==n||Ar(n,t);
-},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:_r(n,t,Rr(r)(Rt(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=_r(n,t,Rr(r)(Rt(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Rr(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Sr(n||[],t||[],lt)},On.zipObjectDeep=function(n,t){return Sr(n||[],t||[],_r);
-},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),dt(Iu(n),t,r)},On.clone=function(n){return yt(n,4)},On.cloneDeep=function(n){return yt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,4,t)},
-On.conformsTo=function(n,t){return null==t||xt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=wr(t);var e=n.length,e=r=r===F?e:dt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:mt;return r&&Ie(n,t,r)&&(t=F),e(n,be(t,3));
-},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,be(t,3),Ot)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,be(t,3),St)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,be(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,be(t,3),Uu)},On.forOwn=function(n,t){return n&&Ot(n,be(t,3))},On.forOwnRight=function(n,t){return n&&St(n,be(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&me(n,t,Lt);
+this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
+--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
+},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
+return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
+return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
+var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
+t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
+r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
+Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),
+n})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),
+rr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);
+return r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
+if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
+var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
+}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){
+return n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
+On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){
+if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;
+return e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;
+return n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){
+var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
+var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),
+r=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){
+return(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
+null==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
+!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
+return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
+On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
+},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
+},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
+On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
+},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,
-On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==Wt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(We(n))return!Jt(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Nt(n,t);
-},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Nt(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Zt(n,t,je(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Zt(n,t,je(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
-return qt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==Wt(n)},On.join=function(n,t){
-return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?At(n,Nu,Bt):F},On.maxBy=function(n,t){return n&&n.length?At(n,be(t,2),Bt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,be(t,2))},On.min=function(n){
-return n&&n.length?At(n,Nu,Yt):F},On.minBy=function(n,t){return n&&n.length?At(n,be(t,2),Yt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?rr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ue(zi(t),r)+n+ue(Ri(t),r))},On.padEnd=function(n,t,r){
-n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ue(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ue(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&Ie(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):ar(n,t);
-},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,be(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,be(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?Ie(n,t,r):t===F)?1:Ou(t),lr(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=zr(t,n);var e=-1,u=t.length;for(u||(n=F,u=1);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
-}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:hr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Jt(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:dr;return r&&Ie(n,t,r)&&(t=F),e(n,be(t,3))},On.sortedIndex=function(n,t){return yr(n,t)},On.sortedIndexBy=function(n,t,r){return br(n,t,be(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
-var e=yr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return yr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return br(n,t,be(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=yr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=dt(Ou(r),0,n.length),t=wr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,be(t,2)):0;
-},On.template=function(n,t,r){var e=On.templateSettings;r&&Ie(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,ct),r=jf({},t.imports,e.imports,ct);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
+On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);
+},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
+return Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
+return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
+return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
+n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
+},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
+}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
+var e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;
+},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];
-var r=4294967295,e=Mi(n,4294967295);for(t=be(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return dt(Ou(n),-9007199254740991,9007199254740991)},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=wr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,Wr(n,t,r).join("")):n},On.trimEnd=function(n,t,r){
-return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=wr(t))?(n=$(n),t=W(n,$(t))+1,Wr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=wr(t))?(n=$(n),t=z(n,$(t)),Wr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?wr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;if(r=o?Wr(o,0,i).join(""):n.slice(0,i),
-u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(wr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,Zu(On,function(){var n={};return Ot(On,function(t,r){
-ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new Mn(this);r=r===F?1:Di(Ou(r),0);var u=this.clone();return e?u.__takeCount__=Mi(r,u.__takeCount__):u.__views__.push({size:Mi(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},Mn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse();
-}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:be(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1)}}),Mn.prototype.compact=function(){
-return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=sr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Mt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(be(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),
-r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Ot(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);
-var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(af(u)?u:[],n);
-}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Ot(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[ne(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Tr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tr(this.__views__),n},Mn.prototype.reverse=function(){
-if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,u=u?f:o-1,o=this.__iteratees__,f=o.length,
-c=0,a=Mi(n,this.__takeCount__),!e||200>i||i==n&&a==n)return Er(t,this.__actions__);e=[];n:for(;n--&&c<a;){for(u+=r,i=-1,l=t[u];++i<f;){var h=o[i],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));var n=this.__index__>=this.__values__.length;
-return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){
-return Er(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file
+var r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;
+},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;
+if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,
+Zu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
+return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
+}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
+t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
+l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
+var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
+n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,
+o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));
+var n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
+},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/omit.js b/node_modules/lodash/omit.js
index ecc809731..97f5f546f 100644
--- a/node_modules/lodash/omit.js
+++ b/node_modules/lodash/omit.js
@@ -3,6 +3,7 @@ var arrayMap = require('./_arrayMap'),
baseUnset = require('./_baseUnset'),
castPath = require('./_castPath'),
copyObject = require('./_copyObject'),
+ customOmitClone = require('./_customOmitClone'),
flatRest = require('./_flatRest'),
getAllKeysIn = require('./_getAllKeysIn');
@@ -36,16 +37,16 @@ var omit = flatRest(function(object, paths) {
if (object == null) {
return result;
}
- var bitmask = CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG;
+ var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
- bitmask |= (path.length > 1 ? CLONE_DEEP_FLAG : 0);
+ isDeep || (isDeep = path.length > 1);
return path;
});
-
copyObject(object, getAllKeysIn(object), result);
- result = baseClone(result, bitmask);
-
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json
index 8215f95f6..028960d15 100644
--- a/node_modules/lodash/package.json
+++ b/node_modules/lodash/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash",
- "version": "4.17.1",
+ "version": "4.17.4",
"description": "Lodash modular utilities.",
"keywords": "modules, stdlib, util",
"homepage": "https://lodash.com/",
diff --git a/node_modules/lodash/result.js b/node_modules/lodash/result.js
index a02481029..eae12500b 100644
--- a/node_modules/lodash/result.js
+++ b/node_modules/lodash/result.js
@@ -39,8 +39,8 @@ function result(object, path, defaultValue) {
// Ensure the loop is entered when path is empty.
if (!length) {
- object = undefined;
length = 1;
+ object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
diff --git a/node_modules/lodash/spread.js b/node_modules/lodash/spread.js
index 3e437dba1..60a08e22e 100644
--- a/node_modules/lodash/spread.js
+++ b/node_modules/lodash/spread.js
@@ -48,18 +48,14 @@ function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
- lastIndex = args.length - 1,
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
- if (start != lastIndex) {
- arrayPush(otherArgs, castSlice(args, start + 1));
- }
return apply(func, this, otherArgs);
});
}
diff --git a/node_modules/lodash/startsWith.js b/node_modules/lodash/startsWith.js
index 359e5ad78..956c098a0 100644
--- a/node_modules/lodash/startsWith.js
+++ b/node_modules/lodash/startsWith.js
@@ -28,7 +28,10 @@ var baseClamp = require('./_baseClamp'),
*/
function startsWith(string, target, position) {
string = toString(string);
- position = baseClamp(toInteger(position), 0, string.length);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
diff --git a/node_modules/lodash/takeWhile.js b/node_modules/lodash/takeWhile.js
index dc84d6913..e88f5910d 100644
--- a/node_modules/lodash/takeWhile.js
+++ b/node_modules/lodash/takeWhile.js
@@ -17,7 +17,7 @@ var baseIteratee = require('./_baseIteratee'),
*
* var users = [
* { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
+ * { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
diff --git a/node_modules/lodash/template.js b/node_modules/lodash/template.js
index 2df417fa7..16539eec2 100644
--- a/node_modules/lodash/template.js
+++ b/node_modules/lodash/template.js
@@ -1,7 +1,7 @@
-var assignInDefaults = require('./_assignInDefaults'),
- assignInWith = require('./assignInWith'),
+var assignInWith = require('./assignInWith'),
attempt = require('./attempt'),
baseValues = require('./_baseValues'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
escapeStringChar = require('./_escapeStringChar'),
isError = require('./isError'),
isIterateeCall = require('./_isIterateeCall'),
@@ -141,9 +141,9 @@ function template(string, options, guard) {
options = undefined;
}
string = toString(string);
- options = assignInWith({}, options, settings, assignInDefaults);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
- var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
diff --git a/node_modules/lodash/templateSettings.js b/node_modules/lodash/templateSettings.js
index bce2f749c..5aa5924fa 100644
--- a/node_modules/lodash/templateSettings.js
+++ b/node_modules/lodash/templateSettings.js
@@ -5,8 +5,8 @@ var escape = require('./escape'),
/**
* By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
*
* @static
* @memberOf _
diff --git a/node_modules/lodash/toSafeInteger.js b/node_modules/lodash/toSafeInteger.js
index 885c5fb75..f564623d1 100644
--- a/node_modules/lodash/toSafeInteger.js
+++ b/node_modules/lodash/toSafeInteger.js
@@ -29,7 +29,9 @@ var MAX_SAFE_INTEGER = 9007199254740991;
* // => 3
*/
function toSafeInteger(value) {
- return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
}
module.exports = toSafeInteger;
diff --git a/node_modules/lodash/wrapperLodash.js b/node_modules/lodash/wrapperLodash.js
index bf27a3cbe..bd6e8ad9a 100644
--- a/node_modules/lodash/wrapperLodash.js
+++ b/node_modules/lodash/wrapperLodash.js
@@ -29,9 +29,9 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array of at least `200` elements
- * and any iteratees accept only one argument. The heuristic for whether a
- * section qualifies for shortcut fusion is subject to change.
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
diff --git a/node_modules/loose-envify/package.json b/node_modules/loose-envify/package.json
index 9de13cf1e..7952efa52 100644
--- a/node_modules/loose-envify/package.json
+++ b/node_modules/loose-envify/package.json
@@ -1,6 +1,6 @@
{
"name": "loose-envify",
- "version": "1.3.0",
+ "version": "1.3.1",
"description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
"keywords": [
"environment",
@@ -26,7 +26,7 @@
"test": "tap test/*.js"
},
"dependencies": {
- "js-tokens": "^2.0.0"
+ "js-tokens": "^3.0.0"
},
"devDependencies": {
"browserify": "^13.1.1",
diff --git a/node_modules/loose-envify/replace.js b/node_modules/loose-envify/replace.js
index 036009099..ec15e81c2 100644
--- a/node_modules/loose-envify/replace.js
+++ b/node_modules/loose-envify/replace.js
@@ -1,6 +1,6 @@
'use strict';
-var jsTokens = require('js-tokens');
+var jsTokens = require('js-tokens').default;
var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
var spaceOrCommentRe = /^(?:\s|\/[/*])/;
diff --git a/node_modules/merge-stream/README.md b/node_modules/merge-stream/README.md
index 862c3a330..966bde69c 100644
--- a/node_modules/merge-stream/README.md
+++ b/node_modules/merge-stream/README.md
@@ -24,11 +24,17 @@ This is adapted from [event-stream](https://github.com/dominictarr/event-stream)
## API
-`merged.add`
+### `mergeStream`
-A method to dynamically add more sources to the stream.
+Type: `function`
-`merged.isEmpty`
+Merges an arbitrary number of streams. Returns a merged stream.
+
+#### `merged.add`
+
+A method to dynamically add more sources to the stream. The argument supplied to `add` can be either a source or an array of sources.
+
+#### `merged.isEmpty`
A method that tells you if the merged stream is empty.
diff --git a/node_modules/merge-stream/index.js b/node_modules/merge-stream/index.js
index dff2dd8ec..f907ad65a 100644
--- a/node_modules/merge-stream/index.js
+++ b/node_modules/merge-stream/index.js
@@ -25,6 +25,7 @@ module.exports = function (/*streams...*/) {
sources.push(source);
source.once('end', remove.bind(null, source))
+ source.once('error', output.emit.bind(output, 'error'))
source.pipe(output, {end: false})
return this
}
diff --git a/node_modules/merge-stream/package.json b/node_modules/merge-stream/package.json
index 47b6a86fe..722df5491 100644
--- a/node_modules/merge-stream/package.json
+++ b/node_modules/merge-stream/package.json
@@ -1,8 +1,7 @@
{
"name": "merge-stream",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "Create a stream that emits events from multiple other streams",
- "main": "index.js",
"files": [
"index.js"
],
diff --git a/node_modules/mocha/node_modules/.bin/supports-color b/node_modules/mocha/node_modules/.bin/supports-color
index 886732fac..af0f05efe 120000
--- a/node_modules/mocha/node_modules/.bin/supports-color
+++ b/node_modules/mocha/node_modules/.bin/supports-color
@@ -1 +1 @@
-../../../supports-color/cli.js \ No newline at end of file
+../supports-color/cli.js \ No newline at end of file
diff --git a/node_modules/ms/.npmignore b/node_modules/ms/.npmignore
deleted file mode 100644
index d1aa0ce42..000000000
--- a/node_modules/ms/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-node_modules
-test
-History.md
-Makefile
-component.json
diff --git a/node_modules/ms/History.md b/node_modules/ms/History.md
deleted file mode 100644
index 32fdfc176..000000000
--- a/node_modules/ms/History.md
+++ /dev/null
@@ -1,66 +0,0 @@
-
-0.7.1 / 2015-04-20
-==================
-
- * prevent extraordinary long inputs (@evilpacket)
- * Fixed broken readme link
-
-0.7.0 / 2014-11-24
-==================
-
- * add time abbreviations, updated tests and readme for the new units
- * fix example in the readme.
- * add LICENSE file
-
-0.6.2 / 2013-12-05
-==================
-
- * Adding repository section to package.json to suppress warning from NPM.
-
-0.6.1 / 2013-05-10
-==================
-
- * fix singularization [visionmedia]
-
-0.6.0 / 2013-03-15
-==================
-
- * fix minutes
-
-0.5.1 / 2013-02-24
-==================
-
- * add component namespace
-
-0.5.0 / 2012-11-09
-==================
-
- * add short formatting as default and .long option
- * add .license property to component.json
- * add version to component.json
-
-0.4.0 / 2012-10-22
-==================
-
- * add rounding to fix crazy decimals
-
-0.3.0 / 2012-09-07
-==================
-
- * fix `ms(<String>)` [visionmedia]
-
-0.2.0 / 2012-09-03
-==================
-
- * add component.json [visionmedia]
- * add days support [visionmedia]
- * add hours support [visionmedia]
- * add minutes support [visionmedia]
- * add seconds support [visionmedia]
- * add ms string support [visionmedia]
- * refactor tests to facilitate ms(number) [visionmedia]
-
-0.1.0 / 2012-03-07
-==================
-
- * Initial release
diff --git a/node_modules/ms/LICENSE b/node_modules/ms/LICENSE
deleted file mode 100644
index 6c07561b6..000000000
--- a/node_modules/ms/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ms/README.md b/node_modules/ms/README.md
index 9b4fd0358..5b475707d 100644
--- a/node_modules/ms/README.md
+++ b/node_modules/ms/README.md
@@ -1,4 +1,12 @@
-# ms.js: miliseconds conversion utility
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
+[![Slack Channel](https://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
```js
ms('2 days') // 172800000
@@ -8,28 +16,37 @@ ms('2.5 hrs') // 9000000
ms('2h') // 7200000
ms('1m') // 60000
ms('5s') // 5000
+ms('1y') // 31557600000
ms('100') // 100
```
+### Convert from milliseconds
+
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(ms('10 hours')) // "10h"
```
+### Time format written-out
+
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
-- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
- If a number is supplied to `ms`, a string with a unit is returned.
-- If a string that contains the number is supplied, it returns it as
-a number (e.g: it returns `100` for `'100'`).
-- If you pass a string with a number and a valid unit, the number of
-equivalent ms is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
-## License
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
-MIT
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js
index 4f9277169..824b37eba 100644
--- a/node_modules/ms/index.js
+++ b/node_modules/ms/index.js
@@ -2,11 +2,11 @@
* Helpers.
*/
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var y = d * 365.25;
+var s = 1000
+var m = s * 60
+var h = m * 60
+var d = h * 24
+var y = d * 365.25
/**
* Parse or format the given `val`.
@@ -17,17 +17,23 @@ var y = d * 365.25;
*
* @param {String|Number} val
* @param {Object} options
+ * @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
-module.exports = function(val, options){
- options = options || {};
- if ('string' == typeof val) return parse(val);
- return options.long
- ? long(val)
- : short(val);
-};
+module.exports = function (val, options) {
+ options = options || {}
+ var type = typeof val
+ if (type === 'string' && val.length > 0) {
+ return parse(val)
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ?
+ fmtLong(val) :
+ fmtShort(val)
+ }
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
+}
/**
* Parse the given `str` and return milliseconds.
@@ -38,47 +44,53 @@ module.exports = function(val, options){
*/
function parse(str) {
- str = '' + str;
- if (str.length > 10000) return;
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
- if (!match) return;
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
+ str = String(str)
+ if (str.length > 10000) {
+ return
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
+ if (!match) {
+ return
+ }
+ var n = parseFloat(match[1])
+ var type = (match[2] || 'ms').toLowerCase()
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
- return n * y;
+ return n * y
case 'days':
case 'day':
case 'd':
- return n * d;
+ return n * d
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
- return n * h;
+ return n * h
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
- return n * m;
+ return n * m
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
- return n * s;
+ return n * s
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
- return n;
+ return n
+ default:
+ return undefined
}
}
@@ -90,12 +102,20 @@ function parse(str) {
* @api private
*/
-function short(ms) {
- if (ms >= d) return Math.round(ms / d) + 'd';
- if (ms >= h) return Math.round(ms / h) + 'h';
- if (ms >= m) return Math.round(ms / m) + 'm';
- if (ms >= s) return Math.round(ms / s) + 's';
- return ms + 'ms';
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd'
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h'
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm'
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's'
+ }
+ return ms + 'ms'
}
/**
@@ -106,12 +126,12 @@ function short(ms) {
* @api private
*/
-function long(ms) {
- return plural(ms, d, 'day')
- || plural(ms, h, 'hour')
- || plural(ms, m, 'minute')
- || plural(ms, s, 'second')
- || ms + ' ms';
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms'
}
/**
@@ -119,7 +139,11 @@ function long(ms) {
*/
function plural(ms, n, name) {
- if (ms < n) return;
- if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
- return Math.ceil(ms / n) + ' ' + name + 's';
+ if (ms < n) {
+ return
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's'
}
diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json
index a4e5bb603..58060aa58 100644
--- a/node_modules/ms/package.json
+++ b/node_modules/ms/package.json
@@ -1,20 +1,36 @@
{
"name": "ms",
- "version": "0.7.1",
- "description": "Tiny ms conversion utility",
- "repository": {
- "type": "git",
- "url": "git://github.com/guille/ms.js.git"
- },
+ "version": "0.7.2",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
"main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "xo && mocha test/index.js",
+ "test-browser": "serve ./test"
+ },
+ "license": "MIT",
"devDependencies": {
- "mocha": "*",
- "expect.js": "*",
- "serve": "*"
+ "expect.js": "^0.3.1",
+ "mocha": "^3.0.2",
+ "serve": "^1.4.0",
+ "xo": "^0.17.0"
},
"component": {
"scripts": {
"ms/index.js": "index.js"
}
+ },
+ "xo": {
+ "space": true,
+ "semicolon": false,
+ "envs": [
+ "mocha"
+ ],
+ "rules": {
+ "complexity": 0
+ }
}
}
diff --git a/node_modules/normalize-package-data/.npmignore b/node_modules/normalize-package-data/.npmignore
index 096746c14..2ccbe4656 100644
--- a/node_modules/normalize-package-data/.npmignore
+++ b/node_modules/normalize-package-data/.npmignore
@@ -1 +1 @@
-/node_modules/ \ No newline at end of file
+/node_modules/
diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS
index 10860f72b..66282ba1d 100644
--- a/node_modules/normalize-package-data/AUTHORS
+++ b/node_modules/normalize-package-data/AUTHORS
@@ -1,4 +1,4 @@
# Names sorted by how much code was originally theirs.
Isaac Z. Schlueter <i@izs.me>
Meryn Stol <merynstol@gmail.com>
-Robert Kowalski <rok@kowalski.gd> \ No newline at end of file
+Robert Kowalski <rok@kowalski.gd>
diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE
index 9cea2e3c9..6ed662cd5 100644
--- a/node_modules/normalize-package-data/LICENSE
+++ b/node_modules/normalize-package-data/LICENSE
@@ -1,4 +1,4 @@
-This package contains code originally written by Isaac Z. Schlueter.
+This package contains code originally written by Isaac Z. Schlueter.
Used with permission.
Copyright (c) Meryn Stol ("Author")
diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md
index 526745ef6..377277797 100644
--- a/node_modules/normalize-package-data/README.md
+++ b/node_modules/normalize-package-data/README.md
@@ -1,6 +1,6 @@
# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data)
-normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
+normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.
@@ -16,7 +16,7 @@ Basic usage is really simple. You call the function that normalize-package-data
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readFileSync("package.json")
+packageData = require("./package.json")
normalizeData(packageData)
// packageData is now normalized
```
@@ -27,8 +27,7 @@ You may activate strict validation by passing true as the second argument.
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readFileSync("package.json")
-warnFn = function(msg) { console.error(msg) }
+packageData = require("./package.json")
normalizeData(packageData, true)
// packageData is now normalized
```
@@ -41,7 +40,7 @@ Optionally, you may pass a "warning" function. It gets called whenever the `norm
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readFileSync("package.json")
+packageData = require("./package.json")
warnFn = function(msg) { console.error(msg) }
normalizeData(packageData, warnFn)
// packageData is now normalized. Any number of warnings may have been logged.
@@ -78,7 +77,7 @@ If the supplied data has an invalid name or version vield, `normalizeData` will
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
* If `homepage` field is not a string, it will be removed.
* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
-* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
+* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
### Rules for name field
@@ -86,7 +85,7 @@ If `name` field is given, the value of the name field must be a string. The stri
* start with a period.
* contain the following characters: `/@\s+%`
-* contain and characters that would need to be encoded for use in urls.
+* contain any characters that would need to be encoded for use in urls.
* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).
### Rules for version field
diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js
index 0f3aad5f5..4ac74ad7c 100644
--- a/node_modules/normalize-package-data/lib/make_warning.js
+++ b/node_modules/normalize-package-data/lib/make_warning.js
@@ -20,4 +20,4 @@ function makeTypoWarning (providedName, probableName, field) {
probableName = field + "['" + probableName + "']"
}
return util.format(messages.typo, providedName, probableName)
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js
index 7e68c69a9..bd1bfef12 100644
--- a/node_modules/normalize-package-data/lib/normalize.js
+++ b/node_modules/normalize-package-data/lib/normalize.js
@@ -9,7 +9,7 @@ var fieldsToFix = ['name','version','description','repository','modules','script
,'files','bin','man','bugs','keywords','readme','homepage','license']
var otherThingsToFix = ['dependencies','people', 'typos']
-var thingsToFix = fieldsToFix.map(function(fieldName) {
+var thingsToFix = fieldsToFix.map(function(fieldName) {
return ucFirst(fieldName) + "Field"
})
// two ways to do this in CoffeeScript on only one line, sub-70 chars:
@@ -22,8 +22,8 @@ function normalize (data, warn, strict) {
if(!strict) strict = false
if(!warn || data.private) warn = function(msg) { /* noop */ }
- if (data.scripts &&
- data.scripts.install === "node-gyp rebuild" &&
+ if (data.scripts &&
+ data.scripts.install === "node-gyp rebuild" &&
!data.scripts.preinstall) {
data.gypfile = true
}
diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js
index 08517f142..b07f1006d 100644
--- a/node_modules/normalize-package-data/lib/safe_format.js
+++ b/node_modules/normalize-package-data/lib/safe_format.js
@@ -6,4 +6,4 @@ module.exports = function() {
if (!arg) throw new TypeError('Bad arguments.')
})
return util.format.apply(null, arguments)
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json
index 73590c0a2..7f9dd283b 100644
--- a/node_modules/normalize-package-data/lib/typos.json
+++ b/node_modules/normalize-package-data/lib/typos.json
@@ -1,5 +1,5 @@
{
- "topLevel": {
+ "topLevel": {
"dependancies": "dependencies"
,"dependecies": "dependencies"
,"depdenencies": "dependencies"
diff --git a/node_modules/normalize-package-data/node_modules/.bin/semver b/node_modules/normalize-package-data/node_modules/.bin/semver
index 317eb293d..b3ca6032f 120000
--- a/node_modules/normalize-package-data/node_modules/.bin/semver
+++ b/node_modules/normalize-package-data/node_modules/.bin/semver
@@ -1 +1 @@
-../semver/bin/semver \ No newline at end of file
+../../../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/normalize-package-data/node_modules/semver/LICENSE b/node_modules/normalize-package-data/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/normalize-package-data/node_modules/semver/README.md b/node_modules/normalize-package-data/node_modules/semver/README.md
deleted file mode 100644
index cbd956549..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/README.md
+++ /dev/null
@@ -1,350 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
- $ node
- var semver = require('semver')
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- semver.clean(' =v1.2.3 ') // '1.2.3'
- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
- semver.gt('1.2.3', '9.8.7') // false
- semver.lt('1.2.3', '9.8.7') // true
-
-As a command-line utility:
-
- $ semver -h
-
- SemVer 5.1.0
-
- A JavaScript implementation of the http://semver.org/ specification
- Copyright Isaac Z. Schlueter
-
- Usage: semver [options] <version> [<version> [...]]
- Prints valid versions sorted by SemVer precedence
-
- Options:
- -r --range <range>
- Print versions that match the specified range.
-
- -i --increment [<level>]
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
- --preid <identifier>
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
- -l --loose
- Interpret versions and ranges loosely
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no satisfying versions are found, then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'prerelease', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
diff --git a/node_modules/normalize-package-data/node_modules/semver/bin/semver b/node_modules/normalize-package-data/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857e..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/node_modules/normalize-package-data/node_modules/semver/package.json b/node_modules/normalize-package-data/node_modules/semver/package.json
deleted file mode 100644
index ec9b01643..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "semver",
- "version": "5.3.0",
- "description": "The semantic version parser used by npm.",
- "main": "semver.js",
- "scripts": {
- "test": "tap test/*.js"
- },
- "devDependencies": {
- "tap": "^2.0.0"
- },
- "license": "ISC",
- "repository": "https://github.com/npm/node-semver",
- "bin": {
- "semver": "./bin/semver"
- },
- "files": [
- "bin",
- "range.bnf",
- "semver.js"
- ]
-}
diff --git a/node_modules/normalize-package-data/node_modules/semver/range.bnf b/node_modules/normalize-package-data/node_modules/semver/range.bnf
deleted file mode 100644
index 25ebd5c83..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/normalize-package-data/node_modules/semver/semver.js b/node_modules/normalize-package-data/node_modules/semver/semver.js
deleted file mode 100644
index 5f1a3c5c9..000000000
--- a/node_modules/normalize-package-data/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1203 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num;
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<';
- if (xm)
- M = +M + 1;
- else
- m = +m + 1;
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.minSatisfying = minSatisfying;
-function minSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return compare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
-
-exports.prerelease = prerelease;
-function prerelease(version, loose) {
- var parsed = parse(version, loose);
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
-}
diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json
index 35aebb151..7552cd66f 100644
--- a/node_modules/normalize-package-data/package.json
+++ b/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "2.3.5",
+ "version": "2.3.6",
"author": "Meryn Stol <merynstol@gmail.com>",
"description": "Normalizes data that can be found in package.json files.",
"license": "BSD-2-Clause",
diff --git a/node_modules/normalize-package-data/test/consistency.js b/node_modules/normalize-package-data/test/consistency.js
index 4082be25c..6bce17a16 100644
--- a/node_modules/normalize-package-data/test/consistency.js
+++ b/node_modules/normalize-package-data/test/consistency.js
@@ -13,7 +13,7 @@ tap.test("consistent normalization", function(t) {
fs.readdir (__dirname + "/fixtures", function (err, entries) {
// entries = ['coffee-script.json'] // uncomment to limit to a specific file
verifyConsistency = function(entryName, next) {
- warn = function(msg) {
+ warn = function(msg) {
// t.equal("",msg) // uncomment to have some kind of logging of warnings
}
filename = __dirname + "/fixtures/" + entryName
@@ -33,4 +33,4 @@ tap.test("consistent normalization", function(t) {
t.end()
})
}) // fs.readdir
-}) // tap.test \ No newline at end of file
+}) // tap.test
diff --git a/node_modules/normalize-package-data/test/dependencies.js b/node_modules/normalize-package-data/test/dependencies.js
index 3e493ab02..5a5aff5d7 100644
--- a/node_modules/normalize-package-data/test/dependencies.js
+++ b/node_modules/normalize-package-data/test/dependencies.js
@@ -15,7 +15,7 @@ tap.test("warn if dependency contains anything else but a string", function(t) {
devDependencies: { "b": 456},
optionalDependencies: { "c": 789}
}, warn)
-
+
var wanted1 = safeFormat(warningMessages.nonStringDependency, "a", 123)
var wanted2 = safeFormat(warningMessages.nonStringDependency, "b", 456)
var wanted3 = safeFormat(warningMessages.nonStringDependency, "c", 789)
@@ -34,7 +34,7 @@ tap.test("warn if bundleDependencies array contains anything else but strings",
normalize(a={
bundleDependencies: ["abc", 123, {foo:"bar"}]
}, warn)
-
+
var wanted1 = safeFormat(warningMessages.nonStringBundleDependency, 123)
var wanted2 = safeFormat(warningMessages.nonStringBundleDependency, {foo:"bar"})
var wanted2 = safeFormat(warningMessages.nonDependencyBundleDependency, "abc")
diff --git a/node_modules/normalize-package-data/test/fixtures/async.json b/node_modules/normalize-package-data/test/fixtures/async.json
index 5e652a6c6..9fa85b53e 100644
--- a/node_modules/normalize-package-data/test/fixtures/async.json
+++ b/node_modules/normalize-package-data/test/fixtures/async.json
@@ -33,4 +33,4 @@
"scripts": {
"test": "nodeunit test/test-async.js"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/bcrypt.json b/node_modules/normalize-package-data/test/fixtures/bcrypt.json
index 56e6d81b3..2cf3ba9e5 100644
--- a/node_modules/normalize-package-data/test/fixtures/bcrypt.json
+++ b/node_modules/normalize-package-data/test/fixtures/bcrypt.json
@@ -53,4 +53,4 @@
"Sean McArthur <sean.monstar@gmail.com> (https://github.com/seanmonstar)",
"Fanie Oosthuysen <fanie.oosthuysen@gmail.com> (https://github.com/weareu)"
]
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/coffee-script.json b/node_modules/normalize-package-data/test/fixtures/coffee-script.json
index a0b60a9d3..6582289d1 100644
--- a/node_modules/normalize-package-data/test/fixtures/coffee-script.json
+++ b/node_modules/normalize-package-data/test/fixtures/coffee-script.json
@@ -32,4 +32,4 @@
"uglify-js": "~2.2",
"jison": ">=0.2.0"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/http-server.json b/node_modules/normalize-package-data/test/fixtures/http-server.json
index 90c28863a..2ea55eb9a 100644
--- a/node_modules/normalize-package-data/test/fixtures/http-server.json
+++ b/node_modules/normalize-package-data/test/fixtures/http-server.json
@@ -4,11 +4,11 @@
"version": "0.3.0",
"author": "Nodejitsu <support@nodejitsu.com>",
"description": "a simple zero-configuration command-line http server",
- "contributors": [
+ "contributors": [
{
"name": "Marak Squires",
"email": "marak@nodejitsu.com"
- }
+ }
],
"bin": {
"http-server": "./bin/http-server"
@@ -45,9 +45,9 @@
"bundledDependencies": [
"union",
"ecstatic"
- ],
+ ],
"license": "MIT",
"engines": {
"node": ">=0.6"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/movefile.json b/node_modules/normalize-package-data/test/fixtures/movefile.json
index 593387570..07af4acf4 100644
--- a/node_modules/normalize-package-data/test/fixtures/movefile.json
+++ b/node_modules/normalize-package-data/test/fixtures/movefile.json
@@ -18,4 +18,4 @@
"dependencies": {
"node-gyp": "~0.9.1"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/no-description.json b/node_modules/normalize-package-data/test/fixtures/no-description.json
index 9ea70b6bf..8c481e1af 100644
--- a/node_modules/normalize-package-data/test/fixtures/no-description.json
+++ b/node_modules/normalize-package-data/test/fixtures/no-description.json
@@ -1,4 +1,4 @@
{
"name": "foo-bar-package",
"version": "0.0.1"
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/node-module_exist.json b/node_modules/normalize-package-data/test/fixtures/node-module_exist.json
index acc053825..b6786f430 100644
--- a/node_modules/normalize-package-data/test/fixtures/node-module_exist.json
+++ b/node_modules/normalize-package-data/test/fixtures/node-module_exist.json
@@ -23,4 +23,4 @@
"modules"
],
"license": "MIT"
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/npm.json b/node_modules/normalize-package-data/test/fixtures/npm.json
index 2262b3139..b4c704df9 100644
--- a/node_modules/normalize-package-data/test/fixtures/npm.json
+++ b/node_modules/normalize-package-data/test/fixtures/npm.json
@@ -132,4 +132,4 @@
"url": "https://github.com/isaacs/npm/raw/master/LICENSE"
}
]
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/request.json b/node_modules/normalize-package-data/test/fixtures/request.json
index 24189a551..4d58a95c2 100644
--- a/node_modules/normalize-package-data/test/fixtures/request.json
+++ b/node_modules/normalize-package-data/test/fixtures/request.json
@@ -36,4 +36,4 @@
"scripts": {
"test": "node tests/run.js"
}
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/fixtures/underscore.json b/node_modules/normalize-package-data/test/fixtures/underscore.json
index bfc8b3d26..e27cfd8c6 100644
--- a/node_modules/normalize-package-data/test/fixtures/underscore.json
+++ b/node_modules/normalize-package-data/test/fixtures/underscore.json
@@ -14,4 +14,4 @@
"test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true"
},
"license" : "MIT"
-} \ No newline at end of file
+}
diff --git a/node_modules/normalize-package-data/test/normalize.js b/node_modules/normalize-package-data/test/normalize.js
index 3926938b6..0cd4baf49 100644
--- a/node_modules/normalize-package-data/test/normalize.js
+++ b/node_modules/normalize-package-data/test/normalize.js
@@ -101,8 +101,6 @@ tap.test("urls required", function(t) {
repository: "Hello."
}, warn)
- console.error(a)
-
var expect =
[ warningMessages.missingDescription,
warningMessages.missingRepository,
@@ -129,8 +127,6 @@ tap.test("homepage field must start with a protocol.", function(t) {
homepage: 'example.org'
}, warn)
- console.error(a)
-
var expect =
[ warningMessages.missingDescription,
warningMessages.missingRepository,
@@ -152,8 +148,6 @@ tap.test("license field should be a valid SPDX expression", function(t) {
license: 'Apache 2'
}, warn)
- console.error(a)
-
var expect =
[ warningMessages.missingDescription,
warningMessages.missingRepository,
diff --git a/node_modules/normalize-package-data/test/normalize.js~ b/node_modules/normalize-package-data/test/normalize.js~
deleted file mode 100644
index de6f1ce5b..000000000
--- a/node_modules/normalize-package-data/test/normalize.js~
+++ /dev/null
@@ -1,253 +0,0 @@
-var tap = require("tap")
-var fs = require("fs")
-var path = require("path")
-
-var globals = Object.keys(global)
-
-var normalize = require("../lib/normalize")
-var warningMessages = require("../lib/warning_messages.json")
-var safeFormat = require("../lib/safe_format")
-
-var rpjPath = path.resolve(__dirname,"./fixtures/read-package-json.json")
-
-tap.test("normalize some package data", function(t) {
- var packageData = require(rpjPath)
- var warnings = []
- normalize(packageData, function(warning) {
- warnings.push(warning)
- })
- // there's no readme data in this particular object
- t.equal( warnings.length, 1, "There's exactly one warning.")
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- // Various changes have been made
- t.notEqual(packageData, JSON.parse(data), "Output is different from input.")
- t.end()
- })
-})
-
-tap.test("runs without passing warning function", function(t) {
- var packageData = require(rpjPath)
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- normalize(JSON.parse(data))
- t.ok(true, "If you read this, this means I'm still alive.")
- t.end()
- })
-})
-
-tap.test("empty object", function(t) {
- var packageData = {}
- var expect =
- { name: '',
- version: '',
- readme: 'ERROR: No README data found!',
- _id: '@' }
-
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
- normalize(packageData, warn)
- t.same(packageData, expect)
- t.same(warnings, [
- warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingLicense
- ])
- t.end()
-})
-
-tap.test("core module name", function(t) {
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
- var a
- normalize(a={
- name: "http",
- readme: "read yourself how about",
- homepage: 123,
- bugs: "what is this i don't even",
- repository: "Hello."
- }, warn)
-
- var expect = [
- safeFormat(warningMessages.conflictingName, 'http'),
- warningMessages.nonEmailUrlBugsString,
- warningMessages.emptyNormalizedBugs,
- warningMessages.nonUrlHomepage,
- warningMessages.missingLicense
- ]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("urls required", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize({
- bugs: {
- url: "/1",
- email: "not an email address"
- }
- }, warn)
- var a
- normalize(a={
- readme: "read yourself how about",
- homepage: 123,
- bugs: "what is this i don't even",
- repository: "Hello."
- }, warn)
-
- console.error(a)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.nonUrlBugsUrlField,
- warningMessages.nonEmailBugsEmailField,
- warningMessages.emptyNormalizedBugs,
- warningMessages.missingReadme,
- warningMessages.missingLicense,
- warningMessages.nonEmailUrlBugsString,
- warningMessages.emptyNormalizedBugs,
- warningMessages.nonUrlHomepage,
- warningMessages.missingLicense]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("homepage field must start with a protocol.", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- var a
- normalize(a={
- homepage: 'example.org'
- }, warn)
-
- console.error(a)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingProtocolHomepage,
- warningMessages.missingLicense]
- t.same(warnings, expect)
- t.same(a.homepage, 'http://example.org')
- t.end()
-})
-
-tap.test("license field should be a valid SPDX expression", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- var a
- normalize(a={
- license: 'Apache 2'
- }, warn)
-
- console.error(a)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.invalidLicense]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("gist bugs url", function(t) {
- var d = {
- repository: "git@gist.github.com:123456.git"
- }
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
- t.same(d.bugs, { url: 'https://gist.github.com/123456' })
- t.end();
-});
-
-tap.test("singularize repositories", function(t) {
- var d = {repositories:["git@gist.github.com:123456.git"]}
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
- t.end()
-});
-
-tap.test("treat visionmedia/express as github repo", function(t) {
- var d = {repository: {type: "git", url: "visionmedia/express"}}
- normalize(d)
- t.same(d.repository, { type: "git", url: "git+https://github.com/visionmedia/express.git" })
- t.end()
-});
-
-tap.test("treat isaacs/node-graceful-fs as github repo", function(t) {
- var d = {repository: {type: "git", url: "isaacs/node-graceful-fs"}}
- normalize(d)
- t.same(d.repository, { type: "git", url: "git+https://github.com/isaacs/node-graceful-fs.git" })
- t.end()
-});
-
-tap.test("homepage field will set to github url if repository is a github repo", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "https://github.com/isaacs/node-graceful-fs" }
- })
- t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs#readme')
- t.end()
-})
-
-tap.test("homepage field will set to github gist url if repository is a gist", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "git@gist.github.com:123456.git" }
- })
- t.same(a.homepage, 'https://gist.github.com/123456')
- t.end()
-})
-
-tap.test("homepage field will set to github gist url if repository is a shorthand reference", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "sindresorhus/chalk" }
- })
- t.same(a.homepage, 'https://github.com/sindresorhus/chalk#readme')
- t.end()
-})
-
-tap.test("don't mangle github shortcuts in dependencies", function(t) {
- var d = {dependencies: {"node-graceful-fs": "isaacs/node-graceful-fs"}}
- normalize(d)
- t.same(d.dependencies, {"node-graceful-fs": "github:isaacs/node-graceful-fs" })
- t.end()
-});
-
-tap.test("deprecation warning for array in dependencies fields", function(t) {
- var a
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize(a={
- dependencies: [],
- devDependencies: [],
- optionalDependencies: []
- }, warn)
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'dependencies')), "deprecation warning")
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'devDependencies')), "deprecation warning")
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'optionalDependencies')), "deprecation warning")
- t.end()
-})
-
-tap.test('no new globals', function(t) {
- t.same(Object.keys(global), globals)
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/typo.js b/node_modules/normalize-package-data/test/typo.js
index 0cd3eb49d..9c2fd70a4 100644
--- a/node_modules/normalize-package-data/test/typo.js
+++ b/node_modules/normalize-package-data/test/typo.js
@@ -10,7 +10,7 @@ test('typos', function(t) {
function warn(m) {
warnings.push(m)
}
-
+
var typoMessage = safeFormat.bind(undefined, warningMessages.typo)
var expect =
diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE
index fa30c4cb3..d734237bd 100644
--- a/node_modules/normalize-path/LICENSE
+++ b/node_modules/normalize-path/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2015, Jon Schlinkert.
+Copyright (c) 2014-2017, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/normalize-path/README.md b/node_modules/normalize-path/README.md
index e75d4bd0a..daa0edda3 100644
--- a/node_modules/normalize-path/README.md
+++ b/node_modules/normalize-path/README.md
@@ -1,13 +1,13 @@
-# normalize-path [![NPM version](https://badge.fury.io/js/normalize-path.svg)](http://badge.fury.io/js/normalize-path) [![Build Status](https://travis-ci.org/jonschlinkert/normalize-path.svg)](https://travis-ci.org/jonschlinkert/normalize-path)
+# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
-> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.
+> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.
## Install
-Install with [npm](https://www.npmjs.com/)
+Install with [npm](https://www.npmjs.com/):
```sh
-$ npm i normalize-path --save
+$ npm install --save normalize-path
```
## Usage
@@ -22,7 +22,7 @@ normalize('./foo/bar/baz/');
//=> './foo/bar/baz'
```
-Pass `false` as the last argument to **not** strip trailing slashes:
+Pass `false` as the last argument to **keep** trailing slashes:
```js
normalize('./foo/bar/baz/', false);
@@ -32,44 +32,61 @@ normalize('foo\\bar\\baz\\', false);
//=> 'foo/bar/baz/'
```
-## Related
+## About
-Other useful libraries for working with paths in node.js:
+### Related projects
-* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path)
-* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://www.npmjs.com/package/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with)
-* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)
-* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)
-* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath)
-* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with)
-* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments)
-* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g … [more](https://www.npmjs.com/package/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext)
-* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify)
+* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
+* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.")
+* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.")
+* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
+* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
+* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
+* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.")
+* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.")
+* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
-## Running tests
+### Contributing
-Install dev dependencies:
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 31 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [phated](https://github.com/phated) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
```sh
-$ npm i -d && npm test
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
-## Contributing
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/normalize-path/issues/new).
+```sh
+$ npm install && npm test
+```
-## Author
+### Author
**Jon Schlinkert**
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
-## License
+### License
-Copyright © 2015 Jon Schlinkert
-Released under the MIT license.
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._ \ No newline at end of file
diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js
index 137f6015b..4a4f8ccdb 100644
--- a/node_modules/normalize-path/index.js
+++ b/node_modules/normalize-path/index.js
@@ -1,17 +1,19 @@
/*!
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
+var removeTrailingSeparator = require('remove-trailing-separator');
+
module.exports = function normalizePath(str, stripTrailing) {
if (typeof str !== 'string') {
throw new TypeError('expected a string');
}
str = str.replace(/[\\\/]+/g, '/');
if (stripTrailing !== false) {
- str = str.replace(/\/$/, '');
+ str = removeTrailingSeparator(str);
}
return str;
};
diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json
index 44dc39922..c16ef9d25 100644
--- a/node_modules/normalize-path/package.json
+++ b/node_modules/normalize-path/package.json
@@ -1,9 +1,13 @@
{
"name": "normalize-path",
- "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.",
- "version": "2.0.1",
+ "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.",
+ "version": "2.1.1",
"homepage": "https://github.com/jonschlinkert/normalize-path",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Blaine Bublitz <blaine.bublitz@gmail.com> (https://twitter.com/BlaineBublitz)",
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
+ ],
"repository": "jonschlinkert/normalize-path",
"bugs": {
"url": "https://github.com/jonschlinkert/normalize-path/issues"
@@ -19,8 +23,12 @@
"scripts": {
"test": "mocha"
},
+ "dependencies": {
+ "remove-trailing-separator": "^1.0.1"
+ },
"devDependencies": {
"benchmarked": "^0.1.1",
+ "gulp-format-md": "^0.1.11",
"minimist": "^1.2.0",
"mocha": "*"
},
@@ -43,17 +51,28 @@
"verb": {
"related": {
"list": [
- "rewrite-ext",
"contains-path",
"ends-with",
- "path-ends-with",
- "path-segments",
"is-absolute",
"is-relative",
"parse-filepath",
+ "path-ends-with",
+ "path-segments",
+ "rewrite-ext",
"unixify"
],
"description": "Other useful libraries for working with paths in node.js:"
+ },
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
}
}
}
diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js
index 508504840..0930cf889 100644
--- a/node_modules/object-assign/index.js
+++ b/node_modules/object-assign/index.js
@@ -1,5 +1,12 @@
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
'use strict';
/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
@@ -20,7 +27,7 @@ function shouldUseNative() {
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
@@ -49,7 +56,7 @@ function shouldUseNative() {
}
return true;
- } catch (e) {
+ } catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
@@ -69,8 +76,8 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
}
}
- if (Object.getOwnPropertySymbols) {
- symbols = Object.getOwnPropertySymbols(from);
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json
index a25d42883..503eb1e6d 100644
--- a/node_modules/object-assign/package.json
+++ b/node_modules/object-assign/package.json
@@ -1,7 +1,7 @@
{
"name": "object-assign",
- "version": "4.1.0",
- "description": "ES2015 Object.assign() ponyfill",
+ "version": "4.1.1",
+ "description": "ES2015 `Object.assign()` ponyfill",
"license": "MIT",
"repository": "sindresorhus/object-assign",
"author": {
@@ -13,7 +13,7 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "xo && mocha",
+ "test": "xo && ava",
"bench": "matcha bench.js"
},
"files": [
@@ -34,9 +34,9 @@
"browser"
],
"devDependencies": {
- "lodash": "^4.8.2",
+ "ava": "^0.16.0",
+ "lodash": "^4.16.4",
"matcha": "^0.7.0",
- "mocha": "*",
- "xo": "*"
+ "xo": "^0.16.0"
}
}
diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md
index 13c097734..1be09d35c 100644
--- a/node_modules/object-assign/readme.md
+++ b/node_modules/object-assign/readme.md
@@ -1,8 +1,13 @@
# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
+> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-> Ponyfill: A polyfill that doesn't overwrite the native method
+
+## Use the built-in
+
+Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
+support `Object.assign()` :tada:. If you target only those environments, then by all
+means, use `Object.assign()` instead of this package.
## Install
@@ -36,7 +41,7 @@ objectAssign({foo: 0}, null, {bar: 1}, undefined);
## API
-### objectAssign(target, source, [source, ...])
+### objectAssign(target, [source, ...])
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
diff --git a/node_modules/osenv/.npmignore b/node_modules/osenv/.npmignore
deleted file mode 100644
index 8c23deeb3..000000000
--- a/node_modules/osenv/.npmignore
+++ /dev/null
@@ -1,13 +0,0 @@
-*.swp
-.*.swp
-
-.DS_Store
-*~
-.project
-.settings
-npm-debug.log
-coverage.html
-.idea
-lib-cov
-
-node_modules
diff --git a/node_modules/osenv/.travis.yml b/node_modules/osenv/.travis.yml
deleted file mode 100644
index 99f2bbf50..000000000
--- a/node_modules/osenv/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-language: node_js
-node_js:
- - '0.8'
- - '0.10'
- - '0.12'
- - 'iojs'
-before_install:
- - npm install -g npm@latest
diff --git a/node_modules/osenv/LICENSE b/node_modules/osenv/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/osenv/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/osenv/README.md b/node_modules/osenv/README.md
deleted file mode 100644
index 08fd90023..000000000
--- a/node_modules/osenv/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# osenv
-
-Look up environment settings specific to different operating systems.
-
-## Usage
-
-```javascript
-var osenv = require('osenv')
-var path = osenv.path()
-var user = osenv.user()
-// etc.
-
-// Some things are not reliably in the env, and have a fallback command:
-var h = osenv.hostname(function (er, hostname) {
- h = hostname
-})
-// This will still cause it to be memoized, so calling osenv.hostname()
-// is now an immediate operation.
-
-// You can always send a cb, which will get called in the nextTick
-// if it's been memoized, or wait for the fallback data if it wasn't
-// found in the environment.
-osenv.hostname(function (er, hostname) {
- if (er) console.error('error looking up hostname')
- else console.log('this machine calls itself %s', hostname)
-})
-```
-
-## osenv.hostname()
-
-The machine name. Calls `hostname` if not found.
-
-## osenv.user()
-
-The currently logged-in user. Calls `whoami` if not found.
-
-## osenv.prompt()
-
-Either PS1 on unix, or PROMPT on Windows.
-
-## osenv.tmpdir()
-
-The place where temporary files should be created.
-
-## osenv.home()
-
-No place like it.
-
-## osenv.path()
-
-An array of the places that the operating system will search for
-executables.
-
-## osenv.editor()
-
-Return the executable name of the editor program. This uses the EDITOR
-and VISUAL environment variables, and falls back to `vi` on Unix, or
-`notepad.exe` on Windows.
-
-## osenv.shell()
-
-The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'
-or 'cmd'.
diff --git a/node_modules/osenv/osenv.js b/node_modules/osenv/osenv.js
deleted file mode 100644
index 702a95b98..000000000
--- a/node_modules/osenv/osenv.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var isWindows = process.platform === 'win32'
-var path = require('path')
-var exec = require('child_process').exec
-var osTmpdir = require('os-tmpdir')
-var osHomedir = require('os-homedir')
-
-// looking up envs is a bit costly.
-// Also, sometimes we want to have a fallback
-// Pass in a callback to wait for the fallback on failures
-// After the first lookup, always returns the same thing.
-function memo (key, lookup, fallback) {
- var fell = false
- var falling = false
- exports[key] = function (cb) {
- var val = lookup()
- if (!val && !fell && !falling && fallback) {
- fell = true
- falling = true
- exec(fallback, function (er, output, stderr) {
- falling = false
- if (er) return // oh well, we tried
- val = output.trim()
- })
- }
- exports[key] = function (cb) {
- if (cb) process.nextTick(cb.bind(null, null, val))
- return val
- }
- if (cb && !falling) process.nextTick(cb.bind(null, null, val))
- return val
- }
-}
-
-memo('user', function () {
- return ( isWindows
- ? process.env.USERDOMAIN + '\\' + process.env.USERNAME
- : process.env.USER
- )
-}, 'whoami')
-
-memo('prompt', function () {
- return isWindows ? process.env.PROMPT : process.env.PS1
-})
-
-memo('hostname', function () {
- return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME
-}, 'hostname')
-
-memo('tmpdir', function () {
- return osTmpdir()
-})
-
-memo('home', function () {
- return osHomedir()
-})
-
-memo('path', function () {
- return (process.env.PATH ||
- process.env.Path ||
- process.env.path).split(isWindows ? ';' : ':')
-})
-
-memo('editor', function () {
- return process.env.EDITOR ||
- process.env.VISUAL ||
- (isWindows ? 'notepad.exe' : 'vi')
-})
-
-memo('shell', function () {
- return isWindows ? process.env.ComSpec || 'cmd'
- : process.env.SHELL || 'bash'
-})
diff --git a/node_modules/osenv/package.json b/node_modules/osenv/package.json
deleted file mode 100644
index 4b7e71c40..000000000
--- a/node_modules/osenv/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "osenv",
- "version": "0.1.3",
- "main": "osenv.js",
- "directories": {
- "test": "test"
- },
- "dependencies": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
- },
- "devDependencies": {
- "tap": "^1.2.0"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "repository": "https://github.com/npm/osenv",
- "keywords": [
- "environment",
- "variable",
- "home",
- "tmpdir",
- "path",
- "prompt",
- "ps1"
- ],
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "license": "ISC",
- "description": "Look up environment settings specific to different operating systems"
-}
diff --git a/node_modules/osenv/test/unix.js b/node_modules/osenv/test/unix.js
deleted file mode 100644
index f87cbfb32..000000000
--- a/node_modules/osenv/test/unix.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// only run this test on windows
-// pretending to be another platform is too hacky, since it breaks
-// how the underlying system looks up module paths and runs
-// child processes, and all that stuff is cached.
-if (process.platform === 'win32') {
- console.log('TAP Version 13\n' +
- '1..0\n' +
- '# Skip unix tests, this is not unix\n')
- return
-}
-var tap = require('tap')
-
-// like unix, but funny
-process.env.USER = 'sirUser'
-process.env.HOME = '/home/sirUser'
-process.env.HOSTNAME = 'my-machine'
-process.env.TMPDIR = '/tmpdir'
-process.env.TMP = '/tmp'
-process.env.TEMP = '/temp'
-process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin'
-process.env.PS1 = '(o_o) $ '
-process.env.EDITOR = 'edit'
-process.env.VISUAL = 'visualedit'
-process.env.SHELL = 'zsh'
-
-tap.test('basic unix sanity test', function (t) {
- var osenv = require('../osenv.js')
-
- t.equal(osenv.user(), process.env.USER)
- t.equal(osenv.home(), process.env.HOME)
- t.equal(osenv.hostname(), process.env.HOSTNAME)
- t.same(osenv.path(), process.env.PATH.split(':'))
- t.equal(osenv.prompt(), process.env.PS1)
- t.equal(osenv.tmpdir(), process.env.TMPDIR)
-
- // mildly evil, but it's for a test.
- process.env.TMPDIR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TMP)
-
- process.env.TMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TEMP)
-
- process.env.TEMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- osenv.home = function () { return null }
- t.equal(osenv.tmpdir(), '/tmp')
-
- t.equal(osenv.editor(), 'edit')
- process.env.EDITOR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'visualedit')
-
- process.env.VISUAL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'vi')
-
- t.equal(osenv.shell(), 'zsh')
- process.env.SHELL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.shell(), 'bash')
-
- t.end()
-})
diff --git a/node_modules/osenv/test/windows.js b/node_modules/osenv/test/windows.js
deleted file mode 100644
index c9d837a32..000000000
--- a/node_modules/osenv/test/windows.js
+++ /dev/null
@@ -1,74 +0,0 @@
-// only run this test on windows
-// pretending to be another platform is too hacky, since it breaks
-// how the underlying system looks up module paths and runs
-// child processes, and all that stuff is cached.
-if (process.platform !== 'win32') {
- console.log('TAP version 13\n' +
- '1..0 # Skip windows tests, this is not windows\n')
- return
-}
-
-// load this before clubbing the platform name.
-var tap = require('tap')
-
-process.env.windir = 'c:\\windows'
-process.env.USERDOMAIN = 'some-domain'
-process.env.USERNAME = 'sirUser'
-process.env.USERPROFILE = 'C:\\Users\\sirUser'
-process.env.COMPUTERNAME = 'my-machine'
-process.env.TMPDIR = 'C:\\tmpdir'
-process.env.TMP = 'C:\\tmp'
-process.env.TEMP = 'C:\\temp'
-process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin'
-process.env.PROMPT = '(o_o) $ '
-process.env.EDITOR = 'edit'
-process.env.VISUAL = 'visualedit'
-process.env.ComSpec = 'some-com'
-
-tap.test('basic windows sanity test', function (t) {
- var osenv = require('../osenv.js')
-
- t.equal(osenv.user(),
- process.env.USERDOMAIN + '\\' + process.env.USERNAME)
- t.equal(osenv.home(), process.env.USERPROFILE)
- t.equal(osenv.hostname(), process.env.COMPUTERNAME)
- t.same(osenv.path(), process.env.Path.split(';'))
- t.equal(osenv.prompt(), process.env.PROMPT)
- t.equal(osenv.tmpdir(), process.env.TMPDIR)
-
- // mildly evil, but it's for a test.
- process.env.TMPDIR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TMP)
-
- process.env.TMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TEMP)
-
- process.env.TEMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- osenv.home = function () { return null }
- t.equal(osenv.tmpdir(), 'c:\\windows\\temp')
-
- t.equal(osenv.editor(), 'edit')
- process.env.EDITOR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'visualedit')
-
- process.env.VISUAL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'notepad.exe')
-
- t.equal(osenv.shell(), 'some-com')
- process.env.ComSpec = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.shell(), 'cmd')
-
- t.end()
-})
diff --git a/node_modules/osenv/x.tap b/node_modules/osenv/x.tap
deleted file mode 100644
index 90d847208..000000000
--- a/node_modules/osenv/x.tap
+++ /dev/null
@@ -1,39 +0,0 @@
-TAP version 13
- # Subtest: test/unix.js
- TAP version 13
- # Subtest: basic unix sanity test
- ok 1 - should be equal
- ok 2 - should be equal
- ok 3 - should be equal
- ok 4 - should be equivalent
- ok 5 - should be equal
- ok 6 - should be equal
- ok 7 - should be equal
- ok 8 - should be equal
- ok 9 - should be equal
- ok 10 - should be equal
- ok 11 - should be equal
- ok 12 - should be equal
- ok 13 - should be equal
- ok 14 - should be equal
- 1..14
- ok 1 - basic unix sanity test # time=10.712ms
-
- 1..1
- # time=18.422ms
-ok 1 - test/unix.js # time=169.827ms
-
- # Subtest: test/windows.js
- TAP version 13
- 1..0 # Skip windows tests, this is not windows
-
-ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows
-
- # Subtest: test/nada.js
- TAP version 13
- 1..0
-
-ok 2 - test/nada.js
-
-1..3
-# time=274.247ms
diff --git a/node_modules/randomatic/LICENSE b/node_modules/randomatic/LICENSE
index 6d53705b1..4a3d2da41 100755
--- a/node_modules/randomatic/LICENSE
+++ b/node_modules/randomatic/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2013-2015, Jon Schlinkert.
+Copyright (c) 2013-2016, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/randomatic/README.md b/node_modules/randomatic/README.md
index 28b1ae031..1c5202a29 100644
--- a/node_modules/randomatic/README.md
+++ b/node_modules/randomatic/README.md
@@ -1,19 +1,13 @@
-# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg)](https://www.npmjs.com/package/randomatic)
+# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg?style=flat)](https://www.npmjs.com/package/randomatic) [![NPM monthly downloads](https://img.shields.io/npm/dm/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![NPM total downloads](https://img.shields.io/npm/dt/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/randomatic.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/randomatic)
> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.
## Install
-Install with [npm](https://www.npmjs.com/)
+Install with [npm](https://www.npmjs.com/):
```sh
-$ npm i randomatic --save
-```
-
-Install with [bower](http://bower.io/)
-
-```sh
-$ bower install randomatic --save
+$ npm install --save randomatic
```
## Usage
@@ -70,15 +64,13 @@ randomize('Aa0!', 10);
If `length` is left undefined, the length of the pattern in the first parameter will be used. For example:
-+ `randomize('00')` will generate a 2-digit random number
+* `randomize('00')` will generate a 2-digit random number
* `randomize('000')` will generate a 3-digit random number
* `randomize('0000')` will generate a 4-digit random number...
* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string...
These are just examples, [see the tests](./test.js) for more use cases and examples.
-## options
-
#### chars
Type: `String`
@@ -105,28 +97,56 @@ Define a custom string to be randomized.
_The order in which the characters are defined is insignificant._
-## Related
+## About
+
+### Related projects
+
+* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left "Left pad a string with zeros or a specified string. Fastest implementation.")
+* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right "Right pad a string with zeros or a specified string. Fastest implementation.")
+* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
-* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left)
-* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right)
-* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string)
+| **Commits** | **Contributor**<br/> |
+| --- | --- |
+| 36 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [TrySound](https://github.com/TrySound) |
+| 1 | [paulmillr](https://github.com/paulmillr) |
-## Contributing
+### Building docs
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues/new).
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
-## Author
+### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-## License
+### License
-Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
-Released under the MIT license.
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/jonschlinkert/randomatic/blob/master/LICENSE).
***
-_This file was generated by [verb](https://github.com/verbose/verb) on December 10, 2015._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 24, 2016._ \ No newline at end of file
diff --git a/node_modules/randomatic/package.json b/node_modules/randomatic/package.json
index 24872b11b..17d4d3409 100644
--- a/node_modules/randomatic/package.json
+++ b/node_modules/randomatic/package.json
@@ -1,7 +1,7 @@
{
"name": "randomatic",
"description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.",
- "version": "1.1.5",
+ "version": "1.1.6",
"homepage": "https://github.com/jonschlinkert/randomatic",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/randomatic",
@@ -13,6 +13,9 @@
"index.js"
],
"main": "index.js",
+ "engines": {
+ "node": ">= 0.10.0"
+ },
"scripts": {
"test": "mocha"
},
@@ -24,6 +27,7 @@
"ansi-bold": "^0.1.1",
"benchmarked": "^0.1.4",
"glob": "^5.0.15",
+ "gulp-format-md": "^0.1.11",
"mocha": "*",
"should": "*"
},
@@ -36,19 +40,32 @@
"numeric",
"rand",
"random",
+ "randomatic",
"randomize",
"randomized"
],
"verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
"related": {
"list": [
- "repeat-string",
"pad-left",
- "pad-right"
+ "pad-right",
+ "repeat-string"
]
},
- "plugins": [
- "gulp-format-md"
+ "lint": {
+ "reflinks": true
+ },
+ "reflinks": [
+ "verb",
+ "verb-generate-readme"
]
}
}
diff --git a/node_modules/readable-stream/.npmignore b/node_modules/readable-stream/.npmignore
index 38344f87a..6d270c6cc 100644
--- a/node_modules/readable-stream/.npmignore
+++ b/node_modules/readable-stream/.npmignore
@@ -2,4 +2,8 @@ build/
test/
examples/
fs.js
-zlib.js \ No newline at end of file
+zlib.js
+.zuul.yml
+.nyc_output
+coverage
+docs/
diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml
index 1b8211846..76b4b0cfc 100644
--- a/node_modules/readable-stream/.travis.yml
+++ b/node_modules/readable-stream/.travis.yml
@@ -7,9 +7,6 @@ notifications:
email: false
matrix:
fast_finish: true
- allow_failures:
- - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
include:
- node_js: '0.8'
env: TASK=test
@@ -29,8 +26,10 @@ matrix:
env: TASK=test
- node_js: 5
env: TASK=test
- - node_js: 5
- env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
- node_js: 5
env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
- node_js: 5
@@ -40,11 +39,9 @@ matrix:
- node_js: 5
env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
- node_js: 5
- env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- - node_js: 5
env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest
script: "npm run $TASK"
env:
global:
diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE
index e3d4e695a..2873b3b2e 100644
--- a/node_modules/readable-stream/LICENSE
+++ b/node_modules/readable-stream/LICENSE
@@ -1,3 +1,31 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
@@ -16,3 +44,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
+"""
diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md
index 86b95a3bf..8b6e5d39b 100644
--- a/node_modules/readable-stream/README.md
+++ b/node_modules/readable-stream/README.md
@@ -1,6 +1,6 @@
# readable-stream
-***Node-core v5.8.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+***Node-core v7.0.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
@@ -16,14 +16,33 @@ npm install --save readable-stream
***Node-core streams for userland***
This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core, including [documentation](doc/stream.markdown).
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/).
If you want to guarantee a stable streams base, regardless of what version of
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
-As of version 2.0.0 **readable-stream** uses semantic versioning.
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
-# Streams WG Team Members
+<a name="members"></a>
+## Team Members
* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
- Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
@@ -34,3 +53,5 @@ As of version 2.0.0 **readable-stream** uses semantic versioning.
* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js
index ca807af87..46924cbfd 100644
--- a/node_modules/readable-stream/duplex.js
+++ b/node_modules/readable-stream/duplex.js
@@ -1 +1 @@
-module.exports = require("./lib/_stream_duplex.js")
+module.exports = require('./readable').Duplex
diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
index 54a9d5c55..b19b2088b 100644
--- a/node_modules/readable-stream/lib/_stream_readable.js
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -11,31 +11,27 @@ var isArray = require('isarray');
/*</replacement>*/
/*<replacement>*/
-var Buffer = require('buffer').Buffer;
+var Duplex;
/*</replacement>*/
Readable.ReadableState = ReadableState;
-var EE = require('events');
-
/*<replacement>*/
+var EE = require('events').EventEmitter;
+
var EElistenerCount = function (emitter, type) {
return emitter.listeners(type).length;
};
/*</replacement>*/
/*<replacement>*/
-var Stream;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
+var Stream = require('./internal/streams/stream');
/*</replacement>*/
var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
/*<replacement>*/
var util = require('core-util-is');
@@ -44,7 +40,7 @@ util.inherits = require('inherits');
/*<replacement>*/
var debugUtil = require('util');
-var debug = undefined;
+var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
debug = debugUtil.debuglog('stream');
} else {
@@ -52,11 +48,27 @@ if (debugUtil && debugUtil.debuglog) {
}
/*</replacement>*/
+var BufferList = require('./internal/streams/BufferList');
var StringDecoder;
util.inherits(Readable, Stream);
-var Duplex;
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') {
+ return emitter.prependListener(event, fn);
+ } else {
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+ }
+}
+
function ReadableState(options, stream) {
Duplex = Duplex || require('./_stream_duplex');
@@ -75,9 +87,12 @@ function ReadableState(options, stream) {
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
+ this.highWaterMark = ~~this.highWaterMark;
- this.buffer = [];
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
@@ -123,7 +138,6 @@ function ReadableState(options, stream) {
}
}
-var Duplex;
function Readable(options) {
Duplex = Duplex || require('./_stream_duplex');
@@ -149,7 +163,7 @@ Readable.prototype.push = function (chunk, encoding) {
if (!state.objectMode && typeof chunk === 'string') {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
+ chunk = bufferShim.from(chunk, encoding);
encoding = '';
}
}
@@ -179,8 +193,8 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var e = new Error('stream.push() after EOF');
stream.emit('error', e);
} else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
+ var _e = new Error('stream.unshift() after end event');
+ stream.emit('error', _e);
} else {
var skipAdd;
if (state.decoder && !addToFront && !encoding) {
@@ -240,7 +254,8 @@ function computeNewHighWaterMark(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
} else {
- // Get the next highest power of 2
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
n--;
n |= n >>> 1;
n |= n >>> 2;
@@ -252,44 +267,34 @@ function computeNewHighWaterMark(n) {
return n;
}
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended) return 0;
-
- if (state.objectMode) return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
}
-
- if (n <= 0) return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
+ // If we're asking for more than the current hwm, then raise the hwm.
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else {
- return state.length;
- }
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
}
-
- return n;
+ return state.length;
}
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
debug('read', n);
+ n = parseInt(n, 10);
var state = this._readableState;
var nOrig = n;
- if (typeof n !== 'number' || n > 0) state.emittedReadable = false;
+ if (n !== 0) state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
@@ -345,9 +350,7 @@ Readable.prototype.read = function (n) {
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
- }
-
- if (doRead) {
+ } else if (doRead) {
debug('do read');
state.reading = true;
state.sync = true;
@@ -356,28 +359,29 @@ Readable.prototype.read = function (n) {
// call internal read method
this._read(state.highWaterMark);
state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
}
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (doRead && !state.reading) n = howMuchToRead(nOrig, state);
-
var ret;
if (n > 0) ret = fromList(n, state);else ret = null;
if (ret === null) {
state.needReadable = true;
n = 0;
+ } else {
+ state.length -= n;
}
- state.length -= n;
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended) state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended && state.length === 0) endReadable(this);
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
if (ret !== null) this.emit('data', ret);
@@ -456,7 +460,7 @@ function maybeReadMore_(stream, state) {
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function (n) {
- this.emit('error', new Error('not implemented'));
+ this.emit('error', new Error('_read() is not implemented'));
};
Readable.prototype.pipe = function (dest, pipeOpts) {
@@ -525,17 +529,25 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
}
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
src.on('data', ondata);
function ondata(chunk) {
debug('ondata');
+ increasedAwaitDrain = false;
var ret = dest.write(chunk);
- if (false === ret) {
+ if (false === ret && !increasedAwaitDrain) {
// If the user unpiped during `dest.write()`, it is possible
// to get stuck in a permanently paused state if that write
// also returned false.
- if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) {
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
}
src.pause();
}
@@ -549,9 +561,9 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
dest.removeListener('error', onerror);
if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
}
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error];
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
// Both close and finish should trigger unpipe, but only once.
function onclose() {
@@ -626,16 +638,16 @@ Readable.prototype.unpipe = function (dest) {
state.pipesCount = 0;
state.flowing = false;
- for (var _i = 0; _i < len; _i++) {
- dests[_i].emit('unpipe', this);
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this);
}return this;
}
// try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1) return this;
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
- state.pipes.splice(i, 1);
+ state.pipes.splice(index, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1) state.pipes = state.pipes[0];
@@ -649,18 +661,14 @@ Readable.prototype.unpipe = function (dest) {
Readable.prototype.on = function (ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
- // If listening to data, and it has not explicitly been paused,
- // then call resume to start the flow of data on the next tick.
- if (ev === 'data' && false !== this._readableState.flowing) {
- this.resume();
- }
-
- if (ev === 'readable' && !this._readableState.endEmitted) {
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
state.emittedReadable = false;
- state.needReadable = true;
if (!state.reading) {
processNextTick(nReadingNextTick, this);
} else if (state.length) {
@@ -704,6 +712,7 @@ function resume_(stream, state) {
}
state.resumeScheduled = false;
+ state.awaitDrain = 0;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading) stream.read(0);
@@ -722,11 +731,7 @@ Readable.prototype.pause = function () {
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
- if (state.flowing) {
- do {
- var chunk = stream.read();
- } while (null !== chunk && state.flowing);
- }
+ while (state.flowing && stream.read() !== null) {}
}
// wrap an old-style stream as the async data source.
@@ -774,10 +779,9 @@ Readable.prototype.wrap = function (stream) {
}
// proxy certain important events.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function (ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
+ }
// when we try to consume some more bytes, simply unpause the
// underlying stream.
@@ -797,50 +801,101 @@ Readable._fromList = fromList;
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
+ // nothing buffered
+ if (state.length === 0) return null;
- // nothing in the list, definitely empty.
- if (list.length === 0) return null;
-
- if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
- list.length = 0;
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
} else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode) ret = '';else ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
- if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy);
+ return ret;
+}
- if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift();
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
- c += cpy;
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
}
+ break;
}
+ ++c;
}
+ list.length -= c;
+ return ret;
+}
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = bufferShim.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
return ret;
}
@@ -849,7 +904,7 @@ function endReadable(stream) {
// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
- if (state.length > 0) throw new Error('endReadable called on non-empty stream');
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
if (!state.endEmitted) {
state.ended = true;
diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js
index 625cdc176..cd2583207 100644
--- a/node_modules/readable-stream/lib/_stream_transform.js
+++ b/node_modules/readable-stream/lib/_stream_transform.js
@@ -94,7 +94,6 @@ function Transform(options) {
this._transformState = new TransformState(this);
- // when the writable side finishes, then flush out anything remaining.
var stream = this;
// start out asking for a readable event once data is transformed.
@@ -111,9 +110,10 @@ function Transform(options) {
if (typeof options.flush === 'function') this._flush = options.flush;
}
+ // When the writable side finishes, then flush out anything remaining.
this.once('prefinish', function () {
- if (typeof this._flush === 'function') this._flush(function (er) {
- done(stream, er);
+ if (typeof this._flush === 'function') this._flush(function (er, data) {
+ done(stream, er, data);
});else done(stream);
});
}
@@ -134,7 +134,7 @@ Transform.prototype.push = function (chunk, encoding) {
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('not implemented');
+ throw new Error('_transform() is not implemented');
};
Transform.prototype._write = function (chunk, encoding, cb) {
@@ -164,17 +164,19 @@ Transform.prototype._read = function (n) {
}
};
-function done(stream, er) {
+function done(stream, er, data) {
if (er) return stream.emit('error', er);
+ if (data !== null && data !== undefined) stream.push(data);
+
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
var ws = stream._writableState;
var ts = stream._transformState;
- if (ws.length) throw new Error('calling transform done when ws.length != 0');
+ if (ws.length) throw new Error('Calling transform done when ws.length != 0');
- if (ts.transforming) throw new Error('calling transform done when still transforming');
+ if (ts.transforming) throw new Error('Calling transform done when still transforming');
return stream.push(null);
} \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js
index 95916c992..15db03868 100644
--- a/node_modules/readable-stream/lib/_stream_writable.js
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -15,7 +15,7 @@ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.
/*</replacement>*/
/*<replacement>*/
-var Buffer = require('buffer').Buffer;
+var Duplex;
/*</replacement>*/
Writable.WritableState = WritableState;
@@ -32,17 +32,13 @@ var internalUtil = {
/*</replacement>*/
/*<replacement>*/
-var Stream;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
+var Stream = require('./internal/streams/stream');
/*</replacement>*/
var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
util.inherits(Writable, Stream);
@@ -55,7 +51,6 @@ function WriteReq(chunk, encoding, cb) {
this.next = null;
}
-var Duplex;
function WritableState(options, stream) {
Duplex = Duplex || require('./_stream_duplex');
@@ -75,8 +70,9 @@ function WritableState(options, stream) {
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
+ this.highWaterMark = ~~this.highWaterMark;
+ // drain event flag.
this.needDrain = false;
// at the start of calling end()
this.ending = false;
@@ -146,13 +142,12 @@ function WritableState(options, stream) {
// count buffered requests
this.bufferedRequestCount = 0;
- // create the two objects needed to store the corked requests
- // they are not a linked list, as no new elements are inserted in there
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
this.corkedRequestsFree = new CorkedRequest(this);
- this.corkedRequestsFree.next = new CorkedRequest(this);
}
-WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+WritableState.prototype.getBuffer = function getBuffer() {
var current = this.bufferedRequest;
var out = [];
while (current) {
@@ -172,13 +167,37 @@ WritableState.prototype.getBuffer = function writableStateGetBuffer() {
} catch (_) {}
})();
-var Duplex;
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
function Writable(options) {
Duplex = Duplex || require('./_stream_duplex');
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
this._writableState = new WritableState(options, this);
@@ -196,7 +215,7 @@ function Writable(options) {
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
+ this.emit('error', new Error('Cannot pipe, not readable'));
};
function writeAfterEnd(stream, cb) {
@@ -206,16 +225,19 @@ function writeAfterEnd(stream, cb) {
processNextTick(cb, er);
}
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
var valid = true;
+ var er = false;
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
stream.emit('error', er);
processNextTick(cb, er);
valid = false;
@@ -226,19 +248,20 @@ function validChunk(stream, state, chunk, cb) {
Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
+ var isBuf = Buffer.isBuffer(chunk);
if (typeof encoding === 'function') {
cb = encoding;
encoding = null;
}
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
if (typeof cb !== 'function') cb = nop;
- if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
state.pendingcb++;
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
}
return ret;
@@ -265,11 +288,12 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
this._writableState.defaultEncoding = encoding;
+ return this;
};
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
+ chunk = bufferShim.from(chunk, encoding);
}
return chunk;
}
@@ -277,10 +301,11 @@ function decodeChunk(state, chunk, encoding) {
// if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+ }
var len = state.objectMode ? 1 : chunk.length;
state.length += len;
@@ -349,8 +374,8 @@ function onwrite(stream, er) {
asyncWrite(afterWrite, stream, state, finished, cb);
/*</replacement>*/
} else {
- afterWrite(stream, state, finished, cb);
- }
+ afterWrite(stream, state, finished, cb);
+ }
}
}
@@ -392,12 +417,16 @@ function clearBuffer(stream, state) {
doWrite(stream, state, true, state.length, buffer, '', holder.finish);
- // doWrite is always async, defer these to save a bit of time
+ // doWrite is almost always async, defer these to save a bit of time
// as the hot path ends with doWrite
state.pendingcb++;
state.lastBufferedRequest = null;
- state.corkedRequestsFree = holder.next;
- holder.next = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
} else {
// Slow case, write chunks one-by-one
while (entry) {
@@ -426,7 +455,7 @@ function clearBuffer(stream, state) {
}
Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('not implemented'));
+ cb(new Error('_write() is not implemented'));
};
Writable.prototype._writev = null;
@@ -497,7 +526,6 @@ function CorkedRequest(state) {
this.next = null;
this.entry = null;
-
this.finish = function (err) {
var entry = _this.entry;
_this.entry = null;
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
index d77b090ec..f4ab1a9a4 100644
--- a/node_modules/readable-stream/package.json
+++ b/node_modules/readable-stream/package.json
@@ -1,25 +1,33 @@
{
"name": "readable-stream",
- "version": "2.0.6",
+ "version": "2.2.9",
"description": "Streams3, a user-land copy of the stream library from Node.js",
"main": "readable.js",
"dependencies": {
+ "buffer-shims": "~1.0.0",
"core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
"isarray": "~1.0.0",
+ "inherits": "~2.0.1",
"process-nextick-args": "~1.0.6",
- "string_decoder": "~0.10.x",
+ "string_decoder": "~1.0.0",
"util-deprecate": "~1.0.1"
},
"devDependencies": {
- "tap": "~0.2.6",
+ "assert": "~1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "nyc": "^6.4.0",
+ "tap": "~0.7.1",
"tape": "~4.5.1",
- "zuul": "~3.9.0"
+ "zuul": "~3.10.0"
},
"scripts": {
"test": "tap test/parallel/*.js test/ours/*.js",
- "browser": "npm run write-zuul && zuul -- test/browser.js",
- "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
+ "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml",
+ "local": "zuul --local 3000 --no-coverage -- test/browser.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov"
},
"repository": {
"type": "git",
@@ -31,7 +39,16 @@
"pipe"
],
"browser": {
- "util": false
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
},
"license": "MIT"
}
diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js
index 27e8d8a55..ffd791d7f 100644
--- a/node_modules/readable-stream/passthrough.js
+++ b/node_modules/readable-stream/passthrough.js
@@ -1 +1 @@
-module.exports = require("./lib/_stream_passthrough.js")
+module.exports = require('./readable').PassThrough
diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js
index 6222a5798..ec89ec533 100644
--- a/node_modules/readable-stream/readable.js
+++ b/node_modules/readable-stream/readable.js
@@ -1,12 +1,19 @@
-var Stream = (function (){
- try {
- return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
- } catch(_){}
-}());
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = Stream || exports;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js
index 5d482f078..b1baba26d 100644
--- a/node_modules/readable-stream/transform.js
+++ b/node_modules/readable-stream/transform.js
@@ -1 +1 @@
-module.exports = require("./lib/_stream_transform.js")
+module.exports = require('./readable').Transform
diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js
index e1e9efdf3..634ddcbe1 100644
--- a/node_modules/readable-stream/writable.js
+++ b/node_modules/readable-stream/writable.js
@@ -1 +1,8 @@
-module.exports = require("./lib/_stream_writable.js")
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+}
+
+module.exports = Writable
diff --git a/node_modules/regenerator-runtime/package.json b/node_modules/regenerator-runtime/package.json
index 7fd3c8940..55f13af56 100644
--- a/node_modules/regenerator-runtime/package.json
+++ b/node_modules/regenerator-runtime/package.json
@@ -2,7 +2,7 @@
"name": "regenerator-runtime",
"author": "Ben Newman <bn@cs.stanford.edu>",
"description": "Runtime for Regenerator-compiled generator and async functions.",
- "version": "0.9.6",
+ "version": "0.10.3",
"main": "runtime-module.js",
"keywords": [
"regenerator",
diff --git a/node_modules/regenerator-runtime/runtime.js b/node_modules/regenerator-runtime/runtime.js
index 4ec72f1aa..212da1bc1 100644
--- a/node_modules/regenerator-runtime/runtime.js
+++ b/node_modules/regenerator-runtime/runtime.js
@@ -11,7 +11,8 @@
!(function(global) {
"use strict";
- var hasOwn = Object.prototype.hasOwnProperty;
+ var Op = Object.prototype;
+ var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
@@ -83,10 +84,29 @@
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ // This is a polyfill for %IteratorPrototype% for environments that
+ // don't natively support it.
+ var IteratorPrototype = {};
+ IteratorPrototype[iteratorSymbol] = function () {
+ return this;
+ };
+
+ var getProto = Object.getPrototypeOf;
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+ if (NativeIteratorPrototype &&
+ NativeIteratorPrototype !== Op &&
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+ // This environment has a native %IteratorPrototype%; use it instead
+ // of the polyfill.
+ IteratorPrototype = NativeIteratorPrototype;
+ }
+
+ var Gp = GeneratorFunctionPrototype.prototype =
+ Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
+ GeneratorFunctionPrototype[toStringTagSymbol] =
+ GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
@@ -123,17 +143,12 @@
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `value instanceof AwaitArgument` to determine if the yielded value is
- // meant to be awaited. Some may consider the name of this method too
- // cutesy, but they are curmudgeons.
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
+ // meant to be awaited.
runtime.awrap = function(arg) {
- return new AwaitArgument(arg);
+ return { __await: arg };
};
- function AwaitArgument(arg) {
- this.arg = arg;
- }
-
function AsyncIterator(generator) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
@@ -142,8 +157,10 @@
} else {
var result = record.arg;
var value = result.value;
- if (value instanceof AwaitArgument) {
- return Promise.resolve(value.arg).then(function(value) {
+ if (value &&
+ typeof value === "object" &&
+ hasOwn.call(value, "__await")) {
+ return Promise.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
@@ -212,6 +229,7 @@
}
defineIteratorMethods(AsyncIterator.prototype);
+ runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
@@ -246,90 +264,34 @@
return doneResult();
}
+ context.method = method;
+ context.arg = arg;
+
while (true) {
var delegate = context.delegate;
if (delegate) {
- if (method === "return" ||
- (method === "throw" && delegate.iterator[method] === undefined)) {
- // A return or throw (when the delegate iterator has no throw
- // method) always terminates the yield* loop.
- context.delegate = null;
-
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- var returnMethod = delegate.iterator["return"];
- if (returnMethod) {
- var record = tryCatch(returnMethod, delegate.iterator, arg);
- if (record.type === "throw") {
- // If the return method threw an exception, let that
- // exception prevail over the original return or throw.
- method = "throw";
- arg = record.arg;
- continue;
- }
- }
-
- if (method === "return") {
- // Continue with the outer return, now that the delegate
- // iterator has been terminated.
- continue;
- }
- }
-
- var record = tryCatch(
- delegate.iterator[method],
- delegate.iterator,
- arg
- );
-
- if (record.type === "throw") {
- context.delegate = null;
-
- // Like returning generator.throw(uncaught), but without the
- // overhead of an extra function call.
- method = "throw";
- arg = record.arg;
- continue;
+ var delegateResult = maybeInvokeDelegate(delegate, context);
+ if (delegateResult) {
+ if (delegateResult === ContinueSentinel) continue;
+ return delegateResult;
}
-
- // Delegate generator ran and handled its own exceptions so
- // regardless of what the method was, we continue as if it is
- // "next" with an undefined arg.
- method = "next";
- arg = undefined;
-
- var info = record.arg;
- if (info.done) {
- context[delegate.resultName] = info.value;
- context.next = delegate.nextLoc;
- } else {
- state = GenStateSuspendedYield;
- return info;
- }
-
- context.delegate = null;
}
- if (method === "next") {
+ if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
- context.sent = context._sent = arg;
+ context.sent = context._sent = context.arg;
- } else if (method === "throw") {
+ } else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
- throw arg;
+ throw context.arg;
}
- if (context.dispatchException(arg)) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- method = "next";
- arg = undefined;
- }
+ context.dispatchException(context.arg);
- } else if (method === "return") {
- context.abrupt("return", arg);
+ } else if (context.method === "return") {
+ context.abrupt("return", context.arg);
}
state = GenStateExecuting;
@@ -342,40 +304,112 @@
? GenStateCompleted
: GenStateSuspendedYield;
- var info = {
+ if (record.arg === ContinueSentinel) {
+ continue;
+ }
+
+ return {
value: record.arg,
done: context.done
};
- if (record.arg === ContinueSentinel) {
- if (context.delegate && method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- arg = undefined;
- }
- } else {
- return info;
- }
-
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
- // context.dispatchException(arg) call above.
- method = "throw";
- arg = record.arg;
+ // context.dispatchException(context.arg) call above.
+ context.method = "throw";
+ context.arg = record.arg;
}
}
};
}
+ // Call delegate.iterator[context.method](context.arg) and handle the
+ // result, either by returning a { value, done } result from the
+ // delegate iterator, or by modifying context.method and context.arg,
+ // setting context.delegate to null, and returning the ContinueSentinel.
+ function maybeInvokeDelegate(delegate, context) {
+ var method = delegate.iterator[context.method];
+ if (method === undefined) {
+ // A .throw or .return when the delegate iterator has no .throw
+ // method always terminates the yield* loop.
+ context.delegate = null;
+
+ if (context.method === "throw") {
+ if (delegate.iterator.return) {
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ context.method = "return";
+ context.arg = undefined;
+ maybeInvokeDelegate(delegate, context);
+
+ if (context.method === "throw") {
+ // If maybeInvokeDelegate(context) changed context.method from
+ // "return" to "throw", let that override the TypeError below.
+ return ContinueSentinel;
+ }
+ }
+
+ context.method = "throw";
+ context.arg = new TypeError(
+ "The iterator does not provide a 'throw' method");
+ }
+
+ return ContinueSentinel;
+ }
+
+ var record = tryCatch(method, delegate.iterator, context.arg);
+
+ if (record.type === "throw") {
+ context.method = "throw";
+ context.arg = record.arg;
+ context.delegate = null;
+ return ContinueSentinel;
+ }
+
+ var info = record.arg;
+
+ if (! info) {
+ context.method = "throw";
+ context.arg = new TypeError("iterator result is not an object");
+ context.delegate = null;
+ return ContinueSentinel;
+ }
+
+ if (info.done) {
+ // Assign the result of the finished delegate to the temporary
+ // variable specified by delegate.resultName (see delegateYield).
+ context[delegate.resultName] = info.value;
+
+ // Resume execution at the desired location (see delegateYield).
+ context.next = delegate.nextLoc;
+
+ // If context.method was "throw" but the delegate handled the
+ // exception, let the outer generator proceed normally. If
+ // context.method was "next", forget context.arg since it has been
+ // "consumed" by the delegate iterator. If context.method was
+ // "return", allow the original .return call to continue in the
+ // outer generator.
+ if (context.method !== "return") {
+ context.method = "next";
+ context.arg = undefined;
+ }
+
+ } else {
+ // Re-yield the result returned by the delegate method.
+ return info;
+ }
+
+ // The delegate iterator is finished, so forget it and continue with
+ // the outer generator.
+ context.delegate = null;
+ return ContinueSentinel;
+ }
+
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
- Gp[iteratorSymbol] = function() {
- return this;
- };
-
Gp[toStringTagSymbol] = "Generator";
Gp.toString = function() {
@@ -492,6 +526,9 @@
this.done = false;
this.delegate = null;
+ this.method = "next";
+ this.arg = undefined;
+
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
@@ -528,7 +565,15 @@
record.type = "throw";
record.arg = exception;
context.next = loc;
- return !!caught;
+
+ if (caught) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ context.method = "next";
+ context.arg = undefined;
+ }
+
+ return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
@@ -596,12 +641,12 @@
record.arg = arg;
if (finallyEntry) {
+ this.method = "next";
this.next = finallyEntry.finallyLoc;
- } else {
- this.complete(record);
+ return ContinueSentinel;
}
- return ContinueSentinel;
+ return this.complete(record);
},
complete: function(record, afterLoc) {
@@ -613,11 +658,14 @@
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
- this.rval = record.arg;
+ this.rval = this.arg = record.arg;
+ this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
+
+ return ContinueSentinel;
},
finish: function(finallyLoc) {
@@ -656,6 +704,12 @@
nextLoc: nextLoc
};
+ if (this.method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ this.arg = undefined;
+ }
+
return ContinueSentinel;
}
};
diff --git a/node_modules/replace-ext/LICENSE b/node_modules/replace-ext/LICENSE
index fd38d6935..7cbe012c6 100755
--- a/node_modules/replace-ext/LICENSE
+++ b/node_modules/replace-ext/LICENSE
@@ -1,21 +1,20 @@
-The MIT License (MIT)
+Copyright (c) 2014 Fractal <contact@wearefractal.com>
-Copyright (c) 2014 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/replace-ext/README.md b/node_modules/replace-ext/README.md
index 8775983b7..05b5d21fd 100644
--- a/node_modules/replace-ext/README.md
+++ b/node_modules/replace-ext/README.md
@@ -1,50 +1,44 @@
-<p align="center">
- <a href="http://gulpjs.com">
- <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
- </a>
-</p>
+# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-# replace-ext
-[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+## Information
-Replaces a file extension with another one.
+<table>
+<tr>
+<td>Package</td><td>replace-ext</td>
+</tr>
+<tr>
+<td>Description</td>
+<td>Replaces a file extension with another one</td>
+</tr>
+<tr>
+<td>Node Version</td>
+<td>>= 0.4</td>
+</tr>
+</table>
## Usage
-```js
+```javascript
var replaceExt = require('replace-ext');
var path = '/some/dir/file.js';
-var newPath = replaceExt(path, '.coffee');
+var npath = replaceExt(path, '.coffee');
-console.log(newPath); // /some/dir/file.coffee
+console.log(npath); // /some/dir/file.coffee
```
-## API
+[npm-url]: https://npmjs.org/package/replace-ext
+[npm-image]: https://badge.fury.io/js/replace-ext.png
-### `replaceExt(path, extension)`
+[travis-url]: https://travis-ci.org/wearefractal/replace-ext
+[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-Replaces the extension from `path` with `extension` and returns the updated path string.
+[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
+[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-Does not replace the extension if `path` is not a string or is empty.
+[depstat-url]: https://david-dm.org/wearefractal/replace-ext
+[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-## License
-
-MIT
-
-[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg
-[npm-url]: https://www.npmjs.com/package/replace-ext
-[npm-image]: http://img.shields.io/npm/v/replace-ext.svg
-
-[travis-url]: https://travis-ci.org/gulpjs/replace-ext
-[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci
-
-[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext
-[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor
-
-[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext
-[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg
-
-[gitter-url]: https://gitter.im/gulpjs/gulp
-[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
+[david-url]: https://david-dm.org/wearefractal/replace-ext
+[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/replace-ext/index.js b/node_modules/replace-ext/index.js
index 7cb7789e2..3f76938e4 100644
--- a/node_modules/replace-ext/index.js
+++ b/node_modules/replace-ext/index.js
@@ -1,18 +1,9 @@
-'use strict';
-
var path = require('path');
-function replaceExt(npath, ext) {
- if (typeof npath !== 'string') {
- return npath;
- }
-
- if (npath.length === 0) {
- return npath;
- }
+module.exports = function(npath, ext) {
+ if (typeof npath !== 'string') return npath;
+ if (npath.length === 0) return npath;
- var nFileName = path.basename(npath, path.extname(npath)) + ext;
+ var nFileName = path.basename(npath, path.extname(npath))+ext;
return path.join(path.dirname(npath), nFileName);
-}
-
-module.exports = replaceExt;
+}; \ No newline at end of file
diff --git a/node_modules/replace-ext/package.json b/node_modules/replace-ext/package.json
index 27dbe3104..307d99b78 100644
--- a/node_modules/replace-ext/package.json
+++ b/node_modules/replace-ext/package.json
@@ -1,44 +1,35 @@
{
- "name": "replace-ext",
- "version": "1.0.0",
- "description": "Replaces a file extension with another one",
- "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
- "contributors": [
- "Eric Schoffstall <yo@contra.io>",
- "Blaine Bublitz <blaine.bublitz@gmail.com>"
- ],
- "repository": "gulpjs/replace-ext",
- "license": "MIT",
- "engines": {
- "node": ">= 0.10"
+ "name":"replace-ext",
+ "description":"Replaces a file extension with another one",
+ "version":"0.0.1",
+ "homepage":"http://github.com/wearefractal/replace-ext",
+ "repository":"git://github.com/wearefractal/replace-ext.git",
+ "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
+ "main":"./index.js",
+
+ "dependencies":{
+
+ },
+ "devDependencies": {
+ "mocha": "~1.17.0",
+ "should": "~3.1.0",
+ "mocha-lcov-reporter": "~0.0.1",
+ "coveralls": "~2.6.1",
+ "istanbul": "~0.2.3",
+ "rimraf": "~2.2.5",
+ "jshint": "~2.4.1"
},
- "main": "index.js",
- "files": [
- "LICENSE",
- "index.js"
- ],
"scripts": {
- "lint": "eslint . && jscs index.js test/",
- "pretest": "npm run lint",
- "test": "mocha --async-only",
- "cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly",
- "coveralls": "npm run cover && istanbul-coveralls"
+ "test": "mocha --reporter spec && jshint",
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
},
- "dependencies": {},
- "devDependencies": {
- "eslint": "^1.10.3",
- "eslint-config-gulp": "^2.0.0",
- "expect": "^1.16.0",
- "istanbul": "^0.4.3",
- "istanbul-coveralls": "^1.0.3",
- "jscs": "^2.3.5",
- "jscs-preset-gulp": "^1.0.0",
- "mocha": "^2.4.5"
+ "engines": {
+ "node": ">= 0.4"
},
- "keywords": [
- "gulp",
- "extensions",
- "filepath",
- "basename"
+ "licenses":[
+ {
+ "type":"MIT",
+ "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
+ }
]
}
diff --git a/node_modules/rimraf/bin.js b/node_modules/rimraf/bin.js
index 1bd5a0d16..0d1e17be7 100755
--- a/node_modules/rimraf/bin.js
+++ b/node_modules/rimraf/bin.js
@@ -4,16 +4,21 @@ var rimraf = require('./')
var help = false
var dashdash = false
+var noglob = false
var args = process.argv.slice(2).filter(function(arg) {
if (dashdash)
return !!arg
else if (arg === '--')
dashdash = true
+ else if (arg === '--no-glob' || arg === '-G')
+ noglob = true
+ else if (arg === '--glob' || arg === '-g')
+ noglob = false
else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/))
help = true
else
return !!arg
-});
+})
if (help || args.length === 0) {
// If they didn't ask for help, then this is not a "success"
@@ -24,7 +29,9 @@ if (help || args.length === 0) {
log('')
log('Options:')
log('')
- log(' -h, --help Display this usage info')
+ log(' -h, --help Display this usage info')
+ log(' -G, --no-glob Do not expand glob patterns in arguments')
+ log(' -g, --glob Expand glob patterns in arguments (default)')
process.exit(help ? 0 : 1)
} else
go(0)
@@ -32,7 +39,10 @@ if (help || args.length === 0) {
function go (n) {
if (n >= args.length)
return
- rimraf(args[n], function (er) {
+ var options = {}
+ if (noglob)
+ options = { glob: false }
+ rimraf(args[n], options, function (er) {
if (er)
throw er
go(n+1)
diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json
index c2cc0458b..069a4371d 100644
--- a/node_modules/rimraf/package.json
+++ b/node_modules/rimraf/package.json
@@ -1,6 +1,6 @@
{
"name": "rimraf",
- "version": "2.5.4",
+ "version": "2.6.1",
"main": "rimraf.js",
"description": "A deep deletion module for node (like `rm -rf`)",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
@@ -21,6 +21,6 @@
],
"devDependencies": {
"mkdirp": "^0.5.1",
- "tap": "^6.1.1"
+ "tap": "^10.1.2"
}
}
diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js
index 5d9a5768a..c26331265 100644
--- a/node_modules/rimraf/rimraf.js
+++ b/node_modules/rimraf/rimraf.js
@@ -85,7 +85,7 @@ function rimraf (p, options, cb) {
results.forEach(function (p) {
rimraf_(p, options, function CB (er) {
if (er) {
- if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
+ if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
busyTries < options.maxBusyTries) {
busyTries ++
var time = busyTries * 100
@@ -310,6 +310,7 @@ function rimrafSync (p, options) {
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
if (er.code !== "EISDIR")
throw er
+
rmdirSync(p, options, er)
}
}
@@ -339,5 +340,24 @@ function rmkidsSync (p, options) {
options.readdirSync(p).forEach(function (f) {
rimrafSync(path.join(p, f), options)
})
- options.rmdirSync(p, options)
+
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ var retries = isWindows ? 100 : 1
+ var i = 0
+ do {
+ var threw = true
+ try {
+ var ret = options.rmdirSync(p, options)
+ threw = false
+ return ret
+ } finally {
+ if (++i < retries && threw)
+ continue
+ }
+ } while (true)
}
diff --git a/node_modules/sax/LICENSE-W3C.html b/node_modules/sax/LICENSE-W3C.html
deleted file mode 100644
index a611e3f90..000000000
--- a/node_modules/sax/LICENSE-W3C.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" /><title>W3C Software Notice and License</title><link rel="stylesheet" href="/2008/site/css/minimum" type="text/css" media="handheld, all" /><style type="text/css" media="print, screen and (min-width: 481px)" xml:space="preserve">
- @import url("/2008/site/css/advanced");
-</style><link href="/2008/site/css/minimum" rel="stylesheet" type="text/css" media="handheld, only screen and (max-device-width: 480px)" /><meta name="viewport" content="width=device-width" /><link rel="stylesheet" href="/2008/site/css/print" type="text/css" media="print" /><link rel="shortcut icon" href="/2008/site/images/favicon.ico" type="image/x-icon" /></head><body id="www-w3-org" class="w3c_public"><div id="w3c_container">
-
-
-
- <div id="w3c_mast">
- <h1 class="logo">
- <a tabindex="2" accesskey="1" href="/"><img src="/2008/site/images/logo-w3c-mobile-lg" width="90" height="53" alt="W3C" /></a>
- <span class="alt-logo">W3C</span>
- </h1>
-
- <div id="w3c_nav">
-
-
-
- <form action="/Help/search" method="get" enctype="application/x-www-form-urlencoded"><div class="w3c_sec_nav"><!-- --></div><ul class="main_nav"><li class="first-item">
- <a href="/standards/">Standards</a>
- </li><li>
- <a href="/participate/">Participate</a>
- </li><li>
- <a href="/Consortium/membership">Membership</a>
- </li><li class="last-item">
- <a href="/Consortium/">About W3C</a>
- </li><li class="search-item">
- <div id="search-form">
- <input tabindex="3" class="text" name="q" value="" title="Search" type="text" />
- <button id="search-submit" name="search-submit" type="submit"><img class="submit" src="/2008/site/images/search-button" alt="Search" width="21" height="17" /></button>
- </div>
- </li></ul></form>
- </div>
-
- </div>
-
-
- <div id="w3c_main">
- <div id="w3c_logo_shadow" class="w3c_leftCol">
- <img height="32" alt="" src="/2008/site/images/logo-shadow" />
- </div>
-
- <div class="w3c_leftCol"><h2 class="offscreen">Site Navigation</h2>
- <h3 class="category"><span class="ribbon"><a href="/Consortium/Legal/ipr-notice.html" title="Up to Policies and Legal Information">Policies and Legal Information <img src="/2008/site/images/header-link" alt="Header link" width="13" height="13" class="header-link" /></a></span></h3>
- <ul class="theme">
- <li><a href="/Consortium/Legal/2008/04-testsuite-copyright.html">Licenses for W3C Test Suites</a></li>
- <li><a href="/2004/10/27-testcases.html">Policies for Contribution of Test Cases to W3C</a></li>
- <li><a href="/Consortium/Legal/IPR-FAQ-20000620.html">Intellectual Rights FAQ</a></li>
- <li><a href="/Consortium/Legal/privacy-statement-20000612.html">W3C Privacy Statements</a></li>
- <li><a href="/Consortium/Legal/2002/copyright-documents-20021231.html">W3C Document License</a></li>
- <li><a href="/Consortium/Legal/2002/trademarks-20021231.html">W3C Trademarks and Generic Terms</a></li>
- <li><a href="/Consortium/Legal/2002/trademark-license-20021231.html">W3C&#xAE; Trademark and Service Mark License</a></li>
- <li><a class="current">W3C Software Notice and License</a></li>
- <li><a href="/Consortium/Legal/2002/collaborators-agreement-20021231.html">W3C Invited Expert and Collaborators Agreement</a></li>
- <li><a href="/Consortium/Persistence.html">W3C URI Persistence Policy</a></li>
- <li><a href="/1999/10/21-mirroring-policy.html">Mirroring the W3C Site</a></li>
- <li><a href="/Consortium/Legal/2006/08-copyright-translations.html">Translations of the Copyright Notice</a></li>
- </ul>
- <br /></div>
- <div class="w3c_mainCol">
- <div id="w3c_crumbs">
- <div id="w3c_crumbs_frame">
- <ul class="bct"> <!-- .bct / Breadcrumbs -->
- <li class="skip"><a tabindex="1" accesskey="2" title="Skip to content (e.g., when browsing via audio)" href="#w3c_content_body">Skip</a></li>
- <li><a href="/">W3C</a>&#xA0;<span class="cr">&#xBB;</span>&#xA0;</li>
- <li><a href="/Consortium/">About&#xA0;W3C</a>&#xA0;<span class="cr">&#xBB;</span>&#xA0;</li>
- <li><a href="/Consortium/facts.html">Facts&#xA0;About&#xA0;W3C</a>&#xA0;<span class="cr">&#xBB;</span>&#xA0;</li>
- <li><a href="/Consortium/Legal/ipr-notice.html">Policies&#xA0;and&#xA0;Legal&#xA0;Information</a>&#xA0;<span class="cr">&#xBB;</span>&#xA0;</li>
- <li class="current">W3C Software Notice and License</li>
- </ul>
- </div>
- </div>
- <h1 class="title">W3C Software Notice and License</h1>
- <div id="w3c_content_body">
- <div class="line">
- <p class="intro tPadding">This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license.</p>
-<h2>License</h2>
-
- <p class="tPadding">
-By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following
-terms and conditions.</p>
-
- <p>Permission to copy, modify, and distribute this software and its
-documentation, with or without modification,&#xA0;for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on
-ALL copies of the software and documentation or portions thereof, including
-modifications:</p>
-
- <ul class="show_items"><li>The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.</li><li>Any pre-existing intellectual property disclaimers, notices, or terms
- and conditions. If none exist, the <a href="copyright-software-short-notice-20021231.html">W3C Software Short
- Notice</a> should be included (hypertext is preferred, text is permitted)
- within the body of any redistributed or derivative code.</li><li>Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)</li></ul>
-
-<h2>Disclaimers</h2>
-
- <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
-
- <p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.</p>
-
- <p>The name and trademarks of copyright holders may NOT be used in
-advertising or publicity pertaining to the software without specific, written
-prior permission. Title to copyright in this software and any associated
-documentation will at all times remain with copyright holders.</p>
-
- <h2>Notes</h2>
-
- <p>This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</p>
-
- <p>This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this
-license can be used with materials other than those owned by the W3C,
-reflects that ERCIM is now a host of the W3C, includes references to this
-specific dated version of the license, and removes the ambiguous grant of
-"use". Otherwise, this version is the same as the <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
-version</a> and is written so as to preserve the <a href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
-Software Foundation's assessment of GPL compatibility</a> and <a href="http://www.opensource.org/licenses/W3C.php">OSI's certification</a>
-under the <a href="http://www.opensource.org/docs/definition.php">Open Source
-Definition</a>.</p>
- </div>
- </div>
- </div>
- </div>
-
-
-
- </div><div id="w3c_footer">
- <div id="w3c_footer-inner">
- <h2 class="offscreen">Footer Navigation</h2>
- <div class="w3c_footer-nav">
- <h3>Navigation</h3>
- <ul class="footer_top_nav"><li>
- <a href="/">Home</a>
- </li><li>
- <a href="/standards/">Standards</a>
- </li><li>
- <a href="/participate/">Participate</a>
- </li><li>
- <a href="/Consortium/membership">Membership</a>
- </li><li class="last-item">
- <a href="/Consortium/">About W3C</a>
- </li></ul>
- </div>
- <div class="w3c_footer-nav">
- <h3>Contact W3C</h3>
- <ul class="footer_bottom_nav"><li>
- <a href="/Consortium/contact">Contact</a>
- </li><li>
- <a accesskey="0" href="/Help/">Help and FAQ</a>
- </li><li>
- <a href="/Consortium/sponsor/">Sponsor / Donate</a>
- </li><li>
- <a href="/Consortium/siteindex">Site Map</a>
- </li><li>
- <address id="w3c_signature">
- <a href="http://lists.w3.org/Archives/Public/site-comments/">Feedback</a></address>
- </li></ul>
- </div>
- <div class="w3c_footer-nav">
- <h3>W3C Updates</h3>
- <ul class="footer_follow_nav"><li>
- <a href="http://twitter.com/W3C" title="Follow W3C on Twitter">
- <img src="/2008/site/images/twitter-bird" alt="Twitter" width="78" height="83" class="social-icon" />
- </a>
- <a href="http://identi.ca/w3c" title="See W3C on Identica">
- <img src="/2008/site/images/identica-logo" alt="Identica" width="91" height="83" class="social-icon" />
- </a>
- </li></ul>
- </div>
- <p class="copyright">Copyright &#xA9; 2012 W3C <sup>&#xAE;</sup> (<a href="http://www.csail.mit.edu/">
- <acronym title="Massachusetts Institute of Technology">MIT</acronym>
- </a>, <a href="http://www.ercim.org/">
- <acronym title="European Research Consortium for Informatics and Mathematics"> ERCIM</acronym>
- </a>, <a href="http://www.keio.ac.jp/">Keio</a>) <a href="/Consortium/Legal/ipr-notice">Usage policies apply</a>.</p>
- </div>
- </div><!-- Generated from data/scripts.php, ../../smarty/{scripts.tpl} --><!-- At the bottom for performance reasons --><div id="w3c_scripts">
- <script type="text/javascript" src="/2008/site/js/main" xml:space="preserve"><!-- --></script>
- </div></body></html>
diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js
index f125c5fee..db0d4c316 100644
--- a/node_modules/sax/lib/sax.js
+++ b/node_modules/sax/lib/sax.js
@@ -267,8 +267,6 @@
// this really needs to be replaced with character classes.
// XML allows all manner of ridiculous numbers and digits.
- var number = '0124356789'
- var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
// (Letter | "_" | ":")
var quote = '\'"'
@@ -281,8 +279,6 @@
// turn all the string character sets into character class objects.
whitespace = charClass(whitespace)
- number = charClass(number)
- letter = charClass(letter)
// http://www.w3.org/TR/REC-xml/#NT-NameStartChar
// This implementation works on strings, a single character at a time
@@ -292,10 +288,10 @@
// is left as an exercise for the reader.
var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
- var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/
+ var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
- var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/
+ var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
quote = charClass(quote)
attribEnd = charClass(attribEnd)
@@ -307,12 +303,16 @@
}, {})
}
- function isRegExp (c) {
- return Object.prototype.toString.call(c) === '[object RegExp]'
+ function isMatch (regex, c) {
+ return regex.test(c)
}
function is (charclass, c) {
- return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]
+ return charclass[c]
+ }
+
+ function notMatch (regex, c) {
+ return !isMatch(regex, c)
}
function not (charclass, c) {
@@ -998,9 +998,11 @@
while (true) {
c = charAt(chunk, i++)
parser.c = c
+
if (!c) {
break
}
+
if (parser.trackPosition) {
parser.position++
if (c === '\n') {
@@ -1010,6 +1012,7 @@
parser.column++
}
}
+
switch (parser.state) {
case S.BEGIN:
parser.state = S.BEGIN_WHITESPACE
@@ -1080,7 +1083,7 @@
parser.sgmlDecl = ''
} else if (is(whitespace, c)) {
// wait for it...
- } else if (is(nameStart, c)) {
+ } else if (isMatch(nameStart, c)) {
parser.state = S.OPEN_TAG
parser.tagName = c
} else if (c === '/') {
@@ -1283,7 +1286,7 @@
continue
case S.OPEN_TAG:
- if (is(nameBody, c)) {
+ if (isMatch(nameBody, c)) {
parser.tagName += c
} else {
newTag(parser)
@@ -1318,7 +1321,7 @@
openTag(parser)
} else if (c === '/') {
parser.state = S.OPEN_TAG_SLASH
- } else if (is(nameStart, c)) {
+ } else if (isMatch(nameStart, c)) {
parser.attribName = c
parser.attribValue = ''
parser.state = S.ATTRIB_NAME
@@ -1337,7 +1340,7 @@
openTag(parser)
} else if (is(whitespace, c)) {
parser.state = S.ATTRIB_NAME_SAW_WHITE
- } else if (is(nameBody, c)) {
+ } else if (isMatch(nameBody, c)) {
parser.attribName += c
} else {
strictFail(parser, 'Invalid attribute name')
@@ -1360,7 +1363,7 @@
parser.attribName = ''
if (c === '>') {
openTag(parser)
- } else if (is(nameStart, c)) {
+ } else if (isMatch(nameStart, c)) {
parser.attribName = c
parser.state = S.ATTRIB_NAME
} else {
@@ -1404,7 +1407,7 @@
openTag(parser)
} else if (c === '/') {
parser.state = S.OPEN_TAG_SLASH
- } else if (is(nameStart, c)) {
+ } else if (isMatch(nameStart, c)) {
strictFail(parser, 'No whitespace between attributes')
parser.attribName = c
parser.attribValue = ''
@@ -1435,7 +1438,7 @@
if (!parser.tagName) {
if (is(whitespace, c)) {
continue
- } else if (not(nameStart, c)) {
+ } else if (notMatch(nameStart, c)) {
if (parser.script) {
parser.script += '</' + c
parser.state = S.SCRIPT
@@ -1447,7 +1450,7 @@
}
} else if (c === '>') {
closeTag(parser)
- } else if (is(nameBody, c)) {
+ } else if (isMatch(nameBody, c)) {
parser.tagName += c
} else if (parser.script) {
parser.script += '</' + parser.tagName
@@ -1498,7 +1501,7 @@
parser[buffer] += parseEntity(parser)
parser.entity = ''
parser.state = returnState
- } else if (is(parser.entity.length ? entityBody : entityStart, c)) {
+ } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
parser.entity += c
} else {
strictFail(parser, 'Invalid character in entity name')
@@ -1521,6 +1524,7 @@
}
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
+ /* istanbul ignore next */
if (!String.fromCodePoint) {
(function () {
var stringFromCharCode = String.fromCharCode
@@ -1562,6 +1566,7 @@
}
return result
}
+ /* istanbul ignore next */
if (Object.defineProperty) {
Object.defineProperty(String, 'fromCodePoint', {
value: fromCodePoint,
diff --git a/node_modules/sax/package.json b/node_modules/sax/package.json
index 2c8208938..f620ff845 100644
--- a/node_modules/sax/package.json
+++ b/node_modules/sax/package.json
@@ -2,22 +2,21 @@
"name": "sax",
"description": "An evented streaming XML parser in JavaScript",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "version": "1.2.1",
+ "version": "1.2.2",
"main": "lib/sax.js",
"license": "ISC",
"scripts": {
- "test": "tap test/*.js --cov",
+ "test": "tap test/*.js --cov -j4",
"posttest": "standard -F test/*.js lib/*.js"
},
"repository": "git://github.com/isaacs/sax-js.git",
"files": [
"lib/sax.js",
"LICENSE",
- "LICENSE-W3C.html",
"README.md"
],
"devDependencies": {
- "standard": "^5.3.1",
- "tap": "^5.2.0"
+ "standard": "^8.6.0",
+ "tap": "^10.0.2"
}
}
diff --git a/node_modules/selenium-webdriver/CHANGES.md b/node_modules/selenium-webdriver/CHANGES.md
index b9ac5fd22..1cdc96814 100644
--- a/node_modules/selenium-webdriver/CHANGES.md
+++ b/node_modules/selenium-webdriver/CHANGES.md
@@ -1,3 +1,42 @@
+## v3.3.0
+
+* Added warning log messages when the user creates new managed promises, or
+ schedules unchained tasks. Users may opt in to printing these log messages
+ with
+
+ ```js
+ const {logging} = require('selenium-webdriver');
+ logging.installConsoleHandler();
+ logging.getLogger('promise.ControlFlow').setLevel(logging.Level.WARNING);
+ ```
+* If the `JAVA_HOME` environment variable is set, use it to locate java.exe.
+
+
+## v3.2.0
+
+* Release skipped to stay in sync with the main Selenium project.
+
+
+## v3.1.0
+
+* The `lib` package is once again platform agnostic (excluding `lib/devmode`).
+* Deprecated `promise.when(value, callback, errback)`.
+ Use `promise.fulfilled(value).then(callback, errback)`
+* Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and
+ `promise.defer()` to all use native promises when the promise manager is
+ disabled.
+* Properly handle W3C error responses to new session commands.
+* Updated `selenium-webdriver/testing` to export `describe.only` along with
+ `describe.skip`.
+* Fixed `selenium-webdriver/lib/until.ableToSwitchToFrame`. It was previously
+ dropping arguments and would never work.
+* Added the ability to use Firefox Nightly
+* If Firefox cannot be found in the default location, look for it on the PATH
+* Allow SafariDriver to use Safari Technology Preview.
+* Use the proper wire command for WebElement.getLocation() and
+ WebElement.getSize() for W3C compliant drivers.
+
+
## v3.0.1
* More API adjustments to align with native Promises
diff --git a/node_modules/selenium-webdriver/README.md b/node_modules/selenium-webdriver/README.md
index bc281d504..31708b186 100644
--- a/node_modules/selenium-webdriver/README.md
+++ b/node_modules/selenium-webdriver/README.md
@@ -136,16 +136,16 @@ will also have "best effort" support. Releases older than the latest LTS,
_semver-major_ releases, and all unstable release branches (e.g. "v.Next")
are considered strictly unsupported.
-For example, suppose the current LTS and stable releases are v4.2.4 and v5.4.1,
+For example, suppose the current LTS and stable releases are v6.9.5 and v7.5.0,
respectively. Then a Selenium release would have the following support levels:
| Version | Support |
| ------- | ------------- |
-| <= 4.1 | _unsupported_ |
-| 4.2 | supported |
-| 5.0-3 | best effort |
-| 5.4 | supported |
-| >= 5.5 | best effort |
+| <= 6.8 | _unsupported_ |
+| 6.9 | supported |
+| 7.0-4 | best effort |
+| 7.5 | supported |
+| >= 7.5 | best effort |
| v.Next | _unsupported_ |
### Support Level Definitions
@@ -168,11 +168,11 @@ months, the support window for selenium-webdriver will be roughly:
| Date | LTS | Stable |
| --------- | ---: | -----: |
-| (current) | 4.2 | 5.0 |
-| 2016-04 | 4.2 | 6.0 |
-| 2016-10 | 6.0 | 7.0 |
+| (current) | 6.9 | 7.5 |
| 2017-04 | 6.0 | 8.0 |
| 2017-10 | 8.0 | 9.0 |
+| 2018-04 | 8.0 | 10.0 |
+| 2018-10 | 10.0 | 11.0 |
## Issues
diff --git a/node_modules/selenium-webdriver/chrome.js b/node_modules/selenium-webdriver/chrome.js
index eb33df9ed..2dbc93351 100644
--- a/node_modules/selenium-webdriver/chrome.js
+++ b/node_modules/selenium-webdriver/chrome.js
@@ -59,7 +59,7 @@
* let options = new chrome.Options();
* // configure browser options ...
*
- * let driver = new chrome.Driver(options, service);
+ * let driver = chrome.Driver.createSession(options, service);
*
* Users should only instantiate the {@link Driver} class directly when they
* need a custom driver service configuration (as shown above). For normal
@@ -595,7 +595,7 @@ class Options {
* let options = new chrome.Options().setMobileEmulation(
* {deviceName: 'Google Nexus 5'});
*
- * let driver = new chrome.Driver(options);
+ * let driver = chrome.Driver.createSession(options);
*
* __Example 2: Using Custom Screen Configuration__
*
@@ -605,7 +605,7 @@ class Options {
* pixelRatio: 3.0
* });
*
- * let driver = new chrome.Driver(options);
+ * let driver = chrome.Driver.createSession(options);
*
*
* [em]: https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation
diff --git a/node_modules/selenium-webdriver/edge.js b/node_modules/selenium-webdriver/edge.js
index ee9d43383..9280cabd9 100644
--- a/node_modules/selenium-webdriver/edge.js
+++ b/node_modules/selenium-webdriver/edge.js
@@ -58,7 +58,7 @@
* var options = new edge.Options();
* // configure browser options ...
*
- * var driver = new edge.Driver(options, service);
+ * var driver = edge.Driver.createSession(options, service);
*
* Users should only instantiate the {@link Driver} class directly when they
* need a custom driver service configuration (as shown above). For normal
diff --git a/node_modules/selenium-webdriver/firefox/binary.js b/node_modules/selenium-webdriver/firefox/binary.js
index b997b480d..a1360bab7 100644
--- a/node_modules/selenium-webdriver/firefox/binary.js
+++ b/node_modules/selenium-webdriver/firefox/binary.js
@@ -47,27 +47,17 @@ const NO_FOCUS_LIB_AMD64 = isDevMode ?
const X_IGNORE_NO_FOCUS_LIB = 'x_ignore_nofocus.so';
-let foundBinary = null;
-let foundDevBinary = null;
-
-
/**
- * Checks the default Windows Firefox locations in Program Files.
- *
- * @param {boolean=} opt_dev Whether to find the Developer Edition.
+ * @param {string} file Path to the file to find, relative to the program files
+ * root.
* @return {!Promise<?string>} A promise for the located executable.
* The promise will resolve to {@code null} if Firefox was not found.
*/
-function defaultWindowsLocation(opt_dev) {
- var files = [
+function findInProgramFiles(file) {
+ let files = [
process.env['PROGRAMFILES'] || 'C:\\Program Files',
process.env['PROGRAMFILES(X86)'] || 'C:\\Program Files (x86)'
- ].map(function(prefix) {
- if (opt_dev) {
- return path.join(prefix, 'Firefox Developer Edition\\firefox.exe');
- }
- return path.join(prefix, 'Mozilla Firefox\\firefox.exe');
- });
+ ].map(prefix => path.join(prefix, file));
return io.exists(files[0]).then(function(exists) {
return exists ? files[0] : io.exists(files[1]).then(function(exists) {
return exists ? files[1] : null;
@@ -77,49 +67,104 @@ function defaultWindowsLocation(opt_dev) {
/**
- * Locates the Firefox binary for the current system.
+ * Provides methods for locating the executable for a Firefox release channel
+ * on Windows and MacOS. For other systems (i.e. Linux), Firefox will always
+ * be located on the system PATH.
*
- * @param {boolean=} opt_dev Whether to find the Developer Edition. This only
- * used on Windows and OSX.
- * @return {!Promise<string>} A promise for the located binary. The promise will
- * be rejected if Firefox cannot be located.
+ * @final
*/
-function findFirefox(opt_dev) {
- if (opt_dev && foundDevBinary) {
- return foundDevBinary;
+class Channel {
+ /**
+ * @param {string} darwin The path to check when running on MacOS.
+ * @param {string} win32 The path to check when running on Windows.
+ */
+ constructor(darwin, win32) {
+ /** @private @const */ this.darwin_ = darwin;
+ /** @private @const */ this.win32_ = win32;
+ /** @private {Promise<string>} */
+ this.found_ = null;
}
- if (!opt_dev && foundBinary) {
- return foundBinary;
+ /**
+ * Attempts to locate the Firefox executable for this release channel. This
+ * will first check the default installation location for the channel before
+ * checking the user's PATH. The returned promise will be rejected if Firefox
+ * can not be found.
+ *
+ * @return {!Promise<string>} A promise for the location of the located
+ * Firefox executable.
+ */
+ locate() {
+ if (this.found_) {
+ return this.found_;
+ }
+
+ let found;
+ switch (process.platform) {
+ case 'darwin':
+ found = io.exists(this.darwin_)
+ .then(exists => exists ? this.darwin_ : io.findInPath('firefox'));
+ break;
+
+ case 'win32':
+ found = findInProgramFiles(this.win32_)
+ .then(found => found || io.findInPath('firefox.exe'));
+ break;
+
+ default:
+ found = Promise.resolve(io.findInPath('firefox'));
+ break;
+ }
+
+ this.found_ = found.then(found => {
+ if (found) {
+ // TODO: verify version info.
+ return found;
+ }
+ throw Error('Could not locate Firefox on the current system');
+ });
+ return this.found_;
}
+}
- let found;
- if (process.platform === 'darwin') {
- let exe = opt_dev
- ? '/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin'
- : '/Applications/Firefox.app/Contents/MacOS/firefox-bin';
- found = io.exists(exe).then(exists => exists ? exe : null);
- } else if (process.platform === 'win32') {
- found = defaultWindowsLocation(opt_dev);
+/**
+ * Firefox's developer channel.
+ * @const
+ * @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#aurora>
+ */
+Channel.AURORA = new Channel(
+ '/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin',
+ 'Firefox Developer Edition\\firefox.exe');
- } else {
- found = Promise.resolve(io.findInPath('firefox'));
- }
+/**
+ * Firefox's beta channel. Note this is provided mainly for convenience as
+ * the beta channel has the same installation location as the main release
+ * channel.
+ * @const
+ * @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#beta>
+ */
+Channel.BETA = new Channel(
+ '/Applications/Firefox.app/Contents/MacOS/firefox-bin',
+ 'Mozilla Firefox\\firefox.exe');
- found = found.then(found => {
- if (found) {
- return found;
- }
- throw Error('Could not locate Firefox on the current system');
- });
+/**
+ * Firefox's release channel.
+ * @const
+ * @see <https://www.mozilla.org/en-US/firefox/desktop/>
+ */
+Channel.RELEASE = new Channel(
+ '/Applications/Firefox.app/Contents/MacOS/firefox-bin',
+ 'Mozilla Firefox\\firefox.exe');
- if (opt_dev) {
- return foundDevBinary = found;
- } else {
- return foundBinary = found;
- }
-}
+/**
+ * Firefox's nightly release channel.
+ * @const
+ * @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly>
+ */
+Channel.NIGHTLY = new Channel(
+ '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin',
+ 'Nightly\\firefox.exe');
/**
@@ -151,20 +196,23 @@ function installNoFocusLibs(profileDir) {
* use with WebDriver.
*
* If created _without_ a path for the Firefox binary to use, this class will
- * attempt to find Firefox when {@link #launch()} is called. For OSX and
+ * attempt to find Firefox when {@link #launch()} is called. For MacOS and
* Windows, this class will look for Firefox in the current platform's default
- * installation location (e.g. /Applications/Firefox.app on OSX). For all other
- * platforms, the Firefox executable must be available on your system `PATH`.
+ * installation location (e.g. /Applications/Firefox.app on MacOS). For all
+ * other platforms, the Firefox executable must be available on your system
+ * `PATH`.
*
* @final
*/
class Binary {
/**
- * @param {string=} opt_exe Path to the Firefox binary to use.
+ * @param {?(string|Channel)=} opt_exeOrChannel Either the path to a specific
+ * Firefox binary to use, or a {@link Channel} instance that describes
+ * how to locate the desired Firefox version.
*/
- constructor(opt_exe) {
- /** @private {(string|undefined)} */
- this.exe_ = opt_exe;
+ constructor(opt_exeOrChannel) {
+ /** @private {?(string|Channel)} */
+ this.exe_ = opt_exeOrChannel || null;
/** @private {!Array.<string>} */
this.args_ = [];
@@ -187,7 +235,7 @@ class Binary {
* on the current system.
*/
getExe() {
- return this.exe_;
+ return typeof this.exe_ === 'string' ? this.exe_ : undefined;
}
/**
@@ -223,6 +271,8 @@ class Binary {
*
* @param {boolean=} opt_use Whether to use the developer edition. Defaults to
* true.
+ * @deprecated Use the {@link Channel} class to indicate the desired Firefox
+ * version when creating a new binary: `new Binary(Channel.AURORA)`.
*/
useDevEdition(opt_use) {
this.devEdition_ = opt_use === undefined || !!opt_use;
@@ -238,7 +288,13 @@ class Binary {
* used by this instance.
*/
locate() {
- return Promise.resolve(this.exe_ || findFirefox(this.devEdition_));
+ if (typeof this.exe_ === 'string') {
+ return Promise.resolve(this.exe_);
+ } else if (this.exe_ instanceof Channel) {
+ return this.exe_.locate();
+ }
+ let channel = this.devEdition_ ? Channel.AURORA : Channel.RELEASE;
+ return channel.locate();
}
/**
@@ -284,4 +340,5 @@ class Binary {
exports.Binary = Binary;
+exports.Channel = Channel;
diff --git a/node_modules/selenium-webdriver/firefox/extension.js b/node_modules/selenium-webdriver/firefox/extension.js
index 60abb06b8..3bda759a7 100644
--- a/node_modules/selenium-webdriver/firefox/extension.js
+++ b/node_modules/selenium-webdriver/firefox/extension.js
@@ -161,7 +161,7 @@ function readManifest(addonPath) {
manifest = io.stat(addonPath).then(function(stats) {
if (!stats.isDirectory()) {
throw Error(
- 'Add-on path is niether a xpi nor a directory: ' + addonPath);
+ 'Add-on path is neither a xpi nor a directory: ' + addonPath);
}
return io.read(path.join(addonPath, 'install.rdf'));
});
diff --git a/node_modules/selenium-webdriver/firefox/index.js b/node_modules/selenium-webdriver/firefox/index.js
index 4ea1702a9..d5c88274a 100644
--- a/node_modules/selenium-webdriver/firefox/index.js
+++ b/node_modules/selenium-webdriver/firefox/index.js
@@ -26,28 +26,31 @@
*
* __Customizing the Firefox Profile__
*
- * The {@link Profile} class may be used to configure the browser profile used
- * with WebDriver, with functions to install additional
+ * The {@linkplain Profile} class may be used to configure the browser profile
+ * used with WebDriver, with functions to install additional
* {@linkplain Profile#addExtension extensions}, configure browser
* {@linkplain Profile#setPreference preferences}, and more. For example, you
* may wish to include Firebug:
*
- * var firefox = require('selenium-webdriver/firefox');
+ * const {Builder} = require('selenium-webdriver');
+ * const firefox = require('selenium-webdriver/firefox');
*
- * var profile = new firefox.Profile();
+ * let profile = new firefox.Profile();
* profile.addExtension('/path/to/firebug.xpi');
* profile.setPreference('extensions.firebug.showChromeErrors', true);
*
- * var options = new firefox.Options().setProfile(profile);
- * var driver = new firefox.Driver(options);
+ * let options = new firefox.Options().setProfile(profile);
+ * let driver = new Builder()
+ * .forBrowser('firefox')
+ * .setFirefoxOptions(options)
+ * .build();
*
- * The {@link Profile} class may also be used to configure WebDriver based on a
- * pre-existing browser profile:
+ * The {@linkplain Profile} class may also be used to configure WebDriver based
+ * on a pre-existing browser profile:
*
- * var profile = new firefox.Profile(
+ * let profile = new firefox.Profile(
* '/usr/local/home/bob/.mozilla/firefox/3fgog75h.testing');
- * var options = new firefox.Options().setProfile(profile);
- * var driver = new firefox.Driver(options);
+ * let options = new firefox.Options().setProfile(profile);
*
* The FirefoxDriver will _never_ modify a pre-existing profile; instead it will
* create a copy for it to modify. By extension, there are certain browser
@@ -56,21 +59,35 @@
*
* __Using a Custom Firefox Binary__
*
- * On Windows and OSX, the FirefoxDriver will search for Firefox in its
+ * On Windows and MacOS, the FirefoxDriver will search for Firefox in its
* default installation location:
*
- * * Windows: C:\Program Files and C:\Program Files (x86).
- * * Mac OS X: /Applications/Firefox.app
+ * - Windows: C:\Program Files and C:\Program Files (x86).
+ * - MacOS: /Applications/Firefox.app
+ *
+ * For Linux, Firefox will always be located on the PATH: `$(where firefox)`.
*
- * For Linux, Firefox will be located on the PATH: `$(where firefox)`.
+ * Several methods are provided for starting Firefox with a custom executable.
+ * First, on Windows and MacOS, you may configure WebDriver to check the default
+ * install location for a non-release channel. If the requested channel cannot
+ * be found in its default location, WebDriver will fallback to searching your
+ * PATH. _Note:_ on Linux, Firefox is _always_ located on your path, regardless
+ * of the requested channel.
+ *
+ * const {Builder} = require('selenium-webdriver');
+ * const firefox = require('selenium-webdriver/firefox');
+ *
+ * let options = new firefox.Options().setBinary(firefox.Channel.NIGHTLY);
+ * let driver = new Builder()
+ * .forBrowser('firefox')
+ * .setFirefoxOptions(options)
+ * .build();
*
- * You can configure WebDriver to start use a custom Firefox installation with
- * the {@link Binary} class:
+ * On all platforms, you may configrue WebDriver to use a Firefox specific
+ * executable:
*
- * var firefox = require('selenium-webdriver/firefox');
- * var binary = new firefox.Binary('/my/firefox/install/dir/firefox-bin');
- * var options = new firefox.Options().setBinary(binary);
- * var driver = new firefox.Driver(options);
+ * let options = new firefox.Options()
+ * .setBinary('/my/firefox/install/dir/firefox-bin');
*
* __Remote Testing__
*
@@ -84,11 +101,14 @@
* binaries are never copied to remote machines and must be referenced by
* installation path.
*
- * var options = new firefox.Options()
+ * const {Builder} = require('selenium-webdriver');
+ * const firefox = require('selenium-webdriver/firefox');
+ *
+ * let options = new firefox.Options()
* .setProfile('/profile/path/on/remote/host')
* .setBinary('/install/dir/on/remote/host/firefox-bin');
*
- * var driver = new (require('selenium-webdriver')).Builder()
+ * let driver = new Builder()
* .forBrowser('firefox')
* .usingServer('http://127.0.0.1:4444/wd/hub')
* .setFirefoxOptions(options)
@@ -99,8 +119,7 @@
* To test versions of Firefox prior to Firefox 47, you must disable the use of
* the geckodriver using the {@link Options} class.
*
- * var options = new firefox.Options().useGeckoDriver(false);
- * var driver = new firefox.Driver(options);
+ * let options = new firefox.Options().useGeckoDriver(false);
*
* Alternatively, you may disable the geckodriver at runtime by setting the
* environment variable `SELENIUM_MARIONETTE=false`.
@@ -113,7 +132,7 @@
const url = require('url');
-const Binary = require('./binary').Binary,
+const {Binary, Channel} = require('./binary'),
Profile = require('./profile').Profile,
decodeProfile = require('./profile').decode,
http = require('../http'),
@@ -196,16 +215,24 @@ class Options {
}
/**
- * Sets the binary to use. The binary may be specified as the path to a Firefox
- * executable, or as a {@link Binary} object.
+ * Sets the binary to use. The binary may be specified as the path to a
+ * Firefox executable, a specific {@link Channel}, or as a {@link Binary}
+ * object.
*
- * @param {(string|!Binary)} binary The binary to use.
+ * @param {(string|!Binary|!Channel)} binary The binary to use.
* @return {!Options} A self reference.
+ * @throws {TypeError} If `binary` is an invalid type.
*/
setBinary(binary) {
- if (typeof binary === 'string') {
+ if (typeof binary === 'string' || binary instanceof Channel) {
binary = new Binary(binary);
}
+
+ if (!(binary instanceof Binary)) {
+ throw TypeError(
+ 'binary must be a string path, Channel, or Binary object');
+ }
+
this.binary_ = binary;
return this;
}
@@ -687,6 +714,7 @@ class Driver extends webdriver.WebDriver {
exports.Binary = Binary;
+exports.Channel = Channel;
exports.Context = Context;
exports.Driver = Driver;
exports.Options = Options;
diff --git a/node_modules/selenium-webdriver/index.js b/node_modules/selenium-webdriver/index.js
index 3cde7f396..a1e208b46 100644
--- a/node_modules/selenium-webdriver/index.js
+++ b/node_modules/selenium-webdriver/index.js
@@ -58,7 +58,7 @@ var seleniumServer;
* Starts an instance of the Selenium server if not yet running.
* @param {string} jar Path to the server jar to use.
* @return {!Promise<string>} A promise for the server's
- * addrss once started.
+ * address once started.
*/
function startSeleniumServer(jar) {
if (!seleniumServer) {
@@ -160,7 +160,7 @@ function createDriver(ctor, ...args) {
/** @override */
this.catch = pd.then.bind(pd);
}
- }
+ };
promise.CancellableThenable.addImplementation(thenableWebDriverProxy);
THENABLE_DRIVERS.set(ctor, thenableWebDriverProxy);
}
diff --git a/node_modules/selenium-webdriver/lib/README b/node_modules/selenium-webdriver/lib/README
index 583293864..c39abbece 100644
--- a/node_modules/selenium-webdriver/lib/README
+++ b/node_modules/selenium-webdriver/lib/README
@@ -1,6 +1,5 @@
This directory contains modules internal to selenium-webdriver that are not
intended for general consumption. They may change at any time.
-With the exception of the test/ directory, all files under this directory
-may only depend on built-in JavaScript features and other modules in the
-directory.
+All files in this directory and the atoms/ subdirectory may only depend on
+built-in JavaScript features and other modules in this directory.
diff --git a/node_modules/selenium-webdriver/lib/actions.js b/node_modules/selenium-webdriver/lib/actions.js
index 1b059bbbf..0e34f3783 100644
--- a/node_modules/selenium-webdriver/lib/actions.js
+++ b/node_modules/selenium-webdriver/lib/actions.js
@@ -128,7 +128,7 @@ class ActionSequence {
}
/**
- * Moves the mouse. The location to move to may be specified in terms of the
+ * Moves the mouse. The location to move to may be specified in terms of the
* mouse's current location, an offset relative to the top-left corner of an
* element, or an element (in which case the middle of the element is used).
*
@@ -333,7 +333,7 @@ class ActionSequence {
/**
* Performs a modifier key press. The modifier key is <em>not released</em>
* until {@link #keyUp} or {@link #sendKeys} is called. The key press will be
- * targetted at the currently focused element.
+ * targeted at the currently focused element.
*
* @param {!input.Key} key The modifier key to push. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
@@ -347,7 +347,7 @@ class ActionSequence {
}
/**
- * Performs a modifier key release. The release is targetted at the currently
+ * Performs a modifier key release. The release is targeted at the currently
* focused element.
* @param {!input.Key} key The modifier key to release. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
@@ -363,7 +363,7 @@ class ActionSequence {
/**
* Simulates typing multiple keys. Each modifier key encountered in the
* sequence will not be released until it is encountered again. All key events
- * will be targetted at the currently focused element.
+ * will be targeted at the currently focused element.
*
* @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
* The keys to type.
diff --git a/node_modules/selenium-webdriver/lib/by.js b/node_modules/selenium-webdriver/lib/by.js
index ac448e683..8c718be64 100644
--- a/node_modules/selenium-webdriver/lib/by.js
+++ b/node_modules/selenium-webdriver/lib/by.js
@@ -153,7 +153,7 @@ class By {
}
/**
- * Locates eleemnts by the ID attribute. This locator uses the CSS selector
+ * Locates elements by the ID attribute. This locator uses the CSS selector
* `*[id="$ID"]`, _not_ `document.getElementById`.
*
* @param {string} id The ID to search for.
diff --git a/node_modules/selenium-webdriver/lib/capabilities.js b/node_modules/selenium-webdriver/lib/capabilities.js
index 61396d54d..65b290f5f 100644
--- a/node_modules/selenium-webdriver/lib/capabilities.js
+++ b/node_modules/selenium-webdriver/lib/capabilities.js
@@ -103,7 +103,7 @@ const Capability = {
*/
PROXY: 'proxy',
- /** Whether the driver supports changing the brower's orientation. */
+ /** Whether the driver supports changing the browser's orientation. */
ROTATABLE: 'rotatable',
/**
@@ -130,7 +130,7 @@ const Capability = {
/**
* Defines how the driver should handle unexpected alerts. The value should
- * be one of "accept", "dismiss", or "ignore.
+ * be one of "accept", "dismiss", or "ignore".
*/
UNEXPECTED_ALERT_BEHAVIOR: 'unexpectedAlertBehavior',
@@ -367,7 +367,7 @@ class Capabilities extends Map {
/**
* Sets the logging preferences. Preferences may be specified as a
- * {@link ./logging.Preferences} instance, or a as a map of log-type to
+ * {@link ./logging.Preferences} instance, or as a map of log-type to
* log-level.
* @param {!(./logging.Preferences|Object<string>)} prefs The logging
* preferences.
@@ -408,7 +408,7 @@ class Capabilities extends Map {
/**
* Sets the default action to take with an unexpected alert before returning
* an error.
- * @param {string} behavior The desired behavior; should be "accept",
+ * @param {string} behavior The desired behavior should be "accept",
* "dismiss", or "ignore". Defaults to "dismiss".
* @return {!Capabilities} A self reference.
*/
diff --git a/node_modules/selenium-webdriver/lib/error.js b/node_modules/selenium-webdriver/lib/error.js
index 555e5cbc5..82f81b07c 100644
--- a/node_modules/selenium-webdriver/lib/error.js
+++ b/node_modules/selenium-webdriver/lib/error.js
@@ -311,7 +311,7 @@ class UnknownMethodError extends WebDriverError {
/**
- * Reports an unsupport operation.
+ * Reports an unsupported operation.
*/
class UnsupportedOperationError extends WebDriverError {
/** @param {string=} opt_error the error message, if any. */
@@ -462,17 +462,29 @@ function checkResponse(data) {
return data;
}
+/**
+ * Tests if the given value is a valid error response object according to the
+ * W3C WebDriver spec.
+ *
+ * @param {?} data The value to test.
+ * @return {boolean} Whether the given value data object is a valid error
+ * response.
+ * @see https://w3c.github.io/webdriver/webdriver-spec.html#protocol
+ */
+function isErrorResponse(data) {
+ return data && typeof data === 'object' && typeof data.error === 'string';
+}
/**
* Throws an error coded from the W3C protocol. A generic error will be thrown
- * if the privded `data` is not a valid encoded error.
+ * if the provided `data` is not a valid encoded error.
*
* @param {{error: string, message: string}} data The error data to decode.
* @throws {WebDriverError} the decoded error.
* @see https://w3c.github.io/webdriver/webdriver-spec.html#protocol
*/
function throwDecodedError(data) {
- if (data && typeof data === 'object' && typeof data.error === 'string') {
+ if (isErrorResponse(data)) {
let ctor = ERROR_CODE_TO_TYPE.get(data.error) || WebDriverError;
throw new ctor(data.message);
}
@@ -551,5 +563,6 @@ module.exports = {
checkResponse: checkResponse,
checkLegacyResponse: checkLegacyResponse,
encodeError: encodeError,
+ isErrorResponse: isErrorResponse,
throwDecodedError: throwDecodedError,
};
diff --git a/node_modules/selenium-webdriver/lib/events.js b/node_modules/selenium-webdriver/lib/events.js
index 65e63de8c..82b34803e 100644
--- a/node_modules/selenium-webdriver/lib/events.js
+++ b/node_modules/selenium-webdriver/lib/events.js
@@ -22,7 +22,7 @@
*/
class Listener {
/**
- * @param {!Function} fn The acutal listener function.
+ * @param {!Function} fn The actual listener function.
* @param {(Object|undefined)} scope The object in whose scope to invoke the
* listener.
* @param {boolean} oneshot Whether this listener should only be used once.
diff --git a/node_modules/selenium-webdriver/lib/firefox/amd64/libnoblur64.so b/node_modules/selenium-webdriver/lib/firefox/amd64/libnoblur64.so
deleted file mode 100644
index 248c32db5..000000000
--- a/node_modules/selenium-webdriver/lib/firefox/amd64/libnoblur64.so
+++ /dev/null
Binary files differ
diff --git a/node_modules/selenium-webdriver/lib/firefox/i386/libnoblur.so b/node_modules/selenium-webdriver/lib/firefox/i386/libnoblur.so
deleted file mode 100644
index 004062c7b..000000000
--- a/node_modules/selenium-webdriver/lib/firefox/i386/libnoblur.so
+++ /dev/null
Binary files differ
diff --git a/node_modules/selenium-webdriver/lib/firefox/webdriver.json b/node_modules/selenium-webdriver/lib/firefox/webdriver.json
index 38601a28c..0dbe56bbd 100644
--- a/node_modules/selenium-webdriver/lib/firefox/webdriver.json
+++ b/node_modules/selenium-webdriver/lib/firefox/webdriver.json
@@ -37,7 +37,6 @@
"network.http.phishy-userpass-length": 255,
"offline-apps.allow_by_default": true,
"prompts.tab_modal.enabled": false,
- "security.csp.enable": false,
"security.fileuri.origin_policy": 3,
"security.fileuri.strict_origin_policy": false,
"signon.rememberSignons": false,
@@ -61,6 +60,8 @@
"dom.max_script_run_time": 30,
"dom.report_all_js_exceptions": true,
"javascript.options.showInConsole": true,
+ "network.captive-portal-service.enabled": false,
+ "security.csp.enable": false,
"startup.homepage_welcome_url": "about:blank",
"startup.homepage_welcome_url.additional": "about:blank",
"webdriver_accept_untrusted_certs": true,
diff --git a/node_modules/selenium-webdriver/lib/firefox/webdriver.xpi b/node_modules/selenium-webdriver/lib/firefox/webdriver.xpi
index f9a51cf4f..a7b0fa3a7 100644
--- a/node_modules/selenium-webdriver/lib/firefox/webdriver.xpi
+++ b/node_modules/selenium-webdriver/lib/firefox/webdriver.xpi
Binary files differ
diff --git a/node_modules/selenium-webdriver/lib/http.js b/node_modules/selenium-webdriver/lib/http.js
index 68bc43213..136a48e63 100644
--- a/node_modules/selenium-webdriver/lib/http.js
+++ b/node_modules/selenium-webdriver/lib/http.js
@@ -25,17 +25,26 @@
'use strict';
-const fs = require('fs');
-const path = require('path');
-
const cmd = require('./command');
-const devmode = require('./devmode');
const error = require('./error');
const logging = require('./logging');
const promise = require('./promise');
const Session = require('./session').Session;
const WebElement = require('./webdriver').WebElement;
+const {getAttribute, isDisplayed} = (function() {
+ try {
+ return {
+ getAttribute: require('./atoms/getAttribute.js'),
+ isDisplayed: require('./atoms/is-displayed.js')
+ };
+ } catch (ex) {
+ throw Error(
+ 'Failed to import atoms modules. If running in devmode, you need to run'
+ + ' `./go node:atoms` from the project root: ' + ex);
+ }
+})();
+
/**
* Converts a headers map to a HTTP header block string.
@@ -116,43 +125,15 @@ class Response {
const DEV_ROOT = '../../../../buck-out/gen/javascript/';
-/** @enum {string} */
+/** @enum {!Function} */
const Atom = {
- GET_ATTRIBUTE: devmode
- ? path.join(__dirname, DEV_ROOT, 'webdriver/atoms/getAttribute.js')
- : path.join(__dirname, 'atoms/getAttribute.js'),
- IS_DISPLAYED: devmode
- ? path.join(__dirname, DEV_ROOT, 'atoms/fragments/is-displayed.js')
- : path.join(__dirname, 'atoms/isDisplayed.js'),
+ GET_ATTRIBUTE: getAttribute,
+ IS_DISPLAYED: isDisplayed
};
-const ATOMS = /** !Map<string, !Promise<string>> */new Map();
const LOG = logging.getLogger('webdriver.http');
-/**
- * @param {Atom} file The atom file to load.
- * @return {!Promise<string>} A promise that will resolve to the contents of the
- * file.
- */
-function loadAtom(file) {
- if (ATOMS.has(file)) {
- return ATOMS.get(file);
- }
- let contents = /** !Promise<string> */new Promise((resolve, reject) => {
- LOG.finest(() => `Loading atom ${file}`);
- fs.readFile(file, 'utf8', function(err, data) {
- if (err) {
- reject(err);
- } else {
- resolve(data);
- }
- });
- });
- ATOMS.set(file, contents);
- return contents;
-}
-
function post(path) { return resource('POST', path); }
function del(path) { return resource('DELETE', path); }
@@ -168,17 +149,26 @@ var CommandSpec;
var CommandTransformer;
+class InternalTypeError extends TypeError {}
+
+
/**
* @param {!cmd.Command} command The initial command.
* @param {Atom} atom The name of the atom to execute.
* @return {!Promise<!cmd.Command>} The transformed command to execute.
*/
function toExecuteAtomCommand(command, atom, ...params) {
- return loadAtom(atom).then(atom => {
- return new cmd.Command(cmd.Name.EXECUTE_SCRIPT)
+ return new Promise((resolve, reject) => {
+ if (typeof atom !== 'function') {
+ reject(new InternalTypeError('atom is not a function: ' + typeof atom));
+ return;
+ }
+
+ let newCmd = new cmd.Command(cmd.Name.EXECUTE_SCRIPT)
.setParameter('sessionId', command.getParameter('sessionId'))
.setParameter('script', `return (${atom}).apply(null, arguments)`)
.setParameter('args', params.map(param => command.getParameter(param)));
+ resolve(newCmd);
});
}
@@ -269,6 +259,8 @@ const W3C_COMMAND_MAP = new Map([
[cmd.Name.GET_ELEMENT_ATTRIBUTE, (cmd) => {
return toExecuteAtomCommand(cmd, Atom.GET_ATTRIBUTE, 'id', 'name');
}],
+ [cmd.Name.GET_ELEMENT_LOCATION, get('/session/:sessionId/element/:id/rect')],
+ [cmd.Name.GET_ELEMENT_SIZE, get('/session/:sessionId/element/:id/rect')],
[cmd.Name.IS_ELEMENT_DISPLAYED, (cmd) => {
return toExecuteAtomCommand(cmd, Atom.IS_DISPLAYED, 'id');
}],
@@ -437,7 +429,8 @@ class Executor {
this.log_.finer(() => `>>>\n${request}\n<<<\n${response}`);
let parsed =
- parseHttpResponse(/** @type {!Response} */ (response), this.w3c);
+ parseHttpResponse(
+ command, /** @type {!Response} */ (response), this.w3c);
if (command.getName() === cmd.Name.NEW_SESSION
|| command.getName() === cmd.Name.DESCRIBE_SESSION) {
@@ -447,7 +440,7 @@ class Executor {
}
// The remote end is a W3C compliant server if there is no `status`
- // field in the response. This is not appliable for the DESCRIBE_SESSION
+ // field in the response. This is not applicable for the DESCRIBE_SESSION
// command, which is not defined in the W3C spec.
if (command.getName() === cmd.Name.NEW_SESSION) {
this.w3c = this.w3c || !('status' in parsed);
@@ -485,29 +478,42 @@ function tryParse(str) {
/**
* Callback used to parse {@link Response} objects from a
* {@link HttpClient}.
+ *
+ * @param {!cmd.Command} command The command the response is for.
* @param {!Response} httpResponse The HTTP response to parse.
* @param {boolean} w3c Whether the response should be processed using the
* W3C wire protocol.
* @return {?} The parsed response.
* @throws {WebDriverError} If the HTTP response is an error.
*/
-function parseHttpResponse(httpResponse, w3c) {
+function parseHttpResponse(command, httpResponse, w3c) {
let parsed = tryParse(httpResponse.body);
if (parsed !== undefined) {
+ if (httpResponse.status < 200) {
+ // This should never happen, but throw the raw response so
+ // users report it.
+ throw new error.WebDriverError(
+ `Unexpected HTTP response:\n${httpResponse}`);
+ }
+
if (w3c) {
if (httpResponse.status > 399) {
error.throwDecodedError(parsed);
}
+ return parsed;
+ }
- if (httpResponse.status < 200) {
- // This should never happen, but throw the raw response so
- // users report it.
- throw new error.WebDriverError(
- `Unexpected HTTP response:\n${httpResponse}`);
- }
- } else {
- error.checkLegacyResponse(parsed);
+ // If this is a new session command, we need to check for a W3C compliant
+ // error object. This is necessary since a successful new session command
+ // is what puts the executor into W3C mode.
+ if (httpResponse.status > 399
+ && (command.getName() == cmd.Name.NEW_SESSION
+ || command.getName() === cmd.Name.DESCRIBE_SESSION)
+ && error.isErrorResponse(parsed)) {
+ error.throwDecodedError(parsed);
}
+
+ error.checkLegacyResponse(parsed);
return parsed;
}
diff --git a/node_modules/selenium-webdriver/lib/input.js b/node_modules/selenium-webdriver/lib/input.js
index 058530ebc..4ea938d45 100644
--- a/node_modules/selenium-webdriver/lib/input.js
+++ b/node_modules/selenium-webdriver/lib/input.js
@@ -144,7 +144,7 @@ class FileDetector {
/**
* Handles the file specified by the given path, preparing it for use with
* the current browser. If the path does not refer to a valid file, it will
- * be returned unchanged, otherwisee a path suitable for use with the current
+ * be returned unchanged, otherwise a path suitable for use with the current
* browser will be returned.
*
* This default implementation is a no-op. Subtypes may override this function
diff --git a/node_modules/selenium-webdriver/lib/promise.js b/node_modules/selenium-webdriver/lib/promise.js
index 32d0c98e6..b26cd23ff 100644
--- a/node_modules/selenium-webdriver/lib/promise.js
+++ b/node_modules/selenium-webdriver/lib/promise.js
@@ -48,7 +48,7 @@
* > e => console.error('FAILURE: ' + e));
* > ```
* >
- * > The motiviation behind this change and full deprecation plan are documented
+ * > The motivation behind this change and full deprecation plan are documented
* > in [issue 2969](https://github.com/SeleniumHQ/selenium/issues/2969).
* >
* >
@@ -87,8 +87,7 @@
* The control flow is based on the concept of tasks and task queues. Tasks are
* functions that define the basic unit of work for the control flow to execute.
* Each task is scheduled via {@link ControlFlow#execute()}, which will return
- * a {@link ManagedPromise ManagedPromise} that will be resolved with the task's
- * result.
+ * a {@link ManagedPromise} that will be resolved with the task's result.
*
* A task queue contains all of the tasks scheduled within a single turn of the
* [JavaScript event loop][JSEL]. The control flow will create a new task queue
@@ -103,13 +102,13 @@
*
* Whenever the control flow creates a new task queue, it will automatically
* begin executing tasks in the next available turn of the event loop. This
- * execution is scheduled using a "micro-task" timer, such as a (native)
- * `ManagedPromise.then()` callback.
+ * execution is [scheduled as a microtask][MicrotasksArticle] like e.g. a
+ * (native) `Promise.then()` callback.
*
* setTimeout(() => console.log('a'));
- * ManagedPromise.resolve().then(() => console.log('b')); // A native promise.
+ * Promise.resolve().then(() => console.log('b')); // A native promise.
* flow.execute(() => console.log('c'));
- * ManagedPromise.resolve().then(() => console.log('d'));
+ * Promise.resolve().then(() => console.log('d'));
* setTimeout(() => console.log('fin'));
* // b
* // c
@@ -118,13 +117,13 @@
* // fin
*
* In the example above, b/c/d is logged before a/fin because native promises
- * and this module use "micro-task" timers, which have a higher priority than
- * "macro-tasks" like `setTimeout`.
+ * and this module use "microtask" timers, which have a higher priority than
+ * "macrotasks" like `setTimeout`.
*
* ## Task Execution
*
- * Upon creating a task queue, and whenever an exisiting queue completes a task,
- * the control flow will schedule a micro-task timer to process any scheduled
+ * Upon creating a task queue, and whenever an existing queue completes a task,
+ * the control flow will schedule a microtask timer to process any scheduled
* tasks. This ensures no task is ever started within the same turn of the
* JavaScript event loop in which it was scheduled, nor is a task ever started
* within the same turn that another finishes.
@@ -140,13 +139,13 @@
* discarded and the task's promised result (previously returned by
* {@link ControlFlow#execute()}) is immediately rejected with the thrown
* error.
- * 3. The task function returns sucessfully.
+ * 3. The task function returns successfully.
*
* If a task function created a new task queue, the control flow will wait for
* that queue to complete before processing the task result. If the queue
* completes without error, the flow will settle the task's promise with the
- * value originaly returned by the task function. On the other hand, if the task
- * queue termintes with an error, the task's promise will be rejected with that
+ * value originally returned by the task function. On the other hand, if the task
+ * queue terminates with an error, the task's promise will be rejected with that
* error.
*
* flow.execute(function() {
@@ -161,7 +160,7 @@
* ## ManagedPromise Integration
*
* In addition to the {@link ControlFlow} class, the promise module also exports
- * a [ManagedPromise/A+] {@linkplain ManagedPromise implementation} that is deeply
+ * a [Promises/A+] {@linkplain ManagedPromise implementation} that is deeply
* integrated with the ControlFlow. First and foremost, each promise
* {@linkplain ManagedPromise#then() callback} is scheduled with the
* control flow as a task. As a result, each callback is invoked in its own turn
@@ -328,7 +327,7 @@
* Even though a subtask's promised result will never resolve while the task
* function is on the stack, it will be treated as a promise resolved within the
* task. In all other scenarios, a task's promise behaves just like a normal
- * promise. In the sample below, `C/D` is loggged before `B` because the
+ * promise. In the sample below, `C/D` is logged before `B` because the
* resolution of `subtask1` interrupts the flow of the enclosing task. Within
* the final subtask, `E/F` is logged in order because `subtask1` is a resolved
* promise when that task runs.
@@ -467,17 +466,17 @@
*
* ES6 promises do not require users to handle a promise rejections. This can
* result in subtle bugs as the rejections are silently "swallowed" by the
- * ManagedPromise class.
+ * Promise class.
*
- * ManagedPromise.reject(Error('boom'));
+ * Promise.reject(Error('boom'));
* // ... *crickets* ...
*
* Selenium's promise module, on the other hand, requires that every rejection
* be explicitly handled. When a {@linkplain ManagedPromise ManagedPromise} is
* rejected and no callbacks are defined on that promise, it is considered an
- * _unhandled rejection_ and reproted to the active task queue. If the rejection
+ * _unhandled rejection_ and reported to the active task queue. If the rejection
* remains unhandled after a single turn of the [event loop][JSEL] (scheduled
- * with a micro-task), it will propagate up the stack.
+ * with a microtask), it will propagate up the stack.
*
* ## Error Propagation
*
@@ -534,7 +533,7 @@
*
* When a subtask is discarded due to an unreported rejection in its parent
* frame, the existing callbacks on that task will never settle and the
- * callbacks will not be invoked. If a new callback is attached ot the subtask
+ * callbacks will not be invoked. If a new callback is attached to the subtask
* _after_ it has been discarded, it is handled the same as adding a callback
* to a cancelled promise: the error-callback path is invoked. This behavior is
* intended to handle cases where the user saves a reference to a task promise,
@@ -582,9 +581,9 @@
*
* Bottom line: you __*must*__ handle rejected promises.
*
- * # ManagedPromise/A+ Compatibility
+ * # Promises/A+ Compatibility
*
- * This `promise` module is compliant with the [ManagedPromise/A+][] specification
+ * This `promise` module is compliant with the [Promises/A+] specification
* except for sections `2.2.6.1` and `2.2.6.2`:
*
* >
@@ -595,10 +594,10 @@
* > must execute in the order of their originating calls to `then`.
* >
*
- * Specifically, the conformance tests contains the following scenario (for
+ * Specifically, the conformance tests contain the following scenario (for
* brevity, only the fulfillment version is shown):
*
- * var p1 = ManagedPromise.resolve();
+ * var p1 = Promise.resolve();
* p1.then(function() {
* console.log('A');
* p1.then(() => console.log('B'));
@@ -609,7 +608,7 @@
* // B
*
* Since the [ControlFlow](#scheduling_callbacks) executes promise callbacks as
- * tasks, with this module, the result would be
+ * tasks, with this module, the result would be:
*
* var p2 = promise.fulfilled();
* p2.then(function() {
@@ -623,7 +622,8 @@
*
* [JSEL]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
* [GF]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
- * [ManagedPromise/A+]: https://promisesaplus.com/
+ * [Promises/A+]: https://promisesaplus.com/
+ * [MicrotasksArticle]: https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/
*/
'use strict';
@@ -667,7 +667,7 @@ function getUid(obj) {
/**
- * Runs the given function after a micro-task yield.
+ * Runs the given function after a microtask yield.
* @param {function()} fn The function to run.
*/
function asyncRun(fn) {
@@ -942,7 +942,7 @@ class Thenable {
/**
* Marker interface for objects that allow consumers to request the cancellation
- * of a promies-based operation. A cancelled promise will be rejected with a
+ * of a promise-based operation. A cancelled promise will be rejected with a
* {@link CancellationError}.
*
* This interface is considered package-private and should not be used outside
@@ -1003,6 +1003,9 @@ const PromiseState = {
*/
const ON_CANCEL_HANDLER = new WeakMap;
+const SKIP_LOG = Symbol('skip-log');
+const FLOW_LOG = logging.getLogger('promise.ControlFlow');
+
/**
* Represents the eventual value of a completed operation. Each promise may be
@@ -1025,14 +1028,29 @@ class ManagedPromise {
* functions, one for fulfilling the promise and another for rejecting it.
* @param {ControlFlow=} opt_flow The control flow
* this instance was created under. Defaults to the currently active flow.
+ * @param {?=} opt_skipLog An internal parameter used to skip logging the
+ * creation of this promise. This parameter has no effect unless it is
+ * strictly equal to an internal symbol. In other words, this parameter
+ * is always ignored for external code.
*/
- constructor(resolver, opt_flow) {
+ constructor(resolver, opt_flow, opt_skipLog) {
if (!usePromiseManager()) {
throw TypeError(
'Unable to create a managed promise instance: the promise manager has'
+ ' been disabled by the SELENIUM_PROMISE_MANAGER environment'
+ ' variable: ' + process.env['SELENIUM_PROMISE_MANAGER']);
+ } else if (opt_skipLog !== SKIP_LOG) {
+ FLOW_LOG.warning(() => {
+ let e =
+ captureStackTrace(
+ 'ManagedPromiseError',
+ 'Creating a new managed Promise. This call will fail when the'
+ + ' promise manager is disabled',
+ ManagedPromise)
+ return e.stack;
+ });
}
+
getUid(this);
/** @private {!ControlFlow} */
@@ -1308,7 +1326,7 @@ class ManagedPromise {
* @param {!Function} fn The function to use as the top of the stack when
* recording the callback's creation point.
* @return {!ManagedPromise<R>} A new promise which will be resolved with the
- * esult of the invoked callback.
+ * result of the invoked callback.
* @template R
* @private
*/
@@ -1384,6 +1402,37 @@ function isPending(promise) {
/**
+ * Structural interface for a deferred promise resolver.
+ * @record
+ * @template T
+ */
+function Resolver() {}
+
+
+/**
+ * The promised value for this resolver.
+ * @type {!Thenable<T>}
+ */
+Resolver.prototype.promise;
+
+
+/**
+ * Resolves the promised value with the given `value`.
+ * @param {T|Thenable<T>} value
+ * @return {void}
+ */
+Resolver.prototype.resolve;
+
+
+/**
+ * Rejects the promised value with the given `reason`.
+ * @param {*} reason
+ * @return {void}
+ */
+Resolver.prototype.reject;
+
+
+/**
* Represents a value that will be resolved at some point in the future. This
* class represents the protected "producer" half of a ManagedPromise - each Deferred
* has a {@code promise} property that may be returned to consumers for
@@ -1395,20 +1444,25 @@ function isPending(promise) {
* {@link ControlFlow} as an unhandled failure.
*
* @template T
+ * @implements {Resolver<T>}
*/
class Deferred {
/**
* @param {ControlFlow=} opt_flow The control flow this instance was
* created under. This should only be provided during unit tests.
+ * @param {?=} opt_skipLog An internal parameter used to skip logging the
+ * creation of this promise. This parameter has no effect unless it is
+ * strictly equal to an internal symbol. In other words, this parameter
+ * is always ignored for external code.
*/
- constructor(opt_flow) {
+ constructor(opt_flow, opt_skipLog) {
var fulfill, reject;
/** @type {!ManagedPromise<T>} */
this.promise = new ManagedPromise(function(f, r) {
fulfill = f;
reject = r;
- }, opt_flow);
+ }, opt_flow, opt_skipLog);
var self = this;
var checkNotSelf = function(value) {
@@ -1421,16 +1475,24 @@ class Deferred {
* Resolves this deferred with the given value. It is safe to call this as a
* normal function (with no bound "this").
* @param {(T|IThenable<T>|Thenable)=} opt_value The fulfilled value.
+ * @const
*/
- this.fulfill = function(opt_value) {
+ this.resolve = function(opt_value) {
checkNotSelf(opt_value);
fulfill(opt_value);
};
/**
+ * An alias for {@link #resolve}.
+ * @const
+ */
+ this.fulfill = this.resolve;
+
+ /**
* Rejects this promise with the given reason. It is safe to call this as a
* normal function (with no bound "this").
* @param {*=} opt_reason The rejection reason.
+ * @const
*/
this.reject = function(opt_reason) {
checkNotSelf(opt_reason);
@@ -1487,36 +1549,76 @@ function delayed(ms) {
/**
- * Creates a new deferred object.
- * @return {!Deferred<T>} The new deferred object.
+ * Creates a new deferred resolver.
+ *
+ * If the promise manager is currently enabled, this function will return a
+ * {@link Deferred} instance. Otherwise, it will return a resolver for a
+ * {@linkplain NativePromise native promise}.
+ *
+ * @return {!Resolver<T>} A new deferred resolver.
* @template T
*/
function defer() {
- return new Deferred();
+ if (usePromiseManager()) {
+ return new Deferred();
+ }
+ let resolve, reject;
+ let promise = new NativePromise((_resolve, _reject) => {
+ resolve = _resolve;
+ reject = _reject;
+ });
+ return {promise, resolve, reject};
}
/**
* Creates a promise that has been resolved with the given value.
+ *
+ * If the promise manager is currently enabled, this function will return a
+ * {@linkplain ManagedPromise managed promise}. Otherwise, it will return a
+ * {@linkplain NativePromise native promise}.
+ *
* @param {T=} opt_value The resolved value.
- * @return {!ManagedPromise<T>} The resolved promise.
- * @deprecated Use {@link ManagedPromise#resolve Promise.resolve(value)}.
+ * @return {!Thenable<T>} The resolved promise.
* @template T
*/
function fulfilled(opt_value) {
- return ManagedPromise.resolve(opt_value);
+ let ctor = usePromiseManager() ? ManagedPromise : NativePromise;
+ if (opt_value instanceof ctor) {
+ return /** @type {!Thenable} */(opt_value);
+ }
+
+ if (usePromiseManager()) {
+ // We can skip logging warnings about creating a managed promise because
+ // this function will automatically switch to use a native promise when
+ // the promise manager is disabled.
+ return new ManagedPromise(
+ resolve => resolve(opt_value), undefined, SKIP_LOG);
+ }
+ return NativePromise.resolve(opt_value);
}
/**
* Creates a promise that has been rejected with the given reason.
+ *
+ * If the promise manager is currently enabled, this function will return a
+ * {@linkplain ManagedPromise managed promise}. Otherwise, it will return a
+ * {@linkplain NativePromise native promise}.
+ *
* @param {*=} opt_reason The rejection reason; may be any value, but is
* usually an Error or a string.
- * @return {!ManagedPromise<?>} The rejected promise.
- * @deprecated Use {@link ManagedPromise#reject Promise.reject(reason)}.
+ * @return {!Thenable<?>} The rejected promise.
*/
function rejected(opt_reason) {
- return ManagedPromise.reject(opt_reason);
+ if (usePromiseManager()) {
+ // We can skip logging warnings about creating a managed promise because
+ // this function will automatically switch to use a native promise when
+ // the promise manager is disabled.
+ return new ManagedPromise(
+ (_, reject) => reject(opt_reason), undefined, SKIP_LOG);
+ }
+ return NativePromise.reject(opt_reason);
}
@@ -1610,21 +1712,17 @@ function thenFinally(promise, callback) {
* @param {Function=} opt_errback The function to call when the value is
* rejected.
* @return {!Thenable} A new promise.
+ * @deprecated Use `promise.fulfilled(value).then(opt_callback, opt_errback)`
*/
function when(value, opt_callback, opt_errback) {
- if (Thenable.isImplementation(value)) {
- return value.then(opt_callback, opt_errback);
- }
-
- return createPromise(resolve => resolve(value))
- .then(opt_callback, opt_errback);
+ return fulfilled(value).then(opt_callback, opt_errback);
}
/**
* Invokes the appropriate callback function as soon as a promised `value` is
- * resolved. This function is similar to `when()`, except it does not return
- * a new promise.
+ * resolved.
+ *
* @param {*} value The value to observe.
* @param {Function} callback The function to call when the value is
* resolved successfully.
@@ -1826,7 +1924,7 @@ function filter(arr, fn, opt_self) {
*/
function fullyResolved(value) {
if (isPromise(value)) {
- return when(value, fullyResolveValue);
+ return fulfilled(value).then(fullyResolveValue);
}
return fullyResolveValue(value);
}
@@ -1973,7 +2071,7 @@ class Scheduler {
/**
* Schedules a task to wait for a condition to hold.
*
- * If the condition is defined as a function, it may return any value. Promies
+ * If the condition is defined as a function, it may return any value. Promise
* will be resolved before testing if the condition holds (resolution time
* counts towards the timeout). Once resolved, values are always evaluated as
* booleans.
@@ -1997,7 +2095,7 @@ class Scheduler {
* @param {string=} opt_message An optional error message to include if the
* wait times out; defaults to the empty string.
* @return {!Thenable<T>} A promise that will be fulfilled
- * when the condition has been satisified. The promise shall be rejected
+ * when the condition has been satisfied. The promise shall be rejected
* if the wait times out waiting for the condition.
* @throws {TypeError} If condition is not a function or promise or if timeout
* is not a number >= 0.
@@ -2018,6 +2116,10 @@ function usePromiseManager() {
/**
+ * Creates a new promise with the given `resolver` function. If the promise
+ * manager is currently enabled, the returned promise will be a
+ * {@linkplain ManagedPromise} instance. Otherwise, it will be a native promise.
+ *
* @param {function(
* function((T|IThenable<T>|Thenable|null)=),
* function(*=))} resolver
@@ -2040,7 +2142,7 @@ function createPromise(resolver) {
* @param {string=} opt_message An optional error message to include if the
* wait times out; defaults to the empty string.
* @return {!Thenable<T>} A promise that will be fulfilled
- * when the condition has been satisified. The promise shall be rejected
+ * when the condition has been satisfied. The promise shall be rejected
* if the wait times out waiting for the condition.
* @throws {TypeError} If condition is not a function or promise or if timeout
* is not a number >= 0.
@@ -2164,7 +2266,7 @@ const SIMPLE_SCHEDULER = new SimpleScheduler;
/**
* Handles the execution of scheduled tasks, each of which may be an
* asynchronous operation. The control flow will ensure tasks are executed in
- * the ordered scheduled, starting each task only once those before it have
+ * the order scheduled, starting each task only once those before it have
* completed.
*
* Each task scheduled within this flow may return a {@link ManagedPromise} to
@@ -2172,21 +2274,21 @@ const SIMPLE_SCHEDULER = new SimpleScheduler;
* promises to be resolved before marking the task as completed.
*
* Tasks and each callback registered on a {@link ManagedPromise} will be run
- * in their own ControlFlow frame. Any tasks scheduled within a frame will take
+ * in their own ControlFlow frame. Any tasks scheduled within a frame will take
* priority over previously scheduled tasks. Furthermore, if any of the tasks in
* the frame fail, the remainder of the tasks in that frame will be discarded
* and the failure will be propagated to the user through the callback/task's
* promised result.
*
* Each time a ControlFlow empties its task queue, it will fire an
- * {@link ControlFlow.EventType.IDLE IDLE} event. Conversely,
- * whenever the flow terminates due to an unhandled error, it will remove all
+ * {@link ControlFlow.EventType.IDLE IDLE} event. Conversely, whenever
+ * the flow terminates due to an unhandled error, it will remove all
* remaining tasks in its queue and fire an
* {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION UNCAUGHT_EXCEPTION} event.
* If there are no listeners registered with the flow, the error will be
* rethrown to the global error handler.
*
- * Refer to the {@link ./promise} module documentation for a detailed
+ * Refer to the {@link ./promise} module documentation for a detailed
* explanation of how the ControlFlow coordinates task execution.
*
* @implements {Scheduler}
@@ -2212,7 +2314,7 @@ class ControlFlow extends events.EventEmitter {
this.taskQueues_ = null;
/**
- * Micro task that controls shutting down the control flow. Upon shut down,
+ * Microtask that controls shutting down the control flow. Upon shut down,
* the flow will emit an
* {@link ControlFlow.EventType.IDLE} event. Idle events
* always follow a brief timeout in order to catch latent errors from the
@@ -2221,8 +2323,8 @@ class ControlFlow extends events.EventEmitter {
* by the promise system until the next turn of the event loop:
*
* // Schedule 1 task that fails.
- * var result = promise.controlFlow().schedule('example',
- * function() { return promise.rejected('failed'); });
+ * var result = promise.controlFlow().execute(
+ * () => promise.rejected('failed'), 'example');
* // Set a callback on the result. This delays reporting the unhandled
* // failure for 1 turn of the event loop.
* result.then(function() {});
@@ -2246,7 +2348,7 @@ class ControlFlow extends events.EventEmitter {
/**
* Returns a string representation of this control flow, which is its current
* {@linkplain #getSchedule() schedule}, sans task stack traces.
- * @return {string} The string representation of this contorl flow.
+ * @return {string} The string representation of this control flow.
* @override
*/
toString() {
@@ -2258,8 +2360,7 @@ class ControlFlow extends events.EventEmitter {
* control flow stack and cause rejections within parent tasks. If error
* propagation is disabled, tasks will not be aborted when an unhandled
* promise rejection is detected, but the rejection _will_ trigger an
- * {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION}
- * event.
+ * {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION} event.
*
* The default behavior is to propagate all unhandled rejections. _The use
* of this option is highly discouraged._
@@ -2293,7 +2394,7 @@ class ControlFlow extends events.EventEmitter {
* {@code opt_includeStackTraces === true}, the string will include the
* stack trace from when each task was scheduled.
* @param {string=} opt_includeStackTraces Whether to include the stack traces
- * from when each task was scheduled. Defaults to false.
+ * from when each task was scheduled. Defaults to false.
* @return {string} String representation of this flow's internal state.
*/
getSchedule(opt_includeStackTraces) {
@@ -2345,7 +2446,7 @@ class ControlFlow extends events.EventEmitter {
}
/**
- * Returns the currently actively task queue for this flow. If there is no
+ * Returns the currently active task queue for this flow. If there is no
* active queue, one will be created.
* @return {!TaskQueue} the currently active task queue for this flow.
* @private
@@ -2377,15 +2478,31 @@ class ControlFlow extends events.EventEmitter {
}
if (!this.hold_) {
- var holdIntervalMs = 2147483647; // 2^31-1; max timer length for Node.js
+ let holdIntervalMs = 2147483647; // 2^31-1; max timer length for Node.js
this.hold_ = setInterval(function() {}, holdIntervalMs);
}
- var task = new Task(
+ let task = new Task(
this, fn, opt_description || '<anonymous>',
- {name: 'Task', top: ControlFlow.prototype.execute});
+ {name: 'Task', top: ControlFlow.prototype.execute},
+ true);
+
+ let q = this.getActiveQueue_();
+
+ for (let i = q.tasks_.length; i > 0; i--) {
+ let previousTask = q.tasks_[i - 1];
+ if (previousTask.userTask_) {
+ FLOW_LOG.warning(() => {
+ return `Detected scheduling of an unchained task.
+When the promise manager is disabled, unchained tasks will not wait for
+previously scheduled tasks to finish before starting to execute.
+New task: ${task.promise.stack_.stack}
+Previous task: ${previousTask.promise.stack_.stack}`.split(/\n/).join('\n ');
+ });
+ break;
+ }
+ }
- var q = this.getActiveQueue_();
q.enqueue(task);
this.emit(ControlFlow.EventType.SCHEDULE_TASK, task.description);
return task.promise;
@@ -2393,7 +2510,7 @@ class ControlFlow extends events.EventEmitter {
/** @override */
promise(resolver) {
- return new ManagedPromise(resolver, this);
+ return new ManagedPromise(resolver, this, SKIP_LOG);
}
/** @override */
@@ -2622,7 +2739,7 @@ class MicroTask {
}
/**
- * Runs the given function after a micro-task yield.
+ * Runs the given function after a microtask yield.
* @param {function()} fn The function to run.
*/
static run(fn) {
@@ -2662,9 +2779,11 @@ class Task extends Deferred {
* @param {string} description A description of the task for debugging.
* @param {{name: string, top: !Function}=} opt_stackOptions Options to use
* when capturing the stacktrace for when this task was created.
+ * @param {boolean=} opt_isUserTask Whether this task was explicitly scheduled
+ * by the use of the promise manager.
*/
- constructor(flow, fn, description, opt_stackOptions) {
- super(flow);
+ constructor(flow, fn, description, opt_stackOptions, opt_isUserTask) {
+ super(flow, SKIP_LOG);
getUid(this);
/** @type {function(): (T|!ManagedPromise<T>)} */
@@ -2676,6 +2795,9 @@ class Task extends Deferred {
/** @type {TaskQueue} */
this.queue = null;
+ /** @private @const {boolean} */
+ this.userTask_ = !!opt_isUserTask;
+
/**
* Whether this task is considered block. A blocked task may be registered
* in a task queue, but will be dropped if it is still blocked when it
@@ -2889,7 +3011,7 @@ class TaskQueue extends events.EventEmitter {
}
// Now that all of the remaining tasks have been silently cancelled (e.g. no
- // exisitng callbacks on those tasks will fire), clear the silence bit on
+ // existing callbacks on those tasks will fire), clear the silence bit on
// the cancellation error. This ensures additional callbacks registered in
// the future will actually execute.
cancellation.silent_ = false;
@@ -2935,7 +3057,7 @@ class TaskQueue extends events.EventEmitter {
this.subQ_.once('end', () => { // On task completion.
this.subQ_ = null;
- this.pending_ && this.pending_.task.fulfill(result);
+ this.pending_ && this.pending_.task.resolve(result);
});
this.subQ_.once('error', e => { // On task failure.
@@ -3068,7 +3190,7 @@ class TaskQueue extends events.EventEmitter {
}
return task;
}
-};
+}
@@ -3214,7 +3336,7 @@ function consume(generatorFn, opt_self, ...var_args) {
function pump(fn, opt_arg) {
if (ret instanceof ManagedPromise && !isPending(ret)) {
- return; // Defererd was cancelled; silently abort.
+ return; // Deferred was cancelled; silently abort.
}
try {
@@ -3246,6 +3368,7 @@ module.exports = {
MultipleUnhandledRejectionError: MultipleUnhandledRejectionError,
Thenable: Thenable,
Promise: ManagedPromise,
+ Resolver: Resolver,
Scheduler: Scheduler,
all: all,
asap: asap,
@@ -3254,6 +3377,7 @@ module.exports = {
consume: consume,
controlFlow: controlFlow,
createFlow: createFlow,
+ createPromise: createPromise,
defer: defer,
delayed: delayed,
filter: filter,
@@ -3275,7 +3399,7 @@ module.exports = {
* The promise manager is currently enabled by default, but may be disabled
* by setting the environment variable `SELENIUM_PROMISE_MANAGER=0` or by
* setting this property to false. Setting this property will always take
- * precedence ove the use of the environment variable.
+ * precedence over the use of the environment variable.
*
* @return {boolean} Whether the promise manager is enabled.
* @see <https://github.com/SeleniumHQ/selenium/issues/2969>
diff --git a/node_modules/selenium-webdriver/lib/symbols.js b/node_modules/selenium-webdriver/lib/symbols.js
index d5c62504e..6c7cd1d9d 100644
--- a/node_modules/selenium-webdriver/lib/symbols.js
+++ b/node_modules/selenium-webdriver/lib/symbols.js
@@ -30,7 +30,7 @@ module.exports = {
* available, the serialize method will return a promise that will be resolved
* with the serialized form.
*
- * Note that the described method is analgous to objects that define a
+ * Note that the described method is analogous to objects that define a
* `toJSON()` method, except the serialized result may be a promise, or
* another object with a promised property.
*/
diff --git a/node_modules/selenium-webdriver/lib/test/index.js b/node_modules/selenium-webdriver/lib/test/index.js
index ba34ddab4..b3275ccbb 100644
--- a/node_modules/selenium-webdriver/lib/test/index.js
+++ b/node_modules/selenium-webdriver/lib/test/index.js
@@ -24,6 +24,7 @@ var build = require('./build'),
webdriver = require('../../'),
flow = webdriver.promise.controlFlow(),
firefox = require('../../firefox'),
+ logging = require('../../lib/logging'),
safari = require('../../safari'),
remote = require('../../remote'),
testing = require('../../testing'),
@@ -56,6 +57,11 @@ var noMarionette = /^0|false$/i.test(process.env['SELENIUM_GECKODRIVER']);
var startServer = !!serverJar && !remoteUrl;
var nativeRun = !serverJar && !remoteUrl;
+if (/^1|true$/i.test(process.env['SELENIUM_VERBOSE'])) {
+ logging.installConsoleHandler();
+ logging.getLogger('webdriver.http').setLevel(logging.Level.ALL);
+}
+
var browsersToTest = (function() {
var permitRemoteBrowsers = !!remoteUrl || !!serverJar;
var permitUnknownBrowsers = !nativeRun;
diff --git a/node_modules/selenium-webdriver/lib/until.js b/node_modules/selenium-webdriver/lib/until.js
index 0cc6f5ea3..b0e68b88b 100644
--- a/node_modules/selenium-webdriver/lib/until.js
+++ b/node_modules/selenium-webdriver/lib/until.js
@@ -72,7 +72,7 @@ const webdriver = require('./webdriver'),
exports.ableToSwitchToFrame = function ableToSwitchToFrame(frame) {
var condition;
if (typeof frame === 'number' || frame instanceof webdriver.WebElement) {
- condition = attemptToSwitchFrames;
+ condition = driver => attemptToSwitchFrames(driver, frame);
} else {
condition = function(driver) {
let locator = /** @type {!(By|Function)} */(frame);
diff --git a/node_modules/selenium-webdriver/lib/webdriver.js b/node_modules/selenium-webdriver/lib/webdriver.js
index 081d77bda..c8d04e82a 100644
--- a/node_modules/selenium-webdriver/lib/webdriver.js
+++ b/node_modules/selenium-webdriver/lib/webdriver.js
@@ -457,12 +457,12 @@ class IWebDriver {
* while evaluating the condition, they will be allowed to propagate. In the
* event a condition returns a {@link promise.Promise promise}, the polling
* loop will wait for it to be resolved and use the resolved value for whether
- * the condition has been satisified. Note the resolution time for a promise
+ * the condition has been satisfied. Note the resolution time for a promise
* is factored into whether a wait has timed out.
*
* Note, if the provided condition is a {@link WebElementCondition}, then
* the wait will return a {@link WebElementPromise} that will resolve to the
- * element that satisified the condition.
+ * element that satisfied the condition.
*
* _Example:_ waiting up to 10 seconds for an element to be present on the
* page.
@@ -779,7 +779,7 @@ class WebDriver {
'WebDriver.createSession()');
if (typeof opt_onQuit === 'function') {
session = session.catch(err => {
- return Promise.resolve(opt_onQuit.call(void 0)).then(_ => {throw err});
+ return Promise.resolve(opt_onQuit.call(void 0)).then(_ => {throw err;});
});
}
const ctor = opt_ctor || WebDriver;
@@ -850,7 +850,7 @@ class WebDriver {
new command.Command(command.Name.QUIT),
'WebDriver.quit()');
// Delete our session ID when the quit command finishes; this will allow us
- // to throw an error when attemnpting to use a driver post-quit.
+ // to throw an error when attempting to use a driver post-quit.
return /** @type {!promise.Thenable} */(promise.finally(result, () => {
this.session_ = this.flow_.promise((_, reject) => {
reject(new error.NoSuchSessionError(
@@ -1181,7 +1181,7 @@ class Navigation {
/**
* Provides methods for managing browser and driver state.
*
- * This class should never be instantiated directly. Insead, obtain an instance
+ * This class should never be instantiated directly. Instead, obtain an instance
* with {@linkplain WebDriver#manage() webdriver.manage()}.
*/
class Options {
@@ -1427,7 +1427,7 @@ Options.Cookie.prototype.expiry;
/**
* An interface for managing timeout behavior for WebDriver instances.
*
- * This class should never be instantiated directly. Insead, obtain an instance
+ * This class should never be instantiated directly. Instead, obtain an instance
* with
*
* webdriver.manage().timeouts()
@@ -2009,7 +2009,7 @@ class WebElement {
* this instance.
*
* Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is
- * processed in the keysequence, that key state is toggled until one of the
+ * processed in the key sequence, that key state is toggled until one of the
* following occurs:
*
* - The modifier key is encountered again in the sequence. At this point the
@@ -2028,13 +2028,13 @@ class WebElement {
* Key.chord(Key.CONTROL, "a"),
* "now text is");
*
- * - The end of the keysequence is encountered. When there are no more keys
+ * - The end of the key sequence is encountered. When there are no more keys
* to type, all depressed modifier keys are released (with accompanying
* keyup events).
*
* If this element is a file input ({@code <input type="file">}), the
* specified key sequence should specify the path to the file to attach to
- * the element. This is analgous to the user clicking "Browse..." and entering
+ * the element. This is analogous to the user clicking "Browse..." and entering
* the path into the file select dialog.
*
* var form = driver.findElement(By.css('form'));
@@ -2050,7 +2050,7 @@ class WebElement {
*
* __Note:__ On browsers where native keyboard events are not supported
* (e.g. Firefox on OS X), key events will be synthesized. Special
- * punctionation keys will be synthesized according to a standard QWERTY en-us
+ * punctuation keys will be synthesized according to a standard QWERTY en-us
* keyboard layout.
*
* @param {...(number|string|!IThenable<(number|string)>)} var_args The
@@ -2214,7 +2214,7 @@ class WebElement {
/**
* Schedules a command to query whether the DOM element represented by this
- * instance is enabled, as dicted by the {@code disabled} attribute.
+ * instance is enabled, as dictated by the {@code disabled} attribute.
* @return {!promise.Thenable<boolean>} A promise that will be
* resolved with whether this element is currently enabled.
*/
@@ -2327,7 +2327,7 @@ class WebElementPromise extends WebElement {
if (promise.CancellableThenable.isImplementation(el)) {
/** @type {!promise.CancellableThenable} */(el).cancel(opt_reason);
}
- }
+ };
/** @override */
this.then = el.then.bind(el);
diff --git a/node_modules/selenium-webdriver/opera.js b/node_modules/selenium-webdriver/opera.js
index cc84f2af5..5107bae4e 100644
--- a/node_modules/selenium-webdriver/opera.js
+++ b/node_modules/selenium-webdriver/opera.js
@@ -62,7 +62,7 @@
* var options = new opera.Options();
* // configure browser options ...
*
- * var driver = new opera.Driver(options, service);
+ * var driver = opera.Driver.createSession(options, service);
*
* Users should only instantiate the {@link Driver} class directly when they
* need a custom driver service configuration (as shown above). For normal
diff --git a/node_modules/selenium-webdriver/package.json b/node_modules/selenium-webdriver/package.json
index 5c3935833..dfb557bf4 100644
--- a/node_modules/selenium-webdriver/package.json
+++ b/node_modules/selenium-webdriver/package.json
@@ -1,6 +1,6 @@
{
"name": "selenium-webdriver",
- "version": "3.0.1",
+ "version": "3.3.0",
"description": "The official WebDriver JavaScript bindings from the Selenium project",
"license": "Apache-2.0",
"keywords": [
diff --git a/node_modules/selenium-webdriver/remote/index.js b/node_modules/selenium-webdriver/remote/index.js
index 87dee7e8d..cc0b66462 100644
--- a/node_modules/selenium-webdriver/remote/index.js
+++ b/node_modules/selenium-webdriver/remote/index.js
@@ -492,7 +492,12 @@ class SeleniumServer extends DriverService {
return jvmArgs.concat('-jar', jar, '-port', port).concat(args);
});
- super('java', {
+ let java = 'java';
+ if (process.env['JAVA_HOME']) {
+ java = path.join(process.env['JAVA_HOME'], 'bin/java');
+ }
+
+ super(java, {
loopback: options.loopback,
port: port,
args: args,
diff --git a/node_modules/selenium-webdriver/safari.js b/node_modules/selenium-webdriver/safari.js
index 97d512bc7..5a57387c1 100644
--- a/node_modules/selenium-webdriver/safari.js
+++ b/node_modules/selenium-webdriver/safari.js
@@ -68,7 +68,7 @@ class ServiceBuilder extends remote.DriverService.Builder {
const OPTIONS_CAPABILITY_KEY = 'safari.options';
-
+const TECHNOLOGY_PREVIEW_OPTIONS_KEY = 'technologyPreview';
/**
* Configuration options specific to the {@link Driver SafariDriver}.
@@ -89,16 +89,17 @@ class Options {
* Extracts the SafariDriver specific options from the given capabilities
* object.
* @param {!Capabilities} capabilities The capabilities object.
- * @return {!Options} The ChromeDriver options.
+ * @return {!Options} The SafariDriver options.
*/
static fromCapabilities(capabilities) {
var options = new Options();
-
var o = capabilities.get(OPTIONS_CAPABILITY_KEY);
+
if (o instanceof Options) {
options = o;
} else if (o) {
options.setCleanSession(o.cleanSession);
+ options.setTechnologyPreview(o[TECHNOLOGY_PREVIEW_OPTIONS_KEY]);
}
if (capabilities.has(Capability.PROXY)) {
@@ -149,6 +150,22 @@ class Options {
}
/**
+ * Instruct the SafariDriver to use the Safari Technology Preview if true.
+ * Otherwise, use the release version of Safari. Defaults to using the release version of Safari.
+ *
+ * @param {boolean} useTechnologyPreview
+ * @return {!Options} A self reference.
+ */
+ setTechnologyPreview(useTechnologyPreview) {
+ if (!this.options_) {
+ this.options_ = {};
+ }
+
+ this.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY] = !!useTechnologyPreview;
+ return this;
+ }
+
+ /**
* Converts this options instance to a {@link Capabilities} object.
* @param {Capabilities=} opt_capabilities The capabilities to
* merge these options into, if any.
@@ -179,6 +196,23 @@ class Options {
}
}
+/**
+ * @param {(Options|Object<string, *>)=} o The options object
+ * @return {boolean}
+ */
+function useTechnologyPreview(o) {
+ if (o instanceof Options) {
+ return !!(o.options_ && o.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY]);
+ }
+
+ if (o && typeof o === 'object') {
+ return !!o[TECHNOLOGY_PREVIEW_OPTIONS_KEY];
+ }
+
+ return false;
+}
+
+const SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE = '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver';
/**
* A WebDriver client for Safari. This class should never be instantiated
@@ -200,14 +234,19 @@ class Driver extends webdriver.WebDriver {
* @return {!Driver} A new driver instance.
*/
static createSession(opt_config, opt_flow) {
- let caps;
+ let caps, exe;
+
if (opt_config instanceof Options) {
caps = opt_config.toCapabilities();
} else {
- caps = opt_config || Capabilities.safari()
+ caps = opt_config || Capabilities.safari();
+ }
+
+ if (useTechnologyPreview(caps.get(OPTIONS_CAPABILITY_KEY))) {
+ exe = SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE;
}
- let service = new ServiceBuilder().build();
+ let service = new ServiceBuilder(exe).build();
let executor = new http.Executor(
service.start().then(url => new http.HttpClient(url)));
diff --git a/node_modules/selenium-webdriver/test/firefox/firefox_test.js b/node_modules/selenium-webdriver/test/firefox/firefox_test.js
index 485964f91..dbf9910fa 100644
--- a/node_modules/selenium-webdriver/test/firefox/firefox_test.js
+++ b/node_modules/selenium-webdriver/test/firefox/firefox_test.js
@@ -26,6 +26,8 @@ var firefox = require('../../firefox'),
Context = require('../../firefox').Context,
error = require('../..').error;
+var {consume} = require('../../lib/promise');
+
var JETPACK_EXTENSION = path.join(__dirname,
'../../lib/test/data/firefox/jetpack-sample.xpi');
@@ -53,9 +55,7 @@ test.suite(function(env) {
* skipped if dev cannot be found on the current system.
*/
function runWithFirefoxDev(options, testFn) {
- let binary = new firefox.Binary();
- binary.useDevEdition();
- return binary.locate().then(exe => {
+ return firefox.Channel.AURORA.locate().then(exe => {
options.setBinary(exe);
driver = env.builder()
.setFirefoxOptions(options)
@@ -67,21 +67,33 @@ test.suite(function(env) {
});
}
- test.it('can start Firefox with custom preferences', function*() {
- var profile = new firefox.Profile();
- profile.setPreference('general.useragent.override', 'foo;bar');
+ describe('can start Firefox with custom preferences', function() {
+ function runTest(opt_dir) {
+ return consume(function*() {
+ let profile = new firefox.Profile(opt_dir);
+ profile.setPreference('general.useragent.override', 'foo;bar');
+
+ let options = new firefox.Options().setProfile(profile);
+
+ driver = env.builder().
+ setFirefoxOptions(options).
+ build();
- var options = new firefox.Options().setProfile(profile);
+ yield driver.get('data:text/html,<html><div>content</div></html>');
- driver = env.builder().
- setFirefoxOptions(options).
- build();
+ var userAgent = yield driver.executeScript(
+ 'return window.navigator.userAgent');
+ assert(userAgent).equalTo('foo;bar');
+ });
+ }
- yield driver.get('data:text/html,<html><div>content</div></html>');
+ test.it('profile created from scratch', function() {
+ return runTest();
+ });
- var userAgent = yield driver.executeScript(
- 'return window.navigator.userAgent');
- assert(userAgent).equalTo('foo;bar');
+ test.it('profile created from template', function() {
+ return io.tmpDir().then(runTest);
+ });
});
test.it('can start Firefox with a jetpack extension', function() {
diff --git a/node_modules/selenium-webdriver/test/lib/http_test.js b/node_modules/selenium-webdriver/test/lib/http_test.js
index 1c6c073ad..2dd27869d 100644
--- a/node_modules/selenium-webdriver/test/lib/http_test.js
+++ b/node_modules/selenium-webdriver/test/lib/http_test.js
@@ -325,6 +325,37 @@ describe('http', function() {
assert.ok(executor.w3c, 'should never downgrade');
});
});
+
+ it('handles legacy new session failures', function() {
+ let rawResponse = {
+ status: error.ErrorCode.NO_SUCH_ELEMENT,
+ value: {message: 'hi'}
+ };
+
+ send.returns(Promise.resolve(
+ new http.Response(500, {}, JSON.stringify(rawResponse))));
+
+ return executor.execute(command)
+ .then(() => assert.fail('should have failed'),
+ e => {
+ assert.ok(e instanceof error.NoSuchElementError);
+ assert.equal(e.message, 'hi');
+ });
+ });
+
+ it('handles w3c new session failures', function() {
+ let rawResponse = {error: 'no such element', message: 'oops'};
+
+ send.returns(Promise.resolve(
+ new http.Response(500, {}, JSON.stringify(rawResponse))));
+
+ return executor.execute(command)
+ .then(() => assert.fail('should have failed'),
+ e => {
+ assert.ok(e instanceof error.NoSuchElementError);
+ assert.equal(e.message, 'oops');
+ });
+ });
});
describe('extracts Session from DESCRIBE_SESSION response', function() {
diff --git a/node_modules/selenium-webdriver/test/lib/promise_test.js b/node_modules/selenium-webdriver/test/lib/promise_test.js
index 96d2ccc22..8da1cd89e 100644
--- a/node_modules/selenium-webdriver/test/lib/promise_test.js
+++ b/node_modules/selenium-webdriver/test/lib/promise_test.js
@@ -301,6 +301,25 @@ describe('promise', function() {
});
promiseManagerSuite(() => {
+ describe('fulfilled', function() {
+ it('returns input value if it is already a valid promise', function() {
+ let p = promise.createPromise(function() {});
+ let r = promise.fulfilled(p);
+ assert.strictEqual(p, r);
+ });
+
+ it('creates a new promise fulfilled with input', function() {
+ return promise.fulfilled(1234).then(v => assert.equal(1234, v));
+ });
+
+ it('can convert thenables to valid promise', function() {
+ let thenable = {then: function(cb) {cb(1234)}};
+ let p = promise.fulfilled(thenable);
+ assert.notStrictEqual(thenable, p);
+ return p.then(v => assert.equal(1234, v));
+ });
+ });
+
describe('when', function() {
it('ReturnsAResolvedPromiseIfGivenANonPromiseValue', function() {
var ret = promise.when('abc');
diff --git a/node_modules/selenium-webdriver/test/lib/until_test.js b/node_modules/selenium-webdriver/test/lib/until_test.js
index 31b2b32ad..3226a467a 100644
--- a/node_modules/selenium-webdriver/test/lib/until_test.js
+++ b/node_modules/selenium-webdriver/test/lib/until_test.js
@@ -70,39 +70,54 @@ describe('until', function() {
.then(fail, (e2) => assert.strictEqual(e2, e));
});
+ const ELEMENT_ID = 'some-element-id';
+ const ELEMENT_INDEX = 1234;
+
+ function onSwitchFrame(expectedId) {
+ if (typeof expectedId === 'string') {
+ expectedId = WebElement.buildId(expectedId);
+ } else {
+ assert.equal(typeof expectedId, 'number', 'must be string or number');
+ }
+ return cmd => {
+ assert.deepEqual(
+ cmd.getParameter('id'), expectedId, 'frame ID not specified');
+ return true;
+ };
+ }
+
it('byIndex', function() {
- executor.on(CommandName.SWITCH_TO_FRAME, () => true);
- return driver.wait(until.ableToSwitchToFrame(0), 100);
+ executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_INDEX));
+ return driver.wait(until.ableToSwitchToFrame(ELEMENT_INDEX), 100);
});
it('byWebElement', function() {
- executor.on(CommandName.SWITCH_TO_FRAME, () => true);
- var el = new webdriver.WebElement(driver, {ELEMENT: 1234});
+ executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID));
+
+ var el = new webdriver.WebElement(driver, ELEMENT_ID);
return driver.wait(until.ableToSwitchToFrame(el), 100);
});
it('byWebElementPromise', function() {
- executor.on(CommandName.SWITCH_TO_FRAME, () => true);
+ executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID));
var el = new webdriver.WebElementPromise(driver,
- Promise.resolve(new webdriver.WebElement(driver, {ELEMENT: 1234})));
+ Promise.resolve(new webdriver.WebElement(driver, ELEMENT_ID)));
return driver.wait(until.ableToSwitchToFrame(el), 100);
});
it('byLocator', function() {
- executor.on(CommandName.FIND_ELEMENTS, () => [WebElement.buildId(1234)]);
- executor.on(CommandName.SWITCH_TO_FRAME, () => true);
+ executor.on(CommandName.FIND_ELEMENTS, () => [WebElement.buildId(ELEMENT_ID)]);
+ executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID));
return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 100);
});
it('byLocator_elementNotInitiallyFound', function() {
- var foundResponses = [[], [], [WebElement.buildId(1234)]];
+ let foundResponses = [[], [], [WebElement.buildId(ELEMENT_ID)]];
executor.on(CommandName.FIND_ELEMENTS, () => foundResponses.shift());
- executor.on(CommandName.SWITCH_TO_FRAME, () => true);
+ executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID));
return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 2000)
- .then(function() {
- assert.equal(foundResponses.length, 0);
- });
+ .then(() => assert.deepEqual(foundResponses, []));
});
it('timesOutIfNeverAbletoSwitchFrames', function() {
diff --git a/node_modules/selenium-webdriver/testing/index.js b/node_modules/selenium-webdriver/testing/index.js
index 5bb82d15f..88763c7d5 100644
--- a/node_modules/selenium-webdriver/testing/index.js
+++ b/node_modules/selenium-webdriver/testing/index.js
@@ -41,16 +41,14 @@
* The provided wrappers leverage the {@link webdriver.promise.ControlFlow}
* to simplify writing asynchronous tests:
*
- * var By = require('selenium-webdriver').By,
- * until = require('selenium-webdriver').until,
- * firefox = require('selenium-webdriver/firefox'),
- * test = require('selenium-webdriver/testing');
+ * var {Builder, By, until} = require('selenium-webdriver');
+ * var test = require('selenium-webdriver/testing');
*
* test.describe('Google Search', function() {
* var driver;
*
* test.before(function() {
- * driver = new firefox.Driver();
+ * driver = new Builder().forBrowser('firefox').build();
* });
*
* test.after(function() {
@@ -293,6 +291,19 @@ exports.describe = function(name, opt_fn) {
/**
+ * An alias for {@link #describe()} that marks the suite as exclusive,
+ * suppressing all other test suites.
+ * @param {string} name The suite name.
+ * @param {function()=} opt_fn The suite function, or `undefined` to define
+ * a pending test suite.
+ */
+exports.describe.only = function(name, opt_fn) {
+ let desc = getMochaGlobal('describe');
+ return opt_fn ? desc.only(name, opt_fn) : desc.only(name);
+};
+
+
+/**
* Defines a suppressed test suite.
* @param {string} name The suite name.
* @param {function()=} opt_fn The suite function, or `undefined` to define
diff --git a/node_modules/semver/.npmignore b/node_modules/semver/.npmignore
deleted file mode 100644
index 534108e3f..000000000
--- a/node_modules/semver/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules/
-coverage/
-.nyc_output/
-nyc_output/
diff --git a/node_modules/semver/.travis.yml b/node_modules/semver/.travis.yml
deleted file mode 100644
index 991d04b6e..000000000
--- a/node_modules/semver/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - 'iojs'
diff --git a/node_modules/semver/Makefile b/node_modules/semver/Makefile
deleted file mode 100644
index 71af0e975..000000000
--- a/node_modules/semver/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-files = semver.browser.js \
- semver.min.js \
- semver.browser.js.gz \
- semver.min.js.gz
-
-all: $(files)
-
-clean:
- rm -f $(files)
-
-semver.browser.js: head.js.txt semver.js foot.js.txt
- ( cat head.js.txt; \
- cat semver.js | \
- egrep -v '^ *\/\* nomin \*\/' | \
- perl -pi -e 's/debug\([^\)]+\)//g'; \
- cat foot.js.txt ) > semver.browser.js
-
-semver.min.js: semver.browser.js
- uglifyjs -m <semver.browser.js >semver.min.js
-
-%.gz: %
- gzip --stdout -9 <$< >$@
-
-.PHONY: all clean
diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md
index b5e35ff0b..cbd956549 100644
--- a/node_modules/semver/README.md
+++ b/node_modules/semver/README.md
@@ -4,6 +4,8 @@ semver(1) -- The semantic versioner for npm
## Usage
$ npm install semver
+ $ node
+ var semver = require('semver')
semver.valid('1.2.3') // '1.2.3'
semver.valid('a.b.c') // null
@@ -16,18 +18,35 @@ As a command-line utility:
$ semver -h
- Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
- Test if version(s) satisfy the supplied range(s), and sort them.
+ SemVer 5.1.0
- Multiple versions or ranges may be supplied, unless increment
- option is specified. In that case, only a single version may
- be used, and it is incremented by the specified level
+ A JavaScript implementation of the http://semver.org/ specification
+ Copyright Isaac Z. Schlueter
+
+ Usage: semver [options] <version> [<version> [...]]
+ Prints valid versions sorted by SemVer precedence
+
+ Options:
+ -r --range <range>
+ Print versions that match the specified range.
+
+ -i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+ --preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+ -l --loose
+ Interpret versions and ranges loosely
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
- If no versions are valid, or ranges are not satisfied,
- then exits failure.
+ If no satisfying versions are found, then exits failure.
Versions are printed in ascending order, so supplying
multiple versions to the utility will just sort them.
@@ -107,7 +126,7 @@ The method `.inc` takes an additional `identifier` string argument that
will append the value of the string as a prerelease identifier:
```javascript
-> semver.inc('1.2.3', 'pre', 'beta')
+> semver.inc('1.2.3', 'prerelease', 'beta')
'1.2.4-beta.0'
```
@@ -228,6 +247,30 @@ zero.
* `^1.x` := `>=1.0.0 <2.0.0`
* `^0.x` := `>=0.0.0 <1.0.0`
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
## Functions
All methods and classes take a final `loose` boolean argument that, if
@@ -248,6 +291,8 @@ strings that they parse.
same as `prepatch`. It increments the patch version, then makes a
prerelease. If the input version is already a prerelease it simply
increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
* `major(v)`: Return the major version number.
* `minor(v)`: Return the minor version number.
* `patch(v)`: Return the patch version number.
@@ -282,6 +327,8 @@ strings that they parse.
range.
* `maxSatisfying(versions, range)`: Return the highest version in the list
that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
* `gtr(version, range)`: Return `true` if version is greater than all the
versions possible in the range.
* `ltr(version, range)`: Return `true` if version is less than all the
diff --git a/node_modules/semver/foot.js.txt b/node_modules/semver/foot.js.txt
deleted file mode 100644
index 8f83c20f8..000000000
--- a/node_modules/semver/foot.js.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-})(
- typeof exports === 'object' ? exports :
- typeof define === 'function' && define.amd ? {} :
- semver = {}
-);
diff --git a/node_modules/semver/head.js.txt b/node_modules/semver/head.js.txt
deleted file mode 100644
index 653686517..000000000
--- a/node_modules/semver/head.js.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-;(function(exports) {
-
diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json
index fff26bd8c..ec9b01643 100644
--- a/node_modules/semver/package.json
+++ b/node_modules/semver/package.json
@@ -1,21 +1,22 @@
{
"name": "semver",
- "version": "4.3.6",
+ "version": "5.3.0",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
- "browser": "semver.browser.js",
- "min": "semver.min.js",
"scripts": {
- "test": "tap test/*.js",
- "prepublish": "make"
+ "test": "tap test/*.js"
},
"devDependencies": {
- "tap": "^1.2.0",
- "uglify-js": "~2.3.6"
+ "tap": "^2.0.0"
},
"license": "ISC",
- "repository": "git://github.com/npm/node-semver.git",
+ "repository": "https://github.com/npm/node-semver",
"bin": {
"semver": "./bin/semver"
- }
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ]
}
diff --git a/node_modules/semver/semver.browser.js b/node_modules/semver/semver.browser.js
deleted file mode 100644
index 4b0cfecf2..000000000
--- a/node_modules/semver/semver.browser.js
+++ /dev/null
@@ -1,1201 +0,0 @@
-;(function(exports) {
-
-// export the class if we are in a Node-like system.
-if (typeof module === 'object' && module.exports === exports)
- exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- ;
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- ;
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.inspect = function() {
- return '<SemVer "' + this + '">';
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- ;
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- ;
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- ;
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- ;
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.inspect = function() {
- return '<SemVer Comparator "' + this + '">';
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- ;
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.inspect = function() {
- return '<SemVer Range "' + this.range + '">';
-};
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- ;
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- ;
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- ;
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- ;
- comp = replaceCarets(comp, loose);
- ;
- comp = replaceTildes(comp, loose);
- ;
- comp = replaceXRanges(comp, loose);
- ;
- comp = replaceStars(comp, loose);
- ;
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- ;
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0- <1.3.0-
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- ;
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- ;
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- ;
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- ;
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- ;
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- ;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- ;
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- ;
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- ;
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm)
- M = +M + 1
- else
- m = +m + 1
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- ;
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- ;
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- ;
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
-
-// Use the define() function if we're in AMD land
-if (typeof define === 'function' && define.amd)
- define(exports);
-
-})(
- typeof exports === 'object' ? exports :
- typeof define === 'function' && define.amd ? {} :
- semver = {}
-);
diff --git a/node_modules/semver/semver.browser.js.gz b/node_modules/semver/semver.browser.js.gz
deleted file mode 100644
index d67009d8a..000000000
--- a/node_modules/semver/semver.browser.js.gz
+++ /dev/null
Binary files differ
diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js
index cafcc006b..5f1a3c5c9 100644
--- a/node_modules/semver/semver.js
+++ b/node_modules/semver/semver.js
@@ -1,6 +1,4 @@
-// export the class if we are in a Node-like system.
-if (typeof module === 'object' && module.exports === exports)
- exports = module.exports = SemVer;
+exports = module.exports = SemVer;
// The debug function is excluded entirely from the minified version.
/* nomin */ var debug;
@@ -316,9 +314,9 @@ function SemVer(version, loose) {
else
this.prerelease = m[4].split('.').map(function(id) {
if (/^[0-9]+$/.test(id)) {
- var num = +id
+ var num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num
+ return num;
}
return id;
});
@@ -334,10 +332,6 @@ SemVer.prototype.format = function() {
return this.version;
};
-SemVer.prototype.inspect = function() {
- return '<SemVer "' + this + '">';
-};
-
SemVer.prototype.toString = function() {
return this.version;
};
@@ -483,6 +477,7 @@ SemVer.prototype.inc = function(release, identifier) {
throw new Error('invalid increment argument: ' + release);
}
this.format();
+ this.raw = this.version;
return this;
};
@@ -693,10 +688,6 @@ Comparator.prototype.parse = function(comp) {
this.semver = new SemVer(m[2], this.loose);
};
-Comparator.prototype.inspect = function() {
- return '<SemVer Comparator "' + this + '">';
-};
-
Comparator.prototype.toString = function() {
return this.value;
};
@@ -740,10 +731,6 @@ function Range(range, loose) {
this.format();
}
-Range.prototype.inspect = function() {
- return '<SemVer Range "' + this.range + '">';
-};
-
Range.prototype.format = function() {
this.range = this.set.map(function(comps) {
return comps.join(' ').trim();
@@ -849,7 +836,7 @@ function replaceTilde(comp, loose) {
else if (isX(m))
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
else if (isX(p))
- // ~1.2 == >=1.2.0- <1.3.0-
+ // ~1.2 == >=1.2.0 <1.3.0
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
else if (pr) {
debug('replaceTilde pr', pr);
@@ -979,11 +966,11 @@ function replaceXRange(comp, loose) {
} else if (gtlt === '<=') {
// <=0.7.x is actually <0.8.0, since any 0.7.x should
// pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
+ gtlt = '<';
if (xm)
- M = +M + 1
+ M = +M + 1;
else
- m = +m + 1
+ m = +m + 1;
}
ret = gtlt + M + '.' + m + '.' + p;
@@ -1107,6 +1094,15 @@ function maxSatisfying(versions, range, loose) {
})[0] || null;
}
+exports.minSatisfying = minSatisfying;
+function minSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return compare(a, b, loose);
+ })[0] || null;
+}
+
exports.validRange = validRange;
function validRange(range, loose) {
try {
@@ -1200,6 +1196,8 @@ function outside(version, range, hilo, loose) {
return true;
}
-// Use the define() function if we're in AMD land
-if (typeof define === 'function' && define.amd)
- define(exports);
+exports.prerelease = prerelease;
+function prerelease(version, loose) {
+ var parsed = parse(version, loose);
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
+}
diff --git a/node_modules/semver/semver.min.js b/node_modules/semver/semver.min.js
deleted file mode 100644
index dea027b11..000000000
--- a/node_modules/semver/semver.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=K;e.SEMVER_SPEC_VERSION="2.0.0";var r=256;var t=Number.MAX_SAFE_INTEGER||9007199254740991;var n=e.re=[];var i=e.src=[];var s=0;var o=s++;i[o]="0|[1-9]\\d*";var a=s++;i[a]="[0-9]+";var f=s++;i[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;i[u]="("+i[o]+")\\."+"("+i[o]+")\\."+"("+i[o]+")";var l=s++;i[l]="("+i[a]+")\\."+"("+i[a]+")\\."+"("+i[a]+")";var p=s++;i[p]="(?:"+i[o]+"|"+i[f]+")";var c=s++;i[c]="(?:"+i[a]+"|"+i[f]+")";var h=s++;i[h]="(?:-("+i[p]+"(?:\\."+i[p]+")*))";var v=s++;i[v]="(?:-?("+i[c]+"(?:\\."+i[c]+")*))";var m=s++;i[m]="[0-9A-Za-z-]+";var g=s++;i[g]="(?:\\+("+i[m]+"(?:\\."+i[m]+")*))";var w=s++;var y="v?"+i[u]+i[h]+"?"+i[g]+"?";i[w]="^"+y+"$";var d="[v=\\s]*"+i[l]+i[v]+"?"+i[g]+"?";var j=s++;i[j]="^"+d+"$";var b=s++;i[b]="((?:<|>)?=?)";var E=s++;i[E]=i[a]+"|x|X|\\*";var $=s++;i[$]=i[o]+"|x|X|\\*";var k=s++;i[k]="[v=\\s]*("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:"+i[h]+")?"+i[g]+"?"+")?)?";var R=s++;i[R]="[v=\\s]*("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:"+i[v]+")?"+i[g]+"?"+")?)?";var S=s++;i[S]="^"+i[b]+"\\s*"+i[k]+"$";var x=s++;i[x]="^"+i[b]+"\\s*"+i[R]+"$";var I=s++;i[I]="(?:~>?)";var T=s++;i[T]="(\\s*)"+i[I]+"\\s+";n[T]=new RegExp(i[T],"g");var V="$1~";var A=s++;i[A]="^"+i[I]+i[k]+"$";var C=s++;i[C]="^"+i[I]+i[R]+"$";var M=s++;i[M]="(?:\\^)";var N=s++;i[N]="(\\s*)"+i[M]+"\\s+";n[N]=new RegExp(i[N],"g");var _="$1^";var z=s++;i[z]="^"+i[M]+i[k]+"$";var P=s++;i[P]="^"+i[M]+i[R]+"$";var X=s++;i[X]="^"+i[b]+"\\s*("+d+")$|^$";var Z=s++;i[Z]="^"+i[b]+"\\s*("+y+")$|^$";var q=s++;i[q]="(\\s*)"+i[b]+"\\s*("+d+"|"+i[k]+")";n[q]=new RegExp(i[q],"g");var L="$1$2$3";var F=s++;i[F]="^\\s*("+i[k]+")"+"\\s+-\\s+"+"("+i[k]+")"+"\\s*$";var G=s++;i[G]="^\\s*("+i[R]+")"+"\\s+-\\s+"+"("+i[R]+")"+"\\s*$";var O=s++;i[O]="(<|>)?=?\\s*\\*";for(var B=0;B<s;B++){if(!n[B])n[B]=new RegExp(i[B])}e.parse=D;function D(e,t){if(e instanceof K)return e;if(typeof e!=="string")return null;if(e.length>r)return null;var i=t?n[j]:n[w];if(!i.test(e))return null;try{return new K(e,t)}catch(s){return null}}e.valid=H;function H(e,r){var t=D(e,r);return t?t.version:null}e.clean=J;function J(e,r){var t=D(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}e.SemVer=K;function K(e,i){if(e instanceof K){if(e.loose===i)return e;else e=e.version}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof K))return new K(e,i);this.loose=i;var s=e.trim().match(i?n[j]:n[w]);if(!s)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r<t)return r}return e});this.build=s[5]?s[5].split("."):[];this.format()}K.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};K.prototype.inspect=function(){return'<SemVer "'+this+'">'};K.prototype.toString=function(){return this.version};K.prototype.compare=function(e){if(!(e instanceof K))e=new K(e,this.loose);return this.compareMain(e)||this.comparePre(e)};K.prototype.compareMain=function(e){if(!(e instanceof K))e=new K(e,this.loose);return Y(this.major,e.major)||Y(this.minor,e.minor)||Y(this.patch,e.patch)};K.prototype.comparePre=function(e){if(!(e instanceof K))e=new K(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Y(t,n)}while(++r)};K.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=Q;function Q(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new K(e,t).inc(r,n).version}catch(i){return null}}e.diff=U;function U(e,r){if(pr(e,r)){return null}else{var t=D(e);var n=D(r);if(t.prerelease.length||n.prerelease.length){for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return"pre"+i}}}return"prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return i}}}}}e.compareIdentifiers=Y;var W=/^[0-9]+$/;function Y(e,r){var t=W.test(e);var n=W.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=er;function er(e,r){return Y(r,e)}e.major=rr;function rr(e,r){return new K(e,r).major}e.minor=tr;function tr(e,r){return new K(e,r).minor}e.patch=nr;function nr(e,r){return new K(e,r).patch}e.compare=ir;function ir(e,r,t){return new K(e,t).compare(r)}e.compareLoose=sr;function sr(e,r){return ir(e,r,true)}e.rcompare=or;function or(e,r,t){return ir(r,e,t)}e.sort=ar;function ar(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=fr;function fr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=ur;function ur(e,r,t){return ir(e,r,t)>0}e.lt=lr;function lr(e,r,t){return ir(e,r,t)<0}e.eq=pr;function pr(e,r,t){return ir(e,r,t)===0}e.neq=cr;function cr(e,r,t){return ir(e,r,t)!==0}e.gte=hr;function hr(e,r,t){return ir(e,r,t)>=0}e.lte=vr;function vr(e,r,t){return ir(e,r,t)<=0}e.cmp=mr;function mr(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=pr(e,t,n);break;case"!=":i=cr(e,t,n);break;case">":i=ur(e,t,n);break;case">=":i=hr(e,t,n);break;case"<":i=lr(e,t,n);break;case"<=":i=vr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=gr;function gr(e,r){if(e instanceof gr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof gr))return new gr(e,r);this.loose=r;this.parse(e);if(this.semver===wr)this.value="";else this.value=this.operator+this.semver.version}var wr={};gr.prototype.parse=function(e){var r=this.loose?n[X]:n[Z];var t=e.match(r);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=t[1];if(this.operator==="=")this.operator="";if(!t[2])this.semver=wr;else this.semver=new K(t[2],this.loose)};gr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};gr.prototype.toString=function(){return this.value};gr.prototype.test=function(e){if(this.semver===wr)return true;if(typeof e==="string")e=new K(e,this.loose);return mr(e,this.operator,this.semver,this.loose)};e.Range=yr;function yr(e,r){if(e instanceof yr&&e.loose===r)return e;if(!(this instanceof yr))return new yr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}yr.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};yr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};yr.prototype.toString=function(){return this.range};yr.prototype.parseRange=function(e){var r=this.loose;e=e.trim();var t=r?n[G]:n[F];e=e.replace(t,Tr);e=e.replace(n[q],L);e=e.replace(n[T],V);e=e.replace(n[N],_);e=e.split(/\s+/).join(" ");var i=r?n[X]:n[Z];var s=e.split(" ").map(function(e){return jr(e,r)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new gr(e,r)});return s};e.toComparators=dr;function dr(e,r){return new yr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function jr(e,r){e=kr(e,r);e=Er(e,r);e=Sr(e,r);e=Ir(e,r);return e}function br(e){return!e||e.toLowerCase()==="x"||e==="*"}function Er(e,r){return e.trim().split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,r){var t=r?n[C]:n[A];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function kr(e,r){return e.trim().split(/\s+/).map(function(e){return Rr(e,r)}).join(" ")}function Rr(e,r){var t=r?n[P]:n[z];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function Sr(e,r){return e.split(/\s+/).map(function(e){return xr(e,r)}).join(" ")}function xr(e,r){e=e.trim();var t=r?n[x]:n[S];return e.replace(t,function(e,r,t,n,i,s){var o=br(t);var a=o||br(n);var f=a||br(i);var u=f;if(r==="="&&u)r="";if(o){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(a)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(a){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function Ir(e,r){return e.trim().replace(n[O],"")}function Tr(e,r,t,n,i,s,o,a,f,u,l,p,c){if(br(t))r="";else if(br(n))r=">="+t+".0.0";else if(br(i))r=">="+t+"."+n+".0";else r=">="+r;if(br(f))a="";else if(br(u))a="<"+(+f+1)+".0.0";else if(br(l))a="<"+f+"."+(+u+1)+".0";else if(p)a="<="+f+"."+u+"."+l+"-"+p;else a="<="+a;return(r+" "+a).trim()}yr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new K(e,this.loose);for(var r=0;r<this.set.length;r++){if(Vr(this.set[r],e))return true}return false};function Vr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}if(r.prerelease.length){for(var t=0;t<e.length;t++){if(e[t].semver===wr)continue;if(e[t].semver.prerelease.length>0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=Ar;function Ar(e,r,t){try{r=new yr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Cr;function Cr(e,r,t){return e.filter(function(e){return Ar(e,r,t)}).sort(function(e,r){return or(e,r,t)})[0]||null}e.validRange=Mr;function Mr(e,r){try{return new yr(e,r).range||"*"}catch(t){return null}}e.ltr=Nr;function Nr(e,r,t){return zr(e,r,"<",t)}e.gtr=_r;function _r(e,r,t){return zr(e,r,">",t)}e.outside=zr;function zr(e,r,t,n){e=new K(e,n);r=new yr(r,n);var i,s,o,a,f;switch(t){case">":i=ur;s=vr;o=lr;a=">";f=">=";break;case"<":i=lr;s=hr;o=ur;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ar(e,r,n)){return false}for(var u=0;u<r.set.length;++u){var l=r.set[u];var p=null;var c=null;l.forEach(function(e){if(e.semver===wr){e=new gr(">=0.0.0")}p=p||e;c=c||e;if(i(e.semver,p.semver,n)){p=e}else if(o(e.semver,c.semver,n)){c=e}});if(p.operator===a||p.operator===f){return false}if((!c.operator||c.operator===a)&&s(e,c.semver)){return false}else if(c.operator===f&&o(e,c.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(e)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={}); \ No newline at end of file
diff --git a/node_modules/semver/semver.min.js.gz b/node_modules/semver/semver.min.js.gz
deleted file mode 100644
index cbbc16188..000000000
--- a/node_modules/semver/semver.min.js.gz
+++ /dev/null
Binary files differ
diff --git a/node_modules/semver/test/amd.js b/node_modules/semver/test/amd.js
deleted file mode 100644
index a6041341b..000000000
--- a/node_modules/semver/test/amd.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-
-test('amd', function(t) {
- global.define = define;
- define.amd = true;
- var defined = null;
- function define(stuff) {
- defined = stuff;
- }
- var fromRequire = require('../');
- t.ok(defined, 'amd function called');
- t.equal(fromRequire, defined, 'amd stuff same as require stuff');
- t.end();
-});
diff --git a/node_modules/semver/test/big-numbers.js b/node_modules/semver/test/big-numbers.js
deleted file mode 100644
index c051864bc..000000000
--- a/node_modules/semver/test/big-numbers.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tap').test
-var semver = require('../')
-
-test('long version is too long', function (t) {
- var v = '1.2.' + new Array(256).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('big number is like too long version', function (t) {
- var v = '1.2.' + new Array(100).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('parsing null does not throw', function (t) {
- t.equal(semver.parse(null), null)
- t.equal(semver.parse({}), null)
- t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
- t.end()
-})
diff --git a/node_modules/semver/test/clean.js b/node_modules/semver/test/clean.js
deleted file mode 100644
index 9e268de95..000000000
--- a/node_modules/semver/test/clean.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var clean = semver.clean;
-
-test('\nclean tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', '1.2.3'],
- [' 1.2.3 ', '1.2.3'],
- [' 1.2.3-4 ', '1.2.3-4'],
- [' 1.2.3-pre ', '1.2.3-pre'],
- [' =v1.2.3 ', '1.2.3'],
- ['v1.2.3', '1.2.3'],
- [' v1.2.3 ', '1.2.3'],
- ['\t1.2.3', '1.2.3'],
- ['>1.2.3', null],
- ['~1.2.3', null],
- ['<=1.2.3', null],
- ['1.2.x', null]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var msg = 'clean(' + range + ') = ' + version;
- t.equal(clean(range), version, msg);
- });
- t.end();
-});
diff --git a/node_modules/semver/test/gtr.js b/node_modules/semver/test/gtr.js
deleted file mode 100644
index bbb87896c..000000000
--- a/node_modules/semver/test/gtr.js
+++ /dev/null
@@ -1,173 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var gtr = semver.gtr;
-
-test('\ngtr tests', function(t) {
- // [range, version, loose]
- // Version should be greater than range
- [
- ['~1.2.2', '1.3.0'],
- ['~0.6.1-1', '0.7.1-1'],
- ['1.0.0 - 2.0.0', '2.0.1'],
- ['1.0.0', '1.0.1-beta1'],
- ['1.0.0', '2.0.0'],
- ['<=2.0.0', '2.1.1'],
- ['<=2.0.0', '3.2.9'],
- ['<2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '1.2.5'],
- ['2.x.x', '3.0.0'],
- ['1.2.x', '1.3.0'],
- ['1.2.x || 2.x', '3.0.0'],
- ['2.*.*', '5.0.1'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '4.0.0'],
- ['2', '3.0.0'],
- ['2.3', '2.4.2'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.5.5'],
- ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.4'],
- ['~> 1', '3.2.3'],
- ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.1.0'],
- ['<1.2', '1.2.0'],
- ['< 1.2', '1.2.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-pre', '0.6.0'],
- ['~v0.5.4-pre', '0.6.1-pre'],
- ['=0.7.x', '0.8.0'],
- ['=0.7.x', '0.8.0-asdf'],
- ['<0.7.x', '0.7.0'],
- ['~1.2.2', '1.3.0'],
- ['1.0.0 - 2.0.0', '2.2.3'],
- ['1.0.0', '1.0.1'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['2', '3.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['1', '2.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['=0.7.x', '0.8.2'],
- ['<0.7.x', '0.7.2']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(gtr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative gtr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be greater than range
- [
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '0.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['*', 'v1.2.3-foo'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['1', '1.0.0beta', true],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^1', '0.0.0-0'],
- ['^3.0.0', '2.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(gtr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/node_modules/semver/test/index.js b/node_modules/semver/test/index.js
deleted file mode 100644
index c256c7947..000000000
--- a/node_modules/semver/test/index.js
+++ /dev/null
@@ -1,685 +0,0 @@
-'use strict';
-
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var eq = semver.eq;
-var gt = semver.gt;
-var lt = semver.lt;
-var neq = semver.neq;
-var cmp = semver.cmp;
-var gte = semver.gte;
-var lte = semver.lte;
-var satisfies = semver.satisfies;
-var validRange = semver.validRange;
-var inc = semver.inc;
-var diff = semver.diff;
-var replaceStars = semver.replaceStars;
-var toComparators = semver.toComparators;
-var SemVer = semver.SemVer;
-var Range = semver.Range;
-
-test('\ncomparison tests', function(t) {
- // [version1, version2]
- // version1 should be greater than version2
- [['0.0.0', '0.0.0-foo'],
- ['0.0.1', '0.0.0'],
- ['1.0.0', '0.9.9'],
- ['0.10.0', '0.9.0'],
- ['0.99.0', '0.10.0'],
- ['2.0.0', '1.2.3'],
- ['v0.0.0', '0.0.0-foo', true],
- ['v0.0.1', '0.0.0', true],
- ['v1.0.0', '0.9.9', true],
- ['v0.10.0', '0.9.0', true],
- ['v0.99.0', '0.10.0', true],
- ['v2.0.0', '1.2.3', true],
- ['0.0.0', 'v0.0.0-foo', true],
- ['0.0.1', 'v0.0.0', true],
- ['1.0.0', 'v0.9.9', true],
- ['0.10.0', 'v0.9.0', true],
- ['0.99.0', 'v0.10.0', true],
- ['2.0.0', 'v1.2.3', true],
- ['1.2.3', '1.2.3-asdf'],
- ['1.2.3', '1.2.3-4'],
- ['1.2.3', '1.2.3-4-foo'],
- ['1.2.3-5-foo', '1.2.3-5'],
- ['1.2.3-5', '1.2.3-4'],
- ['1.2.3-5-foo', '1.2.3-5-Foo'],
- ['3.0.0', '2.7.2+asdf'],
- ['1.2.3-a.10', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a'],
- ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
- ['1.2.3-r2', '1.2.3-r100'],
- ['1.2.3-r100', '1.2.3-R2']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
- t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
- t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
- t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
- t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
- t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
- t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
- t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
- });
- t.end();
-});
-
-test('\nequality tests', function(t) {
- // [version1, version2]
- // version1 should be equivalent to version2
- [['1.2.3', 'v1.2.3', true],
- ['1.2.3', '=1.2.3', true],
- ['1.2.3', 'v 1.2.3', true],
- ['1.2.3', '= 1.2.3', true],
- ['1.2.3', ' v1.2.3', true],
- ['1.2.3', ' =1.2.3', true],
- ['1.2.3', ' v 1.2.3', true],
- ['1.2.3', ' = 1.2.3', true],
- ['1.2.3-0', 'v1.2.3-0', true],
- ['1.2.3-0', '=1.2.3-0', true],
- ['1.2.3-0', 'v 1.2.3-0', true],
- ['1.2.3-0', '= 1.2.3-0', true],
- ['1.2.3-0', ' v1.2.3-0', true],
- ['1.2.3-0', ' =1.2.3-0', true],
- ['1.2.3-0', ' v 1.2.3-0', true],
- ['1.2.3-0', ' = 1.2.3-0', true],
- ['1.2.3-1', 'v1.2.3-1', true],
- ['1.2.3-1', '=1.2.3-1', true],
- ['1.2.3-1', 'v 1.2.3-1', true],
- ['1.2.3-1', '= 1.2.3-1', true],
- ['1.2.3-1', ' v1.2.3-1', true],
- ['1.2.3-1', ' =1.2.3-1', true],
- ['1.2.3-1', ' v 1.2.3-1', true],
- ['1.2.3-1', ' = 1.2.3-1', true],
- ['1.2.3-beta', 'v1.2.3-beta', true],
- ['1.2.3-beta', '=1.2.3-beta', true],
- ['1.2.3-beta', 'v 1.2.3-beta', true],
- ['1.2.3-beta', '= 1.2.3-beta', true],
- ['1.2.3-beta', ' v1.2.3-beta', true],
- ['1.2.3-beta', ' =1.2.3-beta', true],
- ['1.2.3-beta', ' v 1.2.3-beta', true],
- ['1.2.3-beta', ' = 1.2.3-beta', true],
- ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
- ['1.2.3+build', ' = 1.2.3+otherbuild', true],
- ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
- ['1.2.3+build', '1.2.3+otherbuild'],
- [' v1.2.3+build', '1.2.3+otherbuild']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
- t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
- t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
- t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
- t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
- t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
- t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
- });
- t.end();
-});
-
-
-test('\nrange tests', function(t) {
- // [range, version]
- // version should be included by range
- [['1.0.0 - 2.0.0', '1.2.3'],
- ['^1.2.3+build', '1.2.3'],
- ['^1.2.3+build', '1.3.0'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
- ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0'],
- ['*', '1.2.3'],
- ['*', 'v1.2.3', true],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97', true],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
- ['~ 1.0', '1.0.2'],
- ['~ 1.0.3', '1.0.12'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['~1.2.1 >=1.2.3', '1.2.3'],
- ['~1.2.1 =1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['>=1.2.1 1.2.3', '1.2.3'],
- ['1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.1 >=1.2.3', '1.2.3'],
- ['>=1.2', '1.2.8'],
- ['^1.2.3', '1.8.1'],
- ['^0.1.2', '0.1.2'],
- ['^0.1', '0.1.2'],
- ['^1.2', '1.4.2'],
- ['^1.2 ^1', '1.4.2'],
- ['^1.2.3-alpha', '1.2.3-pre'],
- ['^1.2.0-alpha', '1.2.0-pre'],
- ['^0.0.1-alpha', '0.0.1-beta']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
- });
- t.end();
-});
-
-test('\nnegative range tests', function(t) {
- // [range, version]
- // version should not be included by range
- [['1.0.0 - 2.0.0', '2.2.3'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
- ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
- ['^1.2.3+build', '2.0.0'],
- ['^1.2.3+build', '1.2.0'],
- ['^1.2.3', '1.2.3-pre'],
- ['^1.2', '1.2.0-pre'],
- ['>1.2', '1.3.0-beta'],
- ['<=1.2.3', '1.2.3-beta'],
- ['^1.2.3', '1.2.3-beta'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['1.0.0', '1.0.1'],
- ['>=1.0.0', '0.0.0'],
- ['>=1.0.0', '0.0.1'],
- ['>=1.0.0', '0.1.0'],
- ['>1.0.0', '0.0.1'],
- ['>1.0.0', '0.1.0'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['>=0.1.97', 'v0.1.93', true],
- ['>=0.1.97', '0.1.93'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['>=0.2.3 || <0.0.1', '0.0.3'],
- ['>=0.2.3 || <0.0.1', '0.2.2'],
- ['2.x.x', '1.1.3'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.9'],
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['>=1.2', '1.1.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-beta', '0.5.4-alpha'],
- ['=0.7.x', '0.8.2'],
- ['>=0.7.x', '0.6.2'],
- ['<0.7.x', '0.7.2'],
- ['<1.2.3', '1.2.3-beta'],
- ['=1.2.3', '1.2.3-beta'],
- ['>1.2', '1.2.8'],
- ['^1.2.3', '2.0.0-alpha'],
- ['^1.2.3', '1.2.2'],
- ['^1.2', '1.1.9'],
- ['*', 'v1.2.3-foo', true],
- // invalid ranges never satisfied!
- ['blerg', '1.2.3'],
- ['git+https://user:password0123@github.com/foo', '123.0.0', true],
- ['^1.2.3', '2.0.0-pre']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- var found = satisfies(ver, range, loose);
- t.ok(!found, ver + ' not satisfied by ' + range);
- });
- t.end();
-});
-
-test('\nincrement versions test', function(t) {
-// [version, inc, result, identifier]
-// inc(version, inc) -> result
- [['1.2.3', 'major', '2.0.0'],
- ['1.2.3', 'minor', '1.3.0'],
- ['1.2.3', 'patch', '1.2.4'],
- ['1.2.3tag', 'major', '2.0.0', true],
- ['1.2.3-tag', 'major', '2.0.0'],
- ['1.2.3', 'fake', null],
- ['1.2.0-0', 'patch', '1.2.0'],
- ['fake', 'major', null],
- ['1.2.3-4', 'major', '2.0.0'],
- ['1.2.3-4', 'minor', '1.3.0'],
- ['1.2.3-4', 'patch', '1.2.3'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
- ['1.2.4', 'prerelease', '1.2.5-0'],
- ['1.2.3-0', 'prerelease', '1.2.3-1'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
- ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
- ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
- ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
- ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
- ['1.2.0', 'prepatch', '1.2.1-0'],
- ['1.2.0-1', 'prepatch', '1.2.1-0'],
- ['1.2.0', 'preminor', '1.3.0-0'],
- ['1.2.3-1', 'preminor', '1.3.0-0'],
- ['1.2.0', 'premajor', '2.0.0-0'],
- ['1.2.3-1', 'premajor', '2.0.0-0'],
- ['1.2.0-1', 'minor', '1.2.0'],
- ['1.0.0-1', 'major', '1.0.0'],
-
- ['1.2.3', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3', 'patch', '1.2.4', false, 'dev'],
- ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
- ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'fake', null, false, 'dev'],
- ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
- ['fake', 'major', null, false, 'dev'],
- ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
- ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
- ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
- ['1.2.0', 'prepatch', '1.2.1-dev.0', 'dev'],
- ['1.2.0-1', 'prepatch', '1.2.1-dev.0', 'dev'],
- ['1.2.0', 'preminor', '1.3.0-dev.0', 'dev'],
- ['1.2.3-1', 'preminor', '1.3.0-dev.0', 'dev'],
- ['1.2.0', 'premajor', '2.0.0-dev.0', 'dev'],
- ['1.2.3-1', 'premajor', '2.0.0-dev.0', 'dev'],
- ['1.2.0-1', 'minor', '1.2.0', 'dev'],
- ['1.0.0-1', 'major', '1.0.0', 'dev'],
- ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
-
- ].forEach(function(v) {
- var pre = v[0];
- var what = v[1];
- var wanted = v[2];
- var loose = v[3];
- var id = v[4];
- var found = inc(pre, what, loose, id);
- var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
- });
-
- t.end();
-});
-
-test('\ndiff versions test', function(t) {
-// [version1, version2, result]
-// diff(version1, version2) -> result
- [['1.2.3', '0.2.3', 'major'],
- ['1.4.5', '0.2.3', 'major'],
- ['1.2.3', '2.0.0-pre', 'premajor'],
- ['1.2.3', '1.3.3', 'minor'],
- ['1.0.1', '1.1.0-pre', 'preminor'],
- ['1.2.3', '1.2.4', 'patch'],
- ['1.2.3', '1.2.4-pre', 'prepatch'],
- ['0.0.1', '0.0.1-pre', 'prerelease'],
- ['0.0.1', '0.0.1-pre-2', 'prerelease'],
- ['1.1.0', '1.1.0-pre', 'prerelease'],
- ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
- ['1.0.0', '1.0.0', null]
-
- ].forEach(function(v) {
- var version1 = v[0];
- var version2 = v[1];
- var wanted = v[2];
- var found = diff(version1, version2);
- var cmd = 'diff(' + version1 + ', ' + version2 + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
- });
-
- t.end();
-});
-
-test('\nvalid range test', function(t) {
- // [range, result]
- // validRange(range) -> result
- // translate ranges into their canonical form
- [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
- ['1.0.0', '1.0.0'],
- ['>=*', '*'],
- ['', '*'],
- ['*', '*'],
- ['*', '*'],
- ['>=1.0.0', '>=1.0.0'],
- ['>1.0.0', '>1.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['>=0.1.97', '>=0.1.97'],
- ['>=0.1.97', '>=0.1.97'],
- ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['||', '||'],
- ['2.x.x', '>=2.0.0 <3.0.0'],
- ['1.2.x', '>=1.2.0 <1.3.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['x', '*'],
- ['2.*.*', '>=2.0.0 <3.0.0'],
- ['1.2.*', '>=1.2.0 <1.3.0'],
- ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['*', '*'],
- ['2', '>=2.0.0 <3.0.0'],
- ['2.3', '>=2.3.0 <2.4.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~>3.2.1', '>=3.2.1 <3.3.0'],
- ['~1', '>=1.0.0 <2.0.0'],
- ['~>1', '>=1.0.0 <2.0.0'],
- ['~> 1', '>=1.0.0 <2.0.0'],
- ['~1.0', '>=1.0.0 <1.1.0'],
- ['~ 1.0', '>=1.0.0 <1.1.0'],
- ['^0', '>=0.0.0 <1.0.0'],
- ['^ 1', '>=1.0.0 <2.0.0'],
- ['^0.1', '>=0.1.0 <0.2.0'],
- ['^1.0', '>=1.0.0 <2.0.0'],
- ['^1.2', '>=1.2.0 <2.0.0'],
- ['^0.0.1', '>=0.0.1 <0.0.2'],
- ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
- ['^0.1.2', '>=0.1.2 <0.2.0'],
- ['^1.2.3', '>=1.2.3 <2.0.0'],
- ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
- ['<1', '<1.0.0'],
- ['< 1', '<1.0.0'],
- ['>=1', '>=1.0.0'],
- ['>= 1', '>=1.0.0'],
- ['<1.2', '<1.2.0'],
- ['< 1.2', '<1.2.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['>01.02.03', '>1.2.3', true],
- ['>01.02.03', null],
- ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
- ['~1.2.3beta', null],
- ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var loose = v[2];
- var found = validRange(pre, loose);
-
- t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
- });
-
- t.end();
-});
-
-test('\ncomparators test', function(t) {
- // [range, comparators]
- // turn range into a set of individual comparators
- [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
- ['1.0.0', [['1.0.0']]],
- ['>=*', [['']]],
- ['', [['']]],
- ['*', [['']]],
- ['*', [['']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['< 2.0.0', [['<2.0.0']]],
- ['<\t2.0.0', [['<2.0.0']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['||', [[''], ['']]],
- ['2.x.x', [['>=2.0.0', '<3.0.0']]],
- ['1.2.x', [['>=1.2.0', '<1.3.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['x', [['']]],
- ['2.*.*', [['>=2.0.0', '<3.0.0']]],
- ['1.2.*', [['>=1.2.0', '<1.3.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['*', [['']]],
- ['2', [['>=2.0.0', '<3.0.0']]],
- ['2.3', [['>=2.3.0', '<2.4.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
- ['~1', [['>=1.0.0', '<2.0.0']]],
- ['~>1', [['>=1.0.0', '<2.0.0']]],
- ['~> 1', [['>=1.0.0', '<2.0.0']]],
- ['~1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['<1', [['<1.0.0']]],
- ['< 1', [['<1.0.0']]],
- ['>=1', [['>=1.0.0']]],
- ['>= 1', [['>=1.0.0']]],
- ['<1.2', [['<1.2.0']]],
- ['< 1.2', [['<1.2.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
- ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
- ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
- ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
- ['>*', [['<0.0.0']]],
- ['<*', [['<0.0.0']]]
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var found = toComparators(v[0]);
- var jw = JSON.stringify(wanted);
- t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
- });
-
- t.end();
-});
-
-test('\ninvalid version numbers', function(t) {
- ['1.2.3.4',
- 'NOT VALID',
- 1.2,
- null,
- 'Infinity.NaN.Infinity'
- ].forEach(function(v) {
- t.throws(function() {
- new SemVer(v);
- }, {name:'TypeError', message:'Invalid Version: ' + v});
- });
-
- t.end();
-});
-
-test('\nstrict vs loose version numbers', function(t) {
- [['=1.2.3', '1.2.3'],
- ['01.02.03', '1.2.3'],
- ['1.2.3-beta.01', '1.2.3-beta.1'],
- [' =1.2.3', '1.2.3'],
- ['1.2.3foo', '1.2.3-foo']
- ].forEach(function(v) {
- var loose = v[0];
- var strict = v[1];
- t.throws(function() {
- new SemVer(loose);
- });
- var lv = new SemVer(loose, true);
- t.equal(lv.version, strict);
- t.ok(eq(loose, strict, true));
- t.throws(function() {
- eq(loose, strict);
- });
- t.throws(function() {
- new SemVer(strict).compare(loose);
- });
- });
- t.end();
-});
-
-test('\nstrict vs loose ranges', function(t) {
- [['>=01.02.03', '>=1.2.3'],
- ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
- ].forEach(function(v) {
- var loose = v[0];
- var comps = v[1];
- t.throws(function() {
- new Range(loose);
- });
- t.equal(new Range(loose, true).range, comps);
- });
- t.end();
-});
-
-test('\nmax satisfying', function(t) {
- [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
- [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
- [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
- [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
- ].forEach(function(v) {
- var versions = v[0];
- var range = v[1];
- var expect = v[2];
- var loose = v[3];
- var actual = semver.maxSatisfying(versions, range, loose);
- t.equal(actual, expect);
- });
- t.end();
-});
diff --git a/node_modules/semver/test/ltr.js b/node_modules/semver/test/ltr.js
deleted file mode 100644
index 0f7167d65..000000000
--- a/node_modules/semver/test/ltr.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var ltr = semver.ltr;
-
-test('\nltr tests', function(t) {
- // [range, version, loose]
- // Version should be less than range
- [
- ['~1.2.2', '1.2.1'],
- ['~0.6.1-1', '0.6.1-0'],
- ['1.0.0 - 2.0.0', '0.0.1'],
- ['1.0.0-beta.2', '1.0.0-beta.1'],
- ['1.0.0', '0.0.0'],
- ['>=2.0.0', '1.1.1'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '0.1.5'],
- ['2.x.x', '1.0.0'],
- ['1.2.x', '1.1.0'],
- ['1.2.x || 2.x', '1.0.0'],
- ['2.*.*', '1.0.1'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.9999'],
- ['2', '1.0.0'],
- ['2.3', '2.2.2'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.5'],
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.4'],
- ['~> 1', '0.2.3'],
- ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '0.1.0'],
- ['>1.2', '1.2.0'],
- ['> 1.2', '1.2.1'],
- ['1', '0.0.0beta', true],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['=0.7.x', '0.6.0'],
- ['=0.7.x', '0.6.0-asdf'],
- ['>=0.7.x', '0.6.0'],
- ['~1.2.2', '1.2.1'],
- ['1.0.0 - 2.0.0', '0.2.3'],
- ['1.0.0', '0.0.1'],
- ['>=2.0.0', '1.0.0'],
- ['>=2.0.0', '1.9999.9999'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['>2.0.0', '1.2.9'],
- ['2.x.x', '1.1.3'],
- ['1.2.x', '1.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.9999.9999'],
- ['2.3', '2.2.1'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.3'],
- ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
- ['>1', '1.0.0'],
- ['2', '1.0.0beta', true],
- ['>1', '1.0.0beta', true],
- ['> 1', '1.0.0beta', true],
- ['=0.7.x', '0.6.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['^1', '1.0.0-0'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['>=0.7.x', '0.6.2'],
- ['>1.2.3', '1.3.0-alpha']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(ltr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative ltr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be less than range
- [
- ['~ 1.0', '1.1.0'],
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '2.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^3.0.0', '4.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
- ['^1.0.0alpha', '1.0.0beta', true],
- ['~1.0.0alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0beta', true],
- ['~1.0.0-alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0-beta'],
- ['~1.0.0-alpha', '1.0.0-beta'],
- ['=0.1.0', '1.0.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(ltr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/node_modules/semver/test/major-minor-patch.js b/node_modules/semver/test/major-minor-patch.js
deleted file mode 100644
index e9d4039c8..000000000
--- a/node_modules/semver/test/major-minor-patch.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-
-test('\nmajor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', 1],
- [' 1.2.3 ', 1],
- [' 2.2.3-4 ', 2],
- [' 3.2.3-pre ', 3],
- ['v5.2.3', 5],
- [' v8.2.3 ', 8],
- ['\t13.2.3', 13],
- ['=21.2.3', 21, true],
- ['v=34.2.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'major(' + range + ') = ' + version;
- t.equal(semver.major(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\nminor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.1.3', 1],
- [' 1.1.3 ', 1],
- [' 1.2.3-4 ', 2],
- [' 1.3.3-pre ', 3],
- ['v1.5.3', 5],
- [' v1.8.3 ', 8],
- ['\t1.13.3', 13],
- ['=1.21.3', 21, true],
- ['v=1.34.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'minor(' + range + ') = ' + version;
- t.equal(semver.minor(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\npatch tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.1', 1],
- [' 1.2.1 ', 1],
- [' 1.2.2-4 ', 2],
- [' 1.2.3-pre ', 3],
- ['v1.2.5', 5],
- [' v1.2.8 ', 8],
- ['\t1.2.13', 13],
- ['=1.2.21', 21, true],
- ['v=1.2.34', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'patch(' + range + ') = ' + version;
- t.equal(semver.patch(range, loose), version, msg);
- });
- t.end();
-});
diff --git a/node_modules/semver/test/no-module.js b/node_modules/semver/test/no-module.js
deleted file mode 100644
index 8b50873f1..000000000
--- a/node_modules/semver/test/no-module.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-
-test('no module system', function(t) {
- var fs = require('fs');
- var vm = require('vm');
- var head = fs.readFileSync(require.resolve('../head.js.txt'), 'utf8');
- var src = fs.readFileSync(require.resolve('../'), 'utf8');
- var foot = fs.readFileSync(require.resolve('../foot.js.txt'), 'utf8');
- vm.runInThisContext(head + src + foot, 'semver.js');
-
- // just some basic poking to see if it did some stuff
- t.type(global.semver, 'object');
- t.type(global.semver.SemVer, 'function');
- t.type(global.semver.Range, 'function');
- t.ok(global.semver.satisfies('1.2.3', '1.2'));
- t.end();
-});
-
diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js
index 7dd8d917d..337f691ed 100644
--- a/node_modules/signal-exit/index.js
+++ b/node_modules/signal-exit/index.js
@@ -19,6 +19,15 @@ if (process.__signal_exit_emitter__) {
emitter.emitted = {}
}
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+
module.exports = function (cb, opts) {
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json
index 8429fac49..50364ccb6 100644
--- a/node_modules/signal-exit/package.json
+++ b/node_modules/signal-exit/package.json
@@ -1,6 +1,6 @@
{
"name": "signal-exit",
- "version": "3.0.1",
+ "version": "3.0.2",
"description": "when you want to fire an event no matter how a process exits.",
"main": "index.js",
"scripts": {
@@ -33,6 +33,6 @@
"nyc": "^8.1.0",
"standard": "^7.1.2",
"standard-version": "^2.3.0",
- "tap": "^7.1.0"
+ "tap": "^8.0.1"
}
}
diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js
index a2b978450..2571c735f 100644
--- a/node_modules/supports-color/index.js
+++ b/node_modules/supports-color/index.js
@@ -1,39 +1,84 @@
'use strict';
-var argv = process.argv;
+var hasFlag = require('has-flag');
-module.exports = (function () {
- if (argv.indexOf('--no-color') !== -1 ||
- argv.indexOf('--no-colors') !== -1 ||
- argv.indexOf('--color=false') !== -1) {
+var support = function (level) {
+ if (level === 0) {
return false;
}
- if (argv.indexOf('--color') !== -1 ||
- argv.indexOf('--colors') !== -1 ||
- argv.indexOf('--color=true') !== -1 ||
- argv.indexOf('--color=always') !== -1) {
- return true;
+ return {
+ level: level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+};
+
+var supportLevel = (function () {
+ if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ return 0;
+ }
+
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ return 1;
}
if (process.stdout && !process.stdout.isTTY) {
- return false;
+ return 0;
}
if (process.platform === 'win32') {
- return true;
+ return 1;
}
- if ('COLORTERM' in process.env) {
- return true;
+ if ('CI' in process.env) {
+ if ('TRAVIS' in process.env || process.env.CI === 'Travis') {
+ return 1;
+ }
+
+ return 0;
}
- if (process.env.TERM === 'dumb') {
- return false;
+ if ('TEAMCITY_VERSION' in process.env) {
+ return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1;
+ }
+
+ if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) {
+ return 2;
}
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
- return true;
+ return 1;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return 1;
}
- return false;
+ if (process.env.TERM === 'dumb') {
+ return 0;
+ }
+
+ return 0;
})();
+
+if (supportLevel === 0 && 'FORCE_COLOR' in process.env) {
+ supportLevel = 1;
+}
+
+module.exports = process && support(supportLevel);
diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json
index 7f72e762a..0cc4b383d 100644
--- a/node_modules/supports-color/package.json
+++ b/node_modules/supports-color/package.json
@@ -1,30 +1,32 @@
{
"name": "supports-color",
- "version": "1.2.0",
+ "version": "3.2.3",
"description": "Detect whether a terminal supports color",
"license": "MIT",
- "repository": "sindresorhus/supports-color",
+ "repository": "chalk/supports-color",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "bin": {
- "supports-color": "cli.js"
+ "url": "sindresorhus.com"
},
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)",
+ "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
+ ],
+ "browser": "browser.js",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.8.0"
},
"scripts": {
- "test": "mocha"
+ "test": "xo && mocha",
+ "travis": "mocha"
},
"files": [
"index.js",
- "cli.js"
+ "browser.js"
],
"keywords": [
- "cli",
- "bin",
"color",
"colour",
"colors",
@@ -42,10 +44,23 @@
"support",
"supports",
"capability",
- "detect"
+ "detect",
+ "truecolor",
+ "16m",
+ "million"
],
+ "dependencies": {
+ "has-flag": "^1.0.0"
+ },
"devDependencies": {
"mocha": "*",
- "require-uncached": "^1.0.2"
+ "require-uncached": "^1.0.2",
+ "xo": "*"
+ },
+ "xo": {
+ "envs": [
+ "node",
+ "mocha"
+ ]
}
}
diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md
index 32d4f46e9..f7bae4c54 100644
--- a/node_modules/supports-color/readme.md
+++ b/node_modules/supports-color/readme.md
@@ -1,11 +1,11 @@
-# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color)
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
> Detect whether a terminal supports color
## Install
-```sh
+```
$ npm install --save supports-color
```
@@ -18,25 +18,41 @@ var supportsColor = require('supports-color');
if (supportsColor) {
console.log('Terminal supports color');
}
+
+if (supportsColor.has256) {
+ console.log('Terminal supports 256 colors');
+}
+
+if (supportsColor.has16m) {
+ console.log('Terminal supports 16 million colors (truecolor)');
+}
```
-It obeys the `--color` and `--no-color` CLI flags.
+## API
-## CLI
+Returns an `object`, or `false` if color is not supported.
-```sh
-$ npm install --global supports-color
-```
+The returned object specifies a level of support for color through a `.level` property and a corresponding flag:
-```
-$ supports-color --help
+- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
+- `.level = 2` and `.has256 = true`: 256 color support
+- `.level = 3` and `.has16m = true`: 16 million (truecolor) support
- Usage
- supports-color
- Exits with code 0 if color is supported and 1 if not
-```
+## Info
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
+
+Explicit 256/truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
## License
diff --git a/node_modules/systemjs/README.md b/node_modules/systemjs/README.md
index afe998a27..8eab2cc46 100644
--- a/node_modules/systemjs/README.md
+++ b/node_modules/systemjs/README.md
@@ -5,6 +5,8 @@ SystemJS
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/systemjs/systemjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Support](https://supporterhq.com/api/b/33df4abbec4d39260f49015d2457eafe/SystemJS)](https://supporterhq.com/support/33df4abbec4d39260f49015d2457eafe/SystemJS)
+_SystemJS 0.20.0-alpha.1 is now available with performance improvements and Web Assembly support. [Try it out here](https://github.com/systemjs/systemjs/releases/tag/0.20.0-alpha.1)._
+
Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS.
* [Loads any module format](docs/module-formats.md) with [exact circular reference and binding support](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md).
@@ -125,6 +127,7 @@ Additional Plugins:
* [SASS](https://github.com/screendriver/plugin-sass)
* [SCSS](https://github.com/kevcjones/plugin-scss)
* [sofe](https://github.com/CanopyTax/sofe)
+* [svelte](https://github.com/CanopyTax/system-svelte)
* [SVG](https://github.com/vuzonp/systemjs-plugin-svg)
* [WebFont](https://github.com/guybedford/plugin-font)
* [WebWorkers](https://github.com/casperlamboo/plugin-worker)
diff --git a/node_modules/systemjs/dist/system-csp-production.js b/node_modules/systemjs/dist/system-csp-production.js
index 2fb9fdd75..8cbabeb0e 100644
--- a/node_modules/systemjs/dist/system-csp-production.js
+++ b/node_modules/systemjs/dist/system-csp-production.js
@@ -1,6 +1,6 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
-!function(){function e(){!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",i=r[3]||"",s=r[4]||"",l=r[5]||"",u=r[6]||"",d=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)"undefined"!=typeof $__curScript&&n[a].indexOf($__curScript.src)!=-1||r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n\t"):e.message.substr(11))+"\n\t"+t;q||(o=o.replace(U?/file:\/\/\//g:/file:\/\//g,""));var i=N?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},A(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},G.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){G=e(G||function(){})}function l(e){return e.match(V)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e;return new H(e,t&&t.replace(/#/g,"%05")||Y).href.replace(/%05/g,"#")}function f(e,t){var n,r="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?$:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,r=s,n=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function m(e){for(var t=[],n=[],r=0,a=e.length;r<a;r++){var o=J.call(t,e[r]);o===-1?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function p(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(Z)for(var r in t)"default"!==r&&h(n,t,r);else g(n,t);return n.default=t,A(n,"__useDefault",{value:!0}),n}function h(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&A(e,n,r)}catch(r){return e[n]=t[n],!1}}function g(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function v(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)if(!r||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(n?o:e[a]).concat(n?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,n):n||(e[a]=o):e[a]=o}}function y(e,t,n,r,a){for(var o in t)if(J.call(["main","format","defaultExtension","basePath"],o)!=-1)e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?n+"/"+i.substr(2):j.call(r,i),r.depCache[s]=(r.depCache[s]||[]).concat(t.depCache[i])}else!a||J.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)!=-1||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(r,'"'+o+'" is not a valid package configuration option in package '+n)}function b(e,t,n,r){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},y(a,r?n:o,t,e,r),y(a,r?o:n,t,e,!r)}else a=e.packages[t]=n;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main.default=a.main.default||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn}function x(e,t){for(var n=e.split(".");n.length;)t=t[n.shift()];return t}function S(e,t){var n,r=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(o<=r)continue;n=a,r=o}return n}function E(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new H(this.baseURL,Y).href)}function _(e,t){this.set("@system-env",W=this.newModule({browser:q,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function P(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!ee){var n=this._nodeRequire("module"),r=t.substr(U?8:7);ee=new n(r),ee.paths=n._nodeModulePaths(r)}return ee.require(e)}function j(e,t){if(u(e))return c(e,t);if(l(e))return e;var n=S(this.map,e);if(n){if(e=this.map[n]+e.substr(n.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(P.call(this,e.substr(6),this.baseURL)))),e}return E.call(this),f(this,e)||this.baseURL+e}function k(e,t,n){W.browser&&t.browserConfig&&n(t.browserConfig),W.node&&t.nodeConfig&&n(t.nodeConfig),W.dev&&t.devConfig&&n(t.devConfig),W.build&&t.buildConfig&&n(t.buildConfig),W.production&&t.productionConfig&&n(t.productionConfig)}function O(e){var t=e.match(re);return t&&"System.register"==e.substr(t[0].length,15)}function R(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function M(t){if("string"==typeof t)return x(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var n={},r=!0,a=0;a<t.length;a++){var o=x(t[a],e);r&&(n.default=o,r=!1),n[t[a].split(".").pop()]=o}return n}function z(e){var t,n,r,r="~"==e[0],a=e.lastIndexOf("|");return a!=-1?(t=e.substr(a+1),n=e.substr(r,a-r),r&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+n+"|~"+t+'"'),"~"==t[0]&&(r=!0,t=t.substr(1))):(t="default",n=e.substr(r),ae.indexOf(n)!=-1&&(t=n,n=null)),{module:n||"@system-env",prop:t,negate:r}}function I(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function C(e,t,n){var r=this;return this.normalize(e.module,t).then(function(t){return r.load(t).then(function(a){var o=x(e.prop,r.get(t));if(n&&"boolean"!=typeof o)throw new TypeError("Condition "+I(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function L(e,t){var n=e.match(oe);if(!n)return Promise.resolve(e);var r=z.call(this,n[0].substr(2,n[0].length-3));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.replace(oe,"#{"+I(r)+"}")}):C.call(this,r,t,!1).then(function(n){if("string"!=typeof n)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(n.indexOf("/")!=-1)throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+n+' cannot contain a "/" separator.');return e.replace(oe,n)})}function T(e,t){var n=e.lastIndexOf("#?");if(n==-1)return Promise.resolve(e);var r=z.call(this,e.substr(n+2));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.substr(0,n)+"#?"+I(r)}):C.call(this,r,t,!0).then(function(t){return t?e.substr(0,n):"@empty"})}var D="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,q="undefined"!=typeof window&&"undefined"!=typeof document,U="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var A,J=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(A=Object.defineProperty)}catch(e){A=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var $,N="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if($=document.baseURI,!$){var F=document.getElementsByTagName("base");$=F[0]&&F[0].href||window.location.href}}else"undefined"!=typeof location&&($=e.location.href);if($)$=$.split("#")[0].split("?")[0],$=$.substr(0,$.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");$="file://"+(U?"/":"")+process.cwd()+"/",U&&($=$.replace(/\\/g,"/"))}try{var B="test:"==new e.URL("test:///").protocol}catch(e){}var H=B?e.URL:e.URLPolyfill;A(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(u({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;a<o;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),i(t,r),r})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,n){l(e,t,n.then(function(n){if("loading"==t.status)return t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})}))}function l(e,t,n){n.then(function(n){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,i=n.length;a<i;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,i=r.length;o<i;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;n<r;n++)m(e[n],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;r<a;r++)p(n[r],t,e)})}function u(t){return function(n,r){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),n(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;n<r;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;n<r;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;a<o;a++){var t=r[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var i=f(e);i||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==n.name){r=t(r,"Error loading "+n.name+' as "'+l.key+'" from '+i.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;o<d;o++){var n=u[o];a.loaderObj.failed=a.loaderObj.failed||[],J.call(a.loaderObj.failed,n)==-1&&a.loaderObj.failed.push(n);var c=J.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=J.call(e.loader.loads,n);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=J.call(e.loads,t);r!=-1&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;a<o;a++)r=J.call(t.linkSets[a].loads,t),r!=-1&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(e){return void r(t,e)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,n){var r=e();r.address=n&&n.address;var a=d(this._loader,r),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return r.module.module});return l(i,r,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){A(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=r.prototype.newModule}();var X;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var G,V=/^[^\/]+:\/\//,Y=new H($),Z=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){Z=!1}var K;if("undefined"!=typeof XMLHttpRequest)K=function(e,t,n,r){function a(){n(i.responseText)}function o(){r(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var Q;K=function(e,t,n,r){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return Q=Q||require("fs"),e=U?e.replace(/\//g,"\\").substr(8):e.substr(7),Q.readFile(e,function(e,t){if(e)return r(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),n(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");K=function(e,t,n,r){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(n,r)}}var W;s(function(e){return function(){e.call(this),this.baseURL=$,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),_.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var ee;i("normalize",function(e){return function(e,t,n){var r=j.call(this,e,t);return!this.defaultJSExtensions||n||".js"==r.substr(r.length-3,3)||d(r)||(r+=".js"),r}});var te="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return te?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,n){K(e.address,e.metadata.authorization,t,n)})}}),i("import",function(e){return function(t,n,r){return n&&n.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+n.name),e.call(this,t,n,r).then(function(e){return e.__useDefault?e.default:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=R();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},n=this;for(var r in n)n.hasOwnProperty&&!n.hasOwnProperty(r)||r in a.prototype&&"transpiler"!=r||J.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],r)==-1&&(t[r]=n[r]);return t.production=W.production,t};var ne;a.prototype.config=function(e,t){function n(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var r=this;if("loaderErrorStack"in e&&(ne=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ne),"warnings"in e&&(r.warnings=e.warnings),e.transpilerRuntime===!1&&(r._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&_.call(r,!!e.production,!!(e.build||W&&W.build)),!t){var a;if(k(r,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(n(r.packages)||n(r.meta)||n(r.depCache)||n(r.bundles)||n(r.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,E.call(this)}if(e.paths&&g(r.paths,e.paths),k(r,e,function(e){e.paths&&g(r.paths,e.paths)}),this.warnings)for(var o in r.paths)o.indexOf("*")!=-1&&w.call(r,'Paths configuration "'+o+'" -> "'+r.paths[o]+'" uses wildcards which are being deprecated for just leaving a trailing "/" to indicate folder paths.')}if(e.defaultJSExtensions&&(r.defaultJSExtensions=e.defaultJSExtensions,w.call(r,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(r.pluginFirst=e.pluginFirst),e.map)for(var o in e.map){var i=e.map[o];if("string"!=typeof i){var s=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=r.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3));var u="";for(var c in r.packages)l.substr(0,c.length)==c&&(!l[c.length]||"/"==l[c.length])&&u.split("/").length<c.split("/").length&&(u=c);u&&r.packages[u].main&&(l=l.substr(0,l.length-r.packages[u].main.length-1));var c=r.packages[l]=r.packages[l]||{};c.map=i}else r.map[o]=i}if(e.packageConfigPaths){for(var f=[],m=0;m<e.packageConfigPaths.length;m++){var p=e.packageConfigPaths[m],h=Math.max(p.lastIndexOf("*")+1,p.lastIndexOf("/")),v=j.call(r,p.substr(0,h));f[m]=v+p.substr(h)}r.packageConfigPaths=f}if(e.bundles)for(var o in e.bundles){for(var y=[],m=0;m<e.bundles[o].length;m++){var s=r.defaultJSExtensions&&".js"!=e.bundles[o][m].substr(e.bundles[o][m].length-3,3),x=r.decanonicalize(e.bundles[o][m]);s&&".js"==x.substr(x.length-3,3)&&(x=x.substr(0,x.length-3)),y.push(x)}r.bundles[o]=y}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var l=j.call(r,o);"/"==l[l.length-1]&&(l=l.substr(0,l.length-1)),b(r,l,e.packages[o],!1)}for(var S in e){var i=e[S];if(J.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],S)==-1)if("object"!=typeof i||i instanceof Array)r[S]=i;else{r[S]=r[S]||{};for(var o in i)if("meta"==S&&"*"==o[0])g(r[S][o]=r[S][o]||{},i[o]);else if("meta"==S){var P=j.call(r,o);r.defaultJSExtensions&&".js"!=P.substr(P.length-3,3)&&!d(P)&&(P+=".js"),g(r[S][P]=r[S][P]||{},i[o])}else if("depCache"==S){var s=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=r.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3)),r[S][l]=[].concat(i[o])}else r[S][o]=i[o]}}k(r,e,function(e){r.config(e,!0)})},function(){function e(e,t){var n,r,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(r=o.split("/").length,r>a&&(n=o,a=r));return n}function t(e,t,n,r,a){if(!r||"/"==r[r.length-1]||a||t.defaultExtension===!1)return r;var o=!1;if(t.meta&&p(t.meta,r,function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return o=!0}),!o&&e.meta&&p(e.meta,n+"/"+r,function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return o=!0}),o)return r;var i="."+(t.defaultExtension||"js");return r.substr(r.length-i.length)!=i?r+i:r}function n(e,n,r,a,i){if(!a){if(!n.main)return r+(e.defaultJSExtensions?".js":"");a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}if(n.map){var s="./"+a,l=S(n.map,s);if(l||(s="./"+t(e,n,r,a,i),s!="./"+a&&(l=S(n.map,s))),l){var u=o(e,n,r,l,s,i);if(u)return u}}return r+"/"+t(e,n,r,a,i)}function r(e,t,n,r){if("."==e)throw new Error("Package "+n+' has a map entry for "." which is not permitted.');return!(t.substr(0,e.length)==e&&r.length>e.length)}function o(e,n,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=n.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(r(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,n,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,n,r,a,o){if(!a){if(!n.main)return Promise.resolve(r+(e.defaultJSExtensions?".js":""));a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}var i,s;return n.map&&(i="./"+a,s=S(n.map,i),s||(i="./"+t(e,n,r,a,o),i!="./"+a&&(s=S(n.map,i)))),(s?d(e,n,r,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(r+"/"+t(e,n,r,a,o))})}function u(e,n,r,a,o,i,s){if("."==o)o=r;else if("./"==o.substr(0,2))return Promise.resolve(r+"/"+t(e,n,r,o.substr(2)+i.substr(a.length),s)).then(function(t){return L.call(e,t,r+"/")});return e.normalize(o+i.substr(a.length),r+"/")}function d(e,t,n,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return r(a,s,n,o)?u(e,t,n,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(n+"/#:"+o);var l=[],d=[];for(var c in s){var f=z(c);d.push({condition:f,map:s[c]}),l.push(e.import(f.module,n))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var n=d[t].condition,r=x(n.prop,e[t]);if(!n.negate&&r||n.negate&&!r)return d[t].map}}).then(function(s){if(s){if(!r(a,s,n,o))return;return u(e,t,n,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),n=Math.max(t+1,e.lastIndexOf("/"));return{length:n,regEx:new RegExp("^("+e.substr(0,n).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:t!=-1}}function f(e,t){for(var n,r,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||n&&(a&&s.wildcard||!(n.length<l[1].length))||(n=l[1],a=!s.wildcard,r=n+i.substr(s.length))}}if(n)return{packageName:n,configPath:r}}function m(e,t,n){var r=e.pluginLoader||e;return(r.meta[n]=r.meta[n]||{}).format="json",r.meta[n].loader=null,r.load(n).then(function(){var a=r.get(n).default;return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+n+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),b(e,t,a,!0)})}function p(e,t,n){var r;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),r=a.indexOf("*"),r!==-1&&a.substr(0,r)==t.substr(0,r)&&a.substr(r+1)==t.substr(t.length-a.length+r+1)&&n(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&n(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(n,r){if(this.builder)return t.call(this,n,r,!0);var a=t.call(this,n,r,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return s=!1,!0}),(s===!1||s&&".js"!=s)&&".js"!=n.substr(n.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(r,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));var u=l&&s.packages[l];if(u&&"."!=r[0]){var d=u.map,c=d&&S(d,r);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,r,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),h=t.call(s,r,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);if(!v)return h+(p?".js":"");var y=h.substr(v.length+1);return n(s,s.packages[v]||{},v,y,i)}}),i("normalize",function(t){return function(n,r,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(r)var t=e(o,r)||o.defaultJSExtensions&&".js"==r.substr(r.length-3,3)&&e(o,r.substr(0,r.length-3));var i=t&&o.packages[t];if(i&&"./"!=n.substr(0,2)){var s=i.map,l=s&&S(s,n);if(l)return d(o,i,t,l,n,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),u=t.call(o,n,r,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(n){var r=this;return Promise.resolve(t.call(this,n)).then(function(t){var a=e(r,n.name);if(a){var o=r.packages[a],i=n.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,n){n>l&&(l=n),v(s,t,n&&l>n)}),v(n.metadata,s)}o.format&&!n.metadata.loader&&(n.metadata.format=n.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(e){l=null,n(e)}l=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(n){return!e.call(this,n)&&(l?this.reduceRegister_(l,n):u?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(q||D)?D?n(l,i):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var r=0;r<f.length;r++)l.reduceRegister_(i,f[r]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||n(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),n(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);
-r.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,r.appendChild(g)}):t.call(this,i)}})}();var re=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],J.call(r[e.groupIndex],e)==-1){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=n.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(r[s.groupIndex].splice(J.call(r[s.groupIndex],s),1),0==r[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,r):c(d,r)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=l(t.name,r),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,i=a.importers.length;r<i;r++){var s=a.importers[r];if(!s.locked){var l=J.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;s<d;s++){var c,f=t.normalizedDeps[s],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function d(e,t){var n,r=t.defined[e];if(r)r.declarative?f(e,r,[],t):r.evaluated||c(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n.default:n}function c(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var l=t.normalizedDeps[i],u=r.defined[l];u&&c(u,r)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;n<a;n++)if(t.deps[n]==e)return d(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(J.call(t.normalizedDeps,o)!=-1)return d(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(p(a)):t.esModule=r.newModule({default:a,__useDefault:!0})}}function f(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,i=n.normalizedDeps.length;o<i;o++){var s=n.normalizedDeps[o];J.call(r,s)==-1&&(a.defined[s]?f(s,a.defined[s],r,a):a.get(s))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=R();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=R();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),A(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&O(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),f(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=R(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=m(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=n.deps.length;s<l;s++)i.push(Promise.resolve(a.normalize(n.deps[s],t.name)));return Promise.all(i).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),f(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),i("reduceRegister_",function(e){return function(t,n){if(n||!t.metadata.exports&&(!D||"global"!=t.metadata.format))return e.call(this,t,n);t.metadata.format="global";var r=t.metadata.entry=R();r.deps=t.metadata.deps;var a=M(t.metadata.exports);r.execute=function(){return a}}}),s(function(t){return function(){function n(t){if(Object.keys)Object.keys(e).forEach(t);else for(var n in e)i.call(e,n)&&t(n)}function r(t){n(function(n){if(J.call(s,n)==-1){try{var r=e[n]}catch(e){s.push(n)}t(n,r)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,n,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return n||(o={},r(function(e,t){o[e]=t})),function(){var t,a=n?M(n):{},u=!!n;if(n&&!i||r(function(r,s){o[r]!==s&&"undefined"!=typeof s&&(i&&(e[r]=void 0),n||(a[r]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!U):r&&e.substr(0,r.length)==r?e.substr(r.length):e}var n=this;if(e.call(n),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var r=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");n.set("@@cjs-helpers",n.newModule({requireResolve:function(e,r){return t(n.normalizeSync(e,r))},getPathVars:function(e){var n,r=e.lastIndexOf("!");n=r!=-1?e.substr(0,r):e;var a=n.split("/");return a.pop(),a=a.join("/"),{filename:t(n),dirname:t(a)}}}))}}),i("fetch",function(t){return function(n){return n.metadata.scriptLoad&&q&&(e.define=this.amdDefine),t.call(this,n)}}),s(function(t){return function(){function n(e,t){e=e.replace(s,"");var n=e.match(d),r=(n[1].split(",")[t]||"require").replace(c,""),a=f[r]||(f[r]=new RegExp(l+r+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function r(e,t,n,a){if("object"==typeof e&&!(e instanceof Array))return r.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l.default:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o.import(e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},n)}function a(t,a,i){function s(t,n,s){function c(e,n,a){return"string"==typeof e&&"function"!=typeof n?t(e):r.call(o,e,n,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},d!=-1&&f.splice(d,0,s),u!=-1&&f.splice(u,0,n),l!=-1&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),n=o.decanonicalize(e,s.id);return t&&".js"==n.substr(n.length-3,3)&&(n=n.substr(0,n.length-3)),n},f.splice(l,0,c));var p=e.require;e.require=r;var h=i.apply(u==-1?e:n,f);if(e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h)return h}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;(l=J.call(a,"require"))!=-1&&(a.splice(l,1),t||(a=a.concat(n(i.toString(),l)))),(u=J.call(a,"exports"))!=-1&&a.splice(u,1),(d=J.call(a,"module"))!=-1&&a.splice(d,1);var c=R();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,n){if(!n||!n.amd)return e.call(this,t,n);var r=t&&t.metadata,a=n.entry;if(r)if(r.format&&"detect"!=r.format){if(!a.name&&"amd"!=r.format)throw new Error("AMD define called while executing "+r.format+" module "+t.name)}else r.format="amd";if(a.name)r&&(r.entry||r.bundle?r.entry&&r.entry.name&&r.entry.name!=t.name&&(r.entry=void 0):r.entry=a,r.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!r)throw new TypeError("Unexpected anonymous AMD define.");if(r.entry&&!r.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);r.entry=a}}}),o.amdDefine=a,o.amdRequire=r}}),function(){function e(e,t){if(t){var n;if(e.pluginFirst){if((n=t.lastIndexOf("!"))!=-1)return t.substr(n+1)}else if((n=t.indexOf("!"))!=-1)return t.substr(0,n);return t}}function t(e,t){var n,r,a=t.lastIndexOf("!");if(a!=-1)return e.pluginFirst?(n=t.substr(a+1),r=t.substr(0,a)):(n=t.substr(0,a),r=t.substr(a+1)||n.substr(n.lastIndexOf(".")+1)),{argument:n,plugin:r}}function n(e,t,n,r){return r&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?n+"!"+t:t+"!"+n}function r(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function a(a){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return a.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return n(l,d,c,r(l,u.argument))}}i("decanonicalize",a),i("normalizeSync",a),i("normalize",function(a){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return n(l,e[0],e[1],r(l,u.argument))}):a.call(l,o,i,s)}}),i("locate",function(e){return function(t){var n,r=this,a=t.name;return r.pluginFirst?(n=a.indexOf("!"))!=-1&&(t.metadata.loader=a.substr(0,n),t.name=a.substr(n+1)):(n=a.lastIndexOf("!"))!=-1&&(t.metadata.loader=a.substr(n+1),t.name=a.substr(0,n)),e.call(r,t).then(function(e){return n==-1&&t.metadata.loader?(r.pluginLoader||r).normalize(t.metadata.loader,t.name).then(function(n){return t.metadata.loader=n,e}):e}).then(function(e){var n=t.metadata.loader;if(!n)return e;if(t.name==n)throw new Error("Plugin "+n+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(r.defined&&r.defined[a])return e;var o=r.pluginLoader||r;return o.import(n).then(function(n){return t.metadata.loaderModule=n,t.address=e,n.locate?n.locate.call(r,t):e})})}}),i("fetch",function(e){return function(t){var n=this;return t.metadata.loaderModule&&t.metadata.loaderModule.fetch&&"defined"!=t.metadata.format?(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch.call(n,t,function(t){return e.call(n,t)})):e.call(n,t)}}),i("translate",function(e){return function(t){var n=this,r=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(n,r)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a&&(t.source=a),e.apply(n,r)}):e.apply(n,r)}}),i("instantiate",function(e){return function(t){var n=this,r=!1;return t.metadata.loaderModule&&t.metadata.loaderModule.instantiate&&!n.builder&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.instantiate.call(n,t,function(t){if(r)throw new Error("Instantiate must only be called once.");return r=!0,e.call(n,t)})).then(function(a){return r?a:(void 0!==a&&(t.metadata.entry=R(),t.metadata.entry.execute=function(){return a},t.metadata.entry.deps=t.metadata.deps,t.metadata.format="defined"),e.call(n,t))}):e.call(n,t)}})}();var ae=["browser","node","dev","build","production","default"],oe=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,n,r){var a=this;return T.call(a,t,n).then(function(t){return e.call(a,t,n,r)}).then(function(e){return L.call(a,e,n)})}}),function(){i("fetch",function(e){return function(t){var n=t.metadata.alias,r=t.metadata.deps||[];if(n){t.metadata.format="defined";var a=R();return this.defined[t.name]=a,a.declarative=!0,a.deps=r.concat([n]),a.declare=function(e){return{setters:[function(t){for(var n in t)e(n,t[n]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,n){for(var r,a=t.split(".");a.length>1;)r=a.shift(),e=e[r]=e[r]||{};r=a.shift(),r in e||(e[r]=n)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var n,r=this.meta,a=t.name,o=0;for(var i in r)if(n=i.indexOf("*"),n!==-1&&i.substr(0,n)===a.substr(0,n)&&i.substr(n+1)===a.substr(a.length-i.length+n+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,r[i],o!=s)}return r[a]&&v(t.metadata,r[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,n=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(r){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(n),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return r.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var i=n.bundles[a][o];if(i==t.name){r=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){r=!0;break}}}if(r)return n.import(a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var n=this,r=n.depCache[t.name];if(r)for(var a=0;a<r.length;a++)n.import(r[a],t.name);return e.call(n,t)}})}(),s(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),i("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),X=new a,e.SystemJS=X,X.version="0.19.41 CSP","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=X),e.System=X}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var n=document.getElementsByTagName("script");if($__curScript=n[n.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),$__curScript.src||($__curScript=void 0),t){var r=$__curScript.src,a=r.substr(0,r.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
+!function(){function e(){!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").replace(/\\/g,"/").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",i=r[3]||"",s=r[4]||"",l=r[5]||"",u=r[6]||"",d=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)("undefined"==typeof $__curScript||-1==n[a].indexOf($__curScript.src))&&r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n "):e.message.substr(11))+"\n "+t;U||(o=o.replace(A?/file:\/\/\//g:/file:\/\//g,""));var i=F?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},J(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},Y.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){Y=e(Y||function(){})}function l(e){return e.match(Z)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||N)+e.substr(2)}else if("/"!=e[0]&&-1==e.indexOf(":"))return(t&&t.substr(0,t.lastIndexOf("/")+1)||N)+e;return new G(e,t&&t.replace(/#/g,"%05")||K).href.replace(/%05/g,"#")}function f(e,t){var n,r="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?N:e.baseURL)),-1===s.indexOf("*")){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,r=s,n=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function m(e){for(var t=[],n=[],r=0,a=e.length;a>r;r++){var o=$.call(t,e[r]);-1===o?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function p(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(Q)for(var r in t)"default"!==r&&h(n,t,r);else g(n,t);return n["default"]=t,J(n,"__useDefault",{value:!0}),n}function h(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&J(e,n,r)}catch(a){return e[n]=t[n],!1}}function g(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)(!r||t.hasOwnProperty(a))&&(n&&a in e||(e[a]=t[a]));return e}function v(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)if(!r||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(n?o:e[a]).concat(n?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,n):n||(e[a]=o):e[a]=o}}function y(e,t,n,r,a){for(var o in t)if(-1!=$.call(["main","format","defaultExtension","basePath"],o))e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?n+"/"+i.substr(2):k.call(r,i),r.depCache[s]=(r.depCache[s]||[]).concat(t.depCache[i])}else!a||-1!=$.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(r,'"'+o+'" is not a valid package configuration option in package '+n)}function b(e,t,n,r){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},y(a,r?n:o,t,e,r),y(a,r?o:n,t,e,!r)}else a=e.packages[t]=n;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main["default"]=a.main["default"]||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn&&console.warn(e)}function x(e,t){e.metadata.entry=R(),e.metadata.entry.execute=function(){return t},e.metadata.entry.deps=[],e.metadata.format="defined"}function S(e,t){for(var n=e.split(".");n.length;)t=t[n.shift()];return t}function E(e,t){var n,r=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(r>=o)continue;n=a,r=o}return n}function _(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new G(this.baseURL,K).href)}function P(e,t){this.set("@system-env",te=this.newModule({browser:U,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,"default":!0}))}function j(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!ne){var n=this._nodeRequire("module"),r=t.substr(A?8:7);ne=new n(r),ne.paths=n._nodeModulePaths(r)}return ne.require(e)}function k(e,t){if(u(e))return c(e,t);if(l(e))return e;var n=E(this.map,e);if(n){if(e=this.map[n]+e.substr(n.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(j.call(this,e.substr(6),this.baseURL)))),e}return _.call(this),f(this,e)||this.baseURL+e}function O(e,t,n){te.browser&&t.browserConfig&&n(t.browserConfig),te.node&&t.nodeConfig&&n(t.nodeConfig),te.dev&&t.devConfig&&n(t.devConfig),te.build&&t.buildConfig&&n(t.buildConfig),te.production&&t.productionConfig&&n(t.productionConfig)}function M(e){var t=e.match(oe);return t&&"System.register"==e.substr(t[0].length,15)}function R(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function z(t){if("string"==typeof t)return S(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var n={},r=!0,a=0;a<t.length;a++){var o=S(t[a],e);r&&(n["default"]=o,r=!1),n[t[a].split(".").pop()]=o}return n}function I(e){var t,n,r,r="~"==e[0],a=e.lastIndexOf("|");return-1!=a?(t=e.substr(a+1),n=e.substr(r,a-r),r&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+n+"|~"+t+'"'),"~"==t[0]&&(r=!0,t=t.substr(1))):(t="default",n=e.substr(r),-1!=ie.indexOf(n)&&(t=n,n=null)),{module:n||"@system-env",prop:t,negate:r}}function C(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function L(e,t,n){var r=this;return this.normalize(e.module,t).then(function(t){return r.load(t).then(function(a){var o=S(e.prop,r.get(t));if(n&&"boolean"!=typeof o)throw new TypeError("Condition "+C(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function T(e,t){var n=e.match(se);if(!n)return Promise.resolve(e);var r=I.call(this,n[0].substr(2,n[0].length-3));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.replace(se,"#{"+C(r)+"}")}):L.call(this,r,t,!1).then(function(n){if("string"!=typeof n)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(-1!=n.indexOf("/"))throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n The condition value "+n+' cannot contain a "/" separator.');return e.replace(se,n)})}function D(e,t){var n=e.lastIndexOf("#?");if(-1==n)return Promise.resolve(e);var r=I.call(this,e.substr(n+2));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.substr(0,n)+"#?"+C(r)}):L.call(this,r,t,!0).then(function(t){return t?e.substr(0,n):"@empty"})}var q="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,U="undefined"!=typeof window&&"undefined"!=typeof document,A="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var J,$=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(J=Object.defineProperty)}catch(e){J=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(r){}}}}();var N,F="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(N=document.baseURI,!N){var B=document.getElementsByTagName("base");N=B[0]&&B[0].href||window.location.href}}else"undefined"!=typeof location&&(N=e.location.href);if(N)N=N.split("#")[0].split("?")[0],N=N.substr(0,N.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");N="file://"+(A?"/":"")+process.cwd()+"/",A&&(N=N.replace(/\\/g,"/"))}try{var H="test:"==new e.URL("test:///").protocol}catch(X){}var G=H?e.URL:e.URLPolyfill;J(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(u({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;o>a;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),i(t,r),r})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,n){l(e,t,n.then(function(n){return"loading"==t.status?(t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})):void 0}))}function l(e,t,n){n.then(function(n){return"loading"==t.status?(t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,i=n.length;i>a;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,i=r.length;i>o;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;r>n;n++)m(e[n],t)})):void 0})["catch"](function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;a>r;r++)p(n[r],t,e)})}function u(t){return function(n,r){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;m>f;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),n(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;r>n;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;r>n;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;s>i;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;o>a;a++){var t=r[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var i=f(e);i||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==n.name){r=t(r,"Error loading "+n.name+' as "'+l.key+'" from '+i.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;d>o;o++){var n=u[o];a.loaderObj.failed=a.loaderObj.failed||[],-1==$.call(a.loaderObj.failed,n)&&a.loaderObj.failed.push(n);var c=$.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=$.call(e.loader.loads,n);-1!=f&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=$.call(e.loads,t);-1!=r&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;o>a;a++)r=$.call(t.linkSets[a].loads,t),-1!=r&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(o){return void r(t,o)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},"delete":function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],t.modules[e]?delete t.modules[e]:!1},get:function(e){return this._loader.modules[e]?this._loader.modules[e].module:void 0},has:function(e){return!!this._loader.modules[e]},"import":function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():(t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(n){return delete t.importPromises[e],n.module.module}))).then(function(){})},module:function(t,n){var r=e();r.address=n&&n.address;var a=d(this._loader,r),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return r.module.module});return l(i,r,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){J(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=r.prototype.newModule}();var V;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var Y,Z=/^[^\/]+:\/\//,K=new G(N),Q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(X){Q=!1}var W;if("undefined"!=typeof XMLHttpRequest)W=function(e,t,n,r){function a(){n(i.responseText)}function o(){r(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var ee;W=function(e,t,n,r){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return ee=ee||require("fs"),e=A?e.replace(/\//g,"\\").substr(8):e.substr(7),ee.readFile(e,function(e,t){if(e)return r(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),n(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");W=function(e,t,n,r){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(n,r)}}var te;s(function(e){return function(){e.call(this),this.baseURL=N,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),P.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var ne;i("normalize",function(e){return function(e,t,n){var r=k.call(this,e,t);return!this.defaultJSExtensions||n||".js"==r.substr(r.length-3,3)||d(r)||(r+=".js"),r}});var re="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return re?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,n){W(e.address,e.metadata.authorization,t,n)})}}),i("import",function(e){return function(t,n,r){return n&&n.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+n.name),e.call(this,t,n,r).then(function(e){return e.__useDefault?e["default"]:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=R();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},n=this;for(var r in n)n.hasOwnProperty&&!n.hasOwnProperty(r)||r in a.prototype&&"transpiler"!=r||-1==$.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],r)&&(t[r]=n[r]);return t.production=te.production,t};var ae;a.prototype.config=function(e,t){function n(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var r=this;if("loaderErrorStack"in e&&(ae=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ae),"warnings"in e&&(r.warnings=e.warnings),e.transpilerRuntime===!1&&(r._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&P.call(r,!!e.production,!!(e.build||te&&te.build)),!t){var a;if(O(r,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(n(r.packages)||n(r.meta)||n(r.depCache)||n(r.bundles)||n(r.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,_.call(this)}if(e.paths&&g(r.paths,e.paths),O(r,e,function(e){e.paths&&g(r.paths,e.paths)}),this.warnings)for(var o in r.paths)-1!=o.indexOf("*")&&w.call(r,'Paths configuration "'+o+'" -> "'+r.paths[o]+'" uses wildcards which are being deprecated for just leaving a trailing "/" to indicate folder paths.')}if(e.defaultJSExtensions&&(r.defaultJSExtensions=e.defaultJSExtensions,w.call(r,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(r.pluginFirst=e.pluginFirst),e.map)for(var o in e.map){var i=e.map[o];if("string"!=typeof i){var s=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=r.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3));var u="";for(var c in r.packages)l.substr(0,c.length)==c&&(!l[c.length]||"/"==l[c.length])&&u.split("/").length<c.split("/").length&&(u=c);u&&r.packages[u].main&&(l=l.substr(0,l.length-r.packages[u].main.length-1));var c=r.packages[l]=r.packages[l]||{};c.map=i}else r.map[o]=i}if(e.packageConfigPaths){for(var f=[],m=0;m<e.packageConfigPaths.length;m++){var p=e.packageConfigPaths[m],h=Math.max(p.lastIndexOf("*")+1,p.lastIndexOf("/")),v=k.call(r,p.substr(0,h));f[m]=v+p.substr(h)}r.packageConfigPaths=f}if(e.bundles)for(var o in e.bundles){for(var y=[],m=0;m<e.bundles[o].length;m++){var s=r.defaultJSExtensions&&".js"!=e.bundles[o][m].substr(e.bundles[o][m].length-3,3),x=r.decanonicalize(e.bundles[o][m]);s&&".js"==x.substr(x.length-3,3)&&(x=x.substr(0,x.length-3)),y.push(x)}r.bundles[o]=y}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var l=k.call(r,o);"/"==l[l.length-1]&&(l=l.substr(0,l.length-1)),b(r,l,e.packages[o],!1)}for(var S in e){var i=e[S];if(-1==$.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],S))if("object"!=typeof i||i instanceof Array)r[S]=i;else{r[S]=r[S]||{};for(var o in i)if("meta"==S&&"*"==o[0])g(r[S][o]=r[S][o]||{},i[o]);else if("meta"==S){var E=k.call(r,o);r.defaultJSExtensions&&".js"!=E.substr(E.length-3,3)&&!d(E)&&(E+=".js"),g(r[S][E]=r[S][E]||{},i[o])}else if("depCache"==S){var s=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=r.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3)),r[S][l]=[].concat(i[o])}else r[S][o]=i[o]}}O(r,e,function(e){r.config(e,!0)})},function(){function e(e,t){var n,r,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(r=o.split("/").length,r>a&&(n=o,a=r));return n}function t(e,t,n,r,a){if(!r||"/"==r[r.length-1]||a||t.defaultExtension===!1)return r;var o=!1;if(t.meta&&p(t.meta,r,function(e,t,n){return 0==n||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),!o&&e.meta&&p(e.meta,n+"/"+r,function(e,t,n){return 0==n||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),o)return r;var i="."+(t.defaultExtension||"js");return r.substr(r.length-i.length)!=i?r+i:r}function n(e,n,r,a,i){if(!a){if(!n.main)return r+(e.defaultJSExtensions?".js":"");a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}if(n.map){var s="./"+a,l=E(n.map,s);if(l||(s="./"+t(e,n,r,a,i),s!="./"+a&&(l=E(n.map,s))),l){var u=o(e,n,r,l,s,i);if(u)return u}}return r+"/"+t(e,n,r,a,i)}function r(e,t,n,r){if("."==e)throw new Error("Package "+n+' has a map entry for "." which is not permitted.');return t.substr(0,e.length)==e&&r.length>e.length?!1:!0}function o(e,n,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=n.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(r(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,n,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,n,r,a,o){if(!a){if(!n.main)return Promise.resolve(r+(e.defaultJSExtensions?".js":""));a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}var i,s;return n.map&&(i="./"+a,s=E(n.map,i),s||(i="./"+t(e,n,r,a,o),i!="./"+a&&(s=E(n.map,i)))),(s?d(e,n,r,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(r+"/"+t(e,n,r,a,o))})}function u(e,n,r,a,o,i,s){if("."==o)o=r;else if("./"==o.substr(0,2))return Promise.resolve(r+"/"+t(e,n,r,o.substr(2)+i.substr(a.length),s)).then(function(t){return T.call(e,t,r+"/")});return e.normalize(o+i.substr(a.length),r+"/")}function d(e,t,n,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return r(a,s,n,o)?u(e,t,n,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(n+"/#:"+o);var l=[],d=[];for(var c in s){var f=I(c);d.push({condition:f,map:s[c]}),l.push(e["import"](f.module,n))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var n=d[t].condition,r=S(n.prop,e[t]);if(!n.negate&&r||n.negate&&!r)return d[t].map}}).then(function(s){if(s){if(!r(a,s,n,o))return;return u(e,t,n,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),n=Math.max(t+1,e.lastIndexOf("/"));return{length:n,regEx:new RegExp("^("+e.substr(0,n).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:-1!=t}}function f(e,t){for(var n,r,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||n&&(a&&s.wildcard||!(n.length<l[1].length))||(n=l[1],a=!s.wildcard,r=n+i.substr(s.length))}}return n?{packageName:n,configPath:r}:void 0}function m(e,t,n){var r=e.pluginLoader||e;return(r.meta[n]=r.meta[n]||{}).format="json",r.meta[n].loader=null,r.load(n).then(function(){var a=r.get(n)["default"];return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+n+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),b(e,t,a,!0)})}function p(e,t,n){var r;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),r=a.indexOf("*"),-1!==r&&a.substr(0,r)==t.substr(0,r)&&a.substr(r+1)==t.substr(t.length-a.length+r+1)&&n(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&n(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(n,r){if(this.builder)return t.call(this,n,r,!0);var a=t.call(this,n,r,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,n){return 0==n||e.lastIndexOf("*")!=e.length-1?(s=!1,!0):void 0}),(s===!1||s&&".js"!=s)&&".js"!=n.substr(n.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(r,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));var u=l&&s.packages[l];if(u&&"."!=r[0]){var d=u.map,c=d&&E(d,r);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,r,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),h=t.call(s,r,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);if(!v)return h+(p?".js":"");var y=h.substr(v.length+1);return n(s,s.packages[v]||{},v,y,i)}}),i("normalize",function(t){return function(n,r,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(r)var t=e(o,r)||o.defaultJSExtensions&&".js"==r.substr(r.length-3,3)&&e(o,r.substr(0,r.length-3));var i=t&&o.packages[t];if(i&&"./"!=n.substr(0,2)){var s=i.map,l=s&&E(s,n);if(l)return d(o,i,t,l,n,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),u=t.call(o,n,r,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(n){var r=this;return Promise.resolve(t.call(this,n)).then(function(t){var a=e(r,n.name);if(a){var o=r.packages[a],i=n.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,n){n>l&&(l=n),v(s,t,n&&l>n)}),v(n.metadata,s)}o.format&&!n.metadata.loader&&(n.metadata.format=n.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(r){l=null,n(r)}l=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(n){return e.call(this,n)?!1:(l?this.reduceRegister_(l,n):u?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(U||q)?q?n(l,i):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var r=0;r<f.length;r++)l.reduceRegister_(i,f[r]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||n(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("");
+}}function p(e){h(),n(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);r.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,r.appendChild(g)}):t.call(this,i)}})}();var oe=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==$.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;o>a;a++){var i=e.normalizedDeps[a],s=n.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(r[s.groupIndex].splice($.call(r[s.groupIndex],s),1),0==r[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,r):c(d,r)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=l(t.name,r),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,i=a.importers.length;i>r;r++){var s=a.importers[r];if(!s.locked){var l=$.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;d>s;s++){var c,f=t.normalizedDeps[s],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;v>g;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function d(e,t){var n,r=t.defined[e];if(r)r.declarative?f(e,r,[],t):r.evaluated||c(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n["default"]:n}function c(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;s>i;i++){var l=t.normalizedDeps[i],u=r.defined[l];u&&c(u,r)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;a>n;n++)if(t.deps[n]==e)return d(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(-1!=$.call(t.normalizedDeps,o))return d(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(p(a)):t.esModule=r.newModule({"default":a,__useDefault:!0})}}function f(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,i=n.normalizedDeps.length;i>o;o++){var s=n.normalizedDeps[o];-1==$.call(r,s)&&(a.defined[s]?f(s,a.defined[s],r,a):a.get(s))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=R();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=R();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),J(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||"system"==t.metadata.format||!t.metadata.format&&M(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),f(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=R(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=m(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=n.deps.length;l>s;s++)i.push(Promise.resolve(a.normalize(n.deps[s],t.name)));return Promise.all(i).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),f(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),i("reduceRegister_",function(e){return function(t,n){if(n||!t.metadata.exports&&(!q||"global"!=t.metadata.format))return e.call(this,t,n);t.metadata.format="global";var r=t.metadata.entry=R();r.deps=t.metadata.deps;var a=z(t.metadata.exports);r.execute=function(){return a}}}),s(function(t){return function(){function n(t){if(Object.keys)Object.keys(e).forEach(t);else for(var n in e)i.call(e,n)&&t(n)}function r(t){n(function(n){if(-1==$.call(s,n)){try{var r=e[n]}catch(a){s.push(n)}t(n,r)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,n,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return n||(o={},r(function(e,t){o[e]=t})),function(){var t,a=n?z(n):{},u=!!n;if((!n||i)&&r(function(r,s){o[r]!==s&&"undefined"!=typeof s&&(i&&(e[r]=void 0),n||(a[r]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!A):r&&e.substr(0,r.length)==r?e.substr(r.length):e}var n=this;if(e.call(n),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var r=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");n.set("@@cjs-helpers",n.newModule({requireResolve:function(e,r){return t(n.normalizeSync(e,r))},getPathVars:function(e){var n,r=e.lastIndexOf("!");n=-1!=r?e.substr(0,r):e;var a=n.split("/");return a.pop(),a=a.join("/"),{filename:t(n),dirname:t(a)}}}))}}),i("fetch",function(t){return function(n){return n.metadata.scriptLoad&&U&&(e.define=this.amdDefine),t.call(this,n)}}),s(function(t){return function(){function n(e,t){e=e.replace(s,"");var n=e.match(d),r=(n[1].split(",")[t]||"require").replace(c,""),a=f[r]||(f[r]=new RegExp(l+r+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function r(e,t,n,a){if("object"==typeof e&&!(e instanceof Array))return r.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l["default"]:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o["import"](e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},n)}function a(t,a,i){function s(t,n,s){function c(e,n,a){return"string"==typeof e&&"function"!=typeof n?t(e):r.call(o,e,n,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},-1!=d&&f.splice(d,0,s),-1!=u&&f.splice(u,0,n),-1!=l&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),n=o.decanonicalize(e,s.id);return t&&".js"==n.substr(n.length-3,3)&&(n=n.substr(0,n.length-3)),n},f.splice(l,0,c));var p=e.require;e.require=r;var h=i.apply(-1==u?e:n,f);return e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h?h:void 0}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;-1!=(l=$.call(a,"require"))&&(a.splice(l,1),t||(a=a.concat(n(i.toString(),l)))),-1!=(u=$.call(a,"exports"))&&a.splice(u,1),-1!=(d=$.call(a,"module"))&&a.splice(d,1);var c=R();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,n){if(!n||!n.amd)return e.call(this,t,n);var r=t&&t.metadata,a=n.entry;if(r)if(r.format&&"detect"!=r.format){if(!a.name&&"amd"!=r.format)throw new Error("AMD define called while executing "+r.format+" module "+t.name)}else r.format="amd";if(a.name)r&&(r.entry||r.bundle?r.entry&&r.entry.name&&r.entry.name!=t.name&&(r.entry=void 0):r.entry=a,r.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!r)throw new TypeError("Unexpected anonymous AMD define.");if(r.entry&&!r.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);r.entry=a}}}),o.amdDefine=a,o.amdRequire=r}}),function(){function e(e,t){if(t){var n;if(e.pluginFirst){if(-1!=(n=t.lastIndexOf("!")))return t.substr(n+1)}else if(-1!=(n=t.indexOf("!")))return t.substr(0,n);return t}}function t(e,t){var n,r,a=t.lastIndexOf("!");return-1!=a?(e.pluginFirst?(n=t.substr(a+1),r=t.substr(0,a)):(n=t.substr(0,a),r=t.substr(a+1)||n.substr(n.lastIndexOf(".")+1)),{argument:n,plugin:r}):void 0}function r(e,t,n,r){return r&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?n+"!"+t:t+"!"+n}function a(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function o(n){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return n.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return r(l,d,c,a(l,u.argument))}}i("decanonicalize",o),i("normalizeSync",o),i("normalize",function(n){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return r(l,e[0],e[1],a(l,u.argument))}):n.call(l,o,i,s)}}),i("locate",function(e){return function(t){var n,r=this,a=t.name;return r.pluginFirst?-1!=(n=a.indexOf("!"))&&(t.metadata.loader=a.substr(0,n),t.name=a.substr(n+1)):-1!=(n=a.lastIndexOf("!"))&&(t.metadata.loader=a.substr(n+1),t.name=a.substr(0,n)),e.call(r,t).then(function(e){return-1==n&&t.metadata.loader?(r.pluginLoader||r).normalize(t.metadata.loader,t.name).then(function(n){return t.metadata.loader=n,e}):e}).then(function(e){var n=t.metadata.loader;if(!n)return e;if(t.name==n)throw new Error("Plugin "+n+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(r.defined&&r.defined[a])return e;var o=r.pluginLoader||r;return o["import"](n).then(function(n){return t.metadata.loaderModule=n,t.address=e,n.locate?n.locate.call(r,t):e})})}}),i("fetch",function(e){return function(t){var r=this;if(t.metadata.loaderModule&&"defined"!=t.metadata.format){if("function"==typeof t.metadata.loaderModule||t.metadata.loaderModule instanceof n&&"function"==typeof t.metadata.loaderModule["default"])return"";if(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch)return t.metadata.loaderModule.fetch.call(r,t,function(t){return e.call(r,t)})}return e.call(r,t)}}),i("translate",function(e){return function(t){var n=this,r=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(n,r)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a&&(t.source=a),e.apply(n,r)}):e.apply(n,r)}}),i("instantiate",function(e){return function(t){var r=this,a=!1;if(t.metadata.loaderModule&&!r.builder&&"defined"!=t.metadata.format){if(t.metadata.loaderModule.instantiate)return Promise.resolve(t.metadata.loaderModule.instantiate.call(r,t,function(t){if(a)throw new Error("Instantiate must only be called once.");return a=!0,e.call(r,t)})).then(function(n){return a?n:(void 0!==n&&x(t,n),e.call(r,t))});if("function"==typeof t.metadata.loaderModule||t.metadata.loaderModule instanceof n&&"function"==typeof t.metadata.loaderModule["default"])return Promise.resolve((t.metadata.loaderModule["default"]||t.metadata.loaderModule).call(r,t.address,t.name)).then(function(n){return void 0!==n&&x(t,n),e.call(r,t)})}return e.call(r,t)}})}();var ie=["browser","node","dev","build","production","default"],se=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,n,r){var a=this;return D.call(a,t,n).then(function(t){return e.call(a,t,n,r)}).then(function(e){return T.call(a,e,n)})}}),function(){i("fetch",function(e){return function(t){var n=t.metadata.alias,r=t.metadata.deps||[];if(n){t.metadata.format="defined";var a=R();return this.defined[t.name]=a,a.declarative=!0,a.deps=r.concat([n]),a.declare=function(e){return{setters:[function(t){for(var n in t)e(n,t[n]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,n){for(var r,a=t.split(".");a.length>1;)r=a.shift(),e=e[r]=e[r]||{};r=a.shift(),r in e||(e[r]=n)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var n,r=this.meta,a=t.name,o=0;for(var i in r)if(n=i.indexOf("*"),-1!==n&&i.substr(0,n)===a.substr(0,n)&&i.substr(n+1)===a.substr(a.length-i.length+n+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,r[i],o!=s)}return r[a]&&v(t.metadata,r[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,n=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(r){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(n),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return r.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var i=n.bundles[a][o];if(i==t.name){r=!0;break}if(-1!=i.indexOf("*")){var s=i.split("*");if(2!=s.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&-1==t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")){r=!0;break}}}if(r)return n["import"](a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var n=this,r=n.depCache[t.name];if(r)for(var a=0;a<r.length;a++)n["import"](r[a],t.name);return e.call(n,t)}})}(),s(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),i("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),V=new a,e.SystemJS=V,V.version="0.19.47 CSP","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=V),e.System=V}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var n=document.getElementsByTagName("script");if($__curScript=n[n.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),$__curScript.src||($__curScript=void 0),t){var r=$__curScript.src,a=r.substr(0,r.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(o){o.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
//# sourceMappingURL=system-csp-production.js.map
diff --git a/node_modules/systemjs/dist/system-csp-production.js.map b/node_modules/systemjs/dist/system-csp-production.js.map
index 2898b5b1f..e1fb76817 100644
--- a/node_modules/systemjs/dist/system-csp-production.js.map
+++ b/node_modules/systemjs/dist/system-csp-production.js.map
@@ -1 +1 @@
-{"version":3,"sources":["system-csp-production.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","load","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","__useDefault","systemTranslate","format","apply","arguments","entry","JSON","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","pluginLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","script","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","__exec","grouped","normalizePromises","reduceRegister","forEachGlobal","callback","keys","g","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","prepareGlobal","globals","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","stripOrigin","windowOrigin","requireResolve","parentId","getPathVars","moduleId","filename","pluginIndex","dirname","amdDefine","getCJSDeps","requireIndex","commentRegEx","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","lastIndex","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","loaderModule","args","result","sourceMap","originalName","file","sources","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","target","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","SystemJS","version","doPolyfill","scripts","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":"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"} \ No newline at end of file
+{"version":3,"sources":["system-csp-production.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","createInstantiate","load","result","metadata","entry","createEntry","execute","format","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","originalIndices","declare","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","__useDefault","systemTranslate","apply","arguments","JSON","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","pluginLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","script","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","__exec","grouped","normalizePromises","reduceRegister","forEachGlobal","callback","keys","g","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","prepareGlobal","globals","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","stripOrigin","windowOrigin","requireResolve","parentId","getPathVars","moduleId","filename","pluginIndex","dirname","amdDefine","getCJSDeps","requireIndex","commentRegEx","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","lastIndex","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","loaderModule","args","sourceMap","originalName","file","sources","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","target","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","SystemJS","version","doPolyfill","scripts","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":"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"} \ No newline at end of file
diff --git a/node_modules/systemjs/dist/system-csp-production.src.js b/node_modules/systemjs/dist/system-csp-production.src.js
index 70dd9125f..b727e9bdf 100644
--- a/node_modules/systemjs/dist/system-csp-production.src.js
+++ b/node_modules/systemjs/dist/system-csp-production.src.js
@@ -1,5 +1,5 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
(function() {
function bootstrap() {// from https://gist.github.com/Yaffle/1088850
@@ -7,7 +7,7 @@ function bootstrap() {// from https://gist.github.com/Yaffle/1088850
function URLPolyfill(url, baseURL) {
if (typeof url != 'string')
throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
+ var m = String(url).replace(/^\s+|\s+$/g, "").replace(/\\/g, '/').match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
if (!m)
throw new RangeError('Invalid URL format');
var protocol = m[1] || "";
@@ -65,7 +65,8 @@ function URLPolyfill(url, baseURL) {
this.hash = hash;
}
global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
+})(typeof self != 'undefined' ? self : global);
+(function(__global) {
var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
@@ -83,7 +84,7 @@ global.URLPolyfill = URLPolyfill;
}
return -1;
};
-
+
var defineProperty;
(function () {
try {
@@ -120,9 +121,9 @@ global.URLPolyfill = URLPolyfill;
newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
+
newErr.stack = newMsg;
-
+
// track the original error
newErr.originalErr = err.originalErr || err;
@@ -431,7 +432,7 @@ function logloads(loads) {
.then(function(instantiateResult) {
if (instantiateResult === undefined)
throw new TypeError('Declarative modules unsupported in the polyfill.');
-
+
if (typeof instantiateResult != 'object')
throw new TypeError('Invalid instantiate return value');
@@ -494,8 +495,6 @@ function logloads(loads) {
for (var i = 0, l = linkSets.length; i < l; i++) {
linkSetFailed(linkSets[i], load, exc);
}
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
});
}
@@ -548,7 +547,6 @@ function logloads(loads) {
proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
else {
- console.assert(step == 'translate', 'translate step');
load.address = stepState.moduleAddress;
proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
}
@@ -636,9 +634,6 @@ function logloads(loads) {
function updateLinkSetOnLoad(linkSet, load) {
// console.log('update linkset on load ' + load.name);
// snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
linkSet.loadingCount--;
if (linkSet.loadingCount > 0)
@@ -671,8 +666,6 @@ function logloads(loads) {
if (abrupt)
return;
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
linkSet.resolve(startingLoad);
}
@@ -681,7 +674,7 @@ function logloads(loads) {
var loader = linkSet.loader;
var requests;
- checkError:
+ checkError:
if (load) {
if (linkSet.loads[0].name == load.name) {
exc = addToError(exc, 'Error loading ' + load.name);
@@ -715,7 +708,6 @@ function logloads(loads) {
loader.loaderObj.failed.push(load);
var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
load.linkSets.splice(linkIndex, 1);
if (load.linkSets.length == 0) {
var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
@@ -747,7 +739,6 @@ function logloads(loads) {
}
// if not anonymous, add to the module table
if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
loader.modules[load.name] = load.module;
}
var loadIndex = indexOf.call(loader.loads, load);
@@ -857,7 +848,7 @@ function logloads(loads) {
var loader = this._loader;
if (loader.modules[name])
return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
+ return (loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
step: 'locate',
loader: loader,
moduleName: name,
@@ -865,9 +856,11 @@ function logloads(loads) {
moduleSource: undefined,
moduleAddress: undefined
}))
- .then(function() {
+ .then(function(load) {
delete loader.importPromises[name];
- }));
+ return load.module.module;
+ })))
+ .then(function () {});
},
// 26.3.3.11
module: function(source, options) {
@@ -977,7 +970,6 @@ function logloads(loads) {
})();
var System;
-
// SystemJS Loader Class and Extension helpers
function SystemJSLoader() {
Loader.call(this);
@@ -1054,7 +1046,7 @@ function applyPaths(loader, name) {
if (p.indexOf('*') === -1) {
if (name == p)
return paths[p];
-
+
// support trailing / in paths rules
else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
@@ -1208,7 +1200,7 @@ function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidPropertie
loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
}
}
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
+ else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
(!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
}
@@ -1230,7 +1222,7 @@ function setPkgConfig(loader, pkgName, cfg, prependConfig) {
extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
}
-
+
// main object becomes main map
if (typeof pkg.main == 'object') {
pkg.map = pkg.map || {};
@@ -1246,6 +1238,15 @@ function warn(msg) {
if (this.warnings && typeof console != 'undefined' && console.warn)
console.warn(msg);
}
+
+function createInstantiate (load, result) {
+ load.metadata.entry = createEntry();
+ load.metadata.entry.execute = function() {
+ return result;
+ }
+ load.metadata.entry.deps = [];
+ load.metadata.format = 'defined';
+}
var fetchTextFromURL;
if (typeof XMLHttpRequest != 'undefined') {
fetchTextFromURL = function(url, authorization, fulfill, reject) {
@@ -2674,7 +2675,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
*
*
* The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
+ * circular ES6 compiled into System.register can work alongside circular AMD
* and CommonJS, identically to the actual ES6 loader.
*
*/
@@ -2684,7 +2685,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
* Registry side table entries in loader.defined
* Registry Entry Contains:
* - name
- * - deps
+ * - deps
* - declare for declarative modules
* - execute for dynamic modules, different to declarative execute on module
* - executingRequire indicates require drives execution for circularity of dynamic modules
@@ -2702,7 +2703,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
* For dynamic we track the es module with:
* - esModule actual es module value
* - esmExports whether to extend the esModule with named exports
- *
+ *
* Then for declarative only we track dynamic bindings with the 'module' records:
* - name
* - exports
@@ -2747,7 +2748,7 @@ function createEntry() {
* see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
*
* 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
+ * the true or false statement
*
* this extension implements the linking algorithm for the two variations identical to the spec
* allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
@@ -2766,7 +2767,7 @@ function createEntry() {
return this.registerDynamic.apply(this, arguments);
var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
+ // ideally wouldn't apply map config to bundle names but
// dependencies go through map regardless so we can't restrict
// could reconsider in shift to new spec
entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
@@ -2852,17 +2853,17 @@ function createEntry() {
for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
var depName = entry.normalizedDeps[i];
var depEntry = loader.defined[depName];
-
+
// not in the registry means already linked / ES6
if (!depEntry || depEntry.evaluated)
continue;
-
+
// now we know the entry is in our unlinked linkage group
var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
// the group index of an entry is always the maximum
if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
+
// if already in a group, remove from the old group
if (depEntry.groupIndex !== null) {
groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
@@ -2902,7 +2903,7 @@ function createEntry() {
else
linkDynamicModule(entry, loader);
}
- curGroupDeclarative = !curGroupDeclarative;
+ curGroupDeclarative = !curGroupDeclarative;
}
}
@@ -2962,7 +2963,7 @@ function createEntry() {
// allowing undefined declaration was a mistake! To be deprecated.
declaration = declaration || { setters: [], execute: function() {} };
-
+
module.setters = declaration.setters;
module.execute = declaration.execute;
@@ -3005,7 +3006,7 @@ function createEntry() {
else {
module.dependencies.push(null);
}
-
+
// run setters for all entries with the matching dependency name
var originalIndices = entry.originalIndices[i];
for (var j = 0, len = originalIndices.length; j < len; ++j) {
@@ -3031,7 +3032,7 @@ function createEntry() {
else {
if (entry.declarative)
ensureEvaluated(name, entry, [], loader);
-
+
else if (!entry.evaluated)
linkDynamicModule(entry, loader);
@@ -3040,7 +3041,7 @@ function createEntry() {
if ((!entry || entry.declarative) && exports && exports.__useDefault)
return exports['default'];
-
+
return exports;
}
@@ -3078,7 +3079,7 @@ function createEntry() {
throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
}, exports, module);
-
+
if (output !== undefined)
module.exports = output;
@@ -3102,7 +3103,7 @@ function createEntry() {
* (unless one is a circular dependency already in the list of seen
* modules, in which case we execute it)
*
- * Then we evaluate the module itself depth-first left to right
+ * Then we evaluate the module itself depth-first left to right
* execution to match ES6 modules
*/
function ensureEvaluated(moduleName, entry, seen, loader) {
@@ -3148,7 +3149,7 @@ function createEntry() {
}
load.metadata.deps = load.metadata.deps || [];
-
+
return fetch.call(this, load);
};
});
@@ -3159,7 +3160,7 @@ function createEntry() {
load.metadata.deps = load.metadata.deps || [];
return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
// run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
+ if (load.metadata.format == 'register' || load.metadata.format == 'system' || !load.metadata.format && detectRegisterFormat(load.source))
load.metadata.format = 'register';
return source;
});
@@ -3177,7 +3178,7 @@ function createEntry() {
entry.originalIndices = entry.normalizedDeps = [];
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(normalized, entry, loader);
@@ -3228,9 +3229,9 @@ function createEntry() {
// Contains System.register calls
// (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
+ else if (!(loader.builder && load.metadata.bundle)
&& (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
+
if (typeof __exec != 'undefined')
__exec.call(loader, load);
@@ -3253,9 +3254,9 @@ function createEntry() {
// place this module onto defined for circular references
loader.defined[load.name] = entry;
-
+
var grouped = group(entry.deps);
-
+
entry.deps = grouped.names;
entry.originalIndices = grouped.indices;
entry.name = load.name;
@@ -3273,7 +3274,7 @@ function createEntry() {
return {
deps: entry.deps,
execute: function() {
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(load.name, entry, loader);
@@ -3909,15 +3910,16 @@ hookConstructor(function(constructor) {
hook('fetch', function(fetch) {
return function(load) {
var loader = this;
- if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
+ if (load.metadata.loaderModule && load.metadata.format != 'defined') {
+ if (typeof load.metadata.loaderModule === 'function' || load.metadata.loaderModule instanceof Module && typeof load.metadata.loaderModule.default === 'function')
+ return '';
load.metadata.scriptLoad = false;
- return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
- return fetch.call(loader, load);
- });
- }
- else {
- return fetch.call(loader, load);
+ if (load.metadata.loaderModule.fetch)
+ return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
+ return fetch.call(loader, load);
+ });
}
+ return fetch.call(loader, load);
};
});
@@ -3954,9 +3956,7 @@ hookConstructor(function(constructor) {
return translate.apply(loader, args);
});
}
- else {
- return translate.apply(loader, args);
- }
+ return translate.apply(loader, args);
};
});
@@ -3965,28 +3965,30 @@ hookConstructor(function(constructor) {
var loader = this;
var calledInstantiate = false;
- if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
- return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
- if (calledInstantiate)
- throw new Error('Instantiate must only be called once.');
- calledInstantiate = true;
- return instantiate.call(loader, load);
- })).then(function(result) {
- if (calledInstantiate)
- return result;
-
- if (result !== undefined) {
- load.metadata.entry = createEntry();
- load.metadata.entry.execute = function() {
+ if (load.metadata.loaderModule && !loader.builder && load.metadata.format != 'defined') {
+ if (load.metadata.loaderModule.instantiate)
+ return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
+ if (calledInstantiate)
+ throw new Error('Instantiate must only be called once.');
+ calledInstantiate = true;
+ return instantiate.call(loader, load);
+ })).then(function(result) {
+ if (calledInstantiate)
return result;
- }
- load.metadata.entry.deps = load.metadata.deps;
- load.metadata.format = 'defined';
- }
- return instantiate.call(loader, load);
- });
- else
- return instantiate.call(loader, load);
+
+ if (result !== undefined)
+ createInstantiate(load, result);
+ return instantiate.call(loader, load);
+ });
+ else if (typeof load.metadata.loaderModule === 'function' || load.metadata.loaderModule instanceof Module && typeof load.metadata.loaderModule.default === 'function')
+ return Promise.resolve((load.metadata.loaderModule.default || load.metadata.loaderModule).call(loader, load.address, load.name))
+ .then(function (result) {
+ if (result !== undefined)
+ createInstantiate(load, result);
+ return instantiate.call(loader, load);
+ });
+ }
+ return instantiate.call(loader, load);
};
});
@@ -4480,7 +4482,7 @@ hook('fetch', function(fetch) {
});System = new SystemJSLoader();
__global.SystemJS = System;
-System.version = '0.19.41 CSP';
+System.version = '0.19.47 CSP';
if (typeof module == 'object' && module.exports && typeof exports == 'object')
module.exports = System;
diff --git a/node_modules/systemjs/dist/system-polyfills.js b/node_modules/systemjs/dist/system-polyfills.js
index ca76c2418..bf3aaab1b 100644
--- a/node_modules/systemjs/dist/system-polyfills.js
+++ b/node_modules/systemjs/dist/system-polyfills.js
@@ -1,5 +1,5 @@
/*
* SystemJS Promise Polyfill
*/
-!function(t){!function(e){"object"==typeof exports?module.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function t(e,n,o){function r(u,c){if(!n[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};e[u][0].call(s.exports,function(t){var n=e[u][1][t];return r(n?n:t)},s,s.exports,t,e,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(t,e,n){var o=t("../lib/decorators/unhandledRejection"),r=o(t("../lib/Promise"));e.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n,o){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),o=t("./env").asap;return e({scheduler:new n(o)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n,o){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var o=t("../env").setTimer,r=t("../format");return function(t){function i(t){t.handled||(l.push(t),a("Potentially unhandled rejection ["+t.id+"] "+r.formatError(t.value)))}function u(t){var e=l.indexOf(t);e>=0&&(l.splice(e,1),h("Handled previous rejection ["+t.id+"] "+r.formatObject(t.value)))}function c(t,e){p.push(t,e),null===d&&(d=o(f,0))}function f(){for(d=null;p.length>0;)p.shift()(p.shift())}var s,a=n,h=n;"undefined"!=typeof console&&(s=console,a="undefined"!=typeof s.error?function(t){s.error(t)}:function(t){s.log(t)},h="undefined"!=typeof s.info?function(t){s.info(t)}:function(t){s.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(e,t.value)};var p=[],l=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n,o){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function o(t){function e(){var t=n;n=void 0,t()}var n,o=document.createTextNode(""),r=new t(e);r.observe(o,{characterData:!0});var i=0;return function(t){n=t,o.data=i^=1}}var r,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,e){return setTimeout(t,e)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(e())f=function(t){return process.nextTick(t)};else if(r=n())f=o(r);else if(!i){var s=t,a=s("vertx");u=function(t,e){return a.setTimer(e,t)},c=a.cancelTimer,f=a.runOnLoop||a.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(t){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n,o){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===_?e:n(t)}function n(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}function o(t){r.notify(t)}var r=new b;try{t(e,n,o)}catch(t){n(t)}return r}function o(t){return k(t)?t:new e(_,new x(v(t)))}function r(t){return new e(_,new x(new P(t)))}function i(){return $}function u(){return new e(_,new b)}function c(t,e){var n=new b(t.receiver,t.join().context);return new e(_,n)}function f(t){return a(B,null,t)}function s(t,e){return a(M,t,e)}function a(t,n,o){function r(e,r,u){u.resolved||h(o,i,e,t(n,r,e),u)}function i(t,e,n){a[t]=e,0===--s&&n.become(new q(a))}for(var u,c="function"==typeof n?r:i,f=new b,s=o.length>>>0,a=new Array(s),p=0;p<o.length&&!f.resolved;++p)u=o[p],void 0!==u||p in o?h(o,c,p,u,f):--s;return 0===s&&f.become(new q(a)),new e(_,f)}function h(t,e,n,o,r){if(U(o)){var i=m(o),u=i.state();0===u?i.fold(e,n,void 0,r):u>0?e(n,i.value,r):(r.become(i),p(t,n+1,i))}else e(n,o,r)}function p(t,e,n){for(var o=e;o<t.length;++o)l(v(t[o]),n)}function l(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):n<0&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?r(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?o(t[0]):y(t)}function y(t){var n,o,r,i=new b;for(n=0;n<t.length;++n)if(o=t[n],void 0!==o||n in t){if(r=v(o),0!==r.state()){i.become(r),p(t,n+1,r);break}r.visit(i,i.resolve,i.reject)}return new e(_,i)}function v(t){return k(t)?t._handler.join():U(t)?j(t):new q(t)}function m(t){return k(t)?t._handler.join():j(t)}function j(t){try{var e=t.then;return"function"==typeof e?new g(e,t):new q(t)}catch(t){return new P(t)}}function _(){}function w(){}function b(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function x(t){this.handler=t}function g(t,e){b.call(this),G.enqueue(new E(t,e,this))}function q(t){e.createContext(this),this.value=t}function P(t){e.createContext(this),this.id=++Y,this.value=t,this.handled=!1,this.reported=!1,this._report()}function R(t,e){this.rejection=t,this.context=e}function C(t){this.rejection=t}function O(){return new P(new TypeError("Promise cycle"))}function T(t,e){this.continuation=t,this.handler=e}function Q(t,e){this.handler=e,this.value=t}function E(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function L(t,e,n,o,r){try{t.call(e,n,o,r)}catch(t){o(t)}}function S(t,e,n,o){this.f=t,this.z=e,this.c=n,this.to=o,this.resolver=X,this.receiver=this}function k(t){return t instanceof e}function U(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function H(t,n,o,r){return"function"!=typeof t?r.become(n):(e.enterContext(n),F(t,n.value,o,r),void e.exitContext())}function N(t,n,o,r,i){return"function"!=typeof t?i.become(o):(e.enterContext(o),W(t,n,o.value,r,i),void e.exitContext())}function J(t,n,o,r,i){return"function"!=typeof t?i.notify(n):(e.enterContext(o),z(t,n,r,i),void e.exitContext())}function M(t,e,n){try{return t(e,n)}catch(t){return r(t)}}function F(t,e,n,o){try{o.become(v(t.call(n,e)))}catch(t){o.become(new P(t))}}function W(t,e,n,o,r){try{t.call(o,e,n,r)}catch(t){r.become(new P(t))}}function z(t,e,n,o){try{o.notify(t.call(n,e))}catch(t){o.notify(t)}}function A(t,e){e.prototype=V(t.prototype),e.prototype.constructor=e}function B(t,e){return e}function K(){}function D(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,e){return"unhandledRejection"===t?process.emit(t,e.value,e):process.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var o=!1;try{var r=new n("unhandledRejection");o=r instanceof n}catch(t){}return o?function(t,o){var r=new n(t,{detail:{reason:o.value,key:o},bubbles:!1,cancelable:!0});return!e.dispatchEvent(r)}:t}(K,self,CustomEvent):K}var G=t.scheduler,I=D(),V=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=o,e.reject=r,e.never=i,e._defer=u,e._handler=v,e.prototype.then=function(t,e,n){var o=this._handler,r=o.join().state();if("function"!=typeof t&&r>0||"function"!=typeof e&&r<0)return new this.constructor(_,o);var i=this._beget(),u=i._handler;return o.chain(u,o.receiver,t,e,n),i},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return c(this._handler,this.constructor)},e.all=f,e.race=d,e._traverse=s,e._visitRemaining=p,_.prototype.when=_.prototype.become=_.prototype.notify=_.prototype.fail=_.prototype._unreport=_.prototype._report=K,_.prototype._state=0,_.prototype.state=function(){return this._state},_.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},_.prototype.chain=function(t,e,n,o,r){this.when({resolver:t,receiver:e,fulfilled:n,rejected:o,progress:r})},_.prototype.visit=function(t,e,n,o){this.chain(X,t,e,n,o)},_.prototype.fold=function(t,e,n,o){this.when(new S(t,e,n,o))},A(_,w),w.prototype.become=function(t){t.fail()};var X=new w;A(_,b),b.prototype._state=0,b.prototype.resolve=function(t){this.become(v(t))},b.prototype.reject=function(t){this.resolved||this.become(new P(t))},b.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=O();return t},b.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},b.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&G.enqueue(this),void 0!==this.context&&t._report(this.context))},b.prototype.when=function(t){this.resolved?G.enqueue(new T(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},b.prototype.notify=function(t){this.resolved||G.enqueue(new Q(t,this))},b.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},b.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},b.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},A(_,x),x.prototype.when=function(t){G.enqueue(new T(t,this))},x.prototype._report=function(t){this.join()._report(t)},x.prototype._unreport=function(){this.join()._unreport()},A(b,g),A(_,q),q.prototype._state=1,q.prototype.fold=function(t,e,n,o){N(t,e,this,n,o)},q.prototype.when=function(t){H(t.fulfilled,this,t.receiver,t.resolver)};var Y=0;A(_,P),P.prototype._state=-1,P.prototype.fold=function(t,e,n,o){o.become(this)},P.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),H(t.rejected,this,t.receiver,t.resolver)},P.prototype._report=function(t){G.afterQueue(new R(this,t))},P.prototype._unreport=function(){this.handled||(this.handled=!0,G.afterQueue(new C(this)))},P.prototype.fail=function(t){this.reported=!0,I("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},R.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,I("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},C.prototype.run=function(){this.rejection.reported&&(I("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=K;var Z=new _,$=new e(_,Z);return T.prototype.run=function(){this.handler.join().when(this.continuation)},Q.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],J(e.progress,this.value,this.handler,e.receiver,e.resolver)},E.prototype.run=function(){function t(t){o.resolve(t)}function e(t){o.reject(t)}function n(t){o.notify(t)}var o=this.resolver;L(this._then,this.thenable,t,e,n)},S.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},S.prototype.rejected=function(t){this.to.reject(t)},S.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)}),"undefined"!=typeof systemJSBootstrap&&systemJSBootstrap()}();
+!function(t){!function(e){"object"==typeof exports?module.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function e(t,n,o){function r(u,c){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return r(n?n:e)},s,s.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(t,e,n){var o=t("../lib/decorators/unhandledRejection"),r=o(t("../lib/Promise"));e.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n,o){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),o=t("./env").asap;return e({scheduler:new n(o)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n,o){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var o=t("../env").setTimer,r=t("../format");return function(t){function i(t){t.handled||(l.push(t),a("Potentially unhandled rejection ["+t.id+"] "+r.formatError(t.value)))}function u(t){var e=l.indexOf(t);e>=0&&(l.splice(e,1),h("Handled previous rejection ["+t.id+"] "+r.formatObject(t.value)))}function c(t,e){p.push(t,e),null===d&&(d=o(f,0))}function f(){for(d=null;p.length>0;)p.shift()(p.shift())}var s,a=n,h=n;"undefined"!=typeof console&&(s=console,a="undefined"!=typeof s.error?function(t){s.error(t)}:function(t){s.log(t)},h="undefined"!=typeof s.info?function(t){s.info(t)}:function(t){s.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(e,t.value)};var p=[],l=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n,o){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function o(t){function e(){var t=n;n=void 0,t()}var n,o=document.createTextNode(""),r=new t(e);r.observe(o,{characterData:!0});var i=0;return function(t){n=t,o.data=i^=1}}var r,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,e){return setTimeout(t,e)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(e())f=function(t){return process.nextTick(t)};else if(r=n())f=o(r);else if(!i){var s=t,a=s("vertx");u=function(t,e){return a.setTimer(e,t)},c=a.cancelTimer,f=a.runOnLoop||a.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n,o){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===_?e:n(t)}function n(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}function o(t){r.notify(t)}var r=new b;try{t(e,n,o)}catch(i){n(i)}return r}function o(t){return k(t)?t:new e(_,new x(v(t)))}function r(t){return new e(_,new x(new P(t)))}function i(){return $}function u(){return new e(_,new b)}function c(t,e){var n=new b(t.receiver,t.join().context);return new e(_,n)}function f(t){return a(B,null,t)}function s(t,e){return a(M,t,e)}function a(t,n,o){function r(e,r,u){u.resolved||h(o,i,e,t(n,r,e),u)}function i(t,e,n){a[t]=e,0===--s&&n.become(new q(a))}for(var u,c="function"==typeof n?r:i,f=new b,s=o.length>>>0,a=new Array(s),p=0;p<o.length&&!f.resolved;++p)u=o[p],void 0!==u||p in o?h(o,c,p,u,f):--s;return 0===s&&f.become(new q(a)),new e(_,f)}function h(t,e,n,o,r){if(U(o)){var i=m(o),u=i.state();0===u?i.fold(e,n,void 0,r):u>0?e(n,i.value,r):(r.become(i),p(t,n+1,i))}else e(n,o,r)}function p(t,e,n){for(var o=e;o<t.length;++o)l(v(t[o]),n)}function l(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?r(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?o(t[0]):y(t)}function y(t){var n,o,r,i=new b;for(n=0;n<t.length;++n)if(o=t[n],void 0!==o||n in t){if(r=v(o),0!==r.state()){i.become(r),p(t,n+1,r);break}r.visit(i,i.resolve,i.reject)}return new e(_,i)}function v(t){return k(t)?t._handler.join():U(t)?j(t):new q(t)}function m(t){return k(t)?t._handler.join():j(t)}function j(t){try{var e=t.then;return"function"==typeof e?new g(e,t):new q(t)}catch(n){return new P(n)}}function _(){}function w(){}function b(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function x(t){this.handler=t}function g(t,e){b.call(this),G.enqueue(new E(t,e,this))}function q(t){e.createContext(this),this.value=t}function P(t){e.createContext(this),this.id=++Y,this.value=t,this.handled=!1,this.reported=!1,this._report()}function R(t,e){this.rejection=t,this.context=e}function C(t){this.rejection=t}function O(){return new P(new TypeError("Promise cycle"))}function T(t,e){this.continuation=t,this.handler=e}function Q(t,e){this.handler=e,this.value=t}function E(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function L(t,e,n,o,r){try{t.call(e,n,o,r)}catch(i){o(i)}}function S(t,e,n,o){this.f=t,this.z=e,this.c=n,this.to=o,this.resolver=X,this.receiver=this}function k(t){return t instanceof e}function U(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function H(t,n,o,r){return"function"!=typeof t?r.become(n):(e.enterContext(n),F(t,n.value,o,r),void e.exitContext())}function N(t,n,o,r,i){return"function"!=typeof t?i.become(o):(e.enterContext(o),W(t,n,o.value,r,i),void e.exitContext())}function J(t,n,o,r,i){return"function"!=typeof t?i.notify(n):(e.enterContext(o),z(t,n,r,i),void e.exitContext())}function M(t,e,n){try{return t(e,n)}catch(o){return r(o)}}function F(t,e,n,o){try{o.become(v(t.call(n,e)))}catch(r){o.become(new P(r))}}function W(t,e,n,o,r){try{t.call(o,e,n,r)}catch(i){r.become(new P(i))}}function z(t,e,n,o){try{o.notify(t.call(n,e))}catch(r){o.notify(r)}}function A(t,e){e.prototype=V(t.prototype),e.prototype.constructor=e}function B(t,e){return e}function K(){}function D(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,e){return"unhandledRejection"===t?process.emit(t,e.value,e):process.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var o=!1;try{var r=new n("unhandledRejection");o=r instanceof n}catch(i){}return o?function(t,o){var r=new n(t,{detail:{reason:o.value,key:o},bubbles:!1,cancelable:!0});return!e.dispatchEvent(r)}:t}(K,self,CustomEvent):K}var G=t.scheduler,I=D(),V=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=o,e.reject=r,e.never=i,e._defer=u,e._handler=v,e.prototype.then=function(t,e,n){var o=this._handler,r=o.join().state();if("function"!=typeof t&&r>0||"function"!=typeof e&&0>r)return new this.constructor(_,o);var i=this._beget(),u=i._handler;return o.chain(u,o.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return c(this._handler,this.constructor)},e.all=f,e.race=d,e._traverse=s,e._visitRemaining=p,_.prototype.when=_.prototype.become=_.prototype.notify=_.prototype.fail=_.prototype._unreport=_.prototype._report=K,_.prototype._state=0,_.prototype.state=function(){return this._state},_.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},_.prototype.chain=function(t,e,n,o,r){this.when({resolver:t,receiver:e,fulfilled:n,rejected:o,progress:r})},_.prototype.visit=function(t,e,n,o){this.chain(X,t,e,n,o)},_.prototype.fold=function(t,e,n,o){this.when(new S(t,e,n,o))},A(_,w),w.prototype.become=function(t){t.fail()};var X=new w;A(_,b),b.prototype._state=0,b.prototype.resolve=function(t){this.become(v(t))},b.prototype.reject=function(t){this.resolved||this.become(new P(t))},b.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=O();return t},b.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},b.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&G.enqueue(this),void 0!==this.context&&t._report(this.context))},b.prototype.when=function(t){this.resolved?G.enqueue(new T(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},b.prototype.notify=function(t){this.resolved||G.enqueue(new Q(t,this))},b.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},b.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},b.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},A(_,x),x.prototype.when=function(t){G.enqueue(new T(t,this))},x.prototype._report=function(t){this.join()._report(t)},x.prototype._unreport=function(){this.join()._unreport()},A(b,g),A(_,q),q.prototype._state=1,q.prototype.fold=function(t,e,n,o){N(t,e,this,n,o)},q.prototype.when=function(t){H(t.fulfilled,this,t.receiver,t.resolver)};var Y=0;A(_,P),P.prototype._state=-1,P.prototype.fold=function(t,e,n,o){o.become(this)},P.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),H(t.rejected,this,t.receiver,t.resolver)},P.prototype._report=function(t){G.afterQueue(new R(this,t))},P.prototype._unreport=function(){this.handled||(this.handled=!0,G.afterQueue(new C(this)))},P.prototype.fail=function(t){this.reported=!0,I("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},R.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,I("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},C.prototype.run=function(){this.rejection.reported&&(I("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=K;var Z=new _,$=new e(_,Z);return T.prototype.run=function(){this.handler.join().when(this.continuation)},Q.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],J(e.progress,this.value,this.handler,e.receiver,e.resolver)},E.prototype.run=function(){function t(t){o.resolve(t)}function e(t){o.reject(t)}function n(t){o.notify(t)}var o=this.resolver;L(this._then,this.thenable,t,e,n)},S.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},S.prototype.rejected=function(t){this.to.reject(t)},S.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)}),"undefined"!=typeof systemJSBootstrap&&systemJSBootstrap()}();
//# sourceMappingURL=system-polyfills.js.map
diff --git a/node_modules/systemjs/dist/system-polyfills.js.map b/node_modules/systemjs/dist/system-polyfills.js.map
index a53942fea..f5d121395 100644
--- a/node_modules/systemjs/dist/system-polyfills.js.map
+++ b/node_modules/systemjs/dist/system-polyfills.js.map
@@ -1 +1 @@
-{"version":3,"sources":["system-polyfills.src.js"],"names":["define","e","exports","module","amd","window","Promise","global","self","t","n","r","s","o","u","a","require","i","Error","f","call","length","1","unhandledRejections","PromiseConstructor","../lib/Promise","../lib/decorators/unhandledRejection","2","makePromise","Scheduler","async","asap","scheduler","factory","./Scheduler","./env","./makePromise","3","this","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","drain","_drain","prototype","enqueue","task","run","afterQueue","4","throwit","noop","setTimer","format","report","handled","reported","push","logError","id","formatError","value","unreport","indexOf","splice","logInfo","formatObject","x","tasks","running","flush","shift","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","../env","../format","5","isNode","process","Object","toString","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","node","document","createTextNode","observe","characterData","data","MutationObs","capturedSetTimeout","setTimeout","ms","clearTimer","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","6","stack","message","String","JSON","tryStringify","defaultValue","stringify","7","environment","resolver","handler","_handler","Handler","init","promiseResolve","resolve","promiseReject","reason","reject","promiseNotify","notify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","child","receiver","join","context","all","promises","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","resolved","traverseAt","settleAt","results","pending","become","Fulfilled","Array","maybeThenable","h","getHandlerMaybeThenable","state","fold","visitRemaining","start","markAsHandled","visit","_unreport","race","TypeError","runRace","getHandlerUntrusted","untrustedThen","then","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","z","c","to","failIfRejected","runContinuation1","next","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","b","thisArg","y","inherit","Parent","Child","objectCreate","constructor","initEmitRejection","emit","type","CustomEvent","hasCustomEvent","ev","detail","key","bubbles","cancelable","dispatchEvent","emitRejection","create","proto","_defer","onFulfilled","onRejected","onProgress","p","_beget","chain","_traverse","_visitRemaining","when","fail","_state","fulfilled","rejected","progress","q","cont","foreverPendingHandler","_resolve","_reject","_notify","systemJSBootstrap"],"mappings":"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"} \ No newline at end of file
+{"version":3,"sources":["system-polyfills.src.js"],"names":["define","e","exports","module","amd","window","Promise","global","self","t","n","r","s","o","u","a","require","i","Error","f","call","length",1,"unhandledRejections","PromiseConstructor","../lib/Promise","../lib/decorators/unhandledRejection",2,"makePromise","Scheduler","async","asap","scheduler","factory","./Scheduler","./env","./makePromise",3,"this","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","drain","_drain","prototype","enqueue","task","run","afterQueue",4,"throwit","noop","setTimer","format","report","handled","reported","push","logError","id","formatError","value","unreport","indexOf","splice","logInfo","formatObject","x","tasks","running","flush","shift","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","../env","../format",5,"isNode","process","Object","toString","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","node","document","createTextNode","observe","characterData","data","MutationObs","capturedSetTimeout","setTimeout","ms","clearTimer","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext",6,"stack","message","String","JSON","tryStringify","defaultValue","stringify",7,"environment","resolver","handler","_handler","Handler","init","promiseResolve","resolve","promiseReject","reason","reject","promiseNotify","notify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","child","receiver","join","context","all","promises","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","resolved","traverseAt","settleAt","results","pending","become","Fulfilled","Array","maybeThenable","h","getHandlerMaybeThenable","state","fold","visitRemaining","start","markAsHandled","visit","_unreport","race","TypeError","runRace","getHandlerUntrusted","untrustedThen","then","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","z","c","to","failIfRejected","runContinuation1","next","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","b","thisArg","y","inherit","Parent","Child","objectCreate","constructor","initEmitRejection","emit","type","CustomEvent","hasCustomEvent","ev","detail","key","bubbles","cancelable","dispatchEvent","emitRejection","create","proto","_defer","onFulfilled","onRejected","onProgress","p","_beget","chain","_traverse","_visitRemaining","when","fail","_state","fulfilled","rejected","progress","q","cont","foreverPendingHandler","_resolve","_reject","_notify","systemJSBootstrap"],"mappings":"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"} \ No newline at end of file
diff --git a/node_modules/systemjs/dist/system-register-only.js b/node_modules/systemjs/dist/system-register-only.js
index 15a9154f0..cb6ed3b38 100644
--- a/node_modules/systemjs/dist/system-register-only.js
+++ b/node_modules/systemjs/dist/system-register-only.js
@@ -1,5 +1,5 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
-!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",i=r[3]||"",s=r[4]||"",d=r[5]||"",l=r[6]||"",u=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!s&&!o;!p||u||c||(c=m.search),p&&"/"!==u[0]&&(u=u?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+u:m.pathname);var h=[];u.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),u=h.join("").replace(/^\//,"/"===u[0]?"/":""),p&&(l=m.port,d=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}u=u.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+u+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=d,this.port=l,this.pathname=u,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)"undefined"!=typeof $__curScript&&n[a].indexOf($__curScript.src)!=-1||r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n\t"):e.message.substr(11))+"\n\t"+t;y||(o=o.replace(b?/file:\/\/\//g:/file:\/\//g,""));var i=E?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},w(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},k.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){k=e(k||function(){})}function d(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function l(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e;return new P(e,t&&t.replace(/#/g,"%05")||I).href.replace(/%05/g,"#")}function u(e,t){var n,r="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var u=o[s];if(u!==i[s]&&(u=o[s]=i[s]=l(o[s],d(o[s])?S:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var c=s.split("*");if(c.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=c[0].length;f>=a&&t.substr(0,c[0].length)==c[0]&&t.substr(t.length-c[1].length)==c[1]&&(a=f,r=s,n=t.substr(c[0].length,t.length-c[1].length-c[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function c(e){for(var t=[],n=[],r=0,a=e.length;r<a;r++){var o=x.call(t,e[r]);o===-1?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function f(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(R)for(var r in t)"default"!==r&&m(n,t,r);else p(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function m(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function p(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function h(e){var t=e.match(z);return t&&"System.register"==e.substr(t[0].length,15)}function g(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}var v="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,y="undefined"!=typeof window&&"undefined"!=typeof document,b="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var w,x=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(w=Object.defineProperty)}catch(e){w=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var S,E="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(S=document.baseURI,!S){var O=document.getElementsByTagName("base");S=O[0]&&O[0].href||window.location.href}}else"undefined"!=typeof location&&(S=e.location.href);if(S)S=S.split("#")[0].split("?")[0],S=S.substr(0,S.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");S="file://"+(b?"/":"")+process.cwd()+"/",b&&(S=S.replace(/\\/g,"/"))}try{var _="test:"==new e.URL("test:///").protocol}catch(e){}var P=_?e.URL:e.URLPolyfill;w(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(l({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;a<o;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),i(t,r),r})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,n){d(e,t,n.then(function(n){if("loading"==t.status)return t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})}))}function d(e,t,n){n.then(function(n){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,i=n.length;a<i;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,i=r.length;o<i;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;n<r;n++)m(e[n],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;r<a;r++)p(n[r],t,e)})}function l(t){return function(n,r){var a=t.loader,o=t.moduleName,l=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=l||c.source||(c.address=t.moduleAddress,d(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=u(a,p);a.loads.push(p),n(h.done),"locate"==l?i(a,p):"fetch"==l?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,d(a,p,Promise.resolve(t.moduleSource)))}}function u(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;n<r;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;n<r;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;a<o;a++){var t=r[a];t.module={name:t.name,module:S({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var i=f(e);i||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var d=i.dependencies[s];if(d.value==n.name){r=t(r,"Error loading "+n.name+' as "'+d.key+'" from '+i.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var l=e.loads.concat([]),o=0,u=l.length;o<u;o++){var n=l[o];a.loaderObj.failed=a.loaderObj.failed||[],x.call(a.loaderObj.failed,n)==-1&&a.loaderObj.failed.push(n);var c=x.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=x.call(e.loader.loads,n);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=x.call(e.loads,t);r!=-1&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;a<o;a++)r=x.call(t.linkSets[a].loads,t),r!=-1&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(e){return void r(t,e)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(l({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(l({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,n){var r=e();r.address=n&&n.address;var a=u(this._loader,r),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return r.module.module});return d(i,r,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){w(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var S=r.prototype.newModule}();var j;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var k,M=/^[^\/]+:\/\//,I=new P(S),R=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){R=!1}var M=/^([^\/]+:\/\/|\/)/;a.prototype.normalize=function(e,t,n){return e=e.match(M)||"."==e[0]?new P(e,t||S).href:new P(u(this,e)||e,S).href},function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<u.length;e++)if("interactive"==u[e].script.readyState)return s=u[e],s.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),d=t;try{importScripts(t.address)}catch(e){d=null,n(e)}d=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,s,d=null,l=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),u=[],c=0,f=[];i("pushRegister_",function(e){return function(n){return!e.call(this,n)&&(d?this.reduceRegister_(d,n):l?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),i("fetch",function(t){return function(i){var d=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(y||v)?v?n(d,i):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!l){for(var r=0;r<f.length;r++)d.reduceRegister_(i,f[r]);f=[]}}else d.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||n(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),n(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<u.length;t++)u[t].script==g&&(s&&s.script==g&&(s=null),u.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);r.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),l?(g.attachEvent("onreadystatechange",m),u.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,r.appendChild(g)}):t.call(this,i)}})}();var z=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],x.call(r[e.groupIndex],e)==-1){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=n.defined[i];if(s&&!s.evaluated){var d=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<d){if(null!==s.groupIndex&&(r[s.groupIndex].splice(x.call(r[s.groupIndex],s),1),0==r[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=d}t(s,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],d=0;d<s.length;d++){var u=s[d];o?l(u,r):m(u,r)}o=!o}}}function o(){}function d(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function l(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=d(t.name,r),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,i=a.importers.length;r<i;r++){var s=a.importers[r];if(!s.locked){var d=x.call(s.dependencies,a),l=s.setters[d];l&&l(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,u=t.normalizedDeps.length;s<u;s++){var c,f=t.normalizedDeps[s],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(l(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function u(e,t){var n,r=t.defined[e];if(r)r.declarative?p(e,r,[],t):r.evaluated||m(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n.default:n}function m(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var d=t.normalizedDeps[i],l=r.defined[d];l&&m(l,r)}t.evaluated=!0;var c=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;n<a;n++)if(t.deps[n]==e)return u(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(x.call(t.normalizedDeps,o)!=-1)return u(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==c&&(o.exports=c),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(f(a)):t.esModule=r.newModule({default:a,__useDefault:!0})}}function p(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,i=n.normalizedDeps.length;o<i;o++){var s=n.normalizedDeps[o];x.call(r,s)==-1&&(a.defined[s]?p(s,a.defined[s],r,a):a.get(s))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=g();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=g();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),w(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&h(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),p(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=g(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=c(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,d=n.deps.length;s<d;s++)i.push(Promise.resolve(a.normalize(n.deps[s],t.name)));return Promise.all(i).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),p(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var i=n.bundles[a][o];if(i==t.name){r=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){r=!0;break}}}if(r)return n.import(a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),s(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),i("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),j=new a,e.SystemJS=j,j.version="0.19.41 Register Only","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=j),e.System=j}("undefined"!=typeof self?self:global);
+!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").replace(/\\/g,"/").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",s=r[3]||"",i=r[4]||"",d=r[5]||"",l=r[6]||"",u=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!i&&!o;!p||u||c||(c=m.search),p&&"/"!==u[0]&&(u=u?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+u:m.pathname);var h=[];u.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),u=h.join("").replace(/^\//,"/"===u[0]?"/":""),p&&(l=m.port,d=m.hostname,i=m.host,s=m.password,o=m.username),a||(a=m.protocol)}u=u.replace(/\\/g,"/"),this.origin=i?a+(""!==a||""!==i?"//":"")+i:"",this.href=a+(a&&i||"file:"==a?"//":"")+(""!==o?o+(""!==s?":"+s:"")+"@":"")+i+u+c+f,this.protocol=a,this.username=o,this.password=s,this.host=i,this.hostname=d,this.port=l,this.pathname=u,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)("undefined"==typeof $__curScript||-1==n[a].indexOf($__curScript.src))&&r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n "):e.message.substr(11))+"\n "+t;y||(o=o.replace(b?/file:\/\/\//g:/file:\/\//g,""));var s=E?new Error(o,e.fileName,e.lineNumber):new Error(o);return s.stack=o,s.originalErr=e.originalErr||e,s}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},w(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},M.call(this)}function o(){}function s(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function i(e){M=e(M||function(){})}function d(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function l(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e.substr(2)}else if("/"!=e[0]&&-1==e.indexOf(":"))return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e;return new j(e,t&&t.replace(/#/g,"%05")||R).href.replace(/%05/g,"#")}function u(e,t){var n,r="",a=0,o=e.paths,s=e._loader.paths;for(var i in o)if(!o.hasOwnProperty||o.hasOwnProperty(i)){var u=o[i];if(u!==s[i]&&(u=o[i]=s[i]=l(o[i],d(o[i])?S:e.baseURL)),-1===i.indexOf("*")){if(t==i)return o[i];if(t.substr(0,i.length-1)==i.substr(0,i.length-1)&&(t.length<i.length||t[i.length-1]==i[i.length-1])&&("/"==o[i][o[i].length-1]||""==o[i]))return o[i].substr(0,o[i].length-1)+(t.length>i.length?(o[i]&&"/"||"")+t.substr(i.length):"")}else{var c=i.split("*");if(c.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=c[0].length;f>=a&&t.substr(0,c[0].length)==c[0]&&t.substr(t.length-c[1].length)==c[1]&&(a=f,r=i,n=t.substr(c[0].length,t.length-c[1].length-c[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function c(e){for(var t=[],n=[],r=0,a=e.length;a>r;r++){var o=x.call(t,e[r]);-1===o?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function f(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(z)for(var r in t)"default"!==r&&m(n,t,r);else p(n,t);return n["default"]=t,w(n,"__useDefault",{value:!0}),n}function m(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(a){return e[n]=t[n],!1}}function p(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)(!r||t.hasOwnProperty(a))&&(n&&a in e||(e[a]=t[a]));return e}function h(e){var t=e.match(D);return t&&"System.register"==e.substr(t[0].length,15)}function g(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}var v="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,y="undefined"!=typeof window&&"undefined"!=typeof document,b="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var w,x=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(w=Object.defineProperty)}catch(e){w=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(r){}}}}();var S,E="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(S=document.baseURI,!S){var O=document.getElementsByTagName("base");S=O[0]&&O[0].href||window.location.href}}else"undefined"!=typeof location&&(S=e.location.href);if(S)S=S.split("#")[0].split("?")[0],S=S.substr(0,S.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");S="file://"+(b?"/":"")+process.cwd()+"/",b&&(S=S.replace(/\\/g,"/"))}try{var _="test:"==new e.URL("test:///").protocol}catch(P){}var j=_?e.URL:e.URLPolyfill;w(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(l({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;o>a;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),s(t,r),r})}function s(e,t){i(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function i(e,t,n){d(e,t,n.then(function(n){return"loading"==t.status?(t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})):void 0}))}function d(e,t,n){n.then(function(n){return"loading"==t.status?(t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,s=n.length;s>a;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,s=r.length;s>o;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;r>n;n++)m(e[n],t)})):void 0})["catch"](function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;a>r;r++)p(n[r],t,e)})}function l(t){return function(n,r){var a=t.loader,o=t.moduleName,l=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;m>f;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=l||c.source||(c.address=t.moduleAddress,d(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=u(a,p);a.loads.push(p),n(h.done),"locate"==l?s(a,p):"fetch"==l?i(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,d(a,p,Promise.resolve(t.moduleSource)))}}function u(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;r>n;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;r>n;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var s=0,i=a.loads.length;i>s;s++)if(a.loads[s].name==o){c(e,a.loads[s]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;o>a;a++){var t=r[a];t.module={name:t.name,module:S({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var s=f(e);s||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var s=e.loads[o],i=0;i<s.dependencies.length;i++){var d=s.dependencies[i];if(d.value==n.name){r=t(r,"Error loading "+n.name+' as "'+d.key+'" from '+s.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var l=e.loads.concat([]),o=0,u=l.length;u>o;o++){var n=l[o];a.loaderObj.failed=a.loaderObj.failed||[],-1==x.call(a.loaderObj.failed,n)&&a.loaderObj.failed.push(n);var c=x.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=x.call(e.loader.loads,n);-1!=f&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=x.call(e.loads,t);-1!=r&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;o>a;a++)r=x.call(t.linkSets[a].loads,t),-1!=r&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(o){return void r(t,o)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],s=g(e,o,t);if(!s)return;o.module={name:o.name,module:s},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(l({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},"delete":function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],t.modules[e]?delete t.modules[e]:!1},get:function(e){return this._loader.modules[e]?this._loader.modules[e].module:void 0},has:function(e){return!!this._loader.modules[e]},"import":function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():(t.importPromises[e]||v(this,e,new Promise(l({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(n){return delete t.importPromises[e],n.module.module}))).then(function(){})},module:function(t,n){var r=e();r.address=n&&n.address;var a=u(this._loader,r),o=Promise.resolve(t),s=this._loader,i=a.done.then(function(){return r.module.module});return d(s,r,o),i},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){w(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var S=r.prototype.newModule}();var k;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var M,I=/^[^\/]+:\/\//,R=new j(S),z=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(P){z=!1}var I=/^([^\/]+:\/\/|\/)/;a.prototype.normalize=function(e,t,n){return e=e.match(I)||"."==e[0]?new j(e,t||S).href:new j(u(this,e)||e,S).href},function(){function t(){if(i&&"interactive"===i.script.readyState)return i.load;for(var e=0;e<u.length;e++)if("interactive"==u[e].script.readyState)return i=u[e],i.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),d=t;try{importScripts(t.address)}catch(r){d=null,n(r)}d=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,i,d=null,l=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),u=[],c=0,f=[];s("pushRegister_",function(e){return function(n){return e.call(this,n)?!1:(d?this.reduceRegister_(d,n):l?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),s("fetch",function(t){return function(s){var d=this;return"json"!=s.metadata.format&&s.metadata.scriptLoad&&(y||v)?v?n(d,s):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,s.metadata.entry||f.length){if(!l){for(var r=0;r<f.length;r++)d.reduceRegister_(s,f[r]);f=[]}}else d.reduceRegister_(s);h(),s.metadata.entry||s.metadata.bundle||n(new Error(s.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),n(new Error("Unable to load script "+s.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<u.length;t++)u[t].script==g&&(i&&i.script==g&&(i=null),u.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);r.removeChild(g)}var g=document.createElement("script");g.async=!0,s.metadata.crossOrigin&&(g.crossOrigin=s.metadata.crossOrigin),s.metadata.integrity&&g.setAttribute("integrity",s.metadata.integrity),l?(g.attachEvent("onreadystatechange",m),u.push({script:g,load:s})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=s.address,r.appendChild(g)}):t.call(this,s)}})}();var D=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==x.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;o>a;a++){var s=e.normalizedDeps[a],i=n.defined[s];if(i&&!i.evaluated){var d=e.groupIndex+(i.declarative!=e.declarative);if(null===i.groupIndex||i.groupIndex<d){if(null!==i.groupIndex&&(r[i.groupIndex].splice(x.call(r[i.groupIndex],i),1),0==r[i.groupIndex].length))throw new Error("Mixed dependency cycle detected");i.groupIndex=d}t(i,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,s=a.length-1;s>=0;s--){for(var i=a[s],d=0;d<i.length;d++){var u=i[d];o?l(u,r):m(u,r)}o=!o}}}function o(){}function d(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function l(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=d(t.name,r),o=t.module.exports,s=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,s=a.importers.length;s>r;r++){var i=a.importers[r];if(!i.locked){var d=x.call(i.dependencies,a),l=i.setters[d];l&&l(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof s&&(s={setters:[],execute:s}),s=s||{setters:[],execute:function(){}},a.setters=s.setters,a.execute=s.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var i=0,u=t.normalizedDeps.length;u>i;i++){var c,f=t.normalizedDeps[i],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(l(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[i],g=0,v=h.length;v>g;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function u(e,t){var n,r=t.defined[e];if(r)r.declarative?p(e,r,[],t):r.evaluated||m(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n["default"]:n}function m(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var s=0,i=t.normalizedDeps.length;i>s;s++){var d=t.normalizedDeps[s],l=r.defined[d];l&&m(l,r)}t.evaluated=!0;var c=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;a>n;n++)if(t.deps[n]==e)return u(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(-1!=x.call(t.normalizedDeps,o))return u(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==c&&(o.exports=c),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(f(a)):t.esModule=r.newModule({"default":a,__useDefault:!0})}}function p(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,s=n.normalizedDeps.length;s>o;o++){var i=n.normalizedDeps[o];-1==x.call(r,i)&&(a.defined[i]?p(i,a.defined[i],r,a):a.get(i))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=g();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=g();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},s("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),i(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),w(o,"toString",{value:function(){return"Module"}}),s("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),s("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),s("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||"system"==t.metadata.format||!t.metadata.format&&h(t.source))&&(t.metadata.format="register"),e})}}),s("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),p(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),s("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=g(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=c(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var s=[],i=0,d=n.deps.length;d>i;i++)s.push(Promise.resolve(a.normalize(n.deps[i],t.name)));return Promise.all(s).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),p(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),function(){i(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),s("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var s=n.bundles[a][o];if(s==t.name){r=!0;break}if(-1!=s.indexOf("*")){var i=s.split("*");if(2!=i.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,i[0].length)==i[0]&&t.name.substr(t.name.length-i[1].length,i[1].length)==i[1]&&-1==t.name.substr(i[0].length,t.name.length-i[1].length-i[0].length).indexOf("/")){r=!0;break}}}if(r)return n["import"](a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),i(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),s("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),k=new a,e.SystemJS=k,k.version="0.19.47 Register Only","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=k),e.System=k}("undefined"!=typeof self?self:global);
//# sourceMappingURL=system-register-only.js.map
diff --git a/node_modules/systemjs/dist/system-register-only.js.map b/node_modules/systemjs/dist/system-register-only.js.map
index c3f8fbee0..78f2b4516 100644
--- a/node_modules/systemjs/dist/system-register-only.js.map
+++ b/node_modules/systemjs/dist/system-register-only.js.map
@@ -1 +1 @@
-{"version":3,"sources":["system-register-only.src.js"],"names":["global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isRel","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","isWorker","window","importScripts","document","process","platform","console","assert","Array","item","thisLen","e","obj","prop","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","Promise","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","resolve","reject","normalize","then","load","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","concat","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","map","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","has","import","parentName","parentAddress","sourcePromise","newModule","pNames","getOwnPropertyNames","configurable","enumerable","set","freeze","referrerName","referrerAddress","System","absURLRegEx","getInteractiveScriptLoad","interactiveScript","script","readyState","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","entry","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","format","scriptLoad","complete","evt","cleanup","bundle","require","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","addEventListener","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","__useDefault","nameNormalized","normalizeSync","__esModule","default","seen","registerDynamic","apply","arguments","decanonicalize","pushRegister_","amd","curMeta","del","doLoad","normalized","builder","__exec","grouped","normalizePromises","bundles","loadedBundles","matched","curModule","parts","substring","amdDefine","SystemJS","version"],"mappings":"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"} \ No newline at end of file
+{"version":3,"sources":["system-register-only.src.js"],"names":["global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isRel","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","isWorker","window","importScripts","document","process","platform","console","assert","Array","item","thisLen","e","obj","prop","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","Promise","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","resolve","reject","normalize","then","load","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","concat","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","map","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","has","import","parentName","parentAddress","sourcePromise","newModule","pNames","getOwnPropertyNames","configurable","enumerable","set","freeze","referrerName","referrerAddress","System","absURLRegEx","getInteractiveScriptLoad","interactiveScript","script","readyState","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","entry","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","format","scriptLoad","complete","evt","cleanup","bundle","require","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","addEventListener","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","__useDefault","nameNormalized","normalizeSync","__esModule","default","seen","registerDynamic","apply","arguments","decanonicalize","pushRegister_","amd","curMeta","del","doLoad","normalized","builder","__exec","grouped","normalizePromises","bundles","loadedBundles","matched","curModule","parts","substring","amdDefine","SystemJS","version"],"mappings":"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"} \ No newline at end of file
diff --git a/node_modules/systemjs/dist/system-register-only.src.js b/node_modules/systemjs/dist/system-register-only.src.js
index 9be783dff..e826a2db4 100644
--- a/node_modules/systemjs/dist/system-register-only.src.js
+++ b/node_modules/systemjs/dist/system-register-only.src.js
@@ -1,12 +1,12 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
// from https://gist.github.com/Yaffle/1088850
(function(global) {
function URLPolyfill(url, baseURL) {
if (typeof url != 'string')
throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
+ var m = String(url).replace(/^\s+|\s+$/g, "").replace(/\\/g, '/').match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
if (!m)
throw new RangeError('Invalid URL format');
var protocol = m[1] || "";
@@ -64,7 +64,8 @@ function URLPolyfill(url, baseURL) {
this.hash = hash;
}
global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
+})(typeof self != 'undefined' ? self : global);
+(function(__global) {
var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
@@ -82,7 +83,7 @@ global.URLPolyfill = URLPolyfill;
}
return -1;
};
-
+
var defineProperty;
(function () {
try {
@@ -119,9 +120,9 @@ global.URLPolyfill = URLPolyfill;
newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
+
newErr.stack = newMsg;
-
+
// track the original error
newErr.originalErr = err.originalErr || err;
@@ -430,7 +431,7 @@ function logloads(loads) {
.then(function(instantiateResult) {
if (instantiateResult === undefined)
throw new TypeError('Declarative modules unsupported in the polyfill.');
-
+
if (typeof instantiateResult != 'object')
throw new TypeError('Invalid instantiate return value');
@@ -493,8 +494,6 @@ function logloads(loads) {
for (var i = 0, l = linkSets.length; i < l; i++) {
linkSetFailed(linkSets[i], load, exc);
}
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
});
}
@@ -547,7 +546,6 @@ function logloads(loads) {
proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
else {
- console.assert(step == 'translate', 'translate step');
load.address = stepState.moduleAddress;
proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
}
@@ -635,9 +633,6 @@ function logloads(loads) {
function updateLinkSetOnLoad(linkSet, load) {
// console.log('update linkset on load ' + load.name);
// snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
linkSet.loadingCount--;
if (linkSet.loadingCount > 0)
@@ -670,8 +665,6 @@ function logloads(loads) {
if (abrupt)
return;
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
linkSet.resolve(startingLoad);
}
@@ -680,7 +673,7 @@ function logloads(loads) {
var loader = linkSet.loader;
var requests;
- checkError:
+ checkError:
if (load) {
if (linkSet.loads[0].name == load.name) {
exc = addToError(exc, 'Error loading ' + load.name);
@@ -714,7 +707,6 @@ function logloads(loads) {
loader.loaderObj.failed.push(load);
var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
load.linkSets.splice(linkIndex, 1);
if (load.linkSets.length == 0) {
var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
@@ -746,7 +738,6 @@ function logloads(loads) {
}
// if not anonymous, add to the module table
if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
loader.modules[load.name] = load.module;
}
var loadIndex = indexOf.call(loader.loads, load);
@@ -856,7 +847,7 @@ function logloads(loads) {
var loader = this._loader;
if (loader.modules[name])
return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
+ return (loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
step: 'locate',
loader: loader,
moduleName: name,
@@ -864,9 +855,11 @@ function logloads(loads) {
moduleSource: undefined,
moduleAddress: undefined
}))
- .then(function() {
+ .then(function(load) {
delete loader.importPromises[name];
- }));
+ return load.module.module;
+ })))
+ .then(function () {});
},
// 26.3.3.11
module: function(source, options) {
@@ -976,7 +969,6 @@ function logloads(loads) {
})();
var System;
-
// SystemJS Loader Class and Extension helpers
function SystemJSLoader() {
Loader.call(this);
@@ -1053,7 +1045,7 @@ function applyPaths(loader, name) {
if (p.indexOf('*') === -1) {
if (name == p)
return paths[p];
-
+
// support trailing / in paths rules
else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
@@ -1207,7 +1199,7 @@ function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidPropertie
loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
}
}
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
+ else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
(!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
}
@@ -1229,7 +1221,7 @@ function setPkgConfig(loader, pkgName, cfg, prependConfig) {
extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
}
-
+
// main object becomes main map
if (typeof pkg.main == 'object') {
pkg.map = pkg.map || {};
@@ -1245,6 +1237,15 @@ function warn(msg) {
if (this.warnings && typeof console != 'undefined' && console.warn)
console.warn(msg);
}
+
+function createInstantiate (load, result) {
+ load.metadata.entry = createEntry();
+ load.metadata.entry.execute = function() {
+ return result;
+ }
+ load.metadata.entry.deps = [];
+ load.metadata.format = 'defined';
+}
var absURLRegEx = /^([^\/]+:\/\/|\/)/;
// Normalization with module names as absolute URLs
@@ -1476,7 +1477,7 @@ SystemJSLoader.prototype.locate = function(load) {
*
*
* The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
+ * circular ES6 compiled into System.register can work alongside circular AMD
* and CommonJS, identically to the actual ES6 loader.
*
*/
@@ -1486,7 +1487,7 @@ SystemJSLoader.prototype.locate = function(load) {
* Registry side table entries in loader.defined
* Registry Entry Contains:
* - name
- * - deps
+ * - deps
* - declare for declarative modules
* - execute for dynamic modules, different to declarative execute on module
* - executingRequire indicates require drives execution for circularity of dynamic modules
@@ -1504,7 +1505,7 @@ SystemJSLoader.prototype.locate = function(load) {
* For dynamic we track the es module with:
* - esModule actual es module value
* - esmExports whether to extend the esModule with named exports
- *
+ *
* Then for declarative only we track dynamic bindings with the 'module' records:
* - name
* - exports
@@ -1549,7 +1550,7 @@ function createEntry() {
* see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
*
* 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
+ * the true or false statement
*
* this extension implements the linking algorithm for the two variations identical to the spec
* allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
@@ -1568,7 +1569,7 @@ function createEntry() {
return this.registerDynamic.apply(this, arguments);
var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
+ // ideally wouldn't apply map config to bundle names but
// dependencies go through map regardless so we can't restrict
// could reconsider in shift to new spec
entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
@@ -1654,17 +1655,17 @@ function createEntry() {
for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
var depName = entry.normalizedDeps[i];
var depEntry = loader.defined[depName];
-
+
// not in the registry means already linked / ES6
if (!depEntry || depEntry.evaluated)
continue;
-
+
// now we know the entry is in our unlinked linkage group
var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
// the group index of an entry is always the maximum
if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
+
// if already in a group, remove from the old group
if (depEntry.groupIndex !== null) {
groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
@@ -1704,7 +1705,7 @@ function createEntry() {
else
linkDynamicModule(entry, loader);
}
- curGroupDeclarative = !curGroupDeclarative;
+ curGroupDeclarative = !curGroupDeclarative;
}
}
@@ -1764,7 +1765,7 @@ function createEntry() {
// allowing undefined declaration was a mistake! To be deprecated.
declaration = declaration || { setters: [], execute: function() {} };
-
+
module.setters = declaration.setters;
module.execute = declaration.execute;
@@ -1807,7 +1808,7 @@ function createEntry() {
else {
module.dependencies.push(null);
}
-
+
// run setters for all entries with the matching dependency name
var originalIndices = entry.originalIndices[i];
for (var j = 0, len = originalIndices.length; j < len; ++j) {
@@ -1833,7 +1834,7 @@ function createEntry() {
else {
if (entry.declarative)
ensureEvaluated(name, entry, [], loader);
-
+
else if (!entry.evaluated)
linkDynamicModule(entry, loader);
@@ -1842,7 +1843,7 @@ function createEntry() {
if ((!entry || entry.declarative) && exports && exports.__useDefault)
return exports['default'];
-
+
return exports;
}
@@ -1880,7 +1881,7 @@ function createEntry() {
throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
}, exports, module);
-
+
if (output !== undefined)
module.exports = output;
@@ -1904,7 +1905,7 @@ function createEntry() {
* (unless one is a circular dependency already in the list of seen
* modules, in which case we execute it)
*
- * Then we evaluate the module itself depth-first left to right
+ * Then we evaluate the module itself depth-first left to right
* execution to match ES6 modules
*/
function ensureEvaluated(moduleName, entry, seen, loader) {
@@ -1950,7 +1951,7 @@ function createEntry() {
}
load.metadata.deps = load.metadata.deps || [];
-
+
return fetch.call(this, load);
};
});
@@ -1961,7 +1962,7 @@ function createEntry() {
load.metadata.deps = load.metadata.deps || [];
return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
// run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
+ if (load.metadata.format == 'register' || load.metadata.format == 'system' || !load.metadata.format && detectRegisterFormat(load.source))
load.metadata.format = 'register';
return source;
});
@@ -1979,7 +1980,7 @@ function createEntry() {
entry.originalIndices = entry.normalizedDeps = [];
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(normalized, entry, loader);
@@ -2030,9 +2031,9 @@ function createEntry() {
// Contains System.register calls
// (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
+ else if (!(loader.builder && load.metadata.bundle)
&& (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
+
if (typeof __exec != 'undefined')
__exec.call(loader, load);
@@ -2055,9 +2056,9 @@ function createEntry() {
// place this module onto defined for circular references
loader.defined[load.name] = entry;
-
+
var grouped = group(entry.deps);
-
+
entry.deps = grouped.names;
entry.originalIndices = grouped.indices;
entry.name = load.name;
@@ -2075,7 +2076,7 @@ function createEntry() {
return {
deps: entry.deps,
execute: function() {
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(load.name, entry, loader);
@@ -2189,7 +2190,7 @@ hook('fetch', function(fetch) {
});System = new SystemJSLoader();
__global.SystemJS = System;
-System.version = '0.19.41 Register Only';
+System.version = '0.19.47 Register Only';
if (typeof module == 'object' && module.exports && typeof exports == 'object')
module.exports = System;
diff --git a/node_modules/systemjs/dist/system.js b/node_modules/systemjs/dist/system.js
index 1b7c1f82f..171b0d3cb 100644
--- a/node_modules/systemjs/dist/system.js
+++ b/node_modules/systemjs/dist/system.js
@@ -1,6 +1,6 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
-!function(){function e(){!function(e){function t(e,r){if("string"!=typeof e)throw new TypeError("URL must be a string");var n=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!n)throw new RangeError("Invalid URL format");var a=n[1]||"",o=n[2]||"",i=n[3]||"",s=n[4]||"",l=n[5]||"",u=n[6]||"",d=n[7]||"",c=n[8]||"",f=n[9]||"";if(void 0!==r){var m=r instanceof t?r:new t(r),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var r=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),n=[],a=0;a<r.length;a++)"undefined"!=typeof $__curScript&&r[a].indexOf($__curScript.src)!=-1||n.push(r[a]);var o="(SystemJS) "+(n?n.join("\n\t"):e.message.substr(11))+"\n\t"+t;F||(o=o.replace(D?/file:\/\/\//g:/file:\/\//g,""));var i=J?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function r(){}function n(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},q(this,"global",{get:function(){return e}})}function a(){n.call(this),this.paths={},this._loader.paths={},V.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){V=e(V||function(){})}function l(e){return e.match(Y)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e;return new H(e,t&&t.replace(/#/g,"%05")||K).href.replace(/%05/g,"#")}function f(e,t){var r,n="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?$:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,n=s,r=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[n];return"string"==typeof r&&(m=m.replace("*",r)),m}function m(e){for(var t=[],r=[],n=0,a=e.length;n<a;n++){var o=U.call(t,e[n]);o===-1?(t.push(e[n]),r.push([n])):r[o].push(n)}return{names:t,indices:r}}function p(t){var r={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(Q)for(var n in t)"default"!==n&&h(r,t,n);else g(r,t);return r.default=t,q(r,"__useDefault",{value:!0}),r}function h(e,t,r){try{var n;(n=Object.getOwnPropertyDescriptor(t,r))&&q(e,r,n)}catch(n){return e[r]=t[r],!1}}function g(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)n&&!t.hasOwnProperty(a)||r&&a in e||(e[a]=t[a]);return e}function v(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)if(!n||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(r?o:e[a]).concat(r?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,r):r||(e[a]=o):e[a]=o}}function b(e,t,r,n,a){for(var o in t)if(U.call(["main","format","defaultExtension","basePath"],o)!=-1)e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?r+"/"+i.substr(2):P.call(n,i),n.depCache[s]=(n.depCache[s]||[]).concat(t.depCache[i])}else!a||U.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)!=-1||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(n,'"'+o+'" is not a valid package configuration option in package '+r)}function y(e,t,r,n){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},b(a,n?r:o,t,e,n),b(a,n?o:r,t,e,!n)}else a=e.packages[t]=r;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main.default=a.main.default||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn}function x(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function S(e,t){var r,n=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(o<=n)continue;r=a,n=o}return r}function _(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new H(this.baseURL,K).href)}function E(e,t){this.set("@system-env",te=this.newModule({browser:F,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function j(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!re){var r=this._nodeRequire("module"),n=t.substr(D?8:7);re=new r(n),re.paths=r._nodeModulePaths(n)}return re.require(e)}function P(e,t){if(u(e))return c(e,t);if(l(e))return e;var r=S(this.map,e);if(r){if(e=this.map[r]+e.substr(r.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(j.call(this,e.substr(6),this.baseURL)))),e}return _.call(this),f(this,e)||this.baseURL+e}function O(e,t,r){te.browser&&t.browserConfig&&r(t.browserConfig),te.node&&t.nodeConfig&&r(t.nodeConfig),te.dev&&t.devConfig&&r(t.devConfig),te.build&&t.buildConfig&&r(t.buildConfig),te.production&&t.productionConfig&&r(t.productionConfig)}function M(e){var t=e.match(oe);return t&&"System.register"==e.substr(t[0].length,15)}function k(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function R(t){if("string"==typeof t)return x(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var r={},n=!0,a=0;a<t.length;a++){var o=x(t[a],e);n&&(r.default=o,n=!1),r[t[a].split(".").pop()]=o}return r}function z(e){var t,r,n,n="~"==e[0],a=e.lastIndexOf("|");return a!=-1?(t=e.substr(a+1),r=e.substr(n,a-n),n&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+r+"|~"+t+'"'),"~"==t[0]&&(n=!0,t=t.substr(1))):(t="default",r=e.substr(n),se.indexOf(r)!=-1&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function I(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function T(e,t,r){var n=this;return this.normalize(e.module,t).then(function(t){return n.load(t).then(function(a){var o=x(e.prop,n.get(t));if(r&&"boolean"!=typeof o)throw new TypeError("Condition "+I(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function C(e,t){var r=e.match(le);if(!r)return Promise.resolve(e);var n=z.call(this,r[0].substr(2,r[0].length-3));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.replace(le,"#{"+I(n)+"}")}):T.call(this,n,t,!1).then(function(r){if("string"!=typeof r)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(r.indexOf("/")!=-1)throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+r+' cannot contain a "/" separator.');return e.replace(le,r)})}function L(e,t){var r=e.lastIndexOf("#?");if(r==-1)return Promise.resolve(e);var n=z.call(this,e.substr(r+2));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.substr(0,r)+"#?"+I(n)}):T.call(this,n,t,!0).then(function(t){return t?e.substr(0,r):"@empty"})}var A="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,F="undefined"!=typeof window&&"undefined"!=typeof document,D="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var q,U=Array.prototype.indexOf||function(e){for(var t=0,r=this.length;t<r;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(q=Object.defineProperty)}catch(e){q=function(e,t,r){try{e[t]=r.value||r.get.call(e)}catch(e){}}}}();var $,J="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if($=document.baseURI,!$){var N=document.getElementsByTagName("base");$=N[0]&&N[0].href||window.location.href}}else"undefined"!=typeof location&&($=e.location.href);if($)$=$.split("#")[0].split("?")[0],$=$.substr(0,$.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");$="file://"+(D?"/":"")+process.cwd()+"/",D&&($=$.replace(/\\/g,"/"))}try{var B="test:"==new e.URL("test:///").protocol}catch(e){}var H=B?e.URL:e.URLPolyfill;q(r.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++y+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,r){return new Promise(u({step:r.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:r&&r.metadata||{},moduleSource:r.source,moduleAddress:r.address}))}function o(t,r,n,a){return new Promise(function(e,o){e(t.loaderObj.normalize(r,n,a))}).then(function(r){var n;if(t.modules[r])return n=e(r),n.status="linked",n.module=t.modules[r],n;for(var a=0,o=t.loads.length;a<o;a++)if(n=t.loads[a],n.name==r)return n;return n=e(r),t.loads.push(n),i(t,n),n})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,r){l(e,t,r.then(function(r){if("loading"==t.status)return t.address=r,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:r})}))}function l(e,t,r){r.then(function(r){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:r})).then(function(r){return t.source=r,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:r})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var r=t.depsList,n=[],a=0,i=r.length;a<i;a++)(function(r,a){n.push(o(e,r,t.name,t.address).then(function(e){if(t.dependencies[a]={key:r,value:e.name},"linked"!=e.status)for(var n=t.linkSets.concat([]),o=0,i=n.length;o<i;o++)c(n[o],e)}))})(r[a],a);return Promise.all(n)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),r=0,n=e.length;r<n;r++)m(e[r],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var r=t.linkSets.concat([]),n=0,a=r.length;n<a;n++)p(r[n],t,e)})}function u(t){return function(r,n){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){r(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),r(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var r={loader:e,loads:[],startingLoad:t,loadingCount:0};return r.done=new Promise(function(e,t){r.resolve=e,r.reject=t}),c(r,t),r}function c(e,t){if("failed"!=t.status){for(var r=0,n=e.loads.length;r<n;r++)if(e.loads[r]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,r=0,n=t.dependencies.length;r<n;r++)if(t.dependencies[r]){var o=t.dependencies[r].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{b(e,function(r,n){p(e,r,n),t=!0})}catch(r){p(e,null,r),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var r=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var n=[].concat(e.loads),a=0,o=n.length;a<o;a++){var t=n[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(r)}var i=f(e);i||e.resolve(r)}}function p(e,r,n){var a=e.loader;e:if(r)if(e.loads[0].name==r.name)n=t(n,"Error loading "+r.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==r.name){n=t(n,"Error loading "+r.name+' as "'+l.key+'" from '+i.name);break e}}n=t(n,"Error loading "+r.name+" from "+e.loads[0].name)}else n=t(n,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;o<d;o++){var r=u[o];a.loaderObj.failed=a.loaderObj.failed||[],U.call(a.loaderObj.failed,r)==-1&&a.loaderObj.failed.push(r);var c=U.call(r.linkSets,e);if(r.linkSets.splice(c,1),0==r.linkSets.length){var f=U.call(e.loader.loads,r);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(n)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var r={};t.dependencies.forEach(function(e){r[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:r,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var n=U.call(e.loads,t);n!=-1&&e.loads.splice(n,1);for(var a=0,o=t.linkSets.length;a<o;a++)n=U.call(t.linkSets[a].loads,t),n!=-1&&t.linkSets[a].loads.splice(n,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,n){try{var a=t.execute()}catch(e){return void n(t,e)}return a&&a instanceof r?a:void n(t,new TypeError("Execution must define a Module instance"))}function v(e,t,r){var n=e._loader.importPromises;return n[t]=r.then(function(e){return n[t]=void 0,e},function(e){throw n[t]=void 0,e})}function b(e,t){var r=e.loader;if(e.loads.length)for(var n=e.loads.concat([]),a=0;a<n.length;a++){var o=n[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(r,o)}}var y=0;n.prototype={constructor:n,define:function(e,t,r){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:r&&r.metadata||{},moduleSource:t,moduleAddress:r&&r.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,r){"object"==typeof t&&(t=t.name);var n=this;return Promise.resolve(n.normalize(e,t)).then(function(e){var t=n._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(n,e,a(t,e,{}).then(function(r){return delete t.importPromises[e],r.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,r){var n=e();n.address=r&&r.address;var a=d(this._loader,n),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return n.module.module});return l(i,n,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new r,n=[];if(Object.getOwnPropertyNames&&null!=e)n=Object.getOwnPropertyNames(e);else for(var a in e)n.push(a);for(var o=0;o<n.length;o++)(function(r){q(t,r,{configurable:!1,enumerable:!0,get:function(){return e[r]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(n[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof r))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,r){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=n.prototype.newModule}();var X,G;if("undefined"!=typeof XMLHttpRequest)G=function(e,t,r,n){function a(){r(i.responseText)}function o(){n(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var Z;G=function(e,t,r,n){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return Z=Z||require("fs"),e=D?e.replace(/\//g,"\\").substr(8):e.substr(7),Z.readFile(e,function(e,t){if(e)return n(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),r(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");G=function(e,t,r,n){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(r,n)}}var W=function(){function t(t){var n=this;return Promise.resolve(e["typescript"==n.transpiler?"ts":n.transpiler]||(n.pluginLoader||n).import(n.transpiler)).then(function(e){e.__useDefault&&(e=e.default);var a;return a=e.Compiler?r:e.createLanguageService?i:o,"(function(__moduleName){"+a.call(n,t,e)+'\n})("'+t.name+'");\n//# sourceURL='+t.address+"!transpiled"})}function r(e,t){var r=this.traceurOptions||{};r.modules="instantiate",r.script=!1,void 0===r.sourceMaps&&(r.sourceMaps="inline"),r.filename=e.address,r.inputSourceMap=e.metadata.sourceMap,r.moduleName=!1;var n=new t.Compiler(r);return a(e.source,n,r.filename)}function a(e,t,r){try{return t.compile(e,r)}catch(e){if(e.length)throw e[0];throw e}}function o(e,t){var r=this.babelOptions||{};return r.modules="system",void 0===r.sourceMap&&(r.sourceMap="inline"),r.inputSourceMap=e.metadata.sourceMap,r.filename=e.address,r.code=!0,r.ast=!1,t.transform(e.source,r).code}function i(e,t){var r=this.typescriptOptions||{};return r.target=r.target||t.ScriptTarget.ES5,void 0===r.sourceMap&&(r.sourceMap=!0),r.sourceMap&&r.inlineSourceMap!==!1&&(r.inlineSourceMap=!0),r.module=t.ModuleKind.System,t.transpile(e.source,r,e.address)}return n.prototype.transpiler="traceur",t}();o.prototype=n.prototype,a.prototype=new o,a.prototype.constructor=a;var V,Y=/^[^\/]+:\/\//,K=new H($),Q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){Q=!1}var ee;!function(){function r(e){return l?d+new Buffer(e).toString("base64"):"undefined"!=typeof btoa?d+btoa(unescape(encodeURIComponent(e))):""}function n(e,t){var n=e.source.lastIndexOf("\n");"global"==e.metadata.format&&(t=!1);var a=e.metadata.sourceMap;if(a){if("object"!=typeof a)throw new TypeError("load.metadata.sourceMap must be set to an object.");a=JSON.stringify(a)}return(t?"(function(System, SystemJS) {":"")+e.source+(t?"\n})(System, System);":"")+("\n//# sourceURL="!=e.source.substr(n,15)?"\n//# sourceURL="+e.address+(a?"!transpiled":""):"")+(a&&r(a)||"")}function a(t,r){u=r,0==p++&&(c=e.System),e.System=e.SystemJS=t}function o(){0==--p&&(e.System=e.SystemJS=c),u=void 0}function s(e){g||(g=document.head||document.body||document.documentElement);var r=document.createElement("script");r.text=n(e,!1);var i,s=window.onerror;if(window.onerror=function(r){i=t(r,"Evaluating "+e.address),s&&s.apply(this,arguments)},a(this,e),e.metadata.integrity&&r.setAttribute("integrity",e.metadata.integrity),e.metadata.nonce&&r.setAttribute("nonce",e.metadata.nonce),g.appendChild(r),g.removeChild(r),o(),window.onerror=s,i)throw i}var l="undefined"!=typeof Buffer;try{l&&"YQ=="!=new Buffer("a").toString("base64")&&(l=!1)}catch(e){l=!1}var u,d="\n//# sourceMappingURL=data:application/json;base64,";i("pushRegister_",function(){return function(e){return!!u&&(this.reduceRegister_(u,e),!0)}});var c,f,m,p=0;ee=function(e){if(e.source){if((e.metadata.integrity||e.metadata.nonce)&&h)return s.call(this,e);try{a(this,e),u=e,!m&&this._nodeRequire&&(m=this._nodeRequire("vm"),f=m.runInThisContext("typeof System !== 'undefined' && System")===this),f?m.runInThisContext(n(e,!0),{filename:e.address+(e.metadata.sourceMap?"!transpiled":"")}):(0,eval)(n(e,!0)),o()}catch(r){throw o(),t(r,"Evaluating "+e.address)}}};var h=!1;F&&"undefined"!=typeof document&&document.getElementsByTagName&&(window.chrome&&window.chrome.extension||navigator.userAgent.match(/^Node\.js/)||(h=!0));var g}();var te;s(function(e){return function(){e.call(this),this.baseURL=$,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),E.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var re;i("normalize",function(e){return function(e,t,r){var n=P.call(this,e,t);return!this.defaultJSExtensions||r||".js"==n.substr(n.length-3,3)||d(n)||(n+=".js"),n}});var ne="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return ne?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,r){G(e.address,e.metadata.authorization,t,r)})}}),i("import",function(e){return function(t,r,n){return r&&r.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+r.name),e.call(this,t,r,n).then(function(e){return e.__useDefault?e.default:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=k();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},r=this;for(var n in r)r.hasOwnProperty&&!r.hasOwnProperty(n)||n in a.prototype&&"transpiler"!=n||U.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],n)==-1&&(t[n]=r[n]);return t.production=te.production,t};var ae;a.prototype.config=function(e,t){function r(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var n=this;if("loaderErrorStack"in e&&(ae=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ae),"warnings"in e&&(n.warnings=e.warnings),e.transpilerRuntime===!1&&(n._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&E.call(n,!!e.production,!!(e.build||te&&te.build)),!t){var a;if(O(n,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(r(n.packages)||r(n.meta)||r(n.depCache)||r(n.bundles)||r(n.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,_.call(this)}if(e.paths&&g(n.paths,e.paths),O(n,e,function(e){e.paths&&g(n.paths,e.paths)}),this.warnings)for(var o in n.paths)o.indexOf("*")!=-1&&w.call(n,'Paths configuration "'+o+'" -> "'+n.paths[o]+'" uses wildcards which are being deprecated for just leaving a trailing "/" to indicate folder paths.')}if(e.defaultJSExtensions&&(n.defaultJSExtensions=e.defaultJSExtensions,w.call(n,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(n.pluginFirst=e.pluginFirst),e.map)for(var o in e.map){var i=e.map[o];if("string"!=typeof i){var s=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=n.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3));var u="";for(var c in n.packages)l.substr(0,c.length)==c&&(!l[c.length]||"/"==l[c.length])&&u.split("/").length<c.split("/").length&&(u=c);u&&n.packages[u].main&&(l=l.substr(0,l.length-n.packages[u].main.length-1));var c=n.packages[l]=n.packages[l]||{};c.map=i}else n.map[o]=i}if(e.packageConfigPaths){for(var f=[],m=0;m<e.packageConfigPaths.length;m++){var p=e.packageConfigPaths[m],h=Math.max(p.lastIndexOf("*")+1,p.lastIndexOf("/")),v=P.call(n,p.substr(0,h));f[m]=v+p.substr(h)}n.packageConfigPaths=f}if(e.bundles)for(var o in e.bundles){for(var b=[],m=0;m<e.bundles[o].length;m++){var s=n.defaultJSExtensions&&".js"!=e.bundles[o][m].substr(e.bundles[o][m].length-3,3),x=n.decanonicalize(e.bundles[o][m]);s&&".js"==x.substr(x.length-3,3)&&(x=x.substr(0,x.length-3)),b.push(x)}n.bundles[o]=b}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var l=P.call(n,o);"/"==l[l.length-1]&&(l=l.substr(0,l.length-1)),y(n,l,e.packages[o],!1)}for(var S in e){var i=e[S];if(U.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],S)==-1)if("object"!=typeof i||i instanceof Array)n[S]=i;else{n[S]=n[S]||{};for(var o in i)if("meta"==S&&"*"==o[0])g(n[S][o]=n[S][o]||{},i[o]);else if("meta"==S){var j=P.call(n,o);n.defaultJSExtensions&&".js"!=j.substr(j.length-3,3)&&!d(j)&&(j+=".js"),g(n[S][j]=n[S][j]||{},i[o])}else if("depCache"==S){var s=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=n.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3)),n[S][l]=[].concat(i[o])}else n[S][o]=i[o]}}O(n,e,function(e){n.config(e,!0)})},function(){function e(e,t){var r,n,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(n=o.split("/").length,n>a&&(r=o,a=n));return r}function t(e,t,r,n,a){if(!n||"/"==n[n.length-1]||a||t.defaultExtension===!1)return n;var o=!1;if(t.meta&&p(t.meta,n,function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return o=!0}),!o&&e.meta&&p(e.meta,r+"/"+n,function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return o=!0}),o)return n;var i="."+(t.defaultExtension||"js");return n.substr(n.length-i.length)!=i?n+i:n}function r(e,r,n,a,i){if(!a){if(!r.main)return n+(e.defaultJSExtensions?".js":"");a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+a,l=S(r.map,s);if(l||(s="./"+t(e,r,n,a,i),s!="./"+a&&(l=S(r.map,s))),l){var u=o(e,r,n,l,s,i);if(u)return u}}return n+"/"+t(e,r,n,a,i)}function n(e,t,r,n){if("."==e)throw new Error("Package "+r+' has a map entry for "." which is not permitted.');return!(t.substr(0,e.length)==e&&n.length>e.length)}function o(e,r,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=r.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(n(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,r,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,r,n,a,o){if(!a){if(!r.main)return Promise.resolve(n+(e.defaultJSExtensions?".js":""));a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}var i,s;return r.map&&(i="./"+a,s=S(r.map,i),s||(i="./"+t(e,r,n,a,o),i!="./"+a&&(s=S(r.map,i)))),(s?d(e,r,n,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(n+"/"+t(e,r,n,a,o))})}function u(e,r,n,a,o,i,s){if("."==o)o=n;else if("./"==o.substr(0,2))return Promise.resolve(n+"/"+t(e,r,n,o.substr(2)+i.substr(a.length),s)).then(function(t){return C.call(e,t,n+"/")});return e.normalize(o+i.substr(a.length),n+"/")}function d(e,t,r,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return n(a,s,r,o)?u(e,t,r,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(r+"/#:"+o);var l=[],d=[];for(var c in s){var f=z(c);d.push({condition:f,map:s[c]}),l.push(e.import(f.module,r))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var r=d[t].condition,n=x(r.prop,e[t]);if(!r.negate&&n||r.negate&&!n)return d[t].map}}).then(function(s){if(s){if(!n(a,s,r,o))return;return u(e,t,r,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:t!=-1}}function f(e,t){for(var r,n,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||r&&(a&&s.wildcard||!(r.length<l[1].length))||(r=l[1],a=!s.wildcard,n=r+i.substr(s.length))}}if(r)return{packageName:r,configPath:n}}function m(e,t,r){var n=e.pluginLoader||e;return(n.meta[r]=n.meta[r]||{}).format="json",n.meta[r].loader=null,n.load(r).then(function(){var a=n.get(r).default;return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+r+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),y(e,t,a,!0)})}function p(e,t,r){var n;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),n=a.indexOf("*"),n!==-1&&a.substr(0,n)==t.substr(0,n)&&a.substr(n+1)==t.substr(t.length-a.length+n+1)&&r(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&r(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(r,n){if(this.builder)return t.call(this,r,n,!0);var a=t.call(this,r,n,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return s=!1,!0}),(s===!1||s&&".js"!=s)&&".js"!=r.substr(r.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(n,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));var u=l&&s.packages[l];if(u&&"."!=n[0]){var d=u.map,c=d&&S(d,n);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,n,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),h=t.call(s,n,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);
-if(!v)return h+(p?".js":"");var b=h.substr(v.length+1);return r(s,s.packages[v]||{},v,b,i)}}),i("normalize",function(t){return function(r,n,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(n)var t=e(o,n)||o.defaultJSExtensions&&".js"==n.substr(n.length-3,3)&&e(o,n.substr(0,n.length-3));var i=t&&o.packages[t];if(i&&"./"!=r.substr(0,2)){var s=i.map,l=s&&S(s,r);if(l)return d(o,i,t,l,r,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),u=t.call(o,r,n,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(r){var n=this;return Promise.resolve(t.call(this,r)).then(function(t){var a=e(n,r.name);if(a){var o=n.packages[a],i=r.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,r){r>l&&(l=r),v(s,t,r&&l>r)}),v(r.metadata,s)}o.format&&!r.metadata.loader&&(r.metadata.format=r.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function r(e,t){return new Promise(function(e,r){t.metadata.integrity&&r(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(e){l=null,r(e)}l=null,t.metadata.entry||r(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var n=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=n&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(r){return!e.call(this,r)&&(l?this.reduceRegister_(l,r):u?this.reduceRegister_(t(),r):c?f.push(r):this.reduceRegister_(null,r),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(F||A)?A?r(l,i):new Promise(function(t,r){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var n=0;n<f.length;n++)l.reduceRegister_(i,f[n]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||r(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),r(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);n.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,n.appendChild(g)}):t.call(this,i)}})}();var oe=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,r,n){if(n[e.groupIndex]=n[e.groupIndex]||[],U.call(n[e.groupIndex],e)==-1){n[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=r.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(n[s.groupIndex].splice(U.call(n[s.groupIndex],s),1),0==n[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,r,n)}}}}function n(e,r,n){if(!r.module){r.groupIndex=0;var a=[];t(r,n,a);for(var o=!!r.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,n):c(d,n)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,r){if(!t.module){var n=r._loader.moduleRecords,a=t.module=l(t.name,n),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var r in e)o[r]=e[r];else o[e]=t;for(var n=0,i=a.importers.length;n<i;n++){var s=a.importers[n];if(!s.locked){var l=U.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;s<d;s++){var c,f=t.normalizedDeps[s],m=r.defined[f],p=n[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,r),p=m.module,c=p.exports):c=r.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var b=h[g];a.setters[b]&&a.setters[b](c)}}}}function d(e,t){var r,n=t.defined[e];if(n)n.declarative?f(e,n,[],t):n.evaluated||c(n,t),r=n.module.exports;else if(r=t.get(e),!r)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&r&&r.__useDefault?r.default:r}function c(t,n){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var l=t.normalizedDeps[i],u=n.defined[l];u&&c(u,n)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var r=0,a=t.deps.length;r<a;r++)if(t.deps[r]==e)return d(t.normalizedDeps[r],n);var o=n.normalizeSync(e,t.name);if(U.call(t.normalizedDeps,o)!=-1)return d(o,n);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof r)?t.esModule=n.newModule(a):t.esmExports&&a!==e?t.esModule=n.newModule(p(a)):t.esModule=n.newModule({default:a,__useDefault:!0})}}function f(t,r,n,a){if(r&&!r.evaluated&&r.declarative){n.push(t);for(var o=0,i=r.normalizedDeps.length;o<i;o++){var s=r.normalizedDeps[o];U.call(n,s)==-1&&(a.defined[s]?f(s,a.defined[s],n,a):a.get(s))}r.evaluated||(r.evaluated=!0,r.module.execute.call(e))}}a.prototype.register=function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=null),"boolean"==typeof r)return this.registerDynamic.apply(this,arguments);var n=k();n.name=e&&(this.decanonicalize||this.normalize).call(this,e),n.declarative=!0,n.deps=t,n.declare=r,this.pushRegister_({amd:!1,entry:n})},a.prototype.registerDynamic=function(e,t,r,n){"string"!=typeof e&&(n=r,r=t,t=e,e=null);var a=k();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=n,a.executingRequire=r,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var r=t.entry,n=e&&e.metadata;if(r.name&&(r.name in this.defined||(this.defined[r.name]=r),n&&(n.bundle=!0)),!r.name||e&&!n.entry&&r.name==e.name){if(!n)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(n.entry)throw"register"==n.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+n.format+" module format, but called System.register.");n.format||(n.format="register"),n.entry=r}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),q(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&M(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var r=this,a=r.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],n(t,a,r),f(t,a,[],r),a.esModule||(a.esModule=r.newModule(a.module.exports)),r.trace||(r.defined[t]=void 0),r.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var r,a=this;if(a.defined[t.name])r=a.defined[t.name],r.declarative||(r.deps=r.deps.concat(t.metadata.deps)),r.deps=r.deps.concat(t.metadata.deps);else if(t.metadata.entry)r=t.metadata.entry,r.deps=r.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof ee&&ee.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");r=t.metadata.entry,r&&t.metadata.deps&&(r.deps=r.deps.concat(t.metadata.deps))}r||(r=k(),r.deps=t.metadata.deps,r.execute=function(){}),a.defined[t.name]=r;var o=m(r.deps);r.deps=o.names,r.originalIndices=o.indices,r.name=t.name,r.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=r.deps.length;s<l;s++)i.push(Promise.resolve(a.normalize(r.deps[s],t.name)));return Promise.all(i).then(function(e){return r.normalizedDeps=e,{deps:r.deps,execute:function(){return n(t.name,r,a),f(t.name,r,[],a),r.esModule||(r.esModule=a.newModule(r.module.exports)),a.trace||(a.defined[t.name]=void 0),r.esModule}}})}})}(),function(){var r=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,n=/\$traceurRuntime\s*\./,a=/babelHelpers\s*\./;i("translate",function(o){return function(i){var s=this,l=arguments;return o.apply(s,l).then(function(o){if("esm"==i.metadata.format||"es6"==i.metadata.format||!i.metadata.format&&o.match(r)){if("es6"==i.metadata.format&&w.call(s,"Module "+i.name+' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".'),i.metadata.format="esm",i.metadata.deps){for(var u="",d=0;d<i.metadata.deps.length;d++)u+='import "'+i.metadata.deps[d]+'"; ';i.source=u+o}if(s.transpiler===!1){if(s.builder)return o;throw new TypeError("Unable to dynamically transpile ES module as SystemJS.transpiler set to false.")}return s._loader.loadedTranspiler=s._loader.loadedTranspiler||!1,s.pluginLoader&&(s.pluginLoader._loader.loadedTranspiler=s._loader.loadedTranspiler||!1),(s._loader.transpilerPromise||(s._loader.transpilerPromise=Promise.resolve(e["typescript"==s.transpiler?"ts":s.transpiler]||(s.pluginLoader||s).import(s.transpiler)))).then(function(e){return s._loader.loadedTranspilerRuntime=!0,e.translate?e==i.metadata.loaderModule?i.source:("string"==typeof i.metadata.sourceMap&&(i.metadata.sourceMap=JSON.parse(i.metadata.sourceMap)),Promise.resolve(e.translate.apply(s,l)).then(function(e){var t=i.metadata.sourceMap;if(t&&"object"==typeof t){var r=i.address.split("!")[0];t.file&&t.file!=i.address||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]==i.address))&&(t.sources=[r])}return"esm"==i.metadata.format&&!s.builder&&M(e)&&(i.metadata.format="register"),e})):(s.builder&&(i.metadata.originalSource=i.source),W.call(s,i).then(function(e){return i.metadata.sourceMap=void 0,e}))},function(e){throw t(e,"Unable to load transpiler to transpile "+i.name)})}if(s.transpiler===!1)return o;if(s._loader.loadedTranspiler!==!1||"traceur"!=s.transpiler&&"typescript"!=s.transpiler&&"babel"!=s.transpiler||i.name!=s.normalizeSync(s.transpiler)||(o.length>100&&!i.metadata.format&&(i.metadata.format="global","traceur"===s.transpiler&&(i.metadata.exports="traceur"),"typescript"===s.transpiler&&(i.metadata.exports="ts")),s._loader.loadedTranspiler=!0),s._loader.loadedTranspilerRuntime===!1&&(i.name!=s.normalizeSync("traceur-runtime")&&i.name!=s.normalizeSync("babel/external-helpers*")||(o.length>100&&(i.metadata.format=i.metadata.format||"global"),s._loader.loadedTranspilerRuntime=!0)),("register"==i.metadata.format||i.metadata.bundle)&&s._loader.loadedTranspilerRuntime!==!0){if("traceur"==s.transpiler&&!e.$traceurRuntime&&i.source.match(n))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s.import("traceur-runtime").then(function(){return o});if("babel"==s.transpiler&&!e.babelHelpers&&i.source.match(a))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s.import("babel/external-helpers").then(function(){return o})}return o})}})}();var ie="undefined"!=typeof self?"self":"global";i("fetch",function(e){return function(t){return t.metadata.exports&&!t.metadata.format&&(t.metadata.format="global"),e.call(this,t)}}),i("instantiate",function(e){return function(t){var r=this;if(t.metadata.format||(t.metadata.format="global"),"global"==t.metadata.format&&!t.metadata.entry){var n=k();t.metadata.entry=n,n.deps=[];for(var a in t.metadata.globals){var o=t.metadata.globals[a];o&&n.deps.push(o)}n.execute=function(e,n,a){var o;if(t.metadata.globals){o={};for(var i in t.metadata.globals)t.metadata.globals[i]&&(o[i]=e(t.metadata.globals[i]))}var s=t.metadata.exports;s&&(t.source+="\n"+ie+'["'+s+'"] = '+s+";");var l=r.get("@@global-helpers").prepareGlobal(a.id,s,o,!!t.metadata.encapsulateGlobal);return ee.call(r,t),l()}}return e.call(this,t)}}),i("reduceRegister_",function(e){return function(t,r){if(r||!t.metadata.exports&&(!A||"global"!=t.metadata.format))return e.call(this,t,r);t.metadata.format="global";var n=t.metadata.entry=k();n.deps=t.metadata.deps;var a=R(t.metadata.exports);n.execute=function(){return a}}}),s(function(t){return function(){function r(t){if(Object.keys)Object.keys(e).forEach(t);else for(var r in e)i.call(e,r)&&t(r)}function n(t){r(function(r){if(U.call(s,r)==-1){try{var n=e[r]}catch(e){s.push(r)}t(r,n)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,r,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return r||(o={},n(function(e,t){o[e]=t})),function(){var t,a=r?R(r):{},u=!!r;if(r&&!i||n(function(n,s){o[n]!==s&&"undefined"!=typeof s&&(i&&(e[n]=void 0),r||(a[n]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),function(){function t(e){function t(e,t){for(var r=0;r<e.length;r++)if(e[r][0]<t.index&&e[r][1]>t.index)return!0;return!1}n.lastIndex=a.lastIndex=o.lastIndex=0;var r,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;r=o.exec(e);)s.push([r.index,r.index+r[0].length]);for(;r=a.exec(e);)t(s,r)||l.push([r.index+r[1].length,r.index+r[0].length-1])}for(;r=n.exec(e);)if(!t(s,r)&&!t(l,r)){var u=r[1].substr(1,r[1].length-2);if(u.match(/"|'/))continue;"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),i.push(u)}return i}var r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,s=/^\#\!.*/;i("instantiate",function(a){return function(o){var i=this;if(o.metadata.format||(r.lastIndex=0,n.lastIndex=0,(n.exec(o.source)||r.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format){var l=o.metadata.deps,u=o.metadata.cjsRequireDetection===!1?[]:t(o.source);for(var d in o.metadata.globals)o.metadata.globals[d]&&u.push(o.metadata.globals[d]);var c=k();o.metadata.entry=c,c.deps=u,c.executingRequire=!0,c.execute=function(t,r,n){function a(e){return"/"==e[e.length-1]&&(e=e.substr(0,e.length-1)),t.apply(this,arguments)}if(a.resolve=function(e){return i.get("@@cjs-helpers").requireResolve(e,n.id)},n.paths=[],n.require=t,!o.metadata.cjsDeferDepsExecute)for(var u=0;u<l.length;u++)a(l[u]);var d=i.get("@@cjs-helpers").getPathVars(n.id),c={exports:r,args:[a,r,n,d.filename,d.dirname,e,e]},f="(function(require, exports, module, __filename, __dirname, global, GLOBAL";if(o.metadata.globals)for(var m in o.metadata.globals)c.args.push(a(o.metadata.globals[m])),f+=", "+m;var p=e.define;e.define=void 0,e.__cjsWrapper=c,o.source=f+") {"+o.source.replace(s,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);",ee.call(i,o),e.__cjsWrapper=void 0,e.define=p}}return a.call(i,o)}})}(),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!D):n&&e.substr(0,n.length)==n?e.substr(n.length):e}var r=this;if(e.call(r),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var n=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");r.set("@@cjs-helpers",r.newModule({requireResolve:function(e,n){return t(r.normalizeSync(e,n))},getPathVars:function(e){var r,n=e.lastIndexOf("!");r=n!=-1?e.substr(0,n):e;var a=r.split("/");return a.pop(),a=a.join("/"),{filename:t(r),dirname:t(a)}}}))}}),i("fetch",function(t){return function(r){return r.metadata.scriptLoad&&F&&(e.define=this.amdDefine),t.call(this,r)}}),s(function(t){return function(){function r(e,t){e=e.replace(s,"");var r=e.match(d),n=(r[1].split(",")[t]||"require").replace(c,""),a=f[n]||(f[n]=new RegExp(l+n+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function n(e,t,r,a){if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l.default:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o.import(e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},r)}function a(t,a,i){function s(t,r,s){function c(e,r,a){return"string"==typeof e&&"function"!=typeof r?t(e):n.call(o,e,r,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},d!=-1&&f.splice(d,0,s),u!=-1&&f.splice(u,0,r),l!=-1&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),r=o.decanonicalize(e,s.id);return t&&".js"==r.substr(r.length-3,3)&&(r=r.substr(0,r.length-3)),r},f.splice(l,0,c));var p=e.require;e.require=n;var h=i.apply(u==-1?e:r,f);if(e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h)return h}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;(l=U.call(a,"require"))!=-1&&(a.splice(l,1),t||(a=a.concat(r(i.toString(),l)))),(u=U.call(a,"exports"))!=-1&&a.splice(u,1),(d=U.call(a,"module"))!=-1&&a.splice(d,1);var c=k();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,r){if(!r||!r.amd)return e.call(this,t,r);var n=t&&t.metadata,a=r.entry;if(n)if(n.format&&"detect"!=n.format){if(!a.name&&"amd"!=n.format)throw new Error("AMD define called while executing "+n.format+" module "+t.name)}else n.format="amd";if(a.name)n&&(n.entry||n.bundle?n.entry&&n.entry.name&&n.entry.name!=t.name&&(n.entry=void 0):n.entry=a,n.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!n)throw new TypeError("Unexpected anonymous AMD define.");if(n.entry&&!n.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);n.entry=a}}}),o.amdDefine=a,o.amdRequire=n}}),function(){var t=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;i("instantiate",function(r){return function(n){var a=this;if("amd"==n.metadata.format||!n.metadata.format&&n.source.match(t))if(n.metadata.format="amd",a.builder||a.execute===!1)n.metadata.execute=function(){return n.metadata.builderExecute.apply(this,arguments)};else{var o=e.define;e.define=this.amdDefine;try{ee.call(a,n)}finally{e.define=o}if(!n.metadata.entry&&!n.metadata.bundle)throw new TypeError("AMD module "+n.name+" did not define")}return r.call(a,n)}})}(),function(){function e(e,t){if(t){var r;if(e.pluginFirst){if((r=t.lastIndexOf("!"))!=-1)return t.substr(r+1)}else if((r=t.indexOf("!"))!=-1)return t.substr(0,r);return t}}function t(e,t){var r,n,a=t.lastIndexOf("!");if(a!=-1)return e.pluginFirst?(r=t.substr(a+1),n=t.substr(0,a)):(r=t.substr(0,a),n=t.substr(a+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}}function r(e,t,r,n){return n&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?r+"!"+t:t+"!"+r}function n(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function a(a){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return a.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return r(l,d,c,n(l,u.argument))}}i("decanonicalize",a),i("normalizeSync",a),i("normalize",function(a){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return r(l,e[0],e[1],n(l,u.argument))}):a.call(l,o,i,s)}}),i("locate",function(e){return function(t){var r,n=this,a=t.name;return n.pluginFirst?(r=a.indexOf("!"))!=-1&&(t.metadata.loader=a.substr(0,r),t.name=a.substr(r+1)):(r=a.lastIndexOf("!"))!=-1&&(t.metadata.loader=a.substr(r+1),t.name=a.substr(0,r)),e.call(n,t).then(function(e){return r==-1&&t.metadata.loader?(n.pluginLoader||n).normalize(t.metadata.loader,t.name).then(function(r){return t.metadata.loader=r,e}):e}).then(function(e){var r=t.metadata.loader;if(!r)return e;if(t.name==r)throw new Error("Plugin "+r+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(n.defined&&n.defined[a])return e;var o=n.pluginLoader||n;return o.import(r).then(function(r){return t.metadata.loaderModule=r,t.address=e,r.locate?r.locate.call(n,t):e})})}}),i("fetch",function(e){return function(t){var r=this;return t.metadata.loaderModule&&t.metadata.loaderModule.fetch&&"defined"!=t.metadata.format?(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch.call(r,t,function(t){return e.call(r,t)})):e.call(r,t)}}),i("translate",function(e){return function(t){var r=this,n=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(r,n)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a&&(t.source=a),e.apply(r,n)}):e.apply(r,n)}}),i("instantiate",function(e){return function(t){var r=this,n=!1;return t.metadata.loaderModule&&t.metadata.loaderModule.instantiate&&!r.builder&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.instantiate.call(r,t,function(t){if(n)throw new Error("Instantiate must only be called once.");return n=!0,e.call(r,t)})).then(function(a){return n?a:(void 0!==a&&(t.metadata.entry=k(),t.metadata.entry.execute=function(){return a},t.metadata.entry.deps=t.metadata.deps,t.metadata.format="defined"),e.call(r,t))}):e.call(r,t)}})}();var se=["browser","node","dev","build","production","default"],le=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,r,n){var a=this;return L.call(a,t,r).then(function(t){return e.call(a,t,r,n)}).then(function(e){return C.call(a,e,r)})}}),function(){i("fetch",function(e){return function(t){var r=t.metadata.alias,n=t.metadata.deps||[];if(r){t.metadata.format="defined";var a=k();return this.defined[t.name]=a,a.declarative=!0,a.deps=n.concat([r]),a.declare=function(e){return{setters:[function(t){for(var r in t)e(r,t[r]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,r){for(var n,a=t.split(".");a.length>1;)n=a.shift(),e=e[n]=e[n]||{};n=a.shift(),n in e||(e[n]=r)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var r,n=this.meta,a=t.name,o=0;for(var i in n)if(r=i.indexOf("*"),r!==-1&&i.substr(0,r)===a.substr(0,r)&&i.substr(r+1)===a.substr(a.length-i.length+r+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,n[i],o!=s)}return n[a]&&v(t.metadata,n[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(n){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(r),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return n.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var r=this,n=!1;if(!(t.name in r.defined))for(var a in r.bundles){for(var o=0;o<r.bundles[a].length;o++){var i=r.bundles[a][o];if(i==t.name){n=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){r.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){n=!0;break}}}if(n)return r.import(a).then(function(){return e.call(r,t)})}return e.call(r,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var r=this,n=r.depCache[t.name];if(n)for(var a=0;a<n.length;a++)r.import(n[a],t.name);return e.call(r,t)}})}(),X=new a,e.SystemJS=X,X.version="0.19.41 Standard","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=X),e.System=X}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var r=document.getElementsByTagName("script");if($__curScript=r[r.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),$__curScript.src||($__curScript=void 0),t){var n=$__curScript.src,a=n.substr(0,n.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
+!function(){function e(){!function(e){function t(e,r){if("string"!=typeof e)throw new TypeError("URL must be a string");var n=String(e).replace(/^\s+|\s+$/g,"").replace(/\\/g,"/").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!n)throw new RangeError("Invalid URL format");var a=n[1]||"",o=n[2]||"",i=n[3]||"",s=n[4]||"",l=n[5]||"",u=n[6]||"",d=n[7]||"",c=n[8]||"",f=n[9]||"";if(void 0!==r){var m=r instanceof t?r:new t(r),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var r=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),n=[],a=0;a<r.length;a++)("undefined"==typeof $__curScript||-1==r[a].indexOf($__curScript.src))&&n.push(r[a]);var o="(SystemJS) "+(n?n.join("\n "):e.message.substr(11))+"\n "+t;D||(o=o.replace(q?/file:\/\/\//g:/file:\/\//g,""));var i=N?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function r(){}function n(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},U(this,"global",{get:function(){return e}})}function a(){n.call(this),this.paths={},this._loader.paths={},K.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){K=e(K||function(){})}function l(e){return e.match(Q)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||J)+e.substr(2)}else if("/"!=e[0]&&-1==e.indexOf(":"))return(t&&t.substr(0,t.lastIndexOf("/")+1)||J)+e;return new G(e,t&&t.replace(/#/g,"%05")||ee).href.replace(/%05/g,"#")}function f(e,t){var r,n="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?J:e.baseURL)),-1===s.indexOf("*")){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,n=s,r=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[n];return"string"==typeof r&&(m=m.replace("*",r)),m}function m(e){for(var t=[],r=[],n=0,a=e.length;a>n;n++){var o=$.call(t,e[n]);-1===o?(t.push(e[n]),r.push([n])):r[o].push(n)}return{names:t,indices:r}}function p(t){var r={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(te)for(var n in t)"default"!==n&&h(r,t,n);else g(r,t);return r["default"]=t,U(r,"__useDefault",{value:!0}),r}function h(e,t,r){try{var n;(n=Object.getOwnPropertyDescriptor(t,r))&&U(e,r,n)}catch(a){return e[r]=t[r],!1}}function g(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)(!n||t.hasOwnProperty(a))&&(r&&a in e||(e[a]=t[a]));return e}function v(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)if(!n||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(r?o:e[a]).concat(r?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,r):r||(e[a]=o):e[a]=o}}function y(e,t,r,n,a){for(var o in t)if(-1!=$.call(["main","format","defaultExtension","basePath"],o))e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?r+"/"+i.substr(2):M.call(n,i),n.depCache[s]=(n.depCache[s]||[]).concat(t.depCache[i])}else!a||-1!=$.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(n,'"'+o+'" is not a valid package configuration option in package '+r)}function b(e,t,r,n){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},y(a,n?r:o,t,e,n),y(a,n?o:r,t,e,!n)}else a=e.packages[t]=r;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main["default"]=a.main["default"]||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn&&console.warn(e)}function x(e,t){e.metadata.entry=R(),e.metadata.entry.execute=function(){return t},e.metadata.entry.deps=[],e.metadata.format="defined"}function S(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function _(e,t){var r,n=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(n>=o)continue;r=a,n=o}return r}function E(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new G(this.baseURL,ee).href)}function j(e,t){this.set("@system-env",ne=this.newModule({browser:D,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,"default":!0}))}function P(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!ae){var r=this._nodeRequire("module"),n=t.substr(q?8:7);ae=new r(n),ae.paths=r._nodeModulePaths(n)}return ae.require(e)}function M(e,t){if(u(e))return c(e,t);if(l(e))return e;var r=_(this.map,e);if(r){if(e=this.map[r]+e.substr(r.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(P.call(this,e.substr(6),this.baseURL)))),e}return E.call(this),f(this,e)||this.baseURL+e}function O(e,t,r){ne.browser&&t.browserConfig&&r(t.browserConfig),ne.node&&t.nodeConfig&&r(t.nodeConfig),ne.dev&&t.devConfig&&r(t.devConfig),ne.build&&t.buildConfig&&r(t.buildConfig),ne.production&&t.productionConfig&&r(t.productionConfig)}function k(e){var t=e.match(se);return t&&"System.register"==e.substr(t[0].length,15)}function R(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function z(t){if("string"==typeof t)return S(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var r={},n=!0,a=0;a<t.length;a++){var o=S(t[a],e);n&&(r["default"]=o,n=!1),r[t[a].split(".").pop()]=o}return r}function I(e){var t,r,n,n="~"==e[0],a=e.lastIndexOf("|");return-1!=a?(t=e.substr(a+1),r=e.substr(n,a-n),n&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+r+"|~"+t+'"'),"~"==t[0]&&(n=!0,t=t.substr(1))):(t="default",r=e.substr(n),-1!=ue.indexOf(r)&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function T(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function L(e,t,r){var n=this;return this.normalize(e.module,t).then(function(t){return n.load(t).then(function(a){var o=S(e.prop,n.get(t));if(r&&"boolean"!=typeof o)throw new TypeError("Condition "+T(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function C(e,t){var r=e.match(de);if(!r)return Promise.resolve(e);var n=I.call(this,r[0].substr(2,r[0].length-3));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.replace(de,"#{"+T(n)+"}")}):L.call(this,n,t,!1).then(function(r){if("string"!=typeof r)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(-1!=r.indexOf("/"))throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n The condition value "+r+' cannot contain a "/" separator.');return e.replace(de,r)})}function A(e,t){var r=e.lastIndexOf("#?");if(-1==r)return Promise.resolve(e);var n=I.call(this,e.substr(r+2));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.substr(0,r)+"#?"+T(n)}):L.call(this,n,t,!0).then(function(t){return t?e.substr(0,r):"@empty"})}var F="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,D="undefined"!=typeof window&&"undefined"!=typeof document,q="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var U,$=Array.prototype.indexOf||function(e){for(var t=0,r=this.length;r>t;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(U=Object.defineProperty)}catch(e){U=function(e,t,r){try{e[t]=r.value||r.get.call(e)}catch(n){}}}}();var J,N="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(J=document.baseURI,!J){var B=document.getElementsByTagName("base");J=B[0]&&B[0].href||window.location.href}}else"undefined"!=typeof location&&(J=e.location.href);if(J)J=J.split("#")[0].split("?")[0],J=J.substr(0,J.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");J="file://"+(q?"/":"")+process.cwd()+"/",q&&(J=J.replace(/\\/g,"/"))}try{var H="test:"==new e.URL("test:///").protocol}catch(X){}var G=H?e.URL:e.URLPolyfill;U(r.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,r){return new Promise(u({step:r.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:r&&r.metadata||{},moduleSource:r.source,moduleAddress:r.address}))}function o(t,r,n,a){return new Promise(function(e,o){e(t.loaderObj.normalize(r,n,a))}).then(function(r){var n;if(t.modules[r])return n=e(r),n.status="linked",n.module=t.modules[r],n;for(var a=0,o=t.loads.length;o>a;a++)if(n=t.loads[a],n.name==r)return n;return n=e(r),t.loads.push(n),i(t,n),n})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,r){l(e,t,r.then(function(r){return"loading"==t.status?(t.address=r,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:r})):void 0}))}function l(e,t,r){r.then(function(r){return"loading"==t.status?(t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:r})).then(function(r){return t.source=r,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:r})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var r=t.depsList,n=[],a=0,i=r.length;i>a;a++)(function(r,a){n.push(o(e,r,t.name,t.address).then(function(e){if(t.dependencies[a]={key:r,value:e.name},"linked"!=e.status)for(var n=t.linkSets.concat([]),o=0,i=n.length;i>o;o++)c(n[o],e)}))})(r[a],a);return Promise.all(n)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),r=0,n=e.length;n>r;r++)m(e[r],t)})):void 0})["catch"](function(e){t.status="failed",t.exception=e;for(var r=t.linkSets.concat([]),n=0,a=r.length;a>n;n++)p(r[n],t,e)})}function u(t){return function(r,n){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;m>f;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){r(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),r(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var r={loader:e,loads:[],startingLoad:t,loadingCount:0};return r.done=new Promise(function(e,t){r.resolve=e,r.reject=t}),c(r,t),r}function c(e,t){if("failed"!=t.status){for(var r=0,n=e.loads.length;n>r;r++)if(e.loads[r]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,r=0,n=t.dependencies.length;n>r;r++)if(t.dependencies[r]){var o=t.dependencies[r].value;if(!a.modules[o])for(var i=0,s=a.loads.length;s>i;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(r,n){p(e,r,n),t=!0})}catch(r){p(e,null,r),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var r=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var n=[].concat(e.loads),a=0,o=n.length;o>a;a++){var t=n[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(r)}var i=f(e);i||e.resolve(r)}}function p(e,r,n){var a=e.loader;e:if(r)if(e.loads[0].name==r.name)n=t(n,"Error loading "+r.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==r.name){n=t(n,"Error loading "+r.name+' as "'+l.key+'" from '+i.name);break e}}n=t(n,"Error loading "+r.name+" from "+e.loads[0].name)}else n=t(n,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;d>o;o++){var r=u[o];a.loaderObj.failed=a.loaderObj.failed||[],-1==$.call(a.loaderObj.failed,r)&&a.loaderObj.failed.push(r);var c=$.call(r.linkSets,e);if(r.linkSets.splice(c,1),0==r.linkSets.length){var f=$.call(e.loader.loads,r);-1!=f&&e.loader.loads.splice(f,1)}}e.reject(n)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var r={};t.dependencies.forEach(function(e){r[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:r,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var n=$.call(e.loads,t);-1!=n&&e.loads.splice(n,1);for(var a=0,o=t.linkSets.length;o>a;a++)n=$.call(t.linkSets[a].loads,t),-1!=n&&t.linkSets[a].loads.splice(n,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,n){try{var a=t.execute()}catch(o){return void n(t,o)}return a&&a instanceof r?a:void n(t,new TypeError("Execution must define a Module instance"))}function v(e,t,r){var n=e._loader.importPromises;return n[t]=r.then(function(e){return n[t]=void 0,e},function(e){throw n[t]=void 0,e})}function y(e,t){var r=e.loader;if(e.loads.length)for(var n=e.loads.concat([]),a=0;a<n.length;a++){var o=n[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(r,o)}}var b=0;n.prototype={constructor:n,define:function(e,t,r){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:r&&r.metadata||{},moduleSource:t,moduleAddress:r&&r.address})))},"delete":function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],t.modules[e]?delete t.modules[e]:!1},get:function(e){return this._loader.modules[e]?this._loader.modules[e].module:void 0},has:function(e){return!!this._loader.modules[e]},"import":function(e,t,r){"object"==typeof t&&(t=t.name);var n=this;return Promise.resolve(n.normalize(e,t)).then(function(e){var t=n._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(n,e,a(t,e,{}).then(function(r){return delete t.importPromises[e],r.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():(t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(r){return delete t.importPromises[e],r.module.module}))).then(function(){})},module:function(t,r){var n=e();n.address=r&&r.address;var a=d(this._loader,n),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return n.module.module});return l(i,n,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new r,n=[];if(Object.getOwnPropertyNames&&null!=e)n=Object.getOwnPropertyNames(e);else for(var a in e)n.push(a);for(var o=0;o<n.length;o++)(function(r){U(t,r,{configurable:!1,enumerable:!0,get:function(){return e[r]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(n[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof r))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,r){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=n.prototype.newModule}();var Z,W;if("undefined"!=typeof XMLHttpRequest)W=function(e,t,r,n){function a(){r(i.responseText)}function o(){n(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var V;W=function(e,t,r,n){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return V=V||require("fs"),e=q?e.replace(/\//g,"\\").substr(8):e.substr(7),V.readFile(e,function(e,t){if(e)return n(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),r(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");W=function(e,t,r,n){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(r,n)}}var Y=function(){function t(t){var n=this;return Promise.resolve(e["typescript"==n.transpiler?"ts":n.transpiler]||(n.pluginLoader||n)["import"](n.transpiler)).then(function(e){e.__useDefault&&(e=e["default"]);var a;return a=e.Compiler?r:e.createLanguageService?i:o,"(function(__moduleName){"+a.call(n,t,e)+'\n})("'+t.name+'");\n//# sourceURL='+t.address+"!transpiled"})}function r(e,t){var r=this.traceurOptions||{};r.modules="instantiate",r.script=!1,void 0===r.sourceMaps&&(r.sourceMaps="inline"),r.filename=e.address,r.inputSourceMap=e.metadata.sourceMap,r.moduleName=!1;var n=new t.Compiler(r);return a(e.source,n,r.filename)}function a(e,t,r){try{return t.compile(e,r)}catch(n){if(n.length)throw n[0];throw n}}function o(e,t){var r=this.babelOptions||{};return r.modules="system",void 0===r.sourceMap&&(r.sourceMap="inline"),r.inputSourceMap=e.metadata.sourceMap,r.filename=e.address,r.code=!0,r.ast=!1,t.transform(e.source,r).code}function i(e,t){var r=this.typescriptOptions||{};return r.target=r.target||t.ScriptTarget.ES5,void 0===r.sourceMap&&(r.sourceMap=!0),r.sourceMap&&r.inlineSourceMap!==!1&&(r.inlineSourceMap=!0),r.module=t.ModuleKind.System,t.transpile(e.source,r,e.address)}return n.prototype.transpiler="traceur",t}();o.prototype=n.prototype,a.prototype=new o,a.prototype.constructor=a;var K,Q=/^[^\/]+:\/\//,ee=new G(J),te=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(X){te=!1}var re;!function(){function r(e){return l?c+new Buffer(e).toString("base64"):"undefined"!=typeof btoa?c+btoa(unescape(encodeURIComponent(e))):""}function n(e,t){var n=e.source.lastIndexOf("\n");"global"==e.metadata.format&&(t=!1);var a=e.metadata.sourceMap;if(a){if("object"!=typeof a)throw new TypeError("load.metadata.sourceMap must be set to an object.");a=JSON.stringify(a)}return(t?"(function(System, SystemJS) {":"")+e.source+(t?"\n})(System, System);":"")+("\n//# sourceURL="!=e.source.substr(n,15)?"\n//# sourceURL="+e.address+(a?"!transpiled":""):"")+(a&&r(a)||"")}function a(t,r){d=r,0==h++&&(f=e.System),e.System=e.SystemJS=t}function o(){0==--h&&(e.System=e.SystemJS=f),d=void 0}function s(e){v||(v=document.head||document.body||document.documentElement);var r=document.createElement("script");r.text=n(e,!1);var i,s=window.onerror;if(window.onerror=function(r){i=t(r,"Evaluating "+e.address),s&&s.apply(this,arguments)},a(this,e),e.metadata.integrity&&r.setAttribute("integrity",e.metadata.integrity),e.metadata.nonce&&r.setAttribute("nonce",e.metadata.nonce),v.appendChild(r),v.removeChild(r),o(),window.onerror=s,i)throw i}var l="undefined"!=typeof Buffer;try{l&&"YQ=="!=new Buffer("a").toString("base64")&&(l=!1)}catch(u){l=!1}var d,c="\n//# sourceMappingURL=data:application/json;base64,";i("pushRegister_",function(){return function(e){return d?(this.reduceRegister_(d,e),!0):!1}});var f,m,p,h=0;re=function(e){if(e.source){if((e.metadata.integrity||e.metadata.nonce)&&g)return s.call(this,e);try{a(this,e),d=e,!p&&this._nodeRequire&&(p=this._nodeRequire("vm"),m=p.runInThisContext("typeof System !== 'undefined' && System")===this),m?p.runInThisContext(n(e,!0),{filename:e.address+(e.metadata.sourceMap?"!transpiled":"")}):(0,eval)(n(e,!0)),o()}catch(r){throw o(),t(r,"Evaluating "+e.address)}}};var g=!1;D&&"undefined"!=typeof document&&document.getElementsByTagName&&(window.chrome&&window.chrome.extension||navigator.userAgent.match(/^Node\.js/)||(g=!0));var v}();var ne;s(function(e){return function(){e.call(this),this.baseURL=J,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),j.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var ae;i("normalize",function(e){return function(e,t,r){var n=M.call(this,e,t);return!this.defaultJSExtensions||r||".js"==n.substr(n.length-3,3)||d(n)||(n+=".js"),n}});var oe="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return oe?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,r){W(e.address,e.metadata.authorization,t,r)})}}),i("import",function(e){return function(t,r,n){return r&&r.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+r.name),e.call(this,t,r,n).then(function(e){return e.__useDefault?e["default"]:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=R();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},r=this;for(var n in r)r.hasOwnProperty&&!r.hasOwnProperty(n)||n in a.prototype&&"transpiler"!=n||-1==$.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],n)&&(t[n]=r[n]);return t.production=ne.production,t};var ie;a.prototype.config=function(e,t){function r(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var n=this;if("loaderErrorStack"in e&&(ie=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ie),"warnings"in e&&(n.warnings=e.warnings),e.transpilerRuntime===!1&&(n._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&j.call(n,!!e.production,!!(e.build||ne&&ne.build)),!t){var a;if(O(n,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(r(n.packages)||r(n.meta)||r(n.depCache)||r(n.bundles)||r(n.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,E.call(this)}if(e.paths&&g(n.paths,e.paths),O(n,e,function(e){e.paths&&g(n.paths,e.paths)}),this.warnings)for(var o in n.paths)-1!=o.indexOf("*")&&w.call(n,'Paths configuration "'+o+'" -> "'+n.paths[o]+'" uses wildcards which are being deprecated for just leaving a trailing "/" to indicate folder paths.')}if(e.defaultJSExtensions&&(n.defaultJSExtensions=e.defaultJSExtensions,w.call(n,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(n.pluginFirst=e.pluginFirst),e.map)for(var o in e.map){var i=e.map[o];if("string"!=typeof i){var s=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=n.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3));var u="";for(var c in n.packages)l.substr(0,c.length)==c&&(!l[c.length]||"/"==l[c.length])&&u.split("/").length<c.split("/").length&&(u=c);u&&n.packages[u].main&&(l=l.substr(0,l.length-n.packages[u].main.length-1));var c=n.packages[l]=n.packages[l]||{};c.map=i}else n.map[o]=i}if(e.packageConfigPaths){for(var f=[],m=0;m<e.packageConfigPaths.length;m++){var p=e.packageConfigPaths[m],h=Math.max(p.lastIndexOf("*")+1,p.lastIndexOf("/")),v=M.call(n,p.substr(0,h));f[m]=v+p.substr(h)}n.packageConfigPaths=f}if(e.bundles)for(var o in e.bundles){for(var y=[],m=0;m<e.bundles[o].length;m++){var s=n.defaultJSExtensions&&".js"!=e.bundles[o][m].substr(e.bundles[o][m].length-3,3),x=n.decanonicalize(e.bundles[o][m]);s&&".js"==x.substr(x.length-3,3)&&(x=x.substr(0,x.length-3)),y.push(x)}n.bundles[o]=y}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var l=M.call(n,o);"/"==l[l.length-1]&&(l=l.substr(0,l.length-1)),b(n,l,e.packages[o],!1)}for(var S in e){var i=e[S];if(-1==$.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],S))if("object"!=typeof i||i instanceof Array)n[S]=i;else{n[S]=n[S]||{};for(var o in i)if("meta"==S&&"*"==o[0])g(n[S][o]=n[S][o]||{},i[o]);else if("meta"==S){var _=M.call(n,o);n.defaultJSExtensions&&".js"!=_.substr(_.length-3,3)&&!d(_)&&(_+=".js"),g(n[S][_]=n[S][_]||{},i[o])}else if("depCache"==S){var s=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),l=n.decanonicalize(o);s&&".js"==l.substr(l.length-3,3)&&(l=l.substr(0,l.length-3)),n[S][l]=[].concat(i[o])}else n[S][o]=i[o]}}O(n,e,function(e){n.config(e,!0)})},function(){function e(e,t){var r,n,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(n=o.split("/").length,n>a&&(r=o,a=n));return r}function t(e,t,r,n,a){if(!n||"/"==n[n.length-1]||a||t.defaultExtension===!1)return n;var o=!1;if(t.meta&&p(t.meta,n,function(e,t,r){return 0==r||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),!o&&e.meta&&p(e.meta,r+"/"+n,function(e,t,r){return 0==r||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),o)return n;var i="."+(t.defaultExtension||"js");return n.substr(n.length-i.length)!=i?n+i:n}function r(e,r,n,a,i){if(!a){if(!r.main)return n+(e.defaultJSExtensions?".js":"");a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+a,l=_(r.map,s);if(l||(s="./"+t(e,r,n,a,i),s!="./"+a&&(l=_(r.map,s))),l){var u=o(e,r,n,l,s,i);if(u)return u}}return n+"/"+t(e,r,n,a,i)}function n(e,t,r,n){if("."==e)throw new Error("Package "+r+' has a map entry for "." which is not permitted.');return t.substr(0,e.length)==e&&n.length>e.length?!1:!0}function o(e,r,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=r.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(n(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,r,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,r,n,a,o){if(!a){if(!r.main)return Promise.resolve(n+(e.defaultJSExtensions?".js":""));a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}var i,s;return r.map&&(i="./"+a,s=_(r.map,i),s||(i="./"+t(e,r,n,a,o),i!="./"+a&&(s=_(r.map,i)))),(s?d(e,r,n,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(n+"/"+t(e,r,n,a,o))})}function u(e,r,n,a,o,i,s){if("."==o)o=n;else if("./"==o.substr(0,2))return Promise.resolve(n+"/"+t(e,r,n,o.substr(2)+i.substr(a.length),s)).then(function(t){return C.call(e,t,n+"/")});return e.normalize(o+i.substr(a.length),n+"/")}function d(e,t,r,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return n(a,s,r,o)?u(e,t,r,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(r+"/#:"+o);var l=[],d=[];for(var c in s){var f=I(c);d.push({condition:f,map:s[c]}),l.push(e["import"](f.module,r))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var r=d[t].condition,n=S(r.prop,e[t]);if(!r.negate&&n||r.negate&&!n)return d[t].map}}).then(function(s){if(s){if(!n(a,s,r,o))return;return u(e,t,r,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:-1!=t}}function f(e,t){for(var r,n,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||r&&(a&&s.wildcard||!(r.length<l[1].length))||(r=l[1],a=!s.wildcard,n=r+i.substr(s.length))}}return r?{packageName:r,configPath:n}:void 0}function m(e,t,r){var n=e.pluginLoader||e;return(n.meta[r]=n.meta[r]||{}).format="json",n.meta[r].loader=null,n.load(r).then(function(){var a=n.get(r)["default"];return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+r+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),b(e,t,a,!0)})}function p(e,t,r){var n;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),n=a.indexOf("*"),-1!==n&&a.substr(0,n)==t.substr(0,n)&&a.substr(n+1)==t.substr(t.length-a.length+n+1)&&r(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&r(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(r,n){if(this.builder)return t.call(this,r,n,!0);var a=t.call(this,r,n,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,r){return 0==r||e.lastIndexOf("*")!=e.length-1?(s=!1,!0):void 0}),(s===!1||s&&".js"!=s)&&".js"!=r.substr(r.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(n,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));
+var u=l&&s.packages[l];if(u&&"."!=n[0]){var d=u.map,c=d&&_(d,n);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,n,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),h=t.call(s,n,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);if(!v)return h+(p?".js":"");var y=h.substr(v.length+1);return r(s,s.packages[v]||{},v,y,i)}}),i("normalize",function(t){return function(r,n,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(n)var t=e(o,n)||o.defaultJSExtensions&&".js"==n.substr(n.length-3,3)&&e(o,n.substr(0,n.length-3));var i=t&&o.packages[t];if(i&&"./"!=r.substr(0,2)){var s=i.map,l=s&&_(s,r);if(l)return d(o,i,t,l,r,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),u=t.call(o,r,n,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(r){var n=this;return Promise.resolve(t.call(this,r)).then(function(t){var a=e(n,r.name);if(a){var o=n.packages[a],i=r.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,r){r>l&&(l=r),v(s,t,r&&l>r)}),v(r.metadata,s)}o.format&&!r.metadata.loader&&(r.metadata.format=r.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function r(e,t){return new Promise(function(e,r){t.metadata.integrity&&r(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(n){l=null,r(n)}l=null,t.metadata.entry||r(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var n=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=n&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(r){return e.call(this,r)?!1:(l?this.reduceRegister_(l,r):u?this.reduceRegister_(t(),r):c?f.push(r):this.reduceRegister_(null,r),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(D||F)?F?r(l,i):new Promise(function(t,r){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var n=0;n<f.length;n++)l.reduceRegister_(i,f[n]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||r(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),r(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);n.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,n.appendChild(g)}):t.call(this,i)}})}();var se=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,r,n){if(n[e.groupIndex]=n[e.groupIndex]||[],-1==$.call(n[e.groupIndex],e)){n[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;o>a;a++){var i=e.normalizedDeps[a],s=r.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(n[s.groupIndex].splice($.call(n[s.groupIndex],s),1),0==n[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,r,n)}}}}function n(e,r,n){if(!r.module){r.groupIndex=0;var a=[];t(r,n,a);for(var o=!!r.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,n):c(d,n)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,r){if(!t.module){var n=r._loader.moduleRecords,a=t.module=l(t.name,n),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var r in e)o[r]=e[r];else o[e]=t;for(var n=0,i=a.importers.length;i>n;n++){var s=a.importers[n];if(!s.locked){var l=$.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;d>s;s++){var c,f=t.normalizedDeps[s],m=r.defined[f],p=n[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,r),p=m.module,c=p.exports):c=r.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;v>g;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function d(e,t){var r,n=t.defined[e];if(n)n.declarative?f(e,n,[],t):n.evaluated||c(n,t),r=n.module.exports;else if(r=t.get(e),!r)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&r&&r.__useDefault?r["default"]:r}function c(t,n){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;s>i;i++){var l=t.normalizedDeps[i],u=n.defined[l];u&&c(u,n)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var r=0,a=t.deps.length;a>r;r++)if(t.deps[r]==e)return d(t.normalizedDeps[r],n);var o=n.normalizeSync(e,t.name);if(-1!=$.call(t.normalizedDeps,o))return d(o,n);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof r)?t.esModule=n.newModule(a):t.esmExports&&a!==e?t.esModule=n.newModule(p(a)):t.esModule=n.newModule({"default":a,__useDefault:!0})}}function f(t,r,n,a){if(r&&!r.evaluated&&r.declarative){n.push(t);for(var o=0,i=r.normalizedDeps.length;i>o;o++){var s=r.normalizedDeps[o];-1==$.call(n,s)&&(a.defined[s]?f(s,a.defined[s],n,a):a.get(s))}r.evaluated||(r.evaluated=!0,r.module.execute.call(e))}}a.prototype.register=function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=null),"boolean"==typeof r)return this.registerDynamic.apply(this,arguments);var n=R();n.name=e&&(this.decanonicalize||this.normalize).call(this,e),n.declarative=!0,n.deps=t,n.declare=r,this.pushRegister_({amd:!1,entry:n})},a.prototype.registerDynamic=function(e,t,r,n){"string"!=typeof e&&(n=r,r=t,t=e,e=null);var a=R();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=n,a.executingRequire=r,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var r=t.entry,n=e&&e.metadata;if(r.name&&(r.name in this.defined||(this.defined[r.name]=r),n&&(n.bundle=!0)),!r.name||e&&!n.entry&&r.name==e.name){if(!n)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(n.entry)throw"register"==n.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+n.format+" module format, but called System.register.");n.format||(n.format="register"),n.entry=r}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),U(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||"system"==t.metadata.format||!t.metadata.format&&k(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var r=this,a=r.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],n(t,a,r),f(t,a,[],r),a.esModule||(a.esModule=r.newModule(a.module.exports)),r.trace||(r.defined[t]=void 0),r.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var r,a=this;if(a.defined[t.name])r=a.defined[t.name],r.declarative||(r.deps=r.deps.concat(t.metadata.deps)),r.deps=r.deps.concat(t.metadata.deps);else if(t.metadata.entry)r=t.metadata.entry,r.deps=r.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof re&&re.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");r=t.metadata.entry,r&&t.metadata.deps&&(r.deps=r.deps.concat(t.metadata.deps))}r||(r=R(),r.deps=t.metadata.deps,r.execute=function(){}),a.defined[t.name]=r;var o=m(r.deps);r.deps=o.names,r.originalIndices=o.indices,r.name=t.name,r.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=r.deps.length;l>s;s++)i.push(Promise.resolve(a.normalize(r.deps[s],t.name)));return Promise.all(i).then(function(e){return r.normalizedDeps=e,{deps:r.deps,execute:function(){return n(t.name,r,a),f(t.name,r,[],a),r.esModule||(r.esModule=a.newModule(r.module.exports)),a.trace||(a.defined[t.name]=void 0),r.esModule}}})}})}(),function(){var r=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,n=/\$traceurRuntime\s*\./,a=/babelHelpers\s*\./;i("translate",function(o){return function(i){var s=this,l=arguments;return o.apply(s,l).then(function(o){if("esm"==i.metadata.format||"es6"==i.metadata.format||!i.metadata.format&&o.match(r)){if("es6"==i.metadata.format&&w.call(s,"Module "+i.name+' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".'),i.metadata.format="esm",i.metadata.deps){for(var u="",d=0;d<i.metadata.deps.length;d++)u+='import "'+i.metadata.deps[d]+'"; ';i.source=u+o}if(s.transpiler===!1){if(s.builder)return o;throw new TypeError("Unable to dynamically transpile ES module as SystemJS.transpiler set to false.")}return s._loader.loadedTranspiler=s._loader.loadedTranspiler||!1,s.pluginLoader&&(s.pluginLoader._loader.loadedTranspiler=s._loader.loadedTranspiler||!1),(s._loader.transpilerPromise||(s._loader.transpilerPromise=Promise.resolve(e["typescript"==s.transpiler?"ts":s.transpiler]||(s.pluginLoader||s).normalize(s.transpiler).then(function(e){return s._loader.transpilerNormalized=e,(s.pluginLoader||s).load(e).then(function(){return(s.pluginLoader||s).get(e)})})))).then(function(t){return s._loader.loadedTranspilerRuntime=!0,"function"!=typeof t["default"]||e["typescript"==s.transpiler?"ts":s.transpiler]?t.translate?t==i.metadata.loaderModule?i.source:("string"==typeof i.metadata.sourceMap&&(i.metadata.sourceMap=JSON.parse(i.metadata.sourceMap)),Promise.resolve(t.translate.apply(s,l)).then(function(e){var t=i.metadata.sourceMap;if(t&&"object"==typeof t){var r=i.address.split("!")[0];t.file&&t.file!=i.address||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]==i.address))&&(t.sources=[r])}return"esm"==i.metadata.format&&!s.builder&&k(e)&&(i.metadata.format="register"),e})):(s.builder&&(i.metadata.originalSource=i.source),Y.call(s,i).then(function(e){return i.metadata.sourceMap=void 0,e})):s.builder?o:Promise.resolve(t["default"].call(s,i.address,i.name)).then(function(e){return x(i,e),""})},function(e){throw t(e,"Unable to load transpiler to transpile "+i.name)})}if(s.transpiler===!1)return o;if(s._loader.loadedTranspiler!==!1||"traceur"!=s.transpiler&&"typescript"!=s.transpiler&&"babel"!=s.transpiler||i.name!=s.normalizeSync(s.transpiler)||(o.length>100&&!i.metadata.format&&(i.metadata.format="global","traceur"===s.transpiler&&(i.metadata.exports="traceur"),"typescript"===s.transpiler&&(i.metadata.exports="ts")),s._loader.loadedTranspiler=!0),s._loader.loadedTranspilerRuntime===!1&&(i.name==s.normalizeSync("traceur-runtime")||i.name==s.normalizeSync("babel/external-helpers*"))&&(o.length>100&&(i.metadata.format=i.metadata.format||"global"),s._loader.loadedTranspilerRuntime=!0),("register"==i.metadata.format||i.metadata.bundle)&&s._loader.loadedTranspilerRuntime!==!0){if("traceur"==s.transpiler&&!e.$traceurRuntime&&i.source.match(n))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s["import"]("traceur-runtime").then(function(){return o});if("babel"==s.transpiler&&!e.babelHelpers&&i.source.match(a))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s["import"]("babel/external-helpers").then(function(){return o})}return o})}})}();var le="undefined"!=typeof self?"self":"global";i("fetch",function(e){return function(t){return t.metadata.exports&&!t.metadata.format&&(t.metadata.format="global"),e.call(this,t)}}),i("instantiate",function(e){return function(t){var r=this;if(t.metadata.format||(t.metadata.format="global"),"global"==t.metadata.format&&!t.metadata.entry){var n=R();t.metadata.entry=n,n.deps=[];for(var a in t.metadata.globals){var o=t.metadata.globals[a];o&&n.deps.push(o)}n.execute=function(e,n,a){var o;if(t.metadata.globals){o={};for(var i in t.metadata.globals)t.metadata.globals[i]&&(o[i]=e(t.metadata.globals[i]))}var s=t.metadata.exports;s&&(t.source+="\n"+le+'["'+s+'"] = '+s+";");var l=r.get("@@global-helpers").prepareGlobal(a.id,s,o,!!t.metadata.encapsulateGlobal);return re.call(r,t),l()}}return e.call(this,t)}}),i("reduceRegister_",function(e){return function(t,r){if(r||!t.metadata.exports&&(!F||"global"!=t.metadata.format))return e.call(this,t,r);t.metadata.format="global";var n=t.metadata.entry=R();n.deps=t.metadata.deps;var a=z(t.metadata.exports);n.execute=function(){return a}}}),s(function(t){return function(){function r(t){if(Object.keys)Object.keys(e).forEach(t);else for(var r in e)i.call(e,r)&&t(r)}function n(t){r(function(r){if(-1==$.call(s,r)){try{var n=e[r]}catch(a){s.push(r)}t(r,n)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,r,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return r||(o={},n(function(e,t){o[e]=t})),function(){var t,a=r?z(r):{},u=!!r;if((!r||i)&&n(function(n,s){o[n]!==s&&"undefined"!=typeof s&&(i&&(e[n]=void 0),r||(a[n]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),function(){function t(e){function t(e,t){for(var r=0;r<e.length;r++)if(e[r][0]<t.index&&e[r][1]>t.index)return!0;return!1}n.lastIndex=a.lastIndex=o.lastIndex=0;var r,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;r=o.exec(e);)s.push([r.index,r.index+r[0].length]);for(;r=a.exec(e);)t(s,r)||l.push([r.index+r[1].length,r.index+r[0].length-1])}for(;r=n.exec(e);)if(!t(s,r)&&!t(l,r)){var u=r[1].substr(1,r[1].length-2);if(u.match(/"|'/))continue;"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),i.push(u)}return i}var r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,s=/^\#\!.*/;i("instantiate",function(a){return function(o){var i=this;if(o.metadata.format||(r.lastIndex=0,n.lastIndex=0,(n.exec(o.source)||r.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format){var l=o.metadata.deps,u=o.metadata.cjsRequireDetection===!1?[]:t(o.source);for(var d in o.metadata.globals)o.metadata.globals[d]&&u.push(o.metadata.globals[d]);var c=R();o.metadata.entry=c,c.deps=u,c.executingRequire=!0,c.execute=function(t,r,n){function a(e){return"/"==e[e.length-1]&&(e=e.substr(0,e.length-1)),t.apply(this,arguments)}if(a.resolve=function(e){return i.get("@@cjs-helpers").requireResolve(e,n.id)},n.paths=[],n.require=t,!o.metadata.cjsDeferDepsExecute)for(var u=0;u<l.length;u++)a(l[u]);var d=i.get("@@cjs-helpers").getPathVars(n.id),c={exports:r,args:[a,r,n,d.filename,d.dirname,e,e]},f="(function(require, exports, module, __filename, __dirname, global, GLOBAL";if(o.metadata.globals)for(var m in o.metadata.globals)c.args.push(a(o.metadata.globals[m])),f+=", "+m;var p=e.define;e.define=void 0,e.__cjsWrapper=c,o.source=f+") {"+o.source.replace(s,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);",re.call(i,o),e.__cjsWrapper=void 0,e.define=p}}return a.call(i,o)}})}(),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!q):n&&e.substr(0,n.length)==n?e.substr(n.length):e}var r=this;if(e.call(r),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var n=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");r.set("@@cjs-helpers",r.newModule({requireResolve:function(e,n){return t(r.normalizeSync(e,n))},getPathVars:function(e){var r,n=e.lastIndexOf("!");r=-1!=n?e.substr(0,n):e;var a=r.split("/");return a.pop(),a=a.join("/"),{filename:t(r),dirname:t(a)}}}))}}),i("fetch",function(t){return function(r){return r.metadata.scriptLoad&&D&&(e.define=this.amdDefine),t.call(this,r)}}),s(function(t){return function(){function r(e,t){e=e.replace(s,"");var r=e.match(d),n=(r[1].split(",")[t]||"require").replace(c,""),a=f[n]||(f[n]=new RegExp(l+n+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function n(e,t,r,a){if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l["default"]:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o["import"](e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},r)}function a(t,a,i){function s(t,r,s){function c(e,r,a){return"string"==typeof e&&"function"!=typeof r?t(e):n.call(o,e,r,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},-1!=d&&f.splice(d,0,s),-1!=u&&f.splice(u,0,r),-1!=l&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),r=o.decanonicalize(e,s.id);return t&&".js"==r.substr(r.length-3,3)&&(r=r.substr(0,r.length-3)),r},f.splice(l,0,c));var p=e.require;e.require=n;var h=i.apply(-1==u?e:r,f);return e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h?h:void 0}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;-1!=(l=$.call(a,"require"))&&(a.splice(l,1),t||(a=a.concat(r(i.toString(),l)))),-1!=(u=$.call(a,"exports"))&&a.splice(u,1),-1!=(d=$.call(a,"module"))&&a.splice(d,1);var c=R();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,r){if(!r||!r.amd)return e.call(this,t,r);var n=t&&t.metadata,a=r.entry;if(n)if(n.format&&"detect"!=n.format){if(!a.name&&"amd"!=n.format)throw new Error("AMD define called while executing "+n.format+" module "+t.name)}else n.format="amd";if(a.name)n&&(n.entry||n.bundle?n.entry&&n.entry.name&&n.entry.name!=t.name&&(n.entry=void 0):n.entry=a,n.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!n)throw new TypeError("Unexpected anonymous AMD define.");if(n.entry&&!n.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);n.entry=a}}}),o.amdDefine=a,o.amdRequire=n}}),function(){var t=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;i("instantiate",function(r){return function(n){var a=this;if("amd"==n.metadata.format||!n.metadata.format&&n.source.match(t))if(n.metadata.format="amd",a.builder||a.execute===!1)n.metadata.execute=function(){return n.metadata.builderExecute.apply(this,arguments)};else{var o=e.define;e.define=this.amdDefine;try{re.call(a,n)}finally{e.define=o}if(!n.metadata.entry&&!n.metadata.bundle)throw new TypeError("AMD module "+n.name+" did not define")}return r.call(a,n)}})}(),function(){function e(e,t){if(t){var r;if(e.pluginFirst){if(-1!=(r=t.lastIndexOf("!")))return t.substr(r+1)}else if(-1!=(r=t.indexOf("!")))return t.substr(0,r);return t}}function t(e,t){var r,n,a=t.lastIndexOf("!");return-1!=a?(e.pluginFirst?(r=t.substr(a+1),n=t.substr(0,a)):(r=t.substr(0,a),n=t.substr(a+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}):void 0}function n(e,t,r,n){return n&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?r+"!"+t:t+"!"+r}function a(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function o(r){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return r.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return n(l,d,c,a(l,u.argument))}}i("decanonicalize",o),i("normalizeSync",o),i("normalize",function(r){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return n(l,e[0],e[1],a(l,u.argument))}):r.call(l,o,i,s)}}),i("locate",function(e){return function(t){var r,n=this,a=t.name;return n.pluginFirst?-1!=(r=a.indexOf("!"))&&(t.metadata.loader=a.substr(0,r),t.name=a.substr(r+1)):-1!=(r=a.lastIndexOf("!"))&&(t.metadata.loader=a.substr(r+1),t.name=a.substr(0,r)),e.call(n,t).then(function(e){return-1==r&&t.metadata.loader?(n.pluginLoader||n).normalize(t.metadata.loader,t.name).then(function(r){return t.metadata.loader=r,e}):e}).then(function(e){var r=t.metadata.loader;if(!r)return e;if(t.name==r)throw new Error("Plugin "+r+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(n.defined&&n.defined[a])return e;var o=n.pluginLoader||n;return o["import"](r).then(function(r){return t.metadata.loaderModule=r,t.address=e,r.locate?r.locate.call(n,t):e})})}}),i("fetch",function(e){return function(t){var n=this;if(t.metadata.loaderModule&&"defined"!=t.metadata.format){if("function"==typeof t.metadata.loaderModule||t.metadata.loaderModule instanceof r&&"function"==typeof t.metadata.loaderModule["default"])return"";if(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch)return t.metadata.loaderModule.fetch.call(n,t,function(t){return e.call(n,t)})}return e.call(n,t)}}),i("translate",function(e){return function(t){var r=this,n=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(r,n)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a&&(t.source=a),e.apply(r,n)}):e.apply(r,n)}}),i("instantiate",function(e){return function(t){var n=this,a=!1;if(t.metadata.loaderModule&&!n.builder&&"defined"!=t.metadata.format){if(t.metadata.loaderModule.instantiate)return Promise.resolve(t.metadata.loaderModule.instantiate.call(n,t,function(t){if(a)throw new Error("Instantiate must only be called once.");return a=!0,e.call(n,t)})).then(function(r){return a?r:(void 0!==r&&x(t,r),e.call(n,t))});if("function"==typeof t.metadata.loaderModule||t.metadata.loaderModule instanceof r&&"function"==typeof t.metadata.loaderModule["default"])return Promise.resolve((t.metadata.loaderModule["default"]||t.metadata.loaderModule).call(n,t.address,t.name)).then(function(r){return void 0!==r&&x(t,r),e.call(n,t)})}return e.call(n,t)}})}();var ue=["browser","node","dev","build","production","default"],de=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,r,n){var a=this;return A.call(a,t,r).then(function(t){return e.call(a,t,r,n)}).then(function(e){return C.call(a,e,r)})}}),function(){i("fetch",function(e){return function(t){var r=t.metadata.alias,n=t.metadata.deps||[];if(r){t.metadata.format="defined";var a=R();return this.defined[t.name]=a,a.declarative=!0,a.deps=n.concat([r]),a.declare=function(e){return{setters:[function(t){for(var r in t)e(r,t[r]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,r){for(var n,a=t.split(".");a.length>1;)n=a.shift(),e=e[n]=e[n]||{};n=a.shift(),n in e||(e[n]=r)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var r,n=this.meta,a=t.name,o=0;for(var i in n)if(r=i.indexOf("*"),-1!==r&&i.substr(0,r)===a.substr(0,r)&&i.substr(r+1)===a.substr(a.length-i.length+r+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,n[i],o!=s)}return n[a]&&v(t.metadata,n[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(n){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(r),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return n.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var r=this,n=!1;if(!(t.name in r.defined))for(var a in r.bundles){for(var o=0;o<r.bundles[a].length;o++){var i=r.bundles[a][o];if(i==t.name){n=!0;break}if(-1!=i.indexOf("*")){var s=i.split("*");if(2!=s.length){r.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&-1==t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")){n=!0;break}}}if(n)return r["import"](a).then(function(){return e.call(r,t)})}return e.call(r,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var r=this,n=r.depCache[t.name];if(n)for(var a=0;a<n.length;a++)r["import"](n[a],t.name);return e.call(r,t)}})}(),Z=new a,e.SystemJS=Z,Z.version="0.19.47 Standard","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=Z),e.System=Z}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var r=document.getElementsByTagName("script");if($__curScript=r[r.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),$__curScript.src||($__curScript=void 0),t){var n=$__curScript.src,a=n.substr(0,n.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(o){o.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
//# sourceMappingURL=system.js.map
diff --git a/node_modules/systemjs/dist/system.js.map b/node_modules/systemjs/dist/system.js.map
index bda47f38e..362c1f5ea 100644
--- a/node_modules/systemjs/dist/system.js.map
+++ b/node_modules/systemjs/dist/system.js.map
@@ -1 +1 @@
-{"version":3,"sources":["system.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","load","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","transpile","transpiler","pluginLoader","__useDefault","transpileFunction","Compiler","traceurTranspile","createLanguageService","typescriptTranspile","babelTranspile","traceur","traceurOptions","script","sourceMaps","filename","inputSourceMap","sourceMap","compiler","doTraceurCompile","compile","babel","babelOptions","code","ast","transform","ts","typescriptOptions","target","ScriptTarget","ES5","inlineSourceMap","ModuleKind","__exec","sourceMapString","hasBuffer","sourceMapPrefix","Buffer","btoa","unescape","encodeURIComponent","getSource","wrap","lastLineIndex","format","JSON","stringify","preExec","curLoad","callCounter","curSystem","SystemJS","postExec","scriptExec","head","body","documentElement","createElement","_e","apply","arguments","integrity","setAttribute","nonce","appendChild","removeChild","register","reduceRegister_","useVm","vm","supportsScriptExec","runInThisContext","eval","chrome","extension","navigator","userAgent","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","systemTranslate","entry","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","interactiveLoadingScripts","webWorkerImport","workerLoad","curRequire","ieEvents","s","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","async","crossOrigin","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","grouped","normalizePromises","esmRegEx","traceurRuntimeRegEx","babelHelpersRegEx","args","depInject","loadedTranspiler","transpilerPromise","loaderModule","originalName","file","sources","originalSource","$traceurRuntime","babelHelpers","__globalName","g","globals","gl","exportName","retrieveGlobal","prepareGlobal","encapsulateGlobal","reduceRegister","forEachGlobal","callback","keys","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","getCJSDeps","inLocation","locations","cjsRequireRegEx","lastIndex","commentRegEx","stringRegEx","stringLocations","commentLocations","cjsExportsRegEx","hashBangRegEx","metaDeps","cjsRequireDetection","_require","requireResolve","cjsDeferDepsExecute","pathVars","getPathVars","__cjsWrapper","dirname","cjsWrapper","stripOrigin","windowOrigin","parentId","moduleId","pluginIndex","amdDefine","requireIndex","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","amdRegEx","builderExecute","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","result","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","version","doPolyfill","scripts","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":"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"} \ No newline at end of file
+{"version":3,"sources":["system.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","createInstantiate","load","result","metadata","entry","createEntry","execute","format","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","originalIndices","declare","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","transpile","transpiler","pluginLoader","__useDefault","transpileFunction","Compiler","traceurTranspile","createLanguageService","typescriptTranspile","babelTranspile","traceur","traceurOptions","script","sourceMaps","filename","inputSourceMap","sourceMap","compiler","doTraceurCompile","compile","babel","babelOptions","code","ast","transform","ts","typescriptOptions","target","ScriptTarget","ES5","inlineSourceMap","ModuleKind","__exec","sourceMapString","hasBuffer","sourceMapPrefix","Buffer","btoa","unescape","encodeURIComponent","getSource","wrap","lastLineIndex","JSON","stringify","preExec","curLoad","callCounter","curSystem","SystemJS","postExec","scriptExec","head","body","documentElement","createElement","_e","apply","arguments","integrity","setAttribute","nonce","appendChild","removeChild","register","reduceRegister_","useVm","vm","supportsScriptExec","runInThisContext","eval","chrome","extension","navigator","userAgent","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","systemTranslate","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","interactiveLoadingScripts","webWorkerImport","workerLoad","curRequire","ieEvents","s","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","async","crossOrigin","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","grouped","normalizePromises","esmRegEx","traceurRuntimeRegEx","babelHelpersRegEx","args","depInject","loadedTranspiler","transpilerPromise","transpilerNormalized","loaderModule","originalName","file","sources","originalSource","$traceurRuntime","babelHelpers","__globalName","g","globals","gl","exportName","retrieveGlobal","prepareGlobal","encapsulateGlobal","reduceRegister","forEachGlobal","callback","keys","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","getCJSDeps","inLocation","locations","cjsRequireRegEx","lastIndex","commentRegEx","stringRegEx","stringLocations","commentLocations","cjsExportsRegEx","hashBangRegEx","metaDeps","cjsRequireDetection","_require","requireResolve","cjsDeferDepsExecute","pathVars","getPathVars","__cjsWrapper","dirname","cjsWrapper","stripOrigin","windowOrigin","parentId","moduleId","pluginIndex","amdDefine","requireIndex","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","amdRegEx","builderExecute","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","version","doPolyfill","scripts","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":"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"} \ No newline at end of file
diff --git a/node_modules/systemjs/dist/system.src.js b/node_modules/systemjs/dist/system.src.js
index 13dbc2fe5..e7e59edc3 100644
--- a/node_modules/systemjs/dist/system.src.js
+++ b/node_modules/systemjs/dist/system.src.js
@@ -1,5 +1,5 @@
/*
- * SystemJS v0.19.41
+ * SystemJS v0.19.47
*/
(function() {
function bootstrap() {// from https://gist.github.com/Yaffle/1088850
@@ -7,7 +7,7 @@ function bootstrap() {// from https://gist.github.com/Yaffle/1088850
function URLPolyfill(url, baseURL) {
if (typeof url != 'string')
throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
+ var m = String(url).replace(/^\s+|\s+$/g, "").replace(/\\/g, '/').match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
if (!m)
throw new RangeError('Invalid URL format');
var protocol = m[1] || "";
@@ -65,7 +65,8 @@ function URLPolyfill(url, baseURL) {
this.hash = hash;
}
global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
+})(typeof self != 'undefined' ? self : global);
+(function(__global) {
var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
@@ -83,7 +84,7 @@ global.URLPolyfill = URLPolyfill;
}
return -1;
};
-
+
var defineProperty;
(function () {
try {
@@ -120,9 +121,9 @@ global.URLPolyfill = URLPolyfill;
newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
+
newErr.stack = newMsg;
-
+
// track the original error
newErr.originalErr = err.originalErr || err;
@@ -431,7 +432,7 @@ function logloads(loads) {
.then(function(instantiateResult) {
if (instantiateResult === undefined)
throw new TypeError('Declarative modules unsupported in the polyfill.');
-
+
if (typeof instantiateResult != 'object')
throw new TypeError('Invalid instantiate return value');
@@ -494,8 +495,6 @@ function logloads(loads) {
for (var i = 0, l = linkSets.length; i < l; i++) {
linkSetFailed(linkSets[i], load, exc);
}
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
});
}
@@ -548,7 +547,6 @@ function logloads(loads) {
proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
else {
- console.assert(step == 'translate', 'translate step');
load.address = stepState.moduleAddress;
proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
}
@@ -636,9 +634,6 @@ function logloads(loads) {
function updateLinkSetOnLoad(linkSet, load) {
// console.log('update linkset on load ' + load.name);
// snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
linkSet.loadingCount--;
if (linkSet.loadingCount > 0)
@@ -671,8 +666,6 @@ function logloads(loads) {
if (abrupt)
return;
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
linkSet.resolve(startingLoad);
}
@@ -681,7 +674,7 @@ function logloads(loads) {
var loader = linkSet.loader;
var requests;
- checkError:
+ checkError:
if (load) {
if (linkSet.loads[0].name == load.name) {
exc = addToError(exc, 'Error loading ' + load.name);
@@ -715,7 +708,6 @@ function logloads(loads) {
loader.loaderObj.failed.push(load);
var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
load.linkSets.splice(linkIndex, 1);
if (load.linkSets.length == 0) {
var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
@@ -747,7 +739,6 @@ function logloads(loads) {
}
// if not anonymous, add to the module table
if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
loader.modules[load.name] = load.module;
}
var loadIndex = indexOf.call(loader.loads, load);
@@ -857,7 +848,7 @@ function logloads(loads) {
var loader = this._loader;
if (loader.modules[name])
return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
+ return (loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
step: 'locate',
loader: loader,
moduleName: name,
@@ -865,9 +856,11 @@ function logloads(loads) {
moduleSource: undefined,
moduleAddress: undefined
}))
- .then(function() {
+ .then(function(load) {
delete loader.importPromises[name];
- }));
+ return load.module.module;
+ })))
+ .then(function () {});
},
// 26.3.3.11
module: function(source, options) {
@@ -977,7 +970,6 @@ function logloads(loads) {
})();
var System;
-
var fetchTextFromURL;
if (typeof XMLHttpRequest != 'undefined') {
fetchTextFromURL = function(url, authorization, fulfill, reject) {
@@ -1265,7 +1257,7 @@ function applyPaths(loader, name) {
if (p.indexOf('*') === -1) {
if (name == p)
return paths[p];
-
+
// support trailing / in paths rules
else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
@@ -1419,7 +1411,7 @@ function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidPropertie
loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
}
}
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
+ else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
(!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
}
@@ -1441,7 +1433,7 @@ function setPkgConfig(loader, pkgName, cfg, prependConfig) {
extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
}
-
+
// main object becomes main map
if (typeof pkg.main == 'object') {
pkg.map = pkg.map || {};
@@ -1457,6 +1449,15 @@ function warn(msg) {
if (this.warnings && typeof console != 'undefined' && console.warn)
console.warn(msg);
}
+
+function createInstantiate (load, result) {
+ load.metadata.entry = createEntry();
+ load.metadata.entry.execute = function() {
+ return result;
+ }
+ load.metadata.entry.deps = [];
+ load.metadata.format = 'defined';
+}
// we define a __exec for globally-scoped execution
// used by module format implementations
var __exec;
@@ -2902,7 +2903,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
*
*
* The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
+ * circular ES6 compiled into System.register can work alongside circular AMD
* and CommonJS, identically to the actual ES6 loader.
*
*/
@@ -2912,7 +2913,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
* Registry side table entries in loader.defined
* Registry Entry Contains:
* - name
- * - deps
+ * - deps
* - declare for declarative modules
* - execute for dynamic modules, different to declarative execute on module
* - executingRequire indicates require drives execution for circularity of dynamic modules
@@ -2930,7 +2931,7 @@ SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
* For dynamic we track the es module with:
* - esModule actual es module value
* - esmExports whether to extend the esModule with named exports
- *
+ *
* Then for declarative only we track dynamic bindings with the 'module' records:
* - name
* - exports
@@ -2975,7 +2976,7 @@ function createEntry() {
* see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
*
* 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
+ * the true or false statement
*
* this extension implements the linking algorithm for the two variations identical to the spec
* allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
@@ -2994,7 +2995,7 @@ function createEntry() {
return this.registerDynamic.apply(this, arguments);
var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
+ // ideally wouldn't apply map config to bundle names but
// dependencies go through map regardless so we can't restrict
// could reconsider in shift to new spec
entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
@@ -3080,17 +3081,17 @@ function createEntry() {
for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
var depName = entry.normalizedDeps[i];
var depEntry = loader.defined[depName];
-
+
// not in the registry means already linked / ES6
if (!depEntry || depEntry.evaluated)
continue;
-
+
// now we know the entry is in our unlinked linkage group
var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
// the group index of an entry is always the maximum
if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
+
// if already in a group, remove from the old group
if (depEntry.groupIndex !== null) {
groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
@@ -3130,7 +3131,7 @@ function createEntry() {
else
linkDynamicModule(entry, loader);
}
- curGroupDeclarative = !curGroupDeclarative;
+ curGroupDeclarative = !curGroupDeclarative;
}
}
@@ -3190,7 +3191,7 @@ function createEntry() {
// allowing undefined declaration was a mistake! To be deprecated.
declaration = declaration || { setters: [], execute: function() {} };
-
+
module.setters = declaration.setters;
module.execute = declaration.execute;
@@ -3233,7 +3234,7 @@ function createEntry() {
else {
module.dependencies.push(null);
}
-
+
// run setters for all entries with the matching dependency name
var originalIndices = entry.originalIndices[i];
for (var j = 0, len = originalIndices.length; j < len; ++j) {
@@ -3259,7 +3260,7 @@ function createEntry() {
else {
if (entry.declarative)
ensureEvaluated(name, entry, [], loader);
-
+
else if (!entry.evaluated)
linkDynamicModule(entry, loader);
@@ -3268,7 +3269,7 @@ function createEntry() {
if ((!entry || entry.declarative) && exports && exports.__useDefault)
return exports['default'];
-
+
return exports;
}
@@ -3306,7 +3307,7 @@ function createEntry() {
throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
}, exports, module);
-
+
if (output !== undefined)
module.exports = output;
@@ -3330,7 +3331,7 @@ function createEntry() {
* (unless one is a circular dependency already in the list of seen
* modules, in which case we execute it)
*
- * Then we evaluate the module itself depth-first left to right
+ * Then we evaluate the module itself depth-first left to right
* execution to match ES6 modules
*/
function ensureEvaluated(moduleName, entry, seen, loader) {
@@ -3376,7 +3377,7 @@ function createEntry() {
}
load.metadata.deps = load.metadata.deps || [];
-
+
return fetch.call(this, load);
};
});
@@ -3387,7 +3388,7 @@ function createEntry() {
load.metadata.deps = load.metadata.deps || [];
return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
// run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
+ if (load.metadata.format == 'register' || load.metadata.format == 'system' || !load.metadata.format && detectRegisterFormat(load.source))
load.metadata.format = 'register';
return source;
});
@@ -3405,7 +3406,7 @@ function createEntry() {
entry.originalIndices = entry.normalizedDeps = [];
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(normalized, entry, loader);
@@ -3456,9 +3457,9 @@ function createEntry() {
// Contains System.register calls
// (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
+ else if (!(loader.builder && load.metadata.bundle)
&& (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
+
if (typeof __exec != 'undefined')
__exec.call(loader, load);
@@ -3481,9 +3482,9 @@ function createEntry() {
// place this module onto defined for circular references
loader.defined[load.name] = entry;
-
+
var grouped = group(entry.deps);
-
+
entry.deps = grouped.names;
entry.originalIndices = grouped.indices;
entry.name = load.name;
@@ -3501,7 +3502,7 @@ function createEntry() {
return {
deps: entry.deps,
execute: function() {
- // recursively ensure that the module and all its
+ // recursively ensure that the module and all its
// dependencies are linked (with dependency group handling)
link(load.name, entry, loader);
@@ -3569,10 +3570,28 @@ function createEntry() {
// do transpilation
return (loader._loader.transpilerPromise || (
loader._loader.transpilerPromise = Promise.resolve(
- __global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler] || (loader.pluginLoader || loader)['import'](loader.transpiler)
+ __global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler] || (loader.pluginLoader || loader).normalize(loader.transpiler)
+ .then(function(normalized) {
+ loader._loader.transpilerNormalized = normalized;
+ return (loader.pluginLoader || loader).load(normalized)
+ .then(function() {
+ return (loader.pluginLoader || loader).get(normalized);
+ });
+ })
))).then(function(transpiler) {
loader._loader.loadedTranspilerRuntime = true;
+ if (typeof transpiler.default === 'function' && !__global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler]) {
+ // instantiate plugins dont build
+ if (loader.builder)
+ return source;
+ return Promise.resolve(transpiler.default.call(loader, load.address, load.name))
+ .then(function (result) {
+ createInstantiate(load, result);
+ return '';
+ });
+ }
+
// translate hooks means this is a transpiler plugin instead of a raw implementation
if (transpiler.translate) {
// if transpiler is the same as the plugin loader, then don't run twice
@@ -3589,7 +3608,7 @@ function createEntry() {
var sourceMap = load.metadata.sourceMap;
if (sourceMap && typeof sourceMap == 'object') {
var originalName = load.address.split('!')[0];
-
+
// force set the filename of the original file
if (!sourceMap.file || sourceMap.file == load.address)
sourceMap.file = originalName + '!transpiled';
@@ -3608,14 +3627,14 @@ function createEntry() {
// legacy builder support
if (loader.builder)
load.metadata.originalSource = load.source;
-
+
// defined in es6-module-loader/src/transpile.js
return transpile.call(loader, load)
.then(function(source) {
// clear sourceMap as transpiler embeds it
load.metadata.sourceMap = undefined;
return source;
- });
+ });
}, function(err) {
throw addToError(err, 'Unable to load transpiler to transpile ' + load.name);
});
@@ -4539,15 +4558,16 @@ hookConstructor(function(constructor) {
hook('fetch', function(fetch) {
return function(load) {
var loader = this;
- if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
+ if (load.metadata.loaderModule && load.metadata.format != 'defined') {
+ if (typeof load.metadata.loaderModule === 'function' || load.metadata.loaderModule instanceof Module && typeof load.metadata.loaderModule.default === 'function')
+ return '';
load.metadata.scriptLoad = false;
- return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
- return fetch.call(loader, load);
- });
- }
- else {
- return fetch.call(loader, load);
+ if (load.metadata.loaderModule.fetch)
+ return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
+ return fetch.call(loader, load);
+ });
}
+ return fetch.call(loader, load);
};
});
@@ -4584,9 +4604,7 @@ hookConstructor(function(constructor) {
return translate.apply(loader, args);
});
}
- else {
- return translate.apply(loader, args);
- }
+ return translate.apply(loader, args);
};
});
@@ -4595,28 +4613,30 @@ hookConstructor(function(constructor) {
var loader = this;
var calledInstantiate = false;
- if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
- return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
- if (calledInstantiate)
- throw new Error('Instantiate must only be called once.');
- calledInstantiate = true;
- return instantiate.call(loader, load);
- })).then(function(result) {
- if (calledInstantiate)
- return result;
-
- if (result !== undefined) {
- load.metadata.entry = createEntry();
- load.metadata.entry.execute = function() {
+ if (load.metadata.loaderModule && !loader.builder && load.metadata.format != 'defined') {
+ if (load.metadata.loaderModule.instantiate)
+ return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
+ if (calledInstantiate)
+ throw new Error('Instantiate must only be called once.');
+ calledInstantiate = true;
+ return instantiate.call(loader, load);
+ })).then(function(result) {
+ if (calledInstantiate)
return result;
- }
- load.metadata.entry.deps = load.metadata.deps;
- load.metadata.format = 'defined';
- }
- return instantiate.call(loader, load);
- });
- else
- return instantiate.call(loader, load);
+
+ if (result !== undefined)
+ createInstantiate(load, result);
+ return instantiate.call(loader, load);
+ });
+ else if (typeof load.metadata.loaderModule === 'function' || load.metadata.loaderModule instanceof Module && typeof load.metadata.loaderModule.default === 'function')
+ return Promise.resolve((load.metadata.loaderModule.default || load.metadata.loaderModule).call(loader, load.address, load.name))
+ .then(function (result) {
+ if (result !== undefined)
+ createInstantiate(load, result);
+ return instantiate.call(loader, load);
+ });
+ }
+ return instantiate.call(loader, load);
};
});
@@ -5094,7 +5114,7 @@ hookConstructor(function(constructor) {
System = new SystemJSLoader();
__global.SystemJS = System;
-System.version = '0.19.41 Standard';
+System.version = '0.19.47 Standard';
if (typeof module == 'object' && module.exports && typeof exports == 'object')
module.exports = System;
diff --git a/node_modules/systemjs/index.js b/node_modules/systemjs/index.js
index 6a958ecff..f8ebe41f2 100644
--- a/node_modules/systemjs/index.js
+++ b/node_modules/systemjs/index.js
@@ -7,18 +7,17 @@ var isWindows = typeof process.platform != 'undefined' && process.platform.match
// set transpiler paths in Node
var nodeResolver = typeof process != 'undefined' && typeof require != 'undefined' && require.resolve;
-function configNodePath(loader, module, nodeModule, wildcard) {
+function configNodePath(loader, module, nodeModule) {
if (loader.paths[module])
return;
- var ext = wildcard ? '/package.json' : '';
try {
- var match = nodeResolver(nodeModule + ext).replace(/\\/g, '/');
+ var match = nodeResolver(nodeModule + (module[module.length - 1] === '/' ? 'package.json' : '')).replace(/\\/g, '/');
}
catch(e) {}
-
+
if (match)
- loader.paths[module] = 'file://' + (isWindows ? '/' : '') + match.substr(0, match.length - ext.length) + (wildcard ? '/*.js' : '');
+ loader.paths[module] = 'file://' + (isWindows ? '/' : '') + match.substr(0, match.length - (module[module.length - 1] === '/' ? 12 : 0));
}
var SystemJSLoader = require('./dist/system.src').constructor;
@@ -32,7 +31,7 @@ function SystemJSNodeLoader() {
configNodePath(this, 'traceur-runtime', 'traceur/bin/traceur-runtime.js');
configNodePath(this, 'babel', 'babel-core/browser.js');
configNodePath(this, 'babel/external-helpers', 'babel-core/external-helpers.js');
- configNodePath(this, 'babel-runtime/*', 'babel-runtime', true);
+ configNodePath(this, 'babel-runtime/', 'babel-runtime/');
}
}
SystemJSNodeLoader.prototype = Object.create(SystemJSLoader.prototype);
diff --git a/node_modules/systemjs/package.json b/node_modules/systemjs/package.json
index a32d45585..f4ceb08da 100644
--- a/node_modules/systemjs/package.json
+++ b/node_modules/systemjs/package.json
@@ -1,6 +1,6 @@
{
"name": "systemjs",
- "version": "0.19.41",
+ "version": "0.19.47",
"description": "Universal dynamic module loader",
"repository": {
"type": "git",
diff --git a/node_modules/through2/LICENSE b/node_modules/through2/LICENSE
deleted file mode 100644
index f6a0029de..000000000
--- a/node_modules/through2/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/node_modules/through2/README.md b/node_modules/through2/README.md
index c84b3464a..a916f15ef 100644
--- a/node_modules/through2/README.md
+++ b/node_modules/through2/README.md
@@ -20,6 +20,9 @@ fs.createReadStream('ex.txt')
callback()
}))
.pipe(fs.createWriteStream('out.txt'))
+ .on('finish', function () {
+ doSomethingSpecial()
+ })
```
Or object streams:
diff --git a/node_modules/through2/package.json b/node_modules/through2/package.json
index c7afac7f0..12d8fd665 100644
--- a/node_modules/through2/package.json
+++ b/node_modules/through2/package.json
@@ -1,6 +1,6 @@
{
"name": "through2",
- "version": "2.0.1",
+ "version": "2.0.3",
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
"main": "through2.js",
"scripts": {
@@ -20,13 +20,13 @@
"author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
"license": "MIT",
"dependencies": {
- "readable-stream": "~2.0.0",
- "xtend": "~4.0.0"
+ "readable-stream": "^2.1.5",
+ "xtend": "~4.0.1"
},
"devDependencies": {
- "bl": "~0.9.4",
+ "bl": "~1.1.2",
"faucet": "0.0.1",
"stream-spigot": "~3.0.5",
- "tape": "~4.0.0"
+ "tape": "~4.6.2"
}
}
diff --git a/node_modules/typescript/.mailmap b/node_modules/typescript/.mailmap
index cc101c051..73ebed0cc 100644
--- a/node_modules/typescript/.mailmap
+++ b/node_modules/typescript/.mailmap
@@ -1,18 +1,22 @@

AbubakerB <abubaker_bashir@hotmail.com> # Abubaker Bashir
Alexander <alexander@kuvaev.me># Alexander Kuvaev
+Aluan Haddad <aluanh@gmail.com>
Adam Freidin <adam.freidin@gmail.com> Adam Freidin <afreidin@adobe.com>
Adi Dahiya <adahiya@palantir.com> Adi Dahiya <adi.dahiya14@gmail.com>
Ahmad Farid <ahfarid@microsoft.com> ahmad-farid <ahfarid@microsoft.com>
Alexander Rusakov <a_s_rusakov@mail.ru>
Alex Eagle <alexeagle@google.com>
Anatoly Ressin <anatoly.ressin@icloud.com>
-Anders Hejlsberg <andersh@microsoft.com> unknown <andersh@AndersX1.NOE.Nokia.com> unknown <andersh@andersh-yoga.redmond.corp.microsoft.com>
+Anders Hejlsberg <andersh@microsoft.com> unknown <andersh@AndersX1.NOE.Nokia.com> unknown <andersh@andersh-yoga.redmond.corp.microsoft.com> Anders Hejlsberg <Anders Hejlsberg>
+about-code <about-code@users.noreply.github.com> # Andreas Martin
Andrej Baran <andrej.baran@gmail.com>
+Andrew Ochsner <andrew.ochsner@wipro.com>
Andrew Z Allen <me@andrewzallen.com>
Andy Hanson <anhans@microsoft.com> Andy <anhans@microsoft.com>
Anil Anar <anilanar@hotmail.com>
Anton Tolmachev <myste@mail.ru>
+Anubha Mathur <anubmat@microsoft.com> anubmat <anubmat@microsoft.com>
Arnavion <arnavion@gmail.com> # Arnav Singh
Arthur Ozga <aozgaa@umich.edu> Arthur Ozga <t-arthoz@microsoft.com> Arthur Ozga <aozgaa-ms@outlook.com> Arthur Ozga <aozgaa@users.noreply.github.com> Arthur Ozga <arozga@microsoft.com>
Asad Saeeduddin <masaeedu@gmail.com>
@@ -21,6 +25,7 @@ Basarat Ali Syed <basaratali@gmail.com> Basarat Syed <basaratali@gmail.com> basa
Bill Ticehurst <billti@hotmail.com> Bill Ticehurst <billti@microsoft.com>
Ben Duffield <jebavarde@gmail.com>
Ben Mosher <me@benmosher.com>
+Benjamin Bock <bb@users.noreply.github.com>
Blake Embrey <hello@blakeembrey.com>
Bowden Kelly <wilkelly@microsoft.com>
Brett Mayen <bmayen@midnightsnacks.net>
@@ -37,6 +42,7 @@ Dan Corder <dev@dancorder.com>
Dan Quirk <danquirk@microsoft.com> Dan Quirk <danquirk@users.noreply.github.com> nknown <danquirk@DANQUIRK1.redmond.corp.microsoft.com>
Daniel Rosenwasser <drosen@microsoft.com> Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Daniel Rosenwasser <DanielRosenwasser@gmail.com> Daniel Rosenwasser <Daniel.Rosenwasser@microsoft.com> Daniel Rosenwasser <DanielRosenwasser@microsoft.com>
David Li <jiawei.davidli@gmail.com>
+David Sheldrick <david@futurice.com>
David Souther <davidsouther@gmail.com>
Denis Nedelyaev <denvned@gmail.com>
Dick van den Brink <d_vandenbrink@outlook.com> unknown <d_vandenbrink@outlook.com> unknown <d_vandenbrink@live.com>
@@ -45,6 +51,7 @@ Dirk Holtwick <dirk.holtwick@gmail.com>
Dom Chen <domchen@users.noreply.github.com>
Doug Ilijev <dilijev@users.noreply.github.com>
Erik Edrosa <erik.edrosa@gmail.com>
+Erik McClenney <erikmcc@google.com>
erictsangx <erictsangx@gmail.com> # Eric Tsang
Ethan Rubio <ethanrubio@users.noreply.github.com>
Evan Martin <martine@danga.com>
@@ -52,6 +59,7 @@ Evan Sebastian <evanlhoini@gmail.com>
Eyas <eyas.sharaiha@gmail.com> # Eyas Sharaiha
Fabian Cook <faybecook@gmail.com>
falsandtru <falsandtru@users.noreply.github.com> # @falsandtru
+flowmemo <flowmemo@outlook.com> # @flowmemo
Frank Wallis <fwallis@outlook.com>
František Žiacik <fziacik@gratex.com> František Žiacik <ziacik@gmail.com>
Gabe Moothart <gmoothart@gmail.com>
@@ -62,13 +70,19 @@ Graeme Wicksted <graeme.wicksted@gmail.com>
Guillaume Salles <guillaume.salles@me.com>
Guy Bedford <guybedford@gmail.com> guybedford <guybedford@gmail.com>
Harald Niesche <harald@niesche.de>
+Homa Wong <homawong@gmail.com>
+Hendrik Liebau <mail@hendrik-liebau.de>
Iain Monro <iain.monro@softwire.com>
+IgorNovozhilov <maildrakon@gmail.com> # Igor Novozhilov
Ingvar Stepanyan <me@rreverser.com>
impinball <impinball@gmail.com> # Isiah Meadows
+Iwata Hidetaka <iwata0303@gmail.com>
Ivo Gabe de Wolff <ivogabe@ivogabe.nl>
Jakub Młokosiewicz <hckr@users.noreply.github.com>
James Whitney <james@whitney.io>
+James Henry <james@henry.sc>
Jason Freeman <jfreeman@microsoft.com> Jason Freeman <JsonFreeman@users.noreply.github.com>
+Jason Jarrett <jason@elegantcode.com>
Jason Killian <jkillian@palantir.com>
Jason Ramsay <jasonra@microsoft.com> jramsay <jramsay@users.noreply.github.com>
Jed Mao <jed.hunsaker@gmail.com>
@@ -81,7 +95,9 @@ Jonathan Park <jpark@daptiv.com>
Jonathan Turner <jont@microsoft.com> Jonathan Turner <probata@hotmail.com>
Jonathan Toland <toland@dnalot.com>
Jesse Schalken <me@jesseschalken.com>
+Joel Day <joelday@gmail.com>
Josh Abernathy <joshaber@gmail.com> joshaber <joshaber@gmail.com>
+Josh Goldberg <joshuakgoldberg@outlook.com>
Josh Kalderimis <josh.kalderimis@gmail.com>
Josh Soref <jsoref@users.noreply.github.com>
Juan Luis Boya García <ntrrgc@gmail.com>
@@ -95,22 +111,31 @@ Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui T <yuisu@microsoft.com>
Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui <yuit@users.noreply.github.com>
Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui <yuisu@microsoft.com>
Kanchalai Tanglertsampan <yuisu@microsoft.com> yui T <yuisu@microsoft.com>
+Kārlis Gaņģis <Knagis@users.noreply.github.com>
Keith Mashinter <kmashint@yahoo.com> kmashint <kmashint@yahoo.com>
Ken Howard <ken@simplicatedweb.com>
Kevin Lang <klang2012@gmail.com>
kimamula <kenji.imamula@gmail.com> # Kenji Imamula
+Kitson Kelly <me@kitsonkelly.com>
+Klaus Meinhardt <klaus.meinhardt1@gmail.com>
Kyle Kelley <rgbkrk@gmail.com>
Lorant Pinter <lorant.pinter@prezi.com>
Lucien Greathouse <me@lpghatguy.com>
Lukas Elmer <lukas.elmer@gmail.com> Lukas Elmer <lukas.elmer@renuo.ch>
+Magnus Hiie <magnus.hiie@gmail.com>
Martin Vseticka <vseticka.martin@gmail.com> Martin Všeticka <vseticka.martin@gmail.com> MartyIX <vseticka.martin@gmail.com>
gcnew <gcnew@abv.bg> # Marin Marinov
vvakame <vvakame+dev@gmail.com> # Masahiro Wakame
-Matt McCutchen <rmccutch@mit.edu>
+Matt McCutchen <rmccutch@mit.edu> Matt McCutchen <matt@mattmccutchen.net>
+Matt Bierner <matb@microsoft.com>
+MANISH-GIRI <manish.giri.me@gmail.com> # Manish Giri
Max Deepfield <maxdeepfield@absolutefreakout.com>
Micah Zoltu <micah@zoltu.net>
Michael <maykelchiche@gmail.com>
+Mike Busyrev <busyrev@gmail.com>
+Mine Starks <minestarks@users.noreply.github.com> Mine Starks <mineyalc@microsoft.com>
Mohamed Hegazy <mhegazy@microsoft.com>
+ncoley <nrcoley@gmail.com> # Natalie Coley
Nathan Shively-Sanders <nathansa@microsoft.com>
Nathan Yee <ny.nathan.yee@gmail.com>
Nima Zahedi <nima.zahedee@gmail.com>
@@ -133,12 +158,14 @@ Rado Kirov <radokirov@google.com>
Ron Buckton <rbuckton@microsoft.com> Ron Buckton <ron.buckton@microsoft.com> rbuckton <rbuckton@chronicles.org>
Rostislav Galimsky <rostgal@gmail.com>
Richard Knoll <riknoll@users.noreply.github.com> Richard Knoll <riknoll@microsoft.com>
+Richard Karmazín <richard@karmazin.cz>
Rowan Wyborn <rwyborn@internode.on.net>
Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com> Ryan Cavanaugh <ryan.cavanaugh@microsoft.com> Ryan Cavanaugh <ryanca@microsoft.com>
Ryohei Ikegami <iofg2100@gmail.com>
Sarangan Rajamanickam <sarajama@microsoft.com>
Sébastien Arod <sebastien.arod@gmail.com>
Sergey Shandar <sergey-shandar@users.noreply.github.com>
+chico <chi187@gmail.com> # Sergey Rubanov
Sheetal Nandi <shkamat@microsoft.com>
Shengping Zhong <zhongsp@users.noreply.github.com>
shyyko.serhiy@gmail.com <shyyko.serhiy@gmail.com> # Shyyko Serhiy
@@ -146,6 +173,7 @@ Sam El-Husseini <samelh@microsoft.com>
Simon Hürlimann <simon.huerlimann@cyt.ch>
Slawomir Sadziak <slsadzia@microsoft.com>
Solal Pirelli <solal.pirelli@gmail.com>
+Soo Jae Hwang <misoguy1985@gmail.com>
Stan Thomas <stmsdn@norvil.net>
Stanislav Sysoev <d4rkr00t@gmail.com>
Steve Lucco <steveluc@users.noreply.github.com> steveluc <steveluc@microsoft.com>
@@ -163,6 +191,7 @@ Torben Fitschen <torben.fitschen@mayflower.de>
TruongSinh Tran-Nguyen <i@truongsinh.pro>
vilicvane <i@vilic.info> # Vilic Vane
Vladimir Matveev <vladima@microsoft.com> vladima <vladima@microsoft.com> v2m <desco.by@gmail.com>
+Vadi Taslim <vadz77@hotmail.com>
Wesley Wigham <t-weswig@microsoft.com> Wesley Wigham <wwigham@gmail.com>
York Yao <plantain-00@users.noreply.github.com> york yao <yaoao12306@outlook.com> yaoyao <yaoyao12306@163.com>
Yuichi Nukiyama <oscar.wilde84@hotmail.co.jp> YuichiNukiyama <oscar.wilde84@hotmail.co.jp>
@@ -172,4 +201,51 @@ zhongsp <patrick.zhongsp@gmail.com> # Patrick Zhong
T18970237136 <T18970237136@users.noreply.github.com> # @T18970237136
JBerger <JBerger@melco.com>
bootstraponline <code@bootstraponline.com> # @bootstraponline
-yortus <yortus@gmail.com> # @yortus \ No newline at end of file
+yortus <yortus@gmail.com> # @yortus
+András Parditka <andraaspar@gmail.com>
+Anton Khlynovskiy <subzey@gmail.com>
+Charly POLY <cpoly55@gmail.com>
+Cotton Hou <himcotton@gmail.com>
+Ethan Resnick <ethan.resnick@gmail.com>
+Marius Schulz <marius.schulz@me.com>
+Mattias Buelens <mattias.buelens@gmail.com>
+Myles Megyesi <mylesmegyesi@users.noreply.github.com>
+Tim Lancina <tim@ionic.io>
+Aaron Holmes <aaron@aaronholmes.net> Aaron Holmes <aholmes@bltomato.com>
+Akshar Patel <akshar.patel.47@gmail.com>
+Ali Sabzevari <alisabzevari@gmail.com>
+Aliaksandr Radzivanovich <aradzivanovich@gmail.com>
+BuildTools <FranklinWhale@users.noreply.github.com> # Franklin Tse
+ChogyDan <danielhollocher@gmail.com> # Daniel Hollocher
+Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Daniel Rosenwasser <drosen@microsoft.com>
+DLehenbauer <DLehenbauer@users.noreply.github.com> # Daniel Lehenbauer
+David Kmenta <david.kmenta@lmc.eu>
+E020873 <nicolas.henry-partner@arcelormittal.com> # Nicolas Henry
+Elisée Maurer <elisee@sparklinlabs.com>
+Emilio García-Pumarino <emili.tfe@gmail.com> dashaus <emili.tfe@gmail.com>
+Guilherme Oenning <me@goenning.net>
+Herrington Darkholme <nonamesheep1@gmail.com>
+Ivo Gabe de Wolff <ivogabe@ivogabe.nl>
+Joey Wilson <joey.wilson.a@gmail.com>
+Jonathon Smith <failing@crashdive.co.uk>
+Juan Luis Boya García <ntrrgc@gmail.com>
+Kagami Sascha Rosylight <saschanaz@outlook.com>
+Lucien Greathouse <me@lpghatguy.com>
+Martin Vseticka <vseticka.martin@gmail.com>
+Mattias Buelens <mattias.buelens@opentelly.com>
+Michael Bromley <michael@michaelbromley.co.uk>
+Paul Jolly <paul@myitcv.org.uk>
+Perry Jiang <jiangperry@gmail.com>
+Peter Burns <rictic@google.com>
+Robert Coie <rac@intrigue.com>
+Thomas Loubiou <t.loubiou@systonic.fr>
+Tim Perry <tim.perry@softwire.com>
+Vidar Tonaas Fauske <vidartf@gmail.com>
+Viktor Zozulyak <zozulyakviktor@gmail.com>
+rix <rix@rixs-MacBook-Pro.local> # Richard Sentino
+rohitverma007 <rohitverma@live.ca> # Rohit Verma
+rdosanjh <me@rajdeep.io> # Raj Dosanjh
+gdh1995 <gdh1995@qq.com> # Dahan Gong
+cedvdb <cedvandenbosch@gmail.com> # @cedvdb
+kpreisser <kpreisser@users.noreply.github.com> # K. Preißer
+e-cloud <saintscott119@gmail.com> # @e-cloud \ No newline at end of file
diff --git a/node_modules/typescript/.npmignore b/node_modules/typescript/.npmignore
index 02d8fe428..d3c27afef 100644
--- a/node_modules/typescript/.npmignore
+++ b/node_modules/typescript/.npmignore
@@ -1,8 +1,11 @@
built
doc
+Gulpfile.ts
internal
issue_template.md
+jenkins.sh
lib/README.md
+netci.groovy
pull_request_template.md
scripts
src
diff --git a/node_modules/typescript/AUTHORS.md b/node_modules/typescript/AUTHORS.md
index 50f1ea12c..4772d5371 100644
--- a/node_modules/typescript/AUTHORS.md
+++ b/node_modules/typescript/AUTHORS.md
@@ -1,18 +1,28 @@
TypeScript is authored by:
+* Aaron Holmes
* Abubaker Bashir
* Adam Freidin
* Adi Dahiya
* Ahmad Farid
+* Akshar Patel
* Alex Eagle
* Alexander Kuvaev
* Alexander Rusakov
+* Ali Sabzevari
+* Aliaksandr Radzivanovich
+* Aluan Haddad
* Anatoly Ressin
* Anders Hejlsberg
+* Andreas Martin
* Andrej Baran
+* Andrew Ochsner
* Andrew Z Allen
+* András Parditka
* Andy Hanson
* Anil Anar
+* Anton Khlynovskiy
* Anton Tolmachev
+* Anubha Mathur
* Arnav Singh
* Arthur Ozga
* Asad Saeeduddin
@@ -20,6 +30,7 @@ TypeScript is authored by:
* Basarat Ali Syed
* Ben Duffield
* Ben Mosher
+* Benjamin Bock
* Bill Ticehurst
* Blake Embrey
* @bootstraponline
@@ -27,17 +38,25 @@ TypeScript is authored by:
* Brett Mayen
* Bryan Forbes
* Caitlin Potter
+* @cedvdb
+* Charly POLY
* Chris Bubernak
* Christophe Vidal
* Chuck Jazdzewski
* Colby Russell
* Colin Snover
+* Cotton Hou
* Cyrus Najmabadi
* Dafrok Zhang
+* Dahan Gong
* Dan Corder
* Dan Quirk
+* Daniel Hollocher
+* Daniel Lehenbauer
* Daniel Rosenwasser
+* David Kmenta
* David Li
+* David Sheldrick
* David Souther
* Denis Nedelyaev
* Dick van den Brink
@@ -45,32 +64,46 @@ TypeScript is authored by:
* Dirk Holtwick
* Dom Chen
* Doug Ilijev
+* @e-cloud
+* Elisée Maurer
+* Emilio García-Pumarino
* Eric Tsang
* Erik Edrosa
+* Erik McClenney
+* Ethan Resnick
* Ethan Rubio
* Evan Martin
* Evan Sebastian
* Eyas Sharaiha
* Fabian Cook
* @falsandtru
+* @flowmemo
* Frank Wallis
+* Franklin Tse
* František Žiacik
* Gabe Moothart
* Gabriel Isenberg
* Gilad Peleg
* Godfrey Chan
* Graeme Wicksted
+* Guilherme Oenning
* Guillaume Salles
* Guy Bedford
* Harald Niesche
+* Hendrik Liebau
* Herrington Darkholme
+* Homa Wong
* Iain Monro
+* Igor Novozhilov
* Ingvar Stepanyan
* Isiah Meadows
* Ivo Gabe de Wolff
+* Iwata Hidetaka
* Jakub Młokosiewicz
+* James Henry
* James Whitney
* Jason Freeman
+* Jason Jarrett
* Jason Killian
* Jason Ramsay
* JBerger
@@ -78,39 +111,59 @@ TypeScript is authored by:
* Jeffrey Morlan
* Jesse Schalken
* Jiri Tobisek
+* Joel Day
+* Joey Wilson
* Johannes Rieken
* John Vilk
* Jonathan Bond-Caron
* Jonathan Park
* Jonathan Toland
* Jonathan Turner
+* Jonathon Smith
* Josh Abernathy
+* Josh Goldberg
* Josh Kalderimis
* Josh Soref
* Juan Luis Boya García
* Julian Williams
* Justin Bay
* Justin Johansson
+* K. Preißer
* Kagami Sascha Rosylight
* Kanchalai Tanglertsampan
* Keith Mashinter
* Ken Howard
* Kenji Imamula
* Kevin Lang
+* Kitson Kelly
+* Klaus Meinhardt
* Kyle Kelley
+* Kārlis Gaņģis
* Lorant Pinter
* Lucien Greathouse
* Lukas Elmer
+* Magnus Hiie
+* Manish Giri
* Marin Marinov
+* Marius Schulz
* Martin Vseticka
* Masahiro Wakame
+* Matt Bierner
* Matt McCutchen
+* Mattias Buelens
+* Mattias Buelens
* Max Deepfield
* Micah Zoltu
* Michael
+* Michael Bromley
+* Mike Busyrev
+* Mine Starks
* Mohamed Hegazy
+* Myles Megyesi
+* Natalie Coley
* Nathan Shively-Sanders
* Nathan Yee
+* Nicolas Henry
* Nima Zahedi
* Noah Chen
* Noj Vek
@@ -119,9 +172,12 @@ TypeScript is authored by:
* Omer Sheikh
* Oskar Segersva¨rd
* Patrick Zhong
+* Paul Jolly
* Paul van Brenk
* @pcbro
* Pedro Maltez
+* Perry Jiang
+* Peter Burns
* Philip Bulley
* Piero Cangianiello
* @piloopin
@@ -129,7 +185,12 @@ TypeScript is authored by:
* @progre
* Punya Biswal
* Rado Kirov
+* Raj Dosanjh
+* Richard Karmazín
* Richard Knoll
+* Richard Sentino
+* Robert Coie
+* Rohit Verma
* Ron Buckton
* Rostislav Galimsky
* Rowan Wyborn
@@ -137,6 +198,7 @@ TypeScript is authored by:
* Ryohei Ikegami
* Sam El-Husseini
* Sarangan Rajamanickam
+* Sergey Rubanov
* Sergey Shandar
* Sheetal Nandi
* Shengping Zhong
@@ -144,6 +206,7 @@ TypeScript is authored by:
* Simon Hürlimann
* Slawomir Sadziak
* Solal Pirelli
+* Soo Jae Hwang
* Stan Thomas
* Stanislav Sysoev
* Steve Lucco
@@ -152,7 +215,9 @@ TypeScript is authored by:
* @T18970237136
* Tarik Ozket
* Tetsuharu Ohzeki
+* Thomas Loubiou
* Tien Hoanhtien
+* Tim Lancina
* Tim Perry
* Tim Viiding-Spader
* Tingan Ho
@@ -161,6 +226,9 @@ TypeScript is authored by:
* Tomas Grubliauskas
* Torben Fitschen
* TruongSinh Tran-Nguyen
+* Vadi Taslim
+* Vidar Tonaas Fauske
+* Viktor Zozulyak
* Vilic Vane
* Vladimir Matveev
* Wesley Wigham
diff --git a/node_modules/typescript/Gulpfile.ts b/node_modules/typescript/Gulpfile.ts
deleted file mode 100644
index 054e99c80..000000000
--- a/node_modules/typescript/Gulpfile.ts
+++ /dev/null
@@ -1,1046 +0,0 @@
-/// <reference path="scripts/types/ambient.d.ts" />
-import * as cp from "child_process";
-import * as path from "path";
-import * as fs from "fs";
-import originalGulp = require("gulp");
-import helpMaker = require("gulp-help");
-import runSequence = require("run-sequence");
-import concat = require("gulp-concat");
-import clone = require("gulp-clone");
-import newer = require("gulp-newer");
-import tsc = require("gulp-typescript");
-declare module "gulp-typescript" {
- interface Settings {
- pretty?: boolean;
- newLine?: string;
- noImplicitThis?: boolean;
- stripInternal?: boolean;
- types?: string[];
- }
-}
-import * as insert from "gulp-insert";
-import * as sourcemaps from "gulp-sourcemaps";
-import Q = require("q");
-declare global {
- // `del` further depends on `Promise` (and is also not included), so we just, patch the global scope's Promise to Q's (which we already include in our deps because gulp depends on it)
- type Promise<T> = Q.Promise<T>;
-}
-import del = require("del");
-import mkdirP = require("mkdirp");
-import minimist = require("minimist");
-import browserify = require("browserify");
-import through2 = require("through2");
-import merge2 = require("merge2");
-import intoStream = require("into-stream");
-import * as os from "os";
-import fold = require("travis-fold");
-const gulp = helpMaker(originalGulp);
-const mochaParallel = require("./scripts/mocha-parallel.js");
-const {runTestsInParallel} = mochaParallel;
-
-Error.stackTraceLimit = 1000;
-
-const cmdLineOptions = minimist(process.argv.slice(2), {
- boolean: ["debug", "light", "colors", "lint", "soft"],
- string: ["browser", "tests", "host", "reporter", "stackTraceLimit"],
- alias: {
- d: "debug",
- t: "tests",
- test: "tests",
- r: "reporter",
- color: "colors",
- f: "files",
- file: "files"
- },
- default: {
- soft: false,
- colors: process.env.colors || process.env.color || true,
- debug: process.env.debug || process.env.d,
- host: process.env.TYPESCRIPT_HOST || process.env.host || "node",
- browser: process.env.browser || process.env.b || "IE",
- tests: process.env.test || process.env.tests || process.env.t,
- light: process.env.light || false,
- reporter: process.env.reporter || process.env.r,
- lint: process.env.lint || true,
- files: process.env.f || process.env.file || process.env.files || "",
- }
-});
-
-function exec(cmd: string, args: string[], complete: () => void = (() => { }), error: (e: any, status: number) => void = (() => { })) {
- console.log(`${cmd} ${args.join(" ")}`);
- // TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition
- const subshellFlag = isWin ? "/c" : "-c";
- const command = isWin ? [possiblyQuote(cmd), ...args] : [`${cmd} ${args.join(" ")}`];
- const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any);
- ex.on("exit", (code) => code === 0 ? complete() : error(/*e*/ undefined, code));
- ex.on("error", error);
-}
-
-function possiblyQuote(cmd: string) {
- return cmd.indexOf(" ") >= 0 ? `"${cmd}"` : cmd;
-}
-
-let useDebugMode = true;
-let host = cmdLineOptions["host"];
-
-// Constants
-const compilerDirectory = "src/compiler/";
-const harnessDirectory = "src/harness/";
-const libraryDirectory = "src/lib/";
-const scriptsDirectory = "scripts/";
-const docDirectory = "doc/";
-
-const builtDirectory = "built/";
-const builtLocalDirectory = "built/local/";
-const LKGDirectory = "lib/";
-
-const copyright = "CopyrightNotice.txt";
-
-const compilerFilename = "tsc.js";
-const LKGCompiler = path.join(LKGDirectory, compilerFilename);
-const builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
-
-const nodeModulesPathPrefix = path.resolve("./node_modules/.bin/");
-const isWin = /^win/.test(process.platform);
-const mocha = path.join(nodeModulesPathPrefix, "mocha") + (isWin ? ".cmd" : "");
-
-const es2015LibrarySources = [
- "es2015.core.d.ts",
- "es2015.collection.d.ts",
- "es2015.generator.d.ts",
- "es2015.iterable.d.ts",
- "es2015.promise.d.ts",
- "es2015.proxy.d.ts",
- "es2015.reflect.d.ts",
- "es2015.symbol.d.ts",
- "es2015.symbol.wellknown.d.ts"
-];
-
-const es2015LibrarySourceMap = es2015LibrarySources.map(function(source) {
- return { target: "lib." + source, sources: ["header.d.ts", source] };
-});
-
-const es2016LibrarySource = ["es2016.array.include.d.ts"];
-
-const es2016LibrarySourceMap = es2016LibrarySource.map(function(source) {
- return { target: "lib." + source, sources: ["header.d.ts", source] };
-});
-
-const es2017LibrarySource = [
- "es2017.object.d.ts",
- "es2017.sharedmemory.d.ts",
- "es2017.string.d.ts",
-];
-
-const es2017LibrarySourceMap = es2017LibrarySource.map(function(source) {
- return { target: "lib." + source, sources: ["header.d.ts", source] };
-});
-
-const hostsLibrarySources = ["dom.generated.d.ts", "webworker.importscripts.d.ts", "scripthost.d.ts"];
-
-const librarySourceMap = [
- // Host library
- { target: "lib.dom.d.ts", sources: ["header.d.ts", "dom.generated.d.ts"] },
- { target: "lib.dom.iterable.d.ts", sources: ["header.d.ts", "dom.iterable.d.ts"] },
- { target: "lib.webworker.d.ts", sources: ["header.d.ts", "webworker.generated.d.ts"] },
- { target: "lib.scripthost.d.ts", sources: ["header.d.ts", "scripthost.d.ts"] },
-
- // JavaScript library
- { target: "lib.es5.d.ts", sources: ["header.d.ts", "es5.d.ts"] },
- { target: "lib.es2015.d.ts", sources: ["header.d.ts", "es2015.d.ts"] },
- { target: "lib.es2016.d.ts", sources: ["header.d.ts", "es2016.d.ts"] },
- { target: "lib.es2017.d.ts", sources: ["header.d.ts", "es2017.d.ts"] },
-
- // JavaScript + all host library
- { target: "lib.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(hostsLibrarySources) },
- { target: "lib.es6.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(es2015LibrarySources, hostsLibrarySources, "dom.iterable.d.ts") }
-].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap);
-
-const libraryTargets = librarySourceMap.map(function(f) {
- return path.join(builtLocalDirectory, f.target);
-});
-
-for (const i in libraryTargets) {
- const entry = librarySourceMap[i];
- const target = libraryTargets[i];
- const sources = [copyright].concat(entry.sources.map(function(s) {
- return path.join(libraryDirectory, s);
- }));
- gulp.task(target, false, [], function() {
- return gulp.src(sources)
- .pipe(newer(target))
- .pipe(concat(target, { newLine: "\n\n" }))
- .pipe(gulp.dest("."));
- });
-}
-
-const configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
-const configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
-const packageJson = "package.json";
-const versionFile = path.join(compilerDirectory, "core.ts");
-
-function needsUpdate(source: string | string[], dest: string | string[]): boolean {
- if (typeof source === "string" && typeof dest === "string") {
- if (fs.existsSync(dest)) {
- const {mtime: outTime} = fs.statSync(dest);
- const {mtime: inTime} = fs.statSync(source);
- if (+inTime <= +outTime) {
- return false;
- }
- }
- }
- else if (typeof source === "string" && typeof dest !== "string") {
- const {mtime: inTime} = fs.statSync(source);
- for (const filepath of dest) {
- if (fs.existsSync(filepath)) {
- const {mtime: outTime} = fs.statSync(filepath);
- if (+inTime > +outTime) {
- return true;
- }
- }
- else {
- return true;
- }
- }
- return false;
- }
- else if (typeof source !== "string" && typeof dest === "string") {
- if (fs.existsSync(dest)) {
- const {mtime: outTime} = fs.statSync(dest);
- for (const filepath of source) {
- if (fs.existsSync(filepath)) {
- const {mtime: inTime} = fs.statSync(filepath);
- if (+inTime > +outTime) {
- return true;
- }
- }
- else {
- return true;
- }
- }
- return false;
- }
- }
- else if (typeof source !== "string" && typeof dest !== "string") {
- for (let i = 0; i < source.length; i++) {
- if (!dest[i]) {
- continue;
- }
- if (fs.existsSync(dest[i])) {
- const {mtime: outTime} = fs.statSync(dest[i]);
- const {mtime: inTime} = fs.statSync(source[i]);
- if (+inTime > +outTime) {
- return true;
- }
- }
- else {
- return true;
- }
- }
- return false;
- }
- return true;
-}
-
-function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): tsc.Settings {
- const copy: tsc.Settings = {};
- copy.noEmitOnError = true;
- copy.noImplicitAny = true;
- copy.noImplicitThis = true;
- copy.pretty = true;
- copy.types = [];
- for (const key in base) {
- copy[key] = base[key];
- }
- if (!useDebugMode) {
- if (copy.removeComments === undefined) copy.removeComments = true;
- copy.newLine = "lf";
- }
- else {
- copy.preserveConstEnums = true;
- }
- if (useBuiltCompiler === true) {
- copy.typescript = require("./built/local/typescript.js");
- }
- else if (useBuiltCompiler === false) {
- copy.typescript = require("./lib/typescript.js");
- }
- return copy;
-}
-
-gulp.task(configureNightlyJs, false, [], () => {
- const settings: tsc.Settings = {
- declaration: false,
- removeComments: true,
- noResolve: false,
- stripInternal: false,
- };
- return gulp.src(configureNightlyTs)
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write(path.dirname(configureNightlyJs)))
- .pipe(gulp.dest(path.dirname(configureNightlyJs)));
-});
-
-
-// Nightly management tasks
-gulp.task("configure-nightly", "Runs scripts/configureNightly.ts to prepare a build for nightly publishing", [configureNightlyJs], (done) => {
- exec(host, [configureNightlyJs, packageJson, versionFile], done, done);
-});
-gulp.task("publish-nightly", "Runs `npm publish --tag next` to create a new nightly build on npm", ["LKG"], () => {
- return runSequence("clean", "useDebugMode", "runtests", (done) => {
- exec("npm", ["publish", "--tag", "next"], done, done);
- });
-});
-
-const importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests");
-const importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js");
-const importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts");
-
-gulp.task(importDefinitelyTypedTestsJs, false, [], () => {
- const settings: tsc.Settings = getCompilerSettings({
- declaration: false,
- removeComments: true,
- noResolve: false,
- stripInternal: false,
- outFile: importDefinitelyTypedTestsJs
- }, /*useBuiltCompiler*/ false);
- return gulp.src(importDefinitelyTypedTestsTs)
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-gulp.task("importDefinitelyTypedTests", "Runs scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts to copy DT's tests to the TS-internal RWC tests", [importDefinitelyTypedTestsJs], (done) => {
- exec(host, [importDefinitelyTypedTestsJs, "./", "../DefinitelyTyped"], done, done);
-});
-
-gulp.task("lib", "Builds the library targets", libraryTargets);
-
-
-// Generate diagnostics
-const processDiagnosticMessagesJs = path.join(scriptsDirectory, "processDiagnosticMessages.js");
-const processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnosticMessages.ts");
-const diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json");
-const diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts");
-const generatedDiagnosticMessagesJSON = path.join(compilerDirectory, "diagnosticMessages.generated.json");
-const builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "diagnosticMessages.generated.json");
-
-// processDiagnosticMessages script
-gulp.task(processDiagnosticMessagesJs, false, [], () => {
- const settings: tsc.Settings = getCompilerSettings({
- declaration: false,
- removeComments: true,
- noResolve: false,
- stripInternal: false,
- outFile: processDiagnosticMessagesJs
- }, /*useBuiltCompiler*/ false);
- return gulp.src(processDiagnosticMessagesTs)
- .pipe(newer(processDiagnosticMessagesJs))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-// The generated diagnostics map; built for the compiler and for the "generate-diagnostics" task
-gulp.task(diagnosticInfoMapTs, [processDiagnosticMessagesJs], (done) => {
- if (needsUpdate(diagnosticMessagesJson, [generatedDiagnosticMessagesJSON, diagnosticInfoMapTs])) {
- exec(host, [processDiagnosticMessagesJs, diagnosticMessagesJson], done, done);
- }
- else {
- done();
- }
-});
-
-gulp.task(builtGeneratedDiagnosticMessagesJSON, [diagnosticInfoMapTs], (done) => {
- if (fs.existsSync(builtLocalDirectory) && needsUpdate(generatedDiagnosticMessagesJSON, builtGeneratedDiagnosticMessagesJSON)) {
- fs.writeFileSync(builtGeneratedDiagnosticMessagesJSON, fs.readFileSync(generatedDiagnosticMessagesJSON));
- }
- done();
-});
-
-gulp.task("generate-diagnostics", "Generates a diagnostic file in TypeScript based on an input JSON file", [diagnosticInfoMapTs]);
-
-
-const servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
-const standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
-const nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
-const nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
-const nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_standalone.d.ts");
-
-let copyrightContent: string;
-function prependCopyright(outputCopyright: boolean = !useDebugMode) {
- return insert.prepend(outputCopyright ? (copyrightContent || (copyrightContent = fs.readFileSync(copyright).toString())) : "");
-}
-
-gulp.task(builtLocalCompiler, false, [servicesFile], () => {
- const localCompilerProject = tsc.createProject("src/compiler/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
- return localCompilerProject.src()
- .pipe(newer(builtLocalCompiler))
- .pipe(sourcemaps.init())
- .pipe(localCompilerProject())
- .pipe(prependCopyright())
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
- const servicesProject = tsc.createProject("src/services/tsconfig.json", getCompilerSettings({ removeComments: false }, /*useBuiltCompiler*/false));
- const {js, dts} = servicesProject.src()
- .pipe(newer(servicesFile))
- .pipe(sourcemaps.init())
- .pipe(servicesProject());
- const completedJs = js.pipe(prependCopyright())
- .pipe(sourcemaps.write("."));
- const completedDts = dts.pipe(prependCopyright(/*outputCopyright*/true))
- .pipe(insert.transform((contents, file) => {
- file.path = standaloneDefinitionsFile;
- return contents.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, "$1$2enum $3 {$4");
- }));
- return merge2([
- completedJs,
- completedJs.pipe(clone())
- .pipe(insert.transform((content, file) => (file.path = nodePackageFile, content))),
- completedDts,
- completedDts.pipe(clone())
- .pipe(insert.transform((content, file) => {
- file.path = nodeDefinitionsFile;
- return content + "\r\nexport = ts;";
- }))
- .pipe(gulp.dest(".")),
- completedDts.pipe(clone())
- .pipe(insert.transform((content, file) => {
- file.path = nodeStandaloneDefinitionsFile;
- return content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
- }))
- ]).pipe(gulp.dest("."));
-});
-
-// cancellationToken.js
-const cancellationTokenJs = path.join(builtLocalDirectory, "cancellationToken.js");
-gulp.task(cancellationTokenJs, false, [servicesFile], () => {
- const cancellationTokenProject = tsc.createProject("src/server/cancellationToken/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
- return cancellationTokenProject.src()
- .pipe(newer(cancellationTokenJs))
- .pipe(sourcemaps.init())
- .pipe(cancellationTokenProject())
- .pipe(prependCopyright())
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest(builtLocalDirectory));
-});
-
-// typingsInstallerFile.js
-const typingsInstallerJs = path.join(builtLocalDirectory, "typingsInstaller.js");
-gulp.task(typingsInstallerJs, false, [servicesFile], () => {
- const cancellationTokenProject = tsc.createProject("src/server/typingsInstaller/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
- return cancellationTokenProject.src()
- .pipe(newer(typingsInstallerJs))
- .pipe(sourcemaps.init())
- .pipe(cancellationTokenProject())
- .pipe(prependCopyright())
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-const serverFile = path.join(builtLocalDirectory, "tsserver.js");
-
-gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationTokenJs], () => {
- const serverProject = tsc.createProject("src/server/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
- return serverProject.src()
- .pipe(newer(serverFile))
- .pipe(sourcemaps.init())
- .pipe(serverProject())
- .pipe(prependCopyright())
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
-const tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");
-
-gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
- const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
- const {js, dts}: { js: NodeJS.ReadableStream, dts: NodeJS.ReadableStream } = serverLibraryProject.src()
- .pipe(sourcemaps.init())
- .pipe(newer(tsserverLibraryFile))
- .pipe(serverLibraryProject());
-
- return merge2([
- js.pipe(prependCopyright())
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest(".")),
- dts.pipe(prependCopyright())
- .pipe(gulp.dest("."))
- ]);
-});
-
-gulp.task("lssl", "Builds language service server library", [tsserverLibraryFile]);
-gulp.task("local", "Builds the full compiler and services", [builtLocalCompiler, servicesFile, serverFile, builtGeneratedDiagnosticMessagesJSON, tsserverLibraryFile]);
-gulp.task("tsc", "Builds only the compiler", [builtLocalCompiler]);
-
-// Generate Markdown spec
-const word2mdJs = path.join(scriptsDirectory, "word2md.js");
-const word2mdTs = path.join(scriptsDirectory, "word2md.ts");
-const specWord = path.join(docDirectory, "TypeScript Language Specification.docx");
-const specMd = path.join(docDirectory, "spec.md");
-
-gulp.task(word2mdJs, false, [], () => {
- const settings: tsc.Settings = getCompilerSettings({
- outFile: word2mdJs
- }, /*useBuiltCompiler*/ false);
- return gulp.src(word2mdTs)
- .pipe(newer(word2mdJs))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-gulp.task(specMd, false, [word2mdJs], (done) => {
- const specWordFullPath = path.resolve(specWord);
- const specMDFullPath = path.resolve(specMd);
- const cmd = "cscript //nologo " + word2mdJs + " \"" + specWordFullPath + "\" " + "\"" + specMDFullPath + "\"";
- console.log(cmd);
- cp.exec(cmd, function() {
- done();
- });
-});
-
-gulp.task("generate-spec", "Generates a Markdown version of the Language Specification", [specMd]);
-
-gulp.task("clean", "Cleans the compiler output, declare files, and tests", [], () => {
- return del([builtDirectory]);
-});
-
-gulp.task("useDebugMode", false, [], (done) => { useDebugMode = true; done(); });
-gulp.task("dontUseDebugMode", false, [], (done) => { useDebugMode = false; done(); });
-
-gulp.task("VerifyLKG", false, [], () => {
- const expectedFiles = [builtLocalCompiler, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, typingsInstallerJs, cancellationTokenJs].concat(libraryTargets);
- const missingFiles = expectedFiles.filter(function(f) {
- return !fs.existsSync(f);
- });
- if (missingFiles.length > 0) {
- throw new Error("Cannot replace the LKG unless all built targets are present in directory " + builtLocalDirectory +
- ". The following files are missing:\n" + missingFiles.join("\n"));
- }
- // Copy all the targets into the LKG directory
- return gulp.src(expectedFiles).pipe(gulp.dest(LKGDirectory));
-});
-
-gulp.task("LKGInternal", false, ["lib", "local"]);
-
-gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUseDebugMode"], () => {
- return runSequence("LKGInternal", "VerifyLKG");
-});
-
-
-// Task to build the tests infrastructure using the built compiler
-const run = path.join(builtLocalDirectory, "run.js");
-gulp.task(run, false, [servicesFile], () => {
- const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
- return testProject.src()
- .pipe(newer(run))
- .pipe(sourcemaps.init())
- .pipe(testProject())
- .pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
- .pipe(gulp.dest("."));
-});
-
-const internalTests = "internal/";
-
-const localBaseline = "tests/baselines/local/";
-const refBaseline = "tests/baselines/reference/";
-
-const localRwcBaseline = path.join(internalTests, "baselines/rwc/local");
-const refRwcBaseline = path.join(internalTests, "baselines/rwc/reference");
-
-const localTest262Baseline = path.join(internalTests, "baselines/test262/local");
-
-gulp.task("tests", "Builds the test infrastructure using the built compiler", [run]);
-gulp.task("tests-debug", "Builds the test sources and automation in debug mode", () => {
- return runSequence("useDebugMode", "tests");
-});
-
-function deleteTemporaryProjectOutput() {
- return del(path.join(localBaseline, "projectOutput/"));
-}
-
-let savedNodeEnv: string;
-function setNodeEnvToDevelopment() {
- savedNodeEnv = process.env.NODE_ENV;
- process.env.NODE_ENV = "development";
-}
-
-function restoreSavedNodeEnv() {
- process.env.NODE_ENV = savedNodeEnv;
-}
-
-let testTimeout = 40000;
-function runConsoleTests(defaultReporter: string, runInParallel: boolean, done: (e?: any) => void) {
- const lintFlag = cmdLineOptions["lint"];
- cleanTestDirs((err) => {
- if (err) { console.error(err); failWithStatus(err, 1); }
- const debug = cmdLineOptions["debug"];
- const tests = cmdLineOptions["tests"];
- const light = cmdLineOptions["light"];
- const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
- const testConfigFile = "test.config";
- if (fs.existsSync(testConfigFile)) {
- fs.unlinkSync(testConfigFile);
- }
- let workerCount, taskConfigsFolder;
- if (runInParallel) {
- // generate name to store task configuration files
- const prefix = os.tmpdir() + "/ts-tests";
- let i = 1;
- do {
- taskConfigsFolder = prefix + i;
- i++;
- } while (fs.existsSync(taskConfigsFolder));
- fs.mkdirSync(taskConfigsFolder);
-
- workerCount = process.env.workerCount || os.cpus().length;
- }
-
- if (tests || light || taskConfigsFolder) {
- writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
- }
-
- if (tests && tests.toLocaleLowerCase() === "rwc") {
- testTimeout = 400000;
- }
-
- const colors = cmdLineOptions["colors"];
- const reporter = cmdLineOptions["reporter"] || defaultReporter;
-
- // timeout normally isn"t necessary but Travis-CI has been timing out on compiler baselines occasionally
- // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
- if (!runInParallel) {
- const args = [];
- if (debug) {
- args.push("--debug-brk");
- }
- args.push("-R", reporter);
- if (tests) {
- args.push("-g", `"${tests}"`);
- }
- if (colors) {
- args.push("--colors");
- }
- else {
- args.push("--no-colors");
- }
- args.push("-t", testTimeout);
- args.push(run);
- setNodeEnvToDevelopment();
- exec(mocha, args, lintThenFinish, function(e, status) {
- finish(e, status);
- });
-
- }
- else {
- // run task to load all tests and partition them between workers
- const args = [];
- args.push("-R", "min");
- if (colors) {
- args.push("--colors");
- }
- else {
- args.push("--no-colors");
- }
- args.push(run);
- setNodeEnvToDevelopment();
- runTestsInParallel(taskConfigsFolder, run, { testTimeout: testTimeout, noColors: colors === " --no-colors " }, function(err) {
- // last worker clean everything and runs linter in case if there were no errors
- del(taskConfigsFolder).then(() => {
- if (!err) {
- lintThenFinish();
- }
- else {
- finish(err);
- }
- });
- });
- }
- });
-
- function failWithStatus(err?: any, status?: number) {
- if (err) {
- console.log(err);
- }
- done(err || status);
- process.exit(status);
- }
-
- function lintThenFinish() {
- if (lintFlag) {
- runSequence("lint", finish);
- }
- else {
- finish();
- }
- }
-
- function finish(error?: any, errorStatus?: number) {
- restoreSavedNodeEnv();
- deleteTemporaryProjectOutput().then(() => {
- if (error !== undefined || errorStatus !== undefined) {
- failWithStatus(error, errorStatus);
- }
- else {
- done();
- }
- });
- }
-}
-
-gulp.task("runtests-parallel", "Runs all the tests in parallel using the built run.js file. Optional arguments are: --t[ests]=category1|category2|... --d[ebug]=true.", ["build-rules", "tests"], (done) => {
- runConsoleTests("min", /*runInParallel*/ true, done);
-});
-gulp.task("runtests",
- "Runs the tests using the built run.js file. Optional arguments are: --t[ests]=regex --r[eporter]=[list|spec|json|<more>] --d[ebug]=true --color[s]=false --lint=true.",
- ["build-rules", "tests"],
- (done) => {
- runConsoleTests("mocha-fivemat-progress-reporter", /*runInParallel*/ false, done);
- });
-
-const nodeServerOutFile = "tests/webTestServer.js";
-const nodeServerInFile = "tests/webTestServer.ts";
-gulp.task(nodeServerOutFile, false, [servicesFile], () => {
- const settings: tsc.Settings = getCompilerSettings({ module: "commonjs" }, /*useBuiltCompiler*/ true);
- return gulp.src(nodeServerInFile)
- .pipe(newer(nodeServerOutFile))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest(path.dirname(nodeServerOutFile)));
-});
-
-import convertMap = require("convert-source-map");
-import sorcery = require("sorcery");
-declare module "convert-source-map" {
- export function fromSource(source: string, largeSource?: boolean): SourceMapConverter;
-}
-
-gulp.task("browserify", "Runs browserify on run.js to produce a file suitable for running tests in the browser", [servicesFile], (done) => {
- const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({ outFile: "../../built/local/bundle.js" }, /*useBuiltCompiler*/ true));
- return testProject.src()
- .pipe(newer("built/local/bundle.js"))
- .pipe(sourcemaps.init())
- .pipe(testProject())
- .pipe(through2.obj((file, enc, next) => {
- const originalMap = file.sourceMap;
- const prebundledContent = file.contents.toString();
- // Make paths absolute to help sorcery deal with all the terrible paths being thrown around
- originalMap.sources = originalMap.sources.map(s => path.resolve(s));
- // intoStream (below) makes browserify think the input file is named this, so this is what it puts in the sourcemap
- originalMap.file = "built/local/_stream_0.js";
-
- browserify(intoStream(file.contents), { debug: true })
- .bundle((err, res) => {
- // assumes file.contents is a Buffer
- const maps = JSON.parse(convertMap.fromSource(res.toString(), /*largeSource*/true).toJSON());
- delete maps.sourceRoot;
- maps.sources = maps.sources.map(s => path.resolve(s === "_stream_0.js" ? "built/local/_stream_0.js" : s));
- // Strip browserify's inline comments away (could probably just let sorcery do this, but then we couldn't fix the paths)
- file.contents = new Buffer(convertMap.removeComments(res.toString()));
- const chain = sorcery.loadSync("built/local/bundle.js", {
- content: {
- "built/local/_stream_0.js": prebundledContent,
- "built/local/bundle.js": file.contents.toString()
- },
- sourcemaps: {
- "built/local/_stream_0.js": originalMap,
- "built/local/bundle.js": maps,
- "node_modules/source-map-support/source-map-support.js": undefined,
- }
- });
- const finalMap = chain.apply();
- file.sourceMap = finalMap;
- next(undefined, file);
- });
- }))
- .pipe(sourcemaps.write(".", { includeContent: false }))
- .pipe(gulp.dest("."));
-});
-
-
-function cleanTestDirs(done: (e?: any) => void) {
- // Clean the local baselines & Rwc baselines directories
- del([
- localBaseline,
- localRwcBaseline,
- ]).then(() => {
- mkdirP(localRwcBaseline, (err) => {
- if (err) done(err);
- mkdirP(localTest262Baseline, () => {
- if (err) done(err);
- mkdirP(localBaseline, (err) => done(err));
- });
- });
- });
-}
-
-// used to pass data from jake command line directly to run.js
-function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
- const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder });
- console.log("Running tests with config: " + testConfigContents);
- fs.writeFileSync("test.config", testConfigContents);
-}
-
-
-gulp.task("runtests-browser", "Runs the tests using the built run.js file like 'gulp runtests'. Syntax is gulp runtests-browser. Additional optional parameters --tests=[regex], --browser=[chrome|IE]", ["browserify", nodeServerOutFile], (done) => {
- cleanTestDirs((err) => {
- if (err) { console.error(err); done(err); process.exit(1); }
- host = "node";
- const tests = cmdLineOptions["tests"];
- const light = cmdLineOptions["light"];
- const testConfigFile = "test.config";
- if (fs.existsSync(testConfigFile)) {
- fs.unlinkSync(testConfigFile);
- }
- if (tests || light) {
- writeTestConfigFile(tests, light);
- }
-
- const args = [nodeServerOutFile];
- if (cmdLineOptions["browser"]) {
- args.push(cmdLineOptions["browser"]);
- }
- if (tests) {
- args.push(JSON.stringify(tests));
- }
- exec(host, args, done, done);
- });
-});
-
-gulp.task("generate-code-coverage", "Generates code coverage data via istanbul", ["tests"], (done) => {
- exec("istanbul", ["cover", "node_modules/mocha/bin/_mocha", "--", "-R", "min", "-t", testTimeout.toString(), run], done, done);
-});
-
-
-function getDiffTool() {
- const program = process.env["DIFF"];
- if (!program) {
- console.error("Add the 'DIFF' environment variable to the path of the program you want to use.");
- process.exit(1);
- }
- return program;
-}
-
-gulp.task("diff", "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable", (done) => {
- exec(getDiffTool(), [refBaseline, localBaseline], done, done);
-});
-gulp.task("diff-rwc", "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable", (done) => {
- exec(getDiffTool(), [refRwcBaseline, localRwcBaseline], done, done);
-});
-
-gulp.task("baseline-accept", "Makes the most recent test results the new baseline, overwriting the old baseline", () => {
- return baselineAccept("");
-});
-
-function baselineAccept(subfolder = "") {
- return merge2(baselineCopy(subfolder), baselineDelete(subfolder));
-}
-
-function baselineCopy(subfolder = "") {
- return gulp.src([`tests/baselines/local/${subfolder}/**`, `!tests/baselines/local/${subfolder}/**/*.delete`])
- .pipe(gulp.dest(refBaseline));
-}
-
-function baselineDelete(subfolder = "") {
- return gulp.src(["tests/baselines/local/**/*.delete"])
- .pipe(insert.transform((content, fileObj) => {
- const target = path.join(refBaseline, fileObj.relative.substr(0, fileObj.relative.length - ".delete".length));
- del.sync(target);
- del.sync(fileObj.path);
- return "";
- }));
-}
-
-gulp.task("baseline-accept-rwc", "Makes the most recent rwc test results the new baseline, overwriting the old baseline", () => {
- return baselineAccept("rwc");
-});
-
-
-gulp.task("baseline-accept-test262", "Makes the most recent test262 test results the new baseline, overwriting the old baseline", () => {
- return baselineAccept("test262");
-});
-
-
-// Webhost
-const webhostPath = "tests/webhost/webtsc.ts";
-const webhostJsPath = "tests/webhost/webtsc.js";
-gulp.task(webhostJsPath, false, [servicesFile], () => {
- const settings: tsc.Settings = getCompilerSettings({
- outFile: webhostJsPath
- }, /*useBuiltCompiler*/ true);
- return gulp.src(webhostPath)
- .pipe(newer(webhostJsPath))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest(path.dirname(webhostJsPath)));
-});
-
-gulp.task("webhost", "Builds the tsc web host", [webhostJsPath], () => {
- return gulp.src(path.join(builtLocalDirectory, "lib.d.ts")).pipe(gulp.dest("tests/webhost/"));
-});
-
-
-// Perf compiler
-const perftscPath = "tests/perftsc.ts";
-const perftscJsPath = "built/local/perftsc.js";
-gulp.task(perftscJsPath, false, [servicesFile], () => {
- const settings: tsc.Settings = getCompilerSettings({
- outFile: perftscJsPath
- }, /*useBuiltCompiler*/ true);
- return gulp.src(perftscPath)
- .pipe(newer(perftscJsPath))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-gulp.task("perftsc", "Builds augmented version of the compiler for perf tests", [perftscJsPath]);
-
-
-// Instrumented compiler
-const loggedIOpath = path.join(harnessDirectory, "loggedIO.ts");
-const loggedIOJsPath = path.join(builtLocalDirectory, "loggedIO.js");
-gulp.task(loggedIOJsPath, false, [], (done) => {
- const temp = path.join(builtLocalDirectory, "temp");
- mkdirP(temp, (err) => {
- if (err) { console.error(err); done(err); process.exit(1); };
- exec(host, [LKGCompiler, "--types --outdir", temp, loggedIOpath], () => {
- fs.renameSync(path.join(temp, "/harness/loggedIO.js"), loggedIOJsPath);
- del(temp).then(() => done(), done);
- }, done);
- });
-});
-
-const instrumenterPath = path.join(harnessDirectory, "instrumenter.ts");
-const instrumenterJsPath = path.join(builtLocalDirectory, "instrumenter.js");
-gulp.task(instrumenterJsPath, false, [servicesFile], () => {
- const settings: tsc.Settings = getCompilerSettings({
- outFile: instrumenterJsPath
- }, /*useBuiltCompiler*/ true);
- return gulp.src(instrumenterPath)
- .pipe(newer(instrumenterJsPath))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest("."));
-});
-
-gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
- exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalCompiler], done, done);
-});
-
-gulp.task("update-sublime", "Updates the sublime plugin's tsserver", ["local", serverFile], () => {
- return gulp.src([serverFile, serverFile + ".map"]).pipe(gulp.dest("../TypeScript-Sublime-Plugin/tsserver/"));
-});
-
-gulp.task("build-rules", "Compiles tslint rules to js", () => {
- const settings: tsc.Settings = getCompilerSettings({ module: "commonjs" }, /*useBuiltCompiler*/ false);
- const dest = path.join(builtLocalDirectory, "tslint");
- return gulp.src("scripts/tslint/**/*.ts")
- .pipe(newer({
- dest,
- ext: ".js"
- }))
- .pipe(sourcemaps.init())
- .pipe(tsc(settings))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest(dest));
-});
-
-const lintTargets = [
- "Gulpfile.ts",
- "src/compiler/**/*.ts",
- "src/harness/**/*.ts",
- "!src/harness/unittests/services/formatting/**/*.ts",
- "src/server/**/*.ts",
- "scripts/tslint/**/*.ts",
- "src/services/**/*.ts",
- "tests/*.ts", "tests/webhost/*.ts" // Note: does *not* descend recursively
-];
-
-function sendNextFile(files: {path: string}[], child: cp.ChildProcess, callback: (failures: number) => void, failures: number) {
- const file = files.pop();
- if (file) {
- console.log(`Linting '${file.path}'.`);
- child.send({ kind: "file", name: file.path });
- }
- else {
- child.send({ kind: "close" });
- callback(failures);
- }
-}
-
-function spawnLintWorker(files: {path: string}[], callback: (failures: number) => void) {
- const child = cp.fork("./scripts/parallel-lint");
- let failures = 0;
- child.on("message", function(data) {
- switch (data.kind) {
- case "result":
- if (data.failures > 0) {
- failures += data.failures;
- console.log(data.output);
- }
- sendNextFile(files, child, callback, failures);
- break;
- case "error":
- console.error(data.error);
- failures++;
- sendNextFile(files, child, callback, failures);
- break;
- }
- });
- sendNextFile(files, child, callback, failures);
-}
-
-gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are: --f[iles]=regex", ["build-rules"], () => {
- const fileMatcher = RegExp(cmdLineOptions["files"]);
- if (fold.isTravis()) console.log(fold.start("lint"));
-
- let files: {stat: fs.Stats, path: string}[] = [];
- return gulp.src(lintTargets, { read: false })
- .pipe(through2.obj((chunk, enc, cb) => {
- files.push(chunk);
- cb();
- }, (cb) => {
- files = files.filter(file => fileMatcher.test(file.path)).sort((filea, fileb) => filea.stat.size - fileb.stat.size);
- const workerCount = (process.env.workerCount && +process.env.workerCount) || os.cpus().length;
- for (let i = 0; i < workerCount; i++) {
- spawnLintWorker(files, finished);
- }
-
- let completed = 0;
- let failures = 0;
- function finished(fails) {
- completed++;
- failures += fails;
- if (completed === workerCount) {
- if (fold.isTravis()) console.log(fold.end("lint"));
- if (failures > 0) {
- throw new Error(`Linter errors: ${failures}`);
- }
- else {
- cb();
- }
- }
- }
- }));
-});
-
-
-gulp.task("default", "Runs 'local'", ["local"]);
-
-gulp.task("watch", "Watches the src/ directory for changes and executes runtests-parallel.", [], () => {
- gulp.watch("src/**/*.*", ["runtests-parallel"]);
-});
diff --git a/node_modules/typescript/README.md b/node_modules/typescript/README.md
index 2f631439e..053d03641 100644
--- a/node_modules/typescript/README.md
+++ b/node_modules/typescript/README.md
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
-[![Downloads](https://img.shields.io/npm/dm/TypeScript.svg)](https://www.npmjs.com/package/typescript)
+[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
# TypeScript
@@ -39,8 +39,8 @@ with any additional questions or comments.
## Documentation
-* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
-* [Programming handbook](http://www.typescriptlang.org/Handbook)
+* [Quick tutorial](http://www.typescriptlang.org/docs/tutorial.html)
+* [Programming handbook](http://www.typescriptlang.org/docs/handbook/basic-types.html)
* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
* [Homepage](http://www.typescriptlang.org/)
@@ -95,4 +95,4 @@ node built/local/tsc.js hello.ts
## Roadmap
-For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap). \ No newline at end of file
+For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
diff --git a/node_modules/typescript/lib/README.md b/node_modules/typescript/lib/README.md
index 852d449f1..0a85a9e7b 100644
--- a/node_modules/typescript/lib/README.md
+++ b/node_modules/typescript/lib/README.md
@@ -1,5 +1,5 @@
-# Read This!
-
-**These files are not meant to be edited by hand.**
-If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory.
-Running `jake LKG` will then appropriately update the files in this directory.
+# Read This!
+
+**These files are not meant to be edited by hand.**
+If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory.
+Running `jake LKG` will then appropriately update the files in this directory.
diff --git a/node_modules/typescript/lib/cancellationToken.js b/node_modules/typescript/lib/cancellationToken.js
index 8af21172d..f40321990 100644
--- a/node_modules/typescript/lib/cancellationToken.js
+++ b/node_modules/typescript/lib/cancellationToken.js
@@ -15,6 +15,15 @@ and limitations under the License.
"use strict";
var fs = require("fs");
+function pipeExists(name) {
+ try {
+ fs.statSync(name);
+ return true;
+ }
+ catch (e) {
+ return false;
+ }
+}
function createCancellationToken(args) {
var cancellationPipeName;
for (var i = 0; i < args.length - 1; i++) {
@@ -24,18 +33,39 @@ function createCancellationToken(args) {
}
}
if (!cancellationPipeName) {
- return { isCancellationRequested: function () { return false; } };
+ return {
+ isCancellationRequested: function () { return false; },
+ setRequest: function (_requestId) { return void 0; },
+ resetRequest: function (_requestId) { return void 0; }
+ };
}
- return {
- isCancellationRequested: function () {
- try {
- fs.statSync(cancellationPipeName);
- return true;
- }
- catch (e) {
- return false;
- }
+ if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
+ var namePrefix_1 = cancellationPipeName.slice(0, -1);
+ if (namePrefix_1.length === 0 || namePrefix_1.indexOf("*") >= 0) {
+ throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
}
- };
+ var perRequestPipeName_1;
+ var currentRequestId_1;
+ return {
+ isCancellationRequested: function () { return perRequestPipeName_1 !== undefined && pipeExists(perRequestPipeName_1); },
+ setRequest: function (requestId) {
+ currentRequestId_1 = requestId;
+ perRequestPipeName_1 = namePrefix_1 + requestId;
+ },
+ resetRequest: function (requestId) {
+ if (currentRequestId_1 !== requestId) {
+ throw new Error("Mismatched request id, expected " + currentRequestId_1 + ", actual " + requestId);
+ }
+ perRequestPipeName_1 = undefined;
+ }
+ };
+ }
+ else {
+ return {
+ isCancellationRequested: function () { return pipeExists(cancellationPipeName); },
+ setRequest: function (_requestId) { return void 0; },
+ resetRequest: function (_requestId) { return void 0; }
+ };
+ }
}
module.exports = createCancellationToken;
diff --git a/node_modules/typescript/lib/lib.d.ts b/node_modules/typescript/lib/lib.d.ts
index ed066deeb..cb9294153 100644
--- a/node_modules/typescript/lib/lib.d.ts
+++ b/node_modules/typescript/lib/lib.d.ts
@@ -1,18215 +1,19680 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/////////////////////////////
-/// ECMAScript APIs
-/////////////////////////////
-
-declare const NaN: number;
-declare const Infinity: number;
-
-/**
- * Evaluates JavaScript code and executes it.
- * @param x A String value that contains valid JavaScript code.
- */
-declare function eval(x: string): any;
-
-/**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
-declare function parseInt(s: string, radix?: number): number;
-
-/**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
-declare function parseFloat(string: string): number;
-
-/**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
- * @param number A numeric value.
- */
-declare function isNaN(number: number): boolean;
-
-/**
- * Determines whether a supplied number is finite.
- * @param number Any numeric value.
- */
-declare function isFinite(number: number): boolean;
-
-/**
- * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
- * @param encodedURI A value representing an encoded URI.
- */
-declare function decodeURI(encodedURI: string): string;
-
-/**
- * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
- * @param encodedURIComponent A value representing an encoded URI component.
- */
-declare function decodeURIComponent(encodedURIComponent: string): string;
-
-/**
- * Encodes a text string as a valid Uniform Resource Identifier (URI)
- * @param uri A value representing an encoded URI.
- */
-declare function encodeURI(uri: string): string;
-
-/**
- * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
- * @param uriComponent A value representing an encoded URI component.
- */
-declare function encodeURIComponent(uriComponent: string): string;
-
-interface PropertyDescriptor {
- configurable?: boolean;
- enumerable?: boolean;
- value?: any;
- writable?: boolean;
- get? (): any;
- set? (v: any): void;
-}
-
-interface PropertyDescriptorMap {
- [s: string]: PropertyDescriptor;
-}
-
-interface Object {
- /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
- constructor: Function;
-
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns a date converted to a string using the current locale. */
- toLocaleString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: string): boolean;
-
- /**
- * Determines whether an object exists in another object's prototype chain.
- * @param v Another object whose prototype chain is to be checked.
- */
- isPrototypeOf(v: Object): boolean;
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: string): boolean;
-}
-
-interface ObjectConstructor {
- new (value?: any): Object;
- (): any;
- (value: any): any;
-
- /** A reference to the prototype for a class of objects. */
- readonly prototype: Object;
-
- /**
- * Returns the prototype of an object.
- * @param o The object that references the prototype.
- */
- getPrototypeOf(o: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
-
- /**
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
- * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
- * @param o Object that contains the own properties.
- */
- getOwnPropertyNames(o: any): string[];
-
- /**
- * Creates an object that has null prototype.
- * @param o Object to use as a prototype. May be null
- */
- create(o: null): any;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- */
- create<T>(o: T): T;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- * @param properties JavaScript object that contains one or more property descriptors.
- */
- create(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
- */
- defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
-
- /**
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
- * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
- * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
- */
- defineProperties(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- seal<T>(o: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(a: T[]): ReadonlyArray<T>;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T extends Function>(f: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(o: T): Readonly<T>;
-
- /**
- * Prevents the addition of new properties to an object.
- * @param o Object to make non-extensible.
- */
- preventExtensions<T>(o: T): T;
-
- /**
- * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isSealed(o: any): boolean;
-
- /**
- * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isFrozen(o: any): boolean;
-
- /**
- * Returns a value that indicates whether new properties can be added to an object.
- * @param o Object to test.
- */
- isExtensible(o: any): boolean;
-
- /**
- * Returns the names of the enumerable properties and methods of an object.
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
- */
- keys(o: any): string[];
-}
-
-/**
- * Provides functionality common to all JavaScript objects.
- */
-declare const Object: ObjectConstructor;
-
-/**
- * Creates a new function.
- */
-interface Function {
- /**
- * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
- * @param thisArg The object to be used as the this object.
- * @param argArray A set of arguments to be passed to the function.
- */
- apply(this: Function, thisArg: any, argArray?: any): any;
-
- /**
- * Calls a method of an object, substituting another object for the current object.
- * @param thisArg The object to be used as the current object.
- * @param argArray A list of arguments to be passed to the method.
- */
- call(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /**
- * For a given function, creates a bound function that has the same body as the original function.
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
- * @param thisArg An object to which the this keyword can refer inside the new function.
- * @param argArray A list of arguments to be passed to the new function.
- */
- bind(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /** Returns a string representation of a function. */
- toString(): string;
-
- prototype: any;
- readonly length: number;
-
- // Non-standard extensions
- arguments: any;
- caller: Function;
-}
-
-interface FunctionConstructor {
- /**
- * Creates a new function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): Function;
- (...args: string[]): Function;
- readonly prototype: Function;
-}
-
-declare const Function: FunctionConstructor;
-
-interface IArguments {
- [index: number]: any;
- length: number;
- callee: Function;
-}
-
-interface String {
- /** Returns a string representation of a string. */
- toString(): string;
-
- /**
- * Returns the character at the specified index.
- * @param pos The zero-based index of the desired character.
- */
- charAt(pos: number): string;
-
- /**
- * Returns the Unicode value of the character at the specified location.
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
- */
- charCodeAt(index: number): number;
-
- /**
- * Returns a string that contains the concatenation of two or more strings.
- * @param strings The strings to append to the end of the string.
- */
- concat(...strings: string[]): string;
-
- /**
- * Returns the position of the first occurrence of a substring.
- * @param searchString The substring to search for in the string
- * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
- */
- indexOf(searchString: string, position?: number): number;
-
- /**
- * Returns the last occurrence of a substring in the string.
- * @param searchString The substring to search for.
- * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
- */
- lastIndexOf(searchString: string, position?: number): number;
-
- /**
- * Determines whether two strings are equivalent in the current locale.
- * @param that String to compare to target string
- */
- localeCompare(that: string): number;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
- */
- match(regexp: string): RegExpMatchArray | null;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
- */
- match(regexp: RegExp): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: RegExp, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: string): number;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: RegExp): number;
-
- /**
- * Returns a section of a string.
- * @param start The index to the beginning of the specified portion of stringObj.
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
- * If this value is not specified, the substring continues to the end of stringObj.
- */
- slice(start?: number, end?: number): string;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: string, limit?: number): string[];
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: RegExp, limit?: number): string[];
-
- /**
- * Returns the substring at the specified location within a String object.
- * @param start The zero-based index number indicating the beginning of the substring.
- * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
- * If end is omitted, the characters from start through the end of the original string are returned.
- */
- substring(start: number, end?: number): string;
-
- /** Converts all the alphabetic characters in a string to lowercase. */
- toLowerCase(): string;
-
- /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
- toLocaleLowerCase(): string;
-
- /** Converts all the alphabetic characters in a string to uppercase. */
- toUpperCase(): string;
-
- /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
- toLocaleUpperCase(): string;
-
- /** Removes the leading and trailing white space and line terminator characters from a string. */
- trim(): string;
-
- /** Returns the length of a String object. */
- readonly length: number;
-
- // IE extensions
- /**
- * Gets a substring beginning at the specified location and having the specified length.
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
- * @param length The number of characters to include in the returned substring.
- */
- substr(from: number, length?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): string;
-
- readonly [index: number]: string;
-}
-
-interface StringConstructor {
- new (value?: any): String;
- (value?: any): string;
- readonly prototype: String;
- fromCharCode(...codes: number[]): string;
-}
-
-/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
- */
-declare const String: StringConstructor;
-
-interface Boolean {
- /** Returns the primitive value of the specified object. */
- valueOf(): boolean;
-}
-
-interface BooleanConstructor {
- new (value?: any): Boolean;
- (value?: any): boolean;
- readonly prototype: Boolean;
-}
-
-declare const Boolean: BooleanConstructor;
-
-interface Number {
- /**
- * Returns a string representation of an object.
- * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
- */
- toString(radix?: number): string;
-
- /**
- * Returns a string representing a number in fixed-point notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toFixed(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented in exponential notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toExponential(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
- */
- toPrecision(precision?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): number;
-}
-
-interface NumberConstructor {
- new (value?: any): Number;
- (value?: any): number;
- readonly prototype: Number;
-
- /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
- readonly MAX_VALUE: number;
-
- /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
- readonly MIN_VALUE: number;
-
- /**
- * A value that is not a number.
- * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
- */
- readonly NaN: number;
-
- /**
- * A value that is less than the largest negative number that can be represented in JavaScript.
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
- */
- readonly NEGATIVE_INFINITY: number;
-
- /**
- * A value greater than the largest number that can be represented in JavaScript.
- * JavaScript displays POSITIVE_INFINITY values as infinity.
- */
- readonly POSITIVE_INFINITY: number;
-}
-
-/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
-declare const Number: NumberConstructor;
-
-interface TemplateStringsArray extends ReadonlyArray<string> {
- readonly raw: ReadonlyArray<string>
-}
-
-interface Math {
- /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
- readonly E: number;
- /** The natural logarithm of 10. */
- readonly LN10: number;
- /** The natural logarithm of 2. */
- readonly LN2: number;
- /** The base-2 logarithm of e. */
- readonly LOG2E: number;
- /** The base-10 logarithm of e. */
- readonly LOG10E: number;
- /** Pi. This is the ratio of the circumference of a circle to its diameter. */
- readonly PI: number;
- /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
- readonly SQRT1_2: number;
- /** The square root of 2. */
- readonly SQRT2: number;
- /**
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
- * For example, the absolute value of -5 is the same as the absolute value of 5.
- * @param x A numeric expression for which the absolute value is needed.
- */
- abs(x: number): number;
- /**
- * Returns the arc cosine (or inverse cosine) of a number.
- * @param x A numeric expression.
- */
- acos(x: number): number;
- /**
- * Returns the arcsine of a number.
- * @param x A numeric expression.
- */
- asin(x: number): number;
- /**
- * Returns the arctangent of a number.
- * @param x A numeric expression for which the arctangent is needed.
- */
- atan(x: number): number;
- /**
- * Returns the angle (in radians) from the X axis to a point.
- * @param y A numeric expression representing the cartesian y-coordinate.
- * @param x A numeric expression representing the cartesian x-coordinate.
- */
- atan2(y: number, x: number): number;
- /**
- * Returns the smallest number greater than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- ceil(x: number): number;
- /**
- * Returns the cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cos(x: number): number;
- /**
- * Returns e (the base of natural logarithms) raised to a power.
- * @param x A numeric expression representing the power of e.
- */
- exp(x: number): number;
- /**
- * Returns the greatest number less than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- floor(x: number): number;
- /**
- * Returns the natural logarithm (base e) of a number.
- * @param x A numeric expression.
- */
- log(x: number): number;
- /**
- * Returns the larger of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- max(...values: number[]): number;
- /**
- * Returns the smaller of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- min(...values: number[]): number;
- /**
- * Returns the value of a base expression taken to a specified power.
- * @param x The base value of the expression.
- * @param y The exponent value of the expression.
- */
- pow(x: number, y: number): number;
- /** Returns a pseudorandom number between 0 and 1. */
- random(): number;
- /**
- * Returns a supplied numeric expression rounded to the nearest number.
- * @param x The value to be rounded to the nearest number.
- */
- round(x: number): number;
- /**
- * Returns the sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sin(x: number): number;
- /**
- * Returns the square root of a number.
- * @param x A numeric expression.
- */
- sqrt(x: number): number;
- /**
- * Returns the tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tan(x: number): number;
-}
-/** An intrinsic object that provides basic mathematics functionality and constants. */
-declare const Math: Math;
-
-/** Enables basic storage and retrieval of dates and times. */
-interface Date {
- /** Returns a string representation of a date. The format of the string depends on the locale. */
- toString(): string;
- /** Returns a date as a string value. */
- toDateString(): string;
- /** Returns a time as a string value. */
- toTimeString(): string;
- /** Returns a value as a string value appropriate to the host environment's current locale. */
- toLocaleString(): string;
- /** Returns a date as a string value appropriate to the host environment's current locale. */
- toLocaleDateString(): string;
- /** Returns a time as a string value appropriate to the host environment's current locale. */
- toLocaleTimeString(): string;
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
- valueOf(): number;
- /** Gets the time value in milliseconds. */
- getTime(): number;
- /** Gets the year, using local time. */
- getFullYear(): number;
- /** Gets the year using Universal Coordinated Time (UTC). */
- getUTCFullYear(): number;
- /** Gets the month, using local time. */
- getMonth(): number;
- /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
- getUTCMonth(): number;
- /** Gets the day-of-the-month, using local time. */
- getDate(): number;
- /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
- getUTCDate(): number;
- /** Gets the day of the week, using local time. */
- getDay(): number;
- /** Gets the day of the week using Universal Coordinated Time (UTC). */
- getUTCDay(): number;
- /** Gets the hours in a date, using local time. */
- getHours(): number;
- /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
- getUTCHours(): number;
- /** Gets the minutes of a Date object, using local time. */
- getMinutes(): number;
- /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
- getUTCMinutes(): number;
- /** Gets the seconds of a Date object, using local time. */
- getSeconds(): number;
- /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCSeconds(): number;
- /** Gets the milliseconds of a Date, using local time. */
- getMilliseconds(): number;
- /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCMilliseconds(): number;
- /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
- getTimezoneOffset(): number;
- /**
- * Sets the date and time value in the Date object.
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
- */
- setTime(time: number): number;
- /**
- * Sets the milliseconds value in the Date object using local time.
- * @param ms A numeric value equal to the millisecond value.
- */
- setMilliseconds(ms: number): number;
- /**
- * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- * @param ms A numeric value equal to the millisecond value.
- */
- setUTCMilliseconds(ms: number): number;
-
- /**
- * Sets the seconds value in the Date object using local time.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setSeconds(sec: number, ms?: number): number;
- /**
- * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCSeconds(sec: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using local time.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the hour value in the Date object using local time.
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the numeric day-of-the-month value of the Date object using local time.
- * @param date A numeric value equal to the day of the month.
- */
- setDate(date: number): number;
- /**
- * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- * @param date A numeric value equal to the day of the month.
- */
- setUTCDate(date: number): number;
- /**
- * Sets the month value in the Date object using local time.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
- */
- setMonth(month: number, date?: number): number;
- /**
- * Sets the month value in the Date object using Universal Coordinated Time (UTC).
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
- */
- setUTCMonth(month: number, date?: number): number;
- /**
- * Sets the year of the Date object using local time.
- * @param year A numeric value for the year.
- * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
- * @param date A numeric value equal for the day of the month.
- */
- setFullYear(year: number, month?: number, date?: number): number;
- /**
- * Sets the year value in the Date object using Universal Coordinated Time (UTC).
- * @param year A numeric value equal to the year.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
- * @param date A numeric value equal to the day of the month.
- */
- setUTCFullYear(year: number, month?: number, date?: number): number;
- /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
- toUTCString(): string;
- /** Returns a date as a string value in ISO format. */
- toISOString(): string;
- /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
- toJSON(key?: any): string;
-}
-
-interface DateConstructor {
- new (): Date;
- new (value: number): Date;
- new (value: string): Date;
- new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
- (): string;
- readonly prototype: Date;
- /**
- * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
- * @param s A date string
- */
- parse(s: string): number;
- /**
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
- * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
- * @param month The month as an number between 0 and 11 (January to December).
- * @param date The date as an number between 1 and 31.
- * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
- * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
- * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
- * @param ms An number from 0 to 999 that specifies the milliseconds.
- */
- UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
- now(): number;
-}
-
-declare const Date: DateConstructor;
-
-interface RegExpMatchArray extends Array<string> {
- index?: number;
- input?: string;
-}
-
-interface RegExpExecArray extends Array<string> {
- index: number;
- input: string;
-}
-
-interface RegExp {
- /**
- * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
- * @param string The String object or string literal on which to perform the search.
- */
- exec(string: string): RegExpExecArray | null;
-
- /**
- * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
- * @param string String on which to perform the search.
- */
- test(string: string): boolean;
-
- /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
- readonly source: string;
-
- /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
- readonly global: boolean;
-
- /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
- readonly ignoreCase: boolean;
-
- /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
- readonly multiline: boolean;
-
- lastIndex: number;
-
- // Non-standard extensions
- compile(): this;
-}
-
-interface RegExpConstructor {
- new (pattern: RegExp): RegExp;
- new (pattern: string, flags?: string): RegExp;
- (pattern: RegExp): RegExp;
- (pattern: string, flags?: string): RegExp;
- readonly prototype: RegExp;
-
- // Non-standard extensions
- $1: string;
- $2: string;
- $3: string;
- $4: string;
- $5: string;
- $6: string;
- $7: string;
- $8: string;
- $9: string;
- lastMatch: string;
-}
-
-declare const RegExp: RegExpConstructor;
-
-interface Error {
- name: string;
- message: string;
- stack?: string;
-}
-
-interface ErrorConstructor {
- new (message?: string): Error;
- (message?: string): Error;
- readonly prototype: Error;
-}
-
-declare const Error: ErrorConstructor;
-
-interface EvalError extends Error {
-}
-
-interface EvalErrorConstructor {
- new (message?: string): EvalError;
- (message?: string): EvalError;
- readonly prototype: EvalError;
-}
-
-declare const EvalError: EvalErrorConstructor;
-
-interface RangeError extends Error {
-}
-
-interface RangeErrorConstructor {
- new (message?: string): RangeError;
- (message?: string): RangeError;
- readonly prototype: RangeError;
-}
-
-declare const RangeError: RangeErrorConstructor;
-
-interface ReferenceError extends Error {
-}
-
-interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
- (message?: string): ReferenceError;
- readonly prototype: ReferenceError;
-}
-
-declare const ReferenceError: ReferenceErrorConstructor;
-
-interface SyntaxError extends Error {
-}
-
-interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
- (message?: string): SyntaxError;
- readonly prototype: SyntaxError;
-}
-
-declare const SyntaxError: SyntaxErrorConstructor;
-
-interface TypeError extends Error {
-}
-
-interface TypeErrorConstructor {
- new (message?: string): TypeError;
- (message?: string): TypeError;
- readonly prototype: TypeError;
-}
-
-declare const TypeError: TypeErrorConstructor;
-
-interface URIError extends Error {
-}
-
-interface URIErrorConstructor {
- new (message?: string): URIError;
- (message?: string): URIError;
- readonly prototype: URIError;
-}
-
-declare const URIError: URIErrorConstructor;
-
-interface JSON {
- /**
- * Converts a JavaScript Object Notation (JSON) string into an object.
- * @param text A valid JSON string.
- * @param reviver A function that transforms the results. This function is called for each member of the object.
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
- */
- parse(text: string, reviver?: (key: any, value: any) => any): any;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer A function that transforms the results.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
-}
-
-/**
- * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
- */
-declare const JSON: JSON;
-
-
-/////////////////////////////
-/// ECMAScript Array API (specially handled by compiler)
-/////////////////////////////
-
-interface ReadonlyArray<T> {
- /**
- * Gets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- readonly length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
-
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter<S extends T>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg?: any): S[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
-
- readonly [n: number]: T;
-}
-
-interface Array<T> {
- /**
- * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Appends new elements to an array, and returns the new length of the array.
- * @param items New elements of the Array.
- */
- push(...items: T[]): number;
- /**
- * Removes the last element from an array and returns it.
- */
- pop(): T | undefined;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Reverses the elements in an Array.
- */
- reverse(): T[];
- /**
- * Removes the first element from an array and returns it.
- */
- shift(): T | undefined;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: T, b: T) => number): this;
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- */
- splice(start: number): T[];
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- * @param deleteCount The number of elements to remove.
- * @param items Elements to insert into the array in place of the deleted elements.
- */
- splice(start: number, deleteCount: number, ...items: T[]): T[];
- /**
- * Inserts new elements at the start of an array.
- * @param items Elements to insert at the start of the Array.
- */
- unshift(...items: T[]): number;
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
-
- [n: number]: T;
-}
-
-interface ArrayConstructor {
- new (arrayLength?: number): any[];
- new <T>(arrayLength: number): T[];
- new <T>(...items: T[]): T[];
- (arrayLength?: number): any[];
- <T>(arrayLength: number): T[];
- <T>(...items: T[]): T[];
- isArray(arg: any): arg is Array<any>;
- readonly prototype: Array<any>;
-}
-
-declare const Array: ArrayConstructor;
-
-interface TypedPropertyDescriptor<T> {
- enumerable?: boolean;
- configurable?: boolean;
- writable?: boolean;
- value?: T;
- get?: () => T;
- set?: (value: T) => void;
-}
-
-declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
-declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
-declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
-declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
-
-declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
-
-interface PromiseLike<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then(
- onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): PromiseLike<T>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<T | TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: (value: T) => TResult | PromiseLike<TResult>,
- onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): PromiseLike<TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult1, TResult2>(
- onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>,
- onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
-}
-
-interface ArrayLike<T> {
- readonly length: number;
- readonly [n: number]: T;
-}
-
-/**
- * Make all properties in T optional
- */
-type Partial<T> = {
- [P in keyof T]?: T[P];
-};
-
-/**
- * Make all properties in T readonly
- */
-type Readonly<T> = {
- readonly [P in keyof T]: T[P];
-};
-
-/**
- * From T pick a set of properties K
- */
-type Pick<T, K extends keyof T> = {
- [P in K]: T[P];
-}
-
-/**
- * Construct a type with a set of properties K of type T
- */
-type Record<K extends string, T> = {
- [P in K]: T;
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- /**
- * Read-only. The length of the ArrayBuffer (in bytes).
- */
- readonly byteLength: number;
-
- /**
- * Returns a section of an ArrayBuffer.
- */
- slice(begin:number, end?:number): ArrayBuffer;
-}
-
-interface ArrayBufferConstructor {
- readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
- isView(arg: any): arg is ArrayBufferView;
-}
-declare const ArrayBuffer: ArrayBufferConstructor;
-
-interface ArrayBufferView {
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- byteOffset: number;
-}
-
-interface DataView {
- readonly buffer: ArrayBuffer;
- readonly byteLength: number;
- readonly byteOffset: number;
- /**
- * Gets the Float32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Float64 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat64(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Int8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt8(byteOffset: number): number;
-
- /**
- * Gets the Int16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt16(byteOffset: number, littleEndian?: boolean): number;
- /**
- * Gets the Int32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint8(byteOffset: number): number;
-
- /**
- * Gets the Uint16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint16(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Stores an Float32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Float64 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setInt8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Int16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setUint8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Uint16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
-}
-
-interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
-}
-declare const DataView: DataViewConstructor;
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-interface Int8ArrayConstructor {
- readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-
-}
-declare const Int8Array: Int8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ArrayConstructor {
- readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-
-}
-declare const Uint8Array: Uint8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8ClampedArray;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: Uint8ClampedArray, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8ClampedArray;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8ClampedArray;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ClampedArrayConstructor {
- readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8ClampedArray;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int16ArrayConstructor {
- readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-
-}
-declare const Int16Array: Int16ArrayConstructor;
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint16ArrayConstructor {
- readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-
-}
-declare const Uint16Array: Uint16ArrayConstructor;
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int32ArrayConstructor {
- readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-declare const Int32Array: Int32ArrayConstructor;
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint32ArrayConstructor {
- readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-declare const Uint32Array: Uint32ArrayConstructor;
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float32ArrayConstructor {
- readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-
-}
-declare const Float32Array: Float32ArrayConstructor;
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float64Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float64Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float64Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float64ArrayConstructor {
- readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-}
-declare const Float64Array: Float64ArrayConstructor;
-
-/////////////////////////////
-/// ECMAScript Internationalization API
-/////////////////////////////
-
-declare module Intl {
- interface CollatorOptions {
- usage?: string;
- localeMatcher?: string;
- numeric?: boolean;
- caseFirst?: string;
- sensitivity?: string;
- ignorePunctuation?: boolean;
- }
-
- interface ResolvedCollatorOptions {
- locale: string;
- usage: string;
- sensitivity: string;
- ignorePunctuation: boolean;
- collation: string;
- caseFirst: string;
- numeric: boolean;
- }
-
- interface Collator {
- compare(x: string, y: string): number;
- resolvedOptions(): ResolvedCollatorOptions;
- }
- var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
- (locales?: string | string[], options?: CollatorOptions): Collator;
- supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
- }
-
- interface NumberFormatOptions {
- localeMatcher?: string;
- style?: string;
- currency?: string;
- currencyDisplay?: string;
- useGrouping?: boolean;
- minimumIntegerDigits?: number;
- minimumFractionDigits?: number;
- maximumFractionDigits?: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- }
-
- interface ResolvedNumberFormatOptions {
- locale: string;
- numberingSystem: string;
- style: string;
- currency?: string;
- currencyDisplay?: string;
- minimumIntegerDigits: number;
- minimumFractionDigits: number;
- maximumFractionDigits: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- useGrouping: boolean;
- }
-
- interface NumberFormat {
- format(value: number): string;
- resolvedOptions(): ResolvedNumberFormatOptions;
- }
- var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
- }
-
- interface DateTimeFormatOptions {
- localeMatcher?: string;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- formatMatcher?: string;
- hour12?: boolean;
- timeZone?: string;
- }
-
- interface ResolvedDateTimeFormatOptions {
- locale: string;
- calendar: string;
- numberingSystem: string;
- timeZone: string;
- hour12?: boolean;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- }
-
- interface DateTimeFormat {
- format(date?: Date | number): string;
- resolvedOptions(): ResolvedDateTimeFormatOptions;
- }
- var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
- }
-}
-
-interface String {
- /**
- * Determines whether two strings are equivalent in the current or specified locale.
- * @param that String to compare to target string
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
- * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
- */
- localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
-}
-
-interface Number {
- /**
- * Converts a number to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
-}
-
-interface Date {
- /**
- * Converts a date and time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
- /**
- * Converts a date to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-
- /**
- * Converts a time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-}
-
-
-
-/////////////////////////////
-/// IE DOM APIs
-/////////////////////////////
-
-interface Algorithm {
- name: string;
-}
-
-interface AriaRequestEventInit extends EventInit {
- attributeName?: string;
- attributeValue?: string;
-}
-
-interface CommandEventInit extends EventInit {
- commandName?: string;
- detail?: string;
-}
-
-interface CompositionEventInit extends UIEventInit {
- data?: string;
-}
-
-interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface ConstrainBooleanParameters {
- exact?: boolean;
- ideal?: boolean;
-}
-
-interface ConstrainDOMStringParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface ConstrainDoubleRange extends DoubleRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainLongRange extends LongRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainVideoFacingModeParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface CustomEventInit extends EventInit {
- detail?: any;
-}
-
-interface DeviceAccelerationDict {
- x?: number;
- y?: number;
- z?: number;
-}
-
-interface DeviceLightEventInit extends EventInit {
- value?: number;
-}
-
-interface DeviceRotationRateDict {
- alpha?: number;
- beta?: number;
- gamma?: number;
-}
-
-interface DoubleRange {
- max?: number;
- min?: number;
-}
-
-interface EventInit {
- scoped?: boolean;
- bubbles?: boolean;
- cancelable?: boolean;
-}
-
-interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
- altKey?: boolean;
- metaKey?: boolean;
- modifierAltGraph?: boolean;
- modifierCapsLock?: boolean;
- modifierFn?: boolean;
- modifierFnLock?: boolean;
- modifierHyper?: boolean;
- modifierNumLock?: boolean;
- modifierOS?: boolean;
- modifierScrollLock?: boolean;
- modifierSuper?: boolean;
- modifierSymbol?: boolean;
- modifierSymbolLock?: boolean;
-}
-
-interface ExceptionInformation {
- domain?: string;
-}
-
-interface FocusEventInit extends UIEventInit {
- relatedTarget?: EventTarget;
-}
-
-interface HashChangeEventInit extends EventInit {
- newURL?: string;
- oldURL?: string;
-}
-
-interface IDBIndexParameters {
- multiEntry?: boolean;
- unique?: boolean;
-}
-
-interface IDBObjectStoreParameters {
- autoIncrement?: boolean;
- keyPath?: IDBKeyPath;
-}
-
-interface KeyAlgorithm {
- name?: string;
-}
-
-interface KeyboardEventInit extends EventModifierInit {
- code?: string;
- key?: string;
- location?: number;
- repeat?: boolean;
-}
-
-interface LongRange {
- max?: number;
- min?: number;
-}
-
-interface MSAccountInfo {
- rpDisplayName?: string;
- userDisplayName?: string;
- accountName?: string;
- userId?: string;
- accountImageUri?: string;
-}
-
-interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
- networkSendQualityEventRatio?: number;
- networkDelayEventRatio?: number;
- cpuInsufficientEventRatio?: number;
- deviceHalfDuplexAECEventRatio?: number;
- deviceRenderNotFunctioningEventRatio?: number;
- deviceCaptureNotFunctioningEventRatio?: number;
- deviceGlitchesEventRatio?: number;
- deviceLowSNREventRatio?: number;
- deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
- deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
- deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
-}
-
-interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
- burstLossLength1?: number;
- burstLossLength2?: number;
- burstLossLength3?: number;
- burstLossLength4?: number;
- burstLossLength5?: number;
- burstLossLength6?: number;
- burstLossLength7?: number;
- burstLossLength8OrHigher?: number;
- fecRecvDistance1?: number;
- fecRecvDistance2?: number;
- fecRecvDistance3?: number;
- ratioConcealedSamplesAvg?: number;
- ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
-}
-
-interface MSAudioRecvSignal {
- initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
- recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
- renderLoopbackSignalLevel?: number;
-}
-
-interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
- audioFECUsed?: boolean;
- sendMutePercent?: number;
-}
-
-interface MSAudioSendSignal {
- noiseLevel?: number;
- sendSignalLevelCh1?: number;
- sendNoiseLevelCh1?: number;
-}
-
-interface MSConnectivity {
- iceType?: string;
- iceWarningFlags?: MSIceWarningFlags;
- relayAddress?: MSRelayAddress;
-}
-
-interface MSCredentialFilter {
- accept?: MSCredentialSpec[];
-}
-
-interface MSCredentialParameters {
- type?: string;
-}
-
-interface MSCredentialSpec {
- type?: string;
- id?: string;
-}
-
-interface MSDelay {
- roundTrip?: number;
- roundTripMax?: number;
-}
-
-interface MSDescription extends RTCStats {
- connectivity?: MSConnectivity;
- transport?: string;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
- deviceDevName?: string;
- reflexiveLocalIPAddr?: MSIPAddressInfo;
-}
-
-interface MSFIDOCredentialParameters extends MSCredentialParameters {
- algorithm?: string | Algorithm;
- authenticators?: AAGUID[];
-}
-
-interface MSIPAddressInfo {
- ipAddr?: string;
- port?: number;
- manufacturerMacAddrMask?: string;
-}
-
-interface MSIceWarningFlags {
- turnTcpTimedOut?: boolean;
- turnUdpAllocateFailed?: boolean;
- turnUdpSendFailed?: boolean;
- turnTcpAllocateFailed?: boolean;
- turnTcpSendFailed?: boolean;
- udpLocalConnectivityFailed?: boolean;
- udpNatConnectivityFailed?: boolean;
- udpRelayConnectivityFailed?: boolean;
- tcpNatConnectivityFailed?: boolean;
- tcpRelayConnectivityFailed?: boolean;
- connCheckMessageIntegrityFailed?: boolean;
- allocationMessageIntegrityFailed?: boolean;
- connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
- multipleRelayServersAttempted?: boolean;
- portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
- pseudoTLSFailure?: boolean;
- turnTurnTcpConnectivityFailed?: boolean;
- useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
-}
-
-interface MSJitter {
- interArrival?: number;
- interArrivalMax?: number;
- interArrivalSD?: number;
-}
-
-interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
- networkBandwidthLowEventRatio?: number;
-}
-
-interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
- delay?: MSDelay;
- packetLoss?: MSPacketLoss;
- utilization?: MSUtilization;
-}
-
-interface MSNetworkConnectivityInfo {
- vpn?: boolean;
- linkspeed?: number;
- networkConnectionDetails?: string;
-}
-
-interface MSNetworkInterfaceType {
- interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
- interfaceTypePPP?: boolean;
- interfaceTypeTunnel?: boolean;
- interfaceTypeWWAN?: boolean;
-}
-
-interface MSOutboundNetwork extends MSNetwork {
- appliedBandwidthLimit?: number;
-}
-
-interface MSPacketLoss {
- lossRate?: number;
- lossRateMax?: number;
-}
-
-interface MSPayloadBase extends RTCStats {
- payloadDescription?: string;
-}
-
-interface MSRelayAddress {
- relayAddress?: string;
- port?: number;
-}
-
-interface MSSignatureParameters {
- userPrompt?: string;
-}
-
-interface MSTransportDiagnosticsStats extends RTCStats {
- baseAddress?: string;
- localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
- localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
- localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
- numConsentReqReceived?: number;
- numConsentRespSent?: number;
- numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
- protocol?: string;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: string;
- remoteAddrType?: string;
- iceRole?: string;
- rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
-}
-
-interface MSUtilization {
- packets?: number;
- bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
- bandwidthEstimationMax?: number;
- bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
-}
-
-interface MSVideoPayload extends MSPayloadBase {
- resoluton?: string;
- videoBitRateAvg?: number;
- videoBitRateMax?: number;
- videoFrameRateAvg?: number;
- videoPacketLossRate?: number;
- durationSeconds?: number;
-}
-
-interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
- recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
- recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
- recvVideoStreamsMax?: number;
- recvVideoStreamsMin?: number;
- recvVideoStreamsMode?: number;
- videoPostFECPLR?: number;
- lowBitRateCallPercent?: number;
- lowFrameRateCallPercent?: number;
- reorderBufferTotalPackets?: number;
- recvReorderBufferReorderedPackets?: number;
- recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
- recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
- recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
- recvReorderBufferPacketsDroppedDueToTimeout?: number;
- recvFpsHarmonicAverage?: number;
- recvNumResSwitches?: number;
-}
-
-interface MSVideoResolutionDistribution {
- cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
- h1080Quality?: number;
- h1440Quality?: number;
- h2160Quality?: number;
-}
-
-interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
- sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
- sendResolutionHeight?: number;
-}
-
-interface MediaEncryptedEventInit extends EventInit {
- initDataType?: string;
- initData?: ArrayBuffer;
-}
-
-interface MediaKeyMessageEventInit extends EventInit {
- messageType?: string;
- message?: ArrayBuffer;
-}
-
-interface MediaKeySystemConfiguration {
- initDataTypes?: string[];
- audioCapabilities?: MediaKeySystemMediaCapability[];
- videoCapabilities?: MediaKeySystemMediaCapability[];
- distinctiveIdentifier?: string;
- persistentState?: string;
-}
-
-interface MediaKeySystemMediaCapability {
- contentType?: string;
- robustness?: string;
-}
-
-interface MediaStreamConstraints {
- video?: boolean | MediaTrackConstraints;
- audio?: boolean | MediaTrackConstraints;
-}
-
-interface MediaStreamErrorEventInit extends EventInit {
- error?: MediaStreamError;
-}
-
-interface MediaStreamTrackEventInit extends EventInit {
- track?: MediaStreamTrack;
-}
-
-interface MediaTrackCapabilities {
- width?: number | LongRange;
- height?: number | LongRange;
- aspectRatio?: number | DoubleRange;
- frameRate?: number | DoubleRange;
- facingMode?: string;
- volume?: number | DoubleRange;
- sampleRate?: number | LongRange;
- sampleSize?: number | LongRange;
- echoCancellation?: boolean[];
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackConstraintSet {
- width?: number | ConstrainLongRange;
- height?: number | ConstrainLongRange;
- aspectRatio?: number | ConstrainDoubleRange;
- frameRate?: number | ConstrainDoubleRange;
- facingMode?: string | string[] | ConstrainDOMStringParameters;
- volume?: number | ConstrainDoubleRange;
- sampleRate?: number | ConstrainLongRange;
- sampleSize?: number | ConstrainLongRange;
- echoCancelation?: boolean | ConstrainBooleanParameters;
- deviceId?: string | string[] | ConstrainDOMStringParameters;
- groupId?: string | string[] | ConstrainDOMStringParameters;
-}
-
-interface MediaTrackConstraints extends MediaTrackConstraintSet {
- advanced?: MediaTrackConstraintSet[];
-}
-
-interface MediaTrackSettings {
- width?: number;
- height?: number;
- aspectRatio?: number;
- frameRate?: number;
- facingMode?: string;
- volume?: number;
- sampleRate?: number;
- sampleSize?: number;
- echoCancellation?: boolean;
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackSupportedConstraints {
- width?: boolean;
- height?: boolean;
- aspectRatio?: boolean;
- frameRate?: boolean;
- facingMode?: boolean;
- volume?: boolean;
- sampleRate?: boolean;
- sampleSize?: boolean;
- echoCancellation?: boolean;
- deviceId?: boolean;
- groupId?: boolean;
-}
-
-interface MouseEventInit extends EventModifierInit {
- screenX?: number;
- screenY?: number;
- clientX?: number;
- clientY?: number;
- button?: number;
- buttons?: number;
- relatedTarget?: EventTarget;
-}
-
-interface MsZoomToOptions {
- contentX?: number;
- contentY?: number;
- viewportX?: string;
- viewportY?: string;
- scaleFactor?: number;
- animate?: string;
-}
-
-interface MutationObserverInit {
- childList?: boolean;
- attributes?: boolean;
- characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
- characterDataOldValue?: boolean;
- attributeFilter?: string[];
-}
-
-interface ObjectURLOptions {
- oneTimeOnly?: boolean;
-}
-
-interface PeriodicWaveConstraints {
- disableNormalization?: boolean;
-}
-
-interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
- height?: number;
- pressure?: number;
- tiltX?: number;
- tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
-}
-
-interface PositionOptions {
- enableHighAccuracy?: boolean;
- timeout?: number;
- maximumAge?: number;
-}
-
-interface RTCDTMFToneChangeEventInit extends EventInit {
- tone?: string;
-}
-
-interface RTCDtlsFingerprint {
- algorithm?: string;
- value?: string;
-}
-
-interface RTCDtlsParameters {
- role?: string;
- fingerprints?: RTCDtlsFingerprint[];
-}
-
-interface RTCIceCandidate {
- foundation?: string;
- priority?: number;
- ip?: string;
- protocol?: string;
- port?: number;
- type?: string;
- tcpType?: string;
- relatedAddress?: string;
- relatedPort?: number;
-}
-
-interface RTCIceCandidateAttributes extends RTCStats {
- ipAddress?: string;
- portNumber?: number;
- transport?: string;
- candidateType?: string;
- priority?: number;
- addressSourceUrl?: string;
-}
-
-interface RTCIceCandidateComplete {
-}
-
-interface RTCIceCandidatePair {
- local?: RTCIceCandidate;
- remote?: RTCIceCandidate;
-}
-
-interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
- localCandidateId?: string;
- remoteCandidateId?: string;
- state?: string;
- priority?: number;
- nominated?: boolean;
- writable?: boolean;
- readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
- roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
-}
-
-interface RTCIceGatherOptions {
- gatherPolicy?: string;
- iceservers?: RTCIceServer[];
-}
-
-interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
-}
-
-interface RTCIceServer {
- urls?: any;
- username?: string;
- credential?: string;
-}
-
-interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
- bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
- fractionLost?: number;
-}
-
-interface RTCMediaStreamTrackStats extends RTCStats {
- trackIdentifier?: string;
- remoteSource?: boolean;
- ssrcIds?: string[];
- frameWidth?: number;
- frameHeight?: number;
- framesPerSecond?: number;
- framesSent?: number;
- framesReceived?: number;
- framesDecoded?: number;
- framesDropped?: number;
- framesCorrupted?: number;
- audioLevel?: number;
- echoReturnLoss?: number;
- echoReturnLossEnhancement?: number;
-}
-
-interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
- bytesSent?: number;
- targetBitrate?: number;
- roundTripTime?: number;
-}
-
-interface RTCRTPStreamStats extends RTCStats {
- ssrc?: string;
- associateStatsId?: string;
- isRemote?: boolean;
- mediaTrackId?: string;
- transportId?: string;
- codecId?: string;
- firCount?: number;
- pliCount?: number;
- nackCount?: number;
- sliCount?: number;
-}
-
-interface RTCRtcpFeedback {
- type?: string;
- parameter?: string;
-}
-
-interface RTCRtcpParameters {
- ssrc?: number;
- cname?: string;
- reducedSize?: boolean;
- mux?: boolean;
-}
-
-interface RTCRtpCapabilities {
- codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
- fecMechanisms?: string[];
-}
-
-interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
- clockRate?: number;
- preferredPayloadType?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
- options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
- svcMultiStreamSupport?: boolean;
-}
-
-interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
- clockRate?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
-}
-
-interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
- audioLevel?: number;
-}
-
-interface RTCRtpEncodingParameters {
- ssrc?: number;
- codecPayloadType?: number;
- fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
- maxBitrate?: number;
- minQuality?: number;
- framerateBias?: number;
- resolutionScale?: number;
- framerateScale?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
- ssrcRange?: RTCSsrcRange;
-}
-
-interface RTCRtpFecParameters {
- ssrc?: number;
- mechanism?: string;
-}
-
-interface RTCRtpHeaderExtension {
- kind?: string;
- uri?: string;
- preferredId?: number;
- preferredEncrypt?: boolean;
-}
-
-interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
- encrypt?: boolean;
-}
-
-interface RTCRtpParameters {
- muxId?: string;
- codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
- encodings?: RTCRtpEncodingParameters[];
- rtcp?: RTCRtcpParameters;
-}
-
-interface RTCRtpRtxParameters {
- ssrc?: number;
-}
-
-interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
- muxId?: string;
-}
-
-interface RTCSrtpKeyParam {
- keyMethod?: string;
- keySalt?: string;
- lifetime?: string;
- mkiValue?: number;
- mkiLength?: number;
-}
-
-interface RTCSrtpSdesParameters {
- tag?: number;
- cryptoSuite?: string;
- keyParams?: RTCSrtpKeyParam[];
- sessionParams?: string[];
-}
-
-interface RTCSsrcRange {
- min?: number;
- max?: number;
-}
-
-interface RTCStats {
- timestamp?: number;
- type?: string;
- id?: string;
- msType?: string;
-}
-
-interface RTCStatsReport {
-}
-
-interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
- activeConnection?: boolean;
- selectedCandidatePairId?: string;
- localCertificateId?: string;
- remoteCertificateId?: string;
-}
-
-interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
- detailURI?: string;
-}
-
-interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface UIEventInit extends EventInit {
- view?: Window;
- detail?: number;
-}
-
-interface WebGLContextAttributes {
- failIfMajorPerformanceCaveat?: boolean;
- alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
- antialias?: boolean;
- premultipliedAlpha?: boolean;
- preserveDrawingBuffer?: boolean;
-}
-
-interface WebGLContextEventInit extends EventInit {
- statusMessage?: string;
-}
-
-interface WheelEventInit extends MouseEventInit {
- deltaX?: number;
- deltaY?: number;
- deltaZ?: number;
- deltaMode?: number;
-}
-
-interface EventListener {
- (evt: Event): void;
-}
-
-interface ANGLE_instanced_arrays {
- drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
- drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
- vertexAttribDivisorANGLE(index: number, divisor: number): void;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-declare var ANGLE_instanced_arrays: {
- prototype: ANGLE_instanced_arrays;
- new(): ANGLE_instanced_arrays;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-interface AnalyserNode extends AudioNode {
- fftSize: number;
- readonly frequencyBinCount: number;
- maxDecibels: number;
- minDecibels: number;
- smoothingTimeConstant: number;
- getByteFrequencyData(array: Uint8Array): void;
- getByteTimeDomainData(array: Uint8Array): void;
- getFloatFrequencyData(array: Float32Array): void;
- getFloatTimeDomainData(array: Float32Array): void;
-}
-
-declare var AnalyserNode: {
- prototype: AnalyserNode;
- new(): AnalyserNode;
-}
-
-interface AnimationEvent extends Event {
- readonly animationName: string;
- readonly elapsedTime: number;
- initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var AnimationEvent: {
- prototype: AnimationEvent;
- new(): AnimationEvent;
-}
-
-interface ApplicationCacheEventMap {
- "cached": Event;
- "checking": Event;
- "downloading": Event;
- "error": ErrorEvent;
- "noupdate": Event;
- "obsolete": Event;
- "progress": ProgressEvent;
- "updateready": Event;
-}
-
-interface ApplicationCache extends EventTarget {
- oncached: (this: ApplicationCache, ev: Event) => any;
- onchecking: (this: ApplicationCache, ev: Event) => any;
- ondownloading: (this: ApplicationCache, ev: Event) => any;
- onerror: (this: ApplicationCache, ev: ErrorEvent) => any;
- onnoupdate: (this: ApplicationCache, ev: Event) => any;
- onobsolete: (this: ApplicationCache, ev: Event) => any;
- onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
- onupdateready: (this: ApplicationCache, ev: Event) => any;
- readonly status: number;
- abort(): void;
- swapCache(): void;
- update(): void;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
- addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ApplicationCache: {
- prototype: ApplicationCache;
- new(): ApplicationCache;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
-}
-
-interface AriaRequestEvent extends Event {
- readonly attributeName: string;
- attributeValue: string | null;
-}
-
-declare var AriaRequestEvent: {
- prototype: AriaRequestEvent;
- new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
-}
-
-interface Attr extends Node {
- readonly name: string;
- readonly ownerElement: Element;
- readonly prefix: string | null;
- readonly specified: boolean;
- value: string;
-}
-
-declare var Attr: {
- prototype: Attr;
- new(): Attr;
-}
-
-interface AudioBuffer {
- readonly duration: number;
- readonly length: number;
- readonly numberOfChannels: number;
- readonly sampleRate: number;
- copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
- copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
- getChannelData(channel: number): Float32Array;
-}
-
-declare var AudioBuffer: {
- prototype: AudioBuffer;
- new(): AudioBuffer;
-}
-
-interface AudioBufferSourceNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface AudioBufferSourceNode extends AudioNode {
- buffer: AudioBuffer | null;
- readonly detune: AudioParam;
- loop: boolean;
- loopEnd: number;
- loopStart: number;
- onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
- readonly playbackRate: AudioParam;
- start(when?: number, offset?: number, duration?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var AudioBufferSourceNode: {
- prototype: AudioBufferSourceNode;
- new(): AudioBufferSourceNode;
-}
-
-interface AudioContext extends EventTarget {
- readonly currentTime: number;
- readonly destination: AudioDestinationNode;
- readonly listener: AudioListener;
- readonly sampleRate: number;
- state: string;
- createAnalyser(): AnalyserNode;
- createBiquadFilter(): BiquadFilterNode;
- createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
- createBufferSource(): AudioBufferSourceNode;
- createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
- createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
- createConvolver(): ConvolverNode;
- createDelay(maxDelayTime?: number): DelayNode;
- createDynamicsCompressor(): DynamicsCompressorNode;
- createGain(): GainNode;
- createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
- createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
- createOscillator(): OscillatorNode;
- createPanner(): PannerNode;
- createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
- createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
- createStereoPanner(): StereoPannerNode;
- createWaveShaper(): WaveShaperNode;
- decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
-}
-
-declare var AudioContext: {
- prototype: AudioContext;
- new(): AudioContext;
-}
-
-interface AudioDestinationNode extends AudioNode {
- readonly maxChannelCount: number;
-}
-
-declare var AudioDestinationNode: {
- prototype: AudioDestinationNode;
- new(): AudioDestinationNode;
-}
-
-interface AudioListener {
- dopplerFactor: number;
- speedOfSound: number;
- setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var AudioListener: {
- prototype: AudioListener;
- new(): AudioListener;
-}
-
-interface AudioNode extends EventTarget {
- channelCount: number;
- channelCountMode: string;
- channelInterpretation: string;
- readonly context: AudioContext;
- readonly numberOfInputs: number;
- readonly numberOfOutputs: number;
- connect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(output?: number): void;
- disconnect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(destination: AudioParam, output?: number): void;
-}
-
-declare var AudioNode: {
- prototype: AudioNode;
- new(): AudioNode;
-}
-
-interface AudioParam {
- readonly defaultValue: number;
- value: number;
- cancelScheduledValues(startTime: number): void;
- exponentialRampToValueAtTime(value: number, endTime: number): void;
- linearRampToValueAtTime(value: number, endTime: number): void;
- setTargetAtTime(target: number, startTime: number, timeConstant: number): void;
- setValueAtTime(value: number, startTime: number): void;
- setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;
-}
-
-declare var AudioParam: {
- prototype: AudioParam;
- new(): AudioParam;
-}
-
-interface AudioProcessingEvent extends Event {
- readonly inputBuffer: AudioBuffer;
- readonly outputBuffer: AudioBuffer;
- readonly playbackTime: number;
-}
-
-declare var AudioProcessingEvent: {
- prototype: AudioProcessingEvent;
- new(): AudioProcessingEvent;
-}
-
-interface AudioTrack {
- enabled: boolean;
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var AudioTrack: {
- prototype: AudioTrack;
- new(): AudioTrack;
-}
-
-interface AudioTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface AudioTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
- onchange: (this: AudioTrackList, ev: Event) => any;
- onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
- getTrackById(id: string): AudioTrack | null;
- item(index: number): AudioTrack;
- addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: AudioTrack;
-}
-
-declare var AudioTrackList: {
- prototype: AudioTrackList;
- new(): AudioTrackList;
-}
-
-interface BarProp {
- readonly visible: boolean;
-}
-
-declare var BarProp: {
- prototype: BarProp;
- new(): BarProp;
-}
-
-interface BeforeUnloadEvent extends Event {
- returnValue: any;
-}
-
-declare var BeforeUnloadEvent: {
- prototype: BeforeUnloadEvent;
- new(): BeforeUnloadEvent;
-}
-
-interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- readonly gain: AudioParam;
- type: string;
- getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
-}
-
-declare var BiquadFilterNode: {
- prototype: BiquadFilterNode;
- new(): BiquadFilterNode;
-}
-
-interface Blob {
- readonly size: number;
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
- slice(start?: number, end?: number, contentType?: string): Blob;
-}
-
-declare var Blob: {
- prototype: Blob;
- new (blobParts?: any[], options?: BlobPropertyBag): Blob;
-}
-
-interface CDATASection extends Text {
-}
-
-declare var CDATASection: {
- prototype: CDATASection;
- new(): CDATASection;
-}
-
-interface CSS {
- supports(property: string, value?: string): boolean;
-}
-declare var CSS: CSS;
-
-interface CSSConditionRule extends CSSGroupingRule {
- conditionText: string;
-}
-
-declare var CSSConditionRule: {
- prototype: CSSConditionRule;
- new(): CSSConditionRule;
-}
-
-interface CSSFontFaceRule extends CSSRule {
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSFontFaceRule: {
- prototype: CSSFontFaceRule;
- new(): CSSFontFaceRule;
-}
-
-interface CSSGroupingRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- deleteRule(index: number): void;
- insertRule(rule: string, index: number): number;
-}
-
-declare var CSSGroupingRule: {
- prototype: CSSGroupingRule;
- new(): CSSGroupingRule;
-}
-
-interface CSSImportRule extends CSSRule {
- readonly href: string;
- readonly media: MediaList;
- readonly styleSheet: CSSStyleSheet;
-}
-
-declare var CSSImportRule: {
- prototype: CSSImportRule;
- new(): CSSImportRule;
-}
-
-interface CSSKeyframeRule extends CSSRule {
- keyText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSKeyframeRule: {
- prototype: CSSKeyframeRule;
- new(): CSSKeyframeRule;
-}
-
-interface CSSKeyframesRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- name: string;
- appendRule(rule: string): void;
- deleteRule(rule: string): void;
- findRule(rule: string): CSSKeyframeRule;
-}
-
-declare var CSSKeyframesRule: {
- prototype: CSSKeyframesRule;
- new(): CSSKeyframesRule;
-}
-
-interface CSSMediaRule extends CSSConditionRule {
- readonly media: MediaList;
-}
-
-declare var CSSMediaRule: {
- prototype: CSSMediaRule;
- new(): CSSMediaRule;
-}
-
-interface CSSNamespaceRule extends CSSRule {
- readonly namespaceURI: string;
- readonly prefix: string;
-}
-
-declare var CSSNamespaceRule: {
- prototype: CSSNamespaceRule;
- new(): CSSNamespaceRule;
-}
-
-interface CSSPageRule extends CSSRule {
- readonly pseudoClass: string;
- readonly selector: string;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSPageRule: {
- prototype: CSSPageRule;
- new(): CSSPageRule;
-}
-
-interface CSSRule {
- cssText: string;
- readonly parentRule: CSSRule;
- readonly parentStyleSheet: CSSStyleSheet;
- readonly type: number;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-declare var CSSRule: {
- prototype: CSSRule;
- new(): CSSRule;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-interface CSSRuleList {
- readonly length: number;
- item(index: number): CSSRule;
- [index: number]: CSSRule;
-}
-
-declare var CSSRuleList: {
- prototype: CSSRuleList;
- new(): CSSRuleList;
-}
-
-interface CSSStyleDeclaration {
- alignContent: string | null;
- alignItems: string | null;
- alignSelf: string | null;
- alignmentBaseline: string | null;
- animation: string | null;
- animationDelay: string | null;
- animationDirection: string | null;
- animationDuration: string | null;
- animationFillMode: string | null;
- animationIterationCount: string | null;
- animationName: string | null;
- animationPlayState: string | null;
- animationTimingFunction: string | null;
- backfaceVisibility: string | null;
- background: string | null;
- backgroundAttachment: string | null;
- backgroundClip: string | null;
- backgroundColor: string | null;
- backgroundImage: string | null;
- backgroundOrigin: string | null;
- backgroundPosition: string | null;
- backgroundPositionX: string | null;
- backgroundPositionY: string | null;
- backgroundRepeat: string | null;
- backgroundSize: string | null;
- baselineShift: string | null;
- border: string | null;
- borderBottom: string | null;
- borderBottomColor: string | null;
- borderBottomLeftRadius: string | null;
- borderBottomRightRadius: string | null;
- borderBottomStyle: string | null;
- borderBottomWidth: string | null;
- borderCollapse: string | null;
- borderColor: string | null;
- borderImage: string | null;
- borderImageOutset: string | null;
- borderImageRepeat: string | null;
- borderImageSlice: string | null;
- borderImageSource: string | null;
- borderImageWidth: string | null;
- borderLeft: string | null;
- borderLeftColor: string | null;
- borderLeftStyle: string | null;
- borderLeftWidth: string | null;
- borderRadius: string | null;
- borderRight: string | null;
- borderRightColor: string | null;
- borderRightStyle: string | null;
- borderRightWidth: string | null;
- borderSpacing: string | null;
- borderStyle: string | null;
- borderTop: string | null;
- borderTopColor: string | null;
- borderTopLeftRadius: string | null;
- borderTopRightRadius: string | null;
- borderTopStyle: string | null;
- borderTopWidth: string | null;
- borderWidth: string | null;
- bottom: string | null;
- boxShadow: string | null;
- boxSizing: string | null;
- breakAfter: string | null;
- breakBefore: string | null;
- breakInside: string | null;
- captionSide: string | null;
- clear: string | null;
- clip: string | null;
- clipPath: string | null;
- clipRule: string | null;
- color: string | null;
- colorInterpolationFilters: string | null;
- columnCount: any;
- columnFill: string | null;
- columnGap: any;
- columnRule: string | null;
- columnRuleColor: any;
- columnRuleStyle: string | null;
- columnRuleWidth: any;
- columnSpan: string | null;
- columnWidth: any;
- columns: string | null;
- content: string | null;
- counterIncrement: string | null;
- counterReset: string | null;
- cssFloat: string | null;
- cssText: string;
- cursor: string | null;
- direction: string | null;
- display: string | null;
- dominantBaseline: string | null;
- emptyCells: string | null;
- enableBackground: string | null;
- fill: string | null;
- fillOpacity: string | null;
- fillRule: string | null;
- filter: string | null;
- flex: string | null;
- flexBasis: string | null;
- flexDirection: string | null;
- flexFlow: string | null;
- flexGrow: string | null;
- flexShrink: string | null;
- flexWrap: string | null;
- floodColor: string | null;
- floodOpacity: string | null;
- font: string | null;
- fontFamily: string | null;
- fontFeatureSettings: string | null;
- fontSize: string | null;
- fontSizeAdjust: string | null;
- fontStretch: string | null;
- fontStyle: string | null;
- fontVariant: string | null;
- fontWeight: string | null;
- glyphOrientationHorizontal: string | null;
- glyphOrientationVertical: string | null;
- height: string | null;
- imeMode: string | null;
- justifyContent: string | null;
- kerning: string | null;
- left: string | null;
- readonly length: number;
- letterSpacing: string | null;
- lightingColor: string | null;
- lineHeight: string | null;
- listStyle: string | null;
- listStyleImage: string | null;
- listStylePosition: string | null;
- listStyleType: string | null;
- margin: string | null;
- marginBottom: string | null;
- marginLeft: string | null;
- marginRight: string | null;
- marginTop: string | null;
- marker: string | null;
- markerEnd: string | null;
- markerMid: string | null;
- markerStart: string | null;
- mask: string | null;
- maxHeight: string | null;
- maxWidth: string | null;
- minHeight: string | null;
- minWidth: string | null;
- msContentZoomChaining: string | null;
- msContentZoomLimit: string | null;
- msContentZoomLimitMax: any;
- msContentZoomLimitMin: any;
- msContentZoomSnap: string | null;
- msContentZoomSnapPoints: string | null;
- msContentZoomSnapType: string | null;
- msContentZooming: string | null;
- msFlowFrom: string | null;
- msFlowInto: string | null;
- msFontFeatureSettings: string | null;
- msGridColumn: any;
- msGridColumnAlign: string | null;
- msGridColumnSpan: any;
- msGridColumns: string | null;
- msGridRow: any;
- msGridRowAlign: string | null;
- msGridRowSpan: any;
- msGridRows: string | null;
- msHighContrastAdjust: string | null;
- msHyphenateLimitChars: string | null;
- msHyphenateLimitLines: any;
- msHyphenateLimitZone: any;
- msHyphens: string | null;
- msImeAlign: string | null;
- msOverflowStyle: string | null;
- msScrollChaining: string | null;
- msScrollLimit: string | null;
- msScrollLimitXMax: any;
- msScrollLimitXMin: any;
- msScrollLimitYMax: any;
- msScrollLimitYMin: any;
- msScrollRails: string | null;
- msScrollSnapPointsX: string | null;
- msScrollSnapPointsY: string | null;
- msScrollSnapType: string | null;
- msScrollSnapX: string | null;
- msScrollSnapY: string | null;
- msScrollTranslation: string | null;
- msTextCombineHorizontal: string | null;
- msTextSizeAdjust: any;
- msTouchAction: string | null;
- msTouchSelect: string | null;
- msUserSelect: string | null;
- msWrapFlow: string;
- msWrapMargin: any;
- msWrapThrough: string;
- opacity: string | null;
- order: string | null;
- orphans: string | null;
- outline: string | null;
- outlineColor: string | null;
- outlineStyle: string | null;
- outlineWidth: string | null;
- overflow: string | null;
- overflowX: string | null;
- overflowY: string | null;
- padding: string | null;
- paddingBottom: string | null;
- paddingLeft: string | null;
- paddingRight: string | null;
- paddingTop: string | null;
- pageBreakAfter: string | null;
- pageBreakBefore: string | null;
- pageBreakInside: string | null;
- readonly parentRule: CSSRule;
- perspective: string | null;
- perspectiveOrigin: string | null;
- pointerEvents: string | null;
- position: string | null;
- quotes: string | null;
- right: string | null;
- rubyAlign: string | null;
- rubyOverhang: string | null;
- rubyPosition: string | null;
- stopColor: string | null;
- stopOpacity: string | null;
- stroke: string | null;
- strokeDasharray: string | null;
- strokeDashoffset: string | null;
- strokeLinecap: string | null;
- strokeLinejoin: string | null;
- strokeMiterlimit: string | null;
- strokeOpacity: string | null;
- strokeWidth: string | null;
- tableLayout: string | null;
- textAlign: string | null;
- textAlignLast: string | null;
- textAnchor: string | null;
- textDecoration: string | null;
- textIndent: string | null;
- textJustify: string | null;
- textKashida: string | null;
- textKashidaSpace: string | null;
- textOverflow: string | null;
- textShadow: string | null;
- textTransform: string | null;
- textUnderlinePosition: string | null;
- top: string | null;
- touchAction: string | null;
- transform: string | null;
- transformOrigin: string | null;
- transformStyle: string | null;
- transition: string | null;
- transitionDelay: string | null;
- transitionDuration: string | null;
- transitionProperty: string | null;
- transitionTimingFunction: string | null;
- unicodeBidi: string | null;
- verticalAlign: string | null;
- visibility: string | null;
- webkitAlignContent: string | null;
- webkitAlignItems: string | null;
- webkitAlignSelf: string | null;
- webkitAnimation: string | null;
- webkitAnimationDelay: string | null;
- webkitAnimationDirection: string | null;
- webkitAnimationDuration: string | null;
- webkitAnimationFillMode: string | null;
- webkitAnimationIterationCount: string | null;
- webkitAnimationName: string | null;
- webkitAnimationPlayState: string | null;
- webkitAnimationTimingFunction: string | null;
- webkitAppearance: string | null;
- webkitBackfaceVisibility: string | null;
- webkitBackgroundClip: string | null;
- webkitBackgroundOrigin: string | null;
- webkitBackgroundSize: string | null;
- webkitBorderBottomLeftRadius: string | null;
- webkitBorderBottomRightRadius: string | null;
- webkitBorderImage: string | null;
- webkitBorderRadius: string | null;
- webkitBorderTopLeftRadius: string | null;
- webkitBorderTopRightRadius: string | null;
- webkitBoxAlign: string | null;
- webkitBoxDirection: string | null;
- webkitBoxFlex: string | null;
- webkitBoxOrdinalGroup: string | null;
- webkitBoxOrient: string | null;
- webkitBoxPack: string | null;
- webkitBoxSizing: string | null;
- webkitColumnBreakAfter: string | null;
- webkitColumnBreakBefore: string | null;
- webkitColumnBreakInside: string | null;
- webkitColumnCount: any;
- webkitColumnGap: any;
- webkitColumnRule: string | null;
- webkitColumnRuleColor: any;
- webkitColumnRuleStyle: string | null;
- webkitColumnRuleWidth: any;
- webkitColumnSpan: string | null;
- webkitColumnWidth: any;
- webkitColumns: string | null;
- webkitFilter: string | null;
- webkitFlex: string | null;
- webkitFlexBasis: string | null;
- webkitFlexDirection: string | null;
- webkitFlexFlow: string | null;
- webkitFlexGrow: string | null;
- webkitFlexShrink: string | null;
- webkitFlexWrap: string | null;
- webkitJustifyContent: string | null;
- webkitOrder: string | null;
- webkitPerspective: string | null;
- webkitPerspectiveOrigin: string | null;
- webkitTapHighlightColor: string | null;
- webkitTextFillColor: string | null;
- webkitTextSizeAdjust: any;
- webkitTransform: string | null;
- webkitTransformOrigin: string | null;
- webkitTransformStyle: string | null;
- webkitTransition: string | null;
- webkitTransitionDelay: string | null;
- webkitTransitionDuration: string | null;
- webkitTransitionProperty: string | null;
- webkitTransitionTimingFunction: string | null;
- webkitUserModify: string | null;
- webkitUserSelect: string | null;
- webkitWritingMode: string | null;
- whiteSpace: string | null;
- widows: string | null;
- width: string | null;
- wordBreak: string | null;
- wordSpacing: string | null;
- wordWrap: string | null;
- writingMode: string | null;
- zIndex: string | null;
- zoom: string | null;
- resize: string | null;
- getPropertyPriority(propertyName: string): string;
- getPropertyValue(propertyName: string): string;
- item(index: number): string;
- removeProperty(propertyName: string): string;
- setProperty(propertyName: string, value: string | null, priority?: string): void;
- [index: number]: string;
-}
-
-declare var CSSStyleDeclaration: {
- prototype: CSSStyleDeclaration;
- new(): CSSStyleDeclaration;
-}
-
-interface CSSStyleRule extends CSSRule {
- readonly readOnly: boolean;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSStyleRule: {
- prototype: CSSStyleRule;
- new(): CSSStyleRule;
-}
-
-interface CSSStyleSheet extends StyleSheet {
- readonly cssRules: CSSRuleList;
- cssText: string;
- readonly href: string;
- readonly id: string;
- readonly imports: StyleSheetList;
- readonly isAlternate: boolean;
- readonly isPrefAlternate: boolean;
- readonly ownerRule: CSSRule;
- readonly owningElement: Element;
- readonly pages: StyleSheetPageList;
- readonly readOnly: boolean;
- readonly rules: CSSRuleList;
- addImport(bstrURL: string, lIndex?: number): number;
- addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
- addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
- deleteRule(index?: number): void;
- insertRule(rule: string, index?: number): number;
- removeImport(lIndex: number): void;
- removeRule(lIndex: number): void;
-}
-
-declare var CSSStyleSheet: {
- prototype: CSSStyleSheet;
- new(): CSSStyleSheet;
-}
-
-interface CSSSupportsRule extends CSSConditionRule {
-}
-
-declare var CSSSupportsRule: {
- prototype: CSSSupportsRule;
- new(): CSSSupportsRule;
-}
-
-interface CanvasGradient {
- addColorStop(offset: number, color: string): void;
-}
-
-declare var CanvasGradient: {
- prototype: CanvasGradient;
- new(): CanvasGradient;
-}
-
-interface CanvasPattern {
- setTransform(matrix: SVGMatrix): void;
-}
-
-declare var CanvasPattern: {
- prototype: CanvasPattern;
- new(): CanvasPattern;
-}
-
-interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
- readonly canvas: HTMLCanvasElement;
- fillStyle: string | CanvasGradient | CanvasPattern;
- font: string;
- globalAlpha: number;
- globalCompositeOperation: string;
- lineCap: string;
- lineDashOffset: number;
- lineJoin: string;
- lineWidth: number;
- miterLimit: number;
- msFillRule: string;
- msImageSmoothingEnabled: boolean;
- shadowBlur: number;
- shadowColor: string;
- shadowOffsetX: number;
- shadowOffsetY: number;
- strokeStyle: string | CanvasGradient | CanvasPattern;
- textAlign: string;
- textBaseline: string;
- mozImageSmoothingEnabled: boolean;
- webkitImageSmoothingEnabled: boolean;
- oImageSmoothingEnabled: boolean;
- beginPath(): void;
- clearRect(x: number, y: number, w: number, h: number): void;
- clip(fillRule?: string): void;
- createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
- createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
- createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
- createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
- drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
- fill(fillRule?: string): void;
- fillRect(x: number, y: number, w: number, h: number): void;
- fillText(text: string, x: number, y: number, maxWidth?: number): void;
- getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
- getLineDash(): number[];
- isPointInPath(x: number, y: number, fillRule?: string): boolean;
- measureText(text: string): TextMetrics;
- putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
- restore(): void;
- rotate(angle: number): void;
- save(): void;
- scale(x: number, y: number): void;
- setLineDash(segments: number[]): void;
- setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- stroke(): void;
- strokeRect(x: number, y: number, w: number, h: number): void;
- strokeText(text: string, x: number, y: number, maxWidth?: number): void;
- transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- translate(x: number, y: number): void;
-}
-
-declare var CanvasRenderingContext2D: {
- prototype: CanvasRenderingContext2D;
- new(): CanvasRenderingContext2D;
-}
-
-interface ChannelMergerNode extends AudioNode {
-}
-
-declare var ChannelMergerNode: {
- prototype: ChannelMergerNode;
- new(): ChannelMergerNode;
-}
-
-interface ChannelSplitterNode extends AudioNode {
-}
-
-declare var ChannelSplitterNode: {
- prototype: ChannelSplitterNode;
- new(): ChannelSplitterNode;
-}
-
-interface CharacterData extends Node, ChildNode {
- data: string;
- readonly length: number;
- appendData(arg: string): void;
- deleteData(offset: number, count: number): void;
- insertData(offset: number, arg: string): void;
- replaceData(offset: number, count: number, arg: string): void;
- substringData(offset: number, count: number): string;
-}
-
-declare var CharacterData: {
- prototype: CharacterData;
- new(): CharacterData;
-}
-
-interface ClientRect {
- bottom: number;
- readonly height: number;
- left: number;
- right: number;
- top: number;
- readonly width: number;
-}
-
-declare var ClientRect: {
- prototype: ClientRect;
- new(): ClientRect;
-}
-
-interface ClientRectList {
- readonly length: number;
- item(index: number): ClientRect;
- [index: number]: ClientRect;
-}
-
-declare var ClientRectList: {
- prototype: ClientRectList;
- new(): ClientRectList;
-}
-
-interface ClipboardEvent extends Event {
- readonly clipboardData: DataTransfer;
-}
-
-declare var ClipboardEvent: {
- prototype: ClipboardEvent;
- new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
-}
-
-interface CloseEvent extends Event {
- readonly code: number;
- readonly reason: string;
- readonly wasClean: boolean;
- initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
-}
-
-declare var CloseEvent: {
- prototype: CloseEvent;
- new(): CloseEvent;
-}
-
-interface CommandEvent extends Event {
- readonly commandName: string;
- readonly detail: string | null;
-}
-
-declare var CommandEvent: {
- prototype: CommandEvent;
- new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
-}
-
-interface Comment extends CharacterData {
- text: string;
-}
-
-declare var Comment: {
- prototype: Comment;
- new(): Comment;
-}
-
-interface CompositionEvent extends UIEvent {
- readonly data: string;
- readonly locale: string;
- initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
-}
-
-declare var CompositionEvent: {
- prototype: CompositionEvent;
- new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
-}
-
-interface Console {
- assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
- clear(): void;
- count(countTitle?: string): void;
- debug(message?: string, ...optionalParams: any[]): void;
- dir(value?: any, ...optionalParams: any[]): void;
- dirxml(value: any): void;
- error(message?: any, ...optionalParams: any[]): void;
- exception(message?: string, ...optionalParams: any[]): void;
- group(groupTitle?: string): void;
- groupCollapsed(groupTitle?: string): void;
- groupEnd(): void;
- info(message?: any, ...optionalParams: any[]): void;
- log(message?: any, ...optionalParams: any[]): void;
- msIsIndependentlyComposed(element: Element): boolean;
- profile(reportName?: string): void;
- profileEnd(): void;
- select(element: Element): void;
- table(...data: any[]): void;
- time(timerName?: string): void;
- timeEnd(timerName?: string): void;
- trace(message?: any, ...optionalParams: any[]): void;
- warn(message?: any, ...optionalParams: any[]): void;
-}
-
-declare var Console: {
- prototype: Console;
- new(): Console;
-}
-
-interface ConvolverNode extends AudioNode {
- buffer: AudioBuffer | null;
- normalize: boolean;
-}
-
-declare var ConvolverNode: {
- prototype: ConvolverNode;
- new(): ConvolverNode;
-}
-
-interface Coordinates {
- readonly accuracy: number;
- readonly altitude: number | null;
- readonly altitudeAccuracy: number | null;
- readonly heading: number | null;
- readonly latitude: number;
- readonly longitude: number;
- readonly speed: number | null;
-}
-
-declare var Coordinates: {
- prototype: Coordinates;
- new(): Coordinates;
-}
-
-interface Crypto extends Object, RandomSource {
- readonly subtle: SubtleCrypto;
-}
-
-declare var Crypto: {
- prototype: Crypto;
- new(): Crypto;
-}
-
-interface CryptoKey {
- readonly algorithm: KeyAlgorithm;
- readonly extractable: boolean;
- readonly type: string;
- readonly usages: string[];
-}
-
-declare var CryptoKey: {
- prototype: CryptoKey;
- new(): CryptoKey;
-}
-
-interface CryptoKeyPair {
- privateKey: CryptoKey;
- publicKey: CryptoKey;
-}
-
-declare var CryptoKeyPair: {
- prototype: CryptoKeyPair;
- new(): CryptoKeyPair;
-}
-
-interface CustomEvent extends Event {
- readonly detail: any;
- initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
-}
-
-declare var CustomEvent: {
- prototype: CustomEvent;
- new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
-}
-
-interface DOMError {
- readonly name: string;
- toString(): string;
-}
-
-declare var DOMError: {
- prototype: DOMError;
- new(): DOMError;
-}
-
-interface DOMException {
- readonly code: number;
- readonly message: string;
- readonly name: string;
- toString(): string;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-declare var DOMException: {
- prototype: DOMException;
- new(): DOMException;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-interface DOMImplementation {
- createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;
- createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;
- createHTMLDocument(title: string): Document;
- hasFeature(feature: string | null, version: string | null): boolean;
-}
-
-declare var DOMImplementation: {
- prototype: DOMImplementation;
- new(): DOMImplementation;
-}
-
-interface DOMParser {
- parseFromString(source: string, mimeType: string): Document;
-}
-
-declare var DOMParser: {
- prototype: DOMParser;
- new(): DOMParser;
-}
-
-interface DOMSettableTokenList extends DOMTokenList {
- value: string;
-}
-
-declare var DOMSettableTokenList: {
- prototype: DOMSettableTokenList;
- new(): DOMSettableTokenList;
-}
-
-interface DOMStringList {
- readonly length: number;
- contains(str: string): boolean;
- item(index: number): string | null;
- [index: number]: string;
-}
-
-declare var DOMStringList: {
- prototype: DOMStringList;
- new(): DOMStringList;
-}
-
-interface DOMStringMap {
- [name: string]: string;
-}
-
-declare var DOMStringMap: {
- prototype: DOMStringMap;
- new(): DOMStringMap;
-}
-
-interface DOMTokenList {
- readonly length: number;
- add(...token: string[]): void;
- contains(token: string): boolean;
- item(index: number): string;
- remove(...token: string[]): void;
- toString(): string;
- toggle(token: string, force?: boolean): boolean;
- [index: number]: string;
-}
-
-declare var DOMTokenList: {
- prototype: DOMTokenList;
- new(): DOMTokenList;
-}
-
-interface DataCue extends TextTrackCue {
- data: ArrayBuffer;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var DataCue: {
- prototype: DataCue;
- new(): DataCue;
-}
-
-interface DataTransfer {
- dropEffect: string;
- effectAllowed: string;
- readonly files: FileList;
- readonly items: DataTransferItemList;
- readonly types: string[];
- clearData(format?: string): boolean;
- getData(format: string): string;
- setData(format: string, data: string): boolean;
-}
-
-declare var DataTransfer: {
- prototype: DataTransfer;
- new(): DataTransfer;
-}
-
-interface DataTransferItem {
- readonly kind: string;
- readonly type: string;
- getAsFile(): File | null;
- getAsString(_callback: FunctionStringCallback | null): void;
-}
-
-declare var DataTransferItem: {
- prototype: DataTransferItem;
- new(): DataTransferItem;
-}
-
-interface DataTransferItemList {
- readonly length: number;
- add(data: File): DataTransferItem | null;
- clear(): void;
- item(index: number): DataTransferItem;
- remove(index: number): void;
- [index: number]: DataTransferItem;
-}
-
-declare var DataTransferItemList: {
- prototype: DataTransferItemList;
- new(): DataTransferItemList;
-}
-
-interface DeferredPermissionRequest {
- readonly id: number;
- readonly type: string;
- readonly uri: string;
- allow(): void;
- deny(): void;
-}
-
-declare var DeferredPermissionRequest: {
- prototype: DeferredPermissionRequest;
- new(): DeferredPermissionRequest;
-}
-
-interface DelayNode extends AudioNode {
- readonly delayTime: AudioParam;
-}
-
-declare var DelayNode: {
- prototype: DelayNode;
- new(): DelayNode;
-}
-
-interface DeviceAcceleration {
- readonly x: number | null;
- readonly y: number | null;
- readonly z: number | null;
-}
-
-declare var DeviceAcceleration: {
- prototype: DeviceAcceleration;
- new(): DeviceAcceleration;
-}
-
-interface DeviceLightEvent extends Event {
- readonly value: number;
-}
-
-declare var DeviceLightEvent: {
- prototype: DeviceLightEvent;
- new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
-
-interface DeviceMotionEvent extends Event {
- readonly acceleration: DeviceAcceleration | null;
- readonly accelerationIncludingGravity: DeviceAcceleration | null;
- readonly interval: number | null;
- readonly rotationRate: DeviceRotationRate | null;
- initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
-}
-
-declare var DeviceMotionEvent: {
- prototype: DeviceMotionEvent;
- new(): DeviceMotionEvent;
-}
-
-interface DeviceOrientationEvent extends Event {
- readonly absolute: boolean;
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
- initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
-}
-
-declare var DeviceOrientationEvent: {
- prototype: DeviceOrientationEvent;
- new(): DeviceOrientationEvent;
-}
-
-interface DeviceRotationRate {
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
-}
-
-declare var DeviceRotationRate: {
- prototype: DeviceRotationRate;
- new(): DeviceRotationRate;
-}
-
-interface DocumentEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforedeactivate": UIEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "fullscreenchange": Event;
- "fullscreenerror": Event;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "mssitemodejumplistitemremoved": MSSiteModeEvent;
- "msthumbnailclick": MSSiteModeEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "pointerlockchange": Event;
- "pointerlockerror": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectionchange": Event;
- "selectstart": Event;
- "stalled": Event;
- "stop": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "volumechange": Event;
- "waiting": Event;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
- /**
- * Sets or gets the URL for the current document.
- */
- readonly URL: string;
- /**
- * Gets the URL for the document, stripped of any character encoding.
- */
- readonly URLUnencoded: string;
- /**
- * Gets the object that has the focus when the parent document has focus.
- */
- readonly activeElement: Element;
- /**
- * Sets or gets the color of all active links in the document.
- */
- alinkColor: string;
- /**
- * Returns a reference to the collection of elements contained by the object.
- */
- readonly all: HTMLAllCollection;
- /**
- * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
- */
- anchors: HTMLCollectionOf<HTMLAnchorElement>;
- /**
- * Retrieves a collection of all applet objects in the document.
- */
- applets: HTMLCollectionOf<HTMLAppletElement>;
- /**
- * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
- */
- bgColor: string;
- /**
- * Specifies the beginning and end of the document body.
- */
- body: HTMLElement;
- readonly characterSet: string;
- /**
- * Gets or sets the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets a value that indicates whether standards-compliant mode is switched on for the object.
- */
- readonly compatMode: string;
- cookie: string;
- readonly currentScript: HTMLScriptElement | SVGScriptElement;
- /**
- * Gets the default character set from the current regional language settings.
- */
- readonly defaultCharset: string;
- readonly defaultView: Window;
- /**
- * Sets or gets a value that indicates whether the document can be edited.
- */
- designMode: string;
- /**
- * Sets or retrieves a value that indicates the reading order of the object.
- */
- dir: string;
- /**
- * Gets an object representing the document type declaration associated with the current document.
- */
- readonly doctype: DocumentType;
- /**
- * Gets a reference to the root node of the document.
- */
- documentElement: HTMLElement;
- /**
- * Sets or gets the security domain of the document.
- */
- domain: string;
- /**
- * Retrieves a collection of all embed objects in the document.
- */
- embeds: HTMLCollectionOf<HTMLEmbedElement>;
- /**
- * Sets or gets the foreground (text) color of the document.
- */
- fgColor: string;
- /**
- * Retrieves a collection, in source order, of all form objects in the document.
- */
- forms: HTMLCollectionOf<HTMLFormElement>;
- readonly fullscreenElement: Element | null;
- readonly fullscreenEnabled: boolean;
- readonly head: HTMLHeadElement;
- readonly hidden: boolean;
- /**
- * Retrieves a collection, in source order, of img objects in the document.
- */
- images: HTMLCollectionOf<HTMLImageElement>;
- /**
- * Gets the implementation object of the current document.
- */
- readonly implementation: DOMImplementation;
- /**
- * Returns the character encoding used to create the webpage that is loaded into the document object.
- */
- readonly inputEncoding: string | null;
- /**
- * Gets the date that the page was last modified, if the page supplies one.
- */
- readonly lastModified: string;
- /**
- * Sets or gets the color of the document links.
- */
- linkColor: string;
- /**
- * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
- */
- links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
- /**
- * Contains information about the current URL.
- */
- readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
- msCapsLockWarningOff: boolean;
- /**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
- onabort: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object is set as the active element.
- * @param ev The event.
- */
- onactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the object is set as the active element.
- * @param ev The event.
- */
- onbeforeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
- * @param ev The event.
- */
- onbeforedeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object loses the input focus.
- * @param ev The focus event.
- */
- onblur: (this: Document, ev: FocusEvent) => any;
- /**
- * Occurs when playback is possible, but would require further buffering.
- * @param ev The event.
- */
- oncanplay: (this: Document, ev: Event) => any;
- oncanplaythrough: (this: Document, ev: Event) => any;
- /**
- * Fires when the contents of the object or selection have changed.
- * @param ev The event.
- */
- onchange: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the left mouse button on the object
- * @param ev The mouse event.
- */
- onclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user clicks the right mouse button in the client area, opening the context menu.
- * @param ev The mouse event.
- */
- oncontextmenu: (this: Document, ev: PointerEvent) => any;
- /**
- * Fires when the user double-clicks the object.
- * @param ev The mouse event.
- */
- ondblclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the activeElement is changed from the current object to another object in the parent document.
- * @param ev The UI Event
- */
- ondeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires on the source object continuously during a drag operation.
- * @param ev The event.
- */
- ondrag: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user releases the mouse at the close of a drag operation.
- * @param ev The event.
- */
- ondragend: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element when the user drags the object to a valid drop target.
- * @param ev The drag event.
- */
- ondragenter: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
- * @param ev The drag event.
- */
- ondragleave: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element continuously while the user drags the object over a valid drop target.
- * @param ev The event.
- */
- ondragover: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user starts to drag a text selection or selected object.
- * @param ev The event.
- */
- ondragstart: (this: Document, ev: DragEvent) => any;
- ondrop: (this: Document, ev: DragEvent) => any;
- /**
- * Occurs when the duration attribute is updated.
- * @param ev The event.
- */
- ondurationchange: (this: Document, ev: Event) => any;
- /**
- * Occurs when the media element is reset to its initial state.
- * @param ev The event.
- */
- onemptied: (this: Document, ev: Event) => any;
- /**
- * Occurs when the end of playback is reached.
- * @param ev The event
- */
- onended: (this: Document, ev: MediaStreamErrorEvent) => any;
- /**
- * Fires when an error occurs during object loading.
- * @param ev The event.
- */
- onerror: (this: Document, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- * @param ev The event.
- */
- onfocus: (this: Document, ev: FocusEvent) => any;
- onfullscreenchange: (this: Document, ev: Event) => any;
- onfullscreenerror: (this: Document, ev: Event) => any;
- oninput: (this: Document, ev: Event) => any;
- oninvalid: (this: Document, ev: Event) => any;
- /**
- * Fires when the user presses a key.
- * @param ev The keyboard event
- */
- onkeydown: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user presses an alphanumeric key.
- * @param ev The event.
- */
- onkeypress: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user releases a key.
- * @param ev The keyboard event
- */
- onkeyup: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires immediately after the browser loads the object.
- * @param ev The event.
- */
- onload: (this: Document, ev: Event) => any;
- /**
- * Occurs when media data is loaded at the current playback position.
- * @param ev The event.
- */
- onloadeddata: (this: Document, ev: Event) => any;
- /**
- * Occurs when the duration and dimensions of the media have been determined.
- * @param ev The event.
- */
- onloadedmetadata: (this: Document, ev: Event) => any;
- /**
- * Occurs when Internet Explorer begins looking for media data.
- * @param ev The event.
- */
- onloadstart: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the object with either mouse button.
- * @param ev The mouse event.
- */
- onmousedown: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse over the object.
- * @param ev The mouse event.
- */
- onmousemove: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer outside the boundaries of the object.
- * @param ev The mouse event.
- */
- onmouseout: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer into the object.
- * @param ev The mouse event.
- */
- onmouseover: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user releases a mouse button while the mouse is over the object.
- * @param ev The mouse event.
- */
- onmouseup: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the wheel button is rotated.
- * @param ev The mouse event
- */
- onmousewheel: (this: Document, ev: WheelEvent) => any;
- onmscontentzoom: (this: Document, ev: UIEvent) => any;
- onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
- onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
- onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
- onmspointermove: (this: Document, ev: MSPointerEvent) => any;
- onmspointerout: (this: Document, ev: MSPointerEvent) => any;
- onmspointerover: (this: Document, ev: MSPointerEvent) => any;
- onmspointerup: (this: Document, ev: MSPointerEvent) => any;
- /**
- * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when playback is paused.
- * @param ev The event.
- */
- onpause: (this: Document, ev: Event) => any;
- /**
- * Occurs when the play method is requested.
- * @param ev The event.
- */
- onplay: (this: Document, ev: Event) => any;
- /**
- * Occurs when the audio or video has started playing.
- * @param ev The event.
- */
- onplaying: (this: Document, ev: Event) => any;
- onpointerlockchange: (this: Document, ev: Event) => any;
- onpointerlockerror: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate progress while downloading media data.
- * @param ev The event.
- */
- onprogress: (this: Document, ev: ProgressEvent) => any;
- /**
- * Occurs when the playback rate is increased or decreased.
- * @param ev The event.
- */
- onratechange: (this: Document, ev: Event) => any;
- /**
- * Fires when the state of the object has changed.
- * @param ev The event
- */
- onreadystatechange: (this: Document, ev: ProgressEvent) => any;
- /**
- * Fires when the user resets a form.
- * @param ev The event.
- */
- onreset: (this: Document, ev: Event) => any;
- /**
- * Fires when the user repositions the scroll box in the scroll bar on the object.
- * @param ev The event.
- */
- onscroll: (this: Document, ev: UIEvent) => any;
- /**
- * Occurs when the seek operation ends.
- * @param ev The event.
- */
- onseeked: (this: Document, ev: Event) => any;
- /**
- * Occurs when the current playback position is moved.
- * @param ev The event.
- */
- onseeking: (this: Document, ev: Event) => any;
- /**
- * Fires when the current selection changes.
- * @param ev The event.
- */
- onselect: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the selection state of a document changes.
- * @param ev The event.
- */
- onselectionchange: (this: Document, ev: Event) => any;
- onselectstart: (this: Document, ev: Event) => any;
- /**
- * Occurs when the download has stopped.
- * @param ev The event.
- */
- onstalled: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the Stop button or leaves the Web page.
- * @param ev The event.
- */
- onstop: (this: Document, ev: Event) => any;
- onsubmit: (this: Document, ev: Event) => any;
- /**
- * Occurs if the load operation has been intentionally halted.
- * @param ev The event.
- */
- onsuspend: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate the current playback position.
- * @param ev The event.
- */
- ontimeupdate: (this: Document, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- /**
- * Occurs when the volume is changed, or playback is muted or unmuted.
- * @param ev The event.
- */
- onvolumechange: (this: Document, ev: Event) => any;
- /**
- * Occurs when playback stops because the next frame of a video resource is not available.
- * @param ev The event.
- */
- onwaiting: (this: Document, ev: Event) => any;
- onwebkitfullscreenchange: (this: Document, ev: Event) => any;
- onwebkitfullscreenerror: (this: Document, ev: Event) => any;
- plugins: HTMLCollectionOf<HTMLEmbedElement>;
- readonly pointerLockElement: Element;
- /**
- * Retrieves a value that indicates the current state of the object.
- */
- readonly readyState: string;
- /**
- * Gets the URL of the location that referred the user to the current page.
- */
- readonly referrer: string;
- /**
- * Gets the root svg element in the document hierarchy.
- */
- readonly rootElement: SVGSVGElement;
- /**
- * Retrieves a collection of all script objects in the document.
- */
- scripts: HTMLCollectionOf<HTMLScriptElement>;
- readonly scrollingElement: Element | null;
- /**
- * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
- */
- readonly styleSheets: StyleSheetList;
- /**
- * Contains the title of the document.
- */
- title: string;
- readonly visibilityState: string;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
- vlinkColor: string;
- readonly webkitCurrentFullScreenElement: Element | null;
- readonly webkitFullscreenElement: Element | null;
- readonly webkitFullscreenEnabled: boolean;
- readonly webkitIsFullScreen: boolean;
- readonly xmlEncoding: string | null;
- xmlStandalone: boolean;
- /**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
- xmlVersion: string | null;
- adoptNode(source: Node): Node;
- captureEvents(): void;
- caretRangeFromPoint(x: number, y: number): Range;
- clear(): void;
- /**
- * Closes an output stream and forces the sent data to display.
- */
- close(): void;
- /**
- * Creates an attribute object with a specified name.
- * @param name String that sets the attribute object's name.
- */
- createAttribute(name: string): Attr;
- createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
- createCDATASection(data: string): CDATASection;
- /**
- * Creates a comment object with the specified data.
- * @param data Sets the comment object's data.
- */
- createComment(data: string): Comment;
- /**
- * Creates a new document.
- */
- createDocumentFragment(): DocumentFragment;
- /**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
- createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
- createElement(tagName: string): HTMLElement;
- createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
- createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver: Node): XPathNSResolver;
- /**
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list
- * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
- createProcessingInstruction(target: string, data: string): ProcessingInstruction;
- /**
- * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
- */
- createRange(): Range;
- /**
- * Creates a text string from the specified value.
- * @param data String that specifies the nodeValue property of the text node.
- */
- createTextNode(data: string): Text;
- createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
- createTouchList(...touches: Touch[]): TouchList;
- /**
- * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
- * @param filter A custom NodeFilter function to use.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
- /**
- * Returns the element for the specified x coordinate and the specified y coordinate.
- * @param x The x-offset
- * @param y The y-offset
- */
- elementFromPoint(x: number, y: number): Element;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
- /**
- * Executes a command on the current document, current selection, or the given range.
- * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
- * @param showUI Display the user interface, defaults to false.
- * @param value Value to assign.
- */
- execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
- /**
- * Displays help information for the given command identifier.
- * @param commandId Displays help information for the given command identifier.
- */
- execCommandShowHelp(commandId: string): boolean;
- exitFullscreen(): void;
- exitPointerLock(): void;
- /**
- * Causes the element to receive the focus and executes the code specified by the onfocus event.
- */
- focus(): void;
- /**
- * Returns a reference to the first object with the specified value of the ID or NAME attribute.
- * @param elementId String that specifies the ID value. Case-insensitive.
- */
- getElementById(elementId: string): HTMLElement | null;
- getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
- /**
- * Gets a collection of objects based on the value of the NAME or ID attribute.
- * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
- */
- getElementsByName(elementName: string): NodeListOf<HTMLElement>;
- /**
- * Retrieves a collection of objects based on the specified element name.
- * @param name Specifies the name of an element.
- */
- getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
- getElementsByTagName(tagname: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- /**
- * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
- */
- getSelection(): Selection;
- /**
- * Gets a value indicating whether the object currently has focus.
- */
- hasFocus(): boolean;
- importNode(importedNode: Node, deep: boolean): Node;
- msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
- msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
- /**
- * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
- * @param url Specifies a MIME type for the document.
- * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
- * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
- * @param replace Specifies whether the existing entry for the document is replaced in the history list.
- */
- open(url?: string, name?: string, features?: string, replace?: boolean): Document;
- /**
- * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
- * @param commandId Specifies a command identifier.
- */
- queryCommandEnabled(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandIndeterm(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates the current state of the command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandState(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the current command is supported on the current range.
- * @param commandId Specifies a command identifier.
- */
- queryCommandSupported(commandId: string): boolean;
- /**
- * Retrieves the string associated with a command.
- * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
- */
- queryCommandText(commandId: string): string;
- /**
- * Returns the current value of the document, range, or current selection for the given command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandValue(commandId: string): string;
- releaseEvents(): void;
- /**
- * Allows updating the print settings for the page.
- */
- updateSettings(): void;
- webkitCancelFullScreen(): void;
- webkitExitFullscreen(): void;
- /**
- * Writes one or more HTML expressions to a document in the specified window.
- * @param content Specifies the text and HTML tags to write.
- */
- write(...content: string[]): void;
- /**
- * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
- * @param content The text and HTML tags to write.
- */
- writeln(...content: string[]): void;
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Document: {
- prototype: Document;
- new(): Document;
-}
-
-interface DocumentFragment extends Node, NodeSelector, ParentNode {
-}
-
-declare var DocumentFragment: {
- prototype: DocumentFragment;
- new(): DocumentFragment;
-}
-
-interface DocumentType extends Node, ChildNode {
- readonly entities: NamedNodeMap;
- readonly internalSubset: string | null;
- readonly name: string;
- readonly notations: NamedNodeMap;
- readonly publicId: string | null;
- readonly systemId: string | null;
-}
-
-declare var DocumentType: {
- prototype: DocumentType;
- new(): DocumentType;
-}
-
-interface DragEvent extends MouseEvent {
- readonly dataTransfer: DataTransfer;
- initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
- msConvertURL(file: File, targetType: string, targetURL?: string): void;
-}
-
-declare var DragEvent: {
- prototype: DragEvent;
- new(): DragEvent;
-}
-
-interface DynamicsCompressorNode extends AudioNode {
- readonly attack: AudioParam;
- readonly knee: AudioParam;
- readonly ratio: AudioParam;
- readonly reduction: AudioParam;
- readonly release: AudioParam;
- readonly threshold: AudioParam;
-}
-
-declare var DynamicsCompressorNode: {
- prototype: DynamicsCompressorNode;
- new(): DynamicsCompressorNode;
-}
-
-interface EXT_frag_depth {
-}
-
-declare var EXT_frag_depth: {
- prototype: EXT_frag_depth;
- new(): EXT_frag_depth;
-}
-
-interface EXT_texture_filter_anisotropic {
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-declare var EXT_texture_filter_anisotropic: {
- prototype: EXT_texture_filter_anisotropic;
- new(): EXT_texture_filter_anisotropic;
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-interface ElementEventMap extends GlobalEventHandlersEventMap {
- "ariarequest": AriaRequestEvent;
- "command": CommandEvent;
- "gotpointercapture": PointerEvent;
- "lostpointercapture": PointerEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSGotPointerCapture": MSPointerEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSLostPointerCapture": MSPointerEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
- readonly classList: DOMTokenList;
- className: string;
- readonly clientHeight: number;
- readonly clientLeft: number;
- readonly clientTop: number;
- readonly clientWidth: number;
- id: string;
- msContentZoomFactor: number;
- readonly msRegionOverflow: string;
- onariarequest: (this: Element, ev: AriaRequestEvent) => any;
- oncommand: (this: Element, ev: CommandEvent) => any;
- ongotpointercapture: (this: Element, ev: PointerEvent) => any;
- onlostpointercapture: (this: Element, ev: PointerEvent) => any;
- onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
- onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
- onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
- onmspointermove: (this: Element, ev: MSPointerEvent) => any;
- onmspointerout: (this: Element, ev: MSPointerEvent) => any;
- onmspointerover: (this: Element, ev: MSPointerEvent) => any;
- onmspointerup: (this: Element, ev: MSPointerEvent) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onwebkitfullscreenchange: (this: Element, ev: Event) => any;
- onwebkitfullscreenerror: (this: Element, ev: Event) => any;
- readonly prefix: string | null;
- readonly scrollHeight: number;
- scrollLeft: number;
- scrollTop: number;
- readonly scrollWidth: number;
- readonly tagName: string;
- innerHTML: string;
- readonly assignedSlot: HTMLSlotElement | null;
- slot: string;
- readonly shadowRoot: ShadowRoot | null;
- getAttribute(name: string): string | null;
- getAttributeNS(namespaceURI: string, localName: string): string;
- getAttributeNode(name: string): Attr;
- getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
- getElementsByTagName(name: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- hasAttribute(name: string): boolean;
- hasAttributeNS(namespaceURI: string, localName: string): boolean;
- msGetRegionContent(): MSRangeCollection;
- msGetUntransformedBounds(): ClientRect;
- msMatchesSelector(selectors: string): boolean;
- msReleasePointerCapture(pointerId: number): void;
- msSetPointerCapture(pointerId: number): void;
- msZoomTo(args: MsZoomToOptions): void;
- releasePointerCapture(pointerId: number): void;
- removeAttribute(name?: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
- removeAttributeNode(oldAttr: Attr): Attr;
- requestFullscreen(): void;
- requestPointerLock(): void;
- setAttribute(name: string, value: string): void;
- setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
- setAttributeNode(newAttr: Attr): Attr;
- setAttributeNodeNS(newAttr: Attr): Attr;
- setPointerCapture(pointerId: number): void;
- webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
- webkitRequestFullscreen(): void;
- getElementsByClassName(classNames: string): NodeListOf<Element>;
- matches(selector: string): boolean;
- closest(selector: string): Element | null;
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
- scroll(options?: ScrollToOptions): void;
- scroll(x: number, y: number): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollTo(x: number, y: number): void;
- scrollBy(options?: ScrollToOptions): void;
- scrollBy(x: number, y: number): void;
- insertAdjacentElement(position: string, insertedElement: Element): Element | null;
- insertAdjacentHTML(where: string, html: string): void;
- insertAdjacentText(where: string, text: string): void;
- attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
- addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Element: {
- prototype: Element;
- new(): Element;
-}
-
-interface ErrorEvent extends Event {
- readonly colno: number;
- readonly error: any;
- readonly filename: string;
- readonly lineno: number;
- readonly message: string;
- initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
-}
-
-declare var ErrorEvent: {
- prototype: ErrorEvent;
- new(): ErrorEvent;
-}
-
-interface Event {
- readonly bubbles: boolean;
- cancelBubble: boolean;
- readonly cancelable: boolean;
- readonly currentTarget: EventTarget;
- readonly defaultPrevented: boolean;
- readonly eventPhase: number;
- readonly isTrusted: boolean;
- returnValue: boolean;
- readonly srcElement: Element | null;
- readonly target: EventTarget;
- readonly timeStamp: number;
- readonly type: string;
- readonly scoped: boolean;
- initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
- preventDefault(): void;
- stopImmediatePropagation(): void;
- stopPropagation(): void;
- deepPath(): EventTarget[];
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-declare var Event: {
- prototype: Event;
- new(type: string, eventInitDict?: EventInit): Event;
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-interface EventTarget {
- addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- dispatchEvent(evt: Event): boolean;
- removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var EventTarget: {
- prototype: EventTarget;
- new(): EventTarget;
-}
-
-interface External {
-}
-
-declare var External: {
- prototype: External;
- new(): External;
-}
-
-interface File extends Blob {
- readonly lastModifiedDate: any;
- readonly name: string;
- readonly webkitRelativePath: string;
-}
-
-declare var File: {
- prototype: File;
- new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
-
-interface FileList {
- readonly length: number;
- item(index: number): File;
- [index: number]: File;
-}
-
-declare var FileList: {
- prototype: FileList;
- new(): FileList;
-}
-
-interface FileReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(blob: Blob): void;
- readAsBinaryString(blob: Blob): void;
- readAsDataURL(blob: Blob): void;
- readAsText(blob: Blob, encoding?: string): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var FileReader: {
- prototype: FileReader;
- new(): FileReader;
-}
-
-interface FocusEvent extends UIEvent {
- readonly relatedTarget: EventTarget;
- initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
-}
-
-declare var FocusEvent: {
- prototype: FocusEvent;
- new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
-
-interface FormData {
- append(name: any, value: any, blobName?: string): void;
-}
-
-declare var FormData: {
- prototype: FormData;
- new (form?: HTMLFormElement): FormData;
-}
-
-interface GainNode extends AudioNode {
- readonly gain: AudioParam;
-}
-
-declare var GainNode: {
- prototype: GainNode;
- new(): GainNode;
-}
-
-interface Gamepad {
- readonly axes: number[];
- readonly buttons: GamepadButton[];
- readonly connected: boolean;
- readonly id: string;
- readonly index: number;
- readonly mapping: string;
- readonly timestamp: number;
-}
-
-declare var Gamepad: {
- prototype: Gamepad;
- new(): Gamepad;
-}
-
-interface GamepadButton {
- readonly pressed: boolean;
- readonly value: number;
-}
-
-declare var GamepadButton: {
- prototype: GamepadButton;
- new(): GamepadButton;
-}
-
-interface GamepadEvent extends Event {
- readonly gamepad: Gamepad;
-}
-
-declare var GamepadEvent: {
- prototype: GamepadEvent;
- new(): GamepadEvent;
-}
-
-interface Geolocation {
- clearWatch(watchId: number): void;
- getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
- watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
-}
-
-declare var Geolocation: {
- prototype: Geolocation;
- new(): Geolocation;
-}
-
-interface HTMLAllCollection extends HTMLCollection {
- namedItem(name: string): Element;
-}
-
-declare var HTMLAllCollection: {
- prototype: HTMLAllCollection;
- new(): HTMLAllCollection;
-}
-
-interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
- hash: string;
- /**
- * Contains the hostname and port values of the URL.
- */
- host: string;
- /**
- * Contains the hostname of a URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- readonly mimeType: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- readonly nameProp: string;
- /**
- * Contains the pathname of the URL.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Contains the protocol of the URL.
- */
- protocol: string;
- readonly protocolLong: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- type: string;
- urn: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAnchorElement: {
- prototype: HTMLAnchorElement;
- new(): HTMLAnchorElement;
-}
-
-interface HTMLAppletElement extends HTMLElement {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
- */
- declare: boolean;
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- object: string | null;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- vspace: number;
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAppletElement: {
- prototype: HTMLAppletElement;
- new(): HTMLAppletElement;
-}
-
-interface HTMLAreaElement extends HTMLElement {
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Sets or retrieves the subsection of the href property that follows the number sign (#).
- */
- hash: string;
- /**
- * Sets or retrieves the hostname and port number of the location or URL.
- */
- host: string;
- /**
- * Sets or retrieves the host name part of the location or URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or gets whether clicks in this region cause action.
- */
- noHref: boolean;
- /**
- * Sets or retrieves the file name or path specified by the object.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Sets or retrieves the protocol portion of a URL.
- */
- protocol: string;
- rel: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAreaElement: {
- prototype: HTMLAreaElement;
- new(): HTMLAreaElement;
-}
-
-interface HTMLAreasCollection extends HTMLCollection {
- /**
- * Adds an element to the areas, controlRange, or options collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Removes an element from the collection.
- */
- remove(index?: number): void;
-}
-
-declare var HTMLAreasCollection: {
- prototype: HTMLAreasCollection;
- new(): HTMLAreasCollection;
-}
-
-interface HTMLAudioElement extends HTMLMediaElement {
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAudioElement: {
- prototype: HTMLAudioElement;
- new(): HTMLAudioElement;
-}
-
-interface HTMLBRElement extends HTMLElement {
- /**
- * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
- */
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBRElement: {
- prototype: HTMLBRElement;
- new(): HTMLBRElement;
-}
-
-interface HTMLBaseElement extends HTMLElement {
- /**
- * Gets or sets the baseline URL on which relative links are based.
- */
- href: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseElement: {
- prototype: HTMLBaseElement;
- new(): HTMLBaseElement;
-}
-
-interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- /**
- * Sets or retrieves the font size of the object.
- */
- size: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseFontElement: {
- prototype: HTMLBaseFontElement;
- new(): HTMLBaseFontElement;
-}
-
-interface HTMLBodyElementEventMap extends HTMLElementEventMap {
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "popstate": PopStateEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLBodyElement extends HTMLElement {
- aLink: any;
- background: string;
- bgColor: any;
- bgProperties: string;
- link: any;
- noWrap: boolean;
- onafterprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
- onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLBodyElement, ev: Event) => any;
- onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLBodyElement, ev: Event) => any;
- ononline: (this: HTMLBodyElement, ev: Event) => any;
- onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
- onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
- onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
- onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
- onunload: (this: HTMLBodyElement, ev: Event) => any;
- text: any;
- vLink: any;
- addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBodyElement: {
- prototype: HTMLBodyElement;
- new(): HTMLBodyElement;
-}
-
-interface HTMLButtonElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- status: any;
- /**
- * Gets the classification and default behavior of the button.
- */
- type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the default or selected value of the control.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLButtonElement: {
- prototype: HTMLButtonElement;
- new(): HTMLButtonElement;
-}
-
-interface HTMLCanvasElement extends HTMLElement {
- /**
- * Gets or sets the height of a canvas element on a document.
- */
- height: number;
- /**
- * Gets or sets the width of a canvas element on a document.
- */
- width: number;
- /**
- * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
- * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
- */
- getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
- getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
- getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
- /**
- * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
- */
- msToBlob(): Blob;
- /**
- * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
- * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
- */
- toDataURL(type?: string, ...args: any[]): string;
- toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLCanvasElement: {
- prototype: HTMLCanvasElement;
- new(): HTMLCanvasElement;
-}
-
-interface HTMLCollection {
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Retrieves an object from various collections.
- */
- item(index: number): Element;
- /**
- * Retrieves a select object or an object from an options collection.
- */
- namedItem(name: string): Element;
- [index: number]: Element;
-}
-
-declare var HTMLCollection: {
- prototype: HTMLCollection;
- new(): HTMLCollection;
-}
-
-interface HTMLDListElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDListElement: {
- prototype: HTMLDListElement;
- new(): HTMLDListElement;
-}
-
-interface HTMLDataListElement extends HTMLElement {
- options: HTMLCollectionOf<HTMLOptionElement>;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDataListElement: {
- prototype: HTMLDataListElement;
- new(): HTMLDataListElement;
-}
-
-interface HTMLDirectoryElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDirectoryElement: {
- prototype: HTMLDirectoryElement;
- new(): HTMLDirectoryElement;
-}
-
-interface HTMLDivElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDivElement: {
- prototype: HTMLDivElement;
- new(): HTMLDivElement;
-}
-
-interface HTMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDocument: {
- prototype: HTMLDocument;
- new(): HTMLDocument;
-}
-
-interface HTMLElementEventMap extends ElementEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforecopy": ClipboardEvent;
- "beforecut": ClipboardEvent;
- "beforedeactivate": UIEvent;
- "beforepaste": ClipboardEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "copy": ClipboardEvent;
- "cuechange": Event;
- "cut": ClipboardEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "paste": ClipboardEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectstart": Event;
- "stalled": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface HTMLElement extends Element {
- accessKey: string;
- readonly children: HTMLCollection;
- contentEditable: string;
- readonly dataset: DOMStringMap;
- dir: string;
- draggable: boolean;
- hidden: boolean;
- hideFocus: boolean;
- innerHTML: string;
- innerText: string;
- readonly isContentEditable: boolean;
- lang: string;
- readonly offsetHeight: number;
- readonly offsetLeft: number;
- readonly offsetParent: Element;
- readonly offsetTop: number;
- readonly offsetWidth: number;
- onabort: (this: HTMLElement, ev: UIEvent) => any;
- onactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onblur: (this: HTMLElement, ev: FocusEvent) => any;
- oncanplay: (this: HTMLElement, ev: Event) => any;
- oncanplaythrough: (this: HTMLElement, ev: Event) => any;
- onchange: (this: HTMLElement, ev: Event) => any;
- onclick: (this: HTMLElement, ev: MouseEvent) => any;
- oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
- oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- oncuechange: (this: HTMLElement, ev: Event) => any;
- oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
- ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
- ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
- ondrag: (this: HTMLElement, ev: DragEvent) => any;
- ondragend: (this: HTMLElement, ev: DragEvent) => any;
- ondragenter: (this: HTMLElement, ev: DragEvent) => any;
- ondragleave: (this: HTMLElement, ev: DragEvent) => any;
- ondragover: (this: HTMLElement, ev: DragEvent) => any;
- ondragstart: (this: HTMLElement, ev: DragEvent) => any;
- ondrop: (this: HTMLElement, ev: DragEvent) => any;
- ondurationchange: (this: HTMLElement, ev: Event) => any;
- onemptied: (this: HTMLElement, ev: Event) => any;
- onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
- onerror: (this: HTMLElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLElement, ev: FocusEvent) => any;
- oninput: (this: HTMLElement, ev: Event) => any;
- oninvalid: (this: HTMLElement, ev: Event) => any;
- onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
- onload: (this: HTMLElement, ev: Event) => any;
- onloadeddata: (this: HTMLElement, ev: Event) => any;
- onloadedmetadata: (this: HTMLElement, ev: Event) => any;
- onloadstart: (this: HTMLElement, ev: Event) => any;
- onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
- onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
- onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
- onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
- onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
- onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onpause: (this: HTMLElement, ev: Event) => any;
- onplay: (this: HTMLElement, ev: Event) => any;
- onplaying: (this: HTMLElement, ev: Event) => any;
- onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
- onratechange: (this: HTMLElement, ev: Event) => any;
- onreset: (this: HTMLElement, ev: Event) => any;
- onscroll: (this: HTMLElement, ev: UIEvent) => any;
- onseeked: (this: HTMLElement, ev: Event) => any;
- onseeking: (this: HTMLElement, ev: Event) => any;
- onselect: (this: HTMLElement, ev: UIEvent) => any;
- onselectstart: (this: HTMLElement, ev: Event) => any;
- onstalled: (this: HTMLElement, ev: Event) => any;
- onsubmit: (this: HTMLElement, ev: Event) => any;
- onsuspend: (this: HTMLElement, ev: Event) => any;
- ontimeupdate: (this: HTMLElement, ev: Event) => any;
- onvolumechange: (this: HTMLElement, ev: Event) => any;
- onwaiting: (this: HTMLElement, ev: Event) => any;
- outerHTML: string;
- outerText: string;
- spellcheck: boolean;
- readonly style: CSSStyleDeclaration;
- tabIndex: number;
- title: string;
- blur(): void;
- click(): void;
- dragDrop(): boolean;
- focus(): void;
- msGetInputContext(): MSInputMethodContext;
- setActive(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLElement: {
- prototype: HTMLElement;
- new(): HTMLElement;
-}
-
-interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hidden: any;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the palette used for the embedded document.
- */
- readonly palette: string;
- /**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
- readonly pluginspage: string;
- readonly readyState: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the height and width units of the embed object.
- */
- units: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLEmbedElement: {
- prototype: HTMLEmbedElement;
- new(): HTMLEmbedElement;
-}
-
-interface HTMLFieldSetElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFieldSetElement: {
- prototype: HTMLFieldSetElement;
- new(): HTMLFieldSetElement;
-}
-
-interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFontElement: {
- prototype: HTMLFontElement;
- new(): HTMLFontElement;
-}
-
-interface HTMLFormElement extends HTMLElement {
- /**
- * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
- */
- acceptCharset: string;
- /**
- * Sets or retrieves the URL to which the form content is sent for processing.
- */
- action: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Retrieves a collection, in source order, of all controls in a given form.
- */
- readonly elements: HTMLCollection;
- /**
- * Sets or retrieves the MIME encoding for the form.
- */
- encoding: string;
- /**
- * Sets or retrieves the encoding type for the form.
- */
- enctype: string;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Sets or retrieves how to send the form data to the server.
- */
- method: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Designates a form that is not validated when submitted.
- */
- noValidate: boolean;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a form object or an object from an elements collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a form object or an object from an elements collection.
- */
- namedItem(name: string): any;
- /**
- * Fires when the user resets a form.
- */
- reset(): void;
- /**
- * Fires when a FORM is about to be submitted.
- */
- submit(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLFormElement: {
- prototype: HTMLFormElement;
- new(): HTMLFormElement;
-}
-
-interface HTMLFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string | number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLFrameElement, ev: Event) => any;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string | number;
- addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameElement: {
- prototype: HTMLFrameElement;
- new(): HTMLFrameElement;
-}
-
-interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLFrameSetElement extends HTMLElement {
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Sets or retrieves the frame widths of the object.
- */
- cols: string;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- name: string;
- onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
- /**
- * Fires when the object loses the input focus.
- */
- onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- */
- onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLFrameSetElement, ev: Event) => any;
- onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
- ononline: (this: HTMLFrameSetElement, ev: Event) => any;
- onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
- onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
- onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
- onunload: (this: HTMLFrameSetElement, ev: Event) => any;
- /**
- * Sets or retrieves the frame heights of the object.
- */
- rows: string;
- addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameSetElement: {
- prototype: HTMLFrameSetElement;
- new(): HTMLFrameSetElement;
-}
-
-interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
- */
- noShade: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHRElement: {
- prototype: HTMLHRElement;
- new(): HTMLHRElement;
-}
-
-interface HTMLHeadElement extends HTMLElement {
- profile: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadElement: {
- prototype: HTMLHeadElement;
- new(): HTMLHeadElement;
-}
-
-interface HTMLHeadingElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadingElement: {
- prototype: HTMLHeadingElement;
- new(): HTMLHeadingElement;
-}
-
-interface HTMLHtmlElement extends HTMLElement {
- /**
- * Sets or retrieves the DTD version that governs the current document.
- */
- version: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHtmlElement: {
- prototype: HTMLHtmlElement;
- new(): HTMLHtmlElement;
-}
-
-interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- allowFullscreen: boolean;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the horizontal margin for the object.
- */
- hspace: number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLIFrameElement, ev: Event) => any;
- readonly sandbox: DOMSettableTokenList;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLIFrameElement: {
- prototype: HTMLIFrameElement;
- new(): HTMLIFrameElement;
-}
-
-interface HTMLImageElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- crossOrigin: string;
- readonly currentSrc: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: number;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- /**
- * Sets or retrieves whether the image is a server-side image map.
- */
- isMap: boolean;
- /**
- * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
- */
- longDesc: string;
- lowsrc: string;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * The original height of the image resource before sizing.
- */
- readonly naturalHeight: number;
- /**
- * The original width of the image resource before sizing.
- */
- readonly naturalWidth: number;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- readonly x: number;
- readonly y: number;
- msGetAsCastingSource(): any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLImageElement: {
- prototype: HTMLImageElement;
- new(): HTMLImageElement;
- create(): HTMLImageElement;
-}
-
-interface HTMLInputElement extends HTMLElement {
- /**
- * Sets or retrieves a comma-separated list of content types.
- */
- accept: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- checked: boolean;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- defaultChecked: boolean;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Returns a FileList object on a file type input object.
- */
- readonly files: FileList | null;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- indeterminate: boolean;
- /**
- * Specifies the ID of a pre-defined datalist of options for an input element.
- */
- readonly list: HTMLElement;
- /**
- * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
- */
- max: string;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
- */
- min: string;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a string containing a regular expression that the user's input must match.
- */
- pattern: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- selectionDirection: string;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- size: number;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- status: boolean;
- /**
- * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
- */
- step: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns the value of the data at the cursor's current position.
- */
- value: string;
- valueAsDate: Date;
- /**
- * Returns the input field value as a number.
- */
- valueAsNumber: number;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- webkitdirectory: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Makes the selection equal to the current object.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start?: number, end?: number, direction?: string): void;
- /**
- * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
- * @param n Value to decrement the value by.
- */
- stepDown(n?: number): void;
- /**
- * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
- * @param n Value to increment the value by.
- */
- stepUp(n?: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLInputElement: {
- prototype: HTMLInputElement;
- new(): HTMLInputElement;
-}
-
-interface HTMLLIElement extends HTMLElement {
- type: string;
- /**
- * Sets or retrieves the value of a list item.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLIElement: {
- prototype: HTMLLIElement;
- new(): HTMLLIElement;
-}
-
-interface HTMLLabelElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the object to which the given label object is assigned.
- */
- htmlFor: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLabelElement: {
- prototype: HTMLLabelElement;
- new(): HTMLLabelElement;
-}
-
-interface HTMLLegendElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- align: string;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLegendElement: {
- prototype: HTMLLegendElement;
- new(): HTMLLegendElement;
-}
-
-interface HTMLLinkElement extends HTMLElement, LinkStyle {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- disabled: boolean;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- import?: Document;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLinkElement: {
- prototype: HTMLLinkElement;
- new(): HTMLLinkElement;
-}
-
-interface HTMLMapElement extends HTMLElement {
- /**
- * Retrieves a collection of the area objects defined for the given map object.
- */
- readonly areas: HTMLAreasCollection;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMapElement: {
- prototype: HTMLMapElement;
- new(): HTMLMapElement;
-}
-
-interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
- "bounce": Event;
- "finish": Event;
- "start": Event;
-}
-
-interface HTMLMarqueeElement extends HTMLElement {
- behavior: string;
- bgColor: any;
- direction: string;
- height: string;
- hspace: number;
- loop: number;
- onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
- onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
- onstart: (this: HTMLMarqueeElement, ev: Event) => any;
- scrollAmount: number;
- scrollDelay: number;
- trueSpeed: boolean;
- vspace: number;
- width: string;
- start(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMarqueeElement: {
- prototype: HTMLMarqueeElement;
- new(): HTMLMarqueeElement;
-}
-
-interface HTMLMediaElementEventMap extends HTMLElementEventMap {
- "encrypted": MediaEncryptedEvent;
- "msneedkey": MSMediaKeyNeededEvent;
-}
-
-interface HTMLMediaElement extends HTMLElement {
- /**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
- readonly audioTracks: AudioTrackList;
- /**
- * Gets or sets a value that indicates whether to start playing the media automatically.
- */
- autoplay: boolean;
- /**
- * Gets a collection of buffered time ranges.
- */
- readonly buffered: TimeRanges;
- /**
- * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
- */
- controls: boolean;
- crossOrigin: string;
- /**
- * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
- */
- readonly currentSrc: string;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- currentTime: number;
- defaultMuted: boolean;
- /**
- * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
- */
- defaultPlaybackRate: number;
- /**
- * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
- */
- readonly duration: number;
- /**
- * Gets information about whether the playback has ended or not.
- */
- readonly ended: boolean;
- /**
- * Returns an object representing the current error state of the audio or video element.
- */
- readonly error: MediaError;
- /**
- * Gets or sets a flag to specify whether playback should restart after it completes.
- */
- loop: boolean;
- readonly mediaKeys: MediaKeys | null;
- /**
- * Specifies the purpose of the audio or video media, such as background audio or alerts.
- */
- msAudioCategory: string;
- /**
- * Specifies the output device id that the audio will be sent to.
- */
- msAudioDeviceType: string;
- readonly msGraphicsTrustStatus: MSGraphicsTrust;
- /**
- * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
- */
- readonly msKeys: MSMediaKeys;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Specifies whether or not to enable low-latency playback on the media element.
- */
- msRealTime: boolean;
- /**
- * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
- */
- muted: boolean;
- /**
- * Gets the current network activity for the element.
- */
- readonly networkState: number;
- onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
- onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
- /**
- * Gets a flag that specifies whether playback is paused.
- */
- readonly paused: boolean;
- /**
- * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
- */
- playbackRate: number;
- /**
- * Gets TimeRanges for the current media resource that has been played.
- */
- readonly played: TimeRanges;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- preload: string;
- readyState: number;
- /**
- * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
- */
- readonly seekable: TimeRanges;
- /**
- * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
- */
- readonly seeking: boolean;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcObject: MediaStream | null;
- readonly textTracks: TextTrackList;
- readonly videoTracks: VideoTrackList;
- /**
- * Gets or sets the volume level for audio portions of the media element.
- */
- volume: number;
- addTextTrack(kind: string, label?: string, language?: string): TextTrack;
- /**
- * Returns a string that specifies whether the client can play a given media resource type.
- */
- canPlayType(type: string): string;
- /**
- * Resets the audio or video object and loads a new media resource.
- */
- load(): void;
- /**
- * Clears all effects from the media pipeline.
- */
- msClearEffects(): void;
- msGetAsCastingSource(): any;
- /**
- * Inserts the specified audio effect into media pipeline.
- */
- msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetMediaKeys(mediaKeys: MSMediaKeys): void;
- /**
- * Specifies the media protection manager for a given media pipeline.
- */
- msSetMediaProtectionManager(mediaProtectionManager?: any): void;
- /**
- * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
- */
- pause(): void;
- /**
- * Loads and starts playback of a media resource.
- */
- play(): void;
- setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMediaElement: {
- prototype: HTMLMediaElement;
- new(): HTMLMediaElement;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
-}
-
-interface HTMLMenuElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMenuElement: {
- prototype: HTMLMenuElement;
- new(): HTMLMenuElement;
-}
-
-interface HTMLMetaElement extends HTMLElement {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
- content: string;
- /**
- * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
- */
- httpEquiv: string;
- /**
- * Sets or retrieves the value specified in the content attribute of the meta object.
- */
- name: string;
- /**
- * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
- */
- scheme: string;
- /**
- * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
- */
- url: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMetaElement: {
- prototype: HTMLMetaElement;
- new(): HTMLMetaElement;
-}
-
-interface HTMLMeterElement extends HTMLElement {
- high: number;
- low: number;
- max: number;
- min: number;
- optimum: number;
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMeterElement: {
- prototype: HTMLMeterElement;
- new(): HTMLMeterElement;
-}
-
-interface HTMLModElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- /**
- * Sets or retrieves the date and time of a modification to the object.
- */
- dateTime: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLModElement: {
- prototype: HTMLModElement;
- new(): HTMLModElement;
-}
-
-interface HTMLOListElement extends HTMLElement {
- compact: boolean;
- /**
- * The starting number.
- */
- start: number;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOListElement: {
- prototype: HTMLOListElement;
- new(): HTMLOListElement;
-}
-
-interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- /**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- declare: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the contained object.
- */
- readonly object: any;
- readonly readyState: number;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLObjectElement: {
- prototype: HTMLObjectElement;
- new(): HTMLObjectElement;
-}
-
-interface HTMLOptGroupElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- readonly text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptGroupElement: {
- prototype: HTMLOptGroupElement;
- new(): HTMLOptGroupElement;
-}
-
-interface HTMLOptionElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptionElement: {
- prototype: HTMLOptionElement;
- new(): HTMLOptionElement;
- create(): HTMLOptionElement;
-}
-
-interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
- length: number;
- selectedIndex: number;
- add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
- remove(index: number): void;
-}
-
-declare var HTMLOptionsCollection: {
- prototype: HTMLOptionsCollection;
- new(): HTMLOptionsCollection;
-}
-
-interface HTMLParagraphElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParagraphElement: {
- prototype: HTMLParagraphElement;
- new(): HTMLParagraphElement;
-}
-
-interface HTMLParamElement extends HTMLElement {
- /**
- * Sets or retrieves the name of an input parameter for an element.
- */
- name: string;
- /**
- * Sets or retrieves the content type of the resource designated by the value attribute.
- */
- type: string;
- /**
- * Sets or retrieves the value of an input parameter for an element.
- */
- value: string;
- /**
- * Sets or retrieves the data type of the value attribute.
- */
- valueType: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParamElement: {
- prototype: HTMLParamElement;
- new(): HTMLParamElement;
-}
-
-interface HTMLPictureElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPictureElement: {
- prototype: HTMLPictureElement;
- new(): HTMLPictureElement;
-}
-
-interface HTMLPreElement extends HTMLElement {
- /**
- * Sets or gets a value that you can use to implement your own width functionality for the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPreElement: {
- prototype: HTMLPreElement;
- new(): HTMLPreElement;
-}
-
-interface HTMLProgressElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Defines the maximum, or "done" value for a progress element.
- */
- max: number;
- /**
- * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
- */
- readonly position: number;
- /**
- * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLProgressElement: {
- prototype: HTMLProgressElement;
- new(): HTMLProgressElement;
-}
-
-interface HTMLQuoteElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLQuoteElement: {
- prototype: HTMLQuoteElement;
- new(): HTMLQuoteElement;
-}
-
-interface HTMLScriptElement extends HTMLElement {
- async: boolean;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the status of the script.
- */
- defer: boolean;
- /**
- * Sets or retrieves the event for which the script is written.
- */
- event: string;
- /**
- * Sets or retrieves the object that is bound to the event script.
- */
- htmlFor: string;
- /**
- * Retrieves the URL to an external file that contains the source code or data.
- */
- src: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- /**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
- type: string;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLScriptElement: {
- prototype: HTMLScriptElement;
- new(): HTMLScriptElement;
-}
-
-interface HTMLSelectElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- length: number;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- readonly options: HTMLOptionsCollection;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the index of the selected option in a select object.
- */
- selectedIndex: number;
- selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
- /**
- * Sets or retrieves the number of rows in the list box.
- */
- size: number;
- /**
- * Retrieves the type of select control based on the value of the MULTIPLE attribute.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Adds an element to the areas, controlRange, or options collection.
- * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
- * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
- */
- namedItem(name: string): any;
- /**
- * Removes an element from the collection.
- * @param index Number that specifies the zero-based index of the element to remove from the collection.
- */
- remove(index?: number): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLSelectElement: {
- prototype: HTMLSelectElement;
- new(): HTMLSelectElement;
-}
-
-interface HTMLSourceElement extends HTMLElement {
- /**
- * Gets or sets the intended media type of the media source.
- */
- media: string;
- msKeySystem: string;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Gets or sets the MIME type of a media resource.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSourceElement: {
- prototype: HTMLSourceElement;
- new(): HTMLSourceElement;
-}
-
-interface HTMLSpanElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSpanElement: {
- prototype: HTMLSpanElement;
- new(): HTMLSpanElement;
-}
-
-interface HTMLStyleElement extends HTMLElement, LinkStyle {
- disabled: boolean;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Retrieves the CSS language in which the style sheet is written.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLStyleElement: {
- prototype: HTMLStyleElement;
- new(): HTMLStyleElement;
-}
-
-interface HTMLTableCaptionElement extends HTMLElement {
- /**
- * Sets or retrieves the alignment of the caption or legend.
- */
- align: string;
- /**
- * Sets or retrieves whether the caption appears at the top or bottom of the table.
- */
- vAlign: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCaptionElement: {
- prototype: HTMLTableCaptionElement;
- new(): HTMLTableCaptionElement;
-}
-
-interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves abbreviated text for the object.
- */
- abbr: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
- */
- axis: string;
- bgColor: any;
- /**
- * Retrieves the position of the object in the cells collection of a row.
- */
- readonly cellIndex: number;
- /**
- * Sets or retrieves the number columns in the table that the object should span.
- */
- colSpan: number;
- /**
- * Sets or retrieves a list of header cells that provide information for the object.
- */
- headers: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- /**
- * Sets or retrieves how many rows in a table the cell should span.
- */
- rowSpan: number;
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCellElement: {
- prototype: HTMLTableCellElement;
- new(): HTMLTableCellElement;
-}
-
-interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves the alignment of the object relative to the display or table.
- */
- align: string;
- /**
- * Sets or retrieves the number of columns in the group.
- */
- span: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableColElement: {
- prototype: HTMLTableColElement;
- new(): HTMLTableColElement;
-}
-
-interface HTMLTableDataCellElement extends HTMLTableCellElement {
-}
-
-declare var HTMLTableDataCellElement: {
- prototype: HTMLTableDataCellElement;
- new(): HTMLTableDataCellElement;
-}
-
-interface HTMLTableElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- bgColor: any;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the caption object of a table.
- */
- caption: HTMLTableCaptionElement;
- /**
- * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
- */
- cellPadding: string;
- /**
- * Sets or retrieves the amount of space between cells in a table.
- */
- cellSpacing: string;
- /**
- * Sets or retrieves the number of columns in the table.
- */
- cols: number;
- /**
- * Sets or retrieves the way the border frame around the table is displayed.
- */
- frame: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Sets or retrieves which dividing lines (inner borders) are displayed.
- */
- rules: string;
- /**
- * Sets or retrieves a description and/or structure of the object.
- */
- summary: string;
- /**
- * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
- */
- tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
- /**
- * Retrieves the tFoot object of the table.
- */
- tFoot: HTMLTableSectionElement;
- /**
- * Retrieves the tHead object of the table.
- */
- tHead: HTMLTableSectionElement;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Creates an empty caption element in the table.
- */
- createCaption(): HTMLTableCaptionElement;
- /**
- * Creates an empty tBody element in the table.
- */
- createTBody(): HTMLTableSectionElement;
- /**
- * Creates an empty tFoot element in the table.
- */
- createTFoot(): HTMLTableSectionElement;
- /**
- * Returns the tHead element object if successful, or null otherwise.
- */
- createTHead(): HTMLTableSectionElement;
- /**
- * Deletes the caption element and its contents from the table.
- */
- deleteCaption(): void;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Deletes the tFoot element and its contents from the table.
- */
- deleteTFoot(): void;
- /**
- * Deletes the tHead element and its contents from the table.
- */
- deleteTHead(): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableElement: {
- prototype: HTMLTableElement;
- new(): HTMLTableElement;
-}
-
-interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
-}
-
-declare var HTMLTableHeaderCellElement: {
- prototype: HTMLTableHeaderCellElement;
- new(): HTMLTableHeaderCellElement;
-}
-
-interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- bgColor: any;
- /**
- * Retrieves a collection of all cells in the table row.
- */
- cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Retrieves the position of the object in the rows collection for the table.
- */
- readonly rowIndex: number;
- /**
- * Retrieves the position of the object in the collection.
- */
- readonly sectionRowIndex: number;
- /**
- * Removes the specified cell from the table row, as well as from the cells collection.
- * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
- */
- deleteCell(index?: number): void;
- /**
- * Creates a new cell in the table row, and adds the cell to the cells collection.
- * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
- */
- insertCell(index?: number): HTMLTableDataCellElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableRowElement: {
- prototype: HTMLTableRowElement;
- new(): HTMLTableRowElement;
-}
-
-interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableSectionElement: {
- prototype: HTMLTableSectionElement;
- new(): HTMLTableSectionElement;
-}
-
-interface HTMLTemplateElement extends HTMLElement {
- readonly content: DocumentFragment;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTemplateElement: {
- prototype: HTMLTemplateElement;
- new(): HTMLTemplateElement;
-}
-
-interface HTMLTextAreaElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- cols: number;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- /**
- * Sets or retrieves the value indicated whether the content of the object is read-only.
- */
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: number;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- /**
- * Sets or retrieves the value indicating whether the control is selected.
- */
- status: any;
- /**
- * Retrieves the type of control.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Retrieves or sets the text in the entry field of the textArea element.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Sets or retrieves how to handle wordwrapping in the object.
- */
- wrap: string;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Highlights the input area of a form element.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start: number, end: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTextAreaElement: {
- prototype: HTMLTextAreaElement;
- new(): HTMLTextAreaElement;
-}
-
-interface HTMLTitleElement extends HTMLElement {
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTitleElement: {
- prototype: HTMLTitleElement;
- new(): HTMLTitleElement;
-}
-
-interface HTMLTrackElement extends HTMLElement {
- default: boolean;
- kind: string;
- label: string;
- readonly readyState: number;
- src: string;
- srclang: string;
- readonly track: TextTrack;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTrackElement: {
- prototype: HTMLTrackElement;
- new(): HTMLTrackElement;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
-}
-
-interface HTMLUListElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUListElement: {
- prototype: HTMLUListElement;
- new(): HTMLUListElement;
-}
-
-interface HTMLUnknownElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUnknownElement: {
- prototype: HTMLUnknownElement;
- new(): HTMLUnknownElement;
-}
-
-interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
- "MSVideoFormatChanged": Event;
- "MSVideoFrameStepCompleted": Event;
- "MSVideoOptimalLayoutChanged": Event;
-}
-
-interface HTMLVideoElement extends HTMLMediaElement {
- /**
- * Gets or sets the height of the video element.
- */
- height: number;
- msHorizontalMirror: boolean;
- readonly msIsLayoutOptimalForPlayback: boolean;
- readonly msIsStereo3D: boolean;
- msStereo3DPackingMode: string;
- msStereo3DRenderMode: string;
- msZoom: boolean;
- onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
- /**
- * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
- */
- poster: string;
- /**
- * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoHeight: number;
- /**
- * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoWidth: number;
- readonly webkitDisplayingFullscreen: boolean;
- readonly webkitSupportsFullscreen: boolean;
- /**
- * Gets or sets the width of the video element.
- */
- width: number;
- getVideoPlaybackQuality(): VideoPlaybackQuality;
- msFrameStep(forward: boolean): void;
- msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
- webkitEnterFullScreen(): void;
- webkitEnterFullscreen(): void;
- webkitExitFullScreen(): void;
- webkitExitFullscreen(): void;
- addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLVideoElement: {
- prototype: HTMLVideoElement;
- new(): HTMLVideoElement;
-}
-
-interface HashChangeEvent extends Event {
- readonly newURL: string | null;
- readonly oldURL: string | null;
-}
-
-declare var HashChangeEvent: {
- prototype: HashChangeEvent;
- new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
-}
-
-interface History {
- readonly length: number;
- readonly state: any;
- scrollRestoration: ScrollRestoration;
- back(): void;
- forward(): void;
- go(delta?: number): void;
- pushState(data: any, title: string, url?: string | null): void;
- replaceState(data: any, title: string, url?: string | null): void;
-}
-
-declare var History: {
- prototype: History;
- new(): History;
-}
-
-interface IDBCursor {
- readonly direction: string;
- key: IDBKeyRange | IDBValidKey;
- readonly primaryKey: any;
- source: IDBObjectStore | IDBIndex;
- advance(count: number): void;
- continue(key?: IDBKeyRange | IDBValidKey): void;
- delete(): IDBRequest;
- update(value: any): IDBRequest;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-declare var IDBCursor: {
- prototype: IDBCursor;
- new(): IDBCursor;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-interface IDBCursorWithValue extends IDBCursor {
- readonly value: any;
-}
-
-declare var IDBCursorWithValue: {
- prototype: IDBCursorWithValue;
- new(): IDBCursorWithValue;
-}
-
-interface IDBDatabaseEventMap {
- "abort": Event;
- "error": ErrorEvent;
-}
-
-interface IDBDatabase extends EventTarget {
- readonly name: string;
- readonly objectStoreNames: DOMStringList;
- onabort: (this: IDBDatabase, ev: Event) => any;
- onerror: (this: IDBDatabase, ev: ErrorEvent) => any;
- version: number;
- onversionchange: (ev: IDBVersionChangeEvent) => any;
- close(): void;
- createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
- deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
- addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
- addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBDatabase: {
- prototype: IDBDatabase;
- new(): IDBDatabase;
-}
-
-interface IDBFactory {
- cmp(first: any, second: any): number;
- deleteDatabase(name: string): IDBOpenDBRequest;
- open(name: string, version?: number): IDBOpenDBRequest;
-}
-
-declare var IDBFactory: {
- prototype: IDBFactory;
- new(): IDBFactory;
-}
-
-interface IDBIndex {
- keyPath: string | string[];
- readonly name: string;
- readonly objectStore: IDBObjectStore;
- readonly unique: boolean;
- multiEntry: boolean;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- get(key: IDBKeyRange | IDBValidKey): IDBRequest;
- getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
-}
-
-declare var IDBIndex: {
- prototype: IDBIndex;
- new(): IDBIndex;
-}
-
-interface IDBKeyRange {
- readonly lower: any;
- readonly lowerOpen: boolean;
- readonly upper: any;
- readonly upperOpen: boolean;
-}
-
-declare var IDBKeyRange: {
- prototype: IDBKeyRange;
- new(): IDBKeyRange;
- bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
- lowerBound(lower: any, open?: boolean): IDBKeyRange;
- only(value: any): IDBKeyRange;
- upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
-
-interface IDBObjectStore {
- readonly indexNames: DOMStringList;
- keyPath: string | string[];
- readonly name: string;
- readonly transaction: IDBTransaction;
- autoIncrement: boolean;
- add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
- clear(): IDBRequest;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
- delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
- deleteIndex(indexName: string): void;
- get(key: any): IDBRequest;
- index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
-}
-
-declare var IDBObjectStore: {
- prototype: IDBObjectStore;
- new(): IDBObjectStore;
-}
-
-interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
- "blocked": Event;
- "upgradeneeded": IDBVersionChangeEvent;
-}
-
-interface IDBOpenDBRequest extends IDBRequest {
- onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
- onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
- addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBOpenDBRequest: {
- prototype: IDBOpenDBRequest;
- new(): IDBOpenDBRequest;
-}
-
-interface IDBRequestEventMap {
- "error": ErrorEvent;
- "success": Event;
-}
-
-interface IDBRequest extends EventTarget {
- readonly error: DOMError;
- onerror: (this: IDBRequest, ev: ErrorEvent) => any;
- onsuccess: (this: IDBRequest, ev: Event) => any;
- readonly readyState: string;
- readonly result: any;
- source: IDBObjectStore | IDBIndex | IDBCursor;
- readonly transaction: IDBTransaction;
- addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBRequest: {
- prototype: IDBRequest;
- new(): IDBRequest;
-}
-
-interface IDBTransactionEventMap {
- "abort": Event;
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface IDBTransaction extends EventTarget {
- readonly db: IDBDatabase;
- readonly error: DOMError;
- readonly mode: string;
- onabort: (this: IDBTransaction, ev: Event) => any;
- oncomplete: (this: IDBTransaction, ev: Event) => any;
- onerror: (this: IDBTransaction, ev: ErrorEvent) => any;
- abort(): void;
- objectStore(name: string): IDBObjectStore;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
- addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBTransaction: {
- prototype: IDBTransaction;
- new(): IDBTransaction;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
-}
-
-interface IDBVersionChangeEvent extends Event {
- readonly newVersion: number | null;
- readonly oldVersion: number;
-}
-
-declare var IDBVersionChangeEvent: {
- prototype: IDBVersionChangeEvent;
- new(): IDBVersionChangeEvent;
-}
-
-interface ImageData {
- data: Uint8ClampedArray;
- readonly height: number;
- readonly width: number;
-}
-
-declare var ImageData: {
- prototype: ImageData;
- new(width: number, height: number): ImageData;
- new(array: Uint8ClampedArray, width: number, height: number): ImageData;
-}
-
-interface KeyboardEvent extends UIEvent {
- readonly altKey: boolean;
- readonly char: string | null;
- readonly charCode: number;
- readonly ctrlKey: boolean;
- readonly key: string;
- readonly keyCode: number;
- readonly locale: string;
- readonly location: number;
- readonly metaKey: boolean;
- readonly repeat: boolean;
- readonly shiftKey: boolean;
- readonly which: number;
- readonly code: string;
- getModifierState(keyArg: string): boolean;
- initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-declare var KeyboardEvent: {
- prototype: KeyboardEvent;
- new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-interface ListeningStateChangedEvent extends Event {
- readonly label: string;
- readonly state: string;
-}
-
-declare var ListeningStateChangedEvent: {
- prototype: ListeningStateChangedEvent;
- new(): ListeningStateChangedEvent;
-}
-
-interface Location {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- assign(url: string): void;
- reload(forcedReload?: boolean): void;
- replace(url: string): void;
- toString(): string;
-}
-
-declare var Location: {
- prototype: Location;
- new(): Location;
-}
-
-interface LongRunningScriptDetectedEvent extends Event {
- readonly executionTime: number;
- stopPageScriptExecution: boolean;
-}
-
-declare var LongRunningScriptDetectedEvent: {
- prototype: LongRunningScriptDetectedEvent;
- new(): LongRunningScriptDetectedEvent;
-}
-
-interface MSApp {
- clearTemporaryWebDataAsync(): MSAppAsyncOperation;
- createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
- createDataPackage(object: any): any;
- createDataPackageFromSelection(): any;
- createFileFromStorageFile(storageFile: any): File;
- createStreamFromInputStream(type: string, inputStream: any): MSStream;
- execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
- execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
- getCurrentPriority(): string;
- getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
- getViewId(view: any): any;
- isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
- pageHandlesAllApplicationActivations(enabled: boolean): void;
- suppressSubdownloadCredentialPrompts(suppress: boolean): void;
- terminateApp(exceptionObject: any): void;
- readonly CURRENT: string;
- readonly HIGH: string;
- readonly IDLE: string;
- readonly NORMAL: string;
-}
-declare var MSApp: MSApp;
-
-interface MSAppAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSAppAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
- onerror: (this: MSAppAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSAppAsyncOperation: {
- prototype: MSAppAsyncOperation;
- new(): MSAppAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
-}
-
-interface MSAssertion {
- readonly id: string;
- readonly type: string;
-}
-
-declare var MSAssertion: {
- prototype: MSAssertion;
- new(): MSAssertion;
-}
-
-interface MSBlobBuilder {
- append(data: any, endings?: string): void;
- getBlob(contentType?: string): Blob;
-}
-
-declare var MSBlobBuilder: {
- prototype: MSBlobBuilder;
- new(): MSBlobBuilder;
-}
-
-interface MSCredentials {
- getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
- makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
-}
-
-declare var MSCredentials: {
- prototype: MSCredentials;
- new(): MSCredentials;
-}
-
-interface MSFIDOCredentialAssertion extends MSAssertion {
- readonly algorithm: string | Algorithm;
- readonly attestation: any;
- readonly publicKey: string;
- readonly transportHints: string[];
-}
-
-declare var MSFIDOCredentialAssertion: {
- prototype: MSFIDOCredentialAssertion;
- new(): MSFIDOCredentialAssertion;
-}
-
-interface MSFIDOSignature {
- readonly authnrData: string;
- readonly clientData: string;
- readonly signature: string;
-}
-
-declare var MSFIDOSignature: {
- prototype: MSFIDOSignature;
- new(): MSFIDOSignature;
-}
-
-interface MSFIDOSignatureAssertion extends MSAssertion {
- readonly signature: MSFIDOSignature;
-}
-
-declare var MSFIDOSignatureAssertion: {
- prototype: MSFIDOSignatureAssertion;
- new(): MSFIDOSignatureAssertion;
-}
-
-interface MSGesture {
- target: Element;
- addPointer(pointerId: number): void;
- stop(): void;
-}
-
-declare var MSGesture: {
- prototype: MSGesture;
- new(): MSGesture;
-}
-
-interface MSGestureEvent extends UIEvent {
- readonly clientX: number;
- readonly clientY: number;
- readonly expansion: number;
- readonly gestureObject: any;
- readonly hwTimestamp: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly rotation: number;
- readonly scale: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly translationX: number;
- readonly translationY: number;
- readonly velocityAngular: number;
- readonly velocityExpansion: number;
- readonly velocityX: number;
- readonly velocityY: number;
- initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-declare var MSGestureEvent: {
- prototype: MSGestureEvent;
- new(): MSGestureEvent;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-interface MSGraphicsTrust {
- readonly constrictionActive: boolean;
- readonly status: string;
-}
-
-declare var MSGraphicsTrust: {
- prototype: MSGraphicsTrust;
- new(): MSGraphicsTrust;
-}
-
-interface MSHTMLWebViewElement extends HTMLElement {
- readonly canGoBack: boolean;
- readonly canGoForward: boolean;
- readonly containsFullScreenElement: boolean;
- readonly documentTitle: string;
- height: number;
- readonly settings: MSWebViewSettings;
- src: string;
- width: number;
- addWebAllowedObject(name: string, applicationObject: any): void;
- buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
- capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
- captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
- getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
- getDeferredPermissionRequests(): DeferredPermissionRequest[];
- goBack(): void;
- goForward(): void;
- invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
- navigate(uri: string): void;
- navigateToLocalStreamUri(source: string, streamResolver: any): void;
- navigateToString(contents: string): void;
- navigateWithHttpRequestMessage(requestMessage: any): void;
- refresh(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSHTMLWebViewElement: {
- prototype: MSHTMLWebViewElement;
- new(): MSHTMLWebViewElement;
-}
-
-interface MSInputMethodContextEventMap {
- "MSCandidateWindowHide": Event;
- "MSCandidateWindowShow": Event;
- "MSCandidateWindowUpdate": Event;
-}
-
-interface MSInputMethodContext extends EventTarget {
- readonly compositionEndOffset: number;
- readonly compositionStartOffset: number;
- oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
- readonly target: HTMLElement;
- getCandidateWindowClientRect(): ClientRect;
- getCompositionAlternatives(): string[];
- hasComposition(): boolean;
- isCandidateWindowVisible(): boolean;
- addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSInputMethodContext: {
- prototype: MSInputMethodContext;
- new(): MSInputMethodContext;
-}
-
-interface MSManipulationEvent extends UIEvent {
- readonly currentState: number;
- readonly inertiaDestinationX: number;
- readonly inertiaDestinationY: number;
- readonly lastState: number;
- initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-declare var MSManipulationEvent: {
- prototype: MSManipulationEvent;
- new(): MSManipulationEvent;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-interface MSMediaKeyError {
- readonly code: number;
- readonly systemCode: number;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-declare var MSMediaKeyError: {
- prototype: MSMediaKeyError;
- new(): MSMediaKeyError;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-interface MSMediaKeyMessageEvent extends Event {
- readonly destinationURL: string | null;
- readonly message: Uint8Array;
-}
-
-declare var MSMediaKeyMessageEvent: {
- prototype: MSMediaKeyMessageEvent;
- new(): MSMediaKeyMessageEvent;
-}
-
-interface MSMediaKeyNeededEvent extends Event {
- readonly initData: Uint8Array | null;
-}
-
-declare var MSMediaKeyNeededEvent: {
- prototype: MSMediaKeyNeededEvent;
- new(): MSMediaKeyNeededEvent;
-}
-
-interface MSMediaKeySession extends EventTarget {
- readonly error: MSMediaKeyError | null;
- readonly keySystem: string;
- readonly sessionId: string;
- close(): void;
- update(key: Uint8Array): void;
-}
-
-declare var MSMediaKeySession: {
- prototype: MSMediaKeySession;
- new(): MSMediaKeySession;
-}
-
-interface MSMediaKeys {
- readonly keySystem: string;
- createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
-}
-
-declare var MSMediaKeys: {
- prototype: MSMediaKeys;
- new(keySystem: string): MSMediaKeys;
- isTypeSupported(keySystem: string, type?: string): boolean;
- isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
-}
-
-interface MSPointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var MSPointerEvent: {
- prototype: MSPointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
-
-interface MSRangeCollection {
- readonly length: number;
- item(index: number): Range;
- [index: number]: Range;
-}
-
-declare var MSRangeCollection: {
- prototype: MSRangeCollection;
- new(): MSRangeCollection;
-}
-
-interface MSSiteModeEvent extends Event {
- readonly actionURL: string;
- readonly buttonID: number;
-}
-
-declare var MSSiteModeEvent: {
- prototype: MSSiteModeEvent;
- new(): MSSiteModeEvent;
-}
-
-interface MSStream {
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
-}
-
-declare var MSStream: {
- prototype: MSStream;
- new(): MSStream;
-}
-
-interface MSStreamReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(stream: MSStream, size?: number): void;
- readAsBinaryString(stream: MSStream, size?: number): void;
- readAsBlob(stream: MSStream, size?: number): void;
- readAsDataURL(stream: MSStream, size?: number): void;
- readAsText(stream: MSStream, encoding?: string, size?: number): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSStreamReader: {
- prototype: MSStreamReader;
- new(): MSStreamReader;
-}
-
-interface MSWebViewAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSWebViewAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
- onerror: (this: MSWebViewAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- readonly target: MSHTMLWebViewElement;
- readonly type: number;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
- addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSWebViewAsyncOperation: {
- prototype: MSWebViewAsyncOperation;
- new(): MSWebViewAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
-}
-
-interface MSWebViewSettings {
- isIndexedDBEnabled: boolean;
- isJavaScriptEnabled: boolean;
-}
-
-declare var MSWebViewSettings: {
- prototype: MSWebViewSettings;
- new(): MSWebViewSettings;
-}
-
-interface MediaDeviceInfo {
- readonly deviceId: string;
- readonly groupId: string;
- readonly kind: string;
- readonly label: string;
-}
-
-declare var MediaDeviceInfo: {
- prototype: MediaDeviceInfo;
- new(): MediaDeviceInfo;
-}
-
-interface MediaDevicesEventMap {
- "devicechange": Event;
-}
-
-interface MediaDevices extends EventTarget {
- ondevicechange: (this: MediaDevices, ev: Event) => any;
- enumerateDevices(): any;
- getSupportedConstraints(): MediaTrackSupportedConstraints;
- getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
- addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaDevices: {
- prototype: MediaDevices;
- new(): MediaDevices;
-}
-
-interface MediaElementAudioSourceNode extends AudioNode {
-}
-
-declare var MediaElementAudioSourceNode: {
- prototype: MediaElementAudioSourceNode;
- new(): MediaElementAudioSourceNode;
-}
-
-interface MediaEncryptedEvent extends Event {
- readonly initData: ArrayBuffer | null;
- readonly initDataType: string;
-}
-
-declare var MediaEncryptedEvent: {
- prototype: MediaEncryptedEvent;
- new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
-}
-
-interface MediaError {
- readonly code: number;
- readonly msExtendedCode: number;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-declare var MediaError: {
- prototype: MediaError;
- new(): MediaError;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-interface MediaKeyMessageEvent extends Event {
- readonly message: ArrayBuffer;
- readonly messageType: string;
-}
-
-declare var MediaKeyMessageEvent: {
- prototype: MediaKeyMessageEvent;
- new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
-}
-
-interface MediaKeySession extends EventTarget {
- readonly closed: PromiseLike<void>;
- readonly expiration: number;
- readonly keyStatuses: MediaKeyStatusMap;
- readonly sessionId: string;
- close(): PromiseLike<void>;
- generateRequest(initDataType: string, initData: any): PromiseLike<void>;
- load(sessionId: string): PromiseLike<boolean>;
- remove(): PromiseLike<void>;
- update(response: any): PromiseLike<void>;
-}
-
-declare var MediaKeySession: {
- prototype: MediaKeySession;
- new(): MediaKeySession;
-}
-
-interface MediaKeyStatusMap {
- readonly size: number;
- forEach(callback: ForEachCallback): void;
- get(keyId: any): string;
- has(keyId: any): boolean;
-}
-
-declare var MediaKeyStatusMap: {
- prototype: MediaKeyStatusMap;
- new(): MediaKeyStatusMap;
-}
-
-interface MediaKeySystemAccess {
- readonly keySystem: string;
- createMediaKeys(): PromiseLike<MediaKeys>;
- getConfiguration(): MediaKeySystemConfiguration;
-}
-
-declare var MediaKeySystemAccess: {
- prototype: MediaKeySystemAccess;
- new(): MediaKeySystemAccess;
-}
-
-interface MediaKeys {
- createSession(sessionType?: string): MediaKeySession;
- setServerCertificate(serverCertificate: any): PromiseLike<void>;
-}
-
-declare var MediaKeys: {
- prototype: MediaKeys;
- new(): MediaKeys;
-}
-
-interface MediaList {
- readonly length: number;
- mediaText: string;
- appendMedium(newMedium: string): void;
- deleteMedium(oldMedium: string): void;
- item(index: number): string;
- toString(): string;
- [index: number]: string;
-}
-
-declare var MediaList: {
- prototype: MediaList;
- new(): MediaList;
-}
-
-interface MediaQueryList {
- readonly matches: boolean;
- readonly media: string;
- addListener(listener: MediaQueryListListener): void;
- removeListener(listener: MediaQueryListListener): void;
-}
-
-declare var MediaQueryList: {
- prototype: MediaQueryList;
- new(): MediaQueryList;
-}
-
-interface MediaSource extends EventTarget {
- readonly activeSourceBuffers: SourceBufferList;
- duration: number;
- readonly readyState: string;
- readonly sourceBuffers: SourceBufferList;
- addSourceBuffer(type: string): SourceBuffer;
- endOfStream(error?: number): void;
- removeSourceBuffer(sourceBuffer: SourceBuffer): void;
-}
-
-declare var MediaSource: {
- prototype: MediaSource;
- new(): MediaSource;
- isTypeSupported(type: string): boolean;
-}
-
-interface MediaStreamEventMap {
- "active": Event;
- "addtrack": TrackEvent;
- "inactive": Event;
- "removetrack": TrackEvent;
-}
-
-interface MediaStream extends EventTarget {
- readonly active: boolean;
- readonly id: string;
- onactive: (this: MediaStream, ev: Event) => any;
- onaddtrack: (this: MediaStream, ev: TrackEvent) => any;
- oninactive: (this: MediaStream, ev: Event) => any;
- onremovetrack: (this: MediaStream, ev: TrackEvent) => any;
- addTrack(track: MediaStreamTrack): void;
- clone(): MediaStream;
- getAudioTracks(): MediaStreamTrack[];
- getTrackById(trackId: string): MediaStreamTrack | null;
- getTracks(): MediaStreamTrack[];
- getVideoTracks(): MediaStreamTrack[];
- removeTrack(track: MediaStreamTrack): void;
- stop(): void;
- addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStream: {
- prototype: MediaStream;
- new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
-}
-
-interface MediaStreamAudioSourceNode extends AudioNode {
-}
-
-declare var MediaStreamAudioSourceNode: {
- prototype: MediaStreamAudioSourceNode;
- new(): MediaStreamAudioSourceNode;
-}
-
-interface MediaStreamError {
- readonly constraintName: string | null;
- readonly message: string | null;
- readonly name: string;
-}
-
-declare var MediaStreamError: {
- prototype: MediaStreamError;
- new(): MediaStreamError;
-}
-
-interface MediaStreamErrorEvent extends Event {
- readonly error: MediaStreamError | null;
-}
-
-declare var MediaStreamErrorEvent: {
- prototype: MediaStreamErrorEvent;
- new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
-}
-
-interface MediaStreamTrackEventMap {
- "ended": MediaStreamErrorEvent;
- "mute": Event;
- "overconstrained": MediaStreamErrorEvent;
- "unmute": Event;
-}
-
-interface MediaStreamTrack extends EventTarget {
- enabled: boolean;
- readonly id: string;
- readonly kind: string;
- readonly label: string;
- readonly muted: boolean;
- onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onmute: (this: MediaStreamTrack, ev: Event) => any;
- onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onunmute: (this: MediaStreamTrack, ev: Event) => any;
- readonly readonly: boolean;
- readonly readyState: string;
- readonly remote: boolean;
- applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
- clone(): MediaStreamTrack;
- getCapabilities(): MediaTrackCapabilities;
- getConstraints(): MediaTrackConstraints;
- getSettings(): MediaTrackSettings;
- stop(): void;
- addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStreamTrack: {
- prototype: MediaStreamTrack;
- new(): MediaStreamTrack;
-}
-
-interface MediaStreamTrackEvent extends Event {
- readonly track: MediaStreamTrack;
-}
-
-declare var MediaStreamTrackEvent: {
- prototype: MediaStreamTrackEvent;
- new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
-}
-
-interface MessageChannel {
- readonly port1: MessagePort;
- readonly port2: MessagePort;
-}
-
-declare var MessageChannel: {
- prototype: MessageChannel;
- new(): MessageChannel;
-}
-
-interface MessageEvent extends Event {
- readonly data: any;
- readonly origin: string;
- readonly ports: any;
- readonly source: Window;
- initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
-}
-
-declare var MessageEvent: {
- prototype: MessageEvent;
- new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
-}
-
-interface MessagePortEventMap {
- "message": MessageEvent;
-}
-
-interface MessagePort extends EventTarget {
- onmessage: (this: MessagePort, ev: MessageEvent) => any;
- close(): void;
- postMessage(message?: any, ports?: any): void;
- start(): void;
- addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MessagePort: {
- prototype: MessagePort;
- new(): MessagePort;
-}
-
-interface MimeType {
- readonly description: string;
- readonly enabledPlugin: Plugin;
- readonly suffixes: string;
- readonly type: string;
-}
-
-declare var MimeType: {
- prototype: MimeType;
- new(): MimeType;
-}
-
-interface MimeTypeArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(type: string): Plugin;
- [index: number]: Plugin;
-}
-
-declare var MimeTypeArray: {
- prototype: MimeTypeArray;
- new(): MimeTypeArray;
-}
-
-interface MouseEvent extends UIEvent {
- readonly altKey: boolean;
- readonly button: number;
- readonly buttons: number;
- readonly clientX: number;
- readonly clientY: number;
- readonly ctrlKey: boolean;
- readonly fromElement: Element;
- readonly layerX: number;
- readonly layerY: number;
- readonly metaKey: boolean;
- readonly movementX: number;
- readonly movementY: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly relatedTarget: EventTarget;
- readonly screenX: number;
- readonly screenY: number;
- readonly shiftKey: boolean;
- readonly toElement: Element;
- readonly which: number;
- readonly x: number;
- readonly y: number;
- getModifierState(keyArg: string): boolean;
- initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
-}
-
-declare var MouseEvent: {
- prototype: MouseEvent;
- new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
-}
-
-interface MutationEvent extends Event {
- readonly attrChange: number;
- readonly attrName: string;
- readonly newValue: string;
- readonly prevValue: string;
- readonly relatedNode: Node;
- initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-declare var MutationEvent: {
- prototype: MutationEvent;
- new(): MutationEvent;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-interface MutationObserver {
- disconnect(): void;
- observe(target: Node, options: MutationObserverInit): void;
- takeRecords(): MutationRecord[];
-}
-
-declare var MutationObserver: {
- prototype: MutationObserver;
- new(callback: MutationCallback): MutationObserver;
-}
-
-interface MutationRecord {
- readonly addedNodes: NodeList;
- readonly attributeName: string | null;
- readonly attributeNamespace: string | null;
- readonly nextSibling: Node | null;
- readonly oldValue: string | null;
- readonly previousSibling: Node | null;
- readonly removedNodes: NodeList;
- readonly target: Node;
- readonly type: string;
-}
-
-declare var MutationRecord: {
- prototype: MutationRecord;
- new(): MutationRecord;
-}
-
-interface NamedNodeMap {
- readonly length: number;
- getNamedItem(name: string): Attr;
- getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- item(index: number): Attr;
- removeNamedItem(name: string): Attr;
- removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- setNamedItem(arg: Attr): Attr;
- setNamedItemNS(arg: Attr): Attr;
- [index: number]: Attr;
-}
-
-declare var NamedNodeMap: {
- prototype: NamedNodeMap;
- new(): NamedNodeMap;
-}
-
-interface NavigationCompletedEvent extends NavigationEvent {
- readonly isSuccess: boolean;
- readonly webErrorStatus: number;
-}
-
-declare var NavigationCompletedEvent: {
- prototype: NavigationCompletedEvent;
- new(): NavigationCompletedEvent;
-}
-
-interface NavigationEvent extends Event {
- readonly uri: string;
-}
-
-declare var NavigationEvent: {
- prototype: NavigationEvent;
- new(): NavigationEvent;
-}
-
-interface NavigationEventWithReferrer extends NavigationEvent {
- readonly referer: string;
-}
-
-declare var NavigationEventWithReferrer: {
- prototype: NavigationEventWithReferrer;
- new(): NavigationEventWithReferrer;
-}
-
-interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {
- readonly appCodeName: string;
- readonly cookieEnabled: boolean;
- readonly language: string;
- readonly maxTouchPoints: number;
- readonly mimeTypes: MimeTypeArray;
- readonly msManipulationViewsEnabled: boolean;
- readonly msMaxTouchPoints: number;
- readonly msPointerEnabled: boolean;
- readonly plugins: PluginArray;
- readonly pointerEnabled: boolean;
- readonly webdriver: boolean;
- readonly hardwareConcurrency: number;
- getGamepads(): Gamepad[];
- javaEnabled(): boolean;
- msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
- requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
- vibrate(pattern: number | number[]): boolean;
-}
-
-declare var Navigator: {
- prototype: Navigator;
- new(): Navigator;
-}
-
-interface Node extends EventTarget {
- readonly attributes: NamedNodeMap;
- readonly baseURI: string | null;
- readonly childNodes: NodeList;
- readonly firstChild: Node | null;
- readonly lastChild: Node | null;
- readonly localName: string | null;
- readonly namespaceURI: string | null;
- readonly nextSibling: Node | null;
- readonly nodeName: string;
- readonly nodeType: number;
- nodeValue: string | null;
- readonly ownerDocument: Document;
- readonly parentElement: HTMLElement | null;
- readonly parentNode: Node | null;
- readonly previousSibling: Node | null;
- textContent: string | null;
- appendChild(newChild: Node): Node;
- cloneNode(deep?: boolean): Node;
- compareDocumentPosition(other: Node): number;
- contains(child: Node): boolean;
- hasAttributes(): boolean;
- hasChildNodes(): boolean;
- insertBefore(newChild: Node, refChild: Node | null): Node;
- isDefaultNamespace(namespaceURI: string | null): boolean;
- isEqualNode(arg: Node): boolean;
- isSameNode(other: Node): boolean;
- lookupNamespaceURI(prefix: string | null): string | null;
- lookupPrefix(namespaceURI: string | null): string | null;
- normalize(): void;
- removeChild(oldChild: Node): Node;
- replaceChild(newChild: Node, oldChild: Node): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-declare var Node: {
- prototype: Node;
- new(): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-interface NodeFilter {
- acceptNode(n: Node): number;
-}
-
-declare var NodeFilter: {
- readonly FILTER_ACCEPT: number;
- readonly FILTER_REJECT: number;
- readonly FILTER_SKIP: number;
- readonly SHOW_ALL: number;
- readonly SHOW_ATTRIBUTE: number;
- readonly SHOW_CDATA_SECTION: number;
- readonly SHOW_COMMENT: number;
- readonly SHOW_DOCUMENT: number;
- readonly SHOW_DOCUMENT_FRAGMENT: number;
- readonly SHOW_DOCUMENT_TYPE: number;
- readonly SHOW_ELEMENT: number;
- readonly SHOW_ENTITY: number;
- readonly SHOW_ENTITY_REFERENCE: number;
- readonly SHOW_NOTATION: number;
- readonly SHOW_PROCESSING_INSTRUCTION: number;
- readonly SHOW_TEXT: number;
-}
-
-interface NodeIterator {
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- detach(): void;
- nextNode(): Node;
- previousNode(): Node;
-}
-
-declare var NodeIterator: {
- prototype: NodeIterator;
- new(): NodeIterator;
-}
-
-interface NodeList {
- readonly length: number;
- item(index: number): Node;
- [index: number]: Node;
-}
-
-declare var NodeList: {
- prototype: NodeList;
- new(): NodeList;
-}
-
-interface OES_element_index_uint {
-}
-
-declare var OES_element_index_uint: {
- prototype: OES_element_index_uint;
- new(): OES_element_index_uint;
-}
-
-interface OES_standard_derivatives {
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-declare var OES_standard_derivatives: {
- prototype: OES_standard_derivatives;
- new(): OES_standard_derivatives;
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-interface OES_texture_float {
-}
-
-declare var OES_texture_float: {
- prototype: OES_texture_float;
- new(): OES_texture_float;
-}
-
-interface OES_texture_float_linear {
-}
-
-declare var OES_texture_float_linear: {
- prototype: OES_texture_float_linear;
- new(): OES_texture_float_linear;
-}
-
-interface OfflineAudioCompletionEvent extends Event {
- readonly renderedBuffer: AudioBuffer;
-}
-
-declare var OfflineAudioCompletionEvent: {
- prototype: OfflineAudioCompletionEvent;
- new(): OfflineAudioCompletionEvent;
-}
-
-interface OfflineAudioContextEventMap {
- "complete": Event;
-}
-
-interface OfflineAudioContext extends AudioContext {
- oncomplete: (this: OfflineAudioContext, ev: Event) => any;
- startRendering(): PromiseLike<AudioBuffer>;
- addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OfflineAudioContext: {
- prototype: OfflineAudioContext;
- new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
-
-interface OscillatorNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface OscillatorNode extends AudioNode {
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
- type: string;
- setPeriodicWave(periodicWave: PeriodicWave): void;
- start(when?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OscillatorNode: {
- prototype: OscillatorNode;
- new(): OscillatorNode;
-}
-
-interface OverflowEvent extends UIEvent {
- readonly horizontalOverflow: boolean;
- readonly orient: number;
- readonly verticalOverflow: boolean;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-declare var OverflowEvent: {
- prototype: OverflowEvent;
- new(): OverflowEvent;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-interface PageTransitionEvent extends Event {
- readonly persisted: boolean;
-}
-
-declare var PageTransitionEvent: {
- prototype: PageTransitionEvent;
- new(): PageTransitionEvent;
-}
-
-interface PannerNode extends AudioNode {
- coneInnerAngle: number;
- coneOuterAngle: number;
- coneOuterGain: number;
- distanceModel: string;
- maxDistance: number;
- panningModel: string;
- refDistance: number;
- rolloffFactor: number;
- setOrientation(x: number, y: number, z: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var PannerNode: {
- prototype: PannerNode;
- new(): PannerNode;
-}
-
-interface PerfWidgetExternal {
- readonly activeNetworkRequestCount: number;
- readonly averageFrameTime: number;
- readonly averagePaintTime: number;
- readonly extraInformationEnabled: boolean;
- readonly independentRenderingEnabled: boolean;
- readonly irDisablingContentString: string;
- readonly irStatusAvailable: boolean;
- readonly maxCpuSpeed: number;
- readonly paintRequestsPerSecond: number;
- readonly performanceCounter: number;
- readonly performanceCounterFrequency: number;
- addEventListener(eventType: string, callback: Function): void;
- getMemoryUsage(): number;
- getProcessCpuUsage(): number;
- getRecentCpuUsage(last: number | null): any;
- getRecentFrames(last: number | null): any;
- getRecentMemoryUsage(last: number | null): any;
- getRecentPaintRequests(last: number | null): any;
- removeEventListener(eventType: string, callback: Function): void;
- repositionWindow(x: number, y: number): void;
- resizeWindow(width: number, height: number): void;
-}
-
-declare var PerfWidgetExternal: {
- prototype: PerfWidgetExternal;
- new(): PerfWidgetExternal;
-}
-
-interface Performance {
- readonly navigation: PerformanceNavigation;
- readonly timing: PerformanceTiming;
- clearMarks(markName?: string): void;
- clearMeasures(measureName?: string): void;
- clearResourceTimings(): void;
- getEntries(): any;
- getEntriesByName(name: string, entryType?: string): any;
- getEntriesByType(entryType: string): any;
- getMarks(markName?: string): any;
- getMeasures(measureName?: string): any;
- mark(markName: string): void;
- measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
- now(): number;
- setResourceTimingBufferSize(maxSize: number): void;
- toJSON(): any;
-}
-
-declare var Performance: {
- prototype: Performance;
- new(): Performance;
-}
-
-interface PerformanceEntry {
- readonly duration: number;
- readonly entryType: string;
- readonly name: string;
- readonly startTime: number;
-}
-
-declare var PerformanceEntry: {
- prototype: PerformanceEntry;
- new(): PerformanceEntry;
-}
-
-interface PerformanceMark extends PerformanceEntry {
-}
-
-declare var PerformanceMark: {
- prototype: PerformanceMark;
- new(): PerformanceMark;
-}
-
-interface PerformanceMeasure extends PerformanceEntry {
-}
-
-declare var PerformanceMeasure: {
- prototype: PerformanceMeasure;
- new(): PerformanceMeasure;
-}
-
-interface PerformanceNavigation {
- readonly redirectCount: number;
- readonly type: number;
- toJSON(): any;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-declare var PerformanceNavigation: {
- prototype: PerformanceNavigation;
- new(): PerformanceNavigation;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-interface PerformanceNavigationTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly navigationStart: number;
- readonly redirectCount: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly type: string;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
-}
-
-declare var PerformanceNavigationTiming: {
- prototype: PerformanceNavigationTiming;
- new(): PerformanceNavigationTiming;
-}
-
-interface PerformanceResourceTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly initiatorType: string;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
-}
-
-declare var PerformanceResourceTiming: {
- prototype: PerformanceResourceTiming;
- new(): PerformanceResourceTiming;
-}
-
-interface PerformanceTiming {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly msFirstPaint: number;
- readonly navigationStart: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
- readonly secureConnectionStart: number;
- toJSON(): any;
-}
-
-declare var PerformanceTiming: {
- prototype: PerformanceTiming;
- new(): PerformanceTiming;
-}
-
-interface PeriodicWave {
-}
-
-declare var PeriodicWave: {
- prototype: PeriodicWave;
- new(): PeriodicWave;
-}
-
-interface PermissionRequest extends DeferredPermissionRequest {
- readonly state: string;
- defer(): void;
-}
-
-declare var PermissionRequest: {
- prototype: PermissionRequest;
- new(): PermissionRequest;
-}
-
-interface PermissionRequestedEvent extends Event {
- readonly permissionRequest: PermissionRequest;
-}
-
-declare var PermissionRequestedEvent: {
- prototype: PermissionRequestedEvent;
- new(): PermissionRequestedEvent;
-}
-
-interface Plugin {
- readonly description: string;
- readonly filename: string;
- readonly length: number;
- readonly name: string;
- readonly version: string;
- item(index: number): MimeType;
- namedItem(type: string): MimeType;
- [index: number]: MimeType;
-}
-
-declare var Plugin: {
- prototype: Plugin;
- new(): Plugin;
-}
-
-interface PluginArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(name: string): Plugin;
- refresh(reload?: boolean): void;
- [index: number]: Plugin;
-}
-
-declare var PluginArray: {
- prototype: PluginArray;
- new(): PluginArray;
-}
-
-interface PointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var PointerEvent: {
- prototype: PointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
-
-interface PopStateEvent extends Event {
- readonly state: any;
- initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
-}
-
-declare var PopStateEvent: {
- prototype: PopStateEvent;
- new(): PopStateEvent;
-}
-
-interface Position {
- readonly coords: Coordinates;
- readonly timestamp: number;
-}
-
-declare var Position: {
- prototype: Position;
- new(): Position;
-}
-
-interface PositionError {
- readonly code: number;
- readonly message: string;
- toString(): string;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-declare var PositionError: {
- prototype: PositionError;
- new(): PositionError;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-interface ProcessingInstruction extends CharacterData {
- readonly target: string;
-}
-
-declare var ProcessingInstruction: {
- prototype: ProcessingInstruction;
- new(): ProcessingInstruction;
-}
-
-interface ProgressEvent extends Event {
- readonly lengthComputable: boolean;
- readonly loaded: number;
- readonly total: number;
- initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
-}
-
-declare var ProgressEvent: {
- prototype: ProgressEvent;
- new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
-
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
-}
-
-declare var RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtlsTransportEventMap {
- "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
- "error": ErrorEvent;
-}
-
-interface RTCDtlsTransport extends RTCStatsProvider {
- ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
- onerror: ((this: RTCDtlsTransport, ev: ErrorEvent) => any) | null;
- readonly state: string;
- readonly transport: RTCIceTransport;
- getLocalParameters(): RTCDtlsParameters;
- getRemoteCertificates(): ArrayBuffer[];
- getRemoteParameters(): RTCDtlsParameters | null;
- start(remoteParameters: RTCDtlsParameters): void;
- stop(): void;
- addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtlsTransport: {
- prototype: RTCDtlsTransport;
- new(transport: RTCIceTransport): RTCDtlsTransport;
-}
-
-interface RTCDtlsTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCDtlsTransportStateChangedEvent: {
- prototype: RTCDtlsTransportStateChangedEvent;
- new(): RTCDtlsTransportStateChangedEvent;
-}
-
-interface RTCDtmfSenderEventMap {
- "tonechange": RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtmfSender extends EventTarget {
- readonly canInsertDTMF: boolean;
- readonly duration: number;
- readonly interToneGap: number;
- ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
- readonly sender: RTCRtpSender;
- readonly toneBuffer: string;
- insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
- addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtmfSender: {
- prototype: RTCDtmfSender;
- new(sender: RTCRtpSender): RTCDtmfSender;
-}
-
-interface RTCIceCandidatePairChangedEvent extends Event {
- readonly pair: RTCIceCandidatePair;
-}
-
-declare var RTCIceCandidatePairChangedEvent: {
- prototype: RTCIceCandidatePairChangedEvent;
- new(): RTCIceCandidatePairChangedEvent;
-}
-
-interface RTCIceGathererEventMap {
- "error": ErrorEvent;
- "localcandidate": RTCIceGathererEvent;
-}
-
-interface RTCIceGatherer extends RTCStatsProvider {
- readonly component: string;
- onerror: ((this: RTCIceGatherer, ev: ErrorEvent) => any) | null;
- onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
- createAssociatedGatherer(): RTCIceGatherer;
- getLocalCandidates(): RTCIceCandidate[];
- getLocalParameters(): RTCIceParameters;
- addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceGatherer: {
- prototype: RTCIceGatherer;
- new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
-
-interface RTCIceGathererEvent extends Event {
- readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;
-}
-
-declare var RTCIceGathererEvent: {
- prototype: RTCIceGathererEvent;
- new(): RTCIceGathererEvent;
-}
-
-interface RTCIceTransportEventMap {
- "candidatepairchange": RTCIceCandidatePairChangedEvent;
- "icestatechange": RTCIceTransportStateChangedEvent;
-}
-
-interface RTCIceTransport extends RTCStatsProvider {
- readonly component: string;
- readonly iceGatherer: RTCIceGatherer | null;
- oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
- onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
- readonly role: string;
- readonly state: string;
- addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;
- createAssociatedTransport(): RTCIceTransport;
- getNominatedCandidatePair(): RTCIceCandidatePair | null;
- getRemoteCandidates(): RTCIceCandidate[];
- getRemoteParameters(): RTCIceParameters | null;
- setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;
- start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;
- stop(): void;
- addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceTransport: {
- prototype: RTCIceTransport;
- new(): RTCIceTransport;
-}
-
-interface RTCIceTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCIceTransportStateChangedEvent: {
- prototype: RTCIceTransportStateChangedEvent;
- new(): RTCIceTransportStateChangedEvent;
-}
-
-interface RTCRtpReceiverEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCRtpReceiver extends RTCStatsProvider {
- onerror: ((this: RTCRtpReceiver, ev: ErrorEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack | null;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- getContributingSources(): RTCRtpContributingSource[];
- receive(parameters: RTCRtpParameters): void;
- requestSendCSRC(csrc: number): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpReceiver: {
- prototype: RTCRtpReceiver;
- new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCRtpSenderEventMap {
- "error": ErrorEvent;
- "ssrcconflict": RTCSsrcConflictEvent;
-}
-
-interface RTCRtpSender extends RTCStatsProvider {
- onerror: ((this: RTCRtpSender, ev: ErrorEvent) => any) | null;
- onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- send(parameters: RTCRtpParameters): void;
- setTrack(track: MediaStreamTrack): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpSender: {
- prototype: RTCRtpSender;
- new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCSrtpSdesTransportEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCSrtpSdesTransport extends EventTarget {
- onerror: ((this: RTCSrtpSdesTransport, ev: ErrorEvent) => any) | null;
- readonly transport: RTCIceTransport;
- addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCSrtpSdesTransport: {
- prototype: RTCSrtpSdesTransport;
- new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
- getLocalParameters(): RTCSrtpSdesParameters[];
-}
-
-interface RTCSsrcConflictEvent extends Event {
- readonly ssrc: number;
-}
-
-declare var RTCSsrcConflictEvent: {
- prototype: RTCSsrcConflictEvent;
- new(): RTCSsrcConflictEvent;
-}
-
-interface RTCStatsProvider extends EventTarget {
- getStats(): PromiseLike<RTCStatsReport>;
- msGetStats(): PromiseLike<RTCStatsReport>;
-}
-
-declare var RTCStatsProvider: {
- prototype: RTCStatsProvider;
- new(): RTCStatsProvider;
-}
-
-interface Range {
- readonly collapsed: boolean;
- readonly commonAncestorContainer: Node;
- readonly endContainer: Node;
- readonly endOffset: number;
- readonly startContainer: Node;
- readonly startOffset: number;
- cloneContents(): DocumentFragment;
- cloneRange(): Range;
- collapse(toStart: boolean): void;
- compareBoundaryPoints(how: number, sourceRange: Range): number;
- createContextualFragment(fragment: string): DocumentFragment;
- deleteContents(): void;
- detach(): void;
- expand(Unit: string): boolean;
- extractContents(): DocumentFragment;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- insertNode(newNode: Node): void;
- selectNode(refNode: Node): void;
- selectNodeContents(refNode: Node): void;
- setEnd(refNode: Node, offset: number): void;
- setEndAfter(refNode: Node): void;
- setEndBefore(refNode: Node): void;
- setStart(refNode: Node, offset: number): void;
- setStartAfter(refNode: Node): void;
- setStartBefore(refNode: Node): void;
- surroundContents(newParent: Node): void;
- toString(): string;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-declare var Range: {
- prototype: Range;
- new(): Range;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly target: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGAElement: {
- prototype: SVGAElement;
- new(): SVGAElement;
-}
-
-interface SVGAngle {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-declare var SVGAngle: {
- prototype: SVGAngle;
- new(): SVGAngle;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-interface SVGAnimatedAngle {
- readonly animVal: SVGAngle;
- readonly baseVal: SVGAngle;
-}
-
-declare var SVGAnimatedAngle: {
- prototype: SVGAnimatedAngle;
- new(): SVGAnimatedAngle;
-}
-
-interface SVGAnimatedBoolean {
- readonly animVal: boolean;
- baseVal: boolean;
-}
-
-declare var SVGAnimatedBoolean: {
- prototype: SVGAnimatedBoolean;
- new(): SVGAnimatedBoolean;
-}
-
-interface SVGAnimatedEnumeration {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedEnumeration: {
- prototype: SVGAnimatedEnumeration;
- new(): SVGAnimatedEnumeration;
-}
-
-interface SVGAnimatedInteger {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedInteger: {
- prototype: SVGAnimatedInteger;
- new(): SVGAnimatedInteger;
-}
-
-interface SVGAnimatedLength {
- readonly animVal: SVGLength;
- readonly baseVal: SVGLength;
-}
-
-declare var SVGAnimatedLength: {
- prototype: SVGAnimatedLength;
- new(): SVGAnimatedLength;
-}
-
-interface SVGAnimatedLengthList {
- readonly animVal: SVGLengthList;
- readonly baseVal: SVGLengthList;
-}
-
-declare var SVGAnimatedLengthList: {
- prototype: SVGAnimatedLengthList;
- new(): SVGAnimatedLengthList;
-}
-
-interface SVGAnimatedNumber {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedNumber: {
- prototype: SVGAnimatedNumber;
- new(): SVGAnimatedNumber;
-}
-
-interface SVGAnimatedNumberList {
- readonly animVal: SVGNumberList;
- readonly baseVal: SVGNumberList;
-}
-
-declare var SVGAnimatedNumberList: {
- prototype: SVGAnimatedNumberList;
- new(): SVGAnimatedNumberList;
-}
-
-interface SVGAnimatedPreserveAspectRatio {
- readonly animVal: SVGPreserveAspectRatio;
- readonly baseVal: SVGPreserveAspectRatio;
-}
-
-declare var SVGAnimatedPreserveAspectRatio: {
- prototype: SVGAnimatedPreserveAspectRatio;
- new(): SVGAnimatedPreserveAspectRatio;
-}
-
-interface SVGAnimatedRect {
- readonly animVal: SVGRect;
- readonly baseVal: SVGRect;
-}
-
-declare var SVGAnimatedRect: {
- prototype: SVGAnimatedRect;
- new(): SVGAnimatedRect;
-}
-
-interface SVGAnimatedString {
- readonly animVal: string;
- baseVal: string;
-}
-
-declare var SVGAnimatedString: {
- prototype: SVGAnimatedString;
- new(): SVGAnimatedString;
-}
-
-interface SVGAnimatedTransformList {
- readonly animVal: SVGTransformList;
- readonly baseVal: SVGTransformList;
-}
-
-declare var SVGAnimatedTransformList: {
- prototype: SVGAnimatedTransformList;
- new(): SVGAnimatedTransformList;
-}
-
-interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGCircleElement: {
- prototype: SVGCircleElement;
- new(): SVGCircleElement;
-}
-
-interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly clipPathUnits: SVGAnimatedEnumeration;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGClipPathElement: {
- prototype: SVGClipPathElement;
- new(): SVGClipPathElement;
-}
-
-interface SVGComponentTransferFunctionElement extends SVGElement {
- readonly amplitude: SVGAnimatedNumber;
- readonly exponent: SVGAnimatedNumber;
- readonly intercept: SVGAnimatedNumber;
- readonly offset: SVGAnimatedNumber;
- readonly slope: SVGAnimatedNumber;
- readonly tableValues: SVGAnimatedNumberList;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGComponentTransferFunctionElement: {
- prototype: SVGComponentTransferFunctionElement;
- new(): SVGComponentTransferFunctionElement;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
-}
-
-interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDefsElement: {
- prototype: SVGDefsElement;
- new(): SVGDefsElement;
-}
-
-interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDescElement: {
- prototype: SVGDescElement;
- new(): SVGDescElement;
-}
-
-interface SVGElementEventMap extends ElementEventMap {
- "click": MouseEvent;
- "dblclick": MouseEvent;
- "focusin": FocusEvent;
- "focusout": FocusEvent;
- "load": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
-}
-
-interface SVGElement extends Element {
- onclick: (this: SVGElement, ev: MouseEvent) => any;
- ondblclick: (this: SVGElement, ev: MouseEvent) => any;
- onfocusin: (this: SVGElement, ev: FocusEvent) => any;
- onfocusout: (this: SVGElement, ev: FocusEvent) => any;
- onload: (this: SVGElement, ev: Event) => any;
- onmousedown: (this: SVGElement, ev: MouseEvent) => any;
- onmousemove: (this: SVGElement, ev: MouseEvent) => any;
- onmouseout: (this: SVGElement, ev: MouseEvent) => any;
- onmouseover: (this: SVGElement, ev: MouseEvent) => any;
- onmouseup: (this: SVGElement, ev: MouseEvent) => any;
- readonly ownerSVGElement: SVGSVGElement;
- readonly viewportElement: SVGElement;
- xmlbase: string;
- className: any;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGElement: {
- prototype: SVGElement;
- new(): SVGElement;
-}
-
-interface SVGElementInstance extends EventTarget {
- readonly childNodes: SVGElementInstanceList;
- readonly correspondingElement: SVGElement;
- readonly correspondingUseElement: SVGUseElement;
- readonly firstChild: SVGElementInstance;
- readonly lastChild: SVGElementInstance;
- readonly nextSibling: SVGElementInstance;
- readonly parentNode: SVGElementInstance;
- readonly previousSibling: SVGElementInstance;
-}
-
-declare var SVGElementInstance: {
- prototype: SVGElementInstance;
- new(): SVGElementInstance;
-}
-
-interface SVGElementInstanceList {
- readonly length: number;
- item(index: number): SVGElementInstance;
-}
-
-declare var SVGElementInstanceList: {
- prototype: SVGElementInstanceList;
- new(): SVGElementInstanceList;
-}
-
-interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGEllipseElement: {
- prototype: SVGEllipseElement;
- new(): SVGEllipseElement;
-}
-
-interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly mode: SVGAnimatedEnumeration;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEBlendElement: {
- prototype: SVGFEBlendElement;
- new(): SVGFEBlendElement;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
-}
-
-interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly type: SVGAnimatedEnumeration;
- readonly values: SVGAnimatedNumberList;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEColorMatrixElement: {
- prototype: SVGFEColorMatrixElement;
- new(): SVGFEColorMatrixElement;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
-}
-
-interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEComponentTransferElement: {
- prototype: SVGFEComponentTransferElement;
- new(): SVGFEComponentTransferElement;
-}
-
-interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly k1: SVGAnimatedNumber;
- readonly k2: SVGAnimatedNumber;
- readonly k3: SVGAnimatedNumber;
- readonly k4: SVGAnimatedNumber;
- readonly operator: SVGAnimatedEnumeration;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFECompositeElement: {
- prototype: SVGFECompositeElement;
- new(): SVGFECompositeElement;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
-}
-
-interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly bias: SVGAnimatedNumber;
- readonly divisor: SVGAnimatedNumber;
- readonly edgeMode: SVGAnimatedEnumeration;
- readonly in1: SVGAnimatedString;
- readonly kernelMatrix: SVGAnimatedNumberList;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly orderX: SVGAnimatedInteger;
- readonly orderY: SVGAnimatedInteger;
- readonly preserveAlpha: SVGAnimatedBoolean;
- readonly targetX: SVGAnimatedInteger;
- readonly targetY: SVGAnimatedInteger;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEConvolveMatrixElement: {
- prototype: SVGFEConvolveMatrixElement;
- new(): SVGFEConvolveMatrixElement;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
-}
-
-interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly diffuseConstant: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDiffuseLightingElement: {
- prototype: SVGFEDiffuseLightingElement;
- new(): SVGFEDiffuseLightingElement;
-}
-
-interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly scale: SVGAnimatedNumber;
- readonly xChannelSelector: SVGAnimatedEnumeration;
- readonly yChannelSelector: SVGAnimatedEnumeration;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDisplacementMapElement: {
- prototype: SVGFEDisplacementMapElement;
- new(): SVGFEDisplacementMapElement;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
-}
-
-interface SVGFEDistantLightElement extends SVGElement {
- readonly azimuth: SVGAnimatedNumber;
- readonly elevation: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDistantLightElement: {
- prototype: SVGFEDistantLightElement;
- new(): SVGFEDistantLightElement;
-}
-
-interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEFloodElement: {
- prototype: SVGFEFloodElement;
- new(): SVGFEFloodElement;
-}
-
-interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncAElement: {
- prototype: SVGFEFuncAElement;
- new(): SVGFEFuncAElement;
-}
-
-interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncBElement: {
- prototype: SVGFEFuncBElement;
- new(): SVGFEFuncBElement;
-}
-
-interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncGElement: {
- prototype: SVGFEFuncGElement;
- new(): SVGFEFuncGElement;
-}
-
-interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncRElement: {
- prototype: SVGFEFuncRElement;
- new(): SVGFEFuncRElement;
-}
-
-interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly stdDeviationX: SVGAnimatedNumber;
- readonly stdDeviationY: SVGAnimatedNumber;
- setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEGaussianBlurElement: {
- prototype: SVGFEGaussianBlurElement;
- new(): SVGFEGaussianBlurElement;
-}
-
-interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEImageElement: {
- prototype: SVGFEImageElement;
- new(): SVGFEImageElement;
-}
-
-interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeElement: {
- prototype: SVGFEMergeElement;
- new(): SVGFEMergeElement;
-}
-
-interface SVGFEMergeNodeElement extends SVGElement {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeNodeElement: {
- prototype: SVGFEMergeNodeElement;
- new(): SVGFEMergeNodeElement;
-}
-
-interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly operator: SVGAnimatedEnumeration;
- readonly radiusX: SVGAnimatedNumber;
- readonly radiusY: SVGAnimatedNumber;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMorphologyElement: {
- prototype: SVGFEMorphologyElement;
- new(): SVGFEMorphologyElement;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
-}
-
-interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly dx: SVGAnimatedNumber;
- readonly dy: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEOffsetElement: {
- prototype: SVGFEOffsetElement;
- new(): SVGFEOffsetElement;
-}
-
-interface SVGFEPointLightElement extends SVGElement {
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEPointLightElement: {
- prototype: SVGFEPointLightElement;
- new(): SVGFEPointLightElement;
-}
-
-interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly specularConstant: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpecularLightingElement: {
- prototype: SVGFESpecularLightingElement;
- new(): SVGFESpecularLightingElement;
-}
-
-interface SVGFESpotLightElement extends SVGElement {
- readonly limitingConeAngle: SVGAnimatedNumber;
- readonly pointsAtX: SVGAnimatedNumber;
- readonly pointsAtY: SVGAnimatedNumber;
- readonly pointsAtZ: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpotLightElement: {
- prototype: SVGFESpotLightElement;
- new(): SVGFESpotLightElement;
-}
-
-interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETileElement: {
- prototype: SVGFETileElement;
- new(): SVGFETileElement;
-}
-
-interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly baseFrequencyX: SVGAnimatedNumber;
- readonly baseFrequencyY: SVGAnimatedNumber;
- readonly numOctaves: SVGAnimatedInteger;
- readonly seed: SVGAnimatedNumber;
- readonly stitchTiles: SVGAnimatedEnumeration;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETurbulenceElement: {
- prototype: SVGFETurbulenceElement;
- new(): SVGFETurbulenceElement;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
-}
-
-interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly filterResX: SVGAnimatedInteger;
- readonly filterResY: SVGAnimatedInteger;
- readonly filterUnits: SVGAnimatedEnumeration;
- readonly height: SVGAnimatedLength;
- readonly primitiveUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- setFilterRes(filterResX: number, filterResY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFilterElement: {
- prototype: SVGFilterElement;
- new(): SVGFilterElement;
-}
-
-interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGForeignObjectElement: {
- prototype: SVGForeignObjectElement;
- new(): SVGForeignObjectElement;
-}
-
-interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGElement: {
- prototype: SVGGElement;
- new(): SVGGElement;
-}
-
-interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
- readonly gradientTransform: SVGAnimatedTransformList;
- readonly gradientUnits: SVGAnimatedEnumeration;
- readonly spreadMethod: SVGAnimatedEnumeration;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGradientElement: {
- prototype: SVGGradientElement;
- new(): SVGGradientElement;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
-
-interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly height: SVGAnimatedLength;
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGImageElement: {
- prototype: SVGImageElement;
- new(): SVGImageElement;
-}
-
-interface SVGLength {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-declare var SVGLength: {
- prototype: SVGLength;
- new(): SVGLength;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-interface SVGLengthList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGLength): SVGLength;
- clear(): void;
- getItem(index: number): SVGLength;
- initialize(newItem: SVGLength): SVGLength;
- insertItemBefore(newItem: SVGLength, index: number): SVGLength;
- removeItem(index: number): SVGLength;
- replaceItem(newItem: SVGLength, index: number): SVGLength;
-}
-
-declare var SVGLengthList: {
- prototype: SVGLengthList;
- new(): SVGLengthList;
-}
-
-interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
-
-interface SVGLinearGradientElement extends SVGGradientElement {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
-}
-
-declare var SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
-
-interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- readonly markerHeight: SVGAnimatedLength;
- readonly markerUnits: SVGAnimatedEnumeration;
- readonly markerWidth: SVGAnimatedLength;
- readonly orientAngle: SVGAnimatedAngle;
- readonly orientType: SVGAnimatedEnumeration;
- readonly refX: SVGAnimatedLength;
- readonly refY: SVGAnimatedLength;
- setOrientToAngle(angle: SVGAngle): void;
- setOrientToAuto(): void;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMarkerElement: {
- prototype: SVGMarkerElement;
- new(): SVGMarkerElement;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
-}
-
-interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly maskContentUnits: SVGAnimatedEnumeration;
- readonly maskUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMaskElement: {
- prototype: SVGMaskElement;
- new(): SVGMaskElement;
-}
-
-interface SVGMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- flipX(): SVGMatrix;
- flipY(): SVGMatrix;
- inverse(): SVGMatrix;
- multiply(secondMatrix: SVGMatrix): SVGMatrix;
- rotate(angle: number): SVGMatrix;
- rotateFromVector(x: number, y: number): SVGMatrix;
- scale(scaleFactor: number): SVGMatrix;
- scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
- skewX(angle: number): SVGMatrix;
- skewY(angle: number): SVGMatrix;
- translate(x: number, y: number): SVGMatrix;
-}
-
-declare var SVGMatrix: {
- prototype: SVGMatrix;
- new(): SVGMatrix;
-}
-
-interface SVGMetadataElement extends SVGElement {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMetadataElement: {
- prototype: SVGMetadataElement;
- new(): SVGMetadataElement;
-}
-
-interface SVGNumber {
- value: number;
-}
-
-declare var SVGNumber: {
- prototype: SVGNumber;
- new(): SVGNumber;
-}
-
-interface SVGNumberList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGNumber): SVGNumber;
- clear(): void;
- getItem(index: number): SVGNumber;
- initialize(newItem: SVGNumber): SVGNumber;
- insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
- removeItem(index: number): SVGNumber;
- replaceItem(newItem: SVGNumber, index: number): SVGNumber;
-}
-
-declare var SVGNumberList: {
- prototype: SVGNumberList;
- new(): SVGNumberList;
-}
-
-interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {
- createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
- createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
- createSVGPathSegClosePath(): SVGPathSegClosePath;
- createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
- createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
- createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
- createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
- createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
- createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
- createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
- createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
- createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
- createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
- createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
- createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
- createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
- createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
- createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
- createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
- getPathSegAtLength(distance: number): number;
- getPointAtLength(distance: number): SVGPoint;
- getTotalLength(): number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPathElement: {
- prototype: SVGPathElement;
- new(): SVGPathElement;
-}
-
-interface SVGPathSeg {
- readonly pathSegType: number;
- readonly pathSegTypeAsLetter: string;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-declare var SVGPathSeg: {
- prototype: SVGPathSeg;
- new(): SVGPathSeg;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-interface SVGPathSegArcAbs extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcAbs: {
- prototype: SVGPathSegArcAbs;
- new(): SVGPathSegArcAbs;
-}
-
-interface SVGPathSegArcRel extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcRel: {
- prototype: SVGPathSegArcRel;
- new(): SVGPathSegArcRel;
-}
-
-interface SVGPathSegClosePath extends SVGPathSeg {
-}
-
-declare var SVGPathSegClosePath: {
- prototype: SVGPathSegClosePath;
- new(): SVGPathSegClosePath;
-}
-
-interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicAbs: {
- prototype: SVGPathSegCurvetoCubicAbs;
- new(): SVGPathSegCurvetoCubicAbs;
-}
-
-interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicRel: {
- prototype: SVGPathSegCurvetoCubicRel;
- new(): SVGPathSegCurvetoCubicRel;
-}
-
-interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothAbs: {
- prototype: SVGPathSegCurvetoCubicSmoothAbs;
- new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
-
-interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothRel: {
- prototype: SVGPathSegCurvetoCubicSmoothRel;
- new(): SVGPathSegCurvetoCubicSmoothRel;
-}
-
-interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticAbs: {
- prototype: SVGPathSegCurvetoQuadraticAbs;
- new(): SVGPathSegCurvetoQuadraticAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticRel: {
- prototype: SVGPathSegCurvetoQuadraticRel;
- new(): SVGPathSegCurvetoQuadraticRel;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
- prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
- new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothRel: {
- prototype: SVGPathSegCurvetoQuadraticSmoothRel;
- new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
-
-interface SVGPathSegLinetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoAbs: {
- prototype: SVGPathSegLinetoAbs;
- new(): SVGPathSegLinetoAbs;
-}
-
-interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalAbs: {
- prototype: SVGPathSegLinetoHorizontalAbs;
- new(): SVGPathSegLinetoHorizontalAbs;
-}
-
-interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalRel: {
- prototype: SVGPathSegLinetoHorizontalRel;
- new(): SVGPathSegLinetoHorizontalRel;
-}
-
-interface SVGPathSegLinetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoRel: {
- prototype: SVGPathSegLinetoRel;
- new(): SVGPathSegLinetoRel;
-}
-
-interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalAbs: {
- prototype: SVGPathSegLinetoVerticalAbs;
- new(): SVGPathSegLinetoVerticalAbs;
-}
-
-interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalRel: {
- prototype: SVGPathSegLinetoVerticalRel;
- new(): SVGPathSegLinetoVerticalRel;
-}
-
-interface SVGPathSegList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPathSeg): SVGPathSeg;
- clear(): void;
- getItem(index: number): SVGPathSeg;
- initialize(newItem: SVGPathSeg): SVGPathSeg;
- insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
- removeItem(index: number): SVGPathSeg;
- replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
-}
-
-declare var SVGPathSegList: {
- prototype: SVGPathSegList;
- new(): SVGPathSegList;
-}
-
-interface SVGPathSegMovetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoAbs: {
- prototype: SVGPathSegMovetoAbs;
- new(): SVGPathSegMovetoAbs;
-}
-
-interface SVGPathSegMovetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoRel: {
- prototype: SVGPathSegMovetoRel;
- new(): SVGPathSegMovetoRel;
-}
-
-interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly patternContentUnits: SVGAnimatedEnumeration;
- readonly patternTransform: SVGAnimatedTransformList;
- readonly patternUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPatternElement: {
- prototype: SVGPatternElement;
- new(): SVGPatternElement;
-}
-
-interface SVGPoint {
- x: number;
- y: number;
- matrixTransform(matrix: SVGMatrix): SVGPoint;
-}
-
-declare var SVGPoint: {
- prototype: SVGPoint;
- new(): SVGPoint;
-}
-
-interface SVGPointList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPoint): SVGPoint;
- clear(): void;
- getItem(index: number): SVGPoint;
- initialize(newItem: SVGPoint): SVGPoint;
- insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
- removeItem(index: number): SVGPoint;
- replaceItem(newItem: SVGPoint, index: number): SVGPoint;
-}
-
-declare var SVGPointList: {
- prototype: SVGPointList;
- new(): SVGPointList;
-}
-
-interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolygonElement: {
- prototype: SVGPolygonElement;
- new(): SVGPolygonElement;
-}
-
-interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolylineElement: {
- prototype: SVGPolylineElement;
- new(): SVGPolylineElement;
-}
-
-interface SVGPreserveAspectRatio {
- align: number;
- meetOrSlice: number;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-declare var SVGPreserveAspectRatio: {
- prototype: SVGPreserveAspectRatio;
- new(): SVGPreserveAspectRatio;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-interface SVGRadialGradientElement extends SVGGradientElement {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly fx: SVGAnimatedLength;
- readonly fy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
-}
-
-declare var SVGRadialGradientElement: {
- prototype: SVGRadialGradientElement;
- new(): SVGRadialGradientElement;
-}
-
-interface SVGRect {
- height: number;
- width: number;
- x: number;
- y: number;
-}
-
-declare var SVGRect: {
- prototype: SVGRect;
- new(): SVGRect;
-}
-
-interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGRectElement: {
- prototype: SVGRectElement;
- new(): SVGRectElement;
-}
-
-interface SVGSVGElementEventMap extends SVGElementEventMap {
- "SVGAbort": Event;
- "SVGError": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "SVGUnload": Event;
- "SVGZoom": SVGZoomEvent;
-}
-
-interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- contentScriptType: string;
- contentStyleType: string;
- currentScale: number;
- readonly currentTranslate: SVGPoint;
- readonly height: SVGAnimatedLength;
- onabort: (this: SVGSVGElement, ev: Event) => any;
- onerror: (this: SVGSVGElement, ev: Event) => any;
- onresize: (this: SVGSVGElement, ev: UIEvent) => any;
- onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
- onunload: (this: SVGSVGElement, ev: Event) => any;
- onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
- readonly pixelUnitToMillimeterX: number;
- readonly pixelUnitToMillimeterY: number;
- readonly screenPixelToMillimeterX: number;
- readonly screenPixelToMillimeterY: number;
- readonly viewport: SVGRect;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
- checkIntersection(element: SVGElement, rect: SVGRect): boolean;
- createSVGAngle(): SVGAngle;
- createSVGLength(): SVGLength;
- createSVGMatrix(): SVGMatrix;
- createSVGNumber(): SVGNumber;
- createSVGPoint(): SVGPoint;
- createSVGRect(): SVGRect;
- createSVGTransform(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- deselectAll(): void;
- forceRedraw(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getCurrentTime(): number;
- getElementById(elementId: string): Element;
- getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- pauseAnimations(): void;
- setCurrentTime(seconds: number): void;
- suspendRedraw(maxWaitMilliseconds: number): number;
- unpauseAnimations(): void;
- unsuspendRedraw(suspendHandleID: number): void;
- unsuspendRedrawAll(): void;
- addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSVGElement: {
- prototype: SVGSVGElement;
- new(): SVGSVGElement;
-}
-
-interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGScriptElement: {
- prototype: SVGScriptElement;
- new(): SVGScriptElement;
-}
-
-interface SVGStopElement extends SVGElement, SVGStylable {
- readonly offset: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStopElement: {
- prototype: SVGStopElement;
- new(): SVGStopElement;
-}
-
-interface SVGStringList {
- readonly numberOfItems: number;
- appendItem(newItem: string): string;
- clear(): void;
- getItem(index: number): string;
- initialize(newItem: string): string;
- insertItemBefore(newItem: string, index: number): string;
- removeItem(index: number): string;
- replaceItem(newItem: string, index: number): string;
-}
-
-declare var SVGStringList: {
- prototype: SVGStringList;
- new(): SVGStringList;
-}
-
-interface SVGStyleElement extends SVGElement, SVGLangSpace {
- disabled: boolean;
- media: string;
- title: string;
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStyleElement: {
- prototype: SVGStyleElement;
- new(): SVGStyleElement;
-}
-
-interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSwitchElement: {
- prototype: SVGSwitchElement;
- new(): SVGSwitchElement;
-}
-
-interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSymbolElement: {
- prototype: SVGSymbolElement;
- new(): SVGSymbolElement;
-}
-
-interface SVGTSpanElement extends SVGTextPositioningElement {
-}
-
-declare var SVGTSpanElement: {
- prototype: SVGTSpanElement;
- new(): SVGTSpanElement;
-}
-
-interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly lengthAdjust: SVGAnimatedEnumeration;
- readonly textLength: SVGAnimatedLength;
- getCharNumAtPosition(point: SVGPoint): number;
- getComputedTextLength(): number;
- getEndPositionOfChar(charnum: number): SVGPoint;
- getExtentOfChar(charnum: number): SVGRect;
- getNumberOfChars(): number;
- getRotationOfChar(charnum: number): number;
- getStartPositionOfChar(charnum: number): SVGPoint;
- getSubStringLength(charnum: number, nchars: number): number;
- selectSubString(charnum: number, nchars: number): void;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTextContentElement: {
- prototype: SVGTextContentElement;
- new(): SVGTextContentElement;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
-}
-
-interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
-}
-
-declare var SVGTextElement: {
- prototype: SVGTextElement;
- new(): SVGTextElement;
-}
-
-interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
- readonly method: SVGAnimatedEnumeration;
- readonly spacing: SVGAnimatedEnumeration;
- readonly startOffset: SVGAnimatedLength;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-declare var SVGTextPathElement: {
- prototype: SVGTextPathElement;
- new(): SVGTextPathElement;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-interface SVGTextPositioningElement extends SVGTextContentElement {
- readonly dx: SVGAnimatedLengthList;
- readonly dy: SVGAnimatedLengthList;
- readonly rotate: SVGAnimatedNumberList;
- readonly x: SVGAnimatedLengthList;
- readonly y: SVGAnimatedLengthList;
-}
-
-declare var SVGTextPositioningElement: {
- prototype: SVGTextPositioningElement;
- new(): SVGTextPositioningElement;
-}
-
-interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTitleElement: {
- prototype: SVGTitleElement;
- new(): SVGTitleElement;
-}
-
-interface SVGTransform {
- readonly angle: number;
- readonly matrix: SVGMatrix;
- readonly type: number;
- setMatrix(matrix: SVGMatrix): void;
- setRotate(angle: number, cx: number, cy: number): void;
- setScale(sx: number, sy: number): void;
- setSkewX(angle: number): void;
- setSkewY(angle: number): void;
- setTranslate(tx: number, ty: number): void;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-declare var SVGTransform: {
- prototype: SVGTransform;
- new(): SVGTransform;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-interface SVGTransformList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGTransform): SVGTransform;
- clear(): void;
- consolidate(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- getItem(index: number): SVGTransform;
- initialize(newItem: SVGTransform): SVGTransform;
- insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
- removeItem(index: number): SVGTransform;
- replaceItem(newItem: SVGTransform, index: number): SVGTransform;
-}
-
-declare var SVGTransformList: {
- prototype: SVGTransformList;
- new(): SVGTransformList;
-}
-
-interface SVGUnitTypes {
- readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
- readonly SVG_UNIT_TYPE_UNKNOWN: number;
- readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
-}
-declare var SVGUnitTypes: SVGUnitTypes;
-
-interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly animatedInstanceRoot: SVGElementInstance;
- readonly height: SVGAnimatedLength;
- readonly instanceRoot: SVGElementInstance;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGUseElement: {
- prototype: SVGUseElement;
- new(): SVGUseElement;
-}
-
-interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- readonly viewTarget: SVGStringList;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGViewElement: {
- prototype: SVGViewElement;
- new(): SVGViewElement;
-}
-
-interface SVGZoomAndPan {
- readonly zoomAndPan: number;
-}
-
-declare var SVGZoomAndPan: {
- readonly SVG_ZOOMANDPAN_DISABLE: number;
- readonly SVG_ZOOMANDPAN_MAGNIFY: number;
- readonly SVG_ZOOMANDPAN_UNKNOWN: number;
-}
-
-interface SVGZoomEvent extends UIEvent {
- readonly newScale: number;
- readonly newTranslate: SVGPoint;
- readonly previousScale: number;
- readonly previousTranslate: SVGPoint;
- readonly zoomRectScreen: SVGRect;
-}
-
-declare var SVGZoomEvent: {
- prototype: SVGZoomEvent;
- new(): SVGZoomEvent;
-}
-
-interface ScreenEventMap {
- "MSOrientationChange": Event;
-}
-
-interface Screen extends EventTarget {
- readonly availHeight: number;
- readonly availWidth: number;
- bufferDepth: number;
- readonly colorDepth: number;
- readonly deviceXDPI: number;
- readonly deviceYDPI: number;
- readonly fontSmoothingEnabled: boolean;
- readonly height: number;
- readonly logicalXDPI: number;
- readonly logicalYDPI: number;
- readonly msOrientation: string;
- onmsorientationchange: (this: Screen, ev: Event) => any;
- readonly pixelDepth: number;
- readonly systemXDPI: number;
- readonly systemYDPI: number;
- readonly width: number;
- msLockOrientation(orientations: string | string[]): boolean;
- msUnlockOrientation(): void;
- addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Screen: {
- prototype: Screen;
- new(): Screen;
-}
-
-interface ScriptNotifyEvent extends Event {
- readonly callingUri: string;
- readonly value: string;
-}
-
-declare var ScriptNotifyEvent: {
- prototype: ScriptNotifyEvent;
- new(): ScriptNotifyEvent;
-}
-
-interface ScriptProcessorNodeEventMap {
- "audioprocess": AudioProcessingEvent;
-}
-
-interface ScriptProcessorNode extends AudioNode {
- readonly bufferSize: number;
- onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
- addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ScriptProcessorNode: {
- prototype: ScriptProcessorNode;
- new(): ScriptProcessorNode;
-}
-
-interface Selection {
- readonly anchorNode: Node;
- readonly anchorOffset: number;
- readonly focusNode: Node;
- readonly focusOffset: number;
- readonly isCollapsed: boolean;
- readonly rangeCount: number;
- readonly type: string;
- addRange(range: Range): void;
- collapse(parentNode: Node, offset: number): void;
- collapseToEnd(): void;
- collapseToStart(): void;
- containsNode(node: Node, partlyContained: boolean): boolean;
- deleteFromDocument(): void;
- empty(): void;
- extend(newNode: Node, offset: number): void;
- getRangeAt(index: number): Range;
- removeAllRanges(): void;
- removeRange(range: Range): void;
- selectAllChildren(parentNode: Node): void;
- setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
- toString(): string;
-}
-
-declare var Selection: {
- prototype: Selection;
- new(): Selection;
-}
-
-interface SourceBuffer extends EventTarget {
- appendWindowEnd: number;
- appendWindowStart: number;
- readonly audioTracks: AudioTrackList;
- readonly buffered: TimeRanges;
- mode: string;
- timestampOffset: number;
- readonly updating: boolean;
- readonly videoTracks: VideoTrackList;
- abort(): void;
- appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
- appendStream(stream: MSStream, maxSize?: number): void;
- remove(start: number, end: number): void;
-}
-
-declare var SourceBuffer: {
- prototype: SourceBuffer;
- new(): SourceBuffer;
-}
-
-interface SourceBufferList extends EventTarget {
- readonly length: number;
- item(index: number): SourceBuffer;
- [index: number]: SourceBuffer;
-}
-
-declare var SourceBufferList: {
- prototype: SourceBufferList;
- new(): SourceBufferList;
-}
-
-interface StereoPannerNode extends AudioNode {
- readonly pan: AudioParam;
-}
-
-declare var StereoPannerNode: {
- prototype: StereoPannerNode;
- new(): StereoPannerNode;
-}
-
-interface Storage {
- readonly length: number;
- clear(): void;
- getItem(key: string): string | null;
- key(index: number): string | null;
- removeItem(key: string): void;
- setItem(key: string, data: string): void;
- [key: string]: any;
- [index: number]: string;
-}
-
-declare var Storage: {
- prototype: Storage;
- new(): Storage;
-}
-
-interface StorageEvent extends Event {
- readonly url: string;
- key?: string;
- oldValue?: string;
- newValue?: string;
- storageArea?: Storage;
-}
-
-declare var StorageEvent: {
- prototype: StorageEvent;
- new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
-}
-
-interface StyleMedia {
- readonly type: string;
- matchMedium(mediaquery: string): boolean;
-}
-
-declare var StyleMedia: {
- prototype: StyleMedia;
- new(): StyleMedia;
-}
-
-interface StyleSheet {
- disabled: boolean;
- readonly href: string;
- readonly media: MediaList;
- readonly ownerNode: Node;
- readonly parentStyleSheet: StyleSheet;
- readonly title: string;
- readonly type: string;
-}
-
-declare var StyleSheet: {
- prototype: StyleSheet;
- new(): StyleSheet;
-}
-
-interface StyleSheetList {
- readonly length: number;
- item(index?: number): StyleSheet;
- [index: number]: StyleSheet;
-}
-
-declare var StyleSheetList: {
- prototype: StyleSheetList;
- new(): StyleSheetList;
-}
-
-interface StyleSheetPageList {
- readonly length: number;
- item(index: number): CSSPageRule;
- [index: number]: CSSPageRule;
-}
-
-declare var StyleSheetPageList: {
- prototype: StyleSheetPageList;
- new(): StyleSheetPageList;
-}
-
-interface SubtleCrypto {
- decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
- deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
- encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
- exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
- exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
- generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
- generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
- generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
- wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
-}
-
-declare var SubtleCrypto: {
- prototype: SubtleCrypto;
- new(): SubtleCrypto;
-}
-
-interface Text extends CharacterData {
- readonly wholeText: string;
- readonly assignedSlot: HTMLSlotElement | null;
- splitText(offset: number): Text;
-}
-
-declare var Text: {
- prototype: Text;
- new(): Text;
-}
-
-interface TextEvent extends UIEvent {
- readonly data: string;
- readonly inputMethod: number;
- readonly locale: string;
- initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-declare var TextEvent: {
- prototype: TextEvent;
- new(): TextEvent;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-interface TextMetrics {
- readonly width: number;
-}
-
-declare var TextMetrics: {
- prototype: TextMetrics;
- new(): TextMetrics;
-}
-
-interface TextTrackEventMap {
- "cuechange": Event;
- "error": ErrorEvent;
- "load": Event;
-}
-
-interface TextTrack extends EventTarget {
- readonly activeCues: TextTrackCueList;
- readonly cues: TextTrackCueList;
- readonly inBandMetadataTrackDispatchType: string;
- readonly kind: string;
- readonly label: string;
- readonly language: string;
- mode: any;
- oncuechange: (this: TextTrack, ev: Event) => any;
- onerror: (this: TextTrack, ev: ErrorEvent) => any;
- onload: (this: TextTrack, ev: Event) => any;
- readonly readyState: number;
- addCue(cue: TextTrackCue): void;
- removeCue(cue: TextTrackCue): void;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
- addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrack: {
- prototype: TextTrack;
- new(): TextTrack;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
-}
-
-interface TextTrackCueEventMap {
- "enter": Event;
- "exit": Event;
-}
-
-interface TextTrackCue extends EventTarget {
- endTime: number;
- id: string;
- onenter: (this: TextTrackCue, ev: Event) => any;
- onexit: (this: TextTrackCue, ev: Event) => any;
- pauseOnExit: boolean;
- startTime: number;
- text: string;
- readonly track: TextTrack;
- getCueAsHTML(): DocumentFragment;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrackCue: {
- prototype: TextTrackCue;
- new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
-
-interface TextTrackCueList {
- readonly length: number;
- getCueById(id: string): TextTrackCue;
- item(index: number): TextTrackCue;
- [index: number]: TextTrackCue;
-}
-
-declare var TextTrackCueList: {
- prototype: TextTrackCueList;
- new(): TextTrackCueList;
-}
-
-interface TextTrackListEventMap {
- "addtrack": TrackEvent;
-}
-
-interface TextTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
- item(index: number): TextTrack;
- addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: TextTrack;
-}
-
-declare var TextTrackList: {
- prototype: TextTrackList;
- new(): TextTrackList;
-}
-
-interface TimeRanges {
- readonly length: number;
- end(index: number): number;
- start(index: number): number;
-}
-
-declare var TimeRanges: {
- prototype: TimeRanges;
- new(): TimeRanges;
-}
-
-interface Touch {
- readonly clientX: number;
- readonly clientY: number;
- readonly identifier: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly target: EventTarget;
-}
-
-declare var Touch: {
- prototype: Touch;
- new(): Touch;
-}
-
-interface TouchEvent extends UIEvent {
- readonly altKey: boolean;
- readonly changedTouches: TouchList;
- readonly ctrlKey: boolean;
- readonly metaKey: boolean;
- readonly shiftKey: boolean;
- readonly targetTouches: TouchList;
- readonly touches: TouchList;
-}
-
-declare var TouchEvent: {
- prototype: TouchEvent;
- new(): TouchEvent;
-}
-
-interface TouchList {
- readonly length: number;
- item(index: number): Touch | null;
- [index: number]: Touch;
-}
-
-declare var TouchList: {
- prototype: TouchList;
- new(): TouchList;
-}
-
-interface TrackEvent extends Event {
- readonly track: any;
-}
-
-declare var TrackEvent: {
- prototype: TrackEvent;
- new(): TrackEvent;
-}
-
-interface TransitionEvent extends Event {
- readonly elapsedTime: number;
- readonly propertyName: string;
- initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var TransitionEvent: {
- prototype: TransitionEvent;
- new(): TransitionEvent;
-}
-
-interface TreeWalker {
- currentNode: Node;
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- firstChild(): Node;
- lastChild(): Node;
- nextNode(): Node;
- nextSibling(): Node;
- parentNode(): Node;
- previousNode(): Node;
- previousSibling(): Node;
-}
-
-declare var TreeWalker: {
- prototype: TreeWalker;
- new(): TreeWalker;
-}
-
-interface UIEvent extends Event {
- readonly detail: number;
- readonly view: Window;
- initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
-}
-
-declare var UIEvent: {
- prototype: UIEvent;
- new(type: string, eventInitDict?: UIEventInit): UIEvent;
-}
-
-interface URL {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- password: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- username: string;
- toString(): string;
-}
-
-declare var URL: {
- prototype: URL;
- new(url: string, base?: string): URL;
- createObjectURL(object: any, options?: ObjectURLOptions): string;
- revokeObjectURL(url: string): void;
-}
-
-interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
- readonly mediaType: string;
-}
-
-declare var UnviewableContentIdentifiedEvent: {
- prototype: UnviewableContentIdentifiedEvent;
- new(): UnviewableContentIdentifiedEvent;
-}
-
-interface ValidityState {
- readonly badInput: boolean;
- readonly customError: boolean;
- readonly patternMismatch: boolean;
- readonly rangeOverflow: boolean;
- readonly rangeUnderflow: boolean;
- readonly stepMismatch: boolean;
- readonly tooLong: boolean;
- readonly typeMismatch: boolean;
- readonly valid: boolean;
- readonly valueMissing: boolean;
-}
-
-declare var ValidityState: {
- prototype: ValidityState;
- new(): ValidityState;
-}
-
-interface VideoPlaybackQuality {
- readonly corruptedVideoFrames: number;
- readonly creationTime: number;
- readonly droppedVideoFrames: number;
- readonly totalFrameDelay: number;
- readonly totalVideoFrames: number;
-}
-
-declare var VideoPlaybackQuality: {
- prototype: VideoPlaybackQuality;
- new(): VideoPlaybackQuality;
-}
-
-interface VideoTrack {
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- selected: boolean;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var VideoTrack: {
- prototype: VideoTrack;
- new(): VideoTrack;
-}
-
-interface VideoTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface VideoTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
- onchange: (this: VideoTrackList, ev: Event) => any;
- onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
- readonly selectedIndex: number;
- getTrackById(id: string): VideoTrack | null;
- item(index: number): VideoTrack;
- addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: VideoTrack;
-}
-
-declare var VideoTrackList: {
- prototype: VideoTrackList;
- new(): VideoTrackList;
-}
-
-interface WEBGL_compressed_texture_s3tc {
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-declare var WEBGL_compressed_texture_s3tc: {
- prototype: WEBGL_compressed_texture_s3tc;
- new(): WEBGL_compressed_texture_s3tc;
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-interface WEBGL_debug_renderer_info {
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-declare var WEBGL_debug_renderer_info: {
- prototype: WEBGL_debug_renderer_info;
- new(): WEBGL_debug_renderer_info;
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-interface WEBGL_depth_texture {
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-declare var WEBGL_depth_texture: {
- prototype: WEBGL_depth_texture;
- new(): WEBGL_depth_texture;
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-interface WaveShaperNode extends AudioNode {
- curve: Float32Array | null;
- oversample: string;
-}
-
-declare var WaveShaperNode: {
- prototype: WaveShaperNode;
- new(): WaveShaperNode;
-}
-
-interface WebGLActiveInfo {
- readonly name: string;
- readonly size: number;
- readonly type: number;
-}
-
-declare var WebGLActiveInfo: {
- prototype: WebGLActiveInfo;
- new(): WebGLActiveInfo;
-}
-
-interface WebGLBuffer extends WebGLObject {
-}
-
-declare var WebGLBuffer: {
- prototype: WebGLBuffer;
- new(): WebGLBuffer;
-}
-
-interface WebGLContextEvent extends Event {
- readonly statusMessage: string;
-}
-
-declare var WebGLContextEvent: {
- prototype: WebGLContextEvent;
- new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
-
-interface WebGLFramebuffer extends WebGLObject {
-}
-
-declare var WebGLFramebuffer: {
- prototype: WebGLFramebuffer;
- new(): WebGLFramebuffer;
-}
-
-interface WebGLObject {
-}
-
-declare var WebGLObject: {
- prototype: WebGLObject;
- new(): WebGLObject;
-}
-
-interface WebGLProgram extends WebGLObject {
-}
-
-declare var WebGLProgram: {
- prototype: WebGLProgram;
- new(): WebGLProgram;
-}
-
-interface WebGLRenderbuffer extends WebGLObject {
-}
-
-declare var WebGLRenderbuffer: {
- prototype: WebGLRenderbuffer;
- new(): WebGLRenderbuffer;
-}
-
-interface WebGLRenderingContext {
- readonly canvas: HTMLCanvasElement;
- readonly drawingBufferHeight: number;
- readonly drawingBufferWidth: number;
- activeTexture(texture: number): void;
- attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
- bindBuffer(target: number, buffer: WebGLBuffer | null): void;
- bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
- bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
- bindTexture(target: number, texture: WebGLTexture | null): void;
- blendColor(red: number, green: number, blue: number, alpha: number): void;
- blendEquation(mode: number): void;
- blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
- blendFunc(sfactor: number, dfactor: number): void;
- blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
- bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
- bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
- checkFramebufferStatus(target: number): number;
- clear(mask: number): void;
- clearColor(red: number, green: number, blue: number, alpha: number): void;
- clearDepth(depth: number): void;
- clearStencil(s: number): void;
- colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
- compileShader(shader: WebGLShader | null): void;
- compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
- compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
- copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
- copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
- createBuffer(): WebGLBuffer | null;
- createFramebuffer(): WebGLFramebuffer | null;
- createProgram(): WebGLProgram | null;
- createRenderbuffer(): WebGLRenderbuffer | null;
- createShader(type: number): WebGLShader | null;
- createTexture(): WebGLTexture | null;
- cullFace(mode: number): void;
- deleteBuffer(buffer: WebGLBuffer | null): void;
- deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
- deleteProgram(program: WebGLProgram | null): void;
- deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
- deleteShader(shader: WebGLShader | null): void;
- deleteTexture(texture: WebGLTexture | null): void;
- depthFunc(func: number): void;
- depthMask(flag: boolean): void;
- depthRange(zNear: number, zFar: number): void;
- detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- disable(cap: number): void;
- disableVertexAttribArray(index: number): void;
- drawArrays(mode: number, first: number, count: number): void;
- drawElements(mode: number, count: number, type: number, offset: number): void;
- enable(cap: number): void;
- enableVertexAttribArray(index: number): void;
- finish(): void;
- flush(): void;
- framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
- framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
- frontFace(mode: number): void;
- generateMipmap(target: number): void;
- getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
- getAttribLocation(program: WebGLProgram | null, name: string): number;
- getBufferParameter(target: number, pname: number): any;
- getContextAttributes(): WebGLContextAttributes;
- getError(): number;
- getExtension(name: string): any;
- getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
- getParameter(pname: number): any;
- getProgramInfoLog(program: WebGLProgram | null): string | null;
- getProgramParameter(program: WebGLProgram | null, pname: number): any;
- getRenderbufferParameter(target: number, pname: number): any;
- getShaderInfoLog(shader: WebGLShader | null): string | null;
- getShaderParameter(shader: WebGLShader | null, pname: number): any;
- getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
- getShaderSource(shader: WebGLShader | null): string | null;
- getSupportedExtensions(): string[] | null;
- getTexParameter(target: number, pname: number): any;
- getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
- getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
- getVertexAttrib(index: number, pname: number): any;
- getVertexAttribOffset(index: number, pname: number): number;
- hint(target: number, mode: number): void;
- isBuffer(buffer: WebGLBuffer | null): boolean;
- isContextLost(): boolean;
- isEnabled(cap: number): boolean;
- isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
- isProgram(program: WebGLProgram | null): boolean;
- isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
- isShader(shader: WebGLShader | null): boolean;
- isTexture(texture: WebGLTexture | null): boolean;
- lineWidth(width: number): void;
- linkProgram(program: WebGLProgram | null): void;
- pixelStorei(pname: number, param: number): void;
- polygonOffset(factor: number, units: number): void;
- readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
- renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
- sampleCoverage(value: number, invert: boolean): void;
- scissor(x: number, y: number, width: number, height: number): void;
- shaderSource(shader: WebGLShader | null, source: string): void;
- stencilFunc(func: number, ref: number, mask: number): void;
- stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
- stencilMask(mask: number): void;
- stencilMaskSeparate(face: number, mask: number): void;
- stencilOp(fail: number, zfail: number, zpass: number): void;
- stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
- texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- texParameterf(target: number, pname: number, param: number): void;
- texParameteri(target: number, pname: number, param: number): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- uniform1f(location: WebGLUniformLocation | null, x: number): void;
- uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform1i(location: WebGLUniformLocation | null, x: number): void;
- uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- useProgram(program: WebGLProgram | null): void;
- validateProgram(program: WebGLProgram | null): void;
- vertexAttrib1f(indx: number, x: number): void;
- vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib2f(indx: number, x: number, y: number): void;
- vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
- vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
- vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
- vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
- viewport(x: number, y: number, width: number, height: number): void;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-declare var WebGLRenderingContext: {
- prototype: WebGLRenderingContext;
- new(): WebGLRenderingContext;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-interface WebGLShader extends WebGLObject {
-}
-
-declare var WebGLShader: {
- prototype: WebGLShader;
- new(): WebGLShader;
-}
-
-interface WebGLShaderPrecisionFormat {
- readonly precision: number;
- readonly rangeMax: number;
- readonly rangeMin: number;
-}
-
-declare var WebGLShaderPrecisionFormat: {
- prototype: WebGLShaderPrecisionFormat;
- new(): WebGLShaderPrecisionFormat;
-}
-
-interface WebGLTexture extends WebGLObject {
-}
-
-declare var WebGLTexture: {
- prototype: WebGLTexture;
- new(): WebGLTexture;
-}
-
-interface WebGLUniformLocation {
-}
-
-declare var WebGLUniformLocation: {
- prototype: WebGLUniformLocation;
- new(): WebGLUniformLocation;
-}
-
-interface WebKitCSSMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- m11: number;
- m12: number;
- m13: number;
- m14: number;
- m21: number;
- m22: number;
- m23: number;
- m24: number;
- m31: number;
- m32: number;
- m33: number;
- m34: number;
- m41: number;
- m42: number;
- m43: number;
- m44: number;
- inverse(): WebKitCSSMatrix;
- multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
- rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
- rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
- scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
- setMatrixValue(value: string): void;
- skewX(angle: number): WebKitCSSMatrix;
- skewY(angle: number): WebKitCSSMatrix;
- toString(): string;
- translate(x: number, y: number, z?: number): WebKitCSSMatrix;
-}
-
-declare var WebKitCSSMatrix: {
- prototype: WebKitCSSMatrix;
- new(text?: string): WebKitCSSMatrix;
-}
-
-interface WebKitPoint {
- x: number;
- y: number;
-}
-
-declare var WebKitPoint: {
- prototype: WebKitPoint;
- new(x?: number, y?: number): WebKitPoint;
-}
-
-interface WebSocketEventMap {
- "close": CloseEvent;
- "error": ErrorEvent;
- "message": MessageEvent;
- "open": Event;
-}
-
-interface WebSocket extends EventTarget {
- binaryType: string;
- readonly bufferedAmount: number;
- readonly extensions: string;
- onclose: (this: WebSocket, ev: CloseEvent) => any;
- onerror: (this: WebSocket, ev: ErrorEvent) => any;
- onmessage: (this: WebSocket, ev: MessageEvent) => any;
- onopen: (this: WebSocket, ev: Event) => any;
- readonly protocol: string;
- readonly readyState: number;
- readonly url: string;
- close(code?: number, reason?: string): void;
- send(data: any): void;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
- addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var WebSocket: {
- prototype: WebSocket;
- new(url: string, protocols?: string | string[]): WebSocket;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
-}
-
-interface WheelEvent extends MouseEvent {
- readonly deltaMode: number;
- readonly deltaX: number;
- readonly deltaY: number;
- readonly deltaZ: number;
- readonly wheelDelta: number;
- readonly wheelDeltaX: number;
- readonly wheelDeltaY: number;
- getCurrentPoint(element: Element): void;
- initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-declare var WheelEvent: {
- prototype: WheelEvent;
- new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-interface WindowEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "compassneedscalibration": Event;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "devicelight": DeviceLightEvent;
- "devicemotion": DeviceMotionEvent;
- "deviceorientation": DeviceOrientationEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "message": MessageEvent;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "popstate": PopStateEvent;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "stalled": Event;
- "storage": StorageEvent;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "unload": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
- readonly applicationCache: ApplicationCache;
- readonly clientInformation: Navigator;
- readonly closed: boolean;
- readonly crypto: Crypto;
- defaultStatus: string;
- readonly devicePixelRatio: number;
- readonly doNotTrack: string;
- readonly document: Document;
- event: Event | undefined;
- readonly external: External;
- readonly frameElement: Element;
- readonly frames: Window;
- readonly history: History;
- readonly innerHeight: number;
- readonly innerWidth: number;
- readonly length: number;
- readonly location: Location;
- readonly locationbar: BarProp;
- readonly menubar: BarProp;
- readonly msCredentials: MSCredentials;
- name: string;
- readonly navigator: Navigator;
- offscreenBuffering: string | boolean;
- onabort: (this: Window, ev: UIEvent) => any;
- onafterprint: (this: Window, ev: Event) => any;
- onbeforeprint: (this: Window, ev: Event) => any;
- onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
- onblur: (this: Window, ev: FocusEvent) => any;
- oncanplay: (this: Window, ev: Event) => any;
- oncanplaythrough: (this: Window, ev: Event) => any;
- onchange: (this: Window, ev: Event) => any;
- onclick: (this: Window, ev: MouseEvent) => any;
- oncompassneedscalibration: (this: Window, ev: Event) => any;
- oncontextmenu: (this: Window, ev: PointerEvent) => any;
- ondblclick: (this: Window, ev: MouseEvent) => any;
- ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
- ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
- ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
- ondrag: (this: Window, ev: DragEvent) => any;
- ondragend: (this: Window, ev: DragEvent) => any;
- ondragenter: (this: Window, ev: DragEvent) => any;
- ondragleave: (this: Window, ev: DragEvent) => any;
- ondragover: (this: Window, ev: DragEvent) => any;
- ondragstart: (this: Window, ev: DragEvent) => any;
- ondrop: (this: Window, ev: DragEvent) => any;
- ondurationchange: (this: Window, ev: Event) => any;
- onemptied: (this: Window, ev: Event) => any;
- onended: (this: Window, ev: MediaStreamErrorEvent) => any;
- onerror: ErrorEventHandler;
- onfocus: (this: Window, ev: FocusEvent) => any;
- onhashchange: (this: Window, ev: HashChangeEvent) => any;
- oninput: (this: Window, ev: Event) => any;
- oninvalid: (this: Window, ev: Event) => any;
- onkeydown: (this: Window, ev: KeyboardEvent) => any;
- onkeypress: (this: Window, ev: KeyboardEvent) => any;
- onkeyup: (this: Window, ev: KeyboardEvent) => any;
- onload: (this: Window, ev: Event) => any;
- onloadeddata: (this: Window, ev: Event) => any;
- onloadedmetadata: (this: Window, ev: Event) => any;
- onloadstart: (this: Window, ev: Event) => any;
- onmessage: (this: Window, ev: MessageEvent) => any;
- onmousedown: (this: Window, ev: MouseEvent) => any;
- onmouseenter: (this: Window, ev: MouseEvent) => any;
- onmouseleave: (this: Window, ev: MouseEvent) => any;
- onmousemove: (this: Window, ev: MouseEvent) => any;
- onmouseout: (this: Window, ev: MouseEvent) => any;
- onmouseover: (this: Window, ev: MouseEvent) => any;
- onmouseup: (this: Window, ev: MouseEvent) => any;
- onmousewheel: (this: Window, ev: WheelEvent) => any;
- onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
- onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
- onmspointermove: (this: Window, ev: MSPointerEvent) => any;
- onmspointerout: (this: Window, ev: MSPointerEvent) => any;
- onmspointerover: (this: Window, ev: MSPointerEvent) => any;
- onmspointerup: (this: Window, ev: MSPointerEvent) => any;
- onoffline: (this: Window, ev: Event) => any;
- ononline: (this: Window, ev: Event) => any;
- onorientationchange: (this: Window, ev: Event) => any;
- onpagehide: (this: Window, ev: PageTransitionEvent) => any;
- onpageshow: (this: Window, ev: PageTransitionEvent) => any;
- onpause: (this: Window, ev: Event) => any;
- onplay: (this: Window, ev: Event) => any;
- onplaying: (this: Window, ev: Event) => any;
- onpopstate: (this: Window, ev: PopStateEvent) => any;
- onprogress: (this: Window, ev: ProgressEvent) => any;
- onratechange: (this: Window, ev: Event) => any;
- onreadystatechange: (this: Window, ev: ProgressEvent) => any;
- onreset: (this: Window, ev: Event) => any;
- onresize: (this: Window, ev: UIEvent) => any;
- onscroll: (this: Window, ev: UIEvent) => any;
- onseeked: (this: Window, ev: Event) => any;
- onseeking: (this: Window, ev: Event) => any;
- onselect: (this: Window, ev: UIEvent) => any;
- onstalled: (this: Window, ev: Event) => any;
- onstorage: (this: Window, ev: StorageEvent) => any;
- onsubmit: (this: Window, ev: Event) => any;
- onsuspend: (this: Window, ev: Event) => any;
- ontimeupdate: (this: Window, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onunload: (this: Window, ev: Event) => any;
- onvolumechange: (this: Window, ev: Event) => any;
- onwaiting: (this: Window, ev: Event) => any;
- opener: any;
- orientation: string | number;
- readonly outerHeight: number;
- readonly outerWidth: number;
- readonly pageXOffset: number;
- readonly pageYOffset: number;
- readonly parent: Window;
- readonly performance: Performance;
- readonly personalbar: BarProp;
- readonly screen: Screen;
- readonly screenLeft: number;
- readonly screenTop: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly scrollX: number;
- readonly scrollY: number;
- readonly scrollbars: BarProp;
- readonly self: Window;
- status: string;
- readonly statusbar: BarProp;
- readonly styleMedia: StyleMedia;
- readonly toolbar: BarProp;
- readonly top: Window;
- readonly window: Window;
- URL: typeof URL;
- Blob: typeof Blob;
- alert(message?: any): void;
- blur(): void;
- cancelAnimationFrame(handle: number): void;
- captureEvents(): void;
- close(): void;
- confirm(message?: string): boolean;
- focus(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
- getSelection(): Selection;
- matchMedia(mediaQuery: string): MediaQueryList;
- moveBy(x?: number, y?: number): void;
- moveTo(x?: number, y?: number): void;
- msWriteProfilerMark(profilerMarkName: string): void;
- open(url?: string, target?: string, features?: string, replace?: boolean): Window;
- postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
- print(): void;
- prompt(message?: string, _default?: string): string | null;
- releaseEvents(): void;
- requestAnimationFrame(callback: FrameRequestCallback): number;
- resizeBy(x?: number, y?: number): void;
- resizeTo(x?: number, y?: number): void;
- scroll(x?: number, y?: number): void;
- scrollBy(x?: number, y?: number): void;
- scrollTo(x?: number, y?: number): void;
- webkitCancelAnimationFrame(handle: number): void;
- webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
- scroll(options?: ScrollToOptions): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollBy(options?: ScrollToOptions): void;
- addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Window: {
- prototype: Window;
- new(): Window;
-}
-
-interface WorkerEventMap extends AbstractWorkerEventMap {
- "message": MessageEvent;
-}
-
-interface Worker extends EventTarget, AbstractWorker {
- onmessage: (this: Worker, ev: MessageEvent) => any;
- postMessage(message: any, ports?: any): void;
- terminate(): void;
- addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Worker: {
- prototype: Worker;
- new(stringUrl: string): Worker;
-}
-
-interface XMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLDocument: {
- prototype: XMLDocument;
- new(): XMLDocument;
-}
-
-interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
- "readystatechange": Event;
-}
-
-interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
- onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
- readonly readyState: number;
- readonly response: any;
- readonly responseText: string;
- responseType: string;
- readonly responseXML: any;
- readonly status: number;
- readonly statusText: string;
- timeout: number;
- readonly upload: XMLHttpRequestUpload;
- withCredentials: boolean;
- msCaching?: string;
- readonly responseURL: string;
- abort(): void;
- getAllResponseHeaders(): string;
- getResponseHeader(header: string): string | null;
- msCachingEnabled(): boolean;
- open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
- overrideMimeType(mime: string): void;
- send(data?: Document): void;
- send(data?: string): void;
- send(data?: any): void;
- setRequestHeader(header: string, value: string): void;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequest: {
- prototype: XMLHttpRequest;
- new(): XMLHttpRequest;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- create(): XMLHttpRequest;
-}
-
-interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequestUpload: {
- prototype: XMLHttpRequestUpload;
- new(): XMLHttpRequestUpload;
-}
-
-interface XMLSerializer {
- serializeToString(target: Node): string;
-}
-
-declare var XMLSerializer: {
- prototype: XMLSerializer;
- new(): XMLSerializer;
-}
-
-interface XPathEvaluator {
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver?: Node): XPathNSResolver;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathEvaluator: {
- prototype: XPathEvaluator;
- new(): XPathEvaluator;
-}
-
-interface XPathExpression {
- evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathExpression: {
- prototype: XPathExpression;
- new(): XPathExpression;
-}
-
-interface XPathNSResolver {
- lookupNamespaceURI(prefix: string): string;
-}
-
-declare var XPathNSResolver: {
- prototype: XPathNSResolver;
- new(): XPathNSResolver;
-}
-
-interface XPathResult {
- readonly booleanValue: boolean;
- readonly invalidIteratorState: boolean;
- readonly numberValue: number;
- readonly resultType: number;
- readonly singleNodeValue: Node;
- readonly snapshotLength: number;
- readonly stringValue: string;
- iterateNext(): Node;
- snapshotItem(index: number): Node;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-declare var XPathResult: {
- prototype: XPathResult;
- new(): XPathResult;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-interface XSLTProcessor {
- clearParameters(): void;
- getParameter(namespaceURI: string, localName: string): any;
- importStylesheet(style: Node): void;
- removeParameter(namespaceURI: string, localName: string): void;
- reset(): void;
- setParameter(namespaceURI: string, localName: string, value: any): void;
- transformToDocument(source: Node): Document;
- transformToFragment(source: Node, document: Document): DocumentFragment;
-}
-
-declare var XSLTProcessor: {
- prototype: XSLTProcessor;
- new(): XSLTProcessor;
-}
-
-interface AbstractWorkerEventMap {
- "error": ErrorEvent;
-}
-
-interface AbstractWorker {
- onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
- addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface CanvasPathMethods {
- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
- closePath(): void;
- ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- lineTo(x: number, y: number): void;
- moveTo(x: number, y: number): void;
- quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
- rect(x: number, y: number, w: number, h: number): void;
-}
-
-interface ChildNode {
- remove(): void;
-}
-
-interface DOML2DeprecatedColorProperty {
- color: string;
-}
-
-interface DOML2DeprecatedSizeProperty {
- size: number;
-}
-
-interface DocumentEvent {
- createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
- createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent;
- createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
- createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
- createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
- createEvent(eventInterface:"CloseEvent"): CloseEvent;
- createEvent(eventInterface:"CommandEvent"): CommandEvent;
- createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
- createEvent(eventInterface:"CustomEvent"): CustomEvent;
- createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
- createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
- createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
- createEvent(eventInterface:"DragEvent"): DragEvent;
- createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
- createEvent(eventInterface:"Event"): Event;
- createEvent(eventInterface:"Events"): Event;
- createEvent(eventInterface:"FocusEvent"): FocusEvent;
- createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
- createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
- createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
- createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
- createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
- createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
- createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
- createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
- createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
- createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
- createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
- createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
- createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
- createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
- createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
- createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
- createEvent(eventInterface:"MessageEvent"): MessageEvent;
- createEvent(eventInterface:"MouseEvent"): MouseEvent;
- createEvent(eventInterface:"MouseEvents"): MouseEvent;
- createEvent(eventInterface:"MutationEvent"): MutationEvent;
- createEvent(eventInterface:"MutationEvents"): MutationEvent;
- createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
- createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
- createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
- createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
- createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
- createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
- createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
- createEvent(eventInterface:"PointerEvent"): PointerEvent;
- createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
- createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
- createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
- createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
- createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
- createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
- createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
- createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
- createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
- createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
- createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
- createEvent(eventInterface:"StorageEvent"): StorageEvent;
- createEvent(eventInterface:"TextEvent"): TextEvent;
- createEvent(eventInterface:"TouchEvent"): TouchEvent;
- createEvent(eventInterface:"TrackEvent"): TrackEvent;
- createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
- createEvent(eventInterface:"UIEvent"): UIEvent;
- createEvent(eventInterface:"UIEvents"): UIEvent;
- createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
- createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
- createEvent(eventInterface:"WheelEvent"): WheelEvent;
- createEvent(eventInterface: string): Event;
-}
-
-interface ElementTraversal {
- readonly childElementCount: number;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly nextElementSibling: Element;
- readonly previousElementSibling: Element;
-}
-
-interface GetSVGDocument {
- getSVGDocument(): Document;
-}
-
-interface GlobalEventHandlersEventMap {
- "pointercancel": PointerEvent;
- "pointerdown": PointerEvent;
- "pointerenter": PointerEvent;
- "pointerleave": PointerEvent;
- "pointermove": PointerEvent;
- "pointerout": PointerEvent;
- "pointerover": PointerEvent;
- "pointerup": PointerEvent;
- "wheel": WheelEvent;
-}
-
-interface GlobalEventHandlers {
- onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
- addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface HTMLTableAlignment {
- /**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
- ch: string;
- /**
- * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
- */
- chOff: string;
- /**
- * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
- */
- vAlign: string;
-}
-
-interface IDBEnvironment {
- readonly indexedDB: IDBFactory;
-}
-
-interface LinkStyle {
- readonly sheet: StyleSheet;
-}
-
-interface MSBaseReaderEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
-}
-
-interface MSBaseReader {
- onabort: (this: MSBaseReader, ev: Event) => any;
- onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
- onload: (this: MSBaseReader, ev: Event) => any;
- onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
- onloadstart: (this: MSBaseReader, ev: Event) => any;
- onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
- readonly readyState: number;
- readonly result: any;
- abort(): void;
- readonly DONE: number;
- readonly EMPTY: number;
- readonly LOADING: number;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface MSFileSaver {
- msSaveBlob(blob: any, defaultName?: string): boolean;
- msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
-}
-
-interface MSNavigatorDoNotTrack {
- confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
- confirmWebWideTrackingException(args: ExceptionInformation): boolean;
- removeSiteSpecificTrackingException(args: ExceptionInformation): void;
- removeWebWideTrackingException(args: ExceptionInformation): void;
- storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
- storeWebWideTrackingException(args: StoreExceptionsInformation): void;
-}
-
-interface NavigatorContentUtils {
-}
-
-interface NavigatorGeolocation {
- readonly geolocation: Geolocation;
-}
-
-interface NavigatorID {
- readonly appName: string;
- readonly appVersion: string;
- readonly platform: string;
- readonly product: string;
- readonly productSub: string;
- readonly userAgent: string;
- readonly vendor: string;
- readonly vendorSub: string;
-}
-
-interface NavigatorOnLine {
- readonly onLine: boolean;
-}
-
-interface NavigatorStorageUtils {
-}
-
-interface NavigatorUserMedia {
- readonly mediaDevices: MediaDevices;
- getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
-}
-
-interface NodeSelector {
- querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
- querySelector(selectors: string): Element | null;
- querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
- querySelectorAll(selectors: string): NodeListOf<Element>;
-}
-
-interface RandomSource {
- getRandomValues(array: ArrayBufferView): ArrayBufferView;
-}
-
-interface SVGAnimatedPathData {
- readonly pathSegList: SVGPathSegList;
-}
-
-interface SVGAnimatedPoints {
- readonly animatedPoints: SVGPointList;
- readonly points: SVGPointList;
-}
-
-interface SVGExternalResourcesRequired {
- readonly externalResourcesRequired: SVGAnimatedBoolean;
-}
-
-interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
- readonly height: SVGAnimatedLength;
- readonly result: SVGAnimatedString;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
-}
-
-interface SVGFitToViewBox {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly viewBox: SVGAnimatedRect;
-}
-
-interface SVGLangSpace {
- xmllang: string;
- xmlspace: string;
-}
-
-interface SVGLocatable {
- readonly farthestViewportElement: SVGElement;
- readonly nearestViewportElement: SVGElement;
- getBBox(): SVGRect;
- getCTM(): SVGMatrix;
- getScreenCTM(): SVGMatrix;
- getTransformToElement(element: SVGElement): SVGMatrix;
-}
-
-interface SVGStylable {
- className: any;
- readonly style: CSSStyleDeclaration;
-}
-
-interface SVGTests {
- readonly requiredExtensions: SVGStringList;
- readonly requiredFeatures: SVGStringList;
- readonly systemLanguage: SVGStringList;
- hasExtension(extension: string): boolean;
-}
-
-interface SVGTransformable extends SVGLocatable {
- readonly transform: SVGAnimatedTransformList;
-}
-
-interface SVGURIReference {
- readonly href: SVGAnimatedString;
-}
-
-interface WindowBase64 {
- atob(encodedString: string): string;
- btoa(rawString: string): string;
-}
-
-interface WindowConsole {
- readonly console: Console;
-}
-
-interface WindowLocalStorage {
- readonly localStorage: Storage;
-}
-
-interface WindowSessionStorage {
- readonly sessionStorage: Storage;
-}
-
-interface WindowTimers extends Object, WindowTimersExtension {
- clearInterval(handle: number): void;
- clearTimeout(handle: number): void;
- setInterval(handler: (...args: any[]) => void, timeout: number): number;
- setInterval(handler: any, timeout?: any, ...args: any[]): number;
- setTimeout(handler: (...args: any[]) => void, timeout: number): number;
- setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-}
-
-interface WindowTimersExtension {
- clearImmediate(handle: number): void;
- setImmediate(handler: (...args: any[]) => void): number;
- setImmediate(handler: any, ...args: any[]): number;
-}
-
-interface XMLHttpRequestEventTargetEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
- "timeout": ProgressEvent;
-}
-
-interface XMLHttpRequestEventTarget {
- onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
- onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface StorageEventInit extends EventInit {
- key?: string;
- oldValue?: string;
- newValue?: string;
- url: string;
- storageArea?: Storage;
-}
-
-interface Canvas2DContextAttributes {
- alpha?: boolean;
- willReadFrequently?: boolean;
- storage?: boolean;
- [attribute: string]: boolean | string | undefined;
-}
-
-interface NodeListOf<TNode extends Node> extends NodeList {
- length: number;
- item(index: number): TNode;
- [index: number]: TNode;
-}
-
-interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
- item(index: number): T;
- namedItem(name: string): T;
- [index: number]: T;
-}
-
-interface BlobPropertyBag {
- type?: string;
- endings?: string;
-}
-
-interface FilePropertyBag {
- type?: string;
- lastModified?: number;
-}
-
-interface EventListenerObject {
- handleEvent(evt: Event): void;
-}
-
-interface MessageEventInit extends EventInit {
- data?: any;
- origin?: string;
- lastEventId?: string;
- channel?: string;
- source?: any;
- ports?: MessagePort[];
-}
-
-interface ProgressEventInit extends EventInit {
- lengthComputable?: boolean;
- loaded?: number;
- total?: number;
-}
-
-interface ScrollOptions {
- behavior?: ScrollBehavior;
-}
-
-interface ScrollToOptions extends ScrollOptions {
- left?: number;
- top?: number;
-}
-
-interface ScrollIntoViewOptions extends ScrollOptions {
- block?: ScrollLogicalPosition;
- inline?: ScrollLogicalPosition;
-}
-
-interface ClipboardEventInit extends EventInit {
- data?: string;
- dataType?: string;
-}
-
-interface IDBArrayKey extends Array<IDBValidKey> {
-}
-
-interface RsaKeyGenParams extends Algorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyGenParams extends RsaKeyGenParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaKeyAlgorithm extends KeyAlgorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaHashedImportParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaPssParams {
- saltLength: number;
-}
-
-interface RsaOaepParams extends Algorithm {
- label?: BufferSource;
-}
-
-interface EcdsaParams extends Algorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface EcKeyGenParams extends Algorithm {
- namedCurve: string;
-}
-
-interface EcKeyAlgorithm extends KeyAlgorithm {
- typedCurve: string;
-}
-
-interface EcKeyImportParams {
- namedCurve: string;
-}
-
-interface EcdhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface AesCtrParams extends Algorithm {
- counter: BufferSource;
- length: number;
-}
-
-interface AesKeyAlgorithm extends KeyAlgorithm {
- length: number;
-}
-
-interface AesKeyGenParams extends Algorithm {
- length: number;
-}
-
-interface AesDerivedKeyParams extends Algorithm {
- length: number;
-}
-
-interface AesCbcParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface AesCmacParams extends Algorithm {
- length: number;
-}
-
-interface AesGcmParams extends Algorithm {
- iv: BufferSource;
- additionalData?: BufferSource;
- tagLength?: number;
-}
-
-interface AesCfbParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface HmacImportParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- length?: number;
-}
-
-interface HmacKeyAlgorithm extends KeyAlgorithm {
- hash: AlgorithmIdentifier;
- length: number;
-}
-
-interface HmacKeyGenParams extends Algorithm {
- hash: AlgorithmIdentifier;
- length?: number;
-}
-
-interface DhKeyGenParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyAlgorithm extends KeyAlgorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface DhImportKeyParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface ConcatParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- algorithmId: Uint8Array;
- partyUInfo: Uint8Array;
- partyVInfo: Uint8Array;
- publicInfo?: Uint8Array;
- privateInfo?: Uint8Array;
-}
-
-interface HkdfCtrParams extends Algorithm {
- hash: AlgorithmIdentifier;
- label: BufferSource;
- context: BufferSource;
-}
-
-interface Pbkdf2Params extends Algorithm {
- salt: BufferSource;
- iterations: number;
- hash: AlgorithmIdentifier;
-}
-
-interface RsaOtherPrimesInfo {
- r: string;
- d: string;
- t: string;
-}
-
-interface JsonWebKey {
- kty: string;
- use?: string;
- key_ops?: string[];
- alg?: string;
- kid?: string;
- x5u?: string;
- x5c?: string;
- x5t?: string;
- ext?: boolean;
- crv?: string;
- x?: string;
- y?: string;
- d?: string;
- n?: string;
- e?: string;
- p?: string;
- q?: string;
- dp?: string;
- dq?: string;
- qi?: string;
- oth?: RsaOtherPrimesInfo[];
- k?: string;
-}
-
-interface ParentNode {
- readonly children: HTMLCollection;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly childElementCount: number;
-}
-
-interface DocumentOrShadowRoot {
- readonly activeElement: Element | null;
- readonly stylesheets: StyleSheetList;
- getSelection(): Selection | null;
- elementFromPoint(x: number, y: number): Element | null;
- elementsFromPoint(x: number, y: number): Element[];
-}
-
-interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
- readonly host: Element;
- innerHTML: string;
-}
-
-interface ShadowRootInit {
- mode: 'open'|'closed';
- delegatesFocus?: boolean;
-}
-
-interface HTMLSlotElement extends HTMLElement {
- name: string;
- assignedNodes(options?: AssignedNodesOptions): Node[];
-}
-
-interface AssignedNodesOptions {
- flatten?: boolean;
-}
-
-declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
-
-interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
-}
-interface PositionCallback {
- (position: Position): void;
-}
-interface PositionErrorCallback {
- (error: PositionError): void;
-}
-interface MediaQueryListListener {
- (mql: MediaQueryList): void;
-}
-interface MSLaunchUriCallback {
- (): void;
-}
-interface FrameRequestCallback {
- (time: number): void;
-}
-interface MSUnsafeFunctionCallback {
- (): any;
-}
-interface MSExecAtPriorityFunctionCallback {
- (...args: any[]): any;
-}
-interface MutationCallback {
- (mutations: MutationRecord[], observer: MutationObserver): void;
-}
-interface DecodeSuccessCallback {
- (decodedData: AudioBuffer): void;
-}
-interface DecodeErrorCallback {
- (error: DOMException): void;
-}
-interface FunctionStringCallback {
- (data: string): void;
-}
-interface NavigatorUserMediaSuccessCallback {
- (stream: MediaStream): void;
-}
-interface NavigatorUserMediaErrorCallback {
- (error: MediaStreamError): void;
-}
-interface ForEachCallback {
- (keyId: any, status: string): void;
-}
-interface HTMLElementTagNameMap {
- "a": HTMLAnchorElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "audio": HTMLAudioElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "del": HTMLModElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "embed": HTMLEmbedElement;
- "fieldset": HTMLFieldSetElement;
- "font": HTMLFontElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "iframe": HTMLIFrameElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "marquee": HTMLMarqueeElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "meter": HTMLMeterElement;
- "nextid": HTMLUnknownElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "picture": HTMLPictureElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "script": HTMLScriptElement;
- "select": HTMLSelectElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "style": HTMLStyleElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "ul": HTMLUListElement;
- "video": HTMLVideoElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
- "abbr": HTMLElement;
- "acronym": HTMLElement;
- "address": HTMLElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "article": HTMLElement;
- "aside": HTMLElement;
- "audio": HTMLAudioElement;
- "b": HTMLElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "bdo": HTMLElement;
- "big": HTMLElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "center": HTMLElement;
- "circle": SVGCircleElement;
- "cite": HTMLElement;
- "clippath": SVGClipPathElement;
- "code": HTMLElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "dd": HTMLElement;
- "defs": SVGDefsElement;
- "del": HTMLModElement;
- "desc": SVGDescElement;
- "dfn": HTMLElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "dt": HTMLElement;
- "ellipse": SVGEllipseElement;
- "em": HTMLElement;
- "embed": HTMLEmbedElement;
- "feblend": SVGFEBlendElement;
- "fecolormatrix": SVGFEColorMatrixElement;
- "fecomponenttransfer": SVGFEComponentTransferElement;
- "fecomposite": SVGFECompositeElement;
- "feconvolvematrix": SVGFEConvolveMatrixElement;
- "fediffuselighting": SVGFEDiffuseLightingElement;
- "fedisplacementmap": SVGFEDisplacementMapElement;
- "fedistantlight": SVGFEDistantLightElement;
- "feflood": SVGFEFloodElement;
- "fefunca": SVGFEFuncAElement;
- "fefuncb": SVGFEFuncBElement;
- "fefuncg": SVGFEFuncGElement;
- "fefuncr": SVGFEFuncRElement;
- "fegaussianblur": SVGFEGaussianBlurElement;
- "feimage": SVGFEImageElement;
- "femerge": SVGFEMergeElement;
- "femergenode": SVGFEMergeNodeElement;
- "femorphology": SVGFEMorphologyElement;
- "feoffset": SVGFEOffsetElement;
- "fepointlight": SVGFEPointLightElement;
- "fespecularlighting": SVGFESpecularLightingElement;
- "fespotlight": SVGFESpotLightElement;
- "fetile": SVGFETileElement;
- "feturbulence": SVGFETurbulenceElement;
- "fieldset": HTMLFieldSetElement;
- "figcaption": HTMLElement;
- "figure": HTMLElement;
- "filter": SVGFilterElement;
- "font": HTMLFontElement;
- "footer": HTMLElement;
- "foreignobject": SVGForeignObjectElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "g": SVGGElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "header": HTMLElement;
- "hgroup": HTMLElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "i": HTMLElement;
- "iframe": HTMLIFrameElement;
- "image": SVGImageElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "kbd": HTMLElement;
- "keygen": HTMLElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "line": SVGLineElement;
- "lineargradient": SVGLinearGradientElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "mark": HTMLElement;
- "marker": SVGMarkerElement;
- "marquee": HTMLMarqueeElement;
- "mask": SVGMaskElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "metadata": SVGMetadataElement;
- "meter": HTMLMeterElement;
- "nav": HTMLElement;
- "nextid": HTMLUnknownElement;
- "nobr": HTMLElement;
- "noframes": HTMLElement;
- "noscript": HTMLElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "path": SVGPathElement;
- "pattern": SVGPatternElement;
- "picture": HTMLPictureElement;
- "plaintext": HTMLElement;
- "polygon": SVGPolygonElement;
- "polyline": SVGPolylineElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "radialgradient": SVGRadialGradientElement;
- "rect": SVGRectElement;
- "rt": HTMLElement;
- "ruby": HTMLElement;
- "s": HTMLElement;
- "samp": HTMLElement;
- "script": HTMLScriptElement;
- "section": HTMLElement;
- "select": HTMLSelectElement;
- "small": HTMLElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "stop": SVGStopElement;
- "strike": HTMLElement;
- "strong": HTMLElement;
- "style": HTMLStyleElement;
- "sub": HTMLElement;
- "sup": HTMLElement;
- "svg": SVGSVGElement;
- "switch": SVGSwitchElement;
- "symbol": SVGSymbolElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "text": SVGTextElement;
- "textpath": SVGTextPathElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "tspan": SVGTSpanElement;
- "tt": HTMLElement;
- "u": HTMLElement;
- "ul": HTMLUListElement;
- "use": SVGUseElement;
- "var": HTMLElement;
- "video": HTMLVideoElement;
- "view": SVGViewElement;
- "wbr": HTMLElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementListTagNameMap {
- "a": NodeListOf<HTMLAnchorElement>;
- "abbr": NodeListOf<HTMLElement>;
- "acronym": NodeListOf<HTMLElement>;
- "address": NodeListOf<HTMLElement>;
- "applet": NodeListOf<HTMLAppletElement>;
- "area": NodeListOf<HTMLAreaElement>;
- "article": NodeListOf<HTMLElement>;
- "aside": NodeListOf<HTMLElement>;
- "audio": NodeListOf<HTMLAudioElement>;
- "b": NodeListOf<HTMLElement>;
- "base": NodeListOf<HTMLBaseElement>;
- "basefont": NodeListOf<HTMLBaseFontElement>;
- "bdo": NodeListOf<HTMLElement>;
- "big": NodeListOf<HTMLElement>;
- "blockquote": NodeListOf<HTMLQuoteElement>;
- "body": NodeListOf<HTMLBodyElement>;
- "br": NodeListOf<HTMLBRElement>;
- "button": NodeListOf<HTMLButtonElement>;
- "canvas": NodeListOf<HTMLCanvasElement>;
- "caption": NodeListOf<HTMLTableCaptionElement>;
- "center": NodeListOf<HTMLElement>;
- "circle": NodeListOf<SVGCircleElement>;
- "cite": NodeListOf<HTMLElement>;
- "clippath": NodeListOf<SVGClipPathElement>;
- "code": NodeListOf<HTMLElement>;
- "col": NodeListOf<HTMLTableColElement>;
- "colgroup": NodeListOf<HTMLTableColElement>;
- "datalist": NodeListOf<HTMLDataListElement>;
- "dd": NodeListOf<HTMLElement>;
- "defs": NodeListOf<SVGDefsElement>;
- "del": NodeListOf<HTMLModElement>;
- "desc": NodeListOf<SVGDescElement>;
- "dfn": NodeListOf<HTMLElement>;
- "dir": NodeListOf<HTMLDirectoryElement>;
- "div": NodeListOf<HTMLDivElement>;
- "dl": NodeListOf<HTMLDListElement>;
- "dt": NodeListOf<HTMLElement>;
- "ellipse": NodeListOf<SVGEllipseElement>;
- "em": NodeListOf<HTMLElement>;
- "embed": NodeListOf<HTMLEmbedElement>;
- "feblend": NodeListOf<SVGFEBlendElement>;
- "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
- "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
- "fecomposite": NodeListOf<SVGFECompositeElement>;
- "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
- "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
- "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
- "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
- "feflood": NodeListOf<SVGFEFloodElement>;
- "fefunca": NodeListOf<SVGFEFuncAElement>;
- "fefuncb": NodeListOf<SVGFEFuncBElement>;
- "fefuncg": NodeListOf<SVGFEFuncGElement>;
- "fefuncr": NodeListOf<SVGFEFuncRElement>;
- "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
- "feimage": NodeListOf<SVGFEImageElement>;
- "femerge": NodeListOf<SVGFEMergeElement>;
- "femergenode": NodeListOf<SVGFEMergeNodeElement>;
- "femorphology": NodeListOf<SVGFEMorphologyElement>;
- "feoffset": NodeListOf<SVGFEOffsetElement>;
- "fepointlight": NodeListOf<SVGFEPointLightElement>;
- "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
- "fespotlight": NodeListOf<SVGFESpotLightElement>;
- "fetile": NodeListOf<SVGFETileElement>;
- "feturbulence": NodeListOf<SVGFETurbulenceElement>;
- "fieldset": NodeListOf<HTMLFieldSetElement>;
- "figcaption": NodeListOf<HTMLElement>;
- "figure": NodeListOf<HTMLElement>;
- "filter": NodeListOf<SVGFilterElement>;
- "font": NodeListOf<HTMLFontElement>;
- "footer": NodeListOf<HTMLElement>;
- "foreignobject": NodeListOf<SVGForeignObjectElement>;
- "form": NodeListOf<HTMLFormElement>;
- "frame": NodeListOf<HTMLFrameElement>;
- "frameset": NodeListOf<HTMLFrameSetElement>;
- "g": NodeListOf<SVGGElement>;
- "h1": NodeListOf<HTMLHeadingElement>;
- "h2": NodeListOf<HTMLHeadingElement>;
- "h3": NodeListOf<HTMLHeadingElement>;
- "h4": NodeListOf<HTMLHeadingElement>;
- "h5": NodeListOf<HTMLHeadingElement>;
- "h6": NodeListOf<HTMLHeadingElement>;
- "head": NodeListOf<HTMLHeadElement>;
- "header": NodeListOf<HTMLElement>;
- "hgroup": NodeListOf<HTMLElement>;
- "hr": NodeListOf<HTMLHRElement>;
- "html": NodeListOf<HTMLHtmlElement>;
- "i": NodeListOf<HTMLElement>;
- "iframe": NodeListOf<HTMLIFrameElement>;
- "image": NodeListOf<SVGImageElement>;
- "img": NodeListOf<HTMLImageElement>;
- "input": NodeListOf<HTMLInputElement>;
- "ins": NodeListOf<HTMLModElement>;
- "isindex": NodeListOf<HTMLUnknownElement>;
- "kbd": NodeListOf<HTMLElement>;
- "keygen": NodeListOf<HTMLElement>;
- "label": NodeListOf<HTMLLabelElement>;
- "legend": NodeListOf<HTMLLegendElement>;
- "li": NodeListOf<HTMLLIElement>;
- "line": NodeListOf<SVGLineElement>;
- "lineargradient": NodeListOf<SVGLinearGradientElement>;
- "link": NodeListOf<HTMLLinkElement>;
- "listing": NodeListOf<HTMLPreElement>;
- "map": NodeListOf<HTMLMapElement>;
- "mark": NodeListOf<HTMLElement>;
- "marker": NodeListOf<SVGMarkerElement>;
- "marquee": NodeListOf<HTMLMarqueeElement>;
- "mask": NodeListOf<SVGMaskElement>;
- "menu": NodeListOf<HTMLMenuElement>;
- "meta": NodeListOf<HTMLMetaElement>;
- "metadata": NodeListOf<SVGMetadataElement>;
- "meter": NodeListOf<HTMLMeterElement>;
- "nav": NodeListOf<HTMLElement>;
- "nextid": NodeListOf<HTMLUnknownElement>;
- "nobr": NodeListOf<HTMLElement>;
- "noframes": NodeListOf<HTMLElement>;
- "noscript": NodeListOf<HTMLElement>;
- "object": NodeListOf<HTMLObjectElement>;
- "ol": NodeListOf<HTMLOListElement>;
- "optgroup": NodeListOf<HTMLOptGroupElement>;
- "option": NodeListOf<HTMLOptionElement>;
- "p": NodeListOf<HTMLParagraphElement>;
- "param": NodeListOf<HTMLParamElement>;
- "path": NodeListOf<SVGPathElement>;
- "pattern": NodeListOf<SVGPatternElement>;
- "picture": NodeListOf<HTMLPictureElement>;
- "plaintext": NodeListOf<HTMLElement>;
- "polygon": NodeListOf<SVGPolygonElement>;
- "polyline": NodeListOf<SVGPolylineElement>;
- "pre": NodeListOf<HTMLPreElement>;
- "progress": NodeListOf<HTMLProgressElement>;
- "q": NodeListOf<HTMLQuoteElement>;
- "radialgradient": NodeListOf<SVGRadialGradientElement>;
- "rect": NodeListOf<SVGRectElement>;
- "rt": NodeListOf<HTMLElement>;
- "ruby": NodeListOf<HTMLElement>;
- "s": NodeListOf<HTMLElement>;
- "samp": NodeListOf<HTMLElement>;
- "script": NodeListOf<HTMLScriptElement>;
- "section": NodeListOf<HTMLElement>;
- "select": NodeListOf<HTMLSelectElement>;
- "small": NodeListOf<HTMLElement>;
- "source": NodeListOf<HTMLSourceElement>;
- "span": NodeListOf<HTMLSpanElement>;
- "stop": NodeListOf<SVGStopElement>;
- "strike": NodeListOf<HTMLElement>;
- "strong": NodeListOf<HTMLElement>;
- "style": NodeListOf<HTMLStyleElement>;
- "sub": NodeListOf<HTMLElement>;
- "sup": NodeListOf<HTMLElement>;
- "svg": NodeListOf<SVGSVGElement>;
- "switch": NodeListOf<SVGSwitchElement>;
- "symbol": NodeListOf<SVGSymbolElement>;
- "table": NodeListOf<HTMLTableElement>;
- "tbody": NodeListOf<HTMLTableSectionElement>;
- "td": NodeListOf<HTMLTableDataCellElement>;
- "template": NodeListOf<HTMLTemplateElement>;
- "text": NodeListOf<SVGTextElement>;
- "textpath": NodeListOf<SVGTextPathElement>;
- "textarea": NodeListOf<HTMLTextAreaElement>;
- "tfoot": NodeListOf<HTMLTableSectionElement>;
- "th": NodeListOf<HTMLTableHeaderCellElement>;
- "thead": NodeListOf<HTMLTableSectionElement>;
- "title": NodeListOf<HTMLTitleElement>;
- "tr": NodeListOf<HTMLTableRowElement>;
- "track": NodeListOf<HTMLTrackElement>;
- "tspan": NodeListOf<SVGTSpanElement>;
- "tt": NodeListOf<HTMLElement>;
- "u": NodeListOf<HTMLElement>;
- "ul": NodeListOf<HTMLUListElement>;
- "use": NodeListOf<SVGUseElement>;
- "var": NodeListOf<HTMLElement>;
- "video": NodeListOf<HTMLVideoElement>;
- "view": NodeListOf<SVGViewElement>;
- "wbr": NodeListOf<HTMLElement>;
- "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
- "xmp": NodeListOf<HTMLPreElement>;
-}
-
-declare var Audio: {new(src?: string): HTMLAudioElement; };
-declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
-declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
-declare var applicationCache: ApplicationCache;
-declare var clientInformation: Navigator;
-declare var closed: boolean;
-declare var crypto: Crypto;
-declare var defaultStatus: string;
-declare var devicePixelRatio: number;
-declare var doNotTrack: string;
-declare var document: Document;
-declare var event: Event | undefined;
-declare var external: External;
-declare var frameElement: Element;
-declare var frames: Window;
-declare var history: History;
-declare var innerHeight: number;
-declare var innerWidth: number;
-declare var length: number;
-declare var location: Location;
-declare var locationbar: BarProp;
-declare var menubar: BarProp;
-declare var msCredentials: MSCredentials;
-declare const name: never;
-declare var navigator: Navigator;
-declare var offscreenBuffering: string | boolean;
-declare var onabort: (this: Window, ev: UIEvent) => any;
-declare var onafterprint: (this: Window, ev: Event) => any;
-declare var onbeforeprint: (this: Window, ev: Event) => any;
-declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
-declare var onblur: (this: Window, ev: FocusEvent) => any;
-declare var oncanplay: (this: Window, ev: Event) => any;
-declare var oncanplaythrough: (this: Window, ev: Event) => any;
-declare var onchange: (this: Window, ev: Event) => any;
-declare var onclick: (this: Window, ev: MouseEvent) => any;
-declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
-declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
-declare var ondblclick: (this: Window, ev: MouseEvent) => any;
-declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
-declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
-declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
-declare var ondrag: (this: Window, ev: DragEvent) => any;
-declare var ondragend: (this: Window, ev: DragEvent) => any;
-declare var ondragenter: (this: Window, ev: DragEvent) => any;
-declare var ondragleave: (this: Window, ev: DragEvent) => any;
-declare var ondragover: (this: Window, ev: DragEvent) => any;
-declare var ondragstart: (this: Window, ev: DragEvent) => any;
-declare var ondrop: (this: Window, ev: DragEvent) => any;
-declare var ondurationchange: (this: Window, ev: Event) => any;
-declare var onemptied: (this: Window, ev: Event) => any;
-declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
-declare var onerror: ErrorEventHandler;
-declare var onfocus: (this: Window, ev: FocusEvent) => any;
-declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
-declare var oninput: (this: Window, ev: Event) => any;
-declare var oninvalid: (this: Window, ev: Event) => any;
-declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
-declare var onload: (this: Window, ev: Event) => any;
-declare var onloadeddata: (this: Window, ev: Event) => any;
-declare var onloadedmetadata: (this: Window, ev: Event) => any;
-declare var onloadstart: (this: Window, ev: Event) => any;
-declare var onmessage: (this: Window, ev: MessageEvent) => any;
-declare var onmousedown: (this: Window, ev: MouseEvent) => any;
-declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
-declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
-declare var onmousemove: (this: Window, ev: MouseEvent) => any;
-declare var onmouseout: (this: Window, ev: MouseEvent) => any;
-declare var onmouseover: (this: Window, ev: MouseEvent) => any;
-declare var onmouseup: (this: Window, ev: MouseEvent) => any;
-declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
-declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
-declare var onoffline: (this: Window, ev: Event) => any;
-declare var ononline: (this: Window, ev: Event) => any;
-declare var onorientationchange: (this: Window, ev: Event) => any;
-declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpause: (this: Window, ev: Event) => any;
-declare var onplay: (this: Window, ev: Event) => any;
-declare var onplaying: (this: Window, ev: Event) => any;
-declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
-declare var onprogress: (this: Window, ev: ProgressEvent) => any;
-declare var onratechange: (this: Window, ev: Event) => any;
-declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
-declare var onreset: (this: Window, ev: Event) => any;
-declare var onresize: (this: Window, ev: UIEvent) => any;
-declare var onscroll: (this: Window, ev: UIEvent) => any;
-declare var onseeked: (this: Window, ev: Event) => any;
-declare var onseeking: (this: Window, ev: Event) => any;
-declare var onselect: (this: Window, ev: UIEvent) => any;
-declare var onstalled: (this: Window, ev: Event) => any;
-declare var onstorage: (this: Window, ev: StorageEvent) => any;
-declare var onsubmit: (this: Window, ev: Event) => any;
-declare var onsuspend: (this: Window, ev: Event) => any;
-declare var ontimeupdate: (this: Window, ev: Event) => any;
-declare var ontouchcancel: (ev: TouchEvent) => any;
-declare var ontouchend: (ev: TouchEvent) => any;
-declare var ontouchmove: (ev: TouchEvent) => any;
-declare var ontouchstart: (ev: TouchEvent) => any;
-declare var onunload: (this: Window, ev: Event) => any;
-declare var onvolumechange: (this: Window, ev: Event) => any;
-declare var onwaiting: (this: Window, ev: Event) => any;
-declare var opener: any;
-declare var orientation: string | number;
-declare var outerHeight: number;
-declare var outerWidth: number;
-declare var pageXOffset: number;
-declare var pageYOffset: number;
-declare var parent: Window;
-declare var performance: Performance;
-declare var personalbar: BarProp;
-declare var screen: Screen;
-declare var screenLeft: number;
-declare var screenTop: number;
-declare var screenX: number;
-declare var screenY: number;
-declare var scrollX: number;
-declare var scrollY: number;
-declare var scrollbars: BarProp;
-declare var self: Window;
-declare var status: string;
-declare var statusbar: BarProp;
-declare var styleMedia: StyleMedia;
-declare var toolbar: BarProp;
-declare var top: Window;
-declare var window: Window;
-declare function alert(message?: any): void;
-declare function blur(): void;
-declare function cancelAnimationFrame(handle: number): void;
-declare function captureEvents(): void;
-declare function close(): void;
-declare function confirm(message?: string): boolean;
-declare function focus(): void;
-declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
-declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
-declare function getSelection(): Selection;
-declare function matchMedia(mediaQuery: string): MediaQueryList;
-declare function moveBy(x?: number, y?: number): void;
-declare function moveTo(x?: number, y?: number): void;
-declare function msWriteProfilerMark(profilerMarkName: string): void;
-declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
-declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
-declare function print(): void;
-declare function prompt(message?: string, _default?: string): string | null;
-declare function releaseEvents(): void;
-declare function requestAnimationFrame(callback: FrameRequestCallback): number;
-declare function resizeBy(x?: number, y?: number): void;
-declare function resizeTo(x?: number, y?: number): void;
-declare function scroll(x?: number, y?: number): void;
-declare function scrollBy(x?: number, y?: number): void;
-declare function scrollTo(x?: number, y?: number): void;
-declare function webkitCancelAnimationFrame(handle: number): void;
-declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
-declare function scroll(options?: ScrollToOptions): void;
-declare function scrollTo(options?: ScrollToOptions): void;
-declare function scrollBy(options?: ScrollToOptions): void;
-declare function toString(): string;
-declare function dispatchEvent(evt: Event): boolean;
-declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-declare function clearInterval(handle: number): void;
-declare function clearTimeout(handle: number): void;
-declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
-declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
-declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
-declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-declare function clearImmediate(handle: number): void;
-declare function setImmediate(handler: (...args: any[]) => void): number;
-declare function setImmediate(handler: any, ...args: any[]): number;
-declare var sessionStorage: Storage;
-declare var localStorage: Storage;
-declare var console: Console;
-declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
-declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
-declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
-declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
-declare var onpointermove: (this: Window, ev: PointerEvent) => any;
-declare var onpointerout: (this: Window, ev: PointerEvent) => any;
-declare var onpointerover: (this: Window, ev: PointerEvent) => any;
-declare var onpointerup: (this: Window, ev: PointerEvent) => any;
-declare var onwheel: (this: Window, ev: WheelEvent) => any;
-declare var indexedDB: IDBFactory;
-declare function atob(encodedString: string): string;
-declare function btoa(rawString: string): string;
-declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-type AAGUID = string;
-type AlgorithmIdentifier = string | Algorithm;
-type ConstrainBoolean = boolean | ConstrainBooleanParameters;
-type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
-type ConstrainDouble = number | ConstrainDoubleRange;
-type ConstrainLong = number | ConstrainLongRange;
-type CryptoOperationData = ArrayBufferView;
-type GLbitfield = number;
-type GLboolean = boolean;
-type GLbyte = number;
-type GLclampf = number;
-type GLenum = number;
-type GLfloat = number;
-type GLint = number;
-type GLintptr = number;
-type GLshort = number;
-type GLsizei = number;
-type GLsizeiptr = number;
-type GLubyte = number;
-type GLuint = number;
-type GLushort = number;
-type IDBKeyPath = string;
-type KeyFormat = string;
-type KeyType = string;
-type KeyUsage = string;
-type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
-type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
-type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
-type RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;
-type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
-type payloadtype = number;
-type ScrollBehavior = "auto" | "instant" | "smooth";
-type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
-type IDBValidKey = number | string | Date | IDBArrayKey;
-type BufferSource = ArrayBuffer | ArrayBufferView;
-type MouseWheelEvent = WheelEvent;
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare const NaN: number;
+declare const Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+declare function parseInt(s: string, radix?: number): number;
+
+/**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an encoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an encoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string): string;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get? (): any;
+ set? (v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [s: string]: PropertyDescriptor;
+}
+
+interface Object {
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
+ constructor: Function;
+
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: string): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: string): boolean;
+}
+
+interface ObjectConstructor {
+ new (value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ readonly prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype or that has null prototype.
+ * @param o Object to use as a prototype. May be null.
+ */
+ create(o: object | null): any;
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty(o: any, p: string, attributes: PropertyDescriptor & ThisType<any>): any;
+
+ /**
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
+ */
+ defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ seal<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(a: T[]): ReadonlyArray<T>;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T extends Function>(f: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: any): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare const Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(this: Function, thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /** Returns a string representation of a function. */
+ toString(): string;
+
+ prototype: any;
+ readonly length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): Function;
+ (...args: string[]): Function;
+ readonly prototype: Function;
+}
+
+declare const Function: FunctionConstructor;
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string | RegExp): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string | RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string | RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ readonly length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ readonly [index: number]: string;
+}
+
+interface StringConstructor {
+ new (value?: any): String;
+ (value?: any): string;
+ readonly prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare const String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new (value?: any): Boolean;
+ (value?: any): boolean;
+ readonly prototype: Boolean;
+}
+
+declare const Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new (value?: any): Number;
+ (value?: any): number;
+ readonly prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ readonly MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ readonly MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ readonly NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ readonly NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ readonly POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare const Number: NumberConstructor;
+
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: ReadonlyArray<string>;
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ readonly E: number;
+ /** The natural logarithm of 10. */
+ readonly LN10: number;
+ /** The natural logarithm of 2. */
+ readonly LN2: number;
+ /** The base-2 logarithm of e. */
+ readonly LOG2E: number;
+ /** The base-10 logarithm of e. */
+ readonly LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ readonly PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ readonly SQRT1_2: number;
+ /** The square root of 2. */
+ readonly SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest number greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest number less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest number.
+ * @param x The value to be rounded to the nearest number.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare const Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new (): Date;
+ new (value: number): Date;
+ new (value: string): Date;
+ new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ readonly prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as an number between 0 and 11 (January to December).
+ * @param date The date as an number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
+ * @param ms An number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare const Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ index?: number;
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ index: number;
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray | null;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ readonly source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ readonly global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ readonly ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ readonly multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ compile(): this;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp | string): RegExp;
+ new (pattern: string, flags?: string): RegExp;
+ (pattern: RegExp | string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ readonly prototype: RegExp;
+
+ // Non-standard extensions
+ $1: string;
+ $2: string;
+ $3: string;
+ $4: string;
+ $5: string;
+ $6: string;
+ $7: string;
+ $8: string;
+ $9: string;
+ lastMatch: string;
+}
+
+declare const RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+ stack?: string;
+}
+
+interface ErrorConstructor {
+ new (message?: string): Error;
+ (message?: string): Error;
+ readonly prototype: Error;
+}
+
+declare const Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor {
+ new (message?: string): EvalError;
+ (message?: string): EvalError;
+ readonly prototype: EvalError;
+}
+
+declare const EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor {
+ new (message?: string): RangeError;
+ (message?: string): RangeError;
+ readonly prototype: RangeError;
+}
+
+declare const RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor {
+ new (message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ readonly prototype: ReferenceError;
+}
+
+declare const ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor {
+ new (message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ readonly prototype: SyntaxError;
+}
+
+declare const SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor {
+ new (message?: string): TypeError;
+ (message?: string): TypeError;
+ readonly prototype: TypeError;
+}
+
+declare const TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor {
+ new (message?: string): URIError;
+ (message?: string): URIError;
+ readonly prototype: URIError;
+}
+
+declare const URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
+}
+
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare const JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S): S[];
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: undefined): S[];
+ filter<Z, S extends T>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: Z): S[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Appends new elements to an array, and returns the new length of the array.
+ * @param items New elements of the Array.
+ */
+ push(...items: T[]): number;
+ /**
+ * Removes the last element from an array and returns it.
+ */
+ pop(): T | undefined;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): T[];
+ /**
+ * Removes the first element from an array and returns it.
+ */
+ shift(): T | undefined;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: T, b: T) => number): this;
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ */
+ splice(start: number, deleteCount?: number): T[];
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ */
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
+ /**
+ * Inserts new elements at the start of an array.
+ * @param items Elements to insert at the start of the Array.
+ */
+ unshift(...items: T[]): number;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U];
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U];
+ map<Z, U>(this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U];
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U];
+ map<Z, U>(this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U];
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U];
+ map<Z, U>(this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U];
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U];
+ map<Z, U>(this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new (arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is Array<any>;
+ readonly prototype: Array<any>;
+}
+
+declare const Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+}
+
+interface ArrayLike<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+}
+
+/**
+ * Make all properties in T optional
+ */
+type Partial<T> = {
+ [P in keyof T]?: T[P];
+};
+
+/**
+ * Make all properties in T readonly
+ */
+type Readonly<T> = {
+ readonly [P in keyof T]: T[P];
+};
+
+/**
+ * From T pick a set of properties K
+ */
+type Pick<T, K extends keyof T> = {
+ [P in K]: T[P];
+};
+
+/**
+ * Construct a type with a set of properties K of type T
+ */
+type Record<K extends string, T> = {
+ [P in K]: T;
+};
+
+/**
+ * Marker for contextual 'this' type
+ */
+interface ThisType<T> { }
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin: number, end?: number): ArrayBuffer;
+}
+
+interface ArrayBufferConstructor {
+ readonly prototype: ArrayBuffer;
+ new (byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare const ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt8(byteOffset: number): number;
+
+ /**
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
+ /**
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint8(byteOffset: number): number;
+
+ /**
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Stores an Float32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Float64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setInt8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Int16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setUint8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
+}
+
+interface DataViewConstructor {
+ new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+}
+declare const DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any): Int8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any, thisArg: undefined): Int8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => any, thisArg: Z): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number): Int8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: undefined): Int8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => number, thisArg: Z): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ readonly prototype: Int8Array;
+ new (length: number): Int8Array;
+ new (array: ArrayLike<number>): Int8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array;
+
+ from(arrayLike: ArrayLike<number>): Int8Array;
+
+}
+declare const Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any): Uint8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any, thisArg: undefined): Uint8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => any, thisArg: Z): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number): Uint8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: undefined): Uint8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => number, thisArg: Z): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ readonly prototype: Uint8Array;
+ new (length: number): Uint8Array;
+ new (array: ArrayLike<number>): Uint8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array;
+
+ from(arrayLike: ArrayLike<number>): Uint8Array;
+
+}
+declare const Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any): Uint8ClampedArray;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: undefined): Uint8ClampedArray;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number): Uint8ClampedArray;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: undefined): Uint8ClampedArray;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: Uint8ClampedArray, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ readonly prototype: Uint8ClampedArray;
+ new (length: number): Uint8ClampedArray;
+ new (array: ArrayLike<number>): Uint8ClampedArray;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray;
+
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
+}
+declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any): Int16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any, thisArg: undefined): Int16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => any, thisArg: Z): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number): Int16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: undefined): Int16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => number, thisArg: Z): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ readonly prototype: Int16Array;
+ new (length: number): Int16Array;
+ new (array: ArrayLike<number>): Int16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array;
+
+ from(arrayLike: ArrayLike<number>): Int16Array;
+
+}
+declare const Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any): Uint16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any, thisArg: undefined): Uint16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => any, thisArg: Z): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number): Uint16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: undefined): Uint16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => number, thisArg: Z): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ readonly prototype: Uint16Array;
+ new (length: number): Uint16Array;
+ new (array: ArrayLike<number>): Uint16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array;
+
+ from(arrayLike: ArrayLike<number>): Uint16Array;
+
+}
+declare const Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any): Int32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any, thisArg: undefined): Int32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => any, thisArg: Z): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number): Int32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number, thisArg: undefined): Int32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => number, thisArg: Z): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ readonly prototype: Int32Array;
+ new (length: number): Int32Array;
+ new (array: ArrayLike<number>): Int32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array;
+
+ from(arrayLike: ArrayLike<number>): Int32Array;
+}
+declare const Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any): Uint32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any, thisArg: undefined): Uint32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => any, thisArg: Z): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number): Uint32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: undefined): Uint32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => number, thisArg: Z): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ readonly prototype: Uint32Array;
+ new (length: number): Uint32Array;
+ new (array: ArrayLike<number>): Uint32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array;
+
+ from(arrayLike: ArrayLike<number>): Uint32Array;
+}
+declare const Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any): Float32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any, thisArg: undefined): Float32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => any, thisArg: Z): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number): Float32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: undefined): Float32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => number, thisArg: Z): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ readonly prototype: Float32Array;
+ new (length: number): Float32Array;
+ new (array: ArrayLike<number>): Float32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array;
+
+ from(arrayLike: ArrayLike<number>): Float32Array;
+
+}
+declare const Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any): Float64Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any, thisArg: undefined): Float64Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => any, thisArg: Z): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number): Float64Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number, thisArg: undefined): Float64Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => number, thisArg: Z): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float64Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ readonly prototype: Float64Array;
+ new (length: number): Float64Array;
+ new (array: ArrayLike<number>): Float64Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float64Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array;
+
+ from(arrayLike: ArrayLike<number>): Float64Array;
+}
+declare const Float64Array: Float64ArrayConstructor;
+
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare namespace Intl {
+ interface CollatorOptions {
+ usage?: string;
+ localeMatcher?: string;
+ numeric?: boolean;
+ caseFirst?: string;
+ sensitivity?: string;
+ ignorePunctuation?: boolean;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new (locales?: string | string[], options?: CollatorOptions): Collator;
+ (locales?: string | string[], options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
+ };
+
+ interface NumberFormatOptions {
+ localeMatcher?: string;
+ style?: string;
+ currency?: string;
+ currencyDisplay?: string;
+ useGrouping?: boolean;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ currencyDisplay?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
+ };
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: string;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ formatMatcher?: string;
+ hour12?: boolean;
+ timeZone?: string;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
+ };
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current or specified locale.
+ * @param that String to compare to target string
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+}
+
+
+
+/////////////////////////////
+/// IE DOM APIs
+/////////////////////////////
+
+interface Account {
+ rpDisplayName?: string;
+ displayName?: string;
+ id?: string;
+ name?: string;
+ imageURL?: string;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AnimationEventInit extends EventInit {
+ animationName?: string;
+ elapsedTime?: number;
+}
+
+interface AssertionOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ allowList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface CacheQueryOptions {
+ ignoreSearch?: boolean;
+ ignoreMethod?: boolean;
+ ignoreVary?: boolean;
+ cacheName?: string;
+}
+
+interface ClientData {
+ challenge?: string;
+ origin?: string;
+ rpId?: string;
+ hashAlg?: string | Algorithm;
+ tokenBinding?: string;
+ extensions?: WebAuthnExtensions;
+}
+
+interface CloseEventInit extends EventInit {
+ wasClean?: boolean;
+ code?: number;
+ reason?: string;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainLongRange extends LongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainVideoFacingModeParameters {
+ exact?: VideoFacingModeEnum | VideoFacingModeEnum[];
+ ideal?: VideoFacingModeEnum | VideoFacingModeEnum[];
+}
+
+interface CustomEventInit extends EventInit {
+ detail?: any;
+}
+
+interface DOMRectInit {
+ x?: any;
+ y?: any;
+ width?: any;
+ height?: any;
+}
+
+interface DeviceAccelerationDict {
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DeviceLightEventInit extends EventInit {
+ value?: number;
+}
+
+interface DeviceMotionEventInit extends EventInit {
+ acceleration?: DeviceAccelerationDict;
+ accelerationIncludingGravity?: DeviceAccelerationDict;
+ rotationRate?: DeviceRotationRateDict;
+ interval?: number;
+}
+
+interface DeviceOrientationEventInit extends EventInit {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+ absolute?: boolean;
+}
+
+interface DeviceRotationRateDict {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+}
+
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
+interface ErrorEventInit extends EventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ colno?: number;
+ error?: any;
+}
+
+interface EventInit {
+ scoped?: boolean;
+ bubbles?: boolean;
+ cancelable?: boolean;
+}
+
+interface EventModifierInit extends UIEventInit {
+ ctrlKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierOS?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+}
+
+interface ExceptionInformation {
+ domain?: string;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget;
+}
+
+interface FocusNavigationEventInit extends EventInit {
+ navigationReason?: string;
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface FocusNavigationOrigin {
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface GamepadEventInit extends EventInit {
+ gamepad?: Gamepad;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: IDBKeyPath;
+}
+
+interface IntersectionObserverEntryInit {
+ time?: number;
+ rootBounds?: DOMRectInit;
+ boundingClientRect?: DOMRectInit;
+ intersectionRect?: DOMRectInit;
+ target?: Element;
+}
+
+interface IntersectionObserverInit {
+ root?: Element;
+ rootMargin?: string;
+ threshold?: number | number[];
+}
+
+interface KeyAlgorithm {
+ name?: string;
+}
+
+interface KeyboardEventInit extends EventModifierInit {
+ code?: string;
+ key?: string;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface LongRange {
+ max?: number;
+ min?: number;
+}
+
+interface MSAccountInfo {
+ rpDisplayName?: string;
+ userDisplayName?: string;
+ accountName?: string;
+ userId?: string;
+ accountImageUri?: string;
+}
+
+interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
+ networkSendQualityEventRatio?: number;
+ networkDelayEventRatio?: number;
+ cpuInsufficientEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceCaptureNotFunctioningEventRatio?: number;
+ deviceGlitchesEventRatio?: number;
+ deviceLowSNREventRatio?: number;
+ deviceLowSpeechLevelEventRatio?: number;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
+ deviceNearEndToEchoRatioEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ deviceRenderMuteEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
+ deviceHowlingEventCount?: number;
+}
+
+interface MSAudioRecvPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
+ packetReorderRatio?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ burstLossLength1?: number;
+ burstLossLength2?: number;
+ burstLossLength3?: number;
+ burstLossLength4?: number;
+ burstLossLength5?: number;
+ burstLossLength6?: number;
+ burstLossLength7?: number;
+ burstLossLength8OrHigher?: number;
+ fecRecvDistance1?: number;
+ fecRecvDistance2?: number;
+ fecRecvDistance3?: number;
+ ratioConcealedSamplesAvg?: number;
+ ratioStretchedSamplesAvg?: number;
+ ratioCompressedSamplesAvg?: number;
+}
+
+interface MSAudioRecvSignal {
+ initialSignalLevelRMS?: number;
+ recvSignalLevelCh1?: number;
+ recvNoiseLevelCh1?: number;
+ renderSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderLoopbackSignalLevel?: number;
+}
+
+interface MSAudioSendPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioSendSignal;
+ audioFECUsed?: boolean;
+ sendMutePercent?: number;
+}
+
+interface MSAudioSendSignal {
+ noiseLevel?: number;
+ sendSignalLevelCh1?: number;
+ sendNoiseLevelCh1?: number;
+}
+
+interface MSConnectivity {
+ iceType?: MSIceType;
+ iceWarningFlags?: MSIceWarningFlags;
+ relayAddress?: MSRelayAddress;
+}
+
+interface MSCredentialFilter {
+ accept?: MSCredentialSpec[];
+}
+
+interface MSCredentialParameters {
+ type?: MSCredentialType;
+}
+
+interface MSCredentialSpec {
+ type?: MSCredentialType;
+ id?: string;
+}
+
+interface MSDelay {
+ roundTrip?: number;
+ roundTripMax?: number;
+}
+
+interface MSDescription extends RTCStats {
+ connectivity?: MSConnectivity;
+ transport?: RTCIceProtocol;
+ networkconnectivity?: MSNetworkConnectivityInfo;
+ localAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ deviceDevName?: string;
+ reflexiveLocalIPAddr?: MSIPAddressInfo;
+}
+
+interface MSFIDOCredentialParameters extends MSCredentialParameters {
+ algorithm?: string | Algorithm;
+ authenticators?: AAGUID[];
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ port?: number;
+ manufacturerMacAddrMask?: string;
+}
+
+interface MSIceWarningFlags {
+ turnTcpTimedOut?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
+ allocationMessageIntegrityFailed?: boolean;
+ connCheckOtherError?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ noRelayServersConfigured?: boolean;
+ multipleRelayServersAttempted?: boolean;
+ portRangeExhausted?: boolean;
+ alternateServerReceived?: boolean;
+ pseudoTLSFailure?: boolean;
+ turnTurnTcpConnectivityFailed?: boolean;
+ useCandidateChecksFailed?: boolean;
+ fipsAllocationFailure?: boolean;
+}
+
+interface MSJitter {
+ interArrival?: number;
+ interArrivalMax?: number;
+ interArrivalSD?: number;
+}
+
+interface MSLocalClientEventBase extends RTCStats {
+ networkReceiveQualityEventRatio?: number;
+ networkBandwidthLowEventRatio?: number;
+}
+
+interface MSNetwork extends RTCStats {
+ jitter?: MSJitter;
+ delay?: MSDelay;
+ packetLoss?: MSPacketLoss;
+ utilization?: MSUtilization;
+}
+
+interface MSNetworkConnectivityInfo {
+ vpn?: boolean;
+ linkspeed?: number;
+ networkConnectionDetails?: string;
+}
+
+interface MSNetworkInterfaceType {
+ interfaceTypeEthernet?: boolean;
+ interfaceTypeWireless?: boolean;
+ interfaceTypePPP?: boolean;
+ interfaceTypeTunnel?: boolean;
+ interfaceTypeWWAN?: boolean;
+}
+
+interface MSOutboundNetwork extends MSNetwork {
+ appliedBandwidthLimit?: number;
+}
+
+interface MSPacketLoss {
+ lossRate?: number;
+ lossRateMax?: number;
+}
+
+interface MSPayloadBase extends RTCStats {
+ payloadDescription?: string;
+}
+
+interface MSPortRange {
+ min?: number;
+ max?: number;
+}
+
+interface MSRelayAddress {
+ relayAddress?: string;
+ port?: number;
+}
+
+interface MSSignatureParameters {
+ userPrompt?: string;
+}
+
+interface MSTransportDiagnosticsStats extends RTCStats {
+ baseAddress?: string;
+ localAddress?: string;
+ localSite?: string;
+ networkName?: string;
+ remoteAddress?: string;
+ remoteSite?: string;
+ localMR?: string;
+ remoteMR?: string;
+ iceWarningFlags?: MSIceWarningFlags;
+ portRangeMin?: number;
+ portRangeMax?: number;
+ localMRTCPPort?: number;
+ remoteMRTCPPort?: number;
+ stunVer?: number;
+ numConsentReqSent?: number;
+ numConsentReqReceived?: number;
+ numConsentRespSent?: number;
+ numConsentRespReceived?: number;
+ interfaces?: MSNetworkInterfaceType;
+ baseInterface?: MSNetworkInterfaceType;
+ protocol?: RTCIceProtocol;
+ localInterface?: MSNetworkInterfaceType;
+ localAddrType?: MSIceAddrType;
+ remoteAddrType?: MSIceAddrType;
+ iceRole?: RTCIceRole;
+ rtpRtcpMux?: boolean;
+ allocationTimeInMs?: number;
+ msRtcEngineVersion?: string;
+}
+
+interface MSUtilization {
+ packets?: number;
+ bandwidthEstimation?: number;
+ bandwidthEstimationMin?: number;
+ bandwidthEstimationMax?: number;
+ bandwidthEstimationStdDev?: number;
+ bandwidthEstimationAvg?: number;
+}
+
+interface MSVideoPayload extends MSPayloadBase {
+ resolution?: string;
+ videoBitRateAvg?: number;
+ videoBitRateMax?: number;
+ videoFrameRateAvg?: number;
+ videoPacketLossRate?: number;
+ durationSeconds?: number;
+}
+
+interface MSVideoRecvPayload extends MSVideoPayload {
+ videoFrameLossRate?: number;
+ recvCodecType?: string;
+ recvResolutionWidth?: number;
+ recvResolutionHeight?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
+ recvFrameRateAverage?: number;
+ recvBitRateMaximum?: number;
+ recvBitRateAverage?: number;
+ recvVideoStreamsMax?: number;
+ recvVideoStreamsMin?: number;
+ recvVideoStreamsMode?: number;
+ videoPostFECPLR?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ reorderBufferTotalPackets?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvFpsHarmonicAverage?: number;
+ recvNumResSwitches?: number;
+}
+
+interface MSVideoResolutionDistribution {
+ cifQuality?: number;
+ vgaQuality?: number;
+ h720Quality?: number;
+ h1080Quality?: number;
+ h1440Quality?: number;
+ h2160Quality?: number;
+}
+
+interface MSVideoSendPayload extends MSVideoPayload {
+ sendFrameRateAverage?: number;
+ sendBitRateMaximum?: number;
+ sendBitRateAverage?: number;
+ sendVideoStreamsMax?: number;
+ sendResolutionWidth?: number;
+ sendResolutionHeight?: number;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initDataType?: string;
+ initData?: ArrayBuffer;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ messageType?: MediaKeyMessageType;
+ message?: ArrayBuffer;
+}
+
+interface MediaKeySystemConfiguration {
+ initDataTypes?: string[];
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ persistentState?: MediaKeysRequirement;
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ video?: boolean | MediaTrackConstraints;
+ audio?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ width?: number | LongRange;
+ height?: number | LongRange;
+ aspectRatio?: number | DoubleRange;
+ frameRate?: number | DoubleRange;
+ facingMode?: string;
+ volume?: number | DoubleRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ echoCancellation?: boolean[];
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackConstraintSet {
+ width?: number | ConstrainLongRange;
+ height?: number | ConstrainLongRange;
+ aspectRatio?: number | ConstrainDoubleRange;
+ frameRate?: number | ConstrainDoubleRange;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ volume?: number | ConstrainDoubleRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ width?: number;
+ height?: number;
+ aspectRatio?: number;
+ frameRate?: number;
+ facingMode?: string;
+ volume?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ echoCancellation?: boolean;
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackSupportedConstraints {
+ width?: boolean;
+ height?: boolean;
+ aspectRatio?: boolean;
+ frameRate?: boolean;
+ facingMode?: boolean;
+ volume?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ echoCancellation?: boolean;
+ deviceId?: boolean;
+ groupId?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ source?: Window;
+ ports?: MessagePort[];
+}
+
+interface MouseEventInit extends EventModifierInit {
+ screenX?: number;
+ screenY?: number;
+ clientX?: number;
+ clientY?: number;
+ button?: number;
+ buttons?: number;
+ relatedTarget?: EventTarget;
+}
+
+interface MsZoomToOptions {
+ contentX?: number;
+ contentY?: number;
+ viewportX?: string;
+ viewportY?: string;
+ scaleFactor?: number;
+ animate?: string;
+}
+
+interface MutationObserverInit {
+ childList?: boolean;
+ attributes?: boolean;
+ characterData?: boolean;
+ subtree?: boolean;
+ attributeOldValue?: boolean;
+ characterDataOldValue?: boolean;
+ attributeFilter?: string[];
+}
+
+interface NotificationOptions {
+ dir?: NotificationDirection;
+ lang?: string;
+ body?: string;
+ tag?: string;
+ icon?: string;
+}
+
+interface ObjectURLOptions {
+ oneTimeOnly?: boolean;
+}
+
+interface PaymentCurrencyAmount {
+ currency?: string;
+ value?: string;
+ currencySystem?: string;
+}
+
+interface PaymentDetails {
+ total?: PaymentItem;
+ displayItems?: PaymentItem[];
+ shippingOptions?: PaymentShippingOption[];
+ modifiers?: PaymentDetailsModifier[];
+ error?: string;
+}
+
+interface PaymentDetailsModifier {
+ supportedMethods?: string[];
+ total?: PaymentItem;
+ additionalDisplayItems?: PaymentItem[];
+ data?: any;
+}
+
+interface PaymentItem {
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ pending?: boolean;
+}
+
+interface PaymentMethodData {
+ supportedMethods?: string[];
+ data?: any;
+}
+
+interface PaymentOptions {
+ requestPayerName?: boolean;
+ requestPayerEmail?: boolean;
+ requestPayerPhone?: boolean;
+ requestShipping?: boolean;
+ shippingType?: string;
+}
+
+interface PaymentRequestUpdateEventInit extends EventInit {
+}
+
+interface PaymentShippingOption {
+ id?: string;
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ selected?: boolean;
+}
+
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ pointerId?: number;
+ width?: number;
+ height?: number;
+ pressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ pointerType?: string;
+ isPrimary?: boolean;
+}
+
+interface PopStateEventInit extends EventInit {
+ state?: any;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ timeout?: number;
+ maximumAge?: number;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PushSubscriptionOptionsInit {
+ userVisibleOnly?: boolean;
+ applicationServerKey?: any;
+}
+
+interface RTCConfiguration {
+ iceServers?: RTCIceServer[];
+ iceTransportPolicy?: RTCIceTransportPolicy;
+ bundlePolicy?: RTCBundlePolicy;
+ peerIdentity?: string;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCDtlsParameters {
+ role?: RTCDtlsRole;
+ fingerprints?: RTCDtlsFingerprint[];
+}
+
+interface RTCIceCandidateAttributes extends RTCStats {
+ ipAddress?: string;
+ portNumber?: number;
+ transport?: string;
+ candidateType?: RTCStatsIceCandidateType;
+ priority?: number;
+ addressSourceUrl?: string;
+}
+
+interface RTCIceCandidateComplete {
+}
+
+interface RTCIceCandidateDictionary {
+ foundation?: string;
+ priority?: number;
+ ip?: string;
+ protocol?: RTCIceProtocol;
+ port?: number;
+ type?: RTCIceCandidateType;
+ tcpType?: RTCIceTcpCandidateType;
+ relatedAddress?: string;
+ relatedPort?: number;
+ msMTurnSessionId?: string;
+}
+
+interface RTCIceCandidateInit {
+ candidate?: string;
+ sdpMid?: string;
+ sdpMLineIndex?: number;
+}
+
+interface RTCIceCandidatePair {
+ local?: RTCIceCandidateDictionary;
+ remote?: RTCIceCandidateDictionary;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ transportId?: string;
+ localCandidateId?: string;
+ remoteCandidateId?: string;
+ state?: RTCStatsIceCandidatePairState;
+ priority?: number;
+ nominated?: boolean;
+ writable?: boolean;
+ readable?: boolean;
+ bytesSent?: number;
+ bytesReceived?: number;
+ roundTripTime?: number;
+ availableOutgoingBitrate?: number;
+ availableIncomingBitrate?: number;
+}
+
+interface RTCIceGatherOptions {
+ gatherPolicy?: RTCIceGatherPolicy;
+ iceservers?: RTCIceServer[];
+ portRange?: MSPortRange;
+}
+
+interface RTCIceParameters {
+ usernameFragment?: string;
+ password?: string;
+ iceLite?: boolean;
+}
+
+interface RTCIceServer {
+ urls?: any;
+ username?: string;
+ credential?: string;
+}
+
+interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsReceived?: number;
+ bytesReceived?: number;
+ packetsLost?: number;
+ jitter?: number;
+ fractionLost?: number;
+}
+
+interface RTCMediaStreamTrackStats extends RTCStats {
+ trackIdentifier?: string;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ frameWidth?: number;
+ frameHeight?: number;
+ framesPerSecond?: number;
+ framesSent?: number;
+ framesReceived?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesCorrupted?: number;
+ audioLevel?: number;
+ echoReturnLoss?: number;
+ echoReturnLossEnhancement?: number;
+}
+
+interface RTCOfferOptions {
+ offerToReceiveVideo?: number;
+ offerToReceiveAudio?: number;
+ voiceActivityDetection?: boolean;
+ iceRestart?: boolean;
+}
+
+interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsSent?: number;
+ bytesSent?: number;
+ targetBitrate?: number;
+ roundTripTime?: number;
+}
+
+interface RTCPeerConnectionIceEventInit extends EventInit {
+ candidate?: RTCIceCandidate;
+}
+
+interface RTCRTPStreamStats extends RTCStats {
+ ssrc?: string;
+ associateStatsId?: string;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ transportId?: string;
+ codecId?: string;
+ firCount?: number;
+ pliCount?: number;
+ nackCount?: number;
+ sliCount?: number;
+}
+
+interface RTCRtcpFeedback {
+ type?: string;
+ parameter?: string;
+}
+
+interface RTCRtcpParameters {
+ ssrc?: number;
+ cname?: string;
+ reducedSize?: boolean;
+ mux?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs?: RTCRtpCodecCapability[];
+ headerExtensions?: RTCRtpHeaderExtension[];
+ fecMechanisms?: string[];
+}
+
+interface RTCRtpCodecCapability {
+ name?: string;
+ kind?: string;
+ clockRate?: number;
+ preferredPayloadType?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+ options?: any;
+ maxTemporalLayers?: number;
+ maxSpatialLayers?: number;
+ svcMultiStreamSupport?: boolean;
+}
+
+interface RTCRtpCodecParameters {
+ name?: string;
+ payloadType?: any;
+ clockRate?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+}
+
+interface RTCRtpContributingSource {
+ timestamp?: number;
+ csrc?: number;
+ audioLevel?: number;
+}
+
+interface RTCRtpEncodingParameters {
+ ssrc?: number;
+ codecPayloadType?: number;
+ fec?: RTCRtpFecParameters;
+ rtx?: RTCRtpRtxParameters;
+ priority?: number;
+ maxBitrate?: number;
+ minQuality?: number;
+ resolutionScale?: number;
+ framerateScale?: number;
+ maxFramerate?: number;
+ active?: boolean;
+ encodingId?: string;
+ dependencyEncodingIds?: string[];
+ ssrcRange?: RTCSsrcRange;
+}
+
+interface RTCRtpFecParameters {
+ ssrc?: number;
+ mechanism?: string;
+}
+
+interface RTCRtpHeaderExtension {
+ kind?: string;
+ uri?: string;
+ preferredId?: number;
+ preferredEncrypt?: boolean;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ uri?: string;
+ id?: number;
+ encrypt?: boolean;
+}
+
+interface RTCRtpParameters {
+ muxId?: string;
+ codecs?: RTCRtpCodecParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ encodings?: RTCRtpEncodingParameters[];
+ rtcp?: RTCRtcpParameters;
+ degradationPreference?: RTCDegradationPreference;
+}
+
+interface RTCRtpRtxParameters {
+ ssrc?: number;
+}
+
+interface RTCRtpUnhandled {
+ ssrc?: number;
+ payloadType?: number;
+ muxId?: string;
+}
+
+interface RTCSessionDescriptionInit {
+ type?: RTCSdpType;
+ sdp?: string;
+}
+
+interface RTCSrtpKeyParam {
+ keyMethod?: string;
+ keySalt?: string;
+ lifetime?: string;
+ mkiValue?: number;
+ mkiLength?: number;
+}
+
+interface RTCSrtpSdesParameters {
+ tag?: number;
+ cryptoSuite?: string;
+ keyParams?: RTCSrtpKeyParam[];
+ sessionParams?: string[];
+}
+
+interface RTCSsrcRange {
+ min?: number;
+ max?: number;
+}
+
+interface RTCStats {
+ timestamp?: number;
+ type?: RTCStatsType;
+ id?: string;
+ msType?: MSStatsType;
+}
+
+interface RTCStatsReport {
+}
+
+interface RTCTransportStats extends RTCStats {
+ bytesSent?: number;
+ bytesReceived?: number;
+ rtcpTransportStatsId?: string;
+ activeConnection?: boolean;
+ selectedCandidatePairId?: string;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ method?: string;
+ headers?: any;
+ body?: any;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ mode?: RequestMode;
+ credentials?: RequestCredentials;
+ cache?: RequestCache;
+ redirect?: RequestRedirect;
+ integrity?: string;
+ keepalive?: boolean;
+ window?: any;
+}
+
+interface ResponseInit {
+ status?: number;
+ statusText?: string;
+ headers?: any;
+}
+
+interface ScopedCredentialDescriptor {
+ type?: ScopedCredentialType;
+ id?: any;
+ transports?: Transport[];
+}
+
+interface ScopedCredentialOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ excludeList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface ScopedCredentialParameters {
+ type?: ScopedCredentialType;
+ algorithm?: string | Algorithm;
+}
+
+interface ServiceWorkerMessageEventInit extends EventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+ source?: ServiceWorker | MessagePort;
+ ports?: MessagePort[];
+}
+
+interface SpeechSynthesisEventInit extends EventInit {
+ utterance?: SpeechSynthesisUtterance;
+ charIndex?: number;
+ elapsedTime?: number;
+ name?: string;
+}
+
+interface StoreExceptionsInformation extends ExceptionInformation {
+ siteName?: string;
+ explanationString?: string;
+ detailURI?: string;
+}
+
+interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface TrackEventInit extends EventInit {
+ track?: VideoTrack | AudioTrack | TextTrack;
+}
+
+interface TransitionEventInit extends EventInit {
+ propertyName?: string;
+ elapsedTime?: number;
+}
+
+interface UIEventInit extends EventInit {
+ view?: Window;
+ detail?: number;
+}
+
+interface WebAuthnExtensions {
+}
+
+interface WebGLContextAttributes {
+ failIfMajorPerformanceCaveat?: boolean;
+ alpha?: boolean;
+ depth?: boolean;
+ stencil?: boolean;
+ antialias?: boolean;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+ deltaMode?: number;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface WebKitEntriesCallback {
+ (evt: Event): void;
+}
+
+interface WebKitErrorCallback {
+ (evt: Event): void;
+}
+
+interface WebKitFileCallback {
+ (evt: Event): void;
+}
+
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
+ drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
+ vertexAttribDivisorANGLE(index: number, divisor: number): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+declare var ANGLE_instanced_arrays: {
+ prototype: ANGLE_instanced_arrays;
+ new(): ANGLE_instanced_arrays;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ readonly frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(): AnalyserNode;
+}
+
+interface AnimationEvent extends Event {
+ readonly animationName: string;
+ readonly elapsedTime: number;
+ initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
+}
+
+interface ApplicationCacheEventMap {
+ "cached": Event;
+ "checking": Event;
+ "downloading": Event;
+ "error": Event;
+ "noupdate": Event;
+ "obsolete": Event;
+ "progress": ProgressEvent;
+ "updateready": Event;
+}
+
+interface ApplicationCache extends EventTarget {
+ oncached: (this: ApplicationCache, ev: Event) => any;
+ onchecking: (this: ApplicationCache, ev: Event) => any;
+ ondownloading: (this: ApplicationCache, ev: Event) => any;
+ onerror: (this: ApplicationCache, ev: Event) => any;
+ onnoupdate: (this: ApplicationCache, ev: Event) => any;
+ onobsolete: (this: ApplicationCache, ev: Event) => any;
+ onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
+ onupdateready: (this: ApplicationCache, ev: Event) => any;
+ readonly status: number;
+ abort(): void;
+ swapCache(): void;
+ update(): void;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+ addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ApplicationCache: {
+ prototype: ApplicationCache;
+ new(): ApplicationCache;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+}
+
+interface Attr extends Node {
+ readonly name: string;
+ readonly ownerElement: Element;
+ readonly prefix: string | null;
+ readonly specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+}
+
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(): AudioBuffer;
+}
+
+interface AudioBufferSourceNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface AudioBufferSourceNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
+ readonly playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(): AudioBufferSourceNode;
+}
+
+interface AudioContextEventMap {
+ "statechange": Event;
+}
+
+interface AudioContextBase extends EventTarget {
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ onstatechange: (this: AudioContext, ev: Event) => any;
+ readonly sampleRate: number;
+ readonly state: AudioContextState;
+ close(): Promise<void>;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
+ resume(): Promise<void>;
+ addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface AudioContext extends AudioContextBase {
+ suspend(): Promise<void>;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(): AudioContext;
+}
+
+interface AudioDestinationNode extends AudioNode {
+ readonly maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+}
+
+interface AudioListener {
+ dopplerFactor: number;
+ speedOfSound: number;
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+}
+
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: ChannelCountMode;
+ channelInterpretation: ChannelInterpretation;
+ readonly context: AudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
+ connect(destination: AudioNode, output?: number, input?: number): AudioNode;
+ connect(destination: AudioParam, output?: number): void;
+ disconnect(output?: number): void;
+ disconnect(destination: AudioNode, output?: number, input?: number): void;
+ disconnect(destination: AudioParam, output?: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+}
+
+interface AudioParam {
+ readonly defaultValue: number;
+ value: number;
+ cancelScheduledValues(startTime: number): AudioParam;
+ exponentialRampToValueAtTime(value: number, endTime: number): AudioParam;
+ linearRampToValueAtTime(value: number, endTime: number): AudioParam;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam;
+ setValueAtTime(value: number, startTime: number): AudioParam;
+ setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): AudioParam;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+}
+
+interface AudioProcessingEvent extends Event {
+ readonly inputBuffer: AudioBuffer;
+ readonly outputBuffer: AudioBuffer;
+ readonly playbackTime: number;
+}
+
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(): AudioProcessingEvent;
+}
+
+interface AudioTrack {
+ enabled: boolean;
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var AudioTrack: {
+ prototype: AudioTrack;
+ new(): AudioTrack;
+}
+
+interface AudioTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface AudioTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ onchange: (this: AudioTrackList, ev: Event) => any;
+ onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ getTrackById(id: string): AudioTrack | null;
+ item(index: number): AudioTrack;
+ addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: AudioTrack;
+}
+
+declare var AudioTrackList: {
+ prototype: AudioTrackList;
+ new(): AudioTrackList;
+}
+
+interface BarProp {
+ readonly visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+}
+
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+}
+
+interface BiquadFilterNode extends AudioNode {
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
+ type: BiquadFilterType;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(): BiquadFilterNode;
+}
+
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
+}
+
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+}
+
+interface CSS {
+ supports(property: string, value?: string): boolean;
+}
+declare var CSS: CSS;
+
+interface CSSConditionRule extends CSSGroupingRule {
+ conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+}
+
+interface CSSFontFaceRule extends CSSRule {
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+}
+
+interface CSSGroupingRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+}
+
+interface CSSImportRule extends CSSRule {
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+}
+
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+}
+
+interface CSSKeyframesRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(rule: string): void;
+ findRule(rule: string): CSSKeyframeRule;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+}
+
+interface CSSMediaRule extends CSSConditionRule {
+ readonly media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+}
+
+interface CSSNamespaceRule extends CSSRule {
+ readonly namespaceURI: string;
+ readonly prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+}
+
+interface CSSPageRule extends CSSRule {
+ readonly pseudoClass: string;
+ readonly selector: string;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+}
+
+interface CSSRule {
+ cssText: string;
+ readonly parentRule: CSSRule;
+ readonly parentStyleSheet: CSSStyleSheet;
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+interface CSSRuleList {
+ readonly length: number;
+ item(index: number): CSSRule;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+}
+
+interface CSSStyleDeclaration {
+ alignContent: string | null;
+ alignItems: string | null;
+ alignSelf: string | null;
+ alignmentBaseline: string | null;
+ animation: string | null;
+ animationDelay: string | null;
+ animationDirection: string | null;
+ animationDuration: string | null;
+ animationFillMode: string | null;
+ animationIterationCount: string | null;
+ animationName: string | null;
+ animationPlayState: string | null;
+ animationTimingFunction: string | null;
+ backfaceVisibility: string | null;
+ background: string | null;
+ backgroundAttachment: string | null;
+ backgroundClip: string | null;
+ backgroundColor: string | null;
+ backgroundImage: string | null;
+ backgroundOrigin: string | null;
+ backgroundPosition: string | null;
+ backgroundPositionX: string | null;
+ backgroundPositionY: string | null;
+ backgroundRepeat: string | null;
+ backgroundSize: string | null;
+ baselineShift: string | null;
+ border: string | null;
+ borderBottom: string | null;
+ borderBottomColor: string | null;
+ borderBottomLeftRadius: string | null;
+ borderBottomRightRadius: string | null;
+ borderBottomStyle: string | null;
+ borderBottomWidth: string | null;
+ borderCollapse: string | null;
+ borderColor: string | null;
+ borderImage: string | null;
+ borderImageOutset: string | null;
+ borderImageRepeat: string | null;
+ borderImageSlice: string | null;
+ borderImageSource: string | null;
+ borderImageWidth: string | null;
+ borderLeft: string | null;
+ borderLeftColor: string | null;
+ borderLeftStyle: string | null;
+ borderLeftWidth: string | null;
+ borderRadius: string | null;
+ borderRight: string | null;
+ borderRightColor: string | null;
+ borderRightStyle: string | null;
+ borderRightWidth: string | null;
+ borderSpacing: string | null;
+ borderStyle: string | null;
+ borderTop: string | null;
+ borderTopColor: string | null;
+ borderTopLeftRadius: string | null;
+ borderTopRightRadius: string | null;
+ borderTopStyle: string | null;
+ borderTopWidth: string | null;
+ borderWidth: string | null;
+ bottom: string | null;
+ boxShadow: string | null;
+ boxSizing: string | null;
+ breakAfter: string | null;
+ breakBefore: string | null;
+ breakInside: string | null;
+ captionSide: string | null;
+ clear: string | null;
+ clip: string | null;
+ clipPath: string | null;
+ clipRule: string | null;
+ color: string | null;
+ colorInterpolationFilters: string | null;
+ columnCount: any;
+ columnFill: string | null;
+ columnGap: any;
+ columnRule: string | null;
+ columnRuleColor: any;
+ columnRuleStyle: string | null;
+ columnRuleWidth: any;
+ columnSpan: string | null;
+ columnWidth: any;
+ columns: string | null;
+ content: string | null;
+ counterIncrement: string | null;
+ counterReset: string | null;
+ cssFloat: string | null;
+ cssText: string;
+ cursor: string | null;
+ direction: string | null;
+ display: string | null;
+ dominantBaseline: string | null;
+ emptyCells: string | null;
+ enableBackground: string | null;
+ fill: string | null;
+ fillOpacity: string | null;
+ fillRule: string | null;
+ filter: string | null;
+ flex: string | null;
+ flexBasis: string | null;
+ flexDirection: string | null;
+ flexFlow: string | null;
+ flexGrow: string | null;
+ flexShrink: string | null;
+ flexWrap: string | null;
+ floodColor: string | null;
+ floodOpacity: string | null;
+ font: string | null;
+ fontFamily: string | null;
+ fontFeatureSettings: string | null;
+ fontSize: string | null;
+ fontSizeAdjust: string | null;
+ fontStretch: string | null;
+ fontStyle: string | null;
+ fontVariant: string | null;
+ fontWeight: string | null;
+ glyphOrientationHorizontal: string | null;
+ glyphOrientationVertical: string | null;
+ height: string | null;
+ imeMode: string | null;
+ justifyContent: string | null;
+ kerning: string | null;
+ layoutGrid: string | null;
+ layoutGridChar: string | null;
+ layoutGridLine: string | null;
+ layoutGridMode: string | null;
+ layoutGridType: string | null;
+ left: string | null;
+ readonly length: number;
+ letterSpacing: string | null;
+ lightingColor: string | null;
+ lineBreak: string | null;
+ lineHeight: string | null;
+ listStyle: string | null;
+ listStyleImage: string | null;
+ listStylePosition: string | null;
+ listStyleType: string | null;
+ margin: string | null;
+ marginBottom: string | null;
+ marginLeft: string | null;
+ marginRight: string | null;
+ marginTop: string | null;
+ marker: string | null;
+ markerEnd: string | null;
+ markerMid: string | null;
+ markerStart: string | null;
+ mask: string | null;
+ maxHeight: string | null;
+ maxWidth: string | null;
+ minHeight: string | null;
+ minWidth: string | null;
+ msContentZoomChaining: string | null;
+ msContentZoomLimit: string | null;
+ msContentZoomLimitMax: any;
+ msContentZoomLimitMin: any;
+ msContentZoomSnap: string | null;
+ msContentZoomSnapPoints: string | null;
+ msContentZoomSnapType: string | null;
+ msContentZooming: string | null;
+ msFlowFrom: string | null;
+ msFlowInto: string | null;
+ msFontFeatureSettings: string | null;
+ msGridColumn: any;
+ msGridColumnAlign: string | null;
+ msGridColumnSpan: any;
+ msGridColumns: string | null;
+ msGridRow: any;
+ msGridRowAlign: string | null;
+ msGridRowSpan: any;
+ msGridRows: string | null;
+ msHighContrastAdjust: string | null;
+ msHyphenateLimitChars: string | null;
+ msHyphenateLimitLines: any;
+ msHyphenateLimitZone: any;
+ msHyphens: string | null;
+ msImeAlign: string | null;
+ msOverflowStyle: string | null;
+ msScrollChaining: string | null;
+ msScrollLimit: string | null;
+ msScrollLimitXMax: any;
+ msScrollLimitXMin: any;
+ msScrollLimitYMax: any;
+ msScrollLimitYMin: any;
+ msScrollRails: string | null;
+ msScrollSnapPointsX: string | null;
+ msScrollSnapPointsY: string | null;
+ msScrollSnapType: string | null;
+ msScrollSnapX: string | null;
+ msScrollSnapY: string | null;
+ msScrollTranslation: string | null;
+ msTextCombineHorizontal: string | null;
+ msTextSizeAdjust: any;
+ msTouchAction: string | null;
+ msTouchSelect: string | null;
+ msUserSelect: string | null;
+ msWrapFlow: string;
+ msWrapMargin: any;
+ msWrapThrough: string;
+ opacity: string | null;
+ order: string | null;
+ orphans: string | null;
+ outline: string | null;
+ outlineColor: string | null;
+ outlineOffset: string | null;
+ outlineStyle: string | null;
+ outlineWidth: string | null;
+ overflow: string | null;
+ overflowX: string | null;
+ overflowY: string | null;
+ padding: string | null;
+ paddingBottom: string | null;
+ paddingLeft: string | null;
+ paddingRight: string | null;
+ paddingTop: string | null;
+ pageBreakAfter: string | null;
+ pageBreakBefore: string | null;
+ pageBreakInside: string | null;
+ readonly parentRule: CSSRule;
+ perspective: string | null;
+ perspectiveOrigin: string | null;
+ pointerEvents: string | null;
+ position: string | null;
+ quotes: string | null;
+ right: string | null;
+ rotate: string | null;
+ rubyAlign: string | null;
+ rubyOverhang: string | null;
+ rubyPosition: string | null;
+ scale: string | null;
+ stopColor: string | null;
+ stopOpacity: string | null;
+ stroke: string | null;
+ strokeDasharray: string | null;
+ strokeDashoffset: string | null;
+ strokeLinecap: string | null;
+ strokeLinejoin: string | null;
+ strokeMiterlimit: string | null;
+ strokeOpacity: string | null;
+ strokeWidth: string | null;
+ tableLayout: string | null;
+ textAlign: string | null;
+ textAlignLast: string | null;
+ textAnchor: string | null;
+ textDecoration: string | null;
+ textIndent: string | null;
+ textJustify: string | null;
+ textKashida: string | null;
+ textKashidaSpace: string | null;
+ textOverflow: string | null;
+ textShadow: string | null;
+ textTransform: string | null;
+ textUnderlinePosition: string | null;
+ top: string | null;
+ touchAction: string | null;
+ transform: string | null;
+ transformOrigin: string | null;
+ transformStyle: string | null;
+ transition: string | null;
+ transitionDelay: string | null;
+ transitionDuration: string | null;
+ transitionProperty: string | null;
+ transitionTimingFunction: string | null;
+ translate: string | null;
+ unicodeBidi: string | null;
+ verticalAlign: string | null;
+ visibility: string | null;
+ webkitAlignContent: string | null;
+ webkitAlignItems: string | null;
+ webkitAlignSelf: string | null;
+ webkitAnimation: string | null;
+ webkitAnimationDelay: string | null;
+ webkitAnimationDirection: string | null;
+ webkitAnimationDuration: string | null;
+ webkitAnimationFillMode: string | null;
+ webkitAnimationIterationCount: string | null;
+ webkitAnimationName: string | null;
+ webkitAnimationPlayState: string | null;
+ webkitAnimationTimingFunction: string | null;
+ webkitAppearance: string | null;
+ webkitBackfaceVisibility: string | null;
+ webkitBackgroundClip: string | null;
+ webkitBackgroundOrigin: string | null;
+ webkitBackgroundSize: string | null;
+ webkitBorderBottomLeftRadius: string | null;
+ webkitBorderBottomRightRadius: string | null;
+ webkitBorderImage: string | null;
+ webkitBorderRadius: string | null;
+ webkitBorderTopLeftRadius: string | null;
+ webkitBorderTopRightRadius: string | null;
+ webkitBoxAlign: string | null;
+ webkitBoxDirection: string | null;
+ webkitBoxFlex: string | null;
+ webkitBoxOrdinalGroup: string | null;
+ webkitBoxOrient: string | null;
+ webkitBoxPack: string | null;
+ webkitBoxSizing: string | null;
+ webkitColumnBreakAfter: string | null;
+ webkitColumnBreakBefore: string | null;
+ webkitColumnBreakInside: string | null;
+ webkitColumnCount: any;
+ webkitColumnGap: any;
+ webkitColumnRule: string | null;
+ webkitColumnRuleColor: any;
+ webkitColumnRuleStyle: string | null;
+ webkitColumnRuleWidth: any;
+ webkitColumnSpan: string | null;
+ webkitColumnWidth: any;
+ webkitColumns: string | null;
+ webkitFilter: string | null;
+ webkitFlex: string | null;
+ webkitFlexBasis: string | null;
+ webkitFlexDirection: string | null;
+ webkitFlexFlow: string | null;
+ webkitFlexGrow: string | null;
+ webkitFlexShrink: string | null;
+ webkitFlexWrap: string | null;
+ webkitJustifyContent: string | null;
+ webkitOrder: string | null;
+ webkitPerspective: string | null;
+ webkitPerspectiveOrigin: string | null;
+ webkitTapHighlightColor: string | null;
+ webkitTextFillColor: string | null;
+ webkitTextSizeAdjust: any;
+ webkitTextStroke: string | null;
+ webkitTextStrokeColor: string | null;
+ webkitTextStrokeWidth: string | null;
+ webkitTransform: string | null;
+ webkitTransformOrigin: string | null;
+ webkitTransformStyle: string | null;
+ webkitTransition: string | null;
+ webkitTransitionDelay: string | null;
+ webkitTransitionDuration: string | null;
+ webkitTransitionProperty: string | null;
+ webkitTransitionTimingFunction: string | null;
+ webkitUserModify: string | null;
+ webkitUserSelect: string | null;
+ webkitWritingMode: string | null;
+ whiteSpace: string | null;
+ widows: string | null;
+ width: string | null;
+ wordBreak: string | null;
+ wordSpacing: string | null;
+ wordWrap: string | null;
+ writingMode: string | null;
+ zIndex: string | null;
+ zoom: string | null;
+ resize: string | null;
+ userSelect: string | null;
+ getPropertyPriority(propertyName: string): string;
+ getPropertyValue(propertyName: string): string;
+ item(index: number): string;
+ removeProperty(propertyName: string): string;
+ setProperty(propertyName: string, value: string | null, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+}
+
+interface CSSStyleRule extends CSSRule {
+ readonly readOnly: boolean;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+}
+
+interface CSSStyleSheet extends StyleSheet {
+ readonly cssRules: CSSRuleList;
+ cssText: string;
+ readonly id: string;
+ readonly imports: StyleSheetList;
+ readonly isAlternate: boolean;
+ readonly isPrefAlternate: boolean;
+ readonly ownerRule: CSSRule;
+ readonly owningElement: Element;
+ readonly pages: StyleSheetPageList;
+ readonly readOnly: boolean;
+ readonly rules: CSSRuleList;
+ addImport(bstrURL: string, lIndex?: number): number;
+ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
+ addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
+ deleteRule(index?: number): void;
+ insertRule(rule: string, index?: number): number;
+ removeImport(lIndex: number): void;
+ removeRule(lIndex: number): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(): CSSStyleSheet;
+}
+
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+}
+
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+}
+
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+}
+
+interface CanvasGradient {
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+}
+
+interface CanvasPattern {
+ setTransform(matrix: SVGMatrix): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+}
+
+interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
+ readonly canvas: HTMLCanvasElement;
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ font: string;
+ globalAlpha: number;
+ globalCompositeOperation: string;
+ imageSmoothingEnabled: boolean;
+ lineCap: string;
+ lineDashOffset: number;
+ lineJoin: string;
+ lineWidth: number;
+ miterLimit: number;
+ msFillRule: CanvasFillRule;
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ textAlign: string;
+ textBaseline: string;
+ mozImageSmoothingEnabled: boolean;
+ webkitImageSmoothingEnabled: boolean;
+ oImageSmoothingEnabled: boolean;
+ beginPath(): void;
+ clearRect(x: number, y: number, w: number, h: number): void;
+ clip(fillRule?: CanvasFillRule): void;
+ createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+ drawFocusIfNeeded(element: Element): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ getLineDash(): number[];
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ measureText(text: string): TextMetrics;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
+ restore(): void;
+ rotate(angle: number): void;
+ save(): void;
+ scale(x: number, y: number): void;
+ setLineDash(segments: number[]): void;
+ setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ stroke(path?: Path2D): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+ transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ translate(x: number, y: number): void;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+}
+
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(): ChannelMergerNode;
+}
+
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(): ChannelSplitterNode;
+}
+
+interface CharacterData extends Node, ChildNode {
+ data: string;
+ readonly length: number;
+ appendData(arg: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, arg: string): void;
+ replaceData(offset: number, count: number, arg: string): void;
+ substringData(offset: number, count: number): string;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+}
+
+interface ClientRect {
+ bottom: number;
+ readonly height: number;
+ left: number;
+ right: number;
+ top: number;
+ readonly width: number;
+}
+
+declare var ClientRect: {
+ prototype: ClientRect;
+ new(): ClientRect;
+}
+
+interface ClientRectList {
+ readonly length: number;
+ item(index: number): ClientRect;
+ [index: number]: ClientRect;
+}
+
+declare var ClientRectList: {
+ prototype: ClientRectList;
+ new(): ClientRectList;
+}
+
+interface ClipboardEvent extends Event {
+ readonly clipboardData: DataTransfer;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+}
+
+interface CloseEvent extends Event {
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
+}
+
+interface Comment extends CharacterData {
+ text: string;
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(): Comment;
+}
+
+interface CompositionEvent extends UIEvent {
+ readonly data: string;
+ readonly locale: string;
+ initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+}
+
+interface Console {
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
+ clear(): void;
+ count(countTitle?: string): void;
+ debug(message?: any, ...optionalParams: any[]): void;
+ dir(value?: any, ...optionalParams: any[]): void;
+ dirxml(value: any): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(groupTitle?: string): void;
+ groupCollapsed(groupTitle?: string): void;
+ groupEnd(): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ msIsIndependentlyComposed(element: Element): boolean;
+ profile(reportName?: string): void;
+ profileEnd(): void;
+ select(element: Element): void;
+ table(...data: any[]): void;
+ time(timerName?: string): void;
+ timeEnd(timerName?: string): void;
+ trace(message?: any, ...optionalParams: any[]): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var Console: {
+ prototype: Console;
+ new(): Console;
+}
+
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(): ConvolverNode;
+}
+
+interface Coordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+declare var Coordinates: {
+ prototype: Coordinates;
+ new(): Coordinates;
+}
+
+interface Crypto extends Object, RandomSource {
+ readonly subtle: SubtleCrypto;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+}
+
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: string;
+ readonly usages: string[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+declare var CryptoKeyPair: {
+ prototype: CryptoKeyPair;
+ new(): CryptoKeyPair;
+}
+
+interface CustomEvent extends Event {
+ readonly detail: any;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
+}
+
+interface DOMError {
+ readonly name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+}
+
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ toString(): string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+interface DOMImplementation {
+ createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title: string): Document;
+ hasFeature(feature: string | null, version: string | null): boolean;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+}
+
+interface DOMParser {
+ parseFromString(source: string, mimeType: string): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+}
+
+interface DOMSettableTokenList extends DOMTokenList {
+ value: string;
+}
+
+declare var DOMSettableTokenList: {
+ prototype: DOMSettableTokenList;
+ new(): DOMSettableTokenList;
+}
+
+interface DOMStringList {
+ readonly length: number;
+ contains(str: string): boolean;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+}
+
+interface DOMStringMap {
+ [name: string]: string | undefined;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+}
+
+interface DOMTokenList {
+ readonly length: number;
+ add(...token: string[]): void;
+ contains(token: string): boolean;
+ item(index: number): string;
+ remove(...token: string[]): void;
+ toString(): string;
+ toggle(token: string, force?: boolean): boolean;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+}
+
+interface DataCue extends TextTrackCue {
+ data: ArrayBuffer;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DataCue: {
+ prototype: DataCue;
+ new(): DataCue;
+}
+
+interface DataTransfer {
+ dropEffect: string;
+ effectAllowed: string;
+ readonly files: FileList;
+ readonly items: DataTransferItemList;
+ readonly types: string[];
+ clearData(format?: string): boolean;
+ getData(format: string): string;
+ setData(format: string, data: string): boolean;
+ setDragImage(image: Element, x: number, y: number): void;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+}
+
+interface DataTransferItem {
+ readonly kind: string;
+ readonly type: string;
+ getAsFile(): File | null;
+ getAsString(_callback: FunctionStringCallback | null): void;
+ webkitGetAsEntry(): any;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+}
+
+interface DataTransferItemList {
+ readonly length: number;
+ add(data: File): DataTransferItem | null;
+ clear(): void;
+ item(index: number): DataTransferItem;
+ remove(index: number): void;
+ [index: number]: DataTransferItem;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+}
+
+interface DeferredPermissionRequest {
+ readonly id: number;
+ readonly type: MSWebViewPermissionType;
+ readonly uri: string;
+ allow(): void;
+ deny(): void;
+}
+
+declare var DeferredPermissionRequest: {
+ prototype: DeferredPermissionRequest;
+ new(): DeferredPermissionRequest;
+}
+
+interface DelayNode extends AudioNode {
+ readonly delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(): DelayNode;
+}
+
+interface DeviceAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+declare var DeviceAcceleration: {
+ prototype: DeviceAcceleration;
+ new(): DeviceAcceleration;
+}
+
+interface DeviceLightEvent extends Event {
+ readonly value: number;
+}
+
+declare var DeviceLightEvent: {
+ prototype: DeviceLightEvent;
+ new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
+}
+
+interface DeviceMotionEvent extends Event {
+ readonly acceleration: DeviceAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceAcceleration | null;
+ readonly interval: number | null;
+ readonly rotationRate: DeviceRotationRate | null;
+ initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
+}
+
+interface DeviceOrientationEvent extends Event {
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+ initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
+}
+
+interface DeviceRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceRotationRate: {
+ prototype: DeviceRotationRate;
+ new(): DeviceRotationRate;
+}
+
+interface DocumentEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforedeactivate": UIEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "mssitemodejumplistitemremoved": MSSiteModeEvent;
+ "msthumbnailclick": MSSiteModeEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "pointerlockchange": Event;
+ "pointerlockerror": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectionchange": Event;
+ "selectstart": Event;
+ "stalled": Event;
+ "stop": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "volumechange": Event;
+ "waiting": Event;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
+ /**
+ * Sets or gets the URL for the current document.
+ */
+ readonly URL: string;
+ /**
+ * Gets the URL for the document, stripped of any character encoding.
+ */
+ readonly URLUnencoded: string;
+ /**
+ * Gets the object that has the focus when the parent document has focus.
+ */
+ readonly activeElement: Element;
+ /**
+ * Sets or gets the color of all active links in the document.
+ */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ */
+ readonly all: HTMLAllCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ */
+ anchors: HTMLCollectionOf<HTMLAnchorElement>;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ */
+ applets: HTMLCollectionOf<HTMLAppletElement>;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ */
+ bgColor: string;
+ /**
+ * Specifies the beginning and end of the document body.
+ */
+ body: HTMLElement;
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets a value that indicates whether standards-compliant mode is switched on for the object.
+ */
+ readonly compatMode: string;
+ cookie: string;
+ readonly currentScript: HTMLScriptElement | SVGScriptElement;
+ readonly defaultView: Window;
+ /**
+ * Sets or gets a value that indicates whether the document can be edited.
+ */
+ designMode: string;
+ /**
+ * Sets or retrieves a value that indicates the reading order of the object.
+ */
+ dir: string;
+ /**
+ * Gets an object representing the document type declaration associated with the current document.
+ */
+ readonly doctype: DocumentType;
+ /**
+ * Gets a reference to the root node of the document.
+ */
+ documentElement: HTMLElement;
+ /**
+ * Sets or gets the security domain of the document.
+ */
+ domain: string;
+ /**
+ * Retrieves a collection of all embed objects in the document.
+ */
+ embeds: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ */
+ fgColor: string;
+ /**
+ * Retrieves a collection, in source order, of all form objects in the document.
+ */
+ forms: HTMLCollectionOf<HTMLFormElement>;
+ readonly fullscreenElement: Element | null;
+ readonly fullscreenEnabled: boolean;
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
+ /**
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
+ images: HTMLCollectionOf<HTMLImageElement>;
+ /**
+ * Gets the implementation object of the current document.
+ */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ */
+ readonly inputEncoding: string | null;
+ /**
+ * Gets the date that the page was last modified, if the page supplies one.
+ */
+ readonly lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ */
+ linkColor: string;
+ /**
+ * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
+ */
+ links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
+ /**
+ * Contains information about the current URL.
+ */
+ readonly location: Location;
+ msCSSOMElementFloatMetrics: boolean;
+ msCapsLockWarningOff: boolean;
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object is set as the active element.
+ * @param ev The event.
+ */
+ onactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the object is set as the active element.
+ * @param ev The event.
+ */
+ onbeforeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The event.
+ */
+ onbeforedeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: (this: Document, ev: FocusEvent) => any;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: (this: Document, ev: Event) => any;
+ oncanplaythrough: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: (this: Document, ev: PointerEvent) => any;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The UI Event
+ */
+ ondeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: (this: Document, ev: DragEvent) => any;
+ ondrop: (this: Document, ev: DragEvent) => any;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: (this: Document, ev: MediaStreamErrorEvent) => any;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: (this: Document, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: (this: Document, ev: FocusEvent) => any;
+ onfullscreenchange: (this: Document, ev: Event) => any;
+ onfullscreenerror: (this: Document, ev: Event) => any;
+ oninput: (this: Document, ev: Event) => any;
+ oninvalid: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+ onkeypress: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the wheel button is rotated.
+ * @param ev The mouse event
+ */
+ onmousewheel: (this: Document, ev: WheelEvent) => any;
+ onmscontentzoom: (this: Document, ev: UIEvent) => any;
+ onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
+ onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
+ onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Document, ev: MSPointerEvent) => any;
+ /**
+ * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: (this: Document, ev: Event) => any;
+ onpointerlockchange: (this: Document, ev: Event) => any;
+ onpointerlockerror: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: (this: Document, ev: ProgressEvent) => any;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: (this: Document, ev: UIEvent) => any;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the selection state of a document changes.
+ * @param ev The event.
+ */
+ onselectionchange: (this: Document, ev: Event) => any;
+ onselectstart: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the Stop button or leaves the Web page.
+ * @param ev The event.
+ */
+ onstop: (this: Document, ev: Event) => any;
+ onsubmit: (this: Document, ev: Event) => any;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: (this: Document, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: (this: Document, ev: Event) => any;
+ onwebkitfullscreenchange: (this: Document, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Document, ev: Event) => any;
+ plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ readonly pointerLockElement: Element;
+ /**
+ * Retrieves a value that indicates the current state of the object.
+ */
+ readonly readyState: string;
+ /**
+ * Gets the URL of the location that referred the user to the current page.
+ */
+ readonly referrer: string;
+ /**
+ * Gets the root svg element in the document hierarchy.
+ */
+ readonly rootElement: SVGSVGElement;
+ /**
+ * Retrieves a collection of all script objects in the document.
+ */
+ scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
+ /**
+ * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
+ */
+ readonly styleSheets: StyleSheetList;
+ /**
+ * Contains the title of the document.
+ */
+ title: string;
+ readonly visibilityState: VisibilityState;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
+ vlinkColor: string;
+ readonly webkitCurrentFullScreenElement: Element | null;
+ readonly webkitFullscreenElement: Element | null;
+ readonly webkitFullscreenEnabled: boolean;
+ readonly webkitIsFullScreen: boolean;
+ readonly xmlEncoding: string | null;
+ xmlStandalone: boolean;
+ /**
+ * Gets or sets the version attribute specified in the declaration of an XML document.
+ */
+ xmlVersion: string | null;
+ adoptNode<T extends Node>(source: T): T;
+ captureEvents(): void;
+ caretRangeFromPoint(x: number, y: number): Range;
+ clear(): void;
+ /**
+ * Closes an output stream and forces the sent data to display.
+ */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(name: string): Attr;
+ createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /**
+ * Creates a new document.
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
+ createElement(tagName: string): HTMLElement;
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
+ createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
+ */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
+ createTouchList(...touches: Touch[]): TouchList;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
+ /**
+ * Displays help information for the given command identifier.
+ * @param commandId Displays help information for the given command identifier.
+ */
+ execCommandShowHelp(commandId: string): boolean;
+ exitFullscreen(): void;
+ exitPointerLock(): void;
+ /**
+ * Causes the element to receive the focus and executes the code specified by the onfocus event.
+ */
+ focus(): void;
+ /**
+ * Returns a reference to the first object with the specified value of the ID or NAME attribute.
+ * @param elementId String that specifies the ID value. Case-insensitive.
+ */
+ getElementById(elementId: string): HTMLElement | null;
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
+ getElementsByTagName(tagname: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ /**
+ * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
+ */
+ getSelection(): Selection;
+ /**
+ * Gets a value indicating whether the object currently has focus.
+ */
+ hasFocus(): boolean;
+ importNode<T extends Node>(importedNode: T, deep: boolean): T;
+ msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
+ msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(url?: string, name?: string, features?: string, replace?: boolean): Document;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Retrieves the string associated with a command.
+ * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
+ */
+ queryCommandText(commandId: string): string;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ releaseEvents(): void;
+ /**
+ * Allows updating the print settings for the page.
+ */
+ updateSettings(): void;
+ webkitCancelFullScreen(): void;
+ webkitExitFullscreen(): void;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...content: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...content: string[]): void;
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+}
+
+interface DocumentFragment extends Node, NodeSelector, ParentNode {
+ getElementById(elementId: string): HTMLElement | null;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+}
+
+interface DocumentType extends Node, ChildNode {
+ readonly entities: NamedNodeMap;
+ readonly internalSubset: string | null;
+ readonly name: string;
+ readonly notations: NamedNodeMap;
+ readonly publicId: string;
+ readonly systemId: string;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+}
+
+interface DragEvent extends MouseEvent {
+ readonly dataTransfer: DataTransfer;
+ initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
+ msConvertURL(file: File, targetType: string, targetURL?: string): void;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(): DragEvent;
+}
+
+interface DynamicsCompressorNode extends AudioNode {
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: number;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(): DynamicsCompressorNode;
+}
+
+interface EXT_frag_depth {
+}
+
+declare var EXT_frag_depth: {
+ prototype: EXT_frag_depth;
+ new(): EXT_frag_depth;
+}
+
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+declare var EXT_texture_filter_anisotropic: {
+ prototype: EXT_texture_filter_anisotropic;
+ new(): EXT_texture_filter_anisotropic;
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+interface ElementEventMap extends GlobalEventHandlersEventMap {
+ "ariarequest": Event;
+ "command": Event;
+ "gotpointercapture": PointerEvent;
+ "lostpointercapture": PointerEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSGotPointerCapture": MSPointerEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSLostPointerCapture": MSPointerEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
+ readonly classList: DOMTokenList;
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ id: string;
+ innerHTML: string;
+ msContentZoomFactor: number;
+ readonly msRegionOverflow: string;
+ onariarequest: (this: Element, ev: Event) => any;
+ oncommand: (this: Element, ev: Event) => any;
+ ongotpointercapture: (this: Element, ev: PointerEvent) => any;
+ onlostpointercapture: (this: Element, ev: PointerEvent) => any;
+ onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
+ onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Element, ev: MSPointerEvent) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onwebkitfullscreenchange: (this: Element, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Element, ev: Event) => any;
+ outerHTML: string;
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ readonly scrollWidth: number;
+ readonly tagName: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ slot: string;
+ readonly shadowRoot: ShadowRoot | null;
+ getAttribute(name: string): string | null;
+ getAttributeNS(namespaceURI: string, localName: string): string;
+ getAttributeNode(name: string): Attr;
+ getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
+ getElementsByTagName(name: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ hasAttribute(name: string): boolean;
+ hasAttributeNS(namespaceURI: string, localName: string): boolean;
+ msGetRegionContent(): MSRangeCollection;
+ msGetUntransformedBounds(): ClientRect;
+ msMatchesSelector(selectors: string): boolean;
+ msReleasePointerCapture(pointerId: number): void;
+ msSetPointerCapture(pointerId: number): void;
+ msZoomTo(args: MsZoomToOptions): void;
+ releasePointerCapture(pointerId: number): void;
+ removeAttribute(qualifiedName: string): void;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
+ removeAttributeNode(oldAttr: Attr): Attr;
+ requestFullscreen(): void;
+ requestPointerLock(): void;
+ setAttribute(name: string, value: string): void;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
+ setAttributeNode(newAttr: Attr): Attr;
+ setAttributeNodeNS(newAttr: Attr): Attr;
+ setPointerCapture(pointerId: number): void;
+ webkitMatchesSelector(selectors: string): boolean;
+ webkitRequestFullScreen(): void;
+ webkitRequestFullscreen(): void;
+ getElementsByClassName(classNames: string): NodeListOf<Element>;
+ matches(selector: string): boolean;
+ closest(selector: string): Element | null;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ insertAdjacentElement(position: string, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: string, html: string): void;
+ insertAdjacentText(where: string, text: string): void;
+ attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
+ addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+}
+
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
+}
+
+interface Event {
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ readonly cancelable: boolean;
+ readonly currentTarget: EventTarget;
+ readonly defaultPrevented: boolean;
+ readonly eventPhase: number;
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ readonly srcElement: Element | null;
+ readonly target: EventTarget;
+ readonly timeStamp: number;
+ readonly type: string;
+ readonly scoped: boolean;
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
+ preventDefault(): void;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ deepPath(): EventTarget[];
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(typeArg: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+interface EventTarget {
+ addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ dispatchEvent(evt: Event): boolean;
+ removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+}
+
+interface ExtensionScriptApis {
+ extensionIdToShortId(extensionId: string): number;
+ fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
+ genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void;
+ genericSynchronousFunction(functionId: number, parameters?: string): string;
+ getExtensionId(): string;
+ registerGenericFunctionCallbackHandler(callbackHandler: any): void;
+ registerGenericPersistentCallbackHandler(callbackHandler: any): void;
+}
+
+declare var ExtensionScriptApis: {
+ prototype: ExtensionScriptApis;
+ new(): ExtensionScriptApis;
+}
+
+interface External {
+}
+
+declare var External: {
+ prototype: External;
+ new(): External;
+}
+
+interface File extends Blob {
+ readonly lastModifiedDate: any;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
+}
+
+interface FileList {
+ readonly length: number;
+ item(index: number): File;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+}
+
+interface FileReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+}
+
+interface FocusEvent extends UIEvent {
+ readonly relatedTarget: EventTarget;
+ initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
+}
+
+interface FocusNavigationEvent extends Event {
+ readonly navigationReason: NavigationReason;
+ readonly originHeight: number;
+ readonly originLeft: number;
+ readonly originTop: number;
+ readonly originWidth: number;
+ requestFocus(): void;
+}
+
+declare var FocusNavigationEvent: {
+ prototype: FocusNavigationEvent;
+ new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
+}
+
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new (form?: HTMLFormElement): FormData;
+}
+
+interface GainNode extends AudioNode {
+ readonly gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(): GainNode;
+}
+
+interface Gamepad {
+ readonly axes: number[];
+ readonly buttons: GamepadButton[];
+ readonly connected: boolean;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: string;
+ readonly timestamp: number;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+}
+
+interface GamepadButton {
+ readonly pressed: boolean;
+ readonly value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+}
+
+interface GamepadEvent extends Event {
+ readonly gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
+}
+
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
+}
+
+declare var Geolocation: {
+ prototype: Geolocation;
+ new(): Geolocation;
+}
+
+interface HTMLAllCollection {
+ readonly length: number;
+ item(nameOrIndex?: string): HTMLCollection | Element | null;
+ namedItem(name: string): HTMLCollection | Element | null;
+ [index: number]: Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+}
+
+interface HTMLAnchorElement extends HTMLElement {
+ Methods: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
+ hash: string;
+ /**
+ * Contains the hostname and port values of the URL.
+ */
+ host: string;
+ /**
+ * Contains the hostname of a URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ readonly mimeType: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ readonly nameProp: string;
+ /**
+ * Contains the pathname of the URL.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Contains the protocol of the URL.
+ */
+ protocol: string;
+ readonly protocolLong: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ type: string;
+ urn: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+}
+
+interface HTMLAppletElement extends HTMLElement {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
+ */
+ declare: boolean;
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ object: string | null;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ vspace: number;
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAppletElement: {
+ prototype: HTMLAppletElement;
+ new(): HTMLAppletElement;
+}
+
+interface HTMLAreaElement extends HTMLElement {
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Sets or retrieves the subsection of the href property that follows the number sign (#).
+ */
+ hash: string;
+ /**
+ * Sets or retrieves the hostname and port number of the location or URL.
+ */
+ host: string;
+ /**
+ * Sets or retrieves the host name part of the location or URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ */
+ noHref: boolean;
+ /**
+ * Sets or retrieves the file name or path specified by the object.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Sets or retrieves the protocol portion of a URL.
+ */
+ protocol: string;
+ rel: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+}
+
+interface HTMLAreasCollection extends HTMLCollectionBase {
+}
+
+declare var HTMLAreasCollection: {
+ prototype: HTMLAreasCollection;
+ new(): HTMLAreasCollection;
+}
+
+interface HTMLAudioElement extends HTMLMediaElement {
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+}
+
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ */
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+}
+
+interface HTMLBaseElement extends HTMLElement {
+ /**
+ * Gets or sets the baseline URL on which relative links are based.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+}
+
+interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ /**
+ * Sets or retrieves the font size of the object.
+ */
+ size: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseFontElement: {
+ prototype: HTMLBaseFontElement;
+ new(): HTMLBaseFontElement;
+}
+
+interface HTMLBodyElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLBodyElement extends HTMLElement {
+ aLink: any;
+ background: string;
+ bgColor: any;
+ bgProperties: string;
+ link: any;
+ noWrap: boolean;
+ onafterprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
+ onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLBodyElement, ev: Event) => any;
+ onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLBodyElement, ev: Event) => any;
+ ononline: (this: HTMLBodyElement, ev: Event) => any;
+ onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
+ onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLBodyElement, ev: Event) => any;
+ text: any;
+ vLink: any;
+ addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+}
+
+interface HTMLButtonElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ status: any;
+ /**
+ * Gets the classification and default behavior of the button.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the default or selected value of the control.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+}
+
+interface HTMLCanvasElement extends HTMLElement {
+ /**
+ * Gets or sets the height of a canvas element on a document.
+ */
+ height: number;
+ /**
+ * Gets or sets the width of a canvas element on a document.
+ */
+ width: number;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
+ getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
+ /**
+ * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
+ */
+ msToBlob(): Blob;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, ...args: any[]): string;
+ toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+}
+
+interface HTMLCollectionBase {
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Retrieves an object from various collections.
+ */
+ item(index: number): Element;
+ [index: number]: Element;
+}
+
+interface HTMLCollection extends HTMLCollectionBase {
+ /**
+ * Retrieves a select object or an object from an options collection.
+ */
+ namedItem(name: string): Element | null;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+}
+
+interface HTMLDListElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+}
+
+interface HTMLDataElement extends HTMLElement {
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataElement: {
+ prototype: HTMLDataElement;
+ new(): HTMLDataElement;
+}
+
+interface HTMLDataListElement extends HTMLElement {
+ options: HTMLCollectionOf<HTMLOptionElement>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+}
+
+interface HTMLDirectoryElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+}
+
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+}
+
+interface HTMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+}
+
+interface HTMLElementEventMap extends ElementEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforecopy": ClipboardEvent;
+ "beforecut": ClipboardEvent;
+ "beforedeactivate": UIEvent;
+ "beforepaste": ClipboardEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "copy": ClipboardEvent;
+ "cuechange": Event;
+ "cut": ClipboardEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "paste": ClipboardEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectstart": Event;
+ "stalled": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface HTMLElement extends Element {
+ accessKey: string;
+ readonly children: HTMLCollection;
+ contentEditable: string;
+ readonly dataset: DOMStringMap;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ hideFocus: boolean;
+ innerText: string;
+ readonly isContentEditable: boolean;
+ lang: string;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ onabort: (this: HTMLElement, ev: UIEvent) => any;
+ onactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onblur: (this: HTMLElement, ev: FocusEvent) => any;
+ oncanplay: (this: HTMLElement, ev: Event) => any;
+ oncanplaythrough: (this: HTMLElement, ev: Event) => any;
+ onchange: (this: HTMLElement, ev: Event) => any;
+ onclick: (this: HTMLElement, ev: MouseEvent) => any;
+ oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
+ oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ oncuechange: (this: HTMLElement, ev: Event) => any;
+ oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
+ ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ ondrag: (this: HTMLElement, ev: DragEvent) => any;
+ ondragend: (this: HTMLElement, ev: DragEvent) => any;
+ ondragenter: (this: HTMLElement, ev: DragEvent) => any;
+ ondragleave: (this: HTMLElement, ev: DragEvent) => any;
+ ondragover: (this: HTMLElement, ev: DragEvent) => any;
+ ondragstart: (this: HTMLElement, ev: DragEvent) => any;
+ ondrop: (this: HTMLElement, ev: DragEvent) => any;
+ ondurationchange: (this: HTMLElement, ev: Event) => any;
+ onemptied: (this: HTMLElement, ev: Event) => any;
+ onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
+ onerror: (this: HTMLElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLElement, ev: FocusEvent) => any;
+ oninput: (this: HTMLElement, ev: Event) => any;
+ oninvalid: (this: HTMLElement, ev: Event) => any;
+ onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onload: (this: HTMLElement, ev: Event) => any;
+ onloadeddata: (this: HTMLElement, ev: Event) => any;
+ onloadedmetadata: (this: HTMLElement, ev: Event) => any;
+ onloadstart: (this: HTMLElement, ev: Event) => any;
+ onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
+ onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
+ onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
+ onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onpause: (this: HTMLElement, ev: Event) => any;
+ onplay: (this: HTMLElement, ev: Event) => any;
+ onplaying: (this: HTMLElement, ev: Event) => any;
+ onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
+ onratechange: (this: HTMLElement, ev: Event) => any;
+ onreset: (this: HTMLElement, ev: Event) => any;
+ onscroll: (this: HTMLElement, ev: UIEvent) => any;
+ onseeked: (this: HTMLElement, ev: Event) => any;
+ onseeking: (this: HTMLElement, ev: Event) => any;
+ onselect: (this: HTMLElement, ev: UIEvent) => any;
+ onselectstart: (this: HTMLElement, ev: Event) => any;
+ onstalled: (this: HTMLElement, ev: Event) => any;
+ onsubmit: (this: HTMLElement, ev: Event) => any;
+ onsuspend: (this: HTMLElement, ev: Event) => any;
+ ontimeupdate: (this: HTMLElement, ev: Event) => any;
+ onvolumechange: (this: HTMLElement, ev: Event) => any;
+ onwaiting: (this: HTMLElement, ev: Event) => any;
+ outerText: string;
+ spellcheck: boolean;
+ readonly style: CSSStyleDeclaration;
+ tabIndex: number;
+ title: string;
+ blur(): void;
+ click(): void;
+ dragDrop(): boolean;
+ focus(): void;
+ msGetInputContext(): MSInputMethodContext;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+}
+
+interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hidden: any;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Retrieves the palette used for the embedded document.
+ */
+ readonly palette: string;
+ /**
+ * Retrieves the URL of the plug-in used to view an embedded document.
+ */
+ readonly pluginspage: string;
+ readonly readyState: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the height and width units of the embed object.
+ */
+ units: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+}
+
+interface HTMLFieldSetElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ name: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+}
+
+interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+}
+
+interface HTMLFormControlsCollection extends HTMLCollectionBase {
+ namedItem(name: string): HTMLCollection | Element | null;
+}
+
+declare var HTMLFormControlsCollection: {
+ prototype: HTMLFormControlsCollection;
+ new(): HTMLFormControlsCollection;
+}
+
+interface HTMLFormElement extends HTMLElement {
+ /**
+ * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
+ */
+ acceptCharset: string;
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Retrieves a collection, in source order, of all controls in a given form.
+ */
+ readonly elements: HTMLFormControlsCollection;
+ /**
+ * Sets or retrieves the MIME encoding for the form.
+ */
+ encoding: string;
+ /**
+ * Sets or retrieves the encoding type for the form.
+ */
+ enctype: string;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Sets or retrieves how to send the form data to the server.
+ */
+ method: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Designates a form that is not validated when submitted.
+ */
+ noValidate: boolean;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ */
+ namedItem(name: string): any;
+ /**
+ * Fires when the user resets a form.
+ */
+ reset(): void;
+ /**
+ * Fires when a FORM is about to be submitted.
+ */
+ submit(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+}
+
+interface HTMLFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string | number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLFrameElement, ev: Event) => any;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string | number;
+ addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+}
+
+interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLFrameSetElement extends HTMLElement {
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Sets or retrieves the frame widths of the object.
+ */
+ cols: string;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ name: string;
+ onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ */
+ onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ */
+ onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLFrameSetElement, ev: Event) => any;
+ onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
+ ononline: (this: HTMLFrameSetElement, ev: Event) => any;
+ onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
+ onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLFrameSetElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLFrameSetElement, ev: Event) => any;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ */
+ rows: string;
+ addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+}
+
+interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ */
+ noShade: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+}
+
+interface HTMLHeadElement extends HTMLElement {
+ profile: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+}
+
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+}
+
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ */
+ version: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+}
+
+interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ allowFullscreen: boolean;
+ allowPaymentRequest: boolean;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the horizontal margin for the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLIFrameElement, ev: Event) => any;
+ readonly sandbox: DOMSettableTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+}
+
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ crossOrigin: string | null;
+ readonly currentSrc: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves whether the image is a server-side image map.
+ */
+ isMap: boolean;
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ */
+ longDesc: string;
+ lowsrc: string;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * The original height of the image resource before sizing.
+ */
+ readonly naturalHeight: number;
+ /**
+ * The original width of the image resource before sizing.
+ */
+ readonly naturalWidth: number;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ readonly x: number;
+ readonly y: number;
+ msGetAsCastingSource(): any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+}
+
+interface HTMLInputElement extends HTMLElement {
+ /**
+ * Sets or retrieves a comma-separated list of content types.
+ */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ checked: boolean;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ defaultChecked: boolean;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Returns a FileList object on a file type input object.
+ */
+ readonly files: FileList | null;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ indeterminate: boolean;
+ /**
+ * Specifies the ID of a pre-defined datalist of options for an input element.
+ */
+ readonly list: HTMLElement;
+ /**
+ * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ */
+ max: string;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
+ */
+ min: string;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a string containing a regular expression that the user's input must match.
+ */
+ pattern: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ selectionDirection: string;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ size: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ status: boolean;
+ /**
+ * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
+ */
+ step: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns the value of the data at the cursor's current position.
+ */
+ value: string;
+ valueAsDate: Date;
+ /**
+ * Returns the input field value as a number.
+ */
+ valueAsNumber: number;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ webkitdirectory: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Makes the selection equal to the current object.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start?: number, end?: number, direction?: string): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+}
+
+interface HTMLLIElement extends HTMLElement {
+ type: string;
+ /**
+ * Sets or retrieves the value of a list item.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+}
+
+interface HTMLLabelElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the object to which the given label object is assigned.
+ */
+ htmlFor: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+}
+
+interface HTMLLegendElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ align: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+}
+
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ disabled: boolean;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ import?: Document;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+}
+
+interface HTMLMapElement extends HTMLElement {
+ /**
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
+ readonly areas: HTMLAreasCollection;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+}
+
+interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
+ "bounce": Event;
+ "finish": Event;
+ "start": Event;
+}
+
+interface HTMLMarqueeElement extends HTMLElement {
+ behavior: string;
+ bgColor: any;
+ direction: string;
+ height: string;
+ hspace: number;
+ loop: number;
+ onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
+ onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
+ onstart: (this: HTMLMarqueeElement, ev: Event) => any;
+ scrollAmount: number;
+ scrollDelay: number;
+ trueSpeed: boolean;
+ vspace: number;
+ width: string;
+ start(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+}
+
+interface HTMLMediaElementEventMap extends HTMLElementEventMap {
+ "encrypted": MediaEncryptedEvent;
+ "msneedkey": MSMediaKeyNeededEvent;
+}
+
+interface HTMLMediaElement extends HTMLElement {
+ /**
+ * Returns an AudioTrackList object with the audio tracks for a given video element.
+ */
+ readonly audioTracks: AudioTrackList;
+ /**
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
+ autoplay: boolean;
+ /**
+ * Gets a collection of buffered time ranges.
+ */
+ readonly buffered: TimeRanges;
+ /**
+ * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
+ */
+ controls: boolean;
+ crossOrigin: string | null;
+ /**
+ * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
+ */
+ readonly currentSrc: string;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ currentTime: number;
+ defaultMuted: boolean;
+ /**
+ * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
+ */
+ defaultPlaybackRate: number;
+ /**
+ * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
+ */
+ readonly duration: number;
+ /**
+ * Gets information about whether the playback has ended or not.
+ */
+ readonly ended: boolean;
+ /**
+ * Returns an object representing the current error state of the audio or video element.
+ */
+ readonly error: MediaError;
+ /**
+ * Gets or sets a flag to specify whether playback should restart after it completes.
+ */
+ loop: boolean;
+ readonly mediaKeys: MediaKeys | null;
+ /**
+ * Specifies the purpose of the audio or video media, such as background audio or alerts.
+ */
+ msAudioCategory: string;
+ /**
+ * Specifies the output device id that the audio will be sent to.
+ */
+ msAudioDeviceType: string;
+ readonly msGraphicsTrustStatus: MSGraphicsTrust;
+ /**
+ * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
+ */
+ readonly msKeys: MSMediaKeys;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Specifies whether or not to enable low-latency playback on the media element.
+ */
+ msRealTime: boolean;
+ /**
+ * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
+ */
+ muted: boolean;
+ /**
+ * Gets the current network activity for the element.
+ */
+ readonly networkState: number;
+ onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
+ onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
+ /**
+ * Gets a flag that specifies whether playback is paused.
+ */
+ readonly paused: boolean;
+ /**
+ * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
+ */
+ playbackRate: number;
+ /**
+ * Gets TimeRanges for the current media resource that has been played.
+ */
+ readonly played: TimeRanges;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ preload: string;
+ readyState: number;
+ /**
+ * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
+ */
+ readonly seekable: TimeRanges;
+ /**
+ * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
+ */
+ readonly seeking: boolean;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcObject: MediaStream | null;
+ readonly textTracks: TextTrackList;
+ readonly videoTracks: VideoTrackList;
+ /**
+ * Gets or sets the volume level for audio portions of the media element.
+ */
+ volume: number;
+ addTextTrack(kind: string, label?: string, language?: string): TextTrack;
+ /**
+ * Returns a string that specifies whether the client can play a given media resource type.
+ */
+ canPlayType(type: string): string;
+ /**
+ * Resets the audio or video object and loads a new media resource.
+ */
+ load(): void;
+ /**
+ * Clears all effects from the media pipeline.
+ */
+ msClearEffects(): void;
+ msGetAsCastingSource(): any;
+ /**
+ * Inserts the specified audio effect into media pipeline.
+ */
+ msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetMediaKeys(mediaKeys: MSMediaKeys): void;
+ /**
+ * Specifies the media protection manager for a given media pipeline.
+ */
+ msSetMediaProtectionManager(mediaProtectionManager?: any): void;
+ /**
+ * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
+ */
+ pause(): void;
+ /**
+ * Loads and starts playback of a media resource.
+ */
+ play(): void;
+ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+}
+
+interface HTMLMenuElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+}
+
+interface HTMLMetaElement extends HTMLElement {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets or sets meta-information to associate with httpEquiv or name.
+ */
+ content: string;
+ /**
+ * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
+ */
+ httpEquiv: string;
+ /**
+ * Sets or retrieves the value specified in the content attribute of the meta object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ */
+ scheme: string;
+ /**
+ * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
+ */
+ url: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+}
+
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+}
+
+interface HTMLModElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+}
+
+interface HTMLOListElement extends HTMLElement {
+ compact: boolean;
+ /**
+ * The starting number.
+ */
+ start: number;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+}
+
+interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ declare: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly readyState: number;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+}
+
+interface HTMLOptGroupElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ readonly text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+}
+
+interface HTMLOptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+}
+
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ length: number;
+ selectedIndex: number;
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+}
+
+interface HTMLOutputElement extends HTMLElement {
+ defaultValue: string;
+ readonly form: HTMLFormElement;
+ readonly htmlFor: DOMSettableTokenList;
+ name: string;
+ readonly type: string;
+ readonly validationMessage: string;
+ readonly validity: ValidityState;
+ value: string;
+ readonly willValidate: boolean;
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOutputElement: {
+ prototype: HTMLOutputElement;
+ new(): HTMLOutputElement;
+}
+
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+}
+
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ */
+ valueType: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+}
+
+interface HTMLPictureElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
+}
+
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+}
+
+interface HTMLProgressElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Defines the maximum, or "done" value for a progress element.
+ */
+ max: number;
+ /**
+ * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
+ */
+ readonly position: number;
+ /**
+ * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+}
+
+interface HTMLQuoteElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+}
+
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ crossOrigin: string | null;
+ /**
+ * Sets or retrieves the status of the script.
+ */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ */
+ htmlFor: string;
+ /**
+ * Retrieves the URL to an external file that contains the source code or data.
+ */
+ src: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the MIME type for the associated scripting engine.
+ */
+ type: string;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+}
+
+interface HTMLSelectElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly options: HTMLOptionsCollection;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the index of the selected option in a select object.
+ */
+ selectedIndex: number;
+ selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
+ /**
+ * Sets or retrieves the number of rows in the list box.
+ */
+ size: number;
+ /**
+ * Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLElement, before?: HTMLElement | number): void;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): any;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(index?: number): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+}
+
+interface HTMLSourceElement extends HTMLElement {
+ /**
+ * Gets or sets the intended media type of the media source.
+ */
+ media: string;
+ msKeySystem: string;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Gets or sets the MIME type of a media resource.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+}
+
+interface HTMLSpanElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+}
+
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ disabled: boolean;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+}
+
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the caption appears at the top or bottom of the table.
+ */
+ vAlign: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+}
+
+interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves abbreviated text for the object.
+ */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ */
+ axis: string;
+ bgColor: any;
+ /**
+ * Retrieves the position of the object in the cells collection of a row.
+ */
+ readonly cellIndex: number;
+ /**
+ * Sets or retrieves the number columns in the table that the object should span.
+ */
+ colSpan: number;
+ /**
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ /**
+ * Sets or retrieves how many rows in a table the cell should span.
+ */
+ rowSpan: number;
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+}
+
+interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of columns in the group.
+ */
+ span: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+}
+
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableDataCellElement: {
+ prototype: HTMLTableDataCellElement;
+ new(): HTMLTableDataCellElement;
+}
+
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the caption object of a table.
+ */
+ caption: HTMLTableCaptionElement;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the number of columns in the table.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
+ frame: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ */
+ summary: string;
+ /**
+ * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
+ */
+ tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
+ /**
+ * Retrieves the tFoot object of the table.
+ */
+ tFoot: HTMLTableSectionElement;
+ /**
+ * Retrieves the tHead object of the table.
+ */
+ tHead: HTMLTableSectionElement;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Creates an empty caption element in the table.
+ */
+ createCaption(): HTMLTableCaptionElement;
+ /**
+ * Creates an empty tBody element in the table.
+ */
+ createTBody(): HTMLTableSectionElement;
+ /**
+ * Creates an empty tFoot element in the table.
+ */
+ createTFoot(): HTMLTableSectionElement;
+ /**
+ * Returns the tHead element object if successful, or null otherwise.
+ */
+ createTHead(): HTMLTableSectionElement;
+ /**
+ * Deletes the caption element and its contents from the table.
+ */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Deletes the tFoot element and its contents from the table.
+ */
+ deleteTFoot(): void;
+ /**
+ * Deletes the tHead element and its contents from the table.
+ */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+}
+
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableHeaderCellElement: {
+ prototype: HTMLTableHeaderCellElement;
+ new(): HTMLTableHeaderCellElement;
+}
+
+interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Retrieves a collection of all cells in the table row.
+ */
+ cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Retrieves the position of the object in the rows collection for the table.
+ */
+ readonly rowIndex: number;
+ /**
+ * Retrieves the position of the object in the collection.
+ */
+ readonly sectionRowIndex: number;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index?: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableDataCellElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+}
+
+interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+}
+
+interface HTMLTemplateElement extends HTMLElement {
+ readonly content: DocumentFragment;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+}
+
+interface HTMLTextAreaElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ /**
+ * Sets or retrieves the value indicated whether the content of the object is read-only.
+ */
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: number;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ /**
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
+ status: any;
+ /**
+ * Retrieves the type of control.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Retrieves or sets the text in the entry field of the textArea element.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Sets or retrieves how to handle wordwrapping in the object.
+ */
+ wrap: string;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Highlights the input area of a form element.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start: number, end: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+}
+
+interface HTMLTimeElement extends HTMLElement {
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTimeElement: {
+ prototype: HTMLTimeElement;
+ new(): HTMLTimeElement;
+}
+
+interface HTMLTitleElement extends HTMLElement {
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+}
+
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readonly readyState: number;
+ src: string;
+ srclang: string;
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+}
+
+interface HTMLUListElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+}
+
+interface HTMLUnknownElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+}
+
+interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
+ "MSVideoFormatChanged": Event;
+ "MSVideoFrameStepCompleted": Event;
+ "MSVideoOptimalLayoutChanged": Event;
+}
+
+interface HTMLVideoElement extends HTMLMediaElement {
+ /**
+ * Gets or sets the height of the video element.
+ */
+ height: number;
+ msHorizontalMirror: boolean;
+ readonly msIsLayoutOptimalForPlayback: boolean;
+ readonly msIsStereo3D: boolean;
+ msStereo3DPackingMode: string;
+ msStereo3DRenderMode: string;
+ msZoom: boolean;
+ onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
+ /**
+ * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
+ */
+ poster: string;
+ /**
+ * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoHeight: number;
+ /**
+ * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoWidth: number;
+ readonly webkitDisplayingFullscreen: boolean;
+ readonly webkitSupportsFullscreen: boolean;
+ /**
+ * Gets or sets the width of the video element.
+ */
+ width: number;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ msFrameStep(forward: boolean): void;
+ msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
+ webkitEnterFullScreen(): void;
+ webkitEnterFullscreen(): void;
+ webkitExitFullScreen(): void;
+ webkitExitFullscreen(): void;
+ addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+}
+
+interface HashChangeEvent extends Event {
+ readonly newURL: string | null;
+ readonly oldURL: string | null;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(typeArg: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+}
+
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ forEach(callback: ForEachCallback): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: any): Headers;
+}
+
+interface History {
+ readonly length: number;
+ readonly state: any;
+ scrollRestoration: ScrollRestoration;
+ back(): void;
+ forward(): void;
+ go(delta?: number): void;
+ pushState(data: any, title: string, url?: string | null): void;
+ replaceState(data: any, title: string, url?: string | null): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+}
+
+interface IDBCursor {
+ readonly direction: IDBCursorDirection;
+ key: IDBKeyRange | IDBValidKey;
+ readonly primaryKey: any;
+ source: IDBObjectStore | IDBIndex;
+ advance(count: number): void;
+ continue(key?: IDBKeyRange | IDBValidKey): void;
+ delete(): IDBRequest;
+ update(value: any): IDBRequest;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+interface IDBCursorWithValue extends IDBCursor {
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+}
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "error": Event;
+}
+
+interface IDBDatabase extends EventTarget {
+ readonly name: string;
+ readonly objectStoreNames: DOMStringList;
+ onabort: (this: IDBDatabase, ev: Event) => any;
+ onerror: (this: IDBDatabase, ev: Event) => any;
+ version: number;
+ onversionchange: (ev: IDBVersionChangeEvent) => any;
+ close(): void;
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ deleteObjectStore(name: string): void;
+ transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+}
+
+interface IDBFactory {
+ cmp(first: any, second: any): number;
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+}
+
+interface IDBIndex {
+ keyPath: string | string[];
+ readonly name: string;
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ multiEntry: boolean;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ get(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+}
+
+interface IDBKeyRange {
+ readonly lower: any;
+ readonly lowerOpen: boolean;
+ readonly upper: any;
+ readonly upperOpen: boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ only(value: any): IDBKeyRange;
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+}
+
+interface IDBObjectStore {
+ readonly indexNames: DOMStringList;
+ keyPath: string | string[];
+ readonly name: string;
+ readonly transaction: IDBTransaction;
+ autoIncrement: boolean;
+ add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ clear(): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
+ delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ deleteIndex(indexName: string): void;
+ get(key: any): IDBRequest;
+ index(name: string): IDBIndex;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+}
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+interface IDBOpenDBRequest extends IDBRequest {
+ onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
+ onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+}
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+interface IDBRequest extends EventTarget {
+ readonly error: DOMError;
+ onerror: (this: IDBRequest, ev: Event) => any;
+ onsuccess: (this: IDBRequest, ev: Event) => any;
+ readonly readyState: IDBRequestReadyState;
+ readonly result: any;
+ source: IDBObjectStore | IDBIndex | IDBCursor;
+ readonly transaction: IDBTransaction;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+}
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ readonly db: IDBDatabase;
+ readonly error: DOMError;
+ readonly mode: IDBTransactionMode;
+ onabort: (this: IDBTransaction, ev: Event) => any;
+ oncomplete: (this: IDBTransaction, ev: Event) => any;
+ onerror: (this: IDBTransaction, ev: Event) => any;
+ abort(): void;
+ objectStore(name: string): IDBObjectStore;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+}
+
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(): IDBVersionChangeEvent;
+}
+
+interface IIRFilterNode extends AudioNode {
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var IIRFilterNode: {
+ prototype: IIRFilterNode;
+ new(): IIRFilterNode;
+}
+
+interface ImageData {
+ data: Uint8ClampedArray;
+ readonly height: number;
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
+}
+
+interface IntersectionObserver {
+ readonly root: Element | null;
+ readonly rootMargin: string;
+ readonly thresholds: number[];
+ disconnect(): void;
+ observe(target: Element): void;
+ takeRecords(): IntersectionObserverEntry[];
+ unobserve(target: Element): void;
+}
+
+declare var IntersectionObserver: {
+ prototype: IntersectionObserver;
+ new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
+}
+
+interface IntersectionObserverEntry {
+ readonly boundingClientRect: ClientRect;
+ readonly intersectionRatio: number;
+ readonly intersectionRect: ClientRect;
+ readonly rootBounds: ClientRect;
+ readonly target: Element;
+ readonly time: number;
+}
+
+declare var IntersectionObserverEntry: {
+ prototype: IntersectionObserverEntry;
+ new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
+}
+
+interface KeyboardEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly char: string | null;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly key: string;
+ readonly keyCode: number;
+ readonly locale: string;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ readonly which: number;
+ readonly code: string;
+ getModifierState(keyArg: string): boolean;
+ initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+interface ListeningStateChangedEvent extends Event {
+ readonly label: string;
+ readonly state: ListeningState;
+}
+
+declare var ListeningStateChangedEvent: {
+ prototype: ListeningStateChangedEvent;
+ new(): ListeningStateChangedEvent;
+}
+
+interface Location {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ assign(url: string): void;
+ reload(forcedReload?: boolean): void;
+ replace(url: string): void;
+ toString(): string;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+}
+
+interface LongRunningScriptDetectedEvent extends Event {
+ readonly executionTime: number;
+ stopPageScriptExecution: boolean;
+}
+
+declare var LongRunningScriptDetectedEvent: {
+ prototype: LongRunningScriptDetectedEvent;
+ new(): LongRunningScriptDetectedEvent;
+}
+
+interface MSApp {
+ clearTemporaryWebDataAsync(): MSAppAsyncOperation;
+ createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
+ createDataPackage(object: any): any;
+ createDataPackageFromSelection(): any;
+ createFileFromStorageFile(storageFile: any): File;
+ createStreamFromInputStream(type: string, inputStream: any): MSStream;
+ execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
+ execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
+ getCurrentPriority(): string;
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
+ getViewId(view: any): any;
+ isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
+ pageHandlesAllApplicationActivations(enabled: boolean): void;
+ suppressSubdownloadCredentialPrompts(suppress: boolean): void;
+ terminateApp(exceptionObject: any): void;
+ readonly CURRENT: string;
+ readonly HIGH: string;
+ readonly IDLE: string;
+ readonly NORMAL: string;
+}
+declare var MSApp: MSApp;
+
+interface MSAppAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSAppAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
+ onerror: (this: MSAppAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSAppAsyncOperation: {
+ prototype: MSAppAsyncOperation;
+ new(): MSAppAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+}
+
+interface MSAssertion {
+ readonly id: string;
+ readonly type: MSCredentialType;
+}
+
+declare var MSAssertion: {
+ prototype: MSAssertion;
+ new(): MSAssertion;
+}
+
+interface MSBlobBuilder {
+ append(data: any, endings?: string): void;
+ getBlob(contentType?: string): Blob;
+}
+
+declare var MSBlobBuilder: {
+ prototype: MSBlobBuilder;
+ new(): MSBlobBuilder;
+}
+
+interface MSCredentials {
+ getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
+ makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
+}
+
+declare var MSCredentials: {
+ prototype: MSCredentials;
+ new(): MSCredentials;
+}
+
+interface MSFIDOCredentialAssertion extends MSAssertion {
+ readonly algorithm: string | Algorithm;
+ readonly attestation: any;
+ readonly publicKey: string;
+ readonly transportHints: MSTransportType[];
+}
+
+declare var MSFIDOCredentialAssertion: {
+ prototype: MSFIDOCredentialAssertion;
+ new(): MSFIDOCredentialAssertion;
+}
+
+interface MSFIDOSignature {
+ readonly authnrData: string;
+ readonly clientData: string;
+ readonly signature: string;
+}
+
+declare var MSFIDOSignature: {
+ prototype: MSFIDOSignature;
+ new(): MSFIDOSignature;
+}
+
+interface MSFIDOSignatureAssertion extends MSAssertion {
+ readonly signature: MSFIDOSignature;
+}
+
+declare var MSFIDOSignatureAssertion: {
+ prototype: MSFIDOSignatureAssertion;
+ new(): MSFIDOSignatureAssertion;
+}
+
+interface MSGesture {
+ target: Element;
+ addPointer(pointerId: number): void;
+ stop(): void;
+}
+
+declare var MSGesture: {
+ prototype: MSGesture;
+ new(): MSGesture;
+}
+
+interface MSGestureEvent extends UIEvent {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly expansion: number;
+ readonly gestureObject: any;
+ readonly hwTimestamp: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly rotation: number;
+ readonly scale: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly translationX: number;
+ readonly translationY: number;
+ readonly velocityAngular: number;
+ readonly velocityExpansion: number;
+ readonly velocityX: number;
+ readonly velocityY: number;
+ initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+declare var MSGestureEvent: {
+ prototype: MSGestureEvent;
+ new(): MSGestureEvent;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+interface MSGraphicsTrust {
+ readonly constrictionActive: boolean;
+ readonly status: string;
+}
+
+declare var MSGraphicsTrust: {
+ prototype: MSGraphicsTrust;
+ new(): MSGraphicsTrust;
+}
+
+interface MSHTMLWebViewElement extends HTMLElement {
+ readonly canGoBack: boolean;
+ readonly canGoForward: boolean;
+ readonly containsFullScreenElement: boolean;
+ readonly documentTitle: string;
+ height: number;
+ readonly settings: MSWebViewSettings;
+ src: string;
+ width: number;
+ addWebAllowedObject(name: string, applicationObject: any): void;
+ buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
+ capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
+ captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
+ getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
+ getDeferredPermissionRequests(): DeferredPermissionRequest[];
+ goBack(): void;
+ goForward(): void;
+ invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
+ navigate(uri: string): void;
+ navigateFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ navigateToLocalStreamUri(source: string, streamResolver: any): void;
+ navigateToString(contents: string): void;
+ navigateWithHttpRequestMessage(requestMessage: any): void;
+ refresh(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MSHTMLWebViewElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSHTMLWebViewElement: {
+ prototype: MSHTMLWebViewElement;
+ new(): MSHTMLWebViewElement;
+}
+
+interface MSInputMethodContextEventMap {
+ "MSCandidateWindowHide": Event;
+ "MSCandidateWindowShow": Event;
+ "MSCandidateWindowUpdate": Event;
+}
+
+interface MSInputMethodContext extends EventTarget {
+ readonly compositionEndOffset: number;
+ readonly compositionStartOffset: number;
+ oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
+ readonly target: HTMLElement;
+ getCandidateWindowClientRect(): ClientRect;
+ getCompositionAlternatives(): string[];
+ hasComposition(): boolean;
+ isCandidateWindowVisible(): boolean;
+ addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSInputMethodContext: {
+ prototype: MSInputMethodContext;
+ new(): MSInputMethodContext;
+}
+
+interface MSManipulationEvent extends UIEvent {
+ readonly currentState: number;
+ readonly inertiaDestinationX: number;
+ readonly inertiaDestinationY: number;
+ readonly lastState: number;
+ initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+declare var MSManipulationEvent: {
+ prototype: MSManipulationEvent;
+ new(): MSManipulationEvent;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+interface MSMediaKeyError {
+ readonly code: number;
+ readonly systemCode: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+declare var MSMediaKeyError: {
+ prototype: MSMediaKeyError;
+ new(): MSMediaKeyError;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+interface MSMediaKeyMessageEvent extends Event {
+ readonly destinationURL: string | null;
+ readonly message: Uint8Array;
+}
+
+declare var MSMediaKeyMessageEvent: {
+ prototype: MSMediaKeyMessageEvent;
+ new(): MSMediaKeyMessageEvent;
+}
+
+interface MSMediaKeyNeededEvent extends Event {
+ readonly initData: Uint8Array | null;
+}
+
+declare var MSMediaKeyNeededEvent: {
+ prototype: MSMediaKeyNeededEvent;
+ new(): MSMediaKeyNeededEvent;
+}
+
+interface MSMediaKeySession extends EventTarget {
+ readonly error: MSMediaKeyError | null;
+ readonly keySystem: string;
+ readonly sessionId: string;
+ close(): void;
+ update(key: Uint8Array): void;
+}
+
+declare var MSMediaKeySession: {
+ prototype: MSMediaKeySession;
+ new(): MSMediaKeySession;
+}
+
+interface MSMediaKeys {
+ readonly keySystem: string;
+ createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
+}
+
+declare var MSMediaKeys: {
+ prototype: MSMediaKeys;
+ new(keySystem: string): MSMediaKeys;
+ isTypeSupported(keySystem: string, type?: string): boolean;
+ isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
+}
+
+interface MSPointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var MSPointerEvent: {
+ prototype: MSPointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
+}
+
+interface MSRangeCollection {
+ readonly length: number;
+ item(index: number): Range;
+ [index: number]: Range;
+}
+
+declare var MSRangeCollection: {
+ prototype: MSRangeCollection;
+ new(): MSRangeCollection;
+}
+
+interface MSSiteModeEvent extends Event {
+ readonly actionURL: string;
+ readonly buttonID: number;
+}
+
+declare var MSSiteModeEvent: {
+ prototype: MSSiteModeEvent;
+ new(): MSSiteModeEvent;
+}
+
+interface MSStream {
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+}
+
+declare var MSStream: {
+ prototype: MSStream;
+ new(): MSStream;
+}
+
+interface MSStreamReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(stream: MSStream, size?: number): void;
+ readAsBinaryString(stream: MSStream, size?: number): void;
+ readAsBlob(stream: MSStream, size?: number): void;
+ readAsDataURL(stream: MSStream, size?: number): void;
+ readAsText(stream: MSStream, encoding?: string, size?: number): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSStreamReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSStreamReader: {
+ prototype: MSStreamReader;
+ new(): MSStreamReader;
+}
+
+interface MSWebViewAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSWebViewAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ onerror: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ readonly target: MSHTMLWebViewElement;
+ readonly type: number;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+ addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSWebViewAsyncOperation: {
+ prototype: MSWebViewAsyncOperation;
+ new(): MSWebViewAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+}
+
+interface MSWebViewSettings {
+ isIndexedDBEnabled: boolean;
+ isJavaScriptEnabled: boolean;
+}
+
+declare var MSWebViewSettings: {
+ prototype: MSWebViewSettings;
+ new(): MSWebViewSettings;
+}
+
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: MediaDeviceKind;
+ readonly label: string;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+}
+
+interface MediaDevicesEventMap {
+ "devicechange": Event;
+}
+
+interface MediaDevices extends EventTarget {
+ ondevicechange: (this: MediaDevices, ev: Event) => any;
+ enumerateDevices(): any;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
+ addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+}
+
+interface MediaElementAudioSourceNode extends AudioNode {
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(): MediaElementAudioSourceNode;
+}
+
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+}
+
+interface MediaError {
+ readonly code: number;
+ readonly msExtendedCode: number;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: MediaKeyMessageType;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+}
+
+interface MediaKeySession extends EventTarget {
+ readonly closed: Promise<void>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ readonly sessionId: string;
+ close(): Promise<void>;
+ generateRequest(initDataType: string, initData: any): Promise<void>;
+ load(sessionId: string): Promise<boolean>;
+ remove(): Promise<void>;
+ update(response: any): Promise<void>;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+}
+
+interface MediaKeyStatusMap {
+ readonly size: number;
+ forEach(callback: ForEachCallback): void;
+ get(keyId: any): MediaKeyStatus;
+ has(keyId: any): boolean;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+}
+
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): Promise<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+}
+
+interface MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+}
+
+interface MediaList {
+ readonly length: number;
+ mediaText: string;
+ appendMedium(newMedium: string): void;
+ deleteMedium(oldMedium: string): void;
+ item(index: number): string;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+}
+
+interface MediaQueryList {
+ readonly matches: boolean;
+ readonly media: string;
+ addListener(listener: MediaQueryListListener): void;
+ removeListener(listener: MediaQueryListListener): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+}
+
+interface MediaSource extends EventTarget {
+ readonly activeSourceBuffers: SourceBufferList;
+ duration: number;
+ readonly readyState: string;
+ readonly sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ endOfStream(error?: number): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+}
+
+interface MediaStreamEventMap {
+ "active": Event;
+ "addtrack": MediaStreamTrackEvent;
+ "inactive": Event;
+ "removetrack": MediaStreamTrackEvent;
+}
+
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onactive: (this: MediaStream, ev: Event) => any;
+ onaddtrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ oninactive: (this: MediaStream, ev: Event) => any;
+ onremovetrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
+}
+
+interface MediaStreamAudioSourceNode extends AudioNode {
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(): MediaStreamAudioSourceNode;
+}
+
+interface MediaStreamError {
+ readonly constraintName: string | null;
+ readonly message: string | null;
+ readonly name: string;
+}
+
+declare var MediaStreamError: {
+ prototype: MediaStreamError;
+ new(): MediaStreamError;
+}
+
+interface MediaStreamErrorEvent extends Event {
+ readonly error: MediaStreamError | null;
+}
+
+declare var MediaStreamErrorEvent: {
+ prototype: MediaStreamErrorEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
+}
+
+interface MediaStreamEvent extends Event {
+ readonly stream: MediaStream | null;
+}
+
+declare var MediaStreamEvent: {
+ prototype: MediaStreamEvent;
+ new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent;
+}
+
+interface MediaStreamTrackEventMap {
+ "ended": MediaStreamErrorEvent;
+ "mute": Event;
+ "overconstrained": MediaStreamErrorEvent;
+ "unmute": Event;
+}
+
+interface MediaStreamTrack extends EventTarget {
+ enabled: boolean;
+ readonly id: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onmute: (this: MediaStreamTrack, ev: Event) => any;
+ onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onunmute: (this: MediaStreamTrack, ev: Event) => any;
+ readonly readonly: boolean;
+ readonly readyState: MediaStreamTrackState;
+ readonly remote: boolean;
+ applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+}
+
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+}
+
+interface MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+}
+
+interface MessageEvent extends Event {
+ readonly data: any;
+ readonly origin: string;
+ readonly ports: any;
+ readonly source: Window;
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+}
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+}
+
+interface MessagePort extends EventTarget {
+ onmessage: (this: MessagePort, ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message?: any, transfer?: any[]): void;
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+}
+
+interface MimeType {
+ readonly description: string;
+ readonly enabledPlugin: Plugin;
+ readonly suffixes: string;
+ readonly type: string;
+}
+
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+}
+
+interface MimeTypeArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(type: string): Plugin;
+ [index: number]: Plugin;
+}
+
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+}
+
+interface MouseEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly fromElement: Element;
+ readonly layerX: number;
+ readonly layerY: number;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly toElement: Element;
+ readonly which: number;
+ readonly x: number;
+ readonly y: number;
+ getModifierState(keyArg: string): boolean;
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
+}
+
+interface MutationEvent extends Event {
+ readonly attrChange: number;
+ readonly attrName: string;
+ readonly newValue: string;
+ readonly prevValue: string;
+ readonly relatedNode: Node;
+ initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+interface MutationObserver {
+ disconnect(): void;
+ observe(target: Node, options: MutationObserverInit): void;
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+}
+
+interface MutationRecord {
+ readonly addedNodes: NodeList;
+ readonly attributeName: string | null;
+ readonly attributeNamespace: string | null;
+ readonly nextSibling: Node | null;
+ readonly oldValue: string | null;
+ readonly previousSibling: Node | null;
+ readonly removedNodes: NodeList;
+ readonly target: Node;
+ readonly type: string;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+}
+
+interface NamedNodeMap {
+ readonly length: number;
+ getNamedItem(name: string): Attr;
+ getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ item(index: number): Attr;
+ removeNamedItem(name: string): Attr;
+ removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ setNamedItem(arg: Attr): Attr;
+ setNamedItemNS(arg: Attr): Attr;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+}
+
+interface NavigationCompletedEvent extends NavigationEvent {
+ readonly isSuccess: boolean;
+ readonly webErrorStatus: number;
+}
+
+declare var NavigationCompletedEvent: {
+ prototype: NavigationCompletedEvent;
+ new(): NavigationCompletedEvent;
+}
+
+interface NavigationEvent extends Event {
+ readonly uri: string;
+}
+
+declare var NavigationEvent: {
+ prototype: NavigationEvent;
+ new(): NavigationEvent;
+}
+
+interface NavigationEventWithReferrer extends NavigationEvent {
+ readonly referer: string;
+}
+
+declare var NavigationEventWithReferrer: {
+ prototype: NavigationEventWithReferrer;
+ new(): NavigationEventWithReferrer;
+}
+
+interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
+ readonly authentication: WebAuthentication;
+ readonly cookieEnabled: boolean;
+ gamepadInputEmulation: GamepadInputEmulationType;
+ readonly language: string;
+ readonly maxTouchPoints: number;
+ readonly mimeTypes: MimeTypeArray;
+ readonly msManipulationViewsEnabled: boolean;
+ readonly msMaxTouchPoints: number;
+ readonly msPointerEnabled: boolean;
+ readonly plugins: PluginArray;
+ readonly pointerEnabled: boolean;
+ readonly serviceWorker: ServiceWorkerContainer;
+ readonly webdriver: boolean;
+ readonly hardwareConcurrency: number;
+ getGamepads(): Gamepad[];
+ javaEnabled(): boolean;
+ msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
+ vibrate(pattern: number | number[]): boolean;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+}
+
+interface Node extends EventTarget {
+ readonly attributes: NamedNodeMap;
+ readonly baseURI: string | null;
+ readonly childNodes: NodeList;
+ readonly firstChild: Node | null;
+ readonly lastChild: Node | null;
+ readonly localName: string | null;
+ readonly namespaceURI: string | null;
+ readonly nextSibling: Node | null;
+ readonly nodeName: string;
+ readonly nodeType: number;
+ nodeValue: string | null;
+ readonly ownerDocument: Document;
+ readonly parentElement: HTMLElement | null;
+ readonly parentNode: Node | null;
+ readonly previousSibling: Node | null;
+ textContent: string | null;
+ appendChild<T extends Node>(newChild: T): T;
+ cloneNode(deep?: boolean): Node;
+ compareDocumentPosition(other: Node): number;
+ contains(child: Node): boolean;
+ hasAttributes(): boolean;
+ hasChildNodes(): boolean;
+ insertBefore<T extends Node>(newChild: T, refChild: Node | null): T;
+ isDefaultNamespace(namespaceURI: string | null): boolean;
+ isEqualNode(arg: Node): boolean;
+ isSameNode(other: Node): boolean;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespaceURI: string | null): string | null;
+ normalize(): void;
+ removeChild<T extends Node>(oldChild: T): T;
+ replaceChild<T extends Node>(newChild: Node, oldChild: T): T;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+interface NodeFilter {
+ acceptNode(n: Node): number;
+}
+
+declare var NodeFilter: {
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
+}
+
+interface NodeIterator {
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ detach(): void;
+ nextNode(): Node;
+ previousNode(): Node;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+}
+
+interface NodeList {
+ readonly length: number;
+ item(index: number): Node;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: (this: Notification, ev: Event) => any;
+ onclose: (this: Notification, ev: Event) => any;
+ onerror: (this: Notification, ev: Event) => any;
+ onshow: (this: Notification, ev: Event) => any;
+ readonly permission: NotificationPermission;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+}
+
+interface OES_element_index_uint {
+}
+
+declare var OES_element_index_uint: {
+ prototype: OES_element_index_uint;
+ new(): OES_element_index_uint;
+}
+
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+declare var OES_standard_derivatives: {
+ prototype: OES_standard_derivatives;
+ new(): OES_standard_derivatives;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+interface OES_texture_float {
+}
+
+declare var OES_texture_float: {
+ prototype: OES_texture_float;
+ new(): OES_texture_float;
+}
+
+interface OES_texture_float_linear {
+}
+
+declare var OES_texture_float_linear: {
+ prototype: OES_texture_float_linear;
+ new(): OES_texture_float_linear;
+}
+
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: number;
+}
+
+declare var OES_texture_half_float: {
+ prototype: OES_texture_half_float;
+ new(): OES_texture_half_float;
+ readonly HALF_FLOAT_OES: number;
+}
+
+interface OES_texture_half_float_linear {
+}
+
+declare var OES_texture_half_float_linear: {
+ prototype: OES_texture_half_float_linear;
+ new(): OES_texture_half_float_linear;
+}
+
+interface OfflineAudioCompletionEvent extends Event {
+ readonly renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(): OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContextEventMap extends AudioContextEventMap {
+ "complete": OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContext extends AudioContextBase {
+ readonly length: number;
+ oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
+ startRendering(): Promise<AudioBuffer>;
+ suspend(suspendTime: number): Promise<void>;
+ addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+}
+
+interface OscillatorNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface OscillatorNode extends AudioNode {
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
+ type: OscillatorType;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(): OscillatorNode;
+}
+
+interface OverflowEvent extends UIEvent {
+ readonly horizontalOverflow: boolean;
+ readonly orient: number;
+ readonly verticalOverflow: boolean;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+declare var OverflowEvent: {
+ prototype: OverflowEvent;
+ new(): OverflowEvent;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+interface PageTransitionEvent extends Event {
+ readonly persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(): PageTransitionEvent;
+}
+
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: DistanceModelType;
+ maxDistance: number;
+ panningModel: PanningModelType;
+ refDistance: number;
+ rolloffFactor: number;
+ setOrientation(x: number, y: number, z: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(): PannerNode;
+}
+
+interface Path2D extends Object, CanvasPathMethods {
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D): Path2D;
+}
+
+interface PaymentAddress {
+ readonly addressLine: string[];
+ readonly city: string;
+ readonly country: string;
+ readonly dependentLocality: string;
+ readonly languageCode: string;
+ readonly organization: string;
+ readonly phone: string;
+ readonly postalCode: string;
+ readonly recipient: string;
+ readonly region: string;
+ readonly sortingCode: string;
+ toJSON(): any;
+}
+
+declare var PaymentAddress: {
+ prototype: PaymentAddress;
+ new(): PaymentAddress;
+}
+
+interface PaymentRequestEventMap {
+ "shippingaddresschange": Event;
+ "shippingoptionchange": Event;
+}
+
+interface PaymentRequest extends EventTarget {
+ onshippingaddresschange: (this: PaymentRequest, ev: Event) => any;
+ onshippingoptionchange: (this: PaymentRequest, ev: Event) => any;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ readonly shippingType: PaymentShippingType | null;
+ abort(): Promise<void>;
+ show(): Promise<PaymentResponse>;
+ addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var PaymentRequest: {
+ prototype: PaymentRequest;
+ new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
+}
+
+interface PaymentRequestUpdateEvent extends Event {
+ updateWith(d: Promise<PaymentDetails>): void;
+}
+
+declare var PaymentRequestUpdateEvent: {
+ prototype: PaymentRequestUpdateEvent;
+ new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
+}
+
+interface PaymentResponse {
+ readonly details: any;
+ readonly methodName: string;
+ readonly payerEmail: string | null;
+ readonly payerName: string | null;
+ readonly payerPhone: string | null;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ complete(result?: PaymentComplete): Promise<void>;
+ toJSON(): any;
+}
+
+declare var PaymentResponse: {
+ prototype: PaymentResponse;
+ new(): PaymentResponse;
+}
+
+interface PerfWidgetExternal {
+ readonly activeNetworkRequestCount: number;
+ readonly averageFrameTime: number;
+ readonly averagePaintTime: number;
+ readonly extraInformationEnabled: boolean;
+ readonly independentRenderingEnabled: boolean;
+ readonly irDisablingContentString: string;
+ readonly irStatusAvailable: boolean;
+ readonly maxCpuSpeed: number;
+ readonly paintRequestsPerSecond: number;
+ readonly performanceCounter: number;
+ readonly performanceCounterFrequency: number;
+ addEventListener(eventType: string, callback: Function): void;
+ getMemoryUsage(): number;
+ getProcessCpuUsage(): number;
+ getRecentCpuUsage(last: number | null): any;
+ getRecentFrames(last: number | null): any;
+ getRecentMemoryUsage(last: number | null): any;
+ getRecentPaintRequests(last: number | null): any;
+ removeEventListener(eventType: string, callback: Function): void;
+ repositionWindow(x: number, y: number): void;
+ resizeWindow(width: number, height: number): void;
+}
+
+declare var PerfWidgetExternal: {
+ prototype: PerfWidgetExternal;
+ new(): PerfWidgetExternal;
+}
+
+interface Performance {
+ readonly navigation: PerformanceNavigation;
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): any;
+ getEntriesByName(name: string, entryType?: string): any;
+ getEntriesByType(entryType: string): any;
+ getMarks(markName?: string): any;
+ getMeasures(measureName?: string): any;
+ mark(markName: string): void;
+ measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+}
+
+interface PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+}
+
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+}
+
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+}
+
+interface PerformanceNavigation {
+ readonly redirectCount: number;
+ readonly type: number;
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+interface PerformanceNavigationTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly navigationStart: number;
+ readonly redirectCount: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly type: NavigationType;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+}
+
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+}
+
+interface PerformanceTiming {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly msFirstPaint: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ readonly secureConnectionStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+}
+
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(): PeriodicWave;
+}
+
+interface PermissionRequest extends DeferredPermissionRequest {
+ readonly state: MSWebViewPermissionState;
+ defer(): void;
+}
+
+declare var PermissionRequest: {
+ prototype: PermissionRequest;
+ new(): PermissionRequest;
+}
+
+interface PermissionRequestedEvent extends Event {
+ readonly permissionRequest: PermissionRequest;
+}
+
+declare var PermissionRequestedEvent: {
+ prototype: PermissionRequestedEvent;
+ new(): PermissionRequestedEvent;
+}
+
+interface Plugin {
+ readonly description: string;
+ readonly filename: string;
+ readonly length: number;
+ readonly name: string;
+ readonly version: string;
+ item(index: number): MimeType;
+ namedItem(type: string): MimeType;
+ [index: number]: MimeType;
+}
+
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+}
+
+interface PluginArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(name: string): Plugin;
+ refresh(reload?: boolean): void;
+ [index: number]: Plugin;
+}
+
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+}
+
+interface PointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
+}
+
+interface PopStateEvent extends Event {
+ readonly state: any;
+ initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
+}
+
+interface Position {
+ readonly coords: Coordinates;
+ readonly timestamp: number;
+}
+
+declare var Position: {
+ prototype: Position;
+ new(): Position;
+}
+
+interface PositionError {
+ readonly code: number;
+ readonly message: string;
+ toString(): string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+declare var PositionError: {
+ prototype: PositionError;
+ new(): PositionError;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+interface ProcessingInstruction extends CharacterData {
+ readonly target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+}
+
+interface ProgressEvent extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly total: number;
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+}
+
+interface PushManager {
+ getSubscription(): Promise<PushSubscription>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+}
+
+interface PushSubscription {
+ readonly endpoint: USVString;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): any;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+}
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+}
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtlsTransportEventMap {
+ "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
+ "error": Event;
+}
+
+interface RTCDtlsTransport extends RTCStatsProvider {
+ ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
+ onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ readonly state: RTCDtlsTransportState;
+ readonly transport: RTCIceTransport;
+ getLocalParameters(): RTCDtlsParameters;
+ getRemoteCertificates(): ArrayBuffer[];
+ getRemoteParameters(): RTCDtlsParameters | null;
+ start(remoteParameters: RTCDtlsParameters): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(transport: RTCIceTransport): RTCDtlsTransport;
+}
+
+interface RTCDtlsTransportStateChangedEvent extends Event {
+ readonly state: RTCDtlsTransportState;
+}
+
+declare var RTCDtlsTransportStateChangedEvent: {
+ prototype: RTCDtlsTransportStateChangedEvent;
+ new(): RTCDtlsTransportStateChangedEvent;
+}
+
+interface RTCDtmfSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtmfSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ readonly duration: number;
+ readonly interToneGap: number;
+ ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
+ readonly sender: RTCRtpSender;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtmfSender: {
+ prototype: RTCDtmfSender;
+ new(sender: RTCRtpSender): RTCDtmfSender;
+}
+
+interface RTCIceCandidate {
+ candidate: string | null;
+ sdpMLineIndex: number | null;
+ sdpMid: string | null;
+ toJSON(): any;
+}
+
+declare var RTCIceCandidate: {
+ prototype: RTCIceCandidate;
+ new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
+}
+
+interface RTCIceCandidatePairChangedEvent extends Event {
+ readonly pair: RTCIceCandidatePair;
+}
+
+declare var RTCIceCandidatePairChangedEvent: {
+ prototype: RTCIceCandidatePairChangedEvent;
+ new(): RTCIceCandidatePairChangedEvent;
+}
+
+interface RTCIceGathererEventMap {
+ "error": Event;
+ "localcandidate": RTCIceGathererEvent;
+}
+
+interface RTCIceGatherer extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ onerror: ((this: RTCIceGatherer, ev: Event) => any) | null;
+ onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
+ createAssociatedGatherer(): RTCIceGatherer;
+ getLocalCandidates(): RTCIceCandidateDictionary[];
+ getLocalParameters(): RTCIceParameters;
+ addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceGatherer: {
+ prototype: RTCIceGatherer;
+ new(options: RTCIceGatherOptions): RTCIceGatherer;
+}
+
+interface RTCIceGathererEvent extends Event {
+ readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
+}
+
+declare var RTCIceGathererEvent: {
+ prototype: RTCIceGathererEvent;
+ new(): RTCIceGathererEvent;
+}
+
+interface RTCIceTransportEventMap {
+ "candidatepairchange": RTCIceCandidatePairChangedEvent;
+ "icestatechange": RTCIceTransportStateChangedEvent;
+}
+
+interface RTCIceTransport extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ readonly iceGatherer: RTCIceGatherer | null;
+ oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
+ onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
+ readonly role: RTCIceRole;
+ readonly state: RTCIceTransportState;
+ addRemoteCandidate(remoteCandidate: RTCIceCandidateDictionary | RTCIceCandidateComplete): void;
+ createAssociatedTransport(): RTCIceTransport;
+ getNominatedCandidatePair(): RTCIceCandidatePair | null;
+ getRemoteCandidates(): RTCIceCandidateDictionary[];
+ getRemoteParameters(): RTCIceParameters | null;
+ setRemoteCandidates(remoteCandidates: RTCIceCandidateDictionary[]): void;
+ start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: RTCIceRole): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+}
+
+interface RTCIceTransportStateChangedEvent extends Event {
+ readonly state: RTCIceTransportState;
+}
+
+declare var RTCIceTransportStateChangedEvent: {
+ prototype: RTCIceTransportStateChangedEvent;
+ new(): RTCIceTransportStateChangedEvent;
+}
+
+interface RTCPeerConnectionEventMap {
+ "addstream": MediaStreamEvent;
+ "icecandidate": RTCPeerConnectionIceEvent;
+ "iceconnectionstatechange": Event;
+ "icegatheringstatechange": Event;
+ "negotiationneeded": Event;
+ "removestream": MediaStreamEvent;
+ "signalingstatechange": Event;
+}
+
+interface RTCPeerConnection extends EventTarget {
+ readonly canTrickleIceCandidates: boolean | null;
+ readonly iceConnectionState: RTCIceConnectionState;
+ readonly iceGatheringState: RTCIceGatheringState;
+ readonly localDescription: RTCSessionDescription | null;
+ onaddstream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onicecandidate: (this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any;
+ oniceconnectionstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onicegatheringstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onnegotiationneeded: (this: RTCPeerConnection, ev: Event) => any;
+ onremovestream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ readonly remoteDescription: RTCSessionDescription | null;
+ readonly signalingState: RTCSignalingState;
+ addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addStream(stream: MediaStream): void;
+ close(): void;
+ createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
+ createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
+ getConfiguration(): RTCConfiguration;
+ getLocalStreams(): MediaStream[];
+ getRemoteStreams(): MediaStream[];
+ getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
+ getStreamById(streamId: string): MediaStream | null;
+ removeStream(stream: MediaStream): void;
+ setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCPeerConnection: {
+ prototype: RTCPeerConnection;
+ new(configuration: RTCConfiguration): RTCPeerConnection;
+}
+
+interface RTCPeerConnectionIceEvent extends Event {
+ readonly candidate: RTCIceCandidate;
+}
+
+declare var RTCPeerConnectionIceEvent: {
+ prototype: RTCPeerConnectionIceEvent;
+ new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
+}
+
+interface RTCRtpReceiverEventMap {
+ "error": Event;
+}
+
+interface RTCRtpReceiver extends RTCStatsProvider {
+ onerror: ((this: RTCRtpReceiver, ev: Event) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ getContributingSources(): RTCRtpContributingSource[];
+ receive(parameters: RTCRtpParameters): void;
+ requestSendCSRC(csrc: number): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCRtpSenderEventMap {
+ "error": Event;
+ "ssrcconflict": RTCSsrcConflictEvent;
+}
+
+interface RTCRtpSender extends RTCStatsProvider {
+ onerror: ((this: RTCRtpSender, ev: Event) => any) | null;
+ onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ send(parameters: RTCRtpParameters): void;
+ setTrack(track: MediaStreamTrack): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCSessionDescription {
+ sdp: string | null;
+ type: RTCSdpType | null;
+ toJSON(): any;
+}
+
+declare var RTCSessionDescription: {
+ prototype: RTCSessionDescription;
+ new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
+}
+
+interface RTCSrtpSdesTransportEventMap {
+ "error": Event;
+}
+
+interface RTCSrtpSdesTransport extends EventTarget {
+ onerror: ((this: RTCSrtpSdesTransport, ev: Event) => any) | null;
+ readonly transport: RTCIceTransport;
+ addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCSrtpSdesTransport: {
+ prototype: RTCSrtpSdesTransport;
+ new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
+ getLocalParameters(): RTCSrtpSdesParameters[];
+}
+
+interface RTCSsrcConflictEvent extends Event {
+ readonly ssrc: number;
+}
+
+declare var RTCSsrcConflictEvent: {
+ prototype: RTCSsrcConflictEvent;
+ new(): RTCSsrcConflictEvent;
+}
+
+interface RTCStatsProvider extends EventTarget {
+ getStats(): Promise<RTCStatsReport>;
+ msGetStats(): Promise<RTCStatsReport>;
+}
+
+declare var RTCStatsProvider: {
+ prototype: RTCStatsProvider;
+ new(): RTCStatsProvider;
+}
+
+interface Range {
+ readonly collapsed: boolean;
+ readonly commonAncestorContainer: Node;
+ readonly endContainer: Node;
+ readonly endOffset: number;
+ readonly startContainer: Node;
+ readonly startOffset: number;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ expand(Unit: ExpandGranularity): boolean;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ insertNode(newNode: Node): void;
+ selectNode(refNode: Node): void;
+ selectNodeContents(refNode: Node): void;
+ setEnd(refNode: Node, offset: number): void;
+ setEndAfter(refNode: Node): void;
+ setEndBefore(refNode: Node): void;
+ setStart(refNode: Node, offset: number): void;
+ setStartAfter(refNode: Node): void;
+ setStartBefore(refNode: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+interface ReadableStream {
+ readonly locked: boolean;
+ cancel(): Promise<void>;
+ getReader(): ReadableStreamReader;
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(): ReadableStream;
+}
+
+interface ReadableStreamReader {
+ cancel(): Promise<void>;
+ read(): Promise<any>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+}
+
+interface Request extends Object, Body {
+ readonly cache: RequestCache;
+ readonly credentials: RequestCredentials;
+ readonly destination: RequestDestination;
+ readonly headers: Headers;
+ readonly integrity: string;
+ readonly keepalive: boolean;
+ readonly method: string;
+ readonly mode: RequestMode;
+ readonly redirect: RequestRedirect;
+ readonly referrer: string;
+ readonly referrerPolicy: ReferrerPolicy;
+ readonly type: RequestType;
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: Request | string, init?: RequestInit): Request;
+}
+
+interface Response extends Object, Body {
+ readonly body: ReadableStream | null;
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: any, init?: ResponseInit): Response;
+}
+
+interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
+ readonly target: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+}
+
+interface SVGAngle {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+interface SVGAnimatedAngle {
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+}
+
+interface SVGAnimatedBoolean {
+ readonly animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+}
+
+interface SVGAnimatedEnumeration {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+}
+
+interface SVGAnimatedInteger {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+}
+
+interface SVGAnimatedLength {
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+}
+
+interface SVGAnimatedLengthList {
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+}
+
+interface SVGAnimatedNumber {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+}
+
+interface SVGAnimatedNumberList {
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+}
+
+interface SVGAnimatedPreserveAspectRatio {
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+}
+
+interface SVGAnimatedRect {
+ readonly animVal: SVGRect;
+ readonly baseVal: SVGRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+}
+
+interface SVGAnimatedString {
+ readonly animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+}
+
+interface SVGAnimatedTransformList {
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+}
+
+interface SVGCircleElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+}
+
+interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
+ readonly clipPathUnits: SVGAnimatedEnumeration;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+}
+
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+}
+
+interface SVGDefsElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+}
+
+interface SVGDescElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+}
+
+interface SVGElementEventMap extends ElementEventMap {
+ "click": MouseEvent;
+ "dblclick": MouseEvent;
+ "focusin": FocusEvent;
+ "focusout": FocusEvent;
+ "load": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+}
+
+interface SVGElement extends Element {
+ className: any;
+ onclick: (this: SVGElement, ev: MouseEvent) => any;
+ ondblclick: (this: SVGElement, ev: MouseEvent) => any;
+ onfocusin: (this: SVGElement, ev: FocusEvent) => any;
+ onfocusout: (this: SVGElement, ev: FocusEvent) => any;
+ onload: (this: SVGElement, ev: Event) => any;
+ onmousedown: (this: SVGElement, ev: MouseEvent) => any;
+ onmousemove: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseout: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseover: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseup: (this: SVGElement, ev: MouseEvent) => any;
+ readonly ownerSVGElement: SVGSVGElement;
+ readonly style: CSSStyleDeclaration;
+ readonly viewportElement: SVGElement;
+ xmlbase: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+}
+
+interface SVGElementInstance extends EventTarget {
+ readonly childNodes: SVGElementInstanceList;
+ readonly correspondingElement: SVGElement;
+ readonly correspondingUseElement: SVGUseElement;
+ readonly firstChild: SVGElementInstance;
+ readonly lastChild: SVGElementInstance;
+ readonly nextSibling: SVGElementInstance;
+ readonly parentNode: SVGElementInstance;
+ readonly previousSibling: SVGElementInstance;
+}
+
+declare var SVGElementInstance: {
+ prototype: SVGElementInstance;
+ new(): SVGElementInstance;
+}
+
+interface SVGElementInstanceList {
+ readonly length: number;
+ item(index: number): SVGElementInstance;
+}
+
+declare var SVGElementInstanceList: {
+ prototype: SVGElementInstanceList;
+ new(): SVGElementInstanceList;
+}
+
+interface SVGEllipseElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+}
+
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+}
+
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+}
+
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+}
+
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+}
+
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+}
+
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+}
+
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+}
+
+interface SVGFEDistantLightElement extends SVGElement {
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+}
+
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+}
+
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+}
+
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+}
+
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+}
+
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+}
+
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+}
+
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+}
+
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+}
+
+interface SVGFEMergeNodeElement extends SVGElement {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+}
+
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+}
+
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+}
+
+interface SVGFEPointLightElement extends SVGElement {
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+}
+
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+}
+
+interface SVGFESpotLightElement extends SVGElement {
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+}
+
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+}
+
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+}
+
+interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly filterResX: SVGAnimatedInteger;
+ readonly filterResY: SVGAnimatedInteger;
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ setFilterRes(filterResX: number, filterResY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+}
+
+interface SVGForeignObjectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+}
+
+interface SVGGElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+}
+
+interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+}
+
+interface SVGGraphicsElement extends SVGElement, SVGTests {
+ readonly farthestViewportElement: SVGElement;
+ readonly nearestViewportElement: SVGElement;
+ readonly transform: SVGAnimatedTransformList;
+ getBBox(): SVGRect;
+ getCTM(): SVGMatrix;
+ getScreenCTM(): SVGMatrix;
+ getTransformToElement(element: SVGElement): SVGMatrix;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGraphicsElement: {
+ prototype: SVGGraphicsElement;
+ new(): SVGGraphicsElement;
+}
+
+interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+}
+
+interface SVGLength {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+interface SVGLengthList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+}
+
+interface SVGLineElement extends SVGGraphicsElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+}
+
+interface SVGLinearGradientElement extends SVGGradientElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+}
+
+interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+}
+
+interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+}
+
+interface SVGMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ flipX(): SVGMatrix;
+ flipY(): SVGMatrix;
+ inverse(): SVGMatrix;
+ multiply(secondMatrix: SVGMatrix): SVGMatrix;
+ rotate(angle: number): SVGMatrix;
+ rotateFromVector(x: number, y: number): SVGMatrix;
+ scale(scaleFactor: number): SVGMatrix;
+ scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
+ skewX(angle: number): SVGMatrix;
+ skewY(angle: number): SVGMatrix;
+ translate(x: number, y: number): SVGMatrix;
+}
+
+declare var SVGMatrix: {
+ prototype: SVGMatrix;
+ new(): SVGMatrix;
+}
+
+interface SVGMetadataElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+}
+
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+}
+
+interface SVGNumberList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+}
+
+interface SVGPathElement extends SVGGraphicsElement {
+ readonly pathSegList: SVGPathSegList;
+ createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
+ createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
+ createSVGPathSegClosePath(): SVGPathSegClosePath;
+ createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
+ createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
+ createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
+ createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
+ createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
+ createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
+ createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
+ createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
+ createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
+ createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
+ createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
+ createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
+ createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
+ createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
+ createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
+ createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
+ getPathSegAtLength(distance: number): number;
+ getPointAtLength(distance: number): SVGPoint;
+ getTotalLength(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+}
+
+interface SVGPathSeg {
+ readonly pathSegType: number;
+ readonly pathSegTypeAsLetter: string;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+declare var SVGPathSeg: {
+ prototype: SVGPathSeg;
+ new(): SVGPathSeg;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+interface SVGPathSegArcAbs extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcAbs: {
+ prototype: SVGPathSegArcAbs;
+ new(): SVGPathSegArcAbs;
+}
+
+interface SVGPathSegArcRel extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcRel: {
+ prototype: SVGPathSegArcRel;
+ new(): SVGPathSegArcRel;
+}
+
+interface SVGPathSegClosePath extends SVGPathSeg {
+}
+
+declare var SVGPathSegClosePath: {
+ prototype: SVGPathSegClosePath;
+ new(): SVGPathSegClosePath;
+}
+
+interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicAbs: {
+ prototype: SVGPathSegCurvetoCubicAbs;
+ new(): SVGPathSegCurvetoCubicAbs;
+}
+
+interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicRel: {
+ prototype: SVGPathSegCurvetoCubicRel;
+ new(): SVGPathSegCurvetoCubicRel;
+}
+
+interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothAbs: {
+ prototype: SVGPathSegCurvetoCubicSmoothAbs;
+ new(): SVGPathSegCurvetoCubicSmoothAbs;
+}
+
+interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothRel: {
+ prototype: SVGPathSegCurvetoCubicSmoothRel;
+ new(): SVGPathSegCurvetoCubicSmoothRel;
+}
+
+interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticAbs: {
+ prototype: SVGPathSegCurvetoQuadraticAbs;
+ new(): SVGPathSegCurvetoQuadraticAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticRel: {
+ prototype: SVGPathSegCurvetoQuadraticRel;
+ new(): SVGPathSegCurvetoQuadraticRel;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
+ new(): SVGPathSegCurvetoQuadraticSmoothAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothRel: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothRel;
+ new(): SVGPathSegCurvetoQuadraticSmoothRel;
+}
+
+interface SVGPathSegLinetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoAbs: {
+ prototype: SVGPathSegLinetoAbs;
+ new(): SVGPathSegLinetoAbs;
+}
+
+interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalAbs: {
+ prototype: SVGPathSegLinetoHorizontalAbs;
+ new(): SVGPathSegLinetoHorizontalAbs;
+}
+
+interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalRel: {
+ prototype: SVGPathSegLinetoHorizontalRel;
+ new(): SVGPathSegLinetoHorizontalRel;
+}
+
+interface SVGPathSegLinetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoRel: {
+ prototype: SVGPathSegLinetoRel;
+ new(): SVGPathSegLinetoRel;
+}
+
+interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalAbs: {
+ prototype: SVGPathSegLinetoVerticalAbs;
+ new(): SVGPathSegLinetoVerticalAbs;
+}
+
+interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalRel: {
+ prototype: SVGPathSegLinetoVerticalRel;
+ new(): SVGPathSegLinetoVerticalRel;
+}
+
+interface SVGPathSegList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPathSeg): SVGPathSeg;
+ clear(): void;
+ getItem(index: number): SVGPathSeg;
+ initialize(newItem: SVGPathSeg): SVGPathSeg;
+ insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
+ removeItem(index: number): SVGPathSeg;
+ replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
+}
+
+declare var SVGPathSegList: {
+ prototype: SVGPathSegList;
+ new(): SVGPathSegList;
+}
+
+interface SVGPathSegMovetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoAbs: {
+ prototype: SVGPathSegMovetoAbs;
+ new(): SVGPathSegMovetoAbs;
+}
+
+interface SVGPathSegMovetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoRel: {
+ prototype: SVGPathSegMovetoRel;
+ new(): SVGPathSegMovetoRel;
+}
+
+interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+}
+
+interface SVGPoint {
+ x: number;
+ y: number;
+ matrixTransform(matrix: SVGMatrix): SVGPoint;
+}
+
+declare var SVGPoint: {
+ prototype: SVGPoint;
+ new(): SVGPoint;
+}
+
+interface SVGPointList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPoint): SVGPoint;
+ clear(): void;
+ getItem(index: number): SVGPoint;
+ initialize(newItem: SVGPoint): SVGPoint;
+ insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
+ removeItem(index: number): SVGPoint;
+ replaceItem(newItem: SVGPoint, index: number): SVGPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+}
+
+interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+}
+
+interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+}
+
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+interface SVGRadialGradientElement extends SVGGradientElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+}
+
+interface SVGRect {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var SVGRect: {
+ prototype: SVGRect;
+ new(): SVGRect;
+}
+
+interface SVGRectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+}
+
+interface SVGSVGElementEventMap extends SVGElementEventMap {
+ "SVGAbort": Event;
+ "SVGError": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "SVGUnload": Event;
+ "SVGZoom": SVGZoomEvent;
+}
+
+interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan {
+ contentScriptType: string;
+ contentStyleType: string;
+ currentScale: number;
+ readonly currentTranslate: SVGPoint;
+ readonly height: SVGAnimatedLength;
+ onabort: (this: SVGSVGElement, ev: Event) => any;
+ onerror: (this: SVGSVGElement, ev: Event) => any;
+ onresize: (this: SVGSVGElement, ev: UIEvent) => any;
+ onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
+ onunload: (this: SVGSVGElement, ev: Event) => any;
+ onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
+ readonly pixelUnitToMillimeterX: number;
+ readonly pixelUnitToMillimeterY: number;
+ readonly screenPixelToMillimeterX: number;
+ readonly screenPixelToMillimeterY: number;
+ readonly viewport: SVGRect;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
+ checkIntersection(element: SVGElement, rect: SVGRect): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): SVGMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): SVGPoint;
+ createSVGRect(): SVGRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ deselectAll(): void;
+ forceRedraw(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ unsuspendRedraw(suspendHandleID: number): void;
+ unsuspendRedrawAll(): void;
+ addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+}
+
+interface SVGScriptElement extends SVGElement, SVGURIReference {
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+}
+
+interface SVGStopElement extends SVGElement {
+ readonly offset: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+}
+
+interface SVGStringList {
+ readonly numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+}
+
+interface SVGStyleElement extends SVGElement {
+ disabled: boolean;
+ media: string;
+ title: string;
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+}
+
+interface SVGSwitchElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+}
+
+interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+}
+
+interface SVGTSpanElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+}
+
+interface SVGTextContentElement extends SVGGraphicsElement {
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point: SVGPoint): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): SVGPoint;
+ getExtentOfChar(charnum: number): SVGRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): SVGPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ selectSubString(charnum: number, nchars: number): void;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+}
+
+interface SVGTextElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+}
+
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+}
+
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+}
+
+interface SVGTitleElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+}
+
+interface SVGTransform {
+ readonly angle: number;
+ readonly matrix: SVGMatrix;
+ readonly type: number;
+ setMatrix(matrix: SVGMatrix): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+interface SVGTransformList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+}
+
+interface SVGUnitTypes {
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+declare var SVGUnitTypes: SVGUnitTypes;
+
+interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
+ readonly animatedInstanceRoot: SVGElementInstance;
+ readonly height: SVGAnimatedLength;
+ readonly instanceRoot: SVGElementInstance;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+}
+
+interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
+ readonly viewTarget: SVGStringList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+}
+
+interface SVGZoomAndPan {
+ readonly zoomAndPan: number;
+}
+
+declare var SVGZoomAndPan: {
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+}
+
+interface SVGZoomEvent extends UIEvent {
+ readonly newScale: number;
+ readonly newTranslate: SVGPoint;
+ readonly previousScale: number;
+ readonly previousTranslate: SVGPoint;
+ readonly zoomRectScreen: SVGRect;
+}
+
+declare var SVGZoomEvent: {
+ prototype: SVGZoomEvent;
+ new(): SVGZoomEvent;
+}
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
+}
+
+declare var ScopedCredential: {
+ prototype: ScopedCredential;
+ new(): ScopedCredential;
+}
+
+interface ScopedCredentialInfo {
+ readonly credential: ScopedCredential;
+ readonly publicKey: CryptoKey;
+}
+
+declare var ScopedCredentialInfo: {
+ prototype: ScopedCredentialInfo;
+ new(): ScopedCredentialInfo;
+}
+
+interface ScreenEventMap {
+ "MSOrientationChange": Event;
+}
+
+interface Screen extends EventTarget {
+ readonly availHeight: number;
+ readonly availWidth: number;
+ bufferDepth: number;
+ readonly colorDepth: number;
+ readonly deviceXDPI: number;
+ readonly deviceYDPI: number;
+ readonly fontSmoothingEnabled: boolean;
+ readonly height: number;
+ readonly logicalXDPI: number;
+ readonly logicalYDPI: number;
+ readonly msOrientation: string;
+ onmsorientationchange: (this: Screen, ev: Event) => any;
+ readonly pixelDepth: number;
+ readonly systemXDPI: number;
+ readonly systemYDPI: number;
+ readonly width: number;
+ msLockOrientation(orientations: string | string[]): boolean;
+ msUnlockOrientation(): void;
+ addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+}
+
+interface ScriptNotifyEvent extends Event {
+ readonly callingUri: string;
+ readonly value: string;
+}
+
+declare var ScriptNotifyEvent: {
+ prototype: ScriptNotifyEvent;
+ new(): ScriptNotifyEvent;
+}
+
+interface ScriptProcessorNodeEventMap {
+ "audioprocess": AudioProcessingEvent;
+}
+
+interface ScriptProcessorNode extends AudioNode {
+ readonly bufferSize: number;
+ onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
+ addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+}
+
+interface Selection {
+ readonly anchorNode: Node;
+ readonly anchorOffset: number;
+ readonly baseNode: Node;
+ readonly baseOffset: number;
+ readonly extentNode: Node;
+ readonly extentOffset: number;
+ readonly focusNode: Node;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
+ addRange(range: Range): void;
+ collapse(parentNode: Node, offset: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, partlyContained: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(newNode: Node, offset: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(parentNode: Node): void;
+ setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
+ setPosition(parentNode: Node, offset: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+}
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: (this: ServiceWorker, ev: Event) => any;
+ readonly scriptURL: USVString;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer?: any[]): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+}
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
+ onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: USVString): Promise<any>;
+ getRegistrations(): any;
+ register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+}
+
+interface ServiceWorkerMessageEvent extends Event {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: MessagePort[] | null;
+ readonly source: ServiceWorker | MessagePort | null;
+}
+
+declare var ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any;
+ readonly pushManager: PushManager;
+ readonly scope: USVString;
+ readonly sync: SyncManager;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): any;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+}
+
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ readonly audioTracks: AudioTrackList;
+ readonly buffered: TimeRanges;
+ mode: AppendMode;
+ timestampOffset: number;
+ readonly updating: boolean;
+ readonly videoTracks: VideoTrackList;
+ abort(): void;
+ appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
+ appendStream(stream: MSStream, maxSize?: number): void;
+ remove(start: number, end: number): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+}
+
+interface SourceBufferList extends EventTarget {
+ readonly length: number;
+ item(index: number): SourceBuffer;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+}
+
+interface SpeechSynthesisEventMap {
+ "voiceschanged": Event;
+}
+
+interface SpeechSynthesis extends EventTarget {
+ onvoiceschanged: (this: SpeechSynthesis, ev: Event) => any;
+ readonly paused: boolean;
+ readonly pending: boolean;
+ readonly speaking: boolean;
+ cancel(): void;
+ getVoices(): SpeechSynthesisVoice[];
+ pause(): void;
+ resume(): void;
+ speak(utterance: SpeechSynthesisUtterance): void;
+ addEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesis: {
+ prototype: SpeechSynthesis;
+ new(): SpeechSynthesis;
+}
+
+interface SpeechSynthesisEvent extends Event {
+ readonly charIndex: number;
+ readonly elapsedTime: number;
+ readonly name: string;
+ readonly utterance: SpeechSynthesisUtterance | null;
+}
+
+declare var SpeechSynthesisEvent: {
+ prototype: SpeechSynthesisEvent;
+ new(type: string, eventInitDict?: SpeechSynthesisEventInit): SpeechSynthesisEvent;
+}
+
+interface SpeechSynthesisUtteranceEventMap {
+ "boundary": Event;
+ "end": Event;
+ "error": Event;
+ "mark": Event;
+ "pause": Event;
+ "resume": Event;
+ "start": Event;
+}
+
+interface SpeechSynthesisUtterance extends EventTarget {
+ lang: string;
+ onboundary: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onend: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onerror: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onmark: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onpause: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onresume: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onstart: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ pitch: number;
+ rate: number;
+ text: string;
+ voice: SpeechSynthesisVoice;
+ volume: number;
+ addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesisUtterance: {
+ prototype: SpeechSynthesisUtterance;
+ new(text?: string): SpeechSynthesisUtterance;
+}
+
+interface SpeechSynthesisVoice {
+ readonly default: boolean;
+ readonly lang: string;
+ readonly localService: boolean;
+ readonly name: string;
+ readonly voiceURI: string;
+}
+
+declare var SpeechSynthesisVoice: {
+ prototype: SpeechSynthesisVoice;
+ new(): SpeechSynthesisVoice;
+}
+
+interface StereoPannerNode extends AudioNode {
+ readonly pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(): StereoPannerNode;
+}
+
+interface Storage {
+ readonly length: number;
+ clear(): void;
+ getItem(key: string): string | null;
+ key(index: number): string | null;
+ removeItem(key: string): void;
+ setItem(key: string, data: string): void;
+ [key: string]: any;
+ [index: number]: string;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+}
+
+interface StorageEvent extends Event {
+ readonly url: string;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
+}
+
+interface StyleMedia {
+ readonly type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+declare var StyleMedia: {
+ prototype: StyleMedia;
+ new(): StyleMedia;
+}
+
+interface StyleSheet {
+ disabled: boolean;
+ readonly href: string;
+ readonly media: MediaList;
+ readonly ownerNode: Node;
+ readonly parentStyleSheet: StyleSheet;
+ readonly title: string;
+ readonly type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+}
+
+interface StyleSheetList {
+ readonly length: number;
+ item(index?: number): StyleSheet;
+ [index: number]: StyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+}
+
+interface StyleSheetPageList {
+ readonly length: number;
+ item(index: number): CSSPageRule;
+ [index: number]: CSSPageRule;
+}
+
+declare var StyleSheetPageList: {
+ prototype: StyleSheetPageList;
+ new(): StyleSheetPageList;
+}
+
+interface SubtleCrypto {
+ decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
+ wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+}
+
+interface SyncManager {
+ getTags(): any;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+}
+
+interface Text extends CharacterData {
+ readonly wholeText: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(data?: string): Text;
+}
+
+interface TextEvent extends UIEvent {
+ readonly data: string;
+ readonly inputMethod: number;
+ readonly locale: string;
+ initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+declare var TextEvent: {
+ prototype: TextEvent;
+ new(): TextEvent;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+interface TextMetrics {
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+}
+
+interface TextTrackEventMap {
+ "cuechange": Event;
+ "error": Event;
+ "load": Event;
+}
+
+interface TextTrack extends EventTarget {
+ readonly activeCues: TextTrackCueList;
+ readonly cues: TextTrackCueList;
+ readonly inBandMetadataTrackDispatchType: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly language: string;
+ mode: any;
+ oncuechange: (this: TextTrack, ev: Event) => any;
+ onerror: (this: TextTrack, ev: Event) => any;
+ onload: (this: TextTrack, ev: Event) => any;
+ readonly readyState: number;
+ addCue(cue: TextTrackCue): void;
+ removeCue(cue: TextTrackCue): void;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+ addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+}
+
+interface TextTrackCueEventMap {
+ "enter": Event;
+ "exit": Event;
+}
+
+interface TextTrackCue extends EventTarget {
+ endTime: number;
+ id: string;
+ onenter: (this: TextTrackCue, ev: Event) => any;
+ onexit: (this: TextTrackCue, ev: Event) => any;
+ pauseOnExit: boolean;
+ startTime: number;
+ text: string;
+ readonly track: TextTrack;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(startTime: number, endTime: number, text: string): TextTrackCue;
+}
+
+interface TextTrackCueList {
+ readonly length: number;
+ getCueById(id: string): TextTrackCue;
+ item(index: number): TextTrackCue;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+}
+
+interface TextTrackListEventMap {
+ "addtrack": TrackEvent;
+}
+
+interface TextTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ item(index: number): TextTrack;
+ addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+}
+
+interface TimeRanges {
+ readonly length: number;
+ end(index: number): number;
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+}
+
+interface Touch {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(): Touch;
+}
+
+interface TouchEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly keyCode: number;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
+ readonly which: number;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
+}
+
+interface TouchList {
+ readonly length: number;
+ item(index: number): Touch | null;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+}
+
+interface TrackEvent extends Event {
+ readonly track: VideoTrack | AudioTrack | TextTrack | null;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
+}
+
+interface TransitionEvent extends Event {
+ readonly elapsedTime: number;
+ readonly propertyName: string;
+ initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
+}
+
+interface TreeWalker {
+ currentNode: Node;
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ firstChild(): Node;
+ lastChild(): Node;
+ nextNode(): Node;
+ nextSibling(): Node;
+ parentNode(): Node;
+ previousNode(): Node;
+ previousSibling(): Node;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+}
+
+interface UIEvent extends Event {
+ readonly detail: number;
+ readonly view: Window;
+ initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+}
+
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+ readonly searchParams: URLSearchParams;
+ toString(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string): URL;
+ createObjectURL(object: any, options?: ObjectURLOptions): string;
+ revokeObjectURL(url: string): void;
+}
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
+}
+
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+}
+
+interface ValidityState {
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+}
+
+interface VideoPlaybackQuality {
+ readonly corruptedVideoFrames: number;
+ readonly creationTime: number;
+ readonly droppedVideoFrames: number;
+ readonly totalFrameDelay: number;
+ readonly totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+}
+
+interface VideoTrack {
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ selected: boolean;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var VideoTrack: {
+ prototype: VideoTrack;
+ new(): VideoTrack;
+}
+
+interface VideoTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface VideoTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ onchange: (this: VideoTrackList, ev: Event) => any;
+ onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ readonly selectedIndex: number;
+ getTrackById(id: string): VideoTrack | null;
+ item(index: number): VideoTrack;
+ addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: VideoTrack;
+}
+
+declare var VideoTrackList: {
+ prototype: VideoTrackList;
+ new(): VideoTrackList;
+}
+
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+declare var WEBGL_compressed_texture_s3tc: {
+ prototype: WEBGL_compressed_texture_s3tc;
+ new(): WEBGL_compressed_texture_s3tc;
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+declare var WEBGL_debug_renderer_info: {
+ prototype: WEBGL_debug_renderer_info;
+ new(): WEBGL_debug_renderer_info;
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+declare var WEBGL_depth_texture: {
+ prototype: WEBGL_depth_texture;
+ new(): WEBGL_depth_texture;
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array | null;
+ oversample: OverSampleType;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(): WaveShaperNode;
+}
+
+interface WebAuthentication {
+ getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
+ makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
+}
+
+declare var WebAuthentication: {
+ prototype: WebAuthentication;
+ new(): WebAuthentication;
+}
+
+interface WebAuthnAssertion {
+ readonly authenticatorData: ArrayBuffer;
+ readonly clientData: ArrayBuffer;
+ readonly credential: ScopedCredential;
+ readonly signature: ArrayBuffer;
+}
+
+declare var WebAuthnAssertion: {
+ prototype: WebAuthnAssertion;
+ new(): WebAuthnAssertion;
+}
+
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: number;
+ readonly type: number;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+}
+
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+}
+
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
+}
+
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+}
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+}
+
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+}
+
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+}
+
+interface WebGLRenderingContext {
+ readonly canvas: HTMLCanvasElement;
+ readonly drawingBufferHeight: number;
+ readonly drawingBufferWidth: number;
+ activeTexture(texture: number): void;
+ attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
+ bindBuffer(target: number, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: number, texture: WebGLTexture | null): void;
+ blendColor(red: number, green: number, blue: number, alpha: number): void;
+ blendEquation(mode: number): void;
+ blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
+ blendFunc(sfactor: number, dfactor: number): void;
+ blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
+ bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
+ bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
+ checkFramebufferStatus(target: number): number;
+ clear(mask: number): void;
+ clearColor(red: number, green: number, blue: number, alpha: number): void;
+ clearDepth(depth: number): void;
+ clearStencil(s: number): void;
+ colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
+ compileShader(shader: WebGLShader | null): void;
+ compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
+ copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
+ copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: number): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: number): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: number): void;
+ depthMask(flag: boolean): void;
+ depthRange(zNear: number, zFar: number): void;
+ detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ disable(cap: number): void;
+ disableVertexAttribArray(index: number): void;
+ drawArrays(mode: number, first: number, count: number): void;
+ drawElements(mode: number, count: number, type: number, offset: number): void;
+ enable(cap: number): void;
+ enableVertexAttribArray(index: number): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
+ frontFace(mode: number): void;
+ generateMipmap(target: number): void;
+ getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram | null, name: string): number;
+ getBufferParameter(target: number, pname: number): any;
+ getContextAttributes(): WebGLContextAttributes;
+ getError(): number;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
+ getParameter(pname: number): any;
+ getProgramInfoLog(program: WebGLProgram | null): string | null;
+ getProgramParameter(program: WebGLProgram | null, pname: number): any;
+ getRenderbufferParameter(target: number, pname: number): any;
+ getShaderInfoLog(shader: WebGLShader | null): string | null;
+ getShaderParameter(shader: WebGLShader | null, pname: number): any;
+ getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader | null): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: number, pname: number): any;
+ getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
+ getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: number, pname: number): any;
+ getVertexAttribOffset(index: number, pname: number): number;
+ hint(target: number, mode: number): void;
+ isBuffer(buffer: WebGLBuffer | null): boolean;
+ isContextLost(): boolean;
+ isEnabled(cap: number): boolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
+ isProgram(program: WebGLProgram | null): boolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
+ isShader(shader: WebGLShader | null): boolean;
+ isTexture(texture: WebGLTexture | null): boolean;
+ lineWidth(width: number): void;
+ linkProgram(program: WebGLProgram | null): void;
+ pixelStorei(pname: number, param: number | boolean): void;
+ polygonOffset(factor: number, units: number): void;
+ readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
+ sampleCoverage(value: number, invert: boolean): void;
+ scissor(x: number, y: number, width: number, height: number): void;
+ shaderSource(shader: WebGLShader | null, source: string): void;
+ stencilFunc(func: number, ref: number, mask: number): void;
+ stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
+ stencilMask(mask: number): void;
+ stencilMaskSeparate(face: number, mask: number): void;
+ stencilOp(fail: number, zfail: number, zpass: number): void;
+ stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
+ texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ texParameterf(target: number, pname: number, param: number): void;
+ texParameteri(target: number, pname: number, param: number): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ uniform1f(location: WebGLUniformLocation | null, x: number): void;
+ uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform1i(location: WebGLUniformLocation | null, x: number): void;
+ uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram | null): void;
+ vertexAttrib1f(indx: number, x: number): void;
+ vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib2f(indx: number, x: number, y: number): void;
+ vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
+ vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
+ vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
+ viewport(x: number, y: number, width: number, height: number): void;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+}
+
+interface WebGLShaderPrecisionFormat {
+ readonly precision: number;
+ readonly rangeMax: number;
+ readonly rangeMin: number;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+}
+
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+}
+
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+}
+
+interface WebKitCSSMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ inverse(): WebKitCSSMatrix;
+ multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
+ rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
+ rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
+ scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
+ setMatrixValue(value: string): void;
+ skewX(angle: number): WebKitCSSMatrix;
+ skewY(angle: number): WebKitCSSMatrix;
+ toString(): string;
+ translate(x: number, y: number, z?: number): WebKitCSSMatrix;
+}
+
+declare var WebKitCSSMatrix: {
+ prototype: WebKitCSSMatrix;
+ new(text?: string): WebKitCSSMatrix;
+}
+
+interface WebKitDirectoryEntry extends WebKitEntry {
+ createReader(): WebKitDirectoryReader;
+}
+
+declare var WebKitDirectoryEntry: {
+ prototype: WebKitDirectoryEntry;
+ new(): WebKitDirectoryEntry;
+}
+
+interface WebKitDirectoryReader {
+ readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitDirectoryReader: {
+ prototype: WebKitDirectoryReader;
+ new(): WebKitDirectoryReader;
+}
+
+interface WebKitEntry {
+ readonly filesystem: WebKitFileSystem;
+ readonly fullPath: string;
+ readonly isDirectory: boolean;
+ readonly isFile: boolean;
+ readonly name: string;
+}
+
+declare var WebKitEntry: {
+ prototype: WebKitEntry;
+ new(): WebKitEntry;
+}
+
+interface WebKitFileEntry extends WebKitEntry {
+ file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitFileEntry: {
+ prototype: WebKitFileEntry;
+ new(): WebKitFileEntry;
+}
+
+interface WebKitFileSystem {
+ readonly name: string;
+ readonly root: WebKitDirectoryEntry;
+}
+
+declare var WebKitFileSystem: {
+ prototype: WebKitFileSystem;
+ new(): WebKitFileSystem;
+}
+
+interface WebKitPoint {
+ x: number;
+ y: number;
+}
+
+declare var WebKitPoint: {
+ prototype: WebKitPoint;
+ new(x?: number, y?: number): WebKitPoint;
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: string;
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ onclose: (this: WebSocket, ev: CloseEvent) => any;
+ onerror: (this: WebSocket, ev: Event) => any;
+ onmessage: (this: WebSocket, ev: MessageEvent) => any;
+ onopen: (this: WebSocket, ev: Event) => any;
+ readonly protocol: string;
+ readonly readyState: number;
+ readonly url: string;
+ close(code?: number, reason?: string): void;
+ send(data: any): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+}
+
+interface WheelEvent extends MouseEvent {
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly wheelDelta: number;
+ readonly wheelDeltaX: number;
+ readonly wheelDeltaY: number;
+ getCurrentPoint(element: Element): void;
+ initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+interface WindowEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "compassneedscalibration": Event;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "devicelight": DeviceLightEvent;
+ "devicemotion": DeviceMotionEvent;
+ "deviceorientation": DeviceOrientationEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "message": MessageEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "popstate": PopStateEvent;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": ProgressEvent;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "stalled": Event;
+ "storage": StorageEvent;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "unload": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch {
+ readonly applicationCache: ApplicationCache;
+ readonly caches: CacheStorage;
+ readonly clientInformation: Navigator;
+ readonly closed: boolean;
+ readonly crypto: Crypto;
+ defaultStatus: string;
+ readonly devicePixelRatio: number;
+ readonly doNotTrack: string;
+ readonly document: Document;
+ event: Event | undefined;
+ readonly external: External;
+ readonly frameElement: Element;
+ readonly frames: Window;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly isSecureContext: boolean;
+ readonly length: number;
+ readonly location: Location;
+ readonly locationbar: BarProp;
+ readonly menubar: BarProp;
+ readonly msContentScript: ExtensionScriptApis;
+ readonly msCredentials: MSCredentials;
+ name: string;
+ readonly navigator: Navigator;
+ offscreenBuffering: string | boolean;
+ onabort: (this: Window, ev: UIEvent) => any;
+ onafterprint: (this: Window, ev: Event) => any;
+ onbeforeprint: (this: Window, ev: Event) => any;
+ onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+ onblur: (this: Window, ev: FocusEvent) => any;
+ oncanplay: (this: Window, ev: Event) => any;
+ oncanplaythrough: (this: Window, ev: Event) => any;
+ onchange: (this: Window, ev: Event) => any;
+ onclick: (this: Window, ev: MouseEvent) => any;
+ oncompassneedscalibration: (this: Window, ev: Event) => any;
+ oncontextmenu: (this: Window, ev: PointerEvent) => any;
+ ondblclick: (this: Window, ev: MouseEvent) => any;
+ ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+ ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+ ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+ ondrag: (this: Window, ev: DragEvent) => any;
+ ondragend: (this: Window, ev: DragEvent) => any;
+ ondragenter: (this: Window, ev: DragEvent) => any;
+ ondragleave: (this: Window, ev: DragEvent) => any;
+ ondragover: (this: Window, ev: DragEvent) => any;
+ ondragstart: (this: Window, ev: DragEvent) => any;
+ ondrop: (this: Window, ev: DragEvent) => any;
+ ondurationchange: (this: Window, ev: Event) => any;
+ onemptied: (this: Window, ev: Event) => any;
+ onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+ onerror: ErrorEventHandler;
+ onfocus: (this: Window, ev: FocusEvent) => any;
+ onhashchange: (this: Window, ev: HashChangeEvent) => any;
+ oninput: (this: Window, ev: Event) => any;
+ oninvalid: (this: Window, ev: Event) => any;
+ onkeydown: (this: Window, ev: KeyboardEvent) => any;
+ onkeypress: (this: Window, ev: KeyboardEvent) => any;
+ onkeyup: (this: Window, ev: KeyboardEvent) => any;
+ onload: (this: Window, ev: Event) => any;
+ onloadeddata: (this: Window, ev: Event) => any;
+ onloadedmetadata: (this: Window, ev: Event) => any;
+ onloadstart: (this: Window, ev: Event) => any;
+ onmessage: (this: Window, ev: MessageEvent) => any;
+ onmousedown: (this: Window, ev: MouseEvent) => any;
+ onmouseenter: (this: Window, ev: MouseEvent) => any;
+ onmouseleave: (this: Window, ev: MouseEvent) => any;
+ onmousemove: (this: Window, ev: MouseEvent) => any;
+ onmouseout: (this: Window, ev: MouseEvent) => any;
+ onmouseover: (this: Window, ev: MouseEvent) => any;
+ onmouseup: (this: Window, ev: MouseEvent) => any;
+ onmousewheel: (this: Window, ev: WheelEvent) => any;
+ onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+ onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+ onoffline: (this: Window, ev: Event) => any;
+ ononline: (this: Window, ev: Event) => any;
+ onorientationchange: (this: Window, ev: Event) => any;
+ onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+ onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+ onpause: (this: Window, ev: Event) => any;
+ onplay: (this: Window, ev: Event) => any;
+ onplaying: (this: Window, ev: Event) => any;
+ onpopstate: (this: Window, ev: PopStateEvent) => any;
+ onprogress: (this: Window, ev: ProgressEvent) => any;
+ onratechange: (this: Window, ev: Event) => any;
+ onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+ onreset: (this: Window, ev: Event) => any;
+ onresize: (this: Window, ev: UIEvent) => any;
+ onscroll: (this: Window, ev: UIEvent) => any;
+ onseeked: (this: Window, ev: Event) => any;
+ onseeking: (this: Window, ev: Event) => any;
+ onselect: (this: Window, ev: UIEvent) => any;
+ onstalled: (this: Window, ev: Event) => any;
+ onstorage: (this: Window, ev: StorageEvent) => any;
+ onsubmit: (this: Window, ev: Event) => any;
+ onsuspend: (this: Window, ev: Event) => any;
+ ontimeupdate: (this: Window, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onunload: (this: Window, ev: Event) => any;
+ onvolumechange: (this: Window, ev: Event) => any;
+ onwaiting: (this: Window, ev: Event) => any;
+ opener: any;
+ orientation: string | number;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ readonly pageXOffset: number;
+ readonly pageYOffset: number;
+ readonly parent: Window;
+ readonly performance: Performance;
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ readonly scrollbars: BarProp;
+ readonly self: Window;
+ readonly speechSynthesis: SpeechSynthesis;
+ status: string;
+ readonly statusbar: BarProp;
+ readonly styleMedia: StyleMedia;
+ readonly toolbar: BarProp;
+ readonly top: Window;
+ readonly window: Window;
+ URL: typeof URL;
+ URLSearchParams: typeof URLSearchParams;
+ Blob: typeof Blob;
+ customElements: CustomElementRegistry;
+ alert(message?: any): void;
+ blur(): void;
+ cancelAnimationFrame(handle: number): void;
+ captureEvents(): void;
+ close(): void;
+ confirm(message?: string): boolean;
+ departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+ getSelection(): Selection;
+ matchMedia(mediaQuery: string): MediaQueryList;
+ moveBy(x?: number, y?: number): void;
+ moveTo(x?: number, y?: number): void;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+ postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string | null;
+ releaseEvents(): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+ resizeBy(x?: number, y?: number): void;
+ resizeTo(x?: number, y?: number): void;
+ scroll(x?: number, y?: number): void;
+ scrollBy(x?: number, y?: number): void;
+ scrollTo(x?: number, y?: number): void;
+ stop(): void;
+ webkitCancelAnimationFrame(handle: number): void;
+ webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ scroll(options?: ScrollToOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollBy(options?: ScrollToOptions): void;
+ addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+}
+
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: (this: Worker, ev: MessageEvent) => any;
+ postMessage(message: any, transfer?: any[]): void;
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string): Worker;
+}
+
+interface XMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+}
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
+ onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
+ readonly readyState: number;
+ readonly response: any;
+ readonly responseText: string;
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly responseXML: Document | null;
+ readonly status: number;
+ readonly statusText: string;
+ timeout: number;
+ readonly upload: XMLHttpRequestUpload;
+ withCredentials: boolean;
+ msCaching?: string;
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(header: string): string | null;
+ msCachingEnabled(): boolean;
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
+ overrideMimeType(mime: string): void;
+ send(data?: Document): void;
+ send(data?: string): void;
+ send(data?: any): void;
+ setRequestHeader(header: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+}
+
+interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+}
+
+interface XMLSerializer {
+ serializeToString(target: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+}
+
+interface XPathEvaluator {
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver?: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+}
+
+interface XPathExpression {
+ evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+}
+
+interface XPathNSResolver {
+ lookupNamespaceURI(prefix: string): string;
+}
+
+declare var XPathNSResolver: {
+ prototype: XPathNSResolver;
+ new(): XPathNSResolver;
+}
+
+interface XPathResult {
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
+ iterateNext(): Node;
+ snapshotItem(index: number): Node;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, document: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+}
+
+interface webkitRTCPeerConnection extends RTCPeerConnection {
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var webkitRTCPeerConnection: {
+ prototype: webkitRTCPeerConnection;
+ new(configuration: RTCConfiguration): webkitRTCPeerConnection;
+}
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface Body {
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+ formData(): Promise<FormData>;
+}
+
+interface CanvasPathMethods {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface ChildNode {
+ remove(): void;
+}
+
+interface DOML2DeprecatedColorProperty {
+ color: string;
+}
+
+interface DOML2DeprecatedSizeProperty {
+ size: number;
+}
+
+interface DocumentEvent {
+ createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface:"CloseEvent"): CloseEvent;
+ createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface:"CustomEvent"): CustomEvent;
+ createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
+ createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface:"DragEvent"): DragEvent;
+ createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface:"Event"): Event;
+ createEvent(eventInterface:"Events"): Event;
+ createEvent(eventInterface:"FocusEvent"): FocusEvent;
+ createEvent(eventInterface:"FocusNavigationEvent"): FocusNavigationEvent;
+ createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
+ createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
+ createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
+ createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
+ createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface:"MediaStreamEvent"): MediaStreamEvent;
+ createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface:"MessageEvent"): MessageEvent;
+ createEvent(eventInterface:"MouseEvent"): MouseEvent;
+ createEvent(eventInterface:"MouseEvents"): MouseEvent;
+ createEvent(eventInterface:"MutationEvent"): MutationEvent;
+ createEvent(eventInterface:"MutationEvents"): MutationEvent;
+ createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
+ createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
+ createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
+ createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
+ createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface:"PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface:"PointerEvent"): PointerEvent;
+ createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
+ createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
+ createEvent(eventInterface:"ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
+ createEvent(eventInterface:"SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface:"StorageEvent"): StorageEvent;
+ createEvent(eventInterface:"TextEvent"): TextEvent;
+ createEvent(eventInterface:"TouchEvent"): TouchEvent;
+ createEvent(eventInterface:"TrackEvent"): TrackEvent;
+ createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface:"UIEvent"): UIEvent;
+ createEvent(eventInterface:"UIEvents"): UIEvent;
+ createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
+ createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface:"WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+}
+
+interface ElementTraversal {
+ readonly childElementCount: number;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly nextElementSibling: Element | null;
+ readonly previousElementSibling: Element | null;
+}
+
+interface GetSVGDocument {
+ getSVGDocument(): Document;
+}
+
+interface GlobalEventHandlersEventMap {
+ "pointercancel": PointerEvent;
+ "pointerdown": PointerEvent;
+ "pointerenter": PointerEvent;
+ "pointerleave": PointerEvent;
+ "pointermove": PointerEvent;
+ "pointerout": PointerEvent;
+ "pointerover": PointerEvent;
+ "pointerup": PointerEvent;
+ "wheel": WheelEvent;
+}
+
+interface GlobalEventHandlers {
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
+ addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface GlobalFetch {
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+}
+
+interface HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
+ */
+ ch: string;
+ /**
+ * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
+ */
+ chOff: string;
+ /**
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
+ vAlign: string;
+}
+
+interface IDBEnvironment {
+ readonly indexedDB: IDBFactory;
+}
+
+interface LinkStyle {
+ readonly sheet: StyleSheet;
+}
+
+interface MSBaseReaderEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+}
+
+interface MSBaseReader {
+ onabort: (this: MSBaseReader, ev: Event) => any;
+ onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
+ onload: (this: MSBaseReader, ev: Event) => any;
+ onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
+ onloadstart: (this: MSBaseReader, ev: Event) => any;
+ onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
+ abort(): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface MSFileSaver {
+ msSaveBlob(blob: any, defaultName?: string): boolean;
+ msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
+}
+
+interface MSNavigatorDoNotTrack {
+ confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
+ confirmWebWideTrackingException(args: ExceptionInformation): boolean;
+ removeSiteSpecificTrackingException(args: ExceptionInformation): void;
+ removeWebWideTrackingException(args: ExceptionInformation): void;
+ storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
+ storeWebWideTrackingException(args: StoreExceptionsInformation): void;
+}
+
+interface NavigatorBeacon {
+ sendBeacon(url: USVString, data?: BodyInit): boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorContentUtils {
+}
+
+interface NavigatorGeolocation {
+ readonly geolocation: Geolocation;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorStorageUtils {
+}
+
+interface NavigatorUserMedia {
+ readonly mediaDevices: MediaDevices;
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
+}
+
+interface NodeSelector {
+ querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
+ querySelectorAll(selectors: string): NodeListOf<Element>;
+}
+
+interface RandomSource {
+ getRandomValues(array: ArrayBufferView): ArrayBufferView;
+}
+
+interface SVGAnimatedPoints {
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
+}
+
+interface SVGFilterPrimitiveStandardAttributes {
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
+}
+
+interface SVGTests {
+ readonly requiredExtensions: SVGStringList;
+ readonly requiredFeatures: SVGStringList;
+ readonly systemLanguage: SVGStringList;
+ hasExtension(extension: string): boolean;
+}
+
+interface SVGURIReference {
+ readonly href: SVGAnimatedString;
+}
+
+interface WindowBase64 {
+ atob(encodedString: string): string;
+ btoa(rawString: string): string;
+}
+
+interface WindowConsole {
+ readonly console: Console;
+}
+
+interface WindowLocalStorage {
+ readonly localStorage: Storage;
+}
+
+interface WindowSessionStorage {
+ readonly sessionStorage: Storage;
+}
+
+interface WindowTimers extends Object, WindowTimersExtension {
+ clearInterval(handle: number): void;
+ clearTimeout(handle: number): void;
+ setInterval(handler: (...args: any[]) => void, timeout: number): number;
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+}
+
+interface WindowTimersExtension {
+ clearImmediate(handle: number): void;
+ setImmediate(handler: (...args: any[]) => void): number;
+ setImmediate(handler: any, ...args: any[]): number;
+}
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+ "timeout": ProgressEvent;
+}
+
+interface XMLHttpRequestEventTarget {
+ onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
+ onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface ErrorEventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ conlno?: number;
+ error?: any;
+}
+
+interface StorageEventInit extends EventInit {
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ url: string;
+ storageArea?: Storage;
+}
+
+interface Canvas2DContextAttributes {
+ alpha?: boolean;
+ willReadFrequently?: boolean;
+ storage?: boolean;
+ [attribute: string]: boolean | string | undefined;
+}
+
+interface ImageBitmapOptions {
+ imageOrientation?: "none" | "flipY";
+ premultiplyAlpha?: "none" | "premultiply" | "default";
+ colorSpaceConversion?: "none" | "default";
+ resizeWidth?: number;
+ resizeHeight?: number;
+ resizeQuality?: "pixelated" | "low" | "medium" | "high";
+}
+
+interface ImageBitmap {
+ readonly width: number;
+ readonly height: number;
+ close(): void;
+}
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ /**
+ * Constructor returning a URLSearchParams object.
+ */
+ new (init?: string | URLSearchParams): URLSearchParams;
+}
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ length: number;
+ item(index: number): TNode;
+ [index: number]: TNode;
+}
+
+interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
+ item(index: number): T;
+ namedItem(name: string): T;
+ [index: number]: T;
+}
+
+interface BlobPropertyBag {
+ type?: string;
+ endings?: string;
+}
+
+interface FilePropertyBag {
+ type?: string;
+ lastModified?: number;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
+}
+
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ClipboardEventInit extends EventInit {
+ data?: string;
+ dataType?: string;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaHashedImportParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaPssParams {
+ saltLength: number;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: string;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ typedCurve: string;
+}
+
+interface EcKeyImportParams {
+ namedCurve: string;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ iv: BufferSource;
+ additionalData?: BufferSource;
+ tagLength?: number;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: AlgorithmIdentifier;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhImportKeyParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface ConcatParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ algorithmId: Uint8Array;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ publicInfo?: Uint8Array;
+ privateInfo?: Uint8Array;
+}
+
+interface HkdfCtrParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ label: BufferSource;
+ context: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ salt: BufferSource;
+ iterations: number;
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaOtherPrimesInfo {
+ r: string;
+ d: string;
+ t: string;
+}
+
+interface JsonWebKey {
+ kty: string;
+ use?: string;
+ key_ops?: string[];
+ alg?: string;
+ kid?: string;
+ x5u?: string;
+ x5c?: string;
+ x5t?: string;
+ ext?: boolean;
+ crv?: string;
+ x?: string;
+ y?: string;
+ d?: string;
+ n?: string;
+ e?: string;
+ p?: string;
+ q?: string;
+ dp?: string;
+ dq?: string;
+ qi?: string;
+ oth?: RsaOtherPrimesInfo[];
+ k?: string;
+}
+
+interface ParentNode {
+ readonly children: HTMLCollection;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly childElementCount: number;
+}
+
+interface DocumentOrShadowRoot {
+ readonly activeElement: Element | null;
+ readonly stylesheets: StyleSheetList;
+ getSelection(): Selection | null;
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+}
+
+interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
+ readonly host: Element;
+ innerHTML: string;
+}
+
+interface ShadowRootInit {
+ mode: 'open'|'closed';
+ delegatesFocus?: boolean;
+}
+
+interface HTMLSlotElement extends HTMLElement {
+ name: string;
+ assignedNodes(options?: AssignedNodesOptions): Node[];
+}
+
+interface AssignedNodesOptions {
+ flatten?: boolean;
+}
+
+interface ElementDefinitionOptions {
+ extends: string;
+}
+
+interface CustomElementRegistry {
+ define(name: string, constructor: Function, options?: ElementDefinitionOptions): void;
+ get(name: string): any;
+ whenDefined(name: string): PromiseLike<void>;
+}
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: PromiseLike<any>;
+ readonly reason: any;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: PromiseLike<any>;
+ reason?: any;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ passive?: boolean;
+ once?: boolean;
+}
+
+interface TouchEventInit extends EventModifierInit {
+ touches?: Touch[];
+ targetTouches?: Touch[];
+ changedTouches?: Touch[];
+}
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
+interface MediaQueryListListener {
+ (mql: MediaQueryList): void;
+}
+interface MSLaunchUriCallback {
+ (): void;
+}
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface MSUnsafeFunctionCallback {
+ (): any;
+}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface VoidFunction {
+ (): void;
+}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): void;
+}
+interface RTCPeerConnectionErrorCallback {
+ (error: DOMError): void;
+}
+interface RTCStatsCallback {
+ (report: RTCStatsReport): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
+}
+interface NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
+}
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
+}
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
+}
+interface HTMLElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "audio": HTMLAudioElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "del": HTMLModElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "embed": HTMLEmbedElement;
+ "fieldset": HTMLFieldSetElement;
+ "font": HTMLFontElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "iframe": HTMLIFrameElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "marquee": HTMLMarqueeElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "meter": HTMLMeterElement;
+ "nextid": HTMLUnknownElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "picture": HTMLPictureElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "script": HTMLScriptElement;
+ "select": HTMLSelectElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "style": HTMLStyleElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "ul": HTMLUListElement;
+ "video": HTMLVideoElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "abbr": HTMLElement;
+ "acronym": HTMLElement;
+ "address": HTMLElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "article": HTMLElement;
+ "aside": HTMLElement;
+ "audio": HTMLAudioElement;
+ "b": HTMLElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "bdo": HTMLElement;
+ "big": HTMLElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "center": HTMLElement;
+ "circle": SVGCircleElement;
+ "cite": HTMLElement;
+ "clippath": SVGClipPathElement;
+ "code": HTMLElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "dd": HTMLElement;
+ "defs": SVGDefsElement;
+ "del": HTMLModElement;
+ "desc": SVGDescElement;
+ "dfn": HTMLElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "dt": HTMLElement;
+ "ellipse": SVGEllipseElement;
+ "em": HTMLElement;
+ "embed": HTMLEmbedElement;
+ "feblend": SVGFEBlendElement;
+ "fecolormatrix": SVGFEColorMatrixElement;
+ "fecomponenttransfer": SVGFEComponentTransferElement;
+ "fecomposite": SVGFECompositeElement;
+ "feconvolvematrix": SVGFEConvolveMatrixElement;
+ "fediffuselighting": SVGFEDiffuseLightingElement;
+ "fedisplacementmap": SVGFEDisplacementMapElement;
+ "fedistantlight": SVGFEDistantLightElement;
+ "feflood": SVGFEFloodElement;
+ "fefunca": SVGFEFuncAElement;
+ "fefuncb": SVGFEFuncBElement;
+ "fefuncg": SVGFEFuncGElement;
+ "fefuncr": SVGFEFuncRElement;
+ "fegaussianblur": SVGFEGaussianBlurElement;
+ "feimage": SVGFEImageElement;
+ "femerge": SVGFEMergeElement;
+ "femergenode": SVGFEMergeNodeElement;
+ "femorphology": SVGFEMorphologyElement;
+ "feoffset": SVGFEOffsetElement;
+ "fepointlight": SVGFEPointLightElement;
+ "fespecularlighting": SVGFESpecularLightingElement;
+ "fespotlight": SVGFESpotLightElement;
+ "fetile": SVGFETileElement;
+ "feturbulence": SVGFETurbulenceElement;
+ "fieldset": HTMLFieldSetElement;
+ "figcaption": HTMLElement;
+ "figure": HTMLElement;
+ "filter": SVGFilterElement;
+ "font": HTMLFontElement;
+ "footer": HTMLElement;
+ "foreignobject": SVGForeignObjectElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "g": SVGGElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "header": HTMLElement;
+ "hgroup": HTMLElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "i": HTMLElement;
+ "iframe": HTMLIFrameElement;
+ "image": SVGImageElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "kbd": HTMLElement;
+ "keygen": HTMLElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "line": SVGLineElement;
+ "lineargradient": SVGLinearGradientElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "mark": HTMLElement;
+ "marker": SVGMarkerElement;
+ "marquee": HTMLMarqueeElement;
+ "mask": SVGMaskElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "metadata": SVGMetadataElement;
+ "meter": HTMLMeterElement;
+ "nav": HTMLElement;
+ "nextid": HTMLUnknownElement;
+ "nobr": HTMLElement;
+ "noframes": HTMLElement;
+ "noscript": HTMLElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "path": SVGPathElement;
+ "pattern": SVGPatternElement;
+ "picture": HTMLPictureElement;
+ "plaintext": HTMLElement;
+ "polygon": SVGPolygonElement;
+ "polyline": SVGPolylineElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "radialgradient": SVGRadialGradientElement;
+ "rect": SVGRectElement;
+ "rt": HTMLElement;
+ "ruby": HTMLElement;
+ "s": HTMLElement;
+ "samp": HTMLElement;
+ "script": HTMLScriptElement;
+ "section": HTMLElement;
+ "select": HTMLSelectElement;
+ "small": HTMLElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "stop": SVGStopElement;
+ "strike": HTMLElement;
+ "strong": HTMLElement;
+ "style": HTMLStyleElement;
+ "sub": HTMLElement;
+ "sup": HTMLElement;
+ "svg": SVGSVGElement;
+ "switch": SVGSwitchElement;
+ "symbol": SVGSymbolElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "text": SVGTextElement;
+ "textpath": SVGTextPathElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "tspan": SVGTSpanElement;
+ "tt": HTMLElement;
+ "u": HTMLElement;
+ "ul": HTMLUListElement;
+ "use": SVGUseElement;
+ "var": HTMLElement;
+ "video": HTMLVideoElement;
+ "view": SVGViewElement;
+ "wbr": HTMLElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementListTagNameMap {
+ "a": NodeListOf<HTMLAnchorElement>;
+ "abbr": NodeListOf<HTMLElement>;
+ "acronym": NodeListOf<HTMLElement>;
+ "address": NodeListOf<HTMLElement>;
+ "applet": NodeListOf<HTMLAppletElement>;
+ "area": NodeListOf<HTMLAreaElement>;
+ "article": NodeListOf<HTMLElement>;
+ "aside": NodeListOf<HTMLElement>;
+ "audio": NodeListOf<HTMLAudioElement>;
+ "b": NodeListOf<HTMLElement>;
+ "base": NodeListOf<HTMLBaseElement>;
+ "basefont": NodeListOf<HTMLBaseFontElement>;
+ "bdo": NodeListOf<HTMLElement>;
+ "big": NodeListOf<HTMLElement>;
+ "blockquote": NodeListOf<HTMLQuoteElement>;
+ "body": NodeListOf<HTMLBodyElement>;
+ "br": NodeListOf<HTMLBRElement>;
+ "button": NodeListOf<HTMLButtonElement>;
+ "canvas": NodeListOf<HTMLCanvasElement>;
+ "caption": NodeListOf<HTMLTableCaptionElement>;
+ "center": NodeListOf<HTMLElement>;
+ "circle": NodeListOf<SVGCircleElement>;
+ "cite": NodeListOf<HTMLElement>;
+ "clippath": NodeListOf<SVGClipPathElement>;
+ "code": NodeListOf<HTMLElement>;
+ "col": NodeListOf<HTMLTableColElement>;
+ "colgroup": NodeListOf<HTMLTableColElement>;
+ "data": NodeListOf<HTMLDataElement>;
+ "datalist": NodeListOf<HTMLDataListElement>;
+ "dd": NodeListOf<HTMLElement>;
+ "defs": NodeListOf<SVGDefsElement>;
+ "del": NodeListOf<HTMLModElement>;
+ "desc": NodeListOf<SVGDescElement>;
+ "dfn": NodeListOf<HTMLElement>;
+ "dir": NodeListOf<HTMLDirectoryElement>;
+ "div": NodeListOf<HTMLDivElement>;
+ "dl": NodeListOf<HTMLDListElement>;
+ "dt": NodeListOf<HTMLElement>;
+ "ellipse": NodeListOf<SVGEllipseElement>;
+ "em": NodeListOf<HTMLElement>;
+ "embed": NodeListOf<HTMLEmbedElement>;
+ "feblend": NodeListOf<SVGFEBlendElement>;
+ "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
+ "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
+ "fecomposite": NodeListOf<SVGFECompositeElement>;
+ "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
+ "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
+ "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
+ "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
+ "feflood": NodeListOf<SVGFEFloodElement>;
+ "fefunca": NodeListOf<SVGFEFuncAElement>;
+ "fefuncb": NodeListOf<SVGFEFuncBElement>;
+ "fefuncg": NodeListOf<SVGFEFuncGElement>;
+ "fefuncr": NodeListOf<SVGFEFuncRElement>;
+ "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
+ "feimage": NodeListOf<SVGFEImageElement>;
+ "femerge": NodeListOf<SVGFEMergeElement>;
+ "femergenode": NodeListOf<SVGFEMergeNodeElement>;
+ "femorphology": NodeListOf<SVGFEMorphologyElement>;
+ "feoffset": NodeListOf<SVGFEOffsetElement>;
+ "fepointlight": NodeListOf<SVGFEPointLightElement>;
+ "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
+ "fespotlight": NodeListOf<SVGFESpotLightElement>;
+ "fetile": NodeListOf<SVGFETileElement>;
+ "feturbulence": NodeListOf<SVGFETurbulenceElement>;
+ "fieldset": NodeListOf<HTMLFieldSetElement>;
+ "figcaption": NodeListOf<HTMLElement>;
+ "figure": NodeListOf<HTMLElement>;
+ "filter": NodeListOf<SVGFilterElement>;
+ "font": NodeListOf<HTMLFontElement>;
+ "footer": NodeListOf<HTMLElement>;
+ "foreignobject": NodeListOf<SVGForeignObjectElement>;
+ "form": NodeListOf<HTMLFormElement>;
+ "frame": NodeListOf<HTMLFrameElement>;
+ "frameset": NodeListOf<HTMLFrameSetElement>;
+ "g": NodeListOf<SVGGElement>;
+ "h1": NodeListOf<HTMLHeadingElement>;
+ "h2": NodeListOf<HTMLHeadingElement>;
+ "h3": NodeListOf<HTMLHeadingElement>;
+ "h4": NodeListOf<HTMLHeadingElement>;
+ "h5": NodeListOf<HTMLHeadingElement>;
+ "h6": NodeListOf<HTMLHeadingElement>;
+ "head": NodeListOf<HTMLHeadElement>;
+ "header": NodeListOf<HTMLElement>;
+ "hgroup": NodeListOf<HTMLElement>;
+ "hr": NodeListOf<HTMLHRElement>;
+ "html": NodeListOf<HTMLHtmlElement>;
+ "i": NodeListOf<HTMLElement>;
+ "iframe": NodeListOf<HTMLIFrameElement>;
+ "image": NodeListOf<SVGImageElement>;
+ "img": NodeListOf<HTMLImageElement>;
+ "input": NodeListOf<HTMLInputElement>;
+ "ins": NodeListOf<HTMLModElement>;
+ "isindex": NodeListOf<HTMLUnknownElement>;
+ "kbd": NodeListOf<HTMLElement>;
+ "keygen": NodeListOf<HTMLElement>;
+ "label": NodeListOf<HTMLLabelElement>;
+ "legend": NodeListOf<HTMLLegendElement>;
+ "li": NodeListOf<HTMLLIElement>;
+ "line": NodeListOf<SVGLineElement>;
+ "lineargradient": NodeListOf<SVGLinearGradientElement>;
+ "link": NodeListOf<HTMLLinkElement>;
+ "listing": NodeListOf<HTMLPreElement>;
+ "map": NodeListOf<HTMLMapElement>;
+ "mark": NodeListOf<HTMLElement>;
+ "marker": NodeListOf<SVGMarkerElement>;
+ "marquee": NodeListOf<HTMLMarqueeElement>;
+ "mask": NodeListOf<SVGMaskElement>;
+ "menu": NodeListOf<HTMLMenuElement>;
+ "meta": NodeListOf<HTMLMetaElement>;
+ "metadata": NodeListOf<SVGMetadataElement>;
+ "meter": NodeListOf<HTMLMeterElement>;
+ "nav": NodeListOf<HTMLElement>;
+ "nextid": NodeListOf<HTMLUnknownElement>;
+ "nobr": NodeListOf<HTMLElement>;
+ "noframes": NodeListOf<HTMLElement>;
+ "noscript": NodeListOf<HTMLElement>;
+ "object": NodeListOf<HTMLObjectElement>;
+ "ol": NodeListOf<HTMLOListElement>;
+ "optgroup": NodeListOf<HTMLOptGroupElement>;
+ "option": NodeListOf<HTMLOptionElement>;
+ "output": NodeListOf<HTMLOutputElement>;
+ "p": NodeListOf<HTMLParagraphElement>;
+ "param": NodeListOf<HTMLParamElement>;
+ "path": NodeListOf<SVGPathElement>;
+ "pattern": NodeListOf<SVGPatternElement>;
+ "picture": NodeListOf<HTMLPictureElement>;
+ "plaintext": NodeListOf<HTMLElement>;
+ "polygon": NodeListOf<SVGPolygonElement>;
+ "polyline": NodeListOf<SVGPolylineElement>;
+ "pre": NodeListOf<HTMLPreElement>;
+ "progress": NodeListOf<HTMLProgressElement>;
+ "q": NodeListOf<HTMLQuoteElement>;
+ "radialgradient": NodeListOf<SVGRadialGradientElement>;
+ "rect": NodeListOf<SVGRectElement>;
+ "rt": NodeListOf<HTMLElement>;
+ "ruby": NodeListOf<HTMLElement>;
+ "s": NodeListOf<HTMLElement>;
+ "samp": NodeListOf<HTMLElement>;
+ "script": NodeListOf<HTMLScriptElement>;
+ "section": NodeListOf<HTMLElement>;
+ "select": NodeListOf<HTMLSelectElement>;
+ "small": NodeListOf<HTMLElement>;
+ "source": NodeListOf<HTMLSourceElement>;
+ "span": NodeListOf<HTMLSpanElement>;
+ "stop": NodeListOf<SVGStopElement>;
+ "strike": NodeListOf<HTMLElement>;
+ "strong": NodeListOf<HTMLElement>;
+ "style": NodeListOf<HTMLStyleElement>;
+ "sub": NodeListOf<HTMLElement>;
+ "sup": NodeListOf<HTMLElement>;
+ "svg": NodeListOf<SVGSVGElement>;
+ "switch": NodeListOf<SVGSwitchElement>;
+ "symbol": NodeListOf<SVGSymbolElement>;
+ "table": NodeListOf<HTMLTableElement>;
+ "tbody": NodeListOf<HTMLTableSectionElement>;
+ "td": NodeListOf<HTMLTableDataCellElement>;
+ "template": NodeListOf<HTMLTemplateElement>;
+ "text": NodeListOf<SVGTextElement>;
+ "textpath": NodeListOf<SVGTextPathElement>;
+ "textarea": NodeListOf<HTMLTextAreaElement>;
+ "tfoot": NodeListOf<HTMLTableSectionElement>;
+ "th": NodeListOf<HTMLTableHeaderCellElement>;
+ "thead": NodeListOf<HTMLTableSectionElement>;
+ "time": NodeListOf<HTMLTimeElement>;
+ "title": NodeListOf<HTMLTitleElement>;
+ "tr": NodeListOf<HTMLTableRowElement>;
+ "track": NodeListOf<HTMLTrackElement>;
+ "tspan": NodeListOf<SVGTSpanElement>;
+ "tt": NodeListOf<HTMLElement>;
+ "u": NodeListOf<HTMLElement>;
+ "ul": NodeListOf<HTMLUListElement>;
+ "use": NodeListOf<SVGUseElement>;
+ "var": NodeListOf<HTMLElement>;
+ "video": NodeListOf<HTMLVideoElement>;
+ "view": NodeListOf<SVGViewElement>;
+ "wbr": NodeListOf<HTMLElement>;
+ "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
+ "xmp": NodeListOf<HTMLPreElement>;
+}
+
+declare var Audio: {new(src?: string): HTMLAudioElement; };
+declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
+declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
+declare var applicationCache: ApplicationCache;
+declare var caches: CacheStorage;
+declare var clientInformation: Navigator;
+declare var closed: boolean;
+declare var crypto: Crypto;
+declare var defaultStatus: string;
+declare var devicePixelRatio: number;
+declare var doNotTrack: string;
+declare var document: Document;
+declare var event: Event | undefined;
+declare var external: External;
+declare var frameElement: Element;
+declare var frames: Window;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var isSecureContext: boolean;
+declare var length: number;
+declare var location: Location;
+declare var locationbar: BarProp;
+declare var menubar: BarProp;
+declare var msContentScript: ExtensionScriptApis;
+declare var msCredentials: MSCredentials;
+declare const name: never;
+declare var navigator: Navigator;
+declare var offscreenBuffering: string | boolean;
+declare var onabort: (this: Window, ev: UIEvent) => any;
+declare var onafterprint: (this: Window, ev: Event) => any;
+declare var onbeforeprint: (this: Window, ev: Event) => any;
+declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+declare var onblur: (this: Window, ev: FocusEvent) => any;
+declare var oncanplay: (this: Window, ev: Event) => any;
+declare var oncanplaythrough: (this: Window, ev: Event) => any;
+declare var onchange: (this: Window, ev: Event) => any;
+declare var onclick: (this: Window, ev: MouseEvent) => any;
+declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
+declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
+declare var ondblclick: (this: Window, ev: MouseEvent) => any;
+declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+declare var ondrag: (this: Window, ev: DragEvent) => any;
+declare var ondragend: (this: Window, ev: DragEvent) => any;
+declare var ondragenter: (this: Window, ev: DragEvent) => any;
+declare var ondragleave: (this: Window, ev: DragEvent) => any;
+declare var ondragover: (this: Window, ev: DragEvent) => any;
+declare var ondragstart: (this: Window, ev: DragEvent) => any;
+declare var ondrop: (this: Window, ev: DragEvent) => any;
+declare var ondurationchange: (this: Window, ev: Event) => any;
+declare var onemptied: (this: Window, ev: Event) => any;
+declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+declare var onerror: ErrorEventHandler;
+declare var onfocus: (this: Window, ev: FocusEvent) => any;
+declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
+declare var oninput: (this: Window, ev: Event) => any;
+declare var oninvalid: (this: Window, ev: Event) => any;
+declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
+declare var onload: (this: Window, ev: Event) => any;
+declare var onloadeddata: (this: Window, ev: Event) => any;
+declare var onloadedmetadata: (this: Window, ev: Event) => any;
+declare var onloadstart: (this: Window, ev: Event) => any;
+declare var onmessage: (this: Window, ev: MessageEvent) => any;
+declare var onmousedown: (this: Window, ev: MouseEvent) => any;
+declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
+declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
+declare var onmousemove: (this: Window, ev: MouseEvent) => any;
+declare var onmouseout: (this: Window, ev: MouseEvent) => any;
+declare var onmouseover: (this: Window, ev: MouseEvent) => any;
+declare var onmouseup: (this: Window, ev: MouseEvent) => any;
+declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
+declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+declare var onoffline: (this: Window, ev: Event) => any;
+declare var ononline: (this: Window, ev: Event) => any;
+declare var onorientationchange: (this: Window, ev: Event) => any;
+declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpause: (this: Window, ev: Event) => any;
+declare var onplay: (this: Window, ev: Event) => any;
+declare var onplaying: (this: Window, ev: Event) => any;
+declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
+declare var onprogress: (this: Window, ev: ProgressEvent) => any;
+declare var onratechange: (this: Window, ev: Event) => any;
+declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+declare var onreset: (this: Window, ev: Event) => any;
+declare var onresize: (this: Window, ev: UIEvent) => any;
+declare var onscroll: (this: Window, ev: UIEvent) => any;
+declare var onseeked: (this: Window, ev: Event) => any;
+declare var onseeking: (this: Window, ev: Event) => any;
+declare var onselect: (this: Window, ev: UIEvent) => any;
+declare var onstalled: (this: Window, ev: Event) => any;
+declare var onstorage: (this: Window, ev: StorageEvent) => any;
+declare var onsubmit: (this: Window, ev: Event) => any;
+declare var onsuspend: (this: Window, ev: Event) => any;
+declare var ontimeupdate: (this: Window, ev: Event) => any;
+declare var ontouchcancel: (ev: TouchEvent) => any;
+declare var ontouchend: (ev: TouchEvent) => any;
+declare var ontouchmove: (ev: TouchEvent) => any;
+declare var ontouchstart: (ev: TouchEvent) => any;
+declare var onunload: (this: Window, ev: Event) => any;
+declare var onvolumechange: (this: Window, ev: Event) => any;
+declare var onwaiting: (this: Window, ev: Event) => any;
+declare var opener: any;
+declare var orientation: string | number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+declare var pageXOffset: number;
+declare var pageYOffset: number;
+declare var parent: Window;
+declare var performance: Performance;
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+declare var scrollbars: BarProp;
+declare var self: Window;
+declare var speechSynthesis: SpeechSynthesis;
+declare var status: string;
+declare var statusbar: BarProp;
+declare var styleMedia: StyleMedia;
+declare var toolbar: BarProp;
+declare var top: Window;
+declare var window: Window;
+declare var customElements: CustomElementRegistry;
+declare function alert(message?: any): void;
+declare function blur(): void;
+declare function cancelAnimationFrame(handle: number): void;
+declare function captureEvents(): void;
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+declare function departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+declare function getSelection(): Selection;
+declare function matchMedia(mediaQuery: string): MediaQueryList;
+declare function moveBy(x?: number, y?: number): void;
+declare function moveTo(x?: number, y?: number): void;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string | null;
+declare function releaseEvents(): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function resizeBy(x?: number, y?: number): void;
+declare function resizeTo(x?: number, y?: number): void;
+declare function scroll(x?: number, y?: number): void;
+declare function scrollBy(x?: number, y?: number): void;
+declare function scrollTo(x?: number, y?: number): void;
+declare function stop(): void;
+declare function webkitCancelAnimationFrame(handle: number): void;
+declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollBy(options?: ScrollToOptions): void;
+declare function toString(): string;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+declare function clearInterval(handle: number): void;
+declare function clearTimeout(handle: number): void;
+declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
+declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+declare function clearImmediate(handle: number): void;
+declare function setImmediate(handler: (...args: any[]) => void): number;
+declare function setImmediate(handler: any, ...args: any[]): number;
+declare var sessionStorage: Storage;
+declare var localStorage: Storage;
+declare var console: Console;
+declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
+declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
+declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
+declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
+declare var onpointermove: (this: Window, ev: PointerEvent) => any;
+declare var onpointerout: (this: Window, ev: PointerEvent) => any;
+declare var onpointerover: (this: Window, ev: PointerEvent) => any;
+declare var onpointerup: (this: Window, ev: PointerEvent) => any;
+declare var onwheel: (this: Window, ev: WheelEvent) => any;
+declare var indexedDB: IDBFactory;
+declare function atob(encodedString: string): string;
+declare function btoa(rawString: string): string;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+type AAGUID = string;
+type AlgorithmIdentifier = string | Algorithm;
+type BodyInit = any;
+type ByteString = string;
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainLong = number | ConstrainLongRange;
+type CryptoOperationData = ArrayBufferView;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLbyte = number;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLintptr = number;
+type GLshort = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLubyte = number;
+type GLuint = number;
+type GLushort = number;
+type HeadersInit = any;
+type IDBKeyPath = string;
+type KeyFormat = string;
+type KeyType = string;
+type KeyUsage = string;
+type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
+type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
+type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
+type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
+type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
+type RequestInfo = Request | string;
+type USVString = string;
+type payloadtype = number;
+type ScrollBehavior = "auto" | "instant" | "smooth";
+type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
+type IDBValidKey = number | string | Date | IDBArrayKey;
+type BufferSource = ArrayBuffer | ArrayBufferView;
+type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
+type FormDataEntryValue = string | File;
+type AppendMode = "segments" | "sequence";
+type AudioContextState = "suspended" | "running" | "closed";
+type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
+type CanvasFillRule = "nonzero" | "evenodd";
+type ChannelCountMode = "max" | "clamped-max" | "explicit";
+type ChannelInterpretation = "speakers" | "discrete";
+type DistanceModelType = "linear" | "inverse" | "exponential";
+type ExpandGranularity = "character" | "word" | "sentence" | "textedit";
+type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "pending" | "done";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ListeningState = "inactive" | "active" | "disambiguation";
+type MSCredentialType = "FIDO_2_0";
+type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
+type MSIceType = "failed" | "direct" | "relay";
+type MSStatsType = "description" | "localclientevent" | "inbound-network" | "outbound-network" | "inbound-payload" | "outbound-payload" | "transportdiagnostics";
+type MSTransportType = "Embedded" | "USB" | "NFC" | "BT";
+type MSWebViewPermissionState = "unknown" | "defer" | "allow" | "deny";
+type MSWebViewPermissionType = "geolocation" | "unlimitedIndexedDBQuota" | "media" | "pointerlock" | "webnotifications";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaStreamTrackState = "live" | "ended";
+type NavigationReason = "up" | "down" | "left" | "right";
+type NavigationType = "navigate" | "reload" | "back_forward" | "prerender";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OscillatorType = "sine" | "square" | "sawtooth" | "triangle" | "custom";
+type OverSampleType = "none" | "2x" | "4x";
+type PanningModelType = "equalpower";
+type PaymentComplete = "success" | "fail" | "";
+type PaymentShippingType = "shipping" | "delivery" | "pickup";
+type PushEncryptionKeyName = "p256dh" | "auth";
+type PushPermissionState = "granted" | "denied" | "prompt";
+type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
+type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
+type RTCDtlsRole = "auto" | "client" | "server";
+type RTCDtlsTransportState = "new" | "connecting" | "connected" | "closed";
+type RTCIceCandidateType = "host" | "srflx" | "prflx" | "relay";
+type RTCIceComponent = "RTP" | "RTCP";
+type RTCIceConnectionState = "new" | "checking" | "connected" | "completed" | "failed" | "disconnected" | "closed";
+type RTCIceGatherPolicy = "all" | "nohost" | "relay";
+type RTCIceGathererState = "new" | "gathering" | "complete";
+type RTCIceGatheringState = "new" | "gathering" | "complete";
+type RTCIceProtocol = "udp" | "tcp";
+type RTCIceRole = "controlling" | "controlled";
+type RTCIceTcpCandidateType = "active" | "passive" | "so";
+type RTCIceTransportPolicy = "none" | "relay" | "all";
+type RTCIceTransportState = "new" | "checking" | "connected" | "completed" | "disconnected" | "closed";
+type RTCSdpType = "offer" | "pranswer" | "answer";
+type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "have-local-pranswer" | "have-remote-pranswer" | "closed";
+type RTCStatsIceCandidatePairState = "frozen" | "waiting" | "inprogress" | "failed" | "succeeded" | "cancelled";
+type RTCStatsIceCandidateType = "host" | "serverreflexive" | "peerreflexive" | "relayed";
+type RTCStatsType = "inboundrtp" | "outboundrtp" | "session" | "datachannel" | "track" | "transport" | "candidatepair" | "localcandidate" | "remotecandidate";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache";
+type RequestCredentials = "omit" | "same-origin" | "include";
+type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker";
+type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
+type RequestRedirect = "follow" | "error" | "manual";
+type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ScopedCredentialType = "ScopedCred";
+type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
+type Transport = "usb" | "nfc" | "ble";
+type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
+type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
+
+
+/////////////////////////////
+/// WorkerGlobalScope APIs
+/////////////////////////////
+// These are only available in a Web Worker
+declare function importScripts(...urls: string[]): void;
+
+
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T>(collection: any): Enumerator<T>;
+ new (collection: any): Enumerator<any>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T>(safeArray: any): VBArray<T>;
+ new (safeArray: any): VBArray<any>;
+}
+
+declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+interface VarDate { }
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
-
-/////////////////////////////
-/// WorkerGlobalScope APIs
-/////////////////////////////
-// These are only available in a Web Worker
-declare function importScripts(...urls: string[]): void;
-
-
-
-
-/////////////////////////////
-/// Windows Script Host APIS
-/////////////////////////////
-
-
-interface ActiveXObject {
- new (s: string): any;
-}
-declare var ActiveXObject: ActiveXObject;
-
-interface ITextWriter {
- Write(s: string): void;
- WriteLine(s: string): void;
- Close(): void;
-}
-
-interface TextStreamBase {
- /**
- * The column number of the current character position in an input stream.
- */
- Column: number;
-
- /**
- * The current line number in an input stream.
- */
- Line: number;
-
- /**
- * Closes a text stream.
- * It is not necessary to close standard streams; they close automatically when the process ends. If
- * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
- */
- Close(): void;
-}
-
-interface TextStreamWriter extends TextStreamBase {
- /**
- * Sends a string to an output stream.
- */
- Write(s: string): void;
-
- /**
- * Sends a specified number of blank lines (newline characters) to an output stream.
- */
- WriteBlankLines(intLines: number): void;
-
- /**
- * Sends a string followed by a newline character to an output stream.
- */
- WriteLine(s: string): void;
-}
-
-interface TextStreamReader extends TextStreamBase {
- /**
- * Returns a specified number of characters from an input stream, starting at the current pointer position.
- * Does not return until the ENTER key is pressed.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- Read(characters: number): string;
-
- /**
- * Returns all characters from an input stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadAll(): string;
-
- /**
- * Returns an entire line from an input stream.
- * Although this method extracts the newline character, it does not add it to the returned string.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadLine(): string;
-
- /**
- * Skips a specified number of characters when reading from an input text stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
- */
- Skip(characters: number): void;
-
- /**
- * Skips the next line when reading from an input text stream.
- * Can only be used on a stream in reading mode, not writing or appending mode.
- */
- SkipLine(): void;
-
- /**
- * Indicates whether the stream pointer position is at the end of a line.
- */
- AtEndOfLine: boolean;
-
- /**
- * Indicates whether the stream pointer position is at the end of a stream.
- */
- AtEndOfStream: boolean;
-}
-
-declare var WScript: {
- /**
- * Outputs text to either a message box (under WScript.exe) or the command console window followed by
- * a newline (under CScript.exe).
- */
- Echo(s: any): void;
-
- /**
- * Exposes the write-only error output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdErr: TextStreamWriter;
-
- /**
- * Exposes the write-only output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdOut: TextStreamWriter;
- Arguments: { length: number; Item(n: number): string; };
-
- /**
- * The full path of the currently running script.
- */
- ScriptFullName: string;
-
- /**
- * Forces the script to stop immediately, with an optional exit code.
- */
- Quit(exitCode?: number): number;
-
- /**
- * The Windows Script Host build version number.
- */
- BuildVersion: number;
-
- /**
- * Fully qualified path of the host executable.
- */
- FullName: string;
-
- /**
- * Gets/sets the script mode - interactive(true) or batch(false).
- */
- Interactive: boolean;
-
- /**
- * The name of the host executable (WScript.exe or CScript.exe).
- */
- Name: string;
-
- /**
- * Path of the directory containing the host executable.
- */
- Path: string;
-
- /**
- * The filename of the currently running script.
- */
- ScriptName: string;
-
- /**
- * Exposes the read-only input stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdIn: TextStreamReader;
-
- /**
- * Windows Script Host version
- */
- Version: string;
-
- /**
- * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
- */
- ConnectObject(objEventSource: any, strPrefix: string): void;
-
- /**
- * Creates a COM object.
- * @param strProgiID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- CreateObject(strProgID: string, strPrefix?: string): any;
-
- /**
- * Disconnects a COM object from its event sources.
- */
- DisconnectObject(obj: any): void;
-
- /**
- * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
- * @param strPathname Fully qualified path to the file containing the object persisted to disk.
- * For objects in memory, pass a zero-length string.
- * @param strProgID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
-
- /**
- * Suspends script execution for a specified length of time, then continues execution.
- * @param intTime Interval (in milliseconds) to suspend script execution.
- */
- Sleep(intTime: number): void;
-};
-
-/**
- * Allows enumerating over a COM collection, which may not have indexed item access.
- */
-interface Enumerator<T> {
- /**
- * Returns true if the current item is the last one in the collection, or the collection is empty,
- * or the current item is undefined.
- */
- atEnd(): boolean;
-
- /**
- * Returns the current item in the collection
- */
- item(): T;
-
- /**
- * Resets the current item in the collection to the first item. If there are no items in the collection,
- * the current item is set to undefined.
- */
- moveFirst(): void;
-
- /**
- * Moves the current item to the next item in the collection. If the enumerator is at the end of
- * the collection or the collection is empty, the current item is set to undefined.
- */
- moveNext(): void;
-}
-
-interface EnumeratorConstructor {
- new <T>(collection: any): Enumerator<T>;
- new (collection: any): Enumerator<any>;
-}
-
-declare var Enumerator: EnumeratorConstructor;
-
-/**
- * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
- */
-interface VBArray<T> {
- /**
- * Returns the number of dimensions (1-based).
- */
- dimensions(): number;
-
- /**
- * Takes an index for each dimension in the array, and returns the item at the corresponding location.
- */
- getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
-
- /**
- * Returns the smallest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- lbound(dimension?: number): number;
-
- /**
- * Returns the largest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- ubound(dimension?: number): number;
-
- /**
- * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
- * each successive dimension is appended to the end of the array.
- * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
- */
- toArray(): T[];
-}
-
-interface VBArrayConstructor {
- new <T>(safeArray: any): VBArray<T>;
- new (safeArray: any): VBArray<any>;
-}
-
-declare var VBArray: VBArrayConstructor;
-
-/**
- * Automation date (VT_DATE)
- */
-interface VarDate { }
-
-interface DateConstructor {
- new (vd: VarDate): Date;
-}
-
-interface Date {
- getVarDate: () => VarDate;
-}
+interface Date {
+ getVarDate: () => VarDate;
+}
diff --git a/node_modules/typescript/lib/lib.dom.d.ts b/node_modules/typescript/lib/lib.dom.d.ts
index 8fb1b0b0a..94fb13c32 100644
--- a/node_modules/typescript/lib/lib.dom.d.ts
+++ b/node_modules/typescript/lib/lib.dom.d.ts
@@ -1,13738 +1,15056 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-
-/////////////////////////////
-/// IE DOM APIs
-/////////////////////////////
-
-interface Algorithm {
- name: string;
-}
-
-interface AriaRequestEventInit extends EventInit {
- attributeName?: string;
- attributeValue?: string;
-}
-
-interface CommandEventInit extends EventInit {
- commandName?: string;
- detail?: string;
-}
-
-interface CompositionEventInit extends UIEventInit {
- data?: string;
-}
-
-interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface ConstrainBooleanParameters {
- exact?: boolean;
- ideal?: boolean;
-}
-
-interface ConstrainDOMStringParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface ConstrainDoubleRange extends DoubleRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainLongRange extends LongRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainVideoFacingModeParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface CustomEventInit extends EventInit {
- detail?: any;
-}
-
-interface DeviceAccelerationDict {
- x?: number;
- y?: number;
- z?: number;
-}
-
-interface DeviceLightEventInit extends EventInit {
- value?: number;
-}
-
-interface DeviceRotationRateDict {
- alpha?: number;
- beta?: number;
- gamma?: number;
-}
-
-interface DoubleRange {
- max?: number;
- min?: number;
-}
-
-interface EventInit {
- scoped?: boolean;
- bubbles?: boolean;
- cancelable?: boolean;
-}
-
-interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
- altKey?: boolean;
- metaKey?: boolean;
- modifierAltGraph?: boolean;
- modifierCapsLock?: boolean;
- modifierFn?: boolean;
- modifierFnLock?: boolean;
- modifierHyper?: boolean;
- modifierNumLock?: boolean;
- modifierOS?: boolean;
- modifierScrollLock?: boolean;
- modifierSuper?: boolean;
- modifierSymbol?: boolean;
- modifierSymbolLock?: boolean;
-}
-
-interface ExceptionInformation {
- domain?: string;
-}
-
-interface FocusEventInit extends UIEventInit {
- relatedTarget?: EventTarget;
-}
-
-interface HashChangeEventInit extends EventInit {
- newURL?: string;
- oldURL?: string;
-}
-
-interface IDBIndexParameters {
- multiEntry?: boolean;
- unique?: boolean;
-}
-
-interface IDBObjectStoreParameters {
- autoIncrement?: boolean;
- keyPath?: IDBKeyPath;
-}
-
-interface KeyAlgorithm {
- name?: string;
-}
-
-interface KeyboardEventInit extends EventModifierInit {
- code?: string;
- key?: string;
- location?: number;
- repeat?: boolean;
-}
-
-interface LongRange {
- max?: number;
- min?: number;
-}
-
-interface MSAccountInfo {
- rpDisplayName?: string;
- userDisplayName?: string;
- accountName?: string;
- userId?: string;
- accountImageUri?: string;
-}
-
-interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
- networkSendQualityEventRatio?: number;
- networkDelayEventRatio?: number;
- cpuInsufficientEventRatio?: number;
- deviceHalfDuplexAECEventRatio?: number;
- deviceRenderNotFunctioningEventRatio?: number;
- deviceCaptureNotFunctioningEventRatio?: number;
- deviceGlitchesEventRatio?: number;
- deviceLowSNREventRatio?: number;
- deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
- deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
- deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
-}
-
-interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
- burstLossLength1?: number;
- burstLossLength2?: number;
- burstLossLength3?: number;
- burstLossLength4?: number;
- burstLossLength5?: number;
- burstLossLength6?: number;
- burstLossLength7?: number;
- burstLossLength8OrHigher?: number;
- fecRecvDistance1?: number;
- fecRecvDistance2?: number;
- fecRecvDistance3?: number;
- ratioConcealedSamplesAvg?: number;
- ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
-}
-
-interface MSAudioRecvSignal {
- initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
- recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
- renderLoopbackSignalLevel?: number;
-}
-
-interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
- audioFECUsed?: boolean;
- sendMutePercent?: number;
-}
-
-interface MSAudioSendSignal {
- noiseLevel?: number;
- sendSignalLevelCh1?: number;
- sendNoiseLevelCh1?: number;
-}
-
-interface MSConnectivity {
- iceType?: string;
- iceWarningFlags?: MSIceWarningFlags;
- relayAddress?: MSRelayAddress;
-}
-
-interface MSCredentialFilter {
- accept?: MSCredentialSpec[];
-}
-
-interface MSCredentialParameters {
- type?: string;
-}
-
-interface MSCredentialSpec {
- type?: string;
- id?: string;
-}
-
-interface MSDelay {
- roundTrip?: number;
- roundTripMax?: number;
-}
-
-interface MSDescription extends RTCStats {
- connectivity?: MSConnectivity;
- transport?: string;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
- deviceDevName?: string;
- reflexiveLocalIPAddr?: MSIPAddressInfo;
-}
-
-interface MSFIDOCredentialParameters extends MSCredentialParameters {
- algorithm?: string | Algorithm;
- authenticators?: AAGUID[];
-}
-
-interface MSIPAddressInfo {
- ipAddr?: string;
- port?: number;
- manufacturerMacAddrMask?: string;
-}
-
-interface MSIceWarningFlags {
- turnTcpTimedOut?: boolean;
- turnUdpAllocateFailed?: boolean;
- turnUdpSendFailed?: boolean;
- turnTcpAllocateFailed?: boolean;
- turnTcpSendFailed?: boolean;
- udpLocalConnectivityFailed?: boolean;
- udpNatConnectivityFailed?: boolean;
- udpRelayConnectivityFailed?: boolean;
- tcpNatConnectivityFailed?: boolean;
- tcpRelayConnectivityFailed?: boolean;
- connCheckMessageIntegrityFailed?: boolean;
- allocationMessageIntegrityFailed?: boolean;
- connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
- multipleRelayServersAttempted?: boolean;
- portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
- pseudoTLSFailure?: boolean;
- turnTurnTcpConnectivityFailed?: boolean;
- useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
-}
-
-interface MSJitter {
- interArrival?: number;
- interArrivalMax?: number;
- interArrivalSD?: number;
-}
-
-interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
- networkBandwidthLowEventRatio?: number;
-}
-
-interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
- delay?: MSDelay;
- packetLoss?: MSPacketLoss;
- utilization?: MSUtilization;
-}
-
-interface MSNetworkConnectivityInfo {
- vpn?: boolean;
- linkspeed?: number;
- networkConnectionDetails?: string;
-}
-
-interface MSNetworkInterfaceType {
- interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
- interfaceTypePPP?: boolean;
- interfaceTypeTunnel?: boolean;
- interfaceTypeWWAN?: boolean;
-}
-
-interface MSOutboundNetwork extends MSNetwork {
- appliedBandwidthLimit?: number;
-}
-
-interface MSPacketLoss {
- lossRate?: number;
- lossRateMax?: number;
-}
-
-interface MSPayloadBase extends RTCStats {
- payloadDescription?: string;
-}
-
-interface MSRelayAddress {
- relayAddress?: string;
- port?: number;
-}
-
-interface MSSignatureParameters {
- userPrompt?: string;
-}
-
-interface MSTransportDiagnosticsStats extends RTCStats {
- baseAddress?: string;
- localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
- localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
- localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
- numConsentReqReceived?: number;
- numConsentRespSent?: number;
- numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
- protocol?: string;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: string;
- remoteAddrType?: string;
- iceRole?: string;
- rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
-}
-
-interface MSUtilization {
- packets?: number;
- bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
- bandwidthEstimationMax?: number;
- bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
-}
-
-interface MSVideoPayload extends MSPayloadBase {
- resoluton?: string;
- videoBitRateAvg?: number;
- videoBitRateMax?: number;
- videoFrameRateAvg?: number;
- videoPacketLossRate?: number;
- durationSeconds?: number;
-}
-
-interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
- recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
- recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
- recvVideoStreamsMax?: number;
- recvVideoStreamsMin?: number;
- recvVideoStreamsMode?: number;
- videoPostFECPLR?: number;
- lowBitRateCallPercent?: number;
- lowFrameRateCallPercent?: number;
- reorderBufferTotalPackets?: number;
- recvReorderBufferReorderedPackets?: number;
- recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
- recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
- recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
- recvReorderBufferPacketsDroppedDueToTimeout?: number;
- recvFpsHarmonicAverage?: number;
- recvNumResSwitches?: number;
-}
-
-interface MSVideoResolutionDistribution {
- cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
- h1080Quality?: number;
- h1440Quality?: number;
- h2160Quality?: number;
-}
-
-interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
- sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
- sendResolutionHeight?: number;
-}
-
-interface MediaEncryptedEventInit extends EventInit {
- initDataType?: string;
- initData?: ArrayBuffer;
-}
-
-interface MediaKeyMessageEventInit extends EventInit {
- messageType?: string;
- message?: ArrayBuffer;
-}
-
-interface MediaKeySystemConfiguration {
- initDataTypes?: string[];
- audioCapabilities?: MediaKeySystemMediaCapability[];
- videoCapabilities?: MediaKeySystemMediaCapability[];
- distinctiveIdentifier?: string;
- persistentState?: string;
-}
-
-interface MediaKeySystemMediaCapability {
- contentType?: string;
- robustness?: string;
-}
-
-interface MediaStreamConstraints {
- video?: boolean | MediaTrackConstraints;
- audio?: boolean | MediaTrackConstraints;
-}
-
-interface MediaStreamErrorEventInit extends EventInit {
- error?: MediaStreamError;
-}
-
-interface MediaStreamTrackEventInit extends EventInit {
- track?: MediaStreamTrack;
-}
-
-interface MediaTrackCapabilities {
- width?: number | LongRange;
- height?: number | LongRange;
- aspectRatio?: number | DoubleRange;
- frameRate?: number | DoubleRange;
- facingMode?: string;
- volume?: number | DoubleRange;
- sampleRate?: number | LongRange;
- sampleSize?: number | LongRange;
- echoCancellation?: boolean[];
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackConstraintSet {
- width?: number | ConstrainLongRange;
- height?: number | ConstrainLongRange;
- aspectRatio?: number | ConstrainDoubleRange;
- frameRate?: number | ConstrainDoubleRange;
- facingMode?: string | string[] | ConstrainDOMStringParameters;
- volume?: number | ConstrainDoubleRange;
- sampleRate?: number | ConstrainLongRange;
- sampleSize?: number | ConstrainLongRange;
- echoCancelation?: boolean | ConstrainBooleanParameters;
- deviceId?: string | string[] | ConstrainDOMStringParameters;
- groupId?: string | string[] | ConstrainDOMStringParameters;
-}
-
-interface MediaTrackConstraints extends MediaTrackConstraintSet {
- advanced?: MediaTrackConstraintSet[];
-}
-
-interface MediaTrackSettings {
- width?: number;
- height?: number;
- aspectRatio?: number;
- frameRate?: number;
- facingMode?: string;
- volume?: number;
- sampleRate?: number;
- sampleSize?: number;
- echoCancellation?: boolean;
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackSupportedConstraints {
- width?: boolean;
- height?: boolean;
- aspectRatio?: boolean;
- frameRate?: boolean;
- facingMode?: boolean;
- volume?: boolean;
- sampleRate?: boolean;
- sampleSize?: boolean;
- echoCancellation?: boolean;
- deviceId?: boolean;
- groupId?: boolean;
-}
-
-interface MouseEventInit extends EventModifierInit {
- screenX?: number;
- screenY?: number;
- clientX?: number;
- clientY?: number;
- button?: number;
- buttons?: number;
- relatedTarget?: EventTarget;
-}
-
-interface MsZoomToOptions {
- contentX?: number;
- contentY?: number;
- viewportX?: string;
- viewportY?: string;
- scaleFactor?: number;
- animate?: string;
-}
-
-interface MutationObserverInit {
- childList?: boolean;
- attributes?: boolean;
- characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
- characterDataOldValue?: boolean;
- attributeFilter?: string[];
-}
-
-interface ObjectURLOptions {
- oneTimeOnly?: boolean;
-}
-
-interface PeriodicWaveConstraints {
- disableNormalization?: boolean;
-}
-
-interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
- height?: number;
- pressure?: number;
- tiltX?: number;
- tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
-}
-
-interface PositionOptions {
- enableHighAccuracy?: boolean;
- timeout?: number;
- maximumAge?: number;
-}
-
-interface RTCDTMFToneChangeEventInit extends EventInit {
- tone?: string;
-}
-
-interface RTCDtlsFingerprint {
- algorithm?: string;
- value?: string;
-}
-
-interface RTCDtlsParameters {
- role?: string;
- fingerprints?: RTCDtlsFingerprint[];
-}
-
-interface RTCIceCandidate {
- foundation?: string;
- priority?: number;
- ip?: string;
- protocol?: string;
- port?: number;
- type?: string;
- tcpType?: string;
- relatedAddress?: string;
- relatedPort?: number;
-}
-
-interface RTCIceCandidateAttributes extends RTCStats {
- ipAddress?: string;
- portNumber?: number;
- transport?: string;
- candidateType?: string;
- priority?: number;
- addressSourceUrl?: string;
-}
-
-interface RTCIceCandidateComplete {
-}
-
-interface RTCIceCandidatePair {
- local?: RTCIceCandidate;
- remote?: RTCIceCandidate;
-}
-
-interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
- localCandidateId?: string;
- remoteCandidateId?: string;
- state?: string;
- priority?: number;
- nominated?: boolean;
- writable?: boolean;
- readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
- roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
-}
-
-interface RTCIceGatherOptions {
- gatherPolicy?: string;
- iceservers?: RTCIceServer[];
-}
-
-interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
-}
-
-interface RTCIceServer {
- urls?: any;
- username?: string;
- credential?: string;
-}
-
-interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
- bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
- fractionLost?: number;
-}
-
-interface RTCMediaStreamTrackStats extends RTCStats {
- trackIdentifier?: string;
- remoteSource?: boolean;
- ssrcIds?: string[];
- frameWidth?: number;
- frameHeight?: number;
- framesPerSecond?: number;
- framesSent?: number;
- framesReceived?: number;
- framesDecoded?: number;
- framesDropped?: number;
- framesCorrupted?: number;
- audioLevel?: number;
- echoReturnLoss?: number;
- echoReturnLossEnhancement?: number;
-}
-
-interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
- bytesSent?: number;
- targetBitrate?: number;
- roundTripTime?: number;
-}
-
-interface RTCRTPStreamStats extends RTCStats {
- ssrc?: string;
- associateStatsId?: string;
- isRemote?: boolean;
- mediaTrackId?: string;
- transportId?: string;
- codecId?: string;
- firCount?: number;
- pliCount?: number;
- nackCount?: number;
- sliCount?: number;
-}
-
-interface RTCRtcpFeedback {
- type?: string;
- parameter?: string;
-}
-
-interface RTCRtcpParameters {
- ssrc?: number;
- cname?: string;
- reducedSize?: boolean;
- mux?: boolean;
-}
-
-interface RTCRtpCapabilities {
- codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
- fecMechanisms?: string[];
-}
-
-interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
- clockRate?: number;
- preferredPayloadType?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
- options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
- svcMultiStreamSupport?: boolean;
-}
-
-interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
- clockRate?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
-}
-
-interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
- audioLevel?: number;
-}
-
-interface RTCRtpEncodingParameters {
- ssrc?: number;
- codecPayloadType?: number;
- fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
- maxBitrate?: number;
- minQuality?: number;
- framerateBias?: number;
- resolutionScale?: number;
- framerateScale?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
- ssrcRange?: RTCSsrcRange;
-}
-
-interface RTCRtpFecParameters {
- ssrc?: number;
- mechanism?: string;
-}
-
-interface RTCRtpHeaderExtension {
- kind?: string;
- uri?: string;
- preferredId?: number;
- preferredEncrypt?: boolean;
-}
-
-interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
- encrypt?: boolean;
-}
-
-interface RTCRtpParameters {
- muxId?: string;
- codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
- encodings?: RTCRtpEncodingParameters[];
- rtcp?: RTCRtcpParameters;
-}
-
-interface RTCRtpRtxParameters {
- ssrc?: number;
-}
-
-interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
- muxId?: string;
-}
-
-interface RTCSrtpKeyParam {
- keyMethod?: string;
- keySalt?: string;
- lifetime?: string;
- mkiValue?: number;
- mkiLength?: number;
-}
-
-interface RTCSrtpSdesParameters {
- tag?: number;
- cryptoSuite?: string;
- keyParams?: RTCSrtpKeyParam[];
- sessionParams?: string[];
-}
-
-interface RTCSsrcRange {
- min?: number;
- max?: number;
-}
-
-interface RTCStats {
- timestamp?: number;
- type?: string;
- id?: string;
- msType?: string;
-}
-
-interface RTCStatsReport {
-}
-
-interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
- activeConnection?: boolean;
- selectedCandidatePairId?: string;
- localCertificateId?: string;
- remoteCertificateId?: string;
-}
-
-interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
- detailURI?: string;
-}
-
-interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface UIEventInit extends EventInit {
- view?: Window;
- detail?: number;
-}
-
-interface WebGLContextAttributes {
- failIfMajorPerformanceCaveat?: boolean;
- alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
- antialias?: boolean;
- premultipliedAlpha?: boolean;
- preserveDrawingBuffer?: boolean;
-}
-
-interface WebGLContextEventInit extends EventInit {
- statusMessage?: string;
-}
-
-interface WheelEventInit extends MouseEventInit {
- deltaX?: number;
- deltaY?: number;
- deltaZ?: number;
- deltaMode?: number;
-}
-
-interface EventListener {
- (evt: Event): void;
-}
-
-interface ANGLE_instanced_arrays {
- drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
- drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
- vertexAttribDivisorANGLE(index: number, divisor: number): void;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-declare var ANGLE_instanced_arrays: {
- prototype: ANGLE_instanced_arrays;
- new(): ANGLE_instanced_arrays;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-interface AnalyserNode extends AudioNode {
- fftSize: number;
- readonly frequencyBinCount: number;
- maxDecibels: number;
- minDecibels: number;
- smoothingTimeConstant: number;
- getByteFrequencyData(array: Uint8Array): void;
- getByteTimeDomainData(array: Uint8Array): void;
- getFloatFrequencyData(array: Float32Array): void;
- getFloatTimeDomainData(array: Float32Array): void;
-}
-
-declare var AnalyserNode: {
- prototype: AnalyserNode;
- new(): AnalyserNode;
-}
-
-interface AnimationEvent extends Event {
- readonly animationName: string;
- readonly elapsedTime: number;
- initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var AnimationEvent: {
- prototype: AnimationEvent;
- new(): AnimationEvent;
-}
-
-interface ApplicationCacheEventMap {
- "cached": Event;
- "checking": Event;
- "downloading": Event;
- "error": ErrorEvent;
- "noupdate": Event;
- "obsolete": Event;
- "progress": ProgressEvent;
- "updateready": Event;
-}
-
-interface ApplicationCache extends EventTarget {
- oncached: (this: ApplicationCache, ev: Event) => any;
- onchecking: (this: ApplicationCache, ev: Event) => any;
- ondownloading: (this: ApplicationCache, ev: Event) => any;
- onerror: (this: ApplicationCache, ev: ErrorEvent) => any;
- onnoupdate: (this: ApplicationCache, ev: Event) => any;
- onobsolete: (this: ApplicationCache, ev: Event) => any;
- onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
- onupdateready: (this: ApplicationCache, ev: Event) => any;
- readonly status: number;
- abort(): void;
- swapCache(): void;
- update(): void;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
- addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ApplicationCache: {
- prototype: ApplicationCache;
- new(): ApplicationCache;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
-}
-
-interface AriaRequestEvent extends Event {
- readonly attributeName: string;
- attributeValue: string | null;
-}
-
-declare var AriaRequestEvent: {
- prototype: AriaRequestEvent;
- new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
-}
-
-interface Attr extends Node {
- readonly name: string;
- readonly ownerElement: Element;
- readonly prefix: string | null;
- readonly specified: boolean;
- value: string;
-}
-
-declare var Attr: {
- prototype: Attr;
- new(): Attr;
-}
-
-interface AudioBuffer {
- readonly duration: number;
- readonly length: number;
- readonly numberOfChannels: number;
- readonly sampleRate: number;
- copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
- copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
- getChannelData(channel: number): Float32Array;
-}
-
-declare var AudioBuffer: {
- prototype: AudioBuffer;
- new(): AudioBuffer;
-}
-
-interface AudioBufferSourceNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface AudioBufferSourceNode extends AudioNode {
- buffer: AudioBuffer | null;
- readonly detune: AudioParam;
- loop: boolean;
- loopEnd: number;
- loopStart: number;
- onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
- readonly playbackRate: AudioParam;
- start(when?: number, offset?: number, duration?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var AudioBufferSourceNode: {
- prototype: AudioBufferSourceNode;
- new(): AudioBufferSourceNode;
-}
-
-interface AudioContext extends EventTarget {
- readonly currentTime: number;
- readonly destination: AudioDestinationNode;
- readonly listener: AudioListener;
- readonly sampleRate: number;
- state: string;
- createAnalyser(): AnalyserNode;
- createBiquadFilter(): BiquadFilterNode;
- createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
- createBufferSource(): AudioBufferSourceNode;
- createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
- createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
- createConvolver(): ConvolverNode;
- createDelay(maxDelayTime?: number): DelayNode;
- createDynamicsCompressor(): DynamicsCompressorNode;
- createGain(): GainNode;
- createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
- createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
- createOscillator(): OscillatorNode;
- createPanner(): PannerNode;
- createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
- createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
- createStereoPanner(): StereoPannerNode;
- createWaveShaper(): WaveShaperNode;
- decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
-}
-
-declare var AudioContext: {
- prototype: AudioContext;
- new(): AudioContext;
-}
-
-interface AudioDestinationNode extends AudioNode {
- readonly maxChannelCount: number;
-}
-
-declare var AudioDestinationNode: {
- prototype: AudioDestinationNode;
- new(): AudioDestinationNode;
-}
-
-interface AudioListener {
- dopplerFactor: number;
- speedOfSound: number;
- setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var AudioListener: {
- prototype: AudioListener;
- new(): AudioListener;
-}
-
-interface AudioNode extends EventTarget {
- channelCount: number;
- channelCountMode: string;
- channelInterpretation: string;
- readonly context: AudioContext;
- readonly numberOfInputs: number;
- readonly numberOfOutputs: number;
- connect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(output?: number): void;
- disconnect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(destination: AudioParam, output?: number): void;
-}
-
-declare var AudioNode: {
- prototype: AudioNode;
- new(): AudioNode;
-}
-
-interface AudioParam {
- readonly defaultValue: number;
- value: number;
- cancelScheduledValues(startTime: number): void;
- exponentialRampToValueAtTime(value: number, endTime: number): void;
- linearRampToValueAtTime(value: number, endTime: number): void;
- setTargetAtTime(target: number, startTime: number, timeConstant: number): void;
- setValueAtTime(value: number, startTime: number): void;
- setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;
-}
-
-declare var AudioParam: {
- prototype: AudioParam;
- new(): AudioParam;
-}
-
-interface AudioProcessingEvent extends Event {
- readonly inputBuffer: AudioBuffer;
- readonly outputBuffer: AudioBuffer;
- readonly playbackTime: number;
-}
-
-declare var AudioProcessingEvent: {
- prototype: AudioProcessingEvent;
- new(): AudioProcessingEvent;
-}
-
-interface AudioTrack {
- enabled: boolean;
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var AudioTrack: {
- prototype: AudioTrack;
- new(): AudioTrack;
-}
-
-interface AudioTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface AudioTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
- onchange: (this: AudioTrackList, ev: Event) => any;
- onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
- getTrackById(id: string): AudioTrack | null;
- item(index: number): AudioTrack;
- addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: AudioTrack;
-}
-
-declare var AudioTrackList: {
- prototype: AudioTrackList;
- new(): AudioTrackList;
-}
-
-interface BarProp {
- readonly visible: boolean;
-}
-
-declare var BarProp: {
- prototype: BarProp;
- new(): BarProp;
-}
-
-interface BeforeUnloadEvent extends Event {
- returnValue: any;
-}
-
-declare var BeforeUnloadEvent: {
- prototype: BeforeUnloadEvent;
- new(): BeforeUnloadEvent;
-}
-
-interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- readonly gain: AudioParam;
- type: string;
- getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
-}
-
-declare var BiquadFilterNode: {
- prototype: BiquadFilterNode;
- new(): BiquadFilterNode;
-}
-
-interface Blob {
- readonly size: number;
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
- slice(start?: number, end?: number, contentType?: string): Blob;
-}
-
-declare var Blob: {
- prototype: Blob;
- new (blobParts?: any[], options?: BlobPropertyBag): Blob;
-}
-
-interface CDATASection extends Text {
-}
-
-declare var CDATASection: {
- prototype: CDATASection;
- new(): CDATASection;
-}
-
-interface CSS {
- supports(property: string, value?: string): boolean;
-}
-declare var CSS: CSS;
-
-interface CSSConditionRule extends CSSGroupingRule {
- conditionText: string;
-}
-
-declare var CSSConditionRule: {
- prototype: CSSConditionRule;
- new(): CSSConditionRule;
-}
-
-interface CSSFontFaceRule extends CSSRule {
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSFontFaceRule: {
- prototype: CSSFontFaceRule;
- new(): CSSFontFaceRule;
-}
-
-interface CSSGroupingRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- deleteRule(index: number): void;
- insertRule(rule: string, index: number): number;
-}
-
-declare var CSSGroupingRule: {
- prototype: CSSGroupingRule;
- new(): CSSGroupingRule;
-}
-
-interface CSSImportRule extends CSSRule {
- readonly href: string;
- readonly media: MediaList;
- readonly styleSheet: CSSStyleSheet;
-}
-
-declare var CSSImportRule: {
- prototype: CSSImportRule;
- new(): CSSImportRule;
-}
-
-interface CSSKeyframeRule extends CSSRule {
- keyText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSKeyframeRule: {
- prototype: CSSKeyframeRule;
- new(): CSSKeyframeRule;
-}
-
-interface CSSKeyframesRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- name: string;
- appendRule(rule: string): void;
- deleteRule(rule: string): void;
- findRule(rule: string): CSSKeyframeRule;
-}
-
-declare var CSSKeyframesRule: {
- prototype: CSSKeyframesRule;
- new(): CSSKeyframesRule;
-}
-
-interface CSSMediaRule extends CSSConditionRule {
- readonly media: MediaList;
-}
-
-declare var CSSMediaRule: {
- prototype: CSSMediaRule;
- new(): CSSMediaRule;
-}
-
-interface CSSNamespaceRule extends CSSRule {
- readonly namespaceURI: string;
- readonly prefix: string;
-}
-
-declare var CSSNamespaceRule: {
- prototype: CSSNamespaceRule;
- new(): CSSNamespaceRule;
-}
-
-interface CSSPageRule extends CSSRule {
- readonly pseudoClass: string;
- readonly selector: string;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSPageRule: {
- prototype: CSSPageRule;
- new(): CSSPageRule;
-}
-
-interface CSSRule {
- cssText: string;
- readonly parentRule: CSSRule;
- readonly parentStyleSheet: CSSStyleSheet;
- readonly type: number;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-declare var CSSRule: {
- prototype: CSSRule;
- new(): CSSRule;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-interface CSSRuleList {
- readonly length: number;
- item(index: number): CSSRule;
- [index: number]: CSSRule;
-}
-
-declare var CSSRuleList: {
- prototype: CSSRuleList;
- new(): CSSRuleList;
-}
-
-interface CSSStyleDeclaration {
- alignContent: string | null;
- alignItems: string | null;
- alignSelf: string | null;
- alignmentBaseline: string | null;
- animation: string | null;
- animationDelay: string | null;
- animationDirection: string | null;
- animationDuration: string | null;
- animationFillMode: string | null;
- animationIterationCount: string | null;
- animationName: string | null;
- animationPlayState: string | null;
- animationTimingFunction: string | null;
- backfaceVisibility: string | null;
- background: string | null;
- backgroundAttachment: string | null;
- backgroundClip: string | null;
- backgroundColor: string | null;
- backgroundImage: string | null;
- backgroundOrigin: string | null;
- backgroundPosition: string | null;
- backgroundPositionX: string | null;
- backgroundPositionY: string | null;
- backgroundRepeat: string | null;
- backgroundSize: string | null;
- baselineShift: string | null;
- border: string | null;
- borderBottom: string | null;
- borderBottomColor: string | null;
- borderBottomLeftRadius: string | null;
- borderBottomRightRadius: string | null;
- borderBottomStyle: string | null;
- borderBottomWidth: string | null;
- borderCollapse: string | null;
- borderColor: string | null;
- borderImage: string | null;
- borderImageOutset: string | null;
- borderImageRepeat: string | null;
- borderImageSlice: string | null;
- borderImageSource: string | null;
- borderImageWidth: string | null;
- borderLeft: string | null;
- borderLeftColor: string | null;
- borderLeftStyle: string | null;
- borderLeftWidth: string | null;
- borderRadius: string | null;
- borderRight: string | null;
- borderRightColor: string | null;
- borderRightStyle: string | null;
- borderRightWidth: string | null;
- borderSpacing: string | null;
- borderStyle: string | null;
- borderTop: string | null;
- borderTopColor: string | null;
- borderTopLeftRadius: string | null;
- borderTopRightRadius: string | null;
- borderTopStyle: string | null;
- borderTopWidth: string | null;
- borderWidth: string | null;
- bottom: string | null;
- boxShadow: string | null;
- boxSizing: string | null;
- breakAfter: string | null;
- breakBefore: string | null;
- breakInside: string | null;
- captionSide: string | null;
- clear: string | null;
- clip: string | null;
- clipPath: string | null;
- clipRule: string | null;
- color: string | null;
- colorInterpolationFilters: string | null;
- columnCount: any;
- columnFill: string | null;
- columnGap: any;
- columnRule: string | null;
- columnRuleColor: any;
- columnRuleStyle: string | null;
- columnRuleWidth: any;
- columnSpan: string | null;
- columnWidth: any;
- columns: string | null;
- content: string | null;
- counterIncrement: string | null;
- counterReset: string | null;
- cssFloat: string | null;
- cssText: string;
- cursor: string | null;
- direction: string | null;
- display: string | null;
- dominantBaseline: string | null;
- emptyCells: string | null;
- enableBackground: string | null;
- fill: string | null;
- fillOpacity: string | null;
- fillRule: string | null;
- filter: string | null;
- flex: string | null;
- flexBasis: string | null;
- flexDirection: string | null;
- flexFlow: string | null;
- flexGrow: string | null;
- flexShrink: string | null;
- flexWrap: string | null;
- floodColor: string | null;
- floodOpacity: string | null;
- font: string | null;
- fontFamily: string | null;
- fontFeatureSettings: string | null;
- fontSize: string | null;
- fontSizeAdjust: string | null;
- fontStretch: string | null;
- fontStyle: string | null;
- fontVariant: string | null;
- fontWeight: string | null;
- glyphOrientationHorizontal: string | null;
- glyphOrientationVertical: string | null;
- height: string | null;
- imeMode: string | null;
- justifyContent: string | null;
- kerning: string | null;
- left: string | null;
- readonly length: number;
- letterSpacing: string | null;
- lightingColor: string | null;
- lineHeight: string | null;
- listStyle: string | null;
- listStyleImage: string | null;
- listStylePosition: string | null;
- listStyleType: string | null;
- margin: string | null;
- marginBottom: string | null;
- marginLeft: string | null;
- marginRight: string | null;
- marginTop: string | null;
- marker: string | null;
- markerEnd: string | null;
- markerMid: string | null;
- markerStart: string | null;
- mask: string | null;
- maxHeight: string | null;
- maxWidth: string | null;
- minHeight: string | null;
- minWidth: string | null;
- msContentZoomChaining: string | null;
- msContentZoomLimit: string | null;
- msContentZoomLimitMax: any;
- msContentZoomLimitMin: any;
- msContentZoomSnap: string | null;
- msContentZoomSnapPoints: string | null;
- msContentZoomSnapType: string | null;
- msContentZooming: string | null;
- msFlowFrom: string | null;
- msFlowInto: string | null;
- msFontFeatureSettings: string | null;
- msGridColumn: any;
- msGridColumnAlign: string | null;
- msGridColumnSpan: any;
- msGridColumns: string | null;
- msGridRow: any;
- msGridRowAlign: string | null;
- msGridRowSpan: any;
- msGridRows: string | null;
- msHighContrastAdjust: string | null;
- msHyphenateLimitChars: string | null;
- msHyphenateLimitLines: any;
- msHyphenateLimitZone: any;
- msHyphens: string | null;
- msImeAlign: string | null;
- msOverflowStyle: string | null;
- msScrollChaining: string | null;
- msScrollLimit: string | null;
- msScrollLimitXMax: any;
- msScrollLimitXMin: any;
- msScrollLimitYMax: any;
- msScrollLimitYMin: any;
- msScrollRails: string | null;
- msScrollSnapPointsX: string | null;
- msScrollSnapPointsY: string | null;
- msScrollSnapType: string | null;
- msScrollSnapX: string | null;
- msScrollSnapY: string | null;
- msScrollTranslation: string | null;
- msTextCombineHorizontal: string | null;
- msTextSizeAdjust: any;
- msTouchAction: string | null;
- msTouchSelect: string | null;
- msUserSelect: string | null;
- msWrapFlow: string;
- msWrapMargin: any;
- msWrapThrough: string;
- opacity: string | null;
- order: string | null;
- orphans: string | null;
- outline: string | null;
- outlineColor: string | null;
- outlineStyle: string | null;
- outlineWidth: string | null;
- overflow: string | null;
- overflowX: string | null;
- overflowY: string | null;
- padding: string | null;
- paddingBottom: string | null;
- paddingLeft: string | null;
- paddingRight: string | null;
- paddingTop: string | null;
- pageBreakAfter: string | null;
- pageBreakBefore: string | null;
- pageBreakInside: string | null;
- readonly parentRule: CSSRule;
- perspective: string | null;
- perspectiveOrigin: string | null;
- pointerEvents: string | null;
- position: string | null;
- quotes: string | null;
- right: string | null;
- rubyAlign: string | null;
- rubyOverhang: string | null;
- rubyPosition: string | null;
- stopColor: string | null;
- stopOpacity: string | null;
- stroke: string | null;
- strokeDasharray: string | null;
- strokeDashoffset: string | null;
- strokeLinecap: string | null;
- strokeLinejoin: string | null;
- strokeMiterlimit: string | null;
- strokeOpacity: string | null;
- strokeWidth: string | null;
- tableLayout: string | null;
- textAlign: string | null;
- textAlignLast: string | null;
- textAnchor: string | null;
- textDecoration: string | null;
- textIndent: string | null;
- textJustify: string | null;
- textKashida: string | null;
- textKashidaSpace: string | null;
- textOverflow: string | null;
- textShadow: string | null;
- textTransform: string | null;
- textUnderlinePosition: string | null;
- top: string | null;
- touchAction: string | null;
- transform: string | null;
- transformOrigin: string | null;
- transformStyle: string | null;
- transition: string | null;
- transitionDelay: string | null;
- transitionDuration: string | null;
- transitionProperty: string | null;
- transitionTimingFunction: string | null;
- unicodeBidi: string | null;
- verticalAlign: string | null;
- visibility: string | null;
- webkitAlignContent: string | null;
- webkitAlignItems: string | null;
- webkitAlignSelf: string | null;
- webkitAnimation: string | null;
- webkitAnimationDelay: string | null;
- webkitAnimationDirection: string | null;
- webkitAnimationDuration: string | null;
- webkitAnimationFillMode: string | null;
- webkitAnimationIterationCount: string | null;
- webkitAnimationName: string | null;
- webkitAnimationPlayState: string | null;
- webkitAnimationTimingFunction: string | null;
- webkitAppearance: string | null;
- webkitBackfaceVisibility: string | null;
- webkitBackgroundClip: string | null;
- webkitBackgroundOrigin: string | null;
- webkitBackgroundSize: string | null;
- webkitBorderBottomLeftRadius: string | null;
- webkitBorderBottomRightRadius: string | null;
- webkitBorderImage: string | null;
- webkitBorderRadius: string | null;
- webkitBorderTopLeftRadius: string | null;
- webkitBorderTopRightRadius: string | null;
- webkitBoxAlign: string | null;
- webkitBoxDirection: string | null;
- webkitBoxFlex: string | null;
- webkitBoxOrdinalGroup: string | null;
- webkitBoxOrient: string | null;
- webkitBoxPack: string | null;
- webkitBoxSizing: string | null;
- webkitColumnBreakAfter: string | null;
- webkitColumnBreakBefore: string | null;
- webkitColumnBreakInside: string | null;
- webkitColumnCount: any;
- webkitColumnGap: any;
- webkitColumnRule: string | null;
- webkitColumnRuleColor: any;
- webkitColumnRuleStyle: string | null;
- webkitColumnRuleWidth: any;
- webkitColumnSpan: string | null;
- webkitColumnWidth: any;
- webkitColumns: string | null;
- webkitFilter: string | null;
- webkitFlex: string | null;
- webkitFlexBasis: string | null;
- webkitFlexDirection: string | null;
- webkitFlexFlow: string | null;
- webkitFlexGrow: string | null;
- webkitFlexShrink: string | null;
- webkitFlexWrap: string | null;
- webkitJustifyContent: string | null;
- webkitOrder: string | null;
- webkitPerspective: string | null;
- webkitPerspectiveOrigin: string | null;
- webkitTapHighlightColor: string | null;
- webkitTextFillColor: string | null;
- webkitTextSizeAdjust: any;
- webkitTransform: string | null;
- webkitTransformOrigin: string | null;
- webkitTransformStyle: string | null;
- webkitTransition: string | null;
- webkitTransitionDelay: string | null;
- webkitTransitionDuration: string | null;
- webkitTransitionProperty: string | null;
- webkitTransitionTimingFunction: string | null;
- webkitUserModify: string | null;
- webkitUserSelect: string | null;
- webkitWritingMode: string | null;
- whiteSpace: string | null;
- widows: string | null;
- width: string | null;
- wordBreak: string | null;
- wordSpacing: string | null;
- wordWrap: string | null;
- writingMode: string | null;
- zIndex: string | null;
- zoom: string | null;
- resize: string | null;
- getPropertyPriority(propertyName: string): string;
- getPropertyValue(propertyName: string): string;
- item(index: number): string;
- removeProperty(propertyName: string): string;
- setProperty(propertyName: string, value: string | null, priority?: string): void;
- [index: number]: string;
-}
-
-declare var CSSStyleDeclaration: {
- prototype: CSSStyleDeclaration;
- new(): CSSStyleDeclaration;
-}
-
-interface CSSStyleRule extends CSSRule {
- readonly readOnly: boolean;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSStyleRule: {
- prototype: CSSStyleRule;
- new(): CSSStyleRule;
-}
-
-interface CSSStyleSheet extends StyleSheet {
- readonly cssRules: CSSRuleList;
- cssText: string;
- readonly href: string;
- readonly id: string;
- readonly imports: StyleSheetList;
- readonly isAlternate: boolean;
- readonly isPrefAlternate: boolean;
- readonly ownerRule: CSSRule;
- readonly owningElement: Element;
- readonly pages: StyleSheetPageList;
- readonly readOnly: boolean;
- readonly rules: CSSRuleList;
- addImport(bstrURL: string, lIndex?: number): number;
- addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
- addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
- deleteRule(index?: number): void;
- insertRule(rule: string, index?: number): number;
- removeImport(lIndex: number): void;
- removeRule(lIndex: number): void;
-}
-
-declare var CSSStyleSheet: {
- prototype: CSSStyleSheet;
- new(): CSSStyleSheet;
-}
-
-interface CSSSupportsRule extends CSSConditionRule {
-}
-
-declare var CSSSupportsRule: {
- prototype: CSSSupportsRule;
- new(): CSSSupportsRule;
-}
-
-interface CanvasGradient {
- addColorStop(offset: number, color: string): void;
-}
-
-declare var CanvasGradient: {
- prototype: CanvasGradient;
- new(): CanvasGradient;
-}
-
-interface CanvasPattern {
- setTransform(matrix: SVGMatrix): void;
-}
-
-declare var CanvasPattern: {
- prototype: CanvasPattern;
- new(): CanvasPattern;
-}
-
-interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
- readonly canvas: HTMLCanvasElement;
- fillStyle: string | CanvasGradient | CanvasPattern;
- font: string;
- globalAlpha: number;
- globalCompositeOperation: string;
- lineCap: string;
- lineDashOffset: number;
- lineJoin: string;
- lineWidth: number;
- miterLimit: number;
- msFillRule: string;
- msImageSmoothingEnabled: boolean;
- shadowBlur: number;
- shadowColor: string;
- shadowOffsetX: number;
- shadowOffsetY: number;
- strokeStyle: string | CanvasGradient | CanvasPattern;
- textAlign: string;
- textBaseline: string;
- mozImageSmoothingEnabled: boolean;
- webkitImageSmoothingEnabled: boolean;
- oImageSmoothingEnabled: boolean;
- beginPath(): void;
- clearRect(x: number, y: number, w: number, h: number): void;
- clip(fillRule?: string): void;
- createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
- createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
- createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
- createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
- drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
- fill(fillRule?: string): void;
- fillRect(x: number, y: number, w: number, h: number): void;
- fillText(text: string, x: number, y: number, maxWidth?: number): void;
- getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
- getLineDash(): number[];
- isPointInPath(x: number, y: number, fillRule?: string): boolean;
- measureText(text: string): TextMetrics;
- putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
- restore(): void;
- rotate(angle: number): void;
- save(): void;
- scale(x: number, y: number): void;
- setLineDash(segments: number[]): void;
- setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- stroke(): void;
- strokeRect(x: number, y: number, w: number, h: number): void;
- strokeText(text: string, x: number, y: number, maxWidth?: number): void;
- transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- translate(x: number, y: number): void;
-}
-
-declare var CanvasRenderingContext2D: {
- prototype: CanvasRenderingContext2D;
- new(): CanvasRenderingContext2D;
-}
-
-interface ChannelMergerNode extends AudioNode {
-}
-
-declare var ChannelMergerNode: {
- prototype: ChannelMergerNode;
- new(): ChannelMergerNode;
-}
-
-interface ChannelSplitterNode extends AudioNode {
-}
-
-declare var ChannelSplitterNode: {
- prototype: ChannelSplitterNode;
- new(): ChannelSplitterNode;
-}
-
-interface CharacterData extends Node, ChildNode {
- data: string;
- readonly length: number;
- appendData(arg: string): void;
- deleteData(offset: number, count: number): void;
- insertData(offset: number, arg: string): void;
- replaceData(offset: number, count: number, arg: string): void;
- substringData(offset: number, count: number): string;
-}
-
-declare var CharacterData: {
- prototype: CharacterData;
- new(): CharacterData;
-}
-
-interface ClientRect {
- bottom: number;
- readonly height: number;
- left: number;
- right: number;
- top: number;
- readonly width: number;
-}
-
-declare var ClientRect: {
- prototype: ClientRect;
- new(): ClientRect;
-}
-
-interface ClientRectList {
- readonly length: number;
- item(index: number): ClientRect;
- [index: number]: ClientRect;
-}
-
-declare var ClientRectList: {
- prototype: ClientRectList;
- new(): ClientRectList;
-}
-
-interface ClipboardEvent extends Event {
- readonly clipboardData: DataTransfer;
-}
-
-declare var ClipboardEvent: {
- prototype: ClipboardEvent;
- new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
-}
-
-interface CloseEvent extends Event {
- readonly code: number;
- readonly reason: string;
- readonly wasClean: boolean;
- initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
-}
-
-declare var CloseEvent: {
- prototype: CloseEvent;
- new(): CloseEvent;
-}
-
-interface CommandEvent extends Event {
- readonly commandName: string;
- readonly detail: string | null;
-}
-
-declare var CommandEvent: {
- prototype: CommandEvent;
- new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
-}
-
-interface Comment extends CharacterData {
- text: string;
-}
-
-declare var Comment: {
- prototype: Comment;
- new(): Comment;
-}
-
-interface CompositionEvent extends UIEvent {
- readonly data: string;
- readonly locale: string;
- initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
-}
-
-declare var CompositionEvent: {
- prototype: CompositionEvent;
- new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
-}
-
-interface Console {
- assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
- clear(): void;
- count(countTitle?: string): void;
- debug(message?: string, ...optionalParams: any[]): void;
- dir(value?: any, ...optionalParams: any[]): void;
- dirxml(value: any): void;
- error(message?: any, ...optionalParams: any[]): void;
- exception(message?: string, ...optionalParams: any[]): void;
- group(groupTitle?: string): void;
- groupCollapsed(groupTitle?: string): void;
- groupEnd(): void;
- info(message?: any, ...optionalParams: any[]): void;
- log(message?: any, ...optionalParams: any[]): void;
- msIsIndependentlyComposed(element: Element): boolean;
- profile(reportName?: string): void;
- profileEnd(): void;
- select(element: Element): void;
- table(...data: any[]): void;
- time(timerName?: string): void;
- timeEnd(timerName?: string): void;
- trace(message?: any, ...optionalParams: any[]): void;
- warn(message?: any, ...optionalParams: any[]): void;
-}
-
-declare var Console: {
- prototype: Console;
- new(): Console;
-}
-
-interface ConvolverNode extends AudioNode {
- buffer: AudioBuffer | null;
- normalize: boolean;
-}
-
-declare var ConvolverNode: {
- prototype: ConvolverNode;
- new(): ConvolverNode;
-}
-
-interface Coordinates {
- readonly accuracy: number;
- readonly altitude: number | null;
- readonly altitudeAccuracy: number | null;
- readonly heading: number | null;
- readonly latitude: number;
- readonly longitude: number;
- readonly speed: number | null;
-}
-
-declare var Coordinates: {
- prototype: Coordinates;
- new(): Coordinates;
-}
-
-interface Crypto extends Object, RandomSource {
- readonly subtle: SubtleCrypto;
-}
-
-declare var Crypto: {
- prototype: Crypto;
- new(): Crypto;
-}
-
-interface CryptoKey {
- readonly algorithm: KeyAlgorithm;
- readonly extractable: boolean;
- readonly type: string;
- readonly usages: string[];
-}
-
-declare var CryptoKey: {
- prototype: CryptoKey;
- new(): CryptoKey;
-}
-
-interface CryptoKeyPair {
- privateKey: CryptoKey;
- publicKey: CryptoKey;
-}
-
-declare var CryptoKeyPair: {
- prototype: CryptoKeyPair;
- new(): CryptoKeyPair;
-}
-
-interface CustomEvent extends Event {
- readonly detail: any;
- initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
-}
-
-declare var CustomEvent: {
- prototype: CustomEvent;
- new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
-}
-
-interface DOMError {
- readonly name: string;
- toString(): string;
-}
-
-declare var DOMError: {
- prototype: DOMError;
- new(): DOMError;
-}
-
-interface DOMException {
- readonly code: number;
- readonly message: string;
- readonly name: string;
- toString(): string;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-declare var DOMException: {
- prototype: DOMException;
- new(): DOMException;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-interface DOMImplementation {
- createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;
- createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;
- createHTMLDocument(title: string): Document;
- hasFeature(feature: string | null, version: string | null): boolean;
-}
-
-declare var DOMImplementation: {
- prototype: DOMImplementation;
- new(): DOMImplementation;
-}
-
-interface DOMParser {
- parseFromString(source: string, mimeType: string): Document;
-}
-
-declare var DOMParser: {
- prototype: DOMParser;
- new(): DOMParser;
-}
-
-interface DOMSettableTokenList extends DOMTokenList {
- value: string;
-}
-
-declare var DOMSettableTokenList: {
- prototype: DOMSettableTokenList;
- new(): DOMSettableTokenList;
-}
-
-interface DOMStringList {
- readonly length: number;
- contains(str: string): boolean;
- item(index: number): string | null;
- [index: number]: string;
-}
-
-declare var DOMStringList: {
- prototype: DOMStringList;
- new(): DOMStringList;
-}
-
-interface DOMStringMap {
- [name: string]: string;
-}
-
-declare var DOMStringMap: {
- prototype: DOMStringMap;
- new(): DOMStringMap;
-}
-
-interface DOMTokenList {
- readonly length: number;
- add(...token: string[]): void;
- contains(token: string): boolean;
- item(index: number): string;
- remove(...token: string[]): void;
- toString(): string;
- toggle(token: string, force?: boolean): boolean;
- [index: number]: string;
-}
-
-declare var DOMTokenList: {
- prototype: DOMTokenList;
- new(): DOMTokenList;
-}
-
-interface DataCue extends TextTrackCue {
- data: ArrayBuffer;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var DataCue: {
- prototype: DataCue;
- new(): DataCue;
-}
-
-interface DataTransfer {
- dropEffect: string;
- effectAllowed: string;
- readonly files: FileList;
- readonly items: DataTransferItemList;
- readonly types: string[];
- clearData(format?: string): boolean;
- getData(format: string): string;
- setData(format: string, data: string): boolean;
-}
-
-declare var DataTransfer: {
- prototype: DataTransfer;
- new(): DataTransfer;
-}
-
-interface DataTransferItem {
- readonly kind: string;
- readonly type: string;
- getAsFile(): File | null;
- getAsString(_callback: FunctionStringCallback | null): void;
-}
-
-declare var DataTransferItem: {
- prototype: DataTransferItem;
- new(): DataTransferItem;
-}
-
-interface DataTransferItemList {
- readonly length: number;
- add(data: File): DataTransferItem | null;
- clear(): void;
- item(index: number): DataTransferItem;
- remove(index: number): void;
- [index: number]: DataTransferItem;
-}
-
-declare var DataTransferItemList: {
- prototype: DataTransferItemList;
- new(): DataTransferItemList;
-}
-
-interface DeferredPermissionRequest {
- readonly id: number;
- readonly type: string;
- readonly uri: string;
- allow(): void;
- deny(): void;
-}
-
-declare var DeferredPermissionRequest: {
- prototype: DeferredPermissionRequest;
- new(): DeferredPermissionRequest;
-}
-
-interface DelayNode extends AudioNode {
- readonly delayTime: AudioParam;
-}
-
-declare var DelayNode: {
- prototype: DelayNode;
- new(): DelayNode;
-}
-
-interface DeviceAcceleration {
- readonly x: number | null;
- readonly y: number | null;
- readonly z: number | null;
-}
-
-declare var DeviceAcceleration: {
- prototype: DeviceAcceleration;
- new(): DeviceAcceleration;
-}
-
-interface DeviceLightEvent extends Event {
- readonly value: number;
-}
-
-declare var DeviceLightEvent: {
- prototype: DeviceLightEvent;
- new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
-
-interface DeviceMotionEvent extends Event {
- readonly acceleration: DeviceAcceleration | null;
- readonly accelerationIncludingGravity: DeviceAcceleration | null;
- readonly interval: number | null;
- readonly rotationRate: DeviceRotationRate | null;
- initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
-}
-
-declare var DeviceMotionEvent: {
- prototype: DeviceMotionEvent;
- new(): DeviceMotionEvent;
-}
-
-interface DeviceOrientationEvent extends Event {
- readonly absolute: boolean;
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
- initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
-}
-
-declare var DeviceOrientationEvent: {
- prototype: DeviceOrientationEvent;
- new(): DeviceOrientationEvent;
-}
-
-interface DeviceRotationRate {
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
-}
-
-declare var DeviceRotationRate: {
- prototype: DeviceRotationRate;
- new(): DeviceRotationRate;
-}
-
-interface DocumentEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforedeactivate": UIEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "fullscreenchange": Event;
- "fullscreenerror": Event;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "mssitemodejumplistitemremoved": MSSiteModeEvent;
- "msthumbnailclick": MSSiteModeEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "pointerlockchange": Event;
- "pointerlockerror": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectionchange": Event;
- "selectstart": Event;
- "stalled": Event;
- "stop": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "volumechange": Event;
- "waiting": Event;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
- /**
- * Sets or gets the URL for the current document.
- */
- readonly URL: string;
- /**
- * Gets the URL for the document, stripped of any character encoding.
- */
- readonly URLUnencoded: string;
- /**
- * Gets the object that has the focus when the parent document has focus.
- */
- readonly activeElement: Element;
- /**
- * Sets or gets the color of all active links in the document.
- */
- alinkColor: string;
- /**
- * Returns a reference to the collection of elements contained by the object.
- */
- readonly all: HTMLAllCollection;
- /**
- * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
- */
- anchors: HTMLCollectionOf<HTMLAnchorElement>;
- /**
- * Retrieves a collection of all applet objects in the document.
- */
- applets: HTMLCollectionOf<HTMLAppletElement>;
- /**
- * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
- */
- bgColor: string;
- /**
- * Specifies the beginning and end of the document body.
- */
- body: HTMLElement;
- readonly characterSet: string;
- /**
- * Gets or sets the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets a value that indicates whether standards-compliant mode is switched on for the object.
- */
- readonly compatMode: string;
- cookie: string;
- readonly currentScript: HTMLScriptElement | SVGScriptElement;
- /**
- * Gets the default character set from the current regional language settings.
- */
- readonly defaultCharset: string;
- readonly defaultView: Window;
- /**
- * Sets or gets a value that indicates whether the document can be edited.
- */
- designMode: string;
- /**
- * Sets or retrieves a value that indicates the reading order of the object.
- */
- dir: string;
- /**
- * Gets an object representing the document type declaration associated with the current document.
- */
- readonly doctype: DocumentType;
- /**
- * Gets a reference to the root node of the document.
- */
- documentElement: HTMLElement;
- /**
- * Sets or gets the security domain of the document.
- */
- domain: string;
- /**
- * Retrieves a collection of all embed objects in the document.
- */
- embeds: HTMLCollectionOf<HTMLEmbedElement>;
- /**
- * Sets or gets the foreground (text) color of the document.
- */
- fgColor: string;
- /**
- * Retrieves a collection, in source order, of all form objects in the document.
- */
- forms: HTMLCollectionOf<HTMLFormElement>;
- readonly fullscreenElement: Element | null;
- readonly fullscreenEnabled: boolean;
- readonly head: HTMLHeadElement;
- readonly hidden: boolean;
- /**
- * Retrieves a collection, in source order, of img objects in the document.
- */
- images: HTMLCollectionOf<HTMLImageElement>;
- /**
- * Gets the implementation object of the current document.
- */
- readonly implementation: DOMImplementation;
- /**
- * Returns the character encoding used to create the webpage that is loaded into the document object.
- */
- readonly inputEncoding: string | null;
- /**
- * Gets the date that the page was last modified, if the page supplies one.
- */
- readonly lastModified: string;
- /**
- * Sets or gets the color of the document links.
- */
- linkColor: string;
- /**
- * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
- */
- links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
- /**
- * Contains information about the current URL.
- */
- readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
- msCapsLockWarningOff: boolean;
- /**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
- onabort: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object is set as the active element.
- * @param ev The event.
- */
- onactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the object is set as the active element.
- * @param ev The event.
- */
- onbeforeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
- * @param ev The event.
- */
- onbeforedeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object loses the input focus.
- * @param ev The focus event.
- */
- onblur: (this: Document, ev: FocusEvent) => any;
- /**
- * Occurs when playback is possible, but would require further buffering.
- * @param ev The event.
- */
- oncanplay: (this: Document, ev: Event) => any;
- oncanplaythrough: (this: Document, ev: Event) => any;
- /**
- * Fires when the contents of the object or selection have changed.
- * @param ev The event.
- */
- onchange: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the left mouse button on the object
- * @param ev The mouse event.
- */
- onclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user clicks the right mouse button in the client area, opening the context menu.
- * @param ev The mouse event.
- */
- oncontextmenu: (this: Document, ev: PointerEvent) => any;
- /**
- * Fires when the user double-clicks the object.
- * @param ev The mouse event.
- */
- ondblclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the activeElement is changed from the current object to another object in the parent document.
- * @param ev The UI Event
- */
- ondeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires on the source object continuously during a drag operation.
- * @param ev The event.
- */
- ondrag: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user releases the mouse at the close of a drag operation.
- * @param ev The event.
- */
- ondragend: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element when the user drags the object to a valid drop target.
- * @param ev The drag event.
- */
- ondragenter: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
- * @param ev The drag event.
- */
- ondragleave: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element continuously while the user drags the object over a valid drop target.
- * @param ev The event.
- */
- ondragover: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user starts to drag a text selection or selected object.
- * @param ev The event.
- */
- ondragstart: (this: Document, ev: DragEvent) => any;
- ondrop: (this: Document, ev: DragEvent) => any;
- /**
- * Occurs when the duration attribute is updated.
- * @param ev The event.
- */
- ondurationchange: (this: Document, ev: Event) => any;
- /**
- * Occurs when the media element is reset to its initial state.
- * @param ev The event.
- */
- onemptied: (this: Document, ev: Event) => any;
- /**
- * Occurs when the end of playback is reached.
- * @param ev The event
- */
- onended: (this: Document, ev: MediaStreamErrorEvent) => any;
- /**
- * Fires when an error occurs during object loading.
- * @param ev The event.
- */
- onerror: (this: Document, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- * @param ev The event.
- */
- onfocus: (this: Document, ev: FocusEvent) => any;
- onfullscreenchange: (this: Document, ev: Event) => any;
- onfullscreenerror: (this: Document, ev: Event) => any;
- oninput: (this: Document, ev: Event) => any;
- oninvalid: (this: Document, ev: Event) => any;
- /**
- * Fires when the user presses a key.
- * @param ev The keyboard event
- */
- onkeydown: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user presses an alphanumeric key.
- * @param ev The event.
- */
- onkeypress: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user releases a key.
- * @param ev The keyboard event
- */
- onkeyup: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires immediately after the browser loads the object.
- * @param ev The event.
- */
- onload: (this: Document, ev: Event) => any;
- /**
- * Occurs when media data is loaded at the current playback position.
- * @param ev The event.
- */
- onloadeddata: (this: Document, ev: Event) => any;
- /**
- * Occurs when the duration and dimensions of the media have been determined.
- * @param ev The event.
- */
- onloadedmetadata: (this: Document, ev: Event) => any;
- /**
- * Occurs when Internet Explorer begins looking for media data.
- * @param ev The event.
- */
- onloadstart: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the object with either mouse button.
- * @param ev The mouse event.
- */
- onmousedown: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse over the object.
- * @param ev The mouse event.
- */
- onmousemove: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer outside the boundaries of the object.
- * @param ev The mouse event.
- */
- onmouseout: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer into the object.
- * @param ev The mouse event.
- */
- onmouseover: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user releases a mouse button while the mouse is over the object.
- * @param ev The mouse event.
- */
- onmouseup: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the wheel button is rotated.
- * @param ev The mouse event
- */
- onmousewheel: (this: Document, ev: WheelEvent) => any;
- onmscontentzoom: (this: Document, ev: UIEvent) => any;
- onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
- onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
- onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
- onmspointermove: (this: Document, ev: MSPointerEvent) => any;
- onmspointerout: (this: Document, ev: MSPointerEvent) => any;
- onmspointerover: (this: Document, ev: MSPointerEvent) => any;
- onmspointerup: (this: Document, ev: MSPointerEvent) => any;
- /**
- * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when playback is paused.
- * @param ev The event.
- */
- onpause: (this: Document, ev: Event) => any;
- /**
- * Occurs when the play method is requested.
- * @param ev The event.
- */
- onplay: (this: Document, ev: Event) => any;
- /**
- * Occurs when the audio or video has started playing.
- * @param ev The event.
- */
- onplaying: (this: Document, ev: Event) => any;
- onpointerlockchange: (this: Document, ev: Event) => any;
- onpointerlockerror: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate progress while downloading media data.
- * @param ev The event.
- */
- onprogress: (this: Document, ev: ProgressEvent) => any;
- /**
- * Occurs when the playback rate is increased or decreased.
- * @param ev The event.
- */
- onratechange: (this: Document, ev: Event) => any;
- /**
- * Fires when the state of the object has changed.
- * @param ev The event
- */
- onreadystatechange: (this: Document, ev: ProgressEvent) => any;
- /**
- * Fires when the user resets a form.
- * @param ev The event.
- */
- onreset: (this: Document, ev: Event) => any;
- /**
- * Fires when the user repositions the scroll box in the scroll bar on the object.
- * @param ev The event.
- */
- onscroll: (this: Document, ev: UIEvent) => any;
- /**
- * Occurs when the seek operation ends.
- * @param ev The event.
- */
- onseeked: (this: Document, ev: Event) => any;
- /**
- * Occurs when the current playback position is moved.
- * @param ev The event.
- */
- onseeking: (this: Document, ev: Event) => any;
- /**
- * Fires when the current selection changes.
- * @param ev The event.
- */
- onselect: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the selection state of a document changes.
- * @param ev The event.
- */
- onselectionchange: (this: Document, ev: Event) => any;
- onselectstart: (this: Document, ev: Event) => any;
- /**
- * Occurs when the download has stopped.
- * @param ev The event.
- */
- onstalled: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the Stop button or leaves the Web page.
- * @param ev The event.
- */
- onstop: (this: Document, ev: Event) => any;
- onsubmit: (this: Document, ev: Event) => any;
- /**
- * Occurs if the load operation has been intentionally halted.
- * @param ev The event.
- */
- onsuspend: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate the current playback position.
- * @param ev The event.
- */
- ontimeupdate: (this: Document, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- /**
- * Occurs when the volume is changed, or playback is muted or unmuted.
- * @param ev The event.
- */
- onvolumechange: (this: Document, ev: Event) => any;
- /**
- * Occurs when playback stops because the next frame of a video resource is not available.
- * @param ev The event.
- */
- onwaiting: (this: Document, ev: Event) => any;
- onwebkitfullscreenchange: (this: Document, ev: Event) => any;
- onwebkitfullscreenerror: (this: Document, ev: Event) => any;
- plugins: HTMLCollectionOf<HTMLEmbedElement>;
- readonly pointerLockElement: Element;
- /**
- * Retrieves a value that indicates the current state of the object.
- */
- readonly readyState: string;
- /**
- * Gets the URL of the location that referred the user to the current page.
- */
- readonly referrer: string;
- /**
- * Gets the root svg element in the document hierarchy.
- */
- readonly rootElement: SVGSVGElement;
- /**
- * Retrieves a collection of all script objects in the document.
- */
- scripts: HTMLCollectionOf<HTMLScriptElement>;
- readonly scrollingElement: Element | null;
- /**
- * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
- */
- readonly styleSheets: StyleSheetList;
- /**
- * Contains the title of the document.
- */
- title: string;
- readonly visibilityState: string;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
- vlinkColor: string;
- readonly webkitCurrentFullScreenElement: Element | null;
- readonly webkitFullscreenElement: Element | null;
- readonly webkitFullscreenEnabled: boolean;
- readonly webkitIsFullScreen: boolean;
- readonly xmlEncoding: string | null;
- xmlStandalone: boolean;
- /**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
- xmlVersion: string | null;
- adoptNode(source: Node): Node;
- captureEvents(): void;
- caretRangeFromPoint(x: number, y: number): Range;
- clear(): void;
- /**
- * Closes an output stream and forces the sent data to display.
- */
- close(): void;
- /**
- * Creates an attribute object with a specified name.
- * @param name String that sets the attribute object's name.
- */
- createAttribute(name: string): Attr;
- createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
- createCDATASection(data: string): CDATASection;
- /**
- * Creates a comment object with the specified data.
- * @param data Sets the comment object's data.
- */
- createComment(data: string): Comment;
- /**
- * Creates a new document.
- */
- createDocumentFragment(): DocumentFragment;
- /**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
- createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
- createElement(tagName: string): HTMLElement;
- createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
- createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver: Node): XPathNSResolver;
- /**
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list
- * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
- createProcessingInstruction(target: string, data: string): ProcessingInstruction;
- /**
- * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
- */
- createRange(): Range;
- /**
- * Creates a text string from the specified value.
- * @param data String that specifies the nodeValue property of the text node.
- */
- createTextNode(data: string): Text;
- createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
- createTouchList(...touches: Touch[]): TouchList;
- /**
- * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
- * @param filter A custom NodeFilter function to use.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
- /**
- * Returns the element for the specified x coordinate and the specified y coordinate.
- * @param x The x-offset
- * @param y The y-offset
- */
- elementFromPoint(x: number, y: number): Element;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
- /**
- * Executes a command on the current document, current selection, or the given range.
- * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
- * @param showUI Display the user interface, defaults to false.
- * @param value Value to assign.
- */
- execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
- /**
- * Displays help information for the given command identifier.
- * @param commandId Displays help information for the given command identifier.
- */
- execCommandShowHelp(commandId: string): boolean;
- exitFullscreen(): void;
- exitPointerLock(): void;
- /**
- * Causes the element to receive the focus and executes the code specified by the onfocus event.
- */
- focus(): void;
- /**
- * Returns a reference to the first object with the specified value of the ID or NAME attribute.
- * @param elementId String that specifies the ID value. Case-insensitive.
- */
- getElementById(elementId: string): HTMLElement | null;
- getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
- /**
- * Gets a collection of objects based on the value of the NAME or ID attribute.
- * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
- */
- getElementsByName(elementName: string): NodeListOf<HTMLElement>;
- /**
- * Retrieves a collection of objects based on the specified element name.
- * @param name Specifies the name of an element.
- */
- getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
- getElementsByTagName(tagname: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- /**
- * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
- */
- getSelection(): Selection;
- /**
- * Gets a value indicating whether the object currently has focus.
- */
- hasFocus(): boolean;
- importNode(importedNode: Node, deep: boolean): Node;
- msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
- msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
- /**
- * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
- * @param url Specifies a MIME type for the document.
- * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
- * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
- * @param replace Specifies whether the existing entry for the document is replaced in the history list.
- */
- open(url?: string, name?: string, features?: string, replace?: boolean): Document;
- /**
- * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
- * @param commandId Specifies a command identifier.
- */
- queryCommandEnabled(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandIndeterm(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates the current state of the command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandState(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the current command is supported on the current range.
- * @param commandId Specifies a command identifier.
- */
- queryCommandSupported(commandId: string): boolean;
- /**
- * Retrieves the string associated with a command.
- * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
- */
- queryCommandText(commandId: string): string;
- /**
- * Returns the current value of the document, range, or current selection for the given command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandValue(commandId: string): string;
- releaseEvents(): void;
- /**
- * Allows updating the print settings for the page.
- */
- updateSettings(): void;
- webkitCancelFullScreen(): void;
- webkitExitFullscreen(): void;
- /**
- * Writes one or more HTML expressions to a document in the specified window.
- * @param content Specifies the text and HTML tags to write.
- */
- write(...content: string[]): void;
- /**
- * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
- * @param content The text and HTML tags to write.
- */
- writeln(...content: string[]): void;
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Document: {
- prototype: Document;
- new(): Document;
-}
-
-interface DocumentFragment extends Node, NodeSelector, ParentNode {
-}
-
-declare var DocumentFragment: {
- prototype: DocumentFragment;
- new(): DocumentFragment;
-}
-
-interface DocumentType extends Node, ChildNode {
- readonly entities: NamedNodeMap;
- readonly internalSubset: string | null;
- readonly name: string;
- readonly notations: NamedNodeMap;
- readonly publicId: string | null;
- readonly systemId: string | null;
-}
-
-declare var DocumentType: {
- prototype: DocumentType;
- new(): DocumentType;
-}
-
-interface DragEvent extends MouseEvent {
- readonly dataTransfer: DataTransfer;
- initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
- msConvertURL(file: File, targetType: string, targetURL?: string): void;
-}
-
-declare var DragEvent: {
- prototype: DragEvent;
- new(): DragEvent;
-}
-
-interface DynamicsCompressorNode extends AudioNode {
- readonly attack: AudioParam;
- readonly knee: AudioParam;
- readonly ratio: AudioParam;
- readonly reduction: AudioParam;
- readonly release: AudioParam;
- readonly threshold: AudioParam;
-}
-
-declare var DynamicsCompressorNode: {
- prototype: DynamicsCompressorNode;
- new(): DynamicsCompressorNode;
-}
-
-interface EXT_frag_depth {
-}
-
-declare var EXT_frag_depth: {
- prototype: EXT_frag_depth;
- new(): EXT_frag_depth;
-}
-
-interface EXT_texture_filter_anisotropic {
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-declare var EXT_texture_filter_anisotropic: {
- prototype: EXT_texture_filter_anisotropic;
- new(): EXT_texture_filter_anisotropic;
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-interface ElementEventMap extends GlobalEventHandlersEventMap {
- "ariarequest": AriaRequestEvent;
- "command": CommandEvent;
- "gotpointercapture": PointerEvent;
- "lostpointercapture": PointerEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSGotPointerCapture": MSPointerEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSLostPointerCapture": MSPointerEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
- readonly classList: DOMTokenList;
- className: string;
- readonly clientHeight: number;
- readonly clientLeft: number;
- readonly clientTop: number;
- readonly clientWidth: number;
- id: string;
- msContentZoomFactor: number;
- readonly msRegionOverflow: string;
- onariarequest: (this: Element, ev: AriaRequestEvent) => any;
- oncommand: (this: Element, ev: CommandEvent) => any;
- ongotpointercapture: (this: Element, ev: PointerEvent) => any;
- onlostpointercapture: (this: Element, ev: PointerEvent) => any;
- onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
- onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
- onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
- onmspointermove: (this: Element, ev: MSPointerEvent) => any;
- onmspointerout: (this: Element, ev: MSPointerEvent) => any;
- onmspointerover: (this: Element, ev: MSPointerEvent) => any;
- onmspointerup: (this: Element, ev: MSPointerEvent) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onwebkitfullscreenchange: (this: Element, ev: Event) => any;
- onwebkitfullscreenerror: (this: Element, ev: Event) => any;
- readonly prefix: string | null;
- readonly scrollHeight: number;
- scrollLeft: number;
- scrollTop: number;
- readonly scrollWidth: number;
- readonly tagName: string;
- innerHTML: string;
- readonly assignedSlot: HTMLSlotElement | null;
- slot: string;
- readonly shadowRoot: ShadowRoot | null;
- getAttribute(name: string): string | null;
- getAttributeNS(namespaceURI: string, localName: string): string;
- getAttributeNode(name: string): Attr;
- getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
- getElementsByTagName(name: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- hasAttribute(name: string): boolean;
- hasAttributeNS(namespaceURI: string, localName: string): boolean;
- msGetRegionContent(): MSRangeCollection;
- msGetUntransformedBounds(): ClientRect;
- msMatchesSelector(selectors: string): boolean;
- msReleasePointerCapture(pointerId: number): void;
- msSetPointerCapture(pointerId: number): void;
- msZoomTo(args: MsZoomToOptions): void;
- releasePointerCapture(pointerId: number): void;
- removeAttribute(name?: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
- removeAttributeNode(oldAttr: Attr): Attr;
- requestFullscreen(): void;
- requestPointerLock(): void;
- setAttribute(name: string, value: string): void;
- setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
- setAttributeNode(newAttr: Attr): Attr;
- setAttributeNodeNS(newAttr: Attr): Attr;
- setPointerCapture(pointerId: number): void;
- webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
- webkitRequestFullscreen(): void;
- getElementsByClassName(classNames: string): NodeListOf<Element>;
- matches(selector: string): boolean;
- closest(selector: string): Element | null;
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
- scroll(options?: ScrollToOptions): void;
- scroll(x: number, y: number): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollTo(x: number, y: number): void;
- scrollBy(options?: ScrollToOptions): void;
- scrollBy(x: number, y: number): void;
- insertAdjacentElement(position: string, insertedElement: Element): Element | null;
- insertAdjacentHTML(where: string, html: string): void;
- insertAdjacentText(where: string, text: string): void;
- attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
- addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Element: {
- prototype: Element;
- new(): Element;
-}
-
-interface ErrorEvent extends Event {
- readonly colno: number;
- readonly error: any;
- readonly filename: string;
- readonly lineno: number;
- readonly message: string;
- initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
-}
-
-declare var ErrorEvent: {
- prototype: ErrorEvent;
- new(): ErrorEvent;
-}
-
-interface Event {
- readonly bubbles: boolean;
- cancelBubble: boolean;
- readonly cancelable: boolean;
- readonly currentTarget: EventTarget;
- readonly defaultPrevented: boolean;
- readonly eventPhase: number;
- readonly isTrusted: boolean;
- returnValue: boolean;
- readonly srcElement: Element | null;
- readonly target: EventTarget;
- readonly timeStamp: number;
- readonly type: string;
- readonly scoped: boolean;
- initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
- preventDefault(): void;
- stopImmediatePropagation(): void;
- stopPropagation(): void;
- deepPath(): EventTarget[];
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-declare var Event: {
- prototype: Event;
- new(type: string, eventInitDict?: EventInit): Event;
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-interface EventTarget {
- addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- dispatchEvent(evt: Event): boolean;
- removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var EventTarget: {
- prototype: EventTarget;
- new(): EventTarget;
-}
-
-interface External {
-}
-
-declare var External: {
- prototype: External;
- new(): External;
-}
-
-interface File extends Blob {
- readonly lastModifiedDate: any;
- readonly name: string;
- readonly webkitRelativePath: string;
-}
-
-declare var File: {
- prototype: File;
- new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
-
-interface FileList {
- readonly length: number;
- item(index: number): File;
- [index: number]: File;
-}
-
-declare var FileList: {
- prototype: FileList;
- new(): FileList;
-}
-
-interface FileReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(blob: Blob): void;
- readAsBinaryString(blob: Blob): void;
- readAsDataURL(blob: Blob): void;
- readAsText(blob: Blob, encoding?: string): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var FileReader: {
- prototype: FileReader;
- new(): FileReader;
-}
-
-interface FocusEvent extends UIEvent {
- readonly relatedTarget: EventTarget;
- initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
-}
-
-declare var FocusEvent: {
- prototype: FocusEvent;
- new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
-
-interface FormData {
- append(name: any, value: any, blobName?: string): void;
-}
-
-declare var FormData: {
- prototype: FormData;
- new (form?: HTMLFormElement): FormData;
-}
-
-interface GainNode extends AudioNode {
- readonly gain: AudioParam;
-}
-
-declare var GainNode: {
- prototype: GainNode;
- new(): GainNode;
-}
-
-interface Gamepad {
- readonly axes: number[];
- readonly buttons: GamepadButton[];
- readonly connected: boolean;
- readonly id: string;
- readonly index: number;
- readonly mapping: string;
- readonly timestamp: number;
-}
-
-declare var Gamepad: {
- prototype: Gamepad;
- new(): Gamepad;
-}
-
-interface GamepadButton {
- readonly pressed: boolean;
- readonly value: number;
-}
-
-declare var GamepadButton: {
- prototype: GamepadButton;
- new(): GamepadButton;
-}
-
-interface GamepadEvent extends Event {
- readonly gamepad: Gamepad;
-}
-
-declare var GamepadEvent: {
- prototype: GamepadEvent;
- new(): GamepadEvent;
-}
-
-interface Geolocation {
- clearWatch(watchId: number): void;
- getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
- watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
-}
-
-declare var Geolocation: {
- prototype: Geolocation;
- new(): Geolocation;
-}
-
-interface HTMLAllCollection extends HTMLCollection {
- namedItem(name: string): Element;
-}
-
-declare var HTMLAllCollection: {
- prototype: HTMLAllCollection;
- new(): HTMLAllCollection;
-}
-
-interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
- hash: string;
- /**
- * Contains the hostname and port values of the URL.
- */
- host: string;
- /**
- * Contains the hostname of a URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- readonly mimeType: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- readonly nameProp: string;
- /**
- * Contains the pathname of the URL.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Contains the protocol of the URL.
- */
- protocol: string;
- readonly protocolLong: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- type: string;
- urn: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAnchorElement: {
- prototype: HTMLAnchorElement;
- new(): HTMLAnchorElement;
-}
-
-interface HTMLAppletElement extends HTMLElement {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
- */
- declare: boolean;
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- object: string | null;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- vspace: number;
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAppletElement: {
- prototype: HTMLAppletElement;
- new(): HTMLAppletElement;
-}
-
-interface HTMLAreaElement extends HTMLElement {
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Sets or retrieves the subsection of the href property that follows the number sign (#).
- */
- hash: string;
- /**
- * Sets or retrieves the hostname and port number of the location or URL.
- */
- host: string;
- /**
- * Sets or retrieves the host name part of the location or URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or gets whether clicks in this region cause action.
- */
- noHref: boolean;
- /**
- * Sets or retrieves the file name or path specified by the object.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Sets or retrieves the protocol portion of a URL.
- */
- protocol: string;
- rel: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAreaElement: {
- prototype: HTMLAreaElement;
- new(): HTMLAreaElement;
-}
-
-interface HTMLAreasCollection extends HTMLCollection {
- /**
- * Adds an element to the areas, controlRange, or options collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Removes an element from the collection.
- */
- remove(index?: number): void;
-}
-
-declare var HTMLAreasCollection: {
- prototype: HTMLAreasCollection;
- new(): HTMLAreasCollection;
-}
-
-interface HTMLAudioElement extends HTMLMediaElement {
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAudioElement: {
- prototype: HTMLAudioElement;
- new(): HTMLAudioElement;
-}
-
-interface HTMLBRElement extends HTMLElement {
- /**
- * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
- */
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBRElement: {
- prototype: HTMLBRElement;
- new(): HTMLBRElement;
-}
-
-interface HTMLBaseElement extends HTMLElement {
- /**
- * Gets or sets the baseline URL on which relative links are based.
- */
- href: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseElement: {
- prototype: HTMLBaseElement;
- new(): HTMLBaseElement;
-}
-
-interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- /**
- * Sets or retrieves the font size of the object.
- */
- size: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseFontElement: {
- prototype: HTMLBaseFontElement;
- new(): HTMLBaseFontElement;
-}
-
-interface HTMLBodyElementEventMap extends HTMLElementEventMap {
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "popstate": PopStateEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLBodyElement extends HTMLElement {
- aLink: any;
- background: string;
- bgColor: any;
- bgProperties: string;
- link: any;
- noWrap: boolean;
- onafterprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
- onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLBodyElement, ev: Event) => any;
- onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLBodyElement, ev: Event) => any;
- ononline: (this: HTMLBodyElement, ev: Event) => any;
- onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
- onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
- onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
- onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
- onunload: (this: HTMLBodyElement, ev: Event) => any;
- text: any;
- vLink: any;
- addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBodyElement: {
- prototype: HTMLBodyElement;
- new(): HTMLBodyElement;
-}
-
-interface HTMLButtonElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- status: any;
- /**
- * Gets the classification and default behavior of the button.
- */
- type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the default or selected value of the control.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLButtonElement: {
- prototype: HTMLButtonElement;
- new(): HTMLButtonElement;
-}
-
-interface HTMLCanvasElement extends HTMLElement {
- /**
- * Gets or sets the height of a canvas element on a document.
- */
- height: number;
- /**
- * Gets or sets the width of a canvas element on a document.
- */
- width: number;
- /**
- * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
- * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
- */
- getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
- getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
- getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
- /**
- * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
- */
- msToBlob(): Blob;
- /**
- * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
- * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
- */
- toDataURL(type?: string, ...args: any[]): string;
- toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLCanvasElement: {
- prototype: HTMLCanvasElement;
- new(): HTMLCanvasElement;
-}
-
-interface HTMLCollection {
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Retrieves an object from various collections.
- */
- item(index: number): Element;
- /**
- * Retrieves a select object or an object from an options collection.
- */
- namedItem(name: string): Element;
- [index: number]: Element;
-}
-
-declare var HTMLCollection: {
- prototype: HTMLCollection;
- new(): HTMLCollection;
-}
-
-interface HTMLDListElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDListElement: {
- prototype: HTMLDListElement;
- new(): HTMLDListElement;
-}
-
-interface HTMLDataListElement extends HTMLElement {
- options: HTMLCollectionOf<HTMLOptionElement>;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDataListElement: {
- prototype: HTMLDataListElement;
- new(): HTMLDataListElement;
-}
-
-interface HTMLDirectoryElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDirectoryElement: {
- prototype: HTMLDirectoryElement;
- new(): HTMLDirectoryElement;
-}
-
-interface HTMLDivElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDivElement: {
- prototype: HTMLDivElement;
- new(): HTMLDivElement;
-}
-
-interface HTMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDocument: {
- prototype: HTMLDocument;
- new(): HTMLDocument;
-}
-
-interface HTMLElementEventMap extends ElementEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforecopy": ClipboardEvent;
- "beforecut": ClipboardEvent;
- "beforedeactivate": UIEvent;
- "beforepaste": ClipboardEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "copy": ClipboardEvent;
- "cuechange": Event;
- "cut": ClipboardEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "paste": ClipboardEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectstart": Event;
- "stalled": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface HTMLElement extends Element {
- accessKey: string;
- readonly children: HTMLCollection;
- contentEditable: string;
- readonly dataset: DOMStringMap;
- dir: string;
- draggable: boolean;
- hidden: boolean;
- hideFocus: boolean;
- innerHTML: string;
- innerText: string;
- readonly isContentEditable: boolean;
- lang: string;
- readonly offsetHeight: number;
- readonly offsetLeft: number;
- readonly offsetParent: Element;
- readonly offsetTop: number;
- readonly offsetWidth: number;
- onabort: (this: HTMLElement, ev: UIEvent) => any;
- onactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onblur: (this: HTMLElement, ev: FocusEvent) => any;
- oncanplay: (this: HTMLElement, ev: Event) => any;
- oncanplaythrough: (this: HTMLElement, ev: Event) => any;
- onchange: (this: HTMLElement, ev: Event) => any;
- onclick: (this: HTMLElement, ev: MouseEvent) => any;
- oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
- oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- oncuechange: (this: HTMLElement, ev: Event) => any;
- oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
- ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
- ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
- ondrag: (this: HTMLElement, ev: DragEvent) => any;
- ondragend: (this: HTMLElement, ev: DragEvent) => any;
- ondragenter: (this: HTMLElement, ev: DragEvent) => any;
- ondragleave: (this: HTMLElement, ev: DragEvent) => any;
- ondragover: (this: HTMLElement, ev: DragEvent) => any;
- ondragstart: (this: HTMLElement, ev: DragEvent) => any;
- ondrop: (this: HTMLElement, ev: DragEvent) => any;
- ondurationchange: (this: HTMLElement, ev: Event) => any;
- onemptied: (this: HTMLElement, ev: Event) => any;
- onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
- onerror: (this: HTMLElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLElement, ev: FocusEvent) => any;
- oninput: (this: HTMLElement, ev: Event) => any;
- oninvalid: (this: HTMLElement, ev: Event) => any;
- onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
- onload: (this: HTMLElement, ev: Event) => any;
- onloadeddata: (this: HTMLElement, ev: Event) => any;
- onloadedmetadata: (this: HTMLElement, ev: Event) => any;
- onloadstart: (this: HTMLElement, ev: Event) => any;
- onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
- onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
- onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
- onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
- onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
- onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onpause: (this: HTMLElement, ev: Event) => any;
- onplay: (this: HTMLElement, ev: Event) => any;
- onplaying: (this: HTMLElement, ev: Event) => any;
- onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
- onratechange: (this: HTMLElement, ev: Event) => any;
- onreset: (this: HTMLElement, ev: Event) => any;
- onscroll: (this: HTMLElement, ev: UIEvent) => any;
- onseeked: (this: HTMLElement, ev: Event) => any;
- onseeking: (this: HTMLElement, ev: Event) => any;
- onselect: (this: HTMLElement, ev: UIEvent) => any;
- onselectstart: (this: HTMLElement, ev: Event) => any;
- onstalled: (this: HTMLElement, ev: Event) => any;
- onsubmit: (this: HTMLElement, ev: Event) => any;
- onsuspend: (this: HTMLElement, ev: Event) => any;
- ontimeupdate: (this: HTMLElement, ev: Event) => any;
- onvolumechange: (this: HTMLElement, ev: Event) => any;
- onwaiting: (this: HTMLElement, ev: Event) => any;
- outerHTML: string;
- outerText: string;
- spellcheck: boolean;
- readonly style: CSSStyleDeclaration;
- tabIndex: number;
- title: string;
- blur(): void;
- click(): void;
- dragDrop(): boolean;
- focus(): void;
- msGetInputContext(): MSInputMethodContext;
- setActive(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLElement: {
- prototype: HTMLElement;
- new(): HTMLElement;
-}
-
-interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hidden: any;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the palette used for the embedded document.
- */
- readonly palette: string;
- /**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
- readonly pluginspage: string;
- readonly readyState: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the height and width units of the embed object.
- */
- units: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLEmbedElement: {
- prototype: HTMLEmbedElement;
- new(): HTMLEmbedElement;
-}
-
-interface HTMLFieldSetElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFieldSetElement: {
- prototype: HTMLFieldSetElement;
- new(): HTMLFieldSetElement;
-}
-
-interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFontElement: {
- prototype: HTMLFontElement;
- new(): HTMLFontElement;
-}
-
-interface HTMLFormElement extends HTMLElement {
- /**
- * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
- */
- acceptCharset: string;
- /**
- * Sets or retrieves the URL to which the form content is sent for processing.
- */
- action: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Retrieves a collection, in source order, of all controls in a given form.
- */
- readonly elements: HTMLCollection;
- /**
- * Sets or retrieves the MIME encoding for the form.
- */
- encoding: string;
- /**
- * Sets or retrieves the encoding type for the form.
- */
- enctype: string;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Sets or retrieves how to send the form data to the server.
- */
- method: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Designates a form that is not validated when submitted.
- */
- noValidate: boolean;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a form object or an object from an elements collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a form object or an object from an elements collection.
- */
- namedItem(name: string): any;
- /**
- * Fires when the user resets a form.
- */
- reset(): void;
- /**
- * Fires when a FORM is about to be submitted.
- */
- submit(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLFormElement: {
- prototype: HTMLFormElement;
- new(): HTMLFormElement;
-}
-
-interface HTMLFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string | number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLFrameElement, ev: Event) => any;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string | number;
- addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameElement: {
- prototype: HTMLFrameElement;
- new(): HTMLFrameElement;
-}
-
-interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLFrameSetElement extends HTMLElement {
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Sets or retrieves the frame widths of the object.
- */
- cols: string;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- name: string;
- onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
- /**
- * Fires when the object loses the input focus.
- */
- onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- */
- onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLFrameSetElement, ev: Event) => any;
- onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
- ononline: (this: HTMLFrameSetElement, ev: Event) => any;
- onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
- onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
- onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
- onunload: (this: HTMLFrameSetElement, ev: Event) => any;
- /**
- * Sets or retrieves the frame heights of the object.
- */
- rows: string;
- addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameSetElement: {
- prototype: HTMLFrameSetElement;
- new(): HTMLFrameSetElement;
-}
-
-interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
- */
- noShade: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHRElement: {
- prototype: HTMLHRElement;
- new(): HTMLHRElement;
-}
-
-interface HTMLHeadElement extends HTMLElement {
- profile: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadElement: {
- prototype: HTMLHeadElement;
- new(): HTMLHeadElement;
-}
-
-interface HTMLHeadingElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadingElement: {
- prototype: HTMLHeadingElement;
- new(): HTMLHeadingElement;
-}
-
-interface HTMLHtmlElement extends HTMLElement {
- /**
- * Sets or retrieves the DTD version that governs the current document.
- */
- version: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHtmlElement: {
- prototype: HTMLHtmlElement;
- new(): HTMLHtmlElement;
-}
-
-interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- allowFullscreen: boolean;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the horizontal margin for the object.
- */
- hspace: number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLIFrameElement, ev: Event) => any;
- readonly sandbox: DOMSettableTokenList;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLIFrameElement: {
- prototype: HTMLIFrameElement;
- new(): HTMLIFrameElement;
-}
-
-interface HTMLImageElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- crossOrigin: string;
- readonly currentSrc: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: number;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- /**
- * Sets or retrieves whether the image is a server-side image map.
- */
- isMap: boolean;
- /**
- * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
- */
- longDesc: string;
- lowsrc: string;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * The original height of the image resource before sizing.
- */
- readonly naturalHeight: number;
- /**
- * The original width of the image resource before sizing.
- */
- readonly naturalWidth: number;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- readonly x: number;
- readonly y: number;
- msGetAsCastingSource(): any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLImageElement: {
- prototype: HTMLImageElement;
- new(): HTMLImageElement;
- create(): HTMLImageElement;
-}
-
-interface HTMLInputElement extends HTMLElement {
- /**
- * Sets or retrieves a comma-separated list of content types.
- */
- accept: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- checked: boolean;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- defaultChecked: boolean;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Returns a FileList object on a file type input object.
- */
- readonly files: FileList | null;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- indeterminate: boolean;
- /**
- * Specifies the ID of a pre-defined datalist of options for an input element.
- */
- readonly list: HTMLElement;
- /**
- * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
- */
- max: string;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
- */
- min: string;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a string containing a regular expression that the user's input must match.
- */
- pattern: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- selectionDirection: string;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- size: number;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- status: boolean;
- /**
- * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
- */
- step: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns the value of the data at the cursor's current position.
- */
- value: string;
- valueAsDate: Date;
- /**
- * Returns the input field value as a number.
- */
- valueAsNumber: number;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- webkitdirectory: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Makes the selection equal to the current object.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start?: number, end?: number, direction?: string): void;
- /**
- * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
- * @param n Value to decrement the value by.
- */
- stepDown(n?: number): void;
- /**
- * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
- * @param n Value to increment the value by.
- */
- stepUp(n?: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLInputElement: {
- prototype: HTMLInputElement;
- new(): HTMLInputElement;
-}
-
-interface HTMLLIElement extends HTMLElement {
- type: string;
- /**
- * Sets or retrieves the value of a list item.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLIElement: {
- prototype: HTMLLIElement;
- new(): HTMLLIElement;
-}
-
-interface HTMLLabelElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the object to which the given label object is assigned.
- */
- htmlFor: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLabelElement: {
- prototype: HTMLLabelElement;
- new(): HTMLLabelElement;
-}
-
-interface HTMLLegendElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- align: string;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLegendElement: {
- prototype: HTMLLegendElement;
- new(): HTMLLegendElement;
-}
-
-interface HTMLLinkElement extends HTMLElement, LinkStyle {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- disabled: boolean;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- import?: Document;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLinkElement: {
- prototype: HTMLLinkElement;
- new(): HTMLLinkElement;
-}
-
-interface HTMLMapElement extends HTMLElement {
- /**
- * Retrieves a collection of the area objects defined for the given map object.
- */
- readonly areas: HTMLAreasCollection;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMapElement: {
- prototype: HTMLMapElement;
- new(): HTMLMapElement;
-}
-
-interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
- "bounce": Event;
- "finish": Event;
- "start": Event;
-}
-
-interface HTMLMarqueeElement extends HTMLElement {
- behavior: string;
- bgColor: any;
- direction: string;
- height: string;
- hspace: number;
- loop: number;
- onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
- onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
- onstart: (this: HTMLMarqueeElement, ev: Event) => any;
- scrollAmount: number;
- scrollDelay: number;
- trueSpeed: boolean;
- vspace: number;
- width: string;
- start(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMarqueeElement: {
- prototype: HTMLMarqueeElement;
- new(): HTMLMarqueeElement;
-}
-
-interface HTMLMediaElementEventMap extends HTMLElementEventMap {
- "encrypted": MediaEncryptedEvent;
- "msneedkey": MSMediaKeyNeededEvent;
-}
-
-interface HTMLMediaElement extends HTMLElement {
- /**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
- readonly audioTracks: AudioTrackList;
- /**
- * Gets or sets a value that indicates whether to start playing the media automatically.
- */
- autoplay: boolean;
- /**
- * Gets a collection of buffered time ranges.
- */
- readonly buffered: TimeRanges;
- /**
- * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
- */
- controls: boolean;
- crossOrigin: string;
- /**
- * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
- */
- readonly currentSrc: string;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- currentTime: number;
- defaultMuted: boolean;
- /**
- * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
- */
- defaultPlaybackRate: number;
- /**
- * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
- */
- readonly duration: number;
- /**
- * Gets information about whether the playback has ended or not.
- */
- readonly ended: boolean;
- /**
- * Returns an object representing the current error state of the audio or video element.
- */
- readonly error: MediaError;
- /**
- * Gets or sets a flag to specify whether playback should restart after it completes.
- */
- loop: boolean;
- readonly mediaKeys: MediaKeys | null;
- /**
- * Specifies the purpose of the audio or video media, such as background audio or alerts.
- */
- msAudioCategory: string;
- /**
- * Specifies the output device id that the audio will be sent to.
- */
- msAudioDeviceType: string;
- readonly msGraphicsTrustStatus: MSGraphicsTrust;
- /**
- * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
- */
- readonly msKeys: MSMediaKeys;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Specifies whether or not to enable low-latency playback on the media element.
- */
- msRealTime: boolean;
- /**
- * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
- */
- muted: boolean;
- /**
- * Gets the current network activity for the element.
- */
- readonly networkState: number;
- onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
- onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
- /**
- * Gets a flag that specifies whether playback is paused.
- */
- readonly paused: boolean;
- /**
- * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
- */
- playbackRate: number;
- /**
- * Gets TimeRanges for the current media resource that has been played.
- */
- readonly played: TimeRanges;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- preload: string;
- readyState: number;
- /**
- * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
- */
- readonly seekable: TimeRanges;
- /**
- * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
- */
- readonly seeking: boolean;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcObject: MediaStream | null;
- readonly textTracks: TextTrackList;
- readonly videoTracks: VideoTrackList;
- /**
- * Gets or sets the volume level for audio portions of the media element.
- */
- volume: number;
- addTextTrack(kind: string, label?: string, language?: string): TextTrack;
- /**
- * Returns a string that specifies whether the client can play a given media resource type.
- */
- canPlayType(type: string): string;
- /**
- * Resets the audio or video object and loads a new media resource.
- */
- load(): void;
- /**
- * Clears all effects from the media pipeline.
- */
- msClearEffects(): void;
- msGetAsCastingSource(): any;
- /**
- * Inserts the specified audio effect into media pipeline.
- */
- msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetMediaKeys(mediaKeys: MSMediaKeys): void;
- /**
- * Specifies the media protection manager for a given media pipeline.
- */
- msSetMediaProtectionManager(mediaProtectionManager?: any): void;
- /**
- * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
- */
- pause(): void;
- /**
- * Loads and starts playback of a media resource.
- */
- play(): void;
- setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMediaElement: {
- prototype: HTMLMediaElement;
- new(): HTMLMediaElement;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
-}
-
-interface HTMLMenuElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMenuElement: {
- prototype: HTMLMenuElement;
- new(): HTMLMenuElement;
-}
-
-interface HTMLMetaElement extends HTMLElement {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
- content: string;
- /**
- * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
- */
- httpEquiv: string;
- /**
- * Sets or retrieves the value specified in the content attribute of the meta object.
- */
- name: string;
- /**
- * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
- */
- scheme: string;
- /**
- * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
- */
- url: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMetaElement: {
- prototype: HTMLMetaElement;
- new(): HTMLMetaElement;
-}
-
-interface HTMLMeterElement extends HTMLElement {
- high: number;
- low: number;
- max: number;
- min: number;
- optimum: number;
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMeterElement: {
- prototype: HTMLMeterElement;
- new(): HTMLMeterElement;
-}
-
-interface HTMLModElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- /**
- * Sets or retrieves the date and time of a modification to the object.
- */
- dateTime: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLModElement: {
- prototype: HTMLModElement;
- new(): HTMLModElement;
-}
-
-interface HTMLOListElement extends HTMLElement {
- compact: boolean;
- /**
- * The starting number.
- */
- start: number;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOListElement: {
- prototype: HTMLOListElement;
- new(): HTMLOListElement;
-}
-
-interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- /**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- declare: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the contained object.
- */
- readonly object: any;
- readonly readyState: number;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLObjectElement: {
- prototype: HTMLObjectElement;
- new(): HTMLObjectElement;
-}
-
-interface HTMLOptGroupElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- readonly text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptGroupElement: {
- prototype: HTMLOptGroupElement;
- new(): HTMLOptGroupElement;
-}
-
-interface HTMLOptionElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptionElement: {
- prototype: HTMLOptionElement;
- new(): HTMLOptionElement;
- create(): HTMLOptionElement;
-}
-
-interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
- length: number;
- selectedIndex: number;
- add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
- remove(index: number): void;
-}
-
-declare var HTMLOptionsCollection: {
- prototype: HTMLOptionsCollection;
- new(): HTMLOptionsCollection;
-}
-
-interface HTMLParagraphElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParagraphElement: {
- prototype: HTMLParagraphElement;
- new(): HTMLParagraphElement;
-}
-
-interface HTMLParamElement extends HTMLElement {
- /**
- * Sets or retrieves the name of an input parameter for an element.
- */
- name: string;
- /**
- * Sets or retrieves the content type of the resource designated by the value attribute.
- */
- type: string;
- /**
- * Sets or retrieves the value of an input parameter for an element.
- */
- value: string;
- /**
- * Sets or retrieves the data type of the value attribute.
- */
- valueType: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParamElement: {
- prototype: HTMLParamElement;
- new(): HTMLParamElement;
-}
-
-interface HTMLPictureElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPictureElement: {
- prototype: HTMLPictureElement;
- new(): HTMLPictureElement;
-}
-
-interface HTMLPreElement extends HTMLElement {
- /**
- * Sets or gets a value that you can use to implement your own width functionality for the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPreElement: {
- prototype: HTMLPreElement;
- new(): HTMLPreElement;
-}
-
-interface HTMLProgressElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Defines the maximum, or "done" value for a progress element.
- */
- max: number;
- /**
- * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
- */
- readonly position: number;
- /**
- * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLProgressElement: {
- prototype: HTMLProgressElement;
- new(): HTMLProgressElement;
-}
-
-interface HTMLQuoteElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLQuoteElement: {
- prototype: HTMLQuoteElement;
- new(): HTMLQuoteElement;
-}
-
-interface HTMLScriptElement extends HTMLElement {
- async: boolean;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the status of the script.
- */
- defer: boolean;
- /**
- * Sets or retrieves the event for which the script is written.
- */
- event: string;
- /**
- * Sets or retrieves the object that is bound to the event script.
- */
- htmlFor: string;
- /**
- * Retrieves the URL to an external file that contains the source code or data.
- */
- src: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- /**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
- type: string;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLScriptElement: {
- prototype: HTMLScriptElement;
- new(): HTMLScriptElement;
-}
-
-interface HTMLSelectElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- length: number;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- readonly options: HTMLOptionsCollection;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the index of the selected option in a select object.
- */
- selectedIndex: number;
- selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
- /**
- * Sets or retrieves the number of rows in the list box.
- */
- size: number;
- /**
- * Retrieves the type of select control based on the value of the MULTIPLE attribute.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Adds an element to the areas, controlRange, or options collection.
- * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
- * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
- */
- namedItem(name: string): any;
- /**
- * Removes an element from the collection.
- * @param index Number that specifies the zero-based index of the element to remove from the collection.
- */
- remove(index?: number): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLSelectElement: {
- prototype: HTMLSelectElement;
- new(): HTMLSelectElement;
-}
-
-interface HTMLSourceElement extends HTMLElement {
- /**
- * Gets or sets the intended media type of the media source.
- */
- media: string;
- msKeySystem: string;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Gets or sets the MIME type of a media resource.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSourceElement: {
- prototype: HTMLSourceElement;
- new(): HTMLSourceElement;
-}
-
-interface HTMLSpanElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSpanElement: {
- prototype: HTMLSpanElement;
- new(): HTMLSpanElement;
-}
-
-interface HTMLStyleElement extends HTMLElement, LinkStyle {
- disabled: boolean;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Retrieves the CSS language in which the style sheet is written.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLStyleElement: {
- prototype: HTMLStyleElement;
- new(): HTMLStyleElement;
-}
-
-interface HTMLTableCaptionElement extends HTMLElement {
- /**
- * Sets or retrieves the alignment of the caption or legend.
- */
- align: string;
- /**
- * Sets or retrieves whether the caption appears at the top or bottom of the table.
- */
- vAlign: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCaptionElement: {
- prototype: HTMLTableCaptionElement;
- new(): HTMLTableCaptionElement;
-}
-
-interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves abbreviated text for the object.
- */
- abbr: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
- */
- axis: string;
- bgColor: any;
- /**
- * Retrieves the position of the object in the cells collection of a row.
- */
- readonly cellIndex: number;
- /**
- * Sets or retrieves the number columns in the table that the object should span.
- */
- colSpan: number;
- /**
- * Sets or retrieves a list of header cells that provide information for the object.
- */
- headers: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- /**
- * Sets or retrieves how many rows in a table the cell should span.
- */
- rowSpan: number;
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCellElement: {
- prototype: HTMLTableCellElement;
- new(): HTMLTableCellElement;
-}
-
-interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves the alignment of the object relative to the display or table.
- */
- align: string;
- /**
- * Sets or retrieves the number of columns in the group.
- */
- span: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableColElement: {
- prototype: HTMLTableColElement;
- new(): HTMLTableColElement;
-}
-
-interface HTMLTableDataCellElement extends HTMLTableCellElement {
-}
-
-declare var HTMLTableDataCellElement: {
- prototype: HTMLTableDataCellElement;
- new(): HTMLTableDataCellElement;
-}
-
-interface HTMLTableElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- bgColor: any;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the caption object of a table.
- */
- caption: HTMLTableCaptionElement;
- /**
- * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
- */
- cellPadding: string;
- /**
- * Sets or retrieves the amount of space between cells in a table.
- */
- cellSpacing: string;
- /**
- * Sets or retrieves the number of columns in the table.
- */
- cols: number;
- /**
- * Sets or retrieves the way the border frame around the table is displayed.
- */
- frame: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Sets or retrieves which dividing lines (inner borders) are displayed.
- */
- rules: string;
- /**
- * Sets or retrieves a description and/or structure of the object.
- */
- summary: string;
- /**
- * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
- */
- tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
- /**
- * Retrieves the tFoot object of the table.
- */
- tFoot: HTMLTableSectionElement;
- /**
- * Retrieves the tHead object of the table.
- */
- tHead: HTMLTableSectionElement;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Creates an empty caption element in the table.
- */
- createCaption(): HTMLTableCaptionElement;
- /**
- * Creates an empty tBody element in the table.
- */
- createTBody(): HTMLTableSectionElement;
- /**
- * Creates an empty tFoot element in the table.
- */
- createTFoot(): HTMLTableSectionElement;
- /**
- * Returns the tHead element object if successful, or null otherwise.
- */
- createTHead(): HTMLTableSectionElement;
- /**
- * Deletes the caption element and its contents from the table.
- */
- deleteCaption(): void;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Deletes the tFoot element and its contents from the table.
- */
- deleteTFoot(): void;
- /**
- * Deletes the tHead element and its contents from the table.
- */
- deleteTHead(): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableElement: {
- prototype: HTMLTableElement;
- new(): HTMLTableElement;
-}
-
-interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
-}
-
-declare var HTMLTableHeaderCellElement: {
- prototype: HTMLTableHeaderCellElement;
- new(): HTMLTableHeaderCellElement;
-}
-
-interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- bgColor: any;
- /**
- * Retrieves a collection of all cells in the table row.
- */
- cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Retrieves the position of the object in the rows collection for the table.
- */
- readonly rowIndex: number;
- /**
- * Retrieves the position of the object in the collection.
- */
- readonly sectionRowIndex: number;
- /**
- * Removes the specified cell from the table row, as well as from the cells collection.
- * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
- */
- deleteCell(index?: number): void;
- /**
- * Creates a new cell in the table row, and adds the cell to the cells collection.
- * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
- */
- insertCell(index?: number): HTMLTableDataCellElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableRowElement: {
- prototype: HTMLTableRowElement;
- new(): HTMLTableRowElement;
-}
-
-interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableSectionElement: {
- prototype: HTMLTableSectionElement;
- new(): HTMLTableSectionElement;
-}
-
-interface HTMLTemplateElement extends HTMLElement {
- readonly content: DocumentFragment;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTemplateElement: {
- prototype: HTMLTemplateElement;
- new(): HTMLTemplateElement;
-}
-
-interface HTMLTextAreaElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- cols: number;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- /**
- * Sets or retrieves the value indicated whether the content of the object is read-only.
- */
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: number;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- /**
- * Sets or retrieves the value indicating whether the control is selected.
- */
- status: any;
- /**
- * Retrieves the type of control.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Retrieves or sets the text in the entry field of the textArea element.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Sets or retrieves how to handle wordwrapping in the object.
- */
- wrap: string;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Highlights the input area of a form element.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start: number, end: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTextAreaElement: {
- prototype: HTMLTextAreaElement;
- new(): HTMLTextAreaElement;
-}
-
-interface HTMLTitleElement extends HTMLElement {
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTitleElement: {
- prototype: HTMLTitleElement;
- new(): HTMLTitleElement;
-}
-
-interface HTMLTrackElement extends HTMLElement {
- default: boolean;
- kind: string;
- label: string;
- readonly readyState: number;
- src: string;
- srclang: string;
- readonly track: TextTrack;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTrackElement: {
- prototype: HTMLTrackElement;
- new(): HTMLTrackElement;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
-}
-
-interface HTMLUListElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUListElement: {
- prototype: HTMLUListElement;
- new(): HTMLUListElement;
-}
-
-interface HTMLUnknownElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUnknownElement: {
- prototype: HTMLUnknownElement;
- new(): HTMLUnknownElement;
-}
-
-interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
- "MSVideoFormatChanged": Event;
- "MSVideoFrameStepCompleted": Event;
- "MSVideoOptimalLayoutChanged": Event;
-}
-
-interface HTMLVideoElement extends HTMLMediaElement {
- /**
- * Gets or sets the height of the video element.
- */
- height: number;
- msHorizontalMirror: boolean;
- readonly msIsLayoutOptimalForPlayback: boolean;
- readonly msIsStereo3D: boolean;
- msStereo3DPackingMode: string;
- msStereo3DRenderMode: string;
- msZoom: boolean;
- onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
- /**
- * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
- */
- poster: string;
- /**
- * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoHeight: number;
- /**
- * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoWidth: number;
- readonly webkitDisplayingFullscreen: boolean;
- readonly webkitSupportsFullscreen: boolean;
- /**
- * Gets or sets the width of the video element.
- */
- width: number;
- getVideoPlaybackQuality(): VideoPlaybackQuality;
- msFrameStep(forward: boolean): void;
- msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
- webkitEnterFullScreen(): void;
- webkitEnterFullscreen(): void;
- webkitExitFullScreen(): void;
- webkitExitFullscreen(): void;
- addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLVideoElement: {
- prototype: HTMLVideoElement;
- new(): HTMLVideoElement;
-}
-
-interface HashChangeEvent extends Event {
- readonly newURL: string | null;
- readonly oldURL: string | null;
-}
-
-declare var HashChangeEvent: {
- prototype: HashChangeEvent;
- new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
-}
-
-interface History {
- readonly length: number;
- readonly state: any;
- scrollRestoration: ScrollRestoration;
- back(): void;
- forward(): void;
- go(delta?: number): void;
- pushState(data: any, title: string, url?: string | null): void;
- replaceState(data: any, title: string, url?: string | null): void;
-}
-
-declare var History: {
- prototype: History;
- new(): History;
-}
-
-interface IDBCursor {
- readonly direction: string;
- key: IDBKeyRange | IDBValidKey;
- readonly primaryKey: any;
- source: IDBObjectStore | IDBIndex;
- advance(count: number): void;
- continue(key?: IDBKeyRange | IDBValidKey): void;
- delete(): IDBRequest;
- update(value: any): IDBRequest;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-declare var IDBCursor: {
- prototype: IDBCursor;
- new(): IDBCursor;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-interface IDBCursorWithValue extends IDBCursor {
- readonly value: any;
-}
-
-declare var IDBCursorWithValue: {
- prototype: IDBCursorWithValue;
- new(): IDBCursorWithValue;
-}
-
-interface IDBDatabaseEventMap {
- "abort": Event;
- "error": ErrorEvent;
-}
-
-interface IDBDatabase extends EventTarget {
- readonly name: string;
- readonly objectStoreNames: DOMStringList;
- onabort: (this: IDBDatabase, ev: Event) => any;
- onerror: (this: IDBDatabase, ev: ErrorEvent) => any;
- version: number;
- onversionchange: (ev: IDBVersionChangeEvent) => any;
- close(): void;
- createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
- deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
- addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
- addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBDatabase: {
- prototype: IDBDatabase;
- new(): IDBDatabase;
-}
-
-interface IDBFactory {
- cmp(first: any, second: any): number;
- deleteDatabase(name: string): IDBOpenDBRequest;
- open(name: string, version?: number): IDBOpenDBRequest;
-}
-
-declare var IDBFactory: {
- prototype: IDBFactory;
- new(): IDBFactory;
-}
-
-interface IDBIndex {
- keyPath: string | string[];
- readonly name: string;
- readonly objectStore: IDBObjectStore;
- readonly unique: boolean;
- multiEntry: boolean;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- get(key: IDBKeyRange | IDBValidKey): IDBRequest;
- getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
-}
-
-declare var IDBIndex: {
- prototype: IDBIndex;
- new(): IDBIndex;
-}
-
-interface IDBKeyRange {
- readonly lower: any;
- readonly lowerOpen: boolean;
- readonly upper: any;
- readonly upperOpen: boolean;
-}
-
-declare var IDBKeyRange: {
- prototype: IDBKeyRange;
- new(): IDBKeyRange;
- bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
- lowerBound(lower: any, open?: boolean): IDBKeyRange;
- only(value: any): IDBKeyRange;
- upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
-
-interface IDBObjectStore {
- readonly indexNames: DOMStringList;
- keyPath: string | string[];
- readonly name: string;
- readonly transaction: IDBTransaction;
- autoIncrement: boolean;
- add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
- clear(): IDBRequest;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
- delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
- deleteIndex(indexName: string): void;
- get(key: any): IDBRequest;
- index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
-}
-
-declare var IDBObjectStore: {
- prototype: IDBObjectStore;
- new(): IDBObjectStore;
-}
-
-interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
- "blocked": Event;
- "upgradeneeded": IDBVersionChangeEvent;
-}
-
-interface IDBOpenDBRequest extends IDBRequest {
- onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
- onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
- addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBOpenDBRequest: {
- prototype: IDBOpenDBRequest;
- new(): IDBOpenDBRequest;
-}
-
-interface IDBRequestEventMap {
- "error": ErrorEvent;
- "success": Event;
-}
-
-interface IDBRequest extends EventTarget {
- readonly error: DOMError;
- onerror: (this: IDBRequest, ev: ErrorEvent) => any;
- onsuccess: (this: IDBRequest, ev: Event) => any;
- readonly readyState: string;
- readonly result: any;
- source: IDBObjectStore | IDBIndex | IDBCursor;
- readonly transaction: IDBTransaction;
- addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBRequest: {
- prototype: IDBRequest;
- new(): IDBRequest;
-}
-
-interface IDBTransactionEventMap {
- "abort": Event;
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface IDBTransaction extends EventTarget {
- readonly db: IDBDatabase;
- readonly error: DOMError;
- readonly mode: string;
- onabort: (this: IDBTransaction, ev: Event) => any;
- oncomplete: (this: IDBTransaction, ev: Event) => any;
- onerror: (this: IDBTransaction, ev: ErrorEvent) => any;
- abort(): void;
- objectStore(name: string): IDBObjectStore;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
- addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBTransaction: {
- prototype: IDBTransaction;
- new(): IDBTransaction;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
-}
-
-interface IDBVersionChangeEvent extends Event {
- readonly newVersion: number | null;
- readonly oldVersion: number;
-}
-
-declare var IDBVersionChangeEvent: {
- prototype: IDBVersionChangeEvent;
- new(): IDBVersionChangeEvent;
-}
-
-interface ImageData {
- data: Uint8ClampedArray;
- readonly height: number;
- readonly width: number;
-}
-
-declare var ImageData: {
- prototype: ImageData;
- new(width: number, height: number): ImageData;
- new(array: Uint8ClampedArray, width: number, height: number): ImageData;
-}
-
-interface KeyboardEvent extends UIEvent {
- readonly altKey: boolean;
- readonly char: string | null;
- readonly charCode: number;
- readonly ctrlKey: boolean;
- readonly key: string;
- readonly keyCode: number;
- readonly locale: string;
- readonly location: number;
- readonly metaKey: boolean;
- readonly repeat: boolean;
- readonly shiftKey: boolean;
- readonly which: number;
- readonly code: string;
- getModifierState(keyArg: string): boolean;
- initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-declare var KeyboardEvent: {
- prototype: KeyboardEvent;
- new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-interface ListeningStateChangedEvent extends Event {
- readonly label: string;
- readonly state: string;
-}
-
-declare var ListeningStateChangedEvent: {
- prototype: ListeningStateChangedEvent;
- new(): ListeningStateChangedEvent;
-}
-
-interface Location {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- assign(url: string): void;
- reload(forcedReload?: boolean): void;
- replace(url: string): void;
- toString(): string;
-}
-
-declare var Location: {
- prototype: Location;
- new(): Location;
-}
-
-interface LongRunningScriptDetectedEvent extends Event {
- readonly executionTime: number;
- stopPageScriptExecution: boolean;
-}
-
-declare var LongRunningScriptDetectedEvent: {
- prototype: LongRunningScriptDetectedEvent;
- new(): LongRunningScriptDetectedEvent;
-}
-
-interface MSApp {
- clearTemporaryWebDataAsync(): MSAppAsyncOperation;
- createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
- createDataPackage(object: any): any;
- createDataPackageFromSelection(): any;
- createFileFromStorageFile(storageFile: any): File;
- createStreamFromInputStream(type: string, inputStream: any): MSStream;
- execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
- execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
- getCurrentPriority(): string;
- getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
- getViewId(view: any): any;
- isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
- pageHandlesAllApplicationActivations(enabled: boolean): void;
- suppressSubdownloadCredentialPrompts(suppress: boolean): void;
- terminateApp(exceptionObject: any): void;
- readonly CURRENT: string;
- readonly HIGH: string;
- readonly IDLE: string;
- readonly NORMAL: string;
-}
-declare var MSApp: MSApp;
-
-interface MSAppAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSAppAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
- onerror: (this: MSAppAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSAppAsyncOperation: {
- prototype: MSAppAsyncOperation;
- new(): MSAppAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
-}
-
-interface MSAssertion {
- readonly id: string;
- readonly type: string;
-}
-
-declare var MSAssertion: {
- prototype: MSAssertion;
- new(): MSAssertion;
-}
-
-interface MSBlobBuilder {
- append(data: any, endings?: string): void;
- getBlob(contentType?: string): Blob;
-}
-
-declare var MSBlobBuilder: {
- prototype: MSBlobBuilder;
- new(): MSBlobBuilder;
-}
-
-interface MSCredentials {
- getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
- makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
-}
-
-declare var MSCredentials: {
- prototype: MSCredentials;
- new(): MSCredentials;
-}
-
-interface MSFIDOCredentialAssertion extends MSAssertion {
- readonly algorithm: string | Algorithm;
- readonly attestation: any;
- readonly publicKey: string;
- readonly transportHints: string[];
-}
-
-declare var MSFIDOCredentialAssertion: {
- prototype: MSFIDOCredentialAssertion;
- new(): MSFIDOCredentialAssertion;
-}
-
-interface MSFIDOSignature {
- readonly authnrData: string;
- readonly clientData: string;
- readonly signature: string;
-}
-
-declare var MSFIDOSignature: {
- prototype: MSFIDOSignature;
- new(): MSFIDOSignature;
-}
-
-interface MSFIDOSignatureAssertion extends MSAssertion {
- readonly signature: MSFIDOSignature;
-}
-
-declare var MSFIDOSignatureAssertion: {
- prototype: MSFIDOSignatureAssertion;
- new(): MSFIDOSignatureAssertion;
-}
-
-interface MSGesture {
- target: Element;
- addPointer(pointerId: number): void;
- stop(): void;
-}
-
-declare var MSGesture: {
- prototype: MSGesture;
- new(): MSGesture;
-}
-
-interface MSGestureEvent extends UIEvent {
- readonly clientX: number;
- readonly clientY: number;
- readonly expansion: number;
- readonly gestureObject: any;
- readonly hwTimestamp: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly rotation: number;
- readonly scale: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly translationX: number;
- readonly translationY: number;
- readonly velocityAngular: number;
- readonly velocityExpansion: number;
- readonly velocityX: number;
- readonly velocityY: number;
- initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-declare var MSGestureEvent: {
- prototype: MSGestureEvent;
- new(): MSGestureEvent;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-interface MSGraphicsTrust {
- readonly constrictionActive: boolean;
- readonly status: string;
-}
-
-declare var MSGraphicsTrust: {
- prototype: MSGraphicsTrust;
- new(): MSGraphicsTrust;
-}
-
-interface MSHTMLWebViewElement extends HTMLElement {
- readonly canGoBack: boolean;
- readonly canGoForward: boolean;
- readonly containsFullScreenElement: boolean;
- readonly documentTitle: string;
- height: number;
- readonly settings: MSWebViewSettings;
- src: string;
- width: number;
- addWebAllowedObject(name: string, applicationObject: any): void;
- buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
- capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
- captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
- getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
- getDeferredPermissionRequests(): DeferredPermissionRequest[];
- goBack(): void;
- goForward(): void;
- invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
- navigate(uri: string): void;
- navigateToLocalStreamUri(source: string, streamResolver: any): void;
- navigateToString(contents: string): void;
- navigateWithHttpRequestMessage(requestMessage: any): void;
- refresh(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSHTMLWebViewElement: {
- prototype: MSHTMLWebViewElement;
- new(): MSHTMLWebViewElement;
-}
-
-interface MSInputMethodContextEventMap {
- "MSCandidateWindowHide": Event;
- "MSCandidateWindowShow": Event;
- "MSCandidateWindowUpdate": Event;
-}
-
-interface MSInputMethodContext extends EventTarget {
- readonly compositionEndOffset: number;
- readonly compositionStartOffset: number;
- oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
- readonly target: HTMLElement;
- getCandidateWindowClientRect(): ClientRect;
- getCompositionAlternatives(): string[];
- hasComposition(): boolean;
- isCandidateWindowVisible(): boolean;
- addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSInputMethodContext: {
- prototype: MSInputMethodContext;
- new(): MSInputMethodContext;
-}
-
-interface MSManipulationEvent extends UIEvent {
- readonly currentState: number;
- readonly inertiaDestinationX: number;
- readonly inertiaDestinationY: number;
- readonly lastState: number;
- initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-declare var MSManipulationEvent: {
- prototype: MSManipulationEvent;
- new(): MSManipulationEvent;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-interface MSMediaKeyError {
- readonly code: number;
- readonly systemCode: number;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-declare var MSMediaKeyError: {
- prototype: MSMediaKeyError;
- new(): MSMediaKeyError;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-interface MSMediaKeyMessageEvent extends Event {
- readonly destinationURL: string | null;
- readonly message: Uint8Array;
-}
-
-declare var MSMediaKeyMessageEvent: {
- prototype: MSMediaKeyMessageEvent;
- new(): MSMediaKeyMessageEvent;
-}
-
-interface MSMediaKeyNeededEvent extends Event {
- readonly initData: Uint8Array | null;
-}
-
-declare var MSMediaKeyNeededEvent: {
- prototype: MSMediaKeyNeededEvent;
- new(): MSMediaKeyNeededEvent;
-}
-
-interface MSMediaKeySession extends EventTarget {
- readonly error: MSMediaKeyError | null;
- readonly keySystem: string;
- readonly sessionId: string;
- close(): void;
- update(key: Uint8Array): void;
-}
-
-declare var MSMediaKeySession: {
- prototype: MSMediaKeySession;
- new(): MSMediaKeySession;
-}
-
-interface MSMediaKeys {
- readonly keySystem: string;
- createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
-}
-
-declare var MSMediaKeys: {
- prototype: MSMediaKeys;
- new(keySystem: string): MSMediaKeys;
- isTypeSupported(keySystem: string, type?: string): boolean;
- isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
-}
-
-interface MSPointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var MSPointerEvent: {
- prototype: MSPointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
-
-interface MSRangeCollection {
- readonly length: number;
- item(index: number): Range;
- [index: number]: Range;
-}
-
-declare var MSRangeCollection: {
- prototype: MSRangeCollection;
- new(): MSRangeCollection;
-}
-
-interface MSSiteModeEvent extends Event {
- readonly actionURL: string;
- readonly buttonID: number;
-}
-
-declare var MSSiteModeEvent: {
- prototype: MSSiteModeEvent;
- new(): MSSiteModeEvent;
-}
-
-interface MSStream {
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
-}
-
-declare var MSStream: {
- prototype: MSStream;
- new(): MSStream;
-}
-
-interface MSStreamReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(stream: MSStream, size?: number): void;
- readAsBinaryString(stream: MSStream, size?: number): void;
- readAsBlob(stream: MSStream, size?: number): void;
- readAsDataURL(stream: MSStream, size?: number): void;
- readAsText(stream: MSStream, encoding?: string, size?: number): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSStreamReader: {
- prototype: MSStreamReader;
- new(): MSStreamReader;
-}
-
-interface MSWebViewAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSWebViewAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
- onerror: (this: MSWebViewAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- readonly target: MSHTMLWebViewElement;
- readonly type: number;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
- addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSWebViewAsyncOperation: {
- prototype: MSWebViewAsyncOperation;
- new(): MSWebViewAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
-}
-
-interface MSWebViewSettings {
- isIndexedDBEnabled: boolean;
- isJavaScriptEnabled: boolean;
-}
-
-declare var MSWebViewSettings: {
- prototype: MSWebViewSettings;
- new(): MSWebViewSettings;
-}
-
-interface MediaDeviceInfo {
- readonly deviceId: string;
- readonly groupId: string;
- readonly kind: string;
- readonly label: string;
-}
-
-declare var MediaDeviceInfo: {
- prototype: MediaDeviceInfo;
- new(): MediaDeviceInfo;
-}
-
-interface MediaDevicesEventMap {
- "devicechange": Event;
-}
-
-interface MediaDevices extends EventTarget {
- ondevicechange: (this: MediaDevices, ev: Event) => any;
- enumerateDevices(): any;
- getSupportedConstraints(): MediaTrackSupportedConstraints;
- getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
- addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaDevices: {
- prototype: MediaDevices;
- new(): MediaDevices;
-}
-
-interface MediaElementAudioSourceNode extends AudioNode {
-}
-
-declare var MediaElementAudioSourceNode: {
- prototype: MediaElementAudioSourceNode;
- new(): MediaElementAudioSourceNode;
-}
-
-interface MediaEncryptedEvent extends Event {
- readonly initData: ArrayBuffer | null;
- readonly initDataType: string;
-}
-
-declare var MediaEncryptedEvent: {
- prototype: MediaEncryptedEvent;
- new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
-}
-
-interface MediaError {
- readonly code: number;
- readonly msExtendedCode: number;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-declare var MediaError: {
- prototype: MediaError;
- new(): MediaError;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-interface MediaKeyMessageEvent extends Event {
- readonly message: ArrayBuffer;
- readonly messageType: string;
-}
-
-declare var MediaKeyMessageEvent: {
- prototype: MediaKeyMessageEvent;
- new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
-}
-
-interface MediaKeySession extends EventTarget {
- readonly closed: PromiseLike<void>;
- readonly expiration: number;
- readonly keyStatuses: MediaKeyStatusMap;
- readonly sessionId: string;
- close(): PromiseLike<void>;
- generateRequest(initDataType: string, initData: any): PromiseLike<void>;
- load(sessionId: string): PromiseLike<boolean>;
- remove(): PromiseLike<void>;
- update(response: any): PromiseLike<void>;
-}
-
-declare var MediaKeySession: {
- prototype: MediaKeySession;
- new(): MediaKeySession;
-}
-
-interface MediaKeyStatusMap {
- readonly size: number;
- forEach(callback: ForEachCallback): void;
- get(keyId: any): string;
- has(keyId: any): boolean;
-}
-
-declare var MediaKeyStatusMap: {
- prototype: MediaKeyStatusMap;
- new(): MediaKeyStatusMap;
-}
-
-interface MediaKeySystemAccess {
- readonly keySystem: string;
- createMediaKeys(): PromiseLike<MediaKeys>;
- getConfiguration(): MediaKeySystemConfiguration;
-}
-
-declare var MediaKeySystemAccess: {
- prototype: MediaKeySystemAccess;
- new(): MediaKeySystemAccess;
-}
-
-interface MediaKeys {
- createSession(sessionType?: string): MediaKeySession;
- setServerCertificate(serverCertificate: any): PromiseLike<void>;
-}
-
-declare var MediaKeys: {
- prototype: MediaKeys;
- new(): MediaKeys;
-}
-
-interface MediaList {
- readonly length: number;
- mediaText: string;
- appendMedium(newMedium: string): void;
- deleteMedium(oldMedium: string): void;
- item(index: number): string;
- toString(): string;
- [index: number]: string;
-}
-
-declare var MediaList: {
- prototype: MediaList;
- new(): MediaList;
-}
-
-interface MediaQueryList {
- readonly matches: boolean;
- readonly media: string;
- addListener(listener: MediaQueryListListener): void;
- removeListener(listener: MediaQueryListListener): void;
-}
-
-declare var MediaQueryList: {
- prototype: MediaQueryList;
- new(): MediaQueryList;
-}
-
-interface MediaSource extends EventTarget {
- readonly activeSourceBuffers: SourceBufferList;
- duration: number;
- readonly readyState: string;
- readonly sourceBuffers: SourceBufferList;
- addSourceBuffer(type: string): SourceBuffer;
- endOfStream(error?: number): void;
- removeSourceBuffer(sourceBuffer: SourceBuffer): void;
-}
-
-declare var MediaSource: {
- prototype: MediaSource;
- new(): MediaSource;
- isTypeSupported(type: string): boolean;
-}
-
-interface MediaStreamEventMap {
- "active": Event;
- "addtrack": TrackEvent;
- "inactive": Event;
- "removetrack": TrackEvent;
-}
-
-interface MediaStream extends EventTarget {
- readonly active: boolean;
- readonly id: string;
- onactive: (this: MediaStream, ev: Event) => any;
- onaddtrack: (this: MediaStream, ev: TrackEvent) => any;
- oninactive: (this: MediaStream, ev: Event) => any;
- onremovetrack: (this: MediaStream, ev: TrackEvent) => any;
- addTrack(track: MediaStreamTrack): void;
- clone(): MediaStream;
- getAudioTracks(): MediaStreamTrack[];
- getTrackById(trackId: string): MediaStreamTrack | null;
- getTracks(): MediaStreamTrack[];
- getVideoTracks(): MediaStreamTrack[];
- removeTrack(track: MediaStreamTrack): void;
- stop(): void;
- addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStream: {
- prototype: MediaStream;
- new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
-}
-
-interface MediaStreamAudioSourceNode extends AudioNode {
-}
-
-declare var MediaStreamAudioSourceNode: {
- prototype: MediaStreamAudioSourceNode;
- new(): MediaStreamAudioSourceNode;
-}
-
-interface MediaStreamError {
- readonly constraintName: string | null;
- readonly message: string | null;
- readonly name: string;
-}
-
-declare var MediaStreamError: {
- prototype: MediaStreamError;
- new(): MediaStreamError;
-}
-
-interface MediaStreamErrorEvent extends Event {
- readonly error: MediaStreamError | null;
-}
-
-declare var MediaStreamErrorEvent: {
- prototype: MediaStreamErrorEvent;
- new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
-}
-
-interface MediaStreamTrackEventMap {
- "ended": MediaStreamErrorEvent;
- "mute": Event;
- "overconstrained": MediaStreamErrorEvent;
- "unmute": Event;
-}
-
-interface MediaStreamTrack extends EventTarget {
- enabled: boolean;
- readonly id: string;
- readonly kind: string;
- readonly label: string;
- readonly muted: boolean;
- onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onmute: (this: MediaStreamTrack, ev: Event) => any;
- onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onunmute: (this: MediaStreamTrack, ev: Event) => any;
- readonly readonly: boolean;
- readonly readyState: string;
- readonly remote: boolean;
- applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
- clone(): MediaStreamTrack;
- getCapabilities(): MediaTrackCapabilities;
- getConstraints(): MediaTrackConstraints;
- getSettings(): MediaTrackSettings;
- stop(): void;
- addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStreamTrack: {
- prototype: MediaStreamTrack;
- new(): MediaStreamTrack;
-}
-
-interface MediaStreamTrackEvent extends Event {
- readonly track: MediaStreamTrack;
-}
-
-declare var MediaStreamTrackEvent: {
- prototype: MediaStreamTrackEvent;
- new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
-}
-
-interface MessageChannel {
- readonly port1: MessagePort;
- readonly port2: MessagePort;
-}
-
-declare var MessageChannel: {
- prototype: MessageChannel;
- new(): MessageChannel;
-}
-
-interface MessageEvent extends Event {
- readonly data: any;
- readonly origin: string;
- readonly ports: any;
- readonly source: Window;
- initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
-}
-
-declare var MessageEvent: {
- prototype: MessageEvent;
- new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
-}
-
-interface MessagePortEventMap {
- "message": MessageEvent;
-}
-
-interface MessagePort extends EventTarget {
- onmessage: (this: MessagePort, ev: MessageEvent) => any;
- close(): void;
- postMessage(message?: any, ports?: any): void;
- start(): void;
- addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MessagePort: {
- prototype: MessagePort;
- new(): MessagePort;
-}
-
-interface MimeType {
- readonly description: string;
- readonly enabledPlugin: Plugin;
- readonly suffixes: string;
- readonly type: string;
-}
-
-declare var MimeType: {
- prototype: MimeType;
- new(): MimeType;
-}
-
-interface MimeTypeArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(type: string): Plugin;
- [index: number]: Plugin;
-}
-
-declare var MimeTypeArray: {
- prototype: MimeTypeArray;
- new(): MimeTypeArray;
-}
-
-interface MouseEvent extends UIEvent {
- readonly altKey: boolean;
- readonly button: number;
- readonly buttons: number;
- readonly clientX: number;
- readonly clientY: number;
- readonly ctrlKey: boolean;
- readonly fromElement: Element;
- readonly layerX: number;
- readonly layerY: number;
- readonly metaKey: boolean;
- readonly movementX: number;
- readonly movementY: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly relatedTarget: EventTarget;
- readonly screenX: number;
- readonly screenY: number;
- readonly shiftKey: boolean;
- readonly toElement: Element;
- readonly which: number;
- readonly x: number;
- readonly y: number;
- getModifierState(keyArg: string): boolean;
- initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
-}
-
-declare var MouseEvent: {
- prototype: MouseEvent;
- new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
-}
-
-interface MutationEvent extends Event {
- readonly attrChange: number;
- readonly attrName: string;
- readonly newValue: string;
- readonly prevValue: string;
- readonly relatedNode: Node;
- initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-declare var MutationEvent: {
- prototype: MutationEvent;
- new(): MutationEvent;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-interface MutationObserver {
- disconnect(): void;
- observe(target: Node, options: MutationObserverInit): void;
- takeRecords(): MutationRecord[];
-}
-
-declare var MutationObserver: {
- prototype: MutationObserver;
- new(callback: MutationCallback): MutationObserver;
-}
-
-interface MutationRecord {
- readonly addedNodes: NodeList;
- readonly attributeName: string | null;
- readonly attributeNamespace: string | null;
- readonly nextSibling: Node | null;
- readonly oldValue: string | null;
- readonly previousSibling: Node | null;
- readonly removedNodes: NodeList;
- readonly target: Node;
- readonly type: string;
-}
-
-declare var MutationRecord: {
- prototype: MutationRecord;
- new(): MutationRecord;
-}
-
-interface NamedNodeMap {
- readonly length: number;
- getNamedItem(name: string): Attr;
- getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- item(index: number): Attr;
- removeNamedItem(name: string): Attr;
- removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- setNamedItem(arg: Attr): Attr;
- setNamedItemNS(arg: Attr): Attr;
- [index: number]: Attr;
-}
-
-declare var NamedNodeMap: {
- prototype: NamedNodeMap;
- new(): NamedNodeMap;
-}
-
-interface NavigationCompletedEvent extends NavigationEvent {
- readonly isSuccess: boolean;
- readonly webErrorStatus: number;
-}
-
-declare var NavigationCompletedEvent: {
- prototype: NavigationCompletedEvent;
- new(): NavigationCompletedEvent;
-}
-
-interface NavigationEvent extends Event {
- readonly uri: string;
-}
-
-declare var NavigationEvent: {
- prototype: NavigationEvent;
- new(): NavigationEvent;
-}
-
-interface NavigationEventWithReferrer extends NavigationEvent {
- readonly referer: string;
-}
-
-declare var NavigationEventWithReferrer: {
- prototype: NavigationEventWithReferrer;
- new(): NavigationEventWithReferrer;
-}
-
-interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {
- readonly appCodeName: string;
- readonly cookieEnabled: boolean;
- readonly language: string;
- readonly maxTouchPoints: number;
- readonly mimeTypes: MimeTypeArray;
- readonly msManipulationViewsEnabled: boolean;
- readonly msMaxTouchPoints: number;
- readonly msPointerEnabled: boolean;
- readonly plugins: PluginArray;
- readonly pointerEnabled: boolean;
- readonly webdriver: boolean;
- readonly hardwareConcurrency: number;
- getGamepads(): Gamepad[];
- javaEnabled(): boolean;
- msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
- requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
- vibrate(pattern: number | number[]): boolean;
-}
-
-declare var Navigator: {
- prototype: Navigator;
- new(): Navigator;
-}
-
-interface Node extends EventTarget {
- readonly attributes: NamedNodeMap;
- readonly baseURI: string | null;
- readonly childNodes: NodeList;
- readonly firstChild: Node | null;
- readonly lastChild: Node | null;
- readonly localName: string | null;
- readonly namespaceURI: string | null;
- readonly nextSibling: Node | null;
- readonly nodeName: string;
- readonly nodeType: number;
- nodeValue: string | null;
- readonly ownerDocument: Document;
- readonly parentElement: HTMLElement | null;
- readonly parentNode: Node | null;
- readonly previousSibling: Node | null;
- textContent: string | null;
- appendChild(newChild: Node): Node;
- cloneNode(deep?: boolean): Node;
- compareDocumentPosition(other: Node): number;
- contains(child: Node): boolean;
- hasAttributes(): boolean;
- hasChildNodes(): boolean;
- insertBefore(newChild: Node, refChild: Node | null): Node;
- isDefaultNamespace(namespaceURI: string | null): boolean;
- isEqualNode(arg: Node): boolean;
- isSameNode(other: Node): boolean;
- lookupNamespaceURI(prefix: string | null): string | null;
- lookupPrefix(namespaceURI: string | null): string | null;
- normalize(): void;
- removeChild(oldChild: Node): Node;
- replaceChild(newChild: Node, oldChild: Node): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-declare var Node: {
- prototype: Node;
- new(): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-interface NodeFilter {
- acceptNode(n: Node): number;
-}
-
-declare var NodeFilter: {
- readonly FILTER_ACCEPT: number;
- readonly FILTER_REJECT: number;
- readonly FILTER_SKIP: number;
- readonly SHOW_ALL: number;
- readonly SHOW_ATTRIBUTE: number;
- readonly SHOW_CDATA_SECTION: number;
- readonly SHOW_COMMENT: number;
- readonly SHOW_DOCUMENT: number;
- readonly SHOW_DOCUMENT_FRAGMENT: number;
- readonly SHOW_DOCUMENT_TYPE: number;
- readonly SHOW_ELEMENT: number;
- readonly SHOW_ENTITY: number;
- readonly SHOW_ENTITY_REFERENCE: number;
- readonly SHOW_NOTATION: number;
- readonly SHOW_PROCESSING_INSTRUCTION: number;
- readonly SHOW_TEXT: number;
-}
-
-interface NodeIterator {
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- detach(): void;
- nextNode(): Node;
- previousNode(): Node;
-}
-
-declare var NodeIterator: {
- prototype: NodeIterator;
- new(): NodeIterator;
-}
-
-interface NodeList {
- readonly length: number;
- item(index: number): Node;
- [index: number]: Node;
-}
-
-declare var NodeList: {
- prototype: NodeList;
- new(): NodeList;
-}
-
-interface OES_element_index_uint {
-}
-
-declare var OES_element_index_uint: {
- prototype: OES_element_index_uint;
- new(): OES_element_index_uint;
-}
-
-interface OES_standard_derivatives {
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-declare var OES_standard_derivatives: {
- prototype: OES_standard_derivatives;
- new(): OES_standard_derivatives;
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-interface OES_texture_float {
-}
-
-declare var OES_texture_float: {
- prototype: OES_texture_float;
- new(): OES_texture_float;
-}
-
-interface OES_texture_float_linear {
-}
-
-declare var OES_texture_float_linear: {
- prototype: OES_texture_float_linear;
- new(): OES_texture_float_linear;
-}
-
-interface OfflineAudioCompletionEvent extends Event {
- readonly renderedBuffer: AudioBuffer;
-}
-
-declare var OfflineAudioCompletionEvent: {
- prototype: OfflineAudioCompletionEvent;
- new(): OfflineAudioCompletionEvent;
-}
-
-interface OfflineAudioContextEventMap {
- "complete": Event;
-}
-
-interface OfflineAudioContext extends AudioContext {
- oncomplete: (this: OfflineAudioContext, ev: Event) => any;
- startRendering(): PromiseLike<AudioBuffer>;
- addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OfflineAudioContext: {
- prototype: OfflineAudioContext;
- new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
-
-interface OscillatorNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface OscillatorNode extends AudioNode {
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
- type: string;
- setPeriodicWave(periodicWave: PeriodicWave): void;
- start(when?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OscillatorNode: {
- prototype: OscillatorNode;
- new(): OscillatorNode;
-}
-
-interface OverflowEvent extends UIEvent {
- readonly horizontalOverflow: boolean;
- readonly orient: number;
- readonly verticalOverflow: boolean;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-declare var OverflowEvent: {
- prototype: OverflowEvent;
- new(): OverflowEvent;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-interface PageTransitionEvent extends Event {
- readonly persisted: boolean;
-}
-
-declare var PageTransitionEvent: {
- prototype: PageTransitionEvent;
- new(): PageTransitionEvent;
-}
-
-interface PannerNode extends AudioNode {
- coneInnerAngle: number;
- coneOuterAngle: number;
- coneOuterGain: number;
- distanceModel: string;
- maxDistance: number;
- panningModel: string;
- refDistance: number;
- rolloffFactor: number;
- setOrientation(x: number, y: number, z: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var PannerNode: {
- prototype: PannerNode;
- new(): PannerNode;
-}
-
-interface PerfWidgetExternal {
- readonly activeNetworkRequestCount: number;
- readonly averageFrameTime: number;
- readonly averagePaintTime: number;
- readonly extraInformationEnabled: boolean;
- readonly independentRenderingEnabled: boolean;
- readonly irDisablingContentString: string;
- readonly irStatusAvailable: boolean;
- readonly maxCpuSpeed: number;
- readonly paintRequestsPerSecond: number;
- readonly performanceCounter: number;
- readonly performanceCounterFrequency: number;
- addEventListener(eventType: string, callback: Function): void;
- getMemoryUsage(): number;
- getProcessCpuUsage(): number;
- getRecentCpuUsage(last: number | null): any;
- getRecentFrames(last: number | null): any;
- getRecentMemoryUsage(last: number | null): any;
- getRecentPaintRequests(last: number | null): any;
- removeEventListener(eventType: string, callback: Function): void;
- repositionWindow(x: number, y: number): void;
- resizeWindow(width: number, height: number): void;
-}
-
-declare var PerfWidgetExternal: {
- prototype: PerfWidgetExternal;
- new(): PerfWidgetExternal;
-}
-
-interface Performance {
- readonly navigation: PerformanceNavigation;
- readonly timing: PerformanceTiming;
- clearMarks(markName?: string): void;
- clearMeasures(measureName?: string): void;
- clearResourceTimings(): void;
- getEntries(): any;
- getEntriesByName(name: string, entryType?: string): any;
- getEntriesByType(entryType: string): any;
- getMarks(markName?: string): any;
- getMeasures(measureName?: string): any;
- mark(markName: string): void;
- measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
- now(): number;
- setResourceTimingBufferSize(maxSize: number): void;
- toJSON(): any;
-}
-
-declare var Performance: {
- prototype: Performance;
- new(): Performance;
-}
-
-interface PerformanceEntry {
- readonly duration: number;
- readonly entryType: string;
- readonly name: string;
- readonly startTime: number;
-}
-
-declare var PerformanceEntry: {
- prototype: PerformanceEntry;
- new(): PerformanceEntry;
-}
-
-interface PerformanceMark extends PerformanceEntry {
-}
-
-declare var PerformanceMark: {
- prototype: PerformanceMark;
- new(): PerformanceMark;
-}
-
-interface PerformanceMeasure extends PerformanceEntry {
-}
-
-declare var PerformanceMeasure: {
- prototype: PerformanceMeasure;
- new(): PerformanceMeasure;
-}
-
-interface PerformanceNavigation {
- readonly redirectCount: number;
- readonly type: number;
- toJSON(): any;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-declare var PerformanceNavigation: {
- prototype: PerformanceNavigation;
- new(): PerformanceNavigation;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-interface PerformanceNavigationTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly navigationStart: number;
- readonly redirectCount: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly type: string;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
-}
-
-declare var PerformanceNavigationTiming: {
- prototype: PerformanceNavigationTiming;
- new(): PerformanceNavigationTiming;
-}
-
-interface PerformanceResourceTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly initiatorType: string;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
-}
-
-declare var PerformanceResourceTiming: {
- prototype: PerformanceResourceTiming;
- new(): PerformanceResourceTiming;
-}
-
-interface PerformanceTiming {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly msFirstPaint: number;
- readonly navigationStart: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
- readonly secureConnectionStart: number;
- toJSON(): any;
-}
-
-declare var PerformanceTiming: {
- prototype: PerformanceTiming;
- new(): PerformanceTiming;
-}
-
-interface PeriodicWave {
-}
-
-declare var PeriodicWave: {
- prototype: PeriodicWave;
- new(): PeriodicWave;
-}
-
-interface PermissionRequest extends DeferredPermissionRequest {
- readonly state: string;
- defer(): void;
-}
-
-declare var PermissionRequest: {
- prototype: PermissionRequest;
- new(): PermissionRequest;
-}
-
-interface PermissionRequestedEvent extends Event {
- readonly permissionRequest: PermissionRequest;
-}
-
-declare var PermissionRequestedEvent: {
- prototype: PermissionRequestedEvent;
- new(): PermissionRequestedEvent;
-}
-
-interface Plugin {
- readonly description: string;
- readonly filename: string;
- readonly length: number;
- readonly name: string;
- readonly version: string;
- item(index: number): MimeType;
- namedItem(type: string): MimeType;
- [index: number]: MimeType;
-}
-
-declare var Plugin: {
- prototype: Plugin;
- new(): Plugin;
-}
-
-interface PluginArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(name: string): Plugin;
- refresh(reload?: boolean): void;
- [index: number]: Plugin;
-}
-
-declare var PluginArray: {
- prototype: PluginArray;
- new(): PluginArray;
-}
-
-interface PointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var PointerEvent: {
- prototype: PointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
-
-interface PopStateEvent extends Event {
- readonly state: any;
- initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
-}
-
-declare var PopStateEvent: {
- prototype: PopStateEvent;
- new(): PopStateEvent;
-}
-
-interface Position {
- readonly coords: Coordinates;
- readonly timestamp: number;
-}
-
-declare var Position: {
- prototype: Position;
- new(): Position;
-}
-
-interface PositionError {
- readonly code: number;
- readonly message: string;
- toString(): string;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-declare var PositionError: {
- prototype: PositionError;
- new(): PositionError;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-interface ProcessingInstruction extends CharacterData {
- readonly target: string;
-}
-
-declare var ProcessingInstruction: {
- prototype: ProcessingInstruction;
- new(): ProcessingInstruction;
-}
-
-interface ProgressEvent extends Event {
- readonly lengthComputable: boolean;
- readonly loaded: number;
- readonly total: number;
- initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
-}
-
-declare var ProgressEvent: {
- prototype: ProgressEvent;
- new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
-
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
-}
-
-declare var RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtlsTransportEventMap {
- "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
- "error": ErrorEvent;
-}
-
-interface RTCDtlsTransport extends RTCStatsProvider {
- ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
- onerror: ((this: RTCDtlsTransport, ev: ErrorEvent) => any) | null;
- readonly state: string;
- readonly transport: RTCIceTransport;
- getLocalParameters(): RTCDtlsParameters;
- getRemoteCertificates(): ArrayBuffer[];
- getRemoteParameters(): RTCDtlsParameters | null;
- start(remoteParameters: RTCDtlsParameters): void;
- stop(): void;
- addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtlsTransport: {
- prototype: RTCDtlsTransport;
- new(transport: RTCIceTransport): RTCDtlsTransport;
-}
-
-interface RTCDtlsTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCDtlsTransportStateChangedEvent: {
- prototype: RTCDtlsTransportStateChangedEvent;
- new(): RTCDtlsTransportStateChangedEvent;
-}
-
-interface RTCDtmfSenderEventMap {
- "tonechange": RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtmfSender extends EventTarget {
- readonly canInsertDTMF: boolean;
- readonly duration: number;
- readonly interToneGap: number;
- ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
- readonly sender: RTCRtpSender;
- readonly toneBuffer: string;
- insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
- addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtmfSender: {
- prototype: RTCDtmfSender;
- new(sender: RTCRtpSender): RTCDtmfSender;
-}
-
-interface RTCIceCandidatePairChangedEvent extends Event {
- readonly pair: RTCIceCandidatePair;
-}
-
-declare var RTCIceCandidatePairChangedEvent: {
- prototype: RTCIceCandidatePairChangedEvent;
- new(): RTCIceCandidatePairChangedEvent;
-}
-
-interface RTCIceGathererEventMap {
- "error": ErrorEvent;
- "localcandidate": RTCIceGathererEvent;
-}
-
-interface RTCIceGatherer extends RTCStatsProvider {
- readonly component: string;
- onerror: ((this: RTCIceGatherer, ev: ErrorEvent) => any) | null;
- onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
- createAssociatedGatherer(): RTCIceGatherer;
- getLocalCandidates(): RTCIceCandidate[];
- getLocalParameters(): RTCIceParameters;
- addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceGatherer: {
- prototype: RTCIceGatherer;
- new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
-
-interface RTCIceGathererEvent extends Event {
- readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;
-}
-
-declare var RTCIceGathererEvent: {
- prototype: RTCIceGathererEvent;
- new(): RTCIceGathererEvent;
-}
-
-interface RTCIceTransportEventMap {
- "candidatepairchange": RTCIceCandidatePairChangedEvent;
- "icestatechange": RTCIceTransportStateChangedEvent;
-}
-
-interface RTCIceTransport extends RTCStatsProvider {
- readonly component: string;
- readonly iceGatherer: RTCIceGatherer | null;
- oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
- onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
- readonly role: string;
- readonly state: string;
- addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;
- createAssociatedTransport(): RTCIceTransport;
- getNominatedCandidatePair(): RTCIceCandidatePair | null;
- getRemoteCandidates(): RTCIceCandidate[];
- getRemoteParameters(): RTCIceParameters | null;
- setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;
- start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;
- stop(): void;
- addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceTransport: {
- prototype: RTCIceTransport;
- new(): RTCIceTransport;
-}
-
-interface RTCIceTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCIceTransportStateChangedEvent: {
- prototype: RTCIceTransportStateChangedEvent;
- new(): RTCIceTransportStateChangedEvent;
-}
-
-interface RTCRtpReceiverEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCRtpReceiver extends RTCStatsProvider {
- onerror: ((this: RTCRtpReceiver, ev: ErrorEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack | null;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- getContributingSources(): RTCRtpContributingSource[];
- receive(parameters: RTCRtpParameters): void;
- requestSendCSRC(csrc: number): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpReceiver: {
- prototype: RTCRtpReceiver;
- new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCRtpSenderEventMap {
- "error": ErrorEvent;
- "ssrcconflict": RTCSsrcConflictEvent;
-}
-
-interface RTCRtpSender extends RTCStatsProvider {
- onerror: ((this: RTCRtpSender, ev: ErrorEvent) => any) | null;
- onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- send(parameters: RTCRtpParameters): void;
- setTrack(track: MediaStreamTrack): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpSender: {
- prototype: RTCRtpSender;
- new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCSrtpSdesTransportEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCSrtpSdesTransport extends EventTarget {
- onerror: ((this: RTCSrtpSdesTransport, ev: ErrorEvent) => any) | null;
- readonly transport: RTCIceTransport;
- addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCSrtpSdesTransport: {
- prototype: RTCSrtpSdesTransport;
- new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
- getLocalParameters(): RTCSrtpSdesParameters[];
-}
-
-interface RTCSsrcConflictEvent extends Event {
- readonly ssrc: number;
-}
-
-declare var RTCSsrcConflictEvent: {
- prototype: RTCSsrcConflictEvent;
- new(): RTCSsrcConflictEvent;
-}
-
-interface RTCStatsProvider extends EventTarget {
- getStats(): PromiseLike<RTCStatsReport>;
- msGetStats(): PromiseLike<RTCStatsReport>;
-}
-
-declare var RTCStatsProvider: {
- prototype: RTCStatsProvider;
- new(): RTCStatsProvider;
-}
-
-interface Range {
- readonly collapsed: boolean;
- readonly commonAncestorContainer: Node;
- readonly endContainer: Node;
- readonly endOffset: number;
- readonly startContainer: Node;
- readonly startOffset: number;
- cloneContents(): DocumentFragment;
- cloneRange(): Range;
- collapse(toStart: boolean): void;
- compareBoundaryPoints(how: number, sourceRange: Range): number;
- createContextualFragment(fragment: string): DocumentFragment;
- deleteContents(): void;
- detach(): void;
- expand(Unit: string): boolean;
- extractContents(): DocumentFragment;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- insertNode(newNode: Node): void;
- selectNode(refNode: Node): void;
- selectNodeContents(refNode: Node): void;
- setEnd(refNode: Node, offset: number): void;
- setEndAfter(refNode: Node): void;
- setEndBefore(refNode: Node): void;
- setStart(refNode: Node, offset: number): void;
- setStartAfter(refNode: Node): void;
- setStartBefore(refNode: Node): void;
- surroundContents(newParent: Node): void;
- toString(): string;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-declare var Range: {
- prototype: Range;
- new(): Range;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly target: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGAElement: {
- prototype: SVGAElement;
- new(): SVGAElement;
-}
-
-interface SVGAngle {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-declare var SVGAngle: {
- prototype: SVGAngle;
- new(): SVGAngle;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-interface SVGAnimatedAngle {
- readonly animVal: SVGAngle;
- readonly baseVal: SVGAngle;
-}
-
-declare var SVGAnimatedAngle: {
- prototype: SVGAnimatedAngle;
- new(): SVGAnimatedAngle;
-}
-
-interface SVGAnimatedBoolean {
- readonly animVal: boolean;
- baseVal: boolean;
-}
-
-declare var SVGAnimatedBoolean: {
- prototype: SVGAnimatedBoolean;
- new(): SVGAnimatedBoolean;
-}
-
-interface SVGAnimatedEnumeration {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedEnumeration: {
- prototype: SVGAnimatedEnumeration;
- new(): SVGAnimatedEnumeration;
-}
-
-interface SVGAnimatedInteger {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedInteger: {
- prototype: SVGAnimatedInteger;
- new(): SVGAnimatedInteger;
-}
-
-interface SVGAnimatedLength {
- readonly animVal: SVGLength;
- readonly baseVal: SVGLength;
-}
-
-declare var SVGAnimatedLength: {
- prototype: SVGAnimatedLength;
- new(): SVGAnimatedLength;
-}
-
-interface SVGAnimatedLengthList {
- readonly animVal: SVGLengthList;
- readonly baseVal: SVGLengthList;
-}
-
-declare var SVGAnimatedLengthList: {
- prototype: SVGAnimatedLengthList;
- new(): SVGAnimatedLengthList;
-}
-
-interface SVGAnimatedNumber {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedNumber: {
- prototype: SVGAnimatedNumber;
- new(): SVGAnimatedNumber;
-}
-
-interface SVGAnimatedNumberList {
- readonly animVal: SVGNumberList;
- readonly baseVal: SVGNumberList;
-}
-
-declare var SVGAnimatedNumberList: {
- prototype: SVGAnimatedNumberList;
- new(): SVGAnimatedNumberList;
-}
-
-interface SVGAnimatedPreserveAspectRatio {
- readonly animVal: SVGPreserveAspectRatio;
- readonly baseVal: SVGPreserveAspectRatio;
-}
-
-declare var SVGAnimatedPreserveAspectRatio: {
- prototype: SVGAnimatedPreserveAspectRatio;
- new(): SVGAnimatedPreserveAspectRatio;
-}
-
-interface SVGAnimatedRect {
- readonly animVal: SVGRect;
- readonly baseVal: SVGRect;
-}
-
-declare var SVGAnimatedRect: {
- prototype: SVGAnimatedRect;
- new(): SVGAnimatedRect;
-}
-
-interface SVGAnimatedString {
- readonly animVal: string;
- baseVal: string;
-}
-
-declare var SVGAnimatedString: {
- prototype: SVGAnimatedString;
- new(): SVGAnimatedString;
-}
-
-interface SVGAnimatedTransformList {
- readonly animVal: SVGTransformList;
- readonly baseVal: SVGTransformList;
-}
-
-declare var SVGAnimatedTransformList: {
- prototype: SVGAnimatedTransformList;
- new(): SVGAnimatedTransformList;
-}
-
-interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGCircleElement: {
- prototype: SVGCircleElement;
- new(): SVGCircleElement;
-}
-
-interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly clipPathUnits: SVGAnimatedEnumeration;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGClipPathElement: {
- prototype: SVGClipPathElement;
- new(): SVGClipPathElement;
-}
-
-interface SVGComponentTransferFunctionElement extends SVGElement {
- readonly amplitude: SVGAnimatedNumber;
- readonly exponent: SVGAnimatedNumber;
- readonly intercept: SVGAnimatedNumber;
- readonly offset: SVGAnimatedNumber;
- readonly slope: SVGAnimatedNumber;
- readonly tableValues: SVGAnimatedNumberList;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGComponentTransferFunctionElement: {
- prototype: SVGComponentTransferFunctionElement;
- new(): SVGComponentTransferFunctionElement;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
-}
-
-interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDefsElement: {
- prototype: SVGDefsElement;
- new(): SVGDefsElement;
-}
-
-interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDescElement: {
- prototype: SVGDescElement;
- new(): SVGDescElement;
-}
-
-interface SVGElementEventMap extends ElementEventMap {
- "click": MouseEvent;
- "dblclick": MouseEvent;
- "focusin": FocusEvent;
- "focusout": FocusEvent;
- "load": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
-}
-
-interface SVGElement extends Element {
- onclick: (this: SVGElement, ev: MouseEvent) => any;
- ondblclick: (this: SVGElement, ev: MouseEvent) => any;
- onfocusin: (this: SVGElement, ev: FocusEvent) => any;
- onfocusout: (this: SVGElement, ev: FocusEvent) => any;
- onload: (this: SVGElement, ev: Event) => any;
- onmousedown: (this: SVGElement, ev: MouseEvent) => any;
- onmousemove: (this: SVGElement, ev: MouseEvent) => any;
- onmouseout: (this: SVGElement, ev: MouseEvent) => any;
- onmouseover: (this: SVGElement, ev: MouseEvent) => any;
- onmouseup: (this: SVGElement, ev: MouseEvent) => any;
- readonly ownerSVGElement: SVGSVGElement;
- readonly viewportElement: SVGElement;
- xmlbase: string;
- className: any;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGElement: {
- prototype: SVGElement;
- new(): SVGElement;
-}
-
-interface SVGElementInstance extends EventTarget {
- readonly childNodes: SVGElementInstanceList;
- readonly correspondingElement: SVGElement;
- readonly correspondingUseElement: SVGUseElement;
- readonly firstChild: SVGElementInstance;
- readonly lastChild: SVGElementInstance;
- readonly nextSibling: SVGElementInstance;
- readonly parentNode: SVGElementInstance;
- readonly previousSibling: SVGElementInstance;
-}
-
-declare var SVGElementInstance: {
- prototype: SVGElementInstance;
- new(): SVGElementInstance;
-}
-
-interface SVGElementInstanceList {
- readonly length: number;
- item(index: number): SVGElementInstance;
-}
-
-declare var SVGElementInstanceList: {
- prototype: SVGElementInstanceList;
- new(): SVGElementInstanceList;
-}
-
-interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGEllipseElement: {
- prototype: SVGEllipseElement;
- new(): SVGEllipseElement;
-}
-
-interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly mode: SVGAnimatedEnumeration;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEBlendElement: {
- prototype: SVGFEBlendElement;
- new(): SVGFEBlendElement;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
-}
-
-interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly type: SVGAnimatedEnumeration;
- readonly values: SVGAnimatedNumberList;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEColorMatrixElement: {
- prototype: SVGFEColorMatrixElement;
- new(): SVGFEColorMatrixElement;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
-}
-
-interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEComponentTransferElement: {
- prototype: SVGFEComponentTransferElement;
- new(): SVGFEComponentTransferElement;
-}
-
-interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly k1: SVGAnimatedNumber;
- readonly k2: SVGAnimatedNumber;
- readonly k3: SVGAnimatedNumber;
- readonly k4: SVGAnimatedNumber;
- readonly operator: SVGAnimatedEnumeration;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFECompositeElement: {
- prototype: SVGFECompositeElement;
- new(): SVGFECompositeElement;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
-}
-
-interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly bias: SVGAnimatedNumber;
- readonly divisor: SVGAnimatedNumber;
- readonly edgeMode: SVGAnimatedEnumeration;
- readonly in1: SVGAnimatedString;
- readonly kernelMatrix: SVGAnimatedNumberList;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly orderX: SVGAnimatedInteger;
- readonly orderY: SVGAnimatedInteger;
- readonly preserveAlpha: SVGAnimatedBoolean;
- readonly targetX: SVGAnimatedInteger;
- readonly targetY: SVGAnimatedInteger;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEConvolveMatrixElement: {
- prototype: SVGFEConvolveMatrixElement;
- new(): SVGFEConvolveMatrixElement;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
-}
-
-interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly diffuseConstant: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDiffuseLightingElement: {
- prototype: SVGFEDiffuseLightingElement;
- new(): SVGFEDiffuseLightingElement;
-}
-
-interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly scale: SVGAnimatedNumber;
- readonly xChannelSelector: SVGAnimatedEnumeration;
- readonly yChannelSelector: SVGAnimatedEnumeration;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDisplacementMapElement: {
- prototype: SVGFEDisplacementMapElement;
- new(): SVGFEDisplacementMapElement;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
-}
-
-interface SVGFEDistantLightElement extends SVGElement {
- readonly azimuth: SVGAnimatedNumber;
- readonly elevation: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDistantLightElement: {
- prototype: SVGFEDistantLightElement;
- new(): SVGFEDistantLightElement;
-}
-
-interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEFloodElement: {
- prototype: SVGFEFloodElement;
- new(): SVGFEFloodElement;
-}
-
-interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncAElement: {
- prototype: SVGFEFuncAElement;
- new(): SVGFEFuncAElement;
-}
-
-interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncBElement: {
- prototype: SVGFEFuncBElement;
- new(): SVGFEFuncBElement;
-}
-
-interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncGElement: {
- prototype: SVGFEFuncGElement;
- new(): SVGFEFuncGElement;
-}
-
-interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncRElement: {
- prototype: SVGFEFuncRElement;
- new(): SVGFEFuncRElement;
-}
-
-interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly stdDeviationX: SVGAnimatedNumber;
- readonly stdDeviationY: SVGAnimatedNumber;
- setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEGaussianBlurElement: {
- prototype: SVGFEGaussianBlurElement;
- new(): SVGFEGaussianBlurElement;
-}
-
-interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEImageElement: {
- prototype: SVGFEImageElement;
- new(): SVGFEImageElement;
-}
-
-interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeElement: {
- prototype: SVGFEMergeElement;
- new(): SVGFEMergeElement;
-}
-
-interface SVGFEMergeNodeElement extends SVGElement {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeNodeElement: {
- prototype: SVGFEMergeNodeElement;
- new(): SVGFEMergeNodeElement;
-}
-
-interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly operator: SVGAnimatedEnumeration;
- readonly radiusX: SVGAnimatedNumber;
- readonly radiusY: SVGAnimatedNumber;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMorphologyElement: {
- prototype: SVGFEMorphologyElement;
- new(): SVGFEMorphologyElement;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
-}
-
-interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly dx: SVGAnimatedNumber;
- readonly dy: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEOffsetElement: {
- prototype: SVGFEOffsetElement;
- new(): SVGFEOffsetElement;
-}
-
-interface SVGFEPointLightElement extends SVGElement {
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEPointLightElement: {
- prototype: SVGFEPointLightElement;
- new(): SVGFEPointLightElement;
-}
-
-interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly specularConstant: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpecularLightingElement: {
- prototype: SVGFESpecularLightingElement;
- new(): SVGFESpecularLightingElement;
-}
-
-interface SVGFESpotLightElement extends SVGElement {
- readonly limitingConeAngle: SVGAnimatedNumber;
- readonly pointsAtX: SVGAnimatedNumber;
- readonly pointsAtY: SVGAnimatedNumber;
- readonly pointsAtZ: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpotLightElement: {
- prototype: SVGFESpotLightElement;
- new(): SVGFESpotLightElement;
-}
-
-interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETileElement: {
- prototype: SVGFETileElement;
- new(): SVGFETileElement;
-}
-
-interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly baseFrequencyX: SVGAnimatedNumber;
- readonly baseFrequencyY: SVGAnimatedNumber;
- readonly numOctaves: SVGAnimatedInteger;
- readonly seed: SVGAnimatedNumber;
- readonly stitchTiles: SVGAnimatedEnumeration;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETurbulenceElement: {
- prototype: SVGFETurbulenceElement;
- new(): SVGFETurbulenceElement;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
-}
-
-interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly filterResX: SVGAnimatedInteger;
- readonly filterResY: SVGAnimatedInteger;
- readonly filterUnits: SVGAnimatedEnumeration;
- readonly height: SVGAnimatedLength;
- readonly primitiveUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- setFilterRes(filterResX: number, filterResY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFilterElement: {
- prototype: SVGFilterElement;
- new(): SVGFilterElement;
-}
-
-interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGForeignObjectElement: {
- prototype: SVGForeignObjectElement;
- new(): SVGForeignObjectElement;
-}
-
-interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGElement: {
- prototype: SVGGElement;
- new(): SVGGElement;
-}
-
-interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
- readonly gradientTransform: SVGAnimatedTransformList;
- readonly gradientUnits: SVGAnimatedEnumeration;
- readonly spreadMethod: SVGAnimatedEnumeration;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGradientElement: {
- prototype: SVGGradientElement;
- new(): SVGGradientElement;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
-
-interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly height: SVGAnimatedLength;
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGImageElement: {
- prototype: SVGImageElement;
- new(): SVGImageElement;
-}
-
-interface SVGLength {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-declare var SVGLength: {
- prototype: SVGLength;
- new(): SVGLength;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-interface SVGLengthList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGLength): SVGLength;
- clear(): void;
- getItem(index: number): SVGLength;
- initialize(newItem: SVGLength): SVGLength;
- insertItemBefore(newItem: SVGLength, index: number): SVGLength;
- removeItem(index: number): SVGLength;
- replaceItem(newItem: SVGLength, index: number): SVGLength;
-}
-
-declare var SVGLengthList: {
- prototype: SVGLengthList;
- new(): SVGLengthList;
-}
-
-interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
-
-interface SVGLinearGradientElement extends SVGGradientElement {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
-}
-
-declare var SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
-
-interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- readonly markerHeight: SVGAnimatedLength;
- readonly markerUnits: SVGAnimatedEnumeration;
- readonly markerWidth: SVGAnimatedLength;
- readonly orientAngle: SVGAnimatedAngle;
- readonly orientType: SVGAnimatedEnumeration;
- readonly refX: SVGAnimatedLength;
- readonly refY: SVGAnimatedLength;
- setOrientToAngle(angle: SVGAngle): void;
- setOrientToAuto(): void;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMarkerElement: {
- prototype: SVGMarkerElement;
- new(): SVGMarkerElement;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
-}
-
-interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly maskContentUnits: SVGAnimatedEnumeration;
- readonly maskUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMaskElement: {
- prototype: SVGMaskElement;
- new(): SVGMaskElement;
-}
-
-interface SVGMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- flipX(): SVGMatrix;
- flipY(): SVGMatrix;
- inverse(): SVGMatrix;
- multiply(secondMatrix: SVGMatrix): SVGMatrix;
- rotate(angle: number): SVGMatrix;
- rotateFromVector(x: number, y: number): SVGMatrix;
- scale(scaleFactor: number): SVGMatrix;
- scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
- skewX(angle: number): SVGMatrix;
- skewY(angle: number): SVGMatrix;
- translate(x: number, y: number): SVGMatrix;
-}
-
-declare var SVGMatrix: {
- prototype: SVGMatrix;
- new(): SVGMatrix;
-}
-
-interface SVGMetadataElement extends SVGElement {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMetadataElement: {
- prototype: SVGMetadataElement;
- new(): SVGMetadataElement;
-}
-
-interface SVGNumber {
- value: number;
-}
-
-declare var SVGNumber: {
- prototype: SVGNumber;
- new(): SVGNumber;
-}
-
-interface SVGNumberList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGNumber): SVGNumber;
- clear(): void;
- getItem(index: number): SVGNumber;
- initialize(newItem: SVGNumber): SVGNumber;
- insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
- removeItem(index: number): SVGNumber;
- replaceItem(newItem: SVGNumber, index: number): SVGNumber;
-}
-
-declare var SVGNumberList: {
- prototype: SVGNumberList;
- new(): SVGNumberList;
-}
-
-interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {
- createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
- createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
- createSVGPathSegClosePath(): SVGPathSegClosePath;
- createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
- createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
- createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
- createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
- createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
- createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
- createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
- createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
- createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
- createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
- createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
- createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
- createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
- createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
- createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
- createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
- getPathSegAtLength(distance: number): number;
- getPointAtLength(distance: number): SVGPoint;
- getTotalLength(): number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPathElement: {
- prototype: SVGPathElement;
- new(): SVGPathElement;
-}
-
-interface SVGPathSeg {
- readonly pathSegType: number;
- readonly pathSegTypeAsLetter: string;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-declare var SVGPathSeg: {
- prototype: SVGPathSeg;
- new(): SVGPathSeg;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-interface SVGPathSegArcAbs extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcAbs: {
- prototype: SVGPathSegArcAbs;
- new(): SVGPathSegArcAbs;
-}
-
-interface SVGPathSegArcRel extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcRel: {
- prototype: SVGPathSegArcRel;
- new(): SVGPathSegArcRel;
-}
-
-interface SVGPathSegClosePath extends SVGPathSeg {
-}
-
-declare var SVGPathSegClosePath: {
- prototype: SVGPathSegClosePath;
- new(): SVGPathSegClosePath;
-}
-
-interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicAbs: {
- prototype: SVGPathSegCurvetoCubicAbs;
- new(): SVGPathSegCurvetoCubicAbs;
-}
-
-interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicRel: {
- prototype: SVGPathSegCurvetoCubicRel;
- new(): SVGPathSegCurvetoCubicRel;
-}
-
-interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothAbs: {
- prototype: SVGPathSegCurvetoCubicSmoothAbs;
- new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
-
-interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothRel: {
- prototype: SVGPathSegCurvetoCubicSmoothRel;
- new(): SVGPathSegCurvetoCubicSmoothRel;
-}
-
-interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticAbs: {
- prototype: SVGPathSegCurvetoQuadraticAbs;
- new(): SVGPathSegCurvetoQuadraticAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticRel: {
- prototype: SVGPathSegCurvetoQuadraticRel;
- new(): SVGPathSegCurvetoQuadraticRel;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
- prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
- new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothRel: {
- prototype: SVGPathSegCurvetoQuadraticSmoothRel;
- new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
-
-interface SVGPathSegLinetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoAbs: {
- prototype: SVGPathSegLinetoAbs;
- new(): SVGPathSegLinetoAbs;
-}
-
-interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalAbs: {
- prototype: SVGPathSegLinetoHorizontalAbs;
- new(): SVGPathSegLinetoHorizontalAbs;
-}
-
-interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalRel: {
- prototype: SVGPathSegLinetoHorizontalRel;
- new(): SVGPathSegLinetoHorizontalRel;
-}
-
-interface SVGPathSegLinetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoRel: {
- prototype: SVGPathSegLinetoRel;
- new(): SVGPathSegLinetoRel;
-}
-
-interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalAbs: {
- prototype: SVGPathSegLinetoVerticalAbs;
- new(): SVGPathSegLinetoVerticalAbs;
-}
-
-interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalRel: {
- prototype: SVGPathSegLinetoVerticalRel;
- new(): SVGPathSegLinetoVerticalRel;
-}
-
-interface SVGPathSegList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPathSeg): SVGPathSeg;
- clear(): void;
- getItem(index: number): SVGPathSeg;
- initialize(newItem: SVGPathSeg): SVGPathSeg;
- insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
- removeItem(index: number): SVGPathSeg;
- replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
-}
-
-declare var SVGPathSegList: {
- prototype: SVGPathSegList;
- new(): SVGPathSegList;
-}
-
-interface SVGPathSegMovetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoAbs: {
- prototype: SVGPathSegMovetoAbs;
- new(): SVGPathSegMovetoAbs;
-}
-
-interface SVGPathSegMovetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoRel: {
- prototype: SVGPathSegMovetoRel;
- new(): SVGPathSegMovetoRel;
-}
-
-interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly patternContentUnits: SVGAnimatedEnumeration;
- readonly patternTransform: SVGAnimatedTransformList;
- readonly patternUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPatternElement: {
- prototype: SVGPatternElement;
- new(): SVGPatternElement;
-}
-
-interface SVGPoint {
- x: number;
- y: number;
- matrixTransform(matrix: SVGMatrix): SVGPoint;
-}
-
-declare var SVGPoint: {
- prototype: SVGPoint;
- new(): SVGPoint;
-}
-
-interface SVGPointList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPoint): SVGPoint;
- clear(): void;
- getItem(index: number): SVGPoint;
- initialize(newItem: SVGPoint): SVGPoint;
- insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
- removeItem(index: number): SVGPoint;
- replaceItem(newItem: SVGPoint, index: number): SVGPoint;
-}
-
-declare var SVGPointList: {
- prototype: SVGPointList;
- new(): SVGPointList;
-}
-
-interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolygonElement: {
- prototype: SVGPolygonElement;
- new(): SVGPolygonElement;
-}
-
-interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolylineElement: {
- prototype: SVGPolylineElement;
- new(): SVGPolylineElement;
-}
-
-interface SVGPreserveAspectRatio {
- align: number;
- meetOrSlice: number;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-declare var SVGPreserveAspectRatio: {
- prototype: SVGPreserveAspectRatio;
- new(): SVGPreserveAspectRatio;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-interface SVGRadialGradientElement extends SVGGradientElement {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly fx: SVGAnimatedLength;
- readonly fy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
-}
-
-declare var SVGRadialGradientElement: {
- prototype: SVGRadialGradientElement;
- new(): SVGRadialGradientElement;
-}
-
-interface SVGRect {
- height: number;
- width: number;
- x: number;
- y: number;
-}
-
-declare var SVGRect: {
- prototype: SVGRect;
- new(): SVGRect;
-}
-
-interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGRectElement: {
- prototype: SVGRectElement;
- new(): SVGRectElement;
-}
-
-interface SVGSVGElementEventMap extends SVGElementEventMap {
- "SVGAbort": Event;
- "SVGError": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "SVGUnload": Event;
- "SVGZoom": SVGZoomEvent;
-}
-
-interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- contentScriptType: string;
- contentStyleType: string;
- currentScale: number;
- readonly currentTranslate: SVGPoint;
- readonly height: SVGAnimatedLength;
- onabort: (this: SVGSVGElement, ev: Event) => any;
- onerror: (this: SVGSVGElement, ev: Event) => any;
- onresize: (this: SVGSVGElement, ev: UIEvent) => any;
- onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
- onunload: (this: SVGSVGElement, ev: Event) => any;
- onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
- readonly pixelUnitToMillimeterX: number;
- readonly pixelUnitToMillimeterY: number;
- readonly screenPixelToMillimeterX: number;
- readonly screenPixelToMillimeterY: number;
- readonly viewport: SVGRect;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
- checkIntersection(element: SVGElement, rect: SVGRect): boolean;
- createSVGAngle(): SVGAngle;
- createSVGLength(): SVGLength;
- createSVGMatrix(): SVGMatrix;
- createSVGNumber(): SVGNumber;
- createSVGPoint(): SVGPoint;
- createSVGRect(): SVGRect;
- createSVGTransform(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- deselectAll(): void;
- forceRedraw(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getCurrentTime(): number;
- getElementById(elementId: string): Element;
- getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- pauseAnimations(): void;
- setCurrentTime(seconds: number): void;
- suspendRedraw(maxWaitMilliseconds: number): number;
- unpauseAnimations(): void;
- unsuspendRedraw(suspendHandleID: number): void;
- unsuspendRedrawAll(): void;
- addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSVGElement: {
- prototype: SVGSVGElement;
- new(): SVGSVGElement;
-}
-
-interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGScriptElement: {
- prototype: SVGScriptElement;
- new(): SVGScriptElement;
-}
-
-interface SVGStopElement extends SVGElement, SVGStylable {
- readonly offset: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStopElement: {
- prototype: SVGStopElement;
- new(): SVGStopElement;
-}
-
-interface SVGStringList {
- readonly numberOfItems: number;
- appendItem(newItem: string): string;
- clear(): void;
- getItem(index: number): string;
- initialize(newItem: string): string;
- insertItemBefore(newItem: string, index: number): string;
- removeItem(index: number): string;
- replaceItem(newItem: string, index: number): string;
-}
-
-declare var SVGStringList: {
- prototype: SVGStringList;
- new(): SVGStringList;
-}
-
-interface SVGStyleElement extends SVGElement, SVGLangSpace {
- disabled: boolean;
- media: string;
- title: string;
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStyleElement: {
- prototype: SVGStyleElement;
- new(): SVGStyleElement;
-}
-
-interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSwitchElement: {
- prototype: SVGSwitchElement;
- new(): SVGSwitchElement;
-}
-
-interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSymbolElement: {
- prototype: SVGSymbolElement;
- new(): SVGSymbolElement;
-}
-
-interface SVGTSpanElement extends SVGTextPositioningElement {
-}
-
-declare var SVGTSpanElement: {
- prototype: SVGTSpanElement;
- new(): SVGTSpanElement;
-}
-
-interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly lengthAdjust: SVGAnimatedEnumeration;
- readonly textLength: SVGAnimatedLength;
- getCharNumAtPosition(point: SVGPoint): number;
- getComputedTextLength(): number;
- getEndPositionOfChar(charnum: number): SVGPoint;
- getExtentOfChar(charnum: number): SVGRect;
- getNumberOfChars(): number;
- getRotationOfChar(charnum: number): number;
- getStartPositionOfChar(charnum: number): SVGPoint;
- getSubStringLength(charnum: number, nchars: number): number;
- selectSubString(charnum: number, nchars: number): void;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTextContentElement: {
- prototype: SVGTextContentElement;
- new(): SVGTextContentElement;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
-}
-
-interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
-}
-
-declare var SVGTextElement: {
- prototype: SVGTextElement;
- new(): SVGTextElement;
-}
-
-interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
- readonly method: SVGAnimatedEnumeration;
- readonly spacing: SVGAnimatedEnumeration;
- readonly startOffset: SVGAnimatedLength;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-declare var SVGTextPathElement: {
- prototype: SVGTextPathElement;
- new(): SVGTextPathElement;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-interface SVGTextPositioningElement extends SVGTextContentElement {
- readonly dx: SVGAnimatedLengthList;
- readonly dy: SVGAnimatedLengthList;
- readonly rotate: SVGAnimatedNumberList;
- readonly x: SVGAnimatedLengthList;
- readonly y: SVGAnimatedLengthList;
-}
-
-declare var SVGTextPositioningElement: {
- prototype: SVGTextPositioningElement;
- new(): SVGTextPositioningElement;
-}
-
-interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTitleElement: {
- prototype: SVGTitleElement;
- new(): SVGTitleElement;
-}
-
-interface SVGTransform {
- readonly angle: number;
- readonly matrix: SVGMatrix;
- readonly type: number;
- setMatrix(matrix: SVGMatrix): void;
- setRotate(angle: number, cx: number, cy: number): void;
- setScale(sx: number, sy: number): void;
- setSkewX(angle: number): void;
- setSkewY(angle: number): void;
- setTranslate(tx: number, ty: number): void;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-declare var SVGTransform: {
- prototype: SVGTransform;
- new(): SVGTransform;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-interface SVGTransformList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGTransform): SVGTransform;
- clear(): void;
- consolidate(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- getItem(index: number): SVGTransform;
- initialize(newItem: SVGTransform): SVGTransform;
- insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
- removeItem(index: number): SVGTransform;
- replaceItem(newItem: SVGTransform, index: number): SVGTransform;
-}
-
-declare var SVGTransformList: {
- prototype: SVGTransformList;
- new(): SVGTransformList;
-}
-
-interface SVGUnitTypes {
- readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
- readonly SVG_UNIT_TYPE_UNKNOWN: number;
- readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
-}
-declare var SVGUnitTypes: SVGUnitTypes;
-
-interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly animatedInstanceRoot: SVGElementInstance;
- readonly height: SVGAnimatedLength;
- readonly instanceRoot: SVGElementInstance;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGUseElement: {
- prototype: SVGUseElement;
- new(): SVGUseElement;
-}
-
-interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- readonly viewTarget: SVGStringList;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGViewElement: {
- prototype: SVGViewElement;
- new(): SVGViewElement;
-}
-
-interface SVGZoomAndPan {
- readonly zoomAndPan: number;
-}
-
-declare var SVGZoomAndPan: {
- readonly SVG_ZOOMANDPAN_DISABLE: number;
- readonly SVG_ZOOMANDPAN_MAGNIFY: number;
- readonly SVG_ZOOMANDPAN_UNKNOWN: number;
-}
-
-interface SVGZoomEvent extends UIEvent {
- readonly newScale: number;
- readonly newTranslate: SVGPoint;
- readonly previousScale: number;
- readonly previousTranslate: SVGPoint;
- readonly zoomRectScreen: SVGRect;
-}
-
-declare var SVGZoomEvent: {
- prototype: SVGZoomEvent;
- new(): SVGZoomEvent;
-}
-
-interface ScreenEventMap {
- "MSOrientationChange": Event;
-}
-
-interface Screen extends EventTarget {
- readonly availHeight: number;
- readonly availWidth: number;
- bufferDepth: number;
- readonly colorDepth: number;
- readonly deviceXDPI: number;
- readonly deviceYDPI: number;
- readonly fontSmoothingEnabled: boolean;
- readonly height: number;
- readonly logicalXDPI: number;
- readonly logicalYDPI: number;
- readonly msOrientation: string;
- onmsorientationchange: (this: Screen, ev: Event) => any;
- readonly pixelDepth: number;
- readonly systemXDPI: number;
- readonly systemYDPI: number;
- readonly width: number;
- msLockOrientation(orientations: string | string[]): boolean;
- msUnlockOrientation(): void;
- addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Screen: {
- prototype: Screen;
- new(): Screen;
-}
-
-interface ScriptNotifyEvent extends Event {
- readonly callingUri: string;
- readonly value: string;
-}
-
-declare var ScriptNotifyEvent: {
- prototype: ScriptNotifyEvent;
- new(): ScriptNotifyEvent;
-}
-
-interface ScriptProcessorNodeEventMap {
- "audioprocess": AudioProcessingEvent;
-}
-
-interface ScriptProcessorNode extends AudioNode {
- readonly bufferSize: number;
- onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
- addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ScriptProcessorNode: {
- prototype: ScriptProcessorNode;
- new(): ScriptProcessorNode;
-}
-
-interface Selection {
- readonly anchorNode: Node;
- readonly anchorOffset: number;
- readonly focusNode: Node;
- readonly focusOffset: number;
- readonly isCollapsed: boolean;
- readonly rangeCount: number;
- readonly type: string;
- addRange(range: Range): void;
- collapse(parentNode: Node, offset: number): void;
- collapseToEnd(): void;
- collapseToStart(): void;
- containsNode(node: Node, partlyContained: boolean): boolean;
- deleteFromDocument(): void;
- empty(): void;
- extend(newNode: Node, offset: number): void;
- getRangeAt(index: number): Range;
- removeAllRanges(): void;
- removeRange(range: Range): void;
- selectAllChildren(parentNode: Node): void;
- setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
- toString(): string;
-}
-
-declare var Selection: {
- prototype: Selection;
- new(): Selection;
-}
-
-interface SourceBuffer extends EventTarget {
- appendWindowEnd: number;
- appendWindowStart: number;
- readonly audioTracks: AudioTrackList;
- readonly buffered: TimeRanges;
- mode: string;
- timestampOffset: number;
- readonly updating: boolean;
- readonly videoTracks: VideoTrackList;
- abort(): void;
- appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
- appendStream(stream: MSStream, maxSize?: number): void;
- remove(start: number, end: number): void;
-}
-
-declare var SourceBuffer: {
- prototype: SourceBuffer;
- new(): SourceBuffer;
-}
-
-interface SourceBufferList extends EventTarget {
- readonly length: number;
- item(index: number): SourceBuffer;
- [index: number]: SourceBuffer;
-}
-
-declare var SourceBufferList: {
- prototype: SourceBufferList;
- new(): SourceBufferList;
-}
-
-interface StereoPannerNode extends AudioNode {
- readonly pan: AudioParam;
-}
-
-declare var StereoPannerNode: {
- prototype: StereoPannerNode;
- new(): StereoPannerNode;
-}
-
-interface Storage {
- readonly length: number;
- clear(): void;
- getItem(key: string): string | null;
- key(index: number): string | null;
- removeItem(key: string): void;
- setItem(key: string, data: string): void;
- [key: string]: any;
- [index: number]: string;
-}
-
-declare var Storage: {
- prototype: Storage;
- new(): Storage;
-}
-
-interface StorageEvent extends Event {
- readonly url: string;
- key?: string;
- oldValue?: string;
- newValue?: string;
- storageArea?: Storage;
-}
-
-declare var StorageEvent: {
- prototype: StorageEvent;
- new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
-}
-
-interface StyleMedia {
- readonly type: string;
- matchMedium(mediaquery: string): boolean;
-}
-
-declare var StyleMedia: {
- prototype: StyleMedia;
- new(): StyleMedia;
-}
-
-interface StyleSheet {
- disabled: boolean;
- readonly href: string;
- readonly media: MediaList;
- readonly ownerNode: Node;
- readonly parentStyleSheet: StyleSheet;
- readonly title: string;
- readonly type: string;
-}
-
-declare var StyleSheet: {
- prototype: StyleSheet;
- new(): StyleSheet;
-}
-
-interface StyleSheetList {
- readonly length: number;
- item(index?: number): StyleSheet;
- [index: number]: StyleSheet;
-}
-
-declare var StyleSheetList: {
- prototype: StyleSheetList;
- new(): StyleSheetList;
-}
-
-interface StyleSheetPageList {
- readonly length: number;
- item(index: number): CSSPageRule;
- [index: number]: CSSPageRule;
-}
-
-declare var StyleSheetPageList: {
- prototype: StyleSheetPageList;
- new(): StyleSheetPageList;
-}
-
-interface SubtleCrypto {
- decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
- deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
- encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
- exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
- exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
- generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
- generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
- generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
- wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
-}
-
-declare var SubtleCrypto: {
- prototype: SubtleCrypto;
- new(): SubtleCrypto;
-}
-
-interface Text extends CharacterData {
- readonly wholeText: string;
- readonly assignedSlot: HTMLSlotElement | null;
- splitText(offset: number): Text;
-}
-
-declare var Text: {
- prototype: Text;
- new(): Text;
-}
-
-interface TextEvent extends UIEvent {
- readonly data: string;
- readonly inputMethod: number;
- readonly locale: string;
- initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-declare var TextEvent: {
- prototype: TextEvent;
- new(): TextEvent;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-interface TextMetrics {
- readonly width: number;
-}
-
-declare var TextMetrics: {
- prototype: TextMetrics;
- new(): TextMetrics;
-}
-
-interface TextTrackEventMap {
- "cuechange": Event;
- "error": ErrorEvent;
- "load": Event;
-}
-
-interface TextTrack extends EventTarget {
- readonly activeCues: TextTrackCueList;
- readonly cues: TextTrackCueList;
- readonly inBandMetadataTrackDispatchType: string;
- readonly kind: string;
- readonly label: string;
- readonly language: string;
- mode: any;
- oncuechange: (this: TextTrack, ev: Event) => any;
- onerror: (this: TextTrack, ev: ErrorEvent) => any;
- onload: (this: TextTrack, ev: Event) => any;
- readonly readyState: number;
- addCue(cue: TextTrackCue): void;
- removeCue(cue: TextTrackCue): void;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
- addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrack: {
- prototype: TextTrack;
- new(): TextTrack;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
-}
-
-interface TextTrackCueEventMap {
- "enter": Event;
- "exit": Event;
-}
-
-interface TextTrackCue extends EventTarget {
- endTime: number;
- id: string;
- onenter: (this: TextTrackCue, ev: Event) => any;
- onexit: (this: TextTrackCue, ev: Event) => any;
- pauseOnExit: boolean;
- startTime: number;
- text: string;
- readonly track: TextTrack;
- getCueAsHTML(): DocumentFragment;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrackCue: {
- prototype: TextTrackCue;
- new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
-
-interface TextTrackCueList {
- readonly length: number;
- getCueById(id: string): TextTrackCue;
- item(index: number): TextTrackCue;
- [index: number]: TextTrackCue;
-}
-
-declare var TextTrackCueList: {
- prototype: TextTrackCueList;
- new(): TextTrackCueList;
-}
-
-interface TextTrackListEventMap {
- "addtrack": TrackEvent;
-}
-
-interface TextTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
- item(index: number): TextTrack;
- addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: TextTrack;
-}
-
-declare var TextTrackList: {
- prototype: TextTrackList;
- new(): TextTrackList;
-}
-
-interface TimeRanges {
- readonly length: number;
- end(index: number): number;
- start(index: number): number;
-}
-
-declare var TimeRanges: {
- prototype: TimeRanges;
- new(): TimeRanges;
-}
-
-interface Touch {
- readonly clientX: number;
- readonly clientY: number;
- readonly identifier: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly target: EventTarget;
-}
-
-declare var Touch: {
- prototype: Touch;
- new(): Touch;
-}
-
-interface TouchEvent extends UIEvent {
- readonly altKey: boolean;
- readonly changedTouches: TouchList;
- readonly ctrlKey: boolean;
- readonly metaKey: boolean;
- readonly shiftKey: boolean;
- readonly targetTouches: TouchList;
- readonly touches: TouchList;
-}
-
-declare var TouchEvent: {
- prototype: TouchEvent;
- new(): TouchEvent;
-}
-
-interface TouchList {
- readonly length: number;
- item(index: number): Touch | null;
- [index: number]: Touch;
-}
-
-declare var TouchList: {
- prototype: TouchList;
- new(): TouchList;
-}
-
-interface TrackEvent extends Event {
- readonly track: any;
-}
-
-declare var TrackEvent: {
- prototype: TrackEvent;
- new(): TrackEvent;
-}
-
-interface TransitionEvent extends Event {
- readonly elapsedTime: number;
- readonly propertyName: string;
- initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var TransitionEvent: {
- prototype: TransitionEvent;
- new(): TransitionEvent;
-}
-
-interface TreeWalker {
- currentNode: Node;
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- firstChild(): Node;
- lastChild(): Node;
- nextNode(): Node;
- nextSibling(): Node;
- parentNode(): Node;
- previousNode(): Node;
- previousSibling(): Node;
-}
-
-declare var TreeWalker: {
- prototype: TreeWalker;
- new(): TreeWalker;
-}
-
-interface UIEvent extends Event {
- readonly detail: number;
- readonly view: Window;
- initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
-}
-
-declare var UIEvent: {
- prototype: UIEvent;
- new(type: string, eventInitDict?: UIEventInit): UIEvent;
-}
-
-interface URL {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- password: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- username: string;
- toString(): string;
-}
-
-declare var URL: {
- prototype: URL;
- new(url: string, base?: string): URL;
- createObjectURL(object: any, options?: ObjectURLOptions): string;
- revokeObjectURL(url: string): void;
-}
-
-interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
- readonly mediaType: string;
-}
-
-declare var UnviewableContentIdentifiedEvent: {
- prototype: UnviewableContentIdentifiedEvent;
- new(): UnviewableContentIdentifiedEvent;
-}
-
-interface ValidityState {
- readonly badInput: boolean;
- readonly customError: boolean;
- readonly patternMismatch: boolean;
- readonly rangeOverflow: boolean;
- readonly rangeUnderflow: boolean;
- readonly stepMismatch: boolean;
- readonly tooLong: boolean;
- readonly typeMismatch: boolean;
- readonly valid: boolean;
- readonly valueMissing: boolean;
-}
-
-declare var ValidityState: {
- prototype: ValidityState;
- new(): ValidityState;
-}
-
-interface VideoPlaybackQuality {
- readonly corruptedVideoFrames: number;
- readonly creationTime: number;
- readonly droppedVideoFrames: number;
- readonly totalFrameDelay: number;
- readonly totalVideoFrames: number;
-}
-
-declare var VideoPlaybackQuality: {
- prototype: VideoPlaybackQuality;
- new(): VideoPlaybackQuality;
-}
-
-interface VideoTrack {
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- selected: boolean;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var VideoTrack: {
- prototype: VideoTrack;
- new(): VideoTrack;
-}
-
-interface VideoTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface VideoTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
- onchange: (this: VideoTrackList, ev: Event) => any;
- onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
- readonly selectedIndex: number;
- getTrackById(id: string): VideoTrack | null;
- item(index: number): VideoTrack;
- addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: VideoTrack;
-}
-
-declare var VideoTrackList: {
- prototype: VideoTrackList;
- new(): VideoTrackList;
-}
-
-interface WEBGL_compressed_texture_s3tc {
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-declare var WEBGL_compressed_texture_s3tc: {
- prototype: WEBGL_compressed_texture_s3tc;
- new(): WEBGL_compressed_texture_s3tc;
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-interface WEBGL_debug_renderer_info {
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-declare var WEBGL_debug_renderer_info: {
- prototype: WEBGL_debug_renderer_info;
- new(): WEBGL_debug_renderer_info;
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-interface WEBGL_depth_texture {
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-declare var WEBGL_depth_texture: {
- prototype: WEBGL_depth_texture;
- new(): WEBGL_depth_texture;
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-interface WaveShaperNode extends AudioNode {
- curve: Float32Array | null;
- oversample: string;
-}
-
-declare var WaveShaperNode: {
- prototype: WaveShaperNode;
- new(): WaveShaperNode;
-}
-
-interface WebGLActiveInfo {
- readonly name: string;
- readonly size: number;
- readonly type: number;
-}
-
-declare var WebGLActiveInfo: {
- prototype: WebGLActiveInfo;
- new(): WebGLActiveInfo;
-}
-
-interface WebGLBuffer extends WebGLObject {
-}
-
-declare var WebGLBuffer: {
- prototype: WebGLBuffer;
- new(): WebGLBuffer;
-}
-
-interface WebGLContextEvent extends Event {
- readonly statusMessage: string;
-}
-
-declare var WebGLContextEvent: {
- prototype: WebGLContextEvent;
- new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
-
-interface WebGLFramebuffer extends WebGLObject {
-}
-
-declare var WebGLFramebuffer: {
- prototype: WebGLFramebuffer;
- new(): WebGLFramebuffer;
-}
-
-interface WebGLObject {
-}
-
-declare var WebGLObject: {
- prototype: WebGLObject;
- new(): WebGLObject;
-}
-
-interface WebGLProgram extends WebGLObject {
-}
-
-declare var WebGLProgram: {
- prototype: WebGLProgram;
- new(): WebGLProgram;
-}
-
-interface WebGLRenderbuffer extends WebGLObject {
-}
-
-declare var WebGLRenderbuffer: {
- prototype: WebGLRenderbuffer;
- new(): WebGLRenderbuffer;
-}
-
-interface WebGLRenderingContext {
- readonly canvas: HTMLCanvasElement;
- readonly drawingBufferHeight: number;
- readonly drawingBufferWidth: number;
- activeTexture(texture: number): void;
- attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
- bindBuffer(target: number, buffer: WebGLBuffer | null): void;
- bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
- bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
- bindTexture(target: number, texture: WebGLTexture | null): void;
- blendColor(red: number, green: number, blue: number, alpha: number): void;
- blendEquation(mode: number): void;
- blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
- blendFunc(sfactor: number, dfactor: number): void;
- blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
- bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
- bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
- checkFramebufferStatus(target: number): number;
- clear(mask: number): void;
- clearColor(red: number, green: number, blue: number, alpha: number): void;
- clearDepth(depth: number): void;
- clearStencil(s: number): void;
- colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
- compileShader(shader: WebGLShader | null): void;
- compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
- compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
- copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
- copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
- createBuffer(): WebGLBuffer | null;
- createFramebuffer(): WebGLFramebuffer | null;
- createProgram(): WebGLProgram | null;
- createRenderbuffer(): WebGLRenderbuffer | null;
- createShader(type: number): WebGLShader | null;
- createTexture(): WebGLTexture | null;
- cullFace(mode: number): void;
- deleteBuffer(buffer: WebGLBuffer | null): void;
- deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
- deleteProgram(program: WebGLProgram | null): void;
- deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
- deleteShader(shader: WebGLShader | null): void;
- deleteTexture(texture: WebGLTexture | null): void;
- depthFunc(func: number): void;
- depthMask(flag: boolean): void;
- depthRange(zNear: number, zFar: number): void;
- detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- disable(cap: number): void;
- disableVertexAttribArray(index: number): void;
- drawArrays(mode: number, first: number, count: number): void;
- drawElements(mode: number, count: number, type: number, offset: number): void;
- enable(cap: number): void;
- enableVertexAttribArray(index: number): void;
- finish(): void;
- flush(): void;
- framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
- framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
- frontFace(mode: number): void;
- generateMipmap(target: number): void;
- getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
- getAttribLocation(program: WebGLProgram | null, name: string): number;
- getBufferParameter(target: number, pname: number): any;
- getContextAttributes(): WebGLContextAttributes;
- getError(): number;
- getExtension(name: string): any;
- getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
- getParameter(pname: number): any;
- getProgramInfoLog(program: WebGLProgram | null): string | null;
- getProgramParameter(program: WebGLProgram | null, pname: number): any;
- getRenderbufferParameter(target: number, pname: number): any;
- getShaderInfoLog(shader: WebGLShader | null): string | null;
- getShaderParameter(shader: WebGLShader | null, pname: number): any;
- getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
- getShaderSource(shader: WebGLShader | null): string | null;
- getSupportedExtensions(): string[] | null;
- getTexParameter(target: number, pname: number): any;
- getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
- getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
- getVertexAttrib(index: number, pname: number): any;
- getVertexAttribOffset(index: number, pname: number): number;
- hint(target: number, mode: number): void;
- isBuffer(buffer: WebGLBuffer | null): boolean;
- isContextLost(): boolean;
- isEnabled(cap: number): boolean;
- isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
- isProgram(program: WebGLProgram | null): boolean;
- isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
- isShader(shader: WebGLShader | null): boolean;
- isTexture(texture: WebGLTexture | null): boolean;
- lineWidth(width: number): void;
- linkProgram(program: WebGLProgram | null): void;
- pixelStorei(pname: number, param: number): void;
- polygonOffset(factor: number, units: number): void;
- readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
- renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
- sampleCoverage(value: number, invert: boolean): void;
- scissor(x: number, y: number, width: number, height: number): void;
- shaderSource(shader: WebGLShader | null, source: string): void;
- stencilFunc(func: number, ref: number, mask: number): void;
- stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
- stencilMask(mask: number): void;
- stencilMaskSeparate(face: number, mask: number): void;
- stencilOp(fail: number, zfail: number, zpass: number): void;
- stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
- texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- texParameterf(target: number, pname: number, param: number): void;
- texParameteri(target: number, pname: number, param: number): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- uniform1f(location: WebGLUniformLocation | null, x: number): void;
- uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform1i(location: WebGLUniformLocation | null, x: number): void;
- uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- useProgram(program: WebGLProgram | null): void;
- validateProgram(program: WebGLProgram | null): void;
- vertexAttrib1f(indx: number, x: number): void;
- vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib2f(indx: number, x: number, y: number): void;
- vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
- vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
- vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
- vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
- viewport(x: number, y: number, width: number, height: number): void;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-declare var WebGLRenderingContext: {
- prototype: WebGLRenderingContext;
- new(): WebGLRenderingContext;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-interface WebGLShader extends WebGLObject {
-}
-
-declare var WebGLShader: {
- prototype: WebGLShader;
- new(): WebGLShader;
-}
-
-interface WebGLShaderPrecisionFormat {
- readonly precision: number;
- readonly rangeMax: number;
- readonly rangeMin: number;
-}
-
-declare var WebGLShaderPrecisionFormat: {
- prototype: WebGLShaderPrecisionFormat;
- new(): WebGLShaderPrecisionFormat;
-}
-
-interface WebGLTexture extends WebGLObject {
-}
-
-declare var WebGLTexture: {
- prototype: WebGLTexture;
- new(): WebGLTexture;
-}
-
-interface WebGLUniformLocation {
-}
-
-declare var WebGLUniformLocation: {
- prototype: WebGLUniformLocation;
- new(): WebGLUniformLocation;
-}
-
-interface WebKitCSSMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- m11: number;
- m12: number;
- m13: number;
- m14: number;
- m21: number;
- m22: number;
- m23: number;
- m24: number;
- m31: number;
- m32: number;
- m33: number;
- m34: number;
- m41: number;
- m42: number;
- m43: number;
- m44: number;
- inverse(): WebKitCSSMatrix;
- multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
- rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
- rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
- scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
- setMatrixValue(value: string): void;
- skewX(angle: number): WebKitCSSMatrix;
- skewY(angle: number): WebKitCSSMatrix;
- toString(): string;
- translate(x: number, y: number, z?: number): WebKitCSSMatrix;
-}
-
-declare var WebKitCSSMatrix: {
- prototype: WebKitCSSMatrix;
- new(text?: string): WebKitCSSMatrix;
-}
-
-interface WebKitPoint {
- x: number;
- y: number;
-}
-
-declare var WebKitPoint: {
- prototype: WebKitPoint;
- new(x?: number, y?: number): WebKitPoint;
-}
-
-interface WebSocketEventMap {
- "close": CloseEvent;
- "error": ErrorEvent;
- "message": MessageEvent;
- "open": Event;
-}
-
-interface WebSocket extends EventTarget {
- binaryType: string;
- readonly bufferedAmount: number;
- readonly extensions: string;
- onclose: (this: WebSocket, ev: CloseEvent) => any;
- onerror: (this: WebSocket, ev: ErrorEvent) => any;
- onmessage: (this: WebSocket, ev: MessageEvent) => any;
- onopen: (this: WebSocket, ev: Event) => any;
- readonly protocol: string;
- readonly readyState: number;
- readonly url: string;
- close(code?: number, reason?: string): void;
- send(data: any): void;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
- addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var WebSocket: {
- prototype: WebSocket;
- new(url: string, protocols?: string | string[]): WebSocket;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
-}
-
-interface WheelEvent extends MouseEvent {
- readonly deltaMode: number;
- readonly deltaX: number;
- readonly deltaY: number;
- readonly deltaZ: number;
- readonly wheelDelta: number;
- readonly wheelDeltaX: number;
- readonly wheelDeltaY: number;
- getCurrentPoint(element: Element): void;
- initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-declare var WheelEvent: {
- prototype: WheelEvent;
- new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-interface WindowEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "compassneedscalibration": Event;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "devicelight": DeviceLightEvent;
- "devicemotion": DeviceMotionEvent;
- "deviceorientation": DeviceOrientationEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "message": MessageEvent;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "popstate": PopStateEvent;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "stalled": Event;
- "storage": StorageEvent;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "unload": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
- readonly applicationCache: ApplicationCache;
- readonly clientInformation: Navigator;
- readonly closed: boolean;
- readonly crypto: Crypto;
- defaultStatus: string;
- readonly devicePixelRatio: number;
- readonly doNotTrack: string;
- readonly document: Document;
- event: Event | undefined;
- readonly external: External;
- readonly frameElement: Element;
- readonly frames: Window;
- readonly history: History;
- readonly innerHeight: number;
- readonly innerWidth: number;
- readonly length: number;
- readonly location: Location;
- readonly locationbar: BarProp;
- readonly menubar: BarProp;
- readonly msCredentials: MSCredentials;
- name: string;
- readonly navigator: Navigator;
- offscreenBuffering: string | boolean;
- onabort: (this: Window, ev: UIEvent) => any;
- onafterprint: (this: Window, ev: Event) => any;
- onbeforeprint: (this: Window, ev: Event) => any;
- onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
- onblur: (this: Window, ev: FocusEvent) => any;
- oncanplay: (this: Window, ev: Event) => any;
- oncanplaythrough: (this: Window, ev: Event) => any;
- onchange: (this: Window, ev: Event) => any;
- onclick: (this: Window, ev: MouseEvent) => any;
- oncompassneedscalibration: (this: Window, ev: Event) => any;
- oncontextmenu: (this: Window, ev: PointerEvent) => any;
- ondblclick: (this: Window, ev: MouseEvent) => any;
- ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
- ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
- ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
- ondrag: (this: Window, ev: DragEvent) => any;
- ondragend: (this: Window, ev: DragEvent) => any;
- ondragenter: (this: Window, ev: DragEvent) => any;
- ondragleave: (this: Window, ev: DragEvent) => any;
- ondragover: (this: Window, ev: DragEvent) => any;
- ondragstart: (this: Window, ev: DragEvent) => any;
- ondrop: (this: Window, ev: DragEvent) => any;
- ondurationchange: (this: Window, ev: Event) => any;
- onemptied: (this: Window, ev: Event) => any;
- onended: (this: Window, ev: MediaStreamErrorEvent) => any;
- onerror: ErrorEventHandler;
- onfocus: (this: Window, ev: FocusEvent) => any;
- onhashchange: (this: Window, ev: HashChangeEvent) => any;
- oninput: (this: Window, ev: Event) => any;
- oninvalid: (this: Window, ev: Event) => any;
- onkeydown: (this: Window, ev: KeyboardEvent) => any;
- onkeypress: (this: Window, ev: KeyboardEvent) => any;
- onkeyup: (this: Window, ev: KeyboardEvent) => any;
- onload: (this: Window, ev: Event) => any;
- onloadeddata: (this: Window, ev: Event) => any;
- onloadedmetadata: (this: Window, ev: Event) => any;
- onloadstart: (this: Window, ev: Event) => any;
- onmessage: (this: Window, ev: MessageEvent) => any;
- onmousedown: (this: Window, ev: MouseEvent) => any;
- onmouseenter: (this: Window, ev: MouseEvent) => any;
- onmouseleave: (this: Window, ev: MouseEvent) => any;
- onmousemove: (this: Window, ev: MouseEvent) => any;
- onmouseout: (this: Window, ev: MouseEvent) => any;
- onmouseover: (this: Window, ev: MouseEvent) => any;
- onmouseup: (this: Window, ev: MouseEvent) => any;
- onmousewheel: (this: Window, ev: WheelEvent) => any;
- onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
- onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
- onmspointermove: (this: Window, ev: MSPointerEvent) => any;
- onmspointerout: (this: Window, ev: MSPointerEvent) => any;
- onmspointerover: (this: Window, ev: MSPointerEvent) => any;
- onmspointerup: (this: Window, ev: MSPointerEvent) => any;
- onoffline: (this: Window, ev: Event) => any;
- ononline: (this: Window, ev: Event) => any;
- onorientationchange: (this: Window, ev: Event) => any;
- onpagehide: (this: Window, ev: PageTransitionEvent) => any;
- onpageshow: (this: Window, ev: PageTransitionEvent) => any;
- onpause: (this: Window, ev: Event) => any;
- onplay: (this: Window, ev: Event) => any;
- onplaying: (this: Window, ev: Event) => any;
- onpopstate: (this: Window, ev: PopStateEvent) => any;
- onprogress: (this: Window, ev: ProgressEvent) => any;
- onratechange: (this: Window, ev: Event) => any;
- onreadystatechange: (this: Window, ev: ProgressEvent) => any;
- onreset: (this: Window, ev: Event) => any;
- onresize: (this: Window, ev: UIEvent) => any;
- onscroll: (this: Window, ev: UIEvent) => any;
- onseeked: (this: Window, ev: Event) => any;
- onseeking: (this: Window, ev: Event) => any;
- onselect: (this: Window, ev: UIEvent) => any;
- onstalled: (this: Window, ev: Event) => any;
- onstorage: (this: Window, ev: StorageEvent) => any;
- onsubmit: (this: Window, ev: Event) => any;
- onsuspend: (this: Window, ev: Event) => any;
- ontimeupdate: (this: Window, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onunload: (this: Window, ev: Event) => any;
- onvolumechange: (this: Window, ev: Event) => any;
- onwaiting: (this: Window, ev: Event) => any;
- opener: any;
- orientation: string | number;
- readonly outerHeight: number;
- readonly outerWidth: number;
- readonly pageXOffset: number;
- readonly pageYOffset: number;
- readonly parent: Window;
- readonly performance: Performance;
- readonly personalbar: BarProp;
- readonly screen: Screen;
- readonly screenLeft: number;
- readonly screenTop: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly scrollX: number;
- readonly scrollY: number;
- readonly scrollbars: BarProp;
- readonly self: Window;
- status: string;
- readonly statusbar: BarProp;
- readonly styleMedia: StyleMedia;
- readonly toolbar: BarProp;
- readonly top: Window;
- readonly window: Window;
- URL: typeof URL;
- Blob: typeof Blob;
- alert(message?: any): void;
- blur(): void;
- cancelAnimationFrame(handle: number): void;
- captureEvents(): void;
- close(): void;
- confirm(message?: string): boolean;
- focus(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
- getSelection(): Selection;
- matchMedia(mediaQuery: string): MediaQueryList;
- moveBy(x?: number, y?: number): void;
- moveTo(x?: number, y?: number): void;
- msWriteProfilerMark(profilerMarkName: string): void;
- open(url?: string, target?: string, features?: string, replace?: boolean): Window;
- postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
- print(): void;
- prompt(message?: string, _default?: string): string | null;
- releaseEvents(): void;
- requestAnimationFrame(callback: FrameRequestCallback): number;
- resizeBy(x?: number, y?: number): void;
- resizeTo(x?: number, y?: number): void;
- scroll(x?: number, y?: number): void;
- scrollBy(x?: number, y?: number): void;
- scrollTo(x?: number, y?: number): void;
- webkitCancelAnimationFrame(handle: number): void;
- webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
- scroll(options?: ScrollToOptions): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollBy(options?: ScrollToOptions): void;
- addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Window: {
- prototype: Window;
- new(): Window;
-}
-
-interface WorkerEventMap extends AbstractWorkerEventMap {
- "message": MessageEvent;
-}
-
-interface Worker extends EventTarget, AbstractWorker {
- onmessage: (this: Worker, ev: MessageEvent) => any;
- postMessage(message: any, ports?: any): void;
- terminate(): void;
- addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Worker: {
- prototype: Worker;
- new(stringUrl: string): Worker;
-}
-
-interface XMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLDocument: {
- prototype: XMLDocument;
- new(): XMLDocument;
-}
-
-interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
- "readystatechange": Event;
-}
-
-interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
- onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
- readonly readyState: number;
- readonly response: any;
- readonly responseText: string;
- responseType: string;
- readonly responseXML: any;
- readonly status: number;
- readonly statusText: string;
- timeout: number;
- readonly upload: XMLHttpRequestUpload;
- withCredentials: boolean;
- msCaching?: string;
- readonly responseURL: string;
- abort(): void;
- getAllResponseHeaders(): string;
- getResponseHeader(header: string): string | null;
- msCachingEnabled(): boolean;
- open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
- overrideMimeType(mime: string): void;
- send(data?: Document): void;
- send(data?: string): void;
- send(data?: any): void;
- setRequestHeader(header: string, value: string): void;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequest: {
- prototype: XMLHttpRequest;
- new(): XMLHttpRequest;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- create(): XMLHttpRequest;
-}
-
-interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequestUpload: {
- prototype: XMLHttpRequestUpload;
- new(): XMLHttpRequestUpload;
-}
-
-interface XMLSerializer {
- serializeToString(target: Node): string;
-}
-
-declare var XMLSerializer: {
- prototype: XMLSerializer;
- new(): XMLSerializer;
-}
-
-interface XPathEvaluator {
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver?: Node): XPathNSResolver;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathEvaluator: {
- prototype: XPathEvaluator;
- new(): XPathEvaluator;
-}
-
-interface XPathExpression {
- evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathExpression: {
- prototype: XPathExpression;
- new(): XPathExpression;
-}
-
-interface XPathNSResolver {
- lookupNamespaceURI(prefix: string): string;
-}
-
-declare var XPathNSResolver: {
- prototype: XPathNSResolver;
- new(): XPathNSResolver;
-}
-
-interface XPathResult {
- readonly booleanValue: boolean;
- readonly invalidIteratorState: boolean;
- readonly numberValue: number;
- readonly resultType: number;
- readonly singleNodeValue: Node;
- readonly snapshotLength: number;
- readonly stringValue: string;
- iterateNext(): Node;
- snapshotItem(index: number): Node;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-declare var XPathResult: {
- prototype: XPathResult;
- new(): XPathResult;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-interface XSLTProcessor {
- clearParameters(): void;
- getParameter(namespaceURI: string, localName: string): any;
- importStylesheet(style: Node): void;
- removeParameter(namespaceURI: string, localName: string): void;
- reset(): void;
- setParameter(namespaceURI: string, localName: string, value: any): void;
- transformToDocument(source: Node): Document;
- transformToFragment(source: Node, document: Document): DocumentFragment;
-}
-
-declare var XSLTProcessor: {
- prototype: XSLTProcessor;
- new(): XSLTProcessor;
-}
-
-interface AbstractWorkerEventMap {
- "error": ErrorEvent;
-}
-
-interface AbstractWorker {
- onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
- addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface CanvasPathMethods {
- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
- closePath(): void;
- ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- lineTo(x: number, y: number): void;
- moveTo(x: number, y: number): void;
- quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
- rect(x: number, y: number, w: number, h: number): void;
-}
-
-interface ChildNode {
- remove(): void;
-}
-
-interface DOML2DeprecatedColorProperty {
- color: string;
-}
-
-interface DOML2DeprecatedSizeProperty {
- size: number;
-}
-
-interface DocumentEvent {
- createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
- createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent;
- createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
- createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
- createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
- createEvent(eventInterface:"CloseEvent"): CloseEvent;
- createEvent(eventInterface:"CommandEvent"): CommandEvent;
- createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
- createEvent(eventInterface:"CustomEvent"): CustomEvent;
- createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
- createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
- createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
- createEvent(eventInterface:"DragEvent"): DragEvent;
- createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
- createEvent(eventInterface:"Event"): Event;
- createEvent(eventInterface:"Events"): Event;
- createEvent(eventInterface:"FocusEvent"): FocusEvent;
- createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
- createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
- createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
- createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
- createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
- createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
- createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
- createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
- createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
- createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
- createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
- createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
- createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
- createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
- createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
- createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
- createEvent(eventInterface:"MessageEvent"): MessageEvent;
- createEvent(eventInterface:"MouseEvent"): MouseEvent;
- createEvent(eventInterface:"MouseEvents"): MouseEvent;
- createEvent(eventInterface:"MutationEvent"): MutationEvent;
- createEvent(eventInterface:"MutationEvents"): MutationEvent;
- createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
- createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
- createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
- createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
- createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
- createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
- createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
- createEvent(eventInterface:"PointerEvent"): PointerEvent;
- createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
- createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
- createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
- createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
- createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
- createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
- createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
- createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
- createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
- createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
- createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
- createEvent(eventInterface:"StorageEvent"): StorageEvent;
- createEvent(eventInterface:"TextEvent"): TextEvent;
- createEvent(eventInterface:"TouchEvent"): TouchEvent;
- createEvent(eventInterface:"TrackEvent"): TrackEvent;
- createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
- createEvent(eventInterface:"UIEvent"): UIEvent;
- createEvent(eventInterface:"UIEvents"): UIEvent;
- createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
- createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
- createEvent(eventInterface:"WheelEvent"): WheelEvent;
- createEvent(eventInterface: string): Event;
-}
-
-interface ElementTraversal {
- readonly childElementCount: number;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly nextElementSibling: Element;
- readonly previousElementSibling: Element;
-}
-
-interface GetSVGDocument {
- getSVGDocument(): Document;
-}
-
-interface GlobalEventHandlersEventMap {
- "pointercancel": PointerEvent;
- "pointerdown": PointerEvent;
- "pointerenter": PointerEvent;
- "pointerleave": PointerEvent;
- "pointermove": PointerEvent;
- "pointerout": PointerEvent;
- "pointerover": PointerEvent;
- "pointerup": PointerEvent;
- "wheel": WheelEvent;
-}
-
-interface GlobalEventHandlers {
- onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
- addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface HTMLTableAlignment {
- /**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
- ch: string;
- /**
- * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
- */
- chOff: string;
- /**
- * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
- */
- vAlign: string;
-}
-
-interface IDBEnvironment {
- readonly indexedDB: IDBFactory;
-}
-
-interface LinkStyle {
- readonly sheet: StyleSheet;
-}
-
-interface MSBaseReaderEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
-}
-
-interface MSBaseReader {
- onabort: (this: MSBaseReader, ev: Event) => any;
- onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
- onload: (this: MSBaseReader, ev: Event) => any;
- onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
- onloadstart: (this: MSBaseReader, ev: Event) => any;
- onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
- readonly readyState: number;
- readonly result: any;
- abort(): void;
- readonly DONE: number;
- readonly EMPTY: number;
- readonly LOADING: number;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface MSFileSaver {
- msSaveBlob(blob: any, defaultName?: string): boolean;
- msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
-}
-
-interface MSNavigatorDoNotTrack {
- confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
- confirmWebWideTrackingException(args: ExceptionInformation): boolean;
- removeSiteSpecificTrackingException(args: ExceptionInformation): void;
- removeWebWideTrackingException(args: ExceptionInformation): void;
- storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
- storeWebWideTrackingException(args: StoreExceptionsInformation): void;
-}
-
-interface NavigatorContentUtils {
-}
-
-interface NavigatorGeolocation {
- readonly geolocation: Geolocation;
-}
-
-interface NavigatorID {
- readonly appName: string;
- readonly appVersion: string;
- readonly platform: string;
- readonly product: string;
- readonly productSub: string;
- readonly userAgent: string;
- readonly vendor: string;
- readonly vendorSub: string;
-}
-
-interface NavigatorOnLine {
- readonly onLine: boolean;
-}
-
-interface NavigatorStorageUtils {
-}
-
-interface NavigatorUserMedia {
- readonly mediaDevices: MediaDevices;
- getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
-}
-
-interface NodeSelector {
- querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
- querySelector(selectors: string): Element | null;
- querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
- querySelectorAll(selectors: string): NodeListOf<Element>;
-}
-
-interface RandomSource {
- getRandomValues(array: ArrayBufferView): ArrayBufferView;
-}
-
-interface SVGAnimatedPathData {
- readonly pathSegList: SVGPathSegList;
-}
-
-interface SVGAnimatedPoints {
- readonly animatedPoints: SVGPointList;
- readonly points: SVGPointList;
-}
-
-interface SVGExternalResourcesRequired {
- readonly externalResourcesRequired: SVGAnimatedBoolean;
-}
-
-interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
- readonly height: SVGAnimatedLength;
- readonly result: SVGAnimatedString;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
-}
-
-interface SVGFitToViewBox {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly viewBox: SVGAnimatedRect;
-}
-
-interface SVGLangSpace {
- xmllang: string;
- xmlspace: string;
-}
-
-interface SVGLocatable {
- readonly farthestViewportElement: SVGElement;
- readonly nearestViewportElement: SVGElement;
- getBBox(): SVGRect;
- getCTM(): SVGMatrix;
- getScreenCTM(): SVGMatrix;
- getTransformToElement(element: SVGElement): SVGMatrix;
-}
-
-interface SVGStylable {
- className: any;
- readonly style: CSSStyleDeclaration;
-}
-
-interface SVGTests {
- readonly requiredExtensions: SVGStringList;
- readonly requiredFeatures: SVGStringList;
- readonly systemLanguage: SVGStringList;
- hasExtension(extension: string): boolean;
-}
-
-interface SVGTransformable extends SVGLocatable {
- readonly transform: SVGAnimatedTransformList;
-}
-
-interface SVGURIReference {
- readonly href: SVGAnimatedString;
-}
-
-interface WindowBase64 {
- atob(encodedString: string): string;
- btoa(rawString: string): string;
-}
-
-interface WindowConsole {
- readonly console: Console;
-}
-
-interface WindowLocalStorage {
- readonly localStorage: Storage;
-}
-
-interface WindowSessionStorage {
- readonly sessionStorage: Storage;
-}
-
-interface WindowTimers extends Object, WindowTimersExtension {
- clearInterval(handle: number): void;
- clearTimeout(handle: number): void;
- setInterval(handler: (...args: any[]) => void, timeout: number): number;
- setInterval(handler: any, timeout?: any, ...args: any[]): number;
- setTimeout(handler: (...args: any[]) => void, timeout: number): number;
- setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-}
-
-interface WindowTimersExtension {
- clearImmediate(handle: number): void;
- setImmediate(handler: (...args: any[]) => void): number;
- setImmediate(handler: any, ...args: any[]): number;
-}
-
-interface XMLHttpRequestEventTargetEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
- "timeout": ProgressEvent;
-}
-
-interface XMLHttpRequestEventTarget {
- onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
- onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface StorageEventInit extends EventInit {
- key?: string;
- oldValue?: string;
- newValue?: string;
- url: string;
- storageArea?: Storage;
-}
-
-interface Canvas2DContextAttributes {
- alpha?: boolean;
- willReadFrequently?: boolean;
- storage?: boolean;
- [attribute: string]: boolean | string | undefined;
-}
-
-interface NodeListOf<TNode extends Node> extends NodeList {
- length: number;
- item(index: number): TNode;
- [index: number]: TNode;
-}
-
-interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
- item(index: number): T;
- namedItem(name: string): T;
- [index: number]: T;
-}
-
-interface BlobPropertyBag {
- type?: string;
- endings?: string;
-}
-
-interface FilePropertyBag {
- type?: string;
- lastModified?: number;
-}
-
-interface EventListenerObject {
- handleEvent(evt: Event): void;
-}
-
-interface MessageEventInit extends EventInit {
- data?: any;
- origin?: string;
- lastEventId?: string;
- channel?: string;
- source?: any;
- ports?: MessagePort[];
-}
-
-interface ProgressEventInit extends EventInit {
- lengthComputable?: boolean;
- loaded?: number;
- total?: number;
-}
-
-interface ScrollOptions {
- behavior?: ScrollBehavior;
-}
-
-interface ScrollToOptions extends ScrollOptions {
- left?: number;
- top?: number;
-}
-
-interface ScrollIntoViewOptions extends ScrollOptions {
- block?: ScrollLogicalPosition;
- inline?: ScrollLogicalPosition;
-}
-
-interface ClipboardEventInit extends EventInit {
- data?: string;
- dataType?: string;
-}
-
-interface IDBArrayKey extends Array<IDBValidKey> {
-}
-
-interface RsaKeyGenParams extends Algorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyGenParams extends RsaKeyGenParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaKeyAlgorithm extends KeyAlgorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaHashedImportParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaPssParams {
- saltLength: number;
-}
-
-interface RsaOaepParams extends Algorithm {
- label?: BufferSource;
-}
-
-interface EcdsaParams extends Algorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface EcKeyGenParams extends Algorithm {
- namedCurve: string;
-}
-
-interface EcKeyAlgorithm extends KeyAlgorithm {
- typedCurve: string;
-}
-
-interface EcKeyImportParams {
- namedCurve: string;
-}
-
-interface EcdhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface AesCtrParams extends Algorithm {
- counter: BufferSource;
- length: number;
-}
-
-interface AesKeyAlgorithm extends KeyAlgorithm {
- length: number;
-}
-
-interface AesKeyGenParams extends Algorithm {
- length: number;
-}
-
-interface AesDerivedKeyParams extends Algorithm {
- length: number;
-}
-
-interface AesCbcParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface AesCmacParams extends Algorithm {
- length: number;
-}
-
-interface AesGcmParams extends Algorithm {
- iv: BufferSource;
- additionalData?: BufferSource;
- tagLength?: number;
-}
-
-interface AesCfbParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface HmacImportParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- length?: number;
-}
-
-interface HmacKeyAlgorithm extends KeyAlgorithm {
- hash: AlgorithmIdentifier;
- length: number;
-}
-
-interface HmacKeyGenParams extends Algorithm {
- hash: AlgorithmIdentifier;
- length?: number;
-}
-
-interface DhKeyGenParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyAlgorithm extends KeyAlgorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface DhImportKeyParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface ConcatParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- algorithmId: Uint8Array;
- partyUInfo: Uint8Array;
- partyVInfo: Uint8Array;
- publicInfo?: Uint8Array;
- privateInfo?: Uint8Array;
-}
-
-interface HkdfCtrParams extends Algorithm {
- hash: AlgorithmIdentifier;
- label: BufferSource;
- context: BufferSource;
-}
-
-interface Pbkdf2Params extends Algorithm {
- salt: BufferSource;
- iterations: number;
- hash: AlgorithmIdentifier;
-}
-
-interface RsaOtherPrimesInfo {
- r: string;
- d: string;
- t: string;
-}
-
-interface JsonWebKey {
- kty: string;
- use?: string;
- key_ops?: string[];
- alg?: string;
- kid?: string;
- x5u?: string;
- x5c?: string;
- x5t?: string;
- ext?: boolean;
- crv?: string;
- x?: string;
- y?: string;
- d?: string;
- n?: string;
- e?: string;
- p?: string;
- q?: string;
- dp?: string;
- dq?: string;
- qi?: string;
- oth?: RsaOtherPrimesInfo[];
- k?: string;
-}
-
-interface ParentNode {
- readonly children: HTMLCollection;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly childElementCount: number;
-}
-
-interface DocumentOrShadowRoot {
- readonly activeElement: Element | null;
- readonly stylesheets: StyleSheetList;
- getSelection(): Selection | null;
- elementFromPoint(x: number, y: number): Element | null;
- elementsFromPoint(x: number, y: number): Element[];
-}
-
-interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
- readonly host: Element;
- innerHTML: string;
-}
-
-interface ShadowRootInit {
- mode: 'open'|'closed';
- delegatesFocus?: boolean;
-}
-
-interface HTMLSlotElement extends HTMLElement {
- name: string;
- assignedNodes(options?: AssignedNodesOptions): Node[];
-}
-
-interface AssignedNodesOptions {
- flatten?: boolean;
-}
-
-declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
-
-interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
-}
-interface PositionCallback {
- (position: Position): void;
-}
-interface PositionErrorCallback {
- (error: PositionError): void;
-}
-interface MediaQueryListListener {
- (mql: MediaQueryList): void;
-}
-interface MSLaunchUriCallback {
- (): void;
-}
-interface FrameRequestCallback {
- (time: number): void;
-}
-interface MSUnsafeFunctionCallback {
- (): any;
-}
-interface MSExecAtPriorityFunctionCallback {
- (...args: any[]): any;
-}
-interface MutationCallback {
- (mutations: MutationRecord[], observer: MutationObserver): void;
-}
-interface DecodeSuccessCallback {
- (decodedData: AudioBuffer): void;
-}
-interface DecodeErrorCallback {
- (error: DOMException): void;
-}
-interface FunctionStringCallback {
- (data: string): void;
-}
-interface NavigatorUserMediaSuccessCallback {
- (stream: MediaStream): void;
-}
-interface NavigatorUserMediaErrorCallback {
- (error: MediaStreamError): void;
-}
-interface ForEachCallback {
- (keyId: any, status: string): void;
-}
-interface HTMLElementTagNameMap {
- "a": HTMLAnchorElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "audio": HTMLAudioElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "del": HTMLModElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "embed": HTMLEmbedElement;
- "fieldset": HTMLFieldSetElement;
- "font": HTMLFontElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "iframe": HTMLIFrameElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "marquee": HTMLMarqueeElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "meter": HTMLMeterElement;
- "nextid": HTMLUnknownElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "picture": HTMLPictureElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "script": HTMLScriptElement;
- "select": HTMLSelectElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "style": HTMLStyleElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "ul": HTMLUListElement;
- "video": HTMLVideoElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
- "abbr": HTMLElement;
- "acronym": HTMLElement;
- "address": HTMLElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "article": HTMLElement;
- "aside": HTMLElement;
- "audio": HTMLAudioElement;
- "b": HTMLElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "bdo": HTMLElement;
- "big": HTMLElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "center": HTMLElement;
- "circle": SVGCircleElement;
- "cite": HTMLElement;
- "clippath": SVGClipPathElement;
- "code": HTMLElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "dd": HTMLElement;
- "defs": SVGDefsElement;
- "del": HTMLModElement;
- "desc": SVGDescElement;
- "dfn": HTMLElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "dt": HTMLElement;
- "ellipse": SVGEllipseElement;
- "em": HTMLElement;
- "embed": HTMLEmbedElement;
- "feblend": SVGFEBlendElement;
- "fecolormatrix": SVGFEColorMatrixElement;
- "fecomponenttransfer": SVGFEComponentTransferElement;
- "fecomposite": SVGFECompositeElement;
- "feconvolvematrix": SVGFEConvolveMatrixElement;
- "fediffuselighting": SVGFEDiffuseLightingElement;
- "fedisplacementmap": SVGFEDisplacementMapElement;
- "fedistantlight": SVGFEDistantLightElement;
- "feflood": SVGFEFloodElement;
- "fefunca": SVGFEFuncAElement;
- "fefuncb": SVGFEFuncBElement;
- "fefuncg": SVGFEFuncGElement;
- "fefuncr": SVGFEFuncRElement;
- "fegaussianblur": SVGFEGaussianBlurElement;
- "feimage": SVGFEImageElement;
- "femerge": SVGFEMergeElement;
- "femergenode": SVGFEMergeNodeElement;
- "femorphology": SVGFEMorphologyElement;
- "feoffset": SVGFEOffsetElement;
- "fepointlight": SVGFEPointLightElement;
- "fespecularlighting": SVGFESpecularLightingElement;
- "fespotlight": SVGFESpotLightElement;
- "fetile": SVGFETileElement;
- "feturbulence": SVGFETurbulenceElement;
- "fieldset": HTMLFieldSetElement;
- "figcaption": HTMLElement;
- "figure": HTMLElement;
- "filter": SVGFilterElement;
- "font": HTMLFontElement;
- "footer": HTMLElement;
- "foreignobject": SVGForeignObjectElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "g": SVGGElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "header": HTMLElement;
- "hgroup": HTMLElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "i": HTMLElement;
- "iframe": HTMLIFrameElement;
- "image": SVGImageElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "kbd": HTMLElement;
- "keygen": HTMLElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "line": SVGLineElement;
- "lineargradient": SVGLinearGradientElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "mark": HTMLElement;
- "marker": SVGMarkerElement;
- "marquee": HTMLMarqueeElement;
- "mask": SVGMaskElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "metadata": SVGMetadataElement;
- "meter": HTMLMeterElement;
- "nav": HTMLElement;
- "nextid": HTMLUnknownElement;
- "nobr": HTMLElement;
- "noframes": HTMLElement;
- "noscript": HTMLElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "path": SVGPathElement;
- "pattern": SVGPatternElement;
- "picture": HTMLPictureElement;
- "plaintext": HTMLElement;
- "polygon": SVGPolygonElement;
- "polyline": SVGPolylineElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "radialgradient": SVGRadialGradientElement;
- "rect": SVGRectElement;
- "rt": HTMLElement;
- "ruby": HTMLElement;
- "s": HTMLElement;
- "samp": HTMLElement;
- "script": HTMLScriptElement;
- "section": HTMLElement;
- "select": HTMLSelectElement;
- "small": HTMLElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "stop": SVGStopElement;
- "strike": HTMLElement;
- "strong": HTMLElement;
- "style": HTMLStyleElement;
- "sub": HTMLElement;
- "sup": HTMLElement;
- "svg": SVGSVGElement;
- "switch": SVGSwitchElement;
- "symbol": SVGSymbolElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "text": SVGTextElement;
- "textpath": SVGTextPathElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "tspan": SVGTSpanElement;
- "tt": HTMLElement;
- "u": HTMLElement;
- "ul": HTMLUListElement;
- "use": SVGUseElement;
- "var": HTMLElement;
- "video": HTMLVideoElement;
- "view": SVGViewElement;
- "wbr": HTMLElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementListTagNameMap {
- "a": NodeListOf<HTMLAnchorElement>;
- "abbr": NodeListOf<HTMLElement>;
- "acronym": NodeListOf<HTMLElement>;
- "address": NodeListOf<HTMLElement>;
- "applet": NodeListOf<HTMLAppletElement>;
- "area": NodeListOf<HTMLAreaElement>;
- "article": NodeListOf<HTMLElement>;
- "aside": NodeListOf<HTMLElement>;
- "audio": NodeListOf<HTMLAudioElement>;
- "b": NodeListOf<HTMLElement>;
- "base": NodeListOf<HTMLBaseElement>;
- "basefont": NodeListOf<HTMLBaseFontElement>;
- "bdo": NodeListOf<HTMLElement>;
- "big": NodeListOf<HTMLElement>;
- "blockquote": NodeListOf<HTMLQuoteElement>;
- "body": NodeListOf<HTMLBodyElement>;
- "br": NodeListOf<HTMLBRElement>;
- "button": NodeListOf<HTMLButtonElement>;
- "canvas": NodeListOf<HTMLCanvasElement>;
- "caption": NodeListOf<HTMLTableCaptionElement>;
- "center": NodeListOf<HTMLElement>;
- "circle": NodeListOf<SVGCircleElement>;
- "cite": NodeListOf<HTMLElement>;
- "clippath": NodeListOf<SVGClipPathElement>;
- "code": NodeListOf<HTMLElement>;
- "col": NodeListOf<HTMLTableColElement>;
- "colgroup": NodeListOf<HTMLTableColElement>;
- "datalist": NodeListOf<HTMLDataListElement>;
- "dd": NodeListOf<HTMLElement>;
- "defs": NodeListOf<SVGDefsElement>;
- "del": NodeListOf<HTMLModElement>;
- "desc": NodeListOf<SVGDescElement>;
- "dfn": NodeListOf<HTMLElement>;
- "dir": NodeListOf<HTMLDirectoryElement>;
- "div": NodeListOf<HTMLDivElement>;
- "dl": NodeListOf<HTMLDListElement>;
- "dt": NodeListOf<HTMLElement>;
- "ellipse": NodeListOf<SVGEllipseElement>;
- "em": NodeListOf<HTMLElement>;
- "embed": NodeListOf<HTMLEmbedElement>;
- "feblend": NodeListOf<SVGFEBlendElement>;
- "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
- "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
- "fecomposite": NodeListOf<SVGFECompositeElement>;
- "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
- "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
- "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
- "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
- "feflood": NodeListOf<SVGFEFloodElement>;
- "fefunca": NodeListOf<SVGFEFuncAElement>;
- "fefuncb": NodeListOf<SVGFEFuncBElement>;
- "fefuncg": NodeListOf<SVGFEFuncGElement>;
- "fefuncr": NodeListOf<SVGFEFuncRElement>;
- "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
- "feimage": NodeListOf<SVGFEImageElement>;
- "femerge": NodeListOf<SVGFEMergeElement>;
- "femergenode": NodeListOf<SVGFEMergeNodeElement>;
- "femorphology": NodeListOf<SVGFEMorphologyElement>;
- "feoffset": NodeListOf<SVGFEOffsetElement>;
- "fepointlight": NodeListOf<SVGFEPointLightElement>;
- "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
- "fespotlight": NodeListOf<SVGFESpotLightElement>;
- "fetile": NodeListOf<SVGFETileElement>;
- "feturbulence": NodeListOf<SVGFETurbulenceElement>;
- "fieldset": NodeListOf<HTMLFieldSetElement>;
- "figcaption": NodeListOf<HTMLElement>;
- "figure": NodeListOf<HTMLElement>;
- "filter": NodeListOf<SVGFilterElement>;
- "font": NodeListOf<HTMLFontElement>;
- "footer": NodeListOf<HTMLElement>;
- "foreignobject": NodeListOf<SVGForeignObjectElement>;
- "form": NodeListOf<HTMLFormElement>;
- "frame": NodeListOf<HTMLFrameElement>;
- "frameset": NodeListOf<HTMLFrameSetElement>;
- "g": NodeListOf<SVGGElement>;
- "h1": NodeListOf<HTMLHeadingElement>;
- "h2": NodeListOf<HTMLHeadingElement>;
- "h3": NodeListOf<HTMLHeadingElement>;
- "h4": NodeListOf<HTMLHeadingElement>;
- "h5": NodeListOf<HTMLHeadingElement>;
- "h6": NodeListOf<HTMLHeadingElement>;
- "head": NodeListOf<HTMLHeadElement>;
- "header": NodeListOf<HTMLElement>;
- "hgroup": NodeListOf<HTMLElement>;
- "hr": NodeListOf<HTMLHRElement>;
- "html": NodeListOf<HTMLHtmlElement>;
- "i": NodeListOf<HTMLElement>;
- "iframe": NodeListOf<HTMLIFrameElement>;
- "image": NodeListOf<SVGImageElement>;
- "img": NodeListOf<HTMLImageElement>;
- "input": NodeListOf<HTMLInputElement>;
- "ins": NodeListOf<HTMLModElement>;
- "isindex": NodeListOf<HTMLUnknownElement>;
- "kbd": NodeListOf<HTMLElement>;
- "keygen": NodeListOf<HTMLElement>;
- "label": NodeListOf<HTMLLabelElement>;
- "legend": NodeListOf<HTMLLegendElement>;
- "li": NodeListOf<HTMLLIElement>;
- "line": NodeListOf<SVGLineElement>;
- "lineargradient": NodeListOf<SVGLinearGradientElement>;
- "link": NodeListOf<HTMLLinkElement>;
- "listing": NodeListOf<HTMLPreElement>;
- "map": NodeListOf<HTMLMapElement>;
- "mark": NodeListOf<HTMLElement>;
- "marker": NodeListOf<SVGMarkerElement>;
- "marquee": NodeListOf<HTMLMarqueeElement>;
- "mask": NodeListOf<SVGMaskElement>;
- "menu": NodeListOf<HTMLMenuElement>;
- "meta": NodeListOf<HTMLMetaElement>;
- "metadata": NodeListOf<SVGMetadataElement>;
- "meter": NodeListOf<HTMLMeterElement>;
- "nav": NodeListOf<HTMLElement>;
- "nextid": NodeListOf<HTMLUnknownElement>;
- "nobr": NodeListOf<HTMLElement>;
- "noframes": NodeListOf<HTMLElement>;
- "noscript": NodeListOf<HTMLElement>;
- "object": NodeListOf<HTMLObjectElement>;
- "ol": NodeListOf<HTMLOListElement>;
- "optgroup": NodeListOf<HTMLOptGroupElement>;
- "option": NodeListOf<HTMLOptionElement>;
- "p": NodeListOf<HTMLParagraphElement>;
- "param": NodeListOf<HTMLParamElement>;
- "path": NodeListOf<SVGPathElement>;
- "pattern": NodeListOf<SVGPatternElement>;
- "picture": NodeListOf<HTMLPictureElement>;
- "plaintext": NodeListOf<HTMLElement>;
- "polygon": NodeListOf<SVGPolygonElement>;
- "polyline": NodeListOf<SVGPolylineElement>;
- "pre": NodeListOf<HTMLPreElement>;
- "progress": NodeListOf<HTMLProgressElement>;
- "q": NodeListOf<HTMLQuoteElement>;
- "radialgradient": NodeListOf<SVGRadialGradientElement>;
- "rect": NodeListOf<SVGRectElement>;
- "rt": NodeListOf<HTMLElement>;
- "ruby": NodeListOf<HTMLElement>;
- "s": NodeListOf<HTMLElement>;
- "samp": NodeListOf<HTMLElement>;
- "script": NodeListOf<HTMLScriptElement>;
- "section": NodeListOf<HTMLElement>;
- "select": NodeListOf<HTMLSelectElement>;
- "small": NodeListOf<HTMLElement>;
- "source": NodeListOf<HTMLSourceElement>;
- "span": NodeListOf<HTMLSpanElement>;
- "stop": NodeListOf<SVGStopElement>;
- "strike": NodeListOf<HTMLElement>;
- "strong": NodeListOf<HTMLElement>;
- "style": NodeListOf<HTMLStyleElement>;
- "sub": NodeListOf<HTMLElement>;
- "sup": NodeListOf<HTMLElement>;
- "svg": NodeListOf<SVGSVGElement>;
- "switch": NodeListOf<SVGSwitchElement>;
- "symbol": NodeListOf<SVGSymbolElement>;
- "table": NodeListOf<HTMLTableElement>;
- "tbody": NodeListOf<HTMLTableSectionElement>;
- "td": NodeListOf<HTMLTableDataCellElement>;
- "template": NodeListOf<HTMLTemplateElement>;
- "text": NodeListOf<SVGTextElement>;
- "textpath": NodeListOf<SVGTextPathElement>;
- "textarea": NodeListOf<HTMLTextAreaElement>;
- "tfoot": NodeListOf<HTMLTableSectionElement>;
- "th": NodeListOf<HTMLTableHeaderCellElement>;
- "thead": NodeListOf<HTMLTableSectionElement>;
- "title": NodeListOf<HTMLTitleElement>;
- "tr": NodeListOf<HTMLTableRowElement>;
- "track": NodeListOf<HTMLTrackElement>;
- "tspan": NodeListOf<SVGTSpanElement>;
- "tt": NodeListOf<HTMLElement>;
- "u": NodeListOf<HTMLElement>;
- "ul": NodeListOf<HTMLUListElement>;
- "use": NodeListOf<SVGUseElement>;
- "var": NodeListOf<HTMLElement>;
- "video": NodeListOf<HTMLVideoElement>;
- "view": NodeListOf<SVGViewElement>;
- "wbr": NodeListOf<HTMLElement>;
- "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
- "xmp": NodeListOf<HTMLPreElement>;
-}
-
-declare var Audio: {new(src?: string): HTMLAudioElement; };
-declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
-declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
-declare var applicationCache: ApplicationCache;
-declare var clientInformation: Navigator;
-declare var closed: boolean;
-declare var crypto: Crypto;
-declare var defaultStatus: string;
-declare var devicePixelRatio: number;
-declare var doNotTrack: string;
-declare var document: Document;
-declare var event: Event | undefined;
-declare var external: External;
-declare var frameElement: Element;
-declare var frames: Window;
-declare var history: History;
-declare var innerHeight: number;
-declare var innerWidth: number;
-declare var length: number;
-declare var location: Location;
-declare var locationbar: BarProp;
-declare var menubar: BarProp;
-declare var msCredentials: MSCredentials;
-declare const name: never;
-declare var navigator: Navigator;
-declare var offscreenBuffering: string | boolean;
-declare var onabort: (this: Window, ev: UIEvent) => any;
-declare var onafterprint: (this: Window, ev: Event) => any;
-declare var onbeforeprint: (this: Window, ev: Event) => any;
-declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
-declare var onblur: (this: Window, ev: FocusEvent) => any;
-declare var oncanplay: (this: Window, ev: Event) => any;
-declare var oncanplaythrough: (this: Window, ev: Event) => any;
-declare var onchange: (this: Window, ev: Event) => any;
-declare var onclick: (this: Window, ev: MouseEvent) => any;
-declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
-declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
-declare var ondblclick: (this: Window, ev: MouseEvent) => any;
-declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
-declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
-declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
-declare var ondrag: (this: Window, ev: DragEvent) => any;
-declare var ondragend: (this: Window, ev: DragEvent) => any;
-declare var ondragenter: (this: Window, ev: DragEvent) => any;
-declare var ondragleave: (this: Window, ev: DragEvent) => any;
-declare var ondragover: (this: Window, ev: DragEvent) => any;
-declare var ondragstart: (this: Window, ev: DragEvent) => any;
-declare var ondrop: (this: Window, ev: DragEvent) => any;
-declare var ondurationchange: (this: Window, ev: Event) => any;
-declare var onemptied: (this: Window, ev: Event) => any;
-declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
-declare var onerror: ErrorEventHandler;
-declare var onfocus: (this: Window, ev: FocusEvent) => any;
-declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
-declare var oninput: (this: Window, ev: Event) => any;
-declare var oninvalid: (this: Window, ev: Event) => any;
-declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
-declare var onload: (this: Window, ev: Event) => any;
-declare var onloadeddata: (this: Window, ev: Event) => any;
-declare var onloadedmetadata: (this: Window, ev: Event) => any;
-declare var onloadstart: (this: Window, ev: Event) => any;
-declare var onmessage: (this: Window, ev: MessageEvent) => any;
-declare var onmousedown: (this: Window, ev: MouseEvent) => any;
-declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
-declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
-declare var onmousemove: (this: Window, ev: MouseEvent) => any;
-declare var onmouseout: (this: Window, ev: MouseEvent) => any;
-declare var onmouseover: (this: Window, ev: MouseEvent) => any;
-declare var onmouseup: (this: Window, ev: MouseEvent) => any;
-declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
-declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
-declare var onoffline: (this: Window, ev: Event) => any;
-declare var ononline: (this: Window, ev: Event) => any;
-declare var onorientationchange: (this: Window, ev: Event) => any;
-declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpause: (this: Window, ev: Event) => any;
-declare var onplay: (this: Window, ev: Event) => any;
-declare var onplaying: (this: Window, ev: Event) => any;
-declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
-declare var onprogress: (this: Window, ev: ProgressEvent) => any;
-declare var onratechange: (this: Window, ev: Event) => any;
-declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
-declare var onreset: (this: Window, ev: Event) => any;
-declare var onresize: (this: Window, ev: UIEvent) => any;
-declare var onscroll: (this: Window, ev: UIEvent) => any;
-declare var onseeked: (this: Window, ev: Event) => any;
-declare var onseeking: (this: Window, ev: Event) => any;
-declare var onselect: (this: Window, ev: UIEvent) => any;
-declare var onstalled: (this: Window, ev: Event) => any;
-declare var onstorage: (this: Window, ev: StorageEvent) => any;
-declare var onsubmit: (this: Window, ev: Event) => any;
-declare var onsuspend: (this: Window, ev: Event) => any;
-declare var ontimeupdate: (this: Window, ev: Event) => any;
-declare var ontouchcancel: (ev: TouchEvent) => any;
-declare var ontouchend: (ev: TouchEvent) => any;
-declare var ontouchmove: (ev: TouchEvent) => any;
-declare var ontouchstart: (ev: TouchEvent) => any;
-declare var onunload: (this: Window, ev: Event) => any;
-declare var onvolumechange: (this: Window, ev: Event) => any;
-declare var onwaiting: (this: Window, ev: Event) => any;
-declare var opener: any;
-declare var orientation: string | number;
-declare var outerHeight: number;
-declare var outerWidth: number;
-declare var pageXOffset: number;
-declare var pageYOffset: number;
-declare var parent: Window;
-declare var performance: Performance;
-declare var personalbar: BarProp;
-declare var screen: Screen;
-declare var screenLeft: number;
-declare var screenTop: number;
-declare var screenX: number;
-declare var screenY: number;
-declare var scrollX: number;
-declare var scrollY: number;
-declare var scrollbars: BarProp;
-declare var self: Window;
-declare var status: string;
-declare var statusbar: BarProp;
-declare var styleMedia: StyleMedia;
-declare var toolbar: BarProp;
-declare var top: Window;
-declare var window: Window;
-declare function alert(message?: any): void;
-declare function blur(): void;
-declare function cancelAnimationFrame(handle: number): void;
-declare function captureEvents(): void;
-declare function close(): void;
-declare function confirm(message?: string): boolean;
-declare function focus(): void;
-declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
-declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
-declare function getSelection(): Selection;
-declare function matchMedia(mediaQuery: string): MediaQueryList;
-declare function moveBy(x?: number, y?: number): void;
-declare function moveTo(x?: number, y?: number): void;
-declare function msWriteProfilerMark(profilerMarkName: string): void;
-declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
-declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
-declare function print(): void;
-declare function prompt(message?: string, _default?: string): string | null;
-declare function releaseEvents(): void;
-declare function requestAnimationFrame(callback: FrameRequestCallback): number;
-declare function resizeBy(x?: number, y?: number): void;
-declare function resizeTo(x?: number, y?: number): void;
-declare function scroll(x?: number, y?: number): void;
-declare function scrollBy(x?: number, y?: number): void;
-declare function scrollTo(x?: number, y?: number): void;
-declare function webkitCancelAnimationFrame(handle: number): void;
-declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
-declare function scroll(options?: ScrollToOptions): void;
-declare function scrollTo(options?: ScrollToOptions): void;
-declare function scrollBy(options?: ScrollToOptions): void;
-declare function toString(): string;
-declare function dispatchEvent(evt: Event): boolean;
-declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-declare function clearInterval(handle: number): void;
-declare function clearTimeout(handle: number): void;
-declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
-declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
-declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
-declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-declare function clearImmediate(handle: number): void;
-declare function setImmediate(handler: (...args: any[]) => void): number;
-declare function setImmediate(handler: any, ...args: any[]): number;
-declare var sessionStorage: Storage;
-declare var localStorage: Storage;
-declare var console: Console;
-declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
-declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
-declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
-declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
-declare var onpointermove: (this: Window, ev: PointerEvent) => any;
-declare var onpointerout: (this: Window, ev: PointerEvent) => any;
-declare var onpointerover: (this: Window, ev: PointerEvent) => any;
-declare var onpointerup: (this: Window, ev: PointerEvent) => any;
-declare var onwheel: (this: Window, ev: WheelEvent) => any;
-declare var indexedDB: IDBFactory;
-declare function atob(encodedString: string): string;
-declare function btoa(rawString: string): string;
-declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-type AAGUID = string;
-type AlgorithmIdentifier = string | Algorithm;
-type ConstrainBoolean = boolean | ConstrainBooleanParameters;
-type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
-type ConstrainDouble = number | ConstrainDoubleRange;
-type ConstrainLong = number | ConstrainLongRange;
-type CryptoOperationData = ArrayBufferView;
-type GLbitfield = number;
-type GLboolean = boolean;
-type GLbyte = number;
-type GLclampf = number;
-type GLenum = number;
-type GLfloat = number;
-type GLint = number;
-type GLintptr = number;
-type GLshort = number;
-type GLsizei = number;
-type GLsizeiptr = number;
-type GLubyte = number;
-type GLuint = number;
-type GLushort = number;
-type IDBKeyPath = string;
-type KeyFormat = string;
-type KeyType = string;
-type KeyUsage = string;
-type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
-type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
-type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
-type RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;
-type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
-type payloadtype = number;
-type ScrollBehavior = "auto" | "instant" | "smooth";
-type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
-type IDBValidKey = number | string | Date | IDBArrayKey;
-type BufferSource = ArrayBuffer | ArrayBufferView;
-type MouseWheelEvent = WheelEvent;
-type ScrollRestoration = "auto" | "manual"; \ No newline at end of file
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+/////////////////////////////
+/// IE DOM APIs
+/////////////////////////////
+
+interface Account {
+ rpDisplayName?: string;
+ displayName?: string;
+ id?: string;
+ name?: string;
+ imageURL?: string;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AnimationEventInit extends EventInit {
+ animationName?: string;
+ elapsedTime?: number;
+}
+
+interface AssertionOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ allowList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface CacheQueryOptions {
+ ignoreSearch?: boolean;
+ ignoreMethod?: boolean;
+ ignoreVary?: boolean;
+ cacheName?: string;
+}
+
+interface ClientData {
+ challenge?: string;
+ origin?: string;
+ rpId?: string;
+ hashAlg?: string | Algorithm;
+ tokenBinding?: string;
+ extensions?: WebAuthnExtensions;
+}
+
+interface CloseEventInit extends EventInit {
+ wasClean?: boolean;
+ code?: number;
+ reason?: string;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainLongRange extends LongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainVideoFacingModeParameters {
+ exact?: VideoFacingModeEnum | VideoFacingModeEnum[];
+ ideal?: VideoFacingModeEnum | VideoFacingModeEnum[];
+}
+
+interface CustomEventInit extends EventInit {
+ detail?: any;
+}
+
+interface DOMRectInit {
+ x?: any;
+ y?: any;
+ width?: any;
+ height?: any;
+}
+
+interface DeviceAccelerationDict {
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DeviceLightEventInit extends EventInit {
+ value?: number;
+}
+
+interface DeviceMotionEventInit extends EventInit {
+ acceleration?: DeviceAccelerationDict;
+ accelerationIncludingGravity?: DeviceAccelerationDict;
+ rotationRate?: DeviceRotationRateDict;
+ interval?: number;
+}
+
+interface DeviceOrientationEventInit extends EventInit {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+ absolute?: boolean;
+}
+
+interface DeviceRotationRateDict {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+}
+
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
+interface ErrorEventInit extends EventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ colno?: number;
+ error?: any;
+}
+
+interface EventInit {
+ scoped?: boolean;
+ bubbles?: boolean;
+ cancelable?: boolean;
+}
+
+interface EventModifierInit extends UIEventInit {
+ ctrlKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierOS?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+}
+
+interface ExceptionInformation {
+ domain?: string;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget;
+}
+
+interface FocusNavigationEventInit extends EventInit {
+ navigationReason?: string;
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface FocusNavigationOrigin {
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface GamepadEventInit extends EventInit {
+ gamepad?: Gamepad;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: IDBKeyPath;
+}
+
+interface IntersectionObserverEntryInit {
+ time?: number;
+ rootBounds?: DOMRectInit;
+ boundingClientRect?: DOMRectInit;
+ intersectionRect?: DOMRectInit;
+ target?: Element;
+}
+
+interface IntersectionObserverInit {
+ root?: Element;
+ rootMargin?: string;
+ threshold?: number | number[];
+}
+
+interface KeyAlgorithm {
+ name?: string;
+}
+
+interface KeyboardEventInit extends EventModifierInit {
+ code?: string;
+ key?: string;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface LongRange {
+ max?: number;
+ min?: number;
+}
+
+interface MSAccountInfo {
+ rpDisplayName?: string;
+ userDisplayName?: string;
+ accountName?: string;
+ userId?: string;
+ accountImageUri?: string;
+}
+
+interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
+ networkSendQualityEventRatio?: number;
+ networkDelayEventRatio?: number;
+ cpuInsufficientEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceCaptureNotFunctioningEventRatio?: number;
+ deviceGlitchesEventRatio?: number;
+ deviceLowSNREventRatio?: number;
+ deviceLowSpeechLevelEventRatio?: number;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
+ deviceNearEndToEchoRatioEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ deviceRenderMuteEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
+ deviceHowlingEventCount?: number;
+}
+
+interface MSAudioRecvPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
+ packetReorderRatio?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ burstLossLength1?: number;
+ burstLossLength2?: number;
+ burstLossLength3?: number;
+ burstLossLength4?: number;
+ burstLossLength5?: number;
+ burstLossLength6?: number;
+ burstLossLength7?: number;
+ burstLossLength8OrHigher?: number;
+ fecRecvDistance1?: number;
+ fecRecvDistance2?: number;
+ fecRecvDistance3?: number;
+ ratioConcealedSamplesAvg?: number;
+ ratioStretchedSamplesAvg?: number;
+ ratioCompressedSamplesAvg?: number;
+}
+
+interface MSAudioRecvSignal {
+ initialSignalLevelRMS?: number;
+ recvSignalLevelCh1?: number;
+ recvNoiseLevelCh1?: number;
+ renderSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderLoopbackSignalLevel?: number;
+}
+
+interface MSAudioSendPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioSendSignal;
+ audioFECUsed?: boolean;
+ sendMutePercent?: number;
+}
+
+interface MSAudioSendSignal {
+ noiseLevel?: number;
+ sendSignalLevelCh1?: number;
+ sendNoiseLevelCh1?: number;
+}
+
+interface MSConnectivity {
+ iceType?: MSIceType;
+ iceWarningFlags?: MSIceWarningFlags;
+ relayAddress?: MSRelayAddress;
+}
+
+interface MSCredentialFilter {
+ accept?: MSCredentialSpec[];
+}
+
+interface MSCredentialParameters {
+ type?: MSCredentialType;
+}
+
+interface MSCredentialSpec {
+ type?: MSCredentialType;
+ id?: string;
+}
+
+interface MSDelay {
+ roundTrip?: number;
+ roundTripMax?: number;
+}
+
+interface MSDescription extends RTCStats {
+ connectivity?: MSConnectivity;
+ transport?: RTCIceProtocol;
+ networkconnectivity?: MSNetworkConnectivityInfo;
+ localAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ deviceDevName?: string;
+ reflexiveLocalIPAddr?: MSIPAddressInfo;
+}
+
+interface MSFIDOCredentialParameters extends MSCredentialParameters {
+ algorithm?: string | Algorithm;
+ authenticators?: AAGUID[];
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ port?: number;
+ manufacturerMacAddrMask?: string;
+}
+
+interface MSIceWarningFlags {
+ turnTcpTimedOut?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
+ allocationMessageIntegrityFailed?: boolean;
+ connCheckOtherError?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ noRelayServersConfigured?: boolean;
+ multipleRelayServersAttempted?: boolean;
+ portRangeExhausted?: boolean;
+ alternateServerReceived?: boolean;
+ pseudoTLSFailure?: boolean;
+ turnTurnTcpConnectivityFailed?: boolean;
+ useCandidateChecksFailed?: boolean;
+ fipsAllocationFailure?: boolean;
+}
+
+interface MSJitter {
+ interArrival?: number;
+ interArrivalMax?: number;
+ interArrivalSD?: number;
+}
+
+interface MSLocalClientEventBase extends RTCStats {
+ networkReceiveQualityEventRatio?: number;
+ networkBandwidthLowEventRatio?: number;
+}
+
+interface MSNetwork extends RTCStats {
+ jitter?: MSJitter;
+ delay?: MSDelay;
+ packetLoss?: MSPacketLoss;
+ utilization?: MSUtilization;
+}
+
+interface MSNetworkConnectivityInfo {
+ vpn?: boolean;
+ linkspeed?: number;
+ networkConnectionDetails?: string;
+}
+
+interface MSNetworkInterfaceType {
+ interfaceTypeEthernet?: boolean;
+ interfaceTypeWireless?: boolean;
+ interfaceTypePPP?: boolean;
+ interfaceTypeTunnel?: boolean;
+ interfaceTypeWWAN?: boolean;
+}
+
+interface MSOutboundNetwork extends MSNetwork {
+ appliedBandwidthLimit?: number;
+}
+
+interface MSPacketLoss {
+ lossRate?: number;
+ lossRateMax?: number;
+}
+
+interface MSPayloadBase extends RTCStats {
+ payloadDescription?: string;
+}
+
+interface MSPortRange {
+ min?: number;
+ max?: number;
+}
+
+interface MSRelayAddress {
+ relayAddress?: string;
+ port?: number;
+}
+
+interface MSSignatureParameters {
+ userPrompt?: string;
+}
+
+interface MSTransportDiagnosticsStats extends RTCStats {
+ baseAddress?: string;
+ localAddress?: string;
+ localSite?: string;
+ networkName?: string;
+ remoteAddress?: string;
+ remoteSite?: string;
+ localMR?: string;
+ remoteMR?: string;
+ iceWarningFlags?: MSIceWarningFlags;
+ portRangeMin?: number;
+ portRangeMax?: number;
+ localMRTCPPort?: number;
+ remoteMRTCPPort?: number;
+ stunVer?: number;
+ numConsentReqSent?: number;
+ numConsentReqReceived?: number;
+ numConsentRespSent?: number;
+ numConsentRespReceived?: number;
+ interfaces?: MSNetworkInterfaceType;
+ baseInterface?: MSNetworkInterfaceType;
+ protocol?: RTCIceProtocol;
+ localInterface?: MSNetworkInterfaceType;
+ localAddrType?: MSIceAddrType;
+ remoteAddrType?: MSIceAddrType;
+ iceRole?: RTCIceRole;
+ rtpRtcpMux?: boolean;
+ allocationTimeInMs?: number;
+ msRtcEngineVersion?: string;
+}
+
+interface MSUtilization {
+ packets?: number;
+ bandwidthEstimation?: number;
+ bandwidthEstimationMin?: number;
+ bandwidthEstimationMax?: number;
+ bandwidthEstimationStdDev?: number;
+ bandwidthEstimationAvg?: number;
+}
+
+interface MSVideoPayload extends MSPayloadBase {
+ resolution?: string;
+ videoBitRateAvg?: number;
+ videoBitRateMax?: number;
+ videoFrameRateAvg?: number;
+ videoPacketLossRate?: number;
+ durationSeconds?: number;
+}
+
+interface MSVideoRecvPayload extends MSVideoPayload {
+ videoFrameLossRate?: number;
+ recvCodecType?: string;
+ recvResolutionWidth?: number;
+ recvResolutionHeight?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
+ recvFrameRateAverage?: number;
+ recvBitRateMaximum?: number;
+ recvBitRateAverage?: number;
+ recvVideoStreamsMax?: number;
+ recvVideoStreamsMin?: number;
+ recvVideoStreamsMode?: number;
+ videoPostFECPLR?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ reorderBufferTotalPackets?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvFpsHarmonicAverage?: number;
+ recvNumResSwitches?: number;
+}
+
+interface MSVideoResolutionDistribution {
+ cifQuality?: number;
+ vgaQuality?: number;
+ h720Quality?: number;
+ h1080Quality?: number;
+ h1440Quality?: number;
+ h2160Quality?: number;
+}
+
+interface MSVideoSendPayload extends MSVideoPayload {
+ sendFrameRateAverage?: number;
+ sendBitRateMaximum?: number;
+ sendBitRateAverage?: number;
+ sendVideoStreamsMax?: number;
+ sendResolutionWidth?: number;
+ sendResolutionHeight?: number;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initDataType?: string;
+ initData?: ArrayBuffer;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ messageType?: MediaKeyMessageType;
+ message?: ArrayBuffer;
+}
+
+interface MediaKeySystemConfiguration {
+ initDataTypes?: string[];
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ persistentState?: MediaKeysRequirement;
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ video?: boolean | MediaTrackConstraints;
+ audio?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ width?: number | LongRange;
+ height?: number | LongRange;
+ aspectRatio?: number | DoubleRange;
+ frameRate?: number | DoubleRange;
+ facingMode?: string;
+ volume?: number | DoubleRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ echoCancellation?: boolean[];
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackConstraintSet {
+ width?: number | ConstrainLongRange;
+ height?: number | ConstrainLongRange;
+ aspectRatio?: number | ConstrainDoubleRange;
+ frameRate?: number | ConstrainDoubleRange;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ volume?: number | ConstrainDoubleRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ width?: number;
+ height?: number;
+ aspectRatio?: number;
+ frameRate?: number;
+ facingMode?: string;
+ volume?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ echoCancellation?: boolean;
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackSupportedConstraints {
+ width?: boolean;
+ height?: boolean;
+ aspectRatio?: boolean;
+ frameRate?: boolean;
+ facingMode?: boolean;
+ volume?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ echoCancellation?: boolean;
+ deviceId?: boolean;
+ groupId?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ source?: Window;
+ ports?: MessagePort[];
+}
+
+interface MouseEventInit extends EventModifierInit {
+ screenX?: number;
+ screenY?: number;
+ clientX?: number;
+ clientY?: number;
+ button?: number;
+ buttons?: number;
+ relatedTarget?: EventTarget;
+}
+
+interface MsZoomToOptions {
+ contentX?: number;
+ contentY?: number;
+ viewportX?: string;
+ viewportY?: string;
+ scaleFactor?: number;
+ animate?: string;
+}
+
+interface MutationObserverInit {
+ childList?: boolean;
+ attributes?: boolean;
+ characterData?: boolean;
+ subtree?: boolean;
+ attributeOldValue?: boolean;
+ characterDataOldValue?: boolean;
+ attributeFilter?: string[];
+}
+
+interface NotificationOptions {
+ dir?: NotificationDirection;
+ lang?: string;
+ body?: string;
+ tag?: string;
+ icon?: string;
+}
+
+interface ObjectURLOptions {
+ oneTimeOnly?: boolean;
+}
+
+interface PaymentCurrencyAmount {
+ currency?: string;
+ value?: string;
+ currencySystem?: string;
+}
+
+interface PaymentDetails {
+ total?: PaymentItem;
+ displayItems?: PaymentItem[];
+ shippingOptions?: PaymentShippingOption[];
+ modifiers?: PaymentDetailsModifier[];
+ error?: string;
+}
+
+interface PaymentDetailsModifier {
+ supportedMethods?: string[];
+ total?: PaymentItem;
+ additionalDisplayItems?: PaymentItem[];
+ data?: any;
+}
+
+interface PaymentItem {
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ pending?: boolean;
+}
+
+interface PaymentMethodData {
+ supportedMethods?: string[];
+ data?: any;
+}
+
+interface PaymentOptions {
+ requestPayerName?: boolean;
+ requestPayerEmail?: boolean;
+ requestPayerPhone?: boolean;
+ requestShipping?: boolean;
+ shippingType?: string;
+}
+
+interface PaymentRequestUpdateEventInit extends EventInit {
+}
+
+interface PaymentShippingOption {
+ id?: string;
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ selected?: boolean;
+}
+
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ pointerId?: number;
+ width?: number;
+ height?: number;
+ pressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ pointerType?: string;
+ isPrimary?: boolean;
+}
+
+interface PopStateEventInit extends EventInit {
+ state?: any;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ timeout?: number;
+ maximumAge?: number;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PushSubscriptionOptionsInit {
+ userVisibleOnly?: boolean;
+ applicationServerKey?: any;
+}
+
+interface RTCConfiguration {
+ iceServers?: RTCIceServer[];
+ iceTransportPolicy?: RTCIceTransportPolicy;
+ bundlePolicy?: RTCBundlePolicy;
+ peerIdentity?: string;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCDtlsParameters {
+ role?: RTCDtlsRole;
+ fingerprints?: RTCDtlsFingerprint[];
+}
+
+interface RTCIceCandidateAttributes extends RTCStats {
+ ipAddress?: string;
+ portNumber?: number;
+ transport?: string;
+ candidateType?: RTCStatsIceCandidateType;
+ priority?: number;
+ addressSourceUrl?: string;
+}
+
+interface RTCIceCandidateComplete {
+}
+
+interface RTCIceCandidateDictionary {
+ foundation?: string;
+ priority?: number;
+ ip?: string;
+ protocol?: RTCIceProtocol;
+ port?: number;
+ type?: RTCIceCandidateType;
+ tcpType?: RTCIceTcpCandidateType;
+ relatedAddress?: string;
+ relatedPort?: number;
+ msMTurnSessionId?: string;
+}
+
+interface RTCIceCandidateInit {
+ candidate?: string;
+ sdpMid?: string;
+ sdpMLineIndex?: number;
+}
+
+interface RTCIceCandidatePair {
+ local?: RTCIceCandidateDictionary;
+ remote?: RTCIceCandidateDictionary;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ transportId?: string;
+ localCandidateId?: string;
+ remoteCandidateId?: string;
+ state?: RTCStatsIceCandidatePairState;
+ priority?: number;
+ nominated?: boolean;
+ writable?: boolean;
+ readable?: boolean;
+ bytesSent?: number;
+ bytesReceived?: number;
+ roundTripTime?: number;
+ availableOutgoingBitrate?: number;
+ availableIncomingBitrate?: number;
+}
+
+interface RTCIceGatherOptions {
+ gatherPolicy?: RTCIceGatherPolicy;
+ iceservers?: RTCIceServer[];
+ portRange?: MSPortRange;
+}
+
+interface RTCIceParameters {
+ usernameFragment?: string;
+ password?: string;
+ iceLite?: boolean;
+}
+
+interface RTCIceServer {
+ urls?: any;
+ username?: string;
+ credential?: string;
+}
+
+interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsReceived?: number;
+ bytesReceived?: number;
+ packetsLost?: number;
+ jitter?: number;
+ fractionLost?: number;
+}
+
+interface RTCMediaStreamTrackStats extends RTCStats {
+ trackIdentifier?: string;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ frameWidth?: number;
+ frameHeight?: number;
+ framesPerSecond?: number;
+ framesSent?: number;
+ framesReceived?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesCorrupted?: number;
+ audioLevel?: number;
+ echoReturnLoss?: number;
+ echoReturnLossEnhancement?: number;
+}
+
+interface RTCOfferOptions {
+ offerToReceiveVideo?: number;
+ offerToReceiveAudio?: number;
+ voiceActivityDetection?: boolean;
+ iceRestart?: boolean;
+}
+
+interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsSent?: number;
+ bytesSent?: number;
+ targetBitrate?: number;
+ roundTripTime?: number;
+}
+
+interface RTCPeerConnectionIceEventInit extends EventInit {
+ candidate?: RTCIceCandidate;
+}
+
+interface RTCRTPStreamStats extends RTCStats {
+ ssrc?: string;
+ associateStatsId?: string;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ transportId?: string;
+ codecId?: string;
+ firCount?: number;
+ pliCount?: number;
+ nackCount?: number;
+ sliCount?: number;
+}
+
+interface RTCRtcpFeedback {
+ type?: string;
+ parameter?: string;
+}
+
+interface RTCRtcpParameters {
+ ssrc?: number;
+ cname?: string;
+ reducedSize?: boolean;
+ mux?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs?: RTCRtpCodecCapability[];
+ headerExtensions?: RTCRtpHeaderExtension[];
+ fecMechanisms?: string[];
+}
+
+interface RTCRtpCodecCapability {
+ name?: string;
+ kind?: string;
+ clockRate?: number;
+ preferredPayloadType?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+ options?: any;
+ maxTemporalLayers?: number;
+ maxSpatialLayers?: number;
+ svcMultiStreamSupport?: boolean;
+}
+
+interface RTCRtpCodecParameters {
+ name?: string;
+ payloadType?: any;
+ clockRate?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+}
+
+interface RTCRtpContributingSource {
+ timestamp?: number;
+ csrc?: number;
+ audioLevel?: number;
+}
+
+interface RTCRtpEncodingParameters {
+ ssrc?: number;
+ codecPayloadType?: number;
+ fec?: RTCRtpFecParameters;
+ rtx?: RTCRtpRtxParameters;
+ priority?: number;
+ maxBitrate?: number;
+ minQuality?: number;
+ resolutionScale?: number;
+ framerateScale?: number;
+ maxFramerate?: number;
+ active?: boolean;
+ encodingId?: string;
+ dependencyEncodingIds?: string[];
+ ssrcRange?: RTCSsrcRange;
+}
+
+interface RTCRtpFecParameters {
+ ssrc?: number;
+ mechanism?: string;
+}
+
+interface RTCRtpHeaderExtension {
+ kind?: string;
+ uri?: string;
+ preferredId?: number;
+ preferredEncrypt?: boolean;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ uri?: string;
+ id?: number;
+ encrypt?: boolean;
+}
+
+interface RTCRtpParameters {
+ muxId?: string;
+ codecs?: RTCRtpCodecParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ encodings?: RTCRtpEncodingParameters[];
+ rtcp?: RTCRtcpParameters;
+ degradationPreference?: RTCDegradationPreference;
+}
+
+interface RTCRtpRtxParameters {
+ ssrc?: number;
+}
+
+interface RTCRtpUnhandled {
+ ssrc?: number;
+ payloadType?: number;
+ muxId?: string;
+}
+
+interface RTCSessionDescriptionInit {
+ type?: RTCSdpType;
+ sdp?: string;
+}
+
+interface RTCSrtpKeyParam {
+ keyMethod?: string;
+ keySalt?: string;
+ lifetime?: string;
+ mkiValue?: number;
+ mkiLength?: number;
+}
+
+interface RTCSrtpSdesParameters {
+ tag?: number;
+ cryptoSuite?: string;
+ keyParams?: RTCSrtpKeyParam[];
+ sessionParams?: string[];
+}
+
+interface RTCSsrcRange {
+ min?: number;
+ max?: number;
+}
+
+interface RTCStats {
+ timestamp?: number;
+ type?: RTCStatsType;
+ id?: string;
+ msType?: MSStatsType;
+}
+
+interface RTCStatsReport {
+}
+
+interface RTCTransportStats extends RTCStats {
+ bytesSent?: number;
+ bytesReceived?: number;
+ rtcpTransportStatsId?: string;
+ activeConnection?: boolean;
+ selectedCandidatePairId?: string;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ method?: string;
+ headers?: any;
+ body?: any;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ mode?: RequestMode;
+ credentials?: RequestCredentials;
+ cache?: RequestCache;
+ redirect?: RequestRedirect;
+ integrity?: string;
+ keepalive?: boolean;
+ window?: any;
+}
+
+interface ResponseInit {
+ status?: number;
+ statusText?: string;
+ headers?: any;
+}
+
+interface ScopedCredentialDescriptor {
+ type?: ScopedCredentialType;
+ id?: any;
+ transports?: Transport[];
+}
+
+interface ScopedCredentialOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ excludeList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface ScopedCredentialParameters {
+ type?: ScopedCredentialType;
+ algorithm?: string | Algorithm;
+}
+
+interface ServiceWorkerMessageEventInit extends EventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+ source?: ServiceWorker | MessagePort;
+ ports?: MessagePort[];
+}
+
+interface SpeechSynthesisEventInit extends EventInit {
+ utterance?: SpeechSynthesisUtterance;
+ charIndex?: number;
+ elapsedTime?: number;
+ name?: string;
+}
+
+interface StoreExceptionsInformation extends ExceptionInformation {
+ siteName?: string;
+ explanationString?: string;
+ detailURI?: string;
+}
+
+interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface TrackEventInit extends EventInit {
+ track?: VideoTrack | AudioTrack | TextTrack;
+}
+
+interface TransitionEventInit extends EventInit {
+ propertyName?: string;
+ elapsedTime?: number;
+}
+
+interface UIEventInit extends EventInit {
+ view?: Window;
+ detail?: number;
+}
+
+interface WebAuthnExtensions {
+}
+
+interface WebGLContextAttributes {
+ failIfMajorPerformanceCaveat?: boolean;
+ alpha?: boolean;
+ depth?: boolean;
+ stencil?: boolean;
+ antialias?: boolean;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+ deltaMode?: number;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface WebKitEntriesCallback {
+ (evt: Event): void;
+}
+
+interface WebKitErrorCallback {
+ (evt: Event): void;
+}
+
+interface WebKitFileCallback {
+ (evt: Event): void;
+}
+
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
+ drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
+ vertexAttribDivisorANGLE(index: number, divisor: number): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+declare var ANGLE_instanced_arrays: {
+ prototype: ANGLE_instanced_arrays;
+ new(): ANGLE_instanced_arrays;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ readonly frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(): AnalyserNode;
+}
+
+interface AnimationEvent extends Event {
+ readonly animationName: string;
+ readonly elapsedTime: number;
+ initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
+}
+
+interface ApplicationCacheEventMap {
+ "cached": Event;
+ "checking": Event;
+ "downloading": Event;
+ "error": Event;
+ "noupdate": Event;
+ "obsolete": Event;
+ "progress": ProgressEvent;
+ "updateready": Event;
+}
+
+interface ApplicationCache extends EventTarget {
+ oncached: (this: ApplicationCache, ev: Event) => any;
+ onchecking: (this: ApplicationCache, ev: Event) => any;
+ ondownloading: (this: ApplicationCache, ev: Event) => any;
+ onerror: (this: ApplicationCache, ev: Event) => any;
+ onnoupdate: (this: ApplicationCache, ev: Event) => any;
+ onobsolete: (this: ApplicationCache, ev: Event) => any;
+ onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
+ onupdateready: (this: ApplicationCache, ev: Event) => any;
+ readonly status: number;
+ abort(): void;
+ swapCache(): void;
+ update(): void;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+ addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ApplicationCache: {
+ prototype: ApplicationCache;
+ new(): ApplicationCache;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+}
+
+interface Attr extends Node {
+ readonly name: string;
+ readonly ownerElement: Element;
+ readonly prefix: string | null;
+ readonly specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+}
+
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(): AudioBuffer;
+}
+
+interface AudioBufferSourceNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface AudioBufferSourceNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
+ readonly playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(): AudioBufferSourceNode;
+}
+
+interface AudioContextEventMap {
+ "statechange": Event;
+}
+
+interface AudioContextBase extends EventTarget {
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ onstatechange: (this: AudioContext, ev: Event) => any;
+ readonly sampleRate: number;
+ readonly state: AudioContextState;
+ close(): Promise<void>;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
+ resume(): Promise<void>;
+ addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface AudioContext extends AudioContextBase {
+ suspend(): Promise<void>;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(): AudioContext;
+}
+
+interface AudioDestinationNode extends AudioNode {
+ readonly maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+}
+
+interface AudioListener {
+ dopplerFactor: number;
+ speedOfSound: number;
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+}
+
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: ChannelCountMode;
+ channelInterpretation: ChannelInterpretation;
+ readonly context: AudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
+ connect(destination: AudioNode, output?: number, input?: number): AudioNode;
+ connect(destination: AudioParam, output?: number): void;
+ disconnect(output?: number): void;
+ disconnect(destination: AudioNode, output?: number, input?: number): void;
+ disconnect(destination: AudioParam, output?: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+}
+
+interface AudioParam {
+ readonly defaultValue: number;
+ value: number;
+ cancelScheduledValues(startTime: number): AudioParam;
+ exponentialRampToValueAtTime(value: number, endTime: number): AudioParam;
+ linearRampToValueAtTime(value: number, endTime: number): AudioParam;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam;
+ setValueAtTime(value: number, startTime: number): AudioParam;
+ setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): AudioParam;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+}
+
+interface AudioProcessingEvent extends Event {
+ readonly inputBuffer: AudioBuffer;
+ readonly outputBuffer: AudioBuffer;
+ readonly playbackTime: number;
+}
+
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(): AudioProcessingEvent;
+}
+
+interface AudioTrack {
+ enabled: boolean;
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var AudioTrack: {
+ prototype: AudioTrack;
+ new(): AudioTrack;
+}
+
+interface AudioTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface AudioTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ onchange: (this: AudioTrackList, ev: Event) => any;
+ onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ getTrackById(id: string): AudioTrack | null;
+ item(index: number): AudioTrack;
+ addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: AudioTrack;
+}
+
+declare var AudioTrackList: {
+ prototype: AudioTrackList;
+ new(): AudioTrackList;
+}
+
+interface BarProp {
+ readonly visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+}
+
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+}
+
+interface BiquadFilterNode extends AudioNode {
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
+ type: BiquadFilterType;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(): BiquadFilterNode;
+}
+
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
+}
+
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+}
+
+interface CSS {
+ supports(property: string, value?: string): boolean;
+}
+declare var CSS: CSS;
+
+interface CSSConditionRule extends CSSGroupingRule {
+ conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+}
+
+interface CSSFontFaceRule extends CSSRule {
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+}
+
+interface CSSGroupingRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+}
+
+interface CSSImportRule extends CSSRule {
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+}
+
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+}
+
+interface CSSKeyframesRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(rule: string): void;
+ findRule(rule: string): CSSKeyframeRule;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+}
+
+interface CSSMediaRule extends CSSConditionRule {
+ readonly media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+}
+
+interface CSSNamespaceRule extends CSSRule {
+ readonly namespaceURI: string;
+ readonly prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+}
+
+interface CSSPageRule extends CSSRule {
+ readonly pseudoClass: string;
+ readonly selector: string;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+}
+
+interface CSSRule {
+ cssText: string;
+ readonly parentRule: CSSRule;
+ readonly parentStyleSheet: CSSStyleSheet;
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+interface CSSRuleList {
+ readonly length: number;
+ item(index: number): CSSRule;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+}
+
+interface CSSStyleDeclaration {
+ alignContent: string | null;
+ alignItems: string | null;
+ alignSelf: string | null;
+ alignmentBaseline: string | null;
+ animation: string | null;
+ animationDelay: string | null;
+ animationDirection: string | null;
+ animationDuration: string | null;
+ animationFillMode: string | null;
+ animationIterationCount: string | null;
+ animationName: string | null;
+ animationPlayState: string | null;
+ animationTimingFunction: string | null;
+ backfaceVisibility: string | null;
+ background: string | null;
+ backgroundAttachment: string | null;
+ backgroundClip: string | null;
+ backgroundColor: string | null;
+ backgroundImage: string | null;
+ backgroundOrigin: string | null;
+ backgroundPosition: string | null;
+ backgroundPositionX: string | null;
+ backgroundPositionY: string | null;
+ backgroundRepeat: string | null;
+ backgroundSize: string | null;
+ baselineShift: string | null;
+ border: string | null;
+ borderBottom: string | null;
+ borderBottomColor: string | null;
+ borderBottomLeftRadius: string | null;
+ borderBottomRightRadius: string | null;
+ borderBottomStyle: string | null;
+ borderBottomWidth: string | null;
+ borderCollapse: string | null;
+ borderColor: string | null;
+ borderImage: string | null;
+ borderImageOutset: string | null;
+ borderImageRepeat: string | null;
+ borderImageSlice: string | null;
+ borderImageSource: string | null;
+ borderImageWidth: string | null;
+ borderLeft: string | null;
+ borderLeftColor: string | null;
+ borderLeftStyle: string | null;
+ borderLeftWidth: string | null;
+ borderRadius: string | null;
+ borderRight: string | null;
+ borderRightColor: string | null;
+ borderRightStyle: string | null;
+ borderRightWidth: string | null;
+ borderSpacing: string | null;
+ borderStyle: string | null;
+ borderTop: string | null;
+ borderTopColor: string | null;
+ borderTopLeftRadius: string | null;
+ borderTopRightRadius: string | null;
+ borderTopStyle: string | null;
+ borderTopWidth: string | null;
+ borderWidth: string | null;
+ bottom: string | null;
+ boxShadow: string | null;
+ boxSizing: string | null;
+ breakAfter: string | null;
+ breakBefore: string | null;
+ breakInside: string | null;
+ captionSide: string | null;
+ clear: string | null;
+ clip: string | null;
+ clipPath: string | null;
+ clipRule: string | null;
+ color: string | null;
+ colorInterpolationFilters: string | null;
+ columnCount: any;
+ columnFill: string | null;
+ columnGap: any;
+ columnRule: string | null;
+ columnRuleColor: any;
+ columnRuleStyle: string | null;
+ columnRuleWidth: any;
+ columnSpan: string | null;
+ columnWidth: any;
+ columns: string | null;
+ content: string | null;
+ counterIncrement: string | null;
+ counterReset: string | null;
+ cssFloat: string | null;
+ cssText: string;
+ cursor: string | null;
+ direction: string | null;
+ display: string | null;
+ dominantBaseline: string | null;
+ emptyCells: string | null;
+ enableBackground: string | null;
+ fill: string | null;
+ fillOpacity: string | null;
+ fillRule: string | null;
+ filter: string | null;
+ flex: string | null;
+ flexBasis: string | null;
+ flexDirection: string | null;
+ flexFlow: string | null;
+ flexGrow: string | null;
+ flexShrink: string | null;
+ flexWrap: string | null;
+ floodColor: string | null;
+ floodOpacity: string | null;
+ font: string | null;
+ fontFamily: string | null;
+ fontFeatureSettings: string | null;
+ fontSize: string | null;
+ fontSizeAdjust: string | null;
+ fontStretch: string | null;
+ fontStyle: string | null;
+ fontVariant: string | null;
+ fontWeight: string | null;
+ glyphOrientationHorizontal: string | null;
+ glyphOrientationVertical: string | null;
+ height: string | null;
+ imeMode: string | null;
+ justifyContent: string | null;
+ kerning: string | null;
+ layoutGrid: string | null;
+ layoutGridChar: string | null;
+ layoutGridLine: string | null;
+ layoutGridMode: string | null;
+ layoutGridType: string | null;
+ left: string | null;
+ readonly length: number;
+ letterSpacing: string | null;
+ lightingColor: string | null;
+ lineBreak: string | null;
+ lineHeight: string | null;
+ listStyle: string | null;
+ listStyleImage: string | null;
+ listStylePosition: string | null;
+ listStyleType: string | null;
+ margin: string | null;
+ marginBottom: string | null;
+ marginLeft: string | null;
+ marginRight: string | null;
+ marginTop: string | null;
+ marker: string | null;
+ markerEnd: string | null;
+ markerMid: string | null;
+ markerStart: string | null;
+ mask: string | null;
+ maxHeight: string | null;
+ maxWidth: string | null;
+ minHeight: string | null;
+ minWidth: string | null;
+ msContentZoomChaining: string | null;
+ msContentZoomLimit: string | null;
+ msContentZoomLimitMax: any;
+ msContentZoomLimitMin: any;
+ msContentZoomSnap: string | null;
+ msContentZoomSnapPoints: string | null;
+ msContentZoomSnapType: string | null;
+ msContentZooming: string | null;
+ msFlowFrom: string | null;
+ msFlowInto: string | null;
+ msFontFeatureSettings: string | null;
+ msGridColumn: any;
+ msGridColumnAlign: string | null;
+ msGridColumnSpan: any;
+ msGridColumns: string | null;
+ msGridRow: any;
+ msGridRowAlign: string | null;
+ msGridRowSpan: any;
+ msGridRows: string | null;
+ msHighContrastAdjust: string | null;
+ msHyphenateLimitChars: string | null;
+ msHyphenateLimitLines: any;
+ msHyphenateLimitZone: any;
+ msHyphens: string | null;
+ msImeAlign: string | null;
+ msOverflowStyle: string | null;
+ msScrollChaining: string | null;
+ msScrollLimit: string | null;
+ msScrollLimitXMax: any;
+ msScrollLimitXMin: any;
+ msScrollLimitYMax: any;
+ msScrollLimitYMin: any;
+ msScrollRails: string | null;
+ msScrollSnapPointsX: string | null;
+ msScrollSnapPointsY: string | null;
+ msScrollSnapType: string | null;
+ msScrollSnapX: string | null;
+ msScrollSnapY: string | null;
+ msScrollTranslation: string | null;
+ msTextCombineHorizontal: string | null;
+ msTextSizeAdjust: any;
+ msTouchAction: string | null;
+ msTouchSelect: string | null;
+ msUserSelect: string | null;
+ msWrapFlow: string;
+ msWrapMargin: any;
+ msWrapThrough: string;
+ opacity: string | null;
+ order: string | null;
+ orphans: string | null;
+ outline: string | null;
+ outlineColor: string | null;
+ outlineOffset: string | null;
+ outlineStyle: string | null;
+ outlineWidth: string | null;
+ overflow: string | null;
+ overflowX: string | null;
+ overflowY: string | null;
+ padding: string | null;
+ paddingBottom: string | null;
+ paddingLeft: string | null;
+ paddingRight: string | null;
+ paddingTop: string | null;
+ pageBreakAfter: string | null;
+ pageBreakBefore: string | null;
+ pageBreakInside: string | null;
+ readonly parentRule: CSSRule;
+ perspective: string | null;
+ perspectiveOrigin: string | null;
+ pointerEvents: string | null;
+ position: string | null;
+ quotes: string | null;
+ right: string | null;
+ rotate: string | null;
+ rubyAlign: string | null;
+ rubyOverhang: string | null;
+ rubyPosition: string | null;
+ scale: string | null;
+ stopColor: string | null;
+ stopOpacity: string | null;
+ stroke: string | null;
+ strokeDasharray: string | null;
+ strokeDashoffset: string | null;
+ strokeLinecap: string | null;
+ strokeLinejoin: string | null;
+ strokeMiterlimit: string | null;
+ strokeOpacity: string | null;
+ strokeWidth: string | null;
+ tableLayout: string | null;
+ textAlign: string | null;
+ textAlignLast: string | null;
+ textAnchor: string | null;
+ textDecoration: string | null;
+ textIndent: string | null;
+ textJustify: string | null;
+ textKashida: string | null;
+ textKashidaSpace: string | null;
+ textOverflow: string | null;
+ textShadow: string | null;
+ textTransform: string | null;
+ textUnderlinePosition: string | null;
+ top: string | null;
+ touchAction: string | null;
+ transform: string | null;
+ transformOrigin: string | null;
+ transformStyle: string | null;
+ transition: string | null;
+ transitionDelay: string | null;
+ transitionDuration: string | null;
+ transitionProperty: string | null;
+ transitionTimingFunction: string | null;
+ translate: string | null;
+ unicodeBidi: string | null;
+ verticalAlign: string | null;
+ visibility: string | null;
+ webkitAlignContent: string | null;
+ webkitAlignItems: string | null;
+ webkitAlignSelf: string | null;
+ webkitAnimation: string | null;
+ webkitAnimationDelay: string | null;
+ webkitAnimationDirection: string | null;
+ webkitAnimationDuration: string | null;
+ webkitAnimationFillMode: string | null;
+ webkitAnimationIterationCount: string | null;
+ webkitAnimationName: string | null;
+ webkitAnimationPlayState: string | null;
+ webkitAnimationTimingFunction: string | null;
+ webkitAppearance: string | null;
+ webkitBackfaceVisibility: string | null;
+ webkitBackgroundClip: string | null;
+ webkitBackgroundOrigin: string | null;
+ webkitBackgroundSize: string | null;
+ webkitBorderBottomLeftRadius: string | null;
+ webkitBorderBottomRightRadius: string | null;
+ webkitBorderImage: string | null;
+ webkitBorderRadius: string | null;
+ webkitBorderTopLeftRadius: string | null;
+ webkitBorderTopRightRadius: string | null;
+ webkitBoxAlign: string | null;
+ webkitBoxDirection: string | null;
+ webkitBoxFlex: string | null;
+ webkitBoxOrdinalGroup: string | null;
+ webkitBoxOrient: string | null;
+ webkitBoxPack: string | null;
+ webkitBoxSizing: string | null;
+ webkitColumnBreakAfter: string | null;
+ webkitColumnBreakBefore: string | null;
+ webkitColumnBreakInside: string | null;
+ webkitColumnCount: any;
+ webkitColumnGap: any;
+ webkitColumnRule: string | null;
+ webkitColumnRuleColor: any;
+ webkitColumnRuleStyle: string | null;
+ webkitColumnRuleWidth: any;
+ webkitColumnSpan: string | null;
+ webkitColumnWidth: any;
+ webkitColumns: string | null;
+ webkitFilter: string | null;
+ webkitFlex: string | null;
+ webkitFlexBasis: string | null;
+ webkitFlexDirection: string | null;
+ webkitFlexFlow: string | null;
+ webkitFlexGrow: string | null;
+ webkitFlexShrink: string | null;
+ webkitFlexWrap: string | null;
+ webkitJustifyContent: string | null;
+ webkitOrder: string | null;
+ webkitPerspective: string | null;
+ webkitPerspectiveOrigin: string | null;
+ webkitTapHighlightColor: string | null;
+ webkitTextFillColor: string | null;
+ webkitTextSizeAdjust: any;
+ webkitTextStroke: string | null;
+ webkitTextStrokeColor: string | null;
+ webkitTextStrokeWidth: string | null;
+ webkitTransform: string | null;
+ webkitTransformOrigin: string | null;
+ webkitTransformStyle: string | null;
+ webkitTransition: string | null;
+ webkitTransitionDelay: string | null;
+ webkitTransitionDuration: string | null;
+ webkitTransitionProperty: string | null;
+ webkitTransitionTimingFunction: string | null;
+ webkitUserModify: string | null;
+ webkitUserSelect: string | null;
+ webkitWritingMode: string | null;
+ whiteSpace: string | null;
+ widows: string | null;
+ width: string | null;
+ wordBreak: string | null;
+ wordSpacing: string | null;
+ wordWrap: string | null;
+ writingMode: string | null;
+ zIndex: string | null;
+ zoom: string | null;
+ resize: string | null;
+ userSelect: string | null;
+ getPropertyPriority(propertyName: string): string;
+ getPropertyValue(propertyName: string): string;
+ item(index: number): string;
+ removeProperty(propertyName: string): string;
+ setProperty(propertyName: string, value: string | null, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+}
+
+interface CSSStyleRule extends CSSRule {
+ readonly readOnly: boolean;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+}
+
+interface CSSStyleSheet extends StyleSheet {
+ readonly cssRules: CSSRuleList;
+ cssText: string;
+ readonly id: string;
+ readonly imports: StyleSheetList;
+ readonly isAlternate: boolean;
+ readonly isPrefAlternate: boolean;
+ readonly ownerRule: CSSRule;
+ readonly owningElement: Element;
+ readonly pages: StyleSheetPageList;
+ readonly readOnly: boolean;
+ readonly rules: CSSRuleList;
+ addImport(bstrURL: string, lIndex?: number): number;
+ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
+ addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
+ deleteRule(index?: number): void;
+ insertRule(rule: string, index?: number): number;
+ removeImport(lIndex: number): void;
+ removeRule(lIndex: number): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(): CSSStyleSheet;
+}
+
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+}
+
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+}
+
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+}
+
+interface CanvasGradient {
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+}
+
+interface CanvasPattern {
+ setTransform(matrix: SVGMatrix): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+}
+
+interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
+ readonly canvas: HTMLCanvasElement;
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ font: string;
+ globalAlpha: number;
+ globalCompositeOperation: string;
+ imageSmoothingEnabled: boolean;
+ lineCap: string;
+ lineDashOffset: number;
+ lineJoin: string;
+ lineWidth: number;
+ miterLimit: number;
+ msFillRule: CanvasFillRule;
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ textAlign: string;
+ textBaseline: string;
+ mozImageSmoothingEnabled: boolean;
+ webkitImageSmoothingEnabled: boolean;
+ oImageSmoothingEnabled: boolean;
+ beginPath(): void;
+ clearRect(x: number, y: number, w: number, h: number): void;
+ clip(fillRule?: CanvasFillRule): void;
+ createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+ drawFocusIfNeeded(element: Element): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ getLineDash(): number[];
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ measureText(text: string): TextMetrics;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
+ restore(): void;
+ rotate(angle: number): void;
+ save(): void;
+ scale(x: number, y: number): void;
+ setLineDash(segments: number[]): void;
+ setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ stroke(path?: Path2D): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+ transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ translate(x: number, y: number): void;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+}
+
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(): ChannelMergerNode;
+}
+
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(): ChannelSplitterNode;
+}
+
+interface CharacterData extends Node, ChildNode {
+ data: string;
+ readonly length: number;
+ appendData(arg: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, arg: string): void;
+ replaceData(offset: number, count: number, arg: string): void;
+ substringData(offset: number, count: number): string;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+}
+
+interface ClientRect {
+ bottom: number;
+ readonly height: number;
+ left: number;
+ right: number;
+ top: number;
+ readonly width: number;
+}
+
+declare var ClientRect: {
+ prototype: ClientRect;
+ new(): ClientRect;
+}
+
+interface ClientRectList {
+ readonly length: number;
+ item(index: number): ClientRect;
+ [index: number]: ClientRect;
+}
+
+declare var ClientRectList: {
+ prototype: ClientRectList;
+ new(): ClientRectList;
+}
+
+interface ClipboardEvent extends Event {
+ readonly clipboardData: DataTransfer;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+}
+
+interface CloseEvent extends Event {
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
+}
+
+interface Comment extends CharacterData {
+ text: string;
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(): Comment;
+}
+
+interface CompositionEvent extends UIEvent {
+ readonly data: string;
+ readonly locale: string;
+ initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+}
+
+interface Console {
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
+ clear(): void;
+ count(countTitle?: string): void;
+ debug(message?: any, ...optionalParams: any[]): void;
+ dir(value?: any, ...optionalParams: any[]): void;
+ dirxml(value: any): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(groupTitle?: string): void;
+ groupCollapsed(groupTitle?: string): void;
+ groupEnd(): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ msIsIndependentlyComposed(element: Element): boolean;
+ profile(reportName?: string): void;
+ profileEnd(): void;
+ select(element: Element): void;
+ table(...data: any[]): void;
+ time(timerName?: string): void;
+ timeEnd(timerName?: string): void;
+ trace(message?: any, ...optionalParams: any[]): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var Console: {
+ prototype: Console;
+ new(): Console;
+}
+
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(): ConvolverNode;
+}
+
+interface Coordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+declare var Coordinates: {
+ prototype: Coordinates;
+ new(): Coordinates;
+}
+
+interface Crypto extends Object, RandomSource {
+ readonly subtle: SubtleCrypto;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+}
+
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: string;
+ readonly usages: string[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+declare var CryptoKeyPair: {
+ prototype: CryptoKeyPair;
+ new(): CryptoKeyPair;
+}
+
+interface CustomEvent extends Event {
+ readonly detail: any;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
+}
+
+interface DOMError {
+ readonly name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+}
+
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ toString(): string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+interface DOMImplementation {
+ createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title: string): Document;
+ hasFeature(feature: string | null, version: string | null): boolean;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+}
+
+interface DOMParser {
+ parseFromString(source: string, mimeType: string): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+}
+
+interface DOMSettableTokenList extends DOMTokenList {
+ value: string;
+}
+
+declare var DOMSettableTokenList: {
+ prototype: DOMSettableTokenList;
+ new(): DOMSettableTokenList;
+}
+
+interface DOMStringList {
+ readonly length: number;
+ contains(str: string): boolean;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+}
+
+interface DOMStringMap {
+ [name: string]: string | undefined;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+}
+
+interface DOMTokenList {
+ readonly length: number;
+ add(...token: string[]): void;
+ contains(token: string): boolean;
+ item(index: number): string;
+ remove(...token: string[]): void;
+ toString(): string;
+ toggle(token: string, force?: boolean): boolean;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+}
+
+interface DataCue extends TextTrackCue {
+ data: ArrayBuffer;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DataCue: {
+ prototype: DataCue;
+ new(): DataCue;
+}
+
+interface DataTransfer {
+ dropEffect: string;
+ effectAllowed: string;
+ readonly files: FileList;
+ readonly items: DataTransferItemList;
+ readonly types: string[];
+ clearData(format?: string): boolean;
+ getData(format: string): string;
+ setData(format: string, data: string): boolean;
+ setDragImage(image: Element, x: number, y: number): void;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+}
+
+interface DataTransferItem {
+ readonly kind: string;
+ readonly type: string;
+ getAsFile(): File | null;
+ getAsString(_callback: FunctionStringCallback | null): void;
+ webkitGetAsEntry(): any;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+}
+
+interface DataTransferItemList {
+ readonly length: number;
+ add(data: File): DataTransferItem | null;
+ clear(): void;
+ item(index: number): DataTransferItem;
+ remove(index: number): void;
+ [index: number]: DataTransferItem;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+}
+
+interface DeferredPermissionRequest {
+ readonly id: number;
+ readonly type: MSWebViewPermissionType;
+ readonly uri: string;
+ allow(): void;
+ deny(): void;
+}
+
+declare var DeferredPermissionRequest: {
+ prototype: DeferredPermissionRequest;
+ new(): DeferredPermissionRequest;
+}
+
+interface DelayNode extends AudioNode {
+ readonly delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(): DelayNode;
+}
+
+interface DeviceAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+declare var DeviceAcceleration: {
+ prototype: DeviceAcceleration;
+ new(): DeviceAcceleration;
+}
+
+interface DeviceLightEvent extends Event {
+ readonly value: number;
+}
+
+declare var DeviceLightEvent: {
+ prototype: DeviceLightEvent;
+ new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
+}
+
+interface DeviceMotionEvent extends Event {
+ readonly acceleration: DeviceAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceAcceleration | null;
+ readonly interval: number | null;
+ readonly rotationRate: DeviceRotationRate | null;
+ initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
+}
+
+interface DeviceOrientationEvent extends Event {
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+ initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
+}
+
+interface DeviceRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceRotationRate: {
+ prototype: DeviceRotationRate;
+ new(): DeviceRotationRate;
+}
+
+interface DocumentEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforedeactivate": UIEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "mssitemodejumplistitemremoved": MSSiteModeEvent;
+ "msthumbnailclick": MSSiteModeEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "pointerlockchange": Event;
+ "pointerlockerror": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectionchange": Event;
+ "selectstart": Event;
+ "stalled": Event;
+ "stop": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "volumechange": Event;
+ "waiting": Event;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
+ /**
+ * Sets or gets the URL for the current document.
+ */
+ readonly URL: string;
+ /**
+ * Gets the URL for the document, stripped of any character encoding.
+ */
+ readonly URLUnencoded: string;
+ /**
+ * Gets the object that has the focus when the parent document has focus.
+ */
+ readonly activeElement: Element;
+ /**
+ * Sets or gets the color of all active links in the document.
+ */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ */
+ readonly all: HTMLAllCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ */
+ anchors: HTMLCollectionOf<HTMLAnchorElement>;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ */
+ applets: HTMLCollectionOf<HTMLAppletElement>;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ */
+ bgColor: string;
+ /**
+ * Specifies the beginning and end of the document body.
+ */
+ body: HTMLElement;
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets a value that indicates whether standards-compliant mode is switched on for the object.
+ */
+ readonly compatMode: string;
+ cookie: string;
+ readonly currentScript: HTMLScriptElement | SVGScriptElement;
+ readonly defaultView: Window;
+ /**
+ * Sets or gets a value that indicates whether the document can be edited.
+ */
+ designMode: string;
+ /**
+ * Sets or retrieves a value that indicates the reading order of the object.
+ */
+ dir: string;
+ /**
+ * Gets an object representing the document type declaration associated with the current document.
+ */
+ readonly doctype: DocumentType;
+ /**
+ * Gets a reference to the root node of the document.
+ */
+ documentElement: HTMLElement;
+ /**
+ * Sets or gets the security domain of the document.
+ */
+ domain: string;
+ /**
+ * Retrieves a collection of all embed objects in the document.
+ */
+ embeds: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ */
+ fgColor: string;
+ /**
+ * Retrieves a collection, in source order, of all form objects in the document.
+ */
+ forms: HTMLCollectionOf<HTMLFormElement>;
+ readonly fullscreenElement: Element | null;
+ readonly fullscreenEnabled: boolean;
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
+ /**
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
+ images: HTMLCollectionOf<HTMLImageElement>;
+ /**
+ * Gets the implementation object of the current document.
+ */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ */
+ readonly inputEncoding: string | null;
+ /**
+ * Gets the date that the page was last modified, if the page supplies one.
+ */
+ readonly lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ */
+ linkColor: string;
+ /**
+ * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
+ */
+ links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
+ /**
+ * Contains information about the current URL.
+ */
+ readonly location: Location;
+ msCSSOMElementFloatMetrics: boolean;
+ msCapsLockWarningOff: boolean;
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object is set as the active element.
+ * @param ev The event.
+ */
+ onactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the object is set as the active element.
+ * @param ev The event.
+ */
+ onbeforeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The event.
+ */
+ onbeforedeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: (this: Document, ev: FocusEvent) => any;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: (this: Document, ev: Event) => any;
+ oncanplaythrough: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: (this: Document, ev: PointerEvent) => any;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The UI Event
+ */
+ ondeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: (this: Document, ev: DragEvent) => any;
+ ondrop: (this: Document, ev: DragEvent) => any;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: (this: Document, ev: MediaStreamErrorEvent) => any;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: (this: Document, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: (this: Document, ev: FocusEvent) => any;
+ onfullscreenchange: (this: Document, ev: Event) => any;
+ onfullscreenerror: (this: Document, ev: Event) => any;
+ oninput: (this: Document, ev: Event) => any;
+ oninvalid: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+ onkeypress: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the wheel button is rotated.
+ * @param ev The mouse event
+ */
+ onmousewheel: (this: Document, ev: WheelEvent) => any;
+ onmscontentzoom: (this: Document, ev: UIEvent) => any;
+ onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
+ onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
+ onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Document, ev: MSPointerEvent) => any;
+ /**
+ * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: (this: Document, ev: Event) => any;
+ onpointerlockchange: (this: Document, ev: Event) => any;
+ onpointerlockerror: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: (this: Document, ev: ProgressEvent) => any;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: (this: Document, ev: UIEvent) => any;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the selection state of a document changes.
+ * @param ev The event.
+ */
+ onselectionchange: (this: Document, ev: Event) => any;
+ onselectstart: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the Stop button or leaves the Web page.
+ * @param ev The event.
+ */
+ onstop: (this: Document, ev: Event) => any;
+ onsubmit: (this: Document, ev: Event) => any;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: (this: Document, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: (this: Document, ev: Event) => any;
+ onwebkitfullscreenchange: (this: Document, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Document, ev: Event) => any;
+ plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ readonly pointerLockElement: Element;
+ /**
+ * Retrieves a value that indicates the current state of the object.
+ */
+ readonly readyState: string;
+ /**
+ * Gets the URL of the location that referred the user to the current page.
+ */
+ readonly referrer: string;
+ /**
+ * Gets the root svg element in the document hierarchy.
+ */
+ readonly rootElement: SVGSVGElement;
+ /**
+ * Retrieves a collection of all script objects in the document.
+ */
+ scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
+ /**
+ * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
+ */
+ readonly styleSheets: StyleSheetList;
+ /**
+ * Contains the title of the document.
+ */
+ title: string;
+ readonly visibilityState: VisibilityState;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
+ vlinkColor: string;
+ readonly webkitCurrentFullScreenElement: Element | null;
+ readonly webkitFullscreenElement: Element | null;
+ readonly webkitFullscreenEnabled: boolean;
+ readonly webkitIsFullScreen: boolean;
+ readonly xmlEncoding: string | null;
+ xmlStandalone: boolean;
+ /**
+ * Gets or sets the version attribute specified in the declaration of an XML document.
+ */
+ xmlVersion: string | null;
+ adoptNode<T extends Node>(source: T): T;
+ captureEvents(): void;
+ caretRangeFromPoint(x: number, y: number): Range;
+ clear(): void;
+ /**
+ * Closes an output stream and forces the sent data to display.
+ */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(name: string): Attr;
+ createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /**
+ * Creates a new document.
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
+ createElement(tagName: string): HTMLElement;
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
+ createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
+ */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
+ createTouchList(...touches: Touch[]): TouchList;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
+ /**
+ * Displays help information for the given command identifier.
+ * @param commandId Displays help information for the given command identifier.
+ */
+ execCommandShowHelp(commandId: string): boolean;
+ exitFullscreen(): void;
+ exitPointerLock(): void;
+ /**
+ * Causes the element to receive the focus and executes the code specified by the onfocus event.
+ */
+ focus(): void;
+ /**
+ * Returns a reference to the first object with the specified value of the ID or NAME attribute.
+ * @param elementId String that specifies the ID value. Case-insensitive.
+ */
+ getElementById(elementId: string): HTMLElement | null;
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
+ getElementsByTagName(tagname: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ /**
+ * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
+ */
+ getSelection(): Selection;
+ /**
+ * Gets a value indicating whether the object currently has focus.
+ */
+ hasFocus(): boolean;
+ importNode<T extends Node>(importedNode: T, deep: boolean): T;
+ msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
+ msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(url?: string, name?: string, features?: string, replace?: boolean): Document;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Retrieves the string associated with a command.
+ * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
+ */
+ queryCommandText(commandId: string): string;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ releaseEvents(): void;
+ /**
+ * Allows updating the print settings for the page.
+ */
+ updateSettings(): void;
+ webkitCancelFullScreen(): void;
+ webkitExitFullscreen(): void;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...content: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...content: string[]): void;
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+}
+
+interface DocumentFragment extends Node, NodeSelector, ParentNode {
+ getElementById(elementId: string): HTMLElement | null;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+}
+
+interface DocumentType extends Node, ChildNode {
+ readonly entities: NamedNodeMap;
+ readonly internalSubset: string | null;
+ readonly name: string;
+ readonly notations: NamedNodeMap;
+ readonly publicId: string;
+ readonly systemId: string;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+}
+
+interface DragEvent extends MouseEvent {
+ readonly dataTransfer: DataTransfer;
+ initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
+ msConvertURL(file: File, targetType: string, targetURL?: string): void;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(): DragEvent;
+}
+
+interface DynamicsCompressorNode extends AudioNode {
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: number;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(): DynamicsCompressorNode;
+}
+
+interface EXT_frag_depth {
+}
+
+declare var EXT_frag_depth: {
+ prototype: EXT_frag_depth;
+ new(): EXT_frag_depth;
+}
+
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+declare var EXT_texture_filter_anisotropic: {
+ prototype: EXT_texture_filter_anisotropic;
+ new(): EXT_texture_filter_anisotropic;
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+interface ElementEventMap extends GlobalEventHandlersEventMap {
+ "ariarequest": Event;
+ "command": Event;
+ "gotpointercapture": PointerEvent;
+ "lostpointercapture": PointerEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSGotPointerCapture": MSPointerEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSLostPointerCapture": MSPointerEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
+ readonly classList: DOMTokenList;
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ id: string;
+ innerHTML: string;
+ msContentZoomFactor: number;
+ readonly msRegionOverflow: string;
+ onariarequest: (this: Element, ev: Event) => any;
+ oncommand: (this: Element, ev: Event) => any;
+ ongotpointercapture: (this: Element, ev: PointerEvent) => any;
+ onlostpointercapture: (this: Element, ev: PointerEvent) => any;
+ onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
+ onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Element, ev: MSPointerEvent) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onwebkitfullscreenchange: (this: Element, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Element, ev: Event) => any;
+ outerHTML: string;
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ readonly scrollWidth: number;
+ readonly tagName: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ slot: string;
+ readonly shadowRoot: ShadowRoot | null;
+ getAttribute(name: string): string | null;
+ getAttributeNS(namespaceURI: string, localName: string): string;
+ getAttributeNode(name: string): Attr;
+ getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
+ getElementsByTagName(name: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ hasAttribute(name: string): boolean;
+ hasAttributeNS(namespaceURI: string, localName: string): boolean;
+ msGetRegionContent(): MSRangeCollection;
+ msGetUntransformedBounds(): ClientRect;
+ msMatchesSelector(selectors: string): boolean;
+ msReleasePointerCapture(pointerId: number): void;
+ msSetPointerCapture(pointerId: number): void;
+ msZoomTo(args: MsZoomToOptions): void;
+ releasePointerCapture(pointerId: number): void;
+ removeAttribute(qualifiedName: string): void;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
+ removeAttributeNode(oldAttr: Attr): Attr;
+ requestFullscreen(): void;
+ requestPointerLock(): void;
+ setAttribute(name: string, value: string): void;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
+ setAttributeNode(newAttr: Attr): Attr;
+ setAttributeNodeNS(newAttr: Attr): Attr;
+ setPointerCapture(pointerId: number): void;
+ webkitMatchesSelector(selectors: string): boolean;
+ webkitRequestFullScreen(): void;
+ webkitRequestFullscreen(): void;
+ getElementsByClassName(classNames: string): NodeListOf<Element>;
+ matches(selector: string): boolean;
+ closest(selector: string): Element | null;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ insertAdjacentElement(position: string, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: string, html: string): void;
+ insertAdjacentText(where: string, text: string): void;
+ attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
+ addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+}
+
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
+}
+
+interface Event {
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ readonly cancelable: boolean;
+ readonly currentTarget: EventTarget;
+ readonly defaultPrevented: boolean;
+ readonly eventPhase: number;
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ readonly srcElement: Element | null;
+ readonly target: EventTarget;
+ readonly timeStamp: number;
+ readonly type: string;
+ readonly scoped: boolean;
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
+ preventDefault(): void;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ deepPath(): EventTarget[];
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(typeArg: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+interface EventTarget {
+ addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ dispatchEvent(evt: Event): boolean;
+ removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+}
+
+interface ExtensionScriptApis {
+ extensionIdToShortId(extensionId: string): number;
+ fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
+ genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void;
+ genericSynchronousFunction(functionId: number, parameters?: string): string;
+ getExtensionId(): string;
+ registerGenericFunctionCallbackHandler(callbackHandler: any): void;
+ registerGenericPersistentCallbackHandler(callbackHandler: any): void;
+}
+
+declare var ExtensionScriptApis: {
+ prototype: ExtensionScriptApis;
+ new(): ExtensionScriptApis;
+}
+
+interface External {
+}
+
+declare var External: {
+ prototype: External;
+ new(): External;
+}
+
+interface File extends Blob {
+ readonly lastModifiedDate: any;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
+}
+
+interface FileList {
+ readonly length: number;
+ item(index: number): File;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+}
+
+interface FileReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+}
+
+interface FocusEvent extends UIEvent {
+ readonly relatedTarget: EventTarget;
+ initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
+}
+
+interface FocusNavigationEvent extends Event {
+ readonly navigationReason: NavigationReason;
+ readonly originHeight: number;
+ readonly originLeft: number;
+ readonly originTop: number;
+ readonly originWidth: number;
+ requestFocus(): void;
+}
+
+declare var FocusNavigationEvent: {
+ prototype: FocusNavigationEvent;
+ new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
+}
+
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new (form?: HTMLFormElement): FormData;
+}
+
+interface GainNode extends AudioNode {
+ readonly gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(): GainNode;
+}
+
+interface Gamepad {
+ readonly axes: number[];
+ readonly buttons: GamepadButton[];
+ readonly connected: boolean;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: string;
+ readonly timestamp: number;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+}
+
+interface GamepadButton {
+ readonly pressed: boolean;
+ readonly value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+}
+
+interface GamepadEvent extends Event {
+ readonly gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
+}
+
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
+}
+
+declare var Geolocation: {
+ prototype: Geolocation;
+ new(): Geolocation;
+}
+
+interface HTMLAllCollection {
+ readonly length: number;
+ item(nameOrIndex?: string): HTMLCollection | Element | null;
+ namedItem(name: string): HTMLCollection | Element | null;
+ [index: number]: Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+}
+
+interface HTMLAnchorElement extends HTMLElement {
+ Methods: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
+ hash: string;
+ /**
+ * Contains the hostname and port values of the URL.
+ */
+ host: string;
+ /**
+ * Contains the hostname of a URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ readonly mimeType: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ readonly nameProp: string;
+ /**
+ * Contains the pathname of the URL.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Contains the protocol of the URL.
+ */
+ protocol: string;
+ readonly protocolLong: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ type: string;
+ urn: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+}
+
+interface HTMLAppletElement extends HTMLElement {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
+ */
+ declare: boolean;
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ object: string | null;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ vspace: number;
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAppletElement: {
+ prototype: HTMLAppletElement;
+ new(): HTMLAppletElement;
+}
+
+interface HTMLAreaElement extends HTMLElement {
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Sets or retrieves the subsection of the href property that follows the number sign (#).
+ */
+ hash: string;
+ /**
+ * Sets or retrieves the hostname and port number of the location or URL.
+ */
+ host: string;
+ /**
+ * Sets or retrieves the host name part of the location or URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ */
+ noHref: boolean;
+ /**
+ * Sets or retrieves the file name or path specified by the object.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Sets or retrieves the protocol portion of a URL.
+ */
+ protocol: string;
+ rel: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+}
+
+interface HTMLAreasCollection extends HTMLCollectionBase {
+}
+
+declare var HTMLAreasCollection: {
+ prototype: HTMLAreasCollection;
+ new(): HTMLAreasCollection;
+}
+
+interface HTMLAudioElement extends HTMLMediaElement {
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+}
+
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ */
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+}
+
+interface HTMLBaseElement extends HTMLElement {
+ /**
+ * Gets or sets the baseline URL on which relative links are based.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+}
+
+interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ /**
+ * Sets or retrieves the font size of the object.
+ */
+ size: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseFontElement: {
+ prototype: HTMLBaseFontElement;
+ new(): HTMLBaseFontElement;
+}
+
+interface HTMLBodyElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLBodyElement extends HTMLElement {
+ aLink: any;
+ background: string;
+ bgColor: any;
+ bgProperties: string;
+ link: any;
+ noWrap: boolean;
+ onafterprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
+ onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLBodyElement, ev: Event) => any;
+ onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLBodyElement, ev: Event) => any;
+ ononline: (this: HTMLBodyElement, ev: Event) => any;
+ onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
+ onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLBodyElement, ev: Event) => any;
+ text: any;
+ vLink: any;
+ addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+}
+
+interface HTMLButtonElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ status: any;
+ /**
+ * Gets the classification and default behavior of the button.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the default or selected value of the control.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+}
+
+interface HTMLCanvasElement extends HTMLElement {
+ /**
+ * Gets or sets the height of a canvas element on a document.
+ */
+ height: number;
+ /**
+ * Gets or sets the width of a canvas element on a document.
+ */
+ width: number;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
+ getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
+ /**
+ * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
+ */
+ msToBlob(): Blob;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, ...args: any[]): string;
+ toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+}
+
+interface HTMLCollectionBase {
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Retrieves an object from various collections.
+ */
+ item(index: number): Element;
+ [index: number]: Element;
+}
+
+interface HTMLCollection extends HTMLCollectionBase {
+ /**
+ * Retrieves a select object or an object from an options collection.
+ */
+ namedItem(name: string): Element | null;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+}
+
+interface HTMLDListElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+}
+
+interface HTMLDataElement extends HTMLElement {
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataElement: {
+ prototype: HTMLDataElement;
+ new(): HTMLDataElement;
+}
+
+interface HTMLDataListElement extends HTMLElement {
+ options: HTMLCollectionOf<HTMLOptionElement>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+}
+
+interface HTMLDirectoryElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+}
+
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+}
+
+interface HTMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+}
+
+interface HTMLElementEventMap extends ElementEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforecopy": ClipboardEvent;
+ "beforecut": ClipboardEvent;
+ "beforedeactivate": UIEvent;
+ "beforepaste": ClipboardEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "copy": ClipboardEvent;
+ "cuechange": Event;
+ "cut": ClipboardEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "paste": ClipboardEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectstart": Event;
+ "stalled": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface HTMLElement extends Element {
+ accessKey: string;
+ readonly children: HTMLCollection;
+ contentEditable: string;
+ readonly dataset: DOMStringMap;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ hideFocus: boolean;
+ innerText: string;
+ readonly isContentEditable: boolean;
+ lang: string;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ onabort: (this: HTMLElement, ev: UIEvent) => any;
+ onactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onblur: (this: HTMLElement, ev: FocusEvent) => any;
+ oncanplay: (this: HTMLElement, ev: Event) => any;
+ oncanplaythrough: (this: HTMLElement, ev: Event) => any;
+ onchange: (this: HTMLElement, ev: Event) => any;
+ onclick: (this: HTMLElement, ev: MouseEvent) => any;
+ oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
+ oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ oncuechange: (this: HTMLElement, ev: Event) => any;
+ oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
+ ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ ondrag: (this: HTMLElement, ev: DragEvent) => any;
+ ondragend: (this: HTMLElement, ev: DragEvent) => any;
+ ondragenter: (this: HTMLElement, ev: DragEvent) => any;
+ ondragleave: (this: HTMLElement, ev: DragEvent) => any;
+ ondragover: (this: HTMLElement, ev: DragEvent) => any;
+ ondragstart: (this: HTMLElement, ev: DragEvent) => any;
+ ondrop: (this: HTMLElement, ev: DragEvent) => any;
+ ondurationchange: (this: HTMLElement, ev: Event) => any;
+ onemptied: (this: HTMLElement, ev: Event) => any;
+ onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
+ onerror: (this: HTMLElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLElement, ev: FocusEvent) => any;
+ oninput: (this: HTMLElement, ev: Event) => any;
+ oninvalid: (this: HTMLElement, ev: Event) => any;
+ onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onload: (this: HTMLElement, ev: Event) => any;
+ onloadeddata: (this: HTMLElement, ev: Event) => any;
+ onloadedmetadata: (this: HTMLElement, ev: Event) => any;
+ onloadstart: (this: HTMLElement, ev: Event) => any;
+ onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
+ onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
+ onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
+ onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onpause: (this: HTMLElement, ev: Event) => any;
+ onplay: (this: HTMLElement, ev: Event) => any;
+ onplaying: (this: HTMLElement, ev: Event) => any;
+ onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
+ onratechange: (this: HTMLElement, ev: Event) => any;
+ onreset: (this: HTMLElement, ev: Event) => any;
+ onscroll: (this: HTMLElement, ev: UIEvent) => any;
+ onseeked: (this: HTMLElement, ev: Event) => any;
+ onseeking: (this: HTMLElement, ev: Event) => any;
+ onselect: (this: HTMLElement, ev: UIEvent) => any;
+ onselectstart: (this: HTMLElement, ev: Event) => any;
+ onstalled: (this: HTMLElement, ev: Event) => any;
+ onsubmit: (this: HTMLElement, ev: Event) => any;
+ onsuspend: (this: HTMLElement, ev: Event) => any;
+ ontimeupdate: (this: HTMLElement, ev: Event) => any;
+ onvolumechange: (this: HTMLElement, ev: Event) => any;
+ onwaiting: (this: HTMLElement, ev: Event) => any;
+ outerText: string;
+ spellcheck: boolean;
+ readonly style: CSSStyleDeclaration;
+ tabIndex: number;
+ title: string;
+ blur(): void;
+ click(): void;
+ dragDrop(): boolean;
+ focus(): void;
+ msGetInputContext(): MSInputMethodContext;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+}
+
+interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hidden: any;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Retrieves the palette used for the embedded document.
+ */
+ readonly palette: string;
+ /**
+ * Retrieves the URL of the plug-in used to view an embedded document.
+ */
+ readonly pluginspage: string;
+ readonly readyState: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the height and width units of the embed object.
+ */
+ units: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+}
+
+interface HTMLFieldSetElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ name: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+}
+
+interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+}
+
+interface HTMLFormControlsCollection extends HTMLCollectionBase {
+ namedItem(name: string): HTMLCollection | Element | null;
+}
+
+declare var HTMLFormControlsCollection: {
+ prototype: HTMLFormControlsCollection;
+ new(): HTMLFormControlsCollection;
+}
+
+interface HTMLFormElement extends HTMLElement {
+ /**
+ * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
+ */
+ acceptCharset: string;
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Retrieves a collection, in source order, of all controls in a given form.
+ */
+ readonly elements: HTMLFormControlsCollection;
+ /**
+ * Sets or retrieves the MIME encoding for the form.
+ */
+ encoding: string;
+ /**
+ * Sets or retrieves the encoding type for the form.
+ */
+ enctype: string;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Sets or retrieves how to send the form data to the server.
+ */
+ method: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Designates a form that is not validated when submitted.
+ */
+ noValidate: boolean;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ */
+ namedItem(name: string): any;
+ /**
+ * Fires when the user resets a form.
+ */
+ reset(): void;
+ /**
+ * Fires when a FORM is about to be submitted.
+ */
+ submit(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+}
+
+interface HTMLFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string | number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLFrameElement, ev: Event) => any;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string | number;
+ addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+}
+
+interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLFrameSetElement extends HTMLElement {
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Sets or retrieves the frame widths of the object.
+ */
+ cols: string;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ name: string;
+ onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ */
+ onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ */
+ onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLFrameSetElement, ev: Event) => any;
+ onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
+ ononline: (this: HTMLFrameSetElement, ev: Event) => any;
+ onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
+ onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLFrameSetElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLFrameSetElement, ev: Event) => any;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ */
+ rows: string;
+ addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+}
+
+interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ */
+ noShade: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+}
+
+interface HTMLHeadElement extends HTMLElement {
+ profile: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+}
+
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+}
+
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ */
+ version: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+}
+
+interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ allowFullscreen: boolean;
+ allowPaymentRequest: boolean;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the horizontal margin for the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLIFrameElement, ev: Event) => any;
+ readonly sandbox: DOMSettableTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+}
+
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ crossOrigin: string | null;
+ readonly currentSrc: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves whether the image is a server-side image map.
+ */
+ isMap: boolean;
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ */
+ longDesc: string;
+ lowsrc: string;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * The original height of the image resource before sizing.
+ */
+ readonly naturalHeight: number;
+ /**
+ * The original width of the image resource before sizing.
+ */
+ readonly naturalWidth: number;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ readonly x: number;
+ readonly y: number;
+ msGetAsCastingSource(): any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+}
+
+interface HTMLInputElement extends HTMLElement {
+ /**
+ * Sets or retrieves a comma-separated list of content types.
+ */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ checked: boolean;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ defaultChecked: boolean;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Returns a FileList object on a file type input object.
+ */
+ readonly files: FileList | null;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ indeterminate: boolean;
+ /**
+ * Specifies the ID of a pre-defined datalist of options for an input element.
+ */
+ readonly list: HTMLElement;
+ /**
+ * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ */
+ max: string;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
+ */
+ min: string;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a string containing a regular expression that the user's input must match.
+ */
+ pattern: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ selectionDirection: string;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ size: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ status: boolean;
+ /**
+ * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
+ */
+ step: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns the value of the data at the cursor's current position.
+ */
+ value: string;
+ valueAsDate: Date;
+ /**
+ * Returns the input field value as a number.
+ */
+ valueAsNumber: number;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ webkitdirectory: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Makes the selection equal to the current object.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start?: number, end?: number, direction?: string): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+}
+
+interface HTMLLIElement extends HTMLElement {
+ type: string;
+ /**
+ * Sets or retrieves the value of a list item.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+}
+
+interface HTMLLabelElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the object to which the given label object is assigned.
+ */
+ htmlFor: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+}
+
+interface HTMLLegendElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ align: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+}
+
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ disabled: boolean;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ import?: Document;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+}
+
+interface HTMLMapElement extends HTMLElement {
+ /**
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
+ readonly areas: HTMLAreasCollection;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+}
+
+interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
+ "bounce": Event;
+ "finish": Event;
+ "start": Event;
+}
+
+interface HTMLMarqueeElement extends HTMLElement {
+ behavior: string;
+ bgColor: any;
+ direction: string;
+ height: string;
+ hspace: number;
+ loop: number;
+ onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
+ onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
+ onstart: (this: HTMLMarqueeElement, ev: Event) => any;
+ scrollAmount: number;
+ scrollDelay: number;
+ trueSpeed: boolean;
+ vspace: number;
+ width: string;
+ start(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+}
+
+interface HTMLMediaElementEventMap extends HTMLElementEventMap {
+ "encrypted": MediaEncryptedEvent;
+ "msneedkey": MSMediaKeyNeededEvent;
+}
+
+interface HTMLMediaElement extends HTMLElement {
+ /**
+ * Returns an AudioTrackList object with the audio tracks for a given video element.
+ */
+ readonly audioTracks: AudioTrackList;
+ /**
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
+ autoplay: boolean;
+ /**
+ * Gets a collection of buffered time ranges.
+ */
+ readonly buffered: TimeRanges;
+ /**
+ * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
+ */
+ controls: boolean;
+ crossOrigin: string | null;
+ /**
+ * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
+ */
+ readonly currentSrc: string;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ currentTime: number;
+ defaultMuted: boolean;
+ /**
+ * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
+ */
+ defaultPlaybackRate: number;
+ /**
+ * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
+ */
+ readonly duration: number;
+ /**
+ * Gets information about whether the playback has ended or not.
+ */
+ readonly ended: boolean;
+ /**
+ * Returns an object representing the current error state of the audio or video element.
+ */
+ readonly error: MediaError;
+ /**
+ * Gets or sets a flag to specify whether playback should restart after it completes.
+ */
+ loop: boolean;
+ readonly mediaKeys: MediaKeys | null;
+ /**
+ * Specifies the purpose of the audio or video media, such as background audio or alerts.
+ */
+ msAudioCategory: string;
+ /**
+ * Specifies the output device id that the audio will be sent to.
+ */
+ msAudioDeviceType: string;
+ readonly msGraphicsTrustStatus: MSGraphicsTrust;
+ /**
+ * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
+ */
+ readonly msKeys: MSMediaKeys;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Specifies whether or not to enable low-latency playback on the media element.
+ */
+ msRealTime: boolean;
+ /**
+ * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
+ */
+ muted: boolean;
+ /**
+ * Gets the current network activity for the element.
+ */
+ readonly networkState: number;
+ onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
+ onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
+ /**
+ * Gets a flag that specifies whether playback is paused.
+ */
+ readonly paused: boolean;
+ /**
+ * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
+ */
+ playbackRate: number;
+ /**
+ * Gets TimeRanges for the current media resource that has been played.
+ */
+ readonly played: TimeRanges;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ preload: string;
+ readyState: number;
+ /**
+ * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
+ */
+ readonly seekable: TimeRanges;
+ /**
+ * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
+ */
+ readonly seeking: boolean;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcObject: MediaStream | null;
+ readonly textTracks: TextTrackList;
+ readonly videoTracks: VideoTrackList;
+ /**
+ * Gets or sets the volume level for audio portions of the media element.
+ */
+ volume: number;
+ addTextTrack(kind: string, label?: string, language?: string): TextTrack;
+ /**
+ * Returns a string that specifies whether the client can play a given media resource type.
+ */
+ canPlayType(type: string): string;
+ /**
+ * Resets the audio or video object and loads a new media resource.
+ */
+ load(): void;
+ /**
+ * Clears all effects from the media pipeline.
+ */
+ msClearEffects(): void;
+ msGetAsCastingSource(): any;
+ /**
+ * Inserts the specified audio effect into media pipeline.
+ */
+ msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetMediaKeys(mediaKeys: MSMediaKeys): void;
+ /**
+ * Specifies the media protection manager for a given media pipeline.
+ */
+ msSetMediaProtectionManager(mediaProtectionManager?: any): void;
+ /**
+ * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
+ */
+ pause(): void;
+ /**
+ * Loads and starts playback of a media resource.
+ */
+ play(): void;
+ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+}
+
+interface HTMLMenuElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+}
+
+interface HTMLMetaElement extends HTMLElement {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets or sets meta-information to associate with httpEquiv or name.
+ */
+ content: string;
+ /**
+ * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
+ */
+ httpEquiv: string;
+ /**
+ * Sets or retrieves the value specified in the content attribute of the meta object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ */
+ scheme: string;
+ /**
+ * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
+ */
+ url: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+}
+
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+}
+
+interface HTMLModElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+}
+
+interface HTMLOListElement extends HTMLElement {
+ compact: boolean;
+ /**
+ * The starting number.
+ */
+ start: number;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+}
+
+interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ declare: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly readyState: number;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+}
+
+interface HTMLOptGroupElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ readonly text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+}
+
+interface HTMLOptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+}
+
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ length: number;
+ selectedIndex: number;
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+}
+
+interface HTMLOutputElement extends HTMLElement {
+ defaultValue: string;
+ readonly form: HTMLFormElement;
+ readonly htmlFor: DOMSettableTokenList;
+ name: string;
+ readonly type: string;
+ readonly validationMessage: string;
+ readonly validity: ValidityState;
+ value: string;
+ readonly willValidate: boolean;
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOutputElement: {
+ prototype: HTMLOutputElement;
+ new(): HTMLOutputElement;
+}
+
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+}
+
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ */
+ valueType: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+}
+
+interface HTMLPictureElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
+}
+
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+}
+
+interface HTMLProgressElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Defines the maximum, or "done" value for a progress element.
+ */
+ max: number;
+ /**
+ * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
+ */
+ readonly position: number;
+ /**
+ * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+}
+
+interface HTMLQuoteElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+}
+
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ crossOrigin: string | null;
+ /**
+ * Sets or retrieves the status of the script.
+ */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ */
+ htmlFor: string;
+ /**
+ * Retrieves the URL to an external file that contains the source code or data.
+ */
+ src: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the MIME type for the associated scripting engine.
+ */
+ type: string;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+}
+
+interface HTMLSelectElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly options: HTMLOptionsCollection;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the index of the selected option in a select object.
+ */
+ selectedIndex: number;
+ selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
+ /**
+ * Sets or retrieves the number of rows in the list box.
+ */
+ size: number;
+ /**
+ * Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLElement, before?: HTMLElement | number): void;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): any;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(index?: number): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+}
+
+interface HTMLSourceElement extends HTMLElement {
+ /**
+ * Gets or sets the intended media type of the media source.
+ */
+ media: string;
+ msKeySystem: string;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Gets or sets the MIME type of a media resource.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+}
+
+interface HTMLSpanElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+}
+
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ disabled: boolean;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+}
+
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the caption appears at the top or bottom of the table.
+ */
+ vAlign: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+}
+
+interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves abbreviated text for the object.
+ */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ */
+ axis: string;
+ bgColor: any;
+ /**
+ * Retrieves the position of the object in the cells collection of a row.
+ */
+ readonly cellIndex: number;
+ /**
+ * Sets or retrieves the number columns in the table that the object should span.
+ */
+ colSpan: number;
+ /**
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ /**
+ * Sets or retrieves how many rows in a table the cell should span.
+ */
+ rowSpan: number;
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+}
+
+interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of columns in the group.
+ */
+ span: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+}
+
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableDataCellElement: {
+ prototype: HTMLTableDataCellElement;
+ new(): HTMLTableDataCellElement;
+}
+
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the caption object of a table.
+ */
+ caption: HTMLTableCaptionElement;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the number of columns in the table.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
+ frame: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ */
+ summary: string;
+ /**
+ * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
+ */
+ tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
+ /**
+ * Retrieves the tFoot object of the table.
+ */
+ tFoot: HTMLTableSectionElement;
+ /**
+ * Retrieves the tHead object of the table.
+ */
+ tHead: HTMLTableSectionElement;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Creates an empty caption element in the table.
+ */
+ createCaption(): HTMLTableCaptionElement;
+ /**
+ * Creates an empty tBody element in the table.
+ */
+ createTBody(): HTMLTableSectionElement;
+ /**
+ * Creates an empty tFoot element in the table.
+ */
+ createTFoot(): HTMLTableSectionElement;
+ /**
+ * Returns the tHead element object if successful, or null otherwise.
+ */
+ createTHead(): HTMLTableSectionElement;
+ /**
+ * Deletes the caption element and its contents from the table.
+ */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Deletes the tFoot element and its contents from the table.
+ */
+ deleteTFoot(): void;
+ /**
+ * Deletes the tHead element and its contents from the table.
+ */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+}
+
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableHeaderCellElement: {
+ prototype: HTMLTableHeaderCellElement;
+ new(): HTMLTableHeaderCellElement;
+}
+
+interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Retrieves a collection of all cells in the table row.
+ */
+ cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Retrieves the position of the object in the rows collection for the table.
+ */
+ readonly rowIndex: number;
+ /**
+ * Retrieves the position of the object in the collection.
+ */
+ readonly sectionRowIndex: number;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index?: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableDataCellElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+}
+
+interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+}
+
+interface HTMLTemplateElement extends HTMLElement {
+ readonly content: DocumentFragment;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+}
+
+interface HTMLTextAreaElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ /**
+ * Sets or retrieves the value indicated whether the content of the object is read-only.
+ */
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: number;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ /**
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
+ status: any;
+ /**
+ * Retrieves the type of control.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Retrieves or sets the text in the entry field of the textArea element.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Sets or retrieves how to handle wordwrapping in the object.
+ */
+ wrap: string;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Highlights the input area of a form element.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start: number, end: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+}
+
+interface HTMLTimeElement extends HTMLElement {
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTimeElement: {
+ prototype: HTMLTimeElement;
+ new(): HTMLTimeElement;
+}
+
+interface HTMLTitleElement extends HTMLElement {
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+}
+
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readonly readyState: number;
+ src: string;
+ srclang: string;
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+}
+
+interface HTMLUListElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+}
+
+interface HTMLUnknownElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+}
+
+interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
+ "MSVideoFormatChanged": Event;
+ "MSVideoFrameStepCompleted": Event;
+ "MSVideoOptimalLayoutChanged": Event;
+}
+
+interface HTMLVideoElement extends HTMLMediaElement {
+ /**
+ * Gets or sets the height of the video element.
+ */
+ height: number;
+ msHorizontalMirror: boolean;
+ readonly msIsLayoutOptimalForPlayback: boolean;
+ readonly msIsStereo3D: boolean;
+ msStereo3DPackingMode: string;
+ msStereo3DRenderMode: string;
+ msZoom: boolean;
+ onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
+ /**
+ * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
+ */
+ poster: string;
+ /**
+ * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoHeight: number;
+ /**
+ * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoWidth: number;
+ readonly webkitDisplayingFullscreen: boolean;
+ readonly webkitSupportsFullscreen: boolean;
+ /**
+ * Gets or sets the width of the video element.
+ */
+ width: number;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ msFrameStep(forward: boolean): void;
+ msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
+ webkitEnterFullScreen(): void;
+ webkitEnterFullscreen(): void;
+ webkitExitFullScreen(): void;
+ webkitExitFullscreen(): void;
+ addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+}
+
+interface HashChangeEvent extends Event {
+ readonly newURL: string | null;
+ readonly oldURL: string | null;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(typeArg: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+}
+
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ forEach(callback: ForEachCallback): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: any): Headers;
+}
+
+interface History {
+ readonly length: number;
+ readonly state: any;
+ scrollRestoration: ScrollRestoration;
+ back(): void;
+ forward(): void;
+ go(delta?: number): void;
+ pushState(data: any, title: string, url?: string | null): void;
+ replaceState(data: any, title: string, url?: string | null): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+}
+
+interface IDBCursor {
+ readonly direction: IDBCursorDirection;
+ key: IDBKeyRange | IDBValidKey;
+ readonly primaryKey: any;
+ source: IDBObjectStore | IDBIndex;
+ advance(count: number): void;
+ continue(key?: IDBKeyRange | IDBValidKey): void;
+ delete(): IDBRequest;
+ update(value: any): IDBRequest;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+interface IDBCursorWithValue extends IDBCursor {
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+}
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "error": Event;
+}
+
+interface IDBDatabase extends EventTarget {
+ readonly name: string;
+ readonly objectStoreNames: DOMStringList;
+ onabort: (this: IDBDatabase, ev: Event) => any;
+ onerror: (this: IDBDatabase, ev: Event) => any;
+ version: number;
+ onversionchange: (ev: IDBVersionChangeEvent) => any;
+ close(): void;
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ deleteObjectStore(name: string): void;
+ transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+}
+
+interface IDBFactory {
+ cmp(first: any, second: any): number;
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+}
+
+interface IDBIndex {
+ keyPath: string | string[];
+ readonly name: string;
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ multiEntry: boolean;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ get(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+}
+
+interface IDBKeyRange {
+ readonly lower: any;
+ readonly lowerOpen: boolean;
+ readonly upper: any;
+ readonly upperOpen: boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ only(value: any): IDBKeyRange;
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+}
+
+interface IDBObjectStore {
+ readonly indexNames: DOMStringList;
+ keyPath: string | string[];
+ readonly name: string;
+ readonly transaction: IDBTransaction;
+ autoIncrement: boolean;
+ add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ clear(): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
+ delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ deleteIndex(indexName: string): void;
+ get(key: any): IDBRequest;
+ index(name: string): IDBIndex;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+}
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+interface IDBOpenDBRequest extends IDBRequest {
+ onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
+ onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+}
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+interface IDBRequest extends EventTarget {
+ readonly error: DOMError;
+ onerror: (this: IDBRequest, ev: Event) => any;
+ onsuccess: (this: IDBRequest, ev: Event) => any;
+ readonly readyState: IDBRequestReadyState;
+ readonly result: any;
+ source: IDBObjectStore | IDBIndex | IDBCursor;
+ readonly transaction: IDBTransaction;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+}
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ readonly db: IDBDatabase;
+ readonly error: DOMError;
+ readonly mode: IDBTransactionMode;
+ onabort: (this: IDBTransaction, ev: Event) => any;
+ oncomplete: (this: IDBTransaction, ev: Event) => any;
+ onerror: (this: IDBTransaction, ev: Event) => any;
+ abort(): void;
+ objectStore(name: string): IDBObjectStore;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+}
+
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(): IDBVersionChangeEvent;
+}
+
+interface IIRFilterNode extends AudioNode {
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var IIRFilterNode: {
+ prototype: IIRFilterNode;
+ new(): IIRFilterNode;
+}
+
+interface ImageData {
+ data: Uint8ClampedArray;
+ readonly height: number;
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
+}
+
+interface IntersectionObserver {
+ readonly root: Element | null;
+ readonly rootMargin: string;
+ readonly thresholds: number[];
+ disconnect(): void;
+ observe(target: Element): void;
+ takeRecords(): IntersectionObserverEntry[];
+ unobserve(target: Element): void;
+}
+
+declare var IntersectionObserver: {
+ prototype: IntersectionObserver;
+ new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
+}
+
+interface IntersectionObserverEntry {
+ readonly boundingClientRect: ClientRect;
+ readonly intersectionRatio: number;
+ readonly intersectionRect: ClientRect;
+ readonly rootBounds: ClientRect;
+ readonly target: Element;
+ readonly time: number;
+}
+
+declare var IntersectionObserverEntry: {
+ prototype: IntersectionObserverEntry;
+ new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
+}
+
+interface KeyboardEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly char: string | null;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly key: string;
+ readonly keyCode: number;
+ readonly locale: string;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ readonly which: number;
+ readonly code: string;
+ getModifierState(keyArg: string): boolean;
+ initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+interface ListeningStateChangedEvent extends Event {
+ readonly label: string;
+ readonly state: ListeningState;
+}
+
+declare var ListeningStateChangedEvent: {
+ prototype: ListeningStateChangedEvent;
+ new(): ListeningStateChangedEvent;
+}
+
+interface Location {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ assign(url: string): void;
+ reload(forcedReload?: boolean): void;
+ replace(url: string): void;
+ toString(): string;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+}
+
+interface LongRunningScriptDetectedEvent extends Event {
+ readonly executionTime: number;
+ stopPageScriptExecution: boolean;
+}
+
+declare var LongRunningScriptDetectedEvent: {
+ prototype: LongRunningScriptDetectedEvent;
+ new(): LongRunningScriptDetectedEvent;
+}
+
+interface MSApp {
+ clearTemporaryWebDataAsync(): MSAppAsyncOperation;
+ createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
+ createDataPackage(object: any): any;
+ createDataPackageFromSelection(): any;
+ createFileFromStorageFile(storageFile: any): File;
+ createStreamFromInputStream(type: string, inputStream: any): MSStream;
+ execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
+ execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
+ getCurrentPriority(): string;
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
+ getViewId(view: any): any;
+ isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
+ pageHandlesAllApplicationActivations(enabled: boolean): void;
+ suppressSubdownloadCredentialPrompts(suppress: boolean): void;
+ terminateApp(exceptionObject: any): void;
+ readonly CURRENT: string;
+ readonly HIGH: string;
+ readonly IDLE: string;
+ readonly NORMAL: string;
+}
+declare var MSApp: MSApp;
+
+interface MSAppAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSAppAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
+ onerror: (this: MSAppAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSAppAsyncOperation: {
+ prototype: MSAppAsyncOperation;
+ new(): MSAppAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+}
+
+interface MSAssertion {
+ readonly id: string;
+ readonly type: MSCredentialType;
+}
+
+declare var MSAssertion: {
+ prototype: MSAssertion;
+ new(): MSAssertion;
+}
+
+interface MSBlobBuilder {
+ append(data: any, endings?: string): void;
+ getBlob(contentType?: string): Blob;
+}
+
+declare var MSBlobBuilder: {
+ prototype: MSBlobBuilder;
+ new(): MSBlobBuilder;
+}
+
+interface MSCredentials {
+ getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
+ makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
+}
+
+declare var MSCredentials: {
+ prototype: MSCredentials;
+ new(): MSCredentials;
+}
+
+interface MSFIDOCredentialAssertion extends MSAssertion {
+ readonly algorithm: string | Algorithm;
+ readonly attestation: any;
+ readonly publicKey: string;
+ readonly transportHints: MSTransportType[];
+}
+
+declare var MSFIDOCredentialAssertion: {
+ prototype: MSFIDOCredentialAssertion;
+ new(): MSFIDOCredentialAssertion;
+}
+
+interface MSFIDOSignature {
+ readonly authnrData: string;
+ readonly clientData: string;
+ readonly signature: string;
+}
+
+declare var MSFIDOSignature: {
+ prototype: MSFIDOSignature;
+ new(): MSFIDOSignature;
+}
+
+interface MSFIDOSignatureAssertion extends MSAssertion {
+ readonly signature: MSFIDOSignature;
+}
+
+declare var MSFIDOSignatureAssertion: {
+ prototype: MSFIDOSignatureAssertion;
+ new(): MSFIDOSignatureAssertion;
+}
+
+interface MSGesture {
+ target: Element;
+ addPointer(pointerId: number): void;
+ stop(): void;
+}
+
+declare var MSGesture: {
+ prototype: MSGesture;
+ new(): MSGesture;
+}
+
+interface MSGestureEvent extends UIEvent {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly expansion: number;
+ readonly gestureObject: any;
+ readonly hwTimestamp: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly rotation: number;
+ readonly scale: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly translationX: number;
+ readonly translationY: number;
+ readonly velocityAngular: number;
+ readonly velocityExpansion: number;
+ readonly velocityX: number;
+ readonly velocityY: number;
+ initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+declare var MSGestureEvent: {
+ prototype: MSGestureEvent;
+ new(): MSGestureEvent;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+interface MSGraphicsTrust {
+ readonly constrictionActive: boolean;
+ readonly status: string;
+}
+
+declare var MSGraphicsTrust: {
+ prototype: MSGraphicsTrust;
+ new(): MSGraphicsTrust;
+}
+
+interface MSHTMLWebViewElement extends HTMLElement {
+ readonly canGoBack: boolean;
+ readonly canGoForward: boolean;
+ readonly containsFullScreenElement: boolean;
+ readonly documentTitle: string;
+ height: number;
+ readonly settings: MSWebViewSettings;
+ src: string;
+ width: number;
+ addWebAllowedObject(name: string, applicationObject: any): void;
+ buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
+ capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
+ captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
+ getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
+ getDeferredPermissionRequests(): DeferredPermissionRequest[];
+ goBack(): void;
+ goForward(): void;
+ invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
+ navigate(uri: string): void;
+ navigateFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ navigateToLocalStreamUri(source: string, streamResolver: any): void;
+ navigateToString(contents: string): void;
+ navigateWithHttpRequestMessage(requestMessage: any): void;
+ refresh(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MSHTMLWebViewElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSHTMLWebViewElement: {
+ prototype: MSHTMLWebViewElement;
+ new(): MSHTMLWebViewElement;
+}
+
+interface MSInputMethodContextEventMap {
+ "MSCandidateWindowHide": Event;
+ "MSCandidateWindowShow": Event;
+ "MSCandidateWindowUpdate": Event;
+}
+
+interface MSInputMethodContext extends EventTarget {
+ readonly compositionEndOffset: number;
+ readonly compositionStartOffset: number;
+ oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
+ readonly target: HTMLElement;
+ getCandidateWindowClientRect(): ClientRect;
+ getCompositionAlternatives(): string[];
+ hasComposition(): boolean;
+ isCandidateWindowVisible(): boolean;
+ addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSInputMethodContext: {
+ prototype: MSInputMethodContext;
+ new(): MSInputMethodContext;
+}
+
+interface MSManipulationEvent extends UIEvent {
+ readonly currentState: number;
+ readonly inertiaDestinationX: number;
+ readonly inertiaDestinationY: number;
+ readonly lastState: number;
+ initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+declare var MSManipulationEvent: {
+ prototype: MSManipulationEvent;
+ new(): MSManipulationEvent;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+interface MSMediaKeyError {
+ readonly code: number;
+ readonly systemCode: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+declare var MSMediaKeyError: {
+ prototype: MSMediaKeyError;
+ new(): MSMediaKeyError;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+interface MSMediaKeyMessageEvent extends Event {
+ readonly destinationURL: string | null;
+ readonly message: Uint8Array;
+}
+
+declare var MSMediaKeyMessageEvent: {
+ prototype: MSMediaKeyMessageEvent;
+ new(): MSMediaKeyMessageEvent;
+}
+
+interface MSMediaKeyNeededEvent extends Event {
+ readonly initData: Uint8Array | null;
+}
+
+declare var MSMediaKeyNeededEvent: {
+ prototype: MSMediaKeyNeededEvent;
+ new(): MSMediaKeyNeededEvent;
+}
+
+interface MSMediaKeySession extends EventTarget {
+ readonly error: MSMediaKeyError | null;
+ readonly keySystem: string;
+ readonly sessionId: string;
+ close(): void;
+ update(key: Uint8Array): void;
+}
+
+declare var MSMediaKeySession: {
+ prototype: MSMediaKeySession;
+ new(): MSMediaKeySession;
+}
+
+interface MSMediaKeys {
+ readonly keySystem: string;
+ createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
+}
+
+declare var MSMediaKeys: {
+ prototype: MSMediaKeys;
+ new(keySystem: string): MSMediaKeys;
+ isTypeSupported(keySystem: string, type?: string): boolean;
+ isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
+}
+
+interface MSPointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var MSPointerEvent: {
+ prototype: MSPointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
+}
+
+interface MSRangeCollection {
+ readonly length: number;
+ item(index: number): Range;
+ [index: number]: Range;
+}
+
+declare var MSRangeCollection: {
+ prototype: MSRangeCollection;
+ new(): MSRangeCollection;
+}
+
+interface MSSiteModeEvent extends Event {
+ readonly actionURL: string;
+ readonly buttonID: number;
+}
+
+declare var MSSiteModeEvent: {
+ prototype: MSSiteModeEvent;
+ new(): MSSiteModeEvent;
+}
+
+interface MSStream {
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+}
+
+declare var MSStream: {
+ prototype: MSStream;
+ new(): MSStream;
+}
+
+interface MSStreamReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(stream: MSStream, size?: number): void;
+ readAsBinaryString(stream: MSStream, size?: number): void;
+ readAsBlob(stream: MSStream, size?: number): void;
+ readAsDataURL(stream: MSStream, size?: number): void;
+ readAsText(stream: MSStream, encoding?: string, size?: number): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSStreamReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSStreamReader: {
+ prototype: MSStreamReader;
+ new(): MSStreamReader;
+}
+
+interface MSWebViewAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSWebViewAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ onerror: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ readonly target: MSHTMLWebViewElement;
+ readonly type: number;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+ addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSWebViewAsyncOperation: {
+ prototype: MSWebViewAsyncOperation;
+ new(): MSWebViewAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+}
+
+interface MSWebViewSettings {
+ isIndexedDBEnabled: boolean;
+ isJavaScriptEnabled: boolean;
+}
+
+declare var MSWebViewSettings: {
+ prototype: MSWebViewSettings;
+ new(): MSWebViewSettings;
+}
+
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: MediaDeviceKind;
+ readonly label: string;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+}
+
+interface MediaDevicesEventMap {
+ "devicechange": Event;
+}
+
+interface MediaDevices extends EventTarget {
+ ondevicechange: (this: MediaDevices, ev: Event) => any;
+ enumerateDevices(): any;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
+ addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+}
+
+interface MediaElementAudioSourceNode extends AudioNode {
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(): MediaElementAudioSourceNode;
+}
+
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+}
+
+interface MediaError {
+ readonly code: number;
+ readonly msExtendedCode: number;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: MediaKeyMessageType;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+}
+
+interface MediaKeySession extends EventTarget {
+ readonly closed: Promise<void>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ readonly sessionId: string;
+ close(): Promise<void>;
+ generateRequest(initDataType: string, initData: any): Promise<void>;
+ load(sessionId: string): Promise<boolean>;
+ remove(): Promise<void>;
+ update(response: any): Promise<void>;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+}
+
+interface MediaKeyStatusMap {
+ readonly size: number;
+ forEach(callback: ForEachCallback): void;
+ get(keyId: any): MediaKeyStatus;
+ has(keyId: any): boolean;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+}
+
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): Promise<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+}
+
+interface MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+}
+
+interface MediaList {
+ readonly length: number;
+ mediaText: string;
+ appendMedium(newMedium: string): void;
+ deleteMedium(oldMedium: string): void;
+ item(index: number): string;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+}
+
+interface MediaQueryList {
+ readonly matches: boolean;
+ readonly media: string;
+ addListener(listener: MediaQueryListListener): void;
+ removeListener(listener: MediaQueryListListener): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+}
+
+interface MediaSource extends EventTarget {
+ readonly activeSourceBuffers: SourceBufferList;
+ duration: number;
+ readonly readyState: string;
+ readonly sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ endOfStream(error?: number): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+}
+
+interface MediaStreamEventMap {
+ "active": Event;
+ "addtrack": MediaStreamTrackEvent;
+ "inactive": Event;
+ "removetrack": MediaStreamTrackEvent;
+}
+
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onactive: (this: MediaStream, ev: Event) => any;
+ onaddtrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ oninactive: (this: MediaStream, ev: Event) => any;
+ onremovetrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
+}
+
+interface MediaStreamAudioSourceNode extends AudioNode {
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(): MediaStreamAudioSourceNode;
+}
+
+interface MediaStreamError {
+ readonly constraintName: string | null;
+ readonly message: string | null;
+ readonly name: string;
+}
+
+declare var MediaStreamError: {
+ prototype: MediaStreamError;
+ new(): MediaStreamError;
+}
+
+interface MediaStreamErrorEvent extends Event {
+ readonly error: MediaStreamError | null;
+}
+
+declare var MediaStreamErrorEvent: {
+ prototype: MediaStreamErrorEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
+}
+
+interface MediaStreamEvent extends Event {
+ readonly stream: MediaStream | null;
+}
+
+declare var MediaStreamEvent: {
+ prototype: MediaStreamEvent;
+ new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent;
+}
+
+interface MediaStreamTrackEventMap {
+ "ended": MediaStreamErrorEvent;
+ "mute": Event;
+ "overconstrained": MediaStreamErrorEvent;
+ "unmute": Event;
+}
+
+interface MediaStreamTrack extends EventTarget {
+ enabled: boolean;
+ readonly id: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onmute: (this: MediaStreamTrack, ev: Event) => any;
+ onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onunmute: (this: MediaStreamTrack, ev: Event) => any;
+ readonly readonly: boolean;
+ readonly readyState: MediaStreamTrackState;
+ readonly remote: boolean;
+ applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+}
+
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+}
+
+interface MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+}
+
+interface MessageEvent extends Event {
+ readonly data: any;
+ readonly origin: string;
+ readonly ports: any;
+ readonly source: Window;
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+}
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+}
+
+interface MessagePort extends EventTarget {
+ onmessage: (this: MessagePort, ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message?: any, transfer?: any[]): void;
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+}
+
+interface MimeType {
+ readonly description: string;
+ readonly enabledPlugin: Plugin;
+ readonly suffixes: string;
+ readonly type: string;
+}
+
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+}
+
+interface MimeTypeArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(type: string): Plugin;
+ [index: number]: Plugin;
+}
+
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+}
+
+interface MouseEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly fromElement: Element;
+ readonly layerX: number;
+ readonly layerY: number;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly toElement: Element;
+ readonly which: number;
+ readonly x: number;
+ readonly y: number;
+ getModifierState(keyArg: string): boolean;
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
+}
+
+interface MutationEvent extends Event {
+ readonly attrChange: number;
+ readonly attrName: string;
+ readonly newValue: string;
+ readonly prevValue: string;
+ readonly relatedNode: Node;
+ initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+interface MutationObserver {
+ disconnect(): void;
+ observe(target: Node, options: MutationObserverInit): void;
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+}
+
+interface MutationRecord {
+ readonly addedNodes: NodeList;
+ readonly attributeName: string | null;
+ readonly attributeNamespace: string | null;
+ readonly nextSibling: Node | null;
+ readonly oldValue: string | null;
+ readonly previousSibling: Node | null;
+ readonly removedNodes: NodeList;
+ readonly target: Node;
+ readonly type: string;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+}
+
+interface NamedNodeMap {
+ readonly length: number;
+ getNamedItem(name: string): Attr;
+ getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ item(index: number): Attr;
+ removeNamedItem(name: string): Attr;
+ removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ setNamedItem(arg: Attr): Attr;
+ setNamedItemNS(arg: Attr): Attr;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+}
+
+interface NavigationCompletedEvent extends NavigationEvent {
+ readonly isSuccess: boolean;
+ readonly webErrorStatus: number;
+}
+
+declare var NavigationCompletedEvent: {
+ prototype: NavigationCompletedEvent;
+ new(): NavigationCompletedEvent;
+}
+
+interface NavigationEvent extends Event {
+ readonly uri: string;
+}
+
+declare var NavigationEvent: {
+ prototype: NavigationEvent;
+ new(): NavigationEvent;
+}
+
+interface NavigationEventWithReferrer extends NavigationEvent {
+ readonly referer: string;
+}
+
+declare var NavigationEventWithReferrer: {
+ prototype: NavigationEventWithReferrer;
+ new(): NavigationEventWithReferrer;
+}
+
+interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
+ readonly authentication: WebAuthentication;
+ readonly cookieEnabled: boolean;
+ gamepadInputEmulation: GamepadInputEmulationType;
+ readonly language: string;
+ readonly maxTouchPoints: number;
+ readonly mimeTypes: MimeTypeArray;
+ readonly msManipulationViewsEnabled: boolean;
+ readonly msMaxTouchPoints: number;
+ readonly msPointerEnabled: boolean;
+ readonly plugins: PluginArray;
+ readonly pointerEnabled: boolean;
+ readonly serviceWorker: ServiceWorkerContainer;
+ readonly webdriver: boolean;
+ readonly hardwareConcurrency: number;
+ getGamepads(): Gamepad[];
+ javaEnabled(): boolean;
+ msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
+ vibrate(pattern: number | number[]): boolean;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+}
+
+interface Node extends EventTarget {
+ readonly attributes: NamedNodeMap;
+ readonly baseURI: string | null;
+ readonly childNodes: NodeList;
+ readonly firstChild: Node | null;
+ readonly lastChild: Node | null;
+ readonly localName: string | null;
+ readonly namespaceURI: string | null;
+ readonly nextSibling: Node | null;
+ readonly nodeName: string;
+ readonly nodeType: number;
+ nodeValue: string | null;
+ readonly ownerDocument: Document;
+ readonly parentElement: HTMLElement | null;
+ readonly parentNode: Node | null;
+ readonly previousSibling: Node | null;
+ textContent: string | null;
+ appendChild<T extends Node>(newChild: T): T;
+ cloneNode(deep?: boolean): Node;
+ compareDocumentPosition(other: Node): number;
+ contains(child: Node): boolean;
+ hasAttributes(): boolean;
+ hasChildNodes(): boolean;
+ insertBefore<T extends Node>(newChild: T, refChild: Node | null): T;
+ isDefaultNamespace(namespaceURI: string | null): boolean;
+ isEqualNode(arg: Node): boolean;
+ isSameNode(other: Node): boolean;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespaceURI: string | null): string | null;
+ normalize(): void;
+ removeChild<T extends Node>(oldChild: T): T;
+ replaceChild<T extends Node>(newChild: Node, oldChild: T): T;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+interface NodeFilter {
+ acceptNode(n: Node): number;
+}
+
+declare var NodeFilter: {
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
+}
+
+interface NodeIterator {
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ detach(): void;
+ nextNode(): Node;
+ previousNode(): Node;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+}
+
+interface NodeList {
+ readonly length: number;
+ item(index: number): Node;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: (this: Notification, ev: Event) => any;
+ onclose: (this: Notification, ev: Event) => any;
+ onerror: (this: Notification, ev: Event) => any;
+ onshow: (this: Notification, ev: Event) => any;
+ readonly permission: NotificationPermission;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+}
+
+interface OES_element_index_uint {
+}
+
+declare var OES_element_index_uint: {
+ prototype: OES_element_index_uint;
+ new(): OES_element_index_uint;
+}
+
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+declare var OES_standard_derivatives: {
+ prototype: OES_standard_derivatives;
+ new(): OES_standard_derivatives;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+interface OES_texture_float {
+}
+
+declare var OES_texture_float: {
+ prototype: OES_texture_float;
+ new(): OES_texture_float;
+}
+
+interface OES_texture_float_linear {
+}
+
+declare var OES_texture_float_linear: {
+ prototype: OES_texture_float_linear;
+ new(): OES_texture_float_linear;
+}
+
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: number;
+}
+
+declare var OES_texture_half_float: {
+ prototype: OES_texture_half_float;
+ new(): OES_texture_half_float;
+ readonly HALF_FLOAT_OES: number;
+}
+
+interface OES_texture_half_float_linear {
+}
+
+declare var OES_texture_half_float_linear: {
+ prototype: OES_texture_half_float_linear;
+ new(): OES_texture_half_float_linear;
+}
+
+interface OfflineAudioCompletionEvent extends Event {
+ readonly renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(): OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContextEventMap extends AudioContextEventMap {
+ "complete": OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContext extends AudioContextBase {
+ readonly length: number;
+ oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
+ startRendering(): Promise<AudioBuffer>;
+ suspend(suspendTime: number): Promise<void>;
+ addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+}
+
+interface OscillatorNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface OscillatorNode extends AudioNode {
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
+ type: OscillatorType;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(): OscillatorNode;
+}
+
+interface OverflowEvent extends UIEvent {
+ readonly horizontalOverflow: boolean;
+ readonly orient: number;
+ readonly verticalOverflow: boolean;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+declare var OverflowEvent: {
+ prototype: OverflowEvent;
+ new(): OverflowEvent;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+interface PageTransitionEvent extends Event {
+ readonly persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(): PageTransitionEvent;
+}
+
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: DistanceModelType;
+ maxDistance: number;
+ panningModel: PanningModelType;
+ refDistance: number;
+ rolloffFactor: number;
+ setOrientation(x: number, y: number, z: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(): PannerNode;
+}
+
+interface Path2D extends Object, CanvasPathMethods {
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D): Path2D;
+}
+
+interface PaymentAddress {
+ readonly addressLine: string[];
+ readonly city: string;
+ readonly country: string;
+ readonly dependentLocality: string;
+ readonly languageCode: string;
+ readonly organization: string;
+ readonly phone: string;
+ readonly postalCode: string;
+ readonly recipient: string;
+ readonly region: string;
+ readonly sortingCode: string;
+ toJSON(): any;
+}
+
+declare var PaymentAddress: {
+ prototype: PaymentAddress;
+ new(): PaymentAddress;
+}
+
+interface PaymentRequestEventMap {
+ "shippingaddresschange": Event;
+ "shippingoptionchange": Event;
+}
+
+interface PaymentRequest extends EventTarget {
+ onshippingaddresschange: (this: PaymentRequest, ev: Event) => any;
+ onshippingoptionchange: (this: PaymentRequest, ev: Event) => any;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ readonly shippingType: PaymentShippingType | null;
+ abort(): Promise<void>;
+ show(): Promise<PaymentResponse>;
+ addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var PaymentRequest: {
+ prototype: PaymentRequest;
+ new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
+}
+
+interface PaymentRequestUpdateEvent extends Event {
+ updateWith(d: Promise<PaymentDetails>): void;
+}
+
+declare var PaymentRequestUpdateEvent: {
+ prototype: PaymentRequestUpdateEvent;
+ new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
+}
+
+interface PaymentResponse {
+ readonly details: any;
+ readonly methodName: string;
+ readonly payerEmail: string | null;
+ readonly payerName: string | null;
+ readonly payerPhone: string | null;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ complete(result?: PaymentComplete): Promise<void>;
+ toJSON(): any;
+}
+
+declare var PaymentResponse: {
+ prototype: PaymentResponse;
+ new(): PaymentResponse;
+}
+
+interface PerfWidgetExternal {
+ readonly activeNetworkRequestCount: number;
+ readonly averageFrameTime: number;
+ readonly averagePaintTime: number;
+ readonly extraInformationEnabled: boolean;
+ readonly independentRenderingEnabled: boolean;
+ readonly irDisablingContentString: string;
+ readonly irStatusAvailable: boolean;
+ readonly maxCpuSpeed: number;
+ readonly paintRequestsPerSecond: number;
+ readonly performanceCounter: number;
+ readonly performanceCounterFrequency: number;
+ addEventListener(eventType: string, callback: Function): void;
+ getMemoryUsage(): number;
+ getProcessCpuUsage(): number;
+ getRecentCpuUsage(last: number | null): any;
+ getRecentFrames(last: number | null): any;
+ getRecentMemoryUsage(last: number | null): any;
+ getRecentPaintRequests(last: number | null): any;
+ removeEventListener(eventType: string, callback: Function): void;
+ repositionWindow(x: number, y: number): void;
+ resizeWindow(width: number, height: number): void;
+}
+
+declare var PerfWidgetExternal: {
+ prototype: PerfWidgetExternal;
+ new(): PerfWidgetExternal;
+}
+
+interface Performance {
+ readonly navigation: PerformanceNavigation;
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): any;
+ getEntriesByName(name: string, entryType?: string): any;
+ getEntriesByType(entryType: string): any;
+ getMarks(markName?: string): any;
+ getMeasures(measureName?: string): any;
+ mark(markName: string): void;
+ measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+}
+
+interface PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+}
+
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+}
+
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+}
+
+interface PerformanceNavigation {
+ readonly redirectCount: number;
+ readonly type: number;
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+interface PerformanceNavigationTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly navigationStart: number;
+ readonly redirectCount: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly type: NavigationType;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+}
+
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+}
+
+interface PerformanceTiming {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly msFirstPaint: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ readonly secureConnectionStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+}
+
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(): PeriodicWave;
+}
+
+interface PermissionRequest extends DeferredPermissionRequest {
+ readonly state: MSWebViewPermissionState;
+ defer(): void;
+}
+
+declare var PermissionRequest: {
+ prototype: PermissionRequest;
+ new(): PermissionRequest;
+}
+
+interface PermissionRequestedEvent extends Event {
+ readonly permissionRequest: PermissionRequest;
+}
+
+declare var PermissionRequestedEvent: {
+ prototype: PermissionRequestedEvent;
+ new(): PermissionRequestedEvent;
+}
+
+interface Plugin {
+ readonly description: string;
+ readonly filename: string;
+ readonly length: number;
+ readonly name: string;
+ readonly version: string;
+ item(index: number): MimeType;
+ namedItem(type: string): MimeType;
+ [index: number]: MimeType;
+}
+
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+}
+
+interface PluginArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(name: string): Plugin;
+ refresh(reload?: boolean): void;
+ [index: number]: Plugin;
+}
+
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+}
+
+interface PointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
+}
+
+interface PopStateEvent extends Event {
+ readonly state: any;
+ initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
+}
+
+interface Position {
+ readonly coords: Coordinates;
+ readonly timestamp: number;
+}
+
+declare var Position: {
+ prototype: Position;
+ new(): Position;
+}
+
+interface PositionError {
+ readonly code: number;
+ readonly message: string;
+ toString(): string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+declare var PositionError: {
+ prototype: PositionError;
+ new(): PositionError;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+interface ProcessingInstruction extends CharacterData {
+ readonly target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+}
+
+interface ProgressEvent extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly total: number;
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+}
+
+interface PushManager {
+ getSubscription(): Promise<PushSubscription>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+}
+
+interface PushSubscription {
+ readonly endpoint: USVString;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): any;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+}
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+}
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtlsTransportEventMap {
+ "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
+ "error": Event;
+}
+
+interface RTCDtlsTransport extends RTCStatsProvider {
+ ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
+ onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ readonly state: RTCDtlsTransportState;
+ readonly transport: RTCIceTransport;
+ getLocalParameters(): RTCDtlsParameters;
+ getRemoteCertificates(): ArrayBuffer[];
+ getRemoteParameters(): RTCDtlsParameters | null;
+ start(remoteParameters: RTCDtlsParameters): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(transport: RTCIceTransport): RTCDtlsTransport;
+}
+
+interface RTCDtlsTransportStateChangedEvent extends Event {
+ readonly state: RTCDtlsTransportState;
+}
+
+declare var RTCDtlsTransportStateChangedEvent: {
+ prototype: RTCDtlsTransportStateChangedEvent;
+ new(): RTCDtlsTransportStateChangedEvent;
+}
+
+interface RTCDtmfSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtmfSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ readonly duration: number;
+ readonly interToneGap: number;
+ ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
+ readonly sender: RTCRtpSender;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtmfSender: {
+ prototype: RTCDtmfSender;
+ new(sender: RTCRtpSender): RTCDtmfSender;
+}
+
+interface RTCIceCandidate {
+ candidate: string | null;
+ sdpMLineIndex: number | null;
+ sdpMid: string | null;
+ toJSON(): any;
+}
+
+declare var RTCIceCandidate: {
+ prototype: RTCIceCandidate;
+ new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
+}
+
+interface RTCIceCandidatePairChangedEvent extends Event {
+ readonly pair: RTCIceCandidatePair;
+}
+
+declare var RTCIceCandidatePairChangedEvent: {
+ prototype: RTCIceCandidatePairChangedEvent;
+ new(): RTCIceCandidatePairChangedEvent;
+}
+
+interface RTCIceGathererEventMap {
+ "error": Event;
+ "localcandidate": RTCIceGathererEvent;
+}
+
+interface RTCIceGatherer extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ onerror: ((this: RTCIceGatherer, ev: Event) => any) | null;
+ onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
+ createAssociatedGatherer(): RTCIceGatherer;
+ getLocalCandidates(): RTCIceCandidateDictionary[];
+ getLocalParameters(): RTCIceParameters;
+ addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceGatherer: {
+ prototype: RTCIceGatherer;
+ new(options: RTCIceGatherOptions): RTCIceGatherer;
+}
+
+interface RTCIceGathererEvent extends Event {
+ readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
+}
+
+declare var RTCIceGathererEvent: {
+ prototype: RTCIceGathererEvent;
+ new(): RTCIceGathererEvent;
+}
+
+interface RTCIceTransportEventMap {
+ "candidatepairchange": RTCIceCandidatePairChangedEvent;
+ "icestatechange": RTCIceTransportStateChangedEvent;
+}
+
+interface RTCIceTransport extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ readonly iceGatherer: RTCIceGatherer | null;
+ oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
+ onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
+ readonly role: RTCIceRole;
+ readonly state: RTCIceTransportState;
+ addRemoteCandidate(remoteCandidate: RTCIceCandidateDictionary | RTCIceCandidateComplete): void;
+ createAssociatedTransport(): RTCIceTransport;
+ getNominatedCandidatePair(): RTCIceCandidatePair | null;
+ getRemoteCandidates(): RTCIceCandidateDictionary[];
+ getRemoteParameters(): RTCIceParameters | null;
+ setRemoteCandidates(remoteCandidates: RTCIceCandidateDictionary[]): void;
+ start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: RTCIceRole): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+}
+
+interface RTCIceTransportStateChangedEvent extends Event {
+ readonly state: RTCIceTransportState;
+}
+
+declare var RTCIceTransportStateChangedEvent: {
+ prototype: RTCIceTransportStateChangedEvent;
+ new(): RTCIceTransportStateChangedEvent;
+}
+
+interface RTCPeerConnectionEventMap {
+ "addstream": MediaStreamEvent;
+ "icecandidate": RTCPeerConnectionIceEvent;
+ "iceconnectionstatechange": Event;
+ "icegatheringstatechange": Event;
+ "negotiationneeded": Event;
+ "removestream": MediaStreamEvent;
+ "signalingstatechange": Event;
+}
+
+interface RTCPeerConnection extends EventTarget {
+ readonly canTrickleIceCandidates: boolean | null;
+ readonly iceConnectionState: RTCIceConnectionState;
+ readonly iceGatheringState: RTCIceGatheringState;
+ readonly localDescription: RTCSessionDescription | null;
+ onaddstream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onicecandidate: (this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any;
+ oniceconnectionstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onicegatheringstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onnegotiationneeded: (this: RTCPeerConnection, ev: Event) => any;
+ onremovestream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ readonly remoteDescription: RTCSessionDescription | null;
+ readonly signalingState: RTCSignalingState;
+ addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addStream(stream: MediaStream): void;
+ close(): void;
+ createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
+ createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
+ getConfiguration(): RTCConfiguration;
+ getLocalStreams(): MediaStream[];
+ getRemoteStreams(): MediaStream[];
+ getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
+ getStreamById(streamId: string): MediaStream | null;
+ removeStream(stream: MediaStream): void;
+ setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCPeerConnection: {
+ prototype: RTCPeerConnection;
+ new(configuration: RTCConfiguration): RTCPeerConnection;
+}
+
+interface RTCPeerConnectionIceEvent extends Event {
+ readonly candidate: RTCIceCandidate;
+}
+
+declare var RTCPeerConnectionIceEvent: {
+ prototype: RTCPeerConnectionIceEvent;
+ new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
+}
+
+interface RTCRtpReceiverEventMap {
+ "error": Event;
+}
+
+interface RTCRtpReceiver extends RTCStatsProvider {
+ onerror: ((this: RTCRtpReceiver, ev: Event) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ getContributingSources(): RTCRtpContributingSource[];
+ receive(parameters: RTCRtpParameters): void;
+ requestSendCSRC(csrc: number): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCRtpSenderEventMap {
+ "error": Event;
+ "ssrcconflict": RTCSsrcConflictEvent;
+}
+
+interface RTCRtpSender extends RTCStatsProvider {
+ onerror: ((this: RTCRtpSender, ev: Event) => any) | null;
+ onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ send(parameters: RTCRtpParameters): void;
+ setTrack(track: MediaStreamTrack): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCSessionDescription {
+ sdp: string | null;
+ type: RTCSdpType | null;
+ toJSON(): any;
+}
+
+declare var RTCSessionDescription: {
+ prototype: RTCSessionDescription;
+ new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
+}
+
+interface RTCSrtpSdesTransportEventMap {
+ "error": Event;
+}
+
+interface RTCSrtpSdesTransport extends EventTarget {
+ onerror: ((this: RTCSrtpSdesTransport, ev: Event) => any) | null;
+ readonly transport: RTCIceTransport;
+ addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCSrtpSdesTransport: {
+ prototype: RTCSrtpSdesTransport;
+ new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
+ getLocalParameters(): RTCSrtpSdesParameters[];
+}
+
+interface RTCSsrcConflictEvent extends Event {
+ readonly ssrc: number;
+}
+
+declare var RTCSsrcConflictEvent: {
+ prototype: RTCSsrcConflictEvent;
+ new(): RTCSsrcConflictEvent;
+}
+
+interface RTCStatsProvider extends EventTarget {
+ getStats(): Promise<RTCStatsReport>;
+ msGetStats(): Promise<RTCStatsReport>;
+}
+
+declare var RTCStatsProvider: {
+ prototype: RTCStatsProvider;
+ new(): RTCStatsProvider;
+}
+
+interface Range {
+ readonly collapsed: boolean;
+ readonly commonAncestorContainer: Node;
+ readonly endContainer: Node;
+ readonly endOffset: number;
+ readonly startContainer: Node;
+ readonly startOffset: number;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ expand(Unit: ExpandGranularity): boolean;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ insertNode(newNode: Node): void;
+ selectNode(refNode: Node): void;
+ selectNodeContents(refNode: Node): void;
+ setEnd(refNode: Node, offset: number): void;
+ setEndAfter(refNode: Node): void;
+ setEndBefore(refNode: Node): void;
+ setStart(refNode: Node, offset: number): void;
+ setStartAfter(refNode: Node): void;
+ setStartBefore(refNode: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+interface ReadableStream {
+ readonly locked: boolean;
+ cancel(): Promise<void>;
+ getReader(): ReadableStreamReader;
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(): ReadableStream;
+}
+
+interface ReadableStreamReader {
+ cancel(): Promise<void>;
+ read(): Promise<any>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+}
+
+interface Request extends Object, Body {
+ readonly cache: RequestCache;
+ readonly credentials: RequestCredentials;
+ readonly destination: RequestDestination;
+ readonly headers: Headers;
+ readonly integrity: string;
+ readonly keepalive: boolean;
+ readonly method: string;
+ readonly mode: RequestMode;
+ readonly redirect: RequestRedirect;
+ readonly referrer: string;
+ readonly referrerPolicy: ReferrerPolicy;
+ readonly type: RequestType;
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: Request | string, init?: RequestInit): Request;
+}
+
+interface Response extends Object, Body {
+ readonly body: ReadableStream | null;
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: any, init?: ResponseInit): Response;
+}
+
+interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
+ readonly target: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+}
+
+interface SVGAngle {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+interface SVGAnimatedAngle {
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+}
+
+interface SVGAnimatedBoolean {
+ readonly animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+}
+
+interface SVGAnimatedEnumeration {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+}
+
+interface SVGAnimatedInteger {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+}
+
+interface SVGAnimatedLength {
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+}
+
+interface SVGAnimatedLengthList {
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+}
+
+interface SVGAnimatedNumber {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+}
+
+interface SVGAnimatedNumberList {
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+}
+
+interface SVGAnimatedPreserveAspectRatio {
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+}
+
+interface SVGAnimatedRect {
+ readonly animVal: SVGRect;
+ readonly baseVal: SVGRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+}
+
+interface SVGAnimatedString {
+ readonly animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+}
+
+interface SVGAnimatedTransformList {
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+}
+
+interface SVGCircleElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+}
+
+interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
+ readonly clipPathUnits: SVGAnimatedEnumeration;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+}
+
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+}
+
+interface SVGDefsElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+}
+
+interface SVGDescElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+}
+
+interface SVGElementEventMap extends ElementEventMap {
+ "click": MouseEvent;
+ "dblclick": MouseEvent;
+ "focusin": FocusEvent;
+ "focusout": FocusEvent;
+ "load": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+}
+
+interface SVGElement extends Element {
+ className: any;
+ onclick: (this: SVGElement, ev: MouseEvent) => any;
+ ondblclick: (this: SVGElement, ev: MouseEvent) => any;
+ onfocusin: (this: SVGElement, ev: FocusEvent) => any;
+ onfocusout: (this: SVGElement, ev: FocusEvent) => any;
+ onload: (this: SVGElement, ev: Event) => any;
+ onmousedown: (this: SVGElement, ev: MouseEvent) => any;
+ onmousemove: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseout: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseover: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseup: (this: SVGElement, ev: MouseEvent) => any;
+ readonly ownerSVGElement: SVGSVGElement;
+ readonly style: CSSStyleDeclaration;
+ readonly viewportElement: SVGElement;
+ xmlbase: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+}
+
+interface SVGElementInstance extends EventTarget {
+ readonly childNodes: SVGElementInstanceList;
+ readonly correspondingElement: SVGElement;
+ readonly correspondingUseElement: SVGUseElement;
+ readonly firstChild: SVGElementInstance;
+ readonly lastChild: SVGElementInstance;
+ readonly nextSibling: SVGElementInstance;
+ readonly parentNode: SVGElementInstance;
+ readonly previousSibling: SVGElementInstance;
+}
+
+declare var SVGElementInstance: {
+ prototype: SVGElementInstance;
+ new(): SVGElementInstance;
+}
+
+interface SVGElementInstanceList {
+ readonly length: number;
+ item(index: number): SVGElementInstance;
+}
+
+declare var SVGElementInstanceList: {
+ prototype: SVGElementInstanceList;
+ new(): SVGElementInstanceList;
+}
+
+interface SVGEllipseElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+}
+
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+}
+
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+}
+
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+}
+
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+}
+
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+}
+
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+}
+
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+}
+
+interface SVGFEDistantLightElement extends SVGElement {
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+}
+
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+}
+
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+}
+
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+}
+
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+}
+
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+}
+
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+}
+
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+}
+
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+}
+
+interface SVGFEMergeNodeElement extends SVGElement {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+}
+
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+}
+
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+}
+
+interface SVGFEPointLightElement extends SVGElement {
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+}
+
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+}
+
+interface SVGFESpotLightElement extends SVGElement {
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+}
+
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+}
+
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+}
+
+interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly filterResX: SVGAnimatedInteger;
+ readonly filterResY: SVGAnimatedInteger;
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ setFilterRes(filterResX: number, filterResY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+}
+
+interface SVGForeignObjectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+}
+
+interface SVGGElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+}
+
+interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+}
+
+interface SVGGraphicsElement extends SVGElement, SVGTests {
+ readonly farthestViewportElement: SVGElement;
+ readonly nearestViewportElement: SVGElement;
+ readonly transform: SVGAnimatedTransformList;
+ getBBox(): SVGRect;
+ getCTM(): SVGMatrix;
+ getScreenCTM(): SVGMatrix;
+ getTransformToElement(element: SVGElement): SVGMatrix;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGraphicsElement: {
+ prototype: SVGGraphicsElement;
+ new(): SVGGraphicsElement;
+}
+
+interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+}
+
+interface SVGLength {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+interface SVGLengthList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+}
+
+interface SVGLineElement extends SVGGraphicsElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+}
+
+interface SVGLinearGradientElement extends SVGGradientElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+}
+
+interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+}
+
+interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+}
+
+interface SVGMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ flipX(): SVGMatrix;
+ flipY(): SVGMatrix;
+ inverse(): SVGMatrix;
+ multiply(secondMatrix: SVGMatrix): SVGMatrix;
+ rotate(angle: number): SVGMatrix;
+ rotateFromVector(x: number, y: number): SVGMatrix;
+ scale(scaleFactor: number): SVGMatrix;
+ scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
+ skewX(angle: number): SVGMatrix;
+ skewY(angle: number): SVGMatrix;
+ translate(x: number, y: number): SVGMatrix;
+}
+
+declare var SVGMatrix: {
+ prototype: SVGMatrix;
+ new(): SVGMatrix;
+}
+
+interface SVGMetadataElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+}
+
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+}
+
+interface SVGNumberList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+}
+
+interface SVGPathElement extends SVGGraphicsElement {
+ readonly pathSegList: SVGPathSegList;
+ createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
+ createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
+ createSVGPathSegClosePath(): SVGPathSegClosePath;
+ createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
+ createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
+ createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
+ createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
+ createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
+ createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
+ createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
+ createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
+ createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
+ createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
+ createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
+ createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
+ createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
+ createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
+ createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
+ createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
+ getPathSegAtLength(distance: number): number;
+ getPointAtLength(distance: number): SVGPoint;
+ getTotalLength(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+}
+
+interface SVGPathSeg {
+ readonly pathSegType: number;
+ readonly pathSegTypeAsLetter: string;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+declare var SVGPathSeg: {
+ prototype: SVGPathSeg;
+ new(): SVGPathSeg;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+interface SVGPathSegArcAbs extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcAbs: {
+ prototype: SVGPathSegArcAbs;
+ new(): SVGPathSegArcAbs;
+}
+
+interface SVGPathSegArcRel extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcRel: {
+ prototype: SVGPathSegArcRel;
+ new(): SVGPathSegArcRel;
+}
+
+interface SVGPathSegClosePath extends SVGPathSeg {
+}
+
+declare var SVGPathSegClosePath: {
+ prototype: SVGPathSegClosePath;
+ new(): SVGPathSegClosePath;
+}
+
+interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicAbs: {
+ prototype: SVGPathSegCurvetoCubicAbs;
+ new(): SVGPathSegCurvetoCubicAbs;
+}
+
+interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicRel: {
+ prototype: SVGPathSegCurvetoCubicRel;
+ new(): SVGPathSegCurvetoCubicRel;
+}
+
+interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothAbs: {
+ prototype: SVGPathSegCurvetoCubicSmoothAbs;
+ new(): SVGPathSegCurvetoCubicSmoothAbs;
+}
+
+interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothRel: {
+ prototype: SVGPathSegCurvetoCubicSmoothRel;
+ new(): SVGPathSegCurvetoCubicSmoothRel;
+}
+
+interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticAbs: {
+ prototype: SVGPathSegCurvetoQuadraticAbs;
+ new(): SVGPathSegCurvetoQuadraticAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticRel: {
+ prototype: SVGPathSegCurvetoQuadraticRel;
+ new(): SVGPathSegCurvetoQuadraticRel;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
+ new(): SVGPathSegCurvetoQuadraticSmoothAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothRel: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothRel;
+ new(): SVGPathSegCurvetoQuadraticSmoothRel;
+}
+
+interface SVGPathSegLinetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoAbs: {
+ prototype: SVGPathSegLinetoAbs;
+ new(): SVGPathSegLinetoAbs;
+}
+
+interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalAbs: {
+ prototype: SVGPathSegLinetoHorizontalAbs;
+ new(): SVGPathSegLinetoHorizontalAbs;
+}
+
+interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalRel: {
+ prototype: SVGPathSegLinetoHorizontalRel;
+ new(): SVGPathSegLinetoHorizontalRel;
+}
+
+interface SVGPathSegLinetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoRel: {
+ prototype: SVGPathSegLinetoRel;
+ new(): SVGPathSegLinetoRel;
+}
+
+interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalAbs: {
+ prototype: SVGPathSegLinetoVerticalAbs;
+ new(): SVGPathSegLinetoVerticalAbs;
+}
+
+interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalRel: {
+ prototype: SVGPathSegLinetoVerticalRel;
+ new(): SVGPathSegLinetoVerticalRel;
+}
+
+interface SVGPathSegList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPathSeg): SVGPathSeg;
+ clear(): void;
+ getItem(index: number): SVGPathSeg;
+ initialize(newItem: SVGPathSeg): SVGPathSeg;
+ insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
+ removeItem(index: number): SVGPathSeg;
+ replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
+}
+
+declare var SVGPathSegList: {
+ prototype: SVGPathSegList;
+ new(): SVGPathSegList;
+}
+
+interface SVGPathSegMovetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoAbs: {
+ prototype: SVGPathSegMovetoAbs;
+ new(): SVGPathSegMovetoAbs;
+}
+
+interface SVGPathSegMovetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoRel: {
+ prototype: SVGPathSegMovetoRel;
+ new(): SVGPathSegMovetoRel;
+}
+
+interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+}
+
+interface SVGPoint {
+ x: number;
+ y: number;
+ matrixTransform(matrix: SVGMatrix): SVGPoint;
+}
+
+declare var SVGPoint: {
+ prototype: SVGPoint;
+ new(): SVGPoint;
+}
+
+interface SVGPointList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPoint): SVGPoint;
+ clear(): void;
+ getItem(index: number): SVGPoint;
+ initialize(newItem: SVGPoint): SVGPoint;
+ insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
+ removeItem(index: number): SVGPoint;
+ replaceItem(newItem: SVGPoint, index: number): SVGPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+}
+
+interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+}
+
+interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+}
+
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+interface SVGRadialGradientElement extends SVGGradientElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+}
+
+interface SVGRect {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var SVGRect: {
+ prototype: SVGRect;
+ new(): SVGRect;
+}
+
+interface SVGRectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+}
+
+interface SVGSVGElementEventMap extends SVGElementEventMap {
+ "SVGAbort": Event;
+ "SVGError": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "SVGUnload": Event;
+ "SVGZoom": SVGZoomEvent;
+}
+
+interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan {
+ contentScriptType: string;
+ contentStyleType: string;
+ currentScale: number;
+ readonly currentTranslate: SVGPoint;
+ readonly height: SVGAnimatedLength;
+ onabort: (this: SVGSVGElement, ev: Event) => any;
+ onerror: (this: SVGSVGElement, ev: Event) => any;
+ onresize: (this: SVGSVGElement, ev: UIEvent) => any;
+ onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
+ onunload: (this: SVGSVGElement, ev: Event) => any;
+ onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
+ readonly pixelUnitToMillimeterX: number;
+ readonly pixelUnitToMillimeterY: number;
+ readonly screenPixelToMillimeterX: number;
+ readonly screenPixelToMillimeterY: number;
+ readonly viewport: SVGRect;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
+ checkIntersection(element: SVGElement, rect: SVGRect): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): SVGMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): SVGPoint;
+ createSVGRect(): SVGRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ deselectAll(): void;
+ forceRedraw(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ unsuspendRedraw(suspendHandleID: number): void;
+ unsuspendRedrawAll(): void;
+ addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+}
+
+interface SVGScriptElement extends SVGElement, SVGURIReference {
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+}
+
+interface SVGStopElement extends SVGElement {
+ readonly offset: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+}
+
+interface SVGStringList {
+ readonly numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+}
+
+interface SVGStyleElement extends SVGElement {
+ disabled: boolean;
+ media: string;
+ title: string;
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+}
+
+interface SVGSwitchElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+}
+
+interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+}
+
+interface SVGTSpanElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+}
+
+interface SVGTextContentElement extends SVGGraphicsElement {
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point: SVGPoint): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): SVGPoint;
+ getExtentOfChar(charnum: number): SVGRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): SVGPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ selectSubString(charnum: number, nchars: number): void;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+}
+
+interface SVGTextElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+}
+
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+}
+
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+}
+
+interface SVGTitleElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+}
+
+interface SVGTransform {
+ readonly angle: number;
+ readonly matrix: SVGMatrix;
+ readonly type: number;
+ setMatrix(matrix: SVGMatrix): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+interface SVGTransformList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+}
+
+interface SVGUnitTypes {
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+declare var SVGUnitTypes: SVGUnitTypes;
+
+interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
+ readonly animatedInstanceRoot: SVGElementInstance;
+ readonly height: SVGAnimatedLength;
+ readonly instanceRoot: SVGElementInstance;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+}
+
+interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
+ readonly viewTarget: SVGStringList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+}
+
+interface SVGZoomAndPan {
+ readonly zoomAndPan: number;
+}
+
+declare var SVGZoomAndPan: {
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+}
+
+interface SVGZoomEvent extends UIEvent {
+ readonly newScale: number;
+ readonly newTranslate: SVGPoint;
+ readonly previousScale: number;
+ readonly previousTranslate: SVGPoint;
+ readonly zoomRectScreen: SVGRect;
+}
+
+declare var SVGZoomEvent: {
+ prototype: SVGZoomEvent;
+ new(): SVGZoomEvent;
+}
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
+}
+
+declare var ScopedCredential: {
+ prototype: ScopedCredential;
+ new(): ScopedCredential;
+}
+
+interface ScopedCredentialInfo {
+ readonly credential: ScopedCredential;
+ readonly publicKey: CryptoKey;
+}
+
+declare var ScopedCredentialInfo: {
+ prototype: ScopedCredentialInfo;
+ new(): ScopedCredentialInfo;
+}
+
+interface ScreenEventMap {
+ "MSOrientationChange": Event;
+}
+
+interface Screen extends EventTarget {
+ readonly availHeight: number;
+ readonly availWidth: number;
+ bufferDepth: number;
+ readonly colorDepth: number;
+ readonly deviceXDPI: number;
+ readonly deviceYDPI: number;
+ readonly fontSmoothingEnabled: boolean;
+ readonly height: number;
+ readonly logicalXDPI: number;
+ readonly logicalYDPI: number;
+ readonly msOrientation: string;
+ onmsorientationchange: (this: Screen, ev: Event) => any;
+ readonly pixelDepth: number;
+ readonly systemXDPI: number;
+ readonly systemYDPI: number;
+ readonly width: number;
+ msLockOrientation(orientations: string | string[]): boolean;
+ msUnlockOrientation(): void;
+ addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+}
+
+interface ScriptNotifyEvent extends Event {
+ readonly callingUri: string;
+ readonly value: string;
+}
+
+declare var ScriptNotifyEvent: {
+ prototype: ScriptNotifyEvent;
+ new(): ScriptNotifyEvent;
+}
+
+interface ScriptProcessorNodeEventMap {
+ "audioprocess": AudioProcessingEvent;
+}
+
+interface ScriptProcessorNode extends AudioNode {
+ readonly bufferSize: number;
+ onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
+ addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+}
+
+interface Selection {
+ readonly anchorNode: Node;
+ readonly anchorOffset: number;
+ readonly baseNode: Node;
+ readonly baseOffset: number;
+ readonly extentNode: Node;
+ readonly extentOffset: number;
+ readonly focusNode: Node;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
+ addRange(range: Range): void;
+ collapse(parentNode: Node, offset: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, partlyContained: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(newNode: Node, offset: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(parentNode: Node): void;
+ setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
+ setPosition(parentNode: Node, offset: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+}
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: (this: ServiceWorker, ev: Event) => any;
+ readonly scriptURL: USVString;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer?: any[]): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+}
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
+ onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: USVString): Promise<any>;
+ getRegistrations(): any;
+ register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+}
+
+interface ServiceWorkerMessageEvent extends Event {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: MessagePort[] | null;
+ readonly source: ServiceWorker | MessagePort | null;
+}
+
+declare var ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any;
+ readonly pushManager: PushManager;
+ readonly scope: USVString;
+ readonly sync: SyncManager;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): any;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+}
+
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ readonly audioTracks: AudioTrackList;
+ readonly buffered: TimeRanges;
+ mode: AppendMode;
+ timestampOffset: number;
+ readonly updating: boolean;
+ readonly videoTracks: VideoTrackList;
+ abort(): void;
+ appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
+ appendStream(stream: MSStream, maxSize?: number): void;
+ remove(start: number, end: number): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+}
+
+interface SourceBufferList extends EventTarget {
+ readonly length: number;
+ item(index: number): SourceBuffer;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+}
+
+interface SpeechSynthesisEventMap {
+ "voiceschanged": Event;
+}
+
+interface SpeechSynthesis extends EventTarget {
+ onvoiceschanged: (this: SpeechSynthesis, ev: Event) => any;
+ readonly paused: boolean;
+ readonly pending: boolean;
+ readonly speaking: boolean;
+ cancel(): void;
+ getVoices(): SpeechSynthesisVoice[];
+ pause(): void;
+ resume(): void;
+ speak(utterance: SpeechSynthesisUtterance): void;
+ addEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesis: {
+ prototype: SpeechSynthesis;
+ new(): SpeechSynthesis;
+}
+
+interface SpeechSynthesisEvent extends Event {
+ readonly charIndex: number;
+ readonly elapsedTime: number;
+ readonly name: string;
+ readonly utterance: SpeechSynthesisUtterance | null;
+}
+
+declare var SpeechSynthesisEvent: {
+ prototype: SpeechSynthesisEvent;
+ new(type: string, eventInitDict?: SpeechSynthesisEventInit): SpeechSynthesisEvent;
+}
+
+interface SpeechSynthesisUtteranceEventMap {
+ "boundary": Event;
+ "end": Event;
+ "error": Event;
+ "mark": Event;
+ "pause": Event;
+ "resume": Event;
+ "start": Event;
+}
+
+interface SpeechSynthesisUtterance extends EventTarget {
+ lang: string;
+ onboundary: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onend: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onerror: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onmark: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onpause: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onresume: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onstart: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ pitch: number;
+ rate: number;
+ text: string;
+ voice: SpeechSynthesisVoice;
+ volume: number;
+ addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesisUtterance: {
+ prototype: SpeechSynthesisUtterance;
+ new(text?: string): SpeechSynthesisUtterance;
+}
+
+interface SpeechSynthesisVoice {
+ readonly default: boolean;
+ readonly lang: string;
+ readonly localService: boolean;
+ readonly name: string;
+ readonly voiceURI: string;
+}
+
+declare var SpeechSynthesisVoice: {
+ prototype: SpeechSynthesisVoice;
+ new(): SpeechSynthesisVoice;
+}
+
+interface StereoPannerNode extends AudioNode {
+ readonly pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(): StereoPannerNode;
+}
+
+interface Storage {
+ readonly length: number;
+ clear(): void;
+ getItem(key: string): string | null;
+ key(index: number): string | null;
+ removeItem(key: string): void;
+ setItem(key: string, data: string): void;
+ [key: string]: any;
+ [index: number]: string;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+}
+
+interface StorageEvent extends Event {
+ readonly url: string;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
+}
+
+interface StyleMedia {
+ readonly type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+declare var StyleMedia: {
+ prototype: StyleMedia;
+ new(): StyleMedia;
+}
+
+interface StyleSheet {
+ disabled: boolean;
+ readonly href: string;
+ readonly media: MediaList;
+ readonly ownerNode: Node;
+ readonly parentStyleSheet: StyleSheet;
+ readonly title: string;
+ readonly type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+}
+
+interface StyleSheetList {
+ readonly length: number;
+ item(index?: number): StyleSheet;
+ [index: number]: StyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+}
+
+interface StyleSheetPageList {
+ readonly length: number;
+ item(index: number): CSSPageRule;
+ [index: number]: CSSPageRule;
+}
+
+declare var StyleSheetPageList: {
+ prototype: StyleSheetPageList;
+ new(): StyleSheetPageList;
+}
+
+interface SubtleCrypto {
+ decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
+ wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+}
+
+interface SyncManager {
+ getTags(): any;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+}
+
+interface Text extends CharacterData {
+ readonly wholeText: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(data?: string): Text;
+}
+
+interface TextEvent extends UIEvent {
+ readonly data: string;
+ readonly inputMethod: number;
+ readonly locale: string;
+ initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+declare var TextEvent: {
+ prototype: TextEvent;
+ new(): TextEvent;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+interface TextMetrics {
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+}
+
+interface TextTrackEventMap {
+ "cuechange": Event;
+ "error": Event;
+ "load": Event;
+}
+
+interface TextTrack extends EventTarget {
+ readonly activeCues: TextTrackCueList;
+ readonly cues: TextTrackCueList;
+ readonly inBandMetadataTrackDispatchType: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly language: string;
+ mode: any;
+ oncuechange: (this: TextTrack, ev: Event) => any;
+ onerror: (this: TextTrack, ev: Event) => any;
+ onload: (this: TextTrack, ev: Event) => any;
+ readonly readyState: number;
+ addCue(cue: TextTrackCue): void;
+ removeCue(cue: TextTrackCue): void;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+ addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+}
+
+interface TextTrackCueEventMap {
+ "enter": Event;
+ "exit": Event;
+}
+
+interface TextTrackCue extends EventTarget {
+ endTime: number;
+ id: string;
+ onenter: (this: TextTrackCue, ev: Event) => any;
+ onexit: (this: TextTrackCue, ev: Event) => any;
+ pauseOnExit: boolean;
+ startTime: number;
+ text: string;
+ readonly track: TextTrack;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(startTime: number, endTime: number, text: string): TextTrackCue;
+}
+
+interface TextTrackCueList {
+ readonly length: number;
+ getCueById(id: string): TextTrackCue;
+ item(index: number): TextTrackCue;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+}
+
+interface TextTrackListEventMap {
+ "addtrack": TrackEvent;
+}
+
+interface TextTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ item(index: number): TextTrack;
+ addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+}
+
+interface TimeRanges {
+ readonly length: number;
+ end(index: number): number;
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+}
+
+interface Touch {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(): Touch;
+}
+
+interface TouchEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly keyCode: number;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
+ readonly which: number;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
+}
+
+interface TouchList {
+ readonly length: number;
+ item(index: number): Touch | null;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+}
+
+interface TrackEvent extends Event {
+ readonly track: VideoTrack | AudioTrack | TextTrack | null;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
+}
+
+interface TransitionEvent extends Event {
+ readonly elapsedTime: number;
+ readonly propertyName: string;
+ initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
+}
+
+interface TreeWalker {
+ currentNode: Node;
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ firstChild(): Node;
+ lastChild(): Node;
+ nextNode(): Node;
+ nextSibling(): Node;
+ parentNode(): Node;
+ previousNode(): Node;
+ previousSibling(): Node;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+}
+
+interface UIEvent extends Event {
+ readonly detail: number;
+ readonly view: Window;
+ initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+}
+
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+ readonly searchParams: URLSearchParams;
+ toString(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string): URL;
+ createObjectURL(object: any, options?: ObjectURLOptions): string;
+ revokeObjectURL(url: string): void;
+}
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
+}
+
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+}
+
+interface ValidityState {
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+}
+
+interface VideoPlaybackQuality {
+ readonly corruptedVideoFrames: number;
+ readonly creationTime: number;
+ readonly droppedVideoFrames: number;
+ readonly totalFrameDelay: number;
+ readonly totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+}
+
+interface VideoTrack {
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ selected: boolean;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var VideoTrack: {
+ prototype: VideoTrack;
+ new(): VideoTrack;
+}
+
+interface VideoTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface VideoTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ onchange: (this: VideoTrackList, ev: Event) => any;
+ onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ readonly selectedIndex: number;
+ getTrackById(id: string): VideoTrack | null;
+ item(index: number): VideoTrack;
+ addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: VideoTrack;
+}
+
+declare var VideoTrackList: {
+ prototype: VideoTrackList;
+ new(): VideoTrackList;
+}
+
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+declare var WEBGL_compressed_texture_s3tc: {
+ prototype: WEBGL_compressed_texture_s3tc;
+ new(): WEBGL_compressed_texture_s3tc;
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+declare var WEBGL_debug_renderer_info: {
+ prototype: WEBGL_debug_renderer_info;
+ new(): WEBGL_debug_renderer_info;
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+declare var WEBGL_depth_texture: {
+ prototype: WEBGL_depth_texture;
+ new(): WEBGL_depth_texture;
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array | null;
+ oversample: OverSampleType;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(): WaveShaperNode;
+}
+
+interface WebAuthentication {
+ getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
+ makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
+}
+
+declare var WebAuthentication: {
+ prototype: WebAuthentication;
+ new(): WebAuthentication;
+}
+
+interface WebAuthnAssertion {
+ readonly authenticatorData: ArrayBuffer;
+ readonly clientData: ArrayBuffer;
+ readonly credential: ScopedCredential;
+ readonly signature: ArrayBuffer;
+}
+
+declare var WebAuthnAssertion: {
+ prototype: WebAuthnAssertion;
+ new(): WebAuthnAssertion;
+}
+
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: number;
+ readonly type: number;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+}
+
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+}
+
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
+}
+
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+}
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+}
+
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+}
+
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+}
+
+interface WebGLRenderingContext {
+ readonly canvas: HTMLCanvasElement;
+ readonly drawingBufferHeight: number;
+ readonly drawingBufferWidth: number;
+ activeTexture(texture: number): void;
+ attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
+ bindBuffer(target: number, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: number, texture: WebGLTexture | null): void;
+ blendColor(red: number, green: number, blue: number, alpha: number): void;
+ blendEquation(mode: number): void;
+ blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
+ blendFunc(sfactor: number, dfactor: number): void;
+ blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
+ bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
+ bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
+ checkFramebufferStatus(target: number): number;
+ clear(mask: number): void;
+ clearColor(red: number, green: number, blue: number, alpha: number): void;
+ clearDepth(depth: number): void;
+ clearStencil(s: number): void;
+ colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
+ compileShader(shader: WebGLShader | null): void;
+ compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
+ copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
+ copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: number): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: number): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: number): void;
+ depthMask(flag: boolean): void;
+ depthRange(zNear: number, zFar: number): void;
+ detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ disable(cap: number): void;
+ disableVertexAttribArray(index: number): void;
+ drawArrays(mode: number, first: number, count: number): void;
+ drawElements(mode: number, count: number, type: number, offset: number): void;
+ enable(cap: number): void;
+ enableVertexAttribArray(index: number): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
+ frontFace(mode: number): void;
+ generateMipmap(target: number): void;
+ getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram | null, name: string): number;
+ getBufferParameter(target: number, pname: number): any;
+ getContextAttributes(): WebGLContextAttributes;
+ getError(): number;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
+ getParameter(pname: number): any;
+ getProgramInfoLog(program: WebGLProgram | null): string | null;
+ getProgramParameter(program: WebGLProgram | null, pname: number): any;
+ getRenderbufferParameter(target: number, pname: number): any;
+ getShaderInfoLog(shader: WebGLShader | null): string | null;
+ getShaderParameter(shader: WebGLShader | null, pname: number): any;
+ getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader | null): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: number, pname: number): any;
+ getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
+ getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: number, pname: number): any;
+ getVertexAttribOffset(index: number, pname: number): number;
+ hint(target: number, mode: number): void;
+ isBuffer(buffer: WebGLBuffer | null): boolean;
+ isContextLost(): boolean;
+ isEnabled(cap: number): boolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
+ isProgram(program: WebGLProgram | null): boolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
+ isShader(shader: WebGLShader | null): boolean;
+ isTexture(texture: WebGLTexture | null): boolean;
+ lineWidth(width: number): void;
+ linkProgram(program: WebGLProgram | null): void;
+ pixelStorei(pname: number, param: number | boolean): void;
+ polygonOffset(factor: number, units: number): void;
+ readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
+ sampleCoverage(value: number, invert: boolean): void;
+ scissor(x: number, y: number, width: number, height: number): void;
+ shaderSource(shader: WebGLShader | null, source: string): void;
+ stencilFunc(func: number, ref: number, mask: number): void;
+ stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
+ stencilMask(mask: number): void;
+ stencilMaskSeparate(face: number, mask: number): void;
+ stencilOp(fail: number, zfail: number, zpass: number): void;
+ stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
+ texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ texParameterf(target: number, pname: number, param: number): void;
+ texParameteri(target: number, pname: number, param: number): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ uniform1f(location: WebGLUniformLocation | null, x: number): void;
+ uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform1i(location: WebGLUniformLocation | null, x: number): void;
+ uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram | null): void;
+ vertexAttrib1f(indx: number, x: number): void;
+ vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib2f(indx: number, x: number, y: number): void;
+ vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
+ vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
+ vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
+ viewport(x: number, y: number, width: number, height: number): void;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+}
+
+interface WebGLShaderPrecisionFormat {
+ readonly precision: number;
+ readonly rangeMax: number;
+ readonly rangeMin: number;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+}
+
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+}
+
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+}
+
+interface WebKitCSSMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ inverse(): WebKitCSSMatrix;
+ multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
+ rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
+ rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
+ scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
+ setMatrixValue(value: string): void;
+ skewX(angle: number): WebKitCSSMatrix;
+ skewY(angle: number): WebKitCSSMatrix;
+ toString(): string;
+ translate(x: number, y: number, z?: number): WebKitCSSMatrix;
+}
+
+declare var WebKitCSSMatrix: {
+ prototype: WebKitCSSMatrix;
+ new(text?: string): WebKitCSSMatrix;
+}
+
+interface WebKitDirectoryEntry extends WebKitEntry {
+ createReader(): WebKitDirectoryReader;
+}
+
+declare var WebKitDirectoryEntry: {
+ prototype: WebKitDirectoryEntry;
+ new(): WebKitDirectoryEntry;
+}
+
+interface WebKitDirectoryReader {
+ readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitDirectoryReader: {
+ prototype: WebKitDirectoryReader;
+ new(): WebKitDirectoryReader;
+}
+
+interface WebKitEntry {
+ readonly filesystem: WebKitFileSystem;
+ readonly fullPath: string;
+ readonly isDirectory: boolean;
+ readonly isFile: boolean;
+ readonly name: string;
+}
+
+declare var WebKitEntry: {
+ prototype: WebKitEntry;
+ new(): WebKitEntry;
+}
+
+interface WebKitFileEntry extends WebKitEntry {
+ file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitFileEntry: {
+ prototype: WebKitFileEntry;
+ new(): WebKitFileEntry;
+}
+
+interface WebKitFileSystem {
+ readonly name: string;
+ readonly root: WebKitDirectoryEntry;
+}
+
+declare var WebKitFileSystem: {
+ prototype: WebKitFileSystem;
+ new(): WebKitFileSystem;
+}
+
+interface WebKitPoint {
+ x: number;
+ y: number;
+}
+
+declare var WebKitPoint: {
+ prototype: WebKitPoint;
+ new(x?: number, y?: number): WebKitPoint;
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: string;
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ onclose: (this: WebSocket, ev: CloseEvent) => any;
+ onerror: (this: WebSocket, ev: Event) => any;
+ onmessage: (this: WebSocket, ev: MessageEvent) => any;
+ onopen: (this: WebSocket, ev: Event) => any;
+ readonly protocol: string;
+ readonly readyState: number;
+ readonly url: string;
+ close(code?: number, reason?: string): void;
+ send(data: any): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+}
+
+interface WheelEvent extends MouseEvent {
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly wheelDelta: number;
+ readonly wheelDeltaX: number;
+ readonly wheelDeltaY: number;
+ getCurrentPoint(element: Element): void;
+ initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+interface WindowEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "compassneedscalibration": Event;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "devicelight": DeviceLightEvent;
+ "devicemotion": DeviceMotionEvent;
+ "deviceorientation": DeviceOrientationEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "message": MessageEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "popstate": PopStateEvent;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": ProgressEvent;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "stalled": Event;
+ "storage": StorageEvent;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "unload": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch {
+ readonly applicationCache: ApplicationCache;
+ readonly caches: CacheStorage;
+ readonly clientInformation: Navigator;
+ readonly closed: boolean;
+ readonly crypto: Crypto;
+ defaultStatus: string;
+ readonly devicePixelRatio: number;
+ readonly doNotTrack: string;
+ readonly document: Document;
+ event: Event | undefined;
+ readonly external: External;
+ readonly frameElement: Element;
+ readonly frames: Window;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly isSecureContext: boolean;
+ readonly length: number;
+ readonly location: Location;
+ readonly locationbar: BarProp;
+ readonly menubar: BarProp;
+ readonly msContentScript: ExtensionScriptApis;
+ readonly msCredentials: MSCredentials;
+ name: string;
+ readonly navigator: Navigator;
+ offscreenBuffering: string | boolean;
+ onabort: (this: Window, ev: UIEvent) => any;
+ onafterprint: (this: Window, ev: Event) => any;
+ onbeforeprint: (this: Window, ev: Event) => any;
+ onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+ onblur: (this: Window, ev: FocusEvent) => any;
+ oncanplay: (this: Window, ev: Event) => any;
+ oncanplaythrough: (this: Window, ev: Event) => any;
+ onchange: (this: Window, ev: Event) => any;
+ onclick: (this: Window, ev: MouseEvent) => any;
+ oncompassneedscalibration: (this: Window, ev: Event) => any;
+ oncontextmenu: (this: Window, ev: PointerEvent) => any;
+ ondblclick: (this: Window, ev: MouseEvent) => any;
+ ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+ ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+ ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+ ondrag: (this: Window, ev: DragEvent) => any;
+ ondragend: (this: Window, ev: DragEvent) => any;
+ ondragenter: (this: Window, ev: DragEvent) => any;
+ ondragleave: (this: Window, ev: DragEvent) => any;
+ ondragover: (this: Window, ev: DragEvent) => any;
+ ondragstart: (this: Window, ev: DragEvent) => any;
+ ondrop: (this: Window, ev: DragEvent) => any;
+ ondurationchange: (this: Window, ev: Event) => any;
+ onemptied: (this: Window, ev: Event) => any;
+ onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+ onerror: ErrorEventHandler;
+ onfocus: (this: Window, ev: FocusEvent) => any;
+ onhashchange: (this: Window, ev: HashChangeEvent) => any;
+ oninput: (this: Window, ev: Event) => any;
+ oninvalid: (this: Window, ev: Event) => any;
+ onkeydown: (this: Window, ev: KeyboardEvent) => any;
+ onkeypress: (this: Window, ev: KeyboardEvent) => any;
+ onkeyup: (this: Window, ev: KeyboardEvent) => any;
+ onload: (this: Window, ev: Event) => any;
+ onloadeddata: (this: Window, ev: Event) => any;
+ onloadedmetadata: (this: Window, ev: Event) => any;
+ onloadstart: (this: Window, ev: Event) => any;
+ onmessage: (this: Window, ev: MessageEvent) => any;
+ onmousedown: (this: Window, ev: MouseEvent) => any;
+ onmouseenter: (this: Window, ev: MouseEvent) => any;
+ onmouseleave: (this: Window, ev: MouseEvent) => any;
+ onmousemove: (this: Window, ev: MouseEvent) => any;
+ onmouseout: (this: Window, ev: MouseEvent) => any;
+ onmouseover: (this: Window, ev: MouseEvent) => any;
+ onmouseup: (this: Window, ev: MouseEvent) => any;
+ onmousewheel: (this: Window, ev: WheelEvent) => any;
+ onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+ onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+ onoffline: (this: Window, ev: Event) => any;
+ ononline: (this: Window, ev: Event) => any;
+ onorientationchange: (this: Window, ev: Event) => any;
+ onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+ onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+ onpause: (this: Window, ev: Event) => any;
+ onplay: (this: Window, ev: Event) => any;
+ onplaying: (this: Window, ev: Event) => any;
+ onpopstate: (this: Window, ev: PopStateEvent) => any;
+ onprogress: (this: Window, ev: ProgressEvent) => any;
+ onratechange: (this: Window, ev: Event) => any;
+ onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+ onreset: (this: Window, ev: Event) => any;
+ onresize: (this: Window, ev: UIEvent) => any;
+ onscroll: (this: Window, ev: UIEvent) => any;
+ onseeked: (this: Window, ev: Event) => any;
+ onseeking: (this: Window, ev: Event) => any;
+ onselect: (this: Window, ev: UIEvent) => any;
+ onstalled: (this: Window, ev: Event) => any;
+ onstorage: (this: Window, ev: StorageEvent) => any;
+ onsubmit: (this: Window, ev: Event) => any;
+ onsuspend: (this: Window, ev: Event) => any;
+ ontimeupdate: (this: Window, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onunload: (this: Window, ev: Event) => any;
+ onvolumechange: (this: Window, ev: Event) => any;
+ onwaiting: (this: Window, ev: Event) => any;
+ opener: any;
+ orientation: string | number;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ readonly pageXOffset: number;
+ readonly pageYOffset: number;
+ readonly parent: Window;
+ readonly performance: Performance;
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ readonly scrollbars: BarProp;
+ readonly self: Window;
+ readonly speechSynthesis: SpeechSynthesis;
+ status: string;
+ readonly statusbar: BarProp;
+ readonly styleMedia: StyleMedia;
+ readonly toolbar: BarProp;
+ readonly top: Window;
+ readonly window: Window;
+ URL: typeof URL;
+ URLSearchParams: typeof URLSearchParams;
+ Blob: typeof Blob;
+ customElements: CustomElementRegistry;
+ alert(message?: any): void;
+ blur(): void;
+ cancelAnimationFrame(handle: number): void;
+ captureEvents(): void;
+ close(): void;
+ confirm(message?: string): boolean;
+ departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+ getSelection(): Selection;
+ matchMedia(mediaQuery: string): MediaQueryList;
+ moveBy(x?: number, y?: number): void;
+ moveTo(x?: number, y?: number): void;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+ postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string | null;
+ releaseEvents(): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+ resizeBy(x?: number, y?: number): void;
+ resizeTo(x?: number, y?: number): void;
+ scroll(x?: number, y?: number): void;
+ scrollBy(x?: number, y?: number): void;
+ scrollTo(x?: number, y?: number): void;
+ stop(): void;
+ webkitCancelAnimationFrame(handle: number): void;
+ webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ scroll(options?: ScrollToOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollBy(options?: ScrollToOptions): void;
+ addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+}
+
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: (this: Worker, ev: MessageEvent) => any;
+ postMessage(message: any, transfer?: any[]): void;
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string): Worker;
+}
+
+interface XMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+}
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
+ onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
+ readonly readyState: number;
+ readonly response: any;
+ readonly responseText: string;
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly responseXML: Document | null;
+ readonly status: number;
+ readonly statusText: string;
+ timeout: number;
+ readonly upload: XMLHttpRequestUpload;
+ withCredentials: boolean;
+ msCaching?: string;
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(header: string): string | null;
+ msCachingEnabled(): boolean;
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
+ overrideMimeType(mime: string): void;
+ send(data?: Document): void;
+ send(data?: string): void;
+ send(data?: any): void;
+ setRequestHeader(header: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+}
+
+interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+}
+
+interface XMLSerializer {
+ serializeToString(target: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+}
+
+interface XPathEvaluator {
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver?: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+}
+
+interface XPathExpression {
+ evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+}
+
+interface XPathNSResolver {
+ lookupNamespaceURI(prefix: string): string;
+}
+
+declare var XPathNSResolver: {
+ prototype: XPathNSResolver;
+ new(): XPathNSResolver;
+}
+
+interface XPathResult {
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
+ iterateNext(): Node;
+ snapshotItem(index: number): Node;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, document: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+}
+
+interface webkitRTCPeerConnection extends RTCPeerConnection {
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var webkitRTCPeerConnection: {
+ prototype: webkitRTCPeerConnection;
+ new(configuration: RTCConfiguration): webkitRTCPeerConnection;
+}
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface Body {
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+ formData(): Promise<FormData>;
+}
+
+interface CanvasPathMethods {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface ChildNode {
+ remove(): void;
+}
+
+interface DOML2DeprecatedColorProperty {
+ color: string;
+}
+
+interface DOML2DeprecatedSizeProperty {
+ size: number;
+}
+
+interface DocumentEvent {
+ createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface:"CloseEvent"): CloseEvent;
+ createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface:"CustomEvent"): CustomEvent;
+ createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
+ createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface:"DragEvent"): DragEvent;
+ createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface:"Event"): Event;
+ createEvent(eventInterface:"Events"): Event;
+ createEvent(eventInterface:"FocusEvent"): FocusEvent;
+ createEvent(eventInterface:"FocusNavigationEvent"): FocusNavigationEvent;
+ createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
+ createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
+ createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
+ createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
+ createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface:"MediaStreamEvent"): MediaStreamEvent;
+ createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface:"MessageEvent"): MessageEvent;
+ createEvent(eventInterface:"MouseEvent"): MouseEvent;
+ createEvent(eventInterface:"MouseEvents"): MouseEvent;
+ createEvent(eventInterface:"MutationEvent"): MutationEvent;
+ createEvent(eventInterface:"MutationEvents"): MutationEvent;
+ createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
+ createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
+ createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
+ createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
+ createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface:"PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface:"PointerEvent"): PointerEvent;
+ createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
+ createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
+ createEvent(eventInterface:"ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
+ createEvent(eventInterface:"SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface:"StorageEvent"): StorageEvent;
+ createEvent(eventInterface:"TextEvent"): TextEvent;
+ createEvent(eventInterface:"TouchEvent"): TouchEvent;
+ createEvent(eventInterface:"TrackEvent"): TrackEvent;
+ createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface:"UIEvent"): UIEvent;
+ createEvent(eventInterface:"UIEvents"): UIEvent;
+ createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
+ createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface:"WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+}
+
+interface ElementTraversal {
+ readonly childElementCount: number;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly nextElementSibling: Element | null;
+ readonly previousElementSibling: Element | null;
+}
+
+interface GetSVGDocument {
+ getSVGDocument(): Document;
+}
+
+interface GlobalEventHandlersEventMap {
+ "pointercancel": PointerEvent;
+ "pointerdown": PointerEvent;
+ "pointerenter": PointerEvent;
+ "pointerleave": PointerEvent;
+ "pointermove": PointerEvent;
+ "pointerout": PointerEvent;
+ "pointerover": PointerEvent;
+ "pointerup": PointerEvent;
+ "wheel": WheelEvent;
+}
+
+interface GlobalEventHandlers {
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
+ addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface GlobalFetch {
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+}
+
+interface HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
+ */
+ ch: string;
+ /**
+ * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
+ */
+ chOff: string;
+ /**
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
+ vAlign: string;
+}
+
+interface IDBEnvironment {
+ readonly indexedDB: IDBFactory;
+}
+
+interface LinkStyle {
+ readonly sheet: StyleSheet;
+}
+
+interface MSBaseReaderEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+}
+
+interface MSBaseReader {
+ onabort: (this: MSBaseReader, ev: Event) => any;
+ onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
+ onload: (this: MSBaseReader, ev: Event) => any;
+ onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
+ onloadstart: (this: MSBaseReader, ev: Event) => any;
+ onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
+ abort(): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface MSFileSaver {
+ msSaveBlob(blob: any, defaultName?: string): boolean;
+ msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
+}
+
+interface MSNavigatorDoNotTrack {
+ confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
+ confirmWebWideTrackingException(args: ExceptionInformation): boolean;
+ removeSiteSpecificTrackingException(args: ExceptionInformation): void;
+ removeWebWideTrackingException(args: ExceptionInformation): void;
+ storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
+ storeWebWideTrackingException(args: StoreExceptionsInformation): void;
+}
+
+interface NavigatorBeacon {
+ sendBeacon(url: USVString, data?: BodyInit): boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorContentUtils {
+}
+
+interface NavigatorGeolocation {
+ readonly geolocation: Geolocation;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorStorageUtils {
+}
+
+interface NavigatorUserMedia {
+ readonly mediaDevices: MediaDevices;
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
+}
+
+interface NodeSelector {
+ querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
+ querySelectorAll(selectors: string): NodeListOf<Element>;
+}
+
+interface RandomSource {
+ getRandomValues(array: ArrayBufferView): ArrayBufferView;
+}
+
+interface SVGAnimatedPoints {
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
+}
+
+interface SVGFilterPrimitiveStandardAttributes {
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
+}
+
+interface SVGTests {
+ readonly requiredExtensions: SVGStringList;
+ readonly requiredFeatures: SVGStringList;
+ readonly systemLanguage: SVGStringList;
+ hasExtension(extension: string): boolean;
+}
+
+interface SVGURIReference {
+ readonly href: SVGAnimatedString;
+}
+
+interface WindowBase64 {
+ atob(encodedString: string): string;
+ btoa(rawString: string): string;
+}
+
+interface WindowConsole {
+ readonly console: Console;
+}
+
+interface WindowLocalStorage {
+ readonly localStorage: Storage;
+}
+
+interface WindowSessionStorage {
+ readonly sessionStorage: Storage;
+}
+
+interface WindowTimers extends Object, WindowTimersExtension {
+ clearInterval(handle: number): void;
+ clearTimeout(handle: number): void;
+ setInterval(handler: (...args: any[]) => void, timeout: number): number;
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+}
+
+interface WindowTimersExtension {
+ clearImmediate(handle: number): void;
+ setImmediate(handler: (...args: any[]) => void): number;
+ setImmediate(handler: any, ...args: any[]): number;
+}
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+ "timeout": ProgressEvent;
+}
+
+interface XMLHttpRequestEventTarget {
+ onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
+ onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface ErrorEventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ conlno?: number;
+ error?: any;
+}
+
+interface StorageEventInit extends EventInit {
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ url: string;
+ storageArea?: Storage;
+}
+
+interface Canvas2DContextAttributes {
+ alpha?: boolean;
+ willReadFrequently?: boolean;
+ storage?: boolean;
+ [attribute: string]: boolean | string | undefined;
+}
+
+interface ImageBitmapOptions {
+ imageOrientation?: "none" | "flipY";
+ premultiplyAlpha?: "none" | "premultiply" | "default";
+ colorSpaceConversion?: "none" | "default";
+ resizeWidth?: number;
+ resizeHeight?: number;
+ resizeQuality?: "pixelated" | "low" | "medium" | "high";
+}
+
+interface ImageBitmap {
+ readonly width: number;
+ readonly height: number;
+ close(): void;
+}
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ /**
+ * Constructor returning a URLSearchParams object.
+ */
+ new (init?: string | URLSearchParams): URLSearchParams;
+}
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ length: number;
+ item(index: number): TNode;
+ [index: number]: TNode;
+}
+
+interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
+ item(index: number): T;
+ namedItem(name: string): T;
+ [index: number]: T;
+}
+
+interface BlobPropertyBag {
+ type?: string;
+ endings?: string;
+}
+
+interface FilePropertyBag {
+ type?: string;
+ lastModified?: number;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
+}
+
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ClipboardEventInit extends EventInit {
+ data?: string;
+ dataType?: string;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaHashedImportParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaPssParams {
+ saltLength: number;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: string;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ typedCurve: string;
+}
+
+interface EcKeyImportParams {
+ namedCurve: string;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ iv: BufferSource;
+ additionalData?: BufferSource;
+ tagLength?: number;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: AlgorithmIdentifier;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhImportKeyParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface ConcatParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ algorithmId: Uint8Array;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ publicInfo?: Uint8Array;
+ privateInfo?: Uint8Array;
+}
+
+interface HkdfCtrParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ label: BufferSource;
+ context: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ salt: BufferSource;
+ iterations: number;
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaOtherPrimesInfo {
+ r: string;
+ d: string;
+ t: string;
+}
+
+interface JsonWebKey {
+ kty: string;
+ use?: string;
+ key_ops?: string[];
+ alg?: string;
+ kid?: string;
+ x5u?: string;
+ x5c?: string;
+ x5t?: string;
+ ext?: boolean;
+ crv?: string;
+ x?: string;
+ y?: string;
+ d?: string;
+ n?: string;
+ e?: string;
+ p?: string;
+ q?: string;
+ dp?: string;
+ dq?: string;
+ qi?: string;
+ oth?: RsaOtherPrimesInfo[];
+ k?: string;
+}
+
+interface ParentNode {
+ readonly children: HTMLCollection;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly childElementCount: number;
+}
+
+interface DocumentOrShadowRoot {
+ readonly activeElement: Element | null;
+ readonly stylesheets: StyleSheetList;
+ getSelection(): Selection | null;
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+}
+
+interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
+ readonly host: Element;
+ innerHTML: string;
+}
+
+interface ShadowRootInit {
+ mode: 'open'|'closed';
+ delegatesFocus?: boolean;
+}
+
+interface HTMLSlotElement extends HTMLElement {
+ name: string;
+ assignedNodes(options?: AssignedNodesOptions): Node[];
+}
+
+interface AssignedNodesOptions {
+ flatten?: boolean;
+}
+
+interface ElementDefinitionOptions {
+ extends: string;
+}
+
+interface CustomElementRegistry {
+ define(name: string, constructor: Function, options?: ElementDefinitionOptions): void;
+ get(name: string): any;
+ whenDefined(name: string): PromiseLike<void>;
+}
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: PromiseLike<any>;
+ readonly reason: any;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: PromiseLike<any>;
+ reason?: any;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ passive?: boolean;
+ once?: boolean;
+}
+
+interface TouchEventInit extends EventModifierInit {
+ touches?: Touch[];
+ targetTouches?: Touch[];
+ changedTouches?: Touch[];
+}
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
+interface MediaQueryListListener {
+ (mql: MediaQueryList): void;
+}
+interface MSLaunchUriCallback {
+ (): void;
+}
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface MSUnsafeFunctionCallback {
+ (): any;
+}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface VoidFunction {
+ (): void;
+}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): void;
+}
+interface RTCPeerConnectionErrorCallback {
+ (error: DOMError): void;
+}
+interface RTCStatsCallback {
+ (report: RTCStatsReport): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
+}
+interface NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
+}
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
+}
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
+}
+interface HTMLElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "audio": HTMLAudioElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "del": HTMLModElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "embed": HTMLEmbedElement;
+ "fieldset": HTMLFieldSetElement;
+ "font": HTMLFontElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "iframe": HTMLIFrameElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "marquee": HTMLMarqueeElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "meter": HTMLMeterElement;
+ "nextid": HTMLUnknownElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "picture": HTMLPictureElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "script": HTMLScriptElement;
+ "select": HTMLSelectElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "style": HTMLStyleElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "ul": HTMLUListElement;
+ "video": HTMLVideoElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "abbr": HTMLElement;
+ "acronym": HTMLElement;
+ "address": HTMLElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "article": HTMLElement;
+ "aside": HTMLElement;
+ "audio": HTMLAudioElement;
+ "b": HTMLElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "bdo": HTMLElement;
+ "big": HTMLElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "center": HTMLElement;
+ "circle": SVGCircleElement;
+ "cite": HTMLElement;
+ "clippath": SVGClipPathElement;
+ "code": HTMLElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "dd": HTMLElement;
+ "defs": SVGDefsElement;
+ "del": HTMLModElement;
+ "desc": SVGDescElement;
+ "dfn": HTMLElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "dt": HTMLElement;
+ "ellipse": SVGEllipseElement;
+ "em": HTMLElement;
+ "embed": HTMLEmbedElement;
+ "feblend": SVGFEBlendElement;
+ "fecolormatrix": SVGFEColorMatrixElement;
+ "fecomponenttransfer": SVGFEComponentTransferElement;
+ "fecomposite": SVGFECompositeElement;
+ "feconvolvematrix": SVGFEConvolveMatrixElement;
+ "fediffuselighting": SVGFEDiffuseLightingElement;
+ "fedisplacementmap": SVGFEDisplacementMapElement;
+ "fedistantlight": SVGFEDistantLightElement;
+ "feflood": SVGFEFloodElement;
+ "fefunca": SVGFEFuncAElement;
+ "fefuncb": SVGFEFuncBElement;
+ "fefuncg": SVGFEFuncGElement;
+ "fefuncr": SVGFEFuncRElement;
+ "fegaussianblur": SVGFEGaussianBlurElement;
+ "feimage": SVGFEImageElement;
+ "femerge": SVGFEMergeElement;
+ "femergenode": SVGFEMergeNodeElement;
+ "femorphology": SVGFEMorphologyElement;
+ "feoffset": SVGFEOffsetElement;
+ "fepointlight": SVGFEPointLightElement;
+ "fespecularlighting": SVGFESpecularLightingElement;
+ "fespotlight": SVGFESpotLightElement;
+ "fetile": SVGFETileElement;
+ "feturbulence": SVGFETurbulenceElement;
+ "fieldset": HTMLFieldSetElement;
+ "figcaption": HTMLElement;
+ "figure": HTMLElement;
+ "filter": SVGFilterElement;
+ "font": HTMLFontElement;
+ "footer": HTMLElement;
+ "foreignobject": SVGForeignObjectElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "g": SVGGElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "header": HTMLElement;
+ "hgroup": HTMLElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "i": HTMLElement;
+ "iframe": HTMLIFrameElement;
+ "image": SVGImageElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "kbd": HTMLElement;
+ "keygen": HTMLElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "line": SVGLineElement;
+ "lineargradient": SVGLinearGradientElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "mark": HTMLElement;
+ "marker": SVGMarkerElement;
+ "marquee": HTMLMarqueeElement;
+ "mask": SVGMaskElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "metadata": SVGMetadataElement;
+ "meter": HTMLMeterElement;
+ "nav": HTMLElement;
+ "nextid": HTMLUnknownElement;
+ "nobr": HTMLElement;
+ "noframes": HTMLElement;
+ "noscript": HTMLElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "path": SVGPathElement;
+ "pattern": SVGPatternElement;
+ "picture": HTMLPictureElement;
+ "plaintext": HTMLElement;
+ "polygon": SVGPolygonElement;
+ "polyline": SVGPolylineElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "radialgradient": SVGRadialGradientElement;
+ "rect": SVGRectElement;
+ "rt": HTMLElement;
+ "ruby": HTMLElement;
+ "s": HTMLElement;
+ "samp": HTMLElement;
+ "script": HTMLScriptElement;
+ "section": HTMLElement;
+ "select": HTMLSelectElement;
+ "small": HTMLElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "stop": SVGStopElement;
+ "strike": HTMLElement;
+ "strong": HTMLElement;
+ "style": HTMLStyleElement;
+ "sub": HTMLElement;
+ "sup": HTMLElement;
+ "svg": SVGSVGElement;
+ "switch": SVGSwitchElement;
+ "symbol": SVGSymbolElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "text": SVGTextElement;
+ "textpath": SVGTextPathElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "tspan": SVGTSpanElement;
+ "tt": HTMLElement;
+ "u": HTMLElement;
+ "ul": HTMLUListElement;
+ "use": SVGUseElement;
+ "var": HTMLElement;
+ "video": HTMLVideoElement;
+ "view": SVGViewElement;
+ "wbr": HTMLElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementListTagNameMap {
+ "a": NodeListOf<HTMLAnchorElement>;
+ "abbr": NodeListOf<HTMLElement>;
+ "acronym": NodeListOf<HTMLElement>;
+ "address": NodeListOf<HTMLElement>;
+ "applet": NodeListOf<HTMLAppletElement>;
+ "area": NodeListOf<HTMLAreaElement>;
+ "article": NodeListOf<HTMLElement>;
+ "aside": NodeListOf<HTMLElement>;
+ "audio": NodeListOf<HTMLAudioElement>;
+ "b": NodeListOf<HTMLElement>;
+ "base": NodeListOf<HTMLBaseElement>;
+ "basefont": NodeListOf<HTMLBaseFontElement>;
+ "bdo": NodeListOf<HTMLElement>;
+ "big": NodeListOf<HTMLElement>;
+ "blockquote": NodeListOf<HTMLQuoteElement>;
+ "body": NodeListOf<HTMLBodyElement>;
+ "br": NodeListOf<HTMLBRElement>;
+ "button": NodeListOf<HTMLButtonElement>;
+ "canvas": NodeListOf<HTMLCanvasElement>;
+ "caption": NodeListOf<HTMLTableCaptionElement>;
+ "center": NodeListOf<HTMLElement>;
+ "circle": NodeListOf<SVGCircleElement>;
+ "cite": NodeListOf<HTMLElement>;
+ "clippath": NodeListOf<SVGClipPathElement>;
+ "code": NodeListOf<HTMLElement>;
+ "col": NodeListOf<HTMLTableColElement>;
+ "colgroup": NodeListOf<HTMLTableColElement>;
+ "data": NodeListOf<HTMLDataElement>;
+ "datalist": NodeListOf<HTMLDataListElement>;
+ "dd": NodeListOf<HTMLElement>;
+ "defs": NodeListOf<SVGDefsElement>;
+ "del": NodeListOf<HTMLModElement>;
+ "desc": NodeListOf<SVGDescElement>;
+ "dfn": NodeListOf<HTMLElement>;
+ "dir": NodeListOf<HTMLDirectoryElement>;
+ "div": NodeListOf<HTMLDivElement>;
+ "dl": NodeListOf<HTMLDListElement>;
+ "dt": NodeListOf<HTMLElement>;
+ "ellipse": NodeListOf<SVGEllipseElement>;
+ "em": NodeListOf<HTMLElement>;
+ "embed": NodeListOf<HTMLEmbedElement>;
+ "feblend": NodeListOf<SVGFEBlendElement>;
+ "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
+ "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
+ "fecomposite": NodeListOf<SVGFECompositeElement>;
+ "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
+ "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
+ "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
+ "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
+ "feflood": NodeListOf<SVGFEFloodElement>;
+ "fefunca": NodeListOf<SVGFEFuncAElement>;
+ "fefuncb": NodeListOf<SVGFEFuncBElement>;
+ "fefuncg": NodeListOf<SVGFEFuncGElement>;
+ "fefuncr": NodeListOf<SVGFEFuncRElement>;
+ "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
+ "feimage": NodeListOf<SVGFEImageElement>;
+ "femerge": NodeListOf<SVGFEMergeElement>;
+ "femergenode": NodeListOf<SVGFEMergeNodeElement>;
+ "femorphology": NodeListOf<SVGFEMorphologyElement>;
+ "feoffset": NodeListOf<SVGFEOffsetElement>;
+ "fepointlight": NodeListOf<SVGFEPointLightElement>;
+ "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
+ "fespotlight": NodeListOf<SVGFESpotLightElement>;
+ "fetile": NodeListOf<SVGFETileElement>;
+ "feturbulence": NodeListOf<SVGFETurbulenceElement>;
+ "fieldset": NodeListOf<HTMLFieldSetElement>;
+ "figcaption": NodeListOf<HTMLElement>;
+ "figure": NodeListOf<HTMLElement>;
+ "filter": NodeListOf<SVGFilterElement>;
+ "font": NodeListOf<HTMLFontElement>;
+ "footer": NodeListOf<HTMLElement>;
+ "foreignobject": NodeListOf<SVGForeignObjectElement>;
+ "form": NodeListOf<HTMLFormElement>;
+ "frame": NodeListOf<HTMLFrameElement>;
+ "frameset": NodeListOf<HTMLFrameSetElement>;
+ "g": NodeListOf<SVGGElement>;
+ "h1": NodeListOf<HTMLHeadingElement>;
+ "h2": NodeListOf<HTMLHeadingElement>;
+ "h3": NodeListOf<HTMLHeadingElement>;
+ "h4": NodeListOf<HTMLHeadingElement>;
+ "h5": NodeListOf<HTMLHeadingElement>;
+ "h6": NodeListOf<HTMLHeadingElement>;
+ "head": NodeListOf<HTMLHeadElement>;
+ "header": NodeListOf<HTMLElement>;
+ "hgroup": NodeListOf<HTMLElement>;
+ "hr": NodeListOf<HTMLHRElement>;
+ "html": NodeListOf<HTMLHtmlElement>;
+ "i": NodeListOf<HTMLElement>;
+ "iframe": NodeListOf<HTMLIFrameElement>;
+ "image": NodeListOf<SVGImageElement>;
+ "img": NodeListOf<HTMLImageElement>;
+ "input": NodeListOf<HTMLInputElement>;
+ "ins": NodeListOf<HTMLModElement>;
+ "isindex": NodeListOf<HTMLUnknownElement>;
+ "kbd": NodeListOf<HTMLElement>;
+ "keygen": NodeListOf<HTMLElement>;
+ "label": NodeListOf<HTMLLabelElement>;
+ "legend": NodeListOf<HTMLLegendElement>;
+ "li": NodeListOf<HTMLLIElement>;
+ "line": NodeListOf<SVGLineElement>;
+ "lineargradient": NodeListOf<SVGLinearGradientElement>;
+ "link": NodeListOf<HTMLLinkElement>;
+ "listing": NodeListOf<HTMLPreElement>;
+ "map": NodeListOf<HTMLMapElement>;
+ "mark": NodeListOf<HTMLElement>;
+ "marker": NodeListOf<SVGMarkerElement>;
+ "marquee": NodeListOf<HTMLMarqueeElement>;
+ "mask": NodeListOf<SVGMaskElement>;
+ "menu": NodeListOf<HTMLMenuElement>;
+ "meta": NodeListOf<HTMLMetaElement>;
+ "metadata": NodeListOf<SVGMetadataElement>;
+ "meter": NodeListOf<HTMLMeterElement>;
+ "nav": NodeListOf<HTMLElement>;
+ "nextid": NodeListOf<HTMLUnknownElement>;
+ "nobr": NodeListOf<HTMLElement>;
+ "noframes": NodeListOf<HTMLElement>;
+ "noscript": NodeListOf<HTMLElement>;
+ "object": NodeListOf<HTMLObjectElement>;
+ "ol": NodeListOf<HTMLOListElement>;
+ "optgroup": NodeListOf<HTMLOptGroupElement>;
+ "option": NodeListOf<HTMLOptionElement>;
+ "output": NodeListOf<HTMLOutputElement>;
+ "p": NodeListOf<HTMLParagraphElement>;
+ "param": NodeListOf<HTMLParamElement>;
+ "path": NodeListOf<SVGPathElement>;
+ "pattern": NodeListOf<SVGPatternElement>;
+ "picture": NodeListOf<HTMLPictureElement>;
+ "plaintext": NodeListOf<HTMLElement>;
+ "polygon": NodeListOf<SVGPolygonElement>;
+ "polyline": NodeListOf<SVGPolylineElement>;
+ "pre": NodeListOf<HTMLPreElement>;
+ "progress": NodeListOf<HTMLProgressElement>;
+ "q": NodeListOf<HTMLQuoteElement>;
+ "radialgradient": NodeListOf<SVGRadialGradientElement>;
+ "rect": NodeListOf<SVGRectElement>;
+ "rt": NodeListOf<HTMLElement>;
+ "ruby": NodeListOf<HTMLElement>;
+ "s": NodeListOf<HTMLElement>;
+ "samp": NodeListOf<HTMLElement>;
+ "script": NodeListOf<HTMLScriptElement>;
+ "section": NodeListOf<HTMLElement>;
+ "select": NodeListOf<HTMLSelectElement>;
+ "small": NodeListOf<HTMLElement>;
+ "source": NodeListOf<HTMLSourceElement>;
+ "span": NodeListOf<HTMLSpanElement>;
+ "stop": NodeListOf<SVGStopElement>;
+ "strike": NodeListOf<HTMLElement>;
+ "strong": NodeListOf<HTMLElement>;
+ "style": NodeListOf<HTMLStyleElement>;
+ "sub": NodeListOf<HTMLElement>;
+ "sup": NodeListOf<HTMLElement>;
+ "svg": NodeListOf<SVGSVGElement>;
+ "switch": NodeListOf<SVGSwitchElement>;
+ "symbol": NodeListOf<SVGSymbolElement>;
+ "table": NodeListOf<HTMLTableElement>;
+ "tbody": NodeListOf<HTMLTableSectionElement>;
+ "td": NodeListOf<HTMLTableDataCellElement>;
+ "template": NodeListOf<HTMLTemplateElement>;
+ "text": NodeListOf<SVGTextElement>;
+ "textpath": NodeListOf<SVGTextPathElement>;
+ "textarea": NodeListOf<HTMLTextAreaElement>;
+ "tfoot": NodeListOf<HTMLTableSectionElement>;
+ "th": NodeListOf<HTMLTableHeaderCellElement>;
+ "thead": NodeListOf<HTMLTableSectionElement>;
+ "time": NodeListOf<HTMLTimeElement>;
+ "title": NodeListOf<HTMLTitleElement>;
+ "tr": NodeListOf<HTMLTableRowElement>;
+ "track": NodeListOf<HTMLTrackElement>;
+ "tspan": NodeListOf<SVGTSpanElement>;
+ "tt": NodeListOf<HTMLElement>;
+ "u": NodeListOf<HTMLElement>;
+ "ul": NodeListOf<HTMLUListElement>;
+ "use": NodeListOf<SVGUseElement>;
+ "var": NodeListOf<HTMLElement>;
+ "video": NodeListOf<HTMLVideoElement>;
+ "view": NodeListOf<SVGViewElement>;
+ "wbr": NodeListOf<HTMLElement>;
+ "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
+ "xmp": NodeListOf<HTMLPreElement>;
+}
+
+declare var Audio: {new(src?: string): HTMLAudioElement; };
+declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
+declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
+declare var applicationCache: ApplicationCache;
+declare var caches: CacheStorage;
+declare var clientInformation: Navigator;
+declare var closed: boolean;
+declare var crypto: Crypto;
+declare var defaultStatus: string;
+declare var devicePixelRatio: number;
+declare var doNotTrack: string;
+declare var document: Document;
+declare var event: Event | undefined;
+declare var external: External;
+declare var frameElement: Element;
+declare var frames: Window;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var isSecureContext: boolean;
+declare var length: number;
+declare var location: Location;
+declare var locationbar: BarProp;
+declare var menubar: BarProp;
+declare var msContentScript: ExtensionScriptApis;
+declare var msCredentials: MSCredentials;
+declare const name: never;
+declare var navigator: Navigator;
+declare var offscreenBuffering: string | boolean;
+declare var onabort: (this: Window, ev: UIEvent) => any;
+declare var onafterprint: (this: Window, ev: Event) => any;
+declare var onbeforeprint: (this: Window, ev: Event) => any;
+declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+declare var onblur: (this: Window, ev: FocusEvent) => any;
+declare var oncanplay: (this: Window, ev: Event) => any;
+declare var oncanplaythrough: (this: Window, ev: Event) => any;
+declare var onchange: (this: Window, ev: Event) => any;
+declare var onclick: (this: Window, ev: MouseEvent) => any;
+declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
+declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
+declare var ondblclick: (this: Window, ev: MouseEvent) => any;
+declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+declare var ondrag: (this: Window, ev: DragEvent) => any;
+declare var ondragend: (this: Window, ev: DragEvent) => any;
+declare var ondragenter: (this: Window, ev: DragEvent) => any;
+declare var ondragleave: (this: Window, ev: DragEvent) => any;
+declare var ondragover: (this: Window, ev: DragEvent) => any;
+declare var ondragstart: (this: Window, ev: DragEvent) => any;
+declare var ondrop: (this: Window, ev: DragEvent) => any;
+declare var ondurationchange: (this: Window, ev: Event) => any;
+declare var onemptied: (this: Window, ev: Event) => any;
+declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+declare var onerror: ErrorEventHandler;
+declare var onfocus: (this: Window, ev: FocusEvent) => any;
+declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
+declare var oninput: (this: Window, ev: Event) => any;
+declare var oninvalid: (this: Window, ev: Event) => any;
+declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
+declare var onload: (this: Window, ev: Event) => any;
+declare var onloadeddata: (this: Window, ev: Event) => any;
+declare var onloadedmetadata: (this: Window, ev: Event) => any;
+declare var onloadstart: (this: Window, ev: Event) => any;
+declare var onmessage: (this: Window, ev: MessageEvent) => any;
+declare var onmousedown: (this: Window, ev: MouseEvent) => any;
+declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
+declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
+declare var onmousemove: (this: Window, ev: MouseEvent) => any;
+declare var onmouseout: (this: Window, ev: MouseEvent) => any;
+declare var onmouseover: (this: Window, ev: MouseEvent) => any;
+declare var onmouseup: (this: Window, ev: MouseEvent) => any;
+declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
+declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+declare var onoffline: (this: Window, ev: Event) => any;
+declare var ononline: (this: Window, ev: Event) => any;
+declare var onorientationchange: (this: Window, ev: Event) => any;
+declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpause: (this: Window, ev: Event) => any;
+declare var onplay: (this: Window, ev: Event) => any;
+declare var onplaying: (this: Window, ev: Event) => any;
+declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
+declare var onprogress: (this: Window, ev: ProgressEvent) => any;
+declare var onratechange: (this: Window, ev: Event) => any;
+declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+declare var onreset: (this: Window, ev: Event) => any;
+declare var onresize: (this: Window, ev: UIEvent) => any;
+declare var onscroll: (this: Window, ev: UIEvent) => any;
+declare var onseeked: (this: Window, ev: Event) => any;
+declare var onseeking: (this: Window, ev: Event) => any;
+declare var onselect: (this: Window, ev: UIEvent) => any;
+declare var onstalled: (this: Window, ev: Event) => any;
+declare var onstorage: (this: Window, ev: StorageEvent) => any;
+declare var onsubmit: (this: Window, ev: Event) => any;
+declare var onsuspend: (this: Window, ev: Event) => any;
+declare var ontimeupdate: (this: Window, ev: Event) => any;
+declare var ontouchcancel: (ev: TouchEvent) => any;
+declare var ontouchend: (ev: TouchEvent) => any;
+declare var ontouchmove: (ev: TouchEvent) => any;
+declare var ontouchstart: (ev: TouchEvent) => any;
+declare var onunload: (this: Window, ev: Event) => any;
+declare var onvolumechange: (this: Window, ev: Event) => any;
+declare var onwaiting: (this: Window, ev: Event) => any;
+declare var opener: any;
+declare var orientation: string | number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+declare var pageXOffset: number;
+declare var pageYOffset: number;
+declare var parent: Window;
+declare var performance: Performance;
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+declare var scrollbars: BarProp;
+declare var self: Window;
+declare var speechSynthesis: SpeechSynthesis;
+declare var status: string;
+declare var statusbar: BarProp;
+declare var styleMedia: StyleMedia;
+declare var toolbar: BarProp;
+declare var top: Window;
+declare var window: Window;
+declare var customElements: CustomElementRegistry;
+declare function alert(message?: any): void;
+declare function blur(): void;
+declare function cancelAnimationFrame(handle: number): void;
+declare function captureEvents(): void;
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+declare function departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+declare function getSelection(): Selection;
+declare function matchMedia(mediaQuery: string): MediaQueryList;
+declare function moveBy(x?: number, y?: number): void;
+declare function moveTo(x?: number, y?: number): void;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string | null;
+declare function releaseEvents(): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function resizeBy(x?: number, y?: number): void;
+declare function resizeTo(x?: number, y?: number): void;
+declare function scroll(x?: number, y?: number): void;
+declare function scrollBy(x?: number, y?: number): void;
+declare function scrollTo(x?: number, y?: number): void;
+declare function stop(): void;
+declare function webkitCancelAnimationFrame(handle: number): void;
+declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollBy(options?: ScrollToOptions): void;
+declare function toString(): string;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+declare function clearInterval(handle: number): void;
+declare function clearTimeout(handle: number): void;
+declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
+declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+declare function clearImmediate(handle: number): void;
+declare function setImmediate(handler: (...args: any[]) => void): number;
+declare function setImmediate(handler: any, ...args: any[]): number;
+declare var sessionStorage: Storage;
+declare var localStorage: Storage;
+declare var console: Console;
+declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
+declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
+declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
+declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
+declare var onpointermove: (this: Window, ev: PointerEvent) => any;
+declare var onpointerout: (this: Window, ev: PointerEvent) => any;
+declare var onpointerover: (this: Window, ev: PointerEvent) => any;
+declare var onpointerup: (this: Window, ev: PointerEvent) => any;
+declare var onwheel: (this: Window, ev: WheelEvent) => any;
+declare var indexedDB: IDBFactory;
+declare function atob(encodedString: string): string;
+declare function btoa(rawString: string): string;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+type AAGUID = string;
+type AlgorithmIdentifier = string | Algorithm;
+type BodyInit = any;
+type ByteString = string;
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainLong = number | ConstrainLongRange;
+type CryptoOperationData = ArrayBufferView;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLbyte = number;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLintptr = number;
+type GLshort = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLubyte = number;
+type GLuint = number;
+type GLushort = number;
+type HeadersInit = any;
+type IDBKeyPath = string;
+type KeyFormat = string;
+type KeyType = string;
+type KeyUsage = string;
+type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
+type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
+type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
+type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
+type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
+type RequestInfo = Request | string;
+type USVString = string;
+type payloadtype = number;
+type ScrollBehavior = "auto" | "instant" | "smooth";
+type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
+type IDBValidKey = number | string | Date | IDBArrayKey;
+type BufferSource = ArrayBuffer | ArrayBufferView;
+type MouseWheelEvent = WheelEvent;
+type ScrollRestoration = "auto" | "manual";
+type FormDataEntryValue = string | File;
+type AppendMode = "segments" | "sequence";
+type AudioContextState = "suspended" | "running" | "closed";
+type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
+type CanvasFillRule = "nonzero" | "evenodd";
+type ChannelCountMode = "max" | "clamped-max" | "explicit";
+type ChannelInterpretation = "speakers" | "discrete";
+type DistanceModelType = "linear" | "inverse" | "exponential";
+type ExpandGranularity = "character" | "word" | "sentence" | "textedit";
+type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "pending" | "done";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ListeningState = "inactive" | "active" | "disambiguation";
+type MSCredentialType = "FIDO_2_0";
+type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
+type MSIceType = "failed" | "direct" | "relay";
+type MSStatsType = "description" | "localclientevent" | "inbound-network" | "outbound-network" | "inbound-payload" | "outbound-payload" | "transportdiagnostics";
+type MSTransportType = "Embedded" | "USB" | "NFC" | "BT";
+type MSWebViewPermissionState = "unknown" | "defer" | "allow" | "deny";
+type MSWebViewPermissionType = "geolocation" | "unlimitedIndexedDBQuota" | "media" | "pointerlock" | "webnotifications";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaStreamTrackState = "live" | "ended";
+type NavigationReason = "up" | "down" | "left" | "right";
+type NavigationType = "navigate" | "reload" | "back_forward" | "prerender";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OscillatorType = "sine" | "square" | "sawtooth" | "triangle" | "custom";
+type OverSampleType = "none" | "2x" | "4x";
+type PanningModelType = "equalpower";
+type PaymentComplete = "success" | "fail" | "";
+type PaymentShippingType = "shipping" | "delivery" | "pickup";
+type PushEncryptionKeyName = "p256dh" | "auth";
+type PushPermissionState = "granted" | "denied" | "prompt";
+type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
+type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
+type RTCDtlsRole = "auto" | "client" | "server";
+type RTCDtlsTransportState = "new" | "connecting" | "connected" | "closed";
+type RTCIceCandidateType = "host" | "srflx" | "prflx" | "relay";
+type RTCIceComponent = "RTP" | "RTCP";
+type RTCIceConnectionState = "new" | "checking" | "connected" | "completed" | "failed" | "disconnected" | "closed";
+type RTCIceGatherPolicy = "all" | "nohost" | "relay";
+type RTCIceGathererState = "new" | "gathering" | "complete";
+type RTCIceGatheringState = "new" | "gathering" | "complete";
+type RTCIceProtocol = "udp" | "tcp";
+type RTCIceRole = "controlling" | "controlled";
+type RTCIceTcpCandidateType = "active" | "passive" | "so";
+type RTCIceTransportPolicy = "none" | "relay" | "all";
+type RTCIceTransportState = "new" | "checking" | "connected" | "completed" | "disconnected" | "closed";
+type RTCSdpType = "offer" | "pranswer" | "answer";
+type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "have-local-pranswer" | "have-remote-pranswer" | "closed";
+type RTCStatsIceCandidatePairState = "frozen" | "waiting" | "inprogress" | "failed" | "succeeded" | "cancelled";
+type RTCStatsIceCandidateType = "host" | "serverreflexive" | "peerreflexive" | "relayed";
+type RTCStatsType = "inboundrtp" | "outboundrtp" | "session" | "datachannel" | "track" | "transport" | "candidatepair" | "localcandidate" | "remotecandidate";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache";
+type RequestCredentials = "omit" | "same-origin" | "include";
+type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker";
+type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
+type RequestRedirect = "follow" | "error" | "manual";
+type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ScopedCredentialType = "ScopedCred";
+type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
+type Transport = "usb" | "nfc" | "ble";
+type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
+type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.dom.iterable.d.ts b/node_modules/typescript/lib/lib.dom.iterable.d.ts
index 2b6205476..95bb1465d 100644
--- a/node_modules/typescript/lib/lib.dom.iterable.d.ts
+++ b/node_modules/typescript/lib/lib.dom.iterable.d.ts
@@ -1,33 +1,92 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/// <reference path="lib.dom.d.ts" />
-
-interface DOMTokenList {
- [Symbol.iterator](): IterableIterator<string>;
-}
-
-interface NodeList {
- [Symbol.iterator](): IterableIterator<Node>
-}
-
-interface NodeListOf<TNode extends Node> {
- [Symbol.iterator](): IterableIterator<TNode>
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference path="lib.dom.d.ts" />
+
+interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface FormData {
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[string, string | File]>;
+ /**
+ * Returns a list of keys in the list
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns a list of values in the list
+ */
+ values(): IterableIterator<string | File>;
+
+ [Symbol.iterator](): IterableIterator<string | File>;
+}
+
+interface NodeList {
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[number, Node]>;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: Node, index: number, listObj: NodeList) => void, thisArg?: any): void;
+ /**
+ * Returns an list of keys in the list
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the list
+ */
+ values(): IterableIterator<Node>;
+
+
+ [Symbol.iterator](): IterableIterator<Node>;
+}
+
+interface NodeListOf<TNode extends Node> {
+
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[number, TNode]>;
+
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: TNode, index: number, listObj: NodeListOf<TNode>) => void, thisArg?: any): void;
+ /**
+ * Returns an list of keys in the list
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the list
+ */
+ values(): IterableIterator<TNode>;
+
+ [Symbol.iterator](): IterableIterator<TNode>;
+}
diff --git a/node_modules/typescript/lib/lib.es2015.collection.d.ts b/node_modules/typescript/lib/lib.es2015.collection.d.ts
index eabd6319d..37ebed50a 100644
--- a/node_modules/typescript/lib/lib.es2015.collection.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.collection.d.ts
@@ -1,92 +1,92 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-interface Map<K, V> {
- clear(): void;
- delete(key: K): boolean;
- forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
- get(key: K): V | undefined;
- has(key: K): boolean;
- set(key: K, value?: V): this;
- readonly size: number;
-}
-
-interface MapConstructor {
- new (): Map<any, any>;
- new <K, V>(entries?: [K, V][]): Map<K, V>;
- readonly prototype: Map<any, any>;
-}
-declare var Map: MapConstructor;
-
-interface ReadonlyMap<K, V> {
- forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
- get(key: K): V|undefined;
- has(key: K): boolean;
- readonly size: number;
-}
-
-interface WeakMap<K, V> {
- delete(key: K): boolean;
- get(key: K): V | undefined;
- has(key: K): boolean;
- set(key: K, value?: V): this;
-}
-
-interface WeakMapConstructor {
- new (): WeakMap<any, any>;
- new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
- readonly prototype: WeakMap<any, any>;
-}
-declare var WeakMap: WeakMapConstructor;
-
-interface Set<T> {
- add(value: T): this;
- clear(): void;
- delete(value: T): boolean;
- forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
- has(value: T): boolean;
- readonly size: number;
-}
-
-interface SetConstructor {
- new (): Set<any>;
- new <T>(values?: T[]): Set<T>;
- readonly prototype: Set<any>;
-}
-declare var Set: SetConstructor;
-
-interface ReadonlySet<T> {
- forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
- has(value: T): boolean;
- readonly size: number;
-}
-
-interface WeakSet<T> {
- add(value: T): this;
- delete(value: T): boolean;
- has(value: T): boolean;
-}
-
-interface WeakSetConstructor {
- new (): WeakSet<any>;
- new <T>(values?: T[]): WeakSet<T>;
- readonly prototype: WeakSet<any>;
-}
-declare var WeakSet: WeakSetConstructor;
+
+interface Map<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+ readonly size: number;
+}
+
+interface MapConstructor {
+ new (): Map<any, any>;
+ new <K, V>(entries?: [K, V][]): Map<K, V>;
+ readonly prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface ReadonlyMap<K, V> {
+ forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ readonly size: number;
+}
+
+interface WeakMap<K extends object, V> {
+ delete(key: K): boolean;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+}
+
+interface WeakMapConstructor {
+ new (): WeakMap<object, any>;
+ new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
+ readonly prototype: WeakMap<object, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface SetConstructor {
+ new (): Set<any>;
+ new <T>(values?: T[]): Set<T>;
+ readonly prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface ReadonlySet<T> {
+ forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface WeakSet<T extends object> {
+ add(value: T): this;
+ delete(value: T): boolean;
+ has(value: T): boolean;
+}
+
+interface WeakSetConstructor {
+ new (): WeakSet<object>;
+ new <T extends object>(values?: T[]): WeakSet<T>;
+ readonly prototype: WeakSet<object>;
+}
+declare var WeakSet: WeakSetConstructor;
diff --git a/node_modules/typescript/lib/lib.es2015.core.d.ts b/node_modules/typescript/lib/lib.es2015.core.d.ts
index 499d0de52..bf2edb82c 100644
--- a/node_modules/typescript/lib/lib.es2015.core.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.core.d.ts
@@ -1,544 +1,554 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-declare type PropertyKey = string | number | symbol;
-
-interface Array<T> {
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: T, start?: number, end?: number): this;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-}
-
-interface ArrayConstructor {
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
-
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- */
- from<T>(arrayLike: ArrayLike<T>): Array<T>;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of<T>(...items: T[]): Array<T>;
-}
-
-interface DateConstructor {
- new (value: Date): Date;
-}
-
-interface Function {
- /**
- * Returns the name of the function. Function names are read-only and can not be changed.
- */
- readonly name: string;
-}
-
-interface Math {
- /**
- * Returns the number of leading zero bits in the 32-bit binary representation of a number.
- * @param x A numeric expression.
- */
- clz32(x: number): number;
-
- /**
- * Returns the result of 32-bit multiplication of two numbers.
- * @param x First number
- * @param y Second number
- */
- imul(x: number, y: number): number;
-
- /**
- * Returns the sign of the x, indicating whether x is positive, negative or zero.
- * @param x The numeric expression to test
- */
- sign(x: number): number;
-
- /**
- * Returns the base 10 logarithm of a number.
- * @param x A numeric expression.
- */
- log10(x: number): number;
-
- /**
- * Returns the base 2 logarithm of a number.
- * @param x A numeric expression.
- */
- log2(x: number): number;
-
- /**
- * Returns the natural logarithm of 1 + x.
- * @param x A numeric expression.
- */
- log1p(x: number): number;
-
- /**
- * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
- * the natural logarithms).
- * @param x A numeric expression.
- */
- expm1(x: number): number;
-
- /**
- * Returns the hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cosh(x: number): number;
-
- /**
- * Returns the hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sinh(x: number): number;
-
- /**
- * Returns the hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tanh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- acosh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- asinh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- atanh(x: number): number;
-
- /**
- * Returns the square root of the sum of squares of its arguments.
- * @param values Values to compute the square root for.
- * If no arguments are passed, the result is +0.
- * If there is only one argument, the result is the absolute value.
- * If any argument is +Infinity or -Infinity, the result is +Infinity.
- * If any argument is NaN, the result is NaN.
- * If all arguments are either +0 or −0, the result is +0.
- */
- hypot(...values: number[] ): number;
-
- /**
- * Returns the integral part of the a numeric expression, x, removing any fractional digits.
- * If x is already an integer, the result is x.
- * @param x A numeric expression.
- */
- trunc(x: number): number;
-
- /**
- * Returns the nearest single precision float representation of a number.
- * @param x A numeric expression.
- */
- fround(x: number): number;
-
- /**
- * Returns an implementation-dependent approximation to the cube root of number.
- * @param x A numeric expression.
- */
- cbrt(x: number): number;
-}
-
-interface NumberConstructor {
- /**
- * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
- * that is representable as a Number value, which is approximately:
- * 2.2204460492503130808472633361816 x 10‍−‍16.
- */
- readonly EPSILON: number;
-
- /**
- * Returns true if passed value is finite.
- * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
- * number. Only finite values of the type number, result in true.
- * @param number A numeric value.
- */
- isFinite(number: number): boolean;
-
- /**
- * Returns true if the value passed is an integer, false otherwise.
- * @param number A numeric value.
- */
- isInteger(number: number): boolean;
-
- /**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
- * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
- * to a number. Only values of the type number, that are also NaN, result in true.
- * @param number A numeric value.
- */
- isNaN(number: number): boolean;
-
- /**
- * Returns true if the value passed is a safe integer.
- * @param number A numeric value.
- */
- isSafeInteger(number: number): boolean;
-
- /**
- * The value of the largest integer n such that n and n + 1 are both exactly representable as
- * a Number value.
- * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
- */
- readonly MAX_SAFE_INTEGER: number;
-
- /**
- * The value of the smallest integer n such that n and n − 1 are both exactly representable as
- * a Number value.
- * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
- */
- readonly MIN_SAFE_INTEGER: number;
-
- /**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
- parseFloat(string: string): number;
-
- /**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
- parseInt(string: string, radix?: number): number;
-}
-
-interface Object {
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: PropertyKey): boolean
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: PropertyKey): boolean;
-}
-
-interface ObjectConstructor {
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source The source object from which to copy properties.
- */
- assign<T, U>(target: T, source: U): T & U;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- */
- assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- * @param source3 The third source object from which to copy properties.
- */
- assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param sources One or more source objects from which to copy properties
- */
- assign(target: any, ...sources: any[]): any;
-
- /**
- * Returns an array of all symbol properties found directly on object o.
- * @param o Object to retrieve the symbols from.
- */
- getOwnPropertySymbols(o: any): symbol[];
-
- /**
- * Returns true if the values are the same value, false otherwise.
- * @param value1 The first value.
- * @param value2 The second value.
- */
- is(value1: any, value2: any): boolean;
-
- /**
- * Sets the prototype of a specified object o to object proto or null. Returns the object o.
- * @param o The object to change its prototype.
- * @param proto The value of the new prototype or null.
- */
- setPrototypeOf(o: any, proto: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not
- * inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript
- * object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor
- * property.
- */
- defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
-}
-
-interface ReadonlyArray<T> {
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg?: any): T | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
-}
-
-interface RegExp {
- /**
- * Returns a string indicating the flags of the regular expression in question. This field is read-only.
- * The characters in this string are sequenced and concatenated in the following order:
- *
- * - "g" for global
- * - "i" for ignoreCase
- * - "m" for multiline
- * - "u" for unicode
- * - "y" for sticky
- *
- * If no flags are set, the value is the empty string.
- */
- readonly flags: string;
-
- /**
- * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
- * expression. Default is false. Read-only.
- */
- readonly sticky: boolean;
-
- /**
- * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
- * expression. Default is false. Read-only.
- */
- readonly unicode: boolean;
-}
-
-interface RegExpConstructor {
- new (pattern: RegExp, flags?: string): RegExp;
- (pattern: RegExp, flags?: string): RegExp;
-}
-
-interface String {
- /**
- * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
- * value of the UTF-16 encoded code point starting at the string element at position pos in
- * the String resulting from converting this object to a String.
- * If there is no element at that position, the result is undefined.
- * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
- */
- codePointAt(pos: number): number | undefined;
-
- /**
- * Returns true if searchString appears as a substring of the result of converting this
- * object to a String, at one or more positions that are
- * greater than or equal to position; otherwise, returns false.
- * @param searchString search string
- * @param position If position is undefined, 0 is assumed, so as to search all of the String.
- */
- includes(searchString: string, position?: number): boolean;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * endPosition – length(this). Otherwise returns false.
- */
- endsWith(searchString: string, endPosition?: number): boolean;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form?: string): string;
-
- /**
- * Returns a String value that is made from count copies appended together. If count is 0,
- * T is the empty String is returned.
- * @param count number of copies to append
- */
- repeat(count: number): string;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * position. Otherwise returns false.
- */
- startsWith(searchString: string, position?: number): boolean;
-
- /**
- * Returns an <a> HTML anchor element and sets the name attribute to the text value
- * @param name
- */
- anchor(name: string): string;
-
- /** Returns a <big> HTML element */
- big(): string;
-
- /** Returns a <blink> HTML element */
- blink(): string;
-
- /** Returns a <b> HTML element */
- bold(): string;
-
- /** Returns a <tt> HTML element */
- fixed(): string
-
- /** Returns a <font> HTML element and sets the color attribute value */
- fontcolor(color: string): string
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: number): string;
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: string): string;
-
- /** Returns an <i> HTML element */
- italics(): string;
-
- /** Returns an <a> HTML element and sets the href attribute value */
- link(url: string): string;
-
- /** Returns a <small> HTML element */
- small(): string;
-
- /** Returns a <strike> HTML element */
- strike(): string;
-
- /** Returns a <sub> HTML element */
- sub(): string;
-
- /** Returns a <sup> HTML element */
- sup(): string;
-}
-
-interface StringConstructor {
- /**
- * Return the String value whose elements are, in order, the elements in the List elements.
- * If length is 0, the empty string is returned.
- */
- fromCodePoint(...codePoints: number[]): string;
-
- /**
- * String.raw is intended for use as a tag function of a Tagged Template String. When called
- * as such the first argument will be a well formed template call site object and the rest
- * parameter will contain the substitution values.
- * @param template A well-formed template string call site representation.
- * @param substitutions A set of substitution values.
- */
- raw(template: TemplateStringsArray, ...substitutions: any[]): string;
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare type PropertyKey = string | number | symbol;
+
+interface Array<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): T | undefined;
+ find(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): T | undefined;
+ find<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): number;
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): number;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: T, start?: number, end?: number): this;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (this: void, v: T, k: number) => U): Array<U>;
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): Array<U>;
+ from<Z, T, U>(arrayLike: ArrayLike<T>, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array<U>;
+
+
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): Array<T>;
+}
+
+interface DateConstructor {
+ new (value: Date): Date;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ readonly name: string;
+}
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
+ * the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[] ): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ readonly EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: number): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: number): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ readonly MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ readonly MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+ parseInt(string: string, radix?: number): number;
+}
+
+interface Object {
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source The source object from which to copy properties.
+ */
+ assign<T, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: object, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: object | null): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not
+ * inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
+ * object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
+ * property.
+ */
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: T, index: number, obj: ReadonlyArray<T>) => boolean): T | undefined;
+ find(predicate: (this: void, value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg: undefined): T | undefined;
+ find<Z>(predicate: (this: Z, value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg: Z): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): number;
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): number;
+}
+
+interface RegExp {
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ readonly flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly unicode: boolean;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp, flags?: string): RegExp;
+ (pattern: RegExp, flags?: string): RegExp;
+}
+
+interface String {
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number | undefined;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * T is the empty String is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /** Returns a <big> HTML element */
+ big(): string;
+
+ /** Returns a <blink> HTML element */
+ blink(): string;
+
+ /** Returns a <b> HTML element */
+ bold(): string;
+
+ /** Returns a <tt> HTML element */
+ fixed(): string;
+
+ /** Returns a <font> HTML element and sets the color attribute value */
+ fontcolor(color: string): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: number): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: string): string;
+
+ /** Returns an <i> HTML element */
+ italics(): string;
+
+ /** Returns an <a> HTML element and sets the href attribute value */
+ link(url: string): string;
+
+ /** Returns a <small> HTML element */
+ small(): string;
+
+ /** Returns a <strike> HTML element */
+ strike(): string;
+
+ /** Returns a <sub> HTML element */
+ sub(): string;
+
+ /** Returns a <sup> HTML element */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
+ * as such the first argument will be a well formed template call site object and the rest
+ * parameter will contain the substitution values.
+ * @param template A well-formed template string call site representation.
+ * @param substitutions A set of substitution values.
+ */
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
+}
diff --git a/node_modules/typescript/lib/lib.es2015.d.ts b/node_modules/typescript/lib/lib.es2015.d.ts
index ff5c555bf..a536e9c89 100644
--- a/node_modules/typescript/lib/lib.es2015.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.d.ts
@@ -1,30 +1,30 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-/// <reference path="lib.es2015.core.d.ts" />
-/// <reference path="lib.es2015.collection.d.ts" />
-/// <reference path="lib.es2015.generator.d.ts" />
-/// <reference path="lib.es2015.iterable.d.ts" />
-/// <reference path="lib.es2015.promise.d.ts" />
-/// <reference path="lib.es2015.proxy.d.ts" />
-/// <reference path="lib.es2015.reflect.d.ts" />
-/// <reference path="lib.es2015.symbol.d.ts" />
-/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
+
+/// <reference path="lib.es2015.core.d.ts" />
+/// <reference path="lib.es2015.collection.d.ts" />
+/// <reference path="lib.es2015.generator.d.ts" />
+/// <reference path="lib.es2015.iterable.d.ts" />
+/// <reference path="lib.es2015.promise.d.ts" />
+/// <reference path="lib.es2015.proxy.d.ts" />
+/// <reference path="lib.es2015.reflect.d.ts" />
+/// <reference path="lib.es2015.symbol.d.ts" />
+/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
/// <reference path="lib.es5.d.ts" /> \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2015.generator.d.ts b/node_modules/typescript/lib/lib.es2015.generator.d.ts
index 20d6725f6..d331a58b5 100644
--- a/node_modules/typescript/lib/lib.es2015.generator.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.generator.d.ts
@@ -1,32 +1,72 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-interface GeneratorFunction extends Function { }
-
-interface GeneratorFunctionConstructor {
- /**
- * Creates a new Generator function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): GeneratorFunction;
- (...args: string[]): GeneratorFunction;
- readonly prototype: GeneratorFunction;
-}
-declare var GeneratorFunction: GeneratorFunctionConstructor;
+
+interface Generator extends Iterator<any> { }
+
+interface GeneratorFunction {
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): Generator;
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): Generator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Generator;
+}
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): GeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: GeneratorFunction;
+}
+declare var GeneratorFunction: GeneratorFunctionConstructor;
diff --git a/node_modules/typescript/lib/lib.es2015.iterable.d.ts b/node_modules/typescript/lib/lib.es2015.iterable.d.ts
index cb92cb4b8..e083a89f7 100644
--- a/node_modules/typescript/lib/lib.es2015.iterable.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.iterable.d.ts
@@ -1,465 +1,503 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/// <reference path="lib.es2015.symbol.d.ts" />
-
-interface SymbolConstructor {
- /**
- * A method that returns the default iterator for an object. Called by the semantics of the
- * for-of statement.
- */
- readonly iterator: symbol;
-}
-
-interface IteratorResult<T> {
- done: boolean;
- value: T;
-}
-
-interface Iterator<T> {
- next(value?: any): IteratorResult<T>;
- return?(value?: any): IteratorResult<T>;
- throw?(e?: any): IteratorResult<T>;
-}
-
-interface Iterable<T> {
- [Symbol.iterator](): Iterator<T>;
-}
-
-interface IterableIterator<T> extends Iterator<T> {
- [Symbol.iterator](): IterableIterator<T>;
-}
-
-interface Array<T> {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<T>;
-
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, T]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<T>;
-}
-
-interface ArrayConstructor {
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- */
- from<T>(iterable: Iterable<T>): Array<T>;
-}
-
-interface ReadonlyArray<T> {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<T>;
-
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, T]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<T>;
-}
-
-interface IArguments {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<any>;
-}
-
-interface Map<K, V> {
- [Symbol.iterator](): IterableIterator<[K,V]>;
- entries(): IterableIterator<[K, V]>;
- keys(): IterableIterator<K>;
- values(): IterableIterator<V>;
-}
-
-interface MapConstructor {
- new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
-}
-
-interface WeakMap<K, V> { }
-
-interface WeakMapConstructor {
- new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
-}
-
-interface Set<T> {
- [Symbol.iterator](): IterableIterator<T>;
- entries(): IterableIterator<[T, T]>;
- keys(): IterableIterator<T>;
- values(): IterableIterator<T>;
-}
-
-interface SetConstructor {
- new <T>(iterable: Iterable<T>): Set<T>;
-}
-
-interface WeakSet<T> { }
-
-interface WeakSetConstructor {
- new <T>(iterable: Iterable<T>): WeakSet<T>;
-}
-
-interface Promise<T> { }
-
-interface PromiseConstructor {
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
-}
-
-declare namespace Reflect {
- function enumerate(target: any): IterableIterator<any>;
-}
-
-interface String {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<string>;
-}
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int8ArrayConstructor {
- new (elements: Iterable<number>): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint8ArrayConstructor {
- new (elements: Iterable<number>): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint8ClampedArrayConstructor {
- new (elements: Iterable<number>): Uint8ClampedArray;
-
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int16ArrayConstructor {
- new (elements: Iterable<number>): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-}
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint16ArrayConstructor {
- new (elements: Iterable<number>): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-}
-
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int32ArrayConstructor {
- new (elements: Iterable<number>): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint32ArrayConstructor {
- new (elements: Iterable<number>): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Float32ArrayConstructor {
- new (elements: Iterable<number>): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-}
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Float64ArrayConstructor {
- new (elements: Iterable<number>): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-} \ No newline at end of file
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ readonly iterator: symbol;
+}
+
+interface IteratorResult<T> {
+ done: boolean;
+ value: T;
+}
+
+interface Iterator<T> {
+ next(value?: any): IteratorResult<T>;
+ return?(value?: any): IteratorResult<T>;
+ throw?(e?: any): IteratorResult<T>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T>, mapfn: (this: void, v: T, k: number) => U): Array<U>;
+ from<T, U>(iterable: Iterable<T>, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): Array<U>;
+ from<Z, T, U>(iterable: Iterable<T>, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array<U>;
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T>): Array<T>;
+}
+
+interface ReadonlyArray<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface Map<K, V> {
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+ entries(): IterableIterator<[K, V]>;
+ keys(): IterableIterator<K>;
+ values(): IterableIterator<V>;
+}
+
+interface MapConstructor {
+ new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
+}
+
+interface WeakMap<K extends object, V> { }
+
+interface WeakMapConstructor {
+ new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+}
+
+interface Set<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+ entries(): IterableIterator<[T, T]>;
+ keys(): IterableIterator<T>;
+ values(): IterableIterator<T>;
+}
+
+interface SetConstructor {
+ new <T>(iterable: Iterable<T>): Set<T>;
+}
+
+interface WeakSet<T extends object> { }
+
+interface WeakSetConstructor {
+ new <T extends object>(iterable: Iterable<T>): WeakSet<T>;
+}
+
+interface Promise<T> { }
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
+}
+
+declare namespace Reflect {
+ function enumerate(target: object): IterableIterator<any>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int8Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array;
+
+ from(arrayLike: Iterable<number>): Int8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint8Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array;
+
+ from(arrayLike: Iterable<number>): Uint8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray;
+
+ from(arrayLike: Iterable<number>): Uint8ClampedArray;
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int16Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array;
+
+ from(arrayLike: Iterable<number>): Int16Array;
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint16Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array;
+
+ from(arrayLike: Iterable<number>): Uint16Array;
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array;
+
+ from(arrayLike: Iterable<number>): Int32Array;
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array;
+
+ from(arrayLike: Iterable<number>): Uint32Array;
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Float32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array;
+
+ from(arrayLike: Iterable<number>): Float32Array;
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Float64Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array;
+
+ from(arrayLike: Iterable<number>): Float64Array;
+}
diff --git a/node_modules/typescript/lib/lib.es2015.promise.d.ts b/node_modules/typescript/lib/lib.es2015.promise.d.ts
index 02352da40..81118e89d 100644
--- a/node_modules/typescript/lib/lib.es2015.promise.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.promise.d.ts
@@ -1,274 +1,223 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
+
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject(reason: any): Promise<never>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T>(reason: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+
+ /**
+ * Creates a new resolved promise .
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+}
-/**
- * Represents the completion of an asynchronous operation
- */
-interface Promise<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
-
- /**
- * Attaches a callback for only the rejection of the Promise.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of the callback.
- */
- catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
-
- /**
- * Attaches a callback for only the rejection of the Promise.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of the callback.
- */
- catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
-}
-
-interface PromiseConstructor {
- /**
- * A reference to the prototype.
- */
- readonly prototype: Promise<any>;
-
- /**
- * Creates a new Promise.
- * @param executor A callback used to initialize the promise. This callback is passed two arguments:
- * a resolve callback used resolve the promise with a value or the result of another promise,
- * and a reject callback used to reject the promise with a provided reason or error.
- */
- new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject(reason: any): Promise<never>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject<T>(reason: any): Promise<T>;
-
- /**
- * Creates a new resolved promise for the provided value.
- * @param value A promise.
- * @returns A promise whose internal state matches the provided promise.
- */
- resolve<T>(value: T | PromiseLike<T>): Promise<T>;
-
- /**
- * Creates a new resolved promise .
- * @returns A resolved promise.
- */
- resolve(): Promise<void>;
-}
-
declare var Promise: PromiseConstructor; \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2015.proxy.d.ts b/node_modules/typescript/lib/lib.es2015.proxy.d.ts
index 6f01f10bf..29b12d91e 100644
--- a/node_modules/typescript/lib/lib.es2015.proxy.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.proxy.d.ts
@@ -1,42 +1,42 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-interface ProxyHandler<T> {
- getPrototypeOf? (target: T): {} | null;
- setPrototypeOf? (target: T, v: any): boolean;
- isExtensible? (target: T): boolean;
- preventExtensions? (target: T): boolean;
- getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
- has? (target: T, p: PropertyKey): boolean;
- get? (target: T, p: PropertyKey, receiver: any): any;
- set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
- deleteProperty? (target: T, p: PropertyKey): boolean;
- defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
- enumerate? (target: T): PropertyKey[];
- ownKeys? (target: T): PropertyKey[];
- apply? (target: T, thisArg: any, argArray?: any): any;
- construct? (target: T, argArray: any, newTarget?: any): {};
-}
-
-interface ProxyConstructor {
- revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
- new <T>(target: T, handler: ProxyHandler<T>): T
-}
-declare var Proxy: ProxyConstructor;
+
+interface ProxyHandler<T extends object> {
+ getPrototypeOf? (target: T): object | null;
+ setPrototypeOf? (target: T, v: any): boolean;
+ isExtensible? (target: T): boolean;
+ preventExtensions? (target: T): boolean;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ has? (target: T, p: PropertyKey): boolean;
+ get? (target: T, p: PropertyKey, receiver: any): any;
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
+ deleteProperty? (target: T, p: PropertyKey): boolean;
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
+ enumerate? (target: T): PropertyKey[];
+ ownKeys? (target: T): PropertyKey[];
+ apply? (target: T, thisArg: any, argArray?: any): any;
+ construct? (target: T, argArray: any, newTarget?: any): object;
+}
+
+interface ProxyConstructor {
+ revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
+ new <T extends object>(target: T, handler: ProxyHandler<T>): T;
+}
+declare var Proxy: ProxyConstructor;
diff --git a/node_modules/typescript/lib/lib.es2015.reflect.d.ts b/node_modules/typescript/lib/lib.es2015.reflect.d.ts
index b6a685345..2bea5f1e5 100644
--- a/node_modules/typescript/lib/lib.es2015.reflect.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.reflect.d.ts
@@ -1,35 +1,35 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-declare namespace Reflect {
- function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
- function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
- function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
- function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
- function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
- function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
- function getPrototypeOf(target: any): any;
- function has(target: any, propertyKey: PropertyKey): boolean;
- function isExtensible(target: any): boolean;
- function ownKeys(target: any): Array<PropertyKey>;
- function preventExtensions(target: any): boolean;
- function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
- function setPrototypeOf(target: any, proto: any): boolean;
-} \ No newline at end of file
+
+declare namespace Reflect {
+ function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
+ function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
+ function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
+ function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
+ function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
+ function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor;
+ function getPrototypeOf(target: object): object;
+ function has(target: object, propertyKey: PropertyKey): boolean;
+ function isExtensible(target: object): boolean;
+ function ownKeys(target: object): Array<PropertyKey>;
+ function preventExtensions(target: object): boolean;
+ function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
+ function setPrototypeOf(target: object, proto: any): boolean;
+}
diff --git a/node_modules/typescript/lib/lib.es2015.symbol.d.ts b/node_modules/typescript/lib/lib.es2015.symbol.d.ts
index c0474aec0..a9cce3309 100644
--- a/node_modules/typescript/lib/lib.es2015.symbol.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.symbol.d.ts
@@ -1,56 +1,56 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-interface Symbol {
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-}
-
-interface SymbolConstructor {
- /**
- * A reference to the prototype.
- */
- readonly prototype: Symbol;
-
- /**
- * Returns a new unique Symbol value.
- * @param description Description of the new Symbol object.
- */
- (description?: string|number): symbol;
-
- /**
- * Returns a Symbol object from the global symbol registry matching the given key if found.
- * Otherwise, returns a new symbol with this key.
- * @param key key to search for.
- */
- for(key: string): symbol;
-
- /**
- * Returns a key from the global symbol registry matching the given Symbol if found.
- * Otherwise, returns a undefined.
- * @param sym Symbol to find the key for.
- */
- keyFor(sym: symbol): string | undefined;
-}
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): symbol;
+}
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string | number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string | undefined;
+}
+
declare var Symbol: SymbolConstructor; \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts b/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
index 42299fe7d..869da0561 100644
--- a/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
+++ b/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
@@ -1,347 +1,347 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/// <reference path="lib.es2015.symbol.d.ts" />
-
-interface SymbolConstructor {
- /**
- * A method that determines if a constructor object recognizes an object as one of the
- * constructor’s instances. Called by the semantics of the instanceof operator.
- */
- readonly hasInstance: symbol;
-
- /**
- * A Boolean value that if true indicates that an object should flatten to its array elements
- * by Array.prototype.concat.
- */
- readonly isConcatSpreadable: symbol;
-
- /**
- * A regular expression method that matches the regular expression against a string. Called
- * by the String.prototype.match method.
- */
- readonly match: symbol;
-
- /**
- * A regular expression method that replaces matched substrings of a string. Called by the
- * String.prototype.replace method.
- */
- readonly replace: symbol;
-
- /**
- * A regular expression method that returns the index within a string that matches the
- * regular expression. Called by the String.prototype.search method.
- */
- readonly search: symbol;
-
- /**
- * A function valued property that is the constructor function that is used to create
- * derived objects.
- */
- readonly species: symbol;
-
- /**
- * A regular expression method that splits a string at the indices that match the regular
- * expression. Called by the String.prototype.split method.
- */
- readonly split: symbol;
-
- /**
- * A method that converts an object to a corresponding primitive value.
- * Called by the ToPrimitive abstract operation.
- */
- readonly toPrimitive: symbol;
-
- /**
- * A String value that is used in the creation of the default string description of an object.
- * Called by the built-in method Object.prototype.toString.
- */
- readonly toStringTag: symbol;
-
- /**
- * An Object whose own property names are property names that are excluded from the 'with'
- * environment bindings of the associated objects.
- */
- readonly unscopables: symbol;
-}
-
-interface Symbol {
- readonly [Symbol.toStringTag]: "Symbol";
-}
-
-interface Array<T> {
- /**
- * Returns an object whose properties have the value 'true'
- * when they will be absent when used in a 'with' statement.
- */
- [Symbol.unscopables](): {
- copyWithin: boolean;
- entries: boolean;
- fill: boolean;
- find: boolean;
- findIndex: boolean;
- keys: boolean;
- values: boolean;
- };
-}
-
-interface Date {
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "default"): string;
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "string"): string;
- /**
- * Converts a Date object to a number.
- */
- [Symbol.toPrimitive](hint: "number"): number;
- /**
- * Converts a Date object to a string or number.
- *
- * @param hint The strings "number", "string", or "default" to specify what primitive to return.
- *
- * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
- * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
- */
- [Symbol.toPrimitive](hint: string): string | number;
-}
-
-interface Map<K, V> {
- readonly [Symbol.toStringTag]: "Map";
-}
-
-interface WeakMap<K, V>{
- readonly [Symbol.toStringTag]: "WeakMap";
-}
-
-interface Set<T> {
- readonly [Symbol.toStringTag]: "Set";
-}
-
-interface WeakSet<T> {
- readonly [Symbol.toStringTag]: "WeakSet";
-}
-
-interface JSON {
- readonly [Symbol.toStringTag]: "JSON";
-}
-
-interface Function {
- /**
- * Determines whether the given value inherits from this function if this function was used
- * as a constructor function.
- *
- * A constructor function can control which objects are recognized as its instances by
- * 'instanceof' by overriding this method.
- */
- [Symbol.hasInstance](value: any): boolean;
-}
-
-interface GeneratorFunction extends Function {
- readonly [Symbol.toStringTag]: "GeneratorFunction";
-}
-
-interface Math {
- readonly [Symbol.toStringTag]: "Math";
-}
-
-interface Promise<T> {
- readonly [Symbol.toStringTag]: "Promise";
-}
-
-interface PromiseConstructor {
- readonly [Symbol.species]: Function;
-}
-
-interface RegExp {
- /**
- * Matches a string with this regular expression, and returns an array containing the results of
- * that search.
- * @param string A string to search within.
- */
- [Symbol.match](string: string): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replaceValue A String object or string literal containing the text to replace for every
- * successful match of this regular expression.
- */
- [Symbol.replace](string: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replacer A function that returns the replacement text.
- */
- [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the position beginning first substring match in a regular expression search
- * using this regular expression.
- *
- * @param string The string to search within.
- */
- [Symbol.search](string: string): number;
-
- /**
- * Returns an array of substrings that were delimited by strings in the original input that
- * match against this regular expression.
- *
- * If the regular expression contains capturing parentheses, then each time this
- * regular expression matches, the results (including any undefined results) of the
- * capturing parentheses are spliced.
- *
- * @param string string value to split
- * @param limit if not undefined, the output array is truncated so that it contains no more
- * than 'limit' elements.
- */
- [Symbol.split](string: string, limit?: number): string[];
-}
-
-interface RegExpConstructor {
- [Symbol.species](): RegExpConstructor;
-}
-
-interface String {
- /**
- * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
- * @param matcher An object that supports being matched against.
- */
- match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param searcher An object which supports searching within a string.
- */
- search(searcher: { [Symbol.search](string: string): number; }): number;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param splitter An object that can split a string.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- readonly [Symbol.toStringTag]: "ArrayBuffer";
-}
-
-interface DataView {
- readonly [Symbol.toStringTag]: "DataView";
-}
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- readonly [Symbol.toStringTag]: "Int8Array";
-}
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- readonly [Symbol.toStringTag]: "UInt8Array";
-}
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- readonly [Symbol.toStringTag]: "Uint8ClampedArray";
-}
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- readonly [Symbol.toStringTag]: "Int16Array";
-}
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- readonly [Symbol.toStringTag]: "Uint16Array";
-}
-
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- readonly [Symbol.toStringTag]: "Int32Array";
-}
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- readonly [Symbol.toStringTag]: "Uint32Array";
-}
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- readonly [Symbol.toStringTag]: "Float32Array";
-}
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- readonly [Symbol.toStringTag]: "Float64Array";
-} \ No newline at end of file
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ readonly hasInstance: symbol;
+
+ /**
+ * A Boolean value that if true indicates that an object should flatten to its array elements
+ * by Array.prototype.concat.
+ */
+ readonly isConcatSpreadable: symbol;
+
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.match method.
+ */
+ readonly match: symbol;
+
+ /**
+ * A regular expression method that replaces matched substrings of a string. Called by the
+ * String.prototype.replace method.
+ */
+ readonly replace: symbol;
+
+ /**
+ * A regular expression method that returns the index within a string that matches the
+ * regular expression. Called by the String.prototype.search method.
+ */
+ readonly search: symbol;
+
+ /**
+ * A function valued property that is the constructor function that is used to create
+ * derived objects.
+ */
+ readonly species: symbol;
+
+ /**
+ * A regular expression method that splits a string at the indices that match the regular
+ * expression. Called by the String.prototype.split method.
+ */
+ readonly split: symbol;
+
+ /**
+ * A method that converts an object to a corresponding primitive value.
+ * Called by the ToPrimitive abstract operation.
+ */
+ readonly toPrimitive: symbol;
+
+ /**
+ * A String value that is used in the creation of the default string description of an object.
+ * Called by the built-in method Object.prototype.toString.
+ */
+ readonly toStringTag: symbol;
+
+ /**
+ * An Object whose own property names are property names that are excluded from the 'with'
+ * environment bindings of the associated objects.
+ */
+ readonly unscopables: symbol;
+}
+
+interface Symbol {
+ readonly [Symbol.toStringTag]: "Symbol";
+}
+
+interface Array<T> {
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface Map<K, V> {
+ readonly [Symbol.toStringTag]: "Map";
+}
+
+interface WeakMap<K extends object, V>{
+ readonly [Symbol.toStringTag]: "WeakMap";
+}
+
+interface Set<T> {
+ readonly [Symbol.toStringTag]: "Set";
+}
+
+interface WeakSet<T extends object> {
+ readonly [Symbol.toStringTag]: "WeakSet";
+}
+
+interface JSON {
+ readonly [Symbol.toStringTag]: "JSON";
+}
+
+interface Function {
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface GeneratorFunction {
+ readonly [Symbol.toStringTag]: "GeneratorFunction";
+}
+
+interface Math {
+ readonly [Symbol.toStringTag]: "Math";
+}
+
+interface Promise<T> {
+ readonly [Symbol.toStringTag]: "Promise";
+}
+
+interface PromiseConstructor {
+ readonly [Symbol.species]: Function;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+}
+
+interface RegExpConstructor {
+ [Symbol.species](): RegExpConstructor;
+}
+
+interface String {
+ /**
+ * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+}
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ readonly [Symbol.toStringTag]: "ArrayBuffer";
+}
+
+interface DataView {
+ readonly [Symbol.toStringTag]: "DataView";
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ readonly [Symbol.toStringTag]: "Int8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ readonly [Symbol.toStringTag]: "UInt8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ readonly [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ readonly [Symbol.toStringTag]: "Int16Array";
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ readonly [Symbol.toStringTag]: "Uint16Array";
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ readonly [Symbol.toStringTag]: "Int32Array";
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ readonly [Symbol.toStringTag]: "Uint32Array";
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ readonly [Symbol.toStringTag]: "Float32Array";
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ readonly [Symbol.toStringTag]: "Float64Array";
+}
diff --git a/node_modules/typescript/lib/lib.es2016.array.include.d.ts b/node_modules/typescript/lib/lib.es2016.array.include.d.ts
index 42b95c478..734fa450d 100644
--- a/node_modules/typescript/lib/lib.es2016.array.include.d.ts
+++ b/node_modules/typescript/lib/lib.es2016.array.include.d.ts
@@ -1,109 +1,118 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-interface Array<T> {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: T, fromIndex?: number): boolean;
-}
-
-interface Int8Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Uint8Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Uint8ClampedArray {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Int16Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Uint16Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Int32Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Uint32Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Float32Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
-}
-
-interface Float64Array {
- /**
- * Determines whether an array includes a certain element, returning true or false as appropriate.
- * @param searchElement The element to search for.
- * @param fromIndex The position in this array at which to begin searching for searchElement.
- */
- includes(searchElement: number, fromIndex?: number): boolean;
+
+interface Array<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface Int8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8ClampedArray {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float64Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
} \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2016.d.ts b/node_modules/typescript/lib/lib.es2016.d.ts
index 5921e060d..50fdffa85 100644
--- a/node_modules/typescript/lib/lib.es2016.d.ts
+++ b/node_modules/typescript/lib/lib.es2016.d.ts
@@ -1,22 +1,22 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-/// <reference path="lib.es2015.d.ts" />
+
+/// <reference path="lib.es2015.d.ts" />
/// <reference path="lib.es2016.array.include.d.ts" /> \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2017.d.ts b/node_modules/typescript/lib/lib.es2017.d.ts
index 94c75a1b4..a0d3a0aff 100644
--- a/node_modules/typescript/lib/lib.es2017.d.ts
+++ b/node_modules/typescript/lib/lib.es2017.d.ts
@@ -1,24 +1,24 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
-/// <reference no-default-lib="true"/>
+/// <reference no-default-lib="true"/>
-/// <reference path="lib.es2016.d.ts" />
-/// <reference path="lib.es2017.object.d.ts" />
-/// <reference path="lib.es2017.sharedmemory.d.ts" />
-/// <reference path="lib.es2017.string.d.ts" />
+
+/// <reference path="lib.es2016.d.ts" />
+/// <reference path="lib.es2017.object.d.ts" />
+/// <reference path="lib.es2017.sharedmemory.d.ts" />
+/// <reference path="lib.es2017.string.d.ts" /> \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es2017.object.d.ts b/node_modules/typescript/lib/lib.es2017.object.d.ts
index dc3806835..00c11be27 100644
--- a/node_modules/typescript/lib/lib.es2017.object.d.ts
+++ b/node_modules/typescript/lib/lib.es2017.object.d.ts
@@ -1,34 +1,45 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-interface ObjectConstructor {
- /**
- * Returns an array of values of the enumerable properties of an object
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
- */
- values<T>(o: { [s: string]: T }): T[];
- values(o: any): any[];
- /**
- * Returns an array of key/values of the enumerable properties of an object
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
- */
- entries<T extends { [key: string]: any }, K extends keyof T>(o: T): [keyof T, T[K]][];
- entries(o: any): [string, any][];
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ObjectConstructor {
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values<T>(o: { [s: string]: T }): T[];
+
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values(o: any): any[];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries<T>(o: { [s: string]: T }): [string, T][];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries(o: any): [string, any][];
+}
diff --git a/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts b/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
index c59e12555..c0254f1dc 100644
--- a/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
+++ b/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
@@ -1,47 +1,47 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/// <reference path="lib.es2015.symbol.d.ts" />
-/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
-
-interface SharedArrayBuffer {
- /**
- * Read-only. The length of the ArrayBuffer (in bytes).
- */
- readonly byteLength: number;
-
- /*
- * The SharedArrayBuffer constructor's length property whose value is 1.
- */
- length: number;
- /**
- * Returns a section of an SharedArrayBuffer.
- */
- slice(begin:number, end?:number): SharedArrayBuffer;
- readonly [Symbol.species]: SharedArrayBuffer;
- readonly [Symbol.toStringTag]: "SharedArrayBuffer";
-}
-
-interface SharedArrayBufferConstructor {
- readonly prototype: SharedArrayBuffer;
- new (byteLength: number): SharedArrayBuffer;
-}
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference path="lib.es2015.symbol.d.ts" />
+/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
+
+interface SharedArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /*
+ * The SharedArrayBuffer constructor's length property whose value is 1.
+ */
+ length: number;
+ /**
+ * Returns a section of an SharedArrayBuffer.
+ */
+ slice(begin: number, end?: number): SharedArrayBuffer;
+ readonly [Symbol.species]: SharedArrayBuffer;
+ readonly [Symbol.toStringTag]: "SharedArrayBuffer";
+}
+
+interface SharedArrayBufferConstructor {
+ readonly prototype: SharedArrayBuffer;
+ new (byteLength: number): SharedArrayBuffer;
+}
+
declare var SharedArrayBuffer: SharedArrayBufferConstructor; \ No newline at end of file
diff --git a/node_modules/typescript/lib/lib.es5.d.ts b/node_modules/typescript/lib/lib.es5.d.ts
index 8e8b3b1b8..f43d062ad 100644
--- a/node_modules/typescript/lib/lib.es5.d.ts
+++ b/node_modules/typescript/lib/lib.es5.d.ts
@@ -1,4195 +1,4342 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/////////////////////////////
-/// ECMAScript APIs
-/////////////////////////////
-
-declare const NaN: number;
-declare const Infinity: number;
-
-/**
- * Evaluates JavaScript code and executes it.
- * @param x A String value that contains valid JavaScript code.
- */
-declare function eval(x: string): any;
-
-/**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
-declare function parseInt(s: string, radix?: number): number;
-
-/**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
-declare function parseFloat(string: string): number;
-
-/**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
- * @param number A numeric value.
- */
-declare function isNaN(number: number): boolean;
-
-/**
- * Determines whether a supplied number is finite.
- * @param number Any numeric value.
- */
-declare function isFinite(number: number): boolean;
-
-/**
- * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
- * @param encodedURI A value representing an encoded URI.
- */
-declare function decodeURI(encodedURI: string): string;
-
-/**
- * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
- * @param encodedURIComponent A value representing an encoded URI component.
- */
-declare function decodeURIComponent(encodedURIComponent: string): string;
-
-/**
- * Encodes a text string as a valid Uniform Resource Identifier (URI)
- * @param uri A value representing an encoded URI.
- */
-declare function encodeURI(uri: string): string;
-
-/**
- * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
- * @param uriComponent A value representing an encoded URI component.
- */
-declare function encodeURIComponent(uriComponent: string): string;
-
-interface PropertyDescriptor {
- configurable?: boolean;
- enumerable?: boolean;
- value?: any;
- writable?: boolean;
- get? (): any;
- set? (v: any): void;
-}
-
-interface PropertyDescriptorMap {
- [s: string]: PropertyDescriptor;
-}
-
-interface Object {
- /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
- constructor: Function;
-
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns a date converted to a string using the current locale. */
- toLocaleString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: string): boolean;
-
- /**
- * Determines whether an object exists in another object's prototype chain.
- * @param v Another object whose prototype chain is to be checked.
- */
- isPrototypeOf(v: Object): boolean;
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: string): boolean;
-}
-
-interface ObjectConstructor {
- new (value?: any): Object;
- (): any;
- (value: any): any;
-
- /** A reference to the prototype for a class of objects. */
- readonly prototype: Object;
-
- /**
- * Returns the prototype of an object.
- * @param o The object that references the prototype.
- */
- getPrototypeOf(o: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
-
- /**
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
- * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
- * @param o Object that contains the own properties.
- */
- getOwnPropertyNames(o: any): string[];
-
- /**
- * Creates an object that has null prototype.
- * @param o Object to use as a prototype. May be null
- */
- create(o: null): any;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- */
- create<T>(o: T): T;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- * @param properties JavaScript object that contains one or more property descriptors.
- */
- create(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
- */
- defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
-
- /**
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
- * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
- * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
- */
- defineProperties(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- seal<T>(o: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(a: T[]): ReadonlyArray<T>;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T extends Function>(f: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(o: T): Readonly<T>;
-
- /**
- * Prevents the addition of new properties to an object.
- * @param o Object to make non-extensible.
- */
- preventExtensions<T>(o: T): T;
-
- /**
- * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isSealed(o: any): boolean;
-
- /**
- * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isFrozen(o: any): boolean;
-
- /**
- * Returns a value that indicates whether new properties can be added to an object.
- * @param o Object to test.
- */
- isExtensible(o: any): boolean;
-
- /**
- * Returns the names of the enumerable properties and methods of an object.
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
- */
- keys(o: any): string[];
-}
-
-/**
- * Provides functionality common to all JavaScript objects.
- */
-declare const Object: ObjectConstructor;
-
-/**
- * Creates a new function.
- */
-interface Function {
- /**
- * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
- * @param thisArg The object to be used as the this object.
- * @param argArray A set of arguments to be passed to the function.
- */
- apply(this: Function, thisArg: any, argArray?: any): any;
-
- /**
- * Calls a method of an object, substituting another object for the current object.
- * @param thisArg The object to be used as the current object.
- * @param argArray A list of arguments to be passed to the method.
- */
- call(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /**
- * For a given function, creates a bound function that has the same body as the original function.
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
- * @param thisArg An object to which the this keyword can refer inside the new function.
- * @param argArray A list of arguments to be passed to the new function.
- */
- bind(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /** Returns a string representation of a function. */
- toString(): string;
-
- prototype: any;
- readonly length: number;
-
- // Non-standard extensions
- arguments: any;
- caller: Function;
-}
-
-interface FunctionConstructor {
- /**
- * Creates a new function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): Function;
- (...args: string[]): Function;
- readonly prototype: Function;
-}
-
-declare const Function: FunctionConstructor;
-
-interface IArguments {
- [index: number]: any;
- length: number;
- callee: Function;
-}
-
-interface String {
- /** Returns a string representation of a string. */
- toString(): string;
-
- /**
- * Returns the character at the specified index.
- * @param pos The zero-based index of the desired character.
- */
- charAt(pos: number): string;
-
- /**
- * Returns the Unicode value of the character at the specified location.
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
- */
- charCodeAt(index: number): number;
-
- /**
- * Returns a string that contains the concatenation of two or more strings.
- * @param strings The strings to append to the end of the string.
- */
- concat(...strings: string[]): string;
-
- /**
- * Returns the position of the first occurrence of a substring.
- * @param searchString The substring to search for in the string
- * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
- */
- indexOf(searchString: string, position?: number): number;
-
- /**
- * Returns the last occurrence of a substring in the string.
- * @param searchString The substring to search for.
- * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
- */
- lastIndexOf(searchString: string, position?: number): number;
-
- /**
- * Determines whether two strings are equivalent in the current locale.
- * @param that String to compare to target string
- */
- localeCompare(that: string): number;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
- */
- match(regexp: string): RegExpMatchArray | null;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
- */
- match(regexp: RegExp): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: RegExp, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: string): number;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: RegExp): number;
-
- /**
- * Returns a section of a string.
- * @param start The index to the beginning of the specified portion of stringObj.
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
- * If this value is not specified, the substring continues to the end of stringObj.
- */
- slice(start?: number, end?: number): string;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: string, limit?: number): string[];
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: RegExp, limit?: number): string[];
-
- /**
- * Returns the substring at the specified location within a String object.
- * @param start The zero-based index number indicating the beginning of the substring.
- * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
- * If end is omitted, the characters from start through the end of the original string are returned.
- */
- substring(start: number, end?: number): string;
-
- /** Converts all the alphabetic characters in a string to lowercase. */
- toLowerCase(): string;
-
- /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
- toLocaleLowerCase(): string;
-
- /** Converts all the alphabetic characters in a string to uppercase. */
- toUpperCase(): string;
-
- /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
- toLocaleUpperCase(): string;
-
- /** Removes the leading and trailing white space and line terminator characters from a string. */
- trim(): string;
-
- /** Returns the length of a String object. */
- readonly length: number;
-
- // IE extensions
- /**
- * Gets a substring beginning at the specified location and having the specified length.
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
- * @param length The number of characters to include in the returned substring.
- */
- substr(from: number, length?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): string;
-
- readonly [index: number]: string;
-}
-
-interface StringConstructor {
- new (value?: any): String;
- (value?: any): string;
- readonly prototype: String;
- fromCharCode(...codes: number[]): string;
-}
-
-/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
- */
-declare const String: StringConstructor;
-
-interface Boolean {
- /** Returns the primitive value of the specified object. */
- valueOf(): boolean;
-}
-
-interface BooleanConstructor {
- new (value?: any): Boolean;
- (value?: any): boolean;
- readonly prototype: Boolean;
-}
-
-declare const Boolean: BooleanConstructor;
-
-interface Number {
- /**
- * Returns a string representation of an object.
- * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
- */
- toString(radix?: number): string;
-
- /**
- * Returns a string representing a number in fixed-point notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toFixed(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented in exponential notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toExponential(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
- */
- toPrecision(precision?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): number;
-}
-
-interface NumberConstructor {
- new (value?: any): Number;
- (value?: any): number;
- readonly prototype: Number;
-
- /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
- readonly MAX_VALUE: number;
-
- /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
- readonly MIN_VALUE: number;
-
- /**
- * A value that is not a number.
- * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
- */
- readonly NaN: number;
-
- /**
- * A value that is less than the largest negative number that can be represented in JavaScript.
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
- */
- readonly NEGATIVE_INFINITY: number;
-
- /**
- * A value greater than the largest number that can be represented in JavaScript.
- * JavaScript displays POSITIVE_INFINITY values as infinity.
- */
- readonly POSITIVE_INFINITY: number;
-}
-
-/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
-declare const Number: NumberConstructor;
-
-interface TemplateStringsArray extends ReadonlyArray<string> {
- readonly raw: ReadonlyArray<string>
-}
-
-interface Math {
- /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
- readonly E: number;
- /** The natural logarithm of 10. */
- readonly LN10: number;
- /** The natural logarithm of 2. */
- readonly LN2: number;
- /** The base-2 logarithm of e. */
- readonly LOG2E: number;
- /** The base-10 logarithm of e. */
- readonly LOG10E: number;
- /** Pi. This is the ratio of the circumference of a circle to its diameter. */
- readonly PI: number;
- /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
- readonly SQRT1_2: number;
- /** The square root of 2. */
- readonly SQRT2: number;
- /**
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
- * For example, the absolute value of -5 is the same as the absolute value of 5.
- * @param x A numeric expression for which the absolute value is needed.
- */
- abs(x: number): number;
- /**
- * Returns the arc cosine (or inverse cosine) of a number.
- * @param x A numeric expression.
- */
- acos(x: number): number;
- /**
- * Returns the arcsine of a number.
- * @param x A numeric expression.
- */
- asin(x: number): number;
- /**
- * Returns the arctangent of a number.
- * @param x A numeric expression for which the arctangent is needed.
- */
- atan(x: number): number;
- /**
- * Returns the angle (in radians) from the X axis to a point.
- * @param y A numeric expression representing the cartesian y-coordinate.
- * @param x A numeric expression representing the cartesian x-coordinate.
- */
- atan2(y: number, x: number): number;
- /**
- * Returns the smallest number greater than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- ceil(x: number): number;
- /**
- * Returns the cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cos(x: number): number;
- /**
- * Returns e (the base of natural logarithms) raised to a power.
- * @param x A numeric expression representing the power of e.
- */
- exp(x: number): number;
- /**
- * Returns the greatest number less than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- floor(x: number): number;
- /**
- * Returns the natural logarithm (base e) of a number.
- * @param x A numeric expression.
- */
- log(x: number): number;
- /**
- * Returns the larger of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- max(...values: number[]): number;
- /**
- * Returns the smaller of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- min(...values: number[]): number;
- /**
- * Returns the value of a base expression taken to a specified power.
- * @param x The base value of the expression.
- * @param y The exponent value of the expression.
- */
- pow(x: number, y: number): number;
- /** Returns a pseudorandom number between 0 and 1. */
- random(): number;
- /**
- * Returns a supplied numeric expression rounded to the nearest number.
- * @param x The value to be rounded to the nearest number.
- */
- round(x: number): number;
- /**
- * Returns the sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sin(x: number): number;
- /**
- * Returns the square root of a number.
- * @param x A numeric expression.
- */
- sqrt(x: number): number;
- /**
- * Returns the tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tan(x: number): number;
-}
-/** An intrinsic object that provides basic mathematics functionality and constants. */
-declare const Math: Math;
-
-/** Enables basic storage and retrieval of dates and times. */
-interface Date {
- /** Returns a string representation of a date. The format of the string depends on the locale. */
- toString(): string;
- /** Returns a date as a string value. */
- toDateString(): string;
- /** Returns a time as a string value. */
- toTimeString(): string;
- /** Returns a value as a string value appropriate to the host environment's current locale. */
- toLocaleString(): string;
- /** Returns a date as a string value appropriate to the host environment's current locale. */
- toLocaleDateString(): string;
- /** Returns a time as a string value appropriate to the host environment's current locale. */
- toLocaleTimeString(): string;
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
- valueOf(): number;
- /** Gets the time value in milliseconds. */
- getTime(): number;
- /** Gets the year, using local time. */
- getFullYear(): number;
- /** Gets the year using Universal Coordinated Time (UTC). */
- getUTCFullYear(): number;
- /** Gets the month, using local time. */
- getMonth(): number;
- /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
- getUTCMonth(): number;
- /** Gets the day-of-the-month, using local time. */
- getDate(): number;
- /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
- getUTCDate(): number;
- /** Gets the day of the week, using local time. */
- getDay(): number;
- /** Gets the day of the week using Universal Coordinated Time (UTC). */
- getUTCDay(): number;
- /** Gets the hours in a date, using local time. */
- getHours(): number;
- /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
- getUTCHours(): number;
- /** Gets the minutes of a Date object, using local time. */
- getMinutes(): number;
- /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
- getUTCMinutes(): number;
- /** Gets the seconds of a Date object, using local time. */
- getSeconds(): number;
- /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCSeconds(): number;
- /** Gets the milliseconds of a Date, using local time. */
- getMilliseconds(): number;
- /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCMilliseconds(): number;
- /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
- getTimezoneOffset(): number;
- /**
- * Sets the date and time value in the Date object.
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
- */
- setTime(time: number): number;
- /**
- * Sets the milliseconds value in the Date object using local time.
- * @param ms A numeric value equal to the millisecond value.
- */
- setMilliseconds(ms: number): number;
- /**
- * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- * @param ms A numeric value equal to the millisecond value.
- */
- setUTCMilliseconds(ms: number): number;
-
- /**
- * Sets the seconds value in the Date object using local time.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setSeconds(sec: number, ms?: number): number;
- /**
- * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCSeconds(sec: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using local time.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the hour value in the Date object using local time.
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the numeric day-of-the-month value of the Date object using local time.
- * @param date A numeric value equal to the day of the month.
- */
- setDate(date: number): number;
- /**
- * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- * @param date A numeric value equal to the day of the month.
- */
- setUTCDate(date: number): number;
- /**
- * Sets the month value in the Date object using local time.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
- */
- setMonth(month: number, date?: number): number;
- /**
- * Sets the month value in the Date object using Universal Coordinated Time (UTC).
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
- */
- setUTCMonth(month: number, date?: number): number;
- /**
- * Sets the year of the Date object using local time.
- * @param year A numeric value for the year.
- * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
- * @param date A numeric value equal for the day of the month.
- */
- setFullYear(year: number, month?: number, date?: number): number;
- /**
- * Sets the year value in the Date object using Universal Coordinated Time (UTC).
- * @param year A numeric value equal to the year.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
- * @param date A numeric value equal to the day of the month.
- */
- setUTCFullYear(year: number, month?: number, date?: number): number;
- /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
- toUTCString(): string;
- /** Returns a date as a string value in ISO format. */
- toISOString(): string;
- /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
- toJSON(key?: any): string;
-}
-
-interface DateConstructor {
- new (): Date;
- new (value: number): Date;
- new (value: string): Date;
- new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
- (): string;
- readonly prototype: Date;
- /**
- * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
- * @param s A date string
- */
- parse(s: string): number;
- /**
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
- * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
- * @param month The month as an number between 0 and 11 (January to December).
- * @param date The date as an number between 1 and 31.
- * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
- * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
- * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
- * @param ms An number from 0 to 999 that specifies the milliseconds.
- */
- UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
- now(): number;
-}
-
-declare const Date: DateConstructor;
-
-interface RegExpMatchArray extends Array<string> {
- index?: number;
- input?: string;
-}
-
-interface RegExpExecArray extends Array<string> {
- index: number;
- input: string;
-}
-
-interface RegExp {
- /**
- * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
- * @param string The String object or string literal on which to perform the search.
- */
- exec(string: string): RegExpExecArray | null;
-
- /**
- * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
- * @param string String on which to perform the search.
- */
- test(string: string): boolean;
-
- /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
- readonly source: string;
-
- /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
- readonly global: boolean;
-
- /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
- readonly ignoreCase: boolean;
-
- /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
- readonly multiline: boolean;
-
- lastIndex: number;
-
- // Non-standard extensions
- compile(): this;
-}
-
-interface RegExpConstructor {
- new (pattern: RegExp): RegExp;
- new (pattern: string, flags?: string): RegExp;
- (pattern: RegExp): RegExp;
- (pattern: string, flags?: string): RegExp;
- readonly prototype: RegExp;
-
- // Non-standard extensions
- $1: string;
- $2: string;
- $3: string;
- $4: string;
- $5: string;
- $6: string;
- $7: string;
- $8: string;
- $9: string;
- lastMatch: string;
-}
-
-declare const RegExp: RegExpConstructor;
-
-interface Error {
- name: string;
- message: string;
- stack?: string;
-}
-
-interface ErrorConstructor {
- new (message?: string): Error;
- (message?: string): Error;
- readonly prototype: Error;
-}
-
-declare const Error: ErrorConstructor;
-
-interface EvalError extends Error {
-}
-
-interface EvalErrorConstructor {
- new (message?: string): EvalError;
- (message?: string): EvalError;
- readonly prototype: EvalError;
-}
-
-declare const EvalError: EvalErrorConstructor;
-
-interface RangeError extends Error {
-}
-
-interface RangeErrorConstructor {
- new (message?: string): RangeError;
- (message?: string): RangeError;
- readonly prototype: RangeError;
-}
-
-declare const RangeError: RangeErrorConstructor;
-
-interface ReferenceError extends Error {
-}
-
-interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
- (message?: string): ReferenceError;
- readonly prototype: ReferenceError;
-}
-
-declare const ReferenceError: ReferenceErrorConstructor;
-
-interface SyntaxError extends Error {
-}
-
-interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
- (message?: string): SyntaxError;
- readonly prototype: SyntaxError;
-}
-
-declare const SyntaxError: SyntaxErrorConstructor;
-
-interface TypeError extends Error {
-}
-
-interface TypeErrorConstructor {
- new (message?: string): TypeError;
- (message?: string): TypeError;
- readonly prototype: TypeError;
-}
-
-declare const TypeError: TypeErrorConstructor;
-
-interface URIError extends Error {
-}
-
-interface URIErrorConstructor {
- new (message?: string): URIError;
- (message?: string): URIError;
- readonly prototype: URIError;
-}
-
-declare const URIError: URIErrorConstructor;
-
-interface JSON {
- /**
- * Converts a JavaScript Object Notation (JSON) string into an object.
- * @param text A valid JSON string.
- * @param reviver A function that transforms the results. This function is called for each member of the object.
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
- */
- parse(text: string, reviver?: (key: any, value: any) => any): any;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer A function that transforms the results.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
-}
-
-/**
- * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
- */
-declare const JSON: JSON;
-
-
-/////////////////////////////
-/// ECMAScript Array API (specially handled by compiler)
-/////////////////////////////
-
-interface ReadonlyArray<T> {
- /**
- * Gets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- readonly length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
-
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter<S extends T>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg?: any): S[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
-
- readonly [n: number]: T;
-}
-
-interface Array<T> {
- /**
- * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Appends new elements to an array, and returns the new length of the array.
- * @param items New elements of the Array.
- */
- push(...items: T[]): number;
- /**
- * Removes the last element from an array and returns it.
- */
- pop(): T | undefined;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Reverses the elements in an Array.
- */
- reverse(): T[];
- /**
- * Removes the first element from an array and returns it.
- */
- shift(): T | undefined;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: T, b: T) => number): this;
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- */
- splice(start: number): T[];
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- * @param deleteCount The number of elements to remove.
- * @param items Elements to insert into the array in place of the deleted elements.
- */
- splice(start: number, deleteCount: number, ...items: T[]): T[];
- /**
- * Inserts new elements at the start of an array.
- * @param items Elements to insert at the start of the Array.
- */
- unshift(...items: T[]): number;
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
-
- [n: number]: T;
-}
-
-interface ArrayConstructor {
- new (arrayLength?: number): any[];
- new <T>(arrayLength: number): T[];
- new <T>(...items: T[]): T[];
- (arrayLength?: number): any[];
- <T>(arrayLength: number): T[];
- <T>(...items: T[]): T[];
- isArray(arg: any): arg is Array<any>;
- readonly prototype: Array<any>;
-}
-
-declare const Array: ArrayConstructor;
-
-interface TypedPropertyDescriptor<T> {
- enumerable?: boolean;
- configurable?: boolean;
- writable?: boolean;
- value?: T;
- get?: () => T;
- set?: (value: T) => void;
-}
-
-declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
-declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
-declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
-declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
-
-declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
-
-interface PromiseLike<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then(
- onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): PromiseLike<T>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<T | TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: (value: T) => TResult | PromiseLike<TResult>,
- onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): PromiseLike<TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult1, TResult2>(
- onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>,
- onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
-}
-
-interface ArrayLike<T> {
- readonly length: number;
- readonly [n: number]: T;
-}
-
-/**
- * Make all properties in T optional
- */
-type Partial<T> = {
- [P in keyof T]?: T[P];
-};
-
-/**
- * Make all properties in T readonly
- */
-type Readonly<T> = {
- readonly [P in keyof T]: T[P];
-};
-
-/**
- * From T pick a set of properties K
- */
-type Pick<T, K extends keyof T> = {
- [P in K]: T[P];
-}
-
-/**
- * Construct a type with a set of properties K of type T
- */
-type Record<K extends string, T> = {
- [P in K]: T;
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- /**
- * Read-only. The length of the ArrayBuffer (in bytes).
- */
- readonly byteLength: number;
-
- /**
- * Returns a section of an ArrayBuffer.
- */
- slice(begin:number, end?:number): ArrayBuffer;
-}
-
-interface ArrayBufferConstructor {
- readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
- isView(arg: any): arg is ArrayBufferView;
-}
-declare const ArrayBuffer: ArrayBufferConstructor;
-
-interface ArrayBufferView {
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- byteOffset: number;
-}
-
-interface DataView {
- readonly buffer: ArrayBuffer;
- readonly byteLength: number;
- readonly byteOffset: number;
- /**
- * Gets the Float32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Float64 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat64(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Int8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt8(byteOffset: number): number;
-
- /**
- * Gets the Int16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt16(byteOffset: number, littleEndian?: boolean): number;
- /**
- * Gets the Int32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint8(byteOffset: number): number;
-
- /**
- * Gets the Uint16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint16(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Stores an Float32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Float64 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setInt8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Int16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setUint8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Uint16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
-}
-
-interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
-}
-declare const DataView: DataViewConstructor;
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-interface Int8ArrayConstructor {
- readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-
-}
-declare const Int8Array: Int8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ArrayConstructor {
- readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-
-}
-declare const Uint8Array: Uint8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8ClampedArray;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: Uint8ClampedArray, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8ClampedArray;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8ClampedArray;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ClampedArrayConstructor {
- readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8ClampedArray;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int16ArrayConstructor {
- readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-
-}
-declare const Int16Array: Int16ArrayConstructor;
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint16ArrayConstructor {
- readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-
-}
-declare const Uint16Array: Uint16ArrayConstructor;
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int32ArrayConstructor {
- readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-declare const Int32Array: Int32ArrayConstructor;
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint32ArrayConstructor {
- readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-declare const Uint32Array: Uint32ArrayConstructor;
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float32ArrayConstructor {
- readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-
-}
-declare const Float32Array: Float32ArrayConstructor;
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float64Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float64Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float64Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float64ArrayConstructor {
- readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-}
-declare const Float64Array: Float64ArrayConstructor;
-
-/////////////////////////////
-/// ECMAScript Internationalization API
-/////////////////////////////
-
-declare module Intl {
- interface CollatorOptions {
- usage?: string;
- localeMatcher?: string;
- numeric?: boolean;
- caseFirst?: string;
- sensitivity?: string;
- ignorePunctuation?: boolean;
- }
-
- interface ResolvedCollatorOptions {
- locale: string;
- usage: string;
- sensitivity: string;
- ignorePunctuation: boolean;
- collation: string;
- caseFirst: string;
- numeric: boolean;
- }
-
- interface Collator {
- compare(x: string, y: string): number;
- resolvedOptions(): ResolvedCollatorOptions;
- }
- var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
- (locales?: string | string[], options?: CollatorOptions): Collator;
- supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
- }
-
- interface NumberFormatOptions {
- localeMatcher?: string;
- style?: string;
- currency?: string;
- currencyDisplay?: string;
- useGrouping?: boolean;
- minimumIntegerDigits?: number;
- minimumFractionDigits?: number;
- maximumFractionDigits?: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- }
-
- interface ResolvedNumberFormatOptions {
- locale: string;
- numberingSystem: string;
- style: string;
- currency?: string;
- currencyDisplay?: string;
- minimumIntegerDigits: number;
- minimumFractionDigits: number;
- maximumFractionDigits: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- useGrouping: boolean;
- }
-
- interface NumberFormat {
- format(value: number): string;
- resolvedOptions(): ResolvedNumberFormatOptions;
- }
- var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
- }
-
- interface DateTimeFormatOptions {
- localeMatcher?: string;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- formatMatcher?: string;
- hour12?: boolean;
- timeZone?: string;
- }
-
- interface ResolvedDateTimeFormatOptions {
- locale: string;
- calendar: string;
- numberingSystem: string;
- timeZone: string;
- hour12?: boolean;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- }
-
- interface DateTimeFormat {
- format(date?: Date | number): string;
- resolvedOptions(): ResolvedDateTimeFormatOptions;
- }
- var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
- }
-}
-
-interface String {
- /**
- * Determines whether two strings are equivalent in the current or specified locale.
- * @param that String to compare to target string
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
- * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
- */
- localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
-}
-
-interface Number {
- /**
- * Converts a number to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
-}
-
-interface Date {
- /**
- * Converts a date and time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
- /**
- * Converts a date to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-
- /**
- * Converts a time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare const NaN: number;
+declare const Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+declare function parseInt(s: string, radix?: number): number;
+
+/**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an encoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an encoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string): string;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get? (): any;
+ set? (v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [s: string]: PropertyDescriptor;
+}
+
+interface Object {
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
+ constructor: Function;
+
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: string): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: string): boolean;
+}
+
+interface ObjectConstructor {
+ new (value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ readonly prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype or that has null prototype.
+ * @param o Object to use as a prototype. May be null.
+ */
+ create(o: object | null): any;
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty(o: any, p: string, attributes: PropertyDescriptor & ThisType<any>): any;
+
+ /**
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
+ */
+ defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ seal<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(a: T[]): ReadonlyArray<T>;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T extends Function>(f: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: any): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare const Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(this: Function, thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /** Returns a string representation of a function. */
+ toString(): string;
+
+ prototype: any;
+ readonly length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): Function;
+ (...args: string[]): Function;
+ readonly prototype: Function;
+}
+
+declare const Function: FunctionConstructor;
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string | RegExp): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string | RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string | RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ readonly length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ readonly [index: number]: string;
+}
+
+interface StringConstructor {
+ new (value?: any): String;
+ (value?: any): string;
+ readonly prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare const String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new (value?: any): Boolean;
+ (value?: any): boolean;
+ readonly prototype: Boolean;
+}
+
+declare const Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new (value?: any): Number;
+ (value?: any): number;
+ readonly prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ readonly MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ readonly MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ readonly NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ readonly NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ readonly POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare const Number: NumberConstructor;
+
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: ReadonlyArray<string>;
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ readonly E: number;
+ /** The natural logarithm of 10. */
+ readonly LN10: number;
+ /** The natural logarithm of 2. */
+ readonly LN2: number;
+ /** The base-2 logarithm of e. */
+ readonly LOG2E: number;
+ /** The base-10 logarithm of e. */
+ readonly LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ readonly PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ readonly SQRT1_2: number;
+ /** The square root of 2. */
+ readonly SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest number greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest number less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest number.
+ * @param x The value to be rounded to the nearest number.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare const Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new (): Date;
+ new (value: number): Date;
+ new (value: string): Date;
+ new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ readonly prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as an number between 0 and 11 (January to December).
+ * @param date The date as an number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
+ * @param ms An number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare const Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ index?: number;
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ index: number;
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray | null;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ readonly source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ readonly global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ readonly ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ readonly multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ compile(): this;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp | string): RegExp;
+ new (pattern: string, flags?: string): RegExp;
+ (pattern: RegExp | string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ readonly prototype: RegExp;
+
+ // Non-standard extensions
+ $1: string;
+ $2: string;
+ $3: string;
+ $4: string;
+ $5: string;
+ $6: string;
+ $7: string;
+ $8: string;
+ $9: string;
+ lastMatch: string;
+}
+
+declare const RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+ stack?: string;
+}
+
+interface ErrorConstructor {
+ new (message?: string): Error;
+ (message?: string): Error;
+ readonly prototype: Error;
+}
+
+declare const Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor {
+ new (message?: string): EvalError;
+ (message?: string): EvalError;
+ readonly prototype: EvalError;
+}
+
+declare const EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor {
+ new (message?: string): RangeError;
+ (message?: string): RangeError;
+ readonly prototype: RangeError;
+}
+
+declare const RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor {
+ new (message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ readonly prototype: ReferenceError;
+}
+
+declare const ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor {
+ new (message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ readonly prototype: SyntaxError;
+}
+
+declare const SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor {
+ new (message?: string): TypeError;
+ (message?: string): TypeError;
+ readonly prototype: TypeError;
+}
+
+declare const TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor {
+ new (message?: string): URIError;
+ (message?: string): URIError;
+ readonly prototype: URIError;
+}
+
+declare const URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
+}
+
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare const JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S): S[];
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: undefined): S[];
+ filter<Z, S extends T>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: Z): S[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Appends new elements to an array, and returns the new length of the array.
+ * @param items New elements of the Array.
+ */
+ push(...items: T[]): number;
+ /**
+ * Removes the last element from an array and returns it.
+ */
+ pop(): T | undefined;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): T[];
+ /**
+ * Removes the first element from an array and returns it.
+ */
+ shift(): T | undefined;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: T, b: T) => number): this;
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ */
+ splice(start: number, deleteCount?: number): T[];
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ */
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
+ /**
+ * Inserts new elements at the start of an array.
+ * @param items Elements to insert at the start of the Array.
+ */
+ unshift(...items: T[]): number;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U];
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U];
+ map<Z, U>(this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U];
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U];
+ map<Z, U>(this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U];
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U];
+ map<Z, U>(this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U];
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U];
+ map<Z, U>(this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new (arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is Array<any>;
+ readonly prototype: Array<any>;
+}
+
+declare const Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+}
+
+interface ArrayLike<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+}
+
+/**
+ * Make all properties in T optional
+ */
+type Partial<T> = {
+ [P in keyof T]?: T[P];
+};
+
+/**
+ * Make all properties in T readonly
+ */
+type Readonly<T> = {
+ readonly [P in keyof T]: T[P];
+};
+
+/**
+ * From T pick a set of properties K
+ */
+type Pick<T, K extends keyof T> = {
+ [P in K]: T[P];
+};
+
+/**
+ * Construct a type with a set of properties K of type T
+ */
+type Record<K extends string, T> = {
+ [P in K]: T;
+};
+
+/**
+ * Marker for contextual 'this' type
+ */
+interface ThisType<T> { }
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin: number, end?: number): ArrayBuffer;
+}
+
+interface ArrayBufferConstructor {
+ readonly prototype: ArrayBuffer;
+ new (byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare const ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt8(byteOffset: number): number;
+
+ /**
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
+ /**
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint8(byteOffset: number): number;
+
+ /**
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Stores an Float32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Float64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setInt8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Int16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setUint8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
+}
+
+interface DataViewConstructor {
+ new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+}
+declare const DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any): Int8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any, thisArg: undefined): Int8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => any, thisArg: Z): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number): Int8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: undefined): Int8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => number, thisArg: Z): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ readonly prototype: Int8Array;
+ new (length: number): Int8Array;
+ new (array: ArrayLike<number>): Int8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array;
+
+ from(arrayLike: ArrayLike<number>): Int8Array;
+
+}
+declare const Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any): Uint8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any, thisArg: undefined): Uint8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => any, thisArg: Z): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number): Uint8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: undefined): Uint8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => number, thisArg: Z): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ readonly prototype: Uint8Array;
+ new (length: number): Uint8Array;
+ new (array: ArrayLike<number>): Uint8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array;
+
+ from(arrayLike: ArrayLike<number>): Uint8Array;
+
+}
+declare const Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any): Uint8ClampedArray;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: undefined): Uint8ClampedArray;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number): Uint8ClampedArray;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: undefined): Uint8ClampedArray;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: Uint8ClampedArray, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ readonly prototype: Uint8ClampedArray;
+ new (length: number): Uint8ClampedArray;
+ new (array: ArrayLike<number>): Uint8ClampedArray;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray;
+
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
+}
+declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any): Int16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any, thisArg: undefined): Int16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => any, thisArg: Z): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number): Int16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: undefined): Int16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => number, thisArg: Z): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ readonly prototype: Int16Array;
+ new (length: number): Int16Array;
+ new (array: ArrayLike<number>): Int16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array;
+
+ from(arrayLike: ArrayLike<number>): Int16Array;
+
+}
+declare const Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any): Uint16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any, thisArg: undefined): Uint16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => any, thisArg: Z): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number): Uint16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: undefined): Uint16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => number, thisArg: Z): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ readonly prototype: Uint16Array;
+ new (length: number): Uint16Array;
+ new (array: ArrayLike<number>): Uint16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array;
+
+ from(arrayLike: ArrayLike<number>): Uint16Array;
+
+}
+declare const Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any): Int32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any, thisArg: undefined): Int32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => any, thisArg: Z): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number): Int32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number, thisArg: undefined): Int32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => number, thisArg: Z): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ readonly prototype: Int32Array;
+ new (length: number): Int32Array;
+ new (array: ArrayLike<number>): Int32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array;
+
+ from(arrayLike: ArrayLike<number>): Int32Array;
+}
+declare const Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any): Uint32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any, thisArg: undefined): Uint32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => any, thisArg: Z): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number): Uint32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: undefined): Uint32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => number, thisArg: Z): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ readonly prototype: Uint32Array;
+ new (length: number): Uint32Array;
+ new (array: ArrayLike<number>): Uint32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array;
+
+ from(arrayLike: ArrayLike<number>): Uint32Array;
+}
+declare const Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any): Float32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any, thisArg: undefined): Float32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => any, thisArg: Z): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number): Float32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: undefined): Float32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => number, thisArg: Z): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ readonly prototype: Float32Array;
+ new (length: number): Float32Array;
+ new (array: ArrayLike<number>): Float32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array;
+
+ from(arrayLike: ArrayLike<number>): Float32Array;
+
+}
+declare const Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any): Float64Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any, thisArg: undefined): Float64Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => any, thisArg: Z): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number): Float64Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number, thisArg: undefined): Float64Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => number, thisArg: Z): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float64Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ readonly prototype: Float64Array;
+ new (length: number): Float64Array;
+ new (array: ArrayLike<number>): Float64Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float64Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array;
+
+ from(arrayLike: ArrayLike<number>): Float64Array;
+}
+declare const Float64Array: Float64ArrayConstructor;
+
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare namespace Intl {
+ interface CollatorOptions {
+ usage?: string;
+ localeMatcher?: string;
+ numeric?: boolean;
+ caseFirst?: string;
+ sensitivity?: string;
+ ignorePunctuation?: boolean;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new (locales?: string | string[], options?: CollatorOptions): Collator;
+ (locales?: string | string[], options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
+ };
+
+ interface NumberFormatOptions {
+ localeMatcher?: string;
+ style?: string;
+ currency?: string;
+ currencyDisplay?: string;
+ useGrouping?: boolean;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ currencyDisplay?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
+ };
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: string;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ formatMatcher?: string;
+ hour12?: boolean;
+ timeZone?: string;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
+ };
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current or specified locale.
+ * @param that String to compare to target string
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+}
diff --git a/node_modules/typescript/lib/lib.es6.d.ts b/node_modules/typescript/lib/lib.es6.d.ts
index e2b9565d8..9136af437 100644
--- a/node_modules/typescript/lib/lib.es6.d.ts
+++ b/node_modules/typescript/lib/lib.es6.d.ts
@@ -1,19950 +1,21514 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-/////////////////////////////
-/// ECMAScript APIs
-/////////////////////////////
-
-declare const NaN: number;
-declare const Infinity: number;
-
-/**
- * Evaluates JavaScript code and executes it.
- * @param x A String value that contains valid JavaScript code.
- */
-declare function eval(x: string): any;
-
-/**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
-declare function parseInt(s: string, radix?: number): number;
-
-/**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
-declare function parseFloat(string: string): number;
-
-/**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
- * @param number A numeric value.
- */
-declare function isNaN(number: number): boolean;
-
-/**
- * Determines whether a supplied number is finite.
- * @param number Any numeric value.
- */
-declare function isFinite(number: number): boolean;
-
-/**
- * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
- * @param encodedURI A value representing an encoded URI.
- */
-declare function decodeURI(encodedURI: string): string;
-
-/**
- * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
- * @param encodedURIComponent A value representing an encoded URI component.
- */
-declare function decodeURIComponent(encodedURIComponent: string): string;
-
-/**
- * Encodes a text string as a valid Uniform Resource Identifier (URI)
- * @param uri A value representing an encoded URI.
- */
-declare function encodeURI(uri: string): string;
-
-/**
- * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
- * @param uriComponent A value representing an encoded URI component.
- */
-declare function encodeURIComponent(uriComponent: string): string;
-
-interface PropertyDescriptor {
- configurable?: boolean;
- enumerable?: boolean;
- value?: any;
- writable?: boolean;
- get? (): any;
- set? (v: any): void;
-}
-
-interface PropertyDescriptorMap {
- [s: string]: PropertyDescriptor;
-}
-
-interface Object {
- /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
- constructor: Function;
-
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns a date converted to a string using the current locale. */
- toLocaleString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: string): boolean;
-
- /**
- * Determines whether an object exists in another object's prototype chain.
- * @param v Another object whose prototype chain is to be checked.
- */
- isPrototypeOf(v: Object): boolean;
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: string): boolean;
-}
-
-interface ObjectConstructor {
- new (value?: any): Object;
- (): any;
- (value: any): any;
-
- /** A reference to the prototype for a class of objects. */
- readonly prototype: Object;
-
- /**
- * Returns the prototype of an object.
- * @param o The object that references the prototype.
- */
- getPrototypeOf(o: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
-
- /**
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
- * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
- * @param o Object that contains the own properties.
- */
- getOwnPropertyNames(o: any): string[];
-
- /**
- * Creates an object that has null prototype.
- * @param o Object to use as a prototype. May be null
- */
- create(o: null): any;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- */
- create<T>(o: T): T;
-
- /**
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
- * @param o Object to use as a prototype. May be null
- * @param properties JavaScript object that contains one or more property descriptors.
- */
- create(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
- */
- defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
-
- /**
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
- * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
- * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
- */
- defineProperties(o: any, properties: PropertyDescriptorMap): any;
-
- /**
- * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- seal<T>(o: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(a: T[]): ReadonlyArray<T>;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T extends Function>(f: T): T;
-
- /**
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
- */
- freeze<T>(o: T): Readonly<T>;
-
- /**
- * Prevents the addition of new properties to an object.
- * @param o Object to make non-extensible.
- */
- preventExtensions<T>(o: T): T;
-
- /**
- * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isSealed(o: any): boolean;
-
- /**
- * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
- * @param o Object to test.
- */
- isFrozen(o: any): boolean;
-
- /**
- * Returns a value that indicates whether new properties can be added to an object.
- * @param o Object to test.
- */
- isExtensible(o: any): boolean;
-
- /**
- * Returns the names of the enumerable properties and methods of an object.
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
- */
- keys(o: any): string[];
-}
-
-/**
- * Provides functionality common to all JavaScript objects.
- */
-declare const Object: ObjectConstructor;
-
-/**
- * Creates a new function.
- */
-interface Function {
- /**
- * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
- * @param thisArg The object to be used as the this object.
- * @param argArray A set of arguments to be passed to the function.
- */
- apply(this: Function, thisArg: any, argArray?: any): any;
-
- /**
- * Calls a method of an object, substituting another object for the current object.
- * @param thisArg The object to be used as the current object.
- * @param argArray A list of arguments to be passed to the method.
- */
- call(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /**
- * For a given function, creates a bound function that has the same body as the original function.
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
- * @param thisArg An object to which the this keyword can refer inside the new function.
- * @param argArray A list of arguments to be passed to the new function.
- */
- bind(this: Function, thisArg: any, ...argArray: any[]): any;
-
- /** Returns a string representation of a function. */
- toString(): string;
-
- prototype: any;
- readonly length: number;
-
- // Non-standard extensions
- arguments: any;
- caller: Function;
-}
-
-interface FunctionConstructor {
- /**
- * Creates a new function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): Function;
- (...args: string[]): Function;
- readonly prototype: Function;
-}
-
-declare const Function: FunctionConstructor;
-
-interface IArguments {
- [index: number]: any;
- length: number;
- callee: Function;
-}
-
-interface String {
- /** Returns a string representation of a string. */
- toString(): string;
-
- /**
- * Returns the character at the specified index.
- * @param pos The zero-based index of the desired character.
- */
- charAt(pos: number): string;
-
- /**
- * Returns the Unicode value of the character at the specified location.
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
- */
- charCodeAt(index: number): number;
-
- /**
- * Returns a string that contains the concatenation of two or more strings.
- * @param strings The strings to append to the end of the string.
- */
- concat(...strings: string[]): string;
-
- /**
- * Returns the position of the first occurrence of a substring.
- * @param searchString The substring to search for in the string
- * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
- */
- indexOf(searchString: string, position?: number): number;
-
- /**
- * Returns the last occurrence of a substring in the string.
- * @param searchString The substring to search for.
- * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
- */
- lastIndexOf(searchString: string, position?: number): number;
-
- /**
- * Determines whether two strings are equivalent in the current locale.
- * @param that String to compare to target string
- */
- localeCompare(that: string): number;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
- */
- match(regexp: string): RegExpMatchArray | null;
-
- /**
- * Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
- */
- match(regexp: RegExp): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string that represents the regular expression.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: RegExp, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: string): number;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
- */
- search(regexp: RegExp): number;
-
- /**
- * Returns a section of a string.
- * @param start The index to the beginning of the specified portion of stringObj.
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
- * If this value is not specified, the substring continues to the end of stringObj.
- */
- slice(start?: number, end?: number): string;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: string, limit?: number): string[];
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(separator: RegExp, limit?: number): string[];
-
- /**
- * Returns the substring at the specified location within a String object.
- * @param start The zero-based index number indicating the beginning of the substring.
- * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
- * If end is omitted, the characters from start through the end of the original string are returned.
- */
- substring(start: number, end?: number): string;
-
- /** Converts all the alphabetic characters in a string to lowercase. */
- toLowerCase(): string;
-
- /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
- toLocaleLowerCase(): string;
-
- /** Converts all the alphabetic characters in a string to uppercase. */
- toUpperCase(): string;
-
- /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
- toLocaleUpperCase(): string;
-
- /** Removes the leading and trailing white space and line terminator characters from a string. */
- trim(): string;
-
- /** Returns the length of a String object. */
- readonly length: number;
-
- // IE extensions
- /**
- * Gets a substring beginning at the specified location and having the specified length.
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
- * @param length The number of characters to include in the returned substring.
- */
- substr(from: number, length?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): string;
-
- readonly [index: number]: string;
-}
-
-interface StringConstructor {
- new (value?: any): String;
- (value?: any): string;
- readonly prototype: String;
- fromCharCode(...codes: number[]): string;
-}
-
-/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
- */
-declare const String: StringConstructor;
-
-interface Boolean {
- /** Returns the primitive value of the specified object. */
- valueOf(): boolean;
-}
-
-interface BooleanConstructor {
- new (value?: any): Boolean;
- (value?: any): boolean;
- readonly prototype: Boolean;
-}
-
-declare const Boolean: BooleanConstructor;
-
-interface Number {
- /**
- * Returns a string representation of an object.
- * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
- */
- toString(radix?: number): string;
-
- /**
- * Returns a string representing a number in fixed-point notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toFixed(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented in exponential notation.
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
- */
- toExponential(fractionDigits?: number): string;
-
- /**
- * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
- */
- toPrecision(precision?: number): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): number;
-}
-
-interface NumberConstructor {
- new (value?: any): Number;
- (value?: any): number;
- readonly prototype: Number;
-
- /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
- readonly MAX_VALUE: number;
-
- /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
- readonly MIN_VALUE: number;
-
- /**
- * A value that is not a number.
- * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
- */
- readonly NaN: number;
-
- /**
- * A value that is less than the largest negative number that can be represented in JavaScript.
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
- */
- readonly NEGATIVE_INFINITY: number;
-
- /**
- * A value greater than the largest number that can be represented in JavaScript.
- * JavaScript displays POSITIVE_INFINITY values as infinity.
- */
- readonly POSITIVE_INFINITY: number;
-}
-
-/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
-declare const Number: NumberConstructor;
-
-interface TemplateStringsArray extends ReadonlyArray<string> {
- readonly raw: ReadonlyArray<string>
-}
-
-interface Math {
- /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
- readonly E: number;
- /** The natural logarithm of 10. */
- readonly LN10: number;
- /** The natural logarithm of 2. */
- readonly LN2: number;
- /** The base-2 logarithm of e. */
- readonly LOG2E: number;
- /** The base-10 logarithm of e. */
- readonly LOG10E: number;
- /** Pi. This is the ratio of the circumference of a circle to its diameter. */
- readonly PI: number;
- /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
- readonly SQRT1_2: number;
- /** The square root of 2. */
- readonly SQRT2: number;
- /**
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
- * For example, the absolute value of -5 is the same as the absolute value of 5.
- * @param x A numeric expression for which the absolute value is needed.
- */
- abs(x: number): number;
- /**
- * Returns the arc cosine (or inverse cosine) of a number.
- * @param x A numeric expression.
- */
- acos(x: number): number;
- /**
- * Returns the arcsine of a number.
- * @param x A numeric expression.
- */
- asin(x: number): number;
- /**
- * Returns the arctangent of a number.
- * @param x A numeric expression for which the arctangent is needed.
- */
- atan(x: number): number;
- /**
- * Returns the angle (in radians) from the X axis to a point.
- * @param y A numeric expression representing the cartesian y-coordinate.
- * @param x A numeric expression representing the cartesian x-coordinate.
- */
- atan2(y: number, x: number): number;
- /**
- * Returns the smallest number greater than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- ceil(x: number): number;
- /**
- * Returns the cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cos(x: number): number;
- /**
- * Returns e (the base of natural logarithms) raised to a power.
- * @param x A numeric expression representing the power of e.
- */
- exp(x: number): number;
- /**
- * Returns the greatest number less than or equal to its numeric argument.
- * @param x A numeric expression.
- */
- floor(x: number): number;
- /**
- * Returns the natural logarithm (base e) of a number.
- * @param x A numeric expression.
- */
- log(x: number): number;
- /**
- * Returns the larger of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- max(...values: number[]): number;
- /**
- * Returns the smaller of a set of supplied numeric expressions.
- * @param values Numeric expressions to be evaluated.
- */
- min(...values: number[]): number;
- /**
- * Returns the value of a base expression taken to a specified power.
- * @param x The base value of the expression.
- * @param y The exponent value of the expression.
- */
- pow(x: number, y: number): number;
- /** Returns a pseudorandom number between 0 and 1. */
- random(): number;
- /**
- * Returns a supplied numeric expression rounded to the nearest number.
- * @param x The value to be rounded to the nearest number.
- */
- round(x: number): number;
- /**
- * Returns the sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sin(x: number): number;
- /**
- * Returns the square root of a number.
- * @param x A numeric expression.
- */
- sqrt(x: number): number;
- /**
- * Returns the tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tan(x: number): number;
-}
-/** An intrinsic object that provides basic mathematics functionality and constants. */
-declare const Math: Math;
-
-/** Enables basic storage and retrieval of dates and times. */
-interface Date {
- /** Returns a string representation of a date. The format of the string depends on the locale. */
- toString(): string;
- /** Returns a date as a string value. */
- toDateString(): string;
- /** Returns a time as a string value. */
- toTimeString(): string;
- /** Returns a value as a string value appropriate to the host environment's current locale. */
- toLocaleString(): string;
- /** Returns a date as a string value appropriate to the host environment's current locale. */
- toLocaleDateString(): string;
- /** Returns a time as a string value appropriate to the host environment's current locale. */
- toLocaleTimeString(): string;
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
- valueOf(): number;
- /** Gets the time value in milliseconds. */
- getTime(): number;
- /** Gets the year, using local time. */
- getFullYear(): number;
- /** Gets the year using Universal Coordinated Time (UTC). */
- getUTCFullYear(): number;
- /** Gets the month, using local time. */
- getMonth(): number;
- /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
- getUTCMonth(): number;
- /** Gets the day-of-the-month, using local time. */
- getDate(): number;
- /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
- getUTCDate(): number;
- /** Gets the day of the week, using local time. */
- getDay(): number;
- /** Gets the day of the week using Universal Coordinated Time (UTC). */
- getUTCDay(): number;
- /** Gets the hours in a date, using local time. */
- getHours(): number;
- /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
- getUTCHours(): number;
- /** Gets the minutes of a Date object, using local time. */
- getMinutes(): number;
- /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
- getUTCMinutes(): number;
- /** Gets the seconds of a Date object, using local time. */
- getSeconds(): number;
- /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCSeconds(): number;
- /** Gets the milliseconds of a Date, using local time. */
- getMilliseconds(): number;
- /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
- getUTCMilliseconds(): number;
- /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
- getTimezoneOffset(): number;
- /**
- * Sets the date and time value in the Date object.
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
- */
- setTime(time: number): number;
- /**
- * Sets the milliseconds value in the Date object using local time.
- * @param ms A numeric value equal to the millisecond value.
- */
- setMilliseconds(ms: number): number;
- /**
- * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- * @param ms A numeric value equal to the millisecond value.
- */
- setUTCMilliseconds(ms: number): number;
-
- /**
- * Sets the seconds value in the Date object using local time.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setSeconds(sec: number, ms?: number): number;
- /**
- * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCSeconds(sec: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using local time.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCMinutes(min: number, sec?: number, ms?: number): number;
- /**
- * Sets the hour value in the Date object using local time.
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
- * @param hours A numeric value equal to the hours value.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
- * @param ms A numeric value equal to the milliseconds value.
- */
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
- /**
- * Sets the numeric day-of-the-month value of the Date object using local time.
- * @param date A numeric value equal to the day of the month.
- */
- setDate(date: number): number;
- /**
- * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- * @param date A numeric value equal to the day of the month.
- */
- setUTCDate(date: number): number;
- /**
- * Sets the month value in the Date object using local time.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
- */
- setMonth(month: number, date?: number): number;
- /**
- * Sets the month value in the Date object using Universal Coordinated Time (UTC).
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
- */
- setUTCMonth(month: number, date?: number): number;
- /**
- * Sets the year of the Date object using local time.
- * @param year A numeric value for the year.
- * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
- * @param date A numeric value equal for the day of the month.
- */
- setFullYear(year: number, month?: number, date?: number): number;
- /**
- * Sets the year value in the Date object using Universal Coordinated Time (UTC).
- * @param year A numeric value equal to the year.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
- * @param date A numeric value equal to the day of the month.
- */
- setUTCFullYear(year: number, month?: number, date?: number): number;
- /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
- toUTCString(): string;
- /** Returns a date as a string value in ISO format. */
- toISOString(): string;
- /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
- toJSON(key?: any): string;
-}
-
-interface DateConstructor {
- new (): Date;
- new (value: number): Date;
- new (value: string): Date;
- new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
- (): string;
- readonly prototype: Date;
- /**
- * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
- * @param s A date string
- */
- parse(s: string): number;
- /**
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
- * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
- * @param month The month as an number between 0 and 11 (January to December).
- * @param date The date as an number between 1 and 31.
- * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
- * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
- * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
- * @param ms An number from 0 to 999 that specifies the milliseconds.
- */
- UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
- now(): number;
-}
-
-declare const Date: DateConstructor;
-
-interface RegExpMatchArray extends Array<string> {
- index?: number;
- input?: string;
-}
-
-interface RegExpExecArray extends Array<string> {
- index: number;
- input: string;
-}
-
-interface RegExp {
- /**
- * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
- * @param string The String object or string literal on which to perform the search.
- */
- exec(string: string): RegExpExecArray | null;
-
- /**
- * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
- * @param string String on which to perform the search.
- */
- test(string: string): boolean;
-
- /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
- readonly source: string;
-
- /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
- readonly global: boolean;
-
- /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
- readonly ignoreCase: boolean;
-
- /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
- readonly multiline: boolean;
-
- lastIndex: number;
-
- // Non-standard extensions
- compile(): this;
-}
-
-interface RegExpConstructor {
- new (pattern: RegExp): RegExp;
- new (pattern: string, flags?: string): RegExp;
- (pattern: RegExp): RegExp;
- (pattern: string, flags?: string): RegExp;
- readonly prototype: RegExp;
-
- // Non-standard extensions
- $1: string;
- $2: string;
- $3: string;
- $4: string;
- $5: string;
- $6: string;
- $7: string;
- $8: string;
- $9: string;
- lastMatch: string;
-}
-
-declare const RegExp: RegExpConstructor;
-
-interface Error {
- name: string;
- message: string;
- stack?: string;
-}
-
-interface ErrorConstructor {
- new (message?: string): Error;
- (message?: string): Error;
- readonly prototype: Error;
-}
-
-declare const Error: ErrorConstructor;
-
-interface EvalError extends Error {
-}
-
-interface EvalErrorConstructor {
- new (message?: string): EvalError;
- (message?: string): EvalError;
- readonly prototype: EvalError;
-}
-
-declare const EvalError: EvalErrorConstructor;
-
-interface RangeError extends Error {
-}
-
-interface RangeErrorConstructor {
- new (message?: string): RangeError;
- (message?: string): RangeError;
- readonly prototype: RangeError;
-}
-
-declare const RangeError: RangeErrorConstructor;
-
-interface ReferenceError extends Error {
-}
-
-interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
- (message?: string): ReferenceError;
- readonly prototype: ReferenceError;
-}
-
-declare const ReferenceError: ReferenceErrorConstructor;
-
-interface SyntaxError extends Error {
-}
-
-interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
- (message?: string): SyntaxError;
- readonly prototype: SyntaxError;
-}
-
-declare const SyntaxError: SyntaxErrorConstructor;
-
-interface TypeError extends Error {
-}
-
-interface TypeErrorConstructor {
- new (message?: string): TypeError;
- (message?: string): TypeError;
- readonly prototype: TypeError;
-}
-
-declare const TypeError: TypeErrorConstructor;
-
-interface URIError extends Error {
-}
-
-interface URIErrorConstructor {
- new (message?: string): URIError;
- (message?: string): URIError;
- readonly prototype: URIError;
-}
-
-declare const URIError: URIErrorConstructor;
-
-interface JSON {
- /**
- * Converts a JavaScript Object Notation (JSON) string into an object.
- * @param text A valid JSON string.
- * @param reviver A function that transforms the results. This function is called for each member of the object.
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
- */
- parse(text: string, reviver?: (key: any, value: any) => any): any;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer A function that transforms the results.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
- */
- stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
-}
-
-/**
- * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
- */
-declare const JSON: JSON;
-
-
-/////////////////////////////
-/// ECMAScript Array API (specially handled by compiler)
-/////////////////////////////
-
-interface ReadonlyArray<T> {
- /**
- * Gets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- readonly length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
-
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter<S extends T>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg?: any): S[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
-
- readonly [n: number]: T;
-}
-
-interface Array<T> {
- /**
- * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
- */
- length: number;
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
- toLocaleString(): string;
- /**
- * Appends new elements to an array, and returns the new length of the array.
- * @param items New elements of the Array.
- */
- push(...items: T[]): number;
- /**
- * Removes the last element from an array and returns it.
- */
- pop(): T | undefined;
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: T[][]): T[];
- /**
- * Combines two or more arrays.
- * @param items Additional items to add to the end of array1.
- */
- concat(...items: (T | T[])[]): T[];
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
- /**
- * Reverses the elements in an Array.
- */
- reverse(): T[];
- /**
- * Removes the first element from an array and returns it.
- */
- shift(): T | undefined;
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): T[];
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: T, b: T) => number): this;
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- */
- splice(start: number): T[];
- /**
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
- * @param start The zero-based location in the array from which to start removing elements.
- * @param deleteCount The number of elements to remove.
- * @param items Elements to insert into the array in place of the deleted elements.
- */
- splice(start: number, deleteCount: number, ...items: T[]): T[];
- /**
- * Inserts new elements at the start of an array.
- * @param items Elements to insert at the start of the Array.
- */
- unshift(...items: T[]): number;
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
- */
- indexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Returns the index of the last occurrence of a specified value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
- */
- lastIndexOf(searchElement: T, fromIndex?: number): number;
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U];
- /**
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
-
- [n: number]: T;
-}
-
-interface ArrayConstructor {
- new (arrayLength?: number): any[];
- new <T>(arrayLength: number): T[];
- new <T>(...items: T[]): T[];
- (arrayLength?: number): any[];
- <T>(arrayLength: number): T[];
- <T>(...items: T[]): T[];
- isArray(arg: any): arg is Array<any>;
- readonly prototype: Array<any>;
-}
-
-declare const Array: ArrayConstructor;
-
-interface TypedPropertyDescriptor<T> {
- enumerable?: boolean;
- configurable?: boolean;
- writable?: boolean;
- value?: T;
- get?: () => T;
- set?: (value: T) => void;
-}
-
-declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
-declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
-declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
-declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
-
-declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
-
-interface PromiseLike<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then(
- onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): PromiseLike<T>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null,
- onrejected: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<T | TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(
- onfulfilled: (value: T) => TResult | PromiseLike<TResult>,
- onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): PromiseLike<TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult1, TResult2>(
- onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>,
- onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
-}
-
-interface ArrayLike<T> {
- readonly length: number;
- readonly [n: number]: T;
-}
-
-/**
- * Make all properties in T optional
- */
-type Partial<T> = {
- [P in keyof T]?: T[P];
-};
-
-/**
- * Make all properties in T readonly
- */
-type Readonly<T> = {
- readonly [P in keyof T]: T[P];
-};
-
-/**
- * From T pick a set of properties K
- */
-type Pick<T, K extends keyof T> = {
- [P in K]: T[P];
-}
-
-/**
- * Construct a type with a set of properties K of type T
- */
-type Record<K extends string, T> = {
- [P in K]: T;
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- /**
- * Read-only. The length of the ArrayBuffer (in bytes).
- */
- readonly byteLength: number;
-
- /**
- * Returns a section of an ArrayBuffer.
- */
- slice(begin:number, end?:number): ArrayBuffer;
-}
-
-interface ArrayBufferConstructor {
- readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
- isView(arg: any): arg is ArrayBufferView;
-}
-declare const ArrayBuffer: ArrayBufferConstructor;
-
-interface ArrayBufferView {
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- byteOffset: number;
-}
-
-interface DataView {
- readonly buffer: ArrayBuffer;
- readonly byteLength: number;
- readonly byteOffset: number;
- /**
- * Gets the Float32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Float64 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getFloat64(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Int8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt8(byteOffset: number): number;
-
- /**
- * Gets the Int16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt16(byteOffset: number, littleEndian?: boolean): number;
- /**
- * Gets the Int32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getInt32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint8(byteOffset: number): number;
-
- /**
- * Gets the Uint16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint16(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Gets the Uint32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
- * @param byteOffset The place in the buffer at which the value should be retrieved.
- */
- getUint32(byteOffset: number, littleEndian?: boolean): number;
-
- /**
- * Stores an Float32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Float64 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setInt8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Int16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Int32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint8 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- */
- setUint8(byteOffset: number, value: number): void;
-
- /**
- * Stores an Uint16 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
-
- /**
- * Stores an Uint32 value at the specified byte offset from the start of the view.
- * @param byteOffset The place in the buffer at which the value should be set.
- * @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
- * otherwise a little-endian value should be written.
- */
- setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
-}
-
-interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
-}
-declare const DataView: DataViewConstructor;
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-interface Int8ArrayConstructor {
- readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-
-}
-declare const Int8Array: Int8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ArrayConstructor {
- readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-
-}
-declare const Uint8Array: Uint8ArrayConstructor;
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint8ClampedArray;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: Uint8ClampedArray, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint8ClampedArray;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint8ClampedArray;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint8ClampedArrayConstructor {
- readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint8ClampedArray;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int16ArrayConstructor {
- readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-
-}
-declare const Int16Array: Int16ArrayConstructor;
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint16Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint16Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint16Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint16ArrayConstructor {
- readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-
-}
-declare const Uint16Array: Uint16ArrayConstructor;
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Int32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Int32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Int32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Int32ArrayConstructor {
- readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-declare const Int32Array: Int32ArrayConstructor;
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Uint32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Uint32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Uint32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Uint32ArrayConstructor {
- readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-declare const Uint32Array: Uint32ArrayConstructor;
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float32Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float32Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float32Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float32ArrayConstructor {
- readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-
-}
-declare const Float32Array: Float32ArrayConstructor;
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * The ArrayBuffer instance referenced by the array.
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * The length in bytes of the array.
- */
- readonly byteLength: number;
-
- /**
- * The offset in bytes of the array.
- */
- readonly byteOffset: number;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-
- /**
- * Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
- * or until the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: number, start?: number, end?: number): this;
-
- /**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
-
- /**
- * Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
-
- /**
- * Returns the index of the first occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- indexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
- * resulting String. If omitted, the array elements are separated with a comma.
- */
- join(separator?: string): string;
-
- /**
- * Returns the index of the last occurrence of a value in an array.
- * @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
- * search starts at index 0.
- */
- lastIndexOf(searchElement: number, fromIndex?: number): number;
-
- /**
- * The length of the array.
- */
- readonly length: number;
-
- /**
- * Calls a defined callback function on each element of an array, and returns an array that
- * contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
- * call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
- * callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
- * argument instead of an array value.
- */
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
-
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
- * argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
- * instead of an array value.
- */
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
-
- /**
- * Reverses the elements in an Array.
- */
- reverse(): Float64Array;
-
- /**
- * Sets a value or an array of values.
- * @param index The index of the location to set.
- * @param value The value to set.
- */
- set(index: number, value: number): void;
-
- /**
- * Sets a value or an array of values.
- * @param array A typed or untyped array of values to set.
- * @param offset The index in the current array at which the values are to be written.
- */
- set(array: ArrayLike<number>, offset?: number): void;
-
- /**
- * Returns a section of an array.
- * @param start The beginning of the specified portion of the array.
- * @param end The end of the specified portion of the array.
- */
- slice(start?: number, end?: number): Float64Array;
-
- /**
- * Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
- * the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
- * If thisArg is omitted, undefined is used as the this value.
- */
- some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
-
- /**
- * Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
- * omitted, the elements are sorted in ascending, ASCII character order.
- */
- sort(compareFn?: (a: number, b: number) => number): this;
-
- /**
- * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
- * @param begin The index of the beginning of the array.
- * @param end The index of the end of the array.
- */
- subarray(begin: number, end?: number): Float64Array;
-
- /**
- * Converts a number to a string by using the current locale.
- */
- toLocaleString(): string;
-
- /**
- * Returns a string representation of an array.
- */
- toString(): string;
-
- [index: number]: number;
-}
-
-interface Float64ArrayConstructor {
- readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
-
- /**
- * The size in bytes of each element in the array.
- */
- readonly BYTES_PER_ELEMENT: number;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of(...items: number[]): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-}
-declare const Float64Array: Float64ArrayConstructor;
-
-/////////////////////////////
-/// ECMAScript Internationalization API
-/////////////////////////////
-
-declare module Intl {
- interface CollatorOptions {
- usage?: string;
- localeMatcher?: string;
- numeric?: boolean;
- caseFirst?: string;
- sensitivity?: string;
- ignorePunctuation?: boolean;
- }
-
- interface ResolvedCollatorOptions {
- locale: string;
- usage: string;
- sensitivity: string;
- ignorePunctuation: boolean;
- collation: string;
- caseFirst: string;
- numeric: boolean;
- }
-
- interface Collator {
- compare(x: string, y: string): number;
- resolvedOptions(): ResolvedCollatorOptions;
- }
- var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
- (locales?: string | string[], options?: CollatorOptions): Collator;
- supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
- }
-
- interface NumberFormatOptions {
- localeMatcher?: string;
- style?: string;
- currency?: string;
- currencyDisplay?: string;
- useGrouping?: boolean;
- minimumIntegerDigits?: number;
- minimumFractionDigits?: number;
- maximumFractionDigits?: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- }
-
- interface ResolvedNumberFormatOptions {
- locale: string;
- numberingSystem: string;
- style: string;
- currency?: string;
- currencyDisplay?: string;
- minimumIntegerDigits: number;
- minimumFractionDigits: number;
- maximumFractionDigits: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
- useGrouping: boolean;
- }
-
- interface NumberFormat {
- format(value: number): string;
- resolvedOptions(): ResolvedNumberFormatOptions;
- }
- var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
- supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
- }
-
- interface DateTimeFormatOptions {
- localeMatcher?: string;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- formatMatcher?: string;
- hour12?: boolean;
- timeZone?: string;
- }
-
- interface ResolvedDateTimeFormatOptions {
- locale: string;
- calendar: string;
- numberingSystem: string;
- timeZone: string;
- hour12?: boolean;
- weekday?: string;
- era?: string;
- year?: string;
- month?: string;
- day?: string;
- hour?: string;
- minute?: string;
- second?: string;
- timeZoneName?: string;
- }
-
- interface DateTimeFormat {
- format(date?: Date | number): string;
- resolvedOptions(): ResolvedDateTimeFormatOptions;
- }
- var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
- supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
- }
-}
-
-interface String {
- /**
- * Determines whether two strings are equivalent in the current or specified locale.
- * @param that String to compare to target string
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
- * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
- */
- localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
-}
-
-interface Number {
- /**
- * Converts a number to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
-}
-
-interface Date {
- /**
- * Converts a date and time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
- /**
- * Converts a date to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-
- /**
- * Converts a time to a string by using the current or specified locale.
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
- * @param options An object that contains one or more properties that specify comparison options.
- */
- toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
-}
-
-
-declare type PropertyKey = string | number | symbol;
-
-interface Array<T> {
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: T, start?: number, end?: number): this;
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): this;
-}
-
-interface ArrayConstructor {
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
-
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- */
- from<T>(arrayLike: ArrayLike<T>): Array<T>;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of<T>(...items: T[]): Array<T>;
-}
-
-interface DateConstructor {
- new (value: Date): Date;
-}
-
-interface Function {
- /**
- * Returns the name of the function. Function names are read-only and can not be changed.
- */
- readonly name: string;
-}
-
-interface Math {
- /**
- * Returns the number of leading zero bits in the 32-bit binary representation of a number.
- * @param x A numeric expression.
- */
- clz32(x: number): number;
-
- /**
- * Returns the result of 32-bit multiplication of two numbers.
- * @param x First number
- * @param y Second number
- */
- imul(x: number, y: number): number;
-
- /**
- * Returns the sign of the x, indicating whether x is positive, negative or zero.
- * @param x The numeric expression to test
- */
- sign(x: number): number;
-
- /**
- * Returns the base 10 logarithm of a number.
- * @param x A numeric expression.
- */
- log10(x: number): number;
-
- /**
- * Returns the base 2 logarithm of a number.
- * @param x A numeric expression.
- */
- log2(x: number): number;
-
- /**
- * Returns the natural logarithm of 1 + x.
- * @param x A numeric expression.
- */
- log1p(x: number): number;
-
- /**
- * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
- * the natural logarithms).
- * @param x A numeric expression.
- */
- expm1(x: number): number;
-
- /**
- * Returns the hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cosh(x: number): number;
-
- /**
- * Returns the hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sinh(x: number): number;
-
- /**
- * Returns the hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tanh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- acosh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- asinh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- atanh(x: number): number;
-
- /**
- * Returns the square root of the sum of squares of its arguments.
- * @param values Values to compute the square root for.
- * If no arguments are passed, the result is +0.
- * If there is only one argument, the result is the absolute value.
- * If any argument is +Infinity or -Infinity, the result is +Infinity.
- * If any argument is NaN, the result is NaN.
- * If all arguments are either +0 or −0, the result is +0.
- */
- hypot(...values: number[] ): number;
-
- /**
- * Returns the integral part of the a numeric expression, x, removing any fractional digits.
- * If x is already an integer, the result is x.
- * @param x A numeric expression.
- */
- trunc(x: number): number;
-
- /**
- * Returns the nearest single precision float representation of a number.
- * @param x A numeric expression.
- */
- fround(x: number): number;
-
- /**
- * Returns an implementation-dependent approximation to the cube root of number.
- * @param x A numeric expression.
- */
- cbrt(x: number): number;
-}
-
-interface NumberConstructor {
- /**
- * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
- * that is representable as a Number value, which is approximately:
- * 2.2204460492503130808472633361816 x 10‍−‍16.
- */
- readonly EPSILON: number;
-
- /**
- * Returns true if passed value is finite.
- * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
- * number. Only finite values of the type number, result in true.
- * @param number A numeric value.
- */
- isFinite(number: number): boolean;
-
- /**
- * Returns true if the value passed is an integer, false otherwise.
- * @param number A numeric value.
- */
- isInteger(number: number): boolean;
-
- /**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
- * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
- * to a number. Only values of the type number, that are also NaN, result in true.
- * @param number A numeric value.
- */
- isNaN(number: number): boolean;
-
- /**
- * Returns true if the value passed is a safe integer.
- * @param number A numeric value.
- */
- isSafeInteger(number: number): boolean;
-
- /**
- * The value of the largest integer n such that n and n + 1 are both exactly representable as
- * a Number value.
- * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
- */
- readonly MAX_SAFE_INTEGER: number;
-
- /**
- * The value of the smallest integer n such that n and n − 1 are both exactly representable as
- * a Number value.
- * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
- */
- readonly MIN_SAFE_INTEGER: number;
-
- /**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
- parseFloat(string: string): number;
-
- /**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
- parseInt(string: string, radix?: number): number;
-}
-
-interface Object {
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: PropertyKey): boolean
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: PropertyKey): boolean;
-}
-
-interface ObjectConstructor {
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source The source object from which to copy properties.
- */
- assign<T, U>(target: T, source: U): T & U;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- */
- assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- * @param source3 The third source object from which to copy properties.
- */
- assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param sources One or more source objects from which to copy properties
- */
- assign(target: any, ...sources: any[]): any;
-
- /**
- * Returns an array of all symbol properties found directly on object o.
- * @param o Object to retrieve the symbols from.
- */
- getOwnPropertySymbols(o: any): symbol[];
-
- /**
- * Returns true if the values are the same value, false otherwise.
- * @param value1 The first value.
- * @param value2 The second value.
- */
- is(value1: any, value2: any): boolean;
-
- /**
- * Sets the prototype of a specified object o to object proto or null. Returns the object o.
- * @param o The object to change its prototype.
- * @param proto The value of the new prototype or null.
- */
- setPrototypeOf(o: any, proto: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not
- * inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript
- * object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor
- * property.
- */
- defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
-}
-
-interface ReadonlyArray<T> {
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg?: any): T | undefined;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and -1
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found,
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
-}
-
-interface RegExp {
- /**
- * Returns a string indicating the flags of the regular expression in question. This field is read-only.
- * The characters in this string are sequenced and concatenated in the following order:
- *
- * - "g" for global
- * - "i" for ignoreCase
- * - "m" for multiline
- * - "u" for unicode
- * - "y" for sticky
- *
- * If no flags are set, the value is the empty string.
- */
- readonly flags: string;
-
- /**
- * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
- * expression. Default is false. Read-only.
- */
- readonly sticky: boolean;
-
- /**
- * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
- * expression. Default is false. Read-only.
- */
- readonly unicode: boolean;
-}
-
-interface RegExpConstructor {
- new (pattern: RegExp, flags?: string): RegExp;
- (pattern: RegExp, flags?: string): RegExp;
-}
-
-interface String {
- /**
- * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
- * value of the UTF-16 encoded code point starting at the string element at position pos in
- * the String resulting from converting this object to a String.
- * If there is no element at that position, the result is undefined.
- * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
- */
- codePointAt(pos: number): number | undefined;
-
- /**
- * Returns true if searchString appears as a substring of the result of converting this
- * object to a String, at one or more positions that are
- * greater than or equal to position; otherwise, returns false.
- * @param searchString search string
- * @param position If position is undefined, 0 is assumed, so as to search all of the String.
- */
- includes(searchString: string, position?: number): boolean;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * endPosition – length(this). Otherwise returns false.
- */
- endsWith(searchString: string, endPosition?: number): boolean;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form?: string): string;
-
- /**
- * Returns a String value that is made from count copies appended together. If count is 0,
- * T is the empty String is returned.
- * @param count number of copies to append
- */
- repeat(count: number): string;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * position. Otherwise returns false.
- */
- startsWith(searchString: string, position?: number): boolean;
-
- /**
- * Returns an <a> HTML anchor element and sets the name attribute to the text value
- * @param name
- */
- anchor(name: string): string;
-
- /** Returns a <big> HTML element */
- big(): string;
-
- /** Returns a <blink> HTML element */
- blink(): string;
-
- /** Returns a <b> HTML element */
- bold(): string;
-
- /** Returns a <tt> HTML element */
- fixed(): string
-
- /** Returns a <font> HTML element and sets the color attribute value */
- fontcolor(color: string): string
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: number): string;
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: string): string;
-
- /** Returns an <i> HTML element */
- italics(): string;
-
- /** Returns an <a> HTML element and sets the href attribute value */
- link(url: string): string;
-
- /** Returns a <small> HTML element */
- small(): string;
-
- /** Returns a <strike> HTML element */
- strike(): string;
-
- /** Returns a <sub> HTML element */
- sub(): string;
-
- /** Returns a <sup> HTML element */
- sup(): string;
-}
-
-interface StringConstructor {
- /**
- * Return the String value whose elements are, in order, the elements in the List elements.
- * If length is 0, the empty string is returned.
- */
- fromCodePoint(...codePoints: number[]): string;
-
- /**
- * String.raw is intended for use as a tag function of a Tagged Template String. When called
- * as such the first argument will be a well formed template call site object and the rest
- * parameter will contain the substitution values.
- * @param template A well-formed template string call site representation.
- * @param substitutions A set of substitution values.
- */
- raw(template: TemplateStringsArray, ...substitutions: any[]): string;
-}
-
-
-interface Map<K, V> {
- clear(): void;
- delete(key: K): boolean;
- forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
- get(key: K): V | undefined;
- has(key: K): boolean;
- set(key: K, value?: V): this;
- readonly size: number;
-}
-
-interface MapConstructor {
- new (): Map<any, any>;
- new <K, V>(entries?: [K, V][]): Map<K, V>;
- readonly prototype: Map<any, any>;
-}
-declare var Map: MapConstructor;
-
-interface ReadonlyMap<K, V> {
- forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
- get(key: K): V|undefined;
- has(key: K): boolean;
- readonly size: number;
-}
-
-interface WeakMap<K, V> {
- delete(key: K): boolean;
- get(key: K): V | undefined;
- has(key: K): boolean;
- set(key: K, value?: V): this;
-}
-
-interface WeakMapConstructor {
- new (): WeakMap<any, any>;
- new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
- readonly prototype: WeakMap<any, any>;
-}
-declare var WeakMap: WeakMapConstructor;
-
-interface Set<T> {
- add(value: T): this;
- clear(): void;
- delete(value: T): boolean;
- forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
- has(value: T): boolean;
- readonly size: number;
-}
-
-interface SetConstructor {
- new (): Set<any>;
- new <T>(values?: T[]): Set<T>;
- readonly prototype: Set<any>;
-}
-declare var Set: SetConstructor;
-
-interface ReadonlySet<T> {
- forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
- has(value: T): boolean;
- readonly size: number;
-}
-
-interface WeakSet<T> {
- add(value: T): this;
- delete(value: T): boolean;
- has(value: T): boolean;
-}
-
-interface WeakSetConstructor {
- new (): WeakSet<any>;
- new <T>(values?: T[]): WeakSet<T>;
- readonly prototype: WeakSet<any>;
-}
-declare var WeakSet: WeakSetConstructor;
-
-
-interface GeneratorFunction extends Function { }
-
-interface GeneratorFunctionConstructor {
- /**
- * Creates a new Generator function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): GeneratorFunction;
- (...args: string[]): GeneratorFunction;
- readonly prototype: GeneratorFunction;
-}
-declare var GeneratorFunction: GeneratorFunctionConstructor;
-
-
-/// <reference path="lib.es2015.symbol.d.ts" />
-
-interface SymbolConstructor {
- /**
- * A method that returns the default iterator for an object. Called by the semantics of the
- * for-of statement.
- */
- readonly iterator: symbol;
-}
-
-interface IteratorResult<T> {
- done: boolean;
- value: T;
-}
-
-interface Iterator<T> {
- next(value?: any): IteratorResult<T>;
- return?(value?: any): IteratorResult<T>;
- throw?(e?: any): IteratorResult<T>;
-}
-
-interface Iterable<T> {
- [Symbol.iterator](): Iterator<T>;
-}
-
-interface IterableIterator<T> extends Iterator<T> {
- [Symbol.iterator](): IterableIterator<T>;
-}
-
-interface Array<T> {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<T>;
-
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, T]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<T>;
-}
-
-interface ArrayConstructor {
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- */
- from<T>(iterable: Iterable<T>): Array<T>;
-}
-
-interface ReadonlyArray<T> {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<T>;
-
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, T]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<T>;
-}
-
-interface IArguments {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<any>;
-}
-
-interface Map<K, V> {
- [Symbol.iterator](): IterableIterator<[K,V]>;
- entries(): IterableIterator<[K, V]>;
- keys(): IterableIterator<K>;
- values(): IterableIterator<V>;
-}
-
-interface MapConstructor {
- new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
-}
-
-interface WeakMap<K, V> { }
-
-interface WeakMapConstructor {
- new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
-}
-
-interface Set<T> {
- [Symbol.iterator](): IterableIterator<T>;
- entries(): IterableIterator<[T, T]>;
- keys(): IterableIterator<T>;
- values(): IterableIterator<T>;
-}
-
-interface SetConstructor {
- new <T>(iterable: Iterable<T>): Set<T>;
-}
-
-interface WeakSet<T> { }
-
-interface WeakSetConstructor {
- new <T>(iterable: Iterable<T>): WeakSet<T>;
-}
-
-interface Promise<T> { }
-
-interface PromiseConstructor {
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
-}
-
-declare namespace Reflect {
- function enumerate(target: any): IterableIterator<any>;
-}
-
-interface String {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<string>;
-}
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int8ArrayConstructor {
- new (elements: Iterable<number>): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint8ArrayConstructor {
- new (elements: Iterable<number>): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint8ClampedArrayConstructor {
- new (elements: Iterable<number>): Uint8ClampedArray;
-
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int16ArrayConstructor {
- new (elements: Iterable<number>): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-}
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint16ArrayConstructor {
- new (elements: Iterable<number>): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-}
-
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Int32ArrayConstructor {
- new (elements: Iterable<number>): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Uint32ArrayConstructor {
- new (elements: Iterable<number>): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Float32ArrayConstructor {
- new (elements: Iterable<number>): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-}
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- [Symbol.iterator](): IterableIterator<number>;
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-}
-
-interface Float64ArrayConstructor {
- new (elements: Iterable<number>): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-}
-
-/**
- * Represents the completion of an asynchronous operation
- */
-interface Promise<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
-
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
-
- /**
- * Attaches a callback for only the rejection of the Promise.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of the callback.
- */
- catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
-
- /**
- * Attaches a callback for only the rejection of the Promise.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of the callback.
- */
- catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
-}
-
-interface PromiseConstructor {
- /**
- * A reference to the prototype.
- */
- readonly prototype: Promise<any>;
-
- /**
- * Creates a new Promise.
- * @param executor A callback used to initialize the promise. This callback is passed two arguments:
- * a resolve callback used resolve the promise with a value or the result of another promise,
- * and a reject callback used to reject the promise with a provided reason or error.
- */
- new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject(reason: any): Promise<never>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject<T>(reason: any): Promise<T>;
-
- /**
- * Creates a new resolved promise for the provided value.
- * @param value A promise.
- * @returns A promise whose internal state matches the provided promise.
- */
- resolve<T>(value: T | PromiseLike<T>): Promise<T>;
-
- /**
- * Creates a new resolved promise .
- * @returns A resolved promise.
- */
- resolve(): Promise<void>;
-}
-
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare const NaN: number;
+declare const Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+declare function parseInt(s: string, radix?: number): number;
+
+/**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an encoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an encoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string): string;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get? (): any;
+ set? (v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [s: string]: PropertyDescriptor;
+}
+
+interface Object {
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
+ constructor: Function;
+
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: string): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: string): boolean;
+}
+
+interface ObjectConstructor {
+ new (value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ readonly prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype or that has null prototype.
+ * @param o Object to use as a prototype. May be null.
+ */
+ create(o: object | null): any;
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty(o: any, p: string, attributes: PropertyDescriptor & ThisType<any>): any;
+
+ /**
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
+ */
+ defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ seal<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(a: T[]): ReadonlyArray<T>;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T extends Function>(f: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: any): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare const Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(this: Function, thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /** Returns a string representation of a function. */
+ toString(): string;
+
+ prototype: any;
+ readonly length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): Function;
+ (...args: string[]): Function;
+ readonly prototype: Function;
+}
+
+declare const Function: FunctionConstructor;
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string | RegExp): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string | RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string | RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ readonly length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ readonly [index: number]: string;
+}
+
+interface StringConstructor {
+ new (value?: any): String;
+ (value?: any): string;
+ readonly prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare const String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new (value?: any): Boolean;
+ (value?: any): boolean;
+ readonly prototype: Boolean;
+}
+
+declare const Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new (value?: any): Number;
+ (value?: any): number;
+ readonly prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ readonly MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ readonly MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ readonly NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ readonly NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ readonly POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare const Number: NumberConstructor;
+
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: ReadonlyArray<string>;
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ readonly E: number;
+ /** The natural logarithm of 10. */
+ readonly LN10: number;
+ /** The natural logarithm of 2. */
+ readonly LN2: number;
+ /** The base-2 logarithm of e. */
+ readonly LOG2E: number;
+ /** The base-10 logarithm of e. */
+ readonly LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ readonly PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ readonly SQRT1_2: number;
+ /** The square root of 2. */
+ readonly SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest number greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest number less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest number.
+ * @param x The value to be rounded to the nearest number.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare const Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new (): Date;
+ new (value: number): Date;
+ new (value: string): Date;
+ new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ readonly prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as an number between 0 and 11 (January to December).
+ * @param date The date as an number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
+ * @param ms An number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare const Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ index?: number;
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ index: number;
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray | null;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ readonly source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ readonly global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ readonly ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ readonly multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ compile(): this;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp | string): RegExp;
+ new (pattern: string, flags?: string): RegExp;
+ (pattern: RegExp | string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ readonly prototype: RegExp;
+
+ // Non-standard extensions
+ $1: string;
+ $2: string;
+ $3: string;
+ $4: string;
+ $5: string;
+ $6: string;
+ $7: string;
+ $8: string;
+ $9: string;
+ lastMatch: string;
+}
+
+declare const RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+ stack?: string;
+}
+
+interface ErrorConstructor {
+ new (message?: string): Error;
+ (message?: string): Error;
+ readonly prototype: Error;
+}
+
+declare const Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor {
+ new (message?: string): EvalError;
+ (message?: string): EvalError;
+ readonly prototype: EvalError;
+}
+
+declare const EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor {
+ new (message?: string): RangeError;
+ (message?: string): RangeError;
+ readonly prototype: RangeError;
+}
+
+declare const RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor {
+ new (message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ readonly prototype: ReferenceError;
+}
+
+declare const ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor {
+ new (message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ readonly prototype: SyntaxError;
+}
+
+declare const SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor {
+ new (message?: string): TypeError;
+ (message?: string): TypeError;
+ readonly prototype: TypeError;
+}
+
+declare const TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor {
+ new (message?: string): URIError;
+ (message?: string): URIError;
+ readonly prototype: URIError;
+}
+
+declare const URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
+}
+
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare const JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S): S[];
+ filter<S extends T>(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: undefined): S[];
+ filter<Z, S extends T>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => value is S, thisArg: Z): S[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray<T>) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Appends new elements to an array, and returns the new length of the array.
+ * @param items New elements of the Array.
+ */
+ push(...items: T[]): number;
+ /**
+ * Removes the last element from an array and returns it.
+ */
+ pop(): T | undefined;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): T[];
+ /**
+ * Removes the first element from an array and returns it.
+ */
+ shift(): T | undefined;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: T, b: T) => number): this;
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ */
+ splice(start: number, deleteCount?: number): T[];
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ */
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
+ /**
+ * Inserts new elements at the start of an array.
+ * @param items Elements to insert at the start of the Array.
+ */
+ unshift(...items: T[]): number;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean;
+ some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void): void;
+ forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U];
+ map<U>(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U];
+ map<Z, U>(this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U];
+ map<U>(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U];
+ map<Z, U>(this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U];
+ map<U>(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U];
+ map<Z, U>(this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U];
+ map<U>(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U];
+ map<Z, U>(this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U];
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[];
+ map<U>(callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[];
+ map<Z, U>(callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any): T[];
+ filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any, thisArg: undefined): T[];
+ filter<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => any, thisArg: Z): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new (arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is Array<any>;
+ readonly prototype: Array<any>;
+}
+
+declare const Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+}
+
+interface ArrayLike<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+}
+
+/**
+ * Make all properties in T optional
+ */
+type Partial<T> = {
+ [P in keyof T]?: T[P];
+};
+
+/**
+ * Make all properties in T readonly
+ */
+type Readonly<T> = {
+ readonly [P in keyof T]: T[P];
+};
+
+/**
+ * From T pick a set of properties K
+ */
+type Pick<T, K extends keyof T> = {
+ [P in K]: T[P];
+};
+
+/**
+ * Construct a type with a set of properties K of type T
+ */
+type Record<K extends string, T> = {
+ [P in K]: T;
+};
+
+/**
+ * Marker for contextual 'this' type
+ */
+interface ThisType<T> { }
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin: number, end?: number): ArrayBuffer;
+}
+
+interface ArrayBufferConstructor {
+ readonly prototype: ArrayBuffer;
+ new (byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare const ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt8(byteOffset: number): number;
+
+ /**
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
+ /**
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint8(byteOffset: number): number;
+
+ /**
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Stores an Float32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Float64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setInt8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Int16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setUint8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
+}
+
+interface DataViewConstructor {
+ new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+}
+declare const DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any): Int8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any, thisArg: undefined): Int8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => any, thisArg: Z): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number): Int8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: undefined): Int8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => number, thisArg: Z): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ readonly prototype: Int8Array;
+ new (length: number): Int8Array;
+ new (array: ArrayLike<number>): Int8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array;
+
+ from(arrayLike: ArrayLike<number>): Int8Array;
+
+}
+declare const Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any): Uint8Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any, thisArg: undefined): Uint8Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => any, thisArg: Z): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number): Uint8Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: undefined): Uint8Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => number, thisArg: Z): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ readonly prototype: Uint8Array;
+ new (length: number): Uint8Array;
+ new (array: ArrayLike<number>): Uint8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array;
+
+ from(arrayLike: ArrayLike<number>): Uint8Array;
+
+}
+declare const Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any): Uint8ClampedArray;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: undefined): Uint8ClampedArray;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number): Uint8ClampedArray;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: undefined): Uint8ClampedArray;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: Z): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: Uint8ClampedArray, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ readonly prototype: Uint8ClampedArray;
+ new (length: number): Uint8ClampedArray;
+ new (array: ArrayLike<number>): Uint8ClampedArray;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray;
+
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
+}
+declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any): Int16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any, thisArg: undefined): Int16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => any, thisArg: Z): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number): Int16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: undefined): Int16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => number, thisArg: Z): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ readonly prototype: Int16Array;
+ new (length: number): Int16Array;
+ new (array: ArrayLike<number>): Int16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array;
+
+ from(arrayLike: ArrayLike<number>): Int16Array;
+
+}
+declare const Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any): Uint16Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any, thisArg: undefined): Uint16Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => any, thisArg: Z): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number): Uint16Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: undefined): Uint16Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => number, thisArg: Z): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ readonly prototype: Uint16Array;
+ new (length: number): Uint16Array;
+ new (array: ArrayLike<number>): Uint16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint16Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array;
+
+ from(arrayLike: ArrayLike<number>): Uint16Array;
+
+}
+declare const Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any): Int32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any, thisArg: undefined): Int32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => any, thisArg: Z): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number): Int32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number, thisArg: undefined): Int32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => number, thisArg: Z): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ readonly prototype: Int32Array;
+ new (length: number): Int32Array;
+ new (array: ArrayLike<number>): Int32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Int32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array;
+
+ from(arrayLike: ArrayLike<number>): Int32Array;
+}
+declare const Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any): Uint32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any, thisArg: undefined): Uint32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => any, thisArg: Z): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number): Uint32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: undefined): Uint32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => number, thisArg: Z): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ readonly prototype: Uint32Array;
+ new (length: number): Uint32Array;
+ new (array: ArrayLike<number>): Uint32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Uint32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array;
+
+ from(arrayLike: ArrayLike<number>): Uint32Array;
+}
+declare const Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any): Float32Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any, thisArg: undefined): Float32Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => any, thisArg: Z): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number): Float32Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: undefined): Float32Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => number, thisArg: Z): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ readonly prototype: Float32Array;
+ new (length: number): Float32Array;
+ new (array: ArrayLike<number>): Float32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float32Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array;
+
+ from(arrayLike: ArrayLike<number>): Float32Array;
+
+}
+declare const Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ every<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any): Float64Array;
+ filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any, thisArg: undefined): Float64Array;
+ filter<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => any, thisArg: Z): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number | undefined;
+ find(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number | undefined;
+ find<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean): number;
+ findIndex(predicate: (this: void, value: number, index: number, obj: Array<number>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: number, index: number, obj: Array<number>) => boolean, thisArg: Z): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void): void;
+ forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void, thisArg: undefined): void;
+ forEach<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => void, thisArg: Z): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number): Float64Array;
+ map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number, thisArg: undefined): Float64Array;
+ map<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => number, thisArg: Z): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean;
+ some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean;
+ some<Z>(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float64Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ readonly prototype: Float64Array;
+ new (length: number): Float64Array;
+ new (array: ArrayLike<number>): Float64Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number): Float64Array;
+ from(arrayLike: ArrayLike<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array;
+ from<Z>(arrayLike: ArrayLike<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array;
+
+ from(arrayLike: ArrayLike<number>): Float64Array;
+}
+declare const Float64Array: Float64ArrayConstructor;
+
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare namespace Intl {
+ interface CollatorOptions {
+ usage?: string;
+ localeMatcher?: string;
+ numeric?: boolean;
+ caseFirst?: string;
+ sensitivity?: string;
+ ignorePunctuation?: boolean;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new (locales?: string | string[], options?: CollatorOptions): Collator;
+ (locales?: string | string[], options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
+ };
+
+ interface NumberFormatOptions {
+ localeMatcher?: string;
+ style?: string;
+ currency?: string;
+ currencyDisplay?: string;
+ useGrouping?: boolean;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ currencyDisplay?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
+ };
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: string;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ formatMatcher?: string;
+ hour12?: boolean;
+ timeZone?: string;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
+ };
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current or specified locale.
+ * @param that String to compare to target string
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+}
+
+
+declare type PropertyKey = string | number | symbol;
+
+interface Array<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): T | undefined;
+ find(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): T | undefined;
+ find<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): number;
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): number;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: T, start?: number, end?: number): this;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (this: void, v: T, k: number) => U): Array<U>;
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): Array<U>;
+ from<Z, T, U>(arrayLike: ArrayLike<T>, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array<U>;
+
+
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): Array<T>;
+}
+
+interface DateConstructor {
+ new (value: Date): Date;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ readonly name: string;
+}
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
+ * the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[] ): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ readonly EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: number): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: number): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ readonly MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ readonly MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+ parseInt(string: string, radix?: number): number;
+}
+
+interface Object {
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source The source object from which to copy properties.
+ */
+ assign<T, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: object, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: object | null): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not
+ * inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
+ * object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
+ * property.
+ */
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (this: void, value: T, index: number, obj: ReadonlyArray<T>) => boolean): T | undefined;
+ find(predicate: (this: void, value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg: undefined): T | undefined;
+ find<Z>(predicate: (this: Z, value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg: Z): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean): number;
+ findIndex(predicate: (this: void, value: T, index: number, obj: Array<T>) => boolean, thisArg: undefined): number;
+ findIndex<Z>(predicate: (this: Z, value: T, index: number, obj: Array<T>) => boolean, thisArg: Z): number;
+}
+
+interface RegExp {
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ readonly flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly unicode: boolean;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp, flags?: string): RegExp;
+ (pattern: RegExp, flags?: string): RegExp;
+}
+
+interface String {
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number | undefined;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * T is the empty String is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /** Returns a <big> HTML element */
+ big(): string;
+
+ /** Returns a <blink> HTML element */
+ blink(): string;
+
+ /** Returns a <b> HTML element */
+ bold(): string;
+
+ /** Returns a <tt> HTML element */
+ fixed(): string;
+
+ /** Returns a <font> HTML element and sets the color attribute value */
+ fontcolor(color: string): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: number): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: string): string;
+
+ /** Returns an <i> HTML element */
+ italics(): string;
+
+ /** Returns an <a> HTML element and sets the href attribute value */
+ link(url: string): string;
+
+ /** Returns a <small> HTML element */
+ small(): string;
+
+ /** Returns a <strike> HTML element */
+ strike(): string;
+
+ /** Returns a <sub> HTML element */
+ sub(): string;
+
+ /** Returns a <sup> HTML element */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
+ * as such the first argument will be a well formed template call site object and the rest
+ * parameter will contain the substitution values.
+ * @param template A well-formed template string call site representation.
+ * @param substitutions A set of substitution values.
+ */
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
+}
+
+
+interface Map<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+ readonly size: number;
+}
+
+interface MapConstructor {
+ new (): Map<any, any>;
+ new <K, V>(entries?: [K, V][]): Map<K, V>;
+ readonly prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface ReadonlyMap<K, V> {
+ forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ readonly size: number;
+}
+
+interface WeakMap<K extends object, V> {
+ delete(key: K): boolean;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+}
+
+interface WeakMapConstructor {
+ new (): WeakMap<object, any>;
+ new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
+ readonly prototype: WeakMap<object, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface SetConstructor {
+ new (): Set<any>;
+ new <T>(values?: T[]): Set<T>;
+ readonly prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface ReadonlySet<T> {
+ forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface WeakSet<T extends object> {
+ add(value: T): this;
+ delete(value: T): boolean;
+ has(value: T): boolean;
+}
+
+interface WeakSetConstructor {
+ new (): WeakSet<object>;
+ new <T extends object>(values?: T[]): WeakSet<T>;
+ readonly prototype: WeakSet<object>;
+}
+declare var WeakSet: WeakSetConstructor;
+
+
+interface Generator extends Iterator<any> { }
+
+interface GeneratorFunction {
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): Generator;
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): Generator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Generator;
+}
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): GeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: GeneratorFunction;
+}
+declare var GeneratorFunction: GeneratorFunctionConstructor;
+
+
+/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ readonly iterator: symbol;
+}
+
+interface IteratorResult<T> {
+ done: boolean;
+ value: T;
+}
+
+interface Iterator<T> {
+ next(value?: any): IteratorResult<T>;
+ return?(value?: any): IteratorResult<T>;
+ throw?(e?: any): IteratorResult<T>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T>, mapfn: (this: void, v: T, k: number) => U): Array<U>;
+ from<T, U>(iterable: Iterable<T>, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): Array<U>;
+ from<Z, T, U>(iterable: Iterable<T>, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array<U>;
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T>): Array<T>;
+}
+
+interface ReadonlyArray<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface Map<K, V> {
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+ entries(): IterableIterator<[K, V]>;
+ keys(): IterableIterator<K>;
+ values(): IterableIterator<V>;
+}
+
+interface MapConstructor {
+ new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
+}
+
+interface WeakMap<K extends object, V> { }
+
+interface WeakMapConstructor {
+ new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+}
+
+interface Set<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+ entries(): IterableIterator<[T, T]>;
+ keys(): IterableIterator<T>;
+ values(): IterableIterator<T>;
+}
+
+interface SetConstructor {
+ new <T>(iterable: Iterable<T>): Set<T>;
+}
+
+interface WeakSet<T extends object> { }
+
+interface WeakSetConstructor {
+ new <T extends object>(iterable: Iterable<T>): WeakSet<T>;
+}
+
+interface Promise<T> { }
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
+}
+
+declare namespace Reflect {
+ function enumerate(target: object): IterableIterator<any>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int8Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array;
+
+ from(arrayLike: Iterable<number>): Int8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint8Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array;
+
+ from(arrayLike: Iterable<number>): Uint8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray;
+
+ from(arrayLike: Iterable<number>): Uint8ClampedArray;
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int16Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array;
+
+ from(arrayLike: Iterable<number>): Int16Array;
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint16Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array;
+
+ from(arrayLike: Iterable<number>): Uint16Array;
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Int32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array;
+
+ from(arrayLike: Iterable<number>): Int32Array;
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Uint32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array;
+
+ from(arrayLike: Iterable<number>): Uint32Array;
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Float32Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array;
+
+ from(arrayLike: Iterable<number>): Float32Array;
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number): Float64Array;
+ from(arrayLike: Iterable<number>, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array;
+ from<Z>(arrayLike: Iterable<number>, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array;
+
+ from(arrayLike: Iterable<number>): Float64Array;
+}
+
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject(reason: any): Promise<never>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T>(reason: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+
+ /**
+ * Creates a new resolved promise .
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+}
+
declare var Promise: PromiseConstructor;
-interface ProxyHandler<T> {
- getPrototypeOf? (target: T): {} | null;
- setPrototypeOf? (target: T, v: any): boolean;
- isExtensible? (target: T): boolean;
- preventExtensions? (target: T): boolean;
- getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
- has? (target: T, p: PropertyKey): boolean;
- get? (target: T, p: PropertyKey, receiver: any): any;
- set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
- deleteProperty? (target: T, p: PropertyKey): boolean;
- defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
- enumerate? (target: T): PropertyKey[];
- ownKeys? (target: T): PropertyKey[];
- apply? (target: T, thisArg: any, argArray?: any): any;
- construct? (target: T, argArray: any, newTarget?: any): {};
-}
-
-interface ProxyConstructor {
- revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
- new <T>(target: T, handler: ProxyHandler<T>): T
-}
-declare var Proxy: ProxyConstructor;
-
-
-declare namespace Reflect {
- function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
- function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
- function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
- function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
- function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
- function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
- function getPrototypeOf(target: any): any;
- function has(target: any, propertyKey: PropertyKey): boolean;
- function isExtensible(target: any): boolean;
- function ownKeys(target: any): Array<PropertyKey>;
- function preventExtensions(target: any): boolean;
- function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
- function setPrototypeOf(target: any, proto: any): boolean;
-}
-
-interface Symbol {
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-}
-
-interface SymbolConstructor {
- /**
- * A reference to the prototype.
- */
- readonly prototype: Symbol;
-
- /**
- * Returns a new unique Symbol value.
- * @param description Description of the new Symbol object.
- */
- (description?: string|number): symbol;
-
- /**
- * Returns a Symbol object from the global symbol registry matching the given key if found.
- * Otherwise, returns a new symbol with this key.
- * @param key key to search for.
- */
- for(key: string): symbol;
-
- /**
- * Returns a key from the global symbol registry matching the given Symbol if found.
- * Otherwise, returns a undefined.
- * @param sym Symbol to find the key for.
- */
- keyFor(sym: symbol): string | undefined;
-}
-
+interface ProxyHandler<T extends object> {
+ getPrototypeOf? (target: T): object | null;
+ setPrototypeOf? (target: T, v: any): boolean;
+ isExtensible? (target: T): boolean;
+ preventExtensions? (target: T): boolean;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ has? (target: T, p: PropertyKey): boolean;
+ get? (target: T, p: PropertyKey, receiver: any): any;
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
+ deleteProperty? (target: T, p: PropertyKey): boolean;
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
+ enumerate? (target: T): PropertyKey[];
+ ownKeys? (target: T): PropertyKey[];
+ apply? (target: T, thisArg: any, argArray?: any): any;
+ construct? (target: T, argArray: any, newTarget?: any): object;
+}
+
+interface ProxyConstructor {
+ revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
+ new <T extends object>(target: T, handler: ProxyHandler<T>): T;
+}
+declare var Proxy: ProxyConstructor;
+
+
+declare namespace Reflect {
+ function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
+ function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
+ function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
+ function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
+ function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
+ function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor;
+ function getPrototypeOf(target: object): object;
+ function has(target: object, propertyKey: PropertyKey): boolean;
+ function isExtensible(target: object): boolean;
+ function ownKeys(target: object): Array<PropertyKey>;
+ function preventExtensions(target: object): boolean;
+ function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
+ function setPrototypeOf(target: object, proto: any): boolean;
+}
+
+
+interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): symbol;
+}
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string | number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string | undefined;
+}
+
declare var Symbol: SymbolConstructor;
-/// <reference path="lib.es2015.symbol.d.ts" />
-
-interface SymbolConstructor {
- /**
- * A method that determines if a constructor object recognizes an object as one of the
- * constructor’s instances. Called by the semantics of the instanceof operator.
- */
- readonly hasInstance: symbol;
-
- /**
- * A Boolean value that if true indicates that an object should flatten to its array elements
- * by Array.prototype.concat.
- */
- readonly isConcatSpreadable: symbol;
-
- /**
- * A regular expression method that matches the regular expression against a string. Called
- * by the String.prototype.match method.
- */
- readonly match: symbol;
-
- /**
- * A regular expression method that replaces matched substrings of a string. Called by the
- * String.prototype.replace method.
- */
- readonly replace: symbol;
-
- /**
- * A regular expression method that returns the index within a string that matches the
- * regular expression. Called by the String.prototype.search method.
- */
- readonly search: symbol;
-
- /**
- * A function valued property that is the constructor function that is used to create
- * derived objects.
- */
- readonly species: symbol;
-
- /**
- * A regular expression method that splits a string at the indices that match the regular
- * expression. Called by the String.prototype.split method.
- */
- readonly split: symbol;
-
- /**
- * A method that converts an object to a corresponding primitive value.
- * Called by the ToPrimitive abstract operation.
- */
- readonly toPrimitive: symbol;
-
- /**
- * A String value that is used in the creation of the default string description of an object.
- * Called by the built-in method Object.prototype.toString.
- */
- readonly toStringTag: symbol;
-
- /**
- * An Object whose own property names are property names that are excluded from the 'with'
- * environment bindings of the associated objects.
- */
- readonly unscopables: symbol;
-}
-
-interface Symbol {
- readonly [Symbol.toStringTag]: "Symbol";
-}
-
-interface Array<T> {
- /**
- * Returns an object whose properties have the value 'true'
- * when they will be absent when used in a 'with' statement.
- */
- [Symbol.unscopables](): {
- copyWithin: boolean;
- entries: boolean;
- fill: boolean;
- find: boolean;
- findIndex: boolean;
- keys: boolean;
- values: boolean;
- };
-}
-
-interface Date {
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "default"): string;
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "string"): string;
- /**
- * Converts a Date object to a number.
- */
- [Symbol.toPrimitive](hint: "number"): number;
- /**
- * Converts a Date object to a string or number.
- *
- * @param hint The strings "number", "string", or "default" to specify what primitive to return.
- *
- * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
- * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
- */
- [Symbol.toPrimitive](hint: string): string | number;
-}
-
-interface Map<K, V> {
- readonly [Symbol.toStringTag]: "Map";
-}
-
-interface WeakMap<K, V>{
- readonly [Symbol.toStringTag]: "WeakMap";
-}
-
-interface Set<T> {
- readonly [Symbol.toStringTag]: "Set";
-}
-
-interface WeakSet<T> {
- readonly [Symbol.toStringTag]: "WeakSet";
-}
-
-interface JSON {
- readonly [Symbol.toStringTag]: "JSON";
-}
-
-interface Function {
- /**
- * Determines whether the given value inherits from this function if this function was used
- * as a constructor function.
- *
- * A constructor function can control which objects are recognized as its instances by
- * 'instanceof' by overriding this method.
- */
- [Symbol.hasInstance](value: any): boolean;
-}
-
-interface GeneratorFunction extends Function {
- readonly [Symbol.toStringTag]: "GeneratorFunction";
-}
-
-interface Math {
- readonly [Symbol.toStringTag]: "Math";
-}
-
-interface Promise<T> {
- readonly [Symbol.toStringTag]: "Promise";
-}
-
-interface PromiseConstructor {
- readonly [Symbol.species]: Function;
-}
-
-interface RegExp {
- /**
- * Matches a string with this regular expression, and returns an array containing the results of
- * that search.
- * @param string A string to search within.
- */
- [Symbol.match](string: string): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replaceValue A String object or string literal containing the text to replace for every
- * successful match of this regular expression.
- */
- [Symbol.replace](string: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replacer A function that returns the replacement text.
- */
- [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the position beginning first substring match in a regular expression search
- * using this regular expression.
- *
- * @param string The string to search within.
- */
- [Symbol.search](string: string): number;
-
- /**
- * Returns an array of substrings that were delimited by strings in the original input that
- * match against this regular expression.
- *
- * If the regular expression contains capturing parentheses, then each time this
- * regular expression matches, the results (including any undefined results) of the
- * capturing parentheses are spliced.
- *
- * @param string string value to split
- * @param limit if not undefined, the output array is truncated so that it contains no more
- * than 'limit' elements.
- */
- [Symbol.split](string: string, limit?: number): string[];
-}
-
-interface RegExpConstructor {
- [Symbol.species](): RegExpConstructor;
-}
-
-interface String {
- /**
- * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
- * @param matcher An object that supports being matched against.
- */
- match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param searcher An object which supports searching within a string.
- */
- search(searcher: { [Symbol.search](string: string): number; }): number;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param splitter An object that can split a string.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- readonly [Symbol.toStringTag]: "ArrayBuffer";
-}
-
-interface DataView {
- readonly [Symbol.toStringTag]: "DataView";
-}
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- readonly [Symbol.toStringTag]: "Int8Array";
-}
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- readonly [Symbol.toStringTag]: "UInt8Array";
-}
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- readonly [Symbol.toStringTag]: "Uint8ClampedArray";
-}
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- readonly [Symbol.toStringTag]: "Int16Array";
-}
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- readonly [Symbol.toStringTag]: "Uint16Array";
-}
-
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- readonly [Symbol.toStringTag]: "Int32Array";
-}
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- readonly [Symbol.toStringTag]: "Uint32Array";
-}
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- readonly [Symbol.toStringTag]: "Float32Array";
-}
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- readonly [Symbol.toStringTag]: "Float64Array";
-}
-
-
-/////////////////////////////
-/// IE DOM APIs
-/////////////////////////////
-
-interface Algorithm {
- name: string;
-}
-
-interface AriaRequestEventInit extends EventInit {
- attributeName?: string;
- attributeValue?: string;
-}
-
-interface CommandEventInit extends EventInit {
- commandName?: string;
- detail?: string;
-}
-
-interface CompositionEventInit extends UIEventInit {
- data?: string;
-}
-
-interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface ConstrainBooleanParameters {
- exact?: boolean;
- ideal?: boolean;
-}
-
-interface ConstrainDOMStringParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface ConstrainDoubleRange extends DoubleRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainLongRange extends LongRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainVideoFacingModeParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface CustomEventInit extends EventInit {
- detail?: any;
-}
-
-interface DeviceAccelerationDict {
- x?: number;
- y?: number;
- z?: number;
-}
-
-interface DeviceLightEventInit extends EventInit {
- value?: number;
-}
-
-interface DeviceRotationRateDict {
- alpha?: number;
- beta?: number;
- gamma?: number;
-}
-
-interface DoubleRange {
- max?: number;
- min?: number;
-}
-
-interface EventInit {
- scoped?: boolean;
- bubbles?: boolean;
- cancelable?: boolean;
-}
-
-interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
- altKey?: boolean;
- metaKey?: boolean;
- modifierAltGraph?: boolean;
- modifierCapsLock?: boolean;
- modifierFn?: boolean;
- modifierFnLock?: boolean;
- modifierHyper?: boolean;
- modifierNumLock?: boolean;
- modifierOS?: boolean;
- modifierScrollLock?: boolean;
- modifierSuper?: boolean;
- modifierSymbol?: boolean;
- modifierSymbolLock?: boolean;
-}
-
-interface ExceptionInformation {
- domain?: string;
-}
-
-interface FocusEventInit extends UIEventInit {
- relatedTarget?: EventTarget;
-}
-
-interface HashChangeEventInit extends EventInit {
- newURL?: string;
- oldURL?: string;
-}
-
-interface IDBIndexParameters {
- multiEntry?: boolean;
- unique?: boolean;
-}
-
-interface IDBObjectStoreParameters {
- autoIncrement?: boolean;
- keyPath?: IDBKeyPath;
-}
-
-interface KeyAlgorithm {
- name?: string;
-}
-
-interface KeyboardEventInit extends EventModifierInit {
- code?: string;
- key?: string;
- location?: number;
- repeat?: boolean;
-}
-
-interface LongRange {
- max?: number;
- min?: number;
-}
-
-interface MSAccountInfo {
- rpDisplayName?: string;
- userDisplayName?: string;
- accountName?: string;
- userId?: string;
- accountImageUri?: string;
-}
-
-interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
- networkSendQualityEventRatio?: number;
- networkDelayEventRatio?: number;
- cpuInsufficientEventRatio?: number;
- deviceHalfDuplexAECEventRatio?: number;
- deviceRenderNotFunctioningEventRatio?: number;
- deviceCaptureNotFunctioningEventRatio?: number;
- deviceGlitchesEventRatio?: number;
- deviceLowSNREventRatio?: number;
- deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
- deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
- deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
-}
-
-interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
- burstLossLength1?: number;
- burstLossLength2?: number;
- burstLossLength3?: number;
- burstLossLength4?: number;
- burstLossLength5?: number;
- burstLossLength6?: number;
- burstLossLength7?: number;
- burstLossLength8OrHigher?: number;
- fecRecvDistance1?: number;
- fecRecvDistance2?: number;
- fecRecvDistance3?: number;
- ratioConcealedSamplesAvg?: number;
- ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
-}
-
-interface MSAudioRecvSignal {
- initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
- recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
- renderLoopbackSignalLevel?: number;
-}
-
-interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
- audioFECUsed?: boolean;
- sendMutePercent?: number;
-}
-
-interface MSAudioSendSignal {
- noiseLevel?: number;
- sendSignalLevelCh1?: number;
- sendNoiseLevelCh1?: number;
-}
-
-interface MSConnectivity {
- iceType?: string;
- iceWarningFlags?: MSIceWarningFlags;
- relayAddress?: MSRelayAddress;
-}
-
-interface MSCredentialFilter {
- accept?: MSCredentialSpec[];
-}
-
-interface MSCredentialParameters {
- type?: string;
-}
-
-interface MSCredentialSpec {
- type?: string;
- id?: string;
-}
-
-interface MSDelay {
- roundTrip?: number;
- roundTripMax?: number;
-}
-
-interface MSDescription extends RTCStats {
- connectivity?: MSConnectivity;
- transport?: string;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
- deviceDevName?: string;
- reflexiveLocalIPAddr?: MSIPAddressInfo;
-}
-
-interface MSFIDOCredentialParameters extends MSCredentialParameters {
- algorithm?: string | Algorithm;
- authenticators?: AAGUID[];
-}
-
-interface MSIPAddressInfo {
- ipAddr?: string;
- port?: number;
- manufacturerMacAddrMask?: string;
-}
-
-interface MSIceWarningFlags {
- turnTcpTimedOut?: boolean;
- turnUdpAllocateFailed?: boolean;
- turnUdpSendFailed?: boolean;
- turnTcpAllocateFailed?: boolean;
- turnTcpSendFailed?: boolean;
- udpLocalConnectivityFailed?: boolean;
- udpNatConnectivityFailed?: boolean;
- udpRelayConnectivityFailed?: boolean;
- tcpNatConnectivityFailed?: boolean;
- tcpRelayConnectivityFailed?: boolean;
- connCheckMessageIntegrityFailed?: boolean;
- allocationMessageIntegrityFailed?: boolean;
- connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
- multipleRelayServersAttempted?: boolean;
- portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
- pseudoTLSFailure?: boolean;
- turnTurnTcpConnectivityFailed?: boolean;
- useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
-}
-
-interface MSJitter {
- interArrival?: number;
- interArrivalMax?: number;
- interArrivalSD?: number;
-}
-
-interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
- networkBandwidthLowEventRatio?: number;
-}
-
-interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
- delay?: MSDelay;
- packetLoss?: MSPacketLoss;
- utilization?: MSUtilization;
-}
-
-interface MSNetworkConnectivityInfo {
- vpn?: boolean;
- linkspeed?: number;
- networkConnectionDetails?: string;
-}
-
-interface MSNetworkInterfaceType {
- interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
- interfaceTypePPP?: boolean;
- interfaceTypeTunnel?: boolean;
- interfaceTypeWWAN?: boolean;
-}
-
-interface MSOutboundNetwork extends MSNetwork {
- appliedBandwidthLimit?: number;
-}
-
-interface MSPacketLoss {
- lossRate?: number;
- lossRateMax?: number;
-}
-
-interface MSPayloadBase extends RTCStats {
- payloadDescription?: string;
-}
-
-interface MSRelayAddress {
- relayAddress?: string;
- port?: number;
-}
-
-interface MSSignatureParameters {
- userPrompt?: string;
-}
-
-interface MSTransportDiagnosticsStats extends RTCStats {
- baseAddress?: string;
- localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
- localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
- localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
- numConsentReqReceived?: number;
- numConsentRespSent?: number;
- numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
- protocol?: string;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: string;
- remoteAddrType?: string;
- iceRole?: string;
- rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
-}
-
-interface MSUtilization {
- packets?: number;
- bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
- bandwidthEstimationMax?: number;
- bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
-}
-
-interface MSVideoPayload extends MSPayloadBase {
- resoluton?: string;
- videoBitRateAvg?: number;
- videoBitRateMax?: number;
- videoFrameRateAvg?: number;
- videoPacketLossRate?: number;
- durationSeconds?: number;
-}
-
-interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
- recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
- recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
- recvVideoStreamsMax?: number;
- recvVideoStreamsMin?: number;
- recvVideoStreamsMode?: number;
- videoPostFECPLR?: number;
- lowBitRateCallPercent?: number;
- lowFrameRateCallPercent?: number;
- reorderBufferTotalPackets?: number;
- recvReorderBufferReorderedPackets?: number;
- recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
- recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
- recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
- recvReorderBufferPacketsDroppedDueToTimeout?: number;
- recvFpsHarmonicAverage?: number;
- recvNumResSwitches?: number;
-}
-
-interface MSVideoResolutionDistribution {
- cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
- h1080Quality?: number;
- h1440Quality?: number;
- h2160Quality?: number;
-}
-
-interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
- sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
- sendResolutionHeight?: number;
-}
-
-interface MediaEncryptedEventInit extends EventInit {
- initDataType?: string;
- initData?: ArrayBuffer;
-}
-
-interface MediaKeyMessageEventInit extends EventInit {
- messageType?: string;
- message?: ArrayBuffer;
-}
-
-interface MediaKeySystemConfiguration {
- initDataTypes?: string[];
- audioCapabilities?: MediaKeySystemMediaCapability[];
- videoCapabilities?: MediaKeySystemMediaCapability[];
- distinctiveIdentifier?: string;
- persistentState?: string;
-}
-
-interface MediaKeySystemMediaCapability {
- contentType?: string;
- robustness?: string;
-}
-
-interface MediaStreamConstraints {
- video?: boolean | MediaTrackConstraints;
- audio?: boolean | MediaTrackConstraints;
-}
-
-interface MediaStreamErrorEventInit extends EventInit {
- error?: MediaStreamError;
-}
-
-interface MediaStreamTrackEventInit extends EventInit {
- track?: MediaStreamTrack;
-}
-
-interface MediaTrackCapabilities {
- width?: number | LongRange;
- height?: number | LongRange;
- aspectRatio?: number | DoubleRange;
- frameRate?: number | DoubleRange;
- facingMode?: string;
- volume?: number | DoubleRange;
- sampleRate?: number | LongRange;
- sampleSize?: number | LongRange;
- echoCancellation?: boolean[];
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackConstraintSet {
- width?: number | ConstrainLongRange;
- height?: number | ConstrainLongRange;
- aspectRatio?: number | ConstrainDoubleRange;
- frameRate?: number | ConstrainDoubleRange;
- facingMode?: string | string[] | ConstrainDOMStringParameters;
- volume?: number | ConstrainDoubleRange;
- sampleRate?: number | ConstrainLongRange;
- sampleSize?: number | ConstrainLongRange;
- echoCancelation?: boolean | ConstrainBooleanParameters;
- deviceId?: string | string[] | ConstrainDOMStringParameters;
- groupId?: string | string[] | ConstrainDOMStringParameters;
-}
-
-interface MediaTrackConstraints extends MediaTrackConstraintSet {
- advanced?: MediaTrackConstraintSet[];
-}
-
-interface MediaTrackSettings {
- width?: number;
- height?: number;
- aspectRatio?: number;
- frameRate?: number;
- facingMode?: string;
- volume?: number;
- sampleRate?: number;
- sampleSize?: number;
- echoCancellation?: boolean;
- deviceId?: string;
- groupId?: string;
-}
-
-interface MediaTrackSupportedConstraints {
- width?: boolean;
- height?: boolean;
- aspectRatio?: boolean;
- frameRate?: boolean;
- facingMode?: boolean;
- volume?: boolean;
- sampleRate?: boolean;
- sampleSize?: boolean;
- echoCancellation?: boolean;
- deviceId?: boolean;
- groupId?: boolean;
-}
-
-interface MouseEventInit extends EventModifierInit {
- screenX?: number;
- screenY?: number;
- clientX?: number;
- clientY?: number;
- button?: number;
- buttons?: number;
- relatedTarget?: EventTarget;
-}
-
-interface MsZoomToOptions {
- contentX?: number;
- contentY?: number;
- viewportX?: string;
- viewportY?: string;
- scaleFactor?: number;
- animate?: string;
-}
-
-interface MutationObserverInit {
- childList?: boolean;
- attributes?: boolean;
- characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
- characterDataOldValue?: boolean;
- attributeFilter?: string[];
-}
-
-interface ObjectURLOptions {
- oneTimeOnly?: boolean;
-}
-
-interface PeriodicWaveConstraints {
- disableNormalization?: boolean;
-}
-
-interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
- height?: number;
- pressure?: number;
- tiltX?: number;
- tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
-}
-
-interface PositionOptions {
- enableHighAccuracy?: boolean;
- timeout?: number;
- maximumAge?: number;
-}
-
-interface RTCDTMFToneChangeEventInit extends EventInit {
- tone?: string;
-}
-
-interface RTCDtlsFingerprint {
- algorithm?: string;
- value?: string;
-}
-
-interface RTCDtlsParameters {
- role?: string;
- fingerprints?: RTCDtlsFingerprint[];
-}
-
-interface RTCIceCandidate {
- foundation?: string;
- priority?: number;
- ip?: string;
- protocol?: string;
- port?: number;
- type?: string;
- tcpType?: string;
- relatedAddress?: string;
- relatedPort?: number;
-}
-
-interface RTCIceCandidateAttributes extends RTCStats {
- ipAddress?: string;
- portNumber?: number;
- transport?: string;
- candidateType?: string;
- priority?: number;
- addressSourceUrl?: string;
-}
-
-interface RTCIceCandidateComplete {
-}
-
-interface RTCIceCandidatePair {
- local?: RTCIceCandidate;
- remote?: RTCIceCandidate;
-}
-
-interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
- localCandidateId?: string;
- remoteCandidateId?: string;
- state?: string;
- priority?: number;
- nominated?: boolean;
- writable?: boolean;
- readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
- roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
-}
-
-interface RTCIceGatherOptions {
- gatherPolicy?: string;
- iceservers?: RTCIceServer[];
-}
-
-interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
-}
-
-interface RTCIceServer {
- urls?: any;
- username?: string;
- credential?: string;
-}
-
-interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
- bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
- fractionLost?: number;
-}
-
-interface RTCMediaStreamTrackStats extends RTCStats {
- trackIdentifier?: string;
- remoteSource?: boolean;
- ssrcIds?: string[];
- frameWidth?: number;
- frameHeight?: number;
- framesPerSecond?: number;
- framesSent?: number;
- framesReceived?: number;
- framesDecoded?: number;
- framesDropped?: number;
- framesCorrupted?: number;
- audioLevel?: number;
- echoReturnLoss?: number;
- echoReturnLossEnhancement?: number;
-}
-
-interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
- bytesSent?: number;
- targetBitrate?: number;
- roundTripTime?: number;
-}
-
-interface RTCRTPStreamStats extends RTCStats {
- ssrc?: string;
- associateStatsId?: string;
- isRemote?: boolean;
- mediaTrackId?: string;
- transportId?: string;
- codecId?: string;
- firCount?: number;
- pliCount?: number;
- nackCount?: number;
- sliCount?: number;
-}
-
-interface RTCRtcpFeedback {
- type?: string;
- parameter?: string;
-}
-
-interface RTCRtcpParameters {
- ssrc?: number;
- cname?: string;
- reducedSize?: boolean;
- mux?: boolean;
-}
-
-interface RTCRtpCapabilities {
- codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
- fecMechanisms?: string[];
-}
-
-interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
- clockRate?: number;
- preferredPayloadType?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
- options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
- svcMultiStreamSupport?: boolean;
-}
-
-interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
- clockRate?: number;
- maxptime?: number;
- numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
-}
-
-interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
- audioLevel?: number;
-}
-
-interface RTCRtpEncodingParameters {
- ssrc?: number;
- codecPayloadType?: number;
- fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
- maxBitrate?: number;
- minQuality?: number;
- framerateBias?: number;
- resolutionScale?: number;
- framerateScale?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
- ssrcRange?: RTCSsrcRange;
-}
-
-interface RTCRtpFecParameters {
- ssrc?: number;
- mechanism?: string;
-}
-
-interface RTCRtpHeaderExtension {
- kind?: string;
- uri?: string;
- preferredId?: number;
- preferredEncrypt?: boolean;
-}
-
-interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
- encrypt?: boolean;
-}
-
-interface RTCRtpParameters {
- muxId?: string;
- codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
- encodings?: RTCRtpEncodingParameters[];
- rtcp?: RTCRtcpParameters;
-}
-
-interface RTCRtpRtxParameters {
- ssrc?: number;
-}
-
-interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
- muxId?: string;
-}
-
-interface RTCSrtpKeyParam {
- keyMethod?: string;
- keySalt?: string;
- lifetime?: string;
- mkiValue?: number;
- mkiLength?: number;
-}
-
-interface RTCSrtpSdesParameters {
- tag?: number;
- cryptoSuite?: string;
- keyParams?: RTCSrtpKeyParam[];
- sessionParams?: string[];
-}
-
-interface RTCSsrcRange {
- min?: number;
- max?: number;
-}
-
-interface RTCStats {
- timestamp?: number;
- type?: string;
- id?: string;
- msType?: string;
-}
-
-interface RTCStatsReport {
-}
-
-interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
- activeConnection?: boolean;
- selectedCandidatePairId?: string;
- localCertificateId?: string;
- remoteCertificateId?: string;
-}
-
-interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
- detailURI?: string;
-}
-
-interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
- arrayOfDomainStrings?: string[];
-}
-
-interface UIEventInit extends EventInit {
- view?: Window;
- detail?: number;
-}
-
-interface WebGLContextAttributes {
- failIfMajorPerformanceCaveat?: boolean;
- alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
- antialias?: boolean;
- premultipliedAlpha?: boolean;
- preserveDrawingBuffer?: boolean;
-}
-
-interface WebGLContextEventInit extends EventInit {
- statusMessage?: string;
-}
-
-interface WheelEventInit extends MouseEventInit {
- deltaX?: number;
- deltaY?: number;
- deltaZ?: number;
- deltaMode?: number;
-}
-
-interface EventListener {
- (evt: Event): void;
-}
-
-interface ANGLE_instanced_arrays {
- drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
- drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
- vertexAttribDivisorANGLE(index: number, divisor: number): void;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-declare var ANGLE_instanced_arrays: {
- prototype: ANGLE_instanced_arrays;
- new(): ANGLE_instanced_arrays;
- readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
-}
-
-interface AnalyserNode extends AudioNode {
- fftSize: number;
- readonly frequencyBinCount: number;
- maxDecibels: number;
- minDecibels: number;
- smoothingTimeConstant: number;
- getByteFrequencyData(array: Uint8Array): void;
- getByteTimeDomainData(array: Uint8Array): void;
- getFloatFrequencyData(array: Float32Array): void;
- getFloatTimeDomainData(array: Float32Array): void;
-}
-
-declare var AnalyserNode: {
- prototype: AnalyserNode;
- new(): AnalyserNode;
-}
-
-interface AnimationEvent extends Event {
- readonly animationName: string;
- readonly elapsedTime: number;
- initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var AnimationEvent: {
- prototype: AnimationEvent;
- new(): AnimationEvent;
-}
-
-interface ApplicationCacheEventMap {
- "cached": Event;
- "checking": Event;
- "downloading": Event;
- "error": ErrorEvent;
- "noupdate": Event;
- "obsolete": Event;
- "progress": ProgressEvent;
- "updateready": Event;
-}
-
-interface ApplicationCache extends EventTarget {
- oncached: (this: ApplicationCache, ev: Event) => any;
- onchecking: (this: ApplicationCache, ev: Event) => any;
- ondownloading: (this: ApplicationCache, ev: Event) => any;
- onerror: (this: ApplicationCache, ev: ErrorEvent) => any;
- onnoupdate: (this: ApplicationCache, ev: Event) => any;
- onobsolete: (this: ApplicationCache, ev: Event) => any;
- onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
- onupdateready: (this: ApplicationCache, ev: Event) => any;
- readonly status: number;
- abort(): void;
- swapCache(): void;
- update(): void;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
- addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ApplicationCache: {
- prototype: ApplicationCache;
- new(): ApplicationCache;
- readonly CHECKING: number;
- readonly DOWNLOADING: number;
- readonly IDLE: number;
- readonly OBSOLETE: number;
- readonly UNCACHED: number;
- readonly UPDATEREADY: number;
-}
-
-interface AriaRequestEvent extends Event {
- readonly attributeName: string;
- attributeValue: string | null;
-}
-
-declare var AriaRequestEvent: {
- prototype: AriaRequestEvent;
- new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
-}
-
-interface Attr extends Node {
- readonly name: string;
- readonly ownerElement: Element;
- readonly prefix: string | null;
- readonly specified: boolean;
- value: string;
-}
-
-declare var Attr: {
- prototype: Attr;
- new(): Attr;
-}
-
-interface AudioBuffer {
- readonly duration: number;
- readonly length: number;
- readonly numberOfChannels: number;
- readonly sampleRate: number;
- copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
- copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
- getChannelData(channel: number): Float32Array;
-}
-
-declare var AudioBuffer: {
- prototype: AudioBuffer;
- new(): AudioBuffer;
-}
-
-interface AudioBufferSourceNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface AudioBufferSourceNode extends AudioNode {
- buffer: AudioBuffer | null;
- readonly detune: AudioParam;
- loop: boolean;
- loopEnd: number;
- loopStart: number;
- onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
- readonly playbackRate: AudioParam;
- start(when?: number, offset?: number, duration?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var AudioBufferSourceNode: {
- prototype: AudioBufferSourceNode;
- new(): AudioBufferSourceNode;
-}
-
-interface AudioContext extends EventTarget {
- readonly currentTime: number;
- readonly destination: AudioDestinationNode;
- readonly listener: AudioListener;
- readonly sampleRate: number;
- state: string;
- createAnalyser(): AnalyserNode;
- createBiquadFilter(): BiquadFilterNode;
- createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
- createBufferSource(): AudioBufferSourceNode;
- createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
- createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
- createConvolver(): ConvolverNode;
- createDelay(maxDelayTime?: number): DelayNode;
- createDynamicsCompressor(): DynamicsCompressorNode;
- createGain(): GainNode;
- createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
- createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
- createOscillator(): OscillatorNode;
- createPanner(): PannerNode;
- createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
- createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
- createStereoPanner(): StereoPannerNode;
- createWaveShaper(): WaveShaperNode;
- decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
-}
-
-declare var AudioContext: {
- prototype: AudioContext;
- new(): AudioContext;
-}
-
-interface AudioDestinationNode extends AudioNode {
- readonly maxChannelCount: number;
-}
-
-declare var AudioDestinationNode: {
- prototype: AudioDestinationNode;
- new(): AudioDestinationNode;
-}
-
-interface AudioListener {
- dopplerFactor: number;
- speedOfSound: number;
- setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var AudioListener: {
- prototype: AudioListener;
- new(): AudioListener;
-}
-
-interface AudioNode extends EventTarget {
- channelCount: number;
- channelCountMode: string;
- channelInterpretation: string;
- readonly context: AudioContext;
- readonly numberOfInputs: number;
- readonly numberOfOutputs: number;
- connect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(output?: number): void;
- disconnect(destination: AudioNode, output?: number, input?: number): void;
- disconnect(destination: AudioParam, output?: number): void;
-}
-
-declare var AudioNode: {
- prototype: AudioNode;
- new(): AudioNode;
-}
-
-interface AudioParam {
- readonly defaultValue: number;
- value: number;
- cancelScheduledValues(startTime: number): void;
- exponentialRampToValueAtTime(value: number, endTime: number): void;
- linearRampToValueAtTime(value: number, endTime: number): void;
- setTargetAtTime(target: number, startTime: number, timeConstant: number): void;
- setValueAtTime(value: number, startTime: number): void;
- setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;
-}
-
-declare var AudioParam: {
- prototype: AudioParam;
- new(): AudioParam;
-}
-
-interface AudioProcessingEvent extends Event {
- readonly inputBuffer: AudioBuffer;
- readonly outputBuffer: AudioBuffer;
- readonly playbackTime: number;
-}
-
-declare var AudioProcessingEvent: {
- prototype: AudioProcessingEvent;
- new(): AudioProcessingEvent;
-}
-
-interface AudioTrack {
- enabled: boolean;
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var AudioTrack: {
- prototype: AudioTrack;
- new(): AudioTrack;
-}
-
-interface AudioTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface AudioTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
- onchange: (this: AudioTrackList, ev: Event) => any;
- onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
- getTrackById(id: string): AudioTrack | null;
- item(index: number): AudioTrack;
- addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: AudioTrack;
-}
-
-declare var AudioTrackList: {
- prototype: AudioTrackList;
- new(): AudioTrackList;
-}
-
-interface BarProp {
- readonly visible: boolean;
-}
-
-declare var BarProp: {
- prototype: BarProp;
- new(): BarProp;
-}
-
-interface BeforeUnloadEvent extends Event {
- returnValue: any;
-}
-
-declare var BeforeUnloadEvent: {
- prototype: BeforeUnloadEvent;
- new(): BeforeUnloadEvent;
-}
-
-interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- readonly gain: AudioParam;
- type: string;
- getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
-}
-
-declare var BiquadFilterNode: {
- prototype: BiquadFilterNode;
- new(): BiquadFilterNode;
-}
-
-interface Blob {
- readonly size: number;
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
- slice(start?: number, end?: number, contentType?: string): Blob;
-}
-
-declare var Blob: {
- prototype: Blob;
- new (blobParts?: any[], options?: BlobPropertyBag): Blob;
-}
-
-interface CDATASection extends Text {
-}
-
-declare var CDATASection: {
- prototype: CDATASection;
- new(): CDATASection;
-}
-
-interface CSS {
- supports(property: string, value?: string): boolean;
-}
-declare var CSS: CSS;
-
-interface CSSConditionRule extends CSSGroupingRule {
- conditionText: string;
-}
-
-declare var CSSConditionRule: {
- prototype: CSSConditionRule;
- new(): CSSConditionRule;
-}
-
-interface CSSFontFaceRule extends CSSRule {
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSFontFaceRule: {
- prototype: CSSFontFaceRule;
- new(): CSSFontFaceRule;
-}
-
-interface CSSGroupingRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- deleteRule(index: number): void;
- insertRule(rule: string, index: number): number;
-}
-
-declare var CSSGroupingRule: {
- prototype: CSSGroupingRule;
- new(): CSSGroupingRule;
-}
-
-interface CSSImportRule extends CSSRule {
- readonly href: string;
- readonly media: MediaList;
- readonly styleSheet: CSSStyleSheet;
-}
-
-declare var CSSImportRule: {
- prototype: CSSImportRule;
- new(): CSSImportRule;
-}
-
-interface CSSKeyframeRule extends CSSRule {
- keyText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSKeyframeRule: {
- prototype: CSSKeyframeRule;
- new(): CSSKeyframeRule;
-}
-
-interface CSSKeyframesRule extends CSSRule {
- readonly cssRules: CSSRuleList;
- name: string;
- appendRule(rule: string): void;
- deleteRule(rule: string): void;
- findRule(rule: string): CSSKeyframeRule;
-}
-
-declare var CSSKeyframesRule: {
- prototype: CSSKeyframesRule;
- new(): CSSKeyframesRule;
-}
-
-interface CSSMediaRule extends CSSConditionRule {
- readonly media: MediaList;
-}
-
-declare var CSSMediaRule: {
- prototype: CSSMediaRule;
- new(): CSSMediaRule;
-}
-
-interface CSSNamespaceRule extends CSSRule {
- readonly namespaceURI: string;
- readonly prefix: string;
-}
-
-declare var CSSNamespaceRule: {
- prototype: CSSNamespaceRule;
- new(): CSSNamespaceRule;
-}
-
-interface CSSPageRule extends CSSRule {
- readonly pseudoClass: string;
- readonly selector: string;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSPageRule: {
- prototype: CSSPageRule;
- new(): CSSPageRule;
-}
-
-interface CSSRule {
- cssText: string;
- readonly parentRule: CSSRule;
- readonly parentStyleSheet: CSSStyleSheet;
- readonly type: number;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-declare var CSSRule: {
- prototype: CSSRule;
- new(): CSSRule;
- readonly CHARSET_RULE: number;
- readonly FONT_FACE_RULE: number;
- readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
- readonly KEYFRAME_RULE: number;
- readonly MEDIA_RULE: number;
- readonly NAMESPACE_RULE: number;
- readonly PAGE_RULE: number;
- readonly STYLE_RULE: number;
- readonly SUPPORTS_RULE: number;
- readonly UNKNOWN_RULE: number;
- readonly VIEWPORT_RULE: number;
-}
-
-interface CSSRuleList {
- readonly length: number;
- item(index: number): CSSRule;
- [index: number]: CSSRule;
-}
-
-declare var CSSRuleList: {
- prototype: CSSRuleList;
- new(): CSSRuleList;
-}
-
-interface CSSStyleDeclaration {
- alignContent: string | null;
- alignItems: string | null;
- alignSelf: string | null;
- alignmentBaseline: string | null;
- animation: string | null;
- animationDelay: string | null;
- animationDirection: string | null;
- animationDuration: string | null;
- animationFillMode: string | null;
- animationIterationCount: string | null;
- animationName: string | null;
- animationPlayState: string | null;
- animationTimingFunction: string | null;
- backfaceVisibility: string | null;
- background: string | null;
- backgroundAttachment: string | null;
- backgroundClip: string | null;
- backgroundColor: string | null;
- backgroundImage: string | null;
- backgroundOrigin: string | null;
- backgroundPosition: string | null;
- backgroundPositionX: string | null;
- backgroundPositionY: string | null;
- backgroundRepeat: string | null;
- backgroundSize: string | null;
- baselineShift: string | null;
- border: string | null;
- borderBottom: string | null;
- borderBottomColor: string | null;
- borderBottomLeftRadius: string | null;
- borderBottomRightRadius: string | null;
- borderBottomStyle: string | null;
- borderBottomWidth: string | null;
- borderCollapse: string | null;
- borderColor: string | null;
- borderImage: string | null;
- borderImageOutset: string | null;
- borderImageRepeat: string | null;
- borderImageSlice: string | null;
- borderImageSource: string | null;
- borderImageWidth: string | null;
- borderLeft: string | null;
- borderLeftColor: string | null;
- borderLeftStyle: string | null;
- borderLeftWidth: string | null;
- borderRadius: string | null;
- borderRight: string | null;
- borderRightColor: string | null;
- borderRightStyle: string | null;
- borderRightWidth: string | null;
- borderSpacing: string | null;
- borderStyle: string | null;
- borderTop: string | null;
- borderTopColor: string | null;
- borderTopLeftRadius: string | null;
- borderTopRightRadius: string | null;
- borderTopStyle: string | null;
- borderTopWidth: string | null;
- borderWidth: string | null;
- bottom: string | null;
- boxShadow: string | null;
- boxSizing: string | null;
- breakAfter: string | null;
- breakBefore: string | null;
- breakInside: string | null;
- captionSide: string | null;
- clear: string | null;
- clip: string | null;
- clipPath: string | null;
- clipRule: string | null;
- color: string | null;
- colorInterpolationFilters: string | null;
- columnCount: any;
- columnFill: string | null;
- columnGap: any;
- columnRule: string | null;
- columnRuleColor: any;
- columnRuleStyle: string | null;
- columnRuleWidth: any;
- columnSpan: string | null;
- columnWidth: any;
- columns: string | null;
- content: string | null;
- counterIncrement: string | null;
- counterReset: string | null;
- cssFloat: string | null;
- cssText: string;
- cursor: string | null;
- direction: string | null;
- display: string | null;
- dominantBaseline: string | null;
- emptyCells: string | null;
- enableBackground: string | null;
- fill: string | null;
- fillOpacity: string | null;
- fillRule: string | null;
- filter: string | null;
- flex: string | null;
- flexBasis: string | null;
- flexDirection: string | null;
- flexFlow: string | null;
- flexGrow: string | null;
- flexShrink: string | null;
- flexWrap: string | null;
- floodColor: string | null;
- floodOpacity: string | null;
- font: string | null;
- fontFamily: string | null;
- fontFeatureSettings: string | null;
- fontSize: string | null;
- fontSizeAdjust: string | null;
- fontStretch: string | null;
- fontStyle: string | null;
- fontVariant: string | null;
- fontWeight: string | null;
- glyphOrientationHorizontal: string | null;
- glyphOrientationVertical: string | null;
- height: string | null;
- imeMode: string | null;
- justifyContent: string | null;
- kerning: string | null;
- left: string | null;
- readonly length: number;
- letterSpacing: string | null;
- lightingColor: string | null;
- lineHeight: string | null;
- listStyle: string | null;
- listStyleImage: string | null;
- listStylePosition: string | null;
- listStyleType: string | null;
- margin: string | null;
- marginBottom: string | null;
- marginLeft: string | null;
- marginRight: string | null;
- marginTop: string | null;
- marker: string | null;
- markerEnd: string | null;
- markerMid: string | null;
- markerStart: string | null;
- mask: string | null;
- maxHeight: string | null;
- maxWidth: string | null;
- minHeight: string | null;
- minWidth: string | null;
- msContentZoomChaining: string | null;
- msContentZoomLimit: string | null;
- msContentZoomLimitMax: any;
- msContentZoomLimitMin: any;
- msContentZoomSnap: string | null;
- msContentZoomSnapPoints: string | null;
- msContentZoomSnapType: string | null;
- msContentZooming: string | null;
- msFlowFrom: string | null;
- msFlowInto: string | null;
- msFontFeatureSettings: string | null;
- msGridColumn: any;
- msGridColumnAlign: string | null;
- msGridColumnSpan: any;
- msGridColumns: string | null;
- msGridRow: any;
- msGridRowAlign: string | null;
- msGridRowSpan: any;
- msGridRows: string | null;
- msHighContrastAdjust: string | null;
- msHyphenateLimitChars: string | null;
- msHyphenateLimitLines: any;
- msHyphenateLimitZone: any;
- msHyphens: string | null;
- msImeAlign: string | null;
- msOverflowStyle: string | null;
- msScrollChaining: string | null;
- msScrollLimit: string | null;
- msScrollLimitXMax: any;
- msScrollLimitXMin: any;
- msScrollLimitYMax: any;
- msScrollLimitYMin: any;
- msScrollRails: string | null;
- msScrollSnapPointsX: string | null;
- msScrollSnapPointsY: string | null;
- msScrollSnapType: string | null;
- msScrollSnapX: string | null;
- msScrollSnapY: string | null;
- msScrollTranslation: string | null;
- msTextCombineHorizontal: string | null;
- msTextSizeAdjust: any;
- msTouchAction: string | null;
- msTouchSelect: string | null;
- msUserSelect: string | null;
- msWrapFlow: string;
- msWrapMargin: any;
- msWrapThrough: string;
- opacity: string | null;
- order: string | null;
- orphans: string | null;
- outline: string | null;
- outlineColor: string | null;
- outlineStyle: string | null;
- outlineWidth: string | null;
- overflow: string | null;
- overflowX: string | null;
- overflowY: string | null;
- padding: string | null;
- paddingBottom: string | null;
- paddingLeft: string | null;
- paddingRight: string | null;
- paddingTop: string | null;
- pageBreakAfter: string | null;
- pageBreakBefore: string | null;
- pageBreakInside: string | null;
- readonly parentRule: CSSRule;
- perspective: string | null;
- perspectiveOrigin: string | null;
- pointerEvents: string | null;
- position: string | null;
- quotes: string | null;
- right: string | null;
- rubyAlign: string | null;
- rubyOverhang: string | null;
- rubyPosition: string | null;
- stopColor: string | null;
- stopOpacity: string | null;
- stroke: string | null;
- strokeDasharray: string | null;
- strokeDashoffset: string | null;
- strokeLinecap: string | null;
- strokeLinejoin: string | null;
- strokeMiterlimit: string | null;
- strokeOpacity: string | null;
- strokeWidth: string | null;
- tableLayout: string | null;
- textAlign: string | null;
- textAlignLast: string | null;
- textAnchor: string | null;
- textDecoration: string | null;
- textIndent: string | null;
- textJustify: string | null;
- textKashida: string | null;
- textKashidaSpace: string | null;
- textOverflow: string | null;
- textShadow: string | null;
- textTransform: string | null;
- textUnderlinePosition: string | null;
- top: string | null;
- touchAction: string | null;
- transform: string | null;
- transformOrigin: string | null;
- transformStyle: string | null;
- transition: string | null;
- transitionDelay: string | null;
- transitionDuration: string | null;
- transitionProperty: string | null;
- transitionTimingFunction: string | null;
- unicodeBidi: string | null;
- verticalAlign: string | null;
- visibility: string | null;
- webkitAlignContent: string | null;
- webkitAlignItems: string | null;
- webkitAlignSelf: string | null;
- webkitAnimation: string | null;
- webkitAnimationDelay: string | null;
- webkitAnimationDirection: string | null;
- webkitAnimationDuration: string | null;
- webkitAnimationFillMode: string | null;
- webkitAnimationIterationCount: string | null;
- webkitAnimationName: string | null;
- webkitAnimationPlayState: string | null;
- webkitAnimationTimingFunction: string | null;
- webkitAppearance: string | null;
- webkitBackfaceVisibility: string | null;
- webkitBackgroundClip: string | null;
- webkitBackgroundOrigin: string | null;
- webkitBackgroundSize: string | null;
- webkitBorderBottomLeftRadius: string | null;
- webkitBorderBottomRightRadius: string | null;
- webkitBorderImage: string | null;
- webkitBorderRadius: string | null;
- webkitBorderTopLeftRadius: string | null;
- webkitBorderTopRightRadius: string | null;
- webkitBoxAlign: string | null;
- webkitBoxDirection: string | null;
- webkitBoxFlex: string | null;
- webkitBoxOrdinalGroup: string | null;
- webkitBoxOrient: string | null;
- webkitBoxPack: string | null;
- webkitBoxSizing: string | null;
- webkitColumnBreakAfter: string | null;
- webkitColumnBreakBefore: string | null;
- webkitColumnBreakInside: string | null;
- webkitColumnCount: any;
- webkitColumnGap: any;
- webkitColumnRule: string | null;
- webkitColumnRuleColor: any;
- webkitColumnRuleStyle: string | null;
- webkitColumnRuleWidth: any;
- webkitColumnSpan: string | null;
- webkitColumnWidth: any;
- webkitColumns: string | null;
- webkitFilter: string | null;
- webkitFlex: string | null;
- webkitFlexBasis: string | null;
- webkitFlexDirection: string | null;
- webkitFlexFlow: string | null;
- webkitFlexGrow: string | null;
- webkitFlexShrink: string | null;
- webkitFlexWrap: string | null;
- webkitJustifyContent: string | null;
- webkitOrder: string | null;
- webkitPerspective: string | null;
- webkitPerspectiveOrigin: string | null;
- webkitTapHighlightColor: string | null;
- webkitTextFillColor: string | null;
- webkitTextSizeAdjust: any;
- webkitTransform: string | null;
- webkitTransformOrigin: string | null;
- webkitTransformStyle: string | null;
- webkitTransition: string | null;
- webkitTransitionDelay: string | null;
- webkitTransitionDuration: string | null;
- webkitTransitionProperty: string | null;
- webkitTransitionTimingFunction: string | null;
- webkitUserModify: string | null;
- webkitUserSelect: string | null;
- webkitWritingMode: string | null;
- whiteSpace: string | null;
- widows: string | null;
- width: string | null;
- wordBreak: string | null;
- wordSpacing: string | null;
- wordWrap: string | null;
- writingMode: string | null;
- zIndex: string | null;
- zoom: string | null;
- resize: string | null;
- getPropertyPriority(propertyName: string): string;
- getPropertyValue(propertyName: string): string;
- item(index: number): string;
- removeProperty(propertyName: string): string;
- setProperty(propertyName: string, value: string | null, priority?: string): void;
- [index: number]: string;
-}
-
-declare var CSSStyleDeclaration: {
- prototype: CSSStyleDeclaration;
- new(): CSSStyleDeclaration;
-}
-
-interface CSSStyleRule extends CSSRule {
- readonly readOnly: boolean;
- selectorText: string;
- readonly style: CSSStyleDeclaration;
-}
-
-declare var CSSStyleRule: {
- prototype: CSSStyleRule;
- new(): CSSStyleRule;
-}
-
-interface CSSStyleSheet extends StyleSheet {
- readonly cssRules: CSSRuleList;
- cssText: string;
- readonly href: string;
- readonly id: string;
- readonly imports: StyleSheetList;
- readonly isAlternate: boolean;
- readonly isPrefAlternate: boolean;
- readonly ownerRule: CSSRule;
- readonly owningElement: Element;
- readonly pages: StyleSheetPageList;
- readonly readOnly: boolean;
- readonly rules: CSSRuleList;
- addImport(bstrURL: string, lIndex?: number): number;
- addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
- addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
- deleteRule(index?: number): void;
- insertRule(rule: string, index?: number): number;
- removeImport(lIndex: number): void;
- removeRule(lIndex: number): void;
-}
-
-declare var CSSStyleSheet: {
- prototype: CSSStyleSheet;
- new(): CSSStyleSheet;
-}
-
-interface CSSSupportsRule extends CSSConditionRule {
-}
-
-declare var CSSSupportsRule: {
- prototype: CSSSupportsRule;
- new(): CSSSupportsRule;
-}
-
-interface CanvasGradient {
- addColorStop(offset: number, color: string): void;
-}
-
-declare var CanvasGradient: {
- prototype: CanvasGradient;
- new(): CanvasGradient;
-}
-
-interface CanvasPattern {
- setTransform(matrix: SVGMatrix): void;
-}
-
-declare var CanvasPattern: {
- prototype: CanvasPattern;
- new(): CanvasPattern;
-}
-
-interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
- readonly canvas: HTMLCanvasElement;
- fillStyle: string | CanvasGradient | CanvasPattern;
- font: string;
- globalAlpha: number;
- globalCompositeOperation: string;
- lineCap: string;
- lineDashOffset: number;
- lineJoin: string;
- lineWidth: number;
- miterLimit: number;
- msFillRule: string;
- msImageSmoothingEnabled: boolean;
- shadowBlur: number;
- shadowColor: string;
- shadowOffsetX: number;
- shadowOffsetY: number;
- strokeStyle: string | CanvasGradient | CanvasPattern;
- textAlign: string;
- textBaseline: string;
- mozImageSmoothingEnabled: boolean;
- webkitImageSmoothingEnabled: boolean;
- oImageSmoothingEnabled: boolean;
- beginPath(): void;
- clearRect(x: number, y: number, w: number, h: number): void;
- clip(fillRule?: string): void;
- createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
- createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
- createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
- createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
- drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
- fill(fillRule?: string): void;
- fillRect(x: number, y: number, w: number, h: number): void;
- fillText(text: string, x: number, y: number, maxWidth?: number): void;
- getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
- getLineDash(): number[];
- isPointInPath(x: number, y: number, fillRule?: string): boolean;
- measureText(text: string): TextMetrics;
- putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
- restore(): void;
- rotate(angle: number): void;
- save(): void;
- scale(x: number, y: number): void;
- setLineDash(segments: number[]): void;
- setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- stroke(): void;
- strokeRect(x: number, y: number, w: number, h: number): void;
- strokeText(text: string, x: number, y: number, maxWidth?: number): void;
- transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
- translate(x: number, y: number): void;
-}
-
-declare var CanvasRenderingContext2D: {
- prototype: CanvasRenderingContext2D;
- new(): CanvasRenderingContext2D;
-}
-
-interface ChannelMergerNode extends AudioNode {
-}
-
-declare var ChannelMergerNode: {
- prototype: ChannelMergerNode;
- new(): ChannelMergerNode;
-}
-
-interface ChannelSplitterNode extends AudioNode {
-}
-
-declare var ChannelSplitterNode: {
- prototype: ChannelSplitterNode;
- new(): ChannelSplitterNode;
-}
-
-interface CharacterData extends Node, ChildNode {
- data: string;
- readonly length: number;
- appendData(arg: string): void;
- deleteData(offset: number, count: number): void;
- insertData(offset: number, arg: string): void;
- replaceData(offset: number, count: number, arg: string): void;
- substringData(offset: number, count: number): string;
-}
-
-declare var CharacterData: {
- prototype: CharacterData;
- new(): CharacterData;
-}
-
-interface ClientRect {
- bottom: number;
- readonly height: number;
- left: number;
- right: number;
- top: number;
- readonly width: number;
-}
-
-declare var ClientRect: {
- prototype: ClientRect;
- new(): ClientRect;
-}
-
-interface ClientRectList {
- readonly length: number;
- item(index: number): ClientRect;
- [index: number]: ClientRect;
-}
-
-declare var ClientRectList: {
- prototype: ClientRectList;
- new(): ClientRectList;
-}
-
-interface ClipboardEvent extends Event {
- readonly clipboardData: DataTransfer;
-}
-
-declare var ClipboardEvent: {
- prototype: ClipboardEvent;
- new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
-}
-
-interface CloseEvent extends Event {
- readonly code: number;
- readonly reason: string;
- readonly wasClean: boolean;
- initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
-}
-
-declare var CloseEvent: {
- prototype: CloseEvent;
- new(): CloseEvent;
-}
-
-interface CommandEvent extends Event {
- readonly commandName: string;
- readonly detail: string | null;
-}
-
-declare var CommandEvent: {
- prototype: CommandEvent;
- new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
-}
-
-interface Comment extends CharacterData {
- text: string;
-}
-
-declare var Comment: {
- prototype: Comment;
- new(): Comment;
-}
-
-interface CompositionEvent extends UIEvent {
- readonly data: string;
- readonly locale: string;
- initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
-}
-
-declare var CompositionEvent: {
- prototype: CompositionEvent;
- new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
-}
-
-interface Console {
- assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
- clear(): void;
- count(countTitle?: string): void;
- debug(message?: string, ...optionalParams: any[]): void;
- dir(value?: any, ...optionalParams: any[]): void;
- dirxml(value: any): void;
- error(message?: any, ...optionalParams: any[]): void;
- exception(message?: string, ...optionalParams: any[]): void;
- group(groupTitle?: string): void;
- groupCollapsed(groupTitle?: string): void;
- groupEnd(): void;
- info(message?: any, ...optionalParams: any[]): void;
- log(message?: any, ...optionalParams: any[]): void;
- msIsIndependentlyComposed(element: Element): boolean;
- profile(reportName?: string): void;
- profileEnd(): void;
- select(element: Element): void;
- table(...data: any[]): void;
- time(timerName?: string): void;
- timeEnd(timerName?: string): void;
- trace(message?: any, ...optionalParams: any[]): void;
- warn(message?: any, ...optionalParams: any[]): void;
-}
-
-declare var Console: {
- prototype: Console;
- new(): Console;
-}
-
-interface ConvolverNode extends AudioNode {
- buffer: AudioBuffer | null;
- normalize: boolean;
-}
-
-declare var ConvolverNode: {
- prototype: ConvolverNode;
- new(): ConvolverNode;
-}
-
-interface Coordinates {
- readonly accuracy: number;
- readonly altitude: number | null;
- readonly altitudeAccuracy: number | null;
- readonly heading: number | null;
- readonly latitude: number;
- readonly longitude: number;
- readonly speed: number | null;
-}
-
-declare var Coordinates: {
- prototype: Coordinates;
- new(): Coordinates;
-}
-
-interface Crypto extends Object, RandomSource {
- readonly subtle: SubtleCrypto;
-}
-
-declare var Crypto: {
- prototype: Crypto;
- new(): Crypto;
-}
-
-interface CryptoKey {
- readonly algorithm: KeyAlgorithm;
- readonly extractable: boolean;
- readonly type: string;
- readonly usages: string[];
-}
-
-declare var CryptoKey: {
- prototype: CryptoKey;
- new(): CryptoKey;
-}
-
-interface CryptoKeyPair {
- privateKey: CryptoKey;
- publicKey: CryptoKey;
-}
-
-declare var CryptoKeyPair: {
- prototype: CryptoKeyPair;
- new(): CryptoKeyPair;
-}
-
-interface CustomEvent extends Event {
- readonly detail: any;
- initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
-}
-
-declare var CustomEvent: {
- prototype: CustomEvent;
- new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
-}
-
-interface DOMError {
- readonly name: string;
- toString(): string;
-}
-
-declare var DOMError: {
- prototype: DOMError;
- new(): DOMError;
-}
-
-interface DOMException {
- readonly code: number;
- readonly message: string;
- readonly name: string;
- toString(): string;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-declare var DOMException: {
- prototype: DOMException;
- new(): DOMException;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-interface DOMImplementation {
- createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;
- createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;
- createHTMLDocument(title: string): Document;
- hasFeature(feature: string | null, version: string | null): boolean;
-}
-
-declare var DOMImplementation: {
- prototype: DOMImplementation;
- new(): DOMImplementation;
-}
-
-interface DOMParser {
- parseFromString(source: string, mimeType: string): Document;
-}
-
-declare var DOMParser: {
- prototype: DOMParser;
- new(): DOMParser;
-}
-
-interface DOMSettableTokenList extends DOMTokenList {
- value: string;
-}
-
-declare var DOMSettableTokenList: {
- prototype: DOMSettableTokenList;
- new(): DOMSettableTokenList;
-}
-
-interface DOMStringList {
- readonly length: number;
- contains(str: string): boolean;
- item(index: number): string | null;
- [index: number]: string;
-}
-
-declare var DOMStringList: {
- prototype: DOMStringList;
- new(): DOMStringList;
-}
-
-interface DOMStringMap {
- [name: string]: string;
-}
-
-declare var DOMStringMap: {
- prototype: DOMStringMap;
- new(): DOMStringMap;
-}
-
-interface DOMTokenList {
- readonly length: number;
- add(...token: string[]): void;
- contains(token: string): boolean;
- item(index: number): string;
- remove(...token: string[]): void;
- toString(): string;
- toggle(token: string, force?: boolean): boolean;
- [index: number]: string;
-}
-
-declare var DOMTokenList: {
- prototype: DOMTokenList;
- new(): DOMTokenList;
-}
-
-interface DataCue extends TextTrackCue {
- data: ArrayBuffer;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var DataCue: {
- prototype: DataCue;
- new(): DataCue;
-}
-
-interface DataTransfer {
- dropEffect: string;
- effectAllowed: string;
- readonly files: FileList;
- readonly items: DataTransferItemList;
- readonly types: string[];
- clearData(format?: string): boolean;
- getData(format: string): string;
- setData(format: string, data: string): boolean;
-}
-
-declare var DataTransfer: {
- prototype: DataTransfer;
- new(): DataTransfer;
-}
-
-interface DataTransferItem {
- readonly kind: string;
- readonly type: string;
- getAsFile(): File | null;
- getAsString(_callback: FunctionStringCallback | null): void;
-}
-
-declare var DataTransferItem: {
- prototype: DataTransferItem;
- new(): DataTransferItem;
-}
-
-interface DataTransferItemList {
- readonly length: number;
- add(data: File): DataTransferItem | null;
- clear(): void;
- item(index: number): DataTransferItem;
- remove(index: number): void;
- [index: number]: DataTransferItem;
-}
-
-declare var DataTransferItemList: {
- prototype: DataTransferItemList;
- new(): DataTransferItemList;
-}
-
-interface DeferredPermissionRequest {
- readonly id: number;
- readonly type: string;
- readonly uri: string;
- allow(): void;
- deny(): void;
-}
-
-declare var DeferredPermissionRequest: {
- prototype: DeferredPermissionRequest;
- new(): DeferredPermissionRequest;
-}
-
-interface DelayNode extends AudioNode {
- readonly delayTime: AudioParam;
-}
-
-declare var DelayNode: {
- prototype: DelayNode;
- new(): DelayNode;
-}
-
-interface DeviceAcceleration {
- readonly x: number | null;
- readonly y: number | null;
- readonly z: number | null;
-}
-
-declare var DeviceAcceleration: {
- prototype: DeviceAcceleration;
- new(): DeviceAcceleration;
-}
-
-interface DeviceLightEvent extends Event {
- readonly value: number;
-}
-
-declare var DeviceLightEvent: {
- prototype: DeviceLightEvent;
- new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
-
-interface DeviceMotionEvent extends Event {
- readonly acceleration: DeviceAcceleration | null;
- readonly accelerationIncludingGravity: DeviceAcceleration | null;
- readonly interval: number | null;
- readonly rotationRate: DeviceRotationRate | null;
- initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
-}
-
-declare var DeviceMotionEvent: {
- prototype: DeviceMotionEvent;
- new(): DeviceMotionEvent;
-}
-
-interface DeviceOrientationEvent extends Event {
- readonly absolute: boolean;
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
- initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
-}
-
-declare var DeviceOrientationEvent: {
- prototype: DeviceOrientationEvent;
- new(): DeviceOrientationEvent;
-}
-
-interface DeviceRotationRate {
- readonly alpha: number | null;
- readonly beta: number | null;
- readonly gamma: number | null;
-}
-
-declare var DeviceRotationRate: {
- prototype: DeviceRotationRate;
- new(): DeviceRotationRate;
-}
-
-interface DocumentEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforedeactivate": UIEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "fullscreenchange": Event;
- "fullscreenerror": Event;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "mssitemodejumplistitemremoved": MSSiteModeEvent;
- "msthumbnailclick": MSSiteModeEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "pointerlockchange": Event;
- "pointerlockerror": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectionchange": Event;
- "selectstart": Event;
- "stalled": Event;
- "stop": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "volumechange": Event;
- "waiting": Event;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
- /**
- * Sets or gets the URL for the current document.
- */
- readonly URL: string;
- /**
- * Gets the URL for the document, stripped of any character encoding.
- */
- readonly URLUnencoded: string;
- /**
- * Gets the object that has the focus when the parent document has focus.
- */
- readonly activeElement: Element;
- /**
- * Sets or gets the color of all active links in the document.
- */
- alinkColor: string;
- /**
- * Returns a reference to the collection of elements contained by the object.
- */
- readonly all: HTMLAllCollection;
- /**
- * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
- */
- anchors: HTMLCollectionOf<HTMLAnchorElement>;
- /**
- * Retrieves a collection of all applet objects in the document.
- */
- applets: HTMLCollectionOf<HTMLAppletElement>;
- /**
- * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
- */
- bgColor: string;
- /**
- * Specifies the beginning and end of the document body.
- */
- body: HTMLElement;
- readonly characterSet: string;
- /**
- * Gets or sets the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets a value that indicates whether standards-compliant mode is switched on for the object.
- */
- readonly compatMode: string;
- cookie: string;
- readonly currentScript: HTMLScriptElement | SVGScriptElement;
- /**
- * Gets the default character set from the current regional language settings.
- */
- readonly defaultCharset: string;
- readonly defaultView: Window;
- /**
- * Sets or gets a value that indicates whether the document can be edited.
- */
- designMode: string;
- /**
- * Sets or retrieves a value that indicates the reading order of the object.
- */
- dir: string;
- /**
- * Gets an object representing the document type declaration associated with the current document.
- */
- readonly doctype: DocumentType;
- /**
- * Gets a reference to the root node of the document.
- */
- documentElement: HTMLElement;
- /**
- * Sets or gets the security domain of the document.
- */
- domain: string;
- /**
- * Retrieves a collection of all embed objects in the document.
- */
- embeds: HTMLCollectionOf<HTMLEmbedElement>;
- /**
- * Sets or gets the foreground (text) color of the document.
- */
- fgColor: string;
- /**
- * Retrieves a collection, in source order, of all form objects in the document.
- */
- forms: HTMLCollectionOf<HTMLFormElement>;
- readonly fullscreenElement: Element | null;
- readonly fullscreenEnabled: boolean;
- readonly head: HTMLHeadElement;
- readonly hidden: boolean;
- /**
- * Retrieves a collection, in source order, of img objects in the document.
- */
- images: HTMLCollectionOf<HTMLImageElement>;
- /**
- * Gets the implementation object of the current document.
- */
- readonly implementation: DOMImplementation;
- /**
- * Returns the character encoding used to create the webpage that is loaded into the document object.
- */
- readonly inputEncoding: string | null;
- /**
- * Gets the date that the page was last modified, if the page supplies one.
- */
- readonly lastModified: string;
- /**
- * Sets or gets the color of the document links.
- */
- linkColor: string;
- /**
- * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
- */
- links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
- /**
- * Contains information about the current URL.
- */
- readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
- msCapsLockWarningOff: boolean;
- /**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
- onabort: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object is set as the active element.
- * @param ev The event.
- */
- onactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the object is set as the active element.
- * @param ev The event.
- */
- onbeforeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
- * @param ev The event.
- */
- onbeforedeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the object loses the input focus.
- * @param ev The focus event.
- */
- onblur: (this: Document, ev: FocusEvent) => any;
- /**
- * Occurs when playback is possible, but would require further buffering.
- * @param ev The event.
- */
- oncanplay: (this: Document, ev: Event) => any;
- oncanplaythrough: (this: Document, ev: Event) => any;
- /**
- * Fires when the contents of the object or selection have changed.
- * @param ev The event.
- */
- onchange: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the left mouse button on the object
- * @param ev The mouse event.
- */
- onclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user clicks the right mouse button in the client area, opening the context menu.
- * @param ev The mouse event.
- */
- oncontextmenu: (this: Document, ev: PointerEvent) => any;
- /**
- * Fires when the user double-clicks the object.
- * @param ev The mouse event.
- */
- ondblclick: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the activeElement is changed from the current object to another object in the parent document.
- * @param ev The UI Event
- */
- ondeactivate: (this: Document, ev: UIEvent) => any;
- /**
- * Fires on the source object continuously during a drag operation.
- * @param ev The event.
- */
- ondrag: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user releases the mouse at the close of a drag operation.
- * @param ev The event.
- */
- ondragend: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element when the user drags the object to a valid drop target.
- * @param ev The drag event.
- */
- ondragenter: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
- * @param ev The drag event.
- */
- ondragleave: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the target element continuously while the user drags the object over a valid drop target.
- * @param ev The event.
- */
- ondragover: (this: Document, ev: DragEvent) => any;
- /**
- * Fires on the source object when the user starts to drag a text selection or selected object.
- * @param ev The event.
- */
- ondragstart: (this: Document, ev: DragEvent) => any;
- ondrop: (this: Document, ev: DragEvent) => any;
- /**
- * Occurs when the duration attribute is updated.
- * @param ev The event.
- */
- ondurationchange: (this: Document, ev: Event) => any;
- /**
- * Occurs when the media element is reset to its initial state.
- * @param ev The event.
- */
- onemptied: (this: Document, ev: Event) => any;
- /**
- * Occurs when the end of playback is reached.
- * @param ev The event
- */
- onended: (this: Document, ev: MediaStreamErrorEvent) => any;
- /**
- * Fires when an error occurs during object loading.
- * @param ev The event.
- */
- onerror: (this: Document, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- * @param ev The event.
- */
- onfocus: (this: Document, ev: FocusEvent) => any;
- onfullscreenchange: (this: Document, ev: Event) => any;
- onfullscreenerror: (this: Document, ev: Event) => any;
- oninput: (this: Document, ev: Event) => any;
- oninvalid: (this: Document, ev: Event) => any;
- /**
- * Fires when the user presses a key.
- * @param ev The keyboard event
- */
- onkeydown: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user presses an alphanumeric key.
- * @param ev The event.
- */
- onkeypress: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires when the user releases a key.
- * @param ev The keyboard event
- */
- onkeyup: (this: Document, ev: KeyboardEvent) => any;
- /**
- * Fires immediately after the browser loads the object.
- * @param ev The event.
- */
- onload: (this: Document, ev: Event) => any;
- /**
- * Occurs when media data is loaded at the current playback position.
- * @param ev The event.
- */
- onloadeddata: (this: Document, ev: Event) => any;
- /**
- * Occurs when the duration and dimensions of the media have been determined.
- * @param ev The event.
- */
- onloadedmetadata: (this: Document, ev: Event) => any;
- /**
- * Occurs when Internet Explorer begins looking for media data.
- * @param ev The event.
- */
- onloadstart: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the object with either mouse button.
- * @param ev The mouse event.
- */
- onmousedown: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse over the object.
- * @param ev The mouse event.
- */
- onmousemove: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer outside the boundaries of the object.
- * @param ev The mouse event.
- */
- onmouseout: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user moves the mouse pointer into the object.
- * @param ev The mouse event.
- */
- onmouseover: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the user releases a mouse button while the mouse is over the object.
- * @param ev The mouse event.
- */
- onmouseup: (this: Document, ev: MouseEvent) => any;
- /**
- * Fires when the wheel button is rotated.
- * @param ev The mouse event
- */
- onmousewheel: (this: Document, ev: WheelEvent) => any;
- onmscontentzoom: (this: Document, ev: UIEvent) => any;
- onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
- onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
- onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
- onmspointermove: (this: Document, ev: MSPointerEvent) => any;
- onmspointerout: (this: Document, ev: MSPointerEvent) => any;
- onmspointerover: (this: Document, ev: MSPointerEvent) => any;
- onmspointerup: (this: Document, ev: MSPointerEvent) => any;
- /**
- * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
- * @param ev The event.
- */
- onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
- /**
- * Occurs when playback is paused.
- * @param ev The event.
- */
- onpause: (this: Document, ev: Event) => any;
- /**
- * Occurs when the play method is requested.
- * @param ev The event.
- */
- onplay: (this: Document, ev: Event) => any;
- /**
- * Occurs when the audio or video has started playing.
- * @param ev The event.
- */
- onplaying: (this: Document, ev: Event) => any;
- onpointerlockchange: (this: Document, ev: Event) => any;
- onpointerlockerror: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate progress while downloading media data.
- * @param ev The event.
- */
- onprogress: (this: Document, ev: ProgressEvent) => any;
- /**
- * Occurs when the playback rate is increased or decreased.
- * @param ev The event.
- */
- onratechange: (this: Document, ev: Event) => any;
- /**
- * Fires when the state of the object has changed.
- * @param ev The event
- */
- onreadystatechange: (this: Document, ev: ProgressEvent) => any;
- /**
- * Fires when the user resets a form.
- * @param ev The event.
- */
- onreset: (this: Document, ev: Event) => any;
- /**
- * Fires when the user repositions the scroll box in the scroll bar on the object.
- * @param ev The event.
- */
- onscroll: (this: Document, ev: UIEvent) => any;
- /**
- * Occurs when the seek operation ends.
- * @param ev The event.
- */
- onseeked: (this: Document, ev: Event) => any;
- /**
- * Occurs when the current playback position is moved.
- * @param ev The event.
- */
- onseeking: (this: Document, ev: Event) => any;
- /**
- * Fires when the current selection changes.
- * @param ev The event.
- */
- onselect: (this: Document, ev: UIEvent) => any;
- /**
- * Fires when the selection state of a document changes.
- * @param ev The event.
- */
- onselectionchange: (this: Document, ev: Event) => any;
- onselectstart: (this: Document, ev: Event) => any;
- /**
- * Occurs when the download has stopped.
- * @param ev The event.
- */
- onstalled: (this: Document, ev: Event) => any;
- /**
- * Fires when the user clicks the Stop button or leaves the Web page.
- * @param ev The event.
- */
- onstop: (this: Document, ev: Event) => any;
- onsubmit: (this: Document, ev: Event) => any;
- /**
- * Occurs if the load operation has been intentionally halted.
- * @param ev The event.
- */
- onsuspend: (this: Document, ev: Event) => any;
- /**
- * Occurs to indicate the current playback position.
- * @param ev The event.
- */
- ontimeupdate: (this: Document, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- /**
- * Occurs when the volume is changed, or playback is muted or unmuted.
- * @param ev The event.
- */
- onvolumechange: (this: Document, ev: Event) => any;
- /**
- * Occurs when playback stops because the next frame of a video resource is not available.
- * @param ev The event.
- */
- onwaiting: (this: Document, ev: Event) => any;
- onwebkitfullscreenchange: (this: Document, ev: Event) => any;
- onwebkitfullscreenerror: (this: Document, ev: Event) => any;
- plugins: HTMLCollectionOf<HTMLEmbedElement>;
- readonly pointerLockElement: Element;
- /**
- * Retrieves a value that indicates the current state of the object.
- */
- readonly readyState: string;
- /**
- * Gets the URL of the location that referred the user to the current page.
- */
- readonly referrer: string;
- /**
- * Gets the root svg element in the document hierarchy.
- */
- readonly rootElement: SVGSVGElement;
- /**
- * Retrieves a collection of all script objects in the document.
- */
- scripts: HTMLCollectionOf<HTMLScriptElement>;
- readonly scrollingElement: Element | null;
- /**
- * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
- */
- readonly styleSheets: StyleSheetList;
- /**
- * Contains the title of the document.
- */
- title: string;
- readonly visibilityState: string;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
- vlinkColor: string;
- readonly webkitCurrentFullScreenElement: Element | null;
- readonly webkitFullscreenElement: Element | null;
- readonly webkitFullscreenEnabled: boolean;
- readonly webkitIsFullScreen: boolean;
- readonly xmlEncoding: string | null;
- xmlStandalone: boolean;
- /**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
- xmlVersion: string | null;
- adoptNode(source: Node): Node;
- captureEvents(): void;
- caretRangeFromPoint(x: number, y: number): Range;
- clear(): void;
- /**
- * Closes an output stream and forces the sent data to display.
- */
- close(): void;
- /**
- * Creates an attribute object with a specified name.
- * @param name String that sets the attribute object's name.
- */
- createAttribute(name: string): Attr;
- createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
- createCDATASection(data: string): CDATASection;
- /**
- * Creates a comment object with the specified data.
- * @param data Sets the comment object's data.
- */
- createComment(data: string): Comment;
- /**
- * Creates a new document.
- */
- createDocumentFragment(): DocumentFragment;
- /**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
- createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
- createElement(tagName: string): HTMLElement;
- createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
- createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
- createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver: Node): XPathNSResolver;
- /**
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list
- * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
- createProcessingInstruction(target: string, data: string): ProcessingInstruction;
- /**
- * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
- */
- createRange(): Range;
- /**
- * Creates a text string from the specified value.
- * @param data String that specifies the nodeValue property of the text node.
- */
- createTextNode(data: string): Text;
- createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
- createTouchList(...touches: Touch[]): TouchList;
- /**
- * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
- * @param root The root element or node to start traversing on.
- * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
- * @param filter A custom NodeFilter function to use.
- * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
- */
- createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
- /**
- * Returns the element for the specified x coordinate and the specified y coordinate.
- * @param x The x-offset
- * @param y The y-offset
- */
- elementFromPoint(x: number, y: number): Element;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
- /**
- * Executes a command on the current document, current selection, or the given range.
- * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
- * @param showUI Display the user interface, defaults to false.
- * @param value Value to assign.
- */
- execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
- /**
- * Displays help information for the given command identifier.
- * @param commandId Displays help information for the given command identifier.
- */
- execCommandShowHelp(commandId: string): boolean;
- exitFullscreen(): void;
- exitPointerLock(): void;
- /**
- * Causes the element to receive the focus and executes the code specified by the onfocus event.
- */
- focus(): void;
- /**
- * Returns a reference to the first object with the specified value of the ID or NAME attribute.
- * @param elementId String that specifies the ID value. Case-insensitive.
- */
- getElementById(elementId: string): HTMLElement | null;
- getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
- /**
- * Gets a collection of objects based on the value of the NAME or ID attribute.
- * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
- */
- getElementsByName(elementName: string): NodeListOf<HTMLElement>;
- /**
- * Retrieves a collection of objects based on the specified element name.
- * @param name Specifies the name of an element.
- */
- getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
- getElementsByTagName(tagname: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- /**
- * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
- */
- getSelection(): Selection;
- /**
- * Gets a value indicating whether the object currently has focus.
- */
- hasFocus(): boolean;
- importNode(importedNode: Node, deep: boolean): Node;
- msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
- msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
- /**
- * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
- * @param url Specifies a MIME type for the document.
- * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
- * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
- * @param replace Specifies whether the existing entry for the document is replaced in the history list.
- */
- open(url?: string, name?: string, features?: string, replace?: boolean): Document;
- /**
- * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
- * @param commandId Specifies a command identifier.
- */
- queryCommandEnabled(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandIndeterm(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates the current state of the command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandState(commandId: string): boolean;
- /**
- * Returns a Boolean value that indicates whether the current command is supported on the current range.
- * @param commandId Specifies a command identifier.
- */
- queryCommandSupported(commandId: string): boolean;
- /**
- * Retrieves the string associated with a command.
- * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
- */
- queryCommandText(commandId: string): string;
- /**
- * Returns the current value of the document, range, or current selection for the given command.
- * @param commandId String that specifies a command identifier.
- */
- queryCommandValue(commandId: string): string;
- releaseEvents(): void;
- /**
- * Allows updating the print settings for the page.
- */
- updateSettings(): void;
- webkitCancelFullScreen(): void;
- webkitExitFullscreen(): void;
- /**
- * Writes one or more HTML expressions to a document in the specified window.
- * @param content Specifies the text and HTML tags to write.
- */
- write(...content: string[]): void;
- /**
- * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
- * @param content The text and HTML tags to write.
- */
- writeln(...content: string[]): void;
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Document: {
- prototype: Document;
- new(): Document;
-}
-
-interface DocumentFragment extends Node, NodeSelector, ParentNode {
-}
-
-declare var DocumentFragment: {
- prototype: DocumentFragment;
- new(): DocumentFragment;
-}
-
-interface DocumentType extends Node, ChildNode {
- readonly entities: NamedNodeMap;
- readonly internalSubset: string | null;
- readonly name: string;
- readonly notations: NamedNodeMap;
- readonly publicId: string | null;
- readonly systemId: string | null;
-}
-
-declare var DocumentType: {
- prototype: DocumentType;
- new(): DocumentType;
-}
-
-interface DragEvent extends MouseEvent {
- readonly dataTransfer: DataTransfer;
- initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
- msConvertURL(file: File, targetType: string, targetURL?: string): void;
-}
-
-declare var DragEvent: {
- prototype: DragEvent;
- new(): DragEvent;
-}
-
-interface DynamicsCompressorNode extends AudioNode {
- readonly attack: AudioParam;
- readonly knee: AudioParam;
- readonly ratio: AudioParam;
- readonly reduction: AudioParam;
- readonly release: AudioParam;
- readonly threshold: AudioParam;
-}
-
-declare var DynamicsCompressorNode: {
- prototype: DynamicsCompressorNode;
- new(): DynamicsCompressorNode;
-}
-
-interface EXT_frag_depth {
-}
-
-declare var EXT_frag_depth: {
- prototype: EXT_frag_depth;
- new(): EXT_frag_depth;
-}
-
-interface EXT_texture_filter_anisotropic {
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-declare var EXT_texture_filter_anisotropic: {
- prototype: EXT_texture_filter_anisotropic;
- new(): EXT_texture_filter_anisotropic;
- readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
-}
-
-interface ElementEventMap extends GlobalEventHandlersEventMap {
- "ariarequest": AriaRequestEvent;
- "command": CommandEvent;
- "gotpointercapture": PointerEvent;
- "lostpointercapture": PointerEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSGotPointerCapture": MSPointerEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSLostPointerCapture": MSPointerEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "touchcancel": TouchEvent;
- "touchend": TouchEvent;
- "touchmove": TouchEvent;
- "touchstart": TouchEvent;
- "webkitfullscreenchange": Event;
- "webkitfullscreenerror": Event;
-}
-
-interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
- readonly classList: DOMTokenList;
- className: string;
- readonly clientHeight: number;
- readonly clientLeft: number;
- readonly clientTop: number;
- readonly clientWidth: number;
- id: string;
- msContentZoomFactor: number;
- readonly msRegionOverflow: string;
- onariarequest: (this: Element, ev: AriaRequestEvent) => any;
- oncommand: (this: Element, ev: CommandEvent) => any;
- ongotpointercapture: (this: Element, ev: PointerEvent) => any;
- onlostpointercapture: (this: Element, ev: PointerEvent) => any;
- onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
- onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
- onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
- onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
- onmspointermove: (this: Element, ev: MSPointerEvent) => any;
- onmspointerout: (this: Element, ev: MSPointerEvent) => any;
- onmspointerover: (this: Element, ev: MSPointerEvent) => any;
- onmspointerup: (this: Element, ev: MSPointerEvent) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onwebkitfullscreenchange: (this: Element, ev: Event) => any;
- onwebkitfullscreenerror: (this: Element, ev: Event) => any;
- readonly prefix: string | null;
- readonly scrollHeight: number;
- scrollLeft: number;
- scrollTop: number;
- readonly scrollWidth: number;
- readonly tagName: string;
- innerHTML: string;
- readonly assignedSlot: HTMLSlotElement | null;
- slot: string;
- readonly shadowRoot: ShadowRoot | null;
- getAttribute(name: string): string | null;
- getAttributeNS(namespaceURI: string, localName: string): string;
- getAttributeNode(name: string): Attr;
- getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
- getElementsByTagName(name: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
- hasAttribute(name: string): boolean;
- hasAttributeNS(namespaceURI: string, localName: string): boolean;
- msGetRegionContent(): MSRangeCollection;
- msGetUntransformedBounds(): ClientRect;
- msMatchesSelector(selectors: string): boolean;
- msReleasePointerCapture(pointerId: number): void;
- msSetPointerCapture(pointerId: number): void;
- msZoomTo(args: MsZoomToOptions): void;
- releasePointerCapture(pointerId: number): void;
- removeAttribute(name?: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
- removeAttributeNode(oldAttr: Attr): Attr;
- requestFullscreen(): void;
- requestPointerLock(): void;
- setAttribute(name: string, value: string): void;
- setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
- setAttributeNode(newAttr: Attr): Attr;
- setAttributeNodeNS(newAttr: Attr): Attr;
- setPointerCapture(pointerId: number): void;
- webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
- webkitRequestFullscreen(): void;
- getElementsByClassName(classNames: string): NodeListOf<Element>;
- matches(selector: string): boolean;
- closest(selector: string): Element | null;
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
- scroll(options?: ScrollToOptions): void;
- scroll(x: number, y: number): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollTo(x: number, y: number): void;
- scrollBy(options?: ScrollToOptions): void;
- scrollBy(x: number, y: number): void;
- insertAdjacentElement(position: string, insertedElement: Element): Element | null;
- insertAdjacentHTML(where: string, html: string): void;
- insertAdjacentText(where: string, text: string): void;
- attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
- addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Element: {
- prototype: Element;
- new(): Element;
-}
-
-interface ErrorEvent extends Event {
- readonly colno: number;
- readonly error: any;
- readonly filename: string;
- readonly lineno: number;
- readonly message: string;
- initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
-}
-
-declare var ErrorEvent: {
- prototype: ErrorEvent;
- new(): ErrorEvent;
-}
-
-interface Event {
- readonly bubbles: boolean;
- cancelBubble: boolean;
- readonly cancelable: boolean;
- readonly currentTarget: EventTarget;
- readonly defaultPrevented: boolean;
- readonly eventPhase: number;
- readonly isTrusted: boolean;
- returnValue: boolean;
- readonly srcElement: Element | null;
- readonly target: EventTarget;
- readonly timeStamp: number;
- readonly type: string;
- readonly scoped: boolean;
- initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
- preventDefault(): void;
- stopImmediatePropagation(): void;
- stopPropagation(): void;
- deepPath(): EventTarget[];
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-declare var Event: {
- prototype: Event;
- new(type: string, eventInitDict?: EventInit): Event;
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-interface EventTarget {
- addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- dispatchEvent(evt: Event): boolean;
- removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var EventTarget: {
- prototype: EventTarget;
- new(): EventTarget;
-}
-
-interface External {
-}
-
-declare var External: {
- prototype: External;
- new(): External;
-}
-
-interface File extends Blob {
- readonly lastModifiedDate: any;
- readonly name: string;
- readonly webkitRelativePath: string;
-}
-
-declare var File: {
- prototype: File;
- new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
-
-interface FileList {
- readonly length: number;
- item(index: number): File;
- [index: number]: File;
-}
-
-declare var FileList: {
- prototype: FileList;
- new(): FileList;
-}
-
-interface FileReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(blob: Blob): void;
- readAsBinaryString(blob: Blob): void;
- readAsDataURL(blob: Blob): void;
- readAsText(blob: Blob, encoding?: string): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var FileReader: {
- prototype: FileReader;
- new(): FileReader;
-}
-
-interface FocusEvent extends UIEvent {
- readonly relatedTarget: EventTarget;
- initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
-}
-
-declare var FocusEvent: {
- prototype: FocusEvent;
- new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
-
-interface FormData {
- append(name: any, value: any, blobName?: string): void;
-}
-
-declare var FormData: {
- prototype: FormData;
- new (form?: HTMLFormElement): FormData;
-}
-
-interface GainNode extends AudioNode {
- readonly gain: AudioParam;
-}
-
-declare var GainNode: {
- prototype: GainNode;
- new(): GainNode;
-}
-
-interface Gamepad {
- readonly axes: number[];
- readonly buttons: GamepadButton[];
- readonly connected: boolean;
- readonly id: string;
- readonly index: number;
- readonly mapping: string;
- readonly timestamp: number;
-}
-
-declare var Gamepad: {
- prototype: Gamepad;
- new(): Gamepad;
-}
-
-interface GamepadButton {
- readonly pressed: boolean;
- readonly value: number;
-}
-
-declare var GamepadButton: {
- prototype: GamepadButton;
- new(): GamepadButton;
-}
-
-interface GamepadEvent extends Event {
- readonly gamepad: Gamepad;
-}
-
-declare var GamepadEvent: {
- prototype: GamepadEvent;
- new(): GamepadEvent;
-}
-
-interface Geolocation {
- clearWatch(watchId: number): void;
- getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
- watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
-}
-
-declare var Geolocation: {
- prototype: Geolocation;
- new(): Geolocation;
-}
-
-interface HTMLAllCollection extends HTMLCollection {
- namedItem(name: string): Element;
-}
-
-declare var HTMLAllCollection: {
- prototype: HTMLAllCollection;
- new(): HTMLAllCollection;
-}
-
-interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
- hash: string;
- /**
- * Contains the hostname and port values of the URL.
- */
- host: string;
- /**
- * Contains the hostname of a URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- readonly mimeType: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- readonly nameProp: string;
- /**
- * Contains the pathname of the URL.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Contains the protocol of the URL.
- */
- protocol: string;
- readonly protocolLong: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- type: string;
- urn: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAnchorElement: {
- prototype: HTMLAnchorElement;
- new(): HTMLAnchorElement;
-}
-
-interface HTMLAppletElement extends HTMLElement {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
- */
- declare: boolean;
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Sets or retrieves the shape of the object.
- */
- name: string;
- object: string | null;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- vspace: number;
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAppletElement: {
- prototype: HTMLAppletElement;
- new(): HTMLAppletElement;
-}
-
-interface HTMLAreaElement extends HTMLElement {
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Sets or retrieves the coordinates of the object.
- */
- coords: string;
- download: string;
- /**
- * Sets or retrieves the subsection of the href property that follows the number sign (#).
- */
- hash: string;
- /**
- * Sets or retrieves the hostname and port number of the location or URL.
- */
- host: string;
- /**
- * Sets or retrieves the host name part of the location or URL.
- */
- hostname: string;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or gets whether clicks in this region cause action.
- */
- noHref: boolean;
- /**
- * Sets or retrieves the file name or path specified by the object.
- */
- pathname: string;
- /**
- * Sets or retrieves the port number associated with a URL.
- */
- port: string;
- /**
- * Sets or retrieves the protocol portion of a URL.
- */
- protocol: string;
- rel: string;
- /**
- * Sets or retrieves the substring of the href property that follows the question mark.
- */
- search: string;
- /**
- * Sets or retrieves the shape of the object.
- */
- shape: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns a string representation of an object.
- */
- toString(): string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAreaElement: {
- prototype: HTMLAreaElement;
- new(): HTMLAreaElement;
-}
-
-interface HTMLAreasCollection extends HTMLCollection {
- /**
- * Adds an element to the areas, controlRange, or options collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Removes an element from the collection.
- */
- remove(index?: number): void;
-}
-
-declare var HTMLAreasCollection: {
- prototype: HTMLAreasCollection;
- new(): HTMLAreasCollection;
-}
-
-interface HTMLAudioElement extends HTMLMediaElement {
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLAudioElement: {
- prototype: HTMLAudioElement;
- new(): HTMLAudioElement;
-}
-
-interface HTMLBRElement extends HTMLElement {
- /**
- * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
- */
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBRElement: {
- prototype: HTMLBRElement;
- new(): HTMLBRElement;
-}
-
-interface HTMLBaseElement extends HTMLElement {
- /**
- * Gets or sets the baseline URL on which relative links are based.
- */
- href: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseElement: {
- prototype: HTMLBaseElement;
- new(): HTMLBaseElement;
-}
-
-interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- /**
- * Sets or retrieves the font size of the object.
- */
- size: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBaseFontElement: {
- prototype: HTMLBaseFontElement;
- new(): HTMLBaseFontElement;
-}
-
-interface HTMLBodyElementEventMap extends HTMLElementEventMap {
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "popstate": PopStateEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLBodyElement extends HTMLElement {
- aLink: any;
- background: string;
- bgColor: any;
- bgProperties: string;
- link: any;
- noWrap: boolean;
- onafterprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
- onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
- onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLBodyElement, ev: Event) => any;
- onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLBodyElement, ev: Event) => any;
- ononline: (this: HTMLBodyElement, ev: Event) => any;
- onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
- onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
- onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
- onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
- onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
- onunload: (this: HTMLBodyElement, ev: Event) => any;
- text: any;
- vLink: any;
- addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLBodyElement: {
- prototype: HTMLBodyElement;
- new(): HTMLBodyElement;
-}
-
-interface HTMLButtonElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- status: any;
- /**
- * Gets the classification and default behavior of the button.
- */
- type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the default or selected value of the control.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLButtonElement: {
- prototype: HTMLButtonElement;
- new(): HTMLButtonElement;
-}
-
-interface HTMLCanvasElement extends HTMLElement {
- /**
- * Gets or sets the height of a canvas element on a document.
- */
- height: number;
- /**
- * Gets or sets the width of a canvas element on a document.
- */
- width: number;
- /**
- * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
- * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
- */
- getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
- getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
- getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
- /**
- * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
- */
- msToBlob(): Blob;
- /**
- * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
- * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
- */
- toDataURL(type?: string, ...args: any[]): string;
- toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLCanvasElement: {
- prototype: HTMLCanvasElement;
- new(): HTMLCanvasElement;
-}
-
-interface HTMLCollection {
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Retrieves an object from various collections.
- */
- item(index: number): Element;
- /**
- * Retrieves a select object or an object from an options collection.
- */
- namedItem(name: string): Element;
- [index: number]: Element;
-}
-
-declare var HTMLCollection: {
- prototype: HTMLCollection;
- new(): HTMLCollection;
-}
-
-interface HTMLDListElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDListElement: {
- prototype: HTMLDListElement;
- new(): HTMLDListElement;
-}
-
-interface HTMLDataListElement extends HTMLElement {
- options: HTMLCollectionOf<HTMLOptionElement>;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDataListElement: {
- prototype: HTMLDataListElement;
- new(): HTMLDataListElement;
-}
-
-interface HTMLDirectoryElement extends HTMLElement {
- compact: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDirectoryElement: {
- prototype: HTMLDirectoryElement;
- new(): HTMLDirectoryElement;
-}
-
-interface HTMLDivElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDivElement: {
- prototype: HTMLDivElement;
- new(): HTMLDivElement;
-}
-
-interface HTMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLDocument: {
- prototype: HTMLDocument;
- new(): HTMLDocument;
-}
-
-interface HTMLElementEventMap extends ElementEventMap {
- "abort": UIEvent;
- "activate": UIEvent;
- "beforeactivate": UIEvent;
- "beforecopy": ClipboardEvent;
- "beforecut": ClipboardEvent;
- "beforedeactivate": UIEvent;
- "beforepaste": ClipboardEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "contextmenu": PointerEvent;
- "copy": ClipboardEvent;
- "cuechange": Event;
- "cut": ClipboardEvent;
- "dblclick": MouseEvent;
- "deactivate": UIEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSContentZoom": UIEvent;
- "MSManipulationStateChanged": MSManipulationEvent;
- "paste": ClipboardEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "progress": ProgressEvent;
- "ratechange": Event;
- "reset": Event;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "selectstart": Event;
- "stalled": Event;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface HTMLElement extends Element {
- accessKey: string;
- readonly children: HTMLCollection;
- contentEditable: string;
- readonly dataset: DOMStringMap;
- dir: string;
- draggable: boolean;
- hidden: boolean;
- hideFocus: boolean;
- innerHTML: string;
- innerText: string;
- readonly isContentEditable: boolean;
- lang: string;
- readonly offsetHeight: number;
- readonly offsetLeft: number;
- readonly offsetParent: Element;
- readonly offsetTop: number;
- readonly offsetWidth: number;
- onabort: (this: HTMLElement, ev: UIEvent) => any;
- onactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
- onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
- onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onblur: (this: HTMLElement, ev: FocusEvent) => any;
- oncanplay: (this: HTMLElement, ev: Event) => any;
- oncanplaythrough: (this: HTMLElement, ev: Event) => any;
- onchange: (this: HTMLElement, ev: Event) => any;
- onclick: (this: HTMLElement, ev: MouseEvent) => any;
- oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
- oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
- oncuechange: (this: HTMLElement, ev: Event) => any;
- oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
- ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
- ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
- ondrag: (this: HTMLElement, ev: DragEvent) => any;
- ondragend: (this: HTMLElement, ev: DragEvent) => any;
- ondragenter: (this: HTMLElement, ev: DragEvent) => any;
- ondragleave: (this: HTMLElement, ev: DragEvent) => any;
- ondragover: (this: HTMLElement, ev: DragEvent) => any;
- ondragstart: (this: HTMLElement, ev: DragEvent) => any;
- ondrop: (this: HTMLElement, ev: DragEvent) => any;
- ondurationchange: (this: HTMLElement, ev: Event) => any;
- onemptied: (this: HTMLElement, ev: Event) => any;
- onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
- onerror: (this: HTMLElement, ev: ErrorEvent) => any;
- onfocus: (this: HTMLElement, ev: FocusEvent) => any;
- oninput: (this: HTMLElement, ev: Event) => any;
- oninvalid: (this: HTMLElement, ev: Event) => any;
- onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
- onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
- onload: (this: HTMLElement, ev: Event) => any;
- onloadeddata: (this: HTMLElement, ev: Event) => any;
- onloadedmetadata: (this: HTMLElement, ev: Event) => any;
- onloadstart: (this: HTMLElement, ev: Event) => any;
- onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
- onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
- onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
- onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
- onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
- onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
- onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
- onpause: (this: HTMLElement, ev: Event) => any;
- onplay: (this: HTMLElement, ev: Event) => any;
- onplaying: (this: HTMLElement, ev: Event) => any;
- onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
- onratechange: (this: HTMLElement, ev: Event) => any;
- onreset: (this: HTMLElement, ev: Event) => any;
- onscroll: (this: HTMLElement, ev: UIEvent) => any;
- onseeked: (this: HTMLElement, ev: Event) => any;
- onseeking: (this: HTMLElement, ev: Event) => any;
- onselect: (this: HTMLElement, ev: UIEvent) => any;
- onselectstart: (this: HTMLElement, ev: Event) => any;
- onstalled: (this: HTMLElement, ev: Event) => any;
- onsubmit: (this: HTMLElement, ev: Event) => any;
- onsuspend: (this: HTMLElement, ev: Event) => any;
- ontimeupdate: (this: HTMLElement, ev: Event) => any;
- onvolumechange: (this: HTMLElement, ev: Event) => any;
- onwaiting: (this: HTMLElement, ev: Event) => any;
- outerHTML: string;
- outerText: string;
- spellcheck: boolean;
- readonly style: CSSStyleDeclaration;
- tabIndex: number;
- title: string;
- blur(): void;
- click(): void;
- dragDrop(): boolean;
- focus(): void;
- msGetInputContext(): MSInputMethodContext;
- setActive(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLElement: {
- prototype: HTMLElement;
- new(): HTMLElement;
-}
-
-interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hidden: any;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the palette used for the embedded document.
- */
- readonly palette: string;
- /**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
- readonly pluginspage: string;
- readonly readyState: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the height and width units of the embed object.
- */
- units: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLEmbedElement: {
- prototype: HTMLEmbedElement;
- new(): HTMLEmbedElement;
-}
-
-interface HTMLFieldSetElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFieldSetElement: {
- prototype: HTMLFieldSetElement;
- new(): HTMLFieldSetElement;
-}
-
-interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves the current typeface family.
- */
- face: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFontElement: {
- prototype: HTMLFontElement;
- new(): HTMLFontElement;
-}
-
-interface HTMLFormElement extends HTMLElement {
- /**
- * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
- */
- acceptCharset: string;
- /**
- * Sets or retrieves the URL to which the form content is sent for processing.
- */
- action: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Retrieves a collection, in source order, of all controls in a given form.
- */
- readonly elements: HTMLCollection;
- /**
- * Sets or retrieves the MIME encoding for the form.
- */
- encoding: string;
- /**
- * Sets or retrieves the encoding type for the form.
- */
- enctype: string;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- readonly length: number;
- /**
- * Sets or retrieves how to send the form data to the server.
- */
- method: string;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Designates a form that is not validated when submitted.
- */
- noValidate: boolean;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a form object or an object from an elements collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a form object or an object from an elements collection.
- */
- namedItem(name: string): any;
- /**
- * Fires when the user resets a form.
- */
- reset(): void;
- /**
- * Fires when a FORM is about to be submitted.
- */
- submit(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLFormElement: {
- prototype: HTMLFormElement;
- new(): HTMLFormElement;
-}
-
-interface HTMLFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string | number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLFrameElement, ev: Event) => any;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string | number;
- addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameElement: {
- prototype: HTMLFrameElement;
- new(): HTMLFrameElement;
-}
-
-interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "error": ErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "load": Event;
- "message": MessageEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "resize": UIEvent;
- "storage": StorageEvent;
- "unload": Event;
-}
-
-interface HTMLFrameSetElement extends HTMLElement {
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Sets or retrieves the frame widths of the object.
- */
- cols: string;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- name: string;
- onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
- onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
- /**
- * Fires when the object loses the input focus.
- */
- onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
- /**
- * Fires when the object receives focus.
- */
- onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
- onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
- onload: (this: HTMLFrameSetElement, ev: Event) => any;
- onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
- onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
- ononline: (this: HTMLFrameSetElement, ev: Event) => any;
- onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
- onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
- onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
- onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
- onunload: (this: HTMLFrameSetElement, ev: Event) => any;
- /**
- * Sets or retrieves the frame heights of the object.
- */
- rows: string;
- addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLFrameSetElement: {
- prototype: HTMLFrameSetElement;
- new(): HTMLFrameSetElement;
-}
-
-interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
- */
- noShade: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHRElement: {
- prototype: HTMLHRElement;
- new(): HTMLHRElement;
-}
-
-interface HTMLHeadElement extends HTMLElement {
- profile: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadElement: {
- prototype: HTMLHeadElement;
- new(): HTMLHeadElement;
-}
-
-interface HTMLHeadingElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHeadingElement: {
- prototype: HTMLHeadingElement;
- new(): HTMLHeadingElement;
-}
-
-interface HTMLHtmlElement extends HTMLElement {
- /**
- * Sets or retrieves the DTD version that governs the current document.
- */
- version: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLHtmlElement: {
- prototype: HTMLHtmlElement;
- new(): HTMLHtmlElement;
-}
-
-interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
- "load": Event;
-}
-
-interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- allowFullscreen: boolean;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Retrieves the object of the specified.
- */
- readonly contentWindow: Window;
- /**
- * Sets or retrieves whether to display a border for the frame.
- */
- frameBorder: string;
- /**
- * Sets or retrieves the amount of additional space between the frames.
- */
- frameSpacing: any;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the horizontal margin for the object.
- */
- hspace: number;
- /**
- * Sets or retrieves a URI to a long description of the object.
- */
- longDesc: string;
- /**
- * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
- */
- marginHeight: string;
- /**
- * Sets or retrieves the left and right margin widths before displaying the text in a frame.
- */
- marginWidth: string;
- /**
- * Sets or retrieves the frame name.
- */
- name: string;
- /**
- * Sets or retrieves whether the user can resize the frame.
- */
- noResize: boolean;
- /**
- * Raised when the object has been completely received from the server.
- */
- onload: (this: HTMLIFrameElement, ev: Event) => any;
- readonly sandbox: DOMSettableTokenList;
- /**
- * Sets or retrieves whether the frame can be scrolled.
- */
- scrolling: string;
- /**
- * Sets or retrieves a URL to be loaded by the object.
- */
- src: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLIFrameElement: {
- prototype: HTMLIFrameElement;
- new(): HTMLIFrameElement;
-}
-
-interface HTMLImageElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies the properties of a border drawn around an object.
- */
- border: string;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- crossOrigin: string;
- readonly currentSrc: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: number;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- /**
- * Sets or retrieves whether the image is a server-side image map.
- */
- isMap: boolean;
- /**
- * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
- */
- longDesc: string;
- lowsrc: string;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * The original height of the image resource before sizing.
- */
- readonly naturalHeight: number;
- /**
- * The original width of the image resource before sizing.
- */
- readonly naturalWidth: number;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
- readonly x: number;
- readonly y: number;
- msGetAsCastingSource(): any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLImageElement: {
- prototype: HTMLImageElement;
- new(): HTMLImageElement;
- create(): HTMLImageElement;
-}
-
-interface HTMLInputElement extends HTMLElement {
- /**
- * Sets or retrieves a comma-separated list of content types.
- */
- accept: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Specifies whether autocomplete is applied to an editable text field.
- */
- autocomplete: string;
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- checked: boolean;
- /**
- * Retrieves whether the object is fully loaded.
- */
- readonly complete: boolean;
- /**
- * Sets or retrieves the state of the check box or radio button.
- */
- defaultChecked: boolean;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Returns a FileList object on a file type input object.
- */
- readonly files: FileList | null;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Overrides the action attribute (where the data on a form is sent) on the parent form element.
- */
- formAction: string;
- /**
- * Used to override the encoding (formEnctype attribute) specified on the form element.
- */
- formEnctype: string;
- /**
- * Overrides the submit method attribute previously specified on a form element.
- */
- formMethod: string;
- /**
- * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
- */
- formNoValidate: string;
- /**
- * Overrides the target attribute on a form element.
- */
- formTarget: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- hspace: number;
- indeterminate: boolean;
- /**
- * Specifies the ID of a pre-defined datalist of options for an input element.
- */
- readonly list: HTMLElement;
- /**
- * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
- */
- max: string;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
- */
- min: string;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a string containing a regular expression that the user's input must match.
- */
- pattern: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- selectionDirection: string;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- size: number;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- status: boolean;
- /**
- * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
- */
- step: string;
- /**
- * Returns the content type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Returns the value of the data at the cursor's current position.
- */
- value: string;
- valueAsDate: Date;
- /**
- * Returns the input field value as a number.
- */
- valueAsNumber: number;
- /**
- * Sets or retrieves the vertical margin for the object.
- */
- vspace: number;
- webkitdirectory: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Makes the selection equal to the current object.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start?: number, end?: number, direction?: string): void;
- /**
- * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
- * @param n Value to decrement the value by.
- */
- stepDown(n?: number): void;
- /**
- * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
- * @param n Value to increment the value by.
- */
- stepUp(n?: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLInputElement: {
- prototype: HTMLInputElement;
- new(): HTMLInputElement;
-}
-
-interface HTMLLIElement extends HTMLElement {
- type: string;
- /**
- * Sets or retrieves the value of a list item.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLIElement: {
- prototype: HTMLLIElement;
- new(): HTMLLIElement;
-}
-
-interface HTMLLabelElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the object to which the given label object is assigned.
- */
- htmlFor: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLabelElement: {
- prototype: HTMLLabelElement;
- new(): HTMLLabelElement;
-}
-
-interface HTMLLegendElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- align: string;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLegendElement: {
- prototype: HTMLLegendElement;
- new(): HTMLLegendElement;
-}
-
-interface HTMLLinkElement extends HTMLElement, LinkStyle {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- disabled: boolean;
- /**
- * Sets or retrieves a destination URL or an anchor point.
- */
- href: string;
- /**
- * Sets or retrieves the language code of the object.
- */
- hreflang: string;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rel: string;
- /**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
- rev: string;
- /**
- * Sets or retrieves the window or frame at which to target content.
- */
- target: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- import?: Document;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLLinkElement: {
- prototype: HTMLLinkElement;
- new(): HTMLLinkElement;
-}
-
-interface HTMLMapElement extends HTMLElement {
- /**
- * Retrieves a collection of the area objects defined for the given map object.
- */
- readonly areas: HTMLAreasCollection;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMapElement: {
- prototype: HTMLMapElement;
- new(): HTMLMapElement;
-}
-
-interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
- "bounce": Event;
- "finish": Event;
- "start": Event;
-}
-
-interface HTMLMarqueeElement extends HTMLElement {
- behavior: string;
- bgColor: any;
- direction: string;
- height: string;
- hspace: number;
- loop: number;
- onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
- onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
- onstart: (this: HTMLMarqueeElement, ev: Event) => any;
- scrollAmount: number;
- scrollDelay: number;
- trueSpeed: boolean;
- vspace: number;
- width: string;
- start(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMarqueeElement: {
- prototype: HTMLMarqueeElement;
- new(): HTMLMarqueeElement;
-}
-
-interface HTMLMediaElementEventMap extends HTMLElementEventMap {
- "encrypted": MediaEncryptedEvent;
- "msneedkey": MSMediaKeyNeededEvent;
-}
-
-interface HTMLMediaElement extends HTMLElement {
- /**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
- readonly audioTracks: AudioTrackList;
- /**
- * Gets or sets a value that indicates whether to start playing the media automatically.
- */
- autoplay: boolean;
- /**
- * Gets a collection of buffered time ranges.
- */
- readonly buffered: TimeRanges;
- /**
- * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
- */
- controls: boolean;
- crossOrigin: string;
- /**
- * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
- */
- readonly currentSrc: string;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- currentTime: number;
- defaultMuted: boolean;
- /**
- * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
- */
- defaultPlaybackRate: number;
- /**
- * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
- */
- readonly duration: number;
- /**
- * Gets information about whether the playback has ended or not.
- */
- readonly ended: boolean;
- /**
- * Returns an object representing the current error state of the audio or video element.
- */
- readonly error: MediaError;
- /**
- * Gets or sets a flag to specify whether playback should restart after it completes.
- */
- loop: boolean;
- readonly mediaKeys: MediaKeys | null;
- /**
- * Specifies the purpose of the audio or video media, such as background audio or alerts.
- */
- msAudioCategory: string;
- /**
- * Specifies the output device id that the audio will be sent to.
- */
- msAudioDeviceType: string;
- readonly msGraphicsTrustStatus: MSGraphicsTrust;
- /**
- * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
- */
- readonly msKeys: MSMediaKeys;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Specifies whether or not to enable low-latency playback on the media element.
- */
- msRealTime: boolean;
- /**
- * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
- */
- muted: boolean;
- /**
- * Gets the current network activity for the element.
- */
- readonly networkState: number;
- onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
- onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
- /**
- * Gets a flag that specifies whether playback is paused.
- */
- readonly paused: boolean;
- /**
- * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
- */
- playbackRate: number;
- /**
- * Gets TimeRanges for the current media resource that has been played.
- */
- readonly played: TimeRanges;
- /**
- * Gets or sets the current playback position, in seconds.
- */
- preload: string;
- readyState: number;
- /**
- * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
- */
- readonly seekable: TimeRanges;
- /**
- * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
- */
- readonly seeking: boolean;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcObject: MediaStream | null;
- readonly textTracks: TextTrackList;
- readonly videoTracks: VideoTrackList;
- /**
- * Gets or sets the volume level for audio portions of the media element.
- */
- volume: number;
- addTextTrack(kind: string, label?: string, language?: string): TextTrack;
- /**
- * Returns a string that specifies whether the client can play a given media resource type.
- */
- canPlayType(type: string): string;
- /**
- * Resets the audio or video object and loads a new media resource.
- */
- load(): void;
- /**
- * Clears all effects from the media pipeline.
- */
- msClearEffects(): void;
- msGetAsCastingSource(): any;
- /**
- * Inserts the specified audio effect into media pipeline.
- */
- msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetMediaKeys(mediaKeys: MSMediaKeys): void;
- /**
- * Specifies the media protection manager for a given media pipeline.
- */
- msSetMediaProtectionManager(mediaProtectionManager?: any): void;
- /**
- * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
- */
- pause(): void;
- /**
- * Loads and starts playback of a media resource.
- */
- play(): void;
- setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
- addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMediaElement: {
- prototype: HTMLMediaElement;
- new(): HTMLMediaElement;
- readonly HAVE_CURRENT_DATA: number;
- readonly HAVE_ENOUGH_DATA: number;
- readonly HAVE_FUTURE_DATA: number;
- readonly HAVE_METADATA: number;
- readonly HAVE_NOTHING: number;
- readonly NETWORK_EMPTY: number;
- readonly NETWORK_IDLE: number;
- readonly NETWORK_LOADING: number;
- readonly NETWORK_NO_SOURCE: number;
-}
-
-interface HTMLMenuElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMenuElement: {
- prototype: HTMLMenuElement;
- new(): HTMLMenuElement;
-}
-
-interface HTMLMetaElement extends HTMLElement {
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
- content: string;
- /**
- * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
- */
- httpEquiv: string;
- /**
- * Sets or retrieves the value specified in the content attribute of the meta object.
- */
- name: string;
- /**
- * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
- */
- scheme: string;
- /**
- * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
- */
- url: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMetaElement: {
- prototype: HTMLMetaElement;
- new(): HTMLMetaElement;
-}
-
-interface HTMLMeterElement extends HTMLElement {
- high: number;
- low: number;
- max: number;
- min: number;
- optimum: number;
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLMeterElement: {
- prototype: HTMLMeterElement;
- new(): HTMLMeterElement;
-}
-
-interface HTMLModElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- /**
- * Sets or retrieves the date and time of a modification to the object.
- */
- dateTime: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLModElement: {
- prototype: HTMLModElement;
- new(): HTMLModElement;
-}
-
-interface HTMLOListElement extends HTMLElement {
- compact: boolean;
- /**
- * The starting number.
- */
- start: number;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOListElement: {
- prototype: HTMLOListElement;
- new(): HTMLOListElement;
-}
-
-interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
- /**
- * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
- */
- readonly BaseHref: string;
- align: string;
- /**
- * Sets or retrieves a text alternative to the graphic.
- */
- alt: string;
- /**
- * Gets or sets the optional alternative HTML script to execute if the object fails to load.
- */
- altHtml: string;
- /**
- * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
- */
- archive: string;
- border: string;
- /**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
- code: string;
- /**
- * Sets or retrieves the URL of the component.
- */
- codeBase: string;
- /**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
- codeType: string;
- /**
- * Retrieves the document object of the page or frame.
- */
- readonly contentDocument: Document;
- /**
- * Sets or retrieves the URL that references the data of the object.
- */
- data: string;
- declare: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the height of the object.
- */
- height: string;
- hspace: number;
- /**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
- msPlayToDisabled: boolean;
- /**
- * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
- */
- msPlayToPreferredSourceUri: string;
- /**
- * Gets or sets the primary DLNA PlayTo device.
- */
- msPlayToPrimary: boolean;
- /**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
- readonly msPlayToSource: any;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Retrieves the contained object.
- */
- readonly object: any;
- readonly readyState: number;
- /**
- * Sets or retrieves a message to be displayed while an object is loading.
- */
- standby: string;
- /**
- * Sets or retrieves the MIME type of the object.
- */
- type: string;
- /**
- * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
- */
- useMap: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- vspace: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLObjectElement: {
- prototype: HTMLObjectElement;
- new(): HTMLObjectElement;
-}
-
-interface HTMLOptGroupElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- readonly text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptGroupElement: {
- prototype: HTMLOptGroupElement;
- new(): HTMLOptGroupElement;
-}
-
-interface HTMLOptionElement extends HTMLElement {
- /**
- * Sets or retrieves the status of an option.
- */
- defaultSelected: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the ordinal position of an option in a list box.
- */
- readonly index: number;
- /**
- * Sets or retrieves a value that you can use to implement your own label functionality for the object.
- */
- label: string;
- /**
- * Sets or retrieves whether the option in the list box is the default item.
- */
- selected: boolean;
- /**
- * Sets or retrieves the text string specified by the option tag.
- */
- text: string;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLOptionElement: {
- prototype: HTMLOptionElement;
- new(): HTMLOptionElement;
- create(): HTMLOptionElement;
-}
-
-interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
- length: number;
- selectedIndex: number;
- add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
- remove(index: number): void;
-}
-
-declare var HTMLOptionsCollection: {
- prototype: HTMLOptionsCollection;
- new(): HTMLOptionsCollection;
-}
-
-interface HTMLParagraphElement extends HTMLElement {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- clear: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParagraphElement: {
- prototype: HTMLParagraphElement;
- new(): HTMLParagraphElement;
-}
-
-interface HTMLParamElement extends HTMLElement {
- /**
- * Sets or retrieves the name of an input parameter for an element.
- */
- name: string;
- /**
- * Sets or retrieves the content type of the resource designated by the value attribute.
- */
- type: string;
- /**
- * Sets or retrieves the value of an input parameter for an element.
- */
- value: string;
- /**
- * Sets or retrieves the data type of the value attribute.
- */
- valueType: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLParamElement: {
- prototype: HTMLParamElement;
- new(): HTMLParamElement;
-}
-
-interface HTMLPictureElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPictureElement: {
- prototype: HTMLPictureElement;
- new(): HTMLPictureElement;
-}
-
-interface HTMLPreElement extends HTMLElement {
- /**
- * Sets or gets a value that you can use to implement your own width functionality for the object.
- */
- width: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLPreElement: {
- prototype: HTMLPreElement;
- new(): HTMLPreElement;
-}
-
-interface HTMLProgressElement extends HTMLElement {
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Defines the maximum, or "done" value for a progress element.
- */
- max: number;
- /**
- * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
- */
- readonly position: number;
- /**
- * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
- */
- value: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLProgressElement: {
- prototype: HTMLProgressElement;
- new(): HTMLProgressElement;
-}
-
-interface HTMLQuoteElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLQuoteElement: {
- prototype: HTMLQuoteElement;
- new(): HTMLQuoteElement;
-}
-
-interface HTMLScriptElement extends HTMLElement {
- async: boolean;
- /**
- * Sets or retrieves the character set used to encode the object.
- */
- charset: string;
- /**
- * Sets or retrieves the status of the script.
- */
- defer: boolean;
- /**
- * Sets or retrieves the event for which the script is written.
- */
- event: string;
- /**
- * Sets or retrieves the object that is bound to the event script.
- */
- htmlFor: string;
- /**
- * Retrieves the URL to an external file that contains the source code or data.
- */
- src: string;
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- /**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
- type: string;
- integrity: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLScriptElement: {
- prototype: HTMLScriptElement;
- new(): HTMLScriptElement;
-}
-
-interface HTMLSelectElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the number of objects in a collection.
- */
- length: number;
- /**
- * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
- */
- multiple: boolean;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- readonly options: HTMLOptionsCollection;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the index of the selected option in a select object.
- */
- selectedIndex: number;
- selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
- /**
- * Sets or retrieves the number of rows in the list box.
- */
- size: number;
- /**
- * Retrieves the type of select control based on the value of the MULTIPLE attribute.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Sets or retrieves the value which is returned to the server when the form control is submitted.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Adds an element to the areas, controlRange, or options collection.
- * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
- * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
- */
- add(element: HTMLElement, before?: HTMLElement | number): void;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
- * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
- */
- item(name?: any, index?: any): any;
- /**
- * Retrieves a select object or an object from an options collection.
- * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
- */
- namedItem(name: string): any;
- /**
- * Removes an element from the collection.
- * @param index Number that specifies the zero-based index of the element to remove from the collection.
- */
- remove(index?: number): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [name: string]: any;
-}
-
-declare var HTMLSelectElement: {
- prototype: HTMLSelectElement;
- new(): HTMLSelectElement;
-}
-
-interface HTMLSourceElement extends HTMLElement {
- /**
- * Gets or sets the intended media type of the media source.
- */
- media: string;
- msKeySystem: string;
- sizes: string;
- /**
- * The address or URL of the a media resource that is to be considered.
- */
- src: string;
- srcset: string;
- /**
- * Gets or sets the MIME type of a media resource.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSourceElement: {
- prototype: HTMLSourceElement;
- new(): HTMLSourceElement;
-}
-
-interface HTMLSpanElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLSpanElement: {
- prototype: HTMLSpanElement;
- new(): HTMLSpanElement;
-}
-
-interface HTMLStyleElement extends HTMLElement, LinkStyle {
- disabled: boolean;
- /**
- * Sets or retrieves the media type.
- */
- media: string;
- /**
- * Retrieves the CSS language in which the style sheet is written.
- */
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLStyleElement: {
- prototype: HTMLStyleElement;
- new(): HTMLStyleElement;
-}
-
-interface HTMLTableCaptionElement extends HTMLElement {
- /**
- * Sets or retrieves the alignment of the caption or legend.
- */
- align: string;
- /**
- * Sets or retrieves whether the caption appears at the top or bottom of the table.
- */
- vAlign: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCaptionElement: {
- prototype: HTMLTableCaptionElement;
- new(): HTMLTableCaptionElement;
-}
-
-interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves abbreviated text for the object.
- */
- abbr: string;
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- /**
- * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
- */
- axis: string;
- bgColor: any;
- /**
- * Retrieves the position of the object in the cells collection of a row.
- */
- readonly cellIndex: number;
- /**
- * Sets or retrieves the number columns in the table that the object should span.
- */
- colSpan: number;
- /**
- * Sets or retrieves a list of header cells that provide information for the object.
- */
- headers: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
- /**
- * Sets or retrieves how many rows in a table the cell should span.
- */
- rowSpan: number;
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableCellElement: {
- prototype: HTMLTableCellElement;
- new(): HTMLTableCellElement;
-}
-
-interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves the alignment of the object relative to the display or table.
- */
- align: string;
- /**
- * Sets or retrieves the number of columns in the group.
- */
- span: number;
- /**
- * Sets or retrieves the width of the object.
- */
- width: any;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableColElement: {
- prototype: HTMLTableColElement;
- new(): HTMLTableColElement;
-}
-
-interface HTMLTableDataCellElement extends HTMLTableCellElement {
-}
-
-declare var HTMLTableDataCellElement: {
- prototype: HTMLTableDataCellElement;
- new(): HTMLTableDataCellElement;
-}
-
-interface HTMLTableElement extends HTMLElement {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- bgColor: any;
- /**
- * Sets or retrieves the width of the border to draw around the object.
- */
- border: string;
- /**
- * Sets or retrieves the border color of the object.
- */
- borderColor: any;
- /**
- * Retrieves the caption object of a table.
- */
- caption: HTMLTableCaptionElement;
- /**
- * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
- */
- cellPadding: string;
- /**
- * Sets or retrieves the amount of space between cells in a table.
- */
- cellSpacing: string;
- /**
- * Sets or retrieves the number of columns in the table.
- */
- cols: number;
- /**
- * Sets or retrieves the way the border frame around the table is displayed.
- */
- frame: string;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Sets or retrieves which dividing lines (inner borders) are displayed.
- */
- rules: string;
- /**
- * Sets or retrieves a description and/or structure of the object.
- */
- summary: string;
- /**
- * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
- */
- tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
- /**
- * Retrieves the tFoot object of the table.
- */
- tFoot: HTMLTableSectionElement;
- /**
- * Retrieves the tHead object of the table.
- */
- tHead: HTMLTableSectionElement;
- /**
- * Sets or retrieves the width of the object.
- */
- width: string;
- /**
- * Creates an empty caption element in the table.
- */
- createCaption(): HTMLTableCaptionElement;
- /**
- * Creates an empty tBody element in the table.
- */
- createTBody(): HTMLTableSectionElement;
- /**
- * Creates an empty tFoot element in the table.
- */
- createTFoot(): HTMLTableSectionElement;
- /**
- * Returns the tHead element object if successful, or null otherwise.
- */
- createTHead(): HTMLTableSectionElement;
- /**
- * Deletes the caption element and its contents from the table.
- */
- deleteCaption(): void;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Deletes the tFoot element and its contents from the table.
- */
- deleteTFoot(): void;
- /**
- * Deletes the tHead element and its contents from the table.
- */
- deleteTHead(): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableElement: {
- prototype: HTMLTableElement;
- new(): HTMLTableElement;
-}
-
-interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
- /**
- * Sets or retrieves the group of cells in a table to which the object's information applies.
- */
- scope: string;
-}
-
-declare var HTMLTableHeaderCellElement: {
- prototype: HTMLTableHeaderCellElement;
- new(): HTMLTableHeaderCellElement;
-}
-
-interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
- align: string;
- bgColor: any;
- /**
- * Retrieves a collection of all cells in the table row.
- */
- cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
- /**
- * Sets or retrieves the height of the object.
- */
- height: any;
- /**
- * Retrieves the position of the object in the rows collection for the table.
- */
- readonly rowIndex: number;
- /**
- * Retrieves the position of the object in the collection.
- */
- readonly sectionRowIndex: number;
- /**
- * Removes the specified cell from the table row, as well as from the cells collection.
- * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
- */
- deleteCell(index?: number): void;
- /**
- * Creates a new cell in the table row, and adds the cell to the cells collection.
- * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
- */
- insertCell(index?: number): HTMLTableDataCellElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableRowElement: {
- prototype: HTMLTableRowElement;
- new(): HTMLTableRowElement;
-}
-
-interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
- /**
- * Sets or retrieves a value that indicates the table alignment.
- */
- align: string;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: HTMLCollectionOf<HTMLTableRowElement>;
- /**
- * Removes the specified row (tr) from the element and from the rows collection.
- * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
- */
- deleteRow(index?: number): void;
- /**
- * Creates a new row (tr) in the table, and adds the row to the rows collection.
- * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
- */
- insertRow(index?: number): HTMLTableRowElement;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTableSectionElement: {
- prototype: HTMLTableSectionElement;
- new(): HTMLTableSectionElement;
-}
-
-interface HTMLTemplateElement extends HTMLElement {
- readonly content: DocumentFragment;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTemplateElement: {
- prototype: HTMLTemplateElement;
- new(): HTMLTemplateElement;
-}
-
-interface HTMLTextAreaElement extends HTMLElement {
- /**
- * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
- */
- autofocus: boolean;
- /**
- * Sets or retrieves the width of the object.
- */
- cols: number;
- /**
- * Sets or retrieves the initial contents of the object.
- */
- defaultValue: string;
- disabled: boolean;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- readonly form: HTMLFormElement;
- /**
- * Sets or retrieves the maximum number of characters that the user can enter in a text control.
- */
- maxLength: number;
- /**
- * Sets or retrieves the name of the object.
- */
- name: string;
- /**
- * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
- */
- placeholder: string;
- /**
- * Sets or retrieves the value indicated whether the content of the object is read-only.
- */
- readOnly: boolean;
- /**
- * When present, marks an element that can't be submitted without a value.
- */
- required: boolean;
- /**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
- rows: number;
- /**
- * Gets or sets the end position or offset of a text selection.
- */
- selectionEnd: number;
- /**
- * Gets or sets the starting position or offset of a text selection.
- */
- selectionStart: number;
- /**
- * Sets or retrieves the value indicating whether the control is selected.
- */
- status: any;
- /**
- * Retrieves the type of control.
- */
- readonly type: string;
- /**
- * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
- */
- readonly validationMessage: string;
- /**
- * Returns a ValidityState object that represents the validity states of an element.
- */
- readonly validity: ValidityState;
- /**
- * Retrieves or sets the text in the entry field of the textArea element.
- */
- value: string;
- /**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
- readonly willValidate: boolean;
- /**
- * Sets or retrieves how to handle wordwrapping in the object.
- */
- wrap: string;
- minLength: number;
- /**
- * Returns whether a form will validate when it is submitted, without having to submit it.
- */
- checkValidity(): boolean;
- /**
- * Highlights the input area of a form element.
- */
- select(): void;
- /**
- * Sets a custom error message that is displayed when a form is submitted.
- * @param error Sets a custom error message that is displayed when a form is submitted.
- */
- setCustomValidity(error: string): void;
- /**
- * Sets the start and end positions of a selection in a text field.
- * @param start The offset into the text field for the start of the selection.
- * @param end The offset into the text field for the end of the selection.
- */
- setSelectionRange(start: number, end: number): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTextAreaElement: {
- prototype: HTMLTextAreaElement;
- new(): HTMLTextAreaElement;
-}
-
-interface HTMLTitleElement extends HTMLElement {
- /**
- * Retrieves or sets the text of the object as a string.
- */
- text: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTitleElement: {
- prototype: HTMLTitleElement;
- new(): HTMLTitleElement;
-}
-
-interface HTMLTrackElement extends HTMLElement {
- default: boolean;
- kind: string;
- label: string;
- readonly readyState: number;
- src: string;
- srclang: string;
- readonly track: TextTrack;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLTrackElement: {
- prototype: HTMLTrackElement;
- new(): HTMLTrackElement;
- readonly ERROR: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
-}
-
-interface HTMLUListElement extends HTMLElement {
- compact: boolean;
- type: string;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUListElement: {
- prototype: HTMLUListElement;
- new(): HTMLUListElement;
-}
-
-interface HTMLUnknownElement extends HTMLElement {
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLUnknownElement: {
- prototype: HTMLUnknownElement;
- new(): HTMLUnknownElement;
-}
-
-interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
- "MSVideoFormatChanged": Event;
- "MSVideoFrameStepCompleted": Event;
- "MSVideoOptimalLayoutChanged": Event;
-}
-
-interface HTMLVideoElement extends HTMLMediaElement {
- /**
- * Gets or sets the height of the video element.
- */
- height: number;
- msHorizontalMirror: boolean;
- readonly msIsLayoutOptimalForPlayback: boolean;
- readonly msIsStereo3D: boolean;
- msStereo3DPackingMode: string;
- msStereo3DRenderMode: string;
- msZoom: boolean;
- onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
- onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
- /**
- * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
- */
- poster: string;
- /**
- * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoHeight: number;
- /**
- * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
- */
- readonly videoWidth: number;
- readonly webkitDisplayingFullscreen: boolean;
- readonly webkitSupportsFullscreen: boolean;
- /**
- * Gets or sets the width of the video element.
- */
- width: number;
- getVideoPlaybackQuality(): VideoPlaybackQuality;
- msFrameStep(forward: boolean): void;
- msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
- msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
- webkitEnterFullScreen(): void;
- webkitEnterFullscreen(): void;
- webkitExitFullScreen(): void;
- webkitExitFullscreen(): void;
- addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var HTMLVideoElement: {
- prototype: HTMLVideoElement;
- new(): HTMLVideoElement;
-}
-
-interface HashChangeEvent extends Event {
- readonly newURL: string | null;
- readonly oldURL: string | null;
-}
-
-declare var HashChangeEvent: {
- prototype: HashChangeEvent;
- new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
-}
-
-interface History {
- readonly length: number;
- readonly state: any;
- scrollRestoration: ScrollRestoration;
- back(): void;
- forward(): void;
- go(delta?: number): void;
- pushState(data: any, title: string, url?: string | null): void;
- replaceState(data: any, title: string, url?: string | null): void;
-}
-
-declare var History: {
- prototype: History;
- new(): History;
-}
-
-interface IDBCursor {
- readonly direction: string;
- key: IDBKeyRange | IDBValidKey;
- readonly primaryKey: any;
- source: IDBObjectStore | IDBIndex;
- advance(count: number): void;
- continue(key?: IDBKeyRange | IDBValidKey): void;
- delete(): IDBRequest;
- update(value: any): IDBRequest;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-declare var IDBCursor: {
- prototype: IDBCursor;
- new(): IDBCursor;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-interface IDBCursorWithValue extends IDBCursor {
- readonly value: any;
-}
-
-declare var IDBCursorWithValue: {
- prototype: IDBCursorWithValue;
- new(): IDBCursorWithValue;
-}
-
-interface IDBDatabaseEventMap {
- "abort": Event;
- "error": ErrorEvent;
-}
-
-interface IDBDatabase extends EventTarget {
- readonly name: string;
- readonly objectStoreNames: DOMStringList;
- onabort: (this: IDBDatabase, ev: Event) => any;
- onerror: (this: IDBDatabase, ev: ErrorEvent) => any;
- version: number;
- onversionchange: (ev: IDBVersionChangeEvent) => any;
- close(): void;
- createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
- deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
- addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
- addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBDatabase: {
- prototype: IDBDatabase;
- new(): IDBDatabase;
-}
-
-interface IDBFactory {
- cmp(first: any, second: any): number;
- deleteDatabase(name: string): IDBOpenDBRequest;
- open(name: string, version?: number): IDBOpenDBRequest;
-}
-
-declare var IDBFactory: {
- prototype: IDBFactory;
- new(): IDBFactory;
-}
-
-interface IDBIndex {
- keyPath: string | string[];
- readonly name: string;
- readonly objectStore: IDBObjectStore;
- readonly unique: boolean;
- multiEntry: boolean;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- get(key: IDBKeyRange | IDBValidKey): IDBRequest;
- getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
-}
-
-declare var IDBIndex: {
- prototype: IDBIndex;
- new(): IDBIndex;
-}
-
-interface IDBKeyRange {
- readonly lower: any;
- readonly lowerOpen: boolean;
- readonly upper: any;
- readonly upperOpen: boolean;
-}
-
-declare var IDBKeyRange: {
- prototype: IDBKeyRange;
- new(): IDBKeyRange;
- bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
- lowerBound(lower: any, open?: boolean): IDBKeyRange;
- only(value: any): IDBKeyRange;
- upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
-
-interface IDBObjectStore {
- readonly indexNames: DOMStringList;
- keyPath: string | string[];
- readonly name: string;
- readonly transaction: IDBTransaction;
- autoIncrement: boolean;
- add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
- clear(): IDBRequest;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
- delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
- deleteIndex(indexName: string): void;
- get(key: any): IDBRequest;
- index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
-}
-
-declare var IDBObjectStore: {
- prototype: IDBObjectStore;
- new(): IDBObjectStore;
-}
-
-interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
- "blocked": Event;
- "upgradeneeded": IDBVersionChangeEvent;
-}
-
-interface IDBOpenDBRequest extends IDBRequest {
- onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
- onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
- addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBOpenDBRequest: {
- prototype: IDBOpenDBRequest;
- new(): IDBOpenDBRequest;
-}
-
-interface IDBRequestEventMap {
- "error": ErrorEvent;
- "success": Event;
-}
-
-interface IDBRequest extends EventTarget {
- readonly error: DOMError;
- onerror: (this: IDBRequest, ev: ErrorEvent) => any;
- onsuccess: (this: IDBRequest, ev: Event) => any;
- readonly readyState: string;
- readonly result: any;
- source: IDBObjectStore | IDBIndex | IDBCursor;
- readonly transaction: IDBTransaction;
- addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBRequest: {
- prototype: IDBRequest;
- new(): IDBRequest;
-}
-
-interface IDBTransactionEventMap {
- "abort": Event;
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface IDBTransaction extends EventTarget {
- readonly db: IDBDatabase;
- readonly error: DOMError;
- readonly mode: string;
- onabort: (this: IDBTransaction, ev: Event) => any;
- oncomplete: (this: IDBTransaction, ev: Event) => any;
- onerror: (this: IDBTransaction, ev: ErrorEvent) => any;
- abort(): void;
- objectStore(name: string): IDBObjectStore;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
- addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBTransaction: {
- prototype: IDBTransaction;
- new(): IDBTransaction;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
-}
-
-interface IDBVersionChangeEvent extends Event {
- readonly newVersion: number | null;
- readonly oldVersion: number;
-}
-
-declare var IDBVersionChangeEvent: {
- prototype: IDBVersionChangeEvent;
- new(): IDBVersionChangeEvent;
-}
-
-interface ImageData {
- data: Uint8ClampedArray;
- readonly height: number;
- readonly width: number;
-}
-
-declare var ImageData: {
- prototype: ImageData;
- new(width: number, height: number): ImageData;
- new(array: Uint8ClampedArray, width: number, height: number): ImageData;
-}
-
-interface KeyboardEvent extends UIEvent {
- readonly altKey: boolean;
- readonly char: string | null;
- readonly charCode: number;
- readonly ctrlKey: boolean;
- readonly key: string;
- readonly keyCode: number;
- readonly locale: string;
- readonly location: number;
- readonly metaKey: boolean;
- readonly repeat: boolean;
- readonly shiftKey: boolean;
- readonly which: number;
- readonly code: string;
- getModifierState(keyArg: string): boolean;
- initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-declare var KeyboardEvent: {
- prototype: KeyboardEvent;
- new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
- readonly DOM_KEY_LOCATION_JOYSTICK: number;
- readonly DOM_KEY_LOCATION_LEFT: number;
- readonly DOM_KEY_LOCATION_MOBILE: number;
- readonly DOM_KEY_LOCATION_NUMPAD: number;
- readonly DOM_KEY_LOCATION_RIGHT: number;
- readonly DOM_KEY_LOCATION_STANDARD: number;
-}
-
-interface ListeningStateChangedEvent extends Event {
- readonly label: string;
- readonly state: string;
-}
-
-declare var ListeningStateChangedEvent: {
- prototype: ListeningStateChangedEvent;
- new(): ListeningStateChangedEvent;
-}
-
-interface Location {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- assign(url: string): void;
- reload(forcedReload?: boolean): void;
- replace(url: string): void;
- toString(): string;
-}
-
-declare var Location: {
- prototype: Location;
- new(): Location;
-}
-
-interface LongRunningScriptDetectedEvent extends Event {
- readonly executionTime: number;
- stopPageScriptExecution: boolean;
-}
-
-declare var LongRunningScriptDetectedEvent: {
- prototype: LongRunningScriptDetectedEvent;
- new(): LongRunningScriptDetectedEvent;
-}
-
-interface MSApp {
- clearTemporaryWebDataAsync(): MSAppAsyncOperation;
- createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
- createDataPackage(object: any): any;
- createDataPackageFromSelection(): any;
- createFileFromStorageFile(storageFile: any): File;
- createStreamFromInputStream(type: string, inputStream: any): MSStream;
- execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
- execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
- getCurrentPriority(): string;
- getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
- getViewId(view: any): any;
- isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
- pageHandlesAllApplicationActivations(enabled: boolean): void;
- suppressSubdownloadCredentialPrompts(suppress: boolean): void;
- terminateApp(exceptionObject: any): void;
- readonly CURRENT: string;
- readonly HIGH: string;
- readonly IDLE: string;
- readonly NORMAL: string;
-}
-declare var MSApp: MSApp;
-
-interface MSAppAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSAppAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
- onerror: (this: MSAppAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSAppAsyncOperation: {
- prototype: MSAppAsyncOperation;
- new(): MSAppAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
-}
-
-interface MSAssertion {
- readonly id: string;
- readonly type: string;
-}
-
-declare var MSAssertion: {
- prototype: MSAssertion;
- new(): MSAssertion;
-}
-
-interface MSBlobBuilder {
- append(data: any, endings?: string): void;
- getBlob(contentType?: string): Blob;
-}
-
-declare var MSBlobBuilder: {
- prototype: MSBlobBuilder;
- new(): MSBlobBuilder;
-}
-
-interface MSCredentials {
- getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
- makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
-}
-
-declare var MSCredentials: {
- prototype: MSCredentials;
- new(): MSCredentials;
-}
-
-interface MSFIDOCredentialAssertion extends MSAssertion {
- readonly algorithm: string | Algorithm;
- readonly attestation: any;
- readonly publicKey: string;
- readonly transportHints: string[];
-}
-
-declare var MSFIDOCredentialAssertion: {
- prototype: MSFIDOCredentialAssertion;
- new(): MSFIDOCredentialAssertion;
-}
-
-interface MSFIDOSignature {
- readonly authnrData: string;
- readonly clientData: string;
- readonly signature: string;
-}
-
-declare var MSFIDOSignature: {
- prototype: MSFIDOSignature;
- new(): MSFIDOSignature;
-}
-
-interface MSFIDOSignatureAssertion extends MSAssertion {
- readonly signature: MSFIDOSignature;
-}
-
-declare var MSFIDOSignatureAssertion: {
- prototype: MSFIDOSignatureAssertion;
- new(): MSFIDOSignatureAssertion;
-}
-
-interface MSGesture {
- target: Element;
- addPointer(pointerId: number): void;
- stop(): void;
-}
-
-declare var MSGesture: {
- prototype: MSGesture;
- new(): MSGesture;
-}
-
-interface MSGestureEvent extends UIEvent {
- readonly clientX: number;
- readonly clientY: number;
- readonly expansion: number;
- readonly gestureObject: any;
- readonly hwTimestamp: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly rotation: number;
- readonly scale: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly translationX: number;
- readonly translationY: number;
- readonly velocityAngular: number;
- readonly velocityExpansion: number;
- readonly velocityX: number;
- readonly velocityY: number;
- initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-declare var MSGestureEvent: {
- prototype: MSGestureEvent;
- new(): MSGestureEvent;
- readonly MSGESTURE_FLAG_BEGIN: number;
- readonly MSGESTURE_FLAG_CANCEL: number;
- readonly MSGESTURE_FLAG_END: number;
- readonly MSGESTURE_FLAG_INERTIA: number;
- readonly MSGESTURE_FLAG_NONE: number;
-}
-
-interface MSGraphicsTrust {
- readonly constrictionActive: boolean;
- readonly status: string;
-}
-
-declare var MSGraphicsTrust: {
- prototype: MSGraphicsTrust;
- new(): MSGraphicsTrust;
-}
-
-interface MSHTMLWebViewElement extends HTMLElement {
- readonly canGoBack: boolean;
- readonly canGoForward: boolean;
- readonly containsFullScreenElement: boolean;
- readonly documentTitle: string;
- height: number;
- readonly settings: MSWebViewSettings;
- src: string;
- width: number;
- addWebAllowedObject(name: string, applicationObject: any): void;
- buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
- capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
- captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
- getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
- getDeferredPermissionRequests(): DeferredPermissionRequest[];
- goBack(): void;
- goForward(): void;
- invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
- navigate(uri: string): void;
- navigateToLocalStreamUri(source: string, streamResolver: any): void;
- navigateToString(contents: string): void;
- navigateWithHttpRequestMessage(requestMessage: any): void;
- refresh(): void;
- stop(): void;
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSHTMLWebViewElement: {
- prototype: MSHTMLWebViewElement;
- new(): MSHTMLWebViewElement;
-}
-
-interface MSInputMethodContextEventMap {
- "MSCandidateWindowHide": Event;
- "MSCandidateWindowShow": Event;
- "MSCandidateWindowUpdate": Event;
-}
-
-interface MSInputMethodContext extends EventTarget {
- readonly compositionEndOffset: number;
- readonly compositionStartOffset: number;
- oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
- oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
- readonly target: HTMLElement;
- getCandidateWindowClientRect(): ClientRect;
- getCompositionAlternatives(): string[];
- hasComposition(): boolean;
- isCandidateWindowVisible(): boolean;
- addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSInputMethodContext: {
- prototype: MSInputMethodContext;
- new(): MSInputMethodContext;
-}
-
-interface MSManipulationEvent extends UIEvent {
- readonly currentState: number;
- readonly inertiaDestinationX: number;
- readonly inertiaDestinationY: number;
- readonly lastState: number;
- initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-declare var MSManipulationEvent: {
- prototype: MSManipulationEvent;
- new(): MSManipulationEvent;
- readonly MS_MANIPULATION_STATE_ACTIVE: number;
- readonly MS_MANIPULATION_STATE_CANCELLED: number;
- readonly MS_MANIPULATION_STATE_COMMITTED: number;
- readonly MS_MANIPULATION_STATE_DRAGGING: number;
- readonly MS_MANIPULATION_STATE_INERTIA: number;
- readonly MS_MANIPULATION_STATE_PRESELECT: number;
- readonly MS_MANIPULATION_STATE_SELECTING: number;
- readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
-
-interface MSMediaKeyError {
- readonly code: number;
- readonly systemCode: number;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-declare var MSMediaKeyError: {
- prototype: MSMediaKeyError;
- new(): MSMediaKeyError;
- readonly MS_MEDIA_KEYERR_CLIENT: number;
- readonly MS_MEDIA_KEYERR_DOMAIN: number;
- readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- readonly MS_MEDIA_KEYERR_OUTPUT: number;
- readonly MS_MEDIA_KEYERR_SERVICE: number;
- readonly MS_MEDIA_KEYERR_UNKNOWN: number;
-}
-
-interface MSMediaKeyMessageEvent extends Event {
- readonly destinationURL: string | null;
- readonly message: Uint8Array;
-}
-
-declare var MSMediaKeyMessageEvent: {
- prototype: MSMediaKeyMessageEvent;
- new(): MSMediaKeyMessageEvent;
-}
-
-interface MSMediaKeyNeededEvent extends Event {
- readonly initData: Uint8Array | null;
-}
-
-declare var MSMediaKeyNeededEvent: {
- prototype: MSMediaKeyNeededEvent;
- new(): MSMediaKeyNeededEvent;
-}
-
-interface MSMediaKeySession extends EventTarget {
- readonly error: MSMediaKeyError | null;
- readonly keySystem: string;
- readonly sessionId: string;
- close(): void;
- update(key: Uint8Array): void;
-}
-
-declare var MSMediaKeySession: {
- prototype: MSMediaKeySession;
- new(): MSMediaKeySession;
-}
-
-interface MSMediaKeys {
- readonly keySystem: string;
- createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
-}
-
-declare var MSMediaKeys: {
- prototype: MSMediaKeys;
- new(keySystem: string): MSMediaKeys;
- isTypeSupported(keySystem: string, type?: string): boolean;
- isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
-}
-
-interface MSPointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var MSPointerEvent: {
- prototype: MSPointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
-
-interface MSRangeCollection {
- readonly length: number;
- item(index: number): Range;
- [index: number]: Range;
-}
-
-declare var MSRangeCollection: {
- prototype: MSRangeCollection;
- new(): MSRangeCollection;
-}
-
-interface MSSiteModeEvent extends Event {
- readonly actionURL: string;
- readonly buttonID: number;
-}
-
-declare var MSSiteModeEvent: {
- prototype: MSSiteModeEvent;
- new(): MSSiteModeEvent;
-}
-
-interface MSStream {
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
-}
-
-declare var MSStream: {
- prototype: MSStream;
- new(): MSStream;
-}
-
-interface MSStreamReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(stream: MSStream, size?: number): void;
- readAsBinaryString(stream: MSStream, size?: number): void;
- readAsBlob(stream: MSStream, size?: number): void;
- readAsDataURL(stream: MSStream, size?: number): void;
- readAsText(stream: MSStream, encoding?: string, size?: number): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSStreamReader: {
- prototype: MSStreamReader;
- new(): MSStreamReader;
-}
-
-interface MSWebViewAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSWebViewAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
- onerror: (this: MSWebViewAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- readonly target: MSHTMLWebViewElement;
- readonly type: number;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
- addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSWebViewAsyncOperation: {
- prototype: MSWebViewAsyncOperation;
- new(): MSWebViewAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- readonly TYPE_INVOKE_SCRIPT: number;
-}
-
-interface MSWebViewSettings {
- isIndexedDBEnabled: boolean;
- isJavaScriptEnabled: boolean;
-}
-
-declare var MSWebViewSettings: {
- prototype: MSWebViewSettings;
- new(): MSWebViewSettings;
-}
-
-interface MediaDeviceInfo {
- readonly deviceId: string;
- readonly groupId: string;
- readonly kind: string;
- readonly label: string;
-}
-
-declare var MediaDeviceInfo: {
- prototype: MediaDeviceInfo;
- new(): MediaDeviceInfo;
-}
-
-interface MediaDevicesEventMap {
- "devicechange": Event;
-}
-
-interface MediaDevices extends EventTarget {
- ondevicechange: (this: MediaDevices, ev: Event) => any;
- enumerateDevices(): any;
- getSupportedConstraints(): MediaTrackSupportedConstraints;
- getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
- addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaDevices: {
- prototype: MediaDevices;
- new(): MediaDevices;
-}
-
-interface MediaElementAudioSourceNode extends AudioNode {
-}
-
-declare var MediaElementAudioSourceNode: {
- prototype: MediaElementAudioSourceNode;
- new(): MediaElementAudioSourceNode;
-}
-
-interface MediaEncryptedEvent extends Event {
- readonly initData: ArrayBuffer | null;
- readonly initDataType: string;
-}
-
-declare var MediaEncryptedEvent: {
- prototype: MediaEncryptedEvent;
- new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
-}
-
-interface MediaError {
- readonly code: number;
- readonly msExtendedCode: number;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-declare var MediaError: {
- prototype: MediaError;
- new(): MediaError;
- readonly MEDIA_ERR_ABORTED: number;
- readonly MEDIA_ERR_DECODE: number;
- readonly MEDIA_ERR_NETWORK: number;
- readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- readonly MS_MEDIA_ERR_ENCRYPTED: number;
-}
-
-interface MediaKeyMessageEvent extends Event {
- readonly message: ArrayBuffer;
- readonly messageType: string;
-}
-
-declare var MediaKeyMessageEvent: {
- prototype: MediaKeyMessageEvent;
- new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
-}
-
-interface MediaKeySession extends EventTarget {
- readonly closed: PromiseLike<void>;
- readonly expiration: number;
- readonly keyStatuses: MediaKeyStatusMap;
- readonly sessionId: string;
- close(): PromiseLike<void>;
- generateRequest(initDataType: string, initData: any): PromiseLike<void>;
- load(sessionId: string): PromiseLike<boolean>;
- remove(): PromiseLike<void>;
- update(response: any): PromiseLike<void>;
-}
-
-declare var MediaKeySession: {
- prototype: MediaKeySession;
- new(): MediaKeySession;
-}
-
-interface MediaKeyStatusMap {
- readonly size: number;
- forEach(callback: ForEachCallback): void;
- get(keyId: any): string;
- has(keyId: any): boolean;
-}
-
-declare var MediaKeyStatusMap: {
- prototype: MediaKeyStatusMap;
- new(): MediaKeyStatusMap;
-}
-
-interface MediaKeySystemAccess {
- readonly keySystem: string;
- createMediaKeys(): PromiseLike<MediaKeys>;
- getConfiguration(): MediaKeySystemConfiguration;
-}
-
-declare var MediaKeySystemAccess: {
- prototype: MediaKeySystemAccess;
- new(): MediaKeySystemAccess;
-}
-
-interface MediaKeys {
- createSession(sessionType?: string): MediaKeySession;
- setServerCertificate(serverCertificate: any): PromiseLike<void>;
-}
-
-declare var MediaKeys: {
- prototype: MediaKeys;
- new(): MediaKeys;
-}
-
-interface MediaList {
- readonly length: number;
- mediaText: string;
- appendMedium(newMedium: string): void;
- deleteMedium(oldMedium: string): void;
- item(index: number): string;
- toString(): string;
- [index: number]: string;
-}
-
-declare var MediaList: {
- prototype: MediaList;
- new(): MediaList;
-}
-
-interface MediaQueryList {
- readonly matches: boolean;
- readonly media: string;
- addListener(listener: MediaQueryListListener): void;
- removeListener(listener: MediaQueryListListener): void;
-}
-
-declare var MediaQueryList: {
- prototype: MediaQueryList;
- new(): MediaQueryList;
-}
-
-interface MediaSource extends EventTarget {
- readonly activeSourceBuffers: SourceBufferList;
- duration: number;
- readonly readyState: string;
- readonly sourceBuffers: SourceBufferList;
- addSourceBuffer(type: string): SourceBuffer;
- endOfStream(error?: number): void;
- removeSourceBuffer(sourceBuffer: SourceBuffer): void;
-}
-
-declare var MediaSource: {
- prototype: MediaSource;
- new(): MediaSource;
- isTypeSupported(type: string): boolean;
-}
-
-interface MediaStreamEventMap {
- "active": Event;
- "addtrack": TrackEvent;
- "inactive": Event;
- "removetrack": TrackEvent;
-}
-
-interface MediaStream extends EventTarget {
- readonly active: boolean;
- readonly id: string;
- onactive: (this: MediaStream, ev: Event) => any;
- onaddtrack: (this: MediaStream, ev: TrackEvent) => any;
- oninactive: (this: MediaStream, ev: Event) => any;
- onremovetrack: (this: MediaStream, ev: TrackEvent) => any;
- addTrack(track: MediaStreamTrack): void;
- clone(): MediaStream;
- getAudioTracks(): MediaStreamTrack[];
- getTrackById(trackId: string): MediaStreamTrack | null;
- getTracks(): MediaStreamTrack[];
- getVideoTracks(): MediaStreamTrack[];
- removeTrack(track: MediaStreamTrack): void;
- stop(): void;
- addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStream: {
- prototype: MediaStream;
- new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
-}
-
-interface MediaStreamAudioSourceNode extends AudioNode {
-}
-
-declare var MediaStreamAudioSourceNode: {
- prototype: MediaStreamAudioSourceNode;
- new(): MediaStreamAudioSourceNode;
-}
-
-interface MediaStreamError {
- readonly constraintName: string | null;
- readonly message: string | null;
- readonly name: string;
-}
-
-declare var MediaStreamError: {
- prototype: MediaStreamError;
- new(): MediaStreamError;
-}
-
-interface MediaStreamErrorEvent extends Event {
- readonly error: MediaStreamError | null;
-}
-
-declare var MediaStreamErrorEvent: {
- prototype: MediaStreamErrorEvent;
- new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
-}
-
-interface MediaStreamTrackEventMap {
- "ended": MediaStreamErrorEvent;
- "mute": Event;
- "overconstrained": MediaStreamErrorEvent;
- "unmute": Event;
-}
-
-interface MediaStreamTrack extends EventTarget {
- enabled: boolean;
- readonly id: string;
- readonly kind: string;
- readonly label: string;
- readonly muted: boolean;
- onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onmute: (this: MediaStreamTrack, ev: Event) => any;
- onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
- onunmute: (this: MediaStreamTrack, ev: Event) => any;
- readonly readonly: boolean;
- readonly readyState: string;
- readonly remote: boolean;
- applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
- clone(): MediaStreamTrack;
- getCapabilities(): MediaTrackCapabilities;
- getConstraints(): MediaTrackConstraints;
- getSettings(): MediaTrackSettings;
- stop(): void;
- addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MediaStreamTrack: {
- prototype: MediaStreamTrack;
- new(): MediaStreamTrack;
-}
-
-interface MediaStreamTrackEvent extends Event {
- readonly track: MediaStreamTrack;
-}
-
-declare var MediaStreamTrackEvent: {
- prototype: MediaStreamTrackEvent;
- new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
-}
-
-interface MessageChannel {
- readonly port1: MessagePort;
- readonly port2: MessagePort;
-}
-
-declare var MessageChannel: {
- prototype: MessageChannel;
- new(): MessageChannel;
-}
-
-interface MessageEvent extends Event {
- readonly data: any;
- readonly origin: string;
- readonly ports: any;
- readonly source: Window;
- initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
-}
-
-declare var MessageEvent: {
- prototype: MessageEvent;
- new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
-}
-
-interface MessagePortEventMap {
- "message": MessageEvent;
-}
-
-interface MessagePort extends EventTarget {
- onmessage: (this: MessagePort, ev: MessageEvent) => any;
- close(): void;
- postMessage(message?: any, ports?: any): void;
- start(): void;
- addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MessagePort: {
- prototype: MessagePort;
- new(): MessagePort;
-}
-
-interface MimeType {
- readonly description: string;
- readonly enabledPlugin: Plugin;
- readonly suffixes: string;
- readonly type: string;
-}
-
-declare var MimeType: {
- prototype: MimeType;
- new(): MimeType;
-}
-
-interface MimeTypeArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(type: string): Plugin;
- [index: number]: Plugin;
-}
-
-declare var MimeTypeArray: {
- prototype: MimeTypeArray;
- new(): MimeTypeArray;
-}
-
-interface MouseEvent extends UIEvent {
- readonly altKey: boolean;
- readonly button: number;
- readonly buttons: number;
- readonly clientX: number;
- readonly clientY: number;
- readonly ctrlKey: boolean;
- readonly fromElement: Element;
- readonly layerX: number;
- readonly layerY: number;
- readonly metaKey: boolean;
- readonly movementX: number;
- readonly movementY: number;
- readonly offsetX: number;
- readonly offsetY: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly relatedTarget: EventTarget;
- readonly screenX: number;
- readonly screenY: number;
- readonly shiftKey: boolean;
- readonly toElement: Element;
- readonly which: number;
- readonly x: number;
- readonly y: number;
- getModifierState(keyArg: string): boolean;
- initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
-}
-
-declare var MouseEvent: {
- prototype: MouseEvent;
- new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
-}
-
-interface MutationEvent extends Event {
- readonly attrChange: number;
- readonly attrName: string;
- readonly newValue: string;
- readonly prevValue: string;
- readonly relatedNode: Node;
- initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-declare var MutationEvent: {
- prototype: MutationEvent;
- new(): MutationEvent;
- readonly ADDITION: number;
- readonly MODIFICATION: number;
- readonly REMOVAL: number;
-}
-
-interface MutationObserver {
- disconnect(): void;
- observe(target: Node, options: MutationObserverInit): void;
- takeRecords(): MutationRecord[];
-}
-
-declare var MutationObserver: {
- prototype: MutationObserver;
- new(callback: MutationCallback): MutationObserver;
-}
-
-interface MutationRecord {
- readonly addedNodes: NodeList;
- readonly attributeName: string | null;
- readonly attributeNamespace: string | null;
- readonly nextSibling: Node | null;
- readonly oldValue: string | null;
- readonly previousSibling: Node | null;
- readonly removedNodes: NodeList;
- readonly target: Node;
- readonly type: string;
-}
-
-declare var MutationRecord: {
- prototype: MutationRecord;
- new(): MutationRecord;
-}
-
-interface NamedNodeMap {
- readonly length: number;
- getNamedItem(name: string): Attr;
- getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- item(index: number): Attr;
- removeNamedItem(name: string): Attr;
- removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
- setNamedItem(arg: Attr): Attr;
- setNamedItemNS(arg: Attr): Attr;
- [index: number]: Attr;
-}
-
-declare var NamedNodeMap: {
- prototype: NamedNodeMap;
- new(): NamedNodeMap;
-}
-
-interface NavigationCompletedEvent extends NavigationEvent {
- readonly isSuccess: boolean;
- readonly webErrorStatus: number;
-}
-
-declare var NavigationCompletedEvent: {
- prototype: NavigationCompletedEvent;
- new(): NavigationCompletedEvent;
-}
-
-interface NavigationEvent extends Event {
- readonly uri: string;
-}
-
-declare var NavigationEvent: {
- prototype: NavigationEvent;
- new(): NavigationEvent;
-}
-
-interface NavigationEventWithReferrer extends NavigationEvent {
- readonly referer: string;
-}
-
-declare var NavigationEventWithReferrer: {
- prototype: NavigationEventWithReferrer;
- new(): NavigationEventWithReferrer;
-}
-
-interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {
- readonly appCodeName: string;
- readonly cookieEnabled: boolean;
- readonly language: string;
- readonly maxTouchPoints: number;
- readonly mimeTypes: MimeTypeArray;
- readonly msManipulationViewsEnabled: boolean;
- readonly msMaxTouchPoints: number;
- readonly msPointerEnabled: boolean;
- readonly plugins: PluginArray;
- readonly pointerEnabled: boolean;
- readonly webdriver: boolean;
- readonly hardwareConcurrency: number;
- getGamepads(): Gamepad[];
- javaEnabled(): boolean;
- msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
- requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
- vibrate(pattern: number | number[]): boolean;
-}
-
-declare var Navigator: {
- prototype: Navigator;
- new(): Navigator;
-}
-
-interface Node extends EventTarget {
- readonly attributes: NamedNodeMap;
- readonly baseURI: string | null;
- readonly childNodes: NodeList;
- readonly firstChild: Node | null;
- readonly lastChild: Node | null;
- readonly localName: string | null;
- readonly namespaceURI: string | null;
- readonly nextSibling: Node | null;
- readonly nodeName: string;
- readonly nodeType: number;
- nodeValue: string | null;
- readonly ownerDocument: Document;
- readonly parentElement: HTMLElement | null;
- readonly parentNode: Node | null;
- readonly previousSibling: Node | null;
- textContent: string | null;
- appendChild(newChild: Node): Node;
- cloneNode(deep?: boolean): Node;
- compareDocumentPosition(other: Node): number;
- contains(child: Node): boolean;
- hasAttributes(): boolean;
- hasChildNodes(): boolean;
- insertBefore(newChild: Node, refChild: Node | null): Node;
- isDefaultNamespace(namespaceURI: string | null): boolean;
- isEqualNode(arg: Node): boolean;
- isSameNode(other: Node): boolean;
- lookupNamespaceURI(prefix: string | null): string | null;
- lookupPrefix(namespaceURI: string | null): string | null;
- normalize(): void;
- removeChild(oldChild: Node): Node;
- replaceChild(newChild: Node, oldChild: Node): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-declare var Node: {
- prototype: Node;
- new(): Node;
- readonly ATTRIBUTE_NODE: number;
- readonly CDATA_SECTION_NODE: number;
- readonly COMMENT_NODE: number;
- readonly DOCUMENT_FRAGMENT_NODE: number;
- readonly DOCUMENT_NODE: number;
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
- readonly DOCUMENT_POSITION_CONTAINS: number;
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
- readonly DOCUMENT_POSITION_FOLLOWING: number;
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- readonly DOCUMENT_POSITION_PRECEDING: number;
- readonly DOCUMENT_TYPE_NODE: number;
- readonly ELEMENT_NODE: number;
- readonly ENTITY_NODE: number;
- readonly ENTITY_REFERENCE_NODE: number;
- readonly NOTATION_NODE: number;
- readonly PROCESSING_INSTRUCTION_NODE: number;
- readonly TEXT_NODE: number;
-}
-
-interface NodeFilter {
- acceptNode(n: Node): number;
-}
-
-declare var NodeFilter: {
- readonly FILTER_ACCEPT: number;
- readonly FILTER_REJECT: number;
- readonly FILTER_SKIP: number;
- readonly SHOW_ALL: number;
- readonly SHOW_ATTRIBUTE: number;
- readonly SHOW_CDATA_SECTION: number;
- readonly SHOW_COMMENT: number;
- readonly SHOW_DOCUMENT: number;
- readonly SHOW_DOCUMENT_FRAGMENT: number;
- readonly SHOW_DOCUMENT_TYPE: number;
- readonly SHOW_ELEMENT: number;
- readonly SHOW_ENTITY: number;
- readonly SHOW_ENTITY_REFERENCE: number;
- readonly SHOW_NOTATION: number;
- readonly SHOW_PROCESSING_INSTRUCTION: number;
- readonly SHOW_TEXT: number;
-}
-
-interface NodeIterator {
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- detach(): void;
- nextNode(): Node;
- previousNode(): Node;
-}
-
-declare var NodeIterator: {
- prototype: NodeIterator;
- new(): NodeIterator;
-}
-
-interface NodeList {
- readonly length: number;
- item(index: number): Node;
- [index: number]: Node;
-}
-
-declare var NodeList: {
- prototype: NodeList;
- new(): NodeList;
-}
-
-interface OES_element_index_uint {
-}
-
-declare var OES_element_index_uint: {
- prototype: OES_element_index_uint;
- new(): OES_element_index_uint;
-}
-
-interface OES_standard_derivatives {
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-declare var OES_standard_derivatives: {
- prototype: OES_standard_derivatives;
- new(): OES_standard_derivatives;
- readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
-
-interface OES_texture_float {
-}
-
-declare var OES_texture_float: {
- prototype: OES_texture_float;
- new(): OES_texture_float;
-}
-
-interface OES_texture_float_linear {
-}
-
-declare var OES_texture_float_linear: {
- prototype: OES_texture_float_linear;
- new(): OES_texture_float_linear;
-}
-
-interface OfflineAudioCompletionEvent extends Event {
- readonly renderedBuffer: AudioBuffer;
-}
-
-declare var OfflineAudioCompletionEvent: {
- prototype: OfflineAudioCompletionEvent;
- new(): OfflineAudioCompletionEvent;
-}
-
-interface OfflineAudioContextEventMap {
- "complete": Event;
-}
-
-interface OfflineAudioContext extends AudioContext {
- oncomplete: (this: OfflineAudioContext, ev: Event) => any;
- startRendering(): PromiseLike<AudioBuffer>;
- addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OfflineAudioContext: {
- prototype: OfflineAudioContext;
- new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
-
-interface OscillatorNodeEventMap {
- "ended": MediaStreamErrorEvent;
-}
-
-interface OscillatorNode extends AudioNode {
- readonly detune: AudioParam;
- readonly frequency: AudioParam;
- onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
- type: string;
- setPeriodicWave(periodicWave: PeriodicWave): void;
- start(when?: number): void;
- stop(when?: number): void;
- addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var OscillatorNode: {
- prototype: OscillatorNode;
- new(): OscillatorNode;
-}
-
-interface OverflowEvent extends UIEvent {
- readonly horizontalOverflow: boolean;
- readonly orient: number;
- readonly verticalOverflow: boolean;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-declare var OverflowEvent: {
- prototype: OverflowEvent;
- new(): OverflowEvent;
- readonly BOTH: number;
- readonly HORIZONTAL: number;
- readonly VERTICAL: number;
-}
-
-interface PageTransitionEvent extends Event {
- readonly persisted: boolean;
-}
-
-declare var PageTransitionEvent: {
- prototype: PageTransitionEvent;
- new(): PageTransitionEvent;
-}
-
-interface PannerNode extends AudioNode {
- coneInnerAngle: number;
- coneOuterAngle: number;
- coneOuterGain: number;
- distanceModel: string;
- maxDistance: number;
- panningModel: string;
- refDistance: number;
- rolloffFactor: number;
- setOrientation(x: number, y: number, z: number): void;
- setPosition(x: number, y: number, z: number): void;
- setVelocity(x: number, y: number, z: number): void;
-}
-
-declare var PannerNode: {
- prototype: PannerNode;
- new(): PannerNode;
-}
-
-interface PerfWidgetExternal {
- readonly activeNetworkRequestCount: number;
- readonly averageFrameTime: number;
- readonly averagePaintTime: number;
- readonly extraInformationEnabled: boolean;
- readonly independentRenderingEnabled: boolean;
- readonly irDisablingContentString: string;
- readonly irStatusAvailable: boolean;
- readonly maxCpuSpeed: number;
- readonly paintRequestsPerSecond: number;
- readonly performanceCounter: number;
- readonly performanceCounterFrequency: number;
- addEventListener(eventType: string, callback: Function): void;
- getMemoryUsage(): number;
- getProcessCpuUsage(): number;
- getRecentCpuUsage(last: number | null): any;
- getRecentFrames(last: number | null): any;
- getRecentMemoryUsage(last: number | null): any;
- getRecentPaintRequests(last: number | null): any;
- removeEventListener(eventType: string, callback: Function): void;
- repositionWindow(x: number, y: number): void;
- resizeWindow(width: number, height: number): void;
-}
-
-declare var PerfWidgetExternal: {
- prototype: PerfWidgetExternal;
- new(): PerfWidgetExternal;
-}
-
-interface Performance {
- readonly navigation: PerformanceNavigation;
- readonly timing: PerformanceTiming;
- clearMarks(markName?: string): void;
- clearMeasures(measureName?: string): void;
- clearResourceTimings(): void;
- getEntries(): any;
- getEntriesByName(name: string, entryType?: string): any;
- getEntriesByType(entryType: string): any;
- getMarks(markName?: string): any;
- getMeasures(measureName?: string): any;
- mark(markName: string): void;
- measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
- now(): number;
- setResourceTimingBufferSize(maxSize: number): void;
- toJSON(): any;
-}
-
-declare var Performance: {
- prototype: Performance;
- new(): Performance;
-}
-
-interface PerformanceEntry {
- readonly duration: number;
- readonly entryType: string;
- readonly name: string;
- readonly startTime: number;
-}
-
-declare var PerformanceEntry: {
- prototype: PerformanceEntry;
- new(): PerformanceEntry;
-}
-
-interface PerformanceMark extends PerformanceEntry {
-}
-
-declare var PerformanceMark: {
- prototype: PerformanceMark;
- new(): PerformanceMark;
-}
-
-interface PerformanceMeasure extends PerformanceEntry {
-}
-
-declare var PerformanceMeasure: {
- prototype: PerformanceMeasure;
- new(): PerformanceMeasure;
-}
-
-interface PerformanceNavigation {
- readonly redirectCount: number;
- readonly type: number;
- toJSON(): any;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-declare var PerformanceNavigation: {
- prototype: PerformanceNavigation;
- new(): PerformanceNavigation;
- readonly TYPE_BACK_FORWARD: number;
- readonly TYPE_NAVIGATE: number;
- readonly TYPE_RELOAD: number;
- readonly TYPE_RESERVED: number;
-}
-
-interface PerformanceNavigationTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly navigationStart: number;
- readonly redirectCount: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly type: string;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
-}
-
-declare var PerformanceNavigationTiming: {
- prototype: PerformanceNavigationTiming;
- new(): PerformanceNavigationTiming;
-}
-
-interface PerformanceResourceTiming extends PerformanceEntry {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly initiatorType: string;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
-}
-
-declare var PerformanceResourceTiming: {
- prototype: PerformanceResourceTiming;
- new(): PerformanceResourceTiming;
-}
-
-interface PerformanceTiming {
- readonly connectEnd: number;
- readonly connectStart: number;
- readonly domComplete: number;
- readonly domContentLoadedEventEnd: number;
- readonly domContentLoadedEventStart: number;
- readonly domInteractive: number;
- readonly domLoading: number;
- readonly domainLookupEnd: number;
- readonly domainLookupStart: number;
- readonly fetchStart: number;
- readonly loadEventEnd: number;
- readonly loadEventStart: number;
- readonly msFirstPaint: number;
- readonly navigationStart: number;
- readonly redirectEnd: number;
- readonly redirectStart: number;
- readonly requestStart: number;
- readonly responseEnd: number;
- readonly responseStart: number;
- readonly unloadEventEnd: number;
- readonly unloadEventStart: number;
- readonly secureConnectionStart: number;
- toJSON(): any;
-}
-
-declare var PerformanceTiming: {
- prototype: PerformanceTiming;
- new(): PerformanceTiming;
-}
-
-interface PeriodicWave {
-}
-
-declare var PeriodicWave: {
- prototype: PeriodicWave;
- new(): PeriodicWave;
-}
-
-interface PermissionRequest extends DeferredPermissionRequest {
- readonly state: string;
- defer(): void;
-}
-
-declare var PermissionRequest: {
- prototype: PermissionRequest;
- new(): PermissionRequest;
-}
-
-interface PermissionRequestedEvent extends Event {
- readonly permissionRequest: PermissionRequest;
-}
-
-declare var PermissionRequestedEvent: {
- prototype: PermissionRequestedEvent;
- new(): PermissionRequestedEvent;
-}
-
-interface Plugin {
- readonly description: string;
- readonly filename: string;
- readonly length: number;
- readonly name: string;
- readonly version: string;
- item(index: number): MimeType;
- namedItem(type: string): MimeType;
- [index: number]: MimeType;
-}
-
-declare var Plugin: {
- prototype: Plugin;
- new(): Plugin;
-}
-
-interface PluginArray {
- readonly length: number;
- item(index: number): Plugin;
- namedItem(name: string): Plugin;
- refresh(reload?: boolean): void;
- [index: number]: Plugin;
-}
-
-declare var PluginArray: {
- prototype: PluginArray;
- new(): PluginArray;
-}
-
-interface PointerEvent extends MouseEvent {
- readonly currentPoint: any;
- readonly height: number;
- readonly hwTimestamp: number;
- readonly intermediatePoints: any;
- readonly isPrimary: boolean;
- readonly pointerId: number;
- readonly pointerType: any;
- readonly pressure: number;
- readonly rotation: number;
- readonly tiltX: number;
- readonly tiltY: number;
- readonly width: number;
- getCurrentPoint(element: Element): void;
- getIntermediatePoints(element: Element): void;
- initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
-}
-
-declare var PointerEvent: {
- prototype: PointerEvent;
- new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
-
-interface PopStateEvent extends Event {
- readonly state: any;
- initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
-}
-
-declare var PopStateEvent: {
- prototype: PopStateEvent;
- new(): PopStateEvent;
-}
-
-interface Position {
- readonly coords: Coordinates;
- readonly timestamp: number;
-}
-
-declare var Position: {
- prototype: Position;
- new(): Position;
-}
-
-interface PositionError {
- readonly code: number;
- readonly message: string;
- toString(): string;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-declare var PositionError: {
- prototype: PositionError;
- new(): PositionError;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-interface ProcessingInstruction extends CharacterData {
- readonly target: string;
-}
-
-declare var ProcessingInstruction: {
- prototype: ProcessingInstruction;
- new(): ProcessingInstruction;
-}
-
-interface ProgressEvent extends Event {
- readonly lengthComputable: boolean;
- readonly loaded: number;
- readonly total: number;
- initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
-}
-
-declare var ProgressEvent: {
- prototype: ProgressEvent;
- new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
-
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
-}
-
-declare var RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtlsTransportEventMap {
- "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
- "error": ErrorEvent;
-}
-
-interface RTCDtlsTransport extends RTCStatsProvider {
- ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
- onerror: ((this: RTCDtlsTransport, ev: ErrorEvent) => any) | null;
- readonly state: string;
- readonly transport: RTCIceTransport;
- getLocalParameters(): RTCDtlsParameters;
- getRemoteCertificates(): ArrayBuffer[];
- getRemoteParameters(): RTCDtlsParameters | null;
- start(remoteParameters: RTCDtlsParameters): void;
- stop(): void;
- addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtlsTransport: {
- prototype: RTCDtlsTransport;
- new(transport: RTCIceTransport): RTCDtlsTransport;
-}
-
-interface RTCDtlsTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCDtlsTransportStateChangedEvent: {
- prototype: RTCDtlsTransportStateChangedEvent;
- new(): RTCDtlsTransportStateChangedEvent;
-}
-
-interface RTCDtmfSenderEventMap {
- "tonechange": RTCDTMFToneChangeEvent;
-}
-
-interface RTCDtmfSender extends EventTarget {
- readonly canInsertDTMF: boolean;
- readonly duration: number;
- readonly interToneGap: number;
- ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
- readonly sender: RTCRtpSender;
- readonly toneBuffer: string;
- insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
- addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCDtmfSender: {
- prototype: RTCDtmfSender;
- new(sender: RTCRtpSender): RTCDtmfSender;
-}
-
-interface RTCIceCandidatePairChangedEvent extends Event {
- readonly pair: RTCIceCandidatePair;
-}
-
-declare var RTCIceCandidatePairChangedEvent: {
- prototype: RTCIceCandidatePairChangedEvent;
- new(): RTCIceCandidatePairChangedEvent;
-}
-
-interface RTCIceGathererEventMap {
- "error": ErrorEvent;
- "localcandidate": RTCIceGathererEvent;
-}
-
-interface RTCIceGatherer extends RTCStatsProvider {
- readonly component: string;
- onerror: ((this: RTCIceGatherer, ev: ErrorEvent) => any) | null;
- onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
- createAssociatedGatherer(): RTCIceGatherer;
- getLocalCandidates(): RTCIceCandidate[];
- getLocalParameters(): RTCIceParameters;
- addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceGatherer: {
- prototype: RTCIceGatherer;
- new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
-
-interface RTCIceGathererEvent extends Event {
- readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;
-}
-
-declare var RTCIceGathererEvent: {
- prototype: RTCIceGathererEvent;
- new(): RTCIceGathererEvent;
-}
-
-interface RTCIceTransportEventMap {
- "candidatepairchange": RTCIceCandidatePairChangedEvent;
- "icestatechange": RTCIceTransportStateChangedEvent;
-}
-
-interface RTCIceTransport extends RTCStatsProvider {
- readonly component: string;
- readonly iceGatherer: RTCIceGatherer | null;
- oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
- onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
- readonly role: string;
- readonly state: string;
- addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;
- createAssociatedTransport(): RTCIceTransport;
- getNominatedCandidatePair(): RTCIceCandidatePair | null;
- getRemoteCandidates(): RTCIceCandidate[];
- getRemoteParameters(): RTCIceParameters | null;
- setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;
- start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;
- stop(): void;
- addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCIceTransport: {
- prototype: RTCIceTransport;
- new(): RTCIceTransport;
-}
-
-interface RTCIceTransportStateChangedEvent extends Event {
- readonly state: string;
-}
-
-declare var RTCIceTransportStateChangedEvent: {
- prototype: RTCIceTransportStateChangedEvent;
- new(): RTCIceTransportStateChangedEvent;
-}
-
-interface RTCRtpReceiverEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCRtpReceiver extends RTCStatsProvider {
- onerror: ((this: RTCRtpReceiver, ev: ErrorEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack | null;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- getContributingSources(): RTCRtpContributingSource[];
- receive(parameters: RTCRtpParameters): void;
- requestSendCSRC(csrc: number): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpReceiver: {
- prototype: RTCRtpReceiver;
- new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCRtpSenderEventMap {
- "error": ErrorEvent;
- "ssrcconflict": RTCSsrcConflictEvent;
-}
-
-interface RTCRtpSender extends RTCStatsProvider {
- onerror: ((this: RTCRtpSender, ev: ErrorEvent) => any) | null;
- onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
- readonly rtcpTransport: RTCDtlsTransport;
- readonly track: MediaStreamTrack;
- readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
- send(parameters: RTCRtpParameters): void;
- setTrack(track: MediaStreamTrack): void;
- setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
- stop(): void;
- addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCRtpSender: {
- prototype: RTCRtpSender;
- new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
- getCapabilities(kind?: string): RTCRtpCapabilities;
-}
-
-interface RTCSrtpSdesTransportEventMap {
- "error": ErrorEvent;
-}
-
-interface RTCSrtpSdesTransport extends EventTarget {
- onerror: ((this: RTCSrtpSdesTransport, ev: ErrorEvent) => any) | null;
- readonly transport: RTCIceTransport;
- addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var RTCSrtpSdesTransport: {
- prototype: RTCSrtpSdesTransport;
- new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
- getLocalParameters(): RTCSrtpSdesParameters[];
-}
-
-interface RTCSsrcConflictEvent extends Event {
- readonly ssrc: number;
-}
-
-declare var RTCSsrcConflictEvent: {
- prototype: RTCSsrcConflictEvent;
- new(): RTCSsrcConflictEvent;
-}
-
-interface RTCStatsProvider extends EventTarget {
- getStats(): PromiseLike<RTCStatsReport>;
- msGetStats(): PromiseLike<RTCStatsReport>;
-}
-
-declare var RTCStatsProvider: {
- prototype: RTCStatsProvider;
- new(): RTCStatsProvider;
-}
-
-interface Range {
- readonly collapsed: boolean;
- readonly commonAncestorContainer: Node;
- readonly endContainer: Node;
- readonly endOffset: number;
- readonly startContainer: Node;
- readonly startOffset: number;
- cloneContents(): DocumentFragment;
- cloneRange(): Range;
- collapse(toStart: boolean): void;
- compareBoundaryPoints(how: number, sourceRange: Range): number;
- createContextualFragment(fragment: string): DocumentFragment;
- deleteContents(): void;
- detach(): void;
- expand(Unit: string): boolean;
- extractContents(): DocumentFragment;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- insertNode(newNode: Node): void;
- selectNode(refNode: Node): void;
- selectNodeContents(refNode: Node): void;
- setEnd(refNode: Node, offset: number): void;
- setEndAfter(refNode: Node): void;
- setEndBefore(refNode: Node): void;
- setStart(refNode: Node, offset: number): void;
- setStartAfter(refNode: Node): void;
- setStartBefore(refNode: Node): void;
- surroundContents(newParent: Node): void;
- toString(): string;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-declare var Range: {
- prototype: Range;
- new(): Range;
- readonly END_TO_END: number;
- readonly END_TO_START: number;
- readonly START_TO_END: number;
- readonly START_TO_START: number;
-}
-
-interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly target: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGAElement: {
- prototype: SVGAElement;
- new(): SVGAElement;
-}
-
-interface SVGAngle {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-declare var SVGAngle: {
- prototype: SVGAngle;
- new(): SVGAngle;
- readonly SVG_ANGLETYPE_DEG: number;
- readonly SVG_ANGLETYPE_GRAD: number;
- readonly SVG_ANGLETYPE_RAD: number;
- readonly SVG_ANGLETYPE_UNKNOWN: number;
- readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
-
-interface SVGAnimatedAngle {
- readonly animVal: SVGAngle;
- readonly baseVal: SVGAngle;
-}
-
-declare var SVGAnimatedAngle: {
- prototype: SVGAnimatedAngle;
- new(): SVGAnimatedAngle;
-}
-
-interface SVGAnimatedBoolean {
- readonly animVal: boolean;
- baseVal: boolean;
-}
-
-declare var SVGAnimatedBoolean: {
- prototype: SVGAnimatedBoolean;
- new(): SVGAnimatedBoolean;
-}
-
-interface SVGAnimatedEnumeration {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedEnumeration: {
- prototype: SVGAnimatedEnumeration;
- new(): SVGAnimatedEnumeration;
-}
-
-interface SVGAnimatedInteger {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedInteger: {
- prototype: SVGAnimatedInteger;
- new(): SVGAnimatedInteger;
-}
-
-interface SVGAnimatedLength {
- readonly animVal: SVGLength;
- readonly baseVal: SVGLength;
-}
-
-declare var SVGAnimatedLength: {
- prototype: SVGAnimatedLength;
- new(): SVGAnimatedLength;
-}
-
-interface SVGAnimatedLengthList {
- readonly animVal: SVGLengthList;
- readonly baseVal: SVGLengthList;
-}
-
-declare var SVGAnimatedLengthList: {
- prototype: SVGAnimatedLengthList;
- new(): SVGAnimatedLengthList;
-}
-
-interface SVGAnimatedNumber {
- readonly animVal: number;
- baseVal: number;
-}
-
-declare var SVGAnimatedNumber: {
- prototype: SVGAnimatedNumber;
- new(): SVGAnimatedNumber;
-}
-
-interface SVGAnimatedNumberList {
- readonly animVal: SVGNumberList;
- readonly baseVal: SVGNumberList;
-}
-
-declare var SVGAnimatedNumberList: {
- prototype: SVGAnimatedNumberList;
- new(): SVGAnimatedNumberList;
-}
-
-interface SVGAnimatedPreserveAspectRatio {
- readonly animVal: SVGPreserveAspectRatio;
- readonly baseVal: SVGPreserveAspectRatio;
-}
-
-declare var SVGAnimatedPreserveAspectRatio: {
- prototype: SVGAnimatedPreserveAspectRatio;
- new(): SVGAnimatedPreserveAspectRatio;
-}
-
-interface SVGAnimatedRect {
- readonly animVal: SVGRect;
- readonly baseVal: SVGRect;
-}
-
-declare var SVGAnimatedRect: {
- prototype: SVGAnimatedRect;
- new(): SVGAnimatedRect;
-}
-
-interface SVGAnimatedString {
- readonly animVal: string;
- baseVal: string;
-}
-
-declare var SVGAnimatedString: {
- prototype: SVGAnimatedString;
- new(): SVGAnimatedString;
-}
-
-interface SVGAnimatedTransformList {
- readonly animVal: SVGTransformList;
- readonly baseVal: SVGTransformList;
-}
-
-declare var SVGAnimatedTransformList: {
- prototype: SVGAnimatedTransformList;
- new(): SVGAnimatedTransformList;
-}
-
-interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGCircleElement: {
- prototype: SVGCircleElement;
- new(): SVGCircleElement;
-}
-
-interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly clipPathUnits: SVGAnimatedEnumeration;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGClipPathElement: {
- prototype: SVGClipPathElement;
- new(): SVGClipPathElement;
-}
-
-interface SVGComponentTransferFunctionElement extends SVGElement {
- readonly amplitude: SVGAnimatedNumber;
- readonly exponent: SVGAnimatedNumber;
- readonly intercept: SVGAnimatedNumber;
- readonly offset: SVGAnimatedNumber;
- readonly slope: SVGAnimatedNumber;
- readonly tableValues: SVGAnimatedNumberList;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGComponentTransferFunctionElement: {
- prototype: SVGComponentTransferFunctionElement;
- new(): SVGComponentTransferFunctionElement;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
-}
-
-interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDefsElement: {
- prototype: SVGDefsElement;
- new(): SVGDefsElement;
-}
-
-interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGDescElement: {
- prototype: SVGDescElement;
- new(): SVGDescElement;
-}
-
-interface SVGElementEventMap extends ElementEventMap {
- "click": MouseEvent;
- "dblclick": MouseEvent;
- "focusin": FocusEvent;
- "focusout": FocusEvent;
- "load": Event;
- "mousedown": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
-}
-
-interface SVGElement extends Element {
- onclick: (this: SVGElement, ev: MouseEvent) => any;
- ondblclick: (this: SVGElement, ev: MouseEvent) => any;
- onfocusin: (this: SVGElement, ev: FocusEvent) => any;
- onfocusout: (this: SVGElement, ev: FocusEvent) => any;
- onload: (this: SVGElement, ev: Event) => any;
- onmousedown: (this: SVGElement, ev: MouseEvent) => any;
- onmousemove: (this: SVGElement, ev: MouseEvent) => any;
- onmouseout: (this: SVGElement, ev: MouseEvent) => any;
- onmouseover: (this: SVGElement, ev: MouseEvent) => any;
- onmouseup: (this: SVGElement, ev: MouseEvent) => any;
- readonly ownerSVGElement: SVGSVGElement;
- readonly viewportElement: SVGElement;
- xmlbase: string;
- className: any;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGElement: {
- prototype: SVGElement;
- new(): SVGElement;
-}
-
-interface SVGElementInstance extends EventTarget {
- readonly childNodes: SVGElementInstanceList;
- readonly correspondingElement: SVGElement;
- readonly correspondingUseElement: SVGUseElement;
- readonly firstChild: SVGElementInstance;
- readonly lastChild: SVGElementInstance;
- readonly nextSibling: SVGElementInstance;
- readonly parentNode: SVGElementInstance;
- readonly previousSibling: SVGElementInstance;
-}
-
-declare var SVGElementInstance: {
- prototype: SVGElementInstance;
- new(): SVGElementInstance;
-}
-
-interface SVGElementInstanceList {
- readonly length: number;
- item(index: number): SVGElementInstance;
-}
-
-declare var SVGElementInstanceList: {
- prototype: SVGElementInstanceList;
- new(): SVGElementInstanceList;
-}
-
-interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGEllipseElement: {
- prototype: SVGEllipseElement;
- new(): SVGEllipseElement;
-}
-
-interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly mode: SVGAnimatedEnumeration;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEBlendElement: {
- prototype: SVGFEBlendElement;
- new(): SVGFEBlendElement;
- readonly SVG_FEBLEND_MODE_COLOR: number;
- readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
- readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
- readonly SVG_FEBLEND_MODE_DARKEN: number;
- readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
- readonly SVG_FEBLEND_MODE_EXCLUSION: number;
- readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
- readonly SVG_FEBLEND_MODE_HUE: number;
- readonly SVG_FEBLEND_MODE_LIGHTEN: number;
- readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
- readonly SVG_FEBLEND_MODE_MULTIPLY: number;
- readonly SVG_FEBLEND_MODE_NORMAL: number;
- readonly SVG_FEBLEND_MODE_OVERLAY: number;
- readonly SVG_FEBLEND_MODE_SATURATION: number;
- readonly SVG_FEBLEND_MODE_SCREEN: number;
- readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- readonly SVG_FEBLEND_MODE_UNKNOWN: number;
-}
-
-interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly type: SVGAnimatedEnumeration;
- readonly values: SVGAnimatedNumberList;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEColorMatrixElement: {
- prototype: SVGFEColorMatrixElement;
- new(): SVGFEColorMatrixElement;
- readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
-}
-
-interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEComponentTransferElement: {
- prototype: SVGFEComponentTransferElement;
- new(): SVGFEComponentTransferElement;
-}
-
-interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly k1: SVGAnimatedNumber;
- readonly k2: SVGAnimatedNumber;
- readonly k3: SVGAnimatedNumber;
- readonly k4: SVGAnimatedNumber;
- readonly operator: SVGAnimatedEnumeration;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFECompositeElement: {
- prototype: SVGFECompositeElement;
- new(): SVGFECompositeElement;
- readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
- readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
- readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
-}
-
-interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly bias: SVGAnimatedNumber;
- readonly divisor: SVGAnimatedNumber;
- readonly edgeMode: SVGAnimatedEnumeration;
- readonly in1: SVGAnimatedString;
- readonly kernelMatrix: SVGAnimatedNumberList;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly orderX: SVGAnimatedInteger;
- readonly orderY: SVGAnimatedInteger;
- readonly preserveAlpha: SVGAnimatedBoolean;
- readonly targetX: SVGAnimatedInteger;
- readonly targetY: SVGAnimatedInteger;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEConvolveMatrixElement: {
- prototype: SVGFEConvolveMatrixElement;
- new(): SVGFEConvolveMatrixElement;
- readonly SVG_EDGEMODE_DUPLICATE: number;
- readonly SVG_EDGEMODE_NONE: number;
- readonly SVG_EDGEMODE_UNKNOWN: number;
- readonly SVG_EDGEMODE_WRAP: number;
-}
-
-interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly diffuseConstant: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDiffuseLightingElement: {
- prototype: SVGFEDiffuseLightingElement;
- new(): SVGFEDiffuseLightingElement;
-}
-
-interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly in2: SVGAnimatedString;
- readonly scale: SVGAnimatedNumber;
- readonly xChannelSelector: SVGAnimatedEnumeration;
- readonly yChannelSelector: SVGAnimatedEnumeration;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDisplacementMapElement: {
- prototype: SVGFEDisplacementMapElement;
- new(): SVGFEDisplacementMapElement;
- readonly SVG_CHANNEL_A: number;
- readonly SVG_CHANNEL_B: number;
- readonly SVG_CHANNEL_G: number;
- readonly SVG_CHANNEL_R: number;
- readonly SVG_CHANNEL_UNKNOWN: number;
-}
-
-interface SVGFEDistantLightElement extends SVGElement {
- readonly azimuth: SVGAnimatedNumber;
- readonly elevation: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEDistantLightElement: {
- prototype: SVGFEDistantLightElement;
- new(): SVGFEDistantLightElement;
-}
-
-interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEFloodElement: {
- prototype: SVGFEFloodElement;
- new(): SVGFEFloodElement;
-}
-
-interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncAElement: {
- prototype: SVGFEFuncAElement;
- new(): SVGFEFuncAElement;
-}
-
-interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncBElement: {
- prototype: SVGFEFuncBElement;
- new(): SVGFEFuncBElement;
-}
-
-interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncGElement: {
- prototype: SVGFEFuncGElement;
- new(): SVGFEFuncGElement;
-}
-
-interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
-}
-
-declare var SVGFEFuncRElement: {
- prototype: SVGFEFuncRElement;
- new(): SVGFEFuncRElement;
-}
-
-interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly stdDeviationX: SVGAnimatedNumber;
- readonly stdDeviationY: SVGAnimatedNumber;
- setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEGaussianBlurElement: {
- prototype: SVGFEGaussianBlurElement;
- new(): SVGFEGaussianBlurElement;
-}
-
-interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEImageElement: {
- prototype: SVGFEImageElement;
- new(): SVGFEImageElement;
-}
-
-interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeElement: {
- prototype: SVGFEMergeElement;
- new(): SVGFEMergeElement;
-}
-
-interface SVGFEMergeNodeElement extends SVGElement {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMergeNodeElement: {
- prototype: SVGFEMergeNodeElement;
- new(): SVGFEMergeNodeElement;
-}
-
-interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly operator: SVGAnimatedEnumeration;
- readonly radiusX: SVGAnimatedNumber;
- readonly radiusY: SVGAnimatedNumber;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEMorphologyElement: {
- prototype: SVGFEMorphologyElement;
- new(): SVGFEMorphologyElement;
- readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
-}
-
-interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly dx: SVGAnimatedNumber;
- readonly dy: SVGAnimatedNumber;
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEOffsetElement: {
- prototype: SVGFEOffsetElement;
- new(): SVGFEOffsetElement;
-}
-
-interface SVGFEPointLightElement extends SVGElement {
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFEPointLightElement: {
- prototype: SVGFEPointLightElement;
- new(): SVGFEPointLightElement;
-}
-
-interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- readonly kernelUnitLengthX: SVGAnimatedNumber;
- readonly kernelUnitLengthY: SVGAnimatedNumber;
- readonly specularConstant: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly surfaceScale: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpecularLightingElement: {
- prototype: SVGFESpecularLightingElement;
- new(): SVGFESpecularLightingElement;
-}
-
-interface SVGFESpotLightElement extends SVGElement {
- readonly limitingConeAngle: SVGAnimatedNumber;
- readonly pointsAtX: SVGAnimatedNumber;
- readonly pointsAtY: SVGAnimatedNumber;
- readonly pointsAtZ: SVGAnimatedNumber;
- readonly specularExponent: SVGAnimatedNumber;
- readonly x: SVGAnimatedNumber;
- readonly y: SVGAnimatedNumber;
- readonly z: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFESpotLightElement: {
- prototype: SVGFESpotLightElement;
- new(): SVGFESpotLightElement;
-}
-
-interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly in1: SVGAnimatedString;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETileElement: {
- prototype: SVGFETileElement;
- new(): SVGFETileElement;
-}
-
-interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- readonly baseFrequencyX: SVGAnimatedNumber;
- readonly baseFrequencyY: SVGAnimatedNumber;
- readonly numOctaves: SVGAnimatedInteger;
- readonly seed: SVGAnimatedNumber;
- readonly stitchTiles: SVGAnimatedEnumeration;
- readonly type: SVGAnimatedEnumeration;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFETurbulenceElement: {
- prototype: SVGFETurbulenceElement;
- new(): SVGFETurbulenceElement;
- readonly SVG_STITCHTYPE_NOSTITCH: number;
- readonly SVG_STITCHTYPE_STITCH: number;
- readonly SVG_STITCHTYPE_UNKNOWN: number;
- readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
- readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
-}
-
-interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- readonly filterResX: SVGAnimatedInteger;
- readonly filterResY: SVGAnimatedInteger;
- readonly filterUnits: SVGAnimatedEnumeration;
- readonly height: SVGAnimatedLength;
- readonly primitiveUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- setFilterRes(filterResX: number, filterResY: number): void;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGFilterElement: {
- prototype: SVGFilterElement;
- new(): SVGFilterElement;
-}
-
-interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGForeignObjectElement: {
- prototype: SVGForeignObjectElement;
- new(): SVGForeignObjectElement;
-}
-
-interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGElement: {
- prototype: SVGGElement;
- new(): SVGGElement;
-}
-
-interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
- readonly gradientTransform: SVGAnimatedTransformList;
- readonly gradientUnits: SVGAnimatedEnumeration;
- readonly spreadMethod: SVGAnimatedEnumeration;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGGradientElement: {
- prototype: SVGGradientElement;
- new(): SVGGradientElement;
- readonly SVG_SPREADMETHOD_PAD: number;
- readonly SVG_SPREADMETHOD_REFLECT: number;
- readonly SVG_SPREADMETHOD_REPEAT: number;
- readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
-
-interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly height: SVGAnimatedLength;
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGImageElement: {
- prototype: SVGImageElement;
- new(): SVGImageElement;
-}
-
-interface SVGLength {
- readonly unitType: number;
- value: number;
- valueAsString: string;
- valueInSpecifiedUnits: number;
- convertToSpecifiedUnits(unitType: number): void;
- newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-declare var SVGLength: {
- prototype: SVGLength;
- new(): SVGLength;
- readonly SVG_LENGTHTYPE_CM: number;
- readonly SVG_LENGTHTYPE_EMS: number;
- readonly SVG_LENGTHTYPE_EXS: number;
- readonly SVG_LENGTHTYPE_IN: number;
- readonly SVG_LENGTHTYPE_MM: number;
- readonly SVG_LENGTHTYPE_NUMBER: number;
- readonly SVG_LENGTHTYPE_PC: number;
- readonly SVG_LENGTHTYPE_PERCENTAGE: number;
- readonly SVG_LENGTHTYPE_PT: number;
- readonly SVG_LENGTHTYPE_PX: number;
- readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
-
-interface SVGLengthList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGLength): SVGLength;
- clear(): void;
- getItem(index: number): SVGLength;
- initialize(newItem: SVGLength): SVGLength;
- insertItemBefore(newItem: SVGLength, index: number): SVGLength;
- removeItem(index: number): SVGLength;
- replaceItem(newItem: SVGLength, index: number): SVGLength;
-}
-
-declare var SVGLengthList: {
- prototype: SVGLengthList;
- new(): SVGLengthList;
-}
-
-interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
-
-interface SVGLinearGradientElement extends SVGGradientElement {
- readonly x1: SVGAnimatedLength;
- readonly x2: SVGAnimatedLength;
- readonly y1: SVGAnimatedLength;
- readonly y2: SVGAnimatedLength;
-}
-
-declare var SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
-
-interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- readonly markerHeight: SVGAnimatedLength;
- readonly markerUnits: SVGAnimatedEnumeration;
- readonly markerWidth: SVGAnimatedLength;
- readonly orientAngle: SVGAnimatedAngle;
- readonly orientType: SVGAnimatedEnumeration;
- readonly refX: SVGAnimatedLength;
- readonly refY: SVGAnimatedLength;
- setOrientToAngle(angle: SVGAngle): void;
- setOrientToAuto(): void;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMarkerElement: {
- prototype: SVGMarkerElement;
- new(): SVGMarkerElement;
- readonly SVG_MARKERUNITS_STROKEWIDTH: number;
- readonly SVG_MARKERUNITS_UNKNOWN: number;
- readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
- readonly SVG_MARKER_ORIENT_ANGLE: number;
- readonly SVG_MARKER_ORIENT_AUTO: number;
- readonly SVG_MARKER_ORIENT_UNKNOWN: number;
-}
-
-interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly maskContentUnits: SVGAnimatedEnumeration;
- readonly maskUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMaskElement: {
- prototype: SVGMaskElement;
- new(): SVGMaskElement;
-}
-
-interface SVGMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- flipX(): SVGMatrix;
- flipY(): SVGMatrix;
- inverse(): SVGMatrix;
- multiply(secondMatrix: SVGMatrix): SVGMatrix;
- rotate(angle: number): SVGMatrix;
- rotateFromVector(x: number, y: number): SVGMatrix;
- scale(scaleFactor: number): SVGMatrix;
- scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
- skewX(angle: number): SVGMatrix;
- skewY(angle: number): SVGMatrix;
- translate(x: number, y: number): SVGMatrix;
-}
-
-declare var SVGMatrix: {
- prototype: SVGMatrix;
- new(): SVGMatrix;
-}
-
-interface SVGMetadataElement extends SVGElement {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGMetadataElement: {
- prototype: SVGMetadataElement;
- new(): SVGMetadataElement;
-}
-
-interface SVGNumber {
- value: number;
-}
-
-declare var SVGNumber: {
- prototype: SVGNumber;
- new(): SVGNumber;
-}
-
-interface SVGNumberList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGNumber): SVGNumber;
- clear(): void;
- getItem(index: number): SVGNumber;
- initialize(newItem: SVGNumber): SVGNumber;
- insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
- removeItem(index: number): SVGNumber;
- replaceItem(newItem: SVGNumber, index: number): SVGNumber;
-}
-
-declare var SVGNumberList: {
- prototype: SVGNumberList;
- new(): SVGNumberList;
-}
-
-interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {
- createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
- createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
- createSVGPathSegClosePath(): SVGPathSegClosePath;
- createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
- createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
- createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
- createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
- createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
- createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
- createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
- createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
- createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
- createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
- createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
- createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
- createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
- createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
- createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
- createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
- getPathSegAtLength(distance: number): number;
- getPointAtLength(distance: number): SVGPoint;
- getTotalLength(): number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPathElement: {
- prototype: SVGPathElement;
- new(): SVGPathElement;
-}
-
-interface SVGPathSeg {
- readonly pathSegType: number;
- readonly pathSegTypeAsLetter: string;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-declare var SVGPathSeg: {
- prototype: SVGPathSeg;
- new(): SVGPathSeg;
- readonly PATHSEG_ARC_ABS: number;
- readonly PATHSEG_ARC_REL: number;
- readonly PATHSEG_CLOSEPATH: number;
- readonly PATHSEG_CURVETO_CUBIC_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_REL: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- readonly PATHSEG_LINETO_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
- readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
- readonly PATHSEG_LINETO_REL: number;
- readonly PATHSEG_LINETO_VERTICAL_ABS: number;
- readonly PATHSEG_LINETO_VERTICAL_REL: number;
- readonly PATHSEG_MOVETO_ABS: number;
- readonly PATHSEG_MOVETO_REL: number;
- readonly PATHSEG_UNKNOWN: number;
-}
-
-interface SVGPathSegArcAbs extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcAbs: {
- prototype: SVGPathSegArcAbs;
- new(): SVGPathSegArcAbs;
-}
-
-interface SVGPathSegArcRel extends SVGPathSeg {
- angle: number;
- largeArcFlag: boolean;
- r1: number;
- r2: number;
- sweepFlag: boolean;
- x: number;
- y: number;
-}
-
-declare var SVGPathSegArcRel: {
- prototype: SVGPathSegArcRel;
- new(): SVGPathSegArcRel;
-}
-
-interface SVGPathSegClosePath extends SVGPathSeg {
-}
-
-declare var SVGPathSegClosePath: {
- prototype: SVGPathSegClosePath;
- new(): SVGPathSegClosePath;
-}
-
-interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicAbs: {
- prototype: SVGPathSegCurvetoCubicAbs;
- new(): SVGPathSegCurvetoCubicAbs;
-}
-
-interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
- x: number;
- x1: number;
- x2: number;
- y: number;
- y1: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicRel: {
- prototype: SVGPathSegCurvetoCubicRel;
- new(): SVGPathSegCurvetoCubicRel;
-}
-
-interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothAbs: {
- prototype: SVGPathSegCurvetoCubicSmoothAbs;
- new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
-
-interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
- x: number;
- x2: number;
- y: number;
- y2: number;
-}
-
-declare var SVGPathSegCurvetoCubicSmoothRel: {
- prototype: SVGPathSegCurvetoCubicSmoothRel;
- new(): SVGPathSegCurvetoCubicSmoothRel;
-}
-
-interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticAbs: {
- prototype: SVGPathSegCurvetoQuadraticAbs;
- new(): SVGPathSegCurvetoQuadraticAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
- x: number;
- x1: number;
- y: number;
- y1: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticRel: {
- prototype: SVGPathSegCurvetoQuadraticRel;
- new(): SVGPathSegCurvetoQuadraticRel;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
- prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
- new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
-
-interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegCurvetoQuadraticSmoothRel: {
- prototype: SVGPathSegCurvetoQuadraticSmoothRel;
- new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
-
-interface SVGPathSegLinetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoAbs: {
- prototype: SVGPathSegLinetoAbs;
- new(): SVGPathSegLinetoAbs;
-}
-
-interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalAbs: {
- prototype: SVGPathSegLinetoHorizontalAbs;
- new(): SVGPathSegLinetoHorizontalAbs;
-}
-
-interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
- x: number;
-}
-
-declare var SVGPathSegLinetoHorizontalRel: {
- prototype: SVGPathSegLinetoHorizontalRel;
- new(): SVGPathSegLinetoHorizontalRel;
-}
-
-interface SVGPathSegLinetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegLinetoRel: {
- prototype: SVGPathSegLinetoRel;
- new(): SVGPathSegLinetoRel;
-}
-
-interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalAbs: {
- prototype: SVGPathSegLinetoVerticalAbs;
- new(): SVGPathSegLinetoVerticalAbs;
-}
-
-interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
- y: number;
-}
-
-declare var SVGPathSegLinetoVerticalRel: {
- prototype: SVGPathSegLinetoVerticalRel;
- new(): SVGPathSegLinetoVerticalRel;
-}
-
-interface SVGPathSegList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPathSeg): SVGPathSeg;
- clear(): void;
- getItem(index: number): SVGPathSeg;
- initialize(newItem: SVGPathSeg): SVGPathSeg;
- insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
- removeItem(index: number): SVGPathSeg;
- replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
-}
-
-declare var SVGPathSegList: {
- prototype: SVGPathSegList;
- new(): SVGPathSegList;
-}
-
-interface SVGPathSegMovetoAbs extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoAbs: {
- prototype: SVGPathSegMovetoAbs;
- new(): SVGPathSegMovetoAbs;
-}
-
-interface SVGPathSegMovetoRel extends SVGPathSeg {
- x: number;
- y: number;
-}
-
-declare var SVGPathSegMovetoRel: {
- prototype: SVGPathSegMovetoRel;
- new(): SVGPathSegMovetoRel;
-}
-
-interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
- readonly height: SVGAnimatedLength;
- readonly patternContentUnits: SVGAnimatedEnumeration;
- readonly patternTransform: SVGAnimatedTransformList;
- readonly patternUnits: SVGAnimatedEnumeration;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPatternElement: {
- prototype: SVGPatternElement;
- new(): SVGPatternElement;
-}
-
-interface SVGPoint {
- x: number;
- y: number;
- matrixTransform(matrix: SVGMatrix): SVGPoint;
-}
-
-declare var SVGPoint: {
- prototype: SVGPoint;
- new(): SVGPoint;
-}
-
-interface SVGPointList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGPoint): SVGPoint;
- clear(): void;
- getItem(index: number): SVGPoint;
- initialize(newItem: SVGPoint): SVGPoint;
- insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
- removeItem(index: number): SVGPoint;
- replaceItem(newItem: SVGPoint, index: number): SVGPoint;
-}
-
-declare var SVGPointList: {
- prototype: SVGPointList;
- new(): SVGPointList;
-}
-
-interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolygonElement: {
- prototype: SVGPolygonElement;
- new(): SVGPolygonElement;
-}
-
-interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGPolylineElement: {
- prototype: SVGPolylineElement;
- new(): SVGPolylineElement;
-}
-
-interface SVGPreserveAspectRatio {
- align: number;
- meetOrSlice: number;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-declare var SVGPreserveAspectRatio: {
- prototype: SVGPreserveAspectRatio;
- new(): SVGPreserveAspectRatio;
- readonly SVG_MEETORSLICE_MEET: number;
- readonly SVG_MEETORSLICE_SLICE: number;
- readonly SVG_MEETORSLICE_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_NONE: number;
- readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
-
-interface SVGRadialGradientElement extends SVGGradientElement {
- readonly cx: SVGAnimatedLength;
- readonly cy: SVGAnimatedLength;
- readonly fx: SVGAnimatedLength;
- readonly fy: SVGAnimatedLength;
- readonly r: SVGAnimatedLength;
-}
-
-declare var SVGRadialGradientElement: {
- prototype: SVGRadialGradientElement;
- new(): SVGRadialGradientElement;
-}
-
-interface SVGRect {
- height: number;
- width: number;
- x: number;
- y: number;
-}
-
-declare var SVGRect: {
- prototype: SVGRect;
- new(): SVGRect;
-}
-
-interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly height: SVGAnimatedLength;
- readonly rx: SVGAnimatedLength;
- readonly ry: SVGAnimatedLength;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGRectElement: {
- prototype: SVGRectElement;
- new(): SVGRectElement;
-}
-
-interface SVGSVGElementEventMap extends SVGElementEventMap {
- "SVGAbort": Event;
- "SVGError": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "SVGUnload": Event;
- "SVGZoom": SVGZoomEvent;
-}
-
-interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- contentScriptType: string;
- contentStyleType: string;
- currentScale: number;
- readonly currentTranslate: SVGPoint;
- readonly height: SVGAnimatedLength;
- onabort: (this: SVGSVGElement, ev: Event) => any;
- onerror: (this: SVGSVGElement, ev: Event) => any;
- onresize: (this: SVGSVGElement, ev: UIEvent) => any;
- onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
- onunload: (this: SVGSVGElement, ev: Event) => any;
- onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
- readonly pixelUnitToMillimeterX: number;
- readonly pixelUnitToMillimeterY: number;
- readonly screenPixelToMillimeterX: number;
- readonly screenPixelToMillimeterY: number;
- readonly viewport: SVGRect;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
- checkIntersection(element: SVGElement, rect: SVGRect): boolean;
- createSVGAngle(): SVGAngle;
- createSVGLength(): SVGLength;
- createSVGMatrix(): SVGMatrix;
- createSVGNumber(): SVGNumber;
- createSVGPoint(): SVGPoint;
- createSVGRect(): SVGRect;
- createSVGTransform(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- deselectAll(): void;
- forceRedraw(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getCurrentTime(): number;
- getElementById(elementId: string): Element;
- getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
- pauseAnimations(): void;
- setCurrentTime(seconds: number): void;
- suspendRedraw(maxWaitMilliseconds: number): number;
- unpauseAnimations(): void;
- unsuspendRedraw(suspendHandleID: number): void;
- unsuspendRedrawAll(): void;
- addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSVGElement: {
- prototype: SVGSVGElement;
- new(): SVGSVGElement;
-}
-
-interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGScriptElement: {
- prototype: SVGScriptElement;
- new(): SVGScriptElement;
-}
-
-interface SVGStopElement extends SVGElement, SVGStylable {
- readonly offset: SVGAnimatedNumber;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStopElement: {
- prototype: SVGStopElement;
- new(): SVGStopElement;
-}
-
-interface SVGStringList {
- readonly numberOfItems: number;
- appendItem(newItem: string): string;
- clear(): void;
- getItem(index: number): string;
- initialize(newItem: string): string;
- insertItemBefore(newItem: string, index: number): string;
- removeItem(index: number): string;
- replaceItem(newItem: string, index: number): string;
-}
-
-declare var SVGStringList: {
- prototype: SVGStringList;
- new(): SVGStringList;
-}
-
-interface SVGStyleElement extends SVGElement, SVGLangSpace {
- disabled: boolean;
- media: string;
- title: string;
- type: string;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGStyleElement: {
- prototype: SVGStyleElement;
- new(): SVGStyleElement;
-}
-
-interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSwitchElement: {
- prototype: SVGSwitchElement;
- new(): SVGSwitchElement;
-}
-
-interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGSymbolElement: {
- prototype: SVGSymbolElement;
- new(): SVGSymbolElement;
-}
-
-interface SVGTSpanElement extends SVGTextPositioningElement {
-}
-
-declare var SVGTSpanElement: {
- prototype: SVGTSpanElement;
- new(): SVGTSpanElement;
-}
-
-interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- readonly lengthAdjust: SVGAnimatedEnumeration;
- readonly textLength: SVGAnimatedLength;
- getCharNumAtPosition(point: SVGPoint): number;
- getComputedTextLength(): number;
- getEndPositionOfChar(charnum: number): SVGPoint;
- getExtentOfChar(charnum: number): SVGRect;
- getNumberOfChars(): number;
- getRotationOfChar(charnum: number): number;
- getStartPositionOfChar(charnum: number): SVGPoint;
- getSubStringLength(charnum: number, nchars: number): number;
- selectSubString(charnum: number, nchars: number): void;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTextContentElement: {
- prototype: SVGTextContentElement;
- new(): SVGTextContentElement;
- readonly LENGTHADJUST_SPACING: number;
- readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
- readonly LENGTHADJUST_UNKNOWN: number;
-}
-
-interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
-}
-
-declare var SVGTextElement: {
- prototype: SVGTextElement;
- new(): SVGTextElement;
-}
-
-interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
- readonly method: SVGAnimatedEnumeration;
- readonly spacing: SVGAnimatedEnumeration;
- readonly startOffset: SVGAnimatedLength;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-declare var SVGTextPathElement: {
- prototype: SVGTextPathElement;
- new(): SVGTextPathElement;
- readonly TEXTPATH_METHODTYPE_ALIGN: number;
- readonly TEXTPATH_METHODTYPE_STRETCH: number;
- readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
- readonly TEXTPATH_SPACINGTYPE_AUTO: number;
- readonly TEXTPATH_SPACINGTYPE_EXACT: number;
- readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
-
-interface SVGTextPositioningElement extends SVGTextContentElement {
- readonly dx: SVGAnimatedLengthList;
- readonly dy: SVGAnimatedLengthList;
- readonly rotate: SVGAnimatedNumberList;
- readonly x: SVGAnimatedLengthList;
- readonly y: SVGAnimatedLengthList;
-}
-
-declare var SVGTextPositioningElement: {
- prototype: SVGTextPositioningElement;
- new(): SVGTextPositioningElement;
-}
-
-interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGTitleElement: {
- prototype: SVGTitleElement;
- new(): SVGTitleElement;
-}
-
-interface SVGTransform {
- readonly angle: number;
- readonly matrix: SVGMatrix;
- readonly type: number;
- setMatrix(matrix: SVGMatrix): void;
- setRotate(angle: number, cx: number, cy: number): void;
- setScale(sx: number, sy: number): void;
- setSkewX(angle: number): void;
- setSkewY(angle: number): void;
- setTranslate(tx: number, ty: number): void;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-declare var SVGTransform: {
- prototype: SVGTransform;
- new(): SVGTransform;
- readonly SVG_TRANSFORM_MATRIX: number;
- readonly SVG_TRANSFORM_ROTATE: number;
- readonly SVG_TRANSFORM_SCALE: number;
- readonly SVG_TRANSFORM_SKEWX: number;
- readonly SVG_TRANSFORM_SKEWY: number;
- readonly SVG_TRANSFORM_TRANSLATE: number;
- readonly SVG_TRANSFORM_UNKNOWN: number;
-}
-
-interface SVGTransformList {
- readonly numberOfItems: number;
- appendItem(newItem: SVGTransform): SVGTransform;
- clear(): void;
- consolidate(): SVGTransform;
- createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
- getItem(index: number): SVGTransform;
- initialize(newItem: SVGTransform): SVGTransform;
- insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
- removeItem(index: number): SVGTransform;
- replaceItem(newItem: SVGTransform, index: number): SVGTransform;
-}
-
-declare var SVGTransformList: {
- prototype: SVGTransformList;
- new(): SVGTransformList;
-}
-
-interface SVGUnitTypes {
- readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
- readonly SVG_UNIT_TYPE_UNKNOWN: number;
- readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
-}
-declare var SVGUnitTypes: SVGUnitTypes;
-
-interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- readonly animatedInstanceRoot: SVGElementInstance;
- readonly height: SVGAnimatedLength;
- readonly instanceRoot: SVGElementInstance;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGUseElement: {
- prototype: SVGUseElement;
- new(): SVGUseElement;
-}
-
-interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- readonly viewTarget: SVGStringList;
- addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var SVGViewElement: {
- prototype: SVGViewElement;
- new(): SVGViewElement;
-}
-
-interface SVGZoomAndPan {
- readonly zoomAndPan: number;
-}
-
-declare var SVGZoomAndPan: {
- readonly SVG_ZOOMANDPAN_DISABLE: number;
- readonly SVG_ZOOMANDPAN_MAGNIFY: number;
- readonly SVG_ZOOMANDPAN_UNKNOWN: number;
-}
-
-interface SVGZoomEvent extends UIEvent {
- readonly newScale: number;
- readonly newTranslate: SVGPoint;
- readonly previousScale: number;
- readonly previousTranslate: SVGPoint;
- readonly zoomRectScreen: SVGRect;
-}
-
-declare var SVGZoomEvent: {
- prototype: SVGZoomEvent;
- new(): SVGZoomEvent;
-}
-
-interface ScreenEventMap {
- "MSOrientationChange": Event;
-}
-
-interface Screen extends EventTarget {
- readonly availHeight: number;
- readonly availWidth: number;
- bufferDepth: number;
- readonly colorDepth: number;
- readonly deviceXDPI: number;
- readonly deviceYDPI: number;
- readonly fontSmoothingEnabled: boolean;
- readonly height: number;
- readonly logicalXDPI: number;
- readonly logicalYDPI: number;
- readonly msOrientation: string;
- onmsorientationchange: (this: Screen, ev: Event) => any;
- readonly pixelDepth: number;
- readonly systemXDPI: number;
- readonly systemYDPI: number;
- readonly width: number;
- msLockOrientation(orientations: string | string[]): boolean;
- msUnlockOrientation(): void;
- addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Screen: {
- prototype: Screen;
- new(): Screen;
-}
-
-interface ScriptNotifyEvent extends Event {
- readonly callingUri: string;
- readonly value: string;
-}
-
-declare var ScriptNotifyEvent: {
- prototype: ScriptNotifyEvent;
- new(): ScriptNotifyEvent;
-}
-
-interface ScriptProcessorNodeEventMap {
- "audioprocess": AudioProcessingEvent;
-}
-
-interface ScriptProcessorNode extends AudioNode {
- readonly bufferSize: number;
- onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
- addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var ScriptProcessorNode: {
- prototype: ScriptProcessorNode;
- new(): ScriptProcessorNode;
-}
-
-interface Selection {
- readonly anchorNode: Node;
- readonly anchorOffset: number;
- readonly focusNode: Node;
- readonly focusOffset: number;
- readonly isCollapsed: boolean;
- readonly rangeCount: number;
- readonly type: string;
- addRange(range: Range): void;
- collapse(parentNode: Node, offset: number): void;
- collapseToEnd(): void;
- collapseToStart(): void;
- containsNode(node: Node, partlyContained: boolean): boolean;
- deleteFromDocument(): void;
- empty(): void;
- extend(newNode: Node, offset: number): void;
- getRangeAt(index: number): Range;
- removeAllRanges(): void;
- removeRange(range: Range): void;
- selectAllChildren(parentNode: Node): void;
- setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
- toString(): string;
-}
-
-declare var Selection: {
- prototype: Selection;
- new(): Selection;
-}
-
-interface SourceBuffer extends EventTarget {
- appendWindowEnd: number;
- appendWindowStart: number;
- readonly audioTracks: AudioTrackList;
- readonly buffered: TimeRanges;
- mode: string;
- timestampOffset: number;
- readonly updating: boolean;
- readonly videoTracks: VideoTrackList;
- abort(): void;
- appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
- appendStream(stream: MSStream, maxSize?: number): void;
- remove(start: number, end: number): void;
-}
-
-declare var SourceBuffer: {
- prototype: SourceBuffer;
- new(): SourceBuffer;
-}
-
-interface SourceBufferList extends EventTarget {
- readonly length: number;
- item(index: number): SourceBuffer;
- [index: number]: SourceBuffer;
-}
-
-declare var SourceBufferList: {
- prototype: SourceBufferList;
- new(): SourceBufferList;
-}
-
-interface StereoPannerNode extends AudioNode {
- readonly pan: AudioParam;
-}
-
-declare var StereoPannerNode: {
- prototype: StereoPannerNode;
- new(): StereoPannerNode;
-}
-
-interface Storage {
- readonly length: number;
- clear(): void;
- getItem(key: string): string | null;
- key(index: number): string | null;
- removeItem(key: string): void;
- setItem(key: string, data: string): void;
- [key: string]: any;
- [index: number]: string;
-}
-
-declare var Storage: {
- prototype: Storage;
- new(): Storage;
-}
-
-interface StorageEvent extends Event {
- readonly url: string;
- key?: string;
- oldValue?: string;
- newValue?: string;
- storageArea?: Storage;
-}
-
-declare var StorageEvent: {
- prototype: StorageEvent;
- new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
-}
-
-interface StyleMedia {
- readonly type: string;
- matchMedium(mediaquery: string): boolean;
-}
-
-declare var StyleMedia: {
- prototype: StyleMedia;
- new(): StyleMedia;
-}
-
-interface StyleSheet {
- disabled: boolean;
- readonly href: string;
- readonly media: MediaList;
- readonly ownerNode: Node;
- readonly parentStyleSheet: StyleSheet;
- readonly title: string;
- readonly type: string;
-}
-
-declare var StyleSheet: {
- prototype: StyleSheet;
- new(): StyleSheet;
-}
-
-interface StyleSheetList {
- readonly length: number;
- item(index?: number): StyleSheet;
- [index: number]: StyleSheet;
-}
-
-declare var StyleSheetList: {
- prototype: StyleSheetList;
- new(): StyleSheetList;
-}
-
-interface StyleSheetPageList {
- readonly length: number;
- item(index: number): CSSPageRule;
- [index: number]: CSSPageRule;
-}
-
-declare var StyleSheetPageList: {
- prototype: StyleSheetPageList;
- new(): StyleSheetPageList;
-}
-
-interface SubtleCrypto {
- decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
- deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
- encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
- exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
- exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
- generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
- generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
- generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
- unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
- verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
- wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
-}
-
-declare var SubtleCrypto: {
- prototype: SubtleCrypto;
- new(): SubtleCrypto;
-}
-
-interface Text extends CharacterData {
- readonly wholeText: string;
- readonly assignedSlot: HTMLSlotElement | null;
- splitText(offset: number): Text;
-}
-
-declare var Text: {
- prototype: Text;
- new(): Text;
-}
-
-interface TextEvent extends UIEvent {
- readonly data: string;
- readonly inputMethod: number;
- readonly locale: string;
- initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-declare var TextEvent: {
- prototype: TextEvent;
- new(): TextEvent;
- readonly DOM_INPUT_METHOD_DROP: number;
- readonly DOM_INPUT_METHOD_HANDWRITING: number;
- readonly DOM_INPUT_METHOD_IME: number;
- readonly DOM_INPUT_METHOD_KEYBOARD: number;
- readonly DOM_INPUT_METHOD_MULTIMODAL: number;
- readonly DOM_INPUT_METHOD_OPTION: number;
- readonly DOM_INPUT_METHOD_PASTE: number;
- readonly DOM_INPUT_METHOD_SCRIPT: number;
- readonly DOM_INPUT_METHOD_UNKNOWN: number;
- readonly DOM_INPUT_METHOD_VOICE: number;
-}
-
-interface TextMetrics {
- readonly width: number;
-}
-
-declare var TextMetrics: {
- prototype: TextMetrics;
- new(): TextMetrics;
-}
-
-interface TextTrackEventMap {
- "cuechange": Event;
- "error": ErrorEvent;
- "load": Event;
-}
-
-interface TextTrack extends EventTarget {
- readonly activeCues: TextTrackCueList;
- readonly cues: TextTrackCueList;
- readonly inBandMetadataTrackDispatchType: string;
- readonly kind: string;
- readonly label: string;
- readonly language: string;
- mode: any;
- oncuechange: (this: TextTrack, ev: Event) => any;
- onerror: (this: TextTrack, ev: ErrorEvent) => any;
- onload: (this: TextTrack, ev: Event) => any;
- readonly readyState: number;
- addCue(cue: TextTrackCue): void;
- removeCue(cue: TextTrackCue): void;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
- addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrack: {
- prototype: TextTrack;
- new(): TextTrack;
- readonly DISABLED: number;
- readonly ERROR: number;
- readonly HIDDEN: number;
- readonly LOADED: number;
- readonly LOADING: number;
- readonly NONE: number;
- readonly SHOWING: number;
-}
-
-interface TextTrackCueEventMap {
- "enter": Event;
- "exit": Event;
-}
-
-interface TextTrackCue extends EventTarget {
- endTime: number;
- id: string;
- onenter: (this: TextTrackCue, ev: Event) => any;
- onexit: (this: TextTrackCue, ev: Event) => any;
- pauseOnExit: boolean;
- startTime: number;
- text: string;
- readonly track: TextTrack;
- getCueAsHTML(): DocumentFragment;
- addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var TextTrackCue: {
- prototype: TextTrackCue;
- new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
-
-interface TextTrackCueList {
- readonly length: number;
- getCueById(id: string): TextTrackCue;
- item(index: number): TextTrackCue;
- [index: number]: TextTrackCue;
-}
-
-declare var TextTrackCueList: {
- prototype: TextTrackCueList;
- new(): TextTrackCueList;
-}
-
-interface TextTrackListEventMap {
- "addtrack": TrackEvent;
-}
-
-interface TextTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
- item(index: number): TextTrack;
- addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: TextTrack;
-}
-
-declare var TextTrackList: {
- prototype: TextTrackList;
- new(): TextTrackList;
-}
-
-interface TimeRanges {
- readonly length: number;
- end(index: number): number;
- start(index: number): number;
-}
-
-declare var TimeRanges: {
- prototype: TimeRanges;
- new(): TimeRanges;
-}
-
-interface Touch {
- readonly clientX: number;
- readonly clientY: number;
- readonly identifier: number;
- readonly pageX: number;
- readonly pageY: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly target: EventTarget;
-}
-
-declare var Touch: {
- prototype: Touch;
- new(): Touch;
-}
-
-interface TouchEvent extends UIEvent {
- readonly altKey: boolean;
- readonly changedTouches: TouchList;
- readonly ctrlKey: boolean;
- readonly metaKey: boolean;
- readonly shiftKey: boolean;
- readonly targetTouches: TouchList;
- readonly touches: TouchList;
-}
-
-declare var TouchEvent: {
- prototype: TouchEvent;
- new(): TouchEvent;
-}
-
-interface TouchList {
- readonly length: number;
- item(index: number): Touch | null;
- [index: number]: Touch;
-}
-
-declare var TouchList: {
- prototype: TouchList;
- new(): TouchList;
-}
-
-interface TrackEvent extends Event {
- readonly track: any;
-}
-
-declare var TrackEvent: {
- prototype: TrackEvent;
- new(): TrackEvent;
-}
-
-interface TransitionEvent extends Event {
- readonly elapsedTime: number;
- readonly propertyName: string;
- initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
-}
-
-declare var TransitionEvent: {
- prototype: TransitionEvent;
- new(): TransitionEvent;
-}
-
-interface TreeWalker {
- currentNode: Node;
- readonly expandEntityReferences: boolean;
- readonly filter: NodeFilter;
- readonly root: Node;
- readonly whatToShow: number;
- firstChild(): Node;
- lastChild(): Node;
- nextNode(): Node;
- nextSibling(): Node;
- parentNode(): Node;
- previousNode(): Node;
- previousSibling(): Node;
-}
-
-declare var TreeWalker: {
- prototype: TreeWalker;
- new(): TreeWalker;
-}
-
-interface UIEvent extends Event {
- readonly detail: number;
- readonly view: Window;
- initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
-}
-
-declare var UIEvent: {
- prototype: UIEvent;
- new(type: string, eventInitDict?: UIEventInit): UIEvent;
-}
-
-interface URL {
- hash: string;
- host: string;
- hostname: string;
- href: string;
- readonly origin: string;
- password: string;
- pathname: string;
- port: string;
- protocol: string;
- search: string;
- username: string;
- toString(): string;
-}
-
-declare var URL: {
- prototype: URL;
- new(url: string, base?: string): URL;
- createObjectURL(object: any, options?: ObjectURLOptions): string;
- revokeObjectURL(url: string): void;
-}
-
-interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
- readonly mediaType: string;
-}
-
-declare var UnviewableContentIdentifiedEvent: {
- prototype: UnviewableContentIdentifiedEvent;
- new(): UnviewableContentIdentifiedEvent;
-}
-
-interface ValidityState {
- readonly badInput: boolean;
- readonly customError: boolean;
- readonly patternMismatch: boolean;
- readonly rangeOverflow: boolean;
- readonly rangeUnderflow: boolean;
- readonly stepMismatch: boolean;
- readonly tooLong: boolean;
- readonly typeMismatch: boolean;
- readonly valid: boolean;
- readonly valueMissing: boolean;
-}
-
-declare var ValidityState: {
- prototype: ValidityState;
- new(): ValidityState;
-}
-
-interface VideoPlaybackQuality {
- readonly corruptedVideoFrames: number;
- readonly creationTime: number;
- readonly droppedVideoFrames: number;
- readonly totalFrameDelay: number;
- readonly totalVideoFrames: number;
-}
-
-declare var VideoPlaybackQuality: {
- prototype: VideoPlaybackQuality;
- new(): VideoPlaybackQuality;
-}
-
-interface VideoTrack {
- readonly id: string;
- kind: string;
- readonly label: string;
- language: string;
- selected: boolean;
- readonly sourceBuffer: SourceBuffer;
-}
-
-declare var VideoTrack: {
- prototype: VideoTrack;
- new(): VideoTrack;
-}
-
-interface VideoTrackListEventMap {
- "addtrack": TrackEvent;
- "change": Event;
- "removetrack": TrackEvent;
-}
-
-interface VideoTrackList extends EventTarget {
- readonly length: number;
- onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
- onchange: (this: VideoTrackList, ev: Event) => any;
- onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
- readonly selectedIndex: number;
- getTrackById(id: string): VideoTrack | null;
- item(index: number): VideoTrack;
- addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- [index: number]: VideoTrack;
-}
-
-declare var VideoTrackList: {
- prototype: VideoTrackList;
- new(): VideoTrackList;
-}
-
-interface WEBGL_compressed_texture_s3tc {
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-declare var WEBGL_compressed_texture_s3tc: {
- prototype: WEBGL_compressed_texture_s3tc;
- new(): WEBGL_compressed_texture_s3tc;
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
-}
-
-interface WEBGL_debug_renderer_info {
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-declare var WEBGL_debug_renderer_info: {
- prototype: WEBGL_debug_renderer_info;
- new(): WEBGL_debug_renderer_info;
- readonly UNMASKED_RENDERER_WEBGL: number;
- readonly UNMASKED_VENDOR_WEBGL: number;
-}
-
-interface WEBGL_depth_texture {
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-declare var WEBGL_depth_texture: {
- prototype: WEBGL_depth_texture;
- new(): WEBGL_depth_texture;
- readonly UNSIGNED_INT_24_8_WEBGL: number;
-}
-
-interface WaveShaperNode extends AudioNode {
- curve: Float32Array | null;
- oversample: string;
-}
-
-declare var WaveShaperNode: {
- prototype: WaveShaperNode;
- new(): WaveShaperNode;
-}
-
-interface WebGLActiveInfo {
- readonly name: string;
- readonly size: number;
- readonly type: number;
-}
-
-declare var WebGLActiveInfo: {
- prototype: WebGLActiveInfo;
- new(): WebGLActiveInfo;
-}
-
-interface WebGLBuffer extends WebGLObject {
-}
-
-declare var WebGLBuffer: {
- prototype: WebGLBuffer;
- new(): WebGLBuffer;
-}
-
-interface WebGLContextEvent extends Event {
- readonly statusMessage: string;
-}
-
-declare var WebGLContextEvent: {
- prototype: WebGLContextEvent;
- new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
-
-interface WebGLFramebuffer extends WebGLObject {
-}
-
-declare var WebGLFramebuffer: {
- prototype: WebGLFramebuffer;
- new(): WebGLFramebuffer;
-}
-
-interface WebGLObject {
-}
-
-declare var WebGLObject: {
- prototype: WebGLObject;
- new(): WebGLObject;
-}
-
-interface WebGLProgram extends WebGLObject {
-}
-
-declare var WebGLProgram: {
- prototype: WebGLProgram;
- new(): WebGLProgram;
-}
-
-interface WebGLRenderbuffer extends WebGLObject {
-}
-
-declare var WebGLRenderbuffer: {
- prototype: WebGLRenderbuffer;
- new(): WebGLRenderbuffer;
-}
-
-interface WebGLRenderingContext {
- readonly canvas: HTMLCanvasElement;
- readonly drawingBufferHeight: number;
- readonly drawingBufferWidth: number;
- activeTexture(texture: number): void;
- attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
- bindBuffer(target: number, buffer: WebGLBuffer | null): void;
- bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
- bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
- bindTexture(target: number, texture: WebGLTexture | null): void;
- blendColor(red: number, green: number, blue: number, alpha: number): void;
- blendEquation(mode: number): void;
- blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
- blendFunc(sfactor: number, dfactor: number): void;
- blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
- bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
- bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
- checkFramebufferStatus(target: number): number;
- clear(mask: number): void;
- clearColor(red: number, green: number, blue: number, alpha: number): void;
- clearDepth(depth: number): void;
- clearStencil(s: number): void;
- colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
- compileShader(shader: WebGLShader | null): void;
- compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
- compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
- copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
- copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
- createBuffer(): WebGLBuffer | null;
- createFramebuffer(): WebGLFramebuffer | null;
- createProgram(): WebGLProgram | null;
- createRenderbuffer(): WebGLRenderbuffer | null;
- createShader(type: number): WebGLShader | null;
- createTexture(): WebGLTexture | null;
- cullFace(mode: number): void;
- deleteBuffer(buffer: WebGLBuffer | null): void;
- deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
- deleteProgram(program: WebGLProgram | null): void;
- deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
- deleteShader(shader: WebGLShader | null): void;
- deleteTexture(texture: WebGLTexture | null): void;
- depthFunc(func: number): void;
- depthMask(flag: boolean): void;
- depthRange(zNear: number, zFar: number): void;
- detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
- disable(cap: number): void;
- disableVertexAttribArray(index: number): void;
- drawArrays(mode: number, first: number, count: number): void;
- drawElements(mode: number, count: number, type: number, offset: number): void;
- enable(cap: number): void;
- enableVertexAttribArray(index: number): void;
- finish(): void;
- flush(): void;
- framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
- framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
- frontFace(mode: number): void;
- generateMipmap(target: number): void;
- getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
- getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
- getAttribLocation(program: WebGLProgram | null, name: string): number;
- getBufferParameter(target: number, pname: number): any;
- getContextAttributes(): WebGLContextAttributes;
- getError(): number;
- getExtension(name: string): any;
- getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
- getParameter(pname: number): any;
- getProgramInfoLog(program: WebGLProgram | null): string | null;
- getProgramParameter(program: WebGLProgram | null, pname: number): any;
- getRenderbufferParameter(target: number, pname: number): any;
- getShaderInfoLog(shader: WebGLShader | null): string | null;
- getShaderParameter(shader: WebGLShader | null, pname: number): any;
- getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
- getShaderSource(shader: WebGLShader | null): string | null;
- getSupportedExtensions(): string[] | null;
- getTexParameter(target: number, pname: number): any;
- getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
- getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
- getVertexAttrib(index: number, pname: number): any;
- getVertexAttribOffset(index: number, pname: number): number;
- hint(target: number, mode: number): void;
- isBuffer(buffer: WebGLBuffer | null): boolean;
- isContextLost(): boolean;
- isEnabled(cap: number): boolean;
- isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
- isProgram(program: WebGLProgram | null): boolean;
- isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
- isShader(shader: WebGLShader | null): boolean;
- isTexture(texture: WebGLTexture | null): boolean;
- lineWidth(width: number): void;
- linkProgram(program: WebGLProgram | null): void;
- pixelStorei(pname: number, param: number): void;
- polygonOffset(factor: number, units: number): void;
- readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
- renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
- sampleCoverage(value: number, invert: boolean): void;
- scissor(x: number, y: number, width: number, height: number): void;
- shaderSource(shader: WebGLShader | null, source: string): void;
- stencilFunc(func: number, ref: number, mask: number): void;
- stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
- stencilMask(mask: number): void;
- stencilMaskSeparate(face: number, mask: number): void;
- stencilOp(fail: number, zfail: number, zpass: number): void;
- stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
- texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- texParameterf(target: number, pname: number, param: number): void;
- texParameteri(target: number, pname: number, param: number): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
- uniform1f(location: WebGLUniformLocation | null, x: number): void;
- uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform1i(location: WebGLUniformLocation | null, x: number): void;
- uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
- uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
- uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
- uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
- uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
- uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
- useProgram(program: WebGLProgram | null): void;
- validateProgram(program: WebGLProgram | null): void;
- vertexAttrib1f(indx: number, x: number): void;
- vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib2f(indx: number, x: number, y: number): void;
- vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
- vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
- vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
- vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
- vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
- viewport(x: number, y: number, width: number, height: number): void;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-declare var WebGLRenderingContext: {
- prototype: WebGLRenderingContext;
- new(): WebGLRenderingContext;
- readonly ACTIVE_ATTRIBUTES: number;
- readonly ACTIVE_TEXTURE: number;
- readonly ACTIVE_UNIFORMS: number;
- readonly ALIASED_LINE_WIDTH_RANGE: number;
- readonly ALIASED_POINT_SIZE_RANGE: number;
- readonly ALPHA: number;
- readonly ALPHA_BITS: number;
- readonly ALWAYS: number;
- readonly ARRAY_BUFFER: number;
- readonly ARRAY_BUFFER_BINDING: number;
- readonly ATTACHED_SHADERS: number;
- readonly BACK: number;
- readonly BLEND: number;
- readonly BLEND_COLOR: number;
- readonly BLEND_DST_ALPHA: number;
- readonly BLEND_DST_RGB: number;
- readonly BLEND_EQUATION: number;
- readonly BLEND_EQUATION_ALPHA: number;
- readonly BLEND_EQUATION_RGB: number;
- readonly BLEND_SRC_ALPHA: number;
- readonly BLEND_SRC_RGB: number;
- readonly BLUE_BITS: number;
- readonly BOOL: number;
- readonly BOOL_VEC2: number;
- readonly BOOL_VEC3: number;
- readonly BOOL_VEC4: number;
- readonly BROWSER_DEFAULT_WEBGL: number;
- readonly BUFFER_SIZE: number;
- readonly BUFFER_USAGE: number;
- readonly BYTE: number;
- readonly CCW: number;
- readonly CLAMP_TO_EDGE: number;
- readonly COLOR_ATTACHMENT0: number;
- readonly COLOR_BUFFER_BIT: number;
- readonly COLOR_CLEAR_VALUE: number;
- readonly COLOR_WRITEMASK: number;
- readonly COMPILE_STATUS: number;
- readonly COMPRESSED_TEXTURE_FORMATS: number;
- readonly CONSTANT_ALPHA: number;
- readonly CONSTANT_COLOR: number;
- readonly CONTEXT_LOST_WEBGL: number;
- readonly CULL_FACE: number;
- readonly CULL_FACE_MODE: number;
- readonly CURRENT_PROGRAM: number;
- readonly CURRENT_VERTEX_ATTRIB: number;
- readonly CW: number;
- readonly DECR: number;
- readonly DECR_WRAP: number;
- readonly DELETE_STATUS: number;
- readonly DEPTH_ATTACHMENT: number;
- readonly DEPTH_BITS: number;
- readonly DEPTH_BUFFER_BIT: number;
- readonly DEPTH_CLEAR_VALUE: number;
- readonly DEPTH_COMPONENT: number;
- readonly DEPTH_COMPONENT16: number;
- readonly DEPTH_FUNC: number;
- readonly DEPTH_RANGE: number;
- readonly DEPTH_STENCIL: number;
- readonly DEPTH_STENCIL_ATTACHMENT: number;
- readonly DEPTH_TEST: number;
- readonly DEPTH_WRITEMASK: number;
- readonly DITHER: number;
- readonly DONT_CARE: number;
- readonly DST_ALPHA: number;
- readonly DST_COLOR: number;
- readonly DYNAMIC_DRAW: number;
- readonly ELEMENT_ARRAY_BUFFER: number;
- readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
- readonly EQUAL: number;
- readonly FASTEST: number;
- readonly FLOAT: number;
- readonly FLOAT_MAT2: number;
- readonly FLOAT_MAT3: number;
- readonly FLOAT_MAT4: number;
- readonly FLOAT_VEC2: number;
- readonly FLOAT_VEC3: number;
- readonly FLOAT_VEC4: number;
- readonly FRAGMENT_SHADER: number;
- readonly FRAMEBUFFER: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- readonly FRAMEBUFFER_BINDING: number;
- readonly FRAMEBUFFER_COMPLETE: number;
- readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- readonly FRAMEBUFFER_UNSUPPORTED: number;
- readonly FRONT: number;
- readonly FRONT_AND_BACK: number;
- readonly FRONT_FACE: number;
- readonly FUNC_ADD: number;
- readonly FUNC_REVERSE_SUBTRACT: number;
- readonly FUNC_SUBTRACT: number;
- readonly GENERATE_MIPMAP_HINT: number;
- readonly GEQUAL: number;
- readonly GREATER: number;
- readonly GREEN_BITS: number;
- readonly HIGH_FLOAT: number;
- readonly HIGH_INT: number;
- readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
- readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
- readonly INCR: number;
- readonly INCR_WRAP: number;
- readonly INT: number;
- readonly INT_VEC2: number;
- readonly INT_VEC3: number;
- readonly INT_VEC4: number;
- readonly INVALID_ENUM: number;
- readonly INVALID_FRAMEBUFFER_OPERATION: number;
- readonly INVALID_OPERATION: number;
- readonly INVALID_VALUE: number;
- readonly INVERT: number;
- readonly KEEP: number;
- readonly LEQUAL: number;
- readonly LESS: number;
- readonly LINEAR: number;
- readonly LINEAR_MIPMAP_LINEAR: number;
- readonly LINEAR_MIPMAP_NEAREST: number;
- readonly LINES: number;
- readonly LINE_LOOP: number;
- readonly LINE_STRIP: number;
- readonly LINE_WIDTH: number;
- readonly LINK_STATUS: number;
- readonly LOW_FLOAT: number;
- readonly LOW_INT: number;
- readonly LUMINANCE: number;
- readonly LUMINANCE_ALPHA: number;
- readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
- readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
- readonly MAX_RENDERBUFFER_SIZE: number;
- readonly MAX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_TEXTURE_SIZE: number;
- readonly MAX_VARYING_VECTORS: number;
- readonly MAX_VERTEX_ATTRIBS: number;
- readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- readonly MAX_VERTEX_UNIFORM_VECTORS: number;
- readonly MAX_VIEWPORT_DIMS: number;
- readonly MEDIUM_FLOAT: number;
- readonly MEDIUM_INT: number;
- readonly MIRRORED_REPEAT: number;
- readonly NEAREST: number;
- readonly NEAREST_MIPMAP_LINEAR: number;
- readonly NEAREST_MIPMAP_NEAREST: number;
- readonly NEVER: number;
- readonly NICEST: number;
- readonly NONE: number;
- readonly NOTEQUAL: number;
- readonly NO_ERROR: number;
- readonly ONE: number;
- readonly ONE_MINUS_CONSTANT_ALPHA: number;
- readonly ONE_MINUS_CONSTANT_COLOR: number;
- readonly ONE_MINUS_DST_ALPHA: number;
- readonly ONE_MINUS_DST_COLOR: number;
- readonly ONE_MINUS_SRC_ALPHA: number;
- readonly ONE_MINUS_SRC_COLOR: number;
- readonly OUT_OF_MEMORY: number;
- readonly PACK_ALIGNMENT: number;
- readonly POINTS: number;
- readonly POLYGON_OFFSET_FACTOR: number;
- readonly POLYGON_OFFSET_FILL: number;
- readonly POLYGON_OFFSET_UNITS: number;
- readonly RED_BITS: number;
- readonly RENDERBUFFER: number;
- readonly RENDERBUFFER_ALPHA_SIZE: number;
- readonly RENDERBUFFER_BINDING: number;
- readonly RENDERBUFFER_BLUE_SIZE: number;
- readonly RENDERBUFFER_DEPTH_SIZE: number;
- readonly RENDERBUFFER_GREEN_SIZE: number;
- readonly RENDERBUFFER_HEIGHT: number;
- readonly RENDERBUFFER_INTERNAL_FORMAT: number;
- readonly RENDERBUFFER_RED_SIZE: number;
- readonly RENDERBUFFER_STENCIL_SIZE: number;
- readonly RENDERBUFFER_WIDTH: number;
- readonly RENDERER: number;
- readonly REPEAT: number;
- readonly REPLACE: number;
- readonly RGB: number;
- readonly RGB565: number;
- readonly RGB5_A1: number;
- readonly RGBA: number;
- readonly RGBA4: number;
- readonly SAMPLER_2D: number;
- readonly SAMPLER_CUBE: number;
- readonly SAMPLES: number;
- readonly SAMPLE_ALPHA_TO_COVERAGE: number;
- readonly SAMPLE_BUFFERS: number;
- readonly SAMPLE_COVERAGE: number;
- readonly SAMPLE_COVERAGE_INVERT: number;
- readonly SAMPLE_COVERAGE_VALUE: number;
- readonly SCISSOR_BOX: number;
- readonly SCISSOR_TEST: number;
- readonly SHADER_TYPE: number;
- readonly SHADING_LANGUAGE_VERSION: number;
- readonly SHORT: number;
- readonly SRC_ALPHA: number;
- readonly SRC_ALPHA_SATURATE: number;
- readonly SRC_COLOR: number;
- readonly STATIC_DRAW: number;
- readonly STENCIL_ATTACHMENT: number;
- readonly STENCIL_BACK_FAIL: number;
- readonly STENCIL_BACK_FUNC: number;
- readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
- readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
- readonly STENCIL_BACK_REF: number;
- readonly STENCIL_BACK_VALUE_MASK: number;
- readonly STENCIL_BACK_WRITEMASK: number;
- readonly STENCIL_BITS: number;
- readonly STENCIL_BUFFER_BIT: number;
- readonly STENCIL_CLEAR_VALUE: number;
- readonly STENCIL_FAIL: number;
- readonly STENCIL_FUNC: number;
- readonly STENCIL_INDEX: number;
- readonly STENCIL_INDEX8: number;
- readonly STENCIL_PASS_DEPTH_FAIL: number;
- readonly STENCIL_PASS_DEPTH_PASS: number;
- readonly STENCIL_REF: number;
- readonly STENCIL_TEST: number;
- readonly STENCIL_VALUE_MASK: number;
- readonly STENCIL_WRITEMASK: number;
- readonly STREAM_DRAW: number;
- readonly SUBPIXEL_BITS: number;
- readonly TEXTURE: number;
- readonly TEXTURE0: number;
- readonly TEXTURE1: number;
- readonly TEXTURE10: number;
- readonly TEXTURE11: number;
- readonly TEXTURE12: number;
- readonly TEXTURE13: number;
- readonly TEXTURE14: number;
- readonly TEXTURE15: number;
- readonly TEXTURE16: number;
- readonly TEXTURE17: number;
- readonly TEXTURE18: number;
- readonly TEXTURE19: number;
- readonly TEXTURE2: number;
- readonly TEXTURE20: number;
- readonly TEXTURE21: number;
- readonly TEXTURE22: number;
- readonly TEXTURE23: number;
- readonly TEXTURE24: number;
- readonly TEXTURE25: number;
- readonly TEXTURE26: number;
- readonly TEXTURE27: number;
- readonly TEXTURE28: number;
- readonly TEXTURE29: number;
- readonly TEXTURE3: number;
- readonly TEXTURE30: number;
- readonly TEXTURE31: number;
- readonly TEXTURE4: number;
- readonly TEXTURE5: number;
- readonly TEXTURE6: number;
- readonly TEXTURE7: number;
- readonly TEXTURE8: number;
- readonly TEXTURE9: number;
- readonly TEXTURE_2D: number;
- readonly TEXTURE_BINDING_2D: number;
- readonly TEXTURE_BINDING_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- readonly TEXTURE_MAG_FILTER: number;
- readonly TEXTURE_MIN_FILTER: number;
- readonly TEXTURE_WRAP_S: number;
- readonly TEXTURE_WRAP_T: number;
- readonly TRIANGLES: number;
- readonly TRIANGLE_FAN: number;
- readonly TRIANGLE_STRIP: number;
- readonly UNPACK_ALIGNMENT: number;
- readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- readonly UNPACK_FLIP_Y_WEBGL: number;
- readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- readonly UNSIGNED_BYTE: number;
- readonly UNSIGNED_INT: number;
- readonly UNSIGNED_SHORT: number;
- readonly UNSIGNED_SHORT_4_4_4_4: number;
- readonly UNSIGNED_SHORT_5_5_5_1: number;
- readonly UNSIGNED_SHORT_5_6_5: number;
- readonly VALIDATE_STATUS: number;
- readonly VENDOR: number;
- readonly VERSION: number;
- readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
- readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
- readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
- readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
- readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
- readonly VERTEX_SHADER: number;
- readonly VIEWPORT: number;
- readonly ZERO: number;
-}
-
-interface WebGLShader extends WebGLObject {
-}
-
-declare var WebGLShader: {
- prototype: WebGLShader;
- new(): WebGLShader;
-}
-
-interface WebGLShaderPrecisionFormat {
- readonly precision: number;
- readonly rangeMax: number;
- readonly rangeMin: number;
-}
-
-declare var WebGLShaderPrecisionFormat: {
- prototype: WebGLShaderPrecisionFormat;
- new(): WebGLShaderPrecisionFormat;
-}
-
-interface WebGLTexture extends WebGLObject {
-}
-
-declare var WebGLTexture: {
- prototype: WebGLTexture;
- new(): WebGLTexture;
-}
-
-interface WebGLUniformLocation {
-}
-
-declare var WebGLUniformLocation: {
- prototype: WebGLUniformLocation;
- new(): WebGLUniformLocation;
-}
-
-interface WebKitCSSMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- m11: number;
- m12: number;
- m13: number;
- m14: number;
- m21: number;
- m22: number;
- m23: number;
- m24: number;
- m31: number;
- m32: number;
- m33: number;
- m34: number;
- m41: number;
- m42: number;
- m43: number;
- m44: number;
- inverse(): WebKitCSSMatrix;
- multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
- rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
- rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
- scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
- setMatrixValue(value: string): void;
- skewX(angle: number): WebKitCSSMatrix;
- skewY(angle: number): WebKitCSSMatrix;
- toString(): string;
- translate(x: number, y: number, z?: number): WebKitCSSMatrix;
-}
-
-declare var WebKitCSSMatrix: {
- prototype: WebKitCSSMatrix;
- new(text?: string): WebKitCSSMatrix;
-}
-
-interface WebKitPoint {
- x: number;
- y: number;
-}
-
-declare var WebKitPoint: {
- prototype: WebKitPoint;
- new(x?: number, y?: number): WebKitPoint;
-}
-
-interface WebSocketEventMap {
- "close": CloseEvent;
- "error": ErrorEvent;
- "message": MessageEvent;
- "open": Event;
-}
-
-interface WebSocket extends EventTarget {
- binaryType: string;
- readonly bufferedAmount: number;
- readonly extensions: string;
- onclose: (this: WebSocket, ev: CloseEvent) => any;
- onerror: (this: WebSocket, ev: ErrorEvent) => any;
- onmessage: (this: WebSocket, ev: MessageEvent) => any;
- onopen: (this: WebSocket, ev: Event) => any;
- readonly protocol: string;
- readonly readyState: number;
- readonly url: string;
- close(code?: number, reason?: string): void;
- send(data: any): void;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
- addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var WebSocket: {
- prototype: WebSocket;
- new(url: string, protocols?: string | string[]): WebSocket;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
-}
-
-interface WheelEvent extends MouseEvent {
- readonly deltaMode: number;
- readonly deltaX: number;
- readonly deltaY: number;
- readonly deltaZ: number;
- readonly wheelDelta: number;
- readonly wheelDeltaX: number;
- readonly wheelDeltaY: number;
- getCurrentPoint(element: Element): void;
- initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-declare var WheelEvent: {
- prototype: WheelEvent;
- new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
- readonly DOM_DELTA_LINE: number;
- readonly DOM_DELTA_PAGE: number;
- readonly DOM_DELTA_PIXEL: number;
-}
-
-interface WindowEventMap extends GlobalEventHandlersEventMap {
- "abort": UIEvent;
- "afterprint": Event;
- "beforeprint": Event;
- "beforeunload": BeforeUnloadEvent;
- "blur": FocusEvent;
- "canplay": Event;
- "canplaythrough": Event;
- "change": Event;
- "click": MouseEvent;
- "compassneedscalibration": Event;
- "contextmenu": PointerEvent;
- "dblclick": MouseEvent;
- "devicelight": DeviceLightEvent;
- "devicemotion": DeviceMotionEvent;
- "deviceorientation": DeviceOrientationEvent;
- "drag": DragEvent;
- "dragend": DragEvent;
- "dragenter": DragEvent;
- "dragleave": DragEvent;
- "dragover": DragEvent;
- "dragstart": DragEvent;
- "drop": DragEvent;
- "durationchange": Event;
- "emptied": Event;
- "ended": MediaStreamErrorEvent;
- "focus": FocusEvent;
- "hashchange": HashChangeEvent;
- "input": Event;
- "invalid": Event;
- "keydown": KeyboardEvent;
- "keypress": KeyboardEvent;
- "keyup": KeyboardEvent;
- "load": Event;
- "loadeddata": Event;
- "loadedmetadata": Event;
- "loadstart": Event;
- "message": MessageEvent;
- "mousedown": MouseEvent;
- "mouseenter": MouseEvent;
- "mouseleave": MouseEvent;
- "mousemove": MouseEvent;
- "mouseout": MouseEvent;
- "mouseover": MouseEvent;
- "mouseup": MouseEvent;
- "mousewheel": WheelEvent;
- "MSGestureChange": MSGestureEvent;
- "MSGestureDoubleTap": MSGestureEvent;
- "MSGestureEnd": MSGestureEvent;
- "MSGestureHold": MSGestureEvent;
- "MSGestureStart": MSGestureEvent;
- "MSGestureTap": MSGestureEvent;
- "MSInertiaStart": MSGestureEvent;
- "MSPointerCancel": MSPointerEvent;
- "MSPointerDown": MSPointerEvent;
- "MSPointerEnter": MSPointerEvent;
- "MSPointerLeave": MSPointerEvent;
- "MSPointerMove": MSPointerEvent;
- "MSPointerOut": MSPointerEvent;
- "MSPointerOver": MSPointerEvent;
- "MSPointerUp": MSPointerEvent;
- "offline": Event;
- "online": Event;
- "orientationchange": Event;
- "pagehide": PageTransitionEvent;
- "pageshow": PageTransitionEvent;
- "pause": Event;
- "play": Event;
- "playing": Event;
- "popstate": PopStateEvent;
- "progress": ProgressEvent;
- "ratechange": Event;
- "readystatechange": ProgressEvent;
- "reset": Event;
- "resize": UIEvent;
- "scroll": UIEvent;
- "seeked": Event;
- "seeking": Event;
- "select": UIEvent;
- "stalled": Event;
- "storage": StorageEvent;
- "submit": Event;
- "suspend": Event;
- "timeupdate": Event;
- "unload": Event;
- "volumechange": Event;
- "waiting": Event;
-}
-
-interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
- readonly applicationCache: ApplicationCache;
- readonly clientInformation: Navigator;
- readonly closed: boolean;
- readonly crypto: Crypto;
- defaultStatus: string;
- readonly devicePixelRatio: number;
- readonly doNotTrack: string;
- readonly document: Document;
- event: Event | undefined;
- readonly external: External;
- readonly frameElement: Element;
- readonly frames: Window;
- readonly history: History;
- readonly innerHeight: number;
- readonly innerWidth: number;
- readonly length: number;
- readonly location: Location;
- readonly locationbar: BarProp;
- readonly menubar: BarProp;
- readonly msCredentials: MSCredentials;
- name: string;
- readonly navigator: Navigator;
- offscreenBuffering: string | boolean;
- onabort: (this: Window, ev: UIEvent) => any;
- onafterprint: (this: Window, ev: Event) => any;
- onbeforeprint: (this: Window, ev: Event) => any;
- onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
- onblur: (this: Window, ev: FocusEvent) => any;
- oncanplay: (this: Window, ev: Event) => any;
- oncanplaythrough: (this: Window, ev: Event) => any;
- onchange: (this: Window, ev: Event) => any;
- onclick: (this: Window, ev: MouseEvent) => any;
- oncompassneedscalibration: (this: Window, ev: Event) => any;
- oncontextmenu: (this: Window, ev: PointerEvent) => any;
- ondblclick: (this: Window, ev: MouseEvent) => any;
- ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
- ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
- ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
- ondrag: (this: Window, ev: DragEvent) => any;
- ondragend: (this: Window, ev: DragEvent) => any;
- ondragenter: (this: Window, ev: DragEvent) => any;
- ondragleave: (this: Window, ev: DragEvent) => any;
- ondragover: (this: Window, ev: DragEvent) => any;
- ondragstart: (this: Window, ev: DragEvent) => any;
- ondrop: (this: Window, ev: DragEvent) => any;
- ondurationchange: (this: Window, ev: Event) => any;
- onemptied: (this: Window, ev: Event) => any;
- onended: (this: Window, ev: MediaStreamErrorEvent) => any;
- onerror: ErrorEventHandler;
- onfocus: (this: Window, ev: FocusEvent) => any;
- onhashchange: (this: Window, ev: HashChangeEvent) => any;
- oninput: (this: Window, ev: Event) => any;
- oninvalid: (this: Window, ev: Event) => any;
- onkeydown: (this: Window, ev: KeyboardEvent) => any;
- onkeypress: (this: Window, ev: KeyboardEvent) => any;
- onkeyup: (this: Window, ev: KeyboardEvent) => any;
- onload: (this: Window, ev: Event) => any;
- onloadeddata: (this: Window, ev: Event) => any;
- onloadedmetadata: (this: Window, ev: Event) => any;
- onloadstart: (this: Window, ev: Event) => any;
- onmessage: (this: Window, ev: MessageEvent) => any;
- onmousedown: (this: Window, ev: MouseEvent) => any;
- onmouseenter: (this: Window, ev: MouseEvent) => any;
- onmouseleave: (this: Window, ev: MouseEvent) => any;
- onmousemove: (this: Window, ev: MouseEvent) => any;
- onmouseout: (this: Window, ev: MouseEvent) => any;
- onmouseover: (this: Window, ev: MouseEvent) => any;
- onmouseup: (this: Window, ev: MouseEvent) => any;
- onmousewheel: (this: Window, ev: WheelEvent) => any;
- onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
- onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
- onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
- onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
- onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
- onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
- onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
- onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
- onmspointermove: (this: Window, ev: MSPointerEvent) => any;
- onmspointerout: (this: Window, ev: MSPointerEvent) => any;
- onmspointerover: (this: Window, ev: MSPointerEvent) => any;
- onmspointerup: (this: Window, ev: MSPointerEvent) => any;
- onoffline: (this: Window, ev: Event) => any;
- ononline: (this: Window, ev: Event) => any;
- onorientationchange: (this: Window, ev: Event) => any;
- onpagehide: (this: Window, ev: PageTransitionEvent) => any;
- onpageshow: (this: Window, ev: PageTransitionEvent) => any;
- onpause: (this: Window, ev: Event) => any;
- onplay: (this: Window, ev: Event) => any;
- onplaying: (this: Window, ev: Event) => any;
- onpopstate: (this: Window, ev: PopStateEvent) => any;
- onprogress: (this: Window, ev: ProgressEvent) => any;
- onratechange: (this: Window, ev: Event) => any;
- onreadystatechange: (this: Window, ev: ProgressEvent) => any;
- onreset: (this: Window, ev: Event) => any;
- onresize: (this: Window, ev: UIEvent) => any;
- onscroll: (this: Window, ev: UIEvent) => any;
- onseeked: (this: Window, ev: Event) => any;
- onseeking: (this: Window, ev: Event) => any;
- onselect: (this: Window, ev: UIEvent) => any;
- onstalled: (this: Window, ev: Event) => any;
- onstorage: (this: Window, ev: StorageEvent) => any;
- onsubmit: (this: Window, ev: Event) => any;
- onsuspend: (this: Window, ev: Event) => any;
- ontimeupdate: (this: Window, ev: Event) => any;
- ontouchcancel: (ev: TouchEvent) => any;
- ontouchend: (ev: TouchEvent) => any;
- ontouchmove: (ev: TouchEvent) => any;
- ontouchstart: (ev: TouchEvent) => any;
- onunload: (this: Window, ev: Event) => any;
- onvolumechange: (this: Window, ev: Event) => any;
- onwaiting: (this: Window, ev: Event) => any;
- opener: any;
- orientation: string | number;
- readonly outerHeight: number;
- readonly outerWidth: number;
- readonly pageXOffset: number;
- readonly pageYOffset: number;
- readonly parent: Window;
- readonly performance: Performance;
- readonly personalbar: BarProp;
- readonly screen: Screen;
- readonly screenLeft: number;
- readonly screenTop: number;
- readonly screenX: number;
- readonly screenY: number;
- readonly scrollX: number;
- readonly scrollY: number;
- readonly scrollbars: BarProp;
- readonly self: Window;
- status: string;
- readonly statusbar: BarProp;
- readonly styleMedia: StyleMedia;
- readonly toolbar: BarProp;
- readonly top: Window;
- readonly window: Window;
- URL: typeof URL;
- Blob: typeof Blob;
- alert(message?: any): void;
- blur(): void;
- cancelAnimationFrame(handle: number): void;
- captureEvents(): void;
- close(): void;
- confirm(message?: string): boolean;
- focus(): void;
- getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
- getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
- getSelection(): Selection;
- matchMedia(mediaQuery: string): MediaQueryList;
- moveBy(x?: number, y?: number): void;
- moveTo(x?: number, y?: number): void;
- msWriteProfilerMark(profilerMarkName: string): void;
- open(url?: string, target?: string, features?: string, replace?: boolean): Window;
- postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
- print(): void;
- prompt(message?: string, _default?: string): string | null;
- releaseEvents(): void;
- requestAnimationFrame(callback: FrameRequestCallback): number;
- resizeBy(x?: number, y?: number): void;
- resizeTo(x?: number, y?: number): void;
- scroll(x?: number, y?: number): void;
- scrollBy(x?: number, y?: number): void;
- scrollTo(x?: number, y?: number): void;
- webkitCancelAnimationFrame(handle: number): void;
- webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
- webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
- scroll(options?: ScrollToOptions): void;
- scrollTo(options?: ScrollToOptions): void;
- scrollBy(options?: ScrollToOptions): void;
- addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Window: {
- prototype: Window;
- new(): Window;
-}
-
-interface WorkerEventMap extends AbstractWorkerEventMap {
- "message": MessageEvent;
-}
-
-interface Worker extends EventTarget, AbstractWorker {
- onmessage: (this: Worker, ev: MessageEvent) => any;
- postMessage(message: any, ports?: any): void;
- terminate(): void;
- addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Worker: {
- prototype: Worker;
- new(stringUrl: string): Worker;
-}
-
-interface XMLDocument extends Document {
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLDocument: {
- prototype: XMLDocument;
- new(): XMLDocument;
-}
-
-interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
- "readystatechange": Event;
-}
-
-interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
- onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
- readonly readyState: number;
- readonly response: any;
- readonly responseText: string;
- responseType: string;
- readonly responseXML: any;
- readonly status: number;
- readonly statusText: string;
- timeout: number;
- readonly upload: XMLHttpRequestUpload;
- withCredentials: boolean;
- msCaching?: string;
- readonly responseURL: string;
- abort(): void;
- getAllResponseHeaders(): string;
- getResponseHeader(header: string): string | null;
- msCachingEnabled(): boolean;
- open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
- overrideMimeType(mime: string): void;
- send(data?: Document): void;
- send(data?: string): void;
- send(data?: any): void;
- setRequestHeader(header: string, value: string): void;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequest: {
- prototype: XMLHttpRequest;
- new(): XMLHttpRequest;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- create(): XMLHttpRequest;
-}
-
-interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequestUpload: {
- prototype: XMLHttpRequestUpload;
- new(): XMLHttpRequestUpload;
-}
-
-interface XMLSerializer {
- serializeToString(target: Node): string;
-}
-
-declare var XMLSerializer: {
- prototype: XMLSerializer;
- new(): XMLSerializer;
-}
-
-interface XPathEvaluator {
- createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
- createNSResolver(nodeResolver?: Node): XPathNSResolver;
- evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathEvaluator: {
- prototype: XPathEvaluator;
- new(): XPathEvaluator;
-}
-
-interface XPathExpression {
- evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
-}
-
-declare var XPathExpression: {
- prototype: XPathExpression;
- new(): XPathExpression;
-}
-
-interface XPathNSResolver {
- lookupNamespaceURI(prefix: string): string;
-}
-
-declare var XPathNSResolver: {
- prototype: XPathNSResolver;
- new(): XPathNSResolver;
-}
-
-interface XPathResult {
- readonly booleanValue: boolean;
- readonly invalidIteratorState: boolean;
- readonly numberValue: number;
- readonly resultType: number;
- readonly singleNodeValue: Node;
- readonly snapshotLength: number;
- readonly stringValue: string;
- iterateNext(): Node;
- snapshotItem(index: number): Node;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-declare var XPathResult: {
- prototype: XPathResult;
- new(): XPathResult;
- readonly ANY_TYPE: number;
- readonly ANY_UNORDERED_NODE_TYPE: number;
- readonly BOOLEAN_TYPE: number;
- readonly FIRST_ORDERED_NODE_TYPE: number;
- readonly NUMBER_TYPE: number;
- readonly ORDERED_NODE_ITERATOR_TYPE: number;
- readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
- readonly STRING_TYPE: number;
- readonly UNORDERED_NODE_ITERATOR_TYPE: number;
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
-
-interface XSLTProcessor {
- clearParameters(): void;
- getParameter(namespaceURI: string, localName: string): any;
- importStylesheet(style: Node): void;
- removeParameter(namespaceURI: string, localName: string): void;
- reset(): void;
- setParameter(namespaceURI: string, localName: string, value: any): void;
- transformToDocument(source: Node): Document;
- transformToFragment(source: Node, document: Document): DocumentFragment;
-}
-
-declare var XSLTProcessor: {
- prototype: XSLTProcessor;
- new(): XSLTProcessor;
-}
-
-interface AbstractWorkerEventMap {
- "error": ErrorEvent;
-}
-
-interface AbstractWorker {
- onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
- addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface CanvasPathMethods {
- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
- closePath(): void;
- ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- lineTo(x: number, y: number): void;
- moveTo(x: number, y: number): void;
- quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
- rect(x: number, y: number, w: number, h: number): void;
-}
-
-interface ChildNode {
- remove(): void;
-}
-
-interface DOML2DeprecatedColorProperty {
- color: string;
-}
-
-interface DOML2DeprecatedSizeProperty {
- size: number;
-}
-
-interface DocumentEvent {
- createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
- createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent;
- createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
- createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
- createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
- createEvent(eventInterface:"CloseEvent"): CloseEvent;
- createEvent(eventInterface:"CommandEvent"): CommandEvent;
- createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
- createEvent(eventInterface:"CustomEvent"): CustomEvent;
- createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
- createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
- createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
- createEvent(eventInterface:"DragEvent"): DragEvent;
- createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
- createEvent(eventInterface:"Event"): Event;
- createEvent(eventInterface:"Events"): Event;
- createEvent(eventInterface:"FocusEvent"): FocusEvent;
- createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
- createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
- createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
- createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
- createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
- createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
- createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
- createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
- createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
- createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
- createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
- createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
- createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
- createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
- createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
- createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
- createEvent(eventInterface:"MessageEvent"): MessageEvent;
- createEvent(eventInterface:"MouseEvent"): MouseEvent;
- createEvent(eventInterface:"MouseEvents"): MouseEvent;
- createEvent(eventInterface:"MutationEvent"): MutationEvent;
- createEvent(eventInterface:"MutationEvents"): MutationEvent;
- createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
- createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
- createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
- createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
- createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
- createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
- createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
- createEvent(eventInterface:"PointerEvent"): PointerEvent;
- createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
- createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
- createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
- createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
- createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
- createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
- createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
- createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
- createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
- createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
- createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
- createEvent(eventInterface:"StorageEvent"): StorageEvent;
- createEvent(eventInterface:"TextEvent"): TextEvent;
- createEvent(eventInterface:"TouchEvent"): TouchEvent;
- createEvent(eventInterface:"TrackEvent"): TrackEvent;
- createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
- createEvent(eventInterface:"UIEvent"): UIEvent;
- createEvent(eventInterface:"UIEvents"): UIEvent;
- createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
- createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
- createEvent(eventInterface:"WheelEvent"): WheelEvent;
- createEvent(eventInterface: string): Event;
-}
-
-interface ElementTraversal {
- readonly childElementCount: number;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly nextElementSibling: Element;
- readonly previousElementSibling: Element;
-}
-
-interface GetSVGDocument {
- getSVGDocument(): Document;
-}
-
-interface GlobalEventHandlersEventMap {
- "pointercancel": PointerEvent;
- "pointerdown": PointerEvent;
- "pointerenter": PointerEvent;
- "pointerleave": PointerEvent;
- "pointermove": PointerEvent;
- "pointerout": PointerEvent;
- "pointerover": PointerEvent;
- "pointerup": PointerEvent;
- "wheel": WheelEvent;
-}
-
-interface GlobalEventHandlers {
- onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
- onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
- addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface HTMLTableAlignment {
- /**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
- ch: string;
- /**
- * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
- */
- chOff: string;
- /**
- * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
- */
- vAlign: string;
-}
-
-interface IDBEnvironment {
- readonly indexedDB: IDBFactory;
-}
-
-interface LinkStyle {
- readonly sheet: StyleSheet;
-}
-
-interface MSBaseReaderEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
-}
-
-interface MSBaseReader {
- onabort: (this: MSBaseReader, ev: Event) => any;
- onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
- onload: (this: MSBaseReader, ev: Event) => any;
- onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
- onloadstart: (this: MSBaseReader, ev: Event) => any;
- onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
- readonly readyState: number;
- readonly result: any;
- abort(): void;
- readonly DONE: number;
- readonly EMPTY: number;
- readonly LOADING: number;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface MSFileSaver {
- msSaveBlob(blob: any, defaultName?: string): boolean;
- msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
-}
-
-interface MSNavigatorDoNotTrack {
- confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
- confirmWebWideTrackingException(args: ExceptionInformation): boolean;
- removeSiteSpecificTrackingException(args: ExceptionInformation): void;
- removeWebWideTrackingException(args: ExceptionInformation): void;
- storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
- storeWebWideTrackingException(args: StoreExceptionsInformation): void;
-}
-
-interface NavigatorContentUtils {
-}
-
-interface NavigatorGeolocation {
- readonly geolocation: Geolocation;
-}
-
-interface NavigatorID {
- readonly appName: string;
- readonly appVersion: string;
- readonly platform: string;
- readonly product: string;
- readonly productSub: string;
- readonly userAgent: string;
- readonly vendor: string;
- readonly vendorSub: string;
-}
-
-interface NavigatorOnLine {
- readonly onLine: boolean;
-}
-
-interface NavigatorStorageUtils {
-}
-
-interface NavigatorUserMedia {
- readonly mediaDevices: MediaDevices;
- getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
-}
-
-interface NodeSelector {
- querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
- querySelector(selectors: string): Element | null;
- querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
- querySelectorAll(selectors: string): NodeListOf<Element>;
-}
-
-interface RandomSource {
- getRandomValues(array: ArrayBufferView): ArrayBufferView;
-}
-
-interface SVGAnimatedPathData {
- readonly pathSegList: SVGPathSegList;
-}
-
-interface SVGAnimatedPoints {
- readonly animatedPoints: SVGPointList;
- readonly points: SVGPointList;
-}
-
-interface SVGExternalResourcesRequired {
- readonly externalResourcesRequired: SVGAnimatedBoolean;
-}
-
-interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
- readonly height: SVGAnimatedLength;
- readonly result: SVGAnimatedString;
- readonly width: SVGAnimatedLength;
- readonly x: SVGAnimatedLength;
- readonly y: SVGAnimatedLength;
-}
-
-interface SVGFitToViewBox {
- readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- readonly viewBox: SVGAnimatedRect;
-}
-
-interface SVGLangSpace {
- xmllang: string;
- xmlspace: string;
-}
-
-interface SVGLocatable {
- readonly farthestViewportElement: SVGElement;
- readonly nearestViewportElement: SVGElement;
- getBBox(): SVGRect;
- getCTM(): SVGMatrix;
- getScreenCTM(): SVGMatrix;
- getTransformToElement(element: SVGElement): SVGMatrix;
-}
-
-interface SVGStylable {
- className: any;
- readonly style: CSSStyleDeclaration;
-}
-
-interface SVGTests {
- readonly requiredExtensions: SVGStringList;
- readonly requiredFeatures: SVGStringList;
- readonly systemLanguage: SVGStringList;
- hasExtension(extension: string): boolean;
-}
-
-interface SVGTransformable extends SVGLocatable {
- readonly transform: SVGAnimatedTransformList;
-}
-
-interface SVGURIReference {
- readonly href: SVGAnimatedString;
-}
-
-interface WindowBase64 {
- atob(encodedString: string): string;
- btoa(rawString: string): string;
-}
-
-interface WindowConsole {
- readonly console: Console;
-}
-
-interface WindowLocalStorage {
- readonly localStorage: Storage;
-}
-
-interface WindowSessionStorage {
- readonly sessionStorage: Storage;
-}
-
-interface WindowTimers extends Object, WindowTimersExtension {
- clearInterval(handle: number): void;
- clearTimeout(handle: number): void;
- setInterval(handler: (...args: any[]) => void, timeout: number): number;
- setInterval(handler: any, timeout?: any, ...args: any[]): number;
- setTimeout(handler: (...args: any[]) => void, timeout: number): number;
- setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-}
-
-interface WindowTimersExtension {
- clearImmediate(handle: number): void;
- setImmediate(handler: (...args: any[]) => void): number;
- setImmediate(handler: any, ...args: any[]): number;
-}
-
-interface XMLHttpRequestEventTargetEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
- "timeout": ProgressEvent;
-}
-
-interface XMLHttpRequestEventTarget {
- onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
- onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface StorageEventInit extends EventInit {
- key?: string;
- oldValue?: string;
- newValue?: string;
- url: string;
- storageArea?: Storage;
-}
-
-interface Canvas2DContextAttributes {
- alpha?: boolean;
- willReadFrequently?: boolean;
- storage?: boolean;
- [attribute: string]: boolean | string | undefined;
-}
-
-interface NodeListOf<TNode extends Node> extends NodeList {
- length: number;
- item(index: number): TNode;
- [index: number]: TNode;
-}
-
-interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
- item(index: number): T;
- namedItem(name: string): T;
- [index: number]: T;
-}
-
-interface BlobPropertyBag {
- type?: string;
- endings?: string;
-}
-
-interface FilePropertyBag {
- type?: string;
- lastModified?: number;
-}
-
-interface EventListenerObject {
- handleEvent(evt: Event): void;
-}
-
-interface MessageEventInit extends EventInit {
- data?: any;
- origin?: string;
- lastEventId?: string;
- channel?: string;
- source?: any;
- ports?: MessagePort[];
-}
-
-interface ProgressEventInit extends EventInit {
- lengthComputable?: boolean;
- loaded?: number;
- total?: number;
-}
-
-interface ScrollOptions {
- behavior?: ScrollBehavior;
-}
-
-interface ScrollToOptions extends ScrollOptions {
- left?: number;
- top?: number;
-}
-
-interface ScrollIntoViewOptions extends ScrollOptions {
- block?: ScrollLogicalPosition;
- inline?: ScrollLogicalPosition;
-}
-
-interface ClipboardEventInit extends EventInit {
- data?: string;
- dataType?: string;
-}
-
-interface IDBArrayKey extends Array<IDBValidKey> {
-}
-
-interface RsaKeyGenParams extends Algorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyGenParams extends RsaKeyGenParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaKeyAlgorithm extends KeyAlgorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaHashedImportParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaPssParams {
- saltLength: number;
-}
-
-interface RsaOaepParams extends Algorithm {
- label?: BufferSource;
-}
-
-interface EcdsaParams extends Algorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface EcKeyGenParams extends Algorithm {
- namedCurve: string;
-}
-
-interface EcKeyAlgorithm extends KeyAlgorithm {
- typedCurve: string;
-}
-
-interface EcKeyImportParams {
- namedCurve: string;
-}
-
-interface EcdhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface AesCtrParams extends Algorithm {
- counter: BufferSource;
- length: number;
-}
-
-interface AesKeyAlgorithm extends KeyAlgorithm {
- length: number;
-}
-
-interface AesKeyGenParams extends Algorithm {
- length: number;
-}
-
-interface AesDerivedKeyParams extends Algorithm {
- length: number;
-}
-
-interface AesCbcParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface AesCmacParams extends Algorithm {
- length: number;
-}
-
-interface AesGcmParams extends Algorithm {
- iv: BufferSource;
- additionalData?: BufferSource;
- tagLength?: number;
-}
-
-interface AesCfbParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface HmacImportParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- length?: number;
-}
-
-interface HmacKeyAlgorithm extends KeyAlgorithm {
- hash: AlgorithmIdentifier;
- length: number;
-}
-
-interface HmacKeyGenParams extends Algorithm {
- hash: AlgorithmIdentifier;
- length?: number;
-}
-
-interface DhKeyGenParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyAlgorithm extends KeyAlgorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface DhImportKeyParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface ConcatParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- algorithmId: Uint8Array;
- partyUInfo: Uint8Array;
- partyVInfo: Uint8Array;
- publicInfo?: Uint8Array;
- privateInfo?: Uint8Array;
-}
-
-interface HkdfCtrParams extends Algorithm {
- hash: AlgorithmIdentifier;
- label: BufferSource;
- context: BufferSource;
-}
-
-interface Pbkdf2Params extends Algorithm {
- salt: BufferSource;
- iterations: number;
- hash: AlgorithmIdentifier;
-}
-
-interface RsaOtherPrimesInfo {
- r: string;
- d: string;
- t: string;
-}
-
-interface JsonWebKey {
- kty: string;
- use?: string;
- key_ops?: string[];
- alg?: string;
- kid?: string;
- x5u?: string;
- x5c?: string;
- x5t?: string;
- ext?: boolean;
- crv?: string;
- x?: string;
- y?: string;
- d?: string;
- n?: string;
- e?: string;
- p?: string;
- q?: string;
- dp?: string;
- dq?: string;
- qi?: string;
- oth?: RsaOtherPrimesInfo[];
- k?: string;
-}
-
-interface ParentNode {
- readonly children: HTMLCollection;
- readonly firstElementChild: Element;
- readonly lastElementChild: Element;
- readonly childElementCount: number;
-}
-
-interface DocumentOrShadowRoot {
- readonly activeElement: Element | null;
- readonly stylesheets: StyleSheetList;
- getSelection(): Selection | null;
- elementFromPoint(x: number, y: number): Element | null;
- elementsFromPoint(x: number, y: number): Element[];
-}
-
-interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
- readonly host: Element;
- innerHTML: string;
-}
-
-interface ShadowRootInit {
- mode: 'open'|'closed';
- delegatesFocus?: boolean;
-}
-
-interface HTMLSlotElement extends HTMLElement {
- name: string;
- assignedNodes(options?: AssignedNodesOptions): Node[];
-}
-
-interface AssignedNodesOptions {
- flatten?: boolean;
-}
-
-declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
-
-interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
-}
-interface PositionCallback {
- (position: Position): void;
-}
-interface PositionErrorCallback {
- (error: PositionError): void;
-}
-interface MediaQueryListListener {
- (mql: MediaQueryList): void;
-}
-interface MSLaunchUriCallback {
- (): void;
-}
-interface FrameRequestCallback {
- (time: number): void;
-}
-interface MSUnsafeFunctionCallback {
- (): any;
-}
-interface MSExecAtPriorityFunctionCallback {
- (...args: any[]): any;
-}
-interface MutationCallback {
- (mutations: MutationRecord[], observer: MutationObserver): void;
-}
-interface DecodeSuccessCallback {
- (decodedData: AudioBuffer): void;
-}
-interface DecodeErrorCallback {
- (error: DOMException): void;
-}
-interface FunctionStringCallback {
- (data: string): void;
-}
-interface NavigatorUserMediaSuccessCallback {
- (stream: MediaStream): void;
-}
-interface NavigatorUserMediaErrorCallback {
- (error: MediaStreamError): void;
-}
-interface ForEachCallback {
- (keyId: any, status: string): void;
-}
-interface HTMLElementTagNameMap {
- "a": HTMLAnchorElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "audio": HTMLAudioElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "del": HTMLModElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "embed": HTMLEmbedElement;
- "fieldset": HTMLFieldSetElement;
- "font": HTMLFontElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "iframe": HTMLIFrameElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "marquee": HTMLMarqueeElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "meter": HTMLMeterElement;
- "nextid": HTMLUnknownElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "picture": HTMLPictureElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "script": HTMLScriptElement;
- "select": HTMLSelectElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "style": HTMLStyleElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "ul": HTMLUListElement;
- "video": HTMLVideoElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
- "abbr": HTMLElement;
- "acronym": HTMLElement;
- "address": HTMLElement;
- "applet": HTMLAppletElement;
- "area": HTMLAreaElement;
- "article": HTMLElement;
- "aside": HTMLElement;
- "audio": HTMLAudioElement;
- "b": HTMLElement;
- "base": HTMLBaseElement;
- "basefont": HTMLBaseFontElement;
- "bdo": HTMLElement;
- "big": HTMLElement;
- "blockquote": HTMLQuoteElement;
- "body": HTMLBodyElement;
- "br": HTMLBRElement;
- "button": HTMLButtonElement;
- "canvas": HTMLCanvasElement;
- "caption": HTMLTableCaptionElement;
- "center": HTMLElement;
- "circle": SVGCircleElement;
- "cite": HTMLElement;
- "clippath": SVGClipPathElement;
- "code": HTMLElement;
- "col": HTMLTableColElement;
- "colgroup": HTMLTableColElement;
- "datalist": HTMLDataListElement;
- "dd": HTMLElement;
- "defs": SVGDefsElement;
- "del": HTMLModElement;
- "desc": SVGDescElement;
- "dfn": HTMLElement;
- "dir": HTMLDirectoryElement;
- "div": HTMLDivElement;
- "dl": HTMLDListElement;
- "dt": HTMLElement;
- "ellipse": SVGEllipseElement;
- "em": HTMLElement;
- "embed": HTMLEmbedElement;
- "feblend": SVGFEBlendElement;
- "fecolormatrix": SVGFEColorMatrixElement;
- "fecomponenttransfer": SVGFEComponentTransferElement;
- "fecomposite": SVGFECompositeElement;
- "feconvolvematrix": SVGFEConvolveMatrixElement;
- "fediffuselighting": SVGFEDiffuseLightingElement;
- "fedisplacementmap": SVGFEDisplacementMapElement;
- "fedistantlight": SVGFEDistantLightElement;
- "feflood": SVGFEFloodElement;
- "fefunca": SVGFEFuncAElement;
- "fefuncb": SVGFEFuncBElement;
- "fefuncg": SVGFEFuncGElement;
- "fefuncr": SVGFEFuncRElement;
- "fegaussianblur": SVGFEGaussianBlurElement;
- "feimage": SVGFEImageElement;
- "femerge": SVGFEMergeElement;
- "femergenode": SVGFEMergeNodeElement;
- "femorphology": SVGFEMorphologyElement;
- "feoffset": SVGFEOffsetElement;
- "fepointlight": SVGFEPointLightElement;
- "fespecularlighting": SVGFESpecularLightingElement;
- "fespotlight": SVGFESpotLightElement;
- "fetile": SVGFETileElement;
- "feturbulence": SVGFETurbulenceElement;
- "fieldset": HTMLFieldSetElement;
- "figcaption": HTMLElement;
- "figure": HTMLElement;
- "filter": SVGFilterElement;
- "font": HTMLFontElement;
- "footer": HTMLElement;
- "foreignobject": SVGForeignObjectElement;
- "form": HTMLFormElement;
- "frame": HTMLFrameElement;
- "frameset": HTMLFrameSetElement;
- "g": SVGGElement;
- "h1": HTMLHeadingElement;
- "h2": HTMLHeadingElement;
- "h3": HTMLHeadingElement;
- "h4": HTMLHeadingElement;
- "h5": HTMLHeadingElement;
- "h6": HTMLHeadingElement;
- "head": HTMLHeadElement;
- "header": HTMLElement;
- "hgroup": HTMLElement;
- "hr": HTMLHRElement;
- "html": HTMLHtmlElement;
- "i": HTMLElement;
- "iframe": HTMLIFrameElement;
- "image": SVGImageElement;
- "img": HTMLImageElement;
- "input": HTMLInputElement;
- "ins": HTMLModElement;
- "isindex": HTMLUnknownElement;
- "kbd": HTMLElement;
- "keygen": HTMLElement;
- "label": HTMLLabelElement;
- "legend": HTMLLegendElement;
- "li": HTMLLIElement;
- "line": SVGLineElement;
- "lineargradient": SVGLinearGradientElement;
- "link": HTMLLinkElement;
- "listing": HTMLPreElement;
- "map": HTMLMapElement;
- "mark": HTMLElement;
- "marker": SVGMarkerElement;
- "marquee": HTMLMarqueeElement;
- "mask": SVGMaskElement;
- "menu": HTMLMenuElement;
- "meta": HTMLMetaElement;
- "metadata": SVGMetadataElement;
- "meter": HTMLMeterElement;
- "nav": HTMLElement;
- "nextid": HTMLUnknownElement;
- "nobr": HTMLElement;
- "noframes": HTMLElement;
- "noscript": HTMLElement;
- "object": HTMLObjectElement;
- "ol": HTMLOListElement;
- "optgroup": HTMLOptGroupElement;
- "option": HTMLOptionElement;
- "p": HTMLParagraphElement;
- "param": HTMLParamElement;
- "path": SVGPathElement;
- "pattern": SVGPatternElement;
- "picture": HTMLPictureElement;
- "plaintext": HTMLElement;
- "polygon": SVGPolygonElement;
- "polyline": SVGPolylineElement;
- "pre": HTMLPreElement;
- "progress": HTMLProgressElement;
- "q": HTMLQuoteElement;
- "radialgradient": SVGRadialGradientElement;
- "rect": SVGRectElement;
- "rt": HTMLElement;
- "ruby": HTMLElement;
- "s": HTMLElement;
- "samp": HTMLElement;
- "script": HTMLScriptElement;
- "section": HTMLElement;
- "select": HTMLSelectElement;
- "small": HTMLElement;
- "source": HTMLSourceElement;
- "span": HTMLSpanElement;
- "stop": SVGStopElement;
- "strike": HTMLElement;
- "strong": HTMLElement;
- "style": HTMLStyleElement;
- "sub": HTMLElement;
- "sup": HTMLElement;
- "svg": SVGSVGElement;
- "switch": SVGSwitchElement;
- "symbol": SVGSymbolElement;
- "table": HTMLTableElement;
- "tbody": HTMLTableSectionElement;
- "td": HTMLTableDataCellElement;
- "template": HTMLTemplateElement;
- "text": SVGTextElement;
- "textpath": SVGTextPathElement;
- "textarea": HTMLTextAreaElement;
- "tfoot": HTMLTableSectionElement;
- "th": HTMLTableHeaderCellElement;
- "thead": HTMLTableSectionElement;
- "title": HTMLTitleElement;
- "tr": HTMLTableRowElement;
- "track": HTMLTrackElement;
- "tspan": SVGTSpanElement;
- "tt": HTMLElement;
- "u": HTMLElement;
- "ul": HTMLUListElement;
- "use": SVGUseElement;
- "var": HTMLElement;
- "video": HTMLVideoElement;
- "view": SVGViewElement;
- "wbr": HTMLElement;
- "x-ms-webview": MSHTMLWebViewElement;
- "xmp": HTMLPreElement;
-}
-
-interface ElementListTagNameMap {
- "a": NodeListOf<HTMLAnchorElement>;
- "abbr": NodeListOf<HTMLElement>;
- "acronym": NodeListOf<HTMLElement>;
- "address": NodeListOf<HTMLElement>;
- "applet": NodeListOf<HTMLAppletElement>;
- "area": NodeListOf<HTMLAreaElement>;
- "article": NodeListOf<HTMLElement>;
- "aside": NodeListOf<HTMLElement>;
- "audio": NodeListOf<HTMLAudioElement>;
- "b": NodeListOf<HTMLElement>;
- "base": NodeListOf<HTMLBaseElement>;
- "basefont": NodeListOf<HTMLBaseFontElement>;
- "bdo": NodeListOf<HTMLElement>;
- "big": NodeListOf<HTMLElement>;
- "blockquote": NodeListOf<HTMLQuoteElement>;
- "body": NodeListOf<HTMLBodyElement>;
- "br": NodeListOf<HTMLBRElement>;
- "button": NodeListOf<HTMLButtonElement>;
- "canvas": NodeListOf<HTMLCanvasElement>;
- "caption": NodeListOf<HTMLTableCaptionElement>;
- "center": NodeListOf<HTMLElement>;
- "circle": NodeListOf<SVGCircleElement>;
- "cite": NodeListOf<HTMLElement>;
- "clippath": NodeListOf<SVGClipPathElement>;
- "code": NodeListOf<HTMLElement>;
- "col": NodeListOf<HTMLTableColElement>;
- "colgroup": NodeListOf<HTMLTableColElement>;
- "datalist": NodeListOf<HTMLDataListElement>;
- "dd": NodeListOf<HTMLElement>;
- "defs": NodeListOf<SVGDefsElement>;
- "del": NodeListOf<HTMLModElement>;
- "desc": NodeListOf<SVGDescElement>;
- "dfn": NodeListOf<HTMLElement>;
- "dir": NodeListOf<HTMLDirectoryElement>;
- "div": NodeListOf<HTMLDivElement>;
- "dl": NodeListOf<HTMLDListElement>;
- "dt": NodeListOf<HTMLElement>;
- "ellipse": NodeListOf<SVGEllipseElement>;
- "em": NodeListOf<HTMLElement>;
- "embed": NodeListOf<HTMLEmbedElement>;
- "feblend": NodeListOf<SVGFEBlendElement>;
- "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
- "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
- "fecomposite": NodeListOf<SVGFECompositeElement>;
- "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
- "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
- "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
- "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
- "feflood": NodeListOf<SVGFEFloodElement>;
- "fefunca": NodeListOf<SVGFEFuncAElement>;
- "fefuncb": NodeListOf<SVGFEFuncBElement>;
- "fefuncg": NodeListOf<SVGFEFuncGElement>;
- "fefuncr": NodeListOf<SVGFEFuncRElement>;
- "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
- "feimage": NodeListOf<SVGFEImageElement>;
- "femerge": NodeListOf<SVGFEMergeElement>;
- "femergenode": NodeListOf<SVGFEMergeNodeElement>;
- "femorphology": NodeListOf<SVGFEMorphologyElement>;
- "feoffset": NodeListOf<SVGFEOffsetElement>;
- "fepointlight": NodeListOf<SVGFEPointLightElement>;
- "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
- "fespotlight": NodeListOf<SVGFESpotLightElement>;
- "fetile": NodeListOf<SVGFETileElement>;
- "feturbulence": NodeListOf<SVGFETurbulenceElement>;
- "fieldset": NodeListOf<HTMLFieldSetElement>;
- "figcaption": NodeListOf<HTMLElement>;
- "figure": NodeListOf<HTMLElement>;
- "filter": NodeListOf<SVGFilterElement>;
- "font": NodeListOf<HTMLFontElement>;
- "footer": NodeListOf<HTMLElement>;
- "foreignobject": NodeListOf<SVGForeignObjectElement>;
- "form": NodeListOf<HTMLFormElement>;
- "frame": NodeListOf<HTMLFrameElement>;
- "frameset": NodeListOf<HTMLFrameSetElement>;
- "g": NodeListOf<SVGGElement>;
- "h1": NodeListOf<HTMLHeadingElement>;
- "h2": NodeListOf<HTMLHeadingElement>;
- "h3": NodeListOf<HTMLHeadingElement>;
- "h4": NodeListOf<HTMLHeadingElement>;
- "h5": NodeListOf<HTMLHeadingElement>;
- "h6": NodeListOf<HTMLHeadingElement>;
- "head": NodeListOf<HTMLHeadElement>;
- "header": NodeListOf<HTMLElement>;
- "hgroup": NodeListOf<HTMLElement>;
- "hr": NodeListOf<HTMLHRElement>;
- "html": NodeListOf<HTMLHtmlElement>;
- "i": NodeListOf<HTMLElement>;
- "iframe": NodeListOf<HTMLIFrameElement>;
- "image": NodeListOf<SVGImageElement>;
- "img": NodeListOf<HTMLImageElement>;
- "input": NodeListOf<HTMLInputElement>;
- "ins": NodeListOf<HTMLModElement>;
- "isindex": NodeListOf<HTMLUnknownElement>;
- "kbd": NodeListOf<HTMLElement>;
- "keygen": NodeListOf<HTMLElement>;
- "label": NodeListOf<HTMLLabelElement>;
- "legend": NodeListOf<HTMLLegendElement>;
- "li": NodeListOf<HTMLLIElement>;
- "line": NodeListOf<SVGLineElement>;
- "lineargradient": NodeListOf<SVGLinearGradientElement>;
- "link": NodeListOf<HTMLLinkElement>;
- "listing": NodeListOf<HTMLPreElement>;
- "map": NodeListOf<HTMLMapElement>;
- "mark": NodeListOf<HTMLElement>;
- "marker": NodeListOf<SVGMarkerElement>;
- "marquee": NodeListOf<HTMLMarqueeElement>;
- "mask": NodeListOf<SVGMaskElement>;
- "menu": NodeListOf<HTMLMenuElement>;
- "meta": NodeListOf<HTMLMetaElement>;
- "metadata": NodeListOf<SVGMetadataElement>;
- "meter": NodeListOf<HTMLMeterElement>;
- "nav": NodeListOf<HTMLElement>;
- "nextid": NodeListOf<HTMLUnknownElement>;
- "nobr": NodeListOf<HTMLElement>;
- "noframes": NodeListOf<HTMLElement>;
- "noscript": NodeListOf<HTMLElement>;
- "object": NodeListOf<HTMLObjectElement>;
- "ol": NodeListOf<HTMLOListElement>;
- "optgroup": NodeListOf<HTMLOptGroupElement>;
- "option": NodeListOf<HTMLOptionElement>;
- "p": NodeListOf<HTMLParagraphElement>;
- "param": NodeListOf<HTMLParamElement>;
- "path": NodeListOf<SVGPathElement>;
- "pattern": NodeListOf<SVGPatternElement>;
- "picture": NodeListOf<HTMLPictureElement>;
- "plaintext": NodeListOf<HTMLElement>;
- "polygon": NodeListOf<SVGPolygonElement>;
- "polyline": NodeListOf<SVGPolylineElement>;
- "pre": NodeListOf<HTMLPreElement>;
- "progress": NodeListOf<HTMLProgressElement>;
- "q": NodeListOf<HTMLQuoteElement>;
- "radialgradient": NodeListOf<SVGRadialGradientElement>;
- "rect": NodeListOf<SVGRectElement>;
- "rt": NodeListOf<HTMLElement>;
- "ruby": NodeListOf<HTMLElement>;
- "s": NodeListOf<HTMLElement>;
- "samp": NodeListOf<HTMLElement>;
- "script": NodeListOf<HTMLScriptElement>;
- "section": NodeListOf<HTMLElement>;
- "select": NodeListOf<HTMLSelectElement>;
- "small": NodeListOf<HTMLElement>;
- "source": NodeListOf<HTMLSourceElement>;
- "span": NodeListOf<HTMLSpanElement>;
- "stop": NodeListOf<SVGStopElement>;
- "strike": NodeListOf<HTMLElement>;
- "strong": NodeListOf<HTMLElement>;
- "style": NodeListOf<HTMLStyleElement>;
- "sub": NodeListOf<HTMLElement>;
- "sup": NodeListOf<HTMLElement>;
- "svg": NodeListOf<SVGSVGElement>;
- "switch": NodeListOf<SVGSwitchElement>;
- "symbol": NodeListOf<SVGSymbolElement>;
- "table": NodeListOf<HTMLTableElement>;
- "tbody": NodeListOf<HTMLTableSectionElement>;
- "td": NodeListOf<HTMLTableDataCellElement>;
- "template": NodeListOf<HTMLTemplateElement>;
- "text": NodeListOf<SVGTextElement>;
- "textpath": NodeListOf<SVGTextPathElement>;
- "textarea": NodeListOf<HTMLTextAreaElement>;
- "tfoot": NodeListOf<HTMLTableSectionElement>;
- "th": NodeListOf<HTMLTableHeaderCellElement>;
- "thead": NodeListOf<HTMLTableSectionElement>;
- "title": NodeListOf<HTMLTitleElement>;
- "tr": NodeListOf<HTMLTableRowElement>;
- "track": NodeListOf<HTMLTrackElement>;
- "tspan": NodeListOf<SVGTSpanElement>;
- "tt": NodeListOf<HTMLElement>;
- "u": NodeListOf<HTMLElement>;
- "ul": NodeListOf<HTMLUListElement>;
- "use": NodeListOf<SVGUseElement>;
- "var": NodeListOf<HTMLElement>;
- "video": NodeListOf<HTMLVideoElement>;
- "view": NodeListOf<SVGViewElement>;
- "wbr": NodeListOf<HTMLElement>;
- "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
- "xmp": NodeListOf<HTMLPreElement>;
-}
-
-declare var Audio: {new(src?: string): HTMLAudioElement; };
-declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
-declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
-declare var applicationCache: ApplicationCache;
-declare var clientInformation: Navigator;
-declare var closed: boolean;
-declare var crypto: Crypto;
-declare var defaultStatus: string;
-declare var devicePixelRatio: number;
-declare var doNotTrack: string;
-declare var document: Document;
-declare var event: Event | undefined;
-declare var external: External;
-declare var frameElement: Element;
-declare var frames: Window;
-declare var history: History;
-declare var innerHeight: number;
-declare var innerWidth: number;
-declare var length: number;
-declare var location: Location;
-declare var locationbar: BarProp;
-declare var menubar: BarProp;
-declare var msCredentials: MSCredentials;
-declare const name: never;
-declare var navigator: Navigator;
-declare var offscreenBuffering: string | boolean;
-declare var onabort: (this: Window, ev: UIEvent) => any;
-declare var onafterprint: (this: Window, ev: Event) => any;
-declare var onbeforeprint: (this: Window, ev: Event) => any;
-declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
-declare var onblur: (this: Window, ev: FocusEvent) => any;
-declare var oncanplay: (this: Window, ev: Event) => any;
-declare var oncanplaythrough: (this: Window, ev: Event) => any;
-declare var onchange: (this: Window, ev: Event) => any;
-declare var onclick: (this: Window, ev: MouseEvent) => any;
-declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
-declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
-declare var ondblclick: (this: Window, ev: MouseEvent) => any;
-declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
-declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
-declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
-declare var ondrag: (this: Window, ev: DragEvent) => any;
-declare var ondragend: (this: Window, ev: DragEvent) => any;
-declare var ondragenter: (this: Window, ev: DragEvent) => any;
-declare var ondragleave: (this: Window, ev: DragEvent) => any;
-declare var ondragover: (this: Window, ev: DragEvent) => any;
-declare var ondragstart: (this: Window, ev: DragEvent) => any;
-declare var ondrop: (this: Window, ev: DragEvent) => any;
-declare var ondurationchange: (this: Window, ev: Event) => any;
-declare var onemptied: (this: Window, ev: Event) => any;
-declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
-declare var onerror: ErrorEventHandler;
-declare var onfocus: (this: Window, ev: FocusEvent) => any;
-declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
-declare var oninput: (this: Window, ev: Event) => any;
-declare var oninvalid: (this: Window, ev: Event) => any;
-declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
-declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
-declare var onload: (this: Window, ev: Event) => any;
-declare var onloadeddata: (this: Window, ev: Event) => any;
-declare var onloadedmetadata: (this: Window, ev: Event) => any;
-declare var onloadstart: (this: Window, ev: Event) => any;
-declare var onmessage: (this: Window, ev: MessageEvent) => any;
-declare var onmousedown: (this: Window, ev: MouseEvent) => any;
-declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
-declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
-declare var onmousemove: (this: Window, ev: MouseEvent) => any;
-declare var onmouseout: (this: Window, ev: MouseEvent) => any;
-declare var onmouseover: (this: Window, ev: MouseEvent) => any;
-declare var onmouseup: (this: Window, ev: MouseEvent) => any;
-declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
-declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
-declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
-declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
-declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
-declare var onoffline: (this: Window, ev: Event) => any;
-declare var ononline: (this: Window, ev: Event) => any;
-declare var onorientationchange: (this: Window, ev: Event) => any;
-declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
-declare var onpause: (this: Window, ev: Event) => any;
-declare var onplay: (this: Window, ev: Event) => any;
-declare var onplaying: (this: Window, ev: Event) => any;
-declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
-declare var onprogress: (this: Window, ev: ProgressEvent) => any;
-declare var onratechange: (this: Window, ev: Event) => any;
-declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
-declare var onreset: (this: Window, ev: Event) => any;
-declare var onresize: (this: Window, ev: UIEvent) => any;
-declare var onscroll: (this: Window, ev: UIEvent) => any;
-declare var onseeked: (this: Window, ev: Event) => any;
-declare var onseeking: (this: Window, ev: Event) => any;
-declare var onselect: (this: Window, ev: UIEvent) => any;
-declare var onstalled: (this: Window, ev: Event) => any;
-declare var onstorage: (this: Window, ev: StorageEvent) => any;
-declare var onsubmit: (this: Window, ev: Event) => any;
-declare var onsuspend: (this: Window, ev: Event) => any;
-declare var ontimeupdate: (this: Window, ev: Event) => any;
-declare var ontouchcancel: (ev: TouchEvent) => any;
-declare var ontouchend: (ev: TouchEvent) => any;
-declare var ontouchmove: (ev: TouchEvent) => any;
-declare var ontouchstart: (ev: TouchEvent) => any;
-declare var onunload: (this: Window, ev: Event) => any;
-declare var onvolumechange: (this: Window, ev: Event) => any;
-declare var onwaiting: (this: Window, ev: Event) => any;
-declare var opener: any;
-declare var orientation: string | number;
-declare var outerHeight: number;
-declare var outerWidth: number;
-declare var pageXOffset: number;
-declare var pageYOffset: number;
-declare var parent: Window;
-declare var performance: Performance;
-declare var personalbar: BarProp;
-declare var screen: Screen;
-declare var screenLeft: number;
-declare var screenTop: number;
-declare var screenX: number;
-declare var screenY: number;
-declare var scrollX: number;
-declare var scrollY: number;
-declare var scrollbars: BarProp;
-declare var self: Window;
-declare var status: string;
-declare var statusbar: BarProp;
-declare var styleMedia: StyleMedia;
-declare var toolbar: BarProp;
-declare var top: Window;
-declare var window: Window;
-declare function alert(message?: any): void;
-declare function blur(): void;
-declare function cancelAnimationFrame(handle: number): void;
-declare function captureEvents(): void;
-declare function close(): void;
-declare function confirm(message?: string): boolean;
-declare function focus(): void;
-declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
-declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
-declare function getSelection(): Selection;
-declare function matchMedia(mediaQuery: string): MediaQueryList;
-declare function moveBy(x?: number, y?: number): void;
-declare function moveTo(x?: number, y?: number): void;
-declare function msWriteProfilerMark(profilerMarkName: string): void;
-declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
-declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
-declare function print(): void;
-declare function prompt(message?: string, _default?: string): string | null;
-declare function releaseEvents(): void;
-declare function requestAnimationFrame(callback: FrameRequestCallback): number;
-declare function resizeBy(x?: number, y?: number): void;
-declare function resizeTo(x?: number, y?: number): void;
-declare function scroll(x?: number, y?: number): void;
-declare function scrollBy(x?: number, y?: number): void;
-declare function scrollTo(x?: number, y?: number): void;
-declare function webkitCancelAnimationFrame(handle: number): void;
-declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
-declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
-declare function scroll(options?: ScrollToOptions): void;
-declare function scrollTo(options?: ScrollToOptions): void;
-declare function scrollBy(options?: ScrollToOptions): void;
-declare function toString(): string;
-declare function dispatchEvent(evt: Event): boolean;
-declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-declare function clearInterval(handle: number): void;
-declare function clearTimeout(handle: number): void;
-declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
-declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
-declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
-declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-declare function clearImmediate(handle: number): void;
-declare function setImmediate(handler: (...args: any[]) => void): number;
-declare function setImmediate(handler: any, ...args: any[]): number;
-declare var sessionStorage: Storage;
-declare var localStorage: Storage;
-declare var console: Console;
-declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
-declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
-declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
-declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
-declare var onpointermove: (this: Window, ev: PointerEvent) => any;
-declare var onpointerout: (this: Window, ev: PointerEvent) => any;
-declare var onpointerover: (this: Window, ev: PointerEvent) => any;
-declare var onpointerup: (this: Window, ev: PointerEvent) => any;
-declare var onwheel: (this: Window, ev: WheelEvent) => any;
-declare var indexedDB: IDBFactory;
-declare function atob(encodedString: string): string;
-declare function btoa(rawString: string): string;
-declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-type AAGUID = string;
-type AlgorithmIdentifier = string | Algorithm;
-type ConstrainBoolean = boolean | ConstrainBooleanParameters;
-type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
-type ConstrainDouble = number | ConstrainDoubleRange;
-type ConstrainLong = number | ConstrainLongRange;
-type CryptoOperationData = ArrayBufferView;
-type GLbitfield = number;
-type GLboolean = boolean;
-type GLbyte = number;
-type GLclampf = number;
-type GLenum = number;
-type GLfloat = number;
-type GLint = number;
-type GLintptr = number;
-type GLshort = number;
-type GLsizei = number;
-type GLsizeiptr = number;
-type GLubyte = number;
-type GLuint = number;
-type GLushort = number;
-type IDBKeyPath = string;
-type KeyFormat = string;
-type KeyType = string;
-type KeyUsage = string;
-type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
-type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
-type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
-type RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;
-type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
-type payloadtype = number;
-type ScrollBehavior = "auto" | "instant" | "smooth";
-type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
-type IDBValidKey = number | string | Date | IDBArrayKey;
-type BufferSource = ArrayBuffer | ArrayBufferView;
-type MouseWheelEvent = WheelEvent;
+/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ readonly hasInstance: symbol;
+
+ /**
+ * A Boolean value that if true indicates that an object should flatten to its array elements
+ * by Array.prototype.concat.
+ */
+ readonly isConcatSpreadable: symbol;
+
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.match method.
+ */
+ readonly match: symbol;
+
+ /**
+ * A regular expression method that replaces matched substrings of a string. Called by the
+ * String.prototype.replace method.
+ */
+ readonly replace: symbol;
+
+ /**
+ * A regular expression method that returns the index within a string that matches the
+ * regular expression. Called by the String.prototype.search method.
+ */
+ readonly search: symbol;
+
+ /**
+ * A function valued property that is the constructor function that is used to create
+ * derived objects.
+ */
+ readonly species: symbol;
+
+ /**
+ * A regular expression method that splits a string at the indices that match the regular
+ * expression. Called by the String.prototype.split method.
+ */
+ readonly split: symbol;
+
+ /**
+ * A method that converts an object to a corresponding primitive value.
+ * Called by the ToPrimitive abstract operation.
+ */
+ readonly toPrimitive: symbol;
+
+ /**
+ * A String value that is used in the creation of the default string description of an object.
+ * Called by the built-in method Object.prototype.toString.
+ */
+ readonly toStringTag: symbol;
+
+ /**
+ * An Object whose own property names are property names that are excluded from the 'with'
+ * environment bindings of the associated objects.
+ */
+ readonly unscopables: symbol;
+}
+
+interface Symbol {
+ readonly [Symbol.toStringTag]: "Symbol";
+}
+
+interface Array<T> {
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface Map<K, V> {
+ readonly [Symbol.toStringTag]: "Map";
+}
+
+interface WeakMap<K extends object, V>{
+ readonly [Symbol.toStringTag]: "WeakMap";
+}
+
+interface Set<T> {
+ readonly [Symbol.toStringTag]: "Set";
+}
+
+interface WeakSet<T extends object> {
+ readonly [Symbol.toStringTag]: "WeakSet";
+}
+
+interface JSON {
+ readonly [Symbol.toStringTag]: "JSON";
+}
+
+interface Function {
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface GeneratorFunction {
+ readonly [Symbol.toStringTag]: "GeneratorFunction";
+}
+
+interface Math {
+ readonly [Symbol.toStringTag]: "Math";
+}
+
+interface Promise<T> {
+ readonly [Symbol.toStringTag]: "Promise";
+}
+
+interface PromiseConstructor {
+ readonly [Symbol.species]: Function;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+}
+
+interface RegExpConstructor {
+ [Symbol.species](): RegExpConstructor;
+}
+
+interface String {
+ /**
+ * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+}
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ readonly [Symbol.toStringTag]: "ArrayBuffer";
+}
+
+interface DataView {
+ readonly [Symbol.toStringTag]: "DataView";
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ readonly [Symbol.toStringTag]: "Int8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ readonly [Symbol.toStringTag]: "UInt8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ readonly [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ readonly [Symbol.toStringTag]: "Int16Array";
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ readonly [Symbol.toStringTag]: "Uint16Array";
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ readonly [Symbol.toStringTag]: "Int32Array";
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ readonly [Symbol.toStringTag]: "Uint32Array";
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ readonly [Symbol.toStringTag]: "Float32Array";
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ readonly [Symbol.toStringTag]: "Float64Array";
+}
+
+
+
+/////////////////////////////
+/// IE DOM APIs
+/////////////////////////////
+
+interface Account {
+ rpDisplayName?: string;
+ displayName?: string;
+ id?: string;
+ name?: string;
+ imageURL?: string;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AnimationEventInit extends EventInit {
+ animationName?: string;
+ elapsedTime?: number;
+}
+
+interface AssertionOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ allowList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface CacheQueryOptions {
+ ignoreSearch?: boolean;
+ ignoreMethod?: boolean;
+ ignoreVary?: boolean;
+ cacheName?: string;
+}
+
+interface ClientData {
+ challenge?: string;
+ origin?: string;
+ rpId?: string;
+ hashAlg?: string | Algorithm;
+ tokenBinding?: string;
+ extensions?: WebAuthnExtensions;
+}
+
+interface CloseEventInit extends EventInit {
+ wasClean?: boolean;
+ code?: number;
+ reason?: string;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainLongRange extends LongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainVideoFacingModeParameters {
+ exact?: VideoFacingModeEnum | VideoFacingModeEnum[];
+ ideal?: VideoFacingModeEnum | VideoFacingModeEnum[];
+}
+
+interface CustomEventInit extends EventInit {
+ detail?: any;
+}
+
+interface DOMRectInit {
+ x?: any;
+ y?: any;
+ width?: any;
+ height?: any;
+}
+
+interface DeviceAccelerationDict {
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DeviceLightEventInit extends EventInit {
+ value?: number;
+}
+
+interface DeviceMotionEventInit extends EventInit {
+ acceleration?: DeviceAccelerationDict;
+ accelerationIncludingGravity?: DeviceAccelerationDict;
+ rotationRate?: DeviceRotationRateDict;
+ interval?: number;
+}
+
+interface DeviceOrientationEventInit extends EventInit {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+ absolute?: boolean;
+}
+
+interface DeviceRotationRateDict {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+}
+
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
+interface ErrorEventInit extends EventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ colno?: number;
+ error?: any;
+}
+
+interface EventInit {
+ scoped?: boolean;
+ bubbles?: boolean;
+ cancelable?: boolean;
+}
+
+interface EventModifierInit extends UIEventInit {
+ ctrlKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierOS?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+}
+
+interface ExceptionInformation {
+ domain?: string;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget;
+}
+
+interface FocusNavigationEventInit extends EventInit {
+ navigationReason?: string;
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface FocusNavigationOrigin {
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+ originHeight?: number;
+}
+
+interface GamepadEventInit extends EventInit {
+ gamepad?: Gamepad;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: IDBKeyPath;
+}
+
+interface IntersectionObserverEntryInit {
+ time?: number;
+ rootBounds?: DOMRectInit;
+ boundingClientRect?: DOMRectInit;
+ intersectionRect?: DOMRectInit;
+ target?: Element;
+}
+
+interface IntersectionObserverInit {
+ root?: Element;
+ rootMargin?: string;
+ threshold?: number | number[];
+}
+
+interface KeyAlgorithm {
+ name?: string;
+}
+
+interface KeyboardEventInit extends EventModifierInit {
+ code?: string;
+ key?: string;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface LongRange {
+ max?: number;
+ min?: number;
+}
+
+interface MSAccountInfo {
+ rpDisplayName?: string;
+ userDisplayName?: string;
+ accountName?: string;
+ userId?: string;
+ accountImageUri?: string;
+}
+
+interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
+ networkSendQualityEventRatio?: number;
+ networkDelayEventRatio?: number;
+ cpuInsufficientEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceCaptureNotFunctioningEventRatio?: number;
+ deviceGlitchesEventRatio?: number;
+ deviceLowSNREventRatio?: number;
+ deviceLowSpeechLevelEventRatio?: number;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
+ deviceNearEndToEchoRatioEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ deviceRenderMuteEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
+ deviceHowlingEventCount?: number;
+}
+
+interface MSAudioRecvPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
+ packetReorderRatio?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ burstLossLength1?: number;
+ burstLossLength2?: number;
+ burstLossLength3?: number;
+ burstLossLength4?: number;
+ burstLossLength5?: number;
+ burstLossLength6?: number;
+ burstLossLength7?: number;
+ burstLossLength8OrHigher?: number;
+ fecRecvDistance1?: number;
+ fecRecvDistance2?: number;
+ fecRecvDistance3?: number;
+ ratioConcealedSamplesAvg?: number;
+ ratioStretchedSamplesAvg?: number;
+ ratioCompressedSamplesAvg?: number;
+}
+
+interface MSAudioRecvSignal {
+ initialSignalLevelRMS?: number;
+ recvSignalLevelCh1?: number;
+ recvNoiseLevelCh1?: number;
+ renderSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderLoopbackSignalLevel?: number;
+}
+
+interface MSAudioSendPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioSendSignal;
+ audioFECUsed?: boolean;
+ sendMutePercent?: number;
+}
+
+interface MSAudioSendSignal {
+ noiseLevel?: number;
+ sendSignalLevelCh1?: number;
+ sendNoiseLevelCh1?: number;
+}
+
+interface MSConnectivity {
+ iceType?: MSIceType;
+ iceWarningFlags?: MSIceWarningFlags;
+ relayAddress?: MSRelayAddress;
+}
+
+interface MSCredentialFilter {
+ accept?: MSCredentialSpec[];
+}
+
+interface MSCredentialParameters {
+ type?: MSCredentialType;
+}
+
+interface MSCredentialSpec {
+ type?: MSCredentialType;
+ id?: string;
+}
+
+interface MSDelay {
+ roundTrip?: number;
+ roundTripMax?: number;
+}
+
+interface MSDescription extends RTCStats {
+ connectivity?: MSConnectivity;
+ transport?: RTCIceProtocol;
+ networkconnectivity?: MSNetworkConnectivityInfo;
+ localAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ deviceDevName?: string;
+ reflexiveLocalIPAddr?: MSIPAddressInfo;
+}
+
+interface MSFIDOCredentialParameters extends MSCredentialParameters {
+ algorithm?: string | Algorithm;
+ authenticators?: AAGUID[];
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ port?: number;
+ manufacturerMacAddrMask?: string;
+}
+
+interface MSIceWarningFlags {
+ turnTcpTimedOut?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
+ allocationMessageIntegrityFailed?: boolean;
+ connCheckOtherError?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ noRelayServersConfigured?: boolean;
+ multipleRelayServersAttempted?: boolean;
+ portRangeExhausted?: boolean;
+ alternateServerReceived?: boolean;
+ pseudoTLSFailure?: boolean;
+ turnTurnTcpConnectivityFailed?: boolean;
+ useCandidateChecksFailed?: boolean;
+ fipsAllocationFailure?: boolean;
+}
+
+interface MSJitter {
+ interArrival?: number;
+ interArrivalMax?: number;
+ interArrivalSD?: number;
+}
+
+interface MSLocalClientEventBase extends RTCStats {
+ networkReceiveQualityEventRatio?: number;
+ networkBandwidthLowEventRatio?: number;
+}
+
+interface MSNetwork extends RTCStats {
+ jitter?: MSJitter;
+ delay?: MSDelay;
+ packetLoss?: MSPacketLoss;
+ utilization?: MSUtilization;
+}
+
+interface MSNetworkConnectivityInfo {
+ vpn?: boolean;
+ linkspeed?: number;
+ networkConnectionDetails?: string;
+}
+
+interface MSNetworkInterfaceType {
+ interfaceTypeEthernet?: boolean;
+ interfaceTypeWireless?: boolean;
+ interfaceTypePPP?: boolean;
+ interfaceTypeTunnel?: boolean;
+ interfaceTypeWWAN?: boolean;
+}
+
+interface MSOutboundNetwork extends MSNetwork {
+ appliedBandwidthLimit?: number;
+}
+
+interface MSPacketLoss {
+ lossRate?: number;
+ lossRateMax?: number;
+}
+
+interface MSPayloadBase extends RTCStats {
+ payloadDescription?: string;
+}
+
+interface MSPortRange {
+ min?: number;
+ max?: number;
+}
+
+interface MSRelayAddress {
+ relayAddress?: string;
+ port?: number;
+}
+
+interface MSSignatureParameters {
+ userPrompt?: string;
+}
+
+interface MSTransportDiagnosticsStats extends RTCStats {
+ baseAddress?: string;
+ localAddress?: string;
+ localSite?: string;
+ networkName?: string;
+ remoteAddress?: string;
+ remoteSite?: string;
+ localMR?: string;
+ remoteMR?: string;
+ iceWarningFlags?: MSIceWarningFlags;
+ portRangeMin?: number;
+ portRangeMax?: number;
+ localMRTCPPort?: number;
+ remoteMRTCPPort?: number;
+ stunVer?: number;
+ numConsentReqSent?: number;
+ numConsentReqReceived?: number;
+ numConsentRespSent?: number;
+ numConsentRespReceived?: number;
+ interfaces?: MSNetworkInterfaceType;
+ baseInterface?: MSNetworkInterfaceType;
+ protocol?: RTCIceProtocol;
+ localInterface?: MSNetworkInterfaceType;
+ localAddrType?: MSIceAddrType;
+ remoteAddrType?: MSIceAddrType;
+ iceRole?: RTCIceRole;
+ rtpRtcpMux?: boolean;
+ allocationTimeInMs?: number;
+ msRtcEngineVersion?: string;
+}
+
+interface MSUtilization {
+ packets?: number;
+ bandwidthEstimation?: number;
+ bandwidthEstimationMin?: number;
+ bandwidthEstimationMax?: number;
+ bandwidthEstimationStdDev?: number;
+ bandwidthEstimationAvg?: number;
+}
+
+interface MSVideoPayload extends MSPayloadBase {
+ resolution?: string;
+ videoBitRateAvg?: number;
+ videoBitRateMax?: number;
+ videoFrameRateAvg?: number;
+ videoPacketLossRate?: number;
+ durationSeconds?: number;
+}
+
+interface MSVideoRecvPayload extends MSVideoPayload {
+ videoFrameLossRate?: number;
+ recvCodecType?: string;
+ recvResolutionWidth?: number;
+ recvResolutionHeight?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
+ recvFrameRateAverage?: number;
+ recvBitRateMaximum?: number;
+ recvBitRateAverage?: number;
+ recvVideoStreamsMax?: number;
+ recvVideoStreamsMin?: number;
+ recvVideoStreamsMode?: number;
+ videoPostFECPLR?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ reorderBufferTotalPackets?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvFpsHarmonicAverage?: number;
+ recvNumResSwitches?: number;
+}
+
+interface MSVideoResolutionDistribution {
+ cifQuality?: number;
+ vgaQuality?: number;
+ h720Quality?: number;
+ h1080Quality?: number;
+ h1440Quality?: number;
+ h2160Quality?: number;
+}
+
+interface MSVideoSendPayload extends MSVideoPayload {
+ sendFrameRateAverage?: number;
+ sendBitRateMaximum?: number;
+ sendBitRateAverage?: number;
+ sendVideoStreamsMax?: number;
+ sendResolutionWidth?: number;
+ sendResolutionHeight?: number;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initDataType?: string;
+ initData?: ArrayBuffer;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ messageType?: MediaKeyMessageType;
+ message?: ArrayBuffer;
+}
+
+interface MediaKeySystemConfiguration {
+ initDataTypes?: string[];
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ persistentState?: MediaKeysRequirement;
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ video?: boolean | MediaTrackConstraints;
+ audio?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ width?: number | LongRange;
+ height?: number | LongRange;
+ aspectRatio?: number | DoubleRange;
+ frameRate?: number | DoubleRange;
+ facingMode?: string;
+ volume?: number | DoubleRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ echoCancellation?: boolean[];
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackConstraintSet {
+ width?: number | ConstrainLongRange;
+ height?: number | ConstrainLongRange;
+ aspectRatio?: number | ConstrainDoubleRange;
+ frameRate?: number | ConstrainDoubleRange;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ volume?: number | ConstrainDoubleRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ width?: number;
+ height?: number;
+ aspectRatio?: number;
+ frameRate?: number;
+ facingMode?: string;
+ volume?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ echoCancellation?: boolean;
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackSupportedConstraints {
+ width?: boolean;
+ height?: boolean;
+ aspectRatio?: boolean;
+ frameRate?: boolean;
+ facingMode?: boolean;
+ volume?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ echoCancellation?: boolean;
+ deviceId?: boolean;
+ groupId?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ source?: Window;
+ ports?: MessagePort[];
+}
+
+interface MouseEventInit extends EventModifierInit {
+ screenX?: number;
+ screenY?: number;
+ clientX?: number;
+ clientY?: number;
+ button?: number;
+ buttons?: number;
+ relatedTarget?: EventTarget;
+}
+
+interface MsZoomToOptions {
+ contentX?: number;
+ contentY?: number;
+ viewportX?: string;
+ viewportY?: string;
+ scaleFactor?: number;
+ animate?: string;
+}
+
+interface MutationObserverInit {
+ childList?: boolean;
+ attributes?: boolean;
+ characterData?: boolean;
+ subtree?: boolean;
+ attributeOldValue?: boolean;
+ characterDataOldValue?: boolean;
+ attributeFilter?: string[];
+}
+
+interface NotificationOptions {
+ dir?: NotificationDirection;
+ lang?: string;
+ body?: string;
+ tag?: string;
+ icon?: string;
+}
+
+interface ObjectURLOptions {
+ oneTimeOnly?: boolean;
+}
+
+interface PaymentCurrencyAmount {
+ currency?: string;
+ value?: string;
+ currencySystem?: string;
+}
+
+interface PaymentDetails {
+ total?: PaymentItem;
+ displayItems?: PaymentItem[];
+ shippingOptions?: PaymentShippingOption[];
+ modifiers?: PaymentDetailsModifier[];
+ error?: string;
+}
+
+interface PaymentDetailsModifier {
+ supportedMethods?: string[];
+ total?: PaymentItem;
+ additionalDisplayItems?: PaymentItem[];
+ data?: any;
+}
+
+interface PaymentItem {
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ pending?: boolean;
+}
+
+interface PaymentMethodData {
+ supportedMethods?: string[];
+ data?: any;
+}
+
+interface PaymentOptions {
+ requestPayerName?: boolean;
+ requestPayerEmail?: boolean;
+ requestPayerPhone?: boolean;
+ requestShipping?: boolean;
+ shippingType?: string;
+}
+
+interface PaymentRequestUpdateEventInit extends EventInit {
+}
+
+interface PaymentShippingOption {
+ id?: string;
+ label?: string;
+ amount?: PaymentCurrencyAmount;
+ selected?: boolean;
+}
+
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ pointerId?: number;
+ width?: number;
+ height?: number;
+ pressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ pointerType?: string;
+ isPrimary?: boolean;
+}
+
+interface PopStateEventInit extends EventInit {
+ state?: any;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ timeout?: number;
+ maximumAge?: number;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PushSubscriptionOptionsInit {
+ userVisibleOnly?: boolean;
+ applicationServerKey?: any;
+}
+
+interface RTCConfiguration {
+ iceServers?: RTCIceServer[];
+ iceTransportPolicy?: RTCIceTransportPolicy;
+ bundlePolicy?: RTCBundlePolicy;
+ peerIdentity?: string;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCDtlsParameters {
+ role?: RTCDtlsRole;
+ fingerprints?: RTCDtlsFingerprint[];
+}
+
+interface RTCIceCandidateAttributes extends RTCStats {
+ ipAddress?: string;
+ portNumber?: number;
+ transport?: string;
+ candidateType?: RTCStatsIceCandidateType;
+ priority?: number;
+ addressSourceUrl?: string;
+}
+
+interface RTCIceCandidateComplete {
+}
+
+interface RTCIceCandidateDictionary {
+ foundation?: string;
+ priority?: number;
+ ip?: string;
+ protocol?: RTCIceProtocol;
+ port?: number;
+ type?: RTCIceCandidateType;
+ tcpType?: RTCIceTcpCandidateType;
+ relatedAddress?: string;
+ relatedPort?: number;
+ msMTurnSessionId?: string;
+}
+
+interface RTCIceCandidateInit {
+ candidate?: string;
+ sdpMid?: string;
+ sdpMLineIndex?: number;
+}
+
+interface RTCIceCandidatePair {
+ local?: RTCIceCandidateDictionary;
+ remote?: RTCIceCandidateDictionary;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ transportId?: string;
+ localCandidateId?: string;
+ remoteCandidateId?: string;
+ state?: RTCStatsIceCandidatePairState;
+ priority?: number;
+ nominated?: boolean;
+ writable?: boolean;
+ readable?: boolean;
+ bytesSent?: number;
+ bytesReceived?: number;
+ roundTripTime?: number;
+ availableOutgoingBitrate?: number;
+ availableIncomingBitrate?: number;
+}
+
+interface RTCIceGatherOptions {
+ gatherPolicy?: RTCIceGatherPolicy;
+ iceservers?: RTCIceServer[];
+ portRange?: MSPortRange;
+}
+
+interface RTCIceParameters {
+ usernameFragment?: string;
+ password?: string;
+ iceLite?: boolean;
+}
+
+interface RTCIceServer {
+ urls?: any;
+ username?: string;
+ credential?: string;
+}
+
+interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsReceived?: number;
+ bytesReceived?: number;
+ packetsLost?: number;
+ jitter?: number;
+ fractionLost?: number;
+}
+
+interface RTCMediaStreamTrackStats extends RTCStats {
+ trackIdentifier?: string;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ frameWidth?: number;
+ frameHeight?: number;
+ framesPerSecond?: number;
+ framesSent?: number;
+ framesReceived?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesCorrupted?: number;
+ audioLevel?: number;
+ echoReturnLoss?: number;
+ echoReturnLossEnhancement?: number;
+}
+
+interface RTCOfferOptions {
+ offerToReceiveVideo?: number;
+ offerToReceiveAudio?: number;
+ voiceActivityDetection?: boolean;
+ iceRestart?: boolean;
+}
+
+interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsSent?: number;
+ bytesSent?: number;
+ targetBitrate?: number;
+ roundTripTime?: number;
+}
+
+interface RTCPeerConnectionIceEventInit extends EventInit {
+ candidate?: RTCIceCandidate;
+}
+
+interface RTCRTPStreamStats extends RTCStats {
+ ssrc?: string;
+ associateStatsId?: string;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ transportId?: string;
+ codecId?: string;
+ firCount?: number;
+ pliCount?: number;
+ nackCount?: number;
+ sliCount?: number;
+}
+
+interface RTCRtcpFeedback {
+ type?: string;
+ parameter?: string;
+}
+
+interface RTCRtcpParameters {
+ ssrc?: number;
+ cname?: string;
+ reducedSize?: boolean;
+ mux?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs?: RTCRtpCodecCapability[];
+ headerExtensions?: RTCRtpHeaderExtension[];
+ fecMechanisms?: string[];
+}
+
+interface RTCRtpCodecCapability {
+ name?: string;
+ kind?: string;
+ clockRate?: number;
+ preferredPayloadType?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+ options?: any;
+ maxTemporalLayers?: number;
+ maxSpatialLayers?: number;
+ svcMultiStreamSupport?: boolean;
+}
+
+interface RTCRtpCodecParameters {
+ name?: string;
+ payloadType?: any;
+ clockRate?: number;
+ maxptime?: number;
+ ptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+}
+
+interface RTCRtpContributingSource {
+ timestamp?: number;
+ csrc?: number;
+ audioLevel?: number;
+}
+
+interface RTCRtpEncodingParameters {
+ ssrc?: number;
+ codecPayloadType?: number;
+ fec?: RTCRtpFecParameters;
+ rtx?: RTCRtpRtxParameters;
+ priority?: number;
+ maxBitrate?: number;
+ minQuality?: number;
+ resolutionScale?: number;
+ framerateScale?: number;
+ maxFramerate?: number;
+ active?: boolean;
+ encodingId?: string;
+ dependencyEncodingIds?: string[];
+ ssrcRange?: RTCSsrcRange;
+}
+
+interface RTCRtpFecParameters {
+ ssrc?: number;
+ mechanism?: string;
+}
+
+interface RTCRtpHeaderExtension {
+ kind?: string;
+ uri?: string;
+ preferredId?: number;
+ preferredEncrypt?: boolean;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ uri?: string;
+ id?: number;
+ encrypt?: boolean;
+}
+
+interface RTCRtpParameters {
+ muxId?: string;
+ codecs?: RTCRtpCodecParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ encodings?: RTCRtpEncodingParameters[];
+ rtcp?: RTCRtcpParameters;
+ degradationPreference?: RTCDegradationPreference;
+}
+
+interface RTCRtpRtxParameters {
+ ssrc?: number;
+}
+
+interface RTCRtpUnhandled {
+ ssrc?: number;
+ payloadType?: number;
+ muxId?: string;
+}
+
+interface RTCSessionDescriptionInit {
+ type?: RTCSdpType;
+ sdp?: string;
+}
+
+interface RTCSrtpKeyParam {
+ keyMethod?: string;
+ keySalt?: string;
+ lifetime?: string;
+ mkiValue?: number;
+ mkiLength?: number;
+}
+
+interface RTCSrtpSdesParameters {
+ tag?: number;
+ cryptoSuite?: string;
+ keyParams?: RTCSrtpKeyParam[];
+ sessionParams?: string[];
+}
+
+interface RTCSsrcRange {
+ min?: number;
+ max?: number;
+}
+
+interface RTCStats {
+ timestamp?: number;
+ type?: RTCStatsType;
+ id?: string;
+ msType?: MSStatsType;
+}
+
+interface RTCStatsReport {
+}
+
+interface RTCTransportStats extends RTCStats {
+ bytesSent?: number;
+ bytesReceived?: number;
+ rtcpTransportStatsId?: string;
+ activeConnection?: boolean;
+ selectedCandidatePairId?: string;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ method?: string;
+ headers?: any;
+ body?: any;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ mode?: RequestMode;
+ credentials?: RequestCredentials;
+ cache?: RequestCache;
+ redirect?: RequestRedirect;
+ integrity?: string;
+ keepalive?: boolean;
+ window?: any;
+}
+
+interface ResponseInit {
+ status?: number;
+ statusText?: string;
+ headers?: any;
+}
+
+interface ScopedCredentialDescriptor {
+ type?: ScopedCredentialType;
+ id?: any;
+ transports?: Transport[];
+}
+
+interface ScopedCredentialOptions {
+ timeoutSeconds?: number;
+ rpId?: USVString;
+ excludeList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+}
+
+interface ScopedCredentialParameters {
+ type?: ScopedCredentialType;
+ algorithm?: string | Algorithm;
+}
+
+interface ServiceWorkerMessageEventInit extends EventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+ source?: ServiceWorker | MessagePort;
+ ports?: MessagePort[];
+}
+
+interface SpeechSynthesisEventInit extends EventInit {
+ utterance?: SpeechSynthesisUtterance;
+ charIndex?: number;
+ elapsedTime?: number;
+ name?: string;
+}
+
+interface StoreExceptionsInformation extends ExceptionInformation {
+ siteName?: string;
+ explanationString?: string;
+ detailURI?: string;
+}
+
+interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface TrackEventInit extends EventInit {
+ track?: VideoTrack | AudioTrack | TextTrack;
+}
+
+interface TransitionEventInit extends EventInit {
+ propertyName?: string;
+ elapsedTime?: number;
+}
+
+interface UIEventInit extends EventInit {
+ view?: Window;
+ detail?: number;
+}
+
+interface WebAuthnExtensions {
+}
+
+interface WebGLContextAttributes {
+ failIfMajorPerformanceCaveat?: boolean;
+ alpha?: boolean;
+ depth?: boolean;
+ stencil?: boolean;
+ antialias?: boolean;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+ deltaMode?: number;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface WebKitEntriesCallback {
+ (evt: Event): void;
+}
+
+interface WebKitErrorCallback {
+ (evt: Event): void;
+}
+
+interface WebKitFileCallback {
+ (evt: Event): void;
+}
+
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
+ drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
+ vertexAttribDivisorANGLE(index: number, divisor: number): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+declare var ANGLE_instanced_arrays: {
+ prototype: ANGLE_instanced_arrays;
+ new(): ANGLE_instanced_arrays;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ readonly frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(): AnalyserNode;
+}
+
+interface AnimationEvent extends Event {
+ readonly animationName: string;
+ readonly elapsedTime: number;
+ initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
+}
+
+interface ApplicationCacheEventMap {
+ "cached": Event;
+ "checking": Event;
+ "downloading": Event;
+ "error": Event;
+ "noupdate": Event;
+ "obsolete": Event;
+ "progress": ProgressEvent;
+ "updateready": Event;
+}
+
+interface ApplicationCache extends EventTarget {
+ oncached: (this: ApplicationCache, ev: Event) => any;
+ onchecking: (this: ApplicationCache, ev: Event) => any;
+ ondownloading: (this: ApplicationCache, ev: Event) => any;
+ onerror: (this: ApplicationCache, ev: Event) => any;
+ onnoupdate: (this: ApplicationCache, ev: Event) => any;
+ onobsolete: (this: ApplicationCache, ev: Event) => any;
+ onprogress: (this: ApplicationCache, ev: ProgressEvent) => any;
+ onupdateready: (this: ApplicationCache, ev: Event) => any;
+ readonly status: number;
+ abort(): void;
+ swapCache(): void;
+ update(): void;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+ addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ApplicationCache: {
+ prototype: ApplicationCache;
+ new(): ApplicationCache;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+}
+
+interface Attr extends Node {
+ readonly name: string;
+ readonly ownerElement: Element;
+ readonly prefix: string | null;
+ readonly specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+}
+
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(): AudioBuffer;
+}
+
+interface AudioBufferSourceNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface AudioBufferSourceNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ onended: (this: AudioBufferSourceNode, ev: MediaStreamErrorEvent) => any;
+ readonly playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof AudioBufferSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioBufferSourceNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(): AudioBufferSourceNode;
+}
+
+interface AudioContextEventMap {
+ "statechange": Event;
+}
+
+interface AudioContextBase extends EventTarget {
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ onstatechange: (this: AudioContext, ev: Event) => any;
+ readonly sampleRate: number;
+ readonly state: AudioContextState;
+ close(): Promise<void>;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
+ resume(): Promise<void>;
+ addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface AudioContext extends AudioContextBase {
+ suspend(): Promise<void>;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(): AudioContext;
+}
+
+interface AudioDestinationNode extends AudioNode {
+ readonly maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+}
+
+interface AudioListener {
+ dopplerFactor: number;
+ speedOfSound: number;
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+}
+
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: ChannelCountMode;
+ channelInterpretation: ChannelInterpretation;
+ readonly context: AudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
+ connect(destination: AudioNode, output?: number, input?: number): AudioNode;
+ connect(destination: AudioParam, output?: number): void;
+ disconnect(output?: number): void;
+ disconnect(destination: AudioNode, output?: number, input?: number): void;
+ disconnect(destination: AudioParam, output?: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+}
+
+interface AudioParam {
+ readonly defaultValue: number;
+ value: number;
+ cancelScheduledValues(startTime: number): AudioParam;
+ exponentialRampToValueAtTime(value: number, endTime: number): AudioParam;
+ linearRampToValueAtTime(value: number, endTime: number): AudioParam;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam;
+ setValueAtTime(value: number, startTime: number): AudioParam;
+ setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): AudioParam;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+}
+
+interface AudioProcessingEvent extends Event {
+ readonly inputBuffer: AudioBuffer;
+ readonly outputBuffer: AudioBuffer;
+ readonly playbackTime: number;
+}
+
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(): AudioProcessingEvent;
+}
+
+interface AudioTrack {
+ enabled: boolean;
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var AudioTrack: {
+ prototype: AudioTrack;
+ new(): AudioTrack;
+}
+
+interface AudioTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface AudioTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ onchange: (this: AudioTrackList, ev: Event) => any;
+ onremovetrack: (this: AudioTrackList, ev: TrackEvent) => any;
+ getTrackById(id: string): AudioTrack | null;
+ item(index: number): AudioTrack;
+ addEventListener<K extends keyof AudioTrackListEventMap>(type: K, listener: (this: AudioTrackList, ev: AudioTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: AudioTrack;
+}
+
+declare var AudioTrackList: {
+ prototype: AudioTrackList;
+ new(): AudioTrackList;
+}
+
+interface BarProp {
+ readonly visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+}
+
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+}
+
+interface BiquadFilterNode extends AudioNode {
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
+ type: BiquadFilterType;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(): BiquadFilterNode;
+}
+
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
+}
+
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+}
+
+interface CSS {
+ supports(property: string, value?: string): boolean;
+}
+declare var CSS: CSS;
+
+interface CSSConditionRule extends CSSGroupingRule {
+ conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+}
+
+interface CSSFontFaceRule extends CSSRule {
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+}
+
+interface CSSGroupingRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+}
+
+interface CSSImportRule extends CSSRule {
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+}
+
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+}
+
+interface CSSKeyframesRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(rule: string): void;
+ findRule(rule: string): CSSKeyframeRule;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+}
+
+interface CSSMediaRule extends CSSConditionRule {
+ readonly media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+}
+
+interface CSSNamespaceRule extends CSSRule {
+ readonly namespaceURI: string;
+ readonly prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+}
+
+interface CSSPageRule extends CSSRule {
+ readonly pseudoClass: string;
+ readonly selector: string;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+}
+
+interface CSSRule {
+ cssText: string;
+ readonly parentRule: CSSRule;
+ readonly parentStyleSheet: CSSStyleSheet;
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
+}
+
+interface CSSRuleList {
+ readonly length: number;
+ item(index: number): CSSRule;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+}
+
+interface CSSStyleDeclaration {
+ alignContent: string | null;
+ alignItems: string | null;
+ alignSelf: string | null;
+ alignmentBaseline: string | null;
+ animation: string | null;
+ animationDelay: string | null;
+ animationDirection: string | null;
+ animationDuration: string | null;
+ animationFillMode: string | null;
+ animationIterationCount: string | null;
+ animationName: string | null;
+ animationPlayState: string | null;
+ animationTimingFunction: string | null;
+ backfaceVisibility: string | null;
+ background: string | null;
+ backgroundAttachment: string | null;
+ backgroundClip: string | null;
+ backgroundColor: string | null;
+ backgroundImage: string | null;
+ backgroundOrigin: string | null;
+ backgroundPosition: string | null;
+ backgroundPositionX: string | null;
+ backgroundPositionY: string | null;
+ backgroundRepeat: string | null;
+ backgroundSize: string | null;
+ baselineShift: string | null;
+ border: string | null;
+ borderBottom: string | null;
+ borderBottomColor: string | null;
+ borderBottomLeftRadius: string | null;
+ borderBottomRightRadius: string | null;
+ borderBottomStyle: string | null;
+ borderBottomWidth: string | null;
+ borderCollapse: string | null;
+ borderColor: string | null;
+ borderImage: string | null;
+ borderImageOutset: string | null;
+ borderImageRepeat: string | null;
+ borderImageSlice: string | null;
+ borderImageSource: string | null;
+ borderImageWidth: string | null;
+ borderLeft: string | null;
+ borderLeftColor: string | null;
+ borderLeftStyle: string | null;
+ borderLeftWidth: string | null;
+ borderRadius: string | null;
+ borderRight: string | null;
+ borderRightColor: string | null;
+ borderRightStyle: string | null;
+ borderRightWidth: string | null;
+ borderSpacing: string | null;
+ borderStyle: string | null;
+ borderTop: string | null;
+ borderTopColor: string | null;
+ borderTopLeftRadius: string | null;
+ borderTopRightRadius: string | null;
+ borderTopStyle: string | null;
+ borderTopWidth: string | null;
+ borderWidth: string | null;
+ bottom: string | null;
+ boxShadow: string | null;
+ boxSizing: string | null;
+ breakAfter: string | null;
+ breakBefore: string | null;
+ breakInside: string | null;
+ captionSide: string | null;
+ clear: string | null;
+ clip: string | null;
+ clipPath: string | null;
+ clipRule: string | null;
+ color: string | null;
+ colorInterpolationFilters: string | null;
+ columnCount: any;
+ columnFill: string | null;
+ columnGap: any;
+ columnRule: string | null;
+ columnRuleColor: any;
+ columnRuleStyle: string | null;
+ columnRuleWidth: any;
+ columnSpan: string | null;
+ columnWidth: any;
+ columns: string | null;
+ content: string | null;
+ counterIncrement: string | null;
+ counterReset: string | null;
+ cssFloat: string | null;
+ cssText: string;
+ cursor: string | null;
+ direction: string | null;
+ display: string | null;
+ dominantBaseline: string | null;
+ emptyCells: string | null;
+ enableBackground: string | null;
+ fill: string | null;
+ fillOpacity: string | null;
+ fillRule: string | null;
+ filter: string | null;
+ flex: string | null;
+ flexBasis: string | null;
+ flexDirection: string | null;
+ flexFlow: string | null;
+ flexGrow: string | null;
+ flexShrink: string | null;
+ flexWrap: string | null;
+ floodColor: string | null;
+ floodOpacity: string | null;
+ font: string | null;
+ fontFamily: string | null;
+ fontFeatureSettings: string | null;
+ fontSize: string | null;
+ fontSizeAdjust: string | null;
+ fontStretch: string | null;
+ fontStyle: string | null;
+ fontVariant: string | null;
+ fontWeight: string | null;
+ glyphOrientationHorizontal: string | null;
+ glyphOrientationVertical: string | null;
+ height: string | null;
+ imeMode: string | null;
+ justifyContent: string | null;
+ kerning: string | null;
+ layoutGrid: string | null;
+ layoutGridChar: string | null;
+ layoutGridLine: string | null;
+ layoutGridMode: string | null;
+ layoutGridType: string | null;
+ left: string | null;
+ readonly length: number;
+ letterSpacing: string | null;
+ lightingColor: string | null;
+ lineBreak: string | null;
+ lineHeight: string | null;
+ listStyle: string | null;
+ listStyleImage: string | null;
+ listStylePosition: string | null;
+ listStyleType: string | null;
+ margin: string | null;
+ marginBottom: string | null;
+ marginLeft: string | null;
+ marginRight: string | null;
+ marginTop: string | null;
+ marker: string | null;
+ markerEnd: string | null;
+ markerMid: string | null;
+ markerStart: string | null;
+ mask: string | null;
+ maxHeight: string | null;
+ maxWidth: string | null;
+ minHeight: string | null;
+ minWidth: string | null;
+ msContentZoomChaining: string | null;
+ msContentZoomLimit: string | null;
+ msContentZoomLimitMax: any;
+ msContentZoomLimitMin: any;
+ msContentZoomSnap: string | null;
+ msContentZoomSnapPoints: string | null;
+ msContentZoomSnapType: string | null;
+ msContentZooming: string | null;
+ msFlowFrom: string | null;
+ msFlowInto: string | null;
+ msFontFeatureSettings: string | null;
+ msGridColumn: any;
+ msGridColumnAlign: string | null;
+ msGridColumnSpan: any;
+ msGridColumns: string | null;
+ msGridRow: any;
+ msGridRowAlign: string | null;
+ msGridRowSpan: any;
+ msGridRows: string | null;
+ msHighContrastAdjust: string | null;
+ msHyphenateLimitChars: string | null;
+ msHyphenateLimitLines: any;
+ msHyphenateLimitZone: any;
+ msHyphens: string | null;
+ msImeAlign: string | null;
+ msOverflowStyle: string | null;
+ msScrollChaining: string | null;
+ msScrollLimit: string | null;
+ msScrollLimitXMax: any;
+ msScrollLimitXMin: any;
+ msScrollLimitYMax: any;
+ msScrollLimitYMin: any;
+ msScrollRails: string | null;
+ msScrollSnapPointsX: string | null;
+ msScrollSnapPointsY: string | null;
+ msScrollSnapType: string | null;
+ msScrollSnapX: string | null;
+ msScrollSnapY: string | null;
+ msScrollTranslation: string | null;
+ msTextCombineHorizontal: string | null;
+ msTextSizeAdjust: any;
+ msTouchAction: string | null;
+ msTouchSelect: string | null;
+ msUserSelect: string | null;
+ msWrapFlow: string;
+ msWrapMargin: any;
+ msWrapThrough: string;
+ opacity: string | null;
+ order: string | null;
+ orphans: string | null;
+ outline: string | null;
+ outlineColor: string | null;
+ outlineOffset: string | null;
+ outlineStyle: string | null;
+ outlineWidth: string | null;
+ overflow: string | null;
+ overflowX: string | null;
+ overflowY: string | null;
+ padding: string | null;
+ paddingBottom: string | null;
+ paddingLeft: string | null;
+ paddingRight: string | null;
+ paddingTop: string | null;
+ pageBreakAfter: string | null;
+ pageBreakBefore: string | null;
+ pageBreakInside: string | null;
+ readonly parentRule: CSSRule;
+ perspective: string | null;
+ perspectiveOrigin: string | null;
+ pointerEvents: string | null;
+ position: string | null;
+ quotes: string | null;
+ right: string | null;
+ rotate: string | null;
+ rubyAlign: string | null;
+ rubyOverhang: string | null;
+ rubyPosition: string | null;
+ scale: string | null;
+ stopColor: string | null;
+ stopOpacity: string | null;
+ stroke: string | null;
+ strokeDasharray: string | null;
+ strokeDashoffset: string | null;
+ strokeLinecap: string | null;
+ strokeLinejoin: string | null;
+ strokeMiterlimit: string | null;
+ strokeOpacity: string | null;
+ strokeWidth: string | null;
+ tableLayout: string | null;
+ textAlign: string | null;
+ textAlignLast: string | null;
+ textAnchor: string | null;
+ textDecoration: string | null;
+ textIndent: string | null;
+ textJustify: string | null;
+ textKashida: string | null;
+ textKashidaSpace: string | null;
+ textOverflow: string | null;
+ textShadow: string | null;
+ textTransform: string | null;
+ textUnderlinePosition: string | null;
+ top: string | null;
+ touchAction: string | null;
+ transform: string | null;
+ transformOrigin: string | null;
+ transformStyle: string | null;
+ transition: string | null;
+ transitionDelay: string | null;
+ transitionDuration: string | null;
+ transitionProperty: string | null;
+ transitionTimingFunction: string | null;
+ translate: string | null;
+ unicodeBidi: string | null;
+ verticalAlign: string | null;
+ visibility: string | null;
+ webkitAlignContent: string | null;
+ webkitAlignItems: string | null;
+ webkitAlignSelf: string | null;
+ webkitAnimation: string | null;
+ webkitAnimationDelay: string | null;
+ webkitAnimationDirection: string | null;
+ webkitAnimationDuration: string | null;
+ webkitAnimationFillMode: string | null;
+ webkitAnimationIterationCount: string | null;
+ webkitAnimationName: string | null;
+ webkitAnimationPlayState: string | null;
+ webkitAnimationTimingFunction: string | null;
+ webkitAppearance: string | null;
+ webkitBackfaceVisibility: string | null;
+ webkitBackgroundClip: string | null;
+ webkitBackgroundOrigin: string | null;
+ webkitBackgroundSize: string | null;
+ webkitBorderBottomLeftRadius: string | null;
+ webkitBorderBottomRightRadius: string | null;
+ webkitBorderImage: string | null;
+ webkitBorderRadius: string | null;
+ webkitBorderTopLeftRadius: string | null;
+ webkitBorderTopRightRadius: string | null;
+ webkitBoxAlign: string | null;
+ webkitBoxDirection: string | null;
+ webkitBoxFlex: string | null;
+ webkitBoxOrdinalGroup: string | null;
+ webkitBoxOrient: string | null;
+ webkitBoxPack: string | null;
+ webkitBoxSizing: string | null;
+ webkitColumnBreakAfter: string | null;
+ webkitColumnBreakBefore: string | null;
+ webkitColumnBreakInside: string | null;
+ webkitColumnCount: any;
+ webkitColumnGap: any;
+ webkitColumnRule: string | null;
+ webkitColumnRuleColor: any;
+ webkitColumnRuleStyle: string | null;
+ webkitColumnRuleWidth: any;
+ webkitColumnSpan: string | null;
+ webkitColumnWidth: any;
+ webkitColumns: string | null;
+ webkitFilter: string | null;
+ webkitFlex: string | null;
+ webkitFlexBasis: string | null;
+ webkitFlexDirection: string | null;
+ webkitFlexFlow: string | null;
+ webkitFlexGrow: string | null;
+ webkitFlexShrink: string | null;
+ webkitFlexWrap: string | null;
+ webkitJustifyContent: string | null;
+ webkitOrder: string | null;
+ webkitPerspective: string | null;
+ webkitPerspectiveOrigin: string | null;
+ webkitTapHighlightColor: string | null;
+ webkitTextFillColor: string | null;
+ webkitTextSizeAdjust: any;
+ webkitTextStroke: string | null;
+ webkitTextStrokeColor: string | null;
+ webkitTextStrokeWidth: string | null;
+ webkitTransform: string | null;
+ webkitTransformOrigin: string | null;
+ webkitTransformStyle: string | null;
+ webkitTransition: string | null;
+ webkitTransitionDelay: string | null;
+ webkitTransitionDuration: string | null;
+ webkitTransitionProperty: string | null;
+ webkitTransitionTimingFunction: string | null;
+ webkitUserModify: string | null;
+ webkitUserSelect: string | null;
+ webkitWritingMode: string | null;
+ whiteSpace: string | null;
+ widows: string | null;
+ width: string | null;
+ wordBreak: string | null;
+ wordSpacing: string | null;
+ wordWrap: string | null;
+ writingMode: string | null;
+ zIndex: string | null;
+ zoom: string | null;
+ resize: string | null;
+ userSelect: string | null;
+ getPropertyPriority(propertyName: string): string;
+ getPropertyValue(propertyName: string): string;
+ item(index: number): string;
+ removeProperty(propertyName: string): string;
+ setProperty(propertyName: string, value: string | null, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+}
+
+interface CSSStyleRule extends CSSRule {
+ readonly readOnly: boolean;
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+}
+
+interface CSSStyleSheet extends StyleSheet {
+ readonly cssRules: CSSRuleList;
+ cssText: string;
+ readonly id: string;
+ readonly imports: StyleSheetList;
+ readonly isAlternate: boolean;
+ readonly isPrefAlternate: boolean;
+ readonly ownerRule: CSSRule;
+ readonly owningElement: Element;
+ readonly pages: StyleSheetPageList;
+ readonly readOnly: boolean;
+ readonly rules: CSSRuleList;
+ addImport(bstrURL: string, lIndex?: number): number;
+ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
+ addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
+ deleteRule(index?: number): void;
+ insertRule(rule: string, index?: number): number;
+ removeImport(lIndex: number): void;
+ removeRule(lIndex: number): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(): CSSStyleSheet;
+}
+
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+}
+
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+}
+
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+}
+
+interface CanvasGradient {
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+}
+
+interface CanvasPattern {
+ setTransform(matrix: SVGMatrix): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+}
+
+interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
+ readonly canvas: HTMLCanvasElement;
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ font: string;
+ globalAlpha: number;
+ globalCompositeOperation: string;
+ imageSmoothingEnabled: boolean;
+ lineCap: string;
+ lineDashOffset: number;
+ lineJoin: string;
+ lineWidth: number;
+ miterLimit: number;
+ msFillRule: CanvasFillRule;
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ textAlign: string;
+ textBaseline: string;
+ mozImageSmoothingEnabled: boolean;
+ webkitImageSmoothingEnabled: boolean;
+ oImageSmoothingEnabled: boolean;
+ beginPath(): void;
+ clearRect(x: number, y: number, w: number, h: number): void;
+ clip(fillRule?: CanvasFillRule): void;
+ createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+ drawFocusIfNeeded(element: Element): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ getLineDash(): number[];
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ measureText(text: string): TextMetrics;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
+ restore(): void;
+ rotate(angle: number): void;
+ save(): void;
+ scale(x: number, y: number): void;
+ setLineDash(segments: number[]): void;
+ setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ stroke(path?: Path2D): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+ transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ translate(x: number, y: number): void;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+}
+
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(): ChannelMergerNode;
+}
+
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(): ChannelSplitterNode;
+}
+
+interface CharacterData extends Node, ChildNode {
+ data: string;
+ readonly length: number;
+ appendData(arg: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, arg: string): void;
+ replaceData(offset: number, count: number, arg: string): void;
+ substringData(offset: number, count: number): string;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+}
+
+interface ClientRect {
+ bottom: number;
+ readonly height: number;
+ left: number;
+ right: number;
+ top: number;
+ readonly width: number;
+}
+
+declare var ClientRect: {
+ prototype: ClientRect;
+ new(): ClientRect;
+}
+
+interface ClientRectList {
+ readonly length: number;
+ item(index: number): ClientRect;
+ [index: number]: ClientRect;
+}
+
+declare var ClientRectList: {
+ prototype: ClientRectList;
+ new(): ClientRectList;
+}
+
+interface ClipboardEvent extends Event {
+ readonly clipboardData: DataTransfer;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+}
+
+interface CloseEvent extends Event {
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
+}
+
+interface Comment extends CharacterData {
+ text: string;
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(): Comment;
+}
+
+interface CompositionEvent extends UIEvent {
+ readonly data: string;
+ readonly locale: string;
+ initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+}
+
+interface Console {
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
+ clear(): void;
+ count(countTitle?: string): void;
+ debug(message?: any, ...optionalParams: any[]): void;
+ dir(value?: any, ...optionalParams: any[]): void;
+ dirxml(value: any): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(groupTitle?: string): void;
+ groupCollapsed(groupTitle?: string): void;
+ groupEnd(): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ msIsIndependentlyComposed(element: Element): boolean;
+ profile(reportName?: string): void;
+ profileEnd(): void;
+ select(element: Element): void;
+ table(...data: any[]): void;
+ time(timerName?: string): void;
+ timeEnd(timerName?: string): void;
+ trace(message?: any, ...optionalParams: any[]): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var Console: {
+ prototype: Console;
+ new(): Console;
+}
+
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(): ConvolverNode;
+}
+
+interface Coordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+declare var Coordinates: {
+ prototype: Coordinates;
+ new(): Coordinates;
+}
+
+interface Crypto extends Object, RandomSource {
+ readonly subtle: SubtleCrypto;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+}
+
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: string;
+ readonly usages: string[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+declare var CryptoKeyPair: {
+ prototype: CryptoKeyPair;
+ new(): CryptoKeyPair;
+}
+
+interface CustomEvent extends Event {
+ readonly detail: any;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
+}
+
+interface DOMError {
+ readonly name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+}
+
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ toString(): string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+interface DOMImplementation {
+ createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title: string): Document;
+ hasFeature(feature: string | null, version: string | null): boolean;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+}
+
+interface DOMParser {
+ parseFromString(source: string, mimeType: string): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+}
+
+interface DOMSettableTokenList extends DOMTokenList {
+ value: string;
+}
+
+declare var DOMSettableTokenList: {
+ prototype: DOMSettableTokenList;
+ new(): DOMSettableTokenList;
+}
+
+interface DOMStringList {
+ readonly length: number;
+ contains(str: string): boolean;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+}
+
+interface DOMStringMap {
+ [name: string]: string | undefined;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+}
+
+interface DOMTokenList {
+ readonly length: number;
+ add(...token: string[]): void;
+ contains(token: string): boolean;
+ item(index: number): string;
+ remove(...token: string[]): void;
+ toString(): string;
+ toggle(token: string, force?: boolean): boolean;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+}
+
+interface DataCue extends TextTrackCue {
+ data: ArrayBuffer;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DataCue: {
+ prototype: DataCue;
+ new(): DataCue;
+}
+
+interface DataTransfer {
+ dropEffect: string;
+ effectAllowed: string;
+ readonly files: FileList;
+ readonly items: DataTransferItemList;
+ readonly types: string[];
+ clearData(format?: string): boolean;
+ getData(format: string): string;
+ setData(format: string, data: string): boolean;
+ setDragImage(image: Element, x: number, y: number): void;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+}
+
+interface DataTransferItem {
+ readonly kind: string;
+ readonly type: string;
+ getAsFile(): File | null;
+ getAsString(_callback: FunctionStringCallback | null): void;
+ webkitGetAsEntry(): any;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+}
+
+interface DataTransferItemList {
+ readonly length: number;
+ add(data: File): DataTransferItem | null;
+ clear(): void;
+ item(index: number): DataTransferItem;
+ remove(index: number): void;
+ [index: number]: DataTransferItem;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+}
+
+interface DeferredPermissionRequest {
+ readonly id: number;
+ readonly type: MSWebViewPermissionType;
+ readonly uri: string;
+ allow(): void;
+ deny(): void;
+}
+
+declare var DeferredPermissionRequest: {
+ prototype: DeferredPermissionRequest;
+ new(): DeferredPermissionRequest;
+}
+
+interface DelayNode extends AudioNode {
+ readonly delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(): DelayNode;
+}
+
+interface DeviceAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+declare var DeviceAcceleration: {
+ prototype: DeviceAcceleration;
+ new(): DeviceAcceleration;
+}
+
+interface DeviceLightEvent extends Event {
+ readonly value: number;
+}
+
+declare var DeviceLightEvent: {
+ prototype: DeviceLightEvent;
+ new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
+}
+
+interface DeviceMotionEvent extends Event {
+ readonly acceleration: DeviceAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceAcceleration | null;
+ readonly interval: number | null;
+ readonly rotationRate: DeviceRotationRate | null;
+ initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
+}
+
+interface DeviceOrientationEvent extends Event {
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+ initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
+}
+
+interface DeviceRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceRotationRate: {
+ prototype: DeviceRotationRate;
+ new(): DeviceRotationRate;
+}
+
+interface DocumentEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforedeactivate": UIEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "mssitemodejumplistitemremoved": MSSiteModeEvent;
+ "msthumbnailclick": MSSiteModeEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "pointerlockchange": Event;
+ "pointerlockerror": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectionchange": Event;
+ "selectstart": Event;
+ "stalled": Event;
+ "stop": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "volumechange": Event;
+ "waiting": Event;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot {
+ /**
+ * Sets or gets the URL for the current document.
+ */
+ readonly URL: string;
+ /**
+ * Gets the URL for the document, stripped of any character encoding.
+ */
+ readonly URLUnencoded: string;
+ /**
+ * Gets the object that has the focus when the parent document has focus.
+ */
+ readonly activeElement: Element;
+ /**
+ * Sets or gets the color of all active links in the document.
+ */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ */
+ readonly all: HTMLAllCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ */
+ anchors: HTMLCollectionOf<HTMLAnchorElement>;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ */
+ applets: HTMLCollectionOf<HTMLAppletElement>;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ */
+ bgColor: string;
+ /**
+ * Specifies the beginning and end of the document body.
+ */
+ body: HTMLElement;
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets a value that indicates whether standards-compliant mode is switched on for the object.
+ */
+ readonly compatMode: string;
+ cookie: string;
+ readonly currentScript: HTMLScriptElement | SVGScriptElement;
+ readonly defaultView: Window;
+ /**
+ * Sets or gets a value that indicates whether the document can be edited.
+ */
+ designMode: string;
+ /**
+ * Sets or retrieves a value that indicates the reading order of the object.
+ */
+ dir: string;
+ /**
+ * Gets an object representing the document type declaration associated with the current document.
+ */
+ readonly doctype: DocumentType;
+ /**
+ * Gets a reference to the root node of the document.
+ */
+ documentElement: HTMLElement;
+ /**
+ * Sets or gets the security domain of the document.
+ */
+ domain: string;
+ /**
+ * Retrieves a collection of all embed objects in the document.
+ */
+ embeds: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ */
+ fgColor: string;
+ /**
+ * Retrieves a collection, in source order, of all form objects in the document.
+ */
+ forms: HTMLCollectionOf<HTMLFormElement>;
+ readonly fullscreenElement: Element | null;
+ readonly fullscreenEnabled: boolean;
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
+ /**
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
+ images: HTMLCollectionOf<HTMLImageElement>;
+ /**
+ * Gets the implementation object of the current document.
+ */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ */
+ readonly inputEncoding: string | null;
+ /**
+ * Gets the date that the page was last modified, if the page supplies one.
+ */
+ readonly lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ */
+ linkColor: string;
+ /**
+ * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
+ */
+ links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
+ /**
+ * Contains information about the current URL.
+ */
+ readonly location: Location;
+ msCSSOMElementFloatMetrics: boolean;
+ msCapsLockWarningOff: boolean;
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object is set as the active element.
+ * @param ev The event.
+ */
+ onactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the object is set as the active element.
+ * @param ev The event.
+ */
+ onbeforeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The event.
+ */
+ onbeforedeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: (this: Document, ev: FocusEvent) => any;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: (this: Document, ev: Event) => any;
+ oncanplaythrough: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: (this: Document, ev: PointerEvent) => any;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The UI Event
+ */
+ ondeactivate: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: (this: Document, ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: (this: Document, ev: DragEvent) => any;
+ ondrop: (this: Document, ev: DragEvent) => any;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: (this: Document, ev: MediaStreamErrorEvent) => any;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: (this: Document, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: (this: Document, ev: FocusEvent) => any;
+ onfullscreenchange: (this: Document, ev: Event) => any;
+ onfullscreenerror: (this: Document, ev: Event) => any;
+ oninput: (this: Document, ev: Event) => any;
+ oninvalid: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+ onkeypress: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: (this: Document, ev: KeyboardEvent) => any;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: (this: Document, ev: MouseEvent) => any;
+ /**
+ * Fires when the wheel button is rotated.
+ * @param ev The mouse event
+ */
+ onmousewheel: (this: Document, ev: WheelEvent) => any;
+ onmscontentzoom: (this: Document, ev: UIEvent) => any;
+ onmsgesturechange: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Document, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Document, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Document, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Document, ev: MSGestureEvent) => any;
+ onmsmanipulationstatechanged: (this: Document, ev: MSManipulationEvent) => any;
+ onmspointercancel: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Document, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Document, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Document, ev: MSPointerEvent) => any;
+ /**
+ * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmssitemodejumplistitemremoved: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: (this: Document, ev: Event) => any;
+ onpointerlockchange: (this: Document, ev: Event) => any;
+ onpointerlockerror: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: (this: Document, ev: ProgressEvent) => any;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: (this: Document, ev: UIEvent) => any;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: (this: Document, ev: UIEvent) => any;
+ /**
+ * Fires when the selection state of a document changes.
+ * @param ev The event.
+ */
+ onselectionchange: (this: Document, ev: Event) => any;
+ onselectstart: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: (this: Document, ev: Event) => any;
+ /**
+ * Fires when the user clicks the Stop button or leaves the Web page.
+ * @param ev The event.
+ */
+ onstop: (this: Document, ev: Event) => any;
+ onsubmit: (this: Document, ev: Event) => any;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: (this: Document, ev: Event) => any;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: (this: Document, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: (this: Document, ev: Event) => any;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: (this: Document, ev: Event) => any;
+ onwebkitfullscreenchange: (this: Document, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Document, ev: Event) => any;
+ plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ readonly pointerLockElement: Element;
+ /**
+ * Retrieves a value that indicates the current state of the object.
+ */
+ readonly readyState: string;
+ /**
+ * Gets the URL of the location that referred the user to the current page.
+ */
+ readonly referrer: string;
+ /**
+ * Gets the root svg element in the document hierarchy.
+ */
+ readonly rootElement: SVGSVGElement;
+ /**
+ * Retrieves a collection of all script objects in the document.
+ */
+ scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
+ /**
+ * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
+ */
+ readonly styleSheets: StyleSheetList;
+ /**
+ * Contains the title of the document.
+ */
+ title: string;
+ readonly visibilityState: VisibilityState;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
+ vlinkColor: string;
+ readonly webkitCurrentFullScreenElement: Element | null;
+ readonly webkitFullscreenElement: Element | null;
+ readonly webkitFullscreenEnabled: boolean;
+ readonly webkitIsFullScreen: boolean;
+ readonly xmlEncoding: string | null;
+ xmlStandalone: boolean;
+ /**
+ * Gets or sets the version attribute specified in the declaration of an XML document.
+ */
+ xmlVersion: string | null;
+ adoptNode<T extends Node>(source: T): T;
+ captureEvents(): void;
+ caretRangeFromPoint(x: number, y: number): Range;
+ clear(): void;
+ /**
+ * Closes an output stream and forces the sent data to display.
+ */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(name: string): Attr;
+ createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /**
+ * Creates a new document.
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K];
+ createElement(tagName: string): HTMLElement;
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
+ createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
+ */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
+ createTouchList(...touches: Touch[]): TouchList;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
+ /**
+ * Displays help information for the given command identifier.
+ * @param commandId Displays help information for the given command identifier.
+ */
+ execCommandShowHelp(commandId: string): boolean;
+ exitFullscreen(): void;
+ exitPointerLock(): void;
+ /**
+ * Causes the element to receive the focus and executes the code specified by the onfocus event.
+ */
+ focus(): void;
+ /**
+ * Returns a reference to the first object with the specified value of the ID or NAME attribute.
+ * @param elementId String that specifies the ID value. Case-insensitive.
+ */
+ getElementById(elementId: string): HTMLElement | null;
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(tagname: K): ElementListTagNameMap[K];
+ getElementsByTagName(tagname: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ /**
+ * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
+ */
+ getSelection(): Selection;
+ /**
+ * Gets a value indicating whether the object currently has focus.
+ */
+ hasFocus(): boolean;
+ importNode<T extends Node>(importedNode: T, deep: boolean): T;
+ msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
+ msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(url?: string, name?: string, features?: string, replace?: boolean): Document;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Retrieves the string associated with a command.
+ * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
+ */
+ queryCommandText(commandId: string): string;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ releaseEvents(): void;
+ /**
+ * Allows updating the print settings for the page.
+ */
+ updateSettings(): void;
+ webkitCancelFullScreen(): void;
+ webkitExitFullscreen(): void;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...content: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...content: string[]): void;
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+}
+
+interface DocumentFragment extends Node, NodeSelector, ParentNode {
+ getElementById(elementId: string): HTMLElement | null;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+}
+
+interface DocumentType extends Node, ChildNode {
+ readonly entities: NamedNodeMap;
+ readonly internalSubset: string | null;
+ readonly name: string;
+ readonly notations: NamedNodeMap;
+ readonly publicId: string;
+ readonly systemId: string;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+}
+
+interface DragEvent extends MouseEvent {
+ readonly dataTransfer: DataTransfer;
+ initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
+ msConvertURL(file: File, targetType: string, targetURL?: string): void;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(): DragEvent;
+}
+
+interface DynamicsCompressorNode extends AudioNode {
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: number;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(): DynamicsCompressorNode;
+}
+
+interface EXT_frag_depth {
+}
+
+declare var EXT_frag_depth: {
+ prototype: EXT_frag_depth;
+ new(): EXT_frag_depth;
+}
+
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+declare var EXT_texture_filter_anisotropic: {
+ prototype: EXT_texture_filter_anisotropic;
+ new(): EXT_texture_filter_anisotropic;
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+interface ElementEventMap extends GlobalEventHandlersEventMap {
+ "ariarequest": Event;
+ "command": Event;
+ "gotpointercapture": PointerEvent;
+ "lostpointercapture": PointerEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSGotPointerCapture": MSPointerEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSLostPointerCapture": MSPointerEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "webkitfullscreenchange": Event;
+ "webkitfullscreenerror": Event;
+}
+
+interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
+ readonly classList: DOMTokenList;
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ id: string;
+ innerHTML: string;
+ msContentZoomFactor: number;
+ readonly msRegionOverflow: string;
+ onariarequest: (this: Element, ev: Event) => any;
+ oncommand: (this: Element, ev: Event) => any;
+ ongotpointercapture: (this: Element, ev: PointerEvent) => any;
+ onlostpointercapture: (this: Element, ev: PointerEvent) => any;
+ onmsgesturechange: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Element, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Element, ev: MSGestureEvent) => any;
+ onmsgotpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmsinertiastart: (this: Element, ev: MSGestureEvent) => any;
+ onmslostpointercapture: (this: Element, ev: MSPointerEvent) => any;
+ onmspointercancel: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Element, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Element, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Element, ev: MSPointerEvent) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onwebkitfullscreenchange: (this: Element, ev: Event) => any;
+ onwebkitfullscreenerror: (this: Element, ev: Event) => any;
+ outerHTML: string;
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ readonly scrollWidth: number;
+ readonly tagName: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ slot: string;
+ readonly shadowRoot: ShadowRoot | null;
+ getAttribute(name: string): string | null;
+ getAttributeNS(namespaceURI: string, localName: string): string;
+ getAttributeNode(name: string): Attr;
+ getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
+ getElementsByTagName(name: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ hasAttribute(name: string): boolean;
+ hasAttributeNS(namespaceURI: string, localName: string): boolean;
+ msGetRegionContent(): MSRangeCollection;
+ msGetUntransformedBounds(): ClientRect;
+ msMatchesSelector(selectors: string): boolean;
+ msReleasePointerCapture(pointerId: number): void;
+ msSetPointerCapture(pointerId: number): void;
+ msZoomTo(args: MsZoomToOptions): void;
+ releasePointerCapture(pointerId: number): void;
+ removeAttribute(qualifiedName: string): void;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
+ removeAttributeNode(oldAttr: Attr): Attr;
+ requestFullscreen(): void;
+ requestPointerLock(): void;
+ setAttribute(name: string, value: string): void;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
+ setAttributeNode(newAttr: Attr): Attr;
+ setAttributeNodeNS(newAttr: Attr): Attr;
+ setPointerCapture(pointerId: number): void;
+ webkitMatchesSelector(selectors: string): boolean;
+ webkitRequestFullScreen(): void;
+ webkitRequestFullscreen(): void;
+ getElementsByClassName(classNames: string): NodeListOf<Element>;
+ matches(selector: string): boolean;
+ closest(selector: string): Element | null;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ insertAdjacentElement(position: string, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: string, html: string): void;
+ insertAdjacentText(where: string, text: string): void;
+ attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
+ addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+}
+
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
+}
+
+interface Event {
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ readonly cancelable: boolean;
+ readonly currentTarget: EventTarget;
+ readonly defaultPrevented: boolean;
+ readonly eventPhase: number;
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ readonly srcElement: Element | null;
+ readonly target: EventTarget;
+ readonly timeStamp: number;
+ readonly type: string;
+ readonly scoped: boolean;
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
+ preventDefault(): void;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ deepPath(): EventTarget[];
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(typeArg: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+interface EventTarget {
+ addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ dispatchEvent(evt: Event): boolean;
+ removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+}
+
+interface ExtensionScriptApis {
+ extensionIdToShortId(extensionId: string): number;
+ fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
+ genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void;
+ genericSynchronousFunction(functionId: number, parameters?: string): string;
+ getExtensionId(): string;
+ registerGenericFunctionCallbackHandler(callbackHandler: any): void;
+ registerGenericPersistentCallbackHandler(callbackHandler: any): void;
+}
+
+declare var ExtensionScriptApis: {
+ prototype: ExtensionScriptApis;
+ new(): ExtensionScriptApis;
+}
+
+interface External {
+}
+
+declare var External: {
+ prototype: External;
+ new(): External;
+}
+
+interface File extends Blob {
+ readonly lastModifiedDate: any;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
+}
+
+interface FileList {
+ readonly length: number;
+ item(index: number): File;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+}
+
+interface FileReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+}
+
+interface FocusEvent extends UIEvent {
+ readonly relatedTarget: EventTarget;
+ initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
+}
+
+interface FocusNavigationEvent extends Event {
+ readonly navigationReason: NavigationReason;
+ readonly originHeight: number;
+ readonly originLeft: number;
+ readonly originTop: number;
+ readonly originWidth: number;
+ requestFocus(): void;
+}
+
+declare var FocusNavigationEvent: {
+ prototype: FocusNavigationEvent;
+ new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
+}
+
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new (form?: HTMLFormElement): FormData;
+}
+
+interface GainNode extends AudioNode {
+ readonly gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(): GainNode;
+}
+
+interface Gamepad {
+ readonly axes: number[];
+ readonly buttons: GamepadButton[];
+ readonly connected: boolean;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: string;
+ readonly timestamp: number;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+}
+
+interface GamepadButton {
+ readonly pressed: boolean;
+ readonly value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+}
+
+interface GamepadEvent extends Event {
+ readonly gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
+}
+
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
+}
+
+declare var Geolocation: {
+ prototype: Geolocation;
+ new(): Geolocation;
+}
+
+interface HTMLAllCollection {
+ readonly length: number;
+ item(nameOrIndex?: string): HTMLCollection | Element | null;
+ namedItem(name: string): HTMLCollection | Element | null;
+ [index: number]: Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+}
+
+interface HTMLAnchorElement extends HTMLElement {
+ Methods: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
+ hash: string;
+ /**
+ * Contains the hostname and port values of the URL.
+ */
+ host: string;
+ /**
+ * Contains the hostname of a URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ readonly mimeType: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ readonly nameProp: string;
+ /**
+ * Contains the pathname of the URL.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Contains the protocol of the URL.
+ */
+ protocol: string;
+ readonly protocolLong: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ type: string;
+ urn: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+}
+
+interface HTMLAppletElement extends HTMLElement {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
+ */
+ declare: boolean;
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ object: string | null;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ vspace: number;
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAppletElement: {
+ prototype: HTMLAppletElement;
+ new(): HTMLAppletElement;
+}
+
+interface HTMLAreaElement extends HTMLElement {
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Sets or retrieves the subsection of the href property that follows the number sign (#).
+ */
+ hash: string;
+ /**
+ * Sets or retrieves the hostname and port number of the location or URL.
+ */
+ host: string;
+ /**
+ * Sets or retrieves the host name part of the location or URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ */
+ noHref: boolean;
+ /**
+ * Sets or retrieves the file name or path specified by the object.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Sets or retrieves the protocol portion of a URL.
+ */
+ protocol: string;
+ rel: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+}
+
+interface HTMLAreasCollection extends HTMLCollectionBase {
+}
+
+declare var HTMLAreasCollection: {
+ prototype: HTMLAreasCollection;
+ new(): HTMLAreasCollection;
+}
+
+interface HTMLAudioElement extends HTMLMediaElement {
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+}
+
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ */
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+}
+
+interface HTMLBaseElement extends HTMLElement {
+ /**
+ * Gets or sets the baseline URL on which relative links are based.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+}
+
+interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ /**
+ * Sets or retrieves the font size of the object.
+ */
+ size: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseFontElement: {
+ prototype: HTMLBaseFontElement;
+ new(): HTMLBaseFontElement;
+}
+
+interface HTMLBodyElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLBodyElement extends HTMLElement {
+ aLink: any;
+ background: string;
+ bgColor: any;
+ bgProperties: string;
+ link: any;
+ noWrap: boolean;
+ onafterprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLBodyElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLBodyElement, ev: BeforeUnloadEvent) => any;
+ onblur: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLBodyElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLBodyElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLBodyElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLBodyElement, ev: Event) => any;
+ onmessage: (this: HTMLBodyElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLBodyElement, ev: Event) => any;
+ ononline: (this: HTMLBodyElement, ev: Event) => any;
+ onorientationchange: (this: HTMLBodyElement, ev: Event) => any;
+ onpagehide: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLBodyElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLBodyElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLBodyElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLBodyElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLBodyElement, ev: Event) => any;
+ text: any;
+ vLink: any;
+ addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+}
+
+interface HTMLButtonElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ status: any;
+ /**
+ * Gets the classification and default behavior of the button.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the default or selected value of the control.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+}
+
+interface HTMLCanvasElement extends HTMLElement {
+ /**
+ * Gets or sets the height of a canvas element on a document.
+ */
+ height: number;
+ /**
+ * Gets or sets the width of a canvas element on a document.
+ */
+ width: number;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
+ getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
+ /**
+ * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
+ */
+ msToBlob(): Blob;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, ...args: any[]): string;
+ toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+}
+
+interface HTMLCollectionBase {
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Retrieves an object from various collections.
+ */
+ item(index: number): Element;
+ [index: number]: Element;
+}
+
+interface HTMLCollection extends HTMLCollectionBase {
+ /**
+ * Retrieves a select object or an object from an options collection.
+ */
+ namedItem(name: string): Element | null;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+}
+
+interface HTMLDListElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+}
+
+interface HTMLDataElement extends HTMLElement {
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataElement: {
+ prototype: HTMLDataElement;
+ new(): HTMLDataElement;
+}
+
+interface HTMLDataListElement extends HTMLElement {
+ options: HTMLCollectionOf<HTMLOptionElement>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+}
+
+interface HTMLDirectoryElement extends HTMLElement {
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+}
+
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+}
+
+interface HTMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+}
+
+interface HTMLElementEventMap extends ElementEventMap {
+ "abort": UIEvent;
+ "activate": UIEvent;
+ "beforeactivate": UIEvent;
+ "beforecopy": ClipboardEvent;
+ "beforecut": ClipboardEvent;
+ "beforedeactivate": UIEvent;
+ "beforepaste": ClipboardEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "contextmenu": PointerEvent;
+ "copy": ClipboardEvent;
+ "cuechange": Event;
+ "cut": ClipboardEvent;
+ "dblclick": MouseEvent;
+ "deactivate": UIEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSContentZoom": UIEvent;
+ "MSManipulationStateChanged": MSManipulationEvent;
+ "paste": ClipboardEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "reset": Event;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "selectstart": Event;
+ "stalled": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface HTMLElement extends Element {
+ accessKey: string;
+ readonly children: HTMLCollection;
+ contentEditable: string;
+ readonly dataset: DOMStringMap;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ hideFocus: boolean;
+ innerText: string;
+ readonly isContentEditable: boolean;
+ lang: string;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ onabort: (this: HTMLElement, ev: UIEvent) => any;
+ onactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforecopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforecut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onbeforedeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ onbeforepaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onblur: (this: HTMLElement, ev: FocusEvent) => any;
+ oncanplay: (this: HTMLElement, ev: Event) => any;
+ oncanplaythrough: (this: HTMLElement, ev: Event) => any;
+ onchange: (this: HTMLElement, ev: Event) => any;
+ onclick: (this: HTMLElement, ev: MouseEvent) => any;
+ oncontextmenu: (this: HTMLElement, ev: PointerEvent) => any;
+ oncopy: (this: HTMLElement, ev: ClipboardEvent) => any;
+ oncuechange: (this: HTMLElement, ev: Event) => any;
+ oncut: (this: HTMLElement, ev: ClipboardEvent) => any;
+ ondblclick: (this: HTMLElement, ev: MouseEvent) => any;
+ ondeactivate: (this: HTMLElement, ev: UIEvent) => any;
+ ondrag: (this: HTMLElement, ev: DragEvent) => any;
+ ondragend: (this: HTMLElement, ev: DragEvent) => any;
+ ondragenter: (this: HTMLElement, ev: DragEvent) => any;
+ ondragleave: (this: HTMLElement, ev: DragEvent) => any;
+ ondragover: (this: HTMLElement, ev: DragEvent) => any;
+ ondragstart: (this: HTMLElement, ev: DragEvent) => any;
+ ondrop: (this: HTMLElement, ev: DragEvent) => any;
+ ondurationchange: (this: HTMLElement, ev: Event) => any;
+ onemptied: (this: HTMLElement, ev: Event) => any;
+ onended: (this: HTMLElement, ev: MediaStreamErrorEvent) => any;
+ onerror: (this: HTMLElement, ev: ErrorEvent) => any;
+ onfocus: (this: HTMLElement, ev: FocusEvent) => any;
+ oninput: (this: HTMLElement, ev: Event) => any;
+ oninvalid: (this: HTMLElement, ev: Event) => any;
+ onkeydown: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeypress: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onkeyup: (this: HTMLElement, ev: KeyboardEvent) => any;
+ onload: (this: HTMLElement, ev: Event) => any;
+ onloadeddata: (this: HTMLElement, ev: Event) => any;
+ onloadedmetadata: (this: HTMLElement, ev: Event) => any;
+ onloadstart: (this: HTMLElement, ev: Event) => any;
+ onmousedown: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseenter: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseleave: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousemove: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseout: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseover: (this: HTMLElement, ev: MouseEvent) => any;
+ onmouseup: (this: HTMLElement, ev: MouseEvent) => any;
+ onmousewheel: (this: HTMLElement, ev: WheelEvent) => any;
+ onmscontentzoom: (this: HTMLElement, ev: UIEvent) => any;
+ onmsmanipulationstatechanged: (this: HTMLElement, ev: MSManipulationEvent) => any;
+ onpaste: (this: HTMLElement, ev: ClipboardEvent) => any;
+ onpause: (this: HTMLElement, ev: Event) => any;
+ onplay: (this: HTMLElement, ev: Event) => any;
+ onplaying: (this: HTMLElement, ev: Event) => any;
+ onprogress: (this: HTMLElement, ev: ProgressEvent) => any;
+ onratechange: (this: HTMLElement, ev: Event) => any;
+ onreset: (this: HTMLElement, ev: Event) => any;
+ onscroll: (this: HTMLElement, ev: UIEvent) => any;
+ onseeked: (this: HTMLElement, ev: Event) => any;
+ onseeking: (this: HTMLElement, ev: Event) => any;
+ onselect: (this: HTMLElement, ev: UIEvent) => any;
+ onselectstart: (this: HTMLElement, ev: Event) => any;
+ onstalled: (this: HTMLElement, ev: Event) => any;
+ onsubmit: (this: HTMLElement, ev: Event) => any;
+ onsuspend: (this: HTMLElement, ev: Event) => any;
+ ontimeupdate: (this: HTMLElement, ev: Event) => any;
+ onvolumechange: (this: HTMLElement, ev: Event) => any;
+ onwaiting: (this: HTMLElement, ev: Event) => any;
+ outerText: string;
+ spellcheck: boolean;
+ readonly style: CSSStyleDeclaration;
+ tabIndex: number;
+ title: string;
+ blur(): void;
+ click(): void;
+ dragDrop(): boolean;
+ focus(): void;
+ msGetInputContext(): MSInputMethodContext;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+}
+
+interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hidden: any;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Retrieves the palette used for the embedded document.
+ */
+ readonly palette: string;
+ /**
+ * Retrieves the URL of the plug-in used to view an embedded document.
+ */
+ readonly pluginspage: string;
+ readonly readyState: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the height and width units of the embed object.
+ */
+ units: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+}
+
+interface HTMLFieldSetElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ name: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+}
+
+interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+}
+
+interface HTMLFormControlsCollection extends HTMLCollectionBase {
+ namedItem(name: string): HTMLCollection | Element | null;
+}
+
+declare var HTMLFormControlsCollection: {
+ prototype: HTMLFormControlsCollection;
+ new(): HTMLFormControlsCollection;
+}
+
+interface HTMLFormElement extends HTMLElement {
+ /**
+ * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
+ */
+ acceptCharset: string;
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Retrieves a collection, in source order, of all controls in a given form.
+ */
+ readonly elements: HTMLFormControlsCollection;
+ /**
+ * Sets or retrieves the MIME encoding for the form.
+ */
+ encoding: string;
+ /**
+ * Sets or retrieves the encoding type for the form.
+ */
+ enctype: string;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Sets or retrieves how to send the form data to the server.
+ */
+ method: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Designates a form that is not validated when submitted.
+ */
+ noValidate: boolean;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ */
+ namedItem(name: string): any;
+ /**
+ * Fires when the user resets a form.
+ */
+ reset(): void;
+ /**
+ * Fires when a FORM is about to be submitted.
+ */
+ submit(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+}
+
+interface HTMLFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string | number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLFrameElement, ev: Event) => any;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string | number;
+ addEventListener<K extends keyof HTMLFrameElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+}
+
+interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "load": Event;
+ "message": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "storage": StorageEvent;
+ "unload": Event;
+}
+
+interface HTMLFrameSetElement extends HTMLElement {
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Sets or retrieves the frame widths of the object.
+ */
+ cols: string;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ name: string;
+ onafterprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any;
+ onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ */
+ onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any;
+ /**
+ * Fires when the object receives focus.
+ */
+ onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
+ onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
+ onload: (this: HTMLFrameSetElement, ev: Event) => any;
+ onmessage: (this: HTMLFrameSetElement, ev: MessageEvent) => any;
+ onoffline: (this: HTMLFrameSetElement, ev: Event) => any;
+ ononline: (this: HTMLFrameSetElement, ev: Event) => any;
+ onorientationchange: (this: HTMLFrameSetElement, ev: Event) => any;
+ onpagehide: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpageshow: (this: HTMLFrameSetElement, ev: PageTransitionEvent) => any;
+ onpopstate: (this: HTMLFrameSetElement, ev: PopStateEvent) => any;
+ onresize: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onscroll: (this: HTMLFrameSetElement, ev: UIEvent) => any;
+ onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
+ onunload: (this: HTMLFrameSetElement, ev: Event) => any;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ */
+ rows: string;
+ addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+}
+
+interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ */
+ noShade: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+}
+
+interface HTMLHeadElement extends HTMLElement {
+ profile: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+}
+
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+}
+
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ */
+ version: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+}
+
+interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
+ "load": Event;
+}
+
+interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ allowFullscreen: boolean;
+ allowPaymentRequest: boolean;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the horizontal margin for the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (this: HTMLIFrameElement, ev: Event) => any;
+ readonly sandbox: DOMSettableTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+}
+
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ crossOrigin: string | null;
+ readonly currentSrc: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves whether the image is a server-side image map.
+ */
+ isMap: boolean;
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ */
+ longDesc: string;
+ lowsrc: string;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * The original height of the image resource before sizing.
+ */
+ readonly naturalHeight: number;
+ /**
+ * The original width of the image resource before sizing.
+ */
+ readonly naturalWidth: number;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ readonly x: number;
+ readonly y: number;
+ msGetAsCastingSource(): any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+}
+
+interface HTMLInputElement extends HTMLElement {
+ /**
+ * Sets or retrieves a comma-separated list of content types.
+ */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ checked: boolean;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ defaultChecked: boolean;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Returns a FileList object on a file type input object.
+ */
+ readonly files: FileList | null;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ indeterminate: boolean;
+ /**
+ * Specifies the ID of a pre-defined datalist of options for an input element.
+ */
+ readonly list: HTMLElement;
+ /**
+ * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ */
+ max: string;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
+ */
+ min: string;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a string containing a regular expression that the user's input must match.
+ */
+ pattern: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ selectionDirection: string;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ size: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ status: boolean;
+ /**
+ * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
+ */
+ step: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns the value of the data at the cursor's current position.
+ */
+ value: string;
+ valueAsDate: Date;
+ /**
+ * Returns the input field value as a number.
+ */
+ valueAsNumber: number;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ webkitdirectory: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Makes the selection equal to the current object.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start?: number, end?: number, direction?: string): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+}
+
+interface HTMLLIElement extends HTMLElement {
+ type: string;
+ /**
+ * Sets or retrieves the value of a list item.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+}
+
+interface HTMLLabelElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the object to which the given label object is assigned.
+ */
+ htmlFor: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+}
+
+interface HTMLLegendElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ align: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+}
+
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ disabled: boolean;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ import?: Document;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+}
+
+interface HTMLMapElement extends HTMLElement {
+ /**
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
+ readonly areas: HTMLAreasCollection;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+}
+
+interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
+ "bounce": Event;
+ "finish": Event;
+ "start": Event;
+}
+
+interface HTMLMarqueeElement extends HTMLElement {
+ behavior: string;
+ bgColor: any;
+ direction: string;
+ height: string;
+ hspace: number;
+ loop: number;
+ onbounce: (this: HTMLMarqueeElement, ev: Event) => any;
+ onfinish: (this: HTMLMarqueeElement, ev: Event) => any;
+ onstart: (this: HTMLMarqueeElement, ev: Event) => any;
+ scrollAmount: number;
+ scrollDelay: number;
+ trueSpeed: boolean;
+ vspace: number;
+ width: string;
+ start(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+}
+
+interface HTMLMediaElementEventMap extends HTMLElementEventMap {
+ "encrypted": MediaEncryptedEvent;
+ "msneedkey": MSMediaKeyNeededEvent;
+}
+
+interface HTMLMediaElement extends HTMLElement {
+ /**
+ * Returns an AudioTrackList object with the audio tracks for a given video element.
+ */
+ readonly audioTracks: AudioTrackList;
+ /**
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
+ autoplay: boolean;
+ /**
+ * Gets a collection of buffered time ranges.
+ */
+ readonly buffered: TimeRanges;
+ /**
+ * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
+ */
+ controls: boolean;
+ crossOrigin: string | null;
+ /**
+ * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
+ */
+ readonly currentSrc: string;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ currentTime: number;
+ defaultMuted: boolean;
+ /**
+ * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
+ */
+ defaultPlaybackRate: number;
+ /**
+ * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
+ */
+ readonly duration: number;
+ /**
+ * Gets information about whether the playback has ended or not.
+ */
+ readonly ended: boolean;
+ /**
+ * Returns an object representing the current error state of the audio or video element.
+ */
+ readonly error: MediaError;
+ /**
+ * Gets or sets a flag to specify whether playback should restart after it completes.
+ */
+ loop: boolean;
+ readonly mediaKeys: MediaKeys | null;
+ /**
+ * Specifies the purpose of the audio or video media, such as background audio or alerts.
+ */
+ msAudioCategory: string;
+ /**
+ * Specifies the output device id that the audio will be sent to.
+ */
+ msAudioDeviceType: string;
+ readonly msGraphicsTrustStatus: MSGraphicsTrust;
+ /**
+ * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
+ */
+ readonly msKeys: MSMediaKeys;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Specifies whether or not to enable low-latency playback on the media element.
+ */
+ msRealTime: boolean;
+ /**
+ * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
+ */
+ muted: boolean;
+ /**
+ * Gets the current network activity for the element.
+ */
+ readonly networkState: number;
+ onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any;
+ onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any;
+ /**
+ * Gets a flag that specifies whether playback is paused.
+ */
+ readonly paused: boolean;
+ /**
+ * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
+ */
+ playbackRate: number;
+ /**
+ * Gets TimeRanges for the current media resource that has been played.
+ */
+ readonly played: TimeRanges;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ preload: string;
+ readyState: number;
+ /**
+ * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
+ */
+ readonly seekable: TimeRanges;
+ /**
+ * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
+ */
+ readonly seeking: boolean;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcObject: MediaStream | null;
+ readonly textTracks: TextTrackList;
+ readonly videoTracks: VideoTrackList;
+ /**
+ * Gets or sets the volume level for audio portions of the media element.
+ */
+ volume: number;
+ addTextTrack(kind: string, label?: string, language?: string): TextTrack;
+ /**
+ * Returns a string that specifies whether the client can play a given media resource type.
+ */
+ canPlayType(type: string): string;
+ /**
+ * Resets the audio or video object and loads a new media resource.
+ */
+ load(): void;
+ /**
+ * Clears all effects from the media pipeline.
+ */
+ msClearEffects(): void;
+ msGetAsCastingSource(): any;
+ /**
+ * Inserts the specified audio effect into media pipeline.
+ */
+ msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetMediaKeys(mediaKeys: MSMediaKeys): void;
+ /**
+ * Specifies the media protection manager for a given media pipeline.
+ */
+ msSetMediaProtectionManager(mediaProtectionManager?: any): void;
+ /**
+ * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
+ */
+ pause(): void;
+ /**
+ * Loads and starts playback of a media resource.
+ */
+ play(): void;
+ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+}
+
+interface HTMLMenuElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+}
+
+interface HTMLMetaElement extends HTMLElement {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets or sets meta-information to associate with httpEquiv or name.
+ */
+ content: string;
+ /**
+ * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
+ */
+ httpEquiv: string;
+ /**
+ * Sets or retrieves the value specified in the content attribute of the meta object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ */
+ scheme: string;
+ /**
+ * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
+ */
+ url: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+}
+
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+}
+
+interface HTMLModElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+}
+
+interface HTMLOListElement extends HTMLElement {
+ compact: boolean;
+ /**
+ * The starting number.
+ */
+ start: number;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+}
+
+interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ readonly BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ declare: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ readonly msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly readyState: number;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+}
+
+interface HTMLOptGroupElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ readonly text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+}
+
+interface HTMLOptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+}
+
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ length: number;
+ selectedIndex: number;
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+}
+
+interface HTMLOutputElement extends HTMLElement {
+ defaultValue: string;
+ readonly form: HTMLFormElement;
+ readonly htmlFor: DOMSettableTokenList;
+ name: string;
+ readonly type: string;
+ readonly validationMessage: string;
+ readonly validity: ValidityState;
+ value: string;
+ readonly willValidate: boolean;
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLOutputElement: {
+ prototype: HTMLOutputElement;
+ new(): HTMLOutputElement;
+}
+
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+}
+
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ */
+ valueType: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+}
+
+interface HTMLPictureElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
+}
+
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+}
+
+interface HTMLProgressElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Defines the maximum, or "done" value for a progress element.
+ */
+ max: number;
+ /**
+ * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
+ */
+ readonly position: number;
+ /**
+ * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+}
+
+interface HTMLQuoteElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+}
+
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ crossOrigin: string | null;
+ /**
+ * Sets or retrieves the status of the script.
+ */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ */
+ htmlFor: string;
+ /**
+ * Retrieves the URL to an external file that contains the source code or data.
+ */
+ src: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the MIME type for the associated scripting engine.
+ */
+ type: string;
+ integrity: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+}
+
+interface HTMLSelectElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly options: HTMLOptionsCollection;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the index of the selected option in a select object.
+ */
+ selectedIndex: number;
+ selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
+ /**
+ * Sets or retrieves the number of rows in the list box.
+ */
+ size: number;
+ /**
+ * Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLElement, before?: HTMLElement | number): void;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): any;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(index?: number): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [name: string]: any;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+}
+
+interface HTMLSourceElement extends HTMLElement {
+ /**
+ * Gets or sets the intended media type of the media source.
+ */
+ media: string;
+ msKeySystem: string;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Gets or sets the MIME type of a media resource.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+}
+
+interface HTMLSpanElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+}
+
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ disabled: boolean;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+}
+
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the caption appears at the top or bottom of the table.
+ */
+ vAlign: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+}
+
+interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves abbreviated text for the object.
+ */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ */
+ axis: string;
+ bgColor: any;
+ /**
+ * Retrieves the position of the object in the cells collection of a row.
+ */
+ readonly cellIndex: number;
+ /**
+ * Sets or retrieves the number columns in the table that the object should span.
+ */
+ colSpan: number;
+ /**
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ /**
+ * Sets or retrieves how many rows in a table the cell should span.
+ */
+ rowSpan: number;
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+}
+
+interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of columns in the group.
+ */
+ span: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: any;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+}
+
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableDataCellElement: {
+ prototype: HTMLTableDataCellElement;
+ new(): HTMLTableDataCellElement;
+}
+
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the caption object of a table.
+ */
+ caption: HTMLTableCaptionElement;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the number of columns in the table.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
+ frame: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ */
+ summary: string;
+ /**
+ * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
+ */
+ tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
+ /**
+ * Retrieves the tFoot object of the table.
+ */
+ tFoot: HTMLTableSectionElement;
+ /**
+ * Retrieves the tHead object of the table.
+ */
+ tHead: HTMLTableSectionElement;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Creates an empty caption element in the table.
+ */
+ createCaption(): HTMLTableCaptionElement;
+ /**
+ * Creates an empty tBody element in the table.
+ */
+ createTBody(): HTMLTableSectionElement;
+ /**
+ * Creates an empty tFoot element in the table.
+ */
+ createTFoot(): HTMLTableSectionElement;
+ /**
+ * Returns the tHead element object if successful, or null otherwise.
+ */
+ createTHead(): HTMLTableSectionElement;
+ /**
+ * Deletes the caption element and its contents from the table.
+ */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Deletes the tFoot element and its contents from the table.
+ */
+ deleteTFoot(): void;
+ /**
+ * Deletes the tHead element and its contents from the table.
+ */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+}
+
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableHeaderCellElement: {
+ prototype: HTMLTableHeaderCellElement;
+ new(): HTMLTableHeaderCellElement;
+}
+
+interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Retrieves a collection of all cells in the table row.
+ */
+ cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Retrieves the position of the object in the rows collection for the table.
+ */
+ readonly rowIndex: number;
+ /**
+ * Retrieves the position of the object in the collection.
+ */
+ readonly sectionRowIndex: number;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index?: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableDataCellElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+}
+
+interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+}
+
+interface HTMLTemplateElement extends HTMLElement {
+ readonly content: DocumentFragment;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+}
+
+interface HTMLTextAreaElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ /**
+ * Sets or retrieves the value indicated whether the content of the object is read-only.
+ */
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: number;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ /**
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
+ status: any;
+ /**
+ * Retrieves the type of control.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Retrieves or sets the text in the entry field of the textArea element.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Sets or retrieves how to handle wordwrapping in the object.
+ */
+ wrap: string;
+ minLength: number;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Highlights the input area of a form element.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start: number, end: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+}
+
+interface HTMLTimeElement extends HTMLElement {
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTimeElement: {
+ prototype: HTMLTimeElement;
+ new(): HTMLTimeElement;
+}
+
+interface HTMLTitleElement extends HTMLElement {
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+}
+
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readonly readyState: number;
+ src: string;
+ srclang: string;
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+}
+
+interface HTMLUListElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+}
+
+interface HTMLUnknownElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+}
+
+interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
+ "MSVideoFormatChanged": Event;
+ "MSVideoFrameStepCompleted": Event;
+ "MSVideoOptimalLayoutChanged": Event;
+}
+
+interface HTMLVideoElement extends HTMLMediaElement {
+ /**
+ * Gets or sets the height of the video element.
+ */
+ height: number;
+ msHorizontalMirror: boolean;
+ readonly msIsLayoutOptimalForPlayback: boolean;
+ readonly msIsStereo3D: boolean;
+ msStereo3DPackingMode: string;
+ msStereo3DRenderMode: string;
+ msZoom: boolean;
+ onMSVideoFormatChanged: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any;
+ onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, ev: Event) => any;
+ /**
+ * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
+ */
+ poster: string;
+ /**
+ * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoHeight: number;
+ /**
+ * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoWidth: number;
+ readonly webkitDisplayingFullscreen: boolean;
+ readonly webkitSupportsFullscreen: boolean;
+ /**
+ * Gets or sets the width of the video element.
+ */
+ width: number;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ msFrameStep(forward: boolean): void;
+ msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
+ webkitEnterFullScreen(): void;
+ webkitEnterFullscreen(): void;
+ webkitExitFullScreen(): void;
+ webkitExitFullscreen(): void;
+ addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+}
+
+interface HashChangeEvent extends Event {
+ readonly newURL: string | null;
+ readonly oldURL: string | null;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(typeArg: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+}
+
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ forEach(callback: ForEachCallback): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: any): Headers;
+}
+
+interface History {
+ readonly length: number;
+ readonly state: any;
+ scrollRestoration: ScrollRestoration;
+ back(): void;
+ forward(): void;
+ go(delta?: number): void;
+ pushState(data: any, title: string, url?: string | null): void;
+ replaceState(data: any, title: string, url?: string | null): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+}
+
+interface IDBCursor {
+ readonly direction: IDBCursorDirection;
+ key: IDBKeyRange | IDBValidKey;
+ readonly primaryKey: any;
+ source: IDBObjectStore | IDBIndex;
+ advance(count: number): void;
+ continue(key?: IDBKeyRange | IDBValidKey): void;
+ delete(): IDBRequest;
+ update(value: any): IDBRequest;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+interface IDBCursorWithValue extends IDBCursor {
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+}
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "error": Event;
+}
+
+interface IDBDatabase extends EventTarget {
+ readonly name: string;
+ readonly objectStoreNames: DOMStringList;
+ onabort: (this: IDBDatabase, ev: Event) => any;
+ onerror: (this: IDBDatabase, ev: Event) => any;
+ version: number;
+ onversionchange: (ev: IDBVersionChangeEvent) => any;
+ close(): void;
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ deleteObjectStore(name: string): void;
+ transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+}
+
+interface IDBFactory {
+ cmp(first: any, second: any): number;
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+}
+
+interface IDBIndex {
+ keyPath: string | string[];
+ readonly name: string;
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ multiEntry: boolean;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ get(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+}
+
+interface IDBKeyRange {
+ readonly lower: any;
+ readonly lowerOpen: boolean;
+ readonly upper: any;
+ readonly upperOpen: boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ only(value: any): IDBKeyRange;
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+}
+
+interface IDBObjectStore {
+ readonly indexNames: DOMStringList;
+ keyPath: string | string[];
+ readonly name: string;
+ readonly transaction: IDBTransaction;
+ autoIncrement: boolean;
+ add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ clear(): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
+ delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ deleteIndex(indexName: string): void;
+ get(key: any): IDBRequest;
+ index(name: string): IDBIndex;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+}
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+interface IDBOpenDBRequest extends IDBRequest {
+ onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
+ onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+}
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+interface IDBRequest extends EventTarget {
+ readonly error: DOMError;
+ onerror: (this: IDBRequest, ev: Event) => any;
+ onsuccess: (this: IDBRequest, ev: Event) => any;
+ readonly readyState: IDBRequestReadyState;
+ readonly result: any;
+ source: IDBObjectStore | IDBIndex | IDBCursor;
+ readonly transaction: IDBTransaction;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+}
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ readonly db: IDBDatabase;
+ readonly error: DOMError;
+ readonly mode: IDBTransactionMode;
+ onabort: (this: IDBTransaction, ev: Event) => any;
+ oncomplete: (this: IDBTransaction, ev: Event) => any;
+ onerror: (this: IDBTransaction, ev: Event) => any;
+ abort(): void;
+ objectStore(name: string): IDBObjectStore;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+}
+
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(): IDBVersionChangeEvent;
+}
+
+interface IIRFilterNode extends AudioNode {
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var IIRFilterNode: {
+ prototype: IIRFilterNode;
+ new(): IIRFilterNode;
+}
+
+interface ImageData {
+ data: Uint8ClampedArray;
+ readonly height: number;
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
+}
+
+interface IntersectionObserver {
+ readonly root: Element | null;
+ readonly rootMargin: string;
+ readonly thresholds: number[];
+ disconnect(): void;
+ observe(target: Element): void;
+ takeRecords(): IntersectionObserverEntry[];
+ unobserve(target: Element): void;
+}
+
+declare var IntersectionObserver: {
+ prototype: IntersectionObserver;
+ new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
+}
+
+interface IntersectionObserverEntry {
+ readonly boundingClientRect: ClientRect;
+ readonly intersectionRatio: number;
+ readonly intersectionRect: ClientRect;
+ readonly rootBounds: ClientRect;
+ readonly target: Element;
+ readonly time: number;
+}
+
+declare var IntersectionObserverEntry: {
+ prototype: IntersectionObserverEntry;
+ new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
+}
+
+interface KeyboardEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly char: string | null;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly key: string;
+ readonly keyCode: number;
+ readonly locale: string;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ readonly which: number;
+ readonly code: string;
+ getModifierState(keyArg: string): boolean;
+ initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+interface ListeningStateChangedEvent extends Event {
+ readonly label: string;
+ readonly state: ListeningState;
+}
+
+declare var ListeningStateChangedEvent: {
+ prototype: ListeningStateChangedEvent;
+ new(): ListeningStateChangedEvent;
+}
+
+interface Location {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ assign(url: string): void;
+ reload(forcedReload?: boolean): void;
+ replace(url: string): void;
+ toString(): string;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+}
+
+interface LongRunningScriptDetectedEvent extends Event {
+ readonly executionTime: number;
+ stopPageScriptExecution: boolean;
+}
+
+declare var LongRunningScriptDetectedEvent: {
+ prototype: LongRunningScriptDetectedEvent;
+ new(): LongRunningScriptDetectedEvent;
+}
+
+interface MSApp {
+ clearTemporaryWebDataAsync(): MSAppAsyncOperation;
+ createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
+ createDataPackage(object: any): any;
+ createDataPackageFromSelection(): any;
+ createFileFromStorageFile(storageFile: any): File;
+ createStreamFromInputStream(type: string, inputStream: any): MSStream;
+ execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
+ execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
+ getCurrentPriority(): string;
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
+ getViewId(view: any): any;
+ isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
+ pageHandlesAllApplicationActivations(enabled: boolean): void;
+ suppressSubdownloadCredentialPrompts(suppress: boolean): void;
+ terminateApp(exceptionObject: any): void;
+ readonly CURRENT: string;
+ readonly HIGH: string;
+ readonly IDLE: string;
+ readonly NORMAL: string;
+}
+declare var MSApp: MSApp;
+
+interface MSAppAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSAppAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
+ onerror: (this: MSAppAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSAppAsyncOperation: {
+ prototype: MSAppAsyncOperation;
+ new(): MSAppAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+}
+
+interface MSAssertion {
+ readonly id: string;
+ readonly type: MSCredentialType;
+}
+
+declare var MSAssertion: {
+ prototype: MSAssertion;
+ new(): MSAssertion;
+}
+
+interface MSBlobBuilder {
+ append(data: any, endings?: string): void;
+ getBlob(contentType?: string): Blob;
+}
+
+declare var MSBlobBuilder: {
+ prototype: MSBlobBuilder;
+ new(): MSBlobBuilder;
+}
+
+interface MSCredentials {
+ getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
+ makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
+}
+
+declare var MSCredentials: {
+ prototype: MSCredentials;
+ new(): MSCredentials;
+}
+
+interface MSFIDOCredentialAssertion extends MSAssertion {
+ readonly algorithm: string | Algorithm;
+ readonly attestation: any;
+ readonly publicKey: string;
+ readonly transportHints: MSTransportType[];
+}
+
+declare var MSFIDOCredentialAssertion: {
+ prototype: MSFIDOCredentialAssertion;
+ new(): MSFIDOCredentialAssertion;
+}
+
+interface MSFIDOSignature {
+ readonly authnrData: string;
+ readonly clientData: string;
+ readonly signature: string;
+}
+
+declare var MSFIDOSignature: {
+ prototype: MSFIDOSignature;
+ new(): MSFIDOSignature;
+}
+
+interface MSFIDOSignatureAssertion extends MSAssertion {
+ readonly signature: MSFIDOSignature;
+}
+
+declare var MSFIDOSignatureAssertion: {
+ prototype: MSFIDOSignatureAssertion;
+ new(): MSFIDOSignatureAssertion;
+}
+
+interface MSGesture {
+ target: Element;
+ addPointer(pointerId: number): void;
+ stop(): void;
+}
+
+declare var MSGesture: {
+ prototype: MSGesture;
+ new(): MSGesture;
+}
+
+interface MSGestureEvent extends UIEvent {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly expansion: number;
+ readonly gestureObject: any;
+ readonly hwTimestamp: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly rotation: number;
+ readonly scale: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly translationX: number;
+ readonly translationY: number;
+ readonly velocityAngular: number;
+ readonly velocityExpansion: number;
+ readonly velocityX: number;
+ readonly velocityY: number;
+ initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+declare var MSGestureEvent: {
+ prototype: MSGestureEvent;
+ new(): MSGestureEvent;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+interface MSGraphicsTrust {
+ readonly constrictionActive: boolean;
+ readonly status: string;
+}
+
+declare var MSGraphicsTrust: {
+ prototype: MSGraphicsTrust;
+ new(): MSGraphicsTrust;
+}
+
+interface MSHTMLWebViewElement extends HTMLElement {
+ readonly canGoBack: boolean;
+ readonly canGoForward: boolean;
+ readonly containsFullScreenElement: boolean;
+ readonly documentTitle: string;
+ height: number;
+ readonly settings: MSWebViewSettings;
+ src: string;
+ width: number;
+ addWebAllowedObject(name: string, applicationObject: any): void;
+ buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
+ capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
+ captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
+ getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
+ getDeferredPermissionRequests(): DeferredPermissionRequest[];
+ goBack(): void;
+ goForward(): void;
+ invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
+ navigate(uri: string): void;
+ navigateFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ navigateToLocalStreamUri(source: string, streamResolver: any): void;
+ navigateToString(contents: string): void;
+ navigateWithHttpRequestMessage(requestMessage: any): void;
+ refresh(): void;
+ stop(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MSHTMLWebViewElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSHTMLWebViewElement: {
+ prototype: MSHTMLWebViewElement;
+ new(): MSHTMLWebViewElement;
+}
+
+interface MSInputMethodContextEventMap {
+ "MSCandidateWindowHide": Event;
+ "MSCandidateWindowShow": Event;
+ "MSCandidateWindowUpdate": Event;
+}
+
+interface MSInputMethodContext extends EventTarget {
+ readonly compositionEndOffset: number;
+ readonly compositionStartOffset: number;
+ oncandidatewindowhide: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowshow: (this: MSInputMethodContext, ev: Event) => any;
+ oncandidatewindowupdate: (this: MSInputMethodContext, ev: Event) => any;
+ readonly target: HTMLElement;
+ getCandidateWindowClientRect(): ClientRect;
+ getCompositionAlternatives(): string[];
+ hasComposition(): boolean;
+ isCandidateWindowVisible(): boolean;
+ addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSInputMethodContext: {
+ prototype: MSInputMethodContext;
+ new(): MSInputMethodContext;
+}
+
+interface MSManipulationEvent extends UIEvent {
+ readonly currentState: number;
+ readonly inertiaDestinationX: number;
+ readonly inertiaDestinationY: number;
+ readonly lastState: number;
+ initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+declare var MSManipulationEvent: {
+ prototype: MSManipulationEvent;
+ new(): MSManipulationEvent;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+interface MSMediaKeyError {
+ readonly code: number;
+ readonly systemCode: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+declare var MSMediaKeyError: {
+ prototype: MSMediaKeyError;
+ new(): MSMediaKeyError;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+interface MSMediaKeyMessageEvent extends Event {
+ readonly destinationURL: string | null;
+ readonly message: Uint8Array;
+}
+
+declare var MSMediaKeyMessageEvent: {
+ prototype: MSMediaKeyMessageEvent;
+ new(): MSMediaKeyMessageEvent;
+}
+
+interface MSMediaKeyNeededEvent extends Event {
+ readonly initData: Uint8Array | null;
+}
+
+declare var MSMediaKeyNeededEvent: {
+ prototype: MSMediaKeyNeededEvent;
+ new(): MSMediaKeyNeededEvent;
+}
+
+interface MSMediaKeySession extends EventTarget {
+ readonly error: MSMediaKeyError | null;
+ readonly keySystem: string;
+ readonly sessionId: string;
+ close(): void;
+ update(key: Uint8Array): void;
+}
+
+declare var MSMediaKeySession: {
+ prototype: MSMediaKeySession;
+ new(): MSMediaKeySession;
+}
+
+interface MSMediaKeys {
+ readonly keySystem: string;
+ createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
+}
+
+declare var MSMediaKeys: {
+ prototype: MSMediaKeys;
+ new(keySystem: string): MSMediaKeys;
+ isTypeSupported(keySystem: string, type?: string): boolean;
+ isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
+}
+
+interface MSPointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var MSPointerEvent: {
+ prototype: MSPointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
+}
+
+interface MSRangeCollection {
+ readonly length: number;
+ item(index: number): Range;
+ [index: number]: Range;
+}
+
+declare var MSRangeCollection: {
+ prototype: MSRangeCollection;
+ new(): MSRangeCollection;
+}
+
+interface MSSiteModeEvent extends Event {
+ readonly actionURL: string;
+ readonly buttonID: number;
+}
+
+declare var MSSiteModeEvent: {
+ prototype: MSSiteModeEvent;
+ new(): MSSiteModeEvent;
+}
+
+interface MSStream {
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+}
+
+declare var MSStream: {
+ prototype: MSStream;
+ new(): MSStream;
+}
+
+interface MSStreamReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(stream: MSStream, size?: number): void;
+ readAsBinaryString(stream: MSStream, size?: number): void;
+ readAsBlob(stream: MSStream, size?: number): void;
+ readAsDataURL(stream: MSStream, size?: number): void;
+ readAsText(stream: MSStream, encoding?: string, size?: number): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSStreamReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSStreamReader: {
+ prototype: MSStreamReader;
+ new(): MSStreamReader;
+}
+
+interface MSWebViewAsyncOperationEventMap {
+ "complete": Event;
+ "error": Event;
+}
+
+interface MSWebViewAsyncOperation extends EventTarget {
+ readonly error: DOMError;
+ oncomplete: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ onerror: (this: MSWebViewAsyncOperation, ev: Event) => any;
+ readonly readyState: number;
+ readonly result: any;
+ readonly target: MSHTMLWebViewElement;
+ readonly type: number;
+ start(): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+ addEventListener<K extends keyof MSWebViewAsyncOperationEventMap>(type: K, listener: (this: MSWebViewAsyncOperation, ev: MSWebViewAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSWebViewAsyncOperation: {
+ prototype: MSWebViewAsyncOperation;
+ new(): MSWebViewAsyncOperation;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+}
+
+interface MSWebViewSettings {
+ isIndexedDBEnabled: boolean;
+ isJavaScriptEnabled: boolean;
+}
+
+declare var MSWebViewSettings: {
+ prototype: MSWebViewSettings;
+ new(): MSWebViewSettings;
+}
+
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: MediaDeviceKind;
+ readonly label: string;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+}
+
+interface MediaDevicesEventMap {
+ "devicechange": Event;
+}
+
+interface MediaDevices extends EventTarget {
+ ondevicechange: (this: MediaDevices, ev: Event) => any;
+ enumerateDevices(): any;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
+ addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+}
+
+interface MediaElementAudioSourceNode extends AudioNode {
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(): MediaElementAudioSourceNode;
+}
+
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+}
+
+interface MediaError {
+ readonly code: number;
+ readonly msExtendedCode: number;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: MediaKeyMessageType;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+}
+
+interface MediaKeySession extends EventTarget {
+ readonly closed: Promise<void>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ readonly sessionId: string;
+ close(): Promise<void>;
+ generateRequest(initDataType: string, initData: any): Promise<void>;
+ load(sessionId: string): Promise<boolean>;
+ remove(): Promise<void>;
+ update(response: any): Promise<void>;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+}
+
+interface MediaKeyStatusMap {
+ readonly size: number;
+ forEach(callback: ForEachCallback): void;
+ get(keyId: any): MediaKeyStatus;
+ has(keyId: any): boolean;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+}
+
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): Promise<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+}
+
+interface MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+}
+
+interface MediaList {
+ readonly length: number;
+ mediaText: string;
+ appendMedium(newMedium: string): void;
+ deleteMedium(oldMedium: string): void;
+ item(index: number): string;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+}
+
+interface MediaQueryList {
+ readonly matches: boolean;
+ readonly media: string;
+ addListener(listener: MediaQueryListListener): void;
+ removeListener(listener: MediaQueryListListener): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+}
+
+interface MediaSource extends EventTarget {
+ readonly activeSourceBuffers: SourceBufferList;
+ duration: number;
+ readonly readyState: string;
+ readonly sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ endOfStream(error?: number): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+}
+
+interface MediaStreamEventMap {
+ "active": Event;
+ "addtrack": MediaStreamTrackEvent;
+ "inactive": Event;
+ "removetrack": MediaStreamTrackEvent;
+}
+
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onactive: (this: MediaStream, ev: Event) => any;
+ onaddtrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ oninactive: (this: MediaStream, ev: Event) => any;
+ onremovetrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
+}
+
+interface MediaStreamAudioSourceNode extends AudioNode {
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(): MediaStreamAudioSourceNode;
+}
+
+interface MediaStreamError {
+ readonly constraintName: string | null;
+ readonly message: string | null;
+ readonly name: string;
+}
+
+declare var MediaStreamError: {
+ prototype: MediaStreamError;
+ new(): MediaStreamError;
+}
+
+interface MediaStreamErrorEvent extends Event {
+ readonly error: MediaStreamError | null;
+}
+
+declare var MediaStreamErrorEvent: {
+ prototype: MediaStreamErrorEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
+}
+
+interface MediaStreamEvent extends Event {
+ readonly stream: MediaStream | null;
+}
+
+declare var MediaStreamEvent: {
+ prototype: MediaStreamEvent;
+ new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent;
+}
+
+interface MediaStreamTrackEventMap {
+ "ended": MediaStreamErrorEvent;
+ "mute": Event;
+ "overconstrained": MediaStreamErrorEvent;
+ "unmute": Event;
+}
+
+interface MediaStreamTrack extends EventTarget {
+ enabled: boolean;
+ readonly id: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onmute: (this: MediaStreamTrack, ev: Event) => any;
+ onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any;
+ onunmute: (this: MediaStreamTrack, ev: Event) => any;
+ readonly readonly: boolean;
+ readonly readyState: MediaStreamTrackState;
+ readonly remote: boolean;
+ applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+}
+
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+}
+
+interface MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+}
+
+interface MessageEvent extends Event {
+ readonly data: any;
+ readonly origin: string;
+ readonly ports: any;
+ readonly source: Window;
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+}
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+}
+
+interface MessagePort extends EventTarget {
+ onmessage: (this: MessagePort, ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message?: any, transfer?: any[]): void;
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+}
+
+interface MimeType {
+ readonly description: string;
+ readonly enabledPlugin: Plugin;
+ readonly suffixes: string;
+ readonly type: string;
+}
+
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+}
+
+interface MimeTypeArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(type: string): Plugin;
+ [index: number]: Plugin;
+}
+
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+}
+
+interface MouseEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly fromElement: Element;
+ readonly layerX: number;
+ readonly layerY: number;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly toElement: Element;
+ readonly which: number;
+ readonly x: number;
+ readonly y: number;
+ getModifierState(keyArg: string): boolean;
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
+}
+
+interface MutationEvent extends Event {
+ readonly attrChange: number;
+ readonly attrName: string;
+ readonly newValue: string;
+ readonly prevValue: string;
+ readonly relatedNode: Node;
+ initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+interface MutationObserver {
+ disconnect(): void;
+ observe(target: Node, options: MutationObserverInit): void;
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+}
+
+interface MutationRecord {
+ readonly addedNodes: NodeList;
+ readonly attributeName: string | null;
+ readonly attributeNamespace: string | null;
+ readonly nextSibling: Node | null;
+ readonly oldValue: string | null;
+ readonly previousSibling: Node | null;
+ readonly removedNodes: NodeList;
+ readonly target: Node;
+ readonly type: string;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+}
+
+interface NamedNodeMap {
+ readonly length: number;
+ getNamedItem(name: string): Attr;
+ getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ item(index: number): Attr;
+ removeNamedItem(name: string): Attr;
+ removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
+ setNamedItem(arg: Attr): Attr;
+ setNamedItemNS(arg: Attr): Attr;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+}
+
+interface NavigationCompletedEvent extends NavigationEvent {
+ readonly isSuccess: boolean;
+ readonly webErrorStatus: number;
+}
+
+declare var NavigationCompletedEvent: {
+ prototype: NavigationCompletedEvent;
+ new(): NavigationCompletedEvent;
+}
+
+interface NavigationEvent extends Event {
+ readonly uri: string;
+}
+
+declare var NavigationEvent: {
+ prototype: NavigationEvent;
+ new(): NavigationEvent;
+}
+
+interface NavigationEventWithReferrer extends NavigationEvent {
+ readonly referer: string;
+}
+
+declare var NavigationEventWithReferrer: {
+ prototype: NavigationEventWithReferrer;
+ new(): NavigationEventWithReferrer;
+}
+
+interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
+ readonly authentication: WebAuthentication;
+ readonly cookieEnabled: boolean;
+ gamepadInputEmulation: GamepadInputEmulationType;
+ readonly language: string;
+ readonly maxTouchPoints: number;
+ readonly mimeTypes: MimeTypeArray;
+ readonly msManipulationViewsEnabled: boolean;
+ readonly msMaxTouchPoints: number;
+ readonly msPointerEnabled: boolean;
+ readonly plugins: PluginArray;
+ readonly pointerEnabled: boolean;
+ readonly serviceWorker: ServiceWorkerContainer;
+ readonly webdriver: boolean;
+ readonly hardwareConcurrency: number;
+ getGamepads(): Gamepad[];
+ javaEnabled(): boolean;
+ msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
+ vibrate(pattern: number | number[]): boolean;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+}
+
+interface Node extends EventTarget {
+ readonly attributes: NamedNodeMap;
+ readonly baseURI: string | null;
+ readonly childNodes: NodeList;
+ readonly firstChild: Node | null;
+ readonly lastChild: Node | null;
+ readonly localName: string | null;
+ readonly namespaceURI: string | null;
+ readonly nextSibling: Node | null;
+ readonly nodeName: string;
+ readonly nodeType: number;
+ nodeValue: string | null;
+ readonly ownerDocument: Document;
+ readonly parentElement: HTMLElement | null;
+ readonly parentNode: Node | null;
+ readonly previousSibling: Node | null;
+ textContent: string | null;
+ appendChild<T extends Node>(newChild: T): T;
+ cloneNode(deep?: boolean): Node;
+ compareDocumentPosition(other: Node): number;
+ contains(child: Node): boolean;
+ hasAttributes(): boolean;
+ hasChildNodes(): boolean;
+ insertBefore<T extends Node>(newChild: T, refChild: Node | null): T;
+ isDefaultNamespace(namespaceURI: string | null): boolean;
+ isEqualNode(arg: Node): boolean;
+ isSameNode(other: Node): boolean;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespaceURI: string | null): string | null;
+ normalize(): void;
+ removeChild<T extends Node>(oldChild: T): T;
+ replaceChild<T extends Node>(newChild: Node, oldChild: T): T;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
+}
+
+interface NodeFilter {
+ acceptNode(n: Node): number;
+}
+
+declare var NodeFilter: {
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
+}
+
+interface NodeIterator {
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ detach(): void;
+ nextNode(): Node;
+ previousNode(): Node;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+}
+
+interface NodeList {
+ readonly length: number;
+ item(index: number): Node;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: (this: Notification, ev: Event) => any;
+ onclose: (this: Notification, ev: Event) => any;
+ onerror: (this: Notification, ev: Event) => any;
+ onshow: (this: Notification, ev: Event) => any;
+ readonly permission: NotificationPermission;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+}
+
+interface OES_element_index_uint {
+}
+
+declare var OES_element_index_uint: {
+ prototype: OES_element_index_uint;
+ new(): OES_element_index_uint;
+}
+
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+declare var OES_standard_derivatives: {
+ prototype: OES_standard_derivatives;
+ new(): OES_standard_derivatives;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+interface OES_texture_float {
+}
+
+declare var OES_texture_float: {
+ prototype: OES_texture_float;
+ new(): OES_texture_float;
+}
+
+interface OES_texture_float_linear {
+}
+
+declare var OES_texture_float_linear: {
+ prototype: OES_texture_float_linear;
+ new(): OES_texture_float_linear;
+}
+
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: number;
+}
+
+declare var OES_texture_half_float: {
+ prototype: OES_texture_half_float;
+ new(): OES_texture_half_float;
+ readonly HALF_FLOAT_OES: number;
+}
+
+interface OES_texture_half_float_linear {
+}
+
+declare var OES_texture_half_float_linear: {
+ prototype: OES_texture_half_float_linear;
+ new(): OES_texture_half_float_linear;
+}
+
+interface OfflineAudioCompletionEvent extends Event {
+ readonly renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(): OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContextEventMap extends AudioContextEventMap {
+ "complete": OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContext extends AudioContextBase {
+ readonly length: number;
+ oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
+ startRendering(): Promise<AudioBuffer>;
+ suspend(suspendTime: number): Promise<void>;
+ addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+}
+
+interface OscillatorNodeEventMap {
+ "ended": MediaStreamErrorEvent;
+}
+
+interface OscillatorNode extends AudioNode {
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ onended: (this: OscillatorNode, ev: MediaStreamErrorEvent) => any;
+ type: OscillatorType;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof OscillatorNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: OscillatorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(): OscillatorNode;
+}
+
+interface OverflowEvent extends UIEvent {
+ readonly horizontalOverflow: boolean;
+ readonly orient: number;
+ readonly verticalOverflow: boolean;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+declare var OverflowEvent: {
+ prototype: OverflowEvent;
+ new(): OverflowEvent;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+interface PageTransitionEvent extends Event {
+ readonly persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(): PageTransitionEvent;
+}
+
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: DistanceModelType;
+ maxDistance: number;
+ panningModel: PanningModelType;
+ refDistance: number;
+ rolloffFactor: number;
+ setOrientation(x: number, y: number, z: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(): PannerNode;
+}
+
+interface Path2D extends Object, CanvasPathMethods {
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D): Path2D;
+}
+
+interface PaymentAddress {
+ readonly addressLine: string[];
+ readonly city: string;
+ readonly country: string;
+ readonly dependentLocality: string;
+ readonly languageCode: string;
+ readonly organization: string;
+ readonly phone: string;
+ readonly postalCode: string;
+ readonly recipient: string;
+ readonly region: string;
+ readonly sortingCode: string;
+ toJSON(): any;
+}
+
+declare var PaymentAddress: {
+ prototype: PaymentAddress;
+ new(): PaymentAddress;
+}
+
+interface PaymentRequestEventMap {
+ "shippingaddresschange": Event;
+ "shippingoptionchange": Event;
+}
+
+interface PaymentRequest extends EventTarget {
+ onshippingaddresschange: (this: PaymentRequest, ev: Event) => any;
+ onshippingoptionchange: (this: PaymentRequest, ev: Event) => any;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ readonly shippingType: PaymentShippingType | null;
+ abort(): Promise<void>;
+ show(): Promise<PaymentResponse>;
+ addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var PaymentRequest: {
+ prototype: PaymentRequest;
+ new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
+}
+
+interface PaymentRequestUpdateEvent extends Event {
+ updateWith(d: Promise<PaymentDetails>): void;
+}
+
+declare var PaymentRequestUpdateEvent: {
+ prototype: PaymentRequestUpdateEvent;
+ new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
+}
+
+interface PaymentResponse {
+ readonly details: any;
+ readonly methodName: string;
+ readonly payerEmail: string | null;
+ readonly payerName: string | null;
+ readonly payerPhone: string | null;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ complete(result?: PaymentComplete): Promise<void>;
+ toJSON(): any;
+}
+
+declare var PaymentResponse: {
+ prototype: PaymentResponse;
+ new(): PaymentResponse;
+}
+
+interface PerfWidgetExternal {
+ readonly activeNetworkRequestCount: number;
+ readonly averageFrameTime: number;
+ readonly averagePaintTime: number;
+ readonly extraInformationEnabled: boolean;
+ readonly independentRenderingEnabled: boolean;
+ readonly irDisablingContentString: string;
+ readonly irStatusAvailable: boolean;
+ readonly maxCpuSpeed: number;
+ readonly paintRequestsPerSecond: number;
+ readonly performanceCounter: number;
+ readonly performanceCounterFrequency: number;
+ addEventListener(eventType: string, callback: Function): void;
+ getMemoryUsage(): number;
+ getProcessCpuUsage(): number;
+ getRecentCpuUsage(last: number | null): any;
+ getRecentFrames(last: number | null): any;
+ getRecentMemoryUsage(last: number | null): any;
+ getRecentPaintRequests(last: number | null): any;
+ removeEventListener(eventType: string, callback: Function): void;
+ repositionWindow(x: number, y: number): void;
+ resizeWindow(width: number, height: number): void;
+}
+
+declare var PerfWidgetExternal: {
+ prototype: PerfWidgetExternal;
+ new(): PerfWidgetExternal;
+}
+
+interface Performance {
+ readonly navigation: PerformanceNavigation;
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): any;
+ getEntriesByName(name: string, entryType?: string): any;
+ getEntriesByType(entryType: string): any;
+ getMarks(markName?: string): any;
+ getMeasures(measureName?: string): any;
+ mark(markName: string): void;
+ measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+}
+
+interface PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+}
+
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+}
+
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+}
+
+interface PerformanceNavigation {
+ readonly redirectCount: number;
+ readonly type: number;
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+interface PerformanceNavigationTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly navigationStart: number;
+ readonly redirectCount: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly type: NavigationType;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+}
+
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+}
+
+interface PerformanceTiming {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly msFirstPaint: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ readonly secureConnectionStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+}
+
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(): PeriodicWave;
+}
+
+interface PermissionRequest extends DeferredPermissionRequest {
+ readonly state: MSWebViewPermissionState;
+ defer(): void;
+}
+
+declare var PermissionRequest: {
+ prototype: PermissionRequest;
+ new(): PermissionRequest;
+}
+
+interface PermissionRequestedEvent extends Event {
+ readonly permissionRequest: PermissionRequest;
+}
+
+declare var PermissionRequestedEvent: {
+ prototype: PermissionRequestedEvent;
+ new(): PermissionRequestedEvent;
+}
+
+interface Plugin {
+ readonly description: string;
+ readonly filename: string;
+ readonly length: number;
+ readonly name: string;
+ readonly version: string;
+ item(index: number): MimeType;
+ namedItem(type: string): MimeType;
+ [index: number]: MimeType;
+}
+
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+}
+
+interface PluginArray {
+ readonly length: number;
+ item(index: number): Plugin;
+ namedItem(name: string): Plugin;
+ refresh(reload?: boolean): void;
+ [index: number]: Plugin;
+}
+
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+}
+
+interface PointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
+}
+
+interface PopStateEvent extends Event {
+ readonly state: any;
+ initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
+}
+
+interface Position {
+ readonly coords: Coordinates;
+ readonly timestamp: number;
+}
+
+declare var Position: {
+ prototype: Position;
+ new(): Position;
+}
+
+interface PositionError {
+ readonly code: number;
+ readonly message: string;
+ toString(): string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+declare var PositionError: {
+ prototype: PositionError;
+ new(): PositionError;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+interface ProcessingInstruction extends CharacterData {
+ readonly target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+}
+
+interface ProgressEvent extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly total: number;
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+}
+
+interface PushManager {
+ getSubscription(): Promise<PushSubscription>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+}
+
+interface PushSubscription {
+ readonly endpoint: USVString;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): any;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+}
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+}
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtlsTransportEventMap {
+ "dtlsstatechange": RTCDtlsTransportStateChangedEvent;
+ "error": Event;
+}
+
+interface RTCDtlsTransport extends RTCStatsProvider {
+ ondtlsstatechange: ((this: RTCDtlsTransport, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
+ onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ readonly state: RTCDtlsTransportState;
+ readonly transport: RTCIceTransport;
+ getLocalParameters(): RTCDtlsParameters;
+ getRemoteCertificates(): ArrayBuffer[];
+ getRemoteParameters(): RTCDtlsParameters | null;
+ start(remoteParameters: RTCDtlsParameters): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(transport: RTCIceTransport): RTCDtlsTransport;
+}
+
+interface RTCDtlsTransportStateChangedEvent extends Event {
+ readonly state: RTCDtlsTransportState;
+}
+
+declare var RTCDtlsTransportStateChangedEvent: {
+ prototype: RTCDtlsTransportStateChangedEvent;
+ new(): RTCDtlsTransportStateChangedEvent;
+}
+
+interface RTCDtmfSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtmfSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ readonly duration: number;
+ readonly interToneGap: number;
+ ontonechange: (this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any;
+ readonly sender: RTCRtpSender;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtmfSender: {
+ prototype: RTCDtmfSender;
+ new(sender: RTCRtpSender): RTCDtmfSender;
+}
+
+interface RTCIceCandidate {
+ candidate: string | null;
+ sdpMLineIndex: number | null;
+ sdpMid: string | null;
+ toJSON(): any;
+}
+
+declare var RTCIceCandidate: {
+ prototype: RTCIceCandidate;
+ new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
+}
+
+interface RTCIceCandidatePairChangedEvent extends Event {
+ readonly pair: RTCIceCandidatePair;
+}
+
+declare var RTCIceCandidatePairChangedEvent: {
+ prototype: RTCIceCandidatePairChangedEvent;
+ new(): RTCIceCandidatePairChangedEvent;
+}
+
+interface RTCIceGathererEventMap {
+ "error": Event;
+ "localcandidate": RTCIceGathererEvent;
+}
+
+interface RTCIceGatherer extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ onerror: ((this: RTCIceGatherer, ev: Event) => any) | null;
+ onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
+ createAssociatedGatherer(): RTCIceGatherer;
+ getLocalCandidates(): RTCIceCandidateDictionary[];
+ getLocalParameters(): RTCIceParameters;
+ addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceGatherer: {
+ prototype: RTCIceGatherer;
+ new(options: RTCIceGatherOptions): RTCIceGatherer;
+}
+
+interface RTCIceGathererEvent extends Event {
+ readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
+}
+
+declare var RTCIceGathererEvent: {
+ prototype: RTCIceGathererEvent;
+ new(): RTCIceGathererEvent;
+}
+
+interface RTCIceTransportEventMap {
+ "candidatepairchange": RTCIceCandidatePairChangedEvent;
+ "icestatechange": RTCIceTransportStateChangedEvent;
+}
+
+interface RTCIceTransport extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ readonly iceGatherer: RTCIceGatherer | null;
+ oncandidatepairchange: ((this: RTCIceTransport, ev: RTCIceCandidatePairChangedEvent) => any) | null;
+ onicestatechange: ((this: RTCIceTransport, ev: RTCIceTransportStateChangedEvent) => any) | null;
+ readonly role: RTCIceRole;
+ readonly state: RTCIceTransportState;
+ addRemoteCandidate(remoteCandidate: RTCIceCandidateDictionary | RTCIceCandidateComplete): void;
+ createAssociatedTransport(): RTCIceTransport;
+ getNominatedCandidatePair(): RTCIceCandidatePair | null;
+ getRemoteCandidates(): RTCIceCandidateDictionary[];
+ getRemoteParameters(): RTCIceParameters | null;
+ setRemoteCandidates(remoteCandidates: RTCIceCandidateDictionary[]): void;
+ start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: RTCIceRole): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+}
+
+interface RTCIceTransportStateChangedEvent extends Event {
+ readonly state: RTCIceTransportState;
+}
+
+declare var RTCIceTransportStateChangedEvent: {
+ prototype: RTCIceTransportStateChangedEvent;
+ new(): RTCIceTransportStateChangedEvent;
+}
+
+interface RTCPeerConnectionEventMap {
+ "addstream": MediaStreamEvent;
+ "icecandidate": RTCPeerConnectionIceEvent;
+ "iceconnectionstatechange": Event;
+ "icegatheringstatechange": Event;
+ "negotiationneeded": Event;
+ "removestream": MediaStreamEvent;
+ "signalingstatechange": Event;
+}
+
+interface RTCPeerConnection extends EventTarget {
+ readonly canTrickleIceCandidates: boolean | null;
+ readonly iceConnectionState: RTCIceConnectionState;
+ readonly iceGatheringState: RTCIceGatheringState;
+ readonly localDescription: RTCSessionDescription | null;
+ onaddstream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onicecandidate: (this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any;
+ oniceconnectionstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onicegatheringstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ onnegotiationneeded: (this: RTCPeerConnection, ev: Event) => any;
+ onremovestream: (this: RTCPeerConnection, ev: MediaStreamEvent) => any;
+ onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
+ readonly remoteDescription: RTCSessionDescription | null;
+ readonly signalingState: RTCSignalingState;
+ addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addStream(stream: MediaStream): void;
+ close(): void;
+ createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
+ createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
+ getConfiguration(): RTCConfiguration;
+ getLocalStreams(): MediaStream[];
+ getRemoteStreams(): MediaStream[];
+ getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
+ getStreamById(streamId: string): MediaStream | null;
+ removeStream(stream: MediaStream): void;
+ setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCPeerConnection: {
+ prototype: RTCPeerConnection;
+ new(configuration: RTCConfiguration): RTCPeerConnection;
+}
+
+interface RTCPeerConnectionIceEvent extends Event {
+ readonly candidate: RTCIceCandidate;
+}
+
+declare var RTCPeerConnectionIceEvent: {
+ prototype: RTCPeerConnectionIceEvent;
+ new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
+}
+
+interface RTCRtpReceiverEventMap {
+ "error": Event;
+}
+
+interface RTCRtpReceiver extends RTCStatsProvider {
+ onerror: ((this: RTCRtpReceiver, ev: Event) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ getContributingSources(): RTCRtpContributingSource[];
+ receive(parameters: RTCRtpParameters): void;
+ requestSendCSRC(csrc: number): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpReceiverEventMap>(type: K, listener: (this: RTCRtpReceiver, ev: RTCRtpReceiverEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCRtpSenderEventMap {
+ "error": Event;
+ "ssrcconflict": RTCSsrcConflictEvent;
+}
+
+interface RTCRtpSender extends RTCStatsProvider {
+ onerror: ((this: RTCRtpSender, ev: Event) => any) | null;
+ onssrcconflict: ((this: RTCRtpSender, ev: RTCSsrcConflictEvent) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ send(parameters: RTCRtpParameters): void;
+ setTrack(track: MediaStreamTrack): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener<K extends keyof RTCRtpSenderEventMap>(type: K, listener: (this: RTCRtpSender, ev: RTCRtpSenderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCSessionDescription {
+ sdp: string | null;
+ type: RTCSdpType | null;
+ toJSON(): any;
+}
+
+declare var RTCSessionDescription: {
+ prototype: RTCSessionDescription;
+ new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
+}
+
+interface RTCSrtpSdesTransportEventMap {
+ "error": Event;
+}
+
+interface RTCSrtpSdesTransport extends EventTarget {
+ onerror: ((this: RTCSrtpSdesTransport, ev: Event) => any) | null;
+ readonly transport: RTCIceTransport;
+ addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCSrtpSdesTransport: {
+ prototype: RTCSrtpSdesTransport;
+ new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
+ getLocalParameters(): RTCSrtpSdesParameters[];
+}
+
+interface RTCSsrcConflictEvent extends Event {
+ readonly ssrc: number;
+}
+
+declare var RTCSsrcConflictEvent: {
+ prototype: RTCSsrcConflictEvent;
+ new(): RTCSsrcConflictEvent;
+}
+
+interface RTCStatsProvider extends EventTarget {
+ getStats(): Promise<RTCStatsReport>;
+ msGetStats(): Promise<RTCStatsReport>;
+}
+
+declare var RTCStatsProvider: {
+ prototype: RTCStatsProvider;
+ new(): RTCStatsProvider;
+}
+
+interface Range {
+ readonly collapsed: boolean;
+ readonly commonAncestorContainer: Node;
+ readonly endContainer: Node;
+ readonly endOffset: number;
+ readonly startContainer: Node;
+ readonly startOffset: number;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ expand(Unit: ExpandGranularity): boolean;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ insertNode(newNode: Node): void;
+ selectNode(refNode: Node): void;
+ selectNodeContents(refNode: Node): void;
+ setEnd(refNode: Node, offset: number): void;
+ setEndAfter(refNode: Node): void;
+ setEndBefore(refNode: Node): void;
+ setStart(refNode: Node, offset: number): void;
+ setStartAfter(refNode: Node): void;
+ setStartBefore(refNode: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+interface ReadableStream {
+ readonly locked: boolean;
+ cancel(): Promise<void>;
+ getReader(): ReadableStreamReader;
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(): ReadableStream;
+}
+
+interface ReadableStreamReader {
+ cancel(): Promise<void>;
+ read(): Promise<any>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+}
+
+interface Request extends Object, Body {
+ readonly cache: RequestCache;
+ readonly credentials: RequestCredentials;
+ readonly destination: RequestDestination;
+ readonly headers: Headers;
+ readonly integrity: string;
+ readonly keepalive: boolean;
+ readonly method: string;
+ readonly mode: RequestMode;
+ readonly redirect: RequestRedirect;
+ readonly referrer: string;
+ readonly referrerPolicy: ReferrerPolicy;
+ readonly type: RequestType;
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: Request | string, init?: RequestInit): Request;
+}
+
+interface Response extends Object, Body {
+ readonly body: ReadableStream | null;
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: any, init?: ResponseInit): Response;
+}
+
+interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
+ readonly target: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+}
+
+interface SVGAngle {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+interface SVGAnimatedAngle {
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+}
+
+interface SVGAnimatedBoolean {
+ readonly animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+}
+
+interface SVGAnimatedEnumeration {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+}
+
+interface SVGAnimatedInteger {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+}
+
+interface SVGAnimatedLength {
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+}
+
+interface SVGAnimatedLengthList {
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+}
+
+interface SVGAnimatedNumber {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+}
+
+interface SVGAnimatedNumberList {
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+}
+
+interface SVGAnimatedPreserveAspectRatio {
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+}
+
+interface SVGAnimatedRect {
+ readonly animVal: SVGRect;
+ readonly baseVal: SVGRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+}
+
+interface SVGAnimatedString {
+ readonly animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+}
+
+interface SVGAnimatedTransformList {
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+}
+
+interface SVGCircleElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+}
+
+interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
+ readonly clipPathUnits: SVGAnimatedEnumeration;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+}
+
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+}
+
+interface SVGDefsElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+}
+
+interface SVGDescElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+}
+
+interface SVGElementEventMap extends ElementEventMap {
+ "click": MouseEvent;
+ "dblclick": MouseEvent;
+ "focusin": FocusEvent;
+ "focusout": FocusEvent;
+ "load": Event;
+ "mousedown": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+}
+
+interface SVGElement extends Element {
+ className: any;
+ onclick: (this: SVGElement, ev: MouseEvent) => any;
+ ondblclick: (this: SVGElement, ev: MouseEvent) => any;
+ onfocusin: (this: SVGElement, ev: FocusEvent) => any;
+ onfocusout: (this: SVGElement, ev: FocusEvent) => any;
+ onload: (this: SVGElement, ev: Event) => any;
+ onmousedown: (this: SVGElement, ev: MouseEvent) => any;
+ onmousemove: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseout: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseover: (this: SVGElement, ev: MouseEvent) => any;
+ onmouseup: (this: SVGElement, ev: MouseEvent) => any;
+ readonly ownerSVGElement: SVGSVGElement;
+ readonly style: CSSStyleDeclaration;
+ readonly viewportElement: SVGElement;
+ xmlbase: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+}
+
+interface SVGElementInstance extends EventTarget {
+ readonly childNodes: SVGElementInstanceList;
+ readonly correspondingElement: SVGElement;
+ readonly correspondingUseElement: SVGUseElement;
+ readonly firstChild: SVGElementInstance;
+ readonly lastChild: SVGElementInstance;
+ readonly nextSibling: SVGElementInstance;
+ readonly parentNode: SVGElementInstance;
+ readonly previousSibling: SVGElementInstance;
+}
+
+declare var SVGElementInstance: {
+ prototype: SVGElementInstance;
+ new(): SVGElementInstance;
+}
+
+interface SVGElementInstanceList {
+ readonly length: number;
+ item(index: number): SVGElementInstance;
+}
+
+declare var SVGElementInstanceList: {
+ prototype: SVGElementInstanceList;
+ new(): SVGElementInstanceList;
+}
+
+interface SVGEllipseElement extends SVGGraphicsElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+}
+
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+}
+
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+}
+
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+}
+
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+}
+
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+}
+
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+}
+
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+}
+
+interface SVGFEDistantLightElement extends SVGElement {
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+}
+
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+}
+
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+}
+
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+}
+
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+}
+
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+}
+
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+}
+
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+}
+
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+}
+
+interface SVGFEMergeNodeElement extends SVGElement {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+}
+
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+}
+
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+}
+
+interface SVGFEPointLightElement extends SVGElement {
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+}
+
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+}
+
+interface SVGFESpotLightElement extends SVGElement {
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+}
+
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+}
+
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+}
+
+interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly filterResX: SVGAnimatedInteger;
+ readonly filterResY: SVGAnimatedInteger;
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ setFilterRes(filterResX: number, filterResY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+}
+
+interface SVGForeignObjectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+}
+
+interface SVGGElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+}
+
+interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+}
+
+interface SVGGraphicsElement extends SVGElement, SVGTests {
+ readonly farthestViewportElement: SVGElement;
+ readonly nearestViewportElement: SVGElement;
+ readonly transform: SVGAnimatedTransformList;
+ getBBox(): SVGRect;
+ getCTM(): SVGMatrix;
+ getScreenCTM(): SVGMatrix;
+ getTransformToElement(element: SVGElement): SVGMatrix;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGraphicsElement: {
+ prototype: SVGGraphicsElement;
+ new(): SVGGraphicsElement;
+}
+
+interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+}
+
+interface SVGLength {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+interface SVGLengthList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+}
+
+interface SVGLineElement extends SVGGraphicsElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+}
+
+interface SVGLinearGradientElement extends SVGGradientElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+}
+
+interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+}
+
+interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+}
+
+interface SVGMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ flipX(): SVGMatrix;
+ flipY(): SVGMatrix;
+ inverse(): SVGMatrix;
+ multiply(secondMatrix: SVGMatrix): SVGMatrix;
+ rotate(angle: number): SVGMatrix;
+ rotateFromVector(x: number, y: number): SVGMatrix;
+ scale(scaleFactor: number): SVGMatrix;
+ scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
+ skewX(angle: number): SVGMatrix;
+ skewY(angle: number): SVGMatrix;
+ translate(x: number, y: number): SVGMatrix;
+}
+
+declare var SVGMatrix: {
+ prototype: SVGMatrix;
+ new(): SVGMatrix;
+}
+
+interface SVGMetadataElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+}
+
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+}
+
+interface SVGNumberList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+}
+
+interface SVGPathElement extends SVGGraphicsElement {
+ readonly pathSegList: SVGPathSegList;
+ createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
+ createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
+ createSVGPathSegClosePath(): SVGPathSegClosePath;
+ createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
+ createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
+ createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
+ createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
+ createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
+ createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
+ createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
+ createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
+ createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
+ createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
+ createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
+ createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
+ createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
+ createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
+ createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
+ createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
+ getPathSegAtLength(distance: number): number;
+ getPointAtLength(distance: number): SVGPoint;
+ getTotalLength(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+}
+
+interface SVGPathSeg {
+ readonly pathSegType: number;
+ readonly pathSegTypeAsLetter: string;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+declare var SVGPathSeg: {
+ prototype: SVGPathSeg;
+ new(): SVGPathSeg;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+interface SVGPathSegArcAbs extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcAbs: {
+ prototype: SVGPathSegArcAbs;
+ new(): SVGPathSegArcAbs;
+}
+
+interface SVGPathSegArcRel extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcRel: {
+ prototype: SVGPathSegArcRel;
+ new(): SVGPathSegArcRel;
+}
+
+interface SVGPathSegClosePath extends SVGPathSeg {
+}
+
+declare var SVGPathSegClosePath: {
+ prototype: SVGPathSegClosePath;
+ new(): SVGPathSegClosePath;
+}
+
+interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicAbs: {
+ prototype: SVGPathSegCurvetoCubicAbs;
+ new(): SVGPathSegCurvetoCubicAbs;
+}
+
+interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicRel: {
+ prototype: SVGPathSegCurvetoCubicRel;
+ new(): SVGPathSegCurvetoCubicRel;
+}
+
+interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothAbs: {
+ prototype: SVGPathSegCurvetoCubicSmoothAbs;
+ new(): SVGPathSegCurvetoCubicSmoothAbs;
+}
+
+interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothRel: {
+ prototype: SVGPathSegCurvetoCubicSmoothRel;
+ new(): SVGPathSegCurvetoCubicSmoothRel;
+}
+
+interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticAbs: {
+ prototype: SVGPathSegCurvetoQuadraticAbs;
+ new(): SVGPathSegCurvetoQuadraticAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticRel: {
+ prototype: SVGPathSegCurvetoQuadraticRel;
+ new(): SVGPathSegCurvetoQuadraticRel;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
+ new(): SVGPathSegCurvetoQuadraticSmoothAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothRel: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothRel;
+ new(): SVGPathSegCurvetoQuadraticSmoothRel;
+}
+
+interface SVGPathSegLinetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoAbs: {
+ prototype: SVGPathSegLinetoAbs;
+ new(): SVGPathSegLinetoAbs;
+}
+
+interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalAbs: {
+ prototype: SVGPathSegLinetoHorizontalAbs;
+ new(): SVGPathSegLinetoHorizontalAbs;
+}
+
+interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalRel: {
+ prototype: SVGPathSegLinetoHorizontalRel;
+ new(): SVGPathSegLinetoHorizontalRel;
+}
+
+interface SVGPathSegLinetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoRel: {
+ prototype: SVGPathSegLinetoRel;
+ new(): SVGPathSegLinetoRel;
+}
+
+interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalAbs: {
+ prototype: SVGPathSegLinetoVerticalAbs;
+ new(): SVGPathSegLinetoVerticalAbs;
+}
+
+interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalRel: {
+ prototype: SVGPathSegLinetoVerticalRel;
+ new(): SVGPathSegLinetoVerticalRel;
+}
+
+interface SVGPathSegList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPathSeg): SVGPathSeg;
+ clear(): void;
+ getItem(index: number): SVGPathSeg;
+ initialize(newItem: SVGPathSeg): SVGPathSeg;
+ insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
+ removeItem(index: number): SVGPathSeg;
+ replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
+}
+
+declare var SVGPathSegList: {
+ prototype: SVGPathSegList;
+ new(): SVGPathSegList;
+}
+
+interface SVGPathSegMovetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoAbs: {
+ prototype: SVGPathSegMovetoAbs;
+ new(): SVGPathSegMovetoAbs;
+}
+
+interface SVGPathSegMovetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoRel: {
+ prototype: SVGPathSegMovetoRel;
+ new(): SVGPathSegMovetoRel;
+}
+
+interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+}
+
+interface SVGPoint {
+ x: number;
+ y: number;
+ matrixTransform(matrix: SVGMatrix): SVGPoint;
+}
+
+declare var SVGPoint: {
+ prototype: SVGPoint;
+ new(): SVGPoint;
+}
+
+interface SVGPointList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPoint): SVGPoint;
+ clear(): void;
+ getItem(index: number): SVGPoint;
+ initialize(newItem: SVGPoint): SVGPoint;
+ insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
+ removeItem(index: number): SVGPoint;
+ replaceItem(newItem: SVGPoint, index: number): SVGPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+}
+
+interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+}
+
+interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+}
+
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+interface SVGRadialGradientElement extends SVGGradientElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+}
+
+interface SVGRect {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var SVGRect: {
+ prototype: SVGRect;
+ new(): SVGRect;
+}
+
+interface SVGRectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+}
+
+interface SVGSVGElementEventMap extends SVGElementEventMap {
+ "SVGAbort": Event;
+ "SVGError": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "SVGUnload": Event;
+ "SVGZoom": SVGZoomEvent;
+}
+
+interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan {
+ contentScriptType: string;
+ contentStyleType: string;
+ currentScale: number;
+ readonly currentTranslate: SVGPoint;
+ readonly height: SVGAnimatedLength;
+ onabort: (this: SVGSVGElement, ev: Event) => any;
+ onerror: (this: SVGSVGElement, ev: Event) => any;
+ onresize: (this: SVGSVGElement, ev: UIEvent) => any;
+ onscroll: (this: SVGSVGElement, ev: UIEvent) => any;
+ onunload: (this: SVGSVGElement, ev: Event) => any;
+ onzoom: (this: SVGSVGElement, ev: SVGZoomEvent) => any;
+ readonly pixelUnitToMillimeterX: number;
+ readonly pixelUnitToMillimeterY: number;
+ readonly screenPixelToMillimeterX: number;
+ readonly screenPixelToMillimeterY: number;
+ readonly viewport: SVGRect;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
+ checkIntersection(element: SVGElement, rect: SVGRect): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): SVGMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): SVGPoint;
+ createSVGRect(): SVGRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ deselectAll(): void;
+ forceRedraw(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ unsuspendRedraw(suspendHandleID: number): void;
+ unsuspendRedrawAll(): void;
+ addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+}
+
+interface SVGScriptElement extends SVGElement, SVGURIReference {
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+}
+
+interface SVGStopElement extends SVGElement {
+ readonly offset: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+}
+
+interface SVGStringList {
+ readonly numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+}
+
+interface SVGStyleElement extends SVGElement {
+ disabled: boolean;
+ media: string;
+ title: string;
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+}
+
+interface SVGSwitchElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+}
+
+interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+}
+
+interface SVGTSpanElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+}
+
+interface SVGTextContentElement extends SVGGraphicsElement {
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point: SVGPoint): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): SVGPoint;
+ getExtentOfChar(charnum: number): SVGRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): SVGPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ selectSubString(charnum: number, nchars: number): void;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+}
+
+interface SVGTextElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+}
+
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+}
+
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+}
+
+interface SVGTitleElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+}
+
+interface SVGTransform {
+ readonly angle: number;
+ readonly matrix: SVGMatrix;
+ readonly type: number;
+ setMatrix(matrix: SVGMatrix): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+interface SVGTransformList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+}
+
+interface SVGUnitTypes {
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+declare var SVGUnitTypes: SVGUnitTypes;
+
+interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
+ readonly animatedInstanceRoot: SVGElementInstance;
+ readonly height: SVGAnimatedLength;
+ readonly instanceRoot: SVGElementInstance;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+}
+
+interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
+ readonly viewTarget: SVGStringList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+}
+
+interface SVGZoomAndPan {
+ readonly zoomAndPan: number;
+}
+
+declare var SVGZoomAndPan: {
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+}
+
+interface SVGZoomEvent extends UIEvent {
+ readonly newScale: number;
+ readonly newTranslate: SVGPoint;
+ readonly previousScale: number;
+ readonly previousTranslate: SVGPoint;
+ readonly zoomRectScreen: SVGRect;
+}
+
+declare var SVGZoomEvent: {
+ prototype: SVGZoomEvent;
+ new(): SVGZoomEvent;
+}
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
+}
+
+declare var ScopedCredential: {
+ prototype: ScopedCredential;
+ new(): ScopedCredential;
+}
+
+interface ScopedCredentialInfo {
+ readonly credential: ScopedCredential;
+ readonly publicKey: CryptoKey;
+}
+
+declare var ScopedCredentialInfo: {
+ prototype: ScopedCredentialInfo;
+ new(): ScopedCredentialInfo;
+}
+
+interface ScreenEventMap {
+ "MSOrientationChange": Event;
+}
+
+interface Screen extends EventTarget {
+ readonly availHeight: number;
+ readonly availWidth: number;
+ bufferDepth: number;
+ readonly colorDepth: number;
+ readonly deviceXDPI: number;
+ readonly deviceYDPI: number;
+ readonly fontSmoothingEnabled: boolean;
+ readonly height: number;
+ readonly logicalXDPI: number;
+ readonly logicalYDPI: number;
+ readonly msOrientation: string;
+ onmsorientationchange: (this: Screen, ev: Event) => any;
+ readonly pixelDepth: number;
+ readonly systemXDPI: number;
+ readonly systemYDPI: number;
+ readonly width: number;
+ msLockOrientation(orientations: string | string[]): boolean;
+ msUnlockOrientation(): void;
+ addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+}
+
+interface ScriptNotifyEvent extends Event {
+ readonly callingUri: string;
+ readonly value: string;
+}
+
+declare var ScriptNotifyEvent: {
+ prototype: ScriptNotifyEvent;
+ new(): ScriptNotifyEvent;
+}
+
+interface ScriptProcessorNodeEventMap {
+ "audioprocess": AudioProcessingEvent;
+}
+
+interface ScriptProcessorNode extends AudioNode {
+ readonly bufferSize: number;
+ onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any;
+ addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+}
+
+interface Selection {
+ readonly anchorNode: Node;
+ readonly anchorOffset: number;
+ readonly baseNode: Node;
+ readonly baseOffset: number;
+ readonly extentNode: Node;
+ readonly extentOffset: number;
+ readonly focusNode: Node;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
+ addRange(range: Range): void;
+ collapse(parentNode: Node, offset: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, partlyContained: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(newNode: Node, offset: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(parentNode: Node): void;
+ setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
+ setPosition(parentNode: Node, offset: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+}
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: (this: ServiceWorker, ev: Event) => any;
+ readonly scriptURL: USVString;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer?: any[]): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+}
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
+ onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: USVString): Promise<any>;
+ getRegistrations(): any;
+ register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+}
+
+interface ServiceWorkerMessageEvent extends Event {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: MessagePort[] | null;
+ readonly source: ServiceWorker | MessagePort | null;
+}
+
+declare var ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+}
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any;
+ readonly pushManager: PushManager;
+ readonly scope: USVString;
+ readonly sync: SyncManager;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): any;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+}
+
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ readonly audioTracks: AudioTrackList;
+ readonly buffered: TimeRanges;
+ mode: AppendMode;
+ timestampOffset: number;
+ readonly updating: boolean;
+ readonly videoTracks: VideoTrackList;
+ abort(): void;
+ appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
+ appendStream(stream: MSStream, maxSize?: number): void;
+ remove(start: number, end: number): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+}
+
+interface SourceBufferList extends EventTarget {
+ readonly length: number;
+ item(index: number): SourceBuffer;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+}
+
+interface SpeechSynthesisEventMap {
+ "voiceschanged": Event;
+}
+
+interface SpeechSynthesis extends EventTarget {
+ onvoiceschanged: (this: SpeechSynthesis, ev: Event) => any;
+ readonly paused: boolean;
+ readonly pending: boolean;
+ readonly speaking: boolean;
+ cancel(): void;
+ getVoices(): SpeechSynthesisVoice[];
+ pause(): void;
+ resume(): void;
+ speak(utterance: SpeechSynthesisUtterance): void;
+ addEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesis: {
+ prototype: SpeechSynthesis;
+ new(): SpeechSynthesis;
+}
+
+interface SpeechSynthesisEvent extends Event {
+ readonly charIndex: number;
+ readonly elapsedTime: number;
+ readonly name: string;
+ readonly utterance: SpeechSynthesisUtterance | null;
+}
+
+declare var SpeechSynthesisEvent: {
+ prototype: SpeechSynthesisEvent;
+ new(type: string, eventInitDict?: SpeechSynthesisEventInit): SpeechSynthesisEvent;
+}
+
+interface SpeechSynthesisUtteranceEventMap {
+ "boundary": Event;
+ "end": Event;
+ "error": Event;
+ "mark": Event;
+ "pause": Event;
+ "resume": Event;
+ "start": Event;
+}
+
+interface SpeechSynthesisUtterance extends EventTarget {
+ lang: string;
+ onboundary: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onend: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onerror: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onmark: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onpause: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onresume: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ onstart: (this: SpeechSynthesisUtterance, ev: Event) => any;
+ pitch: number;
+ rate: number;
+ text: string;
+ voice: SpeechSynthesisVoice;
+ volume: number;
+ addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SpeechSynthesisUtterance: {
+ prototype: SpeechSynthesisUtterance;
+ new(text?: string): SpeechSynthesisUtterance;
+}
+
+interface SpeechSynthesisVoice {
+ readonly default: boolean;
+ readonly lang: string;
+ readonly localService: boolean;
+ readonly name: string;
+ readonly voiceURI: string;
+}
+
+declare var SpeechSynthesisVoice: {
+ prototype: SpeechSynthesisVoice;
+ new(): SpeechSynthesisVoice;
+}
+
+interface StereoPannerNode extends AudioNode {
+ readonly pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(): StereoPannerNode;
+}
+
+interface Storage {
+ readonly length: number;
+ clear(): void;
+ getItem(key: string): string | null;
+ key(index: number): string | null;
+ removeItem(key: string): void;
+ setItem(key: string, data: string): void;
+ [key: string]: any;
+ [index: number]: string;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+}
+
+interface StorageEvent extends Event {
+ readonly url: string;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
+}
+
+interface StyleMedia {
+ readonly type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+declare var StyleMedia: {
+ prototype: StyleMedia;
+ new(): StyleMedia;
+}
+
+interface StyleSheet {
+ disabled: boolean;
+ readonly href: string;
+ readonly media: MediaList;
+ readonly ownerNode: Node;
+ readonly parentStyleSheet: StyleSheet;
+ readonly title: string;
+ readonly type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+}
+
+interface StyleSheetList {
+ readonly length: number;
+ item(index?: number): StyleSheet;
+ [index: number]: StyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+}
+
+interface StyleSheetPageList {
+ readonly length: number;
+ item(index: number): CSSPageRule;
+ [index: number]: CSSPageRule;
+}
+
+declare var StyleSheetPageList: {
+ prototype: StyleSheetPageList;
+ new(): StyleSheetPageList;
+}
+
+interface SubtleCrypto {
+ decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
+ wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+}
+
+interface SyncManager {
+ getTags(): any;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+}
+
+interface Text extends CharacterData {
+ readonly wholeText: string;
+ readonly assignedSlot: HTMLSlotElement | null;
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(data?: string): Text;
+}
+
+interface TextEvent extends UIEvent {
+ readonly data: string;
+ readonly inputMethod: number;
+ readonly locale: string;
+ initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+declare var TextEvent: {
+ prototype: TextEvent;
+ new(): TextEvent;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+interface TextMetrics {
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+}
+
+interface TextTrackEventMap {
+ "cuechange": Event;
+ "error": Event;
+ "load": Event;
+}
+
+interface TextTrack extends EventTarget {
+ readonly activeCues: TextTrackCueList;
+ readonly cues: TextTrackCueList;
+ readonly inBandMetadataTrackDispatchType: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly language: string;
+ mode: any;
+ oncuechange: (this: TextTrack, ev: Event) => any;
+ onerror: (this: TextTrack, ev: Event) => any;
+ onload: (this: TextTrack, ev: Event) => any;
+ readonly readyState: number;
+ addCue(cue: TextTrackCue): void;
+ removeCue(cue: TextTrackCue): void;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+ addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+}
+
+interface TextTrackCueEventMap {
+ "enter": Event;
+ "exit": Event;
+}
+
+interface TextTrackCue extends EventTarget {
+ endTime: number;
+ id: string;
+ onenter: (this: TextTrackCue, ev: Event) => any;
+ onexit: (this: TextTrackCue, ev: Event) => any;
+ pauseOnExit: boolean;
+ startTime: number;
+ text: string;
+ readonly track: TextTrack;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(startTime: number, endTime: number, text: string): TextTrackCue;
+}
+
+interface TextTrackCueList {
+ readonly length: number;
+ getCueById(id: string): TextTrackCue;
+ item(index: number): TextTrackCue;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+}
+
+interface TextTrackListEventMap {
+ "addtrack": TrackEvent;
+}
+
+interface TextTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ item(index: number): TextTrack;
+ addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+}
+
+interface TimeRanges {
+ readonly length: number;
+ end(index: number): number;
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+}
+
+interface Touch {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(): Touch;
+}
+
+interface TouchEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly keyCode: number;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
+ readonly which: number;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
+}
+
+interface TouchList {
+ readonly length: number;
+ item(index: number): Touch | null;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+}
+
+interface TrackEvent extends Event {
+ readonly track: VideoTrack | AudioTrack | TextTrack | null;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
+}
+
+interface TransitionEvent extends Event {
+ readonly elapsedTime: number;
+ readonly propertyName: string;
+ initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
+}
+
+interface TreeWalker {
+ currentNode: Node;
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
+ firstChild(): Node;
+ lastChild(): Node;
+ nextNode(): Node;
+ nextSibling(): Node;
+ parentNode(): Node;
+ previousNode(): Node;
+ previousSibling(): Node;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+}
+
+interface UIEvent extends Event {
+ readonly detail: number;
+ readonly view: Window;
+ initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+}
+
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+ readonly searchParams: URLSearchParams;
+ toString(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string): URL;
+ createObjectURL(object: any, options?: ObjectURLOptions): string;
+ revokeObjectURL(url: string): void;
+}
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
+}
+
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+}
+
+interface ValidityState {
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+}
+
+interface VideoPlaybackQuality {
+ readonly corruptedVideoFrames: number;
+ readonly creationTime: number;
+ readonly droppedVideoFrames: number;
+ readonly totalFrameDelay: number;
+ readonly totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+}
+
+interface VideoTrack {
+ readonly id: string;
+ kind: string;
+ readonly label: string;
+ language: string;
+ selected: boolean;
+ readonly sourceBuffer: SourceBuffer;
+}
+
+declare var VideoTrack: {
+ prototype: VideoTrack;
+ new(): VideoTrack;
+}
+
+interface VideoTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface VideoTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ onchange: (this: VideoTrackList, ev: Event) => any;
+ onremovetrack: (this: VideoTrackList, ev: TrackEvent) => any;
+ readonly selectedIndex: number;
+ getTrackById(id: string): VideoTrack | null;
+ item(index: number): VideoTrack;
+ addEventListener<K extends keyof VideoTrackListEventMap>(type: K, listener: (this: VideoTrackList, ev: VideoTrackListEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: VideoTrack;
+}
+
+declare var VideoTrackList: {
+ prototype: VideoTrackList;
+ new(): VideoTrackList;
+}
+
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+declare var WEBGL_compressed_texture_s3tc: {
+ prototype: WEBGL_compressed_texture_s3tc;
+ new(): WEBGL_compressed_texture_s3tc;
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+declare var WEBGL_debug_renderer_info: {
+ prototype: WEBGL_debug_renderer_info;
+ new(): WEBGL_debug_renderer_info;
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
+}
+
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+declare var WEBGL_depth_texture: {
+ prototype: WEBGL_depth_texture;
+ new(): WEBGL_depth_texture;
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array | null;
+ oversample: OverSampleType;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(): WaveShaperNode;
+}
+
+interface WebAuthentication {
+ getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
+ makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
+}
+
+declare var WebAuthentication: {
+ prototype: WebAuthentication;
+ new(): WebAuthentication;
+}
+
+interface WebAuthnAssertion {
+ readonly authenticatorData: ArrayBuffer;
+ readonly clientData: ArrayBuffer;
+ readonly credential: ScopedCredential;
+ readonly signature: ArrayBuffer;
+}
+
+declare var WebAuthnAssertion: {
+ prototype: WebAuthnAssertion;
+ new(): WebAuthnAssertion;
+}
+
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: number;
+ readonly type: number;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+}
+
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+}
+
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
+}
+
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+}
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+}
+
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+}
+
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+}
+
+interface WebGLRenderingContext {
+ readonly canvas: HTMLCanvasElement;
+ readonly drawingBufferHeight: number;
+ readonly drawingBufferWidth: number;
+ activeTexture(texture: number): void;
+ attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
+ bindBuffer(target: number, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: number, texture: WebGLTexture | null): void;
+ blendColor(red: number, green: number, blue: number, alpha: number): void;
+ blendEquation(mode: number): void;
+ blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
+ blendFunc(sfactor: number, dfactor: number): void;
+ blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
+ bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
+ bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
+ checkFramebufferStatus(target: number): number;
+ clear(mask: number): void;
+ clearColor(red: number, green: number, blue: number, alpha: number): void;
+ clearDepth(depth: number): void;
+ clearStencil(s: number): void;
+ colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
+ compileShader(shader: WebGLShader | null): void;
+ compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
+ copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
+ copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: number): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: number): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: number): void;
+ depthMask(flag: boolean): void;
+ depthRange(zNear: number, zFar: number): void;
+ detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ disable(cap: number): void;
+ disableVertexAttribArray(index: number): void;
+ drawArrays(mode: number, first: number, count: number): void;
+ drawElements(mode: number, count: number, type: number, offset: number): void;
+ enable(cap: number): void;
+ enableVertexAttribArray(index: number): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
+ frontFace(mode: number): void;
+ generateMipmap(target: number): void;
+ getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram | null, name: string): number;
+ getBufferParameter(target: number, pname: number): any;
+ getContextAttributes(): WebGLContextAttributes;
+ getError(): number;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
+ getParameter(pname: number): any;
+ getProgramInfoLog(program: WebGLProgram | null): string | null;
+ getProgramParameter(program: WebGLProgram | null, pname: number): any;
+ getRenderbufferParameter(target: number, pname: number): any;
+ getShaderInfoLog(shader: WebGLShader | null): string | null;
+ getShaderParameter(shader: WebGLShader | null, pname: number): any;
+ getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader | null): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: number, pname: number): any;
+ getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
+ getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: number, pname: number): any;
+ getVertexAttribOffset(index: number, pname: number): number;
+ hint(target: number, mode: number): void;
+ isBuffer(buffer: WebGLBuffer | null): boolean;
+ isContextLost(): boolean;
+ isEnabled(cap: number): boolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
+ isProgram(program: WebGLProgram | null): boolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
+ isShader(shader: WebGLShader | null): boolean;
+ isTexture(texture: WebGLTexture | null): boolean;
+ lineWidth(width: number): void;
+ linkProgram(program: WebGLProgram | null): void;
+ pixelStorei(pname: number, param: number | boolean): void;
+ polygonOffset(factor: number, units: number): void;
+ readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
+ sampleCoverage(value: number, invert: boolean): void;
+ scissor(x: number, y: number, width: number, height: number): void;
+ shaderSource(shader: WebGLShader | null, source: string): void;
+ stencilFunc(func: number, ref: number, mask: number): void;
+ stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
+ stencilMask(mask: number): void;
+ stencilMaskSeparate(face: number, mask: number): void;
+ stencilOp(fail: number, zfail: number, zpass: number): void;
+ stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
+ texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ texParameterf(target: number, pname: number, param: number): void;
+ texParameteri(target: number, pname: number, param: number): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageBitmap | ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ uniform1f(location: WebGLUniformLocation | null, x: number): void;
+ uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform1i(location: WebGLUniformLocation | null, x: number): void;
+ uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram | null): void;
+ vertexAttrib1f(indx: number, x: number): void;
+ vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib2f(indx: number, x: number, y: number): void;
+ vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
+ vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
+ vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
+ vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
+ viewport(x: number, y: number, width: number, height: number): void;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
+}
+
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+}
+
+interface WebGLShaderPrecisionFormat {
+ readonly precision: number;
+ readonly rangeMax: number;
+ readonly rangeMin: number;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+}
+
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+}
+
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+}
+
+interface WebKitCSSMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ inverse(): WebKitCSSMatrix;
+ multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
+ rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
+ rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
+ scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
+ setMatrixValue(value: string): void;
+ skewX(angle: number): WebKitCSSMatrix;
+ skewY(angle: number): WebKitCSSMatrix;
+ toString(): string;
+ translate(x: number, y: number, z?: number): WebKitCSSMatrix;
+}
+
+declare var WebKitCSSMatrix: {
+ prototype: WebKitCSSMatrix;
+ new(text?: string): WebKitCSSMatrix;
+}
+
+interface WebKitDirectoryEntry extends WebKitEntry {
+ createReader(): WebKitDirectoryReader;
+}
+
+declare var WebKitDirectoryEntry: {
+ prototype: WebKitDirectoryEntry;
+ new(): WebKitDirectoryEntry;
+}
+
+interface WebKitDirectoryReader {
+ readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitDirectoryReader: {
+ prototype: WebKitDirectoryReader;
+ new(): WebKitDirectoryReader;
+}
+
+interface WebKitEntry {
+ readonly filesystem: WebKitFileSystem;
+ readonly fullPath: string;
+ readonly isDirectory: boolean;
+ readonly isFile: boolean;
+ readonly name: string;
+}
+
+declare var WebKitEntry: {
+ prototype: WebKitEntry;
+ new(): WebKitEntry;
+}
+
+interface WebKitFileEntry extends WebKitEntry {
+ file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
+}
+
+declare var WebKitFileEntry: {
+ prototype: WebKitFileEntry;
+ new(): WebKitFileEntry;
+}
+
+interface WebKitFileSystem {
+ readonly name: string;
+ readonly root: WebKitDirectoryEntry;
+}
+
+declare var WebKitFileSystem: {
+ prototype: WebKitFileSystem;
+ new(): WebKitFileSystem;
+}
+
+interface WebKitPoint {
+ x: number;
+ y: number;
+}
+
+declare var WebKitPoint: {
+ prototype: WebKitPoint;
+ new(x?: number, y?: number): WebKitPoint;
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: string;
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ onclose: (this: WebSocket, ev: CloseEvent) => any;
+ onerror: (this: WebSocket, ev: Event) => any;
+ onmessage: (this: WebSocket, ev: MessageEvent) => any;
+ onopen: (this: WebSocket, ev: Event) => any;
+ readonly protocol: string;
+ readonly readyState: number;
+ readonly url: string;
+ close(code?: number, reason?: string): void;
+ send(data: any): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+}
+
+interface WheelEvent extends MouseEvent {
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly wheelDelta: number;
+ readonly wheelDeltaX: number;
+ readonly wheelDeltaY: number;
+ getCurrentPoint(element: Element): void;
+ initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+interface WindowEventMap extends GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "compassneedscalibration": Event;
+ "contextmenu": PointerEvent;
+ "dblclick": MouseEvent;
+ "devicelight": DeviceLightEvent;
+ "devicemotion": DeviceMotionEvent;
+ "deviceorientation": DeviceOrientationEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": MediaStreamErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "message": MessageEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": WheelEvent;
+ "MSGestureChange": MSGestureEvent;
+ "MSGestureDoubleTap": MSGestureEvent;
+ "MSGestureEnd": MSGestureEvent;
+ "MSGestureHold": MSGestureEvent;
+ "MSGestureStart": MSGestureEvent;
+ "MSGestureTap": MSGestureEvent;
+ "MSInertiaStart": MSGestureEvent;
+ "MSPointerCancel": MSPointerEvent;
+ "MSPointerDown": MSPointerEvent;
+ "MSPointerEnter": MSPointerEvent;
+ "MSPointerLeave": MSPointerEvent;
+ "MSPointerMove": MSPointerEvent;
+ "MSPointerOut": MSPointerEvent;
+ "MSPointerOver": MSPointerEvent;
+ "MSPointerUp": MSPointerEvent;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "popstate": PopStateEvent;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "readystatechange": ProgressEvent;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": UIEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": UIEvent;
+ "stalled": Event;
+ "storage": StorageEvent;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "unload": Event;
+ "volumechange": Event;
+ "waiting": Event;
+}
+
+interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch {
+ readonly applicationCache: ApplicationCache;
+ readonly caches: CacheStorage;
+ readonly clientInformation: Navigator;
+ readonly closed: boolean;
+ readonly crypto: Crypto;
+ defaultStatus: string;
+ readonly devicePixelRatio: number;
+ readonly doNotTrack: string;
+ readonly document: Document;
+ event: Event | undefined;
+ readonly external: External;
+ readonly frameElement: Element;
+ readonly frames: Window;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly isSecureContext: boolean;
+ readonly length: number;
+ readonly location: Location;
+ readonly locationbar: BarProp;
+ readonly menubar: BarProp;
+ readonly msContentScript: ExtensionScriptApis;
+ readonly msCredentials: MSCredentials;
+ name: string;
+ readonly navigator: Navigator;
+ offscreenBuffering: string | boolean;
+ onabort: (this: Window, ev: UIEvent) => any;
+ onafterprint: (this: Window, ev: Event) => any;
+ onbeforeprint: (this: Window, ev: Event) => any;
+ onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+ onblur: (this: Window, ev: FocusEvent) => any;
+ oncanplay: (this: Window, ev: Event) => any;
+ oncanplaythrough: (this: Window, ev: Event) => any;
+ onchange: (this: Window, ev: Event) => any;
+ onclick: (this: Window, ev: MouseEvent) => any;
+ oncompassneedscalibration: (this: Window, ev: Event) => any;
+ oncontextmenu: (this: Window, ev: PointerEvent) => any;
+ ondblclick: (this: Window, ev: MouseEvent) => any;
+ ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+ ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+ ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+ ondrag: (this: Window, ev: DragEvent) => any;
+ ondragend: (this: Window, ev: DragEvent) => any;
+ ondragenter: (this: Window, ev: DragEvent) => any;
+ ondragleave: (this: Window, ev: DragEvent) => any;
+ ondragover: (this: Window, ev: DragEvent) => any;
+ ondragstart: (this: Window, ev: DragEvent) => any;
+ ondrop: (this: Window, ev: DragEvent) => any;
+ ondurationchange: (this: Window, ev: Event) => any;
+ onemptied: (this: Window, ev: Event) => any;
+ onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+ onerror: ErrorEventHandler;
+ onfocus: (this: Window, ev: FocusEvent) => any;
+ onhashchange: (this: Window, ev: HashChangeEvent) => any;
+ oninput: (this: Window, ev: Event) => any;
+ oninvalid: (this: Window, ev: Event) => any;
+ onkeydown: (this: Window, ev: KeyboardEvent) => any;
+ onkeypress: (this: Window, ev: KeyboardEvent) => any;
+ onkeyup: (this: Window, ev: KeyboardEvent) => any;
+ onload: (this: Window, ev: Event) => any;
+ onloadeddata: (this: Window, ev: Event) => any;
+ onloadedmetadata: (this: Window, ev: Event) => any;
+ onloadstart: (this: Window, ev: Event) => any;
+ onmessage: (this: Window, ev: MessageEvent) => any;
+ onmousedown: (this: Window, ev: MouseEvent) => any;
+ onmouseenter: (this: Window, ev: MouseEvent) => any;
+ onmouseleave: (this: Window, ev: MouseEvent) => any;
+ onmousemove: (this: Window, ev: MouseEvent) => any;
+ onmouseout: (this: Window, ev: MouseEvent) => any;
+ onmouseover: (this: Window, ev: MouseEvent) => any;
+ onmouseup: (this: Window, ev: MouseEvent) => any;
+ onmousewheel: (this: Window, ev: WheelEvent) => any;
+ onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+ onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+ onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+ onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+ onoffline: (this: Window, ev: Event) => any;
+ ononline: (this: Window, ev: Event) => any;
+ onorientationchange: (this: Window, ev: Event) => any;
+ onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+ onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+ onpause: (this: Window, ev: Event) => any;
+ onplay: (this: Window, ev: Event) => any;
+ onplaying: (this: Window, ev: Event) => any;
+ onpopstate: (this: Window, ev: PopStateEvent) => any;
+ onprogress: (this: Window, ev: ProgressEvent) => any;
+ onratechange: (this: Window, ev: Event) => any;
+ onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+ onreset: (this: Window, ev: Event) => any;
+ onresize: (this: Window, ev: UIEvent) => any;
+ onscroll: (this: Window, ev: UIEvent) => any;
+ onseeked: (this: Window, ev: Event) => any;
+ onseeking: (this: Window, ev: Event) => any;
+ onselect: (this: Window, ev: UIEvent) => any;
+ onstalled: (this: Window, ev: Event) => any;
+ onstorage: (this: Window, ev: StorageEvent) => any;
+ onsubmit: (this: Window, ev: Event) => any;
+ onsuspend: (this: Window, ev: Event) => any;
+ ontimeupdate: (this: Window, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onunload: (this: Window, ev: Event) => any;
+ onvolumechange: (this: Window, ev: Event) => any;
+ onwaiting: (this: Window, ev: Event) => any;
+ opener: any;
+ orientation: string | number;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ readonly pageXOffset: number;
+ readonly pageYOffset: number;
+ readonly parent: Window;
+ readonly performance: Performance;
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ readonly scrollbars: BarProp;
+ readonly self: Window;
+ readonly speechSynthesis: SpeechSynthesis;
+ status: string;
+ readonly statusbar: BarProp;
+ readonly styleMedia: StyleMedia;
+ readonly toolbar: BarProp;
+ readonly top: Window;
+ readonly window: Window;
+ URL: typeof URL;
+ URLSearchParams: typeof URLSearchParams;
+ Blob: typeof Blob;
+ customElements: CustomElementRegistry;
+ alert(message?: any): void;
+ blur(): void;
+ cancelAnimationFrame(handle: number): void;
+ captureEvents(): void;
+ close(): void;
+ confirm(message?: string): boolean;
+ departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+ getSelection(): Selection;
+ matchMedia(mediaQuery: string): MediaQueryList;
+ moveBy(x?: number, y?: number): void;
+ moveTo(x?: number, y?: number): void;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+ postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string | null;
+ releaseEvents(): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+ resizeBy(x?: number, y?: number): void;
+ resizeTo(x?: number, y?: number): void;
+ scroll(x?: number, y?: number): void;
+ scrollBy(x?: number, y?: number): void;
+ scrollTo(x?: number, y?: number): void;
+ stop(): void;
+ webkitCancelAnimationFrame(handle: number): void;
+ webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ scroll(options?: ScrollToOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollBy(options?: ScrollToOptions): void;
+ addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+}
+
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: (this: Worker, ev: MessageEvent) => any;
+ postMessage(message: any, transfer?: any[]): void;
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string): Worker;
+}
+
+interface XMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+}
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
+ onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
+ readonly readyState: number;
+ readonly response: any;
+ readonly responseText: string;
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly responseXML: Document | null;
+ readonly status: number;
+ readonly statusText: string;
+ timeout: number;
+ readonly upload: XMLHttpRequestUpload;
+ withCredentials: boolean;
+ msCaching?: string;
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(header: string): string | null;
+ msCachingEnabled(): boolean;
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
+ overrideMimeType(mime: string): void;
+ send(data?: Document): void;
+ send(data?: string): void;
+ send(data?: any): void;
+ setRequestHeader(header: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+}
+
+interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+}
+
+interface XMLSerializer {
+ serializeToString(target: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+}
+
+interface XPathEvaluator {
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver?: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+}
+
+interface XPathExpression {
+ evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+}
+
+interface XPathNSResolver {
+ lookupNamespaceURI(prefix: string): string;
+}
+
+declare var XPathNSResolver: {
+ prototype: XPathNSResolver;
+ new(): XPathNSResolver;
+}
+
+interface XPathResult {
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
+ iterateNext(): Node;
+ snapshotItem(index: number): Node;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, document: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+}
+
+interface webkitRTCPeerConnection extends RTCPeerConnection {
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var webkitRTCPeerConnection: {
+ prototype: webkitRTCPeerConnection;
+ new(configuration: RTCConfiguration): webkitRTCPeerConnection;
+}
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface Body {
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+ formData(): Promise<FormData>;
+}
+
+interface CanvasPathMethods {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface ChildNode {
+ remove(): void;
+}
+
+interface DOML2DeprecatedColorProperty {
+ color: string;
+}
+
+interface DOML2DeprecatedSizeProperty {
+ size: number;
+}
+
+interface DocumentEvent {
+ createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface:"CloseEvent"): CloseEvent;
+ createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface:"CustomEvent"): CustomEvent;
+ createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
+ createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface:"DragEvent"): DragEvent;
+ createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface:"Event"): Event;
+ createEvent(eventInterface:"Events"): Event;
+ createEvent(eventInterface:"FocusEvent"): FocusEvent;
+ createEvent(eventInterface:"FocusNavigationEvent"): FocusNavigationEvent;
+ createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
+ createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
+ createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
+ createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
+ createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface:"MediaStreamEvent"): MediaStreamEvent;
+ createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface:"MessageEvent"): MessageEvent;
+ createEvent(eventInterface:"MouseEvent"): MouseEvent;
+ createEvent(eventInterface:"MouseEvents"): MouseEvent;
+ createEvent(eventInterface:"MutationEvent"): MutationEvent;
+ createEvent(eventInterface:"MutationEvents"): MutationEvent;
+ createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
+ createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
+ createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
+ createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
+ createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface:"PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface:"PointerEvent"): PointerEvent;
+ createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
+ createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
+ createEvent(eventInterface:"ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
+ createEvent(eventInterface:"SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface:"StorageEvent"): StorageEvent;
+ createEvent(eventInterface:"TextEvent"): TextEvent;
+ createEvent(eventInterface:"TouchEvent"): TouchEvent;
+ createEvent(eventInterface:"TrackEvent"): TrackEvent;
+ createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface:"UIEvent"): UIEvent;
+ createEvent(eventInterface:"UIEvents"): UIEvent;
+ createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
+ createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface:"WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+}
+
+interface ElementTraversal {
+ readonly childElementCount: number;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly nextElementSibling: Element | null;
+ readonly previousElementSibling: Element | null;
+}
+
+interface GetSVGDocument {
+ getSVGDocument(): Document;
+}
+
+interface GlobalEventHandlersEventMap {
+ "pointercancel": PointerEvent;
+ "pointerdown": PointerEvent;
+ "pointerenter": PointerEvent;
+ "pointerleave": PointerEvent;
+ "pointermove": PointerEvent;
+ "pointerout": PointerEvent;
+ "pointerover": PointerEvent;
+ "pointerup": PointerEvent;
+ "wheel": WheelEvent;
+}
+
+interface GlobalEventHandlers {
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
+ addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface GlobalFetch {
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+}
+
+interface HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
+ */
+ ch: string;
+ /**
+ * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
+ */
+ chOff: string;
+ /**
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
+ vAlign: string;
+}
+
+interface IDBEnvironment {
+ readonly indexedDB: IDBFactory;
+}
+
+interface LinkStyle {
+ readonly sheet: StyleSheet;
+}
+
+interface MSBaseReaderEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+}
+
+interface MSBaseReader {
+ onabort: (this: MSBaseReader, ev: Event) => any;
+ onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
+ onload: (this: MSBaseReader, ev: Event) => any;
+ onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
+ onloadstart: (this: MSBaseReader, ev: Event) => any;
+ onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
+ abort(): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface MSFileSaver {
+ msSaveBlob(blob: any, defaultName?: string): boolean;
+ msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
+}
+
+interface MSNavigatorDoNotTrack {
+ confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
+ confirmWebWideTrackingException(args: ExceptionInformation): boolean;
+ removeSiteSpecificTrackingException(args: ExceptionInformation): void;
+ removeWebWideTrackingException(args: ExceptionInformation): void;
+ storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
+ storeWebWideTrackingException(args: StoreExceptionsInformation): void;
+}
+
+interface NavigatorBeacon {
+ sendBeacon(url: USVString, data?: BodyInit): boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorContentUtils {
+}
+
+interface NavigatorGeolocation {
+ readonly geolocation: Geolocation;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorStorageUtils {
+}
+
+interface NavigatorUserMedia {
+ readonly mediaDevices: MediaDevices;
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
+}
+
+interface NodeSelector {
+ querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
+ querySelectorAll(selectors: string): NodeListOf<Element>;
+}
+
+interface RandomSource {
+ getRandomValues(array: ArrayBufferView): ArrayBufferView;
+}
+
+interface SVGAnimatedPoints {
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
+}
+
+interface SVGFilterPrimitiveStandardAttributes {
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
+}
+
+interface SVGTests {
+ readonly requiredExtensions: SVGStringList;
+ readonly requiredFeatures: SVGStringList;
+ readonly systemLanguage: SVGStringList;
+ hasExtension(extension: string): boolean;
+}
+
+interface SVGURIReference {
+ readonly href: SVGAnimatedString;
+}
+
+interface WindowBase64 {
+ atob(encodedString: string): string;
+ btoa(rawString: string): string;
+}
+
+interface WindowConsole {
+ readonly console: Console;
+}
+
+interface WindowLocalStorage {
+ readonly localStorage: Storage;
+}
+
+interface WindowSessionStorage {
+ readonly sessionStorage: Storage;
+}
+
+interface WindowTimers extends Object, WindowTimersExtension {
+ clearInterval(handle: number): void;
+ clearTimeout(handle: number): void;
+ setInterval(handler: (...args: any[]) => void, timeout: number): number;
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+}
+
+interface WindowTimersExtension {
+ clearImmediate(handle: number): void;
+ setImmediate(handler: (...args: any[]) => void): number;
+ setImmediate(handler: any, ...args: any[]): number;
+}
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+ "timeout": ProgressEvent;
+}
+
+interface XMLHttpRequestEventTarget {
+ onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
+ onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface ErrorEventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ conlno?: number;
+ error?: any;
+}
+
+interface StorageEventInit extends EventInit {
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ url: string;
+ storageArea?: Storage;
+}
+
+interface Canvas2DContextAttributes {
+ alpha?: boolean;
+ willReadFrequently?: boolean;
+ storage?: boolean;
+ [attribute: string]: boolean | string | undefined;
+}
+
+interface ImageBitmapOptions {
+ imageOrientation?: "none" | "flipY";
+ premultiplyAlpha?: "none" | "premultiply" | "default";
+ colorSpaceConversion?: "none" | "default";
+ resizeWidth?: number;
+ resizeHeight?: number;
+ resizeQuality?: "pixelated" | "low" | "medium" | "high";
+}
+
+interface ImageBitmap {
+ readonly width: number;
+ readonly height: number;
+ close(): void;
+}
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ /**
+ * Constructor returning a URLSearchParams object.
+ */
+ new (init?: string | URLSearchParams): URLSearchParams;
+}
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ length: number;
+ item(index: number): TNode;
+ [index: number]: TNode;
+}
+
+interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
+ item(index: number): T;
+ namedItem(name: string): T;
+ [index: number]: T;
+}
+
+interface BlobPropertyBag {
+ type?: string;
+ endings?: string;
+}
+
+interface FilePropertyBag {
+ type?: string;
+ lastModified?: number;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
+}
+
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ClipboardEventInit extends EventInit {
+ data?: string;
+ dataType?: string;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaHashedImportParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaPssParams {
+ saltLength: number;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: string;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ typedCurve: string;
+}
+
+interface EcKeyImportParams {
+ namedCurve: string;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ iv: BufferSource;
+ additionalData?: BufferSource;
+ tagLength?: number;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: AlgorithmIdentifier;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhImportKeyParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface ConcatParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ algorithmId: Uint8Array;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ publicInfo?: Uint8Array;
+ privateInfo?: Uint8Array;
+}
+
+interface HkdfCtrParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ label: BufferSource;
+ context: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ salt: BufferSource;
+ iterations: number;
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaOtherPrimesInfo {
+ r: string;
+ d: string;
+ t: string;
+}
+
+interface JsonWebKey {
+ kty: string;
+ use?: string;
+ key_ops?: string[];
+ alg?: string;
+ kid?: string;
+ x5u?: string;
+ x5c?: string;
+ x5t?: string;
+ ext?: boolean;
+ crv?: string;
+ x?: string;
+ y?: string;
+ d?: string;
+ n?: string;
+ e?: string;
+ p?: string;
+ q?: string;
+ dp?: string;
+ dq?: string;
+ qi?: string;
+ oth?: RsaOtherPrimesInfo[];
+ k?: string;
+}
+
+interface ParentNode {
+ readonly children: HTMLCollection;
+ readonly firstElementChild: Element | null;
+ readonly lastElementChild: Element | null;
+ readonly childElementCount: number;
+}
+
+interface DocumentOrShadowRoot {
+ readonly activeElement: Element | null;
+ readonly stylesheets: StyleSheetList;
+ getSelection(): Selection | null;
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+}
+
+interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
+ readonly host: Element;
+ innerHTML: string;
+}
+
+interface ShadowRootInit {
+ mode: 'open'|'closed';
+ delegatesFocus?: boolean;
+}
+
+interface HTMLSlotElement extends HTMLElement {
+ name: string;
+ assignedNodes(options?: AssignedNodesOptions): Node[];
+}
+
+interface AssignedNodesOptions {
+ flatten?: boolean;
+}
+
+interface ElementDefinitionOptions {
+ extends: string;
+}
+
+interface CustomElementRegistry {
+ define(name: string, constructor: Function, options?: ElementDefinitionOptions): void;
+ get(name: string): any;
+ whenDefined(name: string): PromiseLike<void>;
+}
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: PromiseLike<any>;
+ readonly reason: any;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: PromiseLike<any>;
+ reason?: any;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ passive?: boolean;
+ once?: boolean;
+}
+
+interface TouchEventInit extends EventModifierInit {
+ touches?: Touch[];
+ targetTouches?: Touch[];
+ changedTouches?: Touch[];
+}
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
+interface MediaQueryListListener {
+ (mql: MediaQueryList): void;
+}
+interface MSLaunchUriCallback {
+ (): void;
+}
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface MSUnsafeFunctionCallback {
+ (): any;
+}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface VoidFunction {
+ (): void;
+}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): void;
+}
+interface RTCPeerConnectionErrorCallback {
+ (error: DOMError): void;
+}
+interface RTCStatsCallback {
+ (report: RTCStatsReport): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
+}
+interface NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
+}
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
+}
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
+}
+interface HTMLElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "audio": HTMLAudioElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "del": HTMLModElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "embed": HTMLEmbedElement;
+ "fieldset": HTMLFieldSetElement;
+ "font": HTMLFontElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "iframe": HTMLIFrameElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "marquee": HTMLMarqueeElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "meter": HTMLMeterElement;
+ "nextid": HTMLUnknownElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "picture": HTMLPictureElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "script": HTMLScriptElement;
+ "select": HTMLSelectElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "style": HTMLStyleElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "ul": HTMLUListElement;
+ "video": HTMLVideoElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "abbr": HTMLElement;
+ "acronym": HTMLElement;
+ "address": HTMLElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "article": HTMLElement;
+ "aside": HTMLElement;
+ "audio": HTMLAudioElement;
+ "b": HTMLElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "bdo": HTMLElement;
+ "big": HTMLElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "center": HTMLElement;
+ "circle": SVGCircleElement;
+ "cite": HTMLElement;
+ "clippath": SVGClipPathElement;
+ "code": HTMLElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "dd": HTMLElement;
+ "defs": SVGDefsElement;
+ "del": HTMLModElement;
+ "desc": SVGDescElement;
+ "dfn": HTMLElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "dt": HTMLElement;
+ "ellipse": SVGEllipseElement;
+ "em": HTMLElement;
+ "embed": HTMLEmbedElement;
+ "feblend": SVGFEBlendElement;
+ "fecolormatrix": SVGFEColorMatrixElement;
+ "fecomponenttransfer": SVGFEComponentTransferElement;
+ "fecomposite": SVGFECompositeElement;
+ "feconvolvematrix": SVGFEConvolveMatrixElement;
+ "fediffuselighting": SVGFEDiffuseLightingElement;
+ "fedisplacementmap": SVGFEDisplacementMapElement;
+ "fedistantlight": SVGFEDistantLightElement;
+ "feflood": SVGFEFloodElement;
+ "fefunca": SVGFEFuncAElement;
+ "fefuncb": SVGFEFuncBElement;
+ "fefuncg": SVGFEFuncGElement;
+ "fefuncr": SVGFEFuncRElement;
+ "fegaussianblur": SVGFEGaussianBlurElement;
+ "feimage": SVGFEImageElement;
+ "femerge": SVGFEMergeElement;
+ "femergenode": SVGFEMergeNodeElement;
+ "femorphology": SVGFEMorphologyElement;
+ "feoffset": SVGFEOffsetElement;
+ "fepointlight": SVGFEPointLightElement;
+ "fespecularlighting": SVGFESpecularLightingElement;
+ "fespotlight": SVGFESpotLightElement;
+ "fetile": SVGFETileElement;
+ "feturbulence": SVGFETurbulenceElement;
+ "fieldset": HTMLFieldSetElement;
+ "figcaption": HTMLElement;
+ "figure": HTMLElement;
+ "filter": SVGFilterElement;
+ "font": HTMLFontElement;
+ "footer": HTMLElement;
+ "foreignobject": SVGForeignObjectElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "g": SVGGElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "header": HTMLElement;
+ "hgroup": HTMLElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "i": HTMLElement;
+ "iframe": HTMLIFrameElement;
+ "image": SVGImageElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "isindex": HTMLUnknownElement;
+ "kbd": HTMLElement;
+ "keygen": HTMLElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "line": SVGLineElement;
+ "lineargradient": SVGLinearGradientElement;
+ "link": HTMLLinkElement;
+ "listing": HTMLPreElement;
+ "map": HTMLMapElement;
+ "mark": HTMLElement;
+ "marker": SVGMarkerElement;
+ "marquee": HTMLMarqueeElement;
+ "mask": SVGMaskElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "metadata": SVGMetadataElement;
+ "meter": HTMLMeterElement;
+ "nav": HTMLElement;
+ "nextid": HTMLUnknownElement;
+ "nobr": HTMLElement;
+ "noframes": HTMLElement;
+ "noscript": HTMLElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "path": SVGPathElement;
+ "pattern": SVGPatternElement;
+ "picture": HTMLPictureElement;
+ "plaintext": HTMLElement;
+ "polygon": SVGPolygonElement;
+ "polyline": SVGPolylineElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "radialgradient": SVGRadialGradientElement;
+ "rect": SVGRectElement;
+ "rt": HTMLElement;
+ "ruby": HTMLElement;
+ "s": HTMLElement;
+ "samp": HTMLElement;
+ "script": HTMLScriptElement;
+ "section": HTMLElement;
+ "select": HTMLSelectElement;
+ "small": HTMLElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "stop": SVGStopElement;
+ "strike": HTMLElement;
+ "strong": HTMLElement;
+ "style": HTMLStyleElement;
+ "sub": HTMLElement;
+ "sup": HTMLElement;
+ "svg": SVGSVGElement;
+ "switch": SVGSwitchElement;
+ "symbol": SVGSymbolElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "text": SVGTextElement;
+ "textpath": SVGTextPathElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "tspan": SVGTSpanElement;
+ "tt": HTMLElement;
+ "u": HTMLElement;
+ "ul": HTMLUListElement;
+ "use": SVGUseElement;
+ "var": HTMLElement;
+ "video": HTMLVideoElement;
+ "view": SVGViewElement;
+ "wbr": HTMLElement;
+ "x-ms-webview": MSHTMLWebViewElement;
+ "xmp": HTMLPreElement;
+}
+
+interface ElementListTagNameMap {
+ "a": NodeListOf<HTMLAnchorElement>;
+ "abbr": NodeListOf<HTMLElement>;
+ "acronym": NodeListOf<HTMLElement>;
+ "address": NodeListOf<HTMLElement>;
+ "applet": NodeListOf<HTMLAppletElement>;
+ "area": NodeListOf<HTMLAreaElement>;
+ "article": NodeListOf<HTMLElement>;
+ "aside": NodeListOf<HTMLElement>;
+ "audio": NodeListOf<HTMLAudioElement>;
+ "b": NodeListOf<HTMLElement>;
+ "base": NodeListOf<HTMLBaseElement>;
+ "basefont": NodeListOf<HTMLBaseFontElement>;
+ "bdo": NodeListOf<HTMLElement>;
+ "big": NodeListOf<HTMLElement>;
+ "blockquote": NodeListOf<HTMLQuoteElement>;
+ "body": NodeListOf<HTMLBodyElement>;
+ "br": NodeListOf<HTMLBRElement>;
+ "button": NodeListOf<HTMLButtonElement>;
+ "canvas": NodeListOf<HTMLCanvasElement>;
+ "caption": NodeListOf<HTMLTableCaptionElement>;
+ "center": NodeListOf<HTMLElement>;
+ "circle": NodeListOf<SVGCircleElement>;
+ "cite": NodeListOf<HTMLElement>;
+ "clippath": NodeListOf<SVGClipPathElement>;
+ "code": NodeListOf<HTMLElement>;
+ "col": NodeListOf<HTMLTableColElement>;
+ "colgroup": NodeListOf<HTMLTableColElement>;
+ "data": NodeListOf<HTMLDataElement>;
+ "datalist": NodeListOf<HTMLDataListElement>;
+ "dd": NodeListOf<HTMLElement>;
+ "defs": NodeListOf<SVGDefsElement>;
+ "del": NodeListOf<HTMLModElement>;
+ "desc": NodeListOf<SVGDescElement>;
+ "dfn": NodeListOf<HTMLElement>;
+ "dir": NodeListOf<HTMLDirectoryElement>;
+ "div": NodeListOf<HTMLDivElement>;
+ "dl": NodeListOf<HTMLDListElement>;
+ "dt": NodeListOf<HTMLElement>;
+ "ellipse": NodeListOf<SVGEllipseElement>;
+ "em": NodeListOf<HTMLElement>;
+ "embed": NodeListOf<HTMLEmbedElement>;
+ "feblend": NodeListOf<SVGFEBlendElement>;
+ "fecolormatrix": NodeListOf<SVGFEColorMatrixElement>;
+ "fecomponenttransfer": NodeListOf<SVGFEComponentTransferElement>;
+ "fecomposite": NodeListOf<SVGFECompositeElement>;
+ "feconvolvematrix": NodeListOf<SVGFEConvolveMatrixElement>;
+ "fediffuselighting": NodeListOf<SVGFEDiffuseLightingElement>;
+ "fedisplacementmap": NodeListOf<SVGFEDisplacementMapElement>;
+ "fedistantlight": NodeListOf<SVGFEDistantLightElement>;
+ "feflood": NodeListOf<SVGFEFloodElement>;
+ "fefunca": NodeListOf<SVGFEFuncAElement>;
+ "fefuncb": NodeListOf<SVGFEFuncBElement>;
+ "fefuncg": NodeListOf<SVGFEFuncGElement>;
+ "fefuncr": NodeListOf<SVGFEFuncRElement>;
+ "fegaussianblur": NodeListOf<SVGFEGaussianBlurElement>;
+ "feimage": NodeListOf<SVGFEImageElement>;
+ "femerge": NodeListOf<SVGFEMergeElement>;
+ "femergenode": NodeListOf<SVGFEMergeNodeElement>;
+ "femorphology": NodeListOf<SVGFEMorphologyElement>;
+ "feoffset": NodeListOf<SVGFEOffsetElement>;
+ "fepointlight": NodeListOf<SVGFEPointLightElement>;
+ "fespecularlighting": NodeListOf<SVGFESpecularLightingElement>;
+ "fespotlight": NodeListOf<SVGFESpotLightElement>;
+ "fetile": NodeListOf<SVGFETileElement>;
+ "feturbulence": NodeListOf<SVGFETurbulenceElement>;
+ "fieldset": NodeListOf<HTMLFieldSetElement>;
+ "figcaption": NodeListOf<HTMLElement>;
+ "figure": NodeListOf<HTMLElement>;
+ "filter": NodeListOf<SVGFilterElement>;
+ "font": NodeListOf<HTMLFontElement>;
+ "footer": NodeListOf<HTMLElement>;
+ "foreignobject": NodeListOf<SVGForeignObjectElement>;
+ "form": NodeListOf<HTMLFormElement>;
+ "frame": NodeListOf<HTMLFrameElement>;
+ "frameset": NodeListOf<HTMLFrameSetElement>;
+ "g": NodeListOf<SVGGElement>;
+ "h1": NodeListOf<HTMLHeadingElement>;
+ "h2": NodeListOf<HTMLHeadingElement>;
+ "h3": NodeListOf<HTMLHeadingElement>;
+ "h4": NodeListOf<HTMLHeadingElement>;
+ "h5": NodeListOf<HTMLHeadingElement>;
+ "h6": NodeListOf<HTMLHeadingElement>;
+ "head": NodeListOf<HTMLHeadElement>;
+ "header": NodeListOf<HTMLElement>;
+ "hgroup": NodeListOf<HTMLElement>;
+ "hr": NodeListOf<HTMLHRElement>;
+ "html": NodeListOf<HTMLHtmlElement>;
+ "i": NodeListOf<HTMLElement>;
+ "iframe": NodeListOf<HTMLIFrameElement>;
+ "image": NodeListOf<SVGImageElement>;
+ "img": NodeListOf<HTMLImageElement>;
+ "input": NodeListOf<HTMLInputElement>;
+ "ins": NodeListOf<HTMLModElement>;
+ "isindex": NodeListOf<HTMLUnknownElement>;
+ "kbd": NodeListOf<HTMLElement>;
+ "keygen": NodeListOf<HTMLElement>;
+ "label": NodeListOf<HTMLLabelElement>;
+ "legend": NodeListOf<HTMLLegendElement>;
+ "li": NodeListOf<HTMLLIElement>;
+ "line": NodeListOf<SVGLineElement>;
+ "lineargradient": NodeListOf<SVGLinearGradientElement>;
+ "link": NodeListOf<HTMLLinkElement>;
+ "listing": NodeListOf<HTMLPreElement>;
+ "map": NodeListOf<HTMLMapElement>;
+ "mark": NodeListOf<HTMLElement>;
+ "marker": NodeListOf<SVGMarkerElement>;
+ "marquee": NodeListOf<HTMLMarqueeElement>;
+ "mask": NodeListOf<SVGMaskElement>;
+ "menu": NodeListOf<HTMLMenuElement>;
+ "meta": NodeListOf<HTMLMetaElement>;
+ "metadata": NodeListOf<SVGMetadataElement>;
+ "meter": NodeListOf<HTMLMeterElement>;
+ "nav": NodeListOf<HTMLElement>;
+ "nextid": NodeListOf<HTMLUnknownElement>;
+ "nobr": NodeListOf<HTMLElement>;
+ "noframes": NodeListOf<HTMLElement>;
+ "noscript": NodeListOf<HTMLElement>;
+ "object": NodeListOf<HTMLObjectElement>;
+ "ol": NodeListOf<HTMLOListElement>;
+ "optgroup": NodeListOf<HTMLOptGroupElement>;
+ "option": NodeListOf<HTMLOptionElement>;
+ "output": NodeListOf<HTMLOutputElement>;
+ "p": NodeListOf<HTMLParagraphElement>;
+ "param": NodeListOf<HTMLParamElement>;
+ "path": NodeListOf<SVGPathElement>;
+ "pattern": NodeListOf<SVGPatternElement>;
+ "picture": NodeListOf<HTMLPictureElement>;
+ "plaintext": NodeListOf<HTMLElement>;
+ "polygon": NodeListOf<SVGPolygonElement>;
+ "polyline": NodeListOf<SVGPolylineElement>;
+ "pre": NodeListOf<HTMLPreElement>;
+ "progress": NodeListOf<HTMLProgressElement>;
+ "q": NodeListOf<HTMLQuoteElement>;
+ "radialgradient": NodeListOf<SVGRadialGradientElement>;
+ "rect": NodeListOf<SVGRectElement>;
+ "rt": NodeListOf<HTMLElement>;
+ "ruby": NodeListOf<HTMLElement>;
+ "s": NodeListOf<HTMLElement>;
+ "samp": NodeListOf<HTMLElement>;
+ "script": NodeListOf<HTMLScriptElement>;
+ "section": NodeListOf<HTMLElement>;
+ "select": NodeListOf<HTMLSelectElement>;
+ "small": NodeListOf<HTMLElement>;
+ "source": NodeListOf<HTMLSourceElement>;
+ "span": NodeListOf<HTMLSpanElement>;
+ "stop": NodeListOf<SVGStopElement>;
+ "strike": NodeListOf<HTMLElement>;
+ "strong": NodeListOf<HTMLElement>;
+ "style": NodeListOf<HTMLStyleElement>;
+ "sub": NodeListOf<HTMLElement>;
+ "sup": NodeListOf<HTMLElement>;
+ "svg": NodeListOf<SVGSVGElement>;
+ "switch": NodeListOf<SVGSwitchElement>;
+ "symbol": NodeListOf<SVGSymbolElement>;
+ "table": NodeListOf<HTMLTableElement>;
+ "tbody": NodeListOf<HTMLTableSectionElement>;
+ "td": NodeListOf<HTMLTableDataCellElement>;
+ "template": NodeListOf<HTMLTemplateElement>;
+ "text": NodeListOf<SVGTextElement>;
+ "textpath": NodeListOf<SVGTextPathElement>;
+ "textarea": NodeListOf<HTMLTextAreaElement>;
+ "tfoot": NodeListOf<HTMLTableSectionElement>;
+ "th": NodeListOf<HTMLTableHeaderCellElement>;
+ "thead": NodeListOf<HTMLTableSectionElement>;
+ "time": NodeListOf<HTMLTimeElement>;
+ "title": NodeListOf<HTMLTitleElement>;
+ "tr": NodeListOf<HTMLTableRowElement>;
+ "track": NodeListOf<HTMLTrackElement>;
+ "tspan": NodeListOf<SVGTSpanElement>;
+ "tt": NodeListOf<HTMLElement>;
+ "u": NodeListOf<HTMLElement>;
+ "ul": NodeListOf<HTMLUListElement>;
+ "use": NodeListOf<SVGUseElement>;
+ "var": NodeListOf<HTMLElement>;
+ "video": NodeListOf<HTMLVideoElement>;
+ "view": NodeListOf<SVGViewElement>;
+ "wbr": NodeListOf<HTMLElement>;
+ "x-ms-webview": NodeListOf<MSHTMLWebViewElement>;
+ "xmp": NodeListOf<HTMLPreElement>;
+}
+
+declare var Audio: {new(src?: string): HTMLAudioElement; };
+declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
+declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
+declare var applicationCache: ApplicationCache;
+declare var caches: CacheStorage;
+declare var clientInformation: Navigator;
+declare var closed: boolean;
+declare var crypto: Crypto;
+declare var defaultStatus: string;
+declare var devicePixelRatio: number;
+declare var doNotTrack: string;
+declare var document: Document;
+declare var event: Event | undefined;
+declare var external: External;
+declare var frameElement: Element;
+declare var frames: Window;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var isSecureContext: boolean;
+declare var length: number;
+declare var location: Location;
+declare var locationbar: BarProp;
+declare var menubar: BarProp;
+declare var msContentScript: ExtensionScriptApis;
+declare var msCredentials: MSCredentials;
+declare const name: never;
+declare var navigator: Navigator;
+declare var offscreenBuffering: string | boolean;
+declare var onabort: (this: Window, ev: UIEvent) => any;
+declare var onafterprint: (this: Window, ev: Event) => any;
+declare var onbeforeprint: (this: Window, ev: Event) => any;
+declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+declare var onblur: (this: Window, ev: FocusEvent) => any;
+declare var oncanplay: (this: Window, ev: Event) => any;
+declare var oncanplaythrough: (this: Window, ev: Event) => any;
+declare var onchange: (this: Window, ev: Event) => any;
+declare var onclick: (this: Window, ev: MouseEvent) => any;
+declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
+declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
+declare var ondblclick: (this: Window, ev: MouseEvent) => any;
+declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+declare var ondrag: (this: Window, ev: DragEvent) => any;
+declare var ondragend: (this: Window, ev: DragEvent) => any;
+declare var ondragenter: (this: Window, ev: DragEvent) => any;
+declare var ondragleave: (this: Window, ev: DragEvent) => any;
+declare var ondragover: (this: Window, ev: DragEvent) => any;
+declare var ondragstart: (this: Window, ev: DragEvent) => any;
+declare var ondrop: (this: Window, ev: DragEvent) => any;
+declare var ondurationchange: (this: Window, ev: Event) => any;
+declare var onemptied: (this: Window, ev: Event) => any;
+declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
+declare var onerror: ErrorEventHandler;
+declare var onfocus: (this: Window, ev: FocusEvent) => any;
+declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
+declare var oninput: (this: Window, ev: Event) => any;
+declare var oninvalid: (this: Window, ev: Event) => any;
+declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
+declare var onload: (this: Window, ev: Event) => any;
+declare var onloadeddata: (this: Window, ev: Event) => any;
+declare var onloadedmetadata: (this: Window, ev: Event) => any;
+declare var onloadstart: (this: Window, ev: Event) => any;
+declare var onmessage: (this: Window, ev: MessageEvent) => any;
+declare var onmousedown: (this: Window, ev: MouseEvent) => any;
+declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
+declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
+declare var onmousemove: (this: Window, ev: MouseEvent) => any;
+declare var onmouseout: (this: Window, ev: MouseEvent) => any;
+declare var onmouseover: (this: Window, ev: MouseEvent) => any;
+declare var onmouseup: (this: Window, ev: MouseEvent) => any;
+declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
+declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+declare var onoffline: (this: Window, ev: Event) => any;
+declare var ononline: (this: Window, ev: Event) => any;
+declare var onorientationchange: (this: Window, ev: Event) => any;
+declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpause: (this: Window, ev: Event) => any;
+declare var onplay: (this: Window, ev: Event) => any;
+declare var onplaying: (this: Window, ev: Event) => any;
+declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
+declare var onprogress: (this: Window, ev: ProgressEvent) => any;
+declare var onratechange: (this: Window, ev: Event) => any;
+declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+declare var onreset: (this: Window, ev: Event) => any;
+declare var onresize: (this: Window, ev: UIEvent) => any;
+declare var onscroll: (this: Window, ev: UIEvent) => any;
+declare var onseeked: (this: Window, ev: Event) => any;
+declare var onseeking: (this: Window, ev: Event) => any;
+declare var onselect: (this: Window, ev: UIEvent) => any;
+declare var onstalled: (this: Window, ev: Event) => any;
+declare var onstorage: (this: Window, ev: StorageEvent) => any;
+declare var onsubmit: (this: Window, ev: Event) => any;
+declare var onsuspend: (this: Window, ev: Event) => any;
+declare var ontimeupdate: (this: Window, ev: Event) => any;
+declare var ontouchcancel: (ev: TouchEvent) => any;
+declare var ontouchend: (ev: TouchEvent) => any;
+declare var ontouchmove: (ev: TouchEvent) => any;
+declare var ontouchstart: (ev: TouchEvent) => any;
+declare var onunload: (this: Window, ev: Event) => any;
+declare var onvolumechange: (this: Window, ev: Event) => any;
+declare var onwaiting: (this: Window, ev: Event) => any;
+declare var opener: any;
+declare var orientation: string | number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+declare var pageXOffset: number;
+declare var pageYOffset: number;
+declare var parent: Window;
+declare var performance: Performance;
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+declare var scrollbars: BarProp;
+declare var self: Window;
+declare var speechSynthesis: SpeechSynthesis;
+declare var status: string;
+declare var statusbar: BarProp;
+declare var styleMedia: StyleMedia;
+declare var toolbar: BarProp;
+declare var top: Window;
+declare var window: Window;
+declare var customElements: CustomElementRegistry;
+declare function alert(message?: any): void;
+declare function blur(): void;
+declare function cancelAnimationFrame(handle: number): void;
+declare function captureEvents(): void;
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+declare function departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+declare function getSelection(): Selection;
+declare function matchMedia(mediaQuery: string): MediaQueryList;
+declare function moveBy(x?: number, y?: number): void;
+declare function moveTo(x?: number, y?: number): void;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string | null;
+declare function releaseEvents(): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function resizeBy(x?: number, y?: number): void;
+declare function resizeTo(x?: number, y?: number): void;
+declare function scroll(x?: number, y?: number): void;
+declare function scrollBy(x?: number, y?: number): void;
+declare function scrollTo(x?: number, y?: number): void;
+declare function stop(): void;
+declare function webkitCancelAnimationFrame(handle: number): void;
+declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollBy(options?: ScrollToOptions): void;
+declare function toString(): string;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+declare function clearInterval(handle: number): void;
+declare function clearTimeout(handle: number): void;
+declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
+declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+declare function clearImmediate(handle: number): void;
+declare function setImmediate(handler: (...args: any[]) => void): number;
+declare function setImmediate(handler: any, ...args: any[]): number;
+declare var sessionStorage: Storage;
+declare var localStorage: Storage;
+declare var console: Console;
+declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
+declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
+declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
+declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
+declare var onpointermove: (this: Window, ev: PointerEvent) => any;
+declare var onpointerout: (this: Window, ev: PointerEvent) => any;
+declare var onpointerover: (this: Window, ev: PointerEvent) => any;
+declare var onpointerup: (this: Window, ev: PointerEvent) => any;
+declare var onwheel: (this: Window, ev: WheelEvent) => any;
+declare var indexedDB: IDBFactory;
+declare function atob(encodedString: string): string;
+declare function btoa(rawString: string): string;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+type AAGUID = string;
+type AlgorithmIdentifier = string | Algorithm;
+type BodyInit = any;
+type ByteString = string;
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainLong = number | ConstrainLongRange;
+type CryptoOperationData = ArrayBufferView;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLbyte = number;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLintptr = number;
+type GLshort = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLubyte = number;
+type GLuint = number;
+type GLushort = number;
+type HeadersInit = any;
+type IDBKeyPath = string;
+type KeyFormat = string;
+type KeyType = string;
+type KeyUsage = string;
+type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
+type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
+type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
+type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
+type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
+type RequestInfo = Request | string;
+type USVString = string;
+type payloadtype = number;
+type ScrollBehavior = "auto" | "instant" | "smooth";
+type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
+type IDBValidKey = number | string | Date | IDBArrayKey;
+type BufferSource = ArrayBuffer | ArrayBufferView;
+type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
+type FormDataEntryValue = string | File;
+type AppendMode = "segments" | "sequence";
+type AudioContextState = "suspended" | "running" | "closed";
+type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
+type CanvasFillRule = "nonzero" | "evenodd";
+type ChannelCountMode = "max" | "clamped-max" | "explicit";
+type ChannelInterpretation = "speakers" | "discrete";
+type DistanceModelType = "linear" | "inverse" | "exponential";
+type ExpandGranularity = "character" | "word" | "sentence" | "textedit";
+type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "pending" | "done";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ListeningState = "inactive" | "active" | "disambiguation";
+type MSCredentialType = "FIDO_2_0";
+type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
+type MSIceType = "failed" | "direct" | "relay";
+type MSStatsType = "description" | "localclientevent" | "inbound-network" | "outbound-network" | "inbound-payload" | "outbound-payload" | "transportdiagnostics";
+type MSTransportType = "Embedded" | "USB" | "NFC" | "BT";
+type MSWebViewPermissionState = "unknown" | "defer" | "allow" | "deny";
+type MSWebViewPermissionType = "geolocation" | "unlimitedIndexedDBQuota" | "media" | "pointerlock" | "webnotifications";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaStreamTrackState = "live" | "ended";
+type NavigationReason = "up" | "down" | "left" | "right";
+type NavigationType = "navigate" | "reload" | "back_forward" | "prerender";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OscillatorType = "sine" | "square" | "sawtooth" | "triangle" | "custom";
+type OverSampleType = "none" | "2x" | "4x";
+type PanningModelType = "equalpower";
+type PaymentComplete = "success" | "fail" | "";
+type PaymentShippingType = "shipping" | "delivery" | "pickup";
+type PushEncryptionKeyName = "p256dh" | "auth";
+type PushPermissionState = "granted" | "denied" | "prompt";
+type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
+type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
+type RTCDtlsRole = "auto" | "client" | "server";
+type RTCDtlsTransportState = "new" | "connecting" | "connected" | "closed";
+type RTCIceCandidateType = "host" | "srflx" | "prflx" | "relay";
+type RTCIceComponent = "RTP" | "RTCP";
+type RTCIceConnectionState = "new" | "checking" | "connected" | "completed" | "failed" | "disconnected" | "closed";
+type RTCIceGatherPolicy = "all" | "nohost" | "relay";
+type RTCIceGathererState = "new" | "gathering" | "complete";
+type RTCIceGatheringState = "new" | "gathering" | "complete";
+type RTCIceProtocol = "udp" | "tcp";
+type RTCIceRole = "controlling" | "controlled";
+type RTCIceTcpCandidateType = "active" | "passive" | "so";
+type RTCIceTransportPolicy = "none" | "relay" | "all";
+type RTCIceTransportState = "new" | "checking" | "connected" | "completed" | "disconnected" | "closed";
+type RTCSdpType = "offer" | "pranswer" | "answer";
+type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "have-local-pranswer" | "have-remote-pranswer" | "closed";
+type RTCStatsIceCandidatePairState = "frozen" | "waiting" | "inprogress" | "failed" | "succeeded" | "cancelled";
+type RTCStatsIceCandidateType = "host" | "serverreflexive" | "peerreflexive" | "relayed";
+type RTCStatsType = "inboundrtp" | "outboundrtp" | "session" | "datachannel" | "track" | "transport" | "candidatepair" | "localcandidate" | "remotecandidate";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache";
+type RequestCredentials = "omit" | "same-origin" | "include";
+type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker";
+type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
+type RequestRedirect = "follow" | "error" | "manual";
+type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ScopedCredentialType = "ScopedCred";
+type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
+type Transport = "usb" | "nfc" | "ble";
+type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
+type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
+
+
+/////////////////////////////
+/// WorkerGlobalScope APIs
+/////////////////////////////
+// These are only available in a Web Worker
+declare function importScripts(...urls: string[]): void;
+
+
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
-
-/////////////////////////////
-/// WorkerGlobalScope APIs
-/////////////////////////////
-// These are only available in a Web Worker
-declare function importScripts(...urls: string[]): void;
-
-
-
-
-/////////////////////////////
-/// Windows Script Host APIS
-/////////////////////////////
-
-
-interface ActiveXObject {
- new (s: string): any;
-}
-declare var ActiveXObject: ActiveXObject;
-
-interface ITextWriter {
- Write(s: string): void;
- WriteLine(s: string): void;
- Close(): void;
-}
-
-interface TextStreamBase {
- /**
- * The column number of the current character position in an input stream.
- */
- Column: number;
-
- /**
- * The current line number in an input stream.
- */
- Line: number;
-
- /**
- * Closes a text stream.
- * It is not necessary to close standard streams; they close automatically when the process ends. If
- * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
- */
- Close(): void;
-}
-
-interface TextStreamWriter extends TextStreamBase {
- /**
- * Sends a string to an output stream.
- */
- Write(s: string): void;
-
- /**
- * Sends a specified number of blank lines (newline characters) to an output stream.
- */
- WriteBlankLines(intLines: number): void;
-
- /**
- * Sends a string followed by a newline character to an output stream.
- */
- WriteLine(s: string): void;
-}
-
-interface TextStreamReader extends TextStreamBase {
- /**
- * Returns a specified number of characters from an input stream, starting at the current pointer position.
- * Does not return until the ENTER key is pressed.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- Read(characters: number): string;
-
- /**
- * Returns all characters from an input stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadAll(): string;
-
- /**
- * Returns an entire line from an input stream.
- * Although this method extracts the newline character, it does not add it to the returned string.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadLine(): string;
-
- /**
- * Skips a specified number of characters when reading from an input text stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
- */
- Skip(characters: number): void;
-
- /**
- * Skips the next line when reading from an input text stream.
- * Can only be used on a stream in reading mode, not writing or appending mode.
- */
- SkipLine(): void;
-
- /**
- * Indicates whether the stream pointer position is at the end of a line.
- */
- AtEndOfLine: boolean;
-
- /**
- * Indicates whether the stream pointer position is at the end of a stream.
- */
- AtEndOfStream: boolean;
-}
-
-declare var WScript: {
- /**
- * Outputs text to either a message box (under WScript.exe) or the command console window followed by
- * a newline (under CScript.exe).
- */
- Echo(s: any): void;
-
- /**
- * Exposes the write-only error output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdErr: TextStreamWriter;
-
- /**
- * Exposes the write-only output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdOut: TextStreamWriter;
- Arguments: { length: number; Item(n: number): string; };
-
- /**
- * The full path of the currently running script.
- */
- ScriptFullName: string;
-
- /**
- * Forces the script to stop immediately, with an optional exit code.
- */
- Quit(exitCode?: number): number;
-
- /**
- * The Windows Script Host build version number.
- */
- BuildVersion: number;
-
- /**
- * Fully qualified path of the host executable.
- */
- FullName: string;
-
- /**
- * Gets/sets the script mode - interactive(true) or batch(false).
- */
- Interactive: boolean;
-
- /**
- * The name of the host executable (WScript.exe or CScript.exe).
- */
- Name: string;
-
- /**
- * Path of the directory containing the host executable.
- */
- Path: string;
-
- /**
- * The filename of the currently running script.
- */
- ScriptName: string;
-
- /**
- * Exposes the read-only input stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdIn: TextStreamReader;
-
- /**
- * Windows Script Host version
- */
- Version: string;
-
- /**
- * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
- */
- ConnectObject(objEventSource: any, strPrefix: string): void;
-
- /**
- * Creates a COM object.
- * @param strProgiID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- CreateObject(strProgID: string, strPrefix?: string): any;
-
- /**
- * Disconnects a COM object from its event sources.
- */
- DisconnectObject(obj: any): void;
-
- /**
- * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
- * @param strPathname Fully qualified path to the file containing the object persisted to disk.
- * For objects in memory, pass a zero-length string.
- * @param strProgID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
-
- /**
- * Suspends script execution for a specified length of time, then continues execution.
- * @param intTime Interval (in milliseconds) to suspend script execution.
- */
- Sleep(intTime: number): void;
-};
-
-/**
- * Allows enumerating over a COM collection, which may not have indexed item access.
- */
-interface Enumerator<T> {
- /**
- * Returns true if the current item is the last one in the collection, or the collection is empty,
- * or the current item is undefined.
- */
- atEnd(): boolean;
-
- /**
- * Returns the current item in the collection
- */
- item(): T;
-
- /**
- * Resets the current item in the collection to the first item. If there are no items in the collection,
- * the current item is set to undefined.
- */
- moveFirst(): void;
-
- /**
- * Moves the current item to the next item in the collection. If the enumerator is at the end of
- * the collection or the collection is empty, the current item is set to undefined.
- */
- moveNext(): void;
-}
-
-interface EnumeratorConstructor {
- new <T>(collection: any): Enumerator<T>;
- new (collection: any): Enumerator<any>;
-}
-
-declare var Enumerator: EnumeratorConstructor;
-
-/**
- * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
- */
-interface VBArray<T> {
- /**
- * Returns the number of dimensions (1-based).
- */
- dimensions(): number;
-
- /**
- * Takes an index for each dimension in the array, and returns the item at the corresponding location.
- */
- getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
-
- /**
- * Returns the smallest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- lbound(dimension?: number): number;
-
- /**
- * Returns the largest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- ubound(dimension?: number): number;
-
- /**
- * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
- * each successive dimension is appended to the end of the array.
- * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
- */
- toArray(): T[];
-}
-
-interface VBArrayConstructor {
- new <T>(safeArray: any): VBArray<T>;
- new (safeArray: any): VBArray<any>;
-}
-
-declare var VBArray: VBArrayConstructor;
-
-/**
- * Automation date (VT_DATE)
- */
-interface VarDate { }
-
-interface DateConstructor {
- new (vd: VarDate): Date;
-}
-
-interface Date {
- getVarDate: () => VarDate;
-}
-
-
-/// <reference path="lib.dom.d.ts" />
-
-interface DOMTokenList {
- [Symbol.iterator](): IterableIterator<string>;
-}
-
-interface NodeList {
- [Symbol.iterator](): IterableIterator<Node>
-}
-
-interface NodeListOf<TNode extends Node> {
- [Symbol.iterator](): IterableIterator<TNode>
-}
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T>(collection: any): Enumerator<T>;
+ new (collection: any): Enumerator<any>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T>(safeArray: any): VBArray<T>;
+ new (safeArray: any): VBArray<any>;
+}
+
+declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+interface VarDate { }
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
+
+interface Date {
+ getVarDate: () => VarDate;
+}
+
+
+/// <reference path="lib.dom.d.ts" />
+
+interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface FormData {
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[string, string | File]>;
+ /**
+ * Returns a list of keys in the list
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns a list of values in the list
+ */
+ values(): IterableIterator<string | File>;
+
+ [Symbol.iterator](): IterableIterator<string | File>;
+}
+
+interface NodeList {
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[number, Node]>;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: Node, index: number, listObj: NodeList) => void, thisArg?: any): void;
+ /**
+ * Returns an list of keys in the list
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the list
+ */
+ values(): IterableIterator<Node>;
+
+
+ [Symbol.iterator](): IterableIterator<Node>;
+}
+
+interface NodeListOf<TNode extends Node> {
+
+ /**
+ * Returns an array of key, value pairs for every entry in the list
+ */
+ entries(): IterableIterator<[number, TNode]>;
+
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: TNode, index: number, listObj: NodeListOf<TNode>) => void, thisArg?: any): void;
+ /**
+ * Returns an list of keys in the list
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the list
+ */
+ values(): IterableIterator<TNode>;
+
+ [Symbol.iterator](): IterableIterator<TNode>;
+}
diff --git a/node_modules/typescript/lib/lib.scripthost.d.ts b/node_modules/typescript/lib/lib.scripthost.d.ts
index 2d2f4df3b..47cfaa7fb 100644
--- a/node_modules/typescript/lib/lib.scripthost.d.ts
+++ b/node_modules/typescript/lib/lib.scripthost.d.ts
@@ -1,311 +1,311 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-
-
-/////////////////////////////
-/// Windows Script Host APIS
-/////////////////////////////
-
-
-interface ActiveXObject {
- new (s: string): any;
-}
-declare var ActiveXObject: ActiveXObject;
-
-interface ITextWriter {
- Write(s: string): void;
- WriteLine(s: string): void;
- Close(): void;
-}
-
-interface TextStreamBase {
- /**
- * The column number of the current character position in an input stream.
- */
- Column: number;
-
- /**
- * The current line number in an input stream.
- */
- Line: number;
-
- /**
- * Closes a text stream.
- * It is not necessary to close standard streams; they close automatically when the process ends. If
- * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
- */
- Close(): void;
-}
-
-interface TextStreamWriter extends TextStreamBase {
- /**
- * Sends a string to an output stream.
- */
- Write(s: string): void;
-
- /**
- * Sends a specified number of blank lines (newline characters) to an output stream.
- */
- WriteBlankLines(intLines: number): void;
-
- /**
- * Sends a string followed by a newline character to an output stream.
- */
- WriteLine(s: string): void;
-}
-
-interface TextStreamReader extends TextStreamBase {
- /**
- * Returns a specified number of characters from an input stream, starting at the current pointer position.
- * Does not return until the ENTER key is pressed.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- Read(characters: number): string;
-
- /**
- * Returns all characters from an input stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadAll(): string;
-
- /**
- * Returns an entire line from an input stream.
- * Although this method extracts the newline character, it does not add it to the returned string.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- */
- ReadLine(): string;
-
- /**
- * Skips a specified number of characters when reading from an input text stream.
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
- * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
- */
- Skip(characters: number): void;
-
- /**
- * Skips the next line when reading from an input text stream.
- * Can only be used on a stream in reading mode, not writing or appending mode.
- */
- SkipLine(): void;
-
- /**
- * Indicates whether the stream pointer position is at the end of a line.
- */
- AtEndOfLine: boolean;
-
- /**
- * Indicates whether the stream pointer position is at the end of a stream.
- */
- AtEndOfStream: boolean;
-}
-
-declare var WScript: {
- /**
- * Outputs text to either a message box (under WScript.exe) or the command console window followed by
- * a newline (under CScript.exe).
- */
- Echo(s: any): void;
-
- /**
- * Exposes the write-only error output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdErr: TextStreamWriter;
-
- /**
- * Exposes the write-only output stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdOut: TextStreamWriter;
- Arguments: { length: number; Item(n: number): string; };
-
- /**
- * The full path of the currently running script.
- */
- ScriptFullName: string;
-
- /**
- * Forces the script to stop immediately, with an optional exit code.
- */
- Quit(exitCode?: number): number;
-
- /**
- * The Windows Script Host build version number.
- */
- BuildVersion: number;
-
- /**
- * Fully qualified path of the host executable.
- */
- FullName: string;
-
- /**
- * Gets/sets the script mode - interactive(true) or batch(false).
- */
- Interactive: boolean;
-
- /**
- * The name of the host executable (WScript.exe or CScript.exe).
- */
- Name: string;
-
- /**
- * Path of the directory containing the host executable.
- */
- Path: string;
-
- /**
- * The filename of the currently running script.
- */
- ScriptName: string;
-
- /**
- * Exposes the read-only input stream for the current script.
- * Can be accessed only while using CScript.exe.
- */
- StdIn: TextStreamReader;
-
- /**
- * Windows Script Host version
- */
- Version: string;
-
- /**
- * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
- */
- ConnectObject(objEventSource: any, strPrefix: string): void;
-
- /**
- * Creates a COM object.
- * @param strProgiID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- CreateObject(strProgID: string, strPrefix?: string): any;
-
- /**
- * Disconnects a COM object from its event sources.
- */
- DisconnectObject(obj: any): void;
-
- /**
- * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
- * @param strPathname Fully qualified path to the file containing the object persisted to disk.
- * For objects in memory, pass a zero-length string.
- * @param strProgID
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
- */
- GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
-
- /**
- * Suspends script execution for a specified length of time, then continues execution.
- * @param intTime Interval (in milliseconds) to suspend script execution.
- */
- Sleep(intTime: number): void;
-};
-
-/**
- * Allows enumerating over a COM collection, which may not have indexed item access.
- */
-interface Enumerator<T> {
- /**
- * Returns true if the current item is the last one in the collection, or the collection is empty,
- * or the current item is undefined.
- */
- atEnd(): boolean;
-
- /**
- * Returns the current item in the collection
- */
- item(): T;
-
- /**
- * Resets the current item in the collection to the first item. If there are no items in the collection,
- * the current item is set to undefined.
- */
- moveFirst(): void;
-
- /**
- * Moves the current item to the next item in the collection. If the enumerator is at the end of
- * the collection or the collection is empty, the current item is set to undefined.
- */
- moveNext(): void;
-}
-
-interface EnumeratorConstructor {
- new <T>(collection: any): Enumerator<T>;
- new (collection: any): Enumerator<any>;
-}
-
-declare var Enumerator: EnumeratorConstructor;
-
-/**
- * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
- */
-interface VBArray<T> {
- /**
- * Returns the number of dimensions (1-based).
- */
- dimensions(): number;
-
- /**
- * Takes an index for each dimension in the array, and returns the item at the corresponding location.
- */
- getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
-
- /**
- * Returns the smallest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- lbound(dimension?: number): number;
-
- /**
- * Returns the largest available index for a given dimension.
- * @param dimension 1-based dimension (defaults to 1)
- */
- ubound(dimension?: number): number;
-
- /**
- * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
- * each successive dimension is appended to the end of the array.
- * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
- */
- toArray(): T[];
-}
-
-interface VBArrayConstructor {
- new <T>(safeArray: any): VBArray<T>;
- new (safeArray: any): VBArray<any>;
-}
-
-declare var VBArray: VBArrayConstructor;
-
-/**
- * Automation date (VT_DATE)
- */
-interface VarDate { }
-
-interface DateConstructor {
- new (vd: VarDate): Date;
-}
-
-interface Date {
- getVarDate: () => VarDate;
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T>(collection: any): Enumerator<T>;
+ new (collection: any): Enumerator<any>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T>(safeArray: any): VBArray<T>;
+ new (safeArray: any): VBArray<any>;
+}
+
+declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+interface VarDate { }
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
+
+interface Date {
+ getVarDate: () => VarDate;
+}
diff --git a/node_modules/typescript/lib/lib.webworker.d.ts b/node_modules/typescript/lib/lib.webworker.d.ts
index 97eb9814e..4e7672f79 100644
--- a/node_modules/typescript/lib/lib.webworker.d.ts
+++ b/node_modules/typescript/lib/lib.webworker.d.ts
@@ -1,1274 +1,1861 @@
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-
-
-/// <reference no-default-lib="true"/>
-
-
-
-/////////////////////////////
-/// IE Worker APIs
-/////////////////////////////
-
-interface Algorithm {
- name: string;
-}
-
-interface EventInit {
- scoped?: boolean;
- bubbles?: boolean;
- cancelable?: boolean;
-}
-
-interface IDBIndexParameters {
- multiEntry?: boolean;
- unique?: boolean;
-}
-
-interface IDBObjectStoreParameters {
- autoIncrement?: boolean;
- keyPath?: IDBKeyPath;
-}
-
-interface KeyAlgorithm {
- name?: string;
-}
-
-interface EventListener {
- (evt: Event): void;
-}
-
-interface AudioBuffer {
- readonly duration: number;
- readonly length: number;
- readonly numberOfChannels: number;
- readonly sampleRate: number;
- copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
- copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
- getChannelData(channel: number): Float32Array;
-}
-
-declare var AudioBuffer: {
- prototype: AudioBuffer;
- new(): AudioBuffer;
-}
-
-interface Blob {
- readonly size: number;
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
- slice(start?: number, end?: number, contentType?: string): Blob;
-}
-
-declare var Blob: {
- prototype: Blob;
- new (blobParts?: any[], options?: BlobPropertyBag): Blob;
-}
-
-interface CloseEvent extends Event {
- readonly code: number;
- readonly reason: string;
- readonly wasClean: boolean;
- initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
-}
-
-declare var CloseEvent: {
- prototype: CloseEvent;
- new(): CloseEvent;
-}
-
-interface Console {
- assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
- clear(): void;
- count(countTitle?: string): void;
- debug(message?: string, ...optionalParams: any[]): void;
- dir(value?: any, ...optionalParams: any[]): void;
- dirxml(value: any): void;
- error(message?: any, ...optionalParams: any[]): void;
- exception(message?: string, ...optionalParams: any[]): void;
- group(groupTitle?: string): void;
- groupCollapsed(groupTitle?: string): void;
- groupEnd(): void;
- info(message?: any, ...optionalParams: any[]): void;
- log(message?: any, ...optionalParams: any[]): void;
- msIsIndependentlyComposed(element: any): boolean;
- profile(reportName?: string): void;
- profileEnd(): void;
- select(element: any): void;
- table(...data: any[]): void;
- time(timerName?: string): void;
- timeEnd(timerName?: string): void;
- trace(message?: any, ...optionalParams: any[]): void;
- warn(message?: any, ...optionalParams: any[]): void;
-}
-
-declare var Console: {
- prototype: Console;
- new(): Console;
-}
-
-interface Coordinates {
- readonly accuracy: number;
- readonly altitude: number | null;
- readonly altitudeAccuracy: number | null;
- readonly heading: number | null;
- readonly latitude: number;
- readonly longitude: number;
- readonly speed: number | null;
-}
-
-declare var Coordinates: {
- prototype: Coordinates;
- new(): Coordinates;
-}
-
-interface CryptoKey {
- readonly algorithm: KeyAlgorithm;
- readonly extractable: boolean;
- readonly type: string;
- readonly usages: string[];
-}
-
-declare var CryptoKey: {
- prototype: CryptoKey;
- new(): CryptoKey;
-}
-
-interface DOMError {
- readonly name: string;
- toString(): string;
-}
-
-declare var DOMError: {
- prototype: DOMError;
- new(): DOMError;
-}
-
-interface DOMException {
- readonly code: number;
- readonly message: string;
- readonly name: string;
- toString(): string;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-declare var DOMException: {
- prototype: DOMException;
- new(): DOMException;
- readonly ABORT_ERR: number;
- readonly DATA_CLONE_ERR: number;
- readonly DOMSTRING_SIZE_ERR: number;
- readonly HIERARCHY_REQUEST_ERR: number;
- readonly INDEX_SIZE_ERR: number;
- readonly INUSE_ATTRIBUTE_ERR: number;
- readonly INVALID_ACCESS_ERR: number;
- readonly INVALID_CHARACTER_ERR: number;
- readonly INVALID_MODIFICATION_ERR: number;
- readonly INVALID_NODE_TYPE_ERR: number;
- readonly INVALID_STATE_ERR: number;
- readonly NAMESPACE_ERR: number;
- readonly NETWORK_ERR: number;
- readonly NOT_FOUND_ERR: number;
- readonly NOT_SUPPORTED_ERR: number;
- readonly NO_DATA_ALLOWED_ERR: number;
- readonly NO_MODIFICATION_ALLOWED_ERR: number;
- readonly PARSE_ERR: number;
- readonly QUOTA_EXCEEDED_ERR: number;
- readonly SECURITY_ERR: number;
- readonly SERIALIZE_ERR: number;
- readonly SYNTAX_ERR: number;
- readonly TIMEOUT_ERR: number;
- readonly TYPE_MISMATCH_ERR: number;
- readonly URL_MISMATCH_ERR: number;
- readonly VALIDATION_ERR: number;
- readonly WRONG_DOCUMENT_ERR: number;
-}
-
-interface DOMStringList {
- readonly length: number;
- contains(str: string): boolean;
- item(index: number): string | null;
- [index: number]: string;
-}
-
-declare var DOMStringList: {
- prototype: DOMStringList;
- new(): DOMStringList;
-}
-
-interface ErrorEvent extends Event {
- readonly colno: number;
- readonly error: any;
- readonly filename: string;
- readonly lineno: number;
- readonly message: string;
- initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
-}
-
-declare var ErrorEvent: {
- prototype: ErrorEvent;
- new(): ErrorEvent;
-}
-
-interface Event {
- readonly bubbles: boolean;
- cancelBubble: boolean;
- readonly cancelable: boolean;
- readonly currentTarget: EventTarget;
- readonly defaultPrevented: boolean;
- readonly eventPhase: number;
- readonly isTrusted: boolean;
- returnValue: boolean;
- readonly srcElement: any;
- readonly target: EventTarget;
- readonly timeStamp: number;
- readonly type: string;
- readonly scoped: boolean;
- initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
- preventDefault(): void;
- stopImmediatePropagation(): void;
- stopPropagation(): void;
- deepPath(): EventTarget[];
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-declare var Event: {
- prototype: Event;
- new(type: string, eventInitDict?: EventInit): Event;
- readonly AT_TARGET: number;
- readonly BUBBLING_PHASE: number;
- readonly CAPTURING_PHASE: number;
-}
-
-interface EventTarget {
- addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
- dispatchEvent(evt: Event): boolean;
- removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var EventTarget: {
- prototype: EventTarget;
- new(): EventTarget;
-}
-
-interface File extends Blob {
- readonly lastModifiedDate: any;
- readonly name: string;
- readonly webkitRelativePath: string;
-}
-
-declare var File: {
- prototype: File;
- new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
-
-interface FileList {
- readonly length: number;
- item(index: number): File;
- [index: number]: File;
-}
-
-declare var FileList: {
- prototype: FileList;
- new(): FileList;
-}
-
-interface FileReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(blob: Blob): void;
- readAsBinaryString(blob: Blob): void;
- readAsDataURL(blob: Blob): void;
- readAsText(blob: Blob, encoding?: string): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var FileReader: {
- prototype: FileReader;
- new(): FileReader;
-}
-
-interface IDBCursor {
- readonly direction: string;
- key: IDBKeyRange | IDBValidKey;
- readonly primaryKey: any;
- source: IDBObjectStore | IDBIndex;
- advance(count: number): void;
- continue(key?: IDBKeyRange | IDBValidKey): void;
- delete(): IDBRequest;
- update(value: any): IDBRequest;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-declare var IDBCursor: {
- prototype: IDBCursor;
- new(): IDBCursor;
- readonly NEXT: string;
- readonly NEXT_NO_DUPLICATE: string;
- readonly PREV: string;
- readonly PREV_NO_DUPLICATE: string;
-}
-
-interface IDBCursorWithValue extends IDBCursor {
- readonly value: any;
-}
-
-declare var IDBCursorWithValue: {
- prototype: IDBCursorWithValue;
- new(): IDBCursorWithValue;
-}
-
-interface IDBDatabaseEventMap {
- "abort": Event;
- "error": ErrorEvent;
-}
-
-interface IDBDatabase extends EventTarget {
- readonly name: string;
- readonly objectStoreNames: DOMStringList;
- onabort: (this: IDBDatabase, ev: Event) => any;
- onerror: (this: IDBDatabase, ev: ErrorEvent) => any;
- version: number;
- onversionchange: (ev: IDBVersionChangeEvent) => any;
- close(): void;
- createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
- deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
- addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
- addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBDatabase: {
- prototype: IDBDatabase;
- new(): IDBDatabase;
-}
-
-interface IDBFactory {
- cmp(first: any, second: any): number;
- deleteDatabase(name: string): IDBOpenDBRequest;
- open(name: string, version?: number): IDBOpenDBRequest;
-}
-
-declare var IDBFactory: {
- prototype: IDBFactory;
- new(): IDBFactory;
-}
-
-interface IDBIndex {
- keyPath: string | string[];
- readonly name: string;
- readonly objectStore: IDBObjectStore;
- readonly unique: boolean;
- multiEntry: boolean;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- get(key: IDBKeyRange | IDBValidKey): IDBRequest;
- getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
-}
-
-declare var IDBIndex: {
- prototype: IDBIndex;
- new(): IDBIndex;
-}
-
-interface IDBKeyRange {
- readonly lower: any;
- readonly lowerOpen: boolean;
- readonly upper: any;
- readonly upperOpen: boolean;
-}
-
-declare var IDBKeyRange: {
- prototype: IDBKeyRange;
- new(): IDBKeyRange;
- bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
- lowerBound(lower: any, open?: boolean): IDBKeyRange;
- only(value: any): IDBKeyRange;
- upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
-
-interface IDBObjectStore {
- readonly indexNames: DOMStringList;
- keyPath: string | string[];
- readonly name: string;
- readonly transaction: IDBTransaction;
- autoIncrement: boolean;
- add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
- clear(): IDBRequest;
- count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
- createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
- delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
- deleteIndex(indexName: string): void;
- get(key: any): IDBRequest;
- index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
- put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
-}
-
-declare var IDBObjectStore: {
- prototype: IDBObjectStore;
- new(): IDBObjectStore;
-}
-
-interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
- "blocked": Event;
- "upgradeneeded": IDBVersionChangeEvent;
-}
-
-interface IDBOpenDBRequest extends IDBRequest {
- onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
- onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
- addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBOpenDBRequest: {
- prototype: IDBOpenDBRequest;
- new(): IDBOpenDBRequest;
-}
-
-interface IDBRequestEventMap {
- "error": ErrorEvent;
- "success": Event;
-}
-
-interface IDBRequest extends EventTarget {
- readonly error: DOMError;
- onerror: (this: IDBRequest, ev: ErrorEvent) => any;
- onsuccess: (this: IDBRequest, ev: Event) => any;
- readonly readyState: string;
- readonly result: any;
- source: IDBObjectStore | IDBIndex | IDBCursor;
- readonly transaction: IDBTransaction;
- addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBRequest: {
- prototype: IDBRequest;
- new(): IDBRequest;
-}
-
-interface IDBTransactionEventMap {
- "abort": Event;
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface IDBTransaction extends EventTarget {
- readonly db: IDBDatabase;
- readonly error: DOMError;
- readonly mode: string;
- onabort: (this: IDBTransaction, ev: Event) => any;
- oncomplete: (this: IDBTransaction, ev: Event) => any;
- onerror: (this: IDBTransaction, ev: ErrorEvent) => any;
- abort(): void;
- objectStore(name: string): IDBObjectStore;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
- addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var IDBTransaction: {
- prototype: IDBTransaction;
- new(): IDBTransaction;
- readonly READ_ONLY: string;
- readonly READ_WRITE: string;
- readonly VERSION_CHANGE: string;
-}
-
-interface IDBVersionChangeEvent extends Event {
- readonly newVersion: number | null;
- readonly oldVersion: number;
-}
-
-declare var IDBVersionChangeEvent: {
- prototype: IDBVersionChangeEvent;
- new(): IDBVersionChangeEvent;
-}
-
-interface ImageData {
- data: Uint8ClampedArray;
- readonly height: number;
- readonly width: number;
-}
-
-declare var ImageData: {
- prototype: ImageData;
- new(width: number, height: number): ImageData;
- new(array: Uint8ClampedArray, width: number, height: number): ImageData;
-}
-
-interface MSApp {
- clearTemporaryWebDataAsync(): MSAppAsyncOperation;
- createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
- createDataPackage(object: any): any;
- createDataPackageFromSelection(): any;
- createFileFromStorageFile(storageFile: any): File;
- createStreamFromInputStream(type: string, inputStream: any): MSStream;
- execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
- execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
- getCurrentPriority(): string;
- getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
- getViewId(view: any): any;
- isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
- pageHandlesAllApplicationActivations(enabled: boolean): void;
- suppressSubdownloadCredentialPrompts(suppress: boolean): void;
- terminateApp(exceptionObject: any): void;
- readonly CURRENT: string;
- readonly HIGH: string;
- readonly IDLE: string;
- readonly NORMAL: string;
-}
-declare var MSApp: MSApp;
-
-interface MSAppAsyncOperationEventMap {
- "complete": Event;
- "error": ErrorEvent;
-}
-
-interface MSAppAsyncOperation extends EventTarget {
- readonly error: DOMError;
- oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
- onerror: (this: MSAppAsyncOperation, ev: ErrorEvent) => any;
- readonly readyState: number;
- readonly result: any;
- start(): void;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
- addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSAppAsyncOperation: {
- prototype: MSAppAsyncOperation;
- new(): MSAppAsyncOperation;
- readonly COMPLETED: number;
- readonly ERROR: number;
- readonly STARTED: number;
-}
-
-interface MSBlobBuilder {
- append(data: any, endings?: string): void;
- getBlob(contentType?: string): Blob;
-}
-
-declare var MSBlobBuilder: {
- prototype: MSBlobBuilder;
- new(): MSBlobBuilder;
-}
-
-interface MSStream {
- readonly type: string;
- msClose(): void;
- msDetachStream(): any;
-}
-
-declare var MSStream: {
- prototype: MSStream;
- new(): MSStream;
-}
-
-interface MSStreamReader extends EventTarget, MSBaseReader {
- readonly error: DOMError;
- readAsArrayBuffer(stream: MSStream, size?: number): void;
- readAsBinaryString(stream: MSStream, size?: number): void;
- readAsBlob(stream: MSStream, size?: number): void;
- readAsDataURL(stream: MSStream, size?: number): void;
- readAsText(stream: MSStream, encoding?: string, size?: number): void;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MSStreamReader: {
- prototype: MSStreamReader;
- new(): MSStreamReader;
-}
-
-interface MediaQueryList {
- readonly matches: boolean;
- readonly media: string;
- addListener(listener: MediaQueryListListener): void;
- removeListener(listener: MediaQueryListListener): void;
-}
-
-declare var MediaQueryList: {
- prototype: MediaQueryList;
- new(): MediaQueryList;
-}
-
-interface MessageChannel {
- readonly port1: MessagePort;
- readonly port2: MessagePort;
-}
-
-declare var MessageChannel: {
- prototype: MessageChannel;
- new(): MessageChannel;
-}
-
-interface MessageEvent extends Event {
- readonly data: any;
- readonly origin: string;
- readonly ports: any;
- readonly source: any;
- initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: any): void;
-}
-
-declare var MessageEvent: {
- prototype: MessageEvent;
- new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
-}
-
-interface MessagePortEventMap {
- "message": MessageEvent;
-}
-
-interface MessagePort extends EventTarget {
- onmessage: (this: MessagePort, ev: MessageEvent) => any;
- close(): void;
- postMessage(message?: any, ports?: any): void;
- start(): void;
- addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var MessagePort: {
- prototype: MessagePort;
- new(): MessagePort;
-}
-
-interface Position {
- readonly coords: Coordinates;
- readonly timestamp: number;
-}
-
-declare var Position: {
- prototype: Position;
- new(): Position;
-}
-
-interface PositionError {
- readonly code: number;
- readonly message: string;
- toString(): string;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-declare var PositionError: {
- prototype: PositionError;
- new(): PositionError;
- readonly PERMISSION_DENIED: number;
- readonly POSITION_UNAVAILABLE: number;
- readonly TIMEOUT: number;
-}
-
-interface ProgressEvent extends Event {
- readonly lengthComputable: boolean;
- readonly loaded: number;
- readonly total: number;
- initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
-}
-
-declare var ProgressEvent: {
- prototype: ProgressEvent;
- new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
-
-interface WebSocketEventMap {
- "close": CloseEvent;
- "error": ErrorEvent;
- "message": MessageEvent;
- "open": Event;
-}
-
-interface WebSocket extends EventTarget {
- binaryType: string;
- readonly bufferedAmount: number;
- readonly extensions: string;
- onclose: (this: WebSocket, ev: CloseEvent) => any;
- onerror: (this: WebSocket, ev: ErrorEvent) => any;
- onmessage: (this: WebSocket, ev: MessageEvent) => any;
- onopen: (this: WebSocket, ev: Event) => any;
- readonly protocol: string;
- readonly readyState: number;
- readonly url: string;
- close(code?: number, reason?: string): void;
- send(data: any): void;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
- addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var WebSocket: {
- prototype: WebSocket;
- new(url: string, protocols?: string | string[]): WebSocket;
- readonly CLOSED: number;
- readonly CLOSING: number;
- readonly CONNECTING: number;
- readonly OPEN: number;
-}
-
-interface WorkerEventMap extends AbstractWorkerEventMap {
- "message": MessageEvent;
-}
-
-interface Worker extends EventTarget, AbstractWorker {
- onmessage: (this: Worker, ev: MessageEvent) => any;
- postMessage(message: any, ports?: any): void;
- terminate(): void;
- addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var Worker: {
- prototype: Worker;
- new(stringUrl: string): Worker;
-}
-
-interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
- "readystatechange": Event;
-}
-
-interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
- onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
- readonly readyState: number;
- readonly response: any;
- readonly responseText: string;
- responseType: string;
- readonly responseXML: any;
- readonly status: number;
- readonly statusText: string;
- timeout: number;
- readonly upload: XMLHttpRequestUpload;
- withCredentials: boolean;
- msCaching?: string;
- readonly responseURL: string;
- abort(): void;
- getAllResponseHeaders(): string;
- getResponseHeader(header: string): string | null;
- msCachingEnabled(): boolean;
- open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
- overrideMimeType(mime: string): void;
- send(data?: string): void;
- send(data?: any): void;
- setRequestHeader(header: string, value: string): void;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequest: {
- prototype: XMLHttpRequest;
- new(): XMLHttpRequest;
- readonly DONE: number;
- readonly HEADERS_RECEIVED: number;
- readonly LOADING: number;
- readonly OPENED: number;
- readonly UNSENT: number;
- create(): XMLHttpRequest;
-}
-
-interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var XMLHttpRequestUpload: {
- prototype: XMLHttpRequestUpload;
- new(): XMLHttpRequestUpload;
-}
-
-interface AbstractWorkerEventMap {
- "error": ErrorEvent;
-}
-
-interface AbstractWorker {
- onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
- addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface MSBaseReaderEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
-}
-
-interface MSBaseReader {
- onabort: (this: MSBaseReader, ev: Event) => any;
- onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
- onload: (this: MSBaseReader, ev: Event) => any;
- onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
- onloadstart: (this: MSBaseReader, ev: Event) => any;
- onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
- readonly readyState: number;
- readonly result: any;
- abort(): void;
- readonly DONE: number;
- readonly EMPTY: number;
- readonly LOADING: number;
- addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface NavigatorID {
- readonly appName: string;
- readonly appVersion: string;
- readonly platform: string;
- readonly product: string;
- readonly productSub: string;
- readonly userAgent: string;
- readonly vendor: string;
- readonly vendorSub: string;
-}
-
-interface NavigatorOnLine {
- readonly onLine: boolean;
-}
-
-interface WindowBase64 {
- atob(encodedString: string): string;
- btoa(rawString: string): string;
-}
-
-interface WindowConsole {
- readonly console: Console;
-}
-
-interface XMLHttpRequestEventTargetEventMap {
- "abort": Event;
- "error": ErrorEvent;
- "load": Event;
- "loadend": ProgressEvent;
- "loadstart": Event;
- "progress": ProgressEvent;
- "timeout": ProgressEvent;
-}
-
-interface XMLHttpRequestEventTarget {
- onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
- onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
- onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
- addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface FileReaderSync {
- readAsArrayBuffer(blob: Blob): any;
- readAsBinaryString(blob: Blob): void;
- readAsDataURL(blob: Blob): string;
- readAsText(blob: Blob, encoding?: string): string;
-}
-
-declare var FileReaderSync: {
- prototype: FileReaderSync;
- new(): FileReaderSync;
-}
-
-interface WorkerGlobalScopeEventMap extends DedicatedWorkerGlobalScopeEventMap {
- "error": ErrorEvent;
-}
-
-interface WorkerGlobalScope extends EventTarget, WorkerUtils, DedicatedWorkerGlobalScope, WindowConsole {
- readonly location: WorkerLocation;
- onerror: (this: WorkerGlobalScope, ev: ErrorEvent) => any;
- readonly self: WorkerGlobalScope;
- close(): void;
- msWriteProfilerMark(profilerMarkName: string): void;
- toString(): string;
- addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-declare var WorkerGlobalScope: {
- prototype: WorkerGlobalScope;
- new(): WorkerGlobalScope;
-}
-
-interface WorkerLocation {
- readonly hash: string;
- readonly host: string;
- readonly hostname: string;
- readonly href: string;
- readonly pathname: string;
- readonly port: string;
- readonly protocol: string;
- readonly search: string;
- toString(): string;
-}
-
-declare var WorkerLocation: {
- prototype: WorkerLocation;
- new(): WorkerLocation;
-}
-
-interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine {
- readonly hardwareConcurrency: number;
-}
-
-declare var WorkerNavigator: {
- prototype: WorkerNavigator;
- new(): WorkerNavigator;
-}
-
-interface DedicatedWorkerGlobalScopeEventMap {
- "message": MessageEvent;
-}
-
-interface DedicatedWorkerGlobalScope {
- onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
- postMessage(data: any): void;
- addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-}
-
-interface WorkerUtils extends Object, WindowBase64 {
- readonly indexedDB: IDBFactory;
- readonly msIndexedDB: IDBFactory;
- readonly navigator: WorkerNavigator;
- clearImmediate(handle: number): void;
- clearInterval(handle: number): void;
- clearTimeout(handle: number): void;
- importScripts(...urls: string[]): void;
- setImmediate(handler: (...args: any[]) => void): number;
- setImmediate(handler: any, ...args: any[]): number;
- setInterval(handler: (...args: any[]) => void, timeout: number): number;
- setInterval(handler: any, timeout?: any, ...args: any[]): number;
- setTimeout(handler: (...args: any[]) => void, timeout: number): number;
- setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-}
-
-interface BlobPropertyBag {
- type?: string;
- endings?: string;
-}
-
-interface FilePropertyBag {
- type?: string;
- lastModified?: number;
-}
-
-interface EventListenerObject {
- handleEvent(evt: Event): void;
-}
-
-interface MessageEventInit extends EventInit {
- data?: any;
- origin?: string;
- lastEventId?: string;
- channel?: string;
- source?: any;
- ports?: MessagePort[];
-}
-
-interface ProgressEventInit extends EventInit {
- lengthComputable?: boolean;
- loaded?: number;
- total?: number;
-}
-
-interface IDBArrayKey extends Array<IDBValidKey> {
-}
-
-interface RsaKeyGenParams extends Algorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyGenParams extends RsaKeyGenParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaKeyAlgorithm extends KeyAlgorithm {
- modulusLength: number;
- publicExponent: Uint8Array;
-}
-
-interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaHashedImportParams {
- hash: AlgorithmIdentifier;
-}
-
-interface RsaPssParams {
- saltLength: number;
-}
-
-interface RsaOaepParams extends Algorithm {
- label?: BufferSource;
-}
-
-interface EcdsaParams extends Algorithm {
- hash: AlgorithmIdentifier;
-}
-
-interface EcKeyGenParams extends Algorithm {
- namedCurve: string;
-}
-
-interface EcKeyAlgorithm extends KeyAlgorithm {
- typedCurve: string;
-}
-
-interface EcKeyImportParams {
- namedCurve: string;
-}
-
-interface EcdhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface AesCtrParams extends Algorithm {
- counter: BufferSource;
- length: number;
-}
-
-interface AesKeyAlgorithm extends KeyAlgorithm {
- length: number;
-}
-
-interface AesKeyGenParams extends Algorithm {
- length: number;
-}
-
-interface AesDerivedKeyParams extends Algorithm {
- length: number;
-}
-
-interface AesCbcParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface AesCmacParams extends Algorithm {
- length: number;
-}
-
-interface AesGcmParams extends Algorithm {
- iv: BufferSource;
- additionalData?: BufferSource;
- tagLength?: number;
-}
-
-interface AesCfbParams extends Algorithm {
- iv: BufferSource;
-}
-
-interface HmacImportParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- length?: number;
-}
-
-interface HmacKeyAlgorithm extends KeyAlgorithm {
- hash: AlgorithmIdentifier;
- length: number;
-}
-
-interface HmacKeyGenParams extends Algorithm {
- hash: AlgorithmIdentifier;
- length?: number;
-}
-
-interface DhKeyGenParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyAlgorithm extends KeyAlgorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface DhKeyDeriveParams extends Algorithm {
- public: CryptoKey;
-}
-
-interface DhImportKeyParams extends Algorithm {
- prime: Uint8Array;
- generator: Uint8Array;
-}
-
-interface ConcatParams extends Algorithm {
- hash?: AlgorithmIdentifier;
- algorithmId: Uint8Array;
- partyUInfo: Uint8Array;
- partyVInfo: Uint8Array;
- publicInfo?: Uint8Array;
- privateInfo?: Uint8Array;
-}
-
-interface HkdfCtrParams extends Algorithm {
- hash: AlgorithmIdentifier;
- label: BufferSource;
- context: BufferSource;
-}
-
-interface Pbkdf2Params extends Algorithm {
- salt: BufferSource;
- iterations: number;
- hash: AlgorithmIdentifier;
-}
-
-interface RsaOtherPrimesInfo {
- r: string;
- d: string;
- t: string;
-}
-
-interface JsonWebKey {
- kty: string;
- use?: string;
- key_ops?: string[];
- alg?: string;
- kid?: string;
- x5u?: string;
- x5c?: string;
- x5t?: string;
- ext?: boolean;
- crv?: string;
- x?: string;
- y?: string;
- d?: string;
- n?: string;
- e?: string;
- p?: string;
- q?: string;
- dp?: string;
- dq?: string;
- qi?: string;
- oth?: RsaOtherPrimesInfo[];
- k?: string;
-}
-
-declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
-
-interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
-}
-interface PositionCallback {
- (position: Position): void;
-}
-interface PositionErrorCallback {
- (error: PositionError): void;
-}
-interface MediaQueryListListener {
- (mql: MediaQueryList): void;
-}
-interface MSLaunchUriCallback {
- (): void;
-}
-interface MSUnsafeFunctionCallback {
- (): any;
-}
-interface MSExecAtPriorityFunctionCallback {
- (...args: any[]): any;
-}
-interface DecodeSuccessCallback {
- (decodedData: AudioBuffer): void;
-}
-interface DecodeErrorCallback {
- (error: DOMException): void;
-}
-interface FunctionStringCallback {
- (data: string): void;
-}
-declare var location: WorkerLocation;
-declare var onerror: (this: WorkerGlobalScope, ev: ErrorEvent) => any;
-declare var self: WorkerGlobalScope;
-declare function close(): void;
-declare function msWriteProfilerMark(profilerMarkName: string): void;
-declare function toString(): string;
-declare function dispatchEvent(evt: Event): boolean;
-declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-declare var indexedDB: IDBFactory;
-declare var msIndexedDB: IDBFactory;
-declare var navigator: WorkerNavigator;
-declare function clearImmediate(handle: number): void;
-declare function clearInterval(handle: number): void;
-declare function clearTimeout(handle: number): void;
-declare function importScripts(...urls: string[]): void;
-declare function setImmediate(handler: (...args: any[]) => void): number;
-declare function setImmediate(handler: any, ...args: any[]): number;
-declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
-declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
-declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
-declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
-declare function atob(encodedString: string): string;
-declare function btoa(rawString: string): string;
-declare var onmessage: (this: WorkerGlobalScope, ev: MessageEvent) => any;
-declare function postMessage(data: any): void;
-declare var console: Console;
-declare function addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
-type AlgorithmIdentifier = string | Algorithm;
-type IDBKeyPath = string;
-type IDBValidKey = number | string | Date | IDBArrayKey;
-type BufferSource = ArrayBuffer | ArrayBufferView; \ No newline at end of file
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+/////////////////////////////
+/// IE Worker APIs
+/////////////////////////////
+
+interface Algorithm {
+ name: string;
+}
+
+interface CacheQueryOptions {
+ ignoreSearch?: boolean;
+ ignoreMethod?: boolean;
+ ignoreVary?: boolean;
+ cacheName?: string;
+}
+
+interface CloseEventInit extends EventInit {
+ wasClean?: boolean;
+ code?: number;
+ reason?: string;
+}
+
+interface EventInit {
+ scoped?: boolean;
+ bubbles?: boolean;
+ cancelable?: boolean;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: IDBKeyPath;
+}
+
+interface KeyAlgorithm {
+ name?: string;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ source?: any;
+ ports?: MessagePort[];
+}
+
+interface NotificationOptions {
+ dir?: NotificationDirection;
+ lang?: string;
+ body?: string;
+ tag?: string;
+ icon?: string;
+}
+
+interface ObjectURLOptions {
+ oneTimeOnly?: boolean;
+}
+
+interface PushSubscriptionOptionsInit {
+ userVisibleOnly?: boolean;
+ applicationServerKey?: any;
+}
+
+interface RequestInit {
+ method?: string;
+ headers?: any;
+ body?: any;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ mode?: RequestMode;
+ credentials?: RequestCredentials;
+ cache?: RequestCache;
+ redirect?: RequestRedirect;
+ integrity?: string;
+ keepalive?: boolean;
+ window?: any;
+}
+
+interface ResponseInit {
+ status?: number;
+ statusText?: string;
+ headers?: any;
+}
+
+interface ClientQueryOptions {
+ includeUncontrolled?: boolean;
+ type?: ClientType;
+}
+
+interface ExtendableEventInit extends EventInit {
+}
+
+interface ExtendableMessageEventInit extends ExtendableEventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+ source?: Client | ServiceWorker | MessagePort;
+ ports?: MessagePort[];
+}
+
+interface FetchEventInit extends ExtendableEventInit {
+ request?: Request;
+ clientId?: string;
+ isReload?: boolean;
+}
+
+interface NotificationEventInit extends ExtendableEventInit {
+ notification?: Notification;
+ action?: string;
+}
+
+interface PushEventInit extends ExtendableEventInit {
+ data?: any;
+}
+
+interface SyncEventInit extends ExtendableEventInit {
+ tag?: string;
+ lastChance?: boolean;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface WebKitEntriesCallback {
+ (evt: Event): void;
+}
+
+interface WebKitErrorCallback {
+ (evt: Event): void;
+}
+
+interface WebKitFileCallback {
+ (evt: Event): void;
+}
+
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(): AudioBuffer;
+}
+
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
+}
+
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+}
+
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): any;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+}
+
+interface CloseEvent extends Event {
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
+}
+
+interface Console {
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
+ clear(): void;
+ count(countTitle?: string): void;
+ debug(message?: any, ...optionalParams: any[]): void;
+ dir(value?: any, ...optionalParams: any[]): void;
+ dirxml(value: any): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(groupTitle?: string): void;
+ groupCollapsed(groupTitle?: string): void;
+ groupEnd(): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ msIsIndependentlyComposed(element: any): boolean;
+ profile(reportName?: string): void;
+ profileEnd(): void;
+ select(element: any): void;
+ table(...data: any[]): void;
+ time(timerName?: string): void;
+ timeEnd(timerName?: string): void;
+ trace(message?: any, ...optionalParams: any[]): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var Console: {
+ prototype: Console;
+ new(): Console;
+}
+
+interface Coordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+declare var Coordinates: {
+ prototype: Coordinates;
+ new(): Coordinates;
+}
+
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: string;
+ readonly usages: string[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+}
+
+interface DOMError {
+ readonly name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+}
+
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ toString(): string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+interface DOMStringList {
+ readonly length: number;
+ contains(str: string): boolean;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+}
+
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
+}
+
+interface Event {
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ readonly cancelable: boolean;
+ readonly currentTarget: EventTarget;
+ readonly defaultPrevented: boolean;
+ readonly eventPhase: number;
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ readonly srcElement: any;
+ readonly target: EventTarget;
+ readonly timeStamp: number;
+ readonly type: string;
+ readonly scoped: boolean;
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
+ preventDefault(): void;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ deepPath(): EventTarget[];
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(typeArg: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+}
+
+interface EventTarget {
+ addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ dispatchEvent(evt: Event): boolean;
+ removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+}
+
+interface File extends Blob {
+ readonly lastModifiedDate: any;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
+}
+
+interface FileList {
+ readonly length: number;
+ item(index: number): File;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+}
+
+interface FileReader extends EventTarget, MSBaseReader {
+ readonly error: DOMError;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+}
+
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ forEach(callback: ForEachCallback): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: any): Headers;
+}
+
+interface IDBCursor {
+ readonly direction: IDBCursorDirection;
+ key: IDBKeyRange | IDBValidKey;
+ readonly primaryKey: any;
+ source: IDBObjectStore | IDBIndex;
+ advance(count: number): void;
+ continue(key?: IDBKeyRange | IDBValidKey): void;
+ delete(): IDBRequest;
+ update(value: any): IDBRequest;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
+}
+
+interface IDBCursorWithValue extends IDBCursor {
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+}
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "error": Event;
+}
+
+interface IDBDatabase extends EventTarget {
+ readonly name: string;
+ readonly objectStoreNames: DOMStringList;
+ onabort: (this: IDBDatabase, ev: Event) => any;
+ onerror: (this: IDBDatabase, ev: Event) => any;
+ version: number;
+ onversionchange: (ev: IDBVersionChangeEvent) => any;
+ close(): void;
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ deleteObjectStore(name: string): void;
+ transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+}
+
+interface IDBFactory {
+ cmp(first: any, second: any): number;
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+}
+
+interface IDBIndex {
+ keyPath: string | string[];
+ readonly name: string;
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ multiEntry: boolean;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ get(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+}
+
+interface IDBKeyRange {
+ readonly lower: any;
+ readonly lowerOpen: boolean;
+ readonly upper: any;
+ readonly upperOpen: boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ only(value: any): IDBKeyRange;
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+}
+
+interface IDBObjectStore {
+ readonly indexNames: DOMStringList;
+ keyPath: string | string[];
+ readonly name: string;
+ readonly transaction: IDBTransaction;
+ autoIncrement: boolean;
+ add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ clear(): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
+ delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ deleteIndex(indexName: string): void;
+ get(key: any): IDBRequest;
+ index(name: string): IDBIndex;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+}
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+interface IDBOpenDBRequest extends IDBRequest {
+ onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
+ onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+}
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+interface IDBRequest extends EventTarget {
+ readonly error: DOMError;
+ onerror: (this: IDBRequest, ev: Event) => any;
+ onsuccess: (this: IDBRequest, ev: Event) => any;
+ readonly readyState: IDBRequestReadyState;
+ readonly result: any;
+ source: IDBObjectStore | IDBIndex | IDBCursor;
+ readonly transaction: IDBTransaction;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+}
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ readonly db: IDBDatabase;
+ readonly error: DOMError;
+ readonly mode: IDBTransactionMode;
+ onabort: (this: IDBTransaction, ev: Event) => any;
+ oncomplete: (this: IDBTransaction, ev: Event) => any;
+ onerror: (this: IDBTransaction, ev: Event) => any;
+ abort(): void;
+ objectStore(name: string): IDBObjectStore;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+}
+
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(): IDBVersionChangeEvent;
+}
+
+interface ImageData {
+ data: Uint8ClampedArray;
+ readonly height: number;
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
+}
+
+interface MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+}
+
+interface MessageEvent extends Event {
+ readonly data: any;
+ readonly origin: string;
+ readonly ports: any;
+ readonly source: any;
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: any): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+}
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+}
+
+interface MessagePort extends EventTarget {
+ onmessage: (this: MessagePort, ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message?: any, transfer?: any[]): void;
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: (this: Notification, ev: Event) => any;
+ onclose: (this: Notification, ev: Event) => any;
+ onerror: (this: Notification, ev: Event) => any;
+ onshow: (this: Notification, ev: Event) => any;
+ readonly permission: NotificationPermission;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+}
+
+interface Performance {
+ readonly navigation: PerformanceNavigation;
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): any;
+ getEntriesByName(name: string, entryType?: string): any;
+ getEntriesByType(entryType: string): any;
+ getMarks(markName?: string): any;
+ getMeasures(measureName?: string): any;
+ mark(markName: string): void;
+ measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+}
+
+interface PerformanceNavigation {
+ readonly redirectCount: number;
+ readonly type: number;
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+interface PerformanceTiming {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly msFirstPaint: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ readonly secureConnectionStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+}
+
+interface Position {
+ readonly coords: Coordinates;
+ readonly timestamp: number;
+}
+
+declare var Position: {
+ prototype: Position;
+ new(): Position;
+}
+
+interface PositionError {
+ readonly code: number;
+ readonly message: string;
+ toString(): string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+declare var PositionError: {
+ prototype: PositionError;
+ new(): PositionError;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+interface ProgressEvent extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly total: number;
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+}
+
+interface PushManager {
+ getSubscription(): Promise<PushSubscription>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+}
+
+interface PushSubscription {
+ readonly endpoint: USVString;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): any;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+}
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+}
+
+interface ReadableStream {
+ readonly locked: boolean;
+ cancel(): Promise<void>;
+ getReader(): ReadableStreamReader;
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(): ReadableStream;
+}
+
+interface ReadableStreamReader {
+ cancel(): Promise<void>;
+ read(): Promise<any>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+}
+
+interface Request extends Object, Body {
+ readonly cache: RequestCache;
+ readonly credentials: RequestCredentials;
+ readonly destination: RequestDestination;
+ readonly headers: Headers;
+ readonly integrity: string;
+ readonly keepalive: boolean;
+ readonly method: string;
+ readonly mode: RequestMode;
+ readonly redirect: RequestRedirect;
+ readonly referrer: string;
+ readonly referrerPolicy: ReferrerPolicy;
+ readonly type: RequestType;
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: Request | string, init?: RequestInit): Request;
+}
+
+interface Response extends Object, Body {
+ readonly body: ReadableStream | null;
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: any, init?: ResponseInit): Response;
+}
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: (this: ServiceWorker, ev: Event) => any;
+ readonly scriptURL: USVString;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer?: any[]): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+}
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any;
+ readonly pushManager: PushManager;
+ readonly scope: USVString;
+ readonly sync: SyncManager;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): any;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+}
+
+interface SyncManager {
+ getTags(): any;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+}
+
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+ readonly searchParams: URLSearchParams;
+ toString(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string): URL;
+ createObjectURL(object: any, options?: ObjectURLOptions): string;
+ revokeObjectURL(url: string): void;
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: string;
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ onclose: (this: WebSocket, ev: CloseEvent) => any;
+ onerror: (this: WebSocket, ev: Event) => any;
+ onmessage: (this: WebSocket, ev: MessageEvent) => any;
+ onopen: (this: WebSocket, ev: Event) => any;
+ readonly protocol: string;
+ readonly readyState: number;
+ readonly url: string;
+ close(code?: number, reason?: string): void;
+ send(data: any): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+}
+
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: (this: Worker, ev: MessageEvent) => any;
+ postMessage(message: any, transfer?: any[]): void;
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string): Worker;
+}
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
+ onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
+ readonly readyState: number;
+ readonly response: any;
+ readonly responseText: string;
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly responseXML: any;
+ readonly status: number;
+ readonly statusText: string;
+ timeout: number;
+ readonly upload: XMLHttpRequestUpload;
+ withCredentials: boolean;
+ msCaching?: string;
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(header: string): string | null;
+ msCachingEnabled(): boolean;
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
+ overrideMimeType(mime: string): void;
+ send(data?: string): void;
+ send(data?: any): void;
+ setRequestHeader(header: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+}
+
+interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+}
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface Body {
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+}
+
+interface GlobalFetch {
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+}
+
+interface MSBaseReaderEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+}
+
+interface MSBaseReader {
+ onabort: (this: MSBaseReader, ev: Event) => any;
+ onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
+ onload: (this: MSBaseReader, ev: Event) => any;
+ onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
+ onloadstart: (this: MSBaseReader, ev: Event) => any;
+ onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
+ abort(): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface NavigatorBeacon {
+ sendBeacon(url: USVString, data?: BodyInit): boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface WindowBase64 {
+ atob(encodedString: string): string;
+ btoa(rawString: string): string;
+}
+
+interface WindowConsole {
+ readonly console: Console;
+}
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": Event;
+ "error": ErrorEvent;
+ "load": Event;
+ "loadend": ProgressEvent;
+ "loadstart": Event;
+ "progress": ProgressEvent;
+ "timeout": ProgressEvent;
+}
+
+interface XMLHttpRequestEventTarget {
+ onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
+ onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
+ onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface Client {
+ readonly frameType: FrameType;
+ readonly id: string;
+ readonly url: USVString;
+ postMessage(message: any, transfer?: any[]): void;
+}
+
+declare var Client: {
+ prototype: Client;
+ new(): Client;
+}
+
+interface Clients {
+ claim(): Promise<void>;
+ get(id: string): Promise<any>;
+ matchAll(options?: ClientQueryOptions): any;
+ openWindow(url: USVString): Promise<WindowClient>;
+}
+
+declare var Clients: {
+ prototype: Clients;
+ new(): Clients;
+}
+
+interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "message": MessageEvent;
+}
+
+interface DedicatedWorkerGlobalScope extends WorkerGlobalScope {
+ onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message: any, transfer?: any[]): void;
+ addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DedicatedWorkerGlobalScope: {
+ prototype: DedicatedWorkerGlobalScope;
+ new(): DedicatedWorkerGlobalScope;
+}
+
+interface ExtendableEvent extends Event {
+ waitUntil(f: Promise<any>): void;
+}
+
+declare var ExtendableEvent: {
+ prototype: ExtendableEvent;
+ new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
+}
+
+interface ExtendableMessageEvent extends ExtendableEvent {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: MessagePort[] | null;
+ readonly source: Client | ServiceWorker | MessagePort | null;
+}
+
+declare var ExtendableMessageEvent: {
+ prototype: ExtendableMessageEvent;
+ new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
+}
+
+interface FetchEvent extends ExtendableEvent {
+ readonly clientId: string | null;
+ readonly isReload: boolean;
+ readonly request: Request;
+ respondWith(r: Promise<Response>): void;
+}
+
+declare var FetchEvent: {
+ prototype: FetchEvent;
+ new(type: string, eventInitDict: FetchEventInit): FetchEvent;
+}
+
+interface FileReaderSync {
+ readAsArrayBuffer(blob: Blob): any;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): string;
+ readAsText(blob: Blob, encoding?: string): string;
+}
+
+declare var FileReaderSync: {
+ prototype: FileReaderSync;
+ new(): FileReaderSync;
+}
+
+interface NotificationEvent extends ExtendableEvent {
+ readonly action: string;
+ readonly notification: Notification;
+}
+
+declare var NotificationEvent: {
+ prototype: NotificationEvent;
+ new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
+}
+
+interface PushEvent extends ExtendableEvent {
+ readonly data: PushMessageData | null;
+}
+
+declare var PushEvent: {
+ prototype: PushEvent;
+ new(type: string, eventInitDict?: PushEventInit): PushEvent;
+}
+
+interface PushMessageData {
+ arrayBuffer(): ArrayBuffer;
+ blob(): Blob;
+ json(): JSON;
+ text(): USVString;
+}
+
+declare var PushMessageData: {
+ prototype: PushMessageData;
+ new(): PushMessageData;
+}
+
+interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "activate": ExtendableEvent;
+ "fetch": FetchEvent;
+ "install": ExtendableEvent;
+ "message": ExtendableMessageEvent;
+ "notificationclick": NotificationEvent;
+ "notificationclose": NotificationEvent;
+ "push": PushEvent;
+ "pushsubscriptionchange": ExtendableEvent;
+ "sync": SyncEvent;
+}
+
+interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
+ readonly clients: Clients;
+ onactivate: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
+ onfetch: (this: ServiceWorkerGlobalScope, ev: FetchEvent) => any;
+ oninstall: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
+ onmessage: (this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any;
+ onnotificationclick: (this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any;
+ onnotificationclose: (this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any;
+ onpush: (this: ServiceWorkerGlobalScope, ev: PushEvent) => any;
+ onpushsubscriptionchange: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
+ onsync: (this: ServiceWorkerGlobalScope, ev: SyncEvent) => any;
+ readonly registration: ServiceWorkerRegistration;
+ skipWaiting(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ServiceWorkerGlobalScope: {
+ prototype: ServiceWorkerGlobalScope;
+ new(): ServiceWorkerGlobalScope;
+}
+
+interface SyncEvent extends ExtendableEvent {
+ readonly lastChance: boolean;
+ readonly tag: string;
+}
+
+declare var SyncEvent: {
+ prototype: SyncEvent;
+ new(type: string, init: SyncEventInit): SyncEvent;
+}
+
+interface WindowClient extends Client {
+ readonly focused: boolean;
+ readonly visibilityState: VisibilityState;
+ focus(): Promise<WindowClient>;
+ navigate(url: USVString): Promise<WindowClient>;
+}
+
+declare var WindowClient: {
+ prototype: WindowClient;
+ new(): WindowClient;
+}
+
+interface WorkerGlobalScopeEventMap {
+ "error": ErrorEvent;
+}
+
+interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, GlobalFetch {
+ readonly caches: CacheStorage;
+ readonly isSecureContext: boolean;
+ readonly location: WorkerLocation;
+ onerror: (this: WorkerGlobalScope, ev: ErrorEvent) => any;
+ readonly performance: Performance;
+ readonly self: WorkerGlobalScope;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ createImageBitmap(image: ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WorkerGlobalScope: {
+ prototype: WorkerGlobalScope;
+ new(): WorkerGlobalScope;
+}
+
+interface WorkerLocation {
+ readonly hash: string;
+ readonly host: string;
+ readonly hostname: string;
+ readonly href: string;
+ readonly origin: string;
+ readonly pathname: string;
+ readonly port: string;
+ readonly protocol: string;
+ readonly search: string;
+ toString(): string;
+}
+
+declare var WorkerLocation: {
+ prototype: WorkerLocation;
+ new(): WorkerLocation;
+}
+
+interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+declare var WorkerNavigator: {
+ prototype: WorkerNavigator;
+ new(): WorkerNavigator;
+}
+
+interface WorkerUtils extends Object, WindowBase64 {
+ readonly indexedDB: IDBFactory;
+ readonly msIndexedDB: IDBFactory;
+ readonly navigator: WorkerNavigator;
+ clearImmediate(handle: number): void;
+ clearInterval(handle: number): void;
+ clearTimeout(handle: number): void;
+ importScripts(...urls: string[]): void;
+ setImmediate(handler: (...args: any[]) => void): number;
+ setImmediate(handler: any, ...args: any[]): number;
+ setInterval(handler: (...args: any[]) => void, timeout: number): number;
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+}
+
+interface ErrorEventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ conlno?: number;
+ error?: any;
+}
+
+interface ImageBitmapOptions {
+ imageOrientation?: "none" | "flipY";
+ premultiplyAlpha?: "none" | "premultiply" | "default";
+ colorSpaceConversion?: "none" | "default";
+ resizeWidth?: number;
+ resizeHeight?: number;
+ resizeQuality?: "pixelated" | "low" | "medium" | "high";
+}
+
+interface ImageBitmap {
+ readonly width: number;
+ readonly height: number;
+ close(): void;
+}
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ /**
+ * Constructor returning a URLSearchParams object.
+ */
+ new (init?: string | URLSearchParams): URLSearchParams;
+}
+
+interface BlobPropertyBag {
+ type?: string;
+ endings?: string;
+}
+
+interface FilePropertyBag {
+ type?: string;
+ lastModified?: number;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaHashedImportParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaPssParams {
+ saltLength: number;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: string;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ typedCurve: string;
+}
+
+interface EcKeyImportParams {
+ namedCurve: string;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ iv: BufferSource;
+ additionalData?: BufferSource;
+ tagLength?: number;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: AlgorithmIdentifier;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhImportKeyParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface ConcatParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ algorithmId: Uint8Array;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ publicInfo?: Uint8Array;
+ privateInfo?: Uint8Array;
+}
+
+interface HkdfCtrParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ label: BufferSource;
+ context: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ salt: BufferSource;
+ iterations: number;
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaOtherPrimesInfo {
+ r: string;
+ d: string;
+ t: string;
+}
+
+interface JsonWebKey {
+ kty: string;
+ use?: string;
+ key_ops?: string[];
+ alg?: string;
+ kid?: string;
+ x5u?: string;
+ x5c?: string;
+ x5t?: string;
+ ext?: boolean;
+ crv?: string;
+ x?: string;
+ y?: string;
+ d?: string;
+ n?: string;
+ e?: string;
+ p?: string;
+ q?: string;
+ dp?: string;
+ dq?: string;
+ qi?: string;
+ oth?: RsaOtherPrimesInfo[];
+ k?: string;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ passive?: boolean;
+ once?: boolean;
+}
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
+}
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+declare var onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
+declare function close(): void;
+declare function postMessage(message: any, transfer?: any[]): void;
+declare var caches: CacheStorage;
+declare var isSecureContext: boolean;
+declare var location: WorkerLocation;
+declare var onerror: (this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any;
+declare var performance: Performance;
+declare var self: WorkerGlobalScope;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function createImageBitmap(image: ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+declare var indexedDB: IDBFactory;
+declare var msIndexedDB: IDBFactory;
+declare var navigator: WorkerNavigator;
+declare function clearImmediate(handle: number): void;
+declare function clearInterval(handle: number): void;
+declare function clearTimeout(handle: number): void;
+declare function importScripts(...urls: string[]): void;
+declare function setImmediate(handler: (...args: any[]) => void): number;
+declare function setImmediate(handler: any, ...args: any[]): number;
+declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
+declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
+declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+declare function atob(encodedString: string): string;
+declare function btoa(rawString: string): string;
+declare var console: Console;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+type AlgorithmIdentifier = string | Algorithm;
+type BodyInit = any;
+type IDBKeyPath = string;
+type RequestInfo = Request | string;
+type USVString = string;
+type IDBValidKey = number | string | Date | IDBArrayKey;
+type BufferSource = ArrayBuffer | ArrayBufferView;
+type FormDataEntryValue = string | File;
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "pending" | "done";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type PushEncryptionKeyName = "p256dh" | "auth";
+type PushPermissionState = "granted" | "denied" | "prompt";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache";
+type RequestCredentials = "omit" | "same-origin" | "include";
+type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker";
+type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
+type RequestRedirect = "follow" | "error" | "manual";
+type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
+type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
+type ClientType = "window" | "worker" | "sharedworker" | "all";
+type FrameType = "auxiliary" | "top-level" | "nested" | "none"; \ No newline at end of file
diff --git a/node_modules/typescript/lib/protocol.d.ts b/node_modules/typescript/lib/protocol.d.ts
index c2577c247..0afebe0bc 100644
--- a/node_modules/typescript/lib/protocol.d.ts
+++ b/node_modules/typescript/lib/protocol.d.ts
@@ -1,6 +1,6 @@
/**
- * Declaration module describing the TypeScript Server protocol
- */
+ * Declaration module describing the TypeScript Server protocol
+ */
declare namespace ts.server.protocol {
namespace CommandTypes {
type Brace = "brace";
@@ -49,82 +49,82 @@ declare namespace ts.server.protocol {
type GetSupportedCodeFixes = "getSupportedCodeFixes";
}
/**
- * A TypeScript Server message
- */
+ * A TypeScript Server message
+ */
interface Message {
/**
- * Sequence number of the message
- */
+ * Sequence number of the message
+ */
seq: number;
/**
- * One of "request", "response", or "event"
- */
+ * One of "request", "response", or "event"
+ */
type: "request" | "response" | "event";
}
/**
- * Client-initiated request message
- */
+ * Client-initiated request message
+ */
interface Request extends Message {
/**
- * The command to execute
- */
+ * The command to execute
+ */
command: string;
/**
- * Object containing arguments for the command
- */
+ * Object containing arguments for the command
+ */
arguments?: any;
}
/**
- * Request to reload the project structure for all the opened files
- */
+ * Request to reload the project structure for all the opened files
+ */
interface ReloadProjectsRequest extends Message {
command: CommandTypes.ReloadProjects;
}
/**
- * Server-initiated event message
- */
+ * Server-initiated event message
+ */
interface Event extends Message {
/**
- * Name of event
- */
+ * Name of event
+ */
event: string;
/**
- * Event-specific information
- */
+ * Event-specific information
+ */
body?: any;
}
/**
- * Response by server to client request message.
- */
+ * Response by server to client request message.
+ */
interface Response extends Message {
/**
- * Sequence number of the request message.
- */
+ * Sequence number of the request message.
+ */
request_seq: number;
/**
- * Outcome of the request.
- */
+ * Outcome of the request.
+ */
success: boolean;
/**
- * The command requested.
- */
+ * The command requested.
+ */
command: string;
/**
- * Contains error message if success === false.
- */
+ * Contains error message if success === false.
+ */
message?: string;
/**
- * Contains message body if success === true.
- */
+ * Contains message body if success === true.
+ */
body?: any;
}
/**
- * Arguments for FileRequest messages.
- */
+ * Arguments for FileRequest messages.
+ */
interface FileRequestArgs {
/**
- * The file for the request (absolute pathname required).
- */
+ * The file for the request (absolute pathname required).
+ */
file: string;
projectFileName?: string;
}
@@ -199,17 +199,17 @@ declare namespace ts.server.protocol {
options?: EditorSettings;
}
/**
- * Arguments for ProjectInfoRequest request.
- */
+ * Arguments for ProjectInfoRequest request.
+ */
interface ProjectInfoRequestArgs extends FileRequestArgs {
/**
- * Indicate if the file name list of the project is needed
- */
+ * Indicate if the file name list of the project is needed
+ */
needFileNameList: boolean;
}
/**
- * A request to get the project information of the current file.
- */
+ * A request to get the project information of the current file.
+ */
interface ProjectInfoRequest extends Request {
command: CommandTypes.ProjectInfo;
arguments: ProjectInfoRequestArgs;
@@ -230,21 +230,21 @@ declare namespace ts.server.protocol {
projectFileName: string;
}
/**
- * Response message body for "projectInfo" request
- */
+ * Response message body for "projectInfo" request
+ */
interface ProjectInfo {
/**
- * For configured project, this is the normalized path of the 'tsconfig.json' file
- * For inferred project, this is undefined
- */
+ * For configured project, this is the normalized path of the 'tsconfig.json' file
+ * For inferred project, this is undefined
+ */
configFileName: string;
/**
- * The list of normalized file name in the project, including 'lib.d.ts'
- */
+ * The list of normalized file name in the project, including 'lib.d.ts'
+ */
fileNames?: string[];
/**
- * Indicates if the project has a active language service instance
- */
+ * Indicates if the project has a active language service instance
+ */
languageServiceDisabled?: boolean;
}
/**
@@ -262,61 +262,61 @@ declare namespace ts.server.protocol {
code: number;
}
/**
- * Response message for "projectInfo" request
- */
+ * Response message for "projectInfo" request
+ */
interface ProjectInfoResponse extends Response {
body?: ProjectInfo;
}
/**
- * Request whose sole parameter is a file name.
- */
+ * Request whose sole parameter is a file name.
+ */
interface FileRequest extends Request {
arguments: FileRequestArgs;
}
/**
- * Instances of this interface specify a location in a source file:
- * (file, line, character offset), where line and character offset are 1-based.
- */
+ * Instances of this interface specify a location in a source file:
+ * (file, line, character offset), where line and character offset are 1-based.
+ */
interface FileLocationRequestArgs extends FileRequestArgs {
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
line: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
offset: number;
}
/**
- * Request for the available codefixes at a specific position.
- */
+ * Request for the available codefixes at a specific position.
+ */
interface CodeFixRequest extends Request {
command: CommandTypes.GetCodeFixes;
arguments: CodeFixRequestArgs;
}
/**
- * Instances of this interface specify errorcodes on a specific location in a sourcefile.
- */
+ * Instances of this interface specify errorcodes on a specific location in a sourcefile.
+ */
interface CodeFixRequestArgs extends FileRequestArgs {
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
startLine: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
startOffset: number;
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
endLine: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
endOffset: number;
/**
- * Errorcodes we want to get the fixes for.
- */
+ * Errorcodes we want to get the fixes for.
+ */
errorCodes?: number[];
}
/**
@@ -326,8 +326,8 @@ declare namespace ts.server.protocol {
body?: CodeAction[];
}
/**
- * A request whose arguments specify a file location (file, line, col).
- */
+ * A request whose arguments specify a file location (file, line, col).
+ */
interface FileLocationRequest extends FileRequest {
arguments: FileLocationRequestArgs;
}
@@ -360,9 +360,9 @@ declare namespace ts.server.protocol {
length: number;
}
/**
- * Arguments in document highlight request; include: filesToSearch, file,
- * line, offset.
- */
+ * Arguments in document highlight request; include: filesToSearch, file,
+ * line, offset.
+ */
interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
/**
* List of files to search for document highlights.
@@ -370,73 +370,73 @@ declare namespace ts.server.protocol {
filesToSearch: string[];
}
/**
- * Go to definition request; value of command field is
- * "definition". Return response giving the file locations that
- * define the symbol found in file at location line, col.
- */
+ * Go to definition request; value of command field is
+ * "definition". Return response giving the file locations that
+ * define the symbol found in file at location line, col.
+ */
interface DefinitionRequest extends FileLocationRequest {
command: CommandTypes.Definition;
}
/**
- * Go to type request; value of command field is
- * "typeDefinition". Return response giving the file locations that
- * define the type for the symbol found in file at location line, col.
- */
+ * Go to type request; value of command field is
+ * "typeDefinition". Return response giving the file locations that
+ * define the type for the symbol found in file at location line, col.
+ */
interface TypeDefinitionRequest extends FileLocationRequest {
command: CommandTypes.TypeDefinition;
}
/**
- * Go to implementation request; value of command field is
- * "implementation". Return response giving the file locations that
- * implement the symbol found in file at location line, col.
- */
+ * Go to implementation request; value of command field is
+ * "implementation". Return response giving the file locations that
+ * implement the symbol found in file at location line, col.
+ */
interface ImplementationRequest extends FileLocationRequest {
command: CommandTypes.Implementation;
}
/**
- * Location in source code expressed as (one-based) line and character offset.
- */
+ * Location in source code expressed as (one-based) line and character offset.
+ */
interface Location {
line: number;
offset: number;
}
/**
- * Object found in response messages defining a span of text in source code.
- */
+ * Object found in response messages defining a span of text in source code.
+ */
interface TextSpan {
/**
- * First character of the definition.
- */
+ * First character of the definition.
+ */
start: Location;
/**
- * One character past last character of the definition.
- */
+ * One character past last character of the definition.
+ */
end: Location;
}
/**
- * Object found in response messages defining a span of text in a specific source file.
- */
+ * Object found in response messages defining a span of text in a specific source file.
+ */
interface FileSpan extends TextSpan {
/**
- * File containing text span.
- */
+ * File containing text span.
+ */
file: string;
}
/**
- * Definition response message. Gives text range for definition.
- */
+ * Definition response message. Gives text range for definition.
+ */
interface DefinitionResponse extends Response {
body?: FileSpan[];
}
/**
- * Definition response message. Gives text range for definition.
- */
+ * Definition response message. Gives text range for definition.
+ */
interface TypeDefinitionResponse extends Response {
body?: FileSpan[];
}
/**
- * Implementation response message. Gives text range for implementations.
- */
+ * Implementation response message. Gives text range for implementations.
+ */
interface ImplementationResponse extends Response {
body?: FileSpan[];
}
@@ -457,27 +457,31 @@ declare namespace ts.server.protocol {
openingBrace: string;
}
/**
- * Get occurrences request; value of command field is
- * "occurrences". Return response giving spans that are relevant
- * in the file at a given line and column.
- */
+ * Get occurrences request; value of command field is
+ * "occurrences". Return response giving spans that are relevant
+ * in the file at a given line and column.
+ */
interface OccurrencesRequest extends FileLocationRequest {
command: CommandTypes.Occurrences;
}
interface OccurrencesResponseItem extends FileSpan {
/**
- * True if the occurrence is a write location, false otherwise.
- */
+ * True if the occurrence is a write location, false otherwise.
+ */
isWriteAccess: boolean;
+ /**
+ * True if the occurrence is in a string, undefined otherwise;
+ */
+ isInString?: true;
}
interface OccurrencesResponse extends Response {
body?: OccurrencesResponseItem[];
}
/**
- * Get document highlights request; value of command field is
- * "documentHighlights". Return response giving spans that are relevant
- * in the file at a given line and column.
- */
+ * Get document highlights request; value of command field is
+ * "documentHighlights". Return response giving spans that are relevant
+ * in the file at a given line and column.
+ */
interface DocumentHighlightsRequest extends FileLocationRequest {
command: CommandTypes.DocumentHighlights;
arguments: DocumentHighlightsRequestArgs;
@@ -494,12 +498,12 @@ declare namespace ts.server.protocol {
*/
interface DocumentHighlightsItem {
/**
- * File containing highlight spans.
- */
+ * File containing highlight spans.
+ */
file: string;
/**
- * Spans to highlight in file.
- */
+ * Spans to highlight in file.
+ */
highlightSpans: HighlightSpan[];
}
/**
@@ -509,23 +513,23 @@ declare namespace ts.server.protocol {
body?: DocumentHighlightsItem[];
}
/**
- * Find references request; value of command field is
- * "references". Return response giving the file locations that
- * reference the symbol found in file at location line, col.
- */
+ * Find references request; value of command field is
+ * "references". Return response giving the file locations that
+ * reference the symbol found in file at location line, col.
+ */
interface ReferencesRequest extends FileLocationRequest {
command: CommandTypes.References;
}
interface ReferencesResponseItem extends FileSpan {
/** Text of line containing the reference. Including this
- * with the response avoids latency of editor loading files
- * to show text of reference line (the server already has
- * loaded the referencing files).
- */
+ * with the response avoids latency of editor loading files
+ * to show text of reference line (the server already has
+ * loaded the referencing files).
+ */
lineText: string;
/**
- * True if reference is a write location, false otherwise.
- */
+ * True if reference is a write location, false otherwise.
+ */
isWriteAccess: boolean;
/**
* True if reference is a definition, false otherwise.
@@ -533,29 +537,29 @@ declare namespace ts.server.protocol {
isDefinition: boolean;
}
/**
- * The body of a "references" response message.
- */
+ * The body of a "references" response message.
+ */
interface ReferencesResponseBody {
/**
- * The file locations referencing the symbol.
- */
+ * The file locations referencing the symbol.
+ */
refs: ReferencesResponseItem[];
/**
- * The name of the symbol.
- */
+ * The name of the symbol.
+ */
symbolName: string;
/**
- * The start character offset of the symbol (on the line provided by the references request).
- */
+ * The start character offset of the symbol (on the line provided by the references request).
+ */
symbolStartOffset: number;
/**
- * The full display name of the symbol.
- */
+ * The full display name of the symbol.
+ */
symbolDisplayString: string;
}
/**
- * Response to "references" request.
- */
+ * Response to "references" request.
+ */
interface ReferencesResponse extends Response {
body?: ReferencesResponseBody;
}
@@ -573,42 +577,42 @@ declare namespace ts.server.protocol {
findInStrings?: boolean;
}
/**
- * Rename request; value of command field is "rename". Return
- * response giving the file locations that reference the symbol
- * found in file at location line, col. Also return full display
- * name of the symbol so that client can print it unambiguously.
- */
+ * Rename request; value of command field is "rename". Return
+ * response giving the file locations that reference the symbol
+ * found in file at location line, col. Also return full display
+ * name of the symbol so that client can print it unambiguously.
+ */
interface RenameRequest extends FileLocationRequest {
command: CommandTypes.Rename;
arguments: RenameRequestArgs;
}
/**
- * Information about the item to be renamed.
- */
+ * Information about the item to be renamed.
+ */
interface RenameInfo {
/**
- * True if item can be renamed.
- */
+ * True if item can be renamed.
+ */
canRename: boolean;
/**
- * Error message if item can not be renamed.
- */
+ * Error message if item can not be renamed.
+ */
localizedErrorMessage?: string;
/**
- * Display name of the item to be renamed.
- */
+ * Display name of the item to be renamed.
+ */
displayName: string;
/**
- * Full display name of item to be renamed.
- */
+ * Full display name of item to be renamed.
+ */
fullDisplayName: string;
/**
- * The items's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The items's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
}
/**
@@ -631,8 +635,8 @@ declare namespace ts.server.protocol {
locs: SpanGroup[];
}
/**
- * Rename response message.
- */
+ * Rename response message.
+ */
interface RenameResponse extends Response {
body?: RenameResponseBody;
}
@@ -640,7 +644,7 @@ declare namespace ts.server.protocol {
* Represents a file in external project.
* External project is project whose set of files, compilation options and open\close state
* is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio).
- * External project will exist even if all files in it are closed and should be closed explicity.
+ * External project will exist even if all files in it are closed and should be closed explicitly.
* If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will
* create configured project for every config file but will maintain a link that these projects were created
* as a result of opening external project so they should be removed once external project is closed.
@@ -711,42 +715,50 @@ declare namespace ts.server.protocol {
* List of removed files
*/
removed: string[];
+ /**
+ * List of updated files
+ */
+ updated: string[];
}
/**
- * Information found in a configure request.
- */
+ * Information found in a configure request.
+ */
interface ConfigureRequestArguments {
/**
- * Information about the host, for example 'Emacs 24.4' or
- * 'Sublime Text version 3075'
- */
+ * Information about the host, for example 'Emacs 24.4' or
+ * 'Sublime Text version 3075'
+ */
hostInfo?: string;
/**
- * If present, tab settings apply only to this file.
- */
+ * If present, tab settings apply only to this file.
+ */
file?: string;
/**
* The format options to use during formatting and other code editing features.
*/
formatOptions?: FormatCodeSettings;
+ /**
+ * The host's additional supported .js file extensions
+ */
+ extraFileExtensions?: JsFileExtensionInfo[];
}
/**
- * Configure request; value of command field is "configure". Specifies
- * host information, such as host type, tab size, and indent size.
- */
+ * Configure request; value of command field is "configure". Specifies
+ * host information, such as host type, tab size, and indent size.
+ */
interface ConfigureRequest extends Request {
command: CommandTypes.Configure;
arguments: ConfigureRequestArguments;
}
/**
- * Response to "configure" request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to "configure" request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface ConfigureResponse extends Response {
}
/**
- * Information found in an "open" request.
- */
+ * Information found in an "open" request.
+ */
interface OpenRequestArgs extends FileRequestArgs {
/**
* Used when a version of the file content is known to be more up to date than the one on disk.
@@ -761,13 +773,13 @@ declare namespace ts.server.protocol {
}
type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
/**
- * Open request; value of command field is "open". Notify the
- * server that the client has file open. The server will not
- * monitor the filesystem for changes in this file and will assume
- * that the client is updating the server (using the change and/or
- * reload messages) when the file changes. Server does not currently
- * send a response to an open request.
- */
+ * Open request; value of command field is "open". Notify the
+ * server that the client has file open. The server will not
+ * monitor the filesystem for changes in this file and will assume
+ * that the client is updating the server (using the change and/or
+ * reload messages) when the file changes. Server does not currently
+ * send a response to an open request.
+ */
interface OpenRequest extends Request {
command: CommandTypes.Open;
arguments: OpenRequestArgs;
@@ -856,25 +868,25 @@ declare namespace ts.server.protocol {
options: ExternalProjectCompilerOptions;
}
/**
- * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface SetCompilerOptionsForInferredProjectsResponse extends Response {
}
/**
- * Exit request; value of command field is "exit". Ask the server process
- * to exit.
- */
+ * Exit request; value of command field is "exit". Ask the server process
+ * to exit.
+ */
interface ExitRequest extends Request {
command: CommandTypes.Exit;
}
/**
- * Close request; value of command field is "close". Notify the
- * server that the client has closed a previously open file. If
- * file is still referenced by open files, the server will resume
- * monitoring the filesystem for changes to file. Server does not
- * currently send a response to a close request.
- */
+ * Close request; value of command field is "close". Notify the
+ * server that the client has closed a previously open file. If
+ * file is still referenced by open files, the server will resume
+ * monitoring the filesystem for changes to file. Server does not
+ * currently send a response to a close request.
+ */
interface CloseRequest extends FileRequest {
command: CommandTypes.Close;
}
@@ -897,6 +909,10 @@ declare namespace ts.server.protocol {
* List of files names that should be recompiled
*/
fileNames: string[];
+ /**
+ * true if project uses outFile or out compiler option
+ */
+ projectUsesOutFile: boolean;
}
/**
* Response for CompileOnSaveAffectedFileListRequest request;
@@ -921,60 +937,64 @@ declare namespace ts.server.protocol {
forced?: boolean;
}
/**
- * Quickinfo request; value of command field is
- * "quickinfo". Return response giving a quick type and
- * documentation string for the symbol found in file at location
- * line, col.
- */
+ * Quickinfo request; value of command field is
+ * "quickinfo". Return response giving a quick type and
+ * documentation string for the symbol found in file at location
+ * line, col.
+ */
interface QuickInfoRequest extends FileLocationRequest {
command: CommandTypes.Quickinfo;
}
/**
- * Body of QuickInfoResponse.
- */
+ * Body of QuickInfoResponse.
+ */
interface QuickInfoResponseBody {
/**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
- * Starting file location of symbol.
- */
+ * Starting file location of symbol.
+ */
start: Location;
/**
- * One past last character of symbol.
- */
+ * One past last character of symbol.
+ */
end: Location;
/**
- * Type and kind of symbol.
- */
+ * Type and kind of symbol.
+ */
displayString: string;
/**
- * Documentation associated with symbol.
- */
+ * Documentation associated with symbol.
+ */
documentation: string;
+ /**
+ * JSDoc tags associated with symbol.
+ */
+ tags: JSDocTagInfo[];
}
/**
- * Quickinfo response message.
- */
+ * Quickinfo response message.
+ */
interface QuickInfoResponse extends Response {
body?: QuickInfoResponseBody;
}
/**
- * Arguments for format messages.
- */
+ * Arguments for format messages.
+ */
interface FormatRequestArgs extends FileLocationRequestArgs {
/**
- * Last line of range for which to format text in file.
- */
+ * Last line of range for which to format text in file.
+ */
endLine: number;
/**
- * Character offset on last line of range for which to format text in file.
- */
+ * Character offset on last line of range for which to format text in file.
+ */
endOffset: number;
/**
* Format options to be used.
@@ -982,36 +1002,36 @@ declare namespace ts.server.protocol {
options?: FormatCodeSettings;
}
/**
- * Format request; value of command field is "format". Return
- * response giving zero or more edit instructions. The edit
- * instructions will be sorted in file order. Applying the edit
- * instructions in reverse to file will result in correctly
- * reformatted text.
- */
+ * Format request; value of command field is "format". Return
+ * response giving zero or more edit instructions. The edit
+ * instructions will be sorted in file order. Applying the edit
+ * instructions in reverse to file will result in correctly
+ * reformatted text.
+ */
interface FormatRequest extends FileLocationRequest {
command: CommandTypes.Format;
arguments: FormatRequestArgs;
}
/**
- * Object found in response messages defining an editing
- * instruction for a span of text in source code. The effect of
- * this instruction is to replace the text starting at start and
- * ending one character before end with newText. For an insertion,
- * the text span is empty. For a deletion, newText is empty.
- */
+ * Object found in response messages defining an editing
+ * instruction for a span of text in source code. The effect of
+ * this instruction is to replace the text starting at start and
+ * ending one character before end with newText. For an insertion,
+ * the text span is empty. For a deletion, newText is empty.
+ */
interface CodeEdit {
/**
- * First character of the text span to edit.
- */
+ * First character of the text span to edit.
+ */
start: Location;
/**
- * One character past last character of the text span to edit.
- */
+ * One character past last character of the text span to edit.
+ */
end: Location;
/**
- * Replace the span defined above with this string (may be
- * the empty string).
- */
+ * Replace the span defined above with this string (may be
+ * the empty string).
+ */
newText: string;
}
interface FileCodeEdits {
@@ -1029,99 +1049,99 @@ declare namespace ts.server.protocol {
changes: FileCodeEdits[];
}
/**
- * Format and format on key response message.
- */
+ * Format and format on key response message.
+ */
interface FormatResponse extends Response {
body?: CodeEdit[];
}
/**
- * Arguments for format on key messages.
- */
+ * Arguments for format on key messages.
+ */
interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
/**
- * Key pressed (';', '\n', or '}').
- */
+ * Key pressed (';', '\n', or '}').
+ */
key: string;
options?: FormatCodeSettings;
}
/**
- * Format on key request; value of command field is
- * "formatonkey". Given file location and key typed (as string),
- * return response giving zero or more edit instructions. The
- * edit instructions will be sorted in file order. Applying the
- * edit instructions in reverse to file will result in correctly
- * reformatted text.
- */
+ * Format on key request; value of command field is
+ * "formatonkey". Given file location and key typed (as string),
+ * return response giving zero or more edit instructions. The
+ * edit instructions will be sorted in file order. Applying the
+ * edit instructions in reverse to file will result in correctly
+ * reformatted text.
+ */
interface FormatOnKeyRequest extends FileLocationRequest {
command: CommandTypes.Formatonkey;
arguments: FormatOnKeyRequestArgs;
}
/**
- * Arguments for completions messages.
- */
+ * Arguments for completions messages.
+ */
interface CompletionsRequestArgs extends FileLocationRequestArgs {
/**
- * Optional prefix to apply to possible completions.
- */
+ * Optional prefix to apply to possible completions.
+ */
prefix?: string;
}
/**
- * Completions request; value of command field is "completions".
- * Given a file location (file, line, col) and a prefix (which may
- * be the empty string), return the possible completions that
- * begin with prefix.
- */
+ * Completions request; value of command field is "completions".
+ * Given a file location (file, line, col) and a prefix (which may
+ * be the empty string), return the possible completions that
+ * begin with prefix.
+ */
interface CompletionsRequest extends FileLocationRequest {
command: CommandTypes.Completions;
arguments: CompletionsRequestArgs;
}
/**
- * Arguments for completion details request.
- */
+ * Arguments for completion details request.
+ */
interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
/**
- * Names of one or more entries for which to obtain details.
- */
+ * Names of one or more entries for which to obtain details.
+ */
entryNames: string[];
}
/**
- * Completion entry details request; value of command field is
- * "completionEntryDetails". Given a file location (file, line,
- * col) and an array of completion entry names return more
- * detailed information for each completion entry.
- */
+ * Completion entry details request; value of command field is
+ * "completionEntryDetails". Given a file location (file, line,
+ * col) and an array of completion entry names return more
+ * detailed information for each completion entry.
+ */
interface CompletionDetailsRequest extends FileLocationRequest {
command: CommandTypes.CompletionDetails;
arguments: CompletionDetailsRequestArgs;
}
/**
- * Part of a symbol description.
- */
+ * Part of a symbol description.
+ */
interface SymbolDisplayPart {
/**
- * Text of an item describing the symbol.
- */
+ * Text of an item describing the symbol.
+ */
text: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
}
/**
- * An item found in a completion response.
- */
+ * An item found in a completion response.
+ */
interface CompletionEntry {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
* A string that is used for comparing completion items so that they can be ordered. This
@@ -1135,29 +1155,33 @@ declare namespace ts.server.protocol {
replacementSpan?: TextSpan;
}
/**
- * Additional completion entry details, available on demand
- */
+ * Additional completion entry details, available on demand
+ */
interface CompletionEntryDetails {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
- * Display parts of the symbol (similar to quick info).
- */
+ * Display parts of the symbol (similar to quick info).
+ */
displayParts: SymbolDisplayPart[];
/**
- * Documentation strings for the symbol.
- */
+ * Documentation strings for the symbol.
+ */
documentation: SymbolDisplayPart[];
+ /**
+ * JSDoc tags for the symbol.
+ */
+ tags: JSDocTagInfo[];
}
interface CompletionsResponse extends Response {
body?: CompletionEntry[];
@@ -1174,12 +1198,12 @@ declare namespace ts.server.protocol {
*/
name: string;
/**
- * Documentation of the parameter.
- */
+ * Documentation of the parameter.
+ */
documentation: SymbolDisplayPart[];
/**
- * Display parts of the parameter.
- */
+ * Display parts of the parameter.
+ */
displayParts: SymbolDisplayPart[];
/**
* Whether the parameter is optional or not.
@@ -1214,6 +1238,10 @@ declare namespace ts.server.protocol {
* The signature's documentation
*/
documentation: SymbolDisplayPart[];
+ /**
+ * The signature's JSDoc tags
+ */
+ tags: JSDocTagInfo[];
}
/**
* Signature help items found in the response of a signature help request.
@@ -1246,10 +1274,10 @@ declare namespace ts.server.protocol {
interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
}
/**
- * Signature help request; value of command field is "signatureHelp".
- * Given a file location (file, line, col), return the signature
- * help.
- */
+ * Signature help request; value of command field is "signatureHelp".
+ * Given a file location (file, line, col), return the signature
+ * help.
+ */
interface SignatureHelpRequest extends FileLocationRequest {
command: CommandTypes.SignatureHelp;
arguments: SignatureHelpRequestArgs;
@@ -1261,8 +1289,8 @@ declare namespace ts.server.protocol {
body?: SignatureHelpItems;
}
/**
- * Synchronous request for semantic diagnostics of one file.
- */
+ * Synchronous request for semantic diagnostics of one file.
+ */
interface SemanticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SemanticDiagnosticsSync;
arguments: SemanticDiagnosticsSyncRequestArgs;
@@ -1271,14 +1299,14 @@ declare namespace ts.server.protocol {
includeLinePosition?: boolean;
}
/**
- * Response object for synchronous sematic diagnostics request.
- */
+ * Response object for synchronous sematic diagnostics request.
+ */
interface SemanticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
/**
- * Synchronous request for syntactic diagnostics of one file.
- */
+ * Synchronous request for syntactic diagnostics of one file.
+ */
interface SyntacticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SyntacticDiagnosticsSync;
arguments: SyntacticDiagnosticsSyncRequestArgs;
@@ -1287,98 +1315,109 @@ declare namespace ts.server.protocol {
includeLinePosition?: boolean;
}
/**
- * Response object for synchronous syntactic diagnostics request.
- */
+ * Response object for synchronous syntactic diagnostics request.
+ */
interface SyntacticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
/**
- * Arguments for GeterrForProject request.
- */
+ * Arguments for GeterrForProject request.
+ */
interface GeterrForProjectRequestArgs {
/**
- * the file requesting project error list
- */
+ * the file requesting project error list
+ */
file: string;
/**
- * Delay in milliseconds to wait before starting to compute
- * errors for the files in the file list
- */
+ * Delay in milliseconds to wait before starting to compute
+ * errors for the files in the file list
+ */
delay: number;
}
/**
- * GeterrForProjectRequest request; value of command field is
- * "geterrForProject". It works similarly with 'Geterr', only
- * it request for every file in this project.
- */
+ * GeterrForProjectRequest request; value of command field is
+ * "geterrForProject". It works similarly with 'Geterr', only
+ * it request for every file in this project.
+ */
interface GeterrForProjectRequest extends Request {
command: CommandTypes.GeterrForProject;
arguments: GeterrForProjectRequestArgs;
}
/**
- * Arguments for geterr messages.
- */
+ * Arguments for geterr messages.
+ */
interface GeterrRequestArgs {
/**
- * List of file names for which to compute compiler errors.
- * The files will be checked in list order.
- */
+ * List of file names for which to compute compiler errors.
+ * The files will be checked in list order.
+ */
files: string[];
/**
- * Delay in milliseconds to wait before starting to compute
- * errors for the files in the file list
- */
+ * Delay in milliseconds to wait before starting to compute
+ * errors for the files in the file list
+ */
delay: number;
}
/**
- * Geterr request; value of command field is "geterr". Wait for
- * delay milliseconds and then, if during the wait no change or
- * reload messages have arrived for the first file in the files
- * list, get the syntactic errors for the file, field requests,
- * and then get the semantic errors for the file. Repeat with a
- * smaller delay for each subsequent file on the files list. Best
- * practice for an editor is to send a file list containing each
- * file that is currently visible, in most-recently-used order.
- */
+ * Geterr request; value of command field is "geterr". Wait for
+ * delay milliseconds and then, if during the wait no change or
+ * reload messages have arrived for the first file in the files
+ * list, get the syntactic errors for the file, field requests,
+ * and then get the semantic errors for the file. Repeat with a
+ * smaller delay for each subsequent file on the files list. Best
+ * practice for an editor is to send a file list containing each
+ * file that is currently visible, in most-recently-used order.
+ */
interface GeterrRequest extends Request {
command: CommandTypes.Geterr;
arguments: GeterrRequestArgs;
}
+ type RequestCompletedEventName = "requestCompleted";
+ /**
+ * Event that is sent when server have finished processing request with specified id.
+ */
+ interface RequestCompletedEvent extends Event {
+ event: RequestCompletedEventName;
+ body: RequestCompletedEventBody;
+ }
+ interface RequestCompletedEventBody {
+ request_seq: number;
+ }
/**
- * Item of diagnostic information found in a DiagnosticEvent message.
- */
+ * Item of diagnostic information found in a DiagnosticEvent message.
+ */
interface Diagnostic {
/**
- * Starting file location at which text applies.
- */
+ * Starting file location at which text applies.
+ */
start: Location;
/**
- * The last file location at which the text applies.
- */
+ * The last file location at which the text applies.
+ */
end: Location;
/**
- * Text of diagnostic message.
- */
+ * Text of diagnostic message.
+ */
text: string;
/**
- * The error code of the diagnostic message.
- */
+ * The error code of the diagnostic message.
+ */
code?: number;
}
interface DiagnosticEventBody {
/**
- * The file for which diagnostic information is reported.
- */
+ * The file for which diagnostic information is reported.
+ */
file: string;
/**
- * An array of diagnostic information items.
- */
+ * An array of diagnostic information items.
+ */
diagnostics: Diagnostic[];
}
/**
- * Event message for "syntaxDiag" and "semanticDiag" event types.
- * These events provide syntactic and semantic errors for a file.
- */
+ * Event message for "syntaxDiag" and "semanticDiag" event types.
+ * These events provide syntactic and semantic errors for a file.
+ */
interface DiagnosticEvent extends Event {
body?: DiagnosticEventBody;
}
@@ -1424,172 +1463,172 @@ declare namespace ts.server.protocol {
languageServiceEnabled: boolean;
}
/**
- * Arguments for reload request.
- */
+ * Arguments for reload request.
+ */
interface ReloadRequestArgs extends FileRequestArgs {
/**
- * Name of temporary file from which to reload file
- * contents. May be same as file.
- */
+ * Name of temporary file from which to reload file
+ * contents. May be same as file.
+ */
tmpfile: string;
}
/**
- * Reload request message; value of command field is "reload".
- * Reload contents of file with name given by the 'file' argument
- * from temporary file with name given by the 'tmpfile' argument.
- * The two names can be identical.
- */
+ * Reload request message; value of command field is "reload".
+ * Reload contents of file with name given by the 'file' argument
+ * from temporary file with name given by the 'tmpfile' argument.
+ * The two names can be identical.
+ */
interface ReloadRequest extends FileRequest {
command: CommandTypes.Reload;
arguments: ReloadRequestArgs;
}
/**
- * Response to "reload" request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to "reload" request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface ReloadResponse extends Response {
}
/**
- * Arguments for saveto request.
- */
+ * Arguments for saveto request.
+ */
interface SavetoRequestArgs extends FileRequestArgs {
/**
- * Name of temporary file into which to save server's view of
- * file contents.
- */
+ * Name of temporary file into which to save server's view of
+ * file contents.
+ */
tmpfile: string;
}
/**
- * Saveto request message; value of command field is "saveto".
- * For debugging purposes, save to a temporaryfile (named by
- * argument 'tmpfile') the contents of file named by argument
- * 'file'. The server does not currently send a response to a
- * "saveto" request.
- */
+ * Saveto request message; value of command field is "saveto".
+ * For debugging purposes, save to a temporaryfile (named by
+ * argument 'tmpfile') the contents of file named by argument
+ * 'file'. The server does not currently send a response to a
+ * "saveto" request.
+ */
interface SavetoRequest extends FileRequest {
command: CommandTypes.Saveto;
arguments: SavetoRequestArgs;
}
/**
- * Arguments for navto request message.
- */
+ * Arguments for navto request message.
+ */
interface NavtoRequestArgs extends FileRequestArgs {
/**
- * Search term to navigate to from current location; term can
- * be '.*' or an identifier prefix.
- */
+ * Search term to navigate to from current location; term can
+ * be '.*' or an identifier prefix.
+ */
searchValue: string;
/**
- * Optional limit on the number of items to return.
- */
+ * Optional limit on the number of items to return.
+ */
maxResultCount?: number;
/**
- * Optional flag to indicate we want results for just the current file
- * or the entire project.
- */
+ * Optional flag to indicate we want results for just the current file
+ * or the entire project.
+ */
currentFileOnly?: boolean;
projectFileName?: string;
}
/**
- * Navto request message; value of command field is "navto".
- * Return list of objects giving file locations and symbols that
- * match the search term given in argument 'searchTerm'. The
- * context for the search is given by the named file.
- */
+ * Navto request message; value of command field is "navto".
+ * Return list of objects giving file locations and symbols that
+ * match the search term given in argument 'searchTerm'. The
+ * context for the search is given by the named file.
+ */
interface NavtoRequest extends FileRequest {
command: CommandTypes.Navto;
arguments: NavtoRequestArgs;
}
/**
- * An item found in a navto response.
- */
+ * An item found in a navto response.
+ */
interface NavtoItem {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * exact, substring, or prefix.
- */
+ * exact, substring, or prefix.
+ */
matchKind?: string;
/**
- * If this was a case sensitive or insensitive match.
- */
+ * If this was a case sensitive or insensitive match.
+ */
isCaseSensitive?: boolean;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers?: string;
/**
- * The file in which the symbol is found.
- */
+ * The file in which the symbol is found.
+ */
file: string;
/**
- * The location within file at which the symbol is found.
- */
+ * The location within file at which the symbol is found.
+ */
start: Location;
/**
- * One past the last character of the symbol.
- */
+ * One past the last character of the symbol.
+ */
end: Location;
/**
- * Name of symbol's container symbol (if any); for example,
- * the class name if symbol is a class member.
- */
+ * Name of symbol's container symbol (if any); for example,
+ * the class name if symbol is a class member.
+ */
containerName?: string;
/**
- * Kind of symbol's container symbol (if any).
- */
+ * Kind of symbol's container symbol (if any).
+ */
containerKind?: string;
}
/**
- * Navto response message. Body is an array of navto items. Each
- * item gives a symbol that matched the search term.
- */
+ * Navto response message. Body is an array of navto items. Each
+ * item gives a symbol that matched the search term.
+ */
interface NavtoResponse extends Response {
body?: NavtoItem[];
}
/**
- * Arguments for change request message.
- */
+ * Arguments for change request message.
+ */
interface ChangeRequestArgs extends FormatRequestArgs {
/**
- * Optional string to insert at location (file, line, offset).
- */
+ * Optional string to insert at location (file, line, offset).
+ */
insertString?: string;
}
/**
- * Change request message; value of command field is "change".
- * Update the server's view of the file named by argument 'file'.
- * Server does not currently send a response to a change request.
- */
+ * Change request message; value of command field is "change".
+ * Update the server's view of the file named by argument 'file'.
+ * Server does not currently send a response to a change request.
+ */
interface ChangeRequest extends FileLocationRequest {
command: CommandTypes.Change;
arguments: ChangeRequestArgs;
}
/**
- * Response to "brace" request.
- */
+ * Response to "brace" request.
+ */
interface BraceResponse extends Response {
body?: TextSpan[];
}
/**
- * Brace matching request; value of command field is "brace".
- * Return response giving the file locations of matching braces
- * found in file at location line, offset.
- */
+ * Brace matching request; value of command field is "brace".
+ * Return response giving the file locations of matching braces
+ * found in file at location line, offset.
+ */
interface BraceRequest extends FileLocationRequest {
command: CommandTypes.Brace;
}
/**
- * NavBar items request; value of command field is "navbar".
- * Return response giving the list of navigation bar entries
- * extracted from the requested file.
- */
+ * NavBar items request; value of command field is "navbar".
+ * Return response giving the list of navigation bar entries
+ * extracted from the requested file.
+ */
interface NavBarRequest extends FileRequest {
command: CommandTypes.NavBar;
}
@@ -1602,28 +1641,28 @@ declare namespace ts.server.protocol {
}
interface NavigationBarItem {
/**
- * The item's display text.
- */
+ * The item's display text.
+ */
text: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers?: string;
/**
- * The definition locations of the item.
- */
+ * The definition locations of the item.
+ */
spans: TextSpan[];
/**
- * Optional children.
- */
+ * Optional children.
+ */
childItems?: NavigationBarItem[];
/**
- * Number of levels deep this item should appear.
- */
+ * Number of levels deep this item should appear.
+ */
indent: number;
}
/** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
@@ -1643,6 +1682,14 @@ declare namespace ts.server.protocol {
telemetryEventName: string;
payload: any;
}
+ type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
+ interface TypesInstallerInitializationFailedEvent extends Event {
+ event: TypesInstallerInitializationFailedEventName;
+ body: TypesInstallerInitializationFailedEventBody;
+ }
+ interface TypesInstallerInitializationFailedEventBody {
+ message: string;
+ }
type TypingsInstalledTelemetryEventName = "typingsInstalled";
interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
telemetryEventName: TypingsInstalledTelemetryEventName;
@@ -1662,6 +1709,34 @@ declare namespace ts.server.protocol {
*/
typingsInstallerVersion: string;
}
+ type BeginInstallTypesEventName = "beginInstallTypes";
+ type EndInstallTypesEventName = "endInstallTypes";
+ interface BeginInstallTypesEvent extends Event {
+ event: BeginInstallTypesEventName;
+ body: BeginInstallTypesEventBody;
+ }
+ interface EndInstallTypesEvent extends Event {
+ event: EndInstallTypesEventName;
+ body: EndInstallTypesEventBody;
+ }
+ interface InstallTypesEventBody {
+ /**
+ * correlation id to match begin and end events
+ */
+ eventId: number;
+ /**
+ * list of packages to install
+ */
+ packages: ReadonlyArray<string>;
+ }
+ interface BeginInstallTypesEventBody extends InstallTypesEventBody {
+ }
+ interface EndInstallTypesEventBody extends InstallTypesEventBody {
+ /**
+ * true if installation succeeded, otherwise false
+ */
+ success: boolean;
+ }
interface NavBarResponse extends Response {
body?: NavigationBarItem[];
}
@@ -1686,12 +1761,15 @@ declare namespace ts.server.protocol {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
@@ -1737,6 +1815,7 @@ declare namespace ts.server.protocol {
outDir?: string;
outFile?: string;
paths?: MapLike<string[]>;
+ plugins?: PluginImport[];
preserveConstEnums?: boolean;
project?: string;
reactNamespace?: string;
@@ -1760,9 +1839,10 @@ declare namespace ts.server.protocol {
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
+ type ReactNative = "ReactNative";
type React = "React";
}
- type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
+ type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.ReactNative;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
@@ -1818,11 +1898,30 @@ declare namespace ts.server.protocol {
[option: string]: string[] | boolean | undefined;
}
+ interface JsFileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ }
+
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
+
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
interface MapLike<T> {
[index: string]: T;
}
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]>;
+ interface PluginImport {
+ name: string;
+ }
+
+ type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[];
}
declare namespace ts {
// these types are empty stubs for types from services and should not be used directly
diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js
index e08661bd1..a690d219d 100644
--- a/node_modules/typescript/lib/tsc.js
+++ b/node_modules/typescript/lib/tsc.js
@@ -27,6 +27,16 @@ var ts;
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
TypeReferenceSerializationKind[TypeReferenceSerializationKind["Unknown"] = 0] = "Unknown";
@@ -88,32 +98,32 @@ var ts;
var measures;
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
performance.mark = mark;
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
function enable() {
@@ -132,22 +142,96 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
(function (ts) {
- var createObject = Object.create;
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null);
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ function createDictionaryObject() {
+ var map = Object.create(null);
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -160,32 +244,27 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -199,9 +278,13 @@ var ts;
return getCanonicalFileName(nonCanonicalizedPath);
}
ts.toPath = toPath;
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -211,6 +294,20 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -220,7 +317,7 @@ var ts;
ts.zipWith = zipWith;
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -230,7 +327,7 @@ var ts;
}
ts.every = every;
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -239,8 +336,17 @@ var ts;
return undefined;
}
ts.find = find;
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -263,7 +369,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -273,7 +379,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -460,21 +566,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -758,38 +861,55 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
- return false;
+ return result;
+ var _b;
}
- ts.someProperties = someProperties;
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ ts.convertToArray = convertToArray;
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachEntry = forEachEntry;
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ var _b;
}
- ts.appendProperty = appendProperty;
+ ts.forEachKey = forEachKey;
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
+ }
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -797,31 +917,14 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
function equalOwnProperties(left, right, equalityComparer) {
if (left === right)
return true;
@@ -846,23 +949,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -889,27 +983,32 @@ var ts;
return result;
}
ts.extend = extend;
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
function isArray(value) {
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
@@ -985,6 +1084,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -1086,8 +1186,10 @@ var ts;
if (b === undefined)
return 1;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- var result = a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
return result < 0 ? -1 : result > 0 ? 1 : 0;
}
a = a.toUpperCase();
@@ -1469,36 +1571,26 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther;
var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther;
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
function isImplicitGlob(lastPathComponent) {
return !/[.*?]/.test(lastPathComponent);
}
@@ -1568,6 +1660,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -1580,34 +1673,48 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
+ }
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
}
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -1623,14 +1730,14 @@ var ts;
includeBasePaths.push(getIncludeBasePath(absolute));
}
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
};
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -1668,8 +1775,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -1680,11 +1798,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -1696,30 +1814,30 @@ var ts;
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
return 0;
}
ts.getExtensionPriority = getExtensionPriority;
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 0;
}
- else if (extensionPriority < 5) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -1928,136 +2046,29 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- fileStream.Position = 0;
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
+ }
+ var version = process.version;
+ if (!version) {
+ return undefined;
+ }
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
}
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -2066,32 +2077,32 @@ var ts;
var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"];
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -2103,24 +2114,26 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
var fileName = typeof relativeFileName !== "string"
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
if (platform === "win32" || platform === "win64") {
return false;
@@ -2177,10 +2190,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -2257,7 +2270,7 @@ var ts;
if (!directoryExists(directoryName)) {
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -2267,7 +2280,6 @@ var ts;
if (eventName === "rename") {
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -2384,9 +2396,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
sys = getNodeSystem();
}
@@ -2455,11 +2464,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -2468,7 +2477,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -2484,6 +2493,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -2491,7 +2501,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -2523,9 +2533,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -2574,11 +2584,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -2624,6 +2635,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -2667,6 +2683,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -2677,19 +2694,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -2729,12 +2747,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -2743,19 +2761,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -2764,18 +2782,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -2796,13 +2816,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -2814,6 +2834,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -2828,6 +2849,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -2851,23 +2873,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -2899,7 +2931,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -2908,9 +2939,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -2921,8 +2960,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -2983,16 +3022,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -3001,12 +3042,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -3024,11 +3065,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -3043,11 +3084,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -3069,17 +3111,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -3090,23 +3133,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -3116,32 +3159,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -3159,7 +3237,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -3183,7 +3261,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -3191,28 +3269,40 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
})(ts || (ts = {}));
var ts;
@@ -3221,7 +3311,7 @@ var ts;
return token >= 70;
}
ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
+ var textToToken = ts.createMapFromTemplate({
"abstract": 116,
"any": 118,
"as": 117,
@@ -3245,7 +3335,7 @@ var ts;
"false": 85,
"finally": 86,
"for": 87,
- "from": 138,
+ "from": 139,
"function": 88,
"get": 124,
"if": 89,
@@ -3263,27 +3353,28 @@ var ts;
"new": 93,
"null": 94,
"number": 132,
+ "object": 133,
"package": 110,
"private": 111,
"protected": 112,
"public": 113,
"readonly": 130,
"require": 131,
- "global": 139,
+ "global": 140,
"return": 95,
- "set": 133,
+ "set": 134,
"static": 114,
- "string": 134,
+ "string": 135,
"super": 96,
"switch": 97,
- "symbol": 135,
+ "symbol": 136,
"this": 98,
"throw": 99,
"true": 100,
"try": 101,
- "type": 136,
+ "type": 137,
"typeof": 102,
- "undefined": 137,
+ "undefined": 138,
"var": 103,
"void": 104,
"while": 105,
@@ -3291,7 +3382,7 @@ var ts;
"yield": 115,
"async": 119,
"await": 120,
- "of": 140,
+ "of": 141,
"{": 16,
"}": 17,
"(": 18,
@@ -3386,9 +3477,9 @@ var ts;
}
function makeReverseMap(source) {
var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
return result;
}
var tokenStrings = makeReverseMap(textToToken);
@@ -3397,7 +3488,7 @@ var ts;
}
ts.tokenToString = tokenToString;
function stringToToken(s) {
- return textToToken[s];
+ return textToToken.get(s);
}
ts.stringToToken = stringToToken;
function computeLineStarts(text) {
@@ -3457,7 +3548,6 @@ var ts;
return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
}
ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
function isWhiteSpace(ch) {
return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
}
@@ -3593,7 +3683,7 @@ var ts;
if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
var ch = text.charCodeAt(pos);
if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
if (text.charCodeAt(pos + i) !== ch) {
return false;
}
@@ -3746,7 +3836,7 @@ var ts;
if (!comments) {
comments = [];
}
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
return comments;
}
function getLeadingCommentRanges(text, pos) {
@@ -3779,7 +3869,7 @@ var ts;
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
return false;
}
- for (var i = 1, n = name.length; i < n; i++) {
+ for (var i = 1; i < name.length; i++) {
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
return false;
}
@@ -3798,6 +3888,7 @@ var ts;
var precedingLineBreak;
var hasExtendedUnicodeEscape;
var tokenIsUnterminated;
+ var numericLiteralFlags;
setText(text, start, length);
return {
getStartPos: function () { return startPos; },
@@ -3811,6 +3902,7 @@ var ts;
isIdentifier: function () { return token === 70 || token > 106; },
isReservedWord: function () { return token >= 71 && token <= 106; },
isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
@@ -3847,6 +3939,7 @@ var ts;
var end = pos;
if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
pos++;
+ numericLiteralFlags = 2;
if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
pos++;
if (isDigit(text.charCodeAt(pos))) {
@@ -4116,8 +4209,11 @@ var ts;
var len = tokenValue.length;
if (len >= 2 && len <= 11) {
var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
+ if (ch >= 97 && ch <= 122) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
}
}
return token = 70;
@@ -4146,6 +4242,7 @@ var ts;
hasExtendedUnicodeEscape = false;
precedingLineBreak = false;
tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
while (true) {
tokenPos = pos;
if (pos >= end) {
@@ -4327,6 +4424,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 8;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
@@ -4337,6 +4435,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 16;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
@@ -4347,10 +4446,12 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 32;
return token = 8;
}
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4;
return token = 8;
}
case 49:
@@ -4597,7 +4698,14 @@ var ts;
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
- if ((char === 123) || (char === 60)) {
+ if (char === 123) {
+ break;
+ }
+ if (char === 60) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7;
+ }
break;
}
}
@@ -4783,6 +4891,19 @@ var ts;
return undefined;
}
ts.getDeclarationOfKind = getDeclarationOfKind;
+ function findDeclaration(symbol, predicate) {
+ var declarations = symbol.declarations;
+ if (declarations) {
+ for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
+ var declaration = declarations_2[_i];
+ if (predicate(declaration)) {
+ return declaration;
+ }
+ }
+ }
+ return undefined;
+ }
+ ts.findDeclaration = findDeclaration;
var stringWriters = [];
function getSingleLineStringWriter() {
if (stringWriters.length === 0) {
@@ -4796,13 +4917,15 @@ var ts;
writeSpace: writeText,
writeStringLiteral: writeText,
writeParameter: writeText,
+ writeProperty: writeText,
writeSymbol: writeText,
writeLine: function () { return str_1 += " "; },
increaseIndent: ts.noop,
decreaseIndent: ts.noop,
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
}
return stringWriters.pop();
@@ -4818,25 +4941,25 @@ var ts;
}
ts.getFullWidth = getFullWidth;
function hasResolvedModule(sourceFile, moduleNameText) {
- return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]);
+ return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText));
}
ts.hasResolvedModule = hasResolvedModule;
function getResolvedModule(sourceFile, moduleNameText) {
- return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined;
+ return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules.get(moduleNameText) : undefined;
}
ts.getResolvedModule = getResolvedModule;
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
if (!sourceFile.resolvedModules) {
sourceFile.resolvedModules = ts.createMap();
}
- sourceFile.resolvedModules[moduleNameText] = resolvedModule;
+ sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
}
ts.setResolvedModule = setResolvedModule;
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap();
}
- sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective;
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
}
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
function moduleResolutionIsEqualTo(oldResolution, newResolution) {
@@ -4855,7 +4978,7 @@ var ts;
}
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
- var oldResolution = oldResolutions && oldResolutions[names[i]];
+ var oldResolution = oldResolutions && oldResolutions.get(names[i]);
var changed = oldResolution
? !newResolution || !comparer(oldResolution, newResolution)
: newResolution;
@@ -4868,21 +4991,21 @@ var ts;
ts.hasChangesInResolutions = hasChangesInResolutions;
function containsParseError(node) {
aggregateChildData(node);
- return (node.flags & 4194304) !== 0;
+ return (node.flags & 131072) !== 0;
}
ts.containsParseError = containsParseError;
function aggregateChildData(node) {
- if (!(node.flags & 8388608)) {
- var thisNodeOrAnySubNodesHasError = ((node.flags & 1048576) !== 0) ||
+ if (!(node.flags & 262144)) {
+ var thisNodeOrAnySubNodesHasError = ((node.flags & 32768) !== 0) ||
ts.forEachChild(node, containsParseError);
if (thisNodeOrAnySubNodesHasError) {
- node.flags |= 4194304;
+ node.flags |= 131072;
}
- node.flags |= 8388608;
+ node.flags |= 262144;
}
}
function getSourceFileOfNode(node) {
- while (node && node.kind !== 261) {
+ while (node && node.kind !== 264) {
node = node.parent;
}
return node;
@@ -4890,11 +5013,11 @@ var ts;
ts.getSourceFileOfNode = getSourceFileOfNode;
function isStatementWithLocals(node) {
switch (node.kind) {
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
return true;
}
return false;
@@ -4949,6 +5072,10 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 141;
+ }
+ ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
@@ -4959,18 +5086,18 @@ var ts;
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 292 && node._children.length > 0) {
+ if (node.kind === 293 && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
}
ts.getTokenPosOfNode = getTokenPosOfNode;
function isJSDocNode(node) {
- return node.kind >= 262 && node.kind <= 288;
+ return node.kind >= 266 && node.kind <= 292;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocTag(node) {
- return node.kind >= 278 && node.kind <= 291;
+ return node.kind >= 282 && node.kind <= 292;
}
ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -5001,16 +5128,9 @@ var ts;
return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);
}
ts.getTextOfNode = getTextOfNode;
- function getLiteralText(node, sourceFile, languageVersion) {
- if (languageVersion < 2 && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
- return getQuotedEscapedLiteralText('"', node.text, '"');
- }
+ function getLiteralText(node, sourceFile) {
if (!nodeIsSynthesized(node) && node.parent) {
- var text = getSourceTextOfNodeFromSourceFile(sourceFile, node);
- if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) {
- return node.text;
- }
- return text;
+ return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
switch (node.kind) {
case 9:
@@ -5029,19 +5149,6 @@ var ts;
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function isBinaryOrOctalIntegerLiteral(node, text) {
- if (node.kind === 8 && text.length > 1) {
- switch (text.charCodeAt(1)) {
- case 98:
- case 66:
- case 111:
- case 79:
- return true;
- }
- }
- return false;
- }
- ts.isBinaryOrOctalIntegerLiteral = isBinaryOrOctalIntegerLiteral;
function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
}
@@ -5049,10 +5156,6 @@ var ts;
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
ts.escapeIdentifier = escapeIdentifier;
- function unescapeIdentifier(identifier) {
- return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
- }
- ts.unescapeIdentifier = unescapeIdentifier;
function makeIdentifierFromModuleName(moduleName) {
return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_");
}
@@ -5064,11 +5167,11 @@ var ts;
ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
var node = getRootDeclaration(declaration);
- return node.kind === 223 && node.parent.kind === 256;
+ return node.kind === 225 && node.parent.kind === 259;
}
ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
function isAmbientModule(node) {
- return node && node.kind === 230 &&
+ return node && node.kind === 232 &&
(node.name.kind === 9 || isGlobalScopeAugmentation(node));
}
ts.isAmbientModule = isAmbientModule;
@@ -5077,11 +5180,11 @@ var ts;
}
ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
function isShorthandAmbientModule(node) {
- return node.kind === 230 && (!node.body);
+ return node && node.kind === 232 && (!node.body);
}
function isBlockScopedContainerTopLevel(node) {
- return node.kind === 261 ||
- node.kind === 230 ||
+ return node.kind === 264 ||
+ node.kind === 232 ||
isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
@@ -5094,32 +5197,36 @@ var ts;
return false;
}
switch (node.parent.kind) {
- case 261:
+ case 264:
return ts.isExternalModule(node.parent);
- case 231:
+ case 233:
return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
}
return false;
}
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
+ function isEffectiveExternalModule(node, compilerOptions) {
+ return ts.isExternalModule(node) || compilerOptions.isolatedModules;
+ }
+ ts.isEffectiveExternalModule = isEffectiveExternalModule;
function isBlockScope(node, parentNode) {
switch (node.kind) {
- case 261:
+ case 264:
+ case 234:
+ case 259:
case 232:
- case 256:
- case 230:
- case 211:
- case 212:
case 213:
- case 150:
- case 149:
+ case 214:
+ case 215:
case 151:
+ case 150:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
+ case 186:
return true;
- case 204:
+ case 206:
return parentNode && !isFunctionLike(parentNode);
}
return false;
@@ -5139,6 +5246,10 @@ var ts;
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
}
ts.declarationNameToString = declarationNameToString;
+ function getNameFromIndexInfo(info) {
+ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
+ }
+ ts.getNameFromIndexInfo = getNameFromIndexInfo;
function getTextOfPropertyName(name) {
switch (name.kind) {
case 70:
@@ -5146,7 +5257,7 @@ var ts;
case 9:
case 8:
return name.text;
- case 142:
+ case 143:
if (isStringOrNumericLiteral(name.expression)) {
return name.expression.text;
}
@@ -5157,10 +5268,10 @@ var ts;
function entityNameToString(name) {
switch (name.kind) {
case 70:
- return getFullWidth(name) === 0 ? unescapeIdentifier(name.text) : getTextOfNode(name);
- case 141:
+ return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name);
+ case 142:
return entityNameToString(name.left) + "." + entityNameToString(name.right);
- case 177:
+ case 178:
return entityNameToString(name.expression) + "." + entityNameToString(name.name);
}
}
@@ -5197,7 +5308,7 @@ var ts;
ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
function getErrorSpanForArrowFunction(sourceFile, node) {
var pos = ts.skipTrivia(sourceFile.text, node.pos);
- if (node.body && node.body.kind === 204) {
+ if (node.body && node.body.kind === 206) {
var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
if (startLine < endLine) {
@@ -5209,29 +5320,29 @@ var ts;
function getErrorSpanForNode(sourceFile, node) {
var errorNode = node;
switch (node.kind) {
- case 261:
+ case 264:
var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
if (pos_1 === sourceFile.text.length) {
return ts.createTextSpan(0, 0);
}
return getSpanOfTokenAtPosition(sourceFile, pos_1);
- case 223:
- case 174:
- case 226:
- case 197:
- case 227:
- case 230:
- case 229:
- case 260:
case 225:
- case 184:
- case 149:
- case 151:
- case 152:
+ case 175:
case 228:
+ case 198:
+ case 229:
+ case 232:
+ case 231:
+ case 263:
+ case 227:
+ case 185:
+ case 150:
+ case 152:
+ case 153:
+ case 230:
errorNode = node.name;
break;
- case 185:
+ case 186:
return getErrorSpanForArrowFunction(sourceFile, node);
}
if (errorNode === undefined) {
@@ -5252,7 +5363,7 @@ var ts;
}
ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
- return node.kind === 229 && isConst(node);
+ return node.kind === 231 && isConst(node);
}
ts.isConstEnumDeclaration = isConstEnumDeclaration;
function isConst(node) {
@@ -5265,11 +5376,11 @@ var ts;
}
ts.isLet = isLet;
function isSuperCall(n) {
- return n.kind === 179 && n.expression.kind === 96;
+ return n.kind === 180 && n.expression.kind === 96;
}
ts.isSuperCall = isSuperCall;
function isPrologueDirective(node) {
- return node.kind === 207
+ return node.kind === 209
&& node.expression.kind === 9;
}
ts.isPrologueDirective = isPrologueDirective;
@@ -5282,10 +5393,10 @@ var ts;
}
ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText;
function getJSDocCommentRanges(node, text) {
- var commentRanges = (node.kind === 144 ||
- node.kind === 143 ||
- node.kind === 184 ||
- node.kind === 185) ?
+ var commentRanges = (node.kind === 145 ||
+ node.kind === 144 ||
+ node.kind === 185 ||
+ node.kind === 186) ?
ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRangesOfNodeFromText(node, text);
return ts.filter(commentRanges, function (comment) {
@@ -5299,96 +5410,110 @@ var ts;
ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
function isPartOfTypeNode(node) {
- if (156 <= node.kind && node.kind <= 171) {
+ if (157 <= node.kind && node.kind <= 172) {
return true;
}
switch (node.kind) {
case 118:
case 132:
- case 134:
- case 121:
case 135:
- case 137:
+ case 121:
+ case 136:
+ case 138:
case 129:
return true;
case 104:
- return node.parent.kind !== 188;
- case 199:
+ return node.parent.kind !== 189;
+ case 200:
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
case 70:
- if (node.parent.kind === 141 && node.parent.right === node) {
+ if (node.parent.kind === 142 && node.parent.right === node) {
node = node.parent;
}
- else if (node.parent.kind === 177 && node.parent.name === node) {
+ else if (node.parent.kind === 178 && node.parent.name === node) {
node = node.parent;
}
- ts.Debug.assert(node.kind === 70 || node.kind === 141 || node.kind === 177, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
- case 141:
- case 177:
+ ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+ case 142:
+ case 178:
case 98:
- var parent_1 = node.parent;
- if (parent_1.kind === 160) {
+ var parent = node.parent;
+ if (parent.kind === 161) {
return false;
}
- if (156 <= parent_1.kind && parent_1.kind <= 171) {
+ if (157 <= parent.kind && parent.kind <= 172) {
return true;
}
- switch (parent_1.kind) {
- case 199:
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1);
- case 143:
- return node === parent_1.constraint;
- case 147:
- case 146:
+ switch (parent.kind) {
+ case 200:
+ return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
case 144:
- case 223:
- return node === parent_1.type;
+ return node === parent.constraint;
+ case 148:
+ case 147:
+ case 145:
case 225:
- case 184:
+ return node === parent.type;
+ case 227:
case 185:
+ case 186:
+ case 151:
case 150:
case 149:
- case 148:
- case 151:
case 152:
- return node === parent_1.type;
case 153:
+ return node === parent.type;
case 154:
case 155:
- return node === parent_1.type;
- case 182:
- return node === parent_1.type;
- case 179:
+ case 156:
+ return node === parent.type;
+ case 183:
+ return node === parent.type;
case 180:
- return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0;
case 181:
+ return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0;
+ case 182:
return false;
}
}
return false;
}
ts.isPartOfTypeNode = isPartOfTypeNode;
+ function isChildOfNodeWithKind(node, kind) {
+ while (node) {
+ if (node.kind === kind) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+ ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 216:
+ case 218:
return visitor(node);
- case 232:
- case 204:
- case 208:
- case 209:
+ case 234:
+ case 206:
case 210:
case 211:
case 212:
case 213:
- case 217:
- case 218:
- case 253:
- case 254:
+ case 214:
+ case 215:
case 219:
- case 221:
+ case 220:
case 256:
+ case 257:
+ case 221:
+ case 223:
+ case 259:
return ts.forEachChild(node, traverse);
}
}
@@ -5398,24 +5523,25 @@ var ts;
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 195:
+ case 196:
visitor(node);
var operand = node.expression;
if (operand) {
traverse(operand);
}
+ return;
+ case 231:
case 229:
- case 227:
+ case 232:
case 230:
case 228:
- case 226:
- case 197:
+ case 198:
return;
default:
if (isFunctionLike(node)) {
- var name_5 = node.name;
- if (name_5 && name_5.kind === 142) {
- traverse(name_5.expression);
+ var name = node.name;
+ if (name && name.kind === 143) {
+ traverse(name.expression);
return;
}
}
@@ -5426,17 +5552,29 @@ var ts;
}
}
ts.forEachYieldExpression = forEachYieldExpression;
+ function getRestParameterElementType(node) {
+ if (node && node.kind === 163) {
+ return node.elementType;
+ }
+ else if (node && node.kind === 158) {
+ return ts.singleOrUndefined(node.typeArguments);
+ }
+ else {
+ return undefined;
+ }
+ }
+ ts.getRestParameterElementType = getRestParameterElementType;
function isVariableLike(node) {
if (node) {
switch (node.kind) {
- case 174:
+ case 175:
+ case 263:
+ case 145:
case 260:
- case 144:
- case 257:
+ case 148:
case 147:
- case 146:
- case 258:
- case 223:
+ case 261:
+ case 225:
return true;
}
}
@@ -5444,11 +5582,11 @@ var ts;
}
ts.isVariableLike = isVariableLike;
function isAccessor(node) {
- return node && (node.kind === 151 || node.kind === 152);
+ return node && (node.kind === 152 || node.kind === 153);
}
ts.isAccessor = isAccessor;
function isClassLike(node) {
- return node && (node.kind === 226 || node.kind === 197);
+ return node && (node.kind === 228 || node.kind === 198);
}
ts.isClassLike = isClassLike;
function isFunctionLike(node) {
@@ -5457,19 +5595,19 @@ var ts;
ts.isFunctionLike = isFunctionLike;
function isFunctionLikeKind(kind) {
switch (kind) {
- case 150:
- case 184:
- case 225:
+ case 151:
case 185:
+ case 227:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return true;
}
return false;
@@ -5477,13 +5615,13 @@ var ts;
ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
+ case 185:
return true;
}
return false;
@@ -5491,30 +5629,42 @@ var ts;
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
function isIterationStatement(node, lookInLabeledStatements) {
switch (node.kind) {
+ case 213:
+ case 214:
+ case 215:
case 211:
case 212:
- case 213:
- case 209:
- case 210:
return true;
- case 219:
+ case 221:
return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
}
return false;
}
ts.isIterationStatement = isIterationStatement;
+ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
+ while (true) {
+ if (beforeUnwrapLabelCallback) {
+ beforeUnwrapLabelCallback(node);
+ }
+ if (node.statement.kind !== 221) {
+ return node.statement;
+ }
+ node = node.statement;
+ }
+ }
+ ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 204 && isFunctionLike(node.parent);
+ return node && node.kind === 206 && isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
- return node && node.kind === 149 && node.parent.kind === 176;
+ return node && node.kind === 150 && node.parent.kind === 177;
}
ts.isObjectLiteralMethod = isObjectLiteralMethod;
function isObjectLiteralOrClassExpressionMethod(node) {
- return node.kind === 149 &&
- (node.parent.kind === 176 ||
- node.parent.kind === 197);
+ return node.kind === 150 &&
+ (node.parent.kind === 177 ||
+ node.parent.kind === 198);
}
ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
function isIdentifierTypePredicate(predicate) {
@@ -5550,44 +5700,57 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 142:
+ case 143:
if (isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
node = node.parent;
}
break;
- case 185:
+ case 186:
if (!includeArrowFunctions) {
continue;
}
- case 225:
- case 184:
- case 230:
- case 147:
- case 146:
- case 149:
+ case 227:
+ case 185:
+ case 232:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
case 153:
case 154:
case 155:
- case 229:
- case 261:
+ case 156:
+ case 231:
+ case 264:
return node;
}
}
}
ts.getThisContainer = getThisContainer;
+ function getNewTargetContainer(node) {
+ var container = getThisContainer(node, false);
+ if (container) {
+ switch (container.kind) {
+ case 151:
+ case 227:
+ case 185:
+ return container;
+ }
+ }
+ return undefined;
+ }
+ ts.getNewTargetContainer = getNewTargetContainer;
function getSuperContainer(node, stopOnFunctions) {
while (true) {
node = node.parent;
@@ -5595,25 +5758,25 @@ var ts;
return node;
}
switch (node.kind) {
- case 142:
+ case 143:
node = node.parent;
break;
- case 225:
- case 184:
+ case 227:
case 185:
+ case 186:
if (!stopOnFunctions) {
continue;
}
- case 147:
- case 146:
- case 149:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
+ case 153:
return node;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
@@ -5625,36 +5788,36 @@ var ts;
}
ts.getSuperContainer = getSuperContainer;
function getImmediatelyInvokedFunctionExpression(func) {
- if (func.kind === 184 || func.kind === 185) {
+ if (func.kind === 185 || func.kind === 186) {
var prev = func;
- var parent_2 = func.parent;
- while (parent_2.kind === 183) {
- prev = parent_2;
- parent_2 = parent_2.parent;
+ var parent = func.parent;
+ while (parent.kind === 184) {
+ prev = parent;
+ parent = parent.parent;
}
- if (parent_2.kind === 179 && parent_2.expression === prev) {
- return parent_2;
+ if (parent.kind === 180 && parent.expression === prev) {
+ return parent;
}
}
}
ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression;
function isSuperProperty(node) {
var kind = node.kind;
- return (kind === 177 || kind === 178)
+ return (kind === 178 || kind === 179)
&& node.expression.kind === 96;
}
ts.isSuperProperty = isSuperProperty;
function getEntityNameFromTypeNode(node) {
switch (node.kind) {
- case 157:
- case 272:
+ case 158:
+ case 276:
return node.typeName;
- case 199:
+ case 200:
return isEntityNameExpression(node.expression)
? node.expression
: undefined;
case 70:
- case 141:
+ case 142:
return node;
}
return undefined;
@@ -5662,10 +5825,12 @@ var ts;
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
function isCallLikeExpression(node) {
switch (node.kind) {
- case 179:
+ case 250:
+ case 249:
case 180:
case 181:
- case 145:
+ case 182:
+ case 146:
return true;
default:
return false;
@@ -5673,29 +5838,32 @@ var ts;
}
ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
return node.tag;
}
+ else if (isJsxOpeningLikeElement(node)) {
+ return node.tagName;
+ }
return node.expression;
}
ts.getInvokedExpression = getInvokedExpression;
function nodeCanBeDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return true;
- case 147:
- return node.parent.kind === 226;
- case 151:
+ case 148:
+ return node.parent.kind === 228;
case 152:
- case 149:
+ case 153:
+ case 150:
return node.body !== undefined
- && node.parent.kind === 226;
- case 144:
+ && node.parent.kind === 228;
+ case 145:
return node.parent.body !== undefined
- && (node.parent.kind === 150
- || node.parent.kind === 149
- || node.parent.kind === 152)
- && node.parent.parent.kind === 226;
+ && (node.parent.kind === 151
+ || node.parent.kind === 150
+ || node.parent.kind === 153)
+ && node.parent.parent.kind === 228;
}
return false;
}
@@ -5711,19 +5879,19 @@ var ts;
ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
function childIsDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return ts.forEach(node.members, nodeOrChildIsDecorated);
- case 149:
- case 152:
+ case 150:
+ case 153:
return ts.forEach(node.parameters, nodeIsDecorated);
}
}
ts.childIsDecorated = childIsDecorated;
function isJSXTagName(node) {
var parent = node.parent;
- if (parent.kind === 248 ||
- parent.kind === 247 ||
- parent.kind === 249) {
+ if (parent.kind === 250 ||
+ parent.kind === 249 ||
+ parent.kind === 251) {
return parent.tagName === node;
}
return false;
@@ -5737,95 +5905,96 @@ var ts;
case 100:
case 85:
case 11:
- case 175:
case 176:
case 177:
case 178:
case 179:
case 180:
case 181:
- case 200:
case 182:
case 201:
case 183:
+ case 202:
case 184:
- case 197:
case 185:
- case 188:
+ case 198:
case 186:
+ case 189:
case 187:
- case 190:
+ case 188:
case 191:
case 192:
case 193:
- case 196:
case 194:
- case 12:
- case 198:
- case 246:
- case 247:
+ case 197:
case 195:
- case 189:
+ case 12:
+ case 199:
+ case 248:
+ case 249:
+ case 196:
+ case 190:
+ case 203:
return true;
- case 141:
- while (node.parent.kind === 141) {
+ case 142:
+ while (node.parent.kind === 142) {
node = node.parent;
}
- return node.parent.kind === 160 || isJSXTagName(node);
+ return node.parent.kind === 161 || isJSXTagName(node);
case 70:
- if (node.parent.kind === 160 || isJSXTagName(node)) {
+ if (node.parent.kind === 161 || isJSXTagName(node)) {
return true;
}
case 8:
case 9:
case 98:
- var parent_3 = node.parent;
- switch (parent_3.kind) {
- case 223:
- case 144:
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
+ case 263:
case 260:
- case 257:
- case 174:
- return parent_3.initializer === node;
- case 207:
- case 208:
+ case 175:
+ return parent.initializer === node;
case 209:
case 210:
- case 216:
- case 217:
+ case 211:
+ case 212:
case 218:
- case 253:
+ case 219:
case 220:
- case 218:
- return parent_3.expression === node;
- case 211:
- var forStatement = parent_3;
- return (forStatement.initializer === node && forStatement.initializer.kind !== 224) ||
+ case 256:
+ case 222:
+ case 220:
+ return parent.expression === node;
+ case 213:
+ var forStatement = parent;
+ return (forStatement.initializer === node && forStatement.initializer.kind !== 226) ||
forStatement.condition === node ||
forStatement.incrementor === node;
- case 212:
- case 213:
- var forInStatement = parent_3;
- return (forInStatement.initializer === node && forInStatement.initializer.kind !== 224) ||
+ case 214:
+ case 215:
+ var forInStatement = parent;
+ return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) ||
forInStatement.expression === node;
- case 182:
- case 200:
- return node === parent_3.expression;
- case 202:
- return node === parent_3.expression;
- case 142:
- return node === parent_3.expression;
- case 145:
- case 252:
- case 251:
- case 259:
+ case 183:
+ case 201:
+ return node === parent.expression;
+ case 204:
+ return node === parent.expression;
+ case 143:
+ return node === parent.expression;
+ case 146:
+ case 255:
+ case 254:
+ case 262:
return true;
- case 199:
- return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3);
+ case 200:
+ return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
default:
- if (isPartOfExpression(parent_3)) {
+ if (isPartOfExpression(parent)) {
return true;
}
}
@@ -5840,7 +6009,7 @@ var ts;
}
ts.isInstantiatedModule = isInstantiatedModule;
function isExternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind === 245;
+ return node.kind === 236 && node.moduleReference.kind === 247;
}
ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -5849,7 +6018,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function isInternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind !== 245;
+ return node.kind === 236 && node.moduleReference.kind !== 247;
}
ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
function isSourceFileJavaScript(file) {
@@ -5857,38 +6026,57 @@ var ts;
}
ts.isSourceFileJavaScript = isSourceFileJavaScript;
function isInJavaScriptFile(node) {
- return node && !!(node.flags & 2097152);
+ return node && !!(node.flags & 65536);
}
ts.isInJavaScriptFile = isInJavaScriptFile;
- function isRequireCall(expression, checkArgumentIsStringLiteral) {
- var isRequire = expression.kind === 179 &&
- expression.expression.kind === 70 &&
- expression.expression.text === "require" &&
- expression.arguments.length === 1;
- return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9);
+ function isRequireCall(callExpression, checkArgumentIsStringLiteral) {
+ if (callExpression.kind !== 180) {
+ return false;
+ }
+ var _a = callExpression, expression = _a.expression, args = _a.arguments;
+ if (expression.kind !== 70 || expression.text !== "require") {
+ return false;
+ }
+ if (args.length !== 1) {
+ return false;
+ }
+ var arg = args[0];
+ return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12;
}
ts.isRequireCall = isRequireCall;
function isSingleOrDoubleQuote(charCode) {
return charCode === 39 || charCode === 34;
}
ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote;
- function isDeclarationOfFunctionExpression(s) {
- if (s.valueDeclaration && s.valueDeclaration.kind === 223) {
+ function isDeclarationOfFunctionOrClassExpression(s) {
+ if (s.valueDeclaration && s.valueDeclaration.kind === 225) {
var declaration = s.valueDeclaration;
- return declaration.initializer && declaration.initializer.kind === 184;
+ return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198);
}
return false;
}
- ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression;
+ ts.isDeclarationOfFunctionOrClassExpression = isDeclarationOfFunctionOrClassExpression;
+ function getRightMostAssignedExpression(node) {
+ while (isAssignmentExpression(node, true)) {
+ node = node.right;
+ }
+ return node;
+ }
+ ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
+ function isExportsIdentifier(node) {
+ return isIdentifier(node) && node.text === "exports";
+ }
+ ts.isExportsIdentifier = isExportsIdentifier;
+ function isModuleExportsPropertyAccessExpression(node) {
+ return isPropertyAccessExpression(node) && isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
+ }
+ ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
if (!isInJavaScriptFile(expression)) {
return 0;
}
- if (expression.kind !== 192) {
- return 0;
- }
var expr = expression;
- if (expr.operatorToken.kind !== 57 || expr.left.kind !== 177) {
+ if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) {
return 0;
}
var lhs = expr.left;
@@ -5900,11 +6088,14 @@ var ts;
else if (lhsId.text === "module" && lhs.name.text === "exports") {
return 2;
}
+ else {
+ return 5;
+ }
}
else if (lhs.expression.kind === 98) {
return 4;
}
- else if (lhs.expression.kind === 177) {
+ else if (lhs.expression.kind === 178) {
var innerPropertyAccess = lhs.expression;
if (innerPropertyAccess.expression.kind === 70) {
var innerPropertyAccessIdentifier = innerPropertyAccess.expression;
@@ -5920,35 +6111,35 @@ var ts;
}
ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind;
function getExternalModuleName(node) {
- if (node.kind === 235) {
+ if (node.kind === 237) {
return node.moduleSpecifier;
}
- if (node.kind === 234) {
+ if (node.kind === 236) {
var reference = node.moduleReference;
- if (reference.kind === 245) {
+ if (reference.kind === 247) {
return reference.expression;
}
}
- if (node.kind === 241) {
+ if (node.kind === 243) {
return node.moduleSpecifier;
}
- if (node.kind === 230 && node.name.kind === 9) {
+ if (node.kind === 232 && node.name.kind === 9) {
return node.name;
}
}
ts.getExternalModuleName = getExternalModuleName;
function getNamespaceDeclarationNode(node) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
var importClause = node.importClause;
- if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 237) {
+ if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) {
return importClause.namedBindings;
}
}
ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
function isDefaultImport(node) {
- return node.kind === 235
+ return node.kind === 237
&& node.importClause
&& !!node.importClause.name;
}
@@ -5956,13 +6147,13 @@ var ts;
function hasQuestionToken(node) {
if (node) {
switch (node.kind) {
- case 144:
+ case 145:
+ case 150:
case 149:
+ case 261:
+ case 260:
case 148:
- case 258:
- case 257:
case 147:
- case 146:
return node.questionToken !== undefined;
}
}
@@ -5970,28 +6161,36 @@ var ts;
}
ts.hasQuestionToken = hasQuestionToken;
function isJSDocConstructSignature(node) {
- return node.kind === 274 &&
+ return node.kind === 278 &&
node.parameters.length > 0 &&
- node.parameters[0].type.kind === 276;
+ node.parameters[0].type.kind === 280;
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function getCommentsFromJSDoc(node) {
return ts.map(getJSDocs(node), function (doc) { return doc.comment; });
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
+ function hasJSDocParameterTags(node) {
+ var parameterTags = getJSDocTags(node, 285);
+ return parameterTags && parameterTags.length > 0;
+ }
+ ts.hasJSDocParameterTags = hasJSDocParameterTags;
function getJSDocTags(node, kind) {
var docs = getJSDocs(node);
if (docs) {
var result = [];
for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) {
var doc = docs_1[_i];
- if (doc.kind === 281) {
+ if (doc.kind === 285) {
if (doc.kind === kind) {
result.push(doc);
}
}
else {
- result.push.apply(result, ts.filter(doc.tags, function (tag) { return tag.kind === kind; }));
+ var tags = doc.tags;
+ if (tags) {
+ result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
+ }
}
}
return result;
@@ -6011,9 +6210,9 @@ var ts;
var parent = node.parent;
var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) &&
parent.initializer === node &&
- parent.parent.parent.kind === 205;
+ parent.parent.parent.kind === 207;
var isVariableOfVariableDeclarationStatement = isVariableLike(node) &&
- parent.parent.kind === 205;
+ parent.parent.kind === 207;
var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent :
isVariableOfVariableDeclarationStatement ? parent.parent :
undefined;
@@ -6021,19 +6220,19 @@ var ts;
getJSDocsWorker(variableStatementNode);
}
var isSourceOfAssignmentExpressionStatement = parent && parent.parent &&
- parent.kind === 192 &&
+ parent.kind === 193 &&
parent.operatorToken.kind === 57 &&
- parent.parent.kind === 207;
+ parent.parent.kind === 209;
if (isSourceOfAssignmentExpressionStatement) {
getJSDocsWorker(parent.parent);
}
- var isModuleDeclaration = node.kind === 230 &&
- parent && parent.kind === 230;
- var isPropertyAssignmentExpression = parent && parent.kind === 257;
+ var isModuleDeclaration = node.kind === 232 &&
+ parent && parent.kind === 232;
+ var isPropertyAssignmentExpression = parent && parent.kind === 260;
if (isModuleDeclaration || isPropertyAssignmentExpression) {
getJSDocsWorker(parent);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
cache = ts.concatenate(cache, getJSDocParameterTags(node));
}
if (isVariableLike(node) && node.initializer) {
@@ -6042,22 +6241,23 @@ var ts;
cache = ts.concatenate(cache, node.jsDoc);
}
}
+ ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
if (!isParameter(param)) {
return undefined;
}
var func = param.parent;
- var tags = getJSDocTags(func, 281);
+ var tags = getJSDocTags(func, 285);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 281; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 70) {
- var name_6 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 281 && tag.parameterName.text === name_6; });
+ var name_1 = param.name.text;
+ return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; });
}
else {
return undefined;
@@ -6065,8 +6265,8 @@ var ts;
}
ts.getJSDocParameterTags = getJSDocParameterTags;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 283);
- if (!tag && node.kind === 144) {
+ var tag = getFirstJSDocTag(node, 287);
+ if (!tag && node.kind === 145) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; });
@@ -6076,15 +6276,15 @@ var ts;
}
ts.getJSDocType = getJSDocType;
function getJSDocAugmentsTag(node) {
- return getFirstJSDocTag(node, 280);
+ return getFirstJSDocTag(node, 284);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 282);
+ return getFirstJSDocTag(node, 286);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 284);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -6096,9 +6296,9 @@ var ts;
}
ts.hasDeclaredRestParameter = hasDeclaredRestParameter;
function isRestParameter(node) {
- if (node && (node.flags & 2097152)) {
- if (node.type && node.type.kind === 275 ||
- ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 275; })) {
+ if (node && (node.flags & 65536)) {
+ if (node.type && node.type.kind === 279 ||
+ ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) {
return true;
}
}
@@ -6113,28 +6313,33 @@ var ts;
var parent = node.parent;
while (true) {
switch (parent.kind) {
- case 192:
+ case 193:
var binaryOperator = parent.operatorToken.kind;
return isAssignmentOperator(binaryOperator) && parent.left === node ?
binaryOperator === 57 ? 1 : 2 :
0;
- case 190:
case 191:
+ case 192:
var unaryOperator = parent.operator;
return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0;
- case 212:
- case 213:
+ case 214:
+ case 215:
return parent.initializer === node ? 1 : 0;
- case 183:
- case 175:
- case 196:
+ case 184:
+ case 176:
+ case 197:
node = parent;
break;
- case 258:
+ case 261:
if (parent.name !== node) {
return 0;
}
- case 257:
+ node = parent.parent;
+ break;
+ case 260:
+ if (parent.name === node) {
+ return 0;
+ }
node = parent.parent;
break;
default:
@@ -6148,6 +6353,17 @@ var ts;
return getAssignmentTargetKind(node) !== 0;
}
ts.isAssignmentTarget = isAssignmentTarget;
+ function isDeleteTarget(node) {
+ if (node.kind !== 178 && node.kind !== 179) {
+ return false;
+ }
+ node = node.parent;
+ while (node && node.kind === 184) {
+ node = node.parent;
+ }
+ return node && node.kind === 187;
+ }
+ ts.isDeleteTarget = isDeleteTarget;
function isNodeDescendantOf(node, ancestor) {
while (node) {
if (node === ancestor)
@@ -6159,7 +6375,7 @@ var ts;
ts.isNodeDescendantOf = isNodeDescendantOf;
function isInAmbientContext(node) {
while (node) {
- if (hasModifier(node, 2) || (node.kind === 261 && node.isDeclarationFile)) {
+ if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) {
return true;
}
node = node.parent;
@@ -6172,7 +6388,7 @@ var ts;
return false;
}
var parent = name.parent;
- if (parent.kind === 239 || parent.kind === 243) {
+ if (parent.kind === 241 || parent.kind === 245) {
if (parent.propertyName) {
return true;
}
@@ -6185,48 +6401,48 @@ var ts;
ts.isDeclarationName = isDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
- node.parent.kind === 142 &&
+ node.parent.kind === 143 &&
isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
var parent = node.parent;
switch (parent.kind) {
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
+ case 153:
+ case 263:
case 260:
- case 257:
- case 177:
+ case 178:
return parent.name === node;
- case 141:
+ case 142:
if (parent.right === node) {
- while (parent.kind === 141) {
+ while (parent.kind === 142) {
parent = parent.parent;
}
- return parent.kind === 160;
+ return parent.kind === 161;
}
return false;
- case 174:
- case 239:
+ case 175:
+ case 241:
return parent.propertyName === node;
- case 243:
+ case 245:
return true;
}
return false;
}
ts.isIdentifierName = isIdentifierName;
function isAliasSymbolDeclaration(node) {
- return node.kind === 234 ||
- node.kind === 233 ||
- node.kind === 236 && !!node.name ||
- node.kind === 237 ||
+ return node.kind === 236 ||
+ node.kind === 235 ||
+ node.kind === 238 && !!node.name ||
node.kind === 239 ||
- node.kind === 243 ||
- node.kind === 240 && exportAssignmentIsAlias(node);
+ node.kind === 241 ||
+ node.kind === 245 ||
+ node.kind === 242 && exportAssignmentIsAlias(node);
}
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
function exportAssignmentIsAlias(node) {
@@ -6312,17 +6528,51 @@ var ts;
}
ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
function isKeyword(token) {
- return 71 <= token && token <= 140;
+ return 71 <= token && token <= 141;
}
ts.isKeyword = isKeyword;
function isTrivia(token) {
return 2 <= token && token <= 7;
}
ts.isTrivia = isTrivia;
- function isAsyncFunctionLike(node) {
- return isFunctionLike(node) && hasModifier(node, 256) && !isAccessor(node);
+ function getFunctionFlags(node) {
+ var flags = 0;
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 150:
+ if (node.asteriskToken) {
+ flags |= 1;
+ }
+ case 186:
+ if (hasModifier(node, 256)) {
+ flags |= 2;
+ }
+ break;
+ }
+ if (!node.body) {
+ flags |= 4;
+ }
+ return flags;
+ }
+ ts.getFunctionFlags = getFunctionFlags;
+ function isAsyncFunction(node) {
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 186:
+ case 150:
+ return node.body !== undefined
+ && node.asteriskToken === undefined
+ && hasModifier(node, 256);
+ }
+ return false;
}
- ts.isAsyncFunctionLike = isAsyncFunctionLike;
+ ts.isAsyncFunction = isAsyncFunction;
+ function isNumericLiteral(node) {
+ return node.kind === 8;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9
@@ -6334,7 +6584,7 @@ var ts;
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
- return name.kind === 142 &&
+ return name.kind === 143 &&
!isStringOrNumericLiteral(name.expression) &&
!isWellKnownSymbolSyntactically(name.expression);
}
@@ -6344,10 +6594,10 @@ var ts;
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
- if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 144) {
+ if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) {
return name.text;
}
- if (name.kind === 142) {
+ if (name.kind === 143) {
var nameExpression = name.expression;
if (isWellKnownSymbolSyntactically(nameExpression)) {
var rightHandSideName = nameExpression.name.text;
@@ -6392,11 +6642,11 @@ var ts;
ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
- return root.kind === 144;
+ return root.kind === 145;
}
ts.isParameterDeclaration = isParameterDeclaration;
function getRootDeclaration(node) {
- while (node.kind === 174) {
+ while (node.kind === 175) {
node = node.parent.parent;
}
return node;
@@ -6404,15 +6654,15 @@ var ts;
ts.getRootDeclaration = getRootDeclaration;
function nodeStartsNewLexicalEnvironment(node) {
var kind = node.kind;
- return kind === 150
- || kind === 184
- || kind === 225
+ return kind === 151
|| kind === 185
- || kind === 149
- || kind === 151
+ || kind === 227
+ || kind === 186
+ || kind === 150
|| kind === 152
- || kind === 230
- || kind === 261;
+ || kind === 153
+ || kind === 232
+ || kind === 264;
}
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
function nodeIsSynthesized(node) {
@@ -6420,66 +6670,44 @@ var ts;
|| ts.positionIsSynthesized(node.end);
}
ts.nodeIsSynthesized = nodeIsSynthesized;
- function getOriginalNode(node, nodeTest) {
- if (node) {
- while (node.original !== undefined) {
- node = node.original;
- }
+ function getOriginalSourceFileOrBundle(sourceFileOrBundle) {
+ if (sourceFileOrBundle.kind === 265) {
+ return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile));
}
- return !nodeTest || nodeTest(node) ? node : undefined;
+ return getOriginalSourceFile(sourceFileOrBundle);
}
- ts.getOriginalNode = getOriginalNode;
- function isParseTreeNode(node) {
- return (node.flags & 8) === 0;
+ ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
+ function getOriginalSourceFile(sourceFile) {
+ return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
}
- ts.isParseTreeNode = isParseTreeNode;
- function getParseTreeNode(node, nodeTest) {
- if (isParseTreeNode(node)) {
- return node;
- }
- node = getOriginalNode(node);
- if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
- return node;
- }
- return undefined;
- }
- ts.getParseTreeNode = getParseTreeNode;
function getOriginalSourceFiles(sourceFiles) {
- var originalSourceFiles = [];
- for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
- var sourceFile = sourceFiles_1[_i];
- var originalSourceFile = getParseTreeNode(sourceFile, isSourceFile);
- if (originalSourceFile) {
- originalSourceFiles.push(originalSourceFile);
- }
- }
- return originalSourceFiles;
+ return ts.sameMap(sourceFiles, getOriginalSourceFile);
}
ts.getOriginalSourceFiles = getOriginalSourceFiles;
function getOriginalNodeId(node) {
- node = getOriginalNode(node);
+ node = ts.getOriginalNode(node);
return node ? ts.getNodeId(node) : 0;
}
ts.getOriginalNodeId = getOriginalNodeId;
function getExpressionAssociativity(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorAssociativity(expression.kind, operator, hasArguments);
}
ts.getExpressionAssociativity = getExpressionAssociativity;
function getOperatorAssociativity(kind, operator, hasArguments) {
switch (kind) {
- case 180:
+ case 181:
return hasArguments ? 0 : 1;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
- case 193:
- case 195:
+ case 187:
+ case 190:
+ case 194:
+ case 196:
return 1;
- case 192:
+ case 193:
switch (operator) {
case 39:
case 57:
@@ -6503,15 +6731,15 @@ var ts;
ts.getOperatorAssociativity = getOperatorAssociativity;
function getExpressionPrecedence(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorPrecedence(expression.kind, operator, hasArguments);
}
ts.getExpressionPrecedence = getExpressionPrecedence;
function getOperator(expression) {
- if (expression.kind === 192) {
+ if (expression.kind === 193) {
return expression.operatorToken.kind;
}
- else if (expression.kind === 190 || expression.kind === 191) {
+ else if (expression.kind === 191 || expression.kind === 192) {
return expression.operator;
}
else {
@@ -6529,37 +6757,36 @@ var ts;
case 85:
case 8:
case 9:
- case 175:
case 176:
- case 184:
+ case 177:
case 185:
- case 197:
- case 246:
- case 247:
+ case 186:
+ case 198:
+ case 248:
+ case 249:
case 11:
case 12:
- case 194:
- case 183:
- case 198:
- case 297:
+ case 195:
+ case 184:
+ case 199:
return 19;
- case 181:
- case 177:
+ case 182:
case 178:
+ case 179:
return 18;
- case 180:
+ case 181:
return hasArguments ? 18 : 17;
- case 179:
+ case 180:
return 17;
- case 191:
+ case 192:
return 16;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
+ case 187:
+ case 190:
return 15;
- case 192:
+ case 193:
switch (operatorKind) {
case 50:
case 51:
@@ -6617,11 +6844,11 @@ var ts;
default:
return -1;
}
- case 193:
+ case 194:
return 4;
- case 195:
- return 2;
case 196:
+ return 2;
+ case 197:
return 1;
default:
return -1;
@@ -6644,21 +6871,15 @@ var ts;
return modificationCount;
}
function reattachFileDiagnostics(newFile) {
- if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) {
- return;
- }
- for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) {
- var diagnostic = _a[_i];
- diagnostic.file = newFile;
- }
+ ts.forEach(fileDiagnostics.get(newFile.fileName), function (diagnostic) { return diagnostic.file = newFile; });
}
function add(diagnostic) {
var diagnostics;
if (diagnostic.file) {
- diagnostics = fileDiagnostics[diagnostic.file.fileName];
+ diagnostics = fileDiagnostics.get(diagnostic.file.fileName);
if (!diagnostics) {
diagnostics = [];
- fileDiagnostics[diagnostic.file.fileName] = diagnostics;
+ fileDiagnostics.set(diagnostic.file.fileName, diagnostics);
}
}
else {
@@ -6675,16 +6896,16 @@ var ts;
function getDiagnostics(fileName) {
sortAndDeduplicate();
if (fileName) {
- return fileDiagnostics[fileName] || [];
+ return fileDiagnostics.get(fileName) || [];
}
var allDiagnostics = [];
function pushDiagnostic(d) {
allDiagnostics.push(d);
}
ts.forEach(nonFileDiagnostics, pushDiagnostic);
- for (var key in fileDiagnostics) {
- ts.forEach(fileDiagnostics[key], pushDiagnostic);
- }
+ fileDiagnostics.forEach(function (diagnostics) {
+ ts.forEach(diagnostics, pushDiagnostic);
+ });
return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
}
function sortAndDeduplicate() {
@@ -6693,14 +6914,14 @@ var ts;
}
diagnosticsModified = false;
nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
- for (var key in fileDiagnostics) {
- fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
- }
+ fileDiagnostics.forEach(function (diagnostics, key) {
+ fileDiagnostics.set(key, ts.sortAndDeduplicateDiagnostics(diagnostics));
+ });
}
}
ts.createDiagnosticCollection = createDiagnosticCollection;
var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
- var escapedCharsMap = ts.createMap({
+ var escapedCharsMap = ts.createMapFromTemplate({
"\0": "\\0",
"\t": "\\t",
"\v": "\\v",
@@ -6715,13 +6936,12 @@ var ts;
"\u0085": "\\u0085"
});
function escapeString(s) {
- s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
- return s;
- function getReplacement(c) {
- return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
- }
+ return s.replace(escapedCharsRegExp, getReplacement);
}
ts.escapeString = escapeString;
+ function getReplacement(c) {
+ return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
+ }
function isIntrinsicJsxName(name) {
var ch = name.substr(0, 1);
return ch.toLowerCase() === ch;
@@ -6864,129 +7084,62 @@ var ts;
ts.getDeclarationEmitOutputFilePath = getDeclarationEmitOutputFilePath;
function getSourceFilesToEmit(host, targetSourceFile) {
var options = host.getCompilerOptions();
+ var isSourceFileFromExternalLibrary = function (file) { return host.isSourceFileFromExternalLibrary(file); };
if (options.outFile || options.out) {
var moduleKind = ts.getEmitModuleKind(options);
- var moduleEmitEnabled = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
- var sourceFiles = getAllEmittableSourceFiles();
- return ts.filter(sourceFiles, moduleEmitEnabled ? isNonDeclarationFile : isBundleEmitNonExternalModule);
+ var moduleEmitEnabled_1 = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
+ return ts.filter(host.getSourceFiles(), function (sourceFile) {
+ return (moduleEmitEnabled_1 || !ts.isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary);
+ });
}
else {
- var sourceFiles = targetSourceFile === undefined ? getAllEmittableSourceFiles() : [targetSourceFile];
- return filterSourceFilesInDirectory(sourceFiles, function (file) { return host.isSourceFileFromExternalLibrary(file); });
- }
- function getAllEmittableSourceFiles() {
- return options.noEmitForJsFiles ? ts.filter(host.getSourceFiles(), function (sourceFile) { return !isSourceFileJavaScript(sourceFile); }) : host.getSourceFiles();
+ var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
+ return ts.filter(sourceFiles, function (sourceFile) { return sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary); });
}
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
- function filterSourceFilesInDirectory(sourceFiles, isSourceFileFromExternalLibrary) {
- return ts.filter(sourceFiles, function (file) { return shouldEmitInDirectory(file, isSourceFileFromExternalLibrary); });
- }
- ts.filterSourceFilesInDirectory = filterSourceFilesInDirectory;
- function isNonDeclarationFile(sourceFile) {
- return !isDeclarationFile(sourceFile);
- }
- function shouldEmitInDirectory(sourceFile, isSourceFileFromExternalLibrary) {
- return isNonDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
+ function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
}
- function isBundleEmitNonExternalModule(sourceFile) {
- return isNonDeclarationFile(sourceFile) && !ts.isExternalModule(sourceFile);
- }
- function forEachTransformedEmitFile(host, sourceFiles, action, emitOnlyDtsFiles) {
+ ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
+ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
+ var sourceFiles = ts.isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile);
var options = host.getCompilerOptions();
if (options.outFile || options.out) {
- onBundledEmit(sourceFiles);
- }
- else {
- for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
- var sourceFile = sourceFiles_2[_i];
- if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (options.declaration || emitOnlyDtsFiles) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, [sourceFile], false);
- }
- function onBundledEmit(sourceFiles) {
if (sourceFiles.length) {
var jsFilePath = options.outFile || options.out;
var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, true);
+ var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : "";
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, ts.createBundle(sourceFiles), emitOnlyDtsFiles);
+ }
+ }
+ else {
+ for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
+ var sourceFile = sourceFiles_1[_i];
+ var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, getOutputExtension(sourceFile, options));
+ var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
+ var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, sourceFile, emitOnlyDtsFiles);
}
}
}
- ts.forEachTransformedEmitFile = forEachTransformedEmitFile;
+ ts.forEachEmittedFile = forEachEmittedFile;
function getSourceMapFilePath(jsFilePath, options) {
return options.sourceMap ? jsFilePath + ".map" : undefined;
}
- function forEachExpectedEmitFile(host, action, targetSourceFile, emitOnlyDtsFiles) {
- var options = host.getCompilerOptions();
- if (options.outFile || options.out) {
- onBundledEmit(host);
- }
- else {
- var sourceFiles = targetSourceFile === undefined ? getSourceFilesToEmit(host) : [targetSourceFile];
- for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
- var sourceFile = sourceFiles_3[_i];
- if (shouldEmitInDirectory(sourceFile, function (file) { return host.isSourceFileFromExternalLibrary(file); })) {
- onSingleFileEmit(host, sourceFile);
+ function getOutputExtension(sourceFile, options) {
+ if (options.jsx === 1) {
+ if (isSourceFileJavaScript(sourceFile)) {
+ if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
+ return ".jsx";
}
}
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: declarationFilePath
- };
- action(emitFileNames, [sourceFile], false, emitOnlyDtsFiles);
- }
- function onBundledEmit(host) {
- var bundledSources = ts.filter(getSourceFilesToEmit(host), function (sourceFile) { return !isDeclarationFile(sourceFile) &&
- !host.isSourceFileFromExternalLibrary(sourceFile) &&
- (!ts.isExternalModule(sourceFile) ||
- !!ts.getEmitModuleKind(options)); });
- if (bundledSources.length) {
- var jsFilePath = options.outFile || options.out;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined
- };
- action(emitFileNames, bundledSources, true, emitOnlyDtsFiles);
+ else if (sourceFile.languageVariant === 1) {
+ return ".jsx";
}
}
+ return ".js";
}
- ts.forEachExpectedEmitFile = forEachExpectedEmitFile;
function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
var commonSourceDirectory = host.getCommonSourceDirectory();
@@ -7011,7 +7164,7 @@ var ts;
ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap;
function getFirstConstructorWithBody(node) {
return ts.forEach(node.members, function (member) {
- if (member.kind === 150 && nodeIsPresent(member.body)) {
+ if (member.kind === 151 && nodeIsPresent(member.body)) {
return member;
}
});
@@ -7052,10 +7205,10 @@ var ts;
var setAccessor;
if (hasDynamicName(accessor)) {
firstAccessor = accessor;
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
getAccessor = accessor;
}
- else if (accessor.kind === 152) {
+ else if (accessor.kind === 153) {
setAccessor = accessor;
}
else {
@@ -7064,7 +7217,7 @@ var ts;
}
else {
ts.forEach(declarations, function (member) {
- if ((member.kind === 151 || member.kind === 152)
+ if ((member.kind === 152 || member.kind === 153)
&& hasModifier(member, 32) === hasModifier(accessor, 32)) {
var memberName = getPropertyNameForPropertyNameNode(member.name);
var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
@@ -7075,10 +7228,10 @@ var ts;
else if (!secondAccessor) {
secondAccessor = member;
}
- if (member.kind === 151 && !getAccessor) {
+ if (member.kind === 152 && !getAccessor) {
getAccessor = member;
}
- if (member.kind === 152 && !setAccessor) {
+ if (member.kind === 153 && !setAccessor) {
setAccessor = member;
}
}
@@ -7296,7 +7449,7 @@ var ts;
}
ts.isAssignmentOperator = isAssignmentOperator;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
- if (node.kind === 199 &&
+ if (node.kind === 200 &&
node.parent.token === 84 &&
isClassLike(node.parent.parent)) {
return node.parent.parent;
@@ -7314,8 +7467,8 @@ var ts;
function isDestructuringAssignment(node) {
if (isAssignmentExpression(node, true)) {
var kind = node.left.kind;
- return kind === 176
- || kind === 175;
+ return kind === 177
+ || kind === 176;
}
return false;
}
@@ -7339,31 +7492,42 @@ var ts;
return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined;
}
ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
+ function isExpressionWithTypeArgumentsInClassImplementsClause(node) {
+ return node.kind === 200
+ && isEntityNameExpression(node.expression)
+ && node.parent
+ && node.parent.token === 107
+ && node.parent.parent
+ && isClassLike(node.parent.parent);
+ }
+ ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
return node.kind === 70 ||
- node.kind === 177 && isEntityNameExpression(node.expression);
+ node.kind === 178 && isEntityNameExpression(node.expression);
}
ts.isEntityNameExpression = isEntityNameExpression;
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
- return (node.parent.kind === 141 && node.parent.right === node) ||
- (node.parent.kind === 177 && node.parent.name === node);
+ return (node.parent.kind === 142 && node.parent.right === node) ||
+ (node.parent.kind === 178 && node.parent.name === node);
}
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
- function isEmptyObjectLiteralOrArrayLiteral(expression) {
- var kind = expression.kind;
- if (kind === 176) {
- return expression.properties.length === 0;
- }
- if (kind === 175) {
- return expression.elements.length === 0;
- }
- return false;
+ function isEmptyObjectLiteral(expression) {
+ return expression.kind === 177 &&
+ expression.properties.length === 0;
+ }
+ ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
+ function isEmptyArrayLiteral(expression) {
+ return expression.kind === 176 &&
+ expression.elements.length === 0;
}
- ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral;
+ ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
+ function isExportDefaultSymbol(symbol) {
+ return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ }
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
}
@@ -7397,39 +7561,6 @@ var ts;
}
return output;
}
- ts.stringify = typeof JSON !== "undefined" && JSON.stringify
- ? JSON.stringify
- : stringifyFallback;
- function stringifyFallback(value) {
- return value === undefined ? undefined : stringifyValue(value);
- }
- function stringifyValue(value) {
- return typeof value === "string" ? "\"" + escapeString(value) + "\""
- : typeof value === "number" ? isFinite(value) ? String(value) : "null"
- : typeof value === "boolean" ? value ? "true" : "false"
- : typeof value === "object" && value ? ts.isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
- : "null";
- }
- function cycleCheck(cb, value) {
- ts.Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
- value.__cycle = true;
- var result = cb(value);
- delete value.__cycle;
- return result;
- }
- function stringifyArray(value) {
- return "[" + ts.reduceLeft(value, stringifyElement, "") + "]";
- }
- function stringifyElement(memo, value) {
- return (memo ? memo + "," : memo) + stringifyValue(value);
- }
- function stringifyObject(value) {
- return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}";
- }
- function stringifyProperty(memo, value, key) {
- return value === undefined || typeof value === "function" || key === "__cycle" ? memo
- : (memo ? memo + "," : memo) + ("\"" + escapeString(key) + "\":" + stringifyValue(value));
- }
var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function convertToBase64(input) {
var result = "";
@@ -7488,39 +7619,39 @@ var ts;
|| kind === 94) {
return true;
}
- else if (kind === 177) {
+ else if (kind === 178) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 178) {
+ else if (kind === 179) {
return isSimpleExpressionWorker(node.expression, depth + 1)
&& isSimpleExpressionWorker(node.argumentExpression, depth + 1);
}
- else if (kind === 190
- || kind === 191) {
+ else if (kind === 191
+ || kind === 192) {
return isSimpleExpressionWorker(node.operand, depth + 1);
}
- else if (kind === 192) {
+ else if (kind === 193) {
return node.operatorToken.kind !== 39
&& isSimpleExpressionWorker(node.left, depth + 1)
&& isSimpleExpressionWorker(node.right, depth + 1);
}
- else if (kind === 193) {
+ else if (kind === 194) {
return isSimpleExpressionWorker(node.condition, depth + 1)
&& isSimpleExpressionWorker(node.whenTrue, depth + 1)
&& isSimpleExpressionWorker(node.whenFalse, depth + 1);
}
- else if (kind === 188
- || kind === 187
- || kind === 186) {
+ else if (kind === 189
+ || kind === 188
+ || kind === 187) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 175) {
+ else if (kind === 176) {
return node.elements.length === 0;
}
- else if (kind === 176) {
+ else if (kind === 177) {
return node.properties.length === 0;
}
- else if (kind === 179) {
+ else if (kind === 180) {
if (!isSimpleExpressionWorker(node.expression, depth + 1)) {
return false;
}
@@ -7535,16 +7666,19 @@ var ts;
}
return false;
}
- var syntaxKindCache = ts.createMap();
+ var syntaxKindCache = [];
function formatSyntaxKind(kind) {
var syntaxKindEnum = ts.SyntaxKind;
if (syntaxKindEnum) {
- if (syntaxKindCache[kind]) {
- return syntaxKindCache[kind];
+ var cached = syntaxKindCache[kind];
+ if (cached !== undefined) {
+ return cached;
}
- for (var name_7 in syntaxKindEnum) {
- if (syntaxKindEnum[name_7] === kind) {
- return syntaxKindCache[kind] = kind.toString() + " (" + name_7 + ")";
+ for (var name in syntaxKindEnum) {
+ if (syntaxKindEnum[name] === kind) {
+ var result = kind + " (" + name + ")";
+ syntaxKindCache[kind] = result;
+ return result;
}
}
}
@@ -7553,6 +7687,14 @@ var ts;
}
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function getRangePos(range) {
+ return range ? range.pos : -1;
+ }
+ ts.getRangePos = getRangePos;
+ function getRangeEnd(range) {
+ return range ? range.end : -1;
+ }
+ ts.getRangeEnd = getRangeEnd;
function movePos(pos, value) {
return ts.positionIsSynthesized(pos) ? -1 : pos + value;
}
@@ -7627,11 +7769,11 @@ var ts;
}
ts.getStartPositionOfRange = getStartPositionOfRange;
function isDeclarationNameOfEnumOrNamespace(node) {
- var parseNode = getParseTreeNode(node);
+ var parseNode = ts.getParseTreeNode(node);
if (parseNode) {
switch (parseNode.parent.kind) {
- case 229:
- case 230:
+ case 231:
+ case 232:
return parseNode === parseNode.parent.name;
}
}
@@ -7649,7 +7791,7 @@ var ts;
if (node.symbol) {
for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 226 && declaration !== node) {
+ if (declaration.kind === 228 && declaration !== node) {
return true;
}
}
@@ -7700,6 +7842,10 @@ var ts;
return node.kind === 70;
}
ts.isIdentifier = isIdentifier;
+ function isVoidExpression(node) {
+ return node.kind === 189;
+ }
+ ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
return isIdentifier(node) && node.autoGenerateKind > 0;
}
@@ -7709,16 +7855,16 @@ var ts;
}
ts.isModifier = isModifier;
function isQualifiedName(node) {
- return node.kind === 141;
+ return node.kind === 142;
}
ts.isQualifiedName = isQualifiedName;
function isComputedPropertyName(node) {
- return node.kind === 142;
+ return node.kind === 143;
}
ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
- return kind === 141
+ return kind === 142
|| kind === 70;
}
ts.isEntityName = isEntityName;
@@ -7727,7 +7873,7 @@ var ts;
return kind === 70
|| kind === 9
|| kind === 8
- || kind === 142;
+ || kind === 143;
}
ts.isPropertyName = isPropertyName;
function isModuleName(node) {
@@ -7739,101 +7885,105 @@ var ts;
function isBindingName(node) {
var kind = node.kind;
return kind === 70
- || kind === 172
- || kind === 173;
+ || kind === 173
+ || kind === 174;
}
ts.isBindingName = isBindingName;
function isTypeParameter(node) {
- return node.kind === 143;
+ return node.kind === 144;
}
ts.isTypeParameter = isTypeParameter;
function isParameter(node) {
- return node.kind === 144;
+ return node.kind === 145;
}
ts.isParameter = isParameter;
function isDecorator(node) {
- return node.kind === 145;
+ return node.kind === 146;
}
ts.isDecorator = isDecorator;
function isMethodDeclaration(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
ts.isMethodDeclaration = isMethodDeclaration;
function isClassElement(node) {
var kind = node.kind;
- return kind === 150
- || kind === 147
- || kind === 149
- || kind === 151
+ return kind === 151
+ || kind === 148
+ || kind === 150
|| kind === 152
- || kind === 155
- || kind === 203;
+ || kind === 153
+ || kind === 156
+ || kind === 205;
}
ts.isClassElement = isClassElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
- return kind === 257
- || kind === 258
- || kind === 259
- || kind === 149
- || kind === 151
+ return kind === 260
+ || kind === 261
+ || kind === 262
+ || kind === 150
|| kind === 152
- || kind === 244;
+ || kind === 153
+ || kind === 246;
}
ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
function isTypeNodeKind(kind) {
- return (kind >= 156 && kind <= 171)
+ return (kind >= 157 && kind <= 172)
|| kind === 118
|| kind === 132
+ || kind === 133
|| kind === 121
- || kind === 134
|| kind === 135
+ || kind === 136
+ || kind === 98
|| kind === 104
+ || kind === 138
+ || kind === 94
|| kind === 129
- || kind === 199;
+ || kind === 200;
}
function isTypeNode(node) {
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
function isArrayBindingPattern(node) {
- return node.kind === 173;
+ return node.kind === 174;
}
ts.isArrayBindingPattern = isArrayBindingPattern;
function isObjectBindingPattern(node) {
- return node.kind === 172;
+ return node.kind === 173;
}
ts.isObjectBindingPattern = isObjectBindingPattern;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
- return kind === 173
- || kind === 172;
+ return kind === 174
+ || kind === 173;
}
return false;
}
ts.isBindingPattern = isBindingPattern;
function isAssignmentPattern(node) {
var kind = node.kind;
- return kind === 175
- || kind === 176;
+ return kind === 176
+ || kind === 177;
}
ts.isAssignmentPattern = isAssignmentPattern;
function isBindingElement(node) {
- return node.kind === 174;
+ return node.kind === 175;
}
ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
- return kind === 174
- || kind === 198;
+ return kind === 175
+ || kind === 199;
}
ts.isArrayBindingElement = isArrayBindingElement;
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
- case 223:
- case 144:
- case 174:
+ case 225:
+ case 145:
+ case 175:
return true;
}
return false;
@@ -7846,8 +7996,8 @@ var ts;
ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern;
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 172:
- case 176:
+ case 173:
+ case 177:
return true;
}
return false;
@@ -7855,94 +8005,100 @@ var ts;
ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern;
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
+ case 174:
+ case 176:
return true;
}
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
function isArrayLiteralExpression(node) {
- return node.kind === 175;
+ return node.kind === 176;
}
ts.isArrayLiteralExpression = isArrayLiteralExpression;
function isObjectLiteralExpression(node) {
- return node.kind === 176;
+ return node.kind === 177;
}
ts.isObjectLiteralExpression = isObjectLiteralExpression;
function isPropertyAccessExpression(node) {
- return node.kind === 177;
+ return node.kind === 178;
}
ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isPropertyAccessOrQualifiedName(node) {
+ var kind = node.kind;
+ return kind === 178
+ || kind === 142;
+ }
+ ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
function isElementAccessExpression(node) {
- return node.kind === 178;
+ return node.kind === 179;
}
ts.isElementAccessExpression = isElementAccessExpression;
function isBinaryExpression(node) {
- return node.kind === 192;
+ return node.kind === 193;
}
ts.isBinaryExpression = isBinaryExpression;
function isConditionalExpression(node) {
- return node.kind === 193;
+ return node.kind === 194;
}
ts.isConditionalExpression = isConditionalExpression;
function isCallExpression(node) {
- return node.kind === 179;
+ return node.kind === 180;
}
ts.isCallExpression = isCallExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
- return kind === 194
+ return kind === 195
|| kind === 12;
}
ts.isTemplateLiteral = isTemplateLiteral;
function isSpreadExpression(node) {
- return node.kind === 196;
+ return node.kind === 197;
}
ts.isSpreadExpression = isSpreadExpression;
function isExpressionWithTypeArguments(node) {
- return node.kind === 199;
+ return node.kind === 200;
}
ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
- return kind === 177
- || kind === 178
- || kind === 180
+ return kind === 178
|| kind === 179
- || kind === 246
- || kind === 247
|| kind === 181
- || kind === 175
- || kind === 183
+ || kind === 180
+ || kind === 248
+ || kind === 249
+ || kind === 182
|| kind === 176
- || kind === 197
|| kind === 184
+ || kind === 177
+ || kind === 198
+ || kind === 185
|| kind === 70
|| kind === 11
|| kind === 8
|| kind === 9
|| kind === 12
- || kind === 194
+ || kind === 195
|| kind === 85
|| kind === 94
|| kind === 98
|| kind === 100
|| kind === 96
- || kind === 201
- || kind === 297;
+ || kind === 202
+ || kind === 203;
}
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
ts.isLeftHandSideExpression = isLeftHandSideExpression;
function isUnaryExpressionKind(kind) {
- return kind === 190
- || kind === 191
- || kind === 186
+ return kind === 191
+ || kind === 192
|| kind === 187
|| kind === 188
|| kind === 189
- || kind === 182
+ || kind === 190
+ || kind === 183
|| isLeftHandSideExpressionKind(kind);
}
function isUnaryExpression(node) {
@@ -7950,14 +8106,13 @@ var ts;
}
ts.isUnaryExpression = isUnaryExpression;
function isExpressionKind(kind) {
- return kind === 193
- || kind === 195
- || kind === 185
- || kind === 192
+ return kind === 194
|| kind === 196
- || kind === 200
- || kind === 198
- || kind === 297
+ || kind === 186
+ || kind === 193
+ || kind === 197
+ || kind === 201
+ || kind === 199
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -7966,16 +8121,16 @@ var ts;
ts.isExpression = isExpression;
function isAssertionExpression(node) {
var kind = node.kind;
- return kind === 182
- || kind === 200;
+ return kind === 183
+ || kind === 201;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 294;
+ return node.kind === 295;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 293;
+ return node.kind === 294;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -7984,15 +8139,15 @@ var ts;
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
function isOmittedExpression(node) {
- return node.kind === 198;
+ return node.kind === 199;
}
ts.isOmittedExpression = isOmittedExpression;
function isTemplateSpan(node) {
- return node.kind === 202;
+ return node.kind === 204;
}
ts.isTemplateSpan = isTemplateSpan;
function isBlock(node) {
- return node.kind === 204;
+ return node.kind === 206;
}
ts.isBlock = isBlock;
function isConciseBody(node) {
@@ -8010,121 +8165,135 @@ var ts;
}
ts.isForInitializer = isForInitializer;
function isVariableDeclaration(node) {
- return node.kind === 223;
+ return node.kind === 225;
}
ts.isVariableDeclaration = isVariableDeclaration;
function isVariableDeclarationList(node) {
- return node.kind === 224;
+ return node.kind === 226;
}
ts.isVariableDeclarationList = isVariableDeclarationList;
function isCaseBlock(node) {
- return node.kind === 232;
+ return node.kind === 234;
}
ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
- return kind === 231
- || kind === 230;
+ return kind === 233
+ || kind === 232
+ || kind === 70;
}
ts.isModuleBody = isModuleBody;
+ function isNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 233
+ || kind === 232;
+ }
+ ts.isNamespaceBody = isNamespaceBody;
+ function isJSDocNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 70
+ || kind === 232;
+ }
+ ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
function isImportEqualsDeclaration(node) {
- return node.kind === 234;
+ return node.kind === 236;
}
ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportClause(node) {
- return node.kind === 236;
+ return node.kind === 238;
}
ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
- return kind === 238
- || kind === 237;
+ return kind === 240
+ || kind === 239;
}
ts.isNamedImportBindings = isNamedImportBindings;
function isImportSpecifier(node) {
- return node.kind === 239;
+ return node.kind === 241;
}
ts.isImportSpecifier = isImportSpecifier;
function isNamedExports(node) {
- return node.kind === 242;
+ return node.kind === 244;
}
ts.isNamedExports = isNamedExports;
function isExportSpecifier(node) {
- return node.kind === 243;
+ return node.kind === 245;
}
ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
- return node.kind === 230 || node.kind === 229;
+ return node.kind === 232 || node.kind === 231;
}
ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
function isDeclarationKind(kind) {
- return kind === 185
- || kind === 174
- || kind === 226
- || kind === 197
- || kind === 150
- || kind === 229
- || kind === 260
- || kind === 243
- || kind === 225
- || kind === 184
+ return kind === 186
+ || kind === 175
+ || kind === 228
+ || kind === 198
|| kind === 151
- || kind === 236
- || kind === 234
- || kind === 239
+ || kind === 231
+ || kind === 263
+ || kind === 245
|| kind === 227
+ || kind === 185
+ || kind === 152
+ || kind === 238
+ || kind === 236
+ || kind === 241
+ || kind === 229
+ || kind === 252
+ || kind === 150
|| kind === 149
+ || kind === 232
+ || kind === 235
+ || kind === 239
+ || kind === 145
+ || kind === 260
|| kind === 148
+ || kind === 147
+ || kind === 153
+ || kind === 261
|| kind === 230
- || kind === 233
- || kind === 237
|| kind === 144
- || kind === 257
- || kind === 147
- || kind === 146
- || kind === 152
- || kind === 258
- || kind === 228
- || kind === 143
- || kind === 223
- || kind === 285;
+ || kind === 225
+ || kind === 289;
}
function isDeclarationStatementKind(kind) {
- return kind === 225
- || kind === 244
- || kind === 226
- || kind === 227
+ return kind === 227
+ || kind === 246
|| kind === 228
|| kind === 229
|| kind === 230
- || kind === 235
- || kind === 234
- || kind === 241
- || kind === 240
- || kind === 233;
+ || kind === 231
+ || kind === 232
+ || kind === 237
+ || kind === 236
+ || kind === 243
+ || kind === 242
+ || kind === 235;
}
function isStatementKindButNotDeclarationKind(kind) {
- return kind === 215
+ return kind === 217
+ || kind === 216
+ || kind === 224
+ || kind === 211
+ || kind === 209
+ || kind === 208
|| kind === 214
+ || kind === 215
+ || kind === 213
+ || kind === 210
+ || kind === 221
+ || kind === 218
+ || kind === 220
|| kind === 222
- || kind === 209
+ || kind === 223
|| kind === 207
- || kind === 206
|| kind === 212
- || kind === 213
- || kind === 211
- || kind === 208
|| kind === 219
- || kind === 216
- || kind === 218
- || kind === 220
- || kind === 221
- || kind === 205
- || kind === 210
- || kind === 217
- || kind === 293
- || kind === 296
- || kind === 295;
+ || kind === 294
+ || kind === 297
+ || kind === 296;
}
function isDeclaration(node) {
return isDeclarationKind(node.kind);
@@ -8142,87 +8311,98 @@ var ts;
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
|| isDeclarationStatementKind(kind)
- || kind === 204;
+ || kind === 206;
}
ts.isStatement = isStatement;
function isModuleReference(node) {
var kind = node.kind;
- return kind === 245
- || kind === 141
+ return kind === 247
+ || kind === 142
|| kind === 70;
}
ts.isModuleReference = isModuleReference;
function isJsxOpeningElement(node) {
- return node.kind === 248;
+ return node.kind === 250;
}
ts.isJsxOpeningElement = isJsxOpeningElement;
function isJsxClosingElement(node) {
- return node.kind === 249;
+ return node.kind === 251;
}
ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 98
|| kind === 70
- || kind === 177;
+ || kind === 178;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
function isJsxChild(node) {
var kind = node.kind;
- return kind === 246
- || kind === 252
- || kind === 247
+ return kind === 248
+ || kind === 255
+ || kind === 249
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
+ function isJsxAttributes(node) {
+ var kind = node.kind;
+ return kind === 253;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
- return kind === 250
- || kind === 251;
+ return kind === 252
+ || kind === 254;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
function isJsxSpreadAttribute(node) {
- return node.kind === 251;
+ return node.kind === 254;
}
ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxAttribute(node) {
- return node.kind === 250;
+ return node.kind === 252;
}
ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
- || kind === 252;
+ || kind === 255;
}
ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
+ function isJsxOpeningLikeElement(node) {
+ var kind = node.kind;
+ return kind === 250
+ || kind === 249;
+ }
+ ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
function isCaseOrDefaultClause(node) {
var kind = node.kind;
- return kind === 253
- || kind === 254;
+ return kind === 256
+ || kind === 257;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isHeritageClause(node) {
- return node.kind === 255;
+ return node.kind === 258;
}
ts.isHeritageClause = isHeritageClause;
function isCatchClause(node) {
- return node.kind === 256;
+ return node.kind === 259;
}
ts.isCatchClause = isCatchClause;
function isPropertyAssignment(node) {
- return node.kind === 257;
+ return node.kind === 260;
}
ts.isPropertyAssignment = isPropertyAssignment;
function isShorthandPropertyAssignment(node) {
- return node.kind === 258;
+ return node.kind === 261;
}
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
function isEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
ts.isEnumMember = isEnumMember;
function isSourceFile(node) {
- return node.kind === 261;
+ return node.kind === 264;
}
ts.isSourceFile = isSourceFile;
function isWatchSet(options) {
@@ -8234,10 +8414,11 @@ var ts;
function getDefaultLibFileName(options) {
switch (options.target) {
case 5:
+ return "lib.esnext.full.d.ts";
case 4:
- return "lib.es2017.d.ts";
+ return "lib.es2017.full.d.ts";
case 3:
- return "lib.es2016.d.ts";
+ return "lib.es2016.full.d.ts";
case 2:
return "lib.es6.d.ts";
default:
@@ -8361,9 +8542,9 @@ var ts;
}
ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
function getTypeParameterOwner(d) {
- if (d && d.kind === 143) {
+ if (d && d.kind === 144) {
for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 227) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) {
return current;
}
}
@@ -8371,11 +8552,11 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 150 && ts.isClassLike(node.parent.parent);
+ return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent);
}
ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 174 || ts.isBindingPattern(node))) {
+ while (node && (node.kind === 175 || ts.isBindingPattern(node))) {
node = node.parent;
}
return node;
@@ -8383,14 +8564,14 @@ var ts;
function getCombinedModifierFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = ts.getModifierFlags(node);
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= ts.getModifierFlags(node);
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= ts.getModifierFlags(node);
}
return flags;
@@ -8399,14 +8580,14 @@ var ts;
function getCombinedNodeFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = node.flags;
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= node.flags;
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= node.flags;
}
return flags;
@@ -8459,24 +8640,46 @@ var ts;
}
}
ts.validateLocaleAndSetLanguage = validateLocaleAndSetLanguage;
+ function getOriginalNode(node, nodeTest) {
+ if (node) {
+ while (node.original !== undefined) {
+ node = node.original;
+ }
+ }
+ return !nodeTest || nodeTest(node) ? node : undefined;
+ }
+ ts.getOriginalNode = getOriginalNode;
+ function isParseTreeNode(node) {
+ return (node.flags & 8) === 0;
+ }
+ ts.isParseTreeNode = isParseTreeNode;
+ function getParseTreeNode(node, nodeTest) {
+ if (node === undefined || isParseTreeNode(node)) {
+ return node;
+ }
+ node = getOriginalNode(node);
+ if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
+ return node;
+ }
+ return undefined;
+ }
+ ts.getParseTreeNode = getParseTreeNode;
+ function unescapeIdentifier(identifier) {
+ return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
+ }
+ ts.unescapeIdentifier = unescapeIdentifier;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var NodeConstructor;
- var SourceFileConstructor;
- function createNode(kind, location, flags) {
- var ConstructorForKind = kind === 261
- ? (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))
- : (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()));
- var node = location
- ? new ConstructorForKind(kind, location.pos, location.end)
- : new ConstructorForKind(kind, -1, -1);
- node.flags = flags | 8;
+ function createSynthesizedNode(kind) {
+ var node = ts.createNode(kind, -1, -1);
+ node.flags |= 8;
return node;
}
function updateNode(updated, original) {
if (updated !== original) {
setOriginalNode(updated, original);
+ setTextRange(updated, original);
if (original.startsOnNewLine) {
updated.startsOnNewLine = true;
}
@@ -8485,7 +8688,7 @@ var ts;
return updated;
}
ts.updateNode = updateNode;
- function createNodeArray(elements, location, hasTrailingComma) {
+ function createNodeArray(elements, hasTrailingComma) {
if (elements) {
if (ts.isNodeArray(elements)) {
return elements;
@@ -8495,32 +8698,15 @@ var ts;
elements = [];
}
var array = elements;
- if (location) {
- array.pos = location.pos;
- array.end = location.end;
- }
- else {
- array.pos = -1;
- array.end = -1;
- }
- if (hasTrailingComma) {
- array.hasTrailingComma = true;
- }
+ array.pos = -1;
+ array.end = -1;
+ array.hasTrailingComma = hasTrailingComma;
return array;
}
ts.createNodeArray = createNodeArray;
- function createSynthesizedNode(kind, startsOnNewLine) {
- var node = createNode(kind, undefined);
- node.startsOnNewLine = startsOnNewLine;
- return node;
- }
- ts.createSynthesizedNode = createSynthesizedNode;
- function createSynthesizedNodeArray(elements) {
- return createNodeArray(elements, undefined);
- }
- ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
function getSynthesizedClone(node) {
- var clone = createNode(node.kind, undefined, node.flags);
+ var clone = createSynthesizedNode(node.kind);
+ clone.flags |= node.flags;
setOriginalNode(clone, node);
for (var key in node) {
if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) {
@@ -8531,50 +8717,48 @@ var ts;
return clone;
}
ts.getSynthesizedClone = getSynthesizedClone;
- function getMutableClone(node) {
- var clone = getSynthesizedClone(node);
- clone.pos = node.pos;
- clone.end = node.end;
- clone.parent = node.parent;
- return clone;
- }
- ts.getMutableClone = getMutableClone;
- function createLiteral(value, location) {
+ function createLiteral(value) {
if (typeof value === "number") {
- var node = createNode(8, location, undefined);
- node.text = value.toString();
- return node;
+ return createNumericLiteral(value + "");
}
- else if (typeof value === "boolean") {
- return createNode(value ? 100 : 85, location, undefined);
+ if (typeof value === "boolean") {
+ return value ? createTrue() : createFalse();
}
- else if (typeof value === "string") {
- var node = createNode(9, location, undefined);
- node.text = value;
- return node;
- }
- else if (value) {
- var node = createNode(9, location, undefined);
- node.textSourceNode = value;
- node.text = value.text;
- return node;
+ if (typeof value === "string") {
+ return createStringLiteral(value);
}
+ return createLiteralFromNode(value);
}
ts.createLiteral = createLiteral;
- var nextAutoGenerateId = 0;
- function createIdentifier(text, location) {
- var node = createNode(70, location);
+ function createNumericLiteral(value) {
+ var node = createSynthesizedNode(8);
+ node.text = value;
+ node.numericLiteralFlags = 0;
+ return node;
+ }
+ ts.createNumericLiteral = createNumericLiteral;
+ function createStringLiteral(text) {
+ var node = createSynthesizedNode(9);
+ node.text = text;
+ return node;
+ }
+ function createLiteralFromNode(sourceNode) {
+ var node = createStringLiteral(sourceNode.text);
+ node.textSourceNode = sourceNode;
+ return node;
+ }
+ function createIdentifier(text) {
+ var node = createSynthesizedNode(70);
node.text = ts.escapeIdentifier(text);
- node.originalKeywordKind = ts.stringToToken(text);
+ node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
return node;
}
ts.createIdentifier = createIdentifier;
- function createTempVariable(recordTempVariable, location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ var nextAutoGenerateId = 0;
+ function createTempVariable(recordTempVariable) {
+ var name = createIdentifier("");
name.autoGenerateKind = 1;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
@@ -8584,93 +8768,387 @@ var ts;
return name;
}
ts.createTempVariable = createTempVariable;
- function createLoopVariable(location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ function createLoopVariable() {
+ var name = createIdentifier("");
name.autoGenerateKind = 2;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createLoopVariable = createLoopVariable;
- function createUniqueName(text, location) {
- var name = createNode(70, location);
- name.text = text;
- name.originalKeywordKind = 0;
+ function createUniqueName(text) {
+ var name = createIdentifier(text);
name.autoGenerateKind = 3;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createUniqueName = createUniqueName;
- function getGeneratedNameForNode(node, location) {
- var name = createNode(70, location);
- name.original = node;
- name.text = "";
- name.originalKeywordKind = 0;
+ function getGeneratedNameForNode(node) {
+ var name = createIdentifier("");
name.autoGenerateKind = 4;
name.autoGenerateId = nextAutoGenerateId;
+ name.original = node;
nextAutoGenerateId++;
return name;
}
ts.getGeneratedNameForNode = getGeneratedNameForNode;
function createToken(token) {
- return createNode(token);
+ return createSynthesizedNode(token);
}
ts.createToken = createToken;
function createSuper() {
- var node = createNode(96);
- return node;
+ return createSynthesizedNode(96);
}
ts.createSuper = createSuper;
- function createThis(location) {
- var node = createNode(98, location);
- return node;
+ function createThis() {
+ return createSynthesizedNode(98);
}
ts.createThis = createThis;
function createNull() {
- var node = createNode(94);
- return node;
+ return createSynthesizedNode(94);
}
ts.createNull = createNull;
- function createComputedPropertyName(expression, location) {
- var node = createNode(142, location);
+ function createTrue() {
+ return createSynthesizedNode(100);
+ }
+ ts.createTrue = createTrue;
+ function createFalse() {
+ return createSynthesizedNode(85);
+ }
+ ts.createFalse = createFalse;
+ function createQualifiedName(left, right) {
+ var node = createSynthesizedNode(142);
+ node.left = left;
+ node.right = asName(right);
+ return node;
+ }
+ ts.createQualifiedName = createQualifiedName;
+ function updateQualifiedName(node, left, right) {
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createQualifiedName(left, right), node)
+ : node;
+ }
+ ts.updateQualifiedName = updateQualifiedName;
+ function createComputedPropertyName(expression) {
+ var node = createSynthesizedNode(143);
node.expression = expression;
return node;
}
ts.createComputedPropertyName = createComputedPropertyName;
function updateComputedPropertyName(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createComputedPropertyName(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createComputedPropertyName(expression), node)
+ : node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer, location, flags) {
- var node = createNode(144, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var signatureDeclaration = createSynthesizedNode(kind);
+ signatureDeclaration.typeParameters = asNodeArray(typeParameters);
+ signatureDeclaration.parameters = asNodeArray(parameters);
+ signatureDeclaration.type = type;
+ return signatureDeclaration;
+ }
+ ts.createSignatureDeclaration = createSignatureDeclaration;
+ function updateSignatureDeclaration(node, typeParameters, parameters, type) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ ? updateNode(createSignatureDeclaration(node.kind, typeParameters, parameters, type), node)
+ : node;
+ }
+ function createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(159, typeParameters, parameters, type);
+ }
+ ts.createFunctionTypeNode = createFunctionTypeNode;
+ function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateFunctionTypeNode = updateFunctionTypeNode;
+ function createConstructorTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(154, typeParameters, parameters, type);
+ }
+ ts.createCallSignatureDeclaration = createCallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type);
+ methodSignature.name = asName(name);
+ methodSignature.questionToken = questionToken;
+ return methodSignature;
+ }
+ ts.createMethodSignature = createMethodSignature;
+ function updateMethodSignature(node, typeParameters, parameters, type, name, questionToken) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.name !== name
+ || node.questionToken !== questionToken
+ ? updateNode(createMethodSignature(typeParameters, parameters, type, name, questionToken), node)
+ : node;
+ }
+ ts.updateMethodSignature = updateMethodSignature;
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createThisTypeNode() {
+ return createSynthesizedNode(168);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createLiteralTypeNode(literal) {
+ var literalTypeNode = createSynthesizedNode(172);
+ literalTypeNode.literal = literal;
+ return literalTypeNode;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
+ function createTypeReferenceNode(typeName, typeArguments) {
+ var typeReference = createSynthesizedNode(158);
+ typeReference.typeName = asName(typeName);
+ typeReference.typeArguments = asNodeArray(typeArguments);
+ return typeReference;
+ }
+ ts.createTypeReferenceNode = createTypeReferenceNode;
+ function updateTypeReferenceNode(node, typeName, typeArguments) {
+ return node.typeName !== typeName
+ || node.typeArguments !== typeArguments
+ ? updateNode(createTypeReferenceNode(typeName, typeArguments), node)
+ : node;
+ }
+ ts.updateTypeReferenceNode = updateTypeReferenceNode;
+ function createTypePredicateNode(parameterName, type) {
+ var typePredicateNode = createSynthesizedNode(157);
+ typePredicateNode.parameterName = asName(parameterName);
+ typePredicateNode.type = type;
+ return typePredicateNode;
+ }
+ ts.createTypePredicateNode = createTypePredicateNode;
+ function updateTypePredicateNode(node, parameterName, type) {
+ return node.parameterName !== parameterName
+ || node.type !== type
+ ? updateNode(createTypePredicateNode(parameterName, type), node)
+ : node;
+ }
+ ts.updateTypePredicateNode = updateTypePredicateNode;
+ function createTypeQueryNode(exprName) {
+ var typeQueryNode = createSynthesizedNode(161);
+ typeQueryNode.exprName = exprName;
+ return typeQueryNode;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName ? updateNode(createTypeQueryNode(exprName), node) : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createArrayTypeNode(elementType) {
+ var arrayTypeNode = createSynthesizedNode(163);
+ arrayTypeNode.elementType = elementType;
+ return arrayTypeNode;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var unionTypeNode = createSynthesizedNode(kind);
+ unionTypeNode.types = createNodeArray(types);
+ return unionTypeNode;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members) {
+ var typeLiteralNode = createSynthesizedNode(162);
+ typeLiteralNode.members = createNodeArray(members);
+ return typeLiteralNode;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createTupleTypeNode(elementTypes) {
+ var tupleTypeNode = createSynthesizedNode(164);
+ tupleTypeNode.elementTypes = createNodeArray(elementTypes);
+ return tupleTypeNode;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var mappedTypeNode = createSynthesizedNode(171);
+ mappedTypeNode.readonlyToken = readonlyToken;
+ mappedTypeNode.typeParameter = typeParameter;
+ mappedTypeNode.questionToken = questionToken;
+ mappedTypeNode.type = type;
+ return mappedTypeNode;
+ }
+ ts.createMappedTypeNode = createMappedTypeNode;
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, questionToken, type) {
+ return node.readonlyToken !== readonlyToken
+ || node.typeParameter !== typeParameter
+ || node.questionToken !== questionToken
+ || node.type !== type
+ ? updateNode(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node)
+ : node;
+ }
+ ts.updateMappedTypeNode = updateMappedTypeNode;
+ function createTypeOperatorNode(type) {
+ var typeOperatorNode = createSynthesizedNode(169);
+ typeOperatorNode.operator = 126;
+ typeOperatorNode.type = type;
+ return typeOperatorNode;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var indexedAccessTypeNode = createSynthesizedNode(170);
+ indexedAccessTypeNode.objectType = objectType;
+ indexedAccessTypeNode.indexType = indexType;
+ return indexedAccessTypeNode;
+ }
+ ts.createIndexedAccessTypeNode = createIndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node, objectType, indexType) {
+ return node.objectType !== objectType
+ || node.indexType !== indexType
+ ? updateNode(createIndexedAccessTypeNode(objectType, indexType), node)
+ : node;
+ }
+ ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name, constraint, defaultType) {
+ var typeParameter = createSynthesizedNode(144);
+ typeParameter.name = asName(name);
+ typeParameter.constraint = constraint;
+ typeParameter.default = defaultType;
+ return typeParameter;
+ }
+ ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
+ return node.name !== name
+ || node.constraint !== constraint
+ || node.default !== defaultType
+ ? updateNode(createTypeParameterDeclaration(name, constraint, defaultType), node)
+ : node;
+ }
+ ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
+ function createPropertySignature(name, questionToken, type, initializer) {
+ var propertySignature = createSynthesizedNode(147);
+ propertySignature.name = asName(name);
+ propertySignature.questionToken = questionToken;
+ propertySignature.type = type;
+ propertySignature.initializer = initializer;
+ return propertySignature;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, name, questionToken, type, initializer) {
+ return node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
+ function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) {
+ var indexSignature = createSynthesizedNode(156);
+ indexSignature.decorators = asNodeArray(decorators);
+ indexSignature.modifiers = asNodeArray(modifiers);
+ indexSignature.parameters = createNodeArray(parameters);
+ indexSignature.type = type;
+ return indexSignature;
+ }
+ ts.createIndexSignatureDeclaration = createIndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignatureDeclaration(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration;
+ function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(145);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
- node.initializer = initializer ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createParameter = createParameter;
- function updateParameter(node, decorators, modifiers, dotDotDotToken, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer, node, node.flags), node);
- }
- return node;
+ function updateParameter(node, decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateParameter = updateParameter;
- function createProperty(decorators, modifiers, name, questionToken, type, initializer, location) {
- var node = createNode(147, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createDecorator(expression) {
+ var node = createSynthesizedNode(146);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createDecorator = createDecorator;
+ function updateDecorator(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createDecorator(expression), node)
+ : node;
+ }
+ ts.updateDecorator = updateDecorator;
+ function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
node.initializer = initializer;
@@ -8678,36 +9156,46 @@ var ts;
}
ts.createProperty = createProperty;
function updateProperty(node, decorators, modifiers, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateProperty = updateProperty;
- function createMethod(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(149, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(150);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
- ts.createMethod = createMethod;
- function updateMethod(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createMethod(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ ts.createMethodDeclaration = createMethodDeclaration;
+ function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateMethod = updateMethod;
- function createConstructor(decorators, modifiers, parameters, body, location, flags) {
- var node = createNode(150, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createConstructor(decorators, modifiers, parameters, body) {
+ var node = createSynthesizedNode(151);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = undefined;
@@ -8716,17 +9204,19 @@ var ts;
}
ts.createConstructor = createConstructor;
function updateConstructor(node, decorators, modifiers, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body) {
- return updateNode(createConstructor(decorators, modifiers, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createConstructor(decorators, modifiers, parameters, body), node)
+ : node;
}
ts.updateConstructor = updateConstructor;
- function createGetAccessor(decorators, modifiers, name, parameters, type, body, location, flags) {
- var node = createNode(151, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createGetAccessor(decorators, modifiers, name, parameters, type, body) {
+ var node = createSynthesizedNode(152);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = type;
@@ -8735,17 +9225,21 @@ var ts;
}
ts.createGetAccessor = createGetAccessor;
function updateGetAccessor(node, decorators, modifiers, name, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body), node)
+ : node;
}
ts.updateGetAccessor = updateGetAccessor;
- function createSetAccessor(decorators, modifiers, name, parameters, body, location, flags) {
- var node = createNode(152, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createSetAccessor(decorators, modifiers, name, parameters, body) {
+ var node = createSynthesizedNode(153);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.body = body;
@@ -8753,57 +9247,60 @@ var ts;
}
ts.createSetAccessor = createSetAccessor;
function updateSetAccessor(node, decorators, modifiers, name, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body) {
- return updateNode(createSetAccessor(decorators, modifiers, name, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createSetAccessor(decorators, modifiers, name, parameters, body), node)
+ : node;
}
ts.updateSetAccessor = updateSetAccessor;
- function createObjectBindingPattern(elements, location) {
- var node = createNode(172, location);
+ function createObjectBindingPattern(elements) {
+ var node = createSynthesizedNode(173);
node.elements = createNodeArray(elements);
return node;
}
ts.createObjectBindingPattern = createObjectBindingPattern;
function updateObjectBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createObjectBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createObjectBindingPattern(elements), node)
+ : node;
}
ts.updateObjectBindingPattern = updateObjectBindingPattern;
- function createArrayBindingPattern(elements, location) {
- var node = createNode(173, location);
+ function createArrayBindingPattern(elements) {
+ var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
return node;
}
ts.createArrayBindingPattern = createArrayBindingPattern;
function updateArrayBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayBindingPattern(elements), node)
+ : node;
}
ts.updateArrayBindingPattern = updateArrayBindingPattern;
- function createBindingElement(propertyName, dotDotDotToken, name, initializer, location) {
- var node = createNode(174, location);
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+ var node = createSynthesizedNode(175);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
node.initializer = initializer;
return node;
}
ts.createBindingElement = createBindingElement;
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
- if (node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer) {
- return updateNode(createBindingElement(propertyName, dotDotDotToken, name, initializer, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createBindingElement(dotDotDotToken, propertyName, name, initializer), node)
+ : node;
}
ts.updateBindingElement = updateBindingElement;
- function createArrayLiteral(elements, location, multiLine) {
- var node = createNode(175, location);
- node.elements = parenthesizeListElements(createNodeArray(elements));
+ function createArrayLiteral(elements, multiLine) {
+ var node = createSynthesizedNode(176);
+ node.elements = ts.parenthesizeListElements(createNodeArray(elements));
if (multiLine) {
node.multiLine = true;
}
@@ -8811,14 +9308,13 @@ var ts;
}
ts.createArrayLiteral = createArrayLiteral;
function updateArrayLiteral(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayLiteral(elements, node, node.multiLine), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayLiteral(elements, node.multiLine), node)
+ : node;
}
ts.updateArrayLiteral = updateArrayLiteral;
- function createObjectLiteral(properties, location, multiLine) {
- var node = createNode(176, location);
+ function createObjectLiteral(properties, multiLine) {
+ var node = createSynthesizedNode(177);
node.properties = createNodeArray(properties);
if (multiLine) {
node.multiLine = true;
@@ -8827,431 +9323,461 @@ var ts;
}
ts.createObjectLiteral = createObjectLiteral;
function updateObjectLiteral(node, properties) {
- if (node.properties !== properties) {
- return updateNode(createObjectLiteral(properties, node, node.multiLine), node);
- }
- return node;
+ return node.properties !== properties
+ ? updateNode(createObjectLiteral(properties, node.multiLine), node)
+ : node;
}
ts.updateObjectLiteral = updateObjectLiteral;
- function createPropertyAccess(expression, name, location, flags) {
- var node = createNode(177, location, flags);
- node.expression = parenthesizeForAccess(expression);
- (node.emitNode || (node.emitNode = {})).flags |= 65536;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAccess(expression, name) {
+ var node = createSynthesizedNode(178);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.name = asName(name);
+ setEmitFlags(node, 65536);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
function updatePropertyAccess(node, expression, name) {
- if (node.expression !== expression || node.name !== name) {
- var propertyAccess = createPropertyAccess(expression, name, node, node.flags);
- (propertyAccess.emitNode || (propertyAccess.emitNode = {})).flags = getEmitFlags(node);
- return updateNode(propertyAccess, node);
- }
- return node;
+ return node.expression !== expression
+ || node.name !== name
+ ? updateNode(setEmitFlags(createPropertyAccess(expression, name), getEmitFlags(node)), node)
+ : node;
}
ts.updatePropertyAccess = updatePropertyAccess;
- function createElementAccess(expression, index, location) {
- var node = createNode(178, location);
- node.expression = parenthesizeForAccess(expression);
- node.argumentExpression = typeof index === "number" ? createLiteral(index) : index;
+ function createElementAccess(expression, index) {
+ var node = createSynthesizedNode(179);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.argumentExpression = asExpression(index);
return node;
}
ts.createElementAccess = createElementAccess;
function updateElementAccess(node, expression, argumentExpression) {
- if (node.expression !== expression || node.argumentExpression !== argumentExpression) {
- return updateNode(createElementAccess(expression, argumentExpression, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.argumentExpression !== argumentExpression
+ ? updateNode(createElementAccess(expression, argumentExpression), node)
+ : node;
}
ts.updateElementAccess = updateElementAccess;
- function createCall(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(179, location, flags);
- node.expression = parenthesizeForAccess(expression);
- if (typeArguments) {
- node.typeArguments = createNodeArray(typeArguments);
- }
- node.arguments = parenthesizeListElements(createNodeArray(argumentsArray));
+ function createCall(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(180);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray));
return node;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- if (expression !== node.expression || typeArguments !== node.typeArguments || argumentsArray !== node.arguments) {
- return updateNode(createCall(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return expression !== node.expression
+ || typeArguments !== node.typeArguments
+ || argumentsArray !== node.arguments
+ ? updateNode(createCall(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateCall = updateCall;
- function createNew(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(180, location, flags);
- node.expression = parenthesizeForNew(expression);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.arguments = argumentsArray ? parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
+ function createNew(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(181);
+ node.expression = ts.parenthesizeForNew(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
return node;
}
ts.createNew = createNew;
function updateNew(node, expression, typeArguments, argumentsArray) {
- if (node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray) {
- return updateNode(createNew(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
+ ? updateNode(createNew(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateNew = updateNew;
- function createTaggedTemplate(tag, template, location) {
- var node = createNode(181, location);
- node.tag = parenthesizeForAccess(tag);
+ function createTaggedTemplate(tag, template) {
+ var node = createSynthesizedNode(182);
+ node.tag = ts.parenthesizeForAccess(tag);
node.template = template;
return node;
}
ts.createTaggedTemplate = createTaggedTemplate;
function updateTaggedTemplate(node, tag, template) {
- if (node.tag !== tag || node.template !== template) {
- return updateNode(createTaggedTemplate(tag, template, node), node);
- }
- return node;
+ return node.tag !== tag
+ || node.template !== template
+ ? updateNode(createTaggedTemplate(tag, template), node)
+ : node;
}
ts.updateTaggedTemplate = updateTaggedTemplate;
- function createParen(expression, location) {
- var node = createNode(183, location);
+ function createTypeAssertion(type, expression) {
+ var node = createSynthesizedNode(183);
+ node.type = type;
+ node.expression = ts.parenthesizePrefixOperand(expression);
+ return node;
+ }
+ ts.createTypeAssertion = createTypeAssertion;
+ function updateTypeAssertion(node, type, expression) {
+ return node.type !== type
+ || node.expression !== expression
+ ? updateNode(createTypeAssertion(type, expression), node)
+ : node;
+ }
+ ts.updateTypeAssertion = updateTypeAssertion;
+ function createParen(expression) {
+ var node = createSynthesizedNode(184);
node.expression = expression;
return node;
}
ts.createParen = createParen;
function updateParen(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createParen(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createParen(expression), node)
+ : node;
}
ts.updateParen = updateParen;
- function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(184, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(185);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionExpression = createFunctionExpression;
- function updateFunctionExpression(node, modifiers, name, typeParameters, parameters, type, body) {
- if (node.name !== name || node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionExpression(modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.name !== name
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionExpression = updateFunctionExpression;
- function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body, location, flags) {
- var node = createNode(185, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+ var node = createSynthesizedNode(186);
+ node.modifiers = asNodeArray(modifiers);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35);
- node.body = parenthesizeConciseBody(body);
+ node.body = ts.parenthesizeConciseBody(body);
return node;
}
ts.createArrowFunction = createArrowFunction;
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, body) {
- if (node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body), node)
+ : node;
}
ts.updateArrowFunction = updateArrowFunction;
- function createDelete(expression, location) {
- var node = createNode(186, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createDelete(expression) {
+ var node = createSynthesizedNode(187);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createDelete = createDelete;
function updateDelete(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createDelete(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createDelete(expression), node)
+ : node;
}
ts.updateDelete = updateDelete;
- function createTypeOf(expression, location) {
- var node = createNode(187, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createTypeOf(expression) {
+ var node = createSynthesizedNode(188);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createTypeOf = createTypeOf;
function updateTypeOf(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createTypeOf(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createTypeOf(expression), node)
+ : node;
}
ts.updateTypeOf = updateTypeOf;
- function createVoid(expression, location) {
- var node = createNode(188, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createVoid(expression) {
+ var node = createSynthesizedNode(189);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createVoid = createVoid;
function updateVoid(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createVoid(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createVoid(expression), node)
+ : node;
}
ts.updateVoid = updateVoid;
- function createAwait(expression, location) {
- var node = createNode(189, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createAwait(expression) {
+ var node = createSynthesizedNode(190);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createAwait = createAwait;
function updateAwait(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createAwait(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createAwait(expression), node)
+ : node;
}
ts.updateAwait = updateAwait;
- function createPrefix(operator, operand, location) {
- var node = createNode(190, location);
+ function createPrefix(operator, operand) {
+ var node = createSynthesizedNode(191);
node.operator = operator;
- node.operand = parenthesizePrefixOperand(operand);
+ node.operand = ts.parenthesizePrefixOperand(operand);
return node;
}
ts.createPrefix = createPrefix;
function updatePrefix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPrefix(node.operator, operand, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPrefix(node.operator, operand), node)
+ : node;
}
ts.updatePrefix = updatePrefix;
- function createPostfix(operand, operator, location) {
- var node = createNode(191, location);
- node.operand = parenthesizePostfixOperand(operand);
+ function createPostfix(operand, operator) {
+ var node = createSynthesizedNode(192);
+ node.operand = ts.parenthesizePostfixOperand(operand);
node.operator = operator;
return node;
}
ts.createPostfix = createPostfix;
function updatePostfix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPostfix(operand, node.operator, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPostfix(operand, node.operator), node)
+ : node;
}
ts.updatePostfix = updatePostfix;
- function createBinary(left, operator, right, location) {
- var operatorToken = typeof operator === "number" ? createToken(operator) : operator;
+ function createBinary(left, operator, right) {
+ var node = createSynthesizedNode(193);
+ var operatorToken = asToken(operator);
var operatorKind = operatorToken.kind;
- var node = createNode(192, location);
- node.left = parenthesizeBinaryOperand(operatorKind, left, true, undefined);
+ node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined);
node.operatorToken = operatorToken;
- node.right = parenthesizeBinaryOperand(operatorKind, right, false, node.left);
+ node.right = ts.parenthesizeBinaryOperand(operatorKind, right, false, node.left);
return node;
}
ts.createBinary = createBinary;
function updateBinary(node, left, right) {
- if (node.left !== left || node.right !== right) {
- return updateNode(createBinary(left, node.operatorToken, right, node), node);
- }
- return node;
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createBinary(left, node.operatorToken, right), node)
+ : node;
}
ts.updateBinary = updateBinary;
- function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonTokenOrLocation, whenFalse, location) {
- var node = createNode(193, whenFalse ? location : colonTokenOrLocation);
- node.condition = parenthesizeForConditionalHead(condition);
- if (whenFalse) {
- node.questionToken = questionTokenOrWhenTrue;
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- node.colonToken = colonTokenOrLocation;
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenFalse);
- }
- else {
- node.questionToken = createToken(54);
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(questionTokenOrWhenTrue);
- node.colonToken = createToken(55);
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- }
+ function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
+ var node = createSynthesizedNode(194);
+ node.condition = ts.parenthesizeForConditionalHead(condition);
+ node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54);
+ node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue);
+ node.colonToken = whenFalse ? colonToken : createToken(55);
+ node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse);
return node;
}
ts.createConditional = createConditional;
function updateConditional(node, condition, whenTrue, whenFalse) {
- if (node.condition !== condition || node.whenTrue !== whenTrue || node.whenFalse !== whenFalse) {
- return updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse, node), node);
- }
- return node;
+ return node.condition !== condition
+ || node.whenTrue !== whenTrue
+ || node.whenFalse !== whenFalse
+ ? updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse), node)
+ : node;
}
ts.updateConditional = updateConditional;
- function createTemplateExpression(head, templateSpans, location) {
- var node = createNode(194, location);
+ function createTemplateExpression(head, templateSpans) {
+ var node = createSynthesizedNode(195);
node.head = head;
node.templateSpans = createNodeArray(templateSpans);
return node;
}
ts.createTemplateExpression = createTemplateExpression;
function updateTemplateExpression(node, head, templateSpans) {
- if (node.head !== head || node.templateSpans !== templateSpans) {
- return updateNode(createTemplateExpression(head, templateSpans, node), node);
- }
- return node;
+ return node.head !== head
+ || node.templateSpans !== templateSpans
+ ? updateNode(createTemplateExpression(head, templateSpans), node)
+ : node;
}
ts.updateTemplateExpression = updateTemplateExpression;
- function createYield(asteriskToken, expression, location) {
- var node = createNode(195, location);
- node.asteriskToken = asteriskToken;
- node.expression = expression;
+ function createYield(asteriskTokenOrExpression, expression) {
+ var node = createSynthesizedNode(196);
+ node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined;
+ node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression;
return node;
}
ts.createYield = createYield;
- function updateYield(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createYield(node.asteriskToken, expression, node), node);
- }
- return node;
+ function updateYield(node, asteriskToken, expression) {
+ return node.expression !== expression
+ || node.asteriskToken !== asteriskToken
+ ? updateNode(createYield(asteriskToken, expression), node)
+ : node;
}
ts.updateYield = updateYield;
- function createSpread(expression, location) {
- var node = createNode(196, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSpread(expression) {
+ var node = createSynthesizedNode(197);
+ node.expression = ts.parenthesizeExpressionForList(expression);
return node;
}
ts.createSpread = createSpread;
function updateSpread(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpread(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpread(expression), node)
+ : node;
}
ts.updateSpread = updateSpread;
- function createClassExpression(modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(197, location);
+ function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(198);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassExpression = createClassExpression;
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassExpression = updateClassExpression;
- function createOmittedExpression(location) {
- var node = createNode(198, location);
- return node;
+ function createOmittedExpression() {
+ return createSynthesizedNode(199);
}
ts.createOmittedExpression = createOmittedExpression;
- function createExpressionWithTypeArguments(typeArguments, expression, location) {
- var node = createNode(199, location);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.expression = parenthesizeForAccess(expression);
+ function createExpressionWithTypeArguments(typeArguments, expression) {
+ var node = createSynthesizedNode(200);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
return node;
}
ts.createExpressionWithTypeArguments = createExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node, typeArguments, expression) {
- if (node.typeArguments !== typeArguments || node.expression !== expression) {
- return updateNode(createExpressionWithTypeArguments(typeArguments, expression, node), node);
- }
- return node;
+ return node.typeArguments !== typeArguments
+ || node.expression !== expression
+ ? updateNode(createExpressionWithTypeArguments(typeArguments, expression), node)
+ : node;
}
ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments;
- function createTemplateSpan(expression, literal, location) {
- var node = createNode(202, location);
+ function createAsExpression(expression, type) {
+ var node = createSynthesizedNode(201);
+ node.expression = expression;
+ node.type = type;
+ return node;
+ }
+ ts.createAsExpression = createAsExpression;
+ function updateAsExpression(node, expression, type) {
+ return node.expression !== expression
+ || node.type !== type
+ ? updateNode(createAsExpression(expression, type), node)
+ : node;
+ }
+ ts.updateAsExpression = updateAsExpression;
+ function createNonNullExpression(expression) {
+ var node = createSynthesizedNode(202);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createNonNullExpression = createNonNullExpression;
+ function updateNonNullExpression(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createNonNullExpression(expression), node)
+ : node;
+ }
+ ts.updateNonNullExpression = updateNonNullExpression;
+ function createTemplateSpan(expression, literal) {
+ var node = createSynthesizedNode(204);
node.expression = expression;
node.literal = literal;
return node;
}
ts.createTemplateSpan = createTemplateSpan;
function updateTemplateSpan(node, expression, literal) {
- if (node.expression !== expression || node.literal !== literal) {
- return updateNode(createTemplateSpan(expression, literal, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.literal !== literal
+ ? updateNode(createTemplateSpan(expression, literal), node)
+ : node;
}
ts.updateTemplateSpan = updateTemplateSpan;
- function createBlock(statements, location, multiLine, flags) {
- var block = createNode(204, location, flags);
+ function createBlock(statements, multiLine) {
+ var block = createSynthesizedNode(206);
block.statements = createNodeArray(statements);
- if (multiLine) {
- block.multiLine = true;
- }
+ if (multiLine)
+ block.multiLine = multiLine;
return block;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- if (statements !== node.statements) {
- return updateNode(createBlock(statements, node, node.multiLine, node.flags), node);
- }
- return node;
+ return statements !== node.statements
+ ? updateNode(createBlock(statements, node.multiLine), node)
+ : node;
}
ts.updateBlock = updateBlock;
- function createVariableStatement(modifiers, declarationList, location, flags) {
- var node = createNode(205, location, flags);
+ function createVariableStatement(modifiers, declarationList) {
+ var node = createSynthesizedNode(207);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ node.modifiers = asNodeArray(modifiers);
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
return node;
}
ts.createVariableStatement = createVariableStatement;
function updateVariableStatement(node, modifiers, declarationList) {
- if (node.modifiers !== modifiers || node.declarationList !== declarationList) {
- return updateNode(createVariableStatement(modifiers, declarationList, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.declarationList !== declarationList
+ ? updateNode(createVariableStatement(modifiers, declarationList), node)
+ : node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, location, flags) {
- var node = createNode(224, location, flags);
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(226);
+ node.flags |= flags;
node.declarations = createNodeArray(declarations);
return node;
}
ts.createVariableDeclarationList = createVariableDeclarationList;
function updateVariableDeclarationList(node, declarations) {
- if (node.declarations !== declarations) {
- return updateNode(createVariableDeclarationList(declarations, node, node.flags), node);
- }
- return node;
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
}
ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer, location, flags) {
- var node = createNode(223, location, flags);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(225);
+ node.name = asName(name);
node.type = type;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createVariableDeclaration = createVariableDeclaration;
function updateVariableDeclaration(node, name, type, initializer) {
- if (node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createVariableDeclaration(name, type, initializer, node, node.flags), node);
- }
- return node;
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
}
ts.updateVariableDeclaration = updateVariableDeclaration;
- function createEmptyStatement(location) {
- return createNode(206, location);
+ function createEmptyStatement() {
+ return createSynthesizedNode(208);
}
ts.createEmptyStatement = createEmptyStatement;
- function createStatement(expression, location, flags) {
- var node = createNode(207, location, flags);
- node.expression = parenthesizeExpressionForExpressionStatement(expression);
+ function createStatement(expression) {
+ var node = createSynthesizedNode(209);
+ node.expression = ts.parenthesizeExpressionForExpressionStatement(expression);
return node;
}
ts.createStatement = createStatement;
function updateStatement(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createStatement(expression, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createStatement(expression), node)
+ : node;
}
ts.updateStatement = updateStatement;
- function createIf(expression, thenStatement, elseStatement, location) {
- var node = createNode(208, location);
+ function createIf(expression, thenStatement, elseStatement) {
+ var node = createSynthesizedNode(210);
node.expression = expression;
node.thenStatement = thenStatement;
node.elseStatement = elseStatement;
@@ -9259,42 +9785,43 @@ var ts;
}
ts.createIf = createIf;
function updateIf(node, expression, thenStatement, elseStatement) {
- if (node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement) {
- return updateNode(createIf(expression, thenStatement, elseStatement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.thenStatement !== thenStatement
+ || node.elseStatement !== elseStatement
+ ? updateNode(createIf(expression, thenStatement, elseStatement), node)
+ : node;
}
ts.updateIf = updateIf;
- function createDo(statement, expression, location) {
- var node = createNode(209, location);
+ function createDo(statement, expression) {
+ var node = createSynthesizedNode(211);
node.statement = statement;
node.expression = expression;
return node;
}
ts.createDo = createDo;
function updateDo(node, statement, expression) {
- if (node.statement !== statement || node.expression !== expression) {
- return updateNode(createDo(statement, expression, node), node);
- }
- return node;
+ return node.statement !== statement
+ || node.expression !== expression
+ ? updateNode(createDo(statement, expression), node)
+ : node;
}
ts.updateDo = updateDo;
- function createWhile(expression, statement, location) {
- var node = createNode(210, location);
+ function createWhile(expression, statement) {
+ var node = createSynthesizedNode(212);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWhile = createWhile;
function updateWhile(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWhile(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWhile(expression, statement), node)
+ : node;
}
ts.updateWhile = updateWhile;
- function createFor(initializer, condition, incrementor, statement, location) {
- var node = createNode(211, location, undefined);
+ function createFor(initializer, condition, incrementor, statement) {
+ var node = createSynthesizedNode(213);
node.initializer = initializer;
node.condition = condition;
node.incrementor = incrementor;
@@ -9303,14 +9830,16 @@ var ts;
}
ts.createFor = createFor;
function updateFor(node, initializer, condition, incrementor, statement) {
- if (node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement) {
- return updateNode(createFor(initializer, condition, incrementor, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.condition !== condition
+ || node.incrementor !== incrementor
+ || node.statement !== statement
+ ? updateNode(createFor(initializer, condition, incrementor, statement), node)
+ : node;
}
ts.updateFor = updateFor;
- function createForIn(initializer, expression, statement, location) {
- var node = createNode(212, location);
+ function createForIn(initializer, expression, statement) {
+ var node = createSynthesizedNode(214);
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
@@ -9318,127 +9847,123 @@ var ts;
}
ts.createForIn = createForIn;
function updateForIn(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForIn(initializer, expression, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForIn(initializer, expression, statement), node)
+ : node;
}
ts.updateForIn = updateForIn;
- function createForOf(initializer, expression, statement, location) {
- var node = createNode(213, location);
+ function createForOf(awaitModifier, initializer, expression, statement) {
+ var node = createSynthesizedNode(215);
+ node.awaitModifier = awaitModifier;
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
return node;
}
ts.createForOf = createForOf;
- function updateForOf(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForOf(initializer, expression, statement, node), node);
- }
- return node;
+ function updateForOf(node, awaitModifier, initializer, expression, statement) {
+ return node.awaitModifier !== awaitModifier
+ || node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForOf(awaitModifier, initializer, expression, statement), node)
+ : node;
}
ts.updateForOf = updateForOf;
- function createContinue(label, location) {
- var node = createNode(214, location);
- if (label) {
- node.label = label;
- }
+ function createContinue(label) {
+ var node = createSynthesizedNode(216);
+ node.label = asName(label);
return node;
}
ts.createContinue = createContinue;
function updateContinue(node, label) {
- if (node.label !== label) {
- return updateNode(createContinue(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createContinue(label), node)
+ : node;
}
ts.updateContinue = updateContinue;
- function createBreak(label, location) {
- var node = createNode(215, location);
- if (label) {
- node.label = label;
- }
+ function createBreak(label) {
+ var node = createSynthesizedNode(217);
+ node.label = asName(label);
return node;
}
ts.createBreak = createBreak;
function updateBreak(node, label) {
- if (node.label !== label) {
- return updateNode(createBreak(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createBreak(label), node)
+ : node;
}
ts.updateBreak = updateBreak;
- function createReturn(expression, location) {
- var node = createNode(216, location);
+ function createReturn(expression) {
+ var node = createSynthesizedNode(218);
node.expression = expression;
return node;
}
ts.createReturn = createReturn;
function updateReturn(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createReturn(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createReturn(expression), node)
+ : node;
}
ts.updateReturn = updateReturn;
- function createWith(expression, statement, location) {
- var node = createNode(217, location);
+ function createWith(expression, statement) {
+ var node = createSynthesizedNode(219);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWith = createWith;
function updateWith(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWith(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWith(expression, statement), node)
+ : node;
}
ts.updateWith = updateWith;
- function createSwitch(expression, caseBlock, location) {
- var node = createNode(218, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSwitch(expression, caseBlock) {
+ var node = createSynthesizedNode(220);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.caseBlock = caseBlock;
return node;
}
ts.createSwitch = createSwitch;
function updateSwitch(node, expression, caseBlock) {
- if (node.expression !== expression || node.caseBlock !== caseBlock) {
- return updateNode(createSwitch(expression, caseBlock, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.caseBlock !== caseBlock
+ ? updateNode(createSwitch(expression, caseBlock), node)
+ : node;
}
ts.updateSwitch = updateSwitch;
- function createLabel(label, statement, location) {
- var node = createNode(219, location);
- node.label = typeof label === "string" ? createIdentifier(label) : label;
+ function createLabel(label, statement) {
+ var node = createSynthesizedNode(221);
+ node.label = asName(label);
node.statement = statement;
return node;
}
ts.createLabel = createLabel;
function updateLabel(node, label, statement) {
- if (node.label !== label || node.statement !== statement) {
- return updateNode(createLabel(label, statement, node), node);
- }
- return node;
+ return node.label !== label
+ || node.statement !== statement
+ ? updateNode(createLabel(label, statement), node)
+ : node;
}
ts.updateLabel = updateLabel;
- function createThrow(expression, location) {
- var node = createNode(220, location);
+ function createThrow(expression) {
+ var node = createSynthesizedNode(222);
node.expression = expression;
return node;
}
ts.createThrow = createThrow;
function updateThrow(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createThrow(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createThrow(expression), node)
+ : node;
}
ts.updateThrow = updateThrow;
- function createTry(tryBlock, catchClause, finallyBlock, location) {
- var node = createNode(221, location);
+ function createTry(tryBlock, catchClause, finallyBlock) {
+ var node = createSynthesizedNode(223);
node.tryBlock = tryBlock;
node.catchClause = catchClause;
node.finallyBlock = finallyBlock;
@@ -9446,194 +9971,284 @@ var ts;
}
ts.createTry = createTry;
function updateTry(node, tryBlock, catchClause, finallyBlock) {
- if (node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock) {
- return updateNode(createTry(tryBlock, catchClause, finallyBlock, node), node);
- }
- return node;
+ return node.tryBlock !== tryBlock
+ || node.catchClause !== catchClause
+ || node.finallyBlock !== finallyBlock
+ ? updateNode(createTry(tryBlock, catchClause, finallyBlock), node)
+ : node;
}
ts.updateTry = updateTry;
- function createCaseBlock(clauses, location) {
- var node = createNode(232, location);
- node.clauses = createNodeArray(clauses);
- return node;
- }
- ts.createCaseBlock = createCaseBlock;
- function updateCaseBlock(node, clauses) {
- if (node.clauses !== clauses) {
- return updateNode(createCaseBlock(clauses, node), node);
- }
- return node;
- }
- ts.updateCaseBlock = updateCaseBlock;
- function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(225, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(227);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionDeclaration = createFunctionDeclaration;
- function updateFunctionDeclaration(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionDeclaration(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionDeclaration(node, decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionDeclaration = updateFunctionDeclaration;
- function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(226, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(228);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassDeclaration = createClassDeclaration;
function updateClassDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassDeclaration = updateClassDeclaration;
- function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, location) {
- var node = createNode(235, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createEnumDeclaration(decorators, modifiers, name, members) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createEnumDeclaration = createEnumDeclaration;
+ function updateEnumDeclaration(node, decorators, modifiers, name, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.members !== members
+ ? updateNode(createEnumDeclaration(decorators, modifiers, name, members), node)
+ : node;
+ }
+ ts.updateEnumDeclaration = updateEnumDeclaration;
+ function createModuleDeclaration(decorators, modifiers, name, body, flags) {
+ var node = createSynthesizedNode(232);
+ node.flags |= flags;
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = name;
+ node.body = body;
+ return node;
+ }
+ ts.createModuleDeclaration = createModuleDeclaration;
+ function updateModuleDeclaration(node, decorators, modifiers, name, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.body !== body
+ ? updateNode(createModuleDeclaration(decorators, modifiers, name, body, node.flags), node)
+ : node;
+ }
+ ts.updateModuleDeclaration = updateModuleDeclaration;
+ function createModuleBlock(statements) {
+ var node = createSynthesizedNode(233);
+ node.statements = createNodeArray(statements);
+ return node;
+ }
+ ts.createModuleBlock = createModuleBlock;
+ function updateModuleBlock(node, statements) {
+ return node.statements !== statements
+ ? updateNode(createModuleBlock(statements), node)
+ : node;
+ }
+ ts.updateModuleBlock = updateModuleBlock;
+ function createCaseBlock(clauses) {
+ var node = createSynthesizedNode(234);
+ node.clauses = createNodeArray(clauses);
+ return node;
+ }
+ ts.createCaseBlock = createCaseBlock;
+ function updateCaseBlock(node, clauses) {
+ return node.clauses !== clauses
+ ? updateNode(createCaseBlock(clauses), node)
+ : node;
+ }
+ ts.updateCaseBlock = updateCaseBlock;
+ function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
+ var node = createSynthesizedNode(236);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.moduleReference = moduleReference;
+ return node;
+ }
+ ts.createImportEqualsDeclaration = createImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node, decorators, modifiers, name, moduleReference) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.moduleReference !== moduleReference
+ ? updateNode(createImportEqualsDeclaration(decorators, modifiers, name, moduleReference), node)
+ : node;
+ }
+ ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration;
+ function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
+ var node = createSynthesizedNode(237);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createImportDeclaration = createImportDeclaration;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+ : node;
}
ts.updateImportDeclaration = updateImportDeclaration;
- function createImportClause(name, namedBindings, location) {
- var node = createNode(236, location);
+ function createImportClause(name, namedBindings) {
+ var node = createSynthesizedNode(238);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
ts.createImportClause = createImportClause;
function updateImportClause(node, name, namedBindings) {
- if (node.name !== name || node.namedBindings !== namedBindings) {
- return updateNode(createImportClause(name, namedBindings, node), node);
- }
- return node;
+ return node.name !== name
+ || node.namedBindings !== namedBindings
+ ? updateNode(createImportClause(name, namedBindings), node)
+ : node;
}
ts.updateImportClause = updateImportClause;
- function createNamespaceImport(name, location) {
- var node = createNode(237, location);
+ function createNamespaceImport(name) {
+ var node = createSynthesizedNode(239);
node.name = name;
return node;
}
ts.createNamespaceImport = createNamespaceImport;
function updateNamespaceImport(node, name) {
- if (node.name !== name) {
- return updateNode(createNamespaceImport(name, node), node);
- }
- return node;
+ return node.name !== name
+ ? updateNode(createNamespaceImport(name), node)
+ : node;
}
ts.updateNamespaceImport = updateNamespaceImport;
- function createNamedImports(elements, location) {
- var node = createNode(238, location);
+ function createNamedImports(elements) {
+ var node = createSynthesizedNode(240);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedImports = createNamedImports;
function updateNamedImports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedImports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedImports(elements), node)
+ : node;
}
ts.updateNamedImports = updateNamedImports;
- function createImportSpecifier(propertyName, name, location) {
- var node = createNode(239, location);
+ function createImportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(241);
node.propertyName = propertyName;
node.name = name;
return node;
}
ts.createImportSpecifier = createImportSpecifier;
function updateImportSpecifier(node, propertyName, name) {
- if (node.propertyName !== propertyName || node.name !== name) {
- return updateNode(createImportSpecifier(propertyName, name, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createImportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateImportSpecifier = updateImportSpecifier;
- function createExportAssignment(decorators, modifiers, isExportEquals, expression, location) {
- var node = createNode(240, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
+ var node = createSynthesizedNode(242);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.isExportEquals = isExportEquals;
node.expression = expression;
return node;
}
ts.createExportAssignment = createExportAssignment;
function updateExportAssignment(node, decorators, modifiers, expression) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.expression !== expression) {
- return updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.expression !== expression
+ ? updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
+ : node;
}
ts.updateExportAssignment = updateExportAssignment;
- function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, location) {
- var node = createNode(241, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) {
+ var node = createSynthesizedNode(243);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.exportClause = exportClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createExportDeclaration = createExportDeclaration;
function updateExportDeclaration(node, decorators, modifiers, exportClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.exportClause !== exportClause
+ || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier), node)
+ : node;
}
ts.updateExportDeclaration = updateExportDeclaration;
- function createNamedExports(elements, location) {
- var node = createNode(242, location);
+ function createNamedExports(elements) {
+ var node = createSynthesizedNode(244);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedExports = createNamedExports;
function updateNamedExports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedExports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedExports(elements), node)
+ : node;
}
ts.updateNamedExports = updateNamedExports;
- function createExportSpecifier(name, propertyName, location) {
- var node = createNode(243, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createExportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(245);
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
return node;
}
ts.createExportSpecifier = createExportSpecifier;
- function updateExportSpecifier(node, name, propertyName) {
- if (node.name !== name || node.propertyName !== propertyName) {
- return updateNode(createExportSpecifier(name, propertyName, node), node);
- }
- return node;
+ function updateExportSpecifier(node, propertyName, name) {
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createExportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateExportSpecifier = updateExportSpecifier;
- function createJsxElement(openingElement, children, closingElement, location) {
- var node = createNode(246, location);
+ function createExternalModuleReference(expression) {
+ var node = createSynthesizedNode(247);
+ node.expression = expression;
+ return node;
+ }
+ ts.createExternalModuleReference = createExternalModuleReference;
+ function updateExternalModuleReference(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createExternalModuleReference(expression), node)
+ : node;
+ }
+ ts.updateExternalModuleReference = updateExternalModuleReference;
+ function createJsxElement(openingElement, children, closingElement) {
+ var node = createSynthesizedNode(248);
node.openingElement = openingElement;
node.children = createNodeArray(children);
node.closingElement = closingElement;
@@ -9641,95 +10256,107 @@ var ts;
}
ts.createJsxElement = createJsxElement;
function updateJsxElement(node, openingElement, children, closingElement) {
- if (node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement) {
- return updateNode(createJsxElement(openingElement, children, closingElement, node), node);
- }
- return node;
+ return node.openingElement !== openingElement
+ || node.children !== children
+ || node.closingElement !== closingElement
+ ? updateNode(createJsxElement(openingElement, children, closingElement), node)
+ : node;
}
ts.updateJsxElement = updateJsxElement;
- function createJsxSelfClosingElement(tagName, attributes, location) {
- var node = createNode(247, location);
+ function createJsxSelfClosingElement(tagName, attributes) {
+ var node = createSynthesizedNode(249);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxSelfClosingElement = createJsxSelfClosingElement;
function updateJsxSelfClosingElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxSelfClosingElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxSelfClosingElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement;
- function createJsxOpeningElement(tagName, attributes, location) {
- var node = createNode(248, location);
+ function createJsxOpeningElement(tagName, attributes) {
+ var node = createSynthesizedNode(250);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxOpeningElement = createJsxOpeningElement;
function updateJsxOpeningElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxOpeningElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxOpeningElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxOpeningElement = updateJsxOpeningElement;
- function createJsxClosingElement(tagName, location) {
- var node = createNode(249, location);
+ function createJsxClosingElement(tagName) {
+ var node = createSynthesizedNode(251);
node.tagName = tagName;
return node;
}
ts.createJsxClosingElement = createJsxClosingElement;
function updateJsxClosingElement(node, tagName) {
- if (node.tagName !== tagName) {
- return updateNode(createJsxClosingElement(tagName, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ ? updateNode(createJsxClosingElement(tagName), node)
+ : node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttribute(name, initializer, location) {
- var node = createNode(250, location);
+ function createJsxAttributes(properties) {
+ var jsxAttributes = createSynthesizedNode(253);
+ jsxAttributes.properties = createNodeArray(properties);
+ return jsxAttributes;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(jsxAttributes, properties) {
+ if (jsxAttributes.properties !== properties) {
+ return updateNode(createJsxAttributes(properties), jsxAttributes);
+ }
+ return jsxAttributes;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
+ function createJsxAttribute(name, initializer) {
+ var node = createSynthesizedNode(252);
node.name = name;
node.initializer = initializer;
return node;
}
ts.createJsxAttribute = createJsxAttribute;
function updateJsxAttribute(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createJsxAttribute(name, initializer, node), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createJsxAttribute(name, initializer), node)
+ : node;
}
ts.updateJsxAttribute = updateJsxAttribute;
- function createJsxSpreadAttribute(expression, location) {
- var node = createNode(251, location);
+ function createJsxSpreadAttribute(expression) {
+ var node = createSynthesizedNode(254);
node.expression = expression;
return node;
}
ts.createJsxSpreadAttribute = createJsxSpreadAttribute;
function updateJsxSpreadAttribute(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxSpreadAttribute(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxSpreadAttribute(expression), node)
+ : node;
}
ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute;
- function createJsxExpression(expression, location) {
- var node = createNode(252, location);
+ function createJsxExpression(dotDotDotToken, expression) {
+ var node = createSynthesizedNode(255);
+ node.dotDotDotToken = dotDotDotToken;
node.expression = expression;
return node;
}
ts.createJsxExpression = createJsxExpression;
function updateJsxExpression(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxExpression(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxExpression(node.dotDotDotToken, expression), node)
+ : node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types, location) {
- var node = createNode(255, location);
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(258);
node.token = token;
node.types = createNodeArray(types);
return node;
@@ -9737,40 +10364,40 @@ var ts;
ts.createHeritageClause = createHeritageClause;
function updateHeritageClause(node, types) {
if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types, node), node);
+ return updateNode(createHeritageClause(node.token, types), node);
}
return node;
}
ts.updateHeritageClause = updateHeritageClause;
- function createCaseClause(expression, statements, location) {
- var node = createNode(253, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createCaseClause(expression, statements) {
+ var node = createSynthesizedNode(256);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.statements = createNodeArray(statements);
return node;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements, node), node);
+ return updateNode(createCaseClause(expression, statements), node);
}
return node;
}
ts.updateCaseClause = updateCaseClause;
- function createDefaultClause(statements, location) {
- var node = createNode(254, location);
+ function createDefaultClause(statements) {
+ var node = createSynthesizedNode(257);
node.statements = createNodeArray(statements);
return node;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements, node), node);
+ return updateNode(createDefaultClause(statements), node);
}
return node;
}
ts.updateDefaultClause = updateDefaultClause;
- function createCatchClause(variableDeclaration, block, location) {
- var node = createNode(256, location);
+ function createCatchClause(variableDeclaration, block) {
+ var node = createSynthesizedNode(259);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
node.block = block;
return node;
@@ -9778,56 +10405,71 @@ var ts;
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block, node), node);
+ return updateNode(createCatchClause(variableDeclaration, block), node);
}
return node;
}
ts.updateCatchClause = updateCatchClause;
- function createPropertyAssignment(name, initializer, location) {
- var node = createNode(257, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAssignment(name, initializer) {
+ var node = createSynthesizedNode(260);
+ node.name = asName(name);
node.questionToken = undefined;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer, node), node);
+ return updateNode(createPropertyAssignment(name, initializer), node);
}
return node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
- function createShorthandPropertyAssignment(name, objectAssignmentInitializer, location) {
- var node = createNode(258, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
+ function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
+ var node = createSynthesizedNode(261);
+ node.name = asName(name);
+ node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
return node;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
- function createSpreadAssignment(expression, location) {
- var node = createNode(259, location);
- node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined;
- return node;
- }
- ts.createSpreadAssignment = createSpreadAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer, node), node);
+ return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
}
return node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
+ function createSpreadAssignment(expression) {
+ var node = createSynthesizedNode(262);
+ node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined;
+ return node;
+ }
+ ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression, node), node);
+ return updateNode(createSpreadAssignment(expression), node);
}
return node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
+ function createEnumMember(name, initializer) {
+ var node = createSynthesizedNode(263);
+ node.name = asName(name);
+ node.initializer = initializer && ts.parenthesizeExpressionForList(initializer);
+ return node;
+ }
+ ts.createEnumMember = createEnumMember;
+ function updateEnumMember(node, name, initializer) {
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createEnumMember(name, initializer), node)
+ : node;
+ }
+ ts.updateEnumMember = updateEnumMember;
function updateSourceFileNode(node, statements) {
if (node.statements !== statements) {
- var updated = createNode(261, node, node.flags);
+ var updated = createSynthesizedNode(264);
+ updated.flags |= node.flags;
updated.statements = createNodeArray(statements);
updated.endOfFileToken = node.endOfFileToken;
updated.fileName = node.fileName;
@@ -9886,56 +10528,73 @@ var ts;
return node;
}
ts.updateSourceFileNode = updateSourceFileNode;
+ function getMutableClone(node) {
+ var clone = getSynthesizedClone(node);
+ clone.pos = node.pos;
+ clone.end = node.end;
+ clone.parent = node.parent;
+ return clone;
+ }
+ ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createNode(293, original);
+ var node = createSynthesizedNode(294);
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createNode(296);
+ var node = createSynthesizedNode(297);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createNode(295);
+ var node = createSynthesizedNode(296);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
- function createPartiallyEmittedExpression(expression, original, location) {
- var node = createNode(294, location || original);
+ function createPartiallyEmittedExpression(expression, original) {
+ var node = createSynthesizedNode(295);
node.expression = expression;
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createPartiallyEmittedExpression = createPartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node, expression) {
if (node.expression !== expression) {
- return updateNode(createPartiallyEmittedExpression(expression, node.original, node), node);
+ return updateNode(createPartiallyEmittedExpression(expression, node.original), node);
}
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
- function createRawExpression(text) {
- var node = createNode(297);
- node.text = text;
+ function createBundle(sourceFiles) {
+ var node = ts.createNode(265);
+ node.sourceFiles = sourceFiles;
+ return node;
+ }
+ ts.createBundle = createBundle;
+ function updateBundle(node, sourceFiles) {
+ if (node.sourceFiles !== sourceFiles) {
+ return createBundle(sourceFiles);
+ }
return node;
}
- ts.createRawExpression = createRawExpression;
+ ts.updateBundle = updateBundle;
function createComma(left, right) {
return createBinary(left, 25, right);
}
ts.createComma = createComma;
- function createLessThan(left, right, location) {
- return createBinary(left, 26, right, location);
+ function createLessThan(left, right) {
+ return createBinary(left, 26, right);
}
ts.createLessThan = createLessThan;
- function createAssignment(left, right, location) {
- return createBinary(left, 57, right, location);
+ function createAssignment(left, right) {
+ return createBinary(left, 57, right);
}
ts.createAssignment = createAssignment;
function createStrictEquality(left, right) {
@@ -9954,8 +10613,8 @@ var ts;
return createBinary(left, 37, right);
}
ts.createSubtract = createSubtract;
- function createPostfixIncrement(operand, location) {
- return createPostfix(operand, 42, location);
+ function createPostfixIncrement(operand) {
+ return createPostfix(operand, 42);
}
ts.createPostfixIncrement = createPostfixIncrement;
function createLogicalAnd(left, right) {
@@ -9974,54 +10633,305 @@ var ts;
return createVoid(createLiteral(0));
}
ts.createVoidZero = createVoidZero;
+ function createExportDefault(expression) {
+ return createExportAssignment(undefined, undefined, false, expression);
+ }
+ ts.createExportDefault = createExportDefault;
+ function createExternalModuleExport(exportName) {
+ return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(undefined, exportName)]));
+ }
+ ts.createExternalModuleExport = createExternalModuleExport;
+ function asName(name) {
+ return typeof name === "string" ? createIdentifier(name) : name;
+ }
+ function asExpression(value) {
+ return typeof value === "string" || typeof value === "number" ? createLiteral(value) : value;
+ }
+ function asNodeArray(array) {
+ return array ? createNodeArray(array) : undefined;
+ }
+ function asToken(value) {
+ return typeof value === "number" ? createToken(value) : value;
+ }
+ function disposeEmitNodes(sourceFile) {
+ sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
+ var emitNode = sourceFile && sourceFile.emitNode;
+ var annotatedNodes = emitNode && emitNode.annotatedNodes;
+ if (annotatedNodes) {
+ for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
+ var node = annotatedNodes_1[_i];
+ node.emitNode = undefined;
+ }
+ }
+ }
+ ts.disposeEmitNodes = disposeEmitNodes;
+ function getOrCreateEmitNode(node) {
+ if (!node.emitNode) {
+ if (ts.isParseTreeNode(node)) {
+ if (node.kind === 264) {
+ return node.emitNode = { annotatedNodes: [node] };
+ }
+ var sourceFile = ts.getSourceFileOfNode(node);
+ getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
+ }
+ node.emitNode = {};
+ }
+ return node.emitNode;
+ }
+ ts.getOrCreateEmitNode = getOrCreateEmitNode;
+ function setTextRange(range, location) {
+ if (location) {
+ range.pos = location.pos;
+ range.end = location.end;
+ }
+ return range;
+ }
+ ts.setTextRange = setTextRange;
+ function getEmitFlags(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.flags;
+ }
+ ts.getEmitFlags = getEmitFlags;
+ function setEmitFlags(node, emitFlags) {
+ getOrCreateEmitNode(node).flags = emitFlags;
+ return node;
+ }
+ ts.setEmitFlags = setEmitFlags;
+ function getSourceMapRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.sourceMapRange) || node;
+ }
+ ts.getSourceMapRange = getSourceMapRange;
+ function setSourceMapRange(node, range) {
+ getOrCreateEmitNode(node).sourceMapRange = range;
+ return node;
+ }
+ ts.setSourceMapRange = setSourceMapRange;
+ function getTokenSourceMapRange(node, token) {
+ var emitNode = node.emitNode;
+ var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
+ return tokenSourceMapRanges && tokenSourceMapRanges[token];
+ }
+ ts.getTokenSourceMapRange = getTokenSourceMapRange;
+ function setTokenSourceMapRange(node, token, range) {
+ var emitNode = getOrCreateEmitNode(node);
+ var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = []);
+ tokenSourceMapRanges[token] = range;
+ return node;
+ }
+ ts.setTokenSourceMapRange = setTokenSourceMapRange;
+ function getCommentRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.commentRange) || node;
+ }
+ ts.getCommentRange = getCommentRange;
+ function setCommentRange(node, range) {
+ getOrCreateEmitNode(node).commentRange = range;
+ return node;
+ }
+ ts.setCommentRange = setCommentRange;
+ function getSyntheticLeadingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.leadingComments;
+ }
+ ts.getSyntheticLeadingComments = getSyntheticLeadingComments;
+ function setSyntheticLeadingComments(node, comments) {
+ getOrCreateEmitNode(node).leadingComments = comments;
+ return node;
+ }
+ ts.setSyntheticLeadingComments = setSyntheticLeadingComments;
+ function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticLeadingComments(node, ts.append(getSyntheticLeadingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticLeadingComment = addSyntheticLeadingComment;
+ function getSyntheticTrailingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.trailingComments;
+ }
+ ts.getSyntheticTrailingComments = getSyntheticTrailingComments;
+ function setSyntheticTrailingComments(node, comments) {
+ getOrCreateEmitNode(node).trailingComments = comments;
+ return node;
+ }
+ ts.setSyntheticTrailingComments = setSyntheticTrailingComments;
+ function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticTrailingComments(node, ts.append(getSyntheticTrailingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticTrailingComment = addSyntheticTrailingComment;
+ function getConstantValue(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.constantValue;
+ }
+ ts.getConstantValue = getConstantValue;
+ function setConstantValue(node, value) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.constantValue = value;
+ return node;
+ }
+ ts.setConstantValue = setConstantValue;
+ function addEmitHelper(node, helper) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ return node;
+ }
+ ts.addEmitHelper = addEmitHelper;
+ function addEmitHelpers(node, helpers) {
+ if (ts.some(helpers)) {
+ var emitNode = getOrCreateEmitNode(node);
+ for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
+ var helper = helpers_1[_i];
+ if (!ts.contains(emitNode.helpers, helper)) {
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ }
+ }
+ }
+ return node;
+ }
+ ts.addEmitHelpers = addEmitHelpers;
+ function removeEmitHelper(node, helper) {
+ var emitNode = node.emitNode;
+ if (emitNode) {
+ var helpers = emitNode.helpers;
+ if (helpers) {
+ return ts.orderedRemoveItem(helpers, helper);
+ }
+ }
+ return false;
+ }
+ ts.removeEmitHelper = removeEmitHelper;
+ function getEmitHelpers(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.helpers;
+ }
+ ts.getEmitHelpers = getEmitHelpers;
+ function moveEmitHelpers(source, target, predicate) {
+ var sourceEmitNode = source.emitNode;
+ var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
+ if (!ts.some(sourceEmitHelpers))
+ return;
+ var targetEmitNode = getOrCreateEmitNode(target);
+ var helpersRemoved = 0;
+ for (var i = 0; i < sourceEmitHelpers.length; i++) {
+ var helper = sourceEmitHelpers[i];
+ if (predicate(helper)) {
+ helpersRemoved++;
+ if (!ts.contains(targetEmitNode.helpers, helper)) {
+ targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
+ }
+ }
+ else if (helpersRemoved > 0) {
+ sourceEmitHelpers[i - helpersRemoved] = helper;
+ }
+ }
+ if (helpersRemoved > 0) {
+ sourceEmitHelpers.length -= helpersRemoved;
+ }
+ }
+ ts.moveEmitHelpers = moveEmitHelpers;
+ function compareEmitHelpers(x, y) {
+ if (x === y)
+ return 0;
+ if (x.priority === y.priority)
+ return 0;
+ if (x.priority === undefined)
+ return 1;
+ if (y.priority === undefined)
+ return -1;
+ return ts.compareValues(x.priority, y.priority);
+ }
+ ts.compareEmitHelpers = compareEmitHelpers;
+ function setOriginalNode(node, original) {
+ node.original = original;
+ if (original) {
+ var emitNode = original.emitNode;
+ if (emitNode)
+ node.emitNode = mergeEmitNode(emitNode, node.emitNode);
+ }
+ return node;
+ }
+ ts.setOriginalNode = setOriginalNode;
+ function mergeEmitNode(sourceEmitNode, destEmitNode) {
+ var flags = sourceEmitNode.flags, leadingComments = sourceEmitNode.leadingComments, trailingComments = sourceEmitNode.trailingComments, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
+ if (!destEmitNode)
+ destEmitNode = {};
+ if (leadingComments)
+ destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
+ if (trailingComments)
+ destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
+ if (flags)
+ destEmitNode.flags = flags;
+ if (commentRange)
+ destEmitNode.commentRange = commentRange;
+ if (sourceMapRange)
+ destEmitNode.sourceMapRange = sourceMapRange;
+ if (tokenSourceMapRanges)
+ destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
+ if (constantValue !== undefined)
+ destEmitNode.constantValue = constantValue;
+ if (helpers)
+ destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
+ return destEmitNode;
+ }
+ function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
+ if (!destRanges)
+ destRanges = [];
+ for (var key in sourceRanges) {
+ destRanges[key] = sourceRanges[key];
+ }
+ return destRanges;
+ }
+})(ts || (ts = {}));
+(function (ts) {
function createTypeCheck(value, tag) {
return tag === "undefined"
- ? createStrictEquality(value, createVoidZero())
- : createStrictEquality(createTypeOf(value), createLiteral(tag));
+ ? ts.createStrictEquality(value, ts.createVoidZero())
+ : ts.createStrictEquality(ts.createTypeOf(value), ts.createLiteral(tag));
}
ts.createTypeCheck = createTypeCheck;
function createMemberAccessForPropertyName(target, memberName, location) {
if (ts.isComputedPropertyName(memberName)) {
- return createElementAccess(target, memberName.expression, location);
+ return ts.setTextRange(ts.createElementAccess(target, memberName.expression), location);
}
else {
- var expression = ts.isIdentifier(memberName) ? createPropertyAccess(target, memberName, location) : createElementAccess(target, memberName, location);
- (expression.emitNode || (expression.emitNode = {})).flags |= 64;
+ var expression = ts.setTextRange(ts.isIdentifier(memberName)
+ ? ts.createPropertyAccess(target, memberName)
+ : ts.createElementAccess(target, memberName), memberName);
+ ts.getOrCreateEmitNode(expression).flags |= 64;
return expression;
}
}
ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName;
function createFunctionCall(func, thisArg, argumentsList, location) {
- return createCall(createPropertyAccess(func, "call"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"), undefined, [
thisArg
- ].concat(argumentsList), location);
+ ].concat(argumentsList)), location);
}
ts.createFunctionCall = createFunctionCall;
function createFunctionApply(func, thisArg, argumentsExpression, location) {
- return createCall(createPropertyAccess(func, "apply"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "apply"), undefined, [
thisArg,
argumentsExpression
- ], location);
+ ]), location);
}
ts.createFunctionApply = createFunctionApply;
function createArraySlice(array, start) {
var argumentsList = [];
if (start !== undefined) {
- argumentsList.push(typeof start === "number" ? createLiteral(start) : start);
+ argumentsList.push(typeof start === "number" ? ts.createLiteral(start) : start);
}
- return createCall(createPropertyAccess(array, "slice"), undefined, argumentsList);
+ return ts.createCall(ts.createPropertyAccess(array, "slice"), undefined, argumentsList);
}
ts.createArraySlice = createArraySlice;
function createArrayConcat(array, values) {
- return createCall(createPropertyAccess(array, "concat"), undefined, values);
+ return ts.createCall(ts.createPropertyAccess(array, "concat"), undefined, values);
}
ts.createArrayConcat = createArrayConcat;
function createMathPow(left, right, location) {
- return createCall(createPropertyAccess(createIdentifier("Math"), "pow"), undefined, [left, right], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Math"), "pow"), undefined, [left, right]), location);
}
ts.createMathPow = createMathPow;
function createReactNamespace(reactNamespace, parent) {
- var react = createIdentifier(reactNamespace || "React");
+ var react = ts.createIdentifier(reactNamespace || "React");
react.flags &= ~8;
react.parent = ts.getParseTreeNode(parent);
return react;
@@ -10029,9 +10939,9 @@ var ts;
function createJsxFactoryExpressionFromEntityName(jsxFactory, parent) {
if (ts.isQualifiedName(jsxFactory)) {
var left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
- var right = createSynthesizedNode(70);
+ var right = ts.createIdentifier(jsxFactory.right.text);
right.text = jsxFactory.right.text;
- return createPropertyAccess(left, right);
+ return ts.createPropertyAccess(left, right);
}
else {
return createReactNamespace(jsxFactory.text, parent);
@@ -10040,7 +10950,7 @@ var ts;
function createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parent) {
return jsxFactoryEntity ?
createJsxFactoryExpressionFromEntityName(jsxFactoryEntity, parent) :
- createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
+ ts.createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
}
function createExpressionForJsxElement(jsxFactoryEntity, reactNamespace, tagName, props, children, parentElement, location) {
var argumentsList = [tagName];
@@ -10049,7 +10959,7 @@ var ts;
}
if (children && children.length > 0) {
if (!props) {
- argumentsList.push(createNull());
+ argumentsList.push(ts.createNull());
}
if (children.length > 1) {
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
@@ -10062,33 +10972,80 @@ var ts;
argumentsList.push(children[0]);
}
}
- return createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList, location);
+ return ts.setTextRange(ts.createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList), location);
}
ts.createExpressionForJsxElement = createExpressionForJsxElement;
- function createExportDefault(expression) {
- return createExportAssignment(undefined, undefined, false, expression);
- }
- ts.createExportDefault = createExportDefault;
- function createExternalModuleExport(exportName) {
- return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(exportName)]));
+ function getHelperName(name) {
+ return ts.setEmitFlags(ts.createIdentifier(name), 4096 | 2);
}
- ts.createExternalModuleExport = createExternalModuleExport;
- function createLetStatement(name, initializer, location) {
- return createVariableStatement(undefined, createLetDeclarationList([createVariableDeclaration(name, undefined, initializer)]), location);
+ ts.getHelperName = getHelperName;
+ var valuesHelper = {
+ name: "typescript:values",
+ scoped: false,
+ text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n "
+ };
+ function createValuesHelper(context, expression, location) {
+ context.requestEmitHelper(valuesHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__values"), undefined, [expression]), location);
}
- ts.createLetStatement = createLetStatement;
- function createLetDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 1);
+ ts.createValuesHelper = createValuesHelper;
+ var readHelper = {
+ name: "typescript:read",
+ scoped: false,
+ text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n "
+ };
+ function createReadHelper(context, iteratorRecord, count, location) {
+ context.requestEmitHelper(readHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__read"), undefined, count !== undefined
+ ? [iteratorRecord, ts.createLiteral(count)]
+ : [iteratorRecord]), location);
+ }
+ ts.createReadHelper = createReadHelper;
+ var spreadHelper = {
+ name: "typescript:spread",
+ scoped: false,
+ text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"
+ };
+ function createSpreadHelper(context, argumentList, location) {
+ context.requestEmitHelper(readHelper);
+ context.requestEmitHelper(spreadHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__spread"), undefined, argumentList), location);
+ }
+ ts.createSpreadHelper = createSpreadHelper;
+ function createForOfBindingStatement(node, boundValue) {
+ if (ts.isVariableDeclarationList(node)) {
+ var firstDeclaration = ts.firstOrUndefined(node.declarations);
+ var updatedDeclaration = ts.updateVariableDeclaration(firstDeclaration, firstDeclaration.name, undefined, boundValue);
+ return ts.setTextRange(ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(node, [updatedDeclaration])), node);
+ }
+ else {
+ var updatedExpression = ts.setTextRange(ts.createAssignment(node, boundValue), node);
+ return ts.setTextRange(ts.createStatement(updatedExpression), node);
+ }
}
- ts.createLetDeclarationList = createLetDeclarationList;
- function createConstDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 2);
+ ts.createForOfBindingStatement = createForOfBindingStatement;
+ function insertLeadingStatement(dest, source) {
+ if (ts.isBlock(dest)) {
+ return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements));
+ }
+ else {
+ return ts.createBlock(ts.createNodeArray([dest, source]), true);
+ }
}
- ts.createConstDeclarationList = createConstDeclarationList;
- function getHelperName(name) {
- return setEmitFlags(createIdentifier(name), 4096 | 2);
+ ts.insertLeadingStatement = insertLeadingStatement;
+ function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {
+ if (!outermostLabeledStatement) {
+ return node;
+ }
+ var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221
+ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement)
+ : node);
+ if (afterRestoreLabelCallback) {
+ afterRestoreLabelCallback(outermostLabeledStatement);
+ }
+ return updated;
}
- ts.getHelperName = getHelperName;
+ ts.restoreEnclosingLabel = restoreEnclosingLabel;
function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
var target = skipParentheses(node);
switch (target.kind) {
@@ -10098,13 +11055,13 @@ var ts;
case 8:
case 9:
return false;
- case 175:
+ case 176:
var elements = target.elements;
if (elements.length === 0) {
return false;
}
return true;
- case 176:
+ case 177:
return target.properties.length > 0;
default:
return true;
@@ -10115,19 +11072,26 @@ var ts;
var thisArg;
var target;
if (ts.isSuperProperty(callee)) {
- thisArg = createThis();
+ thisArg = ts.createThis();
target = callee;
}
else if (callee.kind === 96) {
- thisArg = createThis();
- target = languageVersion < 2 ? createIdentifier("_super", callee) : callee;
+ thisArg = ts.createThis();
+ target = languageVersion < 2
+ ? ts.setTextRange(ts.createIdentifier("_super"), callee)
+ : callee;
+ }
+ else if (ts.getEmitFlags(callee) & 4096) {
+ thisArg = ts.createVoidZero();
+ target = parenthesizeForAccess(callee);
}
else {
switch (callee.kind) {
- case 177: {
+ case 178: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createPropertyAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.name, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -10135,10 +11099,11 @@ var ts;
}
break;
}
- case 178: {
+ case 179: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createElementAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.argumentExpression, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -10147,7 +11112,7 @@ var ts;
break;
}
default: {
- thisArg = createVoidZero();
+ thisArg = ts.createVoidZero();
target = parenthesizeForAccess(expression);
break;
}
@@ -10157,42 +11122,42 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, createComma);
+ return ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
if (ts.isQualifiedName(node)) {
var left = createExpressionFromEntityName(node.left);
- var right = getMutableClone(node.right);
- return createPropertyAccess(left, right, node);
+ var right = ts.getMutableClone(node.right);
+ return ts.setTextRange(ts.createPropertyAccess(left, right), node);
}
else {
- return getMutableClone(node);
+ return ts.getMutableClone(node);
}
}
ts.createExpressionFromEntityName = createExpressionFromEntityName;
function createExpressionForPropertyName(memberName) {
if (ts.isIdentifier(memberName)) {
- return createLiteral(memberName, undefined);
+ return ts.createLiteral(memberName);
}
else if (ts.isComputedPropertyName(memberName)) {
- return getMutableClone(memberName.expression);
+ return ts.getMutableClone(memberName.expression);
}
else {
- return getMutableClone(memberName);
+ return ts.getMutableClone(memberName);
}
}
ts.createExpressionForPropertyName = createExpressionForPropertyName;
function createExpressionForObjectLiteralElementLike(node, property, receiver) {
switch (property.kind) {
- case 151:
case 152:
+ case 153:
return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine);
- case 257:
+ case 260:
return createExpressionForPropertyAssignment(property, receiver);
- case 258:
+ case 261:
return createExpressionForShorthandPropertyAssignment(property, receiver);
- case 149:
+ case 150:
return createExpressionForMethodDeclaration(property, receiver);
}
}
@@ -10202,43 +11167,45 @@ var ts;
if (property === firstAccessor) {
var properties_1 = [];
if (getAccessor) {
- var getterFunction = createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body, getAccessor);
- setOriginalNode(getterFunction, getAccessor);
- var getter = createPropertyAssignment("get", getterFunction);
+ var getterFunction = ts.createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body);
+ ts.setTextRange(getterFunction, getAccessor);
+ ts.setOriginalNode(getterFunction, getAccessor);
+ var getter = ts.createPropertyAssignment("get", getterFunction);
properties_1.push(getter);
}
if (setAccessor) {
- var setterFunction = createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body, setAccessor);
- setOriginalNode(setterFunction, setAccessor);
- var setter = createPropertyAssignment("set", setterFunction);
+ var setterFunction = ts.createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body);
+ ts.setTextRange(setterFunction, setAccessor);
+ ts.setOriginalNode(setterFunction, setAccessor);
+ var setter = ts.createPropertyAssignment("set", setterFunction);
properties_1.push(setter);
}
- properties_1.push(createPropertyAssignment("enumerable", createLiteral(true)));
- properties_1.push(createPropertyAssignment("configurable", createLiteral(true)));
- var expression = createCall(createPropertyAccess(createIdentifier("Object"), "defineProperty"), undefined, [
+ properties_1.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
+ properties_1.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
+ var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
receiver,
createExpressionForPropertyName(property.name),
- createObjectLiteral(properties_1, undefined, multiLine)
- ], firstAccessor);
+ ts.createObjectLiteral(properties_1, multiLine)
+ ]), firstAccessor);
return ts.aggregateTransformFlags(expression);
}
return undefined;
}
function createExpressionForPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer, property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer), property), property));
}
function createExpressionForShorthandPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), getSynthesizedClone(property.name), property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), ts.getSynthesizedClone(property.name)), property), property));
}
function createExpressionForMethodDeclaration(method, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), setOriginalNode(createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body, method), method), method), method));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body), method), method)), method), method));
}
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
ts.getLocalName = getLocalName;
function isLocalName(node) {
- return (getEmitFlags(node) & 16384) !== 0;
+ return (ts.getEmitFlags(node) & 16384) !== 0;
}
ts.isLocalName = isLocalName;
function getExportName(node, allowComments, allowSourceMaps) {
@@ -10246,7 +11213,7 @@ var ts;
}
ts.getExportName = getExportName;
function isExportName(node) {
- return (getEmitFlags(node) & 8192) !== 0;
+ return (ts.getEmitFlags(node) & 8192) !== 0;
}
ts.isExportName = isExportName;
function getDeclarationName(node, allowComments, allowSourceMaps) {
@@ -10255,17 +11222,17 @@ var ts;
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name_8 = getMutableClone(node.name);
- emitFlags |= getEmitFlags(node.name);
+ var name = ts.getMutableClone(node.name);
+ emitFlags |= ts.getEmitFlags(node.name);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(name_8, emitFlags);
- return name_8;
+ ts.setEmitFlags(name, emitFlags);
+ return name;
}
- return getGeneratedNameForNode(node);
+ return ts.getGeneratedNameForNode(node);
}
function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {
if (ns && ts.hasModifier(node, 1)) {
@@ -10275,25 +11242,31 @@ var ts;
}
ts.getExternalModuleOrNamespaceExportName = getExternalModuleOrNamespaceExportName;
function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {
- var qualifiedName = createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : getSynthesizedClone(name), name);
+ var qualifiedName = ts.createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : ts.getSynthesizedClone(name));
+ ts.setTextRange(qualifiedName, name);
var emitFlags;
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(qualifiedName, emitFlags);
+ ts.setEmitFlags(qualifiedName, emitFlags);
return qualifiedName;
}
ts.getNamespaceMemberName = getNamespaceMemberName;
function convertToFunctionBody(node, multiLine) {
- return ts.isBlock(node) ? node : createBlock([createReturn(node, node)], node, multiLine);
+ return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
- function addPrologueDirectives(target, source, ensureUseStrict, visitor) {
+ function addPrologue(target, source, ensureUseStrict, visitor) {
+ var offset = addStandardPrologue(target, source, ensureUseStrict);
+ return addCustomPrologue(target, source, offset, visitor);
+ }
+ ts.addPrologue = addPrologue;
+ function addStandardPrologue(target, source, ensureUseStrict) {
ts.Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array");
var foundUseStrict = false;
var statementOffset = 0;
@@ -10312,11 +11285,16 @@ var ts;
statementOffset++;
}
if (ensureUseStrict && !foundUseStrict) {
- target.push(startOnNewLine(createStatement(createLiteral("use strict"))));
+ target.push(startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))));
}
+ return statementOffset;
+ }
+ ts.addStandardPrologue = addStandardPrologue;
+ function addCustomPrologue(target, source, statementOffset, visitor) {
+ var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 524288) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -10326,7 +11304,7 @@ var ts;
}
return statementOffset;
}
- ts.addPrologueDirectives = addPrologueDirectives;
+ ts.addCustomPrologue = addCustomPrologue;
function startsWithUseStrict(statements) {
var firstStatement = ts.firstOrUndefined(statements);
return firstStatement !== undefined
@@ -10349,33 +11327,43 @@ var ts;
}
}
if (!foundUseStrict) {
- return createNodeArray([
- startOnNewLine(createStatement(createLiteral("use strict")))
- ].concat(statements), statements);
+ return ts.setTextRange(ts.createNodeArray([
+ startOnNewLine(ts.createStatement(ts.createLiteral("use strict")))
+ ].concat(statements)), statements);
}
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
+ function parenthesizeConditionalHead(condition) {
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
+ var emittedCondition = skipPartiallyEmittedExpressions(condition);
+ var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
+ if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
+ return ts.createParen(condition);
+ }
+ return condition;
+ }
+ ts.parenthesizeConditionalHead = parenthesizeConditionalHead;
function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
var skipped = skipPartiallyEmittedExpressions(operand);
- if (skipped.kind === 183) {
+ if (skipped.kind === 184) {
return operand;
}
return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
- ? createParen(operand)
+ ? ts.createParen(operand)
: operand;
}
ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand;
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
- var binaryOperatorPrecedence = ts.getOperatorPrecedence(192, binaryOperator);
- var binaryOperatorAssociativity = ts.getOperatorAssociativity(192, binaryOperator);
+ var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator);
+ var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator);
var emittedOperand = skipPartiallyEmittedExpressions(operand);
var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) {
case -1:
if (!isLeftSideOfBinary
&& binaryOperatorAssociativity === 1
- && operand.kind === 195) {
+ && operand.kind === 196) {
return false;
}
return true;
@@ -10414,7 +11402,7 @@ var ts;
if (ts.isLiteralKind(node.kind)) {
return node.kind;
}
- if (node.kind === 192 && node.operatorToken.kind === 36) {
+ if (node.kind === 193 && node.operatorToken.kind === 36) {
if (node.cachedLiteralKind !== undefined) {
return node.cachedLiteralKind;
}
@@ -10429,29 +11417,30 @@ var ts;
return 0;
}
function parenthesizeForConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(193, 54);
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
var emittedCondition = skipPartiallyEmittedExpressions(condition);
var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
- return createParen(condition);
+ return ts.createParen(condition);
}
return condition;
}
ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead;
function parenthesizeSubexpressionOfConditionalExpression(e) {
- return e.kind === 192 && e.operatorToken.kind === 25
- ? createParen(e)
+ return e.kind === 193 && e.operatorToken.kind === 25
+ ? ts.createParen(e)
: e;
}
+ ts.parenthesizeSubexpressionOfConditionalExpression = parenthesizeSubexpressionOfConditionalExpression;
function parenthesizeForNew(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
switch (emittedExpression.kind) {
- case 179:
- return createParen(expression);
case 180:
+ return ts.createParen(expression);
+ case 181:
return emittedExpression.arguments
? expression
- : createParen(expression);
+ : ts.createParen(expression);
}
return parenthesizeForAccess(expression);
}
@@ -10459,23 +11448,22 @@ var ts;
function parenthesizeForAccess(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
if (ts.isLeftHandSideExpression(emittedExpression)
- && (emittedExpression.kind !== 180 || emittedExpression.arguments)
- && emittedExpression.kind !== 8) {
+ && (emittedExpression.kind !== 181 || emittedExpression.arguments)) {
return expression;
}
- return createParen(expression, expression);
+ return ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeForAccess = parenthesizeForAccess;
function parenthesizePostfixOperand(operand) {
return ts.isLeftHandSideExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePostfixOperand = parenthesizePostfixOperand;
function parenthesizePrefixOperand(operand) {
return ts.isUnaryExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePrefixOperand = parenthesizePrefixOperand;
function parenthesizeListElements(elements) {
@@ -10490,17 +11478,18 @@ var ts;
}
}
if (result !== undefined) {
- return createNodeArray(result, elements, elements.hasTrailingComma);
+ return ts.setTextRange(ts.createNodeArray(result, elements.hasTrailingComma), elements);
}
return elements;
}
+ ts.parenthesizeListElements = parenthesizeListElements;
function parenthesizeExpressionForList(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
- var commaPrecedence = ts.getOperatorPrecedence(192, 25);
+ var commaPrecedence = ts.getOperatorPrecedence(193, 25);
return expressionPrecedence > commaPrecedence
? expression
- : createParen(expression, expression);
+ : ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeExpressionForList = parenthesizeExpressionForList;
function parenthesizeExpressionForExpressionStatement(expression) {
@@ -10508,16 +11497,16 @@ var ts;
if (ts.isCallExpression(emittedExpression)) {
var callee = emittedExpression.expression;
var kind = skipPartiallyEmittedExpressions(callee).kind;
- if (kind === 184 || kind === 185) {
- var mutableCall = getMutableClone(emittedExpression);
- mutableCall.expression = createParen(callee, callee);
+ if (kind === 185 || kind === 186) {
+ var mutableCall = ts.getMutableClone(emittedExpression);
+ mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
return recreatePartiallyEmittedExpressions(expression, mutableCall);
}
}
else {
var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind;
- if (leftmostExpressionKind === 176 || leftmostExpressionKind === 184) {
- return createParen(expression, expression);
+ if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) {
+ return ts.setTextRange(ts.createParen(expression), expression);
}
}
return expression;
@@ -10525,7 +11514,7 @@ var ts;
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = getMutableClone(originalOuterExpression);
+ var clone_1 = ts.getMutableClone(originalOuterExpression);
clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
return clone_1;
}
@@ -10534,21 +11523,21 @@ var ts;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
- case 191:
+ case 192:
node = node.operand;
continue;
- case 192:
+ case 193:
node = node.left;
continue;
- case 193:
+ case 194:
node = node.condition;
continue;
+ case 180:
case 179:
case 178:
- case 177:
node = node.expression;
continue;
- case 294:
+ case 295:
node = node.expression;
continue;
}
@@ -10556,9 +11545,8 @@ var ts;
}
}
function parenthesizeConciseBody(body) {
- var emittedBody = skipPartiallyEmittedExpressions(body);
- if (emittedBody.kind === 176) {
- return createParen(body, body);
+ if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) {
+ return ts.setTextRange(ts.createParen(body), body);
}
return body;
}
@@ -10582,7 +11570,7 @@ var ts;
}
ts.skipOuterExpressions = skipOuterExpressions;
function skipParentheses(node) {
- while (node.kind === 183) {
+ while (node.kind === 184) {
node = node.expression;
}
return node;
@@ -10596,7 +11584,7 @@ var ts;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 294) {
+ while (node.kind === 295) {
node = node.expression;
}
return node;
@@ -10607,120 +11595,6 @@ var ts;
return node;
}
ts.startOnNewLine = startOnNewLine;
- function setOriginalNode(node, original) {
- node.original = original;
- if (original) {
- var emitNode = original.emitNode;
- if (emitNode)
- node.emitNode = mergeEmitNode(emitNode, node.emitNode);
- }
- return node;
- }
- ts.setOriginalNode = setOriginalNode;
- function mergeEmitNode(sourceEmitNode, destEmitNode) {
- var flags = sourceEmitNode.flags, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
- if (!destEmitNode)
- destEmitNode = {};
- if (flags)
- destEmitNode.flags = flags;
- if (commentRange)
- destEmitNode.commentRange = commentRange;
- if (sourceMapRange)
- destEmitNode.sourceMapRange = sourceMapRange;
- if (tokenSourceMapRanges)
- destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
- if (constantValue !== undefined)
- destEmitNode.constantValue = constantValue;
- if (helpers)
- destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
- return destEmitNode;
- }
- function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
- if (!destRanges)
- destRanges = ts.createMap();
- ts.copyProperties(sourceRanges, destRanges);
- return destRanges;
- }
- function disposeEmitNodes(sourceFile) {
- sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
- var emitNode = sourceFile && sourceFile.emitNode;
- var annotatedNodes = emitNode && emitNode.annotatedNodes;
- if (annotatedNodes) {
- for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
- var node = annotatedNodes_1[_i];
- node.emitNode = undefined;
- }
- }
- }
- ts.disposeEmitNodes = disposeEmitNodes;
- function getOrCreateEmitNode(node) {
- if (!node.emitNode) {
- if (ts.isParseTreeNode(node)) {
- if (node.kind === 261) {
- return node.emitNode = { annotatedNodes: [node] };
- }
- var sourceFile = ts.getSourceFileOfNode(node);
- getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
- }
- node.emitNode = {};
- }
- return node.emitNode;
- }
- ts.getOrCreateEmitNode = getOrCreateEmitNode;
- function getEmitFlags(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.flags;
- }
- ts.getEmitFlags = getEmitFlags;
- function setEmitFlags(node, emitFlags) {
- getOrCreateEmitNode(node).flags = emitFlags;
- return node;
- }
- ts.setEmitFlags = setEmitFlags;
- function getSourceMapRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.sourceMapRange) || node;
- }
- ts.getSourceMapRange = getSourceMapRange;
- function setSourceMapRange(node, range) {
- getOrCreateEmitNode(node).sourceMapRange = range;
- return node;
- }
- ts.setSourceMapRange = setSourceMapRange;
- function getTokenSourceMapRange(node, token) {
- var emitNode = node.emitNode;
- var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
- return tokenSourceMapRanges && tokenSourceMapRanges[token];
- }
- ts.getTokenSourceMapRange = getTokenSourceMapRange;
- function setTokenSourceMapRange(node, token, range) {
- var emitNode = getOrCreateEmitNode(node);
- var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = ts.createMap());
- tokenSourceMapRanges[token] = range;
- return node;
- }
- ts.setTokenSourceMapRange = setTokenSourceMapRange;
- function getCommentRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.commentRange) || node;
- }
- ts.getCommentRange = getCommentRange;
- function setCommentRange(node, range) {
- getOrCreateEmitNode(node).commentRange = range;
- return node;
- }
- ts.setCommentRange = setCommentRange;
- function getConstantValue(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.constantValue;
- }
- ts.getConstantValue = getConstantValue;
- function setConstantValue(node, value) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.constantValue = value;
- return node;
- }
- ts.setConstantValue = setConstantValue;
function getExternalHelpersModuleName(node) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
var emitNode = parseNode && parseNode.emitNode;
@@ -10733,125 +11607,31 @@ var ts;
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = getEmitHelpers(node);
+ var helpers = ts.getEmitHelpers(node);
if (helpers) {
- for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
- var helper = helpers_1[_i];
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
if (!helper.scoped) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
- var emitNode = getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = createUniqueName(ts.externalHelpersModuleNameText));
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
}
}
}
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
- function addEmitHelper(node, helper) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- return node;
- }
- ts.addEmitHelper = addEmitHelper;
- function addEmitHelpers(node, helpers) {
- if (ts.some(helpers)) {
- var emitNode = getOrCreateEmitNode(node);
- for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
- var helper = helpers_2[_i];
- if (!ts.contains(emitNode.helpers, helper)) {
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- }
- }
- }
- return node;
- }
- ts.addEmitHelpers = addEmitHelpers;
- function removeEmitHelper(node, helper) {
- var emitNode = node.emitNode;
- if (emitNode) {
- var helpers = emitNode.helpers;
- if (helpers) {
- return ts.orderedRemoveItem(helpers, helper);
- }
- }
- return false;
- }
- ts.removeEmitHelper = removeEmitHelper;
- function getEmitHelpers(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.helpers;
- }
- ts.getEmitHelpers = getEmitHelpers;
- function moveEmitHelpers(source, target, predicate) {
- var sourceEmitNode = source.emitNode;
- var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
- if (!ts.some(sourceEmitHelpers))
- return;
- var targetEmitNode = getOrCreateEmitNode(target);
- var helpersRemoved = 0;
- for (var i = 0; i < sourceEmitHelpers.length; i++) {
- var helper = sourceEmitHelpers[i];
- if (predicate(helper)) {
- helpersRemoved++;
- if (!ts.contains(targetEmitNode.helpers, helper)) {
- targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
- }
- }
- else if (helpersRemoved > 0) {
- sourceEmitHelpers[i - helpersRemoved] = helper;
- }
- }
- if (helpersRemoved > 0) {
- sourceEmitHelpers.length -= helpersRemoved;
- }
- }
- ts.moveEmitHelpers = moveEmitHelpers;
- function compareEmitHelpers(x, y) {
- if (x === y)
- return 0;
- if (x.priority === y.priority)
- return 0;
- if (x.priority === undefined)
- return 1;
- if (y.priority === undefined)
- return -1;
- return ts.compareValues(x.priority, y.priority);
- }
- ts.compareEmitHelpers = compareEmitHelpers;
- function setTextRange(node, location) {
- if (location) {
- node.pos = location.pos;
- node.end = location.end;
- }
- return node;
- }
- ts.setTextRange = setTextRange;
- function setNodeFlags(node, flags) {
- node.flags = flags;
- return node;
- }
- ts.setNodeFlags = setNodeFlags;
- function setMultiLine(node, multiLine) {
- node.multiLine = multiLine;
- return node;
- }
- ts.setMultiLine = setMultiLine;
- function setHasTrailingComma(nodes, hasTrailingComma) {
- nodes.hasTrailingComma = hasTrailingComma;
- return nodes;
- }
- ts.setHasTrailingComma = setHasTrailingComma;
function getLocalNameForExternalImport(node, sourceFile) {
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- var name_9 = namespaceDeclaration.name;
- return ts.isGeneratedIdentifier(name_9) ? name_9 : createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
+ var name = namespaceDeclaration.name;
+ return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
}
- if (node.kind === 235 && node.importClause) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 237 && node.importClause) {
+ return ts.getGeneratedNameForNode(node);
}
- if (node.kind === 241 && node.moduleSpecifier) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 243 && node.moduleSpecifier) {
+ return ts.getGeneratedNameForNode(node);
}
return undefined;
}
@@ -10861,26 +11641,24 @@ var ts;
if (moduleName.kind === 9) {
return tryGetModuleNameFromDeclaration(importNode, host, resolver, compilerOptions)
|| tryRenameExternalModule(moduleName, sourceFile)
- || getSynthesizedClone(moduleName);
+ || ts.getSynthesizedClone(moduleName);
}
return undefined;
}
ts.getExternalModuleNameLiteral = getExternalModuleNameLiteral;
function tryRenameExternalModule(moduleName, sourceFile) {
- if (sourceFile.renamedDependencies && ts.hasProperty(sourceFile.renamedDependencies, moduleName.text)) {
- return createLiteral(sourceFile.renamedDependencies[moduleName.text]);
- }
- return undefined;
+ var rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
+ return rename && ts.createLiteral(rename);
}
function tryGetModuleNameFromFile(file, host, options) {
if (!file) {
return undefined;
}
if (file.moduleName) {
- return createLiteral(file.moduleName);
+ return ts.createLiteral(file.moduleName);
}
if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
- return createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
+ return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
}
@@ -10914,11 +11692,11 @@ var ts;
}
if (ts.isObjectLiteralElementLike(bindingElement)) {
switch (bindingElement.kind) {
- case 257:
+ case 260:
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
- case 258:
+ case 261:
return bindingElement.name;
- case 259:
+ case 262:
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return undefined;
@@ -10934,11 +11712,11 @@ var ts;
ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement;
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 144:
- case 174:
+ case 145:
+ case 175:
return bindingElement.dotDotDotToken;
- case 196:
- case 259:
+ case 197:
+ case 262:
return bindingElement;
}
return undefined;
@@ -10946,7 +11724,7 @@ var ts;
ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement;
function getPropertyNameOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 174:
+ case 175:
if (bindingElement.propertyName) {
var propertyName = bindingElement.propertyName;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -10954,7 +11732,7 @@ var ts;
: propertyName;
}
break;
- case 257:
+ case 260:
if (bindingElement.name) {
var propertyName = bindingElement.name;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -10962,7 +11740,7 @@ var ts;
: propertyName;
}
break;
- case 259:
+ case 262:
return bindingElement.name;
}
var target = getTargetOfBindingOrAssignmentElement(bindingElement);
@@ -10976,11 +11754,11 @@ var ts;
ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement;
function getElementsOfBindingOrAssignmentPattern(name) {
switch (name.kind) {
- case 172:
case 173:
- case 175:
- return name.elements;
+ case 174:
case 176:
+ return name.elements;
+ case 177:
return name.properties;
}
}
@@ -10989,10 +11767,12 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpread(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpread(element.name), element), element);
}
var expression = convertToAssignmentElementTarget(element.name);
- return element.initializer ? setOriginalNode(createAssignment(expression, element.initializer, element), element) : expression;
+ return element.initializer
+ ? ts.setOriginalNode(ts.setTextRange(ts.createAssignment(expression, element.initializer), element), element)
+ : expression;
}
ts.Debug.assertNode(element, ts.isExpression);
return element;
@@ -11002,14 +11782,14 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpreadAssignment(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpreadAssignment(element.name), element), element);
}
if (element.propertyName) {
var expression = convertToAssignmentElementTarget(element.name);
- return setOriginalNode(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(element.propertyName, element.initializer ? ts.createAssignment(expression, element.initializer) : expression), element), element);
}
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createShorthandPropertyAssignment(element.name, element.initializer, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createShorthandPropertyAssignment(element.name, element.initializer), element), element);
}
ts.Debug.assertNode(element, ts.isObjectLiteralElementLike);
return element;
@@ -11017,18 +11797,18 @@ var ts;
ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement;
function convertToAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
- return convertToArrayAssignmentPattern(node);
- case 172:
+ case 174:
case 176:
+ return convertToArrayAssignmentPattern(node);
+ case 173:
+ case 177:
return convertToObjectAssignmentPattern(node);
}
}
ts.convertToAssignmentPattern = convertToAssignmentPattern;
function convertToObjectAssignmentPattern(node) {
if (ts.isObjectBindingPattern(node)) {
- return setOriginalNode(createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isObjectLiteralExpression);
return node;
@@ -11036,7 +11816,7 @@ var ts;
ts.convertToObjectAssignmentPattern = convertToObjectAssignmentPattern;
function convertToArrayAssignmentPattern(node) {
if (ts.isArrayBindingPattern(node)) {
- return setOriginalNode(createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isArrayLiteralExpression);
return node;
@@ -11052,30 +11832,30 @@ var ts;
ts.convertToAssignmentElementTarget = convertToAssignmentElementTarget;
function collectExternalModuleInfo(sourceFile, resolver, compilerOptions) {
var externalImports = [];
- var exportSpecifiers = ts.createMap();
- var exportedBindings = ts.createMap();
+ var exportSpecifiers = ts.createMultiMap();
+ var exportedBindings = [];
var uniqueExports = ts.createMap();
var exportedNames;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && createImportDeclaration(undefined, undefined, createImportClause(undefined, createNamespaceImport(externalHelpersModuleName)), createLiteral(ts.externalHelpersModuleNameText));
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
if (externalHelpersImportDeclaration) {
externalImports.push(externalHelpersImportDeclaration);
}
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var node = _a[_i];
switch (node.kind) {
- case 235:
+ case 237:
externalImports.push(node);
break;
- case 234:
- if (node.moduleReference.kind === 245) {
+ case 236:
+ if (node.moduleReference.kind === 247) {
externalImports.push(node);
}
break;
- case 241:
+ case 243:
if (node.moduleSpecifier) {
if (!node.exportClause) {
externalImports.push(node);
@@ -11088,26 +11868,26 @@ var ts;
else {
for (var _b = 0, _c = node.exportClause.elements; _b < _c.length; _b++) {
var specifier = _c[_b];
- if (!uniqueExports[specifier.name.text]) {
- var name_10 = specifier.propertyName || specifier.name;
- ts.multiMapAdd(exportSpecifiers, name_10.text, specifier);
- var decl = resolver.getReferencedImportDeclaration(name_10)
- || resolver.getReferencedValueDeclaration(name_10);
+ if (!uniqueExports.get(specifier.name.text)) {
+ var name = specifier.propertyName || specifier.name;
+ exportSpecifiers.add(name.text, specifier);
+ var decl = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
if (decl) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
}
- uniqueExports[specifier.name.text] = true;
+ uniqueExports.set(specifier.name.text, true);
exportedNames = ts.append(exportedNames, specifier.name);
}
}
}
break;
- case 240:
+ case 242:
if (node.isExportEquals && !exportEquals) {
exportEquals = node;
}
break;
- case 205:
+ case 207:
if (ts.hasModifier(node, 1)) {
for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) {
var decl = _e[_d];
@@ -11115,38 +11895,38 @@ var ts;
}
}
break;
- case 225:
+ case 227:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_11 = node.name;
- if (!uniqueExports[name_11.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_11);
- uniqueExports[name_11.text] = true;
- exportedNames = ts.append(exportedNames, name_11);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
break;
- case 226:
+ case 228:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_12 = node.name;
- if (!uniqueExports[name_12.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_12);
- uniqueExports[name_12.text] = true;
- exportedNames = ts.append(exportedNames, name_12);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
@@ -11166,13 +11946,23 @@ var ts;
}
}
else if (!ts.isGeneratedIdentifier(decl.name)) {
- if (!uniqueExports[decl.name.text]) {
- uniqueExports[decl.name.text] = true;
+ if (!uniqueExports.get(decl.name.text)) {
+ uniqueExports.set(decl.name.text, true);
exportedNames = ts.append(exportedNames, decl.name);
}
}
return exportedNames;
}
+ function multiMapSparseArrayAdd(map, key, value) {
+ var values = map[key];
+ if (values) {
+ values.push(value);
+ }
+ else {
+ map[key] = values = [value];
+ }
+ return values;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -11181,13 +11971,13 @@ var ts;
var IdentifierConstructor;
var SourceFileConstructor;
function createNode(kind, pos, end) {
- if (kind === 261) {
+ if (kind === 264) {
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end);
}
else if (kind === 70) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 141) {
+ else if (kind < 142) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -11223,28 +12013,29 @@ var ts;
var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
var cbNodes = cbNodeArray || cbNode;
switch (node.kind) {
- case 141:
+ case 142:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.right);
- case 143:
+ case 144:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.constraint) ||
+ visitNode(cbNode, node.default) ||
visitNode(cbNode, node.expression);
- case 258:
+ case 261:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.equalsToken) ||
visitNode(cbNode, node.objectAssignmentInitializer);
- case 259:
+ case 262:
return visitNode(cbNode, node.expression);
- case 144:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 257:
- case 223:
- case 174:
+ case 260:
+ case 225:
+ case 175:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.propertyName) ||
@@ -11253,24 +12044,24 @@ var ts;
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.initializer);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
+ case 156:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.asteriskToken) ||
@@ -11281,320 +12072,326 @@ var ts;
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.equalsGreaterThanToken) ||
visitNode(cbNode, node.body);
- case 157:
+ case 158:
return visitNode(cbNode, node.typeName) ||
visitNodes(cbNodes, node.typeArguments);
- case 156:
+ case 157:
return visitNode(cbNode, node.parameterName) ||
visitNode(cbNode, node.type);
- case 160:
- return visitNode(cbNode, node.exprName);
case 161:
- return visitNodes(cbNodes, node.members);
+ return visitNode(cbNode, node.exprName);
case 162:
- return visitNode(cbNode, node.elementType);
+ return visitNodes(cbNodes, node.members);
case 163:
- return visitNodes(cbNodes, node.elementTypes);
+ return visitNode(cbNode, node.elementType);
case 164:
+ return visitNodes(cbNodes, node.elementTypes);
case 165:
- return visitNodes(cbNodes, node.types);
case 166:
- case 168:
- return visitNode(cbNode, node.type);
+ return visitNodes(cbNodes, node.types);
+ case 167:
case 169:
+ return visitNode(cbNode, node.type);
+ case 170:
return visitNode(cbNode, node.objectType) ||
visitNode(cbNode, node.indexType);
- case 170:
+ case 171:
return visitNode(cbNode, node.readonlyToken) ||
visitNode(cbNode, node.typeParameter) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type);
- case 171:
- return visitNode(cbNode, node.literal);
case 172:
+ return visitNode(cbNode, node.literal);
case 173:
- return visitNodes(cbNodes, node.elements);
- case 175:
+ case 174:
return visitNodes(cbNodes, node.elements);
case 176:
- return visitNodes(cbNodes, node.properties);
+ return visitNodes(cbNodes, node.elements);
case 177:
+ return visitNodes(cbNodes, node.properties);
+ case 178:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.name);
- case 178:
+ case 179:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.argumentExpression);
- case 179:
case 180:
+ case 181:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments) ||
visitNodes(cbNodes, node.arguments);
- case 181:
+ case 182:
return visitNode(cbNode, node.tag) ||
visitNode(cbNode, node.template);
- case 182:
+ case 183:
return visitNode(cbNode, node.type) ||
visitNode(cbNode, node.expression);
- case 183:
- return visitNode(cbNode, node.expression);
- case 186:
+ case 184:
return visitNode(cbNode, node.expression);
case 187:
return visitNode(cbNode, node.expression);
case 188:
return visitNode(cbNode, node.expression);
- case 190:
- return visitNode(cbNode, node.operand);
- case 195:
- return visitNode(cbNode, node.asteriskToken) ||
- visitNode(cbNode, node.expression);
case 189:
return visitNode(cbNode, node.expression);
case 191:
return visitNode(cbNode, node.operand);
+ case 196:
+ return visitNode(cbNode, node.asteriskToken) ||
+ visitNode(cbNode, node.expression);
+ case 190:
+ return visitNode(cbNode, node.expression);
case 192:
+ return visitNode(cbNode, node.operand);
+ case 193:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.operatorToken) ||
visitNode(cbNode, node.right);
- case 200:
+ case 201:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.type);
- case 201:
+ case 202:
return visitNode(cbNode, node.expression);
- case 193:
+ case 203:
+ return visitNode(cbNode, node.name);
+ case 194:
return visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.whenTrue) ||
visitNode(cbNode, node.colonToken) ||
visitNode(cbNode, node.whenFalse);
- case 196:
+ case 197:
return visitNode(cbNode, node.expression);
- case 204:
- case 231:
+ case 206:
+ case 233:
return visitNodes(cbNodes, node.statements);
- case 261:
+ case 264:
return visitNodes(cbNodes, node.statements) ||
visitNode(cbNode, node.endOfFileToken);
- case 205:
+ case 207:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.declarationList);
- case 224:
+ case 226:
return visitNodes(cbNodes, node.declarations);
- case 207:
+ case 209:
return visitNode(cbNode, node.expression);
- case 208:
+ case 210:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.thenStatement) ||
visitNode(cbNode, node.elseStatement);
- case 209:
+ case 211:
return visitNode(cbNode, node.statement) ||
visitNode(cbNode, node.expression);
- case 210:
+ case 212:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 211:
+ case 213:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.incrementor) ||
visitNode(cbNode, node.statement);
- case 212:
+ case 214:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 213:
- return visitNode(cbNode, node.initializer) ||
+ case 215:
+ return visitNode(cbNode, node.awaitModifier) ||
+ visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 214:
- case 215:
- return visitNode(cbNode, node.label);
case 216:
- return visitNode(cbNode, node.expression);
case 217:
+ return visitNode(cbNode, node.label);
+ case 218:
+ return visitNode(cbNode, node.expression);
+ case 219:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 218:
+ case 220:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.caseBlock);
- case 232:
+ case 234:
return visitNodes(cbNodes, node.clauses);
- case 253:
+ case 256:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.statements);
- case 254:
+ case 257:
return visitNodes(cbNodes, node.statements);
- case 219:
+ case 221:
return visitNode(cbNode, node.label) ||
visitNode(cbNode, node.statement);
- case 220:
+ case 222:
return visitNode(cbNode, node.expression);
- case 221:
+ case 223:
return visitNode(cbNode, node.tryBlock) ||
visitNode(cbNode, node.catchClause) ||
visitNode(cbNode, node.finallyBlock);
- case 256:
+ case 259:
return visitNode(cbNode, node.variableDeclaration) ||
visitNode(cbNode, node.block);
- case 145:
+ case 146:
return visitNode(cbNode, node.expression);
- case 226:
- case 197:
+ case 228:
+ case 198:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 227:
+ case 229:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 228:
+ case 230:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNode(cbNode, node.type);
- case 229:
+ case 231:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.members);
- case 260:
+ case 263:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 230:
+ case 232:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.body);
- case 234:
+ case 236:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.moduleReference);
- case 235:
+ case 237:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.importClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 236:
+ case 238:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.namedBindings);
- case 233:
+ case 235:
return visitNode(cbNode, node.name);
- case 237:
+ case 239:
return visitNode(cbNode, node.name);
- case 238:
- case 242:
+ case 240:
+ case 244:
return visitNodes(cbNodes, node.elements);
- case 241:
+ case 243:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.exportClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 239:
- case 243:
+ case 241:
+ case 245:
return visitNode(cbNode, node.propertyName) ||
visitNode(cbNode, node.name);
- case 240:
+ case 242:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.expression);
- case 194:
+ case 195:
return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
- case 202:
+ case 204:
return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
- case 142:
+ case 143:
return visitNode(cbNode, node.expression);
- case 255:
+ case 258:
return visitNodes(cbNodes, node.types);
- case 199:
+ case 200:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments);
- case 245:
+ case 247:
return visitNode(cbNode, node.expression);
- case 244:
- return visitNodes(cbNodes, node.decorators);
case 246:
+ return visitNodes(cbNodes, node.decorators);
+ case 248:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
visitNode(cbNode, node.closingElement);
- case 247:
- case 248:
- return visitNode(cbNode, node.tagName) ||
- visitNodes(cbNodes, node.attributes);
+ case 249:
case 250:
+ return visitNode(cbNode, node.tagName) ||
+ visitNode(cbNode, node.attributes);
+ case 253:
+ return visitNodes(cbNodes, node.properties);
+ case 252:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 251:
- return visitNode(cbNode, node.expression);
- case 252:
+ case 254:
return visitNode(cbNode, node.expression);
- case 249:
+ case 255:
+ return visitNode(cbNode, node.dotDotDotToken) ||
+ visitNode(cbNode, node.expression);
+ case 251:
return visitNode(cbNode, node.tagName);
- case 262:
- return visitNode(cbNode, node.type);
case 266:
+ return visitNode(cbNode, node.type);
+ case 270:
return visitNodes(cbNodes, node.types);
- case 267:
+ case 271:
return visitNodes(cbNodes, node.types);
- case 265:
- return visitNode(cbNode, node.elementType);
case 269:
+ return visitNode(cbNode, node.elementType);
+ case 273:
return visitNode(cbNode, node.type);
- case 268:
+ case 272:
return visitNode(cbNode, node.type);
- case 270:
+ case 274:
return visitNode(cbNode, node.literal);
- case 272:
+ case 276:
return visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeArguments);
- case 273:
+ case 277:
return visitNode(cbNode, node.type);
- case 274:
+ case 278:
return visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 275:
+ case 279:
return visitNode(cbNode, node.type);
- case 276:
+ case 280:
return visitNode(cbNode, node.type);
- case 277:
+ case 281:
return visitNode(cbNode, node.type);
- case 271:
+ case 275:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.type);
- case 278:
+ case 282:
return visitNodes(cbNodes, node.tags);
- case 281:
+ case 285:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 282:
- return visitNode(cbNode, node.typeExpression);
- case 283:
+ case 286:
return visitNode(cbNode, node.typeExpression);
- case 280:
+ case 287:
return visitNode(cbNode, node.typeExpression);
case 284:
+ return visitNode(cbNode, node.typeExpression);
+ case 288:
return visitNodes(cbNodes, node.typeParameters);
- case 285:
+ case 289:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 287:
+ case 291:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 286:
+ case 290:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 294:
+ case 295:
return visitNode(cbNode, node.expression);
- case 288:
+ case 292:
return visitNode(cbNode, node.literal);
}
}
@@ -11635,7 +12432,7 @@ var ts;
var Parser;
(function (Parser) {
var scanner = ts.createScanner(5, true);
- var disallowInAndDecoratorContext = 65536 | 262144;
+ var disallowInAndDecoratorContext = 2048 | 8192;
var NodeConstructor;
var TokenConstructor;
var IdentifierConstructor;
@@ -11683,7 +12480,7 @@ var ts;
identifiers = ts.createMap();
identifierCount = 0;
nodeCount = 0;
- contextFlags = scriptKind === 1 || scriptKind === 2 ? 2097152 : 0;
+ contextFlags = scriptKind === 1 || scriptKind === 2 ? 65536 : 0;
parseErrorBeforeNextFinishedNode = false;
scanner.setText(sourceText);
scanner.setOnError(scanError);
@@ -11758,7 +12555,7 @@ var ts;
}
Parser.fixupParentReferences = fixupParentReferences;
function createSourceFile(fileName, languageVersion, scriptKind) {
- var sourceFile = new SourceFileConstructor(261, 0, sourceText.length);
+ var sourceFile = new SourceFileConstructor(264, 0, sourceText.length);
nodeCount++;
sourceFile.text = sourceText;
sourceFile.bindDiagnostics = [];
@@ -11778,16 +12575,16 @@ var ts;
}
}
function setDisallowInContext(val) {
- setContextFlag(val, 65536);
+ setContextFlag(val, 2048);
}
function setYieldContext(val) {
- setContextFlag(val, 131072);
+ setContextFlag(val, 4096);
}
function setDecoratorContext(val) {
- setContextFlag(val, 262144);
+ setContextFlag(val, 8192);
}
function setAwaitContext(val) {
- setContextFlag(val, 524288);
+ setContextFlag(val, 16384);
}
function doOutsideOfContext(context, func) {
var contextFlagsToClear = context & contextFlags;
@@ -11810,40 +12607,40 @@ var ts;
return func();
}
function allowInAnd(func) {
- return doOutsideOfContext(65536, func);
+ return doOutsideOfContext(2048, func);
}
function disallowInAnd(func) {
- return doInsideOfContext(65536, func);
+ return doInsideOfContext(2048, func);
}
function doInYieldContext(func) {
- return doInsideOfContext(131072, func);
+ return doInsideOfContext(4096, func);
}
function doInDecoratorContext(func) {
- return doInsideOfContext(262144, func);
+ return doInsideOfContext(8192, func);
}
function doInAwaitContext(func) {
- return doInsideOfContext(524288, func);
+ return doInsideOfContext(16384, func);
}
function doOutsideOfAwaitContext(func) {
- return doOutsideOfContext(524288, func);
+ return doOutsideOfContext(16384, func);
}
function doInYieldAndAwaitContext(func) {
- return doInsideOfContext(131072 | 524288, func);
+ return doInsideOfContext(4096 | 16384, func);
}
function inContext(flags) {
return (contextFlags & flags) !== 0;
}
function inYieldContext() {
- return inContext(131072);
+ return inContext(4096);
}
function inDisallowInContext() {
- return inContext(65536);
+ return inContext(2048);
}
function inDecoratorContext() {
- return inContext(262144);
+ return inContext(8192);
}
function inAwaitContext() {
- return inContext(524288);
+ return inContext(16384);
}
function parseErrorAtCurrentToken(message, arg0) {
var start = scanner.getTokenPos();
@@ -11985,7 +12782,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 141 ? new NodeConstructor(kind, pos, pos) :
+ return kind >= 142 ? new NodeConstructor(kind, pos, pos) :
kind === 70 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -12005,7 +12802,7 @@ var ts;
}
if (parseErrorBeforeNextFinishedNode) {
parseErrorBeforeNextFinishedNode = false;
- node.flags |= 1048576;
+ node.flags |= 32768;
}
return node;
}
@@ -12022,7 +12819,11 @@ var ts;
}
function internIdentifier(text) {
text = ts.escapeIdentifier(text);
- return identifiers[text] || (identifiers[text] = text);
+ var identifier = identifiers.get(text);
+ if (identifier === undefined) {
+ identifiers.set(text, identifier = text);
+ }
+ return identifier;
}
function createIdentifier(isIdentifier, diagnosticMessage) {
identifierCount++;
@@ -12067,7 +12868,7 @@ var ts;
return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token());
}
function parseComputedPropertyName() {
- var node = createNode(142);
+ var node = createNode(143);
parseExpected(20);
node.expression = allowInAnd(parseExpression);
parseExpected(21);
@@ -12116,6 +12917,7 @@ var ts;
function nextTokenIsClassOrFunctionOrAsync() {
nextToken();
return token() === 74 || token() === 88 ||
+ (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
function isListElement(parsingContext, inErrorRecovery) {
@@ -12323,7 +13125,7 @@ var ts;
if (ts.containsParseError(node)) {
return undefined;
}
- var nodeContextFlags = node.flags & 3080192;
+ var nodeContextFlags = node.flags & 96256;
if (nodeContextFlags !== contextFlags) {
return undefined;
}
@@ -12372,14 +13174,14 @@ var ts;
function isReusableClassMember(node) {
if (node) {
switch (node.kind) {
- case 150:
- case 155:
case 151:
+ case 156:
case 152:
- case 147:
- case 203:
+ case 153:
+ case 148:
+ case 205:
return true;
- case 149:
+ case 150:
var methodDeclaration = node;
var nameIsConstructor = methodDeclaration.name.kind === 70 &&
methodDeclaration.name.originalKeywordKind === 122;
@@ -12391,8 +13193,8 @@ var ts;
function isReusableSwitchClause(node) {
if (node) {
switch (node.kind) {
- case 253:
- case 254:
+ case 256:
+ case 257:
return true;
}
}
@@ -12401,65 +13203,65 @@ var ts;
function isReusableStatement(node) {
if (node) {
switch (node.kind) {
- case 225:
- case 205:
- case 204:
- case 208:
+ case 227:
case 207:
+ case 206:
+ case 210:
+ case 209:
+ case 222:
+ case 218:
case 220:
+ case 217:
case 216:
- case 218:
- case 215:
case 214:
- case 212:
+ case 215:
case 213:
- case 211:
- case 210:
- case 217:
- case 206:
- case 221:
+ case 212:
case 219:
- case 209:
- case 222:
- case 235:
- case 234:
- case 241:
- case 240:
- case 230:
- case 226:
- case 227:
- case 229:
+ case 208:
+ case 223:
+ case 221:
+ case 211:
+ case 224:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
+ case 232:
case 228:
+ case 229:
+ case 231:
+ case 230:
return true;
}
}
return false;
}
function isReusableEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
function isReusableTypeMember(node) {
if (node) {
switch (node.kind) {
- case 154:
- case 148:
case 155:
- case 146:
- case 153:
+ case 149:
+ case 156:
+ case 147:
+ case 154:
return true;
}
}
return false;
}
function isReusableVariableDeclaration(node) {
- if (node.kind !== 223) {
+ if (node.kind !== 225) {
return false;
}
var variableDeclarator = node;
return variableDeclarator.initializer === undefined;
}
function isReusableParameter(node) {
- if (node.kind !== 144) {
+ if (node.kind !== 145) {
return false;
}
var parameter = node;
@@ -12504,7 +13306,6 @@ var ts;
case 25: return ts.Diagnostics.Property_assignment_expected;
}
}
- ;
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
var saveParsingContext = parsingContext;
parsingContext |= 1 << kind;
@@ -12555,7 +13356,7 @@ var ts;
function parseEntityName(allowReservedWords, diagnosticMessage) {
var entity = parseIdentifier(diagnosticMessage);
while (parseOptional(22)) {
- var node = createNode(141, entity.pos);
+ var node = createNode(142, entity.pos);
node.left = entity;
node.right = parseRightSideOfDot(allowReservedWords);
entity = finishNode(node);
@@ -12572,7 +13373,7 @@ var ts;
return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
}
function parseTemplateExpression() {
- var template = createNode(194);
+ var template = createNode(195);
template.head = parseTemplateHead();
ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind");
var templateSpans = createNodeArray();
@@ -12584,7 +13385,7 @@ var ts;
return finishNode(template);
}
function parseTemplateSpan() {
- var span = createNode(202);
+ var span = createNode(204);
span.expression = allowInAnd(parseExpression);
var literal;
if (token() === 17) {
@@ -12620,20 +13421,16 @@ var ts;
if (scanner.isUnterminated()) {
node.isUnterminated = true;
}
- var tokenPos = scanner.getTokenPos();
+ if (node.kind === 8) {
+ node.numericLiteralFlags = scanner.getNumericLiteralFlags();
+ }
nextToken();
finishNode(node);
- if (node.kind === 8
- && sourceText.charCodeAt(tokenPos) === 48
- && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
- node.isOctalLiteral = true;
- }
return node;
}
function parseTypeReference() {
- var typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
- var node = createNode(157, typeName.pos);
- node.typeName = typeName;
+ var node = createNode(158);
+ node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
if (!scanner.hasPrecedingLineBreak() && token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
}
@@ -12641,24 +13438,24 @@ var ts;
}
function parseThisTypePredicate(lhs) {
nextToken();
- var node = createNode(156, lhs.pos);
+ var node = createNode(157, lhs.pos);
node.parameterName = lhs;
node.type = parseType();
return finishNode(node);
}
function parseThisTypeNode() {
- var node = createNode(167);
+ var node = createNode(168);
nextToken();
return finishNode(node);
}
function parseTypeQuery() {
- var node = createNode(160);
+ var node = createNode(161);
parseExpected(102);
node.exprName = parseEntityName(true);
return finishNode(node);
}
function parseTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
if (parseOptional(84)) {
if (isStartOfType() || !isStartOfExpression()) {
@@ -12668,6 +13465,9 @@ var ts;
node.expression = parseUnaryExpressionOrHigher();
}
}
+ if (parseOptional(57)) {
+ node.default = parseType();
+ }
return finishNode(node);
}
function parseTypeParameters() {
@@ -12685,9 +13485,9 @@ var ts;
return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98;
}
function parseParameter() {
- var node = createNode(144);
+ var node = createNode(145);
if (token() === 98) {
- node.name = createIdentifier(true, undefined);
+ node.name = createIdentifier(true);
node.type = parseParameterType();
return finishNode(node);
}
@@ -12745,7 +13545,7 @@ var ts;
}
function parseSignatureMember(kind) {
var node = createNode(kind);
- if (kind === 154) {
+ if (kind === 155) {
parseExpected(93);
}
fillSignature(55, false, false, false, node);
@@ -12785,7 +13585,7 @@ var ts;
return token() === 55 || token() === 25 || token() === 21;
}
function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(155, fullStart);
+ var node = createNode(156, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.parameters = parseBracketedList(16, parseParameter, 20, 21);
@@ -12797,7 +13597,7 @@ var ts;
var name = parsePropertyName();
var questionToken = parseOptionalToken(54);
if (token() === 18 || token() === 26) {
- var method = createNode(148, fullStart);
+ var method = createNode(149, fullStart);
method.modifiers = modifiers;
method.name = name;
method.questionToken = questionToken;
@@ -12806,7 +13606,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
else {
- var property = createNode(146, fullStart);
+ var property = createNode(147, fullStart);
property.modifiers = modifiers;
property.name = name;
property.questionToken = questionToken;
@@ -12819,19 +13619,19 @@ var ts;
}
}
function isTypeMemberStart() {
- var idToken;
if (token() === 18 || token() === 26) {
return true;
}
+ var idToken;
while (ts.isModifierKind(token())) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (token() === 20) {
return true;
}
if (isLiteralPropertyName()) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (idToken) {
@@ -12846,10 +13646,10 @@ var ts;
}
function parseTypeMember() {
if (token() === 18 || token() === 26) {
- return parseSignatureMember(153);
+ return parseSignatureMember(154);
}
if (token() === 93 && lookAhead(isStartOfConstructSignature)) {
- return parseSignatureMember(154);
+ return parseSignatureMember(155);
}
var fullStart = getNodePos();
var modifiers = parseModifiers();
@@ -12863,7 +13663,7 @@ var ts;
return token() === 18 || token() === 26;
}
function parseTypeLiteral() {
- var node = createNode(161);
+ var node = createNode(162);
node.members = parseObjectTypeMembers();
return finishNode(node);
}
@@ -12886,14 +13686,14 @@ var ts;
return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91;
}
function parseMappedTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
parseExpected(91);
node.constraint = parseType();
return finishNode(node);
}
function parseMappedType() {
- var node = createNode(170);
+ var node = createNode(171);
parseExpected(16);
node.readonlyToken = parseOptionalToken(130);
parseExpected(20);
@@ -12906,12 +13706,12 @@ var ts;
return finishNode(node);
}
function parseTupleType() {
- var node = createNode(163);
+ var node = createNode(164);
node.elementTypes = parseBracketedList(20, parseType, 20, 21);
return finishNode(node);
}
function parseParenthesizedType() {
- var node = createNode(166);
+ var node = createNode(167);
parseExpected(18);
node.type = parseType();
parseExpected(19);
@@ -12919,7 +13719,7 @@ var ts;
}
function parseFunctionOrConstructorType(kind) {
var node = createNode(kind);
- if (kind === 159) {
+ if (kind === 160) {
parseExpected(93);
}
fillSignature(35, false, false, false, node);
@@ -12930,7 +13730,7 @@ var ts;
return token() === 22 ? undefined : node;
}
function parseLiteralTypeNode() {
- var node = createNode(171);
+ var node = createNode(172);
node.literal = parseSimpleUnaryExpression();
finishNode(node);
return node;
@@ -12941,12 +13741,13 @@ var ts;
function parseNonArrayType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
- case 137:
+ case 136:
+ case 138:
case 129:
+ case 133:
var node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
case 9:
@@ -12983,12 +13784,12 @@ var ts;
function isStartOfType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 98:
case 102:
@@ -12996,11 +13797,14 @@ var ts;
case 16:
case 20:
case 26:
+ case 48:
+ case 47:
case 93:
case 9:
case 8:
case 100:
case 85:
+ case 133:
return true;
case 37:
return lookAhead(nextTokenIsNumericLiteral);
@@ -13018,14 +13822,14 @@ var ts;
var type = parseNonArrayType();
while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) {
if (isStartOfType()) {
- var node = createNode(169, type.pos);
+ var node = createNode(170, type.pos);
node.objectType = type;
node.indexType = parseType();
parseExpected(21);
type = finishNode(node);
}
else {
- var node = createNode(162, type.pos);
+ var node = createNode(163, type.pos);
node.elementType = type;
parseExpected(21);
type = finishNode(node);
@@ -13034,7 +13838,7 @@ var ts;
return type;
}
function parseTypeOperator(operator) {
- var node = createNode(168);
+ var node = createNode(169);
parseExpected(operator);
node.operator = operator;
node.type = parseTypeOperatorOrHigher();
@@ -13048,6 +13852,7 @@ var ts;
return parseArrayTypeOrHigher();
}
function parseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ parseOptional(operator);
var type = parseConstituentType();
if (token() === operator) {
var types = createNodeArray([type], type.pos);
@@ -13062,10 +13867,10 @@ var ts;
return type;
}
function parseIntersectionTypeOrHigher() {
- return parseUnionOrIntersectionType(165, parseTypeOperatorOrHigher, 47);
+ return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47);
}
function parseUnionTypeOrHigher() {
- return parseUnionOrIntersectionType(164, parseIntersectionTypeOrHigher, 48);
+ return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48);
}
function isStartOfFunctionType() {
if (token() === 26) {
@@ -13111,7 +13916,7 @@ var ts;
var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
var type = parseType();
if (typePredicateVariable) {
- var node = createNode(156, typePredicateVariable.pos);
+ var node = createNode(157, typePredicateVariable.pos);
node.parameterName = typePredicateVariable;
node.type = type;
return finishNode(node);
@@ -13128,14 +13933,14 @@ var ts;
}
}
function parseType() {
- return doOutsideOfContext(655360, parseTypeWorker);
+ return doOutsideOfContext(20480, parseTypeWorker);
}
function parseTypeWorker() {
if (isStartOfFunctionType()) {
- return parseFunctionOrConstructorType(158);
+ return parseFunctionOrConstructorType(159);
}
if (token() === 93) {
- return parseFunctionOrConstructorType(159);
+ return parseFunctionOrConstructorType(160);
}
return parseUnionTypeOrHigher();
}
@@ -13254,7 +14059,7 @@ var ts;
return !scanner.hasPrecedingLineBreak() && isIdentifier();
}
function parseYieldExpression() {
- var node = createNode(195);
+ var node = createNode(196);
nextToken();
if (!scanner.hasPrecedingLineBreak() &&
(token() === 38 || isStartOfExpression())) {
@@ -13270,13 +14075,13 @@ var ts;
ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
var node;
if (asyncModifier) {
- node = createNode(185, asyncModifier.pos);
+ node = createNode(186, asyncModifier.pos);
node.modifiers = asyncModifier;
}
else {
- node = createNode(185, identifier.pos);
+ node = createNode(186, identifier.pos);
}
- var parameter = createNode(144, identifier.pos);
+ var parameter = createNode(145, identifier.pos);
parameter.name = identifier;
finishNode(parameter);
node.parameters = createNodeArray([parameter], parameter.pos);
@@ -13410,7 +14215,7 @@ var ts;
return 0;
}
function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
- var node = createNode(185);
+ var node = createNode(186);
node.modifiers = parseModifiersForArrowFunction();
var isAsync = !!(ts.getModifierFlags(node) & 256);
fillSignature(55, false, isAsync, !allowAmbiguity, node);
@@ -13442,7 +14247,7 @@ var ts;
if (!questionToken) {
return leftOperand;
}
- var node = createNode(193, leftOperand.pos);
+ var node = createNode(194, leftOperand.pos);
node.condition = leftOperand;
node.questionToken = questionToken;
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
@@ -13455,7 +14260,7 @@ var ts;
return parseBinaryExpressionRest(precedence, leftOperand);
}
function isInOrOfKeyword(t) {
- return t === 91 || t === 140;
+ return t === 91 || t === 141;
}
function parseBinaryExpressionRest(precedence, leftOperand) {
while (true) {
@@ -13533,39 +14338,39 @@ var ts;
return -1;
}
function makeBinaryExpression(left, operatorToken, right) {
- var node = createNode(192, left.pos);
+ var node = createNode(193, left.pos);
node.left = left;
node.operatorToken = operatorToken;
node.right = right;
return finishNode(node);
}
function makeAsExpression(left, right) {
- var node = createNode(200, left.pos);
+ var node = createNode(201, left.pos);
node.expression = left;
node.type = right;
return finishNode(node);
}
function parsePrefixUnaryExpression() {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseDeleteExpression() {
- var node = createNode(186);
+ var node = createNode(187);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseTypeOfExpression() {
- var node = createNode(187);
+ var node = createNode(188);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseVoidExpression() {
- var node = createNode(188);
+ var node = createNode(189);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -13580,7 +14385,7 @@ var ts;
return false;
}
function parseAwaitExpression() {
- var node = createNode(189);
+ var node = createNode(190);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -13596,7 +14401,7 @@ var ts;
var simpleUnaryExpression = parseSimpleUnaryExpression();
if (token() === 39) {
var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
- if (simpleUnaryExpression.kind === 182) {
+ if (simpleUnaryExpression.kind === 183) {
parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
}
else {
@@ -13649,7 +14454,7 @@ var ts;
}
function parseIncrementExpression() {
if (token() === 42 || token() === 43) {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseLeftHandSideExpressionOrHigher();
@@ -13661,7 +14466,7 @@ var ts;
var expression = parseLeftHandSideExpressionOrHigher();
ts.Debug.assert(ts.isLeftHandSideExpression(expression));
if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) {
- var node = createNode(191, expression.pos);
+ var node = createNode(192, expression.pos);
node.operand = expression;
node.operator = token();
nextToken();
@@ -13684,7 +14489,7 @@ var ts;
if (token() === 18 || token() === 22 || token() === 20) {
return expression;
}
- var node = createNode(177, expression.pos);
+ var node = createNode(178, expression.pos);
node.expression = expression;
parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
node.name = parseRightSideOfDot(true);
@@ -13706,8 +14511,8 @@ var ts;
function parseJsxElementOrSelfClosingElement(inExpressionContext) {
var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
var result;
- if (opening.kind === 248) {
- var node = createNode(246, opening.pos);
+ if (opening.kind === 250) {
+ var node = createNode(248, opening.pos);
node.openingElement = opening;
node.children = parseJsxChildren(node.openingElement.tagName);
node.closingElement = parseJsxClosingElement(inExpressionContext);
@@ -13717,14 +14522,14 @@ var ts;
result = finishNode(node);
}
else {
- ts.Debug.assert(opening.kind === 247);
+ ts.Debug.assert(opening.kind === 249);
result = opening;
}
if (inExpressionContext && token() === 26) {
var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); });
if (invalidElement) {
parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element);
- var badNode = createNode(192, result.pos);
+ var badNode = createNode(193, result.pos);
badNode.end = invalidElement.end;
badNode.left = result;
badNode.right = invalidElement;
@@ -13764,20 +14569,28 @@ var ts;
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName));
break;
}
+ else if (token() === 7) {
+ break;
+ }
result.push(parseJsxChild());
}
result.end = scanner.getTokenPos();
parsingContext = saveParsingContext;
return result;
}
+ function parseJsxAttributes() {
+ var jsxAttributes = createNode(253);
+ jsxAttributes.properties = parseList(13, parseJsxAttribute);
+ return finishNode(jsxAttributes);
+ }
function parseJsxOpeningOrSelfClosingElement(inExpressionContext) {
var fullStart = scanner.getStartPos();
parseExpected(26);
var tagName = parseJsxElementName();
- var attributes = parseList(13, parseJsxAttribute);
+ var attributes = parseJsxAttributes();
var node;
if (token() === 28) {
- node = createNode(248, fullStart);
+ node = createNode(250, fullStart);
scanJsxText();
}
else {
@@ -13789,7 +14602,7 @@ var ts;
parseExpected(28, undefined, false);
scanJsxText();
}
- node = createNode(247, fullStart);
+ node = createNode(249, fullStart);
}
node.tagName = tagName;
node.attributes = attributes;
@@ -13800,7 +14613,7 @@ var ts;
var expression = token() === 98 ?
parseTokenNode() : parseIdentifierName();
while (parseOptional(22)) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -13808,9 +14621,10 @@ var ts;
return expression;
}
function parseJsxExpression(inExpressionContext) {
- var node = createNode(252);
+ var node = createNode(255);
parseExpected(16);
if (token() !== 17) {
+ node.dotDotDotToken = parseOptionalToken(23);
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
@@ -13827,7 +14641,7 @@ var ts;
return parseJsxSpreadAttribute();
}
scanJsxIdentifier();
- var node = createNode(250);
+ var node = createNode(252);
node.name = parseIdentifierName();
if (token() === 57) {
switch (scanJsxAttributeValue()) {
@@ -13842,7 +14656,7 @@ var ts;
return finishNode(node);
}
function parseJsxSpreadAttribute() {
- var node = createNode(251);
+ var node = createNode(254);
parseExpected(16);
parseExpected(23);
node.expression = parseExpression();
@@ -13850,7 +14664,7 @@ var ts;
return finishNode(node);
}
function parseJsxClosingElement(inExpressionContext) {
- var node = createNode(249);
+ var node = createNode(251);
parseExpected(27);
node.tagName = parseJsxElementName();
if (inExpressionContext) {
@@ -13863,7 +14677,7 @@ var ts;
return finishNode(node);
}
function parseTypeAssertion() {
- var node = createNode(182);
+ var node = createNode(183);
parseExpected(26);
node.type = parseType();
parseExpected(28);
@@ -13874,7 +14688,7 @@ var ts;
while (true) {
var dotToken = parseOptionalToken(22);
if (dotToken) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -13882,13 +14696,13 @@ var ts;
}
if (token() === 50 && !scanner.hasPrecedingLineBreak()) {
nextToken();
- var nonNullExpression = createNode(201, expression.pos);
+ var nonNullExpression = createNode(202, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
if (!inDecoratorContext() && parseOptional(20)) {
- var indexedAccess = createNode(178, expression.pos);
+ var indexedAccess = createNode(179, expression.pos);
indexedAccess.expression = expression;
if (token() !== 21) {
indexedAccess.argumentExpression = allowInAnd(parseExpression);
@@ -13902,7 +14716,7 @@ var ts;
continue;
}
if (token() === 12 || token() === 13) {
- var tagExpression = createNode(181, expression.pos);
+ var tagExpression = createNode(182, expression.pos);
tagExpression.tag = expression;
tagExpression.template = token() === 12
? parseLiteralNode()
@@ -13921,7 +14735,7 @@ var ts;
if (!typeArguments) {
return expression;
}
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.typeArguments = typeArguments;
callExpr.arguments = parseArgumentList();
@@ -13929,7 +14743,7 @@ var ts;
continue;
}
else if (token() === 18) {
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.arguments = parseArgumentList();
expression = finishNode(callExpr);
@@ -14024,28 +14838,28 @@ var ts;
return parseIdentifier(ts.Diagnostics.Expression_expected);
}
function parseParenthesizedExpression() {
- var node = createNode(183);
+ var node = createNode(184);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
return finishNode(node);
}
function parseSpreadElement() {
- var node = createNode(196);
+ var node = createNode(197);
parseExpected(23);
node.expression = parseAssignmentExpressionOrHigher();
return finishNode(node);
}
function parseArgumentOrArrayLiteralElement() {
return token() === 23 ? parseSpreadElement() :
- token() === 25 ? createNode(198) :
+ token() === 25 ? createNode(199) :
parseAssignmentExpressionOrHigher();
}
function parseArgumentExpression() {
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
}
function parseArrayLiteralExpression() {
- var node = createNode(175);
+ var node = createNode(176);
parseExpected(20);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -14056,18 +14870,18 @@ var ts;
}
function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
if (parseContextualModifier(124)) {
- return parseAccessorDeclaration(151, fullStart, decorators, modifiers);
- }
- else if (parseContextualModifier(133)) {
return parseAccessorDeclaration(152, fullStart, decorators, modifiers);
}
+ else if (parseContextualModifier(134)) {
+ return parseAccessorDeclaration(153, fullStart, decorators, modifiers);
+ }
return undefined;
}
function parseObjectLiteralElement() {
var fullStart = scanner.getStartPos();
var dotDotDotToken = parseOptionalToken(23);
if (dotDotDotToken) {
- var spreadElement = createNode(259, fullStart);
+ var spreadElement = createNode(262, fullStart);
spreadElement.expression = parseAssignmentExpressionOrHigher();
return addJSDocComment(finishNode(spreadElement));
}
@@ -14086,7 +14900,7 @@ var ts;
}
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57);
if (isShorthandPropertyAssignment) {
- var shorthandDeclaration = createNode(258, fullStart);
+ var shorthandDeclaration = createNode(261, fullStart);
shorthandDeclaration.name = propertyName;
shorthandDeclaration.questionToken = questionToken;
var equalsToken = parseOptionalToken(57);
@@ -14097,7 +14911,7 @@ var ts;
return addJSDocComment(finishNode(shorthandDeclaration));
}
else {
- var propertyAssignment = createNode(257, fullStart);
+ var propertyAssignment = createNode(260, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
@@ -14107,7 +14921,7 @@ var ts;
}
}
function parseObjectLiteralExpression() {
- var node = createNode(176);
+ var node = createNode(177);
parseExpected(16);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -14121,7 +14935,7 @@ var ts;
if (saveDecoratorContext) {
setDecoratorContext(false);
}
- var node = createNode(184);
+ var node = createNode(185);
node.modifiers = parseModifiers();
parseExpected(88);
node.asteriskToken = parseOptionalToken(38);
@@ -14143,8 +14957,15 @@ var ts;
return isIdentifier() ? parseIdentifier() : undefined;
}
function parseNewExpression() {
- var node = createNode(180);
+ var fullStart = scanner.getStartPos();
parseExpected(93);
+ if (parseOptional(22)) {
+ var node_1 = createNode(203, fullStart);
+ node_1.keywordToken = 93;
+ node_1.name = parseIdentifierName();
+ return finishNode(node_1);
+ }
+ var node = createNode(181, fullStart);
node.expression = parseMemberExpressionOrHigher();
node.typeArguments = tryParse(parseTypeArgumentsInExpression);
if (node.typeArguments || token() === 18) {
@@ -14153,7 +14974,7 @@ var ts;
return finishNode(node);
}
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
- var node = createNode(204);
+ var node = createNode(206);
if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) {
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -14184,12 +15005,12 @@ var ts;
return block;
}
function parseEmptyStatement() {
- var node = createNode(206);
+ var node = createNode(208);
parseExpected(24);
return finishNode(node);
}
function parseIfStatement() {
- var node = createNode(208);
+ var node = createNode(210);
parseExpected(89);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -14199,7 +15020,7 @@ var ts;
return finishNode(node);
}
function parseDoStatement() {
- var node = createNode(209);
+ var node = createNode(211);
parseExpected(80);
node.statement = parseStatement();
parseExpected(105);
@@ -14210,7 +15031,7 @@ var ts;
return finishNode(node);
}
function parseWhileStatement() {
- var node = createNode(210);
+ var node = createNode(212);
parseExpected(105);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -14221,6 +15042,7 @@ var ts;
function parseForOrForInOrForOfStatement() {
var pos = getNodePos();
parseExpected(87);
+ var awaitToken = parseOptionalToken(120);
parseExpected(18);
var initializer = undefined;
if (token() !== 24) {
@@ -14232,22 +15054,23 @@ var ts;
}
}
var forOrForInOrForOfStatement;
- if (parseOptional(91)) {
- var forInStatement = createNode(212, pos);
- forInStatement.initializer = initializer;
- forInStatement.expression = allowInAnd(parseExpression);
- parseExpected(19);
- forOrForInOrForOfStatement = forInStatement;
- }
- else if (parseOptional(140)) {
- var forOfStatement = createNode(213, pos);
+ if (awaitToken ? parseExpected(141) : parseOptional(141)) {
+ var forOfStatement = createNode(215, pos);
+ forOfStatement.awaitModifier = awaitToken;
forOfStatement.initializer = initializer;
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
parseExpected(19);
forOrForInOrForOfStatement = forOfStatement;
}
+ else if (parseOptional(91)) {
+ var forInStatement = createNode(214, pos);
+ forInStatement.initializer = initializer;
+ forInStatement.expression = allowInAnd(parseExpression);
+ parseExpected(19);
+ forOrForInOrForOfStatement = forInStatement;
+ }
else {
- var forStatement = createNode(211, pos);
+ var forStatement = createNode(213, pos);
forStatement.initializer = initializer;
parseExpected(24);
if (token() !== 24 && token() !== 19) {
@@ -14265,7 +15088,7 @@ var ts;
}
function parseBreakOrContinueStatement(kind) {
var node = createNode(kind);
- parseExpected(kind === 215 ? 71 : 76);
+ parseExpected(kind === 217 ? 71 : 76);
if (!canParseSemicolon()) {
node.label = parseIdentifier();
}
@@ -14273,7 +15096,7 @@ var ts;
return finishNode(node);
}
function parseReturnStatement() {
- var node = createNode(216);
+ var node = createNode(218);
parseExpected(95);
if (!canParseSemicolon()) {
node.expression = allowInAnd(parseExpression);
@@ -14282,7 +15105,7 @@ var ts;
return finishNode(node);
}
function parseWithStatement() {
- var node = createNode(217);
+ var node = createNode(219);
parseExpected(106);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -14291,7 +15114,7 @@ var ts;
return finishNode(node);
}
function parseCaseClause() {
- var node = createNode(253);
+ var node = createNode(256);
parseExpected(72);
node.expression = allowInAnd(parseExpression);
parseExpected(55);
@@ -14299,7 +15122,7 @@ var ts;
return finishNode(node);
}
function parseDefaultClause() {
- var node = createNode(254);
+ var node = createNode(257);
parseExpected(78);
parseExpected(55);
node.statements = parseList(3, parseStatement);
@@ -14309,12 +15132,12 @@ var ts;
return token() === 72 ? parseCaseClause() : parseDefaultClause();
}
function parseSwitchStatement() {
- var node = createNode(218);
+ var node = createNode(220);
parseExpected(97);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
- var caseBlock = createNode(232, scanner.getStartPos());
+ var caseBlock = createNode(234, scanner.getStartPos());
parseExpected(16);
caseBlock.clauses = parseList(2, parseCaseOrDefaultClause);
parseExpected(17);
@@ -14322,14 +15145,14 @@ var ts;
return finishNode(node);
}
function parseThrowStatement() {
- var node = createNode(220);
+ var node = createNode(222);
parseExpected(99);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
parseSemicolon();
return finishNode(node);
}
function parseTryStatement() {
- var node = createNode(221);
+ var node = createNode(223);
parseExpected(101);
node.tryBlock = parseBlock(false);
node.catchClause = token() === 73 ? parseCatchClause() : undefined;
@@ -14340,7 +15163,7 @@ var ts;
return finishNode(node);
}
function parseCatchClause() {
- var result = createNode(256);
+ var result = createNode(259);
parseExpected(73);
if (parseExpected(18)) {
result.variableDeclaration = parseVariableDeclaration();
@@ -14350,7 +15173,7 @@ var ts;
return finishNode(result);
}
function parseDebuggerStatement() {
- var node = createNode(222);
+ var node = createNode(224);
parseExpected(77);
parseSemicolon();
return finishNode(node);
@@ -14359,13 +15182,13 @@ var ts;
var fullStart = scanner.getStartPos();
var expression = allowInAnd(parseExpression);
if (expression.kind === 70 && parseOptional(55)) {
- var labeledStatement = createNode(219, fullStart);
+ var labeledStatement = createNode(221, fullStart);
labeledStatement.label = expression;
labeledStatement.statement = parseStatement();
return addJSDocComment(finishNode(labeledStatement));
}
else {
- var expressionStatement = createNode(207, fullStart);
+ var expressionStatement = createNode(209, fullStart);
expressionStatement.expression = expression;
parseSemicolon();
return addJSDocComment(finishNode(expressionStatement));
@@ -14375,6 +15198,10 @@ var ts;
nextToken();
return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak();
}
+ function nextTokenIsClassKeywordOnSameLine() {
+ nextToken();
+ return token() === 74 && !scanner.hasPrecedingLineBreak();
+ }
function nextTokenIsFunctionKeywordOnSameLine() {
nextToken();
return token() === 88 && !scanner.hasPrecedingLineBreak();
@@ -14394,7 +15221,7 @@ var ts;
case 82:
return true;
case 108:
- case 136:
+ case 137:
return nextTokenIsIdentifierOnSameLine();
case 127:
case 128:
@@ -14411,7 +15238,7 @@ var ts;
return false;
}
continue;
- case 139:
+ case 140:
nextToken();
return token() === 16 || token() === 70 || token() === 83;
case 90:
@@ -14471,8 +15298,8 @@ var ts;
case 108:
case 127:
case 128:
- case 136:
- case 139:
+ case 137:
+ case 140:
return true;
case 113:
case 111:
@@ -14517,9 +15344,9 @@ var ts;
case 87:
return parseForOrForInOrForOfStatement();
case 76:
- return parseBreakOrContinueStatement(214);
+ return parseBreakOrContinueStatement(216);
case 71:
- return parseBreakOrContinueStatement(215);
+ return parseBreakOrContinueStatement(217);
case 95:
return parseReturnStatement();
case 106:
@@ -14538,7 +15365,7 @@ var ts;
return parseDeclaration();
case 119:
case 108:
- case 136:
+ case 137:
case 127:
case 128:
case 123:
@@ -14552,7 +15379,7 @@ var ts;
case 116:
case 114:
case 130:
- case 139:
+ case 140:
if (isStartOfDeclaration()) {
return parseDeclaration();
}
@@ -14575,11 +15402,11 @@ var ts;
return parseClassDeclaration(fullStart, decorators, modifiers);
case 108:
return parseInterfaceDeclaration(fullStart, decorators, modifiers);
- case 136:
+ case 137:
return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
case 82:
return parseEnumDeclaration(fullStart, decorators, modifiers);
- case 139:
+ case 140:
case 127:
case 128:
return parseModuleDeclaration(fullStart, decorators, modifiers);
@@ -14598,7 +15425,7 @@ var ts;
}
default:
if (decorators || modifiers) {
- var node = createMissingNode(244, true, ts.Diagnostics.Declaration_expected);
+ var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected);
node.pos = fullStart;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -14619,16 +15446,16 @@ var ts;
}
function parseArrayBindingElement() {
if (token() === 25) {
- return createNode(198);
+ return createNode(199);
}
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
node.name = parseIdentifierOrPattern();
node.initializer = parseBindingElementInitializer(false);
return finishNode(node);
}
function parseObjectBindingElement() {
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
var tokenIsIdentifier = isIdentifier();
var propertyName = parsePropertyName();
@@ -14644,14 +15471,14 @@ var ts;
return finishNode(node);
}
function parseObjectBindingPattern() {
- var node = createNode(172);
+ var node = createNode(173);
parseExpected(16);
node.elements = parseDelimitedList(9, parseObjectBindingElement);
parseExpected(17);
return finishNode(node);
}
function parseArrayBindingPattern() {
- var node = createNode(173);
+ var node = createNode(174);
parseExpected(20);
node.elements = parseDelimitedList(10, parseArrayBindingElement);
parseExpected(21);
@@ -14670,7 +15497,7 @@ var ts;
return parseIdentifier();
}
function parseVariableDeclaration() {
- var node = createNode(223);
+ var node = createNode(225);
node.name = parseIdentifierOrPattern();
node.type = parseTypeAnnotation();
if (!isInOrOfKeyword(token())) {
@@ -14679,7 +15506,7 @@ var ts;
return finishNode(node);
}
function parseVariableDeclarationList(inForStatementInitializer) {
- var node = createNode(224);
+ var node = createNode(226);
switch (token()) {
case 103:
break;
@@ -14693,7 +15520,7 @@ var ts;
ts.Debug.fail();
}
nextToken();
- if (token() === 140 && lookAhead(canFollowContextualOfKeyword)) {
+ if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) {
node.declarations = createMissingList();
}
else {
@@ -14708,7 +15535,7 @@ var ts;
return nextTokenIsIdentifier() && nextToken() === 19;
}
function parseVariableStatement(fullStart, decorators, modifiers) {
- var node = createNode(205, fullStart);
+ var node = createNode(207, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.declarationList = parseVariableDeclarationList(false);
@@ -14716,7 +15543,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseFunctionDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(225, fullStart);
+ var node = createNode(227, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(88);
@@ -14729,7 +15556,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseConstructorDeclaration(pos, decorators, modifiers) {
- var node = createNode(150, pos);
+ var node = createNode(151, pos);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(122);
@@ -14738,7 +15565,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
- var method = createNode(149, fullStart);
+ var method = createNode(150, fullStart);
method.decorators = decorators;
method.modifiers = modifiers;
method.asteriskToken = asteriskToken;
@@ -14751,7 +15578,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
- var property = createNode(147, fullStart);
+ var property = createNode(148, fullStart);
property.decorators = decorators;
property.modifiers = modifiers;
property.name = name;
@@ -14759,7 +15586,7 @@ var ts;
property.type = parseTypeAnnotation();
property.initializer = ts.hasModifier(property, 32)
? allowInAnd(parseNonParameterInitializer)
- : doOutsideOfContext(131072 | 65536, parseNonParameterInitializer);
+ : doOutsideOfContext(4096 | 2048, parseNonParameterInitializer);
parseSemicolon();
return addJSDocComment(finishNode(property));
}
@@ -14821,7 +15648,7 @@ var ts;
return true;
}
if (idToken !== undefined) {
- if (!ts.isKeyword(idToken) || idToken === 133 || idToken === 124) {
+ if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) {
return true;
}
switch (token()) {
@@ -14844,7 +15671,7 @@ var ts;
if (!parseOptional(56)) {
break;
}
- var decorator = createNode(145, decoratorStart);
+ var decorator = createNode(146, decoratorStart);
decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
finishNode(decorator);
if (!decorators) {
@@ -14901,7 +15728,7 @@ var ts;
}
function parseClassElement() {
if (token() === 24) {
- var result = createNode(203);
+ var result = createNode(205);
nextToken();
return finishNode(result);
}
@@ -14926,16 +15753,16 @@ var ts;
return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers);
}
if (decorators || modifiers) {
- var name_13 = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
- return parsePropertyDeclaration(fullStart, decorators, modifiers, name_13, undefined);
+ var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
+ return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined);
}
ts.Debug.fail("Should not have attempted to parse class member declaration.");
}
function parseClassExpression() {
- return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 197);
+ return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198);
}
function parseClassDeclaration(fullStart, decorators, modifiers) {
- return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 226);
+ return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228);
}
function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
var node = createNode(kind, fullStart);
@@ -14969,9 +15796,10 @@ var ts;
return undefined;
}
function parseHeritageClause() {
- if (token() === 84 || token() === 107) {
- var node = createNode(255);
- node.token = token();
+ var tok = token();
+ if (tok === 84 || tok === 107) {
+ var node = createNode(258);
+ node.token = tok;
nextToken();
node.types = parseDelimitedList(7, parseExpressionWithTypeArguments);
return finishNode(node);
@@ -14979,7 +15807,7 @@ var ts;
return undefined;
}
function parseExpressionWithTypeArguments() {
- var node = createNode(199);
+ var node = createNode(200);
node.expression = parseLeftHandSideExpressionOrHigher();
if (token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
@@ -14993,7 +15821,7 @@ var ts;
return parseList(5, parseClassElement);
}
function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(227, fullStart);
+ var node = createNode(229, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(108);
@@ -15004,10 +15832,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(228, fullStart);
+ var node = createNode(230, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- parseExpected(136);
+ parseExpected(137);
node.name = parseIdentifier();
node.typeParameters = parseTypeParameters();
parseExpected(57);
@@ -15016,13 +15844,13 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseEnumMember() {
- var node = createNode(260, scanner.getStartPos());
+ var node = createNode(263, scanner.getStartPos());
node.name = parsePropertyName();
node.initializer = allowInAnd(parseNonParameterInitializer);
return addJSDocComment(finishNode(node));
}
function parseEnumDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(229, fullStart);
+ var node = createNode(231, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(82);
@@ -15037,7 +15865,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseModuleBlock() {
- var node = createNode(231, scanner.getStartPos());
+ var node = createNode(233, scanner.getStartPos());
if (parseExpected(16)) {
node.statements = parseList(1, parseStatement);
parseExpected(17);
@@ -15048,7 +15876,7 @@ var ts;
return finishNode(node);
}
function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
var namespaceFlag = flags & 16;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -15060,10 +15888,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- if (token() === 139) {
+ if (token() === 140) {
node.name = parseIdentifier();
node.flags |= 512;
}
@@ -15080,7 +15908,7 @@ var ts;
}
function parseModuleDeclaration(fullStart, decorators, modifiers) {
var flags = 0;
- if (token() === 139) {
+ if (token() === 140) {
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
}
else if (parseOptional(128)) {
@@ -15105,7 +15933,7 @@ var ts;
return nextToken() === 40;
}
function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) {
- var exportDeclaration = createNode(233, fullStart);
+ var exportDeclaration = createNode(235, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(117);
@@ -15120,38 +15948,41 @@ var ts;
var identifier;
if (isIdentifier()) {
identifier = parseIdentifier();
- if (token() !== 25 && token() !== 138) {
- var importEqualsDeclaration = createNode(234, fullStart);
- importEqualsDeclaration.decorators = decorators;
- importEqualsDeclaration.modifiers = modifiers;
- importEqualsDeclaration.name = identifier;
- parseExpected(57);
- importEqualsDeclaration.moduleReference = parseModuleReference();
- parseSemicolon();
- return addJSDocComment(finishNode(importEqualsDeclaration));
- }
- }
- var importDeclaration = createNode(235, fullStart);
+ if (token() !== 25 && token() !== 139) {
+ return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier);
+ }
+ }
+ var importDeclaration = createNode(237, fullStart);
importDeclaration.decorators = decorators;
importDeclaration.modifiers = modifiers;
if (identifier ||
token() === 38 ||
token() === 16) {
importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
- parseExpected(138);
+ parseExpected(139);
}
importDeclaration.moduleSpecifier = parseModuleSpecifier();
parseSemicolon();
return finishNode(importDeclaration);
}
+ function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) {
+ var importEqualsDeclaration = createNode(236, fullStart);
+ importEqualsDeclaration.decorators = decorators;
+ importEqualsDeclaration.modifiers = modifiers;
+ importEqualsDeclaration.name = identifier;
+ parseExpected(57);
+ importEqualsDeclaration.moduleReference = parseModuleReference();
+ parseSemicolon();
+ return addJSDocComment(finishNode(importEqualsDeclaration));
+ }
function parseImportClause(identifier, fullStart) {
- var importClause = createNode(236, fullStart);
+ var importClause = createNode(238, fullStart);
if (identifier) {
importClause.name = identifier;
}
if (!importClause.name ||
parseOptional(25)) {
- importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(238);
+ importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240);
}
return finishNode(importClause);
}
@@ -15161,7 +15992,7 @@ var ts;
: parseEntityName(false);
}
function parseExternalModuleReference() {
- var node = createNode(245);
+ var node = createNode(247);
parseExpected(131);
parseExpected(18);
node.expression = parseModuleSpecifier();
@@ -15179,7 +16010,7 @@ var ts;
}
}
function parseNamespaceImport() {
- var namespaceImport = createNode(237);
+ var namespaceImport = createNode(239);
parseExpected(38);
parseExpected(117);
namespaceImport.name = parseIdentifier();
@@ -15187,14 +16018,14 @@ var ts;
}
function parseNamedImportsOrExports(kind) {
var node = createNode(kind);
- node.elements = parseBracketedList(22, kind === 238 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
+ node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
return finishNode(node);
}
function parseExportSpecifier() {
- return parseImportOrExportSpecifier(243);
+ return parseImportOrExportSpecifier(245);
}
function parseImportSpecifier() {
- return parseImportOrExportSpecifier(239);
+ return parseImportOrExportSpecifier(241);
}
function parseImportOrExportSpecifier(kind) {
var node = createNode(kind);
@@ -15213,23 +16044,23 @@ var ts;
else {
node.name = identifierName;
}
- if (kind === 239 && checkIdentifierIsKeyword) {
+ if (kind === 241 && checkIdentifierIsKeyword) {
parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
}
return finishNode(node);
}
function parseExportDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(241, fullStart);
+ var node = createNode(243, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(38)) {
- parseExpected(138);
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
else {
- node.exportClause = parseNamedImportsOrExports(242);
- if (token() === 138 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
- parseExpected(138);
+ node.exportClause = parseNamedImportsOrExports(244);
+ if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
}
@@ -15237,7 +16068,7 @@ var ts;
return finishNode(node);
}
function parseExportAssignment(fullStart, decorators, modifiers) {
- var node = createNode(240, fullStart);
+ var node = createNode(242, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(57)) {
@@ -15256,6 +16087,7 @@ var ts;
var typeReferenceDirectives = [];
var amdDependencies = [];
var amdModuleName;
+ var checkJsDirective = undefined;
while (true) {
var kind = triviaScanner.scan();
if (kind !== 2) {
@@ -15266,7 +16098,11 @@ var ts;
break;
}
}
- var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
+ var range = {
+ kind: triviaScanner.getToken(),
+ pos: triviaScanner.getTokenPos(),
+ end: triviaScanner.getTextPos(),
+ };
var comment = sourceText.substring(range.pos, range.end);
var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
if (referencePathMatchResult) {
@@ -15306,20 +16142,30 @@ var ts;
amdDependencies.push(amdDependency);
}
}
+ var checkJsDirectiveRegEx = /^\/\/\/?\s*(@ts-check|@ts-nocheck)\s*$/gim;
+ var checkJsDirectiveMatchResult = checkJsDirectiveRegEx.exec(comment);
+ if (checkJsDirectiveMatchResult) {
+ checkJsDirective = {
+ enabled: ts.compareStrings(checkJsDirectiveMatchResult[1], "@ts-check", true) === 0,
+ end: range.end,
+ pos: range.pos
+ };
+ }
}
}
sourceFile.referencedFiles = referencedFiles;
sourceFile.typeReferenceDirectives = typeReferenceDirectives;
sourceFile.amdDependencies = amdDependencies;
sourceFile.moduleName = amdModuleName;
+ sourceFile.checkJsDirective = checkJsDirective;
}
function setExternalModuleIndicator(sourceFile) {
sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
return ts.hasModifier(node, 1)
- || node.kind === 234 && node.moduleReference.kind === 245
- || node.kind === 235
- || node.kind === 240
- || node.kind === 241
+ || node.kind === 236 && node.moduleReference.kind === 247
+ || node.kind === 237
+ || node.kind === 242
+ || node.kind === 243
? node
: undefined;
});
@@ -15355,7 +16201,7 @@ var ts;
}
JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests;
function parseJSDocTypeExpression() {
- var result = createNode(262, scanner.getTokenPos());
+ var result = createNode(266, scanner.getTokenPos());
parseExpected(16);
result.type = parseJSDocTopLevelType();
parseExpected(17);
@@ -15366,12 +16212,12 @@ var ts;
function parseJSDocTopLevelType() {
var type = parseJSDocType();
if (token() === 48) {
- var unionType = createNode(266, type.pos);
+ var unionType = createNode(270, type.pos);
unionType.types = parseJSDocTypeList(type);
type = finishNode(unionType);
}
if (token() === 57) {
- var optionalType = createNode(273, type.pos);
+ var optionalType = createNode(277, type.pos);
nextToken();
optionalType.type = type;
type = finishNode(optionalType);
@@ -15382,20 +16228,20 @@ var ts;
var type = parseBasicTypeExpression();
while (true) {
if (token() === 20) {
- var arrayType = createNode(265, type.pos);
+ var arrayType = createNode(269, type.pos);
arrayType.elementType = type;
nextToken();
parseExpected(21);
type = finishNode(arrayType);
}
else if (token() === 54) {
- var nullableType = createNode(268, type.pos);
+ var nullableType = createNode(272, type.pos);
nullableType.type = type;
nextToken();
type = finishNode(nullableType);
}
else if (token() === 50) {
- var nonNullableType = createNode(269, type.pos);
+ var nonNullableType = createNode(273, type.pos);
nonNullableType.type = type;
nextToken();
type = finishNode(nonNullableType);
@@ -15429,14 +16275,15 @@ var ts;
case 98:
return parseJSDocThisType();
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
case 94:
- case 137:
+ case 138:
case 129:
+ case 133:
return parseTokenNode();
case 9:
case 8:
@@ -15447,27 +16294,27 @@ var ts;
return parseJSDocTypeReference();
}
function parseJSDocThisType() {
- var result = createNode(277);
+ var result = createNode(281);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocConstructorType() {
- var result = createNode(276);
+ var result = createNode(280);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocVariadicType() {
- var result = createNode(275);
+ var result = createNode(279);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocFunctionType() {
- var result = createNode(274);
+ var result = createNode(278);
nextToken();
parseExpected(18);
result.parameters = parseDelimitedList(23, parseJSDocParameter);
@@ -15480,7 +16327,7 @@ var ts;
return finishNode(result);
}
function parseJSDocParameter() {
- var parameter = createNode(144);
+ var parameter = createNode(145);
parameter.type = parseJSDocType();
if (parseOptional(57)) {
parameter.questionToken = createNode(57);
@@ -15488,7 +16335,7 @@ var ts;
return finishNode(parameter);
}
function parseJSDocTypeReference() {
- var result = createNode(272);
+ var result = createNode(276);
result.name = parseSimplePropertyName();
if (token() === 26) {
result.typeArguments = parseTypeArguments();
@@ -15522,24 +16369,24 @@ var ts;
}
}
function parseQualifiedName(left) {
- var result = createNode(141, left.pos);
+ var result = createNode(142, left.pos);
result.left = left;
result.right = parseIdentifierName();
return finishNode(result);
}
function parseJSDocRecordType() {
- var result = createNode(270);
+ var result = createNode(274);
result.literal = parseTypeLiteral();
return finishNode(result);
}
function parseJSDocNonNullableType() {
- var result = createNode(269);
+ var result = createNode(273);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocTupleType() {
- var result = createNode(267);
+ var result = createNode(271);
nextToken();
result.types = parseDelimitedList(26, parseJSDocType);
checkForTrailingComma(result.types);
@@ -15553,7 +16400,7 @@ var ts;
}
}
function parseJSDocUnionType() {
- var result = createNode(266);
+ var result = createNode(270);
nextToken();
result.types = parseJSDocTypeList(parseJSDocType());
parseExpected(19);
@@ -15569,12 +16416,12 @@ var ts;
return types;
}
function parseJSDocAllType() {
- var result = createNode(263);
+ var result = createNode(267);
nextToken();
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(288);
+ var result = createNode(292);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -15587,11 +16434,11 @@ var ts;
token() === 28 ||
token() === 57 ||
token() === 48) {
- var result = createNode(264, pos);
+ var result = createNode(268, pos);
return finishNode(result);
}
else {
- var result = createNode(268, pos);
+ var result = createNode(272, pos);
result.type = parseJSDocType();
return finishNode(result);
}
@@ -15676,7 +16523,7 @@ var ts;
break;
case 38:
var asterisk = scanner.getTokenText();
- if (state === 1) {
+ if (state === 1 || state === 2) {
state = 2;
pushComment(asterisk);
}
@@ -15691,7 +16538,10 @@ var ts;
break;
case 5:
var whitespace = scanner.getTokenText();
- if (state === 2 || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === 2) {
+ comments.push(whitespace);
+ }
+ else if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent - 1));
}
indent += whitespace.length;
@@ -15699,6 +16549,7 @@ var ts;
case 1:
break;
default:
+ state = 2;
pushComment(scanner.getTokenText());
break;
}
@@ -15731,7 +16582,7 @@ var ts;
content.charCodeAt(start + 3) !== 42;
}
function createJSDocComment() {
- var result = createNode(278, start);
+ var result = createNode(282, start);
result.tags = tags;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
@@ -15788,7 +16639,7 @@ var ts;
}
function parseTagComments(indent) {
var comments = [];
- var state = 1;
+ var state = 0;
var margin;
function pushComment(text) {
if (!margin) {
@@ -15841,7 +16692,7 @@ var ts;
return comments;
}
function parseUnknownTag(atToken, tagName) {
- var result = createNode(279, atToken.pos);
+ var result = createNode(283, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
@@ -15896,7 +16747,7 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(281, atToken.pos);
+ var result = createNode(285, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
@@ -15907,20 +16758,20 @@ var ts;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 282; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 286; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(282, atToken.pos);
+ var result = createNode(286, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 283; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(283, atToken.pos);
+ var result = createNode(287, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
@@ -15935,7 +16786,7 @@ var ts;
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var result = createNode(286, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.name = name;
@@ -15944,7 +16795,7 @@ var ts;
}
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
- var result = createNode(280, atToken.pos);
+ var result = createNode(284, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = typeExpression;
@@ -15953,25 +16804,28 @@ var ts;
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(285, atToken.pos);
+ var typedefTag = createNode(289, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
- while (rightNode.kind !== 70) {
+ while (true) {
+ if (rightNode.kind === 70 || !rightNode.body) {
+ typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name;
+ break;
+ }
rightNode = rightNode.body;
}
- typedefTag.name = rightNode;
}
typedefTag.typeExpression = typeExpression;
skipWhitespace();
if (typeExpression) {
- if (typeExpression.type.kind === 272) {
+ if (typeExpression.type.kind === 276) {
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 70) {
- var name_14 = jsDocTypeReference.name;
- if (name_14.text === "Object") {
+ var name = jsDocTypeReference.name;
+ if (name.text === "Object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -15985,7 +16839,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(287, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(291, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -16015,6 +16869,7 @@ var ts;
break;
case 70:
canParseTag = false;
+ break;
case 1:
break;
}
@@ -16026,7 +16881,7 @@ var ts;
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(22)) {
- var jsDocNamespaceNode = createNode(230, pos);
+ var jsDocNamespaceNode = createNode(232, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
@@ -16070,19 +16925,19 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 284; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
while (true) {
- var name_15 = parseJSDocIdentifierName();
+ var name = parseJSDocIdentifierName();
skipWhitespace();
- if (!name_15) {
+ if (!name) {
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var typeParameter = createNode(143, name_15.pos);
- typeParameter.name = name_15;
+ var typeParameter = createNode(144, name.pos);
+ typeParameter.name = name;
finishNode(typeParameter);
typeParameters.push(typeParameter);
if (token() === 25) {
@@ -16093,7 +16948,7 @@ var ts;
break;
}
}
- var result = createNode(284, atToken.pos);
+ var result = createNode(288, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -16385,7 +17240,7 @@ var ts;
}
function visitArray(array) {
if (position >= array.pos && position < array.end) {
- for (var i = 0, n = array.length; i < n; i++) {
+ for (var i = 0; i < array.length; i++) {
var child = array[i];
if (child) {
if (child.pos === position) {
@@ -16412,16 +17267,16 @@ var ts;
var ts;
(function (ts) {
function getModuleInstanceState(node) {
- if (node.kind === 227 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 230) {
return 0;
}
else if (ts.isConstEnumDeclaration(node)) {
return 2;
}
- else if ((node.kind === 235 || node.kind === 234) && !(ts.hasModifier(node, 1))) {
+ else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) {
return 0;
}
- else if (node.kind === 231) {
+ else if (node.kind === 233) {
var state_1 = 0;
ts.forEachChild(node, function (n) {
switch (getModuleInstanceState(n)) {
@@ -16437,7 +17292,7 @@ var ts;
});
return state_1;
}
- else if (node.kind === 230) {
+ else if (node.kind === 232) {
var body = node.body;
return body ? getModuleInstanceState(body) : 1;
}
@@ -16519,7 +17374,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if (opts.alwaysStrict && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
return true;
}
else {
@@ -16546,7 +17401,7 @@ var ts;
if (symbolFlags & 107455) {
var valueDeclaration = symbol.valueDeclaration;
if (!valueDeclaration ||
- (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 230)) {
+ (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) {
symbol.valueDeclaration = node;
}
}
@@ -16556,7 +17411,7 @@ var ts;
if (ts.isAmbientModule(node)) {
return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
var nameExpression = node.name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -16567,46 +17422,47 @@ var ts;
return node.name.text;
}
switch (node.kind) {
- case 150:
+ case 151:
return "__constructor";
- case 158:
- case 153:
- return "__call";
case 159:
case 154:
- return "__new";
+ return "__call";
+ case 160:
case 155:
+ return "__new";
+ case 156:
return "__index";
- case 241:
+ case 243:
return "__export";
- case 240:
+ case 242:
return node.isExportEquals ? "export=" : "default";
- case 192:
+ case 193:
switch (ts.getSpecialPropertyAssignmentKind(node)) {
case 2:
return "export=";
case 1:
case 4:
+ case 5:
return node.left.name.text;
case 3:
return node.left.expression.name.text;
}
ts.Debug.fail("Unknown binary declaration kind");
break;
- case 225:
- case 226:
+ case 227:
+ case 228:
return ts.hasModifier(node, 512) ? "default" : undefined;
- case 274:
+ case 278:
return ts.isJSDocConstructSignature(node) ? "__new" : "__call";
- case 144:
- ts.Debug.assert(node.parent.kind === 274);
+ case 145:
+ ts.Debug.assert(node.parent.kind === 278);
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 285:
+ case 289:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
- if (parentNode && parentNode.kind === 205) {
+ if (parentNode && parentNode.kind === 207) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70) {
@@ -16629,13 +17485,16 @@ var ts;
symbol = createSymbol(0, "__missing");
}
else {
- symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0, name));
+ symbol = symbolTable.get(name);
+ if (!symbol) {
+ symbolTable.set(name, symbol = createSymbol(0, name));
+ }
if (name && (includes & 788448)) {
- classifiableNames[name] = name;
+ classifiableNames.set(name, name);
}
if (symbol.flags & excludes) {
if (symbol.isReplaceableByMethod) {
- symbol = symbolTable[name] = createSymbol(0, name);
+ symbolTable.set(name, symbol = createSymbol(0, name));
}
else {
if (node.name) {
@@ -16650,7 +17509,7 @@ var ts;
}
else {
if (symbol.declarations && symbol.declarations.length &&
- (isDefaultExport || (node.kind === 240 && !node.isExportEquals))) {
+ (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) {
message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
}
}
@@ -16670,7 +17529,7 @@ var ts;
function declareModuleMember(node, symbolFlags, symbolExcludes) {
var hasExportModifier = ts.getCombinedModifierFlags(node) & 1;
if (symbolFlags & 8388608) {
- if (node.kind === 243 || (node.kind === 234 && hasExportModifier)) {
+ if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) {
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
}
else {
@@ -16678,7 +17537,7 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 285 &&
+ var isJSDocTypedefInJSDocNamespace = node.kind === 289 &&
node.name &&
node.name.kind === 70 &&
node.name.isInJSDocNamespace;
@@ -16733,13 +17592,13 @@ var ts;
activeLabels = undefined;
hasExplicitReturn = false;
bindChildren(node);
- node.flags &= ~64896;
+ node.flags &= ~1408;
if (!(currentFlow.flags & 1) && containerFlags & 8 && ts.nodeIsPresent(node.body)) {
node.flags |= 128;
if (hasExplicitReturn)
node.flags |= 256;
}
- if (node.kind === 261) {
+ if (node.kind === 264) {
node.flags |= emitFlags;
}
if (isIIFE) {
@@ -16815,66 +17674,72 @@ var ts;
return;
}
switch (node.kind) {
- case 210:
+ case 212:
bindWhileStatement(node);
break;
- case 209:
+ case 211:
bindDoStatement(node);
break;
- case 211:
+ case 213:
bindForStatement(node);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
bindForInOrForOfStatement(node);
break;
- case 208:
+ case 210:
bindIfStatement(node);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
bindReturnOrThrow(node);
break;
- case 215:
- case 214:
+ case 217:
+ case 216:
bindBreakOrContinueStatement(node);
break;
- case 221:
+ case 223:
bindTryStatement(node);
break;
- case 218:
+ case 220:
bindSwitchStatement(node);
break;
- case 232:
+ case 234:
bindCaseBlock(node);
break;
- case 253:
+ case 256:
bindCaseClause(node);
break;
- case 219:
+ case 221:
bindLabeledStatement(node);
break;
- case 190:
+ case 191:
bindPrefixUnaryExpressionFlow(node);
break;
- case 191:
+ case 192:
bindPostfixUnaryExpressionFlow(node);
break;
- case 192:
+ case 193:
bindBinaryExpressionFlow(node);
break;
- case 186:
+ case 187:
bindDeleteExpressionFlow(node);
break;
- case 193:
+ case 194:
bindConditionalExpressionFlow(node);
break;
- case 223:
+ case 225:
bindVariableDeclarationFlow(node);
break;
- case 179:
+ case 180:
bindCallExpressionFlow(node);
break;
+ case 282:
+ bindJSDocComment(node);
+ break;
+ case 289:
+ bindJSDocTypedefTag(node);
+ break;
default:
bindEachChild(node);
break;
@@ -16884,15 +17749,15 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 178:
return isNarrowableReference(expr);
- case 179:
+ case 180:
return hasNarrowableArgument(expr);
- case 183:
+ case 184:
return isNarrowingExpression(expr.expression);
- case 192:
+ case 193:
return isNarrowingBinaryExpression(expr);
- case 190:
+ case 191:
return expr.operator === 50 && isNarrowingExpression(expr.operand);
}
return false;
@@ -16900,7 +17765,8 @@ var ts;
function isNarrowableReference(expr) {
return expr.kind === 70 ||
expr.kind === 98 ||
- expr.kind === 177 && isNarrowableReference(expr.expression);
+ expr.kind === 96 ||
+ expr.kind === 178 && isNarrowableReference(expr.expression);
}
function hasNarrowableArgument(expr) {
if (expr.arguments) {
@@ -16911,14 +17777,14 @@ var ts;
}
}
}
- if (expr.expression.kind === 177 &&
+ if (expr.expression.kind === 178 &&
isNarrowableReference(expr.expression.expression)) {
return true;
}
return false;
}
function isNarrowingTypeofOperands(expr1, expr2) {
- return expr1.kind === 187 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
+ return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
}
function isNarrowingBinaryExpression(expr) {
switch (expr.operatorToken.kind) {
@@ -16939,9 +17805,9 @@ var ts;
}
function isNarrowableOperand(expr) {
switch (expr.kind) {
- case 183:
+ case 184:
return isNarrowableOperand(expr.expression);
- case 192:
+ case 193:
switch (expr.operatorToken.kind) {
case 57:
return isNarrowableOperand(expr.left);
@@ -17035,33 +17901,33 @@ var ts;
function isStatementCondition(node) {
var parent = node.parent;
switch (parent.kind) {
- case 208:
case 210:
- case 209:
- return parent.expression === node;
+ case 212:
case 211:
- case 193:
+ return parent.expression === node;
+ case 213:
+ case 194:
return parent.condition === node;
}
return false;
}
function isLogicalExpression(node) {
while (true) {
- if (node.kind === 183) {
+ if (node.kind === 184) {
node = node.expression;
}
- else if (node.kind === 190 && node.operator === 50) {
+ else if (node.kind === 191 && node.operator === 50) {
node = node.operand;
}
else {
- return node.kind === 192 && (node.operatorToken.kind === 52 ||
+ return node.kind === 193 && (node.operatorToken.kind === 52 ||
node.operatorToken.kind === 53);
}
}
}
function isTopLevelLogicalExpression(node) {
- while (node.parent.kind === 183 ||
- node.parent.kind === 190 &&
+ while (node.parent.kind === 184 ||
+ node.parent.kind === 191 &&
node.parent.operator === 50) {
node = node.parent;
}
@@ -17103,7 +17969,7 @@ var ts;
}
function bindDoStatement(node) {
var preDoLabel = createLoopLabel();
- var enclosingLabeledStatement = node.parent.kind === 219
+ var enclosingLabeledStatement = node.parent.kind === 221
? ts.lastOrUndefined(activeLabels)
: undefined;
var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel();
@@ -17135,10 +18001,13 @@ var ts;
var postLoopLabel = createBranchLabel();
addAntecedent(preLoopLabel, currentFlow);
currentFlow = preLoopLabel;
+ if (node.kind === 215) {
+ bind(node.awaitModifier);
+ }
bind(node.expression);
addAntecedent(postLoopLabel, currentFlow);
bind(node.initializer);
- if (node.initializer.kind !== 224) {
+ if (node.initializer.kind !== 226) {
bindAssignmentTargetFlow(node.initializer);
}
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -17160,7 +18029,7 @@ var ts;
}
function bindReturnOrThrow(node) {
bind(node.expression);
- if (node.kind === 216) {
+ if (node.kind === 218) {
hasExplicitReturn = true;
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
@@ -17180,7 +18049,7 @@ var ts;
return undefined;
}
function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
- var flowLabel = node.kind === 215 ? breakTarget : continueTarget;
+ var flowLabel = node.kind === 217 ? breakTarget : continueTarget;
if (flowLabel) {
addAntecedent(flowLabel, currentFlow);
currentFlow = unreachableFlow;
@@ -17213,7 +18082,8 @@ var ts;
flowAfterCatch = currentFlow;
}
if (node.finallyBlock) {
- addAntecedent(preFinallyLabel, preTryFlow);
+ var preFinallyFlow = { flags: 2048, antecedent: preTryFlow, lock: {} };
+ addAntecedent(preFinallyLabel, preFinallyFlow);
currentFlow = finishFlowLabel(preFinallyLabel);
bind(node.finallyBlock);
if (!(currentFlow.flags & 1)) {
@@ -17223,6 +18093,11 @@ var ts;
: unreachableFlow;
}
}
+ if (!(currentFlow.flags & 1)) {
+ var afterFinallyFlow = { flags: 4096, antecedent: currentFlow };
+ preFinallyFlow.lock = afterFinallyFlow;
+ currentFlow = afterFinallyFlow;
+ }
}
else {
currentFlow = finishFlowLabel(preFinallyLabel);
@@ -17237,7 +18112,7 @@ var ts;
preSwitchCaseFlow = currentFlow;
bind(node.caseBlock);
addAntecedent(postSwitchLabel, currentFlow);
- var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 254; });
+ var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; });
node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
if (!hasDefault) {
addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0));
@@ -17302,13 +18177,13 @@ var ts;
if (!activeLabel.referenced && !options.allowUnusedLabels) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label));
}
- if (!node.statement || node.statement.kind !== 209) {
+ if (!node.statement || node.statement.kind !== 211) {
addAntecedent(postStatementLabel, currentFlow);
currentFlow = finishFlowLabel(postStatementLabel);
}
}
function bindDestructuringTargetFlow(node) {
- if (node.kind === 192 && node.operatorToken.kind === 57) {
+ if (node.kind === 193 && node.operatorToken.kind === 57) {
bindAssignmentTargetFlow(node.left);
}
else {
@@ -17319,10 +18194,10 @@ var ts;
if (isNarrowableReference(node)) {
currentFlow = createFlowAssignment(currentFlow, node);
}
- else if (node.kind === 175) {
+ else if (node.kind === 176) {
for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
var e = _a[_i];
- if (e.kind === 196) {
+ if (e.kind === 197) {
bindAssignmentTargetFlow(e.expression);
}
else {
@@ -17330,16 +18205,16 @@ var ts;
}
}
}
- else if (node.kind === 176) {
+ else if (node.kind === 177) {
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
var p = _c[_b];
- if (p.kind === 257) {
+ if (p.kind === 260) {
bindDestructuringTargetFlow(p.initializer);
}
- else if (p.kind === 258) {
+ else if (p.kind === 261) {
bindAssignmentTargetFlow(p.name);
}
- else if (p.kind === 259) {
+ else if (p.kind === 262) {
bindAssignmentTargetFlow(p.expression);
}
}
@@ -17395,7 +18270,7 @@ var ts;
bindEachChild(node);
if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
bindAssignmentTargetFlow(node.left);
- if (operator === 57 && node.left.kind === 178) {
+ if (operator === 57 && node.left.kind === 179) {
var elementAccess = node.left;
if (isNarrowableOperand(elementAccess.expression)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -17406,7 +18281,7 @@ var ts;
}
function bindDeleteExpressionFlow(node) {
bindEachChild(node);
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
bindAssignmentTargetFlow(node.expression);
}
}
@@ -17439,16 +18314,31 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 212 || node.parent.parent.kind === 213) {
+ if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) {
bindInitializedVariableFlow(node);
}
}
+ function bindJSDocComment(node) {
+ ts.forEachChild(node, function (n) {
+ if (n.kind !== 289) {
+ bind(n);
+ }
+ });
+ }
+ function bindJSDocTypedefTag(node) {
+ ts.forEachChild(node, function (n) {
+ if (node.fullName && n === node.name && node.fullName.kind !== 70) {
+ return;
+ }
+ bind(n);
+ });
+ }
function bindCallExpressionFlow(node) {
var expr = node.expression;
- while (expr.kind === 183) {
+ while (expr.kind === 184) {
expr = expr.expression;
}
- if (expr.kind === 184 || expr.kind === 185) {
+ if (expr.kind === 185 || expr.kind === 186) {
bindEach(node.typeArguments);
bindEach(node.arguments);
bind(node.expression);
@@ -17456,7 +18346,7 @@ var ts;
else {
bindEachChild(node);
}
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
var propertyAccess = node.expression;
if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -17465,52 +18355,53 @@ var ts;
}
function getContainerFlags(node) {
switch (node.kind) {
- case 197:
- case 226:
- case 229:
- case 176:
- case 161:
- case 287:
- case 270:
+ case 198:
+ case 228:
+ case 231:
+ case 177:
+ case 162:
+ case 291:
+ case 274:
+ case 253:
return 1;
- case 227:
+ case 229:
return 1 | 64;
- case 274:
+ case 278:
+ case 232:
case 230:
- case 228:
- case 170:
+ case 171:
return 1 | 32;
- case 261:
+ case 264:
return 1 | 4 | 32;
- case 149:
+ case 150:
if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
return 1 | 4 | 32 | 8 | 128;
}
- case 150:
- case 225:
- case 148:
case 151:
+ case 227:
+ case 149:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return 1 | 4 | 32 | 8;
- case 184:
case 185:
+ case 186:
return 1 | 4 | 32 | 8 | 16;
- case 231:
+ case 233:
return 4;
- case 147:
+ case 148:
return node.initializer ? 4 : 0;
- case 256:
- case 211:
- case 212:
+ case 259:
case 213:
- case 232:
+ case 214:
+ case 215:
+ case 234:
return 2;
- case 204:
+ case 206:
return ts.isFunctionLike(node.parent) ? 0 : 2;
}
return 0;
@@ -17526,37 +18417,38 @@ var ts;
}
function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) {
switch (container.kind) {
- case 230:
+ case 232:
return declareModuleMember(node, symbolFlags, symbolExcludes);
- case 261:
+ case 264:
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
- case 197:
- case 226:
+ case 198:
+ case 228:
return declareClassMember(node, symbolFlags, symbolExcludes);
- case 229:
+ case 231:
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
- case 161:
- case 176:
- case 227:
- case 270:
- case 287:
+ case 162:
+ case 177:
+ case 229:
+ case 274:
+ case 291:
+ case 253:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
- case 149:
- case 148:
+ case 156:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
- case 274:
- case 228:
- case 170:
+ case 186:
+ case 278:
+ case 230:
+ case 171:
return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
}
}
@@ -17571,11 +18463,11 @@ var ts;
: declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes);
}
function hasExportDeclarations(node) {
- var body = node.kind === 261 ? node : node.body;
- if (body && (body.kind === 261 || body.kind === 231)) {
+ var body = node.kind === 264 ? node : node.body;
+ if (body && (body.kind === 264 || body.kind === 233)) {
for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
var stat = _a[_i];
- if (stat.kind === 241 || stat.kind === 240) {
+ if (stat.kind === 243 || stat.kind === 242) {
return true;
}
}
@@ -17597,7 +18489,7 @@ var ts;
errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
}
if (ts.isExternalModuleAugmentation(node)) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
+ declareModuleSymbol(node);
}
else {
var pattern = void 0;
@@ -17617,12 +18509,8 @@ var ts;
}
}
else {
- var state = getModuleInstanceState(node);
- if (state === 0) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
- }
- else {
- declareSymbolAndAddToSymbolTable(node, 512, 106639);
+ var state = declareModuleSymbol(node);
+ if (state !== 0) {
if (node.symbol.flags & (16 | 32 | 256)) {
node.symbol.constEnumOnlyModule = false;
}
@@ -17638,29 +18526,35 @@ var ts;
}
}
}
+ function declareModuleSymbol(node) {
+ var state = getModuleInstanceState(node);
+ var instantiated = state !== 0;
+ declareSymbolAndAddToSymbolTable(node, instantiated ? 512 : 1024, instantiated ? 106639 : 0);
+ return state;
+ }
function bindFunctionOrConstructorType(node) {
var symbol = createSymbol(131072, getDeclarationName(node));
addDeclarationToSymbol(symbol, node, 131072);
var typeLiteralSymbol = createSymbol(2048, "__type");
addDeclarationToSymbol(typeLiteralSymbol, node, 2048);
typeLiteralSymbol.members = ts.createMap();
- typeLiteralSymbol.members[symbol.name] = symbol;
+ typeLiteralSymbol.members.set(symbol.name, symbol);
}
function bindObjectLiteralExpression(node) {
if (inStrictMode) {
var seen = ts.createMap();
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 || prop.name.kind !== 70) {
+ if (prop.kind === 262 || prop.name.kind !== 70) {
continue;
}
var identifier = prop.name;
- var currentKind = prop.kind === 257 || prop.kind === 258 || prop.kind === 149
+ var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150
? 1
: 2;
- var existingKind = seen[identifier.text];
+ var existingKind = seen.get(identifier.text);
if (!existingKind) {
- seen[identifier.text] = currentKind;
+ seen.set(identifier.text, currentKind);
continue;
}
if (currentKind === 1 && existingKind === 1) {
@@ -17671,16 +18565,22 @@ var ts;
}
return bindAnonymousDeclaration(node, 4096, "__object");
}
+ function bindJsxAttributes(node) {
+ return bindAnonymousDeclaration(node, 4096, "__jsxAttributes");
+ }
+ function bindJsxAttribute(node, symbolFlags, symbolExcludes) {
+ return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
+ }
function bindAnonymousDeclaration(node, symbolFlags, name) {
var symbol = createSymbol(symbolFlags, name);
addDeclarationToSymbol(symbol, node, symbolFlags);
}
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
switch (blockScopeContainer.kind) {
- case 230:
+ case 232:
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
- case 261:
+ case 264:
if (ts.isExternalModule(container)) {
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
@@ -17770,8 +18670,8 @@ var ts;
}
function checkStrictModeFunctionDeclaration(node) {
if (languageVersion < 2) {
- if (blockScopeContainer.kind !== 261 &&
- blockScopeContainer.kind !== 230 &&
+ if (blockScopeContainer.kind !== 264 &&
+ blockScopeContainer.kind !== 232 &&
!ts.isFunctionLike(blockScopeContainer)) {
var errorSpan = ts.getErrorSpanForNode(file, node);
file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node)));
@@ -17779,7 +18679,7 @@ var ts;
}
}
function checkStrictModeNumericLiteral(node) {
- if (inStrictMode && node.isOctalLiteral) {
+ if (inStrictMode && node.numericLiteralFlags & 4) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
}
}
@@ -17813,8 +18713,11 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
+ if (ts.isInJavaScriptFile(node)) {
+ bindJSDocTypedefTagIfAny(node);
+ }
bindWorker(node);
- if (node.kind > 140) {
+ if (node.kind > 141) {
var saveParent = parent;
parent = node;
var containerFlags = getContainerFlags(node);
@@ -17831,6 +18734,26 @@ var ts;
}
inStrictMode = saveInStrictMode;
}
+ function bindJSDocTypedefTagIfAny(node) {
+ if (!node.jsDoc) {
+ return;
+ }
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var jsDoc = _a[_i];
+ if (!jsDoc.tags) {
+ continue;
+ }
+ for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
+ var tag = _c[_b];
+ if (tag.kind === 289) {
+ var savedParent = parent;
+ parent = jsDoc;
+ bind(tag);
+ parent = savedParent;
+ }
+ }
+ }
+ }
function updateStrictModeStatementList(statements) {
if (!inStrictMode) {
for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
@@ -17854,90 +18777,88 @@ var ts;
case 70:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 285) {
+ while (parentNode && parentNode.kind !== 289) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
break;
}
case 98:
- if (currentFlow && (ts.isExpression(node) || parent.kind === 258)) {
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) {
node.flowNode = currentFlow;
}
return checkStrictModeIdentifier(node);
- case 177:
+ case 178:
if (currentFlow && isNarrowableReference(node)) {
node.flowNode = currentFlow;
}
break;
- case 192:
- if (ts.isInJavaScriptFile(node)) {
- var specialKind = ts.getSpecialPropertyAssignmentKind(node);
- switch (specialKind) {
- case 1:
- bindExportsPropertyAssignment(node);
- break;
- case 2:
- bindModuleExportsAssignment(node);
- break;
- case 3:
- bindPrototypePropertyAssignment(node);
- break;
- case 4:
- bindThisPropertyAssignment(node);
- break;
- case 0:
- break;
- default:
- ts.Debug.fail("Unknown special property assignment kind");
- }
+ case 193:
+ var specialKind = ts.getSpecialPropertyAssignmentKind(node);
+ switch (specialKind) {
+ case 1:
+ bindExportsPropertyAssignment(node);
+ break;
+ case 2:
+ bindModuleExportsAssignment(node);
+ break;
+ case 3:
+ bindPrototypePropertyAssignment(node);
+ break;
+ case 4:
+ bindThisPropertyAssignment(node);
+ break;
+ case 5:
+ bindStaticPropertyAssignment(node);
+ break;
+ case 0:
+ break;
+ default:
+ ts.Debug.fail("Unknown special property assignment kind");
}
return checkStrictModeBinaryExpression(node);
- case 256:
+ case 259:
return checkStrictModeCatchClause(node);
- case 186:
+ case 187:
return checkStrictModeDeleteExpression(node);
case 8:
return checkStrictModeNumericLiteral(node);
- case 191:
+ case 192:
return checkStrictModePostfixUnaryExpression(node);
- case 190:
+ case 191:
return checkStrictModePrefixUnaryExpression(node);
- case 217:
+ case 219:
return checkStrictModeWithStatement(node);
- case 167:
+ case 168:
seenThisKeyword = true;
return;
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 143:
- return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 144:
+ return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
+ case 145:
return bindParameter(node);
- case 223:
- case 174:
- if (node.dotDotDotToken && node.parent.kind === 172) {
- emitFlags |= 32768;
- }
+ case 225:
+ case 175:
return bindVariableDeclarationOrBindingElement(node);
+ case 148:
case 147:
- case 146:
- case 271:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 0);
- case 286:
+ case 275:
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ case 290:
return bindJSDocProperty(node);
- case 257:
- case 258:
- return bindPropertyOrMethodOrAccessor(node, 4, 0);
case 260:
+ case 261:
+ return bindPropertyOrMethodOrAccessor(node, 4, 0);
+ case 263:
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
- case 259:
- case 251:
+ case 262:
+ case 254:
var root = container;
var hasRest = false;
while (root.parent) {
- if (root.kind === 176 &&
- root.parent.kind === 192 &&
+ if (root.kind === 177 &&
+ root.parent.kind === 193 &&
root.parent.operatorToken.kind === 57 &&
root.parent.left === root) {
hasRest = true;
@@ -17945,80 +18866,83 @@ var ts;
}
root = root.parent;
}
- emitFlags |= hasRest ? 32768 : 16384;
return;
- case 153:
case 154:
case 155:
+ case 156:
return declareSymbolAndAddToSymbolTable(node, 131072, 0);
+ case 150:
case 149:
- case 148:
- return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
- case 225:
+ return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
+ case 227:
return bindFunctionDeclaration(node);
- case 150:
- return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 151:
- return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 152:
+ return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ case 153:
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
- case 158:
case 159:
- case 274:
+ case 160:
+ case 278:
return bindFunctionOrConstructorType(node);
- case 161:
- case 170:
- case 287:
- case 270:
+ case 162:
+ case 171:
+ case 291:
+ case 274:
return bindAnonymousDeclaration(node, 2048, "__type");
- case 176:
+ case 177:
return bindObjectLiteralExpression(node);
- case 184:
case 185:
+ case 186:
return bindFunctionExpression(node);
- case 179:
+ case 180:
if (ts.isInJavaScriptFile(node)) {
bindCallExpression(node);
}
break;
- case 197:
- case 226:
+ case 198:
+ case 228:
inStrictMode = true;
return bindClassLikeDeclaration(node);
- case 227:
+ case 229:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 285:
+ case 289:
if (!node.fullName || node.fullName.kind === 70) {
return bindBlockScopedDeclaration(node, 524288, 793064);
}
break;
- case 228:
+ case 230:
return bindBlockScopedDeclaration(node, 524288, 793064);
- case 229:
+ case 231:
return bindEnumDeclaration(node);
- case 230:
+ case 232:
return bindModuleDeclaration(node);
- case 234:
- case 237:
+ case 253:
+ return bindJsxAttributes(node);
+ case 252:
+ return bindJsxAttribute(node, 4, 0);
+ case 236:
case 239:
- case 243:
+ case 241:
+ case 245:
return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608);
- case 233:
+ case 235:
return bindNamespaceExportDeclaration(node);
- case 236:
+ case 238:
return bindImportClause(node);
- case 241:
+ case 243:
return bindExportDeclaration(node);
- case 240:
+ case 242:
return bindExportAssignment(node);
- case 261:
+ case 264:
updateStrictModeStatementList(node.statements);
return bindSourceFileIfExternalModule();
- case 204:
+ case 206:
if (!ts.isFunctionLike(node.parent)) {
return;
}
- case 231:
+ case 233:
return updateStrictModeStatementList(node.statements);
}
}
@@ -18027,7 +18951,7 @@ var ts;
if (parameterName && parameterName.kind === 70) {
checkStrictModeIdentifier(parameterName);
}
- if (parameterName && parameterName.kind === 167) {
+ if (parameterName && parameterName.kind === 168) {
seenThisKeyword = true;
}
bind(type);
@@ -18046,7 +18970,7 @@ var ts;
bindAnonymousDeclaration(node, 8388608, getDeclarationName(node));
}
else {
- var flags = node.kind === 240 && ts.exportAssignmentIsAlias(node)
+ var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node)
? 8388608
: 4;
declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16);
@@ -18056,17 +18980,17 @@ var ts;
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
}
- if (node.parent.kind !== 261) {
+ if (node.parent.kind !== 264) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
- var parent_4 = node.parent;
- if (!ts.isExternalModule(parent_4)) {
+ var parent_1 = node.parent;
+ if (!ts.isExternalModule(parent_1)) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
- if (!parent_4.isDeclarationFile) {
+ if (!parent_1.isDeclarationFile) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
@@ -18076,10 +19000,10 @@ var ts;
}
function bindExportDeclaration(node) {
if (!container.symbol || !container.symbol.exports) {
- bindAnonymousDeclaration(node, 1073741824, getDeclarationName(node));
+ bindAnonymousDeclaration(node, 33554432, getDeclarationName(node));
}
else if (!node.exportClause) {
- declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0);
+ declareSymbol(container.symbol.exports, container.symbol, node, 33554432, 0);
}
}
function bindImportClause(node) {
@@ -18099,24 +19023,56 @@ var ts;
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node.left, 4 | 7340032, 0);
}
+ function isExportsOrModuleExportsOrAlias(node) {
+ return ts.isExportsIdentifier(node) ||
+ ts.isModuleExportsPropertyAccessExpression(node) ||
+ isNameOfExportsOrModuleExportsAliasDeclaration(node);
+ }
+ function isNameOfExportsOrModuleExportsAliasDeclaration(node) {
+ if (node.kind === 70) {
+ var symbol = lookupSymbolForName(node.text);
+ if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) {
+ var declaration = symbol.valueDeclaration;
+ if (declaration.initializer) {
+ return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
+ }
+ }
+ }
+ return false;
+ }
+ function isExportsOrModuleExportsOrAliasOrAssignemnt(node) {
+ return isExportsOrModuleExportsOrAlias(node) ||
+ (ts.isAssignmentExpression(node, true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
+ }
function bindModuleExportsAssignment(node) {
+ var assignedExpression = ts.getRightMostAssignedExpression(node.right);
+ if (ts.isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
+ setCommonJsModuleIndicator(node);
+ return;
+ }
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node, 4 | 7340032 | 512, 0);
}
function bindThisPropertyAssignment(node) {
ts.Debug.assert(ts.isInJavaScriptFile(node));
- if (container.kind === 225 || container.kind === 184) {
- container.symbol.members = container.symbol.members || ts.createMap();
- declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
- }
- else if (container.kind === 150) {
- var saveContainer = container;
- container = container.parent;
- var symbol = bindPropertyOrMethodOrAccessor(node, 4, 0);
- if (symbol) {
- symbol.isReplaceableByMethod = true;
- }
- container = saveContainer;
+ var container = ts.getThisContainer(node, false);
+ switch (container.kind) {
+ case 227:
+ case 185:
+ container.symbol.members = container.symbol.members || ts.createMap();
+ declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
+ break;
+ case 151:
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ var containingClass = container.parent;
+ var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0);
+ if (symbol) {
+ symbol.isReplaceableByMethod = true;
+ }
+ break;
}
}
function bindPrototypePropertyAssignment(node) {
@@ -18126,14 +19082,35 @@ var ts;
leftSideOfAssignment.parent = node;
constructorFunction.parent = classPrototype;
classPrototype.parent = leftSideOfAssignment;
- var funcSymbol = container.locals[constructorFunction.text];
- if (!funcSymbol || !(funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
- return;
+ bindPropertyAssignment(constructorFunction.text, leftSideOfAssignment, true);
+ }
+ function bindStaticPropertyAssignment(node) {
+ var leftSideOfAssignment = node.left;
+ var target = leftSideOfAssignment.expression;
+ leftSideOfAssignment.parent = node;
+ target.parent = leftSideOfAssignment;
+ if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
+ bindExportsPropertyAssignment(node);
+ }
+ else {
+ bindPropertyAssignment(target.text, leftSideOfAssignment, false);
+ }
+ }
+ function lookupSymbolForName(name) {
+ return (container.symbol && container.symbol.exports && container.symbol.exports.get(name)) || (container.locals && container.locals.get(name));
+ }
+ function bindPropertyAssignment(functionName, propertyAccessExpression, isPrototypeProperty) {
+ var targetSymbol = lookupSymbolForName(functionName);
+ if (targetSymbol && ts.isDeclarationOfFunctionOrClassExpression(targetSymbol)) {
+ targetSymbol = targetSymbol.valueDeclaration.initializer.symbol;
}
- if (!funcSymbol.members) {
- funcSymbol.members = ts.createMap();
+ if (!targetSymbol || !(targetSymbol.flags & (16 | 32))) {
+ return;
}
- declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4, 0);
+ var symbolTable = isPrototypeProperty ?
+ (targetSymbol.members || (targetSymbol.members = ts.createMap())) :
+ (targetSymbol.exports || (targetSymbol.exports = ts.createMap()));
+ declareSymbol(symbolTable, targetSymbol, propertyAccessExpression, 4, 0);
}
function bindCallExpression(node) {
if (!file.commonJsModuleIndicator && ts.isRequireCall(node, false)) {
@@ -18141,33 +19118,26 @@ var ts;
}
}
function bindClassLikeDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) {
- emitFlags |= 1024;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
- }
- }
- if (node.kind === 226) {
+ if (node.kind === 228) {
bindBlockScopedDeclaration(node, 32, 899519);
}
else {
var bindingName = node.name ? node.name.text : "__class";
bindAnonymousDeclaration(node, 32, bindingName);
if (node.name) {
- classifiableNames[node.name.text] = node.name.text;
+ classifiableNames.set(node.name.text, node.name.text);
}
}
var symbol = node.symbol;
- var prototypeSymbol = createSymbol(4 | 134217728, "prototype");
- if (symbol.exports[prototypeSymbol.name]) {
+ var prototypeSymbol = createSymbol(4 | 16777216, "prototype");
+ var symbolExport = symbol.exports.get(prototypeSymbol.name);
+ if (symbolExport) {
if (node.name) {
node.name.parent = node;
}
- file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
}
- symbol.exports[prototypeSymbol.name] = prototypeSymbol;
+ symbol.exports.set(prototypeSymbol.name, prototypeSymbol);
prototypeSymbol.parent = symbol;
}
function bindEnumDeclaration(node) {
@@ -18192,11 +19162,6 @@ var ts;
}
}
function bindParameter(node) {
- if (!ts.isDeclarationFile(file) &&
- !ts.isInAmbientContext(node) &&
- ts.nodeIsDecorated(node)) {
- emitFlags |= (2048 | 4096);
- }
if (inStrictMode) {
checkStrictModeEvalOrArguments(node, node.name);
}
@@ -18208,13 +19173,13 @@ var ts;
}
if (ts.isParameterPropertyDeclaration(node)) {
var classDeclaration = node.parent.parent;
- declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 536870912 : 0), 0);
+ declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 67108864 : 0), 0);
}
}
function bindFunctionDeclaration(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
checkStrictModeFunctionName(node);
@@ -18228,8 +19193,8 @@ var ts;
}
function bindFunctionExpression(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow) {
@@ -18241,11 +19206,8 @@ var ts;
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
@@ -18267,15 +19229,15 @@ var ts;
return false;
}
if (currentFlow === unreachableFlow) {
- var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 206) ||
- node.kind === 226 ||
- (node.kind === 230 && shouldReportErrorOnModuleDeclaration(node)) ||
- (node.kind === 229 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
+ var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) ||
+ node.kind === 228 ||
+ (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) ||
+ (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
if (reportError) {
currentFlow = reportedUnreachableFlow;
var reportUnreachableCode = !options.allowUnreachableCode &&
!ts.isInAmbientContext(node) &&
- (node.kind !== 205 ||
+ (node.kind !== 207 ||
ts.getCombinedNodeFlags(node.declarationList) & 3 ||
ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; }));
if (reportUnreachableCode) {
@@ -18289,56 +19251,56 @@ var ts;
function computeTransformFlagsForNode(node, subtreeFlags) {
var kind = node.kind;
switch (kind) {
- case 179:
- return computeCallExpression(node, subtreeFlags);
case 180:
+ return computeCallExpression(node, subtreeFlags);
+ case 181:
return computeNewExpression(node, subtreeFlags);
- case 230:
+ case 232:
return computeModuleDeclaration(node, subtreeFlags);
- case 183:
+ case 184:
return computeParenthesizedExpression(node, subtreeFlags);
- case 192:
+ case 193:
return computeBinaryExpression(node, subtreeFlags);
- case 207:
+ case 209:
return computeExpressionStatement(node, subtreeFlags);
- case 144:
+ case 145:
return computeParameter(node, subtreeFlags);
- case 185:
+ case 186:
return computeArrowFunction(node, subtreeFlags);
- case 184:
+ case 185:
return computeFunctionExpression(node, subtreeFlags);
- case 225:
+ case 227:
return computeFunctionDeclaration(node, subtreeFlags);
- case 223:
+ case 225:
return computeVariableDeclaration(node, subtreeFlags);
- case 224:
+ case 226:
return computeVariableDeclarationList(node, subtreeFlags);
- case 205:
+ case 207:
return computeVariableStatement(node, subtreeFlags);
- case 219:
+ case 221:
return computeLabeledStatement(node, subtreeFlags);
- case 226:
+ case 228:
return computeClassDeclaration(node, subtreeFlags);
- case 197:
+ case 198:
return computeClassExpression(node, subtreeFlags);
- case 255:
+ case 258:
return computeHeritageClause(node, subtreeFlags);
- case 256:
+ case 259:
return computeCatchClause(node, subtreeFlags);
- case 199:
+ case 200:
return computeExpressionWithTypeArguments(node, subtreeFlags);
- case 150:
+ case 151:
return computeConstructor(node, subtreeFlags);
- case 147:
+ case 148:
return computePropertyDeclaration(node, subtreeFlags);
- case 149:
+ case 150:
return computeMethod(node, subtreeFlags);
- case 151:
case 152:
+ case 153:
return computeAccessor(node, subtreeFlags);
- case 234:
+ case 236:
return computeImportEquals(node, subtreeFlags);
- case 177:
+ case 178:
return computePropertyAccess(node, subtreeFlags);
default:
return computeOther(node, kind, subtreeFlags);
@@ -18363,8 +19325,8 @@ var ts;
switch (kind) {
case 96:
return true;
- case 177:
case 178:
+ case 179:
var expression = node.expression;
var expressionKind = expression.kind;
return expressionKind === 96;
@@ -18386,10 +19348,10 @@ var ts;
var transformFlags = subtreeFlags;
var operatorTokenKind = node.operatorToken.kind;
var leftKind = node.left.kind;
- if (operatorTokenKind === 57 && leftKind === 176) {
+ if (operatorTokenKind === 57 && leftKind === 177) {
transformFlags |= 8 | 192 | 3072;
}
- else if (operatorTokenKind === 57 && leftKind === 175) {
+ else if (operatorTokenKind === 57 && leftKind === 176) {
transformFlags |= 192 | 3072;
}
else if (operatorTokenKind === 39
@@ -18428,8 +19390,8 @@ var ts;
var expression = node.expression;
var expressionKind = expression.kind;
var expressionTransformFlags = expression.transformFlags;
- if (expressionKind === 200
- || expressionKind === 182) {
+ if (expressionKind === 201
+ || expressionKind === 183) {
transformFlags |= 3;
}
if (expressionTransformFlags & 1024) {
@@ -18526,9 +19488,9 @@ var ts;
transformFlags |= 8;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -18571,7 +19533,7 @@ var ts;
transformFlags |= 3;
}
if (modifierFlags & 256) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -18579,7 +19541,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
}
@@ -18594,7 +19556,7 @@ var ts;
transformFlags |= 3;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -18602,7 +19564,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -18715,8 +19677,8 @@ var ts;
var excludeFlags = 536872257;
switch (kind) {
case 119:
- case 189:
- transformFlags |= 16;
+ case 190:
+ transformFlags |= 8 | 16;
break;
case 113:
case 111:
@@ -18724,50 +19686,66 @@ var ts;
case 116:
case 123:
case 75:
- case 229:
- case 260:
- case 182:
- case 200:
+ case 231:
+ case 263:
+ case 183:
case 201:
+ case 202:
case 130:
transformFlags |= 3;
break;
- case 246:
- case 247:
case 248:
- case 10:
case 249:
case 250:
+ case 10:
case 251:
case 252:
+ case 253:
+ case 254:
+ case 255:
transformFlags |= 4;
break;
- case 213:
- transformFlags |= 8;
case 12:
case 13:
case 14:
case 15:
- case 194:
- case 181:
- case 258:
+ case 195:
+ case 182:
+ case 261:
case 114:
+ case 203:
transformFlags |= 192;
break;
- case 195:
- transformFlags |= 192 | 16777216;
+ case 9:
+ if (node.hasExtendedUnicodeEscape) {
+ transformFlags |= 192;
+ }
+ break;
+ case 8:
+ if (node.numericLiteralFlags & 48) {
+ transformFlags |= 192;
+ }
+ break;
+ case 215:
+ if (node.awaitModifier) {
+ transformFlags |= 8;
+ }
+ transformFlags |= 192;
+ break;
+ case 196:
+ transformFlags |= 8 | 192 | 16777216;
break;
case 118:
case 132:
case 129:
- case 134:
- case 121:
+ case 133:
case 135:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
case 156:
@@ -18781,26 +19759,27 @@ var ts;
case 164:
case 165:
case 166:
- case 227:
- case 228:
case 167:
+ case 229:
+ case 230:
case 168:
case 169:
case 170:
case 171:
+ case 172:
transformFlags = 3;
excludeFlags = -3;
break;
- case 142:
+ case 143:
transformFlags |= 2097152;
if (subtreeFlags & 16384) {
transformFlags |= 65536;
}
break;
- case 196:
+ case 197:
transformFlags |= 192 | 524288;
break;
- case 259:
+ case 262:
transformFlags |= 8 | 1048576;
break;
case 96:
@@ -18809,27 +19788,27 @@ var ts;
case 98:
transformFlags |= 16384;
break;
- case 172:
+ case 173:
transformFlags |= 192 | 8388608;
if (subtreeFlags & 524288) {
transformFlags |= 8 | 1048576;
}
excludeFlags = 537396545;
break;
- case 173:
+ case 174:
transformFlags |= 192 | 8388608;
excludeFlags = 537396545;
break;
- case 174:
+ case 175:
transformFlags |= 192;
if (node.dotDotDotToken) {
transformFlags |= 524288;
}
break;
- case 145:
+ case 146:
transformFlags |= 3 | 4096;
break;
- case 176:
+ case 177:
excludeFlags = 540087617;
if (subtreeFlags & 2097152) {
transformFlags |= 192;
@@ -18841,29 +19820,29 @@ var ts;
transformFlags |= 8;
}
break;
- case 175:
- case 180:
+ case 176:
+ case 181:
excludeFlags = 537396545;
if (subtreeFlags & 524288) {
transformFlags |= 192;
}
break;
- case 209:
- case 210:
case 211:
case 212:
+ case 213:
+ case 214:
if (subtreeFlags & 4194304) {
transformFlags |= 192;
}
break;
- case 261:
+ case 264:
if (subtreeFlags & 32768) {
transformFlags |= 192;
}
break;
+ case 218:
case 216:
- case 214:
- case 215:
+ case 217:
transformFlags |= 33554432;
break;
}
@@ -18871,56 +19850,57 @@ var ts;
return transformFlags & ~excludeFlags;
}
function getTransformFlagsSubtreeExclusions(kind) {
- if (kind >= 156 && kind <= 171) {
+ if (kind >= 157 && kind <= 172) {
return -3;
}
switch (kind) {
- case 179:
case 180:
- case 175:
+ case 181:
+ case 176:
return 537396545;
- case 230:
+ case 232:
return 574674241;
- case 144:
+ case 145:
return 536872257;
- case 185:
+ case 186:
return 601249089;
- case 184:
- case 225:
+ case 185:
+ case 227:
return 601281857;
- case 224:
- return 546309441;
case 226:
- case 197:
+ return 546309441;
+ case 228:
+ case 198:
return 539358529;
- case 150:
- return 601015617;
- case 149:
case 151:
+ return 601015617;
+ case 150:
case 152:
+ case 153:
return 601015617;
case 118:
case 132:
case 129:
- case 134:
- case 121:
case 135:
+ case 133:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
- case 227:
- case 228:
+ case 156:
+ case 229:
+ case 230:
return -3;
- case 176:
+ case 177:
return 540087617;
- case 256:
+ case 259:
return 537920833;
- case 172:
case 173:
+ case 174:
return 537396545;
default:
return 536872257;
@@ -18938,6 +19918,12 @@ var ts;
return compilerOptions.traceResolution && host.trace !== undefined;
}
ts.isTraceEnabled = isTraceEnabled;
+ var Extensions;
+ (function (Extensions) {
+ Extensions[Extensions["TypeScript"] = 0] = "TypeScript";
+ Extensions[Extensions["JavaScript"] = 1] = "JavaScript";
+ Extensions[Extensions["DtsOnly"] = 2] = "DtsOnly";
+ })(Extensions || (Extensions = {}));
function resolvedTypeScriptOnly(resolved) {
if (!resolved) {
return undefined;
@@ -18945,9 +19931,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
@@ -18959,37 +19942,28 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2:
- case 0:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
}
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
+ }
+ return path;
}
}
function readJson(path, host) {
@@ -19022,11 +19996,12 @@ var ts;
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -19081,7 +20056,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -19097,7 +20076,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -19138,31 +20118,116 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -19287,37 +20352,43 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0) || tryResolve(1);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state, true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -19328,12 +20399,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
+ }
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
function directoryProbablyExists(directoryName, host) {
return !host.directoryExists || host.directoryExists(directoryName);
@@ -19361,11 +20455,11 @@ var ts;
}
}
switch (extensions) {
- case 2:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -19374,113 +20468,181 @@ var ts;
}
}
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, false);
+ }
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(2, moduleName, directory, failedLookupLocations, state, true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, true, undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1) {
- return loadModuleFromNodeModulesFolder(2, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
+ }
+ }
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1);
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0) || tryResolve(1);
- return createResolvedModuleWithFailedLookupLocations(resolved, false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0) {
+ if (extensions === Extensions.TypeScript) {
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state));
}
}
}
@@ -19492,10 +20654,13 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
function forEachAncestorDirectory(directory, callback) {
while (true) {
var result = callback(directory);
@@ -19535,23 +20700,29 @@ var ts;
ts.getSymbolId = getSymbolId;
function createTypeChecker(host, produceDiagnostics) {
var cancellationToken;
+ var requestedExternalEmitHelpers;
+ var externalHelpersModule;
var Symbol = ts.objectAllocator.getSymbolConstructor();
var Type = ts.objectAllocator.getTypeConstructor();
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
var compilerOptions = host.getCompilerOptions();
- var languageVersion = compilerOptions.target || 0;
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var modulekind = ts.getEmitModuleKind(compilerOptions);
var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters;
var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System;
- var strictNullChecks = compilerOptions.strictNullChecks;
+ var strictNullChecks = compilerOptions.strictNullChecks === undefined ? compilerOptions.strict : compilerOptions.strictNullChecks;
+ var noImplicitAny = compilerOptions.noImplicitAny === undefined ? compilerOptions.strict : compilerOptions.noImplicitAny;
+ var noImplicitThis = compilerOptions.noImplicitThis === undefined ? compilerOptions.strict : compilerOptions.noImplicitThis;
var emitResolver = createResolver();
- var undefinedSymbol = createSymbol(4 | 67108864, "undefined");
+ var nodeBuilder = createNodeBuilder();
+ var undefinedSymbol = createSymbol(4, "undefined");
undefinedSymbol.declarations = [];
- var argumentsSymbol = createSymbol(4 | 67108864, "arguments");
+ var argumentsSymbol = createSymbol(4, "arguments");
var checker = {
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
@@ -19560,47 +20731,127 @@ var ts;
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; },
+ getMergedSymbol: getMergedSymbol,
getDiagnostics: getDiagnostics,
getGlobalDiagnostics: getGlobalDiagnostics,
- getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
- getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration,
+ getTypeOfSymbolAtLocation: function (symbol, location) {
+ location = ts.getParseTreeNode(location);
+ return location ? getTypeOfSymbolAtLocation(symbol, location) : unknownType;
+ },
+ getSymbolsOfParameterPropertyDeclaration: function (parameter, parameterName) {
+ parameter = ts.getParseTreeNode(parameter, ts.isParameter);
+ ts.Debug.assert(parameter !== undefined, "Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.");
+ return getSymbolsOfParameterPropertyDeclaration(parameter, parameterName);
+ },
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
getPropertiesOfType: getPropertiesOfType,
getPropertyOfType: getPropertyOfType,
+ getIndexInfoOfType: getIndexInfoOfType,
getSignaturesOfType: getSignaturesOfType,
getIndexTypeOfType: getIndexTypeOfType,
getBaseTypes: getBaseTypes,
+ getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
+ getWidenedType: getWidenedType,
+ getTypeFromTypeNode: function (node) {
+ node = ts.getParseTreeNode(node, ts.isTypeNode);
+ return node ? getTypeFromTypeNode(node) : unknownType;
+ },
+ getParameterType: getTypeAtPosition,
getReturnTypeOfSignature: getReturnTypeOfSignature,
getNonNullableType: getNonNullableType,
- getSymbolsInScope: getSymbolsInScope,
- getSymbolAtLocation: getSymbolAtLocation,
- getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
- getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol,
- getTypeAtLocation: getTypeOfNode,
- getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment,
- typeToString: typeToString,
+ typeToTypeNode: nodeBuilder.typeToTypeNode,
+ indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
+ signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
+ getSymbolsInScope: function (location, meaning) {
+ location = ts.getParseTreeNode(location);
+ return location ? getSymbolsInScope(location, meaning) : [];
+ },
+ getSymbolAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getSymbolAtLocation(node) : undefined;
+ },
+ getShorthandAssignmentValueSymbol: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getShorthandAssignmentValueSymbol(node) : undefined;
+ },
+ getExportSpecifierLocalTargetSymbol: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExportSpecifier);
+ return node ? getExportSpecifierLocalTargetSymbol(node) : undefined;
+ },
+ getTypeAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getTypeOfNode(node) : unknownType;
+ },
+ getPropertySymbolOfDestructuringAssignment: function (location) {
+ location = ts.getParseTreeNode(location, ts.isIdentifier);
+ return location ? getPropertySymbolOfDestructuringAssignment(location) : undefined;
+ },
+ signatureToString: function (signature, enclosingDeclaration, flags, kind) {
+ return signatureToString(signature, ts.getParseTreeNode(enclosingDeclaration), flags, kind);
+ },
+ typeToString: function (type, enclosingDeclaration, flags) {
+ return typeToString(type, ts.getParseTreeNode(enclosingDeclaration), flags);
+ },
getSymbolDisplayBuilder: getSymbolDisplayBuilder,
- symbolToString: symbolToString,
+ symbolToString: function (symbol, enclosingDeclaration, meaning) {
+ return symbolToString(symbol, ts.getParseTreeNode(enclosingDeclaration), meaning);
+ },
getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
getRootSymbols: getRootSymbols,
- getContextualType: getContextualType,
+ getContextualType: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExpression);
+ return node ? getContextualType(node) : undefined;
+ },
getFullyQualifiedName: getFullyQualifiedName,
- getResolvedSignature: getResolvedSignature,
- getConstantValue: getConstantValue,
- isValidPropertyAccess: isValidPropertyAccess,
- getSignatureFromDeclaration: getSignatureFromDeclaration,
- isImplementationOfOverload: isImplementationOfOverload,
+ getResolvedSignature: function (node, candidatesOutArray) {
+ node = ts.getParseTreeNode(node, ts.isCallLikeExpression);
+ return node ? getResolvedSignature(node, candidatesOutArray) : undefined;
+ },
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
+ isValidPropertyAccess: function (node, propertyName) {
+ node = ts.getParseTreeNode(node, ts.isPropertyAccessOrQualifiedName);
+ return node ? isValidPropertyAccess(node, propertyName) : false;
+ },
+ getSignatureFromDeclaration: function (declaration) {
+ declaration = ts.getParseTreeNode(declaration, ts.isFunctionLike);
+ return declaration ? getSignatureFromDeclaration(declaration) : undefined;
+ },
+ isImplementationOfOverload: function (node) {
+ node = ts.getParseTreeNode(node, ts.isFunctionLike);
+ return node ? isImplementationOfOverload(node) : undefined;
+ },
+ getImmediateAliasedSymbol: function (symbol) {
+ ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
+ var links = getSymbolLinks(symbol);
+ if (!links.immediateTarget) {
+ var node = getDeclarationOfAliasSymbol(symbol);
+ ts.Debug.assert(!!node);
+ links.immediateTarget = getTargetOfAliasDeclaration(node, true);
+ }
+ return links.immediateTarget;
+ },
getAliasedSymbol: resolveAlias,
getEmitResolver: getEmitResolver,
getExportsOfModule: getExportsOfModuleAsArray,
+ getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
getAmbientModules: getAmbientModules,
- getJsxElementAttributesType: getJsxElementAttributesType,
+ getAllAttributesTypeFromJsxOpeningLikeElement: function (node) {
+ node = ts.getParseTreeNode(node, ts.isJsxOpeningLikeElement);
+ return node ? getAllAttributesTypeFromJsxOpeningLikeElement(node) : undefined;
+ },
getJsxIntrinsicTagNames: getJsxIntrinsicTagNames,
- isOptionalParameter: isOptionalParameter,
+ isOptionalParameter: function (node) {
+ node = ts.getParseTreeNode(node, ts.isParameter);
+ return node ? isOptionalParameter(node) : false;
+ },
tryGetMemberInModuleExports: tryGetMemberInModuleExports,
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
- }
+ },
+ getApparentType: getApparentType
};
var tupleTypes = [];
var unionTypes = ts.createMap();
@@ -19609,8 +20860,8 @@ var ts;
var numericLiteralTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
- var unknownSymbol = createSymbol(4 | 67108864, "unknown");
- var resolvingSymbol = createSymbol(67108864, "__resolving__");
+ var unknownSymbol = createSymbol(4, "unknown");
+ var resolvingSymbol = createSymbol(0, "__resolving__");
var anyType = createIntrinsicType(1, "any");
var autoType = createIntrinsicType(1, "any");
var unknownType = createIntrinsicType(1, "unknown");
@@ -19627,8 +20878,9 @@ var ts;
var voidType = createIntrinsicType(1024, "void");
var neverType = createIntrinsicType(8192, "never");
var silentNeverType = createIntrinsicType(8192, "never");
+ var nonPrimitiveType = createIntrinsicType(16777216, "object");
var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
- var emptyTypeLiteralSymbol = createSymbol(2048 | 67108864, "__type");
+ var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
emptyTypeLiteralSymbol.members = ts.createMap();
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -19636,16 +20888,15 @@ var ts;
var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
anyFunctionType.flags |= 8388608;
var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
+ var circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, undefined, 0, false, false);
var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, undefined, 0, false, false);
var enumNumberIndexInfo = createIndexInfo(stringType, true);
+ var jsObjectLiteralIndexInfo = createIndexInfo(anyType, false);
var globals = ts.createMap();
var patternAmbientModules;
- var getGlobalESSymbolConstructorSymbol;
- var getGlobalPromiseConstructorSymbol;
- var tryGetGlobalPromiseConstructorSymbol;
var globalObjectType;
var globalFunctionType;
var globalArrayType;
@@ -19654,26 +20905,26 @@ var ts;
var globalNumberType;
var globalBooleanType;
var globalRegExpType;
+ var globalThisType;
var anyArrayType;
var autoArrayType;
var anyReadonlyArrayType;
- var getGlobalTemplateStringsArrayType;
- var getGlobalESSymbolType;
- var getGlobalIterableType;
- var getGlobalIteratorType;
- var getGlobalIterableIteratorType;
- var getGlobalClassDecoratorType;
- var getGlobalParameterDecoratorType;
- var getGlobalPropertyDecoratorType;
- var getGlobalMethodDecoratorType;
- var getGlobalTypedPropertyDescriptorType;
- var getGlobalPromiseType;
- var tryGetGlobalPromiseType;
- var getGlobalPromiseLikeType;
- var getInstantiatedGlobalPromiseLikeType;
- var getGlobalPromiseConstructorLikeType;
- var getGlobalThenableType;
- var jsxElementClassType;
+ var deferredGlobalESSymbolConstructorSymbol;
+ var deferredGlobalESSymbolType;
+ var deferredGlobalTypedPropertyDescriptorType;
+ var deferredGlobalPromiseType;
+ var deferredGlobalPromiseConstructorSymbol;
+ var deferredGlobalPromiseConstructorLikeType;
+ var deferredGlobalIterableType;
+ var deferredGlobalIteratorType;
+ var deferredGlobalIterableIteratorType;
+ var deferredGlobalAsyncIterableType;
+ var deferredGlobalAsyncIteratorType;
+ var deferredGlobalAsyncIterableIteratorType;
+ var deferredGlobalTemplateStringsArrayType;
+ var deferredJsxElementClassType;
+ var deferredJsxElementType;
+ var deferredJsxStatelessElementType;
var deferredNodes;
var deferredUnusedIdentifierNodes;
var flowLoopStart = 0;
@@ -19694,9 +20945,10 @@ var ts;
var visitedFlowNodes = [];
var visitedFlowTypes = [];
var potentialThisCollisions = [];
+ var potentialNewTargetCollisions = [];
var awaitedTypeStack = [];
var diagnostics = ts.createDiagnosticCollection();
- var typeofEQFacts = ts.createMap({
+ var typeofEQFacts = ts.createMapFromTemplate({
"string": 1,
"number": 2,
"boolean": 4,
@@ -19705,7 +20957,7 @@ var ts;
"object": 16,
"function": 32
});
- var typeofNEFacts = ts.createMap({
+ var typeofNEFacts = ts.createMapFromTemplate({
"string": 128,
"number": 256,
"boolean": 512,
@@ -19714,14 +20966,14 @@ var ts;
"object": 2048,
"function": 4096
});
- var typeofTypesByName = ts.createMap({
+ var typeofTypesByName = ts.createMapFromTemplate({
"string": stringType,
"number": numberType,
"boolean": booleanType,
"symbol": esSymbolType,
"undefined": undefinedType
});
- var jsxElementType;
+ var typeofType = createTypeofType();
var _jsxNamespace;
var _jsxFactoryEntity;
var jsxTypes = ts.createMap();
@@ -19741,7 +20993,7 @@ var ts;
var enumRelation = ts.createMap();
var _displayBuilder;
var builtinGlobals = ts.createMap();
- builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
+ builtinGlobals.set(undefinedSymbol.name, undefinedSymbol);
initializeTypeChecker();
return checker;
function getJsxNamespace() {
@@ -19771,7 +21023,12 @@ var ts;
}
function createSymbol(flags, name) {
symbolCount++;
- return new Symbol(flags, name);
+ var symbol = (new Symbol(flags | 134217728, name));
+ symbol.checkFlags = 0;
+ return symbol;
+ }
+ function isTransientSymbol(symbol) {
+ return (symbol.flags & 134217728) !== 0;
}
function getExcludedSymbolFlags(flags) {
var result = 0;
@@ -19817,7 +21074,7 @@ var ts;
mergedSymbols[source.mergeId] = target;
}
function cloneSymbol(symbol) {
- var result = createSymbol(symbol.flags | 33554432, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
result.declarations = symbol.declarations.slice(0);
result.parent = symbol.parent;
if (symbol.valueDeclaration)
@@ -19839,12 +21096,10 @@ var ts;
target.flags |= source.flags;
if (source.valueDeclaration &&
(!target.valueDeclaration ||
- (target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
+ (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) {
target.valueDeclaration = source.valueDeclaration;
}
- ts.forEach(source.declarations, function (node) {
- target.declarations.push(node);
- });
+ ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@@ -19857,6 +21112,9 @@ var ts;
}
recordMergedSymbol(target, source);
}
+ else if (target.flags & 1024) {
+ error(source.valueDeclaration.name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ }
else {
var message_2 = target.flags & 2 || source.flags & 2
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
@@ -19869,18 +21127,19 @@ var ts;
}
}
function mergeSymbolTable(target, source) {
- for (var id in source) {
- var targetSymbol = target[id];
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
if (!targetSymbol) {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
else {
- if (!(targetSymbol.flags & 33554432)) {
- target[id] = targetSymbol = cloneSymbol(targetSymbol);
+ if (!(targetSymbol.flags & 134217728)) {
+ targetSymbol = cloneSymbol(targetSymbol);
+ target.set(id, targetSymbol);
}
- mergeSymbol(targetSymbol, source[id]);
+ mergeSymbol(targetSymbol, sourceSymbol);
}
- }
+ });
}
function mergeModuleAugmentation(moduleName) {
var moduleAugmentation = moduleName.parent;
@@ -19901,7 +21160,7 @@ var ts;
}
mainModule = resolveExternalModuleSymbol(mainModule);
if (mainModule.flags & 1920) {
- mainModule = mainModule.flags & 33554432 ? mainModule : cloneSymbol(mainModule);
+ mainModule = mainModule.flags & 134217728 ? mainModule : cloneSymbol(mainModule);
mergeSymbol(mainModule, moduleAugmentation.symbol);
}
else {
@@ -19910,20 +21169,21 @@ var ts;
}
}
function addToSymbolTable(target, source, message) {
- for (var id in source) {
- if (target[id]) {
- ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message));
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
+ if (targetSymbol) {
+ ts.forEach(targetSymbol.declarations, addDeclarationDiagnostic(id, message));
}
else {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
- }
+ });
function addDeclarationDiagnostic(id, message) {
return function (declaration) { return diagnostics.add(ts.createDiagnosticForNode(declaration, message, id)); };
}
}
function getSymbolLinks(symbol) {
- if (symbol.flags & 67108864)
+ if (symbol.flags & 134217728)
return symbol;
var id = getSymbolId(symbol);
return symbolLinks[id] || (symbolLinks[id] = {});
@@ -19935,14 +21195,17 @@ var ts;
function getObjectFlags(type) {
return type.flags & 32768 ? type.objectFlags : 0;
}
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
function isGlobalSourceFile(node) {
- return node.kind === 261 && !ts.isExternalOrCommonJsModule(node);
+ return node.kind === 264 && !ts.isExternalOrCommonJsModule(node);
}
function getSymbol(symbols, name, meaning) {
if (meaning) {
- var symbol = symbols[name];
+ var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -19973,57 +21236,76 @@ var ts;
(!compilerOptions.outFile && !compilerOptions.out)) {
return true;
}
- if (isUsedInFunctionOrNonStaticProperty(usage)) {
+ if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
return true;
}
var sourceFiles = host.getSourceFiles();
return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile);
}
if (declaration.pos <= usage.pos) {
- return declaration.kind !== 223 ||
- !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ if (declaration.kind === 175) {
+ var errorBindingElement = ts.getAncestor(usage, 175);
+ if (errorBindingElement) {
+ return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
+ declaration.pos < errorBindingElement.pos;
+ }
+ return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage);
+ }
+ else if (declaration.kind === 225) {
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ }
+ return true;
+ }
+ if (usage.parent.kind === 245) {
+ return true;
}
var container = ts.getEnclosingBlockScopeContainer(declaration);
- return isUsedInFunctionOrNonStaticProperty(usage, container);
+ return isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container);
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
var container = ts.getEnclosingBlockScopeContainer(declaration);
switch (declaration.parent.parent.kind) {
- case 205:
- case 211:
+ case 207:
case 213:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration, container)) {
return true;
}
break;
}
switch (declaration.parent.parent.kind) {
- case 212:
- case 213:
+ case 214:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
return true;
}
}
return false;
}
- function isUsedInFunctionOrNonStaticProperty(usage, container) {
- var current = usage;
- while (current) {
+ function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
+ return !!ts.findAncestor(usage, function (current) {
if (current === container) {
- return false;
+ return "quit";
}
if (ts.isFunctionLike(current)) {
return true;
}
- var initializerOfNonStaticProperty = current.parent &&
- current.parent.kind === 147 &&
- (ts.getModifierFlags(current.parent) & 32) === 0 &&
+ var initializerOfProperty = current.parent &&
+ current.parent.kind === 148 &&
current.parent.initializer === current;
- if (initializerOfNonStaticProperty) {
- return true;
+ if (initializerOfProperty) {
+ if (ts.getModifierFlags(current.parent) & 32) {
+ if (declaration.kind === 150) {
+ return true;
+ }
+ }
+ else {
+ var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32);
+ if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+ return true;
+ }
+ }
}
- current = current.parent;
- }
- return false;
+ });
}
}
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
@@ -20038,18 +21320,18 @@ var ts;
if (result = getSymbol(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
- if (meaning & result.flags & 793064 && lastLocation.kind !== 278) {
+ if (meaning & result.flags & 793064 && lastLocation.kind !== 282) {
useResult = result.flags & 262144
? lastLocation === location.type ||
- lastLocation.kind === 144 ||
- lastLocation.kind === 143
+ lastLocation.kind === 145 ||
+ lastLocation.kind === 144
: false;
}
if (meaning & 107455 && result.flags & 1) {
useResult =
- lastLocation.kind === 144 ||
+ lastLocation.kind === 145 ||
(lastLocation === location.type &&
- result.valueDeclaration.kind === 144);
+ result.valueDeclaration.kind === 145);
}
}
if (useResult) {
@@ -20061,23 +21343,24 @@ var ts;
}
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location))
break;
isInExternalModule = true;
- case 230:
+ case 232:
var moduleExports = getSymbolOfNode(location).exports;
- if (location.kind === 261 || ts.isAmbientModule(location)) {
- if (result = moduleExports["default"]) {
+ if (location.kind === 264 || ts.isAmbientModule(location)) {
+ if (result = moduleExports.get("default")) {
var localSymbol = ts.getLocalSymbolForExportDefault(result);
if (localSymbol && (result.flags & meaning) && localSymbol.name === name) {
break loop;
}
result = undefined;
}
- if (moduleExports[name] &&
- moduleExports[name].flags === 8388608 &&
- ts.getDeclarationOfKind(moduleExports[name], 243)) {
+ var moduleExport = moduleExports.get(name);
+ if (moduleExport &&
+ moduleExport.flags === 8388608 &&
+ ts.getDeclarationOfKind(moduleExport, 245)) {
break;
}
}
@@ -20085,13 +21368,13 @@ var ts;
break loop;
}
break;
- case 229:
+ case 231:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
+ case 148:
case 147:
- case 146:
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
@@ -20101,17 +21384,21 @@ var ts;
}
}
break;
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
+ case 229:
if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
+ result = undefined;
+ break;
+ }
if (lastLocation && ts.getModifierFlags(lastLocation) & 32) {
error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters);
return undefined;
}
break loop;
}
- if (location.kind === 197 && meaning & 32) {
+ if (location.kind === 198 && meaning & 32) {
var className = location.name;
if (className && name === className.text) {
result = location.symbol;
@@ -20119,28 +21406,28 @@ var ts;
}
}
break;
- case 142:
+ case 143:
grandparent = location.parent.parent;
- if (ts.isClassLike(grandparent) || grandparent.kind === 227) {
+ if (ts.isClassLike(grandparent) || grandparent.kind === 229) {
if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
return undefined;
}
}
break;
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 185:
+ case 153:
+ case 227:
+ case 186:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
}
break;
- case 184:
+ case 185:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
@@ -20153,8 +21440,8 @@ var ts;
}
}
break;
- case 145:
- if (location.parent && location.parent.kind === 144) {
+ case 146:
+ if (location.parent && location.parent.kind === 145) {
location = location.parent;
}
if (location.parent && ts.isClassElement(location.parent)) {
@@ -20177,7 +21464,8 @@ var ts;
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
!checkAndReportErrorForExtendingInterface(errorLocation) &&
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
- !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning)) {
+ !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
+ !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
}
}
@@ -20189,21 +21477,31 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
- if (meaning & 2) {
+ if (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
- if (exportOrLocalSymbol.flags & 2) {
+ if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
}
}
if (result && isInExternalModule && (meaning & 107455) === 107455) {
var decls = result.declarations;
- if (decls && decls.length === 1 && decls[0].kind === 233) {
+ if (decls && decls.length === 1 && decls[0].kind === 235) {
error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name);
}
}
}
return result;
}
+ function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (decl.kind === 144 && decl.parent === container) {
+ return true;
+ }
+ }
+ return false;
+ }
function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {
if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) {
return false;
@@ -20244,9 +21542,9 @@ var ts;
function getEntityNameForExtendingInterface(node) {
switch (node.kind) {
case 70:
- case 177:
+ case 178:
return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
- case 199:
+ case 200:
ts.Debug.assert(ts.isEntityNameExpression(node.expression));
return node.expression;
default:
@@ -20273,65 +21571,84 @@ var ts;
}
return false;
}
- function checkResolvedBlockScopedVariable(result, errorLocation) {
- ts.Debug.assert((result.flags & 2) !== 0);
- var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
- ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
- if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 223), errorLocation)) {
- error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
- }
- }
- function isSameScopeDescendentOf(initial, parent, stopAt) {
- if (!parent) {
- return false;
+ function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) {
+ if (meaning & (107455 & ~1024 & ~793064)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~107455, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, name);
+ return true;
+ }
}
- for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
- if (current === parent) {
+ else if (meaning & (793064 & ~1024 & ~107455)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~793064, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, name);
return true;
}
}
return false;
}
+ function checkResolvedBlockScopedVariable(result, errorLocation) {
+ ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384));
+ var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; });
+ ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined");
+ if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
+ if (result.flags & 2) {
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 32) {
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 384) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ }
+ }
+ function isSameScopeDescendentOf(initial, parent, stopAt) {
+ return parent && !!ts.findAncestor(initial, function (n) { return n === stopAt || ts.isFunctionLike(n) ? "quit" : n === parent; });
+ }
function getAnyImportSyntax(node) {
if (ts.isAliasSymbolDeclaration(node)) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
- while (node && node.kind !== 235) {
- node = node.parent;
- }
- return node;
+ return ts.findAncestor(node, function (n) { return n.kind === 237; });
}
}
function getDeclarationOfAliasSymbol(symbol) {
- return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
+ return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
- function getTargetOfImportEqualsDeclaration(node) {
- if (node.moduleReference.kind === 245) {
+ function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {
+ if (node.moduleReference.kind === 247) {
return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
}
- return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference);
+ return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);
}
- function getTargetOfImportClause(node) {
+ function getTargetOfImportClause(node, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
if (moduleSymbol) {
- var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ?
- moduleSymbol :
- moduleSymbol.exports["export="] ?
- getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
- resolveSymbol(moduleSymbol.exports["default"]);
+ var exportDefaultSymbol = void 0;
+ if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
+ exportDefaultSymbol = moduleSymbol;
+ }
+ else {
+ var exportValue = moduleSymbol.exports.get("export=");
+ exportDefaultSymbol = exportValue
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), "default")
+ : resolveSymbol(moduleSymbol.exports.get("default"), dontResolveAlias);
+ }
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
}
else if (!exportDefaultSymbol && allowSyntheticDefaultImports) {
- return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ return resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
return exportDefaultSymbol;
}
}
- function getTargetOfNamespaceImport(node) {
+ function getTargetOfNamespaceImport(node, dontResolveAlias) {
var moduleSpecifier = node.parent.parent.moduleSpecifier;
- return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
+ return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
if (valueSymbol.flags & (793064 | 1920)) {
@@ -20348,12 +21665,9 @@ var ts;
result.exports = valueSymbol.exports;
return result;
}
- function getExportOfModule(symbol, name) {
+ function getExportOfModule(symbol, name, dontResolveAlias) {
if (symbol.flags & 1536) {
- var exportedSymbol = getExportsOfSymbol(symbol)[name];
- if (exportedSymbol) {
- return resolveSymbol(exportedSymbol);
- }
+ return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias);
}
}
function getPropertyOfVariable(symbol, name) {
@@ -20364,71 +21678,72 @@ var ts;
}
}
}
- function getExternalModuleMember(node, specifier) {
+ function getExternalModuleMember(node, specifier, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
- var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
+ var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier, dontResolveAlias);
if (targetSymbol) {
- var name_16 = specifier.propertyName || specifier.name;
- if (name_16.text) {
+ var name = specifier.propertyName || specifier.name;
+ if (name.text) {
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
return moduleSymbol;
}
var symbolFromVariable = void 0;
- if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) {
- symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_16.text);
+ if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=")) {
+ symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name.text);
}
else {
- symbolFromVariable = getPropertyOfVariable(targetSymbol, name_16.text);
+ symbolFromVariable = getPropertyOfVariable(targetSymbol, name.text);
}
- symbolFromVariable = resolveSymbol(symbolFromVariable);
- var symbolFromModule = getExportOfModule(targetSymbol, name_16.text);
- if (!symbolFromModule && allowSyntheticDefaultImports && name_16.text === "default") {
- symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
+ var symbolFromModule = getExportOfModule(targetSymbol, name.text, dontResolveAlias);
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.text === "default") {
+ symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
var symbol = symbolFromModule && symbolFromVariable ?
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
symbolFromModule || symbolFromVariable;
if (!symbol) {
- error(name_16, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_16));
+ error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name));
}
return symbol;
}
}
}
- function getTargetOfImportSpecifier(node) {
- return getExternalModuleMember(node.parent.parent.parent, node);
+ function getTargetOfImportSpecifier(node, dontResolveAlias) {
+ return getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias);
}
- function getTargetOfNamespaceExportDeclaration(node) {
- return resolveExternalModuleSymbol(node.parent.symbol);
+ function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
+ return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node) {
+ function getTargetOfExportSpecifier(node, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
- getExternalModuleMember(node.parent.parent, node) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920);
+ getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
+ resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfExportAssignment(node) {
- return resolveEntityName(node.expression, 107455 | 793064 | 1920);
+ function getTargetOfExportAssignment(node, dontResolveAlias) {
+ return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfAliasDeclaration(node) {
+ function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
switch (node.kind) {
- case 234:
- return getTargetOfImportEqualsDeclaration(node);
case 236:
- return getTargetOfImportClause(node);
- case 237:
- return getTargetOfNamespaceImport(node);
+ return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
+ case 238:
+ return getTargetOfImportClause(node, dontRecursivelyResolve);
case 239:
- return getTargetOfImportSpecifier(node);
- case 243:
- return getTargetOfExportSpecifier(node);
- case 240:
- return getTargetOfExportAssignment(node);
- case 233:
- return getTargetOfNamespaceExportDeclaration(node);
+ return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
+ case 241:
+ return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
+ case 245:
+ return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ case 242:
+ return getTargetOfExportAssignment(node, dontRecursivelyResolve);
+ case 235:
+ return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
- function resolveSymbol(symbol) {
- return symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920)) ? resolveAlias(symbol) : symbol;
+ function resolveSymbol(symbol, dontResolveAlias) {
+ var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
@@ -20467,10 +21782,10 @@ var ts;
links.referenced = true;
var node = getDeclarationOfAliasSymbol(symbol);
ts.Debug.assert(!!node);
- if (node.kind === 240) {
+ if (node.kind === 242) {
checkExpressionCached(node.expression);
}
- else if (node.kind === 243) {
+ else if (node.kind === 245) {
checkExpressionCached(node.propertyName || node.name);
}
else if (ts.isInternalModuleImportEqualsDeclaration(node)) {
@@ -20482,11 +21797,11 @@ var ts;
if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
entityName = entityName.parent;
}
- if (entityName.kind === 70 || entityName.parent.kind === 141) {
+ if (entityName.kind === 70 || entityName.parent.kind === 142) {
return resolveEntityName(entityName, 1920, false, dontResolveAlias);
}
else {
- ts.Debug.assert(entityName.parent.kind === 234);
+ ts.Debug.assert(entityName.parent.kind === 236);
return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias);
}
}
@@ -20505,9 +21820,19 @@ var ts;
return undefined;
}
}
- else if (name.kind === 141 || name.kind === 177) {
- var left = name.kind === 141 ? name.left : name.expression;
- var right = name.kind === 141 ? name.right : name.name;
+ else if (name.kind === 142 || name.kind === 178) {
+ var left = void 0;
+ if (name.kind === 142) {
+ left = name.left;
+ }
+ else if (name.kind === 178 &&
+ (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) {
+ left = name.expression;
+ }
+ else {
+ return undefined;
+ }
+ var right = name.kind === 142 ? name.right : name.name;
var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location);
if (!namespace || ts.nodeIsMissing(right)) {
return undefined;
@@ -20523,10 +21848,15 @@ var ts;
return undefined;
}
}
+ else if (name.kind === 184) {
+ return ts.isEntityNameExpression(name.expression) ?
+ resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) :
+ undefined;
+ }
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -20534,7 +21864,7 @@ var ts;
}
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) {
if (isForAugmentation === void 0) { isForAugmentation = false; }
- if (moduleReferenceExpression.kind !== 9) {
+ if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) {
return;
}
var moduleReferenceLiteral = moduleReferenceExpression;
@@ -20571,11 +21901,10 @@ var ts;
}
if (!isRelative && resolvedModule && !ts.extensionIsTypeScript(resolvedModule.extension)) {
if (isForAugmentation) {
- ts.Debug.assert(!!moduleNotFoundError);
var diag = ts.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
- error(errorNode, diag, moduleName, resolvedModule.resolvedFileName);
+ error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
- else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
+ else if (noImplicitAny && moduleNotFoundError) {
error(errorNode, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
}
return undefined;
@@ -20597,27 +21926,35 @@ var ts;
}
return undefined;
}
- function resolveExternalModuleSymbol(moduleSymbol) {
- return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol;
+ function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
+ return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports.get("export="), dontResolveAlias)) || moduleSymbol;
}
- function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
- var symbol = resolveExternalModuleSymbol(moduleSymbol);
- if (symbol && !(symbol.flags & (1536 | 3))) {
+ function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression, dontResolveAlias) {
+ var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
+ if (!dontResolveAlias && symbol && !(symbol.flags & (1536 | 3))) {
error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
symbol = undefined;
}
return symbol;
}
function hasExportAssignmentSymbol(moduleSymbol) {
- return moduleSymbol.exports["export="] !== undefined;
+ return moduleSymbol.exports.get("export=") !== undefined;
}
function getExportsOfModuleAsArray(moduleSymbol) {
return symbolsToArray(getExportsOfModule(moduleSymbol));
}
+ function getExportsAndPropertiesOfModule(moduleSymbol) {
+ var exports = getExportsOfModuleAsArray(moduleSymbol);
+ var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+ if (exportEquals !== moduleSymbol) {
+ ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+ }
+ return exports;
+ }
function tryGetMemberInModuleExports(memberName, moduleSymbol) {
var symbolTable = getExportsOfModule(moduleSymbol);
if (symbolTable) {
- return symbolTable[memberName];
+ return symbolTable.get(memberName);
}
}
function getExportsOfSymbol(symbol) {
@@ -20628,24 +21965,28 @@ var ts;
return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol));
}
function extendExportSymbols(target, source, lookupTable, exportNode) {
- for (var id in source) {
- if (id !== "default" && !target[id]) {
- target[id] = source[id];
+ source && source.forEach(function (sourceSymbol, id) {
+ if (id === "default")
+ return;
+ var targetSymbol = target.get(id);
+ if (!targetSymbol) {
+ target.set(id, sourceSymbol);
if (lookupTable && exportNode) {
- lookupTable[id] = {
+ lookupTable.set(id, {
specifierText: ts.getTextOfNode(exportNode.moduleSpecifier)
- };
+ });
}
}
- else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
- if (!lookupTable[id].exportsWithDuplicate) {
- lookupTable[id].exportsWithDuplicate = [exportNode];
+ else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
+ var collisionTracker = lookupTable.get(id);
+ if (!collisionTracker.exportsWithDuplicate) {
+ collisionTracker.exportsWithDuplicate = [exportNode];
}
else {
- lookupTable[id].exportsWithDuplicate.push(exportNode);
+ collisionTracker.exportsWithDuplicate.push(exportNode);
}
}
- }
+ });
}
function getExportsForModule(moduleSymbol) {
var visitedSymbols = [];
@@ -20657,26 +21998,26 @@ var ts;
}
visitedSymbols.push(symbol);
var symbols = ts.cloneMap(symbol.exports);
- var exportStars = symbol.exports["__export"];
+ var exportStars = symbol.exports.get("__export");
if (exportStars) {
var nestedSymbols = ts.createMap();
- var lookupTable = ts.createMap();
+ var lookupTable_1 = ts.createMap();
for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
var node = _a[_i];
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
var exportedSymbols = visit(resolvedModule);
- extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node);
+ extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
}
- for (var id in lookupTable) {
- var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate;
- if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) {
- continue;
+ lookupTable_1.forEach(function (_a, id) {
+ var exportsWithDuplicate = _a.exportsWithDuplicate;
+ if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
+ return;
}
- for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) {
- var node = exportsWithDuplicate_1[_b];
- diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable[id].specifierText, id));
+ for (var _i = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _i < exportsWithDuplicate_1.length; _i++) {
+ var node = exportsWithDuplicate_1[_i];
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable_1.get(id).specifierText, id));
}
- }
+ });
extendExportSymbols(symbols, nestedSymbols);
}
return symbols;
@@ -20698,22 +22039,13 @@ var ts;
: symbol;
}
function symbolIsValue(symbol) {
- if (symbol.flags & 16777216) {
- return symbolIsValue(getSymbolLinks(symbol).target);
- }
- if (symbol.flags & 107455) {
- return true;
- }
- if (symbol.flags & 8388608) {
- return (resolveAlias(symbol).flags & 107455) !== 0;
- }
- return false;
+ return !!(symbol.flags & 107455 || symbol.flags & 8388608 && resolveAlias(symbol).flags & 107455);
}
function findConstructorDeclaration(node) {
var members = node.members;
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
var member = members_1[_i];
- if (member.kind === 150 && ts.nodeIsPresent(member.body)) {
+ if (member.kind === 151 && ts.nodeIsPresent(member.body)) {
return member;
}
}
@@ -20741,6 +22073,9 @@ var ts;
type.symbol = symbol;
return type;
}
+ function createTypeofType() {
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ }
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
name.charCodeAt(1) === 95 &&
@@ -20749,16 +22084,15 @@ var ts;
}
function getNamedMembers(members) {
var result;
- for (var id in members) {
+ members.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
if (!result)
result = [];
- var symbol = members[id];
if (symbolIsValue(symbol)) {
result.push(symbol);
}
}
- }
+ });
return result || emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
@@ -20777,19 +22111,19 @@ var ts;
}
function forEachSymbolTableInScope(enclosingDeclaration, callback) {
var result;
- for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
- if (location_1.locals && !isGlobalSourceFile(location_1)) {
- if (result = callback(location_1.locals)) {
+ for (var location = enclosingDeclaration; location; location = location.parent) {
+ if (location.locals && !isGlobalSourceFile(location)) {
+ if (result = callback(location.locals)) {
return result;
}
}
- switch (location_1.kind) {
- case 261:
- if (!ts.isExternalOrCommonJsModule(location_1)) {
+ switch (location.kind) {
+ case 264:
+ if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
- if (result = callback(getSymbolOfNode(location_1).exports)) {
+ case 232:
+ if (result = callback(getSymbolOfNode(location).exports)) {
return result;
}
break;
@@ -20802,6 +22136,16 @@ var ts;
}
function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
function getAccessibleSymbolChainFromSymbolTable(symbols) {
+ return getAccessibleSymbolChainFromSymbolTableWorker(symbols, []);
+ }
+ function getAccessibleSymbolChainFromSymbolTableWorker(symbols, visitedSymbolTables) {
+ if (ts.contains(visitedSymbolTables, symbols)) {
+ return undefined;
+ }
+ visitedSymbolTables.push(symbols);
+ var result = trySymbolTable(symbols);
+ visitedSymbolTables.pop();
+ return result;
function canQualifySymbol(symbolFromSymbolTable, meaning) {
if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
return true;
@@ -20815,26 +22159,28 @@ var ts;
canQualifySymbol(symbolFromSymbolTable, meaning);
}
}
- if (isAccessible(symbols[symbol.name])) {
- return [symbol];
- }
- return ts.forEachProperty(symbols, function (symbolFromSymbolTable) {
- if (symbolFromSymbolTable.flags & 8388608
- && symbolFromSymbolTable.name !== "export="
- && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) {
- if (!useOnlyExternalAliasing ||
- ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
- var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
- return [symbolFromSymbolTable];
- }
- var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
- if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
- return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ function trySymbolTable(symbols) {
+ if (isAccessible(symbols.get(symbol.name))) {
+ return [symbol];
+ }
+ return ts.forEachEntry(symbols, function (symbolFromSymbolTable) {
+ if (symbolFromSymbolTable.flags & 8388608
+ && symbolFromSymbolTable.name !== "export="
+ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) {
+ if (!useOnlyExternalAliasing ||
+ ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
+ var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
+ if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ return [symbolFromSymbolTable];
+ }
+ var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
+ if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
+ return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ }
}
}
- }
- });
+ });
+ }
}
if (symbol) {
if (!(isPropertyOrMethodDeclarationSymbol(symbol))) {
@@ -20845,14 +22191,14 @@ var ts;
function needsQualification(symbol, enclosingDeclaration, meaning) {
var qualify = false;
forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
- var symbolFromSymbolTable = symbolTable[symbol.name];
+ var symbolFromSymbolTable = symbolTable.get(symbol.name);
if (!symbolFromSymbolTable) {
return false;
}
if (symbolFromSymbolTable === symbol) {
return true;
}
- symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+ symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
if (symbolFromSymbolTable.flags & meaning) {
qualify = true;
return true;
@@ -20866,10 +22212,10 @@ var ts;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
switch (declaration.kind) {
- case 147:
- case 149:
- case 151:
+ case 148:
+ case 150:
case 152:
+ case 153:
continue;
default:
return false;
@@ -20917,15 +22263,12 @@ var ts;
}
return { accessibility: 0 };
function getExternalModuleContainer(declaration) {
- for (; declaration; declaration = declaration.parent) {
- if (hasExternalModuleSymbol(declaration)) {
- return getSymbolOfNode(declaration);
- }
- }
+ var node = ts.findAncestor(declaration, hasExternalModuleSymbol);
+ return node && getSymbolOfNode(node);
}
}
function hasExternalModuleSymbol(declaration) {
- return ts.isAmbientModule(declaration) || (declaration.kind === 261 && ts.isExternalOrCommonJsModule(declaration));
+ return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration));
}
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
var aliasesToMakeVisible;
@@ -20959,11 +22302,11 @@ var ts;
}
function isEntityNameVisible(entityName, enclosingDeclaration) {
var meaning;
- if (entityName.parent.kind === 160 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning = 107455 | 1048576;
}
- else if (entityName.kind === 141 || entityName.kind === 177 ||
- entityName.parent.kind === 234) {
+ else if (entityName.kind === 142 || entityName.kind === 178 ||
+ entityName.parent.kind === 236) {
meaning = 1920;
}
else {
@@ -21011,6 +22354,483 @@ var ts;
}
return result;
}
+ function createNodeBuilder() {
+ var context;
+ return {
+ typeToTypeNode: function (type, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ }
+ };
+ function createNodeBuilderContext(enclosingDeclaration, flags) {
+ return {
+ enclosingDeclaration: enclosingDeclaration,
+ flags: flags,
+ encounteredError: false,
+ inObjectTypeLiteral: false,
+ checkAlias: true,
+ symbolStack: undefined
+ };
+ }
+ function typeToTypeNodeHelper(type) {
+ if (!type) {
+ context.encounteredError = true;
+ return undefined;
+ }
+ if (type.flags & 1) {
+ return ts.createKeywordTypeNode(118);
+ }
+ if (type.flags & 2) {
+ return ts.createKeywordTypeNode(135);
+ }
+ if (type.flags & 4) {
+ return ts.createKeywordTypeNode(132);
+ }
+ if (type.flags & 8) {
+ return ts.createKeywordTypeNode(121);
+ }
+ if (type.flags & 16) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & (32)) {
+ return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ }
+ if (type.flags & (64)) {
+ return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ }
+ if (type.flags & 128) {
+ return type.intrinsicName === "true" ? ts.createTrue() : ts.createFalse();
+ }
+ if (type.flags & 256) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 1024) {
+ return ts.createKeywordTypeNode(104);
+ }
+ if (type.flags & 2048) {
+ return ts.createKeywordTypeNode(138);
+ }
+ if (type.flags & 4096) {
+ return ts.createKeywordTypeNode(94);
+ }
+ if (type.flags & 8192) {
+ return ts.createKeywordTypeNode(129);
+ }
+ if (type.flags & 512) {
+ return ts.createKeywordTypeNode(136);
+ }
+ if (type.flags & 16777216) {
+ return ts.createKeywordTypeNode(133);
+ }
+ if (type.flags & 16384 && type.isThisType) {
+ if (context.inObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ context.encounteredError = true;
+ }
+ }
+ return ts.createThis();
+ }
+ var objectFlags = getObjectFlags(type);
+ if (objectFlags & 4) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return typeReferenceToTypeNode(type);
+ }
+ if (objectFlags & 3) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 16384) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (context.checkAlias && type.aliasSymbol) {
+ var name = symbolToName(type.aliasSymbol, false);
+ var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ return ts.createTypeReferenceNode(name, typeArgumentNodes);
+ }
+ context.checkAlias = false;
+ if (type.flags & 65536) {
+ var formattedUnionTypes = formatUnionTypes(type.types);
+ var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes);
+ if (unionTypeNodes && unionTypeNodes.length > 0) {
+ return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes);
+ }
+ else {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ }
+ if (type.flags & 131072) {
+ return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types));
+ }
+ if (objectFlags & (16 | 32)) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return createAnonymousTypeNode(type);
+ }
+ if (type.flags & 262144) {
+ var indexedType = type.type;
+ var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ return ts.createTypeOperatorNode(indexTypeNode);
+ }
+ if (type.flags & 524288) {
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ return ts.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
+ }
+ ts.Debug.fail("Should be unreachable.");
+ function mapToTypeNodeArray(types) {
+ var result = [];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type_1 = types_1[_i];
+ var typeNode = typeToTypeNodeHelper(type_1);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ function createMappedTypeNodeFromType(type) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var typeParameter = getTypeParameterFromMappedType(type);
+ var typeParameterNode = typeParameterToDeclaration(typeParameter);
+ var templateType = getTemplateTypeFromMappedType(type);
+ var templateTypeNode = typeToTypeNodeHelper(templateType);
+ var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined;
+ var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined;
+ return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ }
+ function createAnonymousTypeNode(type) {
+ var symbol = type.symbol;
+ if (symbol) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512) ||
+ shouldWriteTypeOfFunctionSymbol()) {
+ return createTypeQueryNodeFromSymbol(symbol);
+ }
+ else if (ts.contains(context.symbolStack, symbol)) {
+ var typeAlias = getTypeAliasForTypeLiteral(type);
+ if (typeAlias) {
+ var entityName = symbolToName(typeAlias, false);
+ return ts.createTypeReferenceNode(entityName, undefined);
+ }
+ else {
+ return ts.createKeywordTypeNode(118);
+ }
+ }
+ else {
+ if (!context.symbolStack) {
+ context.symbolStack = [];
+ }
+ context.symbolStack.push(symbol);
+ var result = createTypeNodeFromObjectType(type);
+ context.symbolStack.pop();
+ return result;
+ }
+ }
+ else {
+ return createTypeNodeFromObjectType(type);
+ }
+ function shouldWriteTypeOfFunctionSymbol() {
+ var isStaticMethodSymbol = !!(symbol.flags & 8192 &&
+ ts.forEach(symbol.declarations, function (declaration) { return ts.getModifierFlags(declaration) & 32; }));
+ var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
+ (symbol.parent ||
+ ts.forEach(symbol.declarations, function (declaration) {
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
+ }));
+ if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
+ return ts.contains(context.symbolStack, symbol);
+ }
+ }
+ }
+ function createTypeNodeFromObjectType(type) {
+ if (type.objectFlags & 32) {
+ if (getConstraintTypeFromMappedType(type).flags & (16384 | 262144)) {
+ return createMappedTypeNodeFromType(type);
+ }
+ }
+ var resolved = resolveStructuredTypeMembers(type);
+ if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+ if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
+ return ts.createTypeLiteralNode(undefined);
+ }
+ if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
+ var signature = resolved.callSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 159);
+ }
+ if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
+ var signature = resolved.constructSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 160);
+ }
+ }
+ var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
+ context.inObjectTypeLiteral = true;
+ var members = createTypeNodesFromResolvedType(resolved);
+ context.inObjectTypeLiteral = saveInObjectTypeLiteral;
+ return ts.createTypeLiteralNode(members);
+ }
+ function createTypeQueryNodeFromSymbol(symbol) {
+ var entityName = symbolToName(symbol, false);
+ return ts.createTypeQueryNode(entityName);
+ }
+ function typeReferenceToTypeNode(type) {
+ var typeArguments = type.typeArguments || emptyArray;
+ if (type.target === globalArrayType) {
+ var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ return ts.createArrayTypeNode(elementType);
+ }
+ else if (type.target.objectFlags & 8) {
+ if (typeArguments.length > 0) {
+ var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
+ return ts.createTupleTypeNode(tupleConstituentNodes);
+ }
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ else {
+ var outerTypeParameters = type.target.outerTypeParameters;
+ var i = 0;
+ var qualifiedName = undefined;
+ if (outerTypeParameters) {
+ var length_1 = outerTypeParameters.length;
+ while (i < length_1) {
+ var start = i;
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ do {
+ i++;
+ } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
+ if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
+ var qualifiedNamePart = symbolToName(parent, true);
+ if (!qualifiedName) {
+ qualifiedName = ts.createQualifiedName(qualifiedNamePart, undefined);
+ }
+ else {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = qualifiedNamePart;
+ qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
+ }
+ }
+ }
+ }
+ var entityName = undefined;
+ var nameIdentifier = symbolToName(type.symbol, true);
+ if (qualifiedName) {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = nameIdentifier;
+ entityName = qualifiedName;
+ }
+ else {
+ entityName = nameIdentifier;
+ }
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ var typeArgumentNodes = ts.some(typeArguments) ? mapToTypeNodeArray(typeArguments.slice(i, typeParameterCount - i)) : undefined;
+ return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
+ }
+ }
+ function createTypeNodesFromResolvedType(resolvedType) {
+ var typeElements = [];
+ for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
+ var signature = _a[_i];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 154));
+ }
+ for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
+ var signature = _c[_b];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ }
+ if (resolvedType.stringIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ }
+ if (resolvedType.numberIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ }
+ var properties = resolvedType.properties;
+ if (!properties) {
+ return typeElements;
+ }
+ for (var _d = 0, properties_2 = properties; _d < properties_2.length; _d++) {
+ var propertySymbol = properties_2[_d];
+ var propertyType = getTypeOfSymbol(propertySymbol);
+ var oldDeclaration = propertySymbol.declarations && propertySymbol.declarations[0];
+ if (!oldDeclaration) {
+ return;
+ }
+ var propertyName = oldDeclaration.name;
+ var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined;
+ if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) {
+ var signatures = getSignaturesOfType(propertyType, 0);
+ for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) {
+ var signature = signatures_1[_e];
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149);
+ methodDeclaration.name = propertyName;
+ methodDeclaration.questionToken = optionalToken;
+ typeElements.push(methodDeclaration);
+ }
+ }
+ else {
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118);
+ typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ }
+ }
+ return typeElements.length ? typeElements : undefined;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132);
+ var name = ts.getNameFromIndexInfo(indexInfo);
+ var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type);
+ return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode);
+ }
+ function signatureToSignatureDeclarationHelper(signature, kind) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter); });
+ var returnTypeNode;
+ if (signature.typePredicate) {
+ var typePredicate = signature.typePredicate;
+ var parameterName = typePredicate.kind === 1 ? ts.createIdentifier(typePredicate.parameterName) : ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type);
+ returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
+ }
+ else {
+ var returnType = getReturnTypeOfSignature(signature);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ }
+ var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined;
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ }
+ function typeParameterToDeclaration(type) {
+ var constraint = getConstraintFromTypeParameter(type);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var defaultParameter = getDefaultFromTypeParameter(type);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
+ var name = symbolToName(type.symbol, true);
+ return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
+ }
+ function symbolToParameterDeclaration(parameterSymbol) {
+ var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145);
+ var parameterType = getTypeOfSymbol(parameterSymbol);
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType);
+ var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer);
+ return parameterNode;
+ }
+ function symbolToName(symbol, expectsIdentifier) {
+ var chain;
+ var isTypeParameter = symbol.flags & 262144;
+ if (!isTypeParameter && context.enclosingDeclaration) {
+ chain = getSymbolChain(symbol, 0, true);
+ ts.Debug.assert(chain && chain.length > 0);
+ }
+ else {
+ chain = [symbol];
+ }
+ if (expectsIdentifier && chain.length !== 1
+ && !context.encounteredError
+ && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ context.encounteredError = true;
+ }
+ return createEntityNameFromSymbolChain(chain, chain.length - 1);
+ function createEntityNameFromSymbolChain(chain, index) {
+ ts.Debug.assert(chain && 0 <= index && index < chain.length);
+ var symbol = chain[index];
+ var typeParameterString = "";
+ if (index > 0) {
+ var parentSymbol = chain[index - 1];
+ var typeParameters = void 0;
+ if (getCheckFlags(symbol) & 1) {
+ typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
+ }
+ else {
+ var targetSymbol = getTargetSymbol(parentSymbol);
+ if (targetSymbol.flags & (32 | 64 | 524288)) {
+ typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
+ }
+ }
+ if (typeParameters && typeParameters.length > 0) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowTypeParameterInQualifiedName)) {
+ context.encounteredError = true;
+ }
+ var writer = ts.getSingleLineStringWriter();
+ var displayBuilder = getSymbolDisplayBuilder();
+ displayBuilder.buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, context.enclosingDeclaration, 0);
+ typeParameterString = writer.string();
+ ts.releaseStringWriter(writer);
+ }
+ }
+ var symbolName = getNameOfSymbol(symbol);
+ var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
+ var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
+ }
+ function getSymbolChain(symbol, meaning, endOfChain) {
+ var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, false);
+ var parentSymbol;
+ if (!accessibleSymbolChain ||
+ needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ var parentChain = getSymbolChain(parent, getQualifiedLeftMeaning(meaning), false);
+ if (parentChain) {
+ parentSymbol = parent;
+ accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [symbol]);
+ }
+ }
+ }
+ if (accessibleSymbolChain) {
+ return accessibleSymbolChain;
+ }
+ if (endOfChain ||
+ !(!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) &&
+ !(symbol.flags & (2048 | 4096))) {
+ return [symbol];
+ }
+ }
+ function getNameOfSymbol(symbol) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
+ }
+ }
+ return symbol.name;
+ }
+ }
+ }
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
var writer = ts.getSingleLineStringWriter();
getSymbolDisplayBuilder().buildTypePredicateDisplay(typePredicate, writer, enclosingDeclaration, flags);
@@ -21054,11 +22874,8 @@ var ts;
}
function getTypeAliasForTypeLiteral(type) {
if (type.symbol && type.symbol.flags & 2048) {
- var node = type.symbol.declarations[0].parent;
- while (node.kind === 166) {
- node = node.parent;
- }
- if (node.kind === 228) {
+ var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; });
+ if (node.kind === 230) {
return getSymbolOfNode(node);
}
}
@@ -21066,29 +22883,32 @@ var ts;
}
function isTopLevelInExternalModuleAugmentation(node) {
return node && node.parent &&
- node.parent.kind === 231 &&
+ node.parent.kind === 233 &&
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
}
- function getSymbolDisplayBuilder() {
- function getNameOfSymbol(symbol) {
- if (symbol.declarations && symbol.declarations.length) {
- var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
- }
- switch (declaration.kind) {
- case 197:
- return "(Anonymous class)";
- case 184:
- case 185:
- return "(Anonymous function)";
- }
+ function getNameOfSymbol(symbol) {
+ if (symbol.declarations && symbol.declarations.length) {
+ var declaration = symbol.declarations[0];
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
+ }
+ function getSymbolDisplayBuilder() {
function appendSymbolNameOnly(symbol, writer) {
writer.writeSymbol(getNameOfSymbol(symbol), symbol);
}
@@ -21116,7 +22936,7 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
}
else {
@@ -21135,9 +22955,9 @@ var ts;
var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2));
if (!accessibleSymbolChain ||
needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
- var parent_5 = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
- if (parent_5) {
- walkSymbol(parent_5, getQualifiedLeftMeaning(meaning), false);
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ walkSymbol(parent, getQualifiedLeftMeaning(meaning), false);
}
}
if (accessibleSymbolChain) {
@@ -21167,7 +22987,7 @@ var ts;
return writeType(type, globalFlags);
function writeType(type, flags) {
var nextFlags = flags & ~512;
- if (type.flags & 16015) {
+ if (type.flags & 16793231) {
writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
? "any"
: type.intrinsicName);
@@ -21192,7 +23012,7 @@ var ts;
else if (!(flags & 512) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
- writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
+ writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
}
else if (type.flags & 196608) {
writeUnionOrIntersectionType(type, nextFlags);
@@ -21267,15 +23087,15 @@ var ts;
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
if (outerTypeParameters) {
- var length_1 = outerTypeParameters.length;
- while (i < length_1) {
+ var length_2 = outerTypeParameters.length;
+ while (i < length_2) {
var start = i;
- var parent_6 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
do {
i++;
- } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_6);
+ } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
- writeSymbolTypeReference(parent_6, typeArguments, start, i, flags);
+ writeSymbolTypeReference(parent, typeArguments, start, i, flags);
writePunctuation(writer, 22);
}
}
@@ -21301,7 +23121,8 @@ var ts;
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & (32 | 384 | 512)) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
else if (shouldWriteTypeOfFunctionSymbol()) {
@@ -21334,7 +23155,7 @@ var ts;
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
(symbol.parent ||
ts.forEach(symbol.declarations, function (declaration) {
- return declaration.parent.kind === 261 || declaration.parent.kind === 231;
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
return !!(flags & 2) ||
@@ -21347,32 +23168,13 @@ var ts;
writeSpace(writer);
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags);
}
- function writeIndexSignature(info, keyword) {
- if (info) {
- if (info.isReadonly) {
- writeKeyword(writer, 130);
- writeSpace(writer);
- }
- writePunctuation(writer, 20);
- writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeKeyword(writer, keyword);
- writePunctuation(writer, 21);
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeType(info.type, 0);
- writePunctuation(writer, 24);
- writer.writeLine();
- }
- }
function writePropertyWithModifiers(prop) {
if (isReadonlySymbol(prop)) {
writeKeyword(writer, 130);
writeSpace(writer);
}
buildSymbolDisplay(prop, writer);
- if (prop.flags & 536870912) {
+ if (prop.flags & 67108864) {
writePunctuation(writer, 54);
}
}
@@ -21448,15 +23250,15 @@ var ts;
writePunctuation(writer, 24);
writer.writeLine();
}
- writeIndexSignature(resolved.stringIndexInfo, 134);
- writeIndexSignature(resolved.numberIndexInfo, 132);
+ buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack);
+ buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
- for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) {
- var signature = signatures_1[_f];
+ for (var _f = 0, signatures_2 = signatures; _f < signatures_2.length; _f++) {
+ var signature = signatures_2[_f];
writePropertyWithModifiers(p);
buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack);
writePunctuation(writer, 24);
@@ -21515,32 +23317,43 @@ var ts;
writeSpace(writer);
buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack);
}
+ var defaultType = getDefaultFromTypeParameter(tp);
+ if (defaultType) {
+ writeSpace(writer);
+ writePunctuation(writer, 57);
+ writeSpace(writer);
+ buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack);
+ }
}
function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) {
var parameterNode = p.valueDeclaration;
- if (ts.isRestParameter(parameterNode)) {
+ if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) {
writePunctuation(writer, 23);
}
- if (ts.isBindingPattern(parameterNode.name)) {
+ if (parameterNode && ts.isBindingPattern(parameterNode.name)) {
buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack);
}
else {
appendSymbolNameOnly(p, writer);
}
- if (isOptionalParameter(parameterNode)) {
+ if (parameterNode && isOptionalParameter(parameterNode)) {
writePunctuation(writer, 54);
}
writePunctuation(writer, 55);
writeSpace(writer);
- buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack);
+ var type = getTypeOfSymbol(p);
+ if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
+ type = includeFalsyTypes(type, 2048);
+ }
+ buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
writePunctuation(writer, 16);
buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
writePunctuation(writer, 17);
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
writePunctuation(writer, 20);
var elements = bindingPattern.elements;
buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
@@ -21554,9 +23367,9 @@ var ts;
if (ts.isOmittedExpression(bindingElement)) {
return;
}
- ts.Debug.assert(bindingElement.kind === 174);
+ ts.Debug.assert(bindingElement.kind === 175);
if (bindingElement.propertyName) {
- writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
+ writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName));
writePunctuation(writer, 55);
writeSpace(writer);
}
@@ -21628,6 +23441,10 @@ var ts;
buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
+ var returnType = getReturnTypeOfSignature(signature);
+ if (flags & 2048 && isTypeAny(returnType)) {
+ return;
+ }
if (flags & 8) {
writeSpace(writer);
writePunctuation(writer, 35);
@@ -21640,7 +23457,6 @@ var ts;
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
}
else {
- var returnType = getReturnTypeOfSignature(signature);
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
}
}
@@ -21658,6 +23474,32 @@ var ts;
buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack);
buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack);
}
+ function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) {
+ if (info) {
+ if (info.isReadonly) {
+ writeKeyword(writer, 130);
+ writeSpace(writer);
+ }
+ writePunctuation(writer, 20);
+ writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ switch (kind) {
+ case 1:
+ writeKeyword(writer, 132);
+ break;
+ case 0:
+ writeKeyword(writer, 135);
+ break;
+ }
+ writePunctuation(writer, 21);
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
+ writePunctuation(writer, 24);
+ writer.writeLine();
+ }
+ }
return _displayBuilder || (_displayBuilder = {
buildSymbolDisplay: buildSymbolDisplay,
buildTypeDisplay: buildTypeDisplay,
@@ -21668,6 +23510,7 @@ var ts;
buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
buildSignatureDisplay: buildSignatureDisplay,
+ buildIndexSignatureDisplay: buildIndexSignatureDisplay,
buildReturnTypeDisplay: buildReturnTypeDisplay
});
}
@@ -21682,63 +23525,63 @@ var ts;
return false;
function determineIfDeclarationIsVisible() {
switch (node.kind) {
- case 174:
+ case 175:
return isDeclarationVisible(node.parent.parent);
- case 223:
+ case 225:
if (ts.isBindingPattern(node.name) &&
!node.name.elements.length) {
return false;
}
- case 230:
- case 226:
- case 227:
+ case 232:
case 228:
- case 225:
case 229:
- case 234:
+ case 230:
+ case 227:
+ case 231:
+ case 236:
if (ts.isExternalModuleAugmentation(node)) {
return true;
}
- var parent_7 = getDeclarationContainer(node);
+ var parent = getDeclarationContainer(node);
if (!(ts.getCombinedModifierFlags(node) & 1) &&
- !(node.kind !== 234 && parent_7.kind !== 261 && ts.isInAmbientContext(parent_7))) {
- return isGlobalSourceFile(parent_7);
+ !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) {
+ return isGlobalSourceFile(parent);
}
- return isDeclarationVisible(parent_7);
+ return isDeclarationVisible(parent);
+ case 148:
case 147:
- case 146:
- case 151:
case 152:
+ case 153:
+ case 150:
case 149:
- case 148:
if (ts.getModifierFlags(node) & (8 | 16)) {
return false;
}
- case 150:
- case 154:
- case 153:
+ case 151:
case 155:
- case 144:
- case 231:
- case 158:
+ case 154:
+ case 156:
+ case 145:
+ case 233:
case 159:
- case 161:
- case 157:
+ case 160:
case 162:
+ case 158:
case 163:
case 164:
case 165:
case 166:
+ case 167:
return isDeclarationVisible(node.parent);
- case 236:
- case 237:
+ case 238:
case 239:
+ case 241:
return false;
- case 143:
- case 261:
- case 233:
+ case 144:
+ case 264:
+ case 235:
return true;
- case 240:
+ case 242:
return false;
default:
return false;
@@ -21747,10 +23590,10 @@ var ts;
}
function collectLinkedAliases(node) {
var exportSymbol;
- if (node.parent && node.parent.kind === 240) {
+ if (node.parent && node.parent.kind === 242) {
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
- else if (node.parent.kind === 243) {
+ else if (node.parent.kind === 245) {
var exportSpecifier = node.parent;
exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
@@ -21782,8 +23625,8 @@ var ts;
function pushTypeResolution(target, propertyName) {
var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
if (resolutionCycleStartIndex >= 0) {
- var length_2 = resolutionTargets.length;
- for (var i = resolutionCycleStartIndex; i < length_2; i++) {
+ var length_3 = resolutionTargets.length;
+ for (var i = resolutionCycleStartIndex; i < length_3; i++) {
resolutionResults[i] = false;
}
return false;
@@ -21825,21 +23668,20 @@ var ts;
return resolutionResults.pop();
}
function getDeclarationContainer(node) {
- node = ts.getRootDeclaration(node);
- while (node) {
+ node = ts.findAncestor(ts.getRootDeclaration(node), function (node) {
switch (node.kind) {
- case 223:
- case 224:
+ case 225:
+ case 226:
+ case 241:
+ case 240:
case 239:
case 238:
- case 237:
- case 236:
- node = node.parent;
- break;
+ return false;
default:
- return node.parent;
+ return true;
}
- }
+ });
+ return node && node.parent;
}
function getTypeOfPrototypeProperty(prototype) {
var classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
@@ -21852,32 +23694,34 @@ var ts;
function isTypeAny(type) {
return type && (type.flags & 1) !== 0;
}
- function isTypeNever(type) {
- return type && (type.flags & 8192) !== 0;
- }
function getTypeForBindingElementParent(node) {
var symbol = getSymbolOfNode(node);
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
}
function isComputedNonLiteralName(name) {
- return name.kind === 142 && !ts.isStringOrNumericLiteral(name.expression);
+ return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression);
}
function getRestType(source, properties, symbol) {
- ts.Debug.assert(!!(source.flags & 32768), "Rest types only support object types right now.");
+ source = filterType(source, function (t) { return !(t.flags & 6144); });
+ if (source.flags & 8192) {
+ return emptyObjectType;
+ }
+ if (source.flags & 65536) {
+ return mapType(source, function (t) { return getRestType(t, properties, symbol); });
+ }
var members = ts.createMap();
var names = ts.createMap();
- for (var _i = 0, properties_2 = properties; _i < properties_2.length; _i++) {
- var name_17 = properties_2[_i];
- names[ts.getTextOfPropertyName(name_17)] = true;
+ for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
+ var name = properties_3[_i];
+ names.set(ts.getTextOfPropertyName(name), true);
}
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
- var inNamesToRemove = prop.name in names;
+ var inNamesToRemove = names.has(prop.name);
var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
- var isMethod = prop.flags & 8192;
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
- if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
- members[prop.name] = prop;
+ if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
+ members.set(prop.name, prop);
}
}
var stringIndexInfo = getIndexInfoOfType(source, 0);
@@ -21897,9 +23741,9 @@ var ts;
return parentType;
}
var type;
- if (pattern.kind === 172) {
+ if (pattern.kind === 173) {
if (declaration.dotDotDotToken) {
- if (!(parentType.flags & 32768)) {
+ if (!isValidSpreadType(parentType)) {
error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types);
return unknownType;
}
@@ -21913,25 +23757,25 @@ var ts;
type = getRestType(parentType, literalMembers, declaration.symbol);
}
else {
- var name_18 = declaration.propertyName || declaration.name;
- if (isComputedNonLiteralName(name_18)) {
+ var name = declaration.propertyName || declaration.name;
+ if (isComputedNonLiteralName(name)) {
return anyType;
}
if (declaration.initializer) {
getContextualType(declaration.initializer);
}
- var text = ts.getTextOfPropertyName(name_18);
+ var text = ts.getTextOfPropertyName(name);
type = getTypeOfPropertyOfType(parentType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1) ||
getIndexTypeOfType(parentType, 0);
if (!type) {
- error(name_18, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_18));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name));
return unknownType;
}
}
}
else {
- var elementType = checkIteratedTypeOrElementType(parentType, pattern, false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, false, false);
if (declaration.dotDotDotToken) {
type = createArrayType(elementType);
}
@@ -21958,7 +23802,7 @@ var ts;
getUnionType([type, checkExpressionCached(declaration.initializer)], true) :
type;
}
- function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) {
+ function getTypeForDeclarationFromJSDocComment(declaration) {
var jsdocType = ts.getJSDocType(declaration);
if (jsdocType) {
return getTypeFromTypeNode(jsdocType);
@@ -21971,33 +23815,35 @@ var ts;
}
function isEmptyArrayLiteral(node) {
var expr = ts.skipParentheses(node);
- return expr.kind === 175 && expr.elements.length === 0;
+ return expr.kind === 176 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 2097152) {
- var type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration);
+ if (declaration.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.parent.parent.kind === 212) {
+ if (declaration.parent.parent.kind === 214) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
}
- if (declaration.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
+ if (declaration.parent.parent.kind === 215) {
+ var forOfStatement = declaration.parent.parent;
+ return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType;
}
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
if (declaration.type) {
- return addOptionality(getTypeFromTypeNode(declaration.type), declaration.questionToken && includeOptionality);
+ var declaredType = getTypeFromTypeNode(declaration.type);
+ return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
- if ((compilerOptions.noImplicitAny || declaration.flags & 2097152) &&
- declaration.kind === 223 && !ts.isBindingPattern(declaration.name) &&
+ if ((noImplicitAny || declaration.flags & 65536) &&
+ declaration.kind === 225 && !ts.isBindingPattern(declaration.name) &&
!(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) {
if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) {
return autoType;
@@ -22006,10 +23852,10 @@ var ts;
return autoArrayType;
}
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var func = declaration.parent;
- if (func.kind === 152 && !ts.hasDynamicName(func)) {
- var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 151);
+ if (func.kind === 153 && !ts.hasDynamicName(func)) {
+ var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152);
if (getter) {
var getterSignature = getSignatureFromDeclaration(getter);
var thisParameter = getAccessorThisParameter(func);
@@ -22035,7 +23881,10 @@ var ts;
var type = checkDeclarationInitializer(declaration);
return addOptionality(type, declaration.questionToken && includeOptionality);
}
- if (declaration.kind === 258) {
+ if (ts.isJsxAttribute(declaration)) {
+ return trueType;
+ }
+ if (declaration.kind === 261) {
return checkIdentifier(declaration.name);
}
if (ts.isBindingPattern(declaration.name)) {
@@ -22043,6 +23892,37 @@ var ts;
}
return undefined;
}
+ function getWidenedTypeFromJSSpecialPropertyDeclarations(symbol) {
+ var types = [];
+ var definedInConstructor = false;
+ var definedInMethod = false;
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ var expression = declaration.kind === 193 ? declaration :
+ declaration.kind === 178 ? ts.getAncestor(declaration, 193) :
+ undefined;
+ if (!expression) {
+ return unknownType;
+ }
+ if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) {
+ if (ts.getThisContainer(expression, false).kind === 151) {
+ definedInConstructor = true;
+ }
+ else {
+ definedInMethod = true;
+ }
+ }
+ if (expression.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type && type !== unknownType) {
+ types.push(getWidenedType(type));
+ continue;
+ }
+ }
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
+ return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ }
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
return checkDeclarationInitializer(element);
@@ -22050,28 +23930,33 @@ var ts;
if (ts.isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
}
- if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
+ if (reportErrors && noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
reportImplicitAnyError(element, anyType);
}
return anyType;
}
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
var members = ts.createMap();
+ var stringIndexInfo;
var hasComputedProperties = false;
ts.forEach(pattern.elements, function (e) {
var name = e.propertyName || e.name;
- if (isComputedNonLiteralName(name) || e.dotDotDotToken) {
+ if (isComputedNonLiteralName(name)) {
hasComputedProperties = true;
return;
}
+ if (e.dotDotDotToken) {
+ stringIndexInfo = createIndexInfo(anyType, false);
+ return;
+ }
var text = ts.getTextOfPropertyName(name);
- var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0);
+ var flags = 4 | (e.initializer ? 67108864 : 0);
var symbol = createSymbol(flags, text);
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
symbol.bindingElement = e;
- members[symbol.name] = symbol;
+ members.set(symbol.name, symbol);
});
- var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
+ var result = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, undefined);
if (includePatternInType) {
result.pattern = pattern;
}
@@ -22095,7 +23980,7 @@ var ts;
return result;
}
function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
- return pattern.kind === 172
+ return pattern.kind === 173
? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
}
@@ -22105,13 +23990,13 @@ var ts;
if (reportErrors) {
reportErrorsFromWidening(declaration, type);
}
- if (declaration.kind === 257) {
+ if (declaration.kind === 260) {
return type;
}
return getWidenedType(type);
}
type = declaration.dotDotDotToken ? anyArrayType : anyType;
- if (reportErrors && compilerOptions.noImplicitAny) {
+ if (reportErrors && noImplicitAny) {
if (!declarationBelongsToPrivateAmbientMember(declaration)) {
reportImplicitAnyError(declaration, type);
}
@@ -22120,56 +24005,38 @@ var ts;
}
function declarationBelongsToPrivateAmbientMember(declaration) {
var root = ts.getRootDeclaration(declaration);
- var memberDeclaration = root.kind === 144 ? root.parent : root;
+ var memberDeclaration = root.kind === 145 ? root.parent : root;
return isPrivateWithinAmbient(memberDeclaration);
}
function getTypeOfVariableOrParameterOrProperty(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- if (symbol.flags & 134217728) {
+ if (symbol.flags & 16777216) {
return links.type = getTypeOfPrototypeProperty(symbol);
}
var declaration = symbol.valueDeclaration;
if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
return links.type = anyType;
}
- if (declaration.kind === 240) {
+ if (declaration.kind === 242) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 2097152 && declaration.kind === 286 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
return unknownType;
}
var type = void 0;
- if (declaration.kind === 192 ||
- declaration.kind === 177 && declaration.parent.kind === 192) {
- if (declaration.flags & 2097152) {
- var jsdocType = ts.getJSDocType(declaration.parent);
- if (jsdocType) {
- return links.type = getTypeFromTypeNode(jsdocType);
- }
- }
- var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 192 ?
- checkExpressionCached(decl.right) :
- checkExpressionCached(decl.parent.right); });
- type = getUnionType(declaredTypes, true);
+ if (declaration.kind === 193 ||
+ declaration.kind === 178 && declaration.parent.kind === 193) {
+ type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol);
}
else {
type = getWidenedTypeForVariableLikeDeclaration(declaration, true);
}
if (!popTypeResolution()) {
- if (symbol.valueDeclaration.type) {
- type = unknownType;
- error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
- }
- else {
- type = anyType;
- if (compilerOptions.noImplicitAny) {
- error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
- }
- }
+ type = reportCircularityError(symbol);
}
links.type = type;
}
@@ -22177,7 +24044,7 @@ var ts;
}
function getAnnotatedAccessorType(accessor) {
if (accessor) {
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
return accessor.type && getTypeFromTypeNode(accessor.type);
}
else {
@@ -22197,10 +24064,10 @@ var ts;
function getTypeOfAccessors(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- var getter = ts.getDeclarationOfKind(symbol, 151);
- var setter = ts.getDeclarationOfKind(symbol, 152);
- if (getter && getter.flags & 2097152) {
- var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
+ var getter = ts.getDeclarationOfKind(symbol, 152);
+ var setter = ts.getDeclarationOfKind(symbol, 153);
+ if (getter && getter.flags & 65536) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
if (jsDocType) {
return links.type = jsDocType;
}
@@ -22223,7 +24090,7 @@ var ts;
type = getReturnTypeFromBody(getter);
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
if (setter) {
error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
@@ -22238,8 +24105,8 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
- var getter_1 = ts.getDeclarationOfKind(symbol, 151);
+ if (noImplicitAny) {
+ var getter_1 = ts.getDeclarationOfKind(symbol, 152);
error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
}
}
@@ -22247,6 +24114,10 @@ var ts;
}
return links.type;
}
+ function getBaseTypeVariableOfClass(symbol) {
+ var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
+ return baseConstructorType.flags & 540672 ? baseConstructorType : undefined;
+ }
function getTypeOfFuncClassEnumModule(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
@@ -22255,8 +24126,13 @@ var ts;
}
else {
var type = createObjectType(16, symbol);
- links.type = strictNullChecks && symbol.flags & 536870912 ?
- includeFalsyTypes(type, 2048) : type;
+ if (symbol.flags & 32) {
+ var baseTypeVariable = getBaseTypeVariableOfClass(symbol);
+ links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
+ }
+ else {
+ links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ }
}
}
return links.type;
@@ -22281,12 +24157,37 @@ var ts;
function getTypeOfInstantiatedSymbol(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ if (symbolInstantiationDepth === 100) {
+ error(symbol.valueDeclaration, ts.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite);
+ links.type = unknownType;
+ }
+ else {
+ if (!pushTypeResolution(symbol, 0)) {
+ return unknownType;
+ }
+ symbolInstantiationDepth++;
+ var type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ symbolInstantiationDepth--;
+ if (!popTypeResolution()) {
+ type = reportCircularityError(symbol);
+ }
+ links.type = type;
+ }
}
return links.type;
}
+ function reportCircularityError(symbol) {
+ if (symbol.valueDeclaration.type) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
+ return unknownType;
+ }
+ if (noImplicitAny) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
+ }
+ return anyType;
+ }
function getTypeOfSymbol(symbol) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -22306,19 +24207,30 @@ var ts;
}
return unknownType;
}
+ function isReferenceToType(type, target) {
+ return type !== undefined
+ && target !== undefined
+ && (getObjectFlags(type) & 4) !== 0
+ && type.target === target;
+ }
function getTargetType(type) {
return getObjectFlags(type) & 4 ? type.target : type;
}
function hasBaseType(type, checkBase) {
return check(type);
function check(type) {
- var target = getTargetType(type);
- return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ if (getObjectFlags(type) & (3 | 4)) {
+ var target = getTargetType(type);
+ return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ }
+ else if (type.flags & 131072) {
+ return ts.forEach(type.types, check);
+ }
}
}
function appendTypeParameters(typeParameters, declarations) {
- for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
- var declaration = declarations_2[_i];
+ for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+ var declaration = declarations_3[_i];
var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration));
if (!typeParameters) {
typeParameters = [tp];
@@ -22335,9 +24247,9 @@ var ts;
if (!node) {
return typeParameters;
}
- if (node.kind === 226 || node.kind === 197 ||
- node.kind === 225 || node.kind === 184 ||
- node.kind === 149 || node.kind === 185) {
+ if (node.kind === 228 || node.kind === 198 ||
+ node.kind === 227 || node.kind === 185 ||
+ node.kind === 150 || node.kind === 186) {
var declarations = node.typeParameters;
if (declarations) {
return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
@@ -22346,15 +24258,15 @@ var ts;
}
}
function getOuterTypeParametersOfClassOrInterface(symbol) {
- var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 227);
+ var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229);
return appendOuterTypeParameters(undefined, declaration);
}
function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) {
var result;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var node = _a[_i];
- if (node.kind === 227 || node.kind === 226 ||
- node.kind === 197 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 228 ||
+ node.kind === 198 || node.kind === 230) {
var declaration = node;
if (declaration.typeParameters) {
result = appendTypeParameters(result, declaration.typeParameters);
@@ -22366,18 +24278,34 @@ var ts;
function getTypeParametersOfClassOrInterface(symbol) {
return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
}
+ function isMixinConstructorType(type) {
+ var signatures = getSignaturesOfType(type, 1);
+ if (signatures.length === 1) {
+ var s = signatures[0];
+ return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType;
+ }
+ return false;
+ }
function isConstructorType(type) {
- return type.flags & 32768 && getSignaturesOfType(type, 1).length > 0;
+ if (isValidBaseType(type) && getSignaturesOfType(type, 1).length > 0) {
+ return true;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type);
+ return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
+ }
+ return false;
}
function getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
}
- function getConstructorsForTypeArguments(type, typeArgumentNodes) {
- var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
- return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; });
+ function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var typeArgCount = ts.length(typeArgumentNodes);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (isJavaScript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= ts.length(sig.typeParameters); });
}
- function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
- var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
+ function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
if (typeArgumentNodes) {
var typeArguments_1 = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.map(signatures, function (sig) { return getSignatureInstantiation(sig, typeArguments_1); });
@@ -22394,14 +24322,14 @@ var ts;
return unknownType;
}
var baseConstructorType = checkExpression(baseTypeNode.expression);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072)) {
resolveStructuredTypeMembers(baseConstructorType);
}
if (!popTypeResolution()) {
error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
return type.resolvedBaseConstructorType = unknownType;
}
- if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
+ if (!(baseConstructorType.flags & 1) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
return type.resolvedBaseConstructorType = unknownType;
}
@@ -22430,8 +24358,8 @@ var ts;
}
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
- var baseConstructorType = getBaseConstructorTypeOfClass(type);
- if (!(baseConstructorType.flags & 32768)) {
+ var baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));
+ if (!(baseConstructorType.flags & (32768 | 131072 | 1))) {
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -22441,8 +24369,11 @@ var ts;
areAllOuterTypeParametersApplied(originalBaseType)) {
baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
}
+ else if (baseConstructorType.flags & 1) {
+ baseType = baseConstructorType;
+ }
else {
- var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);
if (!constructors.length) {
error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);
return;
@@ -22459,7 +24390,7 @@ var ts;
if (baseType === unknownType) {
return;
}
- if (!(getObjectFlags(getTargetType(baseType)) & 3)) {
+ if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
return;
}
@@ -22483,16 +24414,20 @@ var ts;
}
return true;
}
+ function isValidBaseType(type) {
+ return type.flags & (32768 | 16777216 | 1) && !isGenericMappedType(type) ||
+ type.flags & 131072 && !ts.forEach(type.types, function (t) { return !isValidBaseType(t); });
+ }
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 && ts.getInterfaceBaseTypeNodes(declaration)) {
+ if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) {
for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
var node = _c[_b];
var baseType = getTypeFromTypeNode(node);
if (baseType !== unknownType) {
- if (getObjectFlags(getTargetType(baseType)) & 3) {
+ if (isValidBaseType(baseType)) {
if (type !== baseType && !hasBaseType(baseType, type)) {
if (type.resolvedBaseTypes === emptyArray) {
type.resolvedBaseTypes = [baseType];
@@ -22516,7 +24451,7 @@ var ts;
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227) {
+ if (declaration.kind === 229) {
if (declaration.flags & 64) {
return false;
}
@@ -22549,7 +24484,7 @@ var ts;
type.outerTypeParameters = outerTypeParameters;
type.localTypeParameters = localTypeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -22566,7 +24501,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 285);
+ var declaration = ts.getDeclarationOfKind(symbol, 289);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -22577,7 +24512,7 @@ var ts;
}
}
else {
- declaration = ts.getDeclarationOfKind(symbol, 228);
+ declaration = ts.getDeclarationOfKind(symbol, 230);
type = getTypeFromTypeNode(declaration.type);
}
if (popTypeResolution()) {
@@ -22585,7 +24520,7 @@ var ts;
if (typeParameters) {
links.typeParameters = typeParameters;
links.instantiations = ts.createMap();
- links.instantiations[getTypeListId(typeParameters)] = type;
+ links.instantiations.set(getTypeListId(typeParameters), type);
}
}
else {
@@ -22602,14 +24537,14 @@ var ts;
return !ts.isInAmbientContext(member);
}
return expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8 ||
- expr.kind === 70 && !!symbol.exports[expr.text];
+ expr.kind === 70 && !!symbol.exports.get(expr.text);
}
function enumHasLiteralMembers(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
if (!isLiteralEnumMember(symbol, member)) {
@@ -22634,10 +24569,10 @@ var ts;
enumType.symbol = symbol;
if (enumHasLiteralMembers(symbol)) {
var memberTypeList = [];
- var memberTypes = ts.createMap();
+ var memberTypes = [];
for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
computeEnumMemberValues(declaration);
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
@@ -22654,7 +24589,7 @@ var ts;
if (memberTypeList.length > 1) {
enumType.flags |= 65536;
enumType.types = memberTypeList;
- unionTypes[getTypeListId(memberTypeList)] = enumType;
+ unionTypes.set(getTypeListId(memberTypeList), enumType);
}
}
}
@@ -22675,9 +24610,6 @@ var ts;
if (!links.declaredType) {
var type = createType(16384);
type.symbol = symbol;
- if (!ts.getDeclarationOfKind(symbol, 143).constraint) {
- type.constraint = noConstraintType;
- }
links.declaredType = type;
}
return links.declaredType;
@@ -22690,7 +24622,6 @@ var ts;
return links.declaredType;
}
function getDeclaredTypeOfSymbol(symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0);
if (symbol.flags & (32 | 64)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
@@ -22725,19 +24656,20 @@ var ts;
function isIndependentType(node) {
switch (node.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
+ case 133:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 171:
+ case 172:
return true;
- case 162:
+ case 163:
return isIndependentType(node.elementType);
- case 157:
+ case 158:
return isIndependentTypeReference(node);
}
return false;
@@ -22746,7 +24678,7 @@ var ts;
return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 150 && (!node.type || !isIndependentType(node.type))) {
+ if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) {
return false;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
@@ -22762,12 +24694,12 @@ var ts;
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
return isIndependentVariableLikeDeclaration(declaration);
- case 149:
- case 148:
case 150:
+ case 149:
+ case 151:
return isIndependentFunctionLikeDeclaration(declaration);
}
}
@@ -22778,7 +24710,7 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
- result[symbol.name] = symbol;
+ result.set(symbol.name, symbol);
}
return result;
}
@@ -22786,15 +24718,15 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
- result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper);
+ result.set(symbol.name, mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper));
}
return result;
}
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
- if (!symbols[s.name]) {
- symbols[s.name] = s;
+ if (!symbols.has(s.name)) {
+ symbols.set(s.name, s);
}
}
}
@@ -22802,8 +24734,8 @@ var ts;
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
- type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
- type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
+ type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members.get("__call"));
+ type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members.get("__new"));
type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
}
@@ -22811,7 +24743,14 @@ var ts;
}
function getTypeWithThisArgument(type, thisArgument) {
if (getObjectFlags(type) & 4) {
- return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
+ var target = type.target;
+ var typeArguments = type.typeArguments;
+ if (ts.length(target.typeParameters) === ts.length(typeArguments)) {
+ return createTypeReference(target, ts.concatenate(typeArguments, [thisArgument || target.thisType]));
+ }
+ }
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, function (t) { return getTypeWithThisArgument(t, thisArgument); }));
}
return type;
}
@@ -22847,10 +24786,14 @@ var ts;
for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
var baseType = baseTypes_1[_i];
var instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;
- addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
+ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0));
constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1));
- stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0);
+ if (!stringIndexInfo) {
+ stringIndexInfo = instantiatedBaseType === anyType ?
+ createIndexInfo(anyType, false) :
+ getIndexInfoOfType(instantiatedBaseType, 0);
+ }
numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1);
}
}
@@ -22889,14 +24832,16 @@ var ts;
return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, undefined, 0, false, false)];
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
+ var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
- var typeArgCount = typeArguments ? typeArguments.length : 0;
+ var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var baseSig = baseSignatures_1[_i];
- var typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0;
- if (typeParamCount === typeArgCount) {
- var sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig);
+ var minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);
+ var typeParamCount = ts.length(baseSig.typeParameters);
+ if ((isJavaScript || typeArgCount >= minTypeArgumentCount) && typeArgCount <= typeParamCount) {
+ var sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, baseTypeNode)) : cloneSignature(baseSig);
sig.typeParameters = classType.localTypeParameters;
sig.resolvedReturnType = classType;
result.push(sig);
@@ -22950,7 +24895,7 @@ var ts;
s = cloneSignature(signature);
if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) {
var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), true);
- s.thisParameter = createTransientSymbol(signature.thisParameter, thisType);
+ s.thisParameter = createSymbolWithType(signature.thisParameter, thisType);
}
s.resolvedReturnType = undefined;
s.unionSignatures = unionSignatures;
@@ -22965,8 +24910,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
- var type = types_1[_i];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type = types_2[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -22992,17 +24937,44 @@ var ts;
function unionSpreadIndexInfos(info1, info2) {
return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
}
+ function includeMixinType(type, types, index) {
+ var mixedTypes = [];
+ for (var i = 0; i < types.length; i++) {
+ if (i === index) {
+ mixedTypes.push(type);
+ }
+ else if (isMixinConstructorType(types[i])) {
+ mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1)[0]));
+ }
+ }
+ return getIntersectionType(mixedTypes);
+ }
function resolveIntersectionTypeMembers(type) {
var callSignatures = emptyArray;
var constructSignatures = emptyArray;
- var stringIndexInfo = undefined;
- var numberIndexInfo = undefined;
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var t = _a[_i];
+ var stringIndexInfo;
+ var numberIndexInfo;
+ var types = type.types;
+ var mixinCount = ts.countWhere(types, isMixinConstructorType);
+ var _loop_3 = function (i) {
+ var t = type.types[i];
+ if (mixinCount === 0 || mixinCount === types.length && i === 0 || !isMixinConstructorType(t)) {
+ var signatures = getSignaturesOfType(t, 1);
+ if (signatures.length && mixinCount > 0) {
+ signatures = ts.map(signatures, function (s) {
+ var clone = cloneSignature(s);
+ clone.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, i);
+ return clone;
+ });
+ }
+ constructSignatures = ts.concatenate(constructSignatures, signatures);
+ }
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0));
- constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1));
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0));
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1));
+ };
+ for (var i = 0; i < types.length; i++) {
+ _loop_3(i);
}
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
}
@@ -23018,8 +24990,8 @@ var ts;
}
else if (symbol.flags & 2048) {
var members = symbol.members;
- var callSignatures = getSignaturesOfSymbol(members["__call"]);
- var constructSignatures = getSignaturesOfSymbol(members["__new"]);
+ var callSignatures = getSignaturesOfSymbol(members.get("__call"));
+ var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
@@ -23027,23 +24999,27 @@ var ts;
else {
var members = emptySymbols;
var constructSignatures = emptyArray;
- if (symbol.flags & 1952) {
+ var stringIndexInfo = undefined;
+ if (symbol.exports) {
members = getExportsOfSymbol(symbol);
}
if (symbol.flags & 32) {
var classType = getDeclaredTypeOfClassOrInterface(symbol);
- constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
+ constructSignatures = getSignaturesOfSymbol(symbol.members.get("__constructor"));
if (!constructSignatures.length) {
constructSignatures = getDefaultConstructSignatures(classType);
}
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072 | 540672)) {
members = createSymbolTable(getNamedMembers(members));
- addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType));
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
+ }
+ else if (baseConstructorType === anyType) {
+ stringIndexInfo = createIndexInfo(anyType, false);
}
}
var numberIndexInfo = symbol.flags & 384 ? enumNumberIndexInfo : undefined;
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo);
+ setStructuredTypeMembers(type, members, emptyArray, constructSignatures, stringIndexInfo, numberIndexInfo);
if (symbol.flags & (16 | 8192)) {
type.callSignatures = getSignaturesOfSymbol(symbol);
}
@@ -23052,37 +25028,48 @@ var ts;
function resolveMappedTypeMembers(type) {
var members = ts.createMap();
var stringIndexInfo;
- var numberIndexInfo;
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var typeParameter = getTypeParameterFromMappedType(type);
var constraintType = getConstraintTypeFromMappedType(type);
var templateType = getTemplateTypeFromMappedType(type);
- var isReadonly = !!type.declaration.readonlyToken;
- var isOptional = !!type.declaration.questionToken;
- var keyType = constraintType.flags & 16384 ? getApparentType(constraintType) : constraintType;
- var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
- forEachType(iterationType, function (t) {
- var iterationMapper = createUnaryTypeMapper(typeParameter, t);
+ var modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
+ var templateReadonly = !!type.declaration.readonlyToken;
+ var templateOptional = !!type.declaration.questionToken;
+ if (type.declaration.typeParameter.constraint.kind === 169) {
+ for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
+ var propertySymbol = _a[_i];
+ addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol);
+ }
+ if (getIndexInfoOfType(modifiersType, 0)) {
+ addMemberForKeyType(stringType);
+ }
+ }
+ else {
+ var keyType = constraintType.flags & 540672 ? getApparentType(constraintType) : constraintType;
+ var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
+ forEachType(iterationType, addMemberForKeyType);
+ }
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
+ function addMemberForKeyType(t, propertySymbol) {
+ var iterationMapper = createTypeMapper([typeParameter], [t]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
- if (t.flags & (32 | 64 | 256)) {
+ if (t.flags & 32) {
var propName = t.text;
- var prop = createSymbol(4 | 67108864 | (isOptional ? 536870912 : 0), propName);
- prop.type = addOptionality(propType, isOptional);
- prop.isReadonly = isReadonly;
- members[propName] = prop;
+ var modifiersProp = getPropertyOfType(modifiersType, propName);
+ var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
+ var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
+ prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? 8 : 0;
+ prop.type = propType;
+ if (propertySymbol) {
+ prop.syntheticOrigin = propertySymbol;
+ }
+ members.set(propName, prop);
}
else if (t.flags & 2) {
- stringIndexInfo = createIndexInfo(propType, isReadonly);
+ stringIndexInfo = createIndexInfo(propType, templateReadonly);
}
- else if (t.flags & 4) {
- numberIndexInfo = createIndexInfo(propType, isReadonly);
- }
- });
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
- numberIndexInfo = undefined;
}
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
function getTypeParameterFromMappedType(type) {
return type.typeParameter ||
@@ -23095,16 +25082,28 @@ var ts;
function getTemplateTypeFromMappedType(type) {
return type.templateType ||
(type.templateType = type.declaration.type ?
- instantiateType(getTypeFromTypeNode(type.declaration.type), type.mapper || identityMapper) :
+ instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!type.declaration.questionToken), type.mapper || identityMapper) :
unknownType);
}
- function getErasedTemplateTypeFromMappedType(type) {
- return instantiateType(getTemplateTypeFromMappedType(type), createUnaryTypeMapper(getTypeParameterFromMappedType(type), anyType));
+ function getModifiersTypeFromMappedType(type) {
+ if (!type.modifiersType) {
+ var constraintDeclaration = type.declaration.typeParameter.constraint;
+ if (constraintDeclaration.kind === 169) {
+ type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper);
+ }
+ else {
+ var declaredType = getTypeFromMappedTypeNode(type.declaration);
+ var constraint = getConstraintTypeFromMappedType(declaredType);
+ var extendedConstraint = constraint && constraint.flags & 16384 ? getConstraintOfTypeParameter(constraint) : constraint;
+ type.modifiersType = extendedConstraint && extendedConstraint.flags & 262144 ? instantiateType(extendedConstraint.type, type.mapper || identityMapper) : emptyObjectType;
+ }
+ }
+ return type.modifiersType;
}
function isGenericMappedType(type) {
if (getObjectFlags(type) & 32) {
var constraintType = getConstraintTypeFromMappedType(type);
- return !!(constraintType.flags & (16384 | 262144));
+ return maybeTypeOfKind(constraintType, 540672 | 262144);
}
return false;
}
@@ -23142,35 +25141,33 @@ var ts;
function getPropertyOfObjectType(type, name) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
}
}
function getPropertiesOfUnionOrIntersectionType(type) {
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var current = _a[_i];
- for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
- var prop = _c[_b];
- getUnionOrIntersectionProperty(type, prop.name);
- }
- if (type.flags & 65536) {
- break;
- }
- }
- var props = type.resolvedProperties;
- if (props) {
- var result = [];
- for (var key in props) {
- var prop = props[key];
- if (!(prop.flags & 268435456 && prop.isPartial)) {
- result.push(prop);
+ if (!type.resolvedProperties) {
+ var members = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var current = _a[_i];
+ for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
+ var prop = _c[_b];
+ if (!members.has(prop.name)) {
+ var combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.name);
+ if (combinedProp) {
+ members.set(prop.name, combinedProp);
+ }
+ }
+ }
+ if (type.flags & 65536) {
+ break;
}
}
- return result;
+ type.resolvedProperties = getNamedMembers(members);
}
- return emptyArray;
+ return type.resolvedProperties;
}
function getPropertiesOfType(type) {
type = getApparentType(type);
@@ -23178,41 +25175,126 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
- function getApparentTypeOfTypeParameter(type) {
- if (!type.resolvedApparentType) {
- var constraintType = getConstraintOfTypeParameter(type);
- while (constraintType && constraintType.flags & 16384) {
- constraintType = getConstraintOfTypeParameter(constraintType);
+ function getConstraintOfType(type) {
+ return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
+ type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
+ getBaseConstraintOfType(type);
+ }
+ function getConstraintOfTypeParameter(typeParameter) {
+ return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined;
+ }
+ function getConstraintOfIndexedAccess(type) {
+ var baseObjectType = getBaseConstraintOfType(type.objectType);
+ var baseIndexType = getBaseConstraintOfType(type.indexType);
+ return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined;
+ }
+ function getBaseConstraintOfType(type) {
+ if (type.flags & (540672 | 196608)) {
+ var constraint = getResolvedBaseConstraint(type);
+ if (constraint !== noConstraintType && constraint !== circularConstraintType) {
+ return constraint;
}
- type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
}
- return type.resolvedApparentType;
+ else if (type.flags & 262144) {
+ return stringType;
+ }
+ return undefined;
}
- function getApparentTypeOfIndexedAccess(type) {
- return getIndexTypeOfType(getApparentType(type.objectType), 0) || type;
+ function hasNonCircularBaseConstraint(type) {
+ return getResolvedBaseConstraint(type) !== circularConstraintType;
+ }
+ function getResolvedBaseConstraint(type) {
+ var typeStack;
+ var circular;
+ if (!type.resolvedBaseConstraint) {
+ typeStack = [];
+ var constraint = getBaseConstraint(type);
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType, type);
+ }
+ return type.resolvedBaseConstraint;
+ function getBaseConstraint(t) {
+ if (ts.contains(typeStack, t)) {
+ circular = true;
+ return undefined;
+ }
+ typeStack.push(t);
+ var result = computeBaseConstraint(t);
+ typeStack.pop();
+ return result;
+ }
+ function computeBaseConstraint(t) {
+ if (t.flags & 16384) {
+ var constraint = getConstraintFromTypeParameter(t);
+ return t.isThisType ? constraint :
+ constraint ? getBaseConstraint(constraint) : undefined;
+ }
+ if (t.flags & 196608) {
+ var types = t.types;
+ var baseTypes = [];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var type_2 = types_3[_i];
+ var baseType = getBaseConstraint(type_2);
+ if (baseType) {
+ baseTypes.push(baseType);
+ }
+ }
+ return t.flags & 65536 && baseTypes.length === types.length ? getUnionType(baseTypes) :
+ t.flags & 131072 && baseTypes.length ? getIntersectionType(baseTypes) :
+ undefined;
+ }
+ if (t.flags & 262144) {
+ return stringType;
+ }
+ if (t.flags & 524288) {
+ var baseObjectType = getBaseConstraint(t.objectType);
+ var baseIndexType = getBaseConstraint(t.indexType);
+ var baseIndexedAccess = baseObjectType && baseIndexType ? getIndexedAccessType(baseObjectType, baseIndexType) : undefined;
+ return baseIndexedAccess && baseIndexedAccess !== unknownType ? getBaseConstraint(baseIndexedAccess) : undefined;
+ }
+ return t;
+ }
+ }
+ function getApparentTypeOfIntersectionType(type) {
+ return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type));
+ }
+ function getDefaultFromTypeParameter(typeParameter) {
+ if (!typeParameter.default) {
+ if (typeParameter.target) {
+ var targetDefault = getDefaultFromTypeParameter(typeParameter.target);
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;
+ }
+ else {
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameter(decl) && decl.default; });
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
+ }
+ }
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
}
function getApparentType(type) {
- var t = type.flags & 16384 ? getApparentTypeOfTypeParameter(type) :
- type.flags & 524288 ? getApparentTypeOfIndexedAccess(type) :
- type;
- return t.flags & 262178 ? globalStringType :
- t.flags & 340 ? globalNumberType :
- t.flags & 136 ? globalBooleanType :
- t.flags & 512 ? getGlobalESSymbolType() :
- t;
+ var t = type.flags & 540672 ? getBaseConstraintOfType(type) || emptyObjectType : type;
+ return t.flags & 131072 ? getApparentTypeOfIntersectionType(t) :
+ t.flags & 262178 ? globalStringType :
+ t.flags & 340 ? globalNumberType :
+ t.flags & 136 ? globalBooleanType :
+ t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
+ t.flags & 16777216 ? emptyObjectType :
+ t;
}
function createUnionOrIntersectionProperty(containingType, name) {
- var types = containingType.types;
var props;
- var commonFlags = (containingType.flags & 131072) ? 536870912 : 0;
- var isReadonly = false;
- var isPartial = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var current = types_2[_i];
+ var types = containingType.types;
+ var isUnion = containingType.flags & 65536;
+ var excludeModifiers = isUnion ? 24 : 0;
+ var commonFlags = isUnion ? 0 : 67108864;
+ var syntheticFlag = 4;
+ var checkFlags = 0;
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var current = types_4[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- if (prop && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16))) {
+ var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
props = [prop];
@@ -23220,25 +25302,29 @@ var ts;
else if (!ts.contains(props, prop)) {
props.push(prop);
}
- if (isReadonlySymbol(prop)) {
- isReadonly = true;
+ checkFlags |= (isReadonlySymbol(prop) ? 8 : 0) |
+ (!(modifiers & 24) ? 64 : 0) |
+ (modifiers & 16 ? 128 : 0) |
+ (modifiers & 8 ? 256 : 0) |
+ (modifiers & 32 ? 512 : 0);
+ if (!isMethodLike(prop)) {
+ syntheticFlag = 2;
}
}
- else if (containingType.flags & 65536) {
- isPartial = true;
+ else if (isUnion) {
+ checkFlags |= 16;
}
}
}
if (!props) {
return undefined;
}
- if (props.length === 1 && !isPartial) {
+ if (props.length === 1 && !(checkFlags & 16)) {
return props[0];
}
var propTypes = [];
var declarations = [];
var commonType = undefined;
- var hasNonUniformType = false;
for (var _a = 0, props_1 = props; _a < props_1.length; _a++) {
var prop = props_1[_a];
if (prop.declarations) {
@@ -23249,39 +25335,37 @@ var ts;
commonType = type;
}
else if (type !== commonType) {
- hasNonUniformType = true;
+ checkFlags |= 32;
}
propTypes.push(type);
}
- var result = createSymbol(4 | 67108864 | 268435456 | commonFlags, name);
+ var result = createSymbol(4 | commonFlags, name);
+ result.checkFlags = syntheticFlag | checkFlags;
result.containingType = containingType;
- result.hasNonUniformType = hasNonUniformType;
- result.isPartial = isPartial;
result.declarations = declarations;
- result.isReadonly = isReadonly;
- result.type = containingType.flags & 65536 ? getUnionType(propTypes) : getIntersectionType(propTypes);
+ result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
return result;
}
function getUnionOrIntersectionProperty(type, name) {
- var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap());
- var property = properties[name];
+ var properties = type.propertyCache || (type.propertyCache = ts.createMap());
+ var property = properties.get(name);
if (!property) {
property = createUnionOrIntersectionProperty(type, name);
if (property) {
- properties[name] = property;
+ properties.set(name, property);
}
}
return property;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(property.flags & 268435456 && property.isPartial) ? property : undefined;
+ return property && !(getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
@@ -23340,7 +25424,7 @@ var ts;
return undefined;
}
function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var templateTag = ts.getJSDocTemplateTag(declaration);
if (templateTag) {
return getTypeParametersFromDeclaration(templateTag.typeParameters);
@@ -23360,16 +25444,16 @@ var ts;
}
function symbolsToArray(symbols) {
var result = [];
- for (var id in symbols) {
+ symbols.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
- result.push(symbols[id]);
+ result.push(symbol);
}
- }
+ });
return result;
}
function isJSDocOptionalParameter(node) {
- if (node.flags & 2097152) {
- if (node.type && node.type.kind === 273) {
+ if (node.flags & 65536) {
+ if (node.type && node.type.kind === 277) {
return true;
}
var paramTags = ts.getJSDocParameterTags(node);
@@ -23380,7 +25464,7 @@ var ts;
return true;
}
if (paramTag.typeExpression) {
- return paramTag.typeExpression.type.kind === 273;
+ return paramTag.typeExpression.type.kind === 277;
}
}
}
@@ -23404,6 +25488,12 @@ var ts;
ts.Debug.assert(parameterIndex >= 0);
return parameterIndex >= signature.minArgumentCount;
}
+ var iife = ts.getImmediatelyInvokedFunctionExpression(node.parent);
+ if (iife) {
+ return !node.type &&
+ !node.dotDotDotToken &&
+ ts.indexOf(node.parent.parameters, node) >= iife.arguments.length;
+ }
return false;
}
function createTypePredicateFromTypePredicateNode(node) {
@@ -23423,16 +25513,50 @@ var ts;
};
}
}
+ function getMinTypeArgumentCount(typeParameters) {
+ var minTypeArgumentCount = 0;
+ if (typeParameters) {
+ for (var i = 0; i < typeParameters.length; i++) {
+ if (!getDefaultFromTypeParameter(typeParameters[i])) {
+ minTypeArgumentCount = i + 1;
+ }
+ }
+ }
+ return minTypeArgumentCount;
+ }
+ function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, location) {
+ var numTypeParameters = ts.length(typeParameters);
+ if (numTypeParameters) {
+ var numTypeArguments = ts.length(typeArguments);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ if ((isJavaScript || numTypeArguments >= minTypeArgumentCount) && numTypeArguments <= numTypeParameters) {
+ if (!typeArguments) {
+ typeArguments = [];
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ typeArguments[i] = isJavaScript ? anyType : emptyObjectType;
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ var mapper = createTypeMapper(typeParameters, typeArguments);
+ var defaultType = getDefaultFromTypeParameter(typeParameters[i]);
+ typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : isJavaScript ? anyType : emptyObjectType;
+ }
+ }
+ }
+ return typeArguments;
+ }
function getSignatureFromDeclaration(declaration) {
var links = getNodeLinks(declaration);
if (!links.resolvedSignature) {
var parameters = [];
var hasLiteralTypes = false;
- var minArgumentCount = -1;
+ var minArgumentCount = 0;
var thisParameter = undefined;
var hasThisParameter = void 0;
+ var iife = ts.getImmediatelyInvokedFunctionExpression(declaration);
var isJSConstructSignature = ts.isJSDocConstructSignature(declaration);
- for (var i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) {
+ var isUntypedSignatureInJSFile = !iife && !isJSConstructSignature && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration);
+ for (var i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
var param = declaration.parameters[i];
var paramSymbol = param.symbol;
if (paramSymbol && !!(paramSymbol.flags & 4) && !ts.isBindingPattern(param.name)) {
@@ -23446,41 +25570,34 @@ var ts;
else {
parameters.push(paramSymbol);
}
- if (param.type && param.type.kind === 171) {
+ if (param.type && param.type.kind === 172) {
hasLiteralTypes = true;
}
- if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {
- if (minArgumentCount < 0) {
- minArgumentCount = i - (hasThisParameter ? 1 : 0);
- }
- }
- else {
- minArgumentCount = -1;
+ var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken ||
+ iife && parameters.length > iife.arguments.length && !param.type ||
+ isJSDocOptionalParameter(param) ||
+ isUntypedSignatureInJSFile;
+ if (!isOptionalParameter_1) {
+ minArgumentCount = parameters.length;
}
}
- if ((declaration.kind === 151 || declaration.kind === 152) &&
+ if ((declaration.kind === 152 || declaration.kind === 153) &&
!ts.hasDynamicName(declaration) &&
(!hasThisParameter || !thisParameter)) {
- var otherKind = declaration.kind === 151 ? 152 : 151;
+ var otherKind = declaration.kind === 152 ? 153 : 152;
var other = ts.getDeclarationOfKind(declaration.symbol, otherKind);
if (other) {
thisParameter = getAnnotatedAccessorThisParameter(other);
}
}
- if (minArgumentCount < 0) {
- minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0);
- }
- if (isJSConstructSignature) {
- minArgumentCount--;
- }
- var classType = declaration.kind === 150 ?
+ var classType = declaration.kind === 151 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
var typeParameters = classType ? classType.localTypeParameters :
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
getTypeParametersFromJSDocTemplate(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
- var typePredicate = declaration.type && declaration.type.kind === 156 ?
+ var typePredicate = declaration.type && declaration.type.kind === 157 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
@@ -23497,41 +25614,69 @@ var ts;
else if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var type = getReturnTypeFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.kind === 151 && !ts.hasDynamicName(declaration)) {
- var setter = ts.getDeclarationOfKind(declaration.symbol, 152);
+ if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) {
+ var setter = ts.getDeclarationOfKind(declaration.symbol, 153);
return getAnnotatedAccessorType(setter);
}
if (ts.nodeIsMissing(declaration.body)) {
return anyType;
}
}
+ function containsArgumentsReference(declaration) {
+ var links = getNodeLinks(declaration);
+ if (links.containsArgumentsReference === undefined) {
+ if (links.flags & 8192) {
+ links.containsArgumentsReference = true;
+ }
+ else {
+ links.containsArgumentsReference = traverse(declaration.body);
+ }
+ }
+ return links.containsArgumentsReference;
+ function traverse(node) {
+ if (!node)
+ return false;
+ switch (node.kind) {
+ case 70:
+ return node.text === "arguments" && ts.isPartOfExpression(node);
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ return node.name.kind === 143
+ && traverse(node.name);
+ default:
+ return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse);
+ }
+ }
+ }
function getSignaturesOfSymbol(symbol) {
if (!symbol)
return emptyArray;
var result = [];
- for (var i = 0, len = symbol.declarations.length; i < len; i++) {
+ for (var i = 0; i < symbol.declarations.length; i++) {
var node = symbol.declarations[i];
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 274:
+ case 186:
+ case 278:
if (i > 0 && node.body) {
var previous = symbol.declarations[i - 1];
if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) {
@@ -23575,7 +25720,7 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
var declaration = signature.declaration;
if (declaration.name) {
error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
@@ -23599,9 +25744,14 @@ var ts;
return anyType;
}
function getSignatureInstantiation(signature, typeArguments) {
+ typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters));
var instantiations = signature.instantiations || (signature.instantiations = ts.createMap());
var id = getTypeListId(typeArguments);
- return instantiations[id] || (instantiations[id] = createSignatureInstantiation(signature, typeArguments));
+ var instantiation = instantiations.get(id);
+ if (!instantiation) {
+ instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
+ }
+ return instantiation;
}
function createSignatureInstantiation(signature, typeArguments) {
return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true);
@@ -23616,7 +25766,7 @@ var ts;
}
function getOrCreateTypeFromSignature(signature) {
if (!signature.isolatedSignatureType) {
- var isConstructor = signature.declaration.kind === 150 || signature.declaration.kind === 154;
+ var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155;
var type = createObjectType(16);
type.members = emptySymbols;
type.properties = emptyArray;
@@ -23627,10 +25777,10 @@ var ts;
return signature.isolatedSignatureType;
}
function getIndexSymbol(symbol) {
- return symbol.members["__index"];
+ return symbol.members.get("__index");
}
function getIndexDeclarationOfSymbol(symbol, kind) {
- var syntaxKind = kind === 1 ? 132 : 134;
+ var syntaxKind = kind === 1 ? 132 : 135;
var indexSymbol = getIndexSymbol(symbol);
if (indexSymbol) {
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
@@ -23657,21 +25807,9 @@ var ts;
return undefined;
}
function getConstraintDeclaration(type) {
- return ts.getDeclarationOfKind(type.symbol, 143).constraint;
- }
- function hasConstraintReferenceTo(type, target) {
- var checked;
- while (type && type.flags & 16384 && !(type.isThisType) && !ts.contains(checked, type)) {
- if (type === target) {
- return true;
- }
- (checked || (checked = [])).push(type);
- var constraintDeclaration = getConstraintDeclaration(type);
- type = constraintDeclaration && getTypeFromTypeNode(constraintDeclaration);
- }
- return false;
+ return ts.getDeclarationOfKind(type.symbol, 144).constraint;
}
- function getConstraintOfTypeParameter(typeParameter) {
+ function getConstraintFromTypeParameter(typeParameter) {
if (!typeParameter.constraint) {
if (typeParameter.target) {
var targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
@@ -23679,28 +25817,23 @@ var ts;
}
else {
var constraintDeclaration = getConstraintDeclaration(typeParameter);
- var constraint = getTypeFromTypeNode(constraintDeclaration);
- if (hasConstraintReferenceTo(constraint, typeParameter)) {
- error(constraintDeclaration, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
- constraint = unknownType;
- }
- typeParameter.constraint = constraint;
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType;
}
}
return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
}
function getParentSymbolOfTypeParameter(typeParameter) {
- return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 143).parent);
+ return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent);
}
function getTypeListId(types) {
var result = "";
if (types) {
- var length_3 = types.length;
+ var length_4 = types.length;
var i = 0;
- while (i < length_3) {
+ while (i < length_4) {
var startId = types[i].id;
var count = 1;
- while (i + count < length_3 && types[i + count].id === startId + count) {
+ while (i + count < length_4 && types[i + count].id === startId + count) {
count++;
}
if (result.length) {
@@ -23717,8 +25850,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
- var type = types_3[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -23727,9 +25860,10 @@ var ts;
}
function createTypeReference(target, typeArguments) {
var id = getTypeListId(typeArguments);
- var type = target.instantiations[id];
+ var type = target.instantiations.get(id);
if (!type) {
- type = target.instantiations[id] = createObjectType(4, target.symbol);
+ type = createObjectType(4, target.symbol);
+ target.instantiations.set(id, type);
type.flags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, 0) : 0;
type.target = target;
type.typeArguments = typeArguments;
@@ -23745,17 +25879,22 @@ var ts;
return type;
}
function getTypeReferenceArity(type) {
- return type.target.typeParameters ? type.target.typeParameters.length : 0;
+ return ts.length(type.target.typeParameters);
}
function getTypeFromClassOrInterfaceReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (!ts.isInJavaScriptFile(node) && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode)));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
@@ -23768,14 +25907,22 @@ var ts;
var links = getSymbolLinks(symbol);
var typeParameters = links.typeParameters;
var id = getTypeListId(typeArguments);
- return links.instantiations[id] || (links.instantiations[id] = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments)));
+ var instantiation = links.instantiations.get(id);
+ if (!instantiation) {
+ links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters)))));
+ }
+ return instantiation;
}
function getTypeFromTypeAliasReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode);
@@ -23796,11 +25943,11 @@ var ts;
}
function getTypeReferenceName(node) {
switch (node.kind) {
- case 157:
+ case 158:
return node.typeName;
- case 272:
+ case 276:
return node.name;
- case 199:
+ case 200:
var expr = node.expression;
if (ts.isEntityNameExpression(expr)) {
return expr;
@@ -23824,23 +25971,58 @@ var ts;
if (symbol.flags & 524288) {
return getTypeFromTypeAliasReference(node, symbol);
}
- if (symbol.flags & 107455 && node.kind === 272) {
+ if (symbol.flags & 107455 && node.kind === 276) {
return getTypeOfSymbol(symbol);
}
return getTypeFromNonGenericTypeReference(node, symbol);
}
+ function getPrimitiveTypeFromJSDocTypeReference(node) {
+ if (ts.isIdentifier(node.name)) {
+ switch (node.name.text) {
+ case "String":
+ return stringType;
+ case "Number":
+ return numberType;
+ case "Boolean":
+ return booleanType;
+ case "Void":
+ return voidType;
+ case "Undefined":
+ return undefinedType;
+ case "Null":
+ return nullType;
+ case "Object":
+ return anyType;
+ case "Function":
+ return anyFunctionType;
+ case "Array":
+ case "array":
+ return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
+ case "Promise":
+ case "promise":
+ return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
+ }
+ }
+ }
+ function getTypeFromJSDocNullableTypeNode(node) {
+ var type = getTypeFromTypeNode(node.type);
+ return strictNullChecks ? getUnionType([type, nullType]) : type;
+ }
function getTypeFromTypeReference(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
- if (node.kind === 272) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
+ if (node.kind === 276) {
+ type = getPrimitiveTypeFromJSDocTypeReference(node);
+ if (!type) {
+ var typeReferenceName = getTypeReferenceName(node);
+ symbol = resolveTypeReferenceName(typeReferenceName);
+ type = getTypeReferenceType(node, symbol);
+ }
}
else {
- var typeNameOrExpression = node.kind === 157
+ var typeNameOrExpression = node.kind === 158
? node.typeName
: ts.isEntityNameExpression(node.expression)
? node.expression
@@ -23866,12 +26048,12 @@ var ts;
function getTypeOfGlobalSymbol(symbol, arity) {
function getTypeDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
- var declaration = declarations_3[_i];
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+ var declaration = declarations_4[_i];
switch (declaration.kind) {
- case 226:
- case 227:
+ case 228:
case 229:
+ case 231:
return declaration;
}
}
@@ -23884,44 +26066,91 @@ var ts;
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
return arity ? emptyGenericType : emptyObjectType;
}
- if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
+ if (ts.length(type.typeParameters) !== arity) {
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
return arity ? emptyGenericType : emptyObjectType;
}
return type;
}
- function getGlobalValueSymbol(name) {
- return getGlobalSymbol(name, 107455, ts.Diagnostics.Cannot_find_global_value_0);
+ function getGlobalValueSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 107455, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined);
}
- function getGlobalTypeSymbol(name) {
- return getGlobalSymbol(name, 793064, ts.Diagnostics.Cannot_find_global_type_0);
+ function getGlobalTypeSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 793064, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
}
function getGlobalSymbol(name, meaning, diagnostic) {
return resolveName(undefined, name, meaning, diagnostic, name);
}
- function getGlobalType(name, arity) {
+ function getGlobalType(name, arity, reportErrors) {
+ var symbol = getGlobalTypeSymbol(name, reportErrors);
+ return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
+ }
+ function getGlobalTypedPropertyDescriptorType() {
+ return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", 1, true)) || emptyGenericType;
+ }
+ function getGlobalTemplateStringsArrayType() {
+ return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", 0, true)) || emptyObjectType;
+ }
+ function getGlobalESSymbolConstructorSymbol(reportErrors) {
+ return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
+ }
+ function getGlobalESSymbolType(reportErrors) {
+ return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalPromiseType(reportErrors) {
+ return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalPromiseConstructorSymbol(reportErrors) {
+ return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
+ }
+ function getGlobalPromiseConstructorLikeType(reportErrors) {
+ return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalAsyncIterableType(reportErrors) {
+ return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIteratorType(reportErrors) {
+ return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIterableIteratorType(reportErrors) {
+ return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableType(reportErrors) {
+ return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIteratorType(reportErrors) {
+ return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableIteratorType(reportErrors) {
+ return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalTypeOrUndefined(name, arity) {
if (arity === void 0) { arity = 0; }
- return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
+ var symbol = getGlobalSymbol(name, 793064, undefined);
+ return symbol && getTypeOfGlobalSymbol(symbol, arity);
}
function getExportedTypeFromNamespace(namespace, name) {
var namespaceSymbol = getGlobalSymbol(namespace, 1920, undefined);
var typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, 793064);
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
- function createTypedPropertyDescriptorType(propertyType) {
- var globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
- return globalTypedPropertyDescriptorType !== emptyGenericType
- ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType])
- : emptyObjectType;
- }
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
}
- function createIterableType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]);
+ function createTypedPropertyDescriptorType(propertyType) {
+ return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);
}
- function createIterableIteratorType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]);
+ function createAsyncIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(true), [iteratedType]);
+ }
+ function createAsyncIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(true), [iteratedType]);
+ }
+ function createIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableType(true), [iteratedType]);
+ }
+ function createIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(true), [iteratedType]);
}
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
@@ -23939,7 +26168,7 @@ var ts;
for (var i = 0; i < arity; i++) {
var typeParameter = createType(16384);
typeParameters.push(typeParameter);
- var property = createSymbol(4 | 67108864, "" + i);
+ var property = createSymbol(4, "" + i);
property.type = typeParameter;
properties.push(property);
}
@@ -23948,7 +26177,7 @@ var ts;
type.outerTypeParameters = undefined;
type.localTypeParameters = typeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -24030,14 +26259,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
- var type = types_4[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var type = types_6[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var t = types_5[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var t = types_7[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -24045,8 +26274,9 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var i = 0, len = types.length; i < len; i++) {
- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
+ if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
}
@@ -24124,10 +26354,11 @@ var ts;
return types[0];
}
var id = getTypeListId(types);
- var type = unionTypes[id];
+ var type = unionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(types, 6144);
- type = unionTypes[id] = createType(65536 | propagatedFlags);
+ type = createType(65536 | propagatedFlags);
+ unionTypes.set(id, type);
type.types = types;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -24148,13 +26379,25 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
+ typeSet.containsEmptyObject = true;
+ }
else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
- typeSet.push(type);
+ if (type.flags & 32768) {
+ typeSet.containsObjectType = true;
+ }
+ if (type.flags & 65536 && typeSet.unionIndex === undefined) {
+ typeSet.unionIndex = typeSet.length;
+ }
+ if (!(type.flags & 32768 && type.objectFlags & 16 &&
+ type.symbol && type.symbol.flags & (16 | 8192) && containsIdenticalType(typeSet, type))) {
+ typeSet.push(type);
+ }
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var type = types_9[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -24162,30 +26405,28 @@ var ts;
if (types.length === 0) {
return emptyObjectType;
}
- var _loop_2 = function (i) {
- var type_1 = types[i];
- if (type_1.flags & 65536) {
- return { value: getUnionType(ts.map(type_1.types, function (t) { return getIntersectionType(ts.replaceElement(types, i, t)); }), false, aliasSymbol, aliasTypeArguments) };
- }
- };
- for (var i = 0; i < types.length; i++) {
- var state_2 = _loop_2(i);
- if (typeof state_2 === "object")
- return state_2.value;
- }
var typeSet = [];
addTypesToIntersection(typeSet, types);
if (typeSet.containsAny) {
return anyType;
}
+ if (typeSet.containsEmptyObject && !typeSet.containsObjectType) {
+ typeSet.push(emptyObjectType);
+ }
if (typeSet.length === 1) {
return typeSet[0];
}
+ var unionIndex = typeSet.unionIndex;
+ if (unionIndex !== undefined) {
+ var unionType = typeSet[unionIndex];
+ return getUnionType(ts.map(unionType.types, function (t) { return getIntersectionType(ts.replaceElement(typeSet, unionIndex, t)); }), false, aliasSymbol, aliasTypeArguments);
+ }
var id = getTypeListId(typeSet);
- var type = intersectionTypes[id];
+ var type = intersectionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, 6144);
- type = intersectionTypes[id] = createType(131072 | propagatedFlags);
+ type = createType(131072 | propagatedFlags);
+ intersectionTypes.set(id, type);
type.types = typeSet;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -24199,7 +26440,7 @@ var ts;
}
return links.resolvedType;
}
- function getIndexTypeForTypeParameter(type) {
+ function getIndexTypeForGenericType(type) {
if (!type.resolvedIndexType) {
type.resolvedIndexType = createType(262144);
type.resolvedIndexType.type = type;
@@ -24215,7 +26456,7 @@ var ts;
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
}
function getIndexType(type) {
- return type.flags & 16384 ? getIndexTypeForTypeParameter(type) :
+ return maybeTypeOfKind(type, 540672) ? getIndexTypeForGenericType(type) :
getObjectFlags(type) & 32 ? getConstraintTypeFromMappedType(type) :
type.flags & 1 || getIndexInfoOfType(type, 0) ? stringType :
getLiteralTypeFromPropertyNames(type);
@@ -24238,7 +26479,7 @@ var ts;
return type;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
var propName = indexType.flags & (32 | 64 | 256) ?
indexType.text :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
@@ -24267,14 +26508,14 @@ var ts;
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
- if (accessExpression && ts.isAssignmentTarget(accessExpression) && indexInfo.isReadonly) {
+ if (accessExpression && indexInfo.isReadonly && (ts.isAssignmentTarget(accessExpression) || ts.isDeleteTarget(accessExpression))) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
return unknownType;
}
return indexInfo.type;
}
if (accessExpression && !isConstEnumObjectType(objectType)) {
- if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
+ if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
if (getIndexTypeOfType(objectType, 1)) {
error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
}
@@ -24286,7 +26527,7 @@ var ts;
}
}
if (accessNode) {
- var indexNode = accessNode.kind === 178 ? accessNode.argumentExpression : accessNode.indexType;
+ var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType;
if (indexType.flags & (32 | 64)) {
error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType));
}
@@ -24296,34 +26537,36 @@ var ts;
else {
error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
}
+ return unknownType;
}
- return unknownType;
+ return anyType;
}
function getIndexedAccessForMappedType(type, indexType, accessNode) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type));
return unknownType;
}
- var mapper = createUnaryTypeMapper(getTypeParameterFromMappedType(type), indexType);
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(type)], [indexType]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, mapper) : mapper;
- return addOptionality(instantiateType(getTemplateTypeFromMappedType(type), templateMapper), !!type.declaration.questionToken);
+ return instantiateType(getTemplateTypeFromMappedType(type), templateMapper);
}
function getIndexedAccessType(objectType, indexType, accessNode) {
- if (indexType.flags & 16384 ||
- objectType.flags & 16384 && indexType.flags & 262144 ||
+ if (maybeTypeOfKind(indexType, 540672 | 262144) ||
+ maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) ||
isGenericMappedType(objectType)) {
- if (accessNode) {
- if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
- error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
- return unknownType;
- }
+ if (objectType.flags & 1) {
+ return objectType;
}
if (isGenericMappedType(objectType)) {
return getIndexedAccessForMappedType(objectType, indexType, accessNode);
}
var id = objectType.id + "," + indexType.id;
- return indexedAccessTypes[id] || (indexedAccessTypes[id] = createIndexedAccessType(objectType, indexType));
+ var type = indexedAccessTypes.get(id);
+ if (!type) {
+ indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType));
+ }
+ return type;
}
var apparentObjectType = getApparentType(objectType);
if (indexType.flags & 65536 && !(indexType.flags & 8190)) {
@@ -24363,7 +26606,7 @@ var ts;
var links = getNodeLinks(node);
if (!links.resolvedType) {
var aliasSymbol = getAliasSymbolForTypeNode(node);
- if (ts.isEmpty(node.symbol.members) && !aliasSymbol) {
+ if (node.symbol.members.size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {
@@ -24376,17 +26619,33 @@ var ts;
return links.resolvedType;
}
function getAliasSymbolForTypeNode(node) {
- return node.parent.kind === 228 ? getSymbolOfNode(node.parent) : undefined;
+ return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node) {
var symbol = getAliasSymbolForTypeNode(node);
return symbol ? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) : undefined;
}
- function getSpreadType(left, right, isFromObjectLiteral) {
- ts.Debug.assert(!!(left.flags & (32768 | 1)) && !!(right.flags & (32768 | 1)), "Only object types may be spread.");
+ function getSpreadType(left, right) {
if (left.flags & 1 || right.flags & 1) {
return anyType;
}
+ left = filterType(left, function (t) { return !(t.flags & 6144); });
+ if (left.flags & 8192) {
+ return right;
+ }
+ right = filterType(right, function (t) { return !(t.flags & 6144); });
+ if (right.flags & 8192) {
+ return left;
+ }
+ if (left.flags & 65536) {
+ return mapType(left, function (t) { return getSpreadType(t, right); });
+ }
+ if (right.flags & 65536) {
+ return mapType(right, function (t) { return getSpreadType(left, t); });
+ }
+ if (right.flags & 16777216) {
+ return emptyObjectType;
+ }
var members = ts.createMap();
var skippedPrivateMembers = ts.createMap();
var stringIndexInfo;
@@ -24401,42 +26660,55 @@ var ts;
}
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
- var isOwnProperty = !(rightProp.flags & 8192) || isFromObjectLiteral;
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
- skippedPrivateMembers[rightProp.name] = true;
+ skippedPrivateMembers.set(rightProp.name, true);
}
- else if (isOwnProperty && !isSetterWithoutGetter) {
- members[rightProp.name] = rightProp;
+ else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
+ members.set(rightProp.name, getNonReadonlySymbol(rightProp));
}
}
for (var _b = 0, _c = getPropertiesOfType(left); _b < _c.length; _b++) {
var leftProp = _c[_b];
if (leftProp.flags & 65536 && !(leftProp.flags & 32768)
- || leftProp.name in skippedPrivateMembers) {
+ || skippedPrivateMembers.has(leftProp.name)
+ || isClassMethod(leftProp)) {
continue;
}
- if (leftProp.name in members) {
- var rightProp = members[leftProp.name];
+ if (members.has(leftProp.name)) {
+ var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 536870912) {
+ if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
- var flags = 4 | 67108864 | (leftProp.flags & 536870912);
+ var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 131072)]);
result.leftSpread = leftProp;
result.rightSpread = rightProp;
result.declarations = declarations;
- result.isReadonly = isReadonlySymbol(leftProp) || isReadonlySymbol(rightProp);
- members[leftProp.name] = result;
+ members.set(leftProp.name, result);
}
}
else {
- members[leftProp.name] = leftProp;
+ members.set(leftProp.name, getNonReadonlySymbol(leftProp));
}
}
return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
+ function getNonReadonlySymbol(prop) {
+ if (!isReadonlySymbol(prop)) {
+ return prop;
+ }
+ var flags = 4 | (prop.flags & 67108864);
+ var result = createSymbol(flags, prop.name);
+ result.type = getTypeOfSymbol(prop);
+ result.declarations = prop.declarations;
+ result.syntheticOrigin = prop;
+ return result;
+ }
+ function isClassMethod(prop) {
+ return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
+ }
function createLiteralType(flags, text) {
var type = createType(flags);
type.text = text;
@@ -24458,7 +26730,11 @@ var ts;
}
function getLiteralTypeForText(flags, text) {
var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- return map[text] || (map[text] = createLiteralType(flags, text));
+ var type = map.get(text);
+ if (!type) {
+ map.set(text, type = createLiteralType(flags, text));
+ }
+ return type;
}
function getTypeFromLiteralTypeNode(node) {
var links = getNodeLinks(node);
@@ -24486,9 +26762,9 @@ var ts;
function getThisType(node) {
var container = ts.getThisContainer(node, false);
var parent = container && container.parent;
- if (parent && (ts.isClassLike(parent) || parent.kind === 227)) {
+ if (parent && (ts.isClassLike(parent) || parent.kind === 229)) {
if (!(ts.getModifierFlags(container) & 32) &&
- (container.kind !== 150 || ts.isNodeDescendantOf(node, container.body))) {
+ (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@@ -24505,85 +26781,82 @@ var ts;
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 118:
- case 263:
- case 264:
+ case 267:
+ case 268:
return anyType;
- case 134:
+ case 135:
return stringType;
case 132:
return numberType;
case 121:
return booleanType;
- case 135:
+ case 136:
return esSymbolType;
case 104:
return voidType;
- case 137:
+ case 138:
return undefinedType;
case 94:
return nullType;
case 129:
return neverType;
- case 289:
- return nullType;
- case 290:
- return undefinedType;
- case 291:
- return neverType;
- case 167:
+ case 133:
+ return nonPrimitiveType;
+ case 168:
case 98:
return getTypeFromThisTypeNode(node);
- case 171:
+ case 172:
return getTypeFromLiteralTypeNode(node);
- case 288:
+ case 292:
return getTypeFromLiteralTypeNode(node.literal);
- case 157:
- case 272:
+ case 158:
+ case 276:
return getTypeFromTypeReference(node);
- case 156:
+ case 157:
return booleanType;
- case 199:
+ case 200:
return getTypeFromTypeReference(node);
- case 160:
+ case 161:
return getTypeFromTypeQueryNode(node);
- case 162:
- case 265:
- return getTypeFromArrayTypeNode(node);
case 163:
- return getTypeFromTupleTypeNode(node);
+ case 269:
+ return getTypeFromArrayTypeNode(node);
case 164:
- case 266:
- return getTypeFromUnionTypeNode(node);
+ return getTypeFromTupleTypeNode(node);
case 165:
- return getTypeFromIntersectionTypeNode(node);
+ case 270:
+ return getTypeFromUnionTypeNode(node);
case 166:
- case 268:
- case 269:
- case 276:
- case 277:
+ return getTypeFromIntersectionTypeNode(node);
+ case 272:
+ return getTypeFromJSDocNullableTypeNode(node);
+ case 167:
case 273:
+ case 280:
+ case 281:
+ case 277:
return getTypeFromTypeNode(node.type);
- case 270:
+ case 274:
return getTypeFromTypeNode(node.literal);
- case 158:
case 159:
- case 161:
- case 287:
- case 274:
+ case 160:
+ case 162:
+ case 291:
+ case 278:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
- case 168:
- return getTypeFromTypeOperatorNode(node);
case 169:
- return getTypeFromIndexedAccessTypeNode(node);
+ return getTypeFromTypeOperatorNode(node);
case 170:
+ return getTypeFromIndexedAccessTypeNode(node);
+ case 171:
return getTypeFromMappedTypeNode(node);
case 70:
- case 141:
+ case 142:
var symbol = getSymbolAtLocation(node);
return symbol && getDeclaredTypeOfSymbol(symbol);
- case 267:
+ case 271:
return getTypeFromJSDocTupleType(node);
- case 275:
+ case 279:
return getTypeFromJSDocVariadicType(node);
default:
return unknownType;
@@ -24610,13 +26883,13 @@ var ts;
var instantiations = mapper.instantiations || (mapper.instantiations = []);
return instantiations[type.id] || (instantiations[type.id] = instantiator(type, mapper));
}
- function createUnaryTypeMapper(source, target) {
+ function makeUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
}
- function createBinaryTypeMapper(source1, target1, source2, target2) {
+ function makeBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
}
- function createArrayTypeMapper(sources, targets) {
+ function makeArrayTypeMapper(sources, targets) {
return function (t) {
for (var i = 0; i < sources.length; i++) {
if (t === sources[i]) {
@@ -24627,16 +26900,20 @@ var ts;
};
}
function createTypeMapper(sources, targets) {
- var count = sources.length;
- var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
- count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
- createArrayTypeMapper(sources, targets);
+ var mapper = sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
+ sources.length === 2 ? makeBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
+ makeArrayTypeMapper(sources, targets);
mapper.mappedTypes = sources;
return mapper;
}
function createTypeEraser(sources) {
return createTypeMapper(sources, undefined);
}
+ function createBackreferenceMapper(typeParameters, index) {
+ var mapper = function (t) { return ts.indexOf(typeParameters, t) >= index ? emptyObjectType : t; };
+ mapper.mappedTypes = typeParameters;
+ return mapper;
+ }
function getInferenceMapper(context) {
if (!context.mapper) {
var mapper = function (t) {
@@ -24660,7 +26937,12 @@ var ts;
}
function combineTypeMappers(mapper1, mapper2) {
var mapper = function (t) { return instantiateType(mapper1(t), mapper2); };
- mapper.mappedTypes = mapper1.mappedTypes;
+ mapper.mappedTypes = ts.concatenate(mapper1.mappedTypes, mapper2.mappedTypes);
+ return mapper;
+ }
+ function createReplacementMapper(source, target, baseMapper) {
+ var mapper = function (t) { return t === source ? target : baseMapper(t); };
+ mapper.mappedTypes = baseMapper.mappedTypes;
return mapper;
}
function cloneTypeParameter(typeParameter) {
@@ -24705,12 +26987,13 @@ var ts;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
}
- var result = createSymbol(16777216 | 67108864 | symbol.flags, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
+ result.checkFlags = 1;
result.declarations = symbol.declarations;
result.parent = symbol.parent;
result.target = symbol;
@@ -24731,18 +27014,17 @@ var ts;
function instantiateMappedType(type, mapper) {
var constraintType = getConstraintTypeFromMappedType(type);
if (constraintType.flags & 262144) {
- var typeParameter_1 = constraintType.type;
- var mappedTypeParameter = mapper(typeParameter_1);
- if (typeParameter_1 !== mappedTypeParameter) {
- return mapType(mappedTypeParameter, function (t) {
- if (isMappableType(t)) {
- var replacementMapper = createUnaryTypeMapper(typeParameter_1, t);
- var combinedMapper = mapper.mappedTypes && mapper.mappedTypes.length === 1 ? replacementMapper : combineTypeMappers(replacementMapper, mapper);
- combinedMapper.mappedTypes = mapper.mappedTypes;
- return instantiateMappedObjectType(type, combinedMapper);
- }
- return t;
- });
+ var typeVariable_1 = constraintType.type;
+ if (typeVariable_1.flags & 16384) {
+ var mappedTypeVariable = instantiateType(typeVariable_1, mapper);
+ if (typeVariable_1 !== mappedTypeVariable) {
+ return mapType(mappedTypeVariable, function (t) {
+ if (isMappableType(t)) {
+ return instantiateMappedObjectType(type, createReplacementMapper(typeVariable_1, t, mapper));
+ }
+ return t;
+ });
+ }
}
}
return instantiateMappedObjectType(type, mapper);
@@ -24763,26 +27045,28 @@ var ts;
return false;
}
var mappedTypes = mapper.mappedTypes;
- var node = symbol.declarations[0].parent;
- while (node) {
+ return !!ts.findAncestor(symbol.declarations[0], function (node) {
+ if (node.kind === 232 || node.kind === 264) {
+ return "quit";
+ }
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 226:
- case 197:
- case 227:
+ case 186:
case 228:
+ case 198:
+ case 229:
+ case 230:
var declaration = node;
if (declaration.typeParameters) {
for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
@@ -24792,25 +27076,34 @@ var ts;
}
}
}
- if (ts.isClassLike(node) || node.kind === 227) {
+ if (ts.isClassLike(node) || node.kind === 229) {
var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
if (thisType && ts.contains(mappedTypes, thisType)) {
return true;
}
}
break;
- case 230:
- case 261:
- return false;
+ case 171:
+ if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) {
+ return true;
+ }
+ break;
+ case 278:
+ var func = node;
+ for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
+ var p = _c[_b];
+ if (ts.contains(mappedTypes, getTypeOfNode(p))) {
+ return true;
+ }
+ }
+ break;
}
- node = node.parent;
- }
- return false;
+ });
}
function isTopLevelTypeAlias(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var parentKind = symbol.declarations[0].parent.kind;
- return parentKind === 261 || parentKind === 231;
+ return parentKind === 264 || parentKind === 233;
}
return false;
}
@@ -24862,28 +27155,34 @@ var ts;
return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration);
}
function isContextSensitive(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
switch (node.kind) {
- case 184:
case 185:
+ case 186:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 176:
+ case 177:
return ts.forEach(node.properties, isContextSensitive);
- case 175:
+ case 176:
return ts.forEach(node.elements, isContextSensitive);
- case 193:
+ case 194:
return isContextSensitive(node.whenTrue) ||
isContextSensitive(node.whenFalse);
- case 192:
+ case 193:
return node.operatorToken.kind === 53 &&
(isContextSensitive(node.left) || isContextSensitive(node.right));
- case 257:
+ case 260:
return isContextSensitive(node.initializer);
+ case 150:
case 149:
- case 148:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 183:
+ case 184:
return isContextSensitive(node.expression);
+ case 253:
+ return ts.forEach(node.properties, isContextSensitive);
+ case 252:
+ return node.initializer && isContextSensitive(node.initializer);
+ case 255:
+ return node.expression && isContextSensitive(node.expression);
}
return false;
}
@@ -24894,7 +27193,7 @@ var ts;
if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
return true;
}
- if (node.kind === 185) {
+ if (node.kind === 186) {
return false;
}
var parameter = ts.firstOrUndefined(node.parameters);
@@ -24912,9 +27211,12 @@ var ts;
result.properties = resolved.properties;
result.callSignatures = emptyArray;
result.constructSignatures = emptyArray;
- type = result;
+ return result;
}
}
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, getTypeWithoutSignatures));
+ }
return type;
}
function isTypeIdenticalTo(source, target) {
@@ -24933,7 +27235,7 @@ var ts;
return isTypeRelatedTo(source, target, assignableRelation);
}
function isTypeInstanceOf(source, target) {
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
}
function isTypeComparableTo(source, target) {
return isTypeRelatedTo(source, target, comparableRelation);
@@ -24951,9 +27253,9 @@ var ts;
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
}
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
- return compareSignaturesRelated(source, target, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
+ return compareSignaturesRelated(source, target, false, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
}
- function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
+ function compareSignaturesRelated(source, target, checkAsCallback, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
if (source === target) {
return -1;
}
@@ -24984,9 +27286,15 @@ var ts;
var sourceParams = source.parameters;
var targetParams = target.parameters;
for (var i = 0; i < checkCount; i++) {
- var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
- var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
- var related = compareTypes(s, t, false) || compareTypes(t, s, reportErrors);
+ var sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
+ var targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
+ var sourceSig = getSingleCallSignature(getNonNullableType(sourceType));
+ var targetSig = getSingleCallSignature(getNonNullableType(targetType));
+ var callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate &&
+ (getFalsyFlags(sourceType) & 6144) === (getFalsyFlags(targetType) & 6144);
+ var related = callbacks ?
+ compareSignaturesRelated(targetSig, sourceSig, true, false, reportErrors, errorReporter, compareTypes) :
+ !checkAsCallback && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name);
@@ -25013,7 +27321,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -25076,18 +27385,33 @@ var ts;
sourceNonRestParamCount;
}
}
+ function isEmptyResolvedType(t) {
+ return t.properties.length === 0 &&
+ t.callSignatures.length === 0 &&
+ t.constructSignatures.length === 0 &&
+ !t.stringIndexInfo &&
+ !t.numberIndexInfo;
+ }
+ function isEmptyObjectType(type) {
+ return type.flags & 32768 ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
+ type.flags & 65536 ? ts.forEach(type.types, isEmptyObjectType) :
+ type.flags & 131072 ? !ts.forEach(type.types, function (t) { return !isEmptyObjectType(t); }) :
+ false;
+ }
function isEnumTypeRelatedTo(source, target, errorReporter) {
if (source === target) {
return true;
}
var id = source.id + "," + target.id;
- if (enumRelation[id] !== undefined) {
- return enumRelation[id];
+ var relation = enumRelation.get(id);
+ if (relation !== undefined) {
+ return relation;
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 65536) !== (target.flags & 65536)) {
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@@ -25098,11 +27422,13 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
}
}
- return enumRelation[id] = true;
+ enumRelation.set(id, true);
+ return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@@ -25123,6 +27449,8 @@ var ts;
return true;
if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
return true;
+ if (source.flags & 32768 && target.flags & 16777216)
+ return true;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
@@ -25154,13 +27482,13 @@ var ts;
}
if (source.flags & 32768 && target.flags & 32768) {
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
return related === 1;
}
}
- if (source.flags & 507904 || target.flags & 507904) {
- return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined);
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ return checkTypeRelatedTo(source, target, relation, undefined);
}
return false;
}
@@ -25214,10 +27542,27 @@ var ts;
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
- (getGlobalESSymbolType() === source && esSymbolType === target)) {
+ (getGlobalESSymbolType(false) === source && esSymbolType === target)) {
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
+ function isUnionOrIntersectionTypeWithoutNullableConstituents(type) {
+ if (!(type.flags & 196608)) {
+ return false;
+ }
+ var seenNonNullable = false;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (t.flags & 6144) {
+ continue;
+ }
+ if (seenNonNullable) {
+ return true;
+ }
+ seenNonNullable = true;
+ }
+ return false;
+ }
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
if (source.flags & 96 && source.flags & 1048576) {
@@ -25240,7 +27585,7 @@ var ts;
}
return 0;
}
- if (target.flags & 196608) {
+ if (isUnionOrIntersectionTypeWithoutNullableConstituents(target)) {
source = getRegularTypeOfObjectLiteral(source);
}
}
@@ -25256,91 +27601,24 @@ var ts;
return result;
}
}
- else if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
- }
- else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
- }
- else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
- }
- if (target.flags & 16384) {
- if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
- if (!source.declaration.questionToken) {
- var templateType = getTemplateTypeFromMappedType(source);
- var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
- if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
- return result;
- }
- }
- }
- else {
- var constraint = getConstraintOfTypeParameter(target);
- if (constraint && constraint.flags & 262144) {
- if (result = isRelatedTo(source, constraint, reportErrors)) {
- return result;
- }
- }
- }
- }
- else if (target.flags & 262144) {
- if (source.flags & 262144) {
- if (result = isRelatedTo(target.type, source.type, false)) {
- return result;
- }
- }
- var constraint = getConstraintOfTypeParameter(target.type);
- if (constraint) {
- if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
- return result;
- }
- }
- }
- else if (target.flags & 524288) {
- if (source.flags & 524288 && source.indexType === target.indexType) {
- if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
- return result;
- }
- }
- }
- if (source.flags & 16384) {
- if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
- var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
- var templateType = getTemplateTypeFromMappedType(target);
- if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ else {
+ if (target.flags & 65536) {
+ if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
return result;
}
}
- else {
- var constraint = getConstraintOfTypeParameter(source);
- if (!constraint || constraint.flags & 1) {
- constraint = emptyObjectType;
- }
- constraint = getTypeWithThisArgument(constraint, source);
- var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
- if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
- errorInfo = saveErrorInfo;
+ else if (target.flags & 131072) {
+ if (result = typeRelatedToEachType(source, target, reportErrors)) {
return result;
}
}
- }
- else {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ else if (source.flags & 131072) {
+ if (result = someTypeRelatedToType(source, target, false)) {
return result;
}
}
- var apparentSource = getApparentType(source);
- if (apparentSource.flags & (32768 | 131072) && target.flags & 32768) {
- var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190);
- if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) {
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
return result;
}
@@ -25360,12 +27638,7 @@ var ts;
function isIdenticalTo(source, target) {
var result;
if (source.flags & 32768 && target.flags & 32768) {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, false)) {
- return result;
- }
- }
- return objectTypeRelatedTo(source, source, target, false);
+ return recursiveTypeRelatedTo(source, target, false);
}
if (source.flags & 65536 && target.flags & 65536 ||
source.flags & 131072 && target.flags & 131072) {
@@ -25377,42 +27650,43 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name) {
+ function isKnownProperty(type, name, isComparingJsxAttributes) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
- resolved.stringIndexInfo ||
- (resolved.numberIndexInfo && isNumericLiteralName(name)) ||
- getPropertyOfType(type, name)) {
+ if (resolved.stringIndexInfo || resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfType(type, name) || isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
return true;
}
}
else if (type.flags & 196608) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- if (isKnownProperty(t, name)) {
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
return true;
}
}
}
return false;
}
- function isEmptyObjectType(t) {
- return t.properties.length === 0 &&
- t.callSignatures.length === 0 &&
- t.constructSignatures.length === 0 &&
- !t.stringIndexInfo &&
- !t.numberIndexInfo;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ if ((relation === assignableRelation || relation === comparableRelation) &&
+ (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
+ return false;
+ }
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!isKnownProperty(target, prop.name)) {
+ if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
- errorNode = prop.valueDeclaration;
- reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ if (ts.isJsxAttributes(errorNode)) {
+ reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
+ }
+ else {
+ errorNode = prop.valueDeclaration;
+ reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ }
}
return true;
}
@@ -25438,20 +27712,42 @@ var ts;
if (target.flags & 65536 && containsType(targetTypes, source)) {
return -1;
}
- var len = targetTypes.length;
- for (var i = 0; i < len; i++) {
- var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
+ for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
+ var type = targetTypes_1[_i];
+ var related = isRelatedTo(source, type, false);
if (related) {
return related;
}
}
+ if (reportErrors) {
+ var discriminantType = findMatchingDiscriminantType(source, target);
+ isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], true);
+ }
return 0;
}
+ function findMatchingDiscriminantType(source, target) {
+ var sourceProperties = getPropertiesOfObjectType(source);
+ if (sourceProperties) {
+ for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
+ var sourceProperty = sourceProperties_1[_i];
+ if (isDiscriminantProperty(target, sourceProperty.name)) {
+ var sourceType = getTypeOfSymbol(sourceProperty);
+ for (var _a = 0, _b = target.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ var targetType = getTypeOfPropertyOfType(type, sourceProperty.name);
+ if (targetType && isRelatedTo(sourceType, targetType)) {
+ return type;
+ }
+ }
+ }
+ }
+ }
+ }
function typeRelatedToEachType(source, target, reportErrors) {
var result = -1;
var targetTypes = target.types;
- for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
- var targetType = targetTypes_1[_i];
+ for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
+ var targetType = targetTypes_2[_i];
var related = isRelatedTo(source, targetType, reportErrors);
if (!related) {
return 0;
@@ -25504,15 +27800,15 @@ var ts;
}
return result;
}
- function objectTypeRelatedTo(source, originalSource, target, reportErrors) {
+ function recursiveTypeRelatedTo(source, target, reportErrors) {
if (overflow) {
return 0;
}
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
if (reportErrors && related === 2) {
- relation[id] = 3;
+ relation.set(id, 3);
}
else {
return related === 1 ? -1 : 0;
@@ -25520,7 +27816,7 @@ var ts;
}
if (depth > 0) {
for (var i = 0; i < depth; i++) {
- if (maybeStack[i][id]) {
+ if (maybeStack[i].get(id)) {
return 1;
}
}
@@ -25538,71 +27834,165 @@ var ts;
sourceStack[depth] = source;
targetStack[depth] = target;
maybeStack[depth] = ts.createMap();
- maybeStack[depth][id] = 1;
+ maybeStack[depth].set(id, 1);
depth++;
var saveExpandingFlags = expandingFlags;
- if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth))
+ if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
expandingFlags |= 1;
- if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth))
+ if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
expandingFlags |= 2;
+ var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : 1;
+ expandingFlags = saveExpandingFlags;
+ depth--;
+ if (result) {
+ var maybeCache = maybeStack[depth];
+ var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
+ ts.copyEntries(maybeCache, destinationCache);
+ }
+ else {
+ relation.set(id, reportErrors ? 3 : 2);
+ }
+ return result;
+ }
+ function structuredTypeRelatedTo(source, target, reportErrors) {
var result;
- if (expandingFlags === 3) {
- result = 1;
+ var saveErrorInfo = errorInfo;
+ if (target.flags & 16384) {
+ if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
+ if (!source.declaration.questionToken) {
+ var templateType = getTemplateTypeFromMappedType(source);
+ var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
+ if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+ return result;
+ }
+ }
+ }
}
- else if (isGenericMappedType(source) || isGenericMappedType(target)) {
- result = mappedTypeRelatedTo(source, target, reportErrors);
+ else if (target.flags & 262144) {
+ if (source.flags & 262144) {
+ if (result = isRelatedTo(target.type, source.type, false)) {
+ return result;
+ }
+ }
+ var constraint = getConstraintOfType(target.type);
+ if (constraint) {
+ if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else if (target.flags & 524288) {
+ var constraint = getConstraintOfType(target);
+ if (constraint) {
+ if (result = isRelatedTo(source, constraint, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ if (source.flags & 16384) {
+ if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
+ var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
+ var templateType = getTemplateTypeFromMappedType(target);
+ if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else {
+ var constraint = getConstraintOfTypeParameter(source);
+ if (constraint || !(target.flags & 16777216)) {
+ if (!constraint || constraint.flags & 1) {
+ constraint = emptyObjectType;
+ }
+ constraint = getTypeWithThisArgument(constraint, source);
+ var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
+ if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ }
+ else if (source.flags & 524288) {
+ var constraint = getConstraintOfType(source);
+ if (constraint) {
+ if (result = isRelatedTo(constraint, target, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else if (target.flags & 524288 && source.indexType === target.indexType) {
+ if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ return result;
+ }
+ }
}
else {
- result = propertiesRelatedTo(source, target, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 0, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 1, reportErrors);
+ if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
+ if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ return result;
+ }
+ }
+ var sourceIsPrimitive = !!(source.flags & 8190);
+ if (relation !== identityRelation) {
+ source = getApparentType(source);
+ }
+ if (source.flags & (32768 | 131072) && target.flags & 32768) {
+ var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive;
+ if (isGenericMappedType(source) || isGenericMappedType(target)) {
+ result = mappedTypeRelatedTo(source, target, reportStructuralErrors);
+ }
+ else {
+ result = propertiesRelatedTo(source, target, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 0, reportErrors);
+ result &= signaturesRelatedTo(source, target, 0, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 1, reportErrors);
+ result &= signaturesRelatedTo(source, target, 1, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 0, sourceIsPrimitive, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 1, sourceIsPrimitive, reportStructuralErrors);
+ }
+ }
}
}
}
+ if (result) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
}
}
- expandingFlags = saveExpandingFlags;
- depth--;
- if (result) {
- var maybeCache = maybeStack[depth];
- var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
- ts.copyProperties(maybeCache, destinationCache);
- }
- else {
- relation[id] = reportErrors ? 3 : 2;
- }
- return result;
+ return 0;
}
function mappedTypeRelatedTo(source, target, reportErrors) {
if (isGenericMappedType(target)) {
if (isGenericMappedType(source)) {
- var result_2;
- if (relation === identityRelation) {
- var readonlyMatches = !source.declaration.readonlyToken === !target.declaration.readonlyToken;
- var optionalMatches = !source.declaration.questionToken === !target.declaration.questionToken;
- if (readonlyMatches && optionalMatches) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getErasedTemplateTypeFromMappedType(source), getErasedTemplateTypeFromMappedType(target), reportErrors);
- }
- }
- }
- else {
- if (relation === comparableRelation || !source.declaration.questionToken || target.declaration.questionToken) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target), reportErrors);
- }
+ var sourceReadonly = !!source.declaration.readonlyToken;
+ var sourceOptional = !!source.declaration.questionToken;
+ var targetReadonly = !!target.declaration.readonlyToken;
+ var targetOptional = !!target.declaration.questionToken;
+ var modifiersRelated = relation === identityRelation ?
+ sourceReadonly === targetReadonly && sourceOptional === targetOptional :
+ relation === comparableRelation || !sourceOptional || targetOptional;
+ if (modifiersRelated) {
+ var result_2;
+ if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
+ return result_2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
}
}
}
+ else if (target.declaration.questionToken && isEmptyObjectType(source)) {
+ return -1;
+ }
}
- else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(target))) {
- return -1;
+ else if (relation !== identityRelation) {
+ var resolved = resolveStructuredTypeMembers(target);
+ if (isEmptyResolvedType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & 1) {
+ return -1;
+ }
}
return 0;
}
@@ -25613,22 +28003,28 @@ var ts;
var result = -1;
var properties = getPropertiesOfObjectType(target);
var requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & 128);
- for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
- var targetProp = properties_3[_i];
+ for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
+ var targetProp = properties_4[_i];
var sourceProp = getPropertyOfType(source, targetProp.name);
if (sourceProp !== targetProp) {
if (!sourceProp) {
- if (!(targetProp.flags & 536870912) || requireOptionalProperties) {
+ if (!(targetProp.flags & 67108864) || requireOptionalProperties) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
}
return 0;
}
}
- else if (!(targetProp.flags & 134217728)) {
+ else if (!(targetProp.flags & 16777216)) {
var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
+ if (getCheckFlags(sourceProp) & 256) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
+ }
+ return 0;
+ }
if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
if (reportErrors) {
if (sourcePropFlags & 8 && targetPropFlags & 8) {
@@ -25642,12 +28038,9 @@ var ts;
}
}
else if (targetPropFlags & 16) {
- var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32;
- var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined;
- var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp));
- if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
+ if (!isValidOverrideOf(sourceProp, targetProp)) {
if (reportErrors) {
- reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
+ reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source), typeToString(getDeclaringClass(targetProp) || target));
}
return 0;
}
@@ -25666,7 +28059,7 @@ var ts;
return 0;
}
result &= related;
- if (relation !== comparableRelation && sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) {
+ if (relation !== comparableRelation && sourceProp.flags & 67108864 && !(targetProp.flags & 67108864)) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target));
}
@@ -25687,8 +28080,8 @@ var ts;
return 0;
}
var result = -1;
- for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
- var sourceProp = sourceProperties_1[_i];
+ for (var _i = 0, sourceProperties_2 = sourceProperties; _i < sourceProperties_2.length; _i++) {
+ var sourceProp = sourceProperties_2[_i];
var targetProp = getPropertyOfObjectType(target, sourceProp.name);
if (!targetProp) {
return 0;
@@ -25744,7 +28137,7 @@ var ts;
return result;
}
function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ return compareSignaturesRelated(source, target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -25753,7 +28146,7 @@ var ts;
return 0;
}
var result = -1;
- for (var i = 0, len = sourceSignatures.length; i < len; i++) {
+ for (var i = 0; i < sourceSignatures.length; i++) {
var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], false, false, false, isRelatedTo);
if (!related) {
return 0;
@@ -25786,12 +28179,12 @@ var ts;
}
return related;
}
- function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) {
+ function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors) {
if (relation === identityRelation) {
return indexTypesIdenticalTo(source, target, kind);
}
var targetInfo = getIndexInfoOfType(target, kind);
- if (!targetInfo || ((targetInfo.type.flags & 1) && !(originalSource.flags & 8190))) {
+ if (!targetInfo || targetInfo.type.flags & 1 && !sourceIsPrimitive) {
return -1;
}
var sourceInfo = getIndexInfoOfType(source, kind) ||
@@ -25849,6 +28242,37 @@ var ts;
return false;
}
}
+ function forEachProperty(prop, callback) {
+ if (getCheckFlags(prop) & 6) {
+ for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ var p = getPropertyOfType(t, prop.name);
+ var result = p && forEachProperty(p, callback);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ }
+ return callback(prop);
+ }
+ function getDeclaringClass(prop) {
+ return prop.parent && prop.parent.flags & 32 ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;
+ }
+ function isPropertyInClassDerivedFrom(prop, baseClass) {
+ return forEachProperty(prop, function (sp) {
+ var sourceClass = getDeclaringClass(sp);
+ return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
+ });
+ }
+ function isValidOverrideOf(sourceProp, targetProp) {
+ return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
+ }
+ function isClassDerivedFromDeclaringClasses(checkClass, prop) {
+ return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
+ }
function isAbstractConstructorType(type) {
if (getObjectFlags(type) & 16) {
var symbol = type.symbol;
@@ -25861,16 +28285,18 @@ var ts;
}
return false;
}
- function isDeeplyNestedGeneric(type, stack, depth) {
- if (getObjectFlags(type) & (4 | 64) && depth >= 5) {
+ function isDeeplyNestedType(type, stack, depth) {
+ if (depth >= 5 && type.flags & 32768) {
var symbol = type.symbol;
- var count = 0;
- for (var i = 0; i < depth; i++) {
- var t = stack[i];
- if (getObjectFlags(t) & (4 | 64) && t.symbol === symbol) {
- count++;
- if (count >= 5)
- return true;
+ if (symbol) {
+ var count = 0;
+ for (var i = 0; i < depth; i++) {
+ var t = stack[i];
+ if (t.flags & 32768 && t.symbol === symbol) {
+ count++;
+ if (count >= 5)
+ return true;
+ }
}
}
}
@@ -25894,7 +28320,7 @@ var ts;
}
}
else {
- if ((sourceProp.flags & 536870912) !== (targetProp.flags & 536870912)) {
+ if ((sourceProp.flags & 67108864) !== (targetProp.flags & 67108864)) {
return 0;
}
}
@@ -25924,7 +28350,7 @@ var ts;
if (!(isMatchingSignature(source, target, partialMatch))) {
return 0;
}
- if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
+ if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) {
return 0;
}
source = getErasedSignature(source);
@@ -25962,8 +28388,8 @@ var ts;
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
function isSupertypeOfEach(candidate, types) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
if (candidate !== t && !isTypeSubtypeOf(t, candidate))
return false;
}
@@ -25971,8 +28397,8 @@ var ts;
}
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var t = types_8[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -26063,8 +28489,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var t = types_9[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -26093,7 +28519,7 @@ var ts;
types.push(undefinedType);
if (flags & 4096)
types.push(nullType);
- return getUnionType(types, true);
+ return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
@@ -26108,8 +28534,8 @@ var ts;
getSignaturesOfType(type, 0).length === 0 &&
getSignaturesOfType(type, 1).length === 0;
}
- function createTransientSymbol(source, type) {
- var symbol = createSymbol(source.flags | 67108864, source.name);
+ function createSymbolWithType(source, type) {
+ var symbol = createSymbol(source.flags, source.name);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;
@@ -26125,9 +28551,8 @@ var ts;
var property = _a[_i];
var original = getTypeOfSymbol(property);
var updated = f(original);
- members[property.name] = updated === original ? property : createTransientSymbol(property, updated);
+ members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
}
- ;
return members;
}
function getRegularTypeOfObjectLiteral(type) {
@@ -26146,11 +28571,17 @@ var ts;
type.regularType = regularNew;
return regularNew;
}
+ function getWidenedProperty(prop) {
+ var original = getTypeOfSymbol(prop);
+ var widened = getWidenedType(original);
+ return widened === original ? prop : createSymbolWithType(prop, widened);
+ }
function getWidenedTypeOfObjectLiteral(type) {
- var members = transformTypeOfMembers(type, function (prop) {
- var widened = getWidenedType(prop);
- return prop === widened ? prop : widened;
- });
+ var members = ts.createMap();
+ for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ members.set(prop.name, prop.flags & 4 ? getWidenedProperty(prop) : prop);
+ }
var stringIndexInfo = getIndexInfoOfType(type, 0);
var numberIndexInfo = getIndexInfoOfType(type, 1);
return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
@@ -26211,25 +28642,25 @@ var ts;
var typeAsString = typeToString(getWidenedType(type));
var diagnostic;
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
break;
- case 144:
+ case 145:
diagnostic = declaration.dotDotDotToken ?
ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
break;
- case 174:
+ case 175:
diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
break;
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 184:
+ case 153:
case 185:
+ case 186:
if (!declaration.name) {
error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
return;
@@ -26242,7 +28673,7 @@ var ts;
error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
- if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152) {
+ if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
if (!reportWideningErrorsInType(type)) {
reportImplicitAnyError(declaration, type);
}
@@ -26268,13 +28699,14 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes) {
+ function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
return {
signature: signature,
inferUnionTypes: inferUnionTypes,
inferences: inferences,
inferredTypes: new Array(signature.typeParameters.length),
+ useAnyForNoInferences: useAnyForNoInferences
};
}
function createTypeInferencesObject() {
@@ -26285,25 +28717,69 @@ var ts;
isFixed: false,
};
}
- function couldContainTypeParameters(type) {
+ function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
- return !!(type.flags & 16384 ||
- objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
+ return !!(type.flags & 540672 ||
+ objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
objectFlags & 32 ||
- type.flags & 196608 && couldUnionOrIntersectionContainTypeParameters(type));
+ type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
- function couldUnionOrIntersectionContainTypeParameters(type) {
- if (type.couldContainTypeParameters === undefined) {
- type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters);
+ function couldUnionOrIntersectionContainTypeVariables(type) {
+ if (type.couldContainTypeVariables === undefined) {
+ type.couldContainTypeVariables = ts.forEach(type.types, couldContainTypeVariables);
}
- return type.couldContainTypeParameters;
+ return type.couldContainTypeVariables;
}
function isTypeParameterAtTopLevel(type, typeParameter) {
return type === typeParameter || type.flags & 196608 && ts.forEach(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); });
}
- function inferTypes(context, originalSource, originalTarget) {
- var typeParameters = context.signature.typeParameters;
+ function inferTypeForHomomorphicMappedType(source, target) {
+ var properties = getPropertiesOfType(source);
+ var indexInfo = getIndexInfoOfType(source, 0);
+ if (properties.length === 0 && !indexInfo) {
+ return undefined;
+ }
+ var typeVariable = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var typeVariableArray = [typeVariable];
+ var typeInferences = createTypeInferencesObject();
+ var typeInferencesArray = [typeInferences];
+ var templateType = getTemplateTypeFromMappedType(target);
+ var readonlyMask = target.declaration.readonlyToken ? false : true;
+ var optionalMask = target.declaration.questionToken ? 0 : 67108864;
+ var members = createSymbolTable(properties);
+ for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
+ var prop = properties_5[_i];
+ var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
+ if (!inferredPropType) {
+ return undefined;
+ }
+ var inferredProp = createSymbol(4 | prop.flags & optionalMask, prop.name);
+ inferredProp.checkFlags = readonlyMask && isReadonlySymbol(prop) ? 8 : 0;
+ inferredProp.declarations = prop.declarations;
+ inferredProp.type = inferredPropType;
+ members.set(prop.name, inferredProp);
+ }
+ if (indexInfo) {
+ var inferredIndexType = inferTargetType(indexInfo.type);
+ if (!inferredIndexType) {
+ return undefined;
+ }
+ indexInfo = createIndexInfo(inferredIndexType, readonlyMask && indexInfo.isReadonly);
+ }
+ return createAnonymousType(undefined, members, emptyArray, emptyArray, indexInfo, undefined);
+ function inferTargetType(sourceType) {
+ typeInferences.primary = undefined;
+ typeInferences.secondary = undefined;
+ inferTypes(typeVariableArray, typeInferencesArray, sourceType, templateType);
+ var inferences = typeInferences.primary || typeInferences.secondary;
+ return inferences && getUnionType(inferences, true);
+ }
+ }
+ function inferTypesWithContext(context, originalSource, originalTarget) {
+ inferTypes(context.signature.typeParameters, context.inferences, originalSource, originalTarget);
+ }
+ function inferTypes(typeVariables, typeInferences, originalSource, originalTarget) {
var sourceStack;
var targetStack;
var depth = 0;
@@ -26319,7 +28795,7 @@ var ts;
return false;
}
function inferFromTypes(source, target) {
- if (!couldContainTypeParameters(target)) {
+ if (!couldContainTypeVariables(target)) {
return;
}
if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
@@ -26358,13 +28834,13 @@ var ts;
target = removeTypesFromUnionOrIntersection(target, matchingTypes);
}
}
- if (target.flags & 16384) {
+ if (target.flags & 540672) {
if (source.flags & 8388608) {
return;
}
- for (var i = 0; i < typeParameters.length; i++) {
- if (target === typeParameters[i]) {
- var inferences = context.inferences[i];
+ for (var i = 0; i < typeVariables.length; i++) {
+ if (target === typeVariables[i]) {
+ var inferences = typeInferences[i];
if (!inferences.isFixed) {
var candidates = inferiority ?
inferences.secondary || (inferences.secondary = []) :
@@ -26372,7 +28848,7 @@ var ts;
if (!ts.contains(candidates, source)) {
candidates.push(source);
}
- if (!isTypeParameterAtTopLevel(originalTarget, target)) {
+ if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
inferences.topLevel = false;
}
}
@@ -26390,21 +28866,21 @@ var ts;
}
else if (target.flags & 196608) {
var targetTypes = target.types;
- var typeParameterCount = 0;
- var typeParameter = void 0;
- for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) {
- var t = targetTypes_2[_d];
- if (t.flags & 16384 && ts.contains(typeParameters, t)) {
- typeParameter = t;
- typeParameterCount++;
+ var typeVariableCount = 0;
+ var typeVariable = void 0;
+ for (var _d = 0, targetTypes_3 = targetTypes; _d < targetTypes_3.length; _d++) {
+ var t = targetTypes_3[_d];
+ if (t.flags & 540672 && ts.contains(typeVariables, t)) {
+ typeVariable = t;
+ typeVariableCount++;
}
else {
inferFromTypes(source, t);
}
}
- if (typeParameterCount === 1) {
+ if (typeVariableCount === 1) {
inferiority++;
- inferFromTypes(source, typeParameter);
+ inferFromTypes(source, typeVariable);
inferiority--;
}
}
@@ -26421,14 +28897,14 @@ var ts;
if (isInProcess(source, target)) {
return;
}
- if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) {
+ if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
return;
}
var key = source.id + "," + target.id;
- if (visited[key]) {
+ if (visited.get(key)) {
return;
}
- visited[key] = true;
+ visited.set(key, true);
if (depth === 0) {
sourceStack = [];
targetStack = [];
@@ -26444,9 +28920,16 @@ var ts;
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
- if (getObjectFlags(source) & 32) {
- inferFromTypes(getConstraintTypeFromMappedType(source), constraintType);
- inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));
+ if (constraintType.flags & 262144) {
+ var index = ts.indexOf(typeVariables, constraintType.type);
+ if (index >= 0 && !typeInferences[index].isFixed) {
+ var inferredType = inferTypeForHomomorphicMappedType(source, target);
+ if (inferredType) {
+ inferiority++;
+ inferFromTypes(inferredType, typeVariables[index]);
+ inferiority--;
+ }
+ }
return;
}
if (constraintType.flags & 16384) {
@@ -26462,8 +28945,8 @@ var ts;
}
function inferFromProperties(source, target) {
var properties = getPropertiesOfObjectType(target);
- for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
- var targetProp = properties_4[_i];
+ for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) {
+ var targetProp = properties_6[_i];
var sourceProp = getPropertyOfObjectType(source, targetProp.name);
if (sourceProp) {
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
@@ -26513,8 +28996,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
- var t = types_10[_i];
+ for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+ var t = types_13[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -26555,7 +29038,13 @@ var ts;
inferenceSucceeded = !!unionOrSuperType;
}
else {
- inferredType = emptyObjectType;
+ var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ if (defaultType) {
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ }
+ else {
+ inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ }
inferenceSucceeded = true;
}
context.inferredTypes[index] = inferredType;
@@ -26588,19 +29077,7 @@ var ts;
return links.resolvedSymbol;
}
function isInTypeQuery(node) {
- while (node) {
- switch (node.kind) {
- case 160:
- return true;
- case 70:
- case 141:
- node = node.parent;
- continue;
- default:
- return false;
- }
- }
- ts.Debug.fail("should not get here");
+ return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; });
}
function getFlowCacheKey(node) {
if (node.kind === 70) {
@@ -26610,7 +29087,7 @@ var ts;
if (node.kind === 98) {
return "0";
}
- if (node.kind === 177) {
+ if (node.kind === 178) {
var key = getFlowCacheKey(node.expression);
return key && key + "." + node.name.text;
}
@@ -26621,7 +29098,7 @@ var ts;
case 70:
case 98:
return node;
- case 177:
+ case 178:
return getLeftmostIdentifierOrThis(node.expression);
}
return undefined;
@@ -26630,19 +29107,21 @@ var ts;
switch (source.kind) {
case 70:
return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) ||
- (target.kind === 223 || target.kind === 174) &&
+ (target.kind === 225 || target.kind === 175) &&
getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
case 98:
return target.kind === 98;
- case 177:
- return target.kind === 177 &&
+ case 96:
+ return target.kind === 96;
+ case 178:
+ return target.kind === 178 &&
source.name.text === target.name.text &&
isMatchingReference(source.expression, target.expression);
}
return false;
}
function containsMatchingReference(source, target) {
- while (source.kind === 177) {
+ while (source.kind === 178) {
source = source.expression;
if (isMatchingReference(source, target)) {
return true;
@@ -26651,7 +29130,7 @@ var ts;
return false;
}
function containsMatchingReferenceDiscriminant(source, target) {
- return target.kind === 177 &&
+ return target.kind === 178 &&
containsMatchingReference(source, target.expression) &&
isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
}
@@ -26659,7 +29138,7 @@ var ts;
if (expr.kind === 70) {
return getTypeOfSymbol(getResolvedSymbol(expr));
}
- if (expr.kind === 177) {
+ if (expr.kind === 178) {
var type = getDeclaredTypeOfReference(expr.expression);
return type && getTypeOfPropertyOfType(type, expr.name.text);
}
@@ -26668,9 +29147,9 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && prop.flags & 268435456) {
+ if (prop && getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
- prop.isDiscriminantProperty = prop.hasNonUniformType && isLiteralType(getTypeOfSymbol(prop));
+ prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
return prop.isDiscriminantProperty;
}
@@ -26689,7 +29168,7 @@ var ts;
}
}
}
- if (callExpression.expression.kind === 177 &&
+ if (callExpression.expression.kind === 178 &&
isOrContainsMatchingReference(reference, callExpression.expression.expression)) {
return true;
}
@@ -26728,8 +29207,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
result |= getTypeFacts(t);
}
return result;
@@ -26737,7 +29216,7 @@ var ts;
function isFunctionObjectType(type) {
var resolved = resolveStructuredTypeMembers(type);
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
- resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType));
+ resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
}
function getTypeFacts(type) {
var flags = type.flags;
@@ -26780,9 +29259,11 @@ var ts;
if (flags & 512) {
return strictNullChecks ? 1981320 : 4193160;
}
- if (flags & 16384) {
- var constraint = getConstraintOfTypeParameter(type);
- return getTypeFacts(constraint || emptyObjectType);
+ if (flags & 16777216) {
+ return strictNullChecks ? 6166480 : 8378320;
+ }
+ if (flags & 540672) {
+ return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
}
if (flags & 196608) {
return getTypeFactsOfTypes(type.types);
@@ -26808,17 +29289,23 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, undefined, false) ||
+ checkIteratedTypeOrElementType(type, undefined, false, false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, undefined, false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
- return node.parent.kind === 175 || node.parent.kind === 257 ?
+ var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) ||
+ node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent);
+ return isDestructuringDefaultAssignment ?
getTypeWithDefault(getAssignedType(node), node.right) :
getTypeOfExpression(node.right);
}
+ function isDestructuringAssignmentTarget(parent) {
+ return parent.parent.kind === 193 && parent.parent.left === parent ||
+ parent.parent.kind === 215 && parent.parent.initializer === parent;
+ }
function getAssignedTypeOfArrayLiteralElement(node, element) {
return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element));
}
@@ -26834,21 +29321,21 @@ var ts;
function getAssignedType(node) {
var parent = node.parent;
switch (parent.kind) {
- case 212:
+ case 214:
return stringType;
- case 213:
- return checkRightHandSideOfForOf(parent.expression) || unknownType;
- case 192:
+ case 215:
+ return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType;
+ case 193:
return getAssignedTypeOfBinaryExpression(parent);
- case 186:
+ case 187:
return undefinedType;
- case 175:
+ case 176:
return getAssignedTypeOfArrayLiteralElement(parent, node);
- case 196:
+ case 197:
return getAssignedTypeOfSpreadExpression(parent);
- case 257:
+ case 260:
return getAssignedTypeOfPropertyAssignment(parent);
- case 258:
+ case 261:
return getAssignedTypeOfShorthandPropertyAssignment(parent);
}
return unknownType;
@@ -26856,7 +29343,7 @@ var ts;
function getInitialTypeOfBindingElement(node) {
var pattern = node.parent;
var parentType = getInitialType(pattern.parent);
- var type = pattern.kind === 172 ?
+ var type = pattern.kind === 173 ?
getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
!node.dotDotDotToken ?
getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) :
@@ -26871,35 +29358,35 @@ var ts;
if (node.initializer) {
return getTypeOfInitializer(node.initializer);
}
- if (node.parent.parent.kind === 212) {
+ if (node.parent.parent.kind === 214) {
return stringType;
}
- if (node.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType;
+ if (node.parent.parent.kind === 215) {
+ return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType;
}
return unknownType;
}
function getInitialType(node) {
- return node.kind === 223 ?
+ return node.kind === 225 ?
getInitialTypeOfVariableDeclaration(node) :
getInitialTypeOfBindingElement(node);
}
function getInitialOrAssignedType(node) {
- return node.kind === 223 || node.kind === 174 ?
+ return node.kind === 225 || node.kind === 175 ?
getInitialType(node) :
getAssignedType(node);
}
function isEmptyArrayAssignment(node) {
- return node.kind === 223 && node.initializer &&
+ return node.kind === 225 && node.initializer &&
isEmptyArrayLiteral(node.initializer) ||
- node.kind !== 174 && node.parent.kind === 192 &&
+ node.kind !== 175 && node.parent.kind === 193 &&
isEmptyArrayLiteral(node.parent.right);
}
function getReferenceCandidate(node) {
switch (node.kind) {
- case 183:
+ case 184:
return getReferenceCandidate(node.expression);
- case 192:
+ case 193:
switch (node.operatorToken.kind) {
case 57:
return getReferenceCandidate(node.left);
@@ -26911,13 +29398,13 @@ var ts;
}
function getReferenceRoot(node) {
var parent = node.parent;
- return parent.kind === 183 ||
- parent.kind === 192 && parent.operatorToken.kind === 57 && parent.left === node ||
- parent.kind === 192 && parent.operatorToken.kind === 25 && parent.right === node ?
+ return parent.kind === 184 ||
+ parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node ||
+ parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ?
getReferenceRoot(parent) : node;
}
function getTypeOfSwitchClause(clause) {
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
return isUnitType(caseType) ? caseType : undefined;
}
@@ -26963,8 +29450,29 @@ var ts;
}
return f(type) ? type : neverType;
}
- function mapType(type, f) {
- return type.flags & 65536 ? getUnionType(ts.map(type.types, f)) : f(type);
+ function mapType(type, mapper) {
+ if (!(type.flags & 65536)) {
+ return mapper(type);
+ }
+ var types = type.types;
+ var mappedType;
+ var mappedTypes;
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var t = mapper(current);
+ if (t) {
+ if (!mappedType) {
+ mappedType = t;
+ }
+ else if (!mappedTypes) {
+ mappedTypes = [mappedType, t];
+ }
+ else {
+ mappedTypes.push(t);
+ }
+ }
+ }
+ return mappedTypes ? getUnionType(mappedTypes) : mappedType;
}
function extractTypesOfKind(type, kind) {
return filterType(type, function (t) { return (t.flags & kind) !== 0; });
@@ -26998,7 +29506,7 @@ var ts;
return evolvingArrayTypes[elementType.id] || (evolvingArrayTypes[elementType.id] = createEvolvingArrayType(elementType));
}
function addEvolvingArrayElementType(evolvingArrayType, node) {
- var elementType = getBaseTypeOfLiteralType(getTypeOfExpression(node));
+ var elementType = getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node));
return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));
}
function createFinalArrayType(elementType) {
@@ -27019,8 +29527,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var t = types_16[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -27038,11 +29546,11 @@ var ts;
function isEvolvingArrayOperationTarget(node) {
var root = getReferenceRoot(node);
var parent = root.parent;
- var isLengthPushOrUnshift = parent.kind === 177 && (parent.name.text === "length" ||
- parent.parent.kind === 179 && ts.isPushOrUnshiftIdentifier(parent.name));
- var isElementAssignment = parent.kind === 178 &&
+ var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" ||
+ parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name));
+ var isElementAssignment = parent.kind === 179 &&
parent.expression === root &&
- parent.parent.kind === 192 &&
+ parent.parent.kind === 193 &&
parent.parent.operatorToken.kind === 57 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
@@ -27069,19 +29577,17 @@ var ts;
}
return false;
}
- function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) {
+ function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+ if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 1033215)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
return declaredType;
}
- var initialType = assumeInitialized ? declaredType :
- declaredType === autoType || declaredType === autoArrayType ? undefinedType :
- includeFalsyTypes(declaredType, 2048);
var visitedFlowStart = visitedFlowCount;
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
visitedFlowCount = visitedFlowStart;
var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType);
- if (reference.parent.kind === 201 && getTypeWithFacts(resultType, 524288).flags & 8192) {
+ if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) {
return declaredType;
}
return resultType;
@@ -27095,7 +29601,16 @@ var ts;
}
}
var type = void 0;
- if (flow.flags & 16) {
+ if (flow.flags & 4096) {
+ flow.locked = true;
+ type = getTypeAtFlowNode(flow.antecedent);
+ flow.locked = false;
+ }
+ else if (flow.flags & 2048) {
+ flow = flow.antecedent;
+ continue;
+ }
+ else if (flow.flags & 16) {
type = getTypeAtFlowAssignment(flow);
if (!type) {
flow = flow.antecedent;
@@ -27126,7 +29641,7 @@ var ts;
}
else if (flow.flags & 2) {
var container = flow.container;
- if (container && container !== flowContainer && reference.kind !== 177) {
+ if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) {
flow = container.flowNode;
continue;
}
@@ -27169,7 +29684,7 @@ var ts;
}
function getTypeAtFlowArrayMutation(flow) {
var node = flow.node;
- var expr = node.kind === 179 ?
+ var expr = node.kind === 180 ?
node.expression.expression :
node.left.expression;
if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -27177,7 +29692,7 @@ var ts;
var type = getTypeFromFlowType(flowType);
if (getObjectFlags(type) & 256) {
var evolvedType_1 = type;
- if (node.kind === 179) {
+ if (node.kind === 180) {
for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
var arg = _a[_i];
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -27229,6 +29744,9 @@ var ts;
var seenIncomplete = false;
for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) {
var antecedent = _a[_i];
+ if (antecedent.flags & 2048 && antecedent.lock.locked) {
+ continue;
+ }
var flowType = getTypeAtFlowNode(antecedent);
var type = getTypeFromFlowType(flowType);
if (type === declaredType && declaredType === initialType) {
@@ -27252,8 +29770,9 @@ var ts;
if (!key) {
key = getFlowCacheKey(reference);
}
- if (cache[key]) {
- return cache[key];
+ var cached = cache.get(key);
+ if (cached) {
+ return cached;
}
for (var i = flowLoopStart; i < flowLoopCount; i++) {
if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key && flowLoopTypes[i].length) {
@@ -27275,8 +29794,9 @@ var ts;
firstAntecedentType = flowType;
}
var type = getTypeFromFlowType(flowType);
- if (cache[key]) {
- return cache[key];
+ var cached_1 = cache.get(key);
+ if (cached_1) {
+ return cached_1;
}
if (!ts.contains(antecedentTypes, type)) {
antecedentTypes.push(type);
@@ -27292,10 +29812,11 @@ var ts;
if (isIncomplete(firstAntecedentType)) {
return createFlowType(result, true);
}
- return cache[key] = result;
+ cache.set(key, result);
+ return result;
}
function isMatchingReferenceDiscriminant(expr) {
- return expr.kind === 177 &&
+ return expr.kind === 178 &&
declaredType.flags & 65536 &&
isMatchingReference(reference, expr.expression) &&
isDiscriminantProperty(declaredType, expr.name.text);
@@ -27329,10 +29850,10 @@ var ts;
var operator_1 = expr.operatorToken.kind;
var left_1 = getReferenceCandidate(expr.left);
var right_1 = getReferenceCandidate(expr.right);
- if (left_1.kind === 187 && right_1.kind === 9) {
+ if (left_1.kind === 188 && right_1.kind === 9) {
return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
}
- if (right_1.kind === 187 && left_1.kind === 9) {
+ if (right_1.kind === 188 && left_1.kind === 9) {
return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
}
if (isMatchingReference(reference, left_1)) {
@@ -27378,7 +29899,7 @@ var ts;
assumeTrue ? 16384 : 131072;
return getTypeWithFacts(type, facts);
}
- if (type.flags & 33281) {
+ if (type.flags & 16810497) {
return type;
}
if (assumeTrue) {
@@ -27403,14 +29924,22 @@ var ts;
assumeTrue = !assumeTrue;
}
if (assumeTrue && !(type.flags & 65536)) {
- var targetType = typeofTypesByName[literal.text];
- if (targetType && isTypeSubtypeOf(targetType, type)) {
- return targetType;
+ var targetType = typeofTypesByName.get(literal.text);
+ if (targetType) {
+ if (isTypeSubtypeOf(targetType, type)) {
+ return targetType;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type) || anyType;
+ if (isTypeSubtypeOf(targetType, constraint)) {
+ return getIntersectionType([type, targetType]);
+ }
+ }
}
}
var facts = assumeTrue ?
- typeofEQFacts[literal.text] || 64 :
- typeofNEFacts[literal.text] || 8192;
+ typeofEQFacts.get(literal.text) || 64 :
+ typeofNEFacts.get(literal.text) || 8192;
return getTypeWithFacts(type, facts);
}
function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) {
@@ -27479,10 +30008,9 @@ var ts;
return assignableType;
}
}
- var targetType = type.flags & 16384 ? getApparentType(type) : type;
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
- isTypeAssignableTo(candidate, targetType) ? candidate :
+ isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
}
function narrowTypeByTypePredicate(type, callExpression, assumeTrue) {
@@ -27510,7 +30038,7 @@ var ts;
}
else {
var invokedExpression = ts.skipParentheses(callExpression.expression);
- if (invokedExpression.kind === 178 || invokedExpression.kind === 177) {
+ if (invokedExpression.kind === 179 || invokedExpression.kind === 178) {
var accessExpression = invokedExpression;
var possibleReference = ts.skipParentheses(accessExpression.expression);
if (isMatchingReference(reference, possibleReference)) {
@@ -27527,15 +30055,16 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 96:
+ case 178:
return narrowTypeByTruthiness(type, expr, assumeTrue);
- case 179:
+ case 180:
return narrowTypeByTypePredicate(type, expr, assumeTrue);
- case 183:
+ case 184:
return narrowType(type, expr.expression, assumeTrue);
- case 192:
+ case 193:
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
- case 190:
+ case 191:
if (expr.operator === 50) {
return narrowType(type, expr.operand, !assumeTrue);
}
@@ -27559,15 +30088,12 @@ var ts;
return getTypeOfSymbol(symbol);
}
function getControlFlowContainer(node) {
- while (true) {
- node = node.parent;
- if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
- node.kind === 231 ||
- node.kind === 261 ||
- node.kind === 147) {
- return node;
- }
- }
+ return ts.findAncestor(node.parent, function (node) {
+ return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
+ node.kind === 233 ||
+ node.kind === 264 ||
+ node.kind === 148;
+ });
}
function isParameterAssigned(symbol) {
var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
@@ -27581,21 +30107,13 @@ var ts;
return symbol.isAssigned || false;
}
function hasParentWithAssignmentsMarked(node) {
- while (true) {
- node = node.parent;
- if (!node) {
- return false;
- }
- if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304) {
- return true;
- }
- }
+ return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); });
}
function markParameterAssignments(node) {
if (node.kind === 70) {
if (ts.isAssignmentTarget(node)) {
var symbol = getResolvedSymbol(node);
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 144) {
+ if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) {
symbol.isAssigned = true;
}
}
@@ -27607,6 +30125,14 @@ var ts;
function isConstVariable(symbol) {
return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
}
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
+ var annotationIncludesUndefined = strictNullChecks &&
+ declaration.kind === 145 &&
+ declaration.initializer &&
+ getFalsyFlags(declaredType) & 2048 &&
+ !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
+ return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -27615,16 +30141,14 @@ var ts;
if (symbol === argumentsSymbol) {
var container = ts.getContainingFunction(node);
if (languageVersion < 2) {
- if (container.kind === 185) {
+ if (container.kind === 186) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
}
else if (ts.hasModifier(container, 256)) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
}
}
- if (node.flags & 524288) {
- getNodeLinks(container).flags |= 8192;
- }
+ getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
@@ -27633,7 +30157,7 @@ var ts;
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
if (localOrExportSymbol.flags & 32) {
var declaration_1 = localOrExportSymbol.valueDeclaration;
- if (declaration_1.kind === 226
+ if (declaration_1.kind === 228
&& ts.nodeIsDecorated(declaration_1)) {
var container = ts.getContainingClass(node);
while (container !== undefined) {
@@ -27645,11 +30169,11 @@ var ts;
container = ts.getContainingClass(container);
}
}
- else if (declaration_1.kind === 197) {
+ else if (declaration_1.kind === 198) {
var container = ts.getThisContainer(node, false);
while (container !== undefined) {
if (container.parent === declaration_1) {
- if (container.kind === 147 && ts.hasModifier(container, 32)) {
+ if (container.kind === 148 && ts.hasModifier(container, 32)) {
getNodeLinks(declaration_1).flags |= 8388608;
getNodeLinks(node).flags |= 16777216;
}
@@ -27661,6 +30185,7 @@ var ts;
}
checkCollisionWithCapturedSuperVariable(node, node);
checkCollisionWithCapturedThisVariable(node, node);
+ checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
var type = getTypeOfSymbol(localOrExportSymbol);
var declaration = localOrExportSymbol.valueDeclaration;
@@ -27678,22 +30203,25 @@ var ts;
if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) {
return type;
}
- var isParameter = ts.getRootDeclaration(declaration).kind === 144;
+ var isParameter = ts.getRootDeclaration(declaration).kind === 145;
var declarationContainer = getControlFlowContainer(declaration);
var flowContainer = getControlFlowContainer(node);
var isOuterVariable = flowContainer !== declarationContainer;
- while (flowContainer !== declarationContainer && (flowContainer.kind === 184 ||
- flowContainer.kind === 185 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
+ while (flowContainer !== declarationContainer && (flowContainer.kind === 185 ||
+ flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
(isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
flowContainer = getControlFlowContainer(flowContainer);
}
var assumeInitialized = isParameter || isOuterVariable ||
- type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0) ||
+ type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) ||
ts.isInAmbientContext(declaration);
- var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
+ var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
+ type === autoType || type === autoArrayType ? undefinedType :
+ includeFalsyTypes(type, 2048);
+ var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(declaration.name, ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));
error(node, ts.Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
}
@@ -27707,19 +30235,12 @@ var ts;
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isInsideFunction(node, threshold) {
- var current = node;
- while (current && current !== threshold) {
- if (ts.isFunctionLike(current)) {
- return true;
- }
- current = current.parent;
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
}
function checkNestedBlockScopedBinding(node, symbol) {
if (languageVersion >= 2 ||
(symbol.flags & (2 | 32)) === 0 ||
- symbol.valueDeclaration.parent.kind === 256) {
+ symbol.valueDeclaration.parent.kind === 259) {
return;
}
var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
@@ -27737,8 +30258,8 @@ var ts;
if (usedInFunction) {
getNodeLinks(current).flags |= 65536;
}
- if (container.kind === 211 &&
- ts.getAncestor(symbol.valueDeclaration, 224).parent === container &&
+ if (container.kind === 213 &&
+ ts.getAncestor(symbol.valueDeclaration, 226).parent === container &&
isAssignedInBodyOfForStatement(node, container)) {
getNodeLinks(symbol.valueDeclaration).flags |= 2097152;
}
@@ -27750,33 +30271,25 @@ var ts;
}
function isAssignedInBodyOfForStatement(node, container) {
var current = node;
- while (current.parent.kind === 183) {
+ while (current.parent.kind === 184) {
current = current.parent;
}
var isAssigned = false;
if (ts.isAssignmentTarget(current)) {
isAssigned = true;
}
- else if ((current.parent.kind === 190 || current.parent.kind === 191)) {
+ else if ((current.parent.kind === 191 || current.parent.kind === 192)) {
var expr = current.parent;
isAssigned = expr.operator === 42 || expr.operator === 43;
}
if (!isAssigned) {
return false;
}
- while (current !== container) {
- if (current === container.statement) {
- return true;
- }
- else {
- current = current.parent;
- }
- }
- return false;
+ return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
}
function captureLexicalThis(node, container) {
getNodeLinks(node).flags |= 2;
- if (container.kind === 147 || container.kind === 150) {
+ if (container.kind === 148 || container.kind === 151) {
var classNode = container.parent;
getNodeLinks(classNode).flags |= 4;
}
@@ -27807,42 +30320,45 @@ var ts;
var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
return baseConstructorType === nullWideningType;
}
+ function checkThisBeforeSuper(node, container, diagnosticMessage) {
+ var containingClassDecl = container.parent;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
+ if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
+ var superCall = getSuperCallInConstructor(container);
+ if (!superCall || superCall.end > node.pos) {
+ error(node, diagnosticMessage);
+ }
+ }
+ }
function checkThisExpression(node) {
var container = ts.getThisContainer(node, true);
var needToCaptureLexicalThis = false;
- if (container.kind === 150) {
- var containingClassDecl = container.parent;
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
- if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
- var superCall = getSuperCallInConstructor(container);
- if (!superCall || superCall.end > node.pos) {
- error(node, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
- }
- }
+ if (container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
}
- if (container.kind === 185) {
+ if (container.kind === 186) {
container = ts.getThisContainer(container, false);
needToCaptureLexicalThis = (languageVersion < 2);
}
switch (container.kind) {
- case 230:
+ case 232:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
break;
- case 229:
+ case 231:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
break;
- case 150:
+ case 151:
if (isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
}
break;
+ case 148:
case 147:
- case 146:
if (ts.getModifierFlags(container) & 32) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
}
break;
- case 142:
+ case 143:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
break;
}
@@ -27851,8 +30367,8 @@ var ts;
}
if (ts.isFunctionLike(container) &&
(!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) {
- if (container.kind === 184 &&
- ts.isInJavaScriptFile(container.parent) &&
+ if (container.kind === 185 &&
+ container.parent.kind === 193 &&
ts.getSpecialPropertyAssignmentKind(container.parent) === 3) {
var className = container.parent
.left
@@ -27871,7 +30387,7 @@ var ts;
if (ts.isClassLike(container.parent)) {
var symbol = getSymbolOfNode(container.parent);
var type = ts.hasModifier(container, 32) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
- return getFlowTypeOfReference(node, type, true, undefined);
+ return getFlowTypeOfReference(node, type);
}
if (ts.isInJavaScriptFile(node)) {
var type = getTypeForThisExpressionFromJSDoc(container);
@@ -27879,34 +30395,29 @@ var ts;
return type;
}
}
- if (compilerOptions.noImplicitThis) {
+ if (noImplicitThis) {
error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
}
return anyType;
}
function getTypeForThisExpressionFromJSDoc(node) {
var jsdocType = ts.getJSDocType(node);
- if (jsdocType && jsdocType.kind === 274) {
+ if (jsdocType && jsdocType.kind === 278) {
var jsDocFunctionType = jsdocType;
- if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 277) {
+ if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) {
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
}
}
}
function isInConstructorArgumentInitializer(node, constructorDecl) {
- for (var n = node; n && n !== constructorDecl; n = n.parent) {
- if (n.kind === 144) {
- return true;
- }
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; });
}
function checkSuperExpression(node) {
- var isCallExpression = node.parent.kind === 179 && node.parent.expression === node;
+ var isCallExpression = node.parent.kind === 180 && node.parent.expression === node;
var container = ts.getSuperContainer(node, true);
var needToCaptureLexicalThis = false;
if (!isCallExpression) {
- while (container && container.kind === 185) {
+ while (container && container.kind === 186) {
container = ts.getSuperContainer(container, true);
needToCaptureLexicalThis = languageVersion < 2;
}
@@ -27914,17 +30425,14 @@ var ts;
var canUseSuperExpression = isLegalUsageOfSuperExpression(container);
var nodeCheckFlag = 0;
if (!canUseSuperExpression) {
- var current = node;
- while (current && current !== container && current.kind !== 142) {
- current = current.parent;
- }
- if (current && current.kind === 142) {
+ var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; });
+ if (current && current.kind === 143) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
}
else if (isCallExpression) {
error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
}
- else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 176)) {
+ else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) {
error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
}
else {
@@ -27932,6 +30440,9 @@ var ts;
}
return unknownType;
}
+ if (!isCallExpression && container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
+ }
if ((ts.getModifierFlags(container) & 32) || isCallExpression) {
nodeCheckFlag = 512;
}
@@ -27939,7 +30450,7 @@ var ts;
nodeCheckFlag = 256;
}
getNodeLinks(node).flags |= nodeCheckFlag;
- if (container.kind === 149 && ts.getModifierFlags(container) & 256) {
+ if (container.kind === 150 && ts.getModifierFlags(container) & 256) {
if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
getNodeLinks(container).flags |= 4096;
}
@@ -27950,7 +30461,7 @@ var ts;
if (needToCaptureLexicalThis) {
captureLexicalThis(node.parent, container);
}
- if (container.parent.kind === 176) {
+ if (container.parent.kind === 177) {
if (languageVersion < 2) {
error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
return unknownType;
@@ -27968,7 +30479,7 @@ var ts;
}
return unknownType;
}
- if (container.kind === 150 && isInConstructorArgumentInitializer(node, container)) {
+ if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
return unknownType;
}
@@ -27980,32 +30491,50 @@ var ts;
return false;
}
if (isCallExpression) {
- return container.kind === 150;
+ return container.kind === 151;
}
else {
- if (ts.isClassLike(container.parent) || container.parent.kind === 176) {
+ if (ts.isClassLike(container.parent) || container.parent.kind === 177) {
if (ts.getModifierFlags(container) & 32) {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
- container.kind === 152;
+ return container.kind === 150 ||
+ container.kind === 149 ||
+ container.kind === 152 ||
+ container.kind === 153;
}
else {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
+ return container.kind === 150 ||
+ container.kind === 149 ||
container.kind === 152 ||
+ container.kind === 153 ||
+ container.kind === 148 ||
container.kind === 147 ||
- container.kind === 146 ||
- container.kind === 150;
+ container.kind === 151;
}
}
}
return false;
}
}
+ function getContainingObjectLiteral(func) {
+ return (func.kind === 150 ||
+ func.kind === 152 ||
+ func.kind === 153) && func.parent.kind === 177 ? func.parent :
+ func.kind === 185 && func.parent.kind === 260 ? func.parent.parent :
+ undefined;
+ }
+ function getThisTypeArgument(type) {
+ return getObjectFlags(type) & 4 && type.target === globalThisType ? type.typeArguments[0] : undefined;
+ }
+ function getThisTypeFromContextualType(type) {
+ return mapType(type, function (t) {
+ return t.flags & 131072 ? ts.forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);
+ });
+ }
function getContextualThisParameterType(func) {
- if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 185) {
+ if (func.kind === 186) {
+ return undefined;
+ }
+ if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
var thisParameter = contextualSignature.thisParameter;
@@ -28014,29 +30543,55 @@ var ts;
}
}
}
+ if (noImplicitThis) {
+ var containingLiteral = getContainingObjectLiteral(func);
+ if (containingLiteral) {
+ var contextualType = getApparentTypeOfContextualType(containingLiteral);
+ var literal = containingLiteral;
+ var type = contextualType;
+ while (type) {
+ var thisType = getThisTypeFromContextualType(type);
+ if (thisType) {
+ return instantiateType(thisType, getContextualMapper(containingLiteral));
+ }
+ if (literal.parent.kind !== 260) {
+ break;
+ }
+ literal = literal.parent.parent;
+ type = getApparentTypeOfContextualType(literal);
+ }
+ return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral);
+ }
+ if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) {
+ var target = func.parent.left;
+ if (target.kind === 178 || target.kind === 179) {
+ return checkExpressionCached(target.expression);
+ }
+ }
+ }
return undefined;
}
function getContextuallyTypedParameterType(parameter) {
var func = parameter.parent;
if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var iife = ts.getImmediatelyInvokedFunctionExpression(func);
- if (iife) {
+ if (iife && iife.arguments) {
var indexOfParameter = ts.indexOf(func.parameters, parameter);
- if (iife.arguments && indexOfParameter < iife.arguments.length) {
- if (parameter.dotDotDotToken) {
- var restTypes = [];
- for (var i = indexOfParameter; i < iife.arguments.length; i++) {
- restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
- }
- return createArrayType(getUnionType(restTypes));
- }
- var links = getNodeLinks(iife);
- var cached = links.resolvedSignature;
- links.resolvedSignature = anySignature;
- var type = getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter]));
- links.resolvedSignature = cached;
- return type;
- }
+ if (parameter.dotDotDotToken) {
+ var restTypes = [];
+ for (var i = indexOfParameter; i < iife.arguments.length; i++) {
+ restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
+ }
+ return restTypes.length ? createArrayType(getUnionType(restTypes)) : undefined;
+ }
+ var links = getNodeLinks(iife);
+ var cached = links.resolvedSignature;
+ links.resolvedSignature = anySignature;
+ var type = indexOfParameter < iife.arguments.length ?
+ getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter])) :
+ parameter.initializer ? undefined : undefinedWideningType;
+ links.resolvedSignature = cached;
+ return type;
}
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -28061,7 +30616,7 @@ var ts;
if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var type = getContextuallyTypedParameterType(declaration);
if (type) {
return type;
@@ -28072,11 +30627,11 @@ var ts;
}
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
- var name_19 = declaration.propertyName || declaration.name;
- if (ts.isVariableLike(parentDeclaration) &&
+ var name = declaration.propertyName || declaration.name;
+ if (parentDeclaration.kind !== 175 &&
parentDeclaration.type &&
- !ts.isBindingPattern(name_19)) {
- var text = ts.getTextOfPropertyName(name_19);
+ !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
if (text) {
return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
}
@@ -28087,33 +30642,34 @@ var ts;
}
function getContextualTypeForReturnExpression(node) {
var func = ts.getContainingFunction(node);
- if (ts.isAsyncFunctionLike(func)) {
- var contextualReturnType = getContextualReturnType(func);
- if (contextualReturnType) {
- return getPromisedType(contextualReturnType);
+ if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
+ return undefined;
}
- return undefined;
- }
- if (func && !func.asteriskToken) {
- return getContextualReturnType(func);
+ var contextualReturnType = getContextualReturnType(func);
+ return functionFlags & 2
+ ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType)
+ : contextualReturnType;
}
return undefined;
}
function getContextualTypeForYieldOperand(node) {
var func = ts.getContainingFunction(node);
if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
var contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return node.asteriskToken
? contextualReturnType
- : getElementTypeOfIterableIterator(contextualReturnType);
+ : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2) !== 0);
}
}
return undefined;
}
function isInParameterInitializerBeforeContainingFunction(node) {
while (node.parent && !ts.isFunctionLike(node.parent)) {
- if (node.parent.kind === 144 && node.parent.initializer === node) {
+ if (node.parent.kind === 145 && node.parent.initializer === node) {
return true;
}
node = node.parent;
@@ -28122,8 +30678,8 @@ var ts;
}
function getContextualReturnType(functionDecl) {
if (functionDecl.type ||
- functionDecl.kind === 150 ||
- functionDecl.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 152))) {
+ functionDecl.kind === 151 ||
+ functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -28142,7 +30698,7 @@ var ts;
return undefined;
}
function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
- if (template.parent.kind === 181) {
+ if (template.parent.kind === 182) {
return getContextualTypeForArgument(template.parent, substitutionExpression);
}
return undefined;
@@ -28172,38 +30728,14 @@ var ts;
}
return undefined;
}
- function applyToContextualType(type, mapper) {
- if (!(type.flags & 65536)) {
- return mapper(type);
- }
- var types = type.types;
- var mappedType;
- var mappedTypes;
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var current = types_13[_i];
- var t = mapper(current);
- if (t) {
- if (!mappedType) {
- mappedType = t;
- }
- else if (!mappedTypes) {
- mappedTypes = [mappedType, t];
- }
- else {
- mappedTypes.push(t);
- }
- }
- }
- return mappedTypes ? getUnionType(mappedTypes) : mappedType;
- }
function getTypeOfPropertyOfContextualType(type, name) {
- return applyToContextualType(type, function (t) {
+ return mapType(type, function (t) {
var prop = t.flags & 229376 ? getPropertyOfType(t, name) : undefined;
return prop ? getTypeOfSymbol(prop) : undefined;
});
}
function getIndexTypeOfContextualType(type, kind) {
- return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
+ return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
}
function contextualTypeIsTupleLikeType(type) {
return !!(type.flags & 65536 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type));
@@ -28238,7 +30770,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1)
- || (languageVersion >= 2 ? getElementTypeOfIterable(type, undefined) : undefined);
+ || getIteratedTypeOrElementType(type, undefined, false, false, false);
}
return undefined;
}
@@ -28247,19 +30779,16 @@ var ts;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
}
function getContextualTypeForJsxAttribute(attribute) {
- var kind = attribute.kind;
- var jsxElement = attribute.parent;
- var attrsType = getJsxElementAttributesType(jsxElement);
- if (attribute.kind === 250) {
- if (!attrsType || isTypeAny(attrsType)) {
+ var attributesType = getContextualType(attribute.parent);
+ if (ts.isJsxAttribute(attribute)) {
+ if (!attributesType || isTypeAny(attributesType)) {
return undefined;
}
- return getTypeOfPropertyOfType(attrsType, attribute.name.text);
+ return getTypeOfPropertyOfType(attributesType, attribute.name.text);
}
- else if (attribute.kind === 251) {
- return attrsType;
+ else {
+ return attributesType;
}
- ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]");
}
function getApparentTypeOfContextualType(node) {
var type = getContextualType(node);
@@ -28274,45 +30803,52 @@ var ts;
}
var parent = node.parent;
switch (parent.kind) {
- case 223:
- case 144:
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 174:
+ case 175:
return getContextualTypeForInitializerExpression(node);
- case 185:
- case 216:
+ case 186:
+ case 218:
return getContextualTypeForReturnExpression(node);
- case 195:
+ case 196:
return getContextualTypeForYieldOperand(parent);
- case 179:
case 180:
+ case 181:
return getContextualTypeForArgument(parent, node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return getTypeFromTypeNode(parent.type);
- case 192:
+ case 193:
return getContextualTypeForBinaryOperand(node);
- case 257:
- case 258:
+ case 260:
+ case 261:
return getContextualTypeForObjectLiteralElement(parent);
- case 175:
+ case 176:
return getContextualTypeForElementExpression(node);
- case 193:
+ case 194:
return getContextualTypeForConditionalOperand(node);
- case 202:
- ts.Debug.assert(parent.parent.kind === 194);
+ case 204:
+ ts.Debug.assert(parent.parent.kind === 195);
return getContextualTypeForSubstitutionExpression(parent.parent, node);
- case 183:
+ case 184:
return getContextualType(parent);
- case 252:
+ case 255:
return getContextualType(parent);
- case 250:
- case 251:
+ case 252:
+ case 254:
return getContextualTypeForJsxAttribute(parent);
+ case 250:
+ case 249:
+ return getAttributesTypeFromJsxOpeningLikeElement(parent);
}
return undefined;
}
+ function getContextualMapper(node) {
+ node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
+ return node ? node.contextualMapper : identityMapper;
+ }
function getNonGenericSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
@@ -28337,7 +30873,7 @@ var ts;
return sourceLength < targetParameterCount;
}
function isFunctionExpressionOrArrowFunction(node) {
- return node.kind === 184 || node.kind === 185;
+ return node.kind === 185 || node.kind === 186;
}
function getContextualSignatureForFunctionLikeDeclaration(node) {
return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node)
@@ -28350,7 +30886,7 @@ var ts;
getApparentTypeOfContextualType(node);
}
function getContextualSignature(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var type = getContextualTypeForFunctionLikeDeclaration(node);
if (!type) {
return undefined;
@@ -28360,8 +30896,8 @@ var ts;
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var current = types_14[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var current = types_17[_i];
var signature = getNonGenericSignature(current, node);
if (signature) {
if (!signatureList) {
@@ -28383,37 +30919,37 @@ var ts;
}
return result;
}
- function isInferentialContext(mapper) {
- return mapper && mapper.context;
- }
- function checkSpreadExpression(node, contextualMapper) {
- var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false);
+ function checkSpreadExpression(node, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 1536);
+ }
+ var arrayOrIterableType = checkExpression(node.expression, checkMode);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false);
}
function hasDefaultValue(node) {
- return (node.kind === 174 && !!node.initializer) ||
- (node.kind === 192 && node.operatorToken.kind === 57);
+ return (node.kind === 175 && !!node.initializer) ||
+ (node.kind === 193 && node.operatorToken.kind === 57);
}
- function checkArrayLiteral(node, contextualMapper) {
+ function checkArrayLiteral(node, checkMode) {
var elements = node.elements;
var hasSpreadElement = false;
var elementTypes = [];
var inDestructuringPattern = ts.isAssignmentTarget(node);
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var e = elements_1[_i];
- if (inDestructuringPattern && e.kind === 196) {
- var restArrayType = checkExpression(e.expression, contextualMapper);
+ if (inDestructuringPattern && e.kind === 197) {
+ var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1) ||
- (languageVersion >= 2 ? getElementTypeOfIterable(restArrayType, undefined) : undefined);
+ getIteratedTypeOrElementType(restArrayType, undefined, false, false, false);
if (restElementType) {
elementTypes.push(restElementType);
}
}
else {
- var type = checkExpressionForMutableLocation(e, contextualMapper);
+ var type = checkExpressionForMutableLocation(e, checkMode);
elementTypes.push(type);
}
- hasSpreadElement = hasSpreadElement || e.kind === 196;
+ hasSpreadElement = hasSpreadElement || e.kind === 197;
}
if (!hasSpreadElement) {
if (inDestructuringPattern && elementTypes.length) {
@@ -28424,7 +30960,7 @@ var ts;
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType && contextualTypeIsTupleLikeType(contextualType)) {
var pattern = contextualType.pattern;
- if (pattern && (pattern.kind === 173 || pattern.kind === 175)) {
+ if (pattern && (pattern.kind === 174 || pattern.kind === 176)) {
var patternElements = pattern.elements;
for (var i = elementTypes.length; i < patternElements.length; i++) {
var patternElement = patternElements[i];
@@ -28432,7 +30968,7 @@ var ts;
elementTypes.push(contextualType.typeArguments[i]);
}
else {
- if (patternElement.kind !== 198) {
+ if (patternElement.kind !== 199) {
error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
elementTypes.push(unknownType);
@@ -28449,7 +30985,7 @@ var ts;
strictNullChecks ? neverType : undefinedWideningType);
}
function isNumericName(name) {
- return name.kind === 142 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
+ return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
@@ -28486,7 +31022,7 @@ var ts;
var unionType = propTypes.length ? getUnionType(propTypes, true) : undefinedType;
return createIndexInfo(unionType, false);
}
- function checkObjectLiteral(node, contextualMapper) {
+ function checkObjectLiteral(node, checkMode) {
var inDestructuringPattern = ts.isAssignmentTarget(node);
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
var propertiesTable = ts.createMap();
@@ -28495,7 +31031,8 @@ var ts;
var propagatedFlags = 0;
var contextualType = getApparentTypeOfContextualType(node);
var contextualTypeHasPattern = contextualType && contextualType.pattern &&
- (contextualType.pattern.kind === 172 || contextualType.pattern.kind === 176);
+ (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177);
+ var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node);
var typeFlags = 0;
var patternWithComputedProperties = false;
var hasComputedStringProperty = false;
@@ -28504,27 +31041,27 @@ var ts;
for (var i = 0; i < node.properties.length; i++) {
var memberDecl = node.properties[i];
var member = memberDecl.symbol;
- if (memberDecl.kind === 257 ||
- memberDecl.kind === 258 ||
+ if (memberDecl.kind === 260 ||
+ memberDecl.kind === 261 ||
ts.isObjectLiteralMethod(memberDecl)) {
var type = void 0;
- if (memberDecl.kind === 257) {
- type = checkPropertyAssignment(memberDecl, contextualMapper);
+ if (memberDecl.kind === 260) {
+ type = checkPropertyAssignment(memberDecl, checkMode);
}
- else if (memberDecl.kind === 149) {
- type = checkObjectLiteralMethod(memberDecl, contextualMapper);
+ else if (memberDecl.kind === 150) {
+ type = checkObjectLiteralMethod(memberDecl, checkMode);
}
else {
- ts.Debug.assert(memberDecl.kind === 258);
- type = checkExpressionForMutableLocation(memberDecl.name, contextualMapper);
+ ts.Debug.assert(memberDecl.kind === 261);
+ type = checkExpressionForMutableLocation(memberDecl.name, checkMode);
}
typeFlags |= type.flags;
- var prop = createSymbol(4 | 67108864 | member.flags, member.name);
+ var prop = createSymbol(4 | member.flags, member.name);
if (inDestructuringPattern) {
- var isOptional = (memberDecl.kind === 257 && hasDefaultValue(memberDecl.initializer)) ||
- (memberDecl.kind === 258 && memberDecl.objectAssignmentInitializer);
+ var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) ||
+ (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer);
if (isOptional) {
- prop.flags |= 536870912;
+ prop.flags |= 67108864;
}
if (ts.hasDynamicName(memberDecl)) {
patternWithComputedProperties = true;
@@ -28533,9 +31070,9 @@ var ts;
else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512)) {
var impliedProp = getPropertyOfType(contextualType, member.name);
if (impliedProp) {
- prop.flags |= impliedProp.flags & 536870912;
+ prop.flags |= impliedProp.flags & 67108864;
}
- else if (!compilerOptions.suppressExcessPropertyErrors) {
+ else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0)) {
error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
}
}
@@ -28548,9 +31085,12 @@ var ts;
prop.target = member;
member = prop;
}
- else if (memberDecl.kind === 259) {
+ else if (memberDecl.kind === 262) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(memberDecl, 2);
+ }
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
propertiesArray = [];
propertiesTable = ts.createMap();
hasComputedStringProperty = false;
@@ -28558,17 +31098,17 @@ var ts;
typeFlags = 0;
}
var type = checkExpression(memberDecl.expression);
- if (!(type.flags & (32768 | 1))) {
+ if (!isValidSpreadType(type)) {
error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
return unknownType;
}
- spread = getSpreadType(spread, type, false);
+ spread = getSpreadType(spread, type);
offset = i + 1;
continue;
}
else {
- ts.Debug.assert(memberDecl.kind === 151 || memberDecl.kind === 152);
- checkAccessorDeclaration(memberDecl);
+ ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153);
+ checkNodeDeferred(memberDecl);
}
if (ts.hasDynamicName(memberDecl)) {
if (isNumericName(memberDecl.name)) {
@@ -28579,34 +31119,36 @@ var ts;
}
}
else {
- propertiesTable[member.name] = member;
+ propertiesTable.set(member.name, member);
}
propertiesArray.push(member);
}
if (contextualTypeHasPattern) {
for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!propertiesTable[prop.name]) {
- if (!(prop.flags & 536870912)) {
+ if (!propertiesTable.get(prop.name)) {
+ if (!(prop.flags & 67108864)) {
error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
- propertiesTable[prop.name] = prop;
+ propertiesTable.set(prop.name, prop);
propertiesArray.push(prop);
}
}
}
if (spread !== emptyObjectType) {
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
+ }
+ if (spread.flags & 32768) {
+ spread.flags |= propagatedFlags;
+ spread.symbol = node.symbol;
}
- spread.flags |= propagatedFlags;
- spread.symbol = node.symbol;
return spread;
}
return createObjectLiteralType();
function createObjectLiteralType() {
- var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
- var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
+ var stringIndexInfo = isJSObjectLiteral ? jsObjectLiteralIndexInfo : hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
+ var numberIndexInfo = hasComputedNumberProperty && !isJSObjectLiteral ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
result.flags |= 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064);
@@ -28623,9 +31165,14 @@ var ts;
return result;
}
}
+ function isValidSpreadType(type) {
+ return !!(type.flags & (1 | 4096 | 2048 | 16777216) ||
+ type.flags & 32768 && !isGenericMappedType(type) ||
+ type.flags & 196608 && !ts.forEach(type.types, function (t) { return !isValidSpreadType(t); }));
+ }
function checkJsxSelfClosingElement(node) {
checkJsxOpeningLikeElement(node);
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function checkJsxElement(node) {
checkJsxOpeningLikeElement(node.openingElement);
@@ -28638,85 +31185,105 @@ var ts;
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
var child = _a[_i];
switch (child.kind) {
- case 252:
+ case 255:
checkJsxExpression(child);
break;
- case 246:
+ case 248:
checkJsxElement(child);
break;
- case 247:
+ case 249:
checkJsxSelfClosingElement(child);
break;
}
}
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function isUnhyphenatedJsxName(name) {
return name.indexOf("-") < 0;
}
function isJsxIntrinsicIdentifier(tagName) {
- if (tagName.kind === 177 || tagName.kind === 98) {
+ if (tagName.kind === 178 || tagName.kind === 98) {
return false;
}
else {
return ts.isIntrinsicJsxName(tagName.text);
}
}
- function checkJsxAttribute(node, elementAttributesType, nameTable) {
- var correspondingPropType = undefined;
- if (elementAttributesType === emptyObjectType && isUnhyphenatedJsxName(node.name.text)) {
- error(node.parent, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
- }
- else if (elementAttributesType && !isTypeAny(elementAttributesType)) {
- var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text);
- correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol);
- if (isUnhyphenatedJsxName(node.name.text)) {
- var attributeType = getTypeOfPropertyOfType(elementAttributesType, ts.getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0);
- if (attributeType) {
- correspondingPropType = attributeType;
+ function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, filter, checkMode) {
+ var attributes = openingLikeElement.attributes;
+ var attributesTable = ts.createMap();
+ var spread = emptyObjectType;
+ var attributesArray = [];
+ for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
+ var attributeDecl = _a[_i];
+ var member = attributeDecl.symbol;
+ if (ts.isJsxAttribute(attributeDecl)) {
+ var exprType = attributeDecl.initializer ?
+ checkExpression(attributeDecl.initializer, checkMode) :
+ trueType;
+ var attributeSymbol = createSymbol(4 | 134217728 | member.flags, member.name);
+ attributeSymbol.declarations = member.declarations;
+ attributeSymbol.parent = member.parent;
+ if (member.valueDeclaration) {
+ attributeSymbol.valueDeclaration = member.valueDeclaration;
}
- else {
- if (!correspondingPropType) {
- error(node.name, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.name.text, typeToString(elementAttributesType));
- return unknownType;
- }
+ attributeSymbol.type = exprType;
+ attributeSymbol.target = member;
+ attributesTable.set(attributeSymbol.name, attributeSymbol);
+ attributesArray.push(attributeSymbol);
+ }
+ else {
+ ts.Debug.assert(attributeDecl.kind === 254);
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ var exprType = checkExpression(attributeDecl.expression);
+ if (!isValidSpreadType(exprType)) {
+ error(attributeDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+ return anyType;
+ }
+ if (isTypeAny(exprType)) {
+ return anyType;
}
+ spread = getSpreadType(spread, exprType);
}
}
- var exprType;
- if (node.initializer) {
- exprType = checkExpression(node.initializer);
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- else {
- exprType = booleanType;
+ attributesTable = ts.createMap();
+ if (attributesArray) {
+ ts.forEach(attributesArray, function (attr) {
+ if (!filter || filter(attr)) {
+ attributesTable.set(attr.name, attr);
+ }
+ });
}
- if (correspondingPropType) {
- checkTypeAssignableTo(exprType, correspondingPropType, node);
+ return createJsxAttributesType(attributes.symbol, attributesTable);
+ function createJsxAttributesType(symbol, attributesTable) {
+ var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
+ result.flags |= 33554432 | 4194304 | freshObjectLiteralFlag;
+ result.objectFlags |= 128;
+ return result;
}
- nameTable[node.name.text] = true;
- return exprType;
}
- function checkJsxSpreadAttribute(node, elementAttributesType, nameTable) {
- var type = checkExpression(node.expression);
- var props = getPropertiesOfType(type);
- for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
- var prop = props_2[_i];
- if (!nameTable[prop.name]) {
- var targetPropSym = getPropertyOfType(elementAttributesType, prop.name);
- if (targetPropSym) {
- var msg = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property, prop.name);
- checkTypeAssignableTo(getTypeOfSymbol(prop), getTypeOfSymbol(targetPropSym), node, undefined, msg);
- }
- nameTable[prop.name] = true;
- }
- }
- return type;
+ function checkJsxAttributes(node, checkMode) {
+ return createJsxAttributesTypeFromAttributesProperty(node.parent, undefined, checkMode);
}
function getJsxType(name) {
- if (jsxTypes[name] === undefined) {
- return jsxTypes[name] = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType;
+ var jsxType = jsxTypes.get(name);
+ if (jsxType === undefined) {
+ jsxTypes.set(name, jsxType = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType);
}
- return jsxTypes[name];
+ return jsxType;
}
function getIntrinsicTagSymbol(node) {
var links = getNodeLinks(node);
@@ -28737,7 +31304,7 @@ var ts;
return links.resolvedSymbol = unknownSymbol;
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
}
return links.resolvedSymbol = unknownSymbol;
@@ -28781,23 +31348,86 @@ var ts;
return undefined;
}
}
- function getResolvedJsxType(node, elemType, elemClassType) {
- if (!elemType) {
- elemType = checkExpression(node.tagName);
+ function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var callSignature = getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, undefined);
+ if (callSignature !== unknownSignature) {
+ var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
+ var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ paramType = intersectTypes(intrinsicAttributes, paramType);
+ }
+ return paramType;
+ }
+ }
+ }
+ }
+ return undefined;
+ }
+ function tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var candidatesOutArray = [];
+ getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray);
+ var result = void 0;
+ var allMatchingAttributesType = void 0;
+ for (var _i = 0, candidatesOutArray_1 = candidatesOutArray; _i < candidatesOutArray_1.length; _i++) {
+ var candidate = candidatesOutArray_1[_i];
+ var callReturnType = getReturnTypeOfSignature(candidate);
+ var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var shouldBeCandidate = true;
+ for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
+ var attribute = _b[_a];
+ if (ts.isJsxAttribute(attribute) &&
+ isUnhyphenatedJsxName(attribute.name.text) &&
+ !getPropertyOfType(paramType, attribute.name.text)) {
+ shouldBeCandidate = false;
+ break;
+ }
+ }
+ if (shouldBeCandidate) {
+ result = intersectTypes(result, paramType);
+ }
+ allMatchingAttributesType = intersectTypes(allMatchingAttributesType, paramType);
+ }
+ }
+ if (!result) {
+ result = allMatchingAttributesType;
+ }
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ result = intersectTypes(intrinsicAttributes, result);
+ }
+ return result;
+ }
+ }
+ return undefined;
+ }
+ function resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, elementType, elementClassType) {
+ if (!elementType) {
+ elementType = checkExpression(openingLikeElement.tagName);
}
- if (elemType.flags & 65536) {
- var types = elemType.types;
- return getUnionType(ts.map(types, function (type) {
- return getResolvedJsxType(node, type, elemClassType);
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ return getUnionType(types.map(function (type) {
+ return resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, type, elementClassType);
}), true);
}
- if (elemType.flags & 2) {
+ if (elementType.flags & 2) {
return anyType;
}
- else if (elemType.flags & 32) {
+ else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elemType.text;
+ var stringLiteralTypeName = elementType.text;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -28806,28 +31436,19 @@ var ts;
if (indexSignatureType) {
return indexSignatureType;
}
- error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
+ error(openingLikeElement, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
return anyType;
}
- var elemInstanceType = getJsxElementInstanceType(node, elemType);
- if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
- if (jsxElementType) {
- var callSignatures = elemType && getSignaturesOfType(elemType, 0);
- var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
- var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
- var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
- if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
- var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
- if (intrinsicAttributes !== unknownType) {
- paramType = intersectTypes(intrinsicAttributes, paramType);
- }
- return paramType;
- }
- }
+ var elemInstanceType = getJsxElementInstanceType(openingLikeElement, elementType);
+ var statelessAttributesType = shouldIncludeAllStatelessAttributesType ?
+ tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) :
+ defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType);
+ if (statelessAttributesType) {
+ return statelessAttributesType;
}
- if (elemClassType) {
- checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
+ if (elementClassType) {
+ checkTypeRelatedTo(elemInstanceType, elementClassType, assignableRelation, openingLikeElement, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
}
if (isTypeAny(elemInstanceType)) {
return elemInstanceType;
@@ -28847,10 +31468,6 @@ var ts;
else if (isTypeAny(attributesType) || (attributesType === unknownType)) {
return attributesType;
}
- else if (attributesType.flags & 65536) {
- error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
- return anyType;
- }
else {
var apparentAttributesType = attributesType;
var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes);
@@ -28873,38 +31490,72 @@ var ts;
}
}
}
- function getJsxElementAttributesType(node) {
+ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
+ ts.Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
var links = getNodeLinks(node);
- if (!links.resolvedJsxType) {
- if (isJsxIntrinsicIdentifier(node.tagName)) {
- var symbol = getIntrinsicTagSymbol(node);
- if (links.jsxFlags & 1) {
- return links.resolvedJsxType = getTypeOfSymbol(symbol);
- }
- else if (links.jsxFlags & 2) {
- return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0).type;
- }
- else {
- return links.resolvedJsxType = unknownType;
- }
+ if (!links.resolvedJsxElementAttributesType) {
+ var symbol = getIntrinsicTagSymbol(node);
+ if (links.jsxFlags & 1) {
+ return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+ }
+ else if (links.jsxFlags & 2) {
+ return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, 0).type;
}
else {
- var elemClassType = getJsxGlobalElementClassType();
- return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType);
+ return links.resolvedJsxElementAttributesType = unknownType;
}
}
- return links.resolvedJsxType;
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType) {
+ var links = getNodeLinks(node);
+ if (!links.resolvedJsxElementAttributesType) {
+ var elemClassType = getJsxGlobalElementClassType();
+ return links.resolvedJsxElementAttributesType = resolveCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType, undefined, elemClassType);
+ }
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getAllAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, true);
+ }
+ }
+ function getAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, false);
+ }
}
function getJsxAttributePropertySymbol(attrib) {
- var attributesType = getJsxElementAttributesType(attrib.parent);
+ var attributesType = getAttributesTypeFromJsxOpeningLikeElement(attrib.parent.parent);
var prop = getPropertyOfType(attributesType, attrib.name.text);
return prop || unknownSymbol;
}
function getJsxGlobalElementClassType() {
- if (!jsxElementClassType) {
- jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ if (!deferredJsxElementClassType) {
+ deferredJsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ }
+ return deferredJsxElementClassType;
+ }
+ function getJsxGlobalElementType() {
+ if (!deferredJsxElementType) {
+ deferredJsxElementType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.Element);
+ }
+ return deferredJsxElementType;
+ }
+ function getJsxGlobalStatelessElementType() {
+ if (!deferredJsxStatelessElementType) {
+ var jsxElementType = getJsxGlobalElementType();
+ if (jsxElementType) {
+ deferredJsxStatelessElementType = getUnionType([jsxElementType, nullType]);
+ }
}
- return jsxElementClassType;
+ return deferredJsxStatelessElementType;
}
function getJsxIntrinsicTagNames() {
var intrinsics = getJsxType(JsxNames.IntrinsicElements);
@@ -28914,8 +31565,8 @@ var ts;
if ((compilerOptions.jsx || 0) === 0) {
error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
}
- if (jsxElementType === undefined) {
- if (compilerOptions.noImplicitAny) {
+ if (getJsxGlobalElementType() === undefined) {
+ if (noImplicitAny) {
error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
}
}
@@ -28932,61 +31583,83 @@ var ts;
markAliasSymbolAsReferenced(reactSym);
}
}
- var targetAttributesType = getJsxElementAttributesType(node);
- var nameTable = ts.createMap();
- var sawSpreadedAny = false;
- for (var i = node.attributes.length - 1; i >= 0; i--) {
- if (node.attributes[i].kind === 250) {
- checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable);
- }
- else {
- ts.Debug.assert(node.attributes[i].kind === 251);
- var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable);
- if (isTypeAny(spreadType)) {
- sawSpreadedAny = true;
- }
- }
+ checkJsxAttributesAssignableToTagNameAttributes(node);
+ }
+ function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
+ var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
+ getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
+ getCustomJsxElementAttributesType(openingLikeElement, false);
+ var sourceAttributesType = createJsxAttributesTypeFromAttributesProperty(openingLikeElement, function (attribute) {
+ return isUnhyphenatedJsxName(attribute.name) || !!(getPropertyOfType(targetAttributesType, attribute.name));
+ });
+ if (targetAttributesType === emptyObjectType && (isTypeAny(sourceAttributesType) || sourceAttributesType.properties.length > 0)) {
+ error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
- if (targetAttributesType && !sawSpreadedAny) {
- var targetProperties = getPropertiesOfType(targetAttributesType);
- for (var i = 0; i < targetProperties.length; i++) {
- if (!(targetProperties[i].flags & 536870912) &&
- !nameTable[targetProperties[i].name]) {
- error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType));
- }
- }
+ else {
+ checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
}
}
- function checkJsxExpression(node) {
+ function checkJsxExpression(node, checkMode) {
if (node.expression) {
- return checkExpression(node.expression);
+ var type = checkExpression(node.expression, checkMode);
+ if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
+ error(node, ts.Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
+ }
+ return type;
}
else {
return unknownType;
}
}
function getDeclarationKindFromSymbol(s) {
- return s.valueDeclaration ? s.valueDeclaration.kind : 147;
+ return s.valueDeclaration ? s.valueDeclaration.kind : 148;
}
function getDeclarationModifierFlagsFromSymbol(s) {
- return s.valueDeclaration ? ts.getCombinedModifierFlags(s.valueDeclaration) : s.flags & 134217728 ? 4 | 32 : 0;
+ if (s.valueDeclaration) {
+ var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+ return s.parent && s.parent.flags & 32 ? flags : flags & ~28;
+ }
+ if (getCheckFlags(s) & 6) {
+ var checkFlags = s.checkFlags;
+ var accessModifier = checkFlags & 256 ? 8 :
+ checkFlags & 64 ? 4 :
+ 16;
+ var staticModifier = checkFlags & 512 ? 32 : 0;
+ return accessModifier | staticModifier;
+ }
+ if (s.flags & 16777216) {
+ return 4 | 32;
+ }
+ return 0;
}
function getDeclarationNodeFlagsFromSymbol(s) {
return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : 0;
}
- function checkClassPropertyAccess(node, left, type, prop) {
+ function isMethodLike(symbol) {
+ return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ }
+ function checkPropertyAccessibility(node, left, type, prop) {
var flags = getDeclarationModifierFlagsFromSymbol(prop);
- var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop));
- var errorNode = node.kind === 177 || node.kind === 223 ?
+ var errorNode = node.kind === 178 || node.kind === 225 ?
node.name :
node.right;
+ if (getCheckFlags(prop) & 256) {
+ error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
+ return false;
+ }
if (left.kind === 96) {
- if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 149) {
- error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
- return false;
+ if (languageVersion < 2) {
+ var hasNonMethodDeclaration = forEachProperty(prop, function (p) {
+ var propKind = getDeclarationKindFromSymbol(p);
+ return propKind !== 150 && propKind !== 149;
+ });
+ if (hasNonMethodDeclaration) {
+ error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+ return false;
+ }
}
if (flags & 128) {
- error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
}
@@ -28996,7 +31669,7 @@ var ts;
if (flags & 8) {
var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
- error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
return true;
@@ -29006,10 +31679,10 @@ var ts;
}
var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
- return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined;
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
});
if (!enclosingClass) {
- error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
return false;
}
if (flags & 32) {
@@ -29025,16 +31698,17 @@ var ts;
return true;
}
function checkNonNullExpression(node) {
- var type = checkExpression(node);
- if (strictNullChecks) {
- var kind = getFalsyFlags(type) & 6144;
- if (kind) {
- error(node, kind & 2048 ? kind & 4096 ?
- ts.Diagnostics.Object_is_possibly_null_or_undefined :
- ts.Diagnostics.Object_is_possibly_undefined :
- ts.Diagnostics.Object_is_possibly_null);
- }
- return getNonNullableType(type);
+ return checkNonNullType(checkExpression(node), node);
+ }
+ function checkNonNullType(type, errorNode) {
+ var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 6144;
+ if (kind) {
+ error(errorNode, kind & 2048 ? kind & 4096 ?
+ ts.Diagnostics.Object_is_possibly_null_or_undefined :
+ ts.Diagnostics.Object_is_possibly_undefined :
+ ts.Diagnostics.Object_is_possibly_null);
+ var t = getNonNullableType(type);
+ return t.flags & (6144 | 8192) ? unknownType : t;
}
return type;
}
@@ -29063,7 +31737,7 @@ var ts;
noUnusedIdentifiers &&
(prop.flags & 106500) &&
prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (prop.flags & 16777216) {
+ if (getCheckFlags(prop) & 1) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
@@ -29071,6 +31745,15 @@ var ts;
}
}
}
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
var type = checkNonNullExpression(left);
if (isTypeAny(type) || type === silentNeverType) {
@@ -29082,16 +31765,30 @@ var ts;
}
var prop = getPropertyOfType(apparentType, right.text);
if (!prop) {
+ var stringIndexType = getIndexTypeOfType(apparentType, 0);
+ if (stringIndexType) {
+ return stringIndexType;
+ }
if (right.text && !checkAndReportErrorForExtendingInterface(node)) {
reportNonexistentProperty(right, type.flags & 16384 && type.isThisType ? apparentType : type);
}
return unknownType;
}
+ if (prop.valueDeclaration) {
+ if (isInPropertyInitializer(node) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text);
+ }
+ if (prop.valueDeclaration.kind === 228 &&
+ node.parent && node.parent.kind !== 158 &&
+ !ts.isInAmbientContext(prop.valueDeclaration) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text);
+ }
+ }
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
- if (prop.parent && prop.parent.flags & 32) {
- checkClassPropertyAccess(node, left, apparentType, prop);
- }
+ checkPropertyAccessibility(node, left, apparentType, prop);
var propType = getTypeOfSymbol(prop);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -29100,30 +31797,30 @@ var ts;
return unknownType;
}
}
- if (node.kind !== 177 || assignmentKind === 1 ||
+ if (node.kind !== 178 || assignmentKind === 1 ||
!(prop.flags & (3 | 4 | 98304)) &&
!(prop.flags & 8192 && propType.flags & 65536)) {
return propType;
}
- var flowType = getFlowTypeOfReference(node, propType, true, undefined);
+ var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isValidPropertyAccess(node, propertyName) {
- var left = node.kind === 177
+ var left = node.kind === 178
? node.expression
: node.left;
var type = checkExpression(left);
if (type !== unknownType && !isTypeAny(type)) {
var prop = getPropertyOfType(getWidenedType(type), propertyName);
- if (prop && prop.parent && prop.parent.flags & 32) {
- return checkClassPropertyAccess(node, left, type, prop);
+ if (prop) {
+ return checkPropertyAccessibility(node, left, type, prop);
}
}
return true;
}
function getForInVariableSymbol(node) {
var initializer = node.initializer;
- if (initializer.kind === 224) {
+ if (initializer.kind === 226) {
var variable = initializer.declarations[0];
if (variable && !ts.isBindingPattern(variable.name)) {
return getSymbolOfNode(variable);
@@ -29145,7 +31842,7 @@ var ts;
var child = expr;
var node = expr.parent;
while (node) {
- if (node.kind === 212 &&
+ if (node.kind === 214 &&
child === node.statement &&
getForInVariableSymbol(node) === symbol &&
hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -29163,7 +31860,7 @@ var ts;
var indexExpression = node.argumentExpression;
if (!indexExpression) {
var sourceFile = ts.getSourceFileOfNode(node);
- if (node.parent.kind === 180 && node.parent.expression === node) {
+ if (node.parent.kind === 181 && node.parent.expression === node) {
var start = ts.skipTrivia(sourceFile.text, node.expression.end);
var end = node.end;
grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
@@ -29183,7 +31880,7 @@ var ts;
error(indexExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
return unknownType;
}
- return getIndexedAccessType(objectType, indexType, node);
+ return checkIndexedAccessIndexType(getIndexedAccessType(objectType, indexType, node), node);
}
function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
if (expressionType === unknownType) {
@@ -29203,7 +31900,7 @@ var ts;
if (!leftHandSideSymbol) {
return false;
}
- var globalESSymbol = getGlobalESSymbolConstructorSymbol();
+ var globalESSymbol = getGlobalESSymbolConstructorSymbol(true);
if (!globalESSymbol) {
return false;
}
@@ -29216,10 +31913,10 @@ var ts;
return true;
}
function resolveUntypedCall(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
checkExpression(node.template);
}
- else if (node.kind !== 145) {
+ else if (node.kind !== 146) {
ts.forEach(node.arguments, function (argument) {
checkExpression(argument);
});
@@ -29238,22 +31935,22 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
- var signature = signatures_2[_i];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
- var parent_8 = signature.declaration && signature.declaration.parent;
+ var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
- if (lastParent && parent_8 === lastParent) {
+ if (lastParent && parent === lastParent) {
index++;
}
else {
- lastParent = parent_8;
+ lastParent = parent;
index = cutoffIndex;
}
}
else {
index = cutoffIndex = result.length;
- lastParent = parent_8;
+ lastParent = parent;
}
lastSymbol = symbol;
if (signature.hasLiteralTypes) {
@@ -29270,7 +31967,7 @@ var ts;
function getSpreadArgumentIndex(args) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
- if (arg && arg.kind === 196) {
+ if (arg && arg.kind === 197) {
return i;
}
}
@@ -29283,11 +31980,14 @@ var ts;
var callIsIncomplete;
var isDecorator;
var spreadArgIndex = -1;
- if (node.kind === 181) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return true;
+ }
+ if (node.kind === 182) {
var tagExpression = node;
argCount = args.length;
typeArguments = undefined;
- if (tagExpression.template.kind === 194) {
+ if (tagExpression.template.kind === 195) {
var templateExpression = tagExpression.template;
var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans);
ts.Debug.assert(lastSpan !== undefined);
@@ -29299,7 +31999,7 @@ var ts;
callIsIncomplete = !!templateLiteral.isUnterminated;
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
isDecorator = true;
typeArguments = undefined;
argCount = getEffectiveArgumentCount(node, undefined, signature);
@@ -29307,7 +32007,7 @@ var ts;
else {
var callExpression = node;
if (!callExpression.arguments) {
- ts.Debug.assert(callExpression.kind === 180);
+ ts.Debug.assert(callExpression.kind === 181);
return signature.minArgumentCount === 0;
}
argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;
@@ -29315,8 +32015,10 @@ var ts;
typeArguments = callExpression.typeArguments;
spreadArgIndex = getSpreadArgumentIndex(args);
}
+ var numTypeParameters = ts.length(signature.typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);
var hasRightNumberOfTypeArgs = !typeArguments ||
- (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
+ (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters);
if (!hasRightNumberOfTypeArgs) {
return false;
}
@@ -29340,9 +32042,9 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true);
+ var context = createInferenceContext(signature, true, false);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypes(context, instantiateType(source, contextualMapper), target);
+ inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
});
return getSignatureInstantiation(signature, getInferredTypes(context));
}
@@ -29361,19 +32063,19 @@ var ts;
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypes(context, thisArgumentType, thisType);
+ inferTypesWithContext(context, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypes(context, argType, paramType);
+ inferTypesWithContext(context, argType, paramType);
}
}
if (excludeArgument) {
@@ -29381,7 +32083,7 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
}
}
}
@@ -29391,7 +32093,7 @@ var ts;
var typeParameters = signature.typeParameters;
var typeArgumentsAreAssignable = true;
var mapper;
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < typeArgumentNodes.length; i++) {
if (typeArgumentsAreAssignable) {
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
@@ -29411,9 +32113,29 @@ var ts;
}
return typeArgumentsAreAssignable;
}
+ function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation) {
+ var callIsIncomplete = node.attributes.end === node.end;
+ if (callIsIncomplete) {
+ return true;
+ }
+ var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;
+ var paramType = getTypeAtPosition(signature, 0);
+ var attributesType = checkExpressionWithContextualType(node.attributes, paramType, undefined);
+ var argProperties = getPropertiesOfType(attributesType);
+ for (var _i = 0, argProperties_1 = argProperties; _i < argProperties_1.length; _i++) {
+ var arg = argProperties_1[_i];
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
+ return false;
+ }
+ }
+ return checkTypeRelatedTo(attributesType, paramType, relation, undefined, headMessage);
+ }
function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation);
+ }
var thisType = getThisTypeOfSignature(signature);
- if (thisType && thisType !== voidType && node.kind !== 180) {
+ if (thisType && thisType !== voidType && node.kind !== 181) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
var errorNode = reportErrors ? (thisArgumentNode || node) : undefined;
@@ -29426,7 +32148,7 @@ var ts;
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
@@ -29441,51 +32163,54 @@ var ts;
return true;
}
function getThisArgumentOfCall(node) {
- if (node.kind === 179) {
+ if (node.kind === 180) {
var callee = node.expression;
- if (callee.kind === 177) {
+ if (callee.kind === 178) {
return callee.expression;
}
- else if (callee.kind === 178) {
+ else if (callee.kind === 179) {
return callee.expression;
}
}
}
function getEffectiveCallArguments(node) {
var args;
- if (node.kind === 181) {
+ if (node.kind === 182) {
var template = node.template;
args = [undefined];
- if (template.kind === 194) {
+ if (template.kind === 195) {
ts.forEach(template.templateSpans, function (span) {
args.push(span.expression);
});
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
return undefined;
}
+ else if (ts.isJsxOpeningLikeElement(node)) {
+ args = node.attributes.properties.length > 0 ? [node.attributes] : emptyArray;
+ }
else {
args = node.arguments || emptyArray;
}
return args;
}
function getEffectiveArgumentCount(node, args, signature) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return 1;
- case 147:
+ case 148:
return 2;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
if (languageVersion === 0) {
return 2;
}
return signature.parameters.length >= 3 ? 3 : 2;
- case 144:
+ case 145:
return 3;
}
}
@@ -29494,48 +32219,48 @@ var ts;
}
}
function getEffectiveDecoratorFirstArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
return getParentTypeOfClassElement(node);
}
ts.Debug.fail("Unsupported decorator target.");
return unknownType;
}
function getEffectiveDecoratorSecondArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a second synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
return anyType;
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var element = node;
switch (element.name.kind) {
case 70:
case 8:
case 9:
return getLiteralTypeForText(32, element.name.text);
- case 142:
+ case 143:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
return nameType;
@@ -29552,20 +32277,20 @@ var ts;
return unknownType;
}
function getEffectiveDecoratorThirdArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
return numberType;
}
- if (node.kind === 147) {
+ if (node.kind === 148) {
ts.Debug.fail("Property decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var propertyType = getTypeOfNode(node);
return createTypedPropertyDescriptorType(propertyType);
}
@@ -29586,26 +32311,26 @@ var ts;
return unknownType;
}
function getEffectiveArgumentType(node, argIndex) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return getEffectiveDecoratorArgumentType(node, argIndex);
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return getGlobalTemplateStringsArrayType();
}
return undefined;
}
function getEffectiveArgument(node, args, argIndex) {
- if (node.kind === 145 ||
- (argIndex === 0 && node.kind === 181)) {
+ if (node.kind === 146 ||
+ (argIndex === 0 && node.kind === 182)) {
return undefined;
}
return args[argIndex];
}
function getEffectiveArgumentErrorNode(node, argIndex, arg) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return node.expression;
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return node.template;
}
else {
@@ -29613,15 +32338,30 @@ var ts;
}
}
function resolveCall(node, signatures, candidatesOutArray, headMessage) {
- var isTaggedTemplate = node.kind === 181;
- var isDecorator = node.kind === 145;
+ var isTaggedTemplate = node.kind === 182;
+ var isDecorator = node.kind === 146;
+ var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
var typeArguments;
- if (!isTaggedTemplate && !isDecorator) {
+ if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) {
typeArguments = node.typeArguments;
if (node.expression.kind !== 96) {
ts.forEach(typeArguments, checkSourceElement);
}
}
+ if (signatures.length === 1) {
+ var declaration = signatures[0].declaration;
+ if (declaration && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration)) {
+ if (containsArgumentsReference(declaration)) {
+ var signatureWithRest = cloneSignature(signatures[0]);
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ signatureWithRest.parameters = ts.concatenate(signatureWithRest.parameters, [syntheticArgsSymbol]);
+ signatureWithRest.hasRestParameter = true;
+ signatures = [signatureWithRest];
+ }
+ }
+ }
var candidates = candidatesOutArray || [];
reorderCandidates(signatures, candidates);
if (!candidates.length) {
@@ -29644,7 +32384,7 @@ var ts;
var candidateForTypeArgumentError;
var resultOfFailedInference;
var result;
- var signatureHelpTrailingComma = candidatesOutArray && node.kind === 179 && node.arguments.hasTrailingComma;
+ var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
@@ -29658,6 +32398,9 @@ var ts;
return result;
}
if (candidateForArgumentError) {
+ if (isJsxOpeningOrSelfClosingElement) {
+ return candidateForArgumentError;
+ }
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
@@ -29673,7 +32416,7 @@ var ts;
if (headMessage) {
diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
}
- reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
+ reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
}
}
else {
@@ -29709,20 +32452,20 @@ var ts;
var candidate = void 0;
var typeArgumentsAreValid = void 0;
var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false)
+ ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
: undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
- typeArgumentTypes = ts.map(typeArguments, getTypeFromTypeNode);
+ typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
}
else {
inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
typeArgumentTypes = inferenceContext.inferredTypes;
+ typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
}
if (!typeArgumentsAreValid) {
break;
@@ -29764,7 +32507,7 @@ var ts;
if (superType !== unknownType) {
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node));
if (baseTypeNode) {
- var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
+ var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
return resolveCall(node, baseConstructors, candidatesOutArray);
}
}
@@ -29875,12 +32618,13 @@ var ts;
if (containingClass) {
var containingType = getTypeOfNode(containingClass);
var baseTypes = getBaseTypes(containingType);
- if (baseTypes.length) {
+ while (baseTypes.length) {
var baseType = baseTypes[0];
if (modifiers & 16 &&
baseType.symbol === declaration.parent.symbol) {
return true;
}
+ baseTypes = getBaseTypes(baseType);
}
}
if (modifiers & 8) {
@@ -29912,16 +32656,16 @@ var ts;
}
function getDiagnosticHeadMessageForDecoratorResolution(node) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
- case 144:
+ case 145:
return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
- case 147:
+ case 148:
return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
}
}
@@ -29946,16 +32690,42 @@ var ts;
}
return resolveCall(node, callSignatures, candidatesOutArray, headMessage);
}
+ function getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ var callSignature = resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
+ return callSignature;
+ }
+ function resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray) {
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ var result = void 0;
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var type = types_18[_i];
+ result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
+ }
+ return result;
+ }
+ var callSignatures = elementType && getSignaturesOfType(elementType, 0);
+ if (callSignatures && callSignatures.length > 0) {
+ var callSignature = void 0;
+ callSignature = resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
+ return callSignature;
+ }
+ return undefined;
+ }
function resolveSignature(node, candidatesOutArray) {
switch (node.kind) {
- case 179:
- return resolveCallExpression(node, candidatesOutArray);
case 180:
- return resolveNewExpression(node, candidatesOutArray);
+ return resolveCallExpression(node, candidatesOutArray);
case 181:
+ return resolveNewExpression(node, candidatesOutArray);
+ case 182:
return resolveTaggedTemplateExpression(node, candidatesOutArray);
- case 145:
+ case 146:
return resolveDecorator(node, candidatesOutArray);
+ case 250:
+ case 249:
+ return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray);
}
ts.Debug.fail("Branch in 'resolveSignature' should be unreachable.");
}
@@ -29986,20 +32756,23 @@ var ts;
if (node.expression.kind === 96) {
return voidType;
}
- if (node.kind === 180) {
+ if (node.kind === 181) {
var declaration = signature.declaration;
if (declaration &&
- declaration.kind !== 150 &&
- declaration.kind !== 154 &&
- declaration.kind !== 159 &&
+ declaration.kind !== 151 &&
+ declaration.kind !== 155 &&
+ declaration.kind !== 160 &&
!ts.isJSDocConstructSignature(declaration)) {
var funcSymbol = node.expression.kind === 70 ?
getResolvedSymbol(node.expression) :
checkExpression(node.expression).symbol;
- if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
+ funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
+ }
+ if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
return getInferredClassType(funcSymbol);
}
- else if (compilerOptions.noImplicitAny) {
+ else if (noImplicitAny) {
error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
}
return anyType;
@@ -30022,9 +32795,9 @@ var ts;
return false;
}
var targetDeclarationKind = resolvedRequire.flags & 16
- ? 225
+ ? 227
: resolvedRequire.flags & 3
- ? 223
+ ? 225
: 0;
if (targetDeclarationKind !== 0) {
var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -30050,6 +32823,22 @@ var ts;
function checkNonNullAssertion(node) {
return getNonNullableType(checkExpression(node.expression));
}
+ function checkMetaProperty(node) {
+ checkGrammarMetaProperty(node);
+ var container = ts.getNewTargetContainer(node);
+ if (!container) {
+ error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
+ return unknownType;
+ }
+ else if (container.kind === 151) {
+ var symbol = getSymbolOfNode(container.parent);
+ return getTypeOfSymbol(symbol);
+ }
+ else {
+ var symbol = getSymbolOfNode(container);
+ return getTypeOfSymbol(symbol);
+ }
+ }
function getTypeOfParameter(symbol) {
var type = getTypeOfSymbol(symbol);
if (strictNullChecks) {
@@ -30065,13 +32854,16 @@ var ts;
pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType;
}
- function assignContextualParameterTypes(signature, context, mapper) {
+ function getTypeOfFirstParameterOfSignature(signature) {
+ return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ }
+ function assignContextualParameterTypes(signature, context, mapper, checkMode) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (isInferentialContext(mapper)) {
+ if (checkMode === 2) {
for (var i = 0; i < len; i++) {
var declaration = signature.parameters[i].valueDeclaration;
if (declaration.type) {
- inferTypes(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
}
}
}
@@ -30079,23 +32871,23 @@ var ts;
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
- signature.thisParameter = createTransientSymbol(context.thisParameter, undefined);
+ signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
}
}
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
}
@@ -30112,19 +32904,19 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
var links = getSymbolLinks(parameter);
if (!links.type) {
links.type = instantiateType(contextualType, mapper);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 172 ||
- parameter.valueDeclaration.name.kind === 173)) {
+ (parameter.valueDeclaration.name.kind === 173 ||
+ parameter.valueDeclaration.name.kind === 174)) {
links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (isInferentialContext(mapper)) {
- inferTypes(mapper.context, links.type, instantiateType(contextualType, mapper));
+ else if (checkMode === 2) {
+ inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
}
}
function getReturnTypeFromJSDocComment(func) {
@@ -30135,9 +32927,9 @@ var ts;
return undefined;
}
function createPromiseType(promisedType) {
- var globalPromiseType = getGlobalPromiseType();
+ var globalPromiseType = getGlobalPromiseType(true);
if (globalPromiseType !== emptyGenericType) {
- promisedType = getAwaitedType(promisedType);
+ promisedType = getAwaitedType(promisedType) || emptyObjectType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
@@ -30148,46 +32940,56 @@ var ts;
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
return unknownType;
}
+ else if (!getGlobalPromiseConstructorSymbol(true)) {
+ error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
return promiseType;
}
- function getReturnTypeFromBody(func, contextualMapper) {
+ function getReturnTypeFromBody(func, checkMode) {
var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
if (!func.body) {
return unknownType;
}
- var isAsync = ts.isAsyncFunctionLike(func);
+ var functionFlags = ts.getFunctionFlags(func);
var type;
- if (func.body.kind !== 204) {
- type = checkExpressionCached(func.body, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (func.body.kind !== 206) {
+ type = checkExpressionCached(func.body, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
}
else {
var types = void 0;
- var funcIsGenerator = !!func.asteriskToken;
- if (funcIsGenerator) {
- types = checkAndAggregateYieldOperandTypes(func, contextualMapper);
- if (types.length === 0) {
- var iterableIteratorAny = createIterableIteratorType(anyType);
- if (compilerOptions.noImplicitAny) {
+ if (functionFlags & 1) {
+ types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), checkAndAggregateReturnExpressionTypes(func, checkMode));
+ if (!types || types.length === 0) {
+ var iterableIteratorAny = functionFlags & 2
+ ? createAsyncIterableIteratorType(anyType)
+ : createIterableIteratorType(anyType);
+ if (noImplicitAny) {
error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny));
}
return iterableIteratorAny;
}
}
else {
- types = checkAndAggregateReturnExpressionTypes(func, contextualMapper);
+ types = checkAndAggregateReturnExpressionTypes(func, checkMode);
if (!types) {
- return isAsync ? createPromiseReturnType(func, neverType) : neverType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, neverType)
+ : neverType;
}
if (types.length === 0) {
- return isAsync ? createPromiseReturnType(func, voidType) : voidType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, voidType)
+ : voidType;
}
}
type = getUnionType(types, true);
- if (funcIsGenerator) {
- type = createIterableIteratorType(type);
+ if (functionFlags & 1) {
+ type = functionFlags & 2
+ ? createAsyncIterableIteratorType(type)
+ : createIterableIteratorType(type);
}
}
if (!contextualSignature) {
@@ -30199,16 +33001,24 @@ var ts;
type = getWidenedLiteralType(type);
}
var widenedType = getWidenedType(type);
- return isAsync ? createPromiseReturnType(func, widenedType) : widenedType;
+ return (functionFlags & 3) === 2
+ ? createPromiseReturnType(func, widenedType)
+ : widenedType;
}
- function checkAndAggregateYieldOperandTypes(func, contextualMapper) {
+ function checkAndAggregateYieldOperandTypes(func, checkMode) {
var aggregatedTypes = [];
+ var functionFlags = ts.getFunctionFlags(func);
ts.forEachYieldExpression(func.body, function (yieldExpression) {
var expr = yieldExpression.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
+ var type = checkExpressionCached(expr, checkMode);
if (yieldExpression.asteriskToken) {
- type = checkElementTypeOfIterable(type, yieldExpression.expression);
+ type = checkIteratedTypeOrElementType(type, yieldExpression.expression, false, (functionFlags & 2) !== 0);
+ }
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, expr, yieldExpression.asteriskToken
+ ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
+ : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (!ts.contains(aggregatedTypes, type)) {
aggregatedTypes.push(type);
@@ -30229,29 +33039,29 @@ var ts;
if (!switchTypes.length) {
return false;
}
- return eachTypeContainedIn(type, switchTypes);
+ return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}
function functionHasImplicitReturn(func) {
if (!(func.flags & 128)) {
return false;
}
var lastStatement = ts.lastOrUndefined(func.body.statements);
- if (lastStatement && lastStatement.kind === 218 && isExhaustiveSwitchStatement(lastStatement)) {
+ if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) {
return false;
}
return true;
}
- function checkAndAggregateReturnExpressionTypes(func, contextualMapper) {
- var isAsync = ts.isAsyncFunctionLike(func);
+ function checkAndAggregateReturnExpressionTypes(func, checkMode) {
+ var functionFlags = ts.getFunctionFlags(func);
var aggregatedTypes = [];
var hasReturnWithNoExpression = functionHasImplicitReturn(func);
var hasReturnOfTypeNever = false;
ts.forEachReturnStatement(func.body, function (returnStatement) {
var expr = returnStatement.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ var type = checkExpressionCached(expr, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (type.flags & 8192) {
hasReturnOfTypeNever = true;
@@ -30265,7 +33075,7 @@ var ts;
}
});
if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever ||
- func.kind === 184 || func.kind === 185)) {
+ func.kind === 185 || func.kind === 186)) {
return undefined;
}
if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) {
@@ -30282,7 +33092,7 @@ var ts;
if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) {
return;
}
- if (ts.nodeIsMissing(func.body) || func.body.kind !== 204 || !functionHasImplicitReturn(func)) {
+ if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) {
return;
}
var hasExplicitReturn = func.flags & 256;
@@ -30308,20 +33118,20 @@ var ts;
error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
- function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
- if (!hasGrammarError && node.kind === 184) {
+ if (!hasGrammarError && node.kind === 185) {
checkGrammarForGenerator(node);
}
- if (contextualMapper === identityMapper && isContextSensitive(node)) {
+ if (checkMode === 1 && isContextSensitive(node)) {
checkNodeDeferred(node);
return anyFunctionType;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && isInferentialContext(contextualMapper);
+ var mightFixTypeParameters = contextSensitive && checkMode === 2;
if (mightFixTypeParameters || !(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
var contextChecked = !!(links.flags & 1024);
@@ -30330,10 +33140,10 @@ var ts;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
+ assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
}
if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
- var returnType = getReturnTypeFromBody(node, contextualMapper);
+ var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
@@ -30345,31 +33155,35 @@ var ts;
}
}
}
- if (produceDiagnostics && node.kind !== 149) {
+ if (produceDiagnostics && node.kind !== 150) {
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
}
return type;
}
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
- var isAsync = ts.isAsyncFunctionLike(node);
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
- if (!node.asteriskToken) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
+ var functionFlags = ts.getFunctionFlags(node);
+ var returnOrPromisedType = node.type &&
+ ((functionFlags & 3) === 2 ?
+ checkAsyncFunctionReturnType(node) :
+ getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
if (!node.type) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
- if (node.body.kind === 204) {
+ if (node.body.kind === 206) {
checkSourceElement(node.body);
}
else {
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if (isAsync) {
- var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);
+ if ((functionFlags & 3) === 2) {
+ var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body);
}
else {
@@ -30388,19 +33202,19 @@ var ts;
return true;
}
function isReadonlySymbol(symbol) {
- return symbol.isReadonly ||
- symbol.flags & 4 && (getDeclarationModifierFlagsFromSymbol(symbol) & 64) !== 0 ||
- symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 ||
+ return !!(getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
- (symbol.flags & 8) !== 0;
+ symbol.flags & 8);
}
function isReferenceToReadonlyEntity(expr, symbol) {
if (isReadonlySymbol(symbol)) {
if (symbol.flags & 4 &&
- (expr.kind === 177 || expr.kind === 178) &&
+ (expr.kind === 178 || expr.kind === 179) &&
expr.expression.kind === 98) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 150))
+ if (!(func && func.kind === 151))
return true;
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
@@ -30409,13 +33223,13 @@ var ts;
return false;
}
function isReferenceThroughNamespaceImport(expr) {
- if (expr.kind === 177 || expr.kind === 178) {
+ if (expr.kind === 178 || expr.kind === 179) {
var node = ts.skipParentheses(expr.expression);
if (node.kind === 70) {
var symbol = getNodeLinks(node).resolvedSymbol;
if (symbol.flags & 8388608) {
var declaration = getDeclarationOfAliasSymbol(symbol);
- return declaration && declaration.kind === 237;
+ return declaration && declaration.kind === 239;
}
}
}
@@ -30423,7 +33237,7 @@ var ts;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
var node = ts.skipParentheses(expr);
- if (node.kind !== 70 && node.kind !== 177 && node.kind !== 178) {
+ if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) {
error(expr, invalidReferenceMessage);
return false;
}
@@ -30431,11 +33245,21 @@ var ts;
}
function checkDeleteExpression(node) {
checkExpression(node.expression);
+ var expr = ts.skipParentheses(node.expression);
+ if (expr.kind !== 178 && expr.kind !== 179) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
+ return booleanType;
+ }
+ var links = getNodeLinks(expr);
+ var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);
+ if (symbol && isReadonlySymbol(symbol)) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
+ }
return booleanType;
}
function checkTypeOfExpression(node) {
checkExpression(node.expression);
- return stringType;
+ return typeofType;
}
function checkVoidExpression(node) {
checkExpression(node.expression);
@@ -30443,7 +33267,7 @@ var ts;
}
function checkAwaitExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 524288)) {
+ if (!(node.flags & 16384)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -30451,7 +33275,7 @@ var ts;
}
}
var operandType = checkExpression(node.expression);
- return checkAwaitedType(operandType, node);
+ return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkPrefixUnaryExpression(node) {
var operandType = checkExpression(node.operand);
@@ -30465,6 +33289,7 @@ var ts;
case 36:
case 37:
case 51:
+ checkNonNullType(operandType, node.operand);
if (maybeTypeOfKind(operandType, 512)) {
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
}
@@ -30476,7 +33301,7 @@ var ts;
booleanType;
case 42:
case 43:
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -30489,7 +33314,7 @@ var ts;
if (operandType === silentNeverType) {
return silentNeverType;
}
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -30501,8 +33326,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
- var t = types_15[_i];
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+ var t = types_19[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -30516,8 +33341,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+ var t = types_20[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -30526,8 +33351,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_17 = types; _a < types_17.length; _a++) {
- var t = types_17[_a];
+ for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
+ var t = types_21[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -30548,7 +33373,10 @@ var ts;
if (isTypeOfKind(leftType, 8190)) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
- if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
+ if (!(isTypeAny(rightType) ||
+ getSignaturesOfType(rightType, 0).length ||
+ getSignaturesOfType(rightType, 1).length ||
+ isTypeSubtypeOf(rightType, globalFunctionType))) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
}
return booleanType;
@@ -30557,39 +33385,41 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
return booleanType;
}
function checkObjectLiteralAssignment(node, sourceType) {
var properties = node.properties;
- for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
- var p = properties_5[_i];
+ for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
+ var p = properties_7[_i];
checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, properties);
}
return sourceType;
}
function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) {
- if (property.kind === 257 || property.kind === 258) {
- var name_20 = property.name;
- if (name_20.kind === 142) {
- checkComputedPropertyName(name_20);
+ if (property.kind === 260 || property.kind === 261) {
+ var name = property.name;
+ if (name.kind === 143) {
+ checkComputedPropertyName(name);
}
- if (isComputedNonLiteralName(name_20)) {
+ if (isComputedNonLiteralName(name)) {
return undefined;
}
- var text = ts.getTextOfPropertyName(name_20);
+ var text = ts.getTextOfPropertyName(name);
var type = isTypeAny(objectLiteralType)
? objectLiteralType
: getTypeOfPropertyOfType(objectLiteralType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) ||
getIndexTypeOfType(objectLiteralType, 0);
if (type) {
- if (property.kind === 258) {
+ if (property.kind === 261) {
return checkDestructuringAssignment(property, type);
}
else {
@@ -30597,10 +33427,13 @@ var ts;
}
}
else {
- error(name_20, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_20));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name));
}
}
- else if (property.kind === 259) {
+ else if (property.kind === 262) {
+ if (languageVersion < 5) {
+ checkExternalEmitHelpers(property, 4);
+ }
var nonRestNames = [];
if (allProperties) {
for (var i = 0; i < allProperties.length - 1; i++) {
@@ -30614,19 +33447,22 @@ var ts;
error(property, ts.Diagnostics.Property_assignment_expected);
}
}
- function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
- var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType;
+ function checkArrayLiteralAssignment(node, sourceType, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, false, false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
- checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper);
+ checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
}
return sourceType;
}
- function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) {
+ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
var elements = node.elements;
var element = elements[elementIndex];
- if (element.kind !== 198) {
- if (element.kind !== 196) {
+ if (element.kind !== 199) {
+ if (element.kind !== 197) {
var propName = "" + elementIndex;
var type = isTypeAny(sourceType)
? sourceType
@@ -30634,7 +33470,7 @@ var ts;
? getTypeOfPropertyOfType(sourceType, propName)
: elementType;
if (type) {
- return checkDestructuringAssignment(element, type, contextualMapper);
+ return checkDestructuringAssignment(element, type, checkMode);
}
else {
checkExpression(element);
@@ -30652,48 +33488,48 @@ var ts;
}
else {
var restExpression = element.expression;
- if (restExpression.kind === 192 && restExpression.operatorToken.kind === 57) {
+ if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) {
error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
}
else {
- return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
+ return checkDestructuringAssignment(restExpression, createArrayType(elementType), checkMode);
}
}
}
}
return undefined;
}
- function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) {
+ function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) {
var target;
- if (exprOrAssignment.kind === 258) {
+ if (exprOrAssignment.kind === 261) {
var prop = exprOrAssignment;
if (prop.objectAssignmentInitializer) {
if (strictNullChecks &&
!(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048)) {
sourceType = getTypeWithFacts(sourceType, 131072);
}
- checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);
+ checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
}
target = exprOrAssignment.name;
}
else {
target = exprOrAssignment;
}
- if (target.kind === 192 && target.operatorToken.kind === 57) {
- checkBinaryExpression(target, contextualMapper);
+ if (target.kind === 193 && target.operatorToken.kind === 57) {
+ checkBinaryExpression(target, checkMode);
target = target.left;
}
- if (target.kind === 176) {
+ if (target.kind === 177) {
return checkObjectLiteralAssignment(target, sourceType);
}
- if (target.kind === 175) {
- return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
+ if (target.kind === 176) {
+ return checkArrayLiteralAssignment(target, sourceType, checkMode);
}
- return checkReferenceAssignment(target, sourceType, contextualMapper);
+ return checkReferenceAssignment(target, sourceType, checkMode);
}
- function checkReferenceAssignment(target, sourceType, contextualMapper) {
- var targetType = checkExpression(target, contextualMapper);
- var error = target.parent.kind === 259 ?
+ function checkReferenceAssignment(target, sourceType, checkMode) {
+ var targetType = checkExpression(target, checkMode);
+ var error = target.parent.kind === 262 ?
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
if (checkReferenceExpression(target, error)) {
@@ -30707,35 +33543,35 @@ var ts;
case 70:
case 9:
case 11:
- case 181:
- case 194:
+ case 182:
+ case 195:
case 12:
case 8:
case 100:
case 85:
case 94:
- case 137:
- case 184:
- case 197:
+ case 138:
case 185:
- case 175:
+ case 198:
+ case 186:
case 176:
- case 187:
- case 201:
- case 247:
- case 246:
+ case 177:
+ case 188:
+ case 202:
+ case 249:
+ case 248:
return true;
- case 193:
+ case 194:
return isSideEffectFree(node.whenTrue) &&
isSideEffectFree(node.whenFalse);
- case 192:
+ case 193:
if (ts.isAssignmentOperator(node.operatorToken.kind)) {
return false;
}
return isSideEffectFree(node.left) &&
isSideEffectFree(node.right);
- case 190:
case 191:
+ case 192:
switch (node.operator) {
case 50:
case 36:
@@ -30744,9 +33580,9 @@ var ts;
return true;
}
return false;
- case 188:
- case 182:
- case 200:
+ case 189:
+ case 183:
+ case 201:
default:
return false;
}
@@ -30761,16 +33597,16 @@ var ts;
firstAssignableToSecond && !secondAssignableToFirst ? type2 :
getUnionType([type1, type2], true);
}
- function checkBinaryExpression(node, contextualMapper) {
- return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node);
+ function checkBinaryExpression(node, checkMode) {
+ return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node);
}
- function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) {
+ function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
var operator = operatorToken.kind;
- if (operator === 57 && (left.kind === 176 || left.kind === 175)) {
- return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper);
+ if (operator === 57 && (left.kind === 177 || left.kind === 176)) {
+ return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode);
}
- var leftType = checkExpression(left, contextualMapper);
- var rightType = checkExpression(right, contextualMapper);
+ var leftType = checkExpression(left, checkMode);
+ var rightType = checkExpression(right, checkMode);
switch (operator) {
case 38:
case 39:
@@ -30797,12 +33633,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
var suggestedOperator = void 0;
if ((leftType.flags & 136) &&
(rightType.flags & 136) &&
@@ -30822,12 +33654,10 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ if (!isTypeOfKind(leftType, 1 | 262178) && !isTypeOfKind(rightType, 1 | 262178)) {
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
+ }
var resultType = void 0;
if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
resultType = numberType;
@@ -30856,8 +33686,8 @@ var ts;
case 29:
case 30:
if (checkForDisallowedESSymbolOperand(operator)) {
- leftType = getBaseTypeOfLiteralType(leftType);
- rightType = getBaseTypeOfLiteralType(rightType);
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -30893,11 +33723,14 @@ var ts;
checkAssignmentOperator(rightType);
return getRegularTypeOfObjectLiteral(rightType);
case 25:
- if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
}
return rightType;
}
+ function isEvalNode(node) {
+ return node.kind === 70 && node.text === "eval";
+ }
function checkForDisallowedESSymbolOperand(operator) {
var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left :
maybeTypeOfKind(rightType, 512) ? right :
@@ -30951,7 +33784,7 @@ var ts;
}
function checkYieldExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 131072) || isYieldExpressionInClass(node)) {
+ if (!(node.flags & 4096) || isYieldExpressionInClass(node)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -30960,30 +33793,45 @@ var ts;
}
if (node.expression) {
var func = ts.getContainingFunction(node);
- if (func && func.asteriskToken) {
+ var functionFlags = func && ts.getFunctionFlags(func);
+ if (node.asteriskToken) {
+ if (functionFlags & 2) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 4096);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (functionFlags & 1) {
var expressionType = checkExpressionCached(node.expression, undefined);
var expressionElementType = void 0;
var nodeIsYieldStar = !!node.asteriskToken;
if (nodeIsYieldStar) {
- expressionElementType = checkElementTypeOfIterable(expressionType, node.expression);
+ expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
if (func.type) {
- var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType;
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
- checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionElementType, node.expression, ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionElementType, signatureElementType, node.expression, undefined);
}
else {
- checkTypeAssignableTo(expressionType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionType, node.expression, ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionType, signatureElementType, node.expression, undefined);
}
}
}
}
return anyType;
}
- function checkConditionalExpression(node, contextualMapper) {
+ function checkConditionalExpression(node, checkMode) {
checkExpression(node.condition);
- var type1 = checkExpression(node.whenTrue, contextualMapper);
- var type2 = checkExpression(node.whenFalse, contextualMapper);
+ var type1 = checkExpression(node.whenTrue, checkMode);
+ var type2 = checkExpression(node.whenFalse, checkMode);
return getBestChoiceType(type1, type2);
}
function checkLiteralExpression(node) {
@@ -31009,107 +33857,119 @@ var ts;
}
function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
var saveContextualType = node.contextualType;
+ var saveContextualMapper = node.contextualMapper;
node.contextualType = contextualType;
- var result = checkExpression(node, contextualMapper);
+ node.contextualMapper = contextualMapper;
+ var checkMode = contextualMapper === identityMapper ? 1 :
+ contextualMapper ? 2 : 0;
+ var result = checkExpression(node, checkMode);
node.contextualType = saveContextualType;
+ node.contextualMapper = saveContextualMapper;
return result;
}
- function checkExpressionCached(node, contextualMapper) {
+ function checkExpressionCached(node, checkMode) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var saveFlowLoopStart = flowLoopStart;
flowLoopStart = flowLoopCount;
- links.resolvedType = checkExpression(node, contextualMapper);
+ links.resolvedType = checkExpression(node, checkMode);
flowLoopStart = saveFlowLoopStart;
}
return links.resolvedType;
}
function isTypeAssertion(node) {
node = ts.skipParentheses(node);
- return node.kind === 182 || node.kind === 200;
+ return node.kind === 183 || node.kind === 201;
}
function checkDeclarationInitializer(declaration) {
- var type = checkExpressionCached(declaration.initializer);
+ var type = getTypeOfExpression(declaration.initializer, true);
return ts.getCombinedNodeFlags(declaration) & 2 ||
ts.getCombinedModifierFlags(declaration) & 64 && !ts.isParameterPropertyDeclaration(declaration) ||
isTypeAssertion(declaration.initializer) ? type : getWidenedLiteralType(type);
}
function isLiteralContextualType(contextualType) {
if (contextualType) {
- if (contextualType.flags & 16384) {
- var apparentType = getApparentTypeOfTypeParameter(contextualType);
- if (apparentType.flags & (2 | 4 | 8 | 16)) {
+ if (contextualType.flags & 540672) {
+ var constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
+ if (constraint.flags & (2 | 4 | 8 | 16)) {
return true;
}
- contextualType = apparentType;
+ contextualType = constraint;
}
return maybeTypeOfKind(contextualType, (480 | 262144));
}
return false;
}
- function checkExpressionForMutableLocation(node, contextualMapper) {
- var type = checkExpression(node, contextualMapper);
+ function checkExpressionForMutableLocation(node, checkMode) {
+ var type = checkExpression(node, checkMode);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type);
}
- function checkPropertyAssignment(node, contextualMapper) {
- if (node.name.kind === 142) {
+ function checkPropertyAssignment(node, checkMode) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- return checkExpressionForMutableLocation(node.initializer, contextualMapper);
+ return checkExpressionForMutableLocation(node.initializer, checkMode);
}
- function checkObjectLiteralMethod(node, contextualMapper) {
+ function checkObjectLiteralMethod(node, checkMode) {
checkGrammarMethod(node);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
- function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
- if (isInferentialContext(contextualMapper)) {
+ function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {
+ if (checkMode === 2) {
var signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
var contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
- return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
+ return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
}
}
}
return type;
}
- function getTypeOfExpression(node) {
- if (node.kind === 179 && node.expression.kind !== 96) {
+ function getTypeOfExpression(node, cache) {
+ if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) {
var funcType = checkNonNullExpression(node.expression);
var signature = getSingleCallSignature(funcType);
if (signature && !signature.typeParameters) {
return getReturnTypeOfSignature(signature);
}
}
- return checkExpression(node);
+ return cache ? checkExpressionCached(node) : checkExpression(node);
}
- function checkExpression(node, contextualMapper) {
+ function getContextFreeTypeOfExpression(node) {
+ var saveContextualType = node.contextualType;
+ node.contextualType = anyType;
+ var type = getTypeOfExpression(node);
+ node.contextualType = saveContextualType;
+ return type;
+ }
+ function checkExpression(node, checkMode) {
var type;
- if (node.kind === 141) {
+ if (node.kind === 142) {
type = checkQualifiedName(node);
}
else {
- var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
- type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkExpressionWorker(node, checkMode);
+ type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
if (isConstEnumObjectType(type)) {
- var ok = (node.parent.kind === 177 && node.parent.expression === node) ||
- (node.parent.kind === 178 && node.parent.expression === node) ||
- ((node.kind === 70 || node.kind === 141) && isInRightSideOfImportOrExportAssignment(node));
+ var ok = (node.parent.kind === 178 && node.parent.expression === node) ||
+ (node.parent.kind === 179 && node.parent.expression === node) ||
+ ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node));
if (!ok) {
error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
}
}
return type;
}
- function checkExpressionWorker(node, contextualMapper) {
+ function checkExpressionWorker(node, checkMode) {
switch (node.kind) {
case 70:
return checkIdentifier(node);
@@ -31124,66 +33984,70 @@ var ts;
case 100:
case 85:
return checkLiteralExpression(node);
- case 194:
+ case 195:
return checkTemplateExpression(node);
case 12:
return stringType;
case 11:
return globalRegExpType;
- case 175:
- return checkArrayLiteral(node, contextualMapper);
case 176:
- return checkObjectLiteral(node, contextualMapper);
+ return checkArrayLiteral(node, checkMode);
case 177:
- return checkPropertyAccessExpression(node);
+ return checkObjectLiteral(node, checkMode);
case 178:
- return checkIndexedAccess(node);
+ return checkPropertyAccessExpression(node);
case 179:
+ return checkIndexedAccess(node);
case 180:
- return checkCallExpression(node);
case 181:
+ return checkCallExpression(node);
+ case 182:
return checkTaggedTemplateExpression(node);
- case 183:
- return checkExpression(node.expression, contextualMapper);
- case 197:
- return checkClassExpression(node);
case 184:
+ return checkExpression(node.expression, checkMode);
+ case 198:
+ return checkClassExpression(node);
case 185:
- return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- case 187:
+ case 186:
+ return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ case 188:
return checkTypeOfExpression(node);
- case 182:
- case 200:
- return checkAssertion(node);
+ case 183:
case 201:
+ return checkAssertion(node);
+ case 202:
return checkNonNullAssertion(node);
- case 186:
+ case 203:
+ return checkMetaProperty(node);
+ case 187:
return checkDeleteExpression(node);
- case 188:
- return checkVoidExpression(node);
case 189:
- return checkAwaitExpression(node);
+ return checkVoidExpression(node);
case 190:
- return checkPrefixUnaryExpression(node);
+ return checkAwaitExpression(node);
case 191:
- return checkPostfixUnaryExpression(node);
+ return checkPrefixUnaryExpression(node);
case 192:
- return checkBinaryExpression(node, contextualMapper);
+ return checkPostfixUnaryExpression(node);
case 193:
- return checkConditionalExpression(node, contextualMapper);
- case 196:
- return checkSpreadExpression(node, contextualMapper);
- case 198:
+ return checkBinaryExpression(node, checkMode);
+ case 194:
+ return checkConditionalExpression(node, checkMode);
+ case 197:
+ return checkSpreadExpression(node, checkMode);
+ case 199:
return undefinedWideningType;
- case 195:
+ case 196:
return checkYieldExpression(node);
- case 252:
- return checkJsxExpression(node);
- case 246:
+ case 255:
+ return checkJsxExpression(node, checkMode);
+ case 248:
return checkJsxElement(node);
- case 247:
+ case 249:
return checkJsxSelfClosingElement(node);
- case 248:
+ case 253:
+ return checkJsxAttributes(node, checkMode);
+ case 250:
ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
}
return unknownType;
@@ -31193,7 +34057,16 @@ var ts;
grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
}
checkSourceElement(node.constraint);
- getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)));
+ checkSourceElement(node.default);
+ var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
+ if (!hasNonCircularBaseConstraint(typeParameter)) {
+ error(node.constraint, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
+ }
+ var constraintType = getConstraintOfTypeParameter(typeParameter);
+ var defaultType = getDefaultFromTypeParameter(typeParameter);
+ if (constraintType && defaultType) {
+ checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
+ }
if (produceDiagnostics) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
}
@@ -31204,7 +34077,7 @@ var ts;
var func = ts.getContainingFunction(node);
if (ts.getModifierFlags(node) & 92) {
func = ts.getContainingFunction(node);
- if (!(func.kind === 150 && ts.nodeIsPresent(func.body))) {
+ if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) {
error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
}
}
@@ -31215,7 +34088,7 @@ var ts;
if (ts.indexOf(func.parameters, node) !== 0) {
error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter);
}
- if (func.kind === 150 || func.kind === 154 || func.kind === 159) {
+ if (func.kind === 151 || func.kind === 155 || func.kind === 160) {
error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
}
}
@@ -31223,14 +34096,6 @@ var ts;
error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
- function isSyntacticallyValidGenerator(node) {
- if (!node.asteriskToken || !node.body) {
- return false;
- }
- return node.kind === 149 ||
- node.kind === 225 ||
- node.kind === 184;
- }
function getTypePredicateParameterIndex(parameterList, parameter) {
if (parameterList) {
for (var i = 0; i < parameterList.length; i++) {
@@ -31270,9 +34135,9 @@ var ts;
else if (parameterName) {
var hasReportedError = false;
for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) {
- var name_21 = _a[_i].name;
- if (ts.isBindingPattern(name_21) &&
- checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_21, parameterName, typePredicate.parameterName)) {
+ var name = _a[_i].name;
+ if (ts.isBindingPattern(name) &&
+ checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {
hasReportedError = true;
break;
}
@@ -31285,16 +34150,16 @@ var ts;
}
function getTypePredicateParent(node) {
switch (node.parent.kind) {
+ case 186:
+ case 154:
+ case 227:
case 185:
- case 153:
- case 225:
- case 184:
- case 158:
+ case 159:
+ case 150:
case 149:
- case 148:
- var parent_9 = node.parent;
- if (node === parent_9.type) {
- return parent_9;
+ var parent = node.parent;
+ if (node === parent.type) {
+ return parent;
}
}
}
@@ -31304,29 +34169,44 @@ var ts;
if (ts.isOmittedExpression(element)) {
continue;
}
- var name_22 = element.name;
- if (name_22.kind === 70 &&
- name_22.text === predicateVariableName) {
+ var name = element.name;
+ if (name.kind === 70 &&
+ name.text === predicateVariableName) {
error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
return true;
}
- else if (name_22.kind === 173 ||
- name_22.kind === 172) {
- if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_22, predicateVariableNode, predicateVariableName)) {
+ else if (name.kind === 174 ||
+ name.kind === 173) {
+ if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
return true;
}
}
}
}
function checkSignatureDeclaration(node) {
- if (node.kind === 155) {
+ if (node.kind === 156) {
checkGrammarIndexSignature(node);
}
- else if (node.kind === 158 || node.kind === 225 || node.kind === 159 ||
- node.kind === 153 || node.kind === 150 ||
- node.kind === 154) {
+ else if (node.kind === 159 || node.kind === 227 || node.kind === 160 ||
+ node.kind === 154 || node.kind === 151 ||
+ node.kind === 155) {
checkGrammarFunctionLikeDeclaration(node);
}
+ var functionFlags = ts.getFunctionFlags(node);
+ if ((functionFlags & 7) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
+ if ((functionFlags & 5) === 1) {
+ if (functionFlags & 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 2048);
+ }
+ else if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
if (node.type) {
@@ -31334,29 +34214,32 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (compilerOptions.noImplicitAny && !node.type) {
+ if (noImplicitAny && !node.type) {
switch (node.kind) {
- case 154:
+ case 155:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
- case 153:
+ case 154:
error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
}
}
if (node.type) {
- if (languageVersion >= 2 && isSyntacticallyValidGenerator(node)) {
+ var functionFlags_1 = ts.getFunctionFlags(node);
+ if ((functionFlags_1 & 5) === 1) {
var returnType = getTypeFromTypeNode(node.type);
if (returnType === voidType) {
error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
- var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType;
- var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType);
+ var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
+ var iterableIteratorInstantiation = functionFlags_1 & 2
+ ? createAsyncIterableIteratorType(generatorElementType)
+ : createIterableIteratorType(generatorElementType);
checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
}
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if ((functionFlags_1 & 3) === 2) {
checkAsyncFunctionReturnType(node);
}
}
@@ -31370,7 +34253,7 @@ var ts;
var staticNames = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150) {
+ if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var param = _c[_b];
if (ts.isParameterPropertyDeclaration(param)) {
@@ -31379,36 +34262,65 @@ var ts;
}
}
else {
- var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 114; });
+ var isStatic = ts.getModifierFlags(member) & 32;
var names = isStatic ? staticNames : instanceNames;
var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name);
if (memberName) {
switch (member.kind) {
- case 151:
+ case 152:
addName(names, member.name, memberName, 1);
break;
- case 152:
+ case 153:
addName(names, member.name, memberName, 2);
break;
- case 147:
+ case 148:
addName(names, member.name, memberName, 3);
break;
+ case 150:
+ addName(names, member.name, memberName, 4);
+ break;
}
}
}
}
function addName(names, location, name, meaning) {
- var prev = names[name];
+ var prev = names.get(name);
if (prev) {
- if (prev & meaning) {
+ if (prev & 4) {
+ if (meaning !== 4) {
+ error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+ }
+ }
+ else if (prev & meaning) {
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
}
else {
- names[name] = prev | meaning;
+ names.set(name, prev | meaning);
}
}
else {
- names[name] = meaning;
+ names.set(name, meaning);
+ }
+ }
+ }
+ function checkClassForStaticPropertyNameConflicts(node) {
+ for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+ var member = _a[_i];
+ var memberNameNode = member.name;
+ var isStatic = ts.getModifierFlags(member) & 32;
+ if (isStatic && memberNameNode) {
+ var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
+ switch (memberName) {
+ case "name":
+ case "length":
+ case "caller":
+ case "arguments":
+ case "prototype":
+ var message = ts.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
+ var className = getNameOfSymbol(getSymbolOfNode(node));
+ error(memberNameNode, message, memberName, className);
+ break;
+ }
}
}
}
@@ -31416,7 +34328,7 @@ var ts;
var names = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind == 146) {
+ if (member.kind === 147) {
var memberName = void 0;
switch (member.name.kind) {
case 9:
@@ -31427,18 +34339,18 @@ var ts;
default:
continue;
}
- if (names[memberName]) {
+ if (names.get(memberName)) {
error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
- names[memberName] = true;
+ names.set(memberName, true);
}
}
}
}
function checkTypeForDuplicateIndexSignatures(node) {
- if (node.kind === 227) {
+ if (node.kind === 229) {
var nodeSymbol = getSymbolOfNode(node);
if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
return;
@@ -31453,7 +34365,7 @@ var ts;
var declaration = decl;
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
switch (declaration.parameters[0].type.kind) {
- case 134:
+ case 135:
if (!seenStringIndexer) {
seenStringIndexer = true;
}
@@ -31520,12 +34432,12 @@ var ts;
if (n.kind === 98) {
error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
}
- else if (n.kind !== 184 && n.kind !== 225) {
+ else if (n.kind !== 185 && n.kind !== 227) {
ts.forEachChild(n, markThisReferencesAsErrors);
}
}
function isInstancePropertyWithInitializer(n) {
- return n.kind === 147 &&
+ return n.kind === 148 &&
!(ts.getModifierFlags(n) & 32) &&
!!n.initializer;
}
@@ -31545,7 +34457,7 @@ var ts;
var superCallStatement = void 0;
for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) {
var statement = statements_3[_i];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
superCallStatement = statement;
break;
}
@@ -31568,18 +34480,18 @@ var ts;
checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
checkDecorators(node);
checkSignatureDeclaration(node);
- if (node.kind === 151) {
+ if (node.kind === 152) {
if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) {
if (!(node.flags & 256)) {
error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
}
}
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
- var otherKind = node.kind === 151 ? 152 : 151;
+ var otherKind = node.kind === 152 ? 153 : 152;
var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) {
@@ -31593,17 +34505,12 @@ var ts;
}
}
var returnType = getTypeOfAccessors(getSymbolOfNode(node));
- if (node.kind === 151) {
+ if (node.kind === 152) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
}
}
- if (node.parent.kind !== 176) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
- else {
- checkNodeDeferred(node);
- }
+ checkSourceElement(node.body);
+ registerForUnusedIdentifiersCheck(node);
}
function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
var firstType = getAnnotatedType(first);
@@ -31612,14 +34519,11 @@ var ts;
error(first, message);
}
}
- function checkAccessorDeferred(node) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
function checkMissingDeclaration(node) {
checkDecorators(node);
}
function checkTypeArgumentConstraints(typeParameters, typeArgumentNodes) {
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
var typeArguments;
var mapper;
var result = true;
@@ -31627,7 +34531,7 @@ var ts;
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
if (!typeArguments) {
- typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ typeArguments = fillMissingTypeArguments(ts.map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount);
mapper = createTypeMapper(typeParameters, typeArguments);
}
var typeArgument = typeArguments[i];
@@ -31678,25 +34582,42 @@ var ts;
function checkUnionOrIntersectionType(node) {
ts.forEach(node.types, checkSourceElement);
}
+ function checkIndexedAccessIndexType(type, accessNode) {
+ if (!(type.flags & 524288)) {
+ return type;
+ }
+ var objectType = type.objectType;
+ var indexType = type.indexType;
+ if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
+ return type;
+ }
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ var constraint = getBaseConstraintOfType(objectType);
+ if (constraint && getIndexInfoOfType(constraint, 1)) {
+ return type;
+ }
+ }
+ error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
+ return type;
+ }
function checkIndexedAccessType(node) {
- getTypeFromIndexedAccessTypeNode(node);
+ checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
}
function checkMappedType(node) {
checkSourceElement(node.typeParameter);
checkSourceElement(node.type);
var type = getTypeFromMappedTypeNode(node);
var constraintType = getConstraintTypeFromMappedType(type);
- var keyType = constraintType.flags & 16384 ? getApparentTypeOfTypeParameter(constraintType) : constraintType;
- checkTypeAssignableTo(keyType, stringType, node.typeParameter.constraint);
+ checkTypeAssignableTo(constraintType, stringType, node.typeParameter.constraint);
}
function isPrivateWithinAmbient(node) {
return (ts.getModifierFlags(node) & 8) && ts.isInAmbientContext(node);
}
function getEffectiveDeclarationFlags(n, flagsToCheck) {
var flags = ts.getCombinedModifierFlags(n);
- if (n.parent.kind !== 227 &&
- n.parent.kind !== 226 &&
- n.parent.kind !== 197 &&
+ if (n.parent.kind !== 229 &&
+ n.parent.kind !== 228 &&
+ n.parent.kind !== 198 &&
ts.isInAmbientContext(n)) {
if (!(flags & 2)) {
flags |= 1;
@@ -31773,7 +34694,7 @@ var ts;
if (subsequentNode.kind === node.kind) {
var errorNode_1 = subsequentNode.name || subsequentNode;
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
- var reportError = (node.kind === 149 || node.kind === 148) &&
+ var reportError = (node.kind === 150 || node.kind === 149) &&
(ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32);
if (reportError) {
var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
@@ -31802,15 +34723,15 @@ var ts;
}
var duplicateFunctionDeclaration = false;
var multipleConstructorImplementation = false;
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
- var current = declarations_4[_i];
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
+ var current = declarations_5[_i];
var node = current;
var inAmbientContext = ts.isInAmbientContext(node);
- var inAmbientContextOrInterface = node.parent.kind === 227 || node.parent.kind === 161 || inAmbientContext;
+ var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext;
if (inAmbientContextOrInterface) {
previousDeclaration = undefined;
}
- if (node.kind === 225 || node.kind === 149 || node.kind === 148 || node.kind === 150) {
+ if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) {
var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
someNodeFlags |= currentNodeFlags;
allNodeFlags &= currentNodeFlags;
@@ -31861,8 +34782,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) {
- var signature = signatures_3[_a];
+ for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
+ var signature = signatures_4[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -31921,16 +34842,16 @@ var ts;
}
function getDeclarationSpaces(d) {
switch (d.kind) {
- case 227:
+ case 229:
return 2097152;
- case 230:
+ case 232:
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
? 4194304 | 1048576
: 4194304;
- case 226:
- case 229:
+ case 228:
+ case 231:
return 2097152 | 1048576;
- case 234:
+ case 236:
var result_3 = 0;
var target = resolveAlias(getSymbolOfNode(d));
ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); });
@@ -31940,87 +34861,92 @@ var ts;
}
}
}
- function checkNonThenableType(type, location, message) {
- type = getWidenedType(type);
- if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) {
- if (location) {
- if (!message) {
- message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member;
- }
- error(location, message);
- }
- return unknownType;
- }
- return type;
+ function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) {
+ var promisedType = getPromisedTypeOfPromise(type, errorNode);
+ return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage);
}
- function getPromisedType(promise) {
+ function getPromisedTypeOfPromise(promise, errorNode) {
if (isTypeAny(promise)) {
return undefined;
}
- if (getObjectFlags(promise) & 4) {
- if (promise.target === tryGetGlobalPromiseType()
- || promise.target === getGlobalPromiseLikeType()) {
- return promise.typeArguments[0];
- }
+ var typeAsPromise = promise;
+ if (typeAsPromise.promisedTypeOfPromise) {
+ return typeAsPromise.promisedTypeOfPromise;
}
- var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
- if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
- return undefined;
+ if (isReferenceToType(promise, getGlobalPromiseType(false))) {
+ return typeAsPromise.promisedTypeOfPromise = promise.typeArguments[0];
}
var thenFunction = getTypeOfPropertyOfType(promise, "then");
- if (!thenFunction || isTypeAny(thenFunction)) {
+ if (isTypeAny(thenFunction)) {
return undefined;
}
- var thenSignatures = getSignaturesOfType(thenFunction, 0);
+ var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0) : emptyArray;
if (thenSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.A_promise_must_have_a_then_method);
+ }
return undefined;
}
- var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072);
+ var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 524288);
if (isTypeAny(onfulfilledParameterType)) {
return undefined;
}
var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0);
if (onfulfilledParameterSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);
+ }
return undefined;
}
- return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
+ return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
}
- function getTypeOfFirstParameterOfSignature(signature) {
- return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ function checkAwaitedType(type, errorNode, diagnosticMessage) {
+ return getAwaitedType(type, errorNode, diagnosticMessage) || unknownType;
}
- function getAwaitedType(type) {
- return checkAwaitedType(type, undefined, undefined);
- }
- function checkAwaitedType(type, location, message) {
- return checkAwaitedTypeWorker(type);
- function checkAwaitedTypeWorker(type) {
- if (type.flags & 65536) {
- var types = [];
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var constituentType = _a[_i];
- types.push(checkAwaitedTypeWorker(constituentType));
- }
- return getUnionType(types, true);
+ function getAwaitedType(type, errorNode, diagnosticMessage) {
+ var typeAsAwaitable = type;
+ if (typeAsAwaitable.awaitedTypeOfType) {
+ return typeAsAwaitable.awaitedTypeOfType;
+ }
+ if (isTypeAny(type)) {
+ return typeAsAwaitable.awaitedTypeOfType = type;
+ }
+ if (type.flags & 65536) {
+ var types = void 0;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var constituentType = _a[_i];
+ types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage));
}
- else {
- var promisedType = getPromisedType(type);
- if (promisedType === undefined) {
- return checkNonThenableType(type, location, message);
- }
- else {
- if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
- if (location) {
- error(location, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol));
- }
- return unknownType;
- }
- awaitedTypeStack.push(type.id);
- var awaitedType = checkAwaitedTypeWorker(promisedType);
- awaitedTypeStack.pop();
- return awaitedType;
+ if (!types) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, true);
+ }
+ var promisedType = getPromisedTypeOfPromise(type);
+ if (promisedType) {
+ if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);
}
+ return undefined;
+ }
+ awaitedTypeStack.push(type.id);
+ var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage);
+ awaitedTypeStack.pop();
+ if (!awaitedType) {
+ return undefined;
}
+ return typeAsAwaitable.awaitedTypeOfType = awaitedType;
}
+ var thenFunction = getTypeOfPropertyOfType(type, "then");
+ if (thenFunction && getSignaturesOfType(thenFunction, 0).length > 0) {
+ if (errorNode) {
+ ts.Debug.assert(!!diagnosticMessage);
+ error(errorNode, diagnosticMessage);
+ }
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
var returnType = getTypeFromTypeNode(node.type);
@@ -32028,8 +34954,8 @@ var ts;
if (returnType === unknownType) {
return unknownType;
}
- var globalPromiseType = getGlobalPromiseType();
- if (globalPromiseType !== emptyGenericType && globalPromiseType !== getTargetType(returnType)) {
+ var globalPromiseType = getGlobalPromiseType(true);
+ if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
error(node.type, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
@@ -32047,10 +34973,15 @@ var ts;
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
- error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) {
+ error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
+ else {
+ error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ }
return unknownType;
}
- var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
+ var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(true);
if (globalPromiseConstructorLikeType === emptyObjectType) {
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
return unknownType;
@@ -32065,7 +34996,7 @@ var ts;
return unknownType;
}
}
- return checkAwaitedType(returnType, node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type);
+ return checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkDecorator(node) {
var signature = getResolvedSignature(node);
@@ -32077,22 +35008,22 @@ var ts;
var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
var errorInfo;
switch (node.parent.kind) {
- case 226:
+ case 228:
var classSymbol = getSymbolOfNode(node.parent);
var classConstructorType = getTypeOfSymbol(classSymbol);
expectedReturnType = getUnionType([classConstructorType, voidType]);
break;
- case 144:
+ case 145:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
break;
- case 147:
+ case 148:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
var methodType = getTypeOfNode(node.parent);
var descriptorType = createTypedPropertyDescriptorType(methodType);
expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -32111,6 +35042,9 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function getParameterTypeNodeForDecoratorCheck(node) {
+ return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ }
function checkDecorators(node) {
if (!node.decorators) {
return;
@@ -32121,28 +35055,36 @@ var ts;
if (!compilerOptions.experimentalDecorators) {
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
}
+ var firstDecorator = node.decorators[0];
+ checkExternalEmitHelpers(firstDecorator, 8);
+ if (node.kind === 145) {
+ checkExternalEmitHelpers(firstDecorator, 32);
+ }
if (compilerOptions.emitDecoratorMetadata) {
+ checkExternalEmitHelpers(firstDecorator, 16);
switch (node.kind) {
- case 226:
+ case 228:
var constructor = ts.getFirstConstructorWithBody(node);
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
markTypeNodeAsReferenced(node.type);
break;
- case 147:
- case 144:
+ case 148:
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ break;
+ case 145:
markTypeNodeAsReferenced(node.type);
break;
}
@@ -32154,6 +35096,7 @@ var ts;
checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -32161,8 +35104,8 @@ var ts;
function checkFunctionOrMethodDeclaration(node) {
checkDecorators(node);
checkSignatureDeclaration(node);
- var isAsync = ts.isAsyncFunctionLike(node);
- if (node.name && node.name.kind === 142) {
+ var functionFlags = ts.getFunctionFlags(node);
+ if (node.name && node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
@@ -32180,15 +35123,17 @@ var ts;
}
}
checkSourceElement(node.body);
- if (!node.asteriskToken) {
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
+ var returnOrPromisedType = node.type && (functionFlags & 2
+ ? checkAsyncFunctionReturnType(node)
+ : getTypeFromTypeNode(node.type));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (produceDiagnostics && !node.type) {
- if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
+ if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
- if (node.asteriskToken && ts.nodeIsPresent(node.body)) {
+ if (functionFlags & 1 && ts.nodeIsPresent(node.body)) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
}
@@ -32204,56 +35149,54 @@ var ts;
for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) {
var node = deferredUnusedIdentifierNodes_1[_i];
switch (node.kind) {
- case 261:
- case 230:
+ case 264:
+ case 232:
checkUnusedModuleMembers(node);
break;
- case 226:
- case 197:
+ case 228:
+ case 198:
checkUnusedClassMembers(node);
checkUnusedTypeParameters(node);
break;
- case 227:
+ case 229:
checkUnusedTypeParameters(node);
break;
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
checkUnusedLocalsAndParameters(node);
break;
- case 150:
- case 184:
- case 225:
- case 185:
- case 149:
case 151:
+ case 185:
+ case 227:
+ case 186:
+ case 150:
case 152:
+ case 153:
if (node.body) {
checkUnusedLocalsAndParameters(node);
}
checkUnusedTypeParameters(node);
break;
- case 148:
- case 153:
+ case 149:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
checkUnusedTypeParameters(node);
break;
}
- ;
}
}
}
function checkUnusedLocalsAndParameters(node) {
- if (node.parent.kind !== 227 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
- var _loop_3 = function (key) {
- var local = node.locals[key];
+ if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
+ node.locals.forEach(function (local) {
if (!local.isReferenced) {
- if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 144) {
+ if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
@@ -32266,22 +35209,28 @@ var ts;
ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
}
}
- };
- for (var key in node.locals) {
- _loop_3(key);
- }
+ });
+ }
+ }
+ function isRemovedPropertyFromObjectSpread(node) {
+ if (ts.isBindingElement(node) && ts.isObjectBindingPattern(node.parent)) {
+ var lastElement = ts.lastOrUndefined(node.parent.elements);
+ return lastElement !== node && !!lastElement.dotDotDotToken;
}
+ return false;
}
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 223 &&
- (declaration.parent.parent.kind === 212 ||
- declaration.parent.parent.kind === 213)) {
+ if (declaration.kind === 225 &&
+ (declaration.parent.parent.kind === 214 ||
+ declaration.parent.parent.kind === 215)) {
return;
}
}
- error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) {
+ error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ }
}
function parameterNameStartsWithUnderscore(parameterName) {
return parameterName && isIdentifierThatStartsWithUnderScore(parameterName);
@@ -32294,12 +35243,12 @@ var ts;
if (node.members) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 149 || member.kind === 147) {
+ if (member.kind === 150 || member.kind === 148) {
if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) {
error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name);
}
}
- else if (member.kind === 150) {
+ else if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) {
@@ -32330,21 +35279,20 @@ var ts;
}
function checkUnusedModuleMembers(node) {
if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) {
- for (var key in node.locals) {
- var local = node.locals[key];
+ node.locals.forEach(function (local) {
if (!local.isReferenced && !local.exportSymbol) {
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ errorUnusedLocal(declaration.name, local.name);
}
}
}
- }
+ });
}
}
function checkBlock(node) {
- if (node.kind === 204) {
+ if (node.kind === 206) {
checkGrammarStatementInAmbientContext(node);
}
ts.forEach(node.statements, checkSourceElement);
@@ -32366,19 +35314,19 @@ var ts;
if (!(identifier && identifier.text === name)) {
return false;
}
- if (node.kind === 147 ||
- node.kind === 146 ||
+ if (node.kind === 148 ||
+ node.kind === 147 ||
+ node.kind === 150 ||
node.kind === 149 ||
- node.kind === 148 ||
- node.kind === 151 ||
- node.kind === 152) {
+ node.kind === 152 ||
+ node.kind === 153) {
return false;
}
if (ts.isInAmbientContext(node)) {
return false;
}
var root = ts.getRootDeclaration(node);
- if (root.kind === 144 && ts.nodeIsMissing(root.parent.body)) {
+ if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) {
return false;
}
return true;
@@ -32388,9 +35336,13 @@ var ts;
potentialThisCollisions.push(node);
}
}
+ function checkCollisionWithCapturedNewTargetVariable(node, name) {
+ if (needCollisionCheckForIdentifier(node, name, "_newTarget")) {
+ potentialNewTargetCollisions.push(node);
+ }
+ }
function checkIfThisIsCapturedInEnclosingScope(node) {
- var current = node;
- while (current) {
+ ts.findAncestor(node, function (current) {
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 70;
if (isDeclaration_1) {
@@ -32399,10 +35351,23 @@ var ts;
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
}
- return;
+ return true;
}
- current = current.parent;
- }
+ });
+ }
+ function checkIfNewTargetIsCapturedInEnclosingScope(node) {
+ ts.findAncestor(node, function (current) {
+ if (getNodeCheckFlags(current) & 8) {
+ var isDeclaration_2 = node.kind !== 70;
+ if (isDeclaration_2) {
+ error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ }
+ else {
+ error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);
+ }
+ return true;
+ }
+ });
}
function checkCollisionWithCapturedSuperVariable(node, name) {
if (!needCollisionCheckForIdentifier(node, name, "_super")) {
@@ -32413,8 +35378,8 @@ var ts;
return;
}
if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
- var isDeclaration_2 = node.kind !== 70;
- if (isDeclaration_2) {
+ var isDeclaration_3 = node.kind !== 70;
+ if (isDeclaration_3) {
error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
}
else {
@@ -32429,23 +35394,23 @@ var ts;
if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent)) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
- if (!needCollisionCheckForIdentifier(node, name, "Promise")) {
+ if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 8192) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
@@ -32453,7 +35418,7 @@ var ts;
if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) {
return;
}
- if (node.kind === 223 && !node.initializer) {
+ if (node.kind === 225 && !node.initializer) {
return;
}
var symbol = getSymbolOfNode(node);
@@ -32463,25 +35428,25 @@ var ts;
localDeclarationSymbol !== symbol &&
localDeclarationSymbol.flags & 2) {
if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) {
- var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 224);
- var container = varDeclList.parent.kind === 205 && varDeclList.parent.parent
+ var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226);
+ var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent
? varDeclList.parent.parent
: undefined;
var namesShareScope = container &&
- (container.kind === 204 && ts.isFunctionLike(container.parent) ||
- container.kind === 231 ||
- container.kind === 230 ||
- container.kind === 261);
+ (container.kind === 206 && ts.isFunctionLike(container.parent) ||
+ container.kind === 233 ||
+ container.kind === 232 ||
+ container.kind === 264);
if (!namesShareScope) {
- var name_23 = symbolToString(localDeclarationSymbol);
- error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_23, name_23);
+ var name = symbolToString(localDeclarationSymbol);
+ error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
}
}
}
}
}
function checkParameterInitializer(node) {
- if (ts.getRootDeclaration(node).kind !== 144) {
+ if (ts.getRootDeclaration(node).kind !== 145) {
return;
}
var func = ts.getContainingFunction(node);
@@ -32490,7 +35455,7 @@ var ts;
if (ts.isTypeNode(n) || ts.isDeclarationName(n)) {
return;
}
- if (n.kind === 177) {
+ if (n.kind === 178) {
return visit(n.expression);
}
else if (n.kind === 70) {
@@ -32504,21 +35469,21 @@ var ts;
}
var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
if (enclosingContainer === func) {
- if (symbol.valueDeclaration.kind === 144) {
+ if (symbol.valueDeclaration.kind === 145 ||
+ symbol.valueDeclaration.kind === 175) {
if (symbol.valueDeclaration.pos < node.pos) {
return;
}
- var current = n;
- while (current !== node.initializer) {
- if (ts.isFunctionLike(current.parent)) {
- return;
- }
- if (current.parent.kind === 147 &&
- !(ts.hasModifier(current.parent, 32)) &&
- ts.isClassLike(current.parent.parent)) {
- return;
+ if (ts.findAncestor(n, function (current) {
+ if (current === node.initializer) {
+ return "quit";
}
- current = current.parent;
+ return ts.isFunctionLike(current.parent) ||
+ (current.parent.kind === 148 &&
+ !(ts.hasModifier(current.parent, 32)) &&
+ ts.isClassLike(current.parent.parent));
+ })) {
+ return;
}
}
error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
@@ -32535,34 +35500,40 @@ var ts;
function checkVariableLikeDeclaration(node) {
checkDecorators(node);
checkSourceElement(node.type);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
if (node.initializer) {
checkExpressionCached(node.initializer);
}
}
- if (node.kind === 174) {
- if (node.propertyName && node.propertyName.kind === 142) {
+ if (node.kind === 175) {
+ if (node.parent.kind === 173 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 4);
+ }
+ if (node.propertyName && node.propertyName.kind === 143) {
checkComputedPropertyName(node.propertyName);
}
- var parent_10 = node.parent.parent;
- var parentType = getTypeForBindingElementParent(parent_10);
- var name_24 = node.propertyName || node.name;
- var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name_24));
+ var parent = node.parent.parent;
+ var parentType = getTypeForBindingElementParent(parent);
+ var name = node.propertyName || node.name;
+ var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name));
markPropertyAsReferenced(property);
- if (parent_10.initializer && property && getParentOfSymbol(property)) {
- checkClassPropertyAccess(parent_10, parent_10.initializer, parentType, property);
+ if (parent.initializer && property) {
+ checkPropertyAccessibility(parent, parent.initializer, parentType, property);
}
}
if (ts.isBindingPattern(node.name)) {
+ if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
ts.forEach(node.name.elements, checkSourceElement);
}
- if (node.initializer && ts.getRootDeclaration(node).kind === 144 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
+ if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
return;
}
if (ts.isBindingPattern(node.name)) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined);
checkParameterInitializer(node);
}
@@ -32571,7 +35542,7 @@ var ts;
var symbol = getSymbolOfNode(node);
var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol));
if (node === symbol.valueDeclaration) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined);
checkParameterInitializer(node);
}
@@ -32589,20 +35560,21 @@ var ts;
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
- if (node.kind !== 147 && node.kind !== 146) {
+ if (node.kind !== 148 && node.kind !== 147) {
checkExportsOnMergedDeclarations(node);
- if (node.kind === 223 || node.kind === 174) {
+ if (node.kind === 225 || node.kind === 175) {
checkVarDeclaredNamesNotShadowed(node);
}
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
}
function areDeclarationFlagsIdentical(left, right) {
- if ((left.kind === 144 && right.kind === 223) ||
- (left.kind === 223 && right.kind === 144)) {
+ if ((left.kind === 145 && right.kind === 225) ||
+ (left.kind === 225 && right.kind === 145)) {
return true;
}
if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) {
@@ -32629,8 +35601,8 @@ var ts;
ts.forEach(node.declarationList.declarations, checkSourceElement);
}
function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) {
- if (node.modifiers && node.parent.kind === 176) {
- if (ts.isAsyncFunctionLike(node)) {
+ if (node.modifiers && node.parent.kind === 177) {
+ if (ts.getFunctionFlags(node) & 2) {
if (node.modifiers.length > 1) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
}
@@ -32648,7 +35620,7 @@ var ts;
checkGrammarStatementInAmbientContext(node);
checkExpression(node.expression);
checkSourceElement(node.thenStatement);
- if (node.thenStatement.kind === 206) {
+ if (node.thenStatement.kind === 208) {
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
}
checkSourceElement(node.elseStatement);
@@ -32665,12 +35637,12 @@ var ts;
}
function checkForStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.initializer && node.initializer.kind === 224) {
+ if (node.initializer && node.initializer.kind === 226) {
checkGrammarVariableDeclarationList(node.initializer);
}
}
if (node.initializer) {
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
ts.forEach(node.initializer.declarations, checkVariableDeclaration);
}
else {
@@ -32688,13 +35660,23 @@ var ts;
}
function checkForOfStatement(node) {
checkGrammarForInOrForOfStatement(node);
- if (node.initializer.kind === 224) {
+ if (node.kind === 215) {
+ if (node.awaitModifier) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 8192);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (node.initializer.kind === 226) {
checkForInOrForOfVariableDeclaration(node);
}
else {
var varExpr = node.initializer;
- var iteratedType = checkRightHandSideOfForOf(node.expression);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier);
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
checkDestructuringAssignment(varExpr, iteratedType || unknownType);
}
else {
@@ -32713,7 +35695,7 @@ var ts;
function checkForInStatement(node) {
checkGrammarForInOrForOfStatement(node);
var rightType = checkNonNullExpression(node.expression);
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
var variable = node.initializer.declarations[0];
if (variable && ts.isBindingPattern(variable.name)) {
error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -32723,7 +35705,7 @@ var ts;
else {
var varExpr = node.initializer;
var leftType = checkExpression(varExpr);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
}
else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -32733,7 +35715,7 @@ var ts;
checkReferenceExpression(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access);
}
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
checkSourceElement(node.statement);
@@ -32748,161 +35730,199 @@ var ts;
checkVariableDeclaration(decl);
}
}
- function checkRightHandSideOfForOf(rhsExpression) {
+ function checkRightHandSideOfForOf(rhsExpression, awaitModifier) {
var expressionType = checkNonNullExpression(rhsExpression);
- return checkIteratedTypeOrElementType(expressionType, rhsExpression, true);
+ return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
if (isTypeAny(inputType)) {
return inputType;
}
- if (languageVersion >= 2) {
- return checkElementTypeOfIterable(inputType, errorNode);
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ }
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ var uplevelIteration = languageVersion >= 2;
+ var downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
+ if (uplevelIteration || downlevelIteration || allowAsyncIterable) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ if (iteratedType || uplevelIteration) {
+ return iteratedType;
+ }
}
+ var arrayType = inputType;
+ var reportedError = false;
+ var hasStringConstituent = false;
if (allowStringInput) {
- return checkElementTypeOfArrayOrString(inputType, errorNode);
- }
- if (isArrayLikeType(inputType)) {
- var indexType = getIndexTypeOfType(inputType, 1);
- if (indexType) {
- return indexType;
+ if (arrayType.flags & 65536) {
+ var arrayTypes = inputType.types;
+ var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
+ if (filteredTypes !== arrayTypes) {
+ arrayType = getUnionType(filteredTypes, true);
+ }
+ }
+ else if (arrayType.flags & 262178) {
+ arrayType = neverType;
+ }
+ hasStringConstituent = arrayType !== inputType;
+ if (hasStringConstituent) {
+ if (languageVersion < 1) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
+ reportedError = true;
+ }
+ }
+ if (arrayType.flags & 8192) {
+ return stringType;
+ }
}
}
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
+ if (!isArrayLikeType(arrayType)) {
+ if (errorNode && !reportedError) {
+ var diagnostic = !allowStringInput || hasStringConstituent
+ ? downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type
+ : downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
+ error(errorNode, diagnostic, typeToString(arrayType));
+ }
+ return hasStringConstituent ? stringType : undefined;
}
- return unknownType;
- }
- function checkElementTypeOfIterable(iterable, errorNode) {
- var elementType = getElementTypeOfIterable(iterable, errorNode);
- if (errorNode && elementType) {
- checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode);
+ var arrayElementType = getIndexTypeOfType(arrayType, 1);
+ if (hasStringConstituent && arrayElementType) {
+ if (arrayElementType.flags & 262178) {
+ return stringType;
+ }
+ return getUnionType([arrayElementType, stringType], true);
}
- return elementType || anyType;
+ return arrayElementType;
}
- function getElementTypeOfIterable(type, errorNode) {
+ function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterable = type;
- if (!typeAsIterable.iterableElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableType()) {
- typeAsIterable.iterableElementType = type.typeArguments[0];
+ if (isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable) {
+ return isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isAsyncIterable) {
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
}
- else {
- var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorFunction)) {
- return undefined;
- }
- var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray;
- if (iteratorFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
- }
- return undefined;
- }
- typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), true), errorNode);
+ }
+ if (!isAsyncIterable || allowNonAsyncIterables) {
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
+ : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
}
}
- return typeAsIterable.iterableElementType;
- }
- function getElementTypeOfIterator(type, errorNode) {
- if (isTypeAny(type)) {
- return undefined;
+ var iteratorMethodSignatures;
+ var mayBeIterable = false;
+ if (isAsyncIterable) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
+ }
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
}
- var typeAsIterator = type;
- if (!typeAsIterator.iteratorElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIteratorType()) {
- typeAsIterator.iteratorElementType = type.typeArguments[0];
+ if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
- else {
- var iteratorNextFunction = getTypeOfPropertyOfType(type, "next");
- if (isTypeAny(iteratorNextFunction)) {
- return undefined;
- }
- var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray;
- if (iteratorNextFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
- }
- return undefined;
- }
- var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), true);
- if (isTypeAny(iteratorNextResult)) {
- return undefined;
- }
- var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
- if (!iteratorNextValue) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
- }
- return undefined;
- }
- typeAsIterator.iteratorElementType = iteratorNextValue;
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
+ mayBeIterable = true;
+ }
+ if (ts.some(iteratorMethodSignatures)) {
+ var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, false);
+ if (checkAssignability && errorNode && iteratedType) {
+ checkTypeAssignableTo(type, mayBeIterable
+ ? createIterableType(iteratedType)
+ : createAsyncIterableType(iteratedType), errorNode);
}
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType
+ : typeAsIterable.iteratedTypeOfIterable = iteratedType;
+ }
+ if (errorNode) {
+ error(errorNode, isAsyncIterable
+ ? ts.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
+ : ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
}
- return typeAsIterator.iteratorElementType;
+ return undefined;
}
- function getElementTypeOfIterableIterator(type) {
+ function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
return undefined;
}
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableIteratorType()) {
- return type.typeArguments[0];
+ var typeAsIterator = type;
+ if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) {
+ return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator;
}
- return getElementTypeOfIterable(type, undefined) ||
- getElementTypeOfIterator(type, undefined);
- }
- function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
- ts.Debug.assert(languageVersion < 2);
- var arrayType = arrayOrStringType;
- if (arrayOrStringType.flags & 65536) {
- var arrayTypes = arrayOrStringType.types;
- var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
- if (filteredTypes !== arrayTypes) {
- arrayType = getUnionType(filteredTypes, true);
- }
+ var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType;
+ if (isReferenceToType(type, getIteratorType(false))) {
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0]
+ : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0];
}
- else if (arrayOrStringType.flags & 262178) {
- arrayType = neverType;
+ var nextMethod = getTypeOfPropertyOfType(type, "next");
+ if (isTypeAny(nextMethod)) {
+ return undefined;
}
- var hasStringConstituent = arrayOrStringType !== arrayType;
- var reportedError = false;
- if (hasStringConstituent) {
- if (languageVersion < 1) {
- error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
- reportedError = true;
- }
- if (arrayType.flags & 8192) {
- return stringType;
+ var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0) : emptyArray;
+ if (nextMethodSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.An_async_iterator_must_have_a_next_method
+ : ts.Diagnostics.An_iterator_must_have_a_next_method);
}
+ return undefined;
}
- if (!isArrayLikeType(arrayType)) {
- if (!reportedError) {
- var diagnostic = hasStringConstituent
- ? ts.Diagnostics.Type_0_is_not_an_array_type
- : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
- error(errorNode, diagnostic, typeToString(arrayType));
+ var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), true);
+ if (isTypeAny(nextResult)) {
+ return undefined;
+ }
+ if (isAsyncIterator) {
+ nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
- return hasStringConstituent ? stringType : unknownType;
}
- var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType;
- if (hasStringConstituent) {
- if (arrayElementType.flags & 262178) {
- return stringType;
+ var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value");
+ if (!nextValue) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property
+ : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
}
- return getUnionType([arrayElementType, stringType], true);
+ return undefined;
}
- return arrayElementType;
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue
+ : typeAsIterator.iteratedTypeOfIterator = nextValue;
+ }
+ function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) {
+ if (isTypeAny(returnType)) {
+ return undefined;
+ }
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ || getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 152)));
+ return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153)));
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType;
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
+ ? getPromisedTypeOfPromise(returnType)
+ : returnType;
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 | 1);
}
function checkReturnStatement(node) {
@@ -32918,40 +35938,41 @@ var ts;
var returnType = getReturnTypeOfSignature(signature);
if (strictNullChecks || node.expression || returnType.flags & 8192) {
var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
- if (func.asteriskToken) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
return;
}
- if (func.kind === 152) {
+ if (func.kind === 153) {
if (node.expression) {
- error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
+ error(node, ts.Diagnostics.Setters_cannot_return_a_value);
}
}
- else if (func.kind === 150) {
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) {
- error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
+ else if (func.kind === 151) {
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
+ error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
}
}
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
- if (ts.isAsyncFunctionLike(func)) {
- var promisedType = getPromisedType(returnType);
- var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (functionFlags & 2) {
+ var promisedType = getPromisedTypeOfPromise(returnType);
+ var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (promisedType) {
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node);
+ checkTypeAssignableTo(awaitedType, promisedType, node);
}
}
else {
- checkTypeAssignableTo(exprType, returnType, node.expression || node);
+ checkTypeAssignableTo(exprType, returnType, node);
}
}
}
- else if (func.kind !== 150 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+ else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
}
function checkWithStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.flags & 524288) {
+ if (node.flags & 16384) {
grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);
}
}
@@ -32970,7 +35991,7 @@ var ts;
var expressionType = checkExpression(node.expression);
var expressionIsLiteral = isLiteralType(expressionType);
ts.forEach(node.caseBlock.clauses, function (clause) {
- if (clause.kind === 254 && !hasDuplicateDefaultClause) {
+ if (clause.kind === 257 && !hasDuplicateDefaultClause) {
if (firstDefaultClause === undefined) {
firstDefaultClause = clause;
}
@@ -32982,7 +36003,7 @@ var ts;
hasDuplicateDefaultClause = true;
}
}
- if (produceDiagnostics && clause.kind === 253) {
+ if (produceDiagnostics && clause.kind === 256) {
var caseClause = clause;
var caseType = checkExpression(caseClause.expression);
var caseIsLiteral = isLiteralType(caseType);
@@ -33003,18 +36024,16 @@ var ts;
}
function checkLabeledStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- var current = node.parent;
- while (current) {
+ ts.findAncestor(node.parent, function (current) {
if (ts.isFunctionLike(current)) {
- break;
+ return "quit";
}
- if (current.kind === 219 && current.label.text === node.label.text) {
+ if (current.kind === 221 && current.label.text === node.label.text) {
var sourceFile = ts.getSourceFileOfNode(node);
grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
- break;
+ return true;
}
- current = current.parent;
- }
+ });
}
checkSourceElement(node.statement);
}
@@ -33041,14 +36060,14 @@ var ts;
grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
}
else {
- var blockLocals = catchClause.block.locals;
- if (blockLocals) {
- for (var caughtName in catchClause.locals) {
- var blockLocal = blockLocals[caughtName];
+ var blockLocals_1 = catchClause.block.locals;
+ if (blockLocals_1) {
+ ts.forEachKey(catchClause.locals, function (caughtName) {
+ var blockLocal = blockLocals_1.get(caughtName);
if (blockLocal && (blockLocal.flags & 2) !== 0) {
grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
}
- }
+ });
}
}
}
@@ -33096,12 +36115,13 @@ var ts;
if (!indexType) {
return;
}
- if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) {
+ var propDeclaration = prop.valueDeclaration;
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (prop.valueDeclaration.name.kind === 142 || prop.parent === containingType.symbol) {
- errorNode = prop.valueDeclaration;
+ if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) {
+ errorNode = propDeclaration;
}
else if (indexDeclaration) {
errorNode = indexDeclaration;
@@ -33126,15 +36146,23 @@ var ts;
case "string":
case "symbol":
case "void":
+ case "object":
error(name, message, name.text);
}
}
function checkTypeParameters(typeParameterDeclarations) {
if (typeParameterDeclarations) {
- for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
+ var seenDefault = false;
+ for (var i = 0; i < typeParameterDeclarations.length; i++) {
var node = typeParameterDeclarations[i];
checkTypeParameter(node);
if (produceDiagnostics) {
+ if (node.default) {
+ seenDefault = true;
+ }
+ else if (seenDefault) {
+ error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
+ }
for (var j = 0; j < i; j++) {
if (typeParameterDeclarations[j].symbol === node.symbol) {
error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
@@ -33144,22 +36172,56 @@ var ts;
}
}
}
- function checkTypeParameterListsIdentical(node, symbol) {
+ function checkTypeParameterListsIdentical(symbol) {
if (symbol.declarations.length === 1) {
return;
}
- var firstDecl;
- for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 226 || declaration.kind === 227) {
- if (!firstDecl) {
- firstDecl = declaration;
+ var links = getSymbolLinks(symbol);
+ if (!links.typeParametersChecked) {
+ links.typeParametersChecked = true;
+ var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
+ if (declarations.length <= 1) {
+ return;
+ }
+ var type = getDeclaredTypeOfSymbol(symbol);
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
+ var name = symbolToString(symbol);
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
+ var declaration = declarations_6[_i];
+ error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
}
- else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) {
- error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text);
+ }
+ }
+ }
+ function areTypeParametersIdentical(declarations, typeParameters) {
+ var maxTypeArgumentCount = ts.length(typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
+ var declaration = declarations_7[_i];
+ var numTypeParameters = ts.length(declaration.typeParameters);
+ if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
+ return false;
+ }
+ for (var i = 0; i < numTypeParameters; i++) {
+ var source = declaration.typeParameters[i];
+ var target = typeParameters[i];
+ if (source.name.text !== target.symbol.name) {
+ return false;
+ }
+ var sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint);
+ var targetConstraint = getConstraintFromTypeParameter(target);
+ if ((sourceConstraint || targetConstraint) &&
+ (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) {
+ return false;
+ }
+ var sourceDefault = source.default && getTypeFromTypeNode(source.default);
+ var targetDefault = getDefaultFromTypeParameter(target);
+ if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {
+ return false;
}
}
}
+ return true;
}
function checkClassExpression(node) {
checkClassLikeDeclaration(node);
@@ -33179,11 +36241,12 @@ var ts;
registerForUnusedIdentifiersCheck(node);
}
function checkClassLikeDeclaration(node) {
- checkGrammarClassDeclarationHeritageClauses(node);
+ checkGrammarClassLikeDeclaration(node);
checkDecorators(node);
if (node.name) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -33193,19 +36256,26 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
var staticType = getTypeOfSymbol(symbol);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
checkClassForDuplicateDeclarations(node);
+ if (!ts.isInAmbientContext(node)) {
+ checkClassForStaticPropertyNameConflicts(node);
+ }
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(baseTypeNode.parent, 1);
+ }
var baseTypes = getBaseTypes(type);
if (baseTypes.length && produceDiagnostics) {
var baseType_1 = baseTypes[0];
- var staticBaseType = getBaseConstructorTypeOfClass(type);
+ var baseConstructorType = getBaseConstructorTypeOfClass(type);
+ var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
if (baseTypeNode.typeArguments) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
- for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
if (!checkTypeArgumentConstraints(constructor.typeParameters, baseTypeNode.typeArguments)) {
break;
@@ -33214,15 +36284,11 @@ var ts;
}
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
- if (baseType_1.symbol.valueDeclaration &&
- !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration) &&
- baseType_1.symbol.valueDeclaration.kind === 226) {
- if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) {
- error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class);
- }
+ if (baseConstructorType.flags & 540672 && !isMixinConstructorType(staticType)) {
+ error(node.name || node, ts.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
}
- if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32)) {
- var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
+ if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32) && !(baseConstructorType.flags & 540672)) {
+ var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);
if (ts.forEach(constructors, function (sig) { return getReturnTypeOfSignature(sig) !== baseType_1; })) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructors_must_all_have_the_same_return_type);
}
@@ -33241,8 +36307,7 @@ var ts;
if (produceDiagnostics) {
var t = getTypeFromTypeNode(typeRefNode);
if (t !== unknownType) {
- var declaredType = getObjectFlags(t) & 4 ? t.target : t;
- if (getObjectFlags(declaredType) & 3) {
+ if (isValidBaseType(t)) {
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
}
else {
@@ -33270,17 +36335,22 @@ var ts;
}
}
function getTargetSymbol(s) {
- return s.flags & 16777216 ? getSymbolLinks(s).target : s;
+ return getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
+ function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
+ return ts.filter(symbol.declarations, function (d) {
+ return d.kind === 228 || d.kind === 229;
+ });
+ }
function checkKindsOfPropertyMemberOverrides(type, baseType) {
- var baseProperties = getPropertiesOfObjectType(baseType);
+ var baseProperties = getPropertiesOfType(baseType);
for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
var baseProperty = baseProperties_1[_i];
var base = getTargetSymbol(baseProperty);
- if (base.flags & 134217728) {
+ if (base.flags & 16777216) {
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
@@ -33290,7 +36360,7 @@ var ts;
if (derived === base) {
var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol);
if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) {
- if (derivedClassDecl.kind === 197) {
+ if (derivedClassDecl.kind === 198) {
error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
}
else {
@@ -33300,66 +36370,37 @@ var ts;
}
else {
var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
- if ((baseDeclarationFlags & 8) || (derivedDeclarationFlags & 8)) {
+ if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
continue;
}
- if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) {
+ if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
var errorMessage = void 0;
- if (base.flags & 8192) {
+ if (isMethodLike(base)) {
if (derived.flags & 98304) {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
}
else {
- ts.Debug.assert((derived.flags & 4) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
}
}
else if (base.flags & 4) {
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
}
else {
- ts.Debug.assert((base.flags & 98304) !== 0);
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
function isAccessor(kind) {
- return kind === 151 || kind === 152;
- }
- function areTypeParametersIdentical(list1, list2) {
- if (!list1 && !list2) {
- return true;
- }
- if (!list1 || !list2 || list1.length !== list2.length) {
- return false;
- }
- for (var i = 0, len = list1.length; i < len; i++) {
- var tp1 = list1[i];
- var tp2 = list2[i];
- if (tp1.name.text !== tp2.name.text) {
- return false;
- }
- if (!tp1.constraint && !tp2.constraint) {
- continue;
- }
- if (!tp1.constraint || !tp2.constraint) {
- return false;
- }
- if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
- return false;
- }
- }
- return true;
+ return kind === 152 || kind === 153;
}
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
@@ -33367,16 +36408,16 @@ var ts;
return true;
}
var seen = ts.createMap();
- ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
+ ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.name, { prop: p, containingType: type }); });
var ok = true;
for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
var base = baseTypes_2[_i];
- var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType));
- for (var _a = 0, properties_6 = properties; _a < properties_6.length; _a++) {
- var prop = properties_6[_a];
- var existing = seen[prop.name];
+ var properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
+ for (var _a = 0, properties_8 = properties; _a < properties_8.length; _a++) {
+ var prop = properties_8[_a];
+ var existing = seen.get(prop.name);
if (!existing) {
- seen[prop.name] = { prop: prop, containingType: base };
+ seen.set(prop.name, { prop: prop, containingType: base });
}
else {
var isInheritedProperty = existing.containingType !== type;
@@ -33400,8 +36441,8 @@ var ts;
checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
checkExportsOnMergedDeclarations(node);
var symbol = getSymbolOfNode(node);
- checkTypeParameterListsIdentical(node, symbol);
- var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 227);
+ checkTypeParameterListsIdentical(symbol);
+ var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229);
if (node === firstInterfaceDecl) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
@@ -33497,7 +36538,7 @@ var ts;
return value;
function evalConstant(e) {
switch (e.kind) {
- case 190:
+ case 191:
var value_1 = evalConstant(e.operand);
if (value_1 === undefined) {
return undefined;
@@ -33508,7 +36549,7 @@ var ts;
case 51: return ~value_1;
}
return undefined;
- case 192:
+ case 193:
var left = evalConstant(e.left);
if (left === undefined) {
return undefined;
@@ -33532,12 +36573,13 @@ var ts;
}
return undefined;
case 8:
+ checkGrammarNumericLiteral(e);
return +e.text;
- case 183:
+ case 184:
return evalConstant(e.expression);
case 70:
+ case 179:
case 178:
- case 177:
var member = initializer.parent;
var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
var enumType_1;
@@ -33548,7 +36590,7 @@ var ts;
}
else {
var expression = void 0;
- if (e.kind === 178) {
+ if (e.kind === 179) {
if (e.argumentExpression === undefined ||
e.argumentExpression.kind !== 9) {
return undefined;
@@ -33565,7 +36607,7 @@ var ts;
if (current.kind === 70) {
break;
}
- else if (current.kind === 177) {
+ else if (current.kind === 178) {
current = current.expression;
}
else {
@@ -33605,6 +36647,7 @@ var ts;
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
checkExportsOnMergedDeclarations(node);
@@ -33625,7 +36668,7 @@ var ts;
}
var seenEnumMissingInitialInitializer_1 = false;
ts.forEach(enumSymbol.declarations, function (declaration) {
- if (declaration.kind !== 229) {
+ if (declaration.kind !== 231) {
return false;
}
var enumDeclaration = declaration;
@@ -33646,10 +36689,10 @@ var ts;
}
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
- var declaration = declarations_5[_i];
- if ((declaration.kind === 226 ||
- (declaration.kind === 225 && ts.nodeIsPresent(declaration.body))) &&
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+ var declaration = declarations_8[_i];
+ if ((declaration.kind === 228 ||
+ (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) &&
!ts.isInAmbientContext(declaration)) {
return declaration;
}
@@ -33708,7 +36751,7 @@ var ts;
error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
}
}
- var mergedClass = ts.getDeclarationOfKind(symbol, 226);
+ var mergedClass = ts.getDeclarationOfKind(symbol, 228);
if (mergedClass &&
inSameLexicalScope(node, mergedClass)) {
getNodeLinks(node).flags |= 32768;
@@ -33716,7 +36759,7 @@ var ts;
}
if (isAmbientExternalModule) {
if (ts.isExternalModuleAugmentation(node)) {
- var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432);
+ var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 134217728);
if (checkBody && node.body) {
for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) {
var statement = _a[_i];
@@ -33751,42 +36794,42 @@ var ts;
}
function checkModuleAugmentationElement(node, isGlobalAugmentation) {
switch (node.kind) {
- case 205:
+ case 207:
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
checkModuleAugmentationElement(decl, isGlobalAugmentation);
}
break;
- case 240:
- case 241:
+ case 242:
+ case 243:
grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
break;
- case 234:
- case 235:
+ case 236:
+ case 237:
grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
break;
- case 174:
- case 223:
- var name_25 = node.name;
- if (ts.isBindingPattern(name_25)) {
- for (var _b = 0, _c = name_25.elements; _b < _c.length; _b++) {
+ case 175:
+ case 225:
+ var name = node.name;
+ if (ts.isBindingPattern(name)) {
+ for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
var el = _c[_b];
checkModuleAugmentationElement(el, isGlobalAugmentation);
}
break;
}
- case 226:
- case 229:
- case 225:
+ case 228:
+ case 231:
case 227:
+ case 229:
+ case 232:
case 230:
- case 228:
if (isGlobalAugmentation) {
return;
}
var symbol = getSymbolOfNode(node);
if (symbol) {
- var reportError = !(symbol.flags & 33554432);
+ var reportError = !(symbol.flags & 134217728);
if (!reportError) {
reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
}
@@ -33798,12 +36841,12 @@ var ts;
switch (node.kind) {
case 70:
return node;
- case 141:
+ case 142:
do {
node = node.left;
} while (node.kind !== 70);
return node;
- case 177:
+ case 178:
do {
node = node.expression;
} while (node.kind !== 70);
@@ -33816,9 +36859,9 @@ var ts;
error(moduleName, ts.Diagnostics.String_literal_expected);
return false;
}
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
- error(moduleName, node.kind === 241 ?
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule) {
+ error(moduleName, node.kind === 243 ?
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
return false;
@@ -33839,7 +36882,7 @@ var ts;
(symbol.flags & 793064 ? 793064 : 0) |
(symbol.flags & 1920 ? 1920 : 0);
if (target.flags & excludedMeanings) {
- var message = node.kind === 243 ?
+ var message = node.kind === 245 ?
ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
@@ -33866,7 +36909,7 @@ var ts;
checkImportBinding(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237) {
+ if (importClause.namedBindings.kind === 239) {
checkImportBinding(importClause.namedBindings);
}
else {
@@ -33917,8 +36960,10 @@ var ts;
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
ts.forEach(node.exportClause.elements, checkExportSpecifier);
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
+ !node.moduleSpecifier && ts.isInAmbientContext(node);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
}
}
@@ -33931,7 +36976,7 @@ var ts;
}
}
function checkGrammarModuleElementContext(node, errorMessage) {
- var isInAppropriateContext = node.parent.kind === 261 || node.parent.kind === 231 || node.parent.kind === 230;
+ var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232;
if (!isInAppropriateContext) {
grammarErrorOnFirstToken(node, errorMessage);
}
@@ -33954,9 +36999,14 @@ var ts;
if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) {
return;
}
- var container = node.parent.kind === 261 ? node.parent : node.parent.parent;
- if (container.kind === 230 && !ts.isAmbientModule(container)) {
- error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ var container = node.parent.kind === 264 ? node.parent : node.parent.parent;
+ if (container.kind === 232 && !ts.isAmbientModule(container)) {
+ if (node.isExportEquals) {
+ error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ }
+ else {
+ error(node, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
+ }
return;
}
if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) {
@@ -33979,18 +37029,13 @@ var ts;
}
}
function hasExportedMembers(moduleSymbol) {
- for (var id in moduleSymbol.exports) {
- if (id !== "export=") {
- return true;
- }
- }
- return false;
+ return ts.forEachEntry(moduleSymbol.exports, function (_, id) { return id !== "export="; });
}
function checkExternalModuleExports(node) {
var moduleSymbol = getSymbolOfNode(node);
var links = getSymbolLinks(moduleSymbol);
if (!links.exportsChecked) {
- var exportEqualsSymbol = moduleSymbol.exports["export="];
+ var exportEqualsSymbol = moduleSymbol.exports.get("export=");
if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
if (!isTopLevelInExternalModuleAugmentation(declaration)) {
@@ -33998,31 +37043,31 @@ var ts;
}
}
var exports = getExportsOfModule(moduleSymbol);
- for (var id in exports) {
+ exports && exports.forEach(function (_a, id) {
+ var declarations = _a.declarations, flags = _a.flags;
if (id === "__export") {
- continue;
+ return;
}
- var _a = exports[id], declarations = _a.declarations, flags = _a.flags;
if (flags & (1920 | 64 | 384)) {
- continue;
+ return;
}
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload);
if (flags & 524288 && exportedDeclarationsCount <= 2) {
- continue;
+ return;
}
if (exportedDeclarationsCount > 1) {
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
- var declaration = declarations_6[_i];
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+ var declaration = declarations_9[_i];
if (isNotOverload(declaration)) {
diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id));
}
}
}
- }
+ });
links.exportsChecked = true;
}
function isNotOverload(declaration) {
- return (declaration.kind !== 225 && declaration.kind !== 149) ||
+ return (declaration.kind !== 227 && declaration.kind !== 150) ||
!!declaration.body;
}
}
@@ -34033,123 +37078,123 @@ var ts;
var kind = node.kind;
if (cancellationToken) {
switch (kind) {
- case 230:
- case 226:
+ case 232:
+ case 228:
+ case 229:
case 227:
- case 225:
cancellationToken.throwIfCancellationRequested();
}
}
switch (kind) {
- case 143:
- return checkTypeParameter(node);
case 144:
+ return checkTypeParameter(node);
+ case 145:
return checkParameter(node);
+ case 148:
case 147:
- case 146:
return checkPropertyDeclaration(node);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
- return checkSignatureDeclaration(node);
case 155:
return checkSignatureDeclaration(node);
+ case 156:
+ return checkSignatureDeclaration(node);
+ case 150:
case 149:
- case 148:
return checkMethodDeclaration(node);
- case 150:
- return checkConstructorDeclaration(node);
case 151:
+ return checkConstructorDeclaration(node);
case 152:
+ case 153:
return checkAccessorDeclaration(node);
- case 157:
+ case 158:
return checkTypeReferenceNode(node);
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 160:
- return checkTypeQuery(node);
case 161:
- return checkTypeLiteral(node);
+ return checkTypeQuery(node);
case 162:
- return checkArrayType(node);
+ return checkTypeLiteral(node);
case 163:
- return checkTupleType(node);
+ return checkArrayType(node);
case 164:
+ return checkTupleType(node);
case 165:
- return checkUnionOrIntersectionType(node);
case 166:
- case 168:
- return checkSourceElement(node.type);
+ return checkUnionOrIntersectionType(node);
+ case 167:
case 169:
- return checkIndexedAccessType(node);
+ return checkSourceElement(node.type);
case 170:
+ return checkIndexedAccessType(node);
+ case 171:
return checkMappedType(node);
- case 225:
+ case 227:
return checkFunctionDeclaration(node);
- case 204:
- case 231:
+ case 206:
+ case 233:
return checkBlock(node);
- case 205:
- return checkVariableStatement(node);
case 207:
- return checkExpressionStatement(node);
- case 208:
- return checkIfStatement(node);
+ return checkVariableStatement(node);
case 209:
- return checkDoStatement(node);
+ return checkExpressionStatement(node);
case 210:
- return checkWhileStatement(node);
+ return checkIfStatement(node);
case 211:
- return checkForStatement(node);
+ return checkDoStatement(node);
case 212:
- return checkForInStatement(node);
+ return checkWhileStatement(node);
case 213:
- return checkForOfStatement(node);
+ return checkForStatement(node);
case 214:
+ return checkForInStatement(node);
case 215:
- return checkBreakOrContinueStatement(node);
+ return checkForOfStatement(node);
case 216:
- return checkReturnStatement(node);
case 217:
- return checkWithStatement(node);
+ return checkBreakOrContinueStatement(node);
case 218:
- return checkSwitchStatement(node);
+ return checkReturnStatement(node);
case 219:
- return checkLabeledStatement(node);
+ return checkWithStatement(node);
case 220:
- return checkThrowStatement(node);
+ return checkSwitchStatement(node);
case 221:
- return checkTryStatement(node);
+ return checkLabeledStatement(node);
+ case 222:
+ return checkThrowStatement(node);
case 223:
+ return checkTryStatement(node);
+ case 225:
return checkVariableDeclaration(node);
- case 174:
+ case 175:
return checkBindingElement(node);
- case 226:
+ case 228:
return checkClassDeclaration(node);
- case 227:
+ case 229:
return checkInterfaceDeclaration(node);
- case 228:
+ case 230:
return checkTypeAliasDeclaration(node);
- case 229:
+ case 231:
return checkEnumDeclaration(node);
- case 230:
+ case 232:
return checkModuleDeclaration(node);
- case 235:
+ case 237:
return checkImportDeclaration(node);
- case 234:
+ case 236:
return checkImportEqualsDeclaration(node);
- case 241:
+ case 243:
return checkExportDeclaration(node);
- case 240:
+ case 242:
return checkExportAssignment(node);
- case 206:
+ case 208:
checkGrammarStatementInAmbientContext(node);
return;
- case 222:
+ case 224:
checkGrammarStatementInAmbientContext(node);
return;
- case 244:
+ case 246:
return checkMissingDeclaration(node);
}
}
@@ -34162,17 +37207,17 @@ var ts;
for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) {
var node = deferredNodes_1[_i];
switch (node.kind) {
- case 184:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
break;
- case 151:
case 152:
- checkAccessorDeferred(node);
+ case 153:
+ checkAccessorDeclaration(node);
break;
- case 197:
+ case 198:
checkClassExpressionDeferred(node);
break;
}
@@ -34192,6 +37237,7 @@ var ts;
}
checkGrammarSourceFile(node);
potentialThisCollisions.length = 0;
+ potentialNewTargetCollisions.length = 0;
deferredNodes = [];
deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined;
ts.forEach(node.statements, checkSourceElement);
@@ -34211,6 +37257,10 @@ var ts;
ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
potentialThisCollisions.length = 0;
}
+ if (potentialNewTargetCollisions.length) {
+ ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
+ potentialNewTargetCollisions.length = 0;
+ }
links.flags |= 1;
}
}
@@ -34255,7 +37305,7 @@ var ts;
function isInsideWithStatementBody(node) {
if (node) {
while (node.parent) {
- if (node.parent.kind === 217 && node.parent.statement === node) {
+ if (node.parent.kind === 219 && node.parent.statement === node) {
return true;
}
node = node.parent;
@@ -34264,11 +37314,11 @@ var ts;
return false;
}
function getSymbolsInScope(location, meaning) {
- var symbols = ts.createMap();
- var memberFlags = 0;
if (isInsideWithStatementBody(location)) {
return [];
}
+ var symbols = ts.createMap();
+ var memberFlags = 0;
populateSymbols();
return symbolsToArray(symbols);
function populateSymbols() {
@@ -34277,28 +37327,28 @@ var ts;
copySymbols(location.locals, meaning);
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
+ case 232:
copySymbols(getSymbolOfNode(location).exports, meaning & 8914931);
break;
- case 229:
+ case 231:
copySymbols(getSymbolOfNode(location).exports, meaning & 8);
break;
- case 197:
+ case 198:
var className = location.name;
if (className) {
copySymbol(location.symbol, meaning);
}
- case 226:
- case 227:
+ case 228:
+ case 229:
if (!(memberFlags & 32)) {
copySymbols(getSymbolOfNode(location).members, meaning & 793064);
}
break;
- case 184:
+ case 185:
var funcName = location.name;
if (funcName) {
copySymbol(location.symbol, meaning);
@@ -34316,17 +37366,16 @@ var ts;
function copySymbol(symbol, meaning) {
if (symbol.flags & meaning) {
var id = symbol.name;
- if (!symbols[id]) {
- symbols[id] = symbol;
+ if (!symbols.has(id)) {
+ symbols.set(id, symbol);
}
}
}
function copySymbols(source, meaning) {
if (meaning) {
- for (var id in source) {
- var symbol = source[id];
+ source.forEach(function (symbol) {
copySymbol(symbol, meaning);
- }
+ });
}
}
}
@@ -34337,27 +37386,27 @@ var ts;
}
function isTypeDeclaration(node) {
switch (node.kind) {
- case 143:
- case 226:
- case 227:
+ case 144:
case 228:
case 229:
+ case 230:
+ case 231:
return true;
}
}
function isTypeReferenceIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 141) {
+ while (node.parent && node.parent.kind === 142) {
node = node.parent;
}
- return node.parent && (node.parent.kind === 157 || node.parent.kind === 272);
+ return node.parent && (node.parent.kind === 158 || node.parent.kind === 276);
}
function isHeritageClauseElementIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 177) {
+ while (node.parent && node.parent.kind === 178) {
node = node.parent;
}
- return node.parent && node.parent.kind === 199;
+ return node.parent && node.parent.kind === 200;
}
function forEachEnclosingClass(node, callback) {
var result;
@@ -34374,13 +37423,13 @@ var ts;
return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
}
function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
- while (nodeOnRightSide.parent.kind === 141) {
+ while (nodeOnRightSide.parent.kind === 142) {
nodeOnRightSide = nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 234) {
+ if (nodeOnRightSide.parent.kind === 236) {
return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 240) {
+ if (nodeOnRightSide.parent.kind === 242) {
return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
}
return undefined;
@@ -34388,27 +37437,35 @@ var ts;
function isInRightSideOfImportOrExportAssignment(node) {
return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
}
+ function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {
+ var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
+ switch (specialPropertyAssignmentKind) {
+ case 1:
+ case 3:
+ return getSymbolOfNode(entityName.parent);
+ case 4:
+ case 2:
+ case 5:
+ return getSymbolOfNode(entityName.parent.parent);
+ }
+ }
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
if (ts.isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
}
- if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 177) {
- var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
- switch (specialPropertyAssignmentKind) {
- case 1:
- case 3:
- return getSymbolOfNode(entityName.parent);
- case 4:
- case 2:
- return getSymbolOfNode(entityName.parent.parent);
- default:
+ if (ts.isInJavaScriptFile(entityName) &&
+ entityName.parent.kind === 178 &&
+ entityName.parent === entityName.parent.parent.left) {
+ var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
+ if (specialPropertyAssignmentSymbol) {
+ return specialPropertyAssignmentSymbol;
}
}
- if (entityName.parent.kind === 240 && ts.isEntityNameExpression(entityName)) {
+ if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) {
return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608);
}
- if (entityName.kind !== 177 && isInRightSideOfImportOrExportAssignment(entityName)) {
- var importEqualsDeclaration = ts.getAncestor(entityName, 234);
+ if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) {
+ var importEqualsDeclaration = ts.getAncestor(entityName, 236);
ts.Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true);
}
@@ -34417,7 +37474,7 @@ var ts;
}
if (isHeritageClauseElementIdentifier(entityName)) {
var meaning = 0;
- if (entityName.parent.kind === 199) {
+ if (entityName.parent.kind === 200) {
meaning = 793064;
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning |= 107455;
@@ -34427,9 +37484,12 @@ var ts;
meaning = 1920;
}
meaning |= 8388608;
- return resolveEntityName(entityName, meaning);
+ var entityNameSymbol = resolveEntityName(entityName, meaning);
+ if (entityNameSymbol) {
+ return entityNameSymbol;
+ }
}
- else if (ts.isPartOfExpression(entityName)) {
+ if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
}
@@ -34439,14 +37499,14 @@ var ts;
}
return resolveEntityName(entityName, 107455, false, true);
}
- else if (entityName.kind === 177) {
+ else if (entityName.kind === 178) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkPropertyAccessExpression(entityName);
}
return getNodeLinks(entityName).resolvedSymbol;
}
- else if (entityName.kind === 141) {
+ else if (entityName.kind === 142) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkQualifiedName(entityName);
@@ -34455,19 +37515,19 @@ var ts;
}
}
else if (isTypeReferenceIdentifier(entityName)) {
- var meaning = (entityName.parent.kind === 157 || entityName.parent.kind === 272) ? 793064 : 1920;
+ var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920;
return resolveEntityName(entityName, meaning, false, true);
}
- else if (entityName.parent.kind === 250) {
+ else if (entityName.parent.kind === 252) {
return getJsxAttributePropertySymbol(entityName.parent);
}
- if (entityName.parent.kind === 156) {
+ if (entityName.parent.kind === 157) {
return resolveEntityName(entityName, 1);
}
return undefined;
}
function getSymbolAtLocation(node) {
- if (node.kind === 261) {
+ if (node.kind === 264) {
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
}
if (isInsideWithStatementBody(node)) {
@@ -34483,8 +37543,8 @@ var ts;
if (isInRightSideOfImportOrExportAssignment(node)) {
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
}
- else if (node.parent.kind === 174 &&
- node.parent.parent.kind === 172 &&
+ else if (node.parent.kind === 175 &&
+ node.parent.parent.kind === 173 &&
node === node.parent.propertyName) {
var typeOfPattern = getTypeOfNode(node.parent.parent);
var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text);
@@ -34495,8 +37555,8 @@ var ts;
}
switch (node.kind) {
case 70:
- case 177:
- case 141:
+ case 178:
+ case 142:
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
case 98:
var container = ts.getThisContainer(node, false);
@@ -34509,18 +37569,18 @@ var ts;
case 96:
var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node);
return type.symbol;
- case 167:
+ case 168:
return getTypeFromTypeNode(node).symbol;
case 122:
var constructorDeclaration = node.parent;
- if (constructorDeclaration && constructorDeclaration.kind === 150) {
+ if (constructorDeclaration && constructorDeclaration.kind === 151) {
return constructorDeclaration.parent.symbol;
}
return undefined;
case 9:
if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 235 || node.parent.kind === 241) &&
+ ((node.parent.kind === 237 || node.parent.kind === 243) &&
node.parent.moduleSpecifier === node)) {
return resolveExternalModuleName(node, node);
}
@@ -34528,7 +37588,7 @@ var ts;
return resolveExternalModuleName(node, node);
}
case 8:
- if (node.parent.kind === 178 && node.parent.argumentExpression === node) {
+ if (node.parent.kind === 179 && node.parent.argumentExpression === node) {
var objectType = getTypeOfExpression(node.parent.expression);
if (objectType === unknownType)
return undefined;
@@ -34542,7 +37602,7 @@ var ts;
return undefined;
}
function getShorthandAssignmentValueSymbol(location) {
- if (location && location.kind === 258) {
+ if (location && location.kind === 261) {
return resolveEntityName(location.name, 107455 | 8388608);
}
return undefined;
@@ -34557,13 +37617,22 @@ var ts;
return unknownType;
}
if (ts.isPartOfTypeNode(node)) {
- return getTypeFromTypeNode(node);
+ var typeFromTypeNode = getTypeFromTypeNode(node);
+ if (typeFromTypeNode && ts.isExpressionWithTypeArgumentsInClassImplementsClause(node)) {
+ var containingClass = ts.getContainingClass(node);
+ var classType = getTypeOfNode(containingClass);
+ typeFromTypeNode = getTypeWithThisArgument(typeFromTypeNode, classType.thisType);
+ }
+ return typeFromTypeNode;
}
if (ts.isPartOfExpression(node)) {
return getRegularTypeOfExpression(node);
}
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(node)) {
- return getBaseTypes(getDeclaredTypeOfSymbol(getSymbolOfNode(node.parent.parent)))[0];
+ var classNode = ts.getContainingClass(node);
+ var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(classNode));
+ var baseType = getBaseTypes(classType)[0];
+ return baseType && getTypeWithThisArgument(baseType, classType.thisType);
}
if (isTypeDeclaration(node)) {
var symbol = getSymbolOfNode(node);
@@ -34592,22 +37661,22 @@ var ts;
return unknownType;
}
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) {
- ts.Debug.assert(expr.kind === 176 || expr.kind === 175);
- if (expr.parent.kind === 213) {
- var iteratedType = checkRightHandSideOfForOf(expr.parent.expression);
+ ts.Debug.assert(expr.kind === 177 || expr.kind === 176);
+ if (expr.parent.kind === 215) {
+ var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 192) {
+ if (expr.parent.kind === 193) {
var iteratedType = getTypeOfExpression(expr.parent.right);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 257) {
+ if (expr.parent.kind === 260) {
var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent);
return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent);
}
- ts.Debug.assert(expr.parent.kind === 175);
+ ts.Debug.assert(expr.parent.kind === 176);
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType;
return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType);
}
function getPropertySymbolOfDestructuringAssignment(location) {
@@ -34631,29 +37700,32 @@ var ts;
var propsByName = createSymbolTable(getPropertiesOfType(type));
if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) {
ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
- if (!propsByName[p.name]) {
- propsByName[p.name] = p;
+ if (!propsByName.has(p.name)) {
+ propsByName.set(p.name, p);
}
});
}
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (symbol.flags & 268435456) {
+ if (getCheckFlags(symbol) & 6) {
var symbols_3 = [];
- var name_26 = symbol.name;
+ var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
- var symbol = getPropertyOfType(t, name_26);
+ var symbol = getPropertyOfType(t, name_2);
if (symbol) {
symbols_3.push(symbol);
}
});
return symbols_3;
}
- else if (symbol.flags & 67108864) {
+ else if (symbol.flags & 134217728) {
if (symbol.leftSpread) {
var links = symbol;
- return [links.leftSpread, links.rightSpread];
+ return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ }
+ if (symbol.syntheticOrigin) {
+ return getRootSymbols(symbol.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -34670,7 +37742,8 @@ var ts;
if (!ts.isGeneratedIdentifier(node)) {
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
- return getReferencedValueSymbol(node) === argumentsSymbol;
+ var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node;
+ return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol;
}
}
return false;
@@ -34686,7 +37759,7 @@ var ts;
if (symbolLinks.exportsSomeValue === undefined) {
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & 107455)
- : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue);
+ : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s) {
@@ -34710,19 +37783,15 @@ var ts;
}
symbol = exportSymbol;
}
- var parentSymbol = getParentOfSymbol(symbol);
- if (parentSymbol) {
- if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 261) {
- var symbolFile = parentSymbol.valueDeclaration;
+ var parentSymbol_1 = getParentOfSymbol(symbol);
+ if (parentSymbol_1) {
+ if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) {
+ var symbolFile = parentSymbol_1.valueDeclaration;
var referenceFile = ts.getSourceFileOfNode(node);
var symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
- for (var n = node.parent; n; n = n.parent) {
- if (ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
- return n;
- }
- }
+ return ts.findAncestor(node.parent, function (n) { return ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol_1; });
}
}
}
@@ -34750,7 +37819,7 @@ var ts;
else if (nodeLinks_1.flags & 131072) {
var isDeclaredInLoop = nodeLinks_1.flags & 262144;
var inLoopInitializer = ts.isIterationStatement(container, false);
- var inLoopBodyBlock = container.kind === 204 && ts.isIterationStatement(container.parent, false);
+ var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false);
links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
}
else {
@@ -34785,21 +37854,17 @@ var ts;
return false;
}
function isValueAliasDeclaration(node) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
switch (node.kind) {
- case 234:
case 236:
- case 237:
+ case 238:
case 239:
- case 243:
- return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
case 241:
+ case 245:
+ return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
+ case 243:
var exportClause = node.exportClause;
return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
- case 240:
+ case 242:
return node.expression
&& node.expression.kind === 70
? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol)
@@ -34809,7 +37874,7 @@ var ts;
}
function isTopLevelValueImportEqualsWithEntityName(node) {
node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration);
- if (node === undefined || node.parent.kind !== 261 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+ if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
return false;
}
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
@@ -34827,10 +37892,6 @@ var ts;
return isConstEnumSymbol(s) || s.constEnumOnlyModule;
}
function isReferencedAliasDeclaration(node, checkChildren) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
if (ts.isAliasSymbolDeclaration(node)) {
var symbol = getSymbolOfNode(node);
if (symbol && getSymbolLinks(symbol).referenced) {
@@ -34851,16 +37912,30 @@ var ts;
}
return false;
}
+ function isRequiredInitializedParameter(parameter) {
+ return strictNullChecks &&
+ !isOptionalParameter(parameter) &&
+ parameter.initializer &&
+ !(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
- node = ts.getParseTreeNode(node);
- return node ? getNodeLinks(node).flags : undefined;
+ return getNodeLinks(node).flags;
}
function getEnumMemberValue(node) {
computeEnumMemberValues(node.parent);
return getNodeLinks(node).enumMemberValue;
}
+ function canHaveConstantValue(node) {
+ switch (node.kind) {
+ case 263:
+ case 178:
+ case 179:
+ return true;
+ }
+ return false;
+ }
function getConstantValue(node) {
- if (node.kind === 260) {
+ if (node.kind === 263) {
return getEnumMemberValue(node);
}
var symbol = getNodeLinks(node).resolvedSymbol;
@@ -34876,15 +37951,17 @@ var ts;
}
function getTypeReferenceSerializationKind(typeName, location) {
var valueSymbol = resolveEntityName(typeName, 107455, true, false, location);
- var globalPromiseSymbol = tryGetGlobalPromiseConstructorSymbol();
- if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
- return ts.TypeReferenceSerializationKind.Promise;
- }
- var constructorType = valueSymbol ? getTypeOfSymbol(valueSymbol) : undefined;
- if (constructorType && isConstructorType(constructorType)) {
- return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
- }
var typeSymbol = resolveEntityName(typeName, 793064, true, false, location);
+ if (valueSymbol && valueSymbol === typeSymbol) {
+ var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(false);
+ if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
+ return ts.TypeReferenceSerializationKind.Promise;
+ }
+ var constructorType = getTypeOfSymbol(valueSymbol);
+ if (constructorType && isConstructorType(constructorType)) {
+ return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
+ }
+ }
if (!typeSymbol) {
return ts.TypeReferenceSerializationKind.ObjectType;
}
@@ -34928,6 +38005,9 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
+ if (flags & 4096) {
+ type = includeFalsyTypes(type, 2048);
+ }
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
@@ -34942,10 +38022,13 @@ var ts;
var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node));
resolveBaseTypesOfClass(classType);
var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType;
+ if (!baseType.symbol) {
+ writer.reportIllegalExtends();
+ }
getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags);
}
function hasGlobalName(name) {
- return !!globals[name];
+ return globals.has(name);
}
function getReferencedValueSymbol(reference, startInDeclarationContainer) {
var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
@@ -34954,9 +38037,9 @@ var ts;
}
var location = reference;
if (startInDeclarationContainer) {
- var parent_11 = reference.parent;
- if (ts.isDeclaration(parent_11) && reference === parent_11.name) {
- location = getDeclarationContainer(parent_11);
+ var parent = reference.parent;
+ if (ts.isDeclaration(parent) && reference === parent.name) {
+ location = getDeclarationContainer(parent);
}
}
return resolveName(location, reference.text, 107455 | 1048576 | 8388608, undefined, undefined);
@@ -34989,34 +38072,46 @@ var ts;
var fileToDirective;
if (resolvedTypeReferenceDirectives) {
fileToDirective = ts.createFileMap();
- for (var key in resolvedTypeReferenceDirectives) {
- var resolvedDirective = resolvedTypeReferenceDirectives[key];
+ resolvedTypeReferenceDirectives.forEach(function (resolvedDirective, key) {
if (!resolvedDirective) {
- continue;
+ return;
}
var file = host.getSourceFile(resolvedDirective.resolvedFileName);
fileToDirective.set(file.path, key);
- }
+ });
}
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedDeclarationWithCollidingName: getReferencedDeclarationWithCollidingName,
isDeclarationWithCollidingName: isDeclarationWithCollidingName,
- isValueAliasDeclaration: isValueAliasDeclaration,
+ isValueAliasDeclaration: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? isValueAliasDeclaration(node) : true;
+ },
hasGlobalName: hasGlobalName,
- isReferencedAliasDeclaration: isReferencedAliasDeclaration,
- getNodeCheckFlags: getNodeCheckFlags,
+ isReferencedAliasDeclaration: function (node, checkChildren) {
+ node = ts.getParseTreeNode(node);
+ return node ? isReferencedAliasDeclaration(node, checkChildren) : true;
+ },
+ getNodeCheckFlags: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getNodeCheckFlags(node) : undefined;
+ },
isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
+ isRequiredInitializedParameter: isRequiredInitializedParameter,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
- getConstantValue: getConstantValue,
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
collectLinkedAliases: collectLinkedAliases,
getReferencedValueDeclaration: getReferencedValueDeclaration,
getTypeReferenceSerializationKind: getTypeReferenceSerializationKind,
@@ -35034,7 +38129,7 @@ var ts;
if (!fileToDirective) {
return undefined;
}
- var meaning = (node.kind === 177) || (node.kind === 70 && isInTypeQuery(node))
+ var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node))
? 107455 | 1048576
: 793064 | 1920;
var symbol = resolveEntityName(node, meaning, true);
@@ -35069,15 +38164,15 @@ var ts;
}
var current = symbol;
while (true) {
- var parent_12 = getParentOfSymbol(current);
- if (parent_12) {
- current = parent_12;
+ var parent = getParentOfSymbol(current);
+ if (parent) {
+ current = parent;
}
else {
break;
}
}
- if (current.valueDeclaration && current.valueDeclaration.kind === 261 && current.flags & 512) {
+ if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) {
return false;
}
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
@@ -35096,7 +38191,7 @@ var ts;
if (!moduleSymbol) {
return undefined;
}
- return ts.getDeclarationOfKind(moduleSymbol, 261);
+ return ts.getDeclarationOfKind(moduleSymbol, 264);
}
function initializeTypeChecker() {
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
@@ -35104,8 +38199,6 @@ var ts;
ts.bindSourceFile(file, compilerOptions);
}
var augmentations;
- var requestedExternalEmitHelpers = 0;
- var firstFileRequestingExternalHelpers;
for (var _b = 0, _c = host.getSourceFiles(); _b < _c.length; _b++) {
var file = _c[_b];
if (!ts.isExternalOrCommonJsModule(file)) {
@@ -35119,20 +38212,11 @@ var ts;
}
if (file.symbol && file.symbol.globalExports) {
var source = file.symbol.globalExports;
- for (var id in source) {
- if (!(id in globals)) {
- globals[id] = source[id];
+ source.forEach(function (sourceSymbol, id) {
+ if (!globals.has(id)) {
+ globals.set(id, sourceSymbol);
}
- }
- }
- if ((compilerOptions.isolatedModules || ts.isExternalModule(file)) && !file.isDeclarationFile) {
- var fileRequestedExternalEmitHelpers = file.flags & 64512;
- if (fileRequestedExternalEmitHelpers) {
- requestedExternalEmitHelpers |= fileRequestedExternalEmitHelpers;
- if (firstFileRequestingExternalHelpers === undefined) {
- firstFileRequestingExternalHelpers = file;
- }
- }
+ });
}
}
if (augmentations) {
@@ -35146,116 +38230,80 @@ var ts;
}
addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
- getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
+ getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments", 0, true);
getSymbolLinks(unknownSymbol).type = unknownType;
- globalArrayType = getGlobalType("Array", 1);
- globalObjectType = getGlobalType("Object");
- globalFunctionType = getGlobalType("Function");
- globalStringType = getGlobalType("String");
- globalNumberType = getGlobalType("Number");
- globalBooleanType = getGlobalType("Boolean");
- globalRegExpType = getGlobalType("RegExp");
- jsxElementType = getExportedTypeFromNamespace("JSX", JsxNames.Element);
- getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
- getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
- getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
- getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
- getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", 1); });
- getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); });
- getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", 1); });
- tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064, undefined) && getGlobalPromiseType(); });
- getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", 1); });
- getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType);
- getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); });
- tryGetGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalSymbol("Promise", 107455, undefined) && getGlobalPromiseConstructorSymbol(); });
- getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); });
- getGlobalThenableType = ts.memoize(createThenableType);
- getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); });
- if (languageVersion >= 2) {
- getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); });
- getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", 1); });
- getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", 1); });
- getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", 1); });
- }
- else {
- getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; });
- getGlobalIterableType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; });
- }
+ globalArrayType = getGlobalType("Array", 1, true);
+ globalObjectType = getGlobalType("Object", 0, true);
+ globalFunctionType = getGlobalType("Function", 0, true);
+ globalStringType = getGlobalType("String", 0, true);
+ globalNumberType = getGlobalType("Number", 0, true);
+ globalBooleanType = getGlobalType("Boolean", 0, true);
+ globalRegExpType = getGlobalType("RegExp", 0, true);
anyArrayType = createArrayType(anyType);
autoArrayType = createArrayType(autoType);
- var symbol = getGlobalSymbol("ReadonlyArray", 793064, undefined);
- globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, 1);
+ globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", 1);
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
- if (compilerOptions.importHelpers && firstFileRequestingExternalHelpers) {
- var helpersModule = resolveExternalModule(firstFileRequestingExternalHelpers, ts.externalHelpersModuleNameText, ts.Diagnostics.Cannot_find_module_0, undefined);
- if (helpersModule) {
- var exports = helpersModule.exports;
- if (requestedExternalEmitHelpers & 1024 && languageVersion < 2) {
- verifyHelperSymbol(exports, "__extends", 107455);
- }
- if (requestedExternalEmitHelpers & 16384 &&
- (languageVersion < 5 || compilerOptions.jsx === 2)) {
- verifyHelperSymbol(exports, "__assign", 107455);
- }
- if (languageVersion < 5 && requestedExternalEmitHelpers & 32768) {
- verifyHelperSymbol(exports, "__rest", 107455);
- }
- if (requestedExternalEmitHelpers & 2048) {
- verifyHelperSymbol(exports, "__decorate", 107455);
- if (compilerOptions.emitDecoratorMetadata) {
- verifyHelperSymbol(exports, "__metadata", 107455);
- }
- }
- if (requestedExternalEmitHelpers & 4096) {
- verifyHelperSymbol(exports, "__param", 107455);
- }
- if (requestedExternalEmitHelpers & 8192) {
- verifyHelperSymbol(exports, "__awaiter", 107455);
- if (languageVersion < 2) {
- verifyHelperSymbol(exports, "__generator", 107455);
+ globalThisType = getGlobalTypeOrUndefined("ThisType", 1);
+ }
+ function checkExternalEmitHelpers(location, helpers) {
+ if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
+ var sourceFile = ts.getSourceFileOfNode(location);
+ if (ts.isEffectiveExternalModule(sourceFile, compilerOptions) && !ts.isInAmbientContext(location)) {
+ var helpersModule = resolveHelpersModule(sourceFile, location);
+ if (helpersModule !== unknownSymbol) {
+ var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
+ for (var helper = 1; helper <= 8192; helper <<= 1) {
+ if (uncheckedHelpers & helper) {
+ var name = getHelperName(helper);
+ var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
+ if (!symbol) {
+ error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ }
+ }
}
}
+ requestedExternalEmitHelpers |= helpers;
}
}
}
- function verifyHelperSymbol(symbols, name, meaning) {
- var symbol = getSymbol(symbols, ts.escapeIdentifier(name), meaning);
- if (!symbol) {
- error(undefined, ts.Diagnostics.Module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ function getHelperName(helper) {
+ switch (helper) {
+ case 1: return "__extends";
+ case 2: return "__assign";
+ case 4: return "__rest";
+ case 8: return "__decorate";
+ case 16: return "__metadata";
+ case 32: return "__param";
+ case 64: return "__awaiter";
+ case 128: return "__generator";
+ case 256: return "__values";
+ case 512: return "__read";
+ case 1024: return "__spread";
+ case 2048: return "__asyncGenerator";
+ case 4096: return "__asyncDelegator";
+ case 8192: return "__asyncValues";
+ default: ts.Debug.fail("Unrecognized helper.");
}
}
- function createInstantiatedPromiseLikeType() {
- var promiseLikeType = getGlobalPromiseLikeType();
- if (promiseLikeType !== emptyGenericType) {
- return createTypeReference(promiseLikeType, [anyType]);
+ function resolveHelpersModule(node, errorNode) {
+ if (!externalHelpersModule) {
+ externalHelpersModule = resolveExternalModule(node, ts.externalHelpersModuleNameText, ts.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;
}
- return emptyObjectType;
- }
- function createThenableType() {
- var thenPropertySymbol = createSymbol(67108864 | 4, "then");
- getSymbolLinks(thenPropertySymbol).type = globalFunctionType;
- var thenableType = createObjectType(16);
- thenableType.properties = [thenPropertySymbol];
- thenableType.members = createSymbolTable(thenableType.properties);
- thenableType.callSignatures = [];
- thenableType.constructSignatures = [];
- return thenableType;
+ return externalHelpersModule;
}
function checkGrammarDecorators(node) {
if (!node.decorators) {
return false;
}
if (!ts.nodeCanBeDecorated(node)) {
- if (node.kind === 149 && !ts.nodeIsPresent(node.body)) {
+ if (node.kind === 150 && !ts.nodeIsPresent(node.body)) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
}
else {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
}
}
- else if (node.kind === 151 || node.kind === 152) {
+ else if (node.kind === 152 || node.kind === 153) {
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -35273,16 +38321,16 @@ var ts;
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
var modifier = _a[_i];
if (modifier.kind !== 130) {
- if (node.kind === 146 || node.kind === 148) {
+ if (node.kind === 147 || node.kind === 149) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
}
- if (node.kind === 155) {
+ if (node.kind === 156) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
}
}
switch (modifier.kind) {
case 75:
- if (node.kind !== 229 && node.parent.kind === 226) {
+ if (node.kind !== 231 && node.parent.kind === 228) {
return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75));
}
break;
@@ -35308,7 +38356,7 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
}
else if (flags & 128) {
@@ -35331,10 +38379,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
}
else if (flags & 128) {
@@ -35347,7 +38395,7 @@ var ts;
if (flags & 64) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
}
- else if (node.kind !== 147 && node.kind !== 146 && node.kind !== 155 && node.kind !== 144) {
+ else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
flags |= 64;
@@ -35366,10 +38414,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
}
flags |= 1;
@@ -35381,13 +38429,13 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
}
- else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 231) {
+ else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) {
return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
}
flags |= 2;
@@ -35397,14 +38445,14 @@ var ts;
if (flags & 128) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
}
- if (node.kind !== 226) {
- if (node.kind !== 149 &&
- node.kind !== 147 &&
- node.kind !== 151 &&
- node.kind !== 152) {
+ if (node.kind !== 228) {
+ if (node.kind !== 150 &&
+ node.kind !== 148 &&
+ node.kind !== 152 &&
+ node.kind !== 153) {
return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
}
- if (!(node.parent.kind === 226 && ts.getModifierFlags(node.parent) & 128)) {
+ if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) {
return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
}
if (flags & 32) {
@@ -35423,7 +38471,7 @@ var ts;
else if (flags & 2 || ts.isInAmbientContext(node.parent)) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
}
flags |= 256;
@@ -35431,7 +38479,7 @@ var ts;
break;
}
}
- if (node.kind === 150) {
+ if (node.kind === 151) {
if (flags & 32) {
return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
@@ -35446,13 +38494,13 @@ var ts;
}
return;
}
- else if ((node.kind === 235 || node.kind === 234) && flags & 2) {
+ else if ((node.kind === 237 || node.kind === 236) && flags & 2) {
return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
}
- else if (node.kind === 144 && (flags & 92) && ts.isBindingPattern(node.name)) {
+ else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
}
- else if (node.kind === 144 && (flags & 92) && node.dotDotDotToken) {
+ else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
}
if (flags & 256) {
@@ -35468,37 +38516,37 @@ var ts;
}
function shouldReportBadModifier(node) {
switch (node.kind) {
- case 151:
case 152:
- case 150:
+ case 153:
+ case 151:
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 155:
- case 230:
- case 235:
- case 234:
- case 241:
- case 240:
- case 184:
+ case 156:
+ case 232:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
case 185:
- case 144:
+ case 186:
+ case 145:
return false;
default:
- if (node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 233 || node.parent.kind === 264) {
return false;
}
switch (node.kind) {
- case 225:
- return nodeHasAnyModifiersExcept(node, 119);
- case 226:
- return nodeHasAnyModifiersExcept(node, 116);
case 227:
- case 205:
+ return nodeHasAnyModifiersExcept(node, 119);
case 228:
- return true;
+ return nodeHasAnyModifiersExcept(node, 116);
case 229:
+ case 207:
+ case 230:
+ return true;
+ case 231:
return nodeHasAnyModifiersExcept(node, 75);
default:
ts.Debug.fail();
@@ -35511,14 +38559,11 @@ var ts;
}
function checkGrammarAsyncModifier(node, asyncModifier) {
switch (node.kind) {
- case 149:
- case 225:
- case 184:
+ case 150:
+ case 227:
case 185:
- if (!node.asteriskToken) {
- return false;
- }
- break;
+ case 186:
+ return false;
}
return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
}
@@ -35575,8 +38620,12 @@ var ts;
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) ||
checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
}
+ function checkGrammarClassLikeDeclaration(node) {
+ var file = ts.getSourceFileOfNode(node);
+ return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);
+ }
function checkGrammarArrowFunction(node, file) {
- if (node.kind === 185) {
+ if (node.kind === 186) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
@@ -35611,7 +38660,7 @@ var ts;
if (!parameter.type) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
}
- if (parameter.type.kind !== 134 && parameter.type.kind !== 132) {
+ if (parameter.type.kind !== 135 && parameter.type.kind !== 132) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
}
if (!node.type) {
@@ -35638,7 +38687,7 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
var arg = args_4[_i];
- if (arg.kind === 198) {
+ if (arg.kind === 199) {
return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
}
}
@@ -35708,28 +38757,25 @@ var ts;
return false;
}
function checkGrammarComputedPropertyName(node) {
- if (node.kind !== 142) {
+ if (node.kind !== 143) {
return false;
}
var computedPropertyName = node;
- if (computedPropertyName.expression.kind === 192 && computedPropertyName.expression.operatorToken.kind === 25) {
+ if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) {
return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
}
}
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
- ts.Debug.assert(node.kind === 225 ||
- node.kind === 184 ||
- node.kind === 149);
+ ts.Debug.assert(node.kind === 227 ||
+ node.kind === 185 ||
+ node.kind === 150);
if (ts.isInAmbientContext(node)) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
}
if (!node.body) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
}
- if (languageVersion < 2) {
- return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher);
- }
}
}
function checkGrammarForInvalidQuestionMark(questionToken, message) {
@@ -35745,87 +38791,87 @@ var ts;
var GetOrSetAccessor = GetAccessor | SetAccessor;
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259) {
+ if (prop.kind === 262) {
continue;
}
- var name_27 = prop.name;
- if (name_27.kind === 142) {
- checkGrammarComputedPropertyName(name_27);
+ var name = prop.name;
+ if (name.kind === 143) {
+ checkGrammarComputedPropertyName(name);
}
- if (prop.kind === 258 && !inDestructuring && prop.objectAssignmentInitializer) {
+ if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) {
return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
}
if (prop.modifiers) {
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
var mod = _c[_b];
- if (mod.kind !== 119 || prop.kind !== 149) {
+ if (mod.kind !== 119 || prop.kind !== 150) {
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
}
}
}
var currentKind = void 0;
- if (prop.kind === 257 || prop.kind === 258) {
+ if (prop.kind === 260 || prop.kind === 261) {
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
- if (name_27.kind === 8) {
- checkGrammarNumericLiteral(name_27);
+ if (name.kind === 8) {
+ checkGrammarNumericLiteral(name);
}
currentKind = Property;
}
- else if (prop.kind === 149) {
+ else if (prop.kind === 150) {
currentKind = Property;
}
- else if (prop.kind === 151) {
+ else if (prop.kind === 152) {
currentKind = GetAccessor;
}
- else if (prop.kind === 152) {
+ else if (prop.kind === 153) {
currentKind = SetAccessor;
}
else {
ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
}
- var effectiveName = ts.getPropertyNameForPropertyNameNode(name_27);
+ var effectiveName = ts.getPropertyNameForPropertyNameNode(name);
if (effectiveName === undefined) {
continue;
}
- if (!seen[effectiveName]) {
- seen[effectiveName] = currentKind;
+ var existingKind = seen.get(effectiveName);
+ if (!existingKind) {
+ seen.set(effectiveName, currentKind);
}
else {
- var existingKind = seen[effectiveName];
if (currentKind === Property && existingKind === Property) {
- grammarErrorOnNode(name_27, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_27));
+ grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
}
else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
- seen[effectiveName] = currentKind | existingKind;
+ seen.set(effectiveName, currentKind | existingKind);
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
}
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
}
}
}
}
function checkGrammarJsxElement(node) {
var seen = ts.createMap();
- for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
+ for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
var attr = _a[_i];
- if (attr.kind === 251) {
+ if (attr.kind === 254) {
continue;
}
var jsxAttr = attr;
- var name_28 = jsxAttr.name;
- if (!seen[name_28.text]) {
- seen[name_28.text] = true;
+ var name = jsxAttr.name;
+ if (!seen.get(name.text)) {
+ seen.set(name.text, true);
}
else {
- return grammarErrorOnNode(name_28, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
}
var initializer = jsxAttr.initializer;
- if (initializer && initializer.kind === 252 && !initializer.expression) {
+ if (initializer && initializer.kind === 255 && !initializer.expression) {
return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
}
}
@@ -35834,7 +38880,12 @@ var ts;
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
- if (forInOrOfStatement.initializer.kind === 224) {
+ if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) {
+ if ((forInOrOfStatement.flags & 16384) === 0) {
+ return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);
+ }
+ }
+ if (forInOrOfStatement.initializer.kind === 226) {
var variableList = forInOrOfStatement.initializer;
if (!checkGrammarVariableDeclarationList(variableList)) {
var declarations = variableList.declarations;
@@ -35842,20 +38893,20 @@ var ts;
return false;
}
if (declarations.length > 1) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
: ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
}
var firstDeclaration = declarations[0];
if (firstDeclaration.initializer) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
: ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
}
if (firstDeclaration.type) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
: ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -35875,15 +38926,18 @@ var ts;
else if (accessor.body === undefined && !(ts.getModifierFlags(accessor) & 128)) {
return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
}
+ else if (accessor.body && ts.getModifierFlags(accessor) & 128) {
+ return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+ }
else if (accessor.typeParameters) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
}
else if (!doesAccessorHaveCorrectParameterCount(accessor)) {
- return grammarErrorOnNode(accessor.name, kind === 151 ?
+ return grammarErrorOnNode(accessor.name, kind === 152 ?
ts.Diagnostics.A_get_accessor_cannot_have_parameters :
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
}
- else if (kind === 152) {
+ else if (kind === 153) {
if (accessor.type) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
}
@@ -35902,10 +38956,10 @@ var ts;
}
}
function doesAccessorHaveCorrectParameterCount(accessor) {
- return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 151 ? 0 : 1);
+ return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1);
}
function getAccessorThisParameter(accessor) {
- if (accessor.parameters.length === (accessor.kind === 151 ? 1 : 2)) {
+ if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) {
return ts.getThisParameter(accessor);
}
}
@@ -35920,7 +38974,7 @@ var ts;
checkGrammarForGenerator(node)) {
return true;
}
- if (node.parent.kind === 176) {
+ if (node.parent.kind === 177) {
if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
return true;
}
@@ -35936,10 +38990,10 @@ var ts;
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -35950,9 +39004,9 @@ var ts;
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (current.kind) {
- case 219:
+ case 221:
if (node.label && current.label.text === node.label.text) {
- var isMisplacedContinueLabel = node.kind === 214
+ var isMisplacedContinueLabel = node.kind === 216
&& !ts.isIterationStatement(current.statement, true);
if (isMisplacedContinueLabel) {
return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -35960,8 +39014,8 @@ var ts;
return false;
}
break;
- case 218:
- if (node.kind === 215 && !node.label) {
+ case 220:
+ if (node.kind === 217 && !node.label) {
return false;
}
break;
@@ -35974,13 +39028,13 @@ var ts;
current = current.parent;
}
if (node.label) {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
: ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
}
else {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
: ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
@@ -35992,7 +39046,7 @@ var ts;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
}
- if (node.name.kind === 173 || node.name.kind === 172) {
+ if (node.name.kind === 174 || node.name.kind === 173) {
return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
}
if (node.initializer) {
@@ -36002,11 +39056,11 @@ var ts;
}
function isStringOrNumberLiteralExpression(expr) {
return expr.kind === 9 || expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8;
}
function checkGrammarVariableDeclaration(node) {
- if (node.parent.parent.kind !== 212 && node.parent.parent.kind !== 213) {
+ if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
if (ts.isConst(node) && !node.type) {
@@ -36033,9 +39087,29 @@ var ts;
}
}
}
+ if (compilerOptions.module !== ts.ModuleKind.ES2015 && compilerOptions.module !== ts.ModuleKind.System && !compilerOptions.noEmit &&
+ !ts.isInAmbientContext(node.parent.parent) && ts.hasModifier(node.parent.parent, 1)) {
+ checkESModuleMarker(node.name);
+ }
var checkLetConstNames = (ts.isLet(node) || ts.isConst(node));
return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
}
+ function checkESModuleMarker(name) {
+ if (name.kind === 70) {
+ if (ts.unescapeIdentifier(name.text) === "__esModule") {
+ return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
+ }
+ }
+ else {
+ var elements = name.elements;
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var element = elements_2[_i];
+ if (!ts.isOmittedExpression(element)) {
+ return checkESModuleMarker(element.name);
+ }
+ }
+ }
+ }
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 70) {
if (name.originalKeywordKind === 109) {
@@ -36044,8 +39118,8 @@ var ts;
}
else {
var elements = name.elements;
- for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
- var element = elements_2[_i];
+ for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
+ var element = elements_3[_i];
if (!ts.isOmittedExpression(element)) {
checkGrammarNameInLetOrConstDeclarations(element.name);
}
@@ -36063,15 +39137,15 @@ var ts;
}
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
- case 208:
- case 209:
case 210:
- case 217:
case 211:
case 212:
+ case 219:
case 213:
+ case 214:
+ case 215:
return false;
- case 219:
+ case 221:
return allowLetAndConstDeclarations(parent.parent);
}
return true;
@@ -36086,6 +39160,13 @@ var ts;
}
}
}
+ function checkGrammarMetaProperty(node) {
+ if (node.keywordToken === 93) {
+ if (node.name.text !== "target") {
+ return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target");
+ }
+ }
+ }
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
}
@@ -36126,7 +39207,7 @@ var ts;
return true;
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -36134,7 +39215,7 @@ var ts;
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
}
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -36147,13 +39228,13 @@ var ts;
}
}
function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
- if (node.kind === 227 ||
- node.kind === 228 ||
+ if (node.kind === 229 ||
+ node.kind === 230 ||
+ node.kind === 237 ||
+ node.kind === 236 ||
+ node.kind === 243 ||
+ node.kind === 242 ||
node.kind === 235 ||
- node.kind === 234 ||
- node.kind === 241 ||
- node.kind === 240 ||
- node.kind === 233 ||
ts.getModifierFlags(node) & (2 | 1 | 512)) {
return false;
}
@@ -36162,7 +39243,7 @@ var ts;
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
- if (ts.isDeclaration(decl) || decl.kind === 205) {
+ if (ts.isDeclaration(decl) || decl.kind === 207) {
if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
return true;
}
@@ -36181,7 +39262,7 @@ var ts;
if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
}
- if (node.parent.kind === 204 || node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) {
var links_1 = getNodeLinks(node.parent);
if (!links_1.hasReportedStatementInAmbientContext) {
return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
@@ -36192,8 +39273,22 @@ var ts;
}
}
function checkGrammarNumericLiteral(node) {
- if (node.isOctalLiteral && languageVersion >= 1) {
- return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
+ if (node.numericLiteralFlags & 4) {
+ var diagnosticMessage = void 0;
+ if (languageVersion >= 1) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 172)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 263)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
+ }
+ if (diagnosticMessage) {
+ var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37;
+ var literal = (withMinus ? "-" : "") + "0o" + node.text;
+ return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
+ }
}
}
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
@@ -36206,11 +39301,11 @@ var ts;
}
function getAmbientModules() {
var result = [];
- for (var sym in globals) {
+ globals.forEach(function (global, sym) {
if (ambientModuleSymbolRegex.test(sym)) {
- result.push(globals[sym]);
+ result.push(global);
}
- }
+ });
return result;
}
}
@@ -36218,55 +39313,359 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ;
- var nodeEdgeTraversalMap = ts.createMap((_a = {},
- _a[141] = [
- { name: "left", test: ts.isEntityName },
- { name: "right", test: ts.isIdentifier }
- ],
- _a[145] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[182] = [
- { name: "type", test: ts.isTypeNode },
- { name: "expression", test: ts.isUnaryExpression }
- ],
- _a[200] = [
- { name: "expression", test: ts.isExpression },
- { name: "type", test: ts.isTypeNode }
- ],
- _a[201] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[229] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "members", test: ts.isEnumMember }
- ],
- _a[230] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isModuleName },
- { name: "body", test: ts.isModuleBody }
- ],
- _a[231] = [
- { name: "statements", test: ts.isStatement }
- ],
- _a[234] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "moduleReference", test: ts.isModuleReference }
- ],
- _a[245] = [
- { name: "expression", test: ts.isExpression, optional: true }
- ],
- _a[260] = [
- { name: "name", test: ts.isPropertyName },
- { name: "initializer", test: ts.isExpression, optional: true, parenthesize: ts.parenthesizeExpressionForList }
- ],
- _a));
+ function visitNode(node, visitor, test, lift) {
+ if (node === undefined || visitor === undefined) {
+ return node;
+ }
+ ts.aggregateTransformFlags(node);
+ var visited = visitor(node);
+ if (visited === node) {
+ return node;
+ }
+ var visitedNode;
+ if (visited === undefined) {
+ return undefined;
+ }
+ else if (ts.isArray(visited)) {
+ visitedNode = (lift || extractSingleNode)(visited);
+ }
+ else {
+ visitedNode = visited;
+ }
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ return visitedNode;
+ }
+ ts.visitNode = visitNode;
+ function visitNodes(nodes, visitor, test, start, count) {
+ if (nodes === undefined || visitor === undefined) {
+ return nodes;
+ }
+ var updated;
+ var length = nodes.length;
+ if (start === undefined || start < 0) {
+ start = 0;
+ }
+ if (count === undefined || count > length - start) {
+ count = length - start;
+ }
+ if (start > 0 || count < length) {
+ updated = ts.createNodeArray([], nodes.hasTrailingComma && start + count === length);
+ }
+ for (var i = 0; i < count; i++) {
+ var node = nodes[i + start];
+ ts.aggregateTransformFlags(node);
+ var visited = node !== undefined ? visitor(node) : undefined;
+ if (updated !== undefined || visited === undefined || visited !== node) {
+ if (updated === undefined) {
+ updated = ts.createNodeArray(nodes.slice(0, i), nodes.hasTrailingComma);
+ ts.setTextRange(updated, nodes);
+ }
+ if (visited) {
+ if (ts.isArray(visited)) {
+ for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
+ var visitedNode = visited_1[_i];
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ updated.push(visitedNode);
+ }
+ }
+ else {
+ ts.Debug.assertNode(visited, test);
+ ts.aggregateTransformFlags(visited);
+ updated.push(visited);
+ }
+ }
+ }
+ }
+ return updated || nodes;
+ }
+ ts.visitNodes = visitNodes;
+ function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
+ context.startLexicalEnvironment();
+ statements = visitNodes(statements, visitor, ts.isStatement, start);
+ if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
+ statements = ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements)), statements);
+ }
+ var declarations = context.endLexicalEnvironment();
+ return ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements);
+ }
+ ts.visitLexicalEnvironment = visitLexicalEnvironment;
+ function visitParameterList(nodes, visitor, context, nodesVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ context.startLexicalEnvironment();
+ var updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
+ context.suspendLexicalEnvironment();
+ return updated;
+ }
+ ts.visitParameterList = visitParameterList;
+ function visitFunctionBody(node, visitor, context) {
+ context.resumeLexicalEnvironment();
+ var updated = visitNode(node, visitor, ts.isConciseBody);
+ var declarations = context.endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(updated);
+ var statements = ts.mergeLexicalEnvironment(block.statements, declarations);
+ return ts.updateBlock(block, statements);
+ }
+ return updated;
+ }
+ ts.visitFunctionBody = visitFunctionBody;
+ function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ if (node === undefined) {
+ return undefined;
+ }
+ var kind = node.kind;
+ if ((kind > 0 && kind <= 141) || kind === 168) {
+ return node;
+ }
+ switch (node.kind) {
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 297:
+ case 246:
+ return node;
+ case 142:
+ return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
+ case 143:
+ return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 159:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 154:
+ return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 155:
+ return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 149:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 156:
+ return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 145:
+ return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 146:
+ return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 158:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
+ case 162:
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ case 163:
+ return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
+ case 164:
+ return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
+ case 165:
+ case 166:
+ return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ case 167:
+ throw ts.Debug.fail("not implemented.");
+ case 169:
+ return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
+ case 170:
+ return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
+ case 171:
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
+ case 172:
+ return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
+ case 144:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
+ case 147:
+ return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 148:
+ return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 150:
+ return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 151:
+ return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 153:
+ return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 173:
+ return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
+ case 174:
+ return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
+ case 175:
+ return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 176:
+ return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression));
+ case 177:
+ return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
+ case 178:
+ return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
+ case 179:
+ return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
+ case 180:
+ return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 181:
+ return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 182:
+ return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
+ case 183:
+ return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 184:
+ return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 185:
+ return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 186:
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 187:
+ return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 188:
+ return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 189:
+ return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 190:
+ return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 193:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
+ case 191:
+ return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 192:
+ return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
+ case 195:
+ return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+ case 196:
+ return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression));
+ case 197:
+ return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 198:
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 200:
+ return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 201:
+ return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
+ case 202:
+ return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
+ case 206:
+ return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 207:
+ return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
+ case 209:
+ return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 210:
+ return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock));
+ case 211:
+ return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
+ case 212:
+ return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 213:
+ return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 214:
+ return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 215:
+ return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 216:
+ return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 217:
+ return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 218:
+ return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 219:
+ return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 220:
+ return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
+ case 221:
+ return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 222:
+ return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 223:
+ return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock));
+ case 225:
+ return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 226:
+ return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+ case 227:
+ return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 228:
+ return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 231:
+ return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+ case 232:
+ return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody));
+ case 233:
+ return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 234:
+ return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference));
+ case 237:
+ return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 238:
+ return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings));
+ case 239:
+ return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
+ case 240:
+ return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+ case 241:
+ return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 242:
+ return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
+ case 243:
+ return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 244:
+ return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+ case 245:
+ return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 247:
+ return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 248:
+ return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
+ case 253:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
+ case 249:
+ return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 250:
+ return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 251:
+ return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
+ case 252:
+ return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 255:
+ return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 256:
+ return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 257:
+ return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 258:
+ return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
+ case 259:
+ return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
+ case 260:
+ return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 261:
+ return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
+ case 262:
+ return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 263:
+ return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 264:
+ return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
+ case 295:
+ return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ default:
+ return node;
+ }
+ }
+ ts.visitEachChild = visitEachChild;
+ function extractSingleNode(nodes) {
+ ts.Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
+ return ts.singleOrUndefined(nodes);
+ }
+})(ts || (ts = {}));
+(function (ts) {
function reduceNode(node, f, initial) {
return node ? f(initial, node) : initial;
}
@@ -36280,41 +39679,45 @@ var ts;
var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft;
var cbNodes = cbNodeArray || cbNode;
var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
+ if ((kind > 0 && kind <= 141)) {
return initial;
}
- if ((kind >= 156 && kind <= 171)) {
+ if ((kind >= 157 && kind <= 172)) {
return initial;
}
var result = initial;
switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- case 293:
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 294:
break;
case 142:
+ result = reduceNode(node.left, cbNode, result);
+ result = reduceNode(node.right, cbNode, result);
+ break;
+ case 143:
result = reduceNode(node.expression, cbNode, result);
break;
- case 144:
+ case 145:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 145:
+ case 146:
result = reduceNode(node.expression, cbNode, result);
break;
- case 147:
+ case 148:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 149:
+ case 150:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -36323,12 +39726,12 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 150:
+ case 151:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 151:
+ case 152:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -36336,51 +39739,55 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 152:
+ case 153:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 172:
case 173:
+ case 174:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 174:
+ case 175:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 175:
+ case 176:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 176:
+ case 177:
result = reduceNodes(node.properties, cbNodes, result);
break;
- case 177:
+ case 178:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 178:
+ case 179:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.argumentExpression, cbNode, result);
break;
- case 179:
+ case 180:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 180:
+ case 181:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 181:
+ case 182:
result = reduceNode(node.tag, cbNode, result);
result = reduceNode(node.template, cbNode, result);
break;
- case 184:
+ case 183:
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 185:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
@@ -36388,117 +39795,124 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 185:
+ case 186:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 183:
- case 186:
+ case 184:
case 187:
case 188:
case 189:
- case 195:
+ case 190:
case 196:
- case 201:
+ case 197:
+ case 202:
result = reduceNode(node.expression, cbNode, result);
break;
- case 190:
case 191:
+ case 192:
result = reduceNode(node.operand, cbNode, result);
break;
- case 192:
+ case 193:
result = reduceNode(node.left, cbNode, result);
result = reduceNode(node.right, cbNode, result);
break;
- case 193:
+ case 194:
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.whenTrue, cbNode, result);
result = reduceNode(node.whenFalse, cbNode, result);
break;
- case 194:
+ case 195:
result = reduceNode(node.head, cbNode, result);
result = reduceNodes(node.templateSpans, cbNodes, result);
break;
- case 197:
+ case 198:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 199:
+ case 200:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
break;
+ case 201:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ break;
case 202:
result = reduceNode(node.expression, cbNode, result);
- result = reduceNode(node.literal, cbNode, result);
break;
case 204:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.literal, cbNode, result);
+ break;
+ case 206:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 205:
+ case 207:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.declarationList, cbNode, result);
break;
- case 207:
+ case 209:
result = reduceNode(node.expression, cbNode, result);
break;
- case 208:
+ case 210:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.thenStatement, cbNode, result);
result = reduceNode(node.elseStatement, cbNode, result);
break;
- case 209:
+ case 211:
result = reduceNode(node.statement, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 210:
- case 217:
+ case 212:
+ case 219:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 211:
+ case 213:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.incrementor, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
result = reduceNode(node.expression, cbNode, result);
break;
- case 218:
+ case 220:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.caseBlock, cbNode, result);
break;
- case 219:
+ case 221:
result = reduceNode(node.label, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 221:
+ case 223:
result = reduceNode(node.tryBlock, cbNode, result);
result = reduceNode(node.catchClause, cbNode, result);
result = reduceNode(node.finallyBlock, cbNode, result);
break;
- case 223:
+ case 225:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 224:
+ case 226:
result = reduceNodes(node.declarations, cbNodes, result);
break;
- case 225:
+ case 227:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -36507,7 +39921,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 226:
+ case 228:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -36515,455 +39929,145 @@ var ts;
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
+ case 231:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNodes(node.members, cbNodes, result);
+ break;
case 232:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.body, cbNode, result);
+ break;
+ case 233:
+ result = reduceNodes(node.statements, cbNodes, result);
+ break;
+ case 234:
result = reduceNodes(node.clauses, cbNodes, result);
break;
- case 235:
+ case 236:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.moduleReference, cbNode, result);
+ break;
+ case 237:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.importClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 236:
+ case 238:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.namedBindings, cbNode, result);
break;
- case 237:
+ case 239:
result = reduceNode(node.name, cbNode, result);
break;
- case 238:
- case 242:
+ case 240:
+ case 244:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 239:
- case 243:
+ case 241:
+ case 245:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 240:
+ case 242:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 241:
+ case 243:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.exportClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 246:
+ case 247:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 248:
result = reduceNode(node.openingElement, cbNode, result);
result = ts.reduceLeft(node.children, cbNode, result);
result = reduceNode(node.closingElement, cbNode, result);
break;
- case 247:
- case 248:
+ case 249:
+ case 250:
result = reduceNode(node.tagName, cbNode, result);
- result = reduceNodes(node.attributes, cbNodes, result);
+ result = reduceNode(node.attributes, cbNode, result);
break;
- case 249:
+ case 253:
+ result = reduceNodes(node.properties, cbNodes, result);
+ break;
+ case 251:
result = reduceNode(node.tagName, cbNode, result);
break;
- case 250:
+ case 252:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 251:
+ case 254:
result = reduceNode(node.expression, cbNode, result);
break;
- case 252:
+ case 255:
result = reduceNode(node.expression, cbNode, result);
break;
- case 253:
+ case 256:
result = reduceNode(node.expression, cbNode, result);
- case 254:
+ case 257:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 255:
+ case 258:
result = reduceNodes(node.types, cbNodes, result);
break;
- case 256:
+ case 259:
result = reduceNode(node.variableDeclaration, cbNode, result);
result = reduceNode(node.block, cbNode, result);
break;
- case 257:
+ case 260:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 258:
+ case 261:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.objectAssignmentInitializer, cbNode, result);
break;
- case 259:
+ case 262:
result = reduceNode(node.expression, cbNode, result);
break;
- case 261:
+ case 263:
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
+ case 264:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 294:
+ case 295:
result = reduceNode(node.expression, cbNode, result);
break;
default:
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_1 = edgeTraversalPath; _i < edgeTraversalPath_1.length; _i++) {
- var edge = edgeTraversalPath_1[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- result = ts.isArray(value)
- ? reduceNodes(value, cbNodes, result)
- : cbNode(result, value);
- }
- }
- }
break;
}
return result;
}
ts.reduceEachChild = reduceEachChild;
- function visitNode(node, visitor, test, optional, lift, parenthesize, parentNode) {
- if (node === undefined || visitor === undefined) {
- return node;
- }
- aggregateTransformFlags(node);
- var visited = visitor(node);
- if (visited === node) {
- return node;
- }
- var visitedNode;
- if (visited === undefined) {
- if (!optional) {
- Debug.failNotOptional();
- }
- return undefined;
- }
- else if (ts.isArray(visited)) {
- visitedNode = (lift || extractSingleNode)(visited);
- }
- else {
- visitedNode = visited;
- }
- if (parenthesize !== undefined) {
- visitedNode = parenthesize(visitedNode, parentNode);
- }
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- return visitedNode;
- }
- ts.visitNode = visitNode;
- function visitNodes(nodes, visitor, test, start, count, parenthesize, parentNode) {
- if (nodes === undefined) {
- return undefined;
- }
- var updated;
- var length = nodes.length;
- if (start === undefined || start < 0) {
- start = 0;
- }
- if (count === undefined || count > length - start) {
- count = length - start;
- }
- if (start > 0 || count < length) {
- updated = ts.createNodeArray([], undefined, nodes.hasTrailingComma && start + count === length);
- }
- for (var i = 0; i < count; i++) {
- var node = nodes[i + start];
- aggregateTransformFlags(node);
- var visited = node !== undefined ? visitor(node) : undefined;
- if (updated !== undefined || visited === undefined || visited !== node) {
- if (updated === undefined) {
- updated = ts.createNodeArray(nodes.slice(0, i), nodes, nodes.hasTrailingComma);
- }
- if (visited) {
- if (ts.isArray(visited)) {
- for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
- var visitedNode = visited_1[_i];
- visitedNode = parenthesize
- ? parenthesize(visitedNode, parentNode)
- : visitedNode;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- else {
- var visitedNode = parenthesize
- ? parenthesize(visited, parentNode)
- : visited;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- }
- }
- return updated || nodes;
- }
- ts.visitNodes = visitNodes;
- function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
- context.startLexicalEnvironment();
- statements = visitNodes(statements, visitor, ts.isStatement, start);
- if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
- statements = ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements), statements);
- }
- var declarations = context.endLexicalEnvironment();
- return ts.createNodeArray(ts.concatenate(statements, declarations), statements);
- }
- ts.visitLexicalEnvironment = visitLexicalEnvironment;
- function visitParameterList(nodes, visitor, context) {
- context.startLexicalEnvironment();
- var updated = visitNodes(nodes, visitor, ts.isParameterDeclaration);
- context.suspendLexicalEnvironment();
- return updated;
- }
- ts.visitParameterList = visitParameterList;
- function visitFunctionBody(node, visitor, context) {
- context.resumeLexicalEnvironment();
- var updated = visitNode(node, visitor, ts.isConciseBody);
- var declarations = context.endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(updated);
- var statements = mergeLexicalEnvironment(block.statements, declarations);
- return ts.updateBlock(block, statements);
- }
- return updated;
- }
- ts.visitFunctionBody = visitFunctionBody;
- function visitEachChild(node, visitor, context) {
- if (node === undefined) {
- return undefined;
- }
- var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
- return node;
- }
- if ((kind >= 156 && kind <= 171)) {
- return node;
- }
- switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- return node;
- case 142:
- return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 144:
- return ts.updateParameter(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), node.dotDotDotToken, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 147:
- return ts.updateProperty(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 149:
- return ts.updateMethod(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 150:
- return ts.updateConstructor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 151:
- return ts.updateGetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 152:
- return ts.updateSetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 172:
- return ts.updateObjectBindingPattern(node, visitNodes(node.elements, visitor, ts.isBindingElement));
- case 173:
- return ts.updateArrayBindingPattern(node, visitNodes(node.elements, visitor, ts.isArrayBindingElement));
- case 174:
- return ts.updateBindingElement(node, node.dotDotDotToken, visitNode(node.propertyName, visitor, ts.isPropertyName, true), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 175:
- return ts.updateArrayLiteral(node, visitNodes(node.elements, visitor, ts.isExpression));
- case 176:
- return ts.updateObjectLiteral(node, visitNodes(node.properties, visitor, ts.isObjectLiteralElementLike));
- case 177:
- return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
- case 178:
- return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
- case 179:
- return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 180:
- return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 181:
- return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
- case 183:
- return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
- case 184:
- return ts.updateFunctionExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 185:
- return ts.updateArrowFunction(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 186:
- return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
- case 187:
- return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
- case 188:
- return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
- case 189:
- return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 192:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
- case 190:
- return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 191:
- return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 193:
- return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
- case 194:
- return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), visitNodes(node.templateSpans, visitor, ts.isTemplateSpan));
- case 195:
- return ts.updateYield(node, visitNode(node.expression, visitor, ts.isExpression));
- case 196:
- return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
- case 197:
- return ts.updateClassExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 199:
- return ts.updateExpressionWithTypeArguments(node, visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
- case 202:
- return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
- case 204:
- return ts.updateBlock(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 205:
- return ts.updateVariableStatement(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
- case 207:
- return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
- case 208:
- return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, true, liftToBlock));
- case 209:
- return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
- case 210:
- return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 211:
- return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 212:
- return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 213:
- return ts.updateForOf(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 214:
- return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 215:
- return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 216:
- return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression, true));
- case 217:
- return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 218:
- return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
- case 219:
- return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 220:
- return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
- case 221:
- return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause, true), visitNode(node.finallyBlock, visitor, ts.isBlock, true));
- case 223:
- return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 224:
- return ts.updateVariableDeclarationList(node, visitNodes(node.declarations, visitor, ts.isVariableDeclaration));
- case 225:
- return ts.updateFunctionDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 226:
- return ts.updateClassDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 232:
- return ts.updateCaseBlock(node, visitNodes(node.clauses, visitor, ts.isCaseOrDefaultClause));
- case 235:
- return ts.updateImportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
- case 236:
- return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier, true), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings, true));
- case 237:
- return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
- case 238:
- return ts.updateNamedImports(node, visitNodes(node.elements, visitor, ts.isImportSpecifier));
- case 239:
- return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 240:
- return ts.updateExportAssignment(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
- case 241:
- return ts.updateExportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression, true));
- case 242:
- return ts.updateNamedExports(node, visitNodes(node.elements, visitor, ts.isExportSpecifier));
- case 243:
- return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 246:
- return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), visitNodes(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 247:
- return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 248:
- return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 249:
- return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
- case 250:
- return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
- case 251:
- return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
- case 252:
- return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- case 253:
- return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.statements, visitor, ts.isStatement));
- case 254:
- return ts.updateDefaultClause(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 255:
- return ts.updateHeritageClause(node, visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments));
- case 256:
- return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
- case 257:
- return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
- case 258:
- return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
- case 259:
- return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
- case 261:
- return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 294:
- return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- default:
- var updated = void 0;
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_2 = edgeTraversalPath; _i < edgeTraversalPath_2.length; _i++) {
- var edge = edgeTraversalPath_2[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- var visited = ts.isArray(value)
- ? visitNodes(value, visitor, edge.test, 0, value.length, edge.parenthesize, node)
- : visitNode(value, visitor, edge.test, edge.optional, edge.lift, edge.parenthesize, node);
- if (updated !== undefined || visited !== value) {
- if (updated === undefined) {
- updated = ts.getMutableClone(node);
- }
- if (visited !== value) {
- updated[edge.name] = visited;
- }
- }
- }
- }
- }
- return updated ? ts.updateNode(updated, node) : node;
- }
- }
- ts.visitEachChild = visitEachChild;
function mergeLexicalEnvironment(statements, declarations) {
if (!ts.some(declarations)) {
return statements;
}
return ts.isNodeArray(statements)
- ? ts.createNodeArray(ts.concatenate(statements, declarations), statements)
+ ? ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements)
: ts.addRange(statements, declarations);
}
ts.mergeLexicalEnvironment = mergeLexicalEnvironment;
- function mergeFunctionBodyLexicalEnvironment(body, declarations) {
- if (body && declarations !== undefined && declarations.length > 0) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.createNodeArray(ts.concatenate(body.statements, declarations), body.statements));
- }
- else {
- return ts.createBlock(ts.createNodeArray([ts.createReturn(body, body)].concat(declarations), body), body, true);
- }
- }
- return body;
- }
- ts.mergeFunctionBodyLexicalEnvironment = mergeFunctionBodyLexicalEnvironment;
function liftToBlock(nodes) {
Debug.assert(ts.every(nodes, ts.isStatement), "Cannot lift nodes to a Block.");
return ts.singleOrUndefined(nodes) || ts.createBlock(nodes);
}
ts.liftToBlock = liftToBlock;
- function extractSingleNode(nodes) {
- Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
- return ts.singleOrUndefined(nodes);
- }
function aggregateTransformFlags(node) {
aggregateTransformFlagsForNode(node);
return node;
@@ -36994,7 +40098,7 @@ var ts;
return subtreeFlags;
}
function aggregateTransformFlagsForSubtree(node) {
- if (ts.hasModifier(node, 2) || ts.isTypeNode(node)) {
+ if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) {
return 0;
}
return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes);
@@ -37007,9 +40111,6 @@ var ts;
}
var Debug;
(function (Debug) {
- Debug.failNotOptional = Debug.shouldAssert(1)
- ? function (message) { return Debug.assert(false, message || "Node not optional."); }
- : ts.noop;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
: ts.noop;
@@ -37042,7 +40143,6 @@ var ts;
}
}
})(Debug = ts.Debug || (ts.Debug = {}));
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -37051,7 +40151,7 @@ var ts;
var value;
if (ts.isDestructuringAssignment(node)) {
value = node.right;
- while (ts.isEmptyObjectLiteralOrArrayLiteral(node.left)) {
+ while (ts.isEmptyArrayLiteral(node.left) || ts.isEmptyObjectLiteral(node.left)) {
if (ts.isDestructuringAssignment(value)) {
location = node = value;
value = node.right;
@@ -37065,6 +40165,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: true,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -37099,7 +40200,7 @@ var ts;
ts.Debug.assertNode(target, createAssignmentCallback ? ts.isIdentifier : ts.isExpression);
var expression = createAssignmentCallback
? createAssignmentCallback(target, value, location)
- : ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value, location);
+ : ts.setTextRange(ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value), location);
expression.original = original;
emitExpression(expression);
}
@@ -37112,6 +40213,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: hoistTempVariables,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -37137,10 +40239,11 @@ var ts;
}
}
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
- var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name_29 = _a.name, value = _a.value, location_2 = _a.location, original = _a.original;
- var variable = ts.createVariableDeclaration(name_29, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value, location_2);
+ var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
+ var variable = ts.createVariableDeclaration(name, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
variable.original = original;
- if (ts.isIdentifier(name_29)) {
+ ts.setTextRange(variable, location);
+ if (ts.isIdentifier(name)) {
ts.setEmitFlags(variable, 64);
}
ts.aggregateTransformFlags(variable);
@@ -37228,7 +40331,12 @@ var ts;
function flattenArrayBindingOrAssignmentPattern(flattenContext, parent, pattern, value, location) {
var elements = ts.getElementsOfBindingOrAssignmentPattern(pattern);
var numElements = elements.length;
- if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
+ if (flattenContext.level < 1 && flattenContext.downlevelIteration) {
+ value = ensureIdentifier(flattenContext, ts.createReadHelper(flattenContext.context, value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
+ ? undefined
+ : numElements, location), false, location);
+ }
+ else if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
var reuseIdentifierExpressions = !ts.isDeclarationBindingElement(parent) || numElements !== 0;
value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location);
}
@@ -37286,8 +40394,8 @@ var ts;
return ts.createElementAccess(value, argumentExpression);
}
else {
- var name_30 = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
- return ts.createPropertyAccess(value, name_30);
+ var name = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
+ return ts.createPropertyAccess(value, name);
}
}
function ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) {
@@ -37298,7 +40406,7 @@ var ts;
var temp = ts.createTempVariable(undefined);
if (flattenContext.hoistTempVariables) {
flattenContext.context.hoistVariableDeclaration(temp);
- flattenContext.emitExpression(ts.createAssignment(temp, value, location));
+ flattenContext.emitExpression(ts.setTextRange(ts.createAssignment(temp, value), location));
}
else {
flattenContext.emitBindingOrAssignment(temp, value, location, undefined);
@@ -37329,7 +40437,7 @@ var ts;
var restHelper = {
name: "typescript:rest",
scoped: false,
- text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
+ text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
};
function createRestCall(context, value, elements, computedTempVariables, location) {
context.requestEmitHelper(restHelper);
@@ -37348,7 +40456,10 @@ var ts;
}
}
}
- return ts.createCall(ts.getHelperName("__rest"), undefined, [value, ts.createArrayLiteral(propertyNames, location)]);
+ return ts.createCall(ts.getHelperName("__rest"), undefined, [
+ value,
+ ts.setTextRange(ts.createArrayLiteral(propertyNames), location)
+ ]);
}
})(ts || (ts = {}));
var ts;
@@ -37364,8 +40475,8 @@ var ts;
var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
context.enableSubstitution(178);
+ context.enableSubstitution(179);
var currentSourceFile;
var currentNamespace;
var currentNamespaceContainerName;
@@ -37398,15 +40509,15 @@ var ts;
}
function onBeforeVisitNode(node) {
switch (node.kind) {
- case 261:
- case 232:
- case 231:
- case 204:
+ case 264:
+ case 234:
+ case 233:
+ case 206:
currentScope = node;
currentScopeFirstDeclarationsOfName = undefined;
break;
- case 226:
- case 225:
+ case 228:
+ case 227:
if (ts.hasModifier(node, 2)) {
break;
}
@@ -37431,13 +40542,13 @@ var ts;
}
function sourceElementVisitorWorker(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 240:
+ case 242:
return visitExportAssignment(node);
- case 241:
+ case 243:
return visitExportDeclaration(node);
default:
return visitorWorker(node);
@@ -37447,11 +40558,11 @@ var ts;
return saveStateAndInvoke(node, namespaceElementVisitorWorker);
}
function namespaceElementVisitorWorker(node) {
- if (node.kind === 241 ||
- node.kind === 235 ||
- node.kind === 236 ||
- (node.kind === 234 &&
- node.moduleReference.kind === 245)) {
+ if (node.kind === 243 ||
+ node.kind === 237 ||
+ node.kind === 238 ||
+ (node.kind === 236 &&
+ node.moduleReference.kind === 247)) {
return undefined;
}
else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) {
@@ -37467,15 +40578,15 @@ var ts;
}
function classElementVisitorWorker(node) {
switch (node.kind) {
- case 150:
- return undefined;
- case 147:
- case 155:
case 151:
+ return undefined;
+ case 148:
+ case 156:
case 152:
- case 149:
+ case 153:
+ case 150:
return visitorWorker(node);
- case 203:
+ case 205:
return node;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -37506,23 +40617,22 @@ var ts;
case 75:
case 123:
case 130:
- case 162:
case 163:
- case 161:
- case 156:
- case 143:
+ case 164:
+ case 162:
+ case 157:
+ case 144:
case 118:
case 121:
- case 134:
+ case 135:
case 132:
case 129:
case 104:
- case 135:
+ case 136:
+ case 160:
case 159:
+ case 161:
case 158:
- case 160:
- case 157:
- case 164:
case 165:
case 166:
case 167:
@@ -37530,56 +40640,58 @@ var ts;
case 169:
case 170:
case 171:
- case 155:
- case 145:
- case 228:
- case 147:
- case 150:
+ case 172:
+ case 156:
+ case 146:
+ case 230:
+ case 148:
+ return undefined;
+ case 151:
return visitConstructor(node);
- case 227:
+ case 229:
return ts.createNotEmittedStatement(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 255:
+ case 258:
return visitHeritageClause(node);
- case 199:
+ case 200:
return visitExpressionWithTypeArguments(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessor(node);
case 152:
+ return visitGetAccessor(node);
+ case 153:
return visitSetAccessor(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return visitAssertionExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 201:
+ case 202:
return visitNonNullExpression(node);
- case 229:
+ case 231:
return visitEnumDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
- case 230:
+ case 232:
return visitModuleDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -37587,7 +40699,8 @@ var ts;
}
}
function visitSourceFile(node) {
- var alwaysStrict = compilerOptions.alwaysStrict && !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
+ var alwaysStrict = (compilerOptions.alwaysStrict === undefined ? compilerOptions.strict : compilerOptions.alwaysStrict) &&
+ !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
return ts.updateSourceFileNode(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
}
function shouldEmitDecorateCallForClass(node) {
@@ -37639,11 +40752,12 @@ var ts;
return ts.singleOrMany(statements);
}
function createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, hasStaticProperties) {
- var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause), node);
+ var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause));
var emitFlags = ts.getEmitFlags(node);
if (hasStaticProperties) {
emitFlags |= 32;
}
+ ts.setTextRange(classDeclaration, node);
ts.setOriginalNode(classDeclaration, node);
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
@@ -37654,10 +40768,14 @@ var ts;
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, hasExtendsClause);
- var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members, location);
+ var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
- var statement = ts.createLetStatement(declName, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression, location);
+ ts.setTextRange(classExpression, location);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(declName, undefined, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression)
+ ], 1));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, location);
ts.setCommentRange(statement, node);
return statement;
}
@@ -37665,7 +40783,9 @@ var ts;
var staticProperties = getInitializedProperties(node, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; }));
- var classExpression = ts.setOriginalNode(ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members, node), node);
+ var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members);
+ ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, node);
if (staticProperties.length > 0) {
var expressions = [];
var temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -37688,7 +40808,7 @@ var ts;
members.push(constructor);
}
ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
- return ts.createNodeArray(members, node.members);
+ return ts.setTextRange(ts.createNodeArray(members), node.members);
}
function transformConstructor(node, hasExtendsClause) {
var hasInstancePropertyWithInitializer = ts.forEach(node.members, isInstanceInitializedProperty);
@@ -37699,7 +40819,7 @@ var ts;
}
var parameters = transformConstructorParameters(constructor);
var body = transformConstructorBody(node, constructor, hasExtendsClause);
- return ts.startOnNewLine(ts.setOriginalNode(ts.createConstructor(undefined, undefined, parameters, body, constructor || node), constructor));
+ return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor(undefined, undefined, parameters, body), constructor || node), constructor));
}
function transformConstructorParameters(constructor) {
return ts.visitParameterList(constructor && constructor.parameters, visitor, context)
@@ -37722,18 +40842,18 @@ var ts;
if (constructor) {
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
}
- ts.addRange(statements, endLexicalEnvironment());
- return ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : undefined, true);
+ statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+ return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true), constructor ? constructor.body : undefined);
}
function addPrologueDirectivesAndInitialSuperCall(ctor, result) {
if (ctor.body) {
var statements = ctor.body.statements;
- var index = ts.addPrologueDirectives(result, statements, false, visitor);
+ var index = ts.addPrologue(result, statements, false, visitor);
if (index === statements.length) {
return index;
}
var statement = statements[index];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
result.push(ts.visitNode(statement, visitor, ts.isStatement));
return index + 1;
}
@@ -37755,7 +40875,7 @@ var ts;
ts.setEmitFlags(propertyName, 1536 | 48);
var localName = ts.getMutableClone(name);
ts.setEmitFlags(localName, 1536);
- return ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), propertyName, node.name), localName), ts.moveRangePos(node, -1)));
+ return ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)));
}
function getInitializedProperties(node, isStatic) {
return ts.filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty);
@@ -37767,13 +40887,13 @@ var ts;
return isInitializedProperty(member, false);
}
function isInitializedProperty(member, isStatic) {
- return member.kind === 147
+ return member.kind === 148
&& isStatic === ts.hasModifier(member, 32)
&& member.initializer !== undefined;
}
function addInitializedPropertyStatements(statements, properties, receiver) {
- for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
- var property = properties_7[_i];
+ for (var _i = 0, properties_9 = properties; _i < properties_9.length; _i++) {
+ var property = properties_9[_i];
var statement = ts.createStatement(transformInitializedProperty(property, receiver));
ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property));
ts.setCommentRange(statement, property);
@@ -37782,8 +40902,8 @@ var ts;
}
function generateInitializedPropertyExpressions(properties, receiver) {
var expressions = [];
- for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
- var property = properties_8[_i];
+ for (var _i = 0, properties_10 = properties; _i < properties_10.length; _i++) {
+ var property = properties_10[_i];
var expression = transformInitializedProperty(property, receiver);
expression.startsOnNewLine = true;
ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property));
@@ -37840,12 +40960,12 @@ var ts;
}
function getAllDecoratorsOfClassElement(node, member) {
switch (member.kind) {
- case 151:
case 152:
+ case 153:
return getAllDecoratorsOfAccessors(node, member);
- case 149:
+ case 150:
return getAllDecoratorsOfMethod(member);
- case 147:
+ case 148:
return getAllDecoratorsOfProperty(member);
default:
return undefined;
@@ -37856,10 +40976,11 @@ var ts;
return undefined;
}
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
- if (accessor !== firstAccessor) {
+ var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
+ if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
return undefined;
}
- var decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
+ var decorators = firstAccessorWithDecorators.decorators;
var parameters = getDecoratorsOfParameters(setAccessor);
if (!decorators && !parameters) {
return undefined;
@@ -37884,14 +41005,14 @@ var ts;
}
return { decorators: decorators };
}
- function transformAllDecoratorsOfDeclaration(node, allDecorators) {
+ function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
if (!allDecorators) {
return undefined;
}
var decoratorExpressions = [];
ts.addRange(decoratorExpressions, ts.map(allDecorators.decorators, transformDecorator));
ts.addRange(decoratorExpressions, ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
- addTypeMetadata(node, decoratorExpressions);
+ addTypeMetadata(node, container, decoratorExpressions);
return decoratorExpressions;
}
function addClassElementDecorationStatements(statements, node, isStatic) {
@@ -37916,14 +41037,14 @@ var ts;
}
function generateClassElementDecorationExpression(node, member) {
var allDecorators = getAllDecoratorsOfClassElement(node, member);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
var prefix = getClassMemberPrefix(node, member);
var memberName = getExpressionForPropertyName(member, true);
var descriptor = languageVersion > 0
- ? member.kind === 147
+ ? member.kind === 148
? ts.createVoidZero()
: ts.createNull()
: undefined;
@@ -37939,7 +41060,7 @@ var ts;
}
function generateConstructorDecorationExpression(node) {
var allDecorators = getAllDecoratorsOfConstructor(node);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -37967,90 +41088,83 @@ var ts;
}
return expressions;
}
- function addTypeMetadata(node, decoratorExpressions) {
+ function addTypeMetadata(node, container, decoratorExpressions) {
if (USE_NEW_TYPE_METADATA_FORMAT) {
- addNewTypeMetadata(node, decoratorExpressions);
+ addNewTypeMetadata(node, container, decoratorExpressions);
}
else {
- addOldTypeMetadata(node, decoratorExpressions);
+ addOldTypeMetadata(node, container, decoratorExpressions);
}
}
- function addOldTypeMetadata(node, decoratorExpressions) {
+ function addOldTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
if (shouldAddTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:type", serializeTypeOfNode(node)));
}
if (shouldAddParamTypesMetadata(node)) {
- decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node, container)));
}
if (shouldAddReturnTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:returntype", serializeReturnTypeOfNode(node)));
}
}
}
- function addNewTypeMetadata(node, decoratorExpressions) {
+ function addNewTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
var properties = void 0;
if (shouldAddTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node))));
}
if (shouldAddParamTypesMetadata(node)) {
- (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node))));
+ (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container))));
}
if (shouldAddReturnTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node))));
}
if (properties) {
- decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, undefined, true)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true)));
}
}
}
function shouldAddTypeMetadata(node) {
var kind = node.kind;
- return kind === 149
- || kind === 151
+ return kind === 150
|| kind === 152
- || kind === 147;
+ || kind === 153
+ || kind === 148;
}
function shouldAddReturnTypeMetadata(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
function shouldAddParamTypesMetadata(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 197
- || kind === 149
- || kind === 151
- || kind === 152;
+ switch (node.kind) {
+ case 228:
+ case 198:
+ return ts.getFirstConstructorWithBody(node) !== undefined;
+ case 150:
+ case 152:
+ case 153:
+ return true;
+ }
+ return false;
}
function serializeTypeOfNode(node) {
switch (node.kind) {
- case 147:
- case 144:
- case 151:
- return serializeTypeNode(node.type);
+ case 148:
+ case 145:
case 152:
+ return serializeTypeNode(node.type);
+ case 153:
return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node));
- case 226:
- case 197:
- case 149:
+ case 228:
+ case 198:
+ case 150:
return ts.createIdentifier("Function");
default:
return ts.createVoidZero();
}
}
- function getRestParameterElementType(node) {
- if (node && node.kind === 162) {
- return node.elementType;
- }
- else if (node && node.kind === 157) {
- return ts.singleOrUndefined(node.typeArguments);
- }
- else {
- return undefined;
- }
- }
- function serializeParameterTypesOfNode(node) {
+ function serializeParameterTypesOfNode(node, container) {
var valueDeclaration = ts.isClassLike(node)
? ts.getFirstConstructorWithBody(node)
: ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)
@@ -38058,7 +41172,7 @@ var ts;
: undefined;
var expressions = [];
if (valueDeclaration) {
- var parameters = valueDeclaration.parameters;
+ var parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);
var numParameters = parameters.length;
for (var i = 0; i < numParameters; i++) {
var parameter = parameters[i];
@@ -38066,7 +41180,7 @@ var ts;
continue;
}
if (parameter.dotDotDotToken) {
- expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));
+ expressions.push(serializeTypeNode(ts.getRestParameterElementType(parameter.type)));
}
else {
expressions.push(serializeTypeOfNode(parameter));
@@ -38075,11 +41189,20 @@ var ts;
}
return ts.createArrayLiteral(expressions);
}
+ function getParametersOfDecoratedDeclaration(node, container) {
+ if (container && node.kind === 152) {
+ var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
+ if (setAccessor) {
+ return setAccessor.parameters;
+ }
+ }
+ return node.parameters;
+ }
function serializeReturnTypeOfNode(node) {
if (ts.isFunctionLike(node) && node.type) {
return serializeTypeNode(node.type);
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if (ts.isAsyncFunction(node)) {
return ts.createIdentifier("Promise");
}
return ts.createVoidZero();
@@ -38090,21 +41213,26 @@ var ts;
}
switch (node.kind) {
case 104:
+ case 138:
+ case 94:
+ case 129:
return ts.createVoidZero();
- case 166:
+ case 167:
return serializeTypeNode(node.type);
- case 158:
case 159:
+ case 160:
return ts.createIdentifier("Function");
- case 162:
case 163:
+ case 164:
return ts.createIdentifier("Array");
- case 156:
+ case 157:
case 121:
return ts.createIdentifier("Boolean");
- case 134:
+ case 135:
return ts.createIdentifier("String");
- case 171:
+ case 133:
+ return ts.createIdentifier("Object");
+ case 172:
switch (node.literal.kind) {
case 9:
return ts.createIdentifier("String");
@@ -38120,44 +41248,22 @@ var ts;
break;
case 132:
return ts.createIdentifier("Number");
- case 135:
+ case 136:
return languageVersion < 2
? getGlobalSymbolNameWithFallback()
: ts.createIdentifier("Symbol");
- case 157:
+ case 158:
return serializeTypeReferenceNode(node);
+ case 166:
case 165:
- case 164:
- {
- var unionOrIntersection = node;
- var serializedUnion = void 0;
- for (var _i = 0, _a = unionOrIntersection.types; _i < _a.length; _i++) {
- var typeNode = _a[_i];
- var serializedIndividual = serializeTypeNode(typeNode);
- if (serializedIndividual.kind !== 70) {
- serializedUnion = undefined;
- break;
- }
- if (serializedIndividual.text === "Object") {
- return serializedIndividual;
- }
- if (serializedUnion && serializedUnion.text !== serializedIndividual.text) {
- serializedUnion = undefined;
- break;
- }
- serializedUnion = serializedIndividual;
- }
- if (serializedUnion) {
- return serializedUnion;
- }
- }
- case 160:
- case 168:
+ return serializeUnionOrIntersectionType(node);
+ case 161:
case 169:
case 170:
- case 161:
+ case 171:
+ case 162:
case 118:
- case 167:
+ case 168:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -38165,6 +41271,32 @@ var ts;
}
return ts.createIdentifier("Object");
}
+ function serializeUnionOrIntersectionType(node) {
+ var serializedUnion;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var serializedIndividual = serializeTypeNode(typeNode);
+ if (ts.isVoidExpression(serializedIndividual)) {
+ if (!serializedUnion) {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ else if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
+ return serializedIndividual;
+ }
+ else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ if (!ts.isIdentifier(serializedUnion) ||
+ !ts.isIdentifier(serializedIndividual) ||
+ serializedUnion.text !== serializedIndividual.text) {
+ return ts.createIdentifier("Object");
+ }
+ }
+ else {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ return serializedUnion;
+ }
function serializeTypeReferenceNode(node) {
switch (resolver.getTypeReferenceSerializationKind(node.typeName, currentScope)) {
case ts.TypeReferenceSerializationKind.Unknown:
@@ -38199,15 +41331,15 @@ var ts;
function serializeEntityNameAsExpression(node, useFallback) {
switch (node.kind) {
case 70:
- var name_31 = ts.getMutableClone(node);
- name_31.flags &= ~8;
- name_31.original = undefined;
- name_31.parent = currentScope;
+ var name = ts.getMutableClone(node);
+ name.flags &= ~8;
+ name.original = undefined;
+ name.parent = currentScope;
if (useFallback) {
- return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name_31), ts.createLiteral("undefined")), name_31);
+ return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name);
}
- return name_31;
- case 141:
+ return name;
+ case 142:
return serializeQualifiedNameAsExpression(node, useFallback);
}
}
@@ -38236,7 +41368,7 @@ var ts;
: name.expression;
}
else if (ts.isIdentifier(name)) {
- return ts.createLiteral(name.text);
+ return ts.createLiteral(ts.unescapeIdentifier(name.text));
}
else {
return ts.getSynthesizedClone(name);
@@ -38251,7 +41383,7 @@ var ts;
hoistVariableDeclaration(generatedName);
expression = ts.createAssignment(generatedName, expression);
}
- return ts.setOriginalNode(ts.createComputedPropertyName(expression, name), name);
+ return ts.updateComputedPropertyName(name, expression);
}
else {
return name;
@@ -38260,13 +41392,12 @@ var ts;
function visitHeritageClause(node) {
if (node.token === 84) {
var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1);
- return ts.createHeritageClause(84, types, node);
+ return ts.setTextRange(ts.createHeritageClause(84, types), node);
}
return undefined;
}
function visitExpressionWithTypeArguments(node) {
- var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
- return ts.createExpressionWithTypeArguments(undefined, expression, node);
+ return ts.updateExpressionWithTypeArguments(node, undefined, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
}
function shouldEmitFunctionLikeDeclaration(node) {
return !ts.nodeIsMissing(node.body);
@@ -38275,13 +41406,13 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- return ts.visitEachChild(node, visitor, context);
+ return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context));
}
function visitMethodDeclaration(node) {
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), visitPropertyNameOfClassElement(node), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
if (updated !== node) {
ts.setCommentRange(updated, node);
ts.setSourceMapRange(updated, ts.moveRangePastDecorators(node));
@@ -38317,7 +41448,7 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createNotEmittedStatement(node);
}
- var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
+ var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
if (isNamespaceExport(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
@@ -38326,10 +41457,10 @@ var ts;
return updated;
}
function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
+ if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createOmittedExpression();
}
- var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
return updated;
}
function visitArrowFunction(node) {
@@ -38340,8 +41471,9 @@ var ts;
if (ts.parameterIsThisKeyword(node)) {
return undefined;
}
- var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression), ts.moveRangePastModifiers(node));
+ var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
ts.setOriginalNode(parameter, node);
+ ts.setTextRange(parameter, ts.moveRangePastModifiers(node));
ts.setCommentRange(parameter, node);
ts.setSourceMapRange(parameter, ts.moveRangePastModifiers(node));
ts.setEmitFlags(parameter.name, 32);
@@ -38353,7 +41485,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)), node);
+ return ts.setTextRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -38365,7 +41497,7 @@ var ts;
return ts.flattenDestructuringAssignment(node, visitor, context, 0, false, createNamespaceExportExpression);
}
else {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression), node);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
}
function visitVariableDeclaration(node) {
@@ -38419,8 +41551,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]), node);
+ var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(enumStatement, node);
+ ts.setTextRange(enumStatement, node);
ts.setEmitFlags(enumStatement, emitFlags);
statements.push(enumStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -38434,11 +41567,11 @@ var ts;
ts.addRange(statements, ts.map(node.members, transformEnumMember));
ts.addRange(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
- return ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ return ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.createStatement(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name, member), member);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -38470,16 +41603,16 @@ var ts;
if (!currentScopeFirstDeclarationsOfName) {
currentScopeFirstDeclarationsOfName = ts.createMap();
}
- if (!(name in currentScopeFirstDeclarationsOfName)) {
- currentScopeFirstDeclarationsOfName[name] = node;
+ if (!currentScopeFirstDeclarationsOfName.has(name)) {
+ currentScopeFirstDeclarationsOfName.set(name, node);
}
}
}
function isFirstEmittedDeclarationInScope(node) {
if (currentScopeFirstDeclarationsOfName) {
- var name_32 = node.symbol && node.symbol.name;
- if (name_32) {
- return currentScopeFirstDeclarationsOfName[name_32] === node;
+ var name = node.symbol && node.symbol.name;
+ if (name) {
+ return currentScopeFirstDeclarationsOfName.get(name) === node;
}
}
return false;
@@ -38491,7 +41624,7 @@ var ts;
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
- if (node.kind === 229) {
+ if (node.kind === 231) {
ts.setSourceMapRange(statement.declarationList, node);
}
else {
@@ -38532,8 +41665,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]), node);
+ var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(moduleStatement, node);
+ ts.setTextRange(moduleStatement, node);
ts.setEmitFlags(moduleStatement, emitFlags);
statements.push(moduleStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -38551,8 +41685,8 @@ var ts;
var statementsLocation;
var blockLocation;
var body = node.body;
- if (body.kind === 231) {
- ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement));
+ if (body.kind === 233) {
+ saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
statementsLocation = body.statements;
blockLocation = body;
}
@@ -38573,14 +41707,15 @@ var ts;
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), blockLocation, true);
- if (body.kind !== 231) {
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true);
+ ts.setTextRange(block, blockLocation);
+ if (body.kind !== 233) {
ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536);
}
return block;
}
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
- if (moduleDeclaration.body.kind === 230) {
+ if (moduleDeclaration.body.kind === 232) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerModule || moduleDeclaration.body;
}
@@ -38589,18 +41724,18 @@ var ts;
if (!node.importClause) {
return node;
}
- var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause, true);
+ var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause);
return importClause
? ts.updateImportDeclaration(node, undefined, undefined, importClause, node.moduleSpecifier)
: undefined;
}
function visitImportClause(node) {
var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
- var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings, true);
+ var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined;
}
function visitNamedImportBindings(node) {
- if (node.kind === 237) {
+ if (node.kind === 239) {
return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
}
else {
@@ -38623,7 +41758,7 @@ var ts;
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
}
- var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports, true);
+ var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports);
return exportClause
? ts.updateExportDeclaration(node, undefined, undefined, exportClause, node.moduleSpecifier)
: undefined;
@@ -38652,9 +41787,9 @@ var ts;
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
- return ts.setOriginalNode(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
+ return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.setOriginalNode(ts.createVariableDeclaration(node.name, undefined, moduleReference), node)
- ]), node), node);
+ ])), node), node);
}
else {
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
@@ -38675,7 +41810,7 @@ var ts;
&& ts.hasModifier(node, 512);
}
function expressionToStatement(expression) {
- return ts.createStatement(expression, undefined);
+ return ts.createStatement(expression);
}
function addExportMemberAssignment(statements, node) {
var expression = ts.createAssignment(ts.getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, false, true), ts.getLocalName(node));
@@ -38685,10 +41820,10 @@ var ts;
statements.push(statement);
}
function createNamespaceExport(exportName, exportValue, location) {
- return ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue), location);
+ return ts.setTextRange(ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue)), location);
}
function createNamespaceExportExpression(exportName, exportValue, location) {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);
}
function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {
return ts.getNamespaceMemberName(currentNamespaceContainerName, name, false, true);
@@ -38704,7 +41839,7 @@ var ts;
function getClassAliasIfNeeded(node) {
if (resolver.getNodeCheckFlags(node) & 8388608) {
enableSubstitutionForClassAliases();
- var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? node.name.text : "default");
+ var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? ts.unescapeIdentifier(node.name.text) : "default");
classAliases[ts.getOriginalNodeId(node)] = classAlias;
hoistVariableDeclaration(classAlias);
return classAlias;
@@ -38728,37 +41863,42 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(70);
- classAliases = ts.createMap();
+ classAliases = [];
}
}
function enableSubstitutionForNamespaceExports() {
if ((enabledSubstitutions & 2) === 0) {
enabledSubstitutions |= 2;
context.enableSubstitution(70);
- context.enableSubstitution(258);
- context.enableEmitNotification(230);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(232);
}
}
function isTransformedModuleDeclaration(node) {
- return ts.getOriginalNode(node).kind === 230;
+ return ts.getOriginalNode(node).kind === 232;
}
function isTransformedEnumDeclaration(node) {
- return ts.getOriginalNode(node).kind === 229;
+ return ts.getOriginalNode(node).kind === 231;
}
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
var savedApplicableSubstitutions = applicableSubstitutions;
+ var savedCurrentSourceFile = currentSourceFile;
+ if (ts.isSourceFile(node)) {
+ currentSourceFile = node;
+ }
if (enabledSubstitutions & 2 && isTransformedModuleDeclaration(node)) {
applicableSubstitutions |= 2;
}
if (enabledSubstitutions & 8 && isTransformedEnumDeclaration(node)) {
applicableSubstitutions |= 8;
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
applicableSubstitutions = savedApplicableSubstitutions;
+ currentSourceFile = savedCurrentSourceFile;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -38768,14 +41908,14 @@ var ts;
}
function substituteShorthandPropertyAssignment(node) {
if (enabledSubstitutions & 2) {
- var name_33 = node.name;
- var exportedName = trySubstituteNamespaceExportedName(name_33);
+ var name = node.name;
+ var exportedName = trySubstituteNamespaceExportedName(name);
if (exportedName) {
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name_33, initializer, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name_33, exportedName, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedName), node);
}
}
return node;
@@ -38784,9 +41924,9 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 177:
- return substitutePropertyAccessExpression(node);
case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
return substituteElementAccessExpression(node);
}
return node;
@@ -38816,11 +41956,11 @@ var ts;
function trySubstituteNamespaceExportedName(node) {
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
var container = resolver.getReferencedExportContainer(node, false);
- if (container && container.kind !== 261) {
- var substitute = (applicableSubstitutions & 2 && container.kind === 230) ||
- (applicableSubstitutions & 8 && container.kind === 229);
+ if (container && container.kind !== 264) {
+ var substitute = (applicableSubstitutions & 2 && container.kind === 232) ||
+ (applicableSubstitutions & 8 && container.kind === 231);
if (substitute) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node, node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node);
}
}
}
@@ -38835,16 +41975,14 @@ var ts;
function substituteConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
+ ts.setConstantValue(node, constantValue);
var substitute = ts.createLiteral(constantValue);
- ts.setSourceMapRange(substitute, node);
- ts.setCommentRange(substitute, node);
if (!compilerOptions.removeComments) {
var propertyName = ts.isPropertyAccessExpression(node)
? ts.declarationNameToString(node.name)
: ts.getTextOfNode(node.argumentExpression);
- substitute.trailingComment = " " + propertyName + " ";
+ ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
}
- ts.setConstantValue(node, constantValue);
return substitute;
}
return node;
@@ -38859,24 +41997,24 @@ var ts;
}
}
ts.transformTypeScript = transformTypeScript;
- var paramHelper = {
- name: "typescript:param",
- scoped: false,
- priority: 4,
- text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
- };
- function createParamHelper(context, expression, parameterOffset, location) {
- context.requestEmitHelper(paramHelper);
- return ts.createCall(ts.getHelperName("__param"), undefined, [
- ts.createLiteral(parameterOffset),
- expression
- ], location);
+ function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
+ var argumentsArray = [];
+ argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, true));
+ argumentsArray.push(target);
+ if (memberName) {
+ argumentsArray.push(memberName);
+ if (descriptor) {
+ argumentsArray.push(descriptor);
+ }
+ }
+ context.requestEmitHelper(decorateHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray), location);
}
- var metadataHelper = {
- name: "typescript:metadata",
+ var decorateHelper = {
+ name: "typescript:decorate",
scoped: false,
- priority: 3,
- text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
+ priority: 2,
+ text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
};
function createMetadataHelper(context, metadataKey, metadataValue) {
context.requestEmitHelper(metadataHelper);
@@ -38885,30 +42023,281 @@ var ts;
metadataValue
]);
}
- var decorateHelper = {
- name: "typescript:decorate",
+ var metadataHelper = {
+ name: "typescript:metadata",
scoped: false,
- priority: 2,
- text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
+ priority: 3,
+ text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
};
- function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
- context.requestEmitHelper(decorateHelper);
- var argumentsArray = [];
- argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, undefined, true));
- argumentsArray.push(target);
- if (memberName) {
- argumentsArray.push(memberName);
- if (descriptor) {
- argumentsArray.push(descriptor);
+ function createParamHelper(context, expression, parameterOffset, location) {
+ context.requestEmitHelper(paramHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__param"), undefined, [
+ ts.createLiteral(parameterOffset),
+ expression
+ ]), location);
+ }
+ var paramHelper = {
+ name: "typescript:param",
+ scoped: false,
+ priority: 4,
+ text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
+ };
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ function transformES2017(context) {
+ var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var currentSourceFile;
+ var enabledSubstitutions;
+ var enclosingSuperContainerFlags = 0;
+ var previousOnEmitNode = context.onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ if (ts.isDeclarationFile(node)) {
+ return node;
+ }
+ currentSourceFile = node;
+ var visited = ts.visitEachChild(node, visitor, context);
+ ts.addEmitHelpers(visited, context.readEmitHelpers());
+ currentSourceFile = undefined;
+ return visited;
+ }
+ function visitor(node) {
+ if ((node.transformFlags & 16) === 0) {
+ return node;
+ }
+ switch (node.kind) {
+ case 119:
+ return undefined;
+ case 190:
+ return visitAwaitExpression(node);
+ case 150:
+ return visitMethodDeclaration(node);
+ case 227:
+ return visitFunctionDeclaration(node);
+ case 185:
+ return visitFunctionExpression(node);
+ case 186:
+ return visitArrowFunction(node);
+ default:
+ return ts.visitEachChild(node, visitor, context);
+ }
+ }
+ function visitAwaitExpression(node) {
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
+ }
+ function visitMethodDeclaration(node) {
+ return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionDeclaration(node) {
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionExpression(node) {
+ return ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitArrowFunction(node) {
+ return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function transformAsyncFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var original = ts.getOriginalNode(node, ts.isFunctionLike);
+ var nodeType = original.type;
+ var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
+ var isArrowFunction = node.kind === 186;
+ var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
+ if (!isArrowFunction) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.createBlock(statements, true);
+ ts.setTextRange(block, node.body);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
+ }
+ else {
+ var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
+ var declarations = endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(expression);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(ts.concatenate(block.statements, declarations)), block.statements));
+ }
+ return expression;
+ }
+ }
+ function transformFunctionBodyWorker(body, start) {
+ if (ts.isBlock(body)) {
+ return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
+ }
+ else {
+ startLexicalEnvironment();
+ var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
+ var declarations = endLexicalEnvironment();
+ return ts.updateBlock(visited, ts.setTextRange(ts.createNodeArray(ts.concatenate(visited.statements, declarations)), visited.statements));
+ }
+ }
+ function getPromiseConstructor(type) {
+ var typeName = type && ts.getEntityNameFromTypeNode(type);
+ if (typeName && ts.isEntityName(typeName)) {
+ var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
+ if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
+ || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
+ return typeName;
+ }
+ }
+ return undefined;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
}
}
- return ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray, location);
}
+ ts.transformES2017 = transformES2017;
+ var awaiterHelper = {
+ name: "typescript:awaiter",
+ scoped: false,
+ priority: 5,
+ text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };"
+ };
+ function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
+ context.requestEmitHelper(awaiterHelper);
+ var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
+ ts.createThis(),
+ hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
+ promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
+ generatorFunc
+ ]);
+ }
+ ts.asyncSuperHelper = {
+ name: "typescript:async-super",
+ scoped: true,
+ text: "\n const _super = name => super[name];\n "
+ };
+ ts.advancedAsyncSuperHelper = {
+ name: "typescript:advanced-async-super",
+ scoped: true,
+ text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "
+ };
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformESNext(context) {
- var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ var enabledSubstitutions;
+ var enclosingFunctionFlags;
+ var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
@@ -38924,53 +42313,93 @@ var ts;
function visitorNoDestructuringValue(node) {
return visitorWorker(node, true);
}
+ function visitorNoAsyncModifier(node) {
+ if (node.kind === 119) {
+ return undefined;
+ }
+ return node;
+ }
function visitorWorker(node, noDestructuringValue) {
if ((node.transformFlags & 8) === 0) {
return node;
}
switch (node.kind) {
- case 176:
+ case 190:
+ return visitAwaitExpression(node);
+ case 196:
+ return visitYieldExpression(node);
+ case 221:
+ return visitLabeledStatement(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 192:
+ case 193:
return visitBinaryExpression(node, noDestructuringValue);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
+ case 215:
+ return visitForOfStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 211:
return visitForStatement(node);
- case 188:
+ case 189:
return visitVoidExpression(node);
- case 150:
+ case 151:
return visitConstructorDeclaration(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessorDeclaration(node);
case 152:
+ return visitGetAccessorDeclaration(node);
+ case 153:
return visitSetAccessorDeclaration(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 207:
+ case 209:
return visitExpressionStatement(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, noDestructuringValue);
default:
return ts.visitEachChild(node, visitor, context);
}
}
+ function visitAwaitExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.createArrayLiteral([ts.createLiteral("await"), expression])), node), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitYieldExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.updateYield(node, node.asteriskToken, node.asteriskToken
+ ? createAsyncDelegatorHelper(context, expression, expression)
+ : ts.createArrayLiteral(expression
+ ? [ts.createLiteral("yield"), expression]
+ : [ts.createLiteral("yield")]));
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitLabeledStatement(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var statement = ts.unwrapInnermostStatementOfLabel(node);
+ if (statement.kind === 215 && statement.awaitModifier) {
+ return visitForOfStatement(statement, node);
+ }
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
function chunkObjectLiteralElements(elements) {
var chunkObject;
var objects = [];
- for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
- var e = elements_3[_i];
- if (e.kind === 259) {
+ for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
+ var e = elements_4[_i];
+ if (e.kind === 262) {
if (chunkObject) {
objects.push(ts.createObjectLiteral(chunkObject));
chunkObject = undefined;
@@ -38982,7 +42411,7 @@ var ts;
if (!chunkObject) {
chunkObject = [];
}
- if (e.kind === 257) {
+ if (e.kind === 260) {
var p = e;
chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression)));
}
@@ -38999,7 +42428,7 @@ var ts;
function visitObjectLiteralExpression(node) {
if (node.transformFlags & 1048576) {
var objects = chunkObjectLiteralElements(node.properties);
- if (objects.length && objects[0].kind !== 176) {
+ if (objects.length && objects[0].kind !== 177) {
objects.unshift(ts.createObjectLiteral());
}
return createAssignHelper(context, objects);
@@ -39033,68 +42462,202 @@ var ts;
function visitVoidExpression(node) {
return ts.visitEachChild(node, visitorNoDestructuringValue, context);
}
- function visitForOfStatement(node) {
- var leadingStatements;
- var temp;
- var initializer = ts.skipParentheses(node.initializer);
- if (initializer.transformFlags & 1048576) {
- if (ts.isVariableDeclarationList(initializer)) {
- temp = ts.createTempVariable(undefined);
- var firstDeclaration = ts.firstOrUndefined(initializer.declarations);
- var declarations = ts.flattenDestructuringBinding(firstDeclaration, visitor, context, 1, temp, false, true);
- if (ts.some(declarations)) {
- var statement = ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(initializer, declarations), initializer);
- leadingStatements = ts.append(leadingStatements, statement);
- }
- }
- else if (ts.isAssignmentPattern(initializer)) {
- temp = ts.createTempVariable(undefined);
- var expression = ts.flattenDestructuringAssignment(ts.aggregateTransformFlags(ts.createAssignment(initializer, temp, node.initializer)), visitor, context, 1);
- leadingStatements = ts.append(leadingStatements, ts.createStatement(expression, node.initializer));
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ if (node.initializer.transformFlags & 1048576) {
+ node = transformForOfStatementWithObjectRest(node);
+ }
+ if (node.awaitModifier) {
+ return transformForAwaitOfStatement(node, outermostLabeledStatement);
+ }
+ else {
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement);
+ }
+ }
+ function transformForOfStatementWithObjectRest(node) {
+ var initializerWithoutParens = ts.skipParentheses(node.initializer);
+ if (ts.isVariableDeclarationList(initializerWithoutParens) || ts.isAssignmentPattern(initializerWithoutParens)) {
+ var bodyLocation = void 0;
+ var statementsLocation = void 0;
+ var temp = ts.createTempVariable(undefined);
+ var statements = [ts.createForOfBindingStatement(initializerWithoutParens, temp)];
+ if (ts.isBlock(node.statement)) {
+ ts.addRange(statements, node.statement.statements);
+ bodyLocation = node.statement;
+ statementsLocation = node.statement.statements;
}
+ return ts.updateForOf(node, node.awaitModifier, ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(temp), node.initializer)
+ ], 1), node.initializer), node.expression, ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation));
}
- if (temp) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
- var block = ts.isBlock(statement)
- ? ts.updateBlock(statement, ts.createNodeArray(ts.concatenate(leadingStatements, statement.statements), statement.statements))
- : ts.createBlock(ts.append(leadingStatements, statement), statement, true);
- return ts.updateForOf(node, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(temp, undefined, undefined, node.initializer)
- ], node.initializer, 1), expression, block);
+ return node;
+ }
+ function convertForOfStatementHead(node, boundValue) {
+ var binding = ts.createForOfBindingStatement(node.initializer, boundValue);
+ var bodyLocation;
+ var statementsLocation;
+ var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ if (ts.isBlock(statement)) {
+ ts.addRange(statements, statement.statements);
+ bodyLocation = statement;
+ statementsLocation = statement.statements;
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ statements.push(statement);
+ }
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function transformForAwaitOfStatement(node, outermostLabeledStatement) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = createAsyncValuesHelper(context, expression, node.expression);
+ var next = ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, [])
+ ])
+ : ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []));
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"))), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createFunctionCall(returnMethod, iterator, [])
+ ])
+ : ts.createFunctionCall(returnMethod, iterator, [])))), 1)
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitParameter(node) {
if (node.transformFlags & 1048576) {
- return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
}
return ts.visitEachChild(node, visitor, context);
}
function visitConstructorDeclaration(node) {
- return ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitGetAccessorDeclaration(node) {
- return ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitSetAccessorDeclaration(node) {
- return ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateMethod(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.isToken), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionDeclaration(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionExpression(node, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
+ }
+ function transformAsyncGeneratorFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ appendObjectRestAssignmentsIfNeeded(statements, node);
+ statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.updateBlock(node.body, statements);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
}
function transformFunctionBody(node) {
resumeLexicalEnvironment();
- var leadingStatements;
+ var statementOffset = 0;
+ var statements = [];
+ var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
+ if (ts.isBlock(body)) {
+ statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
+ }
+ ts.addRange(statements, appendObjectRestAssignmentsIfNeeded(undefined, node));
+ var trailingStatements = endLexicalEnvironment();
+ if (statementOffset > 0 || ts.some(statements) || ts.some(trailingStatements)) {
+ var block = ts.convertToFunctionBody(body, true);
+ ts.addRange(statements, block.statements.slice(statementOffset));
+ ts.addRange(statements, trailingStatements);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(statements), block.statements));
+ }
+ return body;
+ }
+ function appendObjectRestAssignmentsIfNeeded(statements, node) {
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
if (parameter.transformFlags & 1048576) {
@@ -39103,17 +42666,95 @@ var ts;
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
ts.setEmitFlags(statement, 524288);
- leadingStatements = ts.append(leadingStatements, statement);
+ statements = ts.append(statements, statement);
}
}
}
- var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
- var trailingStatements = endLexicalEnvironment();
- if (ts.some(leadingStatements) || ts.some(trailingStatements)) {
- var block = ts.convertToFunctionBody(body, true);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(ts.concatenate(leadingStatements, block.statements), trailingStatements), block.statements));
+ return statements;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
}
- return body;
}
}
ts.transformESNext = transformESNext;
@@ -39124,25 +42765,57 @@ var ts;
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
};
function createAssignHelper(context, attributesSegments) {
+ if (context.getCompilerOptions().target >= 2) {
+ return ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "assign"), undefined, attributesSegments);
+ }
context.requestEmitHelper(assignHelper);
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var asyncGeneratorHelper = {
+ name: "typescript:asyncGenerator",
+ scoped: false,
+ text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), q = [], c, i;\n return i = { next: verb(\"next\"), \"throw\": verb(\"throw\"), \"return\": verb(\"return\") }, i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { return function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]), next(); }); }; }\n function next() { if (!c && q.length) resume((c = q.shift())[0], c[1]); }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(c[3], e); } }\n function step(r) { r.done ? settle(c[2], r) : Promise.resolve(r.value[1]).then(r.value[0] === \"yield\" ? _yield : r.value[0] === \"delegate\" ? delegate : fulfill, reject); }\n function _yield(value) { settle(c[2], { value: value, done: false }); }\n function delegate(r) { step(r.done ? r : { value: [\"yield\", r.value], done: false }); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { c = void 0, f(v), next(); }\n };\n "
+ };
+ function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(asyncGeneratorHelper);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
+ ts.createThis(),
+ ts.createIdentifier("arguments"),
+ generatorFunc
+ ]);
+ }
+ var asyncDelegator = {
+ name: "typescript:asyncDelegator",
+ scoped: false,
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i = { next: verb(\"next\"), \"throw\": verb(\"throw\", function (e) { throw e; }), \"return\": verb(\"return\", function (v) { return { value: v, done: true }; }) };\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return { value: [\"delegate\", (o[n] || f).call(o, v)], done: false }; }; }\n };\n "
+ };
+ function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(asyncDelegator);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
+ }
+ var asyncValues = {
+ name: "typescript:asyncValues",
+ scoped: false,
+ text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n "
+ };
+ function createAsyncValuesHelper(context, expression, location) {
+ context.requestEmitHelper(asyncValues);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"), undefined, [expression]), location);
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformJsx(context) {
var compilerOptions = context.getCompilerOptions();
- var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
var visited = ts.visitEachChild(node, visitor, context);
ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
return visited;
}
function visitor(node) {
@@ -39155,11 +42828,11 @@ var ts;
}
function visitorWorker(node) {
switch (node.kind) {
- case 246:
+ case 248:
return visitJsxElement(node, false);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, false);
- case 252:
+ case 255:
return visitJsxExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -39169,11 +42842,11 @@ var ts;
switch (node.kind) {
case 10:
return visitJsxText(node);
- case 252:
+ case 255:
return visitJsxExpression(node);
- case 246:
+ case 248:
return visitJsxElement(node, true);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, true);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39189,7 +42862,7 @@ var ts;
function visitJsxOpeningLikeElement(node, children, isChild, location) {
var tagName = getTagName(node);
var objectProperties;
- var attrs = node.attributes;
+ var attrs = node.attributes.properties;
if (attrs.length === 0) {
objectProperties = ts.createNull();
}
@@ -39221,13 +42894,16 @@ var ts;
}
function transformJsxAttributeInitializer(node) {
if (node === undefined) {
- return ts.createLiteral(true);
+ return ts.createTrue();
}
else if (node.kind === 9) {
var decoded = tryDecodeEntities(node.text);
- return decoded ? ts.createLiteral(decoded, node) : node;
+ return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node;
}
- else if (node.kind === 252) {
+ else if (node.kind === 255) {
+ if (node.expression === undefined) {
+ return ts.createTrue();
+ }
return visitJsxExpression(node);
}
else {
@@ -39235,43 +42911,35 @@ var ts;
}
}
function visitJsxText(node) {
- var text = ts.getTextOfNode(node, true);
- var parts;
+ var fixed = fixupWhitespaceAndDecodeEntities(ts.getTextOfNode(node, true));
+ return fixed === undefined ? undefined : ts.createLiteral(fixed);
+ }
+ function fixupWhitespaceAndDecodeEntities(text) {
+ var acc;
var firstNonWhitespace = 0;
var lastNonWhitespace = -1;
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
if (ts.isLineBreak(c)) {
- if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) {
- var part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
+ if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {
+ acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));
}
firstNonWhitespace = -1;
}
- else if (!ts.isWhiteSpace(c)) {
+ else if (!ts.isWhiteSpaceSingleLine(c)) {
lastNonWhitespace = i;
if (firstNonWhitespace === -1) {
firstNonWhitespace = i;
}
}
}
- if (firstNonWhitespace !== -1) {
- var part = text.substr(firstNonWhitespace);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
- }
- if (parts) {
- return ts.reduceLeft(parts, aggregateJsxTextParts);
- }
- return undefined;
+ return firstNonWhitespace !== -1
+ ? addLineOfJsxText(acc, text.substr(firstNonWhitespace))
+ : acc;
}
- function aggregateJsxTextParts(left, right) {
- return ts.createAdd(ts.createAdd(left, ts.createLiteral(" ")), right);
+ function addLineOfJsxText(acc, trimmedLine) {
+ var decoded = decodeEntities(trimmedLine);
+ return acc === undefined ? decoded : acc + " " + decoded;
}
function decodeEntities(text) {
return text.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, function (match, _all, _number, _digits, decimal, hex, word) {
@@ -39282,7 +42950,7 @@ var ts;
return String.fromCharCode(parseInt(hex, 16));
}
else {
- var ch = entities[word];
+ var ch = entities.get(word);
return ch ? String.fromCharCode(ch) : match;
}
});
@@ -39292,16 +42960,16 @@ var ts;
return decoded === text ? undefined : decoded;
}
function getTagName(node) {
- if (node.kind === 246) {
+ if (node.kind === 248) {
return getTagName(node.openingElement);
}
else {
- var name_34 = node.tagName;
- if (ts.isIdentifier(name_34) && ts.isIntrinsicJsxName(name_34.text)) {
- return ts.createLiteral(name_34.text);
+ var name = node.tagName;
+ if (ts.isIdentifier(name) && ts.isIntrinsicJsxName(name.text)) {
+ return ts.createLiteral(name.text);
}
else {
- return ts.createExpressionFromEntityName(name_34);
+ return ts.createExpressionFromEntityName(name);
}
}
}
@@ -39319,7 +42987,7 @@ var ts;
}
}
ts.transformJsx = transformJsx;
- var entities = ts.createMap({
+ var entities = ts.createMapFromTemplate({
"quot": 0x0022,
"amp": 0x0026,
"apos": 0x0027,
@@ -39577,263 +43245,6 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function transformES2017(context) {
- var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
- var resolver = context.getEmitResolver();
- var compilerOptions = context.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var currentSourceFile;
- var enabledSubstitutions;
- var currentSuperContainer;
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
- }
- currentSourceFile = node;
- var visited = ts.visitEachChild(node, visitor, context);
- ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
- return visited;
- }
- function visitor(node) {
- if ((node.transformFlags & 16) === 0) {
- return node;
- }
- switch (node.kind) {
- case 119:
- return undefined;
- case 189:
- return visitAwaitExpression(node);
- case 149:
- return visitMethodDeclaration(node);
- case 225:
- return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
- case 185:
- return visitArrowFunction(node);
- default:
- return ts.visitEachChild(node, visitor, context);
- }
- }
- function visitAwaitExpression(node) {
- return ts.setOriginalNode(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression), node), node);
- }
- function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
- return ts.createOmittedExpression();
- }
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function transformAsyncFunctionBody(node) {
- resumeLexicalEnvironment();
- var original = ts.getOriginalNode(node, ts.isFunctionLike);
- var nodeType = original.type;
- var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
- var isArrowFunction = node.kind === 185;
- var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
- if (!isArrowFunction) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.body.statements, false, visitor);
- statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
- ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(statements, node.body, true);
- if (languageVersion >= 2) {
- if (resolver.getNodeCheckFlags(node) & 4096) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, advancedAsyncSuperHelper);
- }
- else if (resolver.getNodeCheckFlags(node) & 2048) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, asyncSuperHelper);
- }
- }
- return block;
- }
- else {
- var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
- var declarations = endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(expression);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(block.statements, declarations), block.statements));
- }
- return expression;
- }
- }
- function transformFunctionBodyWorker(body, start) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
- }
- else {
- startLexicalEnvironment();
- var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
- var declarations = endLexicalEnvironment();
- return ts.updateBlock(visited, ts.createNodeArray(ts.concatenate(visited.statements, declarations), visited.statements));
- }
- }
- function getPromiseConstructor(type) {
- var typeName = type && ts.getEntityNameFromTypeNode(type);
- if (typeName && ts.isEntityName(typeName)) {
- var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
- if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
- || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
- return typeName;
- }
- }
- return undefined;
- }
- function enableSubstitutionForAsyncMethodsWithSuper() {
- if ((enabledSubstitutions & 1) === 0) {
- enabledSubstitutions |= 1;
- context.enableSubstitution(179);
- context.enableSubstitution(177);
- context.enableSubstitution(178);
- context.enableEmitNotification(226);
- context.enableEmitNotification(149);
- context.enableEmitNotification(151);
- context.enableEmitNotification(152);
- context.enableEmitNotification(150);
- }
- }
- function substituteExpression(node) {
- switch (node.kind) {
- case 177:
- return substitutePropertyAccessExpression(node);
- case 178:
- return substituteElementAccessExpression(node);
- case 179:
- if (enabledSubstitutions & 1) {
- return substituteCallExpression(node);
- }
- break;
- }
- return node;
- }
- function substitutePropertyAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), flags, node);
- }
- }
- return node;
- }
- function substituteElementAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(node.argumentExpression, flags, node);
- }
- }
- return node;
- }
- function substituteCallExpression(node) {
- var expression = node.expression;
- if (ts.isSuperProperty(expression)) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- var argumentExpression = ts.isPropertyAccessExpression(expression)
- ? substitutePropertyAccessExpression(expression)
- : substituteElementAccessExpression(expression);
- return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
- ts.createThis()
- ].concat(node.arguments));
- }
- }
- return node;
- }
- function isSuperContainer(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 150
- || kind === 149
- || kind === 151
- || kind === 152;
- }
- function onEmitNode(emitContext, node, emitCallback) {
- if (enabledSubstitutions & 1 && isSuperContainer(node)) {
- var savedCurrentSuperContainer = currentSuperContainer;
- currentSuperContainer = node;
- previousOnEmitNode(emitContext, node, emitCallback);
- currentSuperContainer = savedCurrentSuperContainer;
- }
- else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
- return substituteExpression(node);
- }
- return node;
- }
- function createSuperAccessInAsyncMethod(argumentExpression, flags, location) {
- if (flags & 4096) {
- return ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value", location);
- }
- else {
- return ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression], location);
- }
- }
- function getSuperContainerAsyncMethodFlags() {
- return currentSuperContainer !== undefined
- && resolver.getNodeCheckFlags(currentSuperContainer) & (2048 | 4096);
- }
- }
- ts.transformES2017 = transformES2017;
- function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
- context.requestEmitHelper(awaiterHelper);
- var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
- return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
- ts.createThis(),
- hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
- promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
- generatorFunc
- ]);
- }
- var awaiterHelper = {
- name: "typescript:awaiter",
- scoped: false,
- priority: 5,
- text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments)).next());\n });\n };"
- };
- var asyncSuperHelper = {
- name: "typescript:async-super",
- scoped: true,
- text: "\n const _super = name => super[name];"
- };
- var advancedAsyncSuperHelper = {
- name: "typescript:advanced-async-super",
- scoped: true,
- text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"
- };
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
function transformES2016(context) {
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
@@ -39848,7 +43259,7 @@ var ts;
return node;
}
switch (node.kind) {
- case 192:
+ case 193:
return visitBinaryExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -39872,19 +43283,19 @@ var ts;
if (ts.isElementAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
var argumentExpressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createElementAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), ts.createAssignment(argumentExpressionTemp, left.argumentExpression, left.argumentExpression), left);
- value = ts.createElementAccess(expressionTemp, argumentExpressionTemp, left);
+ target = ts.setTextRange(ts.createElementAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), ts.setTextRange(ts.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)), left);
+ value = ts.setTextRange(ts.createElementAccess(expressionTemp, argumentExpressionTemp), left);
}
else if (ts.isPropertyAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createPropertyAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), left.name, left);
- value = ts.createPropertyAccess(expressionTemp, left.name, left);
+ target = ts.setTextRange(ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), left.name), left);
+ value = ts.setTextRange(ts.createPropertyAccess(expressionTemp, left.name), left);
}
else {
target = left;
value = left;
}
- return ts.createAssignment(target, ts.createMathPow(value, right, node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.createMathPow(value, right, node)), node);
}
function visitExponentiationExpression(node) {
var left = ts.visitNode(node.left, visitor, ts.isExpression);
@@ -39898,6 +43309,7 @@ var ts;
(function (ts) {
function transformES2015(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
@@ -39905,15 +43317,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
var currentSourceFile;
var currentText;
- var currentParent;
- var currentNode;
- var enclosingVariableStatement;
- var enclosingBlockScopeContainer;
- var enclosingBlockScopeContainerParent;
- var enclosingFunction;
- var enclosingNonArrowFunction;
- var enclosingNonAsyncFunctionBody;
- var isInConstructorWithCapturedSuper;
+ var hierarchyFacts;
var convertedLoopState;
var enabledSubstitutions;
return transformSourceFile;
@@ -39923,247 +43327,207 @@ var ts;
}
currentSourceFile = node;
currentText = node.text;
- var visited = saveStateAndInvoke(node, visitSourceFile);
+ var visited = visitSourceFile(node);
ts.addEmitHelpers(visited, context.readEmitHelpers());
currentSourceFile = undefined;
currentText = undefined;
+ hierarchyFacts = 0;
return visited;
}
- function visitor(node) {
- return saveStateAndInvoke(node, dispatcher);
- }
- function dispatcher(node) {
- return convertedLoopState
- ? visitorForConvertedLoopWorker(node)
- : visitorWorker(node);
+ function enterSubtree(excludeFacts, includeFacts) {
+ var ancestorFacts = hierarchyFacts;
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383;
+ return ancestorFacts;
}
- function saveStateAndInvoke(node, f) {
- var savedEnclosingFunction = enclosingFunction;
- var savedEnclosingNonArrowFunction = enclosingNonArrowFunction;
- var savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody;
- var savedEnclosingBlockScopeContainer = enclosingBlockScopeContainer;
- var savedEnclosingBlockScopeContainerParent = enclosingBlockScopeContainerParent;
- var savedEnclosingVariableStatement = enclosingVariableStatement;
- var savedCurrentParent = currentParent;
- var savedCurrentNode = currentNode;
- var savedConvertedLoopState = convertedLoopState;
- var savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper;
- if (ts.nodeStartsNewLexicalEnvironment(node)) {
- isInConstructorWithCapturedSuper = false;
- convertedLoopState = undefined;
- }
- onBeforeVisitNode(node);
- var visited = f(node);
- isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper;
- convertedLoopState = savedConvertedLoopState;
- enclosingFunction = savedEnclosingFunction;
- enclosingNonArrowFunction = savedEnclosingNonArrowFunction;
- enclosingNonAsyncFunctionBody = savedEnclosingNonAsyncFunctionBody;
- enclosingBlockScopeContainer = savedEnclosingBlockScopeContainer;
- enclosingBlockScopeContainerParent = savedEnclosingBlockScopeContainerParent;
- enclosingVariableStatement = savedEnclosingVariableStatement;
- currentParent = savedCurrentParent;
- currentNode = savedCurrentNode;
- return visited;
- }
- function onBeforeVisitNode(node) {
- if (currentNode) {
- if (ts.isBlockScope(currentNode, currentParent)) {
- enclosingBlockScopeContainer = currentNode;
- enclosingBlockScopeContainerParent = currentParent;
- }
- if (ts.isFunctionLike(currentNode)) {
- enclosingFunction = currentNode;
- if (currentNode.kind !== 185) {
- enclosingNonArrowFunction = currentNode;
- if (!(ts.getEmitFlags(currentNode) & 131072)) {
- enclosingNonAsyncFunctionBody = currentNode;
- }
- }
- }
- switch (currentNode.kind) {
- case 205:
- enclosingVariableStatement = currentNode;
- break;
- case 224:
- case 223:
- case 174:
- case 172:
- case 173:
- break;
- default:
- enclosingVariableStatement = undefined;
- }
- }
- currentParent = currentNode;
- currentNode = node;
- }
- function returnCapturedThis(node) {
- return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
+ function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 | ancestorFacts;
}
function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
- return isInConstructorWithCapturedSuper && node.kind === 216 && !node.expression;
+ return hierarchyFacts & 4096
+ && node.kind === 218
+ && !node.expression;
}
- function shouldCheckNode(node) {
- return (node.transformFlags & 64) !== 0 ||
- node.kind === 219 ||
- (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ function shouldVisitNode(node) {
+ return (node.transformFlags & 128) !== 0
+ || convertedLoopState !== undefined
+ || (hierarchyFacts & 4096 && ts.isStatement(node))
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
}
- function visitorWorker(node) {
- if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
- return returnCapturedThis(node);
- }
- else if (shouldCheckNode(node)) {
+ function visitor(node) {
+ if (shouldVisitNode(node)) {
return visitJavaScript(node);
}
- else if (node.transformFlags & 128 || (isInConstructorWithCapturedSuper && !ts.isExpression(node))) {
- return ts.visitEachChild(node, visitor, context);
- }
else {
return node;
}
}
- function visitorForConvertedLoopWorker(node) {
- var result;
- if (shouldCheckNode(node)) {
- result = visitJavaScript(node);
+ function functionBodyVisitor(node) {
+ if (shouldVisitNode(node)) {
+ return visitBlock(node, true);
}
- else {
- result = visitNodesInConvertedLoop(node);
- }
- return result;
+ return node;
}
- function visitNodesInConvertedLoop(node) {
- switch (node.kind) {
- case 216:
- node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node;
- return visitReturnStatement(node);
- case 205:
- return visitVariableStatement(node);
- case 218:
- return visitSwitchStatement(node);
- case 215:
- case 214:
- return visitBreakOrContinueStatement(node);
- case 98:
- return visitThisKeyword(node);
- case 70:
- return visitIdentifier(node);
- default:
- return ts.visitEachChild(node, visitor, context);
+ function callExpressionVisitor(node) {
+ if (node.kind === 96) {
+ return visitSuperKeyword(true);
}
+ return visitor(node);
}
function visitJavaScript(node) {
switch (node.kind) {
case 114:
return undefined;
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 185:
+ case 186:
return visitArrowFunction(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
case 70:
return visitIdentifier(node);
- case 224:
+ case 226:
return visitVariableDeclarationList(node);
- case 219:
+ case 220:
+ return visitSwitchStatement(node);
+ case 234:
+ return visitCaseBlock(node);
+ case 206:
+ return visitBlock(node, false);
+ case 217:
+ case 216:
+ return visitBreakOrContinueStatement(node);
+ case 221:
return visitLabeledStatement(node);
- case 209:
- return visitDoStatement(node);
- case 210:
- return visitWhileStatement(node);
case 211:
- return visitForStatement(node);
case 212:
- return visitForInStatement(node);
+ return visitDoOrWhileStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 207:
+ return visitForStatement(node, undefined);
+ case 214:
+ return visitForInStatement(node, undefined);
+ case 215:
+ return visitForOfStatement(node, undefined);
+ case 209:
return visitExpressionStatement(node);
- case 176:
+ case 177:
return visitObjectLiteralExpression(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 258:
+ case 261:
return visitShorthandPropertyAssignment(node);
- case 175:
+ case 143:
+ return visitComputedPropertyName(node);
+ case 176:
return visitArrayLiteralExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, true);
- case 192:
+ case 193:
return visitBinaryExpression(node, true);
case 12:
case 13:
case 14:
case 15:
return visitTemplateLiteral(node);
- case 181:
+ case 9:
+ return visitStringLiteral(node);
+ case 8:
+ return visitNumericLiteral(node);
+ case 182:
return visitTaggedTemplateExpression(node);
- case 194:
- return visitTemplateExpression(node);
case 195:
- return visitYieldExpression(node);
+ return visitTemplateExpression(node);
case 196:
+ return visitYieldExpression(node);
+ case 197:
return visitSpreadElement(node);
case 96:
- return visitSuperKeyword();
- case 195:
- return ts.visitEachChild(node, visitor, context);
- case 149:
+ return visitSuperKeyword(false);
+ case 98:
+ return visitThisKeyword(node);
+ case 203:
+ return visitMetaProperty(node);
+ case 150:
return visitMethodDeclaration(node);
- case 205:
+ case 152:
+ case 153:
+ return visitAccessorDeclaration(node);
+ case 207:
return visitVariableStatement(node);
+ case 218:
+ return visitReturnStatement(node);
default:
- ts.Debug.failBadSyntaxKind(node);
return ts.visitEachChild(node, visitor, context);
}
}
function visitSourceFile(node) {
+ var ancestorFacts = enterSubtree(3968, 64);
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, false, visitor);
+ var statementOffset = ts.addStandardPrologue(statements, node.statements, false);
addCaptureThisForNodeIfNeeded(statements, node);
+ statementOffset = ts.addCustomPrologue(statements, node.statements, statementOffset, visitor);
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
ts.addRange(statements, endLexicalEnvironment());
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ exitSubtree(ancestorFacts, 0, 0);
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
function visitSwitchStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
- convertedLoopState.allowedNonLabeledJumps |= 2;
- var result = ts.visitEachChild(node, visitor, context);
- convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
- return result;
+ if (convertedLoopState !== undefined) {
+ var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
+ convertedLoopState.allowedNonLabeledJumps |= 2;
+ var result = ts.visitEachChild(node, visitor, context);
+ convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
+ return result;
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitCaseBlock(node) {
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function returnCapturedThis(node) {
+ return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
}
function visitReturnStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- convertedLoopState.nonLocalJumps |= 8;
- return ts.createReturn(ts.createObjectLiteral([
- ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
- ? ts.visitNode(node.expression, visitor, ts.isExpression)
- : ts.createVoidZero())
- ]));
+ if (convertedLoopState) {
+ convertedLoopState.nonLocalJumps |= 8;
+ if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ node = returnCapturedThis(node);
+ }
+ return ts.createReturn(ts.createObjectLiteral([
+ ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
+ ? ts.visitNode(node.expression, visitor, ts.isExpression)
+ : ts.createVoidZero())
+ ]));
+ }
+ else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ return returnCapturedThis(node);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitThisKeyword(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- if (enclosingFunction && enclosingFunction.kind === 185) {
- convertedLoopState.containsLexicalThis = true;
- return node;
+ if (convertedLoopState) {
+ if (hierarchyFacts & 2) {
+ convertedLoopState.containsLexicalThis = true;
+ return node;
+ }
+ return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
}
- return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
+ return node;
}
function visitIdentifier(node) {
if (!convertedLoopState) {
@@ -40172,20 +43536,20 @@ var ts;
if (ts.isGeneratedIdentifier(node)) {
return node;
}
- if (node.text !== "arguments" && !resolver.isArgumentsLocalBinding(node)) {
+ if (node.text !== "arguments" || !resolver.isArgumentsLocalBinding(node)) {
return node;
}
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = ts.createUniqueName("arguments"));
}
function visitBreakOrContinueStatement(node) {
if (convertedLoopState) {
- var jump = node.kind === 215 ? 2 : 4;
- var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||
+ var jump = node.kind === 217 ? 2 : 4;
+ var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) ||
(!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
if (!canUseBreakOrContinue) {
var labelMarker = void 0;
if (!node.label) {
- if (node.kind === 215) {
+ if (node.kind === 217) {
convertedLoopState.nonLocalJumps |= 2;
labelMarker = "break";
}
@@ -40195,7 +43559,7 @@ var ts;
}
}
else {
- if (node.kind === 215) {
+ if (node.kind === 217) {
labelMarker = "break-" + node.label.text;
setLabeledJump(convertedLoopState, true, node.label.text, labelMarker);
}
@@ -40228,8 +43592,9 @@ var ts;
var variable = ts.createVariableDeclaration(ts.getLocalName(node, true), undefined, transformClassLikeDeclarationToExpression(node));
ts.setOriginalNode(variable, node);
var statements = [];
- var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]), node);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, node);
ts.startOnNewLine(statement);
statements.push(statement);
if (ts.hasModifier(node, 1)) {
@@ -40284,23 +43649,29 @@ var ts;
ts.setEmitFlags(statement, 1536 | 384);
statements.push(statement);
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
ts.setEmitFlags(block, 1536);
return block;
}
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
if (extendsClauseElement) {
- statements.push(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node)), extendsClauseElement));
+ statements.push(ts.setTextRange(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node))), extendsClauseElement));
}
}
function addConstructor(statements, node, extendsClauseElement) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16278, 73);
var constructor = ts.getFirstConstructorWithBody(node);
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
- var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper), constructor || node);
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
+ ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
}
statements.push(constructorFunction);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
}
function transformConstructorParameters(constructor, hasSynthesizedSuper) {
return ts.visitParameterList(constructor && !hasSynthesizedSuper && constructor.parameters, visitor, context)
@@ -40314,48 +43685,55 @@ var ts;
statementOffset = 0;
}
else if (constructor) {
- statementOffset = ts.addPrologueDirectives(statements, constructor.body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, constructor.body.statements, false);
}
if (constructor) {
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
+ if (!hasSynthesizedSuper) {
+ statementOffset = ts.addCustomPrologue(statements, constructor.body.statements, statementOffset, visitor);
+ }
ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
}
- var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94;
+ var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
if (superCaptureStatus === 1 || superCaptureStatus === 2) {
statementOffset++;
}
if (constructor) {
- var body = saveStateAndInvoke(constructor, function (constructor) {
- isInConstructorWithCapturedSuper = superCaptureStatus === 1;
- return ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset);
- });
- ts.addRange(statements, body);
+ if (superCaptureStatus === 1) {
+ hierarchyFacts |= 4096;
+ }
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset));
}
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== 2
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(ts.createReturn(ts.createIdentifier("_this")));
}
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : node, true);
+ if (constructor) {
+ prependCaptureNewTargetIfNeeded(statements, constructor, false);
+ }
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true);
+ ts.setTextRange(block, constructor ? constructor.body : node);
if (!constructor) {
ts.setEmitFlags(block, 1536);
}
return block;
}
function isSufficientlyCoveredByReturnStatements(statement) {
- if (statement.kind === 216) {
+ if (statement.kind === 218) {
return true;
}
- else if (statement.kind === 208) {
+ else if (statement.kind === 210) {
var ifStatement = statement;
if (ifStatement.elseStatement) {
return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
}
}
- else if (statement.kind === 204) {
+ else if (statement.kind === 206) {
var lastStatement = ts.lastOrUndefined(statement.statements);
if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
return true;
@@ -40363,8 +43741,8 @@ var ts;
}
return false;
}
- function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, hasExtendsClause, hasSynthesizedSuper, statementOffset) {
- if (!hasExtendsClause) {
+ function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, isDerivedClass, hasSynthesizedSuper, statementOffset) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -40384,42 +43762,43 @@ var ts;
var ctorStatements = ctor.body.statements;
if (statementOffset < ctorStatements.length) {
firstStatement = ctorStatements[statementOffset];
- if (firstStatement.kind === 207 && ts.isSuperCall(firstStatement.expression)) {
- var superCall = firstStatement.expression;
- superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
+ if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) {
+ superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression);
}
}
- if (superCallExpression && statementOffset === ctorStatements.length - 1) {
+ if (superCallExpression
+ && statementOffset === ctorStatements.length - 1
+ && !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
- if (superCallExpression.kind !== 192
- || superCallExpression.left.kind !== 179) {
+ if (superCallExpression.kind !== 193
+ || superCallExpression.left.kind !== 180) {
ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'.");
}
ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536)));
statements.push(returnStatement);
return 2;
}
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
if (superCallExpression) {
return 1;
}
return 0;
}
+ function createActualThis() {
+ return ts.setEmitFlags(ts.createThis(), 4);
+ }
function createDefaultSuperCallOrThis() {
- var actualThis = ts.createThis();
- ts.setEmitFlags(actualThis, 4);
- var superCall = ts.createFunctionApply(ts.createIdentifier("_super"), actualThis, ts.createIdentifier("arguments"));
- return ts.createLogicalOr(superCall, actualThis);
+ return ts.createLogicalOr(ts.createLogicalAnd(ts.createStrictInequality(ts.createIdentifier("_super"), ts.createNull()), ts.createFunctionApply(ts.createIdentifier("_super"), createActualThis(), ts.createIdentifier("arguments"))), createActualThis());
}
function visitParameter(node) {
if (node.dotDotDotToken) {
return undefined;
}
else if (ts.isBindingPattern(node.name)) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined), node), node);
}
else if (node.initializer) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined), node), node);
}
else {
return node;
@@ -40434,15 +43813,15 @@ var ts;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- var name_35 = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
+ var name = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
if (dotDotDotToken) {
continue;
}
- if (ts.isBindingPattern(name_35)) {
- addDefaultValueAssignmentForBindingPattern(statements, parameter, name_35, initializer);
+ if (ts.isBindingPattern(name)) {
+ addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer);
}
else if (initializer) {
- addDefaultValueAssignmentForInitializer(statements, parameter, name_35, initializer);
+ addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);
}
}
}
@@ -40457,10 +43836,11 @@ var ts;
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
initializer = ts.visitNode(initializer, visitor, ts.isExpression);
- var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.createBlock([
- ts.createStatement(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer)), parameter))
- ], parameter), 1 | 32 | 384), undefined, parameter);
+ var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.setTextRange(ts.createBlock([
+ ts.createStatement(ts.setTextRange(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer))), parameter))
+ ]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
+ ts.setTextRange(statement, parameter);
ts.setEmitFlags(statement, 384 | 32 | 524288);
statements.push(statement);
}
@@ -40477,22 +43857,22 @@ var ts;
var expressionName = ts.getSynthesizedClone(parameter.name);
var restIndex = node.parameters.length - 1;
var temp = ts.createLoopVariable();
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ]), parameter), 524288));
- var forStatement = ts.createFor(ts.createVariableDeclarationList([
+ ])), parameter), 524288));
+ var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
- ], parameter), ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length"), parameter), ts.createPostfixIncrement(temp, parameter), ts.createBlock([
- ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
+ ]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
+ ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
? temp
- : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp)), parameter))
+ : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
ts.setEmitFlags(forStatement, 524288);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
function addCaptureThisForNodeIfNeeded(statements, node) {
- if (node.transformFlags & 32768 && node.kind !== 185) {
+ if (node.transformFlags & 32768 && node.kind !== 186) {
captureThisForNode(statements, node, ts.createThis());
}
}
@@ -40500,29 +43880,62 @@ var ts;
enableSubstitutionsForCapturedThis();
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
- ]), originalStatement);
+ ]));
ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
}
+ function prependCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
+ if (hierarchyFacts & 16384) {
+ var newTarget = void 0;
+ switch (node.kind) {
+ case 186:
+ return statements;
+ case 150:
+ case 152:
+ case 153:
+ newTarget = ts.createVoidZero();
+ break;
+ case 151:
+ newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor");
+ break;
+ case 227:
+ case 185:
+ newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero());
+ break;
+ default:
+ ts.Debug.failBadSyntaxKind(node);
+ break;
+ }
+ var captureNewTargetStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration("_newTarget", undefined, newTarget)
+ ]));
+ if (copyOnWrite) {
+ return [captureNewTargetStatement].concat(statements);
+ }
+ statements.unshift(captureNewTargetStatement);
+ }
+ return statements;
+ }
function addClassMembers(statements, node) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
switch (member.kind) {
- case 203:
+ case 205:
statements.push(transformSemicolonClassElementToStatement(member));
break;
- case 149:
- statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member));
+ case 150:
+ statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
break;
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.members, member);
if (member === accessors.firstAccessor) {
- statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors));
+ statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
}
break;
- case 150:
+ case 151:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -40531,28 +43944,32 @@ var ts;
}
}
function transformSemicolonClassElementToStatement(member) {
- return ts.createEmptyStatement(member);
+ return ts.setTextRange(ts.createEmptyStatement(), member);
}
- function transformClassMethodDeclarationToStatement(receiver, member) {
+ function transformClassMethodDeclarationToStatement(receiver, member, container) {
+ var ancestorFacts = enterSubtree(0, 0);
var commentRange = ts.getCommentRange(member);
var sourceMapRange = ts.getSourceMapRange(member);
var memberName = ts.createMemberAccessForPropertyName(receiver, ts.visitNode(member.name, visitor, ts.isPropertyName), member.name);
- var memberFunction = transformFunctionLikeToExpression(member, member, undefined);
+ var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
ts.setEmitFlags(memberFunction, 1536);
ts.setSourceMapRange(memberFunction, sourceMapRange);
- var statement = ts.createStatement(ts.createAssignment(memberName, memberFunction), member);
+ var statement = ts.setTextRange(ts.createStatement(ts.createAssignment(memberName, memberFunction)), member);
ts.setOriginalNode(statement, member);
ts.setCommentRange(statement, commentRange);
ts.setEmitFlags(statement, 48);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return statement;
}
- function transformAccessorsToStatement(receiver, accessors) {
- var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, false), ts.getSourceMapRange(accessors.firstAccessor));
+ function transformAccessorsToStatement(receiver, accessors, container) {
+ var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, container, false));
ts.setEmitFlags(statement, 1536);
+ ts.setSourceMapRange(statement, ts.getSourceMapRange(accessors.firstAccessor));
return statement;
}
- function transformAccessorsToExpression(receiver, _a, startsOnNewLine) {
+ function transformAccessorsToExpression(receiver, _a, container, startsOnNewLine) {
var firstAccessor = _a.firstAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
+ var ancestorFacts = enterSubtree(0, 0);
var target = ts.getMutableClone(receiver);
ts.setEmitFlags(target, 1536 | 32);
ts.setSourceMapRange(target, firstAccessor.name);
@@ -40561,7 +43978,7 @@ var ts;
ts.setSourceMapRange(propertyName, firstAccessor.name);
var properties = [];
if (getAccessor) {
- var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined);
+ var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined, container);
ts.setSourceMapRange(getterFunction, ts.getSourceMapRange(getAccessor));
ts.setEmitFlags(getterFunction, 512);
var getter = ts.createPropertyAssignment("get", getterFunction);
@@ -40569,51 +43986,86 @@ var ts;
properties.push(getter);
}
if (setAccessor) {
- var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined);
+ var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined, container);
ts.setSourceMapRange(setterFunction, ts.getSourceMapRange(setAccessor));
ts.setEmitFlags(setterFunction, 512);
var setter = ts.createPropertyAssignment("set", setterFunction);
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
- properties.push(ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), ts.createPropertyAssignment("configurable", ts.createLiteral(true)));
+ properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
target,
propertyName,
- ts.createObjectLiteral(properties, undefined, true)
+ ts.createObjectLiteral(properties, true)
]);
if (startsOnNewLine) {
call.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return call;
}
function visitArrowFunction(node) {
if (node.transformFlags & 16384) {
enableSubstitutionsForCapturedThis();
}
- var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node), node);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16256, 66);
+ var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ ts.setTextRange(func, node);
ts.setOriginalNode(func, node);
ts.setEmitFlags(func, 8);
+ exitSubtree(ancestorFacts, 0, 0);
+ convertedLoopState = savedConvertedLoopState;
return func;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var ancestorFacts = ts.getEmitFlags(node) & 131072
+ ? enterSubtree(16278, 69)
+ : enterSubtree(16286, 65);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionExpression(node, undefined, node.asteriskToken, name, undefined, parameters, undefined, body);
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
}
- function transformFunctionLikeToExpression(node, location, name) {
- var savedContainingNonArrowFunction = enclosingNonArrowFunction;
- if (node.kind !== 185) {
- enclosingNonArrowFunction = node;
+ function transformFunctionLikeToExpression(node, location, name, container) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = container && ts.isClassLike(container) && !ts.hasModifier(node, 32)
+ ? enterSubtree(16286, 65 | 8)
+ : enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) {
+ name = ts.getGeneratedNameForNode(node);
}
- var expression = ts.setOriginalNode(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, saveStateAndInvoke(node, transformFunctionBody), location), node);
- enclosingNonArrowFunction = savedContainingNonArrowFunction;
- return expression;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, parameters, undefined, body), location), node);
}
function transformFunctionBody(node) {
var multiLine = false;
@@ -40625,7 +44077,7 @@ var ts;
var statementOffset;
resumeLexicalEnvironment();
if (ts.isBlock(body)) {
- statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, body.statements, false);
}
addCaptureThisForNodeIfNeeded(statements, node);
addDefaultValueAssignmentsIfNeeded(statements, node);
@@ -40634,6 +44086,7 @@ var ts;
multiLine = true;
}
if (ts.isBlock(body)) {
+ statementOffset = ts.addCustomPrologue(statements, body.statements, statementOffset, visitor);
statementsLocation = body.statements;
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, statementOffset));
if (!multiLine && body.multiLine) {
@@ -40641,7 +44094,7 @@ var ts;
}
}
else {
- ts.Debug.assert(node.kind === 185);
+ ts.Debug.assert(node.kind === 186);
statementsLocation = ts.moveRangeEnd(body, -1);
var equalsGreaterThanToken = node.equalsGreaterThanToken;
if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) {
@@ -40653,17 +44106,20 @@ var ts;
}
}
var expression = ts.visitNode(body, visitor, ts.isExpression);
- var returnStatement = ts.createReturn(expression, body);
+ var returnStatement = ts.createReturn(expression);
+ ts.setTextRange(returnStatement, body);
ts.setEmitFlags(returnStatement, 384 | 32 | 1024);
statements.push(returnStatement);
closeBraceLocation = body;
}
var lexicalEnvironment = context.endLexicalEnvironment();
ts.addRange(statements, lexicalEnvironment);
+ prependCaptureNewTargetIfNeeded(statements, node, false);
if (!multiLine && lexicalEnvironment && lexicalEnvironment.length) {
multiLine = true;
}
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), node.body, multiLine);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), multiLine);
+ ts.setTextRange(block, node.body);
if (!multiLine && singleLine) {
ts.setEmitFlags(block, 1);
}
@@ -40673,11 +44129,26 @@ var ts;
ts.setOriginalNode(block, node.body);
return block;
}
+ function visitFunctionBodyDownLevel(node) {
+ var updated = ts.visitFunctionBody(node.body, functionBodyVisitor, context);
+ return ts.updateBlock(updated, ts.setTextRange(ts.createNodeArray(prependCaptureNewTargetIfNeeded(updated.statements, node, true)), updated.statements));
+ }
+ function visitBlock(node, isFunctionBody) {
+ if (isFunctionBody) {
+ return ts.visitEachChild(node, visitor, context);
+ }
+ var ancestorFacts = hierarchyFacts & 256
+ ? enterSubtree(4032, 512)
+ : enterSubtree(3904, 128);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
function visitExpressionStatement(node) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateStatement(node, visitBinaryExpression(node.expression, false));
}
return ts.visitEachChild(node, visitor, context);
@@ -40685,9 +44156,9 @@ var ts;
function visitParenthesizedExpression(node, needsDestructuringValue) {
if (!needsDestructuringValue) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateParen(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateParen(node, visitBinaryExpression(node.expression, false));
}
}
@@ -40697,9 +44168,12 @@ var ts;
if (ts.isDestructuringAssignment(node)) {
return ts.flattenDestructuringAssignment(node, visitor, context, 0, needsDestructuringValue);
}
+ return ts.visitEachChild(node, visitor, context);
}
function visitVariableStatement(node) {
- if (convertedLoopState && (ts.getCombinedNodeFlags(node.declarationList) & 3) == 0) {
+ var ancestorFacts = enterSubtree(0, ts.hasModifier(node, 1) ? 32 : 0);
+ var updated;
+ if (convertedLoopState && (node.declarationList.flags & 3) === 0) {
var assignments = void 0;
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
@@ -40712,53 +44186,59 @@ var ts;
else {
assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression));
}
- (assignments || (assignments = [])).push(assignment);
+ assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- return ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); }), node);
+ updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node);
}
else {
- return undefined;
+ updated = undefined;
}
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function visitVariableDeclarationList(node) {
- if (node.flags & 3) {
- enableSubstitutionsForBlockScopedBindings();
+ if (node.transformFlags & 64) {
+ if (node.flags & 3) {
+ enableSubstitutionsForBlockScopedBindings();
+ }
+ var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ ? visitVariableDeclarationInLetDeclarationList
+ : visitVariableDeclaration));
+ var declarationList = ts.createVariableDeclarationList(declarations);
+ ts.setOriginalNode(declarationList, node);
+ ts.setTextRange(declarationList, node);
+ ts.setCommentRange(declarationList, node);
+ if (node.transformFlags & 8388608
+ && (ts.isBindingPattern(node.declarations[0].name)
+ || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
+ var firstDeclaration = ts.firstOrUndefined(declarations);
+ var lastDeclaration = ts.lastOrUndefined(declarations);
+ ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ }
+ return declarationList;
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
- ? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
- var declarationList = ts.createVariableDeclarationList(declarations, node);
- ts.setOriginalNode(declarationList, node);
- ts.setCommentRange(declarationList, node);
- if (node.transformFlags & 8388608
- && (ts.isBindingPattern(node.declarations[0].name)
- || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
- var firstDeclaration = ts.firstOrUndefined(declarations);
- var lastDeclaration = ts.lastOrUndefined(declarations);
- ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
- }
- return declarationList;
+ return ts.visitEachChild(node, visitor, context);
}
function shouldEmitExplicitInitializerForLetDeclaration(node) {
var flags = resolver.getNodeCheckFlags(node);
var isCapturedInFunction = flags & 131072;
var isDeclaredInLoop = flags & 262144;
- var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(enclosingBlockScopeContainer)
+ var emittedAsTopLevel = (hierarchyFacts & 64) !== 0
|| (isCapturedInFunction
&& isDeclaredInLoop
- && ts.isBlock(enclosingBlockScopeContainer)
- && ts.isIterationStatement(enclosingBlockScopeContainerParent, false));
+ && (hierarchyFacts & 512) !== 0);
var emitExplicitInitializer = !emittedAsTopLevel
- && enclosingBlockScopeContainer.kind !== 212
- && enclosingBlockScopeContainer.kind !== 213
+ && (hierarchyFacts & 2048) === 0
&& (!resolver.isDeclarationWithCollidingName(node)
|| (isDeclaredInLoop
&& !isCapturedInFunction
- && !ts.isIterationStatement(enclosingBlockScopeContainer, false)));
+ && (hierarchyFacts & (1024 | 2048)) === 0));
return emitExplicitInitializer;
}
function visitVariableDeclarationInLetDeclarationList(node) {
@@ -40774,84 +44254,94 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitVariableDeclaration(node) {
+ var ancestorFacts = enterSubtree(32, 0);
+ var updated;
if (ts.isBindingPattern(node.name)) {
- var hoistTempVariables = enclosingVariableStatement
- && ts.hasModifier(enclosingVariableStatement, 1);
- return ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, hoistTempVariables);
+ updated = ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, (ancestorFacts & 32) !== 0);
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function recordLabel(node) {
+ convertedLoopState.labels.set(node.label.text, node.label.text);
+ }
+ function resetLabel(node) {
+ convertedLoopState.labels.set(node.label.text, undefined);
}
function visitLabeledStatement(node) {
- if (convertedLoopState) {
- if (!convertedLoopState.labels) {
- convertedLoopState.labels = ts.createMap();
- }
- convertedLoopState.labels[node.label.text] = node.label.text;
+ if (convertedLoopState && !convertedLoopState.labels) {
+ convertedLoopState.labels = ts.createMap();
}
- var result;
- if (ts.isIterationStatement(node.statement, false) && shouldConvertIterationStatementBody(node.statement)) {
- result = ts.visitNodes(ts.createNodeArray([node.statement]), visitor, ts.isStatement);
- }
- else {
- result = ts.visitEachChild(node, visitor, context);
- }
- if (convertedLoopState) {
- convertedLoopState.labels[node.label.text] = undefined;
+ var statement = ts.unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);
+ return ts.isIterationStatement(statement, false)
+ ? visitIterationStatement(statement, node)
+ : ts.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement), node, convertedLoopState && resetLabel);
+ }
+ function visitIterationStatement(node, outermostLabeledStatement) {
+ switch (node.kind) {
+ case 211:
+ case 212:
+ return visitDoOrWhileStatement(node, outermostLabeledStatement);
+ case 213:
+ return visitForStatement(node, outermostLabeledStatement);
+ case 214:
+ return visitForInStatement(node, outermostLabeledStatement);
+ case 215:
+ return visitForOfStatement(node, outermostLabeledStatement);
}
- return result;
}
- function visitDoStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {
+ var ancestorFacts = enterSubtree(excludeFacts, includeFacts);
+ var updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
- function visitWhileStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitDoOrWhileStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(0, 256, node, outermostLabeledStatement);
}
- function visitForStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(3008, 1280, node, outermostLabeledStatement);
}
- function visitForInStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForInStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement);
}
- function visitForOfStatement(node) {
- return convertIterationStatementBodyIfNecessary(node, convertForOfToFor);
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement, compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray);
}
- function convertForOfToFor(node, convertedLoopBodyStatements) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var initializer = node.initializer;
+ function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {
var statements = [];
- var counter = ts.createLoopVariable();
- var rhsReference = expression.kind === 70
- ? ts.createUniqueName(expression.text)
- : ts.createTempVariable(undefined);
- var elementAccess = ts.createElementAccess(rhsReference, counter);
- if (ts.isVariableDeclarationList(initializer)) {
- if (initializer.flags & 3) {
+ if (ts.isVariableDeclarationList(node.initializer)) {
+ if (node.initializer.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var firstOriginalDeclaration = ts.firstOrUndefined(initializer.declarations);
+ var firstOriginalDeclaration = ts.firstOrUndefined(node.initializer.declarations);
if (firstOriginalDeclaration && ts.isBindingPattern(firstOriginalDeclaration.name)) {
- var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, elementAccess);
- var declarationList = ts.createVariableDeclarationList(declarations, initializer);
- ts.setOriginalNode(declarationList, initializer);
+ var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, boundValue);
+ var declarationList = ts.setTextRange(ts.createVariableDeclarationList(declarations), node.initializer);
+ ts.setOriginalNode(declarationList, node.initializer);
var firstDeclaration = declarations[0];
var lastDeclaration = ts.lastOrUndefined(declarations);
ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
statements.push(ts.createVariableStatement(undefined, declarationList));
}
else {
- statements.push(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, ts.createElementAccess(rhsReference, counter))
- ], ts.moveRangePos(initializer, -1)), initializer), ts.moveRangeEnd(initializer, -1)));
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, boundValue)
+ ]), ts.moveRangePos(node.initializer, -1)), node.initializer)), ts.moveRangeEnd(node.initializer, -1)));
}
}
else {
- var assignment = ts.createAssignment(initializer, elementAccess);
+ var assignment = ts.createAssignment(node.initializer, boundValue);
if (ts.isDestructuringAssignment(assignment)) {
- statements.push(ts.createStatement(ts.flattenDestructuringAssignment(assignment, visitor, context, 0)));
+ ts.aggregateTransformFlags(assignment);
+ statements.push(ts.createStatement(visitBinaryExpression(assignment, false)));
}
else {
- assignment.end = initializer.end;
- statements.push(ts.createStatement(assignment, ts.moveRangeEnd(initializer, -1)));
+ assignment.end = node.initializer.end;
+ statements.push(ts.setTextRange(ts.createStatement(ts.visitNode(assignment, visitor, ts.isExpression)), ts.moveRangeEnd(node.initializer, -1)));
}
}
var bodyLocation;
@@ -40860,7 +44350,7 @@ var ts;
ts.addRange(statements, convertedLoopBodyStatements);
}
else {
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
if (ts.isBlock(statement)) {
ts.addRange(statements, statement.statements);
bodyLocation = statement;
@@ -40870,39 +44360,82 @@ var ts;
statements.push(statement);
}
}
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var counter = ts.createLoopVariable();
+ var rhsReference = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
ts.setEmitFlags(expression, 48 | ts.getEmitFlags(expression));
- var body = ts.createBlock(ts.createNodeArray(statements, statementsLocation), bodyLocation);
- ts.setEmitFlags(body, 48 | 384);
- var forStatement = ts.createFor(ts.setEmitFlags(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0), ts.moveRangePos(node.expression, -1)),
- ts.createVariableDeclaration(rhsReference, undefined, expression, node.expression)
- ], node.expression), 1048576), ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length"), node.expression), ts.createPostfixIncrement(counter, node.expression), body, node);
+ var forStatement = ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0)), ts.moveRangePos(node.expression, -1)),
+ ts.setTextRange(ts.createVariableDeclaration(rhsReference, undefined, expression), node.expression)
+ ]), node.expression), 1048576), ts.setTextRange(ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length")), node.expression), ts.setTextRange(ts.createPostfixIncrement(counter), node.expression), convertForOfStatementHead(node, ts.createElementAccess(rhsReference, counter), convertedLoopBodyStatements)), node);
ts.setEmitFlags(forStatement, 256);
- return forStatement;
+ ts.setTextRange(forStatement, node);
+ return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = ts.createValuesHelper(context, expression, node.expression);
+ var next = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createFunctionCall(returnMethod, iterator, []))), 1),
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitObjectLiteralExpression(node) {
var properties = node.properties;
var numProperties = properties.length;
var numInitialProperties = numProperties;
+ var numInitialPropertiesWithoutYield = numProperties;
for (var i = 0; i < numProperties; i++) {
var property = properties[i];
- if (property.transformFlags & 16777216
- || property.name.kind === 142) {
+ if ((property.transformFlags & 16777216 && hierarchyFacts & 4)
+ && i < numInitialPropertiesWithoutYield) {
+ numInitialPropertiesWithoutYield = i;
+ }
+ if (property.name.kind === 143) {
numInitialProperties = i;
break;
}
}
- ts.Debug.assert(numInitialProperties !== numProperties);
- var temp = ts.createTempVariable(hoistVariableDeclaration);
- var expressions = [];
- var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, node.multiLine), 32768));
- if (node.multiLine) {
- assignment.startsOnNewLine = true;
+ if (numInitialProperties !== numProperties) {
+ if (numInitialPropertiesWithoutYield < numInitialProperties) {
+ numInitialProperties = numInitialPropertiesWithoutYield;
+ }
+ var temp = ts.createTempVariable(hoistVariableDeclaration);
+ var expressions = [];
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 32768));
+ if (node.multiLine) {
+ assignment.startsOnNewLine = true;
+ }
+ expressions.push(assignment);
+ addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
+ expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
+ return ts.inlineExpressions(expressions);
}
- expressions.push(assignment);
- addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
- expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
- return ts.inlineExpressions(expressions);
+ return ts.visitEachChild(node, visitor, context);
}
function shouldConvertIterationStatementBody(node) {
return (resolver.getNodeCheckFlags(node) & 65536) !== 0;
@@ -40926,14 +44459,16 @@ var ts;
}
}
}
- function convertIterationStatementBodyIfNecessary(node, convert) {
+ function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert) {
if (!shouldConvertIterationStatementBody(node)) {
var saveAllowedNonLabeledJumps = void 0;
if (convertedLoopState) {
saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
convertedLoopState.allowedNonLabeledJumps = 2 | 4;
}
- var result = convert ? convert(node, undefined) : ts.visitEachChild(node, visitor, context);
+ var result = convert
+ ? convert(node, outermostLabeledStatement, undefined)
+ : ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement, convertedLoopState && resetLabel);
if (convertedLoopState) {
convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;
}
@@ -40942,11 +44477,11 @@ var ts;
var functionName = ts.createUniqueName("_loop");
var loopInitializer;
switch (node.kind) {
- case 211:
- case 212:
case 213:
+ case 214:
+ case 215:
var initializer = node.initializer;
- if (initializer && initializer.kind === 224) {
+ if (initializer && initializer.kind === 226) {
loopInitializer = initializer;
}
break;
@@ -40972,19 +44507,26 @@ var ts;
convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables;
}
}
- var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement);
+ startLexicalEnvironment();
+ var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
+ var lexicalEnvironment = endLexicalEnvironment();
var currentState = convertedLoopState;
convertedLoopState = outerConvertedLoopState;
- if (loopOutParameters.length) {
+ if (loopOutParameters.length || lexicalEnvironment) {
var statements_4 = ts.isBlock(loopBody) ? loopBody.statements.slice() : [loopBody];
- copyOutParameters(loopOutParameters, 1, statements_4);
- loopBody = ts.createBlock(statements_4, undefined, true);
+ if (loopOutParameters.length) {
+ copyOutParameters(loopOutParameters, 1, statements_4);
+ }
+ ts.addRange(statements_4, lexicalEnvironment);
+ loopBody = ts.createBlock(statements_4, true);
}
- if (!ts.isBlock(loopBody)) {
- loopBody = ts.createBlock([loopBody], undefined, true);
+ if (ts.isBlock(loopBody)) {
+ loopBody.multiLine = true;
+ }
+ else {
+ loopBody = ts.createBlock([loopBody], true);
}
- var isAsyncBlockContainingAwait = enclosingNonArrowFunction
- && (ts.getEmitFlags(enclosingNonArrowFunction) & 131072) !== 0
+ var isAsyncBlockContainingAwait = hierarchyFacts & 4
&& (node.statement.transformFlags & 16777216) !== 0;
var loopBodyFlags = 0;
if (currentState.containsLexicalThis) {
@@ -41043,19 +44585,18 @@ var ts;
var convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, isAsyncBlockContainingAwait);
var loop;
if (convert) {
- loop = convert(node, convertedLoopBodyStatements);
+ loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- loop = ts.getMutableClone(node);
- loop.statement = undefined;
- loop = ts.visitEachChild(loop, visitor, context);
- loop.statement = ts.createBlock(convertedLoopBodyStatements, undefined, true);
- loop.transformFlags = 0;
- ts.aggregateTransformFlags(loop);
- }
- statements.push(currentParent.kind === 219
- ? ts.createLabel(currentParent.label, loop)
- : loop);
+ var clone_4 = ts.getMutableClone(node);
+ clone_4.statement = undefined;
+ clone_4 = ts.visitEachChild(clone_4, visitor, context);
+ clone_4.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_4.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_4);
+ loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ statements.push(loop);
return statements;
}
function copyOutParameter(outParam, copyDirection) {
@@ -41076,7 +44617,9 @@ var ts;
!state.labeledNonLocalBreaks &&
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
- var callResult = isAsyncBlockContainingAwait ? ts.createYield(ts.createToken(38), call) : call;
+ var callResult = isAsyncBlockContainingAwait
+ ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304))
+ : call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
copyOutParameters(state.loopOutParameters, 0, statements);
@@ -41114,23 +44657,22 @@ var ts;
if (!state.labeledNonLocalBreaks) {
state.labeledNonLocalBreaks = ts.createMap();
}
- state.labeledNonLocalBreaks[labelText] = labelMarker;
+ state.labeledNonLocalBreaks.set(labelText, labelMarker);
}
else {
if (!state.labeledNonLocalContinues) {
state.labeledNonLocalContinues = ts.createMap();
}
- state.labeledNonLocalContinues[labelText] = labelMarker;
+ state.labeledNonLocalContinues.set(labelText, labelMarker);
}
}
function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {
if (!table) {
return;
}
- for (var labelText in table) {
- var labelMarker = table[labelText];
+ table.forEach(function (labelMarker, labelText) {
var statements = [];
- if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) {
+ if (!outerLoop || (outerLoop.labels && outerLoop.labels.get(labelText))) {
var label = ts.createIdentifier(labelText);
statements.push(isBreak ? ts.createBreak(label) : ts.createContinue(label));
}
@@ -41139,7 +44681,7 @@ var ts;
statements.push(ts.createReturn(loopResultName));
}
caseClauses.push(ts.createCaseClause(ts.createLiteral(labelMarker), statements));
- }
+ });
}
function processLoopVariableDeclaration(decl, loopParameters, loopOutParameters) {
var name = decl.name;
@@ -41154,7 +44696,7 @@ var ts;
else {
loopParameters.push(ts.createParameter(undefined, undefined, undefined, name));
if (resolver.getNodeCheckFlags(decl) & 2097152) {
- var outParamName = ts.createUniqueName("out_" + name.text);
+ var outParamName = ts.createUniqueName("out_" + ts.unescapeIdentifier(name.text));
loopOutParameters.push({ originalName: name, outParamName: outParamName });
}
}
@@ -41165,22 +44707,22 @@ var ts;
for (var i = start; i < numProperties; i++) {
var property = properties[i];
switch (property.kind) {
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.properties, property);
if (property === accessors.firstAccessor) {
- expressions.push(transformAccessorsToExpression(receiver, accessors, node.multiLine));
+ expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine));
}
break;
- case 257:
+ case 150:
+ expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
+ break;
+ case 260:
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 258:
+ case 261:
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 149:
- expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node.multiLine));
- break;
default:
ts.Debug.failBadSyntaxKind(node);
break;
@@ -41188,34 +44730,49 @@ var ts;
}
}
function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
- function transformObjectLiteralMethodDeclarationToExpression(method, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined), method);
+ function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {
+ var ancestorFacts = enterSubtree(0, 0);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined, container));
+ ts.setTextRange(expression, method);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return expression;
}
function visitCatchClause(node) {
- ts.Debug.assert(ts.isBindingPattern(node.variableDeclaration.name));
- var temp = ts.createTempVariable(undefined);
- var newVariableDeclaration = ts.createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration);
- var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
- var list = ts.createVariableDeclarationList(vars, node.variableDeclaration, node.variableDeclaration.flags);
- var destructure = ts.createVariableStatement(undefined, list);
- return ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated;
+ if (ts.isBindingPattern(node.variableDeclaration.name)) {
+ var temp = ts.createTempVariable(undefined);
+ var newVariableDeclaration = ts.createVariableDeclaration(temp);
+ ts.setTextRange(newVariableDeclaration, node.variableDeclaration);
+ var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
+ var list = ts.createVariableDeclarationList(vars);
+ ts.setTextRange(list, node.variableDeclaration);
+ var destructure = ts.createVariableStatement(undefined, list);
+ updated = ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function addStatementToStartOfBlock(block, statement) {
var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
@@ -41223,21 +44780,43 @@ var ts;
}
function visitMethodDeclaration(node) {
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
- var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined);
+ var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined, undefined);
ts.setEmitFlags(functionExpression, 512 | ts.getEmitFlags(functionExpression));
- return ts.createPropertyAssignment(node.name, functionExpression, node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, functionExpression), node);
+ }
+ function visitAccessorDeclaration(node) {
+ ts.Debug.assert(!ts.isComputedPropertyName(node.name));
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return updated;
}
function visitShorthandPropertyAssignment(node) {
- return ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name), node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name)), node);
+ }
+ function visitComputedPropertyName(node) {
+ var ancestorFacts = enterSubtree(0, 8192);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 32768 : 0);
+ return updated;
}
function visitYieldExpression(node) {
return ts.visitEachChild(node, visitor, context);
}
function visitArrayLiteralExpression(node) {
- return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ if (node.transformFlags & 64) {
+ return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
- return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ if (node.transformFlags & 64) {
+ return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ }
+ return ts.updateCall(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression), undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
}
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
@@ -41249,38 +44828,54 @@ var ts;
}
var resultingCall;
if (node.transformFlags & 524288) {
- resultingCall = ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
+ resultingCall = ts.createFunctionApply(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
}
else {
- resultingCall = ts.createFunctionCall(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
+ resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
}
if (node.expression.kind === 96) {
var actualThis = ts.createThis();
ts.setEmitFlags(actualThis, 4);
var initializer = ts.createLogicalOr(resultingCall, actualThis);
- return assignToCapturedThis
+ resultingCall = assignToCapturedThis
? ts.createAssignment(ts.createIdentifier("_this"), initializer)
: initializer;
}
- return resultingCall;
+ return ts.setOriginalNode(resultingCall, node);
}
function visitNewExpression(node) {
- ts.Debug.assert((node.transformFlags & 524288) !== 0);
- var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ if (node.transformFlags & 524288) {
+ var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
+ return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function transformAndSpreadElements(elements, needsUniqueCopy, multiLine, hasTrailingComma) {
var numElements = elements.length;
var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
}));
- if (segments.length === 1) {
- var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 175
- ? ts.createArraySlice(segments[0])
- : segments[0];
+ if (compilerOptions.downlevelIteration) {
+ if (segments.length === 1) {
+ var firstSegment = segments[0];
+ if (ts.isCallExpression(firstSegment)
+ && ts.isIdentifier(firstSegment.expression)
+ && (ts.getEmitFlags(firstSegment.expression) & 4096)
+ && firstSegment.expression.text === "___spread") {
+ return segments[0];
+ }
+ }
+ return ts.createSpreadHelper(context, segments);
+ }
+ else {
+ if (segments.length === 1) {
+ var firstElement = elements[0];
+ return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176
+ ? ts.createArraySlice(segments[0])
+ : segments[0];
+ }
+ return ts.createArrayConcat(segments.shift(), segments);
}
- return ts.createArrayConcat(segments.shift(), segments);
}
function partitionSpread(node) {
return ts.isSpreadExpression(node)
@@ -41291,7 +44886,7 @@ var ts;
return ts.map(chunk, visitExpressionOfSpread);
}
function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
- return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, undefined, hasTrailingComma), visitor, ts.isExpression), undefined, multiLine);
+ return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
}
function visitSpreadElement(node) {
return ts.visitNode(node.expression, visitor, ts.isExpression);
@@ -41300,7 +44895,19 @@ var ts;
return ts.visitNode(node.expression, visitor, ts.isExpression);
}
function visitTemplateLiteral(node) {
- return ts.createLiteral(node.text, node);
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ function visitStringLiteral(node) {
+ if (node.hasExtendedUnicodeEscape) {
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ return node;
+ }
+ function visitNumericLiteral(node) {
+ if (node.numericLiteralFlags & 48) {
+ return ts.setTextRange(ts.createNumericLiteral(node.text), node);
+ }
+ return node;
}
function visitTaggedTemplateExpression(node) {
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
@@ -41334,7 +44941,7 @@ var ts;
var isLast = node.kind === 12 || node.kind === 15;
text = text.substring(1, text.length - (isLast ? 1 : 2));
text = text.replace(/\r\n?/g, "\n");
- return ts.createLiteral(text, node);
+ return ts.setTextRange(ts.createLiteral(text), node);
}
function visitTemplateExpression(node) {
var expressions = [];
@@ -41342,7 +44949,8 @@ var ts;
addTemplateSpans(expressions, node);
var expression = ts.reduceLeft(expressions, ts.createAdd);
if (ts.nodeIsSynthesized(expression)) {
- ts.setTextRange(expression, node);
+ expression.pos = node.pos;
+ expression.end = node.end;
}
return expression;
}
@@ -41365,21 +44973,34 @@ var ts;
}
}
}
- function visitSuperKeyword() {
- return enclosingNonAsyncFunctionBody
- && ts.isClassElement(enclosingNonAsyncFunctionBody)
- && !ts.hasModifier(enclosingNonAsyncFunctionBody, 32)
- && currentParent.kind !== 179
+ function visitSuperKeyword(isExpressionOfCall) {
+ return hierarchyFacts & 8
+ && !isExpressionOfCall
? ts.createPropertyAccess(ts.createIdentifier("_super"), "prototype")
: ts.createIdentifier("_super");
}
- function onEmitNode(emitContext, node, emitCallback) {
- var savedEnclosingFunction = enclosingFunction;
+ function visitMetaProperty(node) {
+ if (node.keywordToken === 93 && node.name.text === "target") {
+ if (hierarchyFacts & 8192) {
+ hierarchyFacts |= 32768;
+ }
+ else {
+ hierarchyFacts |= 16384;
+ }
+ return ts.createIdentifier("_newTarget");
+ }
+ return node;
+ }
+ function onEmitNode(hint, node, emitCallback) {
if (enabledSubstitutions & 1 && ts.isFunctionLike(node)) {
- enclosingFunction = node;
+ var ancestorFacts = enterSubtree(16286, ts.getEmitFlags(node) & 8
+ ? 65 | 16
+ : 65);
+ previousOnEmitNode(hint, node, emitCallback);
+ exitSubtree(ancestorFacts, 0, 0);
+ return;
}
- previousOnEmitNode(emitContext, node, emitCallback);
- enclosingFunction = savedEnclosingFunction;
+ previousOnEmitNode(hint, node, emitCallback);
}
function enableSubstitutionsForBlockScopedBindings() {
if ((enabledSubstitutions & 2) === 0) {
@@ -41391,18 +45012,18 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(98);
- context.enableEmitNotification(150);
- context.enableEmitNotification(149);
context.enableEmitNotification(151);
+ context.enableEmitNotification(150);
context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(186);
context.enableEmitNotification(185);
- context.enableEmitNotification(184);
- context.enableEmitNotification(225);
+ context.enableEmitNotification(227);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
if (ts.isIdentifier(node)) {
@@ -41414,7 +45035,7 @@ var ts;
if (enabledSubstitutions & 2) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
- return ts.getGeneratedNameForNode(original);
+ return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
}
}
return node;
@@ -41422,10 +45043,10 @@ var ts;
function isNameOfDeclarationWithCollidingName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 174:
- case 226:
- case 229:
- case 223:
+ case 175:
+ case 228:
+ case 231:
+ case 225:
return parent.name === node
&& resolver.isDeclarationWithCollidingName(parent);
}
@@ -41444,16 +45065,15 @@ var ts;
if (enabledSubstitutions & 2) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
if (declaration) {
- return ts.getGeneratedNameForNode(declaration.name);
+ return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
}
}
return node;
}
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
- && enclosingFunction
- && ts.getEmitFlags(enclosingFunction) & 8) {
- return ts.createIdentifier("_this", node);
+ && hierarchyFacts & 16) {
+ return ts.setTextRange(ts.createIdentifier("_this"), node);
}
return node;
}
@@ -41469,11 +45089,11 @@ var ts;
return false;
}
var statement = ts.firstOrUndefined(constructor.body.statements);
- if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 207) {
+ if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) {
return false;
}
var statementExpression = statement.expression;
- if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 179) {
+ if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) {
return false;
}
var callTarget = statementExpression.expression;
@@ -41481,7 +45101,7 @@ var ts;
return false;
}
var callArgument = ts.singleOrUndefined(statementExpression.arguments);
- if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 196) {
+ if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) {
return false;
}
var expression = callArgument.expression;
@@ -41500,18 +45120,90 @@ var ts;
name: "typescript:extends",
scoped: false,
priority: 0,
- text: "\n var __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };"
+ text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
};
})(ts || (ts = {}));
var ts;
(function (ts) {
- var instructionNames = ts.createMap((_a = {},
- _a[2] = "return",
- _a[3] = "break",
- _a[4] = "yield",
- _a[5] = "yield*",
- _a[7] = "endfinally",
- _a));
+ function transformES5(context) {
+ var compilerOptions = context.getCompilerOptions();
+ var previousOnEmitNode;
+ var noSubstitution;
+ if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) {
+ previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ context.enableEmitNotification(250);
+ context.enableEmitNotification(251);
+ context.enableEmitNotification(249);
+ noSubstitution = [];
+ }
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableSubstitution(178);
+ context.enableSubstitution(260);
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ return node;
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ switch (node.kind) {
+ case 250:
+ case 251:
+ case 249:
+ var tagName = node.tagName;
+ noSubstitution[ts.getOriginalNodeId(tagName)] = true;
+ break;
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ if (node.id && noSubstitution && noSubstitution[node.id]) {
+ return previousOnSubstituteNode(hint, node);
+ }
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isPropertyAccessExpression(node)) {
+ return substitutePropertyAccessExpression(node);
+ }
+ else if (ts.isPropertyAssignment(node)) {
+ return substitutePropertyAssignment(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ var literalName = trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.setTextRange(ts.createElementAccess(node.expression, literalName), node);
+ }
+ return node;
+ }
+ function substitutePropertyAssignment(node) {
+ var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ }
+ return node;
+ }
+ function trySubstituteReservedName(name) {
+ var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
+ if (token >= 71 && token <= 106) {
+ return ts.setTextRange(ts.createLiteral(name), name);
+ }
+ return undefined;
+ }
+ }
+ ts.transformES5 = transformES5;
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ function getInstructionName(instruction) {
+ switch (instruction) {
+ case 2: return "return";
+ case 3: return "break";
+ case 4: return "yield";
+ case 5: return "yield*";
+ case 7: return "endfinally";
+ }
+ }
function transformGenerators(context) {
var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistFunctionDeclaration = context.hoistFunctionDeclaration, hoistVariableDeclaration = context.hoistVariableDeclaration;
var compilerOptions = context.getCompilerOptions();
@@ -41577,13 +45269,13 @@ var ts;
}
function visitJavaScriptInStatementContainingYield(node) {
switch (node.kind) {
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
default:
return visitJavaScriptInGeneratorFunctionBody(node);
@@ -41591,24 +45283,24 @@ var ts;
}
function visitJavaScriptInGeneratorFunctionBody(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 151:
case 152:
+ case 153:
return visitAccessorDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 215:
+ case 217:
return visitBreakStatement(node);
- case 214:
- return visitContinueStatement(node);
case 216:
+ return visitContinueStatement(node);
+ case 218:
return visitReturnStatement(node);
default:
if (node.transformFlags & 16777216) {
@@ -41624,21 +45316,21 @@ var ts;
}
function visitJavaScriptContainingYield(node) {
switch (node.kind) {
- case 192:
- return visitBinaryExpression(node);
case 193:
+ return visitBinaryExpression(node);
+ case 194:
return visitConditionalExpression(node);
- case 195:
+ case 196:
return visitYieldExpression(node);
- case 175:
- return visitArrayLiteralExpression(node);
case 176:
+ return visitArrayLiteralExpression(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 178:
- return visitElementAccessExpression(node);
case 179:
- return visitCallExpression(node);
+ return visitElementAccessExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -41646,9 +45338,9 @@ var ts;
}
function visitGenerator(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -41656,8 +45348,8 @@ var ts;
}
}
function visitFunctionDeclaration(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -41677,8 +45369,8 @@ var ts;
}
}
function visitFunctionExpression(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -41730,7 +45422,7 @@ var ts;
operationLocations = undefined;
state = ts.createTempVariable(undefined);
resumeLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ var statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
transformAndEmitStatements(body.statements, statementOffset);
var buildResult = build();
ts.addRange(statements, endLexicalEnvironment());
@@ -41748,7 +45440,7 @@ var ts;
operationArguments = savedOperationArguments;
operationLocations = savedOperationLocations;
state = savedState;
- return ts.createBlock(statements, body, body.multiLine);
+ return ts.setTextRange(ts.createBlock(statements, body.multiLine), body);
}
function visitVariableStatement(node) {
if (node.transformFlags & 16777216) {
@@ -41805,10 +45497,10 @@ var ts;
if (containsYield(right)) {
var target = void 0;
switch (left.kind) {
- case 177:
+ case 178:
target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
break;
- case 178:
+ case 179:
target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
break;
default:
@@ -41817,7 +45509,7 @@ var ts;
}
var operator = node.operatorToken.kind;
if (isCompoundAssignment(operator)) {
- return ts.createBinary(target, 57, ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression), node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.setTextRange(ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression)), node)), node);
}
else {
return ts.updateBinary(node, target, ts.visitNode(right, visitor, ts.isExpression));
@@ -41833,10 +45525,10 @@ var ts;
else if (node.operatorToken.kind === 25) {
return visitCommaExpression(node);
}
- var clone_4 = ts.getMutableClone(node);
- clone_4.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
- clone_4.right = ts.visitNode(node.right, visitor, ts.isExpression);
- return clone_4;
+ var clone_5 = ts.getMutableClone(node);
+ clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
+ clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression);
+ return clone_5;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -41892,38 +45584,43 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- emitYieldStar(expression, node);
+ var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ ? ts.createValuesHelper(context, expression, node)
+ : expression;
+ emitYieldStar(iterator, node);
}
else {
emitYield(expression, node);
}
markLabel(resumeLabel);
- return createGeneratorResume();
+ return createGeneratorResume(node);
}
function visitArrayLiteralExpression(node) {
return visitElements(node.elements, undefined, undefined, node.multiLine);
}
function visitElements(elements, leadingElement, location, multiLine) {
var numInitialElements = countInitialNodesWithoutYield(elements);
- var temp = declareLocal();
- var hasAssignedTemp = false;
+ var temp;
if (numInitialElements > 0) {
+ temp = declareLocal();
var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
emitAssignment(temp, ts.createArrayLiteral(leadingElement
? [leadingElement].concat(initialElements) : initialElements));
leadingElement = undefined;
- hasAssignedTemp = true;
}
var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
- return hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, location, multiLine);
+ return temp
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location);
function reduceElement(expressions, element) {
if (containsYield(element) && expressions.length > 0) {
+ var hasAssignedTemp = temp !== undefined;
+ if (!temp) {
+ temp = declareLocal();
+ }
emitAssignment(temp, hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, undefined, multiLine));
- hasAssignedTemp = true;
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine));
leadingElement = undefined;
expressions = [];
}
@@ -41936,7 +45633,7 @@ var ts;
var multiLine = node.multiLine;
var numInitialProperties = countInitialNodesWithoutYield(properties);
var temp = declareLocal();
- emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, multiLine));
+ emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), multiLine));
var expressions = ts.reduceLeft(properties, reduceProperty, [], numInitialProperties);
expressions.push(multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
return ts.inlineExpressions(expressions);
@@ -41958,10 +45655,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- var clone_5 = ts.getMutableClone(node);
- clone_5.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
- clone_5.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
- return clone_5;
+ var clone_6 = ts.getMutableClone(node);
+ clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
+ clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
+ return clone_6;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -41975,7 +45672,7 @@ var ts;
function visitNewExpression(node) {
if (ts.forEach(node.arguments, containsYield)) {
var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.setOriginalNode(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, [], node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, []), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -42004,38 +45701,38 @@ var ts;
}
function transformAndEmitStatementWorker(node) {
switch (node.kind) {
- case 204:
+ case 206:
return transformAndEmitBlock(node);
- case 207:
+ case 209:
return transformAndEmitExpressionStatement(node);
- case 208:
+ case 210:
return transformAndEmitIfStatement(node);
- case 209:
+ case 211:
return transformAndEmitDoStatement(node);
- case 210:
+ case 212:
return transformAndEmitWhileStatement(node);
- case 211:
+ case 213:
return transformAndEmitForStatement(node);
- case 212:
- return transformAndEmitForInStatement(node);
case 214:
+ return transformAndEmitForInStatement(node);
+ case 216:
return transformAndEmitContinueStatement(node);
- case 215:
+ case 217:
return transformAndEmitBreakStatement(node);
- case 216:
+ case 218:
return transformAndEmitReturnStatement(node);
- case 217:
+ case 219:
return transformAndEmitWithStatement(node);
- case 218:
+ case 220:
return transformAndEmitSwitchStatement(node);
- case 219:
+ case 221:
return transformAndEmitLabeledStatement(node);
- case 220:
+ case 222:
return transformAndEmitThrowStatement(node);
- case 221:
+ case 223:
return transformAndEmitTryStatement(node);
default:
- return emitStatement(ts.visitNode(node, visitor, ts.isStatement, true));
+ return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
}
}
function transformAndEmitBlock(node) {
@@ -42052,7 +45749,9 @@ var ts;
function transformAndEmitVariableDeclarationList(node) {
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
- hoistVariableDeclaration(variable.name);
+ var name = ts.getSynthesizedClone(variable.name);
+ ts.setCommentRange(name, variable.name);
+ hoistVariableDeclaration(name);
}
var variables = ts.getInitializedVariables(node);
var numVariables = variables.length;
@@ -42082,7 +45781,7 @@ var ts;
if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {
var endLabel = defineLabel();
var elseLabel = node.elseStatement ? defineLabel() : undefined;
- emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression));
+ emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression), node.expression);
transformAndEmitEmbeddedStatement(node.thenStatement);
if (node.elseStatement) {
emitBreak(endLabel);
@@ -42161,7 +45860,7 @@ var ts;
transformAndEmitVariableDeclarationList(initializer);
}
else {
- emitStatement(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression), initializer));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression)), initializer));
}
}
markLabel(conditionLabel);
@@ -42171,7 +45870,7 @@ var ts;
transformAndEmitEmbeddedStatement(node.statement);
markLabel(incrementLabel);
if (node.incrementor) {
- emitStatement(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression), node.incrementor));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression)), node.incrementor));
}
emitBreak(conditionLabel);
endLoopBlock();
@@ -42185,7 +45884,7 @@ var ts;
beginScriptLoopBlock();
}
var initializer = node.initializer;
- if (ts.isVariableDeclarationList(initializer)) {
+ if (initializer && ts.isVariableDeclarationList(initializer)) {
for (var _i = 0, _a = initializer.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
@@ -42193,7 +45892,7 @@ var ts;
var variables = ts.getInitializedVariables(initializer);
node = ts.updateFor(node, variables.length > 0
? ts.inlineExpressions(ts.map(variables, transformInitializedVariable))
- : undefined, ts.visitNode(node.condition, visitor, ts.isExpression, true), ts.visitNode(node.incrementor, visitor, ts.isExpression, true), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -42251,7 +45950,7 @@ var ts;
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
}
- node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -42290,10 +45989,10 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function transformAndEmitReturnStatement(node) {
- emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function visitReturnStatement(node) {
- return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function transformAndEmitWithStatement(node) {
if (containsYield(node)) {
@@ -42316,7 +46015,7 @@ var ts;
for (var i = 0; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
clauseLabels.push(defineLabel());
- if (clause.kind === 254 && defaultClauseIndex === -1) {
+ if (clause.kind === 257 && defaultClauseIndex === -1) {
defaultClauseIndex = i;
}
}
@@ -42326,7 +46025,7 @@ var ts;
var defaultClausesSkipped = 0;
for (var i = clausesWritten; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseClause = clause;
if (containsYield(caseClause.expression) && pendingClauses.length > 0) {
break;
@@ -42428,9 +46127,9 @@ var ts;
}
return -1;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -42442,17 +46141,17 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (renamedCatchVariables && ts.hasProperty(renamedCatchVariables, node.text)) {
+ if (!ts.isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
var original = ts.getOriginalNode(node);
if (ts.isIdentifier(original) && original.parent) {
var declaration = resolver.getReferencedValueDeclaration(original);
if (declaration) {
- var name_36 = ts.getProperty(renamedCatchVariableDeclarations, String(ts.getOriginalNodeId(declaration)));
- if (name_36) {
- var clone_6 = ts.getMutableClone(name_36);
- ts.setSourceMapRange(clone_6, node);
- ts.setCommentRange(clone_6, node);
- return clone_6;
+ var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
+ if (name) {
+ var clone_7 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_7, node);
+ ts.setCommentRange(clone_7, node);
+ return clone_7;
}
}
}
@@ -42461,7 +46160,7 @@ var ts;
}
function cacheExpression(node) {
var temp;
- if (ts.isGeneratedIdentifier(node)) {
+ if (ts.isGeneratedIdentifier(node) || ts.getEmitFlags(node) & 4096) {
return node;
}
temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -42553,15 +46252,22 @@ var ts;
}
function beginCatchBlock(variable) {
ts.Debug.assert(peekBlockKind() === 0);
- var text = variable.name.text;
- var name = declareLocal(text);
- if (!renamedCatchVariables) {
- renamedCatchVariables = ts.createMap();
- renamedCatchVariableDeclarations = ts.createMap();
- context.enableSubstitution(70);
+ var name;
+ if (ts.isGeneratedIdentifier(variable.name)) {
+ name = variable.name;
+ hoistVariableDeclaration(variable.name);
+ }
+ else {
+ var text = variable.name.text;
+ name = declareLocal(text);
+ if (!renamedCatchVariables) {
+ renamedCatchVariables = ts.createMap();
+ renamedCatchVariableDeclarations = [];
+ context.enableSubstitution(70);
+ }
+ renamedCatchVariables.set(text, true);
+ renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
}
- renamedCatchVariables[text] = true;
- renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
var exception = peekBlock();
ts.Debug.assert(exception.state < 1);
var endLabel = exception.endLabel;
@@ -42761,23 +46467,23 @@ var ts;
}
function createInstruction(instruction) {
var literal = ts.createLiteral(instruction);
- literal.trailingComment = instructionNames[instruction];
+ ts.addSyntheticTrailingComment(literal, 3, getInstructionName(instruction));
return literal;
}
function createInlineBreak(label, location) {
ts.Debug.assert(label > 0, "Invalid label: " + label);
- return ts.createReturn(ts.createArrayLiteral([
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), location);
+ ])), location);
}
function createInlineReturn(expression, location) {
- return ts.createReturn(ts.createArrayLiteral(expression
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), location);
+ : [createInstruction(2)])), location);
}
function createGeneratorResume(location) {
- return ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, [], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, []), location);
}
function emitNop() {
emitWorker(0);
@@ -42843,7 +46549,7 @@ var ts;
currentExceptionBlock = undefined;
withBlockStack = undefined;
var buildResult = buildStatements();
- return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, undefined, buildResult.length > 0)), 262144));
+ return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, buildResult.length > 0)), 262144));
}
function buildStatements() {
if (operations) {
@@ -43052,51 +46758,51 @@ var ts;
}
}
function writeAssign(left, right, operationLocation) {
- writeStatement(ts.createStatement(ts.createAssignment(left, right), operationLocation));
+ writeStatement(ts.setTextRange(ts.createStatement(ts.createAssignment(left, right)), operationLocation));
}
function writeThrow(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createThrow(expression, operationLocation));
+ writeStatement(ts.setTextRange(ts.createThrow(expression), operationLocation));
}
function writeReturn(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), operationLocation));
+ : [createInstruction(2)])), operationLocation), 384));
}
function writeBreak(label, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeBreakWhenTrue(label, condition, operationLocation) {
- writeStatement(ts.createIf(condition, ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(condition, ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeBreakWhenFalse(label, condition, operationLocation) {
- writeStatement(ts.createIf(ts.createLogicalNot(condition), ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(ts.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeYield(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(4), expression]
- : [createInstruction(4)]), operationLocation));
+ : [createInstruction(4)])), operationLocation), 384));
}
function writeYieldStar(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(5),
expression
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeEndfinally() {
lastOperationWasAbrupt = true;
@@ -43114,112 +46820,595 @@ var ts;
name: "typescript:generator",
scoped: false,
priority: 6,
- text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;\n return { next: verb(0), \"throw\": verb(1), \"return\": verb(2) };\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
+ text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
};
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function transformES5(context) {
+ function transformModule(context) {
+ function getTransformModuleDelegate(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.AMD: return transformAMDModule;
+ case ts.ModuleKind.UMD: return transformUMDModule;
+ default: return transformCommonJSModule;
+ }
+ }
+ var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var compilerOptions = context.getCompilerOptions();
+ var resolver = context.getEmitResolver();
+ var host = context.getEmitHost();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
var previousOnSubstituteNode = context.onSubstituteNode;
+ var previousOnEmitNode = context.onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
- context.enableSubstitution(257);
+ context.onEmitNode = onEmitNode;
+ context.enableSubstitution(70);
+ context.enableSubstitution(193);
+ context.enableSubstitution(191);
+ context.enableSubstitution(192);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
+ var currentSourceFile;
+ var currentModuleInfo;
+ var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- return node;
+ if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ return node;
+ }
+ currentSourceFile = node;
+ currentModuleInfo = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
+ moduleInfoMap[ts.getOriginalNodeId(node)] = currentModuleInfo;
+ var transformModule = getTransformModuleDelegate(moduleKind);
+ var updated = transformModule(node);
+ currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ return ts.aggregateTransformFlags(updated);
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isPropertyAccessExpression(node)) {
- return substitutePropertyAccessExpression(node);
+ function shouldEmitUnderscoreUnderscoreESModule() {
+ if (!currentModuleInfo.exportEquals && ts.isExternalModule(currentSourceFile)) {
+ return true;
}
- else if (ts.isPropertyAssignment(node)) {
- return substitutePropertyAssignment(node);
+ return false;
+ }
+ function transformCommonJSModule(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- return node;
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ addExportEqualsIfNeeded(statements, false);
+ ts.addRange(statements, endLexicalEnvironment());
+ var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ ts.addEmitHelper(updated, exportStarHelper);
+ }
+ return updated;
}
- function substitutePropertyAccessExpression(node) {
- var literalName = trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.createElementAccess(node.expression, literalName, node);
+ function transformAMDModule(node) {
+ var define = ts.createIdentifier("define");
+ var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
+ var _a = collectAsynchronousDependencies(node, true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(define, undefined, (moduleName ? [moduleName] : []).concat([
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createFunctionExpression(undefined, undefined, undefined, undefined, [
+ ts.createParameter(undefined, undefined, undefined, "require"),
+ ts.createParameter(undefined, undefined, undefined, "exports")
+ ].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
+ ])))
+ ]), node.statements));
+ }
+ function transformUMDModule(node) {
+ var _a = collectAsynchronousDependencies(node, false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ var umdHeader = ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, "factory")], undefined, ts.setTextRange(ts.createBlock([
+ ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("module"), "object"), ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), "object")), ts.createBlock([
+ ts.createVariableStatement(undefined, [
+ ts.createVariableDeclaration("v", undefined, ts.createCall(ts.createIdentifier("factory"), undefined, [
+ ts.createIdentifier("require"),
+ ts.createIdentifier("exports")
+ ]))
+ ]),
+ ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1)
+ ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([
+ ts.createStatement(ts.createCall(ts.createIdentifier("define"), undefined, [
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createIdentifier("factory")
+ ]))
+ ])))
+ ], true), undefined));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(umdHeader, undefined, [
+ ts.createFunctionExpression(undefined, undefined, undefined, undefined, [
+ ts.createParameter(undefined, undefined, undefined, "require"),
+ ts.createParameter(undefined, undefined, undefined, "exports")
+ ].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
+ ]))
+ ]), node.statements));
+ }
+ function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
+ var aliasedModuleNames = [];
+ var unaliasedModuleNames = [];
+ var importAliasNames = [];
+ for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
+ var amdDependency = _a[_i];
+ if (amdDependency.name) {
+ aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ importAliasNames.push(ts.createParameter(undefined, undefined, undefined, amdDependency.name));
+ }
+ else {
+ unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ }
}
- return node;
+ for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
+ var importNode = _c[_b];
+ var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
+ if (externalModuleName) {
+ if (includeNonAmdDependencies && importAliasName) {
+ ts.setEmitFlags(importAliasName, 4);
+ aliasedModuleNames.push(externalModuleName);
+ importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
+ }
+ else {
+ unaliasedModuleNames.push(externalModuleName);
+ }
+ }
+ }
+ return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
}
- function substitutePropertyAssignment(node) {
- var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ function transformAsynchronousModuleBody(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- return node;
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ addExportEqualsIfNeeded(statements, true);
+ ts.addRange(statements, endLexicalEnvironment());
+ var body = ts.createBlock(statements, true);
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ ts.addEmitHelper(body, exportStarHelper);
+ }
+ return body;
}
- function trySubstituteReservedName(name) {
- var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
- if (token >= 71 && token <= 106) {
- return ts.createLiteral(name, name);
+ function addExportEqualsIfNeeded(statements, emitAsReturn) {
+ if (currentModuleInfo.exportEquals) {
+ if (emitAsReturn) {
+ var statement = ts.createReturn(currentModuleInfo.exportEquals.expression);
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 384 | 1536);
+ statements.push(statement);
+ }
+ else {
+ var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression));
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 1536);
+ statements.push(statement);
+ }
}
- return undefined;
}
- }
- ts.transformES5 = transformES5;
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- function transformES2015Module(context) {
- var compilerOptions = context.getCompilerOptions();
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- context.enableEmitNotification(261);
- context.enableSubstitution(70);
- var currentSourceFile;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
+ function sourceElementVisitor(node) {
+ switch (node.kind) {
+ case 237:
+ return visitImportDeclaration(node);
+ case 236:
+ return visitImportEqualsDeclaration(node);
+ case 243:
+ return visitExportDeclaration(node);
+ case 242:
+ return visitExportAssignment(node);
+ case 207:
+ return visitVariableStatement(node);
+ case 227:
+ return visitFunctionDeclaration(node);
+ case 228:
+ return visitClassDeclaration(node);
+ case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
+ return visitEndOfDeclarationMarker(node);
+ default:
+ return node;
}
- if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
- var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
- if (externalHelpersModuleName) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements);
- ts.append(statements, ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
- ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ }
+ function visitImportDeclaration(node) {
+ var statements;
+ var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (!node.importClause) {
+ return ts.setTextRange(ts.createStatement(createRequireCall(node)), node);
}
else {
- return ts.visitEachChild(node, visitor, context);
+ var variables = [];
+ if (namespaceDeclaration && !ts.isDefaultImport(node)) {
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, createRequireCall(node)));
+ }
+ else {
+ variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node), undefined, createRequireCall(node)));
+ if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)));
+ }
+ }
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, languageVersion >= 2 ? 2 : 0)), node));
}
}
+ else if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)), node)
+ ], languageVersion >= 2 ? 2 : 0)));
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function createRequireCall(importNode) {
+ var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ var args = [];
+ if (moduleName) {
+ args.push(moduleName);
+ }
+ return ts.createCall(ts.createIdentifier("require"), undefined, args);
+ }
+ function visitImportEqualsDeclaration(node) {
+ ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
+ var statements;
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (ts.hasModifier(node, 1)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(node.name, createRequireCall(node))), node));
+ }
+ else {
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getSynthesizedClone(node.name), undefined, createRequireCall(node))
+ ], languageVersion >= 2 ? 2 : 0)), node));
+ }
+ }
+ else {
+ if (ts.hasModifier(node, 1)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node))), node));
+ }
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportEqualsDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function visitExportDeclaration(node) {
+ if (!node.moduleSpecifier) {
+ return undefined;
+ }
+ var generatedName = ts.getGeneratedNameForNode(node);
+ if (node.exportClause) {
+ var statements = [];
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(generatedName, undefined, createRequireCall(node))
+ ])), node));
+ }
+ for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
+ var specifier = _a[_i];
+ var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
+ statements.push(ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier));
+ }
+ return ts.singleOrMany(statements);
+ }
+ else {
+ return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
+ moduleKind !== ts.ModuleKind.AMD
+ ? createRequireCall(node)
+ : generatedName
+ ])), node);
+ }
+ }
+ function visitExportAssignment(node) {
+ if (node.isExportEquals) {
+ return undefined;
+ }
+ var statements;
+ var original = node.original;
+ if (original && hasAssociatedEndOfDeclarationMarker(original)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, node, true);
+ }
+ else {
+ statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, node, true);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function visitFunctionDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body), node), node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function visitClassDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members), node), node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function visitVariableStatement(node) {
+ var statements;
+ var variables;
+ var expressions;
+ if (ts.hasModifier(node, 1)) {
+ var modifiers = void 0;
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var variable = _a[_i];
+ if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
+ if (!modifiers) {
+ modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
+ }
+ variables = ts.append(variables, variable);
+ }
+ else if (variable.initializer) {
+ expressions = ts.append(expressions, transformInitializedVariable(variable));
+ }
+ }
+ if (variables) {
+ statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
+ }
+ if (expressions) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
+ }
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfVariableStatement(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ function transformInitializedVariable(node) {
+ if (ts.isBindingPattern(node.name)) {
+ return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
+ }
+ else {
+ return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), node.name), node.initializer);
+ }
+ }
+ function visitMergeDeclarationMarker(node) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
+ }
return node;
}
- function visitor(node) {
+ function hasAssociatedEndOfDeclarationMarker(node) {
+ return (ts.getEmitFlags(node) & 2097152) !== 0;
+ }
+ function visitEndOfDeclarationMarker(node) {
+ var id = ts.getOriginalNodeId(node);
+ var statements = deferredExports[id];
+ if (statements) {
+ delete deferredExports[id];
+ return ts.append(statements, node);
+ }
+ return node;
+ }
+ function appendExportsOfImportDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ var importClause = decl.importClause;
+ if (!importClause) {
+ return statements;
+ }
+ if (importClause.name) {
+ statements = appendExportsOfDeclaration(statements, importClause);
+ }
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings) {
+ switch (namedBindings.kind) {
+ case 239:
+ statements = appendExportsOfDeclaration(statements, namedBindings);
+ break;
+ case 240:
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var importBinding = _a[_i];
+ statements = appendExportsOfDeclaration(statements, importBinding);
+ }
+ break;
+ }
+ }
+ return statements;
+ }
+ function appendExportsOfImportEqualsDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ return appendExportsOfDeclaration(statements, decl);
+ }
+ function appendExportsOfVariableStatement(statements, node) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ statements = appendExportsOfBindingElement(statements, decl);
+ }
+ return statements;
+ }
+ function appendExportsOfBindingElement(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.isBindingPattern(decl.name)) {
+ for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ if (!ts.isOmittedExpression(element)) {
+ statements = appendExportsOfBindingElement(statements, element);
+ }
+ }
+ }
+ else if (!ts.isGeneratedIdentifier(decl.name)) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ function appendExportsOfHoistedDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.hasModifier(decl, 1)) {
+ var exportName = ts.hasModifier(decl, 512) ? ts.createIdentifier("default") : decl.name;
+ statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), decl);
+ }
+ if (decl.name) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ function appendExportsOfDeclaration(statements, decl) {
+ var name = ts.getDeclarationName(decl);
+ var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name.text);
+ if (exportSpecifiers) {
+ for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
+ var exportSpecifier = exportSpecifiers_1[_i];
+ statements = appendExportStatement(statements, exportSpecifier.name, name, exportSpecifier.name);
+ }
+ }
+ return statements;
+ }
+ function appendExportStatement(statements, exportName, expression, location, allowComments) {
+ statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
+ return statements;
+ }
+ function createUnderscoreUnderscoreESModule() {
+ var statement;
+ if (languageVersion === 0) {
+ statement = ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true)));
+ }
+ else {
+ statement = ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
+ ts.createIdentifier("exports"),
+ ts.createLiteral("__esModule"),
+ ts.createObjectLiteral([
+ ts.createPropertyAssignment("value", ts.createLiteral(true))
+ ])
+ ]));
+ }
+ ts.setEmitFlags(statement, 524288);
+ return statement;
+ }
+ function createExportStatement(name, value, location, allowComments) {
+ var statement = ts.setTextRange(ts.createStatement(createExportExpression(name, value)), location);
+ ts.startOnNewLine(statement);
+ if (!allowComments) {
+ ts.setEmitFlags(statement, 1536);
+ }
+ return statement;
+ }
+ function createExportExpression(name, value, location) {
+ return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location);
+ }
+ function modifierVisitor(node) {
switch (node.kind) {
- case 234:
+ case 83:
+ case 78:
return undefined;
- case 240:
- return visitExportAssignment(node);
}
return node;
}
- function visitExportAssignment(node) {
- return node.isExportEquals ? undefined : node;
- }
- function onEmitNode(emitContext, node, emitCallback) {
- if (ts.isSourceFile(node)) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
currentSourceFile = node;
- previousOnEmitNode(emitContext, node, emitCallback);
+ currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
+ noSubstitution = [];
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isIdentifier(node) && emitContext === 1) {
- return substituteExpressionIdentifier(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (node.id && noSubstitution[node.id]) {
+ return node;
+ }
+ if (hint === 1) {
+ return substituteExpression(node);
+ }
+ else if (ts.isShorthandPropertyAssignment(node)) {
+ return substituteShorthandPropertyAssignment(node);
+ }
+ return node;
+ }
+ function substituteShorthandPropertyAssignment(node) {
+ var name = node.name;
+ var exportedOrImportedName = substituteExpressionIdentifier(name);
+ if (exportedOrImportedName !== name) {
+ if (node.objectAssignmentInitializer) {
+ var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
+ }
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedOrImportedName), node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 70:
+ return substituteExpressionIdentifier(node);
+ case 193:
+ return substituteBinaryExpression(node);
+ case 192:
+ case 191:
+ return substituteUnaryExpression(node);
}
return node;
}
@@ -43229,11 +47418,83 @@ var ts;
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
+ return node;
+ }
+ if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
+ var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
+ if (exportContainer && exportContainer.kind === 264) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node);
+ }
+ var importDeclaration = resolver.getReferencedImportDeclaration(node);
+ if (importDeclaration) {
+ if (ts.isImportClause(importDeclaration)) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
+ }
+ else if (ts.isImportSpecifier(importDeclaration)) {
+ var name = importDeclaration.propertyName || importDeclaration.name;
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name)), node);
+ }
+ }
}
return node;
}
+ function substituteBinaryExpression(node) {
+ if (ts.isAssignmentOperator(node.operatorToken.kind)
+ && ts.isIdentifier(node.left)
+ && !ts.isGeneratedIdentifier(node.left)
+ && !ts.isLocalName(node.left)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
+ var exportedNames = getExports(node.left);
+ if (exportedNames) {
+ var expression = node;
+ for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
+ var exportName = exportedNames_1[_i];
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression, node);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ function substituteUnaryExpression(node) {
+ if ((node.operator === 42 || node.operator === 43)
+ && ts.isIdentifier(node.operand)
+ && !ts.isGeneratedIdentifier(node.operand)
+ && !ts.isLocalName(node.operand)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
+ var exportedNames = getExports(node.operand);
+ if (exportedNames) {
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node)
+ : node;
+ for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
+ var exportName = exportedNames_2[_i];
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ function getExports(name) {
+ if (!ts.isGeneratedIdentifier(name)) {
+ var valueDeclaration = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
+ if (valueDeclaration) {
+ return currentModuleInfo
+ && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
+ }
+ }
+ }
}
- ts.transformES2015Module = transformES2015Module;
+ ts.transformModule = transformModule;
+ var exportStarHelper = {
+ name: "typescript:export-star",
+ scoped: true,
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
+ };
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -43247,14 +47508,14 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
+ context.enableSubstitution(193);
context.enableSubstitution(191);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
- var exportFunctionsMap = ts.createMap();
- var noSubstitutionMap = ts.createMap();
+ context.enableSubstitution(192);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
+ var exportFunctionsMap = [];
+ var noSubstitutionMap = [];
var currentSourceFile;
var moduleInfo;
var exportFunction;
@@ -43273,7 +47534,8 @@ var ts;
currentSourceFile = node;
enclosingBlockScopedContainer = node;
moduleInfo = moduleInfoMap[id] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- exportFunction = exportFunctionsMap[id] = ts.createUniqueName("exports");
+ exportFunction = ts.createUniqueName("exports");
+ exportFunctionsMap[id] = exportFunction;
contextObject = ts.createUniqueName("context");
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
@@ -43283,11 +47545,11 @@ var ts;
], undefined, moduleBodyBlock);
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
var dependencies = ts.createArrayLiteral(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray([
+ var updated = ts.setEmitFlags(ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("System"), "register"), undefined, moduleName
? [moduleName, dependencies, moduleBodyFunction]
: [dependencies, moduleBodyFunction]))
- ], node.statements));
+ ]), node.statements)), 1024);
if (!(compilerOptions.outFile || compilerOptions.out)) {
ts.moveEmitHelpers(updated, moduleBodyBlock, function (helper) { return !helper.scoped; });
}
@@ -43309,17 +47571,19 @@ var ts;
for (var i = 0; i < externalImports.length; i++) {
var externalImport = externalImports[i];
var externalModuleName = ts.getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions);
- var text = externalModuleName.text;
- if (ts.hasProperty(groupIndices, text)) {
- var groupIndex = groupIndices[text];
- dependencyGroups[groupIndex].externalImports.push(externalImport);
- }
- else {
- groupIndices[text] = dependencyGroups.length;
- dependencyGroups.push({
- name: externalModuleName,
- externalImports: [externalImport]
- });
+ if (externalModuleName) {
+ var text = externalModuleName.text;
+ var groupIndex = groupIndices.get(text);
+ if (groupIndex !== undefined) {
+ dependencyGroups[groupIndex].externalImports.push(externalImport);
+ }
+ else {
+ groupIndices.set(text, dependencyGroups.length);
+ dependencyGroups.push({
+ name: externalModuleName,
+ externalImports: [externalImport]
+ });
+ }
}
}
return dependencyGroups;
@@ -43327,30 +47591,33 @@ var ts;
function createSystemModuleBody(node, dependencyGroups) {
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("__moduleName", undefined, ts.createLogicalAnd(contextObject, ts.createPropertyAccess(contextObject, "id")))
])));
- ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true);
+ ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
var executeStatements = ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset);
ts.addRange(statements, hoistedStatements);
ts.addRange(statements, endLexicalEnvironment());
var exportStarFunction = addExportStarIfNeeded(statements);
- statements.push(ts.createReturn(ts.setMultiLine(ts.createObjectLiteral([
+ var moduleObject = ts.createObjectLiteral([
ts.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
- ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, undefined, true)))
- ]), true)));
- return ts.createBlock(statements, undefined, true);
+ ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, true)))
+ ]);
+ moduleObject.multiLine = true;
+ statements.push(ts.createReturn(moduleObject));
+ return ts.createBlock(statements, true);
}
function addExportStarIfNeeded(statements) {
if (!moduleInfo.hasExportStarsToExportValues) {
return;
}
- if (!moduleInfo.exportedNames && ts.isEmpty(moduleInfo.exportSpecifiers)) {
+ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) {
var hasExportDeclarationWithExportClause = false;
for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
var externalImport = _a[_i];
- if (externalImport.kind === 241 && externalImport.exportClause) {
+ if (externalImport.kind === 243 && externalImport.exportClause) {
hasExportDeclarationWithExportClause = true;
break;
}
@@ -43368,12 +47635,12 @@ var ts;
if (exportedLocalName.text === "default") {
continue;
}
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createTrue()));
}
}
for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) {
var externalImport = _e[_d];
- if (externalImport.kind !== 241) {
+ if (externalImport.kind !== 243) {
continue;
}
var exportDecl = externalImport;
@@ -43382,12 +47649,12 @@ var ts;
}
for (var _f = 0, _g = exportDecl.exportClause.elements; _f < _g.length; _f++) {
var element = _g[_f];
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createTrue()));
}
}
var exportedNamesStorageRef = ts.createUniqueName("exportedNames");
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, undefined, true))
+ ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, true))
])));
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
statements.push(exportStarFunction);
@@ -43412,7 +47679,7 @@ var ts;
ts.setEmitFlags(ts.createIf(condition, ts.createStatement(ts.createAssignment(ts.createElementAccess(exports, n), ts.createElementAccess(m, n)))), 1)
])),
ts.createStatement(ts.createCall(exportFunction, undefined, [exports]))
- ], undefined, true));
+ ], true));
}
function createSettersArray(exportStarFunction, dependencyGroups) {
var setters = [];
@@ -43425,15 +47692,15 @@ var ts;
var entry = _b[_a];
var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile);
switch (entry.kind) {
- case 235:
+ case 237:
if (!entry.importClause) {
break;
}
- case 234:
+ case 236:
ts.Debug.assert(importVariableName !== undefined);
statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName)));
break;
- case 241:
+ case 243:
ts.Debug.assert(importVariableName !== undefined);
if (entry.exportClause) {
var properties = [];
@@ -43441,7 +47708,7 @@ var ts;
var e = _d[_c];
properties.push(ts.createPropertyAssignment(ts.createLiteral(e.name.text), ts.createElementAccess(parameterName, ts.createLiteral((e.propertyName || e.name).text))));
}
- statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, undefined, true)])));
+ statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, true)])));
}
else {
statements.push(ts.createStatement(ts.createCall(exportStarFunction, undefined, [parameterName])));
@@ -43449,19 +47716,19 @@ var ts;
break;
}
}
- setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, undefined, true)));
+ setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, true)));
}
- return ts.createArrayLiteral(setters, undefined, true);
+ return ts.createArrayLiteral(setters, true);
}
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 241:
+ case 243:
return undefined;
- case 240:
+ case 242:
return visitExportAssignment(node);
default:
return nestedElementVisitor(node);
@@ -43510,7 +47777,7 @@ var ts;
}
function visitFunctionDeclaration(node) {
if (ts.hasModifier(node, 1)) {
- hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
+ hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
}
else {
hoistedStatements = ts.append(hoistedStatements, node);
@@ -43528,7 +47795,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- statements = ts.append(statements, ts.createStatement(ts.createAssignment(name, ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement), node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -43556,7 +47823,7 @@ var ts;
}
var statements;
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
if (isMarkedDeclaration) {
var id = ts.getOriginalNodeId(node);
@@ -43582,7 +47849,7 @@ var ts;
}
function shouldHoistVariableDeclarationList(node) {
return (ts.getEmitFlags(node) & 1048576) === 0
- && (enclosingBlockScopedContainer.kind === 261
+ && (enclosingBlockScopedContainer.kind === 264
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
@@ -43600,11 +47867,11 @@ var ts;
function createVariableAssignment(name, value, location, isExportedDeclaration) {
hoistVariableDeclaration(ts.getSynthesizedClone(name));
return isExportedDeclaration
- ? createExportExpression(name, preventSubstitution(ts.createAssignment(name, value, location)))
- : preventSubstitution(ts.createAssignment(name, value, location));
+ ? createExportExpression(name, preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)))
+ : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location));
}
function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
var id = ts.getOriginalNodeId(node);
var isExportedDeclaration = ts.hasModifier(node.original, 1);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -43637,10 +47904,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237:
+ case 239:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238:
+ case 240:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -43710,10 +47977,10 @@ var ts;
return statements;
}
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = moduleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = moduleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
- var exportSpecifier = exportSpecifiers_1[_i];
+ for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
+ var exportSpecifier = exportSpecifiers_2[_i];
if (exportSpecifier.name.text !== excludeName) {
statements = appendExportStatement(statements, exportSpecifier.name, name);
}
@@ -43739,43 +48006,43 @@ var ts;
}
function nestedElementVisitor(node) {
switch (node.kind) {
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 213:
+ case 215:
return visitForOfStatement(node);
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
- case 217:
+ case 219:
return visitWithStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 232:
+ case 234:
return visitCaseBlock(node);
- case 253:
+ case 256:
return visitCaseClause(node);
- case 254:
+ case 257:
return visitDefaultClause(node);
- case 221:
+ case 223:
return visitTryStatement(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 204:
+ case 206:
return visitBlock(node);
- case 295:
- return visitMergeDeclarationMarker(node);
case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
return visitEndOfDeclarationMarker(node);
default:
return destructuringVisitor(node);
@@ -43784,21 +48051,21 @@ var ts;
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForInStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForOf(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -43807,6 +48074,9 @@ var ts;
&& shouldHoistVariableDeclarationList(node);
}
function visitForInitializer(node) {
+ if (!node) {
+ return node;
+ }
if (shouldHoistForInitializer(node)) {
var expressions = void 0;
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
@@ -43820,16 +48090,16 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
+ return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitLabeledStatement(node) {
- return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitSwitchStatement(node) {
return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
@@ -43866,7 +48136,7 @@ var ts;
}
function destructuringVisitor(node) {
if (node.transformFlags & 1024
- && node.kind === 192) {
+ && node.kind === 193) {
return visitDestructuringAssignment(node);
}
else if (node.transformFlags & 2048) {
@@ -43883,7 +48153,7 @@ var ts;
return ts.visitEachChild(node, destructuringVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
- if (ts.isAssignmentExpression(node)) {
+ if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
else if (ts.isSpreadExpression(node)) {
@@ -43903,7 +48173,7 @@ var ts;
}
else if (ts.isIdentifier(node)) {
var container = resolver.getReferencedExportContainer(node);
- return container !== undefined && container.kind === 261;
+ return container !== undefined && container.kind === 264;
}
else {
return false;
@@ -43917,8 +48187,8 @@ var ts;
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
var id = ts.getOriginalNodeId(node);
currentSourceFile = node;
moduleInfo = moduleInfoMap[id];
@@ -43927,22 +48197,22 @@ var ts;
if (noSubstitution) {
delete noSubstitutionMap[id];
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
moduleInfo = undefined;
exportFunction = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (isSubstitutionPrevented(node)) {
return node;
}
- if (emitContext === 1) {
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -43951,10 +48221,10 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 192:
+ case 193:
return substituteBinaryExpression(node);
- case 190:
case 191:
+ case 192:
return substituteUnaryExpression(node);
}
return node;
@@ -43971,10 +48241,10 @@ var ts;
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name)), node);
}
}
}
@@ -43989,8 +48259,8 @@ var ts;
var exportedNames = getExports(node.left);
if (exportedNames) {
var expression = node;
- for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
- var exportName = exportedNames_1[_i];
+ for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
+ var exportName = exportedNames_3[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
return expression;
@@ -44006,14 +48276,14 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createPrefix(node.operator, node.operand, node)
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node)
: node;
- for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
- var exportName = exportedNames_2[_i];
+ for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
+ var exportName = exportedNames_4[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
- if (node.kind === 191) {
+ if (node.kind === 192) {
expression = node.operator === 42
? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1))
: ts.createAdd(preventSubstitution(expression), ts.createLiteral(1));
@@ -44030,7 +48300,7 @@ var ts;
|| resolver.getReferencedValueDeclaration(name);
if (valueDeclaration) {
var exportContainer = resolver.getReferencedExportContainer(name, false);
- if (exportContainer && exportContainer.kind === 261) {
+ if (exportContainer && exportContainer.kind === 264) {
exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration));
}
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -44040,7 +48310,7 @@ var ts;
}
function preventSubstitution(node) {
if (noSubstitution === undefined)
- noSubstitution = ts.createMap();
+ noSubstitution = [];
noSubstitution[ts.getNodeId(node)] = true;
return node;
}
@@ -44052,550 +48322,61 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function transformModule(context) {
- var transformModuleDelegates = ts.createMap((_a = {},
- _a[ts.ModuleKind.None] = transformCommonJSModule,
- _a[ts.ModuleKind.CommonJS] = transformCommonJSModule,
- _a[ts.ModuleKind.AMD] = transformAMDModule,
- _a[ts.ModuleKind.UMD] = transformUMDModule,
- _a));
- var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ function transformES2015Module(context) {
var compilerOptions = context.getCompilerOptions();
- var resolver = context.getEmitResolver();
- var host = context.getEmitHost();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var moduleKind = ts.getEmitModuleKind(compilerOptions);
- var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableEmitNotification(264);
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
- context.enableSubstitution(191);
- context.enableSubstitution(258);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
var currentSourceFile;
- var currentModuleInfo;
- var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(node)] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- var transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ts.ModuleKind.None];
- var updated = transformModule(node);
- currentSourceFile = undefined;
- currentModuleInfo = undefined;
- return ts.aggregateTransformFlags(updated);
- }
- function transformCommonJSModule(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
- addExportEqualsIfNeeded(statements, false);
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
- ts.addEmitHelper(updated, exportStarHelper);
- }
- return updated;
- }
- function transformAMDModule(node) {
- var define = ts.createIdentifier("define");
- var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
- return transformAsynchronousModule(node, define, moduleName, true);
- }
- function transformUMDModule(node) {
- var define = ts.createRawExpression(umdHelper);
- return transformAsynchronousModule(node, define, undefined, false);
- }
- function transformAsynchronousModule(node, define, moduleName, includeNonAmdDependencies) {
- var _a = collectAsynchronousDependencies(node, includeNonAmdDependencies), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
- return ts.updateSourceFileNode(node, ts.createNodeArray([
- ts.createStatement(ts.createCall(define, undefined, (moduleName ? [moduleName] : []).concat([
- ts.createArrayLiteral([
- ts.createLiteral("require"),
- ts.createLiteral("exports")
- ].concat(aliasedModuleNames, unaliasedModuleNames)),
- ts.createFunctionExpression(undefined, undefined, undefined, undefined, [
- ts.createParameter(undefined, undefined, undefined, "require"),
- ts.createParameter(undefined, undefined, undefined, "exports")
- ].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
- ])))
- ], node.statements));
- }
- function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
- var aliasedModuleNames = [];
- var unaliasedModuleNames = [];
- var importAliasNames = [];
- for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
- var amdDependency = _a[_i];
- if (amdDependency.name) {
- aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- importAliasNames.push(ts.createParameter(undefined, undefined, undefined, amdDependency.name));
- }
- else {
- unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- }
- }
- for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
- var importNode = _c[_b];
- var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
- if (includeNonAmdDependencies && importAliasName) {
- ts.setEmitFlags(importAliasName, 4);
- aliasedModuleNames.push(externalModuleName);
- importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
- }
- else {
- unaliasedModuleNames.push(externalModuleName);
- }
- }
- return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
- }
- function transformAsynchronousModuleBody(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
- addExportEqualsIfNeeded(statements, true);
- var body = ts.createBlock(statements, undefined, true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
- ts.addEmitHelper(body, exportStarHelper);
- }
- return body;
- }
- function addExportEqualsIfNeeded(statements, emitAsReturn) {
- if (currentModuleInfo.exportEquals) {
- if (emitAsReturn) {
- var statement = ts.createReturn(currentModuleInfo.exportEquals.expression, currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 384 | 1536);
- statements.push(statement);
- }
- else {
- var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression), currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 1536);
- statements.push(statement);
- }
- }
- }
- function sourceElementVisitor(node) {
- switch (node.kind) {
- case 235:
- return visitImportDeclaration(node);
- case 234:
- return visitImportEqualsDeclaration(node);
- case 241:
- return visitExportDeclaration(node);
- case 240:
- return visitExportAssignment(node);
- case 205:
- return visitVariableStatement(node);
- case 225:
- return visitFunctionDeclaration(node);
- case 226:
- return visitClassDeclaration(node);
- case 295:
- return visitMergeDeclarationMarker(node);
- case 296:
- return visitEndOfDeclarationMarker(node);
- default:
- return node;
- }
- }
- function visitImportDeclaration(node) {
- var statements;
- var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (!node.importClause) {
- return ts.createStatement(createRequireCall(node), node);
- }
- else {
- var variables = [];
- if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, createRequireCall(node)));
- }
- else {
- variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node), undefined, createRequireCall(node)));
- if (namespaceDeclaration && ts.isDefaultImport(node)) {
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)));
- }
- }
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, undefined, languageVersion >= 2 ? 2 : 0), node));
- }
- }
- else if (namespaceDeclaration && ts.isDefaultImport(node)) {
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node), node)
- ], undefined, languageVersion >= 2 ? 2 : 0)));
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- function createRequireCall(importNode) {
- var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- var args = [];
- if (moduleName) {
- args.push(moduleName);
- }
- return ts.createCall(ts.createIdentifier("require"), undefined, args);
- }
- function visitImportEqualsDeclaration(node) {
- ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
- var statements;
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(node.name, createRequireCall(node)), node));
+ if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
+ var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
+ if (externalHelpersModuleName) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements);
+ ts.append(statements, ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
+ ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
else {
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(node.name), undefined, createRequireCall(node))
- ], undefined, languageVersion >= 2 ? 2 : 0), node));
- }
- }
- else {
- if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node)), node));
- }
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportEqualsDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- function visitExportDeclaration(node) {
- if (!node.moduleSpecifier) {
- return undefined;
- }
- var generatedName = ts.getGeneratedNameForNode(node);
- if (node.exportClause) {
- var statements = [];
- if (moduleKind !== ts.ModuleKind.AMD) {
- statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(generatedName, undefined, createRequireCall(node))
- ]), node));
- }
- for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
- var specifier = _a[_i];
- var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
- statements.push(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue), specifier));
- }
- return ts.singleOrMany(statements);
- }
- else {
- return ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ]), node);
- }
- }
- function visitExportAssignment(node) {
- if (node.isExportEquals) {
- return undefined;
- }
- var statements;
- var original = node.original;
- if (original && hasAssociatedEndOfDeclarationMarker(original)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, node, true);
- }
- else {
- statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, node, true);
- }
- return ts.singleOrMany(statements);
- }
- function visitFunctionDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body, node), node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- function visitClassDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members, node), node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- function visitVariableStatement(node) {
- var statements;
- var variables;
- var expressions;
- if (ts.hasModifier(node, 1)) {
- var modifiers = void 0;
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var variable = _a[_i];
- if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
- if (!modifiers) {
- modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
- }
- variables = ts.append(variables, variable);
- }
- else if (variable.initializer) {
- expressions = ts.append(expressions, transformInitializedVariable(variable));
- }
- }
- if (variables) {
- statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
- }
- if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ return ts.visitEachChild(node, visitor, context);
}
}
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfVariableStatement(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- function transformInitializedVariable(node) {
- if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
- }
- else {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name, node.name), node.initializer);
- }
- }
- function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
- }
- return node;
- }
- function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
- }
- function visitEndOfDeclarationMarker(node) {
- var id = ts.getOriginalNodeId(node);
- var statements = deferredExports[id];
- if (statements) {
- delete deferredExports[id];
- return ts.append(statements, node);
- }
return node;
}
- function appendExportsOfImportDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- var importClause = decl.importClause;
- if (!importClause) {
- return statements;
- }
- if (importClause.name) {
- statements = appendExportsOfDeclaration(statements, importClause);
- }
- var namedBindings = importClause.namedBindings;
- if (namedBindings) {
- switch (namedBindings.kind) {
- case 237:
- statements = appendExportsOfDeclaration(statements, namedBindings);
- break;
- case 238:
- for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
- var importBinding = _a[_i];
- statements = appendExportsOfDeclaration(statements, importBinding);
- }
- break;
- }
- }
- return statements;
- }
- function appendExportsOfImportEqualsDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- return appendExportsOfDeclaration(statements, decl);
- }
- function appendExportsOfVariableStatement(statements, node) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- statements = appendExportsOfBindingElement(statements, decl);
- }
- return statements;
- }
- function appendExportsOfBindingElement(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.isBindingPattern(decl.name)) {
- for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
- var element = _a[_i];
- if (!ts.isOmittedExpression(element)) {
- statements = appendExportsOfBindingElement(statements, element);
- }
- }
- }
- else if (!ts.isGeneratedIdentifier(decl.name)) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- function appendExportsOfHoistedDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.hasModifier(decl, 1)) {
- var exportName = ts.hasModifier(decl, 512) ? ts.createIdentifier("default") : decl.name;
- statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), decl);
- }
- if (decl.name) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- function appendExportsOfDeclaration(statements, decl) {
- var name = ts.getDeclarationName(decl);
- var exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text];
- if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
- var exportSpecifier = exportSpecifiers_2[_i];
- statements = appendExportStatement(statements, exportSpecifier.name, name, exportSpecifier.name);
- }
- }
- return statements;
- }
- function appendExportStatement(statements, exportName, expression, location, allowComments) {
- if (exportName.text === "default") {
- var sourceFile = ts.getOriginalNode(currentSourceFile, ts.isSourceFile);
- if (sourceFile && !sourceFile.symbol.exports["___esModule"]) {
- if (languageVersion === 0) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true))));
- }
- else {
- statements = ts.append(statements, ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
- ts.createIdentifier("exports"),
- ts.createLiteral("__esModule"),
- ts.createObjectLiteral([
- ts.createPropertyAssignment("value", ts.createLiteral(true))
- ])
- ])));
- }
- }
- }
- statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
- return statements;
- }
- function createExportStatement(name, value, location, allowComments) {
- var statement = ts.createStatement(createExportExpression(name, value), location);
- ts.startOnNewLine(statement);
- if (!allowComments) {
- ts.setEmitFlags(statement, 1536);
- }
- return statement;
- }
- function createExportExpression(name, value, location) {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value, location);
- }
- function modifierVisitor(node) {
+ function visitor(node) {
switch (node.kind) {
- case 83:
- case 78:
+ case 236:
return undefined;
+ case 242:
+ return visitExportAssignment(node);
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function visitExportAssignment(node) {
+ return node.isExportEquals ? undefined : node;
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (ts.isSourceFile(node)) {
currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
- noSubstitution = ts.createMap();
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
- currentModuleInfo = undefined;
- noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (node.id && noSubstitution[node.id]) {
- return node;
- }
- if (emitContext === 1) {
- return substituteExpression(node);
- }
- else if (ts.isShorthandPropertyAssignment(node)) {
- return substituteShorthandPropertyAssignment(node);
- }
- return node;
- }
- function substituteShorthandPropertyAssignment(node) {
- var name = node.name;
- var exportedOrImportedName = substituteExpressionIdentifier(name);
- if (exportedOrImportedName !== name) {
- if (node.objectAssignmentInitializer) {
- var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name, initializer, node);
- }
- return ts.createPropertyAssignment(name, exportedOrImportedName, node);
+ previousOnEmitNode(hint, node, emitCallback);
}
- return node;
}
- function substituteExpression(node) {
- switch (node.kind) {
- case 70:
- return substituteExpressionIdentifier(node);
- case 192:
- return substituteBinaryExpression(node);
- case 191:
- case 190:
- return substituteUnaryExpression(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isIdentifier(node) && hint === 1) {
+ return substituteExpressionIdentifier(node);
}
return node;
}
@@ -44605,101 +48386,30 @@ var ts;
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
- return node;
- }
- if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
- var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
- if (exportContainer && exportContainer.kind === 261) {
- return ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node), node);
- }
- var importDeclaration = resolver.getReferencedImportDeclaration(node);
- if (importDeclaration) {
- if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
- }
- else if (ts.isImportSpecifier(importDeclaration)) {
- var name_37 = importDeclaration.propertyName || importDeclaration.name;
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name_37), node);
- }
- }
}
return node;
}
- function substituteBinaryExpression(node) {
- if (ts.isAssignmentOperator(node.operatorToken.kind)
- && ts.isIdentifier(node.left)
- && !ts.isGeneratedIdentifier(node.left)
- && !ts.isLocalName(node.left)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
- var exportedNames = getExports(node.left);
- if (exportedNames) {
- var expression = node;
- for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
- var exportName = exportedNames_3[_i];
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression, node);
- }
- return expression;
- }
- }
- return node;
- }
- function substituteUnaryExpression(node) {
- if ((node.operator === 42 || node.operator === 43)
- && ts.isIdentifier(node.operand)
- && !ts.isGeneratedIdentifier(node.operand)
- && !ts.isLocalName(node.operand)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
- var exportedNames = getExports(node.operand);
- if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1), node)
- : node;
- for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
- var exportName = exportedNames_4[_i];
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression);
- }
- return expression;
- }
- }
- return node;
- }
- function getExports(name) {
- if (!ts.isGeneratedIdentifier(name)) {
- var valueDeclaration = resolver.getReferencedImportDeclaration(name)
- || resolver.getReferencedValueDeclaration(name);
- if (valueDeclaration) {
- return currentModuleInfo
- && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
- }
- }
- }
- var _a;
}
- ts.transformModule = transformModule;
- var exportStarHelper = {
- name: "typescript:export-star",
- scoped: true,
- text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
- };
- var umdHelper = "\n (function (dependencies, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(dependencies, factory);\n }\n })";
+ ts.transformES2015Module = transformES2015Module;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var moduleTransformerMap = ts.createMap((_a = {},
- _a[ts.ModuleKind.ES2015] = ts.transformES2015Module,
- _a[ts.ModuleKind.System] = ts.transformSystemModule,
- _a[ts.ModuleKind.AMD] = ts.transformModule,
- _a[ts.ModuleKind.CommonJS] = ts.transformModule,
- _a[ts.ModuleKind.UMD] = ts.transformModule,
- _a[ts.ModuleKind.None] = ts.transformModule,
- _a));
- function getTransformers(compilerOptions) {
+ function getModuleTransformer(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.ES2015:
+ return ts.transformES2015Module;
+ case ts.ModuleKind.System:
+ return ts.transformSystemModule;
+ default:
+ return ts.transformModule;
+ }
+ }
+ function getTransformers(compilerOptions, customTransformers) {
var jsx = compilerOptions.jsx;
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var transformers = [];
+ ts.addRange(transformers, customTransformers && customTransformers.before);
transformers.push(ts.transformTypeScript);
if (jsx === 2) {
transformers.push(ts.transformJsx);
@@ -44717,16 +48427,16 @@ var ts;
transformers.push(ts.transformES2015);
transformers.push(ts.transformGenerators);
}
- transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ts.ModuleKind.None]);
+ transformers.push(getModuleTransformer(moduleKind));
if (languageVersion < 1) {
transformers.push(ts.transformES5);
}
+ ts.addRange(transformers, customTransformers && customTransformers.after);
return transformers;
}
ts.getTransformers = getTransformers;
- function transformFiles(resolver, host, sourceFiles, transformers) {
+ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
var enabledSyntaxKindFeatures = new Array(298);
- var lexicalEnvironmentDisabled = false;
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -44734,8 +48444,11 @@ var ts;
var lexicalEnvironmentStackOffset = 0;
var lexicalEnvironmentSuspended = false;
var emitHelpers;
+ var onSubstituteNode = function (_, node) { return node; };
+ var onEmitNode = function (hint, node, callback) { return callback(hint, node); };
+ var state = 0;
var context = {
- getCompilerOptions: function () { return host.getCompilerOptions(); },
+ getCompilerOptions: function () { return options; },
getEmitResolver: function () { return resolver; },
getEmitHost: function () { return host; },
startLexicalEnvironment: startLexicalEnvironment,
@@ -44746,65 +48459,77 @@ var ts;
hoistFunctionDeclaration: hoistFunctionDeclaration,
requestEmitHelper: requestEmitHelper,
readEmitHelpers: readEmitHelpers,
- onSubstituteNode: function (_emitContext, node) { return node; },
enableSubstitution: enableSubstitution,
- isSubstitutionEnabled: isSubstitutionEnabled,
- onEmitNode: function (node, emitContext, emitCallback) { return emitCallback(node, emitContext); },
enableEmitNotification: enableEmitNotification,
- isEmitNotificationEnabled: isEmitNotificationEnabled
+ isSubstitutionEnabled: isSubstitutionEnabled,
+ isEmitNotificationEnabled: isEmitNotificationEnabled,
+ get onSubstituteNode() { return onSubstituteNode; },
+ set onSubstituteNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onSubstituteNode = value;
+ },
+ get onEmitNode() { return onEmitNode; },
+ set onEmitNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onEmitNode = value;
+ }
};
+ for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
+ var node = nodes_4[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ ts.performance.mark("beforeTransform");
var transformation = ts.chain.apply(void 0, transformers)(context);
- var transformed = ts.map(sourceFiles, transformSourceFile);
- lexicalEnvironmentDisabled = true;
+ state = 1;
+ var transformed = ts.map(nodes, allowDtsFiles ? transformation : transformRoot);
+ state = 2;
+ ts.performance.mark("afterTransform");
+ ts.performance.measure("transformTime", "beforeTransform", "afterTransform");
return {
transformed: transformed,
- emitNodeWithSubstitution: emitNodeWithSubstitution,
- emitNodeWithNotification: emitNodeWithNotification
+ substituteNode: substituteNode,
+ emitNodeWithNotification: emitNodeWithNotification,
+ dispose: dispose
};
- function transformSourceFile(sourceFile) {
- if (ts.isDeclarationFile(sourceFile)) {
- return sourceFile;
- }
- return transformation(sourceFile);
+ function transformRoot(node) {
+ return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
}
function enableSubstitution(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 1;
}
function isSubstitutionEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 1) !== 0
&& (ts.getEmitFlags(node) & 4) === 0;
}
- function emitNodeWithSubstitution(emitContext, node, emitCallback) {
- if (node) {
- if (isSubstitutionEnabled(node)) {
- var substitute = context.onSubstituteNode(emitContext, node);
- if (substitute && substitute !== node) {
- emitCallback(emitContext, substitute);
- return;
- }
- }
- emitCallback(emitContext, node);
- }
+ function substituteNode(hint, node) {
+ ts.Debug.assert(state < 3, "Cannot substitute a node after the result is disposed.");
+ return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
}
function enableEmitNotification(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 2;
}
function isEmitNotificationEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 2) !== 0
|| (ts.getEmitFlags(node) & 2) !== 0;
}
- function emitNodeWithNotification(emitContext, node, emitCallback) {
+ function emitNodeWithNotification(hint, node, emitCallback) {
+ ts.Debug.assert(state < 3, "Cannot invoke TransformationResult callbacks after the result is disposed.");
if (node) {
if (isEmitNotificationEnabled(node)) {
- context.onEmitNode(emitContext, node, emitCallback);
+ onEmitNode(hint, node, emitCallback);
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
}
}
function hoistVariableDeclaration(name) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
var decl = ts.createVariableDeclaration(name);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
@@ -44814,7 +48539,8 @@ var ts;
}
}
function hoistFunctionDeclaration(func) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -44823,7 +48549,8 @@ var ts;
}
}
function startLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot start a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations;
lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations;
@@ -44832,17 +48559,20 @@ var ts;
lexicalEnvironmentFunctionDeclarations = undefined;
}
function suspendLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot suspend a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended.");
lexicalEnvironmentSuspended = true;
}
function resumeLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot resume a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended.");
lexicalEnvironmentSuspended = false;
}
function endLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot end a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
var statements;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
@@ -44869,19 +48599,36 @@ var ts;
return statements;
}
function requestEmitHelper(helper) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper.");
emitHelpers = ts.append(emitHelpers, helper);
}
function readEmitHelpers() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
var helpers = emitHelpers;
emitHelpers = undefined;
return helpers;
}
+ function dispose() {
+ if (state < 3) {
+ for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
+ var node = nodes_5[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ lexicalEnvironmentVariableDeclarations = undefined;
+ lexicalEnvironmentVariableDeclarationsStack = undefined;
+ lexicalEnvironmentFunctionDeclarations = undefined;
+ lexicalEnvironmentFunctionDeclarationsStack = undefined;
+ onSubstituteNode = undefined;
+ onEmitNode = undefined;
+ emitHelpers = undefined;
+ state = 3;
+ }
+ }
}
- ts.transformFiles = transformFiles;
- var _a;
+ ts.transformNodes = transformNodes;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -44915,7 +48662,7 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
- function initialize(filePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
+ function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
}
@@ -44946,9 +48693,8 @@ var ts;
}
if (compilerOptions.mapRoot) {
sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
- if (!isBundledEmit) {
- ts.Debug.assert(sourceFiles.length === 1);
- sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir));
+ if (sourceFileOrBundle.kind === 264) {
+ sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir));
}
if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
@@ -45039,28 +48785,28 @@ var ts;
ts.performance.measure("Source Map", "beforeSourcemap", "afterSourcemap");
}
}
- function emitNodeWithSourceMap(emitContext, node, emitCallback) {
+ function emitNodeWithSourceMap(hint, node, emitCallback) {
if (disabled) {
- return emitCallback(emitContext, node);
+ return emitCallback(hint, node);
}
if (node) {
var emitNode = node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end;
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 16) === 0
&& pos >= 0) {
emitPos(ts.skipTrivia(currentSourceText, pos));
}
if (emitFlags & 64) {
disabled = true;
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
disabled = false;
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
@@ -45109,7 +48855,7 @@ var ts;
return;
}
encodeLastRecordedSourceMapSpan();
- return ts.stringify({
+ return JSON.stringify({
version: 3,
file: sourceMapData.sourceMapFile,
sourceRoot: sourceMapData.sourceMapSourceRoot,
@@ -45161,11 +48907,10 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function createCommentWriter(host, writer, sourceMap) {
- var compilerOptions = host.getCompilerOptions();
- var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var newLine = host.getNewLine();
- var emitPos = sourceMap.emitPos;
+ function createCommentWriter(printerOptions, emitPos) {
+ var extendedDiagnostics = printerOptions.extendedDiagnostics;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var writer;
var containerPos = -1;
var containerEnd = -1;
var declarationListContainerEnd = -1;
@@ -45174,37 +48919,34 @@ var ts;
var currentLineMap;
var detachedCommentsInfo;
var hasWrittenComment = false;
- var disabled = compilerOptions.removeComments;
+ var disabled = printerOptions.removeComments;
return {
reset: reset,
+ setWriter: setWriter,
setSourceFile: setSourceFile,
emitNodeWithComments: emitNodeWithComments,
emitBodyWithDetachedComments: emitBodyWithDetachedComments,
emitTrailingCommentsOfPosition: emitTrailingCommentsOfPosition,
+ emitLeadingCommentsOfPosition: emitLeadingCommentsOfPosition,
};
- function emitNodeWithComments(emitContext, node, emitCallback) {
+ function emitNodeWithComments(hint, node, emitCallback) {
if (disabled) {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
return;
}
if (node) {
- var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
- var emitFlags = ts.getEmitFlags(node);
+ hasWrittenComment = false;
+ var emitNode = node.emitNode;
+ var emitFlags = emitNode && emitNode.flags;
+ var _a = emitNode && emitNode.commentRange || node, pos = _a.pos, end = _a.end;
if ((pos < 0 && end < 0) || (pos === end)) {
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
}
else {
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 293;
+ var isEmittedNode = node.kind !== 294;
var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
if (!skipLeadingComments) {
@@ -45218,23 +48960,16 @@ var ts;
}
if (!skipTrailingComments) {
containerEnd = end;
- if (node.kind === 224) {
+ if (node.kind === 226) {
declarationListContainerEnd = end;
}
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "preEmitNodeWithComment");
}
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
if (extendedDiagnostics) {
- ts.performance.mark("beginEmitNodeWithComment");
+ ts.performance.mark("postEmitNodeWithComment");
}
containerPos = savedContainerPos;
containerEnd = savedContainerEnd;
@@ -45243,11 +48978,75 @@ var ts;
emitTrailingComments(end);
}
if (extendedDiagnostics) {
- ts.performance.measure("commentTime", "beginEmitNodeWithComment");
+ ts.performance.measure("commentTime", "postEmitNodeWithComment");
}
}
}
}
+ function emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback) {
+ var leadingComments = emitNode && emitNode.leadingComments;
+ if (ts.some(leadingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("preEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(leadingComments, emitLeadingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "preEmitNodeWithSynthesizedComments");
+ }
+ }
+ emitNodeWithNestedComments(hint, node, emitFlags, emitCallback);
+ var trailingComments = emitNode && emitNode.trailingComments;
+ if (ts.some(trailingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("postEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(trailingComments, emitTrailingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "postEmitNodeWithSynthesizedComments");
+ }
+ }
+ }
+ function emitLeadingSynthesizedComment(comment) {
+ if (comment.kind === 2) {
+ writer.writeLine();
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine || comment.kind === 2) {
+ writer.writeLine();
+ }
+ else {
+ writer.write(" ");
+ }
+ }
+ function emitTrailingSynthesizedComment(comment) {
+ if (!writer.isAtStartOfLine()) {
+ writer.write(" ");
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine) {
+ writer.writeLine();
+ }
+ }
+ function writeSynthesizedComment(comment) {
+ var text = formatSynthesizedComment(comment);
+ var lineMap = comment.kind === 3 ? ts.computeLineStarts(text) : undefined;
+ ts.writeCommentRange(text, lineMap, writer, 0, text.length, newLine);
+ }
+ function formatSynthesizedComment(comment) {
+ return comment.kind === 3
+ ? "/*" + comment.text + "*/"
+ : "//" + comment.text;
+ }
+ function emitNodeWithNestedComments(hint, node, emitFlags, emitCallback) {
+ if (emitFlags & 2048) {
+ disabled = true;
+ emitCallback(hint, node);
+ disabled = false;
+ }
+ else {
+ emitCallback(hint, node);
+ }
+ }
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
if (extendedDiagnostics) {
ts.performance.mark("preEmitBodyWithDetachedComments");
@@ -45275,6 +49074,9 @@ var ts;
}
if (!skipTrailingComments) {
emitLeadingComments(detachedRange.end, true);
+ if (hasWrittenComment && !writer.isAtStartOfLine()) {
+ writer.writeLine();
+ }
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "beginEmitBodyWithDetachedCommetns");
@@ -45299,9 +49101,11 @@ var ts;
ts.emitNewLineBeforeLeadingCommentOfPosition(currentLineMap, writer, rangePos, commentPos);
hasWrittenComment = true;
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -45309,6 +49113,12 @@ var ts;
writer.write(" ");
}
}
+ function emitLeadingCommentsOfPosition(pos) {
+ if (disabled || pos === -1) {
+ return;
+ }
+ emitLeadingComments(pos, true);
+ }
function emitTrailingComments(pos) {
forEachTrailingCommentToEmit(pos, emitTrailingComment);
}
@@ -45316,9 +49126,11 @@ var ts;
if (!writer.isAtStartOfLine()) {
writer.write(" ");
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -45336,9 +49148,11 @@ var ts;
}
}
function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -45367,6 +49181,9 @@ var ts;
currentLineMap = undefined;
detachedCommentsInfo = undefined;
}
+ function setWriter(output) {
+ writer = output;
+ }
function setSourceFile(sourceFile) {
currentSourceFile = sourceFile;
currentText = currentSourceFile.text;
@@ -45398,9 +49215,11 @@ var ts;
}
}
function writeComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
}
function isTripleSlashComment(commentPos, commentEnd) {
if (currentText.charCodeAt(commentPos + 1) === 47 &&
@@ -45420,15 +49239,17 @@ var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
- ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
+ ts.forEachEmittedFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
- function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
+ function getDeclarationDiagnosticsFromFile(_a, sourceFileOrBundle) {
var declarationFilePath = _a.declarationFilePath;
- emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit, false);
+ emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sourceFileOrBundle, false);
}
}
ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
- function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles) {
+ function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
@@ -45490,7 +49311,7 @@ var ts;
var oldWriter = writer;
ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
- ts.Debug.assert(aliasEmitInfo.node.kind === 235);
+ ts.Debug.assert(aliasEmitInfo.node.kind === 237);
createAndSetNewTextWriterWithSymbolWriter();
ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit));
for (var i = 0; i < aliasEmitInfo.indent; i++) {
@@ -45513,9 +49334,9 @@ var ts;
}
});
if (usedTypeDirectiveReferences) {
- for (var directive in usedTypeDirectiveReferences) {
+ ts.forEachKey(usedTypeDirectiveReferences, function (directive) {
referencesOutput += "/// <reference types=\"" + directive + "\" />" + newLine;
- }
+ });
}
return {
reportedDeclarationError: reportedDeclarationError,
@@ -45540,12 +49361,14 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
+ writer.reportIllegalExtends = reportIllegalExtends;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
writer.writeSpace = writer.write;
writer.writeStringLiteral = writer.writeLiteral;
writer.writeParameter = writer.write;
+ writer.writeProperty = writer.write;
writer.writeSymbol = writer.write;
setWriter(writer);
}
@@ -45561,10 +49384,10 @@ var ts;
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
- if (declaration.kind === 223) {
+ if (declaration.kind === 225) {
nodeToCheck = declaration.parent.parent;
}
- else if (declaration.kind === 238 || declaration.kind === 239 || declaration.kind === 236) {
+ else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) {
ts.Debug.fail("We should be getting ImportDeclaration instead to write");
}
else {
@@ -45575,7 +49398,7 @@ var ts;
moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; });
}
if (moduleElementEmitInfo) {
- if (moduleElementEmitInfo.node.kind === 235) {
+ if (moduleElementEmitInfo.node.kind === 237) {
moduleElementEmitInfo.isVisible = true;
}
else {
@@ -45583,12 +49406,12 @@ var ts;
for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
increaseIndent();
}
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
asynchronousSubModuleDeclarationEmitInfo = [];
}
writeModuleElement(nodeToCheck);
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
asynchronousSubModuleDeclarationEmitInfo = undefined;
}
@@ -45607,8 +49430,8 @@ var ts;
}
for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) {
var directive = typeReferenceDirectives_1[_i];
- if (!(directive in usedTypeDirectiveReferences)) {
- usedTypeDirectiveReferences[directive] = directive;
+ if (!usedTypeDirectiveReferences.has(directive)) {
+ usedTypeDirectiveReferences.set(directive, directive);
}
}
}
@@ -45635,6 +49458,12 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
+ function reportIllegalExtends() {
+ if (errorNameNode) {
+ reportedDeclarationError = true;
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, ts.declarationNameToString(errorNameNode)));
+ }
+ }
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
@@ -45644,12 +49473,16 @@ var ts;
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
- if (type) {
+ var shouldUseResolverType = declaration.kind === 145 &&
+ resolver.isRequiredInitializedParameter(declaration);
+ if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
+ var format = 2 | 1024 |
+ (shouldUseResolverType ? 4096 : 0);
+ resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
}
@@ -45666,15 +49499,15 @@ var ts;
}
}
function emitLines(nodes) {
- for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
- var node = nodes_4[_i];
+ for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) {
+ var node = nodes_6[_i];
emit(node);
}
}
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
- for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
- var node = nodes_5[_i];
+ for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
+ var node = nodes_7[_i];
if (!canEmitFn || canEmitFn(node)) {
if (currentWriterPos !== writer.getTextPos()) {
write(separator);
@@ -45701,49 +49534,50 @@ var ts;
function emitType(type) {
switch (type.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 133:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 167:
- case 171:
+ case 168:
+ case 172:
return writeTextOfNode(currentText, type);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(type);
- case 157:
+ case 158:
return emitTypeReference(type);
- case 160:
+ case 161:
return emitTypeQuery(type);
- case 162:
- return emitArrayType(type);
case 163:
- return emitTupleType(type);
+ return emitArrayType(type);
case 164:
- return emitUnionType(type);
+ return emitTupleType(type);
case 165:
- return emitIntersectionType(type);
+ return emitUnionType(type);
case 166:
+ return emitIntersectionType(type);
+ case 167:
return emitParenType(type);
- case 168:
- return emitTypeOperator(type);
case 169:
- return emitIndexedAccessType(type);
+ return emitTypeOperator(type);
case 170:
+ return emitIndexedAccessType(type);
+ case 171:
return emitMappedType(type);
- case 158:
case 159:
+ case 160:
return emitSignatureDeclarationWithJsDocComments(type);
- case 161:
+ case 162:
return emitTypeLiteral(type);
case 70:
return emitEntityName(type);
- case 141:
+ case 142:
return emitEntityName(type);
- case 156:
+ case 157:
return emitTypePredicate(type);
}
function writeEntityName(entityName) {
@@ -45751,22 +49585,22 @@ var ts;
writeTextOfNode(currentText, entityName);
}
else {
- var left = entityName.kind === 141 ? entityName.left : entityName.expression;
- var right = entityName.kind === 141 ? entityName.right : entityName.name;
+ var left = entityName.kind === 142 ? entityName.left : entityName.expression;
+ var right = entityName.kind === 142 ? entityName.right : entityName.name;
writeEntityName(left);
write(".");
writeTextOfNode(currentText, right);
}
}
function emitEntityName(entityName) {
- var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 234 ? entityName.parent : enclosingDeclaration);
+ var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeEntityName(entityName);
}
function emitExpressionWithTypeArguments(node) {
if (ts.isEntityNameExpression(node.expression)) {
- ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 177);
+ ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178);
emitEntityName(node.expression);
if (node.typeArguments) {
write("<");
@@ -45870,15 +49704,15 @@ var ts;
}
function getExportDefaultTempVariableName() {
var baseName = "_default";
- if (!(baseName in currentIdentifiers)) {
+ if (!currentIdentifiers.has(baseName)) {
return baseName;
}
var count = 0;
while (true) {
count++;
- var name_38 = baseName + "_" + count;
- if (!(name_38 in currentIdentifiers)) {
- return name_38;
+ var name = baseName + "_" + count;
+ if (!currentIdentifiers.has(name)) {
+ return name;
}
}
}
@@ -45922,10 +49756,10 @@ var ts;
if (isModuleElementVisible) {
writeModuleElement(node);
}
- else if (node.kind === 234 ||
- (node.parent.kind === 261 && isCurrentFileExternalModule)) {
+ else if (node.kind === 236 ||
+ (node.parent.kind === 264 && isCurrentFileExternalModule)) {
var isVisible = void 0;
- if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 261) {
+ if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) {
asynchronousSubModuleDeclarationEmitInfo.push({
node: node,
outputPos: writer.getTextPos(),
@@ -45934,7 +49768,7 @@ var ts;
});
}
else {
- if (node.kind === 235) {
+ if (node.kind === 237) {
var importDeclaration = node;
if (importDeclaration.importClause) {
isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
@@ -45952,30 +49786,30 @@ var ts;
}
function writeModuleElement(node) {
switch (node.kind) {
- case 225:
+ case 227:
return writeFunctionDeclaration(node);
- case 205:
+ case 207:
return writeVariableStatement(node);
- case 227:
+ case 229:
return writeInterfaceDeclaration(node);
- case 226:
- return writeClassDeclaration(node);
case 228:
+ return writeClassDeclaration(node);
+ case 230:
return writeTypeAliasDeclaration(node);
- case 229:
+ case 231:
return writeEnumDeclaration(node);
- case 230:
+ case 232:
return writeModuleDeclaration(node);
- case 234:
+ case 236:
return writeImportEqualsDeclaration(node);
- case 235:
+ case 237:
return writeImportDeclaration(node);
default:
ts.Debug.fail("Unknown symbol kind");
}
}
function emitModuleElementDeclarationFlags(node) {
- if (node.parent.kind === 261) {
+ if (node.parent.kind === 264) {
var modifiers = ts.getModifierFlags(node);
if (modifiers & 1) {
write("export ");
@@ -45983,7 +49817,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 227 && !noDeclare) {
+ else if (node.kind !== 229 && !noDeclare) {
write("declare ");
}
}
@@ -46033,7 +49867,7 @@ var ts;
}
function isVisibleNamedBinding(namedBindings) {
if (namedBindings) {
- if (namedBindings.kind === 237) {
+ if (namedBindings.kind === 239) {
return resolver.isDeclarationVisible(namedBindings);
}
else {
@@ -46056,7 +49890,7 @@ var ts;
if (currentWriterPos !== writer.getTextPos()) {
write(", ");
}
- if (node.importClause.namedBindings.kind === 237) {
+ if (node.importClause.namedBindings.kind === 239) {
write("* as ");
writeTextOfNode(currentText, node.importClause.namedBindings.name);
}
@@ -46073,13 +49907,13 @@ var ts;
writer.writeLine();
}
function emitExternalModuleSpecifier(parent) {
- resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 230;
+ resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232;
var moduleSpecifier;
- if (parent.kind === 234) {
+ if (parent.kind === 236) {
var node = parent;
moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node);
}
- else if (parent.kind === 230) {
+ else if (parent.kind === 232) {
moduleSpecifier = parent.name;
}
else {
@@ -46147,7 +49981,7 @@ var ts;
writeTextOfNode(currentText, node.name);
}
}
- while (node.body && node.body.kind !== 231) {
+ while (node.body && node.body.kind !== 233) {
node = node.body;
write(".");
writeTextOfNode(currentText, node.name);
@@ -46217,7 +50051,7 @@ var ts;
writeLine();
}
function isPrivateMethodTypeParameter(node) {
- return node.parent.kind === 149 && ts.hasModifier(node.parent, 8);
+ return node.parent.kind === 150 && ts.hasModifier(node.parent, 8);
}
function emitTypeParameters(typeParameters) {
function emitTypeParameter(node) {
@@ -46227,52 +50061,69 @@ var ts;
writeTextOfNode(currentText, node.name);
if (node.constraint && !isPrivateMethodTypeParameter(node)) {
write(" extends ");
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- (node.parent.parent && node.parent.parent.kind === 161)) {
- ts.Debug.assert(node.parent.kind === 149 ||
- node.parent.kind === 148 ||
- node.parent.kind === 158 ||
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
node.parent.kind === 159 ||
- node.parent.kind === 153 ||
- node.parent.kind === 154);
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
emitType(node.constraint);
}
else {
emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
}
}
+ if (node.default && !isPrivateMethodTypeParameter(node)) {
+ write(" = ");
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
+ node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
+ emitType(node.default);
+ }
+ else {
+ emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError);
+ }
+ }
function getTypeParameterConstraintVisibilityError() {
var diagnosticMessage;
switch (node.parent.kind) {
- case 226:
+ case 228:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
break;
- case 227:
+ case 229:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
- case 154:
+ case 155:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 153:
+ case 154:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
}
else {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
break;
- case 225:
+ case 227:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
- case 228:
+ case 230:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;
default:
@@ -46291,7 +50142,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(typeReferences, isImplementsList) {
+ function emitHeritageClause(className, typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -46305,17 +50156,19 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
+ errorNameNode = className;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
+ errorNameNode = undefined;
}
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
- if (node.parent.parent.kind === 226) {
+ if (node.parent.parent.kind === 228) {
diagnosticMessage = isImplementsList ?
ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
- ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
+ ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
}
else {
- diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
+ diagnosticMessage = ts.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
}
return {
diagnosticMessage: diagnosticMessage,
@@ -46347,9 +50200,10 @@ var ts;
emitTypeParameters(node.typeParameters);
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- emitHeritageClause([baseTypeNode], false);
+ node.name;
+ emitHeritageClause(node.name, [baseTypeNode], false);
}
- emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -46370,7 +50224,7 @@ var ts;
emitTypeParameters(node.typeParameters);
var interfaceExtendsTypes = ts.filter(ts.getInterfaceBaseTypeNodes(node), function (base) { return ts.isEntityNameExpression(base.expression); });
if (interfaceExtendsTypes && interfaceExtendsTypes.length) {
- emitHeritageClause(interfaceExtendsTypes, false);
+ emitHeritageClause(node.name, interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -46392,17 +50246,17 @@ var ts;
writeLine();
}
function emitVariableDeclaration(node) {
- if (node.kind !== 223 || resolver.isDeclarationVisible(node)) {
+ if (node.kind !== 225 || resolver.isDeclarationVisible(node)) {
if (ts.isBindingPattern(node.name)) {
emitBindingPattern(node.name);
}
else {
writeTextOfNode(currentText, node.name);
- if ((node.kind === 147 || node.kind === 146 ||
- (node.kind === 144 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
+ if ((node.kind === 148 || node.kind === 147 ||
+ (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
write("?");
}
- if ((node.kind === 147 || node.kind === 146) && node.parent.kind === 161) {
+ if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (resolver.isLiteralConstDeclaration(node)) {
@@ -46415,14 +50269,14 @@ var ts;
}
}
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
- if (node.kind === 223) {
+ if (node.kind === 225) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
}
- else if (node.kind === 147 || node.kind === 146) {
+ else if (node.kind === 148 || node.kind === 147) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -46430,7 +50284,7 @@ var ts;
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -46456,7 +50310,7 @@ var ts;
var elements = [];
for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
var element = _a[_i];
- if (element.kind !== 198) {
+ if (element.kind !== 199) {
elements.push(element);
}
}
@@ -46522,7 +50376,7 @@ var ts;
accessorWithTypeAnnotation = node;
var type = getTypeAnnotationFromAccessor(node);
if (!type) {
- var anotherAccessor = node.kind === 151 ? accessors.setAccessor : accessors.getAccessor;
+ var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor;
type = getTypeAnnotationFromAccessor(anotherAccessor);
if (type) {
accessorWithTypeAnnotation = anotherAccessor;
@@ -46535,7 +50389,7 @@ var ts;
}
function getTypeAnnotationFromAccessor(accessor) {
if (accessor) {
- return accessor.kind === 151
+ return accessor.kind === 152
? accessor.type
: accessor.parameters.length > 0
? accessor.parameters[0].type
@@ -46544,7 +50398,7 @@ var ts;
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
- if (accessorWithTypeAnnotation.kind === 152) {
+ if (accessorWithTypeAnnotation.kind === 153) {
if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
@@ -46590,17 +50444,17 @@ var ts;
}
if (!resolver.isImplementationOfOverload(node)) {
emitJsDocComments(node);
- if (node.kind === 225) {
+ if (node.kind === 227) {
emitModuleElementDeclarationFlags(node);
}
- else if (node.kind === 149 || node.kind === 150) {
+ else if (node.kind === 150 || node.kind === 151) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
}
- if (node.kind === 225) {
+ if (node.kind === 227) {
write("function ");
writeTextOfNode(currentText, node.name);
}
- else if (node.kind === 150) {
+ else if (node.kind === 151) {
write("constructor");
}
else {
@@ -46620,15 +50474,15 @@ var ts;
var prevEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = node;
var closeParenthesizedFunctionType = false;
- if (node.kind === 155) {
+ if (node.kind === 156) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
write("[");
}
else {
- if (node.kind === 154 || node.kind === 159) {
+ if (node.kind === 155 || node.kind === 160) {
write("new ");
}
- else if (node.kind === 158) {
+ else if (node.kind === 159) {
var currentOutput = writer.getText();
if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") {
closeParenthesizedFunctionType = true;
@@ -46639,20 +50493,20 @@ var ts;
write("(");
}
emitCommaList(node.parameters, emitParameterDeclaration);
- if (node.kind === 155) {
+ if (node.kind === 156) {
write("]");
}
else {
write(")");
}
- var isFunctionTypeOrConstructorType = node.kind === 158 || node.kind === 159;
- if (isFunctionTypeOrConstructorType || node.parent.kind === 161) {
+ var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160;
+ if (isFunctionTypeOrConstructorType || node.parent.kind === 162) {
if (node.type) {
write(isFunctionTypeOrConstructorType ? " => " : ": ");
emitType(node.type);
}
}
- else if (node.kind !== 150 && !ts.hasModifier(node, 8)) {
+ else if (node.kind !== 151 && !ts.hasModifier(node, 8)) {
writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
}
enclosingDeclaration = prevEnclosingDeclaration;
@@ -46666,23 +50520,23 @@ var ts;
function getReturnTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
switch (node.kind) {
- case 154:
+ case 155:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 153:
+ case 154:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 155:
+ case 156:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -46690,7 +50544,7 @@ var ts;
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -46703,7 +50557,7 @@ var ts;
ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
}
break;
- case 225:
+ case 227:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -46735,9 +50589,9 @@ var ts;
write("?");
}
decreaseIndent();
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- node.parent.parent.kind === 161) {
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (!ts.hasModifier(node.parent, 8)) {
@@ -46753,22 +50607,26 @@ var ts;
}
function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
switch (node.parent.kind) {
- case 150:
+ case 151:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
- case 154:
+ case 155:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 153:
+ case 154:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 156:
+ return symbolAccessibilityResult.errorModuleName ?
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -46776,7 +50634,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -46788,7 +50646,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
- case 225:
+ case 227:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -46799,12 +50657,12 @@ var ts;
}
}
function emitBindingPattern(bindingPattern) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
write("{");
emitCommaList(bindingPattern.elements, emitBindingElement);
write("}");
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
write("[");
var elements = bindingPattern.elements;
emitCommaList(elements, emitBindingElement);
@@ -46815,10 +50673,10 @@ var ts;
}
}
function emitBindingElement(bindingElement) {
- if (bindingElement.kind === 198) {
+ if (bindingElement.kind === 199) {
write(" ");
}
- else if (bindingElement.kind === 174) {
+ else if (bindingElement.kind === 175) {
if (bindingElement.propertyName) {
writeTextOfNode(currentText, bindingElement.propertyName);
write(": ");
@@ -46840,39 +50698,39 @@ var ts;
}
function emitNode(node) {
switch (node.kind) {
- case 225:
- case 230:
- case 234:
case 227:
- case 226:
- case 228:
+ case 232:
+ case 236:
case 229:
+ case 228:
+ case 230:
+ case 231:
return emitModuleElement(node, isModuleElementVisible(node));
- case 205:
+ case 207:
return emitModuleElement(node, isVariableStatementVisible(node));
- case 235:
+ case 237:
return emitModuleElement(node, !node.importClause);
- case 241:
+ case 243:
return emitExportDeclaration(node);
+ case 151:
case 150:
case 149:
- case 148:
return writeFunctionDeclaration(node);
- case 154:
- case 153:
case 155:
+ case 154:
+ case 156:
return emitSignatureDeclarationWithJsDocComments(node);
- case 151:
case 152:
+ case 153:
return emitAccessorDeclaration(node);
+ case 148:
case 147:
- case 146:
return emitPropertyDeclaration(node);
- case 260:
+ case 263:
return emitEnumMemberDeclaration(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 261:
+ case 264:
return emitSourceFile(node);
}
}
@@ -46883,14 +50741,15 @@ var ts;
declFileName = referencedFile.fileName;
}
else {
- ts.forEachExpectedEmitFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
}
if (declFileName) {
declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
}
return addedBundledEmitReference;
- function getDeclFileName(emitFileNames, _sourceFiles, isBundledEmit) {
+ function getDeclFileName(emitFileNames, sourceFileOrBundle) {
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
if (isBundledEmit && !addBundledFileReference) {
return;
}
@@ -46900,10 +50759,11 @@ var ts;
}
}
}
- function writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
- var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles);
+ function writeDeclarationFile(declarationFilePath, sourceFileOrBundle, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
+ var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles);
var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit;
if (!emitSkipped) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
var declarationOutput = emitDeclarationResult.referencesOutput
+ getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles);
@@ -46927,63 +50787,55 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var id = function (s) { return s; };
- var nullTransformers = [function (_) { return id; }];
- function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) {
- var delimiters = createDelimiterMap();
- var brackets = createBracketsMap();
+ var delimiters = createDelimiterMap();
+ var brackets = createBracketsMap();
+ function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles, transformers) {
var compilerOptions = host.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined;
var emitterDiagnostics = ts.createDiagnosticCollection();
var newLine = host.getNewLine();
- var transformers = emitOnlyDtsFiles ? nullTransformers : ts.getTransformers(compilerOptions);
var writer = ts.createTextWriter(newLine);
- var write = writer.write, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent;
var sourceMap = ts.createSourceMapWriter(host, writer);
- var emitNodeWithSourceMap = sourceMap.emitNodeWithSourceMap, emitTokenWithSourceMap = sourceMap.emitTokenWithSourceMap;
- var comments = ts.createCommentWriter(host, writer, sourceMap);
- var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition;
- var nodeIdToGeneratedName;
- var autoGeneratedIdToGeneratedName;
- var generatedNameSet;
- var tempFlags;
var currentSourceFile;
- var currentText;
- var currentFileIdentifiers;
var bundledHelpers;
var isOwnFileEmit;
var emitSkipped = false;
var sourceFiles = ts.getSourceFilesToEmit(host, targetSourceFile);
- ts.performance.mark("beforeTransform");
- var _a = ts.transformFiles(resolver, host, sourceFiles, transformers), transformed = _a.transformed, emitNodeWithSubstitution = _a.emitNodeWithSubstitution, emitNodeWithNotification = _a.emitNodeWithNotification;
- ts.performance.measure("transformTime", "beforeTransform");
+ var transform = ts.transformNodes(resolver, host, compilerOptions, sourceFiles, transformers, false);
+ var printer = createPrinter(compilerOptions, {
+ hasGlobalName: resolver.hasGlobalName,
+ onEmitNode: transform.emitNodeWithNotification,
+ substituteNode: transform.substituteNode,
+ onEmitSourceMapOfNode: sourceMap.emitNodeWithSourceMap,
+ onEmitSourceMapOfToken: sourceMap.emitTokenWithSourceMap,
+ onEmitSourceMapOfPosition: sourceMap.emitPos,
+ onEmitHelpers: emitHelpers,
+ onSetSourceFile: setSourceFile,
+ });
ts.performance.mark("beforePrint");
- ts.forEachTransformedEmitFile(host, transformed, emitFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, emitSourceFileOrBundle, transform.transformed, emitOnlyDtsFiles);
ts.performance.measure("printTime", "beforePrint");
- for (var _b = 0, sourceFiles_4 = sourceFiles; _b < sourceFiles_4.length; _b++) {
- var sourceFile = sourceFiles_4[_b];
- ts.disposeEmitNodes(sourceFile);
- }
+ transform.dispose();
return {
emitSkipped: emitSkipped,
diagnostics: emitterDiagnostics.getDiagnostics(),
emittedFiles: emittedFilesList,
sourceMaps: sourceMapDataList
};
- function emitFile(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, isBundledEmit) {
+ function emitSourceFileOrBundle(_a, sourceFileOrBundle) {
+ var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath;
if (!host.isEmitBlocked(jsFilePath) && !compilerOptions.noEmit) {
if (!emitOnlyDtsFiles) {
- printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
+ printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
}
}
else {
emitSkipped = true;
}
if (declarationFilePath) {
- emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFiles(sourceFiles), isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
+ emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFileOrBundle(sourceFileOrBundle), host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
}
if (!emitSkipped && emittedFilesList) {
if (!emitOnlyDtsFiles) {
@@ -46997,24 +50849,24 @@ var ts;
}
}
}
- function printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
- sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
- nodeIdToGeneratedName = [];
- autoGeneratedIdToGeneratedName = [];
- generatedNameSet = ts.createMap();
- bundledHelpers = isBundledEmit ? ts.createMap() : undefined;
- isOwnFileEmit = !isBundledEmit;
- if (isBundledEmit && moduleKind) {
- for (var _a = 0, sourceFiles_5 = sourceFiles; _a < sourceFiles_5.length; _a++) {
- var sourceFile = sourceFiles_5[_a];
- emitHelpers(sourceFile, true);
- }
+ function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) {
+ var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined;
+ var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined;
+ var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
+ sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
+ if (bundle) {
+ bundledHelpers = ts.createMap();
+ isOwnFileEmit = false;
+ printer.writeBundle(bundle, writer);
}
- ts.forEach(sourceFiles, printSourceFile);
- writeLine();
+ else {
+ isOwnFileEmit = true;
+ printer.writeFile(sourceFile, writer);
+ }
+ writer.writeLine();
var sourceMappingURL = sourceMap.getSourceMappingURL();
if (sourceMappingURL) {
- write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
+ writer.write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
}
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), false, sourceFiles);
@@ -47024,20 +50876,164 @@ var ts;
}
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), compilerOptions.emitBOM, sourceFiles);
sourceMap.reset();
- comments.reset();
writer.reset();
- tempFlags = 0;
currentSourceFile = undefined;
- currentText = undefined;
+ bundledHelpers = undefined;
isOwnFileEmit = false;
}
- function printSourceFile(node) {
+ function setSourceFile(node) {
currentSourceFile = node;
- currentText = node.text;
- currentFileIdentifiers = node.identifiers;
sourceMap.setSourceFile(node);
- comments.setSourceFile(node);
- pipelineEmitWithNotification(0, node);
+ }
+ function emitHelpers(node, writeLines) {
+ var helpersEmitted = false;
+ var bundle = node.kind === 265 ? node : undefined;
+ if (bundle && moduleKind === ts.ModuleKind.None) {
+ return;
+ }
+ var numNodes = bundle ? bundle.sourceFiles.length : 1;
+ for (var i = 0; i < numNodes; i++) {
+ var currentNode = bundle ? bundle.sourceFiles[i] : node;
+ var sourceFile = ts.isSourceFile(currentNode) ? currentNode : currentSourceFile;
+ var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
+ var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
+ var helpers = ts.getEmitHelpers(currentNode);
+ if (helpers) {
+ for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
+ var helper = _b[_a];
+ if (!helper.scoped) {
+ if (shouldSkip)
+ continue;
+ if (shouldBundle) {
+ if (bundledHelpers.get(helper.name)) {
+ continue;
+ }
+ bundledHelpers.set(helper.name, true);
+ }
+ }
+ else if (bundle) {
+ continue;
+ }
+ writeLines(helper.text);
+ helpersEmitted = true;
+ }
+ }
+ }
+ return helpersEmitted;
+ }
+ }
+ ts.emitFiles = emitFiles;
+ function createPrinter(printerOptions, handlers) {
+ if (printerOptions === void 0) { printerOptions = {}; }
+ if (handlers === void 0) { handlers = {}; }
+ var hasGlobalName = handlers.hasGlobalName, onEmitSourceMapOfNode = handlers.onEmitSourceMapOfNode, onEmitSourceMapOfToken = handlers.onEmitSourceMapOfToken, onEmitSourceMapOfPosition = handlers.onEmitSourceMapOfPosition, onEmitNode = handlers.onEmitNode, onEmitHelpers = handlers.onEmitHelpers, onSetSourceFile = handlers.onSetSourceFile, substituteNode = handlers.substituteNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
+ var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
+ var currentSourceFile;
+ var nodeIdToGeneratedName;
+ var autoGeneratedIdToGeneratedName;
+ var generatedNames;
+ var tempFlagsStack;
+ var tempFlags;
+ var writer;
+ var ownWriter;
+ reset();
+ return {
+ printNode: printNode,
+ printFile: printFile,
+ printBundle: printBundle,
+ writeNode: writeNode,
+ writeFile: writeFile,
+ writeBundle: writeBundle
+ };
+ function printNode(hint, node, sourceFile) {
+ switch (hint) {
+ case 0:
+ ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
+ break;
+ case 2:
+ ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
+ break;
+ case 1:
+ ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
+ break;
+ }
+ switch (node.kind) {
+ case 264: return printFile(node);
+ case 265: return printBundle(node);
+ }
+ writeNode(hint, node, sourceFile, beginPrint());
+ return endPrint();
+ }
+ function printBundle(bundle) {
+ writeBundle(bundle, beginPrint());
+ return endPrint();
+ }
+ function printFile(sourceFile) {
+ writeFile(sourceFile, beginPrint());
+ return endPrint();
+ }
+ function writeNode(hint, node, sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ print(hint, node, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function writeBundle(bundle, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(bundle);
+ emitPrologueDirectivesIfNeeded(bundle);
+ emitHelpersIndirect(bundle);
+ for (var _a = 0, _b = bundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ print(0, sourceFile, sourceFile);
+ }
+ reset();
+ writer = previousWriter;
+ }
+ function writeFile(sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(sourceFile);
+ emitPrologueDirectivesIfNeeded(sourceFile);
+ print(0, sourceFile, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function beginPrint() {
+ return ownWriter || (ownWriter = ts.createTextWriter(newLine));
+ }
+ function endPrint() {
+ var text = ownWriter.getText();
+ ownWriter.reset();
+ return text;
+ }
+ function print(hint, node, sourceFile) {
+ setSourceFile(sourceFile);
+ pipelineEmitWithNotification(hint, node);
+ }
+ function setSourceFile(sourceFile) {
+ currentSourceFile = sourceFile;
+ comments.setSourceFile(sourceFile);
+ if (onSetSourceFile) {
+ onSetSourceFile(sourceFile);
+ }
+ }
+ function setWriter(output) {
+ writer = output;
+ comments.setWriter(output);
+ }
+ function reset() {
+ nodeIdToGeneratedName = [];
+ autoGeneratedIdToGeneratedName = [];
+ generatedNames = ts.createMap();
+ tempFlagsStack = [];
+ tempFlags = 0;
+ comments.reset();
+ setWriter(undefined);
}
function emit(node) {
pipelineEmitWithNotification(3, node);
@@ -47048,51 +51044,53 @@ var ts;
function emitExpression(node) {
pipelineEmitWithNotification(1, node);
}
- function pipelineEmitWithNotification(emitContext, node) {
- emitNodeWithNotification(emitContext, node, pipelineEmitWithComments);
- }
- function pipelineEmitWithComments(emitContext, node) {
- if (emitContext === 0) {
- pipelineEmitWithSourceMap(emitContext, node);
- return;
+ function pipelineEmitWithNotification(hint, node) {
+ if (onEmitNode) {
+ onEmitNode(hint, node, pipelineEmitWithComments);
}
- emitNodeWithComments(emitContext, node, pipelineEmitWithSourceMap);
- }
- function pipelineEmitWithSourceMap(emitContext, node) {
- if (emitContext === 0
- || emitContext === 2) {
- pipelineEmitWithSubstitution(emitContext, node);
- return;
+ else {
+ pipelineEmitWithComments(hint, node);
}
- emitNodeWithSourceMap(emitContext, node, pipelineEmitWithSubstitution);
- }
- function pipelineEmitWithSubstitution(emitContext, node) {
- emitNodeWithSubstitution(emitContext, node, pipelineEmitForContext);
}
- function pipelineEmitForContext(emitContext, node) {
- switch (emitContext) {
- case 0: return pipelineEmitInSourceFileContext(node);
- case 2: return pipelineEmitInIdentifierNameContext(node);
- case 3: return pipelineEmitInUnspecifiedContext(node);
- case 1: return pipelineEmitInExpressionContext(node);
+ function pipelineEmitWithComments(hint, node) {
+ node = trySubstituteNode(hint, node);
+ if (emitNodeWithComments && hint !== 0) {
+ emitNodeWithComments(hint, node, pipelineEmitWithSourceMap);
+ }
+ else {
+ pipelineEmitWithSourceMap(hint, node);
}
}
- function pipelineEmitInSourceFileContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 261:
- return emitSourceFile(node);
+ function pipelineEmitWithSourceMap(hint, node) {
+ if (onEmitSourceMapOfNode && hint !== 0 && hint !== 2) {
+ onEmitSourceMapOfNode(hint, node, pipelineEmitWithHint);
+ }
+ else {
+ pipelineEmitWithHint(hint, node);
}
}
- function pipelineEmitInIdentifierNameContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 70:
- return emitIdentifier(node);
+ function pipelineEmitWithHint(hint, node) {
+ switch (hint) {
+ case 0: return pipelineEmitSourceFile(node);
+ case 2: return pipelineEmitIdentifierName(node);
+ case 1: return pipelineEmitExpression(node);
+ case 3: return pipelineEmitUnspecified(node);
}
}
- function pipelineEmitInUnspecifiedContext(node) {
+ function pipelineEmitSourceFile(node) {
+ ts.Debug.assertNode(node, ts.isSourceFile);
+ emitSourceFile(node);
+ }
+ function pipelineEmitIdentifierName(node) {
+ ts.Debug.assertNode(node, ts.isIdentifier);
+ emitIdentifier(node);
+ }
+ function pipelineEmitUnspecified(node) {
var kind = node.kind;
+ if (ts.isKeyword(kind)) {
+ writeTokenText(kind);
+ return;
+ }
switch (kind) {
case 13:
case 14:
@@ -47100,229 +51098,201 @@ var ts;
return emitLiteral(node);
case 70:
return emitIdentifier(node);
- case 75:
- case 78:
- case 83:
- case 104:
- case 111:
- case 112:
- case 113:
- case 114:
- case 116:
- case 117:
- case 118:
- case 119:
- case 120:
- case 121:
- case 122:
- case 123:
- case 124:
- case 125:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- writeTokenText(kind);
- return;
- case 141:
- return emitQualifiedName(node);
case 142:
- return emitComputedPropertyName(node);
+ return emitQualifiedName(node);
case 143:
- return emitTypeParameter(node);
+ return emitComputedPropertyName(node);
case 144:
- return emitParameter(node);
+ return emitTypeParameter(node);
case 145:
- return emitDecorator(node);
+ return emitParameter(node);
case 146:
- return emitPropertySignature(node);
+ return emitDecorator(node);
case 147:
- return emitPropertyDeclaration(node);
+ return emitPropertySignature(node);
case 148:
- return emitMethodSignature(node);
+ return emitPropertyDeclaration(node);
case 149:
- return emitMethodDeclaration(node);
+ return emitMethodSignature(node);
case 150:
- return emitConstructor(node);
+ return emitMethodDeclaration(node);
case 151:
+ return emitConstructor(node);
case 152:
- return emitAccessorDeclaration(node);
case 153:
- return emitCallSignature(node);
+ return emitAccessorDeclaration(node);
case 154:
- return emitConstructSignature(node);
+ return emitCallSignature(node);
case 155:
- return emitIndexSignature(node);
+ return emitConstructSignature(node);
case 156:
- return emitTypePredicate(node);
+ return emitIndexSignature(node);
case 157:
- return emitTypeReference(node);
+ return emitTypePredicate(node);
case 158:
- return emitFunctionType(node);
+ return emitTypeReference(node);
case 159:
- return emitConstructorType(node);
+ return emitFunctionType(node);
case 160:
- return emitTypeQuery(node);
+ return emitConstructorType(node);
case 161:
- return emitTypeLiteral(node);
+ return emitTypeQuery(node);
case 162:
- return emitArrayType(node);
+ return emitTypeLiteral(node);
case 163:
- return emitTupleType(node);
+ return emitArrayType(node);
case 164:
- return emitUnionType(node);
+ return emitTupleType(node);
case 165:
- return emitIntersectionType(node);
+ return emitUnionType(node);
case 166:
+ return emitIntersectionType(node);
+ case 167:
return emitParenthesizedType(node);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(node);
- case 167:
- return emitThisType();
case 168:
- return emitTypeOperator(node);
+ return emitThisType();
case 169:
- return emitIndexedAccessType(node);
+ return emitTypeOperator(node);
case 170:
- return emitMappedType(node);
+ return emitIndexedAccessType(node);
case 171:
- return emitLiteralType(node);
+ return emitMappedType(node);
case 172:
- return emitObjectBindingPattern(node);
+ return emitLiteralType(node);
case 173:
- return emitArrayBindingPattern(node);
+ return emitObjectBindingPattern(node);
case 174:
+ return emitArrayBindingPattern(node);
+ case 175:
return emitBindingElement(node);
- case 202:
+ case 204:
return emitTemplateSpan(node);
- case 203:
+ case 205:
return emitSemicolonClassElement();
- case 204:
+ case 206:
return emitBlock(node);
- case 205:
+ case 207:
return emitVariableStatement(node);
- case 206:
+ case 208:
return emitEmptyStatement();
- case 207:
+ case 209:
return emitExpressionStatement(node);
- case 208:
+ case 210:
return emitIfStatement(node);
- case 209:
+ case 211:
return emitDoStatement(node);
- case 210:
+ case 212:
return emitWhileStatement(node);
- case 211:
+ case 213:
return emitForStatement(node);
- case 212:
+ case 214:
return emitForInStatement(node);
- case 213:
+ case 215:
return emitForOfStatement(node);
- case 214:
+ case 216:
return emitContinueStatement(node);
- case 215:
+ case 217:
return emitBreakStatement(node);
- case 216:
+ case 218:
return emitReturnStatement(node);
- case 217:
+ case 219:
return emitWithStatement(node);
- case 218:
+ case 220:
return emitSwitchStatement(node);
- case 219:
+ case 221:
return emitLabeledStatement(node);
- case 220:
+ case 222:
return emitThrowStatement(node);
- case 221:
+ case 223:
return emitTryStatement(node);
- case 222:
+ case 224:
return emitDebuggerStatement(node);
- case 223:
+ case 225:
return emitVariableDeclaration(node);
- case 224:
+ case 226:
return emitVariableDeclarationList(node);
- case 225:
+ case 227:
return emitFunctionDeclaration(node);
- case 226:
+ case 228:
return emitClassDeclaration(node);
- case 227:
+ case 229:
return emitInterfaceDeclaration(node);
- case 228:
+ case 230:
return emitTypeAliasDeclaration(node);
- case 229:
+ case 231:
return emitEnumDeclaration(node);
- case 230:
+ case 232:
return emitModuleDeclaration(node);
- case 231:
+ case 233:
return emitModuleBlock(node);
- case 232:
- return emitCaseBlock(node);
case 234:
+ return emitCaseBlock(node);
+ case 236:
return emitImportEqualsDeclaration(node);
- case 235:
+ case 237:
return emitImportDeclaration(node);
- case 236:
+ case 238:
return emitImportClause(node);
- case 237:
+ case 239:
return emitNamespaceImport(node);
- case 238:
+ case 240:
return emitNamedImports(node);
- case 239:
+ case 241:
return emitImportSpecifier(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 241:
+ case 243:
return emitExportDeclaration(node);
- case 242:
+ case 244:
return emitNamedExports(node);
- case 243:
+ case 245:
return emitExportSpecifier(node);
- case 244:
+ case 246:
return;
- case 245:
+ case 247:
return emitExternalModuleReference(node);
case 10:
return emitJsxText(node);
- case 248:
+ case 250:
return emitJsxOpeningElement(node);
- case 249:
+ case 251:
return emitJsxClosingElement(node);
- case 250:
+ case 252:
return emitJsxAttribute(node);
- case 251:
+ case 253:
+ return emitJsxAttributes(node);
+ case 254:
return emitJsxSpreadAttribute(node);
- case 252:
+ case 255:
return emitJsxExpression(node);
- case 253:
+ case 256:
return emitCaseClause(node);
- case 254:
+ case 257:
return emitDefaultClause(node);
- case 255:
+ case 258:
return emitHeritageClause(node);
- case 256:
+ case 259:
return emitCatchClause(node);
- case 257:
+ case 260:
return emitPropertyAssignment(node);
- case 258:
+ case 261:
return emitShorthandPropertyAssignment(node);
- case 259:
+ case 262:
return emitSpreadAssignment(node);
- case 260:
+ case 263:
return emitEnumMember(node);
}
if (ts.isExpression(node)) {
- return pipelineEmitWithSubstitution(1, node);
+ return pipelineEmitExpression(trySubstituteNode(1, node));
+ }
+ if (ts.isToken(node)) {
+ writeTokenText(kind);
+ return;
}
}
- function pipelineEmitInExpressionContext(node) {
+ function pipelineEmitExpression(node) {
var kind = node.kind;
switch (kind) {
case 8:
@@ -47340,77 +51310,82 @@ var ts;
case 98:
writeTokenText(kind);
return;
- case 175:
- return emitArrayLiteralExpression(node);
case 176:
- return emitObjectLiteralExpression(node);
+ return emitArrayLiteralExpression(node);
case 177:
- return emitPropertyAccessExpression(node);
+ return emitObjectLiteralExpression(node);
case 178:
- return emitElementAccessExpression(node);
+ return emitPropertyAccessExpression(node);
case 179:
- return emitCallExpression(node);
+ return emitElementAccessExpression(node);
case 180:
- return emitNewExpression(node);
+ return emitCallExpression(node);
case 181:
- return emitTaggedTemplateExpression(node);
+ return emitNewExpression(node);
case 182:
- return emitTypeAssertionExpression(node);
+ return emitTaggedTemplateExpression(node);
case 183:
- return emitParenthesizedExpression(node);
+ return emitTypeAssertionExpression(node);
case 184:
- return emitFunctionExpression(node);
+ return emitParenthesizedExpression(node);
case 185:
- return emitArrowFunction(node);
+ return emitFunctionExpression(node);
case 186:
- return emitDeleteExpression(node);
+ return emitArrowFunction(node);
case 187:
- return emitTypeOfExpression(node);
+ return emitDeleteExpression(node);
case 188:
- return emitVoidExpression(node);
+ return emitTypeOfExpression(node);
case 189:
- return emitAwaitExpression(node);
+ return emitVoidExpression(node);
case 190:
- return emitPrefixUnaryExpression(node);
+ return emitAwaitExpression(node);
case 191:
- return emitPostfixUnaryExpression(node);
+ return emitPrefixUnaryExpression(node);
case 192:
- return emitBinaryExpression(node);
+ return emitPostfixUnaryExpression(node);
case 193:
- return emitConditionalExpression(node);
+ return emitBinaryExpression(node);
case 194:
- return emitTemplateExpression(node);
+ return emitConditionalExpression(node);
case 195:
- return emitYieldExpression(node);
+ return emitTemplateExpression(node);
case 196:
- return emitSpreadExpression(node);
+ return emitYieldExpression(node);
case 197:
- return emitClassExpression(node);
+ return emitSpreadExpression(node);
case 198:
+ return emitClassExpression(node);
+ case 199:
return;
- case 200:
- return emitAsExpression(node);
case 201:
+ return emitAsExpression(node);
+ case 202:
return emitNonNullExpression(node);
- case 246:
+ case 203:
+ return emitMetaProperty(node);
+ case 248:
return emitJsxElement(node);
- case 247:
+ case 249:
return emitJsxSelfClosingElement(node);
- case 294:
+ case 295:
return emitPartiallyEmittedExpression(node);
- case 297:
- return writeLines(node.text);
+ }
+ }
+ function trySubstituteNode(hint, node) {
+ return node && substituteNode && substituteNode(hint, node) || node;
+ }
+ function emitHelpersIndirect(node) {
+ if (onEmitHelpers) {
+ onEmitHelpers(node, writeLines);
}
}
function emitNumericLiteral(node) {
emitLiteral(node);
- if (node.trailingComment) {
- write(" /*" + node.trailingComment + "*/");
- }
}
function emitLiteral(node) {
var text = getLiteralTextOfNode(node);
- if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap)
+ if ((printerOptions.sourceMap || printerOptions.inlineSourceMap)
&& (node.kind === 9 || ts.isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
@@ -47449,8 +51424,8 @@ var ts;
writeIfPresent(node.dotDotDotToken, "...");
emit(node.name);
writeIfPresent(node.questionToken, "?");
- emitExpressionWithPrefix(" = ", node.initializer);
emitWithPrefix(": ", node.type);
+ emitExpressionWithPrefix(" = ", node.initializer);
}
function emitDecorator(decorator) {
write("@");
@@ -47497,7 +51472,7 @@ var ts;
function emitAccessorDeclaration(node) {
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
- write(node.kind === 151 ? "get " : "set ");
+ write(node.kind === 152 ? "get " : "set ");
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
@@ -47597,17 +51572,13 @@ var ts;
write("{");
writeLine();
increaseIndent();
- if (node.readonlyToken) {
- write("readonly ");
- }
+ writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
write(" in ");
emit(node.typeParameter.constraint);
write("]");
- if (node.questionToken) {
- write("?");
- }
+ writeIfPresent(node.questionToken, "?");
write(": ");
emit(node.type);
write(";");
@@ -47667,7 +51638,7 @@ var ts;
increaseIndent();
}
var preferNewLine = node.multiLine ? 32768 : 0;
- var allowTrailingComma = languageVersion >= 1 ? 32 : 0;
+ var allowTrailingComma = currentSourceFile.languageVersion >= 1 ? 32 : 0;
emitList(node, properties, 978 | allowTrailingComma | preferNewLine);
if (indentedFlag) {
decreaseIndent();
@@ -47679,7 +51650,7 @@ var ts;
var indentAfterDot = false;
if (!(ts.getEmitFlags(node) & 65536)) {
var dotRangeStart = node.expression.end;
- var dotRangeEnd = ts.skipTrivia(currentText, node.expression.end) + 1;
+ var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd };
indentBeforeDot = needsIndentation(node, node.expression, dotToken);
indentAfterDot = needsIndentation(node, dotToken, node.name);
@@ -47693,15 +51664,17 @@ var ts;
decreaseIndentIf(indentBeforeDot, indentAfterDot);
}
function needsDotDotForPropertyAccess(expression) {
- if (expression.kind === 8) {
+ expression = ts.skipPartiallyEmittedExpressions(expression);
+ if (ts.isNumericLiteral(expression)) {
var text = getLiteralTextOfNode(expression);
- return text.indexOf(ts.tokenToString(22)) < 0;
+ return !expression.numericLiteralFlags
+ && text.indexOf(ts.tokenToString(22)) < 0;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
return isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
- && compilerOptions.removeComments;
+ && printerOptions.removeComments;
}
}
function emitElementAccessExpression(node) {
@@ -47727,11 +51700,9 @@ var ts;
emitExpression(node.template);
}
function emitTypeAssertionExpression(node) {
- if (node.type) {
- write("<");
- emit(node.type);
- write(">");
- }
+ write("<");
+ emit(node.type);
+ write(">");
emitExpression(node.expression);
}
function emitParenthesizedExpression(node) {
@@ -47778,7 +51749,7 @@ var ts;
}
function shouldEmitWhitespaceBeforeOperand(node) {
var operand = node.operand;
- return operand.kind === 190
+ return operand.kind === 191
&& ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42))
|| (node.operator === 37 && (operand.operator === 37 || operand.operator === 43)));
}
@@ -47844,6 +51815,11 @@ var ts;
emitExpression(node.expression);
write("!");
}
+ function emitMetaProperty(node) {
+ writeToken(node.keywordToken, node.pos);
+ write(".");
+ emit(node.name);
+ }
function emitTemplateSpan(node) {
emitExpression(node.expression);
emit(node.literal);
@@ -47857,6 +51833,9 @@ var ts;
else {
writeToken(16, node.pos, node);
emitBlockStatements(node);
+ increaseIndent();
+ emitLeadingCommentsOfPosition(node.statements.end);
+ decreaseIndent();
writeToken(17, node.statements.end, node);
}
}
@@ -47886,27 +51865,27 @@ var ts;
writeToken(18, openParenPos, node);
emitExpression(node.expression);
writeToken(19, node.expression.end, node);
- emitEmbeddedStatement(node.thenStatement);
+ emitEmbeddedStatement(node, node.thenStatement);
if (node.elseStatement) {
- writeLine();
+ writeLineOrSpace(node);
writeToken(81, node.thenStatement.end, node);
- if (node.elseStatement.kind === 208) {
+ if (node.elseStatement.kind === 210) {
write(" ");
emit(node.elseStatement);
}
else {
- emitEmbeddedStatement(node.elseStatement);
+ emitEmbeddedStatement(node, node.elseStatement);
}
}
}
function emitDoStatement(node) {
write("do");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
if (ts.isBlock(node.statement)) {
write(" ");
}
else {
- writeLine();
+ writeLineOrSpace(node);
}
write("while (");
emitExpression(node.expression);
@@ -47916,7 +51895,7 @@ var ts;
write("while (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -47928,7 +51907,7 @@ var ts;
write(";");
emitExpressionWithPrefix(" ", node.incrementor);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForInStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -47938,21 +51917,22 @@ var ts;
write(" in ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForOfStatement(node) {
var openParenPos = writeToken(87, node.pos);
write(" ");
+ emitWithSuffix(node.awaitModifier, " ");
writeToken(18, openParenPos);
emitForBinding(node.initializer);
write(" of ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForBinding(node) {
if (node !== undefined) {
- if (node.kind === 224) {
+ if (node.kind === 226) {
emit(node);
}
else {
@@ -47979,7 +51959,7 @@ var ts;
write("with (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitSwitchStatement(node) {
var openParenPos = writeToken(97, node.pos);
@@ -48003,9 +51983,12 @@ var ts;
function emitTryStatement(node) {
write("try ");
emit(node.tryBlock);
- emit(node.catchClause);
+ if (node.catchClause) {
+ writeLineOrSpace(node);
+ emit(node.catchClause);
+ }
if (node.finallyBlock) {
- writeLine();
+ writeLineOrSpace(node);
write("finally ");
emit(node.finallyBlock);
}
@@ -48033,6 +52016,9 @@ var ts;
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
+ function emitBlockCallback(_hint, body) {
+ emitBlockFunctionBody(body);
+ }
function emitSignatureAndBody(node, emitSignatureHead) {
var body = node.body;
if (body) {
@@ -48043,14 +52029,23 @@ var ts;
}
if (ts.getEmitFlags(node) & 262144) {
emitSignatureHead(node);
- emitBlockFunctionBody(body);
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
emitSignatureHead(node);
- emitBlockFunctionBody(body);
- tempFlags = savedTempFlags;
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
+ popNameGenerationScope();
}
if (indentedFlag) {
decreaseIndent();
@@ -48099,9 +52094,15 @@ var ts;
function emitBlockFunctionBody(body) {
write(" {");
increaseIndent();
- emitBodyWithDetachedComments(body, body.statements, shouldEmitBlockFunctionBodyOnSingleLine(body)
+ var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
? emitBlockFunctionBodyOnSingleLine
- : emitBlockFunctionBodyWorker);
+ : emitBlockFunctionBodyWorker;
+ if (emitBodyWithDetachedComments) {
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
decreaseIndent();
writeToken(17, body.statements.end, body);
}
@@ -48110,8 +52111,9 @@ var ts;
}
function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine) {
var statementOffset = emitPrologueDirectives(body.statements, true);
- var helpersEmitted = emitHelpers(body);
- if (statementOffset === 0 && !helpersEmitted && emitBlockFunctionBodyOnSingleLine) {
+ var pos = writer.getTextPos();
+ emitHelpersIndirect(body);
+ if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine) {
decreaseIndent();
emitList(body, body.statements, 384);
increaseIndent();
@@ -48134,15 +52136,14 @@ var ts;
}
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, 256);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 65);
write("}");
+ popNameGenerationScope();
if (indentedFlag) {
decreaseIndent();
}
- tempFlags = savedTempFlags;
}
function emitInterfaceDeclaration(node) {
emitDecorators(node, node.decorators);
@@ -48169,19 +52170,18 @@ var ts;
emitModifiers(node, node.modifiers);
write("enum ");
emit(node.name);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 81);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
function emitModuleDeclaration(node) {
emitModifiers(node, node.modifiers);
write(node.flags & 16 ? "namespace " : "module ");
emit(node.name);
var body = node.body;
- while (body.kind === 230) {
+ while (body.kind === 232) {
write(".");
emit(body.name);
body = body.body;
@@ -48194,13 +52194,11 @@ var ts;
write("{ }");
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write("{");
- increaseIndent();
emitBlockStatements(node);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
}
function emitCaseBlock(node) {
@@ -48302,14 +52300,18 @@ var ts;
write("<");
emitJsxTagName(node.tagName);
write(" ");
- emitList(node, node.attributes, 131328);
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write("/>");
}
function emitJsxOpeningElement(node) {
write("<");
emitJsxTagName(node.tagName);
- writeIfAny(node.attributes, " ");
- emitList(node, node.attributes, 131328);
+ writeIfAny(node.attributes.properties, " ");
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write(">");
}
function emitJsxText(node) {
@@ -48320,6 +52322,9 @@ var ts;
emitJsxTagName(node.tagName);
write(">");
}
+ function emitJsxAttributes(node) {
+ emitList(node, node.properties, 131328);
+ }
function emitJsxAttribute(node) {
emit(node.name);
emitWithPrefix("=", node.initializer);
@@ -48332,6 +52337,9 @@ var ts;
function emitJsxExpression(node) {
if (node.expression) {
write("{");
+ if (node.dotDotDotToken) {
+ write("...");
+ }
emitExpression(node.expression);
write("}");
}
@@ -48374,7 +52382,6 @@ var ts;
emitList(node, node.types, 272);
}
function emitCatchClause(node) {
- writeLine();
var openParenPos = writeToken(73, node.pos);
write(" ");
writeToken(18, openParenPos);
@@ -48387,7 +52394,7 @@ var ts;
emit(node.name);
write(": ");
var initializer = node.initializer;
- if ((ts.getEmitFlags(initializer) & 512) === 0) {
+ if (emitTrailingCommentsOfPosition && (ts.getEmitFlags(initializer) & 512) === 0) {
var commentRange = ts.getCommentRange(initializer);
emitTrailingCommentsOfPosition(commentRange.pos);
}
@@ -48412,28 +52419,43 @@ var ts;
}
function emitSourceFile(node) {
writeLine();
- emitShebang();
- emitBodyWithDetachedComments(node, node.statements, emitSourceFileWorker);
+ var statements = node.statements;
+ if (emitBodyWithDetachedComments) {
+ var shouldEmitDetachedComment = statements.length === 0 ||
+ !ts.isPrologueDirective(statements[0]) ||
+ ts.nodeIsSynthesized(statements[0]);
+ if (shouldEmitDetachedComment) {
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
+ return;
+ }
+ }
+ emitSourceFileWorker(node);
}
function emitSourceFileWorker(node) {
var statements = node.statements;
- var statementOffset = emitPrologueDirectives(statements);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
- emitHelpers(node);
- emitList(node, statements, 1, statementOffset);
- tempFlags = savedTempFlags;
+ pushNameGenerationScope();
+ emitHelpersIndirect(node);
+ var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
+ emitList(node, statements, 1, index === -1 ? statements.length : index);
+ popNameGenerationScope();
}
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
- function emitPrologueDirectives(statements, startWithNewLine) {
+ function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
- if (ts.isPrologueDirective(statements[i])) {
- if (startWithNewLine || i > 0) {
- writeLine();
+ var statement = statements[i];
+ if (ts.isPrologueDirective(statement)) {
+ var shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;
+ if (shouldEmitPrologueDirective) {
+ if (startWithNewLine || i > 0) {
+ writeLine();
+ }
+ emit(statement);
+ if (seenPrologueDirectives) {
+ seenPrologueDirectives.set(statement.expression.text, statement.expression.text);
+ }
}
- emit(statements[i]);
}
else {
return i;
@@ -48441,71 +52463,37 @@ var ts;
}
return statements.length;
}
- function emitHelpers(node, isBundle) {
- var sourceFile = ts.isSourceFile(node) ? node : currentSourceFile;
- var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
- var shouldBundle = ts.isSourceFile(node) && !isOwnFileEmit;
- var helpersEmitted = false;
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
- var helper = _b[_a];
- if (!helper.scoped) {
- if (shouldSkip)
- continue;
- if (shouldBundle) {
- if (bundledHelpers[helper.name]) {
- continue;
- }
- bundledHelpers[helper.name] = true;
- }
- }
- else if (isBundle) {
- continue;
- }
- writeLines(helper.text);
- helpersEmitted = true;
- }
+ function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ setSourceFile(sourceFileOrBundle);
+ emitPrologueDirectives(sourceFileOrBundle.statements);
}
- if (helpersEmitted) {
- writeLine();
+ else {
+ var seenPrologueDirectives = ts.createMap();
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ setSourceFile(sourceFile);
+ emitPrologueDirectives(sourceFile.statements, true, seenPrologueDirectives);
+ }
}
- return helpersEmitted;
}
- function writeLines(text) {
- var lines = text.split(/\r\n?|\n/g);
- var indentation = guessIndentation(lines);
- for (var i = 0; i < lines.length; i++) {
- var line = indentation ? lines[i].slice(indentation) : lines[i];
- if (line.length) {
- if (i > 0) {
- writeLine();
- }
- write(line);
+ function emitShebangIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ var shebang = ts.getShebang(sourceFileOrBundle.text);
+ if (shebang) {
+ write(shebang);
+ writeLine();
+ return true;
}
}
- }
- function guessIndentation(lines) {
- var indentation;
- for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
- var line = lines_1[_a];
- for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
- if (!ts.isWhiteSpace(line.charCodeAt(i))) {
- if (indentation === undefined || i < indentation) {
- indentation = i;
- break;
- }
+ else {
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ if (emitShebangIfNeeded(sourceFile)) {
+ break;
}
}
}
- return indentation;
- }
- function emitShebang() {
- var shebang = ts.getShebang(currentText);
- if (shebang) {
- write(shebang);
- writeLine();
- }
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
@@ -48531,8 +52519,8 @@ var ts;
write(suffix);
}
}
- function emitEmbeddedStatement(node) {
- if (ts.isBlock(node)) {
+ function emitEmbeddedStatement(parent, node) {
+ if (ts.isBlock(node) || ts.getEmitFlags(parent) & 1) {
write(" ");
emit(node);
}
@@ -48589,6 +52577,9 @@ var ts;
if (format & 7680) {
write(getOpeningBracket(format));
}
+ if (onBeforeEmitNodeArray) {
+ onBeforeEmitNodeArray(children);
+ }
if (isEmpty) {
if (format & 1) {
writeLine();
@@ -48616,6 +52607,9 @@ var ts;
for (var i = 0; i < count; i++) {
var child = children[start + i];
if (previousSibling) {
+ if (delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
write(delimiter);
if (shouldWriteSeparatingLineTerminator(previousSibling, child, format)) {
if ((format & (3 | 64)) === 0) {
@@ -48630,8 +52624,10 @@ var ts;
}
}
if (shouldEmitInterveningComments) {
- var commentRange = ts.getCommentRange(child);
- emitTrailingCommentsOfPosition(commentRange.pos);
+ if (emitTrailingCommentsOfPosition) {
+ var commentRange = ts.getCommentRange(child);
+ emitTrailingCommentsOfPosition(commentRange.pos);
+ }
}
else {
shouldEmitInterveningComments = mayEmitInterveningComments;
@@ -48647,6 +52643,9 @@ var ts;
if (format & 16 && hasTrailingComma) {
write(",");
}
+ if (previousSibling && delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
if (format & 64) {
decreaseIndent();
}
@@ -48657,28 +52656,80 @@ var ts;
write(" ");
}
}
+ if (onAfterEmitNodeArray) {
+ onAfterEmitNodeArray(children);
+ }
if (format & 7680) {
write(getClosingBracket(format));
}
}
+ function write(s) {
+ writer.write(s);
+ }
+ function writeLine() {
+ writer.writeLine();
+ }
+ function increaseIndent() {
+ writer.increaseIndent();
+ }
+ function decreaseIndent() {
+ writer.decreaseIndent();
+ }
function writeIfAny(nodes, text) {
- if (nodes && nodes.length > 0) {
+ if (ts.some(nodes)) {
write(text);
}
}
function writeIfPresent(node, text) {
- if (node !== undefined) {
+ if (node) {
write(text);
}
}
function writeToken(token, pos, contextNode) {
- return emitTokenWithSourceMap(contextNode, token, pos, writeTokenText);
+ return onEmitSourceMapOfToken
+ ? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
+ : writeTokenText(token, pos);
}
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
return pos < 0 ? pos : pos + tokenString.length;
}
+ function writeLineOrSpace(node) {
+ if (ts.getEmitFlags(node) & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ }
+ }
+ function writeLines(text) {
+ var lines = text.split(/\r\n?|\n/g);
+ var indentation = guessIndentation(lines);
+ for (var i = 0; i < lines.length; i++) {
+ var line = indentation ? lines[i].slice(indentation) : lines[i];
+ if (line.length) {
+ writeLine();
+ write(line);
+ writeLine();
+ }
+ }
+ }
+ function guessIndentation(lines) {
+ var indentation;
+ for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
+ var line = lines_1[_a];
+ for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
+ if (!ts.isWhiteSpace(line.charCodeAt(i))) {
+ if (indentation === undefined || i < indentation) {
+ indentation = i;
+ break;
+ }
+ }
+ }
+ }
+ return indentation;
+ }
function increaseIndentIf(value, valueToWriteWhenNotIndenting) {
if (value) {
increaseIndent();
@@ -48783,15 +52834,23 @@ var ts;
&& !ts.nodeIsSynthesized(node2)
&& !ts.rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile);
}
+ function isSingleLineEmptyBlock(block) {
+ return !block.multiLine
+ && isEmptyBlock(block);
+ }
+ function isEmptyBlock(block) {
+ return block.statements.length === 0
+ && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ }
function skipSynthesizedParentheses(node) {
- while (node.kind === 183 && ts.nodeIsSynthesized(node)) {
+ while (node.kind === 184 && ts.nodeIsSynthesized(node)) {
node = node.expression;
}
return node;
}
function getTextOfNode(node, includeTrivia) {
if (ts.isGeneratedIdentifier(node)) {
- return getGeneratedIdentifier(node);
+ return generateName(node);
}
else if (ts.isIdentifier(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
return ts.unescapeIdentifier(node.text);
@@ -48814,25 +52873,39 @@ var ts;
return getLiteralTextOfNode(textSourceNode);
}
}
- return ts.getLiteralText(node, currentSourceFile, languageVersion);
+ return ts.getLiteralText(node, currentSourceFile);
}
- function isSingleLineEmptyBlock(block) {
- return !block.multiLine
- && isEmptyBlock(block);
+ function pushNameGenerationScope() {
+ tempFlagsStack.push(tempFlags);
+ tempFlags = 0;
}
- function isEmptyBlock(block) {
- return block.statements.length === 0
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ function popNameGenerationScope() {
+ tempFlags = tempFlagsStack.pop();
+ }
+ function generateName(name) {
+ if (name.autoGenerateKind === 4) {
+ var node = getNodeForGeneratedName(name);
+ return generateNameCached(node);
+ }
+ else {
+ var autoGenerateId = name.autoGenerateId;
+ return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(makeName(name)));
+ }
+ }
+ function generateNameCached(node) {
+ var nodeId = ts.getNodeId(node);
+ return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
}
function isUniqueName(name) {
- return !resolver.hasGlobalName(name) &&
- !ts.hasProperty(currentFileIdentifiers, name) &&
- !ts.hasProperty(generatedNameSet, name);
+ return !(hasGlobalName && hasGlobalName(name))
+ && !currentSourceFile.identifiers.has(name)
+ && !generatedNames.has(name);
}
function isUniqueLocalName(name, container) {
for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) {
- if (node.locals && ts.hasProperty(node.locals, name)) {
- if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
+ if (node.locals) {
+ var local = node.locals.get(name);
+ if (local && local.flags & (107455 | 1048576 | 8388608)) {
return false;
}
}
@@ -48841,21 +52914,21 @@ var ts;
}
function makeTempVariableName(flags) {
if (flags && !(tempFlags & flags)) {
- var name_39 = flags === 268435456 ? "_i" : "_n";
- if (isUniqueName(name_39)) {
+ var name = flags === 268435456 ? "_i" : "_n";
+ if (isUniqueName(name)) {
tempFlags |= flags;
- return name_39;
+ return name;
}
}
while (true) {
var count = tempFlags & 268435455;
tempFlags++;
if (count !== 8 && count !== 13) {
- var name_40 = count < 26
+ var name = count < 26
? "_" + String.fromCharCode(97 + count)
: "_" + (count - 26);
- if (isUniqueName(name_40)) {
- return name_40;
+ if (isUniqueName(name)) {
+ return name;
}
}
}
@@ -48868,7 +52941,8 @@ var ts;
while (true) {
var generatedName = baseName + i;
if (isUniqueName(generatedName)) {
- return generatedNameSet[generatedName] = generatedName;
+ generatedNames.set(generatedName, generatedName);
+ return generatedName;
}
i++;
}
@@ -48889,34 +52963,44 @@ var ts;
function generateNameForClassExpression() {
return makeUniqueName("class");
}
+ function generateNameForMethodOrAccessor(node) {
+ if (ts.isIdentifier(node.name)) {
+ return generateNameCached(node.name);
+ }
+ return makeTempVariableName(0);
+ }
function generateNameForNode(node) {
switch (node.kind) {
case 70:
return makeUniqueName(getTextOfNode(node));
- case 230:
- case 229:
+ case 232:
+ case 231:
return generateNameForModuleOrEnum(node);
- case 235:
- case 241:
+ case 237:
+ case 243:
return generateNameForImportOrExportDeclaration(node);
- case 225:
- case 226:
- case 240:
+ case 227:
+ case 228:
+ case 242:
return generateNameForExportDefault();
- case 197:
+ case 198:
return generateNameForClassExpression();
+ case 150:
+ case 152:
+ case 153:
+ return generateNameForMethodOrAccessor(node);
default:
return makeTempVariableName(0);
}
}
- function generateName(name) {
+ function makeName(name) {
switch (name.autoGenerateKind) {
case 1:
return makeTempVariableName(0);
case 2:
return makeTempVariableName(268435456);
case 3:
- return makeUniqueName(name.text);
+ return makeUniqueName(ts.unescapeIdentifier(name.text));
}
ts.Debug.fail("Unsupported GeneratedIdentifierKind.");
}
@@ -48935,48 +53019,38 @@ var ts;
}
return node;
}
- function getGeneratedIdentifier(name) {
- if (name.autoGenerateKind === 4) {
- var node = getNodeForGeneratedName(name);
- var nodeId = ts.getNodeId(node);
- return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
- }
- else {
- var autoGenerateId = name.autoGenerateId;
- return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(generateName(name)));
- }
- }
- function createDelimiterMap() {
- var delimiters = [];
- delimiters[0] = "";
- delimiters[16] = ",";
- delimiters[4] = " |";
- delimiters[8] = " &";
- return delimiters;
- }
- function getDelimiter(format) {
- return delimiters[format & 28];
- }
- function createBracketsMap() {
- var brackets = [];
- brackets[512] = ["{", "}"];
- brackets[1024] = ["(", ")"];
- brackets[2048] = ["<", ">"];
- brackets[4096] = ["[", "]"];
- return brackets;
- }
- function getOpeningBracket(format) {
- return brackets[format & 7680][0];
- }
- function getClosingBracket(format) {
- return brackets[format & 7680][1];
- }
}
- ts.emitFiles = emitFiles;
+ ts.createPrinter = createPrinter;
+ function createDelimiterMap() {
+ var delimiters = [];
+ delimiters[0] = "";
+ delimiters[16] = ",";
+ delimiters[4] = " |";
+ delimiters[8] = " &";
+ return delimiters;
+ }
+ function getDelimiter(format) {
+ return delimiters[format & 28];
+ }
+ function createBracketsMap() {
+ var brackets = [];
+ brackets[512] = ["{", "}"];
+ brackets[1024] = ["(", ")"];
+ brackets[2048] = ["<", ">"];
+ brackets[4096] = ["[", "]"];
+ return brackets;
+ }
+ function getOpeningBracket(format) {
+ return brackets[format & 7680][0];
+ }
+ function getClosingBracket(format) {
+ return brackets[format & 7680][1];
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
var emptyArray = [];
+ var ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
function findConfigFile(searchPath, fileExists, configName) {
if (configName === void 0) { configName = "tsconfig.json"; }
while (true) {
@@ -49008,7 +53082,8 @@ var ts;
commonPathComponents = sourcePathComponents;
return;
}
- for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
+ var n = Math.min(commonPathComponents.length, sourcePathComponents.length);
+ for (var i = 0; i < n; i++) {
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
if (i === 0) {
return true;
@@ -49035,7 +53110,6 @@ var ts;
function getCanonicalFileName(fileName) {
return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
}
- var unsupportedFileEncodingErrorCode = -2147024809;
function getSourceFile(fileName, languageVersion, onError) {
var text;
try {
@@ -49046,20 +53120,18 @@ var ts;
}
catch (e) {
if (onError) {
- onError(e.number === unsupportedFileEncodingErrorCode
- ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
- : e.message);
+ onError(e.message);
}
text = "";
}
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath) {
- if (directoryPath in existingDirectories) {
+ if (existingDirectories.has(directoryPath)) {
return true;
}
if (ts.sys.directoryExists(directoryPath)) {
- existingDirectories[directoryPath] = true;
+ existingDirectories.set(directoryPath, true);
return true;
}
return false;
@@ -49078,9 +53150,10 @@ var ts;
}
var hash = ts.sys.createHash(data);
var mtimeBefore = ts.sys.getModifiedTime(fileName);
- if (mtimeBefore && fileName in outputFingerprints) {
- var fingerprint = outputFingerprints[fileName];
- if (fingerprint.byteOrderMark === writeByteOrderMark &&
+ if (mtimeBefore) {
+ var fingerprint = outputFingerprints.get(fileName);
+ if (fingerprint &&
+ fingerprint.byteOrderMark === writeByteOrderMark &&
fingerprint.hash === hash &&
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
return;
@@ -49088,11 +53161,11 @@ var ts;
}
ts.sys.writeFile(fileName, data, writeByteOrderMark);
var mtimeAfter = ts.sys.getModifiedTime(fileName);
- outputFingerprints[fileName] = {
+ outputFingerprints.set(fileName, {
hash: hash,
byteOrderMark: writeByteOrderMark,
mtime: mtimeAfter
- };
+ });
}
function writeFile(fileName, data, writeByteOrderMark, onError) {
try {
@@ -49191,10 +53264,14 @@ var ts;
var resolutions = [];
var cache = ts.createMap();
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
- var name_41 = names_1[_i];
- var result = name_41 in cache
- ? cache[name_41]
- : cache[name_41] = loader(name_41, containingFile);
+ var name = names_1[_i];
+ var result = void 0;
+ if (cache.has(name)) {
+ result = cache.get(name);
+ }
+ else {
+ cache.set(name, result = loader(name, containingFile));
+ }
resolutions.push(result);
}
return resolutions;
@@ -49206,6 +53283,8 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var cachedSemanticDiagnosticsForFile = {};
+ var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
var fileProcessingDiagnostics = ts.createDiagnosticCollection();
var maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0;
@@ -49219,6 +53298,7 @@ var ts;
var currentDirectory = host.getCurrentDirectory();
var supportedExtensions = ts.getSupportedExtensions(options);
var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName);
+ var moduleResolutionCache;
var resolveModuleNamesWorker;
if (host.resolveModuleNames) {
resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile).map(function (resolved) {
@@ -49231,7 +53311,8 @@ var ts;
}); };
}
else {
- var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host).resolvedModule; };
+ moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); });
+ var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache).resolvedModule; };
resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); };
}
var resolveTypeReferenceDirectiveNamesWorker;
@@ -49267,6 +53348,7 @@ var ts;
}
}
}
+ moduleResolutionCache = undefined;
oldProgram = undefined;
program = {
getRootFileNames: function () { return rootNames; },
@@ -49300,7 +53382,7 @@ var ts;
return program;
function getCommonSourceDirectory() {
if (commonSourceDirectory === undefined) {
- var emittedFiles = ts.filterSourceFilesInDirectory(files, isSourceFileFromExternalLibrary);
+ var emittedFiles = ts.filter(files, function (file) { return ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary); });
if (options.rootDir && checkSourceFilesBelongToPath(emittedFiles, options.rootDir)) {
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory);
}
@@ -49319,7 +53401,7 @@ var ts;
classifiableNames = ts.createMap();
for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
var sourceFile = files_2[_i];
- ts.copyProperties(sourceFile.classifiableNames, classifiableNames);
+ ts.copyEntries(sourceFile.classifiableNames, classifiableNames);
}
}
return classifiableNames;
@@ -49362,7 +53444,7 @@ var ts;
: emptyArray;
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] == predictedToResolveToAmbientModuleMarker) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
result[i] = undefined;
}
else {
@@ -49473,7 +53555,7 @@ var ts;
newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
- for (var i = 0, len = newSourceFiles.length; i < len; i++) {
+ for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
}
files = newSourceFiles;
@@ -49502,7 +53584,7 @@ var ts;
};
}
function isSourceFileFromExternalLibrary(file) {
- return sourceFilesFoundSearchingNodeModules[file.path];
+ return sourceFilesFoundSearchingNodeModules.get(file.path);
}
function getDiagnosticsProducingTypeChecker() {
return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true));
@@ -49513,13 +53595,13 @@ var ts;
function getTypeChecker() {
return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false));
}
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
- return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles); });
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers) {
+ return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers); });
}
function isEmitBlocked(emitFileName) {
return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName));
}
- function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
+ function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers) {
var declarationDiagnostics = [];
if (options.noEmit) {
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
@@ -49540,7 +53622,8 @@ var ts;
}
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile);
ts.performance.mark("beforeEmit");
- var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles);
+ var transformers = emitOnlyDtsFiles ? [] : ts.getTransformers(options, customTransformers);
+ var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles, transformers);
ts.performance.mark("afterEmit");
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
return emitResult;
@@ -49601,16 +53684,42 @@ var ts;
}
}
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedSemanticDiagnosticsForFile, getSemanticDiagnosticsForFileNoCache);
+ }
+ function getSemanticDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
var bindDiagnostics = sourceFile.bindDiagnostics;
- var checkDiagnostics = ts.isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
+ var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
- return bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ return ts.isSourceFileJavaScript(sourceFile)
+ ? ts.filter(diagnostics, shouldReportDiagnostic)
+ : diagnostics;
});
}
+ function shouldReportDiagnostic(diagnostic) {
+ var file = diagnostic.file, start = diagnostic.start;
+ if (file) {
+ var lineStarts = ts.getLineStarts(file);
+ var line = ts.computeLineAndCharacterOfPosition(lineStarts, start).line;
+ while (line > 0) {
+ var previousLineText = file.text.slice(lineStarts[line - 1], lineStarts[line]);
+ var result = ignoreDiagnosticCommentRegEx.exec(previousLineText);
+ if (!result) {
+ return true;
+ }
+ if (result[3]) {
+ return false;
+ }
+ line--;
+ }
+ }
+ return true;
+ }
function getJavaScriptSyntacticDiagnosticsForFile(sourceFile) {
return runWithCancellationToken(function () {
var diagnostics = [];
@@ -49619,57 +53728,57 @@ var ts;
return diagnostics;
function walk(node) {
switch (parent.kind) {
- case 144:
- case 147:
+ case 145:
+ case 148:
if (parent.questionToken === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
return;
}
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
+ case 227:
case 225:
- case 223:
if (parent.type === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file));
return;
}
}
switch (node.kind) {
- case 234:
+ case 236:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file));
return;
- case 240:
+ case 242:
if (node.isExportEquals) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 255:
+ case 258:
var heritageClause = node;
if (heritageClause.token === 107) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 227:
+ case 229:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));
return;
- case 230:
+ case 232:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));
return;
- case 228:
+ case 230:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));
return;
- case 229:
+ case 231:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));
return;
- case 182:
+ case 183:
var typeAssertionExpression = node;
diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));
return;
@@ -49684,26 +53793,26 @@ var ts;
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
}
switch (parent.kind) {
- case 226:
- case 149:
- case 148:
+ case 228:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
- case 225:
+ case 227:
+ case 186:
+ case 227:
if (nodes === parent.typeParameters) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));
return;
}
- case 205:
+ case 207:
if (nodes === parent.modifiers) {
- return checkModifiers(nodes, parent.kind === 205);
+ return checkModifiers(nodes, parent.kind === 207);
}
break;
- case 147:
+ case 148:
if (nodes === parent.modifiers) {
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
var modifier = _a[_i];
@@ -49714,23 +53823,23 @@ var ts;
return;
}
break;
- case 144:
+ case 145:
if (nodes === parent.modifiers) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 179:
case 180:
- case 199:
+ case 181:
+ case 200:
if (nodes === parent.typeArguments) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file));
return;
}
break;
}
- for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) {
- var node = nodes_6[_b];
+ for (var _b = 0, nodes_8 = nodes; _b < nodes_8.length; _b++) {
+ var node = nodes_8[_b];
walk(node);
}
}
@@ -49766,11 +53875,33 @@ var ts;
});
}
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
+ }
+ function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
return ts.getDeclarationDiagnostics(getEmitHost(ts.noop), resolver, sourceFile);
});
}
+ function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics) {
+ var cachedResult = sourceFile
+ ? cache.perFile && cache.perFile.get(sourceFile.path)
+ : cache.allDiagnostics;
+ if (cachedResult) {
+ return cachedResult;
+ }
+ var result = getDiagnostics(sourceFile, cancellationToken) || emptyArray;
+ if (sourceFile) {
+ if (!cache.perFile) {
+ cache.perFile = ts.createFileMap();
+ }
+ cache.perFile.set(sourceFile.path, result);
+ }
+ else {
+ cache.allDiagnostics = result;
+ }
+ return result;
+ }
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
@@ -49810,11 +53941,10 @@ var ts;
if (options.importHelpers
&& (options.isolatedModules || isExternalModuleFile)
&& !file.isDeclarationFile) {
- var externalHelpersModuleReference = ts.createSynthesizedNode(9);
- externalHelpersModuleReference.text = ts.externalHelpersModuleNameText;
- var importDecl = ts.createSynthesizedNode(235);
- importDecl.parent = file;
+ var externalHelpersModuleReference = ts.createLiteral(ts.externalHelpersModuleNameText);
+ var importDecl = ts.createImportDeclaration(undefined, undefined, undefined);
externalHelpersModuleReference.parent = importDecl;
+ importDecl.parent = file;
imports = [externalHelpersModuleReference];
}
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
@@ -49830,9 +53960,9 @@ var ts;
return;
function collectModuleReferences(node, inAmbientModule) {
switch (node.kind) {
- case 235:
- case 234:
- case 241:
+ case 237:
+ case 236:
+ case 243:
var moduleNameExpr = ts.getExternalModuleName(node);
if (!moduleNameExpr || moduleNameExpr.kind !== 9) {
break;
@@ -49844,7 +53974,7 @@ var ts;
(imports || (imports = [])).push(moduleNameExpr);
}
break;
- case 230:
+ case 232:
if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
@@ -49928,18 +54058,18 @@ var ts;
if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) {
reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd);
}
- if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
- sourceFilesFoundSearchingNodeModules[file_1.path] = false;
+ if (file_1 && sourceFilesFoundSearchingNodeModules.get(file_1.path) && currentNodeModulesDepth === 0) {
+ sourceFilesFoundSearchingNodeModules.set(file_1.path, false);
if (!options.noResolve) {
processReferencedFiles(file_1, isDefaultLib);
processTypeReferenceDirectives(file_1);
}
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
- else if (file_1 && modulesWithElidedImports[file_1.path]) {
+ else if (file_1 && modulesWithElidedImports.get(file_1.path)) {
if (currentNodeModulesDepth < maxNodeModuleJsDepth) {
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
}
@@ -49955,7 +54085,7 @@ var ts;
});
filesByName.set(path, file);
if (file) {
- sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
+ sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
file.path = path;
if (host.useCaseSensitiveFileNames()) {
var existingFile = filesByNameIgnoreCase.get(path);
@@ -49999,7 +54129,7 @@ var ts;
}
}
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) {
- var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective];
+ var previousResolution = resolvedTypeReferenceDirectives.get(typeReferenceDirective);
if (previousResolution && previousResolution.primary) {
return;
}
@@ -50027,7 +54157,7 @@ var ts;
fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective));
}
if (saveResolution) {
- resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective;
+ resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
}
}
function createDiagnostic(refFile, refPos, refEnd, message) {
@@ -50068,7 +54198,7 @@ var ts;
var elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;
var shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport;
if (elideImport) {
- modulesWithElidedImports[file.path] = true;
+ modulesWithElidedImports.set(file.path, true);
}
else if (shouldAddFile) {
var path = ts.toPath(resolvedFileName, currentDirectory, getCanonicalFileName);
@@ -50086,8 +54216,8 @@ var ts;
}
function computeCommonSourceDirectory(sourceFiles) {
var fileNames = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var file = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
+ var file = sourceFiles_2[_i];
if (!file.isDeclarationFile) {
fileNames.push(file.fileName);
}
@@ -50098,8 +54228,8 @@ var ts;
var allFilesBelongToPath = true;
if (sourceFiles) {
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
+ for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
+ var sourceFile = sourceFiles_3[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
@@ -50192,7 +54322,7 @@ var ts;
if (options.lib && options.noLib) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"));
}
- if (options.noImplicitUseStrict && options.alwaysStrict) {
+ if (options.noImplicitUseStrict && (options.alwaysStrict === undefined ? options.strict : options.alwaysStrict)) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"));
}
var languageVersion = options.target || 0;
@@ -50232,6 +54362,9 @@ var ts;
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+ if (options.checkJs && !options.allowJs) {
+ programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"));
+ }
if (options.emitDecoratorMetadata &&
!options.experimentalDecorators) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
@@ -50250,7 +54383,7 @@ var ts;
if (!options.noEmit && !options.suppressOutputPathCheck) {
var emitHost = getEmitHost();
var emitFilesSeen_1 = ts.createFileMap(!host.useCaseSensitiveFileNames() ? function (key) { return key.toLocaleLowerCase(); } : undefined);
- ts.forEachExpectedEmitFile(emitHost, function (emitFileNames) {
+ ts.forEachEmittedFile(emitHost, function (emitFileNames) {
verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen_1);
verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen_1);
});
@@ -50308,39 +54441,11 @@ var ts;
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
ts.optionDeclarations = [
{
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
- {
name: "help",
shortName: "h",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
description: ts.Diagnostics.Print_this_message,
},
{
@@ -50349,56 +54454,73 @@ var ts;
type: "boolean"
},
{
- name: "init",
+ name: "all",
type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
},
{
- name: "inlineSourceMap",
+ name: "version",
+ shortName: "v",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
},
{
- name: "inlineSources",
+ name: "init",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
},
{
- name: "jsx",
- type: ts.createMap({
- "preserve": 1,
- "react": 2
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
+ name: "project",
+ shortName: "p",
type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
},
{
- name: "listFiles",
+ name: "pretty",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
- name: "locale",
- type: "string",
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
},
{
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0,
+ "es5": 1,
+ "es6": 2,
+ "es2015": 2,
+ "es2016": 3,
+ "es2017": 4,
+ "esnext": 5,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
},
{
name: "module",
shortName: "m",
- type: ts.createMap({
+ type: ts.createMapFromTemplate({
"none": ts.ModuleKind.None,
"commonjs": ts.ModuleKind.CommonJS,
"amd": ts.ModuleKind.AMD,
@@ -50407,238 +54529,232 @@ var ts;
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
}),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
},
{
- name: "newLine",
- type: ts.createMap({
- "crlf": 0,
- "lf": 1
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
},
{
- name: "noUnusedParameters",
+ name: "allowJs",
type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
},
{
- name: "noLib",
+ name: "checkJs",
type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
},
{
- name: "noResolve",
- type: "boolean",
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1,
+ "react-native": 3,
+ "react": 2
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
},
{
- name: "skipDefaultLibCheck",
+ name: "declaration",
+ shortName: "d",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
},
{
- name: "skipLibCheck",
+ name: "sourceMap",
type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
},
{
name: "outFile",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
},
{
name: "outDir",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
- name: "isolatedModules",
+ name: "removeComments",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
},
{
- name: "sourceMap",
+ name: "noEmit",
type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
},
{
- name: "suppressExcessPropertyErrors",
+ name: "importHelpers",
type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
},
{
- name: "suppressImplicitAnyIndexErrors",
+ name: "downlevelIteration",
type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
},
{
- name: "stripInternal",
+ name: "isolatedModules",
type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
},
{
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0,
- "es5": 1,
- "es6": 2,
- "es2015": 2,
- "es2016": 3,
- "es2017": 4,
- "esnext": 5,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
},
{
- name: "version",
- shortName: "v",
+ name: "noImplicitAny",
type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
},
{
- name: "watch",
- shortName: "w",
+ name: "strictNullChecks",
type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
},
{
- name: "experimentalDecorators",
+ name: "noImplicitThis",
type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
},
{
- name: "emitDecoratorMetadata",
+ name: "alwaysStrict",
type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
},
{
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
},
{
- name: "allowUnusedLabels",
+ name: "noUnusedParameters",
type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
},
{
name: "noImplicitReturns",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
},
{
name: "noFallthroughCasesInSwitch",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
},
{
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "baseUrl",
type: "string",
isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
},
{
name: "paths",
type: "object",
- isTSConfigOnly: true
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
},
{
name: "rootDirs",
@@ -50648,7 +54764,9 @@ var ts;
name: "rootDirs",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
},
{
name: "typeRoots",
@@ -50657,7 +54775,9 @@ var ts;
name: "typeRoots",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
},
{
name: "types",
@@ -50666,88 +54786,253 @@ var ts;
name: "types",
type: "string"
},
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
},
{
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
name: "traceResolution",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
},
{
- name: "allowJs",
+ name: "listFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
},
{
- name: "allowSyntheticDefaultImports",
+ name: "listEmittedFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0,
+ "lf": 1
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
},
{
name: "noImplicitUseStrict",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
},
{
- name: "listEmittedFiles",
- type: "boolean"
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
},
{
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
},
{
- name: "disableSizeLimit",
- type: "boolean"
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
},
{
- name: "strictNullChecks",
+ name: "skipLibCheck",
type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
},
{
- name: "importHelpers",
+ name: "allowUnusedLabels",
type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
},
{
- name: "alwaysStrict",
+ name: "allowUnreachableCode",
type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
}
];
ts.typeAcquisitionDeclarations = [
@@ -50779,8 +55064,7 @@ var ts;
ts.defaultInitCompilerOptions = {
module: ts.ModuleKind.CommonJS,
target: 1,
- noImplicitAny: false,
- sourceMap: false,
+ strict: true
};
var optionNameMapCache;
function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
@@ -50802,9 +55086,9 @@ var ts;
var optionNameMap = ts.createMap();
var shortOptionNames = ts.createMap();
ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
+ optionNameMap.set(option.name.toLowerCase(), option);
if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
+ shortOptionNames.set(option.shortName, option.name);
}
});
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
@@ -50812,19 +55096,12 @@ var ts;
}
ts.getOptionNameMap = getOptionNameMap;
function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
}
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
}
ts.parseCustomTypeOption = parseCustomTypeOption;
function parseListTypeOption(opt, value, errors) {
@@ -50868,11 +55145,12 @@ var ts;
}
else if (s.charCodeAt(0) === 45) {
s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
}
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
+ var opt = optionNameMap.get(s);
+ if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
}
@@ -50977,7 +55255,7 @@ var ts;
}
}
ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
- function generateTSConfig(options, fileNames) {
+ function generateTSConfig(options, fileNames, newLine) {
var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
var configurations = {
compilerOptions: serializeCompilerOptions(compilerOptions)
@@ -50985,7 +55263,7 @@ var ts;
if (fileNames && fileNames.length) {
configurations.files = fileNames;
}
- return configurations;
+ return writeConfigurations();
function getCustomTypeMapOfCommandLineOption(optionDefinition) {
if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
return undefined;
@@ -50998,53 +55276,121 @@ var ts;
}
}
function getNameOfCompilerOptionValue(value, customTypeMap) {
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
return key;
}
- }
- return undefined;
+ });
}
function serializeCompilerOptions(options) {
- var result = ts.createMap();
+ var result = {};
var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_42 in options) {
- if (ts.hasProperty(options, name_42)) {
- switch (name_42) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_42];
- var optionDefinition = optionsNameMap[name_42.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- result[name_42] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_42] = convertedValue;
- }
- else {
- result[name_42] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
}
+ result[name] = convertedValue;
}
- break;
+ else {
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
}
}
}
return result;
}
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
}
ts.generateTSConfig = generateTSConfig;
function removeComments(jsonText) {
@@ -51064,10 +55410,12 @@ var ts;
}
return output;
}
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
if (existingOptions === void 0) { existingOptions = {}; }
if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
if (resolutionStack.indexOf(resolvedPath) >= 0) {
@@ -51189,7 +55537,7 @@ var ts;
if (fileNames === undefined && includeSpecs === undefined) {
includeSpecs = ["**/*"];
}
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
}
@@ -51240,8 +55588,8 @@ var ts;
}
var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
+ var opt = optionNameMap.get(id);
+ if (opt) {
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
@@ -51275,8 +55623,9 @@ var ts;
}
function convertJsonOptionOfCustomType(opt, value, errors) {
var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
@@ -51293,7 +55642,7 @@ var ts;
var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
basePath = ts.normalizePath(basePath);
var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
var literalFileMap = ts.createMap();
@@ -51305,12 +55654,12 @@ var ts;
exclude = validateSpecs(exclude, errors, true);
}
var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
- var supportedExtensions = ts.getSupportedExtensions(options);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
if (fileNames) {
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
var fileName = fileNames_1[_i];
var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
+ literalFileMap.set(keyMapper(file), file);
}
}
if (include && include.length > 0) {
@@ -51321,14 +55670,13 @@ var ts;
}
removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
}
}
}
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
return {
fileNames: literalFiles.concat(wildcardFiles),
wildcardDirectories: wildcardDirectories
@@ -51336,8 +55684,8 @@ var ts;
}
function validateSpecs(specs, errors, allowTrailingRecursion) {
var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
}
@@ -51356,7 +55704,7 @@ var ts;
function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
+ var wildcardDirectories = {};
if (include !== undefined) {
var recursiveKeys = [];
for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
@@ -51377,14 +55725,15 @@ var ts;
}
}
}
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
}
}
- }
}
return wildcardDirectories;
}
@@ -51403,11 +55752,11 @@ var ts;
}
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
for (var i = 0; i < adjustedExtensionPriority; i++) {
var higherPriorityExtension = extensions[i];
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
return true;
}
}
@@ -51415,17 +55764,13 @@ var ts;
}
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
for (var i = nextExtensionPriority; i < extensions.length; i++) {
var lowerPriorityExtension = extensions[i];
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
+ wildcardFiles.delete(lowerPriorityPath);
}
}
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
function caseSensitiveKeyMapper(key) {
return key;
}
@@ -51451,7 +55796,7 @@ var ts;
}
}
function reportEmittedFiles(files) {
- if (!files || files.length == 0) {
+ if (!files || files.length === 0) {
return;
}
var currentDir = ts.sys.getCurrentDirectory();
@@ -51486,20 +55831,22 @@ var ts;
var gutterSeparator = " ";
var resetEscapeSequence = "\u001b[0m";
var ellipsis = "...";
- var categoryFormatMap = ts.createMap((_a = {},
- _a[ts.DiagnosticCategory.Warning] = yellowForegroundEscapeSequence,
- _a[ts.DiagnosticCategory.Error] = redForegroundEscapeSequence,
- _a[ts.DiagnosticCategory.Message] = blueForegroundEscapeSequence,
- _a));
+ function getCategoryFormat(category) {
+ switch (category) {
+ case ts.DiagnosticCategory.Warning: return yellowForegroundEscapeSequence;
+ case ts.DiagnosticCategory.Error: return redForegroundEscapeSequence;
+ case ts.DiagnosticCategory.Message: return blueForegroundEscapeSequence;
+ }
+ }
function formatAndReset(text, formatStyle) {
return formatStyle + text + resetEscapeSequence;
}
function reportDiagnosticWithColorAndContext(diagnostic, host) {
var output = "";
if (diagnostic.file) {
- var start = diagnostic.start, length_4 = diagnostic.length, file = diagnostic.file;
+ var start = diagnostic.start, length_5 = diagnostic.length, file = diagnostic.file;
var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character;
- var _b = ts.getLineAndCharacterOfPosition(file, start + length_4), lastLine = _b.line, lastLineChar = _b.character;
+ var _b = ts.getLineAndCharacterOfPosition(file, start + length_5), lastLine = _b.line, lastLineChar = _b.character;
var lastLineInFile = ts.getLineAndCharacterOfPosition(file, file.text.length).line;
var relativeFileName = host ? ts.convertToRelativePath(file.fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); }) : file.fileName;
var hasMoreThanFiveLines = (lastLine - firstLine) >= 4;
@@ -51539,7 +55886,7 @@ var ts;
output += ts.sys.newLine;
output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
}
- var categoryColor = categoryFormatMap[diagnostic.category];
+ var categoryColor = getCategoryFormat(diagnostic.category);
var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
output += ts.sys.newLine + ts.sys.newLine;
@@ -51551,7 +55898,7 @@ var ts;
var loc = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
output += diagnostic.file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + "): ";
}
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + ts.sys.newLine;
+ output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + (ts.sys.newLine + ts.sys.newLine + ts.sys.newLine);
ts.sys.write(output);
}
function padLeft(s, length) {
@@ -51603,9 +55950,9 @@ var ts;
printVersion();
return ts.sys.exit(ts.ExitStatus.Success);
}
- if (commandLine.options.help) {
+ if (commandLine.options.help || commandLine.options.all) {
printVersion();
- printHelp();
+ printHelp(commandLine.options.all);
return ts.sys.exit(ts.ExitStatus.Success);
}
if (commandLine.options.project) {
@@ -51639,7 +55986,7 @@ var ts;
}
if (commandLine.fileNames.length === 0 && !configFileName) {
printVersion();
- printHelp();
+ printHelp(commandLine.options.all);
return ts.sys.exit(ts.ExitStatus.Success);
}
if (ts.isWatchSet(commandLine.options)) {
@@ -51652,7 +55999,7 @@ var ts;
}
if (ts.sys.watchDirectory && configFileName) {
var directory = ts.getDirectoryPath(configFileName);
- directoryWatcher = ts.sys.watchDirectory(directory == "" ? "." : directory, watchedDirectoryChanged, true);
+ directoryWatcher = ts.sys.watchDirectory(directory === "" ? "." : directory, watchedDirectoryChanged, true);
}
}
performCompilation();
@@ -51695,9 +56042,8 @@ var ts;
}
if (!directoryWatcher && ts.sys.watchDirectory && configFileName) {
var directory = ts.getDirectoryPath(configFileName);
- directoryWatcher = ts.sys.watchDirectory(directory == "" ? "." : directory, watchedDirectoryChanged, true);
+ directoryWatcher = ts.sys.watchDirectory(directory === "" ? "." : directory, watchedDirectoryChanged, true);
}
- ;
}
return configParseResult;
}
@@ -51730,9 +56076,11 @@ var ts;
reportWatchDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Compilation_complete_Watching_for_file_changes));
}
function cachedFileExists(fileName) {
- return fileName in cachedExistingFiles
- ? cachedExistingFiles[fileName]
- : cachedExistingFiles[fileName] = hostFileExists(fileName);
+ var fileExists = cachedExistingFiles.get(fileName);
+ if (fileExists === undefined) {
+ cachedExistingFiles.set(fileName, fileExists = hostFileExists(fileName));
+ }
+ return fileExists;
}
function getSourceFile(fileName, languageVersion, onError) {
if (cachedProgram) {
@@ -51884,17 +56232,17 @@ var ts;
var nameSize = 0;
var valueSize = 0;
for (var _i = 0, statistics_1 = statistics; _i < statistics_1.length; _i++) {
- var _a = statistics_1[_i], name_43 = _a.name, value = _a.value;
- if (name_43.length > nameSize) {
- nameSize = name_43.length;
+ var _a = statistics_1[_i], name = _a.name, value = _a.value;
+ if (name.length > nameSize) {
+ nameSize = name.length;
}
if (value.length > valueSize) {
valueSize = value.length;
}
}
for (var _b = 0, statistics_2 = statistics; _b < statistics_2.length; _b++) {
- var _c = statistics_2[_b], name_44 = _c.name, value = _c.value;
- ts.sys.write(padRight(name_44 + ":", nameSize + 2) + padLeft(value.toString(), valueSize) + ts.sys.newLine);
+ var _c = statistics_2[_b], name = _c.name, value = _c.value;
+ ts.sys.write(padRight(name + ":", nameSize + 2) + padLeft(value.toString(), valueSize) + ts.sys.newLine);
}
}
function reportStatisticalValue(name, value) {
@@ -51910,7 +56258,7 @@ var ts;
function printVersion() {
ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine);
}
- function printHelp() {
+ function printHelp(showAllOptions) {
var output = [];
var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length;
var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length;
@@ -51925,8 +56273,9 @@ var ts;
output.push(padding + "tsc @args.txt" + ts.sys.newLine);
output.push(ts.sys.newLine);
output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine);
- var optsList = ts.filter(ts.optionDeclarations.slice(), function (v) { return !v.experimental; });
- optsList.sort(function (a, b) { return ts.compareValues(a.name.toLowerCase(), b.name.toLowerCase()); });
+ var optsList = showAllOptions ?
+ ts.optionDeclarations.slice().sort(function (a, b) { return ts.compareValues(a.name.toLowerCase(), b.name.toLowerCase()); }) :
+ ts.filter(ts.optionDeclarations.slice(), function (v) { return v.showInSimplifiedHelpView; });
marginLength = 0;
var usageColumn = [];
var descriptionColumn = [];
@@ -51948,13 +56297,9 @@ var ts;
var description = void 0;
if (option.name === "lib") {
description = getDiagnosticText(option.description);
- var options = [];
var element = option.element;
var typeMap = element.type;
- for (var key in typeMap) {
- options.push("'" + key + "'");
- }
- optionsDescriptionMap[description] = options;
+ optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; }));
}
else {
description = getDiagnosticText(option.description);
@@ -51969,7 +56314,7 @@ var ts;
for (var i = 0; i < usageColumn.length; i++) {
var usage = usageColumn[i];
var description = descriptionColumn[i];
- var kindsList = optionsDescriptionMap[description];
+ var kindsList = optionsDescriptionMap.get(description);
output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine);
if (kindsList) {
output.push(makePadding(marginLength + 4));
@@ -52002,12 +56347,11 @@ var ts;
reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file), undefined);
}
else {
- ts.sys.writeFile(file, JSON.stringify(ts.generateTSConfig(options, fileNames), undefined, 4));
+ ts.sys.writeFile(file, ts.generateTSConfig(options, fileNames, ts.sys.newLine));
reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Successfully_created_a_tsconfig_json_file), undefined);
}
return;
}
- var _a;
})(ts || (ts = {}));
if (ts.sys.tryEnableSourceMapsForHost && /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))) {
ts.sys.tryEnableSourceMapsForHost();
diff --git a/node_modules/typescript/lib/tsserver.js b/node_modules/typescript/lib/tsserver.js
index 51ba6b309..65d4969da 100644
--- a/node_modules/typescript/lib/tsserver.js
+++ b/node_modules/typescript/lib/tsserver.js
@@ -13,13 +13,455 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+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;
};
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
var ts;
(function (ts) {
+ var SyntaxKind;
+ (function (SyntaxKind) {
+ SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown";
+ SyntaxKind[SyntaxKind["EndOfFileToken"] = 1] = "EndOfFileToken";
+ SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
+ SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia";
+ SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia";
+ SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia";
+ SyntaxKind[SyntaxKind["ShebangTrivia"] = 6] = "ShebangTrivia";
+ SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 7] = "ConflictMarkerTrivia";
+ SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral";
+ SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral";
+ SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText";
+ SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral";
+ SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral";
+ SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead";
+ SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle";
+ SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail";
+ SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken";
+ SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken";
+ SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken";
+ SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken";
+ SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken";
+ SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken";
+ SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken";
+ SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken";
+ SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken";
+ SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken";
+ SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken";
+ SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken";
+ SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken";
+ SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken";
+ SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken";
+ SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken";
+ SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken";
+ SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken";
+ SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken";
+ SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken";
+ SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken";
+ SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken";
+ SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken";
+ SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken";
+ SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken";
+ SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken";
+ SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken";
+ SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken";
+ SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken";
+ SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken";
+ SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken";
+ SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken";
+ SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken";
+ SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken";
+ SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken";
+ SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken";
+ SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken";
+ SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken";
+ SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken";
+ SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken";
+ SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken";
+ SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken";
+ SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken";
+ SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken";
+ SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken";
+ SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier";
+ SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword";
+ SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword";
+ SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword";
+ SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword";
+ SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword";
+ SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword";
+ SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword";
+ SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword";
+ SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword";
+ SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword";
+ SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword";
+ SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword";
+ SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword";
+ SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword";
+ SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword";
+ SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword";
+ SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword";
+ SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword";
+ SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword";
+ SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword";
+ SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword";
+ SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword";
+ SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword";
+ SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword";
+ SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword";
+ SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword";
+ SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword";
+ SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword";
+ SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword";
+ SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword";
+ SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword";
+ SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword";
+ SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword";
+ SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword";
+ SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword";
+ SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword";
+ SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword";
+ SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword";
+ SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword";
+ SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword";
+ SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword";
+ SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword";
+ SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword";
+ SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword";
+ SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword";
+ SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword";
+ SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword";
+ SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword";
+ SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword";
+ SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword";
+ SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword";
+ SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword";
+ SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword";
+ SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword";
+ SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword";
+ SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword";
+ SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword";
+ SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword";
+ SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword";
+ SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword";
+ SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword";
+ SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword";
+ SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword";
+ SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword";
+ SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword";
+ SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword";
+ SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword";
+ SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword";
+ SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword";
+ SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword";
+ SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword";
+ SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName";
+ SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName";
+ SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter";
+ SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter";
+ SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator";
+ SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature";
+ SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration";
+ SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature";
+ SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration";
+ SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor";
+ SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor";
+ SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor";
+ SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature";
+ SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature";
+ SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature";
+ SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate";
+ SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference";
+ SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType";
+ SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType";
+ SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery";
+ SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral";
+ SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType";
+ SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType";
+ SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType";
+ SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType";
+ SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType";
+ SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType";
+ SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator";
+ SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType";
+ SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType";
+ SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType";
+ SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern";
+ SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern";
+ SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement";
+ SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression";
+ SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression";
+ SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression";
+ SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression";
+ SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression";
+ SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression";
+ SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression";
+ SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression";
+ SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression";
+ SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression";
+ SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction";
+ SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression";
+ SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression";
+ SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression";
+ SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression";
+ SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression";
+ SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression";
+ SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression";
+ SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression";
+ SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression";
+ SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression";
+ SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement";
+ SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression";
+ SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression";
+ SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments";
+ SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression";
+ SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty";
+ SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan";
+ SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement";
+ SyntaxKind[SyntaxKind["Block"] = 206] = "Block";
+ SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement";
+ SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement";
+ SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement";
+ SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement";
+ SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement";
+ SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement";
+ SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement";
+ SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement";
+ SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement";
+ SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement";
+ SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement";
+ SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement";
+ SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement";
+ SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement";
+ SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement";
+ SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement";
+ SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement";
+ SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement";
+ SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration";
+ SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList";
+ SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration";
+ SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration";
+ SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration";
+ SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration";
+ SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration";
+ SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration";
+ SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock";
+ SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock";
+ SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration";
+ SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration";
+ SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration";
+ SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause";
+ SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport";
+ SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports";
+ SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier";
+ SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment";
+ SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration";
+ SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports";
+ SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier";
+ SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration";
+ SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference";
+ SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement";
+ SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement";
+ SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement";
+ SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement";
+ SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute";
+ SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes";
+ SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute";
+ SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression";
+ SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause";
+ SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause";
+ SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause";
+ SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause";
+ SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment";
+ SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment";
+ SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment";
+ SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember";
+ SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile";
+ SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle";
+ SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression";
+ SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType";
+ SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType";
+ SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType";
+ SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType";
+ SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType";
+ SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType";
+ SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType";
+ SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType";
+ SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember";
+ SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference";
+ SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType";
+ SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType";
+ SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType";
+ SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType";
+ SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType";
+ SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment";
+ SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag";
+ SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["Count"] = 298] = "Count";
+ SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment";
+ SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment";
+ SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment";
+ SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment";
+ SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord";
+ SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord";
+ SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword";
+ SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword";
+ SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord";
+ SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord";
+ SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode";
+ SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode";
+ SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation";
+ SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation";
+ SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
+ SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken";
+ SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
+ SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken";
+ SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
+ SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken";
+ SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken";
+ SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken";
+ SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator";
+ SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator";
+ SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode";
+ SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode";
+ })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
+ var NodeFlags;
+ (function (NodeFlags) {
+ NodeFlags[NodeFlags["None"] = 0] = "None";
+ NodeFlags[NodeFlags["Let"] = 1] = "Let";
+ NodeFlags[NodeFlags["Const"] = 2] = "Const";
+ NodeFlags[NodeFlags["NestedNamespace"] = 4] = "NestedNamespace";
+ NodeFlags[NodeFlags["Synthesized"] = 8] = "Synthesized";
+ NodeFlags[NodeFlags["Namespace"] = 16] = "Namespace";
+ NodeFlags[NodeFlags["ExportContext"] = 32] = "ExportContext";
+ NodeFlags[NodeFlags["ContainsThis"] = 64] = "ContainsThis";
+ NodeFlags[NodeFlags["HasImplicitReturn"] = 128] = "HasImplicitReturn";
+ NodeFlags[NodeFlags["HasExplicitReturn"] = 256] = "HasExplicitReturn";
+ NodeFlags[NodeFlags["GlobalAugmentation"] = 512] = "GlobalAugmentation";
+ NodeFlags[NodeFlags["HasAsyncFunctions"] = 1024] = "HasAsyncFunctions";
+ NodeFlags[NodeFlags["DisallowInContext"] = 2048] = "DisallowInContext";
+ NodeFlags[NodeFlags["YieldContext"] = 4096] = "YieldContext";
+ NodeFlags[NodeFlags["DecoratorContext"] = 8192] = "DecoratorContext";
+ NodeFlags[NodeFlags["AwaitContext"] = 16384] = "AwaitContext";
+ NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+ NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+ NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+ NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
+ NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
+ NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
+ NodeFlags[NodeFlags["ContextFlags"] = 96256] = "ContextFlags";
+ NodeFlags[NodeFlags["TypeExcludesFlags"] = 20480] = "TypeExcludesFlags";
+ })(NodeFlags = ts.NodeFlags || (ts.NodeFlags = {}));
+ var ModifierFlags;
+ (function (ModifierFlags) {
+ ModifierFlags[ModifierFlags["None"] = 0] = "None";
+ ModifierFlags[ModifierFlags["Export"] = 1] = "Export";
+ ModifierFlags[ModifierFlags["Ambient"] = 2] = "Ambient";
+ ModifierFlags[ModifierFlags["Public"] = 4] = "Public";
+ ModifierFlags[ModifierFlags["Private"] = 8] = "Private";
+ ModifierFlags[ModifierFlags["Protected"] = 16] = "Protected";
+ ModifierFlags[ModifierFlags["Static"] = 32] = "Static";
+ ModifierFlags[ModifierFlags["Readonly"] = 64] = "Readonly";
+ ModifierFlags[ModifierFlags["Abstract"] = 128] = "Abstract";
+ ModifierFlags[ModifierFlags["Async"] = 256] = "Async";
+ ModifierFlags[ModifierFlags["Default"] = 512] = "Default";
+ ModifierFlags[ModifierFlags["Const"] = 2048] = "Const";
+ ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+ ModifierFlags[ModifierFlags["AccessibilityModifier"] = 28] = "AccessibilityModifier";
+ ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 92] = "ParameterPropertyModifier";
+ ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier";
+ ModifierFlags[ModifierFlags["TypeScriptModifier"] = 2270] = "TypeScriptModifier";
+ ModifierFlags[ModifierFlags["ExportDefault"] = 513] = "ExportDefault";
+ })(ModifierFlags = ts.ModifierFlags || (ts.ModifierFlags = {}));
+ var JsxFlags;
+ (function (JsxFlags) {
+ JsxFlags[JsxFlags["None"] = 0] = "None";
+ JsxFlags[JsxFlags["IntrinsicNamedElement"] = 1] = "IntrinsicNamedElement";
+ JsxFlags[JsxFlags["IntrinsicIndexedElement"] = 2] = "IntrinsicIndexedElement";
+ JsxFlags[JsxFlags["IntrinsicElement"] = 3] = "IntrinsicElement";
+ })(JsxFlags = ts.JsxFlags || (ts.JsxFlags = {}));
+ var RelationComparisonResult;
+ (function (RelationComparisonResult) {
+ RelationComparisonResult[RelationComparisonResult["Succeeded"] = 1] = "Succeeded";
+ RelationComparisonResult[RelationComparisonResult["Failed"] = 2] = "Failed";
+ RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported";
+ })(RelationComparisonResult = ts.RelationComparisonResult || (ts.RelationComparisonResult = {}));
+ var GeneratedIdentifierKind;
+ (function (GeneratedIdentifierKind) {
+ GeneratedIdentifierKind[GeneratedIdentifierKind["None"] = 0] = "None";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Auto"] = 1] = "Auto";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Loop"] = 2] = "Loop";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Unique"] = 3] = "Unique";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Node"] = 4] = "Node";
+ })(GeneratedIdentifierKind = ts.GeneratedIdentifierKind || (ts.GeneratedIdentifierKind = {}));
+ var NumericLiteralFlags;
+ (function (NumericLiteralFlags) {
+ NumericLiteralFlags[NumericLiteralFlags["None"] = 0] = "None";
+ NumericLiteralFlags[NumericLiteralFlags["Scientific"] = 2] = "Scientific";
+ NumericLiteralFlags[NumericLiteralFlags["Octal"] = 4] = "Octal";
+ NumericLiteralFlags[NumericLiteralFlags["HexSpecifier"] = 8] = "HexSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinarySpecifier"] = 16] = "BinarySpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["OctalSpecifier"] = 32] = "OctalSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinaryOrOctalSpecifier"] = 48] = "BinaryOrOctalSpecifier";
+ })(NumericLiteralFlags = ts.NumericLiteralFlags || (ts.NumericLiteralFlags = {}));
+ var FlowFlags;
+ (function (FlowFlags) {
+ FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable";
+ FlowFlags[FlowFlags["Start"] = 2] = "Start";
+ FlowFlags[FlowFlags["BranchLabel"] = 4] = "BranchLabel";
+ FlowFlags[FlowFlags["LoopLabel"] = 8] = "LoopLabel";
+ FlowFlags[FlowFlags["Assignment"] = 16] = "Assignment";
+ FlowFlags[FlowFlags["TrueCondition"] = 32] = "TrueCondition";
+ FlowFlags[FlowFlags["FalseCondition"] = 64] = "FalseCondition";
+ FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause";
+ FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation";
+ FlowFlags[FlowFlags["Referenced"] = 512] = "Referenced";
+ FlowFlags[FlowFlags["Shared"] = 1024] = "Shared";
+ FlowFlags[FlowFlags["PreFinally"] = 2048] = "PreFinally";
+ FlowFlags[FlowFlags["AfterFinally"] = 4096] = "AfterFinally";
+ FlowFlags[FlowFlags["Label"] = 12] = "Label";
+ FlowFlags[FlowFlags["Condition"] = 96] = "Condition";
+ })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {}));
var OperationCanceledException = (function () {
function OperationCanceledException() {
}
@@ -32,6 +474,55 @@ var ts;
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
+ var TypeFormatFlags;
+ (function (TypeFormatFlags) {
+ TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None";
+ TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 1] = "WriteArrayAsGenericType";
+ TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 2] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 4] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 8] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 16] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 2048] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 4096] = "AddUndefined";
+ })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
+ var SymbolFormatFlags;
+ (function (SymbolFormatFlags) {
+ SymbolFormatFlags[SymbolFormatFlags["None"] = 0] = "None";
+ SymbolFormatFlags[SymbolFormatFlags["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments";
+ SymbolFormatFlags[SymbolFormatFlags["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing";
+ })(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
+ var SymbolAccessibility;
+ (function (SymbolAccessibility) {
+ SymbolAccessibility[SymbolAccessibility["Accessible"] = 0] = "Accessible";
+ SymbolAccessibility[SymbolAccessibility["NotAccessible"] = 1] = "NotAccessible";
+ SymbolAccessibility[SymbolAccessibility["CannotBeNamed"] = 2] = "CannotBeNamed";
+ })(SymbolAccessibility = ts.SymbolAccessibility || (ts.SymbolAccessibility = {}));
+ var SyntheticSymbolKind;
+ (function (SyntheticSymbolKind) {
+ SyntheticSymbolKind[SyntheticSymbolKind["UnionOrIntersection"] = 0] = "UnionOrIntersection";
+ SyntheticSymbolKind[SyntheticSymbolKind["Spread"] = 1] = "Spread";
+ })(SyntheticSymbolKind = ts.SyntheticSymbolKind || (ts.SyntheticSymbolKind = {}));
+ var TypePredicateKind;
+ (function (TypePredicateKind) {
+ TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
+ TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
+ })(TypePredicateKind = ts.TypePredicateKind || (ts.TypePredicateKind = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
TypeReferenceSerializationKind[TypeReferenceSerializationKind["Unknown"] = 0] = "Unknown";
@@ -46,6 +537,191 @@ var ts;
TypeReferenceSerializationKind[TypeReferenceSerializationKind["TypeWithCallSignature"] = 9] = "TypeWithCallSignature";
TypeReferenceSerializationKind[TypeReferenceSerializationKind["ObjectType"] = 10] = "ObjectType";
})(TypeReferenceSerializationKind = ts.TypeReferenceSerializationKind || (ts.TypeReferenceSerializationKind = {}));
+ var SymbolFlags;
+ (function (SymbolFlags) {
+ SymbolFlags[SymbolFlags["None"] = 0] = "None";
+ SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable";
+ SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable";
+ SymbolFlags[SymbolFlags["Property"] = 4] = "Property";
+ SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember";
+ SymbolFlags[SymbolFlags["Function"] = 16] = "Function";
+ SymbolFlags[SymbolFlags["Class"] = 32] = "Class";
+ SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface";
+ SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum";
+ SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum";
+ SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule";
+ SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule";
+ SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral";
+ SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral";
+ SymbolFlags[SymbolFlags["Method"] = 8192] = "Method";
+ SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor";
+ SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor";
+ SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor";
+ SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature";
+ SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter";
+ SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias";
+ SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue";
+ SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType";
+ SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace";
+ SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias";
+ SymbolFlags[SymbolFlags["Prototype"] = 16777216] = "Prototype";
+ SymbolFlags[SymbolFlags["ExportStar"] = 33554432] = "ExportStar";
+ SymbolFlags[SymbolFlags["Optional"] = 67108864] = "Optional";
+ SymbolFlags[SymbolFlags["Transient"] = 134217728] = "Transient";
+ SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
+ SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
+ SymbolFlags[SymbolFlags["Value"] = 107455] = "Value";
+ SymbolFlags[SymbolFlags["Type"] = 793064] = "Type";
+ SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace";
+ SymbolFlags[SymbolFlags["Module"] = 1536] = "Module";
+ SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor";
+ SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 107454] = "FunctionScopedVariableExcludes";
+ SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes";
+ SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes";
+ SymbolFlags[SymbolFlags["PropertyExcludes"] = 0] = "PropertyExcludes";
+ SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes";
+ SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes";
+ SymbolFlags[SymbolFlags["ClassExcludes"] = 899519] = "ClassExcludes";
+ SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792968] = "InterfaceExcludes";
+ SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes";
+ SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes";
+ SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes";
+ SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes";
+ SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes";
+ SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes";
+ SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes";
+ SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530920] = "TypeParameterExcludes";
+ SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793064] = "TypeAliasExcludes";
+ SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes";
+ SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember";
+ SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
+ SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
+ SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
+ SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
+ SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
+ SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export";
+ SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
+ SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
+ })(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
+ var CheckFlags;
+ (function (CheckFlags) {
+ CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
+ CheckFlags[CheckFlags["SyntheticProperty"] = 2] = "SyntheticProperty";
+ CheckFlags[CheckFlags["SyntheticMethod"] = 4] = "SyntheticMethod";
+ CheckFlags[CheckFlags["Readonly"] = 8] = "Readonly";
+ CheckFlags[CheckFlags["Partial"] = 16] = "Partial";
+ CheckFlags[CheckFlags["HasNonUniformType"] = 32] = "HasNonUniformType";
+ CheckFlags[CheckFlags["ContainsPublic"] = 64] = "ContainsPublic";
+ CheckFlags[CheckFlags["ContainsProtected"] = 128] = "ContainsProtected";
+ CheckFlags[CheckFlags["ContainsPrivate"] = 256] = "ContainsPrivate";
+ CheckFlags[CheckFlags["ContainsStatic"] = 512] = "ContainsStatic";
+ CheckFlags[CheckFlags["Synthetic"] = 6] = "Synthetic";
+ })(CheckFlags = ts.CheckFlags || (ts.CheckFlags = {}));
+ var NodeCheckFlags;
+ (function (NodeCheckFlags) {
+ NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked";
+ NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureNewTarget"] = 8] = "CaptureNewTarget";
+ NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance";
+ NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic";
+ NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked";
+ NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuper"] = 2048] = "AsyncMethodWithSuper";
+ NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuperBinding"] = 4096] = "AsyncMethodWithSuperBinding";
+ NodeCheckFlags[NodeCheckFlags["CaptureArguments"] = 8192] = "CaptureArguments";
+ NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 16384] = "EnumValuesComputed";
+ NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 32768] = "LexicalModuleMergesWithClass";
+ NodeCheckFlags[NodeCheckFlags["LoopWithCapturedBlockScopedBinding"] = 65536] = "LoopWithCapturedBlockScopedBinding";
+ NodeCheckFlags[NodeCheckFlags["CapturedBlockScopedBinding"] = 131072] = "CapturedBlockScopedBinding";
+ NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 262144] = "BlockScopedBindingInLoop";
+ NodeCheckFlags[NodeCheckFlags["ClassWithBodyScopedClassBinding"] = 524288] = "ClassWithBodyScopedClassBinding";
+ NodeCheckFlags[NodeCheckFlags["BodyScopedClassBinding"] = 1048576] = "BodyScopedClassBinding";
+ NodeCheckFlags[NodeCheckFlags["NeedsLoopOutParameter"] = 2097152] = "NeedsLoopOutParameter";
+ NodeCheckFlags[NodeCheckFlags["AssignmentsMarked"] = 4194304] = "AssignmentsMarked";
+ NodeCheckFlags[NodeCheckFlags["ClassWithConstructorReference"] = 8388608] = "ClassWithConstructorReference";
+ NodeCheckFlags[NodeCheckFlags["ConstructorReferenceInClass"] = 16777216] = "ConstructorReferenceInClass";
+ })(NodeCheckFlags = ts.NodeCheckFlags || (ts.NodeCheckFlags = {}));
+ var TypeFlags;
+ (function (TypeFlags) {
+ TypeFlags[TypeFlags["Any"] = 1] = "Any";
+ TypeFlags[TypeFlags["String"] = 2] = "String";
+ TypeFlags[TypeFlags["Number"] = 4] = "Number";
+ TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean";
+ TypeFlags[TypeFlags["Enum"] = 16] = "Enum";
+ TypeFlags[TypeFlags["StringLiteral"] = 32] = "StringLiteral";
+ TypeFlags[TypeFlags["NumberLiteral"] = 64] = "NumberLiteral";
+ TypeFlags[TypeFlags["BooleanLiteral"] = 128] = "BooleanLiteral";
+ TypeFlags[TypeFlags["EnumLiteral"] = 256] = "EnumLiteral";
+ TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol";
+ TypeFlags[TypeFlags["Void"] = 1024] = "Void";
+ TypeFlags[TypeFlags["Undefined"] = 2048] = "Undefined";
+ TypeFlags[TypeFlags["Null"] = 4096] = "Null";
+ TypeFlags[TypeFlags["Never"] = 8192] = "Never";
+ TypeFlags[TypeFlags["TypeParameter"] = 16384] = "TypeParameter";
+ TypeFlags[TypeFlags["Object"] = 32768] = "Object";
+ TypeFlags[TypeFlags["Union"] = 65536] = "Union";
+ TypeFlags[TypeFlags["Intersection"] = 131072] = "Intersection";
+ TypeFlags[TypeFlags["Index"] = 262144] = "Index";
+ TypeFlags[TypeFlags["IndexedAccess"] = 524288] = "IndexedAccess";
+ TypeFlags[TypeFlags["FreshLiteral"] = 1048576] = "FreshLiteral";
+ TypeFlags[TypeFlags["ContainsWideningType"] = 2097152] = "ContainsWideningType";
+ TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral";
+ TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType";
+ TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
+ TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
+ TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
+ TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["StringOrNumberLiteral"] = 96] = "StringOrNumberLiteral";
+ TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
+ TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy";
+ TypeFlags[TypeFlags["Intrinsic"] = 16793231] = "Intrinsic";
+ TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
+ TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
+ TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike";
+ TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike";
+ TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
+ TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
+ TypeFlags[TypeFlags["StructuredType"] = 229376] = "StructuredType";
+ TypeFlags[TypeFlags["StructuredOrTypeVariable"] = 1032192] = "StructuredOrTypeVariable";
+ TypeFlags[TypeFlags["TypeVariable"] = 540672] = "TypeVariable";
+ TypeFlags[TypeFlags["Narrowable"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
+ TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
+ TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags";
+ })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
+ var ObjectFlags;
+ (function (ObjectFlags) {
+ ObjectFlags[ObjectFlags["Class"] = 1] = "Class";
+ ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface";
+ ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference";
+ ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple";
+ ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous";
+ ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped";
+ ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated";
+ ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral";
+ ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray";
+ ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
+ ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
+ })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {}));
+ var SignatureKind;
+ (function (SignatureKind) {
+ SignatureKind[SignatureKind["Call"] = 0] = "Call";
+ SignatureKind[SignatureKind["Construct"] = 1] = "Construct";
+ })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {}));
+ var IndexKind;
+ (function (IndexKind) {
+ IndexKind[IndexKind["String"] = 0] = "String";
+ IndexKind[IndexKind["Number"] = 1] = "Number";
+ })(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var SpecialPropertyAssignmentKind;
+ (function (SpecialPropertyAssignmentKind) {
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["None"] = 0] = "None";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ExportsProperty"] = 1] = "ExportsProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ModuleExports"] = 2] = "ModuleExports";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["PrototypeProperty"] = 3] = "PrototypeProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ThisProperty"] = 4] = "ThisProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["Property"] = 5] = "Property";
+ })(SpecialPropertyAssignmentKind = ts.SpecialPropertyAssignmentKind || (ts.SpecialPropertyAssignmentKind = {}));
var DiagnosticCategory;
(function (DiagnosticCategory) {
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
@@ -66,6 +742,179 @@ var ts;
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
+ var JsxEmit;
+ (function (JsxEmit) {
+ JsxEmit[JsxEmit["None"] = 0] = "None";
+ JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
+ JsxEmit[JsxEmit["React"] = 2] = "React";
+ JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
+ })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {}));
+ var NewLineKind;
+ (function (NewLineKind) {
+ NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed";
+ NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed";
+ })(NewLineKind = ts.NewLineKind || (ts.NewLineKind = {}));
+ var ScriptKind;
+ (function (ScriptKind) {
+ ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown";
+ ScriptKind[ScriptKind["JS"] = 1] = "JS";
+ ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
+ ScriptKind[ScriptKind["TS"] = 3] = "TS";
+ ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+ ScriptKind[ScriptKind["External"] = 5] = "External";
+ })(ScriptKind = ts.ScriptKind || (ts.ScriptKind = {}));
+ var ScriptTarget;
+ (function (ScriptTarget) {
+ ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3";
+ ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5";
+ ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015";
+ ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016";
+ ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017";
+ ScriptTarget[ScriptTarget["ESNext"] = 5] = "ESNext";
+ ScriptTarget[ScriptTarget["Latest"] = 5] = "Latest";
+ })(ScriptTarget = ts.ScriptTarget || (ts.ScriptTarget = {}));
+ var LanguageVariant;
+ (function (LanguageVariant) {
+ LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard";
+ LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX";
+ })(LanguageVariant = ts.LanguageVariant || (ts.LanguageVariant = {}));
+ var DiagnosticStyle;
+ (function (DiagnosticStyle) {
+ DiagnosticStyle[DiagnosticStyle["Simple"] = 0] = "Simple";
+ DiagnosticStyle[DiagnosticStyle["Pretty"] = 1] = "Pretty";
+ })(DiagnosticStyle = ts.DiagnosticStyle || (ts.DiagnosticStyle = {}));
+ var WatchDirectoryFlags;
+ (function (WatchDirectoryFlags) {
+ WatchDirectoryFlags[WatchDirectoryFlags["None"] = 0] = "None";
+ WatchDirectoryFlags[WatchDirectoryFlags["Recursive"] = 1] = "Recursive";
+ })(WatchDirectoryFlags = ts.WatchDirectoryFlags || (ts.WatchDirectoryFlags = {}));
+ var CharacterCodes;
+ (function (CharacterCodes) {
+ CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter";
+ CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter";
+ CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed";
+ CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn";
+ CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator";
+ CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator";
+ CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine";
+ CharacterCodes[CharacterCodes["space"] = 32] = "space";
+ CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace";
+ CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad";
+ CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad";
+ CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace";
+ CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace";
+ CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace";
+ CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace";
+ CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace";
+ CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace";
+ CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace";
+ CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace";
+ CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace";
+ CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace";
+ CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace";
+ CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace";
+ CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace";
+ CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham";
+ CharacterCodes[CharacterCodes["_"] = 95] = "_";
+ CharacterCodes[CharacterCodes["$"] = 36] = "$";
+ CharacterCodes[CharacterCodes["_0"] = 48] = "_0";
+ CharacterCodes[CharacterCodes["_1"] = 49] = "_1";
+ CharacterCodes[CharacterCodes["_2"] = 50] = "_2";
+ CharacterCodes[CharacterCodes["_3"] = 51] = "_3";
+ CharacterCodes[CharacterCodes["_4"] = 52] = "_4";
+ CharacterCodes[CharacterCodes["_5"] = 53] = "_5";
+ CharacterCodes[CharacterCodes["_6"] = 54] = "_6";
+ CharacterCodes[CharacterCodes["_7"] = 55] = "_7";
+ CharacterCodes[CharacterCodes["_8"] = 56] = "_8";
+ CharacterCodes[CharacterCodes["_9"] = 57] = "_9";
+ CharacterCodes[CharacterCodes["a"] = 97] = "a";
+ CharacterCodes[CharacterCodes["b"] = 98] = "b";
+ CharacterCodes[CharacterCodes["c"] = 99] = "c";
+ CharacterCodes[CharacterCodes["d"] = 100] = "d";
+ CharacterCodes[CharacterCodes["e"] = 101] = "e";
+ CharacterCodes[CharacterCodes["f"] = 102] = "f";
+ CharacterCodes[CharacterCodes["g"] = 103] = "g";
+ CharacterCodes[CharacterCodes["h"] = 104] = "h";
+ CharacterCodes[CharacterCodes["i"] = 105] = "i";
+ CharacterCodes[CharacterCodes["j"] = 106] = "j";
+ CharacterCodes[CharacterCodes["k"] = 107] = "k";
+ CharacterCodes[CharacterCodes["l"] = 108] = "l";
+ CharacterCodes[CharacterCodes["m"] = 109] = "m";
+ CharacterCodes[CharacterCodes["n"] = 110] = "n";
+ CharacterCodes[CharacterCodes["o"] = 111] = "o";
+ CharacterCodes[CharacterCodes["p"] = 112] = "p";
+ CharacterCodes[CharacterCodes["q"] = 113] = "q";
+ CharacterCodes[CharacterCodes["r"] = 114] = "r";
+ CharacterCodes[CharacterCodes["s"] = 115] = "s";
+ CharacterCodes[CharacterCodes["t"] = 116] = "t";
+ CharacterCodes[CharacterCodes["u"] = 117] = "u";
+ CharacterCodes[CharacterCodes["v"] = 118] = "v";
+ CharacterCodes[CharacterCodes["w"] = 119] = "w";
+ CharacterCodes[CharacterCodes["x"] = 120] = "x";
+ CharacterCodes[CharacterCodes["y"] = 121] = "y";
+ CharacterCodes[CharacterCodes["z"] = 122] = "z";
+ CharacterCodes[CharacterCodes["A"] = 65] = "A";
+ CharacterCodes[CharacterCodes["B"] = 66] = "B";
+ CharacterCodes[CharacterCodes["C"] = 67] = "C";
+ CharacterCodes[CharacterCodes["D"] = 68] = "D";
+ CharacterCodes[CharacterCodes["E"] = 69] = "E";
+ CharacterCodes[CharacterCodes["F"] = 70] = "F";
+ CharacterCodes[CharacterCodes["G"] = 71] = "G";
+ CharacterCodes[CharacterCodes["H"] = 72] = "H";
+ CharacterCodes[CharacterCodes["I"] = 73] = "I";
+ CharacterCodes[CharacterCodes["J"] = 74] = "J";
+ CharacterCodes[CharacterCodes["K"] = 75] = "K";
+ CharacterCodes[CharacterCodes["L"] = 76] = "L";
+ CharacterCodes[CharacterCodes["M"] = 77] = "M";
+ CharacterCodes[CharacterCodes["N"] = 78] = "N";
+ CharacterCodes[CharacterCodes["O"] = 79] = "O";
+ CharacterCodes[CharacterCodes["P"] = 80] = "P";
+ CharacterCodes[CharacterCodes["Q"] = 81] = "Q";
+ CharacterCodes[CharacterCodes["R"] = 82] = "R";
+ CharacterCodes[CharacterCodes["S"] = 83] = "S";
+ CharacterCodes[CharacterCodes["T"] = 84] = "T";
+ CharacterCodes[CharacterCodes["U"] = 85] = "U";
+ CharacterCodes[CharacterCodes["V"] = 86] = "V";
+ CharacterCodes[CharacterCodes["W"] = 87] = "W";
+ CharacterCodes[CharacterCodes["X"] = 88] = "X";
+ CharacterCodes[CharacterCodes["Y"] = 89] = "Y";
+ CharacterCodes[CharacterCodes["Z"] = 90] = "Z";
+ CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand";
+ CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk";
+ CharacterCodes[CharacterCodes["at"] = 64] = "at";
+ CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash";
+ CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick";
+ CharacterCodes[CharacterCodes["bar"] = 124] = "bar";
+ CharacterCodes[CharacterCodes["caret"] = 94] = "caret";
+ CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace";
+ CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket";
+ CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen";
+ CharacterCodes[CharacterCodes["colon"] = 58] = "colon";
+ CharacterCodes[CharacterCodes["comma"] = 44] = "comma";
+ CharacterCodes[CharacterCodes["dot"] = 46] = "dot";
+ CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote";
+ CharacterCodes[CharacterCodes["equals"] = 61] = "equals";
+ CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation";
+ CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan";
+ CharacterCodes[CharacterCodes["hash"] = 35] = "hash";
+ CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan";
+ CharacterCodes[CharacterCodes["minus"] = 45] = "minus";
+ CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace";
+ CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket";
+ CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen";
+ CharacterCodes[CharacterCodes["percent"] = 37] = "percent";
+ CharacterCodes[CharacterCodes["plus"] = 43] = "plus";
+ CharacterCodes[CharacterCodes["question"] = 63] = "question";
+ CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon";
+ CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote";
+ CharacterCodes[CharacterCodes["slash"] = 47] = "slash";
+ CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde";
+ CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace";
+ CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
+ CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark";
+ CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
+ CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab";
+ })(CharacterCodes = ts.CharacterCodes || (ts.CharacterCodes = {}));
var Extension;
(function (Extension) {
Extension[Extension["Ts"] = 0] = "Ts";
@@ -75,6 +924,121 @@ var ts;
Extension[Extension["Jsx"] = 4] = "Jsx";
Extension[Extension["LastTypeScriptExtension"] = 2] = "LastTypeScriptExtension";
})(Extension = ts.Extension || (ts.Extension = {}));
+ var TransformFlags;
+ (function (TransformFlags) {
+ TransformFlags[TransformFlags["None"] = 0] = "None";
+ TransformFlags[TransformFlags["TypeScript"] = 1] = "TypeScript";
+ TransformFlags[TransformFlags["ContainsTypeScript"] = 2] = "ContainsTypeScript";
+ TransformFlags[TransformFlags["ContainsJsx"] = 4] = "ContainsJsx";
+ TransformFlags[TransformFlags["ContainsESNext"] = 8] = "ContainsESNext";
+ TransformFlags[TransformFlags["ContainsES2017"] = 16] = "ContainsES2017";
+ TransformFlags[TransformFlags["ContainsES2016"] = 32] = "ContainsES2016";
+ TransformFlags[TransformFlags["ES2015"] = 64] = "ES2015";
+ TransformFlags[TransformFlags["ContainsES2015"] = 128] = "ContainsES2015";
+ TransformFlags[TransformFlags["Generator"] = 256] = "Generator";
+ TransformFlags[TransformFlags["ContainsGenerator"] = 512] = "ContainsGenerator";
+ TransformFlags[TransformFlags["DestructuringAssignment"] = 1024] = "DestructuringAssignment";
+ TransformFlags[TransformFlags["ContainsDestructuringAssignment"] = 2048] = "ContainsDestructuringAssignment";
+ TransformFlags[TransformFlags["ContainsDecorators"] = 4096] = "ContainsDecorators";
+ TransformFlags[TransformFlags["ContainsPropertyInitializer"] = 8192] = "ContainsPropertyInitializer";
+ TransformFlags[TransformFlags["ContainsLexicalThis"] = 16384] = "ContainsLexicalThis";
+ TransformFlags[TransformFlags["ContainsCapturedLexicalThis"] = 32768] = "ContainsCapturedLexicalThis";
+ TransformFlags[TransformFlags["ContainsLexicalThisInComputedPropertyName"] = 65536] = "ContainsLexicalThisInComputedPropertyName";
+ TransformFlags[TransformFlags["ContainsDefaultValueAssignments"] = 131072] = "ContainsDefaultValueAssignments";
+ TransformFlags[TransformFlags["ContainsParameterPropertyAssignments"] = 262144] = "ContainsParameterPropertyAssignments";
+ TransformFlags[TransformFlags["ContainsSpread"] = 524288] = "ContainsSpread";
+ TransformFlags[TransformFlags["ContainsObjectSpread"] = 1048576] = "ContainsObjectSpread";
+ TransformFlags[TransformFlags["ContainsRest"] = 524288] = "ContainsRest";
+ TransformFlags[TransformFlags["ContainsObjectRest"] = 1048576] = "ContainsObjectRest";
+ TransformFlags[TransformFlags["ContainsComputedPropertyName"] = 2097152] = "ContainsComputedPropertyName";
+ TransformFlags[TransformFlags["ContainsBlockScopedBinding"] = 4194304] = "ContainsBlockScopedBinding";
+ TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
+ TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
+ TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+ TransformFlags[TransformFlags["AssertTypeScript"] = 3] = "AssertTypeScript";
+ TransformFlags[TransformFlags["AssertJsx"] = 4] = "AssertJsx";
+ TransformFlags[TransformFlags["AssertESNext"] = 8] = "AssertESNext";
+ TransformFlags[TransformFlags["AssertES2017"] = 16] = "AssertES2017";
+ TransformFlags[TransformFlags["AssertES2016"] = 32] = "AssertES2016";
+ TransformFlags[TransformFlags["AssertES2015"] = 192] = "AssertES2015";
+ TransformFlags[TransformFlags["AssertGenerator"] = 768] = "AssertGenerator";
+ TransformFlags[TransformFlags["AssertDestructuringAssignment"] = 3072] = "AssertDestructuringAssignment";
+ TransformFlags[TransformFlags["NodeExcludes"] = 536872257] = "NodeExcludes";
+ TransformFlags[TransformFlags["ArrowFunctionExcludes"] = 601249089] = "ArrowFunctionExcludes";
+ TransformFlags[TransformFlags["FunctionExcludes"] = 601281857] = "FunctionExcludes";
+ TransformFlags[TransformFlags["ConstructorExcludes"] = 601015617] = "ConstructorExcludes";
+ TransformFlags[TransformFlags["MethodOrAccessorExcludes"] = 601015617] = "MethodOrAccessorExcludes";
+ TransformFlags[TransformFlags["ClassExcludes"] = 539358529] = "ClassExcludes";
+ TransformFlags[TransformFlags["ModuleExcludes"] = 574674241] = "ModuleExcludes";
+ TransformFlags[TransformFlags["TypeExcludes"] = -3] = "TypeExcludes";
+ TransformFlags[TransformFlags["ObjectLiteralExcludes"] = 540087617] = "ObjectLiteralExcludes";
+ TransformFlags[TransformFlags["ArrayLiteralOrCallOrNewExcludes"] = 537396545] = "ArrayLiteralOrCallOrNewExcludes";
+ TransformFlags[TransformFlags["VariableDeclarationListExcludes"] = 546309441] = "VariableDeclarationListExcludes";
+ TransformFlags[TransformFlags["ParameterExcludes"] = 536872257] = "ParameterExcludes";
+ TransformFlags[TransformFlags["CatchClauseExcludes"] = 537920833] = "CatchClauseExcludes";
+ TransformFlags[TransformFlags["BindingPatternExcludes"] = 537396545] = "BindingPatternExcludes";
+ TransformFlags[TransformFlags["TypeScriptClassSyntaxMask"] = 274432] = "TypeScriptClassSyntaxMask";
+ TransformFlags[TransformFlags["ES2015FunctionSyntaxMask"] = 163840] = "ES2015FunctionSyntaxMask";
+ })(TransformFlags = ts.TransformFlags || (ts.TransformFlags = {}));
+ var EmitFlags;
+ (function (EmitFlags) {
+ EmitFlags[EmitFlags["SingleLine"] = 1] = "SingleLine";
+ EmitFlags[EmitFlags["AdviseOnEmitNode"] = 2] = "AdviseOnEmitNode";
+ EmitFlags[EmitFlags["NoSubstitution"] = 4] = "NoSubstitution";
+ EmitFlags[EmitFlags["CapturesThis"] = 8] = "CapturesThis";
+ EmitFlags[EmitFlags["NoLeadingSourceMap"] = 16] = "NoLeadingSourceMap";
+ EmitFlags[EmitFlags["NoTrailingSourceMap"] = 32] = "NoTrailingSourceMap";
+ EmitFlags[EmitFlags["NoSourceMap"] = 48] = "NoSourceMap";
+ EmitFlags[EmitFlags["NoNestedSourceMaps"] = 64] = "NoNestedSourceMaps";
+ EmitFlags[EmitFlags["NoTokenLeadingSourceMaps"] = 128] = "NoTokenLeadingSourceMaps";
+ EmitFlags[EmitFlags["NoTokenTrailingSourceMaps"] = 256] = "NoTokenTrailingSourceMaps";
+ EmitFlags[EmitFlags["NoTokenSourceMaps"] = 384] = "NoTokenSourceMaps";
+ EmitFlags[EmitFlags["NoLeadingComments"] = 512] = "NoLeadingComments";
+ EmitFlags[EmitFlags["NoTrailingComments"] = 1024] = "NoTrailingComments";
+ EmitFlags[EmitFlags["NoComments"] = 1536] = "NoComments";
+ EmitFlags[EmitFlags["NoNestedComments"] = 2048] = "NoNestedComments";
+ EmitFlags[EmitFlags["HelperName"] = 4096] = "HelperName";
+ EmitFlags[EmitFlags["ExportName"] = 8192] = "ExportName";
+ EmitFlags[EmitFlags["LocalName"] = 16384] = "LocalName";
+ EmitFlags[EmitFlags["Indented"] = 32768] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 65536] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 131072] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 262144] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 524288] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 1048576] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 2097152] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 4194304] = "Iterator";
+ })(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
+ var ExternalEmitHelpers;
+ (function (ExternalEmitHelpers) {
+ ExternalEmitHelpers[ExternalEmitHelpers["Extends"] = 1] = "Extends";
+ ExternalEmitHelpers[ExternalEmitHelpers["Assign"] = 2] = "Assign";
+ ExternalEmitHelpers[ExternalEmitHelpers["Rest"] = 4] = "Rest";
+ ExternalEmitHelpers[ExternalEmitHelpers["Decorate"] = 8] = "Decorate";
+ ExternalEmitHelpers[ExternalEmitHelpers["Metadata"] = 16] = "Metadata";
+ ExternalEmitHelpers[ExternalEmitHelpers["Param"] = 32] = "Param";
+ ExternalEmitHelpers[ExternalEmitHelpers["Awaiter"] = 64] = "Awaiter";
+ ExternalEmitHelpers[ExternalEmitHelpers["Generator"] = 128] = "Generator";
+ ExternalEmitHelpers[ExternalEmitHelpers["Values"] = 256] = "Values";
+ ExternalEmitHelpers[ExternalEmitHelpers["Read"] = 512] = "Read";
+ ExternalEmitHelpers[ExternalEmitHelpers["Spread"] = 1024] = "Spread";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 2048] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 4096] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 8192] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
+ var EmitHint;
+ (function (EmitHint) {
+ EmitHint[EmitHint["SourceFile"] = 0] = "SourceFile";
+ EmitHint[EmitHint["Expression"] = 1] = "Expression";
+ EmitHint[EmitHint["IdentifierName"] = 2] = "IdentifierName";
+ EmitHint[EmitHint["Unspecified"] = 3] = "Unspecified";
+ })(EmitHint = ts.EmitHint || (ts.EmitHint = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -93,32 +1057,32 @@ var ts;
var measures;
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
performance.mark = mark;
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
function enable() {
@@ -137,22 +1101,102 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
(function (ts) {
- var createObject = Object.create;
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null);
+ var Ternary;
+ (function (Ternary) {
+ Ternary[Ternary["False"] = 0] = "False";
+ Ternary[Ternary["Maybe"] = 1] = "Maybe";
+ Ternary[Ternary["True"] = -1] = "True";
+ })(Ternary = ts.Ternary || (ts.Ternary = {}));
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ function createDictionaryObject() {
+ var map = Object.create(null);
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -165,32 +1209,27 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -204,9 +1243,19 @@ var ts;
return getCanonicalFileName(nonCanonicalizedPath);
}
ts.toPath = toPath;
+ var Comparison;
+ (function (Comparison) {
+ Comparison[Comparison["LessThan"] = -1] = "LessThan";
+ Comparison[Comparison["EqualTo"] = 0] = "EqualTo";
+ Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan";
+ })(Comparison = ts.Comparison || (ts.Comparison = {}));
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -216,6 +1265,20 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -225,7 +1288,7 @@ var ts;
ts.zipWith = zipWith;
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -235,7 +1298,7 @@ var ts;
}
ts.every = every;
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -244,8 +1307,17 @@ var ts;
return undefined;
}
ts.find = find;
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -268,7 +1340,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -278,7 +1350,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -465,21 +1537,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -763,38 +1832,55 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
- return false;
+ return result;
+ var _b;
}
- ts.someProperties = someProperties;
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ ts.convertToArray = convertToArray;
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachEntry = forEachEntry;
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ var _b;
}
- ts.appendProperty = appendProperty;
+ ts.forEachKey = forEachKey;
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
+ }
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -802,31 +1888,14 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
function equalOwnProperties(left, right, equalityComparer) {
if (left === right)
return true;
@@ -851,23 +1920,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -894,27 +1954,32 @@ var ts;
return result;
}
ts.extend = extend;
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
function isArray(value) {
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
@@ -990,6 +2055,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -1091,8 +2157,10 @@ var ts;
if (b === undefined)
return 1;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- var result = a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
return result < 0 ? -1 : result > 0 ? 1 : 0;
}
a = a.toUpperCase();
@@ -1474,36 +2542,26 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther;
var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther;
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
function isImplicitGlob(lastPathComponent) {
return !/[.*?]/.test(lastPathComponent);
}
@@ -1573,6 +2631,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -1585,34 +2644,48 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
}
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
+ }
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -1628,14 +2701,14 @@ var ts;
includeBasePaths.push(getIncludeBasePath(absolute));
}
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
};
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -1673,8 +2746,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -1685,11 +2769,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -1698,33 +2782,40 @@ var ts;
return false;
}
ts.isSupportedSourceFileName = isSupportedSourceFileName;
+ var ExtensionPriority;
+ (function (ExtensionPriority) {
+ ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles";
+ ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles";
+ ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest";
+ ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest";
+ })(ExtensionPriority = ts.ExtensionPriority || (ts.ExtensionPriority = {}));
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
return 0;
}
ts.getExtensionPriority = getExtensionPriority;
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 0;
}
- else if (extensionPriority < 5) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -1782,6 +2873,13 @@ var ts;
getTypeConstructor: function () { return Type; },
getSignatureConstructor: function () { return Signature; }
};
+ var AssertionLevel;
+ (function (AssertionLevel) {
+ AssertionLevel[AssertionLevel["None"] = 0] = "None";
+ AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal";
+ AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive";
+ AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive";
+ })(AssertionLevel = ts.AssertionLevel || (ts.AssertionLevel = {}));
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
@@ -1933,136 +3031,29 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- fileStream.Position = 0;
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
+ }
+ var version = process.version;
+ if (!version) {
+ return undefined;
}
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
+ }
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -2071,32 +3062,32 @@ var ts;
var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"];
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -2108,24 +3099,26 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
var fileName = typeof relativeFileName !== "string"
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
if (platform === "win32" || platform === "win64") {
return false;
@@ -2182,10 +3175,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -2206,6 +3199,11 @@ var ts;
function readDirectory(path, extensions, excludes, includes) {
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), getAccessibleFileSystemEntries);
}
+ var FileSystemEntryKind;
+ (function (FileSystemEntryKind) {
+ FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File";
+ FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory";
+ })(FileSystemEntryKind || (FileSystemEntryKind = {}));
function fileSystemEntryExists(path, entryKind) {
try {
var stat = _fs.statSync(path);
@@ -2262,7 +3260,7 @@ var ts;
if (!directoryExists(directoryName)) {
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -2272,7 +3270,6 @@ var ts;
if (eventName === "rename") {
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -2389,9 +3386,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
sys = getNodeSystem();
}
@@ -2460,11 +3454,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -2473,7 +3467,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -2489,6 +3483,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -2496,7 +3491,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -2528,9 +3523,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -2579,11 +3574,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -2629,6 +3625,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -2672,6 +3673,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -2682,19 +3684,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -2734,12 +3737,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -2748,19 +3751,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -2769,18 +3772,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -2801,13 +3806,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -2819,6 +3824,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -2833,6 +3839,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -2856,23 +3863,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -2904,7 +3921,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -2913,9 +3929,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -2926,8 +3950,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -2988,16 +4012,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -3006,12 +4032,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -3029,11 +4055,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -3048,11 +4074,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -3074,17 +4101,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -3095,23 +4123,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -3121,32 +4149,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -3164,7 +4227,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -3188,7 +4251,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -3196,3089 +4259,41 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
- };
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- function tokenIsIdentifierOrKeyword(token) {
- return token >= 70;
- }
- ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
- "abstract": 116,
- "any": 118,
- "as": 117,
- "boolean": 121,
- "break": 71,
- "case": 72,
- "catch": 73,
- "class": 74,
- "continue": 76,
- "const": 75,
- "constructor": 122,
- "debugger": 77,
- "declare": 123,
- "default": 78,
- "delete": 79,
- "do": 80,
- "else": 81,
- "enum": 82,
- "export": 83,
- "extends": 84,
- "false": 85,
- "finally": 86,
- "for": 87,
- "from": 138,
- "function": 88,
- "get": 124,
- "if": 89,
- "implements": 107,
- "import": 90,
- "in": 91,
- "instanceof": 92,
- "interface": 108,
- "is": 125,
- "keyof": 126,
- "let": 109,
- "module": 127,
- "namespace": 128,
- "never": 129,
- "new": 93,
- "null": 94,
- "number": 132,
- "package": 110,
- "private": 111,
- "protected": 112,
- "public": 113,
- "readonly": 130,
- "require": 131,
- "global": 139,
- "return": 95,
- "set": 133,
- "static": 114,
- "string": 134,
- "super": 96,
- "switch": 97,
- "symbol": 135,
- "this": 98,
- "throw": 99,
- "true": 100,
- "try": 101,
- "type": 136,
- "typeof": 102,
- "undefined": 137,
- "var": 103,
- "void": 104,
- "while": 105,
- "with": 106,
- "yield": 115,
- "async": 119,
- "await": 120,
- "of": 140,
- "{": 16,
- "}": 17,
- "(": 18,
- ")": 19,
- "[": 20,
- "]": 21,
- ".": 22,
- "...": 23,
- ";": 24,
- ",": 25,
- "<": 26,
- ">": 28,
- "<=": 29,
- ">=": 30,
- "==": 31,
- "!=": 32,
- "===": 33,
- "!==": 34,
- "=>": 35,
- "+": 36,
- "-": 37,
- "**": 39,
- "*": 38,
- "/": 40,
- "%": 41,
- "++": 42,
- "--": 43,
- "<<": 44,
- "</": 27,
- ">>": 45,
- ">>>": 46,
- "&": 47,
- "|": 48,
- "^": 49,
- "!": 50,
- "~": 51,
- "&&": 52,
- "||": 53,
- "?": 54,
- ":": 55,
- "=": 57,
- "+=": 58,
- "-=": 59,
- "*=": 60,
- "**=": 61,
- "/=": 62,
- "%=": 63,
- "<<=": 64,
- ">>=": 65,
- ">>>=": 66,
- "&=": 67,
- "|=": 68,
- "^=": 69,
- "@": 56,
- });
- var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
- var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
- var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
- var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
- function lookupInUnicodeMap(code, map) {
- if (code < map[0]) {
- return false;
- }
- var lo = 0;
- var hi = map.length;
- var mid;
- while (lo + 1 < hi) {
- mid = lo + (hi - lo) / 2;
- mid -= mid % 2;
- if (map[mid] <= code && code <= map[mid + 1]) {
- return true;
- }
- if (code < map[mid]) {
- hi = mid;
- }
- else {
- lo = mid + 2;
- }
- }
- return false;
- }
- function isUnicodeIdentifierStart(code, languageVersion) {
- return languageVersion >= 1 ?
- lookupInUnicodeMap(code, unicodeES5IdentifierStart) :
- lookupInUnicodeMap(code, unicodeES3IdentifierStart);
- }
- ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart;
- function isUnicodeIdentifierPart(code, languageVersion) {
- return languageVersion >= 1 ?
- lookupInUnicodeMap(code, unicodeES5IdentifierPart) :
- lookupInUnicodeMap(code, unicodeES3IdentifierPart);
- }
- function makeReverseMap(source) {
- var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
- return result;
- }
- var tokenStrings = makeReverseMap(textToToken);
- function tokenToString(t) {
- return tokenStrings[t];
- }
- ts.tokenToString = tokenToString;
- function stringToToken(s) {
- return textToToken[s];
- }
- ts.stringToToken = stringToToken;
- function computeLineStarts(text) {
- var result = new Array();
- var pos = 0;
- var lineStart = 0;
- while (pos < text.length) {
- var ch = text.charCodeAt(pos);
- pos++;
- switch (ch) {
- case 13:
- if (text.charCodeAt(pos) === 10) {
- pos++;
- }
- case 10:
- result.push(lineStart);
- lineStart = pos;
- break;
- default:
- if (ch > 127 && isLineBreak(ch)) {
- result.push(lineStart);
- lineStart = pos;
- }
- break;
- }
- }
- result.push(lineStart);
- return result;
- }
- ts.computeLineStarts = computeLineStarts;
- function getPositionOfLineAndCharacter(sourceFile, line, character) {
- return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
- }
- ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter;
- function computePositionOfLineAndCharacter(lineStarts, line, character) {
- ts.Debug.assert(line >= 0 && line < lineStarts.length);
- return lineStarts[line] + character;
- }
- ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter;
- function getLineStarts(sourceFile) {
- return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
- }
- ts.getLineStarts = getLineStarts;
- function computeLineAndCharacterOfPosition(lineStarts, position) {
- var lineNumber = ts.binarySearch(lineStarts, position);
- if (lineNumber < 0) {
- lineNumber = ~lineNumber - 1;
- ts.Debug.assert(lineNumber !== -1, "position cannot precede the beginning of the file");
- }
- return {
- line: lineNumber,
- character: position - lineStarts[lineNumber]
- };
- }
- ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition;
- function getLineAndCharacterOfPosition(sourceFile, position) {
- return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
- }
- ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function isWhiteSpace(ch) {
- return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
- }
- ts.isWhiteSpace = isWhiteSpace;
- function isWhiteSpaceSingleLine(ch) {
- return ch === 32 ||
- ch === 9 ||
- ch === 11 ||
- ch === 12 ||
- ch === 160 ||
- ch === 133 ||
- ch === 5760 ||
- ch >= 8192 && ch <= 8203 ||
- ch === 8239 ||
- ch === 8287 ||
- ch === 12288 ||
- ch === 65279;
- }
- ts.isWhiteSpaceSingleLine = isWhiteSpaceSingleLine;
- function isLineBreak(ch) {
- return ch === 10 ||
- ch === 13 ||
- ch === 8232 ||
- ch === 8233;
- }
- ts.isLineBreak = isLineBreak;
- function isDigit(ch) {
- return ch >= 48 && ch <= 57;
- }
- function isOctalDigit(ch) {
- return ch >= 48 && ch <= 55;
- }
- ts.isOctalDigit = isOctalDigit;
- function couldStartTrivia(text, pos) {
- var ch = text.charCodeAt(pos);
- switch (ch) {
- case 13:
- case 10:
- case 9:
- case 11:
- case 12:
- case 32:
- case 47:
- case 60:
- case 61:
- case 62:
- return true;
- case 35:
- return pos === 0;
- default:
- return ch > 127;
- }
- }
- ts.couldStartTrivia = couldStartTrivia;
- function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) {
- if (stopAtComments === void 0) { stopAtComments = false; }
- if (ts.positionIsSynthesized(pos)) {
- return pos;
- }
- while (true) {
- var ch = text.charCodeAt(pos);
- switch (ch) {
- case 13:
- if (text.charCodeAt(pos + 1) === 10) {
- pos++;
- }
- case 10:
- pos++;
- if (stopAfterLineBreak) {
- return pos;
- }
- continue;
- case 9:
- case 11:
- case 12:
- case 32:
- pos++;
- continue;
- case 47:
- if (stopAtComments) {
- break;
- }
- if (text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- while (pos < text.length) {
- if (isLineBreak(text.charCodeAt(pos))) {
- break;
- }
- pos++;
- }
- continue;
- }
- if (text.charCodeAt(pos + 1) === 42) {
- pos += 2;
- while (pos < text.length) {
- if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- break;
- }
- pos++;
- }
- continue;
- }
- break;
- case 60:
- case 61:
- case 62:
- if (isConflictMarkerTrivia(text, pos)) {
- pos = scanConflictMarkerTrivia(text, pos);
- continue;
- }
- break;
- case 35:
- if (pos === 0 && isShebangTrivia(text, pos)) {
- pos = scanShebangTrivia(text, pos);
- continue;
- }
- break;
- default:
- if (ch > 127 && (isWhiteSpace(ch))) {
- pos++;
- continue;
- }
- break;
- }
- return pos;
- }
- }
- ts.skipTrivia = skipTrivia;
- var mergeConflictMarkerLength = "<<<<<<<".length;
- function isConflictMarkerTrivia(text, pos) {
- ts.Debug.assert(pos >= 0);
- if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
- var ch = text.charCodeAt(pos);
- if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
- if (text.charCodeAt(pos + i) !== ch) {
- return false;
- }
- }
- return ch === 61 ||
- text.charCodeAt(pos + mergeConflictMarkerLength) === 32;
- }
- }
- return false;
- }
- function scanConflictMarkerTrivia(text, pos, error) {
- if (error) {
- error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength);
- }
- var ch = text.charCodeAt(pos);
- var len = text.length;
- if (ch === 60 || ch === 62) {
- while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
- pos++;
- }
- }
- else {
- ts.Debug.assert(ch === 61);
- while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
- break;
- }
- pos++;
- }
- }
- return pos;
- }
- var shebangTriviaRegex = /^#!.*/;
- function isShebangTrivia(text, pos) {
- ts.Debug.assert(pos === 0);
- return shebangTriviaRegex.test(text);
- }
- function scanShebangTrivia(text, pos) {
- var shebang = shebangTriviaRegex.exec(text)[0];
- pos = pos + shebang.length;
- return pos;
- }
- function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) {
- var pendingPos;
- var pendingEnd;
- var pendingKind;
- var pendingHasTrailingNewLine;
- var hasPendingCommentRange = false;
- var collecting = trailing || pos === 0;
- var accumulator = initial;
- scan: while (pos >= 0 && pos < text.length) {
- var ch = text.charCodeAt(pos);
- switch (ch) {
- case 13:
- if (text.charCodeAt(pos + 1) === 10) {
- pos++;
- }
- case 10:
- pos++;
- if (trailing) {
- break scan;
- }
- collecting = true;
- if (hasPendingCommentRange) {
- pendingHasTrailingNewLine = true;
- }
- continue;
- case 9:
- case 11:
- case 12:
- case 32:
- pos++;
- continue;
- case 47:
- var nextChar = text.charCodeAt(pos + 1);
- var hasTrailingNewLine = false;
- if (nextChar === 47 || nextChar === 42) {
- var kind = nextChar === 47 ? 2 : 3;
- var startPos = pos;
- pos += 2;
- if (nextChar === 47) {
- while (pos < text.length) {
- if (isLineBreak(text.charCodeAt(pos))) {
- hasTrailingNewLine = true;
- break;
- }
- pos++;
- }
- }
- else {
- while (pos < text.length) {
- if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- break;
- }
- pos++;
- }
- }
- if (collecting) {
- if (hasPendingCommentRange) {
- accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
- if (!reduce && accumulator) {
- return accumulator;
- }
- hasPendingCommentRange = false;
- }
- pendingPos = startPos;
- pendingEnd = pos;
- pendingKind = kind;
- pendingHasTrailingNewLine = hasTrailingNewLine;
- hasPendingCommentRange = true;
- }
- continue;
- }
- break scan;
- default:
- if (ch > 127 && (isWhiteSpace(ch))) {
- if (hasPendingCommentRange && isLineBreak(ch)) {
- pendingHasTrailingNewLine = true;
- }
- pos++;
- continue;
- }
- break scan;
- }
- }
- if (hasPendingCommentRange) {
- accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
- }
- return accumulator;
- }
- function forEachLeadingCommentRange(text, pos, cb, state) {
- return iterateCommentRanges(false, text, pos, false, cb, state);
- }
- ts.forEachLeadingCommentRange = forEachLeadingCommentRange;
- function forEachTrailingCommentRange(text, pos, cb, state) {
- return iterateCommentRanges(false, text, pos, true, cb, state);
- }
- ts.forEachTrailingCommentRange = forEachTrailingCommentRange;
- function reduceEachLeadingCommentRange(text, pos, cb, state, initial) {
- return iterateCommentRanges(true, text, pos, false, cb, state, initial);
- }
- ts.reduceEachLeadingCommentRange = reduceEachLeadingCommentRange;
- function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
- return iterateCommentRanges(true, text, pos, true, cb, state, initial);
- }
- ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
- function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
- if (!comments) {
- comments = [];
- }
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
- return comments;
- }
- function getLeadingCommentRanges(text, pos) {
- return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
- }
- ts.getLeadingCommentRanges = getLeadingCommentRanges;
- function getTrailingCommentRanges(text, pos) {
- return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
- }
- ts.getTrailingCommentRanges = getTrailingCommentRanges;
- function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
- }
- ts.getShebang = getShebang;
- function isIdentifierStart(ch, languageVersion) {
- return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
- ch === 36 || ch === 95 ||
- ch > 127 && isUnicodeIdentifierStart(ch, languageVersion);
- }
- ts.isIdentifierStart = isIdentifierStart;
- function isIdentifierPart(ch, languageVersion) {
- return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
- ch >= 48 && ch <= 57 || ch === 36 || ch === 95 ||
- ch > 127 && isUnicodeIdentifierPart(ch, languageVersion);
- }
- ts.isIdentifierPart = isIdentifierPart;
- function isIdentifierText(name, languageVersion) {
- if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
- return false;
- }
- for (var i = 1, n = name.length; i < n; i++) {
- if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
- return false;
- }
- }
- return true;
- }
- ts.isIdentifierText = isIdentifierText;
- function createScanner(languageVersion, skipTrivia, languageVariant, text, onError, start, length) {
- if (languageVariant === void 0) { languageVariant = 0; }
- var pos;
- var end;
- var startPos;
- var tokenPos;
- var token;
- var tokenValue;
- var precedingLineBreak;
- var hasExtendedUnicodeEscape;
- var tokenIsUnterminated;
- setText(text, start, length);
- return {
- getStartPos: function () { return startPos; },
- getTextPos: function () { return pos; },
- getToken: function () { return token; },
- getTokenPos: function () { return tokenPos; },
- getTokenText: function () { return text.substring(tokenPos, pos); },
- getTokenValue: function () { return tokenValue; },
- hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; },
- hasPrecedingLineBreak: function () { return precedingLineBreak; },
- isIdentifier: function () { return token === 70 || token > 106; },
- isReservedWord: function () { return token >= 71 && token <= 106; },
- isUnterminated: function () { return tokenIsUnterminated; },
- reScanGreaterToken: reScanGreaterToken,
- reScanSlashToken: reScanSlashToken,
- reScanTemplateToken: reScanTemplateToken,
- scanJsxIdentifier: scanJsxIdentifier,
- scanJsxAttributeValue: scanJsxAttributeValue,
- reScanJsxToken: reScanJsxToken,
- scanJsxToken: scanJsxToken,
- scanJSDocToken: scanJSDocToken,
- scan: scan,
- getText: getText,
- setText: setText,
- setScriptTarget: setScriptTarget,
- setLanguageVariant: setLanguageVariant,
- setOnError: setOnError,
- setTextPos: setTextPos,
- tryScan: tryScan,
- lookAhead: lookAhead,
- scanRange: scanRange,
- };
- function error(message, length) {
- if (onError) {
- onError(message, length || 0);
- }
- }
- function scanNumber() {
- var start = pos;
- while (isDigit(text.charCodeAt(pos)))
- pos++;
- if (text.charCodeAt(pos) === 46) {
- pos++;
- while (isDigit(text.charCodeAt(pos)))
- pos++;
- }
- var end = pos;
- if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
- pos++;
- if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
- pos++;
- if (isDigit(text.charCodeAt(pos))) {
- pos++;
- while (isDigit(text.charCodeAt(pos)))
- pos++;
- end = pos;
- }
- else {
- error(ts.Diagnostics.Digit_expected);
- }
- }
- return "" + +(text.substring(start, end));
- }
- function scanOctalDigits() {
- var start = pos;
- while (isOctalDigit(text.charCodeAt(pos))) {
- pos++;
- }
- return +(text.substring(start, pos));
- }
- function scanExactNumberOfHexDigits(count) {
- return scanHexDigits(count, false);
- }
- function scanMinimumNumberOfHexDigits(count) {
- return scanHexDigits(count, true);
- }
- function scanHexDigits(minCount, scanAsManyAsPossible) {
- var digits = 0;
- var value = 0;
- while (digits < minCount || scanAsManyAsPossible) {
- var ch = text.charCodeAt(pos);
- if (ch >= 48 && ch <= 57) {
- value = value * 16 + ch - 48;
- }
- else if (ch >= 65 && ch <= 70) {
- value = value * 16 + ch - 65 + 10;
- }
- else if (ch >= 97 && ch <= 102) {
- value = value * 16 + ch - 97 + 10;
- }
- else {
- break;
- }
- pos++;
- digits++;
- }
- if (digits < minCount) {
- value = -1;
- }
- return value;
- }
- function scanString(allowEscapes) {
- if (allowEscapes === void 0) { allowEscapes = true; }
- var quote = text.charCodeAt(pos);
- pos++;
- var result = "";
- var start = pos;
- while (true) {
- if (pos >= end) {
- result += text.substring(start, pos);
- tokenIsUnterminated = true;
- error(ts.Diagnostics.Unterminated_string_literal);
- break;
- }
- var ch = text.charCodeAt(pos);
- if (ch === quote) {
- result += text.substring(start, pos);
- pos++;
- break;
- }
- if (ch === 92 && allowEscapes) {
- result += text.substring(start, pos);
- result += scanEscapeSequence();
- start = pos;
- continue;
- }
- if (isLineBreak(ch)) {
- result += text.substring(start, pos);
- tokenIsUnterminated = true;
- error(ts.Diagnostics.Unterminated_string_literal);
- break;
- }
- pos++;
- }
- return result;
- }
- function scanTemplateAndSetTokenValue() {
- var startedWithBacktick = text.charCodeAt(pos) === 96;
- pos++;
- var start = pos;
- var contents = "";
- var resultingToken;
- while (true) {
- if (pos >= end) {
- contents += text.substring(start, pos);
- tokenIsUnterminated = true;
- error(ts.Diagnostics.Unterminated_template_literal);
- resultingToken = startedWithBacktick ? 12 : 15;
- break;
- }
- var currChar = text.charCodeAt(pos);
- if (currChar === 96) {
- contents += text.substring(start, pos);
- pos++;
- resultingToken = startedWithBacktick ? 12 : 15;
- break;
- }
- if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) {
- contents += text.substring(start, pos);
- pos += 2;
- resultingToken = startedWithBacktick ? 13 : 14;
- break;
- }
- if (currChar === 92) {
- contents += text.substring(start, pos);
- contents += scanEscapeSequence();
- start = pos;
- continue;
- }
- if (currChar === 13) {
- contents += text.substring(start, pos);
- pos++;
- if (pos < end && text.charCodeAt(pos) === 10) {
- pos++;
- }
- contents += "\n";
- start = pos;
- continue;
- }
- pos++;
- }
- ts.Debug.assert(resultingToken !== undefined);
- tokenValue = contents;
- return resultingToken;
- }
- function scanEscapeSequence() {
- pos++;
- if (pos >= end) {
- error(ts.Diagnostics.Unexpected_end_of_text);
- return "";
- }
- var ch = text.charCodeAt(pos);
- pos++;
- switch (ch) {
- case 48:
- return "\0";
- case 98:
- return "\b";
- case 116:
- return "\t";
- case 110:
- return "\n";
- case 118:
- return "\v";
- case 102:
- return "\f";
- case 114:
- return "\r";
- case 39:
- return "\'";
- case 34:
- return "\"";
- case 117:
- if (pos < end && text.charCodeAt(pos) === 123) {
- hasExtendedUnicodeEscape = true;
- pos++;
- return scanExtendedUnicodeEscape();
- }
- return scanHexadecimalEscape(4);
- case 120:
- return scanHexadecimalEscape(2);
- case 13:
- if (pos < end && text.charCodeAt(pos) === 10) {
- pos++;
- }
- case 10:
- case 8232:
- case 8233:
- return "";
- default:
- return String.fromCharCode(ch);
- }
- }
- function scanHexadecimalEscape(numDigits) {
- var escapedValue = scanExactNumberOfHexDigits(numDigits);
- if (escapedValue >= 0) {
- return String.fromCharCode(escapedValue);
- }
- else {
- error(ts.Diagnostics.Hexadecimal_digit_expected);
- return "";
- }
- }
- function scanExtendedUnicodeEscape() {
- var escapedValue = scanMinimumNumberOfHexDigits(1);
- var isInvalidExtendedEscape = false;
- if (escapedValue < 0) {
- error(ts.Diagnostics.Hexadecimal_digit_expected);
- isInvalidExtendedEscape = true;
- }
- else if (escapedValue > 0x10FFFF) {
- error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
- isInvalidExtendedEscape = true;
- }
- if (pos >= end) {
- error(ts.Diagnostics.Unexpected_end_of_text);
- isInvalidExtendedEscape = true;
- }
- else if (text.charCodeAt(pos) === 125) {
- pos++;
- }
- else {
- error(ts.Diagnostics.Unterminated_Unicode_escape_sequence);
- isInvalidExtendedEscape = true;
- }
- if (isInvalidExtendedEscape) {
- return "";
- }
- return utf16EncodeAsString(escapedValue);
- }
- function utf16EncodeAsString(codePoint) {
- ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF);
- if (codePoint <= 65535) {
- return String.fromCharCode(codePoint);
- }
- var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800;
- var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00;
- return String.fromCharCode(codeUnit1, codeUnit2);
- }
- function peekUnicodeEscape() {
- if (pos + 5 < end && text.charCodeAt(pos + 1) === 117) {
- var start_1 = pos;
- pos += 2;
- var value = scanExactNumberOfHexDigits(4);
- pos = start_1;
- return value;
- }
- return -1;
- }
- function scanIdentifierParts() {
- var result = "";
- var start = pos;
- while (pos < end) {
- var ch = text.charCodeAt(pos);
- if (isIdentifierPart(ch, languageVersion)) {
- pos++;
- }
- else if (ch === 92) {
- ch = peekUnicodeEscape();
- if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) {
- break;
- }
- result += text.substring(start, pos);
- result += String.fromCharCode(ch);
- pos += 6;
- start = pos;
- }
- else {
- break;
- }
- }
- result += text.substring(start, pos);
- return result;
- }
- function getIdentifierToken() {
- var len = tokenValue.length;
- if (len >= 2 && len <= 11) {
- var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
- }
- }
- return token = 70;
- }
- function scanBinaryOrOctalDigits(base) {
- ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8");
- var value = 0;
- var numberOfDigits = 0;
- while (true) {
- var ch = text.charCodeAt(pos);
- var valueOfCh = ch - 48;
- if (!isDigit(ch) || valueOfCh >= base) {
- break;
- }
- value = value * base + valueOfCh;
- pos++;
- numberOfDigits++;
- }
- if (numberOfDigits === 0) {
- return -1;
- }
- return value;
- }
- function scan() {
- startPos = pos;
- hasExtendedUnicodeEscape = false;
- precedingLineBreak = false;
- tokenIsUnterminated = false;
- while (true) {
- tokenPos = pos;
- if (pos >= end) {
- return token = 1;
- }
- var ch = text.charCodeAt(pos);
- if (ch === 35 && pos === 0 && isShebangTrivia(text, pos)) {
- pos = scanShebangTrivia(text, pos);
- if (skipTrivia) {
- continue;
- }
- else {
- return token = 6;
- }
- }
- switch (ch) {
- case 10:
- case 13:
- precedingLineBreak = true;
- if (skipTrivia) {
- pos++;
- continue;
- }
- else {
- if (ch === 13 && pos + 1 < end && text.charCodeAt(pos + 1) === 10) {
- pos += 2;
- }
- else {
- pos++;
- }
- return token = 4;
- }
- case 9:
- case 11:
- case 12:
- case 32:
- if (skipTrivia) {
- pos++;
- continue;
- }
- else {
- while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
- pos++;
- }
- return token = 5;
- }
- case 33:
- if (text.charCodeAt(pos + 1) === 61) {
- if (text.charCodeAt(pos + 2) === 61) {
- return pos += 3, token = 34;
- }
- return pos += 2, token = 32;
- }
- pos++;
- return token = 50;
- case 34:
- case 39:
- tokenValue = scanString();
- return token = 9;
- case 96:
- return token = scanTemplateAndSetTokenValue();
- case 37:
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 63;
- }
- pos++;
- return token = 41;
- case 38:
- if (text.charCodeAt(pos + 1) === 38) {
- return pos += 2, token = 52;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 67;
- }
- pos++;
- return token = 47;
- case 40:
- pos++;
- return token = 18;
- case 41:
- pos++;
- return token = 19;
- case 42:
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 60;
- }
- if (text.charCodeAt(pos + 1) === 42) {
- if (text.charCodeAt(pos + 2) === 61) {
- return pos += 3, token = 61;
- }
- return pos += 2, token = 39;
- }
- pos++;
- return token = 38;
- case 43:
- if (text.charCodeAt(pos + 1) === 43) {
- return pos += 2, token = 42;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 58;
- }
- pos++;
- return token = 36;
- case 44:
- pos++;
- return token = 25;
- case 45:
- if (text.charCodeAt(pos + 1) === 45) {
- return pos += 2, token = 43;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 59;
- }
- pos++;
- return token = 37;
- case 46:
- if (isDigit(text.charCodeAt(pos + 1))) {
- tokenValue = scanNumber();
- return token = 8;
- }
- if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) {
- return pos += 3, token = 23;
- }
- pos++;
- return token = 22;
- case 47:
- if (text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- while (pos < end) {
- if (isLineBreak(text.charCodeAt(pos))) {
- break;
- }
- pos++;
- }
- if (skipTrivia) {
- continue;
- }
- else {
- return token = 2;
- }
- }
- if (text.charCodeAt(pos + 1) === 42) {
- pos += 2;
- var commentClosed = false;
- while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- commentClosed = true;
- break;
- }
- if (isLineBreak(ch_2)) {
- precedingLineBreak = true;
- }
- pos++;
- }
- if (!commentClosed) {
- error(ts.Diagnostics.Asterisk_Slash_expected);
- }
- if (skipTrivia) {
- continue;
- }
- else {
- tokenIsUnterminated = !commentClosed;
- return token = 3;
- }
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 62;
- }
- pos++;
- return token = 40;
- case 48:
- if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) {
- pos += 2;
- var value = scanMinimumNumberOfHexDigits(1);
- if (value < 0) {
- error(ts.Diagnostics.Hexadecimal_digit_expected);
- value = 0;
- }
- tokenValue = "" + value;
- return token = 8;
- }
- else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
- pos += 2;
- var value = scanBinaryOrOctalDigits(2);
- if (value < 0) {
- error(ts.Diagnostics.Binary_digit_expected);
- value = 0;
- }
- tokenValue = "" + value;
- return token = 8;
- }
- else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
- pos += 2;
- var value = scanBinaryOrOctalDigits(8);
- if (value < 0) {
- error(ts.Diagnostics.Octal_digit_expected);
- value = 0;
- }
- tokenValue = "" + value;
- return token = 8;
- }
- if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
- tokenValue = "" + scanOctalDigits();
- return token = 8;
- }
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- tokenValue = scanNumber();
- return token = 8;
- case 58:
- pos++;
- return token = 55;
- case 59:
- pos++;
- return token = 24;
- case 60:
- if (isConflictMarkerTrivia(text, pos)) {
- pos = scanConflictMarkerTrivia(text, pos, error);
- if (skipTrivia) {
- continue;
- }
- else {
- return token = 7;
- }
- }
- if (text.charCodeAt(pos + 1) === 60) {
- if (text.charCodeAt(pos + 2) === 61) {
- return pos += 3, token = 64;
- }
- return pos += 2, token = 44;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 29;
- }
- if (languageVariant === 1 &&
- text.charCodeAt(pos + 1) === 47 &&
- text.charCodeAt(pos + 2) !== 42) {
- return pos += 2, token = 27;
- }
- pos++;
- return token = 26;
- case 61:
- if (isConflictMarkerTrivia(text, pos)) {
- pos = scanConflictMarkerTrivia(text, pos, error);
- if (skipTrivia) {
- continue;
- }
- else {
- return token = 7;
- }
- }
- if (text.charCodeAt(pos + 1) === 61) {
- if (text.charCodeAt(pos + 2) === 61) {
- return pos += 3, token = 33;
- }
- return pos += 2, token = 31;
- }
- if (text.charCodeAt(pos + 1) === 62) {
- return pos += 2, token = 35;
- }
- pos++;
- return token = 57;
- case 62:
- if (isConflictMarkerTrivia(text, pos)) {
- pos = scanConflictMarkerTrivia(text, pos, error);
- if (skipTrivia) {
- continue;
- }
- else {
- return token = 7;
- }
- }
- pos++;
- return token = 28;
- case 63:
- pos++;
- return token = 54;
- case 91:
- pos++;
- return token = 20;
- case 93:
- pos++;
- return token = 21;
- case 94:
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 69;
- }
- pos++;
- return token = 49;
- case 123:
- pos++;
- return token = 16;
- case 124:
- if (text.charCodeAt(pos + 1) === 124) {
- return pos += 2, token = 53;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 68;
- }
- pos++;
- return token = 48;
- case 125:
- pos++;
- return token = 17;
- case 126:
- pos++;
- return token = 51;
- case 64:
- pos++;
- return token = 56;
- case 92:
- var cookedChar = peekUnicodeEscape();
- if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {
- pos += 6;
- tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
- return token = getIdentifierToken();
- }
- error(ts.Diagnostics.Invalid_character);
- pos++;
- return token = 0;
- default:
- if (isIdentifierStart(ch, languageVersion)) {
- pos++;
- while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos), languageVersion))
- pos++;
- tokenValue = text.substring(tokenPos, pos);
- if (ch === 92) {
- tokenValue += scanIdentifierParts();
- }
- return token = getIdentifierToken();
- }
- else if (isWhiteSpaceSingleLine(ch)) {
- pos++;
- continue;
- }
- else if (isLineBreak(ch)) {
- precedingLineBreak = true;
- pos++;
- continue;
- }
- error(ts.Diagnostics.Invalid_character);
- pos++;
- return token = 0;
- }
- }
- }
- function reScanGreaterToken() {
- if (token === 28) {
- if (text.charCodeAt(pos) === 62) {
- if (text.charCodeAt(pos + 1) === 62) {
- if (text.charCodeAt(pos + 2) === 61) {
- return pos += 3, token = 66;
- }
- return pos += 2, token = 46;
- }
- if (text.charCodeAt(pos + 1) === 61) {
- return pos += 2, token = 65;
- }
- pos++;
- return token = 45;
- }
- if (text.charCodeAt(pos) === 61) {
- pos++;
- return token = 30;
- }
- }
- return token;
- }
- function reScanSlashToken() {
- if (token === 40 || token === 62) {
- var p = tokenPos + 1;
- var inEscape = false;
- var inCharacterClass = false;
- while (true) {
- if (p >= end) {
- tokenIsUnterminated = true;
- error(ts.Diagnostics.Unterminated_regular_expression_literal);
- break;
- }
- var ch = text.charCodeAt(p);
- if (isLineBreak(ch)) {
- tokenIsUnterminated = true;
- error(ts.Diagnostics.Unterminated_regular_expression_literal);
- break;
- }
- if (inEscape) {
- inEscape = false;
- }
- else if (ch === 47 && !inCharacterClass) {
- p++;
- break;
- }
- else if (ch === 91) {
- inCharacterClass = true;
- }
- else if (ch === 92) {
- inEscape = true;
- }
- else if (ch === 93) {
- inCharacterClass = false;
- }
- p++;
- }
- while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
- p++;
- }
- pos = p;
- tokenValue = text.substring(tokenPos, pos);
- token = 11;
- }
- return token;
- }
- function reScanTemplateToken() {
- ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'");
- pos = tokenPos;
- return token = scanTemplateAndSetTokenValue();
- }
- function reScanJsxToken() {
- pos = tokenPos = startPos;
- return token = scanJsxToken();
- }
- function scanJsxToken() {
- startPos = tokenPos = pos;
- if (pos >= end) {
- return token = 1;
- }
- var char = text.charCodeAt(pos);
- if (char === 60) {
- if (text.charCodeAt(pos + 1) === 47) {
- pos += 2;
- return token = 27;
- }
- pos++;
- return token = 26;
- }
- if (char === 123) {
- pos++;
- return token = 16;
- }
- while (pos < end) {
- pos++;
- char = text.charCodeAt(pos);
- if ((char === 123) || (char === 60)) {
- break;
- }
- }
- return token = 10;
- }
- function scanJsxIdentifier() {
- if (tokenIsIdentifierOrKeyword(token)) {
- var firstCharPosition = pos;
- while (pos < end) {
- var ch = text.charCodeAt(pos);
- if (ch === 45 || ((firstCharPosition === pos) ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) {
- pos++;
- }
- else {
- break;
- }
- }
- tokenValue += text.substr(firstCharPosition, pos - firstCharPosition);
- }
- return token;
- }
- function scanJsxAttributeValue() {
- startPos = pos;
- switch (text.charCodeAt(pos)) {
- case 34:
- case 39:
- tokenValue = scanString(false);
- return token = 9;
- default:
- return scan();
- }
- }
- function scanJSDocToken() {
- if (pos >= end) {
- return token = 1;
- }
- startPos = pos;
- tokenPos = pos;
- var ch = text.charCodeAt(pos);
- switch (ch) {
- case 9:
- case 11:
- case 12:
- case 32:
- while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
- pos++;
- }
- return token = 5;
- case 64:
- pos++;
- return token = 56;
- case 10:
- case 13:
- pos++;
- return token = 4;
- case 42:
- pos++;
- return token = 38;
- case 123:
- pos++;
- return token = 16;
- case 125:
- pos++;
- return token = 17;
- case 91:
- pos++;
- return token = 20;
- case 93:
- pos++;
- return token = 21;
- case 61:
- pos++;
- return token = 57;
- case 44:
- pos++;
- return token = 25;
- case 46:
- pos++;
- return token = 22;
- }
- if (isIdentifierStart(ch, 5)) {
- pos++;
- while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) {
- pos++;
- }
- return token = 70;
- }
- else {
- return pos += 1, token = 0;
- }
- }
- function speculationHelper(callback, isLookahead) {
- var savePos = pos;
- var saveStartPos = startPos;
- var saveTokenPos = tokenPos;
- var saveToken = token;
- var saveTokenValue = tokenValue;
- var savePrecedingLineBreak = precedingLineBreak;
- var result = callback();
- if (!result || isLookahead) {
- pos = savePos;
- startPos = saveStartPos;
- tokenPos = saveTokenPos;
- token = saveToken;
- tokenValue = saveTokenValue;
- precedingLineBreak = savePrecedingLineBreak;
- }
- return result;
- }
- function scanRange(start, length, callback) {
- var saveEnd = end;
- var savePos = pos;
- var saveStartPos = startPos;
- var saveTokenPos = tokenPos;
- var saveToken = token;
- var savePrecedingLineBreak = precedingLineBreak;
- var saveTokenValue = tokenValue;
- var saveHasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
- var saveTokenIsUnterminated = tokenIsUnterminated;
- setText(text, start, length);
- var result = callback();
- end = saveEnd;
- pos = savePos;
- startPos = saveStartPos;
- tokenPos = saveTokenPos;
- token = saveToken;
- precedingLineBreak = savePrecedingLineBreak;
- tokenValue = saveTokenValue;
- hasExtendedUnicodeEscape = saveHasExtendedUnicodeEscape;
- tokenIsUnterminated = saveTokenIsUnterminated;
- return result;
- }
- function lookAhead(callback) {
- return speculationHelper(callback, true);
- }
- function tryScan(callback) {
- return speculationHelper(callback, false);
- }
- function getText() {
- return text;
- }
- function setText(newText, start, length) {
- text = newText || "";
- end = length === undefined ? text.length : start + length;
- setTextPos(start || 0);
- }
- function setOnError(errorCallback) {
- onError = errorCallback;
- }
- function setScriptTarget(scriptTarget) {
- languageVersion = scriptTarget;
- }
- function setLanguageVariant(variant) {
- languageVariant = variant;
- }
- function setTextPos(textPos) {
- ts.Debug.assert(textPos >= 0);
- pos = textPos;
- startPos = textPos;
- tokenPos = textPos;
- token = 0;
- precedingLineBreak = false;
- tokenValue = undefined;
- hasExtendedUnicodeEscape = false;
- tokenIsUnterminated = false;
- }
- }
- ts.createScanner = createScanner;
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
- ts.optionDeclarations = [
- {
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
- {
- name: "help",
- shortName: "h",
- type: "boolean",
- description: ts.Diagnostics.Print_this_message,
- },
- {
- name: "help",
- shortName: "?",
- type: "boolean"
- },
- {
- name: "init",
- type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
- },
- {
- name: "inlineSourceMap",
- type: "boolean",
- },
- {
- name: "inlineSources",
- type: "boolean",
- },
- {
- name: "jsx",
- type: ts.createMap({
- "preserve": 1,
- "react": 2
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
- type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
- },
- {
- name: "listFiles",
- type: "boolean",
- },
- {
- name: "locale",
- type: "string",
- },
- {
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
- },
- {
- name: "module",
- shortName: "m",
- type: ts.createMap({
- "none": ts.ModuleKind.None,
- "commonjs": ts.ModuleKind.CommonJS,
- "amd": ts.ModuleKind.AMD,
- "system": ts.ModuleKind.System,
- "umd": ts.ModuleKind.UMD,
- "es6": ts.ModuleKind.ES2015,
- "es2015": ts.ModuleKind.ES2015,
- }),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
- paramType: ts.Diagnostics.KIND,
- },
- {
- name: "newLine",
- type: ts.createMap({
- "crlf": 0,
- "lf": 1
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
- },
- {
- name: "noUnusedParameters",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
- },
- {
- name: "noLib",
- type: "boolean",
- },
- {
- name: "noResolve",
- type: "boolean",
- },
- {
- name: "skipDefaultLibCheck",
- type: "boolean",
- },
- {
- name: "skipLibCheck",
- type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- paramType: ts.Diagnostics.FILE,
- },
- {
- name: "outFile",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
- paramType: ts.Diagnostics.FILE,
- },
- {
- name: "outDir",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
- },
- {
- name: "rootDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.LOCATION,
- description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
- },
- {
- name: "isolatedModules",
- type: "boolean",
- },
- {
- name: "sourceMap",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
- },
- {
- name: "suppressExcessPropertyErrors",
- type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
- },
- {
- name: "suppressImplicitAnyIndexErrors",
- type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
- },
- {
- name: "stripInternal",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
- },
- {
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0,
- "es5": 1,
- "es6": 2,
- "es2015": 2,
- "es2016": 3,
- "es2017": 4,
- "esnext": 5,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
- },
- {
- name: "version",
- shortName: "v",
- type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
- },
- {
- name: "watch",
- shortName: "w",
- type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
- },
- {
- name: "experimentalDecorators",
- type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
- },
- {
- name: "emitDecoratorMetadata",
- type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
- },
- {
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
- },
- {
- name: "allowUnusedLabels",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
- },
- {
- name: "noImplicitReturns",
- type: "boolean",
- description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
- },
- {
- name: "noFallthroughCasesInSwitch",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
- },
- {
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
- },
- {
- name: "baseUrl",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
- },
- {
- name: "paths",
- type: "object",
- isTSConfigOnly: true
- },
- {
- name: "rootDirs",
- type: "list",
- isTSConfigOnly: true,
- element: {
- name: "rootDirs",
- type: "string",
- isFilePath: true
- }
- },
- {
- name: "typeRoots",
- type: "list",
- element: {
- name: "typeRoots",
- type: "string",
- isFilePath: true
- }
- },
- {
- name: "types",
- type: "list",
- element: {
- name: "types",
- type: "string"
- },
- description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
- },
- {
- name: "traceResolution",
- type: "boolean",
- description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
- },
- {
- name: "allowJs",
- type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
- },
- {
- name: "allowSyntheticDefaultImports",
- type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
- },
- {
- name: "noImplicitUseStrict",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
- },
- {
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
- },
- {
- name: "listEmittedFiles",
- type: "boolean"
- },
- {
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
- },
- {
- name: "disableSizeLimit",
- type: "boolean"
- },
- {
- name: "strictNullChecks",
- type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
- },
- {
- name: "importHelpers",
- type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
- },
- {
- name: "alwaysStrict",
- type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
- }
- ];
- ts.typeAcquisitionDeclarations = [
- {
- name: "enableAutoDiscovery",
- type: "boolean",
- },
- {
- name: "enable",
- type: "boolean",
- },
- {
- name: "include",
- type: "list",
- element: {
- name: "include",
- type: "string"
- }
- },
- {
- name: "exclude",
- type: "list",
- element: {
- name: "exclude",
- type: "string"
- }
- }
- ];
- ts.defaultInitCompilerOptions = {
- module: ts.ModuleKind.CommonJS,
- target: 1,
- noImplicitAny: false,
- sourceMap: false,
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
- var optionNameMapCache;
- function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
- if (typeAcquisition && typeAcquisition.enableAutoDiscovery !== undefined && typeAcquisition.enable === undefined) {
- var result = {
- enable: typeAcquisition.enableAutoDiscovery,
- include: typeAcquisition.include || [],
- exclude: typeAcquisition.exclude || []
- };
- return result;
- }
- return typeAcquisition;
- }
- ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
- function getOptionNameMap() {
- if (optionNameMapCache) {
- return optionNameMapCache;
- }
- var optionNameMap = ts.createMap();
- var shortOptionNames = ts.createMap();
- ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
- if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
- }
- });
- optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
- return optionNameMapCache;
- }
- ts.getOptionNameMap = getOptionNameMap;
- function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
- return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
- }
- ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
- function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
- }
- ts.parseCustomTypeOption = parseCustomTypeOption;
- function parseListTypeOption(opt, value, errors) {
- if (value === void 0) { value = ""; }
- value = trimString(value);
- if (ts.startsWith(value, "-")) {
- return undefined;
- }
- if (value === "") {
- return [];
- }
- var values = value.split(",");
- switch (opt.element.type) {
- case "number":
- return ts.map(values, parseInt);
- case "string":
- return ts.map(values, function (v) { return v || ""; });
- default:
- return ts.filter(ts.map(values, function (v) { return parseCustomTypeOption(opt.element, v, errors); }), function (v) { return !!v; });
- }
- }
- ts.parseListTypeOption = parseListTypeOption;
- function parseCommandLine(commandLine, readFile) {
- var options = {};
- var fileNames = [];
- var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
- parseStrings(commandLine);
- return {
- options: options,
- fileNames: fileNames,
- errors: errors
- };
- function parseStrings(args) {
- var i = 0;
- while (i < args.length) {
- var s = args[i];
- i++;
- if (s.charCodeAt(0) === 64) {
- parseResponseFile(s.slice(1));
- }
- else if (s.charCodeAt(0) === 45) {
- s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
- }
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
- if (opt.isTSConfigOnly) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
- }
- else {
- if (!args[i] && opt.type !== "boolean") {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name));
- }
- switch (opt.type) {
- case "number":
- options[opt.name] = parseInt(args[i]);
- i++;
- break;
- case "boolean":
- var optValue = args[i];
- options[opt.name] = optValue !== "false";
- if (optValue === "false" || optValue === "true") {
- i++;
- }
- break;
- case "string":
- options[opt.name] = args[i] || "";
- i++;
- break;
- case "list":
- var result = parseListTypeOption(opt, args[i], errors);
- options[opt.name] = result || [];
- if (result) {
- i++;
- }
- break;
- default:
- options[opt.name] = parseCustomTypeOption(opt, args[i], errors);
- i++;
- break;
- }
- }
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s));
- }
- }
- else {
- fileNames.push(s);
- }
- }
- }
- function parseResponseFile(fileName) {
- var text = readFile ? readFile(fileName) : ts.sys.readFile(fileName);
- if (!text) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName));
- return;
- }
- var args = [];
- var pos = 0;
- while (true) {
- while (pos < text.length && text.charCodeAt(pos) <= 32)
- pos++;
- if (pos >= text.length)
- break;
- var start = pos;
- if (text.charCodeAt(start) === 34) {
- pos++;
- while (pos < text.length && text.charCodeAt(pos) !== 34)
- pos++;
- if (pos < text.length) {
- args.push(text.substring(start + 1, pos));
- pos++;
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));
- }
- }
- else {
- while (text.charCodeAt(pos) > 32)
- pos++;
- args.push(text.substring(start, pos));
- }
- }
- parseStrings(args);
- }
- }
- ts.parseCommandLine = parseCommandLine;
- function readConfigFile(fileName, readFile) {
- var text = "";
- try {
- text = readFile(fileName);
- }
- catch (e) {
- return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };
- }
- return parseConfigFileTextToJson(fileName, text);
- }
- ts.readConfigFile = readConfigFile;
- function parseConfigFileTextToJson(fileName, jsonText, stripComments) {
- if (stripComments === void 0) { stripComments = true; }
- try {
- var jsonTextToParse = stripComments ? removeComments(jsonText) : jsonText;
- return { config: /\S/.test(jsonTextToParse) ? JSON.parse(jsonTextToParse) : {} };
- }
- catch (e) {
- return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) };
- }
- }
- ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
- function generateTSConfig(options, fileNames) {
- var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
- var configurations = {
- compilerOptions: serializeCompilerOptions(compilerOptions)
- };
- if (fileNames && fileNames.length) {
- configurations.files = fileNames;
- }
- return configurations;
- function getCustomTypeMapOfCommandLineOption(optionDefinition) {
- if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
- return undefined;
- }
- else if (optionDefinition.type === "list") {
- return getCustomTypeMapOfCommandLineOption(optionDefinition.element);
- }
- else {
- return optionDefinition.type;
- }
- }
- function getNameOfCompilerOptionValue(value, customTypeMap) {
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
- return key;
- }
- }
- return undefined;
- }
- function serializeCompilerOptions(options) {
- var result = ts.createMap();
- var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_5 in options) {
- if (ts.hasProperty(options, name_5)) {
- switch (name_5) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_5];
- var optionDefinition = optionsNameMap[name_5.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- result[name_5] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_5] = convertedValue;
- }
- else {
- result[name_5] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
- }
- }
- break;
- }
- }
- }
- return result;
- }
- }
- ts.generateTSConfig = generateTSConfig;
- function removeComments(jsonText) {
- var output = "";
- var scanner = ts.createScanner(1, false, 0, jsonText);
- var token;
- while ((token = scanner.scan()) !== 1) {
- switch (token) {
- case 2:
- case 3:
- output += scanner.getTokenText().replace(/\S/g, " ");
- break;
- default:
- output += scanner.getTokenText();
- break;
- }
- }
- return output;
- }
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
- if (existingOptions === void 0) { existingOptions = {}; }
- if (resolutionStack === void 0) { resolutionStack = []; }
- var errors = [];
- var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
- var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
- if (resolutionStack.indexOf(resolvedPath) >= 0) {
- return {
- options: {},
- fileNames: [],
- typeAcquisition: {},
- raw: json,
- errors: [ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> "))],
- wildcardDirectories: {}
- };
- }
- var options = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName);
- var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
- var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
- if (json["extends"]) {
- var _a = [undefined, undefined, undefined, {}], include = _a[0], exclude = _a[1], files = _a[2], baseOptions = _a[3];
- if (typeof json["extends"] === "string") {
- _b = (tryExtendsName(json["extends"]) || [include, exclude, files, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseOptions = _b[3];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
- }
- if (include && !json["include"]) {
- json["include"] = include;
- }
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
- }
- if (files && !json["files"]) {
- json["files"] = files;
- }
- options = ts.assign({}, baseOptions, options);
- }
- options = ts.extend(existingOptions, options);
- options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
- var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- return {
- options: options,
- fileNames: fileNames,
- typeAcquisition: typeAcquisition,
- raw: json,
- errors: errors,
- wildcardDirectories: wildcardDirectories,
- compileOnSave: compileOnSave
- };
- function tryExtendsName(extendedConfig) {
- if (!(ts.isRootedDiskPath(extendedConfig) || ts.startsWith(ts.normalizeSlashes(extendedConfig), "./") || ts.startsWith(ts.normalizeSlashes(extendedConfig), "../"))) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
- return;
- }
- var extendedConfigPath = ts.toPath(extendedConfig, basePath, getCanonicalFileName);
- if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
- extendedConfigPath = extendedConfigPath + ".json";
- if (!host.fileExists(extendedConfigPath)) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_does_not_exist, extendedConfig));
- return;
- }
- }
- var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
- if (extendedResult.error) {
- errors.push(extendedResult.error);
- return;
- }
- var extendedDirname = ts.getDirectoryPath(extendedConfigPath);
- var relativeDifference = ts.convertToRelativePath(extendedDirname, basePath, getCanonicalFileName);
- var updatePath = function (path) { return ts.isRootedDiskPath(path) ? path : ts.combinePaths(relativeDifference, path); };
- var result = parseJsonConfigFileContent(extendedResult.config, host, extendedDirname, undefined, ts.getBaseFileName(extendedConfigPath), resolutionStack.concat([resolvedPath]));
- errors.push.apply(errors, result.errors);
- var _a = ts.map(["include", "exclude", "files"], function (key) {
- if (!json[key] && extendedResult.config[key]) {
- return ts.map(extendedResult.config[key], updatePath);
- }
- }), include = _a[0], exclude = _a[1], files = _a[2];
- return [include, exclude, files, result.options];
- }
- function getFileNames(errors) {
- var fileNames;
- if (ts.hasProperty(json, "files")) {
- if (ts.isArray(json["files"])) {
- fileNames = json["files"];
- if (fileNames.length === 0) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"));
- }
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array"));
- }
- }
- var includeSpecs;
- if (ts.hasProperty(json, "include")) {
- if (ts.isArray(json["include"])) {
- includeSpecs = json["include"];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "include", "Array"));
- }
- }
- var excludeSpecs;
- if (ts.hasProperty(json, "exclude")) {
- if (ts.isArray(json["exclude"])) {
- excludeSpecs = json["exclude"];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array"));
- }
- }
- else if (ts.hasProperty(json, "excludes")) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
- }
- else {
- excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
- var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
- if (outDir) {
- excludeSpecs.push(outDir);
- }
- }
- if (fileNames === undefined && includeSpecs === undefined) {
- includeSpecs = ["**/*"];
- }
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
- if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
- }
- return result;
- }
- var _b;
- }
- ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
- function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
- if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
- return false;
- }
- var result = convertJsonOption(ts.compileOnSaveCommandLineOption, jsonOption["compileOnSave"], basePath, errors);
- if (typeof result === "boolean" && result) {
- return result;
- }
- return false;
- }
- ts.convertCompileOnSaveOptionFromJson = convertCompileOnSaveOptionFromJson;
- function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) {
- var errors = [];
- var options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
- return { options: options, errors: errors };
- }
- ts.convertCompilerOptionsFromJson = convertCompilerOptionsFromJson;
- function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {
- var errors = [];
- var options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
- return { options: options, errors: errors };
- }
- ts.convertTypeAcquisitionFromJson = convertTypeAcquisitionFromJson;
- function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
- var options = ts.getBaseFileName(configFileName) === "jsconfig.json"
- ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
- : {};
- convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors);
- return options;
- }
- function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
- var options = { enable: ts.getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
- var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions);
- convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors);
- return options;
- }
- function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) {
- if (!jsonOptions) {
- return;
- }
- var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
- for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
- defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
- }
- else {
- errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id));
- }
- }
- }
- function convertJsonOption(opt, value, basePath, errors) {
- var optType = opt.type;
- var expectedType = typeof optType === "string" ? optType : "string";
- if (optType === "list" && ts.isArray(value)) {
- return convertJsonOptionOfListType(opt, value, basePath, errors);
- }
- else if (typeof value === expectedType) {
- if (typeof optType !== "string") {
- return convertJsonOptionOfCustomType(opt, value, errors);
- }
- else {
- if (opt.isFilePath) {
- value = ts.normalizePath(ts.combinePaths(basePath, value));
- if (value === "") {
- value = ".";
- }
- }
- }
- return value;
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType));
- }
- }
- function convertJsonOptionOfCustomType(opt, value, errors) {
- var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
- }
- function convertJsonOptionOfListType(option, values, basePath, errors) {
- return ts.filter(ts.map(values, function (v) { return convertJsonOption(option.element, v, basePath, errors); }), function (v) { return !!v; });
- }
- function trimString(s) {
- return typeof s.trim === "function" ? s.trim() : s.replace(/^[\s]+|[\s]+$/g, "");
- }
- var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/;
- var invalidMultipleRecursionPatterns = /(^|\/)\*\*\/(.*\/)?\*\*($|\/)/;
- var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
- var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
- var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
- basePath = ts.normalizePath(basePath);
- var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
- var literalFileMap = ts.createMap();
- var wildcardFileMap = ts.createMap();
- if (include) {
- include = validateSpecs(include, errors, false);
- }
- if (exclude) {
- exclude = validateSpecs(exclude, errors, true);
- }
- var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
- var supportedExtensions = ts.getSupportedExtensions(options);
- if (fileNames) {
- for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
- var fileName = fileNames_1[_i];
- var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
- }
- }
- if (include && include.length > 0) {
- for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensions, exclude, include); _a < _b.length; _a++) {
- var file = _b[_a];
- if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) {
- continue;
- }
- removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
- var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
- }
- }
- }
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
- return {
- fileNames: literalFiles.concat(wildcardFiles),
- wildcardDirectories: wildcardDirectories
- };
- }
- function validateSpecs(specs, errors, allowTrailingRecursion) {
- var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
- if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
- }
- else if (invalidMultipleRecursionPatterns.test(spec)) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, spec));
- }
- else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
- }
- else {
- validSpecs.push(spec);
- }
- }
- return validSpecs;
- }
- function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
- var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
- var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
- if (include !== undefined) {
- var recursiveKeys = [];
- for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
- var file = include_1[_i];
- var spec = ts.normalizePath(ts.combinePaths(path, file));
- if (excludeRegex && excludeRegex.test(spec)) {
- continue;
- }
- var match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames);
- if (match) {
- var key = match.key, flags = match.flags;
- var existingFlags = wildcardDirectories[key];
- if (existingFlags === undefined || existingFlags < flags) {
- wildcardDirectories[key] = flags;
- if (flags === 1) {
- recursiveKeys.push(key);
- }
- }
- }
- }
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
- }
- }
- }
- }
- return wildcardDirectories;
- }
- function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
- var match = wildcardDirectoryPattern.exec(spec);
- if (match) {
- return {
- key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(),
- flags: watchRecursivePattern.test(spec) ? 1 : 0
- };
- }
- if (ts.isImplicitGlob(spec)) {
- return { key: spec, flags: 1 };
- }
- return undefined;
- }
- function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
- var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
- for (var i = 0; i < adjustedExtensionPriority; i++) {
- var higherPriorityExtension = extensions[i];
- var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
- return true;
- }
- }
- return false;
- }
- function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
- var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
- for (var i = nextExtensionPriority; i < extensions.length; i++) {
- var lowerPriorityExtension = extensions[i];
- var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
- }
- }
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
- function caseSensitiveKeyMapper(key) {
- return key;
- }
- function caseInsensitiveKeyMapper(key) {
- return key.toLowerCase();
- }
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var JsTyping;
- (function (JsTyping) {
- ;
- ;
- var safeList;
- var EmptySafeList = ts.createMap();
- JsTyping.nodeCoreModuleList = [
- "buffer", "querystring", "events", "http", "cluster",
- "zlib", "os", "https", "punycode", "repl", "readline",
- "vm", "child_process", "url", "dns", "net",
- "dgram", "fs", "path", "string_decoder", "tls",
- "crypto", "stream", "util", "assert", "tty", "domain",
- "constants", "process", "v8", "timers", "console"
- ];
- var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
- function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
- var inferredTypings = ts.createMap();
- if (!typeAcquisition || !typeAcquisition.enable) {
- return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
- }
- fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
- var kind = ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f));
- return kind === 1 || kind === 2;
- });
- if (!safeList) {
- var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
- safeList = result.config ? ts.createMap(result.config) : EmptySafeList;
- }
- var filesToWatch = [];
- var searchDirs = [];
- var exclude = [];
- mergeTypings(typeAcquisition.include);
- exclude = typeAcquisition.exclude || [];
- var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
- if (projectRootPath) {
- possibleSearchDirs.push(projectRootPath);
- }
- searchDirs = ts.deduplicate(possibleSearchDirs);
- for (var _i = 0, searchDirs_1 = searchDirs; _i < searchDirs_1.length; _i++) {
- var searchDir = searchDirs_1[_i];
- var packageJsonPath = ts.combinePaths(searchDir, "package.json");
- getTypingNamesFromJson(packageJsonPath, filesToWatch);
- var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
- getTypingNamesFromJson(bowerJsonPath, filesToWatch);
- var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
- getTypingNamesFromNodeModuleFolder(nodeModulesPath);
- }
- getTypingNamesFromSourceFileNames(fileNames);
- if (unresolvedImports) {
- for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
- var moduleId = unresolvedImports_1[_a];
- var typingName = moduleId in nodeCoreModules ? "node" : moduleId;
- if (!(typingName in inferredTypings)) {
- inferredTypings[typingName] = undefined;
- }
- }
- }
- for (var name_6 in packageNameToTypingLocation) {
- if (name_6 in inferredTypings && !inferredTypings[name_6]) {
- inferredTypings[name_6] = packageNameToTypingLocation[name_6];
- }
- }
- for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
- var excludeTypingName = exclude_1[_b];
- delete inferredTypings[excludeTypingName];
- }
- var newTypingNames = [];
- var cachedTypingPaths = [];
- for (var typing in inferredTypings) {
- if (inferredTypings[typing] !== undefined) {
- cachedTypingPaths.push(inferredTypings[typing]);
- }
- else {
- newTypingNames.push(typing);
- }
- }
- return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
- function mergeTypings(typingNames) {
- if (!typingNames) {
- return;
- }
- for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
- var typing = typingNames_1[_i];
- if (!(typing in inferredTypings)) {
- inferredTypings[typing] = undefined;
- }
- }
- }
- function getTypingNamesFromJson(jsonPath, filesToWatch) {
- if (host.fileExists(jsonPath)) {
- filesToWatch.push(jsonPath);
- }
- var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
- if (result.config) {
- var jsonConfig = result.config;
- if (jsonConfig.dependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
- }
- if (jsonConfig.devDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
- }
- if (jsonConfig.optionalDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
- }
- if (jsonConfig.peerDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
- }
- }
- }
- function getTypingNamesFromSourceFileNames(fileNames) {
- var jsFileNames = ts.filter(fileNames, ts.hasJavaScriptFileExtension);
- var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
- var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
- if (safeList !== EmptySafeList) {
- mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; }));
- }
- var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
- if (hasJsxFile) {
- mergeTypings(["react"]);
- }
- }
- function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
- if (!host.directoryExists(nodeModulesPath)) {
- return;
- }
- var typingNames = [];
- var fileNames = host.readDirectory(nodeModulesPath, [".json"], undefined, undefined, 2);
- for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
- var fileName = fileNames_2[_i];
- var normalizedFileName = ts.normalizePath(fileName);
- if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
- continue;
- }
- var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
- if (!result.config) {
- continue;
- }
- var packageJson = result.config;
- if (packageJson._requiredBy &&
- ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
- continue;
- }
- if (!packageJson.name) {
- continue;
- }
- if (packageJson.typings) {
- var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
- inferredTypings[packageJson.name] = absolutePath;
- }
- else {
- typingNames.push(packageJson.name);
- }
- }
- mergeTypings(typingNames);
- }
- }
- JsTyping.discoverTypings = discoverTypings;
- })(JsTyping = ts.JsTyping || (ts.JsTyping = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- server.ActionSet = "action::set";
- server.ActionInvalidate = "action::invalidate";
- server.EventInstall = "event::install";
- var Arguments;
- (function (Arguments) {
- Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
- Arguments.LogFile = "--logFile";
- Arguments.EnableTelemetry = "--enableTelemetry";
- })(Arguments = server.Arguments || (server.Arguments = {}));
- function hasArgument(argumentName) {
- return ts.sys.args.indexOf(argumentName) >= 0;
- }
- server.hasArgument = hasArgument;
- function findArgument(argumentName) {
- var index = ts.sys.args.indexOf(argumentName);
- return index >= 0 && index < ts.sys.args.length - 1
- ? ts.sys.args[index + 1]
- : undefined;
- }
- server.findArgument = findArgument;
- })(server = ts.server || (ts.server = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- var LogLevel;
- (function (LogLevel) {
- LogLevel[LogLevel["terse"] = 0] = "terse";
- LogLevel[LogLevel["normal"] = 1] = "normal";
- LogLevel[LogLevel["requestTime"] = 2] = "requestTime";
- LogLevel[LogLevel["verbose"] = 3] = "verbose";
- })(LogLevel = server.LogLevel || (server.LogLevel = {}));
- server.emptyArray = [];
- var Msg;
- (function (Msg) {
- Msg.Err = "Err";
- Msg.Info = "Info";
- Msg.Perf = "Perf";
- })(Msg = server.Msg || (server.Msg = {}));
- function getProjectRootPath(project) {
- switch (project.projectKind) {
- case server.ProjectKind.Configured:
- return ts.getDirectoryPath(project.getProjectName());
- case server.ProjectKind.Inferred:
- return "";
- case server.ProjectKind.External:
- var projectName = ts.normalizeSlashes(project.getProjectName());
- return project.projectService.host.fileExists(projectName) ? ts.getDirectoryPath(projectName) : projectName;
- }
- }
- function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) {
- return {
- projectName: project.getProjectName(),
- fileNames: project.getFileNames(true),
- compilerOptions: project.getCompilerOptions(),
- typeAcquisition: typeAcquisition,
- unresolvedImports: unresolvedImports,
- projectRootPath: getProjectRootPath(project),
- cachePath: cachePath,
- kind: "discover"
- };
- }
- server.createInstallTypingsRequest = createInstallTypingsRequest;
- var Errors;
- (function (Errors) {
- function ThrowNoProject() {
- throw new Error("No Project.");
- }
- Errors.ThrowNoProject = ThrowNoProject;
- function ThrowProjectLanguageServiceDisabled() {
- throw new Error("The project's language service is disabled.");
- }
- Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
- function ThrowProjectDoesNotContainDocument(fileName, project) {
- throw new Error("Project '" + project.getProjectName() + "' does not contain document '" + fileName + "'");
- }
- Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
- })(Errors = server.Errors || (server.Errors = {}));
- function getDefaultFormatCodeSettings(host) {
- return {
- indentSize: 4,
- tabSize: 4,
- newLineCharacter: host.newLine || "\n",
- convertTabsToSpaces: true,
- indentStyle: ts.IndentStyle.Smart,
- insertSpaceAfterCommaDelimiter: true,
- insertSpaceAfterSemicolonInForStatements: true,
- insertSpaceBeforeAndAfterBinaryOperators: true,
- insertSpaceAfterKeywordsInControlFlowStatements: true,
- insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
- placeOpenBraceOnNewLineForFunctions: false,
- placeOpenBraceOnNewLineForControlBlocks: false,
- };
- }
- server.getDefaultFormatCodeSettings = getDefaultFormatCodeSettings;
- function mergeMaps(target, source) {
- for (var key in source) {
- if (ts.hasProperty(source, key)) {
- target[key] = source[key];
- }
- }
- }
- server.mergeMaps = mergeMaps;
- function removeItemFromSet(items, itemToRemove) {
- if (items.length === 0) {
- return;
- }
- var index = items.indexOf(itemToRemove);
- if (index < 0) {
- return;
- }
- if (index === items.length - 1) {
- items.pop();
- }
- else {
- items[index] = items.pop();
- }
- }
- server.removeItemFromSet = removeItemFromSet;
- function toNormalizedPath(fileName) {
- return ts.normalizePath(fileName);
- }
- server.toNormalizedPath = toNormalizedPath;
- function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {
- var f = ts.isRootedDiskPath(normalizedPath) ? normalizedPath : ts.getNormalizedAbsolutePath(normalizedPath, currentDirectory);
- return getCanonicalFileName(f);
- }
- server.normalizedPathToPath = normalizedPathToPath;
- function asNormalizedPath(fileName) {
- return fileName;
- }
- server.asNormalizedPath = asNormalizedPath;
- function createNormalizedPathMap() {
- var map = Object.create(null);
- return {
- get: function (path) {
- return map[path];
- },
- set: function (path, value) {
- map[path] = value;
- },
- contains: function (path) {
- return ts.hasProperty(map, path);
- },
- remove: function (path) {
- delete map[path];
- }
- };
- }
- server.createNormalizedPathMap = createNormalizedPathMap;
- function isInferredProjectName(name) {
- return /dev\/null\/inferredProject\d+\*/.test(name);
- }
- server.isInferredProjectName = isInferredProjectName;
- function makeInferredProjectName(counter) {
- return "/dev/null/inferredProject" + counter + "*";
- }
- server.makeInferredProjectName = makeInferredProjectName;
- function toSortedReadonlyArray(arr) {
- arr.sort();
- return arr;
- }
- server.toSortedReadonlyArray = toSortedReadonlyArray;
- var ThrottledOperations = (function () {
- function ThrottledOperations(host) {
- this.host = host;
- this.pendingTimeouts = ts.createMap();
- }
- ThrottledOperations.prototype.schedule = function (operationId, delay, cb) {
- if (ts.hasProperty(this.pendingTimeouts, operationId)) {
- this.host.clearTimeout(this.pendingTimeouts[operationId]);
- }
- this.pendingTimeouts[operationId] = this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb);
- };
- ThrottledOperations.run = function (self, operationId, cb) {
- delete self.pendingTimeouts[operationId];
- cb();
- };
- return ThrottledOperations;
- }());
- server.ThrottledOperations = ThrottledOperations;
- var GcTimer = (function () {
- function GcTimer(host, delay, logger) {
- this.host = host;
- this.delay = delay;
- this.logger = logger;
- }
- GcTimer.prototype.scheduleCollect = function () {
- if (!this.host.gc || this.timerId != undefined) {
- return;
- }
- this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
- };
- GcTimer.run = function (self) {
- self.timerId = undefined;
- var log = self.logger.hasLevel(LogLevel.requestTime);
- var before = log && self.host.getMemoryUsage();
- self.host.gc();
- if (log) {
- var after = self.host.getMemoryUsage();
- self.logger.perftrc("GC::before " + before + ", after " + after);
- }
- };
- return GcTimer;
- }());
- server.GcTimer = GcTimer;
- })(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -6290,6 +4305,12 @@ var ts;
return compilerOptions.traceResolution && host.trace !== undefined;
}
ts.isTraceEnabled = isTraceEnabled;
+ var Extensions;
+ (function (Extensions) {
+ Extensions[Extensions["TypeScript"] = 0] = "TypeScript";
+ Extensions[Extensions["JavaScript"] = 1] = "JavaScript";
+ Extensions[Extensions["DtsOnly"] = 2] = "DtsOnly";
+ })(Extensions || (Extensions = {}));
function resolvedTypeScriptOnly(resolved) {
if (!resolved) {
return undefined;
@@ -6297,9 +4318,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
@@ -6311,37 +4329,28 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2:
- case 0:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
+ }
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
}
+ return path;
}
}
function readJson(path, host) {
@@ -6374,11 +4383,12 @@ var ts;
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -6433,7 +4443,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -6449,7 +4463,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -6490,31 +4505,116 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -6639,37 +4739,43 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0) || tryResolve(1);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state, true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -6680,12 +4786,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
+ }
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
function directoryProbablyExists(directoryName, host) {
return !host.directoryExists || host.directoryExists(directoryName);
@@ -6713,11 +4842,11 @@ var ts;
}
}
switch (extensions) {
- case 2:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -6726,113 +4855,181 @@ var ts;
}
}
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, false);
+ }
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(2, moduleName, directory, failedLookupLocations, state, true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, true, undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1) {
- return loadModuleFromNodeModulesFolder(2, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
+ }
+ }
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1);
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0) || tryResolve(1);
- return createResolvedModuleWithFailedLookupLocations(resolved, false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0) {
+ if (extensions === Extensions.TypeScript) {
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state));
}
}
}
@@ -6844,10 +5041,13 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
function forEachAncestorDirectory(directory, callback) {
while (true) {
var result = callback(directory);
@@ -6878,6 +5078,19 @@ var ts;
return undefined;
}
ts.getDeclarationOfKind = getDeclarationOfKind;
+ function findDeclaration(symbol, predicate) {
+ var declarations = symbol.declarations;
+ if (declarations) {
+ for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
+ var declaration = declarations_2[_i];
+ if (predicate(declaration)) {
+ return declaration;
+ }
+ }
+ }
+ return undefined;
+ }
+ ts.findDeclaration = findDeclaration;
var stringWriters = [];
function getSingleLineStringWriter() {
if (stringWriters.length === 0) {
@@ -6891,13 +5104,15 @@ var ts;
writeSpace: writeText,
writeStringLiteral: writeText,
writeParameter: writeText,
+ writeProperty: writeText,
writeSymbol: writeText,
writeLine: function () { return str_1 += " "; },
increaseIndent: ts.noop,
decreaseIndent: ts.noop,
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
}
return stringWriters.pop();
@@ -6913,25 +5128,25 @@ var ts;
}
ts.getFullWidth = getFullWidth;
function hasResolvedModule(sourceFile, moduleNameText) {
- return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]);
+ return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText));
}
ts.hasResolvedModule = hasResolvedModule;
function getResolvedModule(sourceFile, moduleNameText) {
- return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined;
+ return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules.get(moduleNameText) : undefined;
}
ts.getResolvedModule = getResolvedModule;
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
if (!sourceFile.resolvedModules) {
sourceFile.resolvedModules = ts.createMap();
}
- sourceFile.resolvedModules[moduleNameText] = resolvedModule;
+ sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
}
ts.setResolvedModule = setResolvedModule;
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap();
}
- sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective;
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
}
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
function moduleResolutionIsEqualTo(oldResolution, newResolution) {
@@ -6950,7 +5165,7 @@ var ts;
}
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
- var oldResolution = oldResolutions && oldResolutions[names[i]];
+ var oldResolution = oldResolutions && oldResolutions.get(names[i]);
var changed = oldResolution
? !newResolution || !comparer(oldResolution, newResolution)
: newResolution;
@@ -6963,21 +5178,21 @@ var ts;
ts.hasChangesInResolutions = hasChangesInResolutions;
function containsParseError(node) {
aggregateChildData(node);
- return (node.flags & 4194304) !== 0;
+ return (node.flags & 131072) !== 0;
}
ts.containsParseError = containsParseError;
function aggregateChildData(node) {
- if (!(node.flags & 8388608)) {
- var thisNodeOrAnySubNodesHasError = ((node.flags & 1048576) !== 0) ||
+ if (!(node.flags & 262144)) {
+ var thisNodeOrAnySubNodesHasError = ((node.flags & 32768) !== 0) ||
ts.forEachChild(node, containsParseError);
if (thisNodeOrAnySubNodesHasError) {
- node.flags |= 4194304;
+ node.flags |= 131072;
}
- node.flags |= 8388608;
+ node.flags |= 262144;
}
}
function getSourceFileOfNode(node) {
- while (node && node.kind !== 261) {
+ while (node && node.kind !== 264) {
node = node.parent;
}
return node;
@@ -6985,11 +5200,11 @@ var ts;
ts.getSourceFileOfNode = getSourceFileOfNode;
function isStatementWithLocals(node) {
switch (node.kind) {
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
return true;
}
return false;
@@ -7044,6 +5259,10 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 141;
+ }
+ ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
@@ -7054,18 +5273,18 @@ var ts;
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 292 && node._children.length > 0) {
+ if (node.kind === 293 && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
}
ts.getTokenPosOfNode = getTokenPosOfNode;
function isJSDocNode(node) {
- return node.kind >= 262 && node.kind <= 288;
+ return node.kind >= 266 && node.kind <= 292;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocTag(node) {
- return node.kind >= 278 && node.kind <= 291;
+ return node.kind >= 282 && node.kind <= 292;
}
ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -7096,16 +5315,9 @@ var ts;
return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);
}
ts.getTextOfNode = getTextOfNode;
- function getLiteralText(node, sourceFile, languageVersion) {
- if (languageVersion < 2 && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
- return getQuotedEscapedLiteralText('"', node.text, '"');
- }
+ function getLiteralText(node, sourceFile) {
if (!nodeIsSynthesized(node) && node.parent) {
- var text = getSourceTextOfNodeFromSourceFile(sourceFile, node);
- if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) {
- return node.text;
- }
- return text;
+ return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
switch (node.kind) {
case 9:
@@ -7124,19 +5336,6 @@ var ts;
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function isBinaryOrOctalIntegerLiteral(node, text) {
- if (node.kind === 8 && text.length > 1) {
- switch (text.charCodeAt(1)) {
- case 98:
- case 66:
- case 111:
- case 79:
- return true;
- }
- }
- return false;
- }
- ts.isBinaryOrOctalIntegerLiteral = isBinaryOrOctalIntegerLiteral;
function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
}
@@ -7144,10 +5343,6 @@ var ts;
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
ts.escapeIdentifier = escapeIdentifier;
- function unescapeIdentifier(identifier) {
- return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
- }
- ts.unescapeIdentifier = unescapeIdentifier;
function makeIdentifierFromModuleName(moduleName) {
return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_");
}
@@ -7159,11 +5354,11 @@ var ts;
ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
var node = getRootDeclaration(declaration);
- return node.kind === 223 && node.parent.kind === 256;
+ return node.kind === 225 && node.parent.kind === 259;
}
ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
function isAmbientModule(node) {
- return node && node.kind === 230 &&
+ return node && node.kind === 232 &&
(node.name.kind === 9 || isGlobalScopeAugmentation(node));
}
ts.isAmbientModule = isAmbientModule;
@@ -7172,11 +5367,11 @@ var ts;
}
ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
function isShorthandAmbientModule(node) {
- return node.kind === 230 && (!node.body);
+ return node && node.kind === 232 && (!node.body);
}
function isBlockScopedContainerTopLevel(node) {
- return node.kind === 261 ||
- node.kind === 230 ||
+ return node.kind === 264 ||
+ node.kind === 232 ||
isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
@@ -7189,32 +5384,36 @@ var ts;
return false;
}
switch (node.parent.kind) {
- case 261:
+ case 264:
return ts.isExternalModule(node.parent);
- case 231:
+ case 233:
return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
}
return false;
}
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
+ function isEffectiveExternalModule(node, compilerOptions) {
+ return ts.isExternalModule(node) || compilerOptions.isolatedModules;
+ }
+ ts.isEffectiveExternalModule = isEffectiveExternalModule;
function isBlockScope(node, parentNode) {
switch (node.kind) {
- case 261:
+ case 264:
+ case 234:
+ case 259:
case 232:
- case 256:
- case 230:
- case 211:
- case 212:
case 213:
- case 150:
- case 149:
+ case 214:
+ case 215:
case 151:
+ case 150:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
+ case 186:
return true;
- case 204:
+ case 206:
return parentNode && !isFunctionLike(parentNode);
}
return false;
@@ -7234,6 +5433,10 @@ var ts;
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
}
ts.declarationNameToString = declarationNameToString;
+ function getNameFromIndexInfo(info) {
+ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
+ }
+ ts.getNameFromIndexInfo = getNameFromIndexInfo;
function getTextOfPropertyName(name) {
switch (name.kind) {
case 70:
@@ -7241,7 +5444,7 @@ var ts;
case 9:
case 8:
return name.text;
- case 142:
+ case 143:
if (isStringOrNumericLiteral(name.expression)) {
return name.expression.text;
}
@@ -7252,10 +5455,10 @@ var ts;
function entityNameToString(name) {
switch (name.kind) {
case 70:
- return getFullWidth(name) === 0 ? unescapeIdentifier(name.text) : getTextOfNode(name);
- case 141:
+ return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name);
+ case 142:
return entityNameToString(name.left) + "." + entityNameToString(name.right);
- case 177:
+ case 178:
return entityNameToString(name.expression) + "." + entityNameToString(name.name);
}
}
@@ -7292,7 +5495,7 @@ var ts;
ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
function getErrorSpanForArrowFunction(sourceFile, node) {
var pos = ts.skipTrivia(sourceFile.text, node.pos);
- if (node.body && node.body.kind === 204) {
+ if (node.body && node.body.kind === 206) {
var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
if (startLine < endLine) {
@@ -7304,29 +5507,29 @@ var ts;
function getErrorSpanForNode(sourceFile, node) {
var errorNode = node;
switch (node.kind) {
- case 261:
+ case 264:
var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
if (pos_1 === sourceFile.text.length) {
return ts.createTextSpan(0, 0);
}
return getSpanOfTokenAtPosition(sourceFile, pos_1);
- case 223:
- case 174:
- case 226:
- case 197:
- case 227:
- case 230:
- case 229:
- case 260:
case 225:
- case 184:
- case 149:
- case 151:
- case 152:
+ case 175:
case 228:
+ case 198:
+ case 229:
+ case 232:
+ case 231:
+ case 263:
+ case 227:
+ case 185:
+ case 150:
+ case 152:
+ case 153:
+ case 230:
errorNode = node.name;
break;
- case 185:
+ case 186:
return getErrorSpanForArrowFunction(sourceFile, node);
}
if (errorNode === undefined) {
@@ -7347,7 +5550,7 @@ var ts;
}
ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
- return node.kind === 229 && isConst(node);
+ return node.kind === 231 && isConst(node);
}
ts.isConstEnumDeclaration = isConstEnumDeclaration;
function isConst(node) {
@@ -7360,11 +5563,11 @@ var ts;
}
ts.isLet = isLet;
function isSuperCall(n) {
- return n.kind === 179 && n.expression.kind === 96;
+ return n.kind === 180 && n.expression.kind === 96;
}
ts.isSuperCall = isSuperCall;
function isPrologueDirective(node) {
- return node.kind === 207
+ return node.kind === 209
&& node.expression.kind === 9;
}
ts.isPrologueDirective = isPrologueDirective;
@@ -7377,10 +5580,10 @@ var ts;
}
ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText;
function getJSDocCommentRanges(node, text) {
- var commentRanges = (node.kind === 144 ||
- node.kind === 143 ||
- node.kind === 184 ||
- node.kind === 185) ?
+ var commentRanges = (node.kind === 145 ||
+ node.kind === 144 ||
+ node.kind === 185 ||
+ node.kind === 186) ?
ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRangesOfNodeFromText(node, text);
return ts.filter(commentRanges, function (comment) {
@@ -7394,96 +5597,110 @@ var ts;
ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
function isPartOfTypeNode(node) {
- if (156 <= node.kind && node.kind <= 171) {
+ if (157 <= node.kind && node.kind <= 172) {
return true;
}
switch (node.kind) {
case 118:
case 132:
- case 134:
- case 121:
case 135:
- case 137:
+ case 121:
+ case 136:
+ case 138:
case 129:
return true;
case 104:
- return node.parent.kind !== 188;
- case 199:
+ return node.parent.kind !== 189;
+ case 200:
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
case 70:
- if (node.parent.kind === 141 && node.parent.right === node) {
+ if (node.parent.kind === 142 && node.parent.right === node) {
node = node.parent;
}
- else if (node.parent.kind === 177 && node.parent.name === node) {
+ else if (node.parent.kind === 178 && node.parent.name === node) {
node = node.parent;
}
- ts.Debug.assert(node.kind === 70 || node.kind === 141 || node.kind === 177, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
- case 141:
- case 177:
+ ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+ case 142:
+ case 178:
case 98:
- var parent_1 = node.parent;
- if (parent_1.kind === 160) {
+ var parent = node.parent;
+ if (parent.kind === 161) {
return false;
}
- if (156 <= parent_1.kind && parent_1.kind <= 171) {
+ if (157 <= parent.kind && parent.kind <= 172) {
return true;
}
- switch (parent_1.kind) {
- case 199:
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1);
- case 143:
- return node === parent_1.constraint;
- case 147:
- case 146:
+ switch (parent.kind) {
+ case 200:
+ return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
case 144:
- case 223:
- return node === parent_1.type;
+ return node === parent.constraint;
+ case 148:
+ case 147:
+ case 145:
case 225:
- case 184:
+ return node === parent.type;
+ case 227:
case 185:
+ case 186:
+ case 151:
case 150:
case 149:
- case 148:
- case 151:
case 152:
- return node === parent_1.type;
case 153:
+ return node === parent.type;
case 154:
case 155:
- return node === parent_1.type;
- case 182:
- return node === parent_1.type;
- case 179:
+ case 156:
+ return node === parent.type;
+ case 183:
+ return node === parent.type;
case 180:
- return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0;
case 181:
+ return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0;
+ case 182:
return false;
}
}
return false;
}
ts.isPartOfTypeNode = isPartOfTypeNode;
+ function isChildOfNodeWithKind(node, kind) {
+ while (node) {
+ if (node.kind === kind) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+ ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 216:
+ case 218:
return visitor(node);
- case 232:
- case 204:
- case 208:
- case 209:
+ case 234:
+ case 206:
case 210:
case 211:
case 212:
case 213:
- case 217:
- case 218:
- case 253:
- case 254:
+ case 214:
+ case 215:
case 219:
- case 221:
+ case 220:
case 256:
+ case 257:
+ case 221:
+ case 223:
+ case 259:
return ts.forEachChild(node, traverse);
}
}
@@ -7493,24 +5710,25 @@ var ts;
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 195:
+ case 196:
visitor(node);
var operand = node.expression;
if (operand) {
traverse(operand);
}
+ return;
+ case 231:
case 229:
- case 227:
+ case 232:
case 230:
case 228:
- case 226:
- case 197:
+ case 198:
return;
default:
if (isFunctionLike(node)) {
- var name_7 = node.name;
- if (name_7 && name_7.kind === 142) {
- traverse(name_7.expression);
+ var name = node.name;
+ if (name && name.kind === 143) {
+ traverse(name.expression);
return;
}
}
@@ -7521,17 +5739,29 @@ var ts;
}
}
ts.forEachYieldExpression = forEachYieldExpression;
+ function getRestParameterElementType(node) {
+ if (node && node.kind === 163) {
+ return node.elementType;
+ }
+ else if (node && node.kind === 158) {
+ return ts.singleOrUndefined(node.typeArguments);
+ }
+ else {
+ return undefined;
+ }
+ }
+ ts.getRestParameterElementType = getRestParameterElementType;
function isVariableLike(node) {
if (node) {
switch (node.kind) {
- case 174:
+ case 175:
+ case 263:
+ case 145:
case 260:
- case 144:
- case 257:
+ case 148:
case 147:
- case 146:
- case 258:
- case 223:
+ case 261:
+ case 225:
return true;
}
}
@@ -7539,11 +5769,11 @@ var ts;
}
ts.isVariableLike = isVariableLike;
function isAccessor(node) {
- return node && (node.kind === 151 || node.kind === 152);
+ return node && (node.kind === 152 || node.kind === 153);
}
ts.isAccessor = isAccessor;
function isClassLike(node) {
- return node && (node.kind === 226 || node.kind === 197);
+ return node && (node.kind === 228 || node.kind === 198);
}
ts.isClassLike = isClassLike;
function isFunctionLike(node) {
@@ -7552,19 +5782,19 @@ var ts;
ts.isFunctionLike = isFunctionLike;
function isFunctionLikeKind(kind) {
switch (kind) {
- case 150:
- case 184:
- case 225:
+ case 151:
case 185:
+ case 227:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return true;
}
return false;
@@ -7572,13 +5802,13 @@ var ts;
ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
+ case 185:
return true;
}
return false;
@@ -7586,30 +5816,42 @@ var ts;
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
function isIterationStatement(node, lookInLabeledStatements) {
switch (node.kind) {
+ case 213:
+ case 214:
+ case 215:
case 211:
case 212:
- case 213:
- case 209:
- case 210:
return true;
- case 219:
+ case 221:
return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
}
return false;
}
ts.isIterationStatement = isIterationStatement;
+ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
+ while (true) {
+ if (beforeUnwrapLabelCallback) {
+ beforeUnwrapLabelCallback(node);
+ }
+ if (node.statement.kind !== 221) {
+ return node.statement;
+ }
+ node = node.statement;
+ }
+ }
+ ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 204 && isFunctionLike(node.parent);
+ return node && node.kind === 206 && isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
- return node && node.kind === 149 && node.parent.kind === 176;
+ return node && node.kind === 150 && node.parent.kind === 177;
}
ts.isObjectLiteralMethod = isObjectLiteralMethod;
function isObjectLiteralOrClassExpressionMethod(node) {
- return node.kind === 149 &&
- (node.parent.kind === 176 ||
- node.parent.kind === 197);
+ return node.kind === 150 &&
+ (node.parent.kind === 177 ||
+ node.parent.kind === 198);
}
ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
function isIdentifierTypePredicate(predicate) {
@@ -7645,44 +5887,57 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 142:
+ case 143:
if (isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
node = node.parent;
}
break;
- case 185:
+ case 186:
if (!includeArrowFunctions) {
continue;
}
- case 225:
- case 184:
- case 230:
- case 147:
- case 146:
- case 149:
+ case 227:
+ case 185:
+ case 232:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
case 153:
case 154:
case 155:
- case 229:
- case 261:
+ case 156:
+ case 231:
+ case 264:
return node;
}
}
}
ts.getThisContainer = getThisContainer;
+ function getNewTargetContainer(node) {
+ var container = getThisContainer(node, false);
+ if (container) {
+ switch (container.kind) {
+ case 151:
+ case 227:
+ case 185:
+ return container;
+ }
+ }
+ return undefined;
+ }
+ ts.getNewTargetContainer = getNewTargetContainer;
function getSuperContainer(node, stopOnFunctions) {
while (true) {
node = node.parent;
@@ -7690,25 +5945,25 @@ var ts;
return node;
}
switch (node.kind) {
- case 142:
+ case 143:
node = node.parent;
break;
- case 225:
- case 184:
+ case 227:
case 185:
+ case 186:
if (!stopOnFunctions) {
continue;
}
- case 147:
- case 146:
- case 149:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
+ case 153:
return node;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
@@ -7720,36 +5975,36 @@ var ts;
}
ts.getSuperContainer = getSuperContainer;
function getImmediatelyInvokedFunctionExpression(func) {
- if (func.kind === 184 || func.kind === 185) {
+ if (func.kind === 185 || func.kind === 186) {
var prev = func;
- var parent_2 = func.parent;
- while (parent_2.kind === 183) {
- prev = parent_2;
- parent_2 = parent_2.parent;
+ var parent = func.parent;
+ while (parent.kind === 184) {
+ prev = parent;
+ parent = parent.parent;
}
- if (parent_2.kind === 179 && parent_2.expression === prev) {
- return parent_2;
+ if (parent.kind === 180 && parent.expression === prev) {
+ return parent;
}
}
}
ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression;
function isSuperProperty(node) {
var kind = node.kind;
- return (kind === 177 || kind === 178)
+ return (kind === 178 || kind === 179)
&& node.expression.kind === 96;
}
ts.isSuperProperty = isSuperProperty;
function getEntityNameFromTypeNode(node) {
switch (node.kind) {
- case 157:
- case 272:
+ case 158:
+ case 276:
return node.typeName;
- case 199:
+ case 200:
return isEntityNameExpression(node.expression)
? node.expression
: undefined;
case 70:
- case 141:
+ case 142:
return node;
}
return undefined;
@@ -7757,10 +6012,12 @@ var ts;
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
function isCallLikeExpression(node) {
switch (node.kind) {
- case 179:
+ case 250:
+ case 249:
case 180:
case 181:
- case 145:
+ case 182:
+ case 146:
return true;
default:
return false;
@@ -7768,29 +6025,32 @@ var ts;
}
ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
return node.tag;
}
+ else if (isJsxOpeningLikeElement(node)) {
+ return node.tagName;
+ }
return node.expression;
}
ts.getInvokedExpression = getInvokedExpression;
function nodeCanBeDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return true;
- case 147:
- return node.parent.kind === 226;
- case 151:
+ case 148:
+ return node.parent.kind === 228;
case 152:
- case 149:
+ case 153:
+ case 150:
return node.body !== undefined
- && node.parent.kind === 226;
- case 144:
+ && node.parent.kind === 228;
+ case 145:
return node.parent.body !== undefined
- && (node.parent.kind === 150
- || node.parent.kind === 149
- || node.parent.kind === 152)
- && node.parent.parent.kind === 226;
+ && (node.parent.kind === 151
+ || node.parent.kind === 150
+ || node.parent.kind === 153)
+ && node.parent.parent.kind === 228;
}
return false;
}
@@ -7806,19 +6066,19 @@ var ts;
ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
function childIsDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return ts.forEach(node.members, nodeOrChildIsDecorated);
- case 149:
- case 152:
+ case 150:
+ case 153:
return ts.forEach(node.parameters, nodeIsDecorated);
}
}
ts.childIsDecorated = childIsDecorated;
function isJSXTagName(node) {
var parent = node.parent;
- if (parent.kind === 248 ||
- parent.kind === 247 ||
- parent.kind === 249) {
+ if (parent.kind === 250 ||
+ parent.kind === 249 ||
+ parent.kind === 251) {
return parent.tagName === node;
}
return false;
@@ -7832,95 +6092,96 @@ var ts;
case 100:
case 85:
case 11:
- case 175:
case 176:
case 177:
case 178:
case 179:
case 180:
case 181:
- case 200:
case 182:
case 201:
case 183:
+ case 202:
case 184:
- case 197:
case 185:
- case 188:
+ case 198:
case 186:
+ case 189:
case 187:
- case 190:
+ case 188:
case 191:
case 192:
case 193:
- case 196:
case 194:
- case 12:
- case 198:
- case 246:
- case 247:
+ case 197:
case 195:
- case 189:
+ case 12:
+ case 199:
+ case 248:
+ case 249:
+ case 196:
+ case 190:
+ case 203:
return true;
- case 141:
- while (node.parent.kind === 141) {
+ case 142:
+ while (node.parent.kind === 142) {
node = node.parent;
}
- return node.parent.kind === 160 || isJSXTagName(node);
+ return node.parent.kind === 161 || isJSXTagName(node);
case 70:
- if (node.parent.kind === 160 || isJSXTagName(node)) {
+ if (node.parent.kind === 161 || isJSXTagName(node)) {
return true;
}
case 8:
case 9:
case 98:
- var parent_3 = node.parent;
- switch (parent_3.kind) {
- case 223:
- case 144:
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
+ case 263:
case 260:
- case 257:
- case 174:
- return parent_3.initializer === node;
- case 207:
- case 208:
+ case 175:
+ return parent.initializer === node;
case 209:
case 210:
- case 216:
- case 217:
+ case 211:
+ case 212:
case 218:
- case 253:
+ case 219:
case 220:
- case 218:
- return parent_3.expression === node;
- case 211:
- var forStatement = parent_3;
- return (forStatement.initializer === node && forStatement.initializer.kind !== 224) ||
+ case 256:
+ case 222:
+ case 220:
+ return parent.expression === node;
+ case 213:
+ var forStatement = parent;
+ return (forStatement.initializer === node && forStatement.initializer.kind !== 226) ||
forStatement.condition === node ||
forStatement.incrementor === node;
- case 212:
- case 213:
- var forInStatement = parent_3;
- return (forInStatement.initializer === node && forInStatement.initializer.kind !== 224) ||
+ case 214:
+ case 215:
+ var forInStatement = parent;
+ return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) ||
forInStatement.expression === node;
- case 182:
- case 200:
- return node === parent_3.expression;
- case 202:
- return node === parent_3.expression;
- case 142:
- return node === parent_3.expression;
- case 145:
- case 252:
- case 251:
- case 259:
+ case 183:
+ case 201:
+ return node === parent.expression;
+ case 204:
+ return node === parent.expression;
+ case 143:
+ return node === parent.expression;
+ case 146:
+ case 255:
+ case 254:
+ case 262:
return true;
- case 199:
- return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3);
+ case 200:
+ return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
default:
- if (isPartOfExpression(parent_3)) {
+ if (isPartOfExpression(parent)) {
return true;
}
}
@@ -7935,7 +6196,7 @@ var ts;
}
ts.isInstantiatedModule = isInstantiatedModule;
function isExternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind === 245;
+ return node.kind === 236 && node.moduleReference.kind === 247;
}
ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -7944,7 +6205,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function isInternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind !== 245;
+ return node.kind === 236 && node.moduleReference.kind !== 247;
}
ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
function isSourceFileJavaScript(file) {
@@ -7952,38 +6213,57 @@ var ts;
}
ts.isSourceFileJavaScript = isSourceFileJavaScript;
function isInJavaScriptFile(node) {
- return node && !!(node.flags & 2097152);
+ return node && !!(node.flags & 65536);
}
ts.isInJavaScriptFile = isInJavaScriptFile;
- function isRequireCall(expression, checkArgumentIsStringLiteral) {
- var isRequire = expression.kind === 179 &&
- expression.expression.kind === 70 &&
- expression.expression.text === "require" &&
- expression.arguments.length === 1;
- return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9);
+ function isRequireCall(callExpression, checkArgumentIsStringLiteral) {
+ if (callExpression.kind !== 180) {
+ return false;
+ }
+ var _a = callExpression, expression = _a.expression, args = _a.arguments;
+ if (expression.kind !== 70 || expression.text !== "require") {
+ return false;
+ }
+ if (args.length !== 1) {
+ return false;
+ }
+ var arg = args[0];
+ return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12;
}
ts.isRequireCall = isRequireCall;
function isSingleOrDoubleQuote(charCode) {
return charCode === 39 || charCode === 34;
}
ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote;
- function isDeclarationOfFunctionExpression(s) {
- if (s.valueDeclaration && s.valueDeclaration.kind === 223) {
+ function isDeclarationOfFunctionOrClassExpression(s) {
+ if (s.valueDeclaration && s.valueDeclaration.kind === 225) {
var declaration = s.valueDeclaration;
- return declaration.initializer && declaration.initializer.kind === 184;
+ return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198);
}
return false;
}
- ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression;
+ ts.isDeclarationOfFunctionOrClassExpression = isDeclarationOfFunctionOrClassExpression;
+ function getRightMostAssignedExpression(node) {
+ while (isAssignmentExpression(node, true)) {
+ node = node.right;
+ }
+ return node;
+ }
+ ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
+ function isExportsIdentifier(node) {
+ return isIdentifier(node) && node.text === "exports";
+ }
+ ts.isExportsIdentifier = isExportsIdentifier;
+ function isModuleExportsPropertyAccessExpression(node) {
+ return isPropertyAccessExpression(node) && isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
+ }
+ ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
if (!isInJavaScriptFile(expression)) {
return 0;
}
- if (expression.kind !== 192) {
- return 0;
- }
var expr = expression;
- if (expr.operatorToken.kind !== 57 || expr.left.kind !== 177) {
+ if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) {
return 0;
}
var lhs = expr.left;
@@ -7995,11 +6275,14 @@ var ts;
else if (lhsId.text === "module" && lhs.name.text === "exports") {
return 2;
}
+ else {
+ return 5;
+ }
}
else if (lhs.expression.kind === 98) {
return 4;
}
- else if (lhs.expression.kind === 177) {
+ else if (lhs.expression.kind === 178) {
var innerPropertyAccess = lhs.expression;
if (innerPropertyAccess.expression.kind === 70) {
var innerPropertyAccessIdentifier = innerPropertyAccess.expression;
@@ -8015,35 +6298,35 @@ var ts;
}
ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind;
function getExternalModuleName(node) {
- if (node.kind === 235) {
+ if (node.kind === 237) {
return node.moduleSpecifier;
}
- if (node.kind === 234) {
+ if (node.kind === 236) {
var reference = node.moduleReference;
- if (reference.kind === 245) {
+ if (reference.kind === 247) {
return reference.expression;
}
}
- if (node.kind === 241) {
+ if (node.kind === 243) {
return node.moduleSpecifier;
}
- if (node.kind === 230 && node.name.kind === 9) {
+ if (node.kind === 232 && node.name.kind === 9) {
return node.name;
}
}
ts.getExternalModuleName = getExternalModuleName;
function getNamespaceDeclarationNode(node) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
var importClause = node.importClause;
- if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 237) {
+ if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) {
return importClause.namedBindings;
}
}
ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
function isDefaultImport(node) {
- return node.kind === 235
+ return node.kind === 237
&& node.importClause
&& !!node.importClause.name;
}
@@ -8051,13 +6334,13 @@ var ts;
function hasQuestionToken(node) {
if (node) {
switch (node.kind) {
- case 144:
+ case 145:
+ case 150:
case 149:
+ case 261:
+ case 260:
case 148:
- case 258:
- case 257:
case 147:
- case 146:
return node.questionToken !== undefined;
}
}
@@ -8065,28 +6348,36 @@ var ts;
}
ts.hasQuestionToken = hasQuestionToken;
function isJSDocConstructSignature(node) {
- return node.kind === 274 &&
+ return node.kind === 278 &&
node.parameters.length > 0 &&
- node.parameters[0].type.kind === 276;
+ node.parameters[0].type.kind === 280;
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function getCommentsFromJSDoc(node) {
return ts.map(getJSDocs(node), function (doc) { return doc.comment; });
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
+ function hasJSDocParameterTags(node) {
+ var parameterTags = getJSDocTags(node, 285);
+ return parameterTags && parameterTags.length > 0;
+ }
+ ts.hasJSDocParameterTags = hasJSDocParameterTags;
function getJSDocTags(node, kind) {
var docs = getJSDocs(node);
if (docs) {
var result = [];
for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) {
var doc = docs_1[_i];
- if (doc.kind === 281) {
+ if (doc.kind === 285) {
if (doc.kind === kind) {
result.push(doc);
}
}
else {
- result.push.apply(result, ts.filter(doc.tags, function (tag) { return tag.kind === kind; }));
+ var tags = doc.tags;
+ if (tags) {
+ result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
+ }
}
}
return result;
@@ -8106,9 +6397,9 @@ var ts;
var parent = node.parent;
var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) &&
parent.initializer === node &&
- parent.parent.parent.kind === 205;
+ parent.parent.parent.kind === 207;
var isVariableOfVariableDeclarationStatement = isVariableLike(node) &&
- parent.parent.kind === 205;
+ parent.parent.kind === 207;
var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent :
isVariableOfVariableDeclarationStatement ? parent.parent :
undefined;
@@ -8116,19 +6407,19 @@ var ts;
getJSDocsWorker(variableStatementNode);
}
var isSourceOfAssignmentExpressionStatement = parent && parent.parent &&
- parent.kind === 192 &&
+ parent.kind === 193 &&
parent.operatorToken.kind === 57 &&
- parent.parent.kind === 207;
+ parent.parent.kind === 209;
if (isSourceOfAssignmentExpressionStatement) {
getJSDocsWorker(parent.parent);
}
- var isModuleDeclaration = node.kind === 230 &&
- parent && parent.kind === 230;
- var isPropertyAssignmentExpression = parent && parent.kind === 257;
+ var isModuleDeclaration = node.kind === 232 &&
+ parent && parent.kind === 232;
+ var isPropertyAssignmentExpression = parent && parent.kind === 260;
if (isModuleDeclaration || isPropertyAssignmentExpression) {
getJSDocsWorker(parent);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
cache = ts.concatenate(cache, getJSDocParameterTags(node));
}
if (isVariableLike(node) && node.initializer) {
@@ -8137,22 +6428,23 @@ var ts;
cache = ts.concatenate(cache, node.jsDoc);
}
}
+ ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
if (!isParameter(param)) {
return undefined;
}
var func = param.parent;
- var tags = getJSDocTags(func, 281);
+ var tags = getJSDocTags(func, 285);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 281; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 70) {
- var name_8 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 281 && tag.parameterName.text === name_8; });
+ var name_1 = param.name.text;
+ return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; });
}
else {
return undefined;
@@ -8160,8 +6452,8 @@ var ts;
}
ts.getJSDocParameterTags = getJSDocParameterTags;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 283);
- if (!tag && node.kind === 144) {
+ var tag = getFirstJSDocTag(node, 287);
+ if (!tag && node.kind === 145) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; });
@@ -8171,15 +6463,15 @@ var ts;
}
ts.getJSDocType = getJSDocType;
function getJSDocAugmentsTag(node) {
- return getFirstJSDocTag(node, 280);
+ return getFirstJSDocTag(node, 284);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 282);
+ return getFirstJSDocTag(node, 286);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 284);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -8191,9 +6483,9 @@ var ts;
}
ts.hasDeclaredRestParameter = hasDeclaredRestParameter;
function isRestParameter(node) {
- if (node && (node.flags & 2097152)) {
- if (node.type && node.type.kind === 275 ||
- ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 275; })) {
+ if (node && (node.flags & 65536)) {
+ if (node.type && node.type.kind === 279 ||
+ ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) {
return true;
}
}
@@ -8204,32 +6496,43 @@ var ts;
return node && node.dotDotDotToken !== undefined;
}
ts.isDeclaredRestParam = isDeclaredRestParam;
+ var AssignmentKind;
+ (function (AssignmentKind) {
+ AssignmentKind[AssignmentKind["None"] = 0] = "None";
+ AssignmentKind[AssignmentKind["Definite"] = 1] = "Definite";
+ AssignmentKind[AssignmentKind["Compound"] = 2] = "Compound";
+ })(AssignmentKind = ts.AssignmentKind || (ts.AssignmentKind = {}));
function getAssignmentTargetKind(node) {
var parent = node.parent;
while (true) {
switch (parent.kind) {
- case 192:
+ case 193:
var binaryOperator = parent.operatorToken.kind;
return isAssignmentOperator(binaryOperator) && parent.left === node ?
binaryOperator === 57 ? 1 : 2 :
0;
- case 190:
case 191:
+ case 192:
var unaryOperator = parent.operator;
return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0;
- case 212:
- case 213:
+ case 214:
+ case 215:
return parent.initializer === node ? 1 : 0;
- case 183:
- case 175:
- case 196:
+ case 184:
+ case 176:
+ case 197:
node = parent;
break;
- case 258:
+ case 261:
if (parent.name !== node) {
return 0;
}
- case 257:
+ node = parent.parent;
+ break;
+ case 260:
+ if (parent.name === node) {
+ return 0;
+ }
node = parent.parent;
break;
default:
@@ -8243,6 +6546,17 @@ var ts;
return getAssignmentTargetKind(node) !== 0;
}
ts.isAssignmentTarget = isAssignmentTarget;
+ function isDeleteTarget(node) {
+ if (node.kind !== 178 && node.kind !== 179) {
+ return false;
+ }
+ node = node.parent;
+ while (node && node.kind === 184) {
+ node = node.parent;
+ }
+ return node && node.kind === 187;
+ }
+ ts.isDeleteTarget = isDeleteTarget;
function isNodeDescendantOf(node, ancestor) {
while (node) {
if (node === ancestor)
@@ -8254,7 +6568,7 @@ var ts;
ts.isNodeDescendantOf = isNodeDescendantOf;
function isInAmbientContext(node) {
while (node) {
- if (hasModifier(node, 2) || (node.kind === 261 && node.isDeclarationFile)) {
+ if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) {
return true;
}
node = node.parent;
@@ -8267,7 +6581,7 @@ var ts;
return false;
}
var parent = name.parent;
- if (parent.kind === 239 || parent.kind === 243) {
+ if (parent.kind === 241 || parent.kind === 245) {
if (parent.propertyName) {
return true;
}
@@ -8280,48 +6594,48 @@ var ts;
ts.isDeclarationName = isDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
- node.parent.kind === 142 &&
+ node.parent.kind === 143 &&
isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
var parent = node.parent;
switch (parent.kind) {
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
+ case 153:
+ case 263:
case 260:
- case 257:
- case 177:
+ case 178:
return parent.name === node;
- case 141:
+ case 142:
if (parent.right === node) {
- while (parent.kind === 141) {
+ while (parent.kind === 142) {
parent = parent.parent;
}
- return parent.kind === 160;
+ return parent.kind === 161;
}
return false;
- case 174:
- case 239:
+ case 175:
+ case 241:
return parent.propertyName === node;
- case 243:
+ case 245:
return true;
}
return false;
}
ts.isIdentifierName = isIdentifierName;
function isAliasSymbolDeclaration(node) {
- return node.kind === 234 ||
- node.kind === 233 ||
- node.kind === 236 && !!node.name ||
- node.kind === 237 ||
+ return node.kind === 236 ||
+ node.kind === 235 ||
+ node.kind === 238 && !!node.name ||
node.kind === 239 ||
- node.kind === 243 ||
- node.kind === 240 && exportAssignmentIsAlias(node);
+ node.kind === 241 ||
+ node.kind === 245 ||
+ node.kind === 242 && exportAssignmentIsAlias(node);
}
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
function exportAssignmentIsAlias(node) {
@@ -8407,17 +6721,61 @@ var ts;
}
ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
function isKeyword(token) {
- return 71 <= token && token <= 140;
+ return 71 <= token && token <= 141;
}
ts.isKeyword = isKeyword;
function isTrivia(token) {
return 2 <= token && token <= 7;
}
ts.isTrivia = isTrivia;
- function isAsyncFunctionLike(node) {
- return isFunctionLike(node) && hasModifier(node, 256) && !isAccessor(node);
+ var FunctionFlags;
+ (function (FunctionFlags) {
+ FunctionFlags[FunctionFlags["Normal"] = 0] = "Normal";
+ FunctionFlags[FunctionFlags["Generator"] = 1] = "Generator";
+ FunctionFlags[FunctionFlags["Async"] = 2] = "Async";
+ FunctionFlags[FunctionFlags["AsyncOrAsyncGenerator"] = 3] = "AsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["Invalid"] = 4] = "Invalid";
+ FunctionFlags[FunctionFlags["InvalidAsyncOrAsyncGenerator"] = 7] = "InvalidAsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["InvalidGenerator"] = 5] = "InvalidGenerator";
+ })(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
+ function getFunctionFlags(node) {
+ var flags = 0;
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 150:
+ if (node.asteriskToken) {
+ flags |= 1;
+ }
+ case 186:
+ if (hasModifier(node, 256)) {
+ flags |= 2;
+ }
+ break;
+ }
+ if (!node.body) {
+ flags |= 4;
+ }
+ return flags;
+ }
+ ts.getFunctionFlags = getFunctionFlags;
+ function isAsyncFunction(node) {
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 186:
+ case 150:
+ return node.body !== undefined
+ && node.asteriskToken === undefined
+ && hasModifier(node, 256);
+ }
+ return false;
+ }
+ ts.isAsyncFunction = isAsyncFunction;
+ function isNumericLiteral(node) {
+ return node.kind === 8;
}
- ts.isAsyncFunctionLike = isAsyncFunctionLike;
+ ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9
@@ -8429,7 +6787,7 @@ var ts;
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
- return name.kind === 142 &&
+ return name.kind === 143 &&
!isStringOrNumericLiteral(name.expression) &&
!isWellKnownSymbolSyntactically(name.expression);
}
@@ -8439,10 +6797,10 @@ var ts;
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
- if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 144) {
+ if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) {
return name.text;
}
- if (name.kind === 142) {
+ if (name.kind === 143) {
var nameExpression = name.expression;
if (isWellKnownSymbolSyntactically(nameExpression)) {
var rightHandSideName = nameExpression.name.text;
@@ -8487,11 +6845,11 @@ var ts;
ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
- return root.kind === 144;
+ return root.kind === 145;
}
ts.isParameterDeclaration = isParameterDeclaration;
function getRootDeclaration(node) {
- while (node.kind === 174) {
+ while (node.kind === 175) {
node = node.parent.parent;
}
return node;
@@ -8499,15 +6857,15 @@ var ts;
ts.getRootDeclaration = getRootDeclaration;
function nodeStartsNewLexicalEnvironment(node) {
var kind = node.kind;
- return kind === 150
- || kind === 184
- || kind === 225
+ return kind === 151
|| kind === 185
- || kind === 149
- || kind === 151
+ || kind === 227
+ || kind === 186
+ || kind === 150
|| kind === 152
- || kind === 230
- || kind === 261;
+ || kind === 153
+ || kind === 232
+ || kind === 264;
}
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
function nodeIsSynthesized(node) {
@@ -8515,66 +6873,49 @@ var ts;
|| ts.positionIsSynthesized(node.end);
}
ts.nodeIsSynthesized = nodeIsSynthesized;
- function getOriginalNode(node, nodeTest) {
- if (node) {
- while (node.original !== undefined) {
- node = node.original;
- }
+ function getOriginalSourceFileOrBundle(sourceFileOrBundle) {
+ if (sourceFileOrBundle.kind === 265) {
+ return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile));
}
- return !nodeTest || nodeTest(node) ? node : undefined;
+ return getOriginalSourceFile(sourceFileOrBundle);
}
- ts.getOriginalNode = getOriginalNode;
- function isParseTreeNode(node) {
- return (node.flags & 8) === 0;
- }
- ts.isParseTreeNode = isParseTreeNode;
- function getParseTreeNode(node, nodeTest) {
- if (isParseTreeNode(node)) {
- return node;
- }
- node = getOriginalNode(node);
- if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
- return node;
- }
- return undefined;
+ ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
+ function getOriginalSourceFile(sourceFile) {
+ return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
}
- ts.getParseTreeNode = getParseTreeNode;
function getOriginalSourceFiles(sourceFiles) {
- var originalSourceFiles = [];
- for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
- var sourceFile = sourceFiles_1[_i];
- var originalSourceFile = getParseTreeNode(sourceFile, isSourceFile);
- if (originalSourceFile) {
- originalSourceFiles.push(originalSourceFile);
- }
- }
- return originalSourceFiles;
+ return ts.sameMap(sourceFiles, getOriginalSourceFile);
}
ts.getOriginalSourceFiles = getOriginalSourceFiles;
function getOriginalNodeId(node) {
- node = getOriginalNode(node);
+ node = ts.getOriginalNode(node);
return node ? ts.getNodeId(node) : 0;
}
ts.getOriginalNodeId = getOriginalNodeId;
+ var Associativity;
+ (function (Associativity) {
+ Associativity[Associativity["Left"] = 0] = "Left";
+ Associativity[Associativity["Right"] = 1] = "Right";
+ })(Associativity = ts.Associativity || (ts.Associativity = {}));
function getExpressionAssociativity(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorAssociativity(expression.kind, operator, hasArguments);
}
ts.getExpressionAssociativity = getExpressionAssociativity;
function getOperatorAssociativity(kind, operator, hasArguments) {
switch (kind) {
- case 180:
+ case 181:
return hasArguments ? 0 : 1;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
- case 193:
- case 195:
+ case 187:
+ case 190:
+ case 194:
+ case 196:
return 1;
- case 192:
+ case 193:
switch (operator) {
case 39:
case 57:
@@ -8598,15 +6939,15 @@ var ts;
ts.getOperatorAssociativity = getOperatorAssociativity;
function getExpressionPrecedence(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorPrecedence(expression.kind, operator, hasArguments);
}
ts.getExpressionPrecedence = getExpressionPrecedence;
function getOperator(expression) {
- if (expression.kind === 192) {
+ if (expression.kind === 193) {
return expression.operatorToken.kind;
}
- else if (expression.kind === 190 || expression.kind === 191) {
+ else if (expression.kind === 191 || expression.kind === 192) {
return expression.operator;
}
else {
@@ -8624,37 +6965,36 @@ var ts;
case 85:
case 8:
case 9:
- case 175:
case 176:
- case 184:
+ case 177:
case 185:
- case 197:
- case 246:
- case 247:
+ case 186:
+ case 198:
+ case 248:
+ case 249:
case 11:
case 12:
- case 194:
- case 183:
- case 198:
- case 297:
+ case 195:
+ case 184:
+ case 199:
return 19;
- case 181:
- case 177:
+ case 182:
case 178:
+ case 179:
return 18;
- case 180:
+ case 181:
return hasArguments ? 18 : 17;
- case 179:
+ case 180:
return 17;
- case 191:
+ case 192:
return 16;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
+ case 187:
+ case 190:
return 15;
- case 192:
+ case 193:
switch (operatorKind) {
case 50:
case 51:
@@ -8712,11 +7052,11 @@ var ts;
default:
return -1;
}
- case 193:
+ case 194:
return 4;
- case 195:
- return 2;
case 196:
+ return 2;
+ case 197:
return 1;
default:
return -1;
@@ -8739,21 +7079,15 @@ var ts;
return modificationCount;
}
function reattachFileDiagnostics(newFile) {
- if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) {
- return;
- }
- for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) {
- var diagnostic = _a[_i];
- diagnostic.file = newFile;
- }
+ ts.forEach(fileDiagnostics.get(newFile.fileName), function (diagnostic) { return diagnostic.file = newFile; });
}
function add(diagnostic) {
var diagnostics;
if (diagnostic.file) {
- diagnostics = fileDiagnostics[diagnostic.file.fileName];
+ diagnostics = fileDiagnostics.get(diagnostic.file.fileName);
if (!diagnostics) {
diagnostics = [];
- fileDiagnostics[diagnostic.file.fileName] = diagnostics;
+ fileDiagnostics.set(diagnostic.file.fileName, diagnostics);
}
}
else {
@@ -8770,16 +7104,16 @@ var ts;
function getDiagnostics(fileName) {
sortAndDeduplicate();
if (fileName) {
- return fileDiagnostics[fileName] || [];
+ return fileDiagnostics.get(fileName) || [];
}
var allDiagnostics = [];
function pushDiagnostic(d) {
allDiagnostics.push(d);
}
ts.forEach(nonFileDiagnostics, pushDiagnostic);
- for (var key in fileDiagnostics) {
- ts.forEach(fileDiagnostics[key], pushDiagnostic);
- }
+ fileDiagnostics.forEach(function (diagnostics) {
+ ts.forEach(diagnostics, pushDiagnostic);
+ });
return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
}
function sortAndDeduplicate() {
@@ -8788,14 +7122,14 @@ var ts;
}
diagnosticsModified = false;
nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
- for (var key in fileDiagnostics) {
- fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
- }
+ fileDiagnostics.forEach(function (diagnostics, key) {
+ fileDiagnostics.set(key, ts.sortAndDeduplicateDiagnostics(diagnostics));
+ });
}
}
ts.createDiagnosticCollection = createDiagnosticCollection;
var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
- var escapedCharsMap = ts.createMap({
+ var escapedCharsMap = ts.createMapFromTemplate({
"\0": "\\0",
"\t": "\\t",
"\v": "\\v",
@@ -8810,13 +7144,12 @@ var ts;
"\u0085": "\\u0085"
});
function escapeString(s) {
- s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
- return s;
- function getReplacement(c) {
- return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
- }
+ return s.replace(escapedCharsRegExp, getReplacement);
}
ts.escapeString = escapeString;
+ function getReplacement(c) {
+ return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
+ }
function isIntrinsicJsxName(name) {
var ch = name.substr(0, 1);
return ch.toLowerCase() === ch;
@@ -8959,129 +7292,62 @@ var ts;
ts.getDeclarationEmitOutputFilePath = getDeclarationEmitOutputFilePath;
function getSourceFilesToEmit(host, targetSourceFile) {
var options = host.getCompilerOptions();
+ var isSourceFileFromExternalLibrary = function (file) { return host.isSourceFileFromExternalLibrary(file); };
if (options.outFile || options.out) {
var moduleKind = ts.getEmitModuleKind(options);
- var moduleEmitEnabled = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
- var sourceFiles = getAllEmittableSourceFiles();
- return ts.filter(sourceFiles, moduleEmitEnabled ? isNonDeclarationFile : isBundleEmitNonExternalModule);
+ var moduleEmitEnabled_1 = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
+ return ts.filter(host.getSourceFiles(), function (sourceFile) {
+ return (moduleEmitEnabled_1 || !ts.isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary);
+ });
}
else {
- var sourceFiles = targetSourceFile === undefined ? getAllEmittableSourceFiles() : [targetSourceFile];
- return filterSourceFilesInDirectory(sourceFiles, function (file) { return host.isSourceFileFromExternalLibrary(file); });
- }
- function getAllEmittableSourceFiles() {
- return options.noEmitForJsFiles ? ts.filter(host.getSourceFiles(), function (sourceFile) { return !isSourceFileJavaScript(sourceFile); }) : host.getSourceFiles();
+ var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
+ return ts.filter(sourceFiles, function (sourceFile) { return sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary); });
}
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
- function filterSourceFilesInDirectory(sourceFiles, isSourceFileFromExternalLibrary) {
- return ts.filter(sourceFiles, function (file) { return shouldEmitInDirectory(file, isSourceFileFromExternalLibrary); });
+ function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
}
- ts.filterSourceFilesInDirectory = filterSourceFilesInDirectory;
- function isNonDeclarationFile(sourceFile) {
- return !isDeclarationFile(sourceFile);
- }
- function shouldEmitInDirectory(sourceFile, isSourceFileFromExternalLibrary) {
- return isNonDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
- }
- function isBundleEmitNonExternalModule(sourceFile) {
- return isNonDeclarationFile(sourceFile) && !ts.isExternalModule(sourceFile);
- }
- function forEachTransformedEmitFile(host, sourceFiles, action, emitOnlyDtsFiles) {
+ ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
+ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
+ var sourceFiles = ts.isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile);
var options = host.getCompilerOptions();
if (options.outFile || options.out) {
- onBundledEmit(sourceFiles);
- }
- else {
- for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
- var sourceFile = sourceFiles_2[_i];
- if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (options.declaration || emitOnlyDtsFiles) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, [sourceFile], false);
- }
- function onBundledEmit(sourceFiles) {
if (sourceFiles.length) {
var jsFilePath = options.outFile || options.out;
var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, true);
+ var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : "";
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, ts.createBundle(sourceFiles), emitOnlyDtsFiles);
+ }
+ }
+ else {
+ for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
+ var sourceFile = sourceFiles_1[_i];
+ var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, getOutputExtension(sourceFile, options));
+ var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
+ var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, sourceFile, emitOnlyDtsFiles);
}
}
}
- ts.forEachTransformedEmitFile = forEachTransformedEmitFile;
+ ts.forEachEmittedFile = forEachEmittedFile;
function getSourceMapFilePath(jsFilePath, options) {
return options.sourceMap ? jsFilePath + ".map" : undefined;
}
- function forEachExpectedEmitFile(host, action, targetSourceFile, emitOnlyDtsFiles) {
- var options = host.getCompilerOptions();
- if (options.outFile || options.out) {
- onBundledEmit(host);
- }
- else {
- var sourceFiles = targetSourceFile === undefined ? getSourceFilesToEmit(host) : [targetSourceFile];
- for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
- var sourceFile = sourceFiles_3[_i];
- if (shouldEmitInDirectory(sourceFile, function (file) { return host.isSourceFileFromExternalLibrary(file); })) {
- onSingleFileEmit(host, sourceFile);
+ function getOutputExtension(sourceFile, options) {
+ if (options.jsx === 1) {
+ if (isSourceFileJavaScript(sourceFile)) {
+ if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
+ return ".jsx";
}
}
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: declarationFilePath
- };
- action(emitFileNames, [sourceFile], false, emitOnlyDtsFiles);
- }
- function onBundledEmit(host) {
- var bundledSources = ts.filter(getSourceFilesToEmit(host), function (sourceFile) { return !isDeclarationFile(sourceFile) &&
- !host.isSourceFileFromExternalLibrary(sourceFile) &&
- (!ts.isExternalModule(sourceFile) ||
- !!ts.getEmitModuleKind(options)); });
- if (bundledSources.length) {
- var jsFilePath = options.outFile || options.out;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined
- };
- action(emitFileNames, bundledSources, true, emitOnlyDtsFiles);
+ else if (sourceFile.languageVariant === 1) {
+ return ".jsx";
}
}
+ return ".js";
}
- ts.forEachExpectedEmitFile = forEachExpectedEmitFile;
function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
var commonSourceDirectory = host.getCommonSourceDirectory();
@@ -9106,7 +7372,7 @@ var ts;
ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap;
function getFirstConstructorWithBody(node) {
return ts.forEach(node.members, function (member) {
- if (member.kind === 150 && nodeIsPresent(member.body)) {
+ if (member.kind === 151 && nodeIsPresent(member.body)) {
return member;
}
});
@@ -9147,10 +7413,10 @@ var ts;
var setAccessor;
if (hasDynamicName(accessor)) {
firstAccessor = accessor;
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
getAccessor = accessor;
}
- else if (accessor.kind === 152) {
+ else if (accessor.kind === 153) {
setAccessor = accessor;
}
else {
@@ -9159,7 +7425,7 @@ var ts;
}
else {
ts.forEach(declarations, function (member) {
- if ((member.kind === 151 || member.kind === 152)
+ if ((member.kind === 152 || member.kind === 153)
&& hasModifier(member, 32) === hasModifier(accessor, 32)) {
var memberName = getPropertyNameForPropertyNameNode(member.name);
var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
@@ -9170,10 +7436,10 @@ var ts;
else if (!secondAccessor) {
secondAccessor = member;
}
- if (member.kind === 151 && !getAccessor) {
+ if (member.kind === 152 && !getAccessor) {
getAccessor = member;
}
- if (member.kind === 152 && !setAccessor) {
+ if (member.kind === 153 && !setAccessor) {
setAccessor = member;
}
}
@@ -9391,7 +7657,7 @@ var ts;
}
ts.isAssignmentOperator = isAssignmentOperator;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
- if (node.kind === 199 &&
+ if (node.kind === 200 &&
node.parent.token === 84 &&
isClassLike(node.parent.parent)) {
return node.parent.parent;
@@ -9409,8 +7675,8 @@ var ts;
function isDestructuringAssignment(node) {
if (isAssignmentExpression(node, true)) {
var kind = node.left.kind;
- return kind === 176
- || kind === 175;
+ return kind === 177
+ || kind === 176;
}
return false;
}
@@ -9434,31 +7700,42 @@ var ts;
return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined;
}
ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
+ function isExpressionWithTypeArgumentsInClassImplementsClause(node) {
+ return node.kind === 200
+ && isEntityNameExpression(node.expression)
+ && node.parent
+ && node.parent.token === 107
+ && node.parent.parent
+ && isClassLike(node.parent.parent);
+ }
+ ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
return node.kind === 70 ||
- node.kind === 177 && isEntityNameExpression(node.expression);
+ node.kind === 178 && isEntityNameExpression(node.expression);
}
ts.isEntityNameExpression = isEntityNameExpression;
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
- return (node.parent.kind === 141 && node.parent.right === node) ||
- (node.parent.kind === 177 && node.parent.name === node);
+ return (node.parent.kind === 142 && node.parent.right === node) ||
+ (node.parent.kind === 178 && node.parent.name === node);
}
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
- function isEmptyObjectLiteralOrArrayLiteral(expression) {
- var kind = expression.kind;
- if (kind === 176) {
- return expression.properties.length === 0;
- }
- if (kind === 175) {
- return expression.elements.length === 0;
- }
- return false;
+ function isEmptyObjectLiteral(expression) {
+ return expression.kind === 177 &&
+ expression.properties.length === 0;
+ }
+ ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
+ function isEmptyArrayLiteral(expression) {
+ return expression.kind === 176 &&
+ expression.elements.length === 0;
}
- ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral;
+ ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
+ function isExportDefaultSymbol(symbol) {
+ return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ }
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
}
@@ -9492,39 +7769,6 @@ var ts;
}
return output;
}
- ts.stringify = typeof JSON !== "undefined" && JSON.stringify
- ? JSON.stringify
- : stringifyFallback;
- function stringifyFallback(value) {
- return value === undefined ? undefined : stringifyValue(value);
- }
- function stringifyValue(value) {
- return typeof value === "string" ? "\"" + escapeString(value) + "\""
- : typeof value === "number" ? isFinite(value) ? String(value) : "null"
- : typeof value === "boolean" ? value ? "true" : "false"
- : typeof value === "object" && value ? ts.isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
- : "null";
- }
- function cycleCheck(cb, value) {
- ts.Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
- value.__cycle = true;
- var result = cb(value);
- delete value.__cycle;
- return result;
- }
- function stringifyArray(value) {
- return "[" + ts.reduceLeft(value, stringifyElement, "") + "]";
- }
- function stringifyElement(memo, value) {
- return (memo ? memo + "," : memo) + stringifyValue(value);
- }
- function stringifyObject(value) {
- return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}";
- }
- function stringifyProperty(memo, value, key) {
- return value === undefined || typeof value === "function" || key === "__cycle" ? memo
- : (memo ? memo + "," : memo) + ("\"" + escapeString(key) + "\":" + stringifyValue(value));
- }
var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function convertToBase64(input) {
var result = "";
@@ -9583,39 +7827,39 @@ var ts;
|| kind === 94) {
return true;
}
- else if (kind === 177) {
+ else if (kind === 178) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 178) {
+ else if (kind === 179) {
return isSimpleExpressionWorker(node.expression, depth + 1)
&& isSimpleExpressionWorker(node.argumentExpression, depth + 1);
}
- else if (kind === 190
- || kind === 191) {
+ else if (kind === 191
+ || kind === 192) {
return isSimpleExpressionWorker(node.operand, depth + 1);
}
- else if (kind === 192) {
+ else if (kind === 193) {
return node.operatorToken.kind !== 39
&& isSimpleExpressionWorker(node.left, depth + 1)
&& isSimpleExpressionWorker(node.right, depth + 1);
}
- else if (kind === 193) {
+ else if (kind === 194) {
return isSimpleExpressionWorker(node.condition, depth + 1)
&& isSimpleExpressionWorker(node.whenTrue, depth + 1)
&& isSimpleExpressionWorker(node.whenFalse, depth + 1);
}
- else if (kind === 188
- || kind === 187
- || kind === 186) {
+ else if (kind === 189
+ || kind === 188
+ || kind === 187) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 175) {
+ else if (kind === 176) {
return node.elements.length === 0;
}
- else if (kind === 176) {
+ else if (kind === 177) {
return node.properties.length === 0;
}
- else if (kind === 179) {
+ else if (kind === 180) {
if (!isSimpleExpressionWorker(node.expression, depth + 1)) {
return false;
}
@@ -9630,16 +7874,19 @@ var ts;
}
return false;
}
- var syntaxKindCache = ts.createMap();
+ var syntaxKindCache = [];
function formatSyntaxKind(kind) {
var syntaxKindEnum = ts.SyntaxKind;
if (syntaxKindEnum) {
- if (syntaxKindCache[kind]) {
- return syntaxKindCache[kind];
+ var cached = syntaxKindCache[kind];
+ if (cached !== undefined) {
+ return cached;
}
- for (var name_9 in syntaxKindEnum) {
- if (syntaxKindEnum[name_9] === kind) {
- return syntaxKindCache[kind] = kind.toString() + " (" + name_9 + ")";
+ for (var name in syntaxKindEnum) {
+ if (syntaxKindEnum[name] === kind) {
+ var result = kind + " (" + name + ")";
+ syntaxKindCache[kind] = result;
+ return result;
}
}
}
@@ -9648,6 +7895,14 @@ var ts;
}
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function getRangePos(range) {
+ return range ? range.pos : -1;
+ }
+ ts.getRangePos = getRangePos;
+ function getRangeEnd(range) {
+ return range ? range.end : -1;
+ }
+ ts.getRangeEnd = getRangeEnd;
function movePos(pos, value) {
return ts.positionIsSynthesized(pos) ? -1 : pos + value;
}
@@ -9722,11 +7977,11 @@ var ts;
}
ts.getStartPositionOfRange = getStartPositionOfRange;
function isDeclarationNameOfEnumOrNamespace(node) {
- var parseNode = getParseTreeNode(node);
+ var parseNode = ts.getParseTreeNode(node);
if (parseNode) {
switch (parseNode.parent.kind) {
- case 229:
- case 230:
+ case 231:
+ case 232:
return parseNode === parseNode.parent.name;
}
}
@@ -9744,7 +7999,7 @@ var ts;
if (node.symbol) {
for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 226 && declaration !== node) {
+ if (declaration.kind === 228 && declaration !== node) {
return true;
}
}
@@ -9795,6 +8050,10 @@ var ts;
return node.kind === 70;
}
ts.isIdentifier = isIdentifier;
+ function isVoidExpression(node) {
+ return node.kind === 189;
+ }
+ ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
return isIdentifier(node) && node.autoGenerateKind > 0;
}
@@ -9804,16 +8063,16 @@ var ts;
}
ts.isModifier = isModifier;
function isQualifiedName(node) {
- return node.kind === 141;
+ return node.kind === 142;
}
ts.isQualifiedName = isQualifiedName;
function isComputedPropertyName(node) {
- return node.kind === 142;
+ return node.kind === 143;
}
ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
- return kind === 141
+ return kind === 142
|| kind === 70;
}
ts.isEntityName = isEntityName;
@@ -9822,7 +8081,7 @@ var ts;
return kind === 70
|| kind === 9
|| kind === 8
- || kind === 142;
+ || kind === 143;
}
ts.isPropertyName = isPropertyName;
function isModuleName(node) {
@@ -9834,101 +8093,105 @@ var ts;
function isBindingName(node) {
var kind = node.kind;
return kind === 70
- || kind === 172
- || kind === 173;
+ || kind === 173
+ || kind === 174;
}
ts.isBindingName = isBindingName;
function isTypeParameter(node) {
- return node.kind === 143;
+ return node.kind === 144;
}
ts.isTypeParameter = isTypeParameter;
function isParameter(node) {
- return node.kind === 144;
+ return node.kind === 145;
}
ts.isParameter = isParameter;
function isDecorator(node) {
- return node.kind === 145;
+ return node.kind === 146;
}
ts.isDecorator = isDecorator;
function isMethodDeclaration(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
ts.isMethodDeclaration = isMethodDeclaration;
function isClassElement(node) {
var kind = node.kind;
- return kind === 150
- || kind === 147
- || kind === 149
- || kind === 151
+ return kind === 151
+ || kind === 148
+ || kind === 150
|| kind === 152
- || kind === 155
- || kind === 203;
+ || kind === 153
+ || kind === 156
+ || kind === 205;
}
ts.isClassElement = isClassElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
- return kind === 257
- || kind === 258
- || kind === 259
- || kind === 149
- || kind === 151
+ return kind === 260
+ || kind === 261
+ || kind === 262
+ || kind === 150
|| kind === 152
- || kind === 244;
+ || kind === 153
+ || kind === 246;
}
ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
function isTypeNodeKind(kind) {
- return (kind >= 156 && kind <= 171)
+ return (kind >= 157 && kind <= 172)
|| kind === 118
|| kind === 132
+ || kind === 133
|| kind === 121
- || kind === 134
|| kind === 135
+ || kind === 136
+ || kind === 98
|| kind === 104
+ || kind === 138
+ || kind === 94
|| kind === 129
- || kind === 199;
+ || kind === 200;
}
function isTypeNode(node) {
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
function isArrayBindingPattern(node) {
- return node.kind === 173;
+ return node.kind === 174;
}
ts.isArrayBindingPattern = isArrayBindingPattern;
function isObjectBindingPattern(node) {
- return node.kind === 172;
+ return node.kind === 173;
}
ts.isObjectBindingPattern = isObjectBindingPattern;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
- return kind === 173
- || kind === 172;
+ return kind === 174
+ || kind === 173;
}
return false;
}
ts.isBindingPattern = isBindingPattern;
function isAssignmentPattern(node) {
var kind = node.kind;
- return kind === 175
- || kind === 176;
+ return kind === 176
+ || kind === 177;
}
ts.isAssignmentPattern = isAssignmentPattern;
function isBindingElement(node) {
- return node.kind === 174;
+ return node.kind === 175;
}
ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
- return kind === 174
- || kind === 198;
+ return kind === 175
+ || kind === 199;
}
ts.isArrayBindingElement = isArrayBindingElement;
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
- case 223:
- case 144:
- case 174:
+ case 225:
+ case 145:
+ case 175:
return true;
}
return false;
@@ -9941,8 +8204,8 @@ var ts;
ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern;
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 172:
- case 176:
+ case 173:
+ case 177:
return true;
}
return false;
@@ -9950,94 +8213,100 @@ var ts;
ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern;
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
+ case 174:
+ case 176:
return true;
}
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
function isArrayLiteralExpression(node) {
- return node.kind === 175;
+ return node.kind === 176;
}
ts.isArrayLiteralExpression = isArrayLiteralExpression;
function isObjectLiteralExpression(node) {
- return node.kind === 176;
+ return node.kind === 177;
}
ts.isObjectLiteralExpression = isObjectLiteralExpression;
function isPropertyAccessExpression(node) {
- return node.kind === 177;
+ return node.kind === 178;
}
ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isPropertyAccessOrQualifiedName(node) {
+ var kind = node.kind;
+ return kind === 178
+ || kind === 142;
+ }
+ ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
function isElementAccessExpression(node) {
- return node.kind === 178;
+ return node.kind === 179;
}
ts.isElementAccessExpression = isElementAccessExpression;
function isBinaryExpression(node) {
- return node.kind === 192;
+ return node.kind === 193;
}
ts.isBinaryExpression = isBinaryExpression;
function isConditionalExpression(node) {
- return node.kind === 193;
+ return node.kind === 194;
}
ts.isConditionalExpression = isConditionalExpression;
function isCallExpression(node) {
- return node.kind === 179;
+ return node.kind === 180;
}
ts.isCallExpression = isCallExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
- return kind === 194
+ return kind === 195
|| kind === 12;
}
ts.isTemplateLiteral = isTemplateLiteral;
function isSpreadExpression(node) {
- return node.kind === 196;
+ return node.kind === 197;
}
ts.isSpreadExpression = isSpreadExpression;
function isExpressionWithTypeArguments(node) {
- return node.kind === 199;
+ return node.kind === 200;
}
ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
- return kind === 177
- || kind === 178
- || kind === 180
+ return kind === 178
|| kind === 179
- || kind === 246
- || kind === 247
|| kind === 181
- || kind === 175
- || kind === 183
+ || kind === 180
+ || kind === 248
+ || kind === 249
+ || kind === 182
|| kind === 176
- || kind === 197
|| kind === 184
+ || kind === 177
+ || kind === 198
+ || kind === 185
|| kind === 70
|| kind === 11
|| kind === 8
|| kind === 9
|| kind === 12
- || kind === 194
+ || kind === 195
|| kind === 85
|| kind === 94
|| kind === 98
|| kind === 100
|| kind === 96
- || kind === 201
- || kind === 297;
+ || kind === 202
+ || kind === 203;
}
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
ts.isLeftHandSideExpression = isLeftHandSideExpression;
function isUnaryExpressionKind(kind) {
- return kind === 190
- || kind === 191
- || kind === 186
+ return kind === 191
+ || kind === 192
|| kind === 187
|| kind === 188
|| kind === 189
- || kind === 182
+ || kind === 190
+ || kind === 183
|| isLeftHandSideExpressionKind(kind);
}
function isUnaryExpression(node) {
@@ -10045,14 +8314,13 @@ var ts;
}
ts.isUnaryExpression = isUnaryExpression;
function isExpressionKind(kind) {
- return kind === 193
- || kind === 195
- || kind === 185
- || kind === 192
+ return kind === 194
|| kind === 196
- || kind === 200
- || kind === 198
- || kind === 297
+ || kind === 186
+ || kind === 193
+ || kind === 197
+ || kind === 201
+ || kind === 199
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -10061,16 +8329,16 @@ var ts;
ts.isExpression = isExpression;
function isAssertionExpression(node) {
var kind = node.kind;
- return kind === 182
- || kind === 200;
+ return kind === 183
+ || kind === 201;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 294;
+ return node.kind === 295;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 293;
+ return node.kind === 294;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -10079,15 +8347,15 @@ var ts;
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
function isOmittedExpression(node) {
- return node.kind === 198;
+ return node.kind === 199;
}
ts.isOmittedExpression = isOmittedExpression;
function isTemplateSpan(node) {
- return node.kind === 202;
+ return node.kind === 204;
}
ts.isTemplateSpan = isTemplateSpan;
function isBlock(node) {
- return node.kind === 204;
+ return node.kind === 206;
}
ts.isBlock = isBlock;
function isConciseBody(node) {
@@ -10105,121 +8373,135 @@ var ts;
}
ts.isForInitializer = isForInitializer;
function isVariableDeclaration(node) {
- return node.kind === 223;
+ return node.kind === 225;
}
ts.isVariableDeclaration = isVariableDeclaration;
function isVariableDeclarationList(node) {
- return node.kind === 224;
+ return node.kind === 226;
}
ts.isVariableDeclarationList = isVariableDeclarationList;
function isCaseBlock(node) {
- return node.kind === 232;
+ return node.kind === 234;
}
ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
- return kind === 231
- || kind === 230;
+ return kind === 233
+ || kind === 232
+ || kind === 70;
}
ts.isModuleBody = isModuleBody;
+ function isNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 233
+ || kind === 232;
+ }
+ ts.isNamespaceBody = isNamespaceBody;
+ function isJSDocNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 70
+ || kind === 232;
+ }
+ ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
function isImportEqualsDeclaration(node) {
- return node.kind === 234;
+ return node.kind === 236;
}
ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportClause(node) {
- return node.kind === 236;
+ return node.kind === 238;
}
ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
- return kind === 238
- || kind === 237;
+ return kind === 240
+ || kind === 239;
}
ts.isNamedImportBindings = isNamedImportBindings;
function isImportSpecifier(node) {
- return node.kind === 239;
+ return node.kind === 241;
}
ts.isImportSpecifier = isImportSpecifier;
function isNamedExports(node) {
- return node.kind === 242;
+ return node.kind === 244;
}
ts.isNamedExports = isNamedExports;
function isExportSpecifier(node) {
- return node.kind === 243;
+ return node.kind === 245;
}
ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
- return node.kind === 230 || node.kind === 229;
+ return node.kind === 232 || node.kind === 231;
}
ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
function isDeclarationKind(kind) {
- return kind === 185
- || kind === 174
- || kind === 226
- || kind === 197
- || kind === 150
- || kind === 229
- || kind === 260
- || kind === 243
- || kind === 225
- || kind === 184
+ return kind === 186
+ || kind === 175
+ || kind === 228
+ || kind === 198
|| kind === 151
- || kind === 236
- || kind === 234
- || kind === 239
+ || kind === 231
+ || kind === 263
+ || kind === 245
|| kind === 227
+ || kind === 185
+ || kind === 152
+ || kind === 238
+ || kind === 236
+ || kind === 241
+ || kind === 229
+ || kind === 252
+ || kind === 150
|| kind === 149
+ || kind === 232
+ || kind === 235
+ || kind === 239
+ || kind === 145
+ || kind === 260
|| kind === 148
+ || kind === 147
+ || kind === 153
+ || kind === 261
|| kind === 230
- || kind === 233
- || kind === 237
|| kind === 144
- || kind === 257
- || kind === 147
- || kind === 146
- || kind === 152
- || kind === 258
- || kind === 228
- || kind === 143
- || kind === 223
- || kind === 285;
+ || kind === 225
+ || kind === 289;
}
function isDeclarationStatementKind(kind) {
- return kind === 225
- || kind === 244
- || kind === 226
- || kind === 227
+ return kind === 227
+ || kind === 246
|| kind === 228
|| kind === 229
|| kind === 230
- || kind === 235
- || kind === 234
- || kind === 241
- || kind === 240
- || kind === 233;
+ || kind === 231
+ || kind === 232
+ || kind === 237
+ || kind === 236
+ || kind === 243
+ || kind === 242
+ || kind === 235;
}
function isStatementKindButNotDeclarationKind(kind) {
- return kind === 215
+ return kind === 217
+ || kind === 216
+ || kind === 224
+ || kind === 211
+ || kind === 209
+ || kind === 208
|| kind === 214
+ || kind === 215
+ || kind === 213
+ || kind === 210
+ || kind === 221
+ || kind === 218
+ || kind === 220
|| kind === 222
- || kind === 209
+ || kind === 223
|| kind === 207
- || kind === 206
|| kind === 212
- || kind === 213
- || kind === 211
- || kind === 208
|| kind === 219
- || kind === 216
- || kind === 218
- || kind === 220
- || kind === 221
- || kind === 205
- || kind === 210
- || kind === 217
- || kind === 293
- || kind === 296
- || kind === 295;
+ || kind === 294
+ || kind === 297
+ || kind === 296;
}
function isDeclaration(node) {
return isDeclarationKind(node.kind);
@@ -10237,87 +8519,98 @@ var ts;
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
|| isDeclarationStatementKind(kind)
- || kind === 204;
+ || kind === 206;
}
ts.isStatement = isStatement;
function isModuleReference(node) {
var kind = node.kind;
- return kind === 245
- || kind === 141
+ return kind === 247
+ || kind === 142
|| kind === 70;
}
ts.isModuleReference = isModuleReference;
function isJsxOpeningElement(node) {
- return node.kind === 248;
+ return node.kind === 250;
}
ts.isJsxOpeningElement = isJsxOpeningElement;
function isJsxClosingElement(node) {
- return node.kind === 249;
+ return node.kind === 251;
}
ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 98
|| kind === 70
- || kind === 177;
+ || kind === 178;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
function isJsxChild(node) {
var kind = node.kind;
- return kind === 246
- || kind === 252
- || kind === 247
+ return kind === 248
+ || kind === 255
+ || kind === 249
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
+ function isJsxAttributes(node) {
+ var kind = node.kind;
+ return kind === 253;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
- return kind === 250
- || kind === 251;
+ return kind === 252
+ || kind === 254;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
function isJsxSpreadAttribute(node) {
- return node.kind === 251;
+ return node.kind === 254;
}
ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxAttribute(node) {
- return node.kind === 250;
+ return node.kind === 252;
}
ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
- || kind === 252;
+ || kind === 255;
}
ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
+ function isJsxOpeningLikeElement(node) {
+ var kind = node.kind;
+ return kind === 250
+ || kind === 249;
+ }
+ ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
function isCaseOrDefaultClause(node) {
var kind = node.kind;
- return kind === 253
- || kind === 254;
+ return kind === 256
+ || kind === 257;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isHeritageClause(node) {
- return node.kind === 255;
+ return node.kind === 258;
}
ts.isHeritageClause = isHeritageClause;
function isCatchClause(node) {
- return node.kind === 256;
+ return node.kind === 259;
}
ts.isCatchClause = isCatchClause;
function isPropertyAssignment(node) {
- return node.kind === 257;
+ return node.kind === 260;
}
ts.isPropertyAssignment = isPropertyAssignment;
function isShorthandPropertyAssignment(node) {
- return node.kind === 258;
+ return node.kind === 261;
}
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
function isEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
ts.isEnumMember = isEnumMember;
function isSourceFile(node) {
- return node.kind === 261;
+ return node.kind === 264;
}
ts.isSourceFile = isSourceFile;
function isWatchSet(options) {
@@ -10329,10 +8622,11 @@ var ts;
function getDefaultLibFileName(options) {
switch (options.target) {
case 5:
+ return "lib.esnext.full.d.ts";
case 4:
- return "lib.es2017.d.ts";
+ return "lib.es2017.full.d.ts";
case 3:
- return "lib.es2016.d.ts";
+ return "lib.es2016.full.d.ts";
case 2:
return "lib.es6.d.ts";
default:
@@ -10456,9 +8750,9 @@ var ts;
}
ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
function getTypeParameterOwner(d) {
- if (d && d.kind === 143) {
+ if (d && d.kind === 144) {
for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 227) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) {
return current;
}
}
@@ -10466,11 +8760,11 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 150 && ts.isClassLike(node.parent.parent);
+ return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent);
}
ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 174 || ts.isBindingPattern(node))) {
+ while (node && (node.kind === 175 || ts.isBindingPattern(node))) {
node = node.parent;
}
return node;
@@ -10478,14 +8772,14 @@ var ts;
function getCombinedModifierFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = ts.getModifierFlags(node);
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= ts.getModifierFlags(node);
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= ts.getModifierFlags(node);
}
return flags;
@@ -10494,14 +8788,14 @@ var ts;
function getCombinedNodeFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = node.flags;
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= node.flags;
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= node.flags;
}
return flags;
@@ -10554,24 +8848,1616 @@ var ts;
}
}
ts.validateLocaleAndSetLanguage = validateLocaleAndSetLanguage;
+ function getOriginalNode(node, nodeTest) {
+ if (node) {
+ while (node.original !== undefined) {
+ node = node.original;
+ }
+ }
+ return !nodeTest || nodeTest(node) ? node : undefined;
+ }
+ ts.getOriginalNode = getOriginalNode;
+ function isParseTreeNode(node) {
+ return (node.flags & 8) === 0;
+ }
+ ts.isParseTreeNode = isParseTreeNode;
+ function getParseTreeNode(node, nodeTest) {
+ if (node === undefined || isParseTreeNode(node)) {
+ return node;
+ }
+ node = getOriginalNode(node);
+ if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
+ return node;
+ }
+ return undefined;
+ }
+ ts.getParseTreeNode = getParseTreeNode;
+ function unescapeIdentifier(identifier) {
+ return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
+ }
+ ts.unescapeIdentifier = unescapeIdentifier;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var NodeConstructor;
- var SourceFileConstructor;
- function createNode(kind, location, flags) {
- var ConstructorForKind = kind === 261
- ? (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))
- : (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()));
- var node = location
- ? new ConstructorForKind(kind, location.pos, location.end)
- : new ConstructorForKind(kind, -1, -1);
- node.flags = flags | 8;
+ function tokenIsIdentifierOrKeyword(token) {
+ return token >= 70;
+ }
+ ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
+ var textToToken = ts.createMapFromTemplate({
+ "abstract": 116,
+ "any": 118,
+ "as": 117,
+ "boolean": 121,
+ "break": 71,
+ "case": 72,
+ "catch": 73,
+ "class": 74,
+ "continue": 76,
+ "const": 75,
+ "constructor": 122,
+ "debugger": 77,
+ "declare": 123,
+ "default": 78,
+ "delete": 79,
+ "do": 80,
+ "else": 81,
+ "enum": 82,
+ "export": 83,
+ "extends": 84,
+ "false": 85,
+ "finally": 86,
+ "for": 87,
+ "from": 139,
+ "function": 88,
+ "get": 124,
+ "if": 89,
+ "implements": 107,
+ "import": 90,
+ "in": 91,
+ "instanceof": 92,
+ "interface": 108,
+ "is": 125,
+ "keyof": 126,
+ "let": 109,
+ "module": 127,
+ "namespace": 128,
+ "never": 129,
+ "new": 93,
+ "null": 94,
+ "number": 132,
+ "object": 133,
+ "package": 110,
+ "private": 111,
+ "protected": 112,
+ "public": 113,
+ "readonly": 130,
+ "require": 131,
+ "global": 140,
+ "return": 95,
+ "set": 134,
+ "static": 114,
+ "string": 135,
+ "super": 96,
+ "switch": 97,
+ "symbol": 136,
+ "this": 98,
+ "throw": 99,
+ "true": 100,
+ "try": 101,
+ "type": 137,
+ "typeof": 102,
+ "undefined": 138,
+ "var": 103,
+ "void": 104,
+ "while": 105,
+ "with": 106,
+ "yield": 115,
+ "async": 119,
+ "await": 120,
+ "of": 141,
+ "{": 16,
+ "}": 17,
+ "(": 18,
+ ")": 19,
+ "[": 20,
+ "]": 21,
+ ".": 22,
+ "...": 23,
+ ";": 24,
+ ",": 25,
+ "<": 26,
+ ">": 28,
+ "<=": 29,
+ ">=": 30,
+ "==": 31,
+ "!=": 32,
+ "===": 33,
+ "!==": 34,
+ "=>": 35,
+ "+": 36,
+ "-": 37,
+ "**": 39,
+ "*": 38,
+ "/": 40,
+ "%": 41,
+ "++": 42,
+ "--": 43,
+ "<<": 44,
+ "</": 27,
+ ">>": 45,
+ ">>>": 46,
+ "&": 47,
+ "|": 48,
+ "^": 49,
+ "!": 50,
+ "~": 51,
+ "&&": 52,
+ "||": 53,
+ "?": 54,
+ ":": 55,
+ "=": 57,
+ "+=": 58,
+ "-=": 59,
+ "*=": 60,
+ "**=": 61,
+ "/=": 62,
+ "%=": 63,
+ "<<=": 64,
+ ">>=": 65,
+ ">>>=": 66,
+ "&=": 67,
+ "|=": 68,
+ "^=": 69,
+ "@": 56,
+ });
+ var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
+ var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
+ var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
+ var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
+ function lookupInUnicodeMap(code, map) {
+ if (code < map[0]) {
+ return false;
+ }
+ var lo = 0;
+ var hi = map.length;
+ var mid;
+ while (lo + 1 < hi) {
+ mid = lo + (hi - lo) / 2;
+ mid -= mid % 2;
+ if (map[mid] <= code && code <= map[mid + 1]) {
+ return true;
+ }
+ if (code < map[mid]) {
+ hi = mid;
+ }
+ else {
+ lo = mid + 2;
+ }
+ }
+ return false;
+ }
+ function isUnicodeIdentifierStart(code, languageVersion) {
+ return languageVersion >= 1 ?
+ lookupInUnicodeMap(code, unicodeES5IdentifierStart) :
+ lookupInUnicodeMap(code, unicodeES3IdentifierStart);
+ }
+ ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart;
+ function isUnicodeIdentifierPart(code, languageVersion) {
+ return languageVersion >= 1 ?
+ lookupInUnicodeMap(code, unicodeES5IdentifierPart) :
+ lookupInUnicodeMap(code, unicodeES3IdentifierPart);
+ }
+ function makeReverseMap(source) {
+ var result = [];
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
+ return result;
+ }
+ var tokenStrings = makeReverseMap(textToToken);
+ function tokenToString(t) {
+ return tokenStrings[t];
+ }
+ ts.tokenToString = tokenToString;
+ function stringToToken(s) {
+ return textToToken.get(s);
+ }
+ ts.stringToToken = stringToToken;
+ function computeLineStarts(text) {
+ var result = new Array();
+ var pos = 0;
+ var lineStart = 0;
+ while (pos < text.length) {
+ var ch = text.charCodeAt(pos);
+ pos++;
+ switch (ch) {
+ case 13:
+ if (text.charCodeAt(pos) === 10) {
+ pos++;
+ }
+ case 10:
+ result.push(lineStart);
+ lineStart = pos;
+ break;
+ default:
+ if (ch > 127 && isLineBreak(ch)) {
+ result.push(lineStart);
+ lineStart = pos;
+ }
+ break;
+ }
+ }
+ result.push(lineStart);
+ return result;
+ }
+ ts.computeLineStarts = computeLineStarts;
+ function getPositionOfLineAndCharacter(sourceFile, line, character) {
+ return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
+ }
+ ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter;
+ function computePositionOfLineAndCharacter(lineStarts, line, character) {
+ ts.Debug.assert(line >= 0 && line < lineStarts.length);
+ return lineStarts[line] + character;
+ }
+ ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter;
+ function getLineStarts(sourceFile) {
+ return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
+ }
+ ts.getLineStarts = getLineStarts;
+ function computeLineAndCharacterOfPosition(lineStarts, position) {
+ var lineNumber = ts.binarySearch(lineStarts, position);
+ if (lineNumber < 0) {
+ lineNumber = ~lineNumber - 1;
+ ts.Debug.assert(lineNumber !== -1, "position cannot precede the beginning of the file");
+ }
+ return {
+ line: lineNumber,
+ character: position - lineStarts[lineNumber]
+ };
+ }
+ ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition;
+ function getLineAndCharacterOfPosition(sourceFile, position) {
+ return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
+ }
+ ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
+ function isWhiteSpace(ch) {
+ return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
+ }
+ ts.isWhiteSpace = isWhiteSpace;
+ function isWhiteSpaceSingleLine(ch) {
+ return ch === 32 ||
+ ch === 9 ||
+ ch === 11 ||
+ ch === 12 ||
+ ch === 160 ||
+ ch === 133 ||
+ ch === 5760 ||
+ ch >= 8192 && ch <= 8203 ||
+ ch === 8239 ||
+ ch === 8287 ||
+ ch === 12288 ||
+ ch === 65279;
+ }
+ ts.isWhiteSpaceSingleLine = isWhiteSpaceSingleLine;
+ function isLineBreak(ch) {
+ return ch === 10 ||
+ ch === 13 ||
+ ch === 8232 ||
+ ch === 8233;
+ }
+ ts.isLineBreak = isLineBreak;
+ function isDigit(ch) {
+ return ch >= 48 && ch <= 57;
+ }
+ function isOctalDigit(ch) {
+ return ch >= 48 && ch <= 55;
+ }
+ ts.isOctalDigit = isOctalDigit;
+ function couldStartTrivia(text, pos) {
+ var ch = text.charCodeAt(pos);
+ switch (ch) {
+ case 13:
+ case 10:
+ case 9:
+ case 11:
+ case 12:
+ case 32:
+ case 47:
+ case 60:
+ case 61:
+ case 62:
+ return true;
+ case 35:
+ return pos === 0;
+ default:
+ return ch > 127;
+ }
+ }
+ ts.couldStartTrivia = couldStartTrivia;
+ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) {
+ if (stopAtComments === void 0) { stopAtComments = false; }
+ if (ts.positionIsSynthesized(pos)) {
+ return pos;
+ }
+ while (true) {
+ var ch = text.charCodeAt(pos);
+ switch (ch) {
+ case 13:
+ if (text.charCodeAt(pos + 1) === 10) {
+ pos++;
+ }
+ case 10:
+ pos++;
+ if (stopAfterLineBreak) {
+ return pos;
+ }
+ continue;
+ case 9:
+ case 11:
+ case 12:
+ case 32:
+ pos++;
+ continue;
+ case 47:
+ if (stopAtComments) {
+ break;
+ }
+ if (text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ while (pos < text.length) {
+ if (isLineBreak(text.charCodeAt(pos))) {
+ break;
+ }
+ pos++;
+ }
+ continue;
+ }
+ if (text.charCodeAt(pos + 1) === 42) {
+ pos += 2;
+ while (pos < text.length) {
+ if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ break;
+ }
+ pos++;
+ }
+ continue;
+ }
+ break;
+ case 60:
+ case 61:
+ case 62:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos);
+ continue;
+ }
+ break;
+ case 35:
+ if (pos === 0 && isShebangTrivia(text, pos)) {
+ pos = scanShebangTrivia(text, pos);
+ continue;
+ }
+ break;
+ default:
+ if (ch > 127 && (isWhiteSpace(ch))) {
+ pos++;
+ continue;
+ }
+ break;
+ }
+ return pos;
+ }
+ }
+ ts.skipTrivia = skipTrivia;
+ var mergeConflictMarkerLength = "<<<<<<<".length;
+ function isConflictMarkerTrivia(text, pos) {
+ ts.Debug.assert(pos >= 0);
+ if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
+ var ch = text.charCodeAt(pos);
+ if ((pos + mergeConflictMarkerLength) < text.length) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
+ if (text.charCodeAt(pos + i) !== ch) {
+ return false;
+ }
+ }
+ return ch === 61 ||
+ text.charCodeAt(pos + mergeConflictMarkerLength) === 32;
+ }
+ }
+ return false;
+ }
+ function scanConflictMarkerTrivia(text, pos, error) {
+ if (error) {
+ error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength);
+ }
+ var ch = text.charCodeAt(pos);
+ var len = text.length;
+ if (ch === 60 || ch === 62) {
+ while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
+ pos++;
+ }
+ }
+ else {
+ ts.Debug.assert(ch === 61);
+ while (pos < len) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
+ break;
+ }
+ pos++;
+ }
+ }
+ return pos;
+ }
+ var shebangTriviaRegex = /^#!.*/;
+ function isShebangTrivia(text, pos) {
+ ts.Debug.assert(pos === 0);
+ return shebangTriviaRegex.test(text);
+ }
+ function scanShebangTrivia(text, pos) {
+ var shebang = shebangTriviaRegex.exec(text)[0];
+ pos = pos + shebang.length;
+ return pos;
+ }
+ function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) {
+ var pendingPos;
+ var pendingEnd;
+ var pendingKind;
+ var pendingHasTrailingNewLine;
+ var hasPendingCommentRange = false;
+ var collecting = trailing || pos === 0;
+ var accumulator = initial;
+ scan: while (pos >= 0 && pos < text.length) {
+ var ch = text.charCodeAt(pos);
+ switch (ch) {
+ case 13:
+ if (text.charCodeAt(pos + 1) === 10) {
+ pos++;
+ }
+ case 10:
+ pos++;
+ if (trailing) {
+ break scan;
+ }
+ collecting = true;
+ if (hasPendingCommentRange) {
+ pendingHasTrailingNewLine = true;
+ }
+ continue;
+ case 9:
+ case 11:
+ case 12:
+ case 32:
+ pos++;
+ continue;
+ case 47:
+ var nextChar = text.charCodeAt(pos + 1);
+ var hasTrailingNewLine = false;
+ if (nextChar === 47 || nextChar === 42) {
+ var kind = nextChar === 47 ? 2 : 3;
+ var startPos = pos;
+ pos += 2;
+ if (nextChar === 47) {
+ while (pos < text.length) {
+ if (isLineBreak(text.charCodeAt(pos))) {
+ hasTrailingNewLine = true;
+ break;
+ }
+ pos++;
+ }
+ }
+ else {
+ while (pos < text.length) {
+ if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ break;
+ }
+ pos++;
+ }
+ }
+ if (collecting) {
+ if (hasPendingCommentRange) {
+ accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
+ if (!reduce && accumulator) {
+ return accumulator;
+ }
+ hasPendingCommentRange = false;
+ }
+ pendingPos = startPos;
+ pendingEnd = pos;
+ pendingKind = kind;
+ pendingHasTrailingNewLine = hasTrailingNewLine;
+ hasPendingCommentRange = true;
+ }
+ continue;
+ }
+ break scan;
+ default:
+ if (ch > 127 && (isWhiteSpace(ch))) {
+ if (hasPendingCommentRange && isLineBreak(ch)) {
+ pendingHasTrailingNewLine = true;
+ }
+ pos++;
+ continue;
+ }
+ break scan;
+ }
+ }
+ if (hasPendingCommentRange) {
+ accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
+ }
+ return accumulator;
+ }
+ function forEachLeadingCommentRange(text, pos, cb, state) {
+ return iterateCommentRanges(false, text, pos, false, cb, state);
+ }
+ ts.forEachLeadingCommentRange = forEachLeadingCommentRange;
+ function forEachTrailingCommentRange(text, pos, cb, state) {
+ return iterateCommentRanges(false, text, pos, true, cb, state);
+ }
+ ts.forEachTrailingCommentRange = forEachTrailingCommentRange;
+ function reduceEachLeadingCommentRange(text, pos, cb, state, initial) {
+ return iterateCommentRanges(true, text, pos, false, cb, state, initial);
+ }
+ ts.reduceEachLeadingCommentRange = reduceEachLeadingCommentRange;
+ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
+ return iterateCommentRanges(true, text, pos, true, cb, state, initial);
+ }
+ ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
+ function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
+ if (!comments) {
+ comments = [];
+ }
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
+ return comments;
+ }
+ function getLeadingCommentRanges(text, pos) {
+ return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ }
+ ts.getLeadingCommentRanges = getLeadingCommentRanges;
+ function getTrailingCommentRanges(text, pos) {
+ return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ }
+ ts.getTrailingCommentRanges = getTrailingCommentRanges;
+ function getShebang(text) {
+ return shebangTriviaRegex.test(text)
+ ? shebangTriviaRegex.exec(text)[0]
+ : undefined;
+ }
+ ts.getShebang = getShebang;
+ function isIdentifierStart(ch, languageVersion) {
+ return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
+ ch === 36 || ch === 95 ||
+ ch > 127 && isUnicodeIdentifierStart(ch, languageVersion);
+ }
+ ts.isIdentifierStart = isIdentifierStart;
+ function isIdentifierPart(ch, languageVersion) {
+ return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
+ ch >= 48 && ch <= 57 || ch === 36 || ch === 95 ||
+ ch > 127 && isUnicodeIdentifierPart(ch, languageVersion);
+ }
+ ts.isIdentifierPart = isIdentifierPart;
+ function isIdentifierText(name, languageVersion) {
+ if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
+ return false;
+ }
+ for (var i = 1; i < name.length; i++) {
+ if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ ts.isIdentifierText = isIdentifierText;
+ function createScanner(languageVersion, skipTrivia, languageVariant, text, onError, start, length) {
+ if (languageVariant === void 0) { languageVariant = 0; }
+ var pos;
+ var end;
+ var startPos;
+ var tokenPos;
+ var token;
+ var tokenValue;
+ var precedingLineBreak;
+ var hasExtendedUnicodeEscape;
+ var tokenIsUnterminated;
+ var numericLiteralFlags;
+ setText(text, start, length);
+ return {
+ getStartPos: function () { return startPos; },
+ getTextPos: function () { return pos; },
+ getToken: function () { return token; },
+ getTokenPos: function () { return tokenPos; },
+ getTokenText: function () { return text.substring(tokenPos, pos); },
+ getTokenValue: function () { return tokenValue; },
+ hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; },
+ hasPrecedingLineBreak: function () { return precedingLineBreak; },
+ isIdentifier: function () { return token === 70 || token > 106; },
+ isReservedWord: function () { return token >= 71 && token <= 106; },
+ isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
+ reScanGreaterToken: reScanGreaterToken,
+ reScanSlashToken: reScanSlashToken,
+ reScanTemplateToken: reScanTemplateToken,
+ scanJsxIdentifier: scanJsxIdentifier,
+ scanJsxAttributeValue: scanJsxAttributeValue,
+ reScanJsxToken: reScanJsxToken,
+ scanJsxToken: scanJsxToken,
+ scanJSDocToken: scanJSDocToken,
+ scan: scan,
+ getText: getText,
+ setText: setText,
+ setScriptTarget: setScriptTarget,
+ setLanguageVariant: setLanguageVariant,
+ setOnError: setOnError,
+ setTextPos: setTextPos,
+ tryScan: tryScan,
+ lookAhead: lookAhead,
+ scanRange: scanRange,
+ };
+ function error(message, length) {
+ if (onError) {
+ onError(message, length || 0);
+ }
+ }
+ function scanNumber() {
+ var start = pos;
+ while (isDigit(text.charCodeAt(pos)))
+ pos++;
+ if (text.charCodeAt(pos) === 46) {
+ pos++;
+ while (isDigit(text.charCodeAt(pos)))
+ pos++;
+ }
+ var end = pos;
+ if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
+ pos++;
+ numericLiteralFlags = 2;
+ if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
+ pos++;
+ if (isDigit(text.charCodeAt(pos))) {
+ pos++;
+ while (isDigit(text.charCodeAt(pos)))
+ pos++;
+ end = pos;
+ }
+ else {
+ error(ts.Diagnostics.Digit_expected);
+ }
+ }
+ return "" + +(text.substring(start, end));
+ }
+ function scanOctalDigits() {
+ var start = pos;
+ while (isOctalDigit(text.charCodeAt(pos))) {
+ pos++;
+ }
+ return +(text.substring(start, pos));
+ }
+ function scanExactNumberOfHexDigits(count) {
+ return scanHexDigits(count, false);
+ }
+ function scanMinimumNumberOfHexDigits(count) {
+ return scanHexDigits(count, true);
+ }
+ function scanHexDigits(minCount, scanAsManyAsPossible) {
+ var digits = 0;
+ var value = 0;
+ while (digits < minCount || scanAsManyAsPossible) {
+ var ch = text.charCodeAt(pos);
+ if (ch >= 48 && ch <= 57) {
+ value = value * 16 + ch - 48;
+ }
+ else if (ch >= 65 && ch <= 70) {
+ value = value * 16 + ch - 65 + 10;
+ }
+ else if (ch >= 97 && ch <= 102) {
+ value = value * 16 + ch - 97 + 10;
+ }
+ else {
+ break;
+ }
+ pos++;
+ digits++;
+ }
+ if (digits < minCount) {
+ value = -1;
+ }
+ return value;
+ }
+ function scanString(allowEscapes) {
+ if (allowEscapes === void 0) { allowEscapes = true; }
+ var quote = text.charCodeAt(pos);
+ pos++;
+ var result = "";
+ var start = pos;
+ while (true) {
+ if (pos >= end) {
+ result += text.substring(start, pos);
+ tokenIsUnterminated = true;
+ error(ts.Diagnostics.Unterminated_string_literal);
+ break;
+ }
+ var ch = text.charCodeAt(pos);
+ if (ch === quote) {
+ result += text.substring(start, pos);
+ pos++;
+ break;
+ }
+ if (ch === 92 && allowEscapes) {
+ result += text.substring(start, pos);
+ result += scanEscapeSequence();
+ start = pos;
+ continue;
+ }
+ if (isLineBreak(ch)) {
+ result += text.substring(start, pos);
+ tokenIsUnterminated = true;
+ error(ts.Diagnostics.Unterminated_string_literal);
+ break;
+ }
+ pos++;
+ }
+ return result;
+ }
+ function scanTemplateAndSetTokenValue() {
+ var startedWithBacktick = text.charCodeAt(pos) === 96;
+ pos++;
+ var start = pos;
+ var contents = "";
+ var resultingToken;
+ while (true) {
+ if (pos >= end) {
+ contents += text.substring(start, pos);
+ tokenIsUnterminated = true;
+ error(ts.Diagnostics.Unterminated_template_literal);
+ resultingToken = startedWithBacktick ? 12 : 15;
+ break;
+ }
+ var currChar = text.charCodeAt(pos);
+ if (currChar === 96) {
+ contents += text.substring(start, pos);
+ pos++;
+ resultingToken = startedWithBacktick ? 12 : 15;
+ break;
+ }
+ if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) {
+ contents += text.substring(start, pos);
+ pos += 2;
+ resultingToken = startedWithBacktick ? 13 : 14;
+ break;
+ }
+ if (currChar === 92) {
+ contents += text.substring(start, pos);
+ contents += scanEscapeSequence();
+ start = pos;
+ continue;
+ }
+ if (currChar === 13) {
+ contents += text.substring(start, pos);
+ pos++;
+ if (pos < end && text.charCodeAt(pos) === 10) {
+ pos++;
+ }
+ contents += "\n";
+ start = pos;
+ continue;
+ }
+ pos++;
+ }
+ ts.Debug.assert(resultingToken !== undefined);
+ tokenValue = contents;
+ return resultingToken;
+ }
+ function scanEscapeSequence() {
+ pos++;
+ if (pos >= end) {
+ error(ts.Diagnostics.Unexpected_end_of_text);
+ return "";
+ }
+ var ch = text.charCodeAt(pos);
+ pos++;
+ switch (ch) {
+ case 48:
+ return "\0";
+ case 98:
+ return "\b";
+ case 116:
+ return "\t";
+ case 110:
+ return "\n";
+ case 118:
+ return "\v";
+ case 102:
+ return "\f";
+ case 114:
+ return "\r";
+ case 39:
+ return "\'";
+ case 34:
+ return "\"";
+ case 117:
+ if (pos < end && text.charCodeAt(pos) === 123) {
+ hasExtendedUnicodeEscape = true;
+ pos++;
+ return scanExtendedUnicodeEscape();
+ }
+ return scanHexadecimalEscape(4);
+ case 120:
+ return scanHexadecimalEscape(2);
+ case 13:
+ if (pos < end && text.charCodeAt(pos) === 10) {
+ pos++;
+ }
+ case 10:
+ case 8232:
+ case 8233:
+ return "";
+ default:
+ return String.fromCharCode(ch);
+ }
+ }
+ function scanHexadecimalEscape(numDigits) {
+ var escapedValue = scanExactNumberOfHexDigits(numDigits);
+ if (escapedValue >= 0) {
+ return String.fromCharCode(escapedValue);
+ }
+ else {
+ error(ts.Diagnostics.Hexadecimal_digit_expected);
+ return "";
+ }
+ }
+ function scanExtendedUnicodeEscape() {
+ var escapedValue = scanMinimumNumberOfHexDigits(1);
+ var isInvalidExtendedEscape = false;
+ if (escapedValue < 0) {
+ error(ts.Diagnostics.Hexadecimal_digit_expected);
+ isInvalidExtendedEscape = true;
+ }
+ else if (escapedValue > 0x10FFFF) {
+ error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
+ isInvalidExtendedEscape = true;
+ }
+ if (pos >= end) {
+ error(ts.Diagnostics.Unexpected_end_of_text);
+ isInvalidExtendedEscape = true;
+ }
+ else if (text.charCodeAt(pos) === 125) {
+ pos++;
+ }
+ else {
+ error(ts.Diagnostics.Unterminated_Unicode_escape_sequence);
+ isInvalidExtendedEscape = true;
+ }
+ if (isInvalidExtendedEscape) {
+ return "";
+ }
+ return utf16EncodeAsString(escapedValue);
+ }
+ function utf16EncodeAsString(codePoint) {
+ ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF);
+ if (codePoint <= 65535) {
+ return String.fromCharCode(codePoint);
+ }
+ var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800;
+ var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00;
+ return String.fromCharCode(codeUnit1, codeUnit2);
+ }
+ function peekUnicodeEscape() {
+ if (pos + 5 < end && text.charCodeAt(pos + 1) === 117) {
+ var start_1 = pos;
+ pos += 2;
+ var value = scanExactNumberOfHexDigits(4);
+ pos = start_1;
+ return value;
+ }
+ return -1;
+ }
+ function scanIdentifierParts() {
+ var result = "";
+ var start = pos;
+ while (pos < end) {
+ var ch = text.charCodeAt(pos);
+ if (isIdentifierPart(ch, languageVersion)) {
+ pos++;
+ }
+ else if (ch === 92) {
+ ch = peekUnicodeEscape();
+ if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) {
+ break;
+ }
+ result += text.substring(start, pos);
+ result += String.fromCharCode(ch);
+ pos += 6;
+ start = pos;
+ }
+ else {
+ break;
+ }
+ }
+ result += text.substring(start, pos);
+ return result;
+ }
+ function getIdentifierToken() {
+ var len = tokenValue.length;
+ if (len >= 2 && len <= 11) {
+ var ch = tokenValue.charCodeAt(0);
+ if (ch >= 97 && ch <= 122) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
+ }
+ }
+ return token = 70;
+ }
+ function scanBinaryOrOctalDigits(base) {
+ ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8");
+ var value = 0;
+ var numberOfDigits = 0;
+ while (true) {
+ var ch = text.charCodeAt(pos);
+ var valueOfCh = ch - 48;
+ if (!isDigit(ch) || valueOfCh >= base) {
+ break;
+ }
+ value = value * base + valueOfCh;
+ pos++;
+ numberOfDigits++;
+ }
+ if (numberOfDigits === 0) {
+ return -1;
+ }
+ return value;
+ }
+ function scan() {
+ startPos = pos;
+ hasExtendedUnicodeEscape = false;
+ precedingLineBreak = false;
+ tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
+ while (true) {
+ tokenPos = pos;
+ if (pos >= end) {
+ return token = 1;
+ }
+ var ch = text.charCodeAt(pos);
+ if (ch === 35 && pos === 0 && isShebangTrivia(text, pos)) {
+ pos = scanShebangTrivia(text, pos);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 6;
+ }
+ }
+ switch (ch) {
+ case 10:
+ case 13:
+ precedingLineBreak = true;
+ if (skipTrivia) {
+ pos++;
+ continue;
+ }
+ else {
+ if (ch === 13 && pos + 1 < end && text.charCodeAt(pos + 1) === 10) {
+ pos += 2;
+ }
+ else {
+ pos++;
+ }
+ return token = 4;
+ }
+ case 9:
+ case 11:
+ case 12:
+ case 32:
+ if (skipTrivia) {
+ pos++;
+ continue;
+ }
+ else {
+ while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
+ pos++;
+ }
+ return token = 5;
+ }
+ case 33:
+ if (text.charCodeAt(pos + 1) === 61) {
+ if (text.charCodeAt(pos + 2) === 61) {
+ return pos += 3, token = 34;
+ }
+ return pos += 2, token = 32;
+ }
+ pos++;
+ return token = 50;
+ case 34:
+ case 39:
+ tokenValue = scanString();
+ return token = 9;
+ case 96:
+ return token = scanTemplateAndSetTokenValue();
+ case 37:
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 63;
+ }
+ pos++;
+ return token = 41;
+ case 38:
+ if (text.charCodeAt(pos + 1) === 38) {
+ return pos += 2, token = 52;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 67;
+ }
+ pos++;
+ return token = 47;
+ case 40:
+ pos++;
+ return token = 18;
+ case 41:
+ pos++;
+ return token = 19;
+ case 42:
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 60;
+ }
+ if (text.charCodeAt(pos + 1) === 42) {
+ if (text.charCodeAt(pos + 2) === 61) {
+ return pos += 3, token = 61;
+ }
+ return pos += 2, token = 39;
+ }
+ pos++;
+ return token = 38;
+ case 43:
+ if (text.charCodeAt(pos + 1) === 43) {
+ return pos += 2, token = 42;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 58;
+ }
+ pos++;
+ return token = 36;
+ case 44:
+ pos++;
+ return token = 25;
+ case 45:
+ if (text.charCodeAt(pos + 1) === 45) {
+ return pos += 2, token = 43;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 59;
+ }
+ pos++;
+ return token = 37;
+ case 46:
+ if (isDigit(text.charCodeAt(pos + 1))) {
+ tokenValue = scanNumber();
+ return token = 8;
+ }
+ if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) {
+ return pos += 3, token = 23;
+ }
+ pos++;
+ return token = 22;
+ case 47:
+ if (text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ while (pos < end) {
+ if (isLineBreak(text.charCodeAt(pos))) {
+ break;
+ }
+ pos++;
+ }
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 2;
+ }
+ }
+ if (text.charCodeAt(pos + 1) === 42) {
+ pos += 2;
+ var commentClosed = false;
+ while (pos < end) {
+ var ch_2 = text.charCodeAt(pos);
+ if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ commentClosed = true;
+ break;
+ }
+ if (isLineBreak(ch_2)) {
+ precedingLineBreak = true;
+ }
+ pos++;
+ }
+ if (!commentClosed) {
+ error(ts.Diagnostics.Asterisk_Slash_expected);
+ }
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ tokenIsUnterminated = !commentClosed;
+ return token = 3;
+ }
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 62;
+ }
+ pos++;
+ return token = 40;
+ case 48:
+ if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) {
+ pos += 2;
+ var value = scanMinimumNumberOfHexDigits(1);
+ if (value < 0) {
+ error(ts.Diagnostics.Hexadecimal_digit_expected);
+ value = 0;
+ }
+ tokenValue = "" + value;
+ numericLiteralFlags = 8;
+ return token = 8;
+ }
+ else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
+ pos += 2;
+ var value = scanBinaryOrOctalDigits(2);
+ if (value < 0) {
+ error(ts.Diagnostics.Binary_digit_expected);
+ value = 0;
+ }
+ tokenValue = "" + value;
+ numericLiteralFlags = 16;
+ return token = 8;
+ }
+ else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
+ pos += 2;
+ var value = scanBinaryOrOctalDigits(8);
+ if (value < 0) {
+ error(ts.Diagnostics.Octal_digit_expected);
+ value = 0;
+ }
+ tokenValue = "" + value;
+ numericLiteralFlags = 32;
+ return token = 8;
+ }
+ if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
+ tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4;
+ return token = 8;
+ }
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ tokenValue = scanNumber();
+ return token = 8;
+ case 58:
+ pos++;
+ return token = 55;
+ case 59:
+ pos++;
+ return token = 24;
+ case 60:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
+ if (text.charCodeAt(pos + 1) === 60) {
+ if (text.charCodeAt(pos + 2) === 61) {
+ return pos += 3, token = 64;
+ }
+ return pos += 2, token = 44;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 29;
+ }
+ if (languageVariant === 1 &&
+ text.charCodeAt(pos + 1) === 47 &&
+ text.charCodeAt(pos + 2) !== 42) {
+ return pos += 2, token = 27;
+ }
+ pos++;
+ return token = 26;
+ case 61:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ if (text.charCodeAt(pos + 2) === 61) {
+ return pos += 3, token = 33;
+ }
+ return pos += 2, token = 31;
+ }
+ if (text.charCodeAt(pos + 1) === 62) {
+ return pos += 2, token = 35;
+ }
+ pos++;
+ return token = 57;
+ case 62:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
+ pos++;
+ return token = 28;
+ case 63:
+ pos++;
+ return token = 54;
+ case 91:
+ pos++;
+ return token = 20;
+ case 93:
+ pos++;
+ return token = 21;
+ case 94:
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 69;
+ }
+ pos++;
+ return token = 49;
+ case 123:
+ pos++;
+ return token = 16;
+ case 124:
+ if (text.charCodeAt(pos + 1) === 124) {
+ return pos += 2, token = 53;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 68;
+ }
+ pos++;
+ return token = 48;
+ case 125:
+ pos++;
+ return token = 17;
+ case 126:
+ pos++;
+ return token = 51;
+ case 64:
+ pos++;
+ return token = 56;
+ case 92:
+ var cookedChar = peekUnicodeEscape();
+ if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {
+ pos += 6;
+ tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
+ return token = getIdentifierToken();
+ }
+ error(ts.Diagnostics.Invalid_character);
+ pos++;
+ return token = 0;
+ default:
+ if (isIdentifierStart(ch, languageVersion)) {
+ pos++;
+ while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos), languageVersion))
+ pos++;
+ tokenValue = text.substring(tokenPos, pos);
+ if (ch === 92) {
+ tokenValue += scanIdentifierParts();
+ }
+ return token = getIdentifierToken();
+ }
+ else if (isWhiteSpaceSingleLine(ch)) {
+ pos++;
+ continue;
+ }
+ else if (isLineBreak(ch)) {
+ precedingLineBreak = true;
+ pos++;
+ continue;
+ }
+ error(ts.Diagnostics.Invalid_character);
+ pos++;
+ return token = 0;
+ }
+ }
+ }
+ function reScanGreaterToken() {
+ if (token === 28) {
+ if (text.charCodeAt(pos) === 62) {
+ if (text.charCodeAt(pos + 1) === 62) {
+ if (text.charCodeAt(pos + 2) === 61) {
+ return pos += 3, token = 66;
+ }
+ return pos += 2, token = 46;
+ }
+ if (text.charCodeAt(pos + 1) === 61) {
+ return pos += 2, token = 65;
+ }
+ pos++;
+ return token = 45;
+ }
+ if (text.charCodeAt(pos) === 61) {
+ pos++;
+ return token = 30;
+ }
+ }
+ return token;
+ }
+ function reScanSlashToken() {
+ if (token === 40 || token === 62) {
+ var p = tokenPos + 1;
+ var inEscape = false;
+ var inCharacterClass = false;
+ while (true) {
+ if (p >= end) {
+ tokenIsUnterminated = true;
+ error(ts.Diagnostics.Unterminated_regular_expression_literal);
+ break;
+ }
+ var ch = text.charCodeAt(p);
+ if (isLineBreak(ch)) {
+ tokenIsUnterminated = true;
+ error(ts.Diagnostics.Unterminated_regular_expression_literal);
+ break;
+ }
+ if (inEscape) {
+ inEscape = false;
+ }
+ else if (ch === 47 && !inCharacterClass) {
+ p++;
+ break;
+ }
+ else if (ch === 91) {
+ inCharacterClass = true;
+ }
+ else if (ch === 92) {
+ inEscape = true;
+ }
+ else if (ch === 93) {
+ inCharacterClass = false;
+ }
+ p++;
+ }
+ while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
+ p++;
+ }
+ pos = p;
+ tokenValue = text.substring(tokenPos, pos);
+ token = 11;
+ }
+ return token;
+ }
+ function reScanTemplateToken() {
+ ts.Debug.assert(token === 17, "'reScanTemplateToken' should only be called on a '}'");
+ pos = tokenPos;
+ return token = scanTemplateAndSetTokenValue();
+ }
+ function reScanJsxToken() {
+ pos = tokenPos = startPos;
+ return token = scanJsxToken();
+ }
+ function scanJsxToken() {
+ startPos = tokenPos = pos;
+ if (pos >= end) {
+ return token = 1;
+ }
+ var char = text.charCodeAt(pos);
+ if (char === 60) {
+ if (text.charCodeAt(pos + 1) === 47) {
+ pos += 2;
+ return token = 27;
+ }
+ pos++;
+ return token = 26;
+ }
+ if (char === 123) {
+ pos++;
+ return token = 16;
+ }
+ while (pos < end) {
+ pos++;
+ char = text.charCodeAt(pos);
+ if (char === 123) {
+ break;
+ }
+ if (char === 60) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7;
+ }
+ break;
+ }
+ }
+ return token = 10;
+ }
+ function scanJsxIdentifier() {
+ if (tokenIsIdentifierOrKeyword(token)) {
+ var firstCharPosition = pos;
+ while (pos < end) {
+ var ch = text.charCodeAt(pos);
+ if (ch === 45 || ((firstCharPosition === pos) ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) {
+ pos++;
+ }
+ else {
+ break;
+ }
+ }
+ tokenValue += text.substr(firstCharPosition, pos - firstCharPosition);
+ }
+ return token;
+ }
+ function scanJsxAttributeValue() {
+ startPos = pos;
+ switch (text.charCodeAt(pos)) {
+ case 34:
+ case 39:
+ tokenValue = scanString(false);
+ return token = 9;
+ default:
+ return scan();
+ }
+ }
+ function scanJSDocToken() {
+ if (pos >= end) {
+ return token = 1;
+ }
+ startPos = pos;
+ tokenPos = pos;
+ var ch = text.charCodeAt(pos);
+ switch (ch) {
+ case 9:
+ case 11:
+ case 12:
+ case 32:
+ while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
+ pos++;
+ }
+ return token = 5;
+ case 64:
+ pos++;
+ return token = 56;
+ case 10:
+ case 13:
+ pos++;
+ return token = 4;
+ case 42:
+ pos++;
+ return token = 38;
+ case 123:
+ pos++;
+ return token = 16;
+ case 125:
+ pos++;
+ return token = 17;
+ case 91:
+ pos++;
+ return token = 20;
+ case 93:
+ pos++;
+ return token = 21;
+ case 61:
+ pos++;
+ return token = 57;
+ case 44:
+ pos++;
+ return token = 25;
+ case 46:
+ pos++;
+ return token = 22;
+ }
+ if (isIdentifierStart(ch, 5)) {
+ pos++;
+ while (isIdentifierPart(text.charCodeAt(pos), 5) && pos < end) {
+ pos++;
+ }
+ return token = 70;
+ }
+ else {
+ return pos += 1, token = 0;
+ }
+ }
+ function speculationHelper(callback, isLookahead) {
+ var savePos = pos;
+ var saveStartPos = startPos;
+ var saveTokenPos = tokenPos;
+ var saveToken = token;
+ var saveTokenValue = tokenValue;
+ var savePrecedingLineBreak = precedingLineBreak;
+ var result = callback();
+ if (!result || isLookahead) {
+ pos = savePos;
+ startPos = saveStartPos;
+ tokenPos = saveTokenPos;
+ token = saveToken;
+ tokenValue = saveTokenValue;
+ precedingLineBreak = savePrecedingLineBreak;
+ }
+ return result;
+ }
+ function scanRange(start, length, callback) {
+ var saveEnd = end;
+ var savePos = pos;
+ var saveStartPos = startPos;
+ var saveTokenPos = tokenPos;
+ var saveToken = token;
+ var savePrecedingLineBreak = precedingLineBreak;
+ var saveTokenValue = tokenValue;
+ var saveHasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
+ var saveTokenIsUnterminated = tokenIsUnterminated;
+ setText(text, start, length);
+ var result = callback();
+ end = saveEnd;
+ pos = savePos;
+ startPos = saveStartPos;
+ tokenPos = saveTokenPos;
+ token = saveToken;
+ precedingLineBreak = savePrecedingLineBreak;
+ tokenValue = saveTokenValue;
+ hasExtendedUnicodeEscape = saveHasExtendedUnicodeEscape;
+ tokenIsUnterminated = saveTokenIsUnterminated;
+ return result;
+ }
+ function lookAhead(callback) {
+ return speculationHelper(callback, true);
+ }
+ function tryScan(callback) {
+ return speculationHelper(callback, false);
+ }
+ function getText() {
+ return text;
+ }
+ function setText(newText, start, length) {
+ text = newText || "";
+ end = length === undefined ? text.length : start + length;
+ setTextPos(start || 0);
+ }
+ function setOnError(errorCallback) {
+ onError = errorCallback;
+ }
+ function setScriptTarget(scriptTarget) {
+ languageVersion = scriptTarget;
+ }
+ function setLanguageVariant(variant) {
+ languageVariant = variant;
+ }
+ function setTextPos(textPos) {
+ ts.Debug.assert(textPos >= 0);
+ pos = textPos;
+ startPos = textPos;
+ tokenPos = textPos;
+ token = 0;
+ precedingLineBreak = false;
+ tokenValue = undefined;
+ hasExtendedUnicodeEscape = false;
+ tokenIsUnterminated = false;
+ }
+ }
+ ts.createScanner = createScanner;
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ function createSynthesizedNode(kind) {
+ var node = ts.createNode(kind, -1, -1);
+ node.flags |= 8;
return node;
}
function updateNode(updated, original) {
if (updated !== original) {
setOriginalNode(updated, original);
+ setTextRange(updated, original);
if (original.startsOnNewLine) {
updated.startsOnNewLine = true;
}
@@ -10580,7 +10466,7 @@ var ts;
return updated;
}
ts.updateNode = updateNode;
- function createNodeArray(elements, location, hasTrailingComma) {
+ function createNodeArray(elements, hasTrailingComma) {
if (elements) {
if (ts.isNodeArray(elements)) {
return elements;
@@ -10590,32 +10476,15 @@ var ts;
elements = [];
}
var array = elements;
- if (location) {
- array.pos = location.pos;
- array.end = location.end;
- }
- else {
- array.pos = -1;
- array.end = -1;
- }
- if (hasTrailingComma) {
- array.hasTrailingComma = true;
- }
+ array.pos = -1;
+ array.end = -1;
+ array.hasTrailingComma = hasTrailingComma;
return array;
}
ts.createNodeArray = createNodeArray;
- function createSynthesizedNode(kind, startsOnNewLine) {
- var node = createNode(kind, undefined);
- node.startsOnNewLine = startsOnNewLine;
- return node;
- }
- ts.createSynthesizedNode = createSynthesizedNode;
- function createSynthesizedNodeArray(elements) {
- return createNodeArray(elements, undefined);
- }
- ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
function getSynthesizedClone(node) {
- var clone = createNode(node.kind, undefined, node.flags);
+ var clone = createSynthesizedNode(node.kind);
+ clone.flags |= node.flags;
setOriginalNode(clone, node);
for (var key in node) {
if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) {
@@ -10626,50 +10495,48 @@ var ts;
return clone;
}
ts.getSynthesizedClone = getSynthesizedClone;
- function getMutableClone(node) {
- var clone = getSynthesizedClone(node);
- clone.pos = node.pos;
- clone.end = node.end;
- clone.parent = node.parent;
- return clone;
- }
- ts.getMutableClone = getMutableClone;
- function createLiteral(value, location) {
+ function createLiteral(value) {
if (typeof value === "number") {
- var node = createNode(8, location, undefined);
- node.text = value.toString();
- return node;
+ return createNumericLiteral(value + "");
}
- else if (typeof value === "boolean") {
- return createNode(value ? 100 : 85, location, undefined);
+ if (typeof value === "boolean") {
+ return value ? createTrue() : createFalse();
}
- else if (typeof value === "string") {
- var node = createNode(9, location, undefined);
- node.text = value;
- return node;
- }
- else if (value) {
- var node = createNode(9, location, undefined);
- node.textSourceNode = value;
- node.text = value.text;
- return node;
+ if (typeof value === "string") {
+ return createStringLiteral(value);
}
+ return createLiteralFromNode(value);
}
ts.createLiteral = createLiteral;
- var nextAutoGenerateId = 0;
- function createIdentifier(text, location) {
- var node = createNode(70, location);
+ function createNumericLiteral(value) {
+ var node = createSynthesizedNode(8);
+ node.text = value;
+ node.numericLiteralFlags = 0;
+ return node;
+ }
+ ts.createNumericLiteral = createNumericLiteral;
+ function createStringLiteral(text) {
+ var node = createSynthesizedNode(9);
+ node.text = text;
+ return node;
+ }
+ function createLiteralFromNode(sourceNode) {
+ var node = createStringLiteral(sourceNode.text);
+ node.textSourceNode = sourceNode;
+ return node;
+ }
+ function createIdentifier(text) {
+ var node = createSynthesizedNode(70);
node.text = ts.escapeIdentifier(text);
- node.originalKeywordKind = ts.stringToToken(text);
+ node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
return node;
}
ts.createIdentifier = createIdentifier;
- function createTempVariable(recordTempVariable, location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ var nextAutoGenerateId = 0;
+ function createTempVariable(recordTempVariable) {
+ var name = createIdentifier("");
name.autoGenerateKind = 1;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
@@ -10679,93 +10546,387 @@ var ts;
return name;
}
ts.createTempVariable = createTempVariable;
- function createLoopVariable(location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ function createLoopVariable() {
+ var name = createIdentifier("");
name.autoGenerateKind = 2;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createLoopVariable = createLoopVariable;
- function createUniqueName(text, location) {
- var name = createNode(70, location);
- name.text = text;
- name.originalKeywordKind = 0;
+ function createUniqueName(text) {
+ var name = createIdentifier(text);
name.autoGenerateKind = 3;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createUniqueName = createUniqueName;
- function getGeneratedNameForNode(node, location) {
- var name = createNode(70, location);
- name.original = node;
- name.text = "";
- name.originalKeywordKind = 0;
+ function getGeneratedNameForNode(node) {
+ var name = createIdentifier("");
name.autoGenerateKind = 4;
name.autoGenerateId = nextAutoGenerateId;
+ name.original = node;
nextAutoGenerateId++;
return name;
}
ts.getGeneratedNameForNode = getGeneratedNameForNode;
function createToken(token) {
- return createNode(token);
+ return createSynthesizedNode(token);
}
ts.createToken = createToken;
function createSuper() {
- var node = createNode(96);
- return node;
+ return createSynthesizedNode(96);
}
ts.createSuper = createSuper;
- function createThis(location) {
- var node = createNode(98, location);
- return node;
+ function createThis() {
+ return createSynthesizedNode(98);
}
ts.createThis = createThis;
function createNull() {
- var node = createNode(94);
- return node;
+ return createSynthesizedNode(94);
}
ts.createNull = createNull;
- function createComputedPropertyName(expression, location) {
- var node = createNode(142, location);
+ function createTrue() {
+ return createSynthesizedNode(100);
+ }
+ ts.createTrue = createTrue;
+ function createFalse() {
+ return createSynthesizedNode(85);
+ }
+ ts.createFalse = createFalse;
+ function createQualifiedName(left, right) {
+ var node = createSynthesizedNode(142);
+ node.left = left;
+ node.right = asName(right);
+ return node;
+ }
+ ts.createQualifiedName = createQualifiedName;
+ function updateQualifiedName(node, left, right) {
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createQualifiedName(left, right), node)
+ : node;
+ }
+ ts.updateQualifiedName = updateQualifiedName;
+ function createComputedPropertyName(expression) {
+ var node = createSynthesizedNode(143);
node.expression = expression;
return node;
}
ts.createComputedPropertyName = createComputedPropertyName;
function updateComputedPropertyName(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createComputedPropertyName(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createComputedPropertyName(expression), node)
+ : node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer, location, flags) {
- var node = createNode(144, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var signatureDeclaration = createSynthesizedNode(kind);
+ signatureDeclaration.typeParameters = asNodeArray(typeParameters);
+ signatureDeclaration.parameters = asNodeArray(parameters);
+ signatureDeclaration.type = type;
+ return signatureDeclaration;
+ }
+ ts.createSignatureDeclaration = createSignatureDeclaration;
+ function updateSignatureDeclaration(node, typeParameters, parameters, type) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ ? updateNode(createSignatureDeclaration(node.kind, typeParameters, parameters, type), node)
+ : node;
+ }
+ function createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(159, typeParameters, parameters, type);
+ }
+ ts.createFunctionTypeNode = createFunctionTypeNode;
+ function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateFunctionTypeNode = updateFunctionTypeNode;
+ function createConstructorTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(154, typeParameters, parameters, type);
+ }
+ ts.createCallSignatureDeclaration = createCallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type);
+ methodSignature.name = asName(name);
+ methodSignature.questionToken = questionToken;
+ return methodSignature;
+ }
+ ts.createMethodSignature = createMethodSignature;
+ function updateMethodSignature(node, typeParameters, parameters, type, name, questionToken) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.name !== name
+ || node.questionToken !== questionToken
+ ? updateNode(createMethodSignature(typeParameters, parameters, type, name, questionToken), node)
+ : node;
+ }
+ ts.updateMethodSignature = updateMethodSignature;
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createThisTypeNode() {
+ return createSynthesizedNode(168);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createLiteralTypeNode(literal) {
+ var literalTypeNode = createSynthesizedNode(172);
+ literalTypeNode.literal = literal;
+ return literalTypeNode;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
+ function createTypeReferenceNode(typeName, typeArguments) {
+ var typeReference = createSynthesizedNode(158);
+ typeReference.typeName = asName(typeName);
+ typeReference.typeArguments = asNodeArray(typeArguments);
+ return typeReference;
+ }
+ ts.createTypeReferenceNode = createTypeReferenceNode;
+ function updateTypeReferenceNode(node, typeName, typeArguments) {
+ return node.typeName !== typeName
+ || node.typeArguments !== typeArguments
+ ? updateNode(createTypeReferenceNode(typeName, typeArguments), node)
+ : node;
+ }
+ ts.updateTypeReferenceNode = updateTypeReferenceNode;
+ function createTypePredicateNode(parameterName, type) {
+ var typePredicateNode = createSynthesizedNode(157);
+ typePredicateNode.parameterName = asName(parameterName);
+ typePredicateNode.type = type;
+ return typePredicateNode;
+ }
+ ts.createTypePredicateNode = createTypePredicateNode;
+ function updateTypePredicateNode(node, parameterName, type) {
+ return node.parameterName !== parameterName
+ || node.type !== type
+ ? updateNode(createTypePredicateNode(parameterName, type), node)
+ : node;
+ }
+ ts.updateTypePredicateNode = updateTypePredicateNode;
+ function createTypeQueryNode(exprName) {
+ var typeQueryNode = createSynthesizedNode(161);
+ typeQueryNode.exprName = exprName;
+ return typeQueryNode;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName ? updateNode(createTypeQueryNode(exprName), node) : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createArrayTypeNode(elementType) {
+ var arrayTypeNode = createSynthesizedNode(163);
+ arrayTypeNode.elementType = elementType;
+ return arrayTypeNode;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var unionTypeNode = createSynthesizedNode(kind);
+ unionTypeNode.types = createNodeArray(types);
+ return unionTypeNode;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members) {
+ var typeLiteralNode = createSynthesizedNode(162);
+ typeLiteralNode.members = createNodeArray(members);
+ return typeLiteralNode;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createTupleTypeNode(elementTypes) {
+ var tupleTypeNode = createSynthesizedNode(164);
+ tupleTypeNode.elementTypes = createNodeArray(elementTypes);
+ return tupleTypeNode;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var mappedTypeNode = createSynthesizedNode(171);
+ mappedTypeNode.readonlyToken = readonlyToken;
+ mappedTypeNode.typeParameter = typeParameter;
+ mappedTypeNode.questionToken = questionToken;
+ mappedTypeNode.type = type;
+ return mappedTypeNode;
+ }
+ ts.createMappedTypeNode = createMappedTypeNode;
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, questionToken, type) {
+ return node.readonlyToken !== readonlyToken
+ || node.typeParameter !== typeParameter
+ || node.questionToken !== questionToken
+ || node.type !== type
+ ? updateNode(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node)
+ : node;
+ }
+ ts.updateMappedTypeNode = updateMappedTypeNode;
+ function createTypeOperatorNode(type) {
+ var typeOperatorNode = createSynthesizedNode(169);
+ typeOperatorNode.operator = 126;
+ typeOperatorNode.type = type;
+ return typeOperatorNode;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var indexedAccessTypeNode = createSynthesizedNode(170);
+ indexedAccessTypeNode.objectType = objectType;
+ indexedAccessTypeNode.indexType = indexType;
+ return indexedAccessTypeNode;
+ }
+ ts.createIndexedAccessTypeNode = createIndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node, objectType, indexType) {
+ return node.objectType !== objectType
+ || node.indexType !== indexType
+ ? updateNode(createIndexedAccessTypeNode(objectType, indexType), node)
+ : node;
+ }
+ ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name, constraint, defaultType) {
+ var typeParameter = createSynthesizedNode(144);
+ typeParameter.name = asName(name);
+ typeParameter.constraint = constraint;
+ typeParameter.default = defaultType;
+ return typeParameter;
+ }
+ ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
+ return node.name !== name
+ || node.constraint !== constraint
+ || node.default !== defaultType
+ ? updateNode(createTypeParameterDeclaration(name, constraint, defaultType), node)
+ : node;
+ }
+ ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
+ function createPropertySignature(name, questionToken, type, initializer) {
+ var propertySignature = createSynthesizedNode(147);
+ propertySignature.name = asName(name);
+ propertySignature.questionToken = questionToken;
+ propertySignature.type = type;
+ propertySignature.initializer = initializer;
+ return propertySignature;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, name, questionToken, type, initializer) {
+ return node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
+ function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) {
+ var indexSignature = createSynthesizedNode(156);
+ indexSignature.decorators = asNodeArray(decorators);
+ indexSignature.modifiers = asNodeArray(modifiers);
+ indexSignature.parameters = createNodeArray(parameters);
+ indexSignature.type = type;
+ return indexSignature;
+ }
+ ts.createIndexSignatureDeclaration = createIndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignatureDeclaration(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration;
+ function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(145);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
- node.initializer = initializer ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createParameter = createParameter;
- function updateParameter(node, decorators, modifiers, dotDotDotToken, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer, node, node.flags), node);
- }
- return node;
+ function updateParameter(node, decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateParameter = updateParameter;
- function createProperty(decorators, modifiers, name, questionToken, type, initializer, location) {
- var node = createNode(147, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createDecorator(expression) {
+ var node = createSynthesizedNode(146);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createDecorator = createDecorator;
+ function updateDecorator(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createDecorator(expression), node)
+ : node;
+ }
+ ts.updateDecorator = updateDecorator;
+ function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
node.initializer = initializer;
@@ -10773,36 +10934,46 @@ var ts;
}
ts.createProperty = createProperty;
function updateProperty(node, decorators, modifiers, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateProperty = updateProperty;
- function createMethod(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(149, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(150);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
- ts.createMethod = createMethod;
- function updateMethod(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createMethod(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ ts.createMethodDeclaration = createMethodDeclaration;
+ function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateMethod = updateMethod;
- function createConstructor(decorators, modifiers, parameters, body, location, flags) {
- var node = createNode(150, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createConstructor(decorators, modifiers, parameters, body) {
+ var node = createSynthesizedNode(151);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = undefined;
@@ -10811,17 +10982,19 @@ var ts;
}
ts.createConstructor = createConstructor;
function updateConstructor(node, decorators, modifiers, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body) {
- return updateNode(createConstructor(decorators, modifiers, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createConstructor(decorators, modifiers, parameters, body), node)
+ : node;
}
ts.updateConstructor = updateConstructor;
- function createGetAccessor(decorators, modifiers, name, parameters, type, body, location, flags) {
- var node = createNode(151, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createGetAccessor(decorators, modifiers, name, parameters, type, body) {
+ var node = createSynthesizedNode(152);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = type;
@@ -10830,17 +11003,21 @@ var ts;
}
ts.createGetAccessor = createGetAccessor;
function updateGetAccessor(node, decorators, modifiers, name, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body), node)
+ : node;
}
ts.updateGetAccessor = updateGetAccessor;
- function createSetAccessor(decorators, modifiers, name, parameters, body, location, flags) {
- var node = createNode(152, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createSetAccessor(decorators, modifiers, name, parameters, body) {
+ var node = createSynthesizedNode(153);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.body = body;
@@ -10848,57 +11025,60 @@ var ts;
}
ts.createSetAccessor = createSetAccessor;
function updateSetAccessor(node, decorators, modifiers, name, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body) {
- return updateNode(createSetAccessor(decorators, modifiers, name, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createSetAccessor(decorators, modifiers, name, parameters, body), node)
+ : node;
}
ts.updateSetAccessor = updateSetAccessor;
- function createObjectBindingPattern(elements, location) {
- var node = createNode(172, location);
+ function createObjectBindingPattern(elements) {
+ var node = createSynthesizedNode(173);
node.elements = createNodeArray(elements);
return node;
}
ts.createObjectBindingPattern = createObjectBindingPattern;
function updateObjectBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createObjectBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createObjectBindingPattern(elements), node)
+ : node;
}
ts.updateObjectBindingPattern = updateObjectBindingPattern;
- function createArrayBindingPattern(elements, location) {
- var node = createNode(173, location);
+ function createArrayBindingPattern(elements) {
+ var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
return node;
}
ts.createArrayBindingPattern = createArrayBindingPattern;
function updateArrayBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayBindingPattern(elements), node)
+ : node;
}
ts.updateArrayBindingPattern = updateArrayBindingPattern;
- function createBindingElement(propertyName, dotDotDotToken, name, initializer, location) {
- var node = createNode(174, location);
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+ var node = createSynthesizedNode(175);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
node.initializer = initializer;
return node;
}
ts.createBindingElement = createBindingElement;
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
- if (node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer) {
- return updateNode(createBindingElement(propertyName, dotDotDotToken, name, initializer, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createBindingElement(dotDotDotToken, propertyName, name, initializer), node)
+ : node;
}
ts.updateBindingElement = updateBindingElement;
- function createArrayLiteral(elements, location, multiLine) {
- var node = createNode(175, location);
- node.elements = parenthesizeListElements(createNodeArray(elements));
+ function createArrayLiteral(elements, multiLine) {
+ var node = createSynthesizedNode(176);
+ node.elements = ts.parenthesizeListElements(createNodeArray(elements));
if (multiLine) {
node.multiLine = true;
}
@@ -10906,14 +11086,13 @@ var ts;
}
ts.createArrayLiteral = createArrayLiteral;
function updateArrayLiteral(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayLiteral(elements, node, node.multiLine), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayLiteral(elements, node.multiLine), node)
+ : node;
}
ts.updateArrayLiteral = updateArrayLiteral;
- function createObjectLiteral(properties, location, multiLine) {
- var node = createNode(176, location);
+ function createObjectLiteral(properties, multiLine) {
+ var node = createSynthesizedNode(177);
node.properties = createNodeArray(properties);
if (multiLine) {
node.multiLine = true;
@@ -10922,431 +11101,461 @@ var ts;
}
ts.createObjectLiteral = createObjectLiteral;
function updateObjectLiteral(node, properties) {
- if (node.properties !== properties) {
- return updateNode(createObjectLiteral(properties, node, node.multiLine), node);
- }
- return node;
+ return node.properties !== properties
+ ? updateNode(createObjectLiteral(properties, node.multiLine), node)
+ : node;
}
ts.updateObjectLiteral = updateObjectLiteral;
- function createPropertyAccess(expression, name, location, flags) {
- var node = createNode(177, location, flags);
- node.expression = parenthesizeForAccess(expression);
- (node.emitNode || (node.emitNode = {})).flags |= 65536;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAccess(expression, name) {
+ var node = createSynthesizedNode(178);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.name = asName(name);
+ setEmitFlags(node, 65536);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
function updatePropertyAccess(node, expression, name) {
- if (node.expression !== expression || node.name !== name) {
- var propertyAccess = createPropertyAccess(expression, name, node, node.flags);
- (propertyAccess.emitNode || (propertyAccess.emitNode = {})).flags = getEmitFlags(node);
- return updateNode(propertyAccess, node);
- }
- return node;
+ return node.expression !== expression
+ || node.name !== name
+ ? updateNode(setEmitFlags(createPropertyAccess(expression, name), getEmitFlags(node)), node)
+ : node;
}
ts.updatePropertyAccess = updatePropertyAccess;
- function createElementAccess(expression, index, location) {
- var node = createNode(178, location);
- node.expression = parenthesizeForAccess(expression);
- node.argumentExpression = typeof index === "number" ? createLiteral(index) : index;
+ function createElementAccess(expression, index) {
+ var node = createSynthesizedNode(179);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.argumentExpression = asExpression(index);
return node;
}
ts.createElementAccess = createElementAccess;
function updateElementAccess(node, expression, argumentExpression) {
- if (node.expression !== expression || node.argumentExpression !== argumentExpression) {
- return updateNode(createElementAccess(expression, argumentExpression, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.argumentExpression !== argumentExpression
+ ? updateNode(createElementAccess(expression, argumentExpression), node)
+ : node;
}
ts.updateElementAccess = updateElementAccess;
- function createCall(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(179, location, flags);
- node.expression = parenthesizeForAccess(expression);
- if (typeArguments) {
- node.typeArguments = createNodeArray(typeArguments);
- }
- node.arguments = parenthesizeListElements(createNodeArray(argumentsArray));
+ function createCall(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(180);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray));
return node;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- if (expression !== node.expression || typeArguments !== node.typeArguments || argumentsArray !== node.arguments) {
- return updateNode(createCall(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return expression !== node.expression
+ || typeArguments !== node.typeArguments
+ || argumentsArray !== node.arguments
+ ? updateNode(createCall(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateCall = updateCall;
- function createNew(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(180, location, flags);
- node.expression = parenthesizeForNew(expression);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.arguments = argumentsArray ? parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
+ function createNew(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(181);
+ node.expression = ts.parenthesizeForNew(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
return node;
}
ts.createNew = createNew;
function updateNew(node, expression, typeArguments, argumentsArray) {
- if (node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray) {
- return updateNode(createNew(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
+ ? updateNode(createNew(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateNew = updateNew;
- function createTaggedTemplate(tag, template, location) {
- var node = createNode(181, location);
- node.tag = parenthesizeForAccess(tag);
+ function createTaggedTemplate(tag, template) {
+ var node = createSynthesizedNode(182);
+ node.tag = ts.parenthesizeForAccess(tag);
node.template = template;
return node;
}
ts.createTaggedTemplate = createTaggedTemplate;
function updateTaggedTemplate(node, tag, template) {
- if (node.tag !== tag || node.template !== template) {
- return updateNode(createTaggedTemplate(tag, template, node), node);
- }
- return node;
+ return node.tag !== tag
+ || node.template !== template
+ ? updateNode(createTaggedTemplate(tag, template), node)
+ : node;
}
ts.updateTaggedTemplate = updateTaggedTemplate;
- function createParen(expression, location) {
- var node = createNode(183, location);
+ function createTypeAssertion(type, expression) {
+ var node = createSynthesizedNode(183);
+ node.type = type;
+ node.expression = ts.parenthesizePrefixOperand(expression);
+ return node;
+ }
+ ts.createTypeAssertion = createTypeAssertion;
+ function updateTypeAssertion(node, type, expression) {
+ return node.type !== type
+ || node.expression !== expression
+ ? updateNode(createTypeAssertion(type, expression), node)
+ : node;
+ }
+ ts.updateTypeAssertion = updateTypeAssertion;
+ function createParen(expression) {
+ var node = createSynthesizedNode(184);
node.expression = expression;
return node;
}
ts.createParen = createParen;
function updateParen(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createParen(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createParen(expression), node)
+ : node;
}
ts.updateParen = updateParen;
- function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(184, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(185);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionExpression = createFunctionExpression;
- function updateFunctionExpression(node, modifiers, name, typeParameters, parameters, type, body) {
- if (node.name !== name || node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionExpression(modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.name !== name
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionExpression = updateFunctionExpression;
- function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body, location, flags) {
- var node = createNode(185, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+ var node = createSynthesizedNode(186);
+ node.modifiers = asNodeArray(modifiers);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35);
- node.body = parenthesizeConciseBody(body);
+ node.body = ts.parenthesizeConciseBody(body);
return node;
}
ts.createArrowFunction = createArrowFunction;
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, body) {
- if (node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body), node)
+ : node;
}
ts.updateArrowFunction = updateArrowFunction;
- function createDelete(expression, location) {
- var node = createNode(186, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createDelete(expression) {
+ var node = createSynthesizedNode(187);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createDelete = createDelete;
function updateDelete(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createDelete(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createDelete(expression), node)
+ : node;
}
ts.updateDelete = updateDelete;
- function createTypeOf(expression, location) {
- var node = createNode(187, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createTypeOf(expression) {
+ var node = createSynthesizedNode(188);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createTypeOf = createTypeOf;
function updateTypeOf(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createTypeOf(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createTypeOf(expression), node)
+ : node;
}
ts.updateTypeOf = updateTypeOf;
- function createVoid(expression, location) {
- var node = createNode(188, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createVoid(expression) {
+ var node = createSynthesizedNode(189);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createVoid = createVoid;
function updateVoid(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createVoid(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createVoid(expression), node)
+ : node;
}
ts.updateVoid = updateVoid;
- function createAwait(expression, location) {
- var node = createNode(189, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createAwait(expression) {
+ var node = createSynthesizedNode(190);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createAwait = createAwait;
function updateAwait(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createAwait(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createAwait(expression), node)
+ : node;
}
ts.updateAwait = updateAwait;
- function createPrefix(operator, operand, location) {
- var node = createNode(190, location);
+ function createPrefix(operator, operand) {
+ var node = createSynthesizedNode(191);
node.operator = operator;
- node.operand = parenthesizePrefixOperand(operand);
+ node.operand = ts.parenthesizePrefixOperand(operand);
return node;
}
ts.createPrefix = createPrefix;
function updatePrefix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPrefix(node.operator, operand, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPrefix(node.operator, operand), node)
+ : node;
}
ts.updatePrefix = updatePrefix;
- function createPostfix(operand, operator, location) {
- var node = createNode(191, location);
- node.operand = parenthesizePostfixOperand(operand);
+ function createPostfix(operand, operator) {
+ var node = createSynthesizedNode(192);
+ node.operand = ts.parenthesizePostfixOperand(operand);
node.operator = operator;
return node;
}
ts.createPostfix = createPostfix;
function updatePostfix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPostfix(operand, node.operator, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPostfix(operand, node.operator), node)
+ : node;
}
ts.updatePostfix = updatePostfix;
- function createBinary(left, operator, right, location) {
- var operatorToken = typeof operator === "number" ? createToken(operator) : operator;
+ function createBinary(left, operator, right) {
+ var node = createSynthesizedNode(193);
+ var operatorToken = asToken(operator);
var operatorKind = operatorToken.kind;
- var node = createNode(192, location);
- node.left = parenthesizeBinaryOperand(operatorKind, left, true, undefined);
+ node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined);
node.operatorToken = operatorToken;
- node.right = parenthesizeBinaryOperand(operatorKind, right, false, node.left);
+ node.right = ts.parenthesizeBinaryOperand(operatorKind, right, false, node.left);
return node;
}
ts.createBinary = createBinary;
function updateBinary(node, left, right) {
- if (node.left !== left || node.right !== right) {
- return updateNode(createBinary(left, node.operatorToken, right, node), node);
- }
- return node;
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createBinary(left, node.operatorToken, right), node)
+ : node;
}
ts.updateBinary = updateBinary;
- function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonTokenOrLocation, whenFalse, location) {
- var node = createNode(193, whenFalse ? location : colonTokenOrLocation);
- node.condition = parenthesizeForConditionalHead(condition);
- if (whenFalse) {
- node.questionToken = questionTokenOrWhenTrue;
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- node.colonToken = colonTokenOrLocation;
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenFalse);
- }
- else {
- node.questionToken = createToken(54);
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(questionTokenOrWhenTrue);
- node.colonToken = createToken(55);
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- }
+ function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
+ var node = createSynthesizedNode(194);
+ node.condition = ts.parenthesizeForConditionalHead(condition);
+ node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54);
+ node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue);
+ node.colonToken = whenFalse ? colonToken : createToken(55);
+ node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse);
return node;
}
ts.createConditional = createConditional;
function updateConditional(node, condition, whenTrue, whenFalse) {
- if (node.condition !== condition || node.whenTrue !== whenTrue || node.whenFalse !== whenFalse) {
- return updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse, node), node);
- }
- return node;
+ return node.condition !== condition
+ || node.whenTrue !== whenTrue
+ || node.whenFalse !== whenFalse
+ ? updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse), node)
+ : node;
}
ts.updateConditional = updateConditional;
- function createTemplateExpression(head, templateSpans, location) {
- var node = createNode(194, location);
+ function createTemplateExpression(head, templateSpans) {
+ var node = createSynthesizedNode(195);
node.head = head;
node.templateSpans = createNodeArray(templateSpans);
return node;
}
ts.createTemplateExpression = createTemplateExpression;
function updateTemplateExpression(node, head, templateSpans) {
- if (node.head !== head || node.templateSpans !== templateSpans) {
- return updateNode(createTemplateExpression(head, templateSpans, node), node);
- }
- return node;
+ return node.head !== head
+ || node.templateSpans !== templateSpans
+ ? updateNode(createTemplateExpression(head, templateSpans), node)
+ : node;
}
ts.updateTemplateExpression = updateTemplateExpression;
- function createYield(asteriskToken, expression, location) {
- var node = createNode(195, location);
- node.asteriskToken = asteriskToken;
- node.expression = expression;
+ function createYield(asteriskTokenOrExpression, expression) {
+ var node = createSynthesizedNode(196);
+ node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined;
+ node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression;
return node;
}
ts.createYield = createYield;
- function updateYield(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createYield(node.asteriskToken, expression, node), node);
- }
- return node;
+ function updateYield(node, asteriskToken, expression) {
+ return node.expression !== expression
+ || node.asteriskToken !== asteriskToken
+ ? updateNode(createYield(asteriskToken, expression), node)
+ : node;
}
ts.updateYield = updateYield;
- function createSpread(expression, location) {
- var node = createNode(196, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSpread(expression) {
+ var node = createSynthesizedNode(197);
+ node.expression = ts.parenthesizeExpressionForList(expression);
return node;
}
ts.createSpread = createSpread;
function updateSpread(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpread(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpread(expression), node)
+ : node;
}
ts.updateSpread = updateSpread;
- function createClassExpression(modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(197, location);
+ function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(198);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassExpression = createClassExpression;
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassExpression = updateClassExpression;
- function createOmittedExpression(location) {
- var node = createNode(198, location);
- return node;
+ function createOmittedExpression() {
+ return createSynthesizedNode(199);
}
ts.createOmittedExpression = createOmittedExpression;
- function createExpressionWithTypeArguments(typeArguments, expression, location) {
- var node = createNode(199, location);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.expression = parenthesizeForAccess(expression);
+ function createExpressionWithTypeArguments(typeArguments, expression) {
+ var node = createSynthesizedNode(200);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
return node;
}
ts.createExpressionWithTypeArguments = createExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node, typeArguments, expression) {
- if (node.typeArguments !== typeArguments || node.expression !== expression) {
- return updateNode(createExpressionWithTypeArguments(typeArguments, expression, node), node);
- }
- return node;
+ return node.typeArguments !== typeArguments
+ || node.expression !== expression
+ ? updateNode(createExpressionWithTypeArguments(typeArguments, expression), node)
+ : node;
}
ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments;
- function createTemplateSpan(expression, literal, location) {
- var node = createNode(202, location);
+ function createAsExpression(expression, type) {
+ var node = createSynthesizedNode(201);
+ node.expression = expression;
+ node.type = type;
+ return node;
+ }
+ ts.createAsExpression = createAsExpression;
+ function updateAsExpression(node, expression, type) {
+ return node.expression !== expression
+ || node.type !== type
+ ? updateNode(createAsExpression(expression, type), node)
+ : node;
+ }
+ ts.updateAsExpression = updateAsExpression;
+ function createNonNullExpression(expression) {
+ var node = createSynthesizedNode(202);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createNonNullExpression = createNonNullExpression;
+ function updateNonNullExpression(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createNonNullExpression(expression), node)
+ : node;
+ }
+ ts.updateNonNullExpression = updateNonNullExpression;
+ function createTemplateSpan(expression, literal) {
+ var node = createSynthesizedNode(204);
node.expression = expression;
node.literal = literal;
return node;
}
ts.createTemplateSpan = createTemplateSpan;
function updateTemplateSpan(node, expression, literal) {
- if (node.expression !== expression || node.literal !== literal) {
- return updateNode(createTemplateSpan(expression, literal, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.literal !== literal
+ ? updateNode(createTemplateSpan(expression, literal), node)
+ : node;
}
ts.updateTemplateSpan = updateTemplateSpan;
- function createBlock(statements, location, multiLine, flags) {
- var block = createNode(204, location, flags);
+ function createBlock(statements, multiLine) {
+ var block = createSynthesizedNode(206);
block.statements = createNodeArray(statements);
- if (multiLine) {
- block.multiLine = true;
- }
+ if (multiLine)
+ block.multiLine = multiLine;
return block;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- if (statements !== node.statements) {
- return updateNode(createBlock(statements, node, node.multiLine, node.flags), node);
- }
- return node;
+ return statements !== node.statements
+ ? updateNode(createBlock(statements, node.multiLine), node)
+ : node;
}
ts.updateBlock = updateBlock;
- function createVariableStatement(modifiers, declarationList, location, flags) {
- var node = createNode(205, location, flags);
+ function createVariableStatement(modifiers, declarationList) {
+ var node = createSynthesizedNode(207);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ node.modifiers = asNodeArray(modifiers);
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
return node;
}
ts.createVariableStatement = createVariableStatement;
function updateVariableStatement(node, modifiers, declarationList) {
- if (node.modifiers !== modifiers || node.declarationList !== declarationList) {
- return updateNode(createVariableStatement(modifiers, declarationList, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.declarationList !== declarationList
+ ? updateNode(createVariableStatement(modifiers, declarationList), node)
+ : node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, location, flags) {
- var node = createNode(224, location, flags);
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(226);
+ node.flags |= flags;
node.declarations = createNodeArray(declarations);
return node;
}
ts.createVariableDeclarationList = createVariableDeclarationList;
function updateVariableDeclarationList(node, declarations) {
- if (node.declarations !== declarations) {
- return updateNode(createVariableDeclarationList(declarations, node, node.flags), node);
- }
- return node;
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
}
ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer, location, flags) {
- var node = createNode(223, location, flags);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(225);
+ node.name = asName(name);
node.type = type;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createVariableDeclaration = createVariableDeclaration;
function updateVariableDeclaration(node, name, type, initializer) {
- if (node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createVariableDeclaration(name, type, initializer, node, node.flags), node);
- }
- return node;
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
}
ts.updateVariableDeclaration = updateVariableDeclaration;
- function createEmptyStatement(location) {
- return createNode(206, location);
+ function createEmptyStatement() {
+ return createSynthesizedNode(208);
}
ts.createEmptyStatement = createEmptyStatement;
- function createStatement(expression, location, flags) {
- var node = createNode(207, location, flags);
- node.expression = parenthesizeExpressionForExpressionStatement(expression);
+ function createStatement(expression) {
+ var node = createSynthesizedNode(209);
+ node.expression = ts.parenthesizeExpressionForExpressionStatement(expression);
return node;
}
ts.createStatement = createStatement;
function updateStatement(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createStatement(expression, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createStatement(expression), node)
+ : node;
}
ts.updateStatement = updateStatement;
- function createIf(expression, thenStatement, elseStatement, location) {
- var node = createNode(208, location);
+ function createIf(expression, thenStatement, elseStatement) {
+ var node = createSynthesizedNode(210);
node.expression = expression;
node.thenStatement = thenStatement;
node.elseStatement = elseStatement;
@@ -11354,42 +11563,43 @@ var ts;
}
ts.createIf = createIf;
function updateIf(node, expression, thenStatement, elseStatement) {
- if (node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement) {
- return updateNode(createIf(expression, thenStatement, elseStatement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.thenStatement !== thenStatement
+ || node.elseStatement !== elseStatement
+ ? updateNode(createIf(expression, thenStatement, elseStatement), node)
+ : node;
}
ts.updateIf = updateIf;
- function createDo(statement, expression, location) {
- var node = createNode(209, location);
+ function createDo(statement, expression) {
+ var node = createSynthesizedNode(211);
node.statement = statement;
node.expression = expression;
return node;
}
ts.createDo = createDo;
function updateDo(node, statement, expression) {
- if (node.statement !== statement || node.expression !== expression) {
- return updateNode(createDo(statement, expression, node), node);
- }
- return node;
+ return node.statement !== statement
+ || node.expression !== expression
+ ? updateNode(createDo(statement, expression), node)
+ : node;
}
ts.updateDo = updateDo;
- function createWhile(expression, statement, location) {
- var node = createNode(210, location);
+ function createWhile(expression, statement) {
+ var node = createSynthesizedNode(212);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWhile = createWhile;
function updateWhile(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWhile(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWhile(expression, statement), node)
+ : node;
}
ts.updateWhile = updateWhile;
- function createFor(initializer, condition, incrementor, statement, location) {
- var node = createNode(211, location, undefined);
+ function createFor(initializer, condition, incrementor, statement) {
+ var node = createSynthesizedNode(213);
node.initializer = initializer;
node.condition = condition;
node.incrementor = incrementor;
@@ -11398,14 +11608,16 @@ var ts;
}
ts.createFor = createFor;
function updateFor(node, initializer, condition, incrementor, statement) {
- if (node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement) {
- return updateNode(createFor(initializer, condition, incrementor, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.condition !== condition
+ || node.incrementor !== incrementor
+ || node.statement !== statement
+ ? updateNode(createFor(initializer, condition, incrementor, statement), node)
+ : node;
}
ts.updateFor = updateFor;
- function createForIn(initializer, expression, statement, location) {
- var node = createNode(212, location);
+ function createForIn(initializer, expression, statement) {
+ var node = createSynthesizedNode(214);
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
@@ -11413,127 +11625,123 @@ var ts;
}
ts.createForIn = createForIn;
function updateForIn(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForIn(initializer, expression, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForIn(initializer, expression, statement), node)
+ : node;
}
ts.updateForIn = updateForIn;
- function createForOf(initializer, expression, statement, location) {
- var node = createNode(213, location);
+ function createForOf(awaitModifier, initializer, expression, statement) {
+ var node = createSynthesizedNode(215);
+ node.awaitModifier = awaitModifier;
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
return node;
}
ts.createForOf = createForOf;
- function updateForOf(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForOf(initializer, expression, statement, node), node);
- }
- return node;
+ function updateForOf(node, awaitModifier, initializer, expression, statement) {
+ return node.awaitModifier !== awaitModifier
+ || node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForOf(awaitModifier, initializer, expression, statement), node)
+ : node;
}
ts.updateForOf = updateForOf;
- function createContinue(label, location) {
- var node = createNode(214, location);
- if (label) {
- node.label = label;
- }
+ function createContinue(label) {
+ var node = createSynthesizedNode(216);
+ node.label = asName(label);
return node;
}
ts.createContinue = createContinue;
function updateContinue(node, label) {
- if (node.label !== label) {
- return updateNode(createContinue(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createContinue(label), node)
+ : node;
}
ts.updateContinue = updateContinue;
- function createBreak(label, location) {
- var node = createNode(215, location);
- if (label) {
- node.label = label;
- }
+ function createBreak(label) {
+ var node = createSynthesizedNode(217);
+ node.label = asName(label);
return node;
}
ts.createBreak = createBreak;
function updateBreak(node, label) {
- if (node.label !== label) {
- return updateNode(createBreak(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createBreak(label), node)
+ : node;
}
ts.updateBreak = updateBreak;
- function createReturn(expression, location) {
- var node = createNode(216, location);
+ function createReturn(expression) {
+ var node = createSynthesizedNode(218);
node.expression = expression;
return node;
}
ts.createReturn = createReturn;
function updateReturn(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createReturn(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createReturn(expression), node)
+ : node;
}
ts.updateReturn = updateReturn;
- function createWith(expression, statement, location) {
- var node = createNode(217, location);
+ function createWith(expression, statement) {
+ var node = createSynthesizedNode(219);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWith = createWith;
function updateWith(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWith(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWith(expression, statement), node)
+ : node;
}
ts.updateWith = updateWith;
- function createSwitch(expression, caseBlock, location) {
- var node = createNode(218, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSwitch(expression, caseBlock) {
+ var node = createSynthesizedNode(220);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.caseBlock = caseBlock;
return node;
}
ts.createSwitch = createSwitch;
function updateSwitch(node, expression, caseBlock) {
- if (node.expression !== expression || node.caseBlock !== caseBlock) {
- return updateNode(createSwitch(expression, caseBlock, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.caseBlock !== caseBlock
+ ? updateNode(createSwitch(expression, caseBlock), node)
+ : node;
}
ts.updateSwitch = updateSwitch;
- function createLabel(label, statement, location) {
- var node = createNode(219, location);
- node.label = typeof label === "string" ? createIdentifier(label) : label;
+ function createLabel(label, statement) {
+ var node = createSynthesizedNode(221);
+ node.label = asName(label);
node.statement = statement;
return node;
}
ts.createLabel = createLabel;
function updateLabel(node, label, statement) {
- if (node.label !== label || node.statement !== statement) {
- return updateNode(createLabel(label, statement, node), node);
- }
- return node;
+ return node.label !== label
+ || node.statement !== statement
+ ? updateNode(createLabel(label, statement), node)
+ : node;
}
ts.updateLabel = updateLabel;
- function createThrow(expression, location) {
- var node = createNode(220, location);
+ function createThrow(expression) {
+ var node = createSynthesizedNode(222);
node.expression = expression;
return node;
}
ts.createThrow = createThrow;
function updateThrow(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createThrow(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createThrow(expression), node)
+ : node;
}
ts.updateThrow = updateThrow;
- function createTry(tryBlock, catchClause, finallyBlock, location) {
- var node = createNode(221, location);
+ function createTry(tryBlock, catchClause, finallyBlock) {
+ var node = createSynthesizedNode(223);
node.tryBlock = tryBlock;
node.catchClause = catchClause;
node.finallyBlock = finallyBlock;
@@ -11541,194 +11749,284 @@ var ts;
}
ts.createTry = createTry;
function updateTry(node, tryBlock, catchClause, finallyBlock) {
- if (node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock) {
- return updateNode(createTry(tryBlock, catchClause, finallyBlock, node), node);
- }
- return node;
+ return node.tryBlock !== tryBlock
+ || node.catchClause !== catchClause
+ || node.finallyBlock !== finallyBlock
+ ? updateNode(createTry(tryBlock, catchClause, finallyBlock), node)
+ : node;
}
ts.updateTry = updateTry;
- function createCaseBlock(clauses, location) {
- var node = createNode(232, location);
- node.clauses = createNodeArray(clauses);
- return node;
- }
- ts.createCaseBlock = createCaseBlock;
- function updateCaseBlock(node, clauses) {
- if (node.clauses !== clauses) {
- return updateNode(createCaseBlock(clauses, node), node);
- }
- return node;
- }
- ts.updateCaseBlock = updateCaseBlock;
- function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(225, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(227);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionDeclaration = createFunctionDeclaration;
- function updateFunctionDeclaration(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionDeclaration(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionDeclaration(node, decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionDeclaration = updateFunctionDeclaration;
- function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(226, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(228);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassDeclaration = createClassDeclaration;
function updateClassDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassDeclaration = updateClassDeclaration;
- function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, location) {
- var node = createNode(235, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createEnumDeclaration(decorators, modifiers, name, members) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createEnumDeclaration = createEnumDeclaration;
+ function updateEnumDeclaration(node, decorators, modifiers, name, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.members !== members
+ ? updateNode(createEnumDeclaration(decorators, modifiers, name, members), node)
+ : node;
+ }
+ ts.updateEnumDeclaration = updateEnumDeclaration;
+ function createModuleDeclaration(decorators, modifiers, name, body, flags) {
+ var node = createSynthesizedNode(232);
+ node.flags |= flags;
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = name;
+ node.body = body;
+ return node;
+ }
+ ts.createModuleDeclaration = createModuleDeclaration;
+ function updateModuleDeclaration(node, decorators, modifiers, name, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.body !== body
+ ? updateNode(createModuleDeclaration(decorators, modifiers, name, body, node.flags), node)
+ : node;
+ }
+ ts.updateModuleDeclaration = updateModuleDeclaration;
+ function createModuleBlock(statements) {
+ var node = createSynthesizedNode(233);
+ node.statements = createNodeArray(statements);
+ return node;
+ }
+ ts.createModuleBlock = createModuleBlock;
+ function updateModuleBlock(node, statements) {
+ return node.statements !== statements
+ ? updateNode(createModuleBlock(statements), node)
+ : node;
+ }
+ ts.updateModuleBlock = updateModuleBlock;
+ function createCaseBlock(clauses) {
+ var node = createSynthesizedNode(234);
+ node.clauses = createNodeArray(clauses);
+ return node;
+ }
+ ts.createCaseBlock = createCaseBlock;
+ function updateCaseBlock(node, clauses) {
+ return node.clauses !== clauses
+ ? updateNode(createCaseBlock(clauses), node)
+ : node;
+ }
+ ts.updateCaseBlock = updateCaseBlock;
+ function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
+ var node = createSynthesizedNode(236);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.moduleReference = moduleReference;
+ return node;
+ }
+ ts.createImportEqualsDeclaration = createImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node, decorators, modifiers, name, moduleReference) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.moduleReference !== moduleReference
+ ? updateNode(createImportEqualsDeclaration(decorators, modifiers, name, moduleReference), node)
+ : node;
+ }
+ ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration;
+ function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
+ var node = createSynthesizedNode(237);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createImportDeclaration = createImportDeclaration;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+ : node;
}
ts.updateImportDeclaration = updateImportDeclaration;
- function createImportClause(name, namedBindings, location) {
- var node = createNode(236, location);
+ function createImportClause(name, namedBindings) {
+ var node = createSynthesizedNode(238);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
ts.createImportClause = createImportClause;
function updateImportClause(node, name, namedBindings) {
- if (node.name !== name || node.namedBindings !== namedBindings) {
- return updateNode(createImportClause(name, namedBindings, node), node);
- }
- return node;
+ return node.name !== name
+ || node.namedBindings !== namedBindings
+ ? updateNode(createImportClause(name, namedBindings), node)
+ : node;
}
ts.updateImportClause = updateImportClause;
- function createNamespaceImport(name, location) {
- var node = createNode(237, location);
+ function createNamespaceImport(name) {
+ var node = createSynthesizedNode(239);
node.name = name;
return node;
}
ts.createNamespaceImport = createNamespaceImport;
function updateNamespaceImport(node, name) {
- if (node.name !== name) {
- return updateNode(createNamespaceImport(name, node), node);
- }
- return node;
+ return node.name !== name
+ ? updateNode(createNamespaceImport(name), node)
+ : node;
}
ts.updateNamespaceImport = updateNamespaceImport;
- function createNamedImports(elements, location) {
- var node = createNode(238, location);
+ function createNamedImports(elements) {
+ var node = createSynthesizedNode(240);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedImports = createNamedImports;
function updateNamedImports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedImports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedImports(elements), node)
+ : node;
}
ts.updateNamedImports = updateNamedImports;
- function createImportSpecifier(propertyName, name, location) {
- var node = createNode(239, location);
+ function createImportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(241);
node.propertyName = propertyName;
node.name = name;
return node;
}
ts.createImportSpecifier = createImportSpecifier;
function updateImportSpecifier(node, propertyName, name) {
- if (node.propertyName !== propertyName || node.name !== name) {
- return updateNode(createImportSpecifier(propertyName, name, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createImportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateImportSpecifier = updateImportSpecifier;
- function createExportAssignment(decorators, modifiers, isExportEquals, expression, location) {
- var node = createNode(240, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
+ var node = createSynthesizedNode(242);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.isExportEquals = isExportEquals;
node.expression = expression;
return node;
}
ts.createExportAssignment = createExportAssignment;
function updateExportAssignment(node, decorators, modifiers, expression) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.expression !== expression) {
- return updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.expression !== expression
+ ? updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
+ : node;
}
ts.updateExportAssignment = updateExportAssignment;
- function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, location) {
- var node = createNode(241, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) {
+ var node = createSynthesizedNode(243);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.exportClause = exportClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createExportDeclaration = createExportDeclaration;
function updateExportDeclaration(node, decorators, modifiers, exportClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.exportClause !== exportClause
+ || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier), node)
+ : node;
}
ts.updateExportDeclaration = updateExportDeclaration;
- function createNamedExports(elements, location) {
- var node = createNode(242, location);
+ function createNamedExports(elements) {
+ var node = createSynthesizedNode(244);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedExports = createNamedExports;
function updateNamedExports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedExports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedExports(elements), node)
+ : node;
}
ts.updateNamedExports = updateNamedExports;
- function createExportSpecifier(name, propertyName, location) {
- var node = createNode(243, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createExportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(245);
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
return node;
}
ts.createExportSpecifier = createExportSpecifier;
- function updateExportSpecifier(node, name, propertyName) {
- if (node.name !== name || node.propertyName !== propertyName) {
- return updateNode(createExportSpecifier(name, propertyName, node), node);
- }
- return node;
+ function updateExportSpecifier(node, propertyName, name) {
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createExportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateExportSpecifier = updateExportSpecifier;
- function createJsxElement(openingElement, children, closingElement, location) {
- var node = createNode(246, location);
+ function createExternalModuleReference(expression) {
+ var node = createSynthesizedNode(247);
+ node.expression = expression;
+ return node;
+ }
+ ts.createExternalModuleReference = createExternalModuleReference;
+ function updateExternalModuleReference(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createExternalModuleReference(expression), node)
+ : node;
+ }
+ ts.updateExternalModuleReference = updateExternalModuleReference;
+ function createJsxElement(openingElement, children, closingElement) {
+ var node = createSynthesizedNode(248);
node.openingElement = openingElement;
node.children = createNodeArray(children);
node.closingElement = closingElement;
@@ -11736,95 +12034,107 @@ var ts;
}
ts.createJsxElement = createJsxElement;
function updateJsxElement(node, openingElement, children, closingElement) {
- if (node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement) {
- return updateNode(createJsxElement(openingElement, children, closingElement, node), node);
- }
- return node;
+ return node.openingElement !== openingElement
+ || node.children !== children
+ || node.closingElement !== closingElement
+ ? updateNode(createJsxElement(openingElement, children, closingElement), node)
+ : node;
}
ts.updateJsxElement = updateJsxElement;
- function createJsxSelfClosingElement(tagName, attributes, location) {
- var node = createNode(247, location);
+ function createJsxSelfClosingElement(tagName, attributes) {
+ var node = createSynthesizedNode(249);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxSelfClosingElement = createJsxSelfClosingElement;
function updateJsxSelfClosingElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxSelfClosingElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxSelfClosingElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement;
- function createJsxOpeningElement(tagName, attributes, location) {
- var node = createNode(248, location);
+ function createJsxOpeningElement(tagName, attributes) {
+ var node = createSynthesizedNode(250);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxOpeningElement = createJsxOpeningElement;
function updateJsxOpeningElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxOpeningElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxOpeningElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxOpeningElement = updateJsxOpeningElement;
- function createJsxClosingElement(tagName, location) {
- var node = createNode(249, location);
+ function createJsxClosingElement(tagName) {
+ var node = createSynthesizedNode(251);
node.tagName = tagName;
return node;
}
ts.createJsxClosingElement = createJsxClosingElement;
function updateJsxClosingElement(node, tagName) {
- if (node.tagName !== tagName) {
- return updateNode(createJsxClosingElement(tagName, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ ? updateNode(createJsxClosingElement(tagName), node)
+ : node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttribute(name, initializer, location) {
- var node = createNode(250, location);
+ function createJsxAttributes(properties) {
+ var jsxAttributes = createSynthesizedNode(253);
+ jsxAttributes.properties = createNodeArray(properties);
+ return jsxAttributes;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(jsxAttributes, properties) {
+ if (jsxAttributes.properties !== properties) {
+ return updateNode(createJsxAttributes(properties), jsxAttributes);
+ }
+ return jsxAttributes;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
+ function createJsxAttribute(name, initializer) {
+ var node = createSynthesizedNode(252);
node.name = name;
node.initializer = initializer;
return node;
}
ts.createJsxAttribute = createJsxAttribute;
function updateJsxAttribute(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createJsxAttribute(name, initializer, node), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createJsxAttribute(name, initializer), node)
+ : node;
}
ts.updateJsxAttribute = updateJsxAttribute;
- function createJsxSpreadAttribute(expression, location) {
- var node = createNode(251, location);
+ function createJsxSpreadAttribute(expression) {
+ var node = createSynthesizedNode(254);
node.expression = expression;
return node;
}
ts.createJsxSpreadAttribute = createJsxSpreadAttribute;
function updateJsxSpreadAttribute(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxSpreadAttribute(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxSpreadAttribute(expression), node)
+ : node;
}
ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute;
- function createJsxExpression(expression, location) {
- var node = createNode(252, location);
+ function createJsxExpression(dotDotDotToken, expression) {
+ var node = createSynthesizedNode(255);
+ node.dotDotDotToken = dotDotDotToken;
node.expression = expression;
return node;
}
ts.createJsxExpression = createJsxExpression;
function updateJsxExpression(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxExpression(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxExpression(node.dotDotDotToken, expression), node)
+ : node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types, location) {
- var node = createNode(255, location);
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(258);
node.token = token;
node.types = createNodeArray(types);
return node;
@@ -11832,40 +12142,40 @@ var ts;
ts.createHeritageClause = createHeritageClause;
function updateHeritageClause(node, types) {
if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types, node), node);
+ return updateNode(createHeritageClause(node.token, types), node);
}
return node;
}
ts.updateHeritageClause = updateHeritageClause;
- function createCaseClause(expression, statements, location) {
- var node = createNode(253, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createCaseClause(expression, statements) {
+ var node = createSynthesizedNode(256);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.statements = createNodeArray(statements);
return node;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements, node), node);
+ return updateNode(createCaseClause(expression, statements), node);
}
return node;
}
ts.updateCaseClause = updateCaseClause;
- function createDefaultClause(statements, location) {
- var node = createNode(254, location);
+ function createDefaultClause(statements) {
+ var node = createSynthesizedNode(257);
node.statements = createNodeArray(statements);
return node;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements, node), node);
+ return updateNode(createDefaultClause(statements), node);
}
return node;
}
ts.updateDefaultClause = updateDefaultClause;
- function createCatchClause(variableDeclaration, block, location) {
- var node = createNode(256, location);
+ function createCatchClause(variableDeclaration, block) {
+ var node = createSynthesizedNode(259);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
node.block = block;
return node;
@@ -11873,56 +12183,71 @@ var ts;
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block, node), node);
+ return updateNode(createCatchClause(variableDeclaration, block), node);
}
return node;
}
ts.updateCatchClause = updateCatchClause;
- function createPropertyAssignment(name, initializer, location) {
- var node = createNode(257, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAssignment(name, initializer) {
+ var node = createSynthesizedNode(260);
+ node.name = asName(name);
node.questionToken = undefined;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer, node), node);
+ return updateNode(createPropertyAssignment(name, initializer), node);
}
return node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
- function createShorthandPropertyAssignment(name, objectAssignmentInitializer, location) {
- var node = createNode(258, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
+ function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
+ var node = createSynthesizedNode(261);
+ node.name = asName(name);
+ node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
return node;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
- function createSpreadAssignment(expression, location) {
- var node = createNode(259, location);
- node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined;
- return node;
- }
- ts.createSpreadAssignment = createSpreadAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer, node), node);
+ return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
}
return node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
+ function createSpreadAssignment(expression) {
+ var node = createSynthesizedNode(262);
+ node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined;
+ return node;
+ }
+ ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression, node), node);
+ return updateNode(createSpreadAssignment(expression), node);
}
return node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
+ function createEnumMember(name, initializer) {
+ var node = createSynthesizedNode(263);
+ node.name = asName(name);
+ node.initializer = initializer && ts.parenthesizeExpressionForList(initializer);
+ return node;
+ }
+ ts.createEnumMember = createEnumMember;
+ function updateEnumMember(node, name, initializer) {
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createEnumMember(name, initializer), node)
+ : node;
+ }
+ ts.updateEnumMember = updateEnumMember;
function updateSourceFileNode(node, statements) {
if (node.statements !== statements) {
- var updated = createNode(261, node, node.flags);
+ var updated = createSynthesizedNode(264);
+ updated.flags |= node.flags;
updated.statements = createNodeArray(statements);
updated.endOfFileToken = node.endOfFileToken;
updated.fileName = node.fileName;
@@ -11981,56 +12306,73 @@ var ts;
return node;
}
ts.updateSourceFileNode = updateSourceFileNode;
+ function getMutableClone(node) {
+ var clone = getSynthesizedClone(node);
+ clone.pos = node.pos;
+ clone.end = node.end;
+ clone.parent = node.parent;
+ return clone;
+ }
+ ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createNode(293, original);
+ var node = createSynthesizedNode(294);
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createNode(296);
+ var node = createSynthesizedNode(297);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createNode(295);
+ var node = createSynthesizedNode(296);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
- function createPartiallyEmittedExpression(expression, original, location) {
- var node = createNode(294, location || original);
+ function createPartiallyEmittedExpression(expression, original) {
+ var node = createSynthesizedNode(295);
node.expression = expression;
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createPartiallyEmittedExpression = createPartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node, expression) {
if (node.expression !== expression) {
- return updateNode(createPartiallyEmittedExpression(expression, node.original, node), node);
+ return updateNode(createPartiallyEmittedExpression(expression, node.original), node);
}
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
- function createRawExpression(text) {
- var node = createNode(297);
- node.text = text;
+ function createBundle(sourceFiles) {
+ var node = ts.createNode(265);
+ node.sourceFiles = sourceFiles;
+ return node;
+ }
+ ts.createBundle = createBundle;
+ function updateBundle(node, sourceFiles) {
+ if (node.sourceFiles !== sourceFiles) {
+ return createBundle(sourceFiles);
+ }
return node;
}
- ts.createRawExpression = createRawExpression;
+ ts.updateBundle = updateBundle;
function createComma(left, right) {
return createBinary(left, 25, right);
}
ts.createComma = createComma;
- function createLessThan(left, right, location) {
- return createBinary(left, 26, right, location);
+ function createLessThan(left, right) {
+ return createBinary(left, 26, right);
}
ts.createLessThan = createLessThan;
- function createAssignment(left, right, location) {
- return createBinary(left, 57, right, location);
+ function createAssignment(left, right) {
+ return createBinary(left, 57, right);
}
ts.createAssignment = createAssignment;
function createStrictEquality(left, right) {
@@ -12049,8 +12391,8 @@ var ts;
return createBinary(left, 37, right);
}
ts.createSubtract = createSubtract;
- function createPostfixIncrement(operand, location) {
- return createPostfix(operand, 42, location);
+ function createPostfixIncrement(operand) {
+ return createPostfix(operand, 42);
}
ts.createPostfixIncrement = createPostfixIncrement;
function createLogicalAnd(left, right) {
@@ -12069,54 +12411,305 @@ var ts;
return createVoid(createLiteral(0));
}
ts.createVoidZero = createVoidZero;
+ function createExportDefault(expression) {
+ return createExportAssignment(undefined, undefined, false, expression);
+ }
+ ts.createExportDefault = createExportDefault;
+ function createExternalModuleExport(exportName) {
+ return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(undefined, exportName)]));
+ }
+ ts.createExternalModuleExport = createExternalModuleExport;
+ function asName(name) {
+ return typeof name === "string" ? createIdentifier(name) : name;
+ }
+ function asExpression(value) {
+ return typeof value === "string" || typeof value === "number" ? createLiteral(value) : value;
+ }
+ function asNodeArray(array) {
+ return array ? createNodeArray(array) : undefined;
+ }
+ function asToken(value) {
+ return typeof value === "number" ? createToken(value) : value;
+ }
+ function disposeEmitNodes(sourceFile) {
+ sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
+ var emitNode = sourceFile && sourceFile.emitNode;
+ var annotatedNodes = emitNode && emitNode.annotatedNodes;
+ if (annotatedNodes) {
+ for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
+ var node = annotatedNodes_1[_i];
+ node.emitNode = undefined;
+ }
+ }
+ }
+ ts.disposeEmitNodes = disposeEmitNodes;
+ function getOrCreateEmitNode(node) {
+ if (!node.emitNode) {
+ if (ts.isParseTreeNode(node)) {
+ if (node.kind === 264) {
+ return node.emitNode = { annotatedNodes: [node] };
+ }
+ var sourceFile = ts.getSourceFileOfNode(node);
+ getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
+ }
+ node.emitNode = {};
+ }
+ return node.emitNode;
+ }
+ ts.getOrCreateEmitNode = getOrCreateEmitNode;
+ function setTextRange(range, location) {
+ if (location) {
+ range.pos = location.pos;
+ range.end = location.end;
+ }
+ return range;
+ }
+ ts.setTextRange = setTextRange;
+ function getEmitFlags(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.flags;
+ }
+ ts.getEmitFlags = getEmitFlags;
+ function setEmitFlags(node, emitFlags) {
+ getOrCreateEmitNode(node).flags = emitFlags;
+ return node;
+ }
+ ts.setEmitFlags = setEmitFlags;
+ function getSourceMapRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.sourceMapRange) || node;
+ }
+ ts.getSourceMapRange = getSourceMapRange;
+ function setSourceMapRange(node, range) {
+ getOrCreateEmitNode(node).sourceMapRange = range;
+ return node;
+ }
+ ts.setSourceMapRange = setSourceMapRange;
+ function getTokenSourceMapRange(node, token) {
+ var emitNode = node.emitNode;
+ var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
+ return tokenSourceMapRanges && tokenSourceMapRanges[token];
+ }
+ ts.getTokenSourceMapRange = getTokenSourceMapRange;
+ function setTokenSourceMapRange(node, token, range) {
+ var emitNode = getOrCreateEmitNode(node);
+ var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = []);
+ tokenSourceMapRanges[token] = range;
+ return node;
+ }
+ ts.setTokenSourceMapRange = setTokenSourceMapRange;
+ function getCommentRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.commentRange) || node;
+ }
+ ts.getCommentRange = getCommentRange;
+ function setCommentRange(node, range) {
+ getOrCreateEmitNode(node).commentRange = range;
+ return node;
+ }
+ ts.setCommentRange = setCommentRange;
+ function getSyntheticLeadingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.leadingComments;
+ }
+ ts.getSyntheticLeadingComments = getSyntheticLeadingComments;
+ function setSyntheticLeadingComments(node, comments) {
+ getOrCreateEmitNode(node).leadingComments = comments;
+ return node;
+ }
+ ts.setSyntheticLeadingComments = setSyntheticLeadingComments;
+ function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticLeadingComments(node, ts.append(getSyntheticLeadingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticLeadingComment = addSyntheticLeadingComment;
+ function getSyntheticTrailingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.trailingComments;
+ }
+ ts.getSyntheticTrailingComments = getSyntheticTrailingComments;
+ function setSyntheticTrailingComments(node, comments) {
+ getOrCreateEmitNode(node).trailingComments = comments;
+ return node;
+ }
+ ts.setSyntheticTrailingComments = setSyntheticTrailingComments;
+ function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticTrailingComments(node, ts.append(getSyntheticTrailingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticTrailingComment = addSyntheticTrailingComment;
+ function getConstantValue(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.constantValue;
+ }
+ ts.getConstantValue = getConstantValue;
+ function setConstantValue(node, value) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.constantValue = value;
+ return node;
+ }
+ ts.setConstantValue = setConstantValue;
+ function addEmitHelper(node, helper) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ return node;
+ }
+ ts.addEmitHelper = addEmitHelper;
+ function addEmitHelpers(node, helpers) {
+ if (ts.some(helpers)) {
+ var emitNode = getOrCreateEmitNode(node);
+ for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
+ var helper = helpers_1[_i];
+ if (!ts.contains(emitNode.helpers, helper)) {
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ }
+ }
+ }
+ return node;
+ }
+ ts.addEmitHelpers = addEmitHelpers;
+ function removeEmitHelper(node, helper) {
+ var emitNode = node.emitNode;
+ if (emitNode) {
+ var helpers = emitNode.helpers;
+ if (helpers) {
+ return ts.orderedRemoveItem(helpers, helper);
+ }
+ }
+ return false;
+ }
+ ts.removeEmitHelper = removeEmitHelper;
+ function getEmitHelpers(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.helpers;
+ }
+ ts.getEmitHelpers = getEmitHelpers;
+ function moveEmitHelpers(source, target, predicate) {
+ var sourceEmitNode = source.emitNode;
+ var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
+ if (!ts.some(sourceEmitHelpers))
+ return;
+ var targetEmitNode = getOrCreateEmitNode(target);
+ var helpersRemoved = 0;
+ for (var i = 0; i < sourceEmitHelpers.length; i++) {
+ var helper = sourceEmitHelpers[i];
+ if (predicate(helper)) {
+ helpersRemoved++;
+ if (!ts.contains(targetEmitNode.helpers, helper)) {
+ targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
+ }
+ }
+ else if (helpersRemoved > 0) {
+ sourceEmitHelpers[i - helpersRemoved] = helper;
+ }
+ }
+ if (helpersRemoved > 0) {
+ sourceEmitHelpers.length -= helpersRemoved;
+ }
+ }
+ ts.moveEmitHelpers = moveEmitHelpers;
+ function compareEmitHelpers(x, y) {
+ if (x === y)
+ return 0;
+ if (x.priority === y.priority)
+ return 0;
+ if (x.priority === undefined)
+ return 1;
+ if (y.priority === undefined)
+ return -1;
+ return ts.compareValues(x.priority, y.priority);
+ }
+ ts.compareEmitHelpers = compareEmitHelpers;
+ function setOriginalNode(node, original) {
+ node.original = original;
+ if (original) {
+ var emitNode = original.emitNode;
+ if (emitNode)
+ node.emitNode = mergeEmitNode(emitNode, node.emitNode);
+ }
+ return node;
+ }
+ ts.setOriginalNode = setOriginalNode;
+ function mergeEmitNode(sourceEmitNode, destEmitNode) {
+ var flags = sourceEmitNode.flags, leadingComments = sourceEmitNode.leadingComments, trailingComments = sourceEmitNode.trailingComments, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
+ if (!destEmitNode)
+ destEmitNode = {};
+ if (leadingComments)
+ destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
+ if (trailingComments)
+ destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
+ if (flags)
+ destEmitNode.flags = flags;
+ if (commentRange)
+ destEmitNode.commentRange = commentRange;
+ if (sourceMapRange)
+ destEmitNode.sourceMapRange = sourceMapRange;
+ if (tokenSourceMapRanges)
+ destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
+ if (constantValue !== undefined)
+ destEmitNode.constantValue = constantValue;
+ if (helpers)
+ destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
+ return destEmitNode;
+ }
+ function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
+ if (!destRanges)
+ destRanges = [];
+ for (var key in sourceRanges) {
+ destRanges[key] = sourceRanges[key];
+ }
+ return destRanges;
+ }
+})(ts || (ts = {}));
+(function (ts) {
function createTypeCheck(value, tag) {
return tag === "undefined"
- ? createStrictEquality(value, createVoidZero())
- : createStrictEquality(createTypeOf(value), createLiteral(tag));
+ ? ts.createStrictEquality(value, ts.createVoidZero())
+ : ts.createStrictEquality(ts.createTypeOf(value), ts.createLiteral(tag));
}
ts.createTypeCheck = createTypeCheck;
function createMemberAccessForPropertyName(target, memberName, location) {
if (ts.isComputedPropertyName(memberName)) {
- return createElementAccess(target, memberName.expression, location);
+ return ts.setTextRange(ts.createElementAccess(target, memberName.expression), location);
}
else {
- var expression = ts.isIdentifier(memberName) ? createPropertyAccess(target, memberName, location) : createElementAccess(target, memberName, location);
- (expression.emitNode || (expression.emitNode = {})).flags |= 64;
+ var expression = ts.setTextRange(ts.isIdentifier(memberName)
+ ? ts.createPropertyAccess(target, memberName)
+ : ts.createElementAccess(target, memberName), memberName);
+ ts.getOrCreateEmitNode(expression).flags |= 64;
return expression;
}
}
ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName;
function createFunctionCall(func, thisArg, argumentsList, location) {
- return createCall(createPropertyAccess(func, "call"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"), undefined, [
thisArg
- ].concat(argumentsList), location);
+ ].concat(argumentsList)), location);
}
ts.createFunctionCall = createFunctionCall;
function createFunctionApply(func, thisArg, argumentsExpression, location) {
- return createCall(createPropertyAccess(func, "apply"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "apply"), undefined, [
thisArg,
argumentsExpression
- ], location);
+ ]), location);
}
ts.createFunctionApply = createFunctionApply;
function createArraySlice(array, start) {
var argumentsList = [];
if (start !== undefined) {
- argumentsList.push(typeof start === "number" ? createLiteral(start) : start);
+ argumentsList.push(typeof start === "number" ? ts.createLiteral(start) : start);
}
- return createCall(createPropertyAccess(array, "slice"), undefined, argumentsList);
+ return ts.createCall(ts.createPropertyAccess(array, "slice"), undefined, argumentsList);
}
ts.createArraySlice = createArraySlice;
function createArrayConcat(array, values) {
- return createCall(createPropertyAccess(array, "concat"), undefined, values);
+ return ts.createCall(ts.createPropertyAccess(array, "concat"), undefined, values);
}
ts.createArrayConcat = createArrayConcat;
function createMathPow(left, right, location) {
- return createCall(createPropertyAccess(createIdentifier("Math"), "pow"), undefined, [left, right], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Math"), "pow"), undefined, [left, right]), location);
}
ts.createMathPow = createMathPow;
function createReactNamespace(reactNamespace, parent) {
- var react = createIdentifier(reactNamespace || "React");
+ var react = ts.createIdentifier(reactNamespace || "React");
react.flags &= ~8;
react.parent = ts.getParseTreeNode(parent);
return react;
@@ -12124,9 +12717,9 @@ var ts;
function createJsxFactoryExpressionFromEntityName(jsxFactory, parent) {
if (ts.isQualifiedName(jsxFactory)) {
var left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
- var right = createSynthesizedNode(70);
+ var right = ts.createIdentifier(jsxFactory.right.text);
right.text = jsxFactory.right.text;
- return createPropertyAccess(left, right);
+ return ts.createPropertyAccess(left, right);
}
else {
return createReactNamespace(jsxFactory.text, parent);
@@ -12135,7 +12728,7 @@ var ts;
function createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parent) {
return jsxFactoryEntity ?
createJsxFactoryExpressionFromEntityName(jsxFactoryEntity, parent) :
- createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
+ ts.createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
}
function createExpressionForJsxElement(jsxFactoryEntity, reactNamespace, tagName, props, children, parentElement, location) {
var argumentsList = [tagName];
@@ -12144,7 +12737,7 @@ var ts;
}
if (children && children.length > 0) {
if (!props) {
- argumentsList.push(createNull());
+ argumentsList.push(ts.createNull());
}
if (children.length > 1) {
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
@@ -12157,33 +12750,80 @@ var ts;
argumentsList.push(children[0]);
}
}
- return createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList, location);
+ return ts.setTextRange(ts.createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList), location);
}
ts.createExpressionForJsxElement = createExpressionForJsxElement;
- function createExportDefault(expression) {
- return createExportAssignment(undefined, undefined, false, expression);
- }
- ts.createExportDefault = createExportDefault;
- function createExternalModuleExport(exportName) {
- return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(exportName)]));
+ function getHelperName(name) {
+ return ts.setEmitFlags(ts.createIdentifier(name), 4096 | 2);
}
- ts.createExternalModuleExport = createExternalModuleExport;
- function createLetStatement(name, initializer, location) {
- return createVariableStatement(undefined, createLetDeclarationList([createVariableDeclaration(name, undefined, initializer)]), location);
+ ts.getHelperName = getHelperName;
+ var valuesHelper = {
+ name: "typescript:values",
+ scoped: false,
+ text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n "
+ };
+ function createValuesHelper(context, expression, location) {
+ context.requestEmitHelper(valuesHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__values"), undefined, [expression]), location);
}
- ts.createLetStatement = createLetStatement;
- function createLetDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 1);
+ ts.createValuesHelper = createValuesHelper;
+ var readHelper = {
+ name: "typescript:read",
+ scoped: false,
+ text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n "
+ };
+ function createReadHelper(context, iteratorRecord, count, location) {
+ context.requestEmitHelper(readHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__read"), undefined, count !== undefined
+ ? [iteratorRecord, ts.createLiteral(count)]
+ : [iteratorRecord]), location);
+ }
+ ts.createReadHelper = createReadHelper;
+ var spreadHelper = {
+ name: "typescript:spread",
+ scoped: false,
+ text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"
+ };
+ function createSpreadHelper(context, argumentList, location) {
+ context.requestEmitHelper(readHelper);
+ context.requestEmitHelper(spreadHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__spread"), undefined, argumentList), location);
+ }
+ ts.createSpreadHelper = createSpreadHelper;
+ function createForOfBindingStatement(node, boundValue) {
+ if (ts.isVariableDeclarationList(node)) {
+ var firstDeclaration = ts.firstOrUndefined(node.declarations);
+ var updatedDeclaration = ts.updateVariableDeclaration(firstDeclaration, firstDeclaration.name, undefined, boundValue);
+ return ts.setTextRange(ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(node, [updatedDeclaration])), node);
+ }
+ else {
+ var updatedExpression = ts.setTextRange(ts.createAssignment(node, boundValue), node);
+ return ts.setTextRange(ts.createStatement(updatedExpression), node);
+ }
}
- ts.createLetDeclarationList = createLetDeclarationList;
- function createConstDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 2);
+ ts.createForOfBindingStatement = createForOfBindingStatement;
+ function insertLeadingStatement(dest, source) {
+ if (ts.isBlock(dest)) {
+ return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements));
+ }
+ else {
+ return ts.createBlock(ts.createNodeArray([dest, source]), true);
+ }
}
- ts.createConstDeclarationList = createConstDeclarationList;
- function getHelperName(name) {
- return setEmitFlags(createIdentifier(name), 4096 | 2);
+ ts.insertLeadingStatement = insertLeadingStatement;
+ function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {
+ if (!outermostLabeledStatement) {
+ return node;
+ }
+ var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221
+ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement)
+ : node);
+ if (afterRestoreLabelCallback) {
+ afterRestoreLabelCallback(outermostLabeledStatement);
+ }
+ return updated;
}
- ts.getHelperName = getHelperName;
+ ts.restoreEnclosingLabel = restoreEnclosingLabel;
function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
var target = skipParentheses(node);
switch (target.kind) {
@@ -12193,13 +12833,13 @@ var ts;
case 8:
case 9:
return false;
- case 175:
+ case 176:
var elements = target.elements;
if (elements.length === 0) {
return false;
}
return true;
- case 176:
+ case 177:
return target.properties.length > 0;
default:
return true;
@@ -12210,19 +12850,26 @@ var ts;
var thisArg;
var target;
if (ts.isSuperProperty(callee)) {
- thisArg = createThis();
+ thisArg = ts.createThis();
target = callee;
}
else if (callee.kind === 96) {
- thisArg = createThis();
- target = languageVersion < 2 ? createIdentifier("_super", callee) : callee;
+ thisArg = ts.createThis();
+ target = languageVersion < 2
+ ? ts.setTextRange(ts.createIdentifier("_super"), callee)
+ : callee;
+ }
+ else if (ts.getEmitFlags(callee) & 4096) {
+ thisArg = ts.createVoidZero();
+ target = parenthesizeForAccess(callee);
}
else {
switch (callee.kind) {
- case 177: {
+ case 178: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createPropertyAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.name, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12230,10 +12877,11 @@ var ts;
}
break;
}
- case 178: {
+ case 179: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createElementAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.argumentExpression, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12242,7 +12890,7 @@ var ts;
break;
}
default: {
- thisArg = createVoidZero();
+ thisArg = ts.createVoidZero();
target = parenthesizeForAccess(expression);
break;
}
@@ -12252,42 +12900,42 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, createComma);
+ return ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
if (ts.isQualifiedName(node)) {
var left = createExpressionFromEntityName(node.left);
- var right = getMutableClone(node.right);
- return createPropertyAccess(left, right, node);
+ var right = ts.getMutableClone(node.right);
+ return ts.setTextRange(ts.createPropertyAccess(left, right), node);
}
else {
- return getMutableClone(node);
+ return ts.getMutableClone(node);
}
}
ts.createExpressionFromEntityName = createExpressionFromEntityName;
function createExpressionForPropertyName(memberName) {
if (ts.isIdentifier(memberName)) {
- return createLiteral(memberName, undefined);
+ return ts.createLiteral(memberName);
}
else if (ts.isComputedPropertyName(memberName)) {
- return getMutableClone(memberName.expression);
+ return ts.getMutableClone(memberName.expression);
}
else {
- return getMutableClone(memberName);
+ return ts.getMutableClone(memberName);
}
}
ts.createExpressionForPropertyName = createExpressionForPropertyName;
function createExpressionForObjectLiteralElementLike(node, property, receiver) {
switch (property.kind) {
- case 151:
case 152:
+ case 153:
return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine);
- case 257:
+ case 260:
return createExpressionForPropertyAssignment(property, receiver);
- case 258:
+ case 261:
return createExpressionForShorthandPropertyAssignment(property, receiver);
- case 149:
+ case 150:
return createExpressionForMethodDeclaration(property, receiver);
}
}
@@ -12297,43 +12945,45 @@ var ts;
if (property === firstAccessor) {
var properties_1 = [];
if (getAccessor) {
- var getterFunction = createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body, getAccessor);
- setOriginalNode(getterFunction, getAccessor);
- var getter = createPropertyAssignment("get", getterFunction);
+ var getterFunction = ts.createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body);
+ ts.setTextRange(getterFunction, getAccessor);
+ ts.setOriginalNode(getterFunction, getAccessor);
+ var getter = ts.createPropertyAssignment("get", getterFunction);
properties_1.push(getter);
}
if (setAccessor) {
- var setterFunction = createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body, setAccessor);
- setOriginalNode(setterFunction, setAccessor);
- var setter = createPropertyAssignment("set", setterFunction);
+ var setterFunction = ts.createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body);
+ ts.setTextRange(setterFunction, setAccessor);
+ ts.setOriginalNode(setterFunction, setAccessor);
+ var setter = ts.createPropertyAssignment("set", setterFunction);
properties_1.push(setter);
}
- properties_1.push(createPropertyAssignment("enumerable", createLiteral(true)));
- properties_1.push(createPropertyAssignment("configurable", createLiteral(true)));
- var expression = createCall(createPropertyAccess(createIdentifier("Object"), "defineProperty"), undefined, [
+ properties_1.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
+ properties_1.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
+ var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
receiver,
createExpressionForPropertyName(property.name),
- createObjectLiteral(properties_1, undefined, multiLine)
- ], firstAccessor);
+ ts.createObjectLiteral(properties_1, multiLine)
+ ]), firstAccessor);
return ts.aggregateTransformFlags(expression);
}
return undefined;
}
function createExpressionForPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer, property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer), property), property));
}
function createExpressionForShorthandPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), getSynthesizedClone(property.name), property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), ts.getSynthesizedClone(property.name)), property), property));
}
function createExpressionForMethodDeclaration(method, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), setOriginalNode(createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body, method), method), method), method));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body), method), method)), method), method));
}
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
ts.getLocalName = getLocalName;
function isLocalName(node) {
- return (getEmitFlags(node) & 16384) !== 0;
+ return (ts.getEmitFlags(node) & 16384) !== 0;
}
ts.isLocalName = isLocalName;
function getExportName(node, allowComments, allowSourceMaps) {
@@ -12341,7 +12991,7 @@ var ts;
}
ts.getExportName = getExportName;
function isExportName(node) {
- return (getEmitFlags(node) & 8192) !== 0;
+ return (ts.getEmitFlags(node) & 8192) !== 0;
}
ts.isExportName = isExportName;
function getDeclarationName(node, allowComments, allowSourceMaps) {
@@ -12350,17 +13000,17 @@ var ts;
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name_10 = getMutableClone(node.name);
- emitFlags |= getEmitFlags(node.name);
+ var name = ts.getMutableClone(node.name);
+ emitFlags |= ts.getEmitFlags(node.name);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(name_10, emitFlags);
- return name_10;
+ ts.setEmitFlags(name, emitFlags);
+ return name;
}
- return getGeneratedNameForNode(node);
+ return ts.getGeneratedNameForNode(node);
}
function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {
if (ns && ts.hasModifier(node, 1)) {
@@ -12370,25 +13020,31 @@ var ts;
}
ts.getExternalModuleOrNamespaceExportName = getExternalModuleOrNamespaceExportName;
function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {
- var qualifiedName = createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : getSynthesizedClone(name), name);
+ var qualifiedName = ts.createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : ts.getSynthesizedClone(name));
+ ts.setTextRange(qualifiedName, name);
var emitFlags;
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(qualifiedName, emitFlags);
+ ts.setEmitFlags(qualifiedName, emitFlags);
return qualifiedName;
}
ts.getNamespaceMemberName = getNamespaceMemberName;
function convertToFunctionBody(node, multiLine) {
- return ts.isBlock(node) ? node : createBlock([createReturn(node, node)], node, multiLine);
+ return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
- function addPrologueDirectives(target, source, ensureUseStrict, visitor) {
+ function addPrologue(target, source, ensureUseStrict, visitor) {
+ var offset = addStandardPrologue(target, source, ensureUseStrict);
+ return addCustomPrologue(target, source, offset, visitor);
+ }
+ ts.addPrologue = addPrologue;
+ function addStandardPrologue(target, source, ensureUseStrict) {
ts.Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array");
var foundUseStrict = false;
var statementOffset = 0;
@@ -12407,11 +13063,16 @@ var ts;
statementOffset++;
}
if (ensureUseStrict && !foundUseStrict) {
- target.push(startOnNewLine(createStatement(createLiteral("use strict"))));
+ target.push(startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))));
}
+ return statementOffset;
+ }
+ ts.addStandardPrologue = addStandardPrologue;
+ function addCustomPrologue(target, source, statementOffset, visitor) {
+ var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 524288) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -12421,7 +13082,7 @@ var ts;
}
return statementOffset;
}
- ts.addPrologueDirectives = addPrologueDirectives;
+ ts.addCustomPrologue = addCustomPrologue;
function startsWithUseStrict(statements) {
var firstStatement = ts.firstOrUndefined(statements);
return firstStatement !== undefined
@@ -12444,33 +13105,43 @@ var ts;
}
}
if (!foundUseStrict) {
- return createNodeArray([
- startOnNewLine(createStatement(createLiteral("use strict")))
- ].concat(statements), statements);
+ return ts.setTextRange(ts.createNodeArray([
+ startOnNewLine(ts.createStatement(ts.createLiteral("use strict")))
+ ].concat(statements)), statements);
}
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
+ function parenthesizeConditionalHead(condition) {
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
+ var emittedCondition = skipPartiallyEmittedExpressions(condition);
+ var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
+ if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
+ return ts.createParen(condition);
+ }
+ return condition;
+ }
+ ts.parenthesizeConditionalHead = parenthesizeConditionalHead;
function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
var skipped = skipPartiallyEmittedExpressions(operand);
- if (skipped.kind === 183) {
+ if (skipped.kind === 184) {
return operand;
}
return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
- ? createParen(operand)
+ ? ts.createParen(operand)
: operand;
}
ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand;
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
- var binaryOperatorPrecedence = ts.getOperatorPrecedence(192, binaryOperator);
- var binaryOperatorAssociativity = ts.getOperatorAssociativity(192, binaryOperator);
+ var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator);
+ var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator);
var emittedOperand = skipPartiallyEmittedExpressions(operand);
var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) {
case -1:
if (!isLeftSideOfBinary
&& binaryOperatorAssociativity === 1
- && operand.kind === 195) {
+ && operand.kind === 196) {
return false;
}
return true;
@@ -12509,7 +13180,7 @@ var ts;
if (ts.isLiteralKind(node.kind)) {
return node.kind;
}
- if (node.kind === 192 && node.operatorToken.kind === 36) {
+ if (node.kind === 193 && node.operatorToken.kind === 36) {
if (node.cachedLiteralKind !== undefined) {
return node.cachedLiteralKind;
}
@@ -12524,29 +13195,30 @@ var ts;
return 0;
}
function parenthesizeForConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(193, 54);
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
var emittedCondition = skipPartiallyEmittedExpressions(condition);
var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
- return createParen(condition);
+ return ts.createParen(condition);
}
return condition;
}
ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead;
function parenthesizeSubexpressionOfConditionalExpression(e) {
- return e.kind === 192 && e.operatorToken.kind === 25
- ? createParen(e)
+ return e.kind === 193 && e.operatorToken.kind === 25
+ ? ts.createParen(e)
: e;
}
+ ts.parenthesizeSubexpressionOfConditionalExpression = parenthesizeSubexpressionOfConditionalExpression;
function parenthesizeForNew(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
switch (emittedExpression.kind) {
- case 179:
- return createParen(expression);
case 180:
+ return ts.createParen(expression);
+ case 181:
return emittedExpression.arguments
? expression
- : createParen(expression);
+ : ts.createParen(expression);
}
return parenthesizeForAccess(expression);
}
@@ -12554,23 +13226,22 @@ var ts;
function parenthesizeForAccess(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
if (ts.isLeftHandSideExpression(emittedExpression)
- && (emittedExpression.kind !== 180 || emittedExpression.arguments)
- && emittedExpression.kind !== 8) {
+ && (emittedExpression.kind !== 181 || emittedExpression.arguments)) {
return expression;
}
- return createParen(expression, expression);
+ return ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeForAccess = parenthesizeForAccess;
function parenthesizePostfixOperand(operand) {
return ts.isLeftHandSideExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePostfixOperand = parenthesizePostfixOperand;
function parenthesizePrefixOperand(operand) {
return ts.isUnaryExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePrefixOperand = parenthesizePrefixOperand;
function parenthesizeListElements(elements) {
@@ -12585,17 +13256,18 @@ var ts;
}
}
if (result !== undefined) {
- return createNodeArray(result, elements, elements.hasTrailingComma);
+ return ts.setTextRange(ts.createNodeArray(result, elements.hasTrailingComma), elements);
}
return elements;
}
+ ts.parenthesizeListElements = parenthesizeListElements;
function parenthesizeExpressionForList(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
- var commaPrecedence = ts.getOperatorPrecedence(192, 25);
+ var commaPrecedence = ts.getOperatorPrecedence(193, 25);
return expressionPrecedence > commaPrecedence
? expression
- : createParen(expression, expression);
+ : ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeExpressionForList = parenthesizeExpressionForList;
function parenthesizeExpressionForExpressionStatement(expression) {
@@ -12603,16 +13275,16 @@ var ts;
if (ts.isCallExpression(emittedExpression)) {
var callee = emittedExpression.expression;
var kind = skipPartiallyEmittedExpressions(callee).kind;
- if (kind === 184 || kind === 185) {
- var mutableCall = getMutableClone(emittedExpression);
- mutableCall.expression = createParen(callee, callee);
+ if (kind === 185 || kind === 186) {
+ var mutableCall = ts.getMutableClone(emittedExpression);
+ mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
return recreatePartiallyEmittedExpressions(expression, mutableCall);
}
}
else {
var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind;
- if (leftmostExpressionKind === 176 || leftmostExpressionKind === 184) {
- return createParen(expression, expression);
+ if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) {
+ return ts.setTextRange(ts.createParen(expression), expression);
}
}
return expression;
@@ -12620,7 +13292,7 @@ var ts;
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = getMutableClone(originalOuterExpression);
+ var clone_1 = ts.getMutableClone(originalOuterExpression);
clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
return clone_1;
}
@@ -12629,21 +13301,21 @@ var ts;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
- case 191:
+ case 192:
node = node.operand;
continue;
- case 192:
+ case 193:
node = node.left;
continue;
- case 193:
+ case 194:
node = node.condition;
continue;
+ case 180:
case 179:
case 178:
- case 177:
node = node.expression;
continue;
- case 294:
+ case 295:
node = node.expression;
continue;
}
@@ -12651,13 +13323,19 @@ var ts;
}
}
function parenthesizeConciseBody(body) {
- var emittedBody = skipPartiallyEmittedExpressions(body);
- if (emittedBody.kind === 176) {
- return createParen(body, body);
+ if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) {
+ return ts.setTextRange(ts.createParen(body), body);
}
return body;
}
ts.parenthesizeConciseBody = parenthesizeConciseBody;
+ var OuterExpressionKinds;
+ (function (OuterExpressionKinds) {
+ OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses";
+ OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 2] = "Assertions";
+ OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
+ OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
+ })(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7; }
var previousNode;
@@ -12677,7 +13355,7 @@ var ts;
}
ts.skipOuterExpressions = skipOuterExpressions;
function skipParentheses(node) {
- while (node.kind === 183) {
+ while (node.kind === 184) {
node = node.expression;
}
return node;
@@ -12691,7 +13369,7 @@ var ts;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 294) {
+ while (node.kind === 295) {
node = node.expression;
}
return node;
@@ -12702,120 +13380,6 @@ var ts;
return node;
}
ts.startOnNewLine = startOnNewLine;
- function setOriginalNode(node, original) {
- node.original = original;
- if (original) {
- var emitNode = original.emitNode;
- if (emitNode)
- node.emitNode = mergeEmitNode(emitNode, node.emitNode);
- }
- return node;
- }
- ts.setOriginalNode = setOriginalNode;
- function mergeEmitNode(sourceEmitNode, destEmitNode) {
- var flags = sourceEmitNode.flags, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
- if (!destEmitNode)
- destEmitNode = {};
- if (flags)
- destEmitNode.flags = flags;
- if (commentRange)
- destEmitNode.commentRange = commentRange;
- if (sourceMapRange)
- destEmitNode.sourceMapRange = sourceMapRange;
- if (tokenSourceMapRanges)
- destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
- if (constantValue !== undefined)
- destEmitNode.constantValue = constantValue;
- if (helpers)
- destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
- return destEmitNode;
- }
- function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
- if (!destRanges)
- destRanges = ts.createMap();
- ts.copyProperties(sourceRanges, destRanges);
- return destRanges;
- }
- function disposeEmitNodes(sourceFile) {
- sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
- var emitNode = sourceFile && sourceFile.emitNode;
- var annotatedNodes = emitNode && emitNode.annotatedNodes;
- if (annotatedNodes) {
- for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
- var node = annotatedNodes_1[_i];
- node.emitNode = undefined;
- }
- }
- }
- ts.disposeEmitNodes = disposeEmitNodes;
- function getOrCreateEmitNode(node) {
- if (!node.emitNode) {
- if (ts.isParseTreeNode(node)) {
- if (node.kind === 261) {
- return node.emitNode = { annotatedNodes: [node] };
- }
- var sourceFile = ts.getSourceFileOfNode(node);
- getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
- }
- node.emitNode = {};
- }
- return node.emitNode;
- }
- ts.getOrCreateEmitNode = getOrCreateEmitNode;
- function getEmitFlags(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.flags;
- }
- ts.getEmitFlags = getEmitFlags;
- function setEmitFlags(node, emitFlags) {
- getOrCreateEmitNode(node).flags = emitFlags;
- return node;
- }
- ts.setEmitFlags = setEmitFlags;
- function getSourceMapRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.sourceMapRange) || node;
- }
- ts.getSourceMapRange = getSourceMapRange;
- function setSourceMapRange(node, range) {
- getOrCreateEmitNode(node).sourceMapRange = range;
- return node;
- }
- ts.setSourceMapRange = setSourceMapRange;
- function getTokenSourceMapRange(node, token) {
- var emitNode = node.emitNode;
- var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
- return tokenSourceMapRanges && tokenSourceMapRanges[token];
- }
- ts.getTokenSourceMapRange = getTokenSourceMapRange;
- function setTokenSourceMapRange(node, token, range) {
- var emitNode = getOrCreateEmitNode(node);
- var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = ts.createMap());
- tokenSourceMapRanges[token] = range;
- return node;
- }
- ts.setTokenSourceMapRange = setTokenSourceMapRange;
- function getCommentRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.commentRange) || node;
- }
- ts.getCommentRange = getCommentRange;
- function setCommentRange(node, range) {
- getOrCreateEmitNode(node).commentRange = range;
- return node;
- }
- ts.setCommentRange = setCommentRange;
- function getConstantValue(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.constantValue;
- }
- ts.getConstantValue = getConstantValue;
- function setConstantValue(node, value) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.constantValue = value;
- return node;
- }
- ts.setConstantValue = setConstantValue;
function getExternalHelpersModuleName(node) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
var emitNode = parseNode && parseNode.emitNode;
@@ -12828,125 +13392,31 @@ var ts;
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = getEmitHelpers(node);
+ var helpers = ts.getEmitHelpers(node);
if (helpers) {
- for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
- var helper = helpers_1[_i];
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
if (!helper.scoped) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
- var emitNode = getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = createUniqueName(ts.externalHelpersModuleNameText));
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
}
}
}
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
- function addEmitHelper(node, helper) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- return node;
- }
- ts.addEmitHelper = addEmitHelper;
- function addEmitHelpers(node, helpers) {
- if (ts.some(helpers)) {
- var emitNode = getOrCreateEmitNode(node);
- for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
- var helper = helpers_2[_i];
- if (!ts.contains(emitNode.helpers, helper)) {
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- }
- }
- }
- return node;
- }
- ts.addEmitHelpers = addEmitHelpers;
- function removeEmitHelper(node, helper) {
- var emitNode = node.emitNode;
- if (emitNode) {
- var helpers = emitNode.helpers;
- if (helpers) {
- return ts.orderedRemoveItem(helpers, helper);
- }
- }
- return false;
- }
- ts.removeEmitHelper = removeEmitHelper;
- function getEmitHelpers(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.helpers;
- }
- ts.getEmitHelpers = getEmitHelpers;
- function moveEmitHelpers(source, target, predicate) {
- var sourceEmitNode = source.emitNode;
- var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
- if (!ts.some(sourceEmitHelpers))
- return;
- var targetEmitNode = getOrCreateEmitNode(target);
- var helpersRemoved = 0;
- for (var i = 0; i < sourceEmitHelpers.length; i++) {
- var helper = sourceEmitHelpers[i];
- if (predicate(helper)) {
- helpersRemoved++;
- if (!ts.contains(targetEmitNode.helpers, helper)) {
- targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
- }
- }
- else if (helpersRemoved > 0) {
- sourceEmitHelpers[i - helpersRemoved] = helper;
- }
- }
- if (helpersRemoved > 0) {
- sourceEmitHelpers.length -= helpersRemoved;
- }
- }
- ts.moveEmitHelpers = moveEmitHelpers;
- function compareEmitHelpers(x, y) {
- if (x === y)
- return 0;
- if (x.priority === y.priority)
- return 0;
- if (x.priority === undefined)
- return 1;
- if (y.priority === undefined)
- return -1;
- return ts.compareValues(x.priority, y.priority);
- }
- ts.compareEmitHelpers = compareEmitHelpers;
- function setTextRange(node, location) {
- if (location) {
- node.pos = location.pos;
- node.end = location.end;
- }
- return node;
- }
- ts.setTextRange = setTextRange;
- function setNodeFlags(node, flags) {
- node.flags = flags;
- return node;
- }
- ts.setNodeFlags = setNodeFlags;
- function setMultiLine(node, multiLine) {
- node.multiLine = multiLine;
- return node;
- }
- ts.setMultiLine = setMultiLine;
- function setHasTrailingComma(nodes, hasTrailingComma) {
- nodes.hasTrailingComma = hasTrailingComma;
- return nodes;
- }
- ts.setHasTrailingComma = setHasTrailingComma;
function getLocalNameForExternalImport(node, sourceFile) {
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- var name_11 = namespaceDeclaration.name;
- return ts.isGeneratedIdentifier(name_11) ? name_11 : createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
+ var name = namespaceDeclaration.name;
+ return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
}
- if (node.kind === 235 && node.importClause) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 237 && node.importClause) {
+ return ts.getGeneratedNameForNode(node);
}
- if (node.kind === 241 && node.moduleSpecifier) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 243 && node.moduleSpecifier) {
+ return ts.getGeneratedNameForNode(node);
}
return undefined;
}
@@ -12956,26 +13426,24 @@ var ts;
if (moduleName.kind === 9) {
return tryGetModuleNameFromDeclaration(importNode, host, resolver, compilerOptions)
|| tryRenameExternalModule(moduleName, sourceFile)
- || getSynthesizedClone(moduleName);
+ || ts.getSynthesizedClone(moduleName);
}
return undefined;
}
ts.getExternalModuleNameLiteral = getExternalModuleNameLiteral;
function tryRenameExternalModule(moduleName, sourceFile) {
- if (sourceFile.renamedDependencies && ts.hasProperty(sourceFile.renamedDependencies, moduleName.text)) {
- return createLiteral(sourceFile.renamedDependencies[moduleName.text]);
- }
- return undefined;
+ var rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
+ return rename && ts.createLiteral(rename);
}
function tryGetModuleNameFromFile(file, host, options) {
if (!file) {
return undefined;
}
if (file.moduleName) {
- return createLiteral(file.moduleName);
+ return ts.createLiteral(file.moduleName);
}
if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
- return createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
+ return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
}
@@ -13009,11 +13477,11 @@ var ts;
}
if (ts.isObjectLiteralElementLike(bindingElement)) {
switch (bindingElement.kind) {
- case 257:
+ case 260:
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
- case 258:
+ case 261:
return bindingElement.name;
- case 259:
+ case 262:
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return undefined;
@@ -13029,11 +13497,11 @@ var ts;
ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement;
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 144:
- case 174:
+ case 145:
+ case 175:
return bindingElement.dotDotDotToken;
- case 196:
- case 259:
+ case 197:
+ case 262:
return bindingElement;
}
return undefined;
@@ -13041,7 +13509,7 @@ var ts;
ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement;
function getPropertyNameOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 174:
+ case 175:
if (bindingElement.propertyName) {
var propertyName = bindingElement.propertyName;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -13049,7 +13517,7 @@ var ts;
: propertyName;
}
break;
- case 257:
+ case 260:
if (bindingElement.name) {
var propertyName = bindingElement.name;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -13057,7 +13525,7 @@ var ts;
: propertyName;
}
break;
- case 259:
+ case 262:
return bindingElement.name;
}
var target = getTargetOfBindingOrAssignmentElement(bindingElement);
@@ -13071,11 +13539,11 @@ var ts;
ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement;
function getElementsOfBindingOrAssignmentPattern(name) {
switch (name.kind) {
- case 172:
case 173:
- case 175:
- return name.elements;
+ case 174:
case 176:
+ return name.elements;
+ case 177:
return name.properties;
}
}
@@ -13084,10 +13552,12 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpread(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpread(element.name), element), element);
}
var expression = convertToAssignmentElementTarget(element.name);
- return element.initializer ? setOriginalNode(createAssignment(expression, element.initializer, element), element) : expression;
+ return element.initializer
+ ? ts.setOriginalNode(ts.setTextRange(ts.createAssignment(expression, element.initializer), element), element)
+ : expression;
}
ts.Debug.assertNode(element, ts.isExpression);
return element;
@@ -13097,14 +13567,14 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpreadAssignment(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpreadAssignment(element.name), element), element);
}
if (element.propertyName) {
var expression = convertToAssignmentElementTarget(element.name);
- return setOriginalNode(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(element.propertyName, element.initializer ? ts.createAssignment(expression, element.initializer) : expression), element), element);
}
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createShorthandPropertyAssignment(element.name, element.initializer, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createShorthandPropertyAssignment(element.name, element.initializer), element), element);
}
ts.Debug.assertNode(element, ts.isObjectLiteralElementLike);
return element;
@@ -13112,18 +13582,18 @@ var ts;
ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement;
function convertToAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
- return convertToArrayAssignmentPattern(node);
- case 172:
+ case 174:
case 176:
+ return convertToArrayAssignmentPattern(node);
+ case 173:
+ case 177:
return convertToObjectAssignmentPattern(node);
}
}
ts.convertToAssignmentPattern = convertToAssignmentPattern;
function convertToObjectAssignmentPattern(node) {
if (ts.isObjectBindingPattern(node)) {
- return setOriginalNode(createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isObjectLiteralExpression);
return node;
@@ -13131,7 +13601,7 @@ var ts;
ts.convertToObjectAssignmentPattern = convertToObjectAssignmentPattern;
function convertToArrayAssignmentPattern(node) {
if (ts.isArrayBindingPattern(node)) {
- return setOriginalNode(createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isArrayLiteralExpression);
return node;
@@ -13147,30 +13617,30 @@ var ts;
ts.convertToAssignmentElementTarget = convertToAssignmentElementTarget;
function collectExternalModuleInfo(sourceFile, resolver, compilerOptions) {
var externalImports = [];
- var exportSpecifiers = ts.createMap();
- var exportedBindings = ts.createMap();
+ var exportSpecifiers = ts.createMultiMap();
+ var exportedBindings = [];
var uniqueExports = ts.createMap();
var exportedNames;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && createImportDeclaration(undefined, undefined, createImportClause(undefined, createNamespaceImport(externalHelpersModuleName)), createLiteral(ts.externalHelpersModuleNameText));
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
if (externalHelpersImportDeclaration) {
externalImports.push(externalHelpersImportDeclaration);
}
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var node = _a[_i];
switch (node.kind) {
- case 235:
+ case 237:
externalImports.push(node);
break;
- case 234:
- if (node.moduleReference.kind === 245) {
+ case 236:
+ if (node.moduleReference.kind === 247) {
externalImports.push(node);
}
break;
- case 241:
+ case 243:
if (node.moduleSpecifier) {
if (!node.exportClause) {
externalImports.push(node);
@@ -13183,26 +13653,26 @@ var ts;
else {
for (var _b = 0, _c = node.exportClause.elements; _b < _c.length; _b++) {
var specifier = _c[_b];
- if (!uniqueExports[specifier.name.text]) {
- var name_12 = specifier.propertyName || specifier.name;
- ts.multiMapAdd(exportSpecifiers, name_12.text, specifier);
- var decl = resolver.getReferencedImportDeclaration(name_12)
- || resolver.getReferencedValueDeclaration(name_12);
+ if (!uniqueExports.get(specifier.name.text)) {
+ var name = specifier.propertyName || specifier.name;
+ exportSpecifiers.add(name.text, specifier);
+ var decl = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
if (decl) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
}
- uniqueExports[specifier.name.text] = true;
+ uniqueExports.set(specifier.name.text, true);
exportedNames = ts.append(exportedNames, specifier.name);
}
}
}
break;
- case 240:
+ case 242:
if (node.isExportEquals && !exportEquals) {
exportEquals = node;
}
break;
- case 205:
+ case 207:
if (ts.hasModifier(node, 1)) {
for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) {
var decl = _e[_d];
@@ -13210,38 +13680,38 @@ var ts;
}
}
break;
- case 225:
+ case 227:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_13 = node.name;
- if (!uniqueExports[name_13.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_13);
- uniqueExports[name_13.text] = true;
- exportedNames = ts.append(exportedNames, name_13);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
break;
- case 226:
+ case 228:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_14 = node.name;
- if (!uniqueExports[name_14.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_14);
- uniqueExports[name_14.text] = true;
- exportedNames = ts.append(exportedNames, name_14);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
@@ -13261,13 +13731,23 @@ var ts;
}
}
else if (!ts.isGeneratedIdentifier(decl.name)) {
- if (!uniqueExports[decl.name.text]) {
- uniqueExports[decl.name.text] = true;
+ if (!uniqueExports.get(decl.name.text)) {
+ uniqueExports.set(decl.name.text, true);
exportedNames = ts.append(exportedNames, decl.name);
}
}
return exportedNames;
}
+ function multiMapSparseArrayAdd(map, key, value) {
+ var values = map[key];
+ if (values) {
+ values.push(value);
+ }
+ else {
+ map[key] = values = [value];
+ }
+ return values;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -13276,13 +13756,13 @@ var ts;
var IdentifierConstructor;
var SourceFileConstructor;
function createNode(kind, pos, end) {
- if (kind === 261) {
+ if (kind === 264) {
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end);
}
else if (kind === 70) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 141) {
+ else if (kind < 142) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -13318,28 +13798,29 @@ var ts;
var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
var cbNodes = cbNodeArray || cbNode;
switch (node.kind) {
- case 141:
+ case 142:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.right);
- case 143:
+ case 144:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.constraint) ||
+ visitNode(cbNode, node.default) ||
visitNode(cbNode, node.expression);
- case 258:
+ case 261:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.equalsToken) ||
visitNode(cbNode, node.objectAssignmentInitializer);
- case 259:
+ case 262:
return visitNode(cbNode, node.expression);
- case 144:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 257:
- case 223:
- case 174:
+ case 260:
+ case 225:
+ case 175:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.propertyName) ||
@@ -13348,24 +13829,24 @@ var ts;
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.initializer);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
+ case 156:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.asteriskToken) ||
@@ -13376,320 +13857,326 @@ var ts;
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.equalsGreaterThanToken) ||
visitNode(cbNode, node.body);
- case 157:
+ case 158:
return visitNode(cbNode, node.typeName) ||
visitNodes(cbNodes, node.typeArguments);
- case 156:
+ case 157:
return visitNode(cbNode, node.parameterName) ||
visitNode(cbNode, node.type);
- case 160:
- return visitNode(cbNode, node.exprName);
case 161:
- return visitNodes(cbNodes, node.members);
+ return visitNode(cbNode, node.exprName);
case 162:
- return visitNode(cbNode, node.elementType);
+ return visitNodes(cbNodes, node.members);
case 163:
- return visitNodes(cbNodes, node.elementTypes);
+ return visitNode(cbNode, node.elementType);
case 164:
+ return visitNodes(cbNodes, node.elementTypes);
case 165:
- return visitNodes(cbNodes, node.types);
case 166:
- case 168:
- return visitNode(cbNode, node.type);
+ return visitNodes(cbNodes, node.types);
+ case 167:
case 169:
+ return visitNode(cbNode, node.type);
+ case 170:
return visitNode(cbNode, node.objectType) ||
visitNode(cbNode, node.indexType);
- case 170:
+ case 171:
return visitNode(cbNode, node.readonlyToken) ||
visitNode(cbNode, node.typeParameter) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type);
- case 171:
- return visitNode(cbNode, node.literal);
case 172:
+ return visitNode(cbNode, node.literal);
case 173:
- return visitNodes(cbNodes, node.elements);
- case 175:
+ case 174:
return visitNodes(cbNodes, node.elements);
case 176:
- return visitNodes(cbNodes, node.properties);
+ return visitNodes(cbNodes, node.elements);
case 177:
+ return visitNodes(cbNodes, node.properties);
+ case 178:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.name);
- case 178:
+ case 179:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.argumentExpression);
- case 179:
case 180:
+ case 181:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments) ||
visitNodes(cbNodes, node.arguments);
- case 181:
+ case 182:
return visitNode(cbNode, node.tag) ||
visitNode(cbNode, node.template);
- case 182:
+ case 183:
return visitNode(cbNode, node.type) ||
visitNode(cbNode, node.expression);
- case 183:
- return visitNode(cbNode, node.expression);
- case 186:
+ case 184:
return visitNode(cbNode, node.expression);
case 187:
return visitNode(cbNode, node.expression);
case 188:
return visitNode(cbNode, node.expression);
- case 190:
- return visitNode(cbNode, node.operand);
- case 195:
- return visitNode(cbNode, node.asteriskToken) ||
- visitNode(cbNode, node.expression);
case 189:
return visitNode(cbNode, node.expression);
case 191:
return visitNode(cbNode, node.operand);
+ case 196:
+ return visitNode(cbNode, node.asteriskToken) ||
+ visitNode(cbNode, node.expression);
+ case 190:
+ return visitNode(cbNode, node.expression);
case 192:
+ return visitNode(cbNode, node.operand);
+ case 193:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.operatorToken) ||
visitNode(cbNode, node.right);
- case 200:
+ case 201:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.type);
- case 201:
+ case 202:
return visitNode(cbNode, node.expression);
- case 193:
+ case 203:
+ return visitNode(cbNode, node.name);
+ case 194:
return visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.whenTrue) ||
visitNode(cbNode, node.colonToken) ||
visitNode(cbNode, node.whenFalse);
- case 196:
+ case 197:
return visitNode(cbNode, node.expression);
- case 204:
- case 231:
+ case 206:
+ case 233:
return visitNodes(cbNodes, node.statements);
- case 261:
+ case 264:
return visitNodes(cbNodes, node.statements) ||
visitNode(cbNode, node.endOfFileToken);
- case 205:
+ case 207:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.declarationList);
- case 224:
+ case 226:
return visitNodes(cbNodes, node.declarations);
- case 207:
+ case 209:
return visitNode(cbNode, node.expression);
- case 208:
+ case 210:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.thenStatement) ||
visitNode(cbNode, node.elseStatement);
- case 209:
+ case 211:
return visitNode(cbNode, node.statement) ||
visitNode(cbNode, node.expression);
- case 210:
+ case 212:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 211:
+ case 213:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.incrementor) ||
visitNode(cbNode, node.statement);
- case 212:
+ case 214:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 213:
- return visitNode(cbNode, node.initializer) ||
+ case 215:
+ return visitNode(cbNode, node.awaitModifier) ||
+ visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 214:
- case 215:
- return visitNode(cbNode, node.label);
case 216:
- return visitNode(cbNode, node.expression);
case 217:
+ return visitNode(cbNode, node.label);
+ case 218:
+ return visitNode(cbNode, node.expression);
+ case 219:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 218:
+ case 220:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.caseBlock);
- case 232:
+ case 234:
return visitNodes(cbNodes, node.clauses);
- case 253:
+ case 256:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.statements);
- case 254:
+ case 257:
return visitNodes(cbNodes, node.statements);
- case 219:
+ case 221:
return visitNode(cbNode, node.label) ||
visitNode(cbNode, node.statement);
- case 220:
+ case 222:
return visitNode(cbNode, node.expression);
- case 221:
+ case 223:
return visitNode(cbNode, node.tryBlock) ||
visitNode(cbNode, node.catchClause) ||
visitNode(cbNode, node.finallyBlock);
- case 256:
+ case 259:
return visitNode(cbNode, node.variableDeclaration) ||
visitNode(cbNode, node.block);
- case 145:
+ case 146:
return visitNode(cbNode, node.expression);
- case 226:
- case 197:
+ case 228:
+ case 198:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 227:
+ case 229:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 228:
+ case 230:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNode(cbNode, node.type);
- case 229:
+ case 231:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.members);
- case 260:
+ case 263:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 230:
+ case 232:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.body);
- case 234:
+ case 236:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.moduleReference);
- case 235:
+ case 237:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.importClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 236:
+ case 238:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.namedBindings);
- case 233:
+ case 235:
return visitNode(cbNode, node.name);
- case 237:
+ case 239:
return visitNode(cbNode, node.name);
- case 238:
- case 242:
+ case 240:
+ case 244:
return visitNodes(cbNodes, node.elements);
- case 241:
+ case 243:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.exportClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 239:
- case 243:
+ case 241:
+ case 245:
return visitNode(cbNode, node.propertyName) ||
visitNode(cbNode, node.name);
- case 240:
+ case 242:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.expression);
- case 194:
+ case 195:
return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
- case 202:
+ case 204:
return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
- case 142:
+ case 143:
return visitNode(cbNode, node.expression);
- case 255:
+ case 258:
return visitNodes(cbNodes, node.types);
- case 199:
+ case 200:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments);
- case 245:
+ case 247:
return visitNode(cbNode, node.expression);
- case 244:
- return visitNodes(cbNodes, node.decorators);
case 246:
+ return visitNodes(cbNodes, node.decorators);
+ case 248:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
visitNode(cbNode, node.closingElement);
- case 247:
- case 248:
- return visitNode(cbNode, node.tagName) ||
- visitNodes(cbNodes, node.attributes);
+ case 249:
case 250:
+ return visitNode(cbNode, node.tagName) ||
+ visitNode(cbNode, node.attributes);
+ case 253:
+ return visitNodes(cbNodes, node.properties);
+ case 252:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 251:
- return visitNode(cbNode, node.expression);
- case 252:
+ case 254:
return visitNode(cbNode, node.expression);
- case 249:
+ case 255:
+ return visitNode(cbNode, node.dotDotDotToken) ||
+ visitNode(cbNode, node.expression);
+ case 251:
return visitNode(cbNode, node.tagName);
- case 262:
- return visitNode(cbNode, node.type);
case 266:
+ return visitNode(cbNode, node.type);
+ case 270:
return visitNodes(cbNodes, node.types);
- case 267:
+ case 271:
return visitNodes(cbNodes, node.types);
- case 265:
- return visitNode(cbNode, node.elementType);
case 269:
+ return visitNode(cbNode, node.elementType);
+ case 273:
return visitNode(cbNode, node.type);
- case 268:
+ case 272:
return visitNode(cbNode, node.type);
- case 270:
+ case 274:
return visitNode(cbNode, node.literal);
- case 272:
+ case 276:
return visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeArguments);
- case 273:
+ case 277:
return visitNode(cbNode, node.type);
- case 274:
+ case 278:
return visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 275:
+ case 279:
return visitNode(cbNode, node.type);
- case 276:
+ case 280:
return visitNode(cbNode, node.type);
- case 277:
+ case 281:
return visitNode(cbNode, node.type);
- case 271:
+ case 275:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.type);
- case 278:
+ case 282:
return visitNodes(cbNodes, node.tags);
- case 281:
+ case 285:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 282:
- return visitNode(cbNode, node.typeExpression);
- case 283:
+ case 286:
return visitNode(cbNode, node.typeExpression);
- case 280:
+ case 287:
return visitNode(cbNode, node.typeExpression);
case 284:
+ return visitNode(cbNode, node.typeExpression);
+ case 288:
return visitNodes(cbNodes, node.typeParameters);
- case 285:
+ case 289:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 287:
+ case 291:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 286:
+ case 290:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 294:
+ case 295:
return visitNode(cbNode, node.expression);
- case 288:
+ case 292:
return visitNode(cbNode, node.literal);
}
}
@@ -13730,7 +14217,7 @@ var ts;
var Parser;
(function (Parser) {
var scanner = ts.createScanner(5, true);
- var disallowInAndDecoratorContext = 65536 | 262144;
+ var disallowInAndDecoratorContext = 2048 | 8192;
var NodeConstructor;
var TokenConstructor;
var IdentifierConstructor;
@@ -13778,7 +14265,7 @@ var ts;
identifiers = ts.createMap();
identifierCount = 0;
nodeCount = 0;
- contextFlags = scriptKind === 1 || scriptKind === 2 ? 2097152 : 0;
+ contextFlags = scriptKind === 1 || scriptKind === 2 ? 65536 : 0;
parseErrorBeforeNextFinishedNode = false;
scanner.setText(sourceText);
scanner.setOnError(scanError);
@@ -13853,7 +14340,7 @@ var ts;
}
Parser.fixupParentReferences = fixupParentReferences;
function createSourceFile(fileName, languageVersion, scriptKind) {
- var sourceFile = new SourceFileConstructor(261, 0, sourceText.length);
+ var sourceFile = new SourceFileConstructor(264, 0, sourceText.length);
nodeCount++;
sourceFile.text = sourceText;
sourceFile.bindDiagnostics = [];
@@ -13873,16 +14360,16 @@ var ts;
}
}
function setDisallowInContext(val) {
- setContextFlag(val, 65536);
+ setContextFlag(val, 2048);
}
function setYieldContext(val) {
- setContextFlag(val, 131072);
+ setContextFlag(val, 4096);
}
function setDecoratorContext(val) {
- setContextFlag(val, 262144);
+ setContextFlag(val, 8192);
}
function setAwaitContext(val) {
- setContextFlag(val, 524288);
+ setContextFlag(val, 16384);
}
function doOutsideOfContext(context, func) {
var contextFlagsToClear = context & contextFlags;
@@ -13905,40 +14392,40 @@ var ts;
return func();
}
function allowInAnd(func) {
- return doOutsideOfContext(65536, func);
+ return doOutsideOfContext(2048, func);
}
function disallowInAnd(func) {
- return doInsideOfContext(65536, func);
+ return doInsideOfContext(2048, func);
}
function doInYieldContext(func) {
- return doInsideOfContext(131072, func);
+ return doInsideOfContext(4096, func);
}
function doInDecoratorContext(func) {
- return doInsideOfContext(262144, func);
+ return doInsideOfContext(8192, func);
}
function doInAwaitContext(func) {
- return doInsideOfContext(524288, func);
+ return doInsideOfContext(16384, func);
}
function doOutsideOfAwaitContext(func) {
- return doOutsideOfContext(524288, func);
+ return doOutsideOfContext(16384, func);
}
function doInYieldAndAwaitContext(func) {
- return doInsideOfContext(131072 | 524288, func);
+ return doInsideOfContext(4096 | 16384, func);
}
function inContext(flags) {
return (contextFlags & flags) !== 0;
}
function inYieldContext() {
- return inContext(131072);
+ return inContext(4096);
}
function inDisallowInContext() {
- return inContext(65536);
+ return inContext(2048);
}
function inDecoratorContext() {
- return inContext(262144);
+ return inContext(8192);
}
function inAwaitContext() {
- return inContext(524288);
+ return inContext(16384);
}
function parseErrorAtCurrentToken(message, arg0) {
var start = scanner.getTokenPos();
@@ -14080,7 +14567,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 141 ? new NodeConstructor(kind, pos, pos) :
+ return kind >= 142 ? new NodeConstructor(kind, pos, pos) :
kind === 70 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -14100,7 +14587,7 @@ var ts;
}
if (parseErrorBeforeNextFinishedNode) {
parseErrorBeforeNextFinishedNode = false;
- node.flags |= 1048576;
+ node.flags |= 32768;
}
return node;
}
@@ -14117,7 +14604,11 @@ var ts;
}
function internIdentifier(text) {
text = ts.escapeIdentifier(text);
- return identifiers[text] || (identifiers[text] = text);
+ var identifier = identifiers.get(text);
+ if (identifier === undefined) {
+ identifiers.set(text, identifier = text);
+ }
+ return identifier;
}
function createIdentifier(isIdentifier, diagnosticMessage) {
identifierCount++;
@@ -14162,7 +14653,7 @@ var ts;
return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token());
}
function parseComputedPropertyName() {
- var node = createNode(142);
+ var node = createNode(143);
parseExpected(20);
node.expression = allowInAnd(parseExpression);
parseExpected(21);
@@ -14211,6 +14702,7 @@ var ts;
function nextTokenIsClassOrFunctionOrAsync() {
nextToken();
return token() === 74 || token() === 88 ||
+ (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
function isListElement(parsingContext, inErrorRecovery) {
@@ -14418,7 +14910,7 @@ var ts;
if (ts.containsParseError(node)) {
return undefined;
}
- var nodeContextFlags = node.flags & 3080192;
+ var nodeContextFlags = node.flags & 96256;
if (nodeContextFlags !== contextFlags) {
return undefined;
}
@@ -14467,14 +14959,14 @@ var ts;
function isReusableClassMember(node) {
if (node) {
switch (node.kind) {
- case 150:
- case 155:
case 151:
+ case 156:
case 152:
- case 147:
- case 203:
+ case 153:
+ case 148:
+ case 205:
return true;
- case 149:
+ case 150:
var methodDeclaration = node;
var nameIsConstructor = methodDeclaration.name.kind === 70 &&
methodDeclaration.name.originalKeywordKind === 122;
@@ -14486,8 +14978,8 @@ var ts;
function isReusableSwitchClause(node) {
if (node) {
switch (node.kind) {
- case 253:
- case 254:
+ case 256:
+ case 257:
return true;
}
}
@@ -14496,65 +14988,65 @@ var ts;
function isReusableStatement(node) {
if (node) {
switch (node.kind) {
- case 225:
- case 205:
- case 204:
- case 208:
+ case 227:
case 207:
+ case 206:
+ case 210:
+ case 209:
+ case 222:
+ case 218:
case 220:
+ case 217:
case 216:
- case 218:
- case 215:
case 214:
- case 212:
+ case 215:
case 213:
- case 211:
- case 210:
- case 217:
- case 206:
- case 221:
+ case 212:
case 219:
- case 209:
- case 222:
- case 235:
- case 234:
- case 241:
- case 240:
- case 230:
- case 226:
- case 227:
- case 229:
+ case 208:
+ case 223:
+ case 221:
+ case 211:
+ case 224:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
+ case 232:
case 228:
+ case 229:
+ case 231:
+ case 230:
return true;
}
}
return false;
}
function isReusableEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
function isReusableTypeMember(node) {
if (node) {
switch (node.kind) {
- case 154:
- case 148:
case 155:
- case 146:
- case 153:
+ case 149:
+ case 156:
+ case 147:
+ case 154:
return true;
}
}
return false;
}
function isReusableVariableDeclaration(node) {
- if (node.kind !== 223) {
+ if (node.kind !== 225) {
return false;
}
var variableDeclarator = node;
return variableDeclarator.initializer === undefined;
}
function isReusableParameter(node) {
- if (node.kind !== 144) {
+ if (node.kind !== 145) {
return false;
}
var parameter = node;
@@ -14599,7 +15091,6 @@ var ts;
case 25: return ts.Diagnostics.Property_assignment_expected;
}
}
- ;
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
var saveParsingContext = parsingContext;
parsingContext |= 1 << kind;
@@ -14650,7 +15141,7 @@ var ts;
function parseEntityName(allowReservedWords, diagnosticMessage) {
var entity = parseIdentifier(diagnosticMessage);
while (parseOptional(22)) {
- var node = createNode(141, entity.pos);
+ var node = createNode(142, entity.pos);
node.left = entity;
node.right = parseRightSideOfDot(allowReservedWords);
entity = finishNode(node);
@@ -14667,7 +15158,7 @@ var ts;
return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
}
function parseTemplateExpression() {
- var template = createNode(194);
+ var template = createNode(195);
template.head = parseTemplateHead();
ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind");
var templateSpans = createNodeArray();
@@ -14679,7 +15170,7 @@ var ts;
return finishNode(template);
}
function parseTemplateSpan() {
- var span = createNode(202);
+ var span = createNode(204);
span.expression = allowInAnd(parseExpression);
var literal;
if (token() === 17) {
@@ -14715,20 +15206,16 @@ var ts;
if (scanner.isUnterminated()) {
node.isUnterminated = true;
}
- var tokenPos = scanner.getTokenPos();
+ if (node.kind === 8) {
+ node.numericLiteralFlags = scanner.getNumericLiteralFlags();
+ }
nextToken();
finishNode(node);
- if (node.kind === 8
- && sourceText.charCodeAt(tokenPos) === 48
- && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
- node.isOctalLiteral = true;
- }
return node;
}
function parseTypeReference() {
- var typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
- var node = createNode(157, typeName.pos);
- node.typeName = typeName;
+ var node = createNode(158);
+ node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
if (!scanner.hasPrecedingLineBreak() && token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
}
@@ -14736,24 +15223,24 @@ var ts;
}
function parseThisTypePredicate(lhs) {
nextToken();
- var node = createNode(156, lhs.pos);
+ var node = createNode(157, lhs.pos);
node.parameterName = lhs;
node.type = parseType();
return finishNode(node);
}
function parseThisTypeNode() {
- var node = createNode(167);
+ var node = createNode(168);
nextToken();
return finishNode(node);
}
function parseTypeQuery() {
- var node = createNode(160);
+ var node = createNode(161);
parseExpected(102);
node.exprName = parseEntityName(true);
return finishNode(node);
}
function parseTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
if (parseOptional(84)) {
if (isStartOfType() || !isStartOfExpression()) {
@@ -14763,6 +15250,9 @@ var ts;
node.expression = parseUnaryExpressionOrHigher();
}
}
+ if (parseOptional(57)) {
+ node.default = parseType();
+ }
return finishNode(node);
}
function parseTypeParameters() {
@@ -14780,9 +15270,9 @@ var ts;
return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98;
}
function parseParameter() {
- var node = createNode(144);
+ var node = createNode(145);
if (token() === 98) {
- node.name = createIdentifier(true, undefined);
+ node.name = createIdentifier(true);
node.type = parseParameterType();
return finishNode(node);
}
@@ -14840,7 +15330,7 @@ var ts;
}
function parseSignatureMember(kind) {
var node = createNode(kind);
- if (kind === 154) {
+ if (kind === 155) {
parseExpected(93);
}
fillSignature(55, false, false, false, node);
@@ -14880,7 +15370,7 @@ var ts;
return token() === 55 || token() === 25 || token() === 21;
}
function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(155, fullStart);
+ var node = createNode(156, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.parameters = parseBracketedList(16, parseParameter, 20, 21);
@@ -14892,7 +15382,7 @@ var ts;
var name = parsePropertyName();
var questionToken = parseOptionalToken(54);
if (token() === 18 || token() === 26) {
- var method = createNode(148, fullStart);
+ var method = createNode(149, fullStart);
method.modifiers = modifiers;
method.name = name;
method.questionToken = questionToken;
@@ -14901,7 +15391,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
else {
- var property = createNode(146, fullStart);
+ var property = createNode(147, fullStart);
property.modifiers = modifiers;
property.name = name;
property.questionToken = questionToken;
@@ -14914,19 +15404,19 @@ var ts;
}
}
function isTypeMemberStart() {
- var idToken;
if (token() === 18 || token() === 26) {
return true;
}
+ var idToken;
while (ts.isModifierKind(token())) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (token() === 20) {
return true;
}
if (isLiteralPropertyName()) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (idToken) {
@@ -14941,10 +15431,10 @@ var ts;
}
function parseTypeMember() {
if (token() === 18 || token() === 26) {
- return parseSignatureMember(153);
+ return parseSignatureMember(154);
}
if (token() === 93 && lookAhead(isStartOfConstructSignature)) {
- return parseSignatureMember(154);
+ return parseSignatureMember(155);
}
var fullStart = getNodePos();
var modifiers = parseModifiers();
@@ -14958,7 +15448,7 @@ var ts;
return token() === 18 || token() === 26;
}
function parseTypeLiteral() {
- var node = createNode(161);
+ var node = createNode(162);
node.members = parseObjectTypeMembers();
return finishNode(node);
}
@@ -14981,14 +15471,14 @@ var ts;
return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91;
}
function parseMappedTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
parseExpected(91);
node.constraint = parseType();
return finishNode(node);
}
function parseMappedType() {
- var node = createNode(170);
+ var node = createNode(171);
parseExpected(16);
node.readonlyToken = parseOptionalToken(130);
parseExpected(20);
@@ -15001,12 +15491,12 @@ var ts;
return finishNode(node);
}
function parseTupleType() {
- var node = createNode(163);
+ var node = createNode(164);
node.elementTypes = parseBracketedList(20, parseType, 20, 21);
return finishNode(node);
}
function parseParenthesizedType() {
- var node = createNode(166);
+ var node = createNode(167);
parseExpected(18);
node.type = parseType();
parseExpected(19);
@@ -15014,7 +15504,7 @@ var ts;
}
function parseFunctionOrConstructorType(kind) {
var node = createNode(kind);
- if (kind === 159) {
+ if (kind === 160) {
parseExpected(93);
}
fillSignature(35, false, false, false, node);
@@ -15025,7 +15515,7 @@ var ts;
return token() === 22 ? undefined : node;
}
function parseLiteralTypeNode() {
- var node = createNode(171);
+ var node = createNode(172);
node.literal = parseSimpleUnaryExpression();
finishNode(node);
return node;
@@ -15036,12 +15526,13 @@ var ts;
function parseNonArrayType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
- case 137:
+ case 136:
+ case 138:
case 129:
+ case 133:
var node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
case 9:
@@ -15078,12 +15569,12 @@ var ts;
function isStartOfType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 98:
case 102:
@@ -15091,11 +15582,14 @@ var ts;
case 16:
case 20:
case 26:
+ case 48:
+ case 47:
case 93:
case 9:
case 8:
case 100:
case 85:
+ case 133:
return true;
case 37:
return lookAhead(nextTokenIsNumericLiteral);
@@ -15113,14 +15607,14 @@ var ts;
var type = parseNonArrayType();
while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) {
if (isStartOfType()) {
- var node = createNode(169, type.pos);
+ var node = createNode(170, type.pos);
node.objectType = type;
node.indexType = parseType();
parseExpected(21);
type = finishNode(node);
}
else {
- var node = createNode(162, type.pos);
+ var node = createNode(163, type.pos);
node.elementType = type;
parseExpected(21);
type = finishNode(node);
@@ -15129,7 +15623,7 @@ var ts;
return type;
}
function parseTypeOperator(operator) {
- var node = createNode(168);
+ var node = createNode(169);
parseExpected(operator);
node.operator = operator;
node.type = parseTypeOperatorOrHigher();
@@ -15143,6 +15637,7 @@ var ts;
return parseArrayTypeOrHigher();
}
function parseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ parseOptional(operator);
var type = parseConstituentType();
if (token() === operator) {
var types = createNodeArray([type], type.pos);
@@ -15157,10 +15652,10 @@ var ts;
return type;
}
function parseIntersectionTypeOrHigher() {
- return parseUnionOrIntersectionType(165, parseTypeOperatorOrHigher, 47);
+ return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47);
}
function parseUnionTypeOrHigher() {
- return parseUnionOrIntersectionType(164, parseIntersectionTypeOrHigher, 48);
+ return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48);
}
function isStartOfFunctionType() {
if (token() === 26) {
@@ -15206,7 +15701,7 @@ var ts;
var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
var type = parseType();
if (typePredicateVariable) {
- var node = createNode(156, typePredicateVariable.pos);
+ var node = createNode(157, typePredicateVariable.pos);
node.parameterName = typePredicateVariable;
node.type = type;
return finishNode(node);
@@ -15223,14 +15718,14 @@ var ts;
}
}
function parseType() {
- return doOutsideOfContext(655360, parseTypeWorker);
+ return doOutsideOfContext(20480, parseTypeWorker);
}
function parseTypeWorker() {
if (isStartOfFunctionType()) {
- return parseFunctionOrConstructorType(158);
+ return parseFunctionOrConstructorType(159);
}
if (token() === 93) {
- return parseFunctionOrConstructorType(159);
+ return parseFunctionOrConstructorType(160);
}
return parseUnionTypeOrHigher();
}
@@ -15349,7 +15844,7 @@ var ts;
return !scanner.hasPrecedingLineBreak() && isIdentifier();
}
function parseYieldExpression() {
- var node = createNode(195);
+ var node = createNode(196);
nextToken();
if (!scanner.hasPrecedingLineBreak() &&
(token() === 38 || isStartOfExpression())) {
@@ -15365,13 +15860,13 @@ var ts;
ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
var node;
if (asyncModifier) {
- node = createNode(185, asyncModifier.pos);
+ node = createNode(186, asyncModifier.pos);
node.modifiers = asyncModifier;
}
else {
- node = createNode(185, identifier.pos);
+ node = createNode(186, identifier.pos);
}
- var parameter = createNode(144, identifier.pos);
+ var parameter = createNode(145, identifier.pos);
parameter.name = identifier;
finishNode(parameter);
node.parameters = createNodeArray([parameter], parameter.pos);
@@ -15505,7 +16000,7 @@ var ts;
return 0;
}
function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
- var node = createNode(185);
+ var node = createNode(186);
node.modifiers = parseModifiersForArrowFunction();
var isAsync = !!(ts.getModifierFlags(node) & 256);
fillSignature(55, false, isAsync, !allowAmbiguity, node);
@@ -15537,7 +16032,7 @@ var ts;
if (!questionToken) {
return leftOperand;
}
- var node = createNode(193, leftOperand.pos);
+ var node = createNode(194, leftOperand.pos);
node.condition = leftOperand;
node.questionToken = questionToken;
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
@@ -15550,7 +16045,7 @@ var ts;
return parseBinaryExpressionRest(precedence, leftOperand);
}
function isInOrOfKeyword(t) {
- return t === 91 || t === 140;
+ return t === 91 || t === 141;
}
function parseBinaryExpressionRest(precedence, leftOperand) {
while (true) {
@@ -15628,39 +16123,39 @@ var ts;
return -1;
}
function makeBinaryExpression(left, operatorToken, right) {
- var node = createNode(192, left.pos);
+ var node = createNode(193, left.pos);
node.left = left;
node.operatorToken = operatorToken;
node.right = right;
return finishNode(node);
}
function makeAsExpression(left, right) {
- var node = createNode(200, left.pos);
+ var node = createNode(201, left.pos);
node.expression = left;
node.type = right;
return finishNode(node);
}
function parsePrefixUnaryExpression() {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseDeleteExpression() {
- var node = createNode(186);
+ var node = createNode(187);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseTypeOfExpression() {
- var node = createNode(187);
+ var node = createNode(188);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseVoidExpression() {
- var node = createNode(188);
+ var node = createNode(189);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -15675,7 +16170,7 @@ var ts;
return false;
}
function parseAwaitExpression() {
- var node = createNode(189);
+ var node = createNode(190);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -15691,7 +16186,7 @@ var ts;
var simpleUnaryExpression = parseSimpleUnaryExpression();
if (token() === 39) {
var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
- if (simpleUnaryExpression.kind === 182) {
+ if (simpleUnaryExpression.kind === 183) {
parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
}
else {
@@ -15744,7 +16239,7 @@ var ts;
}
function parseIncrementExpression() {
if (token() === 42 || token() === 43) {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseLeftHandSideExpressionOrHigher();
@@ -15756,7 +16251,7 @@ var ts;
var expression = parseLeftHandSideExpressionOrHigher();
ts.Debug.assert(ts.isLeftHandSideExpression(expression));
if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) {
- var node = createNode(191, expression.pos);
+ var node = createNode(192, expression.pos);
node.operand = expression;
node.operator = token();
nextToken();
@@ -15779,7 +16274,7 @@ var ts;
if (token() === 18 || token() === 22 || token() === 20) {
return expression;
}
- var node = createNode(177, expression.pos);
+ var node = createNode(178, expression.pos);
node.expression = expression;
parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
node.name = parseRightSideOfDot(true);
@@ -15801,8 +16296,8 @@ var ts;
function parseJsxElementOrSelfClosingElement(inExpressionContext) {
var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
var result;
- if (opening.kind === 248) {
- var node = createNode(246, opening.pos);
+ if (opening.kind === 250) {
+ var node = createNode(248, opening.pos);
node.openingElement = opening;
node.children = parseJsxChildren(node.openingElement.tagName);
node.closingElement = parseJsxClosingElement(inExpressionContext);
@@ -15812,14 +16307,14 @@ var ts;
result = finishNode(node);
}
else {
- ts.Debug.assert(opening.kind === 247);
+ ts.Debug.assert(opening.kind === 249);
result = opening;
}
if (inExpressionContext && token() === 26) {
var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); });
if (invalidElement) {
parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element);
- var badNode = createNode(192, result.pos);
+ var badNode = createNode(193, result.pos);
badNode.end = invalidElement.end;
badNode.left = result;
badNode.right = invalidElement;
@@ -15859,20 +16354,28 @@ var ts;
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName));
break;
}
+ else if (token() === 7) {
+ break;
+ }
result.push(parseJsxChild());
}
result.end = scanner.getTokenPos();
parsingContext = saveParsingContext;
return result;
}
+ function parseJsxAttributes() {
+ var jsxAttributes = createNode(253);
+ jsxAttributes.properties = parseList(13, parseJsxAttribute);
+ return finishNode(jsxAttributes);
+ }
function parseJsxOpeningOrSelfClosingElement(inExpressionContext) {
var fullStart = scanner.getStartPos();
parseExpected(26);
var tagName = parseJsxElementName();
- var attributes = parseList(13, parseJsxAttribute);
+ var attributes = parseJsxAttributes();
var node;
if (token() === 28) {
- node = createNode(248, fullStart);
+ node = createNode(250, fullStart);
scanJsxText();
}
else {
@@ -15884,7 +16387,7 @@ var ts;
parseExpected(28, undefined, false);
scanJsxText();
}
- node = createNode(247, fullStart);
+ node = createNode(249, fullStart);
}
node.tagName = tagName;
node.attributes = attributes;
@@ -15895,7 +16398,7 @@ var ts;
var expression = token() === 98 ?
parseTokenNode() : parseIdentifierName();
while (parseOptional(22)) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -15903,9 +16406,10 @@ var ts;
return expression;
}
function parseJsxExpression(inExpressionContext) {
- var node = createNode(252);
+ var node = createNode(255);
parseExpected(16);
if (token() !== 17) {
+ node.dotDotDotToken = parseOptionalToken(23);
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
@@ -15922,7 +16426,7 @@ var ts;
return parseJsxSpreadAttribute();
}
scanJsxIdentifier();
- var node = createNode(250);
+ var node = createNode(252);
node.name = parseIdentifierName();
if (token() === 57) {
switch (scanJsxAttributeValue()) {
@@ -15937,7 +16441,7 @@ var ts;
return finishNode(node);
}
function parseJsxSpreadAttribute() {
- var node = createNode(251);
+ var node = createNode(254);
parseExpected(16);
parseExpected(23);
node.expression = parseExpression();
@@ -15945,7 +16449,7 @@ var ts;
return finishNode(node);
}
function parseJsxClosingElement(inExpressionContext) {
- var node = createNode(249);
+ var node = createNode(251);
parseExpected(27);
node.tagName = parseJsxElementName();
if (inExpressionContext) {
@@ -15958,7 +16462,7 @@ var ts;
return finishNode(node);
}
function parseTypeAssertion() {
- var node = createNode(182);
+ var node = createNode(183);
parseExpected(26);
node.type = parseType();
parseExpected(28);
@@ -15969,7 +16473,7 @@ var ts;
while (true) {
var dotToken = parseOptionalToken(22);
if (dotToken) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -15977,13 +16481,13 @@ var ts;
}
if (token() === 50 && !scanner.hasPrecedingLineBreak()) {
nextToken();
- var nonNullExpression = createNode(201, expression.pos);
+ var nonNullExpression = createNode(202, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
if (!inDecoratorContext() && parseOptional(20)) {
- var indexedAccess = createNode(178, expression.pos);
+ var indexedAccess = createNode(179, expression.pos);
indexedAccess.expression = expression;
if (token() !== 21) {
indexedAccess.argumentExpression = allowInAnd(parseExpression);
@@ -15997,7 +16501,7 @@ var ts;
continue;
}
if (token() === 12 || token() === 13) {
- var tagExpression = createNode(181, expression.pos);
+ var tagExpression = createNode(182, expression.pos);
tagExpression.tag = expression;
tagExpression.template = token() === 12
? parseLiteralNode()
@@ -16016,7 +16520,7 @@ var ts;
if (!typeArguments) {
return expression;
}
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.typeArguments = typeArguments;
callExpr.arguments = parseArgumentList();
@@ -16024,7 +16528,7 @@ var ts;
continue;
}
else if (token() === 18) {
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.arguments = parseArgumentList();
expression = finishNode(callExpr);
@@ -16119,28 +16623,28 @@ var ts;
return parseIdentifier(ts.Diagnostics.Expression_expected);
}
function parseParenthesizedExpression() {
- var node = createNode(183);
+ var node = createNode(184);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
return finishNode(node);
}
function parseSpreadElement() {
- var node = createNode(196);
+ var node = createNode(197);
parseExpected(23);
node.expression = parseAssignmentExpressionOrHigher();
return finishNode(node);
}
function parseArgumentOrArrayLiteralElement() {
return token() === 23 ? parseSpreadElement() :
- token() === 25 ? createNode(198) :
+ token() === 25 ? createNode(199) :
parseAssignmentExpressionOrHigher();
}
function parseArgumentExpression() {
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
}
function parseArrayLiteralExpression() {
- var node = createNode(175);
+ var node = createNode(176);
parseExpected(20);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16151,18 +16655,18 @@ var ts;
}
function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
if (parseContextualModifier(124)) {
- return parseAccessorDeclaration(151, fullStart, decorators, modifiers);
- }
- else if (parseContextualModifier(133)) {
return parseAccessorDeclaration(152, fullStart, decorators, modifiers);
}
+ else if (parseContextualModifier(134)) {
+ return parseAccessorDeclaration(153, fullStart, decorators, modifiers);
+ }
return undefined;
}
function parseObjectLiteralElement() {
var fullStart = scanner.getStartPos();
var dotDotDotToken = parseOptionalToken(23);
if (dotDotDotToken) {
- var spreadElement = createNode(259, fullStart);
+ var spreadElement = createNode(262, fullStart);
spreadElement.expression = parseAssignmentExpressionOrHigher();
return addJSDocComment(finishNode(spreadElement));
}
@@ -16181,7 +16685,7 @@ var ts;
}
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57);
if (isShorthandPropertyAssignment) {
- var shorthandDeclaration = createNode(258, fullStart);
+ var shorthandDeclaration = createNode(261, fullStart);
shorthandDeclaration.name = propertyName;
shorthandDeclaration.questionToken = questionToken;
var equalsToken = parseOptionalToken(57);
@@ -16192,7 +16696,7 @@ var ts;
return addJSDocComment(finishNode(shorthandDeclaration));
}
else {
- var propertyAssignment = createNode(257, fullStart);
+ var propertyAssignment = createNode(260, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
@@ -16202,7 +16706,7 @@ var ts;
}
}
function parseObjectLiteralExpression() {
- var node = createNode(176);
+ var node = createNode(177);
parseExpected(16);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16216,7 +16720,7 @@ var ts;
if (saveDecoratorContext) {
setDecoratorContext(false);
}
- var node = createNode(184);
+ var node = createNode(185);
node.modifiers = parseModifiers();
parseExpected(88);
node.asteriskToken = parseOptionalToken(38);
@@ -16238,8 +16742,15 @@ var ts;
return isIdentifier() ? parseIdentifier() : undefined;
}
function parseNewExpression() {
- var node = createNode(180);
+ var fullStart = scanner.getStartPos();
parseExpected(93);
+ if (parseOptional(22)) {
+ var node_1 = createNode(203, fullStart);
+ node_1.keywordToken = 93;
+ node_1.name = parseIdentifierName();
+ return finishNode(node_1);
+ }
+ var node = createNode(181, fullStart);
node.expression = parseMemberExpressionOrHigher();
node.typeArguments = tryParse(parseTypeArgumentsInExpression);
if (node.typeArguments || token() === 18) {
@@ -16248,7 +16759,7 @@ var ts;
return finishNode(node);
}
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
- var node = createNode(204);
+ var node = createNode(206);
if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) {
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16279,12 +16790,12 @@ var ts;
return block;
}
function parseEmptyStatement() {
- var node = createNode(206);
+ var node = createNode(208);
parseExpected(24);
return finishNode(node);
}
function parseIfStatement() {
- var node = createNode(208);
+ var node = createNode(210);
parseExpected(89);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16294,7 +16805,7 @@ var ts;
return finishNode(node);
}
function parseDoStatement() {
- var node = createNode(209);
+ var node = createNode(211);
parseExpected(80);
node.statement = parseStatement();
parseExpected(105);
@@ -16305,7 +16816,7 @@ var ts;
return finishNode(node);
}
function parseWhileStatement() {
- var node = createNode(210);
+ var node = createNode(212);
parseExpected(105);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16316,6 +16827,7 @@ var ts;
function parseForOrForInOrForOfStatement() {
var pos = getNodePos();
parseExpected(87);
+ var awaitToken = parseOptionalToken(120);
parseExpected(18);
var initializer = undefined;
if (token() !== 24) {
@@ -16327,22 +16839,23 @@ var ts;
}
}
var forOrForInOrForOfStatement;
- if (parseOptional(91)) {
- var forInStatement = createNode(212, pos);
- forInStatement.initializer = initializer;
- forInStatement.expression = allowInAnd(parseExpression);
- parseExpected(19);
- forOrForInOrForOfStatement = forInStatement;
- }
- else if (parseOptional(140)) {
- var forOfStatement = createNode(213, pos);
+ if (awaitToken ? parseExpected(141) : parseOptional(141)) {
+ var forOfStatement = createNode(215, pos);
+ forOfStatement.awaitModifier = awaitToken;
forOfStatement.initializer = initializer;
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
parseExpected(19);
forOrForInOrForOfStatement = forOfStatement;
}
+ else if (parseOptional(91)) {
+ var forInStatement = createNode(214, pos);
+ forInStatement.initializer = initializer;
+ forInStatement.expression = allowInAnd(parseExpression);
+ parseExpected(19);
+ forOrForInOrForOfStatement = forInStatement;
+ }
else {
- var forStatement = createNode(211, pos);
+ var forStatement = createNode(213, pos);
forStatement.initializer = initializer;
parseExpected(24);
if (token() !== 24 && token() !== 19) {
@@ -16360,7 +16873,7 @@ var ts;
}
function parseBreakOrContinueStatement(kind) {
var node = createNode(kind);
- parseExpected(kind === 215 ? 71 : 76);
+ parseExpected(kind === 217 ? 71 : 76);
if (!canParseSemicolon()) {
node.label = parseIdentifier();
}
@@ -16368,7 +16881,7 @@ var ts;
return finishNode(node);
}
function parseReturnStatement() {
- var node = createNode(216);
+ var node = createNode(218);
parseExpected(95);
if (!canParseSemicolon()) {
node.expression = allowInAnd(parseExpression);
@@ -16377,7 +16890,7 @@ var ts;
return finishNode(node);
}
function parseWithStatement() {
- var node = createNode(217);
+ var node = createNode(219);
parseExpected(106);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16386,7 +16899,7 @@ var ts;
return finishNode(node);
}
function parseCaseClause() {
- var node = createNode(253);
+ var node = createNode(256);
parseExpected(72);
node.expression = allowInAnd(parseExpression);
parseExpected(55);
@@ -16394,7 +16907,7 @@ var ts;
return finishNode(node);
}
function parseDefaultClause() {
- var node = createNode(254);
+ var node = createNode(257);
parseExpected(78);
parseExpected(55);
node.statements = parseList(3, parseStatement);
@@ -16404,12 +16917,12 @@ var ts;
return token() === 72 ? parseCaseClause() : parseDefaultClause();
}
function parseSwitchStatement() {
- var node = createNode(218);
+ var node = createNode(220);
parseExpected(97);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
- var caseBlock = createNode(232, scanner.getStartPos());
+ var caseBlock = createNode(234, scanner.getStartPos());
parseExpected(16);
caseBlock.clauses = parseList(2, parseCaseOrDefaultClause);
parseExpected(17);
@@ -16417,14 +16930,14 @@ var ts;
return finishNode(node);
}
function parseThrowStatement() {
- var node = createNode(220);
+ var node = createNode(222);
parseExpected(99);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
parseSemicolon();
return finishNode(node);
}
function parseTryStatement() {
- var node = createNode(221);
+ var node = createNode(223);
parseExpected(101);
node.tryBlock = parseBlock(false);
node.catchClause = token() === 73 ? parseCatchClause() : undefined;
@@ -16435,7 +16948,7 @@ var ts;
return finishNode(node);
}
function parseCatchClause() {
- var result = createNode(256);
+ var result = createNode(259);
parseExpected(73);
if (parseExpected(18)) {
result.variableDeclaration = parseVariableDeclaration();
@@ -16445,7 +16958,7 @@ var ts;
return finishNode(result);
}
function parseDebuggerStatement() {
- var node = createNode(222);
+ var node = createNode(224);
parseExpected(77);
parseSemicolon();
return finishNode(node);
@@ -16454,13 +16967,13 @@ var ts;
var fullStart = scanner.getStartPos();
var expression = allowInAnd(parseExpression);
if (expression.kind === 70 && parseOptional(55)) {
- var labeledStatement = createNode(219, fullStart);
+ var labeledStatement = createNode(221, fullStart);
labeledStatement.label = expression;
labeledStatement.statement = parseStatement();
return addJSDocComment(finishNode(labeledStatement));
}
else {
- var expressionStatement = createNode(207, fullStart);
+ var expressionStatement = createNode(209, fullStart);
expressionStatement.expression = expression;
parseSemicolon();
return addJSDocComment(finishNode(expressionStatement));
@@ -16470,6 +16983,10 @@ var ts;
nextToken();
return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak();
}
+ function nextTokenIsClassKeywordOnSameLine() {
+ nextToken();
+ return token() === 74 && !scanner.hasPrecedingLineBreak();
+ }
function nextTokenIsFunctionKeywordOnSameLine() {
nextToken();
return token() === 88 && !scanner.hasPrecedingLineBreak();
@@ -16489,7 +17006,7 @@ var ts;
case 82:
return true;
case 108:
- case 136:
+ case 137:
return nextTokenIsIdentifierOnSameLine();
case 127:
case 128:
@@ -16506,7 +17023,7 @@ var ts;
return false;
}
continue;
- case 139:
+ case 140:
nextToken();
return token() === 16 || token() === 70 || token() === 83;
case 90:
@@ -16566,8 +17083,8 @@ var ts;
case 108:
case 127:
case 128:
- case 136:
- case 139:
+ case 137:
+ case 140:
return true;
case 113:
case 111:
@@ -16612,9 +17129,9 @@ var ts;
case 87:
return parseForOrForInOrForOfStatement();
case 76:
- return parseBreakOrContinueStatement(214);
+ return parseBreakOrContinueStatement(216);
case 71:
- return parseBreakOrContinueStatement(215);
+ return parseBreakOrContinueStatement(217);
case 95:
return parseReturnStatement();
case 106:
@@ -16633,7 +17150,7 @@ var ts;
return parseDeclaration();
case 119:
case 108:
- case 136:
+ case 137:
case 127:
case 128:
case 123:
@@ -16647,7 +17164,7 @@ var ts;
case 116:
case 114:
case 130:
- case 139:
+ case 140:
if (isStartOfDeclaration()) {
return parseDeclaration();
}
@@ -16670,11 +17187,11 @@ var ts;
return parseClassDeclaration(fullStart, decorators, modifiers);
case 108:
return parseInterfaceDeclaration(fullStart, decorators, modifiers);
- case 136:
+ case 137:
return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
case 82:
return parseEnumDeclaration(fullStart, decorators, modifiers);
- case 139:
+ case 140:
case 127:
case 128:
return parseModuleDeclaration(fullStart, decorators, modifiers);
@@ -16693,7 +17210,7 @@ var ts;
}
default:
if (decorators || modifiers) {
- var node = createMissingNode(244, true, ts.Diagnostics.Declaration_expected);
+ var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected);
node.pos = fullStart;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -16714,16 +17231,16 @@ var ts;
}
function parseArrayBindingElement() {
if (token() === 25) {
- return createNode(198);
+ return createNode(199);
}
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
node.name = parseIdentifierOrPattern();
node.initializer = parseBindingElementInitializer(false);
return finishNode(node);
}
function parseObjectBindingElement() {
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
var tokenIsIdentifier = isIdentifier();
var propertyName = parsePropertyName();
@@ -16739,14 +17256,14 @@ var ts;
return finishNode(node);
}
function parseObjectBindingPattern() {
- var node = createNode(172);
+ var node = createNode(173);
parseExpected(16);
node.elements = parseDelimitedList(9, parseObjectBindingElement);
parseExpected(17);
return finishNode(node);
}
function parseArrayBindingPattern() {
- var node = createNode(173);
+ var node = createNode(174);
parseExpected(20);
node.elements = parseDelimitedList(10, parseArrayBindingElement);
parseExpected(21);
@@ -16765,7 +17282,7 @@ var ts;
return parseIdentifier();
}
function parseVariableDeclaration() {
- var node = createNode(223);
+ var node = createNode(225);
node.name = parseIdentifierOrPattern();
node.type = parseTypeAnnotation();
if (!isInOrOfKeyword(token())) {
@@ -16774,7 +17291,7 @@ var ts;
return finishNode(node);
}
function parseVariableDeclarationList(inForStatementInitializer) {
- var node = createNode(224);
+ var node = createNode(226);
switch (token()) {
case 103:
break;
@@ -16788,7 +17305,7 @@ var ts;
ts.Debug.fail();
}
nextToken();
- if (token() === 140 && lookAhead(canFollowContextualOfKeyword)) {
+ if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) {
node.declarations = createMissingList();
}
else {
@@ -16803,7 +17320,7 @@ var ts;
return nextTokenIsIdentifier() && nextToken() === 19;
}
function parseVariableStatement(fullStart, decorators, modifiers) {
- var node = createNode(205, fullStart);
+ var node = createNode(207, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.declarationList = parseVariableDeclarationList(false);
@@ -16811,7 +17328,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseFunctionDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(225, fullStart);
+ var node = createNode(227, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(88);
@@ -16824,7 +17341,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseConstructorDeclaration(pos, decorators, modifiers) {
- var node = createNode(150, pos);
+ var node = createNode(151, pos);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(122);
@@ -16833,7 +17350,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
- var method = createNode(149, fullStart);
+ var method = createNode(150, fullStart);
method.decorators = decorators;
method.modifiers = modifiers;
method.asteriskToken = asteriskToken;
@@ -16846,7 +17363,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
- var property = createNode(147, fullStart);
+ var property = createNode(148, fullStart);
property.decorators = decorators;
property.modifiers = modifiers;
property.name = name;
@@ -16854,7 +17371,7 @@ var ts;
property.type = parseTypeAnnotation();
property.initializer = ts.hasModifier(property, 32)
? allowInAnd(parseNonParameterInitializer)
- : doOutsideOfContext(131072 | 65536, parseNonParameterInitializer);
+ : doOutsideOfContext(4096 | 2048, parseNonParameterInitializer);
parseSemicolon();
return addJSDocComment(finishNode(property));
}
@@ -16916,7 +17433,7 @@ var ts;
return true;
}
if (idToken !== undefined) {
- if (!ts.isKeyword(idToken) || idToken === 133 || idToken === 124) {
+ if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) {
return true;
}
switch (token()) {
@@ -16939,7 +17456,7 @@ var ts;
if (!parseOptional(56)) {
break;
}
- var decorator = createNode(145, decoratorStart);
+ var decorator = createNode(146, decoratorStart);
decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
finishNode(decorator);
if (!decorators) {
@@ -16996,7 +17513,7 @@ var ts;
}
function parseClassElement() {
if (token() === 24) {
- var result = createNode(203);
+ var result = createNode(205);
nextToken();
return finishNode(result);
}
@@ -17021,16 +17538,16 @@ var ts;
return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers);
}
if (decorators || modifiers) {
- var name_15 = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
- return parsePropertyDeclaration(fullStart, decorators, modifiers, name_15, undefined);
+ var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
+ return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined);
}
ts.Debug.fail("Should not have attempted to parse class member declaration.");
}
function parseClassExpression() {
- return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 197);
+ return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198);
}
function parseClassDeclaration(fullStart, decorators, modifiers) {
- return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 226);
+ return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228);
}
function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
var node = createNode(kind, fullStart);
@@ -17064,9 +17581,10 @@ var ts;
return undefined;
}
function parseHeritageClause() {
- if (token() === 84 || token() === 107) {
- var node = createNode(255);
- node.token = token();
+ var tok = token();
+ if (tok === 84 || tok === 107) {
+ var node = createNode(258);
+ node.token = tok;
nextToken();
node.types = parseDelimitedList(7, parseExpressionWithTypeArguments);
return finishNode(node);
@@ -17074,7 +17592,7 @@ var ts;
return undefined;
}
function parseExpressionWithTypeArguments() {
- var node = createNode(199);
+ var node = createNode(200);
node.expression = parseLeftHandSideExpressionOrHigher();
if (token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
@@ -17088,7 +17606,7 @@ var ts;
return parseList(5, parseClassElement);
}
function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(227, fullStart);
+ var node = createNode(229, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(108);
@@ -17099,10 +17617,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(228, fullStart);
+ var node = createNode(230, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- parseExpected(136);
+ parseExpected(137);
node.name = parseIdentifier();
node.typeParameters = parseTypeParameters();
parseExpected(57);
@@ -17111,13 +17629,13 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseEnumMember() {
- var node = createNode(260, scanner.getStartPos());
+ var node = createNode(263, scanner.getStartPos());
node.name = parsePropertyName();
node.initializer = allowInAnd(parseNonParameterInitializer);
return addJSDocComment(finishNode(node));
}
function parseEnumDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(229, fullStart);
+ var node = createNode(231, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(82);
@@ -17132,7 +17650,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseModuleBlock() {
- var node = createNode(231, scanner.getStartPos());
+ var node = createNode(233, scanner.getStartPos());
if (parseExpected(16)) {
node.statements = parseList(1, parseStatement);
parseExpected(17);
@@ -17143,7 +17661,7 @@ var ts;
return finishNode(node);
}
function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
var namespaceFlag = flags & 16;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -17155,10 +17673,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- if (token() === 139) {
+ if (token() === 140) {
node.name = parseIdentifier();
node.flags |= 512;
}
@@ -17175,7 +17693,7 @@ var ts;
}
function parseModuleDeclaration(fullStart, decorators, modifiers) {
var flags = 0;
- if (token() === 139) {
+ if (token() === 140) {
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
}
else if (parseOptional(128)) {
@@ -17200,7 +17718,7 @@ var ts;
return nextToken() === 40;
}
function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) {
- var exportDeclaration = createNode(233, fullStart);
+ var exportDeclaration = createNode(235, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(117);
@@ -17215,38 +17733,41 @@ var ts;
var identifier;
if (isIdentifier()) {
identifier = parseIdentifier();
- if (token() !== 25 && token() !== 138) {
- var importEqualsDeclaration = createNode(234, fullStart);
- importEqualsDeclaration.decorators = decorators;
- importEqualsDeclaration.modifiers = modifiers;
- importEqualsDeclaration.name = identifier;
- parseExpected(57);
- importEqualsDeclaration.moduleReference = parseModuleReference();
- parseSemicolon();
- return addJSDocComment(finishNode(importEqualsDeclaration));
- }
- }
- var importDeclaration = createNode(235, fullStart);
+ if (token() !== 25 && token() !== 139) {
+ return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier);
+ }
+ }
+ var importDeclaration = createNode(237, fullStart);
importDeclaration.decorators = decorators;
importDeclaration.modifiers = modifiers;
if (identifier ||
token() === 38 ||
token() === 16) {
importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
- parseExpected(138);
+ parseExpected(139);
}
importDeclaration.moduleSpecifier = parseModuleSpecifier();
parseSemicolon();
return finishNode(importDeclaration);
}
+ function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) {
+ var importEqualsDeclaration = createNode(236, fullStart);
+ importEqualsDeclaration.decorators = decorators;
+ importEqualsDeclaration.modifiers = modifiers;
+ importEqualsDeclaration.name = identifier;
+ parseExpected(57);
+ importEqualsDeclaration.moduleReference = parseModuleReference();
+ parseSemicolon();
+ return addJSDocComment(finishNode(importEqualsDeclaration));
+ }
function parseImportClause(identifier, fullStart) {
- var importClause = createNode(236, fullStart);
+ var importClause = createNode(238, fullStart);
if (identifier) {
importClause.name = identifier;
}
if (!importClause.name ||
parseOptional(25)) {
- importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(238);
+ importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240);
}
return finishNode(importClause);
}
@@ -17256,7 +17777,7 @@ var ts;
: parseEntityName(false);
}
function parseExternalModuleReference() {
- var node = createNode(245);
+ var node = createNode(247);
parseExpected(131);
parseExpected(18);
node.expression = parseModuleSpecifier();
@@ -17274,7 +17795,7 @@ var ts;
}
}
function parseNamespaceImport() {
- var namespaceImport = createNode(237);
+ var namespaceImport = createNode(239);
parseExpected(38);
parseExpected(117);
namespaceImport.name = parseIdentifier();
@@ -17282,14 +17803,14 @@ var ts;
}
function parseNamedImportsOrExports(kind) {
var node = createNode(kind);
- node.elements = parseBracketedList(22, kind === 238 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
+ node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
return finishNode(node);
}
function parseExportSpecifier() {
- return parseImportOrExportSpecifier(243);
+ return parseImportOrExportSpecifier(245);
}
function parseImportSpecifier() {
- return parseImportOrExportSpecifier(239);
+ return parseImportOrExportSpecifier(241);
}
function parseImportOrExportSpecifier(kind) {
var node = createNode(kind);
@@ -17308,23 +17829,23 @@ var ts;
else {
node.name = identifierName;
}
- if (kind === 239 && checkIdentifierIsKeyword) {
+ if (kind === 241 && checkIdentifierIsKeyword) {
parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
}
return finishNode(node);
}
function parseExportDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(241, fullStart);
+ var node = createNode(243, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(38)) {
- parseExpected(138);
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
else {
- node.exportClause = parseNamedImportsOrExports(242);
- if (token() === 138 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
- parseExpected(138);
+ node.exportClause = parseNamedImportsOrExports(244);
+ if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
}
@@ -17332,7 +17853,7 @@ var ts;
return finishNode(node);
}
function parseExportAssignment(fullStart, decorators, modifiers) {
- var node = createNode(240, fullStart);
+ var node = createNode(242, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(57)) {
@@ -17351,6 +17872,7 @@ var ts;
var typeReferenceDirectives = [];
var amdDependencies = [];
var amdModuleName;
+ var checkJsDirective = undefined;
while (true) {
var kind = triviaScanner.scan();
if (kind !== 2) {
@@ -17361,7 +17883,11 @@ var ts;
break;
}
}
- var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
+ var range = {
+ kind: triviaScanner.getToken(),
+ pos: triviaScanner.getTokenPos(),
+ end: triviaScanner.getTextPos(),
+ };
var comment = sourceText.substring(range.pos, range.end);
var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
if (referencePathMatchResult) {
@@ -17401,24 +17927,71 @@ var ts;
amdDependencies.push(amdDependency);
}
}
+ var checkJsDirectiveRegEx = /^\/\/\/?\s*(@ts-check|@ts-nocheck)\s*$/gim;
+ var checkJsDirectiveMatchResult = checkJsDirectiveRegEx.exec(comment);
+ if (checkJsDirectiveMatchResult) {
+ checkJsDirective = {
+ enabled: ts.compareStrings(checkJsDirectiveMatchResult[1], "@ts-check", true) === 0,
+ end: range.end,
+ pos: range.pos
+ };
+ }
}
}
sourceFile.referencedFiles = referencedFiles;
sourceFile.typeReferenceDirectives = typeReferenceDirectives;
sourceFile.amdDependencies = amdDependencies;
sourceFile.moduleName = amdModuleName;
+ sourceFile.checkJsDirective = checkJsDirective;
}
function setExternalModuleIndicator(sourceFile) {
sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
return ts.hasModifier(node, 1)
- || node.kind === 234 && node.moduleReference.kind === 245
- || node.kind === 235
- || node.kind === 240
- || node.kind === 241
+ || node.kind === 236 && node.moduleReference.kind === 247
+ || node.kind === 237
+ || node.kind === 242
+ || node.kind === 243
? node
: undefined;
});
}
+ var ParsingContext;
+ (function (ParsingContext) {
+ ParsingContext[ParsingContext["SourceElements"] = 0] = "SourceElements";
+ ParsingContext[ParsingContext["BlockStatements"] = 1] = "BlockStatements";
+ ParsingContext[ParsingContext["SwitchClauses"] = 2] = "SwitchClauses";
+ ParsingContext[ParsingContext["SwitchClauseStatements"] = 3] = "SwitchClauseStatements";
+ ParsingContext[ParsingContext["TypeMembers"] = 4] = "TypeMembers";
+ ParsingContext[ParsingContext["ClassMembers"] = 5] = "ClassMembers";
+ ParsingContext[ParsingContext["EnumMembers"] = 6] = "EnumMembers";
+ ParsingContext[ParsingContext["HeritageClauseElement"] = 7] = "HeritageClauseElement";
+ ParsingContext[ParsingContext["VariableDeclarations"] = 8] = "VariableDeclarations";
+ ParsingContext[ParsingContext["ObjectBindingElements"] = 9] = "ObjectBindingElements";
+ ParsingContext[ParsingContext["ArrayBindingElements"] = 10] = "ArrayBindingElements";
+ ParsingContext[ParsingContext["ArgumentExpressions"] = 11] = "ArgumentExpressions";
+ ParsingContext[ParsingContext["ObjectLiteralMembers"] = 12] = "ObjectLiteralMembers";
+ ParsingContext[ParsingContext["JsxAttributes"] = 13] = "JsxAttributes";
+ ParsingContext[ParsingContext["JsxChildren"] = 14] = "JsxChildren";
+ ParsingContext[ParsingContext["ArrayLiteralMembers"] = 15] = "ArrayLiteralMembers";
+ ParsingContext[ParsingContext["Parameters"] = 16] = "Parameters";
+ ParsingContext[ParsingContext["RestProperties"] = 17] = "RestProperties";
+ ParsingContext[ParsingContext["TypeParameters"] = 18] = "TypeParameters";
+ ParsingContext[ParsingContext["TypeArguments"] = 19] = "TypeArguments";
+ ParsingContext[ParsingContext["TupleElementTypes"] = 20] = "TupleElementTypes";
+ ParsingContext[ParsingContext["HeritageClauses"] = 21] = "HeritageClauses";
+ ParsingContext[ParsingContext["ImportOrExportSpecifiers"] = 22] = "ImportOrExportSpecifiers";
+ ParsingContext[ParsingContext["JSDocFunctionParameters"] = 23] = "JSDocFunctionParameters";
+ ParsingContext[ParsingContext["JSDocTypeArguments"] = 24] = "JSDocTypeArguments";
+ ParsingContext[ParsingContext["JSDocRecordMembers"] = 25] = "JSDocRecordMembers";
+ ParsingContext[ParsingContext["JSDocTupleTypes"] = 26] = "JSDocTupleTypes";
+ ParsingContext[ParsingContext["Count"] = 27] = "Count";
+ })(ParsingContext || (ParsingContext = {}));
+ var Tristate;
+ (function (Tristate) {
+ Tristate[Tristate["False"] = 0] = "False";
+ Tristate[Tristate["True"] = 1] = "True";
+ Tristate[Tristate["Unknown"] = 2] = "Unknown";
+ })(Tristate || (Tristate = {}));
var JSDocParser;
(function (JSDocParser) {
function isJSDocType() {
@@ -17450,7 +18023,7 @@ var ts;
}
JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests;
function parseJSDocTypeExpression() {
- var result = createNode(262, scanner.getTokenPos());
+ var result = createNode(266, scanner.getTokenPos());
parseExpected(16);
result.type = parseJSDocTopLevelType();
parseExpected(17);
@@ -17461,12 +18034,12 @@ var ts;
function parseJSDocTopLevelType() {
var type = parseJSDocType();
if (token() === 48) {
- var unionType = createNode(266, type.pos);
+ var unionType = createNode(270, type.pos);
unionType.types = parseJSDocTypeList(type);
type = finishNode(unionType);
}
if (token() === 57) {
- var optionalType = createNode(273, type.pos);
+ var optionalType = createNode(277, type.pos);
nextToken();
optionalType.type = type;
type = finishNode(optionalType);
@@ -17477,20 +18050,20 @@ var ts;
var type = parseBasicTypeExpression();
while (true) {
if (token() === 20) {
- var arrayType = createNode(265, type.pos);
+ var arrayType = createNode(269, type.pos);
arrayType.elementType = type;
nextToken();
parseExpected(21);
type = finishNode(arrayType);
}
else if (token() === 54) {
- var nullableType = createNode(268, type.pos);
+ var nullableType = createNode(272, type.pos);
nullableType.type = type;
nextToken();
type = finishNode(nullableType);
}
else if (token() === 50) {
- var nonNullableType = createNode(269, type.pos);
+ var nonNullableType = createNode(273, type.pos);
nonNullableType.type = type;
nextToken();
type = finishNode(nonNullableType);
@@ -17524,14 +18097,15 @@ var ts;
case 98:
return parseJSDocThisType();
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
case 94:
- case 137:
+ case 138:
case 129:
+ case 133:
return parseTokenNode();
case 9:
case 8:
@@ -17542,27 +18116,27 @@ var ts;
return parseJSDocTypeReference();
}
function parseJSDocThisType() {
- var result = createNode(277);
+ var result = createNode(281);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocConstructorType() {
- var result = createNode(276);
+ var result = createNode(280);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocVariadicType() {
- var result = createNode(275);
+ var result = createNode(279);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocFunctionType() {
- var result = createNode(274);
+ var result = createNode(278);
nextToken();
parseExpected(18);
result.parameters = parseDelimitedList(23, parseJSDocParameter);
@@ -17575,7 +18149,7 @@ var ts;
return finishNode(result);
}
function parseJSDocParameter() {
- var parameter = createNode(144);
+ var parameter = createNode(145);
parameter.type = parseJSDocType();
if (parseOptional(57)) {
parameter.questionToken = createNode(57);
@@ -17583,7 +18157,7 @@ var ts;
return finishNode(parameter);
}
function parseJSDocTypeReference() {
- var result = createNode(272);
+ var result = createNode(276);
result.name = parseSimplePropertyName();
if (token() === 26) {
result.typeArguments = parseTypeArguments();
@@ -17617,24 +18191,24 @@ var ts;
}
}
function parseQualifiedName(left) {
- var result = createNode(141, left.pos);
+ var result = createNode(142, left.pos);
result.left = left;
result.right = parseIdentifierName();
return finishNode(result);
}
function parseJSDocRecordType() {
- var result = createNode(270);
+ var result = createNode(274);
result.literal = parseTypeLiteral();
return finishNode(result);
}
function parseJSDocNonNullableType() {
- var result = createNode(269);
+ var result = createNode(273);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocTupleType() {
- var result = createNode(267);
+ var result = createNode(271);
nextToken();
result.types = parseDelimitedList(26, parseJSDocType);
checkForTrailingComma(result.types);
@@ -17648,7 +18222,7 @@ var ts;
}
}
function parseJSDocUnionType() {
- var result = createNode(266);
+ var result = createNode(270);
nextToken();
result.types = parseJSDocTypeList(parseJSDocType());
parseExpected(19);
@@ -17664,12 +18238,12 @@ var ts;
return types;
}
function parseJSDocAllType() {
- var result = createNode(263);
+ var result = createNode(267);
nextToken();
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(288);
+ var result = createNode(292);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -17682,11 +18256,11 @@ var ts;
token() === 28 ||
token() === 57 ||
token() === 48) {
- var result = createNode(264, pos);
+ var result = createNode(268, pos);
return finishNode(result);
}
else {
- var result = createNode(268, pos);
+ var result = createNode(272, pos);
result.type = parseJSDocType();
return finishNode(result);
}
@@ -17714,6 +18288,12 @@ var ts;
return comment;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
+ var JSDocState;
+ (function (JSDocState) {
+ JSDocState[JSDocState["BeginningOfLine"] = 0] = "BeginningOfLine";
+ JSDocState[JSDocState["SawAsterisk"] = 1] = "SawAsterisk";
+ JSDocState[JSDocState["SavingComments"] = 2] = "SavingComments";
+ })(JSDocState || (JSDocState = {}));
function parseJSDocCommentWorker(start, length) {
var content = sourceText;
start = start || 0;
@@ -17771,7 +18351,7 @@ var ts;
break;
case 38:
var asterisk = scanner.getTokenText();
- if (state === 1) {
+ if (state === 1 || state === 2) {
state = 2;
pushComment(asterisk);
}
@@ -17786,7 +18366,10 @@ var ts;
break;
case 5:
var whitespace = scanner.getTokenText();
- if (state === 2 || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === 2) {
+ comments.push(whitespace);
+ }
+ else if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent - 1));
}
indent += whitespace.length;
@@ -17794,6 +18377,7 @@ var ts;
case 1:
break;
default:
+ state = 2;
pushComment(scanner.getTokenText());
break;
}
@@ -17826,7 +18410,7 @@ var ts;
content.charCodeAt(start + 3) !== 42;
}
function createJSDocComment() {
- var result = createNode(278, start);
+ var result = createNode(282, start);
result.tags = tags;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
@@ -17883,7 +18467,7 @@ var ts;
}
function parseTagComments(indent) {
var comments = [];
- var state = 1;
+ var state = 0;
var margin;
function pushComment(text) {
if (!margin) {
@@ -17936,7 +18520,7 @@ var ts;
return comments;
}
function parseUnknownTag(atToken, tagName) {
- var result = createNode(279, atToken.pos);
+ var result = createNode(283, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
@@ -17991,7 +18575,7 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(281, atToken.pos);
+ var result = createNode(285, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
@@ -18002,20 +18586,20 @@ var ts;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 282; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 286; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(282, atToken.pos);
+ var result = createNode(286, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 283; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(283, atToken.pos);
+ var result = createNode(287, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
@@ -18030,7 +18614,7 @@ var ts;
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var result = createNode(286, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.name = name;
@@ -18039,7 +18623,7 @@ var ts;
}
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
- var result = createNode(280, atToken.pos);
+ var result = createNode(284, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = typeExpression;
@@ -18048,25 +18632,28 @@ var ts;
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(285, atToken.pos);
+ var typedefTag = createNode(289, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
- while (rightNode.kind !== 70) {
+ while (true) {
+ if (rightNode.kind === 70 || !rightNode.body) {
+ typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name;
+ break;
+ }
rightNode = rightNode.body;
}
- typedefTag.name = rightNode;
}
typedefTag.typeExpression = typeExpression;
skipWhitespace();
if (typeExpression) {
- if (typeExpression.type.kind === 272) {
+ if (typeExpression.type.kind === 276) {
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 70) {
- var name_16 = jsDocTypeReference.name;
- if (name_16.text === "Object") {
+ var name = jsDocTypeReference.name;
+ if (name.text === "Object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -18080,7 +18667,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(287, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(291, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -18110,6 +18697,7 @@ var ts;
break;
case 70:
canParseTag = false;
+ break;
case 1:
break;
}
@@ -18121,7 +18709,7 @@ var ts;
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(22)) {
- var jsDocNamespaceNode = createNode(230, pos);
+ var jsDocNamespaceNode = createNode(232, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
@@ -18165,19 +18753,19 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 284; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
while (true) {
- var name_17 = parseJSDocIdentifierName();
+ var name = parseJSDocIdentifierName();
skipWhitespace();
- if (!name_17) {
+ if (!name) {
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var typeParameter = createNode(143, name_17.pos);
- typeParameter.name = name_17;
+ var typeParameter = createNode(144, name.pos);
+ typeParameter.name = name;
finishNode(typeParameter);
typeParameters.push(typeParameter);
if (token() === 25) {
@@ -18188,7 +18776,7 @@ var ts;
break;
}
}
- var result = createNode(284, atToken.pos);
+ var result = createNode(288, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -18480,7 +19068,7 @@ var ts;
}
function visitArray(array) {
if (position >= array.pos && position < array.end) {
- for (var i = 0, n = array.length; i < n; i++) {
+ for (var i = 0; i < array.length; i++) {
var child = array[i];
if (child) {
if (child.pos === position) {
@@ -18502,21 +19090,31 @@ var ts;
}
}
}
+ var InvalidPosition;
+ (function (InvalidPosition) {
+ InvalidPosition[InvalidPosition["Value"] = -1] = "Value";
+ })(InvalidPosition || (InvalidPosition = {}));
})(IncrementalParser || (IncrementalParser = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ModuleInstanceState;
+ (function (ModuleInstanceState) {
+ ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated";
+ ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated";
+ ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly";
+ })(ModuleInstanceState = ts.ModuleInstanceState || (ts.ModuleInstanceState = {}));
function getModuleInstanceState(node) {
- if (node.kind === 227 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 230) {
return 0;
}
else if (ts.isConstEnumDeclaration(node)) {
return 2;
}
- else if ((node.kind === 235 || node.kind === 234) && !(ts.hasModifier(node, 1))) {
+ else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) {
return 0;
}
- else if (node.kind === 231) {
+ else if (node.kind === 233) {
var state_1 = 0;
ts.forEachChild(node, function (n) {
switch (getModuleInstanceState(n)) {
@@ -18532,7 +19130,7 @@ var ts;
});
return state_1;
}
- else if (node.kind === 230) {
+ else if (node.kind === 232) {
var body = node.body;
return body ? getModuleInstanceState(body) : 1;
}
@@ -18544,6 +19142,18 @@ var ts;
}
}
ts.getModuleInstanceState = getModuleInstanceState;
+ var ContainerFlags;
+ (function (ContainerFlags) {
+ ContainerFlags[ContainerFlags["None"] = 0] = "None";
+ ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer";
+ ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer";
+ ContainerFlags[ContainerFlags["IsControlFlowContainer"] = 4] = "IsControlFlowContainer";
+ ContainerFlags[ContainerFlags["IsFunctionLike"] = 8] = "IsFunctionLike";
+ ContainerFlags[ContainerFlags["IsFunctionExpression"] = 16] = "IsFunctionExpression";
+ ContainerFlags[ContainerFlags["HasLocals"] = 32] = "HasLocals";
+ ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface";
+ ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod";
+ })(ContainerFlags || (ContainerFlags = {}));
var binder = createBinder();
function bindSourceFile(file, options) {
ts.performance.mark("beforeBind");
@@ -18614,7 +19224,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if (opts.alwaysStrict && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
return true;
}
else {
@@ -18641,7 +19251,7 @@ var ts;
if (symbolFlags & 107455) {
var valueDeclaration = symbol.valueDeclaration;
if (!valueDeclaration ||
- (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 230)) {
+ (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) {
symbol.valueDeclaration = node;
}
}
@@ -18651,7 +19261,7 @@ var ts;
if (ts.isAmbientModule(node)) {
return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
var nameExpression = node.name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -18662,46 +19272,47 @@ var ts;
return node.name.text;
}
switch (node.kind) {
- case 150:
+ case 151:
return "__constructor";
- case 158:
- case 153:
- return "__call";
case 159:
case 154:
- return "__new";
+ return "__call";
+ case 160:
case 155:
+ return "__new";
+ case 156:
return "__index";
- case 241:
+ case 243:
return "__export";
- case 240:
+ case 242:
return node.isExportEquals ? "export=" : "default";
- case 192:
+ case 193:
switch (ts.getSpecialPropertyAssignmentKind(node)) {
case 2:
return "export=";
case 1:
case 4:
+ case 5:
return node.left.name.text;
case 3:
return node.left.expression.name.text;
}
ts.Debug.fail("Unknown binary declaration kind");
break;
- case 225:
- case 226:
+ case 227:
+ case 228:
return ts.hasModifier(node, 512) ? "default" : undefined;
- case 274:
+ case 278:
return ts.isJSDocConstructSignature(node) ? "__new" : "__call";
- case 144:
- ts.Debug.assert(node.parent.kind === 274);
+ case 145:
+ ts.Debug.assert(node.parent.kind === 278);
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 285:
+ case 289:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
- if (parentNode && parentNode.kind === 205) {
+ if (parentNode && parentNode.kind === 207) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70) {
@@ -18724,13 +19335,16 @@ var ts;
symbol = createSymbol(0, "__missing");
}
else {
- symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0, name));
+ symbol = symbolTable.get(name);
+ if (!symbol) {
+ symbolTable.set(name, symbol = createSymbol(0, name));
+ }
if (name && (includes & 788448)) {
- classifiableNames[name] = name;
+ classifiableNames.set(name, name);
}
if (symbol.flags & excludes) {
if (symbol.isReplaceableByMethod) {
- symbol = symbolTable[name] = createSymbol(0, name);
+ symbolTable.set(name, symbol = createSymbol(0, name));
}
else {
if (node.name) {
@@ -18745,7 +19359,7 @@ var ts;
}
else {
if (symbol.declarations && symbol.declarations.length &&
- (isDefaultExport || (node.kind === 240 && !node.isExportEquals))) {
+ (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) {
message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
}
}
@@ -18765,7 +19379,7 @@ var ts;
function declareModuleMember(node, symbolFlags, symbolExcludes) {
var hasExportModifier = ts.getCombinedModifierFlags(node) & 1;
if (symbolFlags & 8388608) {
- if (node.kind === 243 || (node.kind === 234 && hasExportModifier)) {
+ if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) {
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
}
else {
@@ -18773,7 +19387,7 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 285 &&
+ var isJSDocTypedefInJSDocNamespace = node.kind === 289 &&
node.name &&
node.name.kind === 70 &&
node.name.isInJSDocNamespace;
@@ -18828,13 +19442,13 @@ var ts;
activeLabels = undefined;
hasExplicitReturn = false;
bindChildren(node);
- node.flags &= ~64896;
+ node.flags &= ~1408;
if (!(currentFlow.flags & 1) && containerFlags & 8 && ts.nodeIsPresent(node.body)) {
node.flags |= 128;
if (hasExplicitReturn)
node.flags |= 256;
}
- if (node.kind === 261) {
+ if (node.kind === 264) {
node.flags |= emitFlags;
}
if (isIIFE) {
@@ -18910,66 +19524,72 @@ var ts;
return;
}
switch (node.kind) {
- case 210:
+ case 212:
bindWhileStatement(node);
break;
- case 209:
+ case 211:
bindDoStatement(node);
break;
- case 211:
+ case 213:
bindForStatement(node);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
bindForInOrForOfStatement(node);
break;
- case 208:
+ case 210:
bindIfStatement(node);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
bindReturnOrThrow(node);
break;
- case 215:
- case 214:
+ case 217:
+ case 216:
bindBreakOrContinueStatement(node);
break;
- case 221:
+ case 223:
bindTryStatement(node);
break;
- case 218:
+ case 220:
bindSwitchStatement(node);
break;
- case 232:
+ case 234:
bindCaseBlock(node);
break;
- case 253:
+ case 256:
bindCaseClause(node);
break;
- case 219:
+ case 221:
bindLabeledStatement(node);
break;
- case 190:
+ case 191:
bindPrefixUnaryExpressionFlow(node);
break;
- case 191:
+ case 192:
bindPostfixUnaryExpressionFlow(node);
break;
- case 192:
+ case 193:
bindBinaryExpressionFlow(node);
break;
- case 186:
+ case 187:
bindDeleteExpressionFlow(node);
break;
- case 193:
+ case 194:
bindConditionalExpressionFlow(node);
break;
- case 223:
+ case 225:
bindVariableDeclarationFlow(node);
break;
- case 179:
+ case 180:
bindCallExpressionFlow(node);
break;
+ case 282:
+ bindJSDocComment(node);
+ break;
+ case 289:
+ bindJSDocTypedefTag(node);
+ break;
default:
bindEachChild(node);
break;
@@ -18979,15 +19599,15 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 178:
return isNarrowableReference(expr);
- case 179:
+ case 180:
return hasNarrowableArgument(expr);
- case 183:
+ case 184:
return isNarrowingExpression(expr.expression);
- case 192:
+ case 193:
return isNarrowingBinaryExpression(expr);
- case 190:
+ case 191:
return expr.operator === 50 && isNarrowingExpression(expr.operand);
}
return false;
@@ -18995,7 +19615,8 @@ var ts;
function isNarrowableReference(expr) {
return expr.kind === 70 ||
expr.kind === 98 ||
- expr.kind === 177 && isNarrowableReference(expr.expression);
+ expr.kind === 96 ||
+ expr.kind === 178 && isNarrowableReference(expr.expression);
}
function hasNarrowableArgument(expr) {
if (expr.arguments) {
@@ -19006,14 +19627,14 @@ var ts;
}
}
}
- if (expr.expression.kind === 177 &&
+ if (expr.expression.kind === 178 &&
isNarrowableReference(expr.expression.expression)) {
return true;
}
return false;
}
function isNarrowingTypeofOperands(expr1, expr2) {
- return expr1.kind === 187 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
+ return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
}
function isNarrowingBinaryExpression(expr) {
switch (expr.operatorToken.kind) {
@@ -19034,9 +19655,9 @@ var ts;
}
function isNarrowableOperand(expr) {
switch (expr.kind) {
- case 183:
+ case 184:
return isNarrowableOperand(expr.expression);
- case 192:
+ case 193:
switch (expr.operatorToken.kind) {
case 57:
return isNarrowableOperand(expr.left);
@@ -19130,33 +19751,33 @@ var ts;
function isStatementCondition(node) {
var parent = node.parent;
switch (parent.kind) {
- case 208:
case 210:
- case 209:
- return parent.expression === node;
+ case 212:
case 211:
- case 193:
+ return parent.expression === node;
+ case 213:
+ case 194:
return parent.condition === node;
}
return false;
}
function isLogicalExpression(node) {
while (true) {
- if (node.kind === 183) {
+ if (node.kind === 184) {
node = node.expression;
}
- else if (node.kind === 190 && node.operator === 50) {
+ else if (node.kind === 191 && node.operator === 50) {
node = node.operand;
}
else {
- return node.kind === 192 && (node.operatorToken.kind === 52 ||
+ return node.kind === 193 && (node.operatorToken.kind === 52 ||
node.operatorToken.kind === 53);
}
}
}
function isTopLevelLogicalExpression(node) {
- while (node.parent.kind === 183 ||
- node.parent.kind === 190 &&
+ while (node.parent.kind === 184 ||
+ node.parent.kind === 191 &&
node.parent.operator === 50) {
node = node.parent;
}
@@ -19198,7 +19819,7 @@ var ts;
}
function bindDoStatement(node) {
var preDoLabel = createLoopLabel();
- var enclosingLabeledStatement = node.parent.kind === 219
+ var enclosingLabeledStatement = node.parent.kind === 221
? ts.lastOrUndefined(activeLabels)
: undefined;
var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel();
@@ -19230,10 +19851,13 @@ var ts;
var postLoopLabel = createBranchLabel();
addAntecedent(preLoopLabel, currentFlow);
currentFlow = preLoopLabel;
+ if (node.kind === 215) {
+ bind(node.awaitModifier);
+ }
bind(node.expression);
addAntecedent(postLoopLabel, currentFlow);
bind(node.initializer);
- if (node.initializer.kind !== 224) {
+ if (node.initializer.kind !== 226) {
bindAssignmentTargetFlow(node.initializer);
}
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -19255,7 +19879,7 @@ var ts;
}
function bindReturnOrThrow(node) {
bind(node.expression);
- if (node.kind === 216) {
+ if (node.kind === 218) {
hasExplicitReturn = true;
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
@@ -19275,7 +19899,7 @@ var ts;
return undefined;
}
function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
- var flowLabel = node.kind === 215 ? breakTarget : continueTarget;
+ var flowLabel = node.kind === 217 ? breakTarget : continueTarget;
if (flowLabel) {
addAntecedent(flowLabel, currentFlow);
currentFlow = unreachableFlow;
@@ -19308,7 +19932,8 @@ var ts;
flowAfterCatch = currentFlow;
}
if (node.finallyBlock) {
- addAntecedent(preFinallyLabel, preTryFlow);
+ var preFinallyFlow = { flags: 2048, antecedent: preTryFlow, lock: {} };
+ addAntecedent(preFinallyLabel, preFinallyFlow);
currentFlow = finishFlowLabel(preFinallyLabel);
bind(node.finallyBlock);
if (!(currentFlow.flags & 1)) {
@@ -19318,6 +19943,11 @@ var ts;
: unreachableFlow;
}
}
+ if (!(currentFlow.flags & 1)) {
+ var afterFinallyFlow = { flags: 4096, antecedent: currentFlow };
+ preFinallyFlow.lock = afterFinallyFlow;
+ currentFlow = afterFinallyFlow;
+ }
}
else {
currentFlow = finishFlowLabel(preFinallyLabel);
@@ -19332,7 +19962,7 @@ var ts;
preSwitchCaseFlow = currentFlow;
bind(node.caseBlock);
addAntecedent(postSwitchLabel, currentFlow);
- var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 254; });
+ var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; });
node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
if (!hasDefault) {
addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0));
@@ -19397,13 +20027,13 @@ var ts;
if (!activeLabel.referenced && !options.allowUnusedLabels) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label));
}
- if (!node.statement || node.statement.kind !== 209) {
+ if (!node.statement || node.statement.kind !== 211) {
addAntecedent(postStatementLabel, currentFlow);
currentFlow = finishFlowLabel(postStatementLabel);
}
}
function bindDestructuringTargetFlow(node) {
- if (node.kind === 192 && node.operatorToken.kind === 57) {
+ if (node.kind === 193 && node.operatorToken.kind === 57) {
bindAssignmentTargetFlow(node.left);
}
else {
@@ -19414,10 +20044,10 @@ var ts;
if (isNarrowableReference(node)) {
currentFlow = createFlowAssignment(currentFlow, node);
}
- else if (node.kind === 175) {
+ else if (node.kind === 176) {
for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
var e = _a[_i];
- if (e.kind === 196) {
+ if (e.kind === 197) {
bindAssignmentTargetFlow(e.expression);
}
else {
@@ -19425,16 +20055,16 @@ var ts;
}
}
}
- else if (node.kind === 176) {
+ else if (node.kind === 177) {
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
var p = _c[_b];
- if (p.kind === 257) {
+ if (p.kind === 260) {
bindDestructuringTargetFlow(p.initializer);
}
- else if (p.kind === 258) {
+ else if (p.kind === 261) {
bindAssignmentTargetFlow(p.name);
}
- else if (p.kind === 259) {
+ else if (p.kind === 262) {
bindAssignmentTargetFlow(p.expression);
}
}
@@ -19490,7 +20120,7 @@ var ts;
bindEachChild(node);
if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
bindAssignmentTargetFlow(node.left);
- if (operator === 57 && node.left.kind === 178) {
+ if (operator === 57 && node.left.kind === 179) {
var elementAccess = node.left;
if (isNarrowableOperand(elementAccess.expression)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -19501,7 +20131,7 @@ var ts;
}
function bindDeleteExpressionFlow(node) {
bindEachChild(node);
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
bindAssignmentTargetFlow(node.expression);
}
}
@@ -19534,16 +20164,31 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 212 || node.parent.parent.kind === 213) {
+ if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) {
bindInitializedVariableFlow(node);
}
}
+ function bindJSDocComment(node) {
+ ts.forEachChild(node, function (n) {
+ if (n.kind !== 289) {
+ bind(n);
+ }
+ });
+ }
+ function bindJSDocTypedefTag(node) {
+ ts.forEachChild(node, function (n) {
+ if (node.fullName && n === node.name && node.fullName.kind !== 70) {
+ return;
+ }
+ bind(n);
+ });
+ }
function bindCallExpressionFlow(node) {
var expr = node.expression;
- while (expr.kind === 183) {
+ while (expr.kind === 184) {
expr = expr.expression;
}
- if (expr.kind === 184 || expr.kind === 185) {
+ if (expr.kind === 185 || expr.kind === 186) {
bindEach(node.typeArguments);
bindEach(node.arguments);
bind(node.expression);
@@ -19551,7 +20196,7 @@ var ts;
else {
bindEachChild(node);
}
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
var propertyAccess = node.expression;
if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -19560,52 +20205,53 @@ var ts;
}
function getContainerFlags(node) {
switch (node.kind) {
- case 197:
- case 226:
- case 229:
- case 176:
- case 161:
- case 287:
- case 270:
+ case 198:
+ case 228:
+ case 231:
+ case 177:
+ case 162:
+ case 291:
+ case 274:
+ case 253:
return 1;
- case 227:
+ case 229:
return 1 | 64;
- case 274:
+ case 278:
+ case 232:
case 230:
- case 228:
- case 170:
+ case 171:
return 1 | 32;
- case 261:
+ case 264:
return 1 | 4 | 32;
- case 149:
+ case 150:
if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
return 1 | 4 | 32 | 8 | 128;
}
- case 150:
- case 225:
- case 148:
case 151:
+ case 227:
+ case 149:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return 1 | 4 | 32 | 8;
- case 184:
case 185:
+ case 186:
return 1 | 4 | 32 | 8 | 16;
- case 231:
+ case 233:
return 4;
- case 147:
+ case 148:
return node.initializer ? 4 : 0;
- case 256:
- case 211:
- case 212:
+ case 259:
case 213:
- case 232:
+ case 214:
+ case 215:
+ case 234:
return 2;
- case 204:
+ case 206:
return ts.isFunctionLike(node.parent) ? 0 : 2;
}
return 0;
@@ -19621,37 +20267,38 @@ var ts;
}
function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) {
switch (container.kind) {
- case 230:
+ case 232:
return declareModuleMember(node, symbolFlags, symbolExcludes);
- case 261:
+ case 264:
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
- case 197:
- case 226:
+ case 198:
+ case 228:
return declareClassMember(node, symbolFlags, symbolExcludes);
- case 229:
+ case 231:
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
- case 161:
- case 176:
- case 227:
- case 270:
- case 287:
+ case 162:
+ case 177:
+ case 229:
+ case 274:
+ case 291:
+ case 253:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
- case 149:
- case 148:
+ case 156:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
- case 274:
- case 228:
- case 170:
+ case 186:
+ case 278:
+ case 230:
+ case 171:
return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
}
}
@@ -19666,11 +20313,11 @@ var ts;
: declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes);
}
function hasExportDeclarations(node) {
- var body = node.kind === 261 ? node : node.body;
- if (body && (body.kind === 261 || body.kind === 231)) {
+ var body = node.kind === 264 ? node : node.body;
+ if (body && (body.kind === 264 || body.kind === 233)) {
for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
var stat = _a[_i];
- if (stat.kind === 241 || stat.kind === 240) {
+ if (stat.kind === 243 || stat.kind === 242) {
return true;
}
}
@@ -19692,7 +20339,7 @@ var ts;
errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
}
if (ts.isExternalModuleAugmentation(node)) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
+ declareModuleSymbol(node);
}
else {
var pattern = void 0;
@@ -19712,12 +20359,8 @@ var ts;
}
}
else {
- var state = getModuleInstanceState(node);
- if (state === 0) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
- }
- else {
- declareSymbolAndAddToSymbolTable(node, 512, 106639);
+ var state = declareModuleSymbol(node);
+ if (state !== 0) {
if (node.symbol.flags & (16 | 32 | 256)) {
node.symbol.constEnumOnlyModule = false;
}
@@ -19733,29 +20376,40 @@ var ts;
}
}
}
+ function declareModuleSymbol(node) {
+ var state = getModuleInstanceState(node);
+ var instantiated = state !== 0;
+ declareSymbolAndAddToSymbolTable(node, instantiated ? 512 : 1024, instantiated ? 106639 : 0);
+ return state;
+ }
function bindFunctionOrConstructorType(node) {
var symbol = createSymbol(131072, getDeclarationName(node));
addDeclarationToSymbol(symbol, node, 131072);
var typeLiteralSymbol = createSymbol(2048, "__type");
addDeclarationToSymbol(typeLiteralSymbol, node, 2048);
typeLiteralSymbol.members = ts.createMap();
- typeLiteralSymbol.members[symbol.name] = symbol;
+ typeLiteralSymbol.members.set(symbol.name, symbol);
}
function bindObjectLiteralExpression(node) {
+ var ElementKind;
+ (function (ElementKind) {
+ ElementKind[ElementKind["Property"] = 1] = "Property";
+ ElementKind[ElementKind["Accessor"] = 2] = "Accessor";
+ })(ElementKind || (ElementKind = {}));
if (inStrictMode) {
var seen = ts.createMap();
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 || prop.name.kind !== 70) {
+ if (prop.kind === 262 || prop.name.kind !== 70) {
continue;
}
var identifier = prop.name;
- var currentKind = prop.kind === 257 || prop.kind === 258 || prop.kind === 149
+ var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150
? 1
: 2;
- var existingKind = seen[identifier.text];
+ var existingKind = seen.get(identifier.text);
if (!existingKind) {
- seen[identifier.text] = currentKind;
+ seen.set(identifier.text, currentKind);
continue;
}
if (currentKind === 1 && existingKind === 1) {
@@ -19766,16 +20420,22 @@ var ts;
}
return bindAnonymousDeclaration(node, 4096, "__object");
}
+ function bindJsxAttributes(node) {
+ return bindAnonymousDeclaration(node, 4096, "__jsxAttributes");
+ }
+ function bindJsxAttribute(node, symbolFlags, symbolExcludes) {
+ return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
+ }
function bindAnonymousDeclaration(node, symbolFlags, name) {
var symbol = createSymbol(symbolFlags, name);
addDeclarationToSymbol(symbol, node, symbolFlags);
}
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
switch (blockScopeContainer.kind) {
- case 230:
+ case 232:
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
- case 261:
+ case 264:
if (ts.isExternalModule(container)) {
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
@@ -19865,8 +20525,8 @@ var ts;
}
function checkStrictModeFunctionDeclaration(node) {
if (languageVersion < 2) {
- if (blockScopeContainer.kind !== 261 &&
- blockScopeContainer.kind !== 230 &&
+ if (blockScopeContainer.kind !== 264 &&
+ blockScopeContainer.kind !== 232 &&
!ts.isFunctionLike(blockScopeContainer)) {
var errorSpan = ts.getErrorSpanForNode(file, node);
file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node)));
@@ -19874,7 +20534,7 @@ var ts;
}
}
function checkStrictModeNumericLiteral(node) {
- if (inStrictMode && node.isOctalLiteral) {
+ if (inStrictMode && node.numericLiteralFlags & 4) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
}
}
@@ -19908,8 +20568,11 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
+ if (ts.isInJavaScriptFile(node)) {
+ bindJSDocTypedefTagIfAny(node);
+ }
bindWorker(node);
- if (node.kind > 140) {
+ if (node.kind > 141) {
var saveParent = parent;
parent = node;
var containerFlags = getContainerFlags(node);
@@ -19926,6 +20589,26 @@ var ts;
}
inStrictMode = saveInStrictMode;
}
+ function bindJSDocTypedefTagIfAny(node) {
+ if (!node.jsDoc) {
+ return;
+ }
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var jsDoc = _a[_i];
+ if (!jsDoc.tags) {
+ continue;
+ }
+ for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
+ var tag = _c[_b];
+ if (tag.kind === 289) {
+ var savedParent = parent;
+ parent = jsDoc;
+ bind(tag);
+ parent = savedParent;
+ }
+ }
+ }
+ }
function updateStrictModeStatementList(statements) {
if (!inStrictMode) {
for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
@@ -19949,90 +20632,88 @@ var ts;
case 70:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 285) {
+ while (parentNode && parentNode.kind !== 289) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
break;
}
case 98:
- if (currentFlow && (ts.isExpression(node) || parent.kind === 258)) {
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) {
node.flowNode = currentFlow;
}
return checkStrictModeIdentifier(node);
- case 177:
+ case 178:
if (currentFlow && isNarrowableReference(node)) {
node.flowNode = currentFlow;
}
break;
- case 192:
- if (ts.isInJavaScriptFile(node)) {
- var specialKind = ts.getSpecialPropertyAssignmentKind(node);
- switch (specialKind) {
- case 1:
- bindExportsPropertyAssignment(node);
- break;
- case 2:
- bindModuleExportsAssignment(node);
- break;
- case 3:
- bindPrototypePropertyAssignment(node);
- break;
- case 4:
- bindThisPropertyAssignment(node);
- break;
- case 0:
- break;
- default:
- ts.Debug.fail("Unknown special property assignment kind");
- }
+ case 193:
+ var specialKind = ts.getSpecialPropertyAssignmentKind(node);
+ switch (specialKind) {
+ case 1:
+ bindExportsPropertyAssignment(node);
+ break;
+ case 2:
+ bindModuleExportsAssignment(node);
+ break;
+ case 3:
+ bindPrototypePropertyAssignment(node);
+ break;
+ case 4:
+ bindThisPropertyAssignment(node);
+ break;
+ case 5:
+ bindStaticPropertyAssignment(node);
+ break;
+ case 0:
+ break;
+ default:
+ ts.Debug.fail("Unknown special property assignment kind");
}
return checkStrictModeBinaryExpression(node);
- case 256:
+ case 259:
return checkStrictModeCatchClause(node);
- case 186:
+ case 187:
return checkStrictModeDeleteExpression(node);
case 8:
return checkStrictModeNumericLiteral(node);
- case 191:
+ case 192:
return checkStrictModePostfixUnaryExpression(node);
- case 190:
+ case 191:
return checkStrictModePrefixUnaryExpression(node);
- case 217:
+ case 219:
return checkStrictModeWithStatement(node);
- case 167:
+ case 168:
seenThisKeyword = true;
return;
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 143:
- return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 144:
+ return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
+ case 145:
return bindParameter(node);
- case 223:
- case 174:
- if (node.dotDotDotToken && node.parent.kind === 172) {
- emitFlags |= 32768;
- }
+ case 225:
+ case 175:
return bindVariableDeclarationOrBindingElement(node);
+ case 148:
case 147:
- case 146:
- case 271:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 0);
- case 286:
+ case 275:
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ case 290:
return bindJSDocProperty(node);
- case 257:
- case 258:
- return bindPropertyOrMethodOrAccessor(node, 4, 0);
case 260:
+ case 261:
+ return bindPropertyOrMethodOrAccessor(node, 4, 0);
+ case 263:
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
- case 259:
- case 251:
+ case 262:
+ case 254:
var root = container;
var hasRest = false;
while (root.parent) {
- if (root.kind === 176 &&
- root.parent.kind === 192 &&
+ if (root.kind === 177 &&
+ root.parent.kind === 193 &&
root.parent.operatorToken.kind === 57 &&
root.parent.left === root) {
hasRest = true;
@@ -20040,80 +20721,83 @@ var ts;
}
root = root.parent;
}
- emitFlags |= hasRest ? 32768 : 16384;
return;
- case 153:
case 154:
case 155:
+ case 156:
return declareSymbolAndAddToSymbolTable(node, 131072, 0);
+ case 150:
case 149:
- case 148:
- return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
- case 225:
+ return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
+ case 227:
return bindFunctionDeclaration(node);
- case 150:
- return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 151:
- return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 152:
+ return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ case 153:
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
- case 158:
case 159:
- case 274:
+ case 160:
+ case 278:
return bindFunctionOrConstructorType(node);
- case 161:
- case 170:
- case 287:
- case 270:
+ case 162:
+ case 171:
+ case 291:
+ case 274:
return bindAnonymousDeclaration(node, 2048, "__type");
- case 176:
+ case 177:
return bindObjectLiteralExpression(node);
- case 184:
case 185:
+ case 186:
return bindFunctionExpression(node);
- case 179:
+ case 180:
if (ts.isInJavaScriptFile(node)) {
bindCallExpression(node);
}
break;
- case 197:
- case 226:
+ case 198:
+ case 228:
inStrictMode = true;
return bindClassLikeDeclaration(node);
- case 227:
+ case 229:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 285:
+ case 289:
if (!node.fullName || node.fullName.kind === 70) {
return bindBlockScopedDeclaration(node, 524288, 793064);
}
break;
- case 228:
+ case 230:
return bindBlockScopedDeclaration(node, 524288, 793064);
- case 229:
+ case 231:
return bindEnumDeclaration(node);
- case 230:
+ case 232:
return bindModuleDeclaration(node);
- case 234:
- case 237:
+ case 253:
+ return bindJsxAttributes(node);
+ case 252:
+ return bindJsxAttribute(node, 4, 0);
+ case 236:
case 239:
- case 243:
+ case 241:
+ case 245:
return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608);
- case 233:
+ case 235:
return bindNamespaceExportDeclaration(node);
- case 236:
+ case 238:
return bindImportClause(node);
- case 241:
+ case 243:
return bindExportDeclaration(node);
- case 240:
+ case 242:
return bindExportAssignment(node);
- case 261:
+ case 264:
updateStrictModeStatementList(node.statements);
return bindSourceFileIfExternalModule();
- case 204:
+ case 206:
if (!ts.isFunctionLike(node.parent)) {
return;
}
- case 231:
+ case 233:
return updateStrictModeStatementList(node.statements);
}
}
@@ -20122,7 +20806,7 @@ var ts;
if (parameterName && parameterName.kind === 70) {
checkStrictModeIdentifier(parameterName);
}
- if (parameterName && parameterName.kind === 167) {
+ if (parameterName && parameterName.kind === 168) {
seenThisKeyword = true;
}
bind(type);
@@ -20141,7 +20825,7 @@ var ts;
bindAnonymousDeclaration(node, 8388608, getDeclarationName(node));
}
else {
- var flags = node.kind === 240 && ts.exportAssignmentIsAlias(node)
+ var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node)
? 8388608
: 4;
declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16);
@@ -20151,17 +20835,17 @@ var ts;
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
}
- if (node.parent.kind !== 261) {
+ if (node.parent.kind !== 264) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
- var parent_4 = node.parent;
- if (!ts.isExternalModule(parent_4)) {
+ var parent_1 = node.parent;
+ if (!ts.isExternalModule(parent_1)) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
- if (!parent_4.isDeclarationFile) {
+ if (!parent_1.isDeclarationFile) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
@@ -20171,10 +20855,10 @@ var ts;
}
function bindExportDeclaration(node) {
if (!container.symbol || !container.symbol.exports) {
- bindAnonymousDeclaration(node, 1073741824, getDeclarationName(node));
+ bindAnonymousDeclaration(node, 33554432, getDeclarationName(node));
}
else if (!node.exportClause) {
- declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0);
+ declareSymbol(container.symbol.exports, container.symbol, node, 33554432, 0);
}
}
function bindImportClause(node) {
@@ -20194,24 +20878,56 @@ var ts;
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node.left, 4 | 7340032, 0);
}
+ function isExportsOrModuleExportsOrAlias(node) {
+ return ts.isExportsIdentifier(node) ||
+ ts.isModuleExportsPropertyAccessExpression(node) ||
+ isNameOfExportsOrModuleExportsAliasDeclaration(node);
+ }
+ function isNameOfExportsOrModuleExportsAliasDeclaration(node) {
+ if (node.kind === 70) {
+ var symbol = lookupSymbolForName(node.text);
+ if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) {
+ var declaration = symbol.valueDeclaration;
+ if (declaration.initializer) {
+ return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
+ }
+ }
+ }
+ return false;
+ }
+ function isExportsOrModuleExportsOrAliasOrAssignemnt(node) {
+ return isExportsOrModuleExportsOrAlias(node) ||
+ (ts.isAssignmentExpression(node, true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
+ }
function bindModuleExportsAssignment(node) {
+ var assignedExpression = ts.getRightMostAssignedExpression(node.right);
+ if (ts.isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
+ setCommonJsModuleIndicator(node);
+ return;
+ }
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node, 4 | 7340032 | 512, 0);
}
function bindThisPropertyAssignment(node) {
ts.Debug.assert(ts.isInJavaScriptFile(node));
- if (container.kind === 225 || container.kind === 184) {
- container.symbol.members = container.symbol.members || ts.createMap();
- declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
- }
- else if (container.kind === 150) {
- var saveContainer = container;
- container = container.parent;
- var symbol = bindPropertyOrMethodOrAccessor(node, 4, 0);
- if (symbol) {
- symbol.isReplaceableByMethod = true;
- }
- container = saveContainer;
+ var container = ts.getThisContainer(node, false);
+ switch (container.kind) {
+ case 227:
+ case 185:
+ container.symbol.members = container.symbol.members || ts.createMap();
+ declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
+ break;
+ case 151:
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ var containingClass = container.parent;
+ var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0);
+ if (symbol) {
+ symbol.isReplaceableByMethod = true;
+ }
+ break;
}
}
function bindPrototypePropertyAssignment(node) {
@@ -20221,14 +20937,35 @@ var ts;
leftSideOfAssignment.parent = node;
constructorFunction.parent = classPrototype;
classPrototype.parent = leftSideOfAssignment;
- var funcSymbol = container.locals[constructorFunction.text];
- if (!funcSymbol || !(funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
- return;
+ bindPropertyAssignment(constructorFunction.text, leftSideOfAssignment, true);
+ }
+ function bindStaticPropertyAssignment(node) {
+ var leftSideOfAssignment = node.left;
+ var target = leftSideOfAssignment.expression;
+ leftSideOfAssignment.parent = node;
+ target.parent = leftSideOfAssignment;
+ if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
+ bindExportsPropertyAssignment(node);
}
- if (!funcSymbol.members) {
- funcSymbol.members = ts.createMap();
+ else {
+ bindPropertyAssignment(target.text, leftSideOfAssignment, false);
}
- declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4, 0);
+ }
+ function lookupSymbolForName(name) {
+ return (container.symbol && container.symbol.exports && container.symbol.exports.get(name)) || (container.locals && container.locals.get(name));
+ }
+ function bindPropertyAssignment(functionName, propertyAccessExpression, isPrototypeProperty) {
+ var targetSymbol = lookupSymbolForName(functionName);
+ if (targetSymbol && ts.isDeclarationOfFunctionOrClassExpression(targetSymbol)) {
+ targetSymbol = targetSymbol.valueDeclaration.initializer.symbol;
+ }
+ if (!targetSymbol || !(targetSymbol.flags & (16 | 32))) {
+ return;
+ }
+ var symbolTable = isPrototypeProperty ?
+ (targetSymbol.members || (targetSymbol.members = ts.createMap())) :
+ (targetSymbol.exports || (targetSymbol.exports = ts.createMap()));
+ declareSymbol(symbolTable, targetSymbol, propertyAccessExpression, 4, 0);
}
function bindCallExpression(node) {
if (!file.commonJsModuleIndicator && ts.isRequireCall(node, false)) {
@@ -20236,33 +20973,26 @@ var ts;
}
}
function bindClassLikeDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) {
- emitFlags |= 1024;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
- }
- }
- if (node.kind === 226) {
+ if (node.kind === 228) {
bindBlockScopedDeclaration(node, 32, 899519);
}
else {
var bindingName = node.name ? node.name.text : "__class";
bindAnonymousDeclaration(node, 32, bindingName);
if (node.name) {
- classifiableNames[node.name.text] = node.name.text;
+ classifiableNames.set(node.name.text, node.name.text);
}
}
var symbol = node.symbol;
- var prototypeSymbol = createSymbol(4 | 134217728, "prototype");
- if (symbol.exports[prototypeSymbol.name]) {
+ var prototypeSymbol = createSymbol(4 | 16777216, "prototype");
+ var symbolExport = symbol.exports.get(prototypeSymbol.name);
+ if (symbolExport) {
if (node.name) {
node.name.parent = node;
}
- file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
}
- symbol.exports[prototypeSymbol.name] = prototypeSymbol;
+ symbol.exports.set(prototypeSymbol.name, prototypeSymbol);
prototypeSymbol.parent = symbol;
}
function bindEnumDeclaration(node) {
@@ -20287,11 +21017,6 @@ var ts;
}
}
function bindParameter(node) {
- if (!ts.isDeclarationFile(file) &&
- !ts.isInAmbientContext(node) &&
- ts.nodeIsDecorated(node)) {
- emitFlags |= (2048 | 4096);
- }
if (inStrictMode) {
checkStrictModeEvalOrArguments(node, node.name);
}
@@ -20303,13 +21028,13 @@ var ts;
}
if (ts.isParameterPropertyDeclaration(node)) {
var classDeclaration = node.parent.parent;
- declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 536870912 : 0), 0);
+ declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 67108864 : 0), 0);
}
}
function bindFunctionDeclaration(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
checkStrictModeFunctionName(node);
@@ -20323,8 +21048,8 @@ var ts;
}
function bindFunctionExpression(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow) {
@@ -20336,11 +21061,8 @@ var ts;
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
@@ -20362,15 +21084,15 @@ var ts;
return false;
}
if (currentFlow === unreachableFlow) {
- var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 206) ||
- node.kind === 226 ||
- (node.kind === 230 && shouldReportErrorOnModuleDeclaration(node)) ||
- (node.kind === 229 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
+ var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) ||
+ node.kind === 228 ||
+ (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) ||
+ (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
if (reportError) {
currentFlow = reportedUnreachableFlow;
var reportUnreachableCode = !options.allowUnreachableCode &&
!ts.isInAmbientContext(node) &&
- (node.kind !== 205 ||
+ (node.kind !== 207 ||
ts.getCombinedNodeFlags(node.declarationList) & 3 ||
ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; }));
if (reportUnreachableCode) {
@@ -20384,56 +21106,56 @@ var ts;
function computeTransformFlagsForNode(node, subtreeFlags) {
var kind = node.kind;
switch (kind) {
- case 179:
- return computeCallExpression(node, subtreeFlags);
case 180:
+ return computeCallExpression(node, subtreeFlags);
+ case 181:
return computeNewExpression(node, subtreeFlags);
- case 230:
+ case 232:
return computeModuleDeclaration(node, subtreeFlags);
- case 183:
+ case 184:
return computeParenthesizedExpression(node, subtreeFlags);
- case 192:
+ case 193:
return computeBinaryExpression(node, subtreeFlags);
- case 207:
+ case 209:
return computeExpressionStatement(node, subtreeFlags);
- case 144:
+ case 145:
return computeParameter(node, subtreeFlags);
- case 185:
+ case 186:
return computeArrowFunction(node, subtreeFlags);
- case 184:
+ case 185:
return computeFunctionExpression(node, subtreeFlags);
- case 225:
+ case 227:
return computeFunctionDeclaration(node, subtreeFlags);
- case 223:
+ case 225:
return computeVariableDeclaration(node, subtreeFlags);
- case 224:
+ case 226:
return computeVariableDeclarationList(node, subtreeFlags);
- case 205:
+ case 207:
return computeVariableStatement(node, subtreeFlags);
- case 219:
+ case 221:
return computeLabeledStatement(node, subtreeFlags);
- case 226:
+ case 228:
return computeClassDeclaration(node, subtreeFlags);
- case 197:
+ case 198:
return computeClassExpression(node, subtreeFlags);
- case 255:
+ case 258:
return computeHeritageClause(node, subtreeFlags);
- case 256:
+ case 259:
return computeCatchClause(node, subtreeFlags);
- case 199:
+ case 200:
return computeExpressionWithTypeArguments(node, subtreeFlags);
- case 150:
+ case 151:
return computeConstructor(node, subtreeFlags);
- case 147:
+ case 148:
return computePropertyDeclaration(node, subtreeFlags);
- case 149:
+ case 150:
return computeMethod(node, subtreeFlags);
- case 151:
case 152:
+ case 153:
return computeAccessor(node, subtreeFlags);
- case 234:
+ case 236:
return computeImportEquals(node, subtreeFlags);
- case 177:
+ case 178:
return computePropertyAccess(node, subtreeFlags);
default:
return computeOther(node, kind, subtreeFlags);
@@ -20458,8 +21180,8 @@ var ts;
switch (kind) {
case 96:
return true;
- case 177:
case 178:
+ case 179:
var expression = node.expression;
var expressionKind = expression.kind;
return expressionKind === 96;
@@ -20481,10 +21203,10 @@ var ts;
var transformFlags = subtreeFlags;
var operatorTokenKind = node.operatorToken.kind;
var leftKind = node.left.kind;
- if (operatorTokenKind === 57 && leftKind === 176) {
+ if (operatorTokenKind === 57 && leftKind === 177) {
transformFlags |= 8 | 192 | 3072;
}
- else if (operatorTokenKind === 57 && leftKind === 175) {
+ else if (operatorTokenKind === 57 && leftKind === 176) {
transformFlags |= 192 | 3072;
}
else if (operatorTokenKind === 39
@@ -20523,8 +21245,8 @@ var ts;
var expression = node.expression;
var expressionKind = expression.kind;
var expressionTransformFlags = expression.transformFlags;
- if (expressionKind === 200
- || expressionKind === 182) {
+ if (expressionKind === 201
+ || expressionKind === 183) {
transformFlags |= 3;
}
if (expressionTransformFlags & 1024) {
@@ -20621,9 +21343,9 @@ var ts;
transformFlags |= 8;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -20666,7 +21388,7 @@ var ts;
transformFlags |= 3;
}
if (modifierFlags & 256) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -20674,7 +21396,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
}
@@ -20689,7 +21411,7 @@ var ts;
transformFlags |= 3;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -20697,7 +21419,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -20810,8 +21532,8 @@ var ts;
var excludeFlags = 536872257;
switch (kind) {
case 119:
- case 189:
- transformFlags |= 16;
+ case 190:
+ transformFlags |= 8 | 16;
break;
case 113:
case 111:
@@ -20819,50 +21541,66 @@ var ts;
case 116:
case 123:
case 75:
- case 229:
- case 260:
- case 182:
- case 200:
+ case 231:
+ case 263:
+ case 183:
case 201:
+ case 202:
case 130:
transformFlags |= 3;
break;
- case 246:
- case 247:
case 248:
- case 10:
case 249:
case 250:
+ case 10:
case 251:
case 252:
+ case 253:
+ case 254:
+ case 255:
transformFlags |= 4;
break;
- case 213:
- transformFlags |= 8;
case 12:
case 13:
case 14:
case 15:
- case 194:
- case 181:
- case 258:
+ case 195:
+ case 182:
+ case 261:
case 114:
+ case 203:
transformFlags |= 192;
break;
- case 195:
- transformFlags |= 192 | 16777216;
+ case 9:
+ if (node.hasExtendedUnicodeEscape) {
+ transformFlags |= 192;
+ }
+ break;
+ case 8:
+ if (node.numericLiteralFlags & 48) {
+ transformFlags |= 192;
+ }
+ break;
+ case 215:
+ if (node.awaitModifier) {
+ transformFlags |= 8;
+ }
+ transformFlags |= 192;
+ break;
+ case 196:
+ transformFlags |= 8 | 192 | 16777216;
break;
case 118:
case 132:
case 129:
- case 134:
- case 121:
+ case 133:
case 135:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
case 156:
@@ -20876,26 +21614,27 @@ var ts;
case 164:
case 165:
case 166:
- case 227:
- case 228:
case 167:
+ case 229:
+ case 230:
case 168:
case 169:
case 170:
case 171:
+ case 172:
transformFlags = 3;
excludeFlags = -3;
break;
- case 142:
+ case 143:
transformFlags |= 2097152;
if (subtreeFlags & 16384) {
transformFlags |= 65536;
}
break;
- case 196:
+ case 197:
transformFlags |= 192 | 524288;
break;
- case 259:
+ case 262:
transformFlags |= 8 | 1048576;
break;
case 96:
@@ -20904,27 +21643,27 @@ var ts;
case 98:
transformFlags |= 16384;
break;
- case 172:
+ case 173:
transformFlags |= 192 | 8388608;
if (subtreeFlags & 524288) {
transformFlags |= 8 | 1048576;
}
excludeFlags = 537396545;
break;
- case 173:
+ case 174:
transformFlags |= 192 | 8388608;
excludeFlags = 537396545;
break;
- case 174:
+ case 175:
transformFlags |= 192;
if (node.dotDotDotToken) {
transformFlags |= 524288;
}
break;
- case 145:
+ case 146:
transformFlags |= 3 | 4096;
break;
- case 176:
+ case 177:
excludeFlags = 540087617;
if (subtreeFlags & 2097152) {
transformFlags |= 192;
@@ -20936,29 +21675,29 @@ var ts;
transformFlags |= 8;
}
break;
- case 175:
- case 180:
+ case 176:
+ case 181:
excludeFlags = 537396545;
if (subtreeFlags & 524288) {
transformFlags |= 192;
}
break;
- case 209:
- case 210:
case 211:
case 212:
+ case 213:
+ case 214:
if (subtreeFlags & 4194304) {
transformFlags |= 192;
}
break;
- case 261:
+ case 264:
if (subtreeFlags & 32768) {
transformFlags |= 192;
}
break;
+ case 218:
case 216:
- case 214:
- case 215:
+ case 217:
transformFlags |= 33554432;
break;
}
@@ -20966,56 +21705,57 @@ var ts;
return transformFlags & ~excludeFlags;
}
function getTransformFlagsSubtreeExclusions(kind) {
- if (kind >= 156 && kind <= 171) {
+ if (kind >= 157 && kind <= 172) {
return -3;
}
switch (kind) {
- case 179:
case 180:
- case 175:
+ case 181:
+ case 176:
return 537396545;
- case 230:
+ case 232:
return 574674241;
- case 144:
+ case 145:
return 536872257;
- case 185:
+ case 186:
return 601249089;
- case 184:
- case 225:
+ case 185:
+ case 227:
return 601281857;
- case 224:
- return 546309441;
case 226:
- case 197:
+ return 546309441;
+ case 228:
+ case 198:
return 539358529;
- case 150:
- return 601015617;
- case 149:
case 151:
+ return 601015617;
+ case 150:
case 152:
+ case 153:
return 601015617;
case 118:
case 132:
case 129:
- case 134:
- case 121:
case 135:
+ case 133:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
- case 227:
- case 228:
+ case 156:
+ case 229:
+ case 230:
return -3;
- case 176:
+ case 177:
return 540087617;
- case 256:
+ case 259:
return 537920833;
- case 172:
case 173:
+ case 174:
return 537396545;
default:
return 536872257;
@@ -21048,23 +21788,29 @@ var ts;
ts.getSymbolId = getSymbolId;
function createTypeChecker(host, produceDiagnostics) {
var cancellationToken;
+ var requestedExternalEmitHelpers;
+ var externalHelpersModule;
var Symbol = ts.objectAllocator.getSymbolConstructor();
var Type = ts.objectAllocator.getTypeConstructor();
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
var compilerOptions = host.getCompilerOptions();
- var languageVersion = compilerOptions.target || 0;
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var modulekind = ts.getEmitModuleKind(compilerOptions);
var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters;
var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System;
- var strictNullChecks = compilerOptions.strictNullChecks;
+ var strictNullChecks = compilerOptions.strictNullChecks === undefined ? compilerOptions.strict : compilerOptions.strictNullChecks;
+ var noImplicitAny = compilerOptions.noImplicitAny === undefined ? compilerOptions.strict : compilerOptions.noImplicitAny;
+ var noImplicitThis = compilerOptions.noImplicitThis === undefined ? compilerOptions.strict : compilerOptions.noImplicitThis;
var emitResolver = createResolver();
- var undefinedSymbol = createSymbol(4 | 67108864, "undefined");
+ var nodeBuilder = createNodeBuilder();
+ var undefinedSymbol = createSymbol(4, "undefined");
undefinedSymbol.declarations = [];
- var argumentsSymbol = createSymbol(4 | 67108864, "arguments");
+ var argumentsSymbol = createSymbol(4, "arguments");
var checker = {
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
@@ -21073,47 +21819,127 @@ var ts;
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; },
+ getMergedSymbol: getMergedSymbol,
getDiagnostics: getDiagnostics,
getGlobalDiagnostics: getGlobalDiagnostics,
- getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
- getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration,
+ getTypeOfSymbolAtLocation: function (symbol, location) {
+ location = ts.getParseTreeNode(location);
+ return location ? getTypeOfSymbolAtLocation(symbol, location) : unknownType;
+ },
+ getSymbolsOfParameterPropertyDeclaration: function (parameter, parameterName) {
+ parameter = ts.getParseTreeNode(parameter, ts.isParameter);
+ ts.Debug.assert(parameter !== undefined, "Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.");
+ return getSymbolsOfParameterPropertyDeclaration(parameter, parameterName);
+ },
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
getPropertiesOfType: getPropertiesOfType,
getPropertyOfType: getPropertyOfType,
+ getIndexInfoOfType: getIndexInfoOfType,
getSignaturesOfType: getSignaturesOfType,
getIndexTypeOfType: getIndexTypeOfType,
getBaseTypes: getBaseTypes,
+ getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
+ getWidenedType: getWidenedType,
+ getTypeFromTypeNode: function (node) {
+ node = ts.getParseTreeNode(node, ts.isTypeNode);
+ return node ? getTypeFromTypeNode(node) : unknownType;
+ },
+ getParameterType: getTypeAtPosition,
getReturnTypeOfSignature: getReturnTypeOfSignature,
getNonNullableType: getNonNullableType,
- getSymbolsInScope: getSymbolsInScope,
- getSymbolAtLocation: getSymbolAtLocation,
- getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
- getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol,
- getTypeAtLocation: getTypeOfNode,
- getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment,
- typeToString: typeToString,
+ typeToTypeNode: nodeBuilder.typeToTypeNode,
+ indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
+ signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
+ getSymbolsInScope: function (location, meaning) {
+ location = ts.getParseTreeNode(location);
+ return location ? getSymbolsInScope(location, meaning) : [];
+ },
+ getSymbolAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getSymbolAtLocation(node) : undefined;
+ },
+ getShorthandAssignmentValueSymbol: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getShorthandAssignmentValueSymbol(node) : undefined;
+ },
+ getExportSpecifierLocalTargetSymbol: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExportSpecifier);
+ return node ? getExportSpecifierLocalTargetSymbol(node) : undefined;
+ },
+ getTypeAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getTypeOfNode(node) : unknownType;
+ },
+ getPropertySymbolOfDestructuringAssignment: function (location) {
+ location = ts.getParseTreeNode(location, ts.isIdentifier);
+ return location ? getPropertySymbolOfDestructuringAssignment(location) : undefined;
+ },
+ signatureToString: function (signature, enclosingDeclaration, flags, kind) {
+ return signatureToString(signature, ts.getParseTreeNode(enclosingDeclaration), flags, kind);
+ },
+ typeToString: function (type, enclosingDeclaration, flags) {
+ return typeToString(type, ts.getParseTreeNode(enclosingDeclaration), flags);
+ },
getSymbolDisplayBuilder: getSymbolDisplayBuilder,
- symbolToString: symbolToString,
+ symbolToString: function (symbol, enclosingDeclaration, meaning) {
+ return symbolToString(symbol, ts.getParseTreeNode(enclosingDeclaration), meaning);
+ },
getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
getRootSymbols: getRootSymbols,
- getContextualType: getContextualType,
+ getContextualType: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExpression);
+ return node ? getContextualType(node) : undefined;
+ },
getFullyQualifiedName: getFullyQualifiedName,
- getResolvedSignature: getResolvedSignature,
- getConstantValue: getConstantValue,
- isValidPropertyAccess: isValidPropertyAccess,
- getSignatureFromDeclaration: getSignatureFromDeclaration,
- isImplementationOfOverload: isImplementationOfOverload,
+ getResolvedSignature: function (node, candidatesOutArray) {
+ node = ts.getParseTreeNode(node, ts.isCallLikeExpression);
+ return node ? getResolvedSignature(node, candidatesOutArray) : undefined;
+ },
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
+ isValidPropertyAccess: function (node, propertyName) {
+ node = ts.getParseTreeNode(node, ts.isPropertyAccessOrQualifiedName);
+ return node ? isValidPropertyAccess(node, propertyName) : false;
+ },
+ getSignatureFromDeclaration: function (declaration) {
+ declaration = ts.getParseTreeNode(declaration, ts.isFunctionLike);
+ return declaration ? getSignatureFromDeclaration(declaration) : undefined;
+ },
+ isImplementationOfOverload: function (node) {
+ node = ts.getParseTreeNode(node, ts.isFunctionLike);
+ return node ? isImplementationOfOverload(node) : undefined;
+ },
+ getImmediateAliasedSymbol: function (symbol) {
+ ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
+ var links = getSymbolLinks(symbol);
+ if (!links.immediateTarget) {
+ var node = getDeclarationOfAliasSymbol(symbol);
+ ts.Debug.assert(!!node);
+ links.immediateTarget = getTargetOfAliasDeclaration(node, true);
+ }
+ return links.immediateTarget;
+ },
getAliasedSymbol: resolveAlias,
getEmitResolver: getEmitResolver,
getExportsOfModule: getExportsOfModuleAsArray,
+ getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
getAmbientModules: getAmbientModules,
- getJsxElementAttributesType: getJsxElementAttributesType,
+ getAllAttributesTypeFromJsxOpeningLikeElement: function (node) {
+ node = ts.getParseTreeNode(node, ts.isJsxOpeningLikeElement);
+ return node ? getAllAttributesTypeFromJsxOpeningLikeElement(node) : undefined;
+ },
getJsxIntrinsicTagNames: getJsxIntrinsicTagNames,
- isOptionalParameter: isOptionalParameter,
+ isOptionalParameter: function (node) {
+ node = ts.getParseTreeNode(node, ts.isParameter);
+ return node ? isOptionalParameter(node) : false;
+ },
tryGetMemberInModuleExports: tryGetMemberInModuleExports,
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
- }
+ },
+ getApparentType: getApparentType
};
var tupleTypes = [];
var unionTypes = ts.createMap();
@@ -21122,8 +21948,8 @@ var ts;
var numericLiteralTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
- var unknownSymbol = createSymbol(4 | 67108864, "unknown");
- var resolvingSymbol = createSymbol(67108864, "__resolving__");
+ var unknownSymbol = createSymbol(4, "unknown");
+ var resolvingSymbol = createSymbol(0, "__resolving__");
var anyType = createIntrinsicType(1, "any");
var autoType = createIntrinsicType(1, "any");
var unknownType = createIntrinsicType(1, "unknown");
@@ -21140,8 +21966,9 @@ var ts;
var voidType = createIntrinsicType(1024, "void");
var neverType = createIntrinsicType(8192, "never");
var silentNeverType = createIntrinsicType(8192, "never");
+ var nonPrimitiveType = createIntrinsicType(16777216, "object");
var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
- var emptyTypeLiteralSymbol = createSymbol(2048 | 67108864, "__type");
+ var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
emptyTypeLiteralSymbol.members = ts.createMap();
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -21149,16 +21976,15 @@ var ts;
var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
anyFunctionType.flags |= 8388608;
var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
+ var circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, undefined, 0, false, false);
var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, undefined, 0, false, false);
var enumNumberIndexInfo = createIndexInfo(stringType, true);
+ var jsObjectLiteralIndexInfo = createIndexInfo(anyType, false);
var globals = ts.createMap();
var patternAmbientModules;
- var getGlobalESSymbolConstructorSymbol;
- var getGlobalPromiseConstructorSymbol;
- var tryGetGlobalPromiseConstructorSymbol;
var globalObjectType;
var globalFunctionType;
var globalArrayType;
@@ -21167,26 +21993,26 @@ var ts;
var globalNumberType;
var globalBooleanType;
var globalRegExpType;
+ var globalThisType;
var anyArrayType;
var autoArrayType;
var anyReadonlyArrayType;
- var getGlobalTemplateStringsArrayType;
- var getGlobalESSymbolType;
- var getGlobalIterableType;
- var getGlobalIteratorType;
- var getGlobalIterableIteratorType;
- var getGlobalClassDecoratorType;
- var getGlobalParameterDecoratorType;
- var getGlobalPropertyDecoratorType;
- var getGlobalMethodDecoratorType;
- var getGlobalTypedPropertyDescriptorType;
- var getGlobalPromiseType;
- var tryGetGlobalPromiseType;
- var getGlobalPromiseLikeType;
- var getInstantiatedGlobalPromiseLikeType;
- var getGlobalPromiseConstructorLikeType;
- var getGlobalThenableType;
- var jsxElementClassType;
+ var deferredGlobalESSymbolConstructorSymbol;
+ var deferredGlobalESSymbolType;
+ var deferredGlobalTypedPropertyDescriptorType;
+ var deferredGlobalPromiseType;
+ var deferredGlobalPromiseConstructorSymbol;
+ var deferredGlobalPromiseConstructorLikeType;
+ var deferredGlobalIterableType;
+ var deferredGlobalIteratorType;
+ var deferredGlobalIterableIteratorType;
+ var deferredGlobalAsyncIterableType;
+ var deferredGlobalAsyncIteratorType;
+ var deferredGlobalAsyncIterableIteratorType;
+ var deferredGlobalTemplateStringsArrayType;
+ var deferredJsxElementClassType;
+ var deferredJsxElementType;
+ var deferredJsxStatelessElementType;
var deferredNodes;
var deferredUnusedIdentifierNodes;
var flowLoopStart = 0;
@@ -21207,9 +22033,70 @@ var ts;
var visitedFlowNodes = [];
var visitedFlowTypes = [];
var potentialThisCollisions = [];
+ var potentialNewTargetCollisions = [];
var awaitedTypeStack = [];
var diagnostics = ts.createDiagnosticCollection();
- var typeofEQFacts = ts.createMap({
+ var TypeFacts;
+ (function (TypeFacts) {
+ TypeFacts[TypeFacts["None"] = 0] = "None";
+ TypeFacts[TypeFacts["TypeofEQString"] = 1] = "TypeofEQString";
+ TypeFacts[TypeFacts["TypeofEQNumber"] = 2] = "TypeofEQNumber";
+ TypeFacts[TypeFacts["TypeofEQBoolean"] = 4] = "TypeofEQBoolean";
+ TypeFacts[TypeFacts["TypeofEQSymbol"] = 8] = "TypeofEQSymbol";
+ TypeFacts[TypeFacts["TypeofEQObject"] = 16] = "TypeofEQObject";
+ TypeFacts[TypeFacts["TypeofEQFunction"] = 32] = "TypeofEQFunction";
+ TypeFacts[TypeFacts["TypeofEQHostObject"] = 64] = "TypeofEQHostObject";
+ TypeFacts[TypeFacts["TypeofNEString"] = 128] = "TypeofNEString";
+ TypeFacts[TypeFacts["TypeofNENumber"] = 256] = "TypeofNENumber";
+ TypeFacts[TypeFacts["TypeofNEBoolean"] = 512] = "TypeofNEBoolean";
+ TypeFacts[TypeFacts["TypeofNESymbol"] = 1024] = "TypeofNESymbol";
+ TypeFacts[TypeFacts["TypeofNEObject"] = 2048] = "TypeofNEObject";
+ TypeFacts[TypeFacts["TypeofNEFunction"] = 4096] = "TypeofNEFunction";
+ TypeFacts[TypeFacts["TypeofNEHostObject"] = 8192] = "TypeofNEHostObject";
+ TypeFacts[TypeFacts["EQUndefined"] = 16384] = "EQUndefined";
+ TypeFacts[TypeFacts["EQNull"] = 32768] = "EQNull";
+ TypeFacts[TypeFacts["EQUndefinedOrNull"] = 65536] = "EQUndefinedOrNull";
+ TypeFacts[TypeFacts["NEUndefined"] = 131072] = "NEUndefined";
+ TypeFacts[TypeFacts["NENull"] = 262144] = "NENull";
+ TypeFacts[TypeFacts["NEUndefinedOrNull"] = 524288] = "NEUndefinedOrNull";
+ TypeFacts[TypeFacts["Truthy"] = 1048576] = "Truthy";
+ TypeFacts[TypeFacts["Falsy"] = 2097152] = "Falsy";
+ TypeFacts[TypeFacts["Discriminatable"] = 4194304] = "Discriminatable";
+ TypeFacts[TypeFacts["All"] = 8388607] = "All";
+ TypeFacts[TypeFacts["BaseStringStrictFacts"] = 933633] = "BaseStringStrictFacts";
+ TypeFacts[TypeFacts["BaseStringFacts"] = 3145473] = "BaseStringFacts";
+ TypeFacts[TypeFacts["StringStrictFacts"] = 4079361] = "StringStrictFacts";
+ TypeFacts[TypeFacts["StringFacts"] = 4194049] = "StringFacts";
+ TypeFacts[TypeFacts["EmptyStringStrictFacts"] = 3030785] = "EmptyStringStrictFacts";
+ TypeFacts[TypeFacts["EmptyStringFacts"] = 3145473] = "EmptyStringFacts";
+ TypeFacts[TypeFacts["NonEmptyStringStrictFacts"] = 1982209] = "NonEmptyStringStrictFacts";
+ TypeFacts[TypeFacts["NonEmptyStringFacts"] = 4194049] = "NonEmptyStringFacts";
+ TypeFacts[TypeFacts["BaseNumberStrictFacts"] = 933506] = "BaseNumberStrictFacts";
+ TypeFacts[TypeFacts["BaseNumberFacts"] = 3145346] = "BaseNumberFacts";
+ TypeFacts[TypeFacts["NumberStrictFacts"] = 4079234] = "NumberStrictFacts";
+ TypeFacts[TypeFacts["NumberFacts"] = 4193922] = "NumberFacts";
+ TypeFacts[TypeFacts["ZeroStrictFacts"] = 3030658] = "ZeroStrictFacts";
+ TypeFacts[TypeFacts["ZeroFacts"] = 3145346] = "ZeroFacts";
+ TypeFacts[TypeFacts["NonZeroStrictFacts"] = 1982082] = "NonZeroStrictFacts";
+ TypeFacts[TypeFacts["NonZeroFacts"] = 4193922] = "NonZeroFacts";
+ TypeFacts[TypeFacts["BaseBooleanStrictFacts"] = 933252] = "BaseBooleanStrictFacts";
+ TypeFacts[TypeFacts["BaseBooleanFacts"] = 3145092] = "BaseBooleanFacts";
+ TypeFacts[TypeFacts["BooleanStrictFacts"] = 4078980] = "BooleanStrictFacts";
+ TypeFacts[TypeFacts["BooleanFacts"] = 4193668] = "BooleanFacts";
+ TypeFacts[TypeFacts["FalseStrictFacts"] = 3030404] = "FalseStrictFacts";
+ TypeFacts[TypeFacts["FalseFacts"] = 3145092] = "FalseFacts";
+ TypeFacts[TypeFacts["TrueStrictFacts"] = 1981828] = "TrueStrictFacts";
+ TypeFacts[TypeFacts["TrueFacts"] = 4193668] = "TrueFacts";
+ TypeFacts[TypeFacts["SymbolStrictFacts"] = 1981320] = "SymbolStrictFacts";
+ TypeFacts[TypeFacts["SymbolFacts"] = 4193160] = "SymbolFacts";
+ TypeFacts[TypeFacts["ObjectStrictFacts"] = 6166480] = "ObjectStrictFacts";
+ TypeFacts[TypeFacts["ObjectFacts"] = 8378320] = "ObjectFacts";
+ TypeFacts[TypeFacts["FunctionStrictFacts"] = 6164448] = "FunctionStrictFacts";
+ TypeFacts[TypeFacts["FunctionFacts"] = 8376288] = "FunctionFacts";
+ TypeFacts[TypeFacts["UndefinedFacts"] = 2457472] = "UndefinedFacts";
+ TypeFacts[TypeFacts["NullFacts"] = 2340752] = "NullFacts";
+ })(TypeFacts || (TypeFacts = {}));
+ var typeofEQFacts = ts.createMapFromTemplate({
"string": 1,
"number": 2,
"boolean": 4,
@@ -21218,7 +22105,7 @@ var ts;
"object": 16,
"function": 32
});
- var typeofNEFacts = ts.createMap({
+ var typeofNEFacts = ts.createMapFromTemplate({
"string": 128,
"number": 256,
"boolean": 512,
@@ -21227,14 +22114,14 @@ var ts;
"object": 2048,
"function": 4096
});
- var typeofTypesByName = ts.createMap({
+ var typeofTypesByName = ts.createMapFromTemplate({
"string": stringType,
"number": numberType,
"boolean": booleanType,
"symbol": esSymbolType,
"undefined": undefinedType
});
- var jsxElementType;
+ var typeofType = createTypeofType();
var _jsxNamespace;
var _jsxFactoryEntity;
var jsxTypes = ts.createMap();
@@ -21253,8 +22140,21 @@ var ts;
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
var _displayBuilder;
+ var TypeSystemPropertyName;
+ (function (TypeSystemPropertyName) {
+ TypeSystemPropertyName[TypeSystemPropertyName["Type"] = 0] = "Type";
+ TypeSystemPropertyName[TypeSystemPropertyName["ResolvedBaseConstructorType"] = 1] = "ResolvedBaseConstructorType";
+ TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType";
+ TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType";
+ })(TypeSystemPropertyName || (TypeSystemPropertyName = {}));
+ var CheckMode;
+ (function (CheckMode) {
+ CheckMode[CheckMode["Normal"] = 0] = "Normal";
+ CheckMode[CheckMode["SkipContextSensitive"] = 1] = "SkipContextSensitive";
+ CheckMode[CheckMode["Inferential"] = 2] = "Inferential";
+ })(CheckMode || (CheckMode = {}));
var builtinGlobals = ts.createMap();
- builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
+ builtinGlobals.set(undefinedSymbol.name, undefinedSymbol);
initializeTypeChecker();
return checker;
function getJsxNamespace() {
@@ -21284,7 +22184,12 @@ var ts;
}
function createSymbol(flags, name) {
symbolCount++;
- return new Symbol(flags, name);
+ var symbol = (new Symbol(flags | 134217728, name));
+ symbol.checkFlags = 0;
+ return symbol;
+ }
+ function isTransientSymbol(symbol) {
+ return (symbol.flags & 134217728) !== 0;
}
function getExcludedSymbolFlags(flags) {
var result = 0;
@@ -21330,7 +22235,7 @@ var ts;
mergedSymbols[source.mergeId] = target;
}
function cloneSymbol(symbol) {
- var result = createSymbol(symbol.flags | 33554432, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
result.declarations = symbol.declarations.slice(0);
result.parent = symbol.parent;
if (symbol.valueDeclaration)
@@ -21352,12 +22257,10 @@ var ts;
target.flags |= source.flags;
if (source.valueDeclaration &&
(!target.valueDeclaration ||
- (target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
+ (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) {
target.valueDeclaration = source.valueDeclaration;
}
- ts.forEach(source.declarations, function (node) {
- target.declarations.push(node);
- });
+ ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@@ -21370,6 +22273,9 @@ var ts;
}
recordMergedSymbol(target, source);
}
+ else if (target.flags & 1024) {
+ error(source.valueDeclaration.name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ }
else {
var message_2 = target.flags & 2 || source.flags & 2
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
@@ -21382,18 +22288,19 @@ var ts;
}
}
function mergeSymbolTable(target, source) {
- for (var id in source) {
- var targetSymbol = target[id];
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
if (!targetSymbol) {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
else {
- if (!(targetSymbol.flags & 33554432)) {
- target[id] = targetSymbol = cloneSymbol(targetSymbol);
+ if (!(targetSymbol.flags & 134217728)) {
+ targetSymbol = cloneSymbol(targetSymbol);
+ target.set(id, targetSymbol);
}
- mergeSymbol(targetSymbol, source[id]);
+ mergeSymbol(targetSymbol, sourceSymbol);
}
- }
+ });
}
function mergeModuleAugmentation(moduleName) {
var moduleAugmentation = moduleName.parent;
@@ -21414,7 +22321,7 @@ var ts;
}
mainModule = resolveExternalModuleSymbol(mainModule);
if (mainModule.flags & 1920) {
- mainModule = mainModule.flags & 33554432 ? mainModule : cloneSymbol(mainModule);
+ mainModule = mainModule.flags & 134217728 ? mainModule : cloneSymbol(mainModule);
mergeSymbol(mainModule, moduleAugmentation.symbol);
}
else {
@@ -21423,20 +22330,21 @@ var ts;
}
}
function addToSymbolTable(target, source, message) {
- for (var id in source) {
- if (target[id]) {
- ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message));
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
+ if (targetSymbol) {
+ ts.forEach(targetSymbol.declarations, addDeclarationDiagnostic(id, message));
}
else {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
- }
+ });
function addDeclarationDiagnostic(id, message) {
return function (declaration) { return diagnostics.add(ts.createDiagnosticForNode(declaration, message, id)); };
}
}
function getSymbolLinks(symbol) {
- if (symbol.flags & 67108864)
+ if (symbol.flags & 134217728)
return symbol;
var id = getSymbolId(symbol);
return symbolLinks[id] || (symbolLinks[id] = {});
@@ -21448,14 +22356,17 @@ var ts;
function getObjectFlags(type) {
return type.flags & 32768 ? type.objectFlags : 0;
}
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
function isGlobalSourceFile(node) {
- return node.kind === 261 && !ts.isExternalOrCommonJsModule(node);
+ return node.kind === 264 && !ts.isExternalOrCommonJsModule(node);
}
function getSymbol(symbols, name, meaning) {
if (meaning) {
- var symbol = symbols[name];
+ var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -21486,57 +22397,76 @@ var ts;
(!compilerOptions.outFile && !compilerOptions.out)) {
return true;
}
- if (isUsedInFunctionOrNonStaticProperty(usage)) {
+ if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
return true;
}
var sourceFiles = host.getSourceFiles();
return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile);
}
if (declaration.pos <= usage.pos) {
- return declaration.kind !== 223 ||
- !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ if (declaration.kind === 175) {
+ var errorBindingElement = ts.getAncestor(usage, 175);
+ if (errorBindingElement) {
+ return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
+ declaration.pos < errorBindingElement.pos;
+ }
+ return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage);
+ }
+ else if (declaration.kind === 225) {
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ }
+ return true;
+ }
+ if (usage.parent.kind === 245) {
+ return true;
}
var container = ts.getEnclosingBlockScopeContainer(declaration);
- return isUsedInFunctionOrNonStaticProperty(usage, container);
+ return isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container);
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
var container = ts.getEnclosingBlockScopeContainer(declaration);
switch (declaration.parent.parent.kind) {
- case 205:
- case 211:
+ case 207:
case 213:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration, container)) {
return true;
}
break;
}
switch (declaration.parent.parent.kind) {
- case 212:
- case 213:
+ case 214:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
return true;
}
}
return false;
}
- function isUsedInFunctionOrNonStaticProperty(usage, container) {
- var current = usage;
- while (current) {
+ function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
+ return !!ts.findAncestor(usage, function (current) {
if (current === container) {
- return false;
+ return "quit";
}
if (ts.isFunctionLike(current)) {
return true;
}
- var initializerOfNonStaticProperty = current.parent &&
- current.parent.kind === 147 &&
- (ts.getModifierFlags(current.parent) & 32) === 0 &&
+ var initializerOfProperty = current.parent &&
+ current.parent.kind === 148 &&
current.parent.initializer === current;
- if (initializerOfNonStaticProperty) {
- return true;
+ if (initializerOfProperty) {
+ if (ts.getModifierFlags(current.parent) & 32) {
+ if (declaration.kind === 150) {
+ return true;
+ }
+ }
+ else {
+ var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32);
+ if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+ return true;
+ }
+ }
}
- current = current.parent;
- }
- return false;
+ });
}
}
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
@@ -21551,18 +22481,18 @@ var ts;
if (result = getSymbol(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
- if (meaning & result.flags & 793064 && lastLocation.kind !== 278) {
+ if (meaning & result.flags & 793064 && lastLocation.kind !== 282) {
useResult = result.flags & 262144
? lastLocation === location.type ||
- lastLocation.kind === 144 ||
- lastLocation.kind === 143
+ lastLocation.kind === 145 ||
+ lastLocation.kind === 144
: false;
}
if (meaning & 107455 && result.flags & 1) {
useResult =
- lastLocation.kind === 144 ||
+ lastLocation.kind === 145 ||
(lastLocation === location.type &&
- result.valueDeclaration.kind === 144);
+ result.valueDeclaration.kind === 145);
}
}
if (useResult) {
@@ -21574,23 +22504,24 @@ var ts;
}
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location))
break;
isInExternalModule = true;
- case 230:
+ case 232:
var moduleExports = getSymbolOfNode(location).exports;
- if (location.kind === 261 || ts.isAmbientModule(location)) {
- if (result = moduleExports["default"]) {
+ if (location.kind === 264 || ts.isAmbientModule(location)) {
+ if (result = moduleExports.get("default")) {
var localSymbol = ts.getLocalSymbolForExportDefault(result);
if (localSymbol && (result.flags & meaning) && localSymbol.name === name) {
break loop;
}
result = undefined;
}
- if (moduleExports[name] &&
- moduleExports[name].flags === 8388608 &&
- ts.getDeclarationOfKind(moduleExports[name], 243)) {
+ var moduleExport = moduleExports.get(name);
+ if (moduleExport &&
+ moduleExport.flags === 8388608 &&
+ ts.getDeclarationOfKind(moduleExport, 245)) {
break;
}
}
@@ -21598,13 +22529,13 @@ var ts;
break loop;
}
break;
- case 229:
+ case 231:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
+ case 148:
case 147:
- case 146:
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
@@ -21614,17 +22545,21 @@ var ts;
}
}
break;
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
+ case 229:
if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
+ result = undefined;
+ break;
+ }
if (lastLocation && ts.getModifierFlags(lastLocation) & 32) {
error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters);
return undefined;
}
break loop;
}
- if (location.kind === 197 && meaning & 32) {
+ if (location.kind === 198 && meaning & 32) {
var className = location.name;
if (className && name === className.text) {
result = location.symbol;
@@ -21632,28 +22567,28 @@ var ts;
}
}
break;
- case 142:
+ case 143:
grandparent = location.parent.parent;
- if (ts.isClassLike(grandparent) || grandparent.kind === 227) {
+ if (ts.isClassLike(grandparent) || grandparent.kind === 229) {
if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
return undefined;
}
}
break;
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 185:
+ case 153:
+ case 227:
+ case 186:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
}
break;
- case 184:
+ case 185:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
@@ -21666,8 +22601,8 @@ var ts;
}
}
break;
- case 145:
- if (location.parent && location.parent.kind === 144) {
+ case 146:
+ if (location.parent && location.parent.kind === 145) {
location = location.parent;
}
if (location.parent && ts.isClassElement(location.parent)) {
@@ -21690,7 +22625,8 @@ var ts;
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
!checkAndReportErrorForExtendingInterface(errorLocation) &&
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
- !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning)) {
+ !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
+ !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
}
}
@@ -21702,21 +22638,31 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
- if (meaning & 2) {
+ if (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
- if (exportOrLocalSymbol.flags & 2) {
+ if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
}
}
if (result && isInExternalModule && (meaning & 107455) === 107455) {
var decls = result.declarations;
- if (decls && decls.length === 1 && decls[0].kind === 233) {
+ if (decls && decls.length === 1 && decls[0].kind === 235) {
error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name);
}
}
}
return result;
}
+ function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (decl.kind === 144 && decl.parent === container) {
+ return true;
+ }
+ }
+ return false;
+ }
function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {
if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) {
return false;
@@ -21757,9 +22703,9 @@ var ts;
function getEntityNameForExtendingInterface(node) {
switch (node.kind) {
case 70:
- case 177:
+ case 178:
return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
- case 199:
+ case 200:
ts.Debug.assert(ts.isEntityNameExpression(node.expression));
return node.expression;
default:
@@ -21786,65 +22732,84 @@ var ts;
}
return false;
}
- function checkResolvedBlockScopedVariable(result, errorLocation) {
- ts.Debug.assert((result.flags & 2) !== 0);
- var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
- ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
- if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 223), errorLocation)) {
- error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
- }
- }
- function isSameScopeDescendentOf(initial, parent, stopAt) {
- if (!parent) {
- return false;
+ function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) {
+ if (meaning & (107455 & ~1024 & ~793064)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~107455, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, name);
+ return true;
+ }
}
- for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
- if (current === parent) {
+ else if (meaning & (793064 & ~1024 & ~107455)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~793064, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, name);
return true;
}
}
return false;
}
+ function checkResolvedBlockScopedVariable(result, errorLocation) {
+ ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384));
+ var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; });
+ ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined");
+ if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
+ if (result.flags & 2) {
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 32) {
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 384) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ }
+ }
+ function isSameScopeDescendentOf(initial, parent, stopAt) {
+ return parent && !!ts.findAncestor(initial, function (n) { return n === stopAt || ts.isFunctionLike(n) ? "quit" : n === parent; });
+ }
function getAnyImportSyntax(node) {
if (ts.isAliasSymbolDeclaration(node)) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
- while (node && node.kind !== 235) {
- node = node.parent;
- }
- return node;
+ return ts.findAncestor(node, function (n) { return n.kind === 237; });
}
}
function getDeclarationOfAliasSymbol(symbol) {
- return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
+ return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
- function getTargetOfImportEqualsDeclaration(node) {
- if (node.moduleReference.kind === 245) {
+ function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {
+ if (node.moduleReference.kind === 247) {
return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
}
- return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference);
+ return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);
}
- function getTargetOfImportClause(node) {
+ function getTargetOfImportClause(node, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
if (moduleSymbol) {
- var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ?
- moduleSymbol :
- moduleSymbol.exports["export="] ?
- getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
- resolveSymbol(moduleSymbol.exports["default"]);
+ var exportDefaultSymbol = void 0;
+ if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
+ exportDefaultSymbol = moduleSymbol;
+ }
+ else {
+ var exportValue = moduleSymbol.exports.get("export=");
+ exportDefaultSymbol = exportValue
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), "default")
+ : resolveSymbol(moduleSymbol.exports.get("default"), dontResolveAlias);
+ }
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
}
else if (!exportDefaultSymbol && allowSyntheticDefaultImports) {
- return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ return resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
return exportDefaultSymbol;
}
}
- function getTargetOfNamespaceImport(node) {
+ function getTargetOfNamespaceImport(node, dontResolveAlias) {
var moduleSpecifier = node.parent.parent.moduleSpecifier;
- return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
+ return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
if (valueSymbol.flags & (793064 | 1920)) {
@@ -21861,12 +22826,9 @@ var ts;
result.exports = valueSymbol.exports;
return result;
}
- function getExportOfModule(symbol, name) {
+ function getExportOfModule(symbol, name, dontResolveAlias) {
if (symbol.flags & 1536) {
- var exportedSymbol = getExportsOfSymbol(symbol)[name];
- if (exportedSymbol) {
- return resolveSymbol(exportedSymbol);
- }
+ return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias);
}
}
function getPropertyOfVariable(symbol, name) {
@@ -21877,71 +22839,72 @@ var ts;
}
}
}
- function getExternalModuleMember(node, specifier) {
+ function getExternalModuleMember(node, specifier, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
- var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
+ var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier, dontResolveAlias);
if (targetSymbol) {
- var name_18 = specifier.propertyName || specifier.name;
- if (name_18.text) {
+ var name = specifier.propertyName || specifier.name;
+ if (name.text) {
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
return moduleSymbol;
}
var symbolFromVariable = void 0;
- if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) {
- symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_18.text);
+ if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=")) {
+ symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name.text);
}
else {
- symbolFromVariable = getPropertyOfVariable(targetSymbol, name_18.text);
+ symbolFromVariable = getPropertyOfVariable(targetSymbol, name.text);
}
- symbolFromVariable = resolveSymbol(symbolFromVariable);
- var symbolFromModule = getExportOfModule(targetSymbol, name_18.text);
- if (!symbolFromModule && allowSyntheticDefaultImports && name_18.text === "default") {
- symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
+ var symbolFromModule = getExportOfModule(targetSymbol, name.text, dontResolveAlias);
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.text === "default") {
+ symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
var symbol = symbolFromModule && symbolFromVariable ?
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
symbolFromModule || symbolFromVariable;
if (!symbol) {
- error(name_18, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_18));
+ error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name));
}
return symbol;
}
}
}
- function getTargetOfImportSpecifier(node) {
- return getExternalModuleMember(node.parent.parent.parent, node);
+ function getTargetOfImportSpecifier(node, dontResolveAlias) {
+ return getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias);
}
- function getTargetOfNamespaceExportDeclaration(node) {
- return resolveExternalModuleSymbol(node.parent.symbol);
+ function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
+ return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node) {
+ function getTargetOfExportSpecifier(node, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
- getExternalModuleMember(node.parent.parent, node) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920);
+ getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
+ resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfExportAssignment(node) {
- return resolveEntityName(node.expression, 107455 | 793064 | 1920);
+ function getTargetOfExportAssignment(node, dontResolveAlias) {
+ return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfAliasDeclaration(node) {
+ function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
switch (node.kind) {
- case 234:
- return getTargetOfImportEqualsDeclaration(node);
case 236:
- return getTargetOfImportClause(node);
- case 237:
- return getTargetOfNamespaceImport(node);
+ return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
+ case 238:
+ return getTargetOfImportClause(node, dontRecursivelyResolve);
case 239:
- return getTargetOfImportSpecifier(node);
- case 243:
- return getTargetOfExportSpecifier(node);
- case 240:
- return getTargetOfExportAssignment(node);
- case 233:
- return getTargetOfNamespaceExportDeclaration(node);
+ return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
+ case 241:
+ return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
+ case 245:
+ return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ case 242:
+ return getTargetOfExportAssignment(node, dontRecursivelyResolve);
+ case 235:
+ return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
- function resolveSymbol(symbol) {
- return symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920)) ? resolveAlias(symbol) : symbol;
+ function resolveSymbol(symbol, dontResolveAlias) {
+ var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
@@ -21980,10 +22943,10 @@ var ts;
links.referenced = true;
var node = getDeclarationOfAliasSymbol(symbol);
ts.Debug.assert(!!node);
- if (node.kind === 240) {
+ if (node.kind === 242) {
checkExpressionCached(node.expression);
}
- else if (node.kind === 243) {
+ else if (node.kind === 245) {
checkExpressionCached(node.propertyName || node.name);
}
else if (ts.isInternalModuleImportEqualsDeclaration(node)) {
@@ -21995,11 +22958,11 @@ var ts;
if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
entityName = entityName.parent;
}
- if (entityName.kind === 70 || entityName.parent.kind === 141) {
+ if (entityName.kind === 70 || entityName.parent.kind === 142) {
return resolveEntityName(entityName, 1920, false, dontResolveAlias);
}
else {
- ts.Debug.assert(entityName.parent.kind === 234);
+ ts.Debug.assert(entityName.parent.kind === 236);
return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias);
}
}
@@ -22018,9 +22981,19 @@ var ts;
return undefined;
}
}
- else if (name.kind === 141 || name.kind === 177) {
- var left = name.kind === 141 ? name.left : name.expression;
- var right = name.kind === 141 ? name.right : name.name;
+ else if (name.kind === 142 || name.kind === 178) {
+ var left = void 0;
+ if (name.kind === 142) {
+ left = name.left;
+ }
+ else if (name.kind === 178 &&
+ (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) {
+ left = name.expression;
+ }
+ else {
+ return undefined;
+ }
+ var right = name.kind === 142 ? name.right : name.name;
var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location);
if (!namespace || ts.nodeIsMissing(right)) {
return undefined;
@@ -22036,10 +23009,15 @@ var ts;
return undefined;
}
}
+ else if (name.kind === 184) {
+ return ts.isEntityNameExpression(name.expression) ?
+ resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) :
+ undefined;
+ }
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -22047,7 +23025,7 @@ var ts;
}
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) {
if (isForAugmentation === void 0) { isForAugmentation = false; }
- if (moduleReferenceExpression.kind !== 9) {
+ if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) {
return;
}
var moduleReferenceLiteral = moduleReferenceExpression;
@@ -22084,11 +23062,10 @@ var ts;
}
if (!isRelative && resolvedModule && !ts.extensionIsTypeScript(resolvedModule.extension)) {
if (isForAugmentation) {
- ts.Debug.assert(!!moduleNotFoundError);
var diag = ts.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
- error(errorNode, diag, moduleName, resolvedModule.resolvedFileName);
+ error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
- else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
+ else if (noImplicitAny && moduleNotFoundError) {
error(errorNode, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
}
return undefined;
@@ -22110,27 +23087,35 @@ var ts;
}
return undefined;
}
- function resolveExternalModuleSymbol(moduleSymbol) {
- return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol;
+ function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
+ return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports.get("export="), dontResolveAlias)) || moduleSymbol;
}
- function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
- var symbol = resolveExternalModuleSymbol(moduleSymbol);
- if (symbol && !(symbol.flags & (1536 | 3))) {
+ function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression, dontResolveAlias) {
+ var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
+ if (!dontResolveAlias && symbol && !(symbol.flags & (1536 | 3))) {
error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
symbol = undefined;
}
return symbol;
}
function hasExportAssignmentSymbol(moduleSymbol) {
- return moduleSymbol.exports["export="] !== undefined;
+ return moduleSymbol.exports.get("export=") !== undefined;
}
function getExportsOfModuleAsArray(moduleSymbol) {
return symbolsToArray(getExportsOfModule(moduleSymbol));
}
+ function getExportsAndPropertiesOfModule(moduleSymbol) {
+ var exports = getExportsOfModuleAsArray(moduleSymbol);
+ var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+ if (exportEquals !== moduleSymbol) {
+ ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+ }
+ return exports;
+ }
function tryGetMemberInModuleExports(memberName, moduleSymbol) {
var symbolTable = getExportsOfModule(moduleSymbol);
if (symbolTable) {
- return symbolTable[memberName];
+ return symbolTable.get(memberName);
}
}
function getExportsOfSymbol(symbol) {
@@ -22141,24 +23126,28 @@ var ts;
return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol));
}
function extendExportSymbols(target, source, lookupTable, exportNode) {
- for (var id in source) {
- if (id !== "default" && !target[id]) {
- target[id] = source[id];
+ source && source.forEach(function (sourceSymbol, id) {
+ if (id === "default")
+ return;
+ var targetSymbol = target.get(id);
+ if (!targetSymbol) {
+ target.set(id, sourceSymbol);
if (lookupTable && exportNode) {
- lookupTable[id] = {
+ lookupTable.set(id, {
specifierText: ts.getTextOfNode(exportNode.moduleSpecifier)
- };
+ });
}
}
- else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
- if (!lookupTable[id].exportsWithDuplicate) {
- lookupTable[id].exportsWithDuplicate = [exportNode];
+ else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
+ var collisionTracker = lookupTable.get(id);
+ if (!collisionTracker.exportsWithDuplicate) {
+ collisionTracker.exportsWithDuplicate = [exportNode];
}
else {
- lookupTable[id].exportsWithDuplicate.push(exportNode);
+ collisionTracker.exportsWithDuplicate.push(exportNode);
}
}
- }
+ });
}
function getExportsForModule(moduleSymbol) {
var visitedSymbols = [];
@@ -22170,26 +23159,26 @@ var ts;
}
visitedSymbols.push(symbol);
var symbols = ts.cloneMap(symbol.exports);
- var exportStars = symbol.exports["__export"];
+ var exportStars = symbol.exports.get("__export");
if (exportStars) {
var nestedSymbols = ts.createMap();
- var lookupTable = ts.createMap();
+ var lookupTable_1 = ts.createMap();
for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
var node = _a[_i];
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
var exportedSymbols = visit(resolvedModule);
- extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node);
+ extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
}
- for (var id in lookupTable) {
- var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate;
- if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) {
- continue;
+ lookupTable_1.forEach(function (_a, id) {
+ var exportsWithDuplicate = _a.exportsWithDuplicate;
+ if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
+ return;
}
- for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) {
- var node = exportsWithDuplicate_1[_b];
- diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable[id].specifierText, id));
+ for (var _i = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _i < exportsWithDuplicate_1.length; _i++) {
+ var node = exportsWithDuplicate_1[_i];
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable_1.get(id).specifierText, id));
}
- }
+ });
extendExportSymbols(symbols, nestedSymbols);
}
return symbols;
@@ -22211,22 +23200,13 @@ var ts;
: symbol;
}
function symbolIsValue(symbol) {
- if (symbol.flags & 16777216) {
- return symbolIsValue(getSymbolLinks(symbol).target);
- }
- if (symbol.flags & 107455) {
- return true;
- }
- if (symbol.flags & 8388608) {
- return (resolveAlias(symbol).flags & 107455) !== 0;
- }
- return false;
+ return !!(symbol.flags & 107455 || symbol.flags & 8388608 && resolveAlias(symbol).flags & 107455);
}
function findConstructorDeclaration(node) {
var members = node.members;
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
var member = members_1[_i];
- if (member.kind === 150 && ts.nodeIsPresent(member.body)) {
+ if (member.kind === 151 && ts.nodeIsPresent(member.body)) {
return member;
}
}
@@ -22254,6 +23234,9 @@ var ts;
type.symbol = symbol;
return type;
}
+ function createTypeofType() {
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ }
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
name.charCodeAt(1) === 95 &&
@@ -22262,16 +23245,15 @@ var ts;
}
function getNamedMembers(members) {
var result;
- for (var id in members) {
+ members.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
if (!result)
result = [];
- var symbol = members[id];
if (symbolIsValue(symbol)) {
result.push(symbol);
}
}
- }
+ });
return result || emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
@@ -22290,19 +23272,19 @@ var ts;
}
function forEachSymbolTableInScope(enclosingDeclaration, callback) {
var result;
- for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
- if (location_1.locals && !isGlobalSourceFile(location_1)) {
- if (result = callback(location_1.locals)) {
+ for (var location = enclosingDeclaration; location; location = location.parent) {
+ if (location.locals && !isGlobalSourceFile(location)) {
+ if (result = callback(location.locals)) {
return result;
}
}
- switch (location_1.kind) {
- case 261:
- if (!ts.isExternalOrCommonJsModule(location_1)) {
+ switch (location.kind) {
+ case 264:
+ if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
- if (result = callback(getSymbolOfNode(location_1).exports)) {
+ case 232:
+ if (result = callback(getSymbolOfNode(location).exports)) {
return result;
}
break;
@@ -22315,6 +23297,16 @@ var ts;
}
function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
function getAccessibleSymbolChainFromSymbolTable(symbols) {
+ return getAccessibleSymbolChainFromSymbolTableWorker(symbols, []);
+ }
+ function getAccessibleSymbolChainFromSymbolTableWorker(symbols, visitedSymbolTables) {
+ if (ts.contains(visitedSymbolTables, symbols)) {
+ return undefined;
+ }
+ visitedSymbolTables.push(symbols);
+ var result = trySymbolTable(symbols);
+ visitedSymbolTables.pop();
+ return result;
function canQualifySymbol(symbolFromSymbolTable, meaning) {
if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
return true;
@@ -22328,26 +23320,28 @@ var ts;
canQualifySymbol(symbolFromSymbolTable, meaning);
}
}
- if (isAccessible(symbols[symbol.name])) {
- return [symbol];
- }
- return ts.forEachProperty(symbols, function (symbolFromSymbolTable) {
- if (symbolFromSymbolTable.flags & 8388608
- && symbolFromSymbolTable.name !== "export="
- && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) {
- if (!useOnlyExternalAliasing ||
- ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
- var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
- return [symbolFromSymbolTable];
- }
- var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
- if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
- return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ function trySymbolTable(symbols) {
+ if (isAccessible(symbols.get(symbol.name))) {
+ return [symbol];
+ }
+ return ts.forEachEntry(symbols, function (symbolFromSymbolTable) {
+ if (symbolFromSymbolTable.flags & 8388608
+ && symbolFromSymbolTable.name !== "export="
+ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) {
+ if (!useOnlyExternalAliasing ||
+ ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
+ var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
+ if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ return [symbolFromSymbolTable];
+ }
+ var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
+ if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
+ return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ }
}
}
- }
- });
+ });
+ }
}
if (symbol) {
if (!(isPropertyOrMethodDeclarationSymbol(symbol))) {
@@ -22358,14 +23352,14 @@ var ts;
function needsQualification(symbol, enclosingDeclaration, meaning) {
var qualify = false;
forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
- var symbolFromSymbolTable = symbolTable[symbol.name];
+ var symbolFromSymbolTable = symbolTable.get(symbol.name);
if (!symbolFromSymbolTable) {
return false;
}
if (symbolFromSymbolTable === symbol) {
return true;
}
- symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+ symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
if (symbolFromSymbolTable.flags & meaning) {
qualify = true;
return true;
@@ -22379,10 +23373,10 @@ var ts;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
switch (declaration.kind) {
- case 147:
- case 149:
- case 151:
+ case 148:
+ case 150:
case 152:
+ case 153:
continue;
default:
return false;
@@ -22430,15 +23424,12 @@ var ts;
}
return { accessibility: 0 };
function getExternalModuleContainer(declaration) {
- for (; declaration; declaration = declaration.parent) {
- if (hasExternalModuleSymbol(declaration)) {
- return getSymbolOfNode(declaration);
- }
- }
+ var node = ts.findAncestor(declaration, hasExternalModuleSymbol);
+ return node && getSymbolOfNode(node);
}
}
function hasExternalModuleSymbol(declaration) {
- return ts.isAmbientModule(declaration) || (declaration.kind === 261 && ts.isExternalOrCommonJsModule(declaration));
+ return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration));
}
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
var aliasesToMakeVisible;
@@ -22472,11 +23463,11 @@ var ts;
}
function isEntityNameVisible(entityName, enclosingDeclaration) {
var meaning;
- if (entityName.parent.kind === 160 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning = 107455 | 1048576;
}
- else if (entityName.kind === 141 || entityName.kind === 177 ||
- entityName.parent.kind === 234) {
+ else if (entityName.kind === 142 || entityName.kind === 178 ||
+ entityName.parent.kind === 236) {
meaning = 1920;
}
else {
@@ -22524,6 +23515,483 @@ var ts;
}
return result;
}
+ function createNodeBuilder() {
+ var context;
+ return {
+ typeToTypeNode: function (type, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ }
+ };
+ function createNodeBuilderContext(enclosingDeclaration, flags) {
+ return {
+ enclosingDeclaration: enclosingDeclaration,
+ flags: flags,
+ encounteredError: false,
+ inObjectTypeLiteral: false,
+ checkAlias: true,
+ symbolStack: undefined
+ };
+ }
+ function typeToTypeNodeHelper(type) {
+ if (!type) {
+ context.encounteredError = true;
+ return undefined;
+ }
+ if (type.flags & 1) {
+ return ts.createKeywordTypeNode(118);
+ }
+ if (type.flags & 2) {
+ return ts.createKeywordTypeNode(135);
+ }
+ if (type.flags & 4) {
+ return ts.createKeywordTypeNode(132);
+ }
+ if (type.flags & 8) {
+ return ts.createKeywordTypeNode(121);
+ }
+ if (type.flags & 16) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & (32)) {
+ return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ }
+ if (type.flags & (64)) {
+ return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ }
+ if (type.flags & 128) {
+ return type.intrinsicName === "true" ? ts.createTrue() : ts.createFalse();
+ }
+ if (type.flags & 256) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 1024) {
+ return ts.createKeywordTypeNode(104);
+ }
+ if (type.flags & 2048) {
+ return ts.createKeywordTypeNode(138);
+ }
+ if (type.flags & 4096) {
+ return ts.createKeywordTypeNode(94);
+ }
+ if (type.flags & 8192) {
+ return ts.createKeywordTypeNode(129);
+ }
+ if (type.flags & 512) {
+ return ts.createKeywordTypeNode(136);
+ }
+ if (type.flags & 16777216) {
+ return ts.createKeywordTypeNode(133);
+ }
+ if (type.flags & 16384 && type.isThisType) {
+ if (context.inObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ context.encounteredError = true;
+ }
+ }
+ return ts.createThis();
+ }
+ var objectFlags = getObjectFlags(type);
+ if (objectFlags & 4) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return typeReferenceToTypeNode(type);
+ }
+ if (objectFlags & 3) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 16384) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (context.checkAlias && type.aliasSymbol) {
+ var name = symbolToName(type.aliasSymbol, false);
+ var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ return ts.createTypeReferenceNode(name, typeArgumentNodes);
+ }
+ context.checkAlias = false;
+ if (type.flags & 65536) {
+ var formattedUnionTypes = formatUnionTypes(type.types);
+ var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes);
+ if (unionTypeNodes && unionTypeNodes.length > 0) {
+ return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes);
+ }
+ else {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ }
+ if (type.flags & 131072) {
+ return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types));
+ }
+ if (objectFlags & (16 | 32)) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return createAnonymousTypeNode(type);
+ }
+ if (type.flags & 262144) {
+ var indexedType = type.type;
+ var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ return ts.createTypeOperatorNode(indexTypeNode);
+ }
+ if (type.flags & 524288) {
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ return ts.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
+ }
+ ts.Debug.fail("Should be unreachable.");
+ function mapToTypeNodeArray(types) {
+ var result = [];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type_1 = types_1[_i];
+ var typeNode = typeToTypeNodeHelper(type_1);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ function createMappedTypeNodeFromType(type) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var typeParameter = getTypeParameterFromMappedType(type);
+ var typeParameterNode = typeParameterToDeclaration(typeParameter);
+ var templateType = getTemplateTypeFromMappedType(type);
+ var templateTypeNode = typeToTypeNodeHelper(templateType);
+ var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined;
+ var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined;
+ return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ }
+ function createAnonymousTypeNode(type) {
+ var symbol = type.symbol;
+ if (symbol) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512) ||
+ shouldWriteTypeOfFunctionSymbol()) {
+ return createTypeQueryNodeFromSymbol(symbol);
+ }
+ else if (ts.contains(context.symbolStack, symbol)) {
+ var typeAlias = getTypeAliasForTypeLiteral(type);
+ if (typeAlias) {
+ var entityName = symbolToName(typeAlias, false);
+ return ts.createTypeReferenceNode(entityName, undefined);
+ }
+ else {
+ return ts.createKeywordTypeNode(118);
+ }
+ }
+ else {
+ if (!context.symbolStack) {
+ context.symbolStack = [];
+ }
+ context.symbolStack.push(symbol);
+ var result = createTypeNodeFromObjectType(type);
+ context.symbolStack.pop();
+ return result;
+ }
+ }
+ else {
+ return createTypeNodeFromObjectType(type);
+ }
+ function shouldWriteTypeOfFunctionSymbol() {
+ var isStaticMethodSymbol = !!(symbol.flags & 8192 &&
+ ts.forEach(symbol.declarations, function (declaration) { return ts.getModifierFlags(declaration) & 32; }));
+ var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
+ (symbol.parent ||
+ ts.forEach(symbol.declarations, function (declaration) {
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
+ }));
+ if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
+ return ts.contains(context.symbolStack, symbol);
+ }
+ }
+ }
+ function createTypeNodeFromObjectType(type) {
+ if (type.objectFlags & 32) {
+ if (getConstraintTypeFromMappedType(type).flags & (16384 | 262144)) {
+ return createMappedTypeNodeFromType(type);
+ }
+ }
+ var resolved = resolveStructuredTypeMembers(type);
+ if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+ if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
+ return ts.createTypeLiteralNode(undefined);
+ }
+ if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
+ var signature = resolved.callSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 159);
+ }
+ if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
+ var signature = resolved.constructSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 160);
+ }
+ }
+ var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
+ context.inObjectTypeLiteral = true;
+ var members = createTypeNodesFromResolvedType(resolved);
+ context.inObjectTypeLiteral = saveInObjectTypeLiteral;
+ return ts.createTypeLiteralNode(members);
+ }
+ function createTypeQueryNodeFromSymbol(symbol) {
+ var entityName = symbolToName(symbol, false);
+ return ts.createTypeQueryNode(entityName);
+ }
+ function typeReferenceToTypeNode(type) {
+ var typeArguments = type.typeArguments || emptyArray;
+ if (type.target === globalArrayType) {
+ var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ return ts.createArrayTypeNode(elementType);
+ }
+ else if (type.target.objectFlags & 8) {
+ if (typeArguments.length > 0) {
+ var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
+ return ts.createTupleTypeNode(tupleConstituentNodes);
+ }
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ else {
+ var outerTypeParameters = type.target.outerTypeParameters;
+ var i = 0;
+ var qualifiedName = undefined;
+ if (outerTypeParameters) {
+ var length_1 = outerTypeParameters.length;
+ while (i < length_1) {
+ var start = i;
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ do {
+ i++;
+ } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
+ if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
+ var qualifiedNamePart = symbolToName(parent, true);
+ if (!qualifiedName) {
+ qualifiedName = ts.createQualifiedName(qualifiedNamePart, undefined);
+ }
+ else {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = qualifiedNamePart;
+ qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
+ }
+ }
+ }
+ }
+ var entityName = undefined;
+ var nameIdentifier = symbolToName(type.symbol, true);
+ if (qualifiedName) {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = nameIdentifier;
+ entityName = qualifiedName;
+ }
+ else {
+ entityName = nameIdentifier;
+ }
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ var typeArgumentNodes = ts.some(typeArguments) ? mapToTypeNodeArray(typeArguments.slice(i, typeParameterCount - i)) : undefined;
+ return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
+ }
+ }
+ function createTypeNodesFromResolvedType(resolvedType) {
+ var typeElements = [];
+ for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
+ var signature = _a[_i];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 154));
+ }
+ for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
+ var signature = _c[_b];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ }
+ if (resolvedType.stringIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ }
+ if (resolvedType.numberIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ }
+ var properties = resolvedType.properties;
+ if (!properties) {
+ return typeElements;
+ }
+ for (var _d = 0, properties_2 = properties; _d < properties_2.length; _d++) {
+ var propertySymbol = properties_2[_d];
+ var propertyType = getTypeOfSymbol(propertySymbol);
+ var oldDeclaration = propertySymbol.declarations && propertySymbol.declarations[0];
+ if (!oldDeclaration) {
+ return;
+ }
+ var propertyName = oldDeclaration.name;
+ var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined;
+ if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) {
+ var signatures = getSignaturesOfType(propertyType, 0);
+ for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) {
+ var signature = signatures_1[_e];
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149);
+ methodDeclaration.name = propertyName;
+ methodDeclaration.questionToken = optionalToken;
+ typeElements.push(methodDeclaration);
+ }
+ }
+ else {
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118);
+ typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ }
+ }
+ return typeElements.length ? typeElements : undefined;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132);
+ var name = ts.getNameFromIndexInfo(indexInfo);
+ var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type);
+ return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode);
+ }
+ function signatureToSignatureDeclarationHelper(signature, kind) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter); });
+ var returnTypeNode;
+ if (signature.typePredicate) {
+ var typePredicate = signature.typePredicate;
+ var parameterName = typePredicate.kind === 1 ? ts.createIdentifier(typePredicate.parameterName) : ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type);
+ returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
+ }
+ else {
+ var returnType = getReturnTypeOfSignature(signature);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ }
+ var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined;
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ }
+ function typeParameterToDeclaration(type) {
+ var constraint = getConstraintFromTypeParameter(type);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var defaultParameter = getDefaultFromTypeParameter(type);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
+ var name = symbolToName(type.symbol, true);
+ return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
+ }
+ function symbolToParameterDeclaration(parameterSymbol) {
+ var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145);
+ var parameterType = getTypeOfSymbol(parameterSymbol);
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType);
+ var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer);
+ return parameterNode;
+ }
+ function symbolToName(symbol, expectsIdentifier) {
+ var chain;
+ var isTypeParameter = symbol.flags & 262144;
+ if (!isTypeParameter && context.enclosingDeclaration) {
+ chain = getSymbolChain(symbol, 0, true);
+ ts.Debug.assert(chain && chain.length > 0);
+ }
+ else {
+ chain = [symbol];
+ }
+ if (expectsIdentifier && chain.length !== 1
+ && !context.encounteredError
+ && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ context.encounteredError = true;
+ }
+ return createEntityNameFromSymbolChain(chain, chain.length - 1);
+ function createEntityNameFromSymbolChain(chain, index) {
+ ts.Debug.assert(chain && 0 <= index && index < chain.length);
+ var symbol = chain[index];
+ var typeParameterString = "";
+ if (index > 0) {
+ var parentSymbol = chain[index - 1];
+ var typeParameters = void 0;
+ if (getCheckFlags(symbol) & 1) {
+ typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
+ }
+ else {
+ var targetSymbol = getTargetSymbol(parentSymbol);
+ if (targetSymbol.flags & (32 | 64 | 524288)) {
+ typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
+ }
+ }
+ if (typeParameters && typeParameters.length > 0) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowTypeParameterInQualifiedName)) {
+ context.encounteredError = true;
+ }
+ var writer = ts.getSingleLineStringWriter();
+ var displayBuilder = getSymbolDisplayBuilder();
+ displayBuilder.buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, context.enclosingDeclaration, 0);
+ typeParameterString = writer.string();
+ ts.releaseStringWriter(writer);
+ }
+ }
+ var symbolName = getNameOfSymbol(symbol);
+ var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
+ var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
+ }
+ function getSymbolChain(symbol, meaning, endOfChain) {
+ var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, false);
+ var parentSymbol;
+ if (!accessibleSymbolChain ||
+ needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ var parentChain = getSymbolChain(parent, getQualifiedLeftMeaning(meaning), false);
+ if (parentChain) {
+ parentSymbol = parent;
+ accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [symbol]);
+ }
+ }
+ }
+ if (accessibleSymbolChain) {
+ return accessibleSymbolChain;
+ }
+ if (endOfChain ||
+ !(!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) &&
+ !(symbol.flags & (2048 | 4096))) {
+ return [symbol];
+ }
+ }
+ function getNameOfSymbol(symbol) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
+ }
+ }
+ return symbol.name;
+ }
+ }
+ }
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
var writer = ts.getSingleLineStringWriter();
getSymbolDisplayBuilder().buildTypePredicateDisplay(typePredicate, writer, enclosingDeclaration, flags);
@@ -22567,11 +24035,8 @@ var ts;
}
function getTypeAliasForTypeLiteral(type) {
if (type.symbol && type.symbol.flags & 2048) {
- var node = type.symbol.declarations[0].parent;
- while (node.kind === 166) {
- node = node.parent;
- }
- if (node.kind === 228) {
+ var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; });
+ if (node.kind === 230) {
return getSymbolOfNode(node);
}
}
@@ -22579,29 +24044,32 @@ var ts;
}
function isTopLevelInExternalModuleAugmentation(node) {
return node && node.parent &&
- node.parent.kind === 231 &&
+ node.parent.kind === 233 &&
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
}
- function getSymbolDisplayBuilder() {
- function getNameOfSymbol(symbol) {
- if (symbol.declarations && symbol.declarations.length) {
- var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
- }
- switch (declaration.kind) {
- case 197:
- return "(Anonymous class)";
- case 184:
- case 185:
- return "(Anonymous function)";
- }
+ function getNameOfSymbol(symbol) {
+ if (symbol.declarations && symbol.declarations.length) {
+ var declaration = symbol.declarations[0];
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
+ }
+ function getSymbolDisplayBuilder() {
function appendSymbolNameOnly(symbol, writer) {
writer.writeSymbol(getNameOfSymbol(symbol), symbol);
}
@@ -22629,7 +24097,7 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
}
else {
@@ -22648,9 +24116,9 @@ var ts;
var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2));
if (!accessibleSymbolChain ||
needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
- var parent_5 = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
- if (parent_5) {
- walkSymbol(parent_5, getQualifiedLeftMeaning(meaning), false);
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ walkSymbol(parent, getQualifiedLeftMeaning(meaning), false);
}
}
if (accessibleSymbolChain) {
@@ -22680,7 +24148,7 @@ var ts;
return writeType(type, globalFlags);
function writeType(type, flags) {
var nextFlags = flags & ~512;
- if (type.flags & 16015) {
+ if (type.flags & 16793231) {
writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
? "any"
: type.intrinsicName);
@@ -22705,7 +24173,7 @@ var ts;
else if (!(flags & 512) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
- writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
+ writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
}
else if (type.flags & 196608) {
writeUnionOrIntersectionType(type, nextFlags);
@@ -22780,15 +24248,15 @@ var ts;
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
if (outerTypeParameters) {
- var length_1 = outerTypeParameters.length;
- while (i < length_1) {
+ var length_2 = outerTypeParameters.length;
+ while (i < length_2) {
var start = i;
- var parent_6 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
do {
i++;
- } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_6);
+ } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
- writeSymbolTypeReference(parent_6, typeArguments, start, i, flags);
+ writeSymbolTypeReference(parent, typeArguments, start, i, flags);
writePunctuation(writer, 22);
}
}
@@ -22814,7 +24282,8 @@ var ts;
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & (32 | 384 | 512)) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
else if (shouldWriteTypeOfFunctionSymbol()) {
@@ -22847,7 +24316,7 @@ var ts;
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
(symbol.parent ||
ts.forEach(symbol.declarations, function (declaration) {
- return declaration.parent.kind === 261 || declaration.parent.kind === 231;
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
return !!(flags & 2) ||
@@ -22860,32 +24329,13 @@ var ts;
writeSpace(writer);
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags);
}
- function writeIndexSignature(info, keyword) {
- if (info) {
- if (info.isReadonly) {
- writeKeyword(writer, 130);
- writeSpace(writer);
- }
- writePunctuation(writer, 20);
- writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeKeyword(writer, keyword);
- writePunctuation(writer, 21);
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeType(info.type, 0);
- writePunctuation(writer, 24);
- writer.writeLine();
- }
- }
function writePropertyWithModifiers(prop) {
if (isReadonlySymbol(prop)) {
writeKeyword(writer, 130);
writeSpace(writer);
}
buildSymbolDisplay(prop, writer);
- if (prop.flags & 536870912) {
+ if (prop.flags & 67108864) {
writePunctuation(writer, 54);
}
}
@@ -22961,15 +24411,15 @@ var ts;
writePunctuation(writer, 24);
writer.writeLine();
}
- writeIndexSignature(resolved.stringIndexInfo, 134);
- writeIndexSignature(resolved.numberIndexInfo, 132);
+ buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack);
+ buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
- for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) {
- var signature = signatures_1[_f];
+ for (var _f = 0, signatures_2 = signatures; _f < signatures_2.length; _f++) {
+ var signature = signatures_2[_f];
writePropertyWithModifiers(p);
buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack);
writePunctuation(writer, 24);
@@ -23028,32 +24478,43 @@ var ts;
writeSpace(writer);
buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack);
}
+ var defaultType = getDefaultFromTypeParameter(tp);
+ if (defaultType) {
+ writeSpace(writer);
+ writePunctuation(writer, 57);
+ writeSpace(writer);
+ buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack);
+ }
}
function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) {
var parameterNode = p.valueDeclaration;
- if (ts.isRestParameter(parameterNode)) {
+ if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) {
writePunctuation(writer, 23);
}
- if (ts.isBindingPattern(parameterNode.name)) {
+ if (parameterNode && ts.isBindingPattern(parameterNode.name)) {
buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack);
}
else {
appendSymbolNameOnly(p, writer);
}
- if (isOptionalParameter(parameterNode)) {
+ if (parameterNode && isOptionalParameter(parameterNode)) {
writePunctuation(writer, 54);
}
writePunctuation(writer, 55);
writeSpace(writer);
- buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack);
+ var type = getTypeOfSymbol(p);
+ if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
+ type = includeFalsyTypes(type, 2048);
+ }
+ buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
writePunctuation(writer, 16);
buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
writePunctuation(writer, 17);
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
writePunctuation(writer, 20);
var elements = bindingPattern.elements;
buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
@@ -23067,9 +24528,9 @@ var ts;
if (ts.isOmittedExpression(bindingElement)) {
return;
}
- ts.Debug.assert(bindingElement.kind === 174);
+ ts.Debug.assert(bindingElement.kind === 175);
if (bindingElement.propertyName) {
- writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
+ writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName));
writePunctuation(writer, 55);
writeSpace(writer);
}
@@ -23141,6 +24602,10 @@ var ts;
buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
+ var returnType = getReturnTypeOfSignature(signature);
+ if (flags & 2048 && isTypeAny(returnType)) {
+ return;
+ }
if (flags & 8) {
writeSpace(writer);
writePunctuation(writer, 35);
@@ -23153,7 +24618,6 @@ var ts;
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
}
else {
- var returnType = getReturnTypeOfSignature(signature);
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
}
}
@@ -23171,6 +24635,32 @@ var ts;
buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack);
buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack);
}
+ function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) {
+ if (info) {
+ if (info.isReadonly) {
+ writeKeyword(writer, 130);
+ writeSpace(writer);
+ }
+ writePunctuation(writer, 20);
+ writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ switch (kind) {
+ case 1:
+ writeKeyword(writer, 132);
+ break;
+ case 0:
+ writeKeyword(writer, 135);
+ break;
+ }
+ writePunctuation(writer, 21);
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
+ writePunctuation(writer, 24);
+ writer.writeLine();
+ }
+ }
return _displayBuilder || (_displayBuilder = {
buildSymbolDisplay: buildSymbolDisplay,
buildTypeDisplay: buildTypeDisplay,
@@ -23181,6 +24671,7 @@ var ts;
buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
buildSignatureDisplay: buildSignatureDisplay,
+ buildIndexSignatureDisplay: buildIndexSignatureDisplay,
buildReturnTypeDisplay: buildReturnTypeDisplay
});
}
@@ -23195,63 +24686,63 @@ var ts;
return false;
function determineIfDeclarationIsVisible() {
switch (node.kind) {
- case 174:
+ case 175:
return isDeclarationVisible(node.parent.parent);
- case 223:
+ case 225:
if (ts.isBindingPattern(node.name) &&
!node.name.elements.length) {
return false;
}
- case 230:
- case 226:
- case 227:
+ case 232:
case 228:
- case 225:
case 229:
- case 234:
+ case 230:
+ case 227:
+ case 231:
+ case 236:
if (ts.isExternalModuleAugmentation(node)) {
return true;
}
- var parent_7 = getDeclarationContainer(node);
+ var parent = getDeclarationContainer(node);
if (!(ts.getCombinedModifierFlags(node) & 1) &&
- !(node.kind !== 234 && parent_7.kind !== 261 && ts.isInAmbientContext(parent_7))) {
- return isGlobalSourceFile(parent_7);
+ !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) {
+ return isGlobalSourceFile(parent);
}
- return isDeclarationVisible(parent_7);
+ return isDeclarationVisible(parent);
+ case 148:
case 147:
- case 146:
- case 151:
case 152:
+ case 153:
+ case 150:
case 149:
- case 148:
if (ts.getModifierFlags(node) & (8 | 16)) {
return false;
}
- case 150:
- case 154:
- case 153:
+ case 151:
case 155:
- case 144:
- case 231:
- case 158:
+ case 154:
+ case 156:
+ case 145:
+ case 233:
case 159:
- case 161:
- case 157:
+ case 160:
case 162:
+ case 158:
case 163:
case 164:
case 165:
case 166:
+ case 167:
return isDeclarationVisible(node.parent);
- case 236:
- case 237:
+ case 238:
case 239:
+ case 241:
return false;
- case 143:
- case 261:
- case 233:
+ case 144:
+ case 264:
+ case 235:
return true;
- case 240:
+ case 242:
return false;
default:
return false;
@@ -23260,10 +24751,10 @@ var ts;
}
function collectLinkedAliases(node) {
var exportSymbol;
- if (node.parent && node.parent.kind === 240) {
+ if (node.parent && node.parent.kind === 242) {
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
- else if (node.parent.kind === 243) {
+ else if (node.parent.kind === 245) {
var exportSpecifier = node.parent;
exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
@@ -23295,8 +24786,8 @@ var ts;
function pushTypeResolution(target, propertyName) {
var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
if (resolutionCycleStartIndex >= 0) {
- var length_2 = resolutionTargets.length;
- for (var i = resolutionCycleStartIndex; i < length_2; i++) {
+ var length_3 = resolutionTargets.length;
+ for (var i = resolutionCycleStartIndex; i < length_3; i++) {
resolutionResults[i] = false;
}
return false;
@@ -23338,21 +24829,20 @@ var ts;
return resolutionResults.pop();
}
function getDeclarationContainer(node) {
- node = ts.getRootDeclaration(node);
- while (node) {
+ node = ts.findAncestor(ts.getRootDeclaration(node), function (node) {
switch (node.kind) {
- case 223:
- case 224:
+ case 225:
+ case 226:
+ case 241:
+ case 240:
case 239:
case 238:
- case 237:
- case 236:
- node = node.parent;
- break;
+ return false;
default:
- return node.parent;
+ return true;
}
- }
+ });
+ return node && node.parent;
}
function getTypeOfPrototypeProperty(prototype) {
var classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
@@ -23365,32 +24855,34 @@ var ts;
function isTypeAny(type) {
return type && (type.flags & 1) !== 0;
}
- function isTypeNever(type) {
- return type && (type.flags & 8192) !== 0;
- }
function getTypeForBindingElementParent(node) {
var symbol = getSymbolOfNode(node);
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
}
function isComputedNonLiteralName(name) {
- return name.kind === 142 && !ts.isStringOrNumericLiteral(name.expression);
+ return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression);
}
function getRestType(source, properties, symbol) {
- ts.Debug.assert(!!(source.flags & 32768), "Rest types only support object types right now.");
+ source = filterType(source, function (t) { return !(t.flags & 6144); });
+ if (source.flags & 8192) {
+ return emptyObjectType;
+ }
+ if (source.flags & 65536) {
+ return mapType(source, function (t) { return getRestType(t, properties, symbol); });
+ }
var members = ts.createMap();
var names = ts.createMap();
- for (var _i = 0, properties_2 = properties; _i < properties_2.length; _i++) {
- var name_19 = properties_2[_i];
- names[ts.getTextOfPropertyName(name_19)] = true;
+ for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
+ var name = properties_3[_i];
+ names.set(ts.getTextOfPropertyName(name), true);
}
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
- var inNamesToRemove = prop.name in names;
+ var inNamesToRemove = names.has(prop.name);
var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
- var isMethod = prop.flags & 8192;
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
- if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
- members[prop.name] = prop;
+ if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
+ members.set(prop.name, prop);
}
}
var stringIndexInfo = getIndexInfoOfType(source, 0);
@@ -23410,9 +24902,9 @@ var ts;
return parentType;
}
var type;
- if (pattern.kind === 172) {
+ if (pattern.kind === 173) {
if (declaration.dotDotDotToken) {
- if (!(parentType.flags & 32768)) {
+ if (!isValidSpreadType(parentType)) {
error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types);
return unknownType;
}
@@ -23426,25 +24918,25 @@ var ts;
type = getRestType(parentType, literalMembers, declaration.symbol);
}
else {
- var name_20 = declaration.propertyName || declaration.name;
- if (isComputedNonLiteralName(name_20)) {
+ var name = declaration.propertyName || declaration.name;
+ if (isComputedNonLiteralName(name)) {
return anyType;
}
if (declaration.initializer) {
getContextualType(declaration.initializer);
}
- var text = ts.getTextOfPropertyName(name_20);
+ var text = ts.getTextOfPropertyName(name);
type = getTypeOfPropertyOfType(parentType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1) ||
getIndexTypeOfType(parentType, 0);
if (!type) {
- error(name_20, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_20));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name));
return unknownType;
}
}
}
else {
- var elementType = checkIteratedTypeOrElementType(parentType, pattern, false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, false, false);
if (declaration.dotDotDotToken) {
type = createArrayType(elementType);
}
@@ -23471,7 +24963,7 @@ var ts;
getUnionType([type, checkExpressionCached(declaration.initializer)], true) :
type;
}
- function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) {
+ function getTypeForDeclarationFromJSDocComment(declaration) {
var jsdocType = ts.getJSDocType(declaration);
if (jsdocType) {
return getTypeFromTypeNode(jsdocType);
@@ -23484,33 +24976,35 @@ var ts;
}
function isEmptyArrayLiteral(node) {
var expr = ts.skipParentheses(node);
- return expr.kind === 175 && expr.elements.length === 0;
+ return expr.kind === 176 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 2097152) {
- var type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration);
+ if (declaration.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.parent.parent.kind === 212) {
+ if (declaration.parent.parent.kind === 214) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
}
- if (declaration.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
+ if (declaration.parent.parent.kind === 215) {
+ var forOfStatement = declaration.parent.parent;
+ return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType;
}
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
if (declaration.type) {
- return addOptionality(getTypeFromTypeNode(declaration.type), declaration.questionToken && includeOptionality);
+ var declaredType = getTypeFromTypeNode(declaration.type);
+ return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
- if ((compilerOptions.noImplicitAny || declaration.flags & 2097152) &&
- declaration.kind === 223 && !ts.isBindingPattern(declaration.name) &&
+ if ((noImplicitAny || declaration.flags & 65536) &&
+ declaration.kind === 225 && !ts.isBindingPattern(declaration.name) &&
!(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) {
if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) {
return autoType;
@@ -23519,10 +25013,10 @@ var ts;
return autoArrayType;
}
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var func = declaration.parent;
- if (func.kind === 152 && !ts.hasDynamicName(func)) {
- var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 151);
+ if (func.kind === 153 && !ts.hasDynamicName(func)) {
+ var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152);
if (getter) {
var getterSignature = getSignatureFromDeclaration(getter);
var thisParameter = getAccessorThisParameter(func);
@@ -23548,7 +25042,10 @@ var ts;
var type = checkDeclarationInitializer(declaration);
return addOptionality(type, declaration.questionToken && includeOptionality);
}
- if (declaration.kind === 258) {
+ if (ts.isJsxAttribute(declaration)) {
+ return trueType;
+ }
+ if (declaration.kind === 261) {
return checkIdentifier(declaration.name);
}
if (ts.isBindingPattern(declaration.name)) {
@@ -23556,6 +25053,37 @@ var ts;
}
return undefined;
}
+ function getWidenedTypeFromJSSpecialPropertyDeclarations(symbol) {
+ var types = [];
+ var definedInConstructor = false;
+ var definedInMethod = false;
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ var expression = declaration.kind === 193 ? declaration :
+ declaration.kind === 178 ? ts.getAncestor(declaration, 193) :
+ undefined;
+ if (!expression) {
+ return unknownType;
+ }
+ if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) {
+ if (ts.getThisContainer(expression, false).kind === 151) {
+ definedInConstructor = true;
+ }
+ else {
+ definedInMethod = true;
+ }
+ }
+ if (expression.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type && type !== unknownType) {
+ types.push(getWidenedType(type));
+ continue;
+ }
+ }
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
+ return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ }
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
return checkDeclarationInitializer(element);
@@ -23563,28 +25091,33 @@ var ts;
if (ts.isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
}
- if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
+ if (reportErrors && noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
reportImplicitAnyError(element, anyType);
}
return anyType;
}
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
var members = ts.createMap();
+ var stringIndexInfo;
var hasComputedProperties = false;
ts.forEach(pattern.elements, function (e) {
var name = e.propertyName || e.name;
- if (isComputedNonLiteralName(name) || e.dotDotDotToken) {
+ if (isComputedNonLiteralName(name)) {
hasComputedProperties = true;
return;
}
+ if (e.dotDotDotToken) {
+ stringIndexInfo = createIndexInfo(anyType, false);
+ return;
+ }
var text = ts.getTextOfPropertyName(name);
- var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0);
+ var flags = 4 | (e.initializer ? 67108864 : 0);
var symbol = createSymbol(flags, text);
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
symbol.bindingElement = e;
- members[symbol.name] = symbol;
+ members.set(symbol.name, symbol);
});
- var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
+ var result = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, undefined);
if (includePatternInType) {
result.pattern = pattern;
}
@@ -23608,7 +25141,7 @@ var ts;
return result;
}
function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
- return pattern.kind === 172
+ return pattern.kind === 173
? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
}
@@ -23618,13 +25151,13 @@ var ts;
if (reportErrors) {
reportErrorsFromWidening(declaration, type);
}
- if (declaration.kind === 257) {
+ if (declaration.kind === 260) {
return type;
}
return getWidenedType(type);
}
type = declaration.dotDotDotToken ? anyArrayType : anyType;
- if (reportErrors && compilerOptions.noImplicitAny) {
+ if (reportErrors && noImplicitAny) {
if (!declarationBelongsToPrivateAmbientMember(declaration)) {
reportImplicitAnyError(declaration, type);
}
@@ -23633,56 +25166,38 @@ var ts;
}
function declarationBelongsToPrivateAmbientMember(declaration) {
var root = ts.getRootDeclaration(declaration);
- var memberDeclaration = root.kind === 144 ? root.parent : root;
+ var memberDeclaration = root.kind === 145 ? root.parent : root;
return isPrivateWithinAmbient(memberDeclaration);
}
function getTypeOfVariableOrParameterOrProperty(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- if (symbol.flags & 134217728) {
+ if (symbol.flags & 16777216) {
return links.type = getTypeOfPrototypeProperty(symbol);
}
var declaration = symbol.valueDeclaration;
if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
return links.type = anyType;
}
- if (declaration.kind === 240) {
+ if (declaration.kind === 242) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 2097152 && declaration.kind === 286 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
return unknownType;
}
var type = void 0;
- if (declaration.kind === 192 ||
- declaration.kind === 177 && declaration.parent.kind === 192) {
- if (declaration.flags & 2097152) {
- var jsdocType = ts.getJSDocType(declaration.parent);
- if (jsdocType) {
- return links.type = getTypeFromTypeNode(jsdocType);
- }
- }
- var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 192 ?
- checkExpressionCached(decl.right) :
- checkExpressionCached(decl.parent.right); });
- type = getUnionType(declaredTypes, true);
+ if (declaration.kind === 193 ||
+ declaration.kind === 178 && declaration.parent.kind === 193) {
+ type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol);
}
else {
type = getWidenedTypeForVariableLikeDeclaration(declaration, true);
}
if (!popTypeResolution()) {
- if (symbol.valueDeclaration.type) {
- type = unknownType;
- error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
- }
- else {
- type = anyType;
- if (compilerOptions.noImplicitAny) {
- error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
- }
- }
+ type = reportCircularityError(symbol);
}
links.type = type;
}
@@ -23690,7 +25205,7 @@ var ts;
}
function getAnnotatedAccessorType(accessor) {
if (accessor) {
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
return accessor.type && getTypeFromTypeNode(accessor.type);
}
else {
@@ -23710,10 +25225,10 @@ var ts;
function getTypeOfAccessors(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- var getter = ts.getDeclarationOfKind(symbol, 151);
- var setter = ts.getDeclarationOfKind(symbol, 152);
- if (getter && getter.flags & 2097152) {
- var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
+ var getter = ts.getDeclarationOfKind(symbol, 152);
+ var setter = ts.getDeclarationOfKind(symbol, 153);
+ if (getter && getter.flags & 65536) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
if (jsDocType) {
return links.type = jsDocType;
}
@@ -23736,7 +25251,7 @@ var ts;
type = getReturnTypeFromBody(getter);
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
if (setter) {
error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
@@ -23751,8 +25266,8 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
- var getter_1 = ts.getDeclarationOfKind(symbol, 151);
+ if (noImplicitAny) {
+ var getter_1 = ts.getDeclarationOfKind(symbol, 152);
error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
}
}
@@ -23760,6 +25275,10 @@ var ts;
}
return links.type;
}
+ function getBaseTypeVariableOfClass(symbol) {
+ var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
+ return baseConstructorType.flags & 540672 ? baseConstructorType : undefined;
+ }
function getTypeOfFuncClassEnumModule(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
@@ -23768,8 +25287,13 @@ var ts;
}
else {
var type = createObjectType(16, symbol);
- links.type = strictNullChecks && symbol.flags & 536870912 ?
- includeFalsyTypes(type, 2048) : type;
+ if (symbol.flags & 32) {
+ var baseTypeVariable = getBaseTypeVariableOfClass(symbol);
+ links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
+ }
+ else {
+ links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ }
}
}
return links.type;
@@ -23794,12 +25318,37 @@ var ts;
function getTypeOfInstantiatedSymbol(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ if (symbolInstantiationDepth === 100) {
+ error(symbol.valueDeclaration, ts.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite);
+ links.type = unknownType;
+ }
+ else {
+ if (!pushTypeResolution(symbol, 0)) {
+ return unknownType;
+ }
+ symbolInstantiationDepth++;
+ var type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ symbolInstantiationDepth--;
+ if (!popTypeResolution()) {
+ type = reportCircularityError(symbol);
+ }
+ links.type = type;
+ }
}
return links.type;
}
+ function reportCircularityError(symbol) {
+ if (symbol.valueDeclaration.type) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
+ return unknownType;
+ }
+ if (noImplicitAny) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
+ }
+ return anyType;
+ }
function getTypeOfSymbol(symbol) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -23819,19 +25368,30 @@ var ts;
}
return unknownType;
}
+ function isReferenceToType(type, target) {
+ return type !== undefined
+ && target !== undefined
+ && (getObjectFlags(type) & 4) !== 0
+ && type.target === target;
+ }
function getTargetType(type) {
return getObjectFlags(type) & 4 ? type.target : type;
}
function hasBaseType(type, checkBase) {
return check(type);
function check(type) {
- var target = getTargetType(type);
- return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ if (getObjectFlags(type) & (3 | 4)) {
+ var target = getTargetType(type);
+ return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ }
+ else if (type.flags & 131072) {
+ return ts.forEach(type.types, check);
+ }
}
}
function appendTypeParameters(typeParameters, declarations) {
- for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
- var declaration = declarations_2[_i];
+ for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+ var declaration = declarations_3[_i];
var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration));
if (!typeParameters) {
typeParameters = [tp];
@@ -23848,9 +25408,9 @@ var ts;
if (!node) {
return typeParameters;
}
- if (node.kind === 226 || node.kind === 197 ||
- node.kind === 225 || node.kind === 184 ||
- node.kind === 149 || node.kind === 185) {
+ if (node.kind === 228 || node.kind === 198 ||
+ node.kind === 227 || node.kind === 185 ||
+ node.kind === 150 || node.kind === 186) {
var declarations = node.typeParameters;
if (declarations) {
return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
@@ -23859,15 +25419,15 @@ var ts;
}
}
function getOuterTypeParametersOfClassOrInterface(symbol) {
- var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 227);
+ var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229);
return appendOuterTypeParameters(undefined, declaration);
}
function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) {
var result;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var node = _a[_i];
- if (node.kind === 227 || node.kind === 226 ||
- node.kind === 197 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 228 ||
+ node.kind === 198 || node.kind === 230) {
var declaration = node;
if (declaration.typeParameters) {
result = appendTypeParameters(result, declaration.typeParameters);
@@ -23879,18 +25439,34 @@ var ts;
function getTypeParametersOfClassOrInterface(symbol) {
return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
}
+ function isMixinConstructorType(type) {
+ var signatures = getSignaturesOfType(type, 1);
+ if (signatures.length === 1) {
+ var s = signatures[0];
+ return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType;
+ }
+ return false;
+ }
function isConstructorType(type) {
- return type.flags & 32768 && getSignaturesOfType(type, 1).length > 0;
+ if (isValidBaseType(type) && getSignaturesOfType(type, 1).length > 0) {
+ return true;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type);
+ return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
+ }
+ return false;
}
function getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
}
- function getConstructorsForTypeArguments(type, typeArgumentNodes) {
- var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
- return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; });
+ function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var typeArgCount = ts.length(typeArgumentNodes);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (isJavaScript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= ts.length(sig.typeParameters); });
}
- function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
- var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
+ function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
if (typeArgumentNodes) {
var typeArguments_1 = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.map(signatures, function (sig) { return getSignatureInstantiation(sig, typeArguments_1); });
@@ -23907,14 +25483,14 @@ var ts;
return unknownType;
}
var baseConstructorType = checkExpression(baseTypeNode.expression);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072)) {
resolveStructuredTypeMembers(baseConstructorType);
}
if (!popTypeResolution()) {
error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
return type.resolvedBaseConstructorType = unknownType;
}
- if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
+ if (!(baseConstructorType.flags & 1) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
return type.resolvedBaseConstructorType = unknownType;
}
@@ -23943,8 +25519,8 @@ var ts;
}
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
- var baseConstructorType = getBaseConstructorTypeOfClass(type);
- if (!(baseConstructorType.flags & 32768)) {
+ var baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));
+ if (!(baseConstructorType.flags & (32768 | 131072 | 1))) {
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -23954,8 +25530,11 @@ var ts;
areAllOuterTypeParametersApplied(originalBaseType)) {
baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
}
+ else if (baseConstructorType.flags & 1) {
+ baseType = baseConstructorType;
+ }
else {
- var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);
if (!constructors.length) {
error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);
return;
@@ -23972,7 +25551,7 @@ var ts;
if (baseType === unknownType) {
return;
}
- if (!(getObjectFlags(getTargetType(baseType)) & 3)) {
+ if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
return;
}
@@ -23996,16 +25575,20 @@ var ts;
}
return true;
}
+ function isValidBaseType(type) {
+ return type.flags & (32768 | 16777216 | 1) && !isGenericMappedType(type) ||
+ type.flags & 131072 && !ts.forEach(type.types, function (t) { return !isValidBaseType(t); });
+ }
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 && ts.getInterfaceBaseTypeNodes(declaration)) {
+ if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) {
for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
var node = _c[_b];
var baseType = getTypeFromTypeNode(node);
if (baseType !== unknownType) {
- if (getObjectFlags(getTargetType(baseType)) & 3) {
+ if (isValidBaseType(baseType)) {
if (type !== baseType && !hasBaseType(baseType, type)) {
if (type.resolvedBaseTypes === emptyArray) {
type.resolvedBaseTypes = [baseType];
@@ -24029,7 +25612,7 @@ var ts;
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227) {
+ if (declaration.kind === 229) {
if (declaration.flags & 64) {
return false;
}
@@ -24062,7 +25645,7 @@ var ts;
type.outerTypeParameters = outerTypeParameters;
type.localTypeParameters = localTypeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -24079,7 +25662,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 285);
+ var declaration = ts.getDeclarationOfKind(symbol, 289);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -24090,7 +25673,7 @@ var ts;
}
}
else {
- declaration = ts.getDeclarationOfKind(symbol, 228);
+ declaration = ts.getDeclarationOfKind(symbol, 230);
type = getTypeFromTypeNode(declaration.type);
}
if (popTypeResolution()) {
@@ -24098,7 +25681,7 @@ var ts;
if (typeParameters) {
links.typeParameters = typeParameters;
links.instantiations = ts.createMap();
- links.instantiations[getTypeListId(typeParameters)] = type;
+ links.instantiations.set(getTypeListId(typeParameters), type);
}
}
else {
@@ -24115,14 +25698,14 @@ var ts;
return !ts.isInAmbientContext(member);
}
return expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8 ||
- expr.kind === 70 && !!symbol.exports[expr.text];
+ expr.kind === 70 && !!symbol.exports.get(expr.text);
}
function enumHasLiteralMembers(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
if (!isLiteralEnumMember(symbol, member)) {
@@ -24147,10 +25730,10 @@ var ts;
enumType.symbol = symbol;
if (enumHasLiteralMembers(symbol)) {
var memberTypeList = [];
- var memberTypes = ts.createMap();
+ var memberTypes = [];
for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
computeEnumMemberValues(declaration);
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
@@ -24167,7 +25750,7 @@ var ts;
if (memberTypeList.length > 1) {
enumType.flags |= 65536;
enumType.types = memberTypeList;
- unionTypes[getTypeListId(memberTypeList)] = enumType;
+ unionTypes.set(getTypeListId(memberTypeList), enumType);
}
}
}
@@ -24188,9 +25771,6 @@ var ts;
if (!links.declaredType) {
var type = createType(16384);
type.symbol = symbol;
- if (!ts.getDeclarationOfKind(symbol, 143).constraint) {
- type.constraint = noConstraintType;
- }
links.declaredType = type;
}
return links.declaredType;
@@ -24203,7 +25783,6 @@ var ts;
return links.declaredType;
}
function getDeclaredTypeOfSymbol(symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0);
if (symbol.flags & (32 | 64)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
@@ -24238,19 +25817,20 @@ var ts;
function isIndependentType(node) {
switch (node.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
+ case 133:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 171:
+ case 172:
return true;
- case 162:
+ case 163:
return isIndependentType(node.elementType);
- case 157:
+ case 158:
return isIndependentTypeReference(node);
}
return false;
@@ -24259,7 +25839,7 @@ var ts;
return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 150 && (!node.type || !isIndependentType(node.type))) {
+ if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) {
return false;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
@@ -24275,12 +25855,12 @@ var ts;
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
return isIndependentVariableLikeDeclaration(declaration);
- case 149:
- case 148:
case 150:
+ case 149:
+ case 151:
return isIndependentFunctionLikeDeclaration(declaration);
}
}
@@ -24291,7 +25871,7 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
- result[symbol.name] = symbol;
+ result.set(symbol.name, symbol);
}
return result;
}
@@ -24299,15 +25879,15 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
- result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper);
+ result.set(symbol.name, mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper));
}
return result;
}
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
- if (!symbols[s.name]) {
- symbols[s.name] = s;
+ if (!symbols.has(s.name)) {
+ symbols.set(s.name, s);
}
}
}
@@ -24315,8 +25895,8 @@ var ts;
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
- type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
- type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
+ type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members.get("__call"));
+ type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members.get("__new"));
type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
}
@@ -24324,7 +25904,14 @@ var ts;
}
function getTypeWithThisArgument(type, thisArgument) {
if (getObjectFlags(type) & 4) {
- return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
+ var target = type.target;
+ var typeArguments = type.typeArguments;
+ if (ts.length(target.typeParameters) === ts.length(typeArguments)) {
+ return createTypeReference(target, ts.concatenate(typeArguments, [thisArgument || target.thisType]));
+ }
+ }
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, function (t) { return getTypeWithThisArgument(t, thisArgument); }));
}
return type;
}
@@ -24360,10 +25947,14 @@ var ts;
for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
var baseType = baseTypes_1[_i];
var instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;
- addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
+ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0));
constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1));
- stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0);
+ if (!stringIndexInfo) {
+ stringIndexInfo = instantiatedBaseType === anyType ?
+ createIndexInfo(anyType, false) :
+ getIndexInfoOfType(instantiatedBaseType, 0);
+ }
numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1);
}
}
@@ -24402,14 +25993,16 @@ var ts;
return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, undefined, 0, false, false)];
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
+ var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
- var typeArgCount = typeArguments ? typeArguments.length : 0;
+ var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var baseSig = baseSignatures_1[_i];
- var typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0;
- if (typeParamCount === typeArgCount) {
- var sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig);
+ var minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);
+ var typeParamCount = ts.length(baseSig.typeParameters);
+ if ((isJavaScript || typeArgCount >= minTypeArgumentCount) && typeArgCount <= typeParamCount) {
+ var sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, baseTypeNode)) : cloneSignature(baseSig);
sig.typeParameters = classType.localTypeParameters;
sig.resolvedReturnType = classType;
result.push(sig);
@@ -24463,7 +26056,7 @@ var ts;
s = cloneSignature(signature);
if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) {
var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), true);
- s.thisParameter = createTransientSymbol(signature.thisParameter, thisType);
+ s.thisParameter = createSymbolWithType(signature.thisParameter, thisType);
}
s.resolvedReturnType = undefined;
s.unionSignatures = unionSignatures;
@@ -24478,8 +26071,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
- var type = types_1[_i];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type = types_2[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -24505,17 +26098,44 @@ var ts;
function unionSpreadIndexInfos(info1, info2) {
return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
}
+ function includeMixinType(type, types, index) {
+ var mixedTypes = [];
+ for (var i = 0; i < types.length; i++) {
+ if (i === index) {
+ mixedTypes.push(type);
+ }
+ else if (isMixinConstructorType(types[i])) {
+ mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1)[0]));
+ }
+ }
+ return getIntersectionType(mixedTypes);
+ }
function resolveIntersectionTypeMembers(type) {
var callSignatures = emptyArray;
var constructSignatures = emptyArray;
- var stringIndexInfo = undefined;
- var numberIndexInfo = undefined;
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var t = _a[_i];
+ var stringIndexInfo;
+ var numberIndexInfo;
+ var types = type.types;
+ var mixinCount = ts.countWhere(types, isMixinConstructorType);
+ var _loop_3 = function (i) {
+ var t = type.types[i];
+ if (mixinCount === 0 || mixinCount === types.length && i === 0 || !isMixinConstructorType(t)) {
+ var signatures = getSignaturesOfType(t, 1);
+ if (signatures.length && mixinCount > 0) {
+ signatures = ts.map(signatures, function (s) {
+ var clone = cloneSignature(s);
+ clone.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, i);
+ return clone;
+ });
+ }
+ constructSignatures = ts.concatenate(constructSignatures, signatures);
+ }
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0));
- constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1));
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0));
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1));
+ };
+ for (var i = 0; i < types.length; i++) {
+ _loop_3(i);
}
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
}
@@ -24531,8 +26151,8 @@ var ts;
}
else if (symbol.flags & 2048) {
var members = symbol.members;
- var callSignatures = getSignaturesOfSymbol(members["__call"]);
- var constructSignatures = getSignaturesOfSymbol(members["__new"]);
+ var callSignatures = getSignaturesOfSymbol(members.get("__call"));
+ var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
@@ -24540,23 +26160,27 @@ var ts;
else {
var members = emptySymbols;
var constructSignatures = emptyArray;
- if (symbol.flags & 1952) {
+ var stringIndexInfo = undefined;
+ if (symbol.exports) {
members = getExportsOfSymbol(symbol);
}
if (symbol.flags & 32) {
var classType = getDeclaredTypeOfClassOrInterface(symbol);
- constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
+ constructSignatures = getSignaturesOfSymbol(symbol.members.get("__constructor"));
if (!constructSignatures.length) {
constructSignatures = getDefaultConstructSignatures(classType);
}
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072 | 540672)) {
members = createSymbolTable(getNamedMembers(members));
- addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType));
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
+ }
+ else if (baseConstructorType === anyType) {
+ stringIndexInfo = createIndexInfo(anyType, false);
}
}
var numberIndexInfo = symbol.flags & 384 ? enumNumberIndexInfo : undefined;
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo);
+ setStructuredTypeMembers(type, members, emptyArray, constructSignatures, stringIndexInfo, numberIndexInfo);
if (symbol.flags & (16 | 8192)) {
type.callSignatures = getSignaturesOfSymbol(symbol);
}
@@ -24565,37 +26189,48 @@ var ts;
function resolveMappedTypeMembers(type) {
var members = ts.createMap();
var stringIndexInfo;
- var numberIndexInfo;
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var typeParameter = getTypeParameterFromMappedType(type);
var constraintType = getConstraintTypeFromMappedType(type);
var templateType = getTemplateTypeFromMappedType(type);
- var isReadonly = !!type.declaration.readonlyToken;
- var isOptional = !!type.declaration.questionToken;
- var keyType = constraintType.flags & 16384 ? getApparentType(constraintType) : constraintType;
- var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
- forEachType(iterationType, function (t) {
- var iterationMapper = createUnaryTypeMapper(typeParameter, t);
+ var modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
+ var templateReadonly = !!type.declaration.readonlyToken;
+ var templateOptional = !!type.declaration.questionToken;
+ if (type.declaration.typeParameter.constraint.kind === 169) {
+ for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
+ var propertySymbol = _a[_i];
+ addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol);
+ }
+ if (getIndexInfoOfType(modifiersType, 0)) {
+ addMemberForKeyType(stringType);
+ }
+ }
+ else {
+ var keyType = constraintType.flags & 540672 ? getApparentType(constraintType) : constraintType;
+ var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
+ forEachType(iterationType, addMemberForKeyType);
+ }
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
+ function addMemberForKeyType(t, propertySymbol) {
+ var iterationMapper = createTypeMapper([typeParameter], [t]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
- if (t.flags & (32 | 64 | 256)) {
+ if (t.flags & 32) {
var propName = t.text;
- var prop = createSymbol(4 | 67108864 | (isOptional ? 536870912 : 0), propName);
- prop.type = addOptionality(propType, isOptional);
- prop.isReadonly = isReadonly;
- members[propName] = prop;
+ var modifiersProp = getPropertyOfType(modifiersType, propName);
+ var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
+ var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
+ prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? 8 : 0;
+ prop.type = propType;
+ if (propertySymbol) {
+ prop.syntheticOrigin = propertySymbol;
+ }
+ members.set(propName, prop);
}
else if (t.flags & 2) {
- stringIndexInfo = createIndexInfo(propType, isReadonly);
- }
- else if (t.flags & 4) {
- numberIndexInfo = createIndexInfo(propType, isReadonly);
+ stringIndexInfo = createIndexInfo(propType, templateReadonly);
}
- });
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
- numberIndexInfo = undefined;
}
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
function getTypeParameterFromMappedType(type) {
return type.typeParameter ||
@@ -24608,16 +26243,28 @@ var ts;
function getTemplateTypeFromMappedType(type) {
return type.templateType ||
(type.templateType = type.declaration.type ?
- instantiateType(getTypeFromTypeNode(type.declaration.type), type.mapper || identityMapper) :
+ instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!type.declaration.questionToken), type.mapper || identityMapper) :
unknownType);
}
- function getErasedTemplateTypeFromMappedType(type) {
- return instantiateType(getTemplateTypeFromMappedType(type), createUnaryTypeMapper(getTypeParameterFromMappedType(type), anyType));
+ function getModifiersTypeFromMappedType(type) {
+ if (!type.modifiersType) {
+ var constraintDeclaration = type.declaration.typeParameter.constraint;
+ if (constraintDeclaration.kind === 169) {
+ type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper);
+ }
+ else {
+ var declaredType = getTypeFromMappedTypeNode(type.declaration);
+ var constraint = getConstraintTypeFromMappedType(declaredType);
+ var extendedConstraint = constraint && constraint.flags & 16384 ? getConstraintOfTypeParameter(constraint) : constraint;
+ type.modifiersType = extendedConstraint && extendedConstraint.flags & 262144 ? instantiateType(extendedConstraint.type, type.mapper || identityMapper) : emptyObjectType;
+ }
+ }
+ return type.modifiersType;
}
function isGenericMappedType(type) {
if (getObjectFlags(type) & 32) {
var constraintType = getConstraintTypeFromMappedType(type);
- return !!(constraintType.flags & (16384 | 262144));
+ return maybeTypeOfKind(constraintType, 540672 | 262144);
}
return false;
}
@@ -24655,35 +26302,33 @@ var ts;
function getPropertyOfObjectType(type, name) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
}
}
function getPropertiesOfUnionOrIntersectionType(type) {
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var current = _a[_i];
- for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
- var prop = _c[_b];
- getUnionOrIntersectionProperty(type, prop.name);
- }
- if (type.flags & 65536) {
- break;
- }
- }
- var props = type.resolvedProperties;
- if (props) {
- var result = [];
- for (var key in props) {
- var prop = props[key];
- if (!(prop.flags & 268435456 && prop.isPartial)) {
- result.push(prop);
+ if (!type.resolvedProperties) {
+ var members = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var current = _a[_i];
+ for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
+ var prop = _c[_b];
+ if (!members.has(prop.name)) {
+ var combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.name);
+ if (combinedProp) {
+ members.set(prop.name, combinedProp);
+ }
+ }
+ }
+ if (type.flags & 65536) {
+ break;
}
}
- return result;
+ type.resolvedProperties = getNamedMembers(members);
}
- return emptyArray;
+ return type.resolvedProperties;
}
function getPropertiesOfType(type) {
type = getApparentType(type);
@@ -24691,41 +26336,126 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
- function getApparentTypeOfTypeParameter(type) {
- if (!type.resolvedApparentType) {
- var constraintType = getConstraintOfTypeParameter(type);
- while (constraintType && constraintType.flags & 16384) {
- constraintType = getConstraintOfTypeParameter(constraintType);
+ function getConstraintOfType(type) {
+ return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
+ type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
+ getBaseConstraintOfType(type);
+ }
+ function getConstraintOfTypeParameter(typeParameter) {
+ return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined;
+ }
+ function getConstraintOfIndexedAccess(type) {
+ var baseObjectType = getBaseConstraintOfType(type.objectType);
+ var baseIndexType = getBaseConstraintOfType(type.indexType);
+ return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined;
+ }
+ function getBaseConstraintOfType(type) {
+ if (type.flags & (540672 | 196608)) {
+ var constraint = getResolvedBaseConstraint(type);
+ if (constraint !== noConstraintType && constraint !== circularConstraintType) {
+ return constraint;
}
- type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
}
- return type.resolvedApparentType;
+ else if (type.flags & 262144) {
+ return stringType;
+ }
+ return undefined;
}
- function getApparentTypeOfIndexedAccess(type) {
- return getIndexTypeOfType(getApparentType(type.objectType), 0) || type;
+ function hasNonCircularBaseConstraint(type) {
+ return getResolvedBaseConstraint(type) !== circularConstraintType;
+ }
+ function getResolvedBaseConstraint(type) {
+ var typeStack;
+ var circular;
+ if (!type.resolvedBaseConstraint) {
+ typeStack = [];
+ var constraint = getBaseConstraint(type);
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType, type);
+ }
+ return type.resolvedBaseConstraint;
+ function getBaseConstraint(t) {
+ if (ts.contains(typeStack, t)) {
+ circular = true;
+ return undefined;
+ }
+ typeStack.push(t);
+ var result = computeBaseConstraint(t);
+ typeStack.pop();
+ return result;
+ }
+ function computeBaseConstraint(t) {
+ if (t.flags & 16384) {
+ var constraint = getConstraintFromTypeParameter(t);
+ return t.isThisType ? constraint :
+ constraint ? getBaseConstraint(constraint) : undefined;
+ }
+ if (t.flags & 196608) {
+ var types = t.types;
+ var baseTypes = [];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var type_2 = types_3[_i];
+ var baseType = getBaseConstraint(type_2);
+ if (baseType) {
+ baseTypes.push(baseType);
+ }
+ }
+ return t.flags & 65536 && baseTypes.length === types.length ? getUnionType(baseTypes) :
+ t.flags & 131072 && baseTypes.length ? getIntersectionType(baseTypes) :
+ undefined;
+ }
+ if (t.flags & 262144) {
+ return stringType;
+ }
+ if (t.flags & 524288) {
+ var baseObjectType = getBaseConstraint(t.objectType);
+ var baseIndexType = getBaseConstraint(t.indexType);
+ var baseIndexedAccess = baseObjectType && baseIndexType ? getIndexedAccessType(baseObjectType, baseIndexType) : undefined;
+ return baseIndexedAccess && baseIndexedAccess !== unknownType ? getBaseConstraint(baseIndexedAccess) : undefined;
+ }
+ return t;
+ }
+ }
+ function getApparentTypeOfIntersectionType(type) {
+ return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type));
+ }
+ function getDefaultFromTypeParameter(typeParameter) {
+ if (!typeParameter.default) {
+ if (typeParameter.target) {
+ var targetDefault = getDefaultFromTypeParameter(typeParameter.target);
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;
+ }
+ else {
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameter(decl) && decl.default; });
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
+ }
+ }
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
}
function getApparentType(type) {
- var t = type.flags & 16384 ? getApparentTypeOfTypeParameter(type) :
- type.flags & 524288 ? getApparentTypeOfIndexedAccess(type) :
- type;
- return t.flags & 262178 ? globalStringType :
- t.flags & 340 ? globalNumberType :
- t.flags & 136 ? globalBooleanType :
- t.flags & 512 ? getGlobalESSymbolType() :
- t;
+ var t = type.flags & 540672 ? getBaseConstraintOfType(type) || emptyObjectType : type;
+ return t.flags & 131072 ? getApparentTypeOfIntersectionType(t) :
+ t.flags & 262178 ? globalStringType :
+ t.flags & 340 ? globalNumberType :
+ t.flags & 136 ? globalBooleanType :
+ t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
+ t.flags & 16777216 ? emptyObjectType :
+ t;
}
function createUnionOrIntersectionProperty(containingType, name) {
- var types = containingType.types;
var props;
- var commonFlags = (containingType.flags & 131072) ? 536870912 : 0;
- var isReadonly = false;
- var isPartial = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var current = types_2[_i];
+ var types = containingType.types;
+ var isUnion = containingType.flags & 65536;
+ var excludeModifiers = isUnion ? 24 : 0;
+ var commonFlags = isUnion ? 0 : 67108864;
+ var syntheticFlag = 4;
+ var checkFlags = 0;
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var current = types_4[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- if (prop && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16))) {
+ var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
props = [prop];
@@ -24733,25 +26463,29 @@ var ts;
else if (!ts.contains(props, prop)) {
props.push(prop);
}
- if (isReadonlySymbol(prop)) {
- isReadonly = true;
+ checkFlags |= (isReadonlySymbol(prop) ? 8 : 0) |
+ (!(modifiers & 24) ? 64 : 0) |
+ (modifiers & 16 ? 128 : 0) |
+ (modifiers & 8 ? 256 : 0) |
+ (modifiers & 32 ? 512 : 0);
+ if (!isMethodLike(prop)) {
+ syntheticFlag = 2;
}
}
- else if (containingType.flags & 65536) {
- isPartial = true;
+ else if (isUnion) {
+ checkFlags |= 16;
}
}
}
if (!props) {
return undefined;
}
- if (props.length === 1 && !isPartial) {
+ if (props.length === 1 && !(checkFlags & 16)) {
return props[0];
}
var propTypes = [];
var declarations = [];
var commonType = undefined;
- var hasNonUniformType = false;
for (var _a = 0, props_1 = props; _a < props_1.length; _a++) {
var prop = props_1[_a];
if (prop.declarations) {
@@ -24762,39 +26496,37 @@ var ts;
commonType = type;
}
else if (type !== commonType) {
- hasNonUniformType = true;
+ checkFlags |= 32;
}
propTypes.push(type);
}
- var result = createSymbol(4 | 67108864 | 268435456 | commonFlags, name);
+ var result = createSymbol(4 | commonFlags, name);
+ result.checkFlags = syntheticFlag | checkFlags;
result.containingType = containingType;
- result.hasNonUniformType = hasNonUniformType;
- result.isPartial = isPartial;
result.declarations = declarations;
- result.isReadonly = isReadonly;
- result.type = containingType.flags & 65536 ? getUnionType(propTypes) : getIntersectionType(propTypes);
+ result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
return result;
}
function getUnionOrIntersectionProperty(type, name) {
- var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap());
- var property = properties[name];
+ var properties = type.propertyCache || (type.propertyCache = ts.createMap());
+ var property = properties.get(name);
if (!property) {
property = createUnionOrIntersectionProperty(type, name);
if (property) {
- properties[name] = property;
+ properties.set(name, property);
}
}
return property;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(property.flags & 268435456 && property.isPartial) ? property : undefined;
+ return property && !(getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
@@ -24853,7 +26585,7 @@ var ts;
return undefined;
}
function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var templateTag = ts.getJSDocTemplateTag(declaration);
if (templateTag) {
return getTypeParametersFromDeclaration(templateTag.typeParameters);
@@ -24873,16 +26605,16 @@ var ts;
}
function symbolsToArray(symbols) {
var result = [];
- for (var id in symbols) {
+ symbols.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
- result.push(symbols[id]);
+ result.push(symbol);
}
- }
+ });
return result;
}
function isJSDocOptionalParameter(node) {
- if (node.flags & 2097152) {
- if (node.type && node.type.kind === 273) {
+ if (node.flags & 65536) {
+ if (node.type && node.type.kind === 277) {
return true;
}
var paramTags = ts.getJSDocParameterTags(node);
@@ -24893,7 +26625,7 @@ var ts;
return true;
}
if (paramTag.typeExpression) {
- return paramTag.typeExpression.type.kind === 273;
+ return paramTag.typeExpression.type.kind === 277;
}
}
}
@@ -24917,6 +26649,12 @@ var ts;
ts.Debug.assert(parameterIndex >= 0);
return parameterIndex >= signature.minArgumentCount;
}
+ var iife = ts.getImmediatelyInvokedFunctionExpression(node.parent);
+ if (iife) {
+ return !node.type &&
+ !node.dotDotDotToken &&
+ ts.indexOf(node.parent.parameters, node) >= iife.arguments.length;
+ }
return false;
}
function createTypePredicateFromTypePredicateNode(node) {
@@ -24936,16 +26674,50 @@ var ts;
};
}
}
+ function getMinTypeArgumentCount(typeParameters) {
+ var minTypeArgumentCount = 0;
+ if (typeParameters) {
+ for (var i = 0; i < typeParameters.length; i++) {
+ if (!getDefaultFromTypeParameter(typeParameters[i])) {
+ minTypeArgumentCount = i + 1;
+ }
+ }
+ }
+ return minTypeArgumentCount;
+ }
+ function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, location) {
+ var numTypeParameters = ts.length(typeParameters);
+ if (numTypeParameters) {
+ var numTypeArguments = ts.length(typeArguments);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ if ((isJavaScript || numTypeArguments >= minTypeArgumentCount) && numTypeArguments <= numTypeParameters) {
+ if (!typeArguments) {
+ typeArguments = [];
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ typeArguments[i] = isJavaScript ? anyType : emptyObjectType;
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ var mapper = createTypeMapper(typeParameters, typeArguments);
+ var defaultType = getDefaultFromTypeParameter(typeParameters[i]);
+ typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : isJavaScript ? anyType : emptyObjectType;
+ }
+ }
+ }
+ return typeArguments;
+ }
function getSignatureFromDeclaration(declaration) {
var links = getNodeLinks(declaration);
if (!links.resolvedSignature) {
var parameters = [];
var hasLiteralTypes = false;
- var minArgumentCount = -1;
+ var minArgumentCount = 0;
var thisParameter = undefined;
var hasThisParameter = void 0;
+ var iife = ts.getImmediatelyInvokedFunctionExpression(declaration);
var isJSConstructSignature = ts.isJSDocConstructSignature(declaration);
- for (var i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) {
+ var isUntypedSignatureInJSFile = !iife && !isJSConstructSignature && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration);
+ for (var i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
var param = declaration.parameters[i];
var paramSymbol = param.symbol;
if (paramSymbol && !!(paramSymbol.flags & 4) && !ts.isBindingPattern(param.name)) {
@@ -24959,41 +26731,34 @@ var ts;
else {
parameters.push(paramSymbol);
}
- if (param.type && param.type.kind === 171) {
+ if (param.type && param.type.kind === 172) {
hasLiteralTypes = true;
}
- if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {
- if (minArgumentCount < 0) {
- minArgumentCount = i - (hasThisParameter ? 1 : 0);
- }
- }
- else {
- minArgumentCount = -1;
+ var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken ||
+ iife && parameters.length > iife.arguments.length && !param.type ||
+ isJSDocOptionalParameter(param) ||
+ isUntypedSignatureInJSFile;
+ if (!isOptionalParameter_1) {
+ minArgumentCount = parameters.length;
}
}
- if ((declaration.kind === 151 || declaration.kind === 152) &&
+ if ((declaration.kind === 152 || declaration.kind === 153) &&
!ts.hasDynamicName(declaration) &&
(!hasThisParameter || !thisParameter)) {
- var otherKind = declaration.kind === 151 ? 152 : 151;
+ var otherKind = declaration.kind === 152 ? 153 : 152;
var other = ts.getDeclarationOfKind(declaration.symbol, otherKind);
if (other) {
thisParameter = getAnnotatedAccessorThisParameter(other);
}
}
- if (minArgumentCount < 0) {
- minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0);
- }
- if (isJSConstructSignature) {
- minArgumentCount--;
- }
- var classType = declaration.kind === 150 ?
+ var classType = declaration.kind === 151 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
var typeParameters = classType ? classType.localTypeParameters :
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
getTypeParametersFromJSDocTemplate(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
- var typePredicate = declaration.type && declaration.type.kind === 156 ?
+ var typePredicate = declaration.type && declaration.type.kind === 157 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
@@ -25010,41 +26775,69 @@ var ts;
else if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var type = getReturnTypeFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.kind === 151 && !ts.hasDynamicName(declaration)) {
- var setter = ts.getDeclarationOfKind(declaration.symbol, 152);
+ if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) {
+ var setter = ts.getDeclarationOfKind(declaration.symbol, 153);
return getAnnotatedAccessorType(setter);
}
if (ts.nodeIsMissing(declaration.body)) {
return anyType;
}
}
+ function containsArgumentsReference(declaration) {
+ var links = getNodeLinks(declaration);
+ if (links.containsArgumentsReference === undefined) {
+ if (links.flags & 8192) {
+ links.containsArgumentsReference = true;
+ }
+ else {
+ links.containsArgumentsReference = traverse(declaration.body);
+ }
+ }
+ return links.containsArgumentsReference;
+ function traverse(node) {
+ if (!node)
+ return false;
+ switch (node.kind) {
+ case 70:
+ return node.text === "arguments" && ts.isPartOfExpression(node);
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ return node.name.kind === 143
+ && traverse(node.name);
+ default:
+ return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse);
+ }
+ }
+ }
function getSignaturesOfSymbol(symbol) {
if (!symbol)
return emptyArray;
var result = [];
- for (var i = 0, len = symbol.declarations.length; i < len; i++) {
+ for (var i = 0; i < symbol.declarations.length; i++) {
var node = symbol.declarations[i];
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 274:
+ case 186:
+ case 278:
if (i > 0 && node.body) {
var previous = symbol.declarations[i - 1];
if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) {
@@ -25088,7 +26881,7 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
var declaration = signature.declaration;
if (declaration.name) {
error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
@@ -25112,9 +26905,14 @@ var ts;
return anyType;
}
function getSignatureInstantiation(signature, typeArguments) {
+ typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters));
var instantiations = signature.instantiations || (signature.instantiations = ts.createMap());
var id = getTypeListId(typeArguments);
- return instantiations[id] || (instantiations[id] = createSignatureInstantiation(signature, typeArguments));
+ var instantiation = instantiations.get(id);
+ if (!instantiation) {
+ instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
+ }
+ return instantiation;
}
function createSignatureInstantiation(signature, typeArguments) {
return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true);
@@ -25129,7 +26927,7 @@ var ts;
}
function getOrCreateTypeFromSignature(signature) {
if (!signature.isolatedSignatureType) {
- var isConstructor = signature.declaration.kind === 150 || signature.declaration.kind === 154;
+ var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155;
var type = createObjectType(16);
type.members = emptySymbols;
type.properties = emptyArray;
@@ -25140,10 +26938,10 @@ var ts;
return signature.isolatedSignatureType;
}
function getIndexSymbol(symbol) {
- return symbol.members["__index"];
+ return symbol.members.get("__index");
}
function getIndexDeclarationOfSymbol(symbol, kind) {
- var syntaxKind = kind === 1 ? 132 : 134;
+ var syntaxKind = kind === 1 ? 132 : 135;
var indexSymbol = getIndexSymbol(symbol);
if (indexSymbol) {
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
@@ -25170,21 +26968,9 @@ var ts;
return undefined;
}
function getConstraintDeclaration(type) {
- return ts.getDeclarationOfKind(type.symbol, 143).constraint;
+ return ts.getDeclarationOfKind(type.symbol, 144).constraint;
}
- function hasConstraintReferenceTo(type, target) {
- var checked;
- while (type && type.flags & 16384 && !(type.isThisType) && !ts.contains(checked, type)) {
- if (type === target) {
- return true;
- }
- (checked || (checked = [])).push(type);
- var constraintDeclaration = getConstraintDeclaration(type);
- type = constraintDeclaration && getTypeFromTypeNode(constraintDeclaration);
- }
- return false;
- }
- function getConstraintOfTypeParameter(typeParameter) {
+ function getConstraintFromTypeParameter(typeParameter) {
if (!typeParameter.constraint) {
if (typeParameter.target) {
var targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
@@ -25192,28 +26978,23 @@ var ts;
}
else {
var constraintDeclaration = getConstraintDeclaration(typeParameter);
- var constraint = getTypeFromTypeNode(constraintDeclaration);
- if (hasConstraintReferenceTo(constraint, typeParameter)) {
- error(constraintDeclaration, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
- constraint = unknownType;
- }
- typeParameter.constraint = constraint;
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType;
}
}
return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
}
function getParentSymbolOfTypeParameter(typeParameter) {
- return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 143).parent);
+ return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent);
}
function getTypeListId(types) {
var result = "";
if (types) {
- var length_3 = types.length;
+ var length_4 = types.length;
var i = 0;
- while (i < length_3) {
+ while (i < length_4) {
var startId = types[i].id;
var count = 1;
- while (i + count < length_3 && types[i + count].id === startId + count) {
+ while (i + count < length_4 && types[i + count].id === startId + count) {
count++;
}
if (result.length) {
@@ -25230,8 +27011,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
- var type = types_3[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -25240,9 +27021,10 @@ var ts;
}
function createTypeReference(target, typeArguments) {
var id = getTypeListId(typeArguments);
- var type = target.instantiations[id];
+ var type = target.instantiations.get(id);
if (!type) {
- type = target.instantiations[id] = createObjectType(4, target.symbol);
+ type = createObjectType(4, target.symbol);
+ target.instantiations.set(id, type);
type.flags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, 0) : 0;
type.target = target;
type.typeArguments = typeArguments;
@@ -25258,17 +27040,22 @@ var ts;
return type;
}
function getTypeReferenceArity(type) {
- return type.target.typeParameters ? type.target.typeParameters.length : 0;
+ return ts.length(type.target.typeParameters);
}
function getTypeFromClassOrInterfaceReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (!ts.isInJavaScriptFile(node) && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode)));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
@@ -25281,14 +27068,22 @@ var ts;
var links = getSymbolLinks(symbol);
var typeParameters = links.typeParameters;
var id = getTypeListId(typeArguments);
- return links.instantiations[id] || (links.instantiations[id] = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments)));
+ var instantiation = links.instantiations.get(id);
+ if (!instantiation) {
+ links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters)))));
+ }
+ return instantiation;
}
function getTypeFromTypeAliasReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode);
@@ -25309,11 +27104,11 @@ var ts;
}
function getTypeReferenceName(node) {
switch (node.kind) {
- case 157:
+ case 158:
return node.typeName;
- case 272:
+ case 276:
return node.name;
- case 199:
+ case 200:
var expr = node.expression;
if (ts.isEntityNameExpression(expr)) {
return expr;
@@ -25337,23 +27132,58 @@ var ts;
if (symbol.flags & 524288) {
return getTypeFromTypeAliasReference(node, symbol);
}
- if (symbol.flags & 107455 && node.kind === 272) {
+ if (symbol.flags & 107455 && node.kind === 276) {
return getTypeOfSymbol(symbol);
}
return getTypeFromNonGenericTypeReference(node, symbol);
}
+ function getPrimitiveTypeFromJSDocTypeReference(node) {
+ if (ts.isIdentifier(node.name)) {
+ switch (node.name.text) {
+ case "String":
+ return stringType;
+ case "Number":
+ return numberType;
+ case "Boolean":
+ return booleanType;
+ case "Void":
+ return voidType;
+ case "Undefined":
+ return undefinedType;
+ case "Null":
+ return nullType;
+ case "Object":
+ return anyType;
+ case "Function":
+ return anyFunctionType;
+ case "Array":
+ case "array":
+ return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
+ case "Promise":
+ case "promise":
+ return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
+ }
+ }
+ }
+ function getTypeFromJSDocNullableTypeNode(node) {
+ var type = getTypeFromTypeNode(node.type);
+ return strictNullChecks ? getUnionType([type, nullType]) : type;
+ }
function getTypeFromTypeReference(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
- if (node.kind === 272) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
+ if (node.kind === 276) {
+ type = getPrimitiveTypeFromJSDocTypeReference(node);
+ if (!type) {
+ var typeReferenceName = getTypeReferenceName(node);
+ symbol = resolveTypeReferenceName(typeReferenceName);
+ type = getTypeReferenceType(node, symbol);
+ }
}
else {
- var typeNameOrExpression = node.kind === 157
+ var typeNameOrExpression = node.kind === 158
? node.typeName
: ts.isEntityNameExpression(node.expression)
? node.expression
@@ -25379,12 +27209,12 @@ var ts;
function getTypeOfGlobalSymbol(symbol, arity) {
function getTypeDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
- var declaration = declarations_3[_i];
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+ var declaration = declarations_4[_i];
switch (declaration.kind) {
- case 226:
- case 227:
+ case 228:
case 229:
+ case 231:
return declaration;
}
}
@@ -25397,44 +27227,91 @@ var ts;
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
return arity ? emptyGenericType : emptyObjectType;
}
- if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
+ if (ts.length(type.typeParameters) !== arity) {
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
return arity ? emptyGenericType : emptyObjectType;
}
return type;
}
- function getGlobalValueSymbol(name) {
- return getGlobalSymbol(name, 107455, ts.Diagnostics.Cannot_find_global_value_0);
+ function getGlobalValueSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 107455, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined);
}
- function getGlobalTypeSymbol(name) {
- return getGlobalSymbol(name, 793064, ts.Diagnostics.Cannot_find_global_type_0);
+ function getGlobalTypeSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 793064, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
}
function getGlobalSymbol(name, meaning, diagnostic) {
return resolveName(undefined, name, meaning, diagnostic, name);
}
- function getGlobalType(name, arity) {
+ function getGlobalType(name, arity, reportErrors) {
+ var symbol = getGlobalTypeSymbol(name, reportErrors);
+ return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
+ }
+ function getGlobalTypedPropertyDescriptorType() {
+ return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", 1, true)) || emptyGenericType;
+ }
+ function getGlobalTemplateStringsArrayType() {
+ return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", 0, true)) || emptyObjectType;
+ }
+ function getGlobalESSymbolConstructorSymbol(reportErrors) {
+ return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
+ }
+ function getGlobalESSymbolType(reportErrors) {
+ return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalPromiseType(reportErrors) {
+ return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalPromiseConstructorSymbol(reportErrors) {
+ return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
+ }
+ function getGlobalPromiseConstructorLikeType(reportErrors) {
+ return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalAsyncIterableType(reportErrors) {
+ return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIteratorType(reportErrors) {
+ return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIterableIteratorType(reportErrors) {
+ return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableType(reportErrors) {
+ return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIteratorType(reportErrors) {
+ return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableIteratorType(reportErrors) {
+ return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalTypeOrUndefined(name, arity) {
if (arity === void 0) { arity = 0; }
- return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
+ var symbol = getGlobalSymbol(name, 793064, undefined);
+ return symbol && getTypeOfGlobalSymbol(symbol, arity);
}
function getExportedTypeFromNamespace(namespace, name) {
var namespaceSymbol = getGlobalSymbol(namespace, 1920, undefined);
var typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, 793064);
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
- function createTypedPropertyDescriptorType(propertyType) {
- var globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
- return globalTypedPropertyDescriptorType !== emptyGenericType
- ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType])
- : emptyObjectType;
- }
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
}
- function createIterableType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]);
+ function createTypedPropertyDescriptorType(propertyType) {
+ return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);
}
- function createIterableIteratorType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]);
+ function createAsyncIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(true), [iteratedType]);
+ }
+ function createAsyncIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(true), [iteratedType]);
+ }
+ function createIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableType(true), [iteratedType]);
+ }
+ function createIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(true), [iteratedType]);
}
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
@@ -25452,7 +27329,7 @@ var ts;
for (var i = 0; i < arity; i++) {
var typeParameter = createType(16384);
typeParameters.push(typeParameter);
- var property = createSymbol(4 | 67108864, "" + i);
+ var property = createSymbol(4, "" + i);
property.type = typeParameter;
properties.push(property);
}
@@ -25461,7 +27338,7 @@ var ts;
type.outerTypeParameters = undefined;
type.localTypeParameters = typeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -25543,14 +27420,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
- var type = types_4[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var type = types_6[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var t = types_5[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var t = types_7[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -25558,8 +27435,9 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var i = 0, len = types.length; i < len; i++) {
- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
+ if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
}
@@ -25637,10 +27515,11 @@ var ts;
return types[0];
}
var id = getTypeListId(types);
- var type = unionTypes[id];
+ var type = unionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(types, 6144);
- type = unionTypes[id] = createType(65536 | propagatedFlags);
+ type = createType(65536 | propagatedFlags);
+ unionTypes.set(id, type);
type.types = types;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -25661,13 +27540,25 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
+ typeSet.containsEmptyObject = true;
+ }
else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
- typeSet.push(type);
+ if (type.flags & 32768) {
+ typeSet.containsObjectType = true;
+ }
+ if (type.flags & 65536 && typeSet.unionIndex === undefined) {
+ typeSet.unionIndex = typeSet.length;
+ }
+ if (!(type.flags & 32768 && type.objectFlags & 16 &&
+ type.symbol && type.symbol.flags & (16 | 8192) && containsIdenticalType(typeSet, type))) {
+ typeSet.push(type);
+ }
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var type = types_9[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -25675,30 +27566,28 @@ var ts;
if (types.length === 0) {
return emptyObjectType;
}
- var _loop_2 = function (i) {
- var type_1 = types[i];
- if (type_1.flags & 65536) {
- return { value: getUnionType(ts.map(type_1.types, function (t) { return getIntersectionType(ts.replaceElement(types, i, t)); }), false, aliasSymbol, aliasTypeArguments) };
- }
- };
- for (var i = 0; i < types.length; i++) {
- var state_2 = _loop_2(i);
- if (typeof state_2 === "object")
- return state_2.value;
- }
var typeSet = [];
addTypesToIntersection(typeSet, types);
if (typeSet.containsAny) {
return anyType;
}
+ if (typeSet.containsEmptyObject && !typeSet.containsObjectType) {
+ typeSet.push(emptyObjectType);
+ }
if (typeSet.length === 1) {
return typeSet[0];
}
+ var unionIndex = typeSet.unionIndex;
+ if (unionIndex !== undefined) {
+ var unionType = typeSet[unionIndex];
+ return getUnionType(ts.map(unionType.types, function (t) { return getIntersectionType(ts.replaceElement(typeSet, unionIndex, t)); }), false, aliasSymbol, aliasTypeArguments);
+ }
var id = getTypeListId(typeSet);
- var type = intersectionTypes[id];
+ var type = intersectionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, 6144);
- type = intersectionTypes[id] = createType(131072 | propagatedFlags);
+ type = createType(131072 | propagatedFlags);
+ intersectionTypes.set(id, type);
type.types = typeSet;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -25712,7 +27601,7 @@ var ts;
}
return links.resolvedType;
}
- function getIndexTypeForTypeParameter(type) {
+ function getIndexTypeForGenericType(type) {
if (!type.resolvedIndexType) {
type.resolvedIndexType = createType(262144);
type.resolvedIndexType.type = type;
@@ -25728,7 +27617,7 @@ var ts;
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
}
function getIndexType(type) {
- return type.flags & 16384 ? getIndexTypeForTypeParameter(type) :
+ return maybeTypeOfKind(type, 540672) ? getIndexTypeForGenericType(type) :
getObjectFlags(type) & 32 ? getConstraintTypeFromMappedType(type) :
type.flags & 1 || getIndexInfoOfType(type, 0) ? stringType :
getLiteralTypeFromPropertyNames(type);
@@ -25751,7 +27640,7 @@ var ts;
return type;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
var propName = indexType.flags & (32 | 64 | 256) ?
indexType.text :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
@@ -25780,14 +27669,14 @@ var ts;
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
- if (accessExpression && ts.isAssignmentTarget(accessExpression) && indexInfo.isReadonly) {
+ if (accessExpression && indexInfo.isReadonly && (ts.isAssignmentTarget(accessExpression) || ts.isDeleteTarget(accessExpression))) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
return unknownType;
}
return indexInfo.type;
}
if (accessExpression && !isConstEnumObjectType(objectType)) {
- if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
+ if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
if (getIndexTypeOfType(objectType, 1)) {
error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
}
@@ -25799,7 +27688,7 @@ var ts;
}
}
if (accessNode) {
- var indexNode = accessNode.kind === 178 ? accessNode.argumentExpression : accessNode.indexType;
+ var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType;
if (indexType.flags & (32 | 64)) {
error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType));
}
@@ -25809,34 +27698,36 @@ var ts;
else {
error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
}
+ return unknownType;
}
- return unknownType;
+ return anyType;
}
function getIndexedAccessForMappedType(type, indexType, accessNode) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type));
return unknownType;
}
- var mapper = createUnaryTypeMapper(getTypeParameterFromMappedType(type), indexType);
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(type)], [indexType]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, mapper) : mapper;
- return addOptionality(instantiateType(getTemplateTypeFromMappedType(type), templateMapper), !!type.declaration.questionToken);
+ return instantiateType(getTemplateTypeFromMappedType(type), templateMapper);
}
function getIndexedAccessType(objectType, indexType, accessNode) {
- if (indexType.flags & 16384 ||
- objectType.flags & 16384 && indexType.flags & 262144 ||
+ if (maybeTypeOfKind(indexType, 540672 | 262144) ||
+ maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) ||
isGenericMappedType(objectType)) {
- if (accessNode) {
- if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
- error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
- return unknownType;
- }
+ if (objectType.flags & 1) {
+ return objectType;
}
if (isGenericMappedType(objectType)) {
return getIndexedAccessForMappedType(objectType, indexType, accessNode);
}
var id = objectType.id + "," + indexType.id;
- return indexedAccessTypes[id] || (indexedAccessTypes[id] = createIndexedAccessType(objectType, indexType));
+ var type = indexedAccessTypes.get(id);
+ if (!type) {
+ indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType));
+ }
+ return type;
}
var apparentObjectType = getApparentType(objectType);
if (indexType.flags & 65536 && !(indexType.flags & 8190)) {
@@ -25876,7 +27767,7 @@ var ts;
var links = getNodeLinks(node);
if (!links.resolvedType) {
var aliasSymbol = getAliasSymbolForTypeNode(node);
- if (ts.isEmpty(node.symbol.members) && !aliasSymbol) {
+ if (node.symbol.members.size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {
@@ -25889,17 +27780,33 @@ var ts;
return links.resolvedType;
}
function getAliasSymbolForTypeNode(node) {
- return node.parent.kind === 228 ? getSymbolOfNode(node.parent) : undefined;
+ return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node) {
var symbol = getAliasSymbolForTypeNode(node);
return symbol ? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) : undefined;
}
- function getSpreadType(left, right, isFromObjectLiteral) {
- ts.Debug.assert(!!(left.flags & (32768 | 1)) && !!(right.flags & (32768 | 1)), "Only object types may be spread.");
+ function getSpreadType(left, right) {
if (left.flags & 1 || right.flags & 1) {
return anyType;
}
+ left = filterType(left, function (t) { return !(t.flags & 6144); });
+ if (left.flags & 8192) {
+ return right;
+ }
+ right = filterType(right, function (t) { return !(t.flags & 6144); });
+ if (right.flags & 8192) {
+ return left;
+ }
+ if (left.flags & 65536) {
+ return mapType(left, function (t) { return getSpreadType(t, right); });
+ }
+ if (right.flags & 65536) {
+ return mapType(right, function (t) { return getSpreadType(left, t); });
+ }
+ if (right.flags & 16777216) {
+ return emptyObjectType;
+ }
var members = ts.createMap();
var skippedPrivateMembers = ts.createMap();
var stringIndexInfo;
@@ -25914,42 +27821,55 @@ var ts;
}
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
- var isOwnProperty = !(rightProp.flags & 8192) || isFromObjectLiteral;
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
- skippedPrivateMembers[rightProp.name] = true;
+ skippedPrivateMembers.set(rightProp.name, true);
}
- else if (isOwnProperty && !isSetterWithoutGetter) {
- members[rightProp.name] = rightProp;
+ else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
+ members.set(rightProp.name, getNonReadonlySymbol(rightProp));
}
}
for (var _b = 0, _c = getPropertiesOfType(left); _b < _c.length; _b++) {
var leftProp = _c[_b];
if (leftProp.flags & 65536 && !(leftProp.flags & 32768)
- || leftProp.name in skippedPrivateMembers) {
+ || skippedPrivateMembers.has(leftProp.name)
+ || isClassMethod(leftProp)) {
continue;
}
- if (leftProp.name in members) {
- var rightProp = members[leftProp.name];
+ if (members.has(leftProp.name)) {
+ var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 536870912) {
+ if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
- var flags = 4 | 67108864 | (leftProp.flags & 536870912);
+ var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 131072)]);
result.leftSpread = leftProp;
result.rightSpread = rightProp;
result.declarations = declarations;
- result.isReadonly = isReadonlySymbol(leftProp) || isReadonlySymbol(rightProp);
- members[leftProp.name] = result;
+ members.set(leftProp.name, result);
}
}
else {
- members[leftProp.name] = leftProp;
+ members.set(leftProp.name, getNonReadonlySymbol(leftProp));
}
}
return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
+ function getNonReadonlySymbol(prop) {
+ if (!isReadonlySymbol(prop)) {
+ return prop;
+ }
+ var flags = 4 | (prop.flags & 67108864);
+ var result = createSymbol(flags, prop.name);
+ result.type = getTypeOfSymbol(prop);
+ result.declarations = prop.declarations;
+ result.syntheticOrigin = prop;
+ return result;
+ }
+ function isClassMethod(prop) {
+ return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
+ }
function createLiteralType(flags, text) {
var type = createType(flags);
type.text = text;
@@ -25971,7 +27891,11 @@ var ts;
}
function getLiteralTypeForText(flags, text) {
var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- return map[text] || (map[text] = createLiteralType(flags, text));
+ var type = map.get(text);
+ if (!type) {
+ map.set(text, type = createLiteralType(flags, text));
+ }
+ return type;
}
function getTypeFromLiteralTypeNode(node) {
var links = getNodeLinks(node);
@@ -25999,9 +27923,9 @@ var ts;
function getThisType(node) {
var container = ts.getThisContainer(node, false);
var parent = container && container.parent;
- if (parent && (ts.isClassLike(parent) || parent.kind === 227)) {
+ if (parent && (ts.isClassLike(parent) || parent.kind === 229)) {
if (!(ts.getModifierFlags(container) & 32) &&
- (container.kind !== 150 || ts.isNodeDescendantOf(node, container.body))) {
+ (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@@ -26018,85 +27942,82 @@ var ts;
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 118:
- case 263:
- case 264:
+ case 267:
+ case 268:
return anyType;
- case 134:
+ case 135:
return stringType;
case 132:
return numberType;
case 121:
return booleanType;
- case 135:
+ case 136:
return esSymbolType;
case 104:
return voidType;
- case 137:
+ case 138:
return undefinedType;
case 94:
return nullType;
case 129:
return neverType;
- case 289:
- return nullType;
- case 290:
- return undefinedType;
- case 291:
- return neverType;
- case 167:
+ case 133:
+ return nonPrimitiveType;
+ case 168:
case 98:
return getTypeFromThisTypeNode(node);
- case 171:
+ case 172:
return getTypeFromLiteralTypeNode(node);
- case 288:
+ case 292:
return getTypeFromLiteralTypeNode(node.literal);
- case 157:
- case 272:
+ case 158:
+ case 276:
return getTypeFromTypeReference(node);
- case 156:
+ case 157:
return booleanType;
- case 199:
+ case 200:
return getTypeFromTypeReference(node);
- case 160:
+ case 161:
return getTypeFromTypeQueryNode(node);
- case 162:
- case 265:
- return getTypeFromArrayTypeNode(node);
case 163:
- return getTypeFromTupleTypeNode(node);
+ case 269:
+ return getTypeFromArrayTypeNode(node);
case 164:
- case 266:
- return getTypeFromUnionTypeNode(node);
+ return getTypeFromTupleTypeNode(node);
case 165:
- return getTypeFromIntersectionTypeNode(node);
+ case 270:
+ return getTypeFromUnionTypeNode(node);
case 166:
- case 268:
- case 269:
- case 276:
- case 277:
+ return getTypeFromIntersectionTypeNode(node);
+ case 272:
+ return getTypeFromJSDocNullableTypeNode(node);
+ case 167:
case 273:
+ case 280:
+ case 281:
+ case 277:
return getTypeFromTypeNode(node.type);
- case 270:
+ case 274:
return getTypeFromTypeNode(node.literal);
- case 158:
case 159:
- case 161:
- case 287:
- case 274:
+ case 160:
+ case 162:
+ case 291:
+ case 278:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
- case 168:
- return getTypeFromTypeOperatorNode(node);
case 169:
- return getTypeFromIndexedAccessTypeNode(node);
+ return getTypeFromTypeOperatorNode(node);
case 170:
+ return getTypeFromIndexedAccessTypeNode(node);
+ case 171:
return getTypeFromMappedTypeNode(node);
case 70:
- case 141:
+ case 142:
var symbol = getSymbolAtLocation(node);
return symbol && getDeclaredTypeOfSymbol(symbol);
- case 267:
+ case 271:
return getTypeFromJSDocTupleType(node);
- case 275:
+ case 279:
return getTypeFromJSDocVariadicType(node);
default:
return unknownType;
@@ -26123,13 +28044,13 @@ var ts;
var instantiations = mapper.instantiations || (mapper.instantiations = []);
return instantiations[type.id] || (instantiations[type.id] = instantiator(type, mapper));
}
- function createUnaryTypeMapper(source, target) {
+ function makeUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
}
- function createBinaryTypeMapper(source1, target1, source2, target2) {
+ function makeBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
}
- function createArrayTypeMapper(sources, targets) {
+ function makeArrayTypeMapper(sources, targets) {
return function (t) {
for (var i = 0; i < sources.length; i++) {
if (t === sources[i]) {
@@ -26140,16 +28061,20 @@ var ts;
};
}
function createTypeMapper(sources, targets) {
- var count = sources.length;
- var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
- count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
- createArrayTypeMapper(sources, targets);
+ var mapper = sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
+ sources.length === 2 ? makeBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
+ makeArrayTypeMapper(sources, targets);
mapper.mappedTypes = sources;
return mapper;
}
function createTypeEraser(sources) {
return createTypeMapper(sources, undefined);
}
+ function createBackreferenceMapper(typeParameters, index) {
+ var mapper = function (t) { return ts.indexOf(typeParameters, t) >= index ? emptyObjectType : t; };
+ mapper.mappedTypes = typeParameters;
+ return mapper;
+ }
function getInferenceMapper(context) {
if (!context.mapper) {
var mapper = function (t) {
@@ -26173,7 +28098,12 @@ var ts;
}
function combineTypeMappers(mapper1, mapper2) {
var mapper = function (t) { return instantiateType(mapper1(t), mapper2); };
- mapper.mappedTypes = mapper1.mappedTypes;
+ mapper.mappedTypes = ts.concatenate(mapper1.mappedTypes, mapper2.mappedTypes);
+ return mapper;
+ }
+ function createReplacementMapper(source, target, baseMapper) {
+ var mapper = function (t) { return t === source ? target : baseMapper(t); };
+ mapper.mappedTypes = baseMapper.mappedTypes;
return mapper;
}
function cloneTypeParameter(typeParameter) {
@@ -26218,12 +28148,13 @@ var ts;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
}
- var result = createSymbol(16777216 | 67108864 | symbol.flags, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
+ result.checkFlags = 1;
result.declarations = symbol.declarations;
result.parent = symbol.parent;
result.target = symbol;
@@ -26244,18 +28175,17 @@ var ts;
function instantiateMappedType(type, mapper) {
var constraintType = getConstraintTypeFromMappedType(type);
if (constraintType.flags & 262144) {
- var typeParameter_1 = constraintType.type;
- var mappedTypeParameter = mapper(typeParameter_1);
- if (typeParameter_1 !== mappedTypeParameter) {
- return mapType(mappedTypeParameter, function (t) {
- if (isMappableType(t)) {
- var replacementMapper = createUnaryTypeMapper(typeParameter_1, t);
- var combinedMapper = mapper.mappedTypes && mapper.mappedTypes.length === 1 ? replacementMapper : combineTypeMappers(replacementMapper, mapper);
- combinedMapper.mappedTypes = mapper.mappedTypes;
- return instantiateMappedObjectType(type, combinedMapper);
- }
- return t;
- });
+ var typeVariable_1 = constraintType.type;
+ if (typeVariable_1.flags & 16384) {
+ var mappedTypeVariable = instantiateType(typeVariable_1, mapper);
+ if (typeVariable_1 !== mappedTypeVariable) {
+ return mapType(mappedTypeVariable, function (t) {
+ if (isMappableType(t)) {
+ return instantiateMappedObjectType(type, createReplacementMapper(typeVariable_1, t, mapper));
+ }
+ return t;
+ });
+ }
}
}
return instantiateMappedObjectType(type, mapper);
@@ -26276,26 +28206,28 @@ var ts;
return false;
}
var mappedTypes = mapper.mappedTypes;
- var node = symbol.declarations[0].parent;
- while (node) {
+ return !!ts.findAncestor(symbol.declarations[0], function (node) {
+ if (node.kind === 232 || node.kind === 264) {
+ return "quit";
+ }
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 226:
- case 197:
- case 227:
+ case 186:
case 228:
+ case 198:
+ case 229:
+ case 230:
var declaration = node;
if (declaration.typeParameters) {
for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
@@ -26305,25 +28237,34 @@ var ts;
}
}
}
- if (ts.isClassLike(node) || node.kind === 227) {
+ if (ts.isClassLike(node) || node.kind === 229) {
var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
if (thisType && ts.contains(mappedTypes, thisType)) {
return true;
}
}
break;
- case 230:
- case 261:
- return false;
+ case 171:
+ if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) {
+ return true;
+ }
+ break;
+ case 278:
+ var func = node;
+ for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
+ var p = _c[_b];
+ if (ts.contains(mappedTypes, getTypeOfNode(p))) {
+ return true;
+ }
+ }
+ break;
}
- node = node.parent;
- }
- return false;
+ });
}
function isTopLevelTypeAlias(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var parentKind = symbol.declarations[0].parent.kind;
- return parentKind === 261 || parentKind === 231;
+ return parentKind === 264 || parentKind === 233;
}
return false;
}
@@ -26375,28 +28316,34 @@ var ts;
return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration);
}
function isContextSensitive(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
switch (node.kind) {
- case 184:
case 185:
+ case 186:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 176:
+ case 177:
return ts.forEach(node.properties, isContextSensitive);
- case 175:
+ case 176:
return ts.forEach(node.elements, isContextSensitive);
- case 193:
+ case 194:
return isContextSensitive(node.whenTrue) ||
isContextSensitive(node.whenFalse);
- case 192:
+ case 193:
return node.operatorToken.kind === 53 &&
(isContextSensitive(node.left) || isContextSensitive(node.right));
- case 257:
+ case 260:
return isContextSensitive(node.initializer);
+ case 150:
case 149:
- case 148:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 183:
+ case 184:
return isContextSensitive(node.expression);
+ case 253:
+ return ts.forEach(node.properties, isContextSensitive);
+ case 252:
+ return node.initializer && isContextSensitive(node.initializer);
+ case 255:
+ return node.expression && isContextSensitive(node.expression);
}
return false;
}
@@ -26407,7 +28354,7 @@ var ts;
if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
return true;
}
- if (node.kind === 185) {
+ if (node.kind === 186) {
return false;
}
var parameter = ts.firstOrUndefined(node.parameters);
@@ -26425,9 +28372,12 @@ var ts;
result.properties = resolved.properties;
result.callSignatures = emptyArray;
result.constructSignatures = emptyArray;
- type = result;
+ return result;
}
}
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, getTypeWithoutSignatures));
+ }
return type;
}
function isTypeIdenticalTo(source, target) {
@@ -26446,7 +28396,7 @@ var ts;
return isTypeRelatedTo(source, target, assignableRelation);
}
function isTypeInstanceOf(source, target) {
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
}
function isTypeComparableTo(source, target) {
return isTypeRelatedTo(source, target, comparableRelation);
@@ -26464,9 +28414,9 @@ var ts;
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
}
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
- return compareSignaturesRelated(source, target, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
+ return compareSignaturesRelated(source, target, false, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
}
- function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
+ function compareSignaturesRelated(source, target, checkAsCallback, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
if (source === target) {
return -1;
}
@@ -26497,9 +28447,15 @@ var ts;
var sourceParams = source.parameters;
var targetParams = target.parameters;
for (var i = 0; i < checkCount; i++) {
- var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
- var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
- var related = compareTypes(s, t, false) || compareTypes(t, s, reportErrors);
+ var sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
+ var targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
+ var sourceSig = getSingleCallSignature(getNonNullableType(sourceType));
+ var targetSig = getSingleCallSignature(getNonNullableType(targetType));
+ var callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate &&
+ (getFalsyFlags(sourceType) & 6144) === (getFalsyFlags(targetType) & 6144);
+ var related = callbacks ?
+ compareSignaturesRelated(targetSig, sourceSig, true, false, reportErrors, errorReporter, compareTypes) :
+ !checkAsCallback && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name);
@@ -26526,7 +28482,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -26589,18 +28546,33 @@ var ts;
sourceNonRestParamCount;
}
}
+ function isEmptyResolvedType(t) {
+ return t.properties.length === 0 &&
+ t.callSignatures.length === 0 &&
+ t.constructSignatures.length === 0 &&
+ !t.stringIndexInfo &&
+ !t.numberIndexInfo;
+ }
+ function isEmptyObjectType(type) {
+ return type.flags & 32768 ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
+ type.flags & 65536 ? ts.forEach(type.types, isEmptyObjectType) :
+ type.flags & 131072 ? !ts.forEach(type.types, function (t) { return !isEmptyObjectType(t); }) :
+ false;
+ }
function isEnumTypeRelatedTo(source, target, errorReporter) {
if (source === target) {
return true;
}
var id = source.id + "," + target.id;
- if (enumRelation[id] !== undefined) {
- return enumRelation[id];
+ var relation = enumRelation.get(id);
+ if (relation !== undefined) {
+ return relation;
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 65536) !== (target.flags & 65536)) {
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@@ -26611,11 +28583,13 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
}
}
- return enumRelation[id] = true;
+ enumRelation.set(id, true);
+ return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@@ -26636,6 +28610,8 @@ var ts;
return true;
if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
return true;
+ if (source.flags & 32768 && target.flags & 16777216)
+ return true;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
@@ -26667,13 +28643,13 @@ var ts;
}
if (source.flags & 32768 && target.flags & 32768) {
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
return related === 1;
}
}
- if (source.flags & 507904 || target.flags & 507904) {
- return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined);
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ return checkTypeRelatedTo(source, target, relation, undefined);
}
return false;
}
@@ -26727,10 +28703,27 @@ var ts;
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
- (getGlobalESSymbolType() === source && esSymbolType === target)) {
+ (getGlobalESSymbolType(false) === source && esSymbolType === target)) {
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
+ function isUnionOrIntersectionTypeWithoutNullableConstituents(type) {
+ if (!(type.flags & 196608)) {
+ return false;
+ }
+ var seenNonNullable = false;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (t.flags & 6144) {
+ continue;
+ }
+ if (seenNonNullable) {
+ return true;
+ }
+ seenNonNullable = true;
+ }
+ return false;
+ }
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
if (source.flags & 96 && source.flags & 1048576) {
@@ -26753,7 +28746,7 @@ var ts;
}
return 0;
}
- if (target.flags & 196608) {
+ if (isUnionOrIntersectionTypeWithoutNullableConstituents(target)) {
source = getRegularTypeOfObjectLiteral(source);
}
}
@@ -26769,91 +28762,24 @@ var ts;
return result;
}
}
- else if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
- }
- else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
- }
- else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
- }
- if (target.flags & 16384) {
- if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
- if (!source.declaration.questionToken) {
- var templateType = getTemplateTypeFromMappedType(source);
- var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
- if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
- return result;
- }
- }
- }
- else {
- var constraint = getConstraintOfTypeParameter(target);
- if (constraint && constraint.flags & 262144) {
- if (result = isRelatedTo(source, constraint, reportErrors)) {
- return result;
- }
- }
- }
- }
- else if (target.flags & 262144) {
- if (source.flags & 262144) {
- if (result = isRelatedTo(target.type, source.type, false)) {
- return result;
- }
- }
- var constraint = getConstraintOfTypeParameter(target.type);
- if (constraint) {
- if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ else {
+ if (target.flags & 65536) {
+ if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
return result;
}
}
- }
- else if (target.flags & 524288) {
- if (source.flags & 524288 && source.indexType === target.indexType) {
- if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ else if (target.flags & 131072) {
+ if (result = typeRelatedToEachType(source, target, reportErrors)) {
return result;
}
}
- }
- if (source.flags & 16384) {
- if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
- var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
- var templateType = getTemplateTypeFromMappedType(target);
- if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ else if (source.flags & 131072) {
+ if (result = someTypeRelatedToType(source, target, false)) {
return result;
}
}
- else {
- var constraint = getConstraintOfTypeParameter(source);
- if (!constraint || constraint.flags & 1) {
- constraint = emptyObjectType;
- }
- constraint = getTypeWithThisArgument(constraint, source);
- var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
- if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
- errorInfo = saveErrorInfo;
- return result;
- }
- }
- }
- else {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
- return result;
- }
- }
- var apparentSource = getApparentType(source);
- if (apparentSource.flags & (32768 | 131072) && target.flags & 32768) {
- var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190);
- if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) {
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
return result;
}
@@ -26873,12 +28799,7 @@ var ts;
function isIdenticalTo(source, target) {
var result;
if (source.flags & 32768 && target.flags & 32768) {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, false)) {
- return result;
- }
- }
- return objectTypeRelatedTo(source, source, target, false);
+ return recursiveTypeRelatedTo(source, target, false);
}
if (source.flags & 65536 && target.flags & 65536 ||
source.flags & 131072 && target.flags & 131072) {
@@ -26890,42 +28811,43 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name) {
+ function isKnownProperty(type, name, isComparingJsxAttributes) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
- resolved.stringIndexInfo ||
- (resolved.numberIndexInfo && isNumericLiteralName(name)) ||
- getPropertyOfType(type, name)) {
+ if (resolved.stringIndexInfo || resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfType(type, name) || isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
return true;
}
}
else if (type.flags & 196608) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- if (isKnownProperty(t, name)) {
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
return true;
}
}
}
return false;
}
- function isEmptyObjectType(t) {
- return t.properties.length === 0 &&
- t.callSignatures.length === 0 &&
- t.constructSignatures.length === 0 &&
- !t.stringIndexInfo &&
- !t.numberIndexInfo;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ if ((relation === assignableRelation || relation === comparableRelation) &&
+ (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
+ return false;
+ }
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!isKnownProperty(target, prop.name)) {
+ if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
- errorNode = prop.valueDeclaration;
- reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ if (ts.isJsxAttributes(errorNode)) {
+ reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
+ }
+ else {
+ errorNode = prop.valueDeclaration;
+ reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ }
}
return true;
}
@@ -26951,20 +28873,42 @@ var ts;
if (target.flags & 65536 && containsType(targetTypes, source)) {
return -1;
}
- var len = targetTypes.length;
- for (var i = 0; i < len; i++) {
- var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
+ for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
+ var type = targetTypes_1[_i];
+ var related = isRelatedTo(source, type, false);
if (related) {
return related;
}
}
+ if (reportErrors) {
+ var discriminantType = findMatchingDiscriminantType(source, target);
+ isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], true);
+ }
return 0;
}
+ function findMatchingDiscriminantType(source, target) {
+ var sourceProperties = getPropertiesOfObjectType(source);
+ if (sourceProperties) {
+ for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
+ var sourceProperty = sourceProperties_1[_i];
+ if (isDiscriminantProperty(target, sourceProperty.name)) {
+ var sourceType = getTypeOfSymbol(sourceProperty);
+ for (var _a = 0, _b = target.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ var targetType = getTypeOfPropertyOfType(type, sourceProperty.name);
+ if (targetType && isRelatedTo(sourceType, targetType)) {
+ return type;
+ }
+ }
+ }
+ }
+ }
+ }
function typeRelatedToEachType(source, target, reportErrors) {
var result = -1;
var targetTypes = target.types;
- for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
- var targetType = targetTypes_1[_i];
+ for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
+ var targetType = targetTypes_2[_i];
var related = isRelatedTo(source, targetType, reportErrors);
if (!related) {
return 0;
@@ -27017,15 +28961,15 @@ var ts;
}
return result;
}
- function objectTypeRelatedTo(source, originalSource, target, reportErrors) {
+ function recursiveTypeRelatedTo(source, target, reportErrors) {
if (overflow) {
return 0;
}
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
if (reportErrors && related === 2) {
- relation[id] = 3;
+ relation.set(id, 3);
}
else {
return related === 1 ? -1 : 0;
@@ -27033,7 +28977,7 @@ var ts;
}
if (depth > 0) {
for (var i = 0; i < depth; i++) {
- if (maybeStack[i][id]) {
+ if (maybeStack[i].get(id)) {
return 1;
}
}
@@ -27051,71 +28995,165 @@ var ts;
sourceStack[depth] = source;
targetStack[depth] = target;
maybeStack[depth] = ts.createMap();
- maybeStack[depth][id] = 1;
+ maybeStack[depth].set(id, 1);
depth++;
var saveExpandingFlags = expandingFlags;
- if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth))
+ if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
expandingFlags |= 1;
- if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth))
+ if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
expandingFlags |= 2;
+ var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : 1;
+ expandingFlags = saveExpandingFlags;
+ depth--;
+ if (result) {
+ var maybeCache = maybeStack[depth];
+ var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
+ ts.copyEntries(maybeCache, destinationCache);
+ }
+ else {
+ relation.set(id, reportErrors ? 3 : 2);
+ }
+ return result;
+ }
+ function structuredTypeRelatedTo(source, target, reportErrors) {
var result;
- if (expandingFlags === 3) {
- result = 1;
+ var saveErrorInfo = errorInfo;
+ if (target.flags & 16384) {
+ if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
+ if (!source.declaration.questionToken) {
+ var templateType = getTemplateTypeFromMappedType(source);
+ var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
+ if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+ return result;
+ }
+ }
+ }
+ }
+ else if (target.flags & 262144) {
+ if (source.flags & 262144) {
+ if (result = isRelatedTo(target.type, source.type, false)) {
+ return result;
+ }
+ }
+ var constraint = getConstraintOfType(target.type);
+ if (constraint) {
+ if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ return result;
+ }
+ }
}
- else if (isGenericMappedType(source) || isGenericMappedType(target)) {
- result = mappedTypeRelatedTo(source, target, reportErrors);
+ else if (target.flags & 524288) {
+ var constraint = getConstraintOfType(target);
+ if (constraint) {
+ if (result = isRelatedTo(source, constraint, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ if (source.flags & 16384) {
+ if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
+ var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
+ var templateType = getTemplateTypeFromMappedType(target);
+ if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else {
+ var constraint = getConstraintOfTypeParameter(source);
+ if (constraint || !(target.flags & 16777216)) {
+ if (!constraint || constraint.flags & 1) {
+ constraint = emptyObjectType;
+ }
+ constraint = getTypeWithThisArgument(constraint, source);
+ var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
+ if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ }
+ else if (source.flags & 524288) {
+ var constraint = getConstraintOfType(source);
+ if (constraint) {
+ if (result = isRelatedTo(constraint, target, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else if (target.flags & 524288 && source.indexType === target.indexType) {
+ if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ return result;
+ }
+ }
}
else {
- result = propertiesRelatedTo(source, target, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 0, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 1, reportErrors);
+ if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
+ if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ return result;
+ }
+ }
+ var sourceIsPrimitive = !!(source.flags & 8190);
+ if (relation !== identityRelation) {
+ source = getApparentType(source);
+ }
+ if (source.flags & (32768 | 131072) && target.flags & 32768) {
+ var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive;
+ if (isGenericMappedType(source) || isGenericMappedType(target)) {
+ result = mappedTypeRelatedTo(source, target, reportStructuralErrors);
+ }
+ else {
+ result = propertiesRelatedTo(source, target, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 0, reportErrors);
+ result &= signaturesRelatedTo(source, target, 0, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 1, reportErrors);
+ result &= signaturesRelatedTo(source, target, 1, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 0, sourceIsPrimitive, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 1, sourceIsPrimitive, reportStructuralErrors);
+ }
+ }
}
}
}
+ if (result) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
}
}
- expandingFlags = saveExpandingFlags;
- depth--;
- if (result) {
- var maybeCache = maybeStack[depth];
- var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
- ts.copyProperties(maybeCache, destinationCache);
- }
- else {
- relation[id] = reportErrors ? 3 : 2;
- }
- return result;
+ return 0;
}
function mappedTypeRelatedTo(source, target, reportErrors) {
if (isGenericMappedType(target)) {
if (isGenericMappedType(source)) {
- var result_2;
- if (relation === identityRelation) {
- var readonlyMatches = !source.declaration.readonlyToken === !target.declaration.readonlyToken;
- var optionalMatches = !source.declaration.questionToken === !target.declaration.questionToken;
- if (readonlyMatches && optionalMatches) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getErasedTemplateTypeFromMappedType(source), getErasedTemplateTypeFromMappedType(target), reportErrors);
- }
- }
- }
- else {
- if (relation === comparableRelation || !source.declaration.questionToken || target.declaration.questionToken) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target), reportErrors);
- }
+ var sourceReadonly = !!source.declaration.readonlyToken;
+ var sourceOptional = !!source.declaration.questionToken;
+ var targetReadonly = !!target.declaration.readonlyToken;
+ var targetOptional = !!target.declaration.questionToken;
+ var modifiersRelated = relation === identityRelation ?
+ sourceReadonly === targetReadonly && sourceOptional === targetOptional :
+ relation === comparableRelation || !sourceOptional || targetOptional;
+ if (modifiersRelated) {
+ var result_2;
+ if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
+ return result_2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
}
}
}
+ else if (target.declaration.questionToken && isEmptyObjectType(source)) {
+ return -1;
+ }
}
- else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(target))) {
- return -1;
+ else if (relation !== identityRelation) {
+ var resolved = resolveStructuredTypeMembers(target);
+ if (isEmptyResolvedType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & 1) {
+ return -1;
+ }
}
return 0;
}
@@ -27126,22 +29164,28 @@ var ts;
var result = -1;
var properties = getPropertiesOfObjectType(target);
var requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & 128);
- for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
- var targetProp = properties_3[_i];
+ for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
+ var targetProp = properties_4[_i];
var sourceProp = getPropertyOfType(source, targetProp.name);
if (sourceProp !== targetProp) {
if (!sourceProp) {
- if (!(targetProp.flags & 536870912) || requireOptionalProperties) {
+ if (!(targetProp.flags & 67108864) || requireOptionalProperties) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
}
return 0;
}
}
- else if (!(targetProp.flags & 134217728)) {
+ else if (!(targetProp.flags & 16777216)) {
var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
+ if (getCheckFlags(sourceProp) & 256) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
+ }
+ return 0;
+ }
if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
if (reportErrors) {
if (sourcePropFlags & 8 && targetPropFlags & 8) {
@@ -27155,12 +29199,9 @@ var ts;
}
}
else if (targetPropFlags & 16) {
- var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32;
- var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined;
- var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp));
- if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
+ if (!isValidOverrideOf(sourceProp, targetProp)) {
if (reportErrors) {
- reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
+ reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source), typeToString(getDeclaringClass(targetProp) || target));
}
return 0;
}
@@ -27179,7 +29220,7 @@ var ts;
return 0;
}
result &= related;
- if (relation !== comparableRelation && sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) {
+ if (relation !== comparableRelation && sourceProp.flags & 67108864 && !(targetProp.flags & 67108864)) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target));
}
@@ -27200,8 +29241,8 @@ var ts;
return 0;
}
var result = -1;
- for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
- var sourceProp = sourceProperties_1[_i];
+ for (var _i = 0, sourceProperties_2 = sourceProperties; _i < sourceProperties_2.length; _i++) {
+ var sourceProp = sourceProperties_2[_i];
var targetProp = getPropertyOfObjectType(target, sourceProp.name);
if (!targetProp) {
return 0;
@@ -27257,7 +29298,7 @@ var ts;
return result;
}
function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ return compareSignaturesRelated(source, target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -27266,7 +29307,7 @@ var ts;
return 0;
}
var result = -1;
- for (var i = 0, len = sourceSignatures.length; i < len; i++) {
+ for (var i = 0; i < sourceSignatures.length; i++) {
var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], false, false, false, isRelatedTo);
if (!related) {
return 0;
@@ -27299,12 +29340,12 @@ var ts;
}
return related;
}
- function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) {
+ function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors) {
if (relation === identityRelation) {
return indexTypesIdenticalTo(source, target, kind);
}
var targetInfo = getIndexInfoOfType(target, kind);
- if (!targetInfo || ((targetInfo.type.flags & 1) && !(originalSource.flags & 8190))) {
+ if (!targetInfo || targetInfo.type.flags & 1 && !sourceIsPrimitive) {
return -1;
}
var sourceInfo = getIndexInfoOfType(source, kind) ||
@@ -27362,6 +29403,37 @@ var ts;
return false;
}
}
+ function forEachProperty(prop, callback) {
+ if (getCheckFlags(prop) & 6) {
+ for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ var p = getPropertyOfType(t, prop.name);
+ var result = p && forEachProperty(p, callback);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ }
+ return callback(prop);
+ }
+ function getDeclaringClass(prop) {
+ return prop.parent && prop.parent.flags & 32 ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;
+ }
+ function isPropertyInClassDerivedFrom(prop, baseClass) {
+ return forEachProperty(prop, function (sp) {
+ var sourceClass = getDeclaringClass(sp);
+ return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
+ });
+ }
+ function isValidOverrideOf(sourceProp, targetProp) {
+ return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
+ }
+ function isClassDerivedFromDeclaringClasses(checkClass, prop) {
+ return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
+ }
function isAbstractConstructorType(type) {
if (getObjectFlags(type) & 16) {
var symbol = type.symbol;
@@ -27374,16 +29446,18 @@ var ts;
}
return false;
}
- function isDeeplyNestedGeneric(type, stack, depth) {
- if (getObjectFlags(type) & (4 | 64) && depth >= 5) {
+ function isDeeplyNestedType(type, stack, depth) {
+ if (depth >= 5 && type.flags & 32768) {
var symbol = type.symbol;
- var count = 0;
- for (var i = 0; i < depth; i++) {
- var t = stack[i];
- if (getObjectFlags(t) & (4 | 64) && t.symbol === symbol) {
- count++;
- if (count >= 5)
- return true;
+ if (symbol) {
+ var count = 0;
+ for (var i = 0; i < depth; i++) {
+ var t = stack[i];
+ if (t.flags & 32768 && t.symbol === symbol) {
+ count++;
+ if (count >= 5)
+ return true;
+ }
}
}
}
@@ -27407,7 +29481,7 @@ var ts;
}
}
else {
- if ((sourceProp.flags & 536870912) !== (targetProp.flags & 536870912)) {
+ if ((sourceProp.flags & 67108864) !== (targetProp.flags & 67108864)) {
return 0;
}
}
@@ -27437,7 +29511,7 @@ var ts;
if (!(isMatchingSignature(source, target, partialMatch))) {
return 0;
}
- if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
+ if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) {
return 0;
}
source = getErasedSignature(source);
@@ -27475,8 +29549,8 @@ var ts;
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
function isSupertypeOfEach(candidate, types) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
if (candidate !== t && !isTypeSubtypeOf(t, candidate))
return false;
}
@@ -27484,8 +29558,8 @@ var ts;
}
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var t = types_8[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -27576,8 +29650,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var t = types_9[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -27606,7 +29680,7 @@ var ts;
types.push(undefinedType);
if (flags & 4096)
types.push(nullType);
- return getUnionType(types, true);
+ return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
@@ -27621,8 +29695,8 @@ var ts;
getSignaturesOfType(type, 0).length === 0 &&
getSignaturesOfType(type, 1).length === 0;
}
- function createTransientSymbol(source, type) {
- var symbol = createSymbol(source.flags | 67108864, source.name);
+ function createSymbolWithType(source, type) {
+ var symbol = createSymbol(source.flags, source.name);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;
@@ -27638,9 +29712,8 @@ var ts;
var property = _a[_i];
var original = getTypeOfSymbol(property);
var updated = f(original);
- members[property.name] = updated === original ? property : createTransientSymbol(property, updated);
+ members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
}
- ;
return members;
}
function getRegularTypeOfObjectLiteral(type) {
@@ -27659,11 +29732,17 @@ var ts;
type.regularType = regularNew;
return regularNew;
}
+ function getWidenedProperty(prop) {
+ var original = getTypeOfSymbol(prop);
+ var widened = getWidenedType(original);
+ return widened === original ? prop : createSymbolWithType(prop, widened);
+ }
function getWidenedTypeOfObjectLiteral(type) {
- var members = transformTypeOfMembers(type, function (prop) {
- var widened = getWidenedType(prop);
- return prop === widened ? prop : widened;
- });
+ var members = ts.createMap();
+ for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ members.set(prop.name, prop.flags & 4 ? getWidenedProperty(prop) : prop);
+ }
var stringIndexInfo = getIndexInfoOfType(type, 0);
var numberIndexInfo = getIndexInfoOfType(type, 1);
return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
@@ -27724,25 +29803,25 @@ var ts;
var typeAsString = typeToString(getWidenedType(type));
var diagnostic;
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
break;
- case 144:
+ case 145:
diagnostic = declaration.dotDotDotToken ?
ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
break;
- case 174:
+ case 175:
diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
break;
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 184:
+ case 153:
case 185:
+ case 186:
if (!declaration.name) {
error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
return;
@@ -27755,7 +29834,7 @@ var ts;
error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
- if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152) {
+ if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
if (!reportWideningErrorsInType(type)) {
reportImplicitAnyError(declaration, type);
}
@@ -27781,13 +29860,14 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes) {
+ function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
return {
signature: signature,
inferUnionTypes: inferUnionTypes,
inferences: inferences,
inferredTypes: new Array(signature.typeParameters.length),
+ useAnyForNoInferences: useAnyForNoInferences
};
}
function createTypeInferencesObject() {
@@ -27798,25 +29878,69 @@ var ts;
isFixed: false,
};
}
- function couldContainTypeParameters(type) {
+ function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
- return !!(type.flags & 16384 ||
- objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
+ return !!(type.flags & 540672 ||
+ objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
objectFlags & 32 ||
- type.flags & 196608 && couldUnionOrIntersectionContainTypeParameters(type));
+ type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
- function couldUnionOrIntersectionContainTypeParameters(type) {
- if (type.couldContainTypeParameters === undefined) {
- type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters);
+ function couldUnionOrIntersectionContainTypeVariables(type) {
+ if (type.couldContainTypeVariables === undefined) {
+ type.couldContainTypeVariables = ts.forEach(type.types, couldContainTypeVariables);
}
- return type.couldContainTypeParameters;
+ return type.couldContainTypeVariables;
}
function isTypeParameterAtTopLevel(type, typeParameter) {
return type === typeParameter || type.flags & 196608 && ts.forEach(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); });
}
- function inferTypes(context, originalSource, originalTarget) {
- var typeParameters = context.signature.typeParameters;
+ function inferTypeForHomomorphicMappedType(source, target) {
+ var properties = getPropertiesOfType(source);
+ var indexInfo = getIndexInfoOfType(source, 0);
+ if (properties.length === 0 && !indexInfo) {
+ return undefined;
+ }
+ var typeVariable = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var typeVariableArray = [typeVariable];
+ var typeInferences = createTypeInferencesObject();
+ var typeInferencesArray = [typeInferences];
+ var templateType = getTemplateTypeFromMappedType(target);
+ var readonlyMask = target.declaration.readonlyToken ? false : true;
+ var optionalMask = target.declaration.questionToken ? 0 : 67108864;
+ var members = createSymbolTable(properties);
+ for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
+ var prop = properties_5[_i];
+ var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
+ if (!inferredPropType) {
+ return undefined;
+ }
+ var inferredProp = createSymbol(4 | prop.flags & optionalMask, prop.name);
+ inferredProp.checkFlags = readonlyMask && isReadonlySymbol(prop) ? 8 : 0;
+ inferredProp.declarations = prop.declarations;
+ inferredProp.type = inferredPropType;
+ members.set(prop.name, inferredProp);
+ }
+ if (indexInfo) {
+ var inferredIndexType = inferTargetType(indexInfo.type);
+ if (!inferredIndexType) {
+ return undefined;
+ }
+ indexInfo = createIndexInfo(inferredIndexType, readonlyMask && indexInfo.isReadonly);
+ }
+ return createAnonymousType(undefined, members, emptyArray, emptyArray, indexInfo, undefined);
+ function inferTargetType(sourceType) {
+ typeInferences.primary = undefined;
+ typeInferences.secondary = undefined;
+ inferTypes(typeVariableArray, typeInferencesArray, sourceType, templateType);
+ var inferences = typeInferences.primary || typeInferences.secondary;
+ return inferences && getUnionType(inferences, true);
+ }
+ }
+ function inferTypesWithContext(context, originalSource, originalTarget) {
+ inferTypes(context.signature.typeParameters, context.inferences, originalSource, originalTarget);
+ }
+ function inferTypes(typeVariables, typeInferences, originalSource, originalTarget) {
var sourceStack;
var targetStack;
var depth = 0;
@@ -27832,7 +29956,7 @@ var ts;
return false;
}
function inferFromTypes(source, target) {
- if (!couldContainTypeParameters(target)) {
+ if (!couldContainTypeVariables(target)) {
return;
}
if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
@@ -27871,13 +29995,13 @@ var ts;
target = removeTypesFromUnionOrIntersection(target, matchingTypes);
}
}
- if (target.flags & 16384) {
+ if (target.flags & 540672) {
if (source.flags & 8388608) {
return;
}
- for (var i = 0; i < typeParameters.length; i++) {
- if (target === typeParameters[i]) {
- var inferences = context.inferences[i];
+ for (var i = 0; i < typeVariables.length; i++) {
+ if (target === typeVariables[i]) {
+ var inferences = typeInferences[i];
if (!inferences.isFixed) {
var candidates = inferiority ?
inferences.secondary || (inferences.secondary = []) :
@@ -27885,7 +30009,7 @@ var ts;
if (!ts.contains(candidates, source)) {
candidates.push(source);
}
- if (!isTypeParameterAtTopLevel(originalTarget, target)) {
+ if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
inferences.topLevel = false;
}
}
@@ -27903,21 +30027,21 @@ var ts;
}
else if (target.flags & 196608) {
var targetTypes = target.types;
- var typeParameterCount = 0;
- var typeParameter = void 0;
- for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) {
- var t = targetTypes_2[_d];
- if (t.flags & 16384 && ts.contains(typeParameters, t)) {
- typeParameter = t;
- typeParameterCount++;
+ var typeVariableCount = 0;
+ var typeVariable = void 0;
+ for (var _d = 0, targetTypes_3 = targetTypes; _d < targetTypes_3.length; _d++) {
+ var t = targetTypes_3[_d];
+ if (t.flags & 540672 && ts.contains(typeVariables, t)) {
+ typeVariable = t;
+ typeVariableCount++;
}
else {
inferFromTypes(source, t);
}
}
- if (typeParameterCount === 1) {
+ if (typeVariableCount === 1) {
inferiority++;
- inferFromTypes(source, typeParameter);
+ inferFromTypes(source, typeVariable);
inferiority--;
}
}
@@ -27934,14 +30058,14 @@ var ts;
if (isInProcess(source, target)) {
return;
}
- if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) {
+ if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
return;
}
var key = source.id + "," + target.id;
- if (visited[key]) {
+ if (visited.get(key)) {
return;
}
- visited[key] = true;
+ visited.set(key, true);
if (depth === 0) {
sourceStack = [];
targetStack = [];
@@ -27957,9 +30081,16 @@ var ts;
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
- if (getObjectFlags(source) & 32) {
- inferFromTypes(getConstraintTypeFromMappedType(source), constraintType);
- inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));
+ if (constraintType.flags & 262144) {
+ var index = ts.indexOf(typeVariables, constraintType.type);
+ if (index >= 0 && !typeInferences[index].isFixed) {
+ var inferredType = inferTypeForHomomorphicMappedType(source, target);
+ if (inferredType) {
+ inferiority++;
+ inferFromTypes(inferredType, typeVariables[index]);
+ inferiority--;
+ }
+ }
return;
}
if (constraintType.flags & 16384) {
@@ -27975,8 +30106,8 @@ var ts;
}
function inferFromProperties(source, target) {
var properties = getPropertiesOfObjectType(target);
- for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
- var targetProp = properties_4[_i];
+ for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) {
+ var targetProp = properties_6[_i];
var sourceProp = getPropertyOfObjectType(source, targetProp.name);
if (sourceProp) {
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
@@ -28026,8 +30157,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
- var t = types_10[_i];
+ for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+ var t = types_13[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -28068,7 +30199,13 @@ var ts;
inferenceSucceeded = !!unionOrSuperType;
}
else {
- inferredType = emptyObjectType;
+ var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ if (defaultType) {
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ }
+ else {
+ inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ }
inferenceSucceeded = true;
}
context.inferredTypes[index] = inferredType;
@@ -28101,19 +30238,7 @@ var ts;
return links.resolvedSymbol;
}
function isInTypeQuery(node) {
- while (node) {
- switch (node.kind) {
- case 160:
- return true;
- case 70:
- case 141:
- node = node.parent;
- continue;
- default:
- return false;
- }
- }
- ts.Debug.fail("should not get here");
+ return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; });
}
function getFlowCacheKey(node) {
if (node.kind === 70) {
@@ -28123,7 +30248,7 @@ var ts;
if (node.kind === 98) {
return "0";
}
- if (node.kind === 177) {
+ if (node.kind === 178) {
var key = getFlowCacheKey(node.expression);
return key && key + "." + node.name.text;
}
@@ -28134,7 +30259,7 @@ var ts;
case 70:
case 98:
return node;
- case 177:
+ case 178:
return getLeftmostIdentifierOrThis(node.expression);
}
return undefined;
@@ -28143,19 +30268,21 @@ var ts;
switch (source.kind) {
case 70:
return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) ||
- (target.kind === 223 || target.kind === 174) &&
+ (target.kind === 225 || target.kind === 175) &&
getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
case 98:
return target.kind === 98;
- case 177:
- return target.kind === 177 &&
+ case 96:
+ return target.kind === 96;
+ case 178:
+ return target.kind === 178 &&
source.name.text === target.name.text &&
isMatchingReference(source.expression, target.expression);
}
return false;
}
function containsMatchingReference(source, target) {
- while (source.kind === 177) {
+ while (source.kind === 178) {
source = source.expression;
if (isMatchingReference(source, target)) {
return true;
@@ -28164,7 +30291,7 @@ var ts;
return false;
}
function containsMatchingReferenceDiscriminant(source, target) {
- return target.kind === 177 &&
+ return target.kind === 178 &&
containsMatchingReference(source, target.expression) &&
isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
}
@@ -28172,7 +30299,7 @@ var ts;
if (expr.kind === 70) {
return getTypeOfSymbol(getResolvedSymbol(expr));
}
- if (expr.kind === 177) {
+ if (expr.kind === 178) {
var type = getDeclaredTypeOfReference(expr.expression);
return type && getTypeOfPropertyOfType(type, expr.name.text);
}
@@ -28181,9 +30308,9 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && prop.flags & 268435456) {
+ if (prop && getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
- prop.isDiscriminantProperty = prop.hasNonUniformType && isLiteralType(getTypeOfSymbol(prop));
+ prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
return prop.isDiscriminantProperty;
}
@@ -28202,7 +30329,7 @@ var ts;
}
}
}
- if (callExpression.expression.kind === 177 &&
+ if (callExpression.expression.kind === 178 &&
isOrContainsMatchingReference(reference, callExpression.expression.expression)) {
return true;
}
@@ -28241,8 +30368,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
result |= getTypeFacts(t);
}
return result;
@@ -28250,7 +30377,7 @@ var ts;
function isFunctionObjectType(type) {
var resolved = resolveStructuredTypeMembers(type);
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
- resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType));
+ resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
}
function getTypeFacts(type) {
var flags = type.flags;
@@ -28293,9 +30420,11 @@ var ts;
if (flags & 512) {
return strictNullChecks ? 1981320 : 4193160;
}
- if (flags & 16384) {
- var constraint = getConstraintOfTypeParameter(type);
- return getTypeFacts(constraint || emptyObjectType);
+ if (flags & 16777216) {
+ return strictNullChecks ? 6166480 : 8378320;
+ }
+ if (flags & 540672) {
+ return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
}
if (flags & 196608) {
return getTypeFactsOfTypes(type.types);
@@ -28321,17 +30450,23 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, undefined, false) ||
+ checkIteratedTypeOrElementType(type, undefined, false, false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, undefined, false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
- return node.parent.kind === 175 || node.parent.kind === 257 ?
+ var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) ||
+ node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent);
+ return isDestructuringDefaultAssignment ?
getTypeWithDefault(getAssignedType(node), node.right) :
getTypeOfExpression(node.right);
}
+ function isDestructuringAssignmentTarget(parent) {
+ return parent.parent.kind === 193 && parent.parent.left === parent ||
+ parent.parent.kind === 215 && parent.parent.initializer === parent;
+ }
function getAssignedTypeOfArrayLiteralElement(node, element) {
return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element));
}
@@ -28347,21 +30482,21 @@ var ts;
function getAssignedType(node) {
var parent = node.parent;
switch (parent.kind) {
- case 212:
+ case 214:
return stringType;
- case 213:
- return checkRightHandSideOfForOf(parent.expression) || unknownType;
- case 192:
+ case 215:
+ return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType;
+ case 193:
return getAssignedTypeOfBinaryExpression(parent);
- case 186:
+ case 187:
return undefinedType;
- case 175:
+ case 176:
return getAssignedTypeOfArrayLiteralElement(parent, node);
- case 196:
+ case 197:
return getAssignedTypeOfSpreadExpression(parent);
- case 257:
+ case 260:
return getAssignedTypeOfPropertyAssignment(parent);
- case 258:
+ case 261:
return getAssignedTypeOfShorthandPropertyAssignment(parent);
}
return unknownType;
@@ -28369,7 +30504,7 @@ var ts;
function getInitialTypeOfBindingElement(node) {
var pattern = node.parent;
var parentType = getInitialType(pattern.parent);
- var type = pattern.kind === 172 ?
+ var type = pattern.kind === 173 ?
getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
!node.dotDotDotToken ?
getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) :
@@ -28384,35 +30519,35 @@ var ts;
if (node.initializer) {
return getTypeOfInitializer(node.initializer);
}
- if (node.parent.parent.kind === 212) {
+ if (node.parent.parent.kind === 214) {
return stringType;
}
- if (node.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType;
+ if (node.parent.parent.kind === 215) {
+ return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType;
}
return unknownType;
}
function getInitialType(node) {
- return node.kind === 223 ?
+ return node.kind === 225 ?
getInitialTypeOfVariableDeclaration(node) :
getInitialTypeOfBindingElement(node);
}
function getInitialOrAssignedType(node) {
- return node.kind === 223 || node.kind === 174 ?
+ return node.kind === 225 || node.kind === 175 ?
getInitialType(node) :
getAssignedType(node);
}
function isEmptyArrayAssignment(node) {
- return node.kind === 223 && node.initializer &&
+ return node.kind === 225 && node.initializer &&
isEmptyArrayLiteral(node.initializer) ||
- node.kind !== 174 && node.parent.kind === 192 &&
+ node.kind !== 175 && node.parent.kind === 193 &&
isEmptyArrayLiteral(node.parent.right);
}
function getReferenceCandidate(node) {
switch (node.kind) {
- case 183:
+ case 184:
return getReferenceCandidate(node.expression);
- case 192:
+ case 193:
switch (node.operatorToken.kind) {
case 57:
return getReferenceCandidate(node.left);
@@ -28424,13 +30559,13 @@ var ts;
}
function getReferenceRoot(node) {
var parent = node.parent;
- return parent.kind === 183 ||
- parent.kind === 192 && parent.operatorToken.kind === 57 && parent.left === node ||
- parent.kind === 192 && parent.operatorToken.kind === 25 && parent.right === node ?
+ return parent.kind === 184 ||
+ parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node ||
+ parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ?
getReferenceRoot(parent) : node;
}
function getTypeOfSwitchClause(clause) {
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
return isUnitType(caseType) ? caseType : undefined;
}
@@ -28476,8 +30611,29 @@ var ts;
}
return f(type) ? type : neverType;
}
- function mapType(type, f) {
- return type.flags & 65536 ? getUnionType(ts.map(type.types, f)) : f(type);
+ function mapType(type, mapper) {
+ if (!(type.flags & 65536)) {
+ return mapper(type);
+ }
+ var types = type.types;
+ var mappedType;
+ var mappedTypes;
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var t = mapper(current);
+ if (t) {
+ if (!mappedType) {
+ mappedType = t;
+ }
+ else if (!mappedTypes) {
+ mappedTypes = [mappedType, t];
+ }
+ else {
+ mappedTypes.push(t);
+ }
+ }
+ }
+ return mappedTypes ? getUnionType(mappedTypes) : mappedType;
}
function extractTypesOfKind(type, kind) {
return filterType(type, function (t) { return (t.flags & kind) !== 0; });
@@ -28511,7 +30667,7 @@ var ts;
return evolvingArrayTypes[elementType.id] || (evolvingArrayTypes[elementType.id] = createEvolvingArrayType(elementType));
}
function addEvolvingArrayElementType(evolvingArrayType, node) {
- var elementType = getBaseTypeOfLiteralType(getTypeOfExpression(node));
+ var elementType = getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node));
return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));
}
function createFinalArrayType(elementType) {
@@ -28532,8 +30688,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var t = types_16[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -28551,11 +30707,11 @@ var ts;
function isEvolvingArrayOperationTarget(node) {
var root = getReferenceRoot(node);
var parent = root.parent;
- var isLengthPushOrUnshift = parent.kind === 177 && (parent.name.text === "length" ||
- parent.parent.kind === 179 && ts.isPushOrUnshiftIdentifier(parent.name));
- var isElementAssignment = parent.kind === 178 &&
+ var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" ||
+ parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name));
+ var isElementAssignment = parent.kind === 179 &&
parent.expression === root &&
- parent.parent.kind === 192 &&
+ parent.parent.kind === 193 &&
parent.parent.operatorToken.kind === 57 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
@@ -28582,19 +30738,17 @@ var ts;
}
return false;
}
- function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) {
+ function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+ if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 1033215)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
return declaredType;
}
- var initialType = assumeInitialized ? declaredType :
- declaredType === autoType || declaredType === autoArrayType ? undefinedType :
- includeFalsyTypes(declaredType, 2048);
var visitedFlowStart = visitedFlowCount;
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
visitedFlowCount = visitedFlowStart;
var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType);
- if (reference.parent.kind === 201 && getTypeWithFacts(resultType, 524288).flags & 8192) {
+ if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) {
return declaredType;
}
return resultType;
@@ -28608,7 +30762,16 @@ var ts;
}
}
var type = void 0;
- if (flow.flags & 16) {
+ if (flow.flags & 4096) {
+ flow.locked = true;
+ type = getTypeAtFlowNode(flow.antecedent);
+ flow.locked = false;
+ }
+ else if (flow.flags & 2048) {
+ flow = flow.antecedent;
+ continue;
+ }
+ else if (flow.flags & 16) {
type = getTypeAtFlowAssignment(flow);
if (!type) {
flow = flow.antecedent;
@@ -28639,7 +30802,7 @@ var ts;
}
else if (flow.flags & 2) {
var container = flow.container;
- if (container && container !== flowContainer && reference.kind !== 177) {
+ if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) {
flow = container.flowNode;
continue;
}
@@ -28682,7 +30845,7 @@ var ts;
}
function getTypeAtFlowArrayMutation(flow) {
var node = flow.node;
- var expr = node.kind === 179 ?
+ var expr = node.kind === 180 ?
node.expression.expression :
node.left.expression;
if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -28690,7 +30853,7 @@ var ts;
var type = getTypeFromFlowType(flowType);
if (getObjectFlags(type) & 256) {
var evolvedType_1 = type;
- if (node.kind === 179) {
+ if (node.kind === 180) {
for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
var arg = _a[_i];
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -28742,6 +30905,9 @@ var ts;
var seenIncomplete = false;
for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) {
var antecedent = _a[_i];
+ if (antecedent.flags & 2048 && antecedent.lock.locked) {
+ continue;
+ }
var flowType = getTypeAtFlowNode(antecedent);
var type = getTypeFromFlowType(flowType);
if (type === declaredType && declaredType === initialType) {
@@ -28765,8 +30931,9 @@ var ts;
if (!key) {
key = getFlowCacheKey(reference);
}
- if (cache[key]) {
- return cache[key];
+ var cached = cache.get(key);
+ if (cached) {
+ return cached;
}
for (var i = flowLoopStart; i < flowLoopCount; i++) {
if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key && flowLoopTypes[i].length) {
@@ -28788,8 +30955,9 @@ var ts;
firstAntecedentType = flowType;
}
var type = getTypeFromFlowType(flowType);
- if (cache[key]) {
- return cache[key];
+ var cached_1 = cache.get(key);
+ if (cached_1) {
+ return cached_1;
}
if (!ts.contains(antecedentTypes, type)) {
antecedentTypes.push(type);
@@ -28805,10 +30973,11 @@ var ts;
if (isIncomplete(firstAntecedentType)) {
return createFlowType(result, true);
}
- return cache[key] = result;
+ cache.set(key, result);
+ return result;
}
function isMatchingReferenceDiscriminant(expr) {
- return expr.kind === 177 &&
+ return expr.kind === 178 &&
declaredType.flags & 65536 &&
isMatchingReference(reference, expr.expression) &&
isDiscriminantProperty(declaredType, expr.name.text);
@@ -28842,10 +31011,10 @@ var ts;
var operator_1 = expr.operatorToken.kind;
var left_1 = getReferenceCandidate(expr.left);
var right_1 = getReferenceCandidate(expr.right);
- if (left_1.kind === 187 && right_1.kind === 9) {
+ if (left_1.kind === 188 && right_1.kind === 9) {
return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
}
- if (right_1.kind === 187 && left_1.kind === 9) {
+ if (right_1.kind === 188 && left_1.kind === 9) {
return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
}
if (isMatchingReference(reference, left_1)) {
@@ -28891,7 +31060,7 @@ var ts;
assumeTrue ? 16384 : 131072;
return getTypeWithFacts(type, facts);
}
- if (type.flags & 33281) {
+ if (type.flags & 16810497) {
return type;
}
if (assumeTrue) {
@@ -28916,14 +31085,22 @@ var ts;
assumeTrue = !assumeTrue;
}
if (assumeTrue && !(type.flags & 65536)) {
- var targetType = typeofTypesByName[literal.text];
- if (targetType && isTypeSubtypeOf(targetType, type)) {
- return targetType;
+ var targetType = typeofTypesByName.get(literal.text);
+ if (targetType) {
+ if (isTypeSubtypeOf(targetType, type)) {
+ return targetType;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type) || anyType;
+ if (isTypeSubtypeOf(targetType, constraint)) {
+ return getIntersectionType([type, targetType]);
+ }
+ }
}
}
var facts = assumeTrue ?
- typeofEQFacts[literal.text] || 64 :
- typeofNEFacts[literal.text] || 8192;
+ typeofEQFacts.get(literal.text) || 64 :
+ typeofNEFacts.get(literal.text) || 8192;
return getTypeWithFacts(type, facts);
}
function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) {
@@ -28992,10 +31169,9 @@ var ts;
return assignableType;
}
}
- var targetType = type.flags & 16384 ? getApparentType(type) : type;
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
- isTypeAssignableTo(candidate, targetType) ? candidate :
+ isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
}
function narrowTypeByTypePredicate(type, callExpression, assumeTrue) {
@@ -29023,7 +31199,7 @@ var ts;
}
else {
var invokedExpression = ts.skipParentheses(callExpression.expression);
- if (invokedExpression.kind === 178 || invokedExpression.kind === 177) {
+ if (invokedExpression.kind === 179 || invokedExpression.kind === 178) {
var accessExpression = invokedExpression;
var possibleReference = ts.skipParentheses(accessExpression.expression);
if (isMatchingReference(reference, possibleReference)) {
@@ -29040,15 +31216,16 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 96:
+ case 178:
return narrowTypeByTruthiness(type, expr, assumeTrue);
- case 179:
+ case 180:
return narrowTypeByTypePredicate(type, expr, assumeTrue);
- case 183:
+ case 184:
return narrowType(type, expr.expression, assumeTrue);
- case 192:
+ case 193:
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
- case 190:
+ case 191:
if (expr.operator === 50) {
return narrowType(type, expr.operand, !assumeTrue);
}
@@ -29072,15 +31249,12 @@ var ts;
return getTypeOfSymbol(symbol);
}
function getControlFlowContainer(node) {
- while (true) {
- node = node.parent;
- if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
- node.kind === 231 ||
- node.kind === 261 ||
- node.kind === 147) {
- return node;
- }
- }
+ return ts.findAncestor(node.parent, function (node) {
+ return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
+ node.kind === 233 ||
+ node.kind === 264 ||
+ node.kind === 148;
+ });
}
function isParameterAssigned(symbol) {
var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
@@ -29094,21 +31268,13 @@ var ts;
return symbol.isAssigned || false;
}
function hasParentWithAssignmentsMarked(node) {
- while (true) {
- node = node.parent;
- if (!node) {
- return false;
- }
- if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304) {
- return true;
- }
- }
+ return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); });
}
function markParameterAssignments(node) {
if (node.kind === 70) {
if (ts.isAssignmentTarget(node)) {
var symbol = getResolvedSymbol(node);
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 144) {
+ if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) {
symbol.isAssigned = true;
}
}
@@ -29120,6 +31286,14 @@ var ts;
function isConstVariable(symbol) {
return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
}
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
+ var annotationIncludesUndefined = strictNullChecks &&
+ declaration.kind === 145 &&
+ declaration.initializer &&
+ getFalsyFlags(declaredType) & 2048 &&
+ !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
+ return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -29128,16 +31302,14 @@ var ts;
if (symbol === argumentsSymbol) {
var container = ts.getContainingFunction(node);
if (languageVersion < 2) {
- if (container.kind === 185) {
+ if (container.kind === 186) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
}
else if (ts.hasModifier(container, 256)) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
}
}
- if (node.flags & 524288) {
- getNodeLinks(container).flags |= 8192;
- }
+ getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
@@ -29146,7 +31318,7 @@ var ts;
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
if (localOrExportSymbol.flags & 32) {
var declaration_1 = localOrExportSymbol.valueDeclaration;
- if (declaration_1.kind === 226
+ if (declaration_1.kind === 228
&& ts.nodeIsDecorated(declaration_1)) {
var container = ts.getContainingClass(node);
while (container !== undefined) {
@@ -29158,11 +31330,11 @@ var ts;
container = ts.getContainingClass(container);
}
}
- else if (declaration_1.kind === 197) {
+ else if (declaration_1.kind === 198) {
var container = ts.getThisContainer(node, false);
while (container !== undefined) {
if (container.parent === declaration_1) {
- if (container.kind === 147 && ts.hasModifier(container, 32)) {
+ if (container.kind === 148 && ts.hasModifier(container, 32)) {
getNodeLinks(declaration_1).flags |= 8388608;
getNodeLinks(node).flags |= 16777216;
}
@@ -29174,6 +31346,7 @@ var ts;
}
checkCollisionWithCapturedSuperVariable(node, node);
checkCollisionWithCapturedThisVariable(node, node);
+ checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
var type = getTypeOfSymbol(localOrExportSymbol);
var declaration = localOrExportSymbol.valueDeclaration;
@@ -29191,22 +31364,25 @@ var ts;
if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) {
return type;
}
- var isParameter = ts.getRootDeclaration(declaration).kind === 144;
+ var isParameter = ts.getRootDeclaration(declaration).kind === 145;
var declarationContainer = getControlFlowContainer(declaration);
var flowContainer = getControlFlowContainer(node);
var isOuterVariable = flowContainer !== declarationContainer;
- while (flowContainer !== declarationContainer && (flowContainer.kind === 184 ||
- flowContainer.kind === 185 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
+ while (flowContainer !== declarationContainer && (flowContainer.kind === 185 ||
+ flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
(isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
flowContainer = getControlFlowContainer(flowContainer);
}
var assumeInitialized = isParameter || isOuterVariable ||
- type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0) ||
+ type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) ||
ts.isInAmbientContext(declaration);
- var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
+ var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
+ type === autoType || type === autoArrayType ? undefinedType :
+ includeFalsyTypes(type, 2048);
+ var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(declaration.name, ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));
error(node, ts.Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
}
@@ -29220,19 +31396,12 @@ var ts;
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isInsideFunction(node, threshold) {
- var current = node;
- while (current && current !== threshold) {
- if (ts.isFunctionLike(current)) {
- return true;
- }
- current = current.parent;
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
}
function checkNestedBlockScopedBinding(node, symbol) {
if (languageVersion >= 2 ||
(symbol.flags & (2 | 32)) === 0 ||
- symbol.valueDeclaration.parent.kind === 256) {
+ symbol.valueDeclaration.parent.kind === 259) {
return;
}
var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
@@ -29250,8 +31419,8 @@ var ts;
if (usedInFunction) {
getNodeLinks(current).flags |= 65536;
}
- if (container.kind === 211 &&
- ts.getAncestor(symbol.valueDeclaration, 224).parent === container &&
+ if (container.kind === 213 &&
+ ts.getAncestor(symbol.valueDeclaration, 226).parent === container &&
isAssignedInBodyOfForStatement(node, container)) {
getNodeLinks(symbol.valueDeclaration).flags |= 2097152;
}
@@ -29263,33 +31432,25 @@ var ts;
}
function isAssignedInBodyOfForStatement(node, container) {
var current = node;
- while (current.parent.kind === 183) {
+ while (current.parent.kind === 184) {
current = current.parent;
}
var isAssigned = false;
if (ts.isAssignmentTarget(current)) {
isAssigned = true;
}
- else if ((current.parent.kind === 190 || current.parent.kind === 191)) {
+ else if ((current.parent.kind === 191 || current.parent.kind === 192)) {
var expr = current.parent;
isAssigned = expr.operator === 42 || expr.operator === 43;
}
if (!isAssigned) {
return false;
}
- while (current !== container) {
- if (current === container.statement) {
- return true;
- }
- else {
- current = current.parent;
- }
- }
- return false;
+ return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
}
function captureLexicalThis(node, container) {
getNodeLinks(node).flags |= 2;
- if (container.kind === 147 || container.kind === 150) {
+ if (container.kind === 148 || container.kind === 151) {
var classNode = container.parent;
getNodeLinks(classNode).flags |= 4;
}
@@ -29320,42 +31481,45 @@ var ts;
var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
return baseConstructorType === nullWideningType;
}
+ function checkThisBeforeSuper(node, container, diagnosticMessage) {
+ var containingClassDecl = container.parent;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
+ if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
+ var superCall = getSuperCallInConstructor(container);
+ if (!superCall || superCall.end > node.pos) {
+ error(node, diagnosticMessage);
+ }
+ }
+ }
function checkThisExpression(node) {
var container = ts.getThisContainer(node, true);
var needToCaptureLexicalThis = false;
- if (container.kind === 150) {
- var containingClassDecl = container.parent;
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
- if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
- var superCall = getSuperCallInConstructor(container);
- if (!superCall || superCall.end > node.pos) {
- error(node, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
- }
- }
+ if (container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
}
- if (container.kind === 185) {
+ if (container.kind === 186) {
container = ts.getThisContainer(container, false);
needToCaptureLexicalThis = (languageVersion < 2);
}
switch (container.kind) {
- case 230:
+ case 232:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
break;
- case 229:
+ case 231:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
break;
- case 150:
+ case 151:
if (isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
}
break;
+ case 148:
case 147:
- case 146:
if (ts.getModifierFlags(container) & 32) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
}
break;
- case 142:
+ case 143:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
break;
}
@@ -29364,8 +31528,8 @@ var ts;
}
if (ts.isFunctionLike(container) &&
(!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) {
- if (container.kind === 184 &&
- ts.isInJavaScriptFile(container.parent) &&
+ if (container.kind === 185 &&
+ container.parent.kind === 193 &&
ts.getSpecialPropertyAssignmentKind(container.parent) === 3) {
var className = container.parent
.left
@@ -29384,7 +31548,7 @@ var ts;
if (ts.isClassLike(container.parent)) {
var symbol = getSymbolOfNode(container.parent);
var type = ts.hasModifier(container, 32) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
- return getFlowTypeOfReference(node, type, true, undefined);
+ return getFlowTypeOfReference(node, type);
}
if (ts.isInJavaScriptFile(node)) {
var type = getTypeForThisExpressionFromJSDoc(container);
@@ -29392,34 +31556,29 @@ var ts;
return type;
}
}
- if (compilerOptions.noImplicitThis) {
+ if (noImplicitThis) {
error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
}
return anyType;
}
function getTypeForThisExpressionFromJSDoc(node) {
var jsdocType = ts.getJSDocType(node);
- if (jsdocType && jsdocType.kind === 274) {
+ if (jsdocType && jsdocType.kind === 278) {
var jsDocFunctionType = jsdocType;
- if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 277) {
+ if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) {
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
}
}
}
function isInConstructorArgumentInitializer(node, constructorDecl) {
- for (var n = node; n && n !== constructorDecl; n = n.parent) {
- if (n.kind === 144) {
- return true;
- }
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; });
}
function checkSuperExpression(node) {
- var isCallExpression = node.parent.kind === 179 && node.parent.expression === node;
+ var isCallExpression = node.parent.kind === 180 && node.parent.expression === node;
var container = ts.getSuperContainer(node, true);
var needToCaptureLexicalThis = false;
if (!isCallExpression) {
- while (container && container.kind === 185) {
+ while (container && container.kind === 186) {
container = ts.getSuperContainer(container, true);
needToCaptureLexicalThis = languageVersion < 2;
}
@@ -29427,17 +31586,14 @@ var ts;
var canUseSuperExpression = isLegalUsageOfSuperExpression(container);
var nodeCheckFlag = 0;
if (!canUseSuperExpression) {
- var current = node;
- while (current && current !== container && current.kind !== 142) {
- current = current.parent;
- }
- if (current && current.kind === 142) {
+ var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; });
+ if (current && current.kind === 143) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
}
else if (isCallExpression) {
error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
}
- else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 176)) {
+ else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) {
error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
}
else {
@@ -29445,6 +31601,9 @@ var ts;
}
return unknownType;
}
+ if (!isCallExpression && container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
+ }
if ((ts.getModifierFlags(container) & 32) || isCallExpression) {
nodeCheckFlag = 512;
}
@@ -29452,7 +31611,7 @@ var ts;
nodeCheckFlag = 256;
}
getNodeLinks(node).flags |= nodeCheckFlag;
- if (container.kind === 149 && ts.getModifierFlags(container) & 256) {
+ if (container.kind === 150 && ts.getModifierFlags(container) & 256) {
if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
getNodeLinks(container).flags |= 4096;
}
@@ -29463,7 +31622,7 @@ var ts;
if (needToCaptureLexicalThis) {
captureLexicalThis(node.parent, container);
}
- if (container.parent.kind === 176) {
+ if (container.parent.kind === 177) {
if (languageVersion < 2) {
error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
return unknownType;
@@ -29481,7 +31640,7 @@ var ts;
}
return unknownType;
}
- if (container.kind === 150 && isInConstructorArgumentInitializer(node, container)) {
+ if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
return unknownType;
}
@@ -29493,32 +31652,50 @@ var ts;
return false;
}
if (isCallExpression) {
- return container.kind === 150;
+ return container.kind === 151;
}
else {
- if (ts.isClassLike(container.parent) || container.parent.kind === 176) {
+ if (ts.isClassLike(container.parent) || container.parent.kind === 177) {
if (ts.getModifierFlags(container) & 32) {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
- container.kind === 152;
+ return container.kind === 150 ||
+ container.kind === 149 ||
+ container.kind === 152 ||
+ container.kind === 153;
}
else {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
+ return container.kind === 150 ||
+ container.kind === 149 ||
container.kind === 152 ||
+ container.kind === 153 ||
+ container.kind === 148 ||
container.kind === 147 ||
- container.kind === 146 ||
- container.kind === 150;
+ container.kind === 151;
}
}
}
return false;
}
}
+ function getContainingObjectLiteral(func) {
+ return (func.kind === 150 ||
+ func.kind === 152 ||
+ func.kind === 153) && func.parent.kind === 177 ? func.parent :
+ func.kind === 185 && func.parent.kind === 260 ? func.parent.parent :
+ undefined;
+ }
+ function getThisTypeArgument(type) {
+ return getObjectFlags(type) & 4 && type.target === globalThisType ? type.typeArguments[0] : undefined;
+ }
+ function getThisTypeFromContextualType(type) {
+ return mapType(type, function (t) {
+ return t.flags & 131072 ? ts.forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);
+ });
+ }
function getContextualThisParameterType(func) {
- if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 185) {
+ if (func.kind === 186) {
+ return undefined;
+ }
+ if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
var thisParameter = contextualSignature.thisParameter;
@@ -29527,29 +31704,55 @@ var ts;
}
}
}
+ if (noImplicitThis) {
+ var containingLiteral = getContainingObjectLiteral(func);
+ if (containingLiteral) {
+ var contextualType = getApparentTypeOfContextualType(containingLiteral);
+ var literal = containingLiteral;
+ var type = contextualType;
+ while (type) {
+ var thisType = getThisTypeFromContextualType(type);
+ if (thisType) {
+ return instantiateType(thisType, getContextualMapper(containingLiteral));
+ }
+ if (literal.parent.kind !== 260) {
+ break;
+ }
+ literal = literal.parent.parent;
+ type = getApparentTypeOfContextualType(literal);
+ }
+ return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral);
+ }
+ if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) {
+ var target = func.parent.left;
+ if (target.kind === 178 || target.kind === 179) {
+ return checkExpressionCached(target.expression);
+ }
+ }
+ }
return undefined;
}
function getContextuallyTypedParameterType(parameter) {
var func = parameter.parent;
if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var iife = ts.getImmediatelyInvokedFunctionExpression(func);
- if (iife) {
+ if (iife && iife.arguments) {
var indexOfParameter = ts.indexOf(func.parameters, parameter);
- if (iife.arguments && indexOfParameter < iife.arguments.length) {
- if (parameter.dotDotDotToken) {
- var restTypes = [];
- for (var i = indexOfParameter; i < iife.arguments.length; i++) {
- restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
- }
- return createArrayType(getUnionType(restTypes));
- }
- var links = getNodeLinks(iife);
- var cached = links.resolvedSignature;
- links.resolvedSignature = anySignature;
- var type = getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter]));
- links.resolvedSignature = cached;
- return type;
- }
+ if (parameter.dotDotDotToken) {
+ var restTypes = [];
+ for (var i = indexOfParameter; i < iife.arguments.length; i++) {
+ restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
+ }
+ return restTypes.length ? createArrayType(getUnionType(restTypes)) : undefined;
+ }
+ var links = getNodeLinks(iife);
+ var cached = links.resolvedSignature;
+ links.resolvedSignature = anySignature;
+ var type = indexOfParameter < iife.arguments.length ?
+ getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter])) :
+ parameter.initializer ? undefined : undefinedWideningType;
+ links.resolvedSignature = cached;
+ return type;
}
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -29574,7 +31777,7 @@ var ts;
if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var type = getContextuallyTypedParameterType(declaration);
if (type) {
return type;
@@ -29585,11 +31788,11 @@ var ts;
}
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
- var name_21 = declaration.propertyName || declaration.name;
- if (ts.isVariableLike(parentDeclaration) &&
+ var name = declaration.propertyName || declaration.name;
+ if (parentDeclaration.kind !== 175 &&
parentDeclaration.type &&
- !ts.isBindingPattern(name_21)) {
- var text = ts.getTextOfPropertyName(name_21);
+ !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
if (text) {
return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
}
@@ -29600,33 +31803,34 @@ var ts;
}
function getContextualTypeForReturnExpression(node) {
var func = ts.getContainingFunction(node);
- if (ts.isAsyncFunctionLike(func)) {
- var contextualReturnType = getContextualReturnType(func);
- if (contextualReturnType) {
- return getPromisedType(contextualReturnType);
+ if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
+ return undefined;
}
- return undefined;
- }
- if (func && !func.asteriskToken) {
- return getContextualReturnType(func);
+ var contextualReturnType = getContextualReturnType(func);
+ return functionFlags & 2
+ ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType)
+ : contextualReturnType;
}
return undefined;
}
function getContextualTypeForYieldOperand(node) {
var func = ts.getContainingFunction(node);
if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
var contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return node.asteriskToken
? contextualReturnType
- : getElementTypeOfIterableIterator(contextualReturnType);
+ : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2) !== 0);
}
}
return undefined;
}
function isInParameterInitializerBeforeContainingFunction(node) {
while (node.parent && !ts.isFunctionLike(node.parent)) {
- if (node.parent.kind === 144 && node.parent.initializer === node) {
+ if (node.parent.kind === 145 && node.parent.initializer === node) {
return true;
}
node = node.parent;
@@ -29635,8 +31839,8 @@ var ts;
}
function getContextualReturnType(functionDecl) {
if (functionDecl.type ||
- functionDecl.kind === 150 ||
- functionDecl.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 152))) {
+ functionDecl.kind === 151 ||
+ functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -29655,7 +31859,7 @@ var ts;
return undefined;
}
function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
- if (template.parent.kind === 181) {
+ if (template.parent.kind === 182) {
return getContextualTypeForArgument(template.parent, substitutionExpression);
}
return undefined;
@@ -29685,38 +31889,14 @@ var ts;
}
return undefined;
}
- function applyToContextualType(type, mapper) {
- if (!(type.flags & 65536)) {
- return mapper(type);
- }
- var types = type.types;
- var mappedType;
- var mappedTypes;
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var current = types_13[_i];
- var t = mapper(current);
- if (t) {
- if (!mappedType) {
- mappedType = t;
- }
- else if (!mappedTypes) {
- mappedTypes = [mappedType, t];
- }
- else {
- mappedTypes.push(t);
- }
- }
- }
- return mappedTypes ? getUnionType(mappedTypes) : mappedType;
- }
function getTypeOfPropertyOfContextualType(type, name) {
- return applyToContextualType(type, function (t) {
+ return mapType(type, function (t) {
var prop = t.flags & 229376 ? getPropertyOfType(t, name) : undefined;
return prop ? getTypeOfSymbol(prop) : undefined;
});
}
function getIndexTypeOfContextualType(type, kind) {
- return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
+ return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
}
function contextualTypeIsTupleLikeType(type) {
return !!(type.flags & 65536 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type));
@@ -29751,7 +31931,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1)
- || (languageVersion >= 2 ? getElementTypeOfIterable(type, undefined) : undefined);
+ || getIteratedTypeOrElementType(type, undefined, false, false, false);
}
return undefined;
}
@@ -29760,19 +31940,16 @@ var ts;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
}
function getContextualTypeForJsxAttribute(attribute) {
- var kind = attribute.kind;
- var jsxElement = attribute.parent;
- var attrsType = getJsxElementAttributesType(jsxElement);
- if (attribute.kind === 250) {
- if (!attrsType || isTypeAny(attrsType)) {
+ var attributesType = getContextualType(attribute.parent);
+ if (ts.isJsxAttribute(attribute)) {
+ if (!attributesType || isTypeAny(attributesType)) {
return undefined;
}
- return getTypeOfPropertyOfType(attrsType, attribute.name.text);
+ return getTypeOfPropertyOfType(attributesType, attribute.name.text);
}
- else if (attribute.kind === 251) {
- return attrsType;
+ else {
+ return attributesType;
}
- ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]");
}
function getApparentTypeOfContextualType(node) {
var type = getContextualType(node);
@@ -29787,45 +31964,52 @@ var ts;
}
var parent = node.parent;
switch (parent.kind) {
- case 223:
- case 144:
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 174:
+ case 175:
return getContextualTypeForInitializerExpression(node);
- case 185:
- case 216:
+ case 186:
+ case 218:
return getContextualTypeForReturnExpression(node);
- case 195:
+ case 196:
return getContextualTypeForYieldOperand(parent);
- case 179:
case 180:
+ case 181:
return getContextualTypeForArgument(parent, node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return getTypeFromTypeNode(parent.type);
- case 192:
+ case 193:
return getContextualTypeForBinaryOperand(node);
- case 257:
- case 258:
+ case 260:
+ case 261:
return getContextualTypeForObjectLiteralElement(parent);
- case 175:
+ case 176:
return getContextualTypeForElementExpression(node);
- case 193:
+ case 194:
return getContextualTypeForConditionalOperand(node);
- case 202:
- ts.Debug.assert(parent.parent.kind === 194);
+ case 204:
+ ts.Debug.assert(parent.parent.kind === 195);
return getContextualTypeForSubstitutionExpression(parent.parent, node);
- case 183:
+ case 184:
return getContextualType(parent);
- case 252:
+ case 255:
return getContextualType(parent);
- case 250:
- case 251:
+ case 252:
+ case 254:
return getContextualTypeForJsxAttribute(parent);
+ case 250:
+ case 249:
+ return getAttributesTypeFromJsxOpeningLikeElement(parent);
}
return undefined;
}
+ function getContextualMapper(node) {
+ node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
+ return node ? node.contextualMapper : identityMapper;
+ }
function getNonGenericSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
@@ -29850,7 +32034,7 @@ var ts;
return sourceLength < targetParameterCount;
}
function isFunctionExpressionOrArrowFunction(node) {
- return node.kind === 184 || node.kind === 185;
+ return node.kind === 185 || node.kind === 186;
}
function getContextualSignatureForFunctionLikeDeclaration(node) {
return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node)
@@ -29863,7 +32047,7 @@ var ts;
getApparentTypeOfContextualType(node);
}
function getContextualSignature(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var type = getContextualTypeForFunctionLikeDeclaration(node);
if (!type) {
return undefined;
@@ -29873,8 +32057,8 @@ var ts;
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var current = types_14[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var current = types_17[_i];
var signature = getNonGenericSignature(current, node);
if (signature) {
if (!signatureList) {
@@ -29896,37 +32080,37 @@ var ts;
}
return result;
}
- function isInferentialContext(mapper) {
- return mapper && mapper.context;
- }
- function checkSpreadExpression(node, contextualMapper) {
- var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false);
+ function checkSpreadExpression(node, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 1536);
+ }
+ var arrayOrIterableType = checkExpression(node.expression, checkMode);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false);
}
function hasDefaultValue(node) {
- return (node.kind === 174 && !!node.initializer) ||
- (node.kind === 192 && node.operatorToken.kind === 57);
+ return (node.kind === 175 && !!node.initializer) ||
+ (node.kind === 193 && node.operatorToken.kind === 57);
}
- function checkArrayLiteral(node, contextualMapper) {
+ function checkArrayLiteral(node, checkMode) {
var elements = node.elements;
var hasSpreadElement = false;
var elementTypes = [];
var inDestructuringPattern = ts.isAssignmentTarget(node);
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var e = elements_1[_i];
- if (inDestructuringPattern && e.kind === 196) {
- var restArrayType = checkExpression(e.expression, contextualMapper);
+ if (inDestructuringPattern && e.kind === 197) {
+ var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1) ||
- (languageVersion >= 2 ? getElementTypeOfIterable(restArrayType, undefined) : undefined);
+ getIteratedTypeOrElementType(restArrayType, undefined, false, false, false);
if (restElementType) {
elementTypes.push(restElementType);
}
}
else {
- var type = checkExpressionForMutableLocation(e, contextualMapper);
+ var type = checkExpressionForMutableLocation(e, checkMode);
elementTypes.push(type);
}
- hasSpreadElement = hasSpreadElement || e.kind === 196;
+ hasSpreadElement = hasSpreadElement || e.kind === 197;
}
if (!hasSpreadElement) {
if (inDestructuringPattern && elementTypes.length) {
@@ -29937,7 +32121,7 @@ var ts;
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType && contextualTypeIsTupleLikeType(contextualType)) {
var pattern = contextualType.pattern;
- if (pattern && (pattern.kind === 173 || pattern.kind === 175)) {
+ if (pattern && (pattern.kind === 174 || pattern.kind === 176)) {
var patternElements = pattern.elements;
for (var i = elementTypes.length; i < patternElements.length; i++) {
var patternElement = patternElements[i];
@@ -29945,7 +32129,7 @@ var ts;
elementTypes.push(contextualType.typeArguments[i]);
}
else {
- if (patternElement.kind !== 198) {
+ if (patternElement.kind !== 199) {
error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
elementTypes.push(unknownType);
@@ -29962,7 +32146,7 @@ var ts;
strictNullChecks ? neverType : undefinedWideningType);
}
function isNumericName(name) {
- return name.kind === 142 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
+ return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
@@ -29999,7 +32183,7 @@ var ts;
var unionType = propTypes.length ? getUnionType(propTypes, true) : undefinedType;
return createIndexInfo(unionType, false);
}
- function checkObjectLiteral(node, contextualMapper) {
+ function checkObjectLiteral(node, checkMode) {
var inDestructuringPattern = ts.isAssignmentTarget(node);
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
var propertiesTable = ts.createMap();
@@ -30008,7 +32192,8 @@ var ts;
var propagatedFlags = 0;
var contextualType = getApparentTypeOfContextualType(node);
var contextualTypeHasPattern = contextualType && contextualType.pattern &&
- (contextualType.pattern.kind === 172 || contextualType.pattern.kind === 176);
+ (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177);
+ var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node);
var typeFlags = 0;
var patternWithComputedProperties = false;
var hasComputedStringProperty = false;
@@ -30017,27 +32202,27 @@ var ts;
for (var i = 0; i < node.properties.length; i++) {
var memberDecl = node.properties[i];
var member = memberDecl.symbol;
- if (memberDecl.kind === 257 ||
- memberDecl.kind === 258 ||
+ if (memberDecl.kind === 260 ||
+ memberDecl.kind === 261 ||
ts.isObjectLiteralMethod(memberDecl)) {
var type = void 0;
- if (memberDecl.kind === 257) {
- type = checkPropertyAssignment(memberDecl, contextualMapper);
+ if (memberDecl.kind === 260) {
+ type = checkPropertyAssignment(memberDecl, checkMode);
}
- else if (memberDecl.kind === 149) {
- type = checkObjectLiteralMethod(memberDecl, contextualMapper);
+ else if (memberDecl.kind === 150) {
+ type = checkObjectLiteralMethod(memberDecl, checkMode);
}
else {
- ts.Debug.assert(memberDecl.kind === 258);
- type = checkExpressionForMutableLocation(memberDecl.name, contextualMapper);
+ ts.Debug.assert(memberDecl.kind === 261);
+ type = checkExpressionForMutableLocation(memberDecl.name, checkMode);
}
typeFlags |= type.flags;
- var prop = createSymbol(4 | 67108864 | member.flags, member.name);
+ var prop = createSymbol(4 | member.flags, member.name);
if (inDestructuringPattern) {
- var isOptional = (memberDecl.kind === 257 && hasDefaultValue(memberDecl.initializer)) ||
- (memberDecl.kind === 258 && memberDecl.objectAssignmentInitializer);
+ var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) ||
+ (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer);
if (isOptional) {
- prop.flags |= 536870912;
+ prop.flags |= 67108864;
}
if (ts.hasDynamicName(memberDecl)) {
patternWithComputedProperties = true;
@@ -30046,9 +32231,9 @@ var ts;
else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512)) {
var impliedProp = getPropertyOfType(contextualType, member.name);
if (impliedProp) {
- prop.flags |= impliedProp.flags & 536870912;
+ prop.flags |= impliedProp.flags & 67108864;
}
- else if (!compilerOptions.suppressExcessPropertyErrors) {
+ else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0)) {
error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
}
}
@@ -30061,9 +32246,12 @@ var ts;
prop.target = member;
member = prop;
}
- else if (memberDecl.kind === 259) {
+ else if (memberDecl.kind === 262) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(memberDecl, 2);
+ }
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
propertiesArray = [];
propertiesTable = ts.createMap();
hasComputedStringProperty = false;
@@ -30071,17 +32259,17 @@ var ts;
typeFlags = 0;
}
var type = checkExpression(memberDecl.expression);
- if (!(type.flags & (32768 | 1))) {
+ if (!isValidSpreadType(type)) {
error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
return unknownType;
}
- spread = getSpreadType(spread, type, false);
+ spread = getSpreadType(spread, type);
offset = i + 1;
continue;
}
else {
- ts.Debug.assert(memberDecl.kind === 151 || memberDecl.kind === 152);
- checkAccessorDeclaration(memberDecl);
+ ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153);
+ checkNodeDeferred(memberDecl);
}
if (ts.hasDynamicName(memberDecl)) {
if (isNumericName(memberDecl.name)) {
@@ -30092,34 +32280,36 @@ var ts;
}
}
else {
- propertiesTable[member.name] = member;
+ propertiesTable.set(member.name, member);
}
propertiesArray.push(member);
}
if (contextualTypeHasPattern) {
for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!propertiesTable[prop.name]) {
- if (!(prop.flags & 536870912)) {
+ if (!propertiesTable.get(prop.name)) {
+ if (!(prop.flags & 67108864)) {
error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
- propertiesTable[prop.name] = prop;
+ propertiesTable.set(prop.name, prop);
propertiesArray.push(prop);
}
}
}
if (spread !== emptyObjectType) {
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
+ }
+ if (spread.flags & 32768) {
+ spread.flags |= propagatedFlags;
+ spread.symbol = node.symbol;
}
- spread.flags |= propagatedFlags;
- spread.symbol = node.symbol;
return spread;
}
return createObjectLiteralType();
function createObjectLiteralType() {
- var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
- var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
+ var stringIndexInfo = isJSObjectLiteral ? jsObjectLiteralIndexInfo : hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
+ var numberIndexInfo = hasComputedNumberProperty && !isJSObjectLiteral ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
result.flags |= 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064);
@@ -30136,9 +32326,14 @@ var ts;
return result;
}
}
+ function isValidSpreadType(type) {
+ return !!(type.flags & (1 | 4096 | 2048 | 16777216) ||
+ type.flags & 32768 && !isGenericMappedType(type) ||
+ type.flags & 196608 && !ts.forEach(type.types, function (t) { return !isValidSpreadType(t); }));
+ }
function checkJsxSelfClosingElement(node) {
checkJsxOpeningLikeElement(node);
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function checkJsxElement(node) {
checkJsxOpeningLikeElement(node.openingElement);
@@ -30151,85 +32346,105 @@ var ts;
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
var child = _a[_i];
switch (child.kind) {
- case 252:
+ case 255:
checkJsxExpression(child);
break;
- case 246:
+ case 248:
checkJsxElement(child);
break;
- case 247:
+ case 249:
checkJsxSelfClosingElement(child);
break;
}
}
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function isUnhyphenatedJsxName(name) {
return name.indexOf("-") < 0;
}
function isJsxIntrinsicIdentifier(tagName) {
- if (tagName.kind === 177 || tagName.kind === 98) {
+ if (tagName.kind === 178 || tagName.kind === 98) {
return false;
}
else {
return ts.isIntrinsicJsxName(tagName.text);
}
}
- function checkJsxAttribute(node, elementAttributesType, nameTable) {
- var correspondingPropType = undefined;
- if (elementAttributesType === emptyObjectType && isUnhyphenatedJsxName(node.name.text)) {
- error(node.parent, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
- }
- else if (elementAttributesType && !isTypeAny(elementAttributesType)) {
- var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text);
- correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol);
- if (isUnhyphenatedJsxName(node.name.text)) {
- var attributeType = getTypeOfPropertyOfType(elementAttributesType, ts.getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0);
- if (attributeType) {
- correspondingPropType = attributeType;
+ function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, filter, checkMode) {
+ var attributes = openingLikeElement.attributes;
+ var attributesTable = ts.createMap();
+ var spread = emptyObjectType;
+ var attributesArray = [];
+ for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
+ var attributeDecl = _a[_i];
+ var member = attributeDecl.symbol;
+ if (ts.isJsxAttribute(attributeDecl)) {
+ var exprType = attributeDecl.initializer ?
+ checkExpression(attributeDecl.initializer, checkMode) :
+ trueType;
+ var attributeSymbol = createSymbol(4 | 134217728 | member.flags, member.name);
+ attributeSymbol.declarations = member.declarations;
+ attributeSymbol.parent = member.parent;
+ if (member.valueDeclaration) {
+ attributeSymbol.valueDeclaration = member.valueDeclaration;
}
- else {
- if (!correspondingPropType) {
- error(node.name, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.name.text, typeToString(elementAttributesType));
- return unknownType;
- }
+ attributeSymbol.type = exprType;
+ attributeSymbol.target = member;
+ attributesTable.set(attributeSymbol.name, attributeSymbol);
+ attributesArray.push(attributeSymbol);
+ }
+ else {
+ ts.Debug.assert(attributeDecl.kind === 254);
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ var exprType = checkExpression(attributeDecl.expression);
+ if (!isValidSpreadType(exprType)) {
+ error(attributeDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+ return anyType;
}
+ if (isTypeAny(exprType)) {
+ return anyType;
+ }
+ spread = getSpreadType(spread, exprType);
}
}
- var exprType;
- if (node.initializer) {
- exprType = checkExpression(node.initializer);
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- else {
- exprType = booleanType;
+ attributesTable = ts.createMap();
+ if (attributesArray) {
+ ts.forEach(attributesArray, function (attr) {
+ if (!filter || filter(attr)) {
+ attributesTable.set(attr.name, attr);
+ }
+ });
}
- if (correspondingPropType) {
- checkTypeAssignableTo(exprType, correspondingPropType, node);
+ return createJsxAttributesType(attributes.symbol, attributesTable);
+ function createJsxAttributesType(symbol, attributesTable) {
+ var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
+ result.flags |= 33554432 | 4194304 | freshObjectLiteralFlag;
+ result.objectFlags |= 128;
+ return result;
}
- nameTable[node.name.text] = true;
- return exprType;
}
- function checkJsxSpreadAttribute(node, elementAttributesType, nameTable) {
- var type = checkExpression(node.expression);
- var props = getPropertiesOfType(type);
- for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
- var prop = props_2[_i];
- if (!nameTable[prop.name]) {
- var targetPropSym = getPropertyOfType(elementAttributesType, prop.name);
- if (targetPropSym) {
- var msg = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property, prop.name);
- checkTypeAssignableTo(getTypeOfSymbol(prop), getTypeOfSymbol(targetPropSym), node, undefined, msg);
- }
- nameTable[prop.name] = true;
- }
- }
- return type;
+ function checkJsxAttributes(node, checkMode) {
+ return createJsxAttributesTypeFromAttributesProperty(node.parent, undefined, checkMode);
}
function getJsxType(name) {
- if (jsxTypes[name] === undefined) {
- return jsxTypes[name] = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType;
+ var jsxType = jsxTypes.get(name);
+ if (jsxType === undefined) {
+ jsxTypes.set(name, jsxType = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType);
}
- return jsxTypes[name];
+ return jsxType;
}
function getIntrinsicTagSymbol(node) {
var links = getNodeLinks(node);
@@ -30250,7 +32465,7 @@ var ts;
return links.resolvedSymbol = unknownSymbol;
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
}
return links.resolvedSymbol = unknownSymbol;
@@ -30294,23 +32509,86 @@ var ts;
return undefined;
}
}
- function getResolvedJsxType(node, elemType, elemClassType) {
- if (!elemType) {
- elemType = checkExpression(node.tagName);
+ function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var callSignature = getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, undefined);
+ if (callSignature !== unknownSignature) {
+ var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
+ var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ paramType = intersectTypes(intrinsicAttributes, paramType);
+ }
+ return paramType;
+ }
+ }
+ }
}
- if (elemType.flags & 65536) {
- var types = elemType.types;
- return getUnionType(ts.map(types, function (type) {
- return getResolvedJsxType(node, type, elemClassType);
+ return undefined;
+ }
+ function tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var candidatesOutArray = [];
+ getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray);
+ var result = void 0;
+ var allMatchingAttributesType = void 0;
+ for (var _i = 0, candidatesOutArray_1 = candidatesOutArray; _i < candidatesOutArray_1.length; _i++) {
+ var candidate = candidatesOutArray_1[_i];
+ var callReturnType = getReturnTypeOfSignature(candidate);
+ var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var shouldBeCandidate = true;
+ for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
+ var attribute = _b[_a];
+ if (ts.isJsxAttribute(attribute) &&
+ isUnhyphenatedJsxName(attribute.name.text) &&
+ !getPropertyOfType(paramType, attribute.name.text)) {
+ shouldBeCandidate = false;
+ break;
+ }
+ }
+ if (shouldBeCandidate) {
+ result = intersectTypes(result, paramType);
+ }
+ allMatchingAttributesType = intersectTypes(allMatchingAttributesType, paramType);
+ }
+ }
+ if (!result) {
+ result = allMatchingAttributesType;
+ }
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ result = intersectTypes(intrinsicAttributes, result);
+ }
+ return result;
+ }
+ }
+ return undefined;
+ }
+ function resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, elementType, elementClassType) {
+ if (!elementType) {
+ elementType = checkExpression(openingLikeElement.tagName);
+ }
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ return getUnionType(types.map(function (type) {
+ return resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, type, elementClassType);
}), true);
}
- if (elemType.flags & 2) {
+ if (elementType.flags & 2) {
return anyType;
}
- else if (elemType.flags & 32) {
+ else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elemType.text;
+ var stringLiteralTypeName = elementType.text;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -30319,28 +32597,19 @@ var ts;
if (indexSignatureType) {
return indexSignatureType;
}
- error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
+ error(openingLikeElement, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
return anyType;
}
- var elemInstanceType = getJsxElementInstanceType(node, elemType);
- if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
- if (jsxElementType) {
- var callSignatures = elemType && getSignaturesOfType(elemType, 0);
- var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
- var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
- var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
- if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
- var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
- if (intrinsicAttributes !== unknownType) {
- paramType = intersectTypes(intrinsicAttributes, paramType);
- }
- return paramType;
- }
- }
+ var elemInstanceType = getJsxElementInstanceType(openingLikeElement, elementType);
+ var statelessAttributesType = shouldIncludeAllStatelessAttributesType ?
+ tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) :
+ defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType);
+ if (statelessAttributesType) {
+ return statelessAttributesType;
}
- if (elemClassType) {
- checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
+ if (elementClassType) {
+ checkTypeRelatedTo(elemInstanceType, elementClassType, assignableRelation, openingLikeElement, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
}
if (isTypeAny(elemInstanceType)) {
return elemInstanceType;
@@ -30360,10 +32629,6 @@ var ts;
else if (isTypeAny(attributesType) || (attributesType === unknownType)) {
return attributesType;
}
- else if (attributesType.flags & 65536) {
- error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
- return anyType;
- }
else {
var apparentAttributesType = attributesType;
var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes);
@@ -30386,38 +32651,72 @@ var ts;
}
}
}
- function getJsxElementAttributesType(node) {
+ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
+ ts.Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
var links = getNodeLinks(node);
- if (!links.resolvedJsxType) {
- if (isJsxIntrinsicIdentifier(node.tagName)) {
- var symbol = getIntrinsicTagSymbol(node);
- if (links.jsxFlags & 1) {
- return links.resolvedJsxType = getTypeOfSymbol(symbol);
- }
- else if (links.jsxFlags & 2) {
- return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0).type;
- }
- else {
- return links.resolvedJsxType = unknownType;
- }
+ if (!links.resolvedJsxElementAttributesType) {
+ var symbol = getIntrinsicTagSymbol(node);
+ if (links.jsxFlags & 1) {
+ return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+ }
+ else if (links.jsxFlags & 2) {
+ return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, 0).type;
}
else {
- var elemClassType = getJsxGlobalElementClassType();
- return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType);
+ return links.resolvedJsxElementAttributesType = unknownType;
}
}
- return links.resolvedJsxType;
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType) {
+ var links = getNodeLinks(node);
+ if (!links.resolvedJsxElementAttributesType) {
+ var elemClassType = getJsxGlobalElementClassType();
+ return links.resolvedJsxElementAttributesType = resolveCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType, undefined, elemClassType);
+ }
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getAllAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, true);
+ }
+ }
+ function getAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, false);
+ }
}
function getJsxAttributePropertySymbol(attrib) {
- var attributesType = getJsxElementAttributesType(attrib.parent);
+ var attributesType = getAttributesTypeFromJsxOpeningLikeElement(attrib.parent.parent);
var prop = getPropertyOfType(attributesType, attrib.name.text);
return prop || unknownSymbol;
}
function getJsxGlobalElementClassType() {
- if (!jsxElementClassType) {
- jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ if (!deferredJsxElementClassType) {
+ deferredJsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ }
+ return deferredJsxElementClassType;
+ }
+ function getJsxGlobalElementType() {
+ if (!deferredJsxElementType) {
+ deferredJsxElementType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.Element);
+ }
+ return deferredJsxElementType;
+ }
+ function getJsxGlobalStatelessElementType() {
+ if (!deferredJsxStatelessElementType) {
+ var jsxElementType = getJsxGlobalElementType();
+ if (jsxElementType) {
+ deferredJsxStatelessElementType = getUnionType([jsxElementType, nullType]);
+ }
}
- return jsxElementClassType;
+ return deferredJsxStatelessElementType;
}
function getJsxIntrinsicTagNames() {
var intrinsics = getJsxType(JsxNames.IntrinsicElements);
@@ -30427,8 +32726,8 @@ var ts;
if ((compilerOptions.jsx || 0) === 0) {
error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
}
- if (jsxElementType === undefined) {
- if (compilerOptions.noImplicitAny) {
+ if (getJsxGlobalElementType() === undefined) {
+ if (noImplicitAny) {
error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
}
}
@@ -30445,61 +32744,83 @@ var ts;
markAliasSymbolAsReferenced(reactSym);
}
}
- var targetAttributesType = getJsxElementAttributesType(node);
- var nameTable = ts.createMap();
- var sawSpreadedAny = false;
- for (var i = node.attributes.length - 1; i >= 0; i--) {
- if (node.attributes[i].kind === 250) {
- checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable);
- }
- else {
- ts.Debug.assert(node.attributes[i].kind === 251);
- var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable);
- if (isTypeAny(spreadType)) {
- sawSpreadedAny = true;
- }
- }
+ checkJsxAttributesAssignableToTagNameAttributes(node);
+ }
+ function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
+ var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
+ getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
+ getCustomJsxElementAttributesType(openingLikeElement, false);
+ var sourceAttributesType = createJsxAttributesTypeFromAttributesProperty(openingLikeElement, function (attribute) {
+ return isUnhyphenatedJsxName(attribute.name) || !!(getPropertyOfType(targetAttributesType, attribute.name));
+ });
+ if (targetAttributesType === emptyObjectType && (isTypeAny(sourceAttributesType) || sourceAttributesType.properties.length > 0)) {
+ error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
- if (targetAttributesType && !sawSpreadedAny) {
- var targetProperties = getPropertiesOfType(targetAttributesType);
- for (var i = 0; i < targetProperties.length; i++) {
- if (!(targetProperties[i].flags & 536870912) &&
- !nameTable[targetProperties[i].name]) {
- error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType));
- }
- }
+ else {
+ checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
}
}
- function checkJsxExpression(node) {
+ function checkJsxExpression(node, checkMode) {
if (node.expression) {
- return checkExpression(node.expression);
+ var type = checkExpression(node.expression, checkMode);
+ if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
+ error(node, ts.Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
+ }
+ return type;
}
else {
return unknownType;
}
}
function getDeclarationKindFromSymbol(s) {
- return s.valueDeclaration ? s.valueDeclaration.kind : 147;
+ return s.valueDeclaration ? s.valueDeclaration.kind : 148;
}
function getDeclarationModifierFlagsFromSymbol(s) {
- return s.valueDeclaration ? ts.getCombinedModifierFlags(s.valueDeclaration) : s.flags & 134217728 ? 4 | 32 : 0;
+ if (s.valueDeclaration) {
+ var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+ return s.parent && s.parent.flags & 32 ? flags : flags & ~28;
+ }
+ if (getCheckFlags(s) & 6) {
+ var checkFlags = s.checkFlags;
+ var accessModifier = checkFlags & 256 ? 8 :
+ checkFlags & 64 ? 4 :
+ 16;
+ var staticModifier = checkFlags & 512 ? 32 : 0;
+ return accessModifier | staticModifier;
+ }
+ if (s.flags & 16777216) {
+ return 4 | 32;
+ }
+ return 0;
}
function getDeclarationNodeFlagsFromSymbol(s) {
return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : 0;
}
- function checkClassPropertyAccess(node, left, type, prop) {
+ function isMethodLike(symbol) {
+ return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ }
+ function checkPropertyAccessibility(node, left, type, prop) {
var flags = getDeclarationModifierFlagsFromSymbol(prop);
- var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop));
- var errorNode = node.kind === 177 || node.kind === 223 ?
+ var errorNode = node.kind === 178 || node.kind === 225 ?
node.name :
node.right;
+ if (getCheckFlags(prop) & 256) {
+ error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
+ return false;
+ }
if (left.kind === 96) {
- if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 149) {
- error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
- return false;
+ if (languageVersion < 2) {
+ var hasNonMethodDeclaration = forEachProperty(prop, function (p) {
+ var propKind = getDeclarationKindFromSymbol(p);
+ return propKind !== 150 && propKind !== 149;
+ });
+ if (hasNonMethodDeclaration) {
+ error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+ return false;
+ }
}
if (flags & 128) {
- error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
}
@@ -30509,7 +32830,7 @@ var ts;
if (flags & 8) {
var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
- error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
return true;
@@ -30519,10 +32840,10 @@ var ts;
}
var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
- return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined;
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
});
if (!enclosingClass) {
- error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
return false;
}
if (flags & 32) {
@@ -30538,16 +32859,17 @@ var ts;
return true;
}
function checkNonNullExpression(node) {
- var type = checkExpression(node);
- if (strictNullChecks) {
- var kind = getFalsyFlags(type) & 6144;
- if (kind) {
- error(node, kind & 2048 ? kind & 4096 ?
- ts.Diagnostics.Object_is_possibly_null_or_undefined :
- ts.Diagnostics.Object_is_possibly_undefined :
- ts.Diagnostics.Object_is_possibly_null);
- }
- return getNonNullableType(type);
+ return checkNonNullType(checkExpression(node), node);
+ }
+ function checkNonNullType(type, errorNode) {
+ var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 6144;
+ if (kind) {
+ error(errorNode, kind & 2048 ? kind & 4096 ?
+ ts.Diagnostics.Object_is_possibly_null_or_undefined :
+ ts.Diagnostics.Object_is_possibly_undefined :
+ ts.Diagnostics.Object_is_possibly_null);
+ var t = getNonNullableType(type);
+ return t.flags & (6144 | 8192) ? unknownType : t;
}
return type;
}
@@ -30576,7 +32898,7 @@ var ts;
noUnusedIdentifiers &&
(prop.flags & 106500) &&
prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (prop.flags & 16777216) {
+ if (getCheckFlags(prop) & 1) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
@@ -30584,6 +32906,15 @@ var ts;
}
}
}
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
var type = checkNonNullExpression(left);
if (isTypeAny(type) || type === silentNeverType) {
@@ -30595,16 +32926,30 @@ var ts;
}
var prop = getPropertyOfType(apparentType, right.text);
if (!prop) {
+ var stringIndexType = getIndexTypeOfType(apparentType, 0);
+ if (stringIndexType) {
+ return stringIndexType;
+ }
if (right.text && !checkAndReportErrorForExtendingInterface(node)) {
reportNonexistentProperty(right, type.flags & 16384 && type.isThisType ? apparentType : type);
}
return unknownType;
}
+ if (prop.valueDeclaration) {
+ if (isInPropertyInitializer(node) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text);
+ }
+ if (prop.valueDeclaration.kind === 228 &&
+ node.parent && node.parent.kind !== 158 &&
+ !ts.isInAmbientContext(prop.valueDeclaration) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text);
+ }
+ }
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
- if (prop.parent && prop.parent.flags & 32) {
- checkClassPropertyAccess(node, left, apparentType, prop);
- }
+ checkPropertyAccessibility(node, left, apparentType, prop);
var propType = getTypeOfSymbol(prop);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -30613,30 +32958,30 @@ var ts;
return unknownType;
}
}
- if (node.kind !== 177 || assignmentKind === 1 ||
+ if (node.kind !== 178 || assignmentKind === 1 ||
!(prop.flags & (3 | 4 | 98304)) &&
!(prop.flags & 8192 && propType.flags & 65536)) {
return propType;
}
- var flowType = getFlowTypeOfReference(node, propType, true, undefined);
+ var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isValidPropertyAccess(node, propertyName) {
- var left = node.kind === 177
+ var left = node.kind === 178
? node.expression
: node.left;
var type = checkExpression(left);
if (type !== unknownType && !isTypeAny(type)) {
var prop = getPropertyOfType(getWidenedType(type), propertyName);
- if (prop && prop.parent && prop.parent.flags & 32) {
- return checkClassPropertyAccess(node, left, type, prop);
+ if (prop) {
+ return checkPropertyAccessibility(node, left, type, prop);
}
}
return true;
}
function getForInVariableSymbol(node) {
var initializer = node.initializer;
- if (initializer.kind === 224) {
+ if (initializer.kind === 226) {
var variable = initializer.declarations[0];
if (variable && !ts.isBindingPattern(variable.name)) {
return getSymbolOfNode(variable);
@@ -30658,7 +33003,7 @@ var ts;
var child = expr;
var node = expr.parent;
while (node) {
- if (node.kind === 212 &&
+ if (node.kind === 214 &&
child === node.statement &&
getForInVariableSymbol(node) === symbol &&
hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -30676,7 +33021,7 @@ var ts;
var indexExpression = node.argumentExpression;
if (!indexExpression) {
var sourceFile = ts.getSourceFileOfNode(node);
- if (node.parent.kind === 180 && node.parent.expression === node) {
+ if (node.parent.kind === 181 && node.parent.expression === node) {
var start = ts.skipTrivia(sourceFile.text, node.expression.end);
var end = node.end;
grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
@@ -30696,7 +33041,7 @@ var ts;
error(indexExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
return unknownType;
}
- return getIndexedAccessType(objectType, indexType, node);
+ return checkIndexedAccessIndexType(getIndexedAccessType(objectType, indexType, node), node);
}
function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
if (expressionType === unknownType) {
@@ -30716,7 +33061,7 @@ var ts;
if (!leftHandSideSymbol) {
return false;
}
- var globalESSymbol = getGlobalESSymbolConstructorSymbol();
+ var globalESSymbol = getGlobalESSymbolConstructorSymbol(true);
if (!globalESSymbol) {
return false;
}
@@ -30729,10 +33074,10 @@ var ts;
return true;
}
function resolveUntypedCall(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
checkExpression(node.template);
}
- else if (node.kind !== 145) {
+ else if (node.kind !== 146) {
ts.forEach(node.arguments, function (argument) {
checkExpression(argument);
});
@@ -30751,22 +33096,22 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
- var signature = signatures_2[_i];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
- var parent_8 = signature.declaration && signature.declaration.parent;
+ var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
- if (lastParent && parent_8 === lastParent) {
+ if (lastParent && parent === lastParent) {
index++;
}
else {
- lastParent = parent_8;
+ lastParent = parent;
index = cutoffIndex;
}
}
else {
index = cutoffIndex = result.length;
- lastParent = parent_8;
+ lastParent = parent;
}
lastSymbol = symbol;
if (signature.hasLiteralTypes) {
@@ -30783,7 +33128,7 @@ var ts;
function getSpreadArgumentIndex(args) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
- if (arg && arg.kind === 196) {
+ if (arg && arg.kind === 197) {
return i;
}
}
@@ -30796,11 +33141,14 @@ var ts;
var callIsIncomplete;
var isDecorator;
var spreadArgIndex = -1;
- if (node.kind === 181) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return true;
+ }
+ if (node.kind === 182) {
var tagExpression = node;
argCount = args.length;
typeArguments = undefined;
- if (tagExpression.template.kind === 194) {
+ if (tagExpression.template.kind === 195) {
var templateExpression = tagExpression.template;
var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans);
ts.Debug.assert(lastSpan !== undefined);
@@ -30812,7 +33160,7 @@ var ts;
callIsIncomplete = !!templateLiteral.isUnterminated;
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
isDecorator = true;
typeArguments = undefined;
argCount = getEffectiveArgumentCount(node, undefined, signature);
@@ -30820,7 +33168,7 @@ var ts;
else {
var callExpression = node;
if (!callExpression.arguments) {
- ts.Debug.assert(callExpression.kind === 180);
+ ts.Debug.assert(callExpression.kind === 181);
return signature.minArgumentCount === 0;
}
argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;
@@ -30828,8 +33176,10 @@ var ts;
typeArguments = callExpression.typeArguments;
spreadArgIndex = getSpreadArgumentIndex(args);
}
+ var numTypeParameters = ts.length(signature.typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);
var hasRightNumberOfTypeArgs = !typeArguments ||
- (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
+ (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters);
if (!hasRightNumberOfTypeArgs) {
return false;
}
@@ -30853,9 +33203,9 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true);
+ var context = createInferenceContext(signature, true, false);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypes(context, instantiateType(source, contextualMapper), target);
+ inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
});
return getSignatureInstantiation(signature, getInferredTypes(context));
}
@@ -30874,19 +33224,19 @@ var ts;
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypes(context, thisArgumentType, thisType);
+ inferTypesWithContext(context, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypes(context, argType, paramType);
+ inferTypesWithContext(context, argType, paramType);
}
}
if (excludeArgument) {
@@ -30894,7 +33244,7 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
}
}
}
@@ -30904,7 +33254,7 @@ var ts;
var typeParameters = signature.typeParameters;
var typeArgumentsAreAssignable = true;
var mapper;
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < typeArgumentNodes.length; i++) {
if (typeArgumentsAreAssignable) {
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
@@ -30924,9 +33274,29 @@ var ts;
}
return typeArgumentsAreAssignable;
}
+ function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation) {
+ var callIsIncomplete = node.attributes.end === node.end;
+ if (callIsIncomplete) {
+ return true;
+ }
+ var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;
+ var paramType = getTypeAtPosition(signature, 0);
+ var attributesType = checkExpressionWithContextualType(node.attributes, paramType, undefined);
+ var argProperties = getPropertiesOfType(attributesType);
+ for (var _i = 0, argProperties_1 = argProperties; _i < argProperties_1.length; _i++) {
+ var arg = argProperties_1[_i];
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
+ return false;
+ }
+ }
+ return checkTypeRelatedTo(attributesType, paramType, relation, undefined, headMessage);
+ }
function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation);
+ }
var thisType = getThisTypeOfSignature(signature);
- if (thisType && thisType !== voidType && node.kind !== 180) {
+ if (thisType && thisType !== voidType && node.kind !== 181) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
var errorNode = reportErrors ? (thisArgumentNode || node) : undefined;
@@ -30939,7 +33309,7 @@ var ts;
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
@@ -30954,51 +33324,54 @@ var ts;
return true;
}
function getThisArgumentOfCall(node) {
- if (node.kind === 179) {
+ if (node.kind === 180) {
var callee = node.expression;
- if (callee.kind === 177) {
+ if (callee.kind === 178) {
return callee.expression;
}
- else if (callee.kind === 178) {
+ else if (callee.kind === 179) {
return callee.expression;
}
}
}
function getEffectiveCallArguments(node) {
var args;
- if (node.kind === 181) {
+ if (node.kind === 182) {
var template = node.template;
args = [undefined];
- if (template.kind === 194) {
+ if (template.kind === 195) {
ts.forEach(template.templateSpans, function (span) {
args.push(span.expression);
});
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
return undefined;
}
+ else if (ts.isJsxOpeningLikeElement(node)) {
+ args = node.attributes.properties.length > 0 ? [node.attributes] : emptyArray;
+ }
else {
args = node.arguments || emptyArray;
}
return args;
}
function getEffectiveArgumentCount(node, args, signature) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return 1;
- case 147:
+ case 148:
return 2;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
if (languageVersion === 0) {
return 2;
}
return signature.parameters.length >= 3 ? 3 : 2;
- case 144:
+ case 145:
return 3;
}
}
@@ -31007,48 +33380,48 @@ var ts;
}
}
function getEffectiveDecoratorFirstArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
return getParentTypeOfClassElement(node);
}
ts.Debug.fail("Unsupported decorator target.");
return unknownType;
}
function getEffectiveDecoratorSecondArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a second synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
return anyType;
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var element = node;
switch (element.name.kind) {
case 70:
case 8:
case 9:
return getLiteralTypeForText(32, element.name.text);
- case 142:
+ case 143:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
return nameType;
@@ -31065,20 +33438,20 @@ var ts;
return unknownType;
}
function getEffectiveDecoratorThirdArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
return numberType;
}
- if (node.kind === 147) {
+ if (node.kind === 148) {
ts.Debug.fail("Property decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var propertyType = getTypeOfNode(node);
return createTypedPropertyDescriptorType(propertyType);
}
@@ -31099,26 +33472,26 @@ var ts;
return unknownType;
}
function getEffectiveArgumentType(node, argIndex) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return getEffectiveDecoratorArgumentType(node, argIndex);
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return getGlobalTemplateStringsArrayType();
}
return undefined;
}
function getEffectiveArgument(node, args, argIndex) {
- if (node.kind === 145 ||
- (argIndex === 0 && node.kind === 181)) {
+ if (node.kind === 146 ||
+ (argIndex === 0 && node.kind === 182)) {
return undefined;
}
return args[argIndex];
}
function getEffectiveArgumentErrorNode(node, argIndex, arg) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return node.expression;
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return node.template;
}
else {
@@ -31126,15 +33499,30 @@ var ts;
}
}
function resolveCall(node, signatures, candidatesOutArray, headMessage) {
- var isTaggedTemplate = node.kind === 181;
- var isDecorator = node.kind === 145;
+ var isTaggedTemplate = node.kind === 182;
+ var isDecorator = node.kind === 146;
+ var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
var typeArguments;
- if (!isTaggedTemplate && !isDecorator) {
+ if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) {
typeArguments = node.typeArguments;
if (node.expression.kind !== 96) {
ts.forEach(typeArguments, checkSourceElement);
}
}
+ if (signatures.length === 1) {
+ var declaration = signatures[0].declaration;
+ if (declaration && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration)) {
+ if (containsArgumentsReference(declaration)) {
+ var signatureWithRest = cloneSignature(signatures[0]);
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ signatureWithRest.parameters = ts.concatenate(signatureWithRest.parameters, [syntheticArgsSymbol]);
+ signatureWithRest.hasRestParameter = true;
+ signatures = [signatureWithRest];
+ }
+ }
+ }
var candidates = candidatesOutArray || [];
reorderCandidates(signatures, candidates);
if (!candidates.length) {
@@ -31157,7 +33545,7 @@ var ts;
var candidateForTypeArgumentError;
var resultOfFailedInference;
var result;
- var signatureHelpTrailingComma = candidatesOutArray && node.kind === 179 && node.arguments.hasTrailingComma;
+ var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
@@ -31171,6 +33559,9 @@ var ts;
return result;
}
if (candidateForArgumentError) {
+ if (isJsxOpeningOrSelfClosingElement) {
+ return candidateForArgumentError;
+ }
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
@@ -31186,7 +33577,7 @@ var ts;
if (headMessage) {
diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
}
- reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
+ reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
}
}
else {
@@ -31222,20 +33613,20 @@ var ts;
var candidate = void 0;
var typeArgumentsAreValid = void 0;
var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false)
+ ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
: undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
- typeArgumentTypes = ts.map(typeArguments, getTypeFromTypeNode);
+ typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
}
else {
inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
typeArgumentTypes = inferenceContext.inferredTypes;
+ typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
}
if (!typeArgumentsAreValid) {
break;
@@ -31277,7 +33668,7 @@ var ts;
if (superType !== unknownType) {
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node));
if (baseTypeNode) {
- var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
+ var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
return resolveCall(node, baseConstructors, candidatesOutArray);
}
}
@@ -31388,12 +33779,13 @@ var ts;
if (containingClass) {
var containingType = getTypeOfNode(containingClass);
var baseTypes = getBaseTypes(containingType);
- if (baseTypes.length) {
+ while (baseTypes.length) {
var baseType = baseTypes[0];
if (modifiers & 16 &&
baseType.symbol === declaration.parent.symbol) {
return true;
}
+ baseTypes = getBaseTypes(baseType);
}
}
if (modifiers & 8) {
@@ -31425,16 +33817,16 @@ var ts;
}
function getDiagnosticHeadMessageForDecoratorResolution(node) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
- case 144:
+ case 145:
return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
- case 147:
+ case 148:
return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
}
}
@@ -31459,16 +33851,42 @@ var ts;
}
return resolveCall(node, callSignatures, candidatesOutArray, headMessage);
}
+ function getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ var callSignature = resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
+ return callSignature;
+ }
+ function resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray) {
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ var result = void 0;
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var type = types_18[_i];
+ result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
+ }
+ return result;
+ }
+ var callSignatures = elementType && getSignaturesOfType(elementType, 0);
+ if (callSignatures && callSignatures.length > 0) {
+ var callSignature = void 0;
+ callSignature = resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
+ return callSignature;
+ }
+ return undefined;
+ }
function resolveSignature(node, candidatesOutArray) {
switch (node.kind) {
- case 179:
- return resolveCallExpression(node, candidatesOutArray);
case 180:
- return resolveNewExpression(node, candidatesOutArray);
+ return resolveCallExpression(node, candidatesOutArray);
case 181:
+ return resolveNewExpression(node, candidatesOutArray);
+ case 182:
return resolveTaggedTemplateExpression(node, candidatesOutArray);
- case 145:
+ case 146:
return resolveDecorator(node, candidatesOutArray);
+ case 250:
+ case 249:
+ return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray);
}
ts.Debug.fail("Branch in 'resolveSignature' should be unreachable.");
}
@@ -31499,20 +33917,23 @@ var ts;
if (node.expression.kind === 96) {
return voidType;
}
- if (node.kind === 180) {
+ if (node.kind === 181) {
var declaration = signature.declaration;
if (declaration &&
- declaration.kind !== 150 &&
- declaration.kind !== 154 &&
- declaration.kind !== 159 &&
+ declaration.kind !== 151 &&
+ declaration.kind !== 155 &&
+ declaration.kind !== 160 &&
!ts.isJSDocConstructSignature(declaration)) {
var funcSymbol = node.expression.kind === 70 ?
getResolvedSymbol(node.expression) :
checkExpression(node.expression).symbol;
- if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
+ funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
+ }
+ if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
return getInferredClassType(funcSymbol);
}
- else if (compilerOptions.noImplicitAny) {
+ else if (noImplicitAny) {
error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
}
return anyType;
@@ -31535,9 +33956,9 @@ var ts;
return false;
}
var targetDeclarationKind = resolvedRequire.flags & 16
- ? 225
+ ? 227
: resolvedRequire.flags & 3
- ? 223
+ ? 225
: 0;
if (targetDeclarationKind !== 0) {
var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -31563,6 +33984,22 @@ var ts;
function checkNonNullAssertion(node) {
return getNonNullableType(checkExpression(node.expression));
}
+ function checkMetaProperty(node) {
+ checkGrammarMetaProperty(node);
+ var container = ts.getNewTargetContainer(node);
+ if (!container) {
+ error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
+ return unknownType;
+ }
+ else if (container.kind === 151) {
+ var symbol = getSymbolOfNode(container.parent);
+ return getTypeOfSymbol(symbol);
+ }
+ else {
+ var symbol = getSymbolOfNode(container);
+ return getTypeOfSymbol(symbol);
+ }
+ }
function getTypeOfParameter(symbol) {
var type = getTypeOfSymbol(symbol);
if (strictNullChecks) {
@@ -31578,13 +34015,16 @@ var ts;
pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType;
}
- function assignContextualParameterTypes(signature, context, mapper) {
+ function getTypeOfFirstParameterOfSignature(signature) {
+ return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ }
+ function assignContextualParameterTypes(signature, context, mapper, checkMode) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (isInferentialContext(mapper)) {
+ if (checkMode === 2) {
for (var i = 0; i < len; i++) {
var declaration = signature.parameters[i].valueDeclaration;
if (declaration.type) {
- inferTypes(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
}
}
}
@@ -31592,23 +34032,23 @@ var ts;
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
- signature.thisParameter = createTransientSymbol(context.thisParameter, undefined);
+ signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
}
}
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
}
@@ -31625,19 +34065,19 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
var links = getSymbolLinks(parameter);
if (!links.type) {
links.type = instantiateType(contextualType, mapper);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 172 ||
- parameter.valueDeclaration.name.kind === 173)) {
+ (parameter.valueDeclaration.name.kind === 173 ||
+ parameter.valueDeclaration.name.kind === 174)) {
links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (isInferentialContext(mapper)) {
- inferTypes(mapper.context, links.type, instantiateType(contextualType, mapper));
+ else if (checkMode === 2) {
+ inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
}
}
function getReturnTypeFromJSDocComment(func) {
@@ -31648,9 +34088,9 @@ var ts;
return undefined;
}
function createPromiseType(promisedType) {
- var globalPromiseType = getGlobalPromiseType();
+ var globalPromiseType = getGlobalPromiseType(true);
if (globalPromiseType !== emptyGenericType) {
- promisedType = getAwaitedType(promisedType);
+ promisedType = getAwaitedType(promisedType) || emptyObjectType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
@@ -31661,46 +34101,56 @@ var ts;
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
return unknownType;
}
+ else if (!getGlobalPromiseConstructorSymbol(true)) {
+ error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
return promiseType;
}
- function getReturnTypeFromBody(func, contextualMapper) {
+ function getReturnTypeFromBody(func, checkMode) {
var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
if (!func.body) {
return unknownType;
}
- var isAsync = ts.isAsyncFunctionLike(func);
+ var functionFlags = ts.getFunctionFlags(func);
var type;
- if (func.body.kind !== 204) {
- type = checkExpressionCached(func.body, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (func.body.kind !== 206) {
+ type = checkExpressionCached(func.body, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
}
else {
var types = void 0;
- var funcIsGenerator = !!func.asteriskToken;
- if (funcIsGenerator) {
- types = checkAndAggregateYieldOperandTypes(func, contextualMapper);
- if (types.length === 0) {
- var iterableIteratorAny = createIterableIteratorType(anyType);
- if (compilerOptions.noImplicitAny) {
+ if (functionFlags & 1) {
+ types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), checkAndAggregateReturnExpressionTypes(func, checkMode));
+ if (!types || types.length === 0) {
+ var iterableIteratorAny = functionFlags & 2
+ ? createAsyncIterableIteratorType(anyType)
+ : createIterableIteratorType(anyType);
+ if (noImplicitAny) {
error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny));
}
return iterableIteratorAny;
}
}
else {
- types = checkAndAggregateReturnExpressionTypes(func, contextualMapper);
+ types = checkAndAggregateReturnExpressionTypes(func, checkMode);
if (!types) {
- return isAsync ? createPromiseReturnType(func, neverType) : neverType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, neverType)
+ : neverType;
}
if (types.length === 0) {
- return isAsync ? createPromiseReturnType(func, voidType) : voidType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, voidType)
+ : voidType;
}
}
type = getUnionType(types, true);
- if (funcIsGenerator) {
- type = createIterableIteratorType(type);
+ if (functionFlags & 1) {
+ type = functionFlags & 2
+ ? createAsyncIterableIteratorType(type)
+ : createIterableIteratorType(type);
}
}
if (!contextualSignature) {
@@ -31712,16 +34162,24 @@ var ts;
type = getWidenedLiteralType(type);
}
var widenedType = getWidenedType(type);
- return isAsync ? createPromiseReturnType(func, widenedType) : widenedType;
+ return (functionFlags & 3) === 2
+ ? createPromiseReturnType(func, widenedType)
+ : widenedType;
}
- function checkAndAggregateYieldOperandTypes(func, contextualMapper) {
+ function checkAndAggregateYieldOperandTypes(func, checkMode) {
var aggregatedTypes = [];
+ var functionFlags = ts.getFunctionFlags(func);
ts.forEachYieldExpression(func.body, function (yieldExpression) {
var expr = yieldExpression.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
+ var type = checkExpressionCached(expr, checkMode);
if (yieldExpression.asteriskToken) {
- type = checkElementTypeOfIterable(type, yieldExpression.expression);
+ type = checkIteratedTypeOrElementType(type, yieldExpression.expression, false, (functionFlags & 2) !== 0);
+ }
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, expr, yieldExpression.asteriskToken
+ ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
+ : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (!ts.contains(aggregatedTypes, type)) {
aggregatedTypes.push(type);
@@ -31742,29 +34200,29 @@ var ts;
if (!switchTypes.length) {
return false;
}
- return eachTypeContainedIn(type, switchTypes);
+ return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}
function functionHasImplicitReturn(func) {
if (!(func.flags & 128)) {
return false;
}
var lastStatement = ts.lastOrUndefined(func.body.statements);
- if (lastStatement && lastStatement.kind === 218 && isExhaustiveSwitchStatement(lastStatement)) {
+ if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) {
return false;
}
return true;
}
- function checkAndAggregateReturnExpressionTypes(func, contextualMapper) {
- var isAsync = ts.isAsyncFunctionLike(func);
+ function checkAndAggregateReturnExpressionTypes(func, checkMode) {
+ var functionFlags = ts.getFunctionFlags(func);
var aggregatedTypes = [];
var hasReturnWithNoExpression = functionHasImplicitReturn(func);
var hasReturnOfTypeNever = false;
ts.forEachReturnStatement(func.body, function (returnStatement) {
var expr = returnStatement.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ var type = checkExpressionCached(expr, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (type.flags & 8192) {
hasReturnOfTypeNever = true;
@@ -31778,7 +34236,7 @@ var ts;
}
});
if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever ||
- func.kind === 184 || func.kind === 185)) {
+ func.kind === 185 || func.kind === 186)) {
return undefined;
}
if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) {
@@ -31795,7 +34253,7 @@ var ts;
if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) {
return;
}
- if (ts.nodeIsMissing(func.body) || func.body.kind !== 204 || !functionHasImplicitReturn(func)) {
+ if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) {
return;
}
var hasExplicitReturn = func.flags & 256;
@@ -31821,20 +34279,20 @@ var ts;
error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
- function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
- if (!hasGrammarError && node.kind === 184) {
+ if (!hasGrammarError && node.kind === 185) {
checkGrammarForGenerator(node);
}
- if (contextualMapper === identityMapper && isContextSensitive(node)) {
+ if (checkMode === 1 && isContextSensitive(node)) {
checkNodeDeferred(node);
return anyFunctionType;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && isInferentialContext(contextualMapper);
+ var mightFixTypeParameters = contextSensitive && checkMode === 2;
if (mightFixTypeParameters || !(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
var contextChecked = !!(links.flags & 1024);
@@ -31843,10 +34301,10 @@ var ts;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
+ assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
}
if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
- var returnType = getReturnTypeFromBody(node, contextualMapper);
+ var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
@@ -31858,31 +34316,35 @@ var ts;
}
}
}
- if (produceDiagnostics && node.kind !== 149) {
+ if (produceDiagnostics && node.kind !== 150) {
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
}
return type;
}
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
- var isAsync = ts.isAsyncFunctionLike(node);
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
- if (!node.asteriskToken) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
+ var functionFlags = ts.getFunctionFlags(node);
+ var returnOrPromisedType = node.type &&
+ ((functionFlags & 3) === 2 ?
+ checkAsyncFunctionReturnType(node) :
+ getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
if (!node.type) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
- if (node.body.kind === 204) {
+ if (node.body.kind === 206) {
checkSourceElement(node.body);
}
else {
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if (isAsync) {
- var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);
+ if ((functionFlags & 3) === 2) {
+ var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body);
}
else {
@@ -31901,19 +34363,19 @@ var ts;
return true;
}
function isReadonlySymbol(symbol) {
- return symbol.isReadonly ||
- symbol.flags & 4 && (getDeclarationModifierFlagsFromSymbol(symbol) & 64) !== 0 ||
- symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 ||
+ return !!(getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
- (symbol.flags & 8) !== 0;
+ symbol.flags & 8);
}
function isReferenceToReadonlyEntity(expr, symbol) {
if (isReadonlySymbol(symbol)) {
if (symbol.flags & 4 &&
- (expr.kind === 177 || expr.kind === 178) &&
+ (expr.kind === 178 || expr.kind === 179) &&
expr.expression.kind === 98) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 150))
+ if (!(func && func.kind === 151))
return true;
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
@@ -31922,13 +34384,13 @@ var ts;
return false;
}
function isReferenceThroughNamespaceImport(expr) {
- if (expr.kind === 177 || expr.kind === 178) {
+ if (expr.kind === 178 || expr.kind === 179) {
var node = ts.skipParentheses(expr.expression);
if (node.kind === 70) {
var symbol = getNodeLinks(node).resolvedSymbol;
if (symbol.flags & 8388608) {
var declaration = getDeclarationOfAliasSymbol(symbol);
- return declaration && declaration.kind === 237;
+ return declaration && declaration.kind === 239;
}
}
}
@@ -31936,7 +34398,7 @@ var ts;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
var node = ts.skipParentheses(expr);
- if (node.kind !== 70 && node.kind !== 177 && node.kind !== 178) {
+ if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) {
error(expr, invalidReferenceMessage);
return false;
}
@@ -31944,11 +34406,21 @@ var ts;
}
function checkDeleteExpression(node) {
checkExpression(node.expression);
+ var expr = ts.skipParentheses(node.expression);
+ if (expr.kind !== 178 && expr.kind !== 179) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
+ return booleanType;
+ }
+ var links = getNodeLinks(expr);
+ var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);
+ if (symbol && isReadonlySymbol(symbol)) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
+ }
return booleanType;
}
function checkTypeOfExpression(node) {
checkExpression(node.expression);
- return stringType;
+ return typeofType;
}
function checkVoidExpression(node) {
checkExpression(node.expression);
@@ -31956,7 +34428,7 @@ var ts;
}
function checkAwaitExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 524288)) {
+ if (!(node.flags & 16384)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -31964,7 +34436,7 @@ var ts;
}
}
var operandType = checkExpression(node.expression);
- return checkAwaitedType(operandType, node);
+ return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkPrefixUnaryExpression(node) {
var operandType = checkExpression(node.operand);
@@ -31978,6 +34450,7 @@ var ts;
case 36:
case 37:
case 51:
+ checkNonNullType(operandType, node.operand);
if (maybeTypeOfKind(operandType, 512)) {
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
}
@@ -31989,7 +34462,7 @@ var ts;
booleanType;
case 42:
case 43:
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -32002,7 +34475,7 @@ var ts;
if (operandType === silentNeverType) {
return silentNeverType;
}
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -32014,8 +34487,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
- var t = types_15[_i];
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+ var t = types_19[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -32029,8 +34502,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+ var t = types_20[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -32039,8 +34512,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_17 = types; _a < types_17.length; _a++) {
- var t = types_17[_a];
+ for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
+ var t = types_21[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -32061,7 +34534,10 @@ var ts;
if (isTypeOfKind(leftType, 8190)) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
- if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
+ if (!(isTypeAny(rightType) ||
+ getSignaturesOfType(rightType, 0).length ||
+ getSignaturesOfType(rightType, 1).length ||
+ isTypeSubtypeOf(rightType, globalFunctionType))) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
}
return booleanType;
@@ -32070,39 +34546,41 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
return booleanType;
}
function checkObjectLiteralAssignment(node, sourceType) {
var properties = node.properties;
- for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
- var p = properties_5[_i];
+ for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
+ var p = properties_7[_i];
checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, properties);
}
return sourceType;
}
function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) {
- if (property.kind === 257 || property.kind === 258) {
- var name_22 = property.name;
- if (name_22.kind === 142) {
- checkComputedPropertyName(name_22);
+ if (property.kind === 260 || property.kind === 261) {
+ var name = property.name;
+ if (name.kind === 143) {
+ checkComputedPropertyName(name);
}
- if (isComputedNonLiteralName(name_22)) {
+ if (isComputedNonLiteralName(name)) {
return undefined;
}
- var text = ts.getTextOfPropertyName(name_22);
+ var text = ts.getTextOfPropertyName(name);
var type = isTypeAny(objectLiteralType)
? objectLiteralType
: getTypeOfPropertyOfType(objectLiteralType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) ||
getIndexTypeOfType(objectLiteralType, 0);
if (type) {
- if (property.kind === 258) {
+ if (property.kind === 261) {
return checkDestructuringAssignment(property, type);
}
else {
@@ -32110,10 +34588,13 @@ var ts;
}
}
else {
- error(name_22, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_22));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name));
}
}
- else if (property.kind === 259) {
+ else if (property.kind === 262) {
+ if (languageVersion < 5) {
+ checkExternalEmitHelpers(property, 4);
+ }
var nonRestNames = [];
if (allProperties) {
for (var i = 0; i < allProperties.length - 1; i++) {
@@ -32127,19 +34608,22 @@ var ts;
error(property, ts.Diagnostics.Property_assignment_expected);
}
}
- function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
- var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType;
+ function checkArrayLiteralAssignment(node, sourceType, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, false, false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
- checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper);
+ checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
}
return sourceType;
}
- function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) {
+ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
var elements = node.elements;
var element = elements[elementIndex];
- if (element.kind !== 198) {
- if (element.kind !== 196) {
+ if (element.kind !== 199) {
+ if (element.kind !== 197) {
var propName = "" + elementIndex;
var type = isTypeAny(sourceType)
? sourceType
@@ -32147,7 +34631,7 @@ var ts;
? getTypeOfPropertyOfType(sourceType, propName)
: elementType;
if (type) {
- return checkDestructuringAssignment(element, type, contextualMapper);
+ return checkDestructuringAssignment(element, type, checkMode);
}
else {
checkExpression(element);
@@ -32165,48 +34649,48 @@ var ts;
}
else {
var restExpression = element.expression;
- if (restExpression.kind === 192 && restExpression.operatorToken.kind === 57) {
+ if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) {
error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
}
else {
- return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
+ return checkDestructuringAssignment(restExpression, createArrayType(elementType), checkMode);
}
}
}
}
return undefined;
}
- function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) {
+ function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) {
var target;
- if (exprOrAssignment.kind === 258) {
+ if (exprOrAssignment.kind === 261) {
var prop = exprOrAssignment;
if (prop.objectAssignmentInitializer) {
if (strictNullChecks &&
!(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048)) {
sourceType = getTypeWithFacts(sourceType, 131072);
}
- checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);
+ checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
}
target = exprOrAssignment.name;
}
else {
target = exprOrAssignment;
}
- if (target.kind === 192 && target.operatorToken.kind === 57) {
- checkBinaryExpression(target, contextualMapper);
+ if (target.kind === 193 && target.operatorToken.kind === 57) {
+ checkBinaryExpression(target, checkMode);
target = target.left;
}
- if (target.kind === 176) {
+ if (target.kind === 177) {
return checkObjectLiteralAssignment(target, sourceType);
}
- if (target.kind === 175) {
- return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
+ if (target.kind === 176) {
+ return checkArrayLiteralAssignment(target, sourceType, checkMode);
}
- return checkReferenceAssignment(target, sourceType, contextualMapper);
+ return checkReferenceAssignment(target, sourceType, checkMode);
}
- function checkReferenceAssignment(target, sourceType, contextualMapper) {
- var targetType = checkExpression(target, contextualMapper);
- var error = target.parent.kind === 259 ?
+ function checkReferenceAssignment(target, sourceType, checkMode) {
+ var targetType = checkExpression(target, checkMode);
+ var error = target.parent.kind === 262 ?
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
if (checkReferenceExpression(target, error)) {
@@ -32220,35 +34704,35 @@ var ts;
case 70:
case 9:
case 11:
- case 181:
- case 194:
+ case 182:
+ case 195:
case 12:
case 8:
case 100:
case 85:
case 94:
- case 137:
- case 184:
- case 197:
+ case 138:
case 185:
- case 175:
+ case 198:
+ case 186:
case 176:
- case 187:
- case 201:
- case 247:
- case 246:
+ case 177:
+ case 188:
+ case 202:
+ case 249:
+ case 248:
return true;
- case 193:
+ case 194:
return isSideEffectFree(node.whenTrue) &&
isSideEffectFree(node.whenFalse);
- case 192:
+ case 193:
if (ts.isAssignmentOperator(node.operatorToken.kind)) {
return false;
}
return isSideEffectFree(node.left) &&
isSideEffectFree(node.right);
- case 190:
case 191:
+ case 192:
switch (node.operator) {
case 50:
case 36:
@@ -32257,9 +34741,9 @@ var ts;
return true;
}
return false;
- case 188:
- case 182:
- case 200:
+ case 189:
+ case 183:
+ case 201:
default:
return false;
}
@@ -32274,16 +34758,16 @@ var ts;
firstAssignableToSecond && !secondAssignableToFirst ? type2 :
getUnionType([type1, type2], true);
}
- function checkBinaryExpression(node, contextualMapper) {
- return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node);
+ function checkBinaryExpression(node, checkMode) {
+ return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node);
}
- function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) {
+ function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
var operator = operatorToken.kind;
- if (operator === 57 && (left.kind === 176 || left.kind === 175)) {
- return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper);
+ if (operator === 57 && (left.kind === 177 || left.kind === 176)) {
+ return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode);
}
- var leftType = checkExpression(left, contextualMapper);
- var rightType = checkExpression(right, contextualMapper);
+ var leftType = checkExpression(left, checkMode);
+ var rightType = checkExpression(right, checkMode);
switch (operator) {
case 38:
case 39:
@@ -32310,12 +34794,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
var suggestedOperator = void 0;
if ((leftType.flags & 136) &&
(rightType.flags & 136) &&
@@ -32335,12 +34815,10 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ if (!isTypeOfKind(leftType, 1 | 262178) && !isTypeOfKind(rightType, 1 | 262178)) {
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
+ }
var resultType = void 0;
if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
resultType = numberType;
@@ -32369,8 +34847,8 @@ var ts;
case 29:
case 30:
if (checkForDisallowedESSymbolOperand(operator)) {
- leftType = getBaseTypeOfLiteralType(leftType);
- rightType = getBaseTypeOfLiteralType(rightType);
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -32406,11 +34884,14 @@ var ts;
checkAssignmentOperator(rightType);
return getRegularTypeOfObjectLiteral(rightType);
case 25:
- if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
}
return rightType;
}
+ function isEvalNode(node) {
+ return node.kind === 70 && node.text === "eval";
+ }
function checkForDisallowedESSymbolOperand(operator) {
var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left :
maybeTypeOfKind(rightType, 512) ? right :
@@ -32464,7 +34945,7 @@ var ts;
}
function checkYieldExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 131072) || isYieldExpressionInClass(node)) {
+ if (!(node.flags & 4096) || isYieldExpressionInClass(node)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -32473,30 +34954,45 @@ var ts;
}
if (node.expression) {
var func = ts.getContainingFunction(node);
- if (func && func.asteriskToken) {
+ var functionFlags = func && ts.getFunctionFlags(func);
+ if (node.asteriskToken) {
+ if (functionFlags & 2) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 4096);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (functionFlags & 1) {
var expressionType = checkExpressionCached(node.expression, undefined);
var expressionElementType = void 0;
var nodeIsYieldStar = !!node.asteriskToken;
if (nodeIsYieldStar) {
- expressionElementType = checkElementTypeOfIterable(expressionType, node.expression);
+ expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
if (func.type) {
- var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType;
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
- checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionElementType, node.expression, ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionElementType, signatureElementType, node.expression, undefined);
}
else {
- checkTypeAssignableTo(expressionType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionType, node.expression, ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionType, signatureElementType, node.expression, undefined);
}
}
}
}
return anyType;
}
- function checkConditionalExpression(node, contextualMapper) {
+ function checkConditionalExpression(node, checkMode) {
checkExpression(node.condition);
- var type1 = checkExpression(node.whenTrue, contextualMapper);
- var type2 = checkExpression(node.whenFalse, contextualMapper);
+ var type1 = checkExpression(node.whenTrue, checkMode);
+ var type2 = checkExpression(node.whenFalse, checkMode);
return getBestChoiceType(type1, type2);
}
function checkLiteralExpression(node) {
@@ -32522,107 +35018,119 @@ var ts;
}
function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
var saveContextualType = node.contextualType;
+ var saveContextualMapper = node.contextualMapper;
node.contextualType = contextualType;
- var result = checkExpression(node, contextualMapper);
+ node.contextualMapper = contextualMapper;
+ var checkMode = contextualMapper === identityMapper ? 1 :
+ contextualMapper ? 2 : 0;
+ var result = checkExpression(node, checkMode);
node.contextualType = saveContextualType;
+ node.contextualMapper = saveContextualMapper;
return result;
}
- function checkExpressionCached(node, contextualMapper) {
+ function checkExpressionCached(node, checkMode) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var saveFlowLoopStart = flowLoopStart;
flowLoopStart = flowLoopCount;
- links.resolvedType = checkExpression(node, contextualMapper);
+ links.resolvedType = checkExpression(node, checkMode);
flowLoopStart = saveFlowLoopStart;
}
return links.resolvedType;
}
function isTypeAssertion(node) {
node = ts.skipParentheses(node);
- return node.kind === 182 || node.kind === 200;
+ return node.kind === 183 || node.kind === 201;
}
function checkDeclarationInitializer(declaration) {
- var type = checkExpressionCached(declaration.initializer);
+ var type = getTypeOfExpression(declaration.initializer, true);
return ts.getCombinedNodeFlags(declaration) & 2 ||
ts.getCombinedModifierFlags(declaration) & 64 && !ts.isParameterPropertyDeclaration(declaration) ||
isTypeAssertion(declaration.initializer) ? type : getWidenedLiteralType(type);
}
function isLiteralContextualType(contextualType) {
if (contextualType) {
- if (contextualType.flags & 16384) {
- var apparentType = getApparentTypeOfTypeParameter(contextualType);
- if (apparentType.flags & (2 | 4 | 8 | 16)) {
+ if (contextualType.flags & 540672) {
+ var constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
+ if (constraint.flags & (2 | 4 | 8 | 16)) {
return true;
}
- contextualType = apparentType;
+ contextualType = constraint;
}
return maybeTypeOfKind(contextualType, (480 | 262144));
}
return false;
}
- function checkExpressionForMutableLocation(node, contextualMapper) {
- var type = checkExpression(node, contextualMapper);
+ function checkExpressionForMutableLocation(node, checkMode) {
+ var type = checkExpression(node, checkMode);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type);
}
- function checkPropertyAssignment(node, contextualMapper) {
- if (node.name.kind === 142) {
+ function checkPropertyAssignment(node, checkMode) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- return checkExpressionForMutableLocation(node.initializer, contextualMapper);
+ return checkExpressionForMutableLocation(node.initializer, checkMode);
}
- function checkObjectLiteralMethod(node, contextualMapper) {
+ function checkObjectLiteralMethod(node, checkMode) {
checkGrammarMethod(node);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
- function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
- if (isInferentialContext(contextualMapper)) {
+ function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {
+ if (checkMode === 2) {
var signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
var contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
- return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
+ return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
}
}
}
return type;
}
- function getTypeOfExpression(node) {
- if (node.kind === 179 && node.expression.kind !== 96) {
+ function getTypeOfExpression(node, cache) {
+ if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) {
var funcType = checkNonNullExpression(node.expression);
var signature = getSingleCallSignature(funcType);
if (signature && !signature.typeParameters) {
return getReturnTypeOfSignature(signature);
}
}
- return checkExpression(node);
+ return cache ? checkExpressionCached(node) : checkExpression(node);
+ }
+ function getContextFreeTypeOfExpression(node) {
+ var saveContextualType = node.contextualType;
+ node.contextualType = anyType;
+ var type = getTypeOfExpression(node);
+ node.contextualType = saveContextualType;
+ return type;
}
- function checkExpression(node, contextualMapper) {
+ function checkExpression(node, checkMode) {
var type;
- if (node.kind === 141) {
+ if (node.kind === 142) {
type = checkQualifiedName(node);
}
else {
- var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
- type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkExpressionWorker(node, checkMode);
+ type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
if (isConstEnumObjectType(type)) {
- var ok = (node.parent.kind === 177 && node.parent.expression === node) ||
- (node.parent.kind === 178 && node.parent.expression === node) ||
- ((node.kind === 70 || node.kind === 141) && isInRightSideOfImportOrExportAssignment(node));
+ var ok = (node.parent.kind === 178 && node.parent.expression === node) ||
+ (node.parent.kind === 179 && node.parent.expression === node) ||
+ ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node));
if (!ok) {
error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
}
}
return type;
}
- function checkExpressionWorker(node, contextualMapper) {
+ function checkExpressionWorker(node, checkMode) {
switch (node.kind) {
case 70:
return checkIdentifier(node);
@@ -32637,66 +35145,70 @@ var ts;
case 100:
case 85:
return checkLiteralExpression(node);
- case 194:
+ case 195:
return checkTemplateExpression(node);
case 12:
return stringType;
case 11:
return globalRegExpType;
- case 175:
- return checkArrayLiteral(node, contextualMapper);
case 176:
- return checkObjectLiteral(node, contextualMapper);
+ return checkArrayLiteral(node, checkMode);
case 177:
- return checkPropertyAccessExpression(node);
+ return checkObjectLiteral(node, checkMode);
case 178:
- return checkIndexedAccess(node);
+ return checkPropertyAccessExpression(node);
case 179:
+ return checkIndexedAccess(node);
case 180:
- return checkCallExpression(node);
case 181:
+ return checkCallExpression(node);
+ case 182:
return checkTaggedTemplateExpression(node);
- case 183:
- return checkExpression(node.expression, contextualMapper);
- case 197:
- return checkClassExpression(node);
case 184:
+ return checkExpression(node.expression, checkMode);
+ case 198:
+ return checkClassExpression(node);
case 185:
- return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- case 187:
+ case 186:
+ return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ case 188:
return checkTypeOfExpression(node);
- case 182:
- case 200:
- return checkAssertion(node);
+ case 183:
case 201:
+ return checkAssertion(node);
+ case 202:
return checkNonNullAssertion(node);
- case 186:
+ case 203:
+ return checkMetaProperty(node);
+ case 187:
return checkDeleteExpression(node);
- case 188:
- return checkVoidExpression(node);
case 189:
- return checkAwaitExpression(node);
+ return checkVoidExpression(node);
case 190:
- return checkPrefixUnaryExpression(node);
+ return checkAwaitExpression(node);
case 191:
- return checkPostfixUnaryExpression(node);
+ return checkPrefixUnaryExpression(node);
case 192:
- return checkBinaryExpression(node, contextualMapper);
+ return checkPostfixUnaryExpression(node);
case 193:
- return checkConditionalExpression(node, contextualMapper);
- case 196:
- return checkSpreadExpression(node, contextualMapper);
- case 198:
+ return checkBinaryExpression(node, checkMode);
+ case 194:
+ return checkConditionalExpression(node, checkMode);
+ case 197:
+ return checkSpreadExpression(node, checkMode);
+ case 199:
return undefinedWideningType;
- case 195:
+ case 196:
return checkYieldExpression(node);
- case 252:
- return checkJsxExpression(node);
- case 246:
+ case 255:
+ return checkJsxExpression(node, checkMode);
+ case 248:
return checkJsxElement(node);
- case 247:
+ case 249:
return checkJsxSelfClosingElement(node);
- case 248:
+ case 253:
+ return checkJsxAttributes(node, checkMode);
+ case 250:
ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
}
return unknownType;
@@ -32706,7 +35218,16 @@ var ts;
grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
}
checkSourceElement(node.constraint);
- getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)));
+ checkSourceElement(node.default);
+ var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
+ if (!hasNonCircularBaseConstraint(typeParameter)) {
+ error(node.constraint, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
+ }
+ var constraintType = getConstraintOfTypeParameter(typeParameter);
+ var defaultType = getDefaultFromTypeParameter(typeParameter);
+ if (constraintType && defaultType) {
+ checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
+ }
if (produceDiagnostics) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
}
@@ -32717,7 +35238,7 @@ var ts;
var func = ts.getContainingFunction(node);
if (ts.getModifierFlags(node) & 92) {
func = ts.getContainingFunction(node);
- if (!(func.kind === 150 && ts.nodeIsPresent(func.body))) {
+ if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) {
error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
}
}
@@ -32728,7 +35249,7 @@ var ts;
if (ts.indexOf(func.parameters, node) !== 0) {
error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter);
}
- if (func.kind === 150 || func.kind === 154 || func.kind === 159) {
+ if (func.kind === 151 || func.kind === 155 || func.kind === 160) {
error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
}
}
@@ -32736,14 +35257,6 @@ var ts;
error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
- function isSyntacticallyValidGenerator(node) {
- if (!node.asteriskToken || !node.body) {
- return false;
- }
- return node.kind === 149 ||
- node.kind === 225 ||
- node.kind === 184;
- }
function getTypePredicateParameterIndex(parameterList, parameter) {
if (parameterList) {
for (var i = 0; i < parameterList.length; i++) {
@@ -32783,9 +35296,9 @@ var ts;
else if (parameterName) {
var hasReportedError = false;
for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) {
- var name_23 = _a[_i].name;
- if (ts.isBindingPattern(name_23) &&
- checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_23, parameterName, typePredicate.parameterName)) {
+ var name = _a[_i].name;
+ if (ts.isBindingPattern(name) &&
+ checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {
hasReportedError = true;
break;
}
@@ -32798,16 +35311,16 @@ var ts;
}
function getTypePredicateParent(node) {
switch (node.parent.kind) {
+ case 186:
+ case 154:
+ case 227:
case 185:
- case 153:
- case 225:
- case 184:
- case 158:
+ case 159:
+ case 150:
case 149:
- case 148:
- var parent_9 = node.parent;
- if (node === parent_9.type) {
- return parent_9;
+ var parent = node.parent;
+ if (node === parent.type) {
+ return parent;
}
}
}
@@ -32817,29 +35330,44 @@ var ts;
if (ts.isOmittedExpression(element)) {
continue;
}
- var name_24 = element.name;
- if (name_24.kind === 70 &&
- name_24.text === predicateVariableName) {
+ var name = element.name;
+ if (name.kind === 70 &&
+ name.text === predicateVariableName) {
error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
return true;
}
- else if (name_24.kind === 173 ||
- name_24.kind === 172) {
- if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_24, predicateVariableNode, predicateVariableName)) {
+ else if (name.kind === 174 ||
+ name.kind === 173) {
+ if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
return true;
}
}
}
}
function checkSignatureDeclaration(node) {
- if (node.kind === 155) {
+ if (node.kind === 156) {
checkGrammarIndexSignature(node);
}
- else if (node.kind === 158 || node.kind === 225 || node.kind === 159 ||
- node.kind === 153 || node.kind === 150 ||
- node.kind === 154) {
+ else if (node.kind === 159 || node.kind === 227 || node.kind === 160 ||
+ node.kind === 154 || node.kind === 151 ||
+ node.kind === 155) {
checkGrammarFunctionLikeDeclaration(node);
}
+ var functionFlags = ts.getFunctionFlags(node);
+ if ((functionFlags & 7) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
+ if ((functionFlags & 5) === 1) {
+ if (functionFlags & 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 2048);
+ }
+ else if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
if (node.type) {
@@ -32847,29 +35375,32 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (compilerOptions.noImplicitAny && !node.type) {
+ if (noImplicitAny && !node.type) {
switch (node.kind) {
- case 154:
+ case 155:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
- case 153:
+ case 154:
error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
}
}
if (node.type) {
- if (languageVersion >= 2 && isSyntacticallyValidGenerator(node)) {
+ var functionFlags_1 = ts.getFunctionFlags(node);
+ if ((functionFlags_1 & 5) === 1) {
var returnType = getTypeFromTypeNode(node.type);
if (returnType === voidType) {
error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
- var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType;
- var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType);
+ var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
+ var iterableIteratorInstantiation = functionFlags_1 & 2
+ ? createAsyncIterableIteratorType(generatorElementType)
+ : createIterableIteratorType(generatorElementType);
checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
}
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if ((functionFlags_1 & 3) === 2) {
checkAsyncFunctionReturnType(node);
}
}
@@ -32879,11 +35410,18 @@ var ts;
}
}
function checkClassForDuplicateDeclarations(node) {
+ var Declaration;
+ (function (Declaration) {
+ Declaration[Declaration["Getter"] = 1] = "Getter";
+ Declaration[Declaration["Setter"] = 2] = "Setter";
+ Declaration[Declaration["Method"] = 4] = "Method";
+ Declaration[Declaration["Property"] = 3] = "Property";
+ })(Declaration || (Declaration = {}));
var instanceNames = ts.createMap();
var staticNames = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150) {
+ if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var param = _c[_b];
if (ts.isParameterPropertyDeclaration(param)) {
@@ -32892,36 +35430,65 @@ var ts;
}
}
else {
- var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 114; });
+ var isStatic = ts.getModifierFlags(member) & 32;
var names = isStatic ? staticNames : instanceNames;
var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name);
if (memberName) {
switch (member.kind) {
- case 151:
+ case 152:
addName(names, member.name, memberName, 1);
break;
- case 152:
+ case 153:
addName(names, member.name, memberName, 2);
break;
- case 147:
+ case 148:
addName(names, member.name, memberName, 3);
break;
+ case 150:
+ addName(names, member.name, memberName, 4);
+ break;
}
}
}
}
function addName(names, location, name, meaning) {
- var prev = names[name];
+ var prev = names.get(name);
if (prev) {
- if (prev & meaning) {
+ if (prev & 4) {
+ if (meaning !== 4) {
+ error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+ }
+ }
+ else if (prev & meaning) {
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
}
else {
- names[name] = prev | meaning;
+ names.set(name, prev | meaning);
}
}
else {
- names[name] = meaning;
+ names.set(name, meaning);
+ }
+ }
+ }
+ function checkClassForStaticPropertyNameConflicts(node) {
+ for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+ var member = _a[_i];
+ var memberNameNode = member.name;
+ var isStatic = ts.getModifierFlags(member) & 32;
+ if (isStatic && memberNameNode) {
+ var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
+ switch (memberName) {
+ case "name":
+ case "length":
+ case "caller":
+ case "arguments":
+ case "prototype":
+ var message = ts.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
+ var className = getNameOfSymbol(getSymbolOfNode(node));
+ error(memberNameNode, message, memberName, className);
+ break;
+ }
}
}
}
@@ -32929,7 +35496,7 @@ var ts;
var names = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind == 146) {
+ if (member.kind === 147) {
var memberName = void 0;
switch (member.name.kind) {
case 9:
@@ -32940,18 +35507,18 @@ var ts;
default:
continue;
}
- if (names[memberName]) {
+ if (names.get(memberName)) {
error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
- names[memberName] = true;
+ names.set(memberName, true);
}
}
}
}
function checkTypeForDuplicateIndexSignatures(node) {
- if (node.kind === 227) {
+ if (node.kind === 229) {
var nodeSymbol = getSymbolOfNode(node);
if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
return;
@@ -32966,7 +35533,7 @@ var ts;
var declaration = decl;
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
switch (declaration.parameters[0].type.kind) {
- case 134:
+ case 135:
if (!seenStringIndexer) {
seenStringIndexer = true;
}
@@ -33033,12 +35600,12 @@ var ts;
if (n.kind === 98) {
error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
}
- else if (n.kind !== 184 && n.kind !== 225) {
+ else if (n.kind !== 185 && n.kind !== 227) {
ts.forEachChild(n, markThisReferencesAsErrors);
}
}
function isInstancePropertyWithInitializer(n) {
- return n.kind === 147 &&
+ return n.kind === 148 &&
!(ts.getModifierFlags(n) & 32) &&
!!n.initializer;
}
@@ -33058,7 +35625,7 @@ var ts;
var superCallStatement = void 0;
for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) {
var statement = statements_3[_i];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
superCallStatement = statement;
break;
}
@@ -33081,18 +35648,18 @@ var ts;
checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
checkDecorators(node);
checkSignatureDeclaration(node);
- if (node.kind === 151) {
+ if (node.kind === 152) {
if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) {
if (!(node.flags & 256)) {
error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
}
}
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
- var otherKind = node.kind === 151 ? 152 : 151;
+ var otherKind = node.kind === 152 ? 153 : 152;
var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) {
@@ -33106,17 +35673,12 @@ var ts;
}
}
var returnType = getTypeOfAccessors(getSymbolOfNode(node));
- if (node.kind === 151) {
+ if (node.kind === 152) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
}
}
- if (node.parent.kind !== 176) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
- else {
- checkNodeDeferred(node);
- }
+ checkSourceElement(node.body);
+ registerForUnusedIdentifiersCheck(node);
}
function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
var firstType = getAnnotatedType(first);
@@ -33125,14 +35687,11 @@ var ts;
error(first, message);
}
}
- function checkAccessorDeferred(node) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
function checkMissingDeclaration(node) {
checkDecorators(node);
}
function checkTypeArgumentConstraints(typeParameters, typeArgumentNodes) {
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
var typeArguments;
var mapper;
var result = true;
@@ -33140,7 +35699,7 @@ var ts;
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
if (!typeArguments) {
- typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ typeArguments = fillMissingTypeArguments(ts.map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount);
mapper = createTypeMapper(typeParameters, typeArguments);
}
var typeArgument = typeArguments[i];
@@ -33191,25 +35750,42 @@ var ts;
function checkUnionOrIntersectionType(node) {
ts.forEach(node.types, checkSourceElement);
}
+ function checkIndexedAccessIndexType(type, accessNode) {
+ if (!(type.flags & 524288)) {
+ return type;
+ }
+ var objectType = type.objectType;
+ var indexType = type.indexType;
+ if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
+ return type;
+ }
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ var constraint = getBaseConstraintOfType(objectType);
+ if (constraint && getIndexInfoOfType(constraint, 1)) {
+ return type;
+ }
+ }
+ error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
+ return type;
+ }
function checkIndexedAccessType(node) {
- getTypeFromIndexedAccessTypeNode(node);
+ checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
}
function checkMappedType(node) {
checkSourceElement(node.typeParameter);
checkSourceElement(node.type);
var type = getTypeFromMappedTypeNode(node);
var constraintType = getConstraintTypeFromMappedType(type);
- var keyType = constraintType.flags & 16384 ? getApparentTypeOfTypeParameter(constraintType) : constraintType;
- checkTypeAssignableTo(keyType, stringType, node.typeParameter.constraint);
+ checkTypeAssignableTo(constraintType, stringType, node.typeParameter.constraint);
}
function isPrivateWithinAmbient(node) {
return (ts.getModifierFlags(node) & 8) && ts.isInAmbientContext(node);
}
function getEffectiveDeclarationFlags(n, flagsToCheck) {
var flags = ts.getCombinedModifierFlags(n);
- if (n.parent.kind !== 227 &&
- n.parent.kind !== 226 &&
- n.parent.kind !== 197 &&
+ if (n.parent.kind !== 229 &&
+ n.parent.kind !== 228 &&
+ n.parent.kind !== 198 &&
ts.isInAmbientContext(n)) {
if (!(flags & 2)) {
flags |= 1;
@@ -33286,7 +35862,7 @@ var ts;
if (subsequentNode.kind === node.kind) {
var errorNode_1 = subsequentNode.name || subsequentNode;
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
- var reportError = (node.kind === 149 || node.kind === 148) &&
+ var reportError = (node.kind === 150 || node.kind === 149) &&
(ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32);
if (reportError) {
var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
@@ -33315,15 +35891,15 @@ var ts;
}
var duplicateFunctionDeclaration = false;
var multipleConstructorImplementation = false;
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
- var current = declarations_4[_i];
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
+ var current = declarations_5[_i];
var node = current;
var inAmbientContext = ts.isInAmbientContext(node);
- var inAmbientContextOrInterface = node.parent.kind === 227 || node.parent.kind === 161 || inAmbientContext;
+ var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext;
if (inAmbientContextOrInterface) {
previousDeclaration = undefined;
}
- if (node.kind === 225 || node.kind === 149 || node.kind === 148 || node.kind === 150) {
+ if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) {
var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
someNodeFlags |= currentNodeFlags;
allNodeFlags &= currentNodeFlags;
@@ -33374,8 +35950,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) {
- var signature = signatures_3[_a];
+ for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
+ var signature = signatures_4[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -33434,16 +36010,16 @@ var ts;
}
function getDeclarationSpaces(d) {
switch (d.kind) {
- case 227:
+ case 229:
return 2097152;
- case 230:
+ case 232:
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
? 4194304 | 1048576
: 4194304;
- case 226:
- case 229:
+ case 228:
+ case 231:
return 2097152 | 1048576;
- case 234:
+ case 236:
var result_3 = 0;
var target = resolveAlias(getSymbolOfNode(d));
ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); });
@@ -33453,87 +36029,92 @@ var ts;
}
}
}
- function checkNonThenableType(type, location, message) {
- type = getWidenedType(type);
- if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) {
- if (location) {
- if (!message) {
- message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member;
- }
- error(location, message);
- }
- return unknownType;
- }
- return type;
+ function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) {
+ var promisedType = getPromisedTypeOfPromise(type, errorNode);
+ return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage);
}
- function getPromisedType(promise) {
+ function getPromisedTypeOfPromise(promise, errorNode) {
if (isTypeAny(promise)) {
return undefined;
}
- if (getObjectFlags(promise) & 4) {
- if (promise.target === tryGetGlobalPromiseType()
- || promise.target === getGlobalPromiseLikeType()) {
- return promise.typeArguments[0];
- }
+ var typeAsPromise = promise;
+ if (typeAsPromise.promisedTypeOfPromise) {
+ return typeAsPromise.promisedTypeOfPromise;
}
- var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
- if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
- return undefined;
+ if (isReferenceToType(promise, getGlobalPromiseType(false))) {
+ return typeAsPromise.promisedTypeOfPromise = promise.typeArguments[0];
}
var thenFunction = getTypeOfPropertyOfType(promise, "then");
- if (!thenFunction || isTypeAny(thenFunction)) {
+ if (isTypeAny(thenFunction)) {
return undefined;
}
- var thenSignatures = getSignaturesOfType(thenFunction, 0);
+ var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0) : emptyArray;
if (thenSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.A_promise_must_have_a_then_method);
+ }
return undefined;
}
- var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072);
+ var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 524288);
if (isTypeAny(onfulfilledParameterType)) {
return undefined;
}
var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0);
if (onfulfilledParameterSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);
+ }
return undefined;
}
- return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
- }
- function getTypeOfFirstParameterOfSignature(signature) {
- return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
}
- function getAwaitedType(type) {
- return checkAwaitedType(type, undefined, undefined);
+ function checkAwaitedType(type, errorNode, diagnosticMessage) {
+ return getAwaitedType(type, errorNode, diagnosticMessage) || unknownType;
}
- function checkAwaitedType(type, location, message) {
- return checkAwaitedTypeWorker(type);
- function checkAwaitedTypeWorker(type) {
- if (type.flags & 65536) {
- var types = [];
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var constituentType = _a[_i];
- types.push(checkAwaitedTypeWorker(constituentType));
- }
- return getUnionType(types, true);
+ function getAwaitedType(type, errorNode, diagnosticMessage) {
+ var typeAsAwaitable = type;
+ if (typeAsAwaitable.awaitedTypeOfType) {
+ return typeAsAwaitable.awaitedTypeOfType;
+ }
+ if (isTypeAny(type)) {
+ return typeAsAwaitable.awaitedTypeOfType = type;
+ }
+ if (type.flags & 65536) {
+ var types = void 0;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var constituentType = _a[_i];
+ types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage));
}
- else {
- var promisedType = getPromisedType(type);
- if (promisedType === undefined) {
- return checkNonThenableType(type, location, message);
- }
- else {
- if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
- if (location) {
- error(location, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol));
- }
- return unknownType;
- }
- awaitedTypeStack.push(type.id);
- var awaitedType = checkAwaitedTypeWorker(promisedType);
- awaitedTypeStack.pop();
- return awaitedType;
+ if (!types) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, true);
+ }
+ var promisedType = getPromisedTypeOfPromise(type);
+ if (promisedType) {
+ if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);
}
+ return undefined;
+ }
+ awaitedTypeStack.push(type.id);
+ var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage);
+ awaitedTypeStack.pop();
+ if (!awaitedType) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = awaitedType;
+ }
+ var thenFunction = getTypeOfPropertyOfType(type, "then");
+ if (thenFunction && getSignaturesOfType(thenFunction, 0).length > 0) {
+ if (errorNode) {
+ ts.Debug.assert(!!diagnosticMessage);
+ error(errorNode, diagnosticMessage);
}
+ return undefined;
}
+ return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
var returnType = getTypeFromTypeNode(node.type);
@@ -33541,8 +36122,8 @@ var ts;
if (returnType === unknownType) {
return unknownType;
}
- var globalPromiseType = getGlobalPromiseType();
- if (globalPromiseType !== emptyGenericType && globalPromiseType !== getTargetType(returnType)) {
+ var globalPromiseType = getGlobalPromiseType(true);
+ if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
error(node.type, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
@@ -33560,10 +36141,15 @@ var ts;
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
- error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) {
+ error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
+ else {
+ error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ }
return unknownType;
}
- var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
+ var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(true);
if (globalPromiseConstructorLikeType === emptyObjectType) {
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
return unknownType;
@@ -33578,7 +36164,7 @@ var ts;
return unknownType;
}
}
- return checkAwaitedType(returnType, node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type);
+ return checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkDecorator(node) {
var signature = getResolvedSignature(node);
@@ -33590,22 +36176,22 @@ var ts;
var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
var errorInfo;
switch (node.parent.kind) {
- case 226:
+ case 228:
var classSymbol = getSymbolOfNode(node.parent);
var classConstructorType = getTypeOfSymbol(classSymbol);
expectedReturnType = getUnionType([classConstructorType, voidType]);
break;
- case 144:
+ case 145:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
break;
- case 147:
+ case 148:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
var methodType = getTypeOfNode(node.parent);
var descriptorType = createTypedPropertyDescriptorType(methodType);
expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -33624,6 +36210,9 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function getParameterTypeNodeForDecoratorCheck(node) {
+ return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ }
function checkDecorators(node) {
if (!node.decorators) {
return;
@@ -33634,28 +36223,36 @@ var ts;
if (!compilerOptions.experimentalDecorators) {
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
}
+ var firstDecorator = node.decorators[0];
+ checkExternalEmitHelpers(firstDecorator, 8);
+ if (node.kind === 145) {
+ checkExternalEmitHelpers(firstDecorator, 32);
+ }
if (compilerOptions.emitDecoratorMetadata) {
+ checkExternalEmitHelpers(firstDecorator, 16);
switch (node.kind) {
- case 226:
+ case 228:
var constructor = ts.getFirstConstructorWithBody(node);
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
markTypeNodeAsReferenced(node.type);
break;
- case 147:
- case 144:
+ case 148:
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ break;
+ case 145:
markTypeNodeAsReferenced(node.type);
break;
}
@@ -33667,6 +36264,7 @@ var ts;
checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -33674,8 +36272,8 @@ var ts;
function checkFunctionOrMethodDeclaration(node) {
checkDecorators(node);
checkSignatureDeclaration(node);
- var isAsync = ts.isAsyncFunctionLike(node);
- if (node.name && node.name.kind === 142) {
+ var functionFlags = ts.getFunctionFlags(node);
+ if (node.name && node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
@@ -33693,15 +36291,17 @@ var ts;
}
}
checkSourceElement(node.body);
- if (!node.asteriskToken) {
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
+ var returnOrPromisedType = node.type && (functionFlags & 2
+ ? checkAsyncFunctionReturnType(node)
+ : getTypeFromTypeNode(node.type));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (produceDiagnostics && !node.type) {
- if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
+ if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
- if (node.asteriskToken && ts.nodeIsPresent(node.body)) {
+ if (functionFlags & 1 && ts.nodeIsPresent(node.body)) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
}
@@ -33717,56 +36317,54 @@ var ts;
for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) {
var node = deferredUnusedIdentifierNodes_1[_i];
switch (node.kind) {
- case 261:
- case 230:
+ case 264:
+ case 232:
checkUnusedModuleMembers(node);
break;
- case 226:
- case 197:
+ case 228:
+ case 198:
checkUnusedClassMembers(node);
checkUnusedTypeParameters(node);
break;
- case 227:
+ case 229:
checkUnusedTypeParameters(node);
break;
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
checkUnusedLocalsAndParameters(node);
break;
- case 150:
- case 184:
- case 225:
- case 185:
- case 149:
case 151:
+ case 185:
+ case 227:
+ case 186:
+ case 150:
case 152:
+ case 153:
if (node.body) {
checkUnusedLocalsAndParameters(node);
}
checkUnusedTypeParameters(node);
break;
- case 148:
- case 153:
+ case 149:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
checkUnusedTypeParameters(node);
break;
}
- ;
}
}
}
function checkUnusedLocalsAndParameters(node) {
- if (node.parent.kind !== 227 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
- var _loop_3 = function (key) {
- var local = node.locals[key];
+ if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
+ node.locals.forEach(function (local) {
if (!local.isReferenced) {
- if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 144) {
+ if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
@@ -33779,22 +36377,28 @@ var ts;
ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
}
}
- };
- for (var key in node.locals) {
- _loop_3(key);
- }
+ });
}
}
+ function isRemovedPropertyFromObjectSpread(node) {
+ if (ts.isBindingElement(node) && ts.isObjectBindingPattern(node.parent)) {
+ var lastElement = ts.lastOrUndefined(node.parent.elements);
+ return lastElement !== node && !!lastElement.dotDotDotToken;
+ }
+ return false;
+ }
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 223 &&
- (declaration.parent.parent.kind === 212 ||
- declaration.parent.parent.kind === 213)) {
+ if (declaration.kind === 225 &&
+ (declaration.parent.parent.kind === 214 ||
+ declaration.parent.parent.kind === 215)) {
return;
}
}
- error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) {
+ error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ }
}
function parameterNameStartsWithUnderscore(parameterName) {
return parameterName && isIdentifierThatStartsWithUnderScore(parameterName);
@@ -33807,12 +36411,12 @@ var ts;
if (node.members) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 149 || member.kind === 147) {
+ if (member.kind === 150 || member.kind === 148) {
if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) {
error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name);
}
}
- else if (member.kind === 150) {
+ else if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) {
@@ -33843,21 +36447,20 @@ var ts;
}
function checkUnusedModuleMembers(node) {
if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) {
- for (var key in node.locals) {
- var local = node.locals[key];
+ node.locals.forEach(function (local) {
if (!local.isReferenced && !local.exportSymbol) {
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ errorUnusedLocal(declaration.name, local.name);
}
}
}
- }
+ });
}
}
function checkBlock(node) {
- if (node.kind === 204) {
+ if (node.kind === 206) {
checkGrammarStatementInAmbientContext(node);
}
ts.forEach(node.statements, checkSourceElement);
@@ -33879,19 +36482,19 @@ var ts;
if (!(identifier && identifier.text === name)) {
return false;
}
- if (node.kind === 147 ||
- node.kind === 146 ||
+ if (node.kind === 148 ||
+ node.kind === 147 ||
+ node.kind === 150 ||
node.kind === 149 ||
- node.kind === 148 ||
- node.kind === 151 ||
- node.kind === 152) {
+ node.kind === 152 ||
+ node.kind === 153) {
return false;
}
if (ts.isInAmbientContext(node)) {
return false;
}
var root = ts.getRootDeclaration(node);
- if (root.kind === 144 && ts.nodeIsMissing(root.parent.body)) {
+ if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) {
return false;
}
return true;
@@ -33901,9 +36504,13 @@ var ts;
potentialThisCollisions.push(node);
}
}
+ function checkCollisionWithCapturedNewTargetVariable(node, name) {
+ if (needCollisionCheckForIdentifier(node, name, "_newTarget")) {
+ potentialNewTargetCollisions.push(node);
+ }
+ }
function checkIfThisIsCapturedInEnclosingScope(node) {
- var current = node;
- while (current) {
+ ts.findAncestor(node, function (current) {
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 70;
if (isDeclaration_1) {
@@ -33912,10 +36519,23 @@ var ts;
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
}
- return;
+ return true;
}
- current = current.parent;
- }
+ });
+ }
+ function checkIfNewTargetIsCapturedInEnclosingScope(node) {
+ ts.findAncestor(node, function (current) {
+ if (getNodeCheckFlags(current) & 8) {
+ var isDeclaration_2 = node.kind !== 70;
+ if (isDeclaration_2) {
+ error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ }
+ else {
+ error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);
+ }
+ return true;
+ }
+ });
}
function checkCollisionWithCapturedSuperVariable(node, name) {
if (!needCollisionCheckForIdentifier(node, name, "_super")) {
@@ -33926,8 +36546,8 @@ var ts;
return;
}
if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
- var isDeclaration_2 = node.kind !== 70;
- if (isDeclaration_2) {
+ var isDeclaration_3 = node.kind !== 70;
+ if (isDeclaration_3) {
error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
}
else {
@@ -33942,23 +36562,23 @@ var ts;
if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent)) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
- if (!needCollisionCheckForIdentifier(node, name, "Promise")) {
+ if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 8192) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
@@ -33966,7 +36586,7 @@ var ts;
if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) {
return;
}
- if (node.kind === 223 && !node.initializer) {
+ if (node.kind === 225 && !node.initializer) {
return;
}
var symbol = getSymbolOfNode(node);
@@ -33976,25 +36596,25 @@ var ts;
localDeclarationSymbol !== symbol &&
localDeclarationSymbol.flags & 2) {
if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) {
- var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 224);
- var container = varDeclList.parent.kind === 205 && varDeclList.parent.parent
+ var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226);
+ var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent
? varDeclList.parent.parent
: undefined;
var namesShareScope = container &&
- (container.kind === 204 && ts.isFunctionLike(container.parent) ||
- container.kind === 231 ||
- container.kind === 230 ||
- container.kind === 261);
+ (container.kind === 206 && ts.isFunctionLike(container.parent) ||
+ container.kind === 233 ||
+ container.kind === 232 ||
+ container.kind === 264);
if (!namesShareScope) {
- var name_25 = symbolToString(localDeclarationSymbol);
- error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_25, name_25);
+ var name = symbolToString(localDeclarationSymbol);
+ error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
}
}
}
}
}
function checkParameterInitializer(node) {
- if (ts.getRootDeclaration(node).kind !== 144) {
+ if (ts.getRootDeclaration(node).kind !== 145) {
return;
}
var func = ts.getContainingFunction(node);
@@ -34003,7 +36623,7 @@ var ts;
if (ts.isTypeNode(n) || ts.isDeclarationName(n)) {
return;
}
- if (n.kind === 177) {
+ if (n.kind === 178) {
return visit(n.expression);
}
else if (n.kind === 70) {
@@ -34017,21 +36637,21 @@ var ts;
}
var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
if (enclosingContainer === func) {
- if (symbol.valueDeclaration.kind === 144) {
+ if (symbol.valueDeclaration.kind === 145 ||
+ symbol.valueDeclaration.kind === 175) {
if (symbol.valueDeclaration.pos < node.pos) {
return;
}
- var current = n;
- while (current !== node.initializer) {
- if (ts.isFunctionLike(current.parent)) {
- return;
- }
- if (current.parent.kind === 147 &&
- !(ts.hasModifier(current.parent, 32)) &&
- ts.isClassLike(current.parent.parent)) {
- return;
+ if (ts.findAncestor(n, function (current) {
+ if (current === node.initializer) {
+ return "quit";
}
- current = current.parent;
+ return ts.isFunctionLike(current.parent) ||
+ (current.parent.kind === 148 &&
+ !(ts.hasModifier(current.parent, 32)) &&
+ ts.isClassLike(current.parent.parent));
+ })) {
+ return;
}
}
error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
@@ -34048,34 +36668,40 @@ var ts;
function checkVariableLikeDeclaration(node) {
checkDecorators(node);
checkSourceElement(node.type);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
if (node.initializer) {
checkExpressionCached(node.initializer);
}
}
- if (node.kind === 174) {
- if (node.propertyName && node.propertyName.kind === 142) {
+ if (node.kind === 175) {
+ if (node.parent.kind === 173 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 4);
+ }
+ if (node.propertyName && node.propertyName.kind === 143) {
checkComputedPropertyName(node.propertyName);
}
- var parent_10 = node.parent.parent;
- var parentType = getTypeForBindingElementParent(parent_10);
- var name_26 = node.propertyName || node.name;
- var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name_26));
+ var parent = node.parent.parent;
+ var parentType = getTypeForBindingElementParent(parent);
+ var name = node.propertyName || node.name;
+ var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name));
markPropertyAsReferenced(property);
- if (parent_10.initializer && property && getParentOfSymbol(property)) {
- checkClassPropertyAccess(parent_10, parent_10.initializer, parentType, property);
+ if (parent.initializer && property) {
+ checkPropertyAccessibility(parent, parent.initializer, parentType, property);
}
}
if (ts.isBindingPattern(node.name)) {
+ if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
ts.forEach(node.name.elements, checkSourceElement);
}
- if (node.initializer && ts.getRootDeclaration(node).kind === 144 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
+ if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
return;
}
if (ts.isBindingPattern(node.name)) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined);
checkParameterInitializer(node);
}
@@ -34084,7 +36710,7 @@ var ts;
var symbol = getSymbolOfNode(node);
var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol));
if (node === symbol.valueDeclaration) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined);
checkParameterInitializer(node);
}
@@ -34102,20 +36728,21 @@ var ts;
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
- if (node.kind !== 147 && node.kind !== 146) {
+ if (node.kind !== 148 && node.kind !== 147) {
checkExportsOnMergedDeclarations(node);
- if (node.kind === 223 || node.kind === 174) {
+ if (node.kind === 225 || node.kind === 175) {
checkVarDeclaredNamesNotShadowed(node);
}
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
}
function areDeclarationFlagsIdentical(left, right) {
- if ((left.kind === 144 && right.kind === 223) ||
- (left.kind === 223 && right.kind === 144)) {
+ if ((left.kind === 145 && right.kind === 225) ||
+ (left.kind === 225 && right.kind === 145)) {
return true;
}
if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) {
@@ -34142,8 +36769,8 @@ var ts;
ts.forEach(node.declarationList.declarations, checkSourceElement);
}
function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) {
- if (node.modifiers && node.parent.kind === 176) {
- if (ts.isAsyncFunctionLike(node)) {
+ if (node.modifiers && node.parent.kind === 177) {
+ if (ts.getFunctionFlags(node) & 2) {
if (node.modifiers.length > 1) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
}
@@ -34161,7 +36788,7 @@ var ts;
checkGrammarStatementInAmbientContext(node);
checkExpression(node.expression);
checkSourceElement(node.thenStatement);
- if (node.thenStatement.kind === 206) {
+ if (node.thenStatement.kind === 208) {
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
}
checkSourceElement(node.elseStatement);
@@ -34178,12 +36805,12 @@ var ts;
}
function checkForStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.initializer && node.initializer.kind === 224) {
+ if (node.initializer && node.initializer.kind === 226) {
checkGrammarVariableDeclarationList(node.initializer);
}
}
if (node.initializer) {
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
ts.forEach(node.initializer.declarations, checkVariableDeclaration);
}
else {
@@ -34201,13 +36828,23 @@ var ts;
}
function checkForOfStatement(node) {
checkGrammarForInOrForOfStatement(node);
- if (node.initializer.kind === 224) {
+ if (node.kind === 215) {
+ if (node.awaitModifier) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 8192);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (node.initializer.kind === 226) {
checkForInOrForOfVariableDeclaration(node);
}
else {
var varExpr = node.initializer;
- var iteratedType = checkRightHandSideOfForOf(node.expression);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier);
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
checkDestructuringAssignment(varExpr, iteratedType || unknownType);
}
else {
@@ -34226,7 +36863,7 @@ var ts;
function checkForInStatement(node) {
checkGrammarForInOrForOfStatement(node);
var rightType = checkNonNullExpression(node.expression);
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
var variable = node.initializer.declarations[0];
if (variable && ts.isBindingPattern(variable.name)) {
error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -34236,7 +36873,7 @@ var ts;
else {
var varExpr = node.initializer;
var leftType = checkExpression(varExpr);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
}
else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -34246,7 +36883,7 @@ var ts;
checkReferenceExpression(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access);
}
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
checkSourceElement(node.statement);
@@ -34261,161 +36898,199 @@ var ts;
checkVariableDeclaration(decl);
}
}
- function checkRightHandSideOfForOf(rhsExpression) {
+ function checkRightHandSideOfForOf(rhsExpression, awaitModifier) {
var expressionType = checkNonNullExpression(rhsExpression);
- return checkIteratedTypeOrElementType(expressionType, rhsExpression, true);
+ return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
if (isTypeAny(inputType)) {
return inputType;
}
- if (languageVersion >= 2) {
- return checkElementTypeOfIterable(inputType, errorNode);
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ }
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ var uplevelIteration = languageVersion >= 2;
+ var downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
+ if (uplevelIteration || downlevelIteration || allowAsyncIterable) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ if (iteratedType || uplevelIteration) {
+ return iteratedType;
+ }
}
+ var arrayType = inputType;
+ var reportedError = false;
+ var hasStringConstituent = false;
if (allowStringInput) {
- return checkElementTypeOfArrayOrString(inputType, errorNode);
- }
- if (isArrayLikeType(inputType)) {
- var indexType = getIndexTypeOfType(inputType, 1);
- if (indexType) {
- return indexType;
+ if (arrayType.flags & 65536) {
+ var arrayTypes = inputType.types;
+ var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
+ if (filteredTypes !== arrayTypes) {
+ arrayType = getUnionType(filteredTypes, true);
+ }
+ }
+ else if (arrayType.flags & 262178) {
+ arrayType = neverType;
+ }
+ hasStringConstituent = arrayType !== inputType;
+ if (hasStringConstituent) {
+ if (languageVersion < 1) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
+ reportedError = true;
+ }
+ }
+ if (arrayType.flags & 8192) {
+ return stringType;
+ }
}
}
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
+ if (!isArrayLikeType(arrayType)) {
+ if (errorNode && !reportedError) {
+ var diagnostic = !allowStringInput || hasStringConstituent
+ ? downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type
+ : downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
+ error(errorNode, diagnostic, typeToString(arrayType));
+ }
+ return hasStringConstituent ? stringType : undefined;
}
- return unknownType;
- }
- function checkElementTypeOfIterable(iterable, errorNode) {
- var elementType = getElementTypeOfIterable(iterable, errorNode);
- if (errorNode && elementType) {
- checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode);
+ var arrayElementType = getIndexTypeOfType(arrayType, 1);
+ if (hasStringConstituent && arrayElementType) {
+ if (arrayElementType.flags & 262178) {
+ return stringType;
+ }
+ return getUnionType([arrayElementType, stringType], true);
}
- return elementType || anyType;
+ return arrayElementType;
}
- function getElementTypeOfIterable(type, errorNode) {
+ function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterable = type;
- if (!typeAsIterable.iterableElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableType()) {
- typeAsIterable.iterableElementType = type.typeArguments[0];
+ if (isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable) {
+ return isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isAsyncIterable) {
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
}
- else {
- var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorFunction)) {
- return undefined;
- }
- var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray;
- if (iteratorFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
- }
- return undefined;
- }
- typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), true), errorNode);
+ }
+ if (!isAsyncIterable || allowNonAsyncIterables) {
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
+ : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
}
}
- return typeAsIterable.iterableElementType;
- }
- function getElementTypeOfIterator(type, errorNode) {
- if (isTypeAny(type)) {
- return undefined;
+ var iteratorMethodSignatures;
+ var mayBeIterable = false;
+ if (isAsyncIterable) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
+ }
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
}
- var typeAsIterator = type;
- if (!typeAsIterator.iteratorElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIteratorType()) {
- typeAsIterator.iteratorElementType = type.typeArguments[0];
+ if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
- else {
- var iteratorNextFunction = getTypeOfPropertyOfType(type, "next");
- if (isTypeAny(iteratorNextFunction)) {
- return undefined;
- }
- var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray;
- if (iteratorNextFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
- }
- return undefined;
- }
- var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), true);
- if (isTypeAny(iteratorNextResult)) {
- return undefined;
- }
- var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
- if (!iteratorNextValue) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
- }
- return undefined;
- }
- typeAsIterator.iteratorElementType = iteratorNextValue;
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
+ mayBeIterable = true;
+ }
+ if (ts.some(iteratorMethodSignatures)) {
+ var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, false);
+ if (checkAssignability && errorNode && iteratedType) {
+ checkTypeAssignableTo(type, mayBeIterable
+ ? createIterableType(iteratedType)
+ : createAsyncIterableType(iteratedType), errorNode);
}
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType
+ : typeAsIterable.iteratedTypeOfIterable = iteratedType;
}
- return typeAsIterator.iteratorElementType;
+ if (errorNode) {
+ error(errorNode, isAsyncIterable
+ ? ts.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
+ : ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
+ }
+ return undefined;
}
- function getElementTypeOfIterableIterator(type) {
+ function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
return undefined;
}
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableIteratorType()) {
- return type.typeArguments[0];
+ var typeAsIterator = type;
+ if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) {
+ return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator;
}
- return getElementTypeOfIterable(type, undefined) ||
- getElementTypeOfIterator(type, undefined);
- }
- function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
- ts.Debug.assert(languageVersion < 2);
- var arrayType = arrayOrStringType;
- if (arrayOrStringType.flags & 65536) {
- var arrayTypes = arrayOrStringType.types;
- var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
- if (filteredTypes !== arrayTypes) {
- arrayType = getUnionType(filteredTypes, true);
- }
+ var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType;
+ if (isReferenceToType(type, getIteratorType(false))) {
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0]
+ : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0];
}
- else if (arrayOrStringType.flags & 262178) {
- arrayType = neverType;
+ var nextMethod = getTypeOfPropertyOfType(type, "next");
+ if (isTypeAny(nextMethod)) {
+ return undefined;
}
- var hasStringConstituent = arrayOrStringType !== arrayType;
- var reportedError = false;
- if (hasStringConstituent) {
- if (languageVersion < 1) {
- error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
- reportedError = true;
- }
- if (arrayType.flags & 8192) {
- return stringType;
+ var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0) : emptyArray;
+ if (nextMethodSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.An_async_iterator_must_have_a_next_method
+ : ts.Diagnostics.An_iterator_must_have_a_next_method);
}
+ return undefined;
}
- if (!isArrayLikeType(arrayType)) {
- if (!reportedError) {
- var diagnostic = hasStringConstituent
- ? ts.Diagnostics.Type_0_is_not_an_array_type
- : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
- error(errorNode, diagnostic, typeToString(arrayType));
+ var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), true);
+ if (isTypeAny(nextResult)) {
+ return undefined;
+ }
+ if (isAsyncIterator) {
+ nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
- return hasStringConstituent ? stringType : unknownType;
}
- var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType;
- if (hasStringConstituent) {
- if (arrayElementType.flags & 262178) {
- return stringType;
+ var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value");
+ if (!nextValue) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property
+ : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
}
- return getUnionType([arrayElementType, stringType], true);
+ return undefined;
}
- return arrayElementType;
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue
+ : typeAsIterator.iteratedTypeOfIterator = nextValue;
+ }
+ function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) {
+ if (isTypeAny(returnType)) {
+ return undefined;
+ }
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ || getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 152)));
+ return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153)));
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType;
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
+ ? getPromisedTypeOfPromise(returnType)
+ : returnType;
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 | 1);
}
function checkReturnStatement(node) {
@@ -34431,40 +37106,41 @@ var ts;
var returnType = getReturnTypeOfSignature(signature);
if (strictNullChecks || node.expression || returnType.flags & 8192) {
var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
- if (func.asteriskToken) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
return;
}
- if (func.kind === 152) {
+ if (func.kind === 153) {
if (node.expression) {
- error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
+ error(node, ts.Diagnostics.Setters_cannot_return_a_value);
}
}
- else if (func.kind === 150) {
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) {
- error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
+ else if (func.kind === 151) {
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
+ error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
}
}
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
- if (ts.isAsyncFunctionLike(func)) {
- var promisedType = getPromisedType(returnType);
- var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (functionFlags & 2) {
+ var promisedType = getPromisedTypeOfPromise(returnType);
+ var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (promisedType) {
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node);
+ checkTypeAssignableTo(awaitedType, promisedType, node);
}
}
else {
- checkTypeAssignableTo(exprType, returnType, node.expression || node);
+ checkTypeAssignableTo(exprType, returnType, node);
}
}
}
- else if (func.kind !== 150 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+ else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
}
function checkWithStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.flags & 524288) {
+ if (node.flags & 16384) {
grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);
}
}
@@ -34483,7 +37159,7 @@ var ts;
var expressionType = checkExpression(node.expression);
var expressionIsLiteral = isLiteralType(expressionType);
ts.forEach(node.caseBlock.clauses, function (clause) {
- if (clause.kind === 254 && !hasDuplicateDefaultClause) {
+ if (clause.kind === 257 && !hasDuplicateDefaultClause) {
if (firstDefaultClause === undefined) {
firstDefaultClause = clause;
}
@@ -34495,7 +37171,7 @@ var ts;
hasDuplicateDefaultClause = true;
}
}
- if (produceDiagnostics && clause.kind === 253) {
+ if (produceDiagnostics && clause.kind === 256) {
var caseClause = clause;
var caseType = checkExpression(caseClause.expression);
var caseIsLiteral = isLiteralType(caseType);
@@ -34516,18 +37192,16 @@ var ts;
}
function checkLabeledStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- var current = node.parent;
- while (current) {
+ ts.findAncestor(node.parent, function (current) {
if (ts.isFunctionLike(current)) {
- break;
+ return "quit";
}
- if (current.kind === 219 && current.label.text === node.label.text) {
+ if (current.kind === 221 && current.label.text === node.label.text) {
var sourceFile = ts.getSourceFileOfNode(node);
grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
- break;
+ return true;
}
- current = current.parent;
- }
+ });
}
checkSourceElement(node.statement);
}
@@ -34554,14 +37228,14 @@ var ts;
grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
}
else {
- var blockLocals = catchClause.block.locals;
- if (blockLocals) {
- for (var caughtName in catchClause.locals) {
- var blockLocal = blockLocals[caughtName];
+ var blockLocals_1 = catchClause.block.locals;
+ if (blockLocals_1) {
+ ts.forEachKey(catchClause.locals, function (caughtName) {
+ var blockLocal = blockLocals_1.get(caughtName);
if (blockLocal && (blockLocal.flags & 2) !== 0) {
grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
}
- }
+ });
}
}
}
@@ -34609,12 +37283,13 @@ var ts;
if (!indexType) {
return;
}
- if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) {
+ var propDeclaration = prop.valueDeclaration;
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (prop.valueDeclaration.name.kind === 142 || prop.parent === containingType.symbol) {
- errorNode = prop.valueDeclaration;
+ if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) {
+ errorNode = propDeclaration;
}
else if (indexDeclaration) {
errorNode = indexDeclaration;
@@ -34639,15 +37314,23 @@ var ts;
case "string":
case "symbol":
case "void":
+ case "object":
error(name, message, name.text);
}
}
function checkTypeParameters(typeParameterDeclarations) {
if (typeParameterDeclarations) {
- for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
+ var seenDefault = false;
+ for (var i = 0; i < typeParameterDeclarations.length; i++) {
var node = typeParameterDeclarations[i];
checkTypeParameter(node);
if (produceDiagnostics) {
+ if (node.default) {
+ seenDefault = true;
+ }
+ else if (seenDefault) {
+ error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
+ }
for (var j = 0; j < i; j++) {
if (typeParameterDeclarations[j].symbol === node.symbol) {
error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
@@ -34657,22 +37340,56 @@ var ts;
}
}
}
- function checkTypeParameterListsIdentical(node, symbol) {
+ function checkTypeParameterListsIdentical(symbol) {
if (symbol.declarations.length === 1) {
return;
}
- var firstDecl;
- for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 226 || declaration.kind === 227) {
- if (!firstDecl) {
- firstDecl = declaration;
+ var links = getSymbolLinks(symbol);
+ if (!links.typeParametersChecked) {
+ links.typeParametersChecked = true;
+ var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
+ if (declarations.length <= 1) {
+ return;
+ }
+ var type = getDeclaredTypeOfSymbol(symbol);
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
+ var name = symbolToString(symbol);
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
+ var declaration = declarations_6[_i];
+ error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
}
- else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) {
- error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text);
+ }
+ }
+ }
+ function areTypeParametersIdentical(declarations, typeParameters) {
+ var maxTypeArgumentCount = ts.length(typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
+ var declaration = declarations_7[_i];
+ var numTypeParameters = ts.length(declaration.typeParameters);
+ if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
+ return false;
+ }
+ for (var i = 0; i < numTypeParameters; i++) {
+ var source = declaration.typeParameters[i];
+ var target = typeParameters[i];
+ if (source.name.text !== target.symbol.name) {
+ return false;
+ }
+ var sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint);
+ var targetConstraint = getConstraintFromTypeParameter(target);
+ if ((sourceConstraint || targetConstraint) &&
+ (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) {
+ return false;
+ }
+ var sourceDefault = source.default && getTypeFromTypeNode(source.default);
+ var targetDefault = getDefaultFromTypeParameter(target);
+ if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {
+ return false;
}
}
}
+ return true;
}
function checkClassExpression(node) {
checkClassLikeDeclaration(node);
@@ -34692,11 +37409,12 @@ var ts;
registerForUnusedIdentifiersCheck(node);
}
function checkClassLikeDeclaration(node) {
- checkGrammarClassDeclarationHeritageClauses(node);
+ checkGrammarClassLikeDeclaration(node);
checkDecorators(node);
if (node.name) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -34706,19 +37424,26 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
var staticType = getTypeOfSymbol(symbol);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
checkClassForDuplicateDeclarations(node);
+ if (!ts.isInAmbientContext(node)) {
+ checkClassForStaticPropertyNameConflicts(node);
+ }
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(baseTypeNode.parent, 1);
+ }
var baseTypes = getBaseTypes(type);
if (baseTypes.length && produceDiagnostics) {
var baseType_1 = baseTypes[0];
- var staticBaseType = getBaseConstructorTypeOfClass(type);
+ var baseConstructorType = getBaseConstructorTypeOfClass(type);
+ var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
if (baseTypeNode.typeArguments) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
- for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
if (!checkTypeArgumentConstraints(constructor.typeParameters, baseTypeNode.typeArguments)) {
break;
@@ -34727,15 +37452,11 @@ var ts;
}
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
- if (baseType_1.symbol.valueDeclaration &&
- !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration) &&
- baseType_1.symbol.valueDeclaration.kind === 226) {
- if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) {
- error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class);
- }
+ if (baseConstructorType.flags & 540672 && !isMixinConstructorType(staticType)) {
+ error(node.name || node, ts.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
}
- if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32)) {
- var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
+ if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32) && !(baseConstructorType.flags & 540672)) {
+ var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);
if (ts.forEach(constructors, function (sig) { return getReturnTypeOfSignature(sig) !== baseType_1; })) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructors_must_all_have_the_same_return_type);
}
@@ -34754,8 +37475,7 @@ var ts;
if (produceDiagnostics) {
var t = getTypeFromTypeNode(typeRefNode);
if (t !== unknownType) {
- var declaredType = getObjectFlags(t) & 4 ? t.target : t;
- if (getObjectFlags(declaredType) & 3) {
+ if (isValidBaseType(t)) {
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
}
else {
@@ -34783,17 +37503,22 @@ var ts;
}
}
function getTargetSymbol(s) {
- return s.flags & 16777216 ? getSymbolLinks(s).target : s;
+ return getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
+ function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
+ return ts.filter(symbol.declarations, function (d) {
+ return d.kind === 228 || d.kind === 229;
+ });
+ }
function checkKindsOfPropertyMemberOverrides(type, baseType) {
- var baseProperties = getPropertiesOfObjectType(baseType);
+ var baseProperties = getPropertiesOfType(baseType);
for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
var baseProperty = baseProperties_1[_i];
var base = getTargetSymbol(baseProperty);
- if (base.flags & 134217728) {
+ if (base.flags & 16777216) {
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
@@ -34803,7 +37528,7 @@ var ts;
if (derived === base) {
var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol);
if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) {
- if (derivedClassDecl.kind === 197) {
+ if (derivedClassDecl.kind === 198) {
error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
}
else {
@@ -34813,66 +37538,37 @@ var ts;
}
else {
var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
- if ((baseDeclarationFlags & 8) || (derivedDeclarationFlags & 8)) {
+ if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
continue;
}
- if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) {
+ if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
var errorMessage = void 0;
- if (base.flags & 8192) {
+ if (isMethodLike(base)) {
if (derived.flags & 98304) {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
}
else {
- ts.Debug.assert((derived.flags & 4) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
}
}
else if (base.flags & 4) {
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
}
else {
- ts.Debug.assert((base.flags & 98304) !== 0);
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
function isAccessor(kind) {
- return kind === 151 || kind === 152;
- }
- function areTypeParametersIdentical(list1, list2) {
- if (!list1 && !list2) {
- return true;
- }
- if (!list1 || !list2 || list1.length !== list2.length) {
- return false;
- }
- for (var i = 0, len = list1.length; i < len; i++) {
- var tp1 = list1[i];
- var tp2 = list2[i];
- if (tp1.name.text !== tp2.name.text) {
- return false;
- }
- if (!tp1.constraint && !tp2.constraint) {
- continue;
- }
- if (!tp1.constraint || !tp2.constraint) {
- return false;
- }
- if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
- return false;
- }
- }
- return true;
+ return kind === 152 || kind === 153;
}
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
@@ -34880,16 +37576,16 @@ var ts;
return true;
}
var seen = ts.createMap();
- ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
+ ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.name, { prop: p, containingType: type }); });
var ok = true;
for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
var base = baseTypes_2[_i];
- var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType));
- for (var _a = 0, properties_6 = properties; _a < properties_6.length; _a++) {
- var prop = properties_6[_a];
- var existing = seen[prop.name];
+ var properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
+ for (var _a = 0, properties_8 = properties; _a < properties_8.length; _a++) {
+ var prop = properties_8[_a];
+ var existing = seen.get(prop.name);
if (!existing) {
- seen[prop.name] = { prop: prop, containingType: base };
+ seen.set(prop.name, { prop: prop, containingType: base });
}
else {
var isInheritedProperty = existing.containingType !== type;
@@ -34913,8 +37609,8 @@ var ts;
checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
checkExportsOnMergedDeclarations(node);
var symbol = getSymbolOfNode(node);
- checkTypeParameterListsIdentical(node, symbol);
- var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 227);
+ checkTypeParameterListsIdentical(symbol);
+ var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229);
if (node === firstInterfaceDecl) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
@@ -35010,7 +37706,7 @@ var ts;
return value;
function evalConstant(e) {
switch (e.kind) {
- case 190:
+ case 191:
var value_1 = evalConstant(e.operand);
if (value_1 === undefined) {
return undefined;
@@ -35021,7 +37717,7 @@ var ts;
case 51: return ~value_1;
}
return undefined;
- case 192:
+ case 193:
var left = evalConstant(e.left);
if (left === undefined) {
return undefined;
@@ -35045,12 +37741,13 @@ var ts;
}
return undefined;
case 8:
+ checkGrammarNumericLiteral(e);
return +e.text;
- case 183:
+ case 184:
return evalConstant(e.expression);
case 70:
+ case 179:
case 178:
- case 177:
var member = initializer.parent;
var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
var enumType_1;
@@ -35061,7 +37758,7 @@ var ts;
}
else {
var expression = void 0;
- if (e.kind === 178) {
+ if (e.kind === 179) {
if (e.argumentExpression === undefined ||
e.argumentExpression.kind !== 9) {
return undefined;
@@ -35078,7 +37775,7 @@ var ts;
if (current.kind === 70) {
break;
}
- else if (current.kind === 177) {
+ else if (current.kind === 178) {
current = current.expression;
}
else {
@@ -35118,6 +37815,7 @@ var ts;
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
checkExportsOnMergedDeclarations(node);
@@ -35138,7 +37836,7 @@ var ts;
}
var seenEnumMissingInitialInitializer_1 = false;
ts.forEach(enumSymbol.declarations, function (declaration) {
- if (declaration.kind !== 229) {
+ if (declaration.kind !== 231) {
return false;
}
var enumDeclaration = declaration;
@@ -35159,10 +37857,10 @@ var ts;
}
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
- var declaration = declarations_5[_i];
- if ((declaration.kind === 226 ||
- (declaration.kind === 225 && ts.nodeIsPresent(declaration.body))) &&
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+ var declaration = declarations_8[_i];
+ if ((declaration.kind === 228 ||
+ (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) &&
!ts.isInAmbientContext(declaration)) {
return declaration;
}
@@ -35221,7 +37919,7 @@ var ts;
error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
}
}
- var mergedClass = ts.getDeclarationOfKind(symbol, 226);
+ var mergedClass = ts.getDeclarationOfKind(symbol, 228);
if (mergedClass &&
inSameLexicalScope(node, mergedClass)) {
getNodeLinks(node).flags |= 32768;
@@ -35229,7 +37927,7 @@ var ts;
}
if (isAmbientExternalModule) {
if (ts.isExternalModuleAugmentation(node)) {
- var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432);
+ var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 134217728);
if (checkBody && node.body) {
for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) {
var statement = _a[_i];
@@ -35264,42 +37962,42 @@ var ts;
}
function checkModuleAugmentationElement(node, isGlobalAugmentation) {
switch (node.kind) {
- case 205:
+ case 207:
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
checkModuleAugmentationElement(decl, isGlobalAugmentation);
}
break;
- case 240:
- case 241:
+ case 242:
+ case 243:
grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
break;
- case 234:
- case 235:
+ case 236:
+ case 237:
grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
break;
- case 174:
- case 223:
- var name_27 = node.name;
- if (ts.isBindingPattern(name_27)) {
- for (var _b = 0, _c = name_27.elements; _b < _c.length; _b++) {
+ case 175:
+ case 225:
+ var name = node.name;
+ if (ts.isBindingPattern(name)) {
+ for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
var el = _c[_b];
checkModuleAugmentationElement(el, isGlobalAugmentation);
}
break;
}
- case 226:
- case 229:
- case 225:
+ case 228:
+ case 231:
case 227:
+ case 229:
+ case 232:
case 230:
- case 228:
if (isGlobalAugmentation) {
return;
}
var symbol = getSymbolOfNode(node);
if (symbol) {
- var reportError = !(symbol.flags & 33554432);
+ var reportError = !(symbol.flags & 134217728);
if (!reportError) {
reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
}
@@ -35311,12 +38009,12 @@ var ts;
switch (node.kind) {
case 70:
return node;
- case 141:
+ case 142:
do {
node = node.left;
} while (node.kind !== 70);
return node;
- case 177:
+ case 178:
do {
node = node.expression;
} while (node.kind !== 70);
@@ -35329,9 +38027,9 @@ var ts;
error(moduleName, ts.Diagnostics.String_literal_expected);
return false;
}
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
- error(moduleName, node.kind === 241 ?
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule) {
+ error(moduleName, node.kind === 243 ?
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
return false;
@@ -35352,7 +38050,7 @@ var ts;
(symbol.flags & 793064 ? 793064 : 0) |
(symbol.flags & 1920 ? 1920 : 0);
if (target.flags & excludedMeanings) {
- var message = node.kind === 243 ?
+ var message = node.kind === 245 ?
ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
@@ -35379,7 +38077,7 @@ var ts;
checkImportBinding(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237) {
+ if (importClause.namedBindings.kind === 239) {
checkImportBinding(importClause.namedBindings);
}
else {
@@ -35430,8 +38128,10 @@ var ts;
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
ts.forEach(node.exportClause.elements, checkExportSpecifier);
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
+ !node.moduleSpecifier && ts.isInAmbientContext(node);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
}
}
@@ -35444,7 +38144,7 @@ var ts;
}
}
function checkGrammarModuleElementContext(node, errorMessage) {
- var isInAppropriateContext = node.parent.kind === 261 || node.parent.kind === 231 || node.parent.kind === 230;
+ var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232;
if (!isInAppropriateContext) {
grammarErrorOnFirstToken(node, errorMessage);
}
@@ -35467,9 +38167,14 @@ var ts;
if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) {
return;
}
- var container = node.parent.kind === 261 ? node.parent : node.parent.parent;
- if (container.kind === 230 && !ts.isAmbientModule(container)) {
- error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ var container = node.parent.kind === 264 ? node.parent : node.parent.parent;
+ if (container.kind === 232 && !ts.isAmbientModule(container)) {
+ if (node.isExportEquals) {
+ error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ }
+ else {
+ error(node, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
+ }
return;
}
if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) {
@@ -35492,18 +38197,13 @@ var ts;
}
}
function hasExportedMembers(moduleSymbol) {
- for (var id in moduleSymbol.exports) {
- if (id !== "export=") {
- return true;
- }
- }
- return false;
+ return ts.forEachEntry(moduleSymbol.exports, function (_, id) { return id !== "export="; });
}
function checkExternalModuleExports(node) {
var moduleSymbol = getSymbolOfNode(node);
var links = getSymbolLinks(moduleSymbol);
if (!links.exportsChecked) {
- var exportEqualsSymbol = moduleSymbol.exports["export="];
+ var exportEqualsSymbol = moduleSymbol.exports.get("export=");
if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
if (!isTopLevelInExternalModuleAugmentation(declaration)) {
@@ -35511,31 +38211,31 @@ var ts;
}
}
var exports_1 = getExportsOfModule(moduleSymbol);
- for (var id in exports_1) {
+ exports_1 && exports_1.forEach(function (_a, id) {
+ var declarations = _a.declarations, flags = _a.flags;
if (id === "__export") {
- continue;
+ return;
}
- var _a = exports_1[id], declarations = _a.declarations, flags = _a.flags;
if (flags & (1920 | 64 | 384)) {
- continue;
+ return;
}
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload);
if (flags & 524288 && exportedDeclarationsCount <= 2) {
- continue;
+ return;
}
if (exportedDeclarationsCount > 1) {
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
- var declaration = declarations_6[_i];
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+ var declaration = declarations_9[_i];
if (isNotOverload(declaration)) {
diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id));
}
}
}
- }
+ });
links.exportsChecked = true;
}
function isNotOverload(declaration) {
- return (declaration.kind !== 225 && declaration.kind !== 149) ||
+ return (declaration.kind !== 227 && declaration.kind !== 150) ||
!!declaration.body;
}
}
@@ -35546,123 +38246,123 @@ var ts;
var kind = node.kind;
if (cancellationToken) {
switch (kind) {
- case 230:
- case 226:
+ case 232:
+ case 228:
+ case 229:
case 227:
- case 225:
cancellationToken.throwIfCancellationRequested();
}
}
switch (kind) {
- case 143:
- return checkTypeParameter(node);
case 144:
+ return checkTypeParameter(node);
+ case 145:
return checkParameter(node);
+ case 148:
case 147:
- case 146:
return checkPropertyDeclaration(node);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
- return checkSignatureDeclaration(node);
case 155:
return checkSignatureDeclaration(node);
+ case 156:
+ return checkSignatureDeclaration(node);
+ case 150:
case 149:
- case 148:
return checkMethodDeclaration(node);
- case 150:
- return checkConstructorDeclaration(node);
case 151:
+ return checkConstructorDeclaration(node);
case 152:
+ case 153:
return checkAccessorDeclaration(node);
- case 157:
+ case 158:
return checkTypeReferenceNode(node);
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 160:
- return checkTypeQuery(node);
case 161:
- return checkTypeLiteral(node);
+ return checkTypeQuery(node);
case 162:
- return checkArrayType(node);
+ return checkTypeLiteral(node);
case 163:
- return checkTupleType(node);
+ return checkArrayType(node);
case 164:
+ return checkTupleType(node);
case 165:
- return checkUnionOrIntersectionType(node);
case 166:
- case 168:
- return checkSourceElement(node.type);
+ return checkUnionOrIntersectionType(node);
+ case 167:
case 169:
- return checkIndexedAccessType(node);
+ return checkSourceElement(node.type);
case 170:
+ return checkIndexedAccessType(node);
+ case 171:
return checkMappedType(node);
- case 225:
+ case 227:
return checkFunctionDeclaration(node);
- case 204:
- case 231:
+ case 206:
+ case 233:
return checkBlock(node);
- case 205:
- return checkVariableStatement(node);
case 207:
- return checkExpressionStatement(node);
- case 208:
- return checkIfStatement(node);
+ return checkVariableStatement(node);
case 209:
- return checkDoStatement(node);
+ return checkExpressionStatement(node);
case 210:
- return checkWhileStatement(node);
+ return checkIfStatement(node);
case 211:
- return checkForStatement(node);
+ return checkDoStatement(node);
case 212:
- return checkForInStatement(node);
+ return checkWhileStatement(node);
case 213:
- return checkForOfStatement(node);
+ return checkForStatement(node);
case 214:
+ return checkForInStatement(node);
case 215:
- return checkBreakOrContinueStatement(node);
+ return checkForOfStatement(node);
case 216:
- return checkReturnStatement(node);
case 217:
- return checkWithStatement(node);
+ return checkBreakOrContinueStatement(node);
case 218:
- return checkSwitchStatement(node);
+ return checkReturnStatement(node);
case 219:
- return checkLabeledStatement(node);
+ return checkWithStatement(node);
case 220:
- return checkThrowStatement(node);
+ return checkSwitchStatement(node);
case 221:
- return checkTryStatement(node);
+ return checkLabeledStatement(node);
+ case 222:
+ return checkThrowStatement(node);
case 223:
+ return checkTryStatement(node);
+ case 225:
return checkVariableDeclaration(node);
- case 174:
+ case 175:
return checkBindingElement(node);
- case 226:
+ case 228:
return checkClassDeclaration(node);
- case 227:
+ case 229:
return checkInterfaceDeclaration(node);
- case 228:
+ case 230:
return checkTypeAliasDeclaration(node);
- case 229:
+ case 231:
return checkEnumDeclaration(node);
- case 230:
+ case 232:
return checkModuleDeclaration(node);
- case 235:
+ case 237:
return checkImportDeclaration(node);
- case 234:
+ case 236:
return checkImportEqualsDeclaration(node);
- case 241:
+ case 243:
return checkExportDeclaration(node);
- case 240:
+ case 242:
return checkExportAssignment(node);
- case 206:
+ case 208:
checkGrammarStatementInAmbientContext(node);
return;
- case 222:
+ case 224:
checkGrammarStatementInAmbientContext(node);
return;
- case 244:
+ case 246:
return checkMissingDeclaration(node);
}
}
@@ -35675,17 +38375,17 @@ var ts;
for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) {
var node = deferredNodes_1[_i];
switch (node.kind) {
- case 184:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
break;
- case 151:
case 152:
- checkAccessorDeferred(node);
+ case 153:
+ checkAccessorDeclaration(node);
break;
- case 197:
+ case 198:
checkClassExpressionDeferred(node);
break;
}
@@ -35705,6 +38405,7 @@ var ts;
}
checkGrammarSourceFile(node);
potentialThisCollisions.length = 0;
+ potentialNewTargetCollisions.length = 0;
deferredNodes = [];
deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined;
ts.forEach(node.statements, checkSourceElement);
@@ -35724,6 +38425,10 @@ var ts;
ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
potentialThisCollisions.length = 0;
}
+ if (potentialNewTargetCollisions.length) {
+ ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
+ potentialNewTargetCollisions.length = 0;
+ }
links.flags |= 1;
}
}
@@ -35768,7 +38473,7 @@ var ts;
function isInsideWithStatementBody(node) {
if (node) {
while (node.parent) {
- if (node.parent.kind === 217 && node.parent.statement === node) {
+ if (node.parent.kind === 219 && node.parent.statement === node) {
return true;
}
node = node.parent;
@@ -35777,11 +38482,11 @@ var ts;
return false;
}
function getSymbolsInScope(location, meaning) {
- var symbols = ts.createMap();
- var memberFlags = 0;
if (isInsideWithStatementBody(location)) {
return [];
}
+ var symbols = ts.createMap();
+ var memberFlags = 0;
populateSymbols();
return symbolsToArray(symbols);
function populateSymbols() {
@@ -35790,28 +38495,28 @@ var ts;
copySymbols(location.locals, meaning);
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
+ case 232:
copySymbols(getSymbolOfNode(location).exports, meaning & 8914931);
break;
- case 229:
+ case 231:
copySymbols(getSymbolOfNode(location).exports, meaning & 8);
break;
- case 197:
+ case 198:
var className = location.name;
if (className) {
copySymbol(location.symbol, meaning);
}
- case 226:
- case 227:
+ case 228:
+ case 229:
if (!(memberFlags & 32)) {
copySymbols(getSymbolOfNode(location).members, meaning & 793064);
}
break;
- case 184:
+ case 185:
var funcName = location.name;
if (funcName) {
copySymbol(location.symbol, meaning);
@@ -35829,17 +38534,16 @@ var ts;
function copySymbol(symbol, meaning) {
if (symbol.flags & meaning) {
var id = symbol.name;
- if (!symbols[id]) {
- symbols[id] = symbol;
+ if (!symbols.has(id)) {
+ symbols.set(id, symbol);
}
}
}
function copySymbols(source, meaning) {
if (meaning) {
- for (var id in source) {
- var symbol = source[id];
+ source.forEach(function (symbol) {
copySymbol(symbol, meaning);
- }
+ });
}
}
}
@@ -35850,27 +38554,27 @@ var ts;
}
function isTypeDeclaration(node) {
switch (node.kind) {
- case 143:
- case 226:
- case 227:
+ case 144:
case 228:
case 229:
+ case 230:
+ case 231:
return true;
}
}
function isTypeReferenceIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 141) {
+ while (node.parent && node.parent.kind === 142) {
node = node.parent;
}
- return node.parent && (node.parent.kind === 157 || node.parent.kind === 272);
+ return node.parent && (node.parent.kind === 158 || node.parent.kind === 276);
}
function isHeritageClauseElementIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 177) {
+ while (node.parent && node.parent.kind === 178) {
node = node.parent;
}
- return node.parent && node.parent.kind === 199;
+ return node.parent && node.parent.kind === 200;
}
function forEachEnclosingClass(node, callback) {
var result;
@@ -35887,13 +38591,13 @@ var ts;
return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
}
function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
- while (nodeOnRightSide.parent.kind === 141) {
+ while (nodeOnRightSide.parent.kind === 142) {
nodeOnRightSide = nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 234) {
+ if (nodeOnRightSide.parent.kind === 236) {
return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 240) {
+ if (nodeOnRightSide.parent.kind === 242) {
return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
}
return undefined;
@@ -35901,27 +38605,35 @@ var ts;
function isInRightSideOfImportOrExportAssignment(node) {
return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
}
+ function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {
+ var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
+ switch (specialPropertyAssignmentKind) {
+ case 1:
+ case 3:
+ return getSymbolOfNode(entityName.parent);
+ case 4:
+ case 2:
+ case 5:
+ return getSymbolOfNode(entityName.parent.parent);
+ }
+ }
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
if (ts.isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
}
- if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 177) {
- var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
- switch (specialPropertyAssignmentKind) {
- case 1:
- case 3:
- return getSymbolOfNode(entityName.parent);
- case 4:
- case 2:
- return getSymbolOfNode(entityName.parent.parent);
- default:
+ if (ts.isInJavaScriptFile(entityName) &&
+ entityName.parent.kind === 178 &&
+ entityName.parent === entityName.parent.parent.left) {
+ var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
+ if (specialPropertyAssignmentSymbol) {
+ return specialPropertyAssignmentSymbol;
}
}
- if (entityName.parent.kind === 240 && ts.isEntityNameExpression(entityName)) {
+ if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) {
return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608);
}
- if (entityName.kind !== 177 && isInRightSideOfImportOrExportAssignment(entityName)) {
- var importEqualsDeclaration = ts.getAncestor(entityName, 234);
+ if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) {
+ var importEqualsDeclaration = ts.getAncestor(entityName, 236);
ts.Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true);
}
@@ -35930,7 +38642,7 @@ var ts;
}
if (isHeritageClauseElementIdentifier(entityName)) {
var meaning = 0;
- if (entityName.parent.kind === 199) {
+ if (entityName.parent.kind === 200) {
meaning = 793064;
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning |= 107455;
@@ -35940,9 +38652,12 @@ var ts;
meaning = 1920;
}
meaning |= 8388608;
- return resolveEntityName(entityName, meaning);
+ var entityNameSymbol = resolveEntityName(entityName, meaning);
+ if (entityNameSymbol) {
+ return entityNameSymbol;
+ }
}
- else if (ts.isPartOfExpression(entityName)) {
+ if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
}
@@ -35952,14 +38667,14 @@ var ts;
}
return resolveEntityName(entityName, 107455, false, true);
}
- else if (entityName.kind === 177) {
+ else if (entityName.kind === 178) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkPropertyAccessExpression(entityName);
}
return getNodeLinks(entityName).resolvedSymbol;
}
- else if (entityName.kind === 141) {
+ else if (entityName.kind === 142) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkQualifiedName(entityName);
@@ -35968,19 +38683,19 @@ var ts;
}
}
else if (isTypeReferenceIdentifier(entityName)) {
- var meaning = (entityName.parent.kind === 157 || entityName.parent.kind === 272) ? 793064 : 1920;
+ var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920;
return resolveEntityName(entityName, meaning, false, true);
}
- else if (entityName.parent.kind === 250) {
+ else if (entityName.parent.kind === 252) {
return getJsxAttributePropertySymbol(entityName.parent);
}
- if (entityName.parent.kind === 156) {
+ if (entityName.parent.kind === 157) {
return resolveEntityName(entityName, 1);
}
return undefined;
}
function getSymbolAtLocation(node) {
- if (node.kind === 261) {
+ if (node.kind === 264) {
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
}
if (isInsideWithStatementBody(node)) {
@@ -35996,8 +38711,8 @@ var ts;
if (isInRightSideOfImportOrExportAssignment(node)) {
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
}
- else if (node.parent.kind === 174 &&
- node.parent.parent.kind === 172 &&
+ else if (node.parent.kind === 175 &&
+ node.parent.parent.kind === 173 &&
node === node.parent.propertyName) {
var typeOfPattern = getTypeOfNode(node.parent.parent);
var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text);
@@ -36008,8 +38723,8 @@ var ts;
}
switch (node.kind) {
case 70:
- case 177:
- case 141:
+ case 178:
+ case 142:
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
case 98:
var container = ts.getThisContainer(node, false);
@@ -36022,18 +38737,18 @@ var ts;
case 96:
var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node);
return type.symbol;
- case 167:
+ case 168:
return getTypeFromTypeNode(node).symbol;
case 122:
var constructorDeclaration = node.parent;
- if (constructorDeclaration && constructorDeclaration.kind === 150) {
+ if (constructorDeclaration && constructorDeclaration.kind === 151) {
return constructorDeclaration.parent.symbol;
}
return undefined;
case 9:
if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 235 || node.parent.kind === 241) &&
+ ((node.parent.kind === 237 || node.parent.kind === 243) &&
node.parent.moduleSpecifier === node)) {
return resolveExternalModuleName(node, node);
}
@@ -36041,7 +38756,7 @@ var ts;
return resolveExternalModuleName(node, node);
}
case 8:
- if (node.parent.kind === 178 && node.parent.argumentExpression === node) {
+ if (node.parent.kind === 179 && node.parent.argumentExpression === node) {
var objectType = getTypeOfExpression(node.parent.expression);
if (objectType === unknownType)
return undefined;
@@ -36055,7 +38770,7 @@ var ts;
return undefined;
}
function getShorthandAssignmentValueSymbol(location) {
- if (location && location.kind === 258) {
+ if (location && location.kind === 261) {
return resolveEntityName(location.name, 107455 | 8388608);
}
return undefined;
@@ -36070,13 +38785,22 @@ var ts;
return unknownType;
}
if (ts.isPartOfTypeNode(node)) {
- return getTypeFromTypeNode(node);
+ var typeFromTypeNode = getTypeFromTypeNode(node);
+ if (typeFromTypeNode && ts.isExpressionWithTypeArgumentsInClassImplementsClause(node)) {
+ var containingClass = ts.getContainingClass(node);
+ var classType = getTypeOfNode(containingClass);
+ typeFromTypeNode = getTypeWithThisArgument(typeFromTypeNode, classType.thisType);
+ }
+ return typeFromTypeNode;
}
if (ts.isPartOfExpression(node)) {
return getRegularTypeOfExpression(node);
}
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(node)) {
- return getBaseTypes(getDeclaredTypeOfSymbol(getSymbolOfNode(node.parent.parent)))[0];
+ var classNode = ts.getContainingClass(node);
+ var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(classNode));
+ var baseType = getBaseTypes(classType)[0];
+ return baseType && getTypeWithThisArgument(baseType, classType.thisType);
}
if (isTypeDeclaration(node)) {
var symbol = getSymbolOfNode(node);
@@ -36105,22 +38829,22 @@ var ts;
return unknownType;
}
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) {
- ts.Debug.assert(expr.kind === 176 || expr.kind === 175);
- if (expr.parent.kind === 213) {
- var iteratedType = checkRightHandSideOfForOf(expr.parent.expression);
+ ts.Debug.assert(expr.kind === 177 || expr.kind === 176);
+ if (expr.parent.kind === 215) {
+ var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 192) {
+ if (expr.parent.kind === 193) {
var iteratedType = getTypeOfExpression(expr.parent.right);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 257) {
+ if (expr.parent.kind === 260) {
var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent);
return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent);
}
- ts.Debug.assert(expr.parent.kind === 175);
+ ts.Debug.assert(expr.parent.kind === 176);
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType;
return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType);
}
function getPropertySymbolOfDestructuringAssignment(location) {
@@ -36144,29 +38868,32 @@ var ts;
var propsByName = createSymbolTable(getPropertiesOfType(type));
if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) {
ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
- if (!propsByName[p.name]) {
- propsByName[p.name] = p;
+ if (!propsByName.has(p.name)) {
+ propsByName.set(p.name, p);
}
});
}
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (symbol.flags & 268435456) {
+ if (getCheckFlags(symbol) & 6) {
var symbols_3 = [];
- var name_28 = symbol.name;
+ var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
- var symbol = getPropertyOfType(t, name_28);
+ var symbol = getPropertyOfType(t, name_2);
if (symbol) {
symbols_3.push(symbol);
}
});
return symbols_3;
}
- else if (symbol.flags & 67108864) {
+ else if (symbol.flags & 134217728) {
if (symbol.leftSpread) {
var links = symbol;
- return [links.leftSpread, links.rightSpread];
+ return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ }
+ if (symbol.syntheticOrigin) {
+ return getRootSymbols(symbol.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -36183,7 +38910,8 @@ var ts;
if (!ts.isGeneratedIdentifier(node)) {
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
- return getReferencedValueSymbol(node) === argumentsSymbol;
+ var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node;
+ return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol;
}
}
return false;
@@ -36199,7 +38927,7 @@ var ts;
if (symbolLinks.exportsSomeValue === undefined) {
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & 107455)
- : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue);
+ : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s) {
@@ -36223,19 +38951,15 @@ var ts;
}
symbol = exportSymbol;
}
- var parentSymbol = getParentOfSymbol(symbol);
- if (parentSymbol) {
- if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 261) {
- var symbolFile = parentSymbol.valueDeclaration;
+ var parentSymbol_1 = getParentOfSymbol(symbol);
+ if (parentSymbol_1) {
+ if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) {
+ var symbolFile = parentSymbol_1.valueDeclaration;
var referenceFile = ts.getSourceFileOfNode(node);
var symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
- for (var n = node.parent; n; n = n.parent) {
- if (ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
- return n;
- }
- }
+ return ts.findAncestor(node.parent, function (n) { return ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol_1; });
}
}
}
@@ -36263,7 +38987,7 @@ var ts;
else if (nodeLinks_1.flags & 131072) {
var isDeclaredInLoop = nodeLinks_1.flags & 262144;
var inLoopInitializer = ts.isIterationStatement(container, false);
- var inLoopBodyBlock = container.kind === 204 && ts.isIterationStatement(container.parent, false);
+ var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false);
links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
}
else {
@@ -36298,21 +39022,17 @@ var ts;
return false;
}
function isValueAliasDeclaration(node) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
switch (node.kind) {
- case 234:
case 236:
- case 237:
+ case 238:
case 239:
- case 243:
- return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
case 241:
+ case 245:
+ return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
+ case 243:
var exportClause = node.exportClause;
return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
- case 240:
+ case 242:
return node.expression
&& node.expression.kind === 70
? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol)
@@ -36322,7 +39042,7 @@ var ts;
}
function isTopLevelValueImportEqualsWithEntityName(node) {
node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration);
- if (node === undefined || node.parent.kind !== 261 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+ if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
return false;
}
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
@@ -36340,10 +39060,6 @@ var ts;
return isConstEnumSymbol(s) || s.constEnumOnlyModule;
}
function isReferencedAliasDeclaration(node, checkChildren) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
if (ts.isAliasSymbolDeclaration(node)) {
var symbol = getSymbolOfNode(node);
if (symbol && getSymbolLinks(symbol).referenced) {
@@ -36364,16 +39080,30 @@ var ts;
}
return false;
}
+ function isRequiredInitializedParameter(parameter) {
+ return strictNullChecks &&
+ !isOptionalParameter(parameter) &&
+ parameter.initializer &&
+ !(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
- node = ts.getParseTreeNode(node);
- return node ? getNodeLinks(node).flags : undefined;
+ return getNodeLinks(node).flags;
}
function getEnumMemberValue(node) {
computeEnumMemberValues(node.parent);
return getNodeLinks(node).enumMemberValue;
}
+ function canHaveConstantValue(node) {
+ switch (node.kind) {
+ case 263:
+ case 178:
+ case 179:
+ return true;
+ }
+ return false;
+ }
function getConstantValue(node) {
- if (node.kind === 260) {
+ if (node.kind === 263) {
return getEnumMemberValue(node);
}
var symbol = getNodeLinks(node).resolvedSymbol;
@@ -36389,15 +39119,17 @@ var ts;
}
function getTypeReferenceSerializationKind(typeName, location) {
var valueSymbol = resolveEntityName(typeName, 107455, true, false, location);
- var globalPromiseSymbol = tryGetGlobalPromiseConstructorSymbol();
- if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
- return ts.TypeReferenceSerializationKind.Promise;
- }
- var constructorType = valueSymbol ? getTypeOfSymbol(valueSymbol) : undefined;
- if (constructorType && isConstructorType(constructorType)) {
- return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
- }
var typeSymbol = resolveEntityName(typeName, 793064, true, false, location);
+ if (valueSymbol && valueSymbol === typeSymbol) {
+ var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(false);
+ if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
+ return ts.TypeReferenceSerializationKind.Promise;
+ }
+ var constructorType = getTypeOfSymbol(valueSymbol);
+ if (constructorType && isConstructorType(constructorType)) {
+ return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
+ }
+ }
if (!typeSymbol) {
return ts.TypeReferenceSerializationKind.ObjectType;
}
@@ -36441,6 +39173,9 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
+ if (flags & 4096) {
+ type = includeFalsyTypes(type, 2048);
+ }
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
@@ -36455,10 +39190,13 @@ var ts;
var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node));
resolveBaseTypesOfClass(classType);
var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType;
+ if (!baseType.symbol) {
+ writer.reportIllegalExtends();
+ }
getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags);
}
function hasGlobalName(name) {
- return !!globals[name];
+ return globals.has(name);
}
function getReferencedValueSymbol(reference, startInDeclarationContainer) {
var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
@@ -36467,9 +39205,9 @@ var ts;
}
var location = reference;
if (startInDeclarationContainer) {
- var parent_11 = reference.parent;
- if (ts.isDeclaration(parent_11) && reference === parent_11.name) {
- location = getDeclarationContainer(parent_11);
+ var parent = reference.parent;
+ if (ts.isDeclaration(parent) && reference === parent.name) {
+ location = getDeclarationContainer(parent);
}
}
return resolveName(location, reference.text, 107455 | 1048576 | 8388608, undefined, undefined);
@@ -36502,34 +39240,46 @@ var ts;
var fileToDirective;
if (resolvedTypeReferenceDirectives) {
fileToDirective = ts.createFileMap();
- for (var key in resolvedTypeReferenceDirectives) {
- var resolvedDirective = resolvedTypeReferenceDirectives[key];
+ resolvedTypeReferenceDirectives.forEach(function (resolvedDirective, key) {
if (!resolvedDirective) {
- continue;
+ return;
}
var file = host.getSourceFile(resolvedDirective.resolvedFileName);
fileToDirective.set(file.path, key);
- }
+ });
}
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedDeclarationWithCollidingName: getReferencedDeclarationWithCollidingName,
isDeclarationWithCollidingName: isDeclarationWithCollidingName,
- isValueAliasDeclaration: isValueAliasDeclaration,
+ isValueAliasDeclaration: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? isValueAliasDeclaration(node) : true;
+ },
hasGlobalName: hasGlobalName,
- isReferencedAliasDeclaration: isReferencedAliasDeclaration,
- getNodeCheckFlags: getNodeCheckFlags,
+ isReferencedAliasDeclaration: function (node, checkChildren) {
+ node = ts.getParseTreeNode(node);
+ return node ? isReferencedAliasDeclaration(node, checkChildren) : true;
+ },
+ getNodeCheckFlags: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getNodeCheckFlags(node) : undefined;
+ },
isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
+ isRequiredInitializedParameter: isRequiredInitializedParameter,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
- getConstantValue: getConstantValue,
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
collectLinkedAliases: collectLinkedAliases,
getReferencedValueDeclaration: getReferencedValueDeclaration,
getTypeReferenceSerializationKind: getTypeReferenceSerializationKind,
@@ -36547,7 +39297,7 @@ var ts;
if (!fileToDirective) {
return undefined;
}
- var meaning = (node.kind === 177) || (node.kind === 70 && isInTypeQuery(node))
+ var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node))
? 107455 | 1048576
: 793064 | 1920;
var symbol = resolveEntityName(node, meaning, true);
@@ -36582,15 +39332,15 @@ var ts;
}
var current = symbol;
while (true) {
- var parent_12 = getParentOfSymbol(current);
- if (parent_12) {
- current = parent_12;
+ var parent = getParentOfSymbol(current);
+ if (parent) {
+ current = parent;
}
else {
break;
}
}
- if (current.valueDeclaration && current.valueDeclaration.kind === 261 && current.flags & 512) {
+ if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) {
return false;
}
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
@@ -36609,7 +39359,7 @@ var ts;
if (!moduleSymbol) {
return undefined;
}
- return ts.getDeclarationOfKind(moduleSymbol, 261);
+ return ts.getDeclarationOfKind(moduleSymbol, 264);
}
function initializeTypeChecker() {
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
@@ -36617,8 +39367,6 @@ var ts;
ts.bindSourceFile(file, compilerOptions);
}
var augmentations;
- var requestedExternalEmitHelpers = 0;
- var firstFileRequestingExternalHelpers;
for (var _b = 0, _c = host.getSourceFiles(); _b < _c.length; _b++) {
var file = _c[_b];
if (!ts.isExternalOrCommonJsModule(file)) {
@@ -36632,20 +39380,11 @@ var ts;
}
if (file.symbol && file.symbol.globalExports) {
var source = file.symbol.globalExports;
- for (var id in source) {
- if (!(id in globals)) {
- globals[id] = source[id];
+ source.forEach(function (sourceSymbol, id) {
+ if (!globals.has(id)) {
+ globals.set(id, sourceSymbol);
}
- }
- }
- if ((compilerOptions.isolatedModules || ts.isExternalModule(file)) && !file.isDeclarationFile) {
- var fileRequestedExternalEmitHelpers = file.flags & 64512;
- if (fileRequestedExternalEmitHelpers) {
- requestedExternalEmitHelpers |= fileRequestedExternalEmitHelpers;
- if (firstFileRequestingExternalHelpers === undefined) {
- firstFileRequestingExternalHelpers = file;
- }
- }
+ });
}
}
if (augmentations) {
@@ -36659,116 +39398,80 @@ var ts;
}
addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
- getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
+ getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments", 0, true);
getSymbolLinks(unknownSymbol).type = unknownType;
- globalArrayType = getGlobalType("Array", 1);
- globalObjectType = getGlobalType("Object");
- globalFunctionType = getGlobalType("Function");
- globalStringType = getGlobalType("String");
- globalNumberType = getGlobalType("Number");
- globalBooleanType = getGlobalType("Boolean");
- globalRegExpType = getGlobalType("RegExp");
- jsxElementType = getExportedTypeFromNamespace("JSX", JsxNames.Element);
- getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
- getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
- getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
- getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
- getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", 1); });
- getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); });
- getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", 1); });
- tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064, undefined) && getGlobalPromiseType(); });
- getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", 1); });
- getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType);
- getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); });
- tryGetGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalSymbol("Promise", 107455, undefined) && getGlobalPromiseConstructorSymbol(); });
- getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); });
- getGlobalThenableType = ts.memoize(createThenableType);
- getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); });
- if (languageVersion >= 2) {
- getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); });
- getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", 1); });
- getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", 1); });
- getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", 1); });
- }
- else {
- getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; });
- getGlobalIterableType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; });
- }
+ globalArrayType = getGlobalType("Array", 1, true);
+ globalObjectType = getGlobalType("Object", 0, true);
+ globalFunctionType = getGlobalType("Function", 0, true);
+ globalStringType = getGlobalType("String", 0, true);
+ globalNumberType = getGlobalType("Number", 0, true);
+ globalBooleanType = getGlobalType("Boolean", 0, true);
+ globalRegExpType = getGlobalType("RegExp", 0, true);
anyArrayType = createArrayType(anyType);
autoArrayType = createArrayType(autoType);
- var symbol = getGlobalSymbol("ReadonlyArray", 793064, undefined);
- globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, 1);
+ globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", 1);
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
- if (compilerOptions.importHelpers && firstFileRequestingExternalHelpers) {
- var helpersModule = resolveExternalModule(firstFileRequestingExternalHelpers, ts.externalHelpersModuleNameText, ts.Diagnostics.Cannot_find_module_0, undefined);
- if (helpersModule) {
- var exports_2 = helpersModule.exports;
- if (requestedExternalEmitHelpers & 1024 && languageVersion < 2) {
- verifyHelperSymbol(exports_2, "__extends", 107455);
- }
- if (requestedExternalEmitHelpers & 16384 &&
- (languageVersion < 5 || compilerOptions.jsx === 2)) {
- verifyHelperSymbol(exports_2, "__assign", 107455);
- }
- if (languageVersion < 5 && requestedExternalEmitHelpers & 32768) {
- verifyHelperSymbol(exports_2, "__rest", 107455);
- }
- if (requestedExternalEmitHelpers & 2048) {
- verifyHelperSymbol(exports_2, "__decorate", 107455);
- if (compilerOptions.emitDecoratorMetadata) {
- verifyHelperSymbol(exports_2, "__metadata", 107455);
- }
- }
- if (requestedExternalEmitHelpers & 4096) {
- verifyHelperSymbol(exports_2, "__param", 107455);
- }
- if (requestedExternalEmitHelpers & 8192) {
- verifyHelperSymbol(exports_2, "__awaiter", 107455);
- if (languageVersion < 2) {
- verifyHelperSymbol(exports_2, "__generator", 107455);
+ globalThisType = getGlobalTypeOrUndefined("ThisType", 1);
+ }
+ function checkExternalEmitHelpers(location, helpers) {
+ if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
+ var sourceFile = ts.getSourceFileOfNode(location);
+ if (ts.isEffectiveExternalModule(sourceFile, compilerOptions) && !ts.isInAmbientContext(location)) {
+ var helpersModule = resolveHelpersModule(sourceFile, location);
+ if (helpersModule !== unknownSymbol) {
+ var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
+ for (var helper = 1; helper <= 8192; helper <<= 1) {
+ if (uncheckedHelpers & helper) {
+ var name = getHelperName(helper);
+ var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
+ if (!symbol) {
+ error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ }
+ }
}
}
+ requestedExternalEmitHelpers |= helpers;
}
}
}
- function verifyHelperSymbol(symbols, name, meaning) {
- var symbol = getSymbol(symbols, ts.escapeIdentifier(name), meaning);
- if (!symbol) {
- error(undefined, ts.Diagnostics.Module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ function getHelperName(helper) {
+ switch (helper) {
+ case 1: return "__extends";
+ case 2: return "__assign";
+ case 4: return "__rest";
+ case 8: return "__decorate";
+ case 16: return "__metadata";
+ case 32: return "__param";
+ case 64: return "__awaiter";
+ case 128: return "__generator";
+ case 256: return "__values";
+ case 512: return "__read";
+ case 1024: return "__spread";
+ case 2048: return "__asyncGenerator";
+ case 4096: return "__asyncDelegator";
+ case 8192: return "__asyncValues";
+ default: ts.Debug.fail("Unrecognized helper.");
}
}
- function createInstantiatedPromiseLikeType() {
- var promiseLikeType = getGlobalPromiseLikeType();
- if (promiseLikeType !== emptyGenericType) {
- return createTypeReference(promiseLikeType, [anyType]);
+ function resolveHelpersModule(node, errorNode) {
+ if (!externalHelpersModule) {
+ externalHelpersModule = resolveExternalModule(node, ts.externalHelpersModuleNameText, ts.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;
}
- return emptyObjectType;
- }
- function createThenableType() {
- var thenPropertySymbol = createSymbol(67108864 | 4, "then");
- getSymbolLinks(thenPropertySymbol).type = globalFunctionType;
- var thenableType = createObjectType(16);
- thenableType.properties = [thenPropertySymbol];
- thenableType.members = createSymbolTable(thenableType.properties);
- thenableType.callSignatures = [];
- thenableType.constructSignatures = [];
- return thenableType;
+ return externalHelpersModule;
}
function checkGrammarDecorators(node) {
if (!node.decorators) {
return false;
}
if (!ts.nodeCanBeDecorated(node)) {
- if (node.kind === 149 && !ts.nodeIsPresent(node.body)) {
+ if (node.kind === 150 && !ts.nodeIsPresent(node.body)) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
}
else {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
}
}
- else if (node.kind === 151 || node.kind === 152) {
+ else if (node.kind === 152 || node.kind === 153) {
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -36786,16 +39489,16 @@ var ts;
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
var modifier = _a[_i];
if (modifier.kind !== 130) {
- if (node.kind === 146 || node.kind === 148) {
+ if (node.kind === 147 || node.kind === 149) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
}
- if (node.kind === 155) {
+ if (node.kind === 156) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
}
}
switch (modifier.kind) {
case 75:
- if (node.kind !== 229 && node.parent.kind === 226) {
+ if (node.kind !== 231 && node.parent.kind === 228) {
return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75));
}
break;
@@ -36821,7 +39524,7 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
}
else if (flags & 128) {
@@ -36844,10 +39547,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
}
else if (flags & 128) {
@@ -36860,7 +39563,7 @@ var ts;
if (flags & 64) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
}
- else if (node.kind !== 147 && node.kind !== 146 && node.kind !== 155 && node.kind !== 144) {
+ else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
flags |= 64;
@@ -36879,10 +39582,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
}
flags |= 1;
@@ -36894,13 +39597,13 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
}
- else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 231) {
+ else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) {
return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
}
flags |= 2;
@@ -36910,14 +39613,14 @@ var ts;
if (flags & 128) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
}
- if (node.kind !== 226) {
- if (node.kind !== 149 &&
- node.kind !== 147 &&
- node.kind !== 151 &&
- node.kind !== 152) {
+ if (node.kind !== 228) {
+ if (node.kind !== 150 &&
+ node.kind !== 148 &&
+ node.kind !== 152 &&
+ node.kind !== 153) {
return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
}
- if (!(node.parent.kind === 226 && ts.getModifierFlags(node.parent) & 128)) {
+ if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) {
return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
}
if (flags & 32) {
@@ -36936,7 +39639,7 @@ var ts;
else if (flags & 2 || ts.isInAmbientContext(node.parent)) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
}
flags |= 256;
@@ -36944,7 +39647,7 @@ var ts;
break;
}
}
- if (node.kind === 150) {
+ if (node.kind === 151) {
if (flags & 32) {
return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
@@ -36959,13 +39662,13 @@ var ts;
}
return;
}
- else if ((node.kind === 235 || node.kind === 234) && flags & 2) {
+ else if ((node.kind === 237 || node.kind === 236) && flags & 2) {
return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
}
- else if (node.kind === 144 && (flags & 92) && ts.isBindingPattern(node.name)) {
+ else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
}
- else if (node.kind === 144 && (flags & 92) && node.dotDotDotToken) {
+ else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
}
if (flags & 256) {
@@ -36981,37 +39684,37 @@ var ts;
}
function shouldReportBadModifier(node) {
switch (node.kind) {
- case 151:
case 152:
- case 150:
+ case 153:
+ case 151:
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 155:
- case 230:
- case 235:
- case 234:
- case 241:
- case 240:
- case 184:
+ case 156:
+ case 232:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
case 185:
- case 144:
+ case 186:
+ case 145:
return false;
default:
- if (node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 233 || node.parent.kind === 264) {
return false;
}
switch (node.kind) {
- case 225:
- return nodeHasAnyModifiersExcept(node, 119);
- case 226:
- return nodeHasAnyModifiersExcept(node, 116);
case 227:
- case 205:
+ return nodeHasAnyModifiersExcept(node, 119);
case 228:
- return true;
+ return nodeHasAnyModifiersExcept(node, 116);
case 229:
+ case 207:
+ case 230:
+ return true;
+ case 231:
return nodeHasAnyModifiersExcept(node, 75);
default:
ts.Debug.fail();
@@ -37024,14 +39727,11 @@ var ts;
}
function checkGrammarAsyncModifier(node, asyncModifier) {
switch (node.kind) {
- case 149:
- case 225:
- case 184:
+ case 150:
+ case 227:
case 185:
- if (!node.asteriskToken) {
- return false;
- }
- break;
+ case 186:
+ return false;
}
return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
}
@@ -37088,8 +39788,12 @@ var ts;
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) ||
checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
}
+ function checkGrammarClassLikeDeclaration(node) {
+ var file = ts.getSourceFileOfNode(node);
+ return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);
+ }
function checkGrammarArrowFunction(node, file) {
- if (node.kind === 185) {
+ if (node.kind === 186) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
@@ -37124,7 +39828,7 @@ var ts;
if (!parameter.type) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
}
- if (parameter.type.kind !== 134 && parameter.type.kind !== 132) {
+ if (parameter.type.kind !== 135 && parameter.type.kind !== 132) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
}
if (!node.type) {
@@ -37151,7 +39855,7 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
var arg = args_4[_i];
- if (arg.kind === 198) {
+ if (arg.kind === 199) {
return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
}
}
@@ -37221,28 +39925,25 @@ var ts;
return false;
}
function checkGrammarComputedPropertyName(node) {
- if (node.kind !== 142) {
+ if (node.kind !== 143) {
return false;
}
var computedPropertyName = node;
- if (computedPropertyName.expression.kind === 192 && computedPropertyName.expression.operatorToken.kind === 25) {
+ if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) {
return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
}
}
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
- ts.Debug.assert(node.kind === 225 ||
- node.kind === 184 ||
- node.kind === 149);
+ ts.Debug.assert(node.kind === 227 ||
+ node.kind === 185 ||
+ node.kind === 150);
if (ts.isInAmbientContext(node)) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
}
if (!node.body) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
}
- if (languageVersion < 2) {
- return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher);
- }
}
}
function checkGrammarForInvalidQuestionMark(questionToken, message) {
@@ -37258,87 +39959,87 @@ var ts;
var GetOrSetAccessor = GetAccessor | SetAccessor;
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259) {
+ if (prop.kind === 262) {
continue;
}
- var name_29 = prop.name;
- if (name_29.kind === 142) {
- checkGrammarComputedPropertyName(name_29);
+ var name = prop.name;
+ if (name.kind === 143) {
+ checkGrammarComputedPropertyName(name);
}
- if (prop.kind === 258 && !inDestructuring && prop.objectAssignmentInitializer) {
+ if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) {
return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
}
if (prop.modifiers) {
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
var mod = _c[_b];
- if (mod.kind !== 119 || prop.kind !== 149) {
+ if (mod.kind !== 119 || prop.kind !== 150) {
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
}
}
}
var currentKind = void 0;
- if (prop.kind === 257 || prop.kind === 258) {
+ if (prop.kind === 260 || prop.kind === 261) {
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
- if (name_29.kind === 8) {
- checkGrammarNumericLiteral(name_29);
+ if (name.kind === 8) {
+ checkGrammarNumericLiteral(name);
}
currentKind = Property;
}
- else if (prop.kind === 149) {
+ else if (prop.kind === 150) {
currentKind = Property;
}
- else if (prop.kind === 151) {
+ else if (prop.kind === 152) {
currentKind = GetAccessor;
}
- else if (prop.kind === 152) {
+ else if (prop.kind === 153) {
currentKind = SetAccessor;
}
else {
ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
}
- var effectiveName = ts.getPropertyNameForPropertyNameNode(name_29);
+ var effectiveName = ts.getPropertyNameForPropertyNameNode(name);
if (effectiveName === undefined) {
continue;
}
- if (!seen[effectiveName]) {
- seen[effectiveName] = currentKind;
+ var existingKind = seen.get(effectiveName);
+ if (!existingKind) {
+ seen.set(effectiveName, currentKind);
}
else {
- var existingKind = seen[effectiveName];
if (currentKind === Property && existingKind === Property) {
- grammarErrorOnNode(name_29, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_29));
+ grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
}
else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
- seen[effectiveName] = currentKind | existingKind;
+ seen.set(effectiveName, currentKind | existingKind);
}
else {
- return grammarErrorOnNode(name_29, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
}
}
else {
- return grammarErrorOnNode(name_29, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
}
}
}
}
function checkGrammarJsxElement(node) {
var seen = ts.createMap();
- for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
+ for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
var attr = _a[_i];
- if (attr.kind === 251) {
+ if (attr.kind === 254) {
continue;
}
var jsxAttr = attr;
- var name_30 = jsxAttr.name;
- if (!seen[name_30.text]) {
- seen[name_30.text] = true;
+ var name = jsxAttr.name;
+ if (!seen.get(name.text)) {
+ seen.set(name.text, true);
}
else {
- return grammarErrorOnNode(name_30, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
}
var initializer = jsxAttr.initializer;
- if (initializer && initializer.kind === 252 && !initializer.expression) {
+ if (initializer && initializer.kind === 255 && !initializer.expression) {
return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
}
}
@@ -37347,7 +40048,12 @@ var ts;
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
- if (forInOrOfStatement.initializer.kind === 224) {
+ if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) {
+ if ((forInOrOfStatement.flags & 16384) === 0) {
+ return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);
+ }
+ }
+ if (forInOrOfStatement.initializer.kind === 226) {
var variableList = forInOrOfStatement.initializer;
if (!checkGrammarVariableDeclarationList(variableList)) {
var declarations = variableList.declarations;
@@ -37355,20 +40061,20 @@ var ts;
return false;
}
if (declarations.length > 1) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
: ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
}
var firstDeclaration = declarations[0];
if (firstDeclaration.initializer) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
: ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
}
if (firstDeclaration.type) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
: ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -37388,15 +40094,18 @@ var ts;
else if (accessor.body === undefined && !(ts.getModifierFlags(accessor) & 128)) {
return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
}
+ else if (accessor.body && ts.getModifierFlags(accessor) & 128) {
+ return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+ }
else if (accessor.typeParameters) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
}
else if (!doesAccessorHaveCorrectParameterCount(accessor)) {
- return grammarErrorOnNode(accessor.name, kind === 151 ?
+ return grammarErrorOnNode(accessor.name, kind === 152 ?
ts.Diagnostics.A_get_accessor_cannot_have_parameters :
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
}
- else if (kind === 152) {
+ else if (kind === 153) {
if (accessor.type) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
}
@@ -37415,10 +40124,10 @@ var ts;
}
}
function doesAccessorHaveCorrectParameterCount(accessor) {
- return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 151 ? 0 : 1);
+ return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1);
}
function getAccessorThisParameter(accessor) {
- if (accessor.parameters.length === (accessor.kind === 151 ? 1 : 2)) {
+ if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) {
return ts.getThisParameter(accessor);
}
}
@@ -37433,7 +40142,7 @@ var ts;
checkGrammarForGenerator(node)) {
return true;
}
- if (node.parent.kind === 176) {
+ if (node.parent.kind === 177) {
if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
return true;
}
@@ -37449,10 +40158,10 @@ var ts;
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -37463,9 +40172,9 @@ var ts;
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (current.kind) {
- case 219:
+ case 221:
if (node.label && current.label.text === node.label.text) {
- var isMisplacedContinueLabel = node.kind === 214
+ var isMisplacedContinueLabel = node.kind === 216
&& !ts.isIterationStatement(current.statement, true);
if (isMisplacedContinueLabel) {
return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -37473,8 +40182,8 @@ var ts;
return false;
}
break;
- case 218:
- if (node.kind === 215 && !node.label) {
+ case 220:
+ if (node.kind === 217 && !node.label) {
return false;
}
break;
@@ -37487,13 +40196,13 @@ var ts;
current = current.parent;
}
if (node.label) {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
: ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
}
else {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
: ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
@@ -37505,7 +40214,7 @@ var ts;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
}
- if (node.name.kind === 173 || node.name.kind === 172) {
+ if (node.name.kind === 174 || node.name.kind === 173) {
return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
}
if (node.initializer) {
@@ -37515,11 +40224,11 @@ var ts;
}
function isStringOrNumberLiteralExpression(expr) {
return expr.kind === 9 || expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8;
}
function checkGrammarVariableDeclaration(node) {
- if (node.parent.parent.kind !== 212 && node.parent.parent.kind !== 213) {
+ if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
if (ts.isConst(node) && !node.type) {
@@ -37546,9 +40255,29 @@ var ts;
}
}
}
+ if (compilerOptions.module !== ts.ModuleKind.ES2015 && compilerOptions.module !== ts.ModuleKind.System && !compilerOptions.noEmit &&
+ !ts.isInAmbientContext(node.parent.parent) && ts.hasModifier(node.parent.parent, 1)) {
+ checkESModuleMarker(node.name);
+ }
var checkLetConstNames = (ts.isLet(node) || ts.isConst(node));
return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
}
+ function checkESModuleMarker(name) {
+ if (name.kind === 70) {
+ if (ts.unescapeIdentifier(name.text) === "__esModule") {
+ return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
+ }
+ }
+ else {
+ var elements = name.elements;
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var element = elements_2[_i];
+ if (!ts.isOmittedExpression(element)) {
+ return checkESModuleMarker(element.name);
+ }
+ }
+ }
+ }
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 70) {
if (name.originalKeywordKind === 109) {
@@ -37557,8 +40286,8 @@ var ts;
}
else {
var elements = name.elements;
- for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
- var element = elements_2[_i];
+ for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
+ var element = elements_3[_i];
if (!ts.isOmittedExpression(element)) {
checkGrammarNameInLetOrConstDeclarations(element.name);
}
@@ -37576,15 +40305,15 @@ var ts;
}
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
- case 208:
- case 209:
case 210:
- case 217:
case 211:
case 212:
+ case 219:
case 213:
+ case 214:
+ case 215:
return false;
- case 219:
+ case 221:
return allowLetAndConstDeclarations(parent.parent);
}
return true;
@@ -37599,6 +40328,13 @@ var ts;
}
}
}
+ function checkGrammarMetaProperty(node) {
+ if (node.keywordToken === 93) {
+ if (node.name.text !== "target") {
+ return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target");
+ }
+ }
+ }
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
}
@@ -37639,7 +40375,7 @@ var ts;
return true;
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -37647,7 +40383,7 @@ var ts;
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
}
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -37660,13 +40396,13 @@ var ts;
}
}
function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
- if (node.kind === 227 ||
- node.kind === 228 ||
+ if (node.kind === 229 ||
+ node.kind === 230 ||
+ node.kind === 237 ||
+ node.kind === 236 ||
+ node.kind === 243 ||
+ node.kind === 242 ||
node.kind === 235 ||
- node.kind === 234 ||
- node.kind === 241 ||
- node.kind === 240 ||
- node.kind === 233 ||
ts.getModifierFlags(node) & (2 | 1 | 512)) {
return false;
}
@@ -37675,7 +40411,7 @@ var ts;
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
- if (ts.isDeclaration(decl) || decl.kind === 205) {
+ if (ts.isDeclaration(decl) || decl.kind === 207) {
if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
return true;
}
@@ -37694,7 +40430,7 @@ var ts;
if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
}
- if (node.parent.kind === 204 || node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) {
var links_1 = getNodeLinks(node.parent);
if (!links_1.hasReportedStatementInAmbientContext) {
return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
@@ -37705,8 +40441,22 @@ var ts;
}
}
function checkGrammarNumericLiteral(node) {
- if (node.isOctalLiteral && languageVersion >= 1) {
- return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
+ if (node.numericLiteralFlags & 4) {
+ var diagnosticMessage = void 0;
+ if (languageVersion >= 1) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 172)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 263)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
+ }
+ if (diagnosticMessage) {
+ var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37;
+ var literal = (withMinus ? "-" : "") + "0o" + node.text;
+ return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
+ }
}
}
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
@@ -37719,11 +40469,11 @@ var ts;
}
function getAmbientModules() {
var result = [];
- for (var sym in globals) {
+ globals.forEach(function (global, sym) {
if (ambientModuleSymbolRegex.test(sym)) {
- result.push(globals[sym]);
+ result.push(global);
}
- }
+ });
return result;
}
}
@@ -37731,55 +40481,359 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ;
- var nodeEdgeTraversalMap = ts.createMap((_a = {},
- _a[141] = [
- { name: "left", test: ts.isEntityName },
- { name: "right", test: ts.isIdentifier }
- ],
- _a[145] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[182] = [
- { name: "type", test: ts.isTypeNode },
- { name: "expression", test: ts.isUnaryExpression }
- ],
- _a[200] = [
- { name: "expression", test: ts.isExpression },
- { name: "type", test: ts.isTypeNode }
- ],
- _a[201] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[229] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "members", test: ts.isEnumMember }
- ],
- _a[230] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isModuleName },
- { name: "body", test: ts.isModuleBody }
- ],
- _a[231] = [
- { name: "statements", test: ts.isStatement }
- ],
- _a[234] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "moduleReference", test: ts.isModuleReference }
- ],
- _a[245] = [
- { name: "expression", test: ts.isExpression, optional: true }
- ],
- _a[260] = [
- { name: "name", test: ts.isPropertyName },
- { name: "initializer", test: ts.isExpression, optional: true, parenthesize: ts.parenthesizeExpressionForList }
- ],
- _a));
+ function visitNode(node, visitor, test, lift) {
+ if (node === undefined || visitor === undefined) {
+ return node;
+ }
+ ts.aggregateTransformFlags(node);
+ var visited = visitor(node);
+ if (visited === node) {
+ return node;
+ }
+ var visitedNode;
+ if (visited === undefined) {
+ return undefined;
+ }
+ else if (ts.isArray(visited)) {
+ visitedNode = (lift || extractSingleNode)(visited);
+ }
+ else {
+ visitedNode = visited;
+ }
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ return visitedNode;
+ }
+ ts.visitNode = visitNode;
+ function visitNodes(nodes, visitor, test, start, count) {
+ if (nodes === undefined || visitor === undefined) {
+ return nodes;
+ }
+ var updated;
+ var length = nodes.length;
+ if (start === undefined || start < 0) {
+ start = 0;
+ }
+ if (count === undefined || count > length - start) {
+ count = length - start;
+ }
+ if (start > 0 || count < length) {
+ updated = ts.createNodeArray([], nodes.hasTrailingComma && start + count === length);
+ }
+ for (var i = 0; i < count; i++) {
+ var node = nodes[i + start];
+ ts.aggregateTransformFlags(node);
+ var visited = node !== undefined ? visitor(node) : undefined;
+ if (updated !== undefined || visited === undefined || visited !== node) {
+ if (updated === undefined) {
+ updated = ts.createNodeArray(nodes.slice(0, i), nodes.hasTrailingComma);
+ ts.setTextRange(updated, nodes);
+ }
+ if (visited) {
+ if (ts.isArray(visited)) {
+ for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
+ var visitedNode = visited_1[_i];
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ updated.push(visitedNode);
+ }
+ }
+ else {
+ ts.Debug.assertNode(visited, test);
+ ts.aggregateTransformFlags(visited);
+ updated.push(visited);
+ }
+ }
+ }
+ }
+ return updated || nodes;
+ }
+ ts.visitNodes = visitNodes;
+ function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
+ context.startLexicalEnvironment();
+ statements = visitNodes(statements, visitor, ts.isStatement, start);
+ if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
+ statements = ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements)), statements);
+ }
+ var declarations = context.endLexicalEnvironment();
+ return ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements);
+ }
+ ts.visitLexicalEnvironment = visitLexicalEnvironment;
+ function visitParameterList(nodes, visitor, context, nodesVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ context.startLexicalEnvironment();
+ var updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
+ context.suspendLexicalEnvironment();
+ return updated;
+ }
+ ts.visitParameterList = visitParameterList;
+ function visitFunctionBody(node, visitor, context) {
+ context.resumeLexicalEnvironment();
+ var updated = visitNode(node, visitor, ts.isConciseBody);
+ var declarations = context.endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(updated);
+ var statements = ts.mergeLexicalEnvironment(block.statements, declarations);
+ return ts.updateBlock(block, statements);
+ }
+ return updated;
+ }
+ ts.visitFunctionBody = visitFunctionBody;
+ function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ if (node === undefined) {
+ return undefined;
+ }
+ var kind = node.kind;
+ if ((kind > 0 && kind <= 141) || kind === 168) {
+ return node;
+ }
+ switch (node.kind) {
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 297:
+ case 246:
+ return node;
+ case 142:
+ return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
+ case 143:
+ return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 159:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 154:
+ return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 155:
+ return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 149:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 156:
+ return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 145:
+ return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 146:
+ return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 158:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
+ case 162:
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ case 163:
+ return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
+ case 164:
+ return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
+ case 165:
+ case 166:
+ return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ case 167:
+ throw ts.Debug.fail("not implemented.");
+ case 169:
+ return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
+ case 170:
+ return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
+ case 171:
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
+ case 172:
+ return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
+ case 144:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
+ case 147:
+ return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 148:
+ return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 150:
+ return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 151:
+ return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 153:
+ return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 173:
+ return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
+ case 174:
+ return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
+ case 175:
+ return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 176:
+ return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression));
+ case 177:
+ return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
+ case 178:
+ return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
+ case 179:
+ return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
+ case 180:
+ return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 181:
+ return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 182:
+ return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
+ case 183:
+ return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 184:
+ return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 185:
+ return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 186:
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 187:
+ return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 188:
+ return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 189:
+ return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 190:
+ return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 193:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
+ case 191:
+ return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 192:
+ return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
+ case 195:
+ return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+ case 196:
+ return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression));
+ case 197:
+ return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 198:
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 200:
+ return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 201:
+ return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
+ case 202:
+ return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
+ case 206:
+ return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 207:
+ return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
+ case 209:
+ return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 210:
+ return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock));
+ case 211:
+ return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
+ case 212:
+ return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 213:
+ return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 214:
+ return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 215:
+ return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 216:
+ return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 217:
+ return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 218:
+ return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 219:
+ return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 220:
+ return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
+ case 221:
+ return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 222:
+ return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 223:
+ return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock));
+ case 225:
+ return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 226:
+ return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+ case 227:
+ return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 228:
+ return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 231:
+ return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+ case 232:
+ return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody));
+ case 233:
+ return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 234:
+ return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference));
+ case 237:
+ return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 238:
+ return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings));
+ case 239:
+ return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
+ case 240:
+ return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+ case 241:
+ return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 242:
+ return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
+ case 243:
+ return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 244:
+ return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+ case 245:
+ return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 247:
+ return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 248:
+ return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
+ case 253:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
+ case 249:
+ return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 250:
+ return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 251:
+ return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
+ case 252:
+ return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 255:
+ return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 256:
+ return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 257:
+ return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 258:
+ return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
+ case 259:
+ return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
+ case 260:
+ return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 261:
+ return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
+ case 262:
+ return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 263:
+ return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 264:
+ return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
+ case 295:
+ return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ default:
+ return node;
+ }
+ }
+ ts.visitEachChild = visitEachChild;
+ function extractSingleNode(nodes) {
+ ts.Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
+ return ts.singleOrUndefined(nodes);
+ }
+})(ts || (ts = {}));
+(function (ts) {
function reduceNode(node, f, initial) {
return node ? f(initial, node) : initial;
}
@@ -37793,41 +40847,45 @@ var ts;
var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft;
var cbNodes = cbNodeArray || cbNode;
var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
+ if ((kind > 0 && kind <= 141)) {
return initial;
}
- if ((kind >= 156 && kind <= 171)) {
+ if ((kind >= 157 && kind <= 172)) {
return initial;
}
var result = initial;
switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- case 293:
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 294:
break;
case 142:
+ result = reduceNode(node.left, cbNode, result);
+ result = reduceNode(node.right, cbNode, result);
+ break;
+ case 143:
result = reduceNode(node.expression, cbNode, result);
break;
- case 144:
+ case 145:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 145:
+ case 146:
result = reduceNode(node.expression, cbNode, result);
break;
- case 147:
+ case 148:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 149:
+ case 150:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -37836,12 +40894,12 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 150:
+ case 151:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 151:
+ case 152:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -37849,51 +40907,55 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 152:
+ case 153:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 172:
case 173:
+ case 174:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 174:
+ case 175:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 175:
+ case 176:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 176:
+ case 177:
result = reduceNodes(node.properties, cbNodes, result);
break;
- case 177:
+ case 178:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 178:
+ case 179:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.argumentExpression, cbNode, result);
break;
- case 179:
+ case 180:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 180:
+ case 181:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 181:
+ case 182:
result = reduceNode(node.tag, cbNode, result);
result = reduceNode(node.template, cbNode, result);
break;
- case 184:
+ case 183:
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 185:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
@@ -37901,117 +40963,124 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 185:
+ case 186:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 183:
- case 186:
+ case 184:
case 187:
case 188:
case 189:
- case 195:
+ case 190:
case 196:
- case 201:
+ case 197:
+ case 202:
result = reduceNode(node.expression, cbNode, result);
break;
- case 190:
case 191:
+ case 192:
result = reduceNode(node.operand, cbNode, result);
break;
- case 192:
+ case 193:
result = reduceNode(node.left, cbNode, result);
result = reduceNode(node.right, cbNode, result);
break;
- case 193:
+ case 194:
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.whenTrue, cbNode, result);
result = reduceNode(node.whenFalse, cbNode, result);
break;
- case 194:
+ case 195:
result = reduceNode(node.head, cbNode, result);
result = reduceNodes(node.templateSpans, cbNodes, result);
break;
- case 197:
+ case 198:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 199:
+ case 200:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
break;
+ case 201:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ break;
case 202:
result = reduceNode(node.expression, cbNode, result);
- result = reduceNode(node.literal, cbNode, result);
break;
case 204:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.literal, cbNode, result);
+ break;
+ case 206:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 205:
+ case 207:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.declarationList, cbNode, result);
break;
- case 207:
+ case 209:
result = reduceNode(node.expression, cbNode, result);
break;
- case 208:
+ case 210:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.thenStatement, cbNode, result);
result = reduceNode(node.elseStatement, cbNode, result);
break;
- case 209:
+ case 211:
result = reduceNode(node.statement, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 210:
- case 217:
+ case 212:
+ case 219:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 211:
+ case 213:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.incrementor, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
result = reduceNode(node.expression, cbNode, result);
break;
- case 218:
+ case 220:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.caseBlock, cbNode, result);
break;
- case 219:
+ case 221:
result = reduceNode(node.label, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 221:
+ case 223:
result = reduceNode(node.tryBlock, cbNode, result);
result = reduceNode(node.catchClause, cbNode, result);
result = reduceNode(node.finallyBlock, cbNode, result);
break;
- case 223:
+ case 225:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 224:
+ case 226:
result = reduceNodes(node.declarations, cbNodes, result);
break;
- case 225:
+ case 227:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -38020,7 +41089,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 226:
+ case 228:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -38028,455 +41097,145 @@ var ts;
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
+ case 231:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNodes(node.members, cbNodes, result);
+ break;
case 232:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.body, cbNode, result);
+ break;
+ case 233:
+ result = reduceNodes(node.statements, cbNodes, result);
+ break;
+ case 234:
result = reduceNodes(node.clauses, cbNodes, result);
break;
- case 235:
+ case 236:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.moduleReference, cbNode, result);
+ break;
+ case 237:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.importClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 236:
+ case 238:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.namedBindings, cbNode, result);
break;
- case 237:
+ case 239:
result = reduceNode(node.name, cbNode, result);
break;
- case 238:
- case 242:
+ case 240:
+ case 244:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 239:
- case 243:
+ case 241:
+ case 245:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 240:
+ case 242:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 241:
+ case 243:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.exportClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 246:
+ case 247:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 248:
result = reduceNode(node.openingElement, cbNode, result);
result = ts.reduceLeft(node.children, cbNode, result);
result = reduceNode(node.closingElement, cbNode, result);
break;
- case 247:
- case 248:
+ case 249:
+ case 250:
result = reduceNode(node.tagName, cbNode, result);
- result = reduceNodes(node.attributes, cbNodes, result);
+ result = reduceNode(node.attributes, cbNode, result);
break;
- case 249:
+ case 253:
+ result = reduceNodes(node.properties, cbNodes, result);
+ break;
+ case 251:
result = reduceNode(node.tagName, cbNode, result);
break;
- case 250:
+ case 252:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 251:
+ case 254:
result = reduceNode(node.expression, cbNode, result);
break;
- case 252:
+ case 255:
result = reduceNode(node.expression, cbNode, result);
break;
- case 253:
+ case 256:
result = reduceNode(node.expression, cbNode, result);
- case 254:
+ case 257:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 255:
+ case 258:
result = reduceNodes(node.types, cbNodes, result);
break;
- case 256:
+ case 259:
result = reduceNode(node.variableDeclaration, cbNode, result);
result = reduceNode(node.block, cbNode, result);
break;
- case 257:
+ case 260:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 258:
+ case 261:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.objectAssignmentInitializer, cbNode, result);
break;
- case 259:
+ case 262:
result = reduceNode(node.expression, cbNode, result);
break;
- case 261:
+ case 263:
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
+ case 264:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 294:
+ case 295:
result = reduceNode(node.expression, cbNode, result);
break;
default:
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_1 = edgeTraversalPath; _i < edgeTraversalPath_1.length; _i++) {
- var edge = edgeTraversalPath_1[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- result = ts.isArray(value)
- ? reduceNodes(value, cbNodes, result)
- : cbNode(result, value);
- }
- }
- }
break;
}
return result;
}
ts.reduceEachChild = reduceEachChild;
- function visitNode(node, visitor, test, optional, lift, parenthesize, parentNode) {
- if (node === undefined || visitor === undefined) {
- return node;
- }
- aggregateTransformFlags(node);
- var visited = visitor(node);
- if (visited === node) {
- return node;
- }
- var visitedNode;
- if (visited === undefined) {
- if (!optional) {
- Debug.failNotOptional();
- }
- return undefined;
- }
- else if (ts.isArray(visited)) {
- visitedNode = (lift || extractSingleNode)(visited);
- }
- else {
- visitedNode = visited;
- }
- if (parenthesize !== undefined) {
- visitedNode = parenthesize(visitedNode, parentNode);
- }
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- return visitedNode;
- }
- ts.visitNode = visitNode;
- function visitNodes(nodes, visitor, test, start, count, parenthesize, parentNode) {
- if (nodes === undefined) {
- return undefined;
- }
- var updated;
- var length = nodes.length;
- if (start === undefined || start < 0) {
- start = 0;
- }
- if (count === undefined || count > length - start) {
- count = length - start;
- }
- if (start > 0 || count < length) {
- updated = ts.createNodeArray([], undefined, nodes.hasTrailingComma && start + count === length);
- }
- for (var i = 0; i < count; i++) {
- var node = nodes[i + start];
- aggregateTransformFlags(node);
- var visited = node !== undefined ? visitor(node) : undefined;
- if (updated !== undefined || visited === undefined || visited !== node) {
- if (updated === undefined) {
- updated = ts.createNodeArray(nodes.slice(0, i), nodes, nodes.hasTrailingComma);
- }
- if (visited) {
- if (ts.isArray(visited)) {
- for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
- var visitedNode = visited_1[_i];
- visitedNode = parenthesize
- ? parenthesize(visitedNode, parentNode)
- : visitedNode;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- else {
- var visitedNode = parenthesize
- ? parenthesize(visited, parentNode)
- : visited;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- }
- }
- return updated || nodes;
- }
- ts.visitNodes = visitNodes;
- function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
- context.startLexicalEnvironment();
- statements = visitNodes(statements, visitor, ts.isStatement, start);
- if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
- statements = ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements), statements);
- }
- var declarations = context.endLexicalEnvironment();
- return ts.createNodeArray(ts.concatenate(statements, declarations), statements);
- }
- ts.visitLexicalEnvironment = visitLexicalEnvironment;
- function visitParameterList(nodes, visitor, context) {
- context.startLexicalEnvironment();
- var updated = visitNodes(nodes, visitor, ts.isParameterDeclaration);
- context.suspendLexicalEnvironment();
- return updated;
- }
- ts.visitParameterList = visitParameterList;
- function visitFunctionBody(node, visitor, context) {
- context.resumeLexicalEnvironment();
- var updated = visitNode(node, visitor, ts.isConciseBody);
- var declarations = context.endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(updated);
- var statements = mergeLexicalEnvironment(block.statements, declarations);
- return ts.updateBlock(block, statements);
- }
- return updated;
- }
- ts.visitFunctionBody = visitFunctionBody;
- function visitEachChild(node, visitor, context) {
- if (node === undefined) {
- return undefined;
- }
- var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
- return node;
- }
- if ((kind >= 156 && kind <= 171)) {
- return node;
- }
- switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- return node;
- case 142:
- return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 144:
- return ts.updateParameter(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), node.dotDotDotToken, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 147:
- return ts.updateProperty(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 149:
- return ts.updateMethod(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 150:
- return ts.updateConstructor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 151:
- return ts.updateGetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 152:
- return ts.updateSetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 172:
- return ts.updateObjectBindingPattern(node, visitNodes(node.elements, visitor, ts.isBindingElement));
- case 173:
- return ts.updateArrayBindingPattern(node, visitNodes(node.elements, visitor, ts.isArrayBindingElement));
- case 174:
- return ts.updateBindingElement(node, node.dotDotDotToken, visitNode(node.propertyName, visitor, ts.isPropertyName, true), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 175:
- return ts.updateArrayLiteral(node, visitNodes(node.elements, visitor, ts.isExpression));
- case 176:
- return ts.updateObjectLiteral(node, visitNodes(node.properties, visitor, ts.isObjectLiteralElementLike));
- case 177:
- return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
- case 178:
- return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
- case 179:
- return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 180:
- return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 181:
- return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
- case 183:
- return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
- case 184:
- return ts.updateFunctionExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 185:
- return ts.updateArrowFunction(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 186:
- return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
- case 187:
- return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
- case 188:
- return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
- case 189:
- return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 192:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
- case 190:
- return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 191:
- return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 193:
- return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
- case 194:
- return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), visitNodes(node.templateSpans, visitor, ts.isTemplateSpan));
- case 195:
- return ts.updateYield(node, visitNode(node.expression, visitor, ts.isExpression));
- case 196:
- return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
- case 197:
- return ts.updateClassExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 199:
- return ts.updateExpressionWithTypeArguments(node, visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
- case 202:
- return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
- case 204:
- return ts.updateBlock(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 205:
- return ts.updateVariableStatement(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
- case 207:
- return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
- case 208:
- return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, true, liftToBlock));
- case 209:
- return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
- case 210:
- return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 211:
- return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 212:
- return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 213:
- return ts.updateForOf(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 214:
- return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 215:
- return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 216:
- return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression, true));
- case 217:
- return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 218:
- return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
- case 219:
- return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 220:
- return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
- case 221:
- return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause, true), visitNode(node.finallyBlock, visitor, ts.isBlock, true));
- case 223:
- return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 224:
- return ts.updateVariableDeclarationList(node, visitNodes(node.declarations, visitor, ts.isVariableDeclaration));
- case 225:
- return ts.updateFunctionDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 226:
- return ts.updateClassDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 232:
- return ts.updateCaseBlock(node, visitNodes(node.clauses, visitor, ts.isCaseOrDefaultClause));
- case 235:
- return ts.updateImportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
- case 236:
- return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier, true), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings, true));
- case 237:
- return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
- case 238:
- return ts.updateNamedImports(node, visitNodes(node.elements, visitor, ts.isImportSpecifier));
- case 239:
- return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 240:
- return ts.updateExportAssignment(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
- case 241:
- return ts.updateExportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression, true));
- case 242:
- return ts.updateNamedExports(node, visitNodes(node.elements, visitor, ts.isExportSpecifier));
- case 243:
- return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 246:
- return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), visitNodes(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 247:
- return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 248:
- return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 249:
- return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
- case 250:
- return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
- case 251:
- return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
- case 252:
- return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- case 253:
- return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.statements, visitor, ts.isStatement));
- case 254:
- return ts.updateDefaultClause(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 255:
- return ts.updateHeritageClause(node, visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments));
- case 256:
- return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
- case 257:
- return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
- case 258:
- return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
- case 259:
- return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
- case 261:
- return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 294:
- return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- default:
- var updated = void 0;
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_2 = edgeTraversalPath; _i < edgeTraversalPath_2.length; _i++) {
- var edge = edgeTraversalPath_2[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- var visited = ts.isArray(value)
- ? visitNodes(value, visitor, edge.test, 0, value.length, edge.parenthesize, node)
- : visitNode(value, visitor, edge.test, edge.optional, edge.lift, edge.parenthesize, node);
- if (updated !== undefined || visited !== value) {
- if (updated === undefined) {
- updated = ts.getMutableClone(node);
- }
- if (visited !== value) {
- updated[edge.name] = visited;
- }
- }
- }
- }
- }
- return updated ? ts.updateNode(updated, node) : node;
- }
- }
- ts.visitEachChild = visitEachChild;
function mergeLexicalEnvironment(statements, declarations) {
if (!ts.some(declarations)) {
return statements;
}
return ts.isNodeArray(statements)
- ? ts.createNodeArray(ts.concatenate(statements, declarations), statements)
+ ? ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements)
: ts.addRange(statements, declarations);
}
ts.mergeLexicalEnvironment = mergeLexicalEnvironment;
- function mergeFunctionBodyLexicalEnvironment(body, declarations) {
- if (body && declarations !== undefined && declarations.length > 0) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.createNodeArray(ts.concatenate(body.statements, declarations), body.statements));
- }
- else {
- return ts.createBlock(ts.createNodeArray([ts.createReturn(body, body)].concat(declarations), body), body, true);
- }
- }
- return body;
- }
- ts.mergeFunctionBodyLexicalEnvironment = mergeFunctionBodyLexicalEnvironment;
function liftToBlock(nodes) {
Debug.assert(ts.every(nodes, ts.isStatement), "Cannot lift nodes to a Block.");
return ts.singleOrUndefined(nodes) || ts.createBlock(nodes);
}
ts.liftToBlock = liftToBlock;
- function extractSingleNode(nodes) {
- Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
- return ts.singleOrUndefined(nodes);
- }
function aggregateTransformFlags(node) {
aggregateTransformFlagsForNode(node);
return node;
@@ -38507,7 +41266,7 @@ var ts;
return subtreeFlags;
}
function aggregateTransformFlagsForSubtree(node) {
- if (ts.hasModifier(node, 2) || ts.isTypeNode(node)) {
+ if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) {
return 0;
}
return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes);
@@ -38520,9 +41279,6 @@ var ts;
}
var Debug;
(function (Debug) {
- Debug.failNotOptional = Debug.shouldAssert(1)
- ? function (message) { return Debug.assert(false, message || "Node not optional."); }
- : ts.noop;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
: ts.noop;
@@ -38555,16 +41311,20 @@ var ts;
}
}
})(Debug = ts.Debug || (ts.Debug = {}));
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var FlattenLevel;
+ (function (FlattenLevel) {
+ FlattenLevel[FlattenLevel["All"] = 0] = "All";
+ FlattenLevel[FlattenLevel["ObjectRest"] = 1] = "ObjectRest";
+ })(FlattenLevel = ts.FlattenLevel || (ts.FlattenLevel = {}));
function flattenDestructuringAssignment(node, visitor, context, level, needsValue, createAssignmentCallback) {
var location = node;
var value;
if (ts.isDestructuringAssignment(node)) {
value = node.right;
- while (ts.isEmptyObjectLiteralOrArrayLiteral(node.left)) {
+ while (ts.isEmptyArrayLiteral(node.left) || ts.isEmptyObjectLiteral(node.left)) {
if (ts.isDestructuringAssignment(value)) {
location = node = value;
value = node.right;
@@ -38578,6 +41338,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: true,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -38612,7 +41373,7 @@ var ts;
ts.Debug.assertNode(target, createAssignmentCallback ? ts.isIdentifier : ts.isExpression);
var expression = createAssignmentCallback
? createAssignmentCallback(target, value, location)
- : ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value, location);
+ : ts.setTextRange(ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value), location);
expression.original = original;
emitExpression(expression);
}
@@ -38625,6 +41386,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: hoistTempVariables,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -38650,10 +41412,11 @@ var ts;
}
}
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
- var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name_31 = _a.name, value = _a.value, location_2 = _a.location, original = _a.original;
- var variable = ts.createVariableDeclaration(name_31, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value, location_2);
+ var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
+ var variable = ts.createVariableDeclaration(name, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
variable.original = original;
- if (ts.isIdentifier(name_31)) {
+ ts.setTextRange(variable, location);
+ if (ts.isIdentifier(name)) {
ts.setEmitFlags(variable, 64);
}
ts.aggregateTransformFlags(variable);
@@ -38741,7 +41504,12 @@ var ts;
function flattenArrayBindingOrAssignmentPattern(flattenContext, parent, pattern, value, location) {
var elements = ts.getElementsOfBindingOrAssignmentPattern(pattern);
var numElements = elements.length;
- if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
+ if (flattenContext.level < 1 && flattenContext.downlevelIteration) {
+ value = ensureIdentifier(flattenContext, ts.createReadHelper(flattenContext.context, value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
+ ? undefined
+ : numElements, location), false, location);
+ }
+ else if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
var reuseIdentifierExpressions = !ts.isDeclarationBindingElement(parent) || numElements !== 0;
value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location);
}
@@ -38799,8 +41567,8 @@ var ts;
return ts.createElementAccess(value, argumentExpression);
}
else {
- var name_32 = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
- return ts.createPropertyAccess(value, name_32);
+ var name = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
+ return ts.createPropertyAccess(value, name);
}
}
function ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) {
@@ -38811,7 +41579,7 @@ var ts;
var temp = ts.createTempVariable(undefined);
if (flattenContext.hoistTempVariables) {
flattenContext.context.hoistVariableDeclaration(temp);
- flattenContext.emitExpression(ts.createAssignment(temp, value, location));
+ flattenContext.emitExpression(ts.setTextRange(ts.createAssignment(temp, value), location));
}
else {
flattenContext.emitBindingOrAssignment(temp, value, location, undefined);
@@ -38842,7 +41610,7 @@ var ts;
var restHelper = {
name: "typescript:rest",
scoped: false,
- text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
+ text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
};
function createRestCall(context, value, elements, computedTempVariables, location) {
context.requestEmitHelper(restHelper);
@@ -38861,12 +41629,21 @@ var ts;
}
}
}
- return ts.createCall(ts.getHelperName("__rest"), undefined, [value, ts.createArrayLiteral(propertyNames, location)]);
+ return ts.createCall(ts.getHelperName("__rest"), undefined, [
+ value,
+ ts.setTextRange(ts.createArrayLiteral(propertyNames), location)
+ ]);
}
})(ts || (ts = {}));
var ts;
(function (ts) {
var USE_NEW_TYPE_METADATA_FORMAT = false;
+ var TypeScriptSubstitutionFlags;
+ (function (TypeScriptSubstitutionFlags) {
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["ClassAliases"] = 1] = "ClassAliases";
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NamespaceExports"] = 2] = "NamespaceExports";
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
+ })(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -38877,8 +41654,8 @@ var ts;
var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
context.enableSubstitution(178);
+ context.enableSubstitution(179);
var currentSourceFile;
var currentNamespace;
var currentNamespaceContainerName;
@@ -38911,15 +41688,15 @@ var ts;
}
function onBeforeVisitNode(node) {
switch (node.kind) {
- case 261:
- case 232:
- case 231:
- case 204:
+ case 264:
+ case 234:
+ case 233:
+ case 206:
currentScope = node;
currentScopeFirstDeclarationsOfName = undefined;
break;
- case 226:
- case 225:
+ case 228:
+ case 227:
if (ts.hasModifier(node, 2)) {
break;
}
@@ -38944,13 +41721,13 @@ var ts;
}
function sourceElementVisitorWorker(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 240:
+ case 242:
return visitExportAssignment(node);
- case 241:
+ case 243:
return visitExportDeclaration(node);
default:
return visitorWorker(node);
@@ -38960,11 +41737,11 @@ var ts;
return saveStateAndInvoke(node, namespaceElementVisitorWorker);
}
function namespaceElementVisitorWorker(node) {
- if (node.kind === 241 ||
- node.kind === 235 ||
- node.kind === 236 ||
- (node.kind === 234 &&
- node.moduleReference.kind === 245)) {
+ if (node.kind === 243 ||
+ node.kind === 237 ||
+ node.kind === 238 ||
+ (node.kind === 236 &&
+ node.moduleReference.kind === 247)) {
return undefined;
}
else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) {
@@ -38980,15 +41757,15 @@ var ts;
}
function classElementVisitorWorker(node) {
switch (node.kind) {
- case 150:
- return undefined;
- case 147:
- case 155:
case 151:
+ return undefined;
+ case 148:
+ case 156:
case 152:
- case 149:
+ case 153:
+ case 150:
return visitorWorker(node);
- case 203:
+ case 205:
return node;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39019,23 +41796,22 @@ var ts;
case 75:
case 123:
case 130:
- case 162:
case 163:
- case 161:
- case 156:
- case 143:
+ case 164:
+ case 162:
+ case 157:
+ case 144:
case 118:
case 121:
- case 134:
+ case 135:
case 132:
case 129:
case 104:
- case 135:
+ case 136:
+ case 160:
case 159:
+ case 161:
case 158:
- case 160:
- case 157:
- case 164:
case 165:
case 166:
case 167:
@@ -39043,56 +41819,58 @@ var ts;
case 169:
case 170:
case 171:
- case 155:
- case 145:
- case 228:
- case 147:
- case 150:
+ case 172:
+ case 156:
+ case 146:
+ case 230:
+ case 148:
+ return undefined;
+ case 151:
return visitConstructor(node);
- case 227:
+ case 229:
return ts.createNotEmittedStatement(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 255:
+ case 258:
return visitHeritageClause(node);
- case 199:
+ case 200:
return visitExpressionWithTypeArguments(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessor(node);
case 152:
+ return visitGetAccessor(node);
+ case 153:
return visitSetAccessor(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return visitAssertionExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 201:
+ case 202:
return visitNonNullExpression(node);
- case 229:
+ case 231:
return visitEnumDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
- case 230:
+ case 232:
return visitModuleDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39100,7 +41878,8 @@ var ts;
}
}
function visitSourceFile(node) {
- var alwaysStrict = compilerOptions.alwaysStrict && !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
+ var alwaysStrict = (compilerOptions.alwaysStrict === undefined ? compilerOptions.strict : compilerOptions.alwaysStrict) &&
+ !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
return ts.updateSourceFileNode(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
}
function shouldEmitDecorateCallForClass(node) {
@@ -39152,11 +41931,12 @@ var ts;
return ts.singleOrMany(statements);
}
function createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, hasStaticProperties) {
- var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause), node);
+ var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause));
var emitFlags = ts.getEmitFlags(node);
if (hasStaticProperties) {
emitFlags |= 32;
}
+ ts.setTextRange(classDeclaration, node);
ts.setOriginalNode(classDeclaration, node);
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
@@ -39167,10 +41947,14 @@ var ts;
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, hasExtendsClause);
- var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members, location);
+ var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
- var statement = ts.createLetStatement(declName, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression, location);
+ ts.setTextRange(classExpression, location);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(declName, undefined, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression)
+ ], 1));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, location);
ts.setCommentRange(statement, node);
return statement;
}
@@ -39178,7 +41962,9 @@ var ts;
var staticProperties = getInitializedProperties(node, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; }));
- var classExpression = ts.setOriginalNode(ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members, node), node);
+ var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members);
+ ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, node);
if (staticProperties.length > 0) {
var expressions = [];
var temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -39201,7 +41987,7 @@ var ts;
members.push(constructor);
}
ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
- return ts.createNodeArray(members, node.members);
+ return ts.setTextRange(ts.createNodeArray(members), node.members);
}
function transformConstructor(node, hasExtendsClause) {
var hasInstancePropertyWithInitializer = ts.forEach(node.members, isInstanceInitializedProperty);
@@ -39212,7 +41998,7 @@ var ts;
}
var parameters = transformConstructorParameters(constructor);
var body = transformConstructorBody(node, constructor, hasExtendsClause);
- return ts.startOnNewLine(ts.setOriginalNode(ts.createConstructor(undefined, undefined, parameters, body, constructor || node), constructor));
+ return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor(undefined, undefined, parameters, body), constructor || node), constructor));
}
function transformConstructorParameters(constructor) {
return ts.visitParameterList(constructor && constructor.parameters, visitor, context)
@@ -39235,18 +42021,18 @@ var ts;
if (constructor) {
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
}
- ts.addRange(statements, endLexicalEnvironment());
- return ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : undefined, true);
+ statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+ return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true), constructor ? constructor.body : undefined);
}
function addPrologueDirectivesAndInitialSuperCall(ctor, result) {
if (ctor.body) {
var statements = ctor.body.statements;
- var index = ts.addPrologueDirectives(result, statements, false, visitor);
+ var index = ts.addPrologue(result, statements, false, visitor);
if (index === statements.length) {
return index;
}
var statement = statements[index];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
result.push(ts.visitNode(statement, visitor, ts.isStatement));
return index + 1;
}
@@ -39268,7 +42054,7 @@ var ts;
ts.setEmitFlags(propertyName, 1536 | 48);
var localName = ts.getMutableClone(name);
ts.setEmitFlags(localName, 1536);
- return ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), propertyName, node.name), localName), ts.moveRangePos(node, -1)));
+ return ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)));
}
function getInitializedProperties(node, isStatic) {
return ts.filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty);
@@ -39280,13 +42066,13 @@ var ts;
return isInitializedProperty(member, false);
}
function isInitializedProperty(member, isStatic) {
- return member.kind === 147
+ return member.kind === 148
&& isStatic === ts.hasModifier(member, 32)
&& member.initializer !== undefined;
}
function addInitializedPropertyStatements(statements, properties, receiver) {
- for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
- var property = properties_7[_i];
+ for (var _i = 0, properties_9 = properties; _i < properties_9.length; _i++) {
+ var property = properties_9[_i];
var statement = ts.createStatement(transformInitializedProperty(property, receiver));
ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property));
ts.setCommentRange(statement, property);
@@ -39295,8 +42081,8 @@ var ts;
}
function generateInitializedPropertyExpressions(properties, receiver) {
var expressions = [];
- for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
- var property = properties_8[_i];
+ for (var _i = 0, properties_10 = properties; _i < properties_10.length; _i++) {
+ var property = properties_10[_i];
var expression = transformInitializedProperty(property, receiver);
expression.startsOnNewLine = true;
ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property));
@@ -39353,12 +42139,12 @@ var ts;
}
function getAllDecoratorsOfClassElement(node, member) {
switch (member.kind) {
- case 151:
case 152:
+ case 153:
return getAllDecoratorsOfAccessors(node, member);
- case 149:
+ case 150:
return getAllDecoratorsOfMethod(member);
- case 147:
+ case 148:
return getAllDecoratorsOfProperty(member);
default:
return undefined;
@@ -39369,10 +42155,11 @@ var ts;
return undefined;
}
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
- if (accessor !== firstAccessor) {
+ var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
+ if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
return undefined;
}
- var decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
+ var decorators = firstAccessorWithDecorators.decorators;
var parameters = getDecoratorsOfParameters(setAccessor);
if (!decorators && !parameters) {
return undefined;
@@ -39397,14 +42184,14 @@ var ts;
}
return { decorators: decorators };
}
- function transformAllDecoratorsOfDeclaration(node, allDecorators) {
+ function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
if (!allDecorators) {
return undefined;
}
var decoratorExpressions = [];
ts.addRange(decoratorExpressions, ts.map(allDecorators.decorators, transformDecorator));
ts.addRange(decoratorExpressions, ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
- addTypeMetadata(node, decoratorExpressions);
+ addTypeMetadata(node, container, decoratorExpressions);
return decoratorExpressions;
}
function addClassElementDecorationStatements(statements, node, isStatic) {
@@ -39429,14 +42216,14 @@ var ts;
}
function generateClassElementDecorationExpression(node, member) {
var allDecorators = getAllDecoratorsOfClassElement(node, member);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
var prefix = getClassMemberPrefix(node, member);
var memberName = getExpressionForPropertyName(member, true);
var descriptor = languageVersion > 0
- ? member.kind === 147
+ ? member.kind === 148
? ts.createVoidZero()
: ts.createNull()
: undefined;
@@ -39452,7 +42239,7 @@ var ts;
}
function generateConstructorDecorationExpression(node) {
var allDecorators = getAllDecoratorsOfConstructor(node);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -39480,90 +42267,83 @@ var ts;
}
return expressions;
}
- function addTypeMetadata(node, decoratorExpressions) {
+ function addTypeMetadata(node, container, decoratorExpressions) {
if (USE_NEW_TYPE_METADATA_FORMAT) {
- addNewTypeMetadata(node, decoratorExpressions);
+ addNewTypeMetadata(node, container, decoratorExpressions);
}
else {
- addOldTypeMetadata(node, decoratorExpressions);
+ addOldTypeMetadata(node, container, decoratorExpressions);
}
}
- function addOldTypeMetadata(node, decoratorExpressions) {
+ function addOldTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
if (shouldAddTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:type", serializeTypeOfNode(node)));
}
if (shouldAddParamTypesMetadata(node)) {
- decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node, container)));
}
if (shouldAddReturnTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:returntype", serializeReturnTypeOfNode(node)));
}
}
}
- function addNewTypeMetadata(node, decoratorExpressions) {
+ function addNewTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
var properties = void 0;
if (shouldAddTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node))));
}
if (shouldAddParamTypesMetadata(node)) {
- (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node))));
+ (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container))));
}
if (shouldAddReturnTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node))));
}
if (properties) {
- decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, undefined, true)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true)));
}
}
}
function shouldAddTypeMetadata(node) {
var kind = node.kind;
- return kind === 149
- || kind === 151
+ return kind === 150
|| kind === 152
- || kind === 147;
+ || kind === 153
+ || kind === 148;
}
function shouldAddReturnTypeMetadata(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
function shouldAddParamTypesMetadata(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 197
- || kind === 149
- || kind === 151
- || kind === 152;
+ switch (node.kind) {
+ case 228:
+ case 198:
+ return ts.getFirstConstructorWithBody(node) !== undefined;
+ case 150:
+ case 152:
+ case 153:
+ return true;
+ }
+ return false;
}
function serializeTypeOfNode(node) {
switch (node.kind) {
- case 147:
- case 144:
- case 151:
- return serializeTypeNode(node.type);
+ case 148:
+ case 145:
case 152:
+ return serializeTypeNode(node.type);
+ case 153:
return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node));
- case 226:
- case 197:
- case 149:
+ case 228:
+ case 198:
+ case 150:
return ts.createIdentifier("Function");
default:
return ts.createVoidZero();
}
}
- function getRestParameterElementType(node) {
- if (node && node.kind === 162) {
- return node.elementType;
- }
- else if (node && node.kind === 157) {
- return ts.singleOrUndefined(node.typeArguments);
- }
- else {
- return undefined;
- }
- }
- function serializeParameterTypesOfNode(node) {
+ function serializeParameterTypesOfNode(node, container) {
var valueDeclaration = ts.isClassLike(node)
? ts.getFirstConstructorWithBody(node)
: ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)
@@ -39571,7 +42351,7 @@ var ts;
: undefined;
var expressions = [];
if (valueDeclaration) {
- var parameters = valueDeclaration.parameters;
+ var parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);
var numParameters = parameters.length;
for (var i = 0; i < numParameters; i++) {
var parameter = parameters[i];
@@ -39579,7 +42359,7 @@ var ts;
continue;
}
if (parameter.dotDotDotToken) {
- expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));
+ expressions.push(serializeTypeNode(ts.getRestParameterElementType(parameter.type)));
}
else {
expressions.push(serializeTypeOfNode(parameter));
@@ -39588,11 +42368,20 @@ var ts;
}
return ts.createArrayLiteral(expressions);
}
+ function getParametersOfDecoratedDeclaration(node, container) {
+ if (container && node.kind === 152) {
+ var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
+ if (setAccessor) {
+ return setAccessor.parameters;
+ }
+ }
+ return node.parameters;
+ }
function serializeReturnTypeOfNode(node) {
if (ts.isFunctionLike(node) && node.type) {
return serializeTypeNode(node.type);
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if (ts.isAsyncFunction(node)) {
return ts.createIdentifier("Promise");
}
return ts.createVoidZero();
@@ -39603,21 +42392,26 @@ var ts;
}
switch (node.kind) {
case 104:
+ case 138:
+ case 94:
+ case 129:
return ts.createVoidZero();
- case 166:
+ case 167:
return serializeTypeNode(node.type);
- case 158:
case 159:
+ case 160:
return ts.createIdentifier("Function");
- case 162:
case 163:
+ case 164:
return ts.createIdentifier("Array");
- case 156:
+ case 157:
case 121:
return ts.createIdentifier("Boolean");
- case 134:
+ case 135:
return ts.createIdentifier("String");
- case 171:
+ case 133:
+ return ts.createIdentifier("Object");
+ case 172:
switch (node.literal.kind) {
case 9:
return ts.createIdentifier("String");
@@ -39633,44 +42427,22 @@ var ts;
break;
case 132:
return ts.createIdentifier("Number");
- case 135:
+ case 136:
return languageVersion < 2
? getGlobalSymbolNameWithFallback()
: ts.createIdentifier("Symbol");
- case 157:
+ case 158:
return serializeTypeReferenceNode(node);
+ case 166:
case 165:
- case 164:
- {
- var unionOrIntersection = node;
- var serializedUnion = void 0;
- for (var _i = 0, _a = unionOrIntersection.types; _i < _a.length; _i++) {
- var typeNode = _a[_i];
- var serializedIndividual = serializeTypeNode(typeNode);
- if (serializedIndividual.kind !== 70) {
- serializedUnion = undefined;
- break;
- }
- if (serializedIndividual.text === "Object") {
- return serializedIndividual;
- }
- if (serializedUnion && serializedUnion.text !== serializedIndividual.text) {
- serializedUnion = undefined;
- break;
- }
- serializedUnion = serializedIndividual;
- }
- if (serializedUnion) {
- return serializedUnion;
- }
- }
- case 160:
- case 168:
+ return serializeUnionOrIntersectionType(node);
+ case 161:
case 169:
case 170:
- case 161:
+ case 171:
+ case 162:
case 118:
- case 167:
+ case 168:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39678,6 +42450,32 @@ var ts;
}
return ts.createIdentifier("Object");
}
+ function serializeUnionOrIntersectionType(node) {
+ var serializedUnion;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var serializedIndividual = serializeTypeNode(typeNode);
+ if (ts.isVoidExpression(serializedIndividual)) {
+ if (!serializedUnion) {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ else if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
+ return serializedIndividual;
+ }
+ else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ if (!ts.isIdentifier(serializedUnion) ||
+ !ts.isIdentifier(serializedIndividual) ||
+ serializedUnion.text !== serializedIndividual.text) {
+ return ts.createIdentifier("Object");
+ }
+ }
+ else {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ return serializedUnion;
+ }
function serializeTypeReferenceNode(node) {
switch (resolver.getTypeReferenceSerializationKind(node.typeName, currentScope)) {
case ts.TypeReferenceSerializationKind.Unknown:
@@ -39712,15 +42510,15 @@ var ts;
function serializeEntityNameAsExpression(node, useFallback) {
switch (node.kind) {
case 70:
- var name_33 = ts.getMutableClone(node);
- name_33.flags &= ~8;
- name_33.original = undefined;
- name_33.parent = currentScope;
+ var name = ts.getMutableClone(node);
+ name.flags &= ~8;
+ name.original = undefined;
+ name.parent = currentScope;
if (useFallback) {
- return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name_33), ts.createLiteral("undefined")), name_33);
+ return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name);
}
- return name_33;
- case 141:
+ return name;
+ case 142:
return serializeQualifiedNameAsExpression(node, useFallback);
}
}
@@ -39749,7 +42547,7 @@ var ts;
: name.expression;
}
else if (ts.isIdentifier(name)) {
- return ts.createLiteral(name.text);
+ return ts.createLiteral(ts.unescapeIdentifier(name.text));
}
else {
return ts.getSynthesizedClone(name);
@@ -39764,7 +42562,7 @@ var ts;
hoistVariableDeclaration(generatedName);
expression = ts.createAssignment(generatedName, expression);
}
- return ts.setOriginalNode(ts.createComputedPropertyName(expression, name), name);
+ return ts.updateComputedPropertyName(name, expression);
}
else {
return name;
@@ -39773,13 +42571,12 @@ var ts;
function visitHeritageClause(node) {
if (node.token === 84) {
var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1);
- return ts.createHeritageClause(84, types, node);
+ return ts.setTextRange(ts.createHeritageClause(84, types), node);
}
return undefined;
}
function visitExpressionWithTypeArguments(node) {
- var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
- return ts.createExpressionWithTypeArguments(undefined, expression, node);
+ return ts.updateExpressionWithTypeArguments(node, undefined, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
}
function shouldEmitFunctionLikeDeclaration(node) {
return !ts.nodeIsMissing(node.body);
@@ -39788,13 +42585,13 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- return ts.visitEachChild(node, visitor, context);
+ return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context));
}
function visitMethodDeclaration(node) {
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), visitPropertyNameOfClassElement(node), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
if (updated !== node) {
ts.setCommentRange(updated, node);
ts.setSourceMapRange(updated, ts.moveRangePastDecorators(node));
@@ -39830,7 +42627,7 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createNotEmittedStatement(node);
}
- var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
+ var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
if (isNamespaceExport(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
@@ -39839,10 +42636,10 @@ var ts;
return updated;
}
function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
+ if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createOmittedExpression();
}
- var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
return updated;
}
function visitArrowFunction(node) {
@@ -39853,8 +42650,9 @@ var ts;
if (ts.parameterIsThisKeyword(node)) {
return undefined;
}
- var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression), ts.moveRangePastModifiers(node));
+ var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
ts.setOriginalNode(parameter, node);
+ ts.setTextRange(parameter, ts.moveRangePastModifiers(node));
ts.setCommentRange(parameter, node);
ts.setSourceMapRange(parameter, ts.moveRangePastModifiers(node));
ts.setEmitFlags(parameter.name, 32);
@@ -39866,7 +42664,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)), node);
+ return ts.setTextRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -39878,7 +42676,7 @@ var ts;
return ts.flattenDestructuringAssignment(node, visitor, context, 0, false, createNamespaceExportExpression);
}
else {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression), node);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
}
function visitVariableDeclaration(node) {
@@ -39932,8 +42730,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]), node);
+ var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(enumStatement, node);
+ ts.setTextRange(enumStatement, node);
ts.setEmitFlags(enumStatement, emitFlags);
statements.push(enumStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -39947,11 +42746,11 @@ var ts;
ts.addRange(statements, ts.map(node.members, transformEnumMember));
ts.addRange(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
- return ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ return ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.createStatement(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name, member), member);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -39983,16 +42782,16 @@ var ts;
if (!currentScopeFirstDeclarationsOfName) {
currentScopeFirstDeclarationsOfName = ts.createMap();
}
- if (!(name in currentScopeFirstDeclarationsOfName)) {
- currentScopeFirstDeclarationsOfName[name] = node;
+ if (!currentScopeFirstDeclarationsOfName.has(name)) {
+ currentScopeFirstDeclarationsOfName.set(name, node);
}
}
}
function isFirstEmittedDeclarationInScope(node) {
if (currentScopeFirstDeclarationsOfName) {
- var name_34 = node.symbol && node.symbol.name;
- if (name_34) {
- return currentScopeFirstDeclarationsOfName[name_34] === node;
+ var name = node.symbol && node.symbol.name;
+ if (name) {
+ return currentScopeFirstDeclarationsOfName.get(name) === node;
}
}
return false;
@@ -40004,7 +42803,7 @@ var ts;
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
- if (node.kind === 229) {
+ if (node.kind === 231) {
ts.setSourceMapRange(statement.declarationList, node);
}
else {
@@ -40045,8 +42844,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]), node);
+ var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(moduleStatement, node);
+ ts.setTextRange(moduleStatement, node);
ts.setEmitFlags(moduleStatement, emitFlags);
statements.push(moduleStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -40064,8 +42864,8 @@ var ts;
var statementsLocation;
var blockLocation;
var body = node.body;
- if (body.kind === 231) {
- ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement));
+ if (body.kind === 233) {
+ saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
statementsLocation = body.statements;
blockLocation = body;
}
@@ -40086,14 +42886,15 @@ var ts;
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), blockLocation, true);
- if (body.kind !== 231) {
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true);
+ ts.setTextRange(block, blockLocation);
+ if (body.kind !== 233) {
ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536);
}
return block;
}
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
- if (moduleDeclaration.body.kind === 230) {
+ if (moduleDeclaration.body.kind === 232) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerModule || moduleDeclaration.body;
}
@@ -40102,18 +42903,18 @@ var ts;
if (!node.importClause) {
return node;
}
- var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause, true);
+ var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause);
return importClause
? ts.updateImportDeclaration(node, undefined, undefined, importClause, node.moduleSpecifier)
: undefined;
}
function visitImportClause(node) {
var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
- var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings, true);
+ var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined;
}
function visitNamedImportBindings(node) {
- if (node.kind === 237) {
+ if (node.kind === 239) {
return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
}
else {
@@ -40136,7 +42937,7 @@ var ts;
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
}
- var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports, true);
+ var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports);
return exportClause
? ts.updateExportDeclaration(node, undefined, undefined, exportClause, node.moduleSpecifier)
: undefined;
@@ -40165,9 +42966,9 @@ var ts;
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
- return ts.setOriginalNode(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
+ return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.setOriginalNode(ts.createVariableDeclaration(node.name, undefined, moduleReference), node)
- ]), node), node);
+ ])), node), node);
}
else {
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
@@ -40188,7 +42989,7 @@ var ts;
&& ts.hasModifier(node, 512);
}
function expressionToStatement(expression) {
- return ts.createStatement(expression, undefined);
+ return ts.createStatement(expression);
}
function addExportMemberAssignment(statements, node) {
var expression = ts.createAssignment(ts.getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, false, true), ts.getLocalName(node));
@@ -40198,10 +42999,10 @@ var ts;
statements.push(statement);
}
function createNamespaceExport(exportName, exportValue, location) {
- return ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue), location);
+ return ts.setTextRange(ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue)), location);
}
function createNamespaceExportExpression(exportName, exportValue, location) {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);
}
function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {
return ts.getNamespaceMemberName(currentNamespaceContainerName, name, false, true);
@@ -40217,7 +43018,7 @@ var ts;
function getClassAliasIfNeeded(node) {
if (resolver.getNodeCheckFlags(node) & 8388608) {
enableSubstitutionForClassAliases();
- var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? node.name.text : "default");
+ var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? ts.unescapeIdentifier(node.name.text) : "default");
classAliases[ts.getOriginalNodeId(node)] = classAlias;
hoistVariableDeclaration(classAlias);
return classAlias;
@@ -40241,37 +43042,42 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(70);
- classAliases = ts.createMap();
+ classAliases = [];
}
}
function enableSubstitutionForNamespaceExports() {
if ((enabledSubstitutions & 2) === 0) {
enabledSubstitutions |= 2;
context.enableSubstitution(70);
- context.enableSubstitution(258);
- context.enableEmitNotification(230);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(232);
}
}
function isTransformedModuleDeclaration(node) {
- return ts.getOriginalNode(node).kind === 230;
+ return ts.getOriginalNode(node).kind === 232;
}
function isTransformedEnumDeclaration(node) {
- return ts.getOriginalNode(node).kind === 229;
+ return ts.getOriginalNode(node).kind === 231;
}
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
var savedApplicableSubstitutions = applicableSubstitutions;
+ var savedCurrentSourceFile = currentSourceFile;
+ if (ts.isSourceFile(node)) {
+ currentSourceFile = node;
+ }
if (enabledSubstitutions & 2 && isTransformedModuleDeclaration(node)) {
applicableSubstitutions |= 2;
}
if (enabledSubstitutions & 8 && isTransformedEnumDeclaration(node)) {
applicableSubstitutions |= 8;
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
applicableSubstitutions = savedApplicableSubstitutions;
+ currentSourceFile = savedCurrentSourceFile;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -40281,14 +43087,14 @@ var ts;
}
function substituteShorthandPropertyAssignment(node) {
if (enabledSubstitutions & 2) {
- var name_35 = node.name;
- var exportedName = trySubstituteNamespaceExportedName(name_35);
+ var name = node.name;
+ var exportedName = trySubstituteNamespaceExportedName(name);
if (exportedName) {
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name_35, initializer, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name_35, exportedName, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedName), node);
}
}
return node;
@@ -40297,9 +43103,9 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 177:
- return substitutePropertyAccessExpression(node);
case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
return substituteElementAccessExpression(node);
}
return node;
@@ -40329,11 +43135,11 @@ var ts;
function trySubstituteNamespaceExportedName(node) {
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
var container = resolver.getReferencedExportContainer(node, false);
- if (container && container.kind !== 261) {
- var substitute = (applicableSubstitutions & 2 && container.kind === 230) ||
- (applicableSubstitutions & 8 && container.kind === 229);
+ if (container && container.kind !== 264) {
+ var substitute = (applicableSubstitutions & 2 && container.kind === 232) ||
+ (applicableSubstitutions & 8 && container.kind === 231);
if (substitute) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node, node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node);
}
}
}
@@ -40348,16 +43154,14 @@ var ts;
function substituteConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
+ ts.setConstantValue(node, constantValue);
var substitute = ts.createLiteral(constantValue);
- ts.setSourceMapRange(substitute, node);
- ts.setCommentRange(substitute, node);
if (!compilerOptions.removeComments) {
var propertyName = ts.isPropertyAccessExpression(node)
? ts.declarationNameToString(node.name)
: ts.getTextOfNode(node.argumentExpression);
- substitute.trailingComment = " " + propertyName + " ";
+ ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
}
- ts.setConstantValue(node, constantValue);
return substitute;
}
return node;
@@ -40372,24 +43176,24 @@ var ts;
}
}
ts.transformTypeScript = transformTypeScript;
- var paramHelper = {
- name: "typescript:param",
- scoped: false,
- priority: 4,
- text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
- };
- function createParamHelper(context, expression, parameterOffset, location) {
- context.requestEmitHelper(paramHelper);
- return ts.createCall(ts.getHelperName("__param"), undefined, [
- ts.createLiteral(parameterOffset),
- expression
- ], location);
+ function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
+ var argumentsArray = [];
+ argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, true));
+ argumentsArray.push(target);
+ if (memberName) {
+ argumentsArray.push(memberName);
+ if (descriptor) {
+ argumentsArray.push(descriptor);
+ }
+ }
+ context.requestEmitHelper(decorateHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray), location);
}
- var metadataHelper = {
- name: "typescript:metadata",
+ var decorateHelper = {
+ name: "typescript:decorate",
scoped: false,
- priority: 3,
- text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
+ priority: 2,
+ text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
};
function createMetadataHelper(context, metadataKey, metadataValue) {
context.requestEmitHelper(metadataHelper);
@@ -40398,30 +43202,289 @@ var ts;
metadataValue
]);
}
- var decorateHelper = {
- name: "typescript:decorate",
+ var metadataHelper = {
+ name: "typescript:metadata",
scoped: false,
- priority: 2,
- text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
+ priority: 3,
+ text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
};
- function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
- context.requestEmitHelper(decorateHelper);
- var argumentsArray = [];
- argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, undefined, true));
- argumentsArray.push(target);
- if (memberName) {
- argumentsArray.push(memberName);
- if (descriptor) {
- argumentsArray.push(descriptor);
+ function createParamHelper(context, expression, parameterOffset, location) {
+ context.requestEmitHelper(paramHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__param"), undefined, [
+ ts.createLiteral(parameterOffset),
+ expression
+ ]), location);
+ }
+ var paramHelper = {
+ name: "typescript:param",
+ scoped: false,
+ priority: 4,
+ text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
+ };
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var ES2017SubstitutionFlags;
+ (function (ES2017SubstitutionFlags) {
+ ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
+ function transformES2017(context) {
+ var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var currentSourceFile;
+ var enabledSubstitutions;
+ var enclosingSuperContainerFlags = 0;
+ var previousOnEmitNode = context.onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ if (ts.isDeclarationFile(node)) {
+ return node;
+ }
+ currentSourceFile = node;
+ var visited = ts.visitEachChild(node, visitor, context);
+ ts.addEmitHelpers(visited, context.readEmitHelpers());
+ currentSourceFile = undefined;
+ return visited;
+ }
+ function visitor(node) {
+ if ((node.transformFlags & 16) === 0) {
+ return node;
+ }
+ switch (node.kind) {
+ case 119:
+ return undefined;
+ case 190:
+ return visitAwaitExpression(node);
+ case 150:
+ return visitMethodDeclaration(node);
+ case 227:
+ return visitFunctionDeclaration(node);
+ case 185:
+ return visitFunctionExpression(node);
+ case 186:
+ return visitArrowFunction(node);
+ default:
+ return ts.visitEachChild(node, visitor, context);
}
}
- return ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray, location);
+ function visitAwaitExpression(node) {
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
+ }
+ function visitMethodDeclaration(node) {
+ return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionDeclaration(node) {
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionExpression(node) {
+ return ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitArrowFunction(node) {
+ return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function transformAsyncFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var original = ts.getOriginalNode(node, ts.isFunctionLike);
+ var nodeType = original.type;
+ var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
+ var isArrowFunction = node.kind === 186;
+ var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
+ if (!isArrowFunction) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.createBlock(statements, true);
+ ts.setTextRange(block, node.body);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
+ }
+ else {
+ var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
+ var declarations = endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(expression);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(ts.concatenate(block.statements, declarations)), block.statements));
+ }
+ return expression;
+ }
+ }
+ function transformFunctionBodyWorker(body, start) {
+ if (ts.isBlock(body)) {
+ return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
+ }
+ else {
+ startLexicalEnvironment();
+ var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
+ var declarations = endLexicalEnvironment();
+ return ts.updateBlock(visited, ts.setTextRange(ts.createNodeArray(ts.concatenate(visited.statements, declarations)), visited.statements));
+ }
+ }
+ function getPromiseConstructor(type) {
+ var typeName = type && ts.getEntityNameFromTypeNode(type);
+ if (typeName && ts.isEntityName(typeName)) {
+ var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
+ if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
+ || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
+ return typeName;
+ }
+ }
+ return undefined;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
+ }
+ }
+ }
+ ts.transformES2017 = transformES2017;
+ var awaiterHelper = {
+ name: "typescript:awaiter",
+ scoped: false,
+ priority: 5,
+ text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };"
+ };
+ function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
+ context.requestEmitHelper(awaiterHelper);
+ var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
+ ts.createThis(),
+ hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
+ promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
+ generatorFunc
+ ]);
}
+ ts.asyncSuperHelper = {
+ name: "typescript:async-super",
+ scoped: true,
+ text: "\n const _super = name => super[name];\n "
+ };
+ ts.advancedAsyncSuperHelper = {
+ name: "typescript:advanced-async-super",
+ scoped: true,
+ text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "
+ };
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ESNextSubstitutionFlags;
+ (function (ESNextSubstitutionFlags) {
+ ESNextSubstitutionFlags[ESNextSubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ESNextSubstitutionFlags || (ESNextSubstitutionFlags = {}));
function transformESNext(context) {
- var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ var enabledSubstitutions;
+ var enclosingFunctionFlags;
+ var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
@@ -40437,53 +43500,93 @@ var ts;
function visitorNoDestructuringValue(node) {
return visitorWorker(node, true);
}
+ function visitorNoAsyncModifier(node) {
+ if (node.kind === 119) {
+ return undefined;
+ }
+ return node;
+ }
function visitorWorker(node, noDestructuringValue) {
if ((node.transformFlags & 8) === 0) {
return node;
}
switch (node.kind) {
- case 176:
+ case 190:
+ return visitAwaitExpression(node);
+ case 196:
+ return visitYieldExpression(node);
+ case 221:
+ return visitLabeledStatement(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 192:
+ case 193:
return visitBinaryExpression(node, noDestructuringValue);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
+ case 215:
+ return visitForOfStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 211:
return visitForStatement(node);
- case 188:
+ case 189:
return visitVoidExpression(node);
- case 150:
+ case 151:
return visitConstructorDeclaration(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessorDeclaration(node);
case 152:
+ return visitGetAccessorDeclaration(node);
+ case 153:
return visitSetAccessorDeclaration(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 207:
+ case 209:
return visitExpressionStatement(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, noDestructuringValue);
default:
return ts.visitEachChild(node, visitor, context);
}
}
+ function visitAwaitExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.createArrayLiteral([ts.createLiteral("await"), expression])), node), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitYieldExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.updateYield(node, node.asteriskToken, node.asteriskToken
+ ? createAsyncDelegatorHelper(context, expression, expression)
+ : ts.createArrayLiteral(expression
+ ? [ts.createLiteral("yield"), expression]
+ : [ts.createLiteral("yield")]));
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitLabeledStatement(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var statement = ts.unwrapInnermostStatementOfLabel(node);
+ if (statement.kind === 215 && statement.awaitModifier) {
+ return visitForOfStatement(statement, node);
+ }
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
function chunkObjectLiteralElements(elements) {
var chunkObject;
var objects = [];
- for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
- var e = elements_3[_i];
- if (e.kind === 259) {
+ for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
+ var e = elements_4[_i];
+ if (e.kind === 262) {
if (chunkObject) {
objects.push(ts.createObjectLiteral(chunkObject));
chunkObject = undefined;
@@ -40495,7 +43598,7 @@ var ts;
if (!chunkObject) {
chunkObject = [];
}
- if (e.kind === 257) {
+ if (e.kind === 260) {
var p = e;
chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression)));
}
@@ -40512,7 +43615,7 @@ var ts;
function visitObjectLiteralExpression(node) {
if (node.transformFlags & 1048576) {
var objects = chunkObjectLiteralElements(node.properties);
- if (objects.length && objects[0].kind !== 176) {
+ if (objects.length && objects[0].kind !== 177) {
objects.unshift(ts.createObjectLiteral());
}
return createAssignHelper(context, objects);
@@ -40546,68 +43649,202 @@ var ts;
function visitVoidExpression(node) {
return ts.visitEachChild(node, visitorNoDestructuringValue, context);
}
- function visitForOfStatement(node) {
- var leadingStatements;
- var temp;
- var initializer = ts.skipParentheses(node.initializer);
- if (initializer.transformFlags & 1048576) {
- if (ts.isVariableDeclarationList(initializer)) {
- temp = ts.createTempVariable(undefined);
- var firstDeclaration = ts.firstOrUndefined(initializer.declarations);
- var declarations = ts.flattenDestructuringBinding(firstDeclaration, visitor, context, 1, temp, false, true);
- if (ts.some(declarations)) {
- var statement = ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(initializer, declarations), initializer);
- leadingStatements = ts.append(leadingStatements, statement);
- }
- }
- else if (ts.isAssignmentPattern(initializer)) {
- temp = ts.createTempVariable(undefined);
- var expression = ts.flattenDestructuringAssignment(ts.aggregateTransformFlags(ts.createAssignment(initializer, temp, node.initializer)), visitor, context, 1);
- leadingStatements = ts.append(leadingStatements, ts.createStatement(expression, node.initializer));
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ if (node.initializer.transformFlags & 1048576) {
+ node = transformForOfStatementWithObjectRest(node);
+ }
+ if (node.awaitModifier) {
+ return transformForAwaitOfStatement(node, outermostLabeledStatement);
+ }
+ else {
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement);
+ }
+ }
+ function transformForOfStatementWithObjectRest(node) {
+ var initializerWithoutParens = ts.skipParentheses(node.initializer);
+ if (ts.isVariableDeclarationList(initializerWithoutParens) || ts.isAssignmentPattern(initializerWithoutParens)) {
+ var bodyLocation = void 0;
+ var statementsLocation = void 0;
+ var temp = ts.createTempVariable(undefined);
+ var statements = [ts.createForOfBindingStatement(initializerWithoutParens, temp)];
+ if (ts.isBlock(node.statement)) {
+ ts.addRange(statements, node.statement.statements);
+ bodyLocation = node.statement;
+ statementsLocation = node.statement.statements;
}
+ return ts.updateForOf(node, node.awaitModifier, ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(temp), node.initializer)
+ ], 1), node.initializer), node.expression, ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation));
}
- if (temp) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
- var block = ts.isBlock(statement)
- ? ts.updateBlock(statement, ts.createNodeArray(ts.concatenate(leadingStatements, statement.statements), statement.statements))
- : ts.createBlock(ts.append(leadingStatements, statement), statement, true);
- return ts.updateForOf(node, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(temp, undefined, undefined, node.initializer)
- ], node.initializer, 1), expression, block);
+ return node;
+ }
+ function convertForOfStatementHead(node, boundValue) {
+ var binding = ts.createForOfBindingStatement(node.initializer, boundValue);
+ var bodyLocation;
+ var statementsLocation;
+ var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ if (ts.isBlock(statement)) {
+ ts.addRange(statements, statement.statements);
+ bodyLocation = statement;
+ statementsLocation = statement.statements;
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ statements.push(statement);
+ }
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function transformForAwaitOfStatement(node, outermostLabeledStatement) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = createAsyncValuesHelper(context, expression, node.expression);
+ var next = ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, [])
+ ])
+ : ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []));
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"))), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createFunctionCall(returnMethod, iterator, [])
+ ])
+ : ts.createFunctionCall(returnMethod, iterator, [])))), 1)
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitParameter(node) {
if (node.transformFlags & 1048576) {
- return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
}
return ts.visitEachChild(node, visitor, context);
}
function visitConstructorDeclaration(node) {
- return ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitGetAccessorDeclaration(node) {
- return ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitSetAccessorDeclaration(node) {
- return ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateMethod(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.isToken), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionDeclaration(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionExpression(node, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
+ }
+ function transformAsyncGeneratorFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ appendObjectRestAssignmentsIfNeeded(statements, node);
+ statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.updateBlock(node.body, statements);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
}
function transformFunctionBody(node) {
resumeLexicalEnvironment();
- var leadingStatements;
+ var statementOffset = 0;
+ var statements = [];
+ var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
+ if (ts.isBlock(body)) {
+ statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
+ }
+ ts.addRange(statements, appendObjectRestAssignmentsIfNeeded(undefined, node));
+ var trailingStatements = endLexicalEnvironment();
+ if (statementOffset > 0 || ts.some(statements) || ts.some(trailingStatements)) {
+ var block = ts.convertToFunctionBody(body, true);
+ ts.addRange(statements, block.statements.slice(statementOffset));
+ ts.addRange(statements, trailingStatements);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(statements), block.statements));
+ }
+ return body;
+ }
+ function appendObjectRestAssignmentsIfNeeded(statements, node) {
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
if (parameter.transformFlags & 1048576) {
@@ -40616,17 +43853,95 @@ var ts;
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
ts.setEmitFlags(statement, 524288);
- leadingStatements = ts.append(leadingStatements, statement);
+ statements = ts.append(statements, statement);
}
}
}
- var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
- var trailingStatements = endLexicalEnvironment();
- if (ts.some(leadingStatements) || ts.some(trailingStatements)) {
- var block = ts.convertToFunctionBody(body, true);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(ts.concatenate(leadingStatements, block.statements), trailingStatements), block.statements));
+ return statements;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
}
- return body;
}
}
ts.transformESNext = transformESNext;
@@ -40637,25 +43952,57 @@ var ts;
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
};
function createAssignHelper(context, attributesSegments) {
+ if (context.getCompilerOptions().target >= 2) {
+ return ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "assign"), undefined, attributesSegments);
+ }
context.requestEmitHelper(assignHelper);
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var asyncGeneratorHelper = {
+ name: "typescript:asyncGenerator",
+ scoped: false,
+ text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), q = [], c, i;\n return i = { next: verb(\"next\"), \"throw\": verb(\"throw\"), \"return\": verb(\"return\") }, i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { return function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]), next(); }); }; }\n function next() { if (!c && q.length) resume((c = q.shift())[0], c[1]); }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(c[3], e); } }\n function step(r) { r.done ? settle(c[2], r) : Promise.resolve(r.value[1]).then(r.value[0] === \"yield\" ? _yield : r.value[0] === \"delegate\" ? delegate : fulfill, reject); }\n function _yield(value) { settle(c[2], { value: value, done: false }); }\n function delegate(r) { step(r.done ? r : { value: [\"yield\", r.value], done: false }); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { c = void 0, f(v), next(); }\n };\n "
+ };
+ function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(asyncGeneratorHelper);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
+ ts.createThis(),
+ ts.createIdentifier("arguments"),
+ generatorFunc
+ ]);
+ }
+ var asyncDelegator = {
+ name: "typescript:asyncDelegator",
+ scoped: false,
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i = { next: verb(\"next\"), \"throw\": verb(\"throw\", function (e) { throw e; }), \"return\": verb(\"return\", function (v) { return { value: v, done: true }; }) };\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return { value: [\"delegate\", (o[n] || f).call(o, v)], done: false }; }; }\n };\n "
+ };
+ function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(asyncDelegator);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
+ }
+ var asyncValues = {
+ name: "typescript:asyncValues",
+ scoped: false,
+ text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n "
+ };
+ function createAsyncValuesHelper(context, expression, location) {
+ context.requestEmitHelper(asyncValues);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"), undefined, [expression]), location);
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformJsx(context) {
var compilerOptions = context.getCompilerOptions();
- var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
var visited = ts.visitEachChild(node, visitor, context);
ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
return visited;
}
function visitor(node) {
@@ -40668,11 +44015,11 @@ var ts;
}
function visitorWorker(node) {
switch (node.kind) {
- case 246:
+ case 248:
return visitJsxElement(node, false);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, false);
- case 252:
+ case 255:
return visitJsxExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -40682,11 +44029,11 @@ var ts;
switch (node.kind) {
case 10:
return visitJsxText(node);
- case 252:
+ case 255:
return visitJsxExpression(node);
- case 246:
+ case 248:
return visitJsxElement(node, true);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, true);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -40702,7 +44049,7 @@ var ts;
function visitJsxOpeningLikeElement(node, children, isChild, location) {
var tagName = getTagName(node);
var objectProperties;
- var attrs = node.attributes;
+ var attrs = node.attributes.properties;
if (attrs.length === 0) {
objectProperties = ts.createNull();
}
@@ -40734,13 +44081,16 @@ var ts;
}
function transformJsxAttributeInitializer(node) {
if (node === undefined) {
- return ts.createLiteral(true);
+ return ts.createTrue();
}
else if (node.kind === 9) {
var decoded = tryDecodeEntities(node.text);
- return decoded ? ts.createLiteral(decoded, node) : node;
+ return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node;
}
- else if (node.kind === 252) {
+ else if (node.kind === 255) {
+ if (node.expression === undefined) {
+ return ts.createTrue();
+ }
return visitJsxExpression(node);
}
else {
@@ -40748,43 +44098,35 @@ var ts;
}
}
function visitJsxText(node) {
- var text = ts.getTextOfNode(node, true);
- var parts;
+ var fixed = fixupWhitespaceAndDecodeEntities(ts.getTextOfNode(node, true));
+ return fixed === undefined ? undefined : ts.createLiteral(fixed);
+ }
+ function fixupWhitespaceAndDecodeEntities(text) {
+ var acc;
var firstNonWhitespace = 0;
var lastNonWhitespace = -1;
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
if (ts.isLineBreak(c)) {
- if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) {
- var part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
+ if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {
+ acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));
}
firstNonWhitespace = -1;
}
- else if (!ts.isWhiteSpace(c)) {
+ else if (!ts.isWhiteSpaceSingleLine(c)) {
lastNonWhitespace = i;
if (firstNonWhitespace === -1) {
firstNonWhitespace = i;
}
}
}
- if (firstNonWhitespace !== -1) {
- var part = text.substr(firstNonWhitespace);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
- }
- if (parts) {
- return ts.reduceLeft(parts, aggregateJsxTextParts);
- }
- return undefined;
+ return firstNonWhitespace !== -1
+ ? addLineOfJsxText(acc, text.substr(firstNonWhitespace))
+ : acc;
}
- function aggregateJsxTextParts(left, right) {
- return ts.createAdd(ts.createAdd(left, ts.createLiteral(" ")), right);
+ function addLineOfJsxText(acc, trimmedLine) {
+ var decoded = decodeEntities(trimmedLine);
+ return acc === undefined ? decoded : acc + " " + decoded;
}
function decodeEntities(text) {
return text.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, function (match, _all, _number, _digits, decimal, hex, word) {
@@ -40795,7 +44137,7 @@ var ts;
return String.fromCharCode(parseInt(hex, 16));
}
else {
- var ch = entities[word];
+ var ch = entities.get(word);
return ch ? String.fromCharCode(ch) : match;
}
});
@@ -40805,16 +44147,16 @@ var ts;
return decoded === text ? undefined : decoded;
}
function getTagName(node) {
- if (node.kind === 246) {
+ if (node.kind === 248) {
return getTagName(node.openingElement);
}
else {
- var name_36 = node.tagName;
- if (ts.isIdentifier(name_36) && ts.isIntrinsicJsxName(name_36.text)) {
- return ts.createLiteral(name_36.text);
+ var name = node.tagName;
+ if (ts.isIdentifier(name) && ts.isIntrinsicJsxName(name.text)) {
+ return ts.createLiteral(name.text);
}
else {
- return ts.createExpressionFromEntityName(name_36);
+ return ts.createExpressionFromEntityName(name);
}
}
}
@@ -40832,7 +44174,7 @@ var ts;
}
}
ts.transformJsx = transformJsx;
- var entities = ts.createMap({
+ var entities = ts.createMapFromTemplate({
"quot": 0x0022,
"amp": 0x0026,
"apos": 0x0027,
@@ -41090,263 +44432,6 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function transformES2017(context) {
- var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
- var resolver = context.getEmitResolver();
- var compilerOptions = context.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var currentSourceFile;
- var enabledSubstitutions;
- var currentSuperContainer;
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
- }
- currentSourceFile = node;
- var visited = ts.visitEachChild(node, visitor, context);
- ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
- return visited;
- }
- function visitor(node) {
- if ((node.transformFlags & 16) === 0) {
- return node;
- }
- switch (node.kind) {
- case 119:
- return undefined;
- case 189:
- return visitAwaitExpression(node);
- case 149:
- return visitMethodDeclaration(node);
- case 225:
- return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
- case 185:
- return visitArrowFunction(node);
- default:
- return ts.visitEachChild(node, visitor, context);
- }
- }
- function visitAwaitExpression(node) {
- return ts.setOriginalNode(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression), node), node);
- }
- function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
- return ts.createOmittedExpression();
- }
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function transformAsyncFunctionBody(node) {
- resumeLexicalEnvironment();
- var original = ts.getOriginalNode(node, ts.isFunctionLike);
- var nodeType = original.type;
- var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
- var isArrowFunction = node.kind === 185;
- var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
- if (!isArrowFunction) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.body.statements, false, visitor);
- statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
- ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(statements, node.body, true);
- if (languageVersion >= 2) {
- if (resolver.getNodeCheckFlags(node) & 4096) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, advancedAsyncSuperHelper);
- }
- else if (resolver.getNodeCheckFlags(node) & 2048) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, asyncSuperHelper);
- }
- }
- return block;
- }
- else {
- var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
- var declarations = endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(expression);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(block.statements, declarations), block.statements));
- }
- return expression;
- }
- }
- function transformFunctionBodyWorker(body, start) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
- }
- else {
- startLexicalEnvironment();
- var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
- var declarations = endLexicalEnvironment();
- return ts.updateBlock(visited, ts.createNodeArray(ts.concatenate(visited.statements, declarations), visited.statements));
- }
- }
- function getPromiseConstructor(type) {
- var typeName = type && ts.getEntityNameFromTypeNode(type);
- if (typeName && ts.isEntityName(typeName)) {
- var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
- if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
- || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
- return typeName;
- }
- }
- return undefined;
- }
- function enableSubstitutionForAsyncMethodsWithSuper() {
- if ((enabledSubstitutions & 1) === 0) {
- enabledSubstitutions |= 1;
- context.enableSubstitution(179);
- context.enableSubstitution(177);
- context.enableSubstitution(178);
- context.enableEmitNotification(226);
- context.enableEmitNotification(149);
- context.enableEmitNotification(151);
- context.enableEmitNotification(152);
- context.enableEmitNotification(150);
- }
- }
- function substituteExpression(node) {
- switch (node.kind) {
- case 177:
- return substitutePropertyAccessExpression(node);
- case 178:
- return substituteElementAccessExpression(node);
- case 179:
- if (enabledSubstitutions & 1) {
- return substituteCallExpression(node);
- }
- break;
- }
- return node;
- }
- function substitutePropertyAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), flags, node);
- }
- }
- return node;
- }
- function substituteElementAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(node.argumentExpression, flags, node);
- }
- }
- return node;
- }
- function substituteCallExpression(node) {
- var expression = node.expression;
- if (ts.isSuperProperty(expression)) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- var argumentExpression = ts.isPropertyAccessExpression(expression)
- ? substitutePropertyAccessExpression(expression)
- : substituteElementAccessExpression(expression);
- return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
- ts.createThis()
- ].concat(node.arguments));
- }
- }
- return node;
- }
- function isSuperContainer(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 150
- || kind === 149
- || kind === 151
- || kind === 152;
- }
- function onEmitNode(emitContext, node, emitCallback) {
- if (enabledSubstitutions & 1 && isSuperContainer(node)) {
- var savedCurrentSuperContainer = currentSuperContainer;
- currentSuperContainer = node;
- previousOnEmitNode(emitContext, node, emitCallback);
- currentSuperContainer = savedCurrentSuperContainer;
- }
- else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
- return substituteExpression(node);
- }
- return node;
- }
- function createSuperAccessInAsyncMethod(argumentExpression, flags, location) {
- if (flags & 4096) {
- return ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value", location);
- }
- else {
- return ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression], location);
- }
- }
- function getSuperContainerAsyncMethodFlags() {
- return currentSuperContainer !== undefined
- && resolver.getNodeCheckFlags(currentSuperContainer) & (2048 | 4096);
- }
- }
- ts.transformES2017 = transformES2017;
- function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
- context.requestEmitHelper(awaiterHelper);
- var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
- return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
- ts.createThis(),
- hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
- promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
- generatorFunc
- ]);
- }
- var awaiterHelper = {
- name: "typescript:awaiter",
- scoped: false,
- priority: 5,
- text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments)).next());\n });\n };"
- };
- var asyncSuperHelper = {
- name: "typescript:async-super",
- scoped: true,
- text: "\n const _super = name => super[name];"
- };
- var advancedAsyncSuperHelper = {
- name: "typescript:advanced-async-super",
- scoped: true,
- text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"
- };
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
function transformES2016(context) {
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
@@ -41361,7 +44446,7 @@ var ts;
return node;
}
switch (node.kind) {
- case 192:
+ case 193:
return visitBinaryExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -41385,19 +44470,19 @@ var ts;
if (ts.isElementAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
var argumentExpressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createElementAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), ts.createAssignment(argumentExpressionTemp, left.argumentExpression, left.argumentExpression), left);
- value = ts.createElementAccess(expressionTemp, argumentExpressionTemp, left);
+ target = ts.setTextRange(ts.createElementAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), ts.setTextRange(ts.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)), left);
+ value = ts.setTextRange(ts.createElementAccess(expressionTemp, argumentExpressionTemp), left);
}
else if (ts.isPropertyAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createPropertyAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), left.name, left);
- value = ts.createPropertyAccess(expressionTemp, left.name, left);
+ target = ts.setTextRange(ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), left.name), left);
+ value = ts.setTextRange(ts.createPropertyAccess(expressionTemp, left.name), left);
}
else {
target = left;
value = left;
}
- return ts.createAssignment(target, ts.createMathPow(value, right, node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.createMathPow(value, right, node)), node);
}
function visitExponentiationExpression(node) {
var left = ts.visitNode(node.left, visitor, ts.isExpression);
@@ -41409,8 +44494,78 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ES2015SubstitutionFlags;
+ (function (ES2015SubstitutionFlags) {
+ ES2015SubstitutionFlags[ES2015SubstitutionFlags["CapturedThis"] = 1] = "CapturedThis";
+ ES2015SubstitutionFlags[ES2015SubstitutionFlags["BlockScopedBindings"] = 2] = "BlockScopedBindings";
+ })(ES2015SubstitutionFlags || (ES2015SubstitutionFlags = {}));
+ var CopyDirection;
+ (function (CopyDirection) {
+ CopyDirection[CopyDirection["ToOriginal"] = 0] = "ToOriginal";
+ CopyDirection[CopyDirection["ToOutParameter"] = 1] = "ToOutParameter";
+ })(CopyDirection || (CopyDirection = {}));
+ var Jump;
+ (function (Jump) {
+ Jump[Jump["Break"] = 2] = "Break";
+ Jump[Jump["Continue"] = 4] = "Continue";
+ Jump[Jump["Return"] = 8] = "Return";
+ })(Jump || (Jump = {}));
+ var SuperCaptureResult;
+ (function (SuperCaptureResult) {
+ SuperCaptureResult[SuperCaptureResult["NoReplacement"] = 0] = "NoReplacement";
+ SuperCaptureResult[SuperCaptureResult["ReplaceSuperCapture"] = 1] = "ReplaceSuperCapture";
+ SuperCaptureResult[SuperCaptureResult["ReplaceWithReturn"] = 2] = "ReplaceWithReturn";
+ })(SuperCaptureResult || (SuperCaptureResult = {}));
+ var HierarchyFacts;
+ (function (HierarchyFacts) {
+ HierarchyFacts[HierarchyFacts["None"] = 0] = "None";
+ HierarchyFacts[HierarchyFacts["Function"] = 1] = "Function";
+ HierarchyFacts[HierarchyFacts["ArrowFunction"] = 2] = "ArrowFunction";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBody"] = 4] = "AsyncFunctionBody";
+ HierarchyFacts[HierarchyFacts["NonStaticClassElement"] = 8] = "NonStaticClassElement";
+ HierarchyFacts[HierarchyFacts["CapturesThis"] = 16] = "CapturesThis";
+ HierarchyFacts[HierarchyFacts["ExportedVariableStatement"] = 32] = "ExportedVariableStatement";
+ HierarchyFacts[HierarchyFacts["TopLevel"] = 64] = "TopLevel";
+ HierarchyFacts[HierarchyFacts["Block"] = 128] = "Block";
+ HierarchyFacts[HierarchyFacts["IterationStatement"] = 256] = "IterationStatement";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlock"] = 512] = "IterationStatementBlock";
+ HierarchyFacts[HierarchyFacts["ForStatement"] = 1024] = "ForStatement";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement";
+ HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName";
+ HierarchyFacts[HierarchyFacts["AncestorFactsMask"] = 16383] = "AncestorFactsMask";
+ HierarchyFacts[HierarchyFacts["BlockScopeIncludes"] = 0] = "BlockScopeIncludes";
+ HierarchyFacts[HierarchyFacts["BlockScopeExcludes"] = 4032] = "BlockScopeExcludes";
+ HierarchyFacts[HierarchyFacts["SourceFileIncludes"] = 64] = "SourceFileIncludes";
+ HierarchyFacts[HierarchyFacts["SourceFileExcludes"] = 3968] = "SourceFileExcludes";
+ HierarchyFacts[HierarchyFacts["FunctionIncludes"] = 65] = "FunctionIncludes";
+ HierarchyFacts[HierarchyFacts["FunctionExcludes"] = 16286] = "FunctionExcludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyIncludes"] = 69] = "AsyncFunctionBodyIncludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyExcludes"] = 16278] = "AsyncFunctionBodyExcludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionIncludes"] = 66] = "ArrowFunctionIncludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionExcludes"] = 16256] = "ArrowFunctionExcludes";
+ HierarchyFacts[HierarchyFacts["ConstructorIncludes"] = 73] = "ConstructorIncludes";
+ HierarchyFacts[HierarchyFacts["ConstructorExcludes"] = 16278] = "ConstructorExcludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementIncludes"] = 256] = "DoOrWhileStatementIncludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementExcludes"] = 0] = "DoOrWhileStatementExcludes";
+ HierarchyFacts[HierarchyFacts["ForStatementIncludes"] = 1280] = "ForStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForStatementExcludes"] = 3008] = "ForStatementExcludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementIncludes"] = 2304] = "ForInOrForOfStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementExcludes"] = 1984] = "ForInOrForOfStatementExcludes";
+ HierarchyFacts[HierarchyFacts["BlockIncludes"] = 128] = "BlockIncludes";
+ HierarchyFacts[HierarchyFacts["BlockExcludes"] = 3904] = "BlockExcludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockIncludes"] = 512] = "IterationStatementBlockIncludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockExcludes"] = 4032] = "IterationStatementBlockExcludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameIncludes"] = 8192] = "ComputedPropertyNameIncludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameExcludes"] = 0] = "ComputedPropertyNameExcludes";
+ HierarchyFacts[HierarchyFacts["NewTarget"] = 16384] = "NewTarget";
+ HierarchyFacts[HierarchyFacts["NewTargetInComputedPropertyName"] = 32768] = "NewTargetInComputedPropertyName";
+ HierarchyFacts[HierarchyFacts["SubtreeFactsMask"] = -16384] = "SubtreeFactsMask";
+ HierarchyFacts[HierarchyFacts["PropagateNewTargetMask"] = 49152] = "PropagateNewTargetMask";
+ })(HierarchyFacts || (HierarchyFacts = {}));
function transformES2015(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
@@ -41418,15 +44573,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
var currentSourceFile;
var currentText;
- var currentParent;
- var currentNode;
- var enclosingVariableStatement;
- var enclosingBlockScopeContainer;
- var enclosingBlockScopeContainerParent;
- var enclosingFunction;
- var enclosingNonArrowFunction;
- var enclosingNonAsyncFunctionBody;
- var isInConstructorWithCapturedSuper;
+ var hierarchyFacts;
var convertedLoopState;
var enabledSubstitutions;
return transformSourceFile;
@@ -41436,247 +44583,207 @@ var ts;
}
currentSourceFile = node;
currentText = node.text;
- var visited = saveStateAndInvoke(node, visitSourceFile);
+ var visited = visitSourceFile(node);
ts.addEmitHelpers(visited, context.readEmitHelpers());
currentSourceFile = undefined;
currentText = undefined;
+ hierarchyFacts = 0;
return visited;
}
- function visitor(node) {
- return saveStateAndInvoke(node, dispatcher);
- }
- function dispatcher(node) {
- return convertedLoopState
- ? visitorForConvertedLoopWorker(node)
- : visitorWorker(node);
- }
- function saveStateAndInvoke(node, f) {
- var savedEnclosingFunction = enclosingFunction;
- var savedEnclosingNonArrowFunction = enclosingNonArrowFunction;
- var savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody;
- var savedEnclosingBlockScopeContainer = enclosingBlockScopeContainer;
- var savedEnclosingBlockScopeContainerParent = enclosingBlockScopeContainerParent;
- var savedEnclosingVariableStatement = enclosingVariableStatement;
- var savedCurrentParent = currentParent;
- var savedCurrentNode = currentNode;
- var savedConvertedLoopState = convertedLoopState;
- var savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper;
- if (ts.nodeStartsNewLexicalEnvironment(node)) {
- isInConstructorWithCapturedSuper = false;
- convertedLoopState = undefined;
- }
- onBeforeVisitNode(node);
- var visited = f(node);
- isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper;
- convertedLoopState = savedConvertedLoopState;
- enclosingFunction = savedEnclosingFunction;
- enclosingNonArrowFunction = savedEnclosingNonArrowFunction;
- enclosingNonAsyncFunctionBody = savedEnclosingNonAsyncFunctionBody;
- enclosingBlockScopeContainer = savedEnclosingBlockScopeContainer;
- enclosingBlockScopeContainerParent = savedEnclosingBlockScopeContainerParent;
- enclosingVariableStatement = savedEnclosingVariableStatement;
- currentParent = savedCurrentParent;
- currentNode = savedCurrentNode;
- return visited;
- }
- function onBeforeVisitNode(node) {
- if (currentNode) {
- if (ts.isBlockScope(currentNode, currentParent)) {
- enclosingBlockScopeContainer = currentNode;
- enclosingBlockScopeContainerParent = currentParent;
- }
- if (ts.isFunctionLike(currentNode)) {
- enclosingFunction = currentNode;
- if (currentNode.kind !== 185) {
- enclosingNonArrowFunction = currentNode;
- if (!(ts.getEmitFlags(currentNode) & 131072)) {
- enclosingNonAsyncFunctionBody = currentNode;
- }
- }
- }
- switch (currentNode.kind) {
- case 205:
- enclosingVariableStatement = currentNode;
- break;
- case 224:
- case 223:
- case 174:
- case 172:
- case 173:
- break;
- default:
- enclosingVariableStatement = undefined;
- }
- }
- currentParent = currentNode;
- currentNode = node;
+ function enterSubtree(excludeFacts, includeFacts) {
+ var ancestorFacts = hierarchyFacts;
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383;
+ return ancestorFacts;
}
- function returnCapturedThis(node) {
- return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
+ function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 | ancestorFacts;
}
function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
- return isInConstructorWithCapturedSuper && node.kind === 216 && !node.expression;
+ return hierarchyFacts & 4096
+ && node.kind === 218
+ && !node.expression;
}
- function shouldCheckNode(node) {
- return (node.transformFlags & 64) !== 0 ||
- node.kind === 219 ||
- (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ function shouldVisitNode(node) {
+ return (node.transformFlags & 128) !== 0
+ || convertedLoopState !== undefined
+ || (hierarchyFacts & 4096 && ts.isStatement(node))
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
}
- function visitorWorker(node) {
- if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
- return returnCapturedThis(node);
- }
- else if (shouldCheckNode(node)) {
+ function visitor(node) {
+ if (shouldVisitNode(node)) {
return visitJavaScript(node);
}
- else if (node.transformFlags & 128 || (isInConstructorWithCapturedSuper && !ts.isExpression(node))) {
- return ts.visitEachChild(node, visitor, context);
- }
else {
return node;
}
}
- function visitorForConvertedLoopWorker(node) {
- var result;
- if (shouldCheckNode(node)) {
- result = visitJavaScript(node);
- }
- else {
- result = visitNodesInConvertedLoop(node);
+ function functionBodyVisitor(node) {
+ if (shouldVisitNode(node)) {
+ return visitBlock(node, true);
}
- return result;
+ return node;
}
- function visitNodesInConvertedLoop(node) {
- switch (node.kind) {
- case 216:
- node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node;
- return visitReturnStatement(node);
- case 205:
- return visitVariableStatement(node);
- case 218:
- return visitSwitchStatement(node);
- case 215:
- case 214:
- return visitBreakOrContinueStatement(node);
- case 98:
- return visitThisKeyword(node);
- case 70:
- return visitIdentifier(node);
- default:
- return ts.visitEachChild(node, visitor, context);
+ function callExpressionVisitor(node) {
+ if (node.kind === 96) {
+ return visitSuperKeyword(true);
}
+ return visitor(node);
}
function visitJavaScript(node) {
switch (node.kind) {
case 114:
return undefined;
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 185:
+ case 186:
return visitArrowFunction(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
case 70:
return visitIdentifier(node);
- case 224:
+ case 226:
return visitVariableDeclarationList(node);
- case 219:
+ case 220:
+ return visitSwitchStatement(node);
+ case 234:
+ return visitCaseBlock(node);
+ case 206:
+ return visitBlock(node, false);
+ case 217:
+ case 216:
+ return visitBreakOrContinueStatement(node);
+ case 221:
return visitLabeledStatement(node);
- case 209:
- return visitDoStatement(node);
- case 210:
- return visitWhileStatement(node);
case 211:
- return visitForStatement(node);
case 212:
- return visitForInStatement(node);
+ return visitDoOrWhileStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 207:
+ return visitForStatement(node, undefined);
+ case 214:
+ return visitForInStatement(node, undefined);
+ case 215:
+ return visitForOfStatement(node, undefined);
+ case 209:
return visitExpressionStatement(node);
- case 176:
+ case 177:
return visitObjectLiteralExpression(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 258:
+ case 261:
return visitShorthandPropertyAssignment(node);
- case 175:
+ case 143:
+ return visitComputedPropertyName(node);
+ case 176:
return visitArrayLiteralExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, true);
- case 192:
+ case 193:
return visitBinaryExpression(node, true);
case 12:
case 13:
case 14:
case 15:
return visitTemplateLiteral(node);
- case 181:
+ case 9:
+ return visitStringLiteral(node);
+ case 8:
+ return visitNumericLiteral(node);
+ case 182:
return visitTaggedTemplateExpression(node);
- case 194:
- return visitTemplateExpression(node);
case 195:
- return visitYieldExpression(node);
+ return visitTemplateExpression(node);
case 196:
+ return visitYieldExpression(node);
+ case 197:
return visitSpreadElement(node);
case 96:
- return visitSuperKeyword();
- case 195:
- return ts.visitEachChild(node, visitor, context);
- case 149:
+ return visitSuperKeyword(false);
+ case 98:
+ return visitThisKeyword(node);
+ case 203:
+ return visitMetaProperty(node);
+ case 150:
return visitMethodDeclaration(node);
- case 205:
+ case 152:
+ case 153:
+ return visitAccessorDeclaration(node);
+ case 207:
return visitVariableStatement(node);
+ case 218:
+ return visitReturnStatement(node);
default:
- ts.Debug.failBadSyntaxKind(node);
return ts.visitEachChild(node, visitor, context);
}
}
function visitSourceFile(node) {
+ var ancestorFacts = enterSubtree(3968, 64);
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, false, visitor);
+ var statementOffset = ts.addStandardPrologue(statements, node.statements, false);
addCaptureThisForNodeIfNeeded(statements, node);
+ statementOffset = ts.addCustomPrologue(statements, node.statements, statementOffset, visitor);
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
ts.addRange(statements, endLexicalEnvironment());
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ exitSubtree(ancestorFacts, 0, 0);
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
function visitSwitchStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
- convertedLoopState.allowedNonLabeledJumps |= 2;
- var result = ts.visitEachChild(node, visitor, context);
- convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
- return result;
+ if (convertedLoopState !== undefined) {
+ var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
+ convertedLoopState.allowedNonLabeledJumps |= 2;
+ var result = ts.visitEachChild(node, visitor, context);
+ convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
+ return result;
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitCaseBlock(node) {
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function returnCapturedThis(node) {
+ return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
}
function visitReturnStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- convertedLoopState.nonLocalJumps |= 8;
- return ts.createReturn(ts.createObjectLiteral([
- ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
- ? ts.visitNode(node.expression, visitor, ts.isExpression)
- : ts.createVoidZero())
- ]));
+ if (convertedLoopState) {
+ convertedLoopState.nonLocalJumps |= 8;
+ if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ node = returnCapturedThis(node);
+ }
+ return ts.createReturn(ts.createObjectLiteral([
+ ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
+ ? ts.visitNode(node.expression, visitor, ts.isExpression)
+ : ts.createVoidZero())
+ ]));
+ }
+ else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ return returnCapturedThis(node);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitThisKeyword(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- if (enclosingFunction && enclosingFunction.kind === 185) {
- convertedLoopState.containsLexicalThis = true;
- return node;
+ if (convertedLoopState) {
+ if (hierarchyFacts & 2) {
+ convertedLoopState.containsLexicalThis = true;
+ return node;
+ }
+ return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
}
- return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
+ return node;
}
function visitIdentifier(node) {
if (!convertedLoopState) {
@@ -41685,20 +44792,20 @@ var ts;
if (ts.isGeneratedIdentifier(node)) {
return node;
}
- if (node.text !== "arguments" && !resolver.isArgumentsLocalBinding(node)) {
+ if (node.text !== "arguments" || !resolver.isArgumentsLocalBinding(node)) {
return node;
}
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = ts.createUniqueName("arguments"));
}
function visitBreakOrContinueStatement(node) {
if (convertedLoopState) {
- var jump = node.kind === 215 ? 2 : 4;
- var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||
+ var jump = node.kind === 217 ? 2 : 4;
+ var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) ||
(!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
if (!canUseBreakOrContinue) {
var labelMarker = void 0;
if (!node.label) {
- if (node.kind === 215) {
+ if (node.kind === 217) {
convertedLoopState.nonLocalJumps |= 2;
labelMarker = "break";
}
@@ -41708,7 +44815,7 @@ var ts;
}
}
else {
- if (node.kind === 215) {
+ if (node.kind === 217) {
labelMarker = "break-" + node.label.text;
setLabeledJump(convertedLoopState, true, node.label.text, labelMarker);
}
@@ -41741,8 +44848,9 @@ var ts;
var variable = ts.createVariableDeclaration(ts.getLocalName(node, true), undefined, transformClassLikeDeclarationToExpression(node));
ts.setOriginalNode(variable, node);
var statements = [];
- var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]), node);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, node);
ts.startOnNewLine(statement);
statements.push(statement);
if (ts.hasModifier(node, 1)) {
@@ -41797,23 +44905,29 @@ var ts;
ts.setEmitFlags(statement, 1536 | 384);
statements.push(statement);
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
ts.setEmitFlags(block, 1536);
return block;
}
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
if (extendsClauseElement) {
- statements.push(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node)), extendsClauseElement));
+ statements.push(ts.setTextRange(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node))), extendsClauseElement));
}
}
function addConstructor(statements, node, extendsClauseElement) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16278, 73);
var constructor = ts.getFirstConstructorWithBody(node);
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
- var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper), constructor || node);
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
+ ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
}
statements.push(constructorFunction);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
}
function transformConstructorParameters(constructor, hasSynthesizedSuper) {
return ts.visitParameterList(constructor && !hasSynthesizedSuper && constructor.parameters, visitor, context)
@@ -41827,48 +44941,55 @@ var ts;
statementOffset = 0;
}
else if (constructor) {
- statementOffset = ts.addPrologueDirectives(statements, constructor.body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, constructor.body.statements, false);
}
if (constructor) {
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
+ if (!hasSynthesizedSuper) {
+ statementOffset = ts.addCustomPrologue(statements, constructor.body.statements, statementOffset, visitor);
+ }
ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
}
- var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94;
+ var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
if (superCaptureStatus === 1 || superCaptureStatus === 2) {
statementOffset++;
}
if (constructor) {
- var body = saveStateAndInvoke(constructor, function (constructor) {
- isInConstructorWithCapturedSuper = superCaptureStatus === 1;
- return ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset);
- });
- ts.addRange(statements, body);
+ if (superCaptureStatus === 1) {
+ hierarchyFacts |= 4096;
+ }
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset));
}
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== 2
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(ts.createReturn(ts.createIdentifier("_this")));
}
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : node, true);
+ if (constructor) {
+ prependCaptureNewTargetIfNeeded(statements, constructor, false);
+ }
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true);
+ ts.setTextRange(block, constructor ? constructor.body : node);
if (!constructor) {
ts.setEmitFlags(block, 1536);
}
return block;
}
function isSufficientlyCoveredByReturnStatements(statement) {
- if (statement.kind === 216) {
+ if (statement.kind === 218) {
return true;
}
- else if (statement.kind === 208) {
+ else if (statement.kind === 210) {
var ifStatement = statement;
if (ifStatement.elseStatement) {
return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
}
}
- else if (statement.kind === 204) {
+ else if (statement.kind === 206) {
var lastStatement = ts.lastOrUndefined(statement.statements);
if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
return true;
@@ -41876,8 +44997,8 @@ var ts;
}
return false;
}
- function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, hasExtendsClause, hasSynthesizedSuper, statementOffset) {
- if (!hasExtendsClause) {
+ function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, isDerivedClass, hasSynthesizedSuper, statementOffset) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -41897,42 +45018,43 @@ var ts;
var ctorStatements = ctor.body.statements;
if (statementOffset < ctorStatements.length) {
firstStatement = ctorStatements[statementOffset];
- if (firstStatement.kind === 207 && ts.isSuperCall(firstStatement.expression)) {
- var superCall = firstStatement.expression;
- superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
+ if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) {
+ superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression);
}
}
- if (superCallExpression && statementOffset === ctorStatements.length - 1) {
+ if (superCallExpression
+ && statementOffset === ctorStatements.length - 1
+ && !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
- if (superCallExpression.kind !== 192
- || superCallExpression.left.kind !== 179) {
+ if (superCallExpression.kind !== 193
+ || superCallExpression.left.kind !== 180) {
ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'.");
}
ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536)));
statements.push(returnStatement);
return 2;
}
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
if (superCallExpression) {
return 1;
}
return 0;
}
+ function createActualThis() {
+ return ts.setEmitFlags(ts.createThis(), 4);
+ }
function createDefaultSuperCallOrThis() {
- var actualThis = ts.createThis();
- ts.setEmitFlags(actualThis, 4);
- var superCall = ts.createFunctionApply(ts.createIdentifier("_super"), actualThis, ts.createIdentifier("arguments"));
- return ts.createLogicalOr(superCall, actualThis);
+ return ts.createLogicalOr(ts.createLogicalAnd(ts.createStrictInequality(ts.createIdentifier("_super"), ts.createNull()), ts.createFunctionApply(ts.createIdentifier("_super"), createActualThis(), ts.createIdentifier("arguments"))), createActualThis());
}
function visitParameter(node) {
if (node.dotDotDotToken) {
return undefined;
}
else if (ts.isBindingPattern(node.name)) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined), node), node);
}
else if (node.initializer) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined), node), node);
}
else {
return node;
@@ -41947,15 +45069,15 @@ var ts;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- var name_37 = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
+ var name = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
if (dotDotDotToken) {
continue;
}
- if (ts.isBindingPattern(name_37)) {
- addDefaultValueAssignmentForBindingPattern(statements, parameter, name_37, initializer);
+ if (ts.isBindingPattern(name)) {
+ addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer);
}
else if (initializer) {
- addDefaultValueAssignmentForInitializer(statements, parameter, name_37, initializer);
+ addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);
}
}
}
@@ -41970,10 +45092,11 @@ var ts;
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
initializer = ts.visitNode(initializer, visitor, ts.isExpression);
- var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.createBlock([
- ts.createStatement(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer)), parameter))
- ], parameter), 1 | 32 | 384), undefined, parameter);
+ var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.setTextRange(ts.createBlock([
+ ts.createStatement(ts.setTextRange(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer))), parameter))
+ ]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
+ ts.setTextRange(statement, parameter);
ts.setEmitFlags(statement, 384 | 32 | 524288);
statements.push(statement);
}
@@ -41990,22 +45113,22 @@ var ts;
var expressionName = ts.getSynthesizedClone(parameter.name);
var restIndex = node.parameters.length - 1;
var temp = ts.createLoopVariable();
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ]), parameter), 524288));
- var forStatement = ts.createFor(ts.createVariableDeclarationList([
+ ])), parameter), 524288));
+ var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
- ], parameter), ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length"), parameter), ts.createPostfixIncrement(temp, parameter), ts.createBlock([
- ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
+ ]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
+ ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
? temp
- : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp)), parameter))
+ : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
ts.setEmitFlags(forStatement, 524288);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
function addCaptureThisForNodeIfNeeded(statements, node) {
- if (node.transformFlags & 32768 && node.kind !== 185) {
+ if (node.transformFlags & 32768 && node.kind !== 186) {
captureThisForNode(statements, node, ts.createThis());
}
}
@@ -42013,29 +45136,62 @@ var ts;
enableSubstitutionsForCapturedThis();
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
- ]), originalStatement);
+ ]));
ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
}
+ function prependCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
+ if (hierarchyFacts & 16384) {
+ var newTarget = void 0;
+ switch (node.kind) {
+ case 186:
+ return statements;
+ case 150:
+ case 152:
+ case 153:
+ newTarget = ts.createVoidZero();
+ break;
+ case 151:
+ newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor");
+ break;
+ case 227:
+ case 185:
+ newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero());
+ break;
+ default:
+ ts.Debug.failBadSyntaxKind(node);
+ break;
+ }
+ var captureNewTargetStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration("_newTarget", undefined, newTarget)
+ ]));
+ if (copyOnWrite) {
+ return [captureNewTargetStatement].concat(statements);
+ }
+ statements.unshift(captureNewTargetStatement);
+ }
+ return statements;
+ }
function addClassMembers(statements, node) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
switch (member.kind) {
- case 203:
+ case 205:
statements.push(transformSemicolonClassElementToStatement(member));
break;
- case 149:
- statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member));
+ case 150:
+ statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
break;
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.members, member);
if (member === accessors.firstAccessor) {
- statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors));
+ statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
}
break;
- case 150:
+ case 151:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -42044,28 +45200,32 @@ var ts;
}
}
function transformSemicolonClassElementToStatement(member) {
- return ts.createEmptyStatement(member);
+ return ts.setTextRange(ts.createEmptyStatement(), member);
}
- function transformClassMethodDeclarationToStatement(receiver, member) {
+ function transformClassMethodDeclarationToStatement(receiver, member, container) {
+ var ancestorFacts = enterSubtree(0, 0);
var commentRange = ts.getCommentRange(member);
var sourceMapRange = ts.getSourceMapRange(member);
var memberName = ts.createMemberAccessForPropertyName(receiver, ts.visitNode(member.name, visitor, ts.isPropertyName), member.name);
- var memberFunction = transformFunctionLikeToExpression(member, member, undefined);
+ var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
ts.setEmitFlags(memberFunction, 1536);
ts.setSourceMapRange(memberFunction, sourceMapRange);
- var statement = ts.createStatement(ts.createAssignment(memberName, memberFunction), member);
+ var statement = ts.setTextRange(ts.createStatement(ts.createAssignment(memberName, memberFunction)), member);
ts.setOriginalNode(statement, member);
ts.setCommentRange(statement, commentRange);
ts.setEmitFlags(statement, 48);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return statement;
}
- function transformAccessorsToStatement(receiver, accessors) {
- var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, false), ts.getSourceMapRange(accessors.firstAccessor));
+ function transformAccessorsToStatement(receiver, accessors, container) {
+ var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, container, false));
ts.setEmitFlags(statement, 1536);
+ ts.setSourceMapRange(statement, ts.getSourceMapRange(accessors.firstAccessor));
return statement;
}
- function transformAccessorsToExpression(receiver, _a, startsOnNewLine) {
+ function transformAccessorsToExpression(receiver, _a, container, startsOnNewLine) {
var firstAccessor = _a.firstAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
+ var ancestorFacts = enterSubtree(0, 0);
var target = ts.getMutableClone(receiver);
ts.setEmitFlags(target, 1536 | 32);
ts.setSourceMapRange(target, firstAccessor.name);
@@ -42074,7 +45234,7 @@ var ts;
ts.setSourceMapRange(propertyName, firstAccessor.name);
var properties = [];
if (getAccessor) {
- var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined);
+ var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined, container);
ts.setSourceMapRange(getterFunction, ts.getSourceMapRange(getAccessor));
ts.setEmitFlags(getterFunction, 512);
var getter = ts.createPropertyAssignment("get", getterFunction);
@@ -42082,51 +45242,86 @@ var ts;
properties.push(getter);
}
if (setAccessor) {
- var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined);
+ var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined, container);
ts.setSourceMapRange(setterFunction, ts.getSourceMapRange(setAccessor));
ts.setEmitFlags(setterFunction, 512);
var setter = ts.createPropertyAssignment("set", setterFunction);
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
- properties.push(ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), ts.createPropertyAssignment("configurable", ts.createLiteral(true)));
+ properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
target,
propertyName,
- ts.createObjectLiteral(properties, undefined, true)
+ ts.createObjectLiteral(properties, true)
]);
if (startsOnNewLine) {
call.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return call;
}
function visitArrowFunction(node) {
if (node.transformFlags & 16384) {
enableSubstitutionsForCapturedThis();
}
- var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node), node);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16256, 66);
+ var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ ts.setTextRange(func, node);
ts.setOriginalNode(func, node);
ts.setEmitFlags(func, 8);
+ exitSubtree(ancestorFacts, 0, 0);
+ convertedLoopState = savedConvertedLoopState;
return func;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var ancestorFacts = ts.getEmitFlags(node) & 131072
+ ? enterSubtree(16278, 69)
+ : enterSubtree(16286, 65);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionExpression(node, undefined, node.asteriskToken, name, undefined, parameters, undefined, body);
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
}
- function transformFunctionLikeToExpression(node, location, name) {
- var savedContainingNonArrowFunction = enclosingNonArrowFunction;
- if (node.kind !== 185) {
- enclosingNonArrowFunction = node;
+ function transformFunctionLikeToExpression(node, location, name, container) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = container && ts.isClassLike(container) && !ts.hasModifier(node, 32)
+ ? enterSubtree(16286, 65 | 8)
+ : enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) {
+ name = ts.getGeneratedNameForNode(node);
}
- var expression = ts.setOriginalNode(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, saveStateAndInvoke(node, transformFunctionBody), location), node);
- enclosingNonArrowFunction = savedContainingNonArrowFunction;
- return expression;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, parameters, undefined, body), location), node);
}
function transformFunctionBody(node) {
var multiLine = false;
@@ -42138,7 +45333,7 @@ var ts;
var statementOffset;
resumeLexicalEnvironment();
if (ts.isBlock(body)) {
- statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, body.statements, false);
}
addCaptureThisForNodeIfNeeded(statements, node);
addDefaultValueAssignmentsIfNeeded(statements, node);
@@ -42147,6 +45342,7 @@ var ts;
multiLine = true;
}
if (ts.isBlock(body)) {
+ statementOffset = ts.addCustomPrologue(statements, body.statements, statementOffset, visitor);
statementsLocation = body.statements;
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, statementOffset));
if (!multiLine && body.multiLine) {
@@ -42154,7 +45350,7 @@ var ts;
}
}
else {
- ts.Debug.assert(node.kind === 185);
+ ts.Debug.assert(node.kind === 186);
statementsLocation = ts.moveRangeEnd(body, -1);
var equalsGreaterThanToken = node.equalsGreaterThanToken;
if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) {
@@ -42166,17 +45362,20 @@ var ts;
}
}
var expression = ts.visitNode(body, visitor, ts.isExpression);
- var returnStatement = ts.createReturn(expression, body);
+ var returnStatement = ts.createReturn(expression);
+ ts.setTextRange(returnStatement, body);
ts.setEmitFlags(returnStatement, 384 | 32 | 1024);
statements.push(returnStatement);
closeBraceLocation = body;
}
var lexicalEnvironment = context.endLexicalEnvironment();
ts.addRange(statements, lexicalEnvironment);
+ prependCaptureNewTargetIfNeeded(statements, node, false);
if (!multiLine && lexicalEnvironment && lexicalEnvironment.length) {
multiLine = true;
}
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), node.body, multiLine);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), multiLine);
+ ts.setTextRange(block, node.body);
if (!multiLine && singleLine) {
ts.setEmitFlags(block, 1);
}
@@ -42186,11 +45385,26 @@ var ts;
ts.setOriginalNode(block, node.body);
return block;
}
+ function visitFunctionBodyDownLevel(node) {
+ var updated = ts.visitFunctionBody(node.body, functionBodyVisitor, context);
+ return ts.updateBlock(updated, ts.setTextRange(ts.createNodeArray(prependCaptureNewTargetIfNeeded(updated.statements, node, true)), updated.statements));
+ }
+ function visitBlock(node, isFunctionBody) {
+ if (isFunctionBody) {
+ return ts.visitEachChild(node, visitor, context);
+ }
+ var ancestorFacts = hierarchyFacts & 256
+ ? enterSubtree(4032, 512)
+ : enterSubtree(3904, 128);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
function visitExpressionStatement(node) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateStatement(node, visitBinaryExpression(node.expression, false));
}
return ts.visitEachChild(node, visitor, context);
@@ -42198,9 +45412,9 @@ var ts;
function visitParenthesizedExpression(node, needsDestructuringValue) {
if (!needsDestructuringValue) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateParen(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateParen(node, visitBinaryExpression(node.expression, false));
}
}
@@ -42210,9 +45424,12 @@ var ts;
if (ts.isDestructuringAssignment(node)) {
return ts.flattenDestructuringAssignment(node, visitor, context, 0, needsDestructuringValue);
}
+ return ts.visitEachChild(node, visitor, context);
}
function visitVariableStatement(node) {
- if (convertedLoopState && (ts.getCombinedNodeFlags(node.declarationList) & 3) == 0) {
+ var ancestorFacts = enterSubtree(0, ts.hasModifier(node, 1) ? 32 : 0);
+ var updated;
+ if (convertedLoopState && (node.declarationList.flags & 3) === 0) {
var assignments = void 0;
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
@@ -42225,53 +45442,59 @@ var ts;
else {
assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression));
}
- (assignments || (assignments = [])).push(assignment);
+ assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- return ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); }), node);
+ updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node);
}
else {
- return undefined;
+ updated = undefined;
}
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function visitVariableDeclarationList(node) {
- if (node.flags & 3) {
- enableSubstitutionsForBlockScopedBindings();
+ if (node.transformFlags & 64) {
+ if (node.flags & 3) {
+ enableSubstitutionsForBlockScopedBindings();
+ }
+ var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ ? visitVariableDeclarationInLetDeclarationList
+ : visitVariableDeclaration));
+ var declarationList = ts.createVariableDeclarationList(declarations);
+ ts.setOriginalNode(declarationList, node);
+ ts.setTextRange(declarationList, node);
+ ts.setCommentRange(declarationList, node);
+ if (node.transformFlags & 8388608
+ && (ts.isBindingPattern(node.declarations[0].name)
+ || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
+ var firstDeclaration = ts.firstOrUndefined(declarations);
+ var lastDeclaration = ts.lastOrUndefined(declarations);
+ ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ }
+ return declarationList;
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
- ? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
- var declarationList = ts.createVariableDeclarationList(declarations, node);
- ts.setOriginalNode(declarationList, node);
- ts.setCommentRange(declarationList, node);
- if (node.transformFlags & 8388608
- && (ts.isBindingPattern(node.declarations[0].name)
- || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
- var firstDeclaration = ts.firstOrUndefined(declarations);
- var lastDeclaration = ts.lastOrUndefined(declarations);
- ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
- }
- return declarationList;
+ return ts.visitEachChild(node, visitor, context);
}
function shouldEmitExplicitInitializerForLetDeclaration(node) {
var flags = resolver.getNodeCheckFlags(node);
var isCapturedInFunction = flags & 131072;
var isDeclaredInLoop = flags & 262144;
- var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(enclosingBlockScopeContainer)
+ var emittedAsTopLevel = (hierarchyFacts & 64) !== 0
|| (isCapturedInFunction
&& isDeclaredInLoop
- && ts.isBlock(enclosingBlockScopeContainer)
- && ts.isIterationStatement(enclosingBlockScopeContainerParent, false));
+ && (hierarchyFacts & 512) !== 0);
var emitExplicitInitializer = !emittedAsTopLevel
- && enclosingBlockScopeContainer.kind !== 212
- && enclosingBlockScopeContainer.kind !== 213
+ && (hierarchyFacts & 2048) === 0
&& (!resolver.isDeclarationWithCollidingName(node)
|| (isDeclaredInLoop
&& !isCapturedInFunction
- && !ts.isIterationStatement(enclosingBlockScopeContainer, false)));
+ && (hierarchyFacts & (1024 | 2048)) === 0));
return emitExplicitInitializer;
}
function visitVariableDeclarationInLetDeclarationList(node) {
@@ -42287,84 +45510,94 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitVariableDeclaration(node) {
+ var ancestorFacts = enterSubtree(32, 0);
+ var updated;
if (ts.isBindingPattern(node.name)) {
- var hoistTempVariables = enclosingVariableStatement
- && ts.hasModifier(enclosingVariableStatement, 1);
- return ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, hoistTempVariables);
+ updated = ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, (ancestorFacts & 32) !== 0);
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function recordLabel(node) {
+ convertedLoopState.labels.set(node.label.text, node.label.text);
+ }
+ function resetLabel(node) {
+ convertedLoopState.labels.set(node.label.text, undefined);
}
function visitLabeledStatement(node) {
- if (convertedLoopState) {
- if (!convertedLoopState.labels) {
- convertedLoopState.labels = ts.createMap();
- }
- convertedLoopState.labels[node.label.text] = node.label.text;
- }
- var result;
- if (ts.isIterationStatement(node.statement, false) && shouldConvertIterationStatementBody(node.statement)) {
- result = ts.visitNodes(ts.createNodeArray([node.statement]), visitor, ts.isStatement);
- }
- else {
- result = ts.visitEachChild(node, visitor, context);
+ if (convertedLoopState && !convertedLoopState.labels) {
+ convertedLoopState.labels = ts.createMap();
}
- if (convertedLoopState) {
- convertedLoopState.labels[node.label.text] = undefined;
+ var statement = ts.unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);
+ return ts.isIterationStatement(statement, false)
+ ? visitIterationStatement(statement, node)
+ : ts.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement), node, convertedLoopState && resetLabel);
+ }
+ function visitIterationStatement(node, outermostLabeledStatement) {
+ switch (node.kind) {
+ case 211:
+ case 212:
+ return visitDoOrWhileStatement(node, outermostLabeledStatement);
+ case 213:
+ return visitForStatement(node, outermostLabeledStatement);
+ case 214:
+ return visitForInStatement(node, outermostLabeledStatement);
+ case 215:
+ return visitForOfStatement(node, outermostLabeledStatement);
}
- return result;
}
- function visitDoStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {
+ var ancestorFacts = enterSubtree(excludeFacts, includeFacts);
+ var updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
- function visitWhileStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitDoOrWhileStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(0, 256, node, outermostLabeledStatement);
}
- function visitForStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(3008, 1280, node, outermostLabeledStatement);
}
- function visitForInStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForInStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement);
}
- function visitForOfStatement(node) {
- return convertIterationStatementBodyIfNecessary(node, convertForOfToFor);
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement, compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray);
}
- function convertForOfToFor(node, convertedLoopBodyStatements) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var initializer = node.initializer;
+ function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {
var statements = [];
- var counter = ts.createLoopVariable();
- var rhsReference = expression.kind === 70
- ? ts.createUniqueName(expression.text)
- : ts.createTempVariable(undefined);
- var elementAccess = ts.createElementAccess(rhsReference, counter);
- if (ts.isVariableDeclarationList(initializer)) {
- if (initializer.flags & 3) {
+ if (ts.isVariableDeclarationList(node.initializer)) {
+ if (node.initializer.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var firstOriginalDeclaration = ts.firstOrUndefined(initializer.declarations);
+ var firstOriginalDeclaration = ts.firstOrUndefined(node.initializer.declarations);
if (firstOriginalDeclaration && ts.isBindingPattern(firstOriginalDeclaration.name)) {
- var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, elementAccess);
- var declarationList = ts.createVariableDeclarationList(declarations, initializer);
- ts.setOriginalNode(declarationList, initializer);
+ var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, boundValue);
+ var declarationList = ts.setTextRange(ts.createVariableDeclarationList(declarations), node.initializer);
+ ts.setOriginalNode(declarationList, node.initializer);
var firstDeclaration = declarations[0];
var lastDeclaration = ts.lastOrUndefined(declarations);
ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
statements.push(ts.createVariableStatement(undefined, declarationList));
}
else {
- statements.push(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, ts.createElementAccess(rhsReference, counter))
- ], ts.moveRangePos(initializer, -1)), initializer), ts.moveRangeEnd(initializer, -1)));
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, boundValue)
+ ]), ts.moveRangePos(node.initializer, -1)), node.initializer)), ts.moveRangeEnd(node.initializer, -1)));
}
}
else {
- var assignment = ts.createAssignment(initializer, elementAccess);
+ var assignment = ts.createAssignment(node.initializer, boundValue);
if (ts.isDestructuringAssignment(assignment)) {
- statements.push(ts.createStatement(ts.flattenDestructuringAssignment(assignment, visitor, context, 0)));
+ ts.aggregateTransformFlags(assignment);
+ statements.push(ts.createStatement(visitBinaryExpression(assignment, false)));
}
else {
- assignment.end = initializer.end;
- statements.push(ts.createStatement(assignment, ts.moveRangeEnd(initializer, -1)));
+ assignment.end = node.initializer.end;
+ statements.push(ts.setTextRange(ts.createStatement(ts.visitNode(assignment, visitor, ts.isExpression)), ts.moveRangeEnd(node.initializer, -1)));
}
}
var bodyLocation;
@@ -42373,7 +45606,7 @@ var ts;
ts.addRange(statements, convertedLoopBodyStatements);
}
else {
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
if (ts.isBlock(statement)) {
ts.addRange(statements, statement.statements);
bodyLocation = statement;
@@ -42383,39 +45616,82 @@ var ts;
statements.push(statement);
}
}
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var counter = ts.createLoopVariable();
+ var rhsReference = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
ts.setEmitFlags(expression, 48 | ts.getEmitFlags(expression));
- var body = ts.createBlock(ts.createNodeArray(statements, statementsLocation), bodyLocation);
- ts.setEmitFlags(body, 48 | 384);
- var forStatement = ts.createFor(ts.setEmitFlags(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0), ts.moveRangePos(node.expression, -1)),
- ts.createVariableDeclaration(rhsReference, undefined, expression, node.expression)
- ], node.expression), 1048576), ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length"), node.expression), ts.createPostfixIncrement(counter, node.expression), body, node);
+ var forStatement = ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0)), ts.moveRangePos(node.expression, -1)),
+ ts.setTextRange(ts.createVariableDeclaration(rhsReference, undefined, expression), node.expression)
+ ]), node.expression), 1048576), ts.setTextRange(ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length")), node.expression), ts.setTextRange(ts.createPostfixIncrement(counter), node.expression), convertForOfStatementHead(node, ts.createElementAccess(rhsReference, counter), convertedLoopBodyStatements)), node);
ts.setEmitFlags(forStatement, 256);
- return forStatement;
+ ts.setTextRange(forStatement, node);
+ return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = ts.createValuesHelper(context, expression, node.expression);
+ var next = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createFunctionCall(returnMethod, iterator, []))), 1),
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitObjectLiteralExpression(node) {
var properties = node.properties;
var numProperties = properties.length;
var numInitialProperties = numProperties;
+ var numInitialPropertiesWithoutYield = numProperties;
for (var i = 0; i < numProperties; i++) {
var property = properties[i];
- if (property.transformFlags & 16777216
- || property.name.kind === 142) {
+ if ((property.transformFlags & 16777216 && hierarchyFacts & 4)
+ && i < numInitialPropertiesWithoutYield) {
+ numInitialPropertiesWithoutYield = i;
+ }
+ if (property.name.kind === 143) {
numInitialProperties = i;
break;
}
}
- ts.Debug.assert(numInitialProperties !== numProperties);
- var temp = ts.createTempVariable(hoistVariableDeclaration);
- var expressions = [];
- var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, node.multiLine), 32768));
- if (node.multiLine) {
- assignment.startsOnNewLine = true;
+ if (numInitialProperties !== numProperties) {
+ if (numInitialPropertiesWithoutYield < numInitialProperties) {
+ numInitialProperties = numInitialPropertiesWithoutYield;
+ }
+ var temp = ts.createTempVariable(hoistVariableDeclaration);
+ var expressions = [];
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 32768));
+ if (node.multiLine) {
+ assignment.startsOnNewLine = true;
+ }
+ expressions.push(assignment);
+ addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
+ expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
+ return ts.inlineExpressions(expressions);
}
- expressions.push(assignment);
- addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
- expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
- return ts.inlineExpressions(expressions);
+ return ts.visitEachChild(node, visitor, context);
}
function shouldConvertIterationStatementBody(node) {
return (resolver.getNodeCheckFlags(node) & 65536) !== 0;
@@ -42439,14 +45715,16 @@ var ts;
}
}
}
- function convertIterationStatementBodyIfNecessary(node, convert) {
+ function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert) {
if (!shouldConvertIterationStatementBody(node)) {
var saveAllowedNonLabeledJumps = void 0;
if (convertedLoopState) {
saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
convertedLoopState.allowedNonLabeledJumps = 2 | 4;
}
- var result = convert ? convert(node, undefined) : ts.visitEachChild(node, visitor, context);
+ var result = convert
+ ? convert(node, outermostLabeledStatement, undefined)
+ : ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement, convertedLoopState && resetLabel);
if (convertedLoopState) {
convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;
}
@@ -42455,11 +45733,11 @@ var ts;
var functionName = ts.createUniqueName("_loop");
var loopInitializer;
switch (node.kind) {
- case 211:
- case 212:
case 213:
+ case 214:
+ case 215:
var initializer = node.initializer;
- if (initializer && initializer.kind === 224) {
+ if (initializer && initializer.kind === 226) {
loopInitializer = initializer;
}
break;
@@ -42485,19 +45763,26 @@ var ts;
convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables;
}
}
- var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement);
+ startLexicalEnvironment();
+ var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
+ var lexicalEnvironment = endLexicalEnvironment();
var currentState = convertedLoopState;
convertedLoopState = outerConvertedLoopState;
- if (loopOutParameters.length) {
+ if (loopOutParameters.length || lexicalEnvironment) {
var statements_4 = ts.isBlock(loopBody) ? loopBody.statements.slice() : [loopBody];
- copyOutParameters(loopOutParameters, 1, statements_4);
- loopBody = ts.createBlock(statements_4, undefined, true);
+ if (loopOutParameters.length) {
+ copyOutParameters(loopOutParameters, 1, statements_4);
+ }
+ ts.addRange(statements_4, lexicalEnvironment);
+ loopBody = ts.createBlock(statements_4, true);
}
- if (!ts.isBlock(loopBody)) {
- loopBody = ts.createBlock([loopBody], undefined, true);
+ if (ts.isBlock(loopBody)) {
+ loopBody.multiLine = true;
}
- var isAsyncBlockContainingAwait = enclosingNonArrowFunction
- && (ts.getEmitFlags(enclosingNonArrowFunction) & 131072) !== 0
+ else {
+ loopBody = ts.createBlock([loopBody], true);
+ }
+ var isAsyncBlockContainingAwait = hierarchyFacts & 4
&& (node.statement.transformFlags & 16777216) !== 0;
var loopBodyFlags = 0;
if (currentState.containsLexicalThis) {
@@ -42556,19 +45841,18 @@ var ts;
var convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, isAsyncBlockContainingAwait);
var loop;
if (convert) {
- loop = convert(node, convertedLoopBodyStatements);
+ loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- loop = ts.getMutableClone(node);
- loop.statement = undefined;
- loop = ts.visitEachChild(loop, visitor, context);
- loop.statement = ts.createBlock(convertedLoopBodyStatements, undefined, true);
- loop.transformFlags = 0;
- ts.aggregateTransformFlags(loop);
- }
- statements.push(currentParent.kind === 219
- ? ts.createLabel(currentParent.label, loop)
- : loop);
+ var clone_4 = ts.getMutableClone(node);
+ clone_4.statement = undefined;
+ clone_4 = ts.visitEachChild(clone_4, visitor, context);
+ clone_4.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_4.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_4);
+ loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ statements.push(loop);
return statements;
}
function copyOutParameter(outParam, copyDirection) {
@@ -42589,7 +45873,9 @@ var ts;
!state.labeledNonLocalBreaks &&
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
- var callResult = isAsyncBlockContainingAwait ? ts.createYield(ts.createToken(38), call) : call;
+ var callResult = isAsyncBlockContainingAwait
+ ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304))
+ : call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
copyOutParameters(state.loopOutParameters, 0, statements);
@@ -42627,23 +45913,22 @@ var ts;
if (!state.labeledNonLocalBreaks) {
state.labeledNonLocalBreaks = ts.createMap();
}
- state.labeledNonLocalBreaks[labelText] = labelMarker;
+ state.labeledNonLocalBreaks.set(labelText, labelMarker);
}
else {
if (!state.labeledNonLocalContinues) {
state.labeledNonLocalContinues = ts.createMap();
}
- state.labeledNonLocalContinues[labelText] = labelMarker;
+ state.labeledNonLocalContinues.set(labelText, labelMarker);
}
}
function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {
if (!table) {
return;
}
- for (var labelText in table) {
- var labelMarker = table[labelText];
+ table.forEach(function (labelMarker, labelText) {
var statements = [];
- if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) {
+ if (!outerLoop || (outerLoop.labels && outerLoop.labels.get(labelText))) {
var label = ts.createIdentifier(labelText);
statements.push(isBreak ? ts.createBreak(label) : ts.createContinue(label));
}
@@ -42652,7 +45937,7 @@ var ts;
statements.push(ts.createReturn(loopResultName));
}
caseClauses.push(ts.createCaseClause(ts.createLiteral(labelMarker), statements));
- }
+ });
}
function processLoopVariableDeclaration(decl, loopParameters, loopOutParameters) {
var name = decl.name;
@@ -42667,7 +45952,7 @@ var ts;
else {
loopParameters.push(ts.createParameter(undefined, undefined, undefined, name));
if (resolver.getNodeCheckFlags(decl) & 2097152) {
- var outParamName = ts.createUniqueName("out_" + name.text);
+ var outParamName = ts.createUniqueName("out_" + ts.unescapeIdentifier(name.text));
loopOutParameters.push({ originalName: name, outParamName: outParamName });
}
}
@@ -42678,22 +45963,22 @@ var ts;
for (var i = start; i < numProperties; i++) {
var property = properties[i];
switch (property.kind) {
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.properties, property);
if (property === accessors.firstAccessor) {
- expressions.push(transformAccessorsToExpression(receiver, accessors, node.multiLine));
+ expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine));
}
break;
- case 257:
+ case 150:
+ expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
+ break;
+ case 260:
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 258:
+ case 261:
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 149:
- expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node.multiLine));
- break;
default:
ts.Debug.failBadSyntaxKind(node);
break;
@@ -42701,34 +45986,49 @@ var ts;
}
}
function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
- function transformObjectLiteralMethodDeclarationToExpression(method, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined), method);
+ function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {
+ var ancestorFacts = enterSubtree(0, 0);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined, container));
+ ts.setTextRange(expression, method);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return expression;
}
function visitCatchClause(node) {
- ts.Debug.assert(ts.isBindingPattern(node.variableDeclaration.name));
- var temp = ts.createTempVariable(undefined);
- var newVariableDeclaration = ts.createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration);
- var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
- var list = ts.createVariableDeclarationList(vars, node.variableDeclaration, node.variableDeclaration.flags);
- var destructure = ts.createVariableStatement(undefined, list);
- return ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated;
+ if (ts.isBindingPattern(node.variableDeclaration.name)) {
+ var temp = ts.createTempVariable(undefined);
+ var newVariableDeclaration = ts.createVariableDeclaration(temp);
+ ts.setTextRange(newVariableDeclaration, node.variableDeclaration);
+ var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
+ var list = ts.createVariableDeclarationList(vars);
+ ts.setTextRange(list, node.variableDeclaration);
+ var destructure = ts.createVariableStatement(undefined, list);
+ updated = ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function addStatementToStartOfBlock(block, statement) {
var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
@@ -42736,21 +46036,43 @@ var ts;
}
function visitMethodDeclaration(node) {
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
- var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined);
+ var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined, undefined);
ts.setEmitFlags(functionExpression, 512 | ts.getEmitFlags(functionExpression));
- return ts.createPropertyAssignment(node.name, functionExpression, node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, functionExpression), node);
+ }
+ function visitAccessorDeclaration(node) {
+ ts.Debug.assert(!ts.isComputedPropertyName(node.name));
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return updated;
}
function visitShorthandPropertyAssignment(node) {
- return ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name), node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name)), node);
+ }
+ function visitComputedPropertyName(node) {
+ var ancestorFacts = enterSubtree(0, 8192);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 32768 : 0);
+ return updated;
}
function visitYieldExpression(node) {
return ts.visitEachChild(node, visitor, context);
}
function visitArrayLiteralExpression(node) {
- return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ if (node.transformFlags & 64) {
+ return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
- return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ if (node.transformFlags & 64) {
+ return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ }
+ return ts.updateCall(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression), undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
}
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
@@ -42762,38 +46084,54 @@ var ts;
}
var resultingCall;
if (node.transformFlags & 524288) {
- resultingCall = ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
+ resultingCall = ts.createFunctionApply(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
}
else {
- resultingCall = ts.createFunctionCall(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
+ resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
}
if (node.expression.kind === 96) {
var actualThis = ts.createThis();
ts.setEmitFlags(actualThis, 4);
var initializer = ts.createLogicalOr(resultingCall, actualThis);
- return assignToCapturedThis
+ resultingCall = assignToCapturedThis
? ts.createAssignment(ts.createIdentifier("_this"), initializer)
: initializer;
}
- return resultingCall;
+ return ts.setOriginalNode(resultingCall, node);
}
function visitNewExpression(node) {
- ts.Debug.assert((node.transformFlags & 524288) !== 0);
- var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ if (node.transformFlags & 524288) {
+ var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
+ return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function transformAndSpreadElements(elements, needsUniqueCopy, multiLine, hasTrailingComma) {
var numElements = elements.length;
var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
}));
- if (segments.length === 1) {
- var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 175
- ? ts.createArraySlice(segments[0])
- : segments[0];
+ if (compilerOptions.downlevelIteration) {
+ if (segments.length === 1) {
+ var firstSegment = segments[0];
+ if (ts.isCallExpression(firstSegment)
+ && ts.isIdentifier(firstSegment.expression)
+ && (ts.getEmitFlags(firstSegment.expression) & 4096)
+ && firstSegment.expression.text === "___spread") {
+ return segments[0];
+ }
+ }
+ return ts.createSpreadHelper(context, segments);
+ }
+ else {
+ if (segments.length === 1) {
+ var firstElement = elements[0];
+ return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176
+ ? ts.createArraySlice(segments[0])
+ : segments[0];
+ }
+ return ts.createArrayConcat(segments.shift(), segments);
}
- return ts.createArrayConcat(segments.shift(), segments);
}
function partitionSpread(node) {
return ts.isSpreadExpression(node)
@@ -42804,7 +46142,7 @@ var ts;
return ts.map(chunk, visitExpressionOfSpread);
}
function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
- return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, undefined, hasTrailingComma), visitor, ts.isExpression), undefined, multiLine);
+ return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
}
function visitSpreadElement(node) {
return ts.visitNode(node.expression, visitor, ts.isExpression);
@@ -42813,7 +46151,19 @@ var ts;
return ts.visitNode(node.expression, visitor, ts.isExpression);
}
function visitTemplateLiteral(node) {
- return ts.createLiteral(node.text, node);
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ function visitStringLiteral(node) {
+ if (node.hasExtendedUnicodeEscape) {
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ return node;
+ }
+ function visitNumericLiteral(node) {
+ if (node.numericLiteralFlags & 48) {
+ return ts.setTextRange(ts.createNumericLiteral(node.text), node);
+ }
+ return node;
}
function visitTaggedTemplateExpression(node) {
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
@@ -42847,7 +46197,7 @@ var ts;
var isLast = node.kind === 12 || node.kind === 15;
text = text.substring(1, text.length - (isLast ? 1 : 2));
text = text.replace(/\r\n?/g, "\n");
- return ts.createLiteral(text, node);
+ return ts.setTextRange(ts.createLiteral(text), node);
}
function visitTemplateExpression(node) {
var expressions = [];
@@ -42855,7 +46205,8 @@ var ts;
addTemplateSpans(expressions, node);
var expression = ts.reduceLeft(expressions, ts.createAdd);
if (ts.nodeIsSynthesized(expression)) {
- ts.setTextRange(expression, node);
+ expression.pos = node.pos;
+ expression.end = node.end;
}
return expression;
}
@@ -42878,21 +46229,34 @@ var ts;
}
}
}
- function visitSuperKeyword() {
- return enclosingNonAsyncFunctionBody
- && ts.isClassElement(enclosingNonAsyncFunctionBody)
- && !ts.hasModifier(enclosingNonAsyncFunctionBody, 32)
- && currentParent.kind !== 179
+ function visitSuperKeyword(isExpressionOfCall) {
+ return hierarchyFacts & 8
+ && !isExpressionOfCall
? ts.createPropertyAccess(ts.createIdentifier("_super"), "prototype")
: ts.createIdentifier("_super");
}
- function onEmitNode(emitContext, node, emitCallback) {
- var savedEnclosingFunction = enclosingFunction;
+ function visitMetaProperty(node) {
+ if (node.keywordToken === 93 && node.name.text === "target") {
+ if (hierarchyFacts & 8192) {
+ hierarchyFacts |= 32768;
+ }
+ else {
+ hierarchyFacts |= 16384;
+ }
+ return ts.createIdentifier("_newTarget");
+ }
+ return node;
+ }
+ function onEmitNode(hint, node, emitCallback) {
if (enabledSubstitutions & 1 && ts.isFunctionLike(node)) {
- enclosingFunction = node;
+ var ancestorFacts = enterSubtree(16286, ts.getEmitFlags(node) & 8
+ ? 65 | 16
+ : 65);
+ previousOnEmitNode(hint, node, emitCallback);
+ exitSubtree(ancestorFacts, 0, 0);
+ return;
}
- previousOnEmitNode(emitContext, node, emitCallback);
- enclosingFunction = savedEnclosingFunction;
+ previousOnEmitNode(hint, node, emitCallback);
}
function enableSubstitutionsForBlockScopedBindings() {
if ((enabledSubstitutions & 2) === 0) {
@@ -42904,18 +46268,18 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(98);
- context.enableEmitNotification(150);
- context.enableEmitNotification(149);
context.enableEmitNotification(151);
+ context.enableEmitNotification(150);
context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(186);
context.enableEmitNotification(185);
- context.enableEmitNotification(184);
- context.enableEmitNotification(225);
+ context.enableEmitNotification(227);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
if (ts.isIdentifier(node)) {
@@ -42927,7 +46291,7 @@ var ts;
if (enabledSubstitutions & 2) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
- return ts.getGeneratedNameForNode(original);
+ return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
}
}
return node;
@@ -42935,10 +46299,10 @@ var ts;
function isNameOfDeclarationWithCollidingName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 174:
- case 226:
- case 229:
- case 223:
+ case 175:
+ case 228:
+ case 231:
+ case 225:
return parent.name === node
&& resolver.isDeclarationWithCollidingName(parent);
}
@@ -42957,16 +46321,15 @@ var ts;
if (enabledSubstitutions & 2) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
if (declaration) {
- return ts.getGeneratedNameForNode(declaration.name);
+ return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
}
}
return node;
}
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
- && enclosingFunction
- && ts.getEmitFlags(enclosingFunction) & 8) {
- return ts.createIdentifier("_this", node);
+ && hierarchyFacts & 16) {
+ return ts.setTextRange(ts.createIdentifier("_this"), node);
}
return node;
}
@@ -42982,11 +46345,11 @@ var ts;
return false;
}
var statement = ts.firstOrUndefined(constructor.body.statements);
- if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 207) {
+ if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) {
return false;
}
var statementExpression = statement.expression;
- if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 179) {
+ if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) {
return false;
}
var callTarget = statementExpression.expression;
@@ -42994,7 +46357,7 @@ var ts;
return false;
}
var callArgument = ts.singleOrUndefined(statementExpression.arguments);
- if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 196) {
+ if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) {
return false;
}
var expression = callArgument.expression;
@@ -43013,18 +46376,65 @@ var ts;
name: "typescript:extends",
scoped: false,
priority: 0,
- text: "\n var __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };"
+ text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
};
})(ts || (ts = {}));
var ts;
(function (ts) {
- var instructionNames = ts.createMap((_a = {},
- _a[2] = "return",
- _a[3] = "break",
- _a[4] = "yield",
- _a[5] = "yield*",
- _a[7] = "endfinally",
- _a));
+ var OpCode;
+ (function (OpCode) {
+ OpCode[OpCode["Nop"] = 0] = "Nop";
+ OpCode[OpCode["Statement"] = 1] = "Statement";
+ OpCode[OpCode["Assign"] = 2] = "Assign";
+ OpCode[OpCode["Break"] = 3] = "Break";
+ OpCode[OpCode["BreakWhenTrue"] = 4] = "BreakWhenTrue";
+ OpCode[OpCode["BreakWhenFalse"] = 5] = "BreakWhenFalse";
+ OpCode[OpCode["Yield"] = 6] = "Yield";
+ OpCode[OpCode["YieldStar"] = 7] = "YieldStar";
+ OpCode[OpCode["Return"] = 8] = "Return";
+ OpCode[OpCode["Throw"] = 9] = "Throw";
+ OpCode[OpCode["Endfinally"] = 10] = "Endfinally";
+ })(OpCode || (OpCode = {}));
+ var BlockAction;
+ (function (BlockAction) {
+ BlockAction[BlockAction["Open"] = 0] = "Open";
+ BlockAction[BlockAction["Close"] = 1] = "Close";
+ })(BlockAction || (BlockAction = {}));
+ var CodeBlockKind;
+ (function (CodeBlockKind) {
+ CodeBlockKind[CodeBlockKind["Exception"] = 0] = "Exception";
+ CodeBlockKind[CodeBlockKind["With"] = 1] = "With";
+ CodeBlockKind[CodeBlockKind["Switch"] = 2] = "Switch";
+ CodeBlockKind[CodeBlockKind["Loop"] = 3] = "Loop";
+ CodeBlockKind[CodeBlockKind["Labeled"] = 4] = "Labeled";
+ })(CodeBlockKind || (CodeBlockKind = {}));
+ var ExceptionBlockState;
+ (function (ExceptionBlockState) {
+ ExceptionBlockState[ExceptionBlockState["Try"] = 0] = "Try";
+ ExceptionBlockState[ExceptionBlockState["Catch"] = 1] = "Catch";
+ ExceptionBlockState[ExceptionBlockState["Finally"] = 2] = "Finally";
+ ExceptionBlockState[ExceptionBlockState["Done"] = 3] = "Done";
+ })(ExceptionBlockState || (ExceptionBlockState = {}));
+ var Instruction;
+ (function (Instruction) {
+ Instruction[Instruction["Next"] = 0] = "Next";
+ Instruction[Instruction["Throw"] = 1] = "Throw";
+ Instruction[Instruction["Return"] = 2] = "Return";
+ Instruction[Instruction["Break"] = 3] = "Break";
+ Instruction[Instruction["Yield"] = 4] = "Yield";
+ Instruction[Instruction["YieldStar"] = 5] = "YieldStar";
+ Instruction[Instruction["Catch"] = 6] = "Catch";
+ Instruction[Instruction["Endfinally"] = 7] = "Endfinally";
+ })(Instruction || (Instruction = {}));
+ function getInstructionName(instruction) {
+ switch (instruction) {
+ case 2: return "return";
+ case 3: return "break";
+ case 4: return "yield";
+ case 5: return "yield*";
+ case 7: return "endfinally";
+ }
+ }
function transformGenerators(context) {
var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistFunctionDeclaration = context.hoistFunctionDeclaration, hoistVariableDeclaration = context.hoistVariableDeclaration;
var compilerOptions = context.getCompilerOptions();
@@ -43090,13 +46500,13 @@ var ts;
}
function visitJavaScriptInStatementContainingYield(node) {
switch (node.kind) {
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
default:
return visitJavaScriptInGeneratorFunctionBody(node);
@@ -43104,24 +46514,24 @@ var ts;
}
function visitJavaScriptInGeneratorFunctionBody(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 151:
case 152:
+ case 153:
return visitAccessorDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 215:
+ case 217:
return visitBreakStatement(node);
- case 214:
- return visitContinueStatement(node);
case 216:
+ return visitContinueStatement(node);
+ case 218:
return visitReturnStatement(node);
default:
if (node.transformFlags & 16777216) {
@@ -43137,21 +46547,21 @@ var ts;
}
function visitJavaScriptContainingYield(node) {
switch (node.kind) {
- case 192:
- return visitBinaryExpression(node);
case 193:
+ return visitBinaryExpression(node);
+ case 194:
return visitConditionalExpression(node);
- case 195:
+ case 196:
return visitYieldExpression(node);
- case 175:
- return visitArrayLiteralExpression(node);
case 176:
+ return visitArrayLiteralExpression(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 178:
- return visitElementAccessExpression(node);
case 179:
- return visitCallExpression(node);
+ return visitElementAccessExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -43159,9 +46569,9 @@ var ts;
}
function visitGenerator(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -43169,8 +46579,8 @@ var ts;
}
}
function visitFunctionDeclaration(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -43190,8 +46600,8 @@ var ts;
}
}
function visitFunctionExpression(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -43243,7 +46653,7 @@ var ts;
operationLocations = undefined;
state = ts.createTempVariable(undefined);
resumeLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ var statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
transformAndEmitStatements(body.statements, statementOffset);
var buildResult = build();
ts.addRange(statements, endLexicalEnvironment());
@@ -43261,7 +46671,7 @@ var ts;
operationArguments = savedOperationArguments;
operationLocations = savedOperationLocations;
state = savedState;
- return ts.createBlock(statements, body, body.multiLine);
+ return ts.setTextRange(ts.createBlock(statements, body.multiLine), body);
}
function visitVariableStatement(node) {
if (node.transformFlags & 16777216) {
@@ -43318,10 +46728,10 @@ var ts;
if (containsYield(right)) {
var target = void 0;
switch (left.kind) {
- case 177:
+ case 178:
target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
break;
- case 178:
+ case 179:
target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
break;
default:
@@ -43330,7 +46740,7 @@ var ts;
}
var operator = node.operatorToken.kind;
if (isCompoundAssignment(operator)) {
- return ts.createBinary(target, 57, ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression), node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.setTextRange(ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression)), node)), node);
}
else {
return ts.updateBinary(node, target, ts.visitNode(right, visitor, ts.isExpression));
@@ -43346,10 +46756,10 @@ var ts;
else if (node.operatorToken.kind === 25) {
return visitCommaExpression(node);
}
- var clone_4 = ts.getMutableClone(node);
- clone_4.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
- clone_4.right = ts.visitNode(node.right, visitor, ts.isExpression);
- return clone_4;
+ var clone_5 = ts.getMutableClone(node);
+ clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
+ clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression);
+ return clone_5;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43405,38 +46815,43 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- emitYieldStar(expression, node);
+ var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ ? ts.createValuesHelper(context, expression, node)
+ : expression;
+ emitYieldStar(iterator, node);
}
else {
emitYield(expression, node);
}
markLabel(resumeLabel);
- return createGeneratorResume();
+ return createGeneratorResume(node);
}
function visitArrayLiteralExpression(node) {
return visitElements(node.elements, undefined, undefined, node.multiLine);
}
function visitElements(elements, leadingElement, location, multiLine) {
var numInitialElements = countInitialNodesWithoutYield(elements);
- var temp = declareLocal();
- var hasAssignedTemp = false;
+ var temp;
if (numInitialElements > 0) {
+ temp = declareLocal();
var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
emitAssignment(temp, ts.createArrayLiteral(leadingElement
? [leadingElement].concat(initialElements) : initialElements));
leadingElement = undefined;
- hasAssignedTemp = true;
}
var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
- return hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, location, multiLine);
+ return temp
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location);
function reduceElement(expressions, element) {
if (containsYield(element) && expressions.length > 0) {
+ var hasAssignedTemp = temp !== undefined;
+ if (!temp) {
+ temp = declareLocal();
+ }
emitAssignment(temp, hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, undefined, multiLine));
- hasAssignedTemp = true;
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine));
leadingElement = undefined;
expressions = [];
}
@@ -43449,7 +46864,7 @@ var ts;
var multiLine = node.multiLine;
var numInitialProperties = countInitialNodesWithoutYield(properties);
var temp = declareLocal();
- emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, multiLine));
+ emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), multiLine));
var expressions = ts.reduceLeft(properties, reduceProperty, [], numInitialProperties);
expressions.push(multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
return ts.inlineExpressions(expressions);
@@ -43471,10 +46886,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- var clone_5 = ts.getMutableClone(node);
- clone_5.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
- clone_5.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
- return clone_5;
+ var clone_6 = ts.getMutableClone(node);
+ clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
+ clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
+ return clone_6;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43488,7 +46903,7 @@ var ts;
function visitNewExpression(node) {
if (ts.forEach(node.arguments, containsYield)) {
var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.setOriginalNode(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, [], node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, []), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43517,38 +46932,38 @@ var ts;
}
function transformAndEmitStatementWorker(node) {
switch (node.kind) {
- case 204:
+ case 206:
return transformAndEmitBlock(node);
- case 207:
+ case 209:
return transformAndEmitExpressionStatement(node);
- case 208:
+ case 210:
return transformAndEmitIfStatement(node);
- case 209:
+ case 211:
return transformAndEmitDoStatement(node);
- case 210:
+ case 212:
return transformAndEmitWhileStatement(node);
- case 211:
+ case 213:
return transformAndEmitForStatement(node);
- case 212:
- return transformAndEmitForInStatement(node);
case 214:
+ return transformAndEmitForInStatement(node);
+ case 216:
return transformAndEmitContinueStatement(node);
- case 215:
+ case 217:
return transformAndEmitBreakStatement(node);
- case 216:
+ case 218:
return transformAndEmitReturnStatement(node);
- case 217:
+ case 219:
return transformAndEmitWithStatement(node);
- case 218:
+ case 220:
return transformAndEmitSwitchStatement(node);
- case 219:
+ case 221:
return transformAndEmitLabeledStatement(node);
- case 220:
+ case 222:
return transformAndEmitThrowStatement(node);
- case 221:
+ case 223:
return transformAndEmitTryStatement(node);
default:
- return emitStatement(ts.visitNode(node, visitor, ts.isStatement, true));
+ return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
}
}
function transformAndEmitBlock(node) {
@@ -43565,7 +46980,9 @@ var ts;
function transformAndEmitVariableDeclarationList(node) {
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
- hoistVariableDeclaration(variable.name);
+ var name = ts.getSynthesizedClone(variable.name);
+ ts.setCommentRange(name, variable.name);
+ hoistVariableDeclaration(name);
}
var variables = ts.getInitializedVariables(node);
var numVariables = variables.length;
@@ -43595,7 +47012,7 @@ var ts;
if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {
var endLabel = defineLabel();
var elseLabel = node.elseStatement ? defineLabel() : undefined;
- emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression));
+ emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression), node.expression);
transformAndEmitEmbeddedStatement(node.thenStatement);
if (node.elseStatement) {
emitBreak(endLabel);
@@ -43674,7 +47091,7 @@ var ts;
transformAndEmitVariableDeclarationList(initializer);
}
else {
- emitStatement(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression), initializer));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression)), initializer));
}
}
markLabel(conditionLabel);
@@ -43684,7 +47101,7 @@ var ts;
transformAndEmitEmbeddedStatement(node.statement);
markLabel(incrementLabel);
if (node.incrementor) {
- emitStatement(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression), node.incrementor));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression)), node.incrementor));
}
emitBreak(conditionLabel);
endLoopBlock();
@@ -43698,7 +47115,7 @@ var ts;
beginScriptLoopBlock();
}
var initializer = node.initializer;
- if (ts.isVariableDeclarationList(initializer)) {
+ if (initializer && ts.isVariableDeclarationList(initializer)) {
for (var _i = 0, _a = initializer.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
@@ -43706,7 +47123,7 @@ var ts;
var variables = ts.getInitializedVariables(initializer);
node = ts.updateFor(node, variables.length > 0
? ts.inlineExpressions(ts.map(variables, transformInitializedVariable))
- : undefined, ts.visitNode(node.condition, visitor, ts.isExpression, true), ts.visitNode(node.incrementor, visitor, ts.isExpression, true), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -43764,7 +47181,7 @@ var ts;
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
}
- node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -43803,10 +47220,10 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function transformAndEmitReturnStatement(node) {
- emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function visitReturnStatement(node) {
- return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function transformAndEmitWithStatement(node) {
if (containsYield(node)) {
@@ -43829,7 +47246,7 @@ var ts;
for (var i = 0; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
clauseLabels.push(defineLabel());
- if (clause.kind === 254 && defaultClauseIndex === -1) {
+ if (clause.kind === 257 && defaultClauseIndex === -1) {
defaultClauseIndex = i;
}
}
@@ -43839,7 +47256,7 @@ var ts;
var defaultClausesSkipped = 0;
for (var i = clausesWritten; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseClause = clause;
if (containsYield(caseClause.expression) && pendingClauses.length > 0) {
break;
@@ -43941,9 +47358,9 @@ var ts;
}
return -1;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -43955,17 +47372,17 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (renamedCatchVariables && ts.hasProperty(renamedCatchVariables, node.text)) {
+ if (!ts.isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
var original = ts.getOriginalNode(node);
if (ts.isIdentifier(original) && original.parent) {
var declaration = resolver.getReferencedValueDeclaration(original);
if (declaration) {
- var name_38 = ts.getProperty(renamedCatchVariableDeclarations, String(ts.getOriginalNodeId(declaration)));
- if (name_38) {
- var clone_6 = ts.getMutableClone(name_38);
- ts.setSourceMapRange(clone_6, node);
- ts.setCommentRange(clone_6, node);
- return clone_6;
+ var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
+ if (name) {
+ var clone_7 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_7, node);
+ ts.setCommentRange(clone_7, node);
+ return clone_7;
}
}
}
@@ -43974,7 +47391,7 @@ var ts;
}
function cacheExpression(node) {
var temp;
- if (ts.isGeneratedIdentifier(node)) {
+ if (ts.isGeneratedIdentifier(node) || ts.getEmitFlags(node) & 4096) {
return node;
}
temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -44066,15 +47483,22 @@ var ts;
}
function beginCatchBlock(variable) {
ts.Debug.assert(peekBlockKind() === 0);
- var text = variable.name.text;
- var name = declareLocal(text);
- if (!renamedCatchVariables) {
- renamedCatchVariables = ts.createMap();
- renamedCatchVariableDeclarations = ts.createMap();
- context.enableSubstitution(70);
+ var name;
+ if (ts.isGeneratedIdentifier(variable.name)) {
+ name = variable.name;
+ hoistVariableDeclaration(variable.name);
+ }
+ else {
+ var text = variable.name.text;
+ name = declareLocal(text);
+ if (!renamedCatchVariables) {
+ renamedCatchVariables = ts.createMap();
+ renamedCatchVariableDeclarations = [];
+ context.enableSubstitution(70);
+ }
+ renamedCatchVariables.set(text, true);
+ renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
}
- renamedCatchVariables[text] = true;
- renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
var exception = peekBlock();
ts.Debug.assert(exception.state < 1);
var endLabel = exception.endLabel;
@@ -44274,23 +47698,23 @@ var ts;
}
function createInstruction(instruction) {
var literal = ts.createLiteral(instruction);
- literal.trailingComment = instructionNames[instruction];
+ ts.addSyntheticTrailingComment(literal, 3, getInstructionName(instruction));
return literal;
}
function createInlineBreak(label, location) {
ts.Debug.assert(label > 0, "Invalid label: " + label);
- return ts.createReturn(ts.createArrayLiteral([
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), location);
+ ])), location);
}
function createInlineReturn(expression, location) {
- return ts.createReturn(ts.createArrayLiteral(expression
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), location);
+ : [createInstruction(2)])), location);
}
function createGeneratorResume(location) {
- return ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, [], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, []), location);
}
function emitNop() {
emitWorker(0);
@@ -44356,7 +47780,7 @@ var ts;
currentExceptionBlock = undefined;
withBlockStack = undefined;
var buildResult = buildStatements();
- return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, undefined, buildResult.length > 0)), 262144));
+ return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, buildResult.length > 0)), 262144));
}
function buildStatements() {
if (operations) {
@@ -44565,51 +47989,51 @@ var ts;
}
}
function writeAssign(left, right, operationLocation) {
- writeStatement(ts.createStatement(ts.createAssignment(left, right), operationLocation));
+ writeStatement(ts.setTextRange(ts.createStatement(ts.createAssignment(left, right)), operationLocation));
}
function writeThrow(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createThrow(expression, operationLocation));
+ writeStatement(ts.setTextRange(ts.createThrow(expression), operationLocation));
}
function writeReturn(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), operationLocation));
+ : [createInstruction(2)])), operationLocation), 384));
}
function writeBreak(label, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeBreakWhenTrue(label, condition, operationLocation) {
- writeStatement(ts.createIf(condition, ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(condition, ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeBreakWhenFalse(label, condition, operationLocation) {
- writeStatement(ts.createIf(ts.createLogicalNot(condition), ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(ts.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeYield(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(4), expression]
- : [createInstruction(4)]), operationLocation));
+ : [createInstruction(4)])), operationLocation), 384));
}
function writeYieldStar(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(5),
expression
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeEndfinally() {
lastOperationWasAbrupt = true;
@@ -44627,23 +48051,47 @@ var ts;
name: "typescript:generator",
scoped: false,
priority: 6,
- text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;\n return { next: verb(0), \"throw\": verb(1), \"return\": verb(2) };\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
+ text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
};
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformES5(context) {
+ var compilerOptions = context.getCompilerOptions();
+ var previousOnEmitNode;
+ var noSubstitution;
+ if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) {
+ previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ context.enableEmitNotification(250);
+ context.enableEmitNotification(251);
+ context.enableEmitNotification(249);
+ noSubstitution = [];
+ }
var previousOnSubstituteNode = context.onSubstituteNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
- context.enableSubstitution(257);
+ context.enableSubstitution(178);
+ context.enableSubstitution(260);
return transformSourceFile;
function transformSourceFile(node) {
return node;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onEmitNode(hint, node, emitCallback) {
+ switch (node.kind) {
+ case 250:
+ case 251:
+ case 249:
+ var tagName = node.tagName;
+ noSubstitution[ts.getOriginalNodeId(tagName)] = true;
+ break;
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ if (node.id && noSubstitution && noSubstitution[node.id]) {
+ return previousOnSubstituteNode(hint, node);
+ }
+ node = previousOnSubstituteNode(hint, node);
if (ts.isPropertyAccessExpression(node)) {
return substitutePropertyAccessExpression(node);
}
@@ -44655,7 +48103,7 @@ var ts;
function substitutePropertyAccessExpression(node) {
var literalName = trySubstituteReservedName(node.name);
if (literalName) {
- return ts.createElementAccess(node.expression, literalName, node);
+ return ts.setTextRange(ts.createElementAccess(node.expression, literalName), node);
}
return node;
}
@@ -44669,7 +48117,7 @@ var ts;
function trySubstituteReservedName(name) {
var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
if (token >= 71 && token <= 106) {
- return ts.createLiteral(name, name);
+ return ts.setTextRange(ts.createLiteral(name), name);
}
return undefined;
}
@@ -44679,12 +48127,13 @@ var ts;
var ts;
(function (ts) {
function transformModule(context) {
- var transformModuleDelegates = ts.createMap((_a = {},
- _a[ts.ModuleKind.None] = transformCommonJSModule,
- _a[ts.ModuleKind.CommonJS] = transformCommonJSModule,
- _a[ts.ModuleKind.AMD] = transformAMDModule,
- _a[ts.ModuleKind.UMD] = transformUMDModule,
- _a));
+ function getTransformModuleDelegate(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.AMD: return transformAMDModule;
+ case ts.ModuleKind.UMD: return transformUMDModule;
+ default: return transformCommonJSModule;
+ }
+ }
var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
@@ -44696,40 +48145,49 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
+ context.enableSubstitution(193);
context.enableSubstitution(191);
- context.enableSubstitution(258);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
+ context.enableSubstitution(192);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
var currentSourceFile;
var currentModuleInfo;
var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
return node;
}
currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(node)] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- var transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ts.ModuleKind.None];
+ currentModuleInfo = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
+ moduleInfoMap[ts.getOriginalNodeId(node)] = currentModuleInfo;
+ var transformModule = getTransformModuleDelegate(moduleKind);
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
return ts.aggregateTransformFlags(updated);
}
+ function shouldEmitUnderscoreUnderscoreESModule() {
+ if (!currentModuleInfo.exportEquals && ts.isExternalModule(currentSourceFile)) {
+ return true;
+ }
+ return false;
+ }
function transformCommonJSModule(node) {
startLexicalEnvironment();
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
+ }
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
addExportEqualsIfNeeded(statements, false);
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ ts.addRange(statements, endLexicalEnvironment());
+ var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
if (currentModuleInfo.hasExportStarsToExportValues) {
ts.addEmitHelper(updated, exportStarHelper);
}
@@ -44738,15 +48196,8 @@ var ts;
function transformAMDModule(node) {
var define = ts.createIdentifier("define");
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
- return transformAsynchronousModule(node, define, moduleName, true);
- }
- function transformUMDModule(node) {
- var define = ts.createRawExpression(umdHelper);
- return transformAsynchronousModule(node, define, undefined, false);
- }
- function transformAsynchronousModule(node, define, moduleName, includeNonAmdDependencies) {
- var _a = collectAsynchronousDependencies(node, includeNonAmdDependencies), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
- return ts.updateSourceFileNode(node, ts.createNodeArray([
+ var _a = collectAsynchronousDependencies(node, true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(define, undefined, (moduleName ? [moduleName] : []).concat([
ts.createArrayLiteral([
ts.createLiteral("require"),
@@ -44757,7 +48208,37 @@ var ts;
ts.createParameter(undefined, undefined, undefined, "exports")
].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
])))
- ], node.statements));
+ ]), node.statements));
+ }
+ function transformUMDModule(node) {
+ var _a = collectAsynchronousDependencies(node, false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ var umdHeader = ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, "factory")], undefined, ts.setTextRange(ts.createBlock([
+ ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("module"), "object"), ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), "object")), ts.createBlock([
+ ts.createVariableStatement(undefined, [
+ ts.createVariableDeclaration("v", undefined, ts.createCall(ts.createIdentifier("factory"), undefined, [
+ ts.createIdentifier("require"),
+ ts.createIdentifier("exports")
+ ]))
+ ]),
+ ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1)
+ ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([
+ ts.createStatement(ts.createCall(ts.createIdentifier("define"), undefined, [
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createIdentifier("factory")
+ ]))
+ ])))
+ ], true), undefined));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(umdHeader, undefined, [
+ ts.createFunctionExpression(undefined, undefined, undefined, undefined, [
+ ts.createParameter(undefined, undefined, undefined, "require"),
+ ts.createParameter(undefined, undefined, undefined, "exports")
+ ].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
+ ]))
+ ]), node.statements));
}
function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
var aliasedModuleNames = [];
@@ -44777,13 +48258,15 @@ var ts;
var importNode = _c[_b];
var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
- if (includeNonAmdDependencies && importAliasName) {
- ts.setEmitFlags(importAliasName, 4);
- aliasedModuleNames.push(externalModuleName);
- importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
- }
- else {
- unaliasedModuleNames.push(externalModuleName);
+ if (externalModuleName) {
+ if (includeNonAmdDependencies && importAliasName) {
+ ts.setEmitFlags(importAliasName, 4);
+ aliasedModuleNames.push(externalModuleName);
+ importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
+ }
+ else {
+ unaliasedModuleNames.push(externalModuleName);
+ }
}
}
return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
@@ -44791,12 +48274,15 @@ var ts;
function transformAsynchronousModuleBody(node) {
startLexicalEnvironment();
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
+ var statementOffset = ts.addPrologue(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
+ }
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
addExportEqualsIfNeeded(statements, true);
- var body = ts.createBlock(statements, undefined, true);
+ ts.addRange(statements, endLexicalEnvironment());
+ var body = ts.createBlock(statements, true);
if (currentModuleInfo.hasExportStarsToExportValues) {
ts.addEmitHelper(body, exportStarHelper);
}
@@ -44805,12 +48291,14 @@ var ts;
function addExportEqualsIfNeeded(statements, emitAsReturn) {
if (currentModuleInfo.exportEquals) {
if (emitAsReturn) {
- var statement = ts.createReturn(currentModuleInfo.exportEquals.expression, currentModuleInfo.exportEquals);
+ var statement = ts.createReturn(currentModuleInfo.exportEquals.expression);
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
ts.setEmitFlags(statement, 384 | 1536);
statements.push(statement);
}
else {
- var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression), currentModuleInfo.exportEquals);
+ var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression));
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
ts.setEmitFlags(statement, 1536);
statements.push(statement);
}
@@ -44818,23 +48306,23 @@ var ts;
}
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 241:
+ case 243:
return visitExportDeclaration(node);
- case 240:
+ case 242:
return visitExportAssignment(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 295:
- return visitMergeDeclarationMarker(node);
case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
return visitEndOfDeclarationMarker(node);
default:
return node;
@@ -44845,7 +48333,7 @@ var ts;
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (moduleKind !== ts.ModuleKind.AMD) {
if (!node.importClause) {
- return ts.createStatement(createRequireCall(node), node);
+ return ts.setTextRange(ts.createStatement(createRequireCall(node)), node);
}
else {
var variables = [];
@@ -44858,13 +48346,13 @@ var ts;
variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)));
}
}
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, undefined, languageVersion >= 2 ? 2 : 0), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, languageVersion >= 2 ? 2 : 0)), node));
}
}
else if (namespaceDeclaration && ts.isDefaultImport(node)) {
statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node), node)
- ], undefined, languageVersion >= 2 ? 2 : 0)));
+ ts.setTextRange(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)), node)
+ ], languageVersion >= 2 ? 2 : 0)));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -44888,17 +48376,17 @@ var ts;
var statements;
if (moduleKind !== ts.ModuleKind.AMD) {
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(node.name, createRequireCall(node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(node.name, createRequireCall(node))), node));
}
else {
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getSynthesizedClone(node.name), undefined, createRequireCall(node))
- ], undefined, languageVersion >= 2 ? 2 : 0), node));
+ ], languageVersion >= 2 ? 2 : 0)), node));
}
}
else {
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node))), node));
}
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
@@ -44918,23 +48406,23 @@ var ts;
if (node.exportClause) {
var statements = [];
if (moduleKind !== ts.ModuleKind.AMD) {
- statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(generatedName, undefined, createRequireCall(node))
- ]), node));
+ ])), node));
}
for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
var specifier = _a[_i];
var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
- statements.push(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue), specifier));
+ statements.push(ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier));
}
return ts.singleOrMany(statements);
}
else {
- return ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
+ return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
moduleKind !== ts.ModuleKind.AMD
? createRequireCall(node)
: generatedName
- ]), node);
+ ])), node);
}
}
function visitExportAssignment(node) {
@@ -44955,7 +48443,7 @@ var ts;
function visitFunctionDeclaration(node) {
var statements;
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body, node), node));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body), node), node));
}
else {
statements = ts.append(statements, node);
@@ -44972,7 +48460,7 @@ var ts;
function visitClassDeclaration(node) {
var statements;
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members, node), node));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members), node), node));
}
else {
statements = ts.append(statements, node);
@@ -45008,7 +48496,7 @@ var ts;
statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
}
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
}
else {
@@ -45028,11 +48516,11 @@ var ts;
return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
}
else {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name, node.name), node.initializer);
+ return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), node.name), node.initializer);
}
}
function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
}
@@ -45064,10 +48552,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237:
+ case 239:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238:
+ case 240:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -45125,7 +48613,7 @@ var ts;
}
function appendExportsOfDeclaration(statements, decl) {
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
var exportSpecifier = exportSpecifiers_1[_i];
@@ -45135,28 +48623,28 @@ var ts;
return statements;
}
function appendExportStatement(statements, exportName, expression, location, allowComments) {
- if (exportName.text === "default") {
- var sourceFile = ts.getOriginalNode(currentSourceFile, ts.isSourceFile);
- if (sourceFile && !sourceFile.symbol.exports["___esModule"]) {
- if (languageVersion === 0) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true))));
- }
- else {
- statements = ts.append(statements, ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
- ts.createIdentifier("exports"),
- ts.createLiteral("__esModule"),
- ts.createObjectLiteral([
- ts.createPropertyAssignment("value", ts.createLiteral(true))
- ])
- ])));
- }
- }
- }
statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
return statements;
}
+ function createUnderscoreUnderscoreESModule() {
+ var statement;
+ if (languageVersion === 0) {
+ statement = ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true)));
+ }
+ else {
+ statement = ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
+ ts.createIdentifier("exports"),
+ ts.createLiteral("__esModule"),
+ ts.createObjectLiteral([
+ ts.createPropertyAssignment("value", ts.createLiteral(true))
+ ])
+ ]));
+ }
+ ts.setEmitFlags(statement, 524288);
+ return statement;
+ }
function createExportStatement(name, value, location, allowComments) {
- var statement = ts.createStatement(createExportExpression(name, value), location);
+ var statement = ts.setTextRange(ts.createStatement(createExportExpression(name, value)), location);
ts.startOnNewLine(statement);
if (!allowComments) {
ts.setEmitFlags(statement, 1536);
@@ -45164,7 +48652,7 @@ var ts;
return statement;
}
function createExportExpression(name, value, location) {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value, location);
+ return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location);
}
function modifierVisitor(node) {
switch (node.kind) {
@@ -45174,26 +48662,26 @@ var ts;
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
currentSourceFile = node;
currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
- noSubstitution = ts.createMap();
- previousOnEmitNode(emitContext, node, emitCallback);
+ noSubstitution = [];
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
currentModuleInfo = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (node.id && noSubstitution[node.id]) {
return node;
}
- if (emitContext === 1) {
+ if (hint === 1) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -45207,9 +48695,9 @@ var ts;
if (exportedOrImportedName !== name) {
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name, initializer, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name, exportedOrImportedName, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedOrImportedName), node);
}
return node;
}
@@ -45217,10 +48705,10 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 192:
+ case 193:
return substituteBinaryExpression(node);
+ case 192:
case 191:
- case 190:
return substituteUnaryExpression(node);
}
return node;
@@ -45235,17 +48723,17 @@ var ts;
}
if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
- if (exportContainer && exportContainer.kind === 261) {
- return ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node), node);
+ if (exportContainer && exportContainer.kind === 264) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node);
}
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- var name_39 = importDeclaration.propertyName || importDeclaration.name;
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name_39), node);
+ var name = importDeclaration.propertyName || importDeclaration.name;
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name)), node);
}
}
}
@@ -45278,8 +48766,8 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1), node)
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node)
: node;
for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
var exportName = exportedNames_2[_i];
@@ -45301,7 +48789,6 @@ var ts;
}
}
}
- var _a;
}
ts.transformModule = transformModule;
var exportStarHelper = {
@@ -45309,7 +48796,6 @@ var ts;
scoped: true,
text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
};
- var umdHelper = "\n (function (dependencies, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(dependencies, factory);\n }\n })";
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -45323,14 +48809,14 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
+ context.enableSubstitution(193);
context.enableSubstitution(191);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
- var exportFunctionsMap = ts.createMap();
- var noSubstitutionMap = ts.createMap();
+ context.enableSubstitution(192);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
+ var exportFunctionsMap = [];
+ var noSubstitutionMap = [];
var currentSourceFile;
var moduleInfo;
var exportFunction;
@@ -45349,7 +48835,8 @@ var ts;
currentSourceFile = node;
enclosingBlockScopedContainer = node;
moduleInfo = moduleInfoMap[id] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- exportFunction = exportFunctionsMap[id] = ts.createUniqueName("exports");
+ exportFunction = ts.createUniqueName("exports");
+ exportFunctionsMap[id] = exportFunction;
contextObject = ts.createUniqueName("context");
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
@@ -45359,11 +48846,11 @@ var ts;
], undefined, moduleBodyBlock);
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
var dependencies = ts.createArrayLiteral(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray([
+ var updated = ts.setEmitFlags(ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("System"), "register"), undefined, moduleName
? [moduleName, dependencies, moduleBodyFunction]
: [dependencies, moduleBodyFunction]))
- ], node.statements));
+ ]), node.statements)), 1024);
if (!(compilerOptions.outFile || compilerOptions.out)) {
ts.moveEmitHelpers(updated, moduleBodyBlock, function (helper) { return !helper.scoped; });
}
@@ -45385,17 +48872,19 @@ var ts;
for (var i = 0; i < externalImports.length; i++) {
var externalImport = externalImports[i];
var externalModuleName = ts.getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions);
- var text = externalModuleName.text;
- if (ts.hasProperty(groupIndices, text)) {
- var groupIndex = groupIndices[text];
- dependencyGroups[groupIndex].externalImports.push(externalImport);
- }
- else {
- groupIndices[text] = dependencyGroups.length;
- dependencyGroups.push({
- name: externalModuleName,
- externalImports: [externalImport]
- });
+ if (externalModuleName) {
+ var text = externalModuleName.text;
+ var groupIndex = groupIndices.get(text);
+ if (groupIndex !== undefined) {
+ dependencyGroups[groupIndex].externalImports.push(externalImport);
+ }
+ else {
+ groupIndices.set(text, dependencyGroups.length);
+ dependencyGroups.push({
+ name: externalModuleName,
+ externalImports: [externalImport]
+ });
+ }
}
}
return dependencyGroups;
@@ -45403,30 +48892,33 @@ var ts;
function createSystemModuleBody(node, dependencyGroups) {
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("__moduleName", undefined, ts.createLogicalAnd(contextObject, ts.createPropertyAccess(contextObject, "id")))
])));
- ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true);
+ ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
var executeStatements = ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset);
ts.addRange(statements, hoistedStatements);
ts.addRange(statements, endLexicalEnvironment());
var exportStarFunction = addExportStarIfNeeded(statements);
- statements.push(ts.createReturn(ts.setMultiLine(ts.createObjectLiteral([
+ var moduleObject = ts.createObjectLiteral([
ts.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
- ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, undefined, true)))
- ]), true)));
- return ts.createBlock(statements, undefined, true);
+ ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, true)))
+ ]);
+ moduleObject.multiLine = true;
+ statements.push(ts.createReturn(moduleObject));
+ return ts.createBlock(statements, true);
}
function addExportStarIfNeeded(statements) {
if (!moduleInfo.hasExportStarsToExportValues) {
return;
}
- if (!moduleInfo.exportedNames && ts.isEmpty(moduleInfo.exportSpecifiers)) {
+ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) {
var hasExportDeclarationWithExportClause = false;
for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
var externalImport = _a[_i];
- if (externalImport.kind === 241 && externalImport.exportClause) {
+ if (externalImport.kind === 243 && externalImport.exportClause) {
hasExportDeclarationWithExportClause = true;
break;
}
@@ -45444,12 +48936,12 @@ var ts;
if (exportedLocalName.text === "default") {
continue;
}
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createTrue()));
}
}
for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) {
var externalImport = _e[_d];
- if (externalImport.kind !== 241) {
+ if (externalImport.kind !== 243) {
continue;
}
var exportDecl = externalImport;
@@ -45458,12 +48950,12 @@ var ts;
}
for (var _f = 0, _g = exportDecl.exportClause.elements; _f < _g.length; _f++) {
var element = _g[_f];
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createTrue()));
}
}
var exportedNamesStorageRef = ts.createUniqueName("exportedNames");
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, undefined, true))
+ ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, true))
])));
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
statements.push(exportStarFunction);
@@ -45488,7 +48980,7 @@ var ts;
ts.setEmitFlags(ts.createIf(condition, ts.createStatement(ts.createAssignment(ts.createElementAccess(exports, n), ts.createElementAccess(m, n)))), 1)
])),
ts.createStatement(ts.createCall(exportFunction, undefined, [exports]))
- ], undefined, true));
+ ], true));
}
function createSettersArray(exportStarFunction, dependencyGroups) {
var setters = [];
@@ -45501,15 +48993,15 @@ var ts;
var entry = _b[_a];
var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile);
switch (entry.kind) {
- case 235:
+ case 237:
if (!entry.importClause) {
break;
}
- case 234:
+ case 236:
ts.Debug.assert(importVariableName !== undefined);
statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName)));
break;
- case 241:
+ case 243:
ts.Debug.assert(importVariableName !== undefined);
if (entry.exportClause) {
var properties = [];
@@ -45517,7 +49009,7 @@ var ts;
var e = _d[_c];
properties.push(ts.createPropertyAssignment(ts.createLiteral(e.name.text), ts.createElementAccess(parameterName, ts.createLiteral((e.propertyName || e.name).text))));
}
- statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, undefined, true)])));
+ statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, true)])));
}
else {
statements.push(ts.createStatement(ts.createCall(exportStarFunction, undefined, [parameterName])));
@@ -45525,19 +49017,19 @@ var ts;
break;
}
}
- setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, undefined, true)));
+ setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, true)));
}
- return ts.createArrayLiteral(setters, undefined, true);
+ return ts.createArrayLiteral(setters, true);
}
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 241:
+ case 243:
return undefined;
- case 240:
+ case 242:
return visitExportAssignment(node);
default:
return nestedElementVisitor(node);
@@ -45586,7 +49078,7 @@ var ts;
}
function visitFunctionDeclaration(node) {
if (ts.hasModifier(node, 1)) {
- hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
+ hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
}
else {
hoistedStatements = ts.append(hoistedStatements, node);
@@ -45604,7 +49096,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- statements = ts.append(statements, ts.createStatement(ts.createAssignment(name, ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement), node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -45632,7 +49124,7 @@ var ts;
}
var statements;
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
if (isMarkedDeclaration) {
var id = ts.getOriginalNodeId(node);
@@ -45658,7 +49150,7 @@ var ts;
}
function shouldHoistVariableDeclarationList(node) {
return (ts.getEmitFlags(node) & 1048576) === 0
- && (enclosingBlockScopedContainer.kind === 261
+ && (enclosingBlockScopedContainer.kind === 264
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
@@ -45676,11 +49168,11 @@ var ts;
function createVariableAssignment(name, value, location, isExportedDeclaration) {
hoistVariableDeclaration(ts.getSynthesizedClone(name));
return isExportedDeclaration
- ? createExportExpression(name, preventSubstitution(ts.createAssignment(name, value, location)))
- : preventSubstitution(ts.createAssignment(name, value, location));
+ ? createExportExpression(name, preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)))
+ : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location));
}
function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
var id = ts.getOriginalNodeId(node);
var isExportedDeclaration = ts.hasModifier(node.original, 1);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -45713,10 +49205,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237:
+ case 239:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238:
+ case 240:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -45786,7 +49278,7 @@ var ts;
return statements;
}
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = moduleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = moduleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
var exportSpecifier = exportSpecifiers_2[_i];
@@ -45815,43 +49307,43 @@ var ts;
}
function nestedElementVisitor(node) {
switch (node.kind) {
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 213:
+ case 215:
return visitForOfStatement(node);
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
- case 217:
+ case 219:
return visitWithStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 232:
+ case 234:
return visitCaseBlock(node);
- case 253:
+ case 256:
return visitCaseClause(node);
- case 254:
+ case 257:
return visitDefaultClause(node);
- case 221:
+ case 223:
return visitTryStatement(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 204:
+ case 206:
return visitBlock(node);
- case 295:
- return visitMergeDeclarationMarker(node);
case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
return visitEndOfDeclarationMarker(node);
default:
return destructuringVisitor(node);
@@ -45860,21 +49352,21 @@ var ts;
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForInStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForOf(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -45883,6 +49375,9 @@ var ts;
&& shouldHoistVariableDeclarationList(node);
}
function visitForInitializer(node) {
+ if (!node) {
+ return node;
+ }
if (shouldHoistForInitializer(node)) {
var expressions = void 0;
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
@@ -45896,16 +49391,16 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
+ return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitLabeledStatement(node) {
- return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitSwitchStatement(node) {
return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
@@ -45942,7 +49437,7 @@ var ts;
}
function destructuringVisitor(node) {
if (node.transformFlags & 1024
- && node.kind === 192) {
+ && node.kind === 193) {
return visitDestructuringAssignment(node);
}
else if (node.transformFlags & 2048) {
@@ -45959,7 +49454,7 @@ var ts;
return ts.visitEachChild(node, destructuringVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
- if (ts.isAssignmentExpression(node)) {
+ if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
else if (ts.isSpreadExpression(node)) {
@@ -45979,7 +49474,7 @@ var ts;
}
else if (ts.isIdentifier(node)) {
var container = resolver.getReferencedExportContainer(node);
- return container !== undefined && container.kind === 261;
+ return container !== undefined && container.kind === 264;
}
else {
return false;
@@ -45993,8 +49488,8 @@ var ts;
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
var id = ts.getOriginalNodeId(node);
currentSourceFile = node;
moduleInfo = moduleInfoMap[id];
@@ -46003,22 +49498,22 @@ var ts;
if (noSubstitution) {
delete noSubstitutionMap[id];
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
moduleInfo = undefined;
exportFunction = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (isSubstitutionPrevented(node)) {
return node;
}
- if (emitContext === 1) {
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -46027,10 +49522,10 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 192:
+ case 193:
return substituteBinaryExpression(node);
- case 190:
case 191:
+ case 192:
return substituteUnaryExpression(node);
}
return node;
@@ -46047,10 +49542,10 @@ var ts;
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name)), node);
}
}
}
@@ -46082,14 +49577,14 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createPrefix(node.operator, node.operand, node)
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node)
: node;
for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
var exportName = exportedNames_4[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
- if (node.kind === 191) {
+ if (node.kind === 192) {
expression = node.operator === 42
? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1))
: ts.createAdd(preventSubstitution(expression), ts.createLiteral(1));
@@ -46106,7 +49601,7 @@ var ts;
|| resolver.getReferencedValueDeclaration(name);
if (valueDeclaration) {
var exportContainer = resolver.getReferencedExportContainer(name, false);
- if (exportContainer && exportContainer.kind === 261) {
+ if (exportContainer && exportContainer.kind === 264) {
exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration));
}
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -46116,7 +49611,7 @@ var ts;
}
function preventSubstitution(node) {
if (noSubstitution === undefined)
- noSubstitution = ts.createMap();
+ noSubstitution = [];
noSubstitution[ts.getNodeId(node)] = true;
return node;
}
@@ -46134,7 +49629,7 @@ var ts;
var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableEmitNotification(261);
+ context.enableEmitNotification(264);
context.enableSubstitution(70);
var currentSourceFile;
return transformSourceFile;
@@ -46146,10 +49641,10 @@ var ts;
var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
if (externalHelpersModuleName) {
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements);
+ var statementOffset = ts.addPrologue(statements, node.statements);
ts.append(statements, ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -46159,9 +49654,9 @@ var ts;
}
function visitor(node) {
switch (node.kind) {
- case 234:
+ case 236:
return undefined;
- case 240:
+ case 242:
return visitExportAssignment(node);
}
return node;
@@ -46169,19 +49664,19 @@ var ts;
function visitExportAssignment(node) {
return node.isExportEquals ? undefined : node;
}
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
if (ts.isSourceFile(node)) {
currentSourceFile = node;
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isIdentifier(node) && emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isIdentifier(node) && hint === 1) {
return substituteExpressionIdentifier(node);
}
return node;
@@ -46200,19 +49695,34 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var moduleTransformerMap = ts.createMap((_a = {},
- _a[ts.ModuleKind.ES2015] = ts.transformES2015Module,
- _a[ts.ModuleKind.System] = ts.transformSystemModule,
- _a[ts.ModuleKind.AMD] = ts.transformModule,
- _a[ts.ModuleKind.CommonJS] = ts.transformModule,
- _a[ts.ModuleKind.UMD] = ts.transformModule,
- _a[ts.ModuleKind.None] = ts.transformModule,
- _a));
- function getTransformers(compilerOptions) {
+ function getModuleTransformer(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.ES2015:
+ return ts.transformES2015Module;
+ case ts.ModuleKind.System:
+ return ts.transformSystemModule;
+ default:
+ return ts.transformModule;
+ }
+ }
+ var TransformationState;
+ (function (TransformationState) {
+ TransformationState[TransformationState["Uninitialized"] = 0] = "Uninitialized";
+ TransformationState[TransformationState["Initialized"] = 1] = "Initialized";
+ TransformationState[TransformationState["Completed"] = 2] = "Completed";
+ TransformationState[TransformationState["Disposed"] = 3] = "Disposed";
+ })(TransformationState || (TransformationState = {}));
+ var SyntaxKindFeatureFlags;
+ (function (SyntaxKindFeatureFlags) {
+ SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["Substitution"] = 1] = "Substitution";
+ SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["EmitNotifications"] = 2] = "EmitNotifications";
+ })(SyntaxKindFeatureFlags || (SyntaxKindFeatureFlags = {}));
+ function getTransformers(compilerOptions, customTransformers) {
var jsx = compilerOptions.jsx;
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var transformers = [];
+ ts.addRange(transformers, customTransformers && customTransformers.before);
transformers.push(ts.transformTypeScript);
if (jsx === 2) {
transformers.push(ts.transformJsx);
@@ -46230,16 +49740,16 @@ var ts;
transformers.push(ts.transformES2015);
transformers.push(ts.transformGenerators);
}
- transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ts.ModuleKind.None]);
+ transformers.push(getModuleTransformer(moduleKind));
if (languageVersion < 1) {
transformers.push(ts.transformES5);
}
+ ts.addRange(transformers, customTransformers && customTransformers.after);
return transformers;
}
ts.getTransformers = getTransformers;
- function transformFiles(resolver, host, sourceFiles, transformers) {
+ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
var enabledSyntaxKindFeatures = new Array(298);
- var lexicalEnvironmentDisabled = false;
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -46247,8 +49757,11 @@ var ts;
var lexicalEnvironmentStackOffset = 0;
var lexicalEnvironmentSuspended = false;
var emitHelpers;
+ var onSubstituteNode = function (_, node) { return node; };
+ var onEmitNode = function (hint, node, callback) { return callback(hint, node); };
+ var state = 0;
var context = {
- getCompilerOptions: function () { return host.getCompilerOptions(); },
+ getCompilerOptions: function () { return options; },
getEmitResolver: function () { return resolver; },
getEmitHost: function () { return host; },
startLexicalEnvironment: startLexicalEnvironment,
@@ -46259,65 +49772,77 @@ var ts;
hoistFunctionDeclaration: hoistFunctionDeclaration,
requestEmitHelper: requestEmitHelper,
readEmitHelpers: readEmitHelpers,
- onSubstituteNode: function (_emitContext, node) { return node; },
enableSubstitution: enableSubstitution,
- isSubstitutionEnabled: isSubstitutionEnabled,
- onEmitNode: function (node, emitContext, emitCallback) { return emitCallback(node, emitContext); },
enableEmitNotification: enableEmitNotification,
- isEmitNotificationEnabled: isEmitNotificationEnabled
+ isSubstitutionEnabled: isSubstitutionEnabled,
+ isEmitNotificationEnabled: isEmitNotificationEnabled,
+ get onSubstituteNode() { return onSubstituteNode; },
+ set onSubstituteNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onSubstituteNode = value;
+ },
+ get onEmitNode() { return onEmitNode; },
+ set onEmitNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onEmitNode = value;
+ }
};
+ for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
+ var node = nodes_4[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ ts.performance.mark("beforeTransform");
var transformation = ts.chain.apply(void 0, transformers)(context);
- var transformed = ts.map(sourceFiles, transformSourceFile);
- lexicalEnvironmentDisabled = true;
+ state = 1;
+ var transformed = ts.map(nodes, allowDtsFiles ? transformation : transformRoot);
+ state = 2;
+ ts.performance.mark("afterTransform");
+ ts.performance.measure("transformTime", "beforeTransform", "afterTransform");
return {
transformed: transformed,
- emitNodeWithSubstitution: emitNodeWithSubstitution,
- emitNodeWithNotification: emitNodeWithNotification
+ substituteNode: substituteNode,
+ emitNodeWithNotification: emitNodeWithNotification,
+ dispose: dispose
};
- function transformSourceFile(sourceFile) {
- if (ts.isDeclarationFile(sourceFile)) {
- return sourceFile;
- }
- return transformation(sourceFile);
+ function transformRoot(node) {
+ return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
}
function enableSubstitution(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 1;
}
function isSubstitutionEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 1) !== 0
&& (ts.getEmitFlags(node) & 4) === 0;
}
- function emitNodeWithSubstitution(emitContext, node, emitCallback) {
- if (node) {
- if (isSubstitutionEnabled(node)) {
- var substitute = context.onSubstituteNode(emitContext, node);
- if (substitute && substitute !== node) {
- emitCallback(emitContext, substitute);
- return;
- }
- }
- emitCallback(emitContext, node);
- }
+ function substituteNode(hint, node) {
+ ts.Debug.assert(state < 3, "Cannot substitute a node after the result is disposed.");
+ return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
}
function enableEmitNotification(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 2;
}
function isEmitNotificationEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 2) !== 0
|| (ts.getEmitFlags(node) & 2) !== 0;
}
- function emitNodeWithNotification(emitContext, node, emitCallback) {
+ function emitNodeWithNotification(hint, node, emitCallback) {
+ ts.Debug.assert(state < 3, "Cannot invoke TransformationResult callbacks after the result is disposed.");
if (node) {
if (isEmitNotificationEnabled(node)) {
- context.onEmitNode(emitContext, node, emitCallback);
+ onEmitNode(hint, node, emitCallback);
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
}
}
function hoistVariableDeclaration(name) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
var decl = ts.createVariableDeclaration(name);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
@@ -46327,7 +49852,8 @@ var ts;
}
}
function hoistFunctionDeclaration(func) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -46336,7 +49862,8 @@ var ts;
}
}
function startLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot start a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations;
lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations;
@@ -46345,17 +49872,20 @@ var ts;
lexicalEnvironmentFunctionDeclarations = undefined;
}
function suspendLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot suspend a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended.");
lexicalEnvironmentSuspended = true;
}
function resumeLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot resume a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended.");
lexicalEnvironmentSuspended = false;
}
function endLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot end a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
var statements;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
@@ -46382,33 +49912,52 @@ var ts;
return statements;
}
function requestEmitHelper(helper) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper.");
emitHelpers = ts.append(emitHelpers, helper);
}
function readEmitHelpers() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
var helpers = emitHelpers;
emitHelpers = undefined;
return helpers;
}
+ function dispose() {
+ if (state < 3) {
+ for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
+ var node = nodes_5[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ lexicalEnvironmentVariableDeclarations = undefined;
+ lexicalEnvironmentVariableDeclarationsStack = undefined;
+ lexicalEnvironmentFunctionDeclarations = undefined;
+ lexicalEnvironmentFunctionDeclarationsStack = undefined;
+ onSubstituteNode = undefined;
+ onEmitNode = undefined;
+ emitHelpers = undefined;
+ state = 3;
+ }
+ }
}
- ts.transformFiles = transformFiles;
- var _a;
+ ts.transformNodes = transformNodes;
})(ts || (ts = {}));
var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
- ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
+ ts.forEachEmittedFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
- function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
+ function getDeclarationDiagnosticsFromFile(_a, sourceFileOrBundle) {
var declarationFilePath = _a.declarationFilePath;
- emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit, false);
+ emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sourceFileOrBundle, false);
}
}
ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
- function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles) {
+ function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
@@ -46470,7 +50019,7 @@ var ts;
var oldWriter = writer;
ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
- ts.Debug.assert(aliasEmitInfo.node.kind === 235);
+ ts.Debug.assert(aliasEmitInfo.node.kind === 237);
createAndSetNewTextWriterWithSymbolWriter();
ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit));
for (var i = 0; i < aliasEmitInfo.indent; i++) {
@@ -46493,9 +50042,9 @@ var ts;
}
});
if (usedTypeDirectiveReferences) {
- for (var directive in usedTypeDirectiveReferences) {
+ ts.forEachKey(usedTypeDirectiveReferences, function (directive) {
referencesOutput += "/// <reference types=\"" + directive + "\" />" + newLine;
- }
+ });
}
return {
reportedDeclarationError: reportedDeclarationError,
@@ -46520,12 +50069,14 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
+ writer.reportIllegalExtends = reportIllegalExtends;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
writer.writeSpace = writer.write;
writer.writeStringLiteral = writer.writeLiteral;
writer.writeParameter = writer.write;
+ writer.writeProperty = writer.write;
writer.writeSymbol = writer.write;
setWriter(writer);
}
@@ -46541,10 +50092,10 @@ var ts;
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
- if (declaration.kind === 223) {
+ if (declaration.kind === 225) {
nodeToCheck = declaration.parent.parent;
}
- else if (declaration.kind === 238 || declaration.kind === 239 || declaration.kind === 236) {
+ else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) {
ts.Debug.fail("We should be getting ImportDeclaration instead to write");
}
else {
@@ -46555,7 +50106,7 @@ var ts;
moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; });
}
if (moduleElementEmitInfo) {
- if (moduleElementEmitInfo.node.kind === 235) {
+ if (moduleElementEmitInfo.node.kind === 237) {
moduleElementEmitInfo.isVisible = true;
}
else {
@@ -46563,12 +50114,12 @@ var ts;
for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
increaseIndent();
}
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
asynchronousSubModuleDeclarationEmitInfo = [];
}
writeModuleElement(nodeToCheck);
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
asynchronousSubModuleDeclarationEmitInfo = undefined;
}
@@ -46587,8 +50138,8 @@ var ts;
}
for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) {
var directive = typeReferenceDirectives_1[_i];
- if (!(directive in usedTypeDirectiveReferences)) {
- usedTypeDirectiveReferences[directive] = directive;
+ if (!usedTypeDirectiveReferences.has(directive)) {
+ usedTypeDirectiveReferences.set(directive, directive);
}
}
}
@@ -46615,6 +50166,12 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
+ function reportIllegalExtends() {
+ if (errorNameNode) {
+ reportedDeclarationError = true;
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, ts.declarationNameToString(errorNameNode)));
+ }
+ }
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
@@ -46624,12 +50181,16 @@ var ts;
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
- if (type) {
+ var shouldUseResolverType = declaration.kind === 145 &&
+ resolver.isRequiredInitializedParameter(declaration);
+ if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
+ var format = 2 | 1024 |
+ (shouldUseResolverType ? 4096 : 0);
+ resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
}
@@ -46646,15 +50207,15 @@ var ts;
}
}
function emitLines(nodes) {
- for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
- var node = nodes_4[_i];
+ for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) {
+ var node = nodes_6[_i];
emit(node);
}
}
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
- for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
- var node = nodes_5[_i];
+ for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
+ var node = nodes_7[_i];
if (!canEmitFn || canEmitFn(node)) {
if (currentWriterPos !== writer.getTextPos()) {
write(separator);
@@ -46681,49 +50242,50 @@ var ts;
function emitType(type) {
switch (type.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 133:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 167:
- case 171:
+ case 168:
+ case 172:
return writeTextOfNode(currentText, type);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(type);
- case 157:
+ case 158:
return emitTypeReference(type);
- case 160:
+ case 161:
return emitTypeQuery(type);
- case 162:
- return emitArrayType(type);
case 163:
- return emitTupleType(type);
+ return emitArrayType(type);
case 164:
- return emitUnionType(type);
+ return emitTupleType(type);
case 165:
- return emitIntersectionType(type);
+ return emitUnionType(type);
case 166:
+ return emitIntersectionType(type);
+ case 167:
return emitParenType(type);
- case 168:
- return emitTypeOperator(type);
case 169:
- return emitIndexedAccessType(type);
+ return emitTypeOperator(type);
case 170:
+ return emitIndexedAccessType(type);
+ case 171:
return emitMappedType(type);
- case 158:
case 159:
+ case 160:
return emitSignatureDeclarationWithJsDocComments(type);
- case 161:
+ case 162:
return emitTypeLiteral(type);
case 70:
return emitEntityName(type);
- case 141:
+ case 142:
return emitEntityName(type);
- case 156:
+ case 157:
return emitTypePredicate(type);
}
function writeEntityName(entityName) {
@@ -46731,22 +50293,22 @@ var ts;
writeTextOfNode(currentText, entityName);
}
else {
- var left = entityName.kind === 141 ? entityName.left : entityName.expression;
- var right = entityName.kind === 141 ? entityName.right : entityName.name;
+ var left = entityName.kind === 142 ? entityName.left : entityName.expression;
+ var right = entityName.kind === 142 ? entityName.right : entityName.name;
writeEntityName(left);
write(".");
writeTextOfNode(currentText, right);
}
}
function emitEntityName(entityName) {
- var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 234 ? entityName.parent : enclosingDeclaration);
+ var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeEntityName(entityName);
}
function emitExpressionWithTypeArguments(node) {
if (ts.isEntityNameExpression(node.expression)) {
- ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 177);
+ ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178);
emitEntityName(node.expression);
if (node.typeArguments) {
write("<");
@@ -46850,15 +50412,15 @@ var ts;
}
function getExportDefaultTempVariableName() {
var baseName = "_default";
- if (!(baseName in currentIdentifiers)) {
+ if (!currentIdentifiers.has(baseName)) {
return baseName;
}
var count = 0;
while (true) {
count++;
- var name_40 = baseName + "_" + count;
- if (!(name_40 in currentIdentifiers)) {
- return name_40;
+ var name = baseName + "_" + count;
+ if (!currentIdentifiers.has(name)) {
+ return name;
}
}
}
@@ -46902,10 +50464,10 @@ var ts;
if (isModuleElementVisible) {
writeModuleElement(node);
}
- else if (node.kind === 234 ||
- (node.parent.kind === 261 && isCurrentFileExternalModule)) {
+ else if (node.kind === 236 ||
+ (node.parent.kind === 264 && isCurrentFileExternalModule)) {
var isVisible = void 0;
- if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 261) {
+ if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) {
asynchronousSubModuleDeclarationEmitInfo.push({
node: node,
outputPos: writer.getTextPos(),
@@ -46914,7 +50476,7 @@ var ts;
});
}
else {
- if (node.kind === 235) {
+ if (node.kind === 237) {
var importDeclaration = node;
if (importDeclaration.importClause) {
isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
@@ -46932,30 +50494,30 @@ var ts;
}
function writeModuleElement(node) {
switch (node.kind) {
- case 225:
+ case 227:
return writeFunctionDeclaration(node);
- case 205:
+ case 207:
return writeVariableStatement(node);
- case 227:
+ case 229:
return writeInterfaceDeclaration(node);
- case 226:
- return writeClassDeclaration(node);
case 228:
+ return writeClassDeclaration(node);
+ case 230:
return writeTypeAliasDeclaration(node);
- case 229:
+ case 231:
return writeEnumDeclaration(node);
- case 230:
+ case 232:
return writeModuleDeclaration(node);
- case 234:
+ case 236:
return writeImportEqualsDeclaration(node);
- case 235:
+ case 237:
return writeImportDeclaration(node);
default:
ts.Debug.fail("Unknown symbol kind");
}
}
function emitModuleElementDeclarationFlags(node) {
- if (node.parent.kind === 261) {
+ if (node.parent.kind === 264) {
var modifiers = ts.getModifierFlags(node);
if (modifiers & 1) {
write("export ");
@@ -46963,7 +50525,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 227 && !noDeclare) {
+ else if (node.kind !== 229 && !noDeclare) {
write("declare ");
}
}
@@ -47013,7 +50575,7 @@ var ts;
}
function isVisibleNamedBinding(namedBindings) {
if (namedBindings) {
- if (namedBindings.kind === 237) {
+ if (namedBindings.kind === 239) {
return resolver.isDeclarationVisible(namedBindings);
}
else {
@@ -47036,7 +50598,7 @@ var ts;
if (currentWriterPos !== writer.getTextPos()) {
write(", ");
}
- if (node.importClause.namedBindings.kind === 237) {
+ if (node.importClause.namedBindings.kind === 239) {
write("* as ");
writeTextOfNode(currentText, node.importClause.namedBindings.name);
}
@@ -47053,13 +50615,13 @@ var ts;
writer.writeLine();
}
function emitExternalModuleSpecifier(parent) {
- resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 230;
+ resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232;
var moduleSpecifier;
- if (parent.kind === 234) {
+ if (parent.kind === 236) {
var node = parent;
moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node);
}
- else if (parent.kind === 230) {
+ else if (parent.kind === 232) {
moduleSpecifier = parent.name;
}
else {
@@ -47127,7 +50689,7 @@ var ts;
writeTextOfNode(currentText, node.name);
}
}
- while (node.body && node.body.kind !== 231) {
+ while (node.body && node.body.kind !== 233) {
node = node.body;
write(".");
writeTextOfNode(currentText, node.name);
@@ -47197,7 +50759,7 @@ var ts;
writeLine();
}
function isPrivateMethodTypeParameter(node) {
- return node.parent.kind === 149 && ts.hasModifier(node.parent, 8);
+ return node.parent.kind === 150 && ts.hasModifier(node.parent, 8);
}
function emitTypeParameters(typeParameters) {
function emitTypeParameter(node) {
@@ -47207,52 +50769,69 @@ var ts;
writeTextOfNode(currentText, node.name);
if (node.constraint && !isPrivateMethodTypeParameter(node)) {
write(" extends ");
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- (node.parent.parent && node.parent.parent.kind === 161)) {
- ts.Debug.assert(node.parent.kind === 149 ||
- node.parent.kind === 148 ||
- node.parent.kind === 158 ||
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
node.parent.kind === 159 ||
- node.parent.kind === 153 ||
- node.parent.kind === 154);
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
emitType(node.constraint);
}
else {
emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
}
}
+ if (node.default && !isPrivateMethodTypeParameter(node)) {
+ write(" = ");
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
+ node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
+ emitType(node.default);
+ }
+ else {
+ emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError);
+ }
+ }
function getTypeParameterConstraintVisibilityError() {
var diagnosticMessage;
switch (node.parent.kind) {
- case 226:
+ case 228:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
break;
- case 227:
+ case 229:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
- case 154:
+ case 155:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 153:
+ case 154:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
}
else {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
break;
- case 225:
+ case 227:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
- case 228:
+ case 230:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;
default:
@@ -47271,7 +50850,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(typeReferences, isImplementsList) {
+ function emitHeritageClause(className, typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -47285,17 +50864,19 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
+ errorNameNode = className;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
+ errorNameNode = undefined;
}
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
- if (node.parent.parent.kind === 226) {
+ if (node.parent.parent.kind === 228) {
diagnosticMessage = isImplementsList ?
ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
- ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
+ ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
}
else {
- diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
+ diagnosticMessage = ts.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
}
return {
diagnosticMessage: diagnosticMessage,
@@ -47327,9 +50908,10 @@ var ts;
emitTypeParameters(node.typeParameters);
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- emitHeritageClause([baseTypeNode], false);
+ node.name;
+ emitHeritageClause(node.name, [baseTypeNode], false);
}
- emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -47350,7 +50932,7 @@ var ts;
emitTypeParameters(node.typeParameters);
var interfaceExtendsTypes = ts.filter(ts.getInterfaceBaseTypeNodes(node), function (base) { return ts.isEntityNameExpression(base.expression); });
if (interfaceExtendsTypes && interfaceExtendsTypes.length) {
- emitHeritageClause(interfaceExtendsTypes, false);
+ emitHeritageClause(node.name, interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -47372,17 +50954,17 @@ var ts;
writeLine();
}
function emitVariableDeclaration(node) {
- if (node.kind !== 223 || resolver.isDeclarationVisible(node)) {
+ if (node.kind !== 225 || resolver.isDeclarationVisible(node)) {
if (ts.isBindingPattern(node.name)) {
emitBindingPattern(node.name);
}
else {
writeTextOfNode(currentText, node.name);
- if ((node.kind === 147 || node.kind === 146 ||
- (node.kind === 144 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
+ if ((node.kind === 148 || node.kind === 147 ||
+ (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
write("?");
}
- if ((node.kind === 147 || node.kind === 146) && node.parent.kind === 161) {
+ if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (resolver.isLiteralConstDeclaration(node)) {
@@ -47395,14 +50977,14 @@ var ts;
}
}
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
- if (node.kind === 223) {
+ if (node.kind === 225) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
}
- else if (node.kind === 147 || node.kind === 146) {
+ else if (node.kind === 148 || node.kind === 147) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47410,7 +50992,7 @@ var ts;
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47436,7 +51018,7 @@ var ts;
var elements = [];
for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
var element = _a[_i];
- if (element.kind !== 198) {
+ if (element.kind !== 199) {
elements.push(element);
}
}
@@ -47502,7 +51084,7 @@ var ts;
accessorWithTypeAnnotation = node;
var type = getTypeAnnotationFromAccessor(node);
if (!type) {
- var anotherAccessor = node.kind === 151 ? accessors.setAccessor : accessors.getAccessor;
+ var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor;
type = getTypeAnnotationFromAccessor(anotherAccessor);
if (type) {
accessorWithTypeAnnotation = anotherAccessor;
@@ -47515,7 +51097,7 @@ var ts;
}
function getTypeAnnotationFromAccessor(accessor) {
if (accessor) {
- return accessor.kind === 151
+ return accessor.kind === 152
? accessor.type
: accessor.parameters.length > 0
? accessor.parameters[0].type
@@ -47524,7 +51106,7 @@ var ts;
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
- if (accessorWithTypeAnnotation.kind === 152) {
+ if (accessorWithTypeAnnotation.kind === 153) {
if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
@@ -47570,17 +51152,17 @@ var ts;
}
if (!resolver.isImplementationOfOverload(node)) {
emitJsDocComments(node);
- if (node.kind === 225) {
+ if (node.kind === 227) {
emitModuleElementDeclarationFlags(node);
}
- else if (node.kind === 149 || node.kind === 150) {
+ else if (node.kind === 150 || node.kind === 151) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
}
- if (node.kind === 225) {
+ if (node.kind === 227) {
write("function ");
writeTextOfNode(currentText, node.name);
}
- else if (node.kind === 150) {
+ else if (node.kind === 151) {
write("constructor");
}
else {
@@ -47600,15 +51182,15 @@ var ts;
var prevEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = node;
var closeParenthesizedFunctionType = false;
- if (node.kind === 155) {
+ if (node.kind === 156) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
write("[");
}
else {
- if (node.kind === 154 || node.kind === 159) {
+ if (node.kind === 155 || node.kind === 160) {
write("new ");
}
- else if (node.kind === 158) {
+ else if (node.kind === 159) {
var currentOutput = writer.getText();
if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") {
closeParenthesizedFunctionType = true;
@@ -47619,20 +51201,20 @@ var ts;
write("(");
}
emitCommaList(node.parameters, emitParameterDeclaration);
- if (node.kind === 155) {
+ if (node.kind === 156) {
write("]");
}
else {
write(")");
}
- var isFunctionTypeOrConstructorType = node.kind === 158 || node.kind === 159;
- if (isFunctionTypeOrConstructorType || node.parent.kind === 161) {
+ var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160;
+ if (isFunctionTypeOrConstructorType || node.parent.kind === 162) {
if (node.type) {
write(isFunctionTypeOrConstructorType ? " => " : ": ");
emitType(node.type);
}
}
- else if (node.kind !== 150 && !ts.hasModifier(node, 8)) {
+ else if (node.kind !== 151 && !ts.hasModifier(node, 8)) {
writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
}
enclosingDeclaration = prevEnclosingDeclaration;
@@ -47646,23 +51228,23 @@ var ts;
function getReturnTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
switch (node.kind) {
- case 154:
+ case 155:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 153:
+ case 154:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 155:
+ case 156:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47670,7 +51252,7 @@ var ts;
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -47683,7 +51265,7 @@ var ts;
ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
}
break;
- case 225:
+ case 227:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -47715,9 +51297,9 @@ var ts;
write("?");
}
decreaseIndent();
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- node.parent.parent.kind === 161) {
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (!ts.hasModifier(node.parent, 8)) {
@@ -47733,22 +51315,26 @@ var ts;
}
function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
switch (node.parent.kind) {
- case 150:
+ case 151:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
- case 154:
+ case 155:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 153:
+ case 154:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 156:
+ return symbolAccessibilityResult.errorModuleName ?
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47756,7 +51342,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47768,7 +51354,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
- case 225:
+ case 227:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47779,12 +51365,12 @@ var ts;
}
}
function emitBindingPattern(bindingPattern) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
write("{");
emitCommaList(bindingPattern.elements, emitBindingElement);
write("}");
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
write("[");
var elements = bindingPattern.elements;
emitCommaList(elements, emitBindingElement);
@@ -47795,10 +51381,10 @@ var ts;
}
}
function emitBindingElement(bindingElement) {
- if (bindingElement.kind === 198) {
+ if (bindingElement.kind === 199) {
write(" ");
}
- else if (bindingElement.kind === 174) {
+ else if (bindingElement.kind === 175) {
if (bindingElement.propertyName) {
writeTextOfNode(currentText, bindingElement.propertyName);
write(": ");
@@ -47820,39 +51406,39 @@ var ts;
}
function emitNode(node) {
switch (node.kind) {
- case 225:
- case 230:
- case 234:
case 227:
- case 226:
- case 228:
+ case 232:
+ case 236:
case 229:
+ case 228:
+ case 230:
+ case 231:
return emitModuleElement(node, isModuleElementVisible(node));
- case 205:
+ case 207:
return emitModuleElement(node, isVariableStatementVisible(node));
- case 235:
+ case 237:
return emitModuleElement(node, !node.importClause);
- case 241:
+ case 243:
return emitExportDeclaration(node);
+ case 151:
case 150:
case 149:
- case 148:
return writeFunctionDeclaration(node);
- case 154:
- case 153:
case 155:
+ case 154:
+ case 156:
return emitSignatureDeclarationWithJsDocComments(node);
- case 151:
case 152:
+ case 153:
return emitAccessorDeclaration(node);
+ case 148:
case 147:
- case 146:
return emitPropertyDeclaration(node);
- case 260:
+ case 263:
return emitEnumMemberDeclaration(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 261:
+ case 264:
return emitSourceFile(node);
}
}
@@ -47863,14 +51449,15 @@ var ts;
declFileName = referencedFile.fileName;
}
else {
- ts.forEachExpectedEmitFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
}
if (declFileName) {
declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
}
return addedBundledEmitReference;
- function getDeclFileName(emitFileNames, _sourceFiles, isBundledEmit) {
+ function getDeclFileName(emitFileNames, sourceFileOrBundle) {
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
if (isBundledEmit && !addBundledFileReference) {
return;
}
@@ -47880,10 +51467,11 @@ var ts;
}
}
}
- function writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
- var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles);
+ function writeDeclarationFile(declarationFilePath, sourceFileOrBundle, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
+ var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles);
var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit;
if (!emitSkipped) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
var declarationOutput = emitDeclarationResult.referencesOutput
+ getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles);
@@ -47937,7 +51525,7 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
- function initialize(filePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
+ function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
}
@@ -47968,9 +51556,8 @@ var ts;
}
if (compilerOptions.mapRoot) {
sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
- if (!isBundledEmit) {
- ts.Debug.assert(sourceFiles.length === 1);
- sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir));
+ if (sourceFileOrBundle.kind === 264) {
+ sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir));
}
if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
@@ -48061,28 +51648,28 @@ var ts;
ts.performance.measure("Source Map", "beforeSourcemap", "afterSourcemap");
}
}
- function emitNodeWithSourceMap(emitContext, node, emitCallback) {
+ function emitNodeWithSourceMap(hint, node, emitCallback) {
if (disabled) {
- return emitCallback(emitContext, node);
+ return emitCallback(hint, node);
}
if (node) {
var emitNode = node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end;
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 16) === 0
&& pos >= 0) {
emitPos(ts.skipTrivia(currentSourceText, pos));
}
if (emitFlags & 64) {
disabled = true;
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
disabled = false;
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
@@ -48131,7 +51718,7 @@ var ts;
return;
}
encodeLastRecordedSourceMapSpan();
- return ts.stringify({
+ return JSON.stringify({
version: 3,
file: sourceMapData.sourceMapFile,
sourceRoot: sourceMapData.sourceMapSourceRoot,
@@ -48183,11 +51770,10 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function createCommentWriter(host, writer, sourceMap) {
- var compilerOptions = host.getCompilerOptions();
- var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var newLine = host.getNewLine();
- var emitPos = sourceMap.emitPos;
+ function createCommentWriter(printerOptions, emitPos) {
+ var extendedDiagnostics = printerOptions.extendedDiagnostics;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var writer;
var containerPos = -1;
var containerEnd = -1;
var declarationListContainerEnd = -1;
@@ -48196,37 +51782,34 @@ var ts;
var currentLineMap;
var detachedCommentsInfo;
var hasWrittenComment = false;
- var disabled = compilerOptions.removeComments;
+ var disabled = printerOptions.removeComments;
return {
reset: reset,
+ setWriter: setWriter,
setSourceFile: setSourceFile,
emitNodeWithComments: emitNodeWithComments,
emitBodyWithDetachedComments: emitBodyWithDetachedComments,
emitTrailingCommentsOfPosition: emitTrailingCommentsOfPosition,
+ emitLeadingCommentsOfPosition: emitLeadingCommentsOfPosition,
};
- function emitNodeWithComments(emitContext, node, emitCallback) {
+ function emitNodeWithComments(hint, node, emitCallback) {
if (disabled) {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
return;
}
if (node) {
- var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
- var emitFlags = ts.getEmitFlags(node);
+ hasWrittenComment = false;
+ var emitNode = node.emitNode;
+ var emitFlags = emitNode && emitNode.flags;
+ var _a = emitNode && emitNode.commentRange || node, pos = _a.pos, end = _a.end;
if ((pos < 0 && end < 0) || (pos === end)) {
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
}
else {
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 293;
+ var isEmittedNode = node.kind !== 294;
var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
if (!skipLeadingComments) {
@@ -48240,23 +51823,16 @@ var ts;
}
if (!skipTrailingComments) {
containerEnd = end;
- if (node.kind === 224) {
+ if (node.kind === 226) {
declarationListContainerEnd = end;
}
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "preEmitNodeWithComment");
}
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
if (extendedDiagnostics) {
- ts.performance.mark("beginEmitNodeWithComment");
+ ts.performance.mark("postEmitNodeWithComment");
}
containerPos = savedContainerPos;
containerEnd = savedContainerEnd;
@@ -48265,11 +51841,75 @@ var ts;
emitTrailingComments(end);
}
if (extendedDiagnostics) {
- ts.performance.measure("commentTime", "beginEmitNodeWithComment");
+ ts.performance.measure("commentTime", "postEmitNodeWithComment");
}
}
}
}
+ function emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback) {
+ var leadingComments = emitNode && emitNode.leadingComments;
+ if (ts.some(leadingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("preEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(leadingComments, emitLeadingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "preEmitNodeWithSynthesizedComments");
+ }
+ }
+ emitNodeWithNestedComments(hint, node, emitFlags, emitCallback);
+ var trailingComments = emitNode && emitNode.trailingComments;
+ if (ts.some(trailingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("postEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(trailingComments, emitTrailingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "postEmitNodeWithSynthesizedComments");
+ }
+ }
+ }
+ function emitLeadingSynthesizedComment(comment) {
+ if (comment.kind === 2) {
+ writer.writeLine();
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine || comment.kind === 2) {
+ writer.writeLine();
+ }
+ else {
+ writer.write(" ");
+ }
+ }
+ function emitTrailingSynthesizedComment(comment) {
+ if (!writer.isAtStartOfLine()) {
+ writer.write(" ");
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine) {
+ writer.writeLine();
+ }
+ }
+ function writeSynthesizedComment(comment) {
+ var text = formatSynthesizedComment(comment);
+ var lineMap = comment.kind === 3 ? ts.computeLineStarts(text) : undefined;
+ ts.writeCommentRange(text, lineMap, writer, 0, text.length, newLine);
+ }
+ function formatSynthesizedComment(comment) {
+ return comment.kind === 3
+ ? "/*" + comment.text + "*/"
+ : "//" + comment.text;
+ }
+ function emitNodeWithNestedComments(hint, node, emitFlags, emitCallback) {
+ if (emitFlags & 2048) {
+ disabled = true;
+ emitCallback(hint, node);
+ disabled = false;
+ }
+ else {
+ emitCallback(hint, node);
+ }
+ }
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
if (extendedDiagnostics) {
ts.performance.mark("preEmitBodyWithDetachedComments");
@@ -48297,6 +51937,9 @@ var ts;
}
if (!skipTrailingComments) {
emitLeadingComments(detachedRange.end, true);
+ if (hasWrittenComment && !writer.isAtStartOfLine()) {
+ writer.writeLine();
+ }
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "beginEmitBodyWithDetachedCommetns");
@@ -48321,9 +51964,11 @@ var ts;
ts.emitNewLineBeforeLeadingCommentOfPosition(currentLineMap, writer, rangePos, commentPos);
hasWrittenComment = true;
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48331,6 +51976,12 @@ var ts;
writer.write(" ");
}
}
+ function emitLeadingCommentsOfPosition(pos) {
+ if (disabled || pos === -1) {
+ return;
+ }
+ emitLeadingComments(pos, true);
+ }
function emitTrailingComments(pos) {
forEachTrailingCommentToEmit(pos, emitTrailingComment);
}
@@ -48338,9 +51989,11 @@ var ts;
if (!writer.isAtStartOfLine()) {
writer.write(" ");
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48358,9 +52011,11 @@ var ts;
}
}
function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48389,6 +52044,9 @@ var ts;
currentLineMap = undefined;
detachedCommentsInfo = undefined;
}
+ function setWriter(output) {
+ writer = output;
+ }
function setSourceFile(sourceFile) {
currentSourceFile = sourceFile;
currentText = currentSourceFile.text;
@@ -48420,9 +52078,11 @@ var ts;
}
}
function writeComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
}
function isTripleSlashComment(commentPos, commentEnd) {
if (currentText.charCodeAt(commentPos + 1) === 47 &&
@@ -48440,63 +52100,55 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var id = function (s) { return s; };
- var nullTransformers = [function (_) { return id; }];
- function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) {
- var delimiters = createDelimiterMap();
- var brackets = createBracketsMap();
+ var delimiters = createDelimiterMap();
+ var brackets = createBracketsMap();
+ function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles, transformers) {
var compilerOptions = host.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined;
var emitterDiagnostics = ts.createDiagnosticCollection();
var newLine = host.getNewLine();
- var transformers = emitOnlyDtsFiles ? nullTransformers : ts.getTransformers(compilerOptions);
var writer = ts.createTextWriter(newLine);
- var write = writer.write, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent;
var sourceMap = ts.createSourceMapWriter(host, writer);
- var emitNodeWithSourceMap = sourceMap.emitNodeWithSourceMap, emitTokenWithSourceMap = sourceMap.emitTokenWithSourceMap;
- var comments = ts.createCommentWriter(host, writer, sourceMap);
- var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition;
- var nodeIdToGeneratedName;
- var autoGeneratedIdToGeneratedName;
- var generatedNameSet;
- var tempFlags;
var currentSourceFile;
- var currentText;
- var currentFileIdentifiers;
var bundledHelpers;
var isOwnFileEmit;
var emitSkipped = false;
var sourceFiles = ts.getSourceFilesToEmit(host, targetSourceFile);
- ts.performance.mark("beforeTransform");
- var _a = ts.transformFiles(resolver, host, sourceFiles, transformers), transformed = _a.transformed, emitNodeWithSubstitution = _a.emitNodeWithSubstitution, emitNodeWithNotification = _a.emitNodeWithNotification;
- ts.performance.measure("transformTime", "beforeTransform");
+ var transform = ts.transformNodes(resolver, host, compilerOptions, sourceFiles, transformers, false);
+ var printer = createPrinter(compilerOptions, {
+ hasGlobalName: resolver.hasGlobalName,
+ onEmitNode: transform.emitNodeWithNotification,
+ substituteNode: transform.substituteNode,
+ onEmitSourceMapOfNode: sourceMap.emitNodeWithSourceMap,
+ onEmitSourceMapOfToken: sourceMap.emitTokenWithSourceMap,
+ onEmitSourceMapOfPosition: sourceMap.emitPos,
+ onEmitHelpers: emitHelpers,
+ onSetSourceFile: setSourceFile,
+ });
ts.performance.mark("beforePrint");
- ts.forEachTransformedEmitFile(host, transformed, emitFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, emitSourceFileOrBundle, transform.transformed, emitOnlyDtsFiles);
ts.performance.measure("printTime", "beforePrint");
- for (var _b = 0, sourceFiles_4 = sourceFiles; _b < sourceFiles_4.length; _b++) {
- var sourceFile = sourceFiles_4[_b];
- ts.disposeEmitNodes(sourceFile);
- }
+ transform.dispose();
return {
emitSkipped: emitSkipped,
diagnostics: emitterDiagnostics.getDiagnostics(),
emittedFiles: emittedFilesList,
sourceMaps: sourceMapDataList
};
- function emitFile(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, isBundledEmit) {
+ function emitSourceFileOrBundle(_a, sourceFileOrBundle) {
+ var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath;
if (!host.isEmitBlocked(jsFilePath) && !compilerOptions.noEmit) {
if (!emitOnlyDtsFiles) {
- printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
+ printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
}
}
else {
emitSkipped = true;
}
if (declarationFilePath) {
- emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFiles(sourceFiles), isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
+ emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFileOrBundle(sourceFileOrBundle), host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
}
if (!emitSkipped && emittedFilesList) {
if (!emitOnlyDtsFiles) {
@@ -48510,24 +52162,24 @@ var ts;
}
}
}
- function printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
- sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
- nodeIdToGeneratedName = [];
- autoGeneratedIdToGeneratedName = [];
- generatedNameSet = ts.createMap();
- bundledHelpers = isBundledEmit ? ts.createMap() : undefined;
- isOwnFileEmit = !isBundledEmit;
- if (isBundledEmit && moduleKind) {
- for (var _a = 0, sourceFiles_5 = sourceFiles; _a < sourceFiles_5.length; _a++) {
- var sourceFile = sourceFiles_5[_a];
- emitHelpers(sourceFile, true);
- }
+ function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) {
+ var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined;
+ var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined;
+ var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
+ sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
+ if (bundle) {
+ bundledHelpers = ts.createMap();
+ isOwnFileEmit = false;
+ printer.writeBundle(bundle, writer);
}
- ts.forEach(sourceFiles, printSourceFile);
- writeLine();
+ else {
+ isOwnFileEmit = true;
+ printer.writeFile(sourceFile, writer);
+ }
+ writer.writeLine();
var sourceMappingURL = sourceMap.getSourceMappingURL();
if (sourceMappingURL) {
- write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
+ writer.write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
}
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), false, sourceFiles);
@@ -48537,20 +52189,164 @@ var ts;
}
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), compilerOptions.emitBOM, sourceFiles);
sourceMap.reset();
- comments.reset();
writer.reset();
- tempFlags = 0;
currentSourceFile = undefined;
- currentText = undefined;
+ bundledHelpers = undefined;
isOwnFileEmit = false;
}
- function printSourceFile(node) {
+ function setSourceFile(node) {
currentSourceFile = node;
- currentText = node.text;
- currentFileIdentifiers = node.identifiers;
sourceMap.setSourceFile(node);
- comments.setSourceFile(node);
- pipelineEmitWithNotification(0, node);
+ }
+ function emitHelpers(node, writeLines) {
+ var helpersEmitted = false;
+ var bundle = node.kind === 265 ? node : undefined;
+ if (bundle && moduleKind === ts.ModuleKind.None) {
+ return;
+ }
+ var numNodes = bundle ? bundle.sourceFiles.length : 1;
+ for (var i = 0; i < numNodes; i++) {
+ var currentNode = bundle ? bundle.sourceFiles[i] : node;
+ var sourceFile = ts.isSourceFile(currentNode) ? currentNode : currentSourceFile;
+ var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
+ var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
+ var helpers = ts.getEmitHelpers(currentNode);
+ if (helpers) {
+ for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
+ var helper = _b[_a];
+ if (!helper.scoped) {
+ if (shouldSkip)
+ continue;
+ if (shouldBundle) {
+ if (bundledHelpers.get(helper.name)) {
+ continue;
+ }
+ bundledHelpers.set(helper.name, true);
+ }
+ }
+ else if (bundle) {
+ continue;
+ }
+ writeLines(helper.text);
+ helpersEmitted = true;
+ }
+ }
+ }
+ return helpersEmitted;
+ }
+ }
+ ts.emitFiles = emitFiles;
+ function createPrinter(printerOptions, handlers) {
+ if (printerOptions === void 0) { printerOptions = {}; }
+ if (handlers === void 0) { handlers = {}; }
+ var hasGlobalName = handlers.hasGlobalName, onEmitSourceMapOfNode = handlers.onEmitSourceMapOfNode, onEmitSourceMapOfToken = handlers.onEmitSourceMapOfToken, onEmitSourceMapOfPosition = handlers.onEmitSourceMapOfPosition, onEmitNode = handlers.onEmitNode, onEmitHelpers = handlers.onEmitHelpers, onSetSourceFile = handlers.onSetSourceFile, substituteNode = handlers.substituteNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
+ var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
+ var currentSourceFile;
+ var nodeIdToGeneratedName;
+ var autoGeneratedIdToGeneratedName;
+ var generatedNames;
+ var tempFlagsStack;
+ var tempFlags;
+ var writer;
+ var ownWriter;
+ reset();
+ return {
+ printNode: printNode,
+ printFile: printFile,
+ printBundle: printBundle,
+ writeNode: writeNode,
+ writeFile: writeFile,
+ writeBundle: writeBundle
+ };
+ function printNode(hint, node, sourceFile) {
+ switch (hint) {
+ case 0:
+ ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
+ break;
+ case 2:
+ ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
+ break;
+ case 1:
+ ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
+ break;
+ }
+ switch (node.kind) {
+ case 264: return printFile(node);
+ case 265: return printBundle(node);
+ }
+ writeNode(hint, node, sourceFile, beginPrint());
+ return endPrint();
+ }
+ function printBundle(bundle) {
+ writeBundle(bundle, beginPrint());
+ return endPrint();
+ }
+ function printFile(sourceFile) {
+ writeFile(sourceFile, beginPrint());
+ return endPrint();
+ }
+ function writeNode(hint, node, sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ print(hint, node, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function writeBundle(bundle, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(bundle);
+ emitPrologueDirectivesIfNeeded(bundle);
+ emitHelpersIndirect(bundle);
+ for (var _a = 0, _b = bundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ print(0, sourceFile, sourceFile);
+ }
+ reset();
+ writer = previousWriter;
+ }
+ function writeFile(sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(sourceFile);
+ emitPrologueDirectivesIfNeeded(sourceFile);
+ print(0, sourceFile, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function beginPrint() {
+ return ownWriter || (ownWriter = ts.createTextWriter(newLine));
+ }
+ function endPrint() {
+ var text = ownWriter.getText();
+ ownWriter.reset();
+ return text;
+ }
+ function print(hint, node, sourceFile) {
+ setSourceFile(sourceFile);
+ pipelineEmitWithNotification(hint, node);
+ }
+ function setSourceFile(sourceFile) {
+ currentSourceFile = sourceFile;
+ comments.setSourceFile(sourceFile);
+ if (onSetSourceFile) {
+ onSetSourceFile(sourceFile);
+ }
+ }
+ function setWriter(output) {
+ writer = output;
+ comments.setWriter(output);
+ }
+ function reset() {
+ nodeIdToGeneratedName = [];
+ autoGeneratedIdToGeneratedName = [];
+ generatedNames = ts.createMap();
+ tempFlagsStack = [];
+ tempFlags = 0;
+ comments.reset();
+ setWriter(undefined);
}
function emit(node) {
pipelineEmitWithNotification(3, node);
@@ -48561,51 +52357,53 @@ var ts;
function emitExpression(node) {
pipelineEmitWithNotification(1, node);
}
- function pipelineEmitWithNotification(emitContext, node) {
- emitNodeWithNotification(emitContext, node, pipelineEmitWithComments);
- }
- function pipelineEmitWithComments(emitContext, node) {
- if (emitContext === 0) {
- pipelineEmitWithSourceMap(emitContext, node);
- return;
+ function pipelineEmitWithNotification(hint, node) {
+ if (onEmitNode) {
+ onEmitNode(hint, node, pipelineEmitWithComments);
}
- emitNodeWithComments(emitContext, node, pipelineEmitWithSourceMap);
- }
- function pipelineEmitWithSourceMap(emitContext, node) {
- if (emitContext === 0
- || emitContext === 2) {
- pipelineEmitWithSubstitution(emitContext, node);
- return;
+ else {
+ pipelineEmitWithComments(hint, node);
}
- emitNodeWithSourceMap(emitContext, node, pipelineEmitWithSubstitution);
}
- function pipelineEmitWithSubstitution(emitContext, node) {
- emitNodeWithSubstitution(emitContext, node, pipelineEmitForContext);
- }
- function pipelineEmitForContext(emitContext, node) {
- switch (emitContext) {
- case 0: return pipelineEmitInSourceFileContext(node);
- case 2: return pipelineEmitInIdentifierNameContext(node);
- case 3: return pipelineEmitInUnspecifiedContext(node);
- case 1: return pipelineEmitInExpressionContext(node);
+ function pipelineEmitWithComments(hint, node) {
+ node = trySubstituteNode(hint, node);
+ if (emitNodeWithComments && hint !== 0) {
+ emitNodeWithComments(hint, node, pipelineEmitWithSourceMap);
+ }
+ else {
+ pipelineEmitWithSourceMap(hint, node);
}
}
- function pipelineEmitInSourceFileContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 261:
- return emitSourceFile(node);
+ function pipelineEmitWithSourceMap(hint, node) {
+ if (onEmitSourceMapOfNode && hint !== 0 && hint !== 2) {
+ onEmitSourceMapOfNode(hint, node, pipelineEmitWithHint);
+ }
+ else {
+ pipelineEmitWithHint(hint, node);
}
}
- function pipelineEmitInIdentifierNameContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 70:
- return emitIdentifier(node);
+ function pipelineEmitWithHint(hint, node) {
+ switch (hint) {
+ case 0: return pipelineEmitSourceFile(node);
+ case 2: return pipelineEmitIdentifierName(node);
+ case 1: return pipelineEmitExpression(node);
+ case 3: return pipelineEmitUnspecified(node);
}
}
- function pipelineEmitInUnspecifiedContext(node) {
+ function pipelineEmitSourceFile(node) {
+ ts.Debug.assertNode(node, ts.isSourceFile);
+ emitSourceFile(node);
+ }
+ function pipelineEmitIdentifierName(node) {
+ ts.Debug.assertNode(node, ts.isIdentifier);
+ emitIdentifier(node);
+ }
+ function pipelineEmitUnspecified(node) {
var kind = node.kind;
+ if (ts.isKeyword(kind)) {
+ writeTokenText(kind);
+ return;
+ }
switch (kind) {
case 13:
case 14:
@@ -48613,229 +52411,201 @@ var ts;
return emitLiteral(node);
case 70:
return emitIdentifier(node);
- case 75:
- case 78:
- case 83:
- case 104:
- case 111:
- case 112:
- case 113:
- case 114:
- case 116:
- case 117:
- case 118:
- case 119:
- case 120:
- case 121:
- case 122:
- case 123:
- case 124:
- case 125:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- writeTokenText(kind);
- return;
- case 141:
- return emitQualifiedName(node);
case 142:
- return emitComputedPropertyName(node);
+ return emitQualifiedName(node);
case 143:
- return emitTypeParameter(node);
+ return emitComputedPropertyName(node);
case 144:
- return emitParameter(node);
+ return emitTypeParameter(node);
case 145:
- return emitDecorator(node);
+ return emitParameter(node);
case 146:
- return emitPropertySignature(node);
+ return emitDecorator(node);
case 147:
- return emitPropertyDeclaration(node);
+ return emitPropertySignature(node);
case 148:
- return emitMethodSignature(node);
+ return emitPropertyDeclaration(node);
case 149:
- return emitMethodDeclaration(node);
+ return emitMethodSignature(node);
case 150:
- return emitConstructor(node);
+ return emitMethodDeclaration(node);
case 151:
+ return emitConstructor(node);
case 152:
- return emitAccessorDeclaration(node);
case 153:
- return emitCallSignature(node);
+ return emitAccessorDeclaration(node);
case 154:
- return emitConstructSignature(node);
+ return emitCallSignature(node);
case 155:
- return emitIndexSignature(node);
+ return emitConstructSignature(node);
case 156:
- return emitTypePredicate(node);
+ return emitIndexSignature(node);
case 157:
- return emitTypeReference(node);
+ return emitTypePredicate(node);
case 158:
- return emitFunctionType(node);
+ return emitTypeReference(node);
case 159:
- return emitConstructorType(node);
+ return emitFunctionType(node);
case 160:
- return emitTypeQuery(node);
+ return emitConstructorType(node);
case 161:
- return emitTypeLiteral(node);
+ return emitTypeQuery(node);
case 162:
- return emitArrayType(node);
+ return emitTypeLiteral(node);
case 163:
- return emitTupleType(node);
+ return emitArrayType(node);
case 164:
- return emitUnionType(node);
+ return emitTupleType(node);
case 165:
- return emitIntersectionType(node);
+ return emitUnionType(node);
case 166:
+ return emitIntersectionType(node);
+ case 167:
return emitParenthesizedType(node);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(node);
- case 167:
- return emitThisType();
case 168:
- return emitTypeOperator(node);
+ return emitThisType();
case 169:
- return emitIndexedAccessType(node);
+ return emitTypeOperator(node);
case 170:
- return emitMappedType(node);
+ return emitIndexedAccessType(node);
case 171:
- return emitLiteralType(node);
+ return emitMappedType(node);
case 172:
- return emitObjectBindingPattern(node);
+ return emitLiteralType(node);
case 173:
- return emitArrayBindingPattern(node);
+ return emitObjectBindingPattern(node);
case 174:
+ return emitArrayBindingPattern(node);
+ case 175:
return emitBindingElement(node);
- case 202:
+ case 204:
return emitTemplateSpan(node);
- case 203:
+ case 205:
return emitSemicolonClassElement();
- case 204:
+ case 206:
return emitBlock(node);
- case 205:
+ case 207:
return emitVariableStatement(node);
- case 206:
+ case 208:
return emitEmptyStatement();
- case 207:
+ case 209:
return emitExpressionStatement(node);
- case 208:
+ case 210:
return emitIfStatement(node);
- case 209:
+ case 211:
return emitDoStatement(node);
- case 210:
+ case 212:
return emitWhileStatement(node);
- case 211:
+ case 213:
return emitForStatement(node);
- case 212:
+ case 214:
return emitForInStatement(node);
- case 213:
+ case 215:
return emitForOfStatement(node);
- case 214:
+ case 216:
return emitContinueStatement(node);
- case 215:
+ case 217:
return emitBreakStatement(node);
- case 216:
+ case 218:
return emitReturnStatement(node);
- case 217:
+ case 219:
return emitWithStatement(node);
- case 218:
+ case 220:
return emitSwitchStatement(node);
- case 219:
+ case 221:
return emitLabeledStatement(node);
- case 220:
+ case 222:
return emitThrowStatement(node);
- case 221:
+ case 223:
return emitTryStatement(node);
- case 222:
+ case 224:
return emitDebuggerStatement(node);
- case 223:
+ case 225:
return emitVariableDeclaration(node);
- case 224:
+ case 226:
return emitVariableDeclarationList(node);
- case 225:
+ case 227:
return emitFunctionDeclaration(node);
- case 226:
+ case 228:
return emitClassDeclaration(node);
- case 227:
+ case 229:
return emitInterfaceDeclaration(node);
- case 228:
+ case 230:
return emitTypeAliasDeclaration(node);
- case 229:
+ case 231:
return emitEnumDeclaration(node);
- case 230:
+ case 232:
return emitModuleDeclaration(node);
- case 231:
+ case 233:
return emitModuleBlock(node);
- case 232:
- return emitCaseBlock(node);
case 234:
+ return emitCaseBlock(node);
+ case 236:
return emitImportEqualsDeclaration(node);
- case 235:
+ case 237:
return emitImportDeclaration(node);
- case 236:
+ case 238:
return emitImportClause(node);
- case 237:
+ case 239:
return emitNamespaceImport(node);
- case 238:
+ case 240:
return emitNamedImports(node);
- case 239:
+ case 241:
return emitImportSpecifier(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 241:
+ case 243:
return emitExportDeclaration(node);
- case 242:
+ case 244:
return emitNamedExports(node);
- case 243:
+ case 245:
return emitExportSpecifier(node);
- case 244:
+ case 246:
return;
- case 245:
+ case 247:
return emitExternalModuleReference(node);
case 10:
return emitJsxText(node);
- case 248:
+ case 250:
return emitJsxOpeningElement(node);
- case 249:
+ case 251:
return emitJsxClosingElement(node);
- case 250:
+ case 252:
return emitJsxAttribute(node);
- case 251:
+ case 253:
+ return emitJsxAttributes(node);
+ case 254:
return emitJsxSpreadAttribute(node);
- case 252:
+ case 255:
return emitJsxExpression(node);
- case 253:
+ case 256:
return emitCaseClause(node);
- case 254:
+ case 257:
return emitDefaultClause(node);
- case 255:
+ case 258:
return emitHeritageClause(node);
- case 256:
+ case 259:
return emitCatchClause(node);
- case 257:
+ case 260:
return emitPropertyAssignment(node);
- case 258:
+ case 261:
return emitShorthandPropertyAssignment(node);
- case 259:
+ case 262:
return emitSpreadAssignment(node);
- case 260:
+ case 263:
return emitEnumMember(node);
}
if (ts.isExpression(node)) {
- return pipelineEmitWithSubstitution(1, node);
+ return pipelineEmitExpression(trySubstituteNode(1, node));
+ }
+ if (ts.isToken(node)) {
+ writeTokenText(kind);
+ return;
}
}
- function pipelineEmitInExpressionContext(node) {
+ function pipelineEmitExpression(node) {
var kind = node.kind;
switch (kind) {
case 8:
@@ -48853,77 +52623,82 @@ var ts;
case 98:
writeTokenText(kind);
return;
- case 175:
- return emitArrayLiteralExpression(node);
case 176:
- return emitObjectLiteralExpression(node);
+ return emitArrayLiteralExpression(node);
case 177:
- return emitPropertyAccessExpression(node);
+ return emitObjectLiteralExpression(node);
case 178:
- return emitElementAccessExpression(node);
+ return emitPropertyAccessExpression(node);
case 179:
- return emitCallExpression(node);
+ return emitElementAccessExpression(node);
case 180:
- return emitNewExpression(node);
+ return emitCallExpression(node);
case 181:
- return emitTaggedTemplateExpression(node);
+ return emitNewExpression(node);
case 182:
- return emitTypeAssertionExpression(node);
+ return emitTaggedTemplateExpression(node);
case 183:
- return emitParenthesizedExpression(node);
+ return emitTypeAssertionExpression(node);
case 184:
- return emitFunctionExpression(node);
+ return emitParenthesizedExpression(node);
case 185:
- return emitArrowFunction(node);
+ return emitFunctionExpression(node);
case 186:
- return emitDeleteExpression(node);
+ return emitArrowFunction(node);
case 187:
- return emitTypeOfExpression(node);
+ return emitDeleteExpression(node);
case 188:
- return emitVoidExpression(node);
+ return emitTypeOfExpression(node);
case 189:
- return emitAwaitExpression(node);
+ return emitVoidExpression(node);
case 190:
- return emitPrefixUnaryExpression(node);
+ return emitAwaitExpression(node);
case 191:
- return emitPostfixUnaryExpression(node);
+ return emitPrefixUnaryExpression(node);
case 192:
- return emitBinaryExpression(node);
+ return emitPostfixUnaryExpression(node);
case 193:
- return emitConditionalExpression(node);
+ return emitBinaryExpression(node);
case 194:
- return emitTemplateExpression(node);
+ return emitConditionalExpression(node);
case 195:
- return emitYieldExpression(node);
+ return emitTemplateExpression(node);
case 196:
- return emitSpreadExpression(node);
+ return emitYieldExpression(node);
case 197:
- return emitClassExpression(node);
+ return emitSpreadExpression(node);
case 198:
+ return emitClassExpression(node);
+ case 199:
return;
- case 200:
- return emitAsExpression(node);
case 201:
+ return emitAsExpression(node);
+ case 202:
return emitNonNullExpression(node);
- case 246:
+ case 203:
+ return emitMetaProperty(node);
+ case 248:
return emitJsxElement(node);
- case 247:
+ case 249:
return emitJsxSelfClosingElement(node);
- case 294:
+ case 295:
return emitPartiallyEmittedExpression(node);
- case 297:
- return writeLines(node.text);
+ }
+ }
+ function trySubstituteNode(hint, node) {
+ return node && substituteNode && substituteNode(hint, node) || node;
+ }
+ function emitHelpersIndirect(node) {
+ if (onEmitHelpers) {
+ onEmitHelpers(node, writeLines);
}
}
function emitNumericLiteral(node) {
emitLiteral(node);
- if (node.trailingComment) {
- write(" /*" + node.trailingComment + "*/");
- }
}
function emitLiteral(node) {
var text = getLiteralTextOfNode(node);
- if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap)
+ if ((printerOptions.sourceMap || printerOptions.inlineSourceMap)
&& (node.kind === 9 || ts.isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
@@ -48962,8 +52737,8 @@ var ts;
writeIfPresent(node.dotDotDotToken, "...");
emit(node.name);
writeIfPresent(node.questionToken, "?");
- emitExpressionWithPrefix(" = ", node.initializer);
emitWithPrefix(": ", node.type);
+ emitExpressionWithPrefix(" = ", node.initializer);
}
function emitDecorator(decorator) {
write("@");
@@ -49010,7 +52785,7 @@ var ts;
function emitAccessorDeclaration(node) {
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
- write(node.kind === 151 ? "get " : "set ");
+ write(node.kind === 152 ? "get " : "set ");
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
@@ -49110,17 +52885,13 @@ var ts;
write("{");
writeLine();
increaseIndent();
- if (node.readonlyToken) {
- write("readonly ");
- }
+ writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
write(" in ");
emit(node.typeParameter.constraint);
write("]");
- if (node.questionToken) {
- write("?");
- }
+ writeIfPresent(node.questionToken, "?");
write(": ");
emit(node.type);
write(";");
@@ -49180,7 +52951,7 @@ var ts;
increaseIndent();
}
var preferNewLine = node.multiLine ? 32768 : 0;
- var allowTrailingComma = languageVersion >= 1 ? 32 : 0;
+ var allowTrailingComma = currentSourceFile.languageVersion >= 1 ? 32 : 0;
emitList(node, properties, 978 | allowTrailingComma | preferNewLine);
if (indentedFlag) {
decreaseIndent();
@@ -49192,7 +52963,7 @@ var ts;
var indentAfterDot = false;
if (!(ts.getEmitFlags(node) & 65536)) {
var dotRangeStart = node.expression.end;
- var dotRangeEnd = ts.skipTrivia(currentText, node.expression.end) + 1;
+ var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd };
indentBeforeDot = needsIndentation(node, node.expression, dotToken);
indentAfterDot = needsIndentation(node, dotToken, node.name);
@@ -49206,15 +52977,17 @@ var ts;
decreaseIndentIf(indentBeforeDot, indentAfterDot);
}
function needsDotDotForPropertyAccess(expression) {
- if (expression.kind === 8) {
+ expression = ts.skipPartiallyEmittedExpressions(expression);
+ if (ts.isNumericLiteral(expression)) {
var text = getLiteralTextOfNode(expression);
- return text.indexOf(ts.tokenToString(22)) < 0;
+ return !expression.numericLiteralFlags
+ && text.indexOf(ts.tokenToString(22)) < 0;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
return isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
- && compilerOptions.removeComments;
+ && printerOptions.removeComments;
}
}
function emitElementAccessExpression(node) {
@@ -49240,11 +53013,9 @@ var ts;
emitExpression(node.template);
}
function emitTypeAssertionExpression(node) {
- if (node.type) {
- write("<");
- emit(node.type);
- write(">");
- }
+ write("<");
+ emit(node.type);
+ write(">");
emitExpression(node.expression);
}
function emitParenthesizedExpression(node) {
@@ -49291,7 +53062,7 @@ var ts;
}
function shouldEmitWhitespaceBeforeOperand(node) {
var operand = node.operand;
- return operand.kind === 190
+ return operand.kind === 191
&& ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42))
|| (node.operator === 37 && (operand.operator === 37 || operand.operator === 43)));
}
@@ -49357,6 +53128,11 @@ var ts;
emitExpression(node.expression);
write("!");
}
+ function emitMetaProperty(node) {
+ writeToken(node.keywordToken, node.pos);
+ write(".");
+ emit(node.name);
+ }
function emitTemplateSpan(node) {
emitExpression(node.expression);
emit(node.literal);
@@ -49370,6 +53146,9 @@ var ts;
else {
writeToken(16, node.pos, node);
emitBlockStatements(node);
+ increaseIndent();
+ emitLeadingCommentsOfPosition(node.statements.end);
+ decreaseIndent();
writeToken(17, node.statements.end, node);
}
}
@@ -49399,27 +53178,27 @@ var ts;
writeToken(18, openParenPos, node);
emitExpression(node.expression);
writeToken(19, node.expression.end, node);
- emitEmbeddedStatement(node.thenStatement);
+ emitEmbeddedStatement(node, node.thenStatement);
if (node.elseStatement) {
- writeLine();
+ writeLineOrSpace(node);
writeToken(81, node.thenStatement.end, node);
- if (node.elseStatement.kind === 208) {
+ if (node.elseStatement.kind === 210) {
write(" ");
emit(node.elseStatement);
}
else {
- emitEmbeddedStatement(node.elseStatement);
+ emitEmbeddedStatement(node, node.elseStatement);
}
}
}
function emitDoStatement(node) {
write("do");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
if (ts.isBlock(node.statement)) {
write(" ");
}
else {
- writeLine();
+ writeLineOrSpace(node);
}
write("while (");
emitExpression(node.expression);
@@ -49429,7 +53208,7 @@ var ts;
write("while (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -49441,7 +53220,7 @@ var ts;
write(";");
emitExpressionWithPrefix(" ", node.incrementor);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForInStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -49451,21 +53230,22 @@ var ts;
write(" in ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForOfStatement(node) {
var openParenPos = writeToken(87, node.pos);
write(" ");
+ emitWithSuffix(node.awaitModifier, " ");
writeToken(18, openParenPos);
emitForBinding(node.initializer);
write(" of ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForBinding(node) {
if (node !== undefined) {
- if (node.kind === 224) {
+ if (node.kind === 226) {
emit(node);
}
else {
@@ -49492,7 +53272,7 @@ var ts;
write("with (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitSwitchStatement(node) {
var openParenPos = writeToken(97, node.pos);
@@ -49516,9 +53296,12 @@ var ts;
function emitTryStatement(node) {
write("try ");
emit(node.tryBlock);
- emit(node.catchClause);
+ if (node.catchClause) {
+ writeLineOrSpace(node);
+ emit(node.catchClause);
+ }
if (node.finallyBlock) {
- writeLine();
+ writeLineOrSpace(node);
write("finally ");
emit(node.finallyBlock);
}
@@ -49546,6 +53329,9 @@ var ts;
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
+ function emitBlockCallback(_hint, body) {
+ emitBlockFunctionBody(body);
+ }
function emitSignatureAndBody(node, emitSignatureHead) {
var body = node.body;
if (body) {
@@ -49556,14 +53342,23 @@ var ts;
}
if (ts.getEmitFlags(node) & 262144) {
emitSignatureHead(node);
- emitBlockFunctionBody(body);
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
emitSignatureHead(node);
- emitBlockFunctionBody(body);
- tempFlags = savedTempFlags;
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
+ popNameGenerationScope();
}
if (indentedFlag) {
decreaseIndent();
@@ -49612,9 +53407,15 @@ var ts;
function emitBlockFunctionBody(body) {
write(" {");
increaseIndent();
- emitBodyWithDetachedComments(body, body.statements, shouldEmitBlockFunctionBodyOnSingleLine(body)
+ var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
? emitBlockFunctionBodyOnSingleLine
- : emitBlockFunctionBodyWorker);
+ : emitBlockFunctionBodyWorker;
+ if (emitBodyWithDetachedComments) {
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
decreaseIndent();
writeToken(17, body.statements.end, body);
}
@@ -49623,8 +53424,9 @@ var ts;
}
function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine) {
var statementOffset = emitPrologueDirectives(body.statements, true);
- var helpersEmitted = emitHelpers(body);
- if (statementOffset === 0 && !helpersEmitted && emitBlockFunctionBodyOnSingleLine) {
+ var pos = writer.getTextPos();
+ emitHelpersIndirect(body);
+ if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine) {
decreaseIndent();
emitList(body, body.statements, 384);
increaseIndent();
@@ -49647,15 +53449,14 @@ var ts;
}
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, 256);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 65);
write("}");
+ popNameGenerationScope();
if (indentedFlag) {
decreaseIndent();
}
- tempFlags = savedTempFlags;
}
function emitInterfaceDeclaration(node) {
emitDecorators(node, node.decorators);
@@ -49682,19 +53483,18 @@ var ts;
emitModifiers(node, node.modifiers);
write("enum ");
emit(node.name);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 81);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
function emitModuleDeclaration(node) {
emitModifiers(node, node.modifiers);
write(node.flags & 16 ? "namespace " : "module ");
emit(node.name);
var body = node.body;
- while (body.kind === 230) {
+ while (body.kind === 232) {
write(".");
emit(body.name);
body = body.body;
@@ -49707,13 +53507,11 @@ var ts;
write("{ }");
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write("{");
- increaseIndent();
emitBlockStatements(node);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
}
function emitCaseBlock(node) {
@@ -49815,14 +53613,18 @@ var ts;
write("<");
emitJsxTagName(node.tagName);
write(" ");
- emitList(node, node.attributes, 131328);
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write("/>");
}
function emitJsxOpeningElement(node) {
write("<");
emitJsxTagName(node.tagName);
- writeIfAny(node.attributes, " ");
- emitList(node, node.attributes, 131328);
+ writeIfAny(node.attributes.properties, " ");
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write(">");
}
function emitJsxText(node) {
@@ -49833,6 +53635,9 @@ var ts;
emitJsxTagName(node.tagName);
write(">");
}
+ function emitJsxAttributes(node) {
+ emitList(node, node.properties, 131328);
+ }
function emitJsxAttribute(node) {
emit(node.name);
emitWithPrefix("=", node.initializer);
@@ -49845,6 +53650,9 @@ var ts;
function emitJsxExpression(node) {
if (node.expression) {
write("{");
+ if (node.dotDotDotToken) {
+ write("...");
+ }
emitExpression(node.expression);
write("}");
}
@@ -49887,7 +53695,6 @@ var ts;
emitList(node, node.types, 272);
}
function emitCatchClause(node) {
- writeLine();
var openParenPos = writeToken(73, node.pos);
write(" ");
writeToken(18, openParenPos);
@@ -49900,7 +53707,7 @@ var ts;
emit(node.name);
write(": ");
var initializer = node.initializer;
- if ((ts.getEmitFlags(initializer) & 512) === 0) {
+ if (emitTrailingCommentsOfPosition && (ts.getEmitFlags(initializer) & 512) === 0) {
var commentRange = ts.getCommentRange(initializer);
emitTrailingCommentsOfPosition(commentRange.pos);
}
@@ -49925,28 +53732,43 @@ var ts;
}
function emitSourceFile(node) {
writeLine();
- emitShebang();
- emitBodyWithDetachedComments(node, node.statements, emitSourceFileWorker);
+ var statements = node.statements;
+ if (emitBodyWithDetachedComments) {
+ var shouldEmitDetachedComment = statements.length === 0 ||
+ !ts.isPrologueDirective(statements[0]) ||
+ ts.nodeIsSynthesized(statements[0]);
+ if (shouldEmitDetachedComment) {
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
+ return;
+ }
+ }
+ emitSourceFileWorker(node);
}
function emitSourceFileWorker(node) {
var statements = node.statements;
- var statementOffset = emitPrologueDirectives(statements);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
- emitHelpers(node);
- emitList(node, statements, 1, statementOffset);
- tempFlags = savedTempFlags;
+ pushNameGenerationScope();
+ emitHelpersIndirect(node);
+ var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
+ emitList(node, statements, 1, index === -1 ? statements.length : index);
+ popNameGenerationScope();
}
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
- function emitPrologueDirectives(statements, startWithNewLine) {
+ function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
- if (ts.isPrologueDirective(statements[i])) {
- if (startWithNewLine || i > 0) {
- writeLine();
+ var statement = statements[i];
+ if (ts.isPrologueDirective(statement)) {
+ var shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;
+ if (shouldEmitPrologueDirective) {
+ if (startWithNewLine || i > 0) {
+ writeLine();
+ }
+ emit(statement);
+ if (seenPrologueDirectives) {
+ seenPrologueDirectives.set(statement.expression.text, statement.expression.text);
+ }
}
- emit(statements[i]);
}
else {
return i;
@@ -49954,71 +53776,37 @@ var ts;
}
return statements.length;
}
- function emitHelpers(node, isBundle) {
- var sourceFile = ts.isSourceFile(node) ? node : currentSourceFile;
- var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
- var shouldBundle = ts.isSourceFile(node) && !isOwnFileEmit;
- var helpersEmitted = false;
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
- var helper = _b[_a];
- if (!helper.scoped) {
- if (shouldSkip)
- continue;
- if (shouldBundle) {
- if (bundledHelpers[helper.name]) {
- continue;
- }
- bundledHelpers[helper.name] = true;
- }
- }
- else if (isBundle) {
- continue;
- }
- writeLines(helper.text);
- helpersEmitted = true;
- }
+ function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ setSourceFile(sourceFileOrBundle);
+ emitPrologueDirectives(sourceFileOrBundle.statements);
}
- if (helpersEmitted) {
- writeLine();
+ else {
+ var seenPrologueDirectives = ts.createMap();
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ setSourceFile(sourceFile);
+ emitPrologueDirectives(sourceFile.statements, true, seenPrologueDirectives);
+ }
}
- return helpersEmitted;
}
- function writeLines(text) {
- var lines = text.split(/\r\n?|\n/g);
- var indentation = guessIndentation(lines);
- for (var i = 0; i < lines.length; i++) {
- var line = indentation ? lines[i].slice(indentation) : lines[i];
- if (line.length) {
- if (i > 0) {
- writeLine();
- }
- write(line);
+ function emitShebangIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ var shebang = ts.getShebang(sourceFileOrBundle.text);
+ if (shebang) {
+ write(shebang);
+ writeLine();
+ return true;
}
}
- }
- function guessIndentation(lines) {
- var indentation;
- for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
- var line = lines_1[_a];
- for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
- if (!ts.isWhiteSpace(line.charCodeAt(i))) {
- if (indentation === undefined || i < indentation) {
- indentation = i;
- break;
- }
+ else {
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ if (emitShebangIfNeeded(sourceFile)) {
+ break;
}
}
}
- return indentation;
- }
- function emitShebang() {
- var shebang = ts.getShebang(currentText);
- if (shebang) {
- write(shebang);
- writeLine();
- }
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
@@ -50044,8 +53832,8 @@ var ts;
write(suffix);
}
}
- function emitEmbeddedStatement(node) {
- if (ts.isBlock(node)) {
+ function emitEmbeddedStatement(parent, node) {
+ if (ts.isBlock(node) || ts.getEmitFlags(parent) & 1) {
write(" ");
emit(node);
}
@@ -50102,6 +53890,9 @@ var ts;
if (format & 7680) {
write(getOpeningBracket(format));
}
+ if (onBeforeEmitNodeArray) {
+ onBeforeEmitNodeArray(children);
+ }
if (isEmpty) {
if (format & 1) {
writeLine();
@@ -50129,6 +53920,9 @@ var ts;
for (var i = 0; i < count; i++) {
var child = children[start + i];
if (previousSibling) {
+ if (delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
write(delimiter);
if (shouldWriteSeparatingLineTerminator(previousSibling, child, format)) {
if ((format & (3 | 64)) === 0) {
@@ -50143,8 +53937,10 @@ var ts;
}
}
if (shouldEmitInterveningComments) {
- var commentRange = ts.getCommentRange(child);
- emitTrailingCommentsOfPosition(commentRange.pos);
+ if (emitTrailingCommentsOfPosition) {
+ var commentRange = ts.getCommentRange(child);
+ emitTrailingCommentsOfPosition(commentRange.pos);
+ }
}
else {
shouldEmitInterveningComments = mayEmitInterveningComments;
@@ -50160,6 +53956,9 @@ var ts;
if (format & 16 && hasTrailingComma) {
write(",");
}
+ if (previousSibling && delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
if (format & 64) {
decreaseIndent();
}
@@ -50170,28 +53969,80 @@ var ts;
write(" ");
}
}
+ if (onAfterEmitNodeArray) {
+ onAfterEmitNodeArray(children);
+ }
if (format & 7680) {
write(getClosingBracket(format));
}
}
+ function write(s) {
+ writer.write(s);
+ }
+ function writeLine() {
+ writer.writeLine();
+ }
+ function increaseIndent() {
+ writer.increaseIndent();
+ }
+ function decreaseIndent() {
+ writer.decreaseIndent();
+ }
function writeIfAny(nodes, text) {
- if (nodes && nodes.length > 0) {
+ if (ts.some(nodes)) {
write(text);
}
}
function writeIfPresent(node, text) {
- if (node !== undefined) {
+ if (node) {
write(text);
}
}
function writeToken(token, pos, contextNode) {
- return emitTokenWithSourceMap(contextNode, token, pos, writeTokenText);
+ return onEmitSourceMapOfToken
+ ? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
+ : writeTokenText(token, pos);
}
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
return pos < 0 ? pos : pos + tokenString.length;
}
+ function writeLineOrSpace(node) {
+ if (ts.getEmitFlags(node) & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ }
+ }
+ function writeLines(text) {
+ var lines = text.split(/\r\n?|\n/g);
+ var indentation = guessIndentation(lines);
+ for (var i = 0; i < lines.length; i++) {
+ var line = indentation ? lines[i].slice(indentation) : lines[i];
+ if (line.length) {
+ writeLine();
+ write(line);
+ writeLine();
+ }
+ }
+ }
+ function guessIndentation(lines) {
+ var indentation;
+ for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
+ var line = lines_1[_a];
+ for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
+ if (!ts.isWhiteSpace(line.charCodeAt(i))) {
+ if (indentation === undefined || i < indentation) {
+ indentation = i;
+ break;
+ }
+ }
+ }
+ }
+ return indentation;
+ }
function increaseIndentIf(value, valueToWriteWhenNotIndenting) {
if (value) {
increaseIndent();
@@ -50296,15 +54147,23 @@ var ts;
&& !ts.nodeIsSynthesized(node2)
&& !ts.rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile);
}
+ function isSingleLineEmptyBlock(block) {
+ return !block.multiLine
+ && isEmptyBlock(block);
+ }
+ function isEmptyBlock(block) {
+ return block.statements.length === 0
+ && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ }
function skipSynthesizedParentheses(node) {
- while (node.kind === 183 && ts.nodeIsSynthesized(node)) {
+ while (node.kind === 184 && ts.nodeIsSynthesized(node)) {
node = node.expression;
}
return node;
}
function getTextOfNode(node, includeTrivia) {
if (ts.isGeneratedIdentifier(node)) {
- return getGeneratedIdentifier(node);
+ return generateName(node);
}
else if (ts.isIdentifier(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
return ts.unescapeIdentifier(node.text);
@@ -50327,25 +54186,39 @@ var ts;
return getLiteralTextOfNode(textSourceNode);
}
}
- return ts.getLiteralText(node, currentSourceFile, languageVersion);
+ return ts.getLiteralText(node, currentSourceFile);
}
- function isSingleLineEmptyBlock(block) {
- return !block.multiLine
- && isEmptyBlock(block);
+ function pushNameGenerationScope() {
+ tempFlagsStack.push(tempFlags);
+ tempFlags = 0;
}
- function isEmptyBlock(block) {
- return block.statements.length === 0
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ function popNameGenerationScope() {
+ tempFlags = tempFlagsStack.pop();
+ }
+ function generateName(name) {
+ if (name.autoGenerateKind === 4) {
+ var node = getNodeForGeneratedName(name);
+ return generateNameCached(node);
+ }
+ else {
+ var autoGenerateId = name.autoGenerateId;
+ return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(makeName(name)));
+ }
+ }
+ function generateNameCached(node) {
+ var nodeId = ts.getNodeId(node);
+ return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
}
function isUniqueName(name) {
- return !resolver.hasGlobalName(name) &&
- !ts.hasProperty(currentFileIdentifiers, name) &&
- !ts.hasProperty(generatedNameSet, name);
+ return !(hasGlobalName && hasGlobalName(name))
+ && !currentSourceFile.identifiers.has(name)
+ && !generatedNames.has(name);
}
function isUniqueLocalName(name, container) {
for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) {
- if (node.locals && ts.hasProperty(node.locals, name)) {
- if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
+ if (node.locals) {
+ var local = node.locals.get(name);
+ if (local && local.flags & (107455 | 1048576 | 8388608)) {
return false;
}
}
@@ -50354,21 +54227,21 @@ var ts;
}
function makeTempVariableName(flags) {
if (flags && !(tempFlags & flags)) {
- var name_41 = flags === 268435456 ? "_i" : "_n";
- if (isUniqueName(name_41)) {
+ var name = flags === 268435456 ? "_i" : "_n";
+ if (isUniqueName(name)) {
tempFlags |= flags;
- return name_41;
+ return name;
}
}
while (true) {
var count = tempFlags & 268435455;
tempFlags++;
if (count !== 8 && count !== 13) {
- var name_42 = count < 26
+ var name = count < 26
? "_" + String.fromCharCode(97 + count)
: "_" + (count - 26);
- if (isUniqueName(name_42)) {
- return name_42;
+ if (isUniqueName(name)) {
+ return name;
}
}
}
@@ -50381,7 +54254,8 @@ var ts;
while (true) {
var generatedName = baseName + i;
if (isUniqueName(generatedName)) {
- return generatedNameSet[generatedName] = generatedName;
+ generatedNames.set(generatedName, generatedName);
+ return generatedName;
}
i++;
}
@@ -50402,34 +54276,44 @@ var ts;
function generateNameForClassExpression() {
return makeUniqueName("class");
}
+ function generateNameForMethodOrAccessor(node) {
+ if (ts.isIdentifier(node.name)) {
+ return generateNameCached(node.name);
+ }
+ return makeTempVariableName(0);
+ }
function generateNameForNode(node) {
switch (node.kind) {
case 70:
return makeUniqueName(getTextOfNode(node));
- case 230:
- case 229:
+ case 232:
+ case 231:
return generateNameForModuleOrEnum(node);
- case 235:
- case 241:
+ case 237:
+ case 243:
return generateNameForImportOrExportDeclaration(node);
- case 225:
- case 226:
- case 240:
+ case 227:
+ case 228:
+ case 242:
return generateNameForExportDefault();
- case 197:
+ case 198:
return generateNameForClassExpression();
+ case 150:
+ case 152:
+ case 153:
+ return generateNameForMethodOrAccessor(node);
default:
return makeTempVariableName(0);
}
}
- function generateName(name) {
+ function makeName(name) {
switch (name.autoGenerateKind) {
case 1:
return makeTempVariableName(0);
case 2:
return makeTempVariableName(268435456);
case 3:
- return makeUniqueName(name.text);
+ return makeUniqueName(ts.unescapeIdentifier(name.text));
}
ts.Debug.fail("Unsupported GeneratedIdentifierKind.");
}
@@ -50448,48 +54332,106 @@ var ts;
}
return node;
}
- function getGeneratedIdentifier(name) {
- if (name.autoGenerateKind === 4) {
- var node = getNodeForGeneratedName(name);
- var nodeId = ts.getNodeId(node);
- return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
- }
- else {
- var autoGenerateId = name.autoGenerateId;
- return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(generateName(name)));
- }
- }
- function createDelimiterMap() {
- var delimiters = [];
- delimiters[0] = "";
- delimiters[16] = ",";
- delimiters[4] = " |";
- delimiters[8] = " &";
- return delimiters;
- }
- function getDelimiter(format) {
- return delimiters[format & 28];
- }
- function createBracketsMap() {
- var brackets = [];
- brackets[512] = ["{", "}"];
- brackets[1024] = ["(", ")"];
- brackets[2048] = ["<", ">"];
- brackets[4096] = ["[", "]"];
- return brackets;
- }
- function getOpeningBracket(format) {
- return brackets[format & 7680][0];
- }
- function getClosingBracket(format) {
- return brackets[format & 7680][1];
- }
}
- ts.emitFiles = emitFiles;
+ ts.createPrinter = createPrinter;
+ function createDelimiterMap() {
+ var delimiters = [];
+ delimiters[0] = "";
+ delimiters[16] = ",";
+ delimiters[4] = " |";
+ delimiters[8] = " &";
+ return delimiters;
+ }
+ function getDelimiter(format) {
+ return delimiters[format & 28];
+ }
+ function createBracketsMap() {
+ var brackets = [];
+ brackets[512] = ["{", "}"];
+ brackets[1024] = ["(", ")"];
+ brackets[2048] = ["<", ">"];
+ brackets[4096] = ["[", "]"];
+ return brackets;
+ }
+ function getOpeningBracket(format) {
+ return brackets[format & 7680][0];
+ }
+ function getClosingBracket(format) {
+ return brackets[format & 7680][1];
+ }
+ var TempFlags;
+ (function (TempFlags) {
+ TempFlags[TempFlags["Auto"] = 0] = "Auto";
+ TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
+ TempFlags[TempFlags["_i"] = 268435456] = "_i";
+ })(TempFlags || (TempFlags = {}));
+ var ListFormat;
+ (function (ListFormat) {
+ ListFormat[ListFormat["None"] = 0] = "None";
+ ListFormat[ListFormat["SingleLine"] = 0] = "SingleLine";
+ ListFormat[ListFormat["MultiLine"] = 1] = "MultiLine";
+ ListFormat[ListFormat["PreserveLines"] = 2] = "PreserveLines";
+ ListFormat[ListFormat["LinesMask"] = 3] = "LinesMask";
+ ListFormat[ListFormat["NotDelimited"] = 0] = "NotDelimited";
+ ListFormat[ListFormat["BarDelimited"] = 4] = "BarDelimited";
+ ListFormat[ListFormat["AmpersandDelimited"] = 8] = "AmpersandDelimited";
+ ListFormat[ListFormat["CommaDelimited"] = 16] = "CommaDelimited";
+ ListFormat[ListFormat["DelimitersMask"] = 28] = "DelimitersMask";
+ ListFormat[ListFormat["AllowTrailingComma"] = 32] = "AllowTrailingComma";
+ ListFormat[ListFormat["Indented"] = 64] = "Indented";
+ ListFormat[ListFormat["SpaceBetweenBraces"] = 128] = "SpaceBetweenBraces";
+ ListFormat[ListFormat["SpaceBetweenSiblings"] = 256] = "SpaceBetweenSiblings";
+ ListFormat[ListFormat["Braces"] = 512] = "Braces";
+ ListFormat[ListFormat["Parenthesis"] = 1024] = "Parenthesis";
+ ListFormat[ListFormat["AngleBrackets"] = 2048] = "AngleBrackets";
+ ListFormat[ListFormat["SquareBrackets"] = 4096] = "SquareBrackets";
+ ListFormat[ListFormat["BracketsMask"] = 7680] = "BracketsMask";
+ ListFormat[ListFormat["OptionalIfUndefined"] = 8192] = "OptionalIfUndefined";
+ ListFormat[ListFormat["OptionalIfEmpty"] = 16384] = "OptionalIfEmpty";
+ ListFormat[ListFormat["Optional"] = 24576] = "Optional";
+ ListFormat[ListFormat["PreferNewLine"] = 32768] = "PreferNewLine";
+ ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
+ ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
+ ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
+ ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
+ ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
+ ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
+ ListFormat[ListFormat["ObjectBindingPatternElements"] = 432] = "ObjectBindingPatternElements";
+ ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
+ ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
+ ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
+ ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
+ ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
+ ListFormat[ListFormat["SingleLineBlockStatements"] = 384] = "SingleLineBlockStatements";
+ ListFormat[ListFormat["MultiLineBlockStatements"] = 65] = "MultiLineBlockStatements";
+ ListFormat[ListFormat["VariableDeclarationList"] = 272] = "VariableDeclarationList";
+ ListFormat[ListFormat["SingleLineFunctionBodyStatements"] = 384] = "SingleLineFunctionBodyStatements";
+ ListFormat[ListFormat["MultiLineFunctionBodyStatements"] = 1] = "MultiLineFunctionBodyStatements";
+ ListFormat[ListFormat["ClassHeritageClauses"] = 256] = "ClassHeritageClauses";
+ ListFormat[ListFormat["ClassMembers"] = 65] = "ClassMembers";
+ ListFormat[ListFormat["InterfaceMembers"] = 65] = "InterfaceMembers";
+ ListFormat[ListFormat["EnumMembers"] = 81] = "EnumMembers";
+ ListFormat[ListFormat["CaseBlockClauses"] = 65] = "CaseBlockClauses";
+ ListFormat[ListFormat["NamedImportsOrExportsElements"] = 432] = "NamedImportsOrExportsElements";
+ ListFormat[ListFormat["JsxElementChildren"] = 131072] = "JsxElementChildren";
+ ListFormat[ListFormat["JsxElementAttributes"] = 131328] = "JsxElementAttributes";
+ ListFormat[ListFormat["CaseOrDefaultClauseStatements"] = 81985] = "CaseOrDefaultClauseStatements";
+ ListFormat[ListFormat["HeritageClauseTypes"] = 272] = "HeritageClauseTypes";
+ ListFormat[ListFormat["SourceFileStatements"] = 65537] = "SourceFileStatements";
+ ListFormat[ListFormat["Decorators"] = 24577] = "Decorators";
+ ListFormat[ListFormat["TypeArguments"] = 26960] = "TypeArguments";
+ ListFormat[ListFormat["TypeParameters"] = 26960] = "TypeParameters";
+ ListFormat[ListFormat["Parameters"] = 1360] = "Parameters";
+ ListFormat[ListFormat["IndexSignatureParameters"] = 4432] = "IndexSignatureParameters";
+ })(ListFormat || (ListFormat = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var emptyArray = [];
+ var ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
function findConfigFile(searchPath, fileExists, configName) {
if (configName === void 0) { configName = "tsconfig.json"; }
while (true) {
@@ -50521,7 +54463,8 @@ var ts;
commonPathComponents = sourcePathComponents;
return;
}
- for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
+ var n = Math.min(commonPathComponents.length, sourcePathComponents.length);
+ for (var i = 0; i < n; i++) {
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
if (i === 0) {
return true;
@@ -50548,7 +54491,6 @@ var ts;
function getCanonicalFileName(fileName) {
return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
}
- var unsupportedFileEncodingErrorCode = -2147024809;
function getSourceFile(fileName, languageVersion, onError) {
var text;
try {
@@ -50559,20 +54501,18 @@ var ts;
}
catch (e) {
if (onError) {
- onError(e.number === unsupportedFileEncodingErrorCode
- ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
- : e.message);
+ onError(e.message);
}
text = "";
}
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath) {
- if (directoryPath in existingDirectories) {
+ if (existingDirectories.has(directoryPath)) {
return true;
}
if (ts.sys.directoryExists(directoryPath)) {
- existingDirectories[directoryPath] = true;
+ existingDirectories.set(directoryPath, true);
return true;
}
return false;
@@ -50591,9 +54531,10 @@ var ts;
}
var hash = ts.sys.createHash(data);
var mtimeBefore = ts.sys.getModifiedTime(fileName);
- if (mtimeBefore && fileName in outputFingerprints) {
- var fingerprint = outputFingerprints[fileName];
- if (fingerprint.byteOrderMark === writeByteOrderMark &&
+ if (mtimeBefore) {
+ var fingerprint = outputFingerprints.get(fileName);
+ if (fingerprint &&
+ fingerprint.byteOrderMark === writeByteOrderMark &&
fingerprint.hash === hash &&
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
return;
@@ -50601,11 +54542,11 @@ var ts;
}
ts.sys.writeFile(fileName, data, writeByteOrderMark);
var mtimeAfter = ts.sys.getModifiedTime(fileName);
- outputFingerprints[fileName] = {
+ outputFingerprints.set(fileName, {
hash: hash,
byteOrderMark: writeByteOrderMark,
mtime: mtimeAfter
- };
+ });
}
function writeFile(fileName, data, writeByteOrderMark, onError) {
try {
@@ -50704,10 +54645,14 @@ var ts;
var resolutions = [];
var cache = ts.createMap();
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
- var name_43 = names_1[_i];
- var result = name_43 in cache
- ? cache[name_43]
- : cache[name_43] = loader(name_43, containingFile);
+ var name = names_1[_i];
+ var result = void 0;
+ if (cache.has(name)) {
+ result = cache.get(name);
+ }
+ else {
+ cache.set(name, result = loader(name, containingFile));
+ }
resolutions.push(result);
}
return resolutions;
@@ -50719,6 +54664,8 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var cachedSemanticDiagnosticsForFile = {};
+ var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
var fileProcessingDiagnostics = ts.createDiagnosticCollection();
var maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0;
@@ -50732,6 +54679,7 @@ var ts;
var currentDirectory = host.getCurrentDirectory();
var supportedExtensions = ts.getSupportedExtensions(options);
var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName);
+ var moduleResolutionCache;
var resolveModuleNamesWorker;
if (host.resolveModuleNames) {
resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile).map(function (resolved) {
@@ -50744,7 +54692,8 @@ var ts;
}); };
}
else {
- var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host).resolvedModule; };
+ moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); });
+ var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache).resolvedModule; };
resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); };
}
var resolveTypeReferenceDirectiveNamesWorker;
@@ -50780,6 +54729,7 @@ var ts;
}
}
}
+ moduleResolutionCache = undefined;
oldProgram = undefined;
program = {
getRootFileNames: function () { return rootNames; },
@@ -50813,7 +54763,7 @@ var ts;
return program;
function getCommonSourceDirectory() {
if (commonSourceDirectory === undefined) {
- var emittedFiles = ts.filterSourceFilesInDirectory(files, isSourceFileFromExternalLibrary);
+ var emittedFiles = ts.filter(files, function (file) { return ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary); });
if (options.rootDir && checkSourceFilesBelongToPath(emittedFiles, options.rootDir)) {
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory);
}
@@ -50832,7 +54782,7 @@ var ts;
classifiableNames = ts.createMap();
for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
var sourceFile = files_2[_i];
- ts.copyProperties(sourceFile.classifiableNames, classifiableNames);
+ ts.copyEntries(sourceFile.classifiableNames, classifiableNames);
}
}
return classifiableNames;
@@ -50875,7 +54825,7 @@ var ts;
: emptyArray;
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] == predictedToResolveToAmbientModuleMarker) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
result[i] = undefined;
}
else {
@@ -50986,7 +54936,7 @@ var ts;
newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
- for (var i = 0, len = newSourceFiles.length; i < len; i++) {
+ for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
}
files = newSourceFiles;
@@ -51015,7 +54965,7 @@ var ts;
};
}
function isSourceFileFromExternalLibrary(file) {
- return sourceFilesFoundSearchingNodeModules[file.path];
+ return sourceFilesFoundSearchingNodeModules.get(file.path);
}
function getDiagnosticsProducingTypeChecker() {
return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true));
@@ -51026,13 +54976,13 @@ var ts;
function getTypeChecker() {
return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false));
}
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
- return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles); });
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers) {
+ return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers); });
}
function isEmitBlocked(emitFileName) {
return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName));
}
- function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
+ function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers) {
var declarationDiagnostics = [];
if (options.noEmit) {
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
@@ -51053,7 +55003,8 @@ var ts;
}
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile);
ts.performance.mark("beforeEmit");
- var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles);
+ var transformers = emitOnlyDtsFiles ? [] : ts.getTransformers(options, customTransformers);
+ var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles, transformers);
ts.performance.mark("afterEmit");
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
return emitResult;
@@ -51114,16 +55065,42 @@ var ts;
}
}
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedSemanticDiagnosticsForFile, getSemanticDiagnosticsForFileNoCache);
+ }
+ function getSemanticDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
var bindDiagnostics = sourceFile.bindDiagnostics;
- var checkDiagnostics = ts.isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
+ var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
- return bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ return ts.isSourceFileJavaScript(sourceFile)
+ ? ts.filter(diagnostics, shouldReportDiagnostic)
+ : diagnostics;
});
}
+ function shouldReportDiagnostic(diagnostic) {
+ var file = diagnostic.file, start = diagnostic.start;
+ if (file) {
+ var lineStarts = ts.getLineStarts(file);
+ var line = ts.computeLineAndCharacterOfPosition(lineStarts, start).line;
+ while (line > 0) {
+ var previousLineText = file.text.slice(lineStarts[line - 1], lineStarts[line]);
+ var result = ignoreDiagnosticCommentRegEx.exec(previousLineText);
+ if (!result) {
+ return true;
+ }
+ if (result[3]) {
+ return false;
+ }
+ line--;
+ }
+ }
+ return true;
+ }
function getJavaScriptSyntacticDiagnosticsForFile(sourceFile) {
return runWithCancellationToken(function () {
var diagnostics = [];
@@ -51132,57 +55109,57 @@ var ts;
return diagnostics;
function walk(node) {
switch (parent.kind) {
- case 144:
- case 147:
+ case 145:
+ case 148:
if (parent.questionToken === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
return;
}
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
+ case 227:
case 225:
- case 223:
if (parent.type === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file));
return;
}
}
switch (node.kind) {
- case 234:
+ case 236:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file));
return;
- case 240:
+ case 242:
if (node.isExportEquals) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 255:
+ case 258:
var heritageClause = node;
if (heritageClause.token === 107) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 227:
+ case 229:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));
return;
- case 230:
+ case 232:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));
return;
- case 228:
+ case 230:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));
return;
- case 229:
+ case 231:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));
return;
- case 182:
+ case 183:
var typeAssertionExpression = node;
diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));
return;
@@ -51197,26 +55174,26 @@ var ts;
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
}
switch (parent.kind) {
- case 226:
- case 149:
- case 148:
+ case 228:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
- case 225:
+ case 227:
+ case 186:
+ case 227:
if (nodes === parent.typeParameters) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));
return;
}
- case 205:
+ case 207:
if (nodes === parent.modifiers) {
- return checkModifiers(nodes, parent.kind === 205);
+ return checkModifiers(nodes, parent.kind === 207);
}
break;
- case 147:
+ case 148:
if (nodes === parent.modifiers) {
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
var modifier = _a[_i];
@@ -51227,23 +55204,23 @@ var ts;
return;
}
break;
- case 144:
+ case 145:
if (nodes === parent.modifiers) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 179:
case 180:
- case 199:
+ case 181:
+ case 200:
if (nodes === parent.typeArguments) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file));
return;
}
break;
}
- for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) {
- var node = nodes_6[_b];
+ for (var _b = 0, nodes_8 = nodes; _b < nodes_8.length; _b++) {
+ var node = nodes_8[_b];
walk(node);
}
}
@@ -51279,11 +55256,33 @@ var ts;
});
}
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
+ }
+ function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
return ts.getDeclarationDiagnostics(getEmitHost(ts.noop), resolver, sourceFile);
});
}
+ function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics) {
+ var cachedResult = sourceFile
+ ? cache.perFile && cache.perFile.get(sourceFile.path)
+ : cache.allDiagnostics;
+ if (cachedResult) {
+ return cachedResult;
+ }
+ var result = getDiagnostics(sourceFile, cancellationToken) || emptyArray;
+ if (sourceFile) {
+ if (!cache.perFile) {
+ cache.perFile = ts.createFileMap();
+ }
+ cache.perFile.set(sourceFile.path, result);
+ }
+ else {
+ cache.allDiagnostics = result;
+ }
+ return result;
+ }
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
@@ -51323,11 +55322,10 @@ var ts;
if (options.importHelpers
&& (options.isolatedModules || isExternalModuleFile)
&& !file.isDeclarationFile) {
- var externalHelpersModuleReference = ts.createSynthesizedNode(9);
- externalHelpersModuleReference.text = ts.externalHelpersModuleNameText;
- var importDecl = ts.createSynthesizedNode(235);
- importDecl.parent = file;
+ var externalHelpersModuleReference = ts.createLiteral(ts.externalHelpersModuleNameText);
+ var importDecl = ts.createImportDeclaration(undefined, undefined, undefined);
externalHelpersModuleReference.parent = importDecl;
+ importDecl.parent = file;
imports = [externalHelpersModuleReference];
}
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
@@ -51343,9 +55341,9 @@ var ts;
return;
function collectModuleReferences(node, inAmbientModule) {
switch (node.kind) {
- case 235:
- case 234:
- case 241:
+ case 237:
+ case 236:
+ case 243:
var moduleNameExpr = ts.getExternalModuleName(node);
if (!moduleNameExpr || moduleNameExpr.kind !== 9) {
break;
@@ -51357,7 +55355,7 @@ var ts;
(imports || (imports = [])).push(moduleNameExpr);
}
break;
- case 230:
+ case 232:
if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
@@ -51441,18 +55439,18 @@ var ts;
if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) {
reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd);
}
- if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
- sourceFilesFoundSearchingNodeModules[file_1.path] = false;
+ if (file_1 && sourceFilesFoundSearchingNodeModules.get(file_1.path) && currentNodeModulesDepth === 0) {
+ sourceFilesFoundSearchingNodeModules.set(file_1.path, false);
if (!options.noResolve) {
processReferencedFiles(file_1, isDefaultLib);
processTypeReferenceDirectives(file_1);
}
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
- else if (file_1 && modulesWithElidedImports[file_1.path]) {
+ else if (file_1 && modulesWithElidedImports.get(file_1.path)) {
if (currentNodeModulesDepth < maxNodeModuleJsDepth) {
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
}
@@ -51468,7 +55466,7 @@ var ts;
});
filesByName.set(path, file);
if (file) {
- sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
+ sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
file.path = path;
if (host.useCaseSensitiveFileNames()) {
var existingFile = filesByNameIgnoreCase.get(path);
@@ -51512,7 +55510,7 @@ var ts;
}
}
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) {
- var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective];
+ var previousResolution = resolvedTypeReferenceDirectives.get(typeReferenceDirective);
if (previousResolution && previousResolution.primary) {
return;
}
@@ -51540,7 +55538,7 @@ var ts;
fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective));
}
if (saveResolution) {
- resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective;
+ resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
}
}
function createDiagnostic(refFile, refPos, refEnd, message) {
@@ -51581,7 +55579,7 @@ var ts;
var elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;
var shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport;
if (elideImport) {
- modulesWithElidedImports[file.path] = true;
+ modulesWithElidedImports.set(file.path, true);
}
else if (shouldAddFile) {
var path = ts.toPath(resolvedFileName, currentDirectory, getCanonicalFileName);
@@ -51599,8 +55597,8 @@ var ts;
}
function computeCommonSourceDirectory(sourceFiles) {
var fileNames = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var file = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
+ var file = sourceFiles_2[_i];
if (!file.isDeclarationFile) {
fileNames.push(file.fileName);
}
@@ -51611,8 +55609,8 @@ var ts;
var allFilesBelongToPath = true;
if (sourceFiles) {
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
+ for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
+ var sourceFile = sourceFiles_3[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
@@ -51705,7 +55703,7 @@ var ts;
if (options.lib && options.noLib) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"));
}
- if (options.noImplicitUseStrict && options.alwaysStrict) {
+ if (options.noImplicitUseStrict && (options.alwaysStrict === undefined ? options.strict : options.alwaysStrict)) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"));
}
var languageVersion = options.target || 0;
@@ -51745,6 +55743,9 @@ var ts;
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+ if (options.checkJs && !options.allowJs) {
+ programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"));
+ }
if (options.emitDecoratorMetadata &&
!options.experimentalDecorators) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
@@ -51763,7 +55764,7 @@ var ts;
if (!options.noEmit && !options.suppressOutputPathCheck) {
var emitHost = getEmitHost();
var emitFilesSeen_1 = ts.createFileMap(!host.useCaseSensitiveFileNames() ? function (key) { return key.toLocaleLowerCase(); } : undefined);
- ts.forEachExpectedEmitFile(emitHost, function (emitFileNames) {
+ ts.forEachEmittedFile(emitHost, function (emitFileNames) {
verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen_1);
verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen_1);
});
@@ -51818,6 +55819,1348 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
+ ts.optionDeclarations = [
+ {
+ name: "help",
+ shortName: "h",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_this_message,
+ },
+ {
+ name: "help",
+ shortName: "?",
+ type: "boolean"
+ },
+ {
+ name: "all",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
+ },
+ {
+ name: "version",
+ shortName: "v",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
+ },
+ {
+ name: "init",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ },
+ {
+ name: "project",
+ shortName: "p",
+ type: "string",
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
+ },
+ {
+ name: "pretty",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
+ },
+ {
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
+ },
+ {
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0,
+ "es5": 1,
+ "es6": 2,
+ "es2015": 2,
+ "es2016": 3,
+ "es2017": 4,
+ "esnext": 5,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
+ },
+ {
+ name: "module",
+ shortName: "m",
+ type: ts.createMapFromTemplate({
+ "none": ts.ModuleKind.None,
+ "commonjs": ts.ModuleKind.CommonJS,
+ "amd": ts.ModuleKind.AMD,
+ "system": ts.ModuleKind.System,
+ "umd": ts.ModuleKind.UMD,
+ "es6": ts.ModuleKind.ES2015,
+ "es2015": ts.ModuleKind.ES2015,
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
+ },
+ {
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ },
+ {
+ name: "allowJs",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ },
+ {
+ name: "checkJs",
+ type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
+ },
+ {
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1,
+ "react-native": 3,
+ "react": 2
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
+ },
+ {
+ name: "declaration",
+ shortName: "d",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
+ },
+ {
+ name: "sourceMap",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
+ },
+ {
+ name: "outFile",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "outDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
+ },
+ {
+ name: "rootDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
+ },
+ {
+ name: "removeComments",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ },
+ {
+ name: "noEmit",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
+ },
+ {
+ name: "importHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ },
+ {
+ name: "downlevelIteration",
+ type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
+ },
+ {
+ name: "isolatedModules",
+ type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
+ },
+ {
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
+ },
+ {
+ name: "noImplicitAny",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
+ },
+ {
+ name: "strictNullChecks",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
+ },
+ {
+ name: "noImplicitThis",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
+ },
+ {
+ name: "alwaysStrict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ },
+ {
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
+ },
+ {
+ name: "noUnusedParameters",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ },
+ {
+ name: "noImplicitReturns",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
+ },
+ {
+ name: "noFallthroughCasesInSwitch",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
+ },
+ {
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
+ },
+ {
+ name: "baseUrl",
+ type: "string",
+ isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
+ },
+ {
+ name: "paths",
+ type: "object",
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
+ },
+ {
+ name: "rootDirs",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "rootDirs",
+ type: "string",
+ isFilePath: true
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
+ },
+ {
+ name: "typeRoots",
+ type: "list",
+ element: {
+ name: "typeRoots",
+ type: "string",
+ isFilePath: true
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
+ },
+ {
+ name: "types",
+ type: "list",
+ element: {
+ name: "types",
+ type: "string"
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
+ },
+ {
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
+ name: "traceResolution",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
+ },
+ {
+ name: "listFiles",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
+ },
+ {
+ name: "listEmittedFiles",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0,
+ "lf": 1
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
+ },
+ {
+ name: "noImplicitUseStrict",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
+ },
+ {
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
+ },
+ {
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
+ },
+ {
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
+ },
+ {
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
+ },
+ {
+ name: "skipLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
+ },
+ {
+ name: "allowUnusedLabels",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ },
+ {
+ name: "allowUnreachableCode",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
+ }
+ ];
+ ts.typeAcquisitionDeclarations = [
+ {
+ name: "enableAutoDiscovery",
+ type: "boolean",
+ },
+ {
+ name: "enable",
+ type: "boolean",
+ },
+ {
+ name: "include",
+ type: "list",
+ element: {
+ name: "include",
+ type: "string"
+ }
+ },
+ {
+ name: "exclude",
+ type: "list",
+ element: {
+ name: "exclude",
+ type: "string"
+ }
+ }
+ ];
+ ts.defaultInitCompilerOptions = {
+ module: ts.ModuleKind.CommonJS,
+ target: 1,
+ strict: true
+ };
+ var optionNameMapCache;
+ function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
+ if (typeAcquisition && typeAcquisition.enableAutoDiscovery !== undefined && typeAcquisition.enable === undefined) {
+ var result = {
+ enable: typeAcquisition.enableAutoDiscovery,
+ include: typeAcquisition.include || [],
+ exclude: typeAcquisition.exclude || []
+ };
+ return result;
+ }
+ return typeAcquisition;
+ }
+ ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
+ function getOptionNameMap() {
+ if (optionNameMapCache) {
+ return optionNameMapCache;
+ }
+ var optionNameMap = ts.createMap();
+ var shortOptionNames = ts.createMap();
+ ts.forEach(ts.optionDeclarations, function (option) {
+ optionNameMap.set(option.name.toLowerCase(), option);
+ if (option.shortName) {
+ shortOptionNames.set(option.shortName, option.name);
+ }
+ });
+ optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
+ return optionNameMapCache;
+ }
+ ts.getOptionNameMap = getOptionNameMap;
+ function createCompilerDiagnosticForInvalidCustomType(opt) {
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
+ return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
+ }
+ ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
+ function parseCustomTypeOption(opt, value, errors) {
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
+ }
+ ts.parseCustomTypeOption = parseCustomTypeOption;
+ function parseListTypeOption(opt, value, errors) {
+ if (value === void 0) { value = ""; }
+ value = trimString(value);
+ if (ts.startsWith(value, "-")) {
+ return undefined;
+ }
+ if (value === "") {
+ return [];
+ }
+ var values = value.split(",");
+ switch (opt.element.type) {
+ case "number":
+ return ts.map(values, parseInt);
+ case "string":
+ return ts.map(values, function (v) { return v || ""; });
+ default:
+ return ts.filter(ts.map(values, function (v) { return parseCustomTypeOption(opt.element, v, errors); }), function (v) { return !!v; });
+ }
+ }
+ ts.parseListTypeOption = parseListTypeOption;
+ function parseCommandLine(commandLine, readFile) {
+ var options = {};
+ var fileNames = [];
+ var errors = [];
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ parseStrings(commandLine);
+ return {
+ options: options,
+ fileNames: fileNames,
+ errors: errors
+ };
+ function parseStrings(args) {
+ var i = 0;
+ while (i < args.length) {
+ var s = args[i];
+ i++;
+ if (s.charCodeAt(0) === 64) {
+ parseResponseFile(s.slice(1));
+ }
+ else if (s.charCodeAt(0) === 45) {
+ s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
+ }
+ var opt = optionNameMap.get(s);
+ if (opt) {
+ if (opt.isTSConfigOnly) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
+ }
+ else {
+ if (!args[i] && opt.type !== "boolean") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name));
+ }
+ switch (opt.type) {
+ case "number":
+ options[opt.name] = parseInt(args[i]);
+ i++;
+ break;
+ case "boolean":
+ var optValue = args[i];
+ options[opt.name] = optValue !== "false";
+ if (optValue === "false" || optValue === "true") {
+ i++;
+ }
+ break;
+ case "string":
+ options[opt.name] = args[i] || "";
+ i++;
+ break;
+ case "list":
+ var result = parseListTypeOption(opt, args[i], errors);
+ options[opt.name] = result || [];
+ if (result) {
+ i++;
+ }
+ break;
+ default:
+ options[opt.name] = parseCustomTypeOption(opt, args[i], errors);
+ i++;
+ break;
+ }
+ }
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s));
+ }
+ }
+ else {
+ fileNames.push(s);
+ }
+ }
+ }
+ function parseResponseFile(fileName) {
+ var text = readFile ? readFile(fileName) : ts.sys.readFile(fileName);
+ if (!text) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName));
+ return;
+ }
+ var args = [];
+ var pos = 0;
+ while (true) {
+ while (pos < text.length && text.charCodeAt(pos) <= 32)
+ pos++;
+ if (pos >= text.length)
+ break;
+ var start = pos;
+ if (text.charCodeAt(start) === 34) {
+ pos++;
+ while (pos < text.length && text.charCodeAt(pos) !== 34)
+ pos++;
+ if (pos < text.length) {
+ args.push(text.substring(start + 1, pos));
+ pos++;
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));
+ }
+ }
+ else {
+ while (text.charCodeAt(pos) > 32)
+ pos++;
+ args.push(text.substring(start, pos));
+ }
+ }
+ parseStrings(args);
+ }
+ }
+ ts.parseCommandLine = parseCommandLine;
+ function readConfigFile(fileName, readFile) {
+ var text = "";
+ try {
+ text = readFile(fileName);
+ }
+ catch (e) {
+ return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };
+ }
+ return parseConfigFileTextToJson(fileName, text);
+ }
+ ts.readConfigFile = readConfigFile;
+ function parseConfigFileTextToJson(fileName, jsonText, stripComments) {
+ if (stripComments === void 0) { stripComments = true; }
+ try {
+ var jsonTextToParse = stripComments ? removeComments(jsonText) : jsonText;
+ return { config: /\S/.test(jsonTextToParse) ? JSON.parse(jsonTextToParse) : {} };
+ }
+ catch (e) {
+ return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) };
+ }
+ }
+ ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
+ function generateTSConfig(options, fileNames, newLine) {
+ var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
+ var configurations = {
+ compilerOptions: serializeCompilerOptions(compilerOptions)
+ };
+ if (fileNames && fileNames.length) {
+ configurations.files = fileNames;
+ }
+ return writeConfigurations();
+ function getCustomTypeMapOfCommandLineOption(optionDefinition) {
+ if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
+ return undefined;
+ }
+ else if (optionDefinition.type === "list") {
+ return getCustomTypeMapOfCommandLineOption(optionDefinition.element);
+ }
+ else {
+ return optionDefinition.type;
+ }
+ }
+ function getNameOfCompilerOptionValue(value, customTypeMap) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
+ return key;
+ }
+ });
+ }
+ function serializeCompilerOptions(options) {
+ var result = {};
+ var optionsNameMap = getOptionNameMap().optionNameMap;
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
+ }
+ result[name] = convertedValue;
+ }
+ else {
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
+ }
+ ts.generateTSConfig = generateTSConfig;
+ function removeComments(jsonText) {
+ var output = "";
+ var scanner = ts.createScanner(1, false, 0, jsonText);
+ var token;
+ while ((token = scanner.scan()) !== 1) {
+ switch (token) {
+ case 2:
+ case 3:
+ output += scanner.getTokenText().replace(/\S/g, " ");
+ break;
+ default:
+ output += scanner.getTokenText();
+ break;
+ }
+ }
+ return output;
+ }
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
+ if (existingOptions === void 0) { existingOptions = {}; }
+ if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
+ var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ return {
+ options: {},
+ fileNames: [],
+ typeAcquisition: {},
+ raw: json,
+ errors: [ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> "))],
+ wildcardDirectories: {}
+ };
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName);
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ if (json["extends"]) {
+ var _a = [undefined, undefined, undefined, {}], include = _a[0], exclude = _a[1], files = _a[2], baseOptions = _a[3];
+ if (typeof json["extends"] === "string") {
+ _b = (tryExtendsName(json["extends"]) || [include, exclude, files, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseOptions = _b[3];
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ }
+ if (include && !json["include"]) {
+ json["include"] = include;
+ }
+ if (exclude && !json["exclude"]) {
+ json["exclude"] = exclude;
+ }
+ if (files && !json["files"]) {
+ json["files"] = files;
+ }
+ options = ts.assign({}, baseOptions, options);
+ }
+ options = ts.extend(existingOptions, options);
+ options.configFilePath = configFileName;
+ var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
+ return {
+ options: options,
+ fileNames: fileNames,
+ typeAcquisition: typeAcquisition,
+ raw: json,
+ errors: errors,
+ wildcardDirectories: wildcardDirectories,
+ compileOnSave: compileOnSave
+ };
+ function tryExtendsName(extendedConfig) {
+ if (!(ts.isRootedDiskPath(extendedConfig) || ts.startsWith(ts.normalizeSlashes(extendedConfig), "./") || ts.startsWith(ts.normalizeSlashes(extendedConfig), "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
+ return;
+ }
+ var extendedConfigPath = ts.toPath(extendedConfig, basePath, getCanonicalFileName);
+ if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
+ extendedConfigPath = extendedConfigPath + ".json";
+ if (!host.fileExists(extendedConfigPath)) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_does_not_exist, extendedConfig));
+ return;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return;
+ }
+ var extendedDirname = ts.getDirectoryPath(extendedConfigPath);
+ var relativeDifference = ts.convertToRelativePath(extendedDirname, basePath, getCanonicalFileName);
+ var updatePath = function (path) { return ts.isRootedDiskPath(path) ? path : ts.combinePaths(relativeDifference, path); };
+ var result = parseJsonConfigFileContent(extendedResult.config, host, extendedDirname, undefined, ts.getBaseFileName(extendedConfigPath), resolutionStack.concat([resolvedPath]));
+ errors.push.apply(errors, result.errors);
+ var _a = ts.map(["include", "exclude", "files"], function (key) {
+ if (!json[key] && extendedResult.config[key]) {
+ return ts.map(extendedResult.config[key], updatePath);
+ }
+ }), include = _a[0], exclude = _a[1], files = _a[2];
+ return [include, exclude, files, result.options];
+ }
+ function getFileNames(errors) {
+ var fileNames;
+ if (ts.hasProperty(json, "files")) {
+ if (ts.isArray(json["files"])) {
+ fileNames = json["files"];
+ if (fileNames.length === 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"));
+ }
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array"));
+ }
+ }
+ var includeSpecs;
+ if (ts.hasProperty(json, "include")) {
+ if (ts.isArray(json["include"])) {
+ includeSpecs = json["include"];
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "include", "Array"));
+ }
+ }
+ var excludeSpecs;
+ if (ts.hasProperty(json, "exclude")) {
+ if (ts.isArray(json["exclude"])) {
+ excludeSpecs = json["exclude"];
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array"));
+ }
+ }
+ else if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ else {
+ excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
+ var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
+ if (outDir) {
+ excludeSpecs.push(outDir);
+ }
+ }
+ if (fileNames === undefined && includeSpecs === undefined) {
+ includeSpecs = ["**/*"];
+ }
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
+ if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
+ }
+ return result;
+ }
+ var _b;
+ }
+ ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
+ if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
+ return false;
+ }
+ var result = convertJsonOption(ts.compileOnSaveCommandLineOption, jsonOption["compileOnSave"], basePath, errors);
+ if (typeof result === "boolean" && result) {
+ return result;
+ }
+ return false;
+ }
+ ts.convertCompileOnSaveOptionFromJson = convertCompileOnSaveOptionFromJson;
+ function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) {
+ var errors = [];
+ var options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ return { options: options, errors: errors };
+ }
+ ts.convertCompilerOptionsFromJson = convertCompilerOptionsFromJson;
+ function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {
+ var errors = [];
+ var options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ return { options: options, errors: errors };
+ }
+ ts.convertTypeAcquisitionFromJson = convertTypeAcquisitionFromJson;
+ function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
+ var options = ts.getBaseFileName(configFileName) === "jsconfig.json"
+ ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
+ : {};
+ convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors);
+ return options;
+ }
+ function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
+ var options = { enable: ts.getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
+ var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions);
+ convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors);
+ return options;
+ }
+ function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) {
+ if (!jsonOptions) {
+ return;
+ }
+ var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
+ for (var id in jsonOptions) {
+ var opt = optionNameMap.get(id);
+ if (opt) {
+ defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id));
+ }
+ }
+ }
+ function convertJsonOption(opt, value, basePath, errors) {
+ var optType = opt.type;
+ var expectedType = typeof optType === "string" ? optType : "string";
+ if (optType === "list" && ts.isArray(value)) {
+ return convertJsonOptionOfListType(opt, value, basePath, errors);
+ }
+ else if (typeof value === expectedType) {
+ if (typeof optType !== "string") {
+ return convertJsonOptionOfCustomType(opt, value, errors);
+ }
+ else {
+ if (opt.isFilePath) {
+ value = ts.normalizePath(ts.combinePaths(basePath, value));
+ if (value === "") {
+ value = ".";
+ }
+ }
+ }
+ return value;
+ }
+ else {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType));
+ }
+ }
+ function convertJsonOptionOfCustomType(opt, value, errors) {
+ var key = value.toLowerCase();
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
+ }
+ else {
+ errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
+ }
+ }
+ function convertJsonOptionOfListType(option, values, basePath, errors) {
+ return ts.filter(ts.map(values, function (v) { return convertJsonOption(option.element, v, basePath, errors); }), function (v) { return !!v; });
+ }
+ function trimString(s) {
+ return typeof s.trim === "function" ? s.trim() : s.replace(/^[\s]+|[\s]+$/g, "");
+ }
+ var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/;
+ var invalidMultipleRecursionPatterns = /(^|\/)\*\*\/(.*\/)?\*\*($|\/)/;
+ var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
+ var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
+ var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
+ basePath = ts.normalizePath(basePath);
+ var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
+ var literalFileMap = ts.createMap();
+ var wildcardFileMap = ts.createMap();
+ if (include) {
+ include = validateSpecs(include, errors, false);
+ }
+ if (exclude) {
+ exclude = validateSpecs(exclude, errors, true);
+ }
+ var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
+ if (fileNames) {
+ for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
+ var fileName = fileNames_1[_i];
+ var file = ts.combinePaths(basePath, fileName);
+ literalFileMap.set(keyMapper(file), file);
+ }
+ }
+ if (include && include.length > 0) {
+ for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensions, exclude, include); _a < _b.length; _a++) {
+ var file = _b[_a];
+ if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) {
+ continue;
+ }
+ removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
+ var key = keyMapper(file);
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
+ }
+ }
+ }
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
+ return {
+ fileNames: literalFiles.concat(wildcardFiles),
+ wildcardDirectories: wildcardDirectories
+ };
+ }
+ function validateSpecs(specs, errors, allowTrailingRecursion) {
+ var validSpecs = [];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
+ if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
+ }
+ else if (invalidMultipleRecursionPatterns.test(spec)) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, spec));
+ }
+ else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
+ }
+ else {
+ validSpecs.push(spec);
+ }
+ }
+ return validSpecs;
+ }
+ function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
+ var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
+ var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
+ var wildcardDirectories = {};
+ if (include !== undefined) {
+ var recursiveKeys = [];
+ for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
+ var file = include_1[_i];
+ var spec = ts.normalizePath(ts.combinePaths(path, file));
+ if (excludeRegex && excludeRegex.test(spec)) {
+ continue;
+ }
+ var match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames);
+ if (match) {
+ var key = match.key, flags = match.flags;
+ var existingFlags = wildcardDirectories[key];
+ if (existingFlags === undefined || existingFlags < flags) {
+ wildcardDirectories[key] = flags;
+ if (flags === 1) {
+ recursiveKeys.push(key);
+ }
+ }
+ }
+ }
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
+ }
+ }
+ }
+ return wildcardDirectories;
+ }
+ function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
+ var match = wildcardDirectoryPattern.exec(spec);
+ if (match) {
+ return {
+ key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(),
+ flags: watchRecursivePattern.test(spec) ? 1 : 0
+ };
+ }
+ if (ts.isImplicitGlob(spec)) {
+ return { key: spec, flags: 1 };
+ }
+ return undefined;
+ }
+ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
+ var extensionPriority = ts.getExtensionPriority(file, extensions);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
+ for (var i = 0; i < adjustedExtensionPriority; i++) {
+ var higherPriorityExtension = extensions[i];
+ var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
+ var extensionPriority = ts.getExtensionPriority(file, extensions);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
+ for (var i = nextExtensionPriority; i < extensions.length; i++) {
+ var lowerPriorityExtension = extensions[i];
+ var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
+ wildcardFiles.delete(lowerPriorityPath);
+ }
+ }
+ function caseSensitiveKeyMapper(key) {
+ return key;
+ }
+ function caseInsensitiveKeyMapper(key) {
+ return key.toLowerCase();
+ }
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var ScriptSnapshot;
(function (ScriptSnapshot) {
var StringScriptSnapshot = (function () {
@@ -51825,7 +57168,9 @@ var ts;
this.text = text;
}
StringScriptSnapshot.prototype.getText = function (start, end) {
- return this.text.substring(start, end);
+ return start === 0 && end === this.text.length
+ ? this.text
+ : this.text.substring(start, end);
};
StringScriptSnapshot.prototype.getLength = function () {
return this.text.length;
@@ -51884,6 +57229,22 @@ var ts;
SymbolDisplayPartKind[SymbolDisplayPartKind["functionName"] = 20] = "functionName";
SymbolDisplayPartKind[SymbolDisplayPartKind["regularExpressionLiteral"] = 21] = "regularExpressionLiteral";
})(SymbolDisplayPartKind = ts.SymbolDisplayPartKind || (ts.SymbolDisplayPartKind = {}));
+ var OutputFileType;
+ (function (OutputFileType) {
+ OutputFileType[OutputFileType["JavaScript"] = 0] = "JavaScript";
+ OutputFileType[OutputFileType["SourceMap"] = 1] = "SourceMap";
+ OutputFileType[OutputFileType["Declaration"] = 2] = "Declaration";
+ })(OutputFileType = ts.OutputFileType || (ts.OutputFileType = {}));
+ var EndOfLineState;
+ (function (EndOfLineState) {
+ EndOfLineState[EndOfLineState["None"] = 0] = "None";
+ EndOfLineState[EndOfLineState["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia";
+ EndOfLineState[EndOfLineState["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral";
+ EndOfLineState[EndOfLineState["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral";
+ EndOfLineState[EndOfLineState["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate";
+ EndOfLineState[EndOfLineState["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail";
+ EndOfLineState[EndOfLineState["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition";
+ })(EndOfLineState = ts.EndOfLineState || (ts.EndOfLineState = {}));
var TokenClass;
(function (TokenClass) {
TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation";
@@ -51908,7 +57269,7 @@ var ts;
ScriptElementKind.interfaceElement = "interface";
ScriptElementKind.typeElement = "type";
ScriptElementKind.enumElement = "enum";
- ScriptElementKind.enumMemberElement = "const";
+ ScriptElementKind.enumMemberElement = "enum member";
ScriptElementKind.variableElement = "var";
ScriptElementKind.localVariableElement = "local var";
ScriptElementKind.functionElement = "function";
@@ -51930,6 +57291,7 @@ var ts;
ScriptElementKind.letElement = "let";
ScriptElementKind.directory = "directory";
ScriptElementKind.externalModuleName = "external module name";
+ ScriptElementKind.jsxAttribute = "JSX attribute";
})(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {}));
var ScriptElementKindModifier;
(function (ScriptElementKindModifier) {
@@ -51971,40 +57333,76 @@ var ts;
ClassificationTypeNames.jsxText = "jsx text";
ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
+ var ClassificationType;
+ (function (ClassificationType) {
+ ClassificationType[ClassificationType["comment"] = 1] = "comment";
+ ClassificationType[ClassificationType["identifier"] = 2] = "identifier";
+ ClassificationType[ClassificationType["keyword"] = 3] = "keyword";
+ ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral";
+ ClassificationType[ClassificationType["operator"] = 5] = "operator";
+ ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral";
+ ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
+ ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace";
+ ClassificationType[ClassificationType["text"] = 9] = "text";
+ ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation";
+ ClassificationType[ClassificationType["className"] = 11] = "className";
+ ClassificationType[ClassificationType["enumName"] = 12] = "enumName";
+ ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName";
+ ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName";
+ ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName";
+ ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName";
+ ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName";
+ ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName";
+ ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName";
+ ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName";
+ ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
+ ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute";
+ ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText";
+ ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
+ })(ClassificationType = ts.ClassificationType || (ts.ClassificationType = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.scanner = ts.createScanner(5, true);
ts.emptyArray = [];
+ var SemanticMeaning;
+ (function (SemanticMeaning) {
+ SemanticMeaning[SemanticMeaning["None"] = 0] = "None";
+ SemanticMeaning[SemanticMeaning["Value"] = 1] = "Value";
+ SemanticMeaning[SemanticMeaning["Type"] = 2] = "Type";
+ SemanticMeaning[SemanticMeaning["Namespace"] = 4] = "Namespace";
+ SemanticMeaning[SemanticMeaning["All"] = 7] = "All";
+ })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {}));
function getMeaningFromDeclaration(node) {
switch (node.kind) {
- case 144:
- case 223:
- case 174:
+ case 145:
+ case 225:
+ case 175:
+ case 148:
case 147:
- case 146:
- case 257:
- case 258:
case 260:
- case 149:
- case 148:
+ case 261:
+ case 263:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
- case 256:
+ case 186:
+ case 259:
+ case 252:
return 1;
- case 143:
- case 227:
- case 228:
- case 161:
- return 2;
- case 226:
+ case 144:
case 229:
- return 1 | 2;
case 230:
+ case 162:
+ return 2;
+ case 228:
+ case 231:
+ return 1 | 2;
+ case 232:
if (ts.isAmbientModule(node)) {
return 4 | 1;
}
@@ -52014,21 +57412,24 @@ var ts;
else {
return 4;
}
- case 238:
- case 239:
- case 234:
- case 235:
case 240:
case 241:
+ case 236:
+ case 237:
+ case 242:
+ case 243:
return 1 | 2 | 4;
- case 261:
+ case 264:
return 4 | 1;
}
return 1 | 2 | 4;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
- if (node.parent.kind === 240) {
+ if (node.kind === 264) {
+ return 1;
+ }
+ else if (node.parent.kind === 242) {
return 1 | 2 | 4;
}
else if (isInRightSideOfImport(node)) {
@@ -52050,15 +57451,15 @@ var ts;
ts.getMeaningFromLocation = getMeaningFromLocation;
function getMeaningFromRightHandSideOfImportEquals(node) {
ts.Debug.assert(node.kind === 70);
- if (node.parent.kind === 141 &&
+ if (node.parent.kind === 142 &&
node.parent.right === node &&
- node.parent.parent.kind === 234) {
+ node.parent.parent.kind === 236) {
return 1 | 2 | 4;
}
return 4;
}
function isInRightSideOfImport(node) {
- while (node.parent.kind === 141) {
+ while (node.parent.kind === 142) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
@@ -52069,27 +57470,27 @@ var ts;
function isQualifiedNameNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 141) {
- while (root.parent && root.parent.kind === 141) {
+ if (root.parent.kind === 142) {
+ while (root.parent && root.parent.kind === 142) {
root = root.parent;
}
isLastClause = root.right === node;
}
- return root.parent.kind === 157 && !isLastClause;
+ return root.parent.kind === 158 && !isLastClause;
}
function isPropertyAccessNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 177) {
- while (root.parent && root.parent.kind === 177) {
+ if (root.parent.kind === 178) {
+ while (root.parent && root.parent.kind === 178) {
root = root.parent;
}
isLastClause = root.name === node;
}
- if (!isLastClause && root.parent.kind === 199 && root.parent.parent.kind === 255) {
+ if (!isLastClause && root.parent.kind === 200 && root.parent.parent.kind === 258) {
var decl = root.parent.parent.parent;
- return (decl.kind === 226 && root.parent.parent.token === 107) ||
- (decl.kind === 227 && root.parent.parent.token === 84);
+ return (decl.kind === 228 && root.parent.parent.token === 107) ||
+ (decl.kind === 229 && root.parent.parent.token === 84);
}
return false;
}
@@ -52097,17 +57498,17 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 157 ||
- (node.parent.kind === 199 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
+ return node.parent.kind === 158 ||
+ (node.parent.kind === 200 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
(node.kind === 98 && !ts.isPartOfExpression(node)) ||
- node.kind === 167;
+ node.kind === 168;
}
function isCallExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 179);
+ return isCallOrNewExpressionTarget(node, 180);
}
ts.isCallExpressionTarget = isCallExpressionTarget;
function isNewExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 180);
+ return isCallOrNewExpressionTarget(node, 181);
}
ts.isNewExpressionTarget = isNewExpressionTarget;
function isCallOrNewExpressionTarget(node, kind) {
@@ -52120,7 +57521,7 @@ var ts;
ts.climbPastPropertyAccess = climbPastPropertyAccess;
function getTargetLabel(referenceNode, labelName) {
while (referenceNode) {
- if (referenceNode.kind === 219 && referenceNode.label.text === labelName) {
+ if (referenceNode.kind === 221 && referenceNode.label.text === labelName) {
return referenceNode.label;
}
referenceNode = referenceNode.parent;
@@ -52130,13 +57531,13 @@ var ts;
ts.getTargetLabel = getTargetLabel;
function isJumpStatementTarget(node) {
return node.kind === 70 &&
- (node.parent.kind === 215 || node.parent.kind === 214) &&
+ (node.parent.kind === 217 || node.parent.kind === 216) &&
node.parent.label === node;
}
ts.isJumpStatementTarget = isJumpStatementTarget;
function isLabelOfLabeledStatement(node) {
return node.kind === 70 &&
- node.parent.kind === 219 &&
+ node.parent.kind === 221 &&
node.parent.label === node;
}
function isLabelName(node) {
@@ -52144,15 +57545,15 @@ var ts;
}
ts.isLabelName = isLabelName;
function isRightSideOfQualifiedName(node) {
- return node.parent.kind === 141 && node.parent.right === node;
+ return node.parent.kind === 142 && node.parent.right === node;
}
ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName;
function isRightSideOfPropertyAccess(node) {
- return node && node.parent && node.parent.kind === 177 && node.parent.name === node;
+ return node && node.parent && node.parent.kind === 178 && node.parent.name === node;
}
ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess;
function isNameOfModuleDeclaration(node) {
- return node.parent.kind === 230 && node.parent.name === node;
+ return node.parent.kind === 232 && node.parent.name === node;
}
ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration;
function isNameOfFunctionDeclaration(node) {
@@ -52163,19 +57564,19 @@ var ts;
function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) {
if (node.kind === 9 || node.kind === 8) {
switch (node.parent.kind) {
+ case 148:
case 147:
- case 146:
- case 257:
case 260:
+ case 263:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 230:
+ case 153:
+ case 232:
return node.parent.name === node;
- case 178:
+ case 179:
return node.parent.argumentExpression === node;
- case 142:
+ case 143:
return true;
}
}
@@ -52219,17 +57620,17 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 261:
+ case 264:
+ case 150:
case 149:
- case 148:
- case 225:
- case 184:
- case 151:
- case 152:
- case 226:
case 227:
+ case 185:
+ case 152:
+ case 153:
+ case 228:
case 229:
- case 230:
+ case 231:
+ case 232:
return node;
}
}
@@ -52237,46 +57638,46 @@ var ts;
ts.getContainerNode = getContainerNode;
function getNodeKind(node) {
switch (node.kind) {
- case 261:
+ case 264:
return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement;
- case 230:
+ case 232:
return ts.ScriptElementKind.moduleElement;
- case 226:
- case 197:
+ case 228:
+ case 198:
return ts.ScriptElementKind.classElement;
- case 227: return ts.ScriptElementKind.interfaceElement;
- case 228: return ts.ScriptElementKind.typeElement;
- case 229: return ts.ScriptElementKind.enumElement;
- case 223:
+ case 229: return ts.ScriptElementKind.interfaceElement;
+ case 230: return ts.ScriptElementKind.typeElement;
+ case 231: return ts.ScriptElementKind.enumElement;
+ case 225:
return getKindOfVariableDeclaration(node);
- case 174:
+ case 175:
return getKindOfVariableDeclaration(ts.getRootDeclaration(node));
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
return ts.ScriptElementKind.functionElement;
- case 151: return ts.ScriptElementKind.memberGetAccessorElement;
- case 152: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 152: return ts.ScriptElementKind.memberGetAccessorElement;
+ case 153: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 150:
case 149:
- case 148:
return ts.ScriptElementKind.memberFunctionElement;
+ case 148:
case 147:
- case 146:
return ts.ScriptElementKind.memberVariableElement;
- case 155: return ts.ScriptElementKind.indexSignatureElement;
- case 154: return ts.ScriptElementKind.constructSignatureElement;
- case 153: return ts.ScriptElementKind.callSignatureElement;
- case 150: return ts.ScriptElementKind.constructorImplementationElement;
- case 143: return ts.ScriptElementKind.typeParameterElement;
- case 260: return ts.ScriptElementKind.enumMemberElement;
- case 144: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
- case 234:
- case 239:
+ case 156: return ts.ScriptElementKind.indexSignatureElement;
+ case 155: return ts.ScriptElementKind.constructSignatureElement;
+ case 154: return ts.ScriptElementKind.callSignatureElement;
+ case 151: return ts.ScriptElementKind.constructorImplementationElement;
+ case 144: return ts.ScriptElementKind.typeParameterElement;
+ case 263: return ts.ScriptElementKind.enumMemberElement;
+ case 145: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
case 236:
- case 243:
- case 237:
+ case 241:
+ case 238:
+ case 245:
+ case 239:
return ts.ScriptElementKind.alias;
- case 285:
+ case 289:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -52290,21 +57691,12 @@ var ts;
}
}
ts.getNodeKind = getNodeKind;
- function getStringLiteralTypeForNode(node, typeChecker) {
- var searchNode = node.parent.kind === 171 ? node.parent : node;
- var type = typeChecker.getTypeAtLocation(searchNode);
- if (type && type.flags & 32) {
- return type;
- }
- return undefined;
- }
- ts.getStringLiteralTypeForNode = getStringLiteralTypeForNode;
function isThis(node) {
switch (node.kind) {
case 98:
return true;
case 70:
- return ts.identifierIsThisKeyword(node) && node.parent.kind === 144;
+ return ts.identifierIsThisKeyword(node) && node.parent.kind === 145;
default:
return false;
}
@@ -52312,7 +57704,7 @@ var ts;
ts.isThis = isThis;
var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*</;
function getLineStartPositionForPosition(position, sourceFile) {
- var lineStarts = sourceFile.getLineStarts();
+ var lineStarts = ts.getLineStarts(sourceFile);
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
return lineStarts[line];
}
@@ -52348,41 +57740,41 @@ var ts;
return false;
}
switch (n.kind) {
- case 226:
- case 227:
+ case 228:
case 229:
- case 176:
- case 172:
- case 161:
- case 204:
case 231:
- case 232:
- case 238:
- case 242:
+ case 177:
+ case 173:
+ case 162:
+ case 206:
+ case 233:
+ case 234:
+ case 240:
+ case 244:
return nodeEndsWith(n, 17, sourceFile);
- case 256:
+ case 259:
return isCompletedNode(n.block, sourceFile);
- case 180:
+ case 181:
if (!n.arguments) {
return true;
}
- case 179:
- case 183:
- case 166:
+ case 180:
+ case 184:
+ case 167:
return nodeEndsWith(n, 19, sourceFile);
- case 158:
case 159:
+ case 160:
return isCompletedNode(n.type, sourceFile);
- case 150:
case 151:
case 152:
- case 225:
- case 184:
- case 149:
- case 148:
- case 154:
case 153:
+ case 227:
case 185:
+ case 150:
+ case 149:
+ case 155:
+ case 154:
+ case 186:
if (n.body) {
return isCompletedNode(n.body, sourceFile);
}
@@ -52390,65 +57782,65 @@ var ts;
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 19, sourceFile);
- case 230:
+ case 232:
return n.body && isCompletedNode(n.body, sourceFile);
- case 208:
+ case 210:
if (n.elseStatement) {
return isCompletedNode(n.elseStatement, sourceFile);
}
return isCompletedNode(n.thenStatement, sourceFile);
- case 207:
+ case 209:
return isCompletedNode(n.expression, sourceFile) ||
hasChildOfKind(n, 24);
- case 175:
- case 173:
- case 178:
- case 142:
- case 163:
+ case 176:
+ case 174:
+ case 179:
+ case 143:
+ case 164:
return nodeEndsWith(n, 21, sourceFile);
- case 155:
+ case 156:
if (n.type) {
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 21, sourceFile);
- case 253:
- case 254:
+ case 256:
+ case 257:
return false;
- case 211:
- case 212:
case 213:
- case 210:
+ case 214:
+ case 215:
+ case 212:
return isCompletedNode(n.statement, sourceFile);
- case 209:
+ case 211:
var hasWhileKeyword = findChildOfKind(n, 105, sourceFile);
if (hasWhileKeyword) {
return nodeEndsWith(n, 19, sourceFile);
}
return isCompletedNode(n.statement, sourceFile);
- case 160:
+ case 161:
return isCompletedNode(n.exprName, sourceFile);
- case 187:
- case 186:
case 188:
- case 195:
+ case 187:
+ case 189:
case 196:
+ case 197:
var unaryWordExpression = n;
return isCompletedNode(unaryWordExpression.expression, sourceFile);
- case 181:
+ case 182:
return isCompletedNode(n.template, sourceFile);
- case 194:
+ case 195:
var lastSpan = ts.lastOrUndefined(n.templateSpans);
return isCompletedNode(lastSpan, sourceFile);
- case 202:
+ case 204:
return ts.nodeIsPresent(n.literal);
- case 241:
- case 235:
+ case 243:
+ case 237:
return ts.nodeIsPresent(n.moduleSpecifier);
- case 190:
+ case 191:
return isCompletedNode(n.operand, sourceFile);
- case 192:
- return isCompletedNode(n.right, sourceFile);
case 193:
+ return isCompletedNode(n.right, sourceFile);
+ case 194:
return isCompletedNode(n.whenFalse, sourceFile);
default:
return true;
@@ -52491,7 +57883,7 @@ var ts;
ts.findChildOfKind = findChildOfKind;
function findContainingList(node) {
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
- if (c.kind === 292 && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 293 && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -52523,7 +57915,7 @@ var ts;
if (includeJsDocComment === void 0) { includeJsDocComment = false; }
var current = sourceFile;
outer: while (true) {
- if (isToken(current)) {
+ if (ts.isToken(current)) {
return current;
}
if (includeJsDocComment) {
@@ -52546,8 +57938,8 @@ var ts;
}
}
}
- for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) {
- var child = current.getChildAt(i);
+ for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
+ var child = _b[_a];
if (ts.isJSDocNode(child)) {
continue;
}
@@ -52571,7 +57963,7 @@ var ts;
}
function findTokenOnLeftOfPosition(file, position) {
var tokenAtPosition = getTokenAtPosition(file, position);
- if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
+ if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
return findPrecedingToken(position, file);
@@ -52580,7 +57972,7 @@ var ts;
function findNextToken(previousToken, parent) {
return find(parent);
function find(n) {
- if (isToken(n) && n.pos === previousToken.end) {
+ if (ts.isToken(n) && n.pos === previousToken.end) {
return n;
}
var children = n.getChildren();
@@ -52599,7 +57991,7 @@ var ts;
function findPrecedingToken(position, sourceFile, startNode) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
@@ -52607,11 +57999,11 @@ var ts;
return candidate && findRightmostToken(candidate);
}
function find(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
- for (var i = 0, len = children.length; i < len; i++) {
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
if (position < child.end && (nodeHasTokens(child) || child.kind === 10)) {
var start = child.getStart(sourceFile);
@@ -52626,7 +58018,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 261);
+ ts.Debug.assert(startNode !== undefined || n.kind === 264);
if (children.length) {
var candidate = findRightmostChildNodeWithTokens(children, children.length);
return candidate && findRightmostToken(candidate);
@@ -52671,13 +58063,13 @@ var ts;
if (token.kind === 26 && token.parent.kind === 10) {
return true;
}
- if (token.kind === 26 && token.parent.kind === 252) {
+ if (token.kind === 26 && token.parent.kind === 255) {
return true;
}
- if (token && token.kind === 17 && token.parent.kind === 252) {
+ if (token && token.kind === 17 && token.parent.kind === 255) {
return true;
}
- if (token.kind === 26 && token.parent.kind === 249) {
+ if (token.kind === 26 && token.parent.kind === 251) {
return true;
}
return false;
@@ -52694,10 +58086,10 @@ var ts;
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return predicate ?
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 ? position <= c.end : position < c.end) &&
+ (c.kind === 2 ? position <= c.end : position < c.end) &&
predicate(c); }) :
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 ? position <= c.end : position < c.end); });
+ (c.kind === 2 ? position <= c.end : position < c.end); });
}
return false;
}
@@ -52714,7 +58106,7 @@ var ts;
ts.hasDocComment = hasDocComment;
function getJsDocTagAtPosition(sourceFile, position) {
var node = ts.getTokenAtPosition(sourceFile, position);
- if (isToken(node)) {
+ if (ts.isToken(node)) {
switch (node.kind) {
case 103:
case 109:
@@ -52768,19 +58160,15 @@ var ts;
}
ts.getNodeModifiers = getNodeModifiers;
function getTypeArgumentOrTypeParameterList(node) {
- if (node.kind === 157 || node.kind === 179) {
+ if (node.kind === 158 || node.kind === 180) {
return node.typeArguments;
}
- if (ts.isFunctionLike(node) || node.kind === 226 || node.kind === 227) {
+ if (ts.isFunctionLike(node) || node.kind === 228 || node.kind === 229) {
return node.typeParameters;
}
return undefined;
}
ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList;
- function isToken(n) {
- return n.kind >= 0 && n.kind <= 140;
- }
- ts.isToken = isToken;
function isWord(kind) {
return kind === 70 || ts.isKeyword(kind);
}
@@ -52837,18 +58225,18 @@ var ts;
}
ts.compareDataObjects = compareDataObjects;
function isArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- if (node.kind === 175 ||
- node.kind === 176) {
- if (node.parent.kind === 192 &&
+ if (node.kind === 176 ||
+ node.kind === 177) {
+ if (node.parent.kind === 193 &&
node.parent.left === node &&
node.parent.operatorToken.kind === 57) {
return true;
}
- if (node.parent.kind === 213 &&
+ if (node.parent.kind === 215 &&
node.parent.initializer === node) {
return true;
}
- if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 257 ? node.parent.parent : node.parent)) {
+ if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 ? node.parent.parent : node.parent)) {
return true;
}
}
@@ -52876,10 +58264,43 @@ var ts;
}
}
ts.isInNonReferenceComment = isInNonReferenceComment;
+ function createTextSpanFromNode(node, sourceFile) {
+ return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
+ }
+ ts.createTextSpanFromNode = createTextSpanFromNode;
+ function isTypeKeyword(kind) {
+ switch (kind) {
+ case 118:
+ case 121:
+ case 129:
+ case 132:
+ case 133:
+ case 135:
+ case 136:
+ case 104:
+ return true;
+ default:
+ return false;
+ }
+ }
+ ts.isTypeKeyword = isTypeKeyword;
+ function isExternalModuleSymbol(moduleSymbol) {
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536));
+ return moduleSymbol.name.charCodeAt(0) === 34;
+ }
+ ts.isExternalModuleSymbol = isExternalModuleSymbol;
+ function nodeSeenTracker() {
+ var seen = [];
+ return function (node) {
+ var id = ts.getNodeId(node);
+ return !seen[id] && (seen[id] = true);
+ };
+ }
+ ts.nodeSeenTracker = nodeSeenTracker;
})(ts || (ts = {}));
(function (ts) {
function isFirstDeclarationOfSymbolParameter(symbol) {
- return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 144;
+ return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145;
}
ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter;
var displayPartWriter = getDisplayPartWriter();
@@ -52896,13 +58317,15 @@ var ts;
writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); },
writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); },
writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); },
+ writeProperty: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.propertyName); },
writeSymbol: writeSymbol,
writeLine: writeLine,
increaseIndent: function () { indent++; },
decreaseIndent: function () { indent--; },
clear: resetWriter,
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
function writeIndent() {
if (lineStart) {
@@ -53050,21 +58473,16 @@ var ts;
}
ts.signatureToDisplayParts = signatureToDisplayParts;
function getDeclaredName(typeChecker, symbol, location) {
- if (isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- else if (ts.isStringOrNumericLiteral(location) &&
- location.parent.kind === 142) {
+ if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143) {
return location.text;
}
var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- var name = typeChecker.symbolToString(localExportDefaultSymbol || symbol);
- return name;
+ return typeChecker.symbolToString(localExportDefaultSymbol || symbol);
}
ts.getDeclaredName = getDeclaredName;
function isImportOrExportSpecifierName(location) {
return location.parent &&
- (location.parent.kind === 239 || location.parent.kind === 243) &&
+ (location.parent.kind === 241 || location.parent.kind === 245) &&
location.parent.propertyName === location;
}
ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName;
@@ -53075,7 +58493,6 @@ var ts;
(name.charCodeAt(0) === 34 || name.charCodeAt(0) === 39)) {
return name.substring(1, length - 1);
}
- ;
return name;
}
ts.stripQuotes = stripQuotes;
@@ -53121,6 +58538,21 @@ var ts;
};
}
ts.sanitizeConfigFile = sanitizeConfigFile;
+ function getFirstNonSpaceCharacterPosition(text, position) {
+ while (ts.isWhiteSpace(text.charCodeAt(position))) {
+ position += 1;
+ }
+ return position;
+ }
+ ts.getFirstNonSpaceCharacterPosition = getFirstNonSpaceCharacterPosition;
+ function getOpenBrace(constructor, sourceFile) {
+ return constructor.body.getFirstToken(sourceFile);
+ }
+ ts.getOpenBrace = getOpenBrace;
+ function getOpenBraceOfClassLike(declaration, sourceFile) {
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ }
+ ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -53169,89 +58601,89 @@ var ts;
function spanInNode(node) {
if (node) {
switch (node.kind) {
- case 205:
+ case 207:
return spanInVariableDeclaration(node.declarationList.declarations[0]);
- case 223:
+ case 225:
+ case 148:
case 147:
- case 146:
return spanInVariableDeclaration(node);
- case 144:
+ case 145:
return spanInParameterDeclaration(node);
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 150:
- case 184:
+ case 153:
+ case 151:
case 185:
+ case 186:
return spanInFunctionDeclaration(node);
- case 204:
+ case 206:
if (ts.isFunctionBlock(node)) {
return spanInFunctionBlock(node);
}
- case 231:
+ case 233:
return spanInBlock(node);
- case 256:
+ case 259:
return spanInBlock(node.block);
- case 207:
+ case 209:
return textSpan(node.expression);
- case 216:
+ case 218:
return textSpan(node.getChildAt(0), node.expression);
- case 210:
+ case 212:
return textSpanEndingAtNextToken(node, node.expression);
- case 209:
+ case 211:
return spanInNode(node.statement);
- case 222:
+ case 224:
return textSpan(node.getChildAt(0));
- case 208:
+ case 210:
return textSpanEndingAtNextToken(node, node.expression);
- case 219:
+ case 221:
return spanInNode(node.statement);
- case 215:
- case 214:
+ case 217:
+ case 216:
return textSpan(node.getChildAt(0), node.label);
- case 211:
+ case 213:
return spanInForStatement(node);
- case 212:
+ case 214:
return textSpanEndingAtNextToken(node, node.expression);
- case 213:
+ case 215:
return spanInInitializerOfForLike(node);
- case 218:
+ case 220:
return textSpanEndingAtNextToken(node, node.expression);
- case 253:
- case 254:
+ case 256:
+ case 257:
return spanInNode(node.statements[0]);
- case 221:
+ case 223:
return spanInBlock(node.tryBlock);
- case 220:
+ case 222:
return textSpan(node, node.expression);
- case 240:
+ case 242:
return textSpan(node, node.expression);
- case 234:
+ case 236:
return textSpan(node, node.moduleReference);
- case 235:
+ case 237:
return textSpan(node, node.moduleSpecifier);
- case 241:
+ case 243:
return textSpan(node, node.moduleSpecifier);
- case 230:
+ case 232:
if (ts.getModuleInstanceState(node) !== 1) {
return undefined;
}
- case 226:
- case 229:
- case 260:
- case 174:
+ case 228:
+ case 231:
+ case 263:
+ case 175:
return textSpan(node);
- case 217:
+ case 219:
return spanInNode(node.statement);
- case 145:
+ case 146:
return spanInNodeArray(node.parent.decorators);
- case 172:
case 173:
+ case 174:
return spanInBindingPattern(node);
- case 227:
- case 228:
+ case 229:
+ case 230:
return undefined;
case 24:
case 1:
@@ -53279,20 +58711,20 @@ var ts;
case 73:
case 86:
return spanInNextNode(node);
- case 140:
+ case 141:
return spanInOfKeyword(node);
default:
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) {
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node);
}
if ((node.kind === 70 ||
- node.kind == 196 ||
- node.kind === 257 ||
- node.kind === 258) &&
+ node.kind === 197 ||
+ node.kind === 260 ||
+ node.kind === 261) &&
ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
return textSpan(node);
}
- if (node.kind === 192) {
+ if (node.kind === 193) {
var binaryExpression = node;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) {
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left);
@@ -53307,38 +58739,38 @@ var ts;
}
if (ts.isPartOfExpression(node)) {
switch (node.parent.kind) {
- case 209:
+ case 211:
return spanInPreviousNode(node);
- case 145:
+ case 146:
return spanInNode(node.parent);
- case 211:
case 213:
+ case 215:
return textSpan(node);
- case 192:
+ case 193:
if (node.parent.operatorToken.kind === 25) {
return textSpan(node);
}
break;
- case 185:
+ case 186:
if (node.parent.body === node) {
return textSpan(node);
}
break;
}
}
- if (node.parent.kind === 257 &&
+ if (node.parent.kind === 260 &&
node.parent.name === node &&
!ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {
return spanInNode(node.parent.initializer);
}
- if (node.parent.kind === 182 && node.parent.type === node) {
+ if (node.parent.kind === 183 && node.parent.type === node) {
return spanInNextNode(node.parent.type);
}
if (ts.isFunctionLike(node.parent) && node.parent.type === node) {
return spanInPreviousNode(node);
}
- if ((node.parent.kind === 223 ||
- node.parent.kind === 144)) {
+ if ((node.parent.kind === 225 ||
+ node.parent.kind === 145)) {
var paramOrVarDecl = node.parent;
if (paramOrVarDecl.initializer === node ||
paramOrVarDecl.type === node ||
@@ -53346,7 +58778,7 @@ var ts;
return spanInPreviousNode(node);
}
}
- if (node.parent.kind === 192) {
+ if (node.parent.kind === 193) {
var binaryExpression = node.parent;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) &&
(binaryExpression.right === node ||
@@ -53358,8 +58790,8 @@ var ts;
}
}
function textSpanFromVariableDeclaration(variableDeclaration) {
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] === variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 &&
+ variableDeclaration.parent.declarations[0] === variableDeclaration) {
return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
}
else {
@@ -53367,7 +58799,7 @@ var ts;
}
}
function spanInVariableDeclaration(variableDeclaration) {
- if (variableDeclaration.parent.parent.kind === 212) {
+ if (variableDeclaration.parent.parent.kind === 214) {
return spanInNode(variableDeclaration.parent.parent);
}
if (ts.isBindingPattern(variableDeclaration.name)) {
@@ -53375,11 +58807,11 @@ var ts;
}
if (variableDeclaration.initializer ||
ts.hasModifier(variableDeclaration, 1) ||
- variableDeclaration.parent.parent.kind === 213) {
+ variableDeclaration.parent.parent.kind === 215) {
return textSpanFromVariableDeclaration(variableDeclaration);
}
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] !== variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 &&
+ variableDeclaration.parent.declarations[0] !== variableDeclaration) {
return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
}
}
@@ -53407,7 +58839,7 @@ var ts;
}
function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) {
return ts.hasModifier(functionDeclaration, 1) ||
- (functionDeclaration.parent.kind === 226 && functionDeclaration.kind !== 150);
+ (functionDeclaration.parent.kind === 228 && functionDeclaration.kind !== 151);
}
function spanInFunctionDeclaration(functionDeclaration) {
if (!functionDeclaration.body) {
@@ -53427,22 +58859,22 @@ var ts;
}
function spanInBlock(block) {
switch (block.parent.kind) {
- case 230:
+ case 232:
if (ts.getModuleInstanceState(block.parent) !== 1) {
return undefined;
}
- case 210:
- case 208:
case 212:
+ case 210:
+ case 214:
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
- case 211:
case 213:
+ case 215:
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
}
return spanInNode(block.statements[0]);
}
function spanInInitializerOfForLike(forLikeStatement) {
- if (forLikeStatement.initializer.kind === 224) {
+ if (forLikeStatement.initializer.kind === 226) {
var variableDeclarationList = forLikeStatement.initializer;
if (variableDeclarationList.declarations.length > 0) {
return spanInNode(variableDeclarationList.declarations[0]);
@@ -53464,62 +58896,62 @@ var ts;
}
}
function spanInBindingPattern(bindingPattern) {
- var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 198 ? element : undefined; });
+ var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
- if (bindingPattern.parent.kind === 174) {
+ if (bindingPattern.parent.kind === 175) {
return textSpan(bindingPattern.parent);
}
return textSpanFromVariableDeclaration(bindingPattern.parent);
}
function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- ts.Debug.assert(node.kind !== 173 && node.kind !== 172);
- var elements = node.kind === 175 ?
+ ts.Debug.assert(node.kind !== 174 && node.kind !== 173);
+ var elements = node.kind === 176 ?
node.elements :
node.properties;
- var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 198 ? element : undefined; });
+ var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
- return textSpan(node.parent.kind === 192 ? node.parent : node);
+ return textSpan(node.parent.kind === 193 ? node.parent : node);
}
function spanInOpenBraceToken(node) {
switch (node.parent.kind) {
- case 229:
+ case 231:
var enumDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile));
- case 226:
+ case 228:
var classDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile));
- case 232:
+ case 234:
return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]);
}
return spanInNode(node.parent);
}
function spanInCloseBraceToken(node) {
switch (node.parent.kind) {
- case 231:
+ case 233:
if (ts.getModuleInstanceState(node.parent.parent) !== 1) {
return undefined;
}
- case 229:
- case 226:
+ case 231:
+ case 228:
return textSpan(node);
- case 204:
+ case 206:
if (ts.isFunctionBlock(node.parent)) {
return textSpan(node);
}
- case 256:
+ case 259:
return spanInNode(ts.lastOrUndefined(node.parent.statements));
- case 232:
+ case 234:
var caseBlock = node.parent;
var lastClause = ts.lastOrUndefined(caseBlock.clauses);
if (lastClause) {
return spanInNode(ts.lastOrUndefined(lastClause.statements));
}
return undefined;
- case 172:
+ case 173:
var bindingPattern = node.parent;
return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
default:
@@ -53532,7 +58964,7 @@ var ts;
}
function spanInCloseBracketToken(node) {
switch (node.parent.kind) {
- case 173:
+ case 174:
var bindingPattern = node.parent;
return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
default:
@@ -53544,33 +58976,33 @@ var ts;
}
}
function spanInOpenParenToken(node) {
- if (node.parent.kind === 209 ||
- node.parent.kind === 179 ||
- node.parent.kind === 180) {
+ if (node.parent.kind === 211 ||
+ node.parent.kind === 180 ||
+ node.parent.kind === 181) {
return spanInPreviousNode(node);
}
- if (node.parent.kind === 183) {
+ if (node.parent.kind === 184) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInCloseParenToken(node) {
switch (node.parent.kind) {
- case 184:
- case 225:
case 185:
+ case 227:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 150:
- case 210:
- case 209:
+ case 153:
+ case 151:
+ case 212:
case 211:
case 213:
- case 179:
+ case 215:
case 180:
- case 183:
+ case 181:
+ case 184:
return spanInPreviousNode(node);
default:
return spanInNode(node.parent);
@@ -53578,26 +59010,26 @@ var ts;
}
function spanInColonToken(node) {
if (ts.isFunctionLike(node.parent) ||
- node.parent.kind === 257 ||
- node.parent.kind === 144) {
+ node.parent.kind === 260 ||
+ node.parent.kind === 145) {
return spanInPreviousNode(node);
}
return spanInNode(node.parent);
}
function spanInGreaterThanOrLessThanToken(node) {
- if (node.parent.kind === 182) {
+ if (node.parent.kind === 183) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInWhileKeyword(node) {
- if (node.parent.kind === 209) {
+ if (node.parent.kind === 211) {
return textSpanEndingAtNextToken(node, node.parent.expression);
}
return spanInNode(node.parent);
}
function spanInOfKeyword(node) {
- if (node.parent.kind === 213) {
+ if (node.parent.kind === 215) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
@@ -53628,7 +59060,7 @@ var ts;
function canFollow(keyword1, keyword2) {
if (ts.isAccessibilityModifier(keyword1)) {
if (keyword2 === 124 ||
- keyword2 === 133 ||
+ keyword2 === 134 ||
keyword2 === 122 ||
keyword2 === 114) {
return true;
@@ -53641,9 +59073,9 @@ var ts;
var entries = [];
var dense = classifications.spans;
var lastEnd = 0;
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_4 = dense[i + 1];
+ var length_5 = dense[i + 1];
var type = dense[i + 2];
if (lastEnd >= 0) {
var whitespaceLength_1 = start - lastEnd;
@@ -53651,8 +59083,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_4, classification: convertClassification(type) });
- lastEnd = start + length_4;
+ entries.push({ length: length_5, classification: convertClassification(type) });
+ lastEnd = start + length_5;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -53744,10 +59176,10 @@ var ts;
angleBracketStack--;
}
else if (token === 118 ||
- token === 134 ||
+ token === 135 ||
token === 132 ||
token === 121 ||
- token === 135) {
+ token === 136) {
if (angleBracketStack > 0 && !syntacticClassifierAbsent) {
token = 70;
}
@@ -53902,7 +59334,7 @@ var ts;
}
}
function isKeyword(token) {
- return token >= 71 && token <= 140;
+ return token >= 71 && token <= 141;
}
function classFromKind(token) {
if (isKeyword(token)) {
@@ -53948,10 +59380,10 @@ var ts;
ts.getSemanticClassifications = getSemanticClassifications;
function checkForClassificationCancellation(cancellationToken, kind) {
switch (kind) {
- case 230:
- case 226:
+ case 232:
+ case 228:
+ case 229:
case 227:
- case 225:
cancellationToken.throwIfCancellationRequested();
}
}
@@ -53995,7 +59427,7 @@ var ts;
return undefined;
function hasValueSideModule(symbol) {
return ts.forEach(symbol.declarations, function (declaration) {
- return declaration.kind === 230 &&
+ return declaration.kind === 232 &&
ts.getModuleInstanceState(declaration) === 1;
});
}
@@ -54006,7 +59438,7 @@ var ts;
checkForClassificationCancellation(cancellationToken, kind);
if (kind === 70 && !ts.nodeIsMissing(node)) {
var identifier = node;
- if (classifiableNames[identifier.text]) {
+ if (classifiableNames.get(identifier.text)) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
var type = classifySymbol(symbol, ts.getMeaningFromLocation(node));
@@ -54052,7 +59484,7 @@ var ts;
ts.Debug.assert(classifications.spans.length % 3 === 0);
var dense = classifications.spans;
var result = [];
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
result.push({
textSpan: ts.createTextSpan(dense[i], dense[i + 1]),
classificationType: getClassificationTypeName(dense[i + 2])
@@ -54136,16 +59568,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18);
pos = tag.tagName.end;
switch (tag.kind) {
- case 281:
+ case 285:
processJSDocParameterTag(tag);
break;
- case 284:
+ case 288:
processJSDocTemplateTag(tag);
break;
- case 283:
+ case 287:
processElement(tag.typeExpression);
break;
- case 282:
+ case 286:
processElement(tag.typeExpression);
break;
}
@@ -54226,22 +59658,22 @@ var ts;
}
function tryClassifyJsxElementName(token) {
switch (token.parent && token.parent.kind) {
- case 248:
+ case 250:
if (token.parent.tagName === token) {
return 19;
}
break;
- case 249:
+ case 251:
if (token.parent.tagName === token) {
return 20;
}
break;
- case 247:
+ case 249:
if (token.parent.tagName === token) {
return 21;
}
break;
- case 250:
+ case 252:
if (token.parent.name === token) {
return 22;
}
@@ -54261,17 +59693,17 @@ var ts;
if (ts.isPunctuation(tokenKind)) {
if (token) {
if (tokenKind === 57) {
- if (token.parent.kind === 223 ||
- token.parent.kind === 147 ||
- token.parent.kind === 144 ||
- token.parent.kind === 250) {
+ if (token.parent.kind === 225 ||
+ token.parent.kind === 148 ||
+ token.parent.kind === 145 ||
+ token.parent.kind === 252) {
return 5;
}
}
- if (token.parent.kind === 192 ||
- token.parent.kind === 190 ||
+ if (token.parent.kind === 193 ||
token.parent.kind === 191 ||
- token.parent.kind === 193) {
+ token.parent.kind === 192 ||
+ token.parent.kind === 194) {
return 5;
}
}
@@ -54281,7 +59713,7 @@ var ts;
return 4;
}
else if (tokenKind === 9) {
- return token.parent.kind === 250 ? 24 : 6;
+ return token.parent.kind === 252 ? 24 : 6;
}
else if (tokenKind === 11) {
return 6;
@@ -54295,32 +59727,32 @@ var ts;
else if (tokenKind === 70) {
if (token) {
switch (token.parent.kind) {
- case 226:
+ case 228:
if (token.parent.name === token) {
return 11;
}
return;
- case 143:
+ case 144:
if (token.parent.name === token) {
return 15;
}
return;
- case 227:
+ case 229:
if (token.parent.name === token) {
return 13;
}
return;
- case 229:
+ case 231:
if (token.parent.name === token) {
return 12;
}
return;
- case 230:
+ case 232:
if (token.parent.name === token) {
return 14;
}
return;
- case 144:
+ case 145:
if (token.parent.name === token) {
return ts.isThisIdentifier(token) ? 3 : 17;
}
@@ -54336,9 +59768,8 @@ var ts;
}
if (ts.decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) {
checkForClassificationCancellation(cancellationToken, element.kind);
- var children = element.getChildren(sourceFile);
- for (var i = 0, n = children.length; i < n; i++) {
- var child = children[i];
+ for (var _i = 0, _a = element.getChildren(sourceFile); _i < _a.length; _i++) {
+ var child = _a[_i];
if (!tryClassifyNode(child)) {
processElement(child);
}
@@ -54352,208 +59783,25 @@ var ts;
(function (ts) {
var Completions;
(function (Completions) {
- function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
- if (ts.isInReferenceComment(sourceFile, position)) {
- return getTripleSlashReferenceCompletion(sourceFile, position);
- }
- if (ts.isInString(sourceFile, position)) {
- return getStringLiteralCompletionEntries(sourceFile, position);
- }
- var completionData = getCompletionData(typeChecker, log, sourceFile, position);
- if (!completionData) {
- return undefined;
- }
- var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isJsDocTagName = completionData.isJsDocTagName;
- if (isJsDocTagName) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getAllJsDocCompletionEntries() };
- }
- var entries = [];
- if (ts.isSourceFileJavaScript(sourceFile)) {
- var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, true);
- ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames));
- }
- else {
- if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 &&
- location.parent && location.parent.kind === 249) {
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
- return undefined;
- }
- }
- getCompletionEntriesFromSymbols(symbols, entries, location, true);
- }
- if (!isMemberCompletion && !isJsDocTagName) {
- ts.addRange(entries, keywordCompletions);
- }
- return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
- function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames) {
- var entries = [];
- var nameTable = ts.getNameTable(sourceFile);
- for (var name_44 in nameTable) {
- if (nameTable[name_44] === position) {
- continue;
- }
- if (!uniqueNames[name_44]) {
- uniqueNames[name_44] = name_44;
- var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name_44), compilerOptions.target, true);
- if (displayName) {
- var entry = {
- name: displayName,
- kind: ts.ScriptElementKind.warning,
- kindModifiers: "",
- sortText: "1"
- };
- entries.push(entry);
- }
- }
- }
- return entries;
- }
- function createCompletionEntry(symbol, location, performCharacterChecks) {
- var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, compilerOptions.target, performCharacterChecks, location);
- if (!displayName) {
- return undefined;
- }
- return {
- name: displayName,
- kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- sortText: "0",
- };
- }
- function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks) {
- var start = ts.timestamp();
- var uniqueNames = ts.createMap();
- if (symbols) {
- for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
- var symbol = symbols_4[_i];
- var entry = createCompletionEntry(symbol, location, performCharacterChecks);
- if (entry) {
- var id = ts.escapeIdentifier(entry.name);
- if (!uniqueNames[id]) {
- entries.push(entry);
- uniqueNames[id] = id;
- }
- }
- }
- }
- log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
- return uniqueNames;
- }
- function getStringLiteralCompletionEntries(sourceFile, position) {
- var node = ts.findPrecedingToken(position, sourceFile);
- if (!node || node.kind !== 9) {
- return undefined;
- }
- if (node.parent.kind === 257 &&
- node.parent.parent.kind === 176 &&
- node.parent.name === node) {
- return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent);
- }
- else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
- return getStringLiteralCompletionEntriesFromElementAccess(node.parent);
- }
- else if (node.parent.kind === 235 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
- return getStringLiteralCompletionEntriesFromModuleNames(node);
- }
- else {
- var argumentInfo = ts.SignatureHelp.getContainingArgumentInfo(node, position, sourceFile);
- if (argumentInfo) {
- return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo);
- }
- return getStringLiteralCompletionEntriesFromContextualType(node);
- }
- }
- function getStringLiteralCompletionEntriesFromPropertyAssignment(element) {
- var type = typeChecker.getContextualType(element.parent);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- }
- function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo) {
- var candidates = [];
- var entries = [];
- typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
- for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
- var candidate = candidates_3[_i];
- if (candidate.parameters.length > argumentInfo.argumentIndex) {
- var parameter = candidate.parameters[argumentInfo.argumentIndex];
- addStringLiteralCompletionsFromType(typeChecker.getTypeAtLocation(parameter.valueDeclaration), entries);
- }
- }
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromElementAccess(node) {
- var type = typeChecker.getTypeAtLocation(node.expression);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromContextualType(node) {
- var type = typeChecker.getContextualType(node);
- if (type) {
- var entries_2 = [];
- addStringLiteralCompletionsFromType(type, entries_2);
- if (entries_2.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
- }
- }
- return undefined;
- }
- function addStringLiteralCompletionsFromType(type, result) {
- if (!type) {
- return;
- }
- if (type.flags & 65536) {
- ts.forEach(type.types, function (t) { return addStringLiteralCompletionsFromType(t, result); });
- }
- else {
- if (type.flags & 32) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
- }
- }
- }
- function getStringLiteralCompletionEntriesFromModuleNames(node) {
+ var PathCompletions;
+ (function (PathCompletions) {
+ function getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker) {
var literalValue = ts.normalizeSlashes(node.text);
var scriptPath = node.getSourceFile().path;
var scriptDirectory = ts.getDirectoryPath(scriptPath);
var span = getDirectoryFragmentTextSpan(node.text, node.getStart() + 1);
var entries;
if (isPathRelativeToScript(literalValue) || ts.isRootedDiskPath(literalValue)) {
+ var extensions = ts.getSupportedExtensions(compilerOptions);
if (compilerOptions.rootDirs) {
- entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, extensions, false, span, compilerOptions, host, scriptPath);
}
else {
- entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensions, false, span, host, scriptPath);
}
}
else {
- entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span);
+ entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span, compilerOptions, host, typeChecker);
}
return {
isGlobalCompletion: false,
@@ -54562,6 +59810,7 @@ var ts;
entries: entries
};
}
+ PathCompletions.getStringLiteralCompletionEntriesFromModuleNames = getStringLiteralCompletionEntriesFromModuleNames;
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase) {
rootDirs = ts.map(rootDirs, function (rootDirectory) { return ts.normalizePath(ts.isRootedDiskPath(rootDirectory) ? rootDirectory : ts.combinePaths(basePath, rootDirectory)); });
var relativeDirectory;
@@ -54574,18 +59823,18 @@ var ts;
}
return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
}
- function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, exclude) {
+ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, compilerOptions, host, exclude) {
var basePath = compilerOptions.project || host.getCurrentDirectory();
var ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
var baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase);
var result = [];
for (var _i = 0, baseDirectories_1 = baseDirectories; _i < baseDirectories_1.length; _i++) {
var baseDirectory = baseDirectories_1[_i];
- getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, exclude, result);
+ getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, host, exclude, result);
}
return result;
}
- function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, exclude, result) {
+ function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, host, exclude, result) {
if (result === void 0) { result = []; }
if (fragment === undefined) {
fragment = "";
@@ -54610,13 +59859,13 @@ var ts;
continue;
}
var foundFileName = includeExtensions ? ts.getBaseFileName(filePath) : ts.removeFileExtension(ts.getBaseFileName(filePath));
- if (!foundFiles[foundFileName]) {
- foundFiles[foundFileName] = true;
+ if (!foundFiles.get(foundFileName)) {
+ foundFiles.set(foundFileName, true);
}
}
- for (var foundFile in foundFiles) {
+ ts.forEachKey(foundFiles, function (foundFile) {
result.push(createCompletionEntryForModule(foundFile, ts.ScriptElementKind.scriptElement, span));
- }
+ });
}
var directories = tryGetDirectories(host, baseDirectory);
if (directories) {
@@ -54629,14 +59878,14 @@ var ts;
}
return result;
}
- function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span) {
+ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span, compilerOptions, host, typeChecker) {
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths;
var result;
if (baseUrl) {
var fileExtensions = ts.getSupportedExtensions(compilerOptions);
var projectDir = compilerOptions.project || host.getCurrentDirectory();
var absolute = ts.isRootedDiskPath(baseUrl) ? baseUrl : ts.combinePaths(projectDir, baseUrl);
- result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, false, span);
+ result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, false, span, host);
if (paths) {
for (var path in paths) {
if (paths.hasOwnProperty(path)) {
@@ -54644,7 +59893,7 @@ var ts;
if (paths[path]) {
for (var _i = 0, _a = paths[path]; _i < _a.length; _i++) {
var pattern = _a[_i];
- for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions); _b < _c.length; _b++) {
+ for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host); _b < _c.length; _b++) {
var match = _c[_b];
result.push(createCompletionEntryForModule(match, ts.ScriptElementKind.externalModuleName, span));
}
@@ -54665,13 +59914,13 @@ var ts;
result = [];
}
getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, span, result);
- for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions); _d < _e.length; _d++) {
+ for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions, typeChecker, host); _d < _e.length; _d++) {
var moduleName = _e[_d];
result.push(createCompletionEntryForModule(moduleName, ts.ScriptElementKind.externalModuleName, span));
}
return result;
}
- function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions) {
+ function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host) {
if (host.readDirectory) {
var parsed = ts.hasZeroOrOneAsteriskCharacter(pattern) ? ts.tryParsePattern(pattern) : undefined;
if (parsed) {
@@ -54694,8 +59943,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_5 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_5)));
+ var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
}
return result;
}
@@ -54703,7 +59952,7 @@ var ts;
}
return undefined;
}
- function enumeratePotentialNonRelativeModules(fragment, scriptPath, options) {
+ function enumeratePotentialNonRelativeModules(fragment, scriptPath, options, typeChecker, host) {
var isNestedModule = fragment.indexOf(ts.directorySeparator) !== -1;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
var ambientModules = ts.map(typeChecker.getAmbientModules(), function (sym) { return ts.stripQuotes(sym.name); });
@@ -54738,7 +59987,7 @@ var ts;
}
return ts.deduplicate(nonRelativeModules);
}
- function getTripleSlashReferenceCompletion(sourceFile, position) {
+ function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
var token = ts.getTokenAtPosition(sourceFile, position);
if (!token) {
return undefined;
@@ -54766,7 +60015,7 @@ var ts;
var scriptPath = ts.getDirectoryPath(sourceFile.path);
if (kind === "path") {
var span_10 = getDirectoryFragmentTextSpan(toComplete, range.pos + prefix.length);
- completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), true, span_10, sourceFile.path);
+ completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), true, span_10, host, sourceFile.path);
}
else {
var span_11 = { start: range.pos + prefix.length, length: match[0].length - prefix.length };
@@ -54775,6 +60024,7 @@ var ts;
}
return completionInfo;
}
+ PathCompletions.getTripleSlashReferenceCompletion = getTripleSlashReferenceCompletion;
function getCompletionEntriesFromTypings(host, options, scriptPath, span, result) {
if (result === void 0) { result = []; }
if (options.types) {
@@ -54797,7 +60047,7 @@ var ts;
}
}
if (host.getDirectories) {
- for (var _c = 0, _d = findPackageJsons(scriptPath); _c < _d.length; _c++) {
+ for (var _c = 0, _d = findPackageJsons(scriptPath, host); _c < _d.length; _c++) {
var packageJson = _d[_c];
var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types");
getCompletionEntriesFromDirectories(host, typesDir, span, result);
@@ -54817,7 +60067,7 @@ var ts;
}
}
}
- function findPackageJsons(currentDir) {
+ function findPackageJsons(currentDir, host) {
var paths = [];
var currentConfigPath;
while (true) {
@@ -54825,11 +60075,11 @@ var ts;
if (currentConfigPath) {
paths.push(currentConfigPath);
currentDir = ts.getDirectoryPath(currentConfigPath);
- var parent_13 = ts.getDirectoryPath(currentDir);
- if (currentDir === parent_13) {
+ var parent = ts.getDirectoryPath(currentDir);
+ if (currentDir === parent) {
break;
}
- currentDir = parent_13;
+ currentDir = parent;
}
else {
break;
@@ -54840,7 +60090,7 @@ var ts;
function enumerateNodeModulesVisibleToScript(host, scriptPath) {
var result = [];
if (host.readFile && host.fileExists) {
- for (var _i = 0, _a = findPackageJsons(scriptPath); _i < _a.length; _i++) {
+ for (var _i = 0, _a = findPackageJsons(scriptPath, host); _i < _a.length; _i++) {
var packageJson = _a[_i];
var contents = tryReadingPackageJson(packageJson);
if (!contents) {
@@ -54901,21 +60151,256 @@ var ts;
function normalizeAndPreserveTrailingSlash(path) {
return ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(ts.normalizePath(path)) : ts.normalizePath(path);
}
+ var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
+ var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
+ function tryGetDirectories(host, directoryName) {
+ return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
+ }
+ function tryReadDirectory(host, path, extensions, exclude, include) {
+ return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
+ }
+ function tryReadFile(host, path) {
+ return tryIOAndConsumeErrors(host, host.readFile, path);
+ }
+ function tryFileExists(host, path) {
+ return tryIOAndConsumeErrors(host, host.fileExists, path);
+ }
+ function tryDirectoryExists(host, path) {
+ try {
+ return ts.directoryProbablyExists(path, host);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ function tryIOAndConsumeErrors(host, toApply) {
+ var args = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ args[_i - 2] = arguments[_i];
+ }
+ try {
+ return toApply && toApply.apply(host, args);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ })(PathCompletions = Completions.PathCompletions || (Completions.PathCompletions = {}));
+ })(Completions = ts.Completions || (ts.Completions = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var Completions;
+ (function (Completions) {
+ function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
+ if (ts.isInReferenceComment(sourceFile, position)) {
+ return Completions.PathCompletions.getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host);
+ }
+ if (ts.isInString(sourceFile, position)) {
+ return getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log);
+ }
+ var completionData = getCompletionData(typeChecker, log, sourceFile, position);
+ if (!completionData) {
+ return undefined;
+ }
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, requestJsDocTagName = completionData.requestJsDocTagName, requestJsDocTag = completionData.requestJsDocTag;
+ if (requestJsDocTagName) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagNameCompletions() };
+ }
+ if (requestJsDocTag) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ }
+ var entries = [];
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
+ ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames, compilerOptions.target));
+ }
+ else {
+ if (!symbols || symbols.length === 0) {
+ if (sourceFile.languageVariant === 1 &&
+ location.parent && location.parent.kind === 251) {
+ var tagName = location.parent.parent.openingElement.tagName;
+ entries.push({
+ name: tagName.text,
+ kind: undefined,
+ kindModifiers: undefined,
+ sortText: "0",
+ });
+ }
+ else {
+ return undefined;
+ }
+ }
+ getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
+ }
+ if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ ts.addRange(entries, keywordCompletions);
+ }
+ return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
}
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
+ function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames, target) {
+ var entries = [];
+ var nameTable = ts.getNameTable(sourceFile);
+ nameTable.forEach(function (pos, name) {
+ if (pos === position) {
+ return;
+ }
+ if (!uniqueNames.get(name)) {
+ uniqueNames.set(name, name);
+ var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name), target, true);
+ if (displayName) {
+ var entry = {
+ name: displayName,
+ kind: ts.ScriptElementKind.warning,
+ kindModifiers: "",
+ sortText: "1"
+ };
+ entries.push(entry);
+ }
+ }
+ });
+ return entries;
+ }
+ function createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target) {
+ var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location);
+ if (!displayName) {
+ return undefined;
+ }
+ return {
+ name: displayName,
+ kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
+ kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
+ sortText: "0",
+ };
+ }
+ function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks, typeChecker, target, log) {
+ var start = ts.timestamp();
+ var uniqueNames = ts.createMap();
+ if (symbols) {
+ for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
+ var symbol = symbols_4[_i];
+ var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
+ if (entry) {
+ var id = ts.escapeIdentifier(entry.name);
+ if (!uniqueNames.get(id)) {
+ entries.push(entry);
+ uniqueNames.set(id, id);
+ }
+ }
+ }
+ }
+ log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
+ return uniqueNames;
+ }
+ function getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log) {
+ var node = ts.findPrecedingToken(position, sourceFile);
+ if (!node || node.kind !== 9) {
+ return undefined;
+ }
+ if (node.parent.kind === 260 &&
+ node.parent.parent.kind === 177 &&
+ node.parent.name === node) {
+ return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
+ return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (node.parent.kind === 237 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
+ return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker);
+ }
+ else if (isEqualityExpression(node.parent)) {
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.left === node ? node.parent.right : node.parent.left), typeChecker);
+ }
+ else if (ts.isCaseOrDefaultClause(node.parent)) {
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.parent.parent.expression), typeChecker);
+ }
+ else {
+ var argumentInfo = ts.SignatureHelp.getImmediatelyContainingArgumentInfo(node, position, sourceFile);
+ if (argumentInfo) {
+ return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker);
+ }
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getContextualType(node), typeChecker);
+ }
+ }
+ function getStringLiteralCompletionEntriesFromPropertyAssignment(element, typeChecker, target, log) {
+ var type = typeChecker.getContextualType(element.parent);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ }
+ function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
+ var candidates = [];
+ var entries = [];
+ typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
+ for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
+ var candidate = candidates_3[_i];
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker);
+ }
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromElementAccess(node, typeChecker, target, log) {
+ var type = typeChecker.getTypeAtLocation(node.expression);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromType(type, typeChecker) {
+ if (type) {
+ var entries = [];
+ addStringLiteralCompletionsFromType(type, entries, typeChecker);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ if (type && type.flags & 16384) {
+ type = typeChecker.getApparentType(type);
+ }
+ if (!type) {
+ return;
+ }
+ if (type.flags & 65536) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ addStringLiteralCompletionsFromType(t, result, typeChecker);
+ }
+ }
+ else if (type.flags & 32) {
+ result.push({
+ name: type.text,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
+ }
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_3 = completionData.location;
- var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_3) === entryName ? s : undefined; });
+ var symbols = completionData.symbols, location_1 = completionData.location;
+ var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_1) === entryName ? s : undefined; });
if (symbol) {
- var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_3, location_3, 7), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind;
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_1, location_1, 7), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind, tags = _a.tags;
return {
name: entryName,
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
kind: symbolKind,
displayParts: displayParts,
- documentation: documentation
+ documentation: documentation,
+ tags: tags
};
}
}
@@ -54926,7 +60411,8 @@ var ts;
kind: ts.ScriptElementKind.keyword,
kindModifiers: ts.ScriptElementKindModifier.none,
displayParts: [ts.displayPart(entryName, ts.SymbolDisplayPartKind.keyword)],
- documentation: undefined
+ documentation: undefined,
+ tags: undefined
};
}
return undefined;
@@ -54935,15 +60421,16 @@ var ts;
function getCompletionEntrySymbol(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_4 = completionData.location;
- return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_4) === entryName ? s : undefined; });
+ var symbols = completionData.symbols, location_2 = completionData.location;
+ return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_2) === entryName ? s : undefined; });
}
return undefined;
}
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var isJsDocTagName = false;
+ var requestJsDocTagName = false;
+ var requestJsDocTag = false;
var start = ts.timestamp();
var currentToken = ts.getTokenAtPosition(sourceFile, position);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
@@ -54951,19 +60438,25 @@ var ts;
var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
if (insideComment) {
- if (ts.hasDocComment(sourceFile, position) && sourceFile.text.charCodeAt(position - 1) === 64) {
- isJsDocTagName = true;
+ if (ts.hasDocComment(sourceFile, position)) {
+ if (sourceFile.text.charCodeAt(position - 1) === 64) {
+ requestJsDocTagName = true;
+ }
+ else {
+ var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
+ requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ }
}
var insideJsDocTagExpression = false;
var tag = ts.getJsDocTagAtPosition(sourceFile, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- isJsDocTagName = true;
+ requestJsDocTagName = true;
}
switch (tag.kind) {
- case 283:
- case 281:
- case 282:
+ case 287:
+ case 285:
+ case 286:
var tagWithExpression = tag;
if (tagWithExpression.typeExpression) {
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
@@ -54971,8 +60464,8 @@ var ts;
break;
}
}
- if (isJsDocTagName) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, isJsDocTagName: isJsDocTagName };
+ if (requestJsDocTagName || requestJsDocTag) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
}
if (!insideJsDocTagExpression) {
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
@@ -54998,13 +60491,13 @@ var ts;
log("Returning an empty list because completion was requested in an invalid position.");
return undefined;
}
- var parent_14 = contextToken.parent, kind = contextToken.kind;
- if (kind === 22) {
- if (parent_14.kind === 177) {
+ var parent = contextToken.parent;
+ if (contextToken.kind === 22) {
+ if (parent.kind === 178) {
node = contextToken.parent.expression;
isRightOfDot = true;
}
- else if (parent_14.kind === 141) {
+ else if (parent.kind === 142) {
node = contextToken.parent.left;
isRightOfDot = true;
}
@@ -55013,13 +60506,29 @@ var ts;
}
}
else if (sourceFile.languageVariant === 1) {
- if (kind === 26) {
- isRightOfOpenTag = true;
- location = contextToken;
+ if (parent && parent.kind === 178) {
+ contextToken = parent;
+ parent = parent.parent;
}
- else if (kind === 40 && contextToken.parent.kind === 249) {
- isStartingCloseTag = true;
- location = contextToken;
+ switch (parent.kind) {
+ case 251:
+ if (contextToken.kind === 40) {
+ isStartingCloseTag = true;
+ location = contextToken;
+ }
+ break;
+ case 193:
+ if (!(parent.left.flags & 32768)) {
+ break;
+ }
+ case 249:
+ case 248:
+ case 250:
+ if (contextToken.kind === 26) {
+ isRightOfOpenTag = true;
+ location = contextToken;
+ }
+ break;
}
}
}
@@ -55057,12 +60566,12 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), isJsDocTagName: isJsDocTagName };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
function getTypeScriptMemberSymbols() {
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
- if (node.kind === 70 || node.kind === 141 || node.kind === 177) {
+ if (node.kind === 70 || node.kind === 142 || node.kind === 178) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol && symbol.flags & 8388608) {
symbol = typeChecker.getAliasedSymbol(symbol);
@@ -55108,10 +60617,10 @@ var ts;
}
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
- if ((jsxContainer.kind === 247) || (jsxContainer.kind === 248)) {
- attrsType = typeChecker.getJsxElementAttributesType(jsxContainer);
+ if ((jsxContainer.kind === 249) || (jsxContainer.kind === 250)) {
+ attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer);
if (attrsType) {
- symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes);
+ symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties);
isMemberCompletion = true;
isNewIdentifierLocation = false;
return true;
@@ -55129,9 +60638,9 @@ var ts;
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
if (scopeNode) {
isGlobalCompletion =
- scopeNode.kind === 261 ||
- scopeNode.kind === 194 ||
- scopeNode.kind === 252 ||
+ scopeNode.kind === 264 ||
+ scopeNode.kind === 195 ||
+ scopeNode.kind === 255 ||
ts.isStatement(scopeNode);
}
var symbolMeanings = 793064 | 107455 | 1920 | 8388608;
@@ -55159,11 +60668,11 @@ var ts;
return true;
}
if (contextToken.kind === 28 && contextToken.parent) {
- if (contextToken.parent.kind === 248) {
+ if (contextToken.parent.kind === 250) {
return true;
}
- if (contextToken.parent.kind === 249 || contextToken.parent.kind === 247) {
- return contextToken.parent.parent && contextToken.parent.parent.kind === 246;
+ if (contextToken.parent.kind === 251 || contextToken.parent.kind === 249) {
+ return contextToken.parent.parent && contextToken.parent.parent.kind === 248;
}
}
return false;
@@ -55173,40 +60682,40 @@ var ts;
var containingNodeKind = previousToken.parent.kind;
switch (previousToken.kind) {
case 25:
- return containingNodeKind === 179
- || containingNodeKind === 150
- || containingNodeKind === 180
- || containingNodeKind === 175
- || containingNodeKind === 192
- || containingNodeKind === 158;
+ return containingNodeKind === 180
+ || containingNodeKind === 151
+ || containingNodeKind === 181
+ || containingNodeKind === 176
+ || containingNodeKind === 193
+ || containingNodeKind === 159;
case 18:
- return containingNodeKind === 179
- || containingNodeKind === 150
- || containingNodeKind === 180
- || containingNodeKind === 183
- || containingNodeKind === 166;
+ return containingNodeKind === 180
+ || containingNodeKind === 151
+ || containingNodeKind === 181
+ || containingNodeKind === 184
+ || containingNodeKind === 167;
case 20:
- return containingNodeKind === 175
- || containingNodeKind === 155
- || containingNodeKind === 142;
+ return containingNodeKind === 176
+ || containingNodeKind === 156
+ || containingNodeKind === 143;
case 127:
case 128:
return true;
case 22:
- return containingNodeKind === 230;
+ return containingNodeKind === 232;
case 16:
- return containingNodeKind === 226;
+ return containingNodeKind === 228;
case 57:
- return containingNodeKind === 223
- || containingNodeKind === 192;
+ return containingNodeKind === 225
+ || containingNodeKind === 193;
case 13:
- return containingNodeKind === 194;
+ return containingNodeKind === 195;
case 14:
- return containingNodeKind === 202;
+ return containingNodeKind === 204;
case 113:
case 111:
case 112:
- return containingNodeKind === 147;
+ return containingNodeKind === 148;
}
switch (previousToken.getText()) {
case "public":
@@ -55237,22 +60746,22 @@ var ts;
isMemberCompletion = true;
var typeForObject;
var existingMembers;
- if (objectLikeContainer.kind === 176) {
+ if (objectLikeContainer.kind === 177) {
isNewIdentifierLocation = true;
typeForObject = typeChecker.getContextualType(objectLikeContainer);
typeForObject = typeForObject && typeForObject.getNonNullableType();
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 172) {
+ else if (objectLikeContainer.kind === 173) {
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
if (ts.isVariableLike(rootDeclaration)) {
var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 144) {
+ if (!canGetType && rootDeclaration.kind === 145) {
if (ts.isExpression(rootDeclaration.parent)) {
canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- else if (rootDeclaration.parent.kind === 149 || rootDeclaration.parent.kind === 152) {
+ else if (rootDeclaration.parent.kind === 150 || rootDeclaration.parent.kind === 153) {
canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
@@ -55278,9 +60787,9 @@ var ts;
return true;
}
function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) {
- var declarationKind = namedImportsOrExports.kind === 238 ?
- 235 :
- 241;
+ var declarationKind = namedImportsOrExports.kind === 240 ?
+ 237 :
+ 243;
var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind);
var moduleSpecifier = importOrExportDeclaration.moduleSpecifier;
if (!moduleSpecifier) {
@@ -55288,12 +60797,13 @@ var ts;
}
isMemberCompletion = true;
isNewIdentifierLocation = false;
- var exports;
- var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importOrExportDeclaration.moduleSpecifier);
- if (moduleSpecifierSymbol) {
- exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol);
+ var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);
+ if (!moduleSpecifierSymbol) {
+ symbols = ts.emptyArray;
+ return true;
}
- symbols = exports ? filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements) : ts.emptyArray;
+ var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
+ symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
function tryGetObjectLikeCompletionContainer(contextToken) {
@@ -55301,9 +60811,9 @@ var ts;
switch (contextToken.kind) {
case 16:
case 25:
- var parent_15 = contextToken.parent;
- if (parent_15 && (parent_15.kind === 176 || parent_15.kind === 172)) {
- return parent_15;
+ var parent = contextToken.parent;
+ if (parent && (parent.kind === 177 || parent.kind === 173)) {
+ return parent;
}
break;
}
@@ -55316,8 +60826,8 @@ var ts;
case 16:
case 25:
switch (contextToken.parent.kind) {
- case 238:
- case 242:
+ case 240:
+ case 244:
return contextToken.parent;
}
}
@@ -55326,34 +60836,35 @@ var ts;
}
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
- var parent_16 = contextToken.parent;
+ var parent = contextToken.parent;
switch (contextToken.kind) {
case 27:
case 40:
case 70:
- case 250:
- case 251:
- if (parent_16 && (parent_16.kind === 247 || parent_16.kind === 248)) {
- return parent_16;
+ case 178:
+ case 253:
+ case 252:
+ case 254:
+ if (parent && (parent.kind === 249 || parent.kind === 250)) {
+ return parent;
}
- else if (parent_16.kind === 250) {
- return parent_16.parent;
+ else if (parent.kind === 252) {
+ return parent.parent.parent;
}
break;
case 9:
- if (parent_16 && ((parent_16.kind === 250) || (parent_16.kind === 251))) {
- return parent_16.parent;
+ if (parent && ((parent.kind === 252) || (parent.kind === 254))) {
+ return parent.parent.parent;
}
break;
case 17:
- if (parent_16 &&
- parent_16.kind === 252 &&
- parent_16.parent &&
- (parent_16.parent.kind === 250)) {
- return parent_16.parent.parent;
+ if (parent &&
+ parent.kind === 255 &&
+ parent.parent && parent.parent.kind === 252) {
+ return parent.parent.parent.parent;
}
- if (parent_16 && parent_16.kind === 251) {
- return parent_16.parent;
+ if (parent && parent.kind === 254) {
+ return parent.parent.parent;
}
break;
}
@@ -55361,85 +60872,82 @@ var ts;
return undefined;
}
function isFunction(kind) {
+ if (!ts.isFunctionLikeKind(kind)) {
+ return false;
+ }
switch (kind) {
- case 184:
- case 185:
- case 225:
- case 149:
- case 148:
case 151:
- case 152:
- case 153:
- case 154:
- case 155:
+ case 160:
+ case 159:
+ return false;
+ default:
return true;
}
- return false;
}
function isSolelyIdentifierDefinitionLocation(contextToken) {
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
case 25:
- return containingNodeKind === 223 ||
- containingNodeKind === 224 ||
- containingNodeKind === 205 ||
- containingNodeKind === 229 ||
- isFunction(containingNodeKind) ||
+ return containingNodeKind === 225 ||
containingNodeKind === 226 ||
- containingNodeKind === 197 ||
- containingNodeKind === 227 ||
- containingNodeKind === 173 ||
- containingNodeKind === 228;
+ containingNodeKind === 207 ||
+ containingNodeKind === 231 ||
+ isFunction(containingNodeKind) ||
+ containingNodeKind === 228 ||
+ containingNodeKind === 198 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 174 ||
+ containingNodeKind === 230;
case 22:
- return containingNodeKind === 173;
- case 55:
return containingNodeKind === 174;
+ case 55:
+ return containingNodeKind === 175;
case 20:
- return containingNodeKind === 173;
+ return containingNodeKind === 174;
case 18:
- return containingNodeKind === 256 ||
+ return containingNodeKind === 259 ||
isFunction(containingNodeKind);
case 16:
- return containingNodeKind === 229 ||
- containingNodeKind === 227 ||
- containingNodeKind === 161;
+ return containingNodeKind === 231 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 162;
case 24:
- return containingNodeKind === 146 &&
+ return containingNodeKind === 147 &&
contextToken.parent && contextToken.parent.parent &&
- (contextToken.parent.parent.kind === 227 ||
- contextToken.parent.parent.kind === 161);
+ (contextToken.parent.parent.kind === 229 ||
+ contextToken.parent.parent.kind === 162);
case 26:
- return containingNodeKind === 226 ||
- containingNodeKind === 197 ||
- containingNodeKind === 227 ||
- containingNodeKind === 228 ||
+ return containingNodeKind === 228 ||
+ containingNodeKind === 198 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 230 ||
isFunction(containingNodeKind);
case 114:
- return containingNodeKind === 147;
+ return containingNodeKind === 148;
case 23:
- return containingNodeKind === 144 ||
+ return containingNodeKind === 145 ||
(contextToken.parent && contextToken.parent.parent &&
- contextToken.parent.parent.kind === 173);
+ contextToken.parent.parent.kind === 174);
case 113:
case 111:
case 112:
- return containingNodeKind === 144;
+ return containingNodeKind === 145;
case 117:
- return containingNodeKind === 239 ||
- containingNodeKind === 243 ||
- containingNodeKind === 237;
+ return containingNodeKind === 241 ||
+ containingNodeKind === 245 ||
+ containingNodeKind === 239;
case 74:
case 82:
case 108:
case 88:
case 103:
case 124:
- case 133:
+ case 134:
case 90:
case 109:
case 75:
case 115:
- case 136:
+ case 137:
return true;
}
switch (contextToken.getText()) {
@@ -55476,13 +60984,13 @@ var ts;
if (element.getStart() <= position && position <= element.getEnd()) {
continue;
}
- var name_45 = element.propertyName || element.name;
- existingImportsOrExports[name_45.text] = true;
+ var name = element.propertyName || element.name;
+ existingImportsOrExports.set(name.text, true);
}
- if (!ts.someProperties(existingImportsOrExports)) {
+ if (existingImportsOrExports.size === 0) {
return ts.filter(exportsOfModule, function (e) { return e.name !== "default"; });
}
- return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports[e.name]; });
+ return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports.get(e.name); });
}
function filterObjectMembersList(contextualMemberSymbols, existingMembers) {
if (!existingMembers || existingMembers.length === 0) {
@@ -55491,19 +60999,19 @@ var ts;
var existingMemberNames = ts.createMap();
for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) {
var m = existingMembers_1[_i];
- if (m.kind !== 257 &&
- m.kind !== 258 &&
- m.kind !== 174 &&
- m.kind !== 149 &&
- m.kind !== 151 &&
- m.kind !== 152) {
+ if (m.kind !== 260 &&
+ m.kind !== 261 &&
+ m.kind !== 175 &&
+ m.kind !== 150 &&
+ m.kind !== 152 &&
+ m.kind !== 153) {
continue;
}
if (m.getStart() <= position && position <= m.getEnd()) {
continue;
}
var existingName = void 0;
- if (m.kind === 174 && m.propertyName) {
+ if (m.kind === 175 && m.propertyName) {
if (m.propertyName.kind === 70) {
existingName = m.propertyName.text;
}
@@ -55511,9 +61019,9 @@ var ts;
else {
existingName = m.name.text;
}
- existingMemberNames[existingName] = true;
+ existingMemberNames.set(existingName, true);
}
- return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames[m.name]; });
+ return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
function filterJsxAttributes(symbols, attributes) {
var seenNames = ts.createMap();
@@ -55522,11 +61030,11 @@ var ts;
if (attr.getStart() <= position && position <= attr.getEnd()) {
continue;
}
- if (attr.kind === 250) {
- seenNames[attr.name.text] = true;
+ if (attr.kind === 252) {
+ seenNames.set(attr.name.text, true);
}
}
- return ts.filter(symbols, function (a) { return !seenNames[a.name]; });
+ return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
}
function getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location) {
@@ -55555,7 +61063,7 @@ var ts;
return name;
}
var keywordCompletions = [];
- for (var i = 71; i <= 140; i++) {
+ for (var i = 71; i <= 141; i++) {
keywordCompletions.push({
name: ts.tokenToString(i),
kind: ts.ScriptElementKind.keyword,
@@ -55563,37 +61071,14 @@ var ts;
sortText: "0"
});
}
- var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
- var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
- function tryGetDirectories(host, directoryName) {
- return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
- }
- function tryReadDirectory(host, path, extensions, exclude, include) {
- return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
+ function isEqualityExpression(node) {
+ return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
- function tryReadFile(host, path) {
- return tryIOAndConsumeErrors(host, host.readFile, path);
- }
- function tryFileExists(host, path) {
- return tryIOAndConsumeErrors(host, host.fileExists, path);
- }
- function tryDirectoryExists(host, path) {
- try {
- return ts.directoryProbablyExists(path, host);
- }
- catch (e) { }
- return undefined;
- }
- function tryIOAndConsumeErrors(host, toApply) {
- var args = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- args[_i - 2] = arguments[_i];
- }
- try {
- return toApply && toApply.apply(host, args);
- }
- catch (e) { }
- return undefined;
+ function isEqualityOperatorKind(kind) {
+ return kind === 31 ||
+ kind === 32 ||
+ kind === 33 ||
+ kind === 34;
}
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
@@ -55603,495 +61088,474 @@ var ts;
(function (DocumentHighlights) {
function getDocumentHighlights(typeChecker, cancellationToken, sourceFile, position, sourceFilesToSearch) {
var node = ts.getTouchingWord(sourceFile, position);
+ return node && (getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile));
+ }
+ DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
+ function getHighlightSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var end = node.getEnd();
+ return {
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(start, end),
+ kind: ts.HighlightSpanKind.none
+ };
+ }
+ function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ return referenceEntries && convertReferencedSymbols(referenceEntries);
+ }
+ function convertReferencedSymbols(referenceEntries) {
+ var fileNameToDocumentHighlights = ts.createMap();
+ for (var _i = 0, referenceEntries_1 = referenceEntries; _i < referenceEntries_1.length; _i++) {
+ var entry = referenceEntries_1[_i];
+ var _a = ts.FindAllReferences.toHighlightSpan(entry), fileName = _a.fileName, span_12 = _a.span;
+ var highlightSpans = fileNameToDocumentHighlights.get(fileName);
+ if (!highlightSpans) {
+ fileNameToDocumentHighlights.set(fileName, highlightSpans = []);
+ }
+ highlightSpans.push(span_12);
+ }
+ return ts.arrayFrom(fileNameToDocumentHighlights.entries(), function (_a) {
+ var fileName = _a[0], highlightSpans = _a[1];
+ return ({ fileName: fileName, highlightSpans: highlightSpans });
+ });
+ }
+ function getSyntacticDocumentHighlights(node, sourceFile) {
+ var highlightSpans = getHighlightSpans(node, sourceFile);
+ if (!highlightSpans || highlightSpans.length === 0) {
+ return undefined;
+ }
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ function hasKind(node, kind) {
+ return node !== undefined && node.kind === kind;
+ }
+ function parent(node) {
+ return node && node.parent;
+ }
+ function getHighlightSpans(node, sourceFile) {
if (!node) {
return undefined;
}
- return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node);
- function getHighlightSpanForNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- return {
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- kind: ts.HighlightSpanKind.none
- };
+ switch (node.kind) {
+ case 89:
+ case 81:
+ if (hasKind(node.parent, 210)) {
+ return getIfElseOccurrences(node.parent, sourceFile);
+ }
+ break;
+ case 95:
+ if (hasKind(node.parent, 218)) {
+ return highlightSpans(getReturnOccurrences(node.parent));
+ }
+ break;
+ case 99:
+ if (hasKind(node.parent, 222)) {
+ return highlightSpans(getThrowOccurrences(node.parent));
+ }
+ break;
+ case 101:
+ case 73:
+ case 86:
+ var tryStatement = node.kind === 73 ? parent(parent(node)) : parent(node);
+ if (hasKind(tryStatement, 223)) {
+ return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile));
+ }
+ break;
+ case 97:
+ if (hasKind(node.parent, 220)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent));
+ }
+ break;
+ case 72:
+ case 78:
+ if (hasKind(parent(parent(parent(node))), 220)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent));
+ }
+ break;
+ case 71:
+ case 76:
+ if (hasKind(node.parent, 217) || hasKind(node.parent, 216)) {
+ return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent));
+ }
+ break;
+ case 87:
+ if (hasKind(node.parent, 213) ||
+ hasKind(node.parent, 214) ||
+ hasKind(node.parent, 215)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 105:
+ case 80:
+ if (hasKind(node.parent, 212) || hasKind(node.parent, 211)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 122:
+ if (hasKind(node.parent, 151)) {
+ return highlightSpans(getConstructorOccurrences(node.parent));
+ }
+ break;
+ case 124:
+ case 134:
+ if (hasKind(node.parent, 152) || hasKind(node.parent, 153)) {
+ return highlightSpans(getGetAndSetOccurrences(node.parent));
+ }
+ break;
+ default:
+ if (ts.isModifierKind(node.kind) && node.parent &&
+ (ts.isDeclaration(node.parent) || node.parent.kind === 207)) {
+ return highlightSpans(getModifierOccurrences(node.kind, node.parent));
+ }
+ }
+ function highlightSpans(nodes) {
+ return nodes && nodes.map(function (node) { return getHighlightSpanForNode(node, sourceFile); });
}
- function getSemanticDocumentHighlights(node) {
- if (node.kind === 70 ||
- node.kind === 98 ||
- node.kind === 167 ||
- node.kind === 96 ||
- node.kind === 9 ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFilesToSearch, false, false, false);
- return convertReferencedSymbols(referencedSymbols);
+ }
+ function aggregateOwnedThrowStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 222) {
+ statementAccumulator.push(node);
}
- return undefined;
- function convertReferencedSymbols(referencedSymbols) {
- if (!referencedSymbols) {
- return undefined;
+ else if (node.kind === 223) {
+ var tryStatement = node;
+ if (tryStatement.catchClause) {
+ aggregate(tryStatement.catchClause);
}
- var fileNameToDocumentHighlights = ts.createMap();
- var result = [];
- for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
- var referencedSymbol = referencedSymbols_1[_i];
- for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
- var referenceEntry = _b[_a];
- var fileName = referenceEntry.fileName;
- var documentHighlights = fileNameToDocumentHighlights[fileName];
- if (!documentHighlights) {
- documentHighlights = { fileName: fileName, highlightSpans: [] };
- fileNameToDocumentHighlights[fileName] = documentHighlights;
- result.push(documentHighlights);
- }
- documentHighlights.highlightSpans.push({
- textSpan: referenceEntry.textSpan,
- kind: referenceEntry.isWriteAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference
- });
- }
+ else {
+ aggregate(tryStatement.tryBlock);
}
- return result;
+ if (tryStatement.finallyBlock) {
+ aggregate(tryStatement.finallyBlock);
+ }
+ }
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
}
- function getSyntacticDocumentHighlights(node) {
- var fileName = sourceFile.fileName;
- var highlightSpans = getHighlightSpans(node);
- if (!highlightSpans || highlightSpans.length === 0) {
- return undefined;
+ }
+ function getThrowStatementOwner(throwStatement) {
+ var child = throwStatement;
+ while (child.parent) {
+ var parent_2 = child.parent;
+ if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264) {
+ return parent_2;
}
- return [{ fileName: fileName, highlightSpans: highlightSpans }];
- function hasKind(node, kind) {
- return node !== undefined && node.kind === kind;
+ if (parent_2.kind === 223) {
+ var tryStatement = parent_2;
+ if (tryStatement.tryBlock === child && tryStatement.catchClause) {
+ return child;
+ }
}
- function parent(node) {
- return node && node.parent;
+ child = parent_2;
+ }
+ return undefined;
+ }
+ function aggregateAllBreakAndContinueStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 217 || node.kind === 216) {
+ statementAccumulator.push(node);
}
- function getHighlightSpans(node) {
- if (node) {
- switch (node.kind) {
- case 89:
- case 81:
- if (hasKind(node.parent, 208)) {
- return getIfElseOccurrences(node.parent);
- }
- break;
- case 95:
- if (hasKind(node.parent, 216)) {
- return getReturnOccurrences(node.parent);
- }
- break;
- case 99:
- if (hasKind(node.parent, 220)) {
- return getThrowOccurrences(node.parent);
- }
- break;
- case 73:
- if (hasKind(parent(parent(node)), 221)) {
- return getTryCatchFinallyOccurrences(node.parent.parent);
- }
- break;
- case 101:
- case 86:
- if (hasKind(parent(node), 221)) {
- return getTryCatchFinallyOccurrences(node.parent);
- }
- break;
- case 97:
- if (hasKind(node.parent, 218)) {
- return getSwitchCaseDefaultOccurrences(node.parent);
- }
- break;
- case 72:
- case 78:
- if (hasKind(parent(parent(parent(node))), 218)) {
- return getSwitchCaseDefaultOccurrences(node.parent.parent.parent);
- }
- break;
- case 71:
- case 76:
- if (hasKind(node.parent, 215) || hasKind(node.parent, 214)) {
- return getBreakOrContinueStatementOccurrences(node.parent);
- }
- break;
- case 87:
- if (hasKind(node.parent, 211) ||
- hasKind(node.parent, 212) ||
- hasKind(node.parent, 213)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 105:
- case 80:
- if (hasKind(node.parent, 210) || hasKind(node.parent, 209)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 122:
- if (hasKind(node.parent, 150)) {
- return getConstructorOccurrences(node.parent);
- }
- break;
- case 124:
- case 133:
- if (hasKind(node.parent, 151) || hasKind(node.parent, 152)) {
- return getGetAndSetOccurrences(node.parent);
- }
- break;
- default:
- if (ts.isModifierKind(node.kind) && node.parent &&
- (ts.isDeclaration(node.parent) || node.parent.kind === 205)) {
- return getModifierOccurrences(node.kind, node.parent);
- }
- }
- }
- return undefined;
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
- function aggregateOwnedThrowStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 220) {
- statementAccumulator.push(node);
- }
- else if (node.kind === 221) {
- var tryStatement = node;
- if (tryStatement.catchClause) {
- aggregate(tryStatement.catchClause);
- }
- else {
- aggregate(tryStatement.tryBlock);
- }
- if (tryStatement.finallyBlock) {
- aggregate(tryStatement.finallyBlock);
- }
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
+ }
+ }
+ function ownsBreakOrContinueStatement(owner, statement) {
+ var actualOwner = getBreakOrContinueOwner(statement);
+ return actualOwner && actualOwner === owner;
+ }
+ function getBreakOrContinueOwner(statement) {
+ for (var node = statement.parent; node; node = node.parent) {
+ switch (node.kind) {
+ case 220:
+ if (statement.kind === 216) {
+ continue;
}
- }
- }
- function getThrowStatementOwner(throwStatement) {
- var child = throwStatement;
- while (child.parent) {
- var parent_17 = child.parent;
- if (ts.isFunctionBlock(parent_17) || parent_17.kind === 261) {
- return parent_17;
+ case 213:
+ case 214:
+ case 215:
+ case 212:
+ case 211:
+ if (!statement.label || isLabeledBy(node, statement.label.text)) {
+ return node;
}
- if (parent_17.kind === 221) {
- var tryStatement = parent_17;
- if (tryStatement.tryBlock === child && tryStatement.catchClause) {
- return child;
- }
+ break;
+ default:
+ if (ts.isFunctionLike(node)) {
+ return undefined;
}
- child = parent_17;
- }
+ break;
+ }
+ }
+ return undefined;
+ }
+ function getModifierOccurrences(modifier, declaration) {
+ var container = declaration.parent;
+ if (ts.isAccessibilityModifier(modifier)) {
+ if (!(container.kind === 228 ||
+ container.kind === 198 ||
+ (declaration.kind === 145 && hasKind(container, 151)))) {
return undefined;
}
- function aggregateAllBreakAndContinueStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 215 || node.kind === 214) {
- statementAccumulator.push(node);
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
- }
- }
+ }
+ else if (modifier === 114) {
+ if (!(container.kind === 228 || container.kind === 198)) {
+ return undefined;
}
- function ownsBreakOrContinueStatement(owner, statement) {
- var actualOwner = getBreakOrContinueOwner(statement);
- return actualOwner && actualOwner === owner;
+ }
+ else if (modifier === 83 || modifier === 123) {
+ if (!(container.kind === 233 || container.kind === 264)) {
+ return undefined;
}
- function getBreakOrContinueOwner(statement) {
- for (var node_1 = statement.parent; node_1; node_1 = node_1.parent) {
- switch (node_1.kind) {
- case 218:
- if (statement.kind === 214) {
- continue;
- }
- case 211:
- case 212:
- case 213:
- case 210:
- case 209:
- if (!statement.label || isLabeledBy(node_1, statement.label.text)) {
- return node_1;
- }
- break;
- default:
- if (ts.isFunctionLike(node_1)) {
- return undefined;
- }
- break;
- }
- }
+ }
+ else if (modifier === 116) {
+ if (!(container.kind === 228 || declaration.kind === 228)) {
return undefined;
}
- function getModifierOccurrences(modifier, declaration) {
- var container = declaration.parent;
- if (ts.isAccessibilityModifier(modifier)) {
- if (!(container.kind === 226 ||
- container.kind === 197 ||
- (declaration.kind === 144 && hasKind(container, 150)))) {
- return undefined;
- }
- }
- else if (modifier === 114) {
- if (!(container.kind === 226 || container.kind === 197)) {
- return undefined;
- }
- }
- else if (modifier === 83 || modifier === 123) {
- if (!(container.kind === 231 || container.kind === 261)) {
- return undefined;
- }
- }
- else if (modifier === 116) {
- if (!(container.kind === 226 || declaration.kind === 226)) {
- return undefined;
- }
+ }
+ else {
+ return undefined;
+ }
+ var keywords = [];
+ var modifierFlag = getFlagFromModifier(modifier);
+ var nodes;
+ switch (container.kind) {
+ case 233:
+ case 264:
+ if (modifierFlag & 128) {
+ nodes = declaration.members.concat(declaration);
}
else {
- return undefined;
+ nodes = container.statements;
}
- var keywords = [];
- var modifierFlag = getFlagFromModifier(modifier);
- var nodes;
- switch (container.kind) {
- case 231:
- case 261:
- if (modifierFlag & 128) {
- nodes = declaration.members.concat(declaration);
- }
- else {
- nodes = container.statements;
- }
- break;
- case 150:
- nodes = container.parameters.concat(container.parent.members);
- break;
- case 226:
- case 197:
- nodes = container.members;
- if (modifierFlag & 28) {
- var constructor = ts.forEach(container.members, function (member) {
- return member.kind === 150 && member;
- });
- if (constructor) {
- nodes = nodes.concat(constructor.parameters);
- }
- }
- else if (modifierFlag & 128) {
- nodes = nodes.concat(container);
- }
- break;
- default:
- ts.Debug.fail("Invalid container kind.");
- }
- ts.forEach(nodes, function (node) {
- if (ts.getModifierFlags(node) & modifierFlag) {
- ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- function getFlagFromModifier(modifier) {
- switch (modifier) {
- case 113:
- return 4;
- case 111:
- return 8;
- case 112:
- return 16;
- case 114:
- return 32;
- case 83:
- return 1;
- case 123:
- return 2;
- case 116:
- return 128;
- default:
- ts.Debug.fail();
+ break;
+ case 151:
+ nodes = container.parameters.concat(container.parent.members);
+ break;
+ case 228:
+ case 198:
+ nodes = container.members;
+ if (modifierFlag & 28) {
+ var constructor = ts.forEach(container.members, function (member) {
+ return member.kind === 151 && member;
+ });
+ if (constructor) {
+ nodes = nodes.concat(constructor.parameters);
}
}
- }
- function pushKeywordIf(keywordList, token) {
- var expected = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- expected[_i - 2] = arguments[_i];
+ else if (modifierFlag & 128) {
+ nodes = nodes.concat(container);
}
- if (token && ts.contains(expected, token.kind)) {
- keywordList.push(token);
- return true;
- }
- return false;
+ break;
+ default:
+ ts.Debug.fail("Invalid container kind.");
+ }
+ ts.forEach(nodes, function (node) {
+ if (ts.getModifierFlags(node) & modifierFlag) {
+ ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
}
- function getGetAndSetOccurrences(accessorDeclaration) {
- var keywords = [];
- tryPushAccessorKeyword(accessorDeclaration.symbol, 151);
- tryPushAccessorKeyword(accessorDeclaration.symbol, 152);
- return ts.map(keywords, getHighlightSpanForNode);
- function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
- var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
- if (accessor) {
- ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 133); });
- }
- }
+ });
+ return keywords;
+ function getFlagFromModifier(modifier) {
+ switch (modifier) {
+ case 113:
+ return 4;
+ case 111:
+ return 8;
+ case 112:
+ return 16;
+ case 114:
+ return 32;
+ case 83:
+ return 1;
+ case 123:
+ return 2;
+ case 116:
+ return 128;
+ default:
+ ts.Debug.fail();
}
- function getConstructorOccurrences(constructorDeclaration) {
- var declarations = constructorDeclaration.symbol.getDeclarations();
- var keywords = [];
- ts.forEach(declarations, function (declaration) {
- ts.forEach(declaration.getChildren(), function (token) {
- return pushKeywordIf(keywords, token, 122);
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getLoopBreakContinueOccurrences(loopNode) {
- var keywords = [];
- if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) {
- if (loopNode.kind === 209) {
- var loopTokens = loopNode.getChildren();
- for (var i = loopTokens.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, loopTokens[i], 105)) {
- break;
- }
- }
- }
- }
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(loopNode, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71, 76);
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
- var owner = getBreakOrContinueOwner(breakOrContinueStatement);
- if (owner) {
- switch (owner.kind) {
- case 211:
- case 212:
- case 213:
- case 209:
- case 210:
- return getLoopBreakContinueOccurrences(owner);
- case 218:
- return getSwitchCaseDefaultOccurrences(owner);
+ }
+ }
+ function pushKeywordIf(keywordList, token) {
+ var expected = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ expected[_i - 2] = arguments[_i];
+ }
+ if (token && ts.contains(expected, token.kind)) {
+ keywordList.push(token);
+ return true;
+ }
+ return false;
+ }
+ function getGetAndSetOccurrences(accessorDeclaration) {
+ var keywords = [];
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 152);
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 153);
+ return keywords;
+ function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
+ var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
+ if (accessor) {
+ ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 134); });
+ }
+ }
+ }
+ function getConstructorOccurrences(constructorDeclaration) {
+ var declarations = constructorDeclaration.symbol.getDeclarations();
+ var keywords = [];
+ ts.forEach(declarations, function (declaration) {
+ ts.forEach(declaration.getChildren(), function (token) {
+ return pushKeywordIf(keywords, token, 122);
+ });
+ });
+ return keywords;
+ }
+ function getLoopBreakContinueOccurrences(loopNode) {
+ var keywords = [];
+ if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) {
+ if (loopNode.kind === 211) {
+ var loopTokens = loopNode.getChildren();
+ for (var i = loopTokens.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, loopTokens[i], 105)) {
+ break;
}
}
- return undefined;
}
- function getSwitchCaseDefaultOccurrences(switchStatement) {
- var keywords = [];
- pushKeywordIf(keywords, switchStatement.getFirstToken(), 97);
- ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
- pushKeywordIf(keywords, clause.getFirstToken(), 72, 78);
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(switchStatement, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71);
- }
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
+ }
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(loopNode, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71, 76);
}
- function getTryCatchFinallyOccurrences(tryStatement) {
- var keywords = [];
- pushKeywordIf(keywords, tryStatement.getFirstToken(), 101);
- if (tryStatement.catchClause) {
- pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73);
- }
- if (tryStatement.finallyBlock) {
- var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile);
- pushKeywordIf(keywords, finallyKeyword, 86);
- }
- return ts.map(keywords, getHighlightSpanForNode);
+ });
+ return keywords;
+ }
+ function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
+ var owner = getBreakOrContinueOwner(breakOrContinueStatement);
+ if (owner) {
+ switch (owner.kind) {
+ case 213:
+ case 214:
+ case 215:
+ case 211:
+ case 212:
+ return getLoopBreakContinueOccurrences(owner);
+ case 220:
+ return getSwitchCaseDefaultOccurrences(owner);
}
- function getThrowOccurrences(throwStatement) {
- var owner = getThrowStatementOwner(throwStatement);
- if (!owner) {
- return undefined;
+ }
+ return undefined;
+ }
+ function getSwitchCaseDefaultOccurrences(switchStatement) {
+ var keywords = [];
+ pushKeywordIf(keywords, switchStatement.getFirstToken(), 97);
+ ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
+ pushKeywordIf(keywords, clause.getFirstToken(), 72, 78);
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(switchStatement, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71);
}
- var keywords = [];
- ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
- });
- if (ts.isFunctionBlock(owner)) {
- ts.forEachReturnStatement(owner, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
- });
+ });
+ });
+ return keywords;
+ }
+ function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {
+ var keywords = [];
+ pushKeywordIf(keywords, tryStatement.getFirstToken(), 101);
+ if (tryStatement.catchClause) {
+ pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73);
+ }
+ if (tryStatement.finallyBlock) {
+ var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile);
+ pushKeywordIf(keywords, finallyKeyword, 86);
+ }
+ return keywords;
+ }
+ function getThrowOccurrences(throwStatement) {
+ var owner = getThrowStatementOwner(throwStatement);
+ if (!owner) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
+ });
+ if (ts.isFunctionBlock(owner)) {
+ ts.forEachReturnStatement(owner, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
+ });
+ }
+ return keywords;
+ }
+ function getReturnOccurrences(returnStatement) {
+ var func = ts.getContainingFunction(returnStatement);
+ if (!(func && hasKind(func.body, 206))) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEachReturnStatement(func.body, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
+ });
+ ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
+ });
+ return keywords;
+ }
+ function getIfElseOccurrences(ifStatement, sourceFile) {
+ var keywords = [];
+ while (hasKind(ifStatement.parent, 210) && ifStatement.parent.elseStatement === ifStatement) {
+ ifStatement = ifStatement.parent;
+ }
+ while (ifStatement) {
+ var children = ifStatement.getChildren();
+ pushKeywordIf(keywords, children[0], 89);
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, children[i], 81)) {
+ break;
}
- return ts.map(keywords, getHighlightSpanForNode);
}
- function getReturnOccurrences(returnStatement) {
- var func = ts.getContainingFunction(returnStatement);
- if (!(func && hasKind(func.body, 204))) {
- return undefined;
- }
- var keywords = [];
- ts.forEachReturnStatement(func.body, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
- });
- ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getIfElseOccurrences(ifStatement) {
- var keywords = [];
- while (hasKind(ifStatement.parent, 208) && ifStatement.parent.elseStatement === ifStatement) {
- ifStatement = ifStatement.parent;
- }
- while (ifStatement) {
- var children = ifStatement.getChildren();
- pushKeywordIf(keywords, children[0], 89);
- for (var i = children.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, children[i], 81)) {
- break;
- }
- }
- if (!hasKind(ifStatement.elseStatement, 208)) {
+ if (!hasKind(ifStatement.elseStatement, 210)) {
+ break;
+ }
+ ifStatement = ifStatement.elseStatement;
+ }
+ var result = [];
+ for (var i = 0; i < keywords.length; i++) {
+ if (keywords[i].kind === 81 && i < keywords.length - 1) {
+ var elseKeyword = keywords[i];
+ var ifKeyword = keywords[i + 1];
+ var shouldCombindElseAndIf = true;
+ for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
+ if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
+ shouldCombindElseAndIf = false;
break;
}
- ifStatement = ifStatement.elseStatement;
}
- var result = [];
- for (var i = 0; i < keywords.length; i++) {
- if (keywords[i].kind === 81 && i < keywords.length - 1) {
- var elseKeyword = keywords[i];
- var ifKeyword = keywords[i + 1];
- var shouldCombindElseAndIf = true;
- for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
- if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
- shouldCombindElseAndIf = false;
- break;
- }
- }
- if (shouldCombindElseAndIf) {
- result.push({
- fileName: fileName,
- textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
- kind: ts.HighlightSpanKind.reference
- });
- i++;
- continue;
- }
- }
- result.push(getHighlightSpanForNode(keywords[i]));
+ if (shouldCombindElseAndIf) {
+ result.push({
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
+ kind: ts.HighlightSpanKind.reference
+ });
+ i++;
+ continue;
}
- return result;
}
+ result.push(getHighlightSpanForNode(keywords[i], sourceFile));
}
+ return result;
}
- DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
function isLabeledBy(node, labelName) {
- for (var owner = node.parent; owner.kind === 219; owner = owner.parent) {
+ for (var owner = node.parent; owner.kind === 221; owner = owner.parent) {
if (owner.label.text === labelName) {
return true;
}
@@ -56110,15 +61574,15 @@ var ts;
return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + "|" + settings.allowJs + "|" + settings.baseUrl + "|" + JSON.stringify(settings.typeRoots) + "|" + JSON.stringify(settings.rootDirs) + "|" + JSON.stringify(settings.paths);
}
function getBucketForCompilationSettings(key, createIfMissing) {
- var bucket = buckets[key];
+ var bucket = buckets.get(key);
if (!bucket && createIfMissing) {
- buckets[key] = bucket = ts.createFileMap();
+ buckets.set(key, bucket = ts.createFileMap());
}
return bucket;
}
function reportStats() {
- var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
- var entries = buckets[name];
+ var bucketInfoArray = ts.arrayFrom(buckets.keys()).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
+ var entries = buckets.get(name);
var sourceFiles = [];
entries.forEachValue(function (key, entry) {
sourceFiles.push({
@@ -56206,179 +61670,871 @@ var ts;
(function (ts) {
var FindAllReferences;
(function (FindAllReferences) {
- function findReferencedSymbols(typeChecker, cancellationToken, sourceFiles, sourceFile, position, findInStrings, findInComments) {
- var node = ts.getTouchingPropertyName(sourceFile, position, true);
- if (node === sourceFile) {
- return undefined;
+ function createImportTracker(sourceFiles, checker, cancellationToken) {
+ var allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);
+ return function (exportSymbol, exportInfo, isForRename) {
+ var _a = getImportersForExport(sourceFiles, allDirectImports, exportInfo, checker, cancellationToken), directImports = _a.directImports, indirectUsers = _a.indirectUsers;
+ return __assign({ indirectUsers: indirectUsers }, getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename));
+ };
+ }
+ FindAllReferences.createImportTracker = createImportTracker;
+ var ExportKind;
+ (function (ExportKind) {
+ ExportKind[ExportKind["Named"] = 0] = "Named";
+ ExportKind[ExportKind["Default"] = 1] = "Default";
+ ExportKind[ExportKind["ExportEquals"] = 2] = "ExportEquals";
+ })(ExportKind = FindAllReferences.ExportKind || (FindAllReferences.ExportKind = {}));
+ var ImportExport;
+ (function (ImportExport) {
+ ImportExport[ImportExport["Import"] = 0] = "Import";
+ ImportExport[ImportExport["Export"] = 1] = "Export";
+ })(ImportExport = FindAllReferences.ImportExport || (FindAllReferences.ImportExport = {}));
+ function getImportersForExport(sourceFiles, allDirectImports, _a, checker, cancellationToken) {
+ var exportingModuleSymbol = _a.exportingModuleSymbol, exportKind = _a.exportKind;
+ var markSeenDirectImport = ts.nodeSeenTracker();
+ var markSeenIndirectUser = ts.nodeSeenTracker();
+ var directImports = [];
+ var isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports;
+ var indirectUserDeclarations = isAvailableThroughGlobal ? undefined : [];
+ handleDirectImports(exportingModuleSymbol);
+ return { directImports: directImports, indirectUsers: getIndirectUsers() };
+ function getIndirectUsers() {
+ if (isAvailableThroughGlobal) {
+ return sourceFiles;
+ }
+ for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (ts.isExternalModuleAugmentation(decl)) {
+ addIndirectUser(decl);
+ }
+ }
+ return indirectUserDeclarations.map(ts.getSourceFileOfNode);
}
- switch (node.kind) {
- case 8:
- if (!ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- break;
+ function handleDirectImports(exportingModuleSymbol) {
+ var theseDirectImports = getDirectImports(exportingModuleSymbol);
+ if (theseDirectImports)
+ for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
+ var direct = theseDirectImports_1[_i];
+ if (!markSeenDirectImport(direct)) {
+ continue;
+ }
+ cancellationToken.throwIfCancellationRequested();
+ switch (direct.kind) {
+ case 180:
+ if (!isAvailableThroughGlobal) {
+ var parent = direct.parent;
+ if (exportKind === 2 && parent.kind === 225) {
+ var name = parent.name;
+ if (name.kind === 70) {
+ directImports.push(name);
+ break;
+ }
+ }
+ addIndirectUser(direct.getSourceFile());
+ }
+ break;
+ case 236:
+ handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1));
+ break;
+ case 237:
+ var namedBindings = direct.importClause && direct.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239) {
+ handleNamespaceImport(direct, namedBindings.name);
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ case 243:
+ if (!direct.exportClause) {
+ handleDirectImports(getContainingModuleSymbol(direct, checker));
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ }
}
- case 70:
- case 98:
- case 122:
- case 9:
- return getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, false);
}
- return undefined;
+ function handleNamespaceImport(importDeclaration, name, isReExport) {
+ if (exportKind === 2) {
+ directImports.push(importDeclaration);
+ }
+ else if (!isAvailableThroughGlobal) {
+ var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration);
+ ts.Debug.assert(sourceFileLike.kind === 264 || sourceFileLike.kind === 232);
+ if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {
+ addIndirectUsers(sourceFileLike);
+ }
+ else {
+ addIndirectUser(sourceFileLike);
+ }
+ }
+ }
+ function addIndirectUser(sourceFileLike) {
+ ts.Debug.assert(!isAvailableThroughGlobal);
+ var isNew = markSeenIndirectUser(sourceFileLike);
+ if (isNew) {
+ indirectUserDeclarations.push(sourceFileLike);
+ }
+ return isNew;
+ }
+ function addIndirectUsers(sourceFileLike) {
+ if (!addIndirectUser(sourceFileLike)) {
+ return;
+ }
+ var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536));
+ var directImports = getDirectImports(moduleSymbol);
+ if (directImports)
+ for (var _i = 0, directImports_1 = directImports; _i < directImports_1.length; _i++) {
+ var directImport = directImports_1[_i];
+ addIndirectUsers(getSourceFileLikeForImportDeclaration(directImport));
+ }
+ }
+ function getDirectImports(moduleSymbol) {
+ return allDirectImports.get(ts.getSymbolId(moduleSymbol).toString());
+ }
+ }
+ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) {
+ var exportName = exportSymbol.name;
+ var importSearches = [];
+ var singleReferences = [];
+ function addSearch(location, symbol) {
+ importSearches.push([location, symbol]);
+ }
+ if (directImports)
+ for (var _i = 0, directImports_2 = directImports; _i < directImports_2.length; _i++) {
+ var decl = directImports_2[_i];
+ handleImport(decl);
+ }
+ return { importSearches: importSearches, singleReferences: singleReferences };
+ function handleImport(decl) {
+ if (decl.kind === 236) {
+ if (isExternalModuleImportEquals(decl)) {
+ handleNamespaceImportLike(decl.name);
+ }
+ return;
+ }
+ if (decl.kind === 70) {
+ handleNamespaceImportLike(decl);
+ return;
+ }
+ if (decl.moduleSpecifier.kind !== 9) {
+ return;
+ }
+ if (decl.kind === 243) {
+ searchForNamedImport(decl.exportClause);
+ return;
+ }
+ var importClause = decl.importClause;
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239) {
+ handleNamespaceImportLike(namedBindings.name);
+ return;
+ }
+ if (exportKind === 0) {
+ searchForNamedImport(namedBindings);
+ }
+ else {
+ var name = importClause.name;
+ if (name && (!isForRename || name.text === symbolName(exportSymbol))) {
+ var defaultImportAlias = checker.getSymbolAtLocation(name);
+ addSearch(name, defaultImportAlias);
+ }
+ if (!isForRename && exportKind === 1) {
+ ts.Debug.assert(exportName === "default");
+ searchForNamedImport(namedBindings);
+ }
+ }
+ }
+ function handleNamespaceImportLike(importName) {
+ if (exportKind === 2 && (!isForRename || importName.text === exportName)) {
+ addSearch(importName, checker.getSymbolAtLocation(importName));
+ }
+ }
+ function searchForNamedImport(namedBindings) {
+ if (namedBindings)
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ var name = element.name, propertyName = element.propertyName;
+ if ((propertyName || name).text !== exportName) {
+ continue;
+ }
+ if (propertyName) {
+ singleReferences.push(propertyName);
+ if (!isForRename) {
+ addSearch(name, checker.getSymbolAtLocation(name));
+ }
+ }
+ else {
+ var localSymbol = element.kind === 245 && element.propertyName
+ ? checker.getExportSpecifierLocalTargetSymbol(element)
+ : checker.getSymbolAtLocation(name);
+ addSearch(name, localSymbol);
+ }
+ }
+ }
+ }
+ function findNamespaceReExports(sourceFileLike, name, checker) {
+ var namespaceImportSymbol = checker.getSymbolAtLocation(name);
+ return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) {
+ if (statement.kind !== 243)
+ return;
+ var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier;
+ if (moduleSpecifier || !exportClause)
+ return;
+ for (var _i = 0, _b = exportClause.elements; _i < _b.length; _i++) {
+ var element = _b[_i];
+ if (checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol) {
+ return true;
+ }
+ }
+ });
+ }
+ function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
+ var map = ts.createMap();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var sourceFile = sourceFiles_4[_i];
+ cancellationToken.throwIfCancellationRequested();
+ forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol) {
+ var id = ts.getSymbolId(moduleSymbol).toString();
+ var imports = map.get(id);
+ if (!imports) {
+ map.set(id, imports = []);
+ }
+ imports.push(importDecl);
+ }
+ });
+ }
+ return map;
+ }
+ function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
+ return ts.forEach(sourceFileLike.kind === 264 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) {
+ return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action));
+ });
+ }
+ function forEachImport(sourceFile, action) {
+ if (sourceFile.externalModuleIndicator) {
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var moduleSpecifier = _a[_i];
+ action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
+ }
+ }
+ else {
+ forEachPossibleImportOrExportStatement(sourceFile, function (statement) {
+ switch (statement.kind) {
+ case 243:
+ case 237: {
+ var decl = statement;
+ if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9) {
+ action(decl, decl.moduleSpecifier);
+ }
+ break;
+ }
+ case 236: {
+ var decl = statement;
+ var moduleReference = decl.moduleReference;
+ if (moduleReference.kind === 247 &&
+ moduleReference.expression.kind === 9) {
+ action(decl, moduleReference.expression);
+ }
+ break;
+ }
+ }
+ });
+ if (sourceFile.flags & 65536) {
+ sourceFile.forEachChild(function recur(node) {
+ if (ts.isRequireCall(node, true)) {
+ action(node, node.arguments[0]);
+ }
+ else {
+ node.forEachChild(recur);
+ }
+ });
+ }
+ }
+ }
+ function importerFromModuleSpecifier(moduleSpecifier) {
+ var decl = moduleSpecifier.parent;
+ if (decl.kind === 237 || decl.kind === 243) {
+ return decl;
+ }
+ ts.Debug.assert(decl.kind === 247);
+ return decl.parent;
+ }
+ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
+ return comingFromExport ? getExport() : getExport() || getImport();
+ function getExport() {
+ var parent = node.parent;
+ if (symbol.flags & 7340032) {
+ if (parent.kind === 178) {
+ return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193
+ ? getSpecialPropertyExport(parent.parent, false)
+ : undefined;
+ }
+ else {
+ var exportSymbol = symbol.exportSymbol;
+ ts.Debug.assert(!!exportSymbol);
+ return exportInfo(exportSymbol, getExportKindForDeclaration(parent));
+ }
+ }
+ else {
+ var exportNode = parent.kind === 225 ? ts.getAncestor(parent, 207) : parent;
+ if (ts.hasModifier(exportNode, 1)) {
+ if (exportNode.kind === 236 && exportNode.moduleReference === node) {
+ if (comingFromExport) {
+ return undefined;
+ }
+ var lhsSymbol = checker.getSymbolAtLocation(exportNode.name);
+ return { kind: 0, symbol: lhsSymbol, isNamedImport: false };
+ }
+ else {
+ return exportInfo(symbol, getExportKindForDeclaration(exportNode));
+ }
+ }
+ else if (parent.kind === 242) {
+ var exportingModuleSymbol = parent.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ }
+ else if (parent.kind === 193) {
+ return getSpecialPropertyExport(parent, true);
+ }
+ else if (parent.parent.kind === 193) {
+ return getSpecialPropertyExport(parent.parent, true);
+ }
+ }
+ function getSpecialPropertyExport(node, useLhsSymbol) {
+ var kind;
+ switch (ts.getSpecialPropertyAssignmentKind(node)) {
+ case 1:
+ kind = 0;
+ break;
+ case 2:
+ kind = 2;
+ break;
+ default:
+ return undefined;
+ }
+ var sym = useLhsSymbol ? checker.getSymbolAtLocation(node.left.name) : symbol;
+ return sym && exportInfo(sym, kind);
+ }
+ }
+ function getImport() {
+ var isImport = isNodeImport(node);
+ if (!isImport)
+ return;
+ var importedSymbol = checker.getImmediateAliasedSymbol(symbol);
+ if (importedSymbol) {
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ if (importedSymbol.name === "export=") {
+ importedSymbol = checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0, symbol: importedSymbol }, isImport);
+ }
+ }
+ }
+ function exportInfo(symbol, kind) {
+ var exportInfo = getExportInfo(symbol, kind, checker);
+ return exportInfo && { kind: 1, symbol: symbol, exportInfo: exportInfo };
+ }
+ function getExportKindForDeclaration(node) {
+ return ts.hasModifier(node, 512) ? 1 : 0;
+ }
+ }
+ FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function isNodeImport(node) {
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 236:
+ return parent.name === node && isExternalModuleImportEquals(parent)
+ ? { isNamedImport: false }
+ : undefined;
+ case 241:
+ return parent.propertyName ? undefined : { isNamedImport: true };
+ case 238:
+ case 239:
+ ts.Debug.assert(parent.name === node);
+ return { isNamedImport: false };
+ default:
+ return undefined;
+ }
+ }
+ function getExportInfo(exportSymbol, exportKind, checker) {
+ var exportingModuleSymbol = checker.getMergedSymbol(exportSymbol.parent);
+ return ts.isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } : undefined;
+ }
+ FindAllReferences.getExportInfo = getExportInfo;
+ function symbolName(symbol) {
+ if (symbol.name !== "default") {
+ return symbol.name;
+ }
+ var name = ts.forEach(symbol.declarations, function (_a) {
+ var name = _a.name;
+ return name && name.kind === 70 && name.text;
+ });
+ ts.Debug.assert(!!name);
+ return name;
+ }
+ function skipExportSpecifierSymbol(symbol, checker) {
+ if (symbol.declarations)
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) {
+ return checker.getExportSpecifierLocalTargetSymbol(declaration);
+ }
+ }
+ return symbol;
+ }
+ function getContainingModuleSymbol(importer, checker) {
+ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
+ }
+ function getSourceFileLikeForImportDeclaration(node) {
+ if (node.kind === 180) {
+ return node.getSourceFile();
+ }
+ var parent = node.parent;
+ if (parent.kind === 264) {
+ return parent;
+ }
+ ts.Debug.assert(parent.kind === 233 && isAmbientModuleDeclaration(parent.parent));
+ return parent.parent;
+ }
+ function isAmbientModuleDeclaration(node) {
+ return node.kind === 232 && node.name.kind === 9;
+ }
+ function isExternalModuleImportEquals(_a) {
+ var moduleReference = _a.moduleReference;
+ return moduleReference.kind === 247 && moduleReference.expression.kind === 9;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ function nodeEntry(node, isInString) {
+ return { type: "node", node: node, isInString: isInString };
+ }
+ FindAllReferences.nodeEntry = nodeEntry;
+ function findReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position);
+ if (!referencedSymbols || !referencedSymbols.length) {
+ return undefined;
+ }
+ var out = [];
+ for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
+ var _a = referencedSymbols_1[_i], definition = _a.definition, references = _a.references;
+ if (definition) {
+ out.push({ definition: definitionToReferencedSymbolDefinitionInfo(definition, checker), references: references.map(toReferenceEntry) });
+ }
+ }
+ return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, implementations) {
- if (!implementations) {
+ function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
+ }
+ FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
+ function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ if (node.parent.kind === 261) {
+ var result_4 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
+ return result_4;
+ }
+ else if (node.kind === 96 || ts.isSuperProperty(node.parent)) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
+ }
+ else {
+ return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ }
+ }
+ function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ return ts.map(x, toReferenceEntry);
+ }
+ FindAllReferences.findReferencedEntries = findReferencedEntries;
+ function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ }
+ FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
+ function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ }
+ function flattenEntries(referenceSymbols) {
+ return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
+ }
+ function definitionToReferencedSymbolDefinitionInfo(def, checker) {
+ var info = (function () {
+ switch (def.type) {
+ case "symbol": {
+ var symbol = def.symbol, node_2 = def.node;
+ var declarations = symbol.declarations;
+ if (!declarations || declarations.length === 0) {
+ return undefined;
+ }
+ var _a = getDefinitionKindAndDisplayParts(symbol, node_2, checker), displayParts_1 = _a.displayParts, kind_1 = _a.kind;
+ var name_3 = displayParts_1.map(function (p) { return p.text; }).join("");
+ return { node: node_2, name: name_3, kind: kind_1, displayParts: displayParts_1 };
+ }
+ case "label": {
+ var node_3 = def.node;
+ return { node: node_3, name: node_3.text, kind: ts.ScriptElementKind.label, displayParts: [ts.displayPart(node_3.text, ts.SymbolDisplayPartKind.text)] };
+ }
+ case "keyword": {
+ var node_4 = def.node;
+ var name_4 = ts.tokenToString(node_4.kind);
+ return { node: node_4, name: name_4, kind: ts.ScriptElementKind.keyword, displayParts: [{ text: name_4, kind: ts.ScriptElementKind.keyword }] };
+ }
+ case "this": {
+ var node_5 = def.node;
+ var symbol = checker.getSymbolAtLocation(node_5);
+ var displayParts_2 = symbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node_5.getSourceFile(), ts.getContainerNode(node_5), node_5).displayParts;
+ return { node: node_5, name: "this", kind: ts.ScriptElementKind.variableElement, displayParts: displayParts_2 };
+ }
+ case "string": {
+ var node_6 = def.node;
+ return { node: node_6, name: node_6.text, kind: ts.ScriptElementKind.variableElement, displayParts: [ts.displayPart(ts.getTextOfNode(node_6), ts.SymbolDisplayPartKind.stringLiteral)] };
+ }
+ }
+ })();
+ if (!info) {
+ return undefined;
+ }
+ var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts;
+ var sourceFile = node.getSourceFile();
+ return {
+ containerKind: "",
+ containerName: "",
+ fileName: sourceFile.fileName,
+ kind: kind,
+ name: name,
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
+ displayParts: displayParts
+ };
+ }
+ function getDefinitionKindAndDisplayParts(symbol, node, checker) {
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node.getSourceFile(), ts.getContainerNode(node), node), displayParts = _a.displayParts, symbolKind = _a.symbolKind;
+ return { displayParts: displayParts, kind: symbolKind };
+ }
+ function toReferenceEntry(entry) {
+ if (entry.type === "span") {
+ return { textSpan: entry.textSpan, fileName: entry.fileName, isWriteAccess: false, isDefinition: false };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ return {
+ fileName: node.getSourceFile().fileName,
+ textSpan: getTextSpan(node),
+ isWriteAccess: isWriteAccess(node),
+ isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isInString: isInString
+ };
+ }
+ function toImplementationLocation(entry, checker) {
+ if (entry.type === "node") {
+ var node = entry.node;
+ return __assign({ textSpan: getTextSpan(node), fileName: node.getSourceFile().fileName }, implementationKindDisplayParts(node, checker));
+ }
+ else {
+ var textSpan = entry.textSpan, fileName = entry.fileName;
+ return { textSpan: textSpan, fileName: fileName, kind: ts.ScriptElementKind.unknown, displayParts: [] };
+ }
+ }
+ function implementationKindDisplayParts(node, checker) {
+ var symbol = checker.getSymbolAtLocation(ts.isDeclaration(node) && node.name ? node.name : node);
+ if (symbol) {
+ return getDefinitionKindAndDisplayParts(symbol, node, checker);
+ }
+ else if (node.kind === 177) {
+ return {
+ kind: ts.ScriptElementKind.interfaceElement,
+ displayParts: [ts.punctuationPart(18), ts.textPart("object literal"), ts.punctuationPart(19)]
+ };
+ }
+ else if (node.kind === 198) {
+ return {
+ kind: ts.ScriptElementKind.localClassElement,
+ displayParts: [ts.punctuationPart(18), ts.textPart("anonymous local class"), ts.punctuationPart(19)]
+ };
+ }
+ else {
+ return { kind: ts.getNodeKind(node), displayParts: [] };
+ }
+ }
+ function toHighlightSpan(entry) {
+ if (entry.type === "span") {
+ var fileName_1 = entry.fileName, textSpan = entry.textSpan;
+ return { fileName: fileName_1, span: { textSpan: textSpan, kind: ts.HighlightSpanKind.reference } };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ var fileName = entry.node.getSourceFile().fileName;
+ var writeAccess = isWriteAccess(node);
+ var span = {
+ textSpan: getTextSpan(node),
+ kind: writeAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference,
+ isInString: isInString
+ };
+ return { fileName: fileName, span: span };
+ }
+ FindAllReferences.toHighlightSpan = toHighlightSpan;
+ function getTextSpan(node) {
+ var start = node.getStart();
+ var end = node.getEnd();
+ if (node.kind === 9) {
+ start += 1;
+ end -= 1;
+ }
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ function isWriteAccess(node) {
+ if (node.kind === 70 && ts.isDeclarationName(node)) {
+ return true;
+ }
+ var parent = node.parent;
+ if (parent) {
+ if (parent.kind === 192 || parent.kind === 191) {
+ return true;
+ }
+ else if (parent.kind === 193 && parent.left === node) {
+ var operator = parent.operatorToken.kind;
+ return 57 <= operator && operator <= 69;
+ }
+ }
+ return false;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ var Core;
+ (function (Core) {
+ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ if (node.kind === 264) {
+ return undefined;
+ }
+ if (!options.implementations) {
+ var special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken);
+ if (special) {
+ return special;
+ }
+ }
+ var symbol = checker.getSymbolAtLocation(node);
+ if (!symbol) {
+ if (!options.implementations && node.kind === 9) {
+ return getReferencesForStringLiteral(node, sourceFiles, cancellationToken);
+ }
+ return undefined;
+ }
+ if (!symbol.declarations || !symbol.declarations.length) {
+ return undefined;
+ }
+ return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
+ }
+ Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
+ if (ts.isTypeKeyword(node.kind)) {
+ return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
+ }
if (ts.isLabelName(node)) {
if (ts.isJumpStatementTarget(node)) {
var labelDefinition = ts.getTargetLabel(node.parent, node.text);
- return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined;
+ return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition);
}
else {
return getLabelReferencesInNode(node.parent, node);
}
}
if (ts.isThis(node)) {
- return getReferencesForThisKeyword(node, sourceFiles);
+ return getReferencesForThisKeyword(node, sourceFiles, cancellationToken);
}
if (node.kind === 96) {
return getReferencesForSuperKeyword(node);
}
- }
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (!implementations && !symbol && node.kind === 9) {
- return getReferencesForStringLiteral(node, sourceFiles);
- }
- if (!symbol) {
return undefined;
}
- var declarations = symbol.declarations;
- if (!declarations || !declarations.length) {
- return undefined;
- }
- var result;
- var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), declarations);
- var declaredName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var scope = getSymbolScope(symbol);
- var symbolToIndex = [];
- if (scope) {
- result = [];
- getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
- }
- else {
- var internedName = getInternedName(symbol, node);
- for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
- var sourceFile = sourceFiles_8[_i];
- cancellationToken.throwIfCancellationRequested();
- var nameTable = ts.getNameTable(sourceFile);
- if (nameTable[internedName] !== undefined) {
- result = result || [];
- getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
+ function getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options) {
+ symbol = skipPastExportOrImportSpecifier(symbol, node, checker);
+ var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), symbol.declarations);
+ var result = [];
+ var state = createState(sourceFiles, node, checker, cancellationToken, searchMeaning, options, result);
+ var search = state.createSearch(node, symbol, undefined, { allSearchSymbols: populateSearchSymbolSet(symbol, node, checker, options.implementations) });
+ var scope = getSymbolScope(symbol);
+ if (scope) {
+ getReferencesInContainer(scope, scope.getSourceFile(), search, state);
+ }
+ else {
+ for (var _i = 0, _a = state.sourceFiles; _i < _a.length; _i++) {
+ var sourceFile = _a[_i];
+ state.cancellationToken.throwIfCancellationRequested();
+ searchForName(sourceFile, search, state);
}
}
+ return result;
}
- return result;
- function getDefinition(symbol) {
- var info = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, node.getSourceFile(), ts.getContainerNode(node), node);
- var name = ts.map(info.displayParts, function (p) { return p.text; }).join("");
- var declarations = symbol.declarations;
- if (!declarations || declarations.length === 0) {
- return undefined;
+ function skipPastExportOrImportSpecifier(symbol, node, checker) {
+ var parent = node.parent;
+ if (ts.isExportSpecifier(parent)) {
+ return getLocalSymbolForExportSpecifier(node, symbol, parent, checker);
}
- return {
- containerKind: "",
- containerName: "",
- name: name,
- kind: info.symbolKind,
- fileName: declarations[0].getSourceFile().fileName,
- textSpan: ts.createTextSpan(declarations[0].getStart(), 0),
- displayParts: info.displayParts
- };
+ if (ts.isImportSpecifier(parent) && parent.propertyName === node) {
+ return checker.getImmediateAliasedSymbol(symbol);
+ }
+ return symbol;
}
- function getAliasSymbolForPropertyNameSymbol(symbol, location) {
- if (symbol.flags & 8388608) {
- var defaultImport = ts.getDeclarationOfKind(symbol, 236);
- if (defaultImport) {
- return typeChecker.getAliasedSymbol(symbol);
+ function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
+ var symbolIdToReferences = [];
+ var inheritsFromCache = ts.createMap();
+ var sourceFileToSeenSymbols = [];
+ var isForConstructor = originalLocation.kind === 122;
+ var importTracker;
+ return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference,
+ markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() });
+ function getImportSearches(exportSymbol, exportInfo) {
+ if (!importTracker)
+ importTracker = FindAllReferences.createImportTracker(sourceFiles, checker, cancellationToken);
+ return importTracker(exportSymbol, exportInfo, options.isForRename);
+ }
+ function createSearch(location, symbol, comingFrom, searchOptions) {
+ if (searchOptions === void 0) { searchOptions = {}; }
+ var _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(checker, symbol, location)) : _a, _b = searchOptions.allSearchSymbols, allSearchSymbols = _b === void 0 ? undefined : _b;
+ var escapedText = ts.escapeIdentifier(text);
+ var parents = options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, checker);
+ return { location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents, includes: includes };
+ function includes(referenceSymbol) {
+ return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol;
+ }
+ }
+ function referenceAdder(referenceSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(referenceSymbol);
+ var references = symbolIdToReferences[symbolId];
+ if (!references) {
+ references = symbolIdToReferences[symbolId] = [];
+ result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ }
+ return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
+ }
+ function addStringOrCommentReference(fileName, textSpan) {
+ result.push({
+ definition: undefined,
+ references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
+ });
+ }
+ function markSearchedSymbol(sourceFile, symbol) {
+ var sourceId = ts.getNodeId(sourceFile);
+ var symbolId = ts.getSymbolId(symbol);
+ var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
+ }
+ }
+ function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
+ var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
+ if (singleReferences.length) {
+ var addRef = state.referenceAdder(exportSymbol, exportLocation);
+ for (var _i = 0, singleReferences_1 = singleReferences; _i < singleReferences_1.length; _i++) {
+ var singleRef = singleReferences_1[_i];
+ addRef(singleRef);
+ }
+ }
+ for (var _b = 0, importSearches_1 = importSearches; _b < importSearches_1.length; _b++) {
+ var _c = importSearches_1[_b], importLocation = _c[0], importSymbol = _c[1];
+ getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1), state);
+ }
+ if (indirectUsers.length) {
+ var indirectSearch = void 0;
+ switch (exportInfo.exportKind) {
+ case 0:
+ indirectSearch = state.createSearch(exportLocation, exportSymbol, 1);
+ break;
+ case 1:
+ indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
+ break;
+ case 2:
+ break;
}
- var importOrExportSpecifier = ts.forEach(symbol.declarations, function (declaration) { return (declaration.kind === 239 ||
- declaration.kind === 243) ? declaration : undefined; });
- if (importOrExportSpecifier &&
- (!importOrExportSpecifier.propertyName ||
- importOrExportSpecifier.propertyName === location)) {
- return importOrExportSpecifier.kind === 239 ?
- typeChecker.getAliasedSymbol(symbol) :
- typeChecker.getExportSpecifierLocalTargetSymbol(importOrExportSpecifier);
+ if (indirectSearch) {
+ for (var _d = 0, indirectUsers_1 = indirectUsers; _d < indirectUsers_1.length; _d++) {
+ var indirectUser = indirectUsers_1[_d];
+ searchForName(indirectUser, indirectSearch, state);
+ }
}
}
- return undefined;
}
- function followAliasIfNecessary(symbol, location) {
- return getAliasSymbolForPropertyNameSymbol(symbol, location) || symbol;
+ function searchForImportedSymbol(symbol, state) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ getReferencesInSourceFile(declaration.getSourceFile(), state.createSearch(declaration, symbol, 0), state);
+ }
}
- function getPropertySymbolOfDestructuringAssignment(location) {
+ function searchForName(sourceFile, search, state) {
+ if (ts.getNameTable(sourceFile).get(search.escapedText) !== undefined) {
+ getReferencesInSourceFile(sourceFile, search, state);
+ }
+ }
+ function getPropertySymbolOfDestructuringAssignment(location, checker) {
return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) &&
- typeChecker.getPropertySymbolOfDestructuringAssignment(location);
+ checker.getPropertySymbolOfDestructuringAssignment(location);
}
function isObjectBindingPatternElementWithoutPropertyName(symbol) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175);
return bindingElement &&
- bindingElement.parent.kind === 172 &&
+ bindingElement.parent.kind === 173 &&
!bindingElement.propertyName;
}
- function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol) {
+ function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) {
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174);
- var typeOfPattern = typeChecker.getTypeAtLocation(bindingElement.parent);
- return typeOfPattern && typeChecker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175);
+ var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent);
+ return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
}
return undefined;
}
- function getInternedName(symbol, location) {
- if (ts.isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- symbol = localExportDefaultSymbol || symbol;
- return ts.stripQuotes(symbol.name);
- }
function getSymbolScope(symbol) {
- var valueDeclaration = symbol.valueDeclaration;
- if (valueDeclaration && (valueDeclaration.kind === 184 || valueDeclaration.kind === 197)) {
+ var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration;
+ if (valueDeclaration && (valueDeclaration.kind === 185 || valueDeclaration.kind === 198)) {
return valueDeclaration;
}
- if (symbol.flags & (4 | 8192)) {
- var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (ts.getModifierFlags(d) & 8) ? d : undefined; });
+ if (!declarations) {
+ return undefined;
+ }
+ if (flags & (4 | 8192)) {
+ var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); });
if (privateDeclaration) {
- return ts.getAncestor(privateDeclaration, 226);
+ return ts.getAncestor(privateDeclaration, 228);
}
}
- if (symbol.flags & 8388608) {
+ if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
}
- if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
+ if (parent && !((parent.flags & 1536) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
return undefined;
}
- if (symbol.parent || (symbol.flags & 268435456)) {
+ if ((flags & 134217728 && symbol.checkFlags & 6)) {
return undefined;
}
var scope;
- var declarations = symbol.getDeclarations();
- if (declarations) {
- for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
- var declaration = declarations_7[_i];
- var container = ts.getContainerNode(declaration);
- if (!container) {
- return undefined;
- }
- if (scope && scope !== container) {
- return undefined;
- }
- if (container.kind === 261 && !ts.isExternalModule(container)) {
- return undefined;
- }
- scope = container;
+ for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
+ var declaration = declarations_10[_i];
+ var container = ts.getContainerNode(declaration);
+ if (scope && scope !== container) {
+ return undefined;
}
+ if (!container || container.kind === 264 && !ts.isExternalOrCommonJsModule(container)) {
+ return undefined;
+ }
+ scope = container;
}
- return scope;
+ return parent ? scope.getSourceFile() : scope;
}
function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
var positions = [];
@@ -56390,7 +62546,6 @@ var ts;
var symbolNameLength = symbolName.length;
var position = text.indexOf(symbolName, start);
while (position >= 0) {
- cancellationToken.throwIfCancellationRequested();
if (position > end)
break;
var endPosition = position + symbolNameLength;
@@ -56407,242 +62562,277 @@ var ts;
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
+ var position = possiblePositions_1[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.getWidth() !== labelName.length) {
- return;
+ continue;
}
if (node === targetLabel ||
(ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = {
- containerKind: "",
- containerName: "",
- fileName: targetLabel.getSourceFile().fileName,
- kind: ts.ScriptElementKind.label,
- name: labelName,
- textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()),
- displayParts: [ts.displayPart(labelName, ts.SymbolDisplayPartKind.text)]
- };
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "label", node: targetLabel }, references: references }];
}
function isValidReferencePosition(node, searchSymbolName) {
- if (node) {
- switch (node.kind) {
- case 70:
- return node.getWidth() === searchSymbolName.length;
- case 9:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- isNameOfExternalModuleImportOrDeclaration(node)) {
- return node.getWidth() === searchSymbolName.length + 2;
- }
- break;
- case 8:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- return node.getWidth() === searchSymbolName.length;
- }
- break;
+ switch (node && node.kind) {
+ case 70:
+ return node.getWidth() === searchSymbolName.length;
+ case 9:
+ return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
+ node.getWidth() === searchSymbolName.length + 2;
+ case 8:
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ default:
+ return false;
+ }
+ }
+ function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken) {
+ var references = [];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
+ cancellationToken.throwIfCancellationRequested();
+ addReferencesForKeywordInFile(sourceFile, keywordKind, ts.tokenToString(keywordKind), references);
+ }
+ return references.length ? [{ definition: { type: "keyword", node: references[0].node }, references: references }] : undefined;
+ }
+ function addReferencesForKeywordInFile(sourceFile, kind, searchText, references) {
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile.getStart(), sourceFile.getEnd());
+ for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
+ var position = possiblePositions_2[_i];
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (referenceLocation.kind === kind) {
+ references.push(FindAllReferences.nodeEntry(referenceLocation));
}
}
- return false;
}
- function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) {
- var sourceFile = container.getSourceFile();
- var start = findInComments ? container.getFullStart() : container.getStart();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, start, container.getEnd());
- var parents = getParentSymbolsOfPropertyAccess();
- var inheritsFromCache = ts.createMap();
- if (possiblePositions.length) {
- var searchSymbols_1 = populateSearchSymbolSet(searchSymbol, searchLocation);
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
- if (!isValidReferencePosition(referenceLocation, searchText)) {
- if (!implementations && ((findInStrings && ts.isInString(sourceFile, position)) ||
- (findInComments && ts.isInNonReferenceComment(sourceFile, position)))) {
- result.push({
- definition: undefined,
- references: [{
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpan(position, searchText.length),
- isWriteAccess: false,
- isDefinition: false
- }]
- });
- }
- return;
- }
- if (!(ts.getMeaningFromLocation(referenceLocation) & searchMeaning)) {
- return;
- }
- var referenceSymbol = typeChecker.getSymbolAtLocation(referenceLocation);
- if (referenceSymbol) {
- var referenceSymbolDeclaration = referenceSymbol.valueDeclaration;
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration);
- var relatedSymbol = getRelatedSymbol(searchSymbols_1, referenceSymbol, referenceLocation, searchLocation.kind === 122, parents, inheritsFromCache);
- if (relatedSymbol) {
- addReferenceToRelatedSymbol(referenceLocation, relatedSymbol);
- }
- else if (!(referenceSymbol.flags & 67108864) && searchSymbols_1.indexOf(shorthandValueSymbol) >= 0) {
- addReferenceToRelatedSymbol(referenceSymbolDeclaration.name, shorthandValueSymbol);
- }
- else if (searchLocation.kind === 122) {
- findAdditionalConstructorReferences(referenceSymbol, referenceLocation);
- }
- }
- });
+ function getReferencesInSourceFile(sourceFile, search, state) {
+ state.cancellationToken.throwIfCancellationRequested();
+ return getReferencesInContainer(sourceFile, sourceFile, search, state);
+ }
+ function getReferencesInContainer(container, sourceFile, search, state) {
+ if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
+ return;
}
- return;
- function getParentSymbolsOfPropertyAccess() {
- if (implementations) {
- var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(searchLocation);
- if (propertyAccessExpression) {
- var localParentType = typeChecker.getTypeAtLocation(propertyAccessExpression.expression);
- if (localParentType) {
- if (localParentType.symbol && localParentType.symbol.flags & (32 | 64) && localParentType.symbol !== searchSymbol.parent) {
- return [localParentType.symbol];
- }
- else if (localParentType.flags & 196608) {
- return getSymbolsForClassAndInterfaceComponents(localParentType);
- }
- }
- }
+ var start = state.findInComments ? container.getFullStart() : container.getStart();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, search.text, start, container.getEnd());
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ getReferencesAtLocation(sourceFile, position, search, state);
+ }
+ }
+ function getReferencesAtLocation(sourceFile, position, search, state) {
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (!isValidReferencePosition(referenceLocation, search.text)) {
+ if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
+ return;
+ }
+ if (!(ts.getMeaningFromLocation(referenceLocation) & state.searchMeaning)) {
+ return;
+ }
+ var referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation);
+ if (!referenceSymbol) {
+ return;
+ }
+ var parent = referenceLocation.parent;
+ if (ts.isImportSpecifier(parent) && parent.propertyName === referenceLocation) {
+ return;
+ }
+ if (ts.isExportSpecifier(parent)) {
+ ts.Debug.assert(referenceLocation.kind === 70);
+ getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state);
+ return;
}
- function getPropertyAccessExpressionFromRightHandSide(node) {
- return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ var relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
+ if (!relatedSymbol) {
+ getReferenceForShorthandProperty(referenceSymbol, search, state);
+ return;
+ }
+ if (state.isForConstructor) {
+ findConstructorReferences(referenceLocation, sourceFile, search, state);
}
- function findAdditionalConstructorReferences(referenceSymbol, referenceLocation) {
- ts.Debug.assert(ts.isClassLike(searchSymbol.valueDeclaration));
- var referenceClass = referenceLocation.parent;
- if (referenceSymbol === searchSymbol && ts.isClassLike(referenceClass)) {
- ts.Debug.assert(referenceClass.name === referenceLocation);
- addReferences(findOwnConstructorCalls(searchSymbol));
+ else {
+ addReference(referenceLocation, relatedSymbol, search.location, state);
+ }
+ getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
+ }
+ function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ var exportDeclaration = parent.parent;
+ var localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker);
+ if (!search.includes(localSymbol)) {
+ return;
+ }
+ if (!propertyName) {
+ addRef();
+ }
+ else if (referenceLocation === propertyName) {
+ if (!exportDeclaration.moduleSpecifier) {
+ addRef();
}
- else {
- var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
- if (classExtending && ts.isClassLike(classExtending) && followAliasIfNecessary(referenceSymbol, referenceLocation) === searchSymbol) {
- addReferences(superConstructorAccesses(classExtending));
- }
+ if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ addReference(name, referenceSymbol, name, state);
}
}
- function addReferences(references) {
- if (references.length) {
- var referencedSymbol = getReferencedSymbol(searchSymbol);
- ts.addRange(referencedSymbol.references, ts.map(references, getReferenceEntryFromNode));
+ else {
+ if (state.markSeenReExportRHS(referenceLocation)) {
+ addRef();
}
}
- function findOwnConstructorCalls(classSymbol) {
- var result = [];
- for (var _i = 0, _a = classSymbol.members["__constructor"].declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150);
- var ctrKeyword = decl.getChildAt(0);
- ts.Debug.assert(ctrKeyword.kind === 122);
- result.push(ctrKeyword);
- }
- ts.forEachProperty(classSymbol.exports, function (member) {
- var decl = member.valueDeclaration;
- if (decl && decl.kind === 149) {
- var body = decl.body;
- if (body) {
- forEachDescendantOfKind(body, 98, function (thisKeyword) {
- if (ts.isNewExpressionTarget(thisKeyword)) {
- result.push(thisKeyword);
- }
- });
- }
- }
- });
- return result;
+ if (!(referenceLocation === propertyName && state.isForRename)) {
+ var exportKind = referenceLocation.originalKeywordKind === 78 ? 1 : 0;
+ var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
+ ts.Debug.assert(!!exportInfo);
+ searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state);
+ }
+ if (search.comingFrom !== 1 && exportDeclaration.moduleSpecifier && !propertyName) {
+ searchForImportedSymbol(state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier), state);
+ }
+ function addRef() {
+ addReference(referenceLocation, localSymbol, search.location, state);
+ }
+ }
+ function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) {
+ return isExportSpecifierAlias(referenceLocation, exportSpecifier) ? checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) : referenceSymbol;
+ }
+ function isExportSpecifierAlias(referenceLocation, exportSpecifier) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ ts.Debug.assert(propertyName === referenceLocation || name === referenceLocation);
+ if (propertyName) {
+ return propertyName === referenceLocation;
}
- function superConstructorAccesses(cls) {
- var symbol = cls.symbol;
- var ctr = symbol.members["__constructor"];
- if (!ctr) {
- return [];
+ else {
+ return !parent.parent.moduleSpecifier;
+ }
+ }
+ function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) {
+ var importOrExport = FindAllReferences.getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1);
+ if (!importOrExport)
+ return;
+ var symbol = importOrExport.symbol;
+ if (importOrExport.kind === 0) {
+ if (!state.isForRename || importOrExport.isNamedImport) {
+ searchForImportedSymbol(symbol, state);
}
- var result = [];
- for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150);
+ }
+ else {
+ searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state);
+ }
+ }
+ function getReferenceForShorthandProperty(_a, search, state) {
+ var flags = _a.flags, valueDeclaration = _a.valueDeclaration;
+ var shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration);
+ if (!(flags & 134217728) && search.includes(shorthandValueSymbol)) {
+ addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ }
+ }
+ function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
+ var addRef = state.referenceAdder(relatedSymbol, searchLocation);
+ if (state.implementations) {
+ addImplementationReferences(referenceLocation, addRef, state);
+ }
+ else {
+ addRef(referenceLocation);
+ }
+ }
+ function findConstructorReferences(referenceLocation, sourceFile, search, state) {
+ if (ts.isNewExpressionTarget(referenceLocation)) {
+ addReference(referenceLocation, search.symbol, search.location, state);
+ }
+ var pusher = state.referenceAdder(search.symbol, search.location);
+ if (ts.isClassLike(referenceLocation.parent)) {
+ ts.Debug.assert(referenceLocation.parent.name === referenceLocation);
+ findOwnConstructorReferences(search.symbol, sourceFile, pusher);
+ }
+ else {
+ var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
+ if (classExtending && ts.isClassLike(classExtending)) {
+ findSuperConstructorAccesses(classExtending, pusher);
+ }
+ }
+ }
+ function getPropertyAccessExpressionFromRightHandSide(node) {
+ return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ }
+ function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
+ for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ var ctrKeyword = ts.findChildOfKind(decl, 122, sourceFile);
+ ts.Debug.assert(decl.kind === 151 && !!ctrKeyword);
+ addNode(ctrKeyword);
+ }
+ classSymbol.exports.forEach(function (member) {
+ var decl = member.valueDeclaration;
+ if (decl && decl.kind === 150) {
var body = decl.body;
if (body) {
- forEachDescendantOfKind(body, 96, function (node) {
- if (ts.isCallExpressionTarget(node)) {
- result.push(node);
+ forEachDescendantOfKind(body, 98, function (thisKeyword) {
+ if (ts.isNewExpressionTarget(thisKeyword)) {
+ addNode(thisKeyword);
}
});
}
}
- ;
- return result;
+ });
+ }
+ function findSuperConstructorAccesses(cls, addNode) {
+ var symbol = cls.symbol;
+ var ctr = symbol.members.get("__constructor");
+ if (!ctr) {
+ return;
}
- function getReferencedSymbol(symbol) {
- var symbolId = ts.getSymbolId(symbol);
- var index = symbolToIndex[symbolId];
- if (index === undefined) {
- index = result.length;
- symbolToIndex[symbolId] = index;
- result.push({
- definition: getDefinition(symbol),
- references: []
+ for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ ts.Debug.assert(decl.kind === 151);
+ var body = decl.body;
+ if (body) {
+ forEachDescendantOfKind(body, 96, function (node) {
+ if (ts.isCallExpressionTarget(node)) {
+ addNode(node);
+ }
});
}
- return result[index];
- }
- function addReferenceToRelatedSymbol(node, relatedSymbol) {
- var references = getReferencedSymbol(relatedSymbol).references;
- if (implementations) {
- getImplementationReferenceEntryForNode(node, references);
- }
- else {
- references.push(getReferenceEntryFromNode(node));
- }
}
}
- function getImplementationReferenceEntryForNode(refNode, result) {
+ function addImplementationReferences(refNode, addReference, state) {
if (ts.isDeclarationName(refNode) && isImplementation(refNode.parent)) {
- result.push(getReferenceEntryFromNode(refNode.parent));
+ addReference(refNode.parent);
+ return;
}
- else if (refNode.kind === 70) {
- if (refNode.parent.kind === 258) {
- getReferenceEntriesForShorthandPropertyAssignment(refNode, typeChecker, result);
- }
- var containingClass = getContainingClassIfInHeritageClause(refNode);
- if (containingClass) {
- result.push(getReferenceEntryFromNode(containingClass));
- return;
- }
- var containingTypeReference = getContainingTypeReference(refNode);
- if (containingTypeReference) {
- var parent_18 = containingTypeReference.parent;
- if (ts.isVariableLike(parent_18) && parent_18.type === containingTypeReference && parent_18.initializer && isImplementationExpression(parent_18.initializer)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.initializer));
- }
- else if (ts.isFunctionLike(parent_18) && parent_18.type === containingTypeReference && parent_18.body) {
- if (parent_18.body.kind === 204) {
- ts.forEachReturnStatement(parent_18.body, function (returnStatement) {
- if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
- maybeAdd(getReferenceEntryFromNode(returnStatement.expression));
- }
- });
- }
- else if (isImplementationExpression(parent_18.body)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.body));
- }
+ if (refNode.kind !== 70) {
+ return;
+ }
+ if (refNode.parent.kind === 261) {
+ getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference);
+ }
+ var containingClass = getContainingClassIfInHeritageClause(refNode);
+ if (containingClass) {
+ addReference(containingClass);
+ return;
+ }
+ var containingTypeReference = getContainingTypeReference(refNode);
+ if (containingTypeReference && state.markSeenContainingTypeReference(containingTypeReference)) {
+ var parent = containingTypeReference.parent;
+ if (ts.isVariableLike(parent) && parent.type === containingTypeReference && parent.initializer && isImplementationExpression(parent.initializer)) {
+ addReference(parent.initializer);
+ }
+ else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) {
+ if (parent.body.kind === 206) {
+ ts.forEachReturnStatement(parent.body, function (returnStatement) {
+ if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
+ addReference(returnStatement.expression);
+ }
+ });
}
- else if (ts.isAssertionExpression(parent_18) && isImplementationExpression(parent_18.expression)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.expression));
+ else if (isImplementationExpression(parent.body)) {
+ addReference(parent.body);
}
}
- }
- function maybeAdd(a) {
- if (!ts.forEach(result, function (b) { return a.fileName === b.fileName && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; })) {
- result.push(a);
+ else if (ts.isAssertionExpression(parent) && isImplementationExpression(parent.expression)) {
+ addReference(parent.expression);
}
}
}
@@ -56671,28 +62861,32 @@ var ts;
}
function getContainingClassIfInHeritageClause(node) {
if (node && node.parent) {
- if (node.kind === 199
- && node.parent.kind === 255
+ if (node.kind === 200
+ && node.parent.kind === 258
&& ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
- else if (node.kind === 70 || node.kind === 177) {
+ else if (node.kind === 70 || node.kind === 178) {
return getContainingClassIfInHeritageClause(node.parent);
}
}
return undefined;
}
function isImplementationExpression(node) {
- if (node.kind === 183) {
- return isImplementationExpression(node.expression);
+ switch (node.kind) {
+ case 184:
+ return isImplementationExpression(node.expression);
+ case 186:
+ case 185:
+ case 177:
+ case 198:
+ case 176:
+ return true;
+ default:
+ return false;
}
- return node.kind === 185 ||
- node.kind === 184 ||
- node.kind === 176 ||
- node.kind === 197 ||
- node.kind === 175;
}
- function explicitlyInheritsFrom(child, parent, cachedResults) {
+ function explicitlyInheritsFrom(child, parent, cachedResults, checker) {
var parentIsInterface = parent.getFlags() & 64;
return searchHierarchy(child);
function searchHierarchy(symbol) {
@@ -56700,10 +62894,11 @@ var ts;
return true;
}
var key = ts.getSymbolId(symbol) + "," + ts.getSymbolId(parent);
- if (key in cachedResults) {
- return cachedResults[key];
+ var cached = cachedResults.get(key);
+ if (cached !== undefined) {
+ return cached;
}
- cachedResults[key] = false;
+ cachedResults.set(key, false);
var inherits = ts.forEach(symbol.getDeclarations(), function (declaration) {
if (ts.isClassLike(declaration)) {
if (parentIsInterface) {
@@ -56719,19 +62914,19 @@ var ts;
}
return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
}
- else if (declaration.kind === 227) {
+ else if (declaration.kind === 229) {
if (parentIsInterface) {
return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference);
}
}
return false;
});
- cachedResults[key] = inherits;
+ cachedResults.set(key, inherits);
return inherits;
}
function searchTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type && type.symbol) {
return searchHierarchy(type.symbol);
}
@@ -56746,13 +62941,13 @@ var ts;
}
var staticFlag = 32;
switch (searchSpaceNode.kind) {
- case 147:
- case 146:
- case 149:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
+ case 153:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent;
break;
@@ -56762,51 +62957,51 @@ var ts;
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.kind !== 96) {
- return;
+ continue;
}
var container = ts.getSuperContainer(node, false);
if (container && (32 & ts.getModifierFlags(container)) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = getDefinition(searchSpaceNode.symbol);
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "symbol", symbol: searchSpaceNode.symbol, node: superKeyword }, references: references }];
}
- function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) {
+ function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {
var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false);
var staticFlag = 32;
switch (searchSpaceNode.kind) {
+ case 150:
case 149:
- case 148:
if (ts.isObjectLiteralMethod(searchSpaceNode)) {
break;
}
+ case 148:
case 147:
- case 146:
- case 150:
case 151:
case 152:
+ case 153:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent;
break;
- case 261:
+ case 264:
if (ts.isExternalModule(searchSpaceNode)) {
return undefined;
}
- case 225:
- case 184:
+ case 227:
+ case 185:
break;
default:
return undefined;
}
var references = [];
var possiblePositions;
- if (searchSpaceNode.kind === 261) {
+ if (searchSpaceNode.kind === 264) {
ts.forEach(sourceFiles, function (sourceFile) {
+ cancellationToken.throwIfCancellationRequested();
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
@@ -56816,139 +63011,109 @@ var ts;
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
- var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword);
- var displayParts = thisOrSuperSymbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), ts.getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts;
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: "this",
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: displayParts
- },
+ definition: { type: "this", node: thisOrSuperKeyword },
references: references
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
var node = ts.getTouchingWord(sourceFile, position);
if (!node || !ts.isThis(node)) {
return;
}
var container = ts.getThisContainer(node, false);
switch (searchSpaceNode.kind) {
- case 184:
- case 225:
+ case 185:
+ case 227:
if (searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
+ case 150:
case 149:
- case 148:
if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 197:
- case 226:
+ case 198:
+ case 228:
if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32) === staticFlag) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 261:
- if (container.kind === 261 && !ts.isExternalModule(container)) {
- result.push(getReferenceEntryFromNode(node));
+ case 264:
+ if (container.kind === 264 && !ts.isExternalModule(container)) {
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
}
});
}
}
- function getReferencesForStringLiteral(node, sourceFiles) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (!type) {
- return undefined;
- }
+ function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_9 = sourceFiles; _i < sourceFiles_9.length; _i++) {
- var sourceFile = sourceFiles_9[_i];
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, type.text, sourceFile.getStart(), sourceFile.getEnd());
- getReferencesForStringLiteralInFile(sourceFile, type, possiblePositions, references);
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_i];
+ cancellationToken.throwIfCancellationRequested();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: type.text,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: [ts.displayPart(ts.getTextOfNode(node), ts.SymbolDisplayPartKind.stringLiteral)]
- },
+ definition: { type: "string", node: node },
references: references
}];
- function getReferencesForStringLiteralInFile(sourceFile, searchType, possiblePositions, references) {
- for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
- var position = possiblePositions_1[_i];
- cancellationToken.throwIfCancellationRequested();
- var node_2 = ts.getTouchingWord(sourceFile, position);
- if (!node_2 || node_2.kind !== 9) {
- return;
- }
- var type_2 = ts.getStringLiteralTypeForNode(node_2, typeChecker);
- if (type_2 === searchType) {
- references.push(getReferenceEntryFromNode(node_2));
+ function getReferencesForStringLiteralInFile(sourceFile, searchText, possiblePositions, references) {
+ for (var _i = 0, possiblePositions_5 = possiblePositions; _i < possiblePositions_5.length; _i++) {
+ var position = possiblePositions_5[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position);
+ if (node_7 && node_7.kind === 9 && node_7.text === searchText) {
+ references.push(FindAllReferences.nodeEntry(node_7, true));
}
}
}
}
- function populateSearchSymbolSet(symbol, location) {
+ function populateSearchSymbolSet(symbol, location, checker, implementations) {
var result = [symbol];
- var containingObjectLiteralElement = getContainingObjectLiteralElement(location);
- if (containingObjectLiteralElement && containingObjectLiteralElement.kind !== 258) {
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(location);
- if (propertySymbol) {
- result.push(propertySymbol);
- }
- }
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(symbol, location);
- if (aliasSymbol) {
- result = result.concat(populateSearchSymbolSet(aliasSymbol, location));
- }
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location);
if (containingObjectLiteralElement) {
- ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- ts.addRange(result, typeChecker.getRootSymbols(contextualSymbol));
+ if (containingObjectLiteralElement.kind !== 261) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker);
+ if (propertySymbol) {
+ result.push(propertySymbol);
+ }
+ }
+ ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker), function (contextualSymbol) {
+ ts.addRange(result, checker.getRootSymbols(contextualSymbol));
});
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent);
+ var shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent);
if (shorthandValueSymbol) {
result.push(shorthandValueSymbol);
}
}
- if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 144 &&
+ if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 &&
ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) {
- result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
+ ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
}
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol);
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);
if (bindingElementPropertySymbol) {
result.push(bindingElementPropertySymbol);
}
- ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
+ for (var _i = 0, _a = checker.getRootSymbols(symbol); _i < _a.length; _i++) {
+ var rootSymbol = _a[_i];
if (rootSymbol !== symbol) {
result.push(rootSymbol);
}
if (!implementations && rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) {
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap());
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap(), checker);
}
- });
+ }
return result;
}
- function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) {
+ function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache, checker) {
if (!symbol) {
return;
}
- if (symbol.name in previousIterationSymbolsCache) {
+ if (previousIterationSymbolsCache.has(symbol.name)) {
return;
}
if (symbol.flags & (32 | 64)) {
@@ -56957,7 +63122,7 @@ var ts;
getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference);
}
- else if (declaration.kind === 227) {
+ else if (declaration.kind === 229) {
ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference);
}
});
@@ -56965,62 +63130,56 @@ var ts;
return;
function getPropertySymbolFromTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type) {
- var propertySymbol = typeChecker.getPropertyOfType(type, propertyName);
+ var propertySymbol = checker.getPropertyOfType(type, propertyName);
if (propertySymbol) {
- result.push.apply(result, typeChecker.getRootSymbols(propertySymbol));
+ result.push.apply(result, checker.getRootSymbols(propertySymbol));
}
- previousIterationSymbolsCache[symbol.name] = symbol;
- getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache);
+ previousIterationSymbolsCache.set(symbol.name, symbol);
+ getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache, checker);
}
}
}
}
- function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation, searchLocationIsConstructor, parents, cache) {
- if (ts.contains(searchSymbols, referenceSymbol)) {
- return (!searchLocationIsConstructor || ts.isNewExpressionTarget(referenceLocation)) && referenceSymbol;
- }
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(referenceSymbol, referenceLocation);
- if (aliasSymbol) {
- return getRelatedSymbol(searchSymbols, aliasSymbol, referenceLocation, searchLocationIsConstructor, parents, cache);
+ function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {
+ if (search.includes(referenceSymbol)) {
+ return referenceSymbol;
}
- var containingObjectLiteralElement = getContainingObjectLiteralElement(referenceLocation);
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(referenceLocation);
if (containingObjectLiteralElement) {
- var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, state.checker), function (contextualSymbol) {
+ return ts.find(state.checker.getRootSymbols(contextualSymbol), search.includes);
});
if (contextualSymbol) {
return contextualSymbol;
}
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation);
- if (propertySymbol && searchSymbols.indexOf(propertySymbol) >= 0) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation, state.checker);
+ if (propertySymbol && search.includes(propertySymbol)) {
return propertySymbol;
}
}
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol);
- if (bindingElementPropertySymbol && searchSymbols.indexOf(bindingElementPropertySymbol) >= 0) {
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol, state.checker);
+ if (bindingElementPropertySymbol && search.includes(bindingElementPropertySymbol)) {
return bindingElementPropertySymbol;
}
- return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) {
- if (searchSymbols.indexOf(rootSymbol) >= 0) {
+ return ts.forEach(state.checker.getRootSymbols(referenceSymbol), function (rootSymbol) {
+ if (search.includes(rootSymbol)) {
return rootSymbol;
}
if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) {
- if (parents) {
- if (!ts.forEach(parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, cache); })) {
- return undefined;
- }
+ if (search.parents && !ts.some(search.parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, state.checker); })) {
+ return undefined;
}
- var result_4 = [];
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_4, ts.createMap());
- return ts.forEach(result_4, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var result = [];
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap(), state.checker);
+ return ts.find(result, search.includes);
}
return undefined;
});
}
function getNameFromObjectLiteralElement(node) {
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
var nameExpression = node.name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -57029,15 +63188,15 @@ var ts;
}
return node.name.text;
}
- function getPropertySymbolsFromContextualType(node) {
+ function getPropertySymbolsFromContextualType(node, checker) {
var objectLiteral = node.parent;
- var contextualType = typeChecker.getContextualType(objectLiteral);
+ var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
var result_5 = [];
- var symbol_2 = contextualType.getProperty(name);
- if (symbol_2) {
- result_5.push(symbol_2);
+ var symbol = contextualType.getProperty(name);
+ if (symbol) {
+ result_5.push(symbol);
}
if (contextualType.flags & 65536) {
ts.forEach(contextualType.types, function (t) {
@@ -57056,8 +63215,8 @@ var ts;
var lastIterationMeaning = void 0;
do {
lastIterationMeaning = meaning;
- for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
- var declaration = declarations_8[_i];
+ for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
+ var declaration = declarations_11[_i];
var declarationMeaning = ts.getMeaningFromDeclaration(declaration);
if (declarationMeaning & meaning) {
meaning |= declarationMeaning;
@@ -57067,137 +63226,86 @@ var ts;
}
return meaning;
}
- }
- FindAllReferences.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
- function convertReferences(referenceSymbols) {
- if (!referenceSymbols) {
- return undefined;
- }
- var referenceEntries = [];
- for (var _i = 0, referenceSymbols_1 = referenceSymbols; _i < referenceSymbols_1.length; _i++) {
- var referenceSymbol = referenceSymbols_1[_i];
- ts.addRange(referenceEntries, referenceSymbol.references);
- }
- return referenceEntries;
- }
- FindAllReferences.convertReferences = convertReferences;
- function isImplementation(node) {
- if (!node) {
- return false;
- }
- else if (ts.isVariableLike(node)) {
- if (node.initializer) {
- return true;
- }
- else if (node.kind === 223) {
- var parentStatement = getParentStatementOfVariableDeclaration(node);
- return parentStatement && ts.hasModifier(parentStatement, 2);
+ function isImplementation(node) {
+ if (!node) {
+ return false;
}
- }
- else if (ts.isFunctionLike(node)) {
- return !!node.body || ts.hasModifier(node, 2);
- }
- else {
- switch (node.kind) {
- case 226:
- case 197:
- case 229:
- case 230:
+ else if (ts.isVariableLike(node)) {
+ if (node.initializer) {
return true;
+ }
+ else if (node.kind === 225) {
+ var parentStatement = getParentStatementOfVariableDeclaration(node);
+ return parentStatement && ts.hasModifier(parentStatement, 2);
+ }
+ }
+ else if (ts.isFunctionLike(node)) {
+ return !!node.body || ts.hasModifier(node, 2);
+ }
+ else {
+ switch (node.kind) {
+ case 228:
+ case 198:
+ case 231:
+ case 232:
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- function getParentStatementOfVariableDeclaration(node) {
- if (node.parent && node.parent.parent && node.parent.parent.kind === 205) {
- ts.Debug.assert(node.parent.kind === 224);
- return node.parent.parent;
+ function getParentStatementOfVariableDeclaration(node) {
+ if (node.parent && node.parent.parent && node.parent.parent.kind === 207) {
+ ts.Debug.assert(node.parent.kind === 226);
+ return node.parent.parent;
+ }
}
- }
- function getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result) {
- var refSymbol = typeChecker.getSymbolAtLocation(node);
- var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
- if (shorthandSymbol) {
- for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (ts.getMeaningFromDeclaration(declaration) & 1) {
- result.push(getReferenceEntryFromNode(declaration));
+ function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference) {
+ var refSymbol = checker.getSymbolAtLocation(node);
+ var shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
+ if (shorthandSymbol) {
+ for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.getMeaningFromDeclaration(declaration) & 1) {
+ addReference(declaration);
+ }
}
}
}
- }
- FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
- function getReferenceEntryFromNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- if (node.kind === 9) {
- start += 1;
- end -= 1;
+ Core.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
+ function forEachDescendantOfKind(node, kind, action) {
+ ts.forEachChild(node, function (child) {
+ if (child.kind === kind) {
+ action(child);
+ }
+ forEachDescendantOfKind(child, kind, action);
+ });
}
- return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node)
- };
- }
- FindAllReferences.getReferenceEntryFromNode = getReferenceEntryFromNode;
- function isWriteAccess(node) {
- if (node.kind === 70 && ts.isDeclarationName(node)) {
- return true;
+ function tryGetClassByExtendingIdentifier(node) {
+ return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
}
- var parent = node.parent;
- if (parent) {
- if (parent.kind === 191 || parent.kind === 190) {
- return true;
- }
- else if (parent.kind === 192 && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 57 <= operator && operator <= 69;
+ function isNameOfExternalModuleImportOrDeclaration(node) {
+ if (node.kind === 9) {
+ return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
+ return false;
}
- return false;
- }
- function forEachDescendantOfKind(node, kind, action) {
- ts.forEachChild(node, function (child) {
- if (child.kind === kind) {
- action(child);
+ function getParentSymbolsOfPropertyAccess(location, symbol, checker) {
+ var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(location);
+ if (!propertyAccessExpression) {
+ return undefined;
+ }
+ var localParentType = checker.getTypeAtLocation(propertyAccessExpression.expression);
+ if (!localParentType) {
+ return undefined;
+ }
+ if (localParentType.symbol && localParentType.symbol.flags & (32 | 64) && localParentType.symbol !== symbol.parent) {
+ return [localParentType.symbol];
+ }
+ else if (localParentType.flags & 196608) {
+ return getSymbolsForClassAndInterfaceComponents(localParentType);
}
- forEachDescendantOfKind(child, kind, action);
- });
- }
- function getContainingObjectLiteralElement(node) {
- switch (node.kind) {
- case 9:
- case 8:
- if (node.parent.kind === 142) {
- return isObjectLiteralPropertyDeclaration(node.parent.parent) ? node.parent.parent : undefined;
- }
- case 70:
- return isObjectLiteralPropertyDeclaration(node.parent) && node.parent.name === node ? node.parent : undefined;
- }
- return undefined;
- }
- function isObjectLiteralPropertyDeclaration(node) {
- switch (node.kind) {
- case 257:
- case 258:
- case 149:
- case 151:
- case 152:
- return true;
- }
- return false;
- }
- function tryGetClassByExtendingIdentifier(node) {
- return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
- }
- function isNameOfExternalModuleImportOrDeclaration(node) {
- if (node.kind === 9) {
- return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
- return false;
- }
+ })(Core = FindAllReferences.Core || (FindAllReferences.Core = {}));
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
var ts;
@@ -57215,11 +63323,9 @@ var ts;
}
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
- var referenceFile = program.getResolvedTypeReferenceDirectives()[typeReferenceDirective.fileName];
- if (referenceFile && referenceFile.resolvedFileName) {
- return [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
- }
- return undefined;
+ var referenceFile = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName);
+ return referenceFile && referenceFile.resolvedFileName &&
+ [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
var node = ts.getTouchingPropertyName(sourceFile, position);
if (node === sourceFile) {
@@ -57228,7 +63334,7 @@ var ts;
if (ts.isJumpStatementTarget(node)) {
var labelName = node.text;
var label = ts.getTargetLabel(node.parent, node.text);
- return label ? [createDefinitionInfo(label, ts.ScriptElementKind.label, labelName, undefined)] : undefined;
+ return label ? [createDefinitionInfoFromName(label, ts.ScriptElementKind.label, labelName, undefined)] : undefined;
}
var typeChecker = program.getTypeChecker();
var calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
@@ -57243,11 +63349,11 @@ var ts;
var declaration = symbol.declarations[0];
if (node.kind === 70 &&
(node.parent === declaration ||
- (declaration.kind === 239 && declaration.parent && declaration.parent.kind === 238))) {
+ (declaration.kind === 241 && declaration.parent && declaration.parent.kind === 240))) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
}
- if (node.parent.kind === 258) {
+ if (node.parent.kind === 261) {
var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);
if (!shorthandSymbol) {
return [];
@@ -57258,6 +63364,22 @@ var ts;
var shorthandContainerName_1 = typeChecker.symbolToString(symbol.parent, node);
return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind_1, shorthandSymbolName_1, shorthandContainerName_1); });
}
+ if (ts.isJsxOpeningLikeElement(node.parent)) {
+ var _a = getSymbolInfo(typeChecker, symbol, node), symbolName = _a.symbolName, symbolKind = _a.symbolKind, containerName = _a.containerName;
+ return [createDefinitionInfo(symbol.valueDeclaration, symbolKind, symbolName, containerName)];
+ }
+ var element = ts.getContainingObjectLiteralElement(node);
+ if (element) {
+ if (typeChecker.getContextualType(element.parent)) {
+ var result = [];
+ var propertySymbols = ts.getPropertySymbolsFromContextualType(typeChecker, element);
+ for (var _i = 0, propertySymbols_1 = propertySymbols; _i < propertySymbols_1.length; _i++) {
+ var propertySymbol = propertySymbols_1[_i];
+ result.push.apply(result, getDefinitionFromSymbol(typeChecker, propertySymbol, node));
+ }
+ return result;
+ }
+ }
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
@@ -57321,31 +63443,45 @@ var ts;
return false;
}
function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) {
+ if (!signatureDeclarations) {
+ return false;
+ }
var declarations = [];
var definition;
- ts.forEach(signatureDeclarations, function (d) {
- if ((selectConstructors && d.kind === 150) ||
- (!selectConstructors && (d.kind === 225 || d.kind === 149 || d.kind === 148))) {
+ for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) {
+ var d = signatureDeclarations_1[_i];
+ if (selectConstructors ? d.kind === 151 : isSignatureDeclaration(d)) {
declarations.push(d);
if (d.body)
definition = d;
}
- });
- if (definition) {
- result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName));
- return true;
}
- else if (declarations.length) {
- result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
+ if (declarations.length) {
+ result.push(createDefinitionInfo(definition || ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
return true;
}
return false;
}
}
+ function isSignatureDeclaration(node) {
+ switch (node.kind) {
+ case 151:
+ case 227:
+ case 150:
+ case 149:
+ return true;
+ default:
+ return false;
+ }
+ }
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
+ return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ }
+ function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
+ var sourceFile = name.getSourceFile();
return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromNode(name, sourceFile),
kind: symbolKind,
name: symbolName,
containerKind: undefined,
@@ -57392,37 +63528,16 @@ var ts;
}
function tryGetSignatureDeclaration(typeChecker, node) {
var callLike = getAncestorCallLikeExpression(node);
- return callLike && typeChecker.getResolvedSignature(callLike).declaration;
- }
- })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var GoToImplementation;
- (function (GoToImplementation) {
- function getImplementationAtPosition(typeChecker, cancellationToken, sourceFiles, node) {
- if (node.parent.kind === 258) {
- var result = [];
- ts.FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result);
- return result.length > 0 ? result : undefined;
- }
- else if (node.kind === 96 || ts.isSuperProperty(node.parent)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- return symbol.valueDeclaration && [ts.FindAllReferences.getReferenceEntryFromNode(symbol.valueDeclaration)];
- }
- else {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, false, false, true);
- var result = ts.flatMap(referencedSymbols, function (symbol) {
- return ts.map(symbol.references, function (_a) {
- var textSpan = _a.textSpan, fileName = _a.fileName;
- return ({ textSpan: textSpan, fileName: fileName });
- });
- });
- return result && result.length > 0 ? result : undefined;
+ var signature = callLike && typeChecker.getResolvedSignature(callLike);
+ if (signature) {
+ var decl = signature.declaration;
+ if (decl && isSignatureDeclaration(decl)) {
+ return decl;
+ }
}
+ return undefined;
}
- GoToImplementation.getImplementationAtPosition = getImplementationAtPosition;
- })(GoToImplementation = ts.GoToImplementation || (ts.GoToImplementation = {}));
+ })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -57451,6 +63566,7 @@ var ts;
"lends",
"link",
"memberOf",
+ "method",
"name",
"namespace",
"param",
@@ -57469,7 +63585,8 @@ var ts;
"prop",
"version"
];
- var jsDocCompletionEntries;
+ var jsDocTagNameCompletionEntries;
+ var jsDocTagCompletionEntries;
function getJsDocCommentsFromDeclarations(declarations) {
var documentationComment = [];
forEachUnique(declarations, function (declaration) {
@@ -57490,9 +63607,32 @@ var ts;
return documentationComment;
}
JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations;
+ function getJsDocTagsFromDeclarations(declarations) {
+ var tags = [];
+ forEachUnique(declarations, function (declaration) {
+ var jsDocs = ts.getJSDocs(declaration);
+ if (!jsDocs) {
+ return;
+ }
+ for (var _i = 0, jsDocs_1 = jsDocs; _i < jsDocs_1.length; _i++) {
+ var doc = jsDocs_1[_i];
+ var tagsForDoc = doc.tags;
+ if (tagsForDoc) {
+ tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283; }).map(function (jsDocTag) {
+ return {
+ name: jsDocTag.tagName.text,
+ text: jsDocTag.comment
+ };
+ }));
+ }
+ }
+ });
+ return tags;
+ }
+ JsDoc.getJsDocTagsFromDeclarations = getJsDocTagsFromDeclarations;
function forEachUnique(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (ts.indexOf(array, array[i]) === i) {
var result = callback(array[i], i);
if (result) {
@@ -57503,8 +63643,8 @@ var ts;
}
return undefined;
}
- function getAllJsDocCompletionEntries() {
- return jsDocCompletionEntries || (jsDocCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ function getJSDocTagNameCompletions() {
+ return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
return {
name: tagName,
kind: ts.ScriptElementKind.keyword,
@@ -57513,7 +63653,18 @@ var ts;
};
}));
}
- JsDoc.getAllJsDocCompletionEntries = getAllJsDocCompletionEntries;
+ JsDoc.getJSDocTagNameCompletions = getJSDocTagNameCompletions;
+ function getJSDocTagCompletions() {
+ return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ return {
+ name: "@" + tagName,
+ kind: ts.ScriptElementKind.keyword,
+ kindModifiers: "",
+ sortText: "0"
+ };
+ }));
+ }
+ JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
function getDocCommentTemplateAtPosition(newLine, sourceFile, position) {
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
@@ -57526,16 +63677,16 @@ var ts;
var commentOwner;
findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) {
switch (commentOwner.kind) {
- case 225:
- case 149:
+ case 227:
case 150:
- case 226:
- case 205:
+ case 151:
+ case 228:
+ case 207:
break findOwner;
- case 261:
+ case 264:
return undefined;
- case 230:
- if (commentOwner.parent.kind === 230) {
+ case 232:
+ if (commentOwner.parent.kind === 232) {
return undefined;
}
break findOwner;
@@ -57547,14 +63698,20 @@ var ts;
var parameters = getParametersForJsDocOwningNode(commentOwner);
var posLineAndChar = sourceFile.getLineAndCharacterOfPosition(position);
var lineStart = sourceFile.getLineStarts()[posLineAndChar.line];
- var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character);
+ var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character).replace(/\S/i, function () { return " "; });
+ var isJavaScriptFile = ts.hasJavaScriptFileExtension(sourceFile.fileName);
var docParams = "";
- for (var i = 0, numParams = parameters.length; i < numParams; i++) {
+ for (var i = 0; i < parameters.length; i++) {
var currentName = parameters[i].name;
var paramName = currentName.kind === 70 ?
currentName.text :
"param" + i;
- docParams += indentationStr + " * @param " + paramName + newLine;
+ if (isJavaScriptFile) {
+ docParams += indentationStr + " * @param {any} " + paramName + newLine;
+ }
+ else {
+ docParams += indentationStr + " * @param " + paramName + newLine;
+ }
}
var preamble = "/**" + newLine +
indentationStr + " * ";
@@ -57569,7 +63726,7 @@ var ts;
if (ts.isFunctionLike(commentOwner)) {
return commentOwner.parameters;
}
- if (commentOwner.kind === 205) {
+ if (commentOwner.kind === 207) {
var varStatement = commentOwner;
var varDeclarations = varStatement.declarationList.declarations;
if (varDeclarations.length === 1 && varDeclarations[0].initializer) {
@@ -57579,17 +63736,17 @@ var ts;
return ts.emptyArray;
}
function getParametersFromRightHandSideOfAssignment(rightHandSide) {
- while (rightHandSide.kind === 183) {
+ while (rightHandSide.kind === 184) {
rightHandSide = rightHandSide.expression;
}
switch (rightHandSide.kind) {
- case 184:
case 185:
+ case 186:
return rightHandSide.parameters;
- case 197:
+ case 198:
for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150) {
+ if (member.kind === 151) {
return member.parameters;
}
}
@@ -57601,46 +63758,211 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var JsTyping;
+ (function (JsTyping) {
+ var safeList;
+ var EmptySafeList = ts.createMap();
+ JsTyping.nodeCoreModuleList = [
+ "buffer", "querystring", "events", "http", "cluster",
+ "zlib", "os", "https", "punycode", "repl", "readline",
+ "vm", "child_process", "url", "dns", "net",
+ "dgram", "fs", "path", "string_decoder", "tls",
+ "crypto", "stream", "util", "assert", "tty", "domain",
+ "constants", "process", "v8", "timers", "console"
+ ];
+ var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
+ function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
+ var inferredTypings = ts.createMap();
+ if (!typeAcquisition || !typeAcquisition.enable) {
+ return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
+ }
+ fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
+ var kind = ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f));
+ return kind === 1 || kind === 2;
+ });
+ if (!safeList) {
+ var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
+ safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
+ }
+ var filesToWatch = [];
+ var searchDirs = [];
+ var exclude = [];
+ mergeTypings(typeAcquisition.include);
+ exclude = typeAcquisition.exclude || [];
+ var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
+ if (projectRootPath) {
+ possibleSearchDirs.push(projectRootPath);
+ }
+ searchDirs = ts.deduplicate(possibleSearchDirs);
+ for (var _i = 0, searchDirs_1 = searchDirs; _i < searchDirs_1.length; _i++) {
+ var searchDir = searchDirs_1[_i];
+ var packageJsonPath = ts.combinePaths(searchDir, "package.json");
+ getTypingNamesFromJson(packageJsonPath, filesToWatch);
+ var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
+ getTypingNamesFromJson(bowerJsonPath, filesToWatch);
+ var bowerComponentsPath = ts.combinePaths(searchDir, "bower_components");
+ getTypingNamesFromPackagesFolder(bowerComponentsPath);
+ var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
+ getTypingNamesFromPackagesFolder(nodeModulesPath);
+ }
+ getTypingNamesFromSourceFileNames(fileNames);
+ if (unresolvedImports) {
+ for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
+ var moduleId = unresolvedImports_1[_a];
+ var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
+ if (!inferredTypings.has(typingName)) {
+ inferredTypings.set(typingName, undefined);
+ }
+ }
+ }
+ packageNameToTypingLocation.forEach(function (typingLocation, name) {
+ if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
+ inferredTypings.set(name, typingLocation);
+ }
+ });
+ for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
+ var excludeTypingName = exclude_1[_b];
+ inferredTypings.delete(excludeTypingName);
+ }
+ var newTypingNames = [];
+ var cachedTypingPaths = [];
+ inferredTypings.forEach(function (inferred, typing) {
+ if (inferred !== undefined) {
+ cachedTypingPaths.push(inferred);
+ }
+ else {
+ newTypingNames.push(typing);
+ }
+ });
+ return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
+ function mergeTypings(typingNames) {
+ if (!typingNames) {
+ return;
+ }
+ for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
+ var typing = typingNames_1[_i];
+ if (!inferredTypings.has(typing)) {
+ inferredTypings.set(typing, undefined);
+ }
+ }
+ }
+ function getTypingNamesFromJson(jsonPath, filesToWatch) {
+ if (host.fileExists(jsonPath)) {
+ filesToWatch.push(jsonPath);
+ }
+ var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
+ if (result.config) {
+ var jsonConfig = result.config;
+ if (jsonConfig.dependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
+ }
+ if (jsonConfig.devDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
+ }
+ if (jsonConfig.optionalDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
+ }
+ if (jsonConfig.peerDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
+ }
+ }
+ }
+ function getTypingNamesFromSourceFileNames(fileNames) {
+ var jsFileNames = ts.filter(fileNames, ts.hasJavaScriptFileExtension);
+ var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
+ var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
+ if (safeList !== EmptySafeList) {
+ mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
+ }
+ var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
+ if (hasJsxFile) {
+ mergeTypings(["react"]);
+ }
+ }
+ function getTypingNamesFromPackagesFolder(packagesFolderPath) {
+ filesToWatch.push(packagesFolderPath);
+ if (!host.directoryExists(packagesFolderPath)) {
+ return;
+ }
+ var typingNames = [];
+ var fileNames = host.readDirectory(packagesFolderPath, [".json"], undefined, undefined, 2);
+ for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
+ var fileName = fileNames_2[_i];
+ var normalizedFileName = ts.normalizePath(fileName);
+ var baseFileName = ts.getBaseFileName(normalizedFileName);
+ if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
+ continue;
+ }
+ var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
+ if (!result.config) {
+ continue;
+ }
+ var packageJson = result.config;
+ if (baseFileName === "package.json" && packageJson._requiredBy &&
+ ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
+ continue;
+ }
+ if (!packageJson.name) {
+ continue;
+ }
+ if (packageJson.typings) {
+ var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
+ inferredTypings.set(packageJson.name, absolutePath);
+ }
+ else {
+ typingNames.push(packageJson.name);
+ }
+ }
+ mergeTypings(typingNames);
+ }
+ }
+ JsTyping.discoverTypings = discoverTypings;
+ })(JsTyping = ts.JsTyping || (ts.JsTyping = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var NavigateTo;
(function (NavigateTo) {
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- ts.forEach(sourceFiles, function (sourceFile) {
+ var _loop_4 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
- return;
+ return "continue";
}
- var nameToDeclarations = sourceFile.getNamedDeclarations();
- for (var name_46 in nameToDeclarations) {
- var declarations = nameToDeclarations[name_46];
+ ts.forEachEntry(sourceFile.getNamedDeclarations(), function (declarations, name) {
if (declarations) {
- var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_46);
+ var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name);
if (!matches) {
- continue;
+ return;
}
- for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
- var declaration = declarations_9[_i];
+ for (var _i = 0, declarations_12 = declarations; _i < declarations_12.length; _i++) {
+ var declaration = declarations_12[_i];
if (patternMatcher.patternContainsDots) {
var containers = getContainers(declaration);
if (!containers) {
- return undefined;
+ return true;
}
- matches = patternMatcher.getMatches(containers, name_46);
+ matches = patternMatcher.getMatches(containers, name);
if (!matches) {
- continue;
+ return;
}
}
var fileName = sourceFile.fileName;
var matchKind = bestMatchKind(matches);
- rawItems.push({ name: name_46, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
+ rawItems.push({ name: name, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
}
}
- }
- });
+ });
+ };
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
+ _loop_4(sourceFile);
+ }
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
- if (decl.kind === 236 || decl.kind === 239 || decl.kind === 234) {
+ if (decl.kind === 238 || decl.kind === 241 || decl.kind === 236) {
var importer = checker.getSymbolAtLocation(decl.name);
var imported = checker.getAliasedSymbol(importer);
return importer.name !== imported.name;
@@ -57681,7 +64003,7 @@ var ts;
if (text !== undefined) {
containers.unshift(text);
}
- else if (declaration.name.kind === 142) {
+ else if (declaration.name.kind === 143) {
return tryAddComputedPropertyName(declaration.name.expression, containers, true);
}
else {
@@ -57698,7 +64020,7 @@ var ts;
}
return true;
}
- if (expression.kind === 177) {
+ if (expression.kind === 178) {
var propertyAccess = expression;
if (includeLastPortion) {
containers.unshift(propertyAccess.name.text);
@@ -57709,7 +64031,7 @@ var ts;
}
function getContainers(declaration) {
var containers = [];
- if (declaration.name.kind === 142) {
+ if (declaration.name.kind === 143) {
if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) {
return undefined;
}
@@ -57750,7 +64072,7 @@ var ts;
matchKind: ts.PatternMatchKind[rawItem.matchKind],
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
- textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()),
+ textSpan: ts.createTextSpanFromNode(declaration),
containerName: container && container.name ? container.name.text : "",
containerKind: container && container.name ? ts.getNodeKind(container) : ""
};
@@ -57763,21 +64085,41 @@ var ts;
(function (ts) {
var NavigationBar;
(function (NavigationBar) {
- function getNavigationBarItems(sourceFile) {
+ var whiteSpaceRegex = /\s+/g;
+ var curCancellationToken;
+ var curSourceFile;
+ var parentsStack = [];
+ var parent;
+ var emptyChildItemArray = [];
+ function getNavigationBarItems(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
- curSourceFile = undefined;
- return result;
+ try {
+ return ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationBarItems = getNavigationBarItems;
- function getNavigationTree(sourceFile) {
+ function getNavigationTree(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = convertToTree(rootNavigationBarNode(sourceFile));
- curSourceFile = undefined;
- return result;
+ try {
+ return convertToTree(rootNavigationBarNode(sourceFile));
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationTree = getNavigationTree;
- var curSourceFile;
+ function reset() {
+ curSourceFile = undefined;
+ curCancellationToken = undefined;
+ parentsStack = [];
+ parent = undefined;
+ emptyChildItemArray = [];
+ }
function nodeText(node) {
return node.getText(curSourceFile);
}
@@ -57792,8 +64134,6 @@ var ts;
parent.children = [child];
}
}
- var parentsStack = [];
- var parent;
function rootNavigationBarNode(sourceFile) {
ts.Debug.assert(!parentsStack.length);
var root = { node: sourceFile, additionalNodes: undefined, parent: undefined, children: undefined, indent: 0 };
@@ -57837,11 +64177,12 @@ var ts;
endNode();
}
function addChildrenRecursively(node) {
+ curCancellationToken.throwIfCancellationRequested();
if (!node || ts.isToken(node)) {
return;
}
switch (node.kind) {
- case 150:
+ case 151:
var ctr = node;
addNodeWithRecursiveChild(ctr, ctr.body);
for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) {
@@ -57851,28 +64192,28 @@ var ts;
}
}
break;
- case 149:
- case 151:
+ case 150:
case 152:
- case 148:
+ case 153:
+ case 149:
if (!ts.hasDynamicName(node)) {
addNodeWithRecursiveChild(node, node.body);
}
break;
+ case 148:
case 147:
- case 146:
if (!ts.hasDynamicName(node)) {
addLeafNode(node);
}
break;
- case 236:
+ case 238:
var importClause = node;
if (importClause.name) {
addLeafNode(importClause);
}
var namedBindings = importClause.namedBindings;
if (namedBindings) {
- if (namedBindings.kind === 237) {
+ if (namedBindings.kind === 239) {
addLeafNode(namedBindings);
}
else {
@@ -57883,12 +64224,12 @@ var ts;
}
}
break;
- case 174:
- case 223:
+ case 175:
+ case 225:
var decl = node;
- var name_47 = decl.name;
- if (ts.isBindingPattern(name_47)) {
- addChildrenRecursively(name_47);
+ var name = decl.name;
+ if (ts.isBindingPattern(name)) {
+ addChildrenRecursively(name);
}
else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) {
addChildrenRecursively(decl.initializer);
@@ -57897,12 +64238,12 @@ var ts;
addNodeWithRecursiveChild(decl, decl.initializer);
}
break;
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
addNodeWithRecursiveChild(node, node.body);
break;
- case 229:
+ case 231:
startNode(node);
for (var _d = 0, _e = node.members; _d < _e.length; _d++) {
var member = _e[_d];
@@ -57912,9 +64253,9 @@ var ts;
}
endNode();
break;
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
+ case 229:
startNode(node);
for (var _f = 0, _g = node.members; _f < _g.length; _f++) {
var member = _g[_f];
@@ -57922,21 +64263,21 @@ var ts;
}
endNode();
break;
- case 230:
+ case 232:
addNodeWithRecursiveChild(node, getInteriorModule(node).body);
break;
- case 243:
- case 234:
- case 155:
- case 153:
+ case 245:
+ case 236:
+ case 156:
case 154:
- case 228:
+ case 155:
+ case 230:
addLeafNode(node);
break;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 285) {
+ if (tag.kind === 289) {
addLeafNode(tag);
}
});
@@ -57952,9 +64293,9 @@ var ts;
if (!name) {
return true;
}
- var itemsWithSameName = nameToItems[name];
+ var itemsWithSameName = nameToItems.get(name);
if (!itemsWithSameName) {
- nameToItems[name] = child;
+ nameToItems.set(name, child);
return true;
}
if (itemsWithSameName instanceof Array) {
@@ -57972,7 +64313,7 @@ var ts;
if (tryMerge(itemWithSameName, child)) {
return false;
}
- nameToItems[name] = [itemWithSameName, child];
+ nameToItems.set(name, [itemWithSameName, child]);
return true;
}
function tryMerge(a, b) {
@@ -57984,12 +64325,12 @@ var ts;
}
});
function shouldReallyMerge(a, b) {
- return a.kind === b.kind && (a.kind !== 230 || areSameModule(a, b));
+ return a.kind === b.kind && (a.kind !== 232 || areSameModule(a, b));
function areSameModule(a, b) {
if (a.body.kind !== b.body.kind) {
return false;
}
- if (a.body.kind !== 230) {
+ if (a.body.kind !== 232) {
return true;
}
return areSameModule(a.body, b.body);
@@ -58015,32 +64356,15 @@ var ts;
function compareChildren(child1, child2) {
var name1 = tryGetName(child1.node), name2 = tryGetName(child2.node);
if (name1 && name2) {
- var cmp = localeCompareFix(name1, name2);
+ var cmp = ts.compareStringsCaseInsensitive(name1, name2);
return cmp !== 0 ? cmp : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
else {
return name1 ? 1 : name2 ? -1 : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
}
- var localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
- var localeCompareFix = localeCompareIsCorrect ? ts.collator.compare : function (a, b) {
- for (var i = 0; i < Math.min(a.length, b.length); i++) {
- var chA = a.charAt(i), chB = b.charAt(i);
- if (chA === "\"" && chB === "'") {
- return 1;
- }
- if (chA === "'" && chB === "\"") {
- return -1;
- }
- var cmp = ts.compareStrings(chA.toLocaleLowerCase(), chB.toLocaleLowerCase());
- if (cmp !== 0) {
- return cmp;
- }
- }
- return a.length - b.length;
- };
function tryGetName(node) {
- if (node.kind === 230) {
+ if (node.kind === 232) {
return getModuleName(node);
}
var decl = node;
@@ -58048,18 +64372,18 @@ var ts;
return ts.getPropertyNameForPropertyNameNode(decl.name);
}
switch (node.kind) {
- case 184:
case 185:
- case 197:
+ case 186:
+ case 198:
return getFunctionOrClassName(node);
- case 285:
+ case 289:
return getJSDocTypedefTagName(node);
default:
return undefined;
}
}
function getItemName(node) {
- if (node.kind === 230) {
+ if (node.kind === 232) {
return getModuleName(node);
}
var name = node.name;
@@ -58070,29 +64394,29 @@ var ts;
}
}
switch (node.kind) {
- case 261:
+ case 264:
var sourceFile = node;
return ts.isExternalModule(sourceFile)
? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\""
: "<global>";
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
- case 226:
- case 197:
+ case 228:
+ case 198:
if (ts.getModifierFlags(node) & 512) {
return "default";
}
return getFunctionOrClassName(node);
- case 150:
+ case 151:
return "constructor";
- case 154:
+ case 155:
return "new()";
- case 153:
+ case 154:
return "()";
- case 155:
+ case 156:
return "[]";
- case 285:
+ case 289:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -58104,7 +64428,7 @@ var ts;
}
else {
var parentNode = node.parent && node.parent.parent;
- if (parentNode && parentNode.kind === 205) {
+ if (parentNode && parentNode.kind === 207) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70) {
@@ -58132,24 +64456,24 @@ var ts;
return topLevel;
function isTopLevel(item) {
switch (navigationBarNodeKind(item)) {
- case 226:
- case 197:
+ case 228:
+ case 198:
+ case 231:
case 229:
- case 227:
+ case 232:
+ case 264:
case 230:
- case 261:
- case 228:
- case 285:
+ case 289:
return true;
- case 150:
- case 149:
case 151:
+ case 150:
case 152:
- case 223:
+ case 153:
+ case 225:
return hasSomeImportantChild(item);
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
return isTopLevelFunctionDeclaration(item);
default:
return false;
@@ -58159,10 +64483,10 @@ var ts;
return false;
}
switch (navigationBarNodeKind(item.parent)) {
- case 231:
- case 261:
- case 149:
+ case 233:
+ case 264:
case 150:
+ case 151:
return true;
default:
return hasSomeImportantChild(item);
@@ -58171,17 +64495,16 @@ var ts;
function hasSomeImportantChild(item) {
return ts.forEach(item.children, function (child) {
var childKind = navigationBarNodeKind(child);
- return childKind !== 223 && childKind !== 174;
+ return childKind !== 225 && childKind !== 175;
});
}
}
}
- var emptyChildItemArray = [];
function convertToTree(n) {
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToTree)
};
@@ -58190,7 +64513,7 @@ var ts;
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToChildItem) || emptyChildItemArray,
indent: n.indent,
@@ -58226,35 +64549,41 @@ var ts;
}
var result = [];
result.push(moduleDeclaration.name.text);
- while (moduleDeclaration.body && moduleDeclaration.body.kind === 230) {
+ while (moduleDeclaration.body && moduleDeclaration.body.kind === 232) {
moduleDeclaration = moduleDeclaration.body;
result.push(moduleDeclaration.name.text);
}
return result.join(".");
}
function getInteriorModule(decl) {
- return decl.body.kind === 230 ? getInteriorModule(decl.body) : decl;
+ return decl.body.kind === 232 ? getInteriorModule(decl.body) : decl;
}
function isComputedProperty(member) {
- return !member.name || member.name.kind === 142;
+ return !member.name || member.name.kind === 143;
}
function getNodeSpan(node) {
- return node.kind === 261
+ return node.kind === 264
? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd())
- : ts.createTextSpanFromBounds(node.getStart(curSourceFile), node.getEnd());
+ : ts.createTextSpanFromNode(node, curSourceFile);
+ }
+ function getModifiers(node) {
+ if (node.parent && node.parent.kind === 225) {
+ node = node.parent;
+ }
+ return ts.getNodeModifiers(node);
}
function getFunctionOrClassName(node) {
if (node.name && ts.getFullWidth(node.name) > 0) {
return ts.declarationNameToString(node.name);
}
- else if (node.parent.kind === 223) {
+ else if (node.parent.kind === 225) {
return ts.declarationNameToString(node.parent.name);
}
- else if (node.parent.kind === 192 &&
+ else if (node.parent.kind === 193 &&
node.parent.operatorToken.kind === 57) {
return nodeText(node.parent.left).replace(whiteSpaceRegex, "");
}
- else if (node.parent.kind === 257 && node.parent.name) {
+ else if (node.parent.kind === 260 && node.parent.name) {
return nodeText(node.parent.name);
}
else if (ts.getModifierFlags(node) & 512) {
@@ -58265,38 +64594,37 @@ var ts;
}
}
function isFunctionOrClassExpression(node) {
- return node.kind === 184 || node.kind === 185 || node.kind === 197;
+ return node.kind === 185 || node.kind === 186 || node.kind === 198;
}
- var whiteSpaceRegex = /\s+/g;
})(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var OutliningElementsCollector;
(function (OutliningElementsCollector) {
- function collectElements(sourceFile) {
+ function collectElements(sourceFile, cancellationToken) {
var elements = [];
var collapseText = "...";
function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) {
if (hintSpanNode && startElement && endElement) {
- var span_12 = {
+ var span_13 = {
textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end),
- hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
+ hintSpan: ts.createTextSpanFromNode(hintSpanNode, sourceFile),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_12);
+ elements.push(span_13);
}
}
function addOutliningSpanComments(commentSpan, autoCollapse) {
if (commentSpan) {
- var span_13 = {
+ var span_14 = {
textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_13);
+ elements.push(span_14);
}
}
function addOutliningForLeadingCommentsForNode(n) {
@@ -58308,6 +64636,7 @@ var ts;
var singleLineCommentCount = 0;
for (var _i = 0, comments_4 = comments; _i < comments_4.length; _i++) {
var currentComment = comments_4[_i];
+ cancellationToken.throwIfCancellationRequested();
if (currentComment.kind === 2) {
if (isFirstSingleLineComment) {
firstSingleLineCommentStart = currentComment.pos;
@@ -58330,19 +64659,20 @@ var ts;
function combineAndAddMultipleSingleLineComments(count, start, end) {
if (count > 1) {
var multipleSingleLineComments = {
+ kind: 2,
pos: start,
end: end,
- kind: 2
};
addOutliningSpanComments(multipleSingleLineComments, false);
}
}
function autoCollapse(node) {
- return ts.isFunctionBlock(node) && node.parent.kind !== 185;
+ return ts.isFunctionBlock(node) && node.parent.kind !== 186;
}
var depth = 0;
var maxDepth = 20;
function walk(n) {
+ cancellationToken.throwIfCancellationRequested();
if (depth > maxDepth) {
return;
}
@@ -58350,26 +64680,26 @@ var ts;
addOutliningForLeadingCommentsForNode(n);
}
switch (n.kind) {
- case 204:
+ case 206:
if (!ts.isFunctionBlock(n)) {
- var parent_19 = n.parent;
+ var parent = n.parent;
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
- if (parent_19.kind === 209 ||
- parent_19.kind === 212 ||
- parent_19.kind === 213 ||
- parent_19.kind === 211 ||
- parent_19.kind === 208 ||
- parent_19.kind === 210 ||
- parent_19.kind === 217 ||
- parent_19.kind === 256) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ if (parent.kind === 211 ||
+ parent.kind === 214 ||
+ parent.kind === 215 ||
+ parent.kind === 213 ||
+ parent.kind === 210 ||
+ parent.kind === 212 ||
+ parent.kind === 219 ||
+ parent.kind === 259) {
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- if (parent_19.kind === 221) {
- var tryStatement = parent_19;
+ if (parent.kind === 223) {
+ var tryStatement = parent;
if (tryStatement.tryBlock === n) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
else if (tryStatement.finallyBlock === n) {
@@ -58380,32 +64710,32 @@ var ts;
}
}
}
- var span_14 = ts.createTextSpanFromBounds(n.getStart(), n.end);
+ var span_15 = ts.createTextSpanFromNode(n);
elements.push({
- textSpan: span_14,
- hintSpan: span_14,
+ textSpan: span_15,
+ hintSpan: span_15,
bannerText: collapseText,
autoCollapse: autoCollapse(n)
});
break;
}
- case 231: {
+ case 233: {
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 226:
- case 227:
+ case 228:
case 229:
- case 176:
- case 232: {
+ case 231:
+ case 177:
+ case 234: {
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 175:
+ case 176:
var openBracket = ts.findChildOfKind(n, 20, sourceFile);
var closeBracket = ts.findChildOfKind(n, 21, sourceFile);
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
@@ -58482,10 +64812,11 @@ var ts;
return totalMatch;
}
function getWordSpans(word) {
- if (!(word in stringToWordSpans)) {
- stringToWordSpans[word] = breakIntoWordSpans(word);
+ var spans = stringToWordSpans.get(word);
+ if (!spans) {
+ stringToWordSpans.set(word, spans = breakIntoWordSpans(word));
}
- return stringToWordSpans[word];
+ return spans;
}
function matchTextChunk(candidate, chunk, punctuationStripped) {
var index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
@@ -58502,9 +64833,9 @@ var ts;
if (index > 0) {
var wordSpans = getWordSpans(candidate);
for (var _i = 0, wordSpans_1 = wordSpans; _i < wordSpans_1.length; _i++) {
- var span_15 = wordSpans_1[_i];
- if (partStartsWith(candidate, span_15, chunk.text, true)) {
- return createPatternMatch(PatternMatchKind.substring, punctuationStripped, partStartsWith(candidate, span_15, chunk.text, false));
+ var span_16 = wordSpans_1[_i];
+ if (partStartsWith(candidate, span_16, chunk.text, true)) {
+ return createPatternMatch(PatternMatchKind.substring, punctuationStripped, partStartsWith(candidate, span_16, chunk.text, false));
}
}
}
@@ -58667,7 +64998,8 @@ var ts;
return str === str.toLowerCase();
}
function indexOfIgnoringCase(string, value) {
- for (var i = 0, n = string.length - value.length; i <= n; i++) {
+ var n = string.length - value.length;
+ for (var i = 0; i <= n; i++) {
if (startsWithIgnoringCase(string, value, i)) {
return i;
}
@@ -58675,7 +65007,7 @@ var ts;
return -1;
}
function startsWithIgnoringCase(string, value, start) {
- for (var i = 0, n = value.length; i < n; i++) {
+ for (var i = 0; i < value.length; i++) {
var ch1 = toLowerCase(string.charCodeAt(i + start));
var ch2 = value.charCodeAt(i);
if (ch1 !== ch2) {
@@ -58743,7 +65075,7 @@ var ts;
function breakIntoSpans(identifier, word) {
var result = [];
var wordStart = 0;
- for (var i = 1, n = identifier.length; i < n; i++) {
+ for (var i = 1; i < identifier.length; i++) {
var lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
var currentIsDigit = isDigit(identifier.charCodeAt(i));
var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
@@ -58917,7 +65249,7 @@ var ts;
else {
if (token === 70 || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58943,7 +65275,7 @@ var ts;
}
if (token === 17) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58957,7 +65289,7 @@ var ts;
token = nextToken();
if (token === 70 || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58983,7 +65315,7 @@ var ts;
}
if (token === 17) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58993,7 +65325,7 @@ var ts;
}
else if (token === 38) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -59120,90 +65452,85 @@ var ts;
var Rename;
(function (Rename) {
function getRenameInfo(typeChecker, defaultLibFileName, getCanonicalFileName, sourceFile, position) {
- var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName));
+ var getCanonicalDefaultLibName = ts.memoize(function () { return getCanonicalFileName(ts.normalizePath(defaultLibFileName)); });
var node = ts.getTouchingWord(sourceFile, position, true);
- if (node) {
- if (node.kind === 70 ||
- node.kind === 9 ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- ts.isThis(node)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (symbol) {
- var declarations = symbol.getDeclarations();
- if (declarations && declarations.length > 0) {
- if (ts.forEach(declarations, isDefinedInLibraryFile)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
- if (kind) {
- return {
- canRename: true,
- kind: kind,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: typeChecker.getFullyQualifiedName(symbol),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
- else if (node.kind === 9) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (type) {
- if (isDefinedInLibraryFile(node)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- else {
- var displayName = ts.stripQuotes(type.text);
- return {
- canRename: true,
- kind: ts.ScriptElementKind.variableElement,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: displayName,
- kindModifiers: ts.ScriptElementKindModifier.none,
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
+ var renameInfo = node && nodeIsEligibleForRename(node)
+ ? getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile)
+ : undefined;
+ return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element);
+ function isDefinedInLibraryFile(declaration) {
+ if (!defaultLibFileName) {
+ return false;
}
+ var sourceFile = declaration.getSourceFile();
+ var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile.fileName));
+ return canonicalName === getCanonicalDefaultLibName();
}
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element));
- function getRenameInfoError(localizedErrorMessage) {
- return {
- canRename: false,
- localizedErrorMessage: localizedErrorMessage,
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- };
- }
- function isDefinedInLibraryFile(declaration) {
- if (defaultLibFileName) {
- var sourceFile_1 = declaration.getSourceFile();
- var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_1.fileName));
- if (canonicalName === canonicalDefaultLibName) {
- return true;
+ }
+ Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ if (symbol) {
+ var declarations = symbol.getDeclarations();
+ if (declarations && declarations.length > 0) {
+ if (ts.some(declarations, isDefinedInLibraryFile)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
+ if (node.kind === 70 &&
+ node.originalKeywordKind === 78 &&
+ symbol.parent.flags & 1536) {
+ return undefined;
+ }
+ var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
+ var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
+ return kind ? getRenameInfoSuccess(displayName, typeChecker.getFullyQualifiedName(symbol), kind, ts.SymbolDisplay.getSymbolModifiers(symbol), node, sourceFile) : undefined;
}
- return false;
}
- function createTriggerSpanForNode(node, sourceFile) {
- var start = node.getStart(sourceFile);
- var width = node.getWidth(sourceFile);
- if (node.kind === 9) {
- start += 1;
- width -= 2;
+ else if (node.kind === 9) {
+ if (isDefinedInLibraryFile(node)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
- return ts.createTextSpan(start, width);
+ var displayName = ts.stripQuotes(node.text);
+ return getRenameInfoSuccess(displayName, displayName, ts.ScriptElementKind.variableElement, ts.ScriptElementKindModifier.none, node, sourceFile);
}
}
- Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) {
+ return {
+ canRename: true,
+ kind: kind,
+ displayName: displayName,
+ localizedErrorMessage: undefined,
+ fullDisplayName: fullDisplayName,
+ kindModifiers: kindModifiers,
+ triggerSpan: createTriggerSpanForNode(node, sourceFile)
+ };
+ }
+ function getRenameInfoError(diagnostic) {
+ return {
+ canRename: false,
+ localizedErrorMessage: ts.getLocaleSpecificMessage(diagnostic),
+ displayName: undefined,
+ fullDisplayName: undefined,
+ kind: undefined,
+ kindModifiers: undefined,
+ triggerSpan: undefined
+ };
+ }
+ function createTriggerSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var width = node.getWidth(sourceFile);
+ if (node.kind === 9) {
+ start += 1;
+ width -= 2;
+ }
+ return ts.createTextSpan(start, width);
+ }
+ function nodeIsEligibleForRename(node) {
+ return node.kind === 70 ||
+ node.kind === 9 ||
+ ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
+ ts.isThis(node);
+ }
})(Rename = ts.Rename || (ts.Rename = {}));
})(ts || (ts = {}));
var ts;
@@ -59211,6 +65538,13 @@ var ts;
var SignatureHelp;
(function (SignatureHelp) {
var emptyArray = [];
+ var ArgumentListKind;
+ (function (ArgumentListKind) {
+ ArgumentListKind[ArgumentListKind["TypeArguments"] = 0] = "TypeArguments";
+ ArgumentListKind[ArgumentListKind["CallArguments"] = 1] = "CallArguments";
+ ArgumentListKind[ArgumentListKind["TaggedTemplateArguments"] = 2] = "TaggedTemplateArguments";
+ ArgumentListKind[ArgumentListKind["JSXAttributesArguments"] = 3] = "JSXAttributesArguments";
+ })(ArgumentListKind = SignatureHelp.ArgumentListKind || (SignatureHelp.ArgumentListKind = {}));
function getSignatureHelpItems(program, sourceFile, position, cancellationToken) {
var typeChecker = program.getTypeChecker();
var startingToken = ts.findTokenOnLeftOfPosition(sourceFile, position);
@@ -59236,14 +65570,14 @@ var ts;
}
SignatureHelp.getSignatureHelpItems = getSignatureHelpItems;
function createJavaScriptSignatureHelpItems(argumentInfo, program) {
- if (argumentInfo.invocation.kind !== 179) {
+ if (argumentInfo.invocation.kind !== 180) {
return undefined;
}
var callExpression = argumentInfo.invocation;
var expression = callExpression.expression;
var name = expression.kind === 70
? expression
- : expression.kind === 177
+ : expression.kind === 178
? expression.name
: undefined;
if (!name || !name.text) {
@@ -59253,10 +65587,10 @@ var ts;
for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) {
var sourceFile = _a[_i];
var nameToDeclarations = sourceFile.getNamedDeclarations();
- var declarations = nameToDeclarations[name.text];
+ var declarations = nameToDeclarations.get(name.text);
if (declarations) {
- for (var _b = 0, declarations_10 = declarations; _b < declarations_10.length; _b++) {
- var declaration = declarations_10[_b];
+ for (var _b = 0, declarations_13 = declarations; _b < declarations_13.length; _b++) {
+ var declaration = declarations_13[_b];
var symbol = declaration.symbol;
if (symbol) {
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
@@ -59272,7 +65606,7 @@ var ts;
}
}
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 179 || node.parent.kind === 180) {
+ if (node.parent.kind === 180 || node.parent.kind === 181) {
var callExpression = node.parent;
if (node.kind === 26 ||
node.kind === 18) {
@@ -59304,23 +65638,23 @@ var ts;
}
return undefined;
}
- else if (node.kind === 12 && node.parent.kind === 181) {
+ else if (node.kind === 12 && node.parent.kind === 182) {
if (ts.isInsideTemplateLiteral(node, position)) {
return getArgumentListInfoForTemplate(node.parent, 0, sourceFile);
}
}
- else if (node.kind === 13 && node.parent.parent.kind === 181) {
+ else if (node.kind === 13 && node.parent.parent.kind === 182) {
var templateExpression = node.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194);
+ ts.Debug.assert(templateExpression.kind === 195);
var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1;
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
- else if (node.parent.kind === 202 && node.parent.parent.parent.kind === 181) {
+ else if (node.parent.kind === 204 && node.parent.parent.parent.kind === 182) {
var templateSpan = node.parent;
var templateExpression = templateSpan.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194);
+ ts.Debug.assert(templateExpression.kind === 195);
if (node.kind === 15 && !ts.isInsideTemplateLiteral(node, position)) {
return undefined;
}
@@ -59328,8 +65662,20 @@ var ts;
var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position);
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
+ else if (node.parent && ts.isJsxOpeningLikeElement(node.parent)) {
+ var attributeSpanStart = node.parent.attributes.getFullStart();
+ var attributeSpanEnd = ts.skipTrivia(sourceFile.text, node.parent.attributes.getEnd(), false);
+ return {
+ kind: 3,
+ invocation: node.parent,
+ argumentsSpan: ts.createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),
+ argumentIndex: 0,
+ argumentCount: 1
+ };
+ }
return undefined;
}
+ SignatureHelp.getImmediatelyContainingArgumentInfo = getImmediatelyContainingArgumentInfo;
function getArgumentIndex(argumentsList, node) {
var argumentIndex = 0;
var listChildren = argumentsList.getChildren();
@@ -59384,7 +65730,7 @@ var ts;
var template = taggedTemplate.template;
var applicableSpanStart = template.getStart();
var applicableSpanEnd = template.getEnd();
- if (template.kind === 194) {
+ if (template.kind === 195) {
var lastSpan = ts.lastOrUndefined(template.templateSpans);
if (lastSpan.literal.getFullWidth() === 0) {
applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false);
@@ -59393,7 +65739,7 @@ var ts;
return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);
}
function getContainingArgumentInfo(node, position, sourceFile) {
- for (var n = node; n.kind !== 261; n = n.parent) {
+ for (var n = node; n.kind !== 264; n = n.parent) {
if (ts.isFunctionBlock(n)) {
return undefined;
}
@@ -59476,7 +65822,8 @@ var ts;
suffixDisplayParts: suffixDisplayParts,
separatorDisplayParts: [ts.punctuationPart(25), ts.spacePart()],
parameters: signatureHelpParameters,
- documentation: candidateSignature.getDocumentationComment()
+ documentation: candidateSignature.getDocumentationComment(),
+ tags: candidateSignature.getJsDocTags()
};
});
var argumentIndex = argumentListInfo.argumentIndex;
@@ -59523,9 +65870,9 @@ var ts;
var SymbolDisplay;
(function (SymbolDisplay) {
function getSymbolKind(typeChecker, symbol, location) {
- var flags = symbol.getFlags();
+ var flags = symbol.flags;
if (flags & 32)
- return ts.getDeclarationOfKind(symbol, 197) ?
+ return ts.getDeclarationOfKind(symbol, 198) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
if (flags & 384)
return ts.ScriptElementKind.enumElement;
@@ -59535,12 +65882,12 @@ var ts;
return ts.ScriptElementKind.interfaceElement;
if (flags & 262144)
return ts.ScriptElementKind.typeParameterElement;
- var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location);
+ var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
if (result === ts.ScriptElementKind.unknown) {
if (flags & 262144)
return ts.ScriptElementKind.typeParameterElement;
if (flags & 8)
- return ts.ScriptElementKind.variableElement;
+ return ts.ScriptElementKind.enumMemberElement;
if (flags & 8388608)
return ts.ScriptElementKind.alias;
if (flags & 1536)
@@ -59549,7 +65896,7 @@ var ts;
return result;
}
SymbolDisplay.getSymbolKind = getSymbolKind;
- function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location) {
+ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) {
if (typeChecker.isUndefinedSymbol(symbol)) {
return ts.ScriptElementKind.variableElement;
}
@@ -59559,6 +65906,7 @@ var ts;
if (location.kind === 98 && ts.isExpression(location)) {
return ts.ScriptElementKind.parameterElement;
}
+ var flags = symbol.flags;
if (flags & 3) {
if (ts.isFirstDeclarationOfSymbolParameter(symbol)) {
return ts.ScriptElementKind.parameterElement;
@@ -59582,7 +65930,7 @@ var ts;
if (flags & 16384)
return ts.ScriptElementKind.constructorImplementationElement;
if (flags & 4) {
- if (flags & 268435456) {
+ if (flags & 134217728 && symbol.checkFlags & 6) {
var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
var rootSymbolFlags = rootSymbol.getFlags();
if (rootSymbolFlags & (98308 | 3)) {
@@ -59599,6 +65947,9 @@ var ts;
}
return unionPropertyKind;
}
+ if (location.parent && ts.isJsxAttribute(location.parent)) {
+ return ts.ScriptElementKind.jsxAttribute;
+ }
return ts.ScriptElementKind.memberVariableElement;
}
return ts.ScriptElementKind.unknown;
@@ -59613,8 +65964,9 @@ var ts;
if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); }
var displayParts = [];
var documentation;
+ var tags;
var symbolFlags = symbol.flags;
- var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, symbolFlags, location);
+ var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
var hasAddedSymbolInfo;
var isThisExpression = location.kind === 98 && ts.isExpression(location);
var type;
@@ -59625,26 +65977,29 @@ var ts;
var signature = void 0;
type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location);
if (type) {
- if (location.parent && location.parent.kind === 177) {
+ if (location.parent && location.parent.kind === 178) {
var right = location.parent.name;
if (right === location || (right && right.getFullWidth() === 0)) {
location = location.parent;
}
}
- var callExpression = void 0;
- if (location.kind === 179 || location.kind === 180) {
- callExpression = location;
+ var callExpressionLike = void 0;
+ if (location.kind === 180 || location.kind === 181) {
+ callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
- callExpression = location.parent;
+ callExpressionLike = location.parent;
}
- if (callExpression) {
+ else if (location.parent && ts.isJsxOpeningLikeElement(location.parent) && ts.isFunctionLike(symbol.valueDeclaration)) {
+ callExpressionLike = location.parent;
+ }
+ if (callExpressionLike) {
var candidateSignatures = [];
- signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures);
+ signature = typeChecker.getResolvedSignature(callExpressionLike, candidateSignatures);
if (!signature && candidateSignatures.length) {
signature = candidateSignatures[0];
}
- var useConstructSignatures = callExpression.kind === 180 || callExpression.expression.kind === 96;
+ var useConstructSignatures = callExpressionLike.kind === 181 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96);
var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) {
signature = allSignatures.length ? allSignatures[0] : undefined;
@@ -59668,6 +66023,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
switch (symbolKind) {
+ case ts.ScriptElementKind.jsxAttribute:
case ts.ScriptElementKind.memberVariableElement:
case ts.ScriptElementKind.variableElement:
case ts.ScriptElementKind.constElement:
@@ -59692,21 +66048,21 @@ var ts;
}
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) ||
- (location.kind === 122 && location.parent.kind === 150)) {
+ (location.kind === 122 && location.parent.kind === 151)) {
var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 150 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ var allSignatures = functionDeclaration.kind === 151 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
}
else {
signature = allSignatures[0];
}
- if (functionDeclaration.kind === 150) {
+ if (functionDeclaration.kind === 151) {
symbolKind = ts.ScriptElementKind.constructorImplementationElement;
addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
}
else {
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 153 &&
+ addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 &&
!(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
}
addSignatureDisplayParts(signature, allSignatures);
@@ -59715,7 +66071,7 @@ var ts;
}
}
if (symbolFlags & 32 && !hasAddedSymbolInfo && !isThisExpression) {
- if (ts.getDeclarationOfKind(symbol, 197)) {
+ if (ts.getDeclarationOfKind(symbol, 198)) {
pushTypePart(ts.ScriptElementKind.localClassElement);
}
else {
@@ -59734,7 +66090,7 @@ var ts;
}
if (symbolFlags & 524288) {
addNewLineIfDisplayPartsExist();
- displayParts.push(ts.keywordPart(136));
+ displayParts.push(ts.keywordPart(137));
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
writeTypeParametersOfSymbol(symbol, sourceFile);
@@ -59755,7 +66111,7 @@ var ts;
}
if (symbolFlags & 1536) {
addNewLineIfDisplayPartsExist();
- var declaration = ts.getDeclarationOfKind(symbol, 230);
+ var declaration = ts.getDeclarationOfKind(symbol, 232);
var isNamespace = declaration && declaration.name && declaration.name.kind === 70;
displayParts.push(ts.keywordPart(isNamespace ? 128 : 127));
displayParts.push(ts.spacePart());
@@ -59774,25 +66130,25 @@ var ts;
writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration);
}
else {
- var declaration = ts.getDeclarationOfKind(symbol, 143);
+ var declaration = ts.getDeclarationOfKind(symbol, 144);
ts.Debug.assert(declaration !== undefined);
declaration = declaration.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
var signature = typeChecker.getSignatureFromDeclaration(declaration);
- if (declaration.kind === 154) {
+ if (declaration.kind === 155) {
displayParts.push(ts.keywordPart(93));
displayParts.push(ts.spacePart());
}
- else if (declaration.kind !== 153 && declaration.name) {
+ else if (declaration.kind !== 154 && declaration.name) {
addFullSymbolName(declaration.symbol);
}
ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32));
}
- else if (declaration.kind === 228) {
+ else if (declaration.kind === 230) {
addInPrefix();
- displayParts.push(ts.keywordPart(136));
+ displayParts.push(ts.keywordPart(137));
displayParts.push(ts.spacePart());
addFullSymbolName(declaration.symbol);
writeTypeParametersOfSymbol(declaration.symbol, sourceFile);
@@ -59801,9 +66157,10 @@ var ts;
}
}
if (symbolFlags & 8) {
+ symbolKind = ts.ScriptElementKind.enumMemberElement;
addPrefixForAnyFunctionOrVar(symbol, "enum member");
var declaration = symbol.declarations[0];
- if (declaration.kind === 260) {
+ if (declaration.kind === 263) {
var constantValue = typeChecker.getConstantValue(declaration);
if (constantValue !== undefined) {
displayParts.push(ts.spacePart());
@@ -59815,7 +66172,7 @@ var ts;
}
if (symbolFlags & 8388608) {
addNewLineIfDisplayPartsExist();
- if (symbol.declarations[0].kind === 233) {
+ if (symbol.declarations[0].kind === 235) {
displayParts.push(ts.keywordPart(83));
displayParts.push(ts.spacePart());
displayParts.push(ts.keywordPart(128));
@@ -59826,7 +66183,7 @@ var ts;
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 234) {
+ if (declaration.kind === 236) {
var importEqualsDeclaration = declaration;
if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) {
displayParts.push(ts.spacePart());
@@ -59861,6 +66218,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
if (symbolKind === ts.ScriptElementKind.memberVariableElement ||
+ symbolKind === ts.ScriptElementKind.jsxAttribute ||
symbolFlags & 3 ||
symbolKind === ts.ScriptElementKind.localVariableElement ||
isThisExpression) {
@@ -59893,11 +66251,12 @@ var ts;
}
if (!documentation) {
documentation = symbol.getDocumentationComment();
+ tags = symbol.getJsDocTags();
if (documentation.length === 0 && symbol.flags & 4) {
- if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 261; })) {
+ if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264; })) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (!declaration.parent || declaration.parent.kind !== 192) {
+ if (!declaration.parent || declaration.parent.kind !== 193) {
continue;
}
var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right);
@@ -59905,6 +66264,7 @@ var ts;
continue;
}
documentation = rhsSymbol.getDocumentationComment();
+ tags = rhsSymbol.getJsDocTags();
if (documentation.length > 0) {
break;
}
@@ -59912,7 +66272,7 @@ var ts;
}
}
}
- return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind };
+ return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind, tags: tags };
function addNewLineIfDisplayPartsExist() {
if (displayParts.length) {
displayParts.push(ts.lineBreakPart());
@@ -59963,6 +66323,7 @@ var ts;
displayParts.push(ts.punctuationPart(19));
}
documentation = signature.getDocumentationComment();
+ tags = signature.getJsDocTags();
}
function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) {
var typeParameterParts = ts.mapToDisplayParts(function (writer) {
@@ -59977,14 +66338,14 @@ var ts;
return false;
}
return ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 184) {
+ if (declaration.kind === 185) {
return true;
}
- if (declaration.kind !== 223 && declaration.kind !== 225) {
+ if (declaration.kind !== 225 && declaration.kind !== 227) {
return false;
}
- for (var parent_20 = declaration.parent; !ts.isFunctionBlock(parent_20); parent_20 = parent_20.parent) {
- if (parent_20.kind === 261 || parent_20.kind === 231) {
+ for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) {
+ if (parent.kind === 264 || parent.kind === 233) {
return false;
}
}
@@ -60019,7 +66380,7 @@ var ts;
sourceFile.moduleName = transpileOptions.moduleName;
}
if (transpileOptions.renamedDependencies) {
- sourceFile.renamedDependencies = ts.createMap(transpileOptions.renamedDependencies);
+ sourceFile.renamedDependencies = ts.createMapFromTemplate(transpileOptions.renamedDependencies);
}
var newLine = ts.getNewLineCharacter(options);
var outputText;
@@ -60065,10 +66426,10 @@ var ts;
var commandLineOptionsStringToEnum;
function fixupCompilerOptions(options, diagnostics) {
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || ts.filter(ts.optionDeclarations, function (o) {
- return typeof o.type === "object" && !ts.forEachProperty(o.type, function (v) { return typeof v !== "number"; });
+ return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_4 = function (opt) {
+ var _loop_5 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -60077,17 +66438,18 @@ var ts;
options[opt.name] = ts.parseCustomTypeOption(opt, value, diagnostics);
}
else {
- if (!ts.forEachProperty(opt.type, function (v) { return v === value; })) {
+ if (!ts.forEachEntry(opt.type, function (v) { return v === value; })) {
diagnostics.push(ts.createCompilerDiagnosticForInvalidCustomType(opt));
}
}
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_4(opt);
+ _loop_5(opt);
}
return options;
}
+ ts.fixupCompilerOptions = fixupCompilerOptions;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -60096,10 +66458,19 @@ var ts;
var standardScanner = ts.createScanner(5, false, 0);
var jsxScanner = ts.createScanner(5, false, 1);
var scanner;
- function getFormattingScanner(sourceFile, startPos, endPos) {
+ var ScanAction;
+ (function (ScanAction) {
+ ScanAction[ScanAction["Scan"] = 0] = "Scan";
+ ScanAction[ScanAction["RescanGreaterThanToken"] = 1] = "RescanGreaterThanToken";
+ ScanAction[ScanAction["RescanSlashToken"] = 2] = "RescanSlashToken";
+ ScanAction[ScanAction["RescanTemplateToken"] = 3] = "RescanTemplateToken";
+ ScanAction[ScanAction["RescanJsxIdentifier"] = 4] = "RescanJsxIdentifier";
+ ScanAction[ScanAction["RescanJsxText"] = 5] = "RescanJsxText";
+ })(ScanAction || (ScanAction = {}));
+ function getFormattingScanner(text, languageVariant, startPos, endPos) {
ts.Debug.assert(scanner === undefined, "Scanner should be undefined");
- scanner = sourceFile.languageVariant === 1 ? jsxScanner : standardScanner;
- scanner.setText(sourceFile.text);
+ scanner = languageVariant === 1 ? jsxScanner : standardScanner;
+ scanner.setText(text);
scanner.setTextPos(startPos);
var wasNewLine = true;
var leadingTrivia;
@@ -60175,10 +66546,10 @@ var ts;
function shouldRescanJsxIdentifier(node) {
if (node.parent) {
switch (node.parent.kind) {
+ case 252:
case 250:
- case 248:
+ case 251:
case 249:
- case 247:
return node.kind === 70;
}
}
@@ -60287,8 +66658,8 @@ var ts;
}
function isOnToken() {
ts.Debug.assert(scanner !== undefined);
- var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
- var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
+ var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
+ var startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos();
return startPos < endPos && current !== 1 && !ts.isTrivia(current);
}
function fixTokenKind(tokenInfo, container) {
@@ -60392,6 +66763,20 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var FormattingRequestKind;
+ (function (FormattingRequestKind) {
+ FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument";
+ FormattingRequestKind[FormattingRequestKind["FormatSelection"] = 1] = "FormatSelection";
+ FormattingRequestKind[FormattingRequestKind["FormatOnEnter"] = 2] = "FormatOnEnter";
+ FormattingRequestKind[FormattingRequestKind["FormatOnSemicolon"] = 3] = "FormatOnSemicolon";
+ FormattingRequestKind[FormattingRequestKind["FormatOnClosingCurlyBrace"] = 4] = "FormatOnClosingCurlyBrace";
+ })(FormattingRequestKind = formatting.FormattingRequestKind || (formatting.FormattingRequestKind = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var Rule = (function () {
function Rule(Descriptor, Operation, Flag) {
if (Flag === void 0) { Flag = 0; }
@@ -60413,6 +66798,19 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var RuleAction;
+ (function (RuleAction) {
+ RuleAction[RuleAction["Ignore"] = 1] = "Ignore";
+ RuleAction[RuleAction["Space"] = 2] = "Space";
+ RuleAction[RuleAction["NewLine"] = 4] = "NewLine";
+ RuleAction[RuleAction["Delete"] = 8] = "Delete";
+ })(RuleAction = formatting.RuleAction || (formatting.RuleAction = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var RuleDescriptor = (function () {
function RuleDescriptor(LeftTokenRange, RightTokenRange) {
this.LeftTokenRange = LeftTokenRange;
@@ -60443,6 +66841,17 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var RuleFlags;
+ (function (RuleFlags) {
+ RuleFlags[RuleFlags["None"] = 0] = "None";
+ RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines";
+ })(RuleFlags = formatting.RuleFlags || (formatting.RuleFlags = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var RuleOperation = (function () {
function RuleOperation(Context, Action) {
this.Context = Context;
@@ -60511,10 +66920,10 @@ var ts;
this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2));
this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2));
+ this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromRange(0, 141, [19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2));
this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17, 81), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17, 105), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([19, 21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
@@ -60525,10 +66934,10 @@ var ts;
this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19, 3, 80, 101, 86, 81]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2));
- this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8));
- this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8));
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
@@ -60548,18 +66957,20 @@ var ts;
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109, 75]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2));
this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19, 80, 81, 72]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2));
this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101, 86]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 133]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
+ this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 134]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127, 131]), 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 133, 114, 136, 138]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 138])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 130, 134, 114, 137, 139, 126]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 139])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2));
this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
@@ -60573,7 +66984,7 @@ var ts;
this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8));
this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 133, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2));
+ this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 134, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2));
this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8));
this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38, formatting.Shared.TokenRange.FromTokens([70, 18])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2));
this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8));
@@ -60586,6 +66997,7 @@ var ts;
this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8));
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator,
@@ -60614,7 +67026,7 @@ var ts;
this.NoSpaceBetweenTagAndTemplateString,
this.SpaceBeforeJsxAttribute, this.SpaceBeforeSlashInJsxOpeningElement, this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement,
this.NoSpaceBeforeEqualInJsxAttribute, this.NoSpaceAfterEqualInJsxAttribute,
- this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
+ this.NoSpaceAfterModuleImport,
this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords,
this.SpaceAfterModuleName,
this.SpaceBeforeArrow, this.SpaceAfterArrow,
@@ -60629,6 +67041,7 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
+ this.NoSpaceBeforeNonNullAssertionOperator
];
this.LowPriorityCommonRules = [
this.NoSpaceBeforeSemicolon,
@@ -60637,7 +67050,6 @@ var ts;
this.NoSpaceBeforeOpenBracket,
this.NoSpaceAfterCloseBracket,
this.SpaceAfterSemicolon,
- this.NoSpaceBeforeOpenParenInFuncDecl,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
@@ -60678,43 +67090,44 @@ var ts;
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
- for (var name_48 in o) {
- if (o[name_48] === rule) {
- return name_48;
+ for (var name in o) {
+ if (o[name] === rule) {
+ return name;
}
}
throw new Error("Unknown rule");
};
Rules.IsForContext = function (context) {
- return context.contextNode.kind === 211;
+ return context.contextNode.kind === 213;
};
Rules.IsNotForContext = function (context) {
return !Rules.IsForContext(context);
};
Rules.IsBinaryOpContext = function (context) {
switch (context.contextNode.kind) {
- case 192:
case 193:
- case 200:
- case 243:
- case 239:
- case 156:
- case 164:
+ case 194:
+ case 201:
+ case 245:
+ case 241:
+ case 157:
case 165:
+ case 166:
return true;
- case 174:
- case 228:
- case 234:
- case 223:
- case 144:
- case 260:
+ case 175:
+ case 230:
+ case 236:
+ case 225:
+ case 145:
+ case 263:
+ case 148:
case 147:
- case 146:
return context.currentTokenSpan.kind === 57 || context.nextTokenSpan.kind === 57;
- case 212:
+ case 214:
+ case 144:
return context.currentTokenSpan.kind === 91 || context.nextTokenSpan.kind === 91;
- case 213:
- return context.currentTokenSpan.kind === 140 || context.nextTokenSpan.kind === 140;
+ case 215:
+ return context.currentTokenSpan.kind === 141 || context.nextTokenSpan.kind === 141;
}
return false;
};
@@ -60722,11 +67135,14 @@ var ts;
return !Rules.IsBinaryOpContext(context);
};
Rules.IsConditionalOperatorContext = function (context) {
- return context.contextNode.kind === 193;
+ return context.contextNode.kind === 194;
};
Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) {
return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context);
};
+ Rules.IsBraceWrappedContext = function (context) {
+ return context.contextNode.kind === 173 || Rules.IsSingleLineBlockContext(context);
+ };
Rules.IsBeforeMultilineBlockContext = function (context) {
return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine());
};
@@ -60747,90 +67163,96 @@ var ts;
return true;
}
switch (node.kind) {
- case 204:
- case 232:
- case 176:
- case 231:
+ case 206:
+ case 234:
+ case 177:
+ case 233:
return true;
}
return false;
};
Rules.IsFunctionDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
case 153:
- case 184:
- case 150:
+ case 154:
case 185:
- case 227:
+ case 151:
+ case 186:
+ case 229:
return true;
}
return false;
};
Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) {
- return context.contextNode.kind === 225 || context.contextNode.kind === 184;
+ return context.contextNode.kind === 227 || context.contextNode.kind === 185;
};
Rules.IsTypeScriptDeclWithBlockContext = function (context) {
return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode);
};
Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) {
switch (node.kind) {
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
case 229:
- case 161:
- case 230:
- case 241:
- case 242:
- case 235:
- case 238:
+ case 231:
+ case 162:
+ case 232:
+ case 243:
+ case 244:
+ case 237:
+ case 240:
return true;
}
return false;
};
Rules.IsAfterCodeBlockContext = function (context) {
switch (context.currentTokenParent.kind) {
- case 226:
- case 230:
- case 229:
- case 204:
- case 256:
+ case 228:
+ case 232:
case 231:
- case 218:
+ case 259:
+ case 233:
+ case 220:
return true;
+ case 206: {
+ var blockParent = context.currentTokenParent.parent;
+ if (blockParent.kind !== 186 &&
+ blockParent.kind !== 185) {
+ return true;
+ }
+ }
}
return false;
};
Rules.IsControlDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 208:
- case 218:
- case 211:
- case 212:
- case 213:
case 210:
- case 221:
- case 209:
- case 217:
- case 256:
+ case 220:
+ case 213:
+ case 214:
+ case 215:
+ case 212:
+ case 223:
+ case 211:
+ case 219:
+ case 259:
return true;
default:
return false;
}
};
Rules.IsObjectContext = function (context) {
- return context.contextNode.kind === 176;
+ return context.contextNode.kind === 177;
};
Rules.IsFunctionCallContext = function (context) {
- return context.contextNode.kind === 179;
+ return context.contextNode.kind === 180;
};
Rules.IsNewContext = function (context) {
- return context.contextNode.kind === 180;
+ return context.contextNode.kind === 181;
};
Rules.IsFunctionCallOrNewContext = function (context) {
return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context);
@@ -60842,25 +67264,25 @@ var ts;
return context.nextTokenSpan.kind !== 21;
};
Rules.IsArrowFunctionContext = function (context) {
- return context.contextNode.kind === 185;
+ return context.contextNode.kind === 186;
};
Rules.IsNonJsxSameLineTokenContext = function (context) {
return context.TokensAreOnSameLine() && context.contextNode.kind !== 10;
};
Rules.IsNonJsxElementContext = function (context) {
- return context.contextNode.kind !== 246;
+ return context.contextNode.kind !== 248;
};
Rules.IsJsxExpressionContext = function (context) {
- return context.contextNode.kind === 252;
+ return context.contextNode.kind === 255;
};
Rules.IsNextTokenParentJsxAttribute = function (context) {
- return context.nextTokenParent.kind === 250;
+ return context.nextTokenParent.kind === 252;
};
Rules.IsJsxAttributeContext = function (context) {
- return context.contextNode.kind === 250;
+ return context.contextNode.kind === 252;
};
Rules.IsJsxSelfClosingElementContext = function (context) {
- return context.contextNode.kind === 247;
+ return context.contextNode.kind === 249;
};
Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) {
return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context);
@@ -60875,41 +67297,42 @@ var ts;
while (ts.isPartOfExpression(node)) {
node = node.parent;
}
- return node.kind === 145;
+ return node.kind === 146;
};
Rules.IsStartOfVariableDeclarationList = function (context) {
- return context.currentTokenParent.kind === 224 &&
+ return context.currentTokenParent.kind === 226 &&
context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;
};
Rules.IsNotFormatOnEnter = function (context) {
return context.formattingRequestKind !== 2;
};
Rules.IsModuleDeclContext = function (context) {
- return context.contextNode.kind === 230;
+ return context.contextNode.kind === 232;
};
Rules.IsObjectTypeContext = function (context) {
- return context.contextNode.kind === 161;
+ return context.contextNode.kind === 162;
};
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 26 && token.kind !== 28) {
return false;
}
switch (parent.kind) {
- case 157:
- case 182:
- case 226:
- case 197:
+ case 158:
+ case 183:
+ case 230:
+ case 228:
+ case 198:
+ case 229:
case 227:
- case 225:
- case 184:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 153:
case 154:
- case 179:
+ case 155:
case 180:
- case 199:
+ case 181:
+ case 200:
return true;
default:
return false;
@@ -60920,13 +67343,16 @@ var ts;
Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent);
};
Rules.IsTypeAssertionContext = function (context) {
- return context.contextNode.kind === 182;
+ return context.contextNode.kind === 183;
};
Rules.IsVoidOpContext = function (context) {
- return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 188;
+ return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 189;
};
Rules.IsYieldOrYieldStarWithOperand = function (context) {
- return context.contextNode.kind === 195 && context.contextNode.expression !== undefined;
+ return context.contextNode.kind === 196 && context.contextNode.expression !== undefined;
+ };
+ Rules.IsNonNullAssertionContext = function (context) {
+ return context.contextNode.kind === 202;
};
return Rules;
}());
@@ -60948,7 +67374,7 @@ var ts;
return result;
};
RulesMap.prototype.Initialize = function (rules) {
- this.mapRowLength = 140 + 1;
+ this.mapRowLength = 141 + 1;
this.map = new Array(this.mapRowLength * this.mapRowLength);
var rulesBucketConstructionStateList = new Array(this.map.length);
this.FillRules(rules, rulesBucketConstructionStateList);
@@ -60961,7 +67387,7 @@ var ts;
});
};
RulesMap.prototype.GetRuleBucketIndex = function (row, column) {
- ts.Debug.assert(row <= 140 && column <= 140, "Must compute formatting context from tokens");
+ ts.Debug.assert(row <= 141 && column <= 141, "Must compute formatting context from tokens");
var rulesBucketIndex = (row * this.mapRowLength) + column;
return rulesBucketIndex;
};
@@ -61125,7 +67551,7 @@ var ts;
}
TokenAllAccess.prototype.GetTokens = function () {
var result = [];
- for (var token = 0; token <= 140; token++) {
+ for (var token = 0; token <= 141; token++) {
result.push(token);
}
return result;
@@ -61169,9 +67595,9 @@ var ts;
}());
TokenRange.Any = TokenRange.AllTokens();
TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3]));
- TokenRange.Keywords = TokenRange.FromRange(71, 140);
+ TokenRange.Keywords = TokenRange.FromRange(71, 141);
TokenRange.BinaryOperators = TokenRange.FromRange(26, 69);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 140, 117, 125]);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 141, 117, 125]);
TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42, 43, 51, 50]);
TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 70, 18, 20, 16, 98, 93]);
TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]);
@@ -61179,7 +67605,7 @@ var ts;
TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]);
TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]);
TokenRange.Comments = TokenRange.FromTokens([2, 3]);
- TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 134, 121, 135, 104, 118]);
+ TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 135, 121, 136, 104, 118]);
Shared.TokenRange = TokenRange;
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
@@ -61201,6 +67627,9 @@ var ts;
RulesProvider.prototype.getRulesMap = function () {
return this.rulesMap;
};
+ RulesProvider.prototype.getFormatOptions = function () {
+ return this.options;
+ };
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
var activeRules = this.createActiveRules(options);
@@ -61212,6 +67641,12 @@ var ts;
};
RulesProvider.prototype.createActiveRules = function (options) {
var rules = this.globalRules.HighPriorityCommonRules.slice(0);
+ if (options.insertSpaceAfterConstructor) {
+ rules.push(this.globalRules.SpaceAfterConstructor);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceAfterConstructor);
+ }
if (options.insertSpaceAfterCommaDelimiter) {
rules.push(this.globalRules.SpaceAfterComma);
}
@@ -61290,6 +67725,12 @@ var ts;
rules.push(this.globalRules.NoSpaceBeforeBinaryOperator);
rules.push(this.globalRules.NoSpaceAfterBinaryOperator);
}
+ if (options.insertSpaceBeforeFunctionParenthesis) {
+ rules.push(this.globalRules.SpaceBeforeOpenParenInFuncDecl);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceBeforeOpenParenInFuncDecl);
+ }
if (options.placeOpenBraceOnNewLineForControlBlocks) {
rules.push(this.globalRules.NewLineBeforeOpenBraceInControl);
}
@@ -61315,6 +67756,10 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var Constants;
+ (function (Constants) {
+ Constants[Constants["Unknown"] = -1] = "Unknown";
+ })(Constants || (Constants = {}));
function formatOnEnter(position, sourceFile, rulesProvider, options) {
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
if (line === 0) {
@@ -61387,17 +67832,17 @@ var ts;
}
function isListElement(parent, node) {
switch (parent.kind) {
- case 226:
- case 227:
+ case 228:
+ case 229:
return ts.rangeContainsRange(parent.members, node);
- case 230:
+ case 232:
var body = parent.body;
- return body && body.kind === 231 && ts.rangeContainsRange(body.statements, node);
- case 261:
- case 204:
- case 231:
+ return body && body.kind === 233 && ts.rangeContainsRange(body.statements, node);
+ case 264:
+ case 206:
+ case 233:
return ts.rangeContainsRange(parent.statements, node);
- case 256:
+ case 259:
return ts.rangeContainsRange(parent.block.statements, node);
}
return false;
@@ -61476,12 +67921,17 @@ var ts;
}
return 0;
}
+ function formatNode(node, sourceFileLike, languageVariant, initialIndentation, delta, rulesProvider) {
+ var range = { pos: 0, end: sourceFileLike.text.length };
+ return formatSpanWorker(range, node, initialIndentation, delta, formatting.getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end), rulesProvider.getFormatOptions(), rulesProvider, 1, function (_) { return false; }, sourceFileLike);
+ }
+ formatting.formatNode = formatNode;
function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) {
- var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange);
- var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var enclosingNode = findEnclosingNode(originalRange, sourceFile);
- var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end);
- var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options);
+ return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options), getOwnOrInheritedDelta(enclosingNode, options, sourceFile), formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end), options, rulesProvider, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile);
+ }
+ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, options, rulesProvider, requestKind, rangeContainsError, sourceFile) {
+ var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -61496,7 +67946,6 @@ var ts;
if (enclosingNode.decorators) {
undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line;
}
- var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile);
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
}
if (!formattingScanner.isOnToken()) {
@@ -61553,18 +68002,18 @@ var ts;
return node.modifiers[0].kind;
}
switch (node.kind) {
- case 226: return 74;
- case 227: return 108;
- case 225: return 88;
- case 229: return 229;
- case 151: return 124;
- case 152: return 133;
- case 149:
+ case 228: return 74;
+ case 229: return 108;
+ case 227: return 88;
+ case 231: return 231;
+ case 152: return 124;
+ case 153: return 134;
+ case 150:
if (node.asteriskToken) {
return 38;
}
- case 147:
- case 144:
+ case 148:
+ case 145:
return node.name.kind;
}
}
@@ -61588,17 +68037,30 @@ var ts;
switch (kind) {
case 16:
case 17:
- case 20:
- case 21:
case 18:
case 19:
case 81:
case 105:
case 56:
return indentation;
- default:
- return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
+ case 40:
+ case 28: {
+ if (container.kind === 250 ||
+ container.kind === 251 ||
+ container.kind === 249) {
+ return indentation;
+ }
+ break;
+ }
+ case 20:
+ case 21: {
+ if (container.kind !== 171) {
+ return indentation;
+ }
+ break;
+ }
}
+ return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
},
getIndentation: function () { return indentation; },
getDelta: function (child) { return getEffectiveDelta(delta, child); },
@@ -61639,7 +68101,7 @@ var ts;
if (tokenInfo.token.end > node.end) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
}
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
var childStartPos = child.getStart(sourceFile);
@@ -61669,7 +68131,7 @@ var ts;
if (tokenInfo.token.end > childStartPos) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
}
if (!formattingScanner.isOnToken()) {
return inheritedIndentation;
@@ -61680,11 +68142,11 @@ var ts;
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
return inheritedIndentation;
}
- var effectiveParentStartLine = child.kind === 145 ? childStartLine : undecoratedParentStartLine;
+ var effectiveParentStartLine = child.kind === 146 ? childStartLine : undecoratedParentStartLine;
var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine);
processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);
childContextNode = node;
- if (isFirstListItem && parent.kind === 175 && inheritedIndentation === -1) {
+ if (isFirstListItem && parent.kind === 176 && inheritedIndentation === -1) {
inheritedIndentation = childIndentation.indentation;
}
return inheritedIndentation;
@@ -61704,10 +68166,10 @@ var ts;
startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1, parent, parentDynamicIndentation, parentStartLine);
listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta);
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
else {
- consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent);
}
}
}
@@ -61720,7 +68182,7 @@ var ts;
if (formattingScanner.isOnToken()) {
var tokenInfo = formattingScanner.readTokenInfo(parent);
if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) {
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
}
}
@@ -61910,7 +68372,7 @@ var ts;
startLine++;
}
var delta = indentation - nonWhitespaceColumnInFirstPart.column;
- for (var i = startIndex, len = parts.length; i < len; i++, startLine++) {
+ for (var i = startIndex; i < parts.length; i++, startLine++) {
var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile);
var nonWhitespaceCharacterAndColumn = i === 0
? nonWhitespaceColumnInFirstPart
@@ -62000,12 +68462,12 @@ var ts;
}
function getOpenTokenForList(node, list) {
switch (node.kind) {
+ case 151:
+ case 227:
+ case 185:
case 150:
- case 225:
- case 184:
case 149:
- case 148:
- case 185:
+ case 186:
if (node.typeParameters === list) {
return 26;
}
@@ -62013,8 +68475,8 @@ var ts;
return 18;
}
break;
- case 179:
case 180:
+ case 181:
if (node.typeArguments === list) {
return 26;
}
@@ -62022,7 +68484,7 @@ var ts;
return 18;
}
break;
- case 157:
+ case 158:
if (node.typeArguments === list) {
return 26;
}
@@ -62095,7 +68557,12 @@ var ts;
(function (formatting) {
var SmartIndenter;
(function (SmartIndenter) {
- function getIndentation(position, sourceFile, options) {
+ var Value;
+ (function (Value) {
+ Value[Value["Unknown"] = -1] = "Unknown";
+ })(Value || (Value = {}));
+ function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace) {
+ if (assumeNewLineBeforeCloseBrace === void 0) { assumeNewLineBeforeCloseBrace = false; }
if (position > sourceFile.text.length) {
return getBaseIndentation(options);
}
@@ -62123,7 +68590,7 @@ var ts;
var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile);
return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options);
}
- if (precedingToken.kind === 25 && precedingToken.parent.kind !== 192) {
+ if (precedingToken.kind === 25 && precedingToken.parent.kind !== 193) {
var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options);
if (actualIndentation !== -1) {
return actualIndentation;
@@ -62136,8 +68603,9 @@ var ts;
while (current) {
if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) {
currentStart = getStartLineAndCharacterForNode(current, sourceFile);
- if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) {
- indentationDelta = 0;
+ var nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile);
+ if (nextTokenKind !== 0) {
+ indentationDelta = assumeNewLineBeforeCloseBrace && nextTokenKind === 2 ? options.indentSize : 0;
}
else {
indentationDelta = lineAtPosition !== currentStart.line ? options.indentSize : 0;
@@ -62225,31 +68693,37 @@ var ts;
}
function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) {
var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) &&
- (parent.kind === 261 || !parentAndChildShareLine);
+ (parent.kind === 264 || !parentAndChildShareLine);
if (!useActualIndentation) {
return -1;
}
return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options);
}
+ var NextTokenKind;
+ (function (NextTokenKind) {
+ NextTokenKind[NextTokenKind["Unknown"] = 0] = "Unknown";
+ NextTokenKind[NextTokenKind["OpenBrace"] = 1] = "OpenBrace";
+ NextTokenKind[NextTokenKind["CloseBrace"] = 2] = "CloseBrace";
+ })(NextTokenKind || (NextTokenKind = {}));
function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) {
var nextToken = ts.findNextToken(precedingToken, current);
if (!nextToken) {
- return false;
+ return 0;
}
if (nextToken.kind === 16) {
- return true;
+ return 1;
}
else if (nextToken.kind === 17) {
var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line;
- return lineAtPosition === nextTokenStartLine;
+ return lineAtPosition === nextTokenStartLine ? 2 : 0;
}
- return false;
+ return 0;
}
function getStartLineAndCharacterForNode(n, sourceFile) {
return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));
}
function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) {
- if (parent.kind === 208 && parent.elseStatement === child) {
+ if (parent.kind === 210 && parent.elseStatement === child) {
var elseKeyword = ts.findChildOfKind(parent, 81, sourceFile);
ts.Debug.assert(elseKeyword !== undefined);
var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line;
@@ -62258,53 +68732,49 @@ var ts;
return false;
}
SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement;
+ function getListIfStartEndIsInListRange(list, start, end) {
+ return list && ts.rangeContainsStartEnd(list, start, end) ? list : undefined;
+ }
function getContainingList(node, sourceFile) {
if (node.parent) {
switch (node.parent.kind) {
- case 157:
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) {
- return node.parent.typeArguments;
- }
- break;
- case 176:
+ case 158:
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd());
+ case 177:
return node.parent.properties;
- case 175:
+ case 176:
return node.parent.elements;
- case 225:
- case 184:
+ case 227:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 153:
- case 154: {
+ case 154:
+ case 151:
+ case 160:
+ case 155: {
var start = node.getStart(sourceFile);
- if (node.parent.typeParameters &&
- ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) {
- return node.parent.typeParameters;
- }
- if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) {
- return node.parent.parameters;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd());
}
- case 180:
- case 179: {
+ case 228:
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd());
+ case 181:
+ case 180: {
var start = node.getStart(sourceFile);
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) {
- return node.parent.typeArguments;
- }
- if (node.parent.arguments &&
- ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) {
- return node.parent.arguments;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd());
}
+ case 226:
+ return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd());
+ case 240:
+ case 244:
+ return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd());
}
}
return undefined;
}
+ SmartIndenter.getContainingList = getContainingList;
function getActualIndentationForListItem(node, sourceFile, options) {
var containingList = getContainingList(node, sourceFile);
return containingList ? getActualIndentationFromList(containingList) : -1;
@@ -62317,8 +68787,8 @@ var ts;
if (node.kind === 19) {
return -1;
}
- if (node.parent && (node.parent.kind === 179 ||
- node.parent.kind === 180) &&
+ if (node.parent && (node.parent.kind === 180 ||
+ node.parent.kind === 181) &&
node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
@@ -62336,10 +68806,10 @@ var ts;
function getStartingExpression(node) {
while (true) {
switch (node.kind) {
- case 179:
case 180:
- case 177:
+ case 181:
case 178:
+ case 179:
node = node.expression;
break;
default:
@@ -62393,48 +68863,49 @@ var ts;
SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn;
function nodeContentIsAlwaysIndented(kind) {
switch (kind) {
- case 207:
- case 226:
- case 197:
- case 227:
- case 229:
+ case 209:
case 228:
- case 175:
- case 204:
+ case 198:
+ case 229:
case 231:
+ case 230:
case 176:
- case 161:
- case 163:
- case 232:
- case 254:
- case 253:
- case 183:
+ case 206:
+ case 233:
case 177:
- case 179:
+ case 162:
+ case 171:
+ case 164:
+ case 234:
+ case 257:
+ case 256:
+ case 184:
+ case 178:
case 180:
- case 205:
- case 223:
- case 240:
- case 216:
- case 193:
+ case 181:
+ case 207:
+ case 225:
+ case 242:
+ case 218:
+ case 194:
+ case 174:
case 173:
- case 172:
- case 248:
- case 247:
- case 252:
- case 148:
- case 153:
+ case 250:
+ case 249:
+ case 255:
+ case 149:
case 154:
- case 144:
- case 158:
+ case 155:
+ case 145:
case 159:
- case 166:
- case 181:
- case 189:
- case 242:
- case 238:
- case 243:
- case 239:
+ case 160:
+ case 167:
+ case 182:
+ case 190:
+ case 244:
+ case 240:
+ case 245:
+ case 241:
return true;
}
return false;
@@ -62442,27 +68913,27 @@ var ts;
function nodeWillIndentChild(parent, child, indentByDefault) {
var childKind = child ? child.kind : 0;
switch (parent.kind) {
- case 209:
- case 210:
+ case 211:
case 212:
+ case 214:
+ case 215:
case 213:
- case 211:
- case 208:
- case 225:
- case 184:
- case 149:
+ case 210:
+ case 227:
case 185:
case 150:
+ case 186:
case 151:
case 152:
- return childKind !== 204;
- case 241:
- return childKind !== 242;
- case 235:
- return childKind !== 236 ||
- (child.namedBindings && child.namedBindings.kind !== 238);
- case 246:
- return childKind !== 249;
+ case 153:
+ return childKind !== 206;
+ case 243:
+ return childKind !== 244;
+ case 237:
+ return childKind !== 238 ||
+ (child.namedBindings && child.namedBindings.kind !== 240);
+ case 248:
+ return childKind !== 251;
}
return indentByDefault;
}
@@ -62476,9 +68947,502 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var textChanges;
+ (function (textChanges) {
+ function getPos(n) {
+ return n["__pos"];
+ }
+ function setPos(n, pos) {
+ n["__pos"] = pos;
+ }
+ function getEnd(n) {
+ return n["__end"];
+ }
+ function setEnd(n, end) {
+ n["__end"] = end;
+ }
+ var Position;
+ (function (Position) {
+ Position[Position["FullStart"] = 0] = "FullStart";
+ Position[Position["Start"] = 1] = "Start";
+ })(Position = textChanges.Position || (textChanges.Position = {}));
+ function skipWhitespacesAndLineBreaks(text, start) {
+ return ts.skipTrivia(text, start, false, true);
+ }
+ function hasCommentsBeforeLineBreak(text, start) {
+ var i = start;
+ while (i < text.length) {
+ var ch = text.charCodeAt(i);
+ if (ts.isWhiteSpaceSingleLine(ch)) {
+ i++;
+ continue;
+ }
+ return ch === 47;
+ }
+ return false;
+ }
+ function getSeparatorCharacter(separator) {
+ return ts.tokenToString(separator.kind);
+ }
+ textChanges.getSeparatorCharacter = getSeparatorCharacter;
+ function getAdjustedStartPosition(sourceFile, node, options, position) {
+ if (options.useNonAdjustedStartPosition) {
+ return node.getFullStart();
+ }
+ var fullStart = node.getFullStart();
+ var start = node.getStart(sourceFile);
+ if (fullStart === start) {
+ return start;
+ }
+ var fullStartLine = ts.getLineStartPositionForPosition(fullStart, sourceFile);
+ var startLine = ts.getLineStartPositionForPosition(start, sourceFile);
+ if (startLine === fullStartLine) {
+ return position === Position.Start ? start : fullStart;
+ }
+ var adjustedStartPosition = ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, fullStartLine) + 1, sourceFile);
+ adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition);
+ return ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile);
+ }
+ textChanges.getAdjustedStartPosition = getAdjustedStartPosition;
+ function getAdjustedEndPosition(sourceFile, node, options) {
+ if (options.useNonAdjustedEndPosition) {
+ return node.getEnd();
+ }
+ var end = node.getEnd();
+ var newEnd = ts.skipTrivia(sourceFile.text, end, true);
+ return newEnd !== end && ts.isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))
+ ? newEnd
+ : end;
+ }
+ textChanges.getAdjustedEndPosition = getAdjustedEndPosition;
+ function isSeparator(node, candidate) {
+ return candidate && node.parent && (candidate.kind === 25 || (candidate.kind === 24 && node.parent.kind === 177));
+ }
+ function spaces(count) {
+ var s = "";
+ for (var i = 0; i < count; i++) {
+ s += " ";
+ }
+ return s;
+ }
+ var ChangeTracker = (function () {
+ function ChangeTracker(newLine, rulesProvider, validator) {
+ this.newLine = newLine;
+ this.rulesProvider = rulesProvider;
+ this.validator = validator;
+ this.changes = [];
+ this.newLineCharacter = ts.getNewLineCharacter({ newLine: newLine });
+ }
+ ChangeTracker.fromCodeFixContext = function (context) {
+ return new ChangeTracker(context.newLineCharacter === "\n" ? 1 : 0, context.rulesProvider);
+ };
+ ChangeTracker.prototype.deleteNode = function (sourceFile, node, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, node, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, node, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteRange = function (sourceFile, range) {
+ this.changes.push({ sourceFile: sourceFile, range: range });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeRange = function (sourceFile, startNode, endNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeInList = function (sourceFile, node) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(node, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(node);
+ if (index < 0) {
+ return this;
+ }
+ if (containingList.length === 1) {
+ this.deleteNode(sourceFile, node);
+ return this;
+ }
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ if (nextToken && isSeparator(node, nextToken)) {
+ var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), false, true);
+ var nextElement = containingList[index + 1];
+ var endPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, nextElement, {}, Position.FullStart), false, true);
+ this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });
+ }
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ if (previousToken && isSeparator(node, previousToken)) {
+ this.deleteNodeRange(sourceFile, previousToken, node);
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.replaceRange = function (sourceFile, range, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, range: range, options: options, node: newNode });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNode = function (sourceFile, oldNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, oldNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, oldNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNodeRange = function (sourceFile, startNode, endNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAt = function (sourceFile, pos, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, options: options, node: newNode, range: { pos: pos, end: pos } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeBefore = function (sourceFile, before, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, before, options, Position.Start);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: startPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) {
+ if (options === void 0) { options = {}; }
+ if ((ts.isStatementButNotDeclaration(after)) ||
+ after.kind === 148 ||
+ after.kind === 147 ||
+ after.kind === 149) {
+ if (sourceFile.text.charCodeAt(after.end - 1) !== 59) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ options: {},
+ range: { pos: after.end, end: after.end },
+ node: ts.createToken(24)
+ });
+ }
+ }
+ var endPosition = getAdjustedEndPosition(sourceFile, after, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: endPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeInListAfter = function (sourceFile, after, newNode) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(after, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(after);
+ if (index < 0) {
+ return this;
+ }
+ var end = after.getEnd();
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ if (nextToken && isSeparator(after, nextToken)) {
+ var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
+ var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
+ var prefix = void 0;
+ var startPos = void 0;
+ if (lineAndCharOfNextToken.line === lineAndCharOfNextElement.line) {
+ startPos = nextToken.end;
+ prefix = spaces(lineAndCharOfNextElement.character - lineAndCharOfNextToken.character);
+ }
+ else {
+ startPos = ts.getStartPositionOfLine(lineAndCharOfNextElement.line, sourceFile);
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: startPos, end: containingList[index + 1].getStart(sourceFile) },
+ node: newNode,
+ useIndentationFromFile: true,
+ options: {
+ prefix: prefix,
+ suffix: "" + ts.tokenToString(nextToken.kind) + sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))
+ }
+ });
+ }
+ }
+ else {
+ var afterStart = after.getStart(sourceFile);
+ var afterStartLinePosition = ts.getLineStartPositionForPosition(afterStart, sourceFile);
+ var separator = void 0;
+ var multilineList = false;
+ if (containingList.length === 1) {
+ separator = 25;
+ }
+ else {
+ var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile);
+ separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25;
+ var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile);
+ multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;
+ }
+ if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) {
+ multilineList = true;
+ }
+ if (multilineList) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: ts.createToken(separator),
+ options: {}
+ });
+ var indentation = ts.formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.rulesProvider.getFormatOptions());
+ var insertPos = ts.skipTrivia(sourceFile.text, end, true, false);
+ if (insertPos !== end && ts.isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) {
+ insertPos--;
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: insertPos, end: insertPos },
+ node: newNode,
+ options: { indentation: indentation, prefix: this.newLineCharacter }
+ });
+ }
+ else {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: newNode,
+ options: { prefix: ts.tokenToString(separator) + " " }
+ });
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.getChanges = function () {
+ var _this = this;
+ var changesPerFile = ts.createFileMap();
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var c = _a[_i];
+ var changesInFile = changesPerFile.get(c.sourceFile.path);
+ if (!changesInFile) {
+ changesPerFile.set(c.sourceFile.path, changesInFile = []);
+ }
+ changesInFile.push(c);
+ }
+ var fileChangesList = [];
+ changesPerFile.forEachValue(function (path) {
+ var changesInFile = changesPerFile.get(path);
+ var sourceFile = changesInFile[0].sourceFile;
+ var fileTextChanges = { fileName: sourceFile.fileName, textChanges: [] };
+ for (var _i = 0, _a = ChangeTracker.normalize(changesInFile); _i < _a.length; _i++) {
+ var c = _a[_i];
+ fileTextChanges.textChanges.push({
+ span: _this.computeSpan(c, sourceFile),
+ newText: _this.computeNewText(c, sourceFile)
+ });
+ }
+ fileChangesList.push(fileTextChanges);
+ });
+ return fileChangesList;
+ };
+ ChangeTracker.prototype.computeSpan = function (change, _sourceFile) {
+ return ts.createTextSpanFromBounds(change.range.pos, change.range.end);
+ };
+ ChangeTracker.prototype.computeNewText = function (change, sourceFile) {
+ if (!change.node) {
+ return "";
+ }
+ var options = change.options || {};
+ var nonFormattedText = getNonformattedText(change.node, sourceFile, this.newLine);
+ if (this.validator) {
+ this.validator(nonFormattedText);
+ }
+ var formatOptions = this.rulesProvider.getFormatOptions();
+ var pos = change.range.pos;
+ var posStartsLine = ts.getLineStartPositionForPosition(pos, sourceFile) === pos;
+ var initialIndentation = change.options.indentation !== undefined
+ ? change.options.indentation
+ : change.useIndentationFromFile
+ ? ts.formatting.SmartIndenter.getIndentation(change.range.pos, sourceFile, formatOptions, posStartsLine || (change.options.prefix === this.newLineCharacter))
+ : 0;
+ var delta = change.options.delta !== undefined
+ ? change.options.delta
+ : ts.formatting.SmartIndenter.shouldIndentChildNode(change.node)
+ ? formatOptions.indentSize
+ : 0;
+ var text = applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, this.rulesProvider);
+ text = posStartsLine || change.options.indentation !== undefined ? text : text.replace(/^\s+/, "");
+ return (options.prefix || "") + text + (options.suffix || "");
+ };
+ ChangeTracker.normalize = function (changes) {
+ var normalized = ts.stableSort(changes, function (a, b) { return a.range.pos - b.range.pos; });
+ for (var i = 0; i < normalized.length - 2; i++) {
+ ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos);
+ }
+ return normalized;
+ };
+ return ChangeTracker;
+ }());
+ textChanges.ChangeTracker = ChangeTracker;
+ function getNonformattedText(node, sourceFile, newLine) {
+ var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var writer = new Writer(ts.getNewLineCharacter(options));
+ var printer = ts.createPrinter(options, writer);
+ printer.writeNode(3, node, sourceFile, writer);
+ return { text: writer.getText(), node: assignPositionsToNode(node) };
+ }
+ textChanges.getNonformattedText = getNonformattedText;
+ function applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, rulesProvider) {
+ var lineMap = ts.computeLineStarts(nonFormattedText.text);
+ var file = {
+ text: nonFormattedText.text,
+ lineMap: lineMap,
+ getLineAndCharacterOfPosition: function (pos) { return ts.computeLineAndCharacterOfPosition(lineMap, pos); }
+ };
+ var changes = ts.formatting.formatNode(nonFormattedText.node, file, sourceFile.languageVariant, initialIndentation, delta, rulesProvider);
+ return applyChanges(nonFormattedText.text, changes);
+ }
+ textChanges.applyFormatting = applyFormatting;
+ function applyChanges(text, changes) {
+ for (var i = changes.length - 1; i >= 0; i--) {
+ var change = changes[i];
+ text = "" + text.substring(0, change.span.start) + change.newText + text.substring(ts.textSpanEnd(change.span));
+ }
+ return text;
+ }
+ textChanges.applyChanges = applyChanges;
+ function isTrivia(s) {
+ return ts.skipTrivia(s, 0) === s.length;
+ }
+ var nullTransformationContext = {
+ enableEmitNotification: ts.noop,
+ enableSubstitution: ts.noop,
+ endLexicalEnvironment: function () { return undefined; },
+ getCompilerOptions: ts.notImplemented,
+ getEmitHost: ts.notImplemented,
+ getEmitResolver: ts.notImplemented,
+ hoistFunctionDeclaration: ts.noop,
+ hoistVariableDeclaration: ts.noop,
+ isEmitNotificationEnabled: ts.notImplemented,
+ isSubstitutionEnabled: ts.notImplemented,
+ onEmitNode: ts.noop,
+ onSubstituteNode: ts.notImplemented,
+ readEmitHelpers: ts.notImplemented,
+ requestEmitHelper: ts.noop,
+ resumeLexicalEnvironment: ts.noop,
+ startLexicalEnvironment: ts.noop,
+ suspendLexicalEnvironment: ts.noop
+ };
+ function assignPositionsToNode(node) {
+ var visited = ts.visitEachChild(node, assignPositionsToNode, nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
+ var newNode = ts.nodeIsSynthesized(visited)
+ ? visited
+ : (Proxy.prototype = visited, new Proxy());
+ newNode.pos = getPos(node);
+ newNode.end = getEnd(node);
+ return newNode;
+ function Proxy() { }
+ }
+ function assignPositionsToNodeArray(nodes, visitor, test, start, count) {
+ var visited = ts.visitNodes(nodes, visitor, test, start, count);
+ if (!visited) {
+ return visited;
+ }
+ var nodeArray = visited === nodes ? ts.createNodeArray(visited.slice(0)) : visited;
+ nodeArray.pos = getPos(nodes);
+ nodeArray.end = getEnd(nodes);
+ return nodeArray;
+ }
+ var Writer = (function () {
+ function Writer(newLine) {
+ var _this = this;
+ this.lastNonTriviaPosition = 0;
+ this.writer = ts.createTextWriter(newLine);
+ this.onEmitNode = function (hint, node, printCallback) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ printCallback(hint, node);
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onBeforeEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setPos(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setEnd(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ }
+ Writer.prototype.setLastNonTriviaPosition = function (s, force) {
+ if (force || !isTrivia(s)) {
+ this.lastNonTriviaPosition = this.writer.getTextPos();
+ var i = 0;
+ while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) {
+ i++;
+ }
+ this.lastNonTriviaPosition -= i;
+ }
+ };
+ Writer.prototype.write = function (s) {
+ this.writer.write(s);
+ this.setLastNonTriviaPosition(s, false);
+ };
+ Writer.prototype.writeTextOfNode = function (text, node) {
+ this.writer.writeTextOfNode(text, node);
+ };
+ Writer.prototype.writeLine = function () {
+ this.writer.writeLine();
+ };
+ Writer.prototype.increaseIndent = function () {
+ this.writer.increaseIndent();
+ };
+ Writer.prototype.decreaseIndent = function () {
+ this.writer.decreaseIndent();
+ };
+ Writer.prototype.getText = function () {
+ return this.writer.getText();
+ };
+ Writer.prototype.rawWrite = function (s) {
+ this.writer.rawWrite(s);
+ this.setLastNonTriviaPosition(s, false);
+ };
+ Writer.prototype.writeLiteral = function (s) {
+ this.writer.writeLiteral(s);
+ this.setLastNonTriviaPosition(s, true);
+ };
+ Writer.prototype.getTextPos = function () {
+ return this.writer.getTextPos();
+ };
+ Writer.prototype.getLine = function () {
+ return this.writer.getLine();
+ };
+ Writer.prototype.getColumn = function () {
+ return this.writer.getColumn();
+ };
+ Writer.prototype.getIndent = function () {
+ return this.writer.getIndent();
+ };
+ Writer.prototype.isAtStartOfLine = function () {
+ return this.writer.isAtStartOfLine();
+ };
+ Writer.prototype.reset = function () {
+ this.writer.reset();
+ this.lastNonTriviaPosition = 0;
+ };
+ return Writer;
+ }());
+ })(textChanges = ts.textChanges || (ts.textChanges = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
- var codeFixes = ts.createMap();
+ var codeFixes = [];
function registerCodeFix(action) {
ts.forEach(action.errorCodes, function (error) {
var fixes = codeFixes[error];
@@ -62512,25 +69476,204 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
- function getOpenBraceEnd(constructor, sourceFile) {
- return constructor.body.getFirstToken(sourceFile).getEnd();
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Class_0_incorrectly_implements_interface_1.code],
+ getCodeActions: getActionForClassLikeIncorrectImplementsInterface
+ });
+ function getActionForClassLikeIncorrectImplementsInterface(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ var classDeclaration = ts.getContainingClass(token);
+ if (!classDeclaration) {
+ return undefined;
+ }
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var classType = checker.getTypeAtLocation(classDeclaration);
+ var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(classDeclaration);
+ var hasNumericIndexSignature = !!checker.getIndexTypeOfType(classType, 1);
+ var hasStringIndexSignature = !!checker.getIndexTypeOfType(classType, 0);
+ var result = [];
+ for (var _i = 0, implementedTypeNodes_2 = implementedTypeNodes; _i < implementedTypeNodes_2.length; _i++) {
+ var implementedTypeNode = implementedTypeNodes_2[_i];
+ var implementedType = checker.getTypeAtLocation(implementedTypeNode);
+ var implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
+ var nonPrivateMembers = implementedTypeSymbols.filter(function (symbol) { return !(ts.getModifierFlags(symbol.valueDeclaration) & 8); });
+ var newNodes = [];
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 1, hasNumericIndexSignature, newNodes);
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 0, hasStringIndexSignature, newNodes);
+ newNodes = newNodes.concat(codefix.createMissingMemberNodes(classDeclaration, nonPrivateMembers, checker));
+ var message = ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_interface_0), [implementedTypeNode.getText()]);
+ if (newNodes.length > 0) {
+ pushAction(result, newNodes, message);
+ }
+ }
+ return result;
+ function createAndAddMissingIndexSignatureDeclaration(type, kind, hasIndexSigOfKind, newNodes) {
+ if (hasIndexSigOfKind) {
+ return;
+ }
+ var indexInfoOfKind = checker.getIndexInfoOfType(type, kind);
+ if (!indexInfoOfKind) {
+ return;
+ }
+ var newIndexSignatureDeclaration = checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration);
+ newNodes.push(newIndexSignatureDeclaration);
+ }
+ function pushAction(result, newNodes, description) {
+ var newAction = {
+ description: description,
+ changes: codefix.newNodesToChanges(newNodes, openBrace, context)
+ };
+ result.push(newAction);
+ }
}
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- if (token.kind !== 122) {
- return undefined;
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ getCodeActions: getActionsForAddMissingMember
+ });
+ function getActionsForAddMissingMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind !== 70) {
+ return undefined;
+ }
+ if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98) {
+ return undefined;
+ }
+ var classMemberDeclaration = ts.getThisContainer(token, false);
+ if (!ts.isClassElement(classMemberDeclaration)) {
+ return undefined;
+ }
+ var classDeclaration = classMemberDeclaration.parent;
+ if (!classDeclaration || !ts.isClassLike(classDeclaration)) {
+ return undefined;
+ }
+ var isStatic = ts.hasModifier(classMemberDeclaration, 32);
+ return ts.isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
+ function getActionsForAddMissingMemberInJavaScriptFile() {
+ var memberName = token.getText();
+ if (isStatic) {
+ if (classDeclaration.kind === 198) {
+ return undefined;
+ }
+ var className = classDeclaration.name.getText();
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classDeclaration.getEnd(), length: 0 },
+ newText: "" + context.newLineCharacter + className + "." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
}
- var newPosition = getOpenBraceEnd(token.parent, sourceFile);
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
- changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "super();", span: { start: newPosition, length: 0 } }] }]
+ else {
+ var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
+ if (!classConstructor) {
+ return undefined;
+ }
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classConstructor.body.getEnd() - 1, length: 0 },
+ newText: "this." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
+ }
+ }
+ function getActionsForAddMissingMemberInTypeScriptFile() {
+ var typeNode;
+ if (token.parent.parent.kind === 193) {
+ var binaryExpression = token.parent.parent;
+ var checker = context.program.getTypeChecker();
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
+ }
+ typeNode = typeNode || ts.createKeywordTypeNode(118);
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var property = ts.createProperty(undefined, isStatic ? [ts.createToken(114)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined);
+ var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter });
+ var actions = [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_declaration_for_missing_property_0), [token.getText()]),
+ changes: propertyChangeTracker.getChanges()
}];
+ if (!isStatic) {
+ var stringTypeNode = ts.createKeywordTypeNode(135);
+ var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined);
+ var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode);
+ var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ actions.push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ changes: indexSignatureChangeTracker.getChanges()
+ });
+ }
+ return actions;
}
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
});
codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
+ });
+ function getActionForClassLikeMissingAbstractMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ if (ts.isClassLike(token.parent)) {
+ var classDeclaration = token.parent;
+ var extendsNode = ts.getClassExtendsHeritageClauseElement(classDeclaration);
+ var instantiatedExtendsType = checker.getTypeAtLocation(extendsNode);
+ var extendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType);
+ var abstractAndNonPrivateExtendsSymbols = extendsSymbols.filter(symbolPointsToNonPrivateAndAbstractMember);
+ var newNodes = codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, checker);
+ var changes = codefix.newNodesToChanges(newNodes, ts.getOpenBraceOfClassLike(classDeclaration, sourceFile), context);
+ if (changes && changes.length > 0) {
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_inherited_abstract_class),
+ changes: changes
+ }];
+ }
+ }
+ return undefined;
+ }
+ function symbolPointsToNonPrivateAndAbstractMember(symbol) {
+ var decls = symbol.getDeclarations();
+ ts.Debug.assert(!!(decls && decls.length > 0));
+ var flags = ts.getModifierFlags(decls[0]);
+ return !(flags & 8) && !!(flags & 128);
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
errorCodes: [ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
@@ -62543,7 +69686,7 @@ var ts;
if (!superCall) {
return undefined;
}
- if (superCall.expression && superCall.expression.kind == 179) {
+ if (superCall.expression && superCall.expression.kind === 180) {
var arguments_1 = superCall.expression.arguments;
for (var i = 0; i < arguments_1.length; i++) {
if (arguments_1[i].expression === token) {
@@ -62551,23 +69694,15 @@ var ts;
}
}
}
- var newPosition = getOpenBraceEnd(constructor, sourceFile);
- var changes = [{
- fileName: sourceFile.fileName, textChanges: [{
- newText: superCall.getText(sourceFile),
- span: { start: newPosition, length: 0 }
- },
- {
- newText: "",
- span: { start: superCall.getStart(sourceFile), length: superCall.getWidth(sourceFile) }
- }]
- }];
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(constructor, sourceFile), superCall, { suffix: context.newLineCharacter });
+ changeTracker.deleteNode(sourceFile, superCall);
return [{
description: ts.getLocaleSpecificMessage(ts.Diagnostics.Make_super_call_the_first_statement_in_the_constructor),
- changes: changes
+ changes: changeTracker.getChanges()
}];
function findSuperCall(n) {
- if (n.kind === 207 && ts.isSuperCall(n.expression)) {
+ if (n.kind === 209 && ts.isSuperCall(n.expression)) {
return n;
}
if (ts.isFunctionLike(n)) {
@@ -62583,6 +69718,248 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 122) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var superCall = ts.createStatement(ts.createCall(ts.createSuper(), undefined, ts.emptyArray));
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(token.parent, sourceFile), superCall, { suffix: context.newLineCharacter });
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var classDeclNode = ts.getContainingClass(token);
+ if (!(token.kind === 70 && ts.isClassLike(classDeclNode))) {
+ return undefined;
+ }
+ var heritageClauses = classDeclNode.heritageClauses;
+ if (!(heritageClauses && heritageClauses.length > 0)) {
+ return undefined;
+ }
+ var extendsToken = heritageClauses[0].getFirstToken();
+ if (!(extendsToken && extendsToken.kind === 84)) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107));
+ for (var i = 1; i < heritageClauses.length; i++) {
+ var keywordToken = heritageClauses[i].getFirstToken();
+ if (keywordToken) {
+ changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25));
+ }
+ }
+ var result = [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Change_extends_to_implements),
+ changes: changeTracker.getChanges()
+ }];
+ return result;
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 70) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createThis(), token));
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_this_to_unresolved_variable),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics._0_is_declared_but_never_used.code,
+ ts.Diagnostics.Property_0_is_declared_but_never_used.code
+ ],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind === 20) {
+ token = ts.getTokenAtPosition(sourceFile, start + 1);
+ }
+ switch (token.kind) {
+ case 70:
+ switch (token.parent.kind) {
+ case 225:
+ switch (token.parent.parent.parent.kind) {
+ case 213:
+ var forStatement = token.parent.parent.parent;
+ var forInitializer = forStatement.initializer;
+ if (forInitializer.declarations.length === 1) {
+ return deleteNode(forInitializer);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 215:
+ var forOfStatement = token.parent.parent.parent;
+ if (forOfStatement.initializer.kind === 226) {
+ var forOfInitializer = forOfStatement.initializer;
+ return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
+ }
+ break;
+ case 214:
+ return undefined;
+ case 259:
+ var catchClause = token.parent.parent;
+ var parameter = catchClause.variableDeclaration.getChildren()[0];
+ return deleteNode(parameter);
+ default:
+ var variableStatement = token.parent.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return deleteNode(variableStatement);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ }
+ case 144:
+ var typeParameters = token.parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
+ if (!previousToken || previousToken.kind !== 26) {
+ return deleteRange(typeParameters);
+ }
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
+ if (!nextToken || nextToken.kind !== 28) {
+ return deleteRange(typeParameters);
+ }
+ return deleteNodeRange(previousToken, nextToken);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 145:
+ var functionDeclaration = token.parent.parent;
+ if (functionDeclaration.parameters.length === 1) {
+ return deleteNode(token.parent);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 236:
+ var importEquals = ts.getAncestor(token, 236);
+ return deleteNode(importEquals);
+ case 241:
+ var namedImports = token.parent.parent;
+ if (namedImports.elements.length === 1) {
+ var importSpec = ts.getAncestor(token, 237);
+ return deleteNode(importSpec);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 238:
+ var importClause = token.parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 237);
+ return deleteNode(importDecl);
+ }
+ else {
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
+ if (nextToken && nextToken.kind === 25) {
+ return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) });
+ }
+ else {
+ return deleteNode(importClause.name);
+ }
+ }
+ case 239:
+ var namespaceImport = token.parent;
+ if (namespaceImport.name === token && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 237);
+ return deleteNode(importDecl);
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
+ if (previousToken && previousToken.kind === 25) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return deleteRange({ pos: startPosition, end: namespaceImport.end });
+ }
+ return deleteRange(namespaceImport);
+ }
+ }
+ break;
+ case 148:
+ case 239:
+ return deleteNode(token.parent);
+ }
+ if (ts.isDeclarationName(token)) {
+ return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
+ function deleteNode(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
+ }
+ function deleteRange(range) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteRange(sourceFile, range));
+ }
+ function deleteNodeInList(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeInList(sourceFile, n));
+ }
+ function deleteNodeRange(start, end) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeRange(sourceFile, start, end));
+ }
+ function replaceNode(n, newNode) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).replaceNode(sourceFile, n, newNode));
+ }
+ function makeChange(changeTracker) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -62591,18 +69968,19 @@ var ts;
})(ModuleSpecifierComparison || (ModuleSpecifierComparison = {}));
var ImportCodeActionMap = (function () {
function ImportCodeActionMap() {
- this.symbolIdToActionMap = ts.createMap();
+ this.symbolIdToActionMap = [];
}
ImportCodeActionMap.prototype.addAction = function (symbolId, newAction) {
if (!newAction) {
return;
}
- if (!this.symbolIdToActionMap[symbolId]) {
+ var actions = this.symbolIdToActionMap[symbolId];
+ if (!actions) {
this.symbolIdToActionMap[symbolId] = [newAction];
return;
}
if (newAction.kind === "CodeChange") {
- this.symbolIdToActionMap[symbolId].push(newAction);
+ actions.push(newAction);
return;
}
var updatedNewImports = [];
@@ -62635,8 +70013,8 @@ var ts;
};
ImportCodeActionMap.prototype.getAllActions = function () {
var result = [];
- for (var symbolId in this.symbolIdToActionMap) {
- result = ts.concatenate(result, this.symbolIdToActionMap[symbolId]);
+ for (var key in this.symbolIdToActionMap) {
+ result = ts.concatenate(result, this.symbolIdToActionMap[key]);
}
return result;
};
@@ -62665,7 +70043,11 @@ var ts;
return ImportCodeActionMap;
}());
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Cannot_find_name_0.code],
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_namespace_0.code,
+ ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
+ ],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var checker = context.program.getTypeChecker();
@@ -62674,18 +70056,22 @@ var ts;
var token = ts.getTokenAtPosition(sourceFile, context.span.start);
var name = token.getText();
var symbolIdActionMap = new ImportCodeActionMap();
- var cachedImportDeclarations = ts.createMap();
- var cachedNewImportInsertPosition;
- var allPotentialModules = checker.getAmbientModules();
+ var cachedImportDeclarations = [];
+ var lastImportDeclaration;
+ var currentTokenMeaning = ts.getMeaningFromLocation(token);
+ if (context.errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
+ var symbol = checker.getAliasedSymbol(checker.getSymbolAtLocation(token));
+ return getCodeActionForImport(symbol, false, true);
+ }
+ var candidateModules = checker.getAmbientModules();
for (var _i = 0, allSourceFiles_1 = allSourceFiles; _i < allSourceFiles_1.length; _i++) {
var otherSourceFile = allSourceFiles_1[_i];
if (otherSourceFile !== sourceFile && ts.isExternalOrCommonJsModule(otherSourceFile)) {
- allPotentialModules.push(otherSourceFile.symbol);
+ candidateModules.push(otherSourceFile.symbol);
}
}
- var currentTokenMeaning = ts.getMeaningFromLocation(token);
- for (var _a = 0, allPotentialModules_1 = allPotentialModules; _a < allPotentialModules_1.length; _a++) {
- var moduleSymbol = allPotentialModules_1[_a];
+ for (var _a = 0, candidateModules_1 = candidateModules; _a < candidateModules_1.length; _a++) {
+ var moduleSymbol = candidateModules_1[_a];
context.cancellationToken.throwIfCancellationRequested();
var defaultExport = checker.tryGetMemberInModuleExports("default", moduleSymbol);
if (defaultExport) {
@@ -62704,8 +70090,9 @@ var ts;
return symbolIdActionMap.getAllActions();
function getImportDeclarations(moduleSymbol) {
var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- if (cachedImportDeclarations[moduleSymbolId]) {
- return cachedImportDeclarations[moduleSymbolId];
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
}
var existingDeclarations = [];
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
@@ -62720,10 +70107,10 @@ var ts;
function getImportDeclaration(moduleSpecifier) {
var node = moduleSpecifier;
while (node) {
- if (node.kind === 235) {
+ if (node.kind === 237) {
return node;
}
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
node = node.parent;
@@ -62741,7 +70128,7 @@ var ts;
var declarations = symbol.getDeclarations();
return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
}
- function getCodeActionForImport(moduleSymbol, isDefault) {
+ function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
var existingDeclarations = getImportDeclarations(moduleSymbol);
if (existingDeclarations.length > 0) {
return getCodeActionsForExistingImport(existingDeclarations);
@@ -62754,11 +70141,11 @@ var ts;
var namespaceImportDeclaration;
var namedImportDeclaration;
var existingModuleSpecifier;
- for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
- var declaration = declarations_11[_i];
- if (declaration.kind === 235) {
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 237) {
var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 237) {
+ if (namedBindings && namedBindings.kind === 239) {
namespaceImportDeclaration = declaration;
}
else {
@@ -62774,94 +70161,82 @@ var ts;
if (namespaceImportDeclaration) {
actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
}
- if (namedImportDeclaration && namedImportDeclaration.importClause &&
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
(namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
- var textChange = getTextChangeForImportClause(namedImportDeclaration.importClause);
+ var fileTextChanges = getTextChangeForImportClause(namedImportDeclaration.importClause);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(namedImportDeclaration.moduleSpecifier.getText());
- actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], textChange.newText, textChange.span, sourceFile.fileName, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
}
else {
actions.push(getCodeActionForNewImport(existingModuleSpecifier));
}
return actions;
function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 245) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 247) {
return declaration.moduleReference.expression.getText();
}
return declaration.moduleReference.getText();
}
function getTextChangeForImportClause(importClause) {
- var newImportText = isDefault ? "default as " + name : name;
var importList = importClause.namedBindings;
- if (!importList && importClause.name) {
- var start = importClause.name.getEnd();
- return {
- newText: ", { " + newImportText + " }",
- span: { start: start, length: 0 }
- };
- }
- if (importList.elements.length === 0) {
- var start = importList.getStart();
- return {
- newText: "{ " + newImportText + " }",
- span: { start: start, length: importList.getEnd() - start }
- };
+ var newImportSpecifier = ts.createImportSpecifier(undefined, ts.createIdentifier(name));
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
}
- var insertPoint = importList.elements[importList.elements.length - 1].getEnd();
- var startLine = ts.getLineOfLocalPosition(sourceFile, importList.getStart());
- var endLine = ts.getLineOfLocalPosition(sourceFile, importList.getEnd());
- var oneImportPerLine = endLine - startLine > importList.elements.length;
- return {
- newText: "," + (oneImportPerLine ? context.newLineCharacter : " ") + newImportText,
- span: { start: insertPoint, length: 0 }
- };
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
}
function getCodeActionForNamespaceImport(declaration) {
var namespacePrefix;
- if (declaration.kind === 235) {
+ if (declaration.kind === 237) {
namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
namespacePrefix = declaration.name.getText();
}
namespacePrefix = ts.stripQuotes(namespacePrefix);
- return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], namespacePrefix + ".", { start: token.getStart(), length: 0 }, sourceFile.fileName, "CodeChange");
+ return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
}
}
function getCodeActionForNewImport(moduleSpecifier) {
- if (!cachedNewImportInsertPosition) {
- var lastModuleSpecifierEnd = -1;
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var moduleSpecifier_1 = _a[_i];
- var end = moduleSpecifier_1.getEnd();
- if (!lastModuleSpecifierEnd || end > lastModuleSpecifierEnd) {
- lastModuleSpecifierEnd = end;
+ if (!lastImportDeclaration) {
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 236 || statement.kind === 237) {
+ lastImportDeclaration = statement;
+ break;
}
}
- cachedNewImportInsertPosition = lastModuleSpecifierEnd > 0 ? sourceFile.getLineEndOfPosition(lastModuleSpecifierEnd) : sourceFile.getStart();
}
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- var importStatementText = isDefault
- ? "import " + name + " from \"" + moduleSpecifierWithoutQuotes + "\""
- : "import { " + name + " } from \"" + moduleSpecifierWithoutQuotes + "\"";
- var newText = cachedNewImportInsertPosition === sourceFile.getStart()
- ? importStatementText + ";" + context.newLineCharacter + context.newLineCharacter
- : "" + context.newLineCharacter + importStatementText + ";";
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], newText, { start: cachedNewImportInsertPosition, length: 0 }, sourceFile.fileName, "NewImport", moduleSpecifierWithoutQuotes);
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(name), undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(undefined, ts.createNamespaceImport(ts.createIdentifier(name)))
+ : ts.createImportClause(undefined, ts.createNamedImports([ts.createImportSpecifier(undefined, ts.createIdentifier(name))]));
+ var importDecl = ts.createImportDeclaration(undefined, undefined, importClause, ts.createLiteral(moduleSpecifierWithoutQuotes));
+ if (!lastImportDeclaration) {
+ changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: "" + context.newLineCharacter + context.newLineCharacter });
+ }
+ else {
+ changeTracker.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl, { suffix: context.newLineCharacter });
+ }
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.path;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().path;
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
var sourceDirectory = ts.getDirectoryPath(fileName);
var options = context.program.getCompilerOptions();
return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
tryGetModuleNameFromTypeRoots() ||
tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 261) {
+ if (moduleSymbol.valueDeclaration.kind !== 264) {
return moduleSymbol.name;
}
}
@@ -62869,11 +70244,11 @@ var ts;
if (!options.baseUrl) {
return undefined;
}
- var normalizedBaseUrl = ts.toPath(options.baseUrl, ts.getDirectoryPath(options.baseUrl), getCanonicalFileName);
- var relativeName = tryRemoveParentDirectoryName(moduleFileName, normalizedBaseUrl);
+ var relativeName = getRelativePathIfInDirectory(moduleFileName, options.baseUrl);
if (!relativeName) {
return undefined;
}
+ var relativeNameWithIndex = ts.removeFileExtension(relativeName);
relativeName = removeExtensionAndIndexPostFix(relativeName);
if (options.paths) {
for (var key in options.paths) {
@@ -62893,7 +70268,7 @@ var ts;
return key.replace("\*", matchedStar);
}
}
- else if (pattern === relativeName) {
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
return key;
}
}
@@ -62903,9 +70278,8 @@ var ts;
}
function tryGetModuleNameFromRootDirs() {
if (options.rootDirs) {
- var normalizedRootDirs = ts.map(options.rootDirs, function (rootDir) { return ts.toPath(rootDir, undefined, getCanonicalFileName); });
- var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, normalizedRootDirs);
- var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, normalizedRootDirs);
+ var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, options.rootDirs);
+ var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, options.rootDirs);
if (normalizedTargetPath !== undefined) {
var relativePath = normalizedSourcePath !== undefined ? getRelativePath(normalizedTargetPath, normalizedSourcePath) : normalizedTargetPath;
return ts.removeFileExtension(relativePath);
@@ -62967,7 +70341,7 @@ var ts;
function getPathRelativeToRootDirs(path, rootDirs) {
for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
var rootDir = rootDirs_2[_i];
- var relativeName = tryRemoveParentDirectoryName(path, rootDir);
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
if (relativeName !== undefined) {
return relativeName;
}
@@ -62981,25 +70355,23 @@ var ts;
}
return fileName;
}
+ function getRelativePathIfInDirectory(path, directoryPath) {
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
+ return ts.isRootedDiskPath(relativePath) || ts.startsWith(relativePath, "..") ? undefined : relativePath;
+ }
function getRelativePath(path, directoryPath) {
var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- function tryRemoveParentDirectoryName(path, parentDirectory) {
- var index = path.indexOf(parentDirectory);
- if (index === 0) {
- return ts.endsWith(parentDirectory, ts.directorySeparator)
- ? path.substring(parentDirectory.length)
- : path.substring(parentDirectory.length + 1);
- }
- return undefined;
- }
}
}
- function createCodeAction(description, diagnosticArgs, newText, span, fileName, kind, moduleSpecifier) {
+ function createChangeTracker() {
+ return ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ }
+ function createCodeAction(description, diagnosticArgs, changes, kind, moduleSpecifier) {
return {
description: ts.formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)),
- changes: [{ fileName: fileName, textChanges: [{ newText: newText, span: span }] }],
+ changes: changes,
kind: kind,
moduleSpecifier: moduleSpecifier
};
@@ -63013,150 +70385,225 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [
- ts.Diagnostics._0_is_declared_but_never_used.code,
- ts.Diagnostics.Property_0_is_declared_but_never_used.code
- ],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
- if (token.kind === 20) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
- }
- switch (token.kind) {
- case 70:
- switch (token.parent.kind) {
- case 223:
- switch (token.parent.parent.parent.kind) {
- case 211:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return createCodeFix("", forInitializer.pos, forInitializer.end - forInitializer.pos);
- }
- else {
- return removeSingleItem(forInitializer.declarations, token);
- }
- case 213:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 224) {
- var forOfInitializer = forOfStatement.initializer;
- return createCodeFix("{}", forOfInitializer.declarations[0].pos, forOfInitializer.declarations[0].end - forOfInitializer.declarations[0].pos);
- }
- break;
- case 212:
- return undefined;
- case 256:
- var catchClause = token.parent.parent;
- var parameter = catchClause.variableDeclaration.getChildren()[0];
- return createCodeFix("", parameter.pos, parameter.end - parameter.pos);
- default:
- var variableStatement = token.parent.parent.parent;
- if (variableStatement.declarationList.declarations.length === 1) {
- return createCodeFix("", variableStatement.pos, variableStatement.end - variableStatement.pos);
- }
- else {
- var declarations = variableStatement.declarationList.declarations;
- return removeSingleItem(declarations, token);
- }
- }
- case 143:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 2);
- }
- else {
- return removeSingleItem(typeParameters, token);
- }
- case 144:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else {
- return removeSingleItem(functionDeclaration.parameters, token);
- }
- case 234:
- var importEquals = findImportDeclaration(token);
- return createCodeFix("", importEquals.pos, importEquals.end - importEquals.pos);
- case 239:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- var importSpec = findImportDeclaration(token);
- return createCodeFix("", importSpec.pos, importSpec.end - importSpec.pos);
- }
- else {
- return removeSingleItem(namedImports.elements, token);
- }
- case 236:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = findImportDeclaration(importClause);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- return createCodeFix("", importClause.name.pos, importClause.namedBindings.pos - importClause.name.pos);
- }
- case 237:
- var namespaceImport = token.parent;
- if (namespaceImport.name == token && !namespaceImport.parent.name) {
- var importDecl = findImportDeclaration(namespaceImport);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- var start_4 = namespaceImport.parent.name.end;
- return createCodeFix("", start_4, namespaceImport.parent.namedBindings.end - start_4);
- }
- }
- break;
- case 147:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- case 237:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- if (ts.isDeclarationName(token)) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return createCodeFix("", token.parent.parent.pos, token.parent.parent.end - token.parent.parent.pos);
- }
- else {
- return undefined;
- }
- function findImportDeclaration(token) {
- var importDecl = token;
- while (importDecl.kind != 235 && importDecl.parent) {
- importDecl = importDecl.parent;
- }
- return importDecl;
+ errorCodes: getApplicableDiagnosticCodes(),
+ getCodeActions: getDisableJsDiagnosticsCodeActions
+ });
+ function getApplicableDiagnosticCodes() {
+ var allDiagnostcs = ts.Diagnostics;
+ return Object.keys(allDiagnostcs)
+ .filter(function (d) { return allDiagnostcs[d] && allDiagnostcs[d].category === ts.DiagnosticCategory.Error; })
+ .map(function (d) { return allDiagnostcs[d].code; });
+ }
+ function getIgnoreCommentLocationForLocation(sourceFile, position, newLineCharacter) {
+ var line = ts.getLineAndCharacterOfPosition(sourceFile, position).line;
+ var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile);
+ var startPosition = ts.getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
+ if (!ts.isInComment(sourceFile, startPosition) && !ts.isInString(sourceFile, startPosition) && !ts.isInTemplateString(sourceFile, startPosition)) {
+ var token = ts.getTouchingToken(sourceFile, startPosition);
+ var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
+ if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
+ return {
+ span: { start: startPosition, length: 0 },
+ newText: "// @ts-ignore" + newLineCharacter
+ };
}
- function createCodeFix(newText, start, length) {
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_unused_identifiers),
- changes: [{
- fileName: sourceFile.fileName,
- textChanges: [{ newText: newText, span: { start: start, length: length } }]
+ }
+ return {
+ span: { start: position, length: 0 },
+ newText: (position === startPosition ? "" : newLineCharacter) + "// @ts-ignore" + newLineCharacter
+ };
+ }
+ function getDisableJsDiagnosticsCodeActions(context) {
+ var sourceFile = context.sourceFile, program = context.program, newLineCharacter = context.newLineCharacter, span = context.span;
+ if (!ts.isInJavaScriptFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
+ return undefined;
+ }
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Ignore_this_error_message),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [getIgnoreCommentLocationForLocation(sourceFile, span.start, newLineCharacter)]
+ }]
+ },
+ {
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Disable_checking_for_this_file),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: {
+ start: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.pos : 0,
+ length: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.end - sourceFile.checkJsDirective.pos : 0
+ },
+ newText: "// @ts-nocheck" + newLineCharacter
}]
- }];
+ }]
+ }];
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ function newNodesToChanges(newNodes, insertAfter, context) {
+ var sourceFile = context.sourceFile;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ for (var _i = 0, newNodes_1 = newNodes; _i < newNodes_1.length; _i++) {
+ var newNode = newNodes_1[_i];
+ changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: context.newLineCharacter });
+ }
+ var changes = changeTracker.getChanges();
+ if (!ts.some(changes)) {
+ return changes;
+ }
+ ts.Debug.assert(changes.length === 1);
+ var consolidatedChanges = [{
+ fileName: changes[0].fileName,
+ textChanges: [{
+ span: changes[0].textChanges[0].span,
+ newText: changes[0].textChanges.reduce(function (prev, cur) { return prev + cur.newText; }, "")
+ }]
+ }];
+ return consolidatedChanges;
+ }
+ codefix.newNodesToChanges = newNodesToChanges;
+ function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, checker) {
+ var classMembers = classDeclaration.symbol.members;
+ var missingMembers = possiblyMissingSymbols.filter(function (symbol) { return !classMembers.has(symbol.getName()); });
+ var newNodes = [];
+ for (var _i = 0, missingMembers_1 = missingMembers; _i < missingMembers_1.length; _i++) {
+ var symbol = missingMembers_1[_i];
+ var newNode = createNewNodeForMemberSymbol(symbol, classDeclaration, checker);
+ if (newNode) {
+ if (Array.isArray(newNode)) {
+ newNodes = newNodes.concat(newNode);
+ }
+ else {
+ newNodes.push(newNode);
+ }
}
- function removeSingleItem(elements, token) {
- if (elements[0] === token.parent) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos + 1);
+ }
+ return newNodes;
+ }
+ codefix.createMissingMemberNodes = createMissingMemberNodes;
+ function createNewNodeForMemberSymbol(symbol, enclosingDeclaration, checker) {
+ var declarations = symbol.getDeclarations();
+ if (!(declarations && declarations.length)) {
+ return undefined;
+ }
+ var declaration = declarations[0];
+ var name = ts.getSynthesizedClone(declaration.name);
+ var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
+ var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
+ var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
+ var optional = !!(symbol.flags & 67108864);
+ switch (declaration.kind) {
+ case 152:
+ case 153:
+ case 147:
+ case 148:
+ var typeNode = checker.typeToTypeNode(type, enclosingDeclaration);
+ var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(54) : undefined, typeNode, undefined);
+ return property;
+ case 149:
+ case 150:
+ var signatures = checker.getSignaturesOfType(type, 0);
+ if (!ts.some(signatures)) {
+ return undefined;
+ }
+ if (declarations.length === 1) {
+ ts.Debug.assert(signatures.length === 1);
+ var signature = signatures[0];
+ return signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ }
+ var signatureDeclarations = [];
+ for (var i = 0; i < signatures.length; i++) {
+ var signature = signatures[i];
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration);
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
+ }
+ if (declarations.length > signatures.length) {
+ var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]);
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
}
else {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 1);
+ ts.Debug.assert(declarations.length === signatures.length);
+ var methodImplementingSignatures = createMethodImplementingSignatures(signatures, name, optional, modifiers);
+ signatureDeclarations.push(methodImplementingSignatures);
}
+ return signatureDeclarations;
+ default:
+ return undefined;
+ }
+ function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150, enclosingDeclaration);
+ if (signatureDeclaration) {
+ signatureDeclaration.decorators = undefined;
+ signatureDeclaration.modifiers = modifiers;
+ signatureDeclaration.name = name;
+ signatureDeclaration.questionToken = optional ? ts.createToken(54) : undefined;
+ signatureDeclaration.body = body;
}
+ return signatureDeclaration;
}
- });
+ }
+ function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
+ var maxArgsSignature = signatures[0];
+ var minArgumentCount = signatures[0].minArgumentCount;
+ var someSigHasRestParameter = false;
+ for (var i = 0; i < signatures.length; i++) {
+ var sig = signatures[i];
+ minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount);
+ if (sig.hasRestParameter) {
+ someSigHasRestParameter = true;
+ }
+ if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) {
+ maxArgsSignature = sig;
+ }
+ }
+ var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0);
+ var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); });
+ var parameters = [];
+ for (var i = 0; i < maxNonRestArgs; i++) {
+ var anyType = ts.createKeywordTypeNode(118);
+ var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(54) : undefined, anyType, undefined);
+ parameters.push(newParameter);
+ }
+ if (someSigHasRestParameter) {
+ var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118));
+ var restParameter = ts.createParameter(undefined, undefined, ts.createToken(23), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(54) : undefined, anyArrayType, undefined);
+ parameters.push(restParameter);
+ }
+ return createStubbedMethod(modifiers, name, optional, undefined, parameters, undefined);
+ }
+ function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
+ return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(54) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ }
+ codefix.createStubbedMethod = createStubbedMethod;
+ function createStubbedMethodBody() {
+ return ts.createBlock([ts.createThrow(ts.createNew(ts.createIdentifier("Error"), undefined, [ts.createLiteral("Method not implemented.")]))], true);
+ }
+ function createVisibilityModifier(flags) {
+ if (flags & 4) {
+ return ts.createToken(113);
+ }
+ else if (flags & 16) {
+ return ts.createToken(112);
+ }
+ return undefined;
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.servicesVersion = "0.5";
function createNode(kind, pos, end, parent) {
- var node = kind >= 141 ? new NodeObject(kind, pos, end) :
+ var node = kind >= 142 ? new NodeObject(kind, pos, end) :
kind === 70 ? new IdentifierObject(70, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -63214,11 +70661,11 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(292, nodes.pos, nodes.end, this);
+ var list = createNode(293, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
- for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
- var node = nodes_7[_i];
+ for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
+ var node = nodes_9[_i];
if (pos < node.pos) {
pos = this.addSyntheticNodes(list._children, pos, node.pos);
}
@@ -63233,11 +70680,11 @@ var ts;
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
var children;
- if (this.kind >= 141) {
+ if (this.kind >= 142) {
ts.scanner.setText((sourceFile || this.getSourceFile()).text);
children = [];
var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 278 && this.kind <= 291;
+ var useJSDocScanner_1 = this.kind >= 282 && this.kind <= 292;
var processNode = function (node) {
var isJSDocTagNode = ts.isJSDocTag(node);
if (!isJSDocTagNode && pos_3 < node.pos) {
@@ -63290,8 +70737,10 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = children[0];
- return child.kind < 141 ? child : child.getFirstToken(sourceFile);
+ var child = ts.find(children, function (kid) { return kid.kind < 266 || kid.kind > 292; });
+ return child.kind < 142 ?
+ child :
+ child.getFirstToken(sourceFile);
};
NodeObject.prototype.getLastToken = function (sourceFile) {
var children = this.getChildren(sourceFile);
@@ -63299,7 +70748,10 @@ var ts;
if (!child) {
return undefined;
}
- return child.kind < 141 ? child : child.getLastToken(sourceFile);
+ return child.kind < 142 ? child : child.getLastToken(sourceFile);
+ };
+ NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) {
+ return ts.forEachChild(this, cbNode, cbNodeArray);
};
return NodeObject;
}());
@@ -63352,6 +70804,9 @@ var ts;
TokenOrIdentifierObject.prototype.getLastToken = function () {
return undefined;
};
+ TokenOrIdentifierObject.prototype.forEachChild = function () {
+ return undefined;
+ };
return TokenOrIdentifierObject;
}());
var SymbolObject = (function () {
@@ -63374,6 +70829,12 @@ var ts;
}
return this.documentationComment;
};
+ SymbolObject.prototype.getJsDocTags = function () {
+ if (this.tags === undefined) {
+ this.tags = ts.JsDoc.getJsDocTagsFromDeclarations(this.declarations);
+ }
+ return this.tags;
+ };
return SymbolObject;
}());
var TokenObject = (function (_super) {
@@ -63457,6 +70918,12 @@ var ts;
}
return this.documentationComment;
};
+ SignatureObject.prototype.getJsDocTags = function () {
+ if (this.jsDocTags === undefined) {
+ this.jsDocTags = this.declaration ? ts.JsDoc.getJsDocTagsFromDeclarations([this.declaration]) : [];
+ }
+ return this.jsDocTags;
+ };
return SignatureObject;
}());
var SourceFileObject = (function (_super) {
@@ -63496,17 +70963,21 @@ var ts;
return this.namedDeclarations;
};
SourceFileObject.prototype.computeNamedDeclarations = function () {
- var result = ts.createMap();
+ var result = ts.createMultiMap();
ts.forEachChild(this, visit);
return result;
function addDeclaration(declaration) {
var name = getDeclarationName(declaration);
if (name) {
- ts.multiMapAdd(result, name, declaration);
+ result.add(name, declaration);
}
}
function getDeclarations(name) {
- return result[name] || (result[name] = []);
+ var declarations = result.get(name);
+ if (!declarations) {
+ result.set(name, declarations = []);
+ }
+ return declarations;
}
function getDeclarationName(declaration) {
if (declaration.name) {
@@ -63514,9 +70985,9 @@ var ts;
if (result_7 !== undefined) {
return result_7;
}
- if (declaration.name.kind === 142) {
+ if (declaration.name.kind === 143) {
var expr = declaration.name.expression;
- if (expr.kind === 177) {
+ if (expr.kind === 178) {
return expr.name.text;
}
return getTextOfIdentifierOrLiteral(expr);
@@ -63536,10 +71007,10 @@ var ts;
}
function visit(node) {
switch (node.kind) {
- case 225:
- case 184:
+ case 227:
+ case 185:
+ case 150:
case 149:
- case 148:
var functionDeclaration = node;
var declarationName = getDeclarationName(functionDeclaration);
if (declarationName) {
@@ -63553,33 +71024,33 @@ var ts;
else {
declarations.push(functionDeclaration);
}
- ts.forEachChild(node, visit);
}
+ ts.forEachChild(node, visit);
break;
- case 226:
- case 197:
- case 227:
case 228:
+ case 198:
case 229:
case 230:
- case 234:
- case 243:
- case 239:
- case 234:
+ case 231:
+ case 232:
case 236:
- case 237:
- case 151:
+ case 245:
+ case 241:
+ case 236:
+ case 238:
+ case 239:
case 152:
- case 161:
+ case 153:
+ case 162:
addDeclaration(node);
ts.forEachChild(node, visit);
break;
- case 144:
+ case 145:
if (!ts.hasModifier(node, 92)) {
break;
}
- case 223:
- case 174: {
+ case 225:
+ case 175: {
var decl = node;
if (ts.isBindingPattern(decl.name)) {
ts.forEachChild(decl.name, visit);
@@ -63588,24 +71059,24 @@ var ts;
if (decl.initializer)
visit(decl.initializer);
}
- case 260:
+ case 263:
+ case 148:
case 147:
- case 146:
addDeclaration(node);
break;
- case 241:
+ case 243:
if (node.exportClause) {
ts.forEach(node.exportClause.elements, visit);
}
break;
- case 235:
+ case 237:
var importClause = node.importClause;
if (importClause) {
if (importClause.name) {
addDeclaration(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237) {
+ if (importClause.namedBindings.kind === 239) {
addDeclaration(importClause.namedBindings);
}
else {
@@ -63831,6 +71302,30 @@ var ts;
};
return CancellationTokenObject;
}());
+ var ThrottledCancellationToken = (function () {
+ function ThrottledCancellationToken(hostCancellationToken, throttleWaitMilliseconds) {
+ if (throttleWaitMilliseconds === void 0) { throttleWaitMilliseconds = 20; }
+ this.hostCancellationToken = hostCancellationToken;
+ this.throttleWaitMilliseconds = throttleWaitMilliseconds;
+ this.lastCancellationCheckTime = 0;
+ }
+ ThrottledCancellationToken.prototype.isCancellationRequested = function () {
+ var time = ts.timestamp();
+ var duration = Math.abs(time - this.lastCancellationCheckTime);
+ if (duration >= this.throttleWaitMilliseconds) {
+ this.lastCancellationCheckTime = time;
+ return this.hostCancellationToken.isCancellationRequested();
+ }
+ return false;
+ };
+ ThrottledCancellationToken.prototype.throwIfCancellationRequested = function () {
+ if (this.isCancellationRequested()) {
+ throw new ts.OperationCanceledException();
+ }
+ };
+ return ThrottledCancellationToken;
+ }());
+ ts.ThrottledCancellationToken = ThrottledCancellationToken;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
@@ -64048,10 +71543,10 @@ var ts;
if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
switch (node.kind) {
case 70:
- case 177:
- case 141:
+ case 178:
+ case 142:
case 98:
- case 167:
+ case 168:
case 96:
var type = typeChecker.getTypeAtLocation(node);
if (type) {
@@ -64060,7 +71555,8 @@ var ts;
kindModifiers: ts.ScriptElementKindModifier.none,
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: ts.typeToDisplayParts(typeChecker, type, ts.getContainerNode(node)),
- documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined
+ documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined,
+ tags: type.symbol ? type.symbol.getJsDocTags() : undefined
};
}
}
@@ -64072,26 +71568,27 @@ var ts;
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: displayPartsDocumentationsAndKind.displayParts,
- documentation: displayPartsDocumentationsAndKind.documentation
+ documentation: displayPartsDocumentationsAndKind.documentation,
+ tags: displayPartsDocumentationsAndKind.tags
};
}
function getDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position);
}
- function getImplementationAtPosition(fileName, position) {
- synchronizeHostData();
- return ts.GoToImplementation.getImplementationAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), ts.getTouchingPropertyName(getValidSourceFile(fileName), position));
- }
function getTypeDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position);
}
+ function getImplementationAtPosition(fileName, position) {
+ synchronizeHostData();
+ return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ }
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
if (results) {
- var sourceFile_2 = getCanonicalFileName(ts.normalizeSlashes(fileName));
- results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_2; });
+ var sourceFile_1 = getCanonicalFileName(ts.normalizeSlashes(fileName));
+ results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_1; });
}
return results;
}
@@ -64102,7 +71599,6 @@ var ts;
return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
- synchronizeHostData();
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
function convertDocumentHighlights(documentHighlights) {
if (!documentHighlights) {
@@ -64117,7 +71613,8 @@ var ts;
fileName: entry.fileName,
textSpan: highlightSpan.textSpan,
isWriteAccess: highlightSpan.kind === ts.HighlightSpanKind.writtenReference,
- isDefinition: false
+ isDefinition: false,
+ isInString: highlightSpan.isInString,
});
}
}
@@ -64125,20 +71622,18 @@ var ts;
}
}
function findRenameLocations(fileName, position, findInStrings, findInComments) {
- var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position, { findInStrings: findInStrings, findInComments: findInComments, isForRename: true });
}
function getReferencesAtPosition(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, false, false);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position);
}
- function findReferences(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, false, false);
- return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; });
+ function getReferences(fileName, position, options) {
+ synchronizeHostData();
+ return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
- function findReferencedSymbols(fileName, position, findInStrings, findInComments) {
+ function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, findInStrings, findInComments);
+ return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
synchronizeHostData();
@@ -64156,7 +71651,8 @@ var ts;
text: data
});
}
- var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles);
+ var customTransformers = host.getCustomTransformers && host.getCustomTransformers();
+ var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers);
return {
outputFiles: outputFiles,
emitSkipped: emitOutput.emitSkipped
@@ -64180,15 +71676,15 @@ var ts;
return;
}
switch (node.kind) {
- case 177:
- case 141:
+ case 178:
+ case 142:
case 9:
case 85:
case 100:
case 94:
case 96:
case 98:
- case 167:
+ case 168:
case 70:
break;
default:
@@ -64200,7 +71696,7 @@ var ts;
nodeForStartPos = nodeForStartPos.parent;
}
else if (ts.isNameOfModuleDeclaration(nodeForStartPos)) {
- if (nodeForStartPos.parent.parent.kind === 230 &&
+ if (nodeForStartPos.parent.parent.kind === 232 &&
nodeForStartPos.parent.parent.body === nodeForStartPos.parent) {
nodeForStartPos = nodeForStartPos.parent.parent.name;
}
@@ -64219,10 +71715,10 @@ var ts;
return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position);
}
function getNavigationBarItems(fileName) {
- return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function getNavigationTree(fileName) {
- return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function isTsOrTsxFile(fileName) {
var kind = ts.getScriptKind(fileName, host);
@@ -64250,7 +71746,7 @@ var ts;
}
function getOutliningSpans(fileName) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- return ts.OutliningElementsCollector.collectElements(sourceFile);
+ return ts.OutliningElementsCollector.collectElements(sourceFile, cancellationToken);
}
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
@@ -64326,13 +71822,13 @@ var ts;
}
return [];
}
- function getCodeFixesAtPosition(fileName, start, end, errorCodes) {
+ function getCodeFixesAtPosition(fileName, start, end, errorCodes, formatOptions) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
var span = { start: start, length: end - start };
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
var allFixes = [];
- ts.forEach(errorCodes, function (error) {
+ ts.forEach(ts.deduplicate(errorCodes), function (error) {
cancellationToken.throwIfCancellationRequested();
var context = {
errorCode: error,
@@ -64341,7 +71837,8 @@ var ts;
program: program,
newLineCharacter: newLineChar,
host: host,
- cancellationToken: cancellationToken
+ cancellationToken: cancellationToken,
+ rulesProvider: getRuleProvider(formatOptions)
};
var fixes = ts.codefix.getFixes(context);
if (fixes) {
@@ -64358,7 +71855,7 @@ var ts;
return false;
}
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position)) {
+ if (ts.isInString(sourceFile, position)) {
return false;
}
if (ts.isInsideJsxElementOrAttribute(sourceFile, position)) {
@@ -64389,7 +71886,7 @@ var ts;
continue;
}
var descriptor = undefined;
- for (var i = 0, n = descriptors.length; i < n; i++) {
+ for (var i = 0; i < descriptors.length; i++) {
if (matchArray[i + firstDescriptorCaptureIndex]) {
descriptor = descriptors[i];
}
@@ -64493,15 +71990,15 @@ var ts;
function walk(node) {
switch (node.kind) {
case 70:
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
break;
case 9:
case 8:
if (ts.isDeclarationName(node) ||
- node.parent.kind === 245 ||
+ node.parent.kind === 247 ||
isArgumentOfElementAccessExpression(node) ||
ts.isLiteralComputedPropertyDeclarationName(node)) {
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
}
break;
default:
@@ -64514,11 +72011,66 @@ var ts;
}
}
}
+ function setNameTable(text, node) {
+ nameTable.set(text, nameTable.get(text) === undefined ? node.pos : -1);
+ }
}
+ function isObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 252:
+ case 254:
+ case 260:
+ case 261:
+ case 150:
+ case 152:
+ case 153:
+ return true;
+ }
+ return false;
+ }
+ function getContainingObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 9:
+ case 8:
+ if (node.parent.kind === 143) {
+ return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined;
+ }
+ case 70:
+ return isObjectLiteralElement(node.parent) &&
+ (node.parent.parent.kind === 177 || node.parent.parent.kind === 253) &&
+ node.parent.name === node ? node.parent : undefined;
+ }
+ return undefined;
+ }
+ ts.getContainingObjectLiteralElement = getContainingObjectLiteralElement;
+ function getPropertySymbolsFromContextualType(typeChecker, node) {
+ var objectLiteral = node.parent;
+ var contextualType = typeChecker.getContextualType(objectLiteral);
+ var name = ts.getTextOfPropertyName(node.name);
+ if (name && contextualType) {
+ var result_8 = [];
+ var symbol = contextualType.getProperty(name);
+ if (contextualType.flags & 65536) {
+ ts.forEach(contextualType.types, function (t) {
+ var symbol = t.getProperty(name);
+ if (symbol) {
+ result_8.push(symbol);
+ }
+ });
+ return result_8;
+ }
+ if (symbol) {
+ result_8.push(symbol);
+ return result_8;
+ }
+ }
+ return undefined;
+ }
+ ts.getPropertySymbolsFromContextualType = getPropertySymbolsFromContextualType;
function isArgumentOfElementAccessExpression(node) {
return node &&
node.parent &&
- node.parent.kind === 178 &&
+ node.parent.kind === 179 &&
node.parent.argumentExpression === node;
}
function getDefaultLibFilePath(options) {
@@ -64528,31 +72080,1068 @@ var ts;
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
}
ts.getDefaultLibFilePath = getDefaultLibFilePath;
- function initializeServices() {
- ts.objectAllocator = getServicesObjectAllocator();
+ ts.objectAllocator = getServicesObjectAllocator();
+})(ts || (ts = {}));
+var debugObjectHost = (function () { return this; })();
+var ts;
+(function (ts) {
+ function logInternalError(logger, err) {
+ if (logger) {
+ logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message);
+ }
+ }
+ var ScriptSnapshotShimAdapter = (function () {
+ function ScriptSnapshotShimAdapter(scriptSnapshotShim) {
+ this.scriptSnapshotShim = scriptSnapshotShim;
+ }
+ ScriptSnapshotShimAdapter.prototype.getText = function (start, end) {
+ return this.scriptSnapshotShim.getText(start, end);
+ };
+ ScriptSnapshotShimAdapter.prototype.getLength = function () {
+ return this.scriptSnapshotShim.getLength();
+ };
+ ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) {
+ var oldSnapshotShim = oldSnapshot;
+ var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
+ if (encoded === null) {
+ return null;
+ }
+ var decoded = JSON.parse(encoded);
+ return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength);
+ };
+ ScriptSnapshotShimAdapter.prototype.dispose = function () {
+ if ("dispose" in this.scriptSnapshotShim) {
+ this.scriptSnapshotShim.dispose();
+ }
+ };
+ return ScriptSnapshotShimAdapter;
+ }());
+ var LanguageServiceShimHostAdapter = (function () {
+ function LanguageServiceShimHostAdapter(shimHost) {
+ var _this = this;
+ this.shimHost = shimHost;
+ this.loggingEnabled = false;
+ this.tracingEnabled = false;
+ if ("getModuleResolutionsForFile" in this.shimHost) {
+ this.resolveModuleNames = function (moduleNames, containingFile) {
+ var resolutionsInFile = JSON.parse(_this.shimHost.getModuleResolutionsForFile(containingFile));
+ return ts.map(moduleNames, function (name) {
+ var result = ts.getProperty(resolutionsInFile, name);
+ return result ? { resolvedFileName: result, extension: ts.extensionFromPath(result), isExternalLibraryImport: false } : undefined;
+ });
+ };
+ }
+ if ("directoryExists" in this.shimHost) {
+ this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); };
+ }
+ if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) {
+ this.resolveTypeReferenceDirectives = function (typeDirectiveNames, containingFile) {
+ var typeDirectivesForFile = JSON.parse(_this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile));
+ return ts.map(typeDirectiveNames, function (name) { return ts.getProperty(typeDirectivesForFile, name); });
+ };
+ }
+ }
+ LanguageServiceShimHostAdapter.prototype.log = function (s) {
+ if (this.loggingEnabled) {
+ this.shimHost.log(s);
+ }
+ };
+ LanguageServiceShimHostAdapter.prototype.trace = function (s) {
+ if (this.tracingEnabled) {
+ this.shimHost.trace(s);
+ }
+ };
+ LanguageServiceShimHostAdapter.prototype.error = function (s) {
+ this.shimHost.error(s);
+ };
+ LanguageServiceShimHostAdapter.prototype.getProjectVersion = function () {
+ if (!this.shimHost.getProjectVersion) {
+ return undefined;
+ }
+ return this.shimHost.getProjectVersion();
+ };
+ LanguageServiceShimHostAdapter.prototype.getTypeRootsVersion = function () {
+ if (!this.shimHost.getTypeRootsVersion) {
+ return 0;
+ }
+ return this.shimHost.getTypeRootsVersion();
+ };
+ LanguageServiceShimHostAdapter.prototype.useCaseSensitiveFileNames = function () {
+ return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false;
+ };
+ LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () {
+ var settingsJson = this.shimHost.getCompilationSettings();
+ if (settingsJson === null || settingsJson === "") {
+ throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
+ }
+ var compilerOptions = JSON.parse(settingsJson);
+ compilerOptions.allowNonTsExtensions = true;
+ return compilerOptions;
+ };
+ LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () {
+ var encoded = this.shimHost.getScriptFileNames();
+ return this.files = JSON.parse(encoded);
+ };
+ LanguageServiceShimHostAdapter.prototype.getScriptSnapshot = function (fileName) {
+ var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName);
+ return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot);
+ };
+ LanguageServiceShimHostAdapter.prototype.getScriptKind = function (fileName) {
+ if ("getScriptKind" in this.shimHost) {
+ return this.shimHost.getScriptKind(fileName);
+ }
+ else {
+ return 0;
+ }
+ };
+ LanguageServiceShimHostAdapter.prototype.getScriptVersion = function (fileName) {
+ return this.shimHost.getScriptVersion(fileName);
+ };
+ LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () {
+ var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
+ if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") {
+ return null;
+ }
+ try {
+ return JSON.parse(diagnosticMessagesJson);
+ }
+ catch (e) {
+ this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format");
+ return null;
+ }
+ };
+ LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () {
+ var hostCancellationToken = this.shimHost.getCancellationToken();
+ return new ts.ThrottledCancellationToken(hostCancellationToken);
+ };
+ LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () {
+ return this.shimHost.getCurrentDirectory();
+ };
+ LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
+ return JSON.parse(this.shimHost.getDirectories(path));
+ };
+ LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
+ return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
+ };
+ LanguageServiceShimHostAdapter.prototype.readDirectory = function (path, extensions, exclude, include, depth) {
+ var pattern = ts.getFileMatcherPatterns(path, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory());
+ return JSON.parse(this.shimHost.readDirectory(path, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth));
+ };
+ LanguageServiceShimHostAdapter.prototype.readFile = function (path, encoding) {
+ return this.shimHost.readFile(path, encoding);
+ };
+ LanguageServiceShimHostAdapter.prototype.fileExists = function (path) {
+ return this.shimHost.fileExists(path);
+ };
+ return LanguageServiceShimHostAdapter;
+ }());
+ ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter;
+ var CoreServicesShimHostAdapter = (function () {
+ function CoreServicesShimHostAdapter(shimHost) {
+ var _this = this;
+ this.shimHost = shimHost;
+ this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false;
+ if ("directoryExists" in this.shimHost) {
+ this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); };
+ }
+ if ("realpath" in this.shimHost) {
+ this.realpath = function (path) { return _this.shimHost.realpath(path); };
+ }
+ }
+ CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extensions, exclude, include, depth) {
+ try {
+ var pattern = ts.getFileMatcherPatterns(rootDir, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory());
+ return JSON.parse(this.shimHost.readDirectory(rootDir, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth));
+ }
+ catch (e) {
+ var results = [];
+ for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) {
+ var extension = extensions_2[_i];
+ for (var _a = 0, _b = this.readDirectoryFallback(rootDir, extension, exclude); _a < _b.length; _a++) {
+ var file = _b[_a];
+ if (!ts.contains(results, file)) {
+ results.push(file);
+ }
+ }
+ }
+ return results;
+ }
+ };
+ CoreServicesShimHostAdapter.prototype.fileExists = function (fileName) {
+ return this.shimHost.fileExists(fileName);
+ };
+ CoreServicesShimHostAdapter.prototype.readFile = function (fileName) {
+ return this.shimHost.readFile(fileName);
+ };
+ CoreServicesShimHostAdapter.prototype.readDirectoryFallback = function (rootDir, extension, exclude) {
+ return JSON.parse(this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude)));
+ };
+ CoreServicesShimHostAdapter.prototype.getDirectories = function (path) {
+ return JSON.parse(this.shimHost.getDirectories(path));
+ };
+ return CoreServicesShimHostAdapter;
+ }());
+ ts.CoreServicesShimHostAdapter = CoreServicesShimHostAdapter;
+ function simpleForwardCall(logger, actionDescription, action, logPerformance) {
+ var start;
+ if (logPerformance) {
+ logger.log(actionDescription);
+ start = ts.timestamp();
+ }
+ var result = action();
+ if (logPerformance) {
+ var end = ts.timestamp();
+ logger.log(actionDescription + " completed in " + (end - start) + " msec");
+ if (typeof result === "string") {
+ var str = result;
+ if (str.length > 128) {
+ str = str.substring(0, 128) + "...";
+ }
+ logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'");
+ }
+ }
+ return result;
+ }
+ function forwardJSONCall(logger, actionDescription, action, logPerformance) {
+ return forwardCall(logger, actionDescription, true, action, logPerformance);
+ }
+ function forwardCall(logger, actionDescription, returnJson, action, logPerformance) {
+ try {
+ var result = simpleForwardCall(logger, actionDescription, action, logPerformance);
+ return returnJson ? JSON.stringify({ result: result }) : result;
+ }
+ catch (err) {
+ if (err instanceof ts.OperationCanceledException) {
+ return JSON.stringify({ canceled: true });
+ }
+ logInternalError(logger, err);
+ err.description = actionDescription;
+ return JSON.stringify({ error: err });
+ }
+ }
+ var ShimBase = (function () {
+ function ShimBase(factory) {
+ this.factory = factory;
+ factory.registerShim(this);
+ }
+ ShimBase.prototype.dispose = function (_dummy) {
+ this.factory.unregisterShim(this);
+ };
+ return ShimBase;
+ }());
+ function realizeDiagnostics(diagnostics, newLine) {
+ return diagnostics.map(function (d) { return realizeDiagnostic(d, newLine); });
+ }
+ ts.realizeDiagnostics = realizeDiagnostics;
+ function realizeDiagnostic(diagnostic, newLine) {
+ return {
+ message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine),
+ start: diagnostic.start,
+ length: diagnostic.length,
+ category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(),
+ code: diagnostic.code
+ };
+ }
+ var LanguageServiceShimObject = (function (_super) {
+ __extends(LanguageServiceShimObject, _super);
+ function LanguageServiceShimObject(factory, host, languageService) {
+ var _this = _super.call(this, factory) || this;
+ _this.host = host;
+ _this.languageService = languageService;
+ _this.logPerformance = false;
+ _this.logger = _this.host;
+ return _this;
+ }
+ LanguageServiceShimObject.prototype.forwardJSONCall = function (actionDescription, action) {
+ return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
+ };
+ LanguageServiceShimObject.prototype.dispose = function (dummy) {
+ this.logger.log("dispose()");
+ this.languageService.dispose();
+ this.languageService = null;
+ if (debugObjectHost && debugObjectHost.CollectGarbage) {
+ debugObjectHost.CollectGarbage();
+ this.logger.log("CollectGarbage()");
+ }
+ this.logger = null;
+ _super.prototype.dispose.call(this, dummy);
+ };
+ LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
+ this.forwardJSONCall("refresh(" + throwOnError + ")", function () { return null; });
+ };
+ LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
+ var _this = this;
+ this.forwardJSONCall("cleanupSemanticCache()", function () {
+ _this.languageService.cleanupSemanticCache();
+ return null;
+ });
+ };
+ LanguageServiceShimObject.prototype.realizeDiagnostics = function (diagnostics) {
+ var newLine = ts.getNewLineOrDefaultFromHost(this.host);
+ return ts.realizeDiagnostics(diagnostics, newLine);
+ };
+ LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
+ var _this = this;
+ return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
+ };
+ LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
+ var _this = this;
+ return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
+ };
+ LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
+ var _this = this;
+ return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
+ };
+ LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
+ var _this = this;
+ return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
+ };
+ LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName + "')", function () {
+ var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
+ return _this.realizeDiagnostics(diagnostics);
+ });
+ };
+ LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getSemanticDiagnostics('" + fileName + "')", function () {
+ var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
+ return _this.realizeDiagnostics(diagnostics);
+ });
+ };
+ LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
+ var _this = this;
+ return this.forwardJSONCall("getCompilerOptionsDiagnostics()", function () {
+ var diagnostics = _this.languageService.getCompilerOptionsDiagnostics();
+ return _this.realizeDiagnostics(diagnostics);
+ });
+ };
+ LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
+ var _this = this;
+ return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")", function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
+ };
+ LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getSignatureHelpItems('" + fileName + "', " + position + ")", function () { return _this.languageService.getSignatureHelpItems(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getImplementationAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getRenameInfo('" + fileName + "', " + position + ")", function () { return _this.languageService.getRenameInfo(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) {
+ var _this = this;
+ return this.forwardJSONCall("findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ")", function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments); });
+ };
+ LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
+ var _this = this;
+ return this.forwardJSONCall("isValidBraceCompletionAtPosition('" + fileName + "', " + position + ", " + openingBrace + ")", function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
+ };
+ LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options) {
+ var _this = this;
+ return this.forwardJSONCall("getIndentationAtPosition('" + fileName + "', " + position + ")", function () {
+ var localOptions = JSON.parse(options);
+ return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
+ });
+ };
+ LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getReferencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("findReferences('" + fileName + "', " + position + ")", function () { return _this.languageService.findReferences(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
+ var _this = this;
+ return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () {
+ var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
+ var normalizedName = ts.normalizeSlashes(fileName).toLowerCase();
+ return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; });
+ });
+ };
+ LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getCompletionsAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName) {
+ var _this = this;
+ return this.forwardJSONCall("getCompletionEntryDetails('" + fileName + "', " + position + ", '" + entryName + "')", function () { return _this.languageService.getCompletionEntryDetails(fileName, position, entryName); });
+ };
+ LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options) {
+ var _this = this;
+ return this.forwardJSONCall("getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")", function () {
+ var localOptions = JSON.parse(options);
+ return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
+ });
+ };
+ LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options) {
+ var _this = this;
+ return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName + "')", function () {
+ var localOptions = JSON.parse(options);
+ return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
+ });
+ };
+ LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options) {
+ var _this = this;
+ return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')", function () {
+ var localOptions = JSON.parse(options);
+ return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
+ });
+ };
+ LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position) {
+ var _this = this;
+ return this.forwardJSONCall("getDocCommentTemplateAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position); });
+ };
+ LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ", " + fileName + ")", function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
+ };
+ LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getNavigationBarItems('" + fileName + "')", function () { return _this.languageService.getNavigationBarItems(fileName); });
+ };
+ LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getNavigationTree('" + fileName + "')", function () { return _this.languageService.getNavigationTree(fileName); });
+ };
+ LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getOutliningSpans('" + fileName + "')", function () { return _this.languageService.getOutliningSpans(fileName); });
+ };
+ LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
+ var _this = this;
+ return this.forwardJSONCall("getTodoComments('" + fileName + "')", function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
+ };
+ LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
+ var _this = this;
+ return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () { return _this.languageService.getEmitOutput(fileName); });
+ };
+ LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
+ var _this = this;
+ return forwardCall(this.logger, "getEmitOutput('" + fileName + "')", false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
+ };
+ return LanguageServiceShimObject;
+ }(ShimBase));
+ function convertClassifications(classifications) {
+ return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState };
+ }
+ var ClassifierShimObject = (function (_super) {
+ __extends(ClassifierShimObject, _super);
+ function ClassifierShimObject(factory, logger) {
+ var _this = _super.call(this, factory) || this;
+ _this.logger = logger;
+ _this.logPerformance = false;
+ _this.classifier = ts.createClassifier();
+ return _this;
+ }
+ ClassifierShimObject.prototype.getEncodedLexicalClassifications = function (text, lexState, syntacticClassifierAbsent) {
+ var _this = this;
+ return forwardJSONCall(this.logger, "getEncodedLexicalClassifications", function () { return convertClassifications(_this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)); }, this.logPerformance);
+ };
+ ClassifierShimObject.prototype.getClassificationsForLine = function (text, lexState, classifyKeywordsInGenerics) {
+ var classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics);
+ var result = "";
+ for (var _i = 0, _a = classification.entries; _i < _a.length; _i++) {
+ var item = _a[_i];
+ result += item.length + "\n";
+ result += item.classification + "\n";
+ }
+ result += classification.finalLexState;
+ return result;
+ };
+ return ClassifierShimObject;
+ }(ShimBase));
+ var CoreServicesShimObject = (function (_super) {
+ __extends(CoreServicesShimObject, _super);
+ function CoreServicesShimObject(factory, logger, host) {
+ var _this = _super.call(this, factory) || this;
+ _this.logger = logger;
+ _this.host = host;
+ _this.logPerformance = false;
+ return _this;
+ }
+ CoreServicesShimObject.prototype.forwardJSONCall = function (actionDescription, action) {
+ return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
+ };
+ CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
+ var _this = this;
+ return this.forwardJSONCall("resolveModuleName('" + fileName + "')", function () {
+ var compilerOptions = JSON.parse(compilerOptionsJson);
+ var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
+ var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
+ return {
+ resolvedFileName: resolvedFileName,
+ failedLookupLocations: result.failedLookupLocations
+ };
+ });
+ };
+ CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
+ var _this = this;
+ return this.forwardJSONCall("resolveTypeReferenceDirective(" + fileName + ")", function () {
+ var compilerOptions = JSON.parse(compilerOptionsJson);
+ var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
+ return {
+ resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : undefined,
+ primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true,
+ failedLookupLocations: result.failedLookupLocations
+ };
+ });
+ };
+ CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
+ var _this = this;
+ return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () {
+ var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), true, true);
+ return {
+ referencedFiles: _this.convertFileReferences(result.referencedFiles),
+ importedFiles: _this.convertFileReferences(result.importedFiles),
+ ambientExternalModules: result.ambientExternalModules,
+ isLibFile: result.isLibFile,
+ typeReferenceDirectives: _this.convertFileReferences(result.typeReferenceDirectives)
+ };
+ });
+ };
+ CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
+ var _this = this;
+ return this.forwardJSONCall("getAutomaticTypeDirectiveNames('" + compilerOptionsJson + "')", function () {
+ var compilerOptions = JSON.parse(compilerOptionsJson);
+ return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
+ });
+ };
+ CoreServicesShimObject.prototype.convertFileReferences = function (refs) {
+ if (!refs) {
+ return undefined;
+ }
+ var result = [];
+ for (var _i = 0, refs_2 = refs; _i < refs_2.length; _i++) {
+ var ref = refs_2[_i];
+ result.push({
+ path: ts.normalizeSlashes(ref.fileName),
+ position: ref.pos,
+ length: ref.end - ref.pos
+ });
+ }
+ return result;
+ };
+ CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
+ var _this = this;
+ return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () {
+ var text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength());
+ var result = ts.parseConfigFileTextToJson(fileName, text);
+ if (result.error) {
+ return {
+ options: {},
+ typeAcquisition: {},
+ files: [],
+ raw: {},
+ errors: [realizeDiagnostic(result.error, "\r\n")]
+ };
+ }
+ var normalizedFileName = ts.normalizeSlashes(fileName);
+ var configFile = ts.parseJsonConfigFileContent(result.config, _this.host, ts.getDirectoryPath(normalizedFileName), {}, normalizedFileName);
+ return {
+ options: configFile.options,
+ typeAcquisition: configFile.typeAcquisition,
+ files: configFile.fileNames,
+ raw: configFile.raw,
+ errors: realizeDiagnostics(configFile.errors, "\r\n")
+ };
+ });
+ };
+ CoreServicesShimObject.prototype.getDefaultCompilationSettings = function () {
+ return this.forwardJSONCall("getDefaultCompilationSettings()", function () { return ts.getDefaultCompilerOptions(); });
+ };
+ CoreServicesShimObject.prototype.discoverTypings = function (discoverTypingsJson) {
+ var _this = this;
+ var getCanonicalFileName = ts.createGetCanonicalFileName(false);
+ return this.forwardJSONCall("discoverTypings()", function () {
+ var info = JSON.parse(discoverTypingsJson);
+ return ts.JsTyping.discoverTypings(_this.host, info.fileNames, ts.toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), ts.toPath(info.safeListPath, info.safeListPath, getCanonicalFileName), info.packageNameToTypingLocation, info.typeAcquisition, info.unresolvedImports);
+ });
+ };
+ return CoreServicesShimObject;
+ }(ShimBase));
+ var TypeScriptServicesFactory = (function () {
+ function TypeScriptServicesFactory() {
+ this._shims = [];
+ }
+ TypeScriptServicesFactory.prototype.getServicesVersion = function () {
+ return ts.servicesVersion;
+ };
+ TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) {
+ try {
+ if (this.documentRegistry === undefined) {
+ this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory());
+ }
+ var hostAdapter = new LanguageServiceShimHostAdapter(host);
+ var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry);
+ return new LanguageServiceShimObject(this, host, languageService);
+ }
+ catch (err) {
+ logInternalError(host, err);
+ throw err;
+ }
+ };
+ TypeScriptServicesFactory.prototype.createClassifierShim = function (logger) {
+ try {
+ return new ClassifierShimObject(this, logger);
+ }
+ catch (err) {
+ logInternalError(logger, err);
+ throw err;
+ }
+ };
+ TypeScriptServicesFactory.prototype.createCoreServicesShim = function (host) {
+ try {
+ var adapter = new CoreServicesShimHostAdapter(host);
+ return new CoreServicesShimObject(this, host, adapter);
+ }
+ catch (err) {
+ logInternalError(host, err);
+ throw err;
+ }
+ };
+ TypeScriptServicesFactory.prototype.close = function () {
+ this._shims = [];
+ this.documentRegistry = undefined;
+ };
+ TypeScriptServicesFactory.prototype.registerShim = function (shim) {
+ this._shims.push(shim);
+ };
+ TypeScriptServicesFactory.prototype.unregisterShim = function (shim) {
+ for (var i = 0; i < this._shims.length; i++) {
+ if (this._shims[i] === shim) {
+ delete this._shims[i];
+ return;
+ }
+ }
+ throw new Error("Invalid operation");
+ };
+ return TypeScriptServicesFactory;
+ }());
+ ts.TypeScriptServicesFactory = TypeScriptServicesFactory;
+ if (typeof module !== "undefined" && module.exports) {
+ module.exports = ts;
}
- initializeServices();
})(ts || (ts = {}));
+var TypeScript;
+(function (TypeScript) {
+ var Services;
+ (function (Services) {
+ Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
+ })(Services = TypeScript.Services || (TypeScript.Services = {}));
+})(TypeScript || (TypeScript = {}));
+var toolsVersion = "2.3";
var ts;
(function (ts) {
var server;
(function (server) {
+ server.ActionSet = "action::set";
+ server.ActionInvalidate = "action::invalidate";
+ server.EventBeginInstallTypes = "event::beginInstallTypes";
+ server.EventEndInstallTypes = "event::endInstallTypes";
+ server.EventInitializationFailed = "event::initializationFailed";
+ var Arguments;
+ (function (Arguments) {
+ Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
+ Arguments.LogFile = "--logFile";
+ Arguments.EnableTelemetry = "--enableTelemetry";
+ Arguments.TypingSafeListLocation = "--typingSafeListLocation";
+ })(Arguments = server.Arguments || (server.Arguments = {}));
+ function hasArgument(argumentName) {
+ return ts.sys.args.indexOf(argumentName) >= 0;
+ }
+ server.hasArgument = hasArgument;
+ function findArgument(argumentName) {
+ var index = ts.sys.args.indexOf(argumentName);
+ return index >= 0 && index < ts.sys.args.length - 1
+ ? ts.sys.args[index + 1]
+ : undefined;
+ }
+ server.findArgument = findArgument;
+ })(server = ts.server || (ts.server = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ var LogLevel;
+ (function (LogLevel) {
+ LogLevel[LogLevel["terse"] = 0] = "terse";
+ LogLevel[LogLevel["normal"] = 1] = "normal";
+ LogLevel[LogLevel["requestTime"] = 2] = "requestTime";
+ LogLevel[LogLevel["verbose"] = 3] = "verbose";
+ })(LogLevel = server.LogLevel || (server.LogLevel = {}));
+ server.emptyArray = [];
+ var Msg;
+ (function (Msg) {
+ Msg.Err = "Err";
+ Msg.Info = "Info";
+ Msg.Perf = "Perf";
+ })(Msg = server.Msg || (server.Msg = {}));
+ function getProjectRootPath(project) {
+ switch (project.projectKind) {
+ case server.ProjectKind.Configured:
+ return ts.getDirectoryPath(project.getProjectName());
+ case server.ProjectKind.Inferred:
+ return "";
+ case server.ProjectKind.External:
+ var projectName = ts.normalizeSlashes(project.getProjectName());
+ return project.projectService.host.fileExists(projectName) ? ts.getDirectoryPath(projectName) : projectName;
+ }
+ }
+ function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) {
+ return {
+ projectName: project.getProjectName(),
+ fileNames: project.getFileNames(true),
+ compilerOptions: project.getCompilerOptions(),
+ typeAcquisition: typeAcquisition,
+ unresolvedImports: unresolvedImports,
+ projectRootPath: getProjectRootPath(project),
+ cachePath: cachePath,
+ kind: "discover"
+ };
+ }
+ server.createInstallTypingsRequest = createInstallTypingsRequest;
+ var Errors;
+ (function (Errors) {
+ function ThrowNoProject() {
+ throw new Error("No Project.");
+ }
+ Errors.ThrowNoProject = ThrowNoProject;
+ function ThrowProjectLanguageServiceDisabled() {
+ throw new Error("The project's language service is disabled.");
+ }
+ Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
+ function ThrowProjectDoesNotContainDocument(fileName, project) {
+ throw new Error("Project '" + project.getProjectName() + "' does not contain document '" + fileName + "'");
+ }
+ Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
+ })(Errors = server.Errors || (server.Errors = {}));
+ function getDefaultFormatCodeSettings(host) {
+ return {
+ indentSize: 4,
+ tabSize: 4,
+ newLineCharacter: host.newLine || "\n",
+ convertTabsToSpaces: true,
+ indentStyle: ts.IndentStyle.Smart,
+ insertSpaceAfterConstructor: false,
+ insertSpaceAfterCommaDelimiter: true,
+ insertSpaceAfterSemicolonInForStatements: true,
+ insertSpaceBeforeAndAfterBinaryOperators: true,
+ insertSpaceAfterKeywordsInControlFlowStatements: true,
+ insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
+ insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
+ insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
+ insertSpaceBeforeFunctionParenthesis: false,
+ placeOpenBraceOnNewLineForFunctions: false,
+ placeOpenBraceOnNewLineForControlBlocks: false,
+ };
+ }
+ server.getDefaultFormatCodeSettings = getDefaultFormatCodeSettings;
+ function mergeMapLikes(target, source) {
+ for (var key in source) {
+ if (ts.hasProperty(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ server.mergeMapLikes = mergeMapLikes;
+ function removeItemFromSet(items, itemToRemove) {
+ if (items.length === 0) {
+ return;
+ }
+ var index = items.indexOf(itemToRemove);
+ if (index < 0) {
+ return;
+ }
+ if (index === items.length - 1) {
+ items.pop();
+ }
+ else {
+ items[index] = items.pop();
+ }
+ }
+ server.removeItemFromSet = removeItemFromSet;
+ function toNormalizedPath(fileName) {
+ return ts.normalizePath(fileName);
+ }
+ server.toNormalizedPath = toNormalizedPath;
+ function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {
+ var f = ts.isRootedDiskPath(normalizedPath) ? normalizedPath : ts.getNormalizedAbsolutePath(normalizedPath, currentDirectory);
+ return getCanonicalFileName(f);
+ }
+ server.normalizedPathToPath = normalizedPathToPath;
+ function asNormalizedPath(fileName) {
+ return fileName;
+ }
+ server.asNormalizedPath = asNormalizedPath;
+ function createNormalizedPathMap() {
+ var map = ts.createMap();
+ return {
+ get: function (path) {
+ return map.get(path);
+ },
+ set: function (path, value) {
+ map.set(path, value);
+ },
+ contains: function (path) {
+ return map.has(path);
+ },
+ remove: function (path) {
+ map.delete(path);
+ }
+ };
+ }
+ server.createNormalizedPathMap = createNormalizedPathMap;
+ function isInferredProjectName(name) {
+ return /dev\/null\/inferredProject\d+\*/.test(name);
+ }
+ server.isInferredProjectName = isInferredProjectName;
+ function makeInferredProjectName(counter) {
+ return "/dev/null/inferredProject" + counter + "*";
+ }
+ server.makeInferredProjectName = makeInferredProjectName;
+ function toSortedReadonlyArray(arr) {
+ arr.sort();
+ return arr;
+ }
+ server.toSortedReadonlyArray = toSortedReadonlyArray;
+ var ThrottledOperations = (function () {
+ function ThrottledOperations(host) {
+ this.host = host;
+ this.pendingTimeouts = ts.createMap();
+ }
+ ThrottledOperations.prototype.schedule = function (operationId, delay, cb) {
+ var pendingTimeout = this.pendingTimeouts.get(operationId);
+ if (pendingTimeout) {
+ this.host.clearTimeout(pendingTimeout);
+ }
+ this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
+ };
+ ThrottledOperations.run = function (self, operationId, cb) {
+ self.pendingTimeouts.delete(operationId);
+ cb();
+ };
+ return ThrottledOperations;
+ }());
+ server.ThrottledOperations = ThrottledOperations;
+ var GcTimer = (function () {
+ function GcTimer(host, delay, logger) {
+ this.host = host;
+ this.delay = delay;
+ this.logger = logger;
+ }
+ GcTimer.prototype.scheduleCollect = function () {
+ if (!this.host.gc || this.timerId !== undefined) {
+ return;
+ }
+ this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
+ };
+ GcTimer.run = function (self) {
+ self.timerId = undefined;
+ var log = self.logger.hasLevel(LogLevel.requestTime);
+ var before = log && self.host.getMemoryUsage();
+ self.host.gc();
+ if (log) {
+ var after = self.host.getMemoryUsage();
+ self.logger.perftrc("GC::before " + before + ", after " + after);
+ }
+ };
+ return GcTimer;
+ }());
+ server.GcTimer = GcTimer;
+ })(server = ts.server || (ts.server = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ var TextStorage = (function () {
+ function TextStorage(host, fileName) {
+ this.host = host;
+ this.fileName = fileName;
+ this.svcVersion = 0;
+ this.textVersion = 0;
+ }
+ TextStorage.prototype.getVersion = function () {
+ return this.svc
+ ? "SVC-" + this.svcVersion + "-" + this.svc.getSnapshot().version
+ : "Text-" + this.textVersion;
+ };
+ TextStorage.prototype.hasScriptVersionCache = function () {
+ return this.svc !== undefined;
+ };
+ TextStorage.prototype.useScriptVersionCache = function (newText) {
+ this.switchToScriptVersionCache(newText);
+ };
+ TextStorage.prototype.useText = function (newText) {
+ this.svc = undefined;
+ this.setText(newText);
+ };
+ TextStorage.prototype.edit = function (start, end, newText) {
+ this.switchToScriptVersionCache().edit(start, end - start, newText);
+ };
+ TextStorage.prototype.reload = function (text) {
+ if (this.svc) {
+ this.svc.reload(text);
+ }
+ else {
+ this.setText(text);
+ }
+ };
+ TextStorage.prototype.reloadFromFile = function (tempFileName) {
+ if (this.svc || (tempFileName !== this.fileName)) {
+ this.reload(this.getFileText(tempFileName));
+ }
+ else {
+ this.setText(undefined);
+ }
+ };
+ TextStorage.prototype.getSnapshot = function () {
+ return this.svc
+ ? this.svc.getSnapshot()
+ : ts.ScriptSnapshot.fromString(this.getOrLoadText());
+ };
+ TextStorage.prototype.getLineInfo = function (line) {
+ return this.switchToScriptVersionCache().getSnapshot().index.lineNumberToInfo(line);
+ };
+ TextStorage.prototype.lineToTextSpan = function (line) {
+ if (!this.svc) {
+ var lineMap = this.getLineMap();
+ var start = lineMap[line];
+ var end = line + 1 < lineMap.length ? lineMap[line + 1] : this.text.length;
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineInfo = index.lineNumberToInfo(line + 1);
+ var len;
+ if (lineInfo.leaf) {
+ len = lineInfo.leaf.text.length;
+ }
+ else {
+ var nextLineInfo = index.lineNumberToInfo(line + 2);
+ len = nextLineInfo.offset - lineInfo.offset;
+ }
+ return ts.createTextSpan(lineInfo.offset, len);
+ };
+ TextStorage.prototype.lineOffsetToPosition = function (line, offset) {
+ if (!this.svc) {
+ return ts.computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1);
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineInfo = index.lineNumberToInfo(line);
+ return (lineInfo.offset + offset - 1);
+ };
+ TextStorage.prototype.positionToLineOffset = function (position) {
+ if (!this.svc) {
+ var _a = ts.computeLineAndCharacterOfPosition(this.getLineMap(), position), line = _a.line, character = _a.character;
+ return { line: line + 1, offset: character + 1 };
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineOffset = index.charOffsetToLineNumberAndPos(position);
+ return { line: lineOffset.line, offset: lineOffset.offset + 1 };
+ };
+ TextStorage.prototype.getFileText = function (tempFileName) {
+ return this.host.readFile(tempFileName || this.fileName) || "";
+ };
+ TextStorage.prototype.ensureNoScriptVersionCache = function () {
+ ts.Debug.assert(!this.svc, "ScriptVersionCache should not be set");
+ };
+ TextStorage.prototype.switchToScriptVersionCache = function (newText) {
+ if (!this.svc) {
+ this.svc = server.ScriptVersionCache.fromString(this.host, newText !== undefined ? newText : this.getOrLoadText());
+ this.svcVersion++;
+ this.text = undefined;
+ }
+ return this.svc;
+ };
+ TextStorage.prototype.getOrLoadText = function () {
+ this.ensureNoScriptVersionCache();
+ if (this.text === undefined) {
+ this.setText(this.getFileText());
+ }
+ return this.text;
+ };
+ TextStorage.prototype.getLineMap = function () {
+ this.ensureNoScriptVersionCache();
+ return this.lineMap || (this.lineMap = ts.computeLineStarts(this.getOrLoadText()));
+ };
+ TextStorage.prototype.setText = function (newText) {
+ this.ensureNoScriptVersionCache();
+ if (newText === undefined || this.text !== newText) {
+ this.text = newText;
+ this.lineMap = undefined;
+ this.textVersion++;
+ }
+ };
+ return TextStorage;
+ }());
+ server.TextStorage = TextStorage;
var ScriptInfo = (function () {
- function ScriptInfo(host, fileName, content, scriptKind, isOpen, hasMixedContent) {
- if (isOpen === void 0) { isOpen = false; }
+ function ScriptInfo(host, fileName, scriptKind, hasMixedContent) {
if (hasMixedContent === void 0) { hasMixedContent = false; }
this.host = host;
this.fileName = fileName;
this.scriptKind = scriptKind;
- this.isOpen = isOpen;
this.hasMixedContent = hasMixedContent;
this.containingProjects = [];
this.path = ts.toPath(fileName, host.getCurrentDirectory(), ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames));
- this.svc = server.ScriptVersionCache.fromString(host, content);
+ this.textStorage = new TextStorage(host, fileName);
+ if (hasMixedContent) {
+ this.textStorage.reload("");
+ }
this.scriptKind = scriptKind
? scriptKind
: ts.getScriptKindFromFileName(fileName);
}
+ ScriptInfo.prototype.isScriptOpen = function () {
+ return this.isOpen;
+ };
+ ScriptInfo.prototype.open = function (newText) {
+ this.isOpen = true;
+ this.textStorage.useScriptVersionCache(newText);
+ this.markContainingProjectsAsDirty();
+ };
+ ScriptInfo.prototype.close = function () {
+ this.isOpen = false;
+ this.textStorage.useText(this.hasMixedContent ? "" : undefined);
+ this.markContainingProjectsAsDirty();
+ };
+ ScriptInfo.prototype.getSnapshot = function () {
+ return this.textStorage.getSnapshot();
+ };
ScriptInfo.prototype.getFormatCodeSettings = function () {
return this.formatCodeSettings;
};
@@ -64601,17 +73190,37 @@ var ts;
this.containingProjects.length = 0;
};
ScriptInfo.prototype.getDefaultProject = function () {
- if (this.containingProjects.length === 0) {
- return server.Errors.ThrowNoProject();
+ switch (this.containingProjects.length) {
+ case 0:
+ return server.Errors.ThrowNoProject();
+ case 1:
+ return this.containingProjects[0];
+ default:
+ var firstExternalProject = void 0;
+ for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) {
+ var project = _a[_i];
+ if (project.projectKind === server.ProjectKind.Configured) {
+ return project;
+ }
+ else if (project.projectKind === server.ProjectKind.External && !firstExternalProject) {
+ firstExternalProject = project;
+ }
+ }
+ return firstExternalProject || this.containingProjects[0];
+ }
+ };
+ ScriptInfo.prototype.registerFileUpdate = function () {
+ for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) {
+ var p = _a[_i];
+ p.registerFileUpdate(this.path);
}
- return this.containingProjects[0];
};
ScriptInfo.prototype.setFormatOptions = function (formatSettings) {
if (formatSettings) {
if (!this.formatCodeSettings) {
this.formatCodeSettings = server.getDefaultFormatCodeSettings(this.host);
}
- server.mergeMaps(this.formatCodeSettings, formatSettings);
+ server.mergeMapLikes(this.formatCodeSettings, formatSettings);
}
};
ScriptInfo.prototype.setWatcher = function (watcher) {
@@ -64625,14 +73234,14 @@ var ts;
}
};
ScriptInfo.prototype.getLatestVersion = function () {
- return this.svc.latestVersion().toString();
+ return this.textStorage.getVersion();
};
ScriptInfo.prototype.reload = function (script) {
- this.svc.reload(script);
+ this.textStorage.reload(script);
this.markContainingProjectsAsDirty();
};
ScriptInfo.prototype.saveTo = function (fileName) {
- var snap = this.snap();
+ var snap = this.textStorage.getSnapshot();
this.host.writeFile(fileName, snap.getText(0, snap.getLength()));
};
ScriptInfo.prototype.reloadFromFile = function (tempFileName) {
@@ -64640,19 +73249,15 @@ var ts;
this.reload("");
}
else {
- this.svc.reloadFromFile(tempFileName || this.fileName);
+ this.textStorage.reloadFromFile(tempFileName);
this.markContainingProjectsAsDirty();
}
};
- ScriptInfo.prototype.snap = function () {
- return this.svc.getSnapshot();
- };
ScriptInfo.prototype.getLineInfo = function (line) {
- var snap = this.snap();
- return snap.index.lineNumberToInfo(line);
+ return this.textStorage.getLineInfo(line);
};
ScriptInfo.prototype.editContent = function (start, end, newText) {
- this.svc.edit(start, end - start, newText);
+ this.textStorage.edit(start, end, newText);
this.markContainingProjectsAsDirty();
};
ScriptInfo.prototype.markContainingProjectsAsDirty = function () {
@@ -64662,27 +73267,16 @@ var ts;
}
};
ScriptInfo.prototype.lineToTextSpan = function (line) {
- var index = this.snap().index;
- var lineInfo = index.lineNumberToInfo(line + 1);
- var len;
- if (lineInfo.leaf) {
- len = lineInfo.leaf.text.length;
- }
- else {
- var nextLineInfo = index.lineNumberToInfo(line + 2);
- len = nextLineInfo.offset - lineInfo.offset;
- }
- return ts.createTextSpan(lineInfo.offset, len);
+ return this.textStorage.lineToTextSpan(line);
};
ScriptInfo.prototype.lineOffsetToPosition = function (line, offset) {
- var index = this.snap().index;
- var lineInfo = index.lineNumberToInfo(line);
- return (lineInfo.offset + offset - 1);
+ return this.textStorage.lineOffsetToPosition(line, offset);
};
ScriptInfo.prototype.positionToLineOffset = function (position) {
- var index = this.snap().index;
- var lineOffset = index.charOffsetToLineNumberAndPos(position);
- return { line: lineOffset.line, offset: lineOffset.offset + 1 };
+ return this.textStorage.positionToLineOffset(position);
+ };
+ ScriptInfo.prototype.isJavaScript = function () {
+ return this.scriptKind === 1 || this.scriptKind === 2;
};
return ScriptInfo;
}());
@@ -64701,6 +73295,7 @@ var ts;
this.cancellationToken = cancellationToken;
this.resolvedModuleNames = ts.createFileMap();
this.resolvedTypeReferenceDirectives = ts.createFileMap();
+ this.cancellationToken = new ts.ThrottledCancellationToken(cancellationToken, project.projectService.throttleWaitMilliseconds);
this.getCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
if (host.trace) {
this.trace = function (s) { return host.trace(s); };
@@ -64710,7 +73305,7 @@ var ts;
? _this.project.projectService.typingsInstaller.globalTypingsCacheLocation
: undefined;
var primaryResult = ts.resolveModuleName(moduleName, containingFile, compilerOptions, host);
- if (!(primaryResult.resolvedModule && ts.extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) {
+ if (ts.moduleHasNonRelativeName(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) {
var _a = ts.loadModuleFromGlobalCache(moduleName, _this.project.getProjectName(), compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
if (resolvedModule) {
return { resolvedModule: resolvedModule, failedLookupLocations: primaryResult.failedLookupLocations.concat(failedLookupLocations) };
@@ -64738,15 +73333,16 @@ var ts;
var compilerOptions = this.getCompilationSettings();
var lastDeletedFileName = this.project.projectService.lastDeletedFile && this.project.projectService.lastDeletedFile.fileName;
for (var _i = 0, names_2 = names; _i < names_2.length; _i++) {
- var name_49 = names_2[_i];
- var resolution = newResolutions[name_49];
+ var name = names_2[_i];
+ var resolution = newResolutions.get(name);
if (!resolution) {
- var existingResolution = currentResolutionsInFile && currentResolutionsInFile[name_49];
+ var existingResolution = currentResolutionsInFile && currentResolutionsInFile.get(name);
if (moduleResolutionIsValid(existingResolution)) {
resolution = existingResolution;
}
else {
- newResolutions[name_49] = resolution = loader(name_49, containingFile, compilerOptions, this);
+ resolution = loader(name, containingFile, compilerOptions, this);
+ newResolutions.set(name, resolution);
}
if (logChanges && this.filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
this.filesWithChangedSetOfUnresolvedImports.push(path);
@@ -64786,6 +73382,9 @@ var ts;
return resolution.failedLookupLocations.length === 0;
}
};
+ LSHost.prototype.getNewLine = function () {
+ return this.host.newLine;
+ };
LSHost.prototype.getProjectVersion = function () {
return this.project.getProjectVersion();
};
@@ -64811,7 +73410,7 @@ var ts;
LSHost.prototype.getScriptSnapshot = function (filename) {
var scriptInfo = this.project.getScriptInfoLSHost(filename);
if (scriptInfo) {
- return scriptInfo.snap();
+ return scriptInfo.getSnapshot();
}
};
LSHost.prototype.getScriptFileNames = function () {
@@ -64891,18 +73490,19 @@ var ts;
var unique = 0;
for (var _i = 0, arr1_1 = arr1; _i < arr1_1.length; _i++) {
var v = arr1_1[_i];
- if (set[v] !== true) {
- set[v] = true;
+ if (set.get(v) !== true) {
+ set.set(v, true);
unique++;
}
}
for (var _a = 0, arr2_1 = arr2; _a < arr2_1.length; _a++) {
var v = arr2_1[_a];
- if (!ts.hasProperty(set, v)) {
+ var isSet = set.get(v);
+ if (isSet === undefined) {
return false;
}
- if (set[v] === true) {
- set[v] = false;
+ if (isSet === true) {
+ set.set(v, false);
unique--;
}
}
@@ -64914,7 +73514,7 @@ var ts;
!setIsEqualTo(opt1.exclude, opt2.exclude);
}
function compilerOptionsChanged(opt1, opt2) {
- return opt1.allowJs != opt2.allowJs;
+ return opt1.allowJs !== opt2.allowJs;
}
function unresolvedImportsChanged(imports1, imports2) {
if (imports1 === imports2) {
@@ -64932,38 +73532,38 @@ var ts;
if (!typeAcquisition || !typeAcquisition.enable) {
return server.emptyArray;
}
- var entry = this.perProjectCache[project.getProjectName()];
+ var entry = this.perProjectCache.get(project.getProjectName());
var result = entry ? entry.typings : server.emptyArray;
if (forceRefresh ||
!entry ||
typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) ||
compilerOptionsChanged(project.getCompilerOptions(), entry.compilerOptions) ||
unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) {
- this.perProjectCache[project.getProjectName()] = {
+ this.perProjectCache.set(project.getProjectName(), {
compilerOptions: project.getCompilerOptions(),
typeAcquisition: typeAcquisition,
typings: result,
unresolvedImports: unresolvedImports,
poisoned: true
- };
+ });
this.installer.enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
}
return result;
};
TypingsCache.prototype.updateTypingsForProject = function (projectName, compilerOptions, typeAcquisition, unresolvedImports, newTypings) {
- this.perProjectCache[projectName] = {
+ this.perProjectCache.set(projectName, {
compilerOptions: compilerOptions,
typeAcquisition: typeAcquisition,
typings: server.toSortedReadonlyArray(newTypings),
unresolvedImports: unresolvedImports,
poisoned: false
- };
+ });
};
TypingsCache.prototype.deleteTypingsForProject = function (projectName) {
- delete this.perProjectCache[projectName];
+ this.perProjectCache.delete(projectName);
};
TypingsCache.prototype.onProjectClosed = function (project) {
- delete this.perProjectCache[project.getProjectName()];
+ this.perProjectCache.delete(project.getProjectName());
this.installer.onProjectClosed(project);
};
return TypingsCache;
@@ -64991,7 +73591,7 @@ var ts;
BuilderFileInfo.prototype.containsOnlyAmbientModules = function (sourceFile) {
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var statement = _a[_i];
- if (statement.kind !== 230 || statement.name.kind !== 9) {
+ if (statement.kind !== 232 || statement.name.kind !== 9) {
return false;
}
}
@@ -65027,10 +73627,15 @@ var ts;
function AbstractBuilder(project, ctor) {
this.project = project;
this.ctor = ctor;
- this.fileInfos = ts.createFileMap();
}
+ AbstractBuilder.prototype.getFileInfos = function () {
+ return this.fileInfos_doNotAccessDirectly || (this.fileInfos_doNotAccessDirectly = ts.createFileMap());
+ };
+ AbstractBuilder.prototype.clear = function () {
+ this.fileInfos_doNotAccessDirectly = undefined;
+ };
AbstractBuilder.prototype.getFileInfo = function (path) {
- return this.fileInfos.get(path);
+ return this.getFileInfos().get(path);
};
AbstractBuilder.prototype.getOrCreateFileInfo = function (path) {
var fileInfo = this.getFileInfo(path);
@@ -65042,16 +73647,16 @@ var ts;
return fileInfo;
};
AbstractBuilder.prototype.getFileInfoPaths = function () {
- return this.fileInfos.getKeys();
+ return this.getFileInfos().getKeys();
};
AbstractBuilder.prototype.setFileInfo = function (path, info) {
- this.fileInfos.set(path, info);
+ this.getFileInfos().set(path, info);
};
AbstractBuilder.prototype.removeFileInfo = function (path) {
- this.fileInfos.remove(path);
+ this.getFileInfos().remove(path);
};
AbstractBuilder.prototype.forEachFileInfo = function (action) {
- this.fileInfos.forEachValue(function (_path, value) { return action(value); });
+ this.getFileInfos().forEachValue(function (_path, value) { return action(value); });
};
AbstractBuilder.prototype.emitFile = function (scriptInfo, writeFile) {
var fileInfo = this.getFileInfo(scriptInfo.path);
@@ -65097,7 +73702,7 @@ var ts;
var ModuleBuilderFileInfo = (function (_super) {
__extends(ModuleBuilderFileInfo, _super);
function ModuleBuilderFileInfo() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.references = [];
_this.referencedBy = [];
return _this;
@@ -65107,7 +73712,6 @@ var ts;
var r = rf.scriptInfo.fileName;
return (l < r ? -1 : (l > r ? 1 : 0));
};
- ;
ModuleBuilderFileInfo.addToReferenceList = function (array, fileInfo) {
if (array.length === 0) {
array.push(fileInfo);
@@ -65153,6 +73757,10 @@ var ts;
_this.project = project;
return _this;
}
+ ModuleBuilder.prototype.clear = function () {
+ this.projectVersionForDependencyGraph = undefined;
+ _super.prototype.clear.call(this);
+ };
ModuleBuilder.prototype.getReferencedFileInfos = function (fileInfo) {
var _this = this;
if (!fileInfo.isExternalModuleOrHasOnlyAmbientExternalModules()) {
@@ -65235,25 +73843,25 @@ var ts;
}
var queue = fileInfo.referencedBy.slice(0);
var fileNameSet = ts.createMap();
- fileNameSet[scriptInfo.fileName] = scriptInfo;
+ fileNameSet.set(scriptInfo.fileName, scriptInfo);
while (queue.length > 0) {
var processingFileInfo = queue.pop();
if (processingFileInfo.updateShapeSignature() && processingFileInfo.referencedBy.length > 0) {
for (var _i = 0, _a = processingFileInfo.referencedBy; _i < _a.length; _i++) {
var potentialFileInfo = _a[_i];
- if (!fileNameSet[potentialFileInfo.scriptInfo.fileName]) {
+ if (!fileNameSet.has(potentialFileInfo.scriptInfo.fileName)) {
queue.push(potentialFileInfo);
}
}
}
- fileNameSet[processingFileInfo.scriptInfo.fileName] = processingFileInfo.scriptInfo;
+ fileNameSet.set(processingFileInfo.scriptInfo.fileName, processingFileInfo.scriptInfo);
}
var result = [];
- for (var fileName in fileNameSet) {
- if (shouldEmitFile(fileNameSet[fileName])) {
+ fileNameSet.forEach(function (scriptInfo, fileName) {
+ if (shouldEmitFile(scriptInfo)) {
result.push(fileName);
}
- }
+ });
return result;
};
return ModuleBuilder;
@@ -65349,107 +73957,6 @@ var ts;
return UnresolvedImportsMap;
}());
server.UnresolvedImportsMap = UnresolvedImportsMap;
- var emptyResult = [];
- var getEmptyResult = function () { return emptyResult; };
- var getUndefined = function () { return undefined; };
- var emptyEncodedSemanticClassifications = { spans: emptyResult, endOfLineState: 0 };
- function createNoSemanticFeaturesWrapper(realLanguageService) {
- return {
- cleanupSemanticCache: ts.noop,
- getSyntacticDiagnostics: function (fileName) {
- return fileName ? realLanguageService.getSyntacticDiagnostics(fileName) : emptyResult;
- },
- getSemanticDiagnostics: getEmptyResult,
- getCompilerOptionsDiagnostics: function () {
- return realLanguageService.getCompilerOptionsDiagnostics();
- },
- getSyntacticClassifications: function (fileName, span) {
- return realLanguageService.getSyntacticClassifications(fileName, span);
- },
- getEncodedSyntacticClassifications: function (fileName, span) {
- return realLanguageService.getEncodedSyntacticClassifications(fileName, span);
- },
- getSemanticClassifications: getEmptyResult,
- getEncodedSemanticClassifications: function () {
- return emptyEncodedSemanticClassifications;
- },
- getCompletionsAtPosition: getUndefined,
- findReferences: getEmptyResult,
- getCompletionEntryDetails: getUndefined,
- getQuickInfoAtPosition: getUndefined,
- findRenameLocations: getEmptyResult,
- getNameOrDottedNameSpan: function (fileName, startPos, endPos) {
- return realLanguageService.getNameOrDottedNameSpan(fileName, startPos, endPos);
- },
- getBreakpointStatementAtPosition: function (fileName, position) {
- return realLanguageService.getBreakpointStatementAtPosition(fileName, position);
- },
- getBraceMatchingAtPosition: function (fileName, position) {
- return realLanguageService.getBraceMatchingAtPosition(fileName, position);
- },
- getSignatureHelpItems: getUndefined,
- getDefinitionAtPosition: getEmptyResult,
- getRenameInfo: function () { return ({
- canRename: false,
- localizedErrorMessage: ts.getLocaleSpecificMessage(ts.Diagnostics.Language_service_is_disabled),
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- }); },
- getTypeDefinitionAtPosition: getUndefined,
- getReferencesAtPosition: getEmptyResult,
- getDocumentHighlights: getEmptyResult,
- getOccurrencesAtPosition: getEmptyResult,
- getNavigateToItems: getEmptyResult,
- getNavigationBarItems: function (fileName) {
- return realLanguageService.getNavigationBarItems(fileName);
- },
- getNavigationTree: function (fileName) {
- return realLanguageService.getNavigationTree(fileName);
- },
- getOutliningSpans: function (fileName) {
- return realLanguageService.getOutliningSpans(fileName);
- },
- getTodoComments: getEmptyResult,
- getIndentationAtPosition: function (fileName, position, options) {
- return realLanguageService.getIndentationAtPosition(fileName, position, options);
- },
- getFormattingEditsForRange: function (fileName, start, end, options) {
- return realLanguageService.getFormattingEditsForRange(fileName, start, end, options);
- },
- getFormattingEditsForDocument: function (fileName, options) {
- return realLanguageService.getFormattingEditsForDocument(fileName, options);
- },
- getFormattingEditsAfterKeystroke: function (fileName, position, key, options) {
- return realLanguageService.getFormattingEditsAfterKeystroke(fileName, position, key, options);
- },
- getDocCommentTemplateAtPosition: function (fileName, position) {
- return realLanguageService.getDocCommentTemplateAtPosition(fileName, position);
- },
- isValidBraceCompletionAtPosition: function (fileName, position, openingBrace) {
- return realLanguageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace);
- },
- getEmitOutput: getUndefined,
- getProgram: function () {
- return realLanguageService.getProgram();
- },
- getNonBoundSourceFile: function (fileName) {
- return realLanguageService.getNonBoundSourceFile(fileName);
- },
- dispose: function () {
- return realLanguageService.dispose();
- },
- getCompletionEntrySymbol: getUndefined,
- getImplementationAtPosition: getEmptyResult,
- getSourceFile: function (fileName) {
- return realLanguageService.getSourceFile(fileName);
- },
- getCodeFixesAtPosition: getEmptyResult
- };
- }
- server.createNoSemanticFeaturesWrapper = createNoSemanticFeaturesWrapper;
var Project = (function () {
function Project(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) {
this.projectName = projectName;
@@ -65471,16 +73978,13 @@ var ts;
this.compilerOptions.allowNonTsExtensions = true;
this.compilerOptions.allowJs = true;
}
- else if (hasExplicitListOfFiles) {
+ else if (hasExplicitListOfFiles || this.compilerOptions.allowJs) {
this.compilerOptions.allowNonTsExtensions = true;
}
- if (this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) {
- this.compilerOptions.noEmitForJsFiles = true;
- }
+ this.setInternalCompilerOptionsForEmittingJsFiles();
this.lsHost = new server.LSHost(this.projectService.host, this, this.projectService.cancellationToken);
this.lsHost.setCompilationSettings(this.compilerOptions);
this.languageService = ts.createLanguageService(this.lsHost, this.documentRegistry);
- this.noSemanticFeaturesLanguageService = createNoSemanticFeaturesWrapper(this.languageService);
if (!languageServiceEnabled) {
this.disableLanguageService();
}
@@ -65498,6 +74002,21 @@ var ts;
Project.prototype.getCachedUnresolvedImportsPerFile_TestOnly = function () {
return this.cachedUnresolvedImportsPerFile;
};
+ Project.resolveModule = function (moduleName, initialDir, host, log) {
+ var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
+ log("Loading " + moduleName + " from " + initialDir + " (resolved to " + resolvedPath + ")");
+ var result = host.require(resolvedPath, moduleName);
+ if (result.error) {
+ log("Failed to load module: " + JSON.stringify(result.error));
+ return undefined;
+ }
+ return result.module;
+ };
+ Project.prototype.setInternalCompilerOptionsForEmittingJsFiles = function () {
+ if (this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) {
+ this.compilerOptions.noEmitForJsFiles = true;
+ }
+ };
Project.prototype.getProjectErrors = function () {
return this.projectErrors;
};
@@ -65506,9 +74025,7 @@ var ts;
if (ensureSynchronized) {
this.updateGraph();
}
- return this.languageServiceEnabled
- ? this.languageService
- : this.noSemanticFeaturesLanguageService;
+ return this.languageService;
};
Project.prototype.getCompileOnSaveAffectedFileList = function (scriptInfo) {
if (!this.languageServiceEnabled) {
@@ -65538,6 +74055,9 @@ var ts;
Project.prototype.getProjectName = function () {
return this.projectName;
};
+ Project.prototype.getExternalFiles = function () {
+ return [];
+ };
Project.prototype.getSourceFile = function (path) {
if (!this.program) {
return undefined;
@@ -65557,7 +74077,7 @@ var ts;
info.detachFromProject(this);
}
}
- else {
+ if (!this.program || !this.languageServiceEnabled) {
for (var _b = 0, _c = this.rootFiles; _b < _c.length; _b++) {
var root = _c[_b];
root.detachFromProject(this);
@@ -65582,7 +74102,9 @@ var ts;
if (this.rootFiles) {
for (var _i = 0, _a = this.rootFiles; _i < _a.length; _i++) {
var f = _a[_i];
- result.push(f.fileName);
+ if (this.languageServiceEnabled || f.isScriptOpen()) {
+ result.push(f.fileName);
+ }
}
if (this.typingFiles) {
for (var _b = 0, _c = this.typingFiles; _b < _c.length; _b++) {
@@ -65598,6 +74120,9 @@ var ts;
};
Project.prototype.getScriptInfos = function () {
var _this = this;
+ if (!this.languageServiceEnabled) {
+ return this.rootFiles;
+ }
return ts.map(this.program.getSourceFiles(), function (sourceFile) {
var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.path);
if (!scriptInfo) {
@@ -65656,7 +74181,7 @@ var ts;
};
Project.prototype.containsFile = function (filename, requireOpen) {
var info = this.projectService.getScriptInfoForNormalizedPath(filename);
- if (info && (info.isOpen || !requireOpen)) {
+ if (info && (info.isScriptOpen() || !requireOpen)) {
return this.containsScriptInfo(info);
}
};
@@ -65673,7 +74198,9 @@ var ts;
};
Project.prototype.removeFile = function (info, detachFromProject) {
if (detachFromProject === void 0) { detachFromProject = true; }
- this.removeRootFileIfNecessary(info);
+ if (this.isRoot(info)) {
+ this.removeRoot(info);
+ }
this.lsHost.notifyFileRemoved(info);
this.cachedUnresolvedImportsPerFile.remove(info.path);
if (detachFromProject) {
@@ -65681,23 +74208,26 @@ var ts;
}
this.markAsDirty();
};
+ Project.prototype.registerFileUpdate = function (fileName) {
+ (this.updatedFileNames || (this.updatedFileNames = ts.createMap())).set(fileName, fileName);
+ };
Project.prototype.markAsDirty = function () {
this.projectStateVersion++;
};
Project.prototype.extractUnresolvedImportsFromSourceFile = function (file, result) {
var cached = this.cachedUnresolvedImportsPerFile.get(file.path);
if (cached) {
- for (var _i = 0, cached_1 = cached; _i < cached_1.length; _i++) {
- var f = cached_1[_i];
+ for (var _i = 0, cached_2 = cached; _i < cached_2.length; _i++) {
+ var f = cached_2[_i];
result.push(f);
}
return;
}
var unresolvedImports;
if (file.resolvedModules) {
- for (var name_50 in file.resolvedModules) {
- if (!file.resolvedModules[name_50] && !ts.isExternalModuleNameRelative(name_50)) {
- var trimmed = name_50.trim();
+ file.resolvedModules.forEach(function (resolvedModule, name) {
+ if (!resolvedModule && !ts.isExternalModuleNameRelative(name)) {
+ var trimmed = name.trim();
var i = trimmed.indexOf("/");
if (i !== -1 && trimmed.charCodeAt(0) === 64) {
i = trimmed.indexOf("/", i + 1);
@@ -65708,14 +74238,11 @@ var ts;
(unresolvedImports || (unresolvedImports = [])).push(trimmed);
result.push(trimmed);
}
- }
+ });
}
this.cachedUnresolvedImportsPerFile.set(file.path, unresolvedImports || server.emptyArray);
};
Project.prototype.updateGraph = function () {
- if (!this.languageServiceEnabled) {
- return true;
- }
this.lsHost.startRecordingFilesWithChangedResolutions();
var hasChanges = this.updateGraphWorker();
var changedFiles = this.lsHost.finishRecordingFilesWithChangedResolutions() || server.emptyArray;
@@ -65737,6 +74264,12 @@ var ts;
if (this.setTypings(cachedTypings)) {
hasChanges = this.updateGraphWorker() || hasChanges;
}
+ if (this.languageServiceEnabled) {
+ this.builder.onProjectUpdateGraph();
+ }
+ else {
+ this.builder.clear();
+ }
if (hasChanges) {
this.projectStructureVersion++;
}
@@ -65769,7 +74302,6 @@ var ts;
}
}
}
- this.builder.onProjectUpdateGraph();
return hasChanges;
};
Project.prototype.getScriptInfoLSHost = function (fileName) {
@@ -65802,15 +74334,13 @@ var ts;
};
Project.prototype.setCompilerOptions = function (compilerOptions) {
if (compilerOptions) {
- if (this.projectKind === ProjectKind.Inferred) {
- compilerOptions.allowJs = true;
- }
compilerOptions.allowNonTsExtensions = true;
if (ts.changesAffectModuleResolution(this.compilerOptions, compilerOptions)) {
this.cachedUnresolvedImportsPerFile.clear();
this.lastCachedUnresolvedImportsList = undefined;
}
this.compilerOptions = compilerOptions;
+ this.setInternalCompilerOptionsForEmittingJsFiles();
this.lsHost.setCompilationSettings(compilerOptions);
this.markAsDirty();
}
@@ -65830,29 +74360,33 @@ var ts;
projectName: this.getProjectName(),
version: this.projectStructureVersion,
isInferred: this.projectKind === ProjectKind.Inferred,
- options: this.getCompilerOptions()
+ options: this.getCompilerOptions(),
+ languageServiceDisabled: !this.languageServiceEnabled
};
+ var updatedFileNames = this.updatedFileNames;
+ this.updatedFileNames = undefined;
if (this.lastReportedFileNames && lastKnownVersion === this.lastReportedVersion) {
- if (this.projectStructureVersion == this.lastReportedVersion) {
+ if (this.projectStructureVersion === this.lastReportedVersion && !updatedFileNames) {
return { info: info, projectErrors: this.projectErrors };
}
- var lastReportedFileNames = this.lastReportedFileNames;
- var currentFiles = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
- var added = [];
- var removed = [];
- for (var id in currentFiles) {
- if (!ts.hasProperty(lastReportedFileNames, id)) {
- added.push(id);
+ var lastReportedFileNames_1 = this.lastReportedFileNames;
+ var currentFiles_1 = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
+ var added_1 = [];
+ var removed_1 = [];
+ var updated = ts.arrayFrom(updatedFileNames.keys());
+ ts.forEachKey(currentFiles_1, function (id) {
+ if (!lastReportedFileNames_1.has(id)) {
+ added_1.push(id);
}
- }
- for (var id in lastReportedFileNames) {
- if (!ts.hasProperty(currentFiles, id)) {
- removed.push(id);
+ });
+ ts.forEachKey(lastReportedFileNames_1, function (id) {
+ if (!currentFiles_1.has(id)) {
+ removed_1.push(id);
}
- }
- this.lastReportedFileNames = currentFiles;
+ });
+ this.lastReportedFileNames = currentFiles_1;
this.lastReportedVersion = this.projectStructureVersion;
- return { info: info, changes: { added: added, removed: removed }, projectErrors: this.projectErrors };
+ return { info: info, changes: { added: added_1, removed: removed_1, updated: updated }, projectErrors: this.projectErrors };
}
else {
var projectFileNames = this.getFileNames();
@@ -65879,7 +74413,7 @@ var ts;
if (symbol && symbol.declarations && symbol.declarations[0]) {
var declarationSourceFile = symbol.declarations[0].getSourceFile();
if (declarationSourceFile) {
- referencedFiles[declarationSourceFile.path] = true;
+ referencedFiles.set(declarationSourceFile.path, true);
}
}
}
@@ -65890,28 +74424,25 @@ var ts;
for (var _b = 0, _c = sourceFile.referencedFiles; _b < _c.length; _b++) {
var referencedFile = _c[_b];
var referencedPath = ts.toPath(referencedFile.fileName, currentDirectory, getCanonicalFileName);
- referencedFiles[referencedPath] = true;
+ referencedFiles.set(referencedPath, true);
}
}
if (sourceFile.resolvedTypeReferenceDirectiveNames) {
- for (var typeName in sourceFile.resolvedTypeReferenceDirectiveNames) {
- var resolvedTypeReferenceDirective = sourceFile.resolvedTypeReferenceDirectiveNames[typeName];
+ sourceFile.resolvedTypeReferenceDirectiveNames.forEach(function (resolvedTypeReferenceDirective) {
if (!resolvedTypeReferenceDirective) {
- continue;
+ return;
}
var fileName = resolvedTypeReferenceDirective.resolvedFileName;
var typeFilePath = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
- referencedFiles[typeFilePath] = true;
- }
+ referencedFiles.set(typeFilePath, true);
+ });
}
- var allFileNames = ts.map(Object.keys(referencedFiles), function (key) { return key; });
+ var allFileNames = ts.arrayFrom(referencedFiles.keys());
return ts.filter(allFileNames, function (file) { return _this.projectService.host.fileExists(file); });
};
- Project.prototype.removeRootFileIfNecessary = function (info) {
- if (this.isRoot(info)) {
- remove(this.rootFiles, info);
- this.rootFilesMap.remove(info.path);
- }
+ Project.prototype.removeRoot = function (info) {
+ remove(this.rootFiles, info);
+ this.rootFilesMap.remove(info.path);
};
return Project;
}());
@@ -65920,9 +74451,44 @@ var ts;
__extends(InferredProject, _super);
function InferredProject(projectService, documentRegistry, compilerOptions) {
var _this = _super.call(this, InferredProject.newName(), ProjectKind.Inferred, projectService, documentRegistry, undefined, true, compilerOptions, false) || this;
+ _this._isJsInferredProject = false;
_this.directoriesWatchedForTsconfig = [];
return _this;
}
+ InferredProject.prototype.toggleJsInferredProject = function (isJsInferredProject) {
+ if (isJsInferredProject !== this._isJsInferredProject) {
+ this._isJsInferredProject = isJsInferredProject;
+ this.setCompilerOptions();
+ }
+ };
+ InferredProject.prototype.setCompilerOptions = function (options) {
+ var newOptions = options ? ts.clone(options) : this.getCompilerOptions();
+ if (!newOptions) {
+ return;
+ }
+ if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") {
+ newOptions.maxNodeModuleJsDepth = 2;
+ }
+ else if (!this._isJsInferredProject) {
+ newOptions.maxNodeModuleJsDepth = undefined;
+ }
+ newOptions.allowJs = true;
+ _super.prototype.setCompilerOptions.call(this, newOptions);
+ };
+ InferredProject.prototype.addRoot = function (info) {
+ if (!this._isJsInferredProject && info.isJavaScript()) {
+ this.toggleJsInferredProject(true);
+ }
+ _super.prototype.addRoot.call(this, info);
+ };
+ InferredProject.prototype.removeRoot = function (info) {
+ if (this._isJsInferredProject && info.isJavaScript()) {
+ if (ts.filter(this.getRootScriptInfos(), function (info) { return info.isJavaScript(); }).length === 0) {
+ this.toggleJsInferredProject(false);
+ }
+ }
+ _super.prototype.removeRoot.call(this, info);
+ };
InferredProject.prototype.getProjectRootPath = function () {
if (this.projectService.useSingleInferredProject) {
return undefined;
@@ -65961,13 +74527,78 @@ var ts;
var _this = _super.call(this, configFileName, ProjectKind.Configured, projectService, documentRegistry, hasExplicitListOfFiles, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) || this;
_this.wildcardDirectories = wildcardDirectories;
_this.compileOnSaveEnabled = compileOnSaveEnabled;
+ _this.plugins = [];
_this.openRefCount = 0;
_this.canonicalConfigFilePath = server.asNormalizedPath(projectService.toCanonicalFileName(configFileName));
+ _this.enablePlugins();
return _this;
}
ConfiguredProject.prototype.getConfigFilePath = function () {
return this.getProjectName();
};
+ ConfiguredProject.prototype.enablePlugins = function () {
+ var host = this.projectService.host;
+ var options = this.getCompilerOptions();
+ if (!host.require) {
+ this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
+ return;
+ }
+ var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
+ if (options.plugins) {
+ for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
+ var pluginConfigEntry = _a[_i];
+ this.enablePlugin(pluginConfigEntry, searchPaths);
+ }
+ }
+ if (this.projectService.globalPlugins) {
+ var _loop_6 = function (globalPluginName) {
+ if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
+ return "continue";
+ this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths);
+ };
+ var this_1 = this;
+ for (var _b = 0, _c = this.projectService.globalPlugins; _b < _c.length; _b++) {
+ var globalPluginName = _c[_b];
+ _loop_6(globalPluginName);
+ }
+ }
+ };
+ ConfiguredProject.prototype.enablePlugin = function (pluginConfigEntry, searchPaths) {
+ var _this = this;
+ var log = function (message) {
+ _this.projectService.logger.info(message);
+ };
+ for (var _i = 0, searchPaths_1 = searchPaths; _i < searchPaths_1.length; _i++) {
+ var searchPath = searchPaths_1[_i];
+ var resolvedModule = Project.resolveModule(pluginConfigEntry.name, searchPath, this.projectService.host, log);
+ if (resolvedModule) {
+ this.enableProxy(resolvedModule, pluginConfigEntry);
+ return;
+ }
+ }
+ this.projectService.logger.info("Couldn't find " + pluginConfigEntry.name + " anywhere in paths: " + searchPaths.join(","));
+ };
+ ConfiguredProject.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
+ try {
+ if (typeof pluginModuleFactory !== "function") {
+ this.projectService.logger.info("Skipped loading plugin " + configEntry.name + " because it did expose a proper factory function");
+ return;
+ }
+ var info = {
+ config: configEntry,
+ project: this,
+ languageService: this.languageService,
+ languageServiceHost: this.lsHost,
+ serverHost: this.projectService.host
+ };
+ var pluginModule = pluginModuleFactory({ typescript: ts });
+ this.languageService = pluginModule.create(info);
+ this.plugins.push(pluginModule);
+ }
+ catch (e) {
+ this.projectService.logger.info("Plugin activation failed: " + e);
+ }
+ };
ConfiguredProject.prototype.getProjectRootPath = function () {
return ts.getDirectoryPath(this.getConfigFilePath());
};
@@ -65980,6 +74611,21 @@ var ts;
ConfiguredProject.prototype.getTypeAcquisition = function () {
return this.typeAcquisition;
};
+ ConfiguredProject.prototype.getExternalFiles = function () {
+ var items = [];
+ for (var _i = 0, _a = this.plugins; _i < _a.length; _i++) {
+ var plugin = _a[_i];
+ if (typeof plugin.getExternalFiles === "function") {
+ try {
+ items.push.apply(items, plugin.getExternalFiles(this));
+ }
+ catch (e) {
+ this.projectService.logger.info("A plugin threw an exception in getExternalFiles: " + e);
+ }
+ }
+ }
+ return items;
+ };
ConfiguredProject.prototype.watchConfigFile = function (callback) {
var _this = this;
this.projectFileWatcher = this.projectService.host.watchFile(this.getConfigFilePath(), function (_) { return callback(_this); });
@@ -66010,14 +74656,14 @@ var ts;
return;
}
var configDirectoryPath = ts.getDirectoryPath(this.getConfigFilePath());
- this.directoriesWatchedForWildcards = ts.reduceProperties(this.wildcardDirectories, function (watchers, flag, directory) {
+ this.directoriesWatchedForWildcards = ts.createMap();
+ this.wildcardDirectories.forEach(function (flag, directory) {
if (ts.comparePaths(configDirectoryPath, directory, ".", !_this.projectService.host.useCaseSensitiveFileNames) !== 0) {
var recursive = (flag & 1) !== 0;
_this.projectService.logger.info("Add " + (recursive ? "recursive " : "") + "watcher for: " + directory);
- watchers[directory] = _this.projectService.host.watchDirectory(directory, function (path) { return callback(_this, path); }, recursive);
+ _this.directoriesWatchedForWildcards.set(directory, _this.projectService.host.watchDirectory(directory, function (path) { return callback(_this, path); }, recursive));
}
- return watchers;
- }, {});
+ });
};
ConfiguredProject.prototype.stopWatchingDirectory = function () {
if (this.directoryWatcher) {
@@ -66037,9 +74683,9 @@ var ts;
}
this.typeRootsWatchers = undefined;
}
- for (var id in this.directoriesWatchedForWildcards) {
- this.directoriesWatchedForWildcards[id].close();
- }
+ this.directoriesWatchedForWildcards.forEach(function (watcher) {
+ watcher.close();
+ });
this.directoriesWatchedForWildcards = undefined;
this.stopWatchingDirectory();
};
@@ -66060,6 +74706,7 @@ var ts;
__extends(ExternalProject, _super);
function ExternalProject(externalProjectName, projectService, documentRegistry, compilerOptions, languageServiceEnabled, compileOnSaveEnabled, projectFilePath) {
var _this = _super.call(this, externalProjectName, ProjectKind.External, projectService, documentRegistry, true, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) || this;
+ _this.externalProjectName = externalProjectName;
_this.compileOnSaveEnabled = compileOnSaveEnabled;
_this.projectFilePath = projectFilePath;
return _this;
@@ -66116,36 +74763,60 @@ var ts;
var option = commandLineOptions_1[_i];
if (typeof option.type === "object") {
var optionMap = option.type;
- for (var id in optionMap) {
- ts.Debug.assert(typeof optionMap[id] === "number");
- }
- map[option.name] = optionMap;
+ optionMap.forEach(function (value) {
+ ts.Debug.assert(typeof value === "number");
+ });
+ map.set(option.name, optionMap);
}
}
return map;
}
var compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(ts.optionDeclarations);
- var indentStyle = ts.createMap({
+ var indentStyle = ts.createMapFromTemplate({
"none": ts.IndentStyle.None,
"block": ts.IndentStyle.Block,
"smart": ts.IndentStyle.Smart
});
+ var defaultTypeSafeList = {
+ "jquery": {
+ "match": /jquery(-(\.?\d+)+)?(\.intellisense)?(\.min)?\.js$/i,
+ "types": ["jquery"]
+ },
+ "WinJS": {
+ "match": /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["winjs"]
+ },
+ "Kendo": {
+ "match": /^(.*\/kendo)\/kendo\.all\.min\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["kendo-ui"]
+ },
+ "Office Nuget": {
+ "match": /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["office"]
+ },
+ "Minified files": {
+ "match": /^(.+\.min\.js)$/i,
+ "exclude": [["^", 1, "$"]]
+ }
+ };
function convertFormatOptions(protocolOptions) {
if (typeof protocolOptions.indentStyle === "string") {
- protocolOptions.indentStyle = indentStyle[protocolOptions.indentStyle.toLowerCase()];
+ protocolOptions.indentStyle = indentStyle.get(protocolOptions.indentStyle.toLowerCase());
ts.Debug.assert(protocolOptions.indentStyle !== undefined);
}
return protocolOptions;
}
server.convertFormatOptions = convertFormatOptions;
function convertCompilerOptions(protocolOptions) {
- for (var id in compilerOptionConverters) {
+ compilerOptionConverters.forEach(function (mappedValues, id) {
var propertyValue = protocolOptions[id];
if (typeof propertyValue === "string") {
- var mappedValues = compilerOptionConverters[id];
- protocolOptions[id] = mappedValues[propertyValue.toLowerCase()];
+ protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase());
}
- }
+ });
return protocolOptions;
}
server.convertCompilerOptions = convertCompilerOptions;
@@ -66178,7 +74849,10 @@ var ts;
var fileNamePropertyReader = {
getFileName: function (x) { return x; },
getScriptKind: function (_) { return undefined; },
- hasMixedContent: function (_) { return false; }
+ hasMixedContent: function (fileName, extraFileExtensions) {
+ var mixedContentExtensions = ts.map(ts.filter(extraFileExtensions, function (item) { return item.isMixedContent; }), function (item) { return item.extension; });
+ return ts.forEach(mixedContentExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
+ }
};
var externalFilePropertyReader = {
getFileName: function (x) { return x.fileName; },
@@ -66209,24 +74883,25 @@ var ts;
this.directoryWatchersRefCount = ts.createMap();
}
DirectoryWatchers.prototype.stopWatchingDirectory = function (directory) {
- this.directoryWatchersRefCount[directory]--;
- if (this.directoryWatchersRefCount[directory] === 0) {
+ var refCount = this.directoryWatchersRefCount.get(directory) - 1;
+ this.directoryWatchersRefCount.set(directory, refCount);
+ if (refCount === 0) {
this.projectService.logger.info("Close directory watcher for: " + directory);
- this.directoryWatchersForTsconfig[directory].close();
- delete this.directoryWatchersForTsconfig[directory];
+ this.directoryWatchersForTsconfig.get(directory).close();
+ this.directoryWatchersForTsconfig.delete(directory);
}
};
DirectoryWatchers.prototype.startWatchingContainingDirectoriesForFile = function (fileName, project, callback) {
var currentPath = ts.getDirectoryPath(fileName);
var parentPath = ts.getDirectoryPath(currentPath);
- while (currentPath != parentPath) {
- if (!this.directoryWatchersForTsconfig[currentPath]) {
+ while (currentPath !== parentPath) {
+ if (!this.directoryWatchersForTsconfig.has(currentPath)) {
this.projectService.logger.info("Add watcher for: " + currentPath);
- this.directoryWatchersForTsconfig[currentPath] = this.projectService.host.watchDirectory(currentPath, callback);
- this.directoryWatchersRefCount[currentPath] = 1;
+ this.directoryWatchersForTsconfig.set(currentPath, this.projectService.host.watchDirectory(currentPath, callback));
+ this.directoryWatchersRefCount.set(currentPath, 1);
}
else {
- this.directoryWatchersRefCount[currentPath] += 1;
+ this.directoryWatchersRefCount.set(currentPath, this.directoryWatchersRefCount.get(currentPath) + 1);
}
project.directoriesWatchedForTsconfig.push(currentPath);
currentPath = parentPath;
@@ -66236,31 +74911,35 @@ var ts;
return DirectoryWatchers;
}());
var ProjectService = (function () {
- function ProjectService(host, logger, cancellationToken, useSingleInferredProject, typingsInstaller, eventHandler) {
- if (typingsInstaller === void 0) { typingsInstaller = server.nullTypingsInstaller; }
- this.host = host;
- this.logger = logger;
- this.cancellationToken = cancellationToken;
- this.useSingleInferredProject = useSingleInferredProject;
- this.typingsInstaller = typingsInstaller;
- this.eventHandler = eventHandler;
+ function ProjectService(opts) {
this.filenameToScriptInfo = ts.createFileMap();
this.externalProjectToConfiguredProjectMap = ts.createMap();
this.externalProjects = [];
this.inferredProjects = [];
this.configuredProjects = [];
this.openFiles = [];
- ts.Debug.assert(!!host.createHash, "'ServerHost.createHash' is required for ProjectService");
- this.toCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ this.projectToSizeMap = ts.createMap();
+ this.host = opts.host;
+ this.logger = opts.logger;
+ this.cancellationToken = opts.cancellationToken;
+ this.useSingleInferredProject = opts.useSingleInferredProject;
+ this.typingsInstaller = opts.typingsInstaller || server.nullTypingsInstaller;
+ this.throttleWaitMilliseconds = opts.throttleWaitMilliseconds;
+ this.eventHandler = opts.eventHandler;
+ this.globalPlugins = opts.globalPlugins || server.emptyArray;
+ this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
+ ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
+ this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);
- this.throttledOperations = new server.ThrottledOperations(host);
+ this.throttledOperations = new server.ThrottledOperations(this.host);
this.typingsInstaller.attach(this);
this.typingsCache = new server.TypingsCache(this.typingsInstaller);
this.hostConfiguration = {
formatCodeOptions: server.getDefaultFormatCodeSettings(this.host),
- hostInfo: "Unknown host"
+ hostInfo: "Unknown host",
+ extraFileExtensions: []
};
- this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames, host.getCurrentDirectory());
+ this.documentRegistry = ts.createDocumentRegistry(this.host.useCaseSensitiveFileNames, this.host.getCurrentDirectory());
}
ProjectService.prototype.getChangedFiles_TestOnly = function () {
return this.changedFiles;
@@ -66384,7 +75063,7 @@ var ts;
this.handleDeletedFile(info);
}
else {
- if (info && (!info.isOpen)) {
+ if (info && (!info.isScriptOpen())) {
info.reloadFromFile();
this.updateProjectGraphs(info.containingProjects);
}
@@ -66393,7 +75072,7 @@ var ts;
ProjectService.prototype.handleDeletedFile = function (info) {
this.logger.info(info.fileName + " deleted");
info.stopWatcher();
- if (!info.isOpen) {
+ if (!info.isScriptOpen()) {
this.filenameToScriptInfo.remove(info.path);
this.lastDeletedFile = info;
var containingProjects = info.containingProjects.slice();
@@ -66424,7 +75103,7 @@ var ts;
};
ProjectService.prototype.onSourceFileInDirectoryChangedForConfiguredProject = function (project, fileName) {
var _this = this;
- if (fileName && !ts.isSupportedSourceFileName(fileName, project.getCompilerOptions())) {
+ if (fileName && !ts.isSupportedSourceFileName(fileName, project.getCompilerOptions(), this.hostConfiguration.extraFileExtensions)) {
return;
}
this.logger.info("Detected source file changes: " + fileName);
@@ -66450,7 +75129,7 @@ var ts;
this.refreshInferredProjects();
};
ProjectService.prototype.onConfigFileAddedForInferredProject = function (fileName) {
- if (ts.getBaseFileName(fileName) != "tsconfig.json") {
+ if (ts.getBaseFileName(fileName) !== "tsconfig.json") {
this.logger.info(fileName + " is not tsconfig.json");
return;
}
@@ -66469,9 +75148,11 @@ var ts;
switch (project.projectKind) {
case server.ProjectKind.External:
server.removeItemFromSet(this.externalProjects, project);
+ this.projectToSizeMap.delete(project.externalProjectName);
break;
case server.ProjectKind.Configured:
server.removeItemFromSet(this.configuredProjects, project);
+ this.projectToSizeMap.delete(project.canonicalConfigFilePath);
break;
case server.ProjectKind.Inferred:
server.removeItemFromSet(this.inferredProjects, project);
@@ -66507,13 +75188,17 @@ var ts;
if (!this.useSingleInferredProject) {
for (var _b = 0, _c = this.openFiles; _b < _c.length; _b++) {
var f = _c[_b];
- if (f.containingProjects.length === 0) {
+ if (f.containingProjects.length === 0 || !inferredProject.containsScriptInfo(f)) {
continue;
}
- var defaultProject = f.getDefaultProject();
- if (isRootFileInInferredProject(info) && defaultProject !== inferredProject && inferredProject.containsScriptInfo(f)) {
- this.removeProject(defaultProject);
- f.attachToProject(inferredProject);
+ for (var _d = 0, _e = f.containingProjects; _d < _e.length; _d++) {
+ var fContainingProject = _e[_d];
+ if (fContainingProject.projectKind === server.ProjectKind.Inferred &&
+ fContainingProject.isRoot(f) &&
+ fContainingProject !== inferredProject) {
+ this.removeProject(fContainingProject);
+ f.attachToProject(inferredProject);
+ }
}
}
}
@@ -66523,13 +75208,15 @@ var ts;
}
};
ProjectService.prototype.closeOpenFile = function (info) {
- info.reloadFromFile();
+ info.close();
server.removeItemFromSet(this.openFiles, info);
- info.isOpen = false;
var projectsToRemove;
for (var _i = 0, _a = info.containingProjects; _i < _a.length; _i++) {
var p = _a[_i];
if (p.projectKind === server.ProjectKind.Configured) {
+ if (info.hasMixedContent) {
+ info.registerFileUpdate();
+ }
if (p.deleteOpenRef() === 0) {
(projectsToRemove || (projectsToRemove = [])).push(p);
}
@@ -66537,6 +75224,9 @@ var ts;
else if (p.projectKind === server.ProjectKind.Inferred && p.isRoot(info)) {
(projectsToRemove || (projectsToRemove = [])).push(p);
}
+ if (!p.languageServiceEnabled) {
+ p.markAsDirty();
+ }
}
if (projectsToRemove) {
for (var _b = 0, projectsToRemove_1 = projectsToRemove; _b < projectsToRemove_1.length; _b++) {
@@ -66654,7 +75344,7 @@ var ts;
config = sanitizedConfig;
errors = diagnostics.length ? diagnostics : [result.error];
}
- var parsedCommandLine = ts.parseJsonConfigFileContent(config, this.host, ts.getDirectoryPath(configFilename), {}, configFilename);
+ var parsedCommandLine = ts.parseJsonConfigFileContent(config, this.host, ts.getDirectoryPath(configFilename), {}, configFilename, [], this.hostConfiguration.extraFileExtensions);
if (parsedCommandLine.errors.length) {
errors = ts.concatenate(errors, parsedCommandLine.errors);
}
@@ -66667,16 +75357,19 @@ var ts;
files: parsedCommandLine.fileNames,
compilerOptions: parsedCommandLine.options,
configHasFilesProperty: config["files"] !== undefined,
- wildcardDirectories: ts.createMap(parsedCommandLine.wildcardDirectories),
+ wildcardDirectories: ts.createMapFromTemplate(parsedCommandLine.wildcardDirectories),
typeAcquisition: parsedCommandLine.typeAcquisition,
compileOnSave: parsedCommandLine.compileOnSave
};
return { success: true, projectOptions: projectOptions, configFileErrors: errors };
};
- ProjectService.prototype.exceededTotalSizeLimitForNonTsFiles = function (options, fileNames, propertyReader) {
+ ProjectService.prototype.exceededTotalSizeLimitForNonTsFiles = function (name, options, fileNames, propertyReader) {
if (options && options.disableSizeLimit || !this.host.getFileSize) {
return false;
}
+ var availableSpace = server.maxProgramSizeForNonTsFiles;
+ this.projectToSizeMap.set(name, 0);
+ this.projectToSizeMap.forEach(function (val) { return (availableSpace -= (val || 0)); });
var totalNonTsFileSize = 0;
for (var _i = 0, fileNames_3 = fileNames; _i < fileNames_3.length; _i++) {
var f = fileNames_3[_i];
@@ -66689,11 +75382,15 @@ var ts;
return true;
}
}
+ if (totalNonTsFileSize > availableSpace) {
+ return true;
+ }
+ this.projectToSizeMap.set(name, totalNonTsFileSize);
return false;
};
ProjectService.prototype.createAndAddExternalProject = function (projectFileName, files, options, typeAcquisition) {
var compilerOptions = convertCompilerOptions(options);
- var project = new server.ExternalProject(projectFileName, this, this.documentRegistry, compilerOptions, !this.exceededTotalSizeLimitForNonTsFiles(compilerOptions, files, externalFilePropertyReader), options.compileOnSave === undefined ? true : options.compileOnSave);
+ var project = new server.ExternalProject(projectFileName, this, this.documentRegistry, compilerOptions, !this.exceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), options.compileOnSave === undefined ? true : options.compileOnSave);
this.addFilesToProjectAndUpdateGraph(project, files, externalFilePropertyReader, undefined, typeAcquisition, undefined);
this.externalProjects.push(project);
return project;
@@ -66709,7 +75406,7 @@ var ts;
};
ProjectService.prototype.createAndAddConfiguredProject = function (configFileName, projectOptions, configFileErrors, clientFileName) {
var _this = this;
- var sizeLimitExceeded = this.exceededTotalSizeLimitForNonTsFiles(projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader);
+ var sizeLimitExceeded = this.exceededTotalSizeLimitForNonTsFiles(configFileName, projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader);
var project = new server.ConfiguredProject(configFileName, this, this.documentRegistry, projectOptions.configHasFilesProperty, projectOptions.compilerOptions, projectOptions.wildcardDirectories, !sizeLimitExceeded, projectOptions.compileOnSave === undefined ? false : projectOptions.compileOnSave);
this.addFilesToProjectAndUpdateGraph(project, projectOptions.files, fileNamePropertyReader, clientFileName, projectOptions.typeAcquisition, configFileErrors);
project.watchConfigFile(function (project) { return _this.onConfigChangedForConfiguredProject(project); });
@@ -66733,9 +75430,9 @@ var ts;
var f = files_4[_i];
var rootFilename = propertyReader.getFileName(f);
var scriptKind = propertyReader.getScriptKind(f);
- var hasMixedContent = propertyReader.hasMixedContent(f);
+ var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);
if (this.host.fileExists(rootFilename)) {
- var info = this.getOrCreateScriptInfoForNormalizedPath(server.toNormalizedPath(rootFilename), clientFileName == rootFilename, undefined, scriptKind, hasMixedContent);
+ var info = this.getOrCreateScriptInfoForNormalizedPath(server.toNormalizedPath(rootFilename), clientFileName === rootFilename, undefined, scriptKind, hasMixedContent);
project.addRoot(info);
}
else {
@@ -66750,7 +75447,7 @@ var ts;
var conversionResult = this.convertConfigFileContentToProjectOptions(configFileName);
var projectOptions = conversionResult.success
? conversionResult.projectOptions
- : { files: [], compilerOptions: {} };
+ : { files: [], compilerOptions: {}, typeAcquisition: { enable: false } };
var project = this.createAndAddConfiguredProject(configFileName, projectOptions, conversionResult.configFileErrors, clientFileName);
return {
success: conversionResult.success,
@@ -66777,7 +75474,7 @@ var ts;
rootFilesChanged = true;
if (!scriptInfo) {
var scriptKind = propertyReader.getScriptKind(f);
- var hasMixedContent = propertyReader.hasMixedContent(f);
+ var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);
scriptInfo = this.getOrCreateScriptInfoForNormalizedPath(normalizedPath, false, undefined, scriptKind, hasMixedContent);
}
}
@@ -66808,7 +75505,7 @@ var ts;
if (toAdd) {
for (var _d = 0, toAdd_1 = toAdd; _d < toAdd_1.length; _d++) {
var f = toAdd_1[_d];
- if (f.isOpen && isRootFileInInferredProject(f)) {
+ if (f.isScriptOpen() && isRootFileInInferredProject(f)) {
var inferredProject = f.containingProjects[0];
inferredProject.removeFile(f);
if (!inferredProject.hasRoots()) {
@@ -66838,7 +75535,7 @@ var ts;
this.updateNonInferredProject(project, [], fileNamePropertyReader, {}, {}, false, configFileErrors);
return configFileErrors;
}
- if (this.exceededTotalSizeLimitForNonTsFiles(projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader)) {
+ if (this.exceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader)) {
project.setCompilerOptions(projectOptions.compilerOptions);
if (!project.languageServiceEnabled) {
return configFileErrors;
@@ -66847,9 +75544,7 @@ var ts;
project.stopWatchingDirectory();
}
else {
- if (!project.languageServiceEnabled) {
- project.enableLanguageService();
- }
+ project.enableLanguageService();
this.watchConfigDirectoryForProject(project, projectOptions);
this.updateNonInferredProject(project, projectOptions.files, fileNamePropertyReader, projectOptions.compilerOptions, projectOptions.typeAcquisition, projectOptions.compileOnSave, configFileErrors);
}
@@ -66879,29 +75574,30 @@ var ts;
var _this = this;
var info = this.getScriptInfoForNormalizedPath(fileName);
if (!info) {
- var content = void 0;
- if (this.host.fileExists(fileName)) {
- content = fileContent || (hasMixedContent ? "" : this.host.readFile(fileName));
- }
- if (!content) {
+ if (openedByClient || this.host.fileExists(fileName)) {
+ info = new server.ScriptInfo(this.host, fileName, scriptKind, hasMixedContent);
+ this.filenameToScriptInfo.set(info.path, info);
if (openedByClient) {
- content = "";
+ if (fileContent === undefined) {
+ fileContent = this.host.readFile(fileName) || "";
+ }
}
- }
- if (content !== undefined) {
- info = new server.ScriptInfo(this.host, fileName, content, scriptKind, openedByClient, hasMixedContent);
- this.filenameToScriptInfo.set(info.path, info);
- if (!info.isOpen && !hasMixedContent) {
- info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
+ else {
+ if (!hasMixedContent) {
+ info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
+ }
}
}
}
if (info) {
- if (fileContent !== undefined) {
- info.reload(fileContent);
+ if (openedByClient && !info.isScriptOpen()) {
+ info.open(fileContent);
+ if (hasMixedContent) {
+ info.registerFileUpdate();
+ }
}
- if (openedByClient) {
- info.isOpen = true;
+ else if (fileContent !== undefined) {
+ info.reload(fileContent);
}
}
return info;
@@ -66926,9 +75622,13 @@ var ts;
this.logger.info("Host information " + args.hostInfo);
}
if (args.formatOptions) {
- server.mergeMaps(this.hostConfiguration.formatCodeOptions, convertFormatOptions(args.formatOptions));
+ server.mergeMapLikes(this.hostConfiguration.formatCodeOptions, convertFormatOptions(args.formatOptions));
this.logger.info("Format host information updated");
}
+ if (args.extraFileExtensions) {
+ this.hostConfiguration.extraFileExtensions = args.extraFileExtensions;
+ this.logger.info("Host file extension mappings updated");
+ }
}
};
ProjectService.prototype.closeLog = function () {
@@ -66976,30 +75676,39 @@ var ts;
return this.openClientFileWithNormalizedPath(server.toNormalizedPath(fileName), fileContent, scriptKind);
};
ProjectService.prototype.openClientFileWithNormalizedPath = function (fileName, fileContent, scriptKind, hasMixedContent) {
- var _a = this.findContainingExternalProject(fileName)
- ? {}
- : this.openOrUpdateConfiguredProjectForFile(fileName), _b = _a.configFileName, configFileName = _b === void 0 ? undefined : _b, _c = _a.configFileErrors, configFileErrors = _c === void 0 ? undefined : _c;
+ var configFileName;
+ var configFileErrors;
+ var project = this.findContainingExternalProject(fileName);
+ if (!project) {
+ (_a = this.openOrUpdateConfiguredProjectForFile(fileName), configFileName = _a.configFileName, configFileErrors = _a.configFileErrors);
+ if (configFileName) {
+ project = this.findConfiguredProjectByProjectName(configFileName);
+ }
+ }
+ if (project && !project.languageServiceEnabled) {
+ project.markAsDirty();
+ }
var info = this.getOrCreateScriptInfoForNormalizedPath(fileName, true, fileContent, scriptKind, hasMixedContent);
this.assignScriptInfoToInferredProjectIfNecessary(info, true);
this.printProjects();
return { configFileName: configFileName, configFileErrors: configFileErrors };
+ var _a;
};
ProjectService.prototype.closeClientFile = function (uncheckedFileName) {
var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName));
if (info) {
this.closeOpenFile(info);
- info.isOpen = false;
}
this.printProjects();
};
ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) {
- var _loop_5 = function (proj) {
+ var _loop_7 = function (proj) {
var knownProject = ts.forEach(lastKnownProjectVersions, function (p) { return p.projectName === proj.getProjectName() && p; });
result.push(proj.getChangesSinceVersion(knownProject && knownProject.version));
};
for (var _i = 0, currentProjects_1 = currentProjects; _i < currentProjects_1.length; _i++) {
var proj = currentProjects_1[_i];
- _loop_5(proj);
+ _loop_7(proj);
}
};
ProjectService.prototype.synchronizeProjectList = function (knownProjects) {
@@ -67015,7 +75724,7 @@ var ts;
for (var _i = 0, openFiles_1 = openFiles; _i < openFiles_1.length; _i++) {
var file = openFiles_1[_i];
var scriptInfo = this.getScriptInfo(file.fileName);
- ts.Debug.assert(!scriptInfo || !scriptInfo.isOpen);
+ ts.Debug.assert(!scriptInfo || !scriptInfo.isScriptOpen());
var normalizedPath = scriptInfo ? scriptInfo.fileName : server.toNormalizedPath(file.fileName);
this.openClientFileWithNormalizedPath(normalizedPath, file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent);
}
@@ -67058,7 +75767,7 @@ var ts;
ProjectService.prototype.closeExternalProject = function (uncheckedFileName, suppressRefresh) {
if (suppressRefresh === void 0) { suppressRefresh = false; }
var fileName = server.toNormalizedPath(uncheckedFileName);
- var configFiles = this.externalProjectToConfiguredProjectMap[fileName];
+ var configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
if (configFiles) {
var shouldRefreshInferredProjects = false;
for (var _i = 0, configFiles_1 = configFiles; _i < configFiles_1.length; _i++) {
@@ -67067,7 +75776,7 @@ var ts;
shouldRefreshInferredProjects = true;
}
}
- delete this.externalProjectToConfiguredProjectMap[fileName];
+ this.externalProjectToConfiguredProjectMap.delete(fileName);
if (shouldRefreshInferredProjects && !suppressRefresh) {
this.refreshInferredProjects();
}
@@ -67082,11 +75791,111 @@ var ts;
}
}
};
- ProjectService.prototype.openExternalProject = function (proj) {
+ ProjectService.prototype.openExternalProjects = function (projects) {
+ var _this = this;
+ var projectsToClose = ts.arrayToMap(this.externalProjects, function (p) { return p.getProjectName(); }, function (_) { return true; });
+ ts.forEachKey(this.externalProjectToConfiguredProjectMap, function (externalProjectName) {
+ projectsToClose.set(externalProjectName, true);
+ });
+ for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
+ var externalProject = projects_4[_i];
+ this.openExternalProject(externalProject, true);
+ projectsToClose.delete(externalProject.projectFileName);
+ }
+ ts.forEachKey(projectsToClose, function (externalProjectName) {
+ _this.closeExternalProject(externalProjectName, true);
+ });
+ this.refreshInferredProjects();
+ };
+ ProjectService.escapeFilenameForRegex = function (filename) {
+ return filename.replace(this.filenameEscapeRegexp, "\\$&");
+ };
+ ProjectService.prototype.resetSafeList = function () {
+ ProjectService.safelist = defaultTypeSafeList;
+ };
+ ProjectService.prototype.loadSafeList = function (fileName) {
+ var raw = JSON.parse(this.host.readFile(fileName, "utf-8"));
+ for (var _i = 0, _a = Object.keys(raw); _i < _a.length; _i++) {
+ var k = _a[_i];
+ raw[k].match = new RegExp(raw[k].match, "i");
+ }
+ ProjectService.safelist = raw;
+ };
+ ProjectService.prototype.applySafeList = function (proj) {
+ var _this = this;
+ var rootFiles = proj.rootFiles, typeAcquisition = proj.typeAcquisition;
+ var types = (typeAcquisition && typeAcquisition.include) || [];
+ var excludeRules = [];
+ var normalizedNames = rootFiles.map(function (f) { return ts.normalizeSlashes(f.fileName); });
+ var _loop_8 = function (name) {
+ var rule = ProjectService.safelist[name];
+ for (var _i = 0, normalizedNames_1 = normalizedNames; _i < normalizedNames_1.length; _i++) {
+ var root = normalizedNames_1[_i];
+ if (rule.match.test(root)) {
+ this_2.logger.info("Excluding files based on rule " + name);
+ if (rule.types) {
+ for (var _a = 0, _b = rule.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ if (types.indexOf(type) < 0) {
+ types.push(type);
+ }
+ }
+ }
+ if (rule.exclude) {
+ var _loop_9 = function (exclude) {
+ var processedRule = root.replace(rule.match, function () {
+ var groups = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ groups[_i] = arguments[_i];
+ }
+ return exclude.map(function (groupNumberOrString) {
+ if (typeof groupNumberOrString === "number") {
+ if (typeof groups[groupNumberOrString] !== "string") {
+ _this.logger.info("Incorrect RegExp specification in safelist rule " + name + " - not enough groups");
+ return "\\*";
+ }
+ return ProjectService.escapeFilenameForRegex(groups[groupNumberOrString]);
+ }
+ return groupNumberOrString;
+ }).join("");
+ });
+ if (excludeRules.indexOf(processedRule) === -1) {
+ excludeRules.push(processedRule);
+ }
+ };
+ for (var _c = 0, _d = rule.exclude; _c < _d.length; _c++) {
+ var exclude = _d[_c];
+ _loop_9(exclude);
+ }
+ }
+ else {
+ var escaped = ProjectService.escapeFilenameForRegex(root);
+ if (excludeRules.indexOf(escaped) < 0) {
+ excludeRules.push(escaped);
+ }
+ }
+ }
+ }
+ if (types.length > 0) {
+ proj.typeAcquisition = proj.typeAcquisition || {};
+ proj.typeAcquisition.include = types;
+ }
+ };
+ var this_2 = this;
+ for (var _i = 0, _a = Object.keys(ProjectService.safelist); _i < _a.length; _i++) {
+ var name = _a[_i];
+ _loop_8(name);
+ }
+ var excludeRegexes = excludeRules.map(function (e) { return new RegExp(e, "i"); });
+ proj.rootFiles = proj.rootFiles.filter(function (_file, index) { return !excludeRegexes.some(function (re) { return re.test(normalizedNames[index]); }); });
+ };
+ ProjectService.prototype.openExternalProject = function (proj, suppressRefreshOfInferredProjects) {
+ if (suppressRefreshOfInferredProjects === void 0) { suppressRefreshOfInferredProjects = false; }
if (proj.typingOptions && !proj.typeAcquisition) {
var typeAcquisition = ts.convertEnableAutoDiscoveryToEnable(proj.typingOptions);
proj.typeAcquisition = typeAcquisition;
}
+ this.applySafeList(proj);
var tsConfigFiles;
var rootFiles = [];
for (var _i = 0, _a = proj.rootFiles; _i < _a.length; _i++) {
@@ -67108,17 +75917,24 @@ var ts;
var exisingConfigFiles;
if (externalProject) {
if (!tsConfigFiles) {
- this.updateNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, convertCompilerOptions(proj.options), proj.typeAcquisition, proj.options.compileOnSave, undefined);
+ var compilerOptions = convertCompilerOptions(proj.options);
+ if (this.exceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, proj.rootFiles, externalFilePropertyReader)) {
+ externalProject.disableLanguageService();
+ }
+ else {
+ externalProject.enableLanguageService();
+ }
+ this.updateNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, undefined);
return;
}
this.closeExternalProject(proj.projectFileName, true);
}
- else if (this.externalProjectToConfiguredProjectMap[proj.projectFileName]) {
+ else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
if (!tsConfigFiles) {
this.closeExternalProject(proj.projectFileName, true);
}
else {
- var oldConfigFiles = this.externalProjectToConfiguredProjectMap[proj.projectFileName];
+ var oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
var iNew = 0;
var iOld = 0;
while (iNew < tsConfigFiles.length && iOld < oldConfigFiles.length) {
@@ -67143,7 +75959,7 @@ var ts;
}
}
if (tsConfigFiles) {
- this.externalProjectToConfiguredProjectMap[proj.projectFileName] = tsConfigFiles;
+ this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, tsConfigFiles);
for (var _b = 0, tsConfigFiles_1 = tsConfigFiles; _b < tsConfigFiles_1.length; _b++) {
var tsconfigFile = tsConfigFiles_1[_b];
var project = this.findConfiguredProjectByProjectName(tsconfigFile);
@@ -67157,13 +75973,17 @@ var ts;
}
}
else {
- delete this.externalProjectToConfiguredProjectMap[proj.projectFileName];
+ this.externalProjectToConfiguredProjectMap.delete(proj.projectFileName);
this.createAndAddExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition);
}
- this.refreshInferredProjects();
+ if (!suppressRefreshOfInferredProjects) {
+ this.refreshInferredProjects();
+ }
};
return ProjectService;
}());
+ ProjectService.safelist = defaultTypeSafeList;
+ ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
server.ProjectService = ProjectService;
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
@@ -67171,19 +75991,24 @@ var ts;
(function (ts) {
var server;
(function (server) {
+ server.nullCancellationToken = {
+ isCancellationRequested: function () { return false; },
+ setRequest: function () { return void 0; },
+ resetRequest: function () { return void 0; }
+ };
function hrTimeToMilliseconds(time) {
var seconds = time[0];
var nanoseconds = time[1];
return ((1e9 * seconds) + nanoseconds) / 1000000.0;
}
- function shouldSkipSematicCheck(project) {
- if (project.getCompilerOptions().skipLibCheck !== undefined) {
- return false;
+ function shouldSkipSemanticCheck(project) {
+ if (project.projectKind === server.ProjectKind.Inferred || project.projectKind === server.ProjectKind.External) {
+ return project.isJsOnlyProject();
}
- if ((project.projectKind === server.ProjectKind.Inferred || project.projectKind === server.ProjectKind.External) && project.isJsOnlyProject()) {
- return true;
+ else {
+ var options = project.getCompilerOptions();
+ return options.skipLibCheck && !options.checkJs && project.isJsOnlyProject();
}
- return false;
}
function compareNumber(a, b) {
return a - b;
@@ -67192,7 +76017,7 @@ var ts;
if (a.file < b.file) {
return -1;
}
- else if (a.file == b.file) {
+ else if (a.file === b.file) {
var n = compareNumber(a.start.line, b.start.line);
if (n === 0) {
return compareNumber(a.start.offset, b.start.offset);
@@ -67310,26 +76135,98 @@ var ts;
return "Content-Length: " + (1 + len) + "\r\n\r\n" + json + newLine;
}
server.formatMessage = formatMessage;
+ var MultistepOperation = (function () {
+ function MultistepOperation(operationHost) {
+ var _this = this;
+ this.operationHost = operationHost;
+ this.completed = true;
+ this.next = {
+ immediate: function (action) { return _this.immediate(action); },
+ delay: function (ms, action) { return _this.delay(ms, action); }
+ };
+ }
+ MultistepOperation.prototype.startNew = function (action) {
+ this.complete();
+ this.requestId = this.operationHost.getCurrentRequestId();
+ this.completed = false;
+ this.executeAction(action);
+ };
+ MultistepOperation.prototype.complete = function () {
+ if (!this.completed) {
+ if (this.requestId) {
+ this.operationHost.sendRequestCompletedEvent(this.requestId);
+ }
+ this.completed = true;
+ }
+ this.setTimerHandle(undefined);
+ this.setImmediateId(undefined);
+ };
+ MultistepOperation.prototype.immediate = function (action) {
+ var _this = this;
+ var requestId = this.requestId;
+ ts.Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id");
+ this.setImmediateId(this.operationHost.getServerHost().setImmediate(function () {
+ _this.immediateId = undefined;
+ _this.operationHost.executeWithRequestId(requestId, function () { return _this.executeAction(action); });
+ }));
+ };
+ MultistepOperation.prototype.delay = function (ms, action) {
+ var _this = this;
+ var requestId = this.requestId;
+ ts.Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id");
+ this.setTimerHandle(this.operationHost.getServerHost().setTimeout(function () {
+ _this.timerHandle = undefined;
+ _this.operationHost.executeWithRequestId(requestId, function () { return _this.executeAction(action); });
+ }, ms));
+ };
+ MultistepOperation.prototype.executeAction = function (action) {
+ var stop = false;
+ try {
+ if (this.operationHost.isCancellationRequested()) {
+ stop = true;
+ }
+ else {
+ action(this.next);
+ }
+ }
+ catch (e) {
+ stop = true;
+ if (!(e instanceof ts.OperationCanceledException)) {
+ this.operationHost.logError(e, "delayed processing of request " + this.requestId);
+ }
+ }
+ if (stop || !this.hasPendingWork()) {
+ this.complete();
+ }
+ };
+ MultistepOperation.prototype.setTimerHandle = function (timerHandle) {
+ if (this.timerHandle !== undefined) {
+ this.operationHost.getServerHost().clearTimeout(this.timerHandle);
+ }
+ this.timerHandle = timerHandle;
+ };
+ MultistepOperation.prototype.setImmediateId = function (immediateId) {
+ if (this.immediateId !== undefined) {
+ this.operationHost.getServerHost().clearImmediate(this.immediateId);
+ }
+ this.immediateId = immediateId;
+ };
+ MultistepOperation.prototype.hasPendingWork = function () {
+ return !!this.timerHandle || !!this.immediateId;
+ };
+ return MultistepOperation;
+ }());
var Session = (function () {
- function Session(host, cancellationToken, useSingleInferredProject, typingsInstaller, byteLength, hrtime, logger, canUseEvents, eventHandler) {
+ function Session(opts) {
var _this = this;
- this.host = host;
- this.typingsInstaller = typingsInstaller;
- this.byteLength = byteLength;
- this.hrtime = hrtime;
- this.logger = logger;
- this.canUseEvents = canUseEvents;
this.changeSeq = 0;
- this.handlers = ts.createMap((_a = {},
+ this.handlers = ts.createMapFromTemplate((_a = {},
_a[CommandNames.OpenExternalProject] = function (request) {
- _this.projectService.openExternalProject(request.arguments);
+ _this.projectService.openExternalProject(request.arguments, false);
return _this.requiredResponse(true);
},
_a[CommandNames.OpenExternalProjects] = function (request) {
- for (var _i = 0, _a = request.arguments.projects; _i < _a.length; _i++) {
- var proj = _a[_i];
- _this.projectService.openExternalProject(proj);
- }
+ _this.projectService.openExternalProjects(request.arguments.projects);
return _this.requiredResponse(true);
},
_a[CommandNames.CloseExternalProject] = function (request) {
@@ -67477,12 +76374,12 @@ var ts;
return _this.requiredResponse(_this.getSyntacticDiagnosticsSync(request.arguments));
},
_a[CommandNames.Geterr] = function (request) {
- var geterrArgs = request.arguments;
- return { response: _this.getDiagnostics(geterrArgs.delay, geterrArgs.files), responseRequired: false };
+ _this.errorCheck.startNew(function (next) { return _this.getDiagnostics(next, request.arguments.delay, request.arguments.files); });
+ return _this.notRequired();
},
_a[CommandNames.GeterrForProject] = function (request) {
- var _a = request.arguments, file = _a.file, delay = _a.delay;
- return { response: _this.getDiagnosticsForProject(delay, file), responseRequired: false };
+ _this.errorCheck.startNew(function (next) { return _this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file); });
+ return _this.notRequired();
},
_a[CommandNames.Change] = function (request) {
_this.change(request.arguments);
@@ -67561,20 +76458,57 @@ var ts;
return _this.requiredResponse(_this.getSupportedCodeFixes());
},
_a));
- this.eventHander = canUseEvents
- ? eventHandler || (function (event) { return _this.defaultEventHandler(event); })
+ this.host = opts.host;
+ this.cancellationToken = opts.cancellationToken;
+ this.typingsInstaller = opts.typingsInstaller;
+ this.byteLength = opts.byteLength;
+ this.hrtime = opts.hrtime;
+ this.logger = opts.logger;
+ this.canUseEvents = opts.canUseEvents;
+ var throttleWaitMilliseconds = opts.throttleWaitMilliseconds;
+ this.eventHandler = this.canUseEvents
+ ? opts.eventHandler || (function (event) { return _this.defaultEventHandler(event); })
: undefined;
- this.projectService = new server.ProjectService(host, logger, cancellationToken, useSingleInferredProject, typingsInstaller, this.eventHander);
- this.gcTimer = new server.GcTimer(host, 7000, logger);
+ var multistepOperationHost = {
+ executeWithRequestId: function (requestId, action) { return _this.executeWithRequestId(requestId, action); },
+ getCurrentRequestId: function () { return _this.currentRequestId; },
+ getServerHost: function () { return _this.host; },
+ logError: function (err, cmd) { return _this.logError(err, cmd); },
+ sendRequestCompletedEvent: function (requestId) { return _this.sendRequestCompletedEvent(requestId); },
+ isCancellationRequested: function () { return _this.cancellationToken.isCancellationRequested(); }
+ };
+ this.errorCheck = new MultistepOperation(multistepOperationHost);
+ var settings = {
+ host: this.host,
+ logger: this.logger,
+ cancellationToken: this.cancellationToken,
+ useSingleInferredProject: opts.useSingleInferredProject,
+ typingsInstaller: this.typingsInstaller,
+ throttleWaitMilliseconds: throttleWaitMilliseconds,
+ eventHandler: this.eventHandler,
+ globalPlugins: opts.globalPlugins,
+ pluginProbeLocations: opts.pluginProbeLocations
+ };
+ this.projectService = new server.ProjectService(settings);
+ this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
var _a;
}
+ Session.prototype.sendRequestCompletedEvent = function (requestId) {
+ var event = {
+ seq: 0,
+ type: "event",
+ event: "requestCompleted",
+ body: { request_seq: requestId }
+ };
+ this.send(event);
+ };
Session.prototype.defaultEventHandler = function (event) {
var _this = this;
switch (event.eventName) {
case server.ContextEvent:
- var _a = event.data, project = _a.project, fileName = _a.fileName;
- this.projectService.logger.info("got context event, updating diagnostics for " + fileName);
- this.updateErrorCheck([{ fileName: fileName, project: project }], this.changeSeq, function (n) { return n === _this.changeSeq; }, 100);
+ var _a = event.data, project_1 = _a.project, fileName_2 = _a.fileName;
+ this.projectService.logger.info("got context event, updating diagnostics for " + fileName_2);
+ this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, [{ fileName: fileName_2, project: project_1 }], _this.changeSeq, function (n) { return n === _this.changeSeq; }, 100); });
break;
case server.ConfigFileDiagEvent:
var _b = event.data, triggerFile = _b.triggerFile, configFileName = _b.configFileName, diagnostics = _b.diagnostics;
@@ -67627,7 +76561,7 @@ var ts;
seq: 0,
type: "event",
event: eventName,
- body: info,
+ body: info
};
this.send(ev);
};
@@ -67651,7 +76585,7 @@ var ts;
Session.prototype.semanticCheck = function (file, project) {
try {
var diags = [];
- if (!shouldSkipSematicCheck(project)) {
+ if (!shouldSkipSemanticCheck(project)) {
diags = project.getLanguageService().getSemanticDiagnostics(file);
}
var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); });
@@ -67682,7 +76616,7 @@ var ts;
}
}, ms);
};
- Session.prototype.updateErrorCheck = function (checkList, seq, matchSeq, ms, followMs, requireOpen) {
+ Session.prototype.updateErrorCheck = function (next, checkList, seq, matchSeq, ms, followMs, requireOpen) {
var _this = this;
if (ms === void 0) { ms = 1500; }
if (followMs === void 0) { followMs = 200; }
@@ -67690,13 +76624,6 @@ var ts;
if (followMs > ms) {
followMs = ms;
}
- if (this.errorTimer) {
- this.host.clearTimeout(this.errorTimer);
- }
- if (this.immediateId) {
- this.host.clearImmediate(this.immediateId);
- this.immediateId = undefined;
- }
var index = 0;
var checkOne = function () {
if (matchSeq(seq)) {
@@ -67704,21 +76631,17 @@ var ts;
index++;
if (checkSpec_1.project.containsFile(checkSpec_1.fileName, requireOpen)) {
_this.syntacticCheck(checkSpec_1.fileName, checkSpec_1.project);
- _this.immediateId = _this.host.setImmediate(function () {
+ next.immediate(function () {
_this.semanticCheck(checkSpec_1.fileName, checkSpec_1.project);
- _this.immediateId = undefined;
if (checkList.length > index) {
- _this.errorTimer = _this.host.setTimeout(checkOne, followMs);
- }
- else {
- _this.errorTimer = undefined;
+ next.delay(followMs, checkOne);
}
});
}
}
};
if ((checkList.length > index) && (matchSeq(seq))) {
- this.errorTimer = this.host.setTimeout(checkOne, ms);
+ next.delay(ms, checkOne);
}
};
Session.prototype.cleanProjects = function (caption, projects) {
@@ -67726,8 +76649,8 @@ var ts;
return;
}
this.logger.info("cleaning " + caption);
- for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
- var p = projects_4[_i];
+ for (var _i = 0, projects_5 = projects; _i < projects_5.length; _i++) {
+ var p = projects_5[_i];
p.getLanguageService(false).cleanupSemanticCache();
}
};
@@ -67765,7 +76688,7 @@ var ts;
};
Session.prototype.getDiagnosticsWorker = function (args, isSemantic, selector, includeLinePosition) {
var _a = this.getFileAndProject(args), project = _a.project, file = _a.file;
- if (isSemantic && shouldSkipSematicCheck(project)) {
+ if (isSemantic && shouldSkipSemanticCheck(project)) {
return [];
}
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
@@ -67815,18 +76738,21 @@ var ts;
};
Session.prototype.getImplementation = function (args, simplifiedResult) {
var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
var implementations = project.getLanguageService().getImplementationAtPosition(file, position);
if (!implementations) {
return [];
}
if (simplifiedResult) {
- return implementations.map(function (impl) { return ({
- file: impl.fileName,
- start: scriptInfo.positionToLineOffset(impl.textSpan.start),
- end: scriptInfo.positionToLineOffset(ts.textSpanEnd(impl.textSpan))
- }); });
+ return implementations.map(function (_a) {
+ var fileName = _a.fileName, textSpan = _a.textSpan;
+ var scriptInfo = project.getScriptInfo(fileName);
+ return {
+ file: fileName,
+ start: scriptInfo.positionToLineOffset(textSpan.start),
+ end: scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan))
+ };
+ });
}
else {
return implementations;
@@ -67841,16 +76767,20 @@ var ts;
return undefined;
}
return occurrences.map(function (occurrence) {
- var fileName = occurrence.fileName, isWriteAccess = occurrence.isWriteAccess, textSpan = occurrence.textSpan;
+ var fileName = occurrence.fileName, isWriteAccess = occurrence.isWriteAccess, textSpan = occurrence.textSpan, isInString = occurrence.isInString;
var scriptInfo = project.getScriptInfo(fileName);
var start = scriptInfo.positionToLineOffset(textSpan.start);
var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan));
- return {
+ var result = {
start: start,
end: end,
file: fileName,
isWriteAccess: isWriteAccess,
};
+ if (isInString) {
+ result.isInString = isInString;
+ }
+ return result;
});
};
Session.prototype.getSyntacticDiagnosticsSync = function (args) {
@@ -67927,13 +76857,23 @@ var ts;
}
return projects;
};
+ Session.prototype.getDefaultProject = function (args) {
+ if (args.projectFileName) {
+ var project = this.getProject(args.projectFileName);
+ if (project) {
+ return project;
+ }
+ }
+ var info = this.projectService.getScriptInfo(args.file);
+ return info.getDefaultProject();
+ };
Session.prototype.getRenameLocations = function (args, simplifiedResult) {
var file = server.toNormalizedPath(args.file);
var info = this.projectService.getScriptInfoForNormalizedPath(file);
var position = this.getPosition(args, info);
var projects = this.getProjects(args);
if (simplifiedResult) {
- var defaultProject = projects[0];
+ var defaultProject = this.getDefaultProject(args);
var renameInfo = defaultProject.getLanguageService().getRenameInfo(file, position);
if (!renameInfo) {
return undefined;
@@ -68012,7 +76952,7 @@ var ts;
Session.prototype.getReferences = function (args, simplifiedResult) {
var file = server.toNormalizedPath(args.file);
var projects = this.getProjects(args);
- var defaultProject = projects[0];
+ var defaultProject = this.getDefaultProject(args);
var scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file);
var position = this.getPosition(args, scriptInfo);
if (simplifiedResult) {
@@ -68023,7 +76963,7 @@ var ts;
var displayString = ts.displayPartsToString(nameInfo.displayParts);
var nameSpan = nameInfo.textSpan;
var nameColStart = scriptInfo.positionToLineOffset(nameSpan.start).offset;
- var nameText = scriptInfo.snap().getText(nameSpan.start, ts.textSpanEnd(nameSpan));
+ var nameText = scriptInfo.getSnapshot().getText(nameSpan.start, ts.textSpanEnd(nameSpan));
var refs = server.combineProjectOutput(projects, function (project) {
var references = project.getLanguageService().getReferencesAtPosition(file, position);
if (!references) {
@@ -68033,7 +76973,7 @@ var ts;
var refScriptInfo = project.getScriptInfo(ref.fileName);
var start = refScriptInfo.positionToLineOffset(ref.textSpan.start);
var refLineSpan = refScriptInfo.lineToTextSpan(start.line - 1);
- var lineText = refScriptInfo.snap().getText(refLineSpan.start, ts.textSpanEnd(refLineSpan)).replace(/\r|\n/g, "");
+ var lineText = refScriptInfo.getSnapshot().getText(refLineSpan.start, ts.textSpanEnd(refLineSpan)).replace(/\r|\n/g, "");
return {
file: ref.fileName,
start: start,
@@ -68065,8 +77005,8 @@ var ts;
};
Session.prototype.openClientFile = function (fileName, fileContent, scriptKind) {
var _a = this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind), configFileName = _a.configFileName, configFileErrors = _a.configFileErrors;
- if (this.eventHander) {
- this.eventHander({
+ if (this.eventHandler) {
+ this.eventHandler({
eventName: "configFileDiag",
data: { triggerFile: fileName, configFileName: configFileName, diagnostics: configFileErrors || [] }
});
@@ -68144,6 +77084,7 @@ var ts;
end: scriptInfo.positionToLineOffset(ts.textSpanEnd(quickInfo.textSpan)),
displayString: displayString,
documentation: docString,
+ tags: quickInfo.tags || []
};
}
else {
@@ -68183,7 +77124,7 @@ var ts;
var position = scriptInfo.lineOffsetToPosition(args.line, args.offset);
var formatOptions = this.projectService.getFormatCodeOptions(file);
var edits = project.getLanguageService(false).getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions);
- if ((args.key == "\n") && ((!edits) || (edits.length === 0) || allEditsBeforePos(edits, position))) {
+ if ((args.key === "\n") && ((!edits) || (edits.length === 0) || allEditsBeforePos(edits, position))) {
var lineInfo = scriptInfo.getLineInfo(args.line);
if (lineInfo && (lineInfo.leaf) && (lineInfo.leaf.text)) {
var lineText = lineInfo.leaf.text;
@@ -68192,10 +77133,10 @@ var ts;
var hasIndent = 0;
var i = void 0, len = void 0;
for (i = 0, len = lineText.length; i < len; i++) {
- if (lineText.charAt(i) == " ") {
+ if (lineText.charAt(i) === " ") {
hasIndent++;
}
- else if (lineText.charAt(i) == "\t") {
+ else if (lineText.charAt(i) === "\t") {
hasIndent += formatOptions.tabSize;
}
else {
@@ -68236,9 +77177,9 @@ var ts;
if (simplifiedResult) {
return completions.entries.reduce(function (result, entry) {
if (completions.isMemberCompletion || (entry.name.toLowerCase().indexOf(prefix.toLowerCase()) === 0)) {
- var name_51 = entry.name, kind = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, replacementSpan = entry.replacementSpan;
+ var name = entry.name, kind = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, replacementSpan = entry.replacementSpan;
var convertedSpan = replacementSpan ? _this.decorateSpan(replacementSpan, scriptInfo) : undefined;
- result.push({ name: name_51, kind: kind, kindModifiers: kindModifiers, sortText: sortText, replacementSpan: convertedSpan });
+ result.push({ name: name, kind: kind, kindModifiers: kindModifiers, sortText: sortText, replacementSpan: convertedSpan });
}
return result;
}, []).sort(function (a, b) { return ts.compareStrings(a.name, b.name); });
@@ -68271,7 +77212,8 @@ var ts;
if (project.compileOnSaveEnabled && project.languageServiceEnabled) {
result.push({
projectFileName: project.getProjectName(),
- fileNames: project.getCompileOnSaveAffectedFileList(info)
+ fileNames: project.getCompileOnSaveAffectedFileList(info),
+ projectUsesOutFile: !!project.getCompilerOptions().outFile || !!project.getCompilerOptions().out
});
}
}
@@ -68283,6 +77225,9 @@ var ts;
if (!project) {
server.Errors.ThrowNoProject();
}
+ if (!project.languageServiceEnabled) {
+ return false;
+ }
var scriptInfo = project.getScriptInfo(file);
return project.builder.emitFile(scriptInfo, function (path, data, writeByteOrderMark) { return _this.host.writeFile(path, data, writeByteOrderMark); });
};
@@ -68295,12 +77240,12 @@ var ts;
return undefined;
}
if (simplifiedResult) {
- var span_16 = helpItems.applicableSpan;
+ var span_17 = helpItems.applicableSpan;
return {
items: helpItems.items,
applicableSpan: {
- start: scriptInfo.positionToLineOffset(span_16.start),
- end: scriptInfo.positionToLineOffset(span_16.start + span_16.length)
+ start: scriptInfo.positionToLineOffset(span_17.start),
+ end: scriptInfo.positionToLineOffset(span_17.start + span_17.length)
},
selectedItemIndex: helpItems.selectedItemIndex,
argumentIndex: helpItems.argumentIndex,
@@ -68311,7 +77256,7 @@ var ts;
return helpItems;
}
};
- Session.prototype.getDiagnostics = function (delay, fileNames) {
+ Session.prototype.getDiagnostics = function (next, delay, fileNames) {
var _this = this;
var checkList = fileNames.reduce(function (accum, uncheckedFileName) {
var fileName = server.toNormalizedPath(uncheckedFileName);
@@ -68322,7 +77267,7 @@ var ts;
return accum;
}, []);
if (checkList.length > 0) {
- this.updateErrorCheck(checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay);
+ this.updateErrorCheck(next, checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay);
}
};
Session.prototype.change = function (args) {
@@ -68479,11 +77424,15 @@ var ts;
};
Session.prototype.getCodeFixes = function (args, simplifiedResult) {
var _this = this;
+ if (args.errorCodes.length === 0) {
+ return undefined;
+ }
var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
var startPosition = getStartPosition();
var endPosition = getEndPosition();
- var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes);
+ var formatOptions = this.projectService.getFormatCodeOptions(file);
+ var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, formatOptions);
if (!codeActions) {
return undefined;
}
@@ -68529,7 +77478,7 @@ var ts;
? spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); })
: spans;
};
- Session.prototype.getDiagnosticsForProject = function (delay, fileName) {
+ Session.prototype.getDiagnosticsForProject = function (next, delay, fileName) {
var _this = this;
var _a = this.getProjectInfoWorker(fileName, undefined, true), fileNames = _a.fileNames, languageServiceDisabled = _a.languageServiceDisabled;
if (languageServiceDisabled) {
@@ -68544,11 +77493,11 @@ var ts;
var project = this.projectService.getDefaultProjectForFile(normalizedFileName, true);
for (var _i = 0, fileNamesInProject_1 = fileNamesInProject; _i < fileNamesInProject_1.length; _i++) {
var fileNameInProject = fileNamesInProject_1[_i];
- if (this.getCanonicalFileName(fileNameInProject) == this.getCanonicalFileName(fileName))
+ if (this.getCanonicalFileName(fileNameInProject) === this.getCanonicalFileName(fileName))
highPriorityFiles.push(fileNameInProject);
else {
var info = this.projectService.getScriptInfo(fileNameInProject);
- if (!info.isOpen) {
+ if (!info.isScriptOpen()) {
if (fileNameInProject.indexOf(".d.ts") > 0)
veryLowPriorityFiles.push(fileNameInProject);
else
@@ -68561,7 +77510,7 @@ var ts;
fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);
if (fileNamesInProject.length > 0) {
var checkList = fileNamesInProject.map(function (fileName) { return ({ fileName: fileName, project: project }); });
- this.updateErrorCheck(checkList, this.changeSeq, function (n) { return n == _this.changeSeq; }, delay, 200, false);
+ this.updateErrorCheck(next, checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay, 200, false);
}
};
Session.prototype.getCanonicalFileName = function (fileName) {
@@ -68577,15 +77526,34 @@ var ts;
return { response: response, responseRequired: true };
};
Session.prototype.addProtocolHandler = function (command, handler) {
- if (command in this.handlers) {
+ if (this.handlers.has(command)) {
throw new Error("Protocol handler already exists for command \"" + command + "\"");
}
- this.handlers[command] = handler;
+ this.handlers.set(command, handler);
+ };
+ Session.prototype.setCurrentRequest = function (requestId) {
+ ts.Debug.assert(this.currentRequestId === undefined);
+ this.currentRequestId = requestId;
+ this.cancellationToken.setRequest(requestId);
+ };
+ Session.prototype.resetCurrentRequest = function (requestId) {
+ ts.Debug.assert(this.currentRequestId === requestId);
+ this.currentRequestId = undefined;
+ this.cancellationToken.resetRequest(requestId);
+ };
+ Session.prototype.executeWithRequestId = function (requestId, f) {
+ try {
+ this.setCurrentRequest(requestId);
+ return f();
+ }
+ finally {
+ this.resetCurrentRequest(requestId);
+ }
};
Session.prototype.executeCommand = function (request) {
- var handler = this.handlers[request.command];
+ var handler = this.handlers.get(request.command);
if (handler) {
- return handler(request);
+ return this.executeWithRequestId(request.seq, function () { return handler(request); });
}
else {
this.logger.msg("Unrecognized JSON command: " + JSON.stringify(request), server.Msg.Err);
@@ -68687,7 +77655,7 @@ var ts;
var lm = LineIndex.linesFromText(insertedText);
var lines = lm.lines;
if (lines.length > 1) {
- if (lines[lines.length - 1] == "") {
+ if (lines[lines.length - 1] === "") {
lines.length--;
}
}
@@ -68716,7 +77684,7 @@ var ts;
if (len > 1) {
var insertedNodes = new Array(len - 1);
var startNode = leafNode;
- for (var i = 1, len_1 = lines.length; i < len_1; i++) {
+ for (var i = 1; i < lines.length; i++) {
insertedNodes[i - 1] = new LineLeaf(lines[i]);
}
var pathIndex = this.startPath.length - 2;
@@ -68913,8 +77881,8 @@ var ts;
var snap = this.versions[this.currentVersionToIndex()];
if (this.changes.length > 0) {
var snapIndex = snap.index;
- for (var i = 0, len = this.changes.length; i < len; i++) {
- var change = this.changes[i];
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var change = _a[_i];
snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText);
}
snap = new LineIndexSnapshot(this.currentVersion + 1, this);
@@ -68935,8 +77903,8 @@ var ts;
var textChangeRanges = [];
for (var i = oldVersion + 1; i <= newVersion; i++) {
var snap = this.versions[this.versionToIndex(i)];
- for (var j = 0, len = snap.changesSincePreviousVersion.length; j < len; j++) {
- var textChange = snap.changesSincePreviousVersion[j];
+ for (var _i = 0, _a = snap.changesSincePreviousVersion; _i < _a.length; _i++) {
+ var textChange = _a[_i];
textChangeRanges[textChangeRanges.length] = textChange.getTextChangeRange();
}
}
@@ -69005,8 +77973,9 @@ var ts;
}
};
LineIndexSnapshot.prototype.getChangeRange = function (oldSnapshot) {
- var oldSnap = oldSnapshot;
- return this.getTextChangeRangeSinceVersion(oldSnap.version);
+ if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) {
+ return this.getTextChangeRangeSinceVersion(oldSnapshot.version);
+ }
};
return LineIndexSnapshot;
}());
@@ -69035,7 +78004,7 @@ var ts;
LineIndex.prototype.load = function (lines) {
if (lines.length > 0) {
var leaves = [];
- for (var i = 0, len = lines.length; i < len; i++) {
+ for (var i = 0; i < lines.length; i++) {
leaves[i] = new LineLeaf(lines[i]);
}
this.root = LineIndex.buildTreeFromBottom(leaves);
@@ -69127,7 +78096,7 @@ var ts;
}
if (this.checkEdits) {
var updatedText = this.getText(0, this.root.charCount());
- ts.Debug.assert(checkText == updatedText, "buffer edit mismatch");
+ ts.Debug.assert(checkText === updatedText, "buffer edit mismatch");
}
return walker.lineIndex;
}
@@ -69195,8 +78164,8 @@ var ts;
LineNode.prototype.updateCounts = function () {
this.totalChars = 0;
this.totalLines = 0;
- for (var i = 0, len = this.children.length; i < len; i++) {
- var child = this.children[i];
+ for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
+ var child = _a[_i];
this.totalChars += child.charCount();
this.totalLines += child.lineCount();
}
@@ -69490,33 +78459,40 @@ var ts;
var childProcess = require("child_process");
var os = require("os");
function getGlobalTypingsCacheLocation() {
- var basePath;
switch (process.platform) {
- case "win32":
- basePath = process.env.LOCALAPPDATA ||
+ case "win32": {
+ var basePath = process.env.LOCALAPPDATA ||
process.env.APPDATA ||
(os.homedir && os.homedir()) ||
process.env.USERPROFILE ||
(process.env.HOMEDRIVE && process.env.HOMEPATH && ts.normalizeSlashes(process.env.HOMEDRIVE + process.env.HOMEPATH)) ||
os.tmpdir();
- break;
- case "linux":
- case "android":
- basePath = (os.homedir && os.homedir()) ||
- process.env.HOME ||
- ((process.env.LOGNAME || process.env.USER) && "/home/" + (process.env.LOGNAME || process.env.USER)) ||
- os.tmpdir();
- break;
+ return ts.combinePaths(ts.normalizeSlashes(basePath), "Microsoft/TypeScript");
+ }
case "darwin":
- var homeDir = (os.homedir && os.homedir()) ||
- process.env.HOME ||
- ((process.env.LOGNAME || process.env.USER) && "/Users/" + (process.env.LOGNAME || process.env.USER)) ||
- os.tmpdir();
- basePath = ts.combinePaths(homeDir, "Library/Application Support/");
- break;
+ case "linux":
+ case "android": {
+ var cacheLocation = getNonWindowsCacheLocation(process.platform === "darwin");
+ return ts.combinePaths(cacheLocation, "typescript");
+ }
+ default:
+ ts.Debug.fail("unsupported platform '" + process.platform + "'");
+ return;
}
- ts.Debug.assert(basePath !== undefined);
- return ts.combinePaths(ts.normalizeSlashes(basePath), "Microsoft/TypeScript");
+ }
+ function getNonWindowsCacheLocation(platformIsDarwin) {
+ if (process.env.XDG_CACHE_HOME) {
+ return process.env.XDG_CACHE_HOME;
+ }
+ var usersDir = platformIsDarwin ? "Users" : "home";
+ var homePath = (os.homedir && os.homedir()) ||
+ process.env.HOME ||
+ ((process.env.LOGNAME || process.env.USER) && "/" + usersDir + "/" + (process.env.LOGNAME || process.env.USER)) ||
+ os.tmpdir();
+ var cacheFolder = platformIsDarwin
+ ? "Library/Caches"
+ : ".cache";
+ return ts.combinePaths(ts.normalizeSlashes(homePath), cacheFolder);
}
var readline = require("readline");
var fs = require("fs");
@@ -69534,6 +78510,13 @@ var ts;
this.seq = 0;
this.inGroup = false;
this.firstInGroup = true;
+ if (this.logFilename) {
+ try {
+ this.fd = fs.openSync(this.logFilename, "w");
+ }
+ catch (_) {
+ }
+ }
}
Logger.padStringRight = function (str, padding) {
return (str + padding).slice(0, padding.length);
@@ -69569,11 +78552,6 @@ var ts;
};
Logger.prototype.msg = function (s, type) {
if (type === void 0) { type = server.Msg.Err; }
- if (this.fd < 0) {
- if (this.logFilename) {
- this.fd = fs.openSync(this.logFilename, "w");
- }
- }
if (this.fd >= 0 || this.traceToConsole) {
s = s + "\n";
var prefix = Logger.padStringRight(type + " " + this.seq.toString(), " ");
@@ -69597,11 +78575,12 @@ var ts;
return Logger;
}());
var NodeTypingsInstaller = (function () {
- function NodeTypingsInstaller(telemetryEnabled, logger, host, eventPort, globalTypingsCacheLocation, newLine) {
+ function NodeTypingsInstaller(telemetryEnabled, logger, host, eventPort, globalTypingsCacheLocation, typingSafeListLocation, newLine) {
var _this = this;
this.telemetryEnabled = telemetryEnabled;
this.logger = logger;
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
+ this.typingSafeListLocation = typingSafeListLocation;
this.newLine = newLine;
this.installerPidReported = false;
this.throttledOperations = new server.ThrottledOperations(host);
@@ -69625,7 +78604,7 @@ var ts;
this.socket.write(server.formatMessage({ seq: seq, type: "event", event: event, body: body }, this.logger, Buffer.byteLength, this.newLine), "utf8");
};
NodeTypingsInstaller.prototype.setTelemetrySender = function (telemetrySender) {
- this.telemetrySender = telemetrySender;
+ this.eventSender = telemetrySender;
};
NodeTypingsInstaller.prototype.attach = function (projectService) {
var _this = this;
@@ -69640,6 +78619,9 @@ var ts;
if (this.logger.loggingEnabled() && this.logger.getLogFileName()) {
args.push(server.Arguments.LogFile, ts.combinePaths(ts.getDirectoryPath(ts.normalizeSlashes(this.logger.getLogFileName())), "ti-" + process.pid + ".log"));
}
+ if (this.typingSafeListLocation) {
+ args.push(server.Arguments.TypingSafeListLocation, this.typingSafeListLocation);
+ }
var execArgv = [];
{
for (var _i = 0, _a = process.execArgv; _i < _a.length; _i++) {
@@ -69683,9 +78665,35 @@ var ts;
if (this.logger.hasLevel(server.LogLevel.verbose)) {
this.logger.info("Received response: " + JSON.stringify(response));
}
- if (response.kind === server.EventInstall) {
- if (this.telemetrySender) {
- var body = {
+ if (response.kind === server.EventInitializationFailed) {
+ if (!this.eventSender) {
+ return;
+ }
+ var body = {
+ message: response.message
+ };
+ var eventName = "typesInstallerInitializationFailed";
+ this.eventSender.event(body, eventName);
+ return;
+ }
+ if (response.kind === server.EventBeginInstallTypes) {
+ if (!this.eventSender) {
+ return;
+ }
+ var body = {
+ eventId: response.eventId,
+ packages: response.packagesToInstall,
+ };
+ var eventName = "beginInstallTypes";
+ this.eventSender.event(body, eventName);
+ return;
+ }
+ if (response.kind === server.EventEndInstallTypes) {
+ if (!this.eventSender) {
+ return;
+ }
+ if (this.telemetryEnabled) {
+ var body_1 = {
telemetryEventName: "typingsInstalled",
payload: {
installedPackages: response.packagesToInstall.join(","),
@@ -69693,13 +78701,20 @@ var ts;
typingsInstallerVersion: response.typingsInstallerVersion
}
};
- var eventName = "telemetry";
- this.telemetrySender.event(body, eventName);
+ var eventName_1 = "telemetry";
+ this.eventSender.event(body_1, eventName_1);
}
+ var body = {
+ eventId: response.eventId,
+ packages: response.packagesToInstall,
+ success: response.installSuccess,
+ };
+ var eventName = "endInstallTypes";
+ this.eventSender.event(body, eventName);
return;
}
this.projectService.updateTypingsForProject(response);
- if (response.kind == server.ActionSet && this.socket) {
+ if (response.kind === server.ActionSet && this.socket) {
this.sendEvent(0, "setTypings", response);
}
};
@@ -69707,12 +78722,24 @@ var ts;
}());
var IOSession = (function (_super) {
__extends(IOSession, _super);
- function IOSession(host, cancellationToken, installerEventPort, canUseEvents, useSingleInferredProject, disableAutomaticTypingAcquisition, globalTypingsCacheLocation, telemetryEnabled, logger) {
- var _this;
+ function IOSession(options) {
+ var _this = this;
+ var host = options.host, installerEventPort = options.installerEventPort, globalTypingsCacheLocation = options.globalTypingsCacheLocation, typingSafeListLocation = options.typingSafeListLocation, canUseEvents = options.canUseEvents;
var typingsInstaller = disableAutomaticTypingAcquisition
? undefined
- : new NodeTypingsInstaller(telemetryEnabled, logger, host, installerEventPort, globalTypingsCacheLocation, host.newLine);
- _this = _super.call(this, host, cancellationToken, useSingleInferredProject, typingsInstaller || server.nullTypingsInstaller, Buffer.byteLength, process.hrtime, logger, canUseEvents) || this;
+ : new NodeTypingsInstaller(telemetryEnabled, logger, host, installerEventPort, globalTypingsCacheLocation, typingSafeListLocation, host.newLine);
+ _this = _super.call(this, {
+ host: host,
+ cancellationToken: cancellationToken,
+ useSingleInferredProject: useSingleInferredProject,
+ typingsInstaller: typingsInstaller || server.nullTypingsInstaller,
+ byteLength: Buffer.byteLength,
+ hrtime: process.hrtime,
+ logger: logger,
+ canUseEvents: canUseEvents,
+ globalPlugins: options.globalPlugins,
+ pluginProbeLocations: options.pluginProbeLocations
+ }) || this;
if (telemetryEnabled && typingsInstaller) {
typingsInstaller.setTelemetrySender(_this);
}
@@ -69736,9 +78763,13 @@ var ts;
return IOSession;
}(server.Session));
function parseLoggingEnvironmentString(logEnvStr) {
+ if (!logEnvStr) {
+ return {};
+ }
var logEnv = { logToFile: true };
var args = logEnvStr.split(" ");
- for (var i = 0, len = args.length; i < (len - 1); i += 2) {
+ var len = args.length - 1;
+ for (var i = 0; i < len; i += 2) {
var option = args[i];
var value = args[i + 1];
if (option && value) {
@@ -69747,8 +78778,8 @@ var ts;
logEnv.file = ts.stripQuotes(value);
break;
case "-level":
- var level = server.LogLevel[value];
- logEnv.detailLevel = typeof level === "number" ? level : server.LogLevel.normal;
+ var level = getLogLevel(value);
+ logEnv.detailLevel = level !== undefined ? level : server.LogLevel.normal;
break;
case "-traceToConsole":
logEnv.traceToConsole = value.toLowerCase() === "true";
@@ -69761,27 +78792,28 @@ var ts;
}
return logEnv;
}
- function createLoggerFromEnv() {
- var fileName = undefined;
- var detailLevel = server.LogLevel.normal;
- var traceToConsole = false;
- var logEnvStr = process.env["TSS_LOG"];
- if (logEnvStr) {
- var logEnv = parseLoggingEnvironmentString(logEnvStr);
- if (logEnv.logToFile) {
- if (logEnv.file) {
- fileName = logEnv.file;
- }
- else {
- fileName = __dirname + "/.log" + process.pid.toString();
+ function getLogLevel(level) {
+ if (level) {
+ var l = level.toLowerCase();
+ for (var name in server.LogLevel) {
+ if (isNaN(+name) && l === name.toLowerCase()) {
+ return server.LogLevel[name];
}
}
- if (logEnv.detailLevel) {
- detailLevel = logEnv.detailLevel;
- }
- traceToConsole = logEnv.traceToConsole;
}
- return new Logger(fileName, traceToConsole, detailLevel);
+ return undefined;
+ }
+ function createLogger() {
+ var cmdLineLogFileName = server.findArgument("--logFile");
+ var cmdLineVerbosity = getLogLevel(server.findArgument("--logVerbosity"));
+ var envLogOptions = parseLoggingEnvironmentString(process.env["TSS_LOG"]);
+ var logFileName = cmdLineLogFileName
+ ? ts.stripQuotes(cmdLineLogFileName)
+ : envLogOptions.logToFile
+ ? envLogOptions.file || (__dirname + "/.log" + process.pid.toString())
+ : undefined;
+ var logVerbosity = cmdLineVerbosity || envLogOptions.detailLevel;
+ return new Logger(logFileName, envLogOptions.traceToConsole, logVerbosity);
}
function createPollingWatchedFileSet(interval, chunkSize) {
if (interval === void 0) { interval = 2500; }
@@ -69850,7 +78882,6 @@ var ts;
};
}
var pollingWatchedFileSet = createPollingWatchedFileSet();
- var logger = createLoggerFromEnv();
var pending = [];
var canWrite = true;
function writeMessage(buf) {
@@ -69868,7 +78899,73 @@ var ts;
writeMessage(pending.shift());
}
}
+ function extractWatchDirectoryCacheKey(path, currentDriveKey) {
+ path = ts.normalizeSlashes(path);
+ if (isUNCPath(path)) {
+ var firstSlash = path.indexOf(ts.directorySeparator, 2);
+ return firstSlash !== -1 ? path.substring(0, firstSlash).toLowerCase() : path;
+ }
+ var rootLength = ts.getRootLength(path);
+ if (rootLength === 0) {
+ return currentDriveKey;
+ }
+ if (path.charCodeAt(1) === 58 && path.charCodeAt(2) === 47) {
+ return path.charAt(0).toLowerCase();
+ }
+ if (path.charCodeAt(0) === 47 && path.charCodeAt(1) !== 47) {
+ return currentDriveKey;
+ }
+ return undefined;
+ }
+ function isUNCPath(s) {
+ return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47;
+ }
+ var logger = createLogger();
var sys = ts.sys;
+ var useWatchGuard = process.platform === "win32" && ts.getNodeMajorVersion() >= 4;
+ if (useWatchGuard) {
+ var currentDrive_1 = extractWatchDirectoryCacheKey(sys.resolvePath(sys.getCurrentDirectory()), undefined);
+ var statusCache_1 = ts.createMap();
+ var originalWatchDirectory_1 = sys.watchDirectory;
+ sys.watchDirectory = function (path, callback, recursive) {
+ var cacheKey = extractWatchDirectoryCacheKey(path, currentDrive_1);
+ var status = cacheKey && statusCache_1.get(cacheKey);
+ if (status === undefined) {
+ if (logger.hasLevel(server.LogLevel.verbose)) {
+ logger.info(cacheKey + " for path " + path + " not found in cache...");
+ }
+ try {
+ var args = [ts.combinePaths(__dirname, "watchGuard.js"), path];
+ if (logger.hasLevel(server.LogLevel.verbose)) {
+ logger.info("Starting " + process.execPath + " with args " + JSON.stringify(args));
+ }
+ childProcess.execFileSync(process.execPath, args, { stdio: "ignore", env: { "ELECTRON_RUN_AS_NODE": "1" } });
+ status = true;
+ if (logger.hasLevel(server.LogLevel.verbose)) {
+ logger.info("WatchGuard for path " + path + " returned: OK");
+ }
+ }
+ catch (e) {
+ status = false;
+ if (logger.hasLevel(server.LogLevel.verbose)) {
+ logger.info("WatchGuard for path " + path + " returned: " + e.message);
+ }
+ }
+ if (cacheKey) {
+ statusCache_1.set(cacheKey, status);
+ }
+ }
+ else if (logger.hasLevel(server.LogLevel.verbose)) {
+ logger.info("watchDirectory for " + path + " uses cached drive information.");
+ }
+ if (status) {
+ return originalWatchDirectory_1.call(sys, path, callback, recursive);
+ }
+ else {
+ return { close: function () { } };
+ }
+ };
+ }
sys.write = function (s) { return writeMessage(new Buffer(s, "utf8")); };
sys.watchFile = function (fileName, callback) {
var watchedFile = pollingWatchedFileSet.addFile(fileName, callback);
@@ -69883,17 +78980,23 @@ var ts;
if (typeof global !== "undefined" && global.gc) {
sys.gc = function () { return global.gc(); };
}
+ sys.require = function (initialDir, moduleName) {
+ var result = ts.nodeModuleNameResolverWorker(moduleName, initialDir + "/program.ts", { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, sys, undefined, true);
+ try {
+ return { module: require(result.resolvedModule.resolvedFileName), error: undefined };
+ }
+ catch (e) {
+ return { module: undefined, error: e };
+ }
+ };
var cancellationToken;
try {
var factory = require("./cancellationToken");
cancellationToken = factory(sys.args);
}
catch (e) {
- cancellationToken = {
- isCancellationRequested: function () { return false; }
- };
+ cancellationToken = server.nullCancellationToken;
}
- ;
var eventPort;
{
var str = server.findArgument("--eventPort");
@@ -69906,10 +79009,27 @@ var ts;
if (localeStr) {
ts.validateLocaleAndSetLanguage(localeStr, sys);
}
+ var typingSafeListLocation = server.findArgument("--typingSafeListLocation");
+ var globalPlugins = (server.findArgument("--globalPlugins") || "").split(",");
+ var pluginProbeLocations = (server.findArgument("--pluginProbeLocations") || "").split(",");
var useSingleInferredProject = server.hasArgument("--useSingleInferredProject");
var disableAutomaticTypingAcquisition = server.hasArgument("--disableAutomaticTypingAcquisition");
var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
- var ioSession = new IOSession(sys, cancellationToken, eventPort, eventPort === undefined, useSingleInferredProject, disableAutomaticTypingAcquisition, getGlobalTypingsCacheLocation(), telemetryEnabled, logger);
+ var options = {
+ host: sys,
+ cancellationToken: cancellationToken,
+ installerEventPort: eventPort,
+ canUseEvents: eventPort === undefined,
+ useSingleInferredProject: useSingleInferredProject,
+ disableAutomaticTypingAcquisition: disableAutomaticTypingAcquisition,
+ globalTypingsCacheLocation: getGlobalTypingsCacheLocation(),
+ typingSafeListLocation: typingSafeListLocation,
+ telemetryEnabled: telemetryEnabled,
+ logger: logger,
+ globalPlugins: globalPlugins,
+ pluginProbeLocations: pluginProbeLocations
+ };
+ var ioSession = new IOSession(options);
process.on("uncaughtException", function (err) {
ioSession.logError(err, "unknown");
});
@@ -69917,701 +79037,3 @@ var ts;
ioSession.listen();
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
-var debugObjectHost = (function () { return this; })();
-var ts;
-(function (ts) {
- function logInternalError(logger, err) {
- if (logger) {
- logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message);
- }
- }
- var ScriptSnapshotShimAdapter = (function () {
- function ScriptSnapshotShimAdapter(scriptSnapshotShim) {
- this.scriptSnapshotShim = scriptSnapshotShim;
- }
- ScriptSnapshotShimAdapter.prototype.getText = function (start, end) {
- return this.scriptSnapshotShim.getText(start, end);
- };
- ScriptSnapshotShimAdapter.prototype.getLength = function () {
- return this.scriptSnapshotShim.getLength();
- };
- ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) {
- var oldSnapshotShim = oldSnapshot;
- var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
- if (encoded == null) {
- return null;
- }
- var decoded = JSON.parse(encoded);
- return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength);
- };
- ScriptSnapshotShimAdapter.prototype.dispose = function () {
- if ("dispose" in this.scriptSnapshotShim) {
- this.scriptSnapshotShim.dispose();
- }
- };
- return ScriptSnapshotShimAdapter;
- }());
- var LanguageServiceShimHostAdapter = (function () {
- function LanguageServiceShimHostAdapter(shimHost) {
- var _this = this;
- this.shimHost = shimHost;
- this.loggingEnabled = false;
- this.tracingEnabled = false;
- if ("getModuleResolutionsForFile" in this.shimHost) {
- this.resolveModuleNames = function (moduleNames, containingFile) {
- var resolutionsInFile = JSON.parse(_this.shimHost.getModuleResolutionsForFile(containingFile));
- return ts.map(moduleNames, function (name) {
- var result = ts.getProperty(resolutionsInFile, name);
- return result ? { resolvedFileName: result, extension: ts.extensionFromPath(result), isExternalLibraryImport: false } : undefined;
- });
- };
- }
- if ("directoryExists" in this.shimHost) {
- this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); };
- }
- if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) {
- this.resolveTypeReferenceDirectives = function (typeDirectiveNames, containingFile) {
- var typeDirectivesForFile = JSON.parse(_this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile));
- return ts.map(typeDirectiveNames, function (name) { return ts.getProperty(typeDirectivesForFile, name); });
- };
- }
- }
- LanguageServiceShimHostAdapter.prototype.log = function (s) {
- if (this.loggingEnabled) {
- this.shimHost.log(s);
- }
- };
- LanguageServiceShimHostAdapter.prototype.trace = function (s) {
- if (this.tracingEnabled) {
- this.shimHost.trace(s);
- }
- };
- LanguageServiceShimHostAdapter.prototype.error = function (s) {
- this.shimHost.error(s);
- };
- LanguageServiceShimHostAdapter.prototype.getProjectVersion = function () {
- if (!this.shimHost.getProjectVersion) {
- return undefined;
- }
- return this.shimHost.getProjectVersion();
- };
- LanguageServiceShimHostAdapter.prototype.getTypeRootsVersion = function () {
- if (!this.shimHost.getTypeRootsVersion) {
- return 0;
- }
- return this.shimHost.getTypeRootsVersion();
- };
- LanguageServiceShimHostAdapter.prototype.useCaseSensitiveFileNames = function () {
- return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false;
- };
- LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () {
- var settingsJson = this.shimHost.getCompilationSettings();
- if (settingsJson == null || settingsJson == "") {
- throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
- }
- return JSON.parse(settingsJson);
- };
- LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () {
- var encoded = this.shimHost.getScriptFileNames();
- return this.files = JSON.parse(encoded);
- };
- LanguageServiceShimHostAdapter.prototype.getScriptSnapshot = function (fileName) {
- var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName);
- return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot);
- };
- LanguageServiceShimHostAdapter.prototype.getScriptKind = function (fileName) {
- if ("getScriptKind" in this.shimHost) {
- return this.shimHost.getScriptKind(fileName);
- }
- else {
- return 0;
- }
- };
- LanguageServiceShimHostAdapter.prototype.getScriptVersion = function (fileName) {
- return this.shimHost.getScriptVersion(fileName);
- };
- LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () {
- var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
- if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") {
- return null;
- }
- try {
- return JSON.parse(diagnosticMessagesJson);
- }
- catch (e) {
- this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format");
- return null;
- }
- };
- LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () {
- var hostCancellationToken = this.shimHost.getCancellationToken();
- return new ThrottledCancellationToken(hostCancellationToken);
- };
- LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () {
- return this.shimHost.getCurrentDirectory();
- };
- LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
- return JSON.parse(this.shimHost.getDirectories(path));
- };
- LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
- return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
- };
- LanguageServiceShimHostAdapter.prototype.readDirectory = function (path, extensions, exclude, include, depth) {
- var pattern = ts.getFileMatcherPatterns(path, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory());
- return JSON.parse(this.shimHost.readDirectory(path, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth));
- };
- LanguageServiceShimHostAdapter.prototype.readFile = function (path, encoding) {
- return this.shimHost.readFile(path, encoding);
- };
- LanguageServiceShimHostAdapter.prototype.fileExists = function (path) {
- return this.shimHost.fileExists(path);
- };
- return LanguageServiceShimHostAdapter;
- }());
- ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter;
- var ThrottledCancellationToken = (function () {
- function ThrottledCancellationToken(hostCancellationToken) {
- this.hostCancellationToken = hostCancellationToken;
- this.lastCancellationCheckTime = 0;
- }
- ThrottledCancellationToken.prototype.isCancellationRequested = function () {
- var time = ts.timestamp();
- var duration = Math.abs(time - this.lastCancellationCheckTime);
- if (duration > 10) {
- this.lastCancellationCheckTime = time;
- return this.hostCancellationToken.isCancellationRequested();
- }
- return false;
- };
- return ThrottledCancellationToken;
- }());
- var CoreServicesShimHostAdapter = (function () {
- function CoreServicesShimHostAdapter(shimHost) {
- var _this = this;
- this.shimHost = shimHost;
- this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false;
- if ("directoryExists" in this.shimHost) {
- this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); };
- }
- if ("realpath" in this.shimHost) {
- this.realpath = function (path) { return _this.shimHost.realpath(path); };
- }
- }
- CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extensions, exclude, include, depth) {
- try {
- var pattern = ts.getFileMatcherPatterns(rootDir, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory());
- return JSON.parse(this.shimHost.readDirectory(rootDir, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth));
- }
- catch (e) {
- var results = [];
- for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) {
- var extension = extensions_2[_i];
- for (var _a = 0, _b = this.readDirectoryFallback(rootDir, extension, exclude); _a < _b.length; _a++) {
- var file = _b[_a];
- if (!ts.contains(results, file)) {
- results.push(file);
- }
- }
- }
- return results;
- }
- };
- CoreServicesShimHostAdapter.prototype.fileExists = function (fileName) {
- return this.shimHost.fileExists(fileName);
- };
- CoreServicesShimHostAdapter.prototype.readFile = function (fileName) {
- return this.shimHost.readFile(fileName);
- };
- CoreServicesShimHostAdapter.prototype.readDirectoryFallback = function (rootDir, extension, exclude) {
- return JSON.parse(this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude)));
- };
- CoreServicesShimHostAdapter.prototype.getDirectories = function (path) {
- return JSON.parse(this.shimHost.getDirectories(path));
- };
- return CoreServicesShimHostAdapter;
- }());
- ts.CoreServicesShimHostAdapter = CoreServicesShimHostAdapter;
- function simpleForwardCall(logger, actionDescription, action, logPerformance) {
- var start;
- if (logPerformance) {
- logger.log(actionDescription);
- start = ts.timestamp();
- }
- var result = action();
- if (logPerformance) {
- var end = ts.timestamp();
- logger.log(actionDescription + " completed in " + (end - start) + " msec");
- if (typeof result === "string") {
- var str = result;
- if (str.length > 128) {
- str = str.substring(0, 128) + "...";
- }
- logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'");
- }
- }
- return result;
- }
- function forwardJSONCall(logger, actionDescription, action, logPerformance) {
- return forwardCall(logger, actionDescription, true, action, logPerformance);
- }
- function forwardCall(logger, actionDescription, returnJson, action, logPerformance) {
- try {
- var result = simpleForwardCall(logger, actionDescription, action, logPerformance);
- return returnJson ? JSON.stringify({ result: result }) : result;
- }
- catch (err) {
- if (err instanceof ts.OperationCanceledException) {
- return JSON.stringify({ canceled: true });
- }
- logInternalError(logger, err);
- err.description = actionDescription;
- return JSON.stringify({ error: err });
- }
- }
- var ShimBase = (function () {
- function ShimBase(factory) {
- this.factory = factory;
- factory.registerShim(this);
- }
- ShimBase.prototype.dispose = function (_dummy) {
- this.factory.unregisterShim(this);
- };
- return ShimBase;
- }());
- function realizeDiagnostics(diagnostics, newLine) {
- return diagnostics.map(function (d) { return realizeDiagnostic(d, newLine); });
- }
- ts.realizeDiagnostics = realizeDiagnostics;
- function realizeDiagnostic(diagnostic, newLine) {
- return {
- message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine),
- start: diagnostic.start,
- length: diagnostic.length,
- category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(),
- code: diagnostic.code
- };
- }
- var LanguageServiceShimObject = (function (_super) {
- __extends(LanguageServiceShimObject, _super);
- function LanguageServiceShimObject(factory, host, languageService) {
- var _this = _super.call(this, factory) || this;
- _this.host = host;
- _this.languageService = languageService;
- _this.logPerformance = false;
- _this.logger = _this.host;
- return _this;
- }
- LanguageServiceShimObject.prototype.forwardJSONCall = function (actionDescription, action) {
- return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
- };
- LanguageServiceShimObject.prototype.dispose = function (dummy) {
- this.logger.log("dispose()");
- this.languageService.dispose();
- this.languageService = null;
- if (debugObjectHost && debugObjectHost.CollectGarbage) {
- debugObjectHost.CollectGarbage();
- this.logger.log("CollectGarbage()");
- }
- this.logger = null;
- _super.prototype.dispose.call(this, dummy);
- };
- LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
- this.forwardJSONCall("refresh(" + throwOnError + ")", function () { return null; });
- };
- LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
- var _this = this;
- this.forwardJSONCall("cleanupSemanticCache()", function () {
- _this.languageService.cleanupSemanticCache();
- return null;
- });
- };
- LanguageServiceShimObject.prototype.realizeDiagnostics = function (diagnostics) {
- var newLine = ts.getNewLineOrDefaultFromHost(this.host);
- return ts.realizeDiagnostics(diagnostics, newLine);
- };
- LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
- var _this = this;
- return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
- };
- LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
- var _this = this;
- return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
- };
- LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
- var _this = this;
- return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
- };
- LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
- var _this = this;
- return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
- };
- LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName + "')", function () {
- var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
- return _this.realizeDiagnostics(diagnostics);
- });
- };
- LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getSemanticDiagnostics('" + fileName + "')", function () {
- var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
- return _this.realizeDiagnostics(diagnostics);
- });
- };
- LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
- var _this = this;
- return this.forwardJSONCall("getCompilerOptionsDiagnostics()", function () {
- var diagnostics = _this.languageService.getCompilerOptionsDiagnostics();
- return _this.realizeDiagnostics(diagnostics);
- });
- };
- LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
- var _this = this;
- return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")", function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
- };
- LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getSignatureHelpItems('" + fileName + "', " + position + ")", function () { return _this.languageService.getSignatureHelpItems(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getImplementationAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getRenameInfo('" + fileName + "', " + position + ")", function () { return _this.languageService.getRenameInfo(fileName, position); });
- };
- LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) {
- var _this = this;
- return this.forwardJSONCall("findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ")", function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments); });
- };
- LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
- var _this = this;
- return this.forwardJSONCall("isValidBraceCompletionAtPosition('" + fileName + "', " + position + ", " + openingBrace + ")", function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
- };
- LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options) {
- var _this = this;
- return this.forwardJSONCall("getIndentationAtPosition('" + fileName + "', " + position + ")", function () {
- var localOptions = JSON.parse(options);
- return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
- });
- };
- LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getReferencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("findReferences('" + fileName + "', " + position + ")", function () { return _this.languageService.findReferences(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
- var _this = this;
- return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () {
- var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
- var normalizedName = ts.normalizeSlashes(fileName).toLowerCase();
- return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; });
- });
- };
- LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getCompletionsAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName) {
- var _this = this;
- return this.forwardJSONCall("getCompletionEntryDetails('" + fileName + "', " + position + ", '" + entryName + "')", function () { return _this.languageService.getCompletionEntryDetails(fileName, position, entryName); });
- };
- LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options) {
- var _this = this;
- return this.forwardJSONCall("getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")", function () {
- var localOptions = JSON.parse(options);
- return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
- });
- };
- LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options) {
- var _this = this;
- return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName + "')", function () {
- var localOptions = JSON.parse(options);
- return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
- });
- };
- LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options) {
- var _this = this;
- return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')", function () {
- var localOptions = JSON.parse(options);
- return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
- });
- };
- LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position) {
- var _this = this;
- return this.forwardJSONCall("getDocCommentTemplateAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position); });
- };
- LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
- var _this = this;
- return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ", " + fileName + ")", function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
- };
- LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getNavigationBarItems('" + fileName + "')", function () { return _this.languageService.getNavigationBarItems(fileName); });
- };
- LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getNavigationTree('" + fileName + "')", function () { return _this.languageService.getNavigationTree(fileName); });
- };
- LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getOutliningSpans('" + fileName + "')", function () { return _this.languageService.getOutliningSpans(fileName); });
- };
- LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
- var _this = this;
- return this.forwardJSONCall("getTodoComments('" + fileName + "')", function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
- };
- LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
- var _this = this;
- return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () { return _this.languageService.getEmitOutput(fileName); });
- };
- LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
- var _this = this;
- return forwardCall(this.logger, "getEmitOutput('" + fileName + "')", false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
- };
- return LanguageServiceShimObject;
- }(ShimBase));
- function convertClassifications(classifications) {
- return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState };
- }
- var ClassifierShimObject = (function (_super) {
- __extends(ClassifierShimObject, _super);
- function ClassifierShimObject(factory, logger) {
- var _this = _super.call(this, factory) || this;
- _this.logger = logger;
- _this.logPerformance = false;
- _this.classifier = ts.createClassifier();
- return _this;
- }
- ClassifierShimObject.prototype.getEncodedLexicalClassifications = function (text, lexState, syntacticClassifierAbsent) {
- var _this = this;
- return forwardJSONCall(this.logger, "getEncodedLexicalClassifications", function () { return convertClassifications(_this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)); }, this.logPerformance);
- };
- ClassifierShimObject.prototype.getClassificationsForLine = function (text, lexState, classifyKeywordsInGenerics) {
- var classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics);
- var result = "";
- for (var _i = 0, _a = classification.entries; _i < _a.length; _i++) {
- var item = _a[_i];
- result += item.length + "\n";
- result += item.classification + "\n";
- }
- result += classification.finalLexState;
- return result;
- };
- return ClassifierShimObject;
- }(ShimBase));
- var CoreServicesShimObject = (function (_super) {
- __extends(CoreServicesShimObject, _super);
- function CoreServicesShimObject(factory, logger, host) {
- var _this = _super.call(this, factory) || this;
- _this.logger = logger;
- _this.host = host;
- _this.logPerformance = false;
- return _this;
- }
- CoreServicesShimObject.prototype.forwardJSONCall = function (actionDescription, action) {
- return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
- };
- CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
- var _this = this;
- return this.forwardJSONCall("resolveModuleName('" + fileName + "')", function () {
- var compilerOptions = JSON.parse(compilerOptionsJson);
- var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
- var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
- if (resolvedFileName && !compilerOptions.allowJs && ts.fileExtensionIs(resolvedFileName, ".js")) {
- return {
- resolvedFileName: undefined,
- failedLookupLocations: []
- };
- }
- return {
- resolvedFileName: resolvedFileName,
- failedLookupLocations: result.failedLookupLocations
- };
- });
- };
- CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
- var _this = this;
- return this.forwardJSONCall("resolveTypeReferenceDirective(" + fileName + ")", function () {
- var compilerOptions = JSON.parse(compilerOptionsJson);
- var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
- return {
- resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : undefined,
- primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true,
- failedLookupLocations: result.failedLookupLocations
- };
- });
- };
- CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
- var _this = this;
- return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () {
- var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), true, true);
- return {
- referencedFiles: _this.convertFileReferences(result.referencedFiles),
- importedFiles: _this.convertFileReferences(result.importedFiles),
- ambientExternalModules: result.ambientExternalModules,
- isLibFile: result.isLibFile,
- typeReferenceDirectives: _this.convertFileReferences(result.typeReferenceDirectives)
- };
- });
- };
- CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
- var _this = this;
- return this.forwardJSONCall("getAutomaticTypeDirectiveNames('" + compilerOptionsJson + "')", function () {
- var compilerOptions = JSON.parse(compilerOptionsJson);
- return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
- });
- };
- CoreServicesShimObject.prototype.convertFileReferences = function (refs) {
- if (!refs) {
- return undefined;
- }
- var result = [];
- for (var _i = 0, refs_2 = refs; _i < refs_2.length; _i++) {
- var ref = refs_2[_i];
- result.push({
- path: ts.normalizeSlashes(ref.fileName),
- position: ref.pos,
- length: ref.end - ref.pos
- });
- }
- return result;
- };
- CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
- var _this = this;
- return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () {
- var text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength());
- var result = ts.parseConfigFileTextToJson(fileName, text);
- if (result.error) {
- return {
- options: {},
- typeAcquisition: {},
- files: [],
- raw: {},
- errors: [realizeDiagnostic(result.error, "\r\n")]
- };
- }
- var normalizedFileName = ts.normalizeSlashes(fileName);
- var configFile = ts.parseJsonConfigFileContent(result.config, _this.host, ts.getDirectoryPath(normalizedFileName), {}, normalizedFileName);
- return {
- options: configFile.options,
- typeAcquisition: configFile.typeAcquisition,
- files: configFile.fileNames,
- raw: configFile.raw,
- errors: realizeDiagnostics(configFile.errors, "\r\n")
- };
- });
- };
- CoreServicesShimObject.prototype.getDefaultCompilationSettings = function () {
- return this.forwardJSONCall("getDefaultCompilationSettings()", function () { return ts.getDefaultCompilerOptions(); });
- };
- CoreServicesShimObject.prototype.discoverTypings = function (discoverTypingsJson) {
- var _this = this;
- var getCanonicalFileName = ts.createGetCanonicalFileName(false);
- return this.forwardJSONCall("discoverTypings()", function () {
- var info = JSON.parse(discoverTypingsJson);
- return ts.JsTyping.discoverTypings(_this.host, info.fileNames, ts.toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), ts.toPath(info.safeListPath, info.safeListPath, getCanonicalFileName), info.packageNameToTypingLocation, info.typeAcquisition, info.unresolvedImports);
- });
- };
- return CoreServicesShimObject;
- }(ShimBase));
- var TypeScriptServicesFactory = (function () {
- function TypeScriptServicesFactory() {
- this._shims = [];
- }
- TypeScriptServicesFactory.prototype.getServicesVersion = function () {
- return ts.servicesVersion;
- };
- TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) {
- try {
- if (this.documentRegistry === undefined) {
- this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory());
- }
- var hostAdapter = new LanguageServiceShimHostAdapter(host);
- var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry);
- return new LanguageServiceShimObject(this, host, languageService);
- }
- catch (err) {
- logInternalError(host, err);
- throw err;
- }
- };
- TypeScriptServicesFactory.prototype.createClassifierShim = function (logger) {
- try {
- return new ClassifierShimObject(this, logger);
- }
- catch (err) {
- logInternalError(logger, err);
- throw err;
- }
- };
- TypeScriptServicesFactory.prototype.createCoreServicesShim = function (host) {
- try {
- var adapter = new CoreServicesShimHostAdapter(host);
- return new CoreServicesShimObject(this, host, adapter);
- }
- catch (err) {
- logInternalError(host, err);
- throw err;
- }
- };
- TypeScriptServicesFactory.prototype.close = function () {
- this._shims = [];
- this.documentRegistry = undefined;
- };
- TypeScriptServicesFactory.prototype.registerShim = function (shim) {
- this._shims.push(shim);
- };
- TypeScriptServicesFactory.prototype.unregisterShim = function (shim) {
- for (var i = 0, n = this._shims.length; i < n; i++) {
- if (this._shims[i] === shim) {
- delete this._shims[i];
- return;
- }
- }
- throw new Error("Invalid operation");
- };
- return TypeScriptServicesFactory;
- }());
- ts.TypeScriptServicesFactory = TypeScriptServicesFactory;
- if (typeof module !== "undefined" && module.exports) {
- module.exports = ts;
- }
-})(ts || (ts = {}));
-var TypeScript;
-(function (TypeScript) {
- var Services;
- (function (Services) {
- Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
- })(Services = TypeScript.Services || (TypeScript.Services = {}));
-})(TypeScript || (TypeScript = {}));
-var toolsVersion = "2.2";
diff --git a/node_modules/typescript/lib/tsserverlibrary.d.ts b/node_modules/typescript/lib/tsserverlibrary.d.ts
index 3f46cb68b..44bd394e3 100644
--- a/node_modules/typescript/lib/tsserverlibrary.d.ts
+++ b/node_modules/typescript/lib/tsserverlibrary.d.ts
@@ -1,857 +1,42 @@
-/// <reference path="../../src/server/types.d.ts" />
-declare namespace ts.server.protocol {
- namespace CommandTypes {
- type Brace = "brace";
- type BraceFull = "brace-full";
- type BraceCompletion = "braceCompletion";
- type Change = "change";
- type Close = "close";
- type Completions = "completions";
- type CompletionsFull = "completions-full";
- type CompletionDetails = "completionEntryDetails";
- type CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
- type CompileOnSaveEmitFile = "compileOnSaveEmitFile";
- type Configure = "configure";
- type Definition = "definition";
- type DefinitionFull = "definition-full";
- type Implementation = "implementation";
- type ImplementationFull = "implementation-full";
- type Exit = "exit";
- type Format = "format";
- type Formatonkey = "formatonkey";
- type FormatFull = "format-full";
- type FormatonkeyFull = "formatonkey-full";
- type FormatRangeFull = "formatRange-full";
- type Geterr = "geterr";
- type GeterrForProject = "geterrForProject";
- type SemanticDiagnosticsSync = "semanticDiagnosticsSync";
- type SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
- type NavBar = "navbar";
- type NavBarFull = "navbar-full";
- type Navto = "navto";
- type NavtoFull = "navto-full";
- type NavTree = "navtree";
- type NavTreeFull = "navtree-full";
- type Occurrences = "occurrences";
- type DocumentHighlights = "documentHighlights";
- type DocumentHighlightsFull = "documentHighlights-full";
- type Open = "open";
- type Quickinfo = "quickinfo";
- type QuickinfoFull = "quickinfo-full";
- type References = "references";
- type ReferencesFull = "references-full";
- type Reload = "reload";
- type Rename = "rename";
- type RenameInfoFull = "rename-full";
- type RenameLocationsFull = "renameLocations-full";
- type Saveto = "saveto";
- type SignatureHelp = "signatureHelp";
- type SignatureHelpFull = "signatureHelp-full";
- type TypeDefinition = "typeDefinition";
- type ProjectInfo = "projectInfo";
- type ReloadProjects = "reloadProjects";
- type Unknown = "unknown";
- type OpenExternalProject = "openExternalProject";
- type OpenExternalProjects = "openExternalProjects";
- type CloseExternalProject = "closeExternalProject";
- type SynchronizeProjectList = "synchronizeProjectList";
- type ApplyChangedToOpenFiles = "applyChangedToOpenFiles";
- type EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full";
- type Cleanup = "cleanup";
- type OutliningSpans = "outliningSpans";
- type TodoComments = "todoComments";
- type Indentation = "indentation";
- type DocCommentTemplate = "docCommentTemplate";
- type CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full";
- type NameOrDottedNameSpan = "nameOrDottedNameSpan";
- type BreakpointStatement = "breakpointStatement";
- type CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
- type GetCodeFixes = "getCodeFixes";
- type GetCodeFixesFull = "getCodeFixes-full";
- type GetSupportedCodeFixes = "getSupportedCodeFixes";
- }
- interface Message {
- seq: number;
- type: "request" | "response" | "event";
- }
- interface Request extends Message {
- command: string;
- arguments?: any;
- }
- interface ReloadProjectsRequest extends Message {
- command: CommandTypes.ReloadProjects;
- }
- interface Event extends Message {
- event: string;
- body?: any;
- }
- interface Response extends Message {
- request_seq: number;
- success: boolean;
- command: string;
- message?: string;
- body?: any;
- }
- interface FileRequestArgs {
- file: string;
- projectFileName?: string;
- }
- interface DocCommentTemplateRequest extends FileLocationRequest {
- command: CommandTypes.DocCommentTemplate;
- }
- interface DocCommandTemplateResponse extends Response {
- body?: TextInsertion;
- }
- interface TodoCommentRequest extends FileRequest {
- command: CommandTypes.TodoComments;
- arguments: TodoCommentRequestArgs;
- }
- interface TodoCommentRequestArgs extends FileRequestArgs {
- descriptors: TodoCommentDescriptor[];
- }
- interface TodoCommentsResponse extends Response {
- body?: TodoComment[];
- }
- interface OutliningSpansRequest extends FileRequest {
- command: CommandTypes.OutliningSpans;
- }
- interface OutliningSpansResponse extends Response {
- body?: OutliningSpan[];
- }
- interface IndentationRequest extends FileLocationRequest {
- command: CommandTypes.Indentation;
- arguments: IndentationRequestArgs;
- }
- interface IndentationResponse extends Response {
- body?: IndentationResult;
- }
- interface IndentationResult {
- position: number;
- indentation: number;
- }
- interface IndentationRequestArgs extends FileLocationRequestArgs {
- options?: EditorSettings;
- }
- interface ProjectInfoRequestArgs extends FileRequestArgs {
- needFileNameList: boolean;
- }
- interface ProjectInfoRequest extends Request {
- command: CommandTypes.ProjectInfo;
- arguments: ProjectInfoRequestArgs;
- }
- interface CompilerOptionsDiagnosticsRequest extends Request {
- arguments: CompilerOptionsDiagnosticsRequestArgs;
- }
- interface CompilerOptionsDiagnosticsRequestArgs {
- projectFileName: string;
- }
- interface ProjectInfo {
- configFileName: string;
- fileNames?: string[];
- languageServiceDisabled?: boolean;
- }
- interface DiagnosticWithLinePosition {
- message: string;
- start: number;
- length: number;
- startLocation: Location;
- endLocation: Location;
- category: string;
- code: number;
- }
- interface ProjectInfoResponse extends Response {
- body?: ProjectInfo;
- }
- interface FileRequest extends Request {
- arguments: FileRequestArgs;
- }
- interface FileLocationRequestArgs extends FileRequestArgs {
- line: number;
- offset: number;
- position?: number;
- }
- interface CodeFixRequest extends Request {
- command: CommandTypes.GetCodeFixes;
- arguments: CodeFixRequestArgs;
- }
- interface CodeFixRequestArgs extends FileRequestArgs {
- startLine: number;
- startOffset: number;
- startPosition?: number;
- endLine: number;
- endOffset: number;
- endPosition?: number;
- errorCodes?: number[];
- }
- interface GetCodeFixesResponse extends Response {
- body?: CodeAction[];
- }
- interface FileLocationRequest extends FileRequest {
- arguments: FileLocationRequestArgs;
- }
- interface GetSupportedCodeFixesRequest extends Request {
- command: CommandTypes.GetSupportedCodeFixes;
- }
- interface GetSupportedCodeFixesResponse extends Response {
- body?: string[];
- }
- interface EncodedSemanticClassificationsRequest extends FileRequest {
- arguments: EncodedSemanticClassificationsRequestArgs;
- }
- interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
- start: number;
- length: number;
- }
- interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
- filesToSearch: string[];
- }
- interface DefinitionRequest extends FileLocationRequest {
- command: CommandTypes.Definition;
- }
- interface TypeDefinitionRequest extends FileLocationRequest {
- command: CommandTypes.TypeDefinition;
- }
- interface ImplementationRequest extends FileLocationRequest {
- command: CommandTypes.Implementation;
- }
- interface Location {
- line: number;
- offset: number;
- }
- interface TextSpan {
- start: Location;
- end: Location;
- }
- interface FileSpan extends TextSpan {
- file: string;
- }
- interface DefinitionResponse extends Response {
- body?: FileSpan[];
- }
- interface TypeDefinitionResponse extends Response {
- body?: FileSpan[];
- }
- interface ImplementationResponse extends Response {
- body?: FileSpan[];
- }
- interface BraceCompletionRequest extends FileLocationRequest {
- command: CommandTypes.BraceCompletion;
- arguments: BraceCompletionRequestArgs;
- }
- interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
- openingBrace: string;
- }
- interface OccurrencesRequest extends FileLocationRequest {
- command: CommandTypes.Occurrences;
- }
- interface OccurrencesResponseItem extends FileSpan {
- isWriteAccess: boolean;
- }
- interface OccurrencesResponse extends Response {
- body?: OccurrencesResponseItem[];
- }
- interface DocumentHighlightsRequest extends FileLocationRequest {
- command: CommandTypes.DocumentHighlights;
- arguments: DocumentHighlightsRequestArgs;
- }
- interface HighlightSpan extends TextSpan {
- kind: string;
- }
- interface DocumentHighlightsItem {
- file: string;
- highlightSpans: HighlightSpan[];
- }
- interface DocumentHighlightsResponse extends Response {
- body?: DocumentHighlightsItem[];
- }
- interface ReferencesRequest extends FileLocationRequest {
- command: CommandTypes.References;
- }
- interface ReferencesResponseItem extends FileSpan {
- lineText: string;
- isWriteAccess: boolean;
- isDefinition: boolean;
- }
- interface ReferencesResponseBody {
- refs: ReferencesResponseItem[];
- symbolName: string;
- symbolStartOffset: number;
- symbolDisplayString: string;
- }
- interface ReferencesResponse extends Response {
- body?: ReferencesResponseBody;
- }
- interface RenameRequestArgs extends FileLocationRequestArgs {
- findInComments?: boolean;
- findInStrings?: boolean;
- }
- interface RenameRequest extends FileLocationRequest {
- command: CommandTypes.Rename;
- arguments: RenameRequestArgs;
- }
- interface RenameInfo {
- canRename: boolean;
- localizedErrorMessage?: string;
- displayName: string;
- fullDisplayName: string;
- kind: string;
- kindModifiers: string;
- }
- interface SpanGroup {
- file: string;
- locs: TextSpan[];
- }
- interface RenameResponseBody {
- info: RenameInfo;
- locs: SpanGroup[];
- }
- interface RenameResponse extends Response {
- body?: RenameResponseBody;
- }
- interface ExternalFile {
- fileName: string;
- scriptKind?: ScriptKindName | ts.ScriptKind;
- hasMixedContent?: boolean;
- content?: string;
- }
- interface ExternalProject {
- projectFileName: string;
- rootFiles: ExternalFile[];
- options: ExternalProjectCompilerOptions;
- typingOptions?: TypeAcquisition;
- typeAcquisition?: TypeAcquisition;
- }
- interface CompileOnSaveMixin {
- compileOnSave?: boolean;
- }
- type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
- interface ProjectVersionInfo {
- projectName: string;
- isInferred: boolean;
- version: number;
- options: ts.CompilerOptions;
- }
- interface ProjectChanges {
- added: string[];
- removed: string[];
- }
- interface ProjectFiles {
- info?: ProjectVersionInfo;
- files?: string[];
- changes?: ProjectChanges;
- }
- interface ProjectFilesWithDiagnostics extends ProjectFiles {
- projectErrors: DiagnosticWithLinePosition[];
- }
- interface ChangedOpenFile {
- fileName: string;
- changes: ts.TextChange[];
- }
- interface ConfigureRequestArguments {
- hostInfo?: string;
- file?: string;
- formatOptions?: FormatCodeSettings;
- }
- interface ConfigureRequest extends Request {
- command: CommandTypes.Configure;
- arguments: ConfigureRequestArguments;
- }
- interface ConfigureResponse extends Response {
- }
- interface OpenRequestArgs extends FileRequestArgs {
- fileContent?: string;
- scriptKindName?: ScriptKindName;
- }
- type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
- interface OpenRequest extends Request {
- command: CommandTypes.Open;
- arguments: OpenRequestArgs;
- }
- interface OpenExternalProjectRequest extends Request {
- command: CommandTypes.OpenExternalProject;
- arguments: OpenExternalProjectArgs;
- }
- type OpenExternalProjectArgs = ExternalProject;
- interface OpenExternalProjectsRequest extends Request {
- command: CommandTypes.OpenExternalProjects;
- arguments: OpenExternalProjectsArgs;
- }
- interface OpenExternalProjectsArgs {
- projects: ExternalProject[];
- }
- interface OpenExternalProjectResponse extends Response {
- }
- interface OpenExternalProjectsResponse extends Response {
- }
- interface CloseExternalProjectRequest extends Request {
- command: CommandTypes.CloseExternalProject;
- arguments: CloseExternalProjectRequestArgs;
- }
- interface CloseExternalProjectRequestArgs {
- projectFileName: string;
- }
- interface CloseExternalProjectResponse extends Response {
- }
- interface SynchronizeProjectListRequest extends Request {
- arguments: SynchronizeProjectListRequestArgs;
- }
- interface SynchronizeProjectListRequestArgs {
- knownProjects: protocol.ProjectVersionInfo[];
- }
- interface ApplyChangedToOpenFilesRequest extends Request {
- arguments: ApplyChangedToOpenFilesRequestArgs;
- }
- interface ApplyChangedToOpenFilesRequestArgs {
- openFiles?: ExternalFile[];
- changedFiles?: ChangedOpenFile[];
- closedFiles?: string[];
- }
- interface SetCompilerOptionsForInferredProjectsRequest extends Request {
- command: CommandTypes.CompilerOptionsForInferredProjects;
- arguments: SetCompilerOptionsForInferredProjectsArgs;
- }
- interface SetCompilerOptionsForInferredProjectsArgs {
- options: ExternalProjectCompilerOptions;
- }
- interface SetCompilerOptionsForInferredProjectsResponse extends Response {
- }
- interface ExitRequest extends Request {
- command: CommandTypes.Exit;
- }
- interface CloseRequest extends FileRequest {
- command: CommandTypes.Close;
- }
- interface CompileOnSaveAffectedFileListRequest extends FileRequest {
- command: CommandTypes.CompileOnSaveAffectedFileList;
- }
- interface CompileOnSaveAffectedFileListSingleProject {
- projectFileName: string;
- fileNames: string[];
- }
- interface CompileOnSaveAffectedFileListResponse extends Response {
- body: CompileOnSaveAffectedFileListSingleProject[];
- }
- interface CompileOnSaveEmitFileRequest extends FileRequest {
- command: CommandTypes.CompileOnSaveEmitFile;
- arguments: CompileOnSaveEmitFileRequestArgs;
- }
- interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
- forced?: boolean;
- }
- interface QuickInfoRequest extends FileLocationRequest {
- command: CommandTypes.Quickinfo;
- }
- interface QuickInfoResponseBody {
- kind: string;
- kindModifiers: string;
- start: Location;
- end: Location;
- displayString: string;
- documentation: string;
- }
- interface QuickInfoResponse extends Response {
- body?: QuickInfoResponseBody;
- }
- interface FormatRequestArgs extends FileLocationRequestArgs {
- endLine: number;
- endOffset: number;
- endPosition?: number;
- options?: FormatCodeSettings;
- }
- interface FormatRequest extends FileLocationRequest {
- command: CommandTypes.Format;
- arguments: FormatRequestArgs;
- }
- interface CodeEdit {
- start: Location;
- end: Location;
- newText: string;
- }
- interface FileCodeEdits {
- fileName: string;
- textChanges: CodeEdit[];
- }
- interface CodeFixResponse extends Response {
- body?: CodeAction[];
- }
- interface CodeAction {
- description: string;
- changes: FileCodeEdits[];
- }
- interface FormatResponse extends Response {
- body?: CodeEdit[];
- }
- interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
- key: string;
- options?: FormatCodeSettings;
- }
- interface FormatOnKeyRequest extends FileLocationRequest {
- command: CommandTypes.Formatonkey;
- arguments: FormatOnKeyRequestArgs;
- }
- interface CompletionsRequestArgs extends FileLocationRequestArgs {
- prefix?: string;
- }
- interface CompletionsRequest extends FileLocationRequest {
- command: CommandTypes.Completions;
- arguments: CompletionsRequestArgs;
- }
- interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
- entryNames: string[];
- }
- interface CompletionDetailsRequest extends FileLocationRequest {
- command: CommandTypes.CompletionDetails;
- arguments: CompletionDetailsRequestArgs;
- }
- interface SymbolDisplayPart {
- text: string;
- kind: string;
- }
- interface CompletionEntry {
- name: string;
- kind: string;
- kindModifiers: string;
- sortText: string;
- replacementSpan?: TextSpan;
- }
- interface CompletionEntryDetails {
- name: string;
- kind: string;
- kindModifiers: string;
- displayParts: SymbolDisplayPart[];
- documentation: SymbolDisplayPart[];
- }
- interface CompletionsResponse extends Response {
- body?: CompletionEntry[];
- }
- interface CompletionDetailsResponse extends Response {
- body?: CompletionEntryDetails[];
- }
- interface SignatureHelpParameter {
- name: string;
- documentation: SymbolDisplayPart[];
- displayParts: SymbolDisplayPart[];
- isOptional: boolean;
- }
- interface SignatureHelpItem {
- isVariadic: boolean;
- prefixDisplayParts: SymbolDisplayPart[];
- suffixDisplayParts: SymbolDisplayPart[];
- separatorDisplayParts: SymbolDisplayPart[];
- parameters: SignatureHelpParameter[];
- documentation: SymbolDisplayPart[];
- }
- interface SignatureHelpItems {
- items: SignatureHelpItem[];
- applicableSpan: TextSpan;
- selectedItemIndex: number;
- argumentIndex: number;
- argumentCount: number;
- }
- interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
- }
- interface SignatureHelpRequest extends FileLocationRequest {
- command: CommandTypes.SignatureHelp;
- arguments: SignatureHelpRequestArgs;
- }
- interface SignatureHelpResponse extends Response {
- body?: SignatureHelpItems;
- }
- interface SemanticDiagnosticsSyncRequest extends FileRequest {
- command: CommandTypes.SemanticDiagnosticsSync;
- arguments: SemanticDiagnosticsSyncRequestArgs;
- }
- interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
- includeLinePosition?: boolean;
- }
- interface SemanticDiagnosticsSyncResponse extends Response {
- body?: Diagnostic[] | DiagnosticWithLinePosition[];
- }
- interface SyntacticDiagnosticsSyncRequest extends FileRequest {
- command: CommandTypes.SyntacticDiagnosticsSync;
- arguments: SyntacticDiagnosticsSyncRequestArgs;
- }
- interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
- includeLinePosition?: boolean;
- }
- interface SyntacticDiagnosticsSyncResponse extends Response {
- body?: Diagnostic[] | DiagnosticWithLinePosition[];
- }
- interface GeterrForProjectRequestArgs {
- file: string;
- delay: number;
- }
- interface GeterrForProjectRequest extends Request {
- command: CommandTypes.GeterrForProject;
- arguments: GeterrForProjectRequestArgs;
- }
- interface GeterrRequestArgs {
- files: string[];
- delay: number;
- }
- interface GeterrRequest extends Request {
- command: CommandTypes.Geterr;
- arguments: GeterrRequestArgs;
- }
- interface Diagnostic {
- start: Location;
- end: Location;
- text: string;
- code?: number;
- }
- interface DiagnosticEventBody {
- file: string;
- diagnostics: Diagnostic[];
- }
- interface DiagnosticEvent extends Event {
- body?: DiagnosticEventBody;
- }
- interface ConfigFileDiagnosticEventBody {
- triggerFile: string;
- configFile: string;
- diagnostics: Diagnostic[];
- }
- interface ConfigFileDiagnosticEvent extends Event {
- body?: ConfigFileDiagnosticEventBody;
- event: "configFileDiag";
- }
- type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
- interface ProjectLanguageServiceStateEvent extends Event {
- event: ProjectLanguageServiceStateEventName;
- body?: ProjectLanguageServiceStateEventBody;
- }
- interface ProjectLanguageServiceStateEventBody {
- projectName: string;
- languageServiceEnabled: boolean;
- }
- interface ReloadRequestArgs extends FileRequestArgs {
- tmpfile: string;
- }
- interface ReloadRequest extends FileRequest {
- command: CommandTypes.Reload;
- arguments: ReloadRequestArgs;
- }
- interface ReloadResponse extends Response {
- }
- interface SavetoRequestArgs extends FileRequestArgs {
- tmpfile: string;
- }
- interface SavetoRequest extends FileRequest {
- command: CommandTypes.Saveto;
- arguments: SavetoRequestArgs;
- }
- interface NavtoRequestArgs extends FileRequestArgs {
- searchValue: string;
- maxResultCount?: number;
- currentFileOnly?: boolean;
- projectFileName?: string;
- }
- interface NavtoRequest extends FileRequest {
- command: CommandTypes.Navto;
- arguments: NavtoRequestArgs;
- }
- interface NavtoItem {
- name: string;
- kind: string;
- matchKind?: string;
- isCaseSensitive?: boolean;
- kindModifiers?: string;
- file: string;
- start: Location;
- end: Location;
- containerName?: string;
- containerKind?: string;
- }
- interface NavtoResponse extends Response {
- body?: NavtoItem[];
- }
- interface ChangeRequestArgs extends FormatRequestArgs {
- insertString?: string;
- }
- interface ChangeRequest extends FileLocationRequest {
- command: CommandTypes.Change;
- arguments: ChangeRequestArgs;
- }
- interface BraceResponse extends Response {
- body?: TextSpan[];
- }
- interface BraceRequest extends FileLocationRequest {
- command: CommandTypes.Brace;
- }
- interface NavBarRequest extends FileRequest {
- command: CommandTypes.NavBar;
- }
- interface NavTreeRequest extends FileRequest {
- command: CommandTypes.NavTree;
- }
- interface NavigationBarItem {
- text: string;
- kind: string;
- kindModifiers?: string;
- spans: TextSpan[];
- childItems?: NavigationBarItem[];
- indent: number;
- }
- interface NavigationTree {
- text: string;
- kind: string;
- kindModifiers: string;
- spans: TextSpan[];
- childItems?: NavigationTree[];
- }
- type TelemetryEventName = "telemetry";
- interface TelemetryEvent extends Event {
- event: TelemetryEventName;
- body: TelemetryEventBody;
- }
- interface TelemetryEventBody {
- telemetryEventName: string;
- payload: any;
- }
- type TypingsInstalledTelemetryEventName = "typingsInstalled";
- interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
- telemetryEventName: TypingsInstalledTelemetryEventName;
- payload: TypingsInstalledTelemetryEventPayload;
- }
- interface TypingsInstalledTelemetryEventPayload {
- installedPackages: string;
- installSuccess: boolean;
- typingsInstallerVersion: string;
- }
- interface NavBarResponse extends Response {
- body?: NavigationBarItem[];
- }
- interface NavTreeResponse extends Response {
- body?: NavigationTree;
- }
- namespace IndentStyle {
- type None = "None";
- type Block = "Block";
- type Smart = "Smart";
- }
- type IndentStyle = IndentStyle.None | IndentStyle.Block | IndentStyle.Smart;
- interface EditorSettings {
- baseIndentSize?: number;
- indentSize?: number;
- tabSize?: number;
- newLineCharacter?: string;
- convertTabsToSpaces?: boolean;
- indentStyle?: IndentStyle | ts.IndentStyle;
- }
- interface FormatCodeSettings extends EditorSettings {
- insertSpaceAfterCommaDelimiter?: boolean;
- insertSpaceAfterSemicolonInForStatements?: boolean;
- insertSpaceBeforeAndAfterBinaryOperators?: boolean;
- insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
- insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
- placeOpenBraceOnNewLineForFunctions?: boolean;
- placeOpenBraceOnNewLineForControlBlocks?: boolean;
- }
- interface CompilerOptions {
- allowJs?: boolean;
- allowSyntheticDefaultImports?: boolean;
- allowUnreachableCode?: boolean;
- allowUnusedLabels?: boolean;
- baseUrl?: string;
- charset?: string;
- declaration?: boolean;
- declarationDir?: string;
- disableSizeLimit?: boolean;
- emitBOM?: boolean;
- emitDecoratorMetadata?: boolean;
- experimentalDecorators?: boolean;
- forceConsistentCasingInFileNames?: boolean;
- inlineSourceMap?: boolean;
- inlineSources?: boolean;
- isolatedModules?: boolean;
- jsx?: JsxEmit | ts.JsxEmit;
- lib?: string[];
- locale?: string;
- mapRoot?: string;
- maxNodeModuleJsDepth?: number;
- module?: ModuleKind | ts.ModuleKind;
- moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
- newLine?: NewLineKind | ts.NewLineKind;
- noEmit?: boolean;
- noEmitHelpers?: boolean;
- noEmitOnError?: boolean;
- noErrorTruncation?: boolean;
- noFallthroughCasesInSwitch?: boolean;
- noImplicitAny?: boolean;
- noImplicitReturns?: boolean;
- noImplicitThis?: boolean;
- noUnusedLocals?: boolean;
- noUnusedParameters?: boolean;
- noImplicitUseStrict?: boolean;
- noLib?: boolean;
- noResolve?: boolean;
- out?: string;
- outDir?: string;
- outFile?: string;
- paths?: MapLike<string[]>;
- preserveConstEnums?: boolean;
- project?: string;
- reactNamespace?: string;
- removeComments?: boolean;
- rootDir?: string;
- rootDirs?: string[];
- skipLibCheck?: boolean;
- skipDefaultLibCheck?: boolean;
- sourceMap?: boolean;
- sourceRoot?: string;
- strictNullChecks?: boolean;
- suppressExcessPropertyErrors?: boolean;
- suppressImplicitAnyIndexErrors?: boolean;
- target?: ScriptTarget | ts.ScriptTarget;
- traceResolution?: boolean;
- types?: string[];
- typeRoots?: string[];
- [option: string]: CompilerOptionsValue | undefined;
- }
- namespace JsxEmit {
- type None = "None";
- type Preserve = "Preserve";
- type React = "React";
- }
- type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
- namespace ModuleKind {
- type None = "None";
- type CommonJS = "CommonJS";
- type AMD = "AMD";
- type UMD = "UMD";
- type System = "System";
- type ES6 = "ES6";
- type ES2015 = "ES2015";
- }
- type ModuleKind = ModuleKind.None | ModuleKind.CommonJS | ModuleKind.AMD | ModuleKind.UMD | ModuleKind.System | ModuleKind.ES6 | ModuleKind.ES2015;
- namespace ModuleResolutionKind {
- type Classic = "Classic";
- type Node = "Node";
- }
- type ModuleResolutionKind = ModuleResolutionKind.Classic | ModuleResolutionKind.Node;
- namespace NewLineKind {
- type Crlf = "Crlf";
- type Lf = "Lf";
- }
- type NewLineKind = NewLineKind.Crlf | NewLineKind.Lf;
- namespace ScriptTarget {
- type ES3 = "ES3";
- type ES5 = "ES5";
- type ES6 = "ES6";
- type ES2015 = "ES2015";
- }
- type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
-}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
declare namespace ts {
interface MapLike<T> {
[index: string]: T;
}
- interface Map<T> extends MapLike<T> {
- __mapBrand: any;
+ interface Map<T> {
+ get(key: string): T;
+ has(key: string): boolean;
+ set(key: string, value: T): this;
+ delete(key: string): boolean;
+ clear(): void;
+ forEach(action: (value: T, key: string) => void): void;
+ readonly size: number;
+ keys(): Iterator<string>;
+ values(): Iterator<T>;
+ entries(): Iterator<[string, T]>;
+ }
+ interface Iterator<T> {
+ next(): {
+ value: T;
+ done: false;
+ } | {
+ value: never;
+ done: true;
+ };
}
type Path = string & {
__pathBrand: any;
@@ -1003,171 +188,171 @@ declare namespace ts {
ReadonlyKeyword = 130,
RequireKeyword = 131,
NumberKeyword = 132,
- SetKeyword = 133,
- StringKeyword = 134,
- SymbolKeyword = 135,
- TypeKeyword = 136,
- UndefinedKeyword = 137,
- FromKeyword = 138,
- GlobalKeyword = 139,
- OfKeyword = 140,
- QualifiedName = 141,
- ComputedPropertyName = 142,
- TypeParameter = 143,
- Parameter = 144,
- Decorator = 145,
- PropertySignature = 146,
- PropertyDeclaration = 147,
- MethodSignature = 148,
- MethodDeclaration = 149,
- Constructor = 150,
- GetAccessor = 151,
- SetAccessor = 152,
- CallSignature = 153,
- ConstructSignature = 154,
- IndexSignature = 155,
- TypePredicate = 156,
- TypeReference = 157,
- FunctionType = 158,
- ConstructorType = 159,
- TypeQuery = 160,
- TypeLiteral = 161,
- ArrayType = 162,
- TupleType = 163,
- UnionType = 164,
- IntersectionType = 165,
- ParenthesizedType = 166,
- ThisType = 167,
- TypeOperator = 168,
- IndexedAccessType = 169,
- MappedType = 170,
- LiteralType = 171,
- ObjectBindingPattern = 172,
- ArrayBindingPattern = 173,
- BindingElement = 174,
- ArrayLiteralExpression = 175,
- ObjectLiteralExpression = 176,
- PropertyAccessExpression = 177,
- ElementAccessExpression = 178,
- CallExpression = 179,
- NewExpression = 180,
- TaggedTemplateExpression = 181,
- TypeAssertionExpression = 182,
- ParenthesizedExpression = 183,
- FunctionExpression = 184,
- ArrowFunction = 185,
- DeleteExpression = 186,
- TypeOfExpression = 187,
- VoidExpression = 188,
- AwaitExpression = 189,
- PrefixUnaryExpression = 190,
- PostfixUnaryExpression = 191,
- BinaryExpression = 192,
- ConditionalExpression = 193,
- TemplateExpression = 194,
- YieldExpression = 195,
- SpreadElement = 196,
- ClassExpression = 197,
- OmittedExpression = 198,
- ExpressionWithTypeArguments = 199,
- AsExpression = 200,
- NonNullExpression = 201,
- TemplateSpan = 202,
- SemicolonClassElement = 203,
- Block = 204,
- VariableStatement = 205,
- EmptyStatement = 206,
- ExpressionStatement = 207,
- IfStatement = 208,
- DoStatement = 209,
- WhileStatement = 210,
- ForStatement = 211,
- ForInStatement = 212,
- ForOfStatement = 213,
- ContinueStatement = 214,
- BreakStatement = 215,
- ReturnStatement = 216,
- WithStatement = 217,
- SwitchStatement = 218,
- LabeledStatement = 219,
- ThrowStatement = 220,
- TryStatement = 221,
- DebuggerStatement = 222,
- VariableDeclaration = 223,
- VariableDeclarationList = 224,
- FunctionDeclaration = 225,
- ClassDeclaration = 226,
- InterfaceDeclaration = 227,
- TypeAliasDeclaration = 228,
- EnumDeclaration = 229,
- ModuleDeclaration = 230,
- ModuleBlock = 231,
- CaseBlock = 232,
- NamespaceExportDeclaration = 233,
- ImportEqualsDeclaration = 234,
- ImportDeclaration = 235,
- ImportClause = 236,
- NamespaceImport = 237,
- NamedImports = 238,
- ImportSpecifier = 239,
- ExportAssignment = 240,
- ExportDeclaration = 241,
- NamedExports = 242,
- ExportSpecifier = 243,
- MissingDeclaration = 244,
- ExternalModuleReference = 245,
- JsxElement = 246,
- JsxSelfClosingElement = 247,
- JsxOpeningElement = 248,
- JsxClosingElement = 249,
- JsxAttribute = 250,
- JsxSpreadAttribute = 251,
- JsxExpression = 252,
- CaseClause = 253,
- DefaultClause = 254,
- HeritageClause = 255,
- CatchClause = 256,
- PropertyAssignment = 257,
- ShorthandPropertyAssignment = 258,
- SpreadAssignment = 259,
- EnumMember = 260,
- SourceFile = 261,
- JSDocTypeExpression = 262,
- JSDocAllType = 263,
- JSDocUnknownType = 264,
- JSDocArrayType = 265,
- JSDocUnionType = 266,
- JSDocTupleType = 267,
- JSDocNullableType = 268,
- JSDocNonNullableType = 269,
- JSDocRecordType = 270,
- JSDocRecordMember = 271,
- JSDocTypeReference = 272,
- JSDocOptionalType = 273,
- JSDocFunctionType = 274,
- JSDocVariadicType = 275,
- JSDocConstructorType = 276,
- JSDocThisType = 277,
- JSDocComment = 278,
- JSDocTag = 279,
- JSDocAugmentsTag = 280,
- JSDocParameterTag = 281,
- JSDocReturnTag = 282,
- JSDocTypeTag = 283,
- JSDocTemplateTag = 284,
- JSDocTypedefTag = 285,
- JSDocPropertyTag = 286,
- JSDocTypeLiteral = 287,
- JSDocLiteralType = 288,
- JSDocNullKeyword = 289,
- JSDocUndefinedKeyword = 290,
- JSDocNeverKeyword = 291,
- SyntaxList = 292,
- NotEmittedStatement = 293,
- PartiallyEmittedExpression = 294,
- MergeDeclarationMarker = 295,
- EndOfDeclarationMarker = 296,
- RawExpression = 297,
+ ObjectKeyword = 133,
+ SetKeyword = 134,
+ StringKeyword = 135,
+ SymbolKeyword = 136,
+ TypeKeyword = 137,
+ UndefinedKeyword = 138,
+ FromKeyword = 139,
+ GlobalKeyword = 140,
+ OfKeyword = 141,
+ QualifiedName = 142,
+ ComputedPropertyName = 143,
+ TypeParameter = 144,
+ Parameter = 145,
+ Decorator = 146,
+ PropertySignature = 147,
+ PropertyDeclaration = 148,
+ MethodSignature = 149,
+ MethodDeclaration = 150,
+ Constructor = 151,
+ GetAccessor = 152,
+ SetAccessor = 153,
+ CallSignature = 154,
+ ConstructSignature = 155,
+ IndexSignature = 156,
+ TypePredicate = 157,
+ TypeReference = 158,
+ FunctionType = 159,
+ ConstructorType = 160,
+ TypeQuery = 161,
+ TypeLiteral = 162,
+ ArrayType = 163,
+ TupleType = 164,
+ UnionType = 165,
+ IntersectionType = 166,
+ ParenthesizedType = 167,
+ ThisType = 168,
+ TypeOperator = 169,
+ IndexedAccessType = 170,
+ MappedType = 171,
+ LiteralType = 172,
+ ObjectBindingPattern = 173,
+ ArrayBindingPattern = 174,
+ BindingElement = 175,
+ ArrayLiteralExpression = 176,
+ ObjectLiteralExpression = 177,
+ PropertyAccessExpression = 178,
+ ElementAccessExpression = 179,
+ CallExpression = 180,
+ NewExpression = 181,
+ TaggedTemplateExpression = 182,
+ TypeAssertionExpression = 183,
+ ParenthesizedExpression = 184,
+ FunctionExpression = 185,
+ ArrowFunction = 186,
+ DeleteExpression = 187,
+ TypeOfExpression = 188,
+ VoidExpression = 189,
+ AwaitExpression = 190,
+ PrefixUnaryExpression = 191,
+ PostfixUnaryExpression = 192,
+ BinaryExpression = 193,
+ ConditionalExpression = 194,
+ TemplateExpression = 195,
+ YieldExpression = 196,
+ SpreadElement = 197,
+ ClassExpression = 198,
+ OmittedExpression = 199,
+ ExpressionWithTypeArguments = 200,
+ AsExpression = 201,
+ NonNullExpression = 202,
+ MetaProperty = 203,
+ TemplateSpan = 204,
+ SemicolonClassElement = 205,
+ Block = 206,
+ VariableStatement = 207,
+ EmptyStatement = 208,
+ ExpressionStatement = 209,
+ IfStatement = 210,
+ DoStatement = 211,
+ WhileStatement = 212,
+ ForStatement = 213,
+ ForInStatement = 214,
+ ForOfStatement = 215,
+ ContinueStatement = 216,
+ BreakStatement = 217,
+ ReturnStatement = 218,
+ WithStatement = 219,
+ SwitchStatement = 220,
+ LabeledStatement = 221,
+ ThrowStatement = 222,
+ TryStatement = 223,
+ DebuggerStatement = 224,
+ VariableDeclaration = 225,
+ VariableDeclarationList = 226,
+ FunctionDeclaration = 227,
+ ClassDeclaration = 228,
+ InterfaceDeclaration = 229,
+ TypeAliasDeclaration = 230,
+ EnumDeclaration = 231,
+ ModuleDeclaration = 232,
+ ModuleBlock = 233,
+ CaseBlock = 234,
+ NamespaceExportDeclaration = 235,
+ ImportEqualsDeclaration = 236,
+ ImportDeclaration = 237,
+ ImportClause = 238,
+ NamespaceImport = 239,
+ NamedImports = 240,
+ ImportSpecifier = 241,
+ ExportAssignment = 242,
+ ExportDeclaration = 243,
+ NamedExports = 244,
+ ExportSpecifier = 245,
+ MissingDeclaration = 246,
+ ExternalModuleReference = 247,
+ JsxElement = 248,
+ JsxSelfClosingElement = 249,
+ JsxOpeningElement = 250,
+ JsxClosingElement = 251,
+ JsxAttribute = 252,
+ JsxAttributes = 253,
+ JsxSpreadAttribute = 254,
+ JsxExpression = 255,
+ CaseClause = 256,
+ DefaultClause = 257,
+ HeritageClause = 258,
+ CatchClause = 259,
+ PropertyAssignment = 260,
+ ShorthandPropertyAssignment = 261,
+ SpreadAssignment = 262,
+ EnumMember = 263,
+ SourceFile = 264,
+ Bundle = 265,
+ JSDocTypeExpression = 266,
+ JSDocAllType = 267,
+ JSDocUnknownType = 268,
+ JSDocArrayType = 269,
+ JSDocUnionType = 270,
+ JSDocTupleType = 271,
+ JSDocNullableType = 272,
+ JSDocNonNullableType = 273,
+ JSDocRecordType = 274,
+ JSDocRecordMember = 275,
+ JSDocTypeReference = 276,
+ JSDocOptionalType = 277,
+ JSDocFunctionType = 278,
+ JSDocVariadicType = 279,
+ JSDocConstructorType = 280,
+ JSDocThisType = 281,
+ JSDocComment = 282,
+ JSDocTag = 283,
+ JSDocAugmentsTag = 284,
+ JSDocParameterTag = 285,
+ JSDocReturnTag = 286,
+ JSDocTypeTag = 287,
+ JSDocTemplateTag = 288,
+ JSDocTypedefTag = 289,
+ JSDocPropertyTag = 290,
+ JSDocTypeLiteral = 291,
+ JSDocLiteralType = 292,
+ SyntaxList = 293,
+ NotEmittedStatement = 294,
+ PartiallyEmittedExpression = 295,
+ MergeDeclarationMarker = 296,
+ EndOfDeclarationMarker = 297,
Count = 298,
FirstAssignment = 57,
LastAssignment = 69,
@@ -1176,15 +361,15 @@ declare namespace ts {
FirstReservedWord = 71,
LastReservedWord = 106,
FirstKeyword = 71,
- LastKeyword = 140,
+ LastKeyword = 141,
FirstFutureReservedWord = 107,
LastFutureReservedWord = 115,
- FirstTypeNode = 156,
- LastTypeNode = 171,
+ FirstTypeNode = 157,
+ LastTypeNode = 172,
FirstPunctuation = 16,
LastPunctuation = 69,
FirstToken = 0,
- LastToken = 140,
+ LastToken = 141,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
@@ -1193,11 +378,11 @@ declare namespace ts {
LastTemplateToken = 15,
FirstBinaryOperator = 26,
LastBinaryOperator = 69,
- FirstNode = 141,
- FirstJSDocNode = 262,
- LastJSDocNode = 288,
- FirstJSDocTagNode = 278,
- LastJSDocTagNode = 291,
+ FirstNode = 142,
+ FirstJSDocNode = 266,
+ LastJSDocNode = 292,
+ FirstJSDocTagNode = 282,
+ LastJSDocTagNode = 292,
}
const enum NodeFlags {
None = 0,
@@ -1211,26 +396,20 @@ declare namespace ts {
HasImplicitReturn = 128,
HasExplicitReturn = 256,
GlobalAugmentation = 512,
- HasClassExtends = 1024,
- HasDecorators = 2048,
- HasParamDecorators = 4096,
- HasAsyncFunctions = 8192,
- HasSpreadAttribute = 16384,
- HasRestAttribute = 32768,
- DisallowInContext = 65536,
- YieldContext = 131072,
- DecoratorContext = 262144,
- AwaitContext = 524288,
- ThisNodeHasError = 1048576,
- JavaScriptFile = 2097152,
- ThisNodeOrAnySubNodesHasError = 4194304,
- HasAggregatedChildData = 8388608,
+ HasAsyncFunctions = 1024,
+ DisallowInContext = 2048,
+ YieldContext = 4096,
+ DecoratorContext = 8192,
+ AwaitContext = 16384,
+ ThisNodeHasError = 32768,
+ JavaScriptFile = 65536,
+ ThisNodeOrAnySubNodesHasError = 131072,
+ HasAggregatedChildData = 262144,
BlockScoped = 3,
ReachabilityCheckFlags = 384,
- EmitHelperFlags = 64512,
- ReachabilityAndEmitFlags = 64896,
- ContextFlags = 3080192,
- TypeExcludesFlags = 655360,
+ ReachabilityAndEmitFlags = 1408,
+ ContextFlags = 96256,
+ TypeExcludesFlags = 20480,
}
const enum ModifierFlags {
None = 0,
@@ -1258,34 +437,15 @@ declare namespace ts {
IntrinsicIndexedElement = 2,
IntrinsicElement = 3,
}
- const enum RelationComparisonResult {
- Succeeded = 1,
- Failed = 2,
- FailedAndReported = 3,
- }
interface Node extends TextRange {
kind: SyntaxKind;
flags: NodeFlags;
- modifierFlagsCache?: ModifierFlags;
- transformFlags?: TransformFlags;
decorators?: NodeArray<Decorator>;
modifiers?: ModifiersArray;
- id?: number;
parent?: Node;
- original?: Node;
- startsOnNewLine?: boolean;
- jsDoc?: JSDoc[];
- jsDocCache?: (JSDoc | JSDocTag)[];
- symbol?: Symbol;
- locals?: SymbolTable;
- nextContainer?: Node;
- localSymbol?: Symbol;
- flowNode?: FlowNode;
- emitNode?: EmitNode;
}
interface NodeArray<T extends Node> extends Array<T>, TextRange {
hasTrailingComma?: boolean;
- transformFlags?: TransformFlags;
}
interface Token<TKind extends SyntaxKind> extends Node {
kind: TKind;
@@ -1299,29 +459,18 @@ declare namespace ts {
type EndOfFileToken = Token<SyntaxKind.EndOfFileToken>;
type AtToken = Token<SyntaxKind.AtToken>;
type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
+ type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
type ModifiersArray = NodeArray<Modifier>;
- const enum GeneratedIdentifierKind {
- None = 0,
- Auto = 1,
- Loop = 2,
- Unique = 3,
- Node = 4,
- }
interface Identifier extends PrimaryExpression {
kind: SyntaxKind.Identifier;
text: string;
originalKeywordKind?: SyntaxKind;
- autoGenerateKind?: GeneratedIdentifierKind;
- autoGenerateId?: number;
isInJSDocNamespace?: boolean;
}
interface TransientIdentifier extends Identifier {
resolvedSymbol: Symbol;
}
- interface GeneratedIdentifier extends Identifier {
- autoGenerateKind: GeneratedIdentifierKind.Auto | GeneratedIdentifierKind.Loop | GeneratedIdentifierKind.Unique | GeneratedIdentifierKind.Node;
- }
interface QualifiedName extends Node {
kind: SyntaxKind.QualifiedName;
left: EntityName;
@@ -1347,8 +496,10 @@ declare namespace ts {
}
interface TypeParameterDeclaration extends Declaration {
kind: SyntaxKind.TypeParameter;
+ parent?: DeclarationWithTypeParameters;
name: Identifier;
constraint?: TypeNode;
+ default?: TypeNode;
expression?: Expression;
}
interface SignatureDeclaration extends Declaration {
@@ -1366,17 +517,19 @@ declare namespace ts {
type BindingName = Identifier | BindingPattern;
interface VariableDeclaration extends Declaration {
kind: SyntaxKind.VariableDeclaration;
- parent?: VariableDeclarationList;
+ parent?: VariableDeclarationList | CatchClause;
name: BindingName;
type?: TypeNode;
initializer?: Expression;
}
interface VariableDeclarationList extends Node {
kind: SyntaxKind.VariableDeclarationList;
+ parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
interface ParameterDeclaration extends Declaration {
kind: SyntaxKind.Parameter;
+ parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
questionToken?: QuestionToken;
@@ -1385,6 +538,7 @@ declare namespace ts {
}
interface BindingElement extends Declaration {
kind: SyntaxKind.BindingElement;
+ parent?: BindingPattern;
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
@@ -1408,7 +562,7 @@ declare namespace ts {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
- type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration | AccessorDeclaration | SpreadAssignment;
+ type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
interface PropertyAssignment extends ObjectLiteralElement {
kind: SyntaxKind.PropertyAssignment;
name: PropertyName;
@@ -1439,10 +593,12 @@ declare namespace ts {
}
interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<BindingElement>;
}
interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<ArrayBindingElement>;
}
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
@@ -1469,41 +625,44 @@ declare namespace ts {
}
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
kind: SyntaxKind.Constructor;
+ parent?: ClassDeclaration | ClassExpression;
body?: FunctionBody;
}
interface SemicolonClassElement extends ClassElement {
kind: SyntaxKind.SemicolonClassElement;
+ parent?: ClassDeclaration | ClassExpression;
}
interface GetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.GetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
interface SetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.SetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
+ parent?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode;
}
interface TypeNode extends Node {
_typeNodeBrand: any;
}
interface KeywordTypeNode extends TypeNode {
- kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.VoidKeyword;
+ kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
- interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
- kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
- }
- interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
+ type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
+ interface FunctionTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.FunctionType;
}
- interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
+ interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
interface TypeReferenceNode extends TypeNode {
@@ -1532,15 +691,14 @@ declare namespace ts {
kind: SyntaxKind.TupleType;
elementTypes: NodeArray<TypeNode>;
}
- interface UnionOrIntersectionTypeNode extends TypeNode {
- kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType;
- types: NodeArray<TypeNode>;
- }
- interface UnionTypeNode extends UnionOrIntersectionTypeNode {
+ type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+ interface UnionTypeNode extends TypeNode {
kind: SyntaxKind.UnionType;
+ types: NodeArray<TypeNode>;
}
- interface IntersectionTypeNode extends UnionOrIntersectionTypeNode {
+ interface IntersectionTypeNode extends TypeNode {
kind: SyntaxKind.IntersectionType;
+ types: NodeArray<TypeNode>;
}
interface ParenthesizedTypeNode extends TypeNode {
kind: SyntaxKind.ParenthesizedType;
@@ -1558,6 +716,7 @@ declare namespace ts {
}
interface MappedTypeNode extends TypeNode, Declaration {
kind: SyntaxKind.MappedType;
+ parent?: TypeAliasDeclaration;
readonlyToken?: ReadonlyToken;
typeParameter: TypeParameterDeclaration;
questionToken?: QuestionToken;
@@ -1569,11 +728,9 @@ declare namespace ts {
}
interface StringLiteral extends LiteralExpression {
kind: SyntaxKind.StringLiteral;
- textSourceNode?: Identifier | StringLiteral | NumericLiteral;
}
interface Expression extends Node {
_expressionBrand: any;
- contextualType?: Type;
}
interface OmittedExpression extends Expression {
kind: SyntaxKind.OmittedExpression;
@@ -1609,13 +766,13 @@ declare namespace ts {
interface PrimaryExpression extends MemberExpression {
_primaryExpressionBrand: any;
}
- interface NullLiteral extends PrimaryExpression {
+ interface NullLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.NullKeyword;
}
- interface BooleanLiteral extends PrimaryExpression {
+ interface BooleanLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
}
- interface ThisExpression extends PrimaryExpression {
+ interface ThisExpression extends PrimaryExpression, KeywordTypeNode {
kind: SyntaxKind.ThisKeyword;
}
interface SuperExpression extends PrimaryExpression {
@@ -1711,7 +868,6 @@ declare namespace ts {
text: string;
isUnterminated?: boolean;
hasExtendedUnicodeEscape?: boolean;
- isOctalLiteral?: boolean;
}
interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
_literalExpressionBrand: any;
@@ -1724,16 +880,18 @@ declare namespace ts {
}
interface NumericLiteral extends LiteralExpression {
kind: SyntaxKind.NumericLiteral;
- trailingComment?: string;
}
interface TemplateHead extends LiteralLikeNode {
kind: SyntaxKind.TemplateHead;
+ parent?: TemplateExpression;
}
interface TemplateMiddle extends LiteralLikeNode {
kind: SyntaxKind.TemplateMiddle;
+ parent?: TemplateSpan;
}
interface TemplateTail extends LiteralLikeNode {
kind: SyntaxKind.TemplateTail;
+ parent?: TemplateSpan;
}
type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
interface TemplateExpression extends PrimaryExpression {
@@ -1743,6 +901,7 @@ declare namespace ts {
}
interface TemplateSpan extends Node {
kind: SyntaxKind.TemplateSpan;
+ parent?: TemplateExpression;
expression: Expression;
literal: TemplateMiddle | TemplateTail;
}
@@ -1753,7 +912,6 @@ declare namespace ts {
interface ArrayLiteralExpression extends PrimaryExpression {
kind: SyntaxKind.ArrayLiteralExpression;
elements: NodeArray<Expression>;
- multiLine?: boolean;
}
interface SpreadElement extends Expression {
kind: SyntaxKind.SpreadElement;
@@ -1764,9 +922,8 @@ declare namespace ts {
}
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
kind: SyntaxKind.ObjectLiteralExpression;
- multiLine?: boolean;
}
- type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+ type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
interface PropertyAccessExpression extends MemberExpression, Declaration {
kind: SyntaxKind.PropertyAccessExpression;
@@ -1800,6 +957,7 @@ declare namespace ts {
}
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
+ parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
@@ -1807,14 +965,14 @@ declare namespace ts {
kind: SyntaxKind.NewExpression;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
- arguments: NodeArray<Expression>;
+ arguments?: NodeArray<Expression>;
}
interface TaggedTemplateExpression extends MemberExpression {
kind: SyntaxKind.TaggedTemplateExpression;
tag: LeftHandSideExpression;
template: TemplateLiteral;
}
- type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
+ type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
interface AsExpression extends Expression {
kind: SyntaxKind.AsExpression;
expression: Expression;
@@ -1830,44 +988,59 @@ declare namespace ts {
kind: SyntaxKind.NonNullExpression;
expression: Expression;
}
+ interface MetaProperty extends PrimaryExpression {
+ kind: SyntaxKind.MetaProperty;
+ keywordToken: SyntaxKind;
+ name: Identifier;
+ }
interface JsxElement extends PrimaryExpression {
kind: SyntaxKind.JsxElement;
openingElement: JsxOpeningElement;
children: NodeArray<JsxChild>;
closingElement: JsxClosingElement;
}
+ type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
+ type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
type JsxTagNameExpression = PrimaryExpression | PropertyAccessExpression;
+ interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
+ parent?: JsxOpeningLikeElement;
+ }
interface JsxOpeningElement extends Expression {
kind: SyntaxKind.JsxOpeningElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
interface JsxSelfClosingElement extends PrimaryExpression {
kind: SyntaxKind.JsxSelfClosingElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
- type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
- type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
- interface JsxAttribute extends Node {
+ interface JsxAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxAttribute;
+ parent?: JsxAttributes;
name: Identifier;
initializer?: StringLiteral | JsxExpression;
}
- interface JsxSpreadAttribute extends Node {
+ interface JsxSpreadAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxSpreadAttribute;
+ parent?: JsxAttributes;
expression: Expression;
}
interface JsxClosingElement extends Node {
kind: SyntaxKind.JsxClosingElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
}
interface JsxExpression extends Expression {
kind: SyntaxKind.JsxExpression;
+ parent?: JsxElement | JsxAttributeLike;
+ dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
expression?: Expression;
}
interface JsxText extends Node {
kind: SyntaxKind.JsxText;
+ parent?: JsxElement;
}
type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
interface Statement extends Node {
@@ -1876,16 +1049,6 @@ declare namespace ts {
interface NotEmittedStatement extends Statement {
kind: SyntaxKind.NotEmittedStatement;
}
- interface EndOfDeclarationMarker extends Statement {
- kind: SyntaxKind.EndOfDeclarationMarker;
- }
- interface RawExpression extends PrimaryExpression {
- kind: SyntaxKind.RawExpression;
- text: string;
- }
- interface MergeDeclarationMarker extends Statement {
- kind: SyntaxKind.MergeDeclarationMarker;
- }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1896,11 +1059,10 @@ declare namespace ts {
kind: SyntaxKind.MissingDeclaration;
name?: Identifier;
}
- type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
+ type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
interface Block extends Statement {
kind: SyntaxKind.Block;
statements: NodeArray<Statement>;
- multiLine?: boolean;
}
interface VariableStatement extends Statement {
kind: SyntaxKind.VariableStatement;
@@ -1910,9 +1072,6 @@ declare namespace ts {
kind: SyntaxKind.ExpressionStatement;
expression: Expression;
}
- interface PrologueDirective extends ExpressionStatement {
- expression: StringLiteral;
- }
interface IfStatement extends Statement {
kind: SyntaxKind.IfStatement;
expression: Expression;
@@ -1944,6 +1103,7 @@ declare namespace ts {
}
interface ForOfStatement extends IterationStatement {
kind: SyntaxKind.ForOfStatement;
+ awaitModifier?: AwaitKeywordToken;
initializer: ForInitializer;
expression: Expression;
}
@@ -1973,15 +1133,18 @@ declare namespace ts {
}
interface CaseBlock extends Node {
kind: SyntaxKind.CaseBlock;
+ parent?: SwitchStatement;
clauses: NodeArray<CaseOrDefaultClause>;
}
interface CaseClause extends Node {
kind: SyntaxKind.CaseClause;
+ parent?: CaseBlock;
expression: Expression;
statements: NodeArray<Statement>;
}
interface DefaultClause extends Node {
kind: SyntaxKind.DefaultClause;
+ parent?: CaseBlock;
statements: NodeArray<Statement>;
}
type CaseOrDefaultClause = CaseClause | DefaultClause;
@@ -2002,6 +1165,7 @@ declare namespace ts {
}
interface CatchClause extends Node {
kind: SyntaxKind.CatchClause;
+ parent?: TryStatement;
variableDeclaration: VariableDeclaration;
block: Block;
}
@@ -2037,8 +1201,9 @@ declare namespace ts {
}
interface HeritageClause extends Node {
kind: SyntaxKind.HeritageClause;
- token: SyntaxKind;
- types?: NodeArray<ExpressionWithTypeArguments>;
+ parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression;
+ token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+ types: NodeArray<ExpressionWithTypeArguments>;
}
interface TypeAliasDeclaration extends DeclarationStatement {
kind: SyntaxKind.TypeAliasDeclaration;
@@ -2048,6 +1213,7 @@ declare namespace ts {
}
interface EnumMember extends Declaration {
kind: SyntaxKind.EnumMember;
+ parent?: EnumDeclaration;
name: PropertyName;
initializer?: Expression;
}
@@ -2056,91 +1222,114 @@ declare namespace ts {
name: Identifier;
members: NodeArray<EnumMember>;
}
- type ModuleBody = ModuleBlock | ModuleDeclaration;
type ModuleName = Identifier | StringLiteral;
+ type ModuleBody = NamespaceBody | JSDocNamespaceBody;
interface ModuleDeclaration extends DeclarationStatement {
kind: SyntaxKind.ModuleDeclaration;
- name: Identifier | StringLiteral;
- body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
+ parent?: ModuleBody | SourceFile;
+ name: ModuleName;
+ body?: ModuleBody | JSDocNamespaceDeclaration;
}
+ type NamespaceBody = ModuleBlock | NamespaceDeclaration;
interface NamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: ModuleBlock | NamespaceDeclaration;
+ body: NamespaceBody;
}
+ type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
interface JSDocNamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: JSDocNamespaceDeclaration | Identifier;
+ body: JSDocNamespaceBody;
}
interface ModuleBlock extends Node, Statement {
kind: SyntaxKind.ModuleBlock;
+ parent?: ModuleDeclaration;
statements: NodeArray<Statement>;
}
type ModuleReference = EntityName | ExternalModuleReference;
interface ImportEqualsDeclaration extends DeclarationStatement {
kind: SyntaxKind.ImportEqualsDeclaration;
+ parent?: SourceFile | ModuleBlock;
name: Identifier;
moduleReference: ModuleReference;
}
interface ExternalModuleReference extends Node {
kind: SyntaxKind.ExternalModuleReference;
+ parent?: ImportEqualsDeclaration;
expression?: Expression;
}
interface ImportDeclaration extends Statement {
kind: SyntaxKind.ImportDeclaration;
+ parent?: SourceFile | ModuleBlock;
importClause?: ImportClause;
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
interface ImportClause extends Declaration {
kind: SyntaxKind.ImportClause;
+ parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
interface NamespaceImport extends Declaration {
kind: SyntaxKind.NamespaceImport;
+ parent?: ImportClause;
name: Identifier;
}
interface NamespaceExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.NamespaceExportDeclaration;
name: Identifier;
- moduleReference: LiteralLikeNode;
}
interface ExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.ExportDeclaration;
+ parent?: SourceFile | ModuleBlock;
exportClause?: NamedExports;
moduleSpecifier?: Expression;
}
interface NamedImports extends Node {
kind: SyntaxKind.NamedImports;
+ parent?: ImportClause;
elements: NodeArray<ImportSpecifier>;
}
interface NamedExports extends Node {
kind: SyntaxKind.NamedExports;
+ parent?: ExportDeclaration;
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
interface ImportSpecifier extends Declaration {
kind: SyntaxKind.ImportSpecifier;
+ parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
interface ExportSpecifier extends Declaration {
kind: SyntaxKind.ExportSpecifier;
+ parent?: NamedExports;
propertyName?: Identifier;
name: Identifier;
}
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
interface ExportAssignment extends DeclarationStatement {
kind: SyntaxKind.ExportAssignment;
+ parent?: SourceFile;
isExportEquals?: boolean;
expression: Expression;
}
interface FileReference extends TextRange {
fileName: string;
}
+ interface CheckJsDirective extends TextRange {
+ enabled: boolean;
+ }
+ type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
interface CommentRange extends TextRange {
hasTrailingNewLine?: boolean;
- kind: SyntaxKind;
+ kind: CommentKind;
+ }
+ interface SynthesizedComment extends CommentRange {
+ text: string;
+ pos: -1;
+ end: -1;
}
interface JSDocTypeExpression extends Node {
kind: SyntaxKind.JSDocTypeExpression;
@@ -2281,9 +1470,21 @@ declare namespace ts {
ArrayMutation = 256,
Referenced = 512,
Shared = 1024,
+ PreFinally = 2048,
+ AfterFinally = 4096,
Label = 12,
Condition = 96,
}
+ interface FlowLock {
+ locked?: boolean;
+ }
+ interface AfterFinallyFlow extends FlowNode, FlowLock {
+ antecedent: FlowNode;
+ }
+ interface PreFinallyFlow extends FlowNode {
+ antecedent: FlowNode;
+ lock: FlowLock;
+ }
interface FlowNode {
flags: FlowFlags;
id?: number;
@@ -2326,7 +1527,6 @@ declare namespace ts {
statements: NodeArray<Statement>;
endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
fileName: string;
- path: Path;
text: string;
amdDependencies: AmdDependency[];
moduleName: string;
@@ -2334,27 +1534,12 @@ declare namespace ts {
typeReferenceDirectives: FileReference[];
languageVariant: LanguageVariant;
isDeclarationFile: boolean;
- renamedDependencies?: Map<string>;
hasNoDefaultLib: boolean;
languageVersion: ScriptTarget;
- scriptKind: ScriptKind;
- externalModuleIndicator: Node;
- commonJsModuleIndicator: Node;
- identifiers: Map<string>;
- nodeCount: number;
- identifierCount: number;
- symbolCount: number;
- parseDiagnostics: Diagnostic[];
- additionalSyntacticDiagnostics?: Diagnostic[];
- bindDiagnostics: Diagnostic[];
- lineMap: number[];
- classifiableNames?: Map<string>;
- resolvedModules: Map<ResolvedModuleFull>;
- resolvedTypeReferenceDirectiveNames: Map<ResolvedTypeReferenceDirective>;
- imports: LiteralExpression[];
- moduleAugmentations: LiteralExpression[];
- patternAmbientModules?: PatternAmbientModule[];
- ambientModuleNames: string[];
+ }
+ interface Bundle extends Node {
+ kind: SyntaxKind.Bundle;
+ sourceFiles: SourceFile[];
}
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
@@ -2380,25 +1565,17 @@ declare namespace ts {
interface Program extends ScriptReferenceHost {
getRootFileNames(): string[];
getSourceFiles(): SourceFile[];
- emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean): EmitResult;
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getTypeChecker(): TypeChecker;
- getCommonSourceDirectory(): string;
- getDiagnosticsProducingTypeChecker(): TypeChecker;
- dropDiagnosticsProducingTypeChecker(): void;
- getClassifiableNames(): Map<string>;
- getNodeCount(): number;
- getIdentifierCount(): number;
- getSymbolCount(): number;
- getTypeCount(): number;
- getFileProcessingDiagnostics(): DiagnosticCollection;
- getResolvedTypeReferenceDirectives(): Map<ResolvedTypeReferenceDirective>;
- isSourceFileFromExternalLibrary(file: SourceFile): boolean;
- structureIsReused?: boolean;
+ }
+ interface CustomTransformers {
+ before?: TransformerFactory<SourceFile>[];
+ after?: TransformerFactory<SourceFile>[];
}
interface SourceMapSpan {
emittedLine: number;
@@ -2429,24 +1606,23 @@ declare namespace ts {
emitSkipped: boolean;
diagnostics: Diagnostic[];
emittedFiles: string[];
- sourceMaps: SourceMapData[];
- }
- interface TypeCheckerHost {
- getCompilerOptions(): CompilerOptions;
- getSourceFiles(): SourceFile[];
- getSourceFile(fileName: string): SourceFile;
- getResolvedTypeReferenceDirectives(): Map<ResolvedTypeReferenceDirective>;
}
interface TypeChecker {
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
getPropertiesOfType(type: Type): Symbol[];
getPropertyOfType(type: Type, propertyName: string): Symbol;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
- getBaseTypes(type: InterfaceType): ObjectType[];
+ getBaseTypes(type: InterfaceType): BaseType[];
+ getBaseTypeOfLiteralType(type: Type): Type;
+ getWidenedType(type: Type): Type;
getReturnTypeOfSignature(signature: Signature): Type;
getNonNullableType(type: Type): Type;
+ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode;
+ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration;
+ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
@@ -2454,6 +1630,8 @@ declare namespace ts {
getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
getTypeAtLocation(node: Node): Type;
+ getTypeFromTypeNode(node: TypeNode): Type;
+ signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string;
getSymbolDisplayBuilder(): SymbolDisplayBuilder;
@@ -2471,24 +1649,27 @@ declare namespace ts {
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
- tryFindAmbientModuleWithoutAugmentations(moduleName: string): Symbol;
- getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
- getGlobalDiagnostics(): Diagnostic[];
- getEmitResolver(sourceFile?: SourceFile, cancellationToken?: CancellationToken): EmitResolver;
- getNodeCount(): number;
- getIdentifierCount(): number;
- getSymbolCount(): number;
- getTypeCount(): number;
+ getApparentType(type: Type): Type;
+ }
+ enum NodeBuilderFlags {
+ None = 0,
+ allowThisInObjectLiteral = 1,
+ allowQualifedNameInPlaceOfIdentifier = 2,
+ allowTypeParameterInQualifiedName = 4,
+ allowAnonymousIdentifier = 8,
+ allowEmptyUnionOrIntersection = 16,
+ allowEmptyTuple = 32,
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
+ buildIndexSignatureDisplay(info: IndexInfo, writer: SymbolWriter, kind: IndexKind, enclosingDeclaration?: Node, globalFlags?: TypeFormatFlags, symbolStack?: Symbol[]): void;
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@@ -2504,6 +1685,7 @@ declare namespace ts {
writeSpace(text: string): void;
writeStringLiteral(text: string): void;
writeParameter(text: string): void;
+ writeProperty(text: string): void;
writeSymbol(text: string, symbol: Symbol): void;
writeLine(): void;
increaseIndent(): void;
@@ -2511,6 +1693,7 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
+ reportIllegalExtends(): void;
}
const enum TypeFormatFlags {
None = 0,
@@ -2525,21 +1708,14 @@ declare namespace ts {
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
+ SuppressAnyReturnType = 2048,
+ AddUndefined = 4096,
}
const enum SymbolFormatFlags {
None = 0,
WriteTypeParametersOrArguments = 1,
UseOnlyExternalAliasing = 2,
}
- const enum SymbolAccessibility {
- Accessible = 0,
- NotAccessible = 1,
- CannotBeNamed = 2,
- }
- const enum SyntheticSymbolKind {
- UnionOrIntersection = 0,
- Spread = 1,
- }
const enum TypePredicateKind {
This = 0,
Identifier = 1,
@@ -2557,61 +1733,6 @@ declare namespace ts {
parameterIndex: number;
}
type TypePredicate = IdentifierTypePredicate | ThisTypePredicate;
- type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
- interface SymbolVisibilityResult {
- accessibility: SymbolAccessibility;
- aliasesToMakeVisible?: AnyImportSyntax[];
- errorSymbolName?: string;
- errorNode?: Node;
- }
- interface SymbolAccessibilityResult extends SymbolVisibilityResult {
- errorModuleName?: string;
- }
- enum TypeReferenceSerializationKind {
- Unknown = 0,
- TypeWithConstructSignatureAndValue = 1,
- VoidNullableOrNeverType = 2,
- NumberLikeType = 3,
- StringLikeType = 4,
- BooleanType = 5,
- ArrayLikeType = 6,
- ESSymbolType = 7,
- Promise = 8,
- TypeWithCallSignature = 9,
- ObjectType = 10,
- }
- interface EmitResolver {
- hasGlobalName(name: string): boolean;
- getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration;
- getReferencedImportDeclaration(node: Identifier): Declaration;
- getReferencedDeclarationWithCollidingName(node: Identifier): Declaration;
- isDeclarationWithCollidingName(node: Declaration): boolean;
- isValueAliasDeclaration(node: Node): boolean;
- isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
- isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
- getNodeCheckFlags(node: Node): NodeCheckFlags;
- isDeclarationVisible(node: Declaration): boolean;
- collectLinkedAliases(node: Identifier): Node[];
- isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
- writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
- writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
- writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
- writeBaseConstructorTypeOfClass(node: ClassLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
- isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult;
- isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult;
- getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
- getReferencedValueDeclaration(reference: Identifier): Declaration;
- getTypeReferenceSerializationKind(typeName: EntityName, location?: Node): TypeReferenceSerializationKind;
- isOptionalParameter(node: ParameterDeclaration): boolean;
- moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean;
- isArgumentsLocalBinding(node: Identifier): boolean;
- getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): SourceFile;
- getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): string[];
- getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): string[];
- isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean;
- writeLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, writer: SymbolWriter): void;
- getJsxFactoryEntity(): EntityName;
- }
const enum SymbolFlags {
None = 0,
FunctionScopedVariable = 1,
@@ -2638,13 +1759,10 @@ declare namespace ts {
ExportType = 2097152,
ExportNamespace = 4194304,
Alias = 8388608,
- Instantiated = 16777216,
- Merged = 33554432,
- Transient = 67108864,
- Prototype = 134217728,
- SyntheticProperty = 268435456,
- Optional = 536870912,
- ExportStar = 1073741824,
+ Prototype = 16777216,
+ ExportStar = 33554432,
+ Optional = 67108864,
+ Transient = 134217728,
Enum = 384,
Variable = 3,
Value = 107455,
@@ -2678,7 +1796,6 @@ declare namespace ts {
PropertyOrAccessor = 98308,
Export = 7340032,
ClassMember = 106500,
- Classifiable = 788448,
}
interface Symbol {
flags: SymbolFlags;
@@ -2688,86 +1805,8 @@ declare namespace ts {
members?: SymbolTable;
exports?: SymbolTable;
globalExports?: SymbolTable;
- isReadonly?: boolean;
- id?: number;
- mergeId?: number;
- parent?: Symbol;
- exportSymbol?: Symbol;
- constEnumOnlyModule?: boolean;
- isReferenced?: boolean;
- isReplaceableByMethod?: boolean;
- isAssigned?: boolean;
- }
- interface SymbolLinks {
- target?: Symbol;
- type?: Type;
- declaredType?: Type;
- typeParameters?: TypeParameter[];
- inferredClassType?: Type;
- instantiations?: Map<Type>;
- mapper?: TypeMapper;
- referenced?: boolean;
- containingType?: UnionOrIntersectionType;
- leftSpread?: Symbol;
- rightSpread?: Symbol;
- hasNonUniformType?: boolean;
- isPartial?: boolean;
- isDiscriminantProperty?: boolean;
- resolvedExports?: SymbolTable;
- exportsChecked?: boolean;
- isDeclarationWithCollidingName?: boolean;
- bindingElement?: BindingElement;
- exportsSomeValue?: boolean;
- }
- interface TransientSymbol extends Symbol, SymbolLinks {
}
type SymbolTable = Map<Symbol>;
- interface Pattern {
- prefix: string;
- suffix: string;
- }
- interface PatternAmbientModule {
- pattern: Pattern;
- symbol: Symbol;
- }
- const enum NodeCheckFlags {
- TypeChecked = 1,
- LexicalThis = 2,
- CaptureThis = 4,
- SuperInstance = 256,
- SuperStatic = 512,
- ContextChecked = 1024,
- AsyncMethodWithSuper = 2048,
- AsyncMethodWithSuperBinding = 4096,
- CaptureArguments = 8192,
- EnumValuesComputed = 16384,
- LexicalModuleMergesWithClass = 32768,
- LoopWithCapturedBlockScopedBinding = 65536,
- CapturedBlockScopedBinding = 131072,
- BlockScopedBindingInLoop = 262144,
- ClassWithBodyScopedClassBinding = 524288,
- BodyScopedClassBinding = 1048576,
- NeedsLoopOutParameter = 2097152,
- AssignmentsMarked = 4194304,
- ClassWithConstructorReference = 8388608,
- ConstructorReferenceInClass = 16777216,
- }
- interface NodeLinks {
- flags?: NodeCheckFlags;
- resolvedType?: Type;
- resolvedSignature?: Signature;
- resolvedSymbol?: Symbol;
- resolvedIndexInfo?: IndexInfo;
- maybeTypePredicate?: boolean;
- enumMemberValue?: number;
- isVisible?: boolean;
- hasReportedStatementInAmbientContext?: boolean;
- jsxFlags?: JsxFlags;
- resolvedJsxType?: Type;
- hasSuperCall?: boolean;
- superCall?: ExpressionStatement;
- switchTypes?: Type[];
- }
const enum TypeFlags {
Any = 1,
String = 2,
@@ -2789,48 +1828,36 @@ declare namespace ts {
Intersection = 131072,
Index = 262144,
IndexedAccess = 524288,
- FreshLiteral = 1048576,
- ContainsWideningType = 2097152,
- ContainsObjectLiteral = 4194304,
- ContainsAnyFunctionType = 8388608,
- Nullable = 6144,
+ NonPrimitive = 16777216,
Literal = 480,
StringOrNumberLiteral = 96,
- DefinitelyFalsy = 7392,
PossiblyFalsy = 7406,
- Intrinsic = 16015,
- Primitive = 8190,
StringLike = 262178,
NumberLike = 340,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
- StructuredOrTypeParameter = 507904,
- Narrowable = 1033215,
- NotUnionOrUnit = 33281,
- RequiresWidening = 6291456,
- PropagatingFlags = 14680064,
+ StructuredOrTypeVariable = 1032192,
+ TypeVariable = 540672,
+ Narrowable = 17810431,
+ NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
flags: TypeFlags;
- id: number;
symbol?: Symbol;
pattern?: DestructuringPattern;
aliasSymbol?: Symbol;
aliasTypeArguments?: Type[];
}
- interface IntrinsicType extends Type {
- intrinsicName: string;
- }
interface LiteralType extends Type {
text: string;
freshType?: LiteralType;
regularType?: LiteralType;
}
interface EnumType extends Type {
- memberTypes: Map<EnumLiteralType>;
+ memberTypes: EnumLiteralType[];
}
interface EnumLiteralType extends LiteralType {
baseType: EnumType & UnionType;
@@ -2856,9 +1883,8 @@ declare namespace ts {
outerTypeParameters: TypeParameter[];
localTypeParameters: TypeParameter[];
thisType: TypeParameter;
- resolvedBaseConstructorType?: Type;
- resolvedBaseTypes: ObjectType[];
}
+ type BaseType = ObjectType | IntersectionType;
interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
@@ -2871,62 +1897,32 @@ declare namespace ts {
typeArguments: Type[];
}
interface GenericType extends InterfaceType, TypeReference {
- instantiations: Map<TypeReference>;
}
interface UnionOrIntersectionType extends Type {
types: Type[];
- resolvedProperties: SymbolTable;
- couldContainTypeParameters: boolean;
}
interface UnionType extends UnionOrIntersectionType {
}
interface IntersectionType extends UnionOrIntersectionType {
}
type StructuredType = ObjectType | UnionType | IntersectionType;
- interface AnonymousType extends ObjectType {
- target?: AnonymousType;
- mapper?: TypeMapper;
- }
- interface MappedType extends ObjectType {
- declaration: MappedTypeNode;
- typeParameter?: TypeParameter;
- constraintType?: Type;
- templateType?: Type;
- mapper?: TypeMapper;
- }
interface EvolvingArrayType extends ObjectType {
elementType: Type;
finalArrayType?: Type;
}
- interface ResolvedType extends ObjectType, UnionOrIntersectionType {
- members: SymbolTable;
- properties: Symbol[];
- callSignatures: Signature[];
- constructSignatures: Signature[];
- stringIndexInfo?: IndexInfo;
- numberIndexInfo?: IndexInfo;
- }
- interface FreshObjectLiteralType extends ResolvedType {
- regularType: ResolvedType;
- }
- interface IterableOrIteratorType extends ObjectType, UnionType {
- iterableElementType?: Type;
- iteratorElementType?: Type;
+ interface TypeVariable extends Type {
}
- interface TypeParameter extends Type {
+ interface TypeParameter extends TypeVariable {
constraint: Type;
- target?: TypeParameter;
- mapper?: TypeMapper;
- resolvedApparentType: Type;
- resolvedIndexType: IndexType;
- isThisType?: boolean;
+ default?: Type;
}
- interface IndexType extends Type {
- type: TypeParameter;
- }
- interface IndexedAccessType extends Type {
+ interface IndexedAccessType extends TypeVariable {
objectType: Type;
indexType: Type;
+ constraint?: Type;
+ }
+ interface IndexType extends Type {
+ type: TypeVariable | UnionOrIntersectionType;
}
const enum SignatureKind {
Call = 0,
@@ -2936,18 +1932,6 @@ declare namespace ts {
declaration: SignatureDeclaration;
typeParameters: TypeParameter[];
parameters: Symbol[];
- thisParameter?: Symbol;
- resolvedReturnType: Type;
- minArgumentCount: number;
- hasRestParameter: boolean;
- hasLiteralTypes: boolean;
- target?: Signature;
- mapper?: TypeMapper;
- unionSignatures?: Signature[];
- erasedSignatureCache?: Signature;
- isolatedSignatureType?: ObjectType;
- typePredicate?: TypePredicate;
- instantiations?: Map<Signature>;
}
const enum IndexKind {
String = 0,
@@ -2958,32 +1942,9 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
- interface TypeMapper {
- (t: TypeParameter): Type;
- mappedTypes?: Type[];
- instantiations?: Type[];
- context?: InferenceContext;
- }
- interface TypeInferences {
- primary: Type[];
- secondary: Type[];
- topLevel: boolean;
- isFixed: boolean;
- }
- interface InferenceContext {
- signature: Signature;
- inferUnionTypes: boolean;
- inferences: TypeInferences[];
- inferredTypes: Type[];
- mapper?: TypeMapper;
- failedTypeParameterIndex?: number;
- }
- const enum SpecialPropertyAssignmentKind {
- None = 0,
- ExportsProperty = 1,
- ModuleExports = 2,
- PrototypeProperty = 3,
- ThisProperty = 4,
+ interface JsFileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
}
interface DiagnosticMessage {
key: string;
@@ -3014,36 +1975,33 @@ declare namespace ts {
Classic = 1,
NodeJs = 2,
}
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]>;
+ interface PluginImport {
+ name: string;
+ }
+ type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[];
interface CompilerOptions {
allowJs?: boolean;
- allowNonTsExtensions?: boolean;
allowSyntheticDefaultImports?: boolean;
allowUnreachableCode?: boolean;
allowUnusedLabels?: boolean;
alwaysStrict?: boolean;
baseUrl?: string;
charset?: string;
- configFilePath?: string;
+ checkJs?: boolean;
declaration?: boolean;
declarationDir?: string;
- diagnostics?: boolean;
- extendedDiagnostics?: boolean;
disableSizeLimit?: boolean;
+ downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
- help?: boolean;
importHelpers?: boolean;
- init?: boolean;
inlineSourceMap?: boolean;
inlineSources?: boolean;
isolatedModules?: boolean;
jsx?: JsxEmit;
lib?: string[];
- listEmittedFiles?: boolean;
- listFiles?: boolean;
locale?: string;
mapRoot?: string;
maxNodeModuleJsDepth?: number;
@@ -3051,7 +2009,6 @@ declare namespace ts {
moduleResolution?: ModuleResolutionKind;
newLine?: NewLineKind;
noEmit?: boolean;
- noEmitForJsFiles?: boolean;
noEmitHelpers?: boolean;
noEmitOnError?: boolean;
noErrorTruncation?: boolean;
@@ -3070,7 +2027,6 @@ declare namespace ts {
paths?: MapLike<string[]>;
preserveConstEnums?: boolean;
project?: string;
- pretty?: DiagnosticStyle;
reactNamespace?: string;
jsxFactory?: string;
removeComments?: boolean;
@@ -3080,17 +2036,14 @@ declare namespace ts {
skipDefaultLibCheck?: boolean;
sourceMap?: boolean;
sourceRoot?: string;
+ strict?: boolean;
strictNullChecks?: boolean;
- stripInternal?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
- suppressOutputPathCheck?: boolean;
target?: ScriptTarget;
traceResolution?: boolean;
types?: string[];
typeRoots?: string[];
- version?: boolean;
- watch?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
interface TypeAcquisition {
@@ -3121,6 +2074,7 @@ declare namespace ts {
None = 0,
Preserve = 1,
React = 2,
+ ReactNative = 3,
}
const enum NewLineKind {
CarriageReturnLineFeed = 0,
@@ -3136,6 +2090,7 @@ declare namespace ts {
JSX = 2,
TS = 3,
TSX = 4,
+ External = 5,
}
const enum ScriptTarget {
ES3 = 0,
@@ -3150,10 +2105,6 @@ declare namespace ts {
Standard = 0,
JSX = 1,
}
- const enum DiagnosticStyle {
- Simple = 0,
- Pretty = 1,
- }
interface ParsedCommandLine {
options: CompilerOptions;
typeAcquisition?: TypeAcquisition;
@@ -3171,156 +2122,6 @@ declare namespace ts {
fileNames: string[];
wildcardDirectories: MapLike<WatchDirectoryFlags>;
}
- interface CommandLineOptionBase {
- name: string;
- type: "string" | "number" | "boolean" | "object" | "list" | Map<number | string>;
- isFilePath?: boolean;
- shortName?: string;
- description?: DiagnosticMessage;
- paramType?: DiagnosticMessage;
- experimental?: boolean;
- isTSConfigOnly?: boolean;
- }
- interface CommandLineOptionOfPrimitiveType extends CommandLineOptionBase {
- type: "string" | "number" | "boolean";
- }
- interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
- type: Map<number | string>;
- }
- interface TsConfigOnlyOption extends CommandLineOptionBase {
- type: "object";
- }
- interface CommandLineOptionOfListType extends CommandLineOptionBase {
- type: "list";
- element: CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType;
- }
- type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption | CommandLineOptionOfListType;
- const enum CharacterCodes {
- nullCharacter = 0,
- maxAsciiCharacter = 127,
- lineFeed = 10,
- carriageReturn = 13,
- lineSeparator = 8232,
- paragraphSeparator = 8233,
- nextLine = 133,
- space = 32,
- nonBreakingSpace = 160,
- enQuad = 8192,
- emQuad = 8193,
- enSpace = 8194,
- emSpace = 8195,
- threePerEmSpace = 8196,
- fourPerEmSpace = 8197,
- sixPerEmSpace = 8198,
- figureSpace = 8199,
- punctuationSpace = 8200,
- thinSpace = 8201,
- hairSpace = 8202,
- zeroWidthSpace = 8203,
- narrowNoBreakSpace = 8239,
- ideographicSpace = 12288,
- mathematicalSpace = 8287,
- ogham = 5760,
- _ = 95,
- $ = 36,
- _0 = 48,
- _1 = 49,
- _2 = 50,
- _3 = 51,
- _4 = 52,
- _5 = 53,
- _6 = 54,
- _7 = 55,
- _8 = 56,
- _9 = 57,
- a = 97,
- b = 98,
- c = 99,
- d = 100,
- e = 101,
- f = 102,
- g = 103,
- h = 104,
- i = 105,
- j = 106,
- k = 107,
- l = 108,
- m = 109,
- n = 110,
- o = 111,
- p = 112,
- q = 113,
- r = 114,
- s = 115,
- t = 116,
- u = 117,
- v = 118,
- w = 119,
- x = 120,
- y = 121,
- z = 122,
- A = 65,
- B = 66,
- C = 67,
- D = 68,
- E = 69,
- F = 70,
- G = 71,
- H = 72,
- I = 73,
- J = 74,
- K = 75,
- L = 76,
- M = 77,
- N = 78,
- O = 79,
- P = 80,
- Q = 81,
- R = 82,
- S = 83,
- T = 84,
- U = 85,
- V = 86,
- W = 87,
- X = 88,
- Y = 89,
- Z = 90,
- ampersand = 38,
- asterisk = 42,
- at = 64,
- backslash = 92,
- backtick = 96,
- bar = 124,
- caret = 94,
- closeBrace = 125,
- closeBracket = 93,
- closeParen = 41,
- colon = 58,
- comma = 44,
- dot = 46,
- doubleQuote = 34,
- equals = 61,
- exclamation = 33,
- greaterThan = 62,
- hash = 35,
- lessThan = 60,
- minus = 45,
- openBrace = 123,
- openBracket = 91,
- openParen = 40,
- percent = 37,
- plus = 43,
- question = 63,
- semicolon = 59,
- singleQuote = 39,
- slash = 47,
- tilde = 126,
- backspace = 8,
- formFeed = 12,
- byteOrderMark = 65279,
- tab = 9,
- verticalTab = 11,
- }
interface ModuleResolutionHost {
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
@@ -3347,7 +2148,6 @@ declare namespace ts {
}
interface ResolvedModuleWithFailedLookupLocations {
resolvedModule: ResolvedModuleFull | undefined;
- failedLookupLocations: string[];
}
interface ResolvedTypeReferenceDirective {
primary: boolean;
@@ -3373,72 +2173,6 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
- const enum TransformFlags {
- None = 0,
- TypeScript = 1,
- ContainsTypeScript = 2,
- ContainsJsx = 4,
- ContainsESNext = 8,
- ContainsES2017 = 16,
- ContainsES2016 = 32,
- ES2015 = 64,
- ContainsES2015 = 128,
- Generator = 256,
- ContainsGenerator = 512,
- DestructuringAssignment = 1024,
- ContainsDestructuringAssignment = 2048,
- ContainsDecorators = 4096,
- ContainsPropertyInitializer = 8192,
- ContainsLexicalThis = 16384,
- ContainsCapturedLexicalThis = 32768,
- ContainsLexicalThisInComputedPropertyName = 65536,
- ContainsDefaultValueAssignments = 131072,
- ContainsParameterPropertyAssignments = 262144,
- ContainsSpread = 524288,
- ContainsObjectSpread = 1048576,
- ContainsRest = 524288,
- ContainsObjectRest = 1048576,
- ContainsComputedPropertyName = 2097152,
- ContainsBlockScopedBinding = 4194304,
- ContainsBindingPattern = 8388608,
- ContainsYield = 16777216,
- ContainsHoistedDeclarationOrCompletion = 33554432,
- HasComputedFlags = 536870912,
- AssertTypeScript = 3,
- AssertJsx = 4,
- AssertESNext = 8,
- AssertES2017 = 16,
- AssertES2016 = 32,
- AssertES2015 = 192,
- AssertGenerator = 768,
- AssertDestructuringAssignment = 3072,
- NodeExcludes = 536872257,
- ArrowFunctionExcludes = 601249089,
- FunctionExcludes = 601281857,
- ConstructorExcludes = 601015617,
- MethodOrAccessorExcludes = 601015617,
- ClassExcludes = 539358529,
- ModuleExcludes = 574674241,
- TypeExcludes = -3,
- ObjectLiteralExcludes = 540087617,
- ArrayLiteralOrCallOrNewExcludes = 537396545,
- VariableDeclarationListExcludes = 546309441,
- ParameterExcludes = 536872257,
- CatchClauseExcludes = 537920833,
- BindingPatternExcludes = 537396545,
- TypeScriptClassSyntaxMask = 274432,
- ES2015FunctionSyntaxMask = 163840,
- }
- interface EmitNode {
- annotatedNodes?: Node[];
- flags?: EmitFlags;
- commentRange?: TextRange;
- sourceMapRange?: TextRange;
- tokenSourceMapRanges?: Map<TextRange>;
- constantValue?: number;
- externalHelpersModuleName?: Identifier;
- helpers?: EmitHelper[];
- }
const enum EmitFlags {
SingleLine = 1,
AdviseOnEmitNode = 2,
@@ -3465,6 +2199,7 @@ declare namespace ts {
CustomPrologue = 524288,
NoHoisting = 1048576,
HasEndOfDeclarationMarker = 2097152,
+ Iterator = 4194304,
}
interface EmitHelper {
readonly name: string;
@@ -3472,25 +2207,14 @@ declare namespace ts {
readonly text: string;
readonly priority?: number;
}
- const enum EmitContext {
+ const enum EmitHint {
SourceFile = 0,
Expression = 1,
IdentifierName = 2,
Unspecified = 3,
}
- interface EmitHost extends ScriptReferenceHost {
- getSourceFiles(): SourceFile[];
- isSourceFileFromExternalLibrary(file: SourceFile): boolean;
- getCommonSourceDirectory(): string;
- getCanonicalFileName(fileName: string): string;
- getNewLine(): string;
- isEmitBlocked(emitFileName: string): boolean;
- writeFile: WriteFileCallback;
- }
interface TransformationContext {
getCompilerOptions(): CompilerOptions;
- getEmitResolver(): EmitResolver;
- getEmitHost(): EmitHost;
startLexicalEnvironment(): void;
suspendLexicalEnvironment(): void;
resumeLexicalEnvironment(): void;
@@ -3501,17 +2225,36 @@ declare namespace ts {
readEmitHelpers(): EmitHelper[] | undefined;
enableSubstitution(kind: SyntaxKind): void;
isSubstitutionEnabled(node: Node): boolean;
- onSubstituteNode?: (emitContext: EmitContext, node: Node) => Node;
+ onSubstituteNode: (hint: EmitHint, node: Node) => Node;
enableEmitNotification(kind: SyntaxKind): void;
isEmitNotificationEnabled(node: Node): boolean;
- onEmitNode?: (emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void) => void;
+ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
}
- interface TransformationResult {
- transformed: SourceFile[];
- emitNodeWithSubstitution(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
- emitNodeWithNotification(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
+ interface TransformationResult<T extends Node> {
+ transformed: T[];
+ diagnostics?: Diagnostic[];
+ substituteNode(hint: EmitHint, node: Node): Node;
+ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ dispose(): void;
+ }
+ type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
+ type Transformer<T extends Node> = (node: T) => T;
+ type Visitor = (node: Node) => VisitResult<Node>;
+ type VisitResult<T extends Node> = T | T[];
+ interface Printer {
+ printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
+ printFile(sourceFile: SourceFile): string;
+ printBundle(bundle: Bundle): string;
+ }
+ interface PrintHandlers {
+ hasGlobalName?(name: string): boolean;
+ onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ substituteNode?(hint: EmitHint, node: Node): Node;
+ }
+ interface PrinterOptions {
+ removeComments?: boolean;
+ newLine?: NewLineKind;
}
- type Transformer = (context: TransformationContext) => (node: SourceFile) => SourceFile;
interface TextSpan {
start: number;
length: number;
@@ -3520,236 +2263,15 @@ declare namespace ts {
span: TextSpan;
newLength: number;
}
- interface DiagnosticCollection {
- add(diagnostic: Diagnostic): void;
- getGlobalDiagnostics(): Diagnostic[];
- getDiagnostics(fileName?: string): Diagnostic[];
- getModificationCount(): number;
- reattachFileDiagnostics(newFile: SourceFile): void;
- }
interface SyntaxList extends Node {
_children: Node[];
}
}
declare namespace ts {
- const timestamp: () => number;
-}
-declare namespace ts.performance {
- function mark(markName: string): void;
- function measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
- function getCount(markName: string): number;
- function getDuration(measureName: string): number;
- function forEachMeasure(cb: (measureName: string, duration: number) => void): void;
- function enable(): void;
- function disable(): void;
-}
-declare namespace ts {
- const version = "2.2.0-dev.20161127";
-}
-declare namespace ts {
- const enum Ternary {
- False = 0,
- Maybe = 1,
- True = -1,
- }
- const collator: {
- compare(a: string, b: string): number;
- };
- function createMap<T>(template?: MapLike<T>): Map<T>;
- function createFileMap<T>(keyMapper?: (key: string) => string): FileMap<T>;
- function toPath(fileName: string, basePath: string, getCanonicalFileName: (path: string) => string): Path;
- const enum Comparison {
- LessThan = -1,
- EqualTo = 0,
- GreaterThan = 1,
- }
- function forEach<T, U>(array: T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined;
- function zipWith<T, U>(arrayA: T[], arrayB: U[], callback: (a: T, b: U, index: number) => void): void;
- function every<T>(array: T[], callback: (element: T, index: number) => boolean): boolean;
- function find<T>(array: T[], predicate: (element: T, index: number) => boolean): T | undefined;
- function findMap<T, U>(array: T[], callback: (element: T, index: number) => U | undefined): U;
- function contains<T>(array: T[], value: T): boolean;
- function indexOf<T>(array: T[], value: T): number;
- function indexOfAnyCharCode(text: string, charCodes: number[], start?: number): number;
- function countWhere<T>(array: T[], predicate: (x: T, i: number) => boolean): number;
- function filter<T, U extends T>(array: T[], f: (x: T) => x is U): U[];
- function filter<T>(array: T[], f: (x: T) => boolean): T[];
- function removeWhere<T>(array: T[], f: (x: T) => boolean): boolean;
- function filterMutate<T>(array: T[], f: (x: T) => boolean): void;
- function map<T, U>(array: T[], f: (x: T, i: number) => U): U[];
- function sameMap<T>(array: T[], f: (x: T, i: number) => T): T[];
- function flatten<T>(array: (T | T[])[]): T[];
- function flatMap<T, U>(array: T[], mapfn: (x: T, i: number) => U | U[]): U[];
- function span<T>(array: T[], f: (x: T, i: number) => boolean): [T[], T[]];
- function spanMap<T, K, U>(array: T[], keyfn: (x: T, i: number) => K, mapfn: (chunk: T[], key: K, start: number, end: number) => U): U[];
- function mapObject<T, U>(object: MapLike<T>, f: (key: string, x: T) => [string, U]): MapLike<U>;
- function some<T>(array: T[], predicate?: (value: T) => boolean): boolean;
- function concatenate<T>(array1: T[], array2: T[]): T[];
- function deduplicate<T>(array: T[], areEqual?: (a: T, b: T) => boolean): T[];
- function arrayIsEqualTo<T>(array1: ReadonlyArray<T>, array2: ReadonlyArray<T>, equaler?: (a: T, b: T) => boolean): boolean;
- function changesAffectModuleResolution(oldOptions: CompilerOptions, newOptions: CompilerOptions): boolean;
- function compact<T>(array: T[]): T[];
- function relativeComplement<T>(arrayA: T[] | undefined, arrayB: T[] | undefined, comparer?: (x: T, y: T) => Comparison, offsetA?: number, offsetB?: number): T[] | undefined;
- function sum(array: any[], prop: string): number;
- function append<T>(to: T[] | undefined, value: T | undefined): T[] | undefined;
- function addRange<T>(to: T[] | undefined, from: T[] | undefined): T[] | undefined;
- function stableSort<T>(array: T[], comparer?: (x: T, y: T) => Comparison): T[];
- function rangeEquals<T>(array1: T[], array2: T[], pos: number, end: number): boolean;
- function firstOrUndefined<T>(array: T[]): T;
- function lastOrUndefined<T>(array: T[]): T;
- function singleOrUndefined<T>(array: T[]): T;
- function singleOrMany<T>(array: T[]): T | T[];
- function replaceElement<T>(array: T[], index: number, value: T): T[];
- function binarySearch<T>(array: T[], value: T, comparer?: (v1: T, v2: T) => number, offset?: number): number;
- function reduceLeft<T, U>(array: T[], f: (memo: U, value: T, i: number) => U, initial: U, start?: number, count?: number): U;
- function reduceLeft<T>(array: T[], f: (memo: T, value: T, i: number) => T): T;
- function reduceRight<T, U>(array: T[], f: (memo: U, value: T, i: number) => U, initial: U, start?: number, count?: number): U;
- function reduceRight<T>(array: T[], f: (memo: T, value: T, i: number) => T): T;
- function hasProperty<T>(map: MapLike<T>, key: string): boolean;
- function getProperty<T>(map: MapLike<T>, key: string): T | undefined;
- function getOwnKeys<T>(map: MapLike<T>): string[];
- function forEachProperty<T, U>(map: Map<T>, callback: (value: T, key: string) => U): U;
- function someProperties<T>(map: Map<T>, predicate?: (value: T, key: string) => boolean): boolean;
- function copyProperties<T>(source: Map<T>, target: MapLike<T>): void;
- function appendProperty<T>(map: Map<T>, key: string | number, value: T): Map<T>;
- function assign<T1 extends MapLike<{}>, T2, T3>(t: T1, arg1: T2, arg2: T3): T1 & T2 & T3;
- function assign<T1 extends MapLike<{}>, T2>(t: T1, arg1: T2): T1 & T2;
- function assign<T1 extends MapLike<{}>>(t: T1, ...args: any[]): any;
- function reduceProperties<T, U>(map: Map<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
- function reduceOwnProperties<T, U>(map: MapLike<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
- function equalOwnProperties<T>(left: MapLike<T>, right: MapLike<T>, equalityComparer?: (left: T, right: T) => boolean): boolean;
- function arrayToMap<T>(array: T[], makeKey: (value: T) => string): Map<T>;
- function arrayToMap<T, U>(array: T[], makeKey: (value: T) => string, makeValue: (value: T) => U): Map<U>;
- function isEmpty<T>(map: Map<T>): boolean;
- function cloneMap<T>(map: Map<T>): Map<T>;
- function clone<T>(object: T): T;
- function extend<T1, T2>(first: T1, second: T2): T1 & T2;
- function multiMapAdd<V>(map: Map<V[]>, key: string | number, value: V): V[];
- function multiMapRemove<V>(map: Map<V[]>, key: string, value: V): void;
- function isArray(value: any): value is any[];
- function noop(): void;
- function notImplemented(): never;
- function memoize<T>(callback: () => T): () => T;
- function chain<T, U>(...args: ((t: T) => (u: U) => U)[]): (t: T) => (u: U) => U;
- function compose<T>(...args: ((t: T) => T)[]): (t: T) => T;
- let localizedDiagnosticMessages: Map<string>;
- function getLocaleSpecificMessage(message: DiagnosticMessage): string;
- function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number)[]): Diagnostic;
- function formatMessage(_dummy: any, message: DiagnosticMessage): string;
- function createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number)[]): Diagnostic;
- function createCompilerDiagnosticFromMessageChain(chain: DiagnosticMessageChain): Diagnostic;
- function chainDiagnosticMessages(details: DiagnosticMessageChain, message: DiagnosticMessage, ...args: any[]): DiagnosticMessageChain;
- function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain;
- function compareValues<T>(a: T, b: T): Comparison;
- function compareStrings(a: string, b: string, ignoreCase?: boolean): Comparison;
- function compareStringsCaseInsensitive(a: string, b: string): Comparison;
- function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison;
- function sortAndDeduplicateDiagnostics(diagnostics: Diagnostic[]): Diagnostic[];
- function deduplicateSortedDiagnostics(diagnostics: Diagnostic[]): Diagnostic[];
- function normalizeSlashes(path: string): string;
- function getRootLength(path: string): number;
- const directorySeparator = "/";
- function normalizePath(path: string): string;
- function pathEndsWithDirectorySeparator(path: string): boolean;
- function getDirectoryPath(path: Path): Path;
- function getDirectoryPath(path: string): string;
- function isUrl(path: string): boolean;
- function isExternalModuleNameRelative(moduleName: string): boolean;
- function getEmitScriptTarget(compilerOptions: CompilerOptions): ScriptTarget;
- function getEmitModuleKind(compilerOptions: CompilerOptions): ModuleKind;
- function getEmitModuleResolutionKind(compilerOptions: CompilerOptions): ModuleResolutionKind;
- function hasZeroOrOneAsteriskCharacter(str: string): boolean;
- function isRootedDiskPath(path: string): boolean;
- function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string;
- function getNormalizedPathComponents(path: string, currentDirectory: string): string[];
- function getNormalizedAbsolutePath(fileName: string, currentDirectory: string): string;
- function getNormalizedPathFromPathComponents(pathComponents: string[]): string;
- function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: (fileName: string) => string, isAbsolutePathAnUrl: boolean): string;
- function getBaseFileName(path: string): string;
- function combinePaths(path1: string, path2: string): string;
- function removeTrailingDirectorySeparator(path: string): string;
- function ensureTrailingDirectorySeparator(path: string): string;
- function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison;
- function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean;
- function startsWith(str: string, prefix: string): boolean;
- function endsWith(str: string, suffix: string): boolean;
- function hasExtension(fileName: string): boolean;
- function fileExtensionIs(path: string, extension: string): boolean;
- function fileExtensionIsAny(path: string, extensions: string[]): boolean;
- function getRegularExpressionForWildcard(specs: string[], basePath: string, usage: "files" | "directories" | "exclude"): string;
- function isImplicitGlob(lastPathComponent: string): boolean;
- interface FileSystemEntries {
- files: string[];
- directories: string[];
- }
- interface FileMatcherPatterns {
- includeFilePattern: string;
- includeDirectoryPattern: string;
- excludePattern: string;
- basePaths: string[];
- }
- function getFileMatcherPatterns(path: string, excludes: string[], includes: string[], useCaseSensitiveFileNames: boolean, currentDirectory: string): FileMatcherPatterns;
- function matchFiles(path: string, extensions: string[], excludes: string[], includes: string[], useCaseSensitiveFileNames: boolean, currentDirectory: string, getFileSystemEntries: (path: string) => FileSystemEntries): string[];
- function ensureScriptKind(fileName: string, scriptKind?: ScriptKind): ScriptKind;
- function getScriptKindFromFileName(fileName: string): ScriptKind;
- const supportedTypeScriptExtensions: string[];
- const supportedTypescriptExtensionsForExtractExtension: string[];
- const supportedJavascriptExtensions: string[];
- function getSupportedExtensions(options?: CompilerOptions): string[];
- function hasJavaScriptFileExtension(fileName: string): boolean;
- function hasTypeScriptFileExtension(fileName: string): boolean;
- function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions): boolean;
- const enum ExtensionPriority {
- TypeScriptFiles = 0,
- DeclarationAndJavaScriptFiles = 2,
- Limit = 5,
- Highest = 0,
- Lowest = 2,
- }
- function getExtensionPriority(path: string, supportedExtensions: string[]): ExtensionPriority;
- function adjustExtensionPriority(extensionPriority: ExtensionPriority): ExtensionPriority;
- function getNextLowestExtensionPriority(extensionPriority: ExtensionPriority): ExtensionPriority;
- function removeFileExtension(path: string): string;
- function tryRemoveExtension(path: string, extension: string): string | undefined;
- function removeExtension(path: string, extension: string): string;
- function changeExtension<T extends string | Path>(path: T, newExtension: string): T;
- interface ObjectAllocator {
- getNodeConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Node;
- getTokenConstructor(): new <TKind extends SyntaxKind>(kind: TKind, pos?: number, end?: number) => Token<TKind>;
- getIdentifierConstructor(): new (kind: SyntaxKind.Identifier, pos?: number, end?: number) => Identifier;
- getSourceFileConstructor(): new (kind: SyntaxKind.SourceFile, pos?: number, end?: number) => SourceFile;
- getSymbolConstructor(): new (flags: SymbolFlags, name: string) => Symbol;
- getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type;
- getSignatureConstructor(): new (checker: TypeChecker) => Signature;
- }
- let objectAllocator: ObjectAllocator;
- const enum AssertionLevel {
- None = 0,
- Normal = 1,
- Aggressive = 2,
- VeryAggressive = 3,
- }
- namespace Debug {
- let currentAssertionLevel: AssertionLevel;
- function shouldAssert(level: AssertionLevel): boolean;
- function assert(expression: boolean, message?: string, verboseDebugInfo?: () => string): void;
- function fail(message?: string): void;
- }
- function orderedRemoveItem<T>(array: T[], item: T): boolean;
- function orderedRemoveItemAt<T>(array: T[], index: number): void;
- function unorderedRemoveItemAt<T>(array: T[], index: number): void;
- function unorderedRemoveItem<T>(array: T[], item: T): void;
- function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): (fileName: string) => string;
- function matchPatternOrExact(patternStrings: string[], candidate: string): string | Pattern | undefined;
- function patternText({prefix, suffix}: Pattern): string;
- function matchedText(pattern: Pattern, candidate: string): string;
- function findBestPatternMatch<T>(values: T[], getPattern: (value: T) => Pattern, candidate: string): T | undefined;
- function tryParsePattern(pattern: string): Pattern | undefined;
- function positionIsSynthesized(pos: number): boolean;
- function extensionIsTypeScript(ext: Extension): boolean;
- function extensionFromPath(path: string): Extension;
- function tryGetExtensionFromPath(path: string): Extension | undefined;
+ const version = "2.3.0-dev.20170419";
}
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
+declare function clearTimeout(handle: any): void;
declare namespace ts {
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
type DirectoryWatcherCallback = (fileName: string) => void;
@@ -3781,8 +2303,6 @@ declare namespace ts {
getMemoryUsage?(): number;
exit(exitCode?: number): void;
realpath?(path: string): string;
- getEnvironmentVariable(name: string): string;
- tryEnableSourceMapsForHost?(): void;
setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
clearTimeout?(timeoutId: any): void;
}
@@ -3793,4829 +2313,13 @@ declare namespace ts {
directoryName: string;
referenceCount: number;
}
+ function getNodeMajorVersion(): number;
let sys: System;
}
declare namespace ts {
- const Diagnostics: {
- Unterminated_string_literal: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Identifier_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_file_cannot_have_a_reference_to_itself: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Trailing_comma_not_allowed: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Asterisk_Slash_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unexpected_token: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_parameter_must_be_last_in_a_parameter_list: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_cannot_have_question_mark_and_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_required_parameter_cannot_follow_an_optional_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_cannot_have_a_rest_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_parameter_cannot_have_an_accessibility_modifier: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_parameter_cannot_have_a_question_mark: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_parameter_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_must_have_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_parameter_must_have_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_parameter_type_must_be_string_or_number: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Accessibility_modifier_already_seen: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_must_precede_1_modifier: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_already_seen: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_class_element: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_must_be_followed_by_an_argument_list_or_member_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_ambient_modules_can_use_quoted_names: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Statements_are_not_allowed_in_ambient_contexts: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_declare_modifier_cannot_be_used_in_an_already_ambient_context: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Initializers_are_not_allowed_in_ambient_contexts: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_be_used_in_an_ambient_context: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_be_used_with_a_class_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_be_used_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_data_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_module_or_namespace_element: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_0_modifier_cannot_be_used_with_an_interface_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_parameter_cannot_be_optional: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_parameter_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_set_accessor_must_have_exactly_one_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_set_accessor_cannot_have_an_optional_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_set_accessor_parameter_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_set_accessor_cannot_have_rest_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_get_accessor_cannot_have_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_async_function_or_method_must_have_a_valid_awaitable_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Operand_for_await_does_not_have_a_valid_callable_then_member: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enum_member_must_have_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_assignment_cannot_be_used_in_a_namespace: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- In_ambient_enum_declarations_member_initializer_must_be_constant_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unexpected_token_A_constructor_method_accessor_or_property_was_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_type_member: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_an_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_0_modifier_cannot_be_used_with_an_import_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_reference_directive_syntax: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_accessor_cannot_be_declared_in_an_ambient_context: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_constructor_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_appear_on_a_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameters_cannot_appear_on_a_constructor_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_annotation_cannot_appear_on_a_constructor_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_accessor_cannot_have_type_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_set_accessor_cannot_have_a_return_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_signature_must_have_exactly_one_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_list_cannot_be_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_list_cannot_be_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_argument_list_cannot_be_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_use_of_0_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- with_statements_are_not_allowed_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- delete_cannot_be_called_on_an_identifier_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Jump_target_cannot_cross_function_boundary: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_return_statement_can_only_be_used_within_a_function_body: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_label_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_object_literal_cannot_have_property_and_accessor_with_the_same_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_assignment_cannot_have_modifiers: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Octal_literals_are_not_allowed_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_tuple_type_element_list_cannot_be_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Variable_declaration_list_cannot_be_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Digit_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Hexadecimal_digit_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unexpected_end_of_text: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_character: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Declaration_or_statement_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Statement_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- case_or_default_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_or_signature_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enum_member_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Variable_declaration_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Argument_expression_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_assignment_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_or_comma_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_declaration_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_declaration_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_argument_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- String_literal_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Line_break_not_permitted_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- or_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Declaration_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_declarations_in_a_namespace_cannot_reference_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- const_declarations_must_be_initialized: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- const_declarations_can_only_be_declared_inside_a_block: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- let_declarations_can_only_be_declared_inside_a_block: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unterminated_template_literal: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unterminated_regular_expression_literal: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_object_member_cannot_be_declared_optional: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_yield_expression_is_only_allowed_in_a_generator_body: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Computed_property_names_are_not_allowed_in_enums: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_comma_expression_is_not_allowed_in_a_computed_property_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- extends_clause_already_seen: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- extends_clause_must_precede_implements_clause: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Classes_can_only_extend_a_single_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- implements_clause_already_seen: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Interface_declaration_cannot_have_implements_clause: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Binary_digit_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Octal_digit_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unexpected_token_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_destructuring_pattern_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Array_element_destructuring_pattern_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_destructuring_declaration_must_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_implementation_cannot_be_declared_in_ambient_contexts: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Modifiers_cannot_appear_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Merge_conflict_marker_encountered: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_element_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_parameter_property_may_not_be_declared_using_a_binding_pattern: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_import_declaration_cannot_have_modifiers: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_has_no_default_export: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_declaration_cannot_have_modifiers: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Export_declarations_are_not_permitted_in_a_namespace: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Catch_clause_variable_cannot_have_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Catch_clause_variable_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unterminated_Unicode_escape_sequence: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Line_terminator_not_permitted_before_arrow: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Decorators_are_not_valid_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_declaration_without_the_default_modifier_must_have_a_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_use_of_0_Modules_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Export_assignment_is_not_supported_when_module_flag_is_system: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generators_are_not_allowed_in_an_ambient_context: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_overload_signature_cannot_be_declared_as_a_generator: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_tag_already_specified: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Signature_0_must_have_a_type_predicate: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_parameter_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_predicate_0_is_not_assignable_to_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_is_not_in_the_same_position_as_parameter_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_predicate_cannot_reference_a_rest_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_assignment_can_only_be_used_in_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_import_declaration_can_only_be_used_in_a_namespace_or_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_declaration_can_only_be_used_in_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_modifier_cannot_be_used_with_1_modifier: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Abstract_methods_can_only_appear_within_an_abstract_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_interface_property_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_literal_property_cannot_have_an_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_member_cannot_have_the_0_keyword: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_decorator_can_only_decorate_a_method_implementation_not_an_overload: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- with_statements_are_not_allowed_in_an_async_function_block: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- await_expression_is_only_allowed_within_an_async_function: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_body_of_an_if_statement_cannot_be_the_empty_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Global_module_exports_may_only_appear_in_module_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Global_module_exports_may_only_appear_in_declaration_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Global_module_exports_may_only_appear_at_top_level: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_parameter_property_cannot_be_declared_using_a_rest_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Static_members_cannot_reference_class_type_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Circular_definition_of_import_alias_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_has_no_exported_member_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_is_not_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_module_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_recursively_references_itself_as_a_base_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_may_only_extend_another_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_interface_may_only_extend_a_class_or_another_interface: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_has_a_circular_constraint: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generic_type_0_requires_1_type_argument_s: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_generic: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Global_type_0_must_be_a_class_or_interface_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Global_type_0_must_have_1_type_parameter_s: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_global_type_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Named_property_0_of_types_1_and_2_are_not_identical: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Interface_0_cannot_simultaneously_extend_types_1_and_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Excessive_stack_depth_comparing_types_0_and_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_assignable_to_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_redeclare_exported_variable_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_missing_in_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_private_in_type_1_but_not_in_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Types_of_property_0_are_incompatible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_optional_in_type_1_but_required_in_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Types_of_parameters_0_and_1_are_incompatible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Index_signature_is_missing_in_type_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Index_signatures_are_incompatible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_cannot_be_referenced_in_a_module_or_namespace_body: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_cannot_be_referenced_in_current_location: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_cannot_be_referenced_in_constructor_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_cannot_be_referenced_in_a_static_property_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_can_only_be_referenced_in_a_derived_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_cannot_be_referenced_in_constructor_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_does_not_exist_on_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_private_and_only_accessible_within_class_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_does_not_satisfy_the_constraint_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Supplied_parameters_do_not_match_any_signature_of_call_target: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Untyped_function_calls_may_not_accept_type_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_a_void_function_can_be_called_with_the_new_keyword: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_cannot_be_converted_to_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Operator_0_cannot_be_applied_to_types_1_and_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_parameter_property_is_only_allowed_in_a_constructor_implementation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_parameter_must_be_of_an_array_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_cannot_be_referenced_in_its_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_string_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_number_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Constructors_for_derived_classes_must_contain_a_super_call: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_get_accessor_must_return_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Getter_and_setter_accessors_do_not_agree_in_visibility: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- get_and_set_accessor_must_have_the_same_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_signature_with_an_implementation_cannot_use_a_string_literal_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signatures_must_all_be_exported_or_non_exported: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signatures_must_all_be_ambient_or_non_ambient: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signatures_must_all_be_public_private_or_protected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signatures_must_all_be_optional_or_required: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_overload_must_be_static: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_overload_must_not_be_static: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_implementation_name_must_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Constructor_implementation_is_missing: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_implementation_is_missing_or_not_immediately_following_the_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Multiple_constructor_implementations_are_not_allowed: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_function_implementation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signature_is_not_compatible_with_function_implementation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Declaration_name_conflicts_with_built_in_global_identifier_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Setters_cannot_return_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_of_type_1_is_not_assignable_to_string_index_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Numeric_index_type_0_is_not_assignable_to_string_index_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_incorrectly_extends_base_class_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_static_side_0_incorrectly_extends_base_class_static_side_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_incorrectly_implements_interface_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_may_only_implement_another_class_or_interface: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Interface_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- All_declarations_of_0_must_have_identical_type_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Interface_0_incorrectly_extends_interface_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enum_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Ambient_module_declaration_cannot_specify_relative_module_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_declaration_conflicts_with_local_declaration_of_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Types_have_separate_declarations_of_a_private_property_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_protected_in_type_1_but_public_in_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Block_scoped_variable_0_used_before_its_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_redeclare_block_scoped_variable_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_enum_member_cannot_have_a_numeric_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Variable_0_is_used_before_being_assigned: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_alias_0_circularly_references_itself: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_alias_name_cannot_be_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_AMD_module_cannot_have_multiple_name_assignments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_has_no_property_1_and_no_string_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_has_no_property_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_an_array_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_element_must_be_last_in_a_destructuring_pattern: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_must_be_of_type_string_number_symbol_or_any: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_cannot_be_referenced_in_a_computed_property_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_cannot_be_referenced_in_a_computed_property_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_global_value_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_0_operator_cannot_be_applied_to_type_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_computed_property_name_of_the_form_0_must_be_of_type_symbol: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enum_declarations_must_all_be_const_or_non_const: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- In_const_enum_declarations_member_initializer_must_be_constant_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_const_enum_member_can_only_be_accessed_using_a_string_literal: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- const_enum_member_initializer_was_evaluated_to_a_non_finite_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_does_not_exist_on_const_enum_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Export_declaration_conflicts_with_exported_declaration_of_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_iterator_must_have_a_next_method: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_redeclare_identifier_0_in_catch_clause: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_an_array_type_or_a_string_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_rest_element_cannot_contain_a_binding_pattern: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_namespace_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_generator_cannot_have_a_void_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_a_constructor_function_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- No_base_constructor_has_the_specified_number_of_type_arguments: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Base_constructor_return_type_0_is_not_a_class_or_interface_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Base_constructors_must_all_have_the_same_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_create_an_instance_of_the_abstract_class_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Overload_signatures_must_all_be_abstract_or_non_abstract: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Classes_containing_abstract_methods_must_be_marked_abstract: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- All_declarations_of_an_abstract_method_must_be_consecutive: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- yield_expressions_cannot_be_used_in_a_parameter_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- await_expressions_cannot_be_used_in_a_parameter_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_module_cannot_have_multiple_default_exports: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_incompatible_with_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Object_is_possibly_null: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Object_is_possibly_undefined: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Object_is_possibly_null_or_undefined: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_function_returning_never_cannot_have_a_reachable_end_point: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enum_type_0_has_members_with_initializers_that_are_not_literals: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_cannot_be_used_to_index_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_has_no_matching_index_signature_for_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_cannot_be_used_as_an_index_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_assign_to_0_because_it_is_not_a_variable: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_target_of_an_assignment_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Index_signature_in_type_0_only_permits_reading: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_attributes_type_0_may_not_be_a_union_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_in_type_1_is_not_assignable_to_type_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_type_0_does_not_have_any_construct_or_call_signatures: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_global_type_JSX_0_may_not_have_more_than_one_property: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_emit_namespaced_JSX_elements_in_React: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_expressions_must_have_one_parent_element: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_provides_no_match_for_the_signature_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_name_0_Did_you_mean_the_static_member_1_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_module_name_in_augmentation_module_0_cannot_be_found: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exports_and_export_assignments_are_not_permitted_in_module_augmentations: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Accessors_must_both_be_abstract_or_non_abstract: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_comparable_to_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_this_parameter_must_be_the_first_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_constructor_cannot_have_a_this_parameter: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- get_and_set_accessor_must_have_the_same_this_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_this_types_of_each_signature_are_incompatible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- All_declarations_of_0_must_have_identical_modifiers: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_type_definition_file_for_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_extend_an_interface_0_Did_you_mean_implements: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_class_must_be_declared_after_its_base_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Namespace_0_has_no_exported_member_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Left_side_of_comma_operator_is_unused_and_has_no_side_effects: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Spread_types_may_only_be_created_from_object_types: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Rest_types_may_only_be_created_from_object_types: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_declaration_0_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_variable_0_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_variable_0_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Public_property_0_of_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_of_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Return_type_of_exported_function_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_of_exported_function_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Exported_type_alias_0_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Default_export_of_the_module_has_or_is_using_private_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_current_host_does_not_support_the_0_option: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_the_common_subdirectory_path_for_the_input_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_read_file_0_Colon_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unsupported_file_encoding: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Failed_to_parse_file_0_Colon_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unknown_compiler_option_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Compiler_option_0_requires_a_value_of_type_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Could_not_write_file_0_Colon_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_project_cannot_be_mixed_with_source_files_on_a_command_line: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_0_cannot_be_specified_without_specifying_option_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_0_cannot_be_specified_with_option_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_tsconfig_json_file_is_already_defined_at_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_write_file_0_because_it_would_overwrite_input_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_specified_path_does_not_exist_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_paths_cannot_be_used_without_specifying_baseUrl_option: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Pattern_0_can_have_at_most_one_Asterisk_character: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Substitutions_for_pattern_0_should_be_an_array: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Concatenate_and_emit_output_to_single_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generates_corresponding_d_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Watch_input_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Redirect_output_structure_to_the_directory: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_erase_const_enum_declarations_in_generated_code: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_emit_outputs_if_any_errors_were_reported: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_emit_comments_to_output: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_emit_outputs: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Skip_type_checking_of_declaration_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Print_this_message: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Print_the_compiler_s_version: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Compile_the_project_in_the_given_directory: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Syntax_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- options: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Examples_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Options_Colon: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Version_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Insert_command_line_options_and_files_from_a_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_change_detected_Starting_incremental_compilation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- KIND: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- FILE: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- VERSION: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- LOCATION: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- DIRECTORY: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- STRATEGY: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Compilation_complete_Watching_for_file_changes: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generates_corresponding_map_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Compiler_option_0_expects_an_argument: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unterminated_quoted_string_in_response_file_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Argument_for_0_option_must_be_Colon_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unsupported_locale_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unable_to_open_file_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Corrupted_locale_file_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Raise_error_on_expressions_and_declarations_with_an_implied_any_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_not_found: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_has_unsupported_extension_The_only_supported_extensions_are_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_emit_declarations_for_code_that_has_an_internal_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- NEWLINE: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_0_can_only_be_specified_in_tsconfig_json_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enables_experimental_support_for_ES7_decorators: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enables_experimental_support_for_emitting_type_metadata_for_decorators: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enables_experimental_support_for_ES7_async_functions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Successfully_created_a_tsconfig_json_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Suppress_excess_property_checks_for_object_literals: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Stylize_errors_and_messages_using_color_and_context_experimental: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_report_errors_on_unused_labels: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Report_error_when_not_all_code_paths_in_function_return_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Report_errors_for_fallthrough_cases_in_switch_statement: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_report_errors_on_unreachable_code: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Disallow_inconsistently_cased_references_to_the_same_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_library_files_to_be_included_in_the_compilation_Colon: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_JSX_code_generation_Colon_preserve_or_react: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_amd_and_system_modules_are_supported_alongside_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Base_directory_to_resolve_non_absolute_module_names: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enable_tracing_of_the_name_resolution_process: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_module_0_from_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Explicitly_specified_module_resolution_kind_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_resolution_kind_is_not_specified_using_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_name_0_was_successfully_resolved_to_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_name_0_was_not_resolved: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_name_0_matched_pattern_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Trying_substitution_0_candidate_module_location_Colon_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_module_name_0_relative_to_base_url_1_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Loading_module_as_file_Slash_folder_candidate_module_location_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_does_not_exist: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_0_exist_use_it_as_a_name_resolution_result: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Loading_module_0_from_node_modules_folder: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Found_package_json_at_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- package_json_does_not_have_a_types_or_main_field: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- package_json_has_0_field_1_that_references_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Allow_javascript_files_to_be_compiled: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Option_0_should_have_array_of_strings_as_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Checking_if_0_is_the_longest_matching_prefix_for_1_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expected_type_of_0_field_in_package_json_to_be_string_got_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Longest_matching_prefix_for_0_is_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Loading_0_from_the_root_dir_1_candidate_location_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Trying_other_entries_in_rootDirs: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_resolution_using_rootDirs_has_failed: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Do_not_emit_use_strict_directives_in_module_output: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Enable_strict_null_checks: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unknown_option_excludes_Did_you_mean_exclude: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Raise_error_on_this_expressions_with_an_implied_any_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_type_reference_directive_0_containing_file_1_root_directory_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_using_primary_search_paths: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_from_node_modules_folder: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_reference_directive_0_was_not_resolved: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_with_primary_search_path_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Root_directory_cannot_be_determined_skipping_primary_search_paths: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_declaration_files_to_be_included_in_compilation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Looking_up_in_node_modules_folder_initial_location_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_config_file_0_found_doesn_t_contain_any_source_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Resolving_real_path_for_0_result_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- File_name_0_has_a_1_extension_stripping_it: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_is_declared_but_never_used: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Report_errors_on_unused_locals: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Report_errors_on_unused_parameters: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- No_types_specified_in_package_json_so_returning_main_value_of_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_is_declared_but_never_used: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_emit_helpers_from_tslib: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_was_resolved_to_1_but_jsx_is_not_set: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_was_resolved_to_1_but_allowJs_is_not_set: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Variable_0_implicitly_has_an_1_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Parameter_0_implicitly_has_an_1_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Member_0_implicitly_has_an_1_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Object_literal_s_property_0_implicitly_has_an_1_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Rest_parameter_0_implicitly_has_an_any_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unreachable_code_detected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unused_label: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Fallthrough_case_in_switch: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Not_all_code_paths_return_a_value: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Binding_element_0_implicitly_has_an_1_type: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- You_cannot_rename_this_element: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- import_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- export_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- type_parameter_declarations_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- implements_clauses_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- interface_declarations_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- module_declarations_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- type_aliases_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- _0_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- types_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- type_arguments_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- parameter_modifiers_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- enum_declarations_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- type_assertion_expressions_can_only_be_used_in_a_ts_file: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- class_expressions_are_not_currently_supported: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Language_service_is_disabled: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_attributes_must_only_be_assigned_a_non_empty_expression: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_elements_cannot_have_multiple_attributes_with_the_same_name: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Expected_corresponding_JSX_closing_tag_for_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_attribute_expected: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Cannot_use_JSX_unless_the_jsx_flag_is_provided: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- JSX_element_0_has_no_corresponding_closing_tag: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Unknown_type_acquisition_option_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Circularity_detected_while_resolving_configuration_Colon_0: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- The_files_list_in_config_file_0_is_empty: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Add_missing_super_call: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Make_super_call_the_first_statement_in_the_constructor: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Change_extends_to_implements: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Remove_unused_identifiers: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Implement_interface_on_reference: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Implement_interface_on_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Implement_inherited_abstract_class: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Import_0_from_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Change_0_to_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- Add_0_to_existing_import_declaration_from_1: {
- code: number;
- category: DiagnosticCategory;
- key: string;
- message: string;
- };
- };
-}
-declare namespace ts {
interface ErrorCallback {
(message: DiagnosticMessage, length: number): void;
}
- function tokenIsIdentifierOrKeyword(token: SyntaxKind): boolean;
interface Scanner {
getStartPos(): number;
getToken(): SyntaxKind;
@@ -8647,50 +2351,25 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
- function isUnicodeIdentifierStart(code: number, languageVersion: ScriptTarget): boolean;
function tokenToString(t: SyntaxKind): string;
- function stringToToken(s: string): SyntaxKind;
- function computeLineStarts(text: string): number[];
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
- function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number;
- function getLineStarts(sourceFile: SourceFile): number[];
- function computeLineAndCharacterOfPosition(lineStarts: number[], position: number): {
- line: number;
- character: number;
- };
function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
function isWhiteSpace(ch: number): boolean;
function isWhiteSpaceSingleLine(ch: number): boolean;
function isLineBreak(ch: number): boolean;
- function isOctalDigit(ch: number): boolean;
function couldStartTrivia(text: string, pos: number): boolean;
- function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean): number;
- function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function getLeadingCommentRanges(text: string, pos: number): CommentRange[];
- function getTrailingCommentRanges(text: string, pos: number): CommentRange[];
+ function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
function getShebang(text: string): string;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
- function isIdentifierText(name: string, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
}
declare namespace ts {
- const compileOnSaveCommandLineOption: CommandLineOption;
- const optionDeclarations: CommandLineOption[];
- let typeAcquisitionDeclarations: CommandLineOption[];
- interface OptionNameMap {
- optionNameMap: Map<CommandLineOption>;
- shortOptionNames: Map<string>;
- }
- const defaultInitCompilerOptions: CompilerOptions;
- function convertEnableAutoDiscoveryToEnable(typeAcquisition: TypeAcquisition): TypeAcquisition;
- function getOptionNameMap(): OptionNameMap;
- function createCompilerDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType): Diagnostic;
- function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]): string | number;
- function parseListTypeOption(opt: CommandLineOptionOfListType, value: string, errors: Diagnostic[]): (string | number)[] | undefined;
function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine;
function readConfigFile(fileName: string, readFile: (path: string) => string): {
config?: any;
@@ -8700,10 +2379,7 @@ declare namespace ts {
config?: any;
error?: Diagnostic;
};
- function generateTSConfig(options: CompilerOptions, fileNames: string[]): {
- compilerOptions: Map<CompilerOptionsValue>;
- };
- function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[]): ParsedCommandLine;
+ function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: JsFileExtensionInfo[]): ParsedCommandLine;
function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
@@ -8714,113 +2390,10 @@ declare namespace ts {
errors: Diagnostic[];
};
}
-declare namespace ts.JsTyping {
- interface TypingResolutionHost {
- directoryExists: (path: string) => boolean;
- fileExists: (fileName: string) => boolean;
- readFile: (path: string, encoding?: string) => string;
- readDirectory: (rootDir: string, extensions: string[], excludes: string[], includes: string[], depth?: number) => string[];
- }
- const nodeCoreModuleList: ReadonlyArray<string>;
- function discoverTypings(host: TypingResolutionHost, fileNames: string[], projectRootPath: Path, safeListPath: Path, packageNameToTypingLocation: Map<string>, typeAcquisition: TypeAcquisition, unresolvedImports: ReadonlyArray<string>): {
- cachedTypingPaths: string[];
- newTypingNames: string[];
- filesToWatch: string[];
- };
-}
-declare namespace ts.server {
- const ActionSet: ActionSet;
- const ActionInvalidate: ActionInvalidate;
- const EventInstall: EventInstall;
- namespace Arguments {
- const GlobalCacheLocation = "--globalTypingsCacheLocation";
- const LogFile = "--logFile";
- const EnableTelemetry = "--enableTelemetry";
- }
- function hasArgument(argumentName: string): boolean;
- function findArgument(argumentName: string): string;
-}
-declare namespace ts.server {
- enum LogLevel {
- terse = 0,
- normal = 1,
- requestTime = 2,
- verbose = 3,
- }
- const emptyArray: ReadonlyArray<any>;
- interface Logger {
- close(): void;
- hasLevel(level: LogLevel): boolean;
- loggingEnabled(): boolean;
- perftrc(s: string): void;
- info(s: string): void;
- startGroup(): void;
- endGroup(): void;
- msg(s: string, type?: Msg.Types): void;
- getLogFileName(): string;
- }
- namespace Msg {
- type Err = "Err";
- const Err: Err;
- type Info = "Info";
- const Info: Info;
- type Perf = "Perf";
- const Perf: Perf;
- type Types = Err | Info | Perf;
- }
- function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, cachePath?: string): DiscoverTypings;
- namespace Errors {
- function ThrowNoProject(): never;
- function ThrowProjectLanguageServiceDisabled(): never;
- function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never;
- }
- function getDefaultFormatCodeSettings(host: ServerHost): FormatCodeSettings;
- function mergeMaps(target: MapLike<any>, source: MapLike<any>): void;
- function removeItemFromSet<T>(items: T[], itemToRemove: T): void;
- type NormalizedPath = string & {
- __normalizedPathTag: any;
- };
- function toNormalizedPath(fileName: string): NormalizedPath;
- function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path;
- function asNormalizedPath(fileName: string): NormalizedPath;
- interface NormalizedPathMap<T> {
- get(path: NormalizedPath): T;
- set(path: NormalizedPath, value: T): void;
- contains(path: NormalizedPath): boolean;
- remove(path: NormalizedPath): void;
- }
- function createNormalizedPathMap<T>(): NormalizedPathMap<T>;
- interface ProjectOptions {
- configHasFilesProperty?: boolean;
- files?: string[];
- wildcardDirectories?: Map<WatchDirectoryFlags>;
- compilerOptions?: CompilerOptions;
- typeAcquisition?: TypeAcquisition;
- compileOnSave?: boolean;
- }
- function isInferredProjectName(name: string): boolean;
- function makeInferredProjectName(counter: number): string;
- function toSortedReadonlyArray(arr: string[]): SortedReadonlyArray<string>;
- class ThrottledOperations {
- private readonly host;
- private pendingTimeouts;
- constructor(host: ServerHost);
- schedule(operationId: string, delay: number, cb: () => void): void;
- private static run(self, operationId, cb);
- }
- class GcTimer {
- private readonly host;
- private readonly delay;
- private readonly logger;
- private timerId;
- constructor(host: ServerHost, delay: number, logger: Logger);
- scheduleCollect(): void;
- private static run(self);
- }
-}
declare namespace ts {
- function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void;
- function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean;
+ interface Push<T> {
+ push(value: T): void;
+ }
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
@@ -8828,391 +2401,20 @@ declare namespace ts {
}): string[] | undefined;
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
- function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function directoryProbablyExists(directoryName: string, host: {
- directoryExists?: (directoryName: string) => boolean;
- }): boolean;
- function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function loadModuleFromGlobalCache(moduleName: string, projectName: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations;
-}
-declare namespace ts {
- const externalHelpersModuleNameText = "tslib";
- interface ReferencePathMatchResult {
- fileReference?: FileReference;
- diagnosticMessage?: DiagnosticMessage;
- isNoDefaultLib?: boolean;
- isTypeReferenceDirective?: boolean;
- }
- function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration;
- interface StringSymbolWriter extends SymbolWriter {
- string(): string;
- }
- function getSingleLineStringWriter(): StringSymbolWriter;
- function releaseStringWriter(writer: StringSymbolWriter): void;
- function getFullWidth(node: Node): number;
- function hasResolvedModule(sourceFile: SourceFile, moduleNameText: string): boolean;
- function getResolvedModule(sourceFile: SourceFile, moduleNameText: string): ResolvedModuleFull;
- function setResolvedModule(sourceFile: SourceFile, moduleNameText: string, resolvedModule: ResolvedModuleFull): void;
- function setResolvedTypeReferenceDirective(sourceFile: SourceFile, typeReferenceDirectiveName: string, resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective): void;
- function moduleResolutionIsEqualTo(oldResolution: ResolvedModuleFull, newResolution: ResolvedModuleFull): boolean;
- function typeDirectiveIsEqualTo(oldResolution: ResolvedTypeReferenceDirective, newResolution: ResolvedTypeReferenceDirective): boolean;
- function hasChangesInResolutions<T>(names: string[], newResolutions: T[], oldResolutions: Map<T>, comparer: (oldResolution: T, newResolution: T) => boolean): boolean;
- function containsParseError(node: Node): boolean;
- function getSourceFileOfNode(node: Node): SourceFile;
- function isStatementWithLocals(node: Node): boolean;
- function getStartPositionOfLine(line: number, sourceFile: SourceFile): number;
- function nodePosToString(node: Node): string;
- function getStartPosOfNode(node: Node): number;
- function isDefined(value: any): boolean;
- function getEndLinePosition(line: number, sourceFile: SourceFile): number;
- function nodeIsMissing(node: Node): boolean;
- function nodeIsPresent(node: Node): boolean;
- function getTokenPosOfNode(node: Node, sourceFile?: SourceFile, includeJsDoc?: boolean): number;
- function isJSDocNode(node: Node): boolean;
- function isJSDocTag(node: Node): boolean;
- function getNonDecoratorTokenPosOfNode(node: Node, sourceFile?: SourceFile): number;
- function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node, includeTrivia?: boolean): string;
- function getTextOfNodeFromSourceText(sourceText: string, node: Node): string;
- function getTextOfNode(node: Node, includeTrivia?: boolean): string;
- function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile, languageVersion: ScriptTarget): string;
- function isBinaryOrOctalIntegerLiteral(node: LiteralLikeNode, text: string): boolean;
- function escapeIdentifier(identifier: string): string;
- function unescapeIdentifier(identifier: string): string;
- function makeIdentifierFromModuleName(moduleName: string): string;
- function isBlockOrCatchScoped(declaration: Declaration): boolean;
- function isCatchClauseVariableDeclarationOrBindingElement(declaration: Declaration): boolean;
- function isAmbientModule(node: Node): boolean;
- function isShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean;
- function isBlockScopedContainerTopLevel(node: Node): boolean;
- function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean;
- function isExternalModuleAugmentation(node: Node): boolean;
- function isBlockScope(node: Node, parentNode: Node): boolean;
- function getEnclosingBlockScopeContainer(node: Node): Node;
- function declarationNameToString(name: DeclarationName): string;
- function getTextOfPropertyName(name: PropertyName): string;
- function entityNameToString(name: EntityNameOrEntityNameExpression): string;
- function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number): Diagnostic;
- function createDiagnosticForNodeInSourceFile(sourceFile: SourceFile, node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number): Diagnostic;
- function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic;
- function getSpanOfTokenAtPosition(sourceFile: SourceFile, pos: number): TextSpan;
- function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan;
- function isExternalOrCommonJsModule(file: SourceFile): boolean;
- function isDeclarationFile(file: SourceFile): boolean;
- function isConstEnumDeclaration(node: Node): boolean;
- function isConst(node: Node): boolean;
- function isLet(node: Node): boolean;
- function isSuperCall(n: Node): n is SuperCall;
- function isPrologueDirective(node: Node): node is PrologueDirective;
- function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
- function getLeadingCommentRangesOfNodeFromText(node: Node, text: string): CommentRange[];
- function getJSDocCommentRanges(node: Node, text: string): CommentRange[];
- let fullTripleSlashReferencePathRegEx: RegExp;
- let fullTripleSlashReferenceTypeReferenceDirectiveRegEx: RegExp;
- let fullTripleSlashAMDReferencePathRegEx: RegExp;
- function isPartOfTypeNode(node: Node): boolean;
- function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
- function forEachYieldExpression(body: Block, visitor: (expr: YieldExpression) => void): void;
- function isVariableLike(node: Node): node is VariableLikeDeclaration;
- function isAccessor(node: Node): node is AccessorDeclaration;
- function isClassLike(node: Node): node is ClassLikeDeclaration;
- function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
- function isFunctionLikeKind(kind: SyntaxKind): boolean;
- function introducesArgumentsExoticObject(node: Node): boolean;
- function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
- function isFunctionBlock(node: Node): boolean;
- function isObjectLiteralMethod(node: Node): node is MethodDeclaration;
- function isObjectLiteralOrClassExpressionMethod(node: Node): node is MethodDeclaration;
- function isIdentifierTypePredicate(predicate: TypePredicate): predicate is IdentifierTypePredicate;
- function isThisTypePredicate(predicate: TypePredicate): predicate is ThisTypePredicate;
- function getContainingFunction(node: Node): FunctionLikeDeclaration;
- function getContainingClass(node: Node): ClassLikeDeclaration;
- function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
- function getSuperContainer(node: Node, stopOnFunctions: boolean): Node;
- function getImmediatelyInvokedFunctionExpression(func: Node): CallExpression;
- function isSuperProperty(node: Node): node is SuperProperty;
- function getEntityNameFromTypeNode(node: TypeNode): EntityNameOrEntityNameExpression;
- function isCallLikeExpression(node: Node): node is CallLikeExpression;
- function getInvokedExpression(node: CallLikeExpression): Expression;
- function nodeCanBeDecorated(node: Node): boolean;
- function nodeIsDecorated(node: Node): boolean;
- function nodeOrChildIsDecorated(node: Node): boolean;
- function childIsDecorated(node: Node): boolean;
- function isJSXTagName(node: Node): boolean;
- function isPartOfExpression(node: Node): boolean;
- function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean): boolean;
- function isExternalModuleImportEqualsDeclaration(node: Node): boolean;
- function getExternalModuleImportEqualsDeclarationExpression(node: Node): Expression;
- function isInternalModuleImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
- function isSourceFileJavaScript(file: SourceFile): boolean;
- function isInJavaScriptFile(node: Node): boolean;
- function isRequireCall(expression: Node, checkArgumentIsStringLiteral: boolean): expression is CallExpression;
- function isSingleOrDoubleQuote(charCode: number): boolean;
- function isDeclarationOfFunctionExpression(s: Symbol): boolean;
- function getSpecialPropertyAssignmentKind(expression: Node): SpecialPropertyAssignmentKind;
- function getExternalModuleName(node: Node): Expression;
- function getNamespaceDeclarationNode(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration): ImportEqualsDeclaration | NamespaceImport;
- function isDefaultImport(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration): boolean;
- function hasQuestionToken(node: Node): boolean;
- function isJSDocConstructSignature(node: Node): boolean;
- function getCommentsFromJSDoc(node: Node): string[];
- function getJSDocParameterTags(param: Node): JSDocParameterTag[];
- function getJSDocType(node: Node): JSDocType;
- function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag;
- function getJSDocReturnTag(node: Node): JSDocReturnTag;
- function getJSDocTemplateTag(node: Node): JSDocTemplateTag;
- function hasRestParameter(s: SignatureDeclaration): boolean;
- function hasDeclaredRestParameter(s: SignatureDeclaration): boolean;
- function isRestParameter(node: ParameterDeclaration): boolean;
- function isDeclaredRestParam(node: ParameterDeclaration): boolean;
- const enum AssignmentKind {
- None = 0,
- Definite = 1,
- Compound = 2,
- }
- function getAssignmentTargetKind(node: Node): AssignmentKind;
- function isAssignmentTarget(node: Node): boolean;
- function isNodeDescendantOf(node: Node, ancestor: Node): boolean;
- function isInAmbientContext(node: Node): boolean;
- function isDeclarationName(name: Node): boolean;
- function isLiteralComputedPropertyDeclarationName(node: Node): boolean;
- function isIdentifierName(node: Identifier): boolean;
- function isAliasSymbolDeclaration(node: Node): boolean;
- function exportAssignmentIsAlias(node: ExportAssignment): boolean;
- function getClassExtendsHeritageClauseElement(node: ClassLikeDeclaration | InterfaceDeclaration): ExpressionWithTypeArguments;
- function getClassImplementsHeritageClauseElements(node: ClassLikeDeclaration): NodeArray<ExpressionWithTypeArguments>;
- function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<ExpressionWithTypeArguments>;
- function getHeritageClause(clauses: NodeArray<HeritageClause>, kind: SyntaxKind): HeritageClause;
- function tryResolveScriptReference(host: ScriptReferenceHost, sourceFile: SourceFile, reference: FileReference): SourceFile;
- function getAncestor(node: Node, kind: SyntaxKind): Node;
- function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult;
- function isKeyword(token: SyntaxKind): boolean;
- function isTrivia(token: SyntaxKind): boolean;
- function isAsyncFunctionLike(node: Node): boolean;
- function isStringOrNumericLiteral(node: Node): node is StringLiteral | NumericLiteral;
- function hasDynamicName(declaration: Declaration): boolean;
- function isDynamicName(name: DeclarationName): boolean;
- function isWellKnownSymbolSyntactically(node: Expression): boolean;
- function getPropertyNameForPropertyNameNode(name: DeclarationName | ParameterDeclaration): string;
- function getPropertyNameForKnownSymbolName(symbolName: string): string;
- function isESSymbolIdentifier(node: Node): boolean;
- function isPushOrUnshiftIdentifier(node: Identifier): boolean;
- function isModifierKind(token: SyntaxKind): boolean;
- function isParameterDeclaration(node: VariableLikeDeclaration): boolean;
- function getRootDeclaration(node: Node): Node;
- function nodeStartsNewLexicalEnvironment(node: Node): boolean;
- function nodeIsSynthesized(node: TextRange): boolean;
- function getOriginalNode(node: Node): Node;
- function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
- function isParseTreeNode(node: Node): boolean;
- function getParseTreeNode(node: Node): Node;
- function getParseTreeNode<T extends Node>(node: Node, nodeTest?: (node: Node) => node is T): T;
- function getOriginalSourceFiles(sourceFiles: SourceFile[]): SourceFile[];
- function getOriginalNodeId(node: Node): number;
- const enum Associativity {
- Left = 0,
- Right = 1,
- }
- function getExpressionAssociativity(expression: Expression): Associativity;
- function getOperatorAssociativity(kind: SyntaxKind, operator: SyntaxKind, hasArguments?: boolean): Associativity;
- function getExpressionPrecedence(expression: Expression): 0 | 1 | -1 | 2 | 4 | 3 | 16 | 10 | 5 | 6 | 11 | 8 | 19 | 18 | 17 | 15 | 14 | 13 | 12 | 9 | 7;
- function getOperator(expression: Expression): SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AsKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.OfKeyword | SyntaxKind.QualifiedName | SyntaxKind.ComputedPropertyName | SyntaxKind.TypeParameter | SyntaxKind.Parameter | SyntaxKind.Decorator | SyntaxKind.PropertySignature | SyntaxKind.PropertyDeclaration | SyntaxKind.MethodSignature | SyntaxKind.MethodDeclaration | SyntaxKind.Constructor | SyntaxKind.GetAccessor | SyntaxKind.SetAccessor | SyntaxKind.CallSignature | SyntaxKind.ConstructSignature | SyntaxKind.IndexSignature | SyntaxKind.TypePredicate | SyntaxKind.TypeReference | SyntaxKind.FunctionType | SyntaxKind.ConstructorType | SyntaxKind.TypeQuery | SyntaxKind.TypeLiteral | SyntaxKind.ArrayType | SyntaxKind.TupleType | SyntaxKind.UnionType | SyntaxKind.IntersectionType | SyntaxKind.ParenthesizedType | SyntaxKind.ThisType | SyntaxKind.TypeOperator | SyntaxKind.IndexedAccessType | SyntaxKind.MappedType | SyntaxKind.LiteralType | SyntaxKind.ObjectBindingPattern | SyntaxKind.ArrayBindingPattern | SyntaxKind.BindingElement | SyntaxKind.ArrayLiteralExpression | SyntaxKind.ObjectLiteralExpression | SyntaxKind.PropertyAccessExpression | SyntaxKind.ElementAccessExpression | SyntaxKind.CallExpression | SyntaxKind.NewExpression | SyntaxKind.TaggedTemplateExpression | SyntaxKind.TypeAssertionExpression | SyntaxKind.ParenthesizedExpression | SyntaxKind.FunctionExpression | SyntaxKind.ArrowFunction | SyntaxKind.DeleteExpression | SyntaxKind.TypeOfExpression | SyntaxKind.VoidExpression | SyntaxKind.AwaitExpression | SyntaxKind.ConditionalExpression | SyntaxKind.TemplateExpression | SyntaxKind.YieldExpression | SyntaxKind.SpreadElement | SyntaxKind.ClassExpression | SyntaxKind.OmittedExpression | SyntaxKind.ExpressionWithTypeArguments | SyntaxKind.AsExpression | SyntaxKind.NonNullExpression | SyntaxKind.TemplateSpan | SyntaxKind.SemicolonClassElement | SyntaxKind.Block | SyntaxKind.VariableStatement | SyntaxKind.EmptyStatement | SyntaxKind.ExpressionStatement | SyntaxKind.IfStatement | SyntaxKind.DoStatement | SyntaxKind.WhileStatement | SyntaxKind.ForStatement | SyntaxKind.ForInStatement | SyntaxKind.ForOfStatement | SyntaxKind.ContinueStatement | SyntaxKind.BreakStatement | SyntaxKind.ReturnStatement | SyntaxKind.WithStatement | SyntaxKind.SwitchStatement | SyntaxKind.LabeledStatement | SyntaxKind.ThrowStatement | SyntaxKind.TryStatement | SyntaxKind.DebuggerStatement | SyntaxKind.VariableDeclaration | SyntaxKind.VariableDeclarationList | SyntaxKind.FunctionDeclaration | SyntaxKind.ClassDeclaration | SyntaxKind.InterfaceDeclaration | SyntaxKind.TypeAliasDeclaration | SyntaxKind.EnumDeclaration | SyntaxKind.ModuleDeclaration | SyntaxKind.ModuleBlock | SyntaxKind.CaseBlock | SyntaxKind.NamespaceExportDeclaration | SyntaxKind.ImportEqualsDeclaration | SyntaxKind.ImportDeclaration | SyntaxKind.ImportClause | SyntaxKind.NamespaceImport | SyntaxKind.NamedImports | SyntaxKind.ImportSpecifier | SyntaxKind.ExportAssignment | SyntaxKind.ExportDeclaration | SyntaxKind.NamedExports | SyntaxKind.ExportSpecifier | SyntaxKind.MissingDeclaration | SyntaxKind.ExternalModuleReference | SyntaxKind.JsxElement | SyntaxKind.JsxSelfClosingElement | SyntaxKind.JsxOpeningElement | SyntaxKind.JsxClosingElement | SyntaxKind.JsxAttribute | SyntaxKind.JsxSpreadAttribute | SyntaxKind.JsxExpression | SyntaxKind.CaseClause | SyntaxKind.DefaultClause | SyntaxKind.HeritageClause | SyntaxKind.CatchClause | SyntaxKind.PropertyAssignment | SyntaxKind.ShorthandPropertyAssignment | SyntaxKind.SpreadAssignment | SyntaxKind.EnumMember | SyntaxKind.SourceFile | SyntaxKind.JSDocTypeExpression | SyntaxKind.JSDocAllType | SyntaxKind.JSDocUnknownType | SyntaxKind.JSDocArrayType | SyntaxKind.JSDocUnionType | SyntaxKind.JSDocTupleType | SyntaxKind.JSDocNullableType | SyntaxKind.JSDocNonNullableType | SyntaxKind.JSDocRecordType | SyntaxKind.JSDocRecordMember | SyntaxKind.JSDocTypeReference | SyntaxKind.JSDocOptionalType | SyntaxKind.JSDocFunctionType | SyntaxKind.JSDocVariadicType | SyntaxKind.JSDocConstructorType | SyntaxKind.JSDocThisType | SyntaxKind.JSDocComment | SyntaxKind.JSDocTag | SyntaxKind.JSDocAugmentsTag | SyntaxKind.JSDocParameterTag | SyntaxKind.JSDocReturnTag | SyntaxKind.JSDocTypeTag | SyntaxKind.JSDocTemplateTag | SyntaxKind.JSDocTypedefTag | SyntaxKind.JSDocPropertyTag | SyntaxKind.JSDocTypeLiteral | SyntaxKind.JSDocLiteralType | SyntaxKind.JSDocNullKeyword | SyntaxKind.JSDocUndefinedKeyword | SyntaxKind.JSDocNeverKeyword | SyntaxKind.SyntaxList | SyntaxKind.NotEmittedStatement | SyntaxKind.PartiallyEmittedExpression | SyntaxKind.MergeDeclarationMarker | SyntaxKind.EndOfDeclarationMarker | SyntaxKind.RawExpression | SyntaxKind.Count;
- function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind, hasArguments?: boolean): 0 | 1 | -1 | 2 | 4 | 3 | 16 | 10 | 5 | 6 | 11 | 8 | 19 | 18 | 17 | 15 | 14 | 13 | 12 | 9 | 7;
- function createDiagnosticCollection(): DiagnosticCollection;
- function escapeString(s: string): string;
- function isIntrinsicJsxName(name: string): boolean;
- function escapeNonAsciiCharacters(s: string): string;
- interface EmitTextWriter {
- write(s: string): void;
- writeTextOfNode(text: string, node: Node): void;
- writeLine(): void;
- increaseIndent(): void;
- decreaseIndent(): void;
- getText(): string;
- rawWrite(s: string): void;
- writeLiteral(s: string): void;
- getTextPos(): number;
- getLine(): number;
- getColumn(): number;
- getIndent(): number;
- isAtStartOfLine(): boolean;
- reset(): void;
- }
- function getIndentString(level: number): string;
- function getIndentSize(): number;
- function createTextWriter(newLine: String): EmitTextWriter;
- function getResolvedExternalModuleName(host: EmitHost, file: SourceFile): string;
- function getExternalModuleNameFromDeclaration(host: EmitHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): string;
- function getExternalModuleNameFromPath(host: EmitHost, fileName: string): string;
- function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string): string;
- function getDeclarationEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost): string;
- interface EmitFileNames {
- jsFilePath: string;
- sourceMapFilePath: string;
- declarationFilePath: string;
- }
- function getSourceFilesToEmit(host: EmitHost, targetSourceFile?: SourceFile): SourceFile[];
- function filterSourceFilesInDirectory(sourceFiles: SourceFile[], isSourceFileFromExternalLibrary: (file: SourceFile) => boolean): SourceFile[];
- function forEachTransformedEmitFile(host: EmitHost, sourceFiles: SourceFile[], action: (jsFilePath: string, sourceMapFilePath: string, declarationFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean) => void, emitOnlyDtsFiles?: boolean): void;
- function forEachExpectedEmitFile(host: EmitHost, action: (emitFileNames: EmitFileNames, sourceFiles: SourceFile[], isBundledEmit: boolean, emitOnlyDtsFiles: boolean) => void, targetSourceFile?: SourceFile, emitOnlyDtsFiles?: boolean): void;
- function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string): string;
- function writeFile(host: EmitHost, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean, sourceFiles?: SourceFile[]): void;
- function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number): number;
- function getLineOfLocalPositionFromLineMap(lineMap: number[], pos: number): number;
- function getFirstConstructorWithBody(node: ClassLikeDeclaration): ConstructorDeclaration;
- function getSetAccessorTypeAnnotationNode(accessor: SetAccessorDeclaration): TypeNode;
- function getThisParameter(signature: SignatureDeclaration): ParameterDeclaration | undefined;
- function parameterIsThisKeyword(parameter: ParameterDeclaration): boolean;
- function isThisIdentifier(node: Node | undefined): boolean;
- function identifierIsThisKeyword(id: Identifier): boolean;
- interface AllAccessorDeclarations {
- firstAccessor: AccessorDeclaration;
- secondAccessor: AccessorDeclaration;
- getAccessor: AccessorDeclaration;
- setAccessor: AccessorDeclaration;
- }
- function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration): AllAccessorDeclarations;
- function emitNewLineBeforeLeadingComments(lineMap: number[], writer: EmitTextWriter, node: TextRange, leadingComments: CommentRange[]): void;
- function emitNewLineBeforeLeadingCommentsOfPosition(lineMap: number[], writer: EmitTextWriter, pos: number, leadingComments: CommentRange[]): void;
- function emitNewLineBeforeLeadingCommentOfPosition(lineMap: number[], writer: EmitTextWriter, pos: number, commentPos: number): void;
- function emitComments(text: string, lineMap: number[], writer: EmitTextWriter, comments: CommentRange[], leadingSeparator: boolean, trailingSeparator: boolean, newLine: string, writeComment: (text: string, lineMap: number[], writer: EmitTextWriter, commentPos: number, commentEnd: number, newLine: string) => void): void;
- function emitDetachedComments(text: string, lineMap: number[], writer: EmitTextWriter, writeComment: (text: string, lineMap: number[], writer: EmitTextWriter, commentPos: number, commentEnd: number, newLine: string) => void, node: TextRange, newLine: string, removeComments: boolean): {
- nodePos: number;
- detachedCommentEndPos: number;
- };
- function writeCommentRange(text: string, lineMap: number[], writer: EmitTextWriter, commentPos: number, commentEnd: number, newLine: string): void;
- function hasModifiers(node: Node): boolean;
- function hasModifier(node: Node, flags: ModifierFlags): boolean;
- function getModifierFlags(node: Node): ModifierFlags;
- function modifierToFlag(token: SyntaxKind): ModifierFlags;
- function isLogicalOperator(token: SyntaxKind): boolean;
- function isAssignmentOperator(token: SyntaxKind): boolean;
- function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined;
- function isAssignmentExpression(node: Node, excludeCompoundAssignment: true): node is AssignmentExpression<EqualsToken>;
- function isAssignmentExpression(node: Node, excludeCompoundAssignment?: false): node is AssignmentExpression<AssignmentOperatorToken>;
- function isDestructuringAssignment(node: Node): node is DestructuringAssignment;
- function isSupportedExpressionWithTypeArguments(node: ExpressionWithTypeArguments): boolean;
- function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): boolean;
- function isEntityNameExpression(node: Expression): node is EntityNameExpression;
- function isRightSideOfQualifiedNameOrPropertyAccess(node: Node): boolean;
- function isEmptyObjectLiteralOrArrayLiteral(expression: Node): boolean;
- function getLocalSymbolForExportDefault(symbol: Symbol): Symbol;
- function tryExtractTypeScriptExtension(fileName: string): string | undefined;
- const stringify: (value: any) => string;
- function convertToBase64(input: string): string;
- function getNewLineCharacter(options: CompilerOptions): string;
- function isSimpleExpression(node: Expression): boolean;
- function formatSyntaxKind(kind: SyntaxKind): string;
- function movePos(pos: number, value: number): number;
- function createRange(pos: number, end: number): TextRange;
- function moveRangeEnd(range: TextRange, end: number): TextRange;
- function moveRangePos(range: TextRange, pos: number): TextRange;
- function moveRangePastDecorators(node: Node): TextRange;
- function moveRangePastModifiers(node: Node): TextRange;
- function isCollapsedRange(range: TextRange): boolean;
- function collapseRangeToStart(range: TextRange): TextRange;
- function collapseRangeToEnd(range: TextRange): TextRange;
- function createTokenRange(pos: number, token: SyntaxKind): TextRange;
- function rangeIsOnSingleLine(range: TextRange, sourceFile: SourceFile): boolean;
- function rangeStartPositionsAreOnSameLine(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
- function rangeEndPositionsAreOnSameLine(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
- function rangeStartIsOnSameLineAsRangeEnd(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
- function rangeEndIsOnSameLineAsRangeStart(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
- function positionsAreOnSameLine(pos1: number, pos2: number, sourceFile: SourceFile): boolean;
- function getStartPositionOfRange(range: TextRange, sourceFile: SourceFile): number;
- function isDeclarationNameOfEnumOrNamespace(node: Identifier): boolean;
- function getInitializedVariables(node: VariableDeclarationList): VariableDeclaration[];
- function isMergedWithClass(node: Node): boolean;
- function isFirstDeclarationOfKind(node: Node, kind: SyntaxKind): boolean;
- function isNodeArray<T extends Node>(array: T[]): array is NodeArray<T>;
- function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
- function isLiteralKind(kind: SyntaxKind): boolean;
- function isTextualLiteralKind(kind: SyntaxKind): boolean;
- function isLiteralExpression(node: Node): node is LiteralExpression;
- function isTemplateLiteralKind(kind: SyntaxKind): boolean;
- function isTemplateHead(node: Node): node is TemplateHead;
- function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
- function isIdentifier(node: Node): node is Identifier;
- function isGeneratedIdentifier(node: Node): node is GeneratedIdentifier;
- function isModifier(node: Node): node is Modifier;
- function isQualifiedName(node: Node): node is QualifiedName;
- function isComputedPropertyName(node: Node): node is ComputedPropertyName;
- function isEntityName(node: Node): node is EntityName;
- function isPropertyName(node: Node): node is PropertyName;
- function isModuleName(node: Node): node is ModuleName;
- function isBindingName(node: Node): node is BindingName;
- function isTypeParameter(node: Node): node is TypeParameterDeclaration;
- function isParameter(node: Node): node is ParameterDeclaration;
- function isDecorator(node: Node): node is Decorator;
- function isMethodDeclaration(node: Node): node is MethodDeclaration;
- function isClassElement(node: Node): node is ClassElement;
- function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
- function isTypeNode(node: Node): node is TypeNode;
- function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
- function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
- function isBindingPattern(node: Node): node is BindingPattern;
- function isAssignmentPattern(node: Node): node is AssignmentPattern;
- function isBindingElement(node: Node): node is BindingElement;
- function isArrayBindingElement(node: Node): node is ArrayBindingElement;
- function isDeclarationBindingElement(bindingElement: BindingOrAssignmentElement): bindingElement is VariableDeclaration | ParameterDeclaration | BindingElement;
- function isBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is BindingOrAssignmentPattern;
- function isObjectBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is ObjectBindingOrAssignmentPattern;
- function isArrayBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is ArrayBindingOrAssignmentPattern;
- function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
- function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
- function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
- function isElementAccessExpression(node: Node): node is ElementAccessExpression;
- function isBinaryExpression(node: Node): node is BinaryExpression;
- function isConditionalExpression(node: Node): node is ConditionalExpression;
- function isCallExpression(node: Node): node is CallExpression;
- function isTemplateLiteral(node: Node): node is TemplateLiteral;
- function isSpreadExpression(node: Node): node is SpreadElement;
- function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
- function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression;
- function isUnaryExpression(node: Node): node is UnaryExpression;
- function isExpression(node: Node): node is Expression;
- function isAssertionExpression(node: Node): node is AssertionExpression;
- function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
- function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
- function isNotEmittedOrPartiallyEmittedNode(node: Node): node is NotEmittedStatement | PartiallyEmittedExpression;
- function isOmittedExpression(node: Node): node is OmittedExpression;
- function isTemplateSpan(node: Node): node is TemplateSpan;
- function isBlock(node: Node): node is Block;
- function isConciseBody(node: Node): node is ConciseBody;
- function isFunctionBody(node: Node): node is FunctionBody;
- function isForInitializer(node: Node): node is ForInitializer;
- function isVariableDeclaration(node: Node): node is VariableDeclaration;
- function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
- function isCaseBlock(node: Node): node is CaseBlock;
- function isModuleBody(node: Node): node is ModuleBody;
- function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
- function isImportClause(node: Node): node is ImportClause;
- function isNamedImportBindings(node: Node): node is NamedImportBindings;
- function isImportSpecifier(node: Node): node is ImportSpecifier;
- function isNamedExports(node: Node): node is NamedExports;
- function isExportSpecifier(node: Node): node is ExportSpecifier;
- function isModuleOrEnumDeclaration(node: Node): node is ModuleDeclaration | EnumDeclaration;
- function isDeclaration(node: Node): node is Declaration;
- function isDeclarationStatement(node: Node): node is DeclarationStatement;
- function isStatementButNotDeclaration(node: Node): node is Statement;
- function isStatement(node: Node): node is Statement;
- function isModuleReference(node: Node): node is ModuleReference;
- function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
- function isJsxClosingElement(node: Node): node is JsxClosingElement;
- function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression;
- function isJsxChild(node: Node): node is JsxChild;
- function isJsxAttributeLike(node: Node): node is JsxAttributeLike;
- function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
- function isJsxAttribute(node: Node): node is JsxAttribute;
- function isStringLiteralOrJsxExpression(node: Node): node is StringLiteral | JsxExpression;
- function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
- function isHeritageClause(node: Node): node is HeritageClause;
- function isCatchClause(node: Node): node is CatchClause;
- function isPropertyAssignment(node: Node): node is PropertyAssignment;
- function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
- function isEnumMember(node: Node): node is EnumMember;
- function isSourceFile(node: Node): node is SourceFile;
- function isWatchSet(options: CompilerOptions): boolean;
+ interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForDirectory(directoryName: string): Map<ResolvedModuleWithFailedLookupLocations>;
+ }
+ interface NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string): PerModuleNameCache;
+ }
+ interface PerModuleNameCache {
+ get(directory: string): ResolvedModuleWithFailedLookupLocations;
+ set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
+ }
+ function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string): ModuleResolutionCache;
+ function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache): ResolvedModuleWithFailedLookupLocations;
}
declare namespace ts {
function getDefaultLibFileName(options: CompilerOptions): string;
@@ -9244,317 +2446,307 @@ declare namespace ts {
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}, errors?: Diagnostic[]): void;
+ function getOriginalNode(node: Node): Node;
+ function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
+ function isParseTreeNode(node: Node): boolean;
+ function getParseTreeNode(node: Node): Node;
+ function getParseTreeNode<T extends Node>(node: Node, nodeTest?: (node: Node) => node is T): T;
+ function unescapeIdentifier(identifier: string): string;
}
declare namespace ts {
- function updateNode<T extends Node>(updated: T, original: T): T;
- function createNodeArray<T extends Node>(elements?: T[], location?: TextRange, hasTrailingComma?: boolean): NodeArray<T>;
- function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
- function createSynthesizedNodeArray<T extends Node>(elements?: T[]): NodeArray<T>;
- function getSynthesizedClone<T extends Node>(node: T): T;
- function getMutableClone<T extends Node>(node: T): T;
- function createLiteral(textSource: StringLiteral | NumericLiteral | Identifier, location?: TextRange): StringLiteral;
- function createLiteral(value: string, location?: TextRange): StringLiteral;
- function createLiteral(value: number, location?: TextRange): NumericLiteral;
- function createLiteral(value: boolean, location?: TextRange): BooleanLiteral;
- function createLiteral(value: string | number | boolean, location?: TextRange): PrimaryExpression;
- function createIdentifier(text: string, location?: TextRange): Identifier;
- function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, location?: TextRange): Identifier;
- function createLoopVariable(location?: TextRange): Identifier;
- function createUniqueName(text: string, location?: TextRange): Identifier;
- function getGeneratedNameForNode(node: Node, location?: TextRange): Identifier;
+ function createNodeArray<T extends Node>(elements?: T[], hasTrailingComma?: boolean): NodeArray<T>;
+ function createLiteral(value: string): StringLiteral;
+ function createLiteral(value: number): NumericLiteral;
+ function createLiteral(value: boolean): BooleanLiteral;
+ function createLiteral(sourceNode: StringLiteral | NumericLiteral | Identifier): StringLiteral;
+ function createLiteral(value: string | number | boolean): PrimaryExpression;
+ function createNumericLiteral(value: string): NumericLiteral;
+ function createIdentifier(text: string): Identifier;
+ function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
+ function createLoopVariable(): Identifier;
+ function createUniqueName(text: string): Identifier;
+ function getGeneratedNameForNode(node: Node): Identifier;
function createToken<TKind extends SyntaxKind>(token: TKind): Token<TKind>;
- function createSuper(): PrimaryExpression;
- function createThis(location?: TextRange): PrimaryExpression;
- function createNull(): PrimaryExpression;
- function createComputedPropertyName(expression: Expression, location?: TextRange): ComputedPropertyName;
+ function createSuper(): SuperExpression;
+ function createThis(): ThisExpression & Token<SyntaxKind.ThisKeyword>;
+ function createNull(): NullLiteral & Token<SyntaxKind.NullKeyword>;
+ function createTrue(): BooleanLiteral & Token<SyntaxKind.TrueKeyword>;
+ function createFalse(): BooleanLiteral & Token<SyntaxKind.FalseKeyword>;
+ function createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
+ function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+ function createComputedPropertyName(expression: Expression): ComputedPropertyName;
function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
- function createParameter(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression, location?: TextRange, flags?: NodeFlags): ParameterDeclaration;
- function updateParameter(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: BindingName, type: TypeNode, initializer: Expression): ParameterDeclaration;
- function createProperty(decorators: Decorator[], modifiers: Modifier[], name: string | PropertyName, questionToken: QuestionToken, type: TypeNode, initializer: Expression, location?: TextRange): PropertyDeclaration;
- function updateProperty(node: PropertyDeclaration, decorators: Decorator[], modifiers: Modifier[], name: PropertyName, type: TypeNode, initializer: Expression): PropertyDeclaration;
- function createMethod(decorators: Decorator[], modifiers: Modifier[], asteriskToken: AsteriskToken, name: string | PropertyName, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block, location?: TextRange, flags?: NodeFlags): MethodDeclaration;
- function updateMethod(node: MethodDeclaration, decorators: Decorator[], modifiers: Modifier[], name: PropertyName, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block): MethodDeclaration;
- function createConstructor(decorators: Decorator[], modifiers: Modifier[], parameters: ParameterDeclaration[], body: Block, location?: TextRange, flags?: NodeFlags): ConstructorDeclaration;
- function updateConstructor(node: ConstructorDeclaration, decorators: Decorator[], modifiers: Modifier[], parameters: ParameterDeclaration[], body: Block): ConstructorDeclaration;
- function createGetAccessor(decorators: Decorator[], modifiers: Modifier[], name: string | PropertyName, parameters: ParameterDeclaration[], type: TypeNode, body: Block, location?: TextRange, flags?: NodeFlags): GetAccessorDeclaration;
- function updateGetAccessor(node: GetAccessorDeclaration, decorators: Decorator[], modifiers: Modifier[], name: PropertyName, parameters: ParameterDeclaration[], type: TypeNode, body: Block): GetAccessorDeclaration;
- function createSetAccessor(decorators: Decorator[], modifiers: Modifier[], name: string | PropertyName, parameters: ParameterDeclaration[], body: Block, location?: TextRange, flags?: NodeFlags): SetAccessorDeclaration;
- function updateSetAccessor(node: SetAccessorDeclaration, decorators: Decorator[], modifiers: Modifier[], name: PropertyName, parameters: ParameterDeclaration[], body: Block): SetAccessorDeclaration;
- function createObjectBindingPattern(elements: BindingElement[], location?: TextRange): ObjectBindingPattern;
+ function createSignatureDeclaration(kind: SyntaxKind, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): SignatureDeclaration;
+ function createFunctionTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): FunctionTypeNode;
+ function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): FunctionTypeNode;
+ function createConstructorTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructorTypeNode;
+ function updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function createKeywordTypeNode(kind: KeywordTypeNode["kind"]): KeywordTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
+ function createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
+ function createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ function createTypePredicateNode(parameterName: Identifier | ThisTypeNode | string, type: TypeNode): TypePredicateNode;
+ function updateTypePredicateNode(node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode): TypePredicateNode;
+ function createTypeQueryNode(exprName: EntityName): TypeQueryNode;
+ function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
+ function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType, types: TypeNode[]): UnionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.IntersectionType, types: TypeNode[]): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node: UnionOrIntersectionTypeNode, types: NodeArray<TypeNode>): UnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members: TypeElement[]): TypeLiteralNode;
+ function updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
+ function createTupleTypeNode(elementTypes: TypeNode[]): TupleTypeNode;
+ function updateTypleTypeNode(node: TupleTypeNode, elementTypes: TypeNode[]): TupleTypeNode;
+ function createMappedTypeNode(readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
+ function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name: string | Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function createPropertySignature(name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createIndexSignatureDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function createParameter(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ function updateParameter(node: ParameterDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ function createDecorator(expression: Expression): Decorator;
+ function updateDecorator(node: Decorator, expression: Expression): Decorator;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function createMethodDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function updateMethod(node: MethodDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function createConstructor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function updateConstructor(node: ConstructorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function createGetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function updateGetAccessor(node: GetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function createSetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function updateSetAccessor(node: SetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
- function createArrayBindingPattern(elements: ArrayBindingElement[], location?: TextRange): ArrayBindingPattern;
+ function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
function updateArrayBindingPattern(node: ArrayBindingPattern, elements: ArrayBindingElement[]): ArrayBindingPattern;
- function createBindingElement(propertyName: string | PropertyName, dotDotDotToken: DotDotDotToken, name: string | BindingName, initializer?: Expression, location?: TextRange): BindingElement;
- function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken, propertyName: PropertyName, name: BindingName, initializer: Expression): BindingElement;
- function createArrayLiteral(elements?: Expression[], location?: TextRange, multiLine?: boolean): ArrayLiteralExpression;
+ function createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
+ function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
+ function createArrayLiteral(elements?: Expression[], multiLine?: boolean): ArrayLiteralExpression;
function updateArrayLiteral(node: ArrayLiteralExpression, elements: Expression[]): ArrayLiteralExpression;
- function createObjectLiteral(properties?: ObjectLiteralElementLike[], location?: TextRange, multiLine?: boolean): ObjectLiteralExpression;
+ function createObjectLiteral(properties?: ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
function updateObjectLiteral(node: ObjectLiteralExpression, properties: ObjectLiteralElementLike[]): ObjectLiteralExpression;
- function createPropertyAccess(expression: Expression, name: string | Identifier, location?: TextRange, flags?: NodeFlags): PropertyAccessExpression;
+ function createPropertyAccess(expression: Expression, name: string | Identifier): PropertyAccessExpression;
function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier): PropertyAccessExpression;
- function createElementAccess(expression: Expression, index: number | Expression, location?: TextRange): ElementAccessExpression;
+ function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression;
function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
- function createCall(expression: Expression, typeArguments: TypeNode[], argumentsArray: Expression[], location?: TextRange, flags?: NodeFlags): CallExpression;
- function updateCall(node: CallExpression, expression: Expression, typeArguments: TypeNode[], argumentsArray: Expression[]): CallExpression;
- function createNew(expression: Expression, typeArguments: TypeNode[], argumentsArray: Expression[], location?: TextRange, flags?: NodeFlags): NewExpression;
- function updateNew(node: NewExpression, expression: Expression, typeArguments: TypeNode[], argumentsArray: Expression[]): NewExpression;
- function createTaggedTemplate(tag: Expression, template: TemplateLiteral, location?: TextRange): TaggedTemplateExpression;
+ function createCall(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function updateCall(node: CallExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function createNew(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function updateNew(node: NewExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function createTaggedTemplate(tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
- function createParen(expression: Expression, location?: TextRange): ParenthesizedExpression;
+ function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+ function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+ function createParen(expression: Expression): ParenthesizedExpression;
function updateParen(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
- function createFunctionExpression(modifiers: Modifier[], asteriskToken: AsteriskToken, name: string | Identifier, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block, location?: TextRange, flags?: NodeFlags): FunctionExpression;
- function updateFunctionExpression(node: FunctionExpression, modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block): FunctionExpression;
- function createArrowFunction(modifiers: Modifier[], typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody, location?: TextRange, flags?: NodeFlags): ArrowFunction;
- function updateArrowFunction(node: ArrowFunction, modifiers: Modifier[], typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: ConciseBody): ArrowFunction;
- function createDelete(expression: Expression, location?: TextRange): DeleteExpression;
- function updateDelete(node: DeleteExpression, expression: Expression): Expression;
- function createTypeOf(expression: Expression, location?: TextRange): TypeOfExpression;
- function updateTypeOf(node: TypeOfExpression, expression: Expression): Expression;
- function createVoid(expression: Expression, location?: TextRange): VoidExpression;
+ function createFunctionExpression(modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function updateFunctionExpression(node: FunctionExpression, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function createArrowFunction(modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ function updateArrowFunction(node: ArrowFunction, modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
+ function createDelete(expression: Expression): DeleteExpression;
+ function updateDelete(node: DeleteExpression, expression: Expression): DeleteExpression;
+ function createTypeOf(expression: Expression): TypeOfExpression;
+ function updateTypeOf(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+ function createVoid(expression: Expression): VoidExpression;
function updateVoid(node: VoidExpression, expression: Expression): VoidExpression;
- function createAwait(expression: Expression, location?: TextRange): AwaitExpression;
+ function createAwait(expression: Expression): AwaitExpression;
function updateAwait(node: AwaitExpression, expression: Expression): AwaitExpression;
- function createPrefix(operator: PrefixUnaryOperator, operand: Expression, location?: TextRange): PrefixUnaryExpression;
+ function createPrefix(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
function updatePrefix(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
- function createPostfix(operand: Expression, operator: PostfixUnaryOperator, location?: TextRange): PostfixUnaryExpression;
+ function createPostfix(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
function updatePostfix(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
- function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression, location?: TextRange): BinaryExpression;
+ function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
function updateBinary(node: BinaryExpression, left: Expression, right: Expression): BinaryExpression;
- function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression, location?: TextRange): ConditionalExpression;
- function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression, location?: TextRange): ConditionalExpression;
+ function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
function updateConditional(node: ConditionalExpression, condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
- function createTemplateExpression(head: TemplateHead, templateSpans: TemplateSpan[], location?: TextRange): TemplateExpression;
+ function createTemplateExpression(head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
- function createYield(asteriskToken: AsteriskToken, expression: Expression, location?: TextRange): YieldExpression;
- function updateYield(node: YieldExpression, expression: Expression): YieldExpression;
- function createSpread(expression: Expression, location?: TextRange): SpreadElement;
+ function createYield(expression?: Expression): YieldExpression;
+ function createYield(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
+ function updateYield(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ function createSpread(expression: Expression): SpreadElement;
function updateSpread(node: SpreadElement, expression: Expression): SpreadElement;
- function createClassExpression(modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], heritageClauses: HeritageClause[], members: ClassElement[], location?: TextRange): ClassExpression;
- function updateClassExpression(node: ClassExpression, modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
- function createOmittedExpression(location?: TextRange): OmittedExpression;
- function createExpressionWithTypeArguments(typeArguments: TypeNode[], expression: Expression, location?: TextRange): ExpressionWithTypeArguments;
+ function createClassExpression(modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function updateClassExpression(node: ClassExpression, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function createOmittedExpression(): OmittedExpression;
+ function createExpressionWithTypeArguments(typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
- function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail, location?: TextRange): TemplateSpan;
+ function createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+ function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+ function createNonNullExpression(expression: Expression): NonNullExpression;
+ function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
- function createBlock(statements: Statement[], location?: TextRange, multiLine?: boolean, flags?: NodeFlags): Block;
+ function createBlock(statements: Statement[], multiLine?: boolean): Block;
function updateBlock(node: Block, statements: Statement[]): Block;
- function createVariableStatement(modifiers: Modifier[], declarationList: VariableDeclarationList | VariableDeclaration[], location?: TextRange, flags?: NodeFlags): VariableStatement;
- function updateVariableStatement(node: VariableStatement, modifiers: Modifier[], declarationList: VariableDeclarationList): VariableStatement;
- function createVariableDeclarationList(declarations: VariableDeclaration[], location?: TextRange, flags?: NodeFlags): VariableDeclarationList;
+ function createVariableStatement(modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList | VariableDeclaration[]): VariableStatement;
+ function updateVariableStatement(node: VariableStatement, modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
- function createVariableDeclaration(name: string | BindingPattern | Identifier, type?: TypeNode, initializer?: Expression, location?: TextRange, flags?: NodeFlags): VariableDeclaration;
- function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode, initializer: Expression): VariableDeclaration;
- function createEmptyStatement(location: TextRange): EmptyStatement;
- function createStatement(expression: Expression, location?: TextRange, flags?: NodeFlags): ExpressionStatement;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createEmptyStatement(): EmptyStatement;
+ function createStatement(expression: Expression): ExpressionStatement;
function updateStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
- function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement, location?: TextRange): IfStatement;
- function updateIf(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement): IfStatement;
- function createDo(statement: Statement, expression: Expression, location?: TextRange): DoStatement;
+ function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+ function updateIf(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
+ function createDo(statement: Statement, expression: Expression): DoStatement;
function updateDo(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
- function createWhile(expression: Expression, statement: Statement, location?: TextRange): WhileStatement;
+ function createWhile(expression: Expression, statement: Statement): WhileStatement;
function updateWhile(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
- function createFor(initializer: ForInitializer, condition: Expression, incrementor: Expression, statement: Statement, location?: TextRange): ForStatement;
- function updateFor(node: ForStatement, initializer: ForInitializer, condition: Expression, incrementor: Expression, statement: Statement): ForStatement;
- function createForIn(initializer: ForInitializer, expression: Expression, statement: Statement, location?: TextRange): ForInStatement;
+ function createFor(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function updateFor(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function createForIn(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
function updateForIn(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
- function createForOf(initializer: ForInitializer, expression: Expression, statement: Statement, location?: TextRange): ForOfStatement;
- function updateForOf(node: ForOfStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
- function createContinue(label?: Identifier, location?: TextRange): ContinueStatement;
- function updateContinue(node: ContinueStatement, label: Identifier): ContinueStatement;
- function createBreak(label?: Identifier, location?: TextRange): BreakStatement;
- function updateBreak(node: BreakStatement, label: Identifier): BreakStatement;
- function createReturn(expression?: Expression, location?: TextRange): ReturnStatement;
- function updateReturn(node: ReturnStatement, expression: Expression): ReturnStatement;
- function createWith(expression: Expression, statement: Statement, location?: TextRange): WithStatement;
+ function createForOf(awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function updateForOf(node: ForOfStatement, awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function createContinue(label?: string | Identifier): ContinueStatement;
+ function updateContinue(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
+ function createBreak(label?: string | Identifier): BreakStatement;
+ function updateBreak(node: BreakStatement, label: Identifier | undefined): BreakStatement;
+ function createReturn(expression?: Expression): ReturnStatement;
+ function updateReturn(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
+ function createWith(expression: Expression, statement: Statement): WithStatement;
function updateWith(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
- function createSwitch(expression: Expression, caseBlock: CaseBlock, location?: TextRange): SwitchStatement;
+ function createSwitch(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
function updateSwitch(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
- function createLabel(label: string | Identifier, statement: Statement, location?: TextRange): LabeledStatement;
+ function createLabel(label: string | Identifier, statement: Statement): LabeledStatement;
function updateLabel(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
- function createThrow(expression: Expression, location?: TextRange): ThrowStatement;
+ function createThrow(expression: Expression): ThrowStatement;
function updateThrow(node: ThrowStatement, expression: Expression): ThrowStatement;
- function createTry(tryBlock: Block, catchClause: CatchClause, finallyBlock: Block, location?: TextRange): TryStatement;
- function updateTry(node: TryStatement, tryBlock: Block, catchClause: CatchClause, finallyBlock: Block): TryStatement;
- function createCaseBlock(clauses: CaseOrDefaultClause[], location?: TextRange): CaseBlock;
+ function createTry(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function updateTry(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function createFunctionDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function updateFunctionDeclaration(node: FunctionDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function createClassDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function updateClassDeclaration(node: ClassDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function createEnumDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, members: EnumMember[]): EnumDeclaration;
+ function updateEnumDeclaration(node: EnumDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, members: EnumMember[]): EnumDeclaration;
+ function createModuleDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ function updateModuleDeclaration(node: ModuleDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ function createModuleBlock(statements: Statement[]): ModuleBlock;
+ function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
+ function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
- function createFunctionDeclaration(decorators: Decorator[], modifiers: Modifier[], asteriskToken: AsteriskToken, name: string | Identifier, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block, location?: TextRange, flags?: NodeFlags): FunctionDeclaration;
- function updateFunctionDeclaration(node: FunctionDeclaration, decorators: Decorator[], modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block): FunctionDeclaration;
- function createClassDeclaration(decorators: Decorator[], modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], heritageClauses: HeritageClause[], members: ClassElement[], location?: TextRange): ClassDeclaration;
- function updateClassDeclaration(node: ClassDeclaration, decorators: Decorator[], modifiers: Modifier[], name: Identifier, typeParameters: TypeParameterDeclaration[], heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
- function createImportDeclaration(decorators: Decorator[], modifiers: Modifier[], importClause: ImportClause, moduleSpecifier?: Expression, location?: TextRange): ImportDeclaration;
- function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[], modifiers: Modifier[], importClause: ImportClause, moduleSpecifier: Expression): ImportDeclaration;
- function createImportClause(name: Identifier, namedBindings: NamedImportBindings, location?: TextRange): ImportClause;
+ function createImportEqualsDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function createImportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier?: Expression): ImportDeclaration;
+ function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression | undefined): ImportDeclaration;
+ function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause;
function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings): ImportClause;
- function createNamespaceImport(name: Identifier, location?: TextRange): NamespaceImport;
+ function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
- function createNamedImports(elements: ImportSpecifier[], location?: TextRange): NamedImports;
+ function createNamedImports(elements: ImportSpecifier[]): NamedImports;
function updateNamedImports(node: NamedImports, elements: ImportSpecifier[]): NamedImports;
- function createImportSpecifier(propertyName: Identifier, name: Identifier, location?: TextRange): ImportSpecifier;
- function updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier, name: Identifier): ImportSpecifier;
- function createExportAssignment(decorators: Decorator[], modifiers: Modifier[], isExportEquals: boolean, expression: Expression, location?: TextRange): ExportAssignment;
- function updateExportAssignment(node: ExportAssignment, decorators: Decorator[], modifiers: Modifier[], expression: Expression): ExportAssignment;
- function createExportDeclaration(decorators: Decorator[], modifiers: Modifier[], exportClause: NamedExports, moduleSpecifier?: Expression, location?: TextRange): ExportDeclaration;
- function updateExportDeclaration(node: ExportDeclaration, decorators: Decorator[], modifiers: Modifier[], exportClause: NamedExports, moduleSpecifier: Expression): ExportDeclaration;
- function createNamedExports(elements: ExportSpecifier[], location?: TextRange): NamedExports;
+ function createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function createExportAssignment(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, isExportEquals: boolean, expression: Expression): ExportAssignment;
+ function updateExportAssignment(node: ExportAssignment, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, expression: Expression): ExportAssignment;
+ function createExportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier?: Expression): ExportDeclaration;
+ function updateExportDeclaration(node: ExportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier: Expression | undefined): ExportDeclaration;
+ function createNamedExports(elements: ExportSpecifier[]): NamedExports;
function updateNamedExports(node: NamedExports, elements: ExportSpecifier[]): NamedExports;
- function createExportSpecifier(name: string | Identifier, propertyName?: string | Identifier, location?: TextRange): ExportSpecifier;
- function updateExportSpecifier(node: ExportSpecifier, name: Identifier, propertyName: Identifier): ExportSpecifier;
- function createJsxElement(openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement, location?: TextRange): JsxElement;
+ function createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
+ function updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
+ function createExternalModuleReference(expression: Expression): ExternalModuleReference;
+ function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+ function createJsxElement(openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
- function createJsxSelfClosingElement(tagName: JsxTagNameExpression, attributes: JsxAttributeLike[], location?: TextRange): JsxSelfClosingElement;
- function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, attributes: JsxAttributeLike[]): JsxSelfClosingElement;
- function createJsxOpeningElement(tagName: JsxTagNameExpression, attributes: JsxAttributeLike[], location?: TextRange): JsxOpeningElement;
- function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, attributes: JsxAttributeLike[]): JsxOpeningElement;
- function createJsxClosingElement(tagName: JsxTagNameExpression, location?: TextRange): JsxClosingElement;
+ function createJsxSelfClosingElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function createJsxOpeningElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
- function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression, location?: TextRange): JsxAttribute;
+ function createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(jsxAttributes: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
+ function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
- function createJsxSpreadAttribute(expression: Expression, location?: TextRange): JsxSpreadAttribute;
+ function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
- function createJsxExpression(expression: Expression, location?: TextRange): JsxExpression;
- function updateJsxExpression(node: JsxExpression, expression: Expression): JsxExpression;
- function createHeritageClause(token: SyntaxKind, types: ExpressionWithTypeArguments[], location?: TextRange): HeritageClause;
+ function createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
+ function updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
+ function createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
- function createCaseClause(expression: Expression, statements: Statement[], location?: TextRange): CaseClause;
+ function createCaseClause(expression: Expression, statements: Statement[]): CaseClause;
function updateCaseClause(node: CaseClause, expression: Expression, statements: Statement[]): CaseClause;
- function createDefaultClause(statements: Statement[], location?: TextRange): DefaultClause;
+ function createDefaultClause(statements: Statement[]): DefaultClause;
function updateDefaultClause(node: DefaultClause, statements: Statement[]): DefaultClause;
- function createCatchClause(variableDeclaration: string | VariableDeclaration, block: Block, location?: TextRange): CatchClause;
+ function createCatchClause(variableDeclaration: string | VariableDeclaration, block: Block): CatchClause;
function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration, block: Block): CatchClause;
- function createPropertyAssignment(name: string | PropertyName, initializer: Expression, location?: TextRange): PropertyAssignment;
+ function createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
function updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
- function createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer: Expression, location?: TextRange): ShorthandPropertyAssignment;
- function createSpreadAssignment(expression: Expression, location?: TextRange): SpreadAssignment;
- function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression): ShorthandPropertyAssignment;
+ function createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+ function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
+ function createSpreadAssignment(expression: Expression): SpreadAssignment;
function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+ function createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
+ function updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
function updateSourceFileNode(node: SourceFile, statements: Statement[]): SourceFile;
+ function getMutableClone<T extends Node>(node: T): T;
function createNotEmittedStatement(original: Node): NotEmittedStatement;
- function createEndOfDeclarationMarker(original: Node): EndOfDeclarationMarker;
- function createMergeDeclarationMarker(original: Node): MergeDeclarationMarker;
- function createPartiallyEmittedExpression(expression: Expression, original?: Node, location?: TextRange): PartiallyEmittedExpression;
+ function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
- function createRawExpression(text: string): RawExpression;
+ function createBundle(sourceFiles: SourceFile[]): Bundle;
+ function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
function createComma(left: Expression, right: Expression): Expression;
- function createLessThan(left: Expression, right: Expression, location?: TextRange): Expression;
- function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression, location?: TextRange): DestructuringAssignment;
- function createAssignment(left: Expression, right: Expression, location?: TextRange): BinaryExpression;
+ function createLessThan(left: Expression, right: Expression): Expression;
+ function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
+ function createAssignment(left: Expression, right: Expression): BinaryExpression;
function createStrictEquality(left: Expression, right: Expression): BinaryExpression;
function createStrictInequality(left: Expression, right: Expression): BinaryExpression;
function createAdd(left: Expression, right: Expression): BinaryExpression;
function createSubtract(left: Expression, right: Expression): BinaryExpression;
- function createPostfixIncrement(operand: Expression, location?: TextRange): PostfixUnaryExpression;
+ function createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
function createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
function createLogicalOr(left: Expression, right: Expression): BinaryExpression;
function createLogicalNot(operand: Expression): PrefixUnaryExpression;
function createVoidZero(): VoidExpression;
- type TypeOfTag = "undefined" | "number" | "boolean" | "string" | "symbol" | "object" | "function";
- function createTypeCheck(value: Expression, tag: TypeOfTag): BinaryExpression;
- function createMemberAccessForPropertyName(target: Expression, memberName: PropertyName, location?: TextRange): MemberExpression;
- function createFunctionCall(func: Expression, thisArg: Expression, argumentsList: Expression[], location?: TextRange): CallExpression;
- function createFunctionApply(func: Expression, thisArg: Expression, argumentsExpression: Expression, location?: TextRange): CallExpression;
- function createArraySlice(array: Expression, start?: number | Expression): CallExpression;
- function createArrayConcat(array: Expression, values: Expression[]): CallExpression;
- function createMathPow(left: Expression, right: Expression, location?: TextRange): CallExpression;
- function createExpressionForJsxElement(jsxFactoryEntity: EntityName, reactNamespace: string, tagName: Expression, props: Expression, children: Expression[], parentElement: JsxOpeningLikeElement, location: TextRange): LeftHandSideExpression;
function createExportDefault(expression: Expression): ExportAssignment;
function createExternalModuleExport(exportName: Identifier): ExportDeclaration;
- function createLetStatement(name: Identifier, initializer: Expression, location?: TextRange): VariableStatement;
- function createLetDeclarationList(declarations: VariableDeclaration[], location?: TextRange): VariableDeclarationList;
- function createConstDeclarationList(declarations: VariableDeclaration[], location?: TextRange): VariableDeclarationList;
- function getHelperName(name: string): Identifier;
- interface CallBinding {
- target: LeftHandSideExpression;
- thisArg: Expression;
- }
- function createCallBinding(expression: Expression, recordTempVariable: (temp: Identifier) => void, languageVersion?: ScriptTarget, cacheIdentifiers?: boolean): CallBinding;
- function inlineExpressions(expressions: Expression[]): Expression;
- function createExpressionFromEntityName(node: EntityName | Expression): Expression;
- function createExpressionForPropertyName(memberName: PropertyName): Expression;
- function createExpressionForObjectLiteralElementLike(node: ObjectLiteralExpression, property: ObjectLiteralElementLike, receiver: Expression): Expression;
- function getLocalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier;
- function isLocalName(node: Identifier): boolean;
- function getExportName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier;
- function isExportName(node: Identifier): boolean;
- function getDeclarationName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier;
- function getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression;
- function getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression;
- function convertToFunctionBody(node: ConciseBody, multiLine?: boolean): Block;
- function addPrologueDirectives(target: Statement[], source: Statement[], ensureUseStrict?: boolean, visitor?: (node: Node) => VisitResult<Node>): number;
- function startsWithUseStrict(statements: Statement[]): boolean;
- function ensureUseStrict(statements: NodeArray<Statement>): NodeArray<Statement>;
- function parenthesizeBinaryOperand(binaryOperator: SyntaxKind, operand: Expression, isLeftSideOfBinary: boolean, leftOperand?: Expression): Expression;
- function parenthesizeForConditionalHead(condition: Expression): Expression;
- function parenthesizeForNew(expression: Expression): LeftHandSideExpression;
- function parenthesizeForAccess(expression: Expression): LeftHandSideExpression;
- function parenthesizePostfixOperand(operand: Expression): LeftHandSideExpression;
- function parenthesizePrefixOperand(operand: Expression): UnaryExpression;
- function parenthesizeExpressionForList(expression: Expression): Expression;
- function parenthesizeExpressionForExpressionStatement(expression: Expression): Expression;
- function parenthesizeConciseBody(body: ConciseBody): ConciseBody;
- const enum OuterExpressionKinds {
- Parentheses = 1,
- Assertions = 2,
- PartiallyEmittedExpressions = 4,
- All = 7,
- }
- function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression;
- function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node;
- function skipParentheses(node: Expression): Expression;
- function skipParentheses(node: Node): Node;
- function skipAssertions(node: Expression): Expression;
- function skipAssertions(node: Node): Node;
- function skipPartiallyEmittedExpressions(node: Expression): Expression;
- function skipPartiallyEmittedExpressions(node: Node): Node;
- function startOnNewLine<T extends Node>(node: T): T;
- function setOriginalNode<T extends Node>(node: T, original: Node): T;
function disposeEmitNodes(sourceFile: SourceFile): void;
- function getOrCreateEmitNode(node: Node): EmitNode;
- function getEmitFlags(node: Node): EmitFlags;
+ function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
+ function getEmitFlags(node: Node): EmitFlags | undefined;
function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
function getSourceMapRange(node: Node): TextRange;
- function setSourceMapRange<T extends Node>(node: T, range: TextRange): T;
- function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange;
- function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange): T;
+ function setSourceMapRange<T extends Node>(node: T, range: TextRange | undefined): T;
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange | undefined): T;
function getCommentRange(node: Node): TextRange;
function setCommentRange<T extends Node>(node: T, range: TextRange): T;
+ function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
- function getExternalHelpersModuleName(node: SourceFile): Identifier;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node: SourceFile, compilerOptions: CompilerOptions): Identifier;
function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
function getEmitHelpers(node: Node): EmitHelper[] | undefined;
function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
- function compareEmitHelpers(x: EmitHelper, y: EmitHelper): Comparison;
- function setTextRange<T extends TextRange>(node: T, location: TextRange): T;
- function setNodeFlags<T extends Node>(node: T, flags: NodeFlags): T;
- function setMultiLine<T extends ObjectLiteralExpression | ArrayLiteralExpression | Block>(node: T, multiLine: boolean): T;
- function setHasTrailingComma<T extends Node>(nodes: NodeArray<T>, hasTrailingComma: boolean): NodeArray<T>;
- function getLocalNameForExternalImport(node: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, sourceFile: SourceFile): Identifier;
- function getExternalModuleNameLiteral(importNode: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, compilerOptions: CompilerOptions): StringLiteral;
- function tryGetModuleNameFromFile(file: SourceFile, host: EmitHost, options: CompilerOptions): StringLiteral;
- function getInitializerOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): Expression | undefined;
- function getTargetOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): BindingOrAssignmentElementTarget;
- function getRestIndicatorOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): BindingOrAssignmentElementRestIndicator;
- function getPropertyNameOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): PropertyName;
- function getElementsOfBindingOrAssignmentPattern(name: BindingOrAssignmentPattern): BindingOrAssignmentElement[];
- function convertToArrayAssignmentElement(element: BindingOrAssignmentElement): Expression;
- function convertToObjectAssignmentElement(element: BindingOrAssignmentElement): ObjectLiteralElementLike;
- function convertToAssignmentPattern(node: BindingOrAssignmentPattern): AssignmentPattern;
- function convertToObjectAssignmentPattern(node: ObjectBindingOrAssignmentPattern): ObjectLiteralExpression;
- function convertToArrayAssignmentPattern(node: ArrayBindingOrAssignmentPattern): ArrayLiteralExpression;
- function convertToAssignmentElementTarget(node: BindingOrAssignmentElementTarget): Expression;
- interface ExternalModuleInfo {
- externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
- externalHelpersImportDeclaration: ImportDeclaration | undefined;
- exportSpecifiers: Map<ExportSpecifier[]>;
- exportedBindings: Map<Identifier[]>;
- exportedNames: Identifier[];
- exportEquals: ExportAssignment | undefined;
- hasExportStarsToExportValues: boolean;
- }
- function collectExternalModuleInfo(sourceFile: SourceFile, resolver: EmitResolver, compilerOptions: CompilerOptions): ExternalModuleInfo;
+ function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@@ -9563,140 +2755,26 @@ declare namespace ts {
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
- function parseIsolatedJSDocComment(content: string, start?: number, length?: number): {
- jsDoc: JSDoc;
- diagnostics: Diagnostic[];
- };
- function parseJSDocTypeExpressionForTests(content: string, start?: number, length?: number): {
- jsDocTypeExpression: JSDocTypeExpression;
- diagnostics: Diagnostic[];
- };
}
declare namespace ts {
- const enum ModuleInstanceState {
- NonInstantiated = 0,
- Instantiated = 1,
- ConstEnumOnly = 2,
- }
- function getModuleInstanceState(node: Node): ModuleInstanceState;
- function bindSourceFile(file: SourceFile, options: CompilerOptions): void;
- function computeTransformFlagsForNode(node: Node, subtreeFlags: TransformFlags): TransformFlags;
- function getTransformFlagsSubtreeExclusions(kind: SyntaxKind): TransformFlags;
+ function visitNode<T extends Node>(node: T, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
+ function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): NodeArray<ParameterDeclaration>;
+ function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
+ function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
+ function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
+ function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
+ function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
}
declare namespace ts {
- function getNodeId(node: Node): number;
- function getSymbolId(symbol: Symbol): number;
- function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker;
-}
-declare namespace ts {
- type VisitResult<T extends Node> = T | T[];
- function reduceEachChild<T>(node: Node, initial: T, cbNode: (memo: T, node: Node) => T, cbNodeArray?: (memo: T, nodes: Node[]) => T): T;
- function visitNode<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, optional?: boolean, lift?: (node: NodeArray<Node>) => T): T;
- function visitNode<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, optional: boolean, lift: (node: NodeArray<Node>) => T, parenthesize: (node: Node, parentNode: Node) => Node, parentNode: Node): T;
- function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
- function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, start: number, count: number, parenthesize: (node: Node, parentNode: Node) => Node, parentNode: Node): NodeArray<T>;
- function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
- function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): NodeArray<ParameterDeclaration>;
- function visitFunctionBody(node: FunctionBody, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): FunctionBody;
- function visitFunctionBody(node: ConciseBody, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): ConciseBody;
- function visitEachChild<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): T;
- function mergeLexicalEnvironment(statements: NodeArray<Statement>, declarations: Statement[]): NodeArray<Statement>;
- function mergeLexicalEnvironment(statements: Statement[], declarations: Statement[]): Statement[];
- function mergeFunctionBodyLexicalEnvironment(body: FunctionBody, declarations: Statement[]): FunctionBody;
- function mergeFunctionBodyLexicalEnvironment(body: ConciseBody, declarations: Statement[]): ConciseBody;
- function liftToBlock(nodes: Node[]): Statement;
- function aggregateTransformFlags<T extends Node>(node: T): T;
- namespace Debug {
- const failNotOptional: typeof noop;
- const failBadSyntaxKind: (node: Node, message?: string) => void;
- const assertEachNode: (nodes: Node[], test: (node: Node) => boolean, message?: string) => void;
- const assertNode: (node: Node, test: (node: Node) => boolean, message?: string) => void;
- const assertOptionalNode: (node: Node, test: (node: Node) => boolean, message?: string) => void;
- const assertOptionalToken: (node: Node, kind: SyntaxKind, message?: string) => void;
- const assertMissingNode: (node: Node, message?: string) => void;
- }
-}
-declare namespace ts {
- const enum FlattenLevel {
- All = 0,
- ObjectRest = 1,
- }
- function flattenDestructuringAssignment(node: VariableDeclaration | DestructuringAssignment, visitor: ((node: Node) => VisitResult<Node>) | undefined, context: TransformationContext, level: FlattenLevel, needsValue?: boolean, createAssignmentCallback?: (name: Identifier, value: Expression, location?: TextRange) => Expression): Expression;
- function flattenDestructuringBinding(node: VariableDeclaration | ParameterDeclaration, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext, level: FlattenLevel, rval?: Expression, hoistTempVariables?: boolean, skipInitializer?: boolean): VariableDeclaration[];
-}
-declare namespace ts {
- function transformTypeScript(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformESNext(context: TransformationContext): (node: SourceFile) => SourceFile;
- function createAssignHelper(context: TransformationContext, attributesSegments: Expression[]): CallExpression;
-}
-declare namespace ts {
- function transformJsx(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformES2017(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformES2016(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformES2015(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformGenerators(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformES5(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformModule(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformSystemModule(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function transformES2015Module(context: TransformationContext): (node: SourceFile) => SourceFile;
-}
-declare namespace ts {
- function getTransformers(compilerOptions: CompilerOptions): Transformer[];
- function transformFiles(resolver: EmitResolver, host: EmitHost, sourceFiles: SourceFile[], transformers: Transformer[]): TransformationResult;
-}
-declare namespace ts {
- function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[];
- function writeDeclarationFile(declarationFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean, host: EmitHost, resolver: EmitResolver, emitterDiagnostics: DiagnosticCollection, emitOnlyDtsFiles: boolean): boolean;
-}
-declare namespace ts {
- interface SourceMapWriter {
- initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void;
- reset(): void;
- setSourceFile(sourceFile: SourceFile): void;
- emitPos(pos: number): void;
- emitNodeWithSourceMap(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
- emitTokenWithSourceMap(node: Node, token: SyntaxKind, tokenStartPos: number, emitCallback: (token: SyntaxKind, tokenStartPos: number) => number): number;
- getText(): string;
- getSourceMappingURL(): string;
- getSourceMapData(): SourceMapData;
- }
- function createSourceMapWriter(host: EmitHost, writer: EmitTextWriter): SourceMapWriter;
-}
-declare namespace ts {
- interface CommentWriter {
- reset(): void;
- setSourceFile(sourceFile: SourceFile): void;
- emitNodeWithComments(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
- emitBodyWithDetachedComments(node: Node, detachedRange: TextRange, emitCallback: (node: Node) => void): void;
- emitTrailingCommentsOfPosition(pos: number): void;
- }
- function createCommentWriter(host: EmitHost, writer: EmitTextWriter, sourceMap: SourceMapWriter): CommentWriter;
-}
-declare namespace ts {
- function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile, emitOnlyDtsFiles?: boolean): EmitResult;
+ function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
}
declare namespace ts {
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
- function computeCommonSourceDirectoryOfFilenames(fileNames: string[], currentDirectory: string, getCanonicalFileName: (fileName: string) => string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
interface FormatDiagnosticsHost {
@@ -9707,7 +2785,6 @@ declare namespace ts {
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
- function getResolutionDiagnostic(options: CompilerOptions, {extension}: ResolvedModuleFull): DiagnosticMessage | undefined;
}
declare namespace ts {
interface Node {
@@ -9725,12 +2802,14 @@ declare namespace ts {
getText(sourceFile?: SourceFile): string;
getFirstToken(sourceFile?: SourceFile): Node;
getLastToken(sourceFile?: SourceFile): Node;
+ forEachChild<T>(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
@@ -9742,27 +2821,27 @@ declare namespace ts {
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
- getBaseTypes(): ObjectType[];
+ getBaseTypes(): BaseType[];
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): Type[];
+ getTypeParameters(): TypeParameter[];
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface SourceFile {
- version: string;
- scriptSnapshot: IScriptSnapshot;
- nameTable: Map<number>;
- getNamedDeclarations(): Map<Declaration[]>;
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineEndOfPosition(pos: number): number;
getLineStarts(): number[];
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
}
+ interface SourceFileLike {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
interface IScriptSnapshot {
getText(start: number, end: number): string;
getLength(): number;
@@ -9806,6 +2885,7 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
directoryExists?(directoryName: string): boolean;
getDirectories?(directoryName: string): string[];
+ getCustomTransformers?(): CustomTransformers | undefined;
}
interface LanguageService {
cleanupSemanticCache(): void;
@@ -9844,11 +2924,9 @@ declare namespace ts {
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
- getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[]): CodeAction[];
+ getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
- getNonBoundSourceFile(fileName: string): SourceFile;
- getSourceFile(fileName: string): SourceFile;
dispose(): void;
}
interface Classifications {
@@ -9901,19 +2979,20 @@ declare namespace ts {
newText: string;
caretOffset: number;
}
- interface RenameLocation {
+ interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
}
- interface ReferenceEntry {
- textSpan: TextSpan;
- fileName: string;
+ interface RenameLocation extends DocumentSpan {
+ }
+ interface ReferenceEntry extends DocumentSpan {
isWriteAccess: boolean;
isDefinition: boolean;
+ isInString?: true;
}
- interface ImplementationLocation {
- textSpan: TextSpan;
- fileName: string;
+ interface ImplementationLocation extends DocumentSpan {
+ kind: string;
+ displayParts: SymbolDisplayPart[];
}
interface DocumentHighlights {
fileName: string;
@@ -9927,6 +3006,7 @@ declare namespace ts {
}
interface HighlightSpan {
fileName?: string;
+ isInString?: true;
textSpan: TextSpan;
kind: string;
}
@@ -9966,6 +3046,7 @@ declare namespace ts {
InsertSpaceAfterCommaDelimiter: boolean;
InsertSpaceAfterSemicolonInForStatements: boolean;
InsertSpaceBeforeAndAfterBinaryOperators: boolean;
+ InsertSpaceAfterConstructor?: boolean;
InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
@@ -9974,6 +3055,7 @@ declare namespace ts {
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
InsertSpaceAfterTypeAssertion?: boolean;
+ InsertSpaceBeforeFunctionParenthesis?: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
}
@@ -9981,6 +3063,7 @@ declare namespace ts {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
@@ -9989,6 +3072,7 @@ declare namespace ts {
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
insertSpaceAfterTypeAssertion?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
@@ -10035,12 +3119,17 @@ declare namespace ts {
text: string;
kind: string;
}
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
interface QuickInfo {
kind: string;
kindModifiers: string;
textSpan: TextSpan;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface RenameInfo {
canRename: boolean;
@@ -10064,6 +3153,7 @@ declare namespace ts {
separatorDisplayParts: SymbolDisplayPart[];
parameters: SignatureHelpParameter[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface SignatureHelpItems {
items: SignatureHelpItem[];
@@ -10091,6 +3181,7 @@ declare namespace ts {
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface OutliningSpan {
textSpan: TextSpan;
@@ -10155,7 +3246,7 @@ declare namespace ts {
const interfaceElement = "interface";
const typeElement = "type";
const enumElement = "enum";
- const enumMemberElement = "const";
+ const enumMemberElement = "enum member";
const variableElement = "var";
const localVariableElement = "local var";
const functionElement = "function";
@@ -10177,6 +3268,7 @@ declare namespace ts {
const letElement = "let";
const directory = "directory";
const externalModuleName = "external module name";
+ const jsxAttribute = "JSX attribute";
}
namespace ScriptElementKindModifier {
const none = "";
@@ -10241,122 +3333,7 @@ declare namespace ts {
}
}
declare namespace ts {
- const scanner: Scanner;
- const emptyArray: any[];
- const enum SemanticMeaning {
- None = 0,
- Value = 1,
- Type = 2,
- Namespace = 4,
- All = 7,
- }
- function getMeaningFromDeclaration(node: Node): SemanticMeaning;
- function getMeaningFromLocation(node: Node): SemanticMeaning;
- function isCallExpressionTarget(node: Node): boolean;
- function isNewExpressionTarget(node: Node): boolean;
- function climbPastPropertyAccess(node: Node): Node;
- function getTargetLabel(referenceNode: Node, labelName: string): Identifier;
- function isJumpStatementTarget(node: Node): boolean;
- function isLabelName(node: Node): boolean;
- function isRightSideOfQualifiedName(node: Node): boolean;
- function isRightSideOfPropertyAccess(node: Node): boolean;
- function isNameOfModuleDeclaration(node: Node): boolean;
- function isNameOfFunctionDeclaration(node: Node): boolean;
- function isLiteralNameOfPropertyDeclarationOrIndexAccess(node: Node): boolean;
- function isExpressionOfExternalModuleImportEqualsDeclaration(node: Node): boolean;
- function isInsideComment(sourceFile: SourceFile, token: Node, position: number): boolean;
- function getContainerNode(node: Node): Declaration;
- function getNodeKind(node: Node): string;
- function getStringLiteralTypeForNode(node: StringLiteral | LiteralTypeNode, typeChecker: TypeChecker): LiteralType;
- function isThis(node: Node): boolean;
- interface ListItemInfo {
- listItemIndex: number;
- list: Node;
- }
- function getLineStartPositionForPosition(position: number, sourceFile: SourceFile): number;
- function rangeContainsRange(r1: TextRange, r2: TextRange): boolean;
- function startEndContainsRange(start: number, end: number, range: TextRange): boolean;
- function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;
- function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number): boolean;
- function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number): boolean;
- function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean;
- function isCompletedNode(n: Node, sourceFile: SourceFile): boolean;
- function findListItemInfo(node: Node): ListItemInfo;
- function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean;
- function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node;
- function findContainingList(node: Node): Node;
- function getTouchingWord(sourceFile: SourceFile, position: number, includeJsDocComment?: boolean): Node;
- function getTouchingPropertyName(sourceFile: SourceFile, position: number, includeJsDocComment?: boolean): Node;
- function getTouchingToken(sourceFile: SourceFile, position: number, includeItemAtEndPosition?: (n: Node) => boolean, includeJsDocComment?: boolean): Node;
- function getTokenAtPosition(sourceFile: SourceFile, position: number, includeJsDocComment?: boolean): Node;
- function findTokenOnLeftOfPosition(file: SourceFile, position: number): Node;
- function findNextToken(previousToken: Node, parent: Node): Node;
- function findPrecedingToken(position: number, sourceFile: SourceFile, startNode?: Node): Node;
- function isInString(sourceFile: SourceFile, position: number): boolean;
- function isInComment(sourceFile: SourceFile, position: number): boolean;
- function isInsideJsxElementOrAttribute(sourceFile: SourceFile, position: number): boolean;
- function isInTemplateString(sourceFile: SourceFile, position: number): boolean;
- function isInCommentHelper(sourceFile: SourceFile, position: number, predicate?: (c: CommentRange) => boolean): boolean;
- function hasDocComment(sourceFile: SourceFile, position: number): boolean;
- function getJsDocTagAtPosition(sourceFile: SourceFile, position: number): JSDocTag;
- function getNodeModifiers(node: Node): string;
- function getTypeArgumentOrTypeParameterList(node: Node): NodeArray<Node>;
- function isToken(n: Node): boolean;
- function isWord(kind: SyntaxKind): boolean;
- function isComment(kind: SyntaxKind): boolean;
- function isStringOrRegularExpressionOrTemplateLiteral(kind: SyntaxKind): boolean;
- function isPunctuation(kind: SyntaxKind): boolean;
- function isInsideTemplateLiteral(node: LiteralExpression, position: number): boolean;
- function isAccessibilityModifier(kind: SyntaxKind): boolean;
- function compareDataObjects(dst: any, src: any): boolean;
- function isArrayLiteralOrObjectLiteralDestructuringPattern(node: Node): boolean;
- function hasTrailingDirectorySeparator(path: string): boolean;
- function isInReferenceComment(sourceFile: SourceFile, position: number): boolean;
- function isInNonReferenceComment(sourceFile: SourceFile, position: number): boolean;
-}
-declare namespace ts {
- function isFirstDeclarationOfSymbolParameter(symbol: Symbol): boolean;
- function symbolPart(text: string, symbol: Symbol): SymbolDisplayPart;
- function displayPart(text: string, kind: SymbolDisplayPartKind): SymbolDisplayPart;
- function spacePart(): SymbolDisplayPart;
- function keywordPart(kind: SyntaxKind): SymbolDisplayPart;
- function punctuationPart(kind: SyntaxKind): SymbolDisplayPart;
- function operatorPart(kind: SyntaxKind): SymbolDisplayPart;
- function textOrKeywordPart(text: string): SymbolDisplayPart;
- function textPart(text: string): SymbolDisplayPart;
- function getNewLineOrDefaultFromHost(host: LanguageServiceHost | LanguageServiceShimHost): string;
- function lineBreakPart(): SymbolDisplayPart;
- function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[];
- function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[];
- function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): SymbolDisplayPart[];
- function signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[];
- function getDeclaredName(typeChecker: TypeChecker, symbol: Symbol, location: Node): string;
- function isImportOrExportSpecifierName(location: Node): boolean;
- function stripQuotes(name: string): string;
- function scriptKindIs(fileName: string, host: LanguageServiceHost, ...scriptKinds: ScriptKind[]): boolean;
- function getScriptKind(fileName: string, host?: LanguageServiceHost): ScriptKind;
- function sanitizeConfigFile(configFileName: string, content: string): {
- configJsonObject: any;
- diagnostics: Diagnostic[];
- };
-}
-declare namespace ts.BreakpointResolver {
- function spanInSourceFileAtLocation(sourceFile: SourceFile, position: number): TextSpan;
-}
-declare namespace ts {
function createClassifier(): Classifier;
- function getSemanticClassifications(typeChecker: TypeChecker, cancellationToken: CancellationToken, sourceFile: SourceFile, classifiableNames: Map<string>, span: TextSpan): ClassifiedSpan[];
- function getEncodedSemanticClassifications(typeChecker: TypeChecker, cancellationToken: CancellationToken, sourceFile: SourceFile, classifiableNames: Map<string>, span: TextSpan): Classifications;
- function getSyntacticClassifications(cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): ClassifiedSpan[];
- function getEncodedSyntacticClassifications(cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): Classifications;
-}
-declare namespace ts.Completions {
- function getCompletionsAtPosition(host: LanguageServiceHost, typeChecker: TypeChecker, log: (message: string) => void, compilerOptions: CompilerOptions, sourceFile: SourceFile, position: number): CompletionInfo;
- function getCompletionEntryDetails(typeChecker: TypeChecker, log: (message: string) => void, compilerOptions: CompilerOptions, sourceFile: SourceFile, position: number, entryName: string): CompletionEntryDetails;
- function getCompletionEntrySymbol(typeChecker: TypeChecker, log: (message: string) => void, compilerOptions: CompilerOptions, sourceFile: SourceFile, position: number, entryName: string): Symbol;
-}
-declare namespace ts.DocumentHighlights {
- function getDocumentHighlights(typeChecker: TypeChecker, cancellationToken: CancellationToken, sourceFile: SourceFile, position: number, sourceFilesToSearch: SourceFile[]): DocumentHighlights[];
}
declare namespace ts {
interface DocumentRegistry {
@@ -10374,88 +3351,9 @@ declare namespace ts {
};
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
}
-declare namespace ts.FindAllReferences {
- function findReferencedSymbols(typeChecker: TypeChecker, cancellationToken: CancellationToken, sourceFiles: SourceFile[], sourceFile: SourceFile, position: number, findInStrings: boolean, findInComments: boolean): ReferencedSymbol[];
- function getReferencedSymbolsForNode(typeChecker: TypeChecker, cancellationToken: CancellationToken, node: Node, sourceFiles: SourceFile[], findInStrings: boolean, findInComments: boolean, implementations: boolean): ReferencedSymbol[];
- function convertReferences(referenceSymbols: ReferencedSymbol[]): ReferenceEntry[];
- function getReferenceEntriesForShorthandPropertyAssignment(node: Node, typeChecker: TypeChecker, result: ReferenceEntry[]): void;
- function getReferenceEntryFromNode(node: Node): ReferenceEntry;
-}
-declare namespace ts.GoToDefinition {
- function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number): DefinitionInfo[];
- function getTypeDefinitionAtPosition(typeChecker: TypeChecker, sourceFile: SourceFile, position: number): DefinitionInfo[];
-}
-declare namespace ts.GoToImplementation {
- function getImplementationAtPosition(typeChecker: TypeChecker, cancellationToken: CancellationToken, sourceFiles: SourceFile[], node: Node): ImplementationLocation[];
-}
-declare namespace ts.JsDoc {
- function getJsDocCommentsFromDeclarations(declarations: Declaration[]): SymbolDisplayPart[];
- function getAllJsDocCompletionEntries(): CompletionEntry[];
- function getDocCommentTemplateAtPosition(newLine: string, sourceFile: SourceFile, position: number): TextInsertion;
-}
-declare namespace ts.NavigateTo {
- function getNavigateToItems(sourceFiles: SourceFile[], checker: TypeChecker, cancellationToken: CancellationToken, searchValue: string, maxResultCount: number, excludeDtsFiles: boolean): NavigateToItem[];
-}
-declare namespace ts.NavigationBar {
- function getNavigationBarItems(sourceFile: SourceFile): NavigationBarItem[];
- function getNavigationTree(sourceFile: SourceFile): NavigationTree;
-}
-declare namespace ts.OutliningElementsCollector {
- function collectElements(sourceFile: SourceFile): OutliningSpan[];
-}
-declare namespace ts {
- enum PatternMatchKind {
- exact = 0,
- prefix = 1,
- substring = 2,
- camelCase = 3,
- }
- interface PatternMatch {
- kind: PatternMatchKind;
- camelCaseWeight?: number;
- isCaseSensitive: boolean;
- punctuationStripped: boolean;
- }
- interface PatternMatcher {
- getMatchesForLastSegmentOfPattern(candidate: string): PatternMatch[];
- getMatches(candidateContainers: string[], candidate: string): PatternMatch[];
- patternContainsDots: boolean;
- }
- function createPatternMatcher(pattern: string): PatternMatcher;
- function breakIntoCharacterSpans(identifier: string): TextSpan[];
- function breakIntoWordSpans(identifier: string): TextSpan[];
-}
declare namespace ts {
function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
}
-declare namespace ts.Rename {
- function getRenameInfo(typeChecker: TypeChecker, defaultLibFileName: string, getCanonicalFileName: (fileName: string) => string, sourceFile: SourceFile, position: number): RenameInfo;
-}
-declare namespace ts.SignatureHelp {
- const enum ArgumentListKind {
- TypeArguments = 0,
- CallArguments = 1,
- TaggedTemplateArguments = 2,
- }
- interface ArgumentListInfo {
- kind: ArgumentListKind;
- invocation: CallLikeExpression;
- argumentsSpan: TextSpan;
- argumentIndex?: number;
- argumentCount: number;
- }
- function getSignatureHelpItems(program: Program, sourceFile: SourceFile, position: number, cancellationToken: CancellationToken): SignatureHelpItems;
- function getContainingArgumentInfo(node: Node, position: number, sourceFile: SourceFile): ArgumentListInfo;
-}
-declare namespace ts.SymbolDisplay {
- function getSymbolKind(typeChecker: TypeChecker, symbol: Symbol, location: Node): string;
- function getSymbolModifiers(symbol: Symbol): string;
- function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node, location: Node, semanticMeaning?: SemanticMeaning): {
- displayParts: SymbolDisplayPart[];
- documentation: SymbolDisplayPart[];
- symbolKind: string;
- };
-}
declare namespace ts {
interface TranspileOptions {
compilerOptions?: CompilerOptions;
@@ -10472,474 +3370,1349 @@ declare namespace ts {
function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
}
-declare namespace ts.formatting {
- interface FormattingScanner {
- advance(): void;
- isOnToken(): boolean;
- readTokenInfo(n: Node): TokenInfo;
- getCurrentLeadingTrivia(): TextRangeWithKind[];
- lastTrailingTriviaWasNewLine(): boolean;
- skipToEndOf(node: Node): void;
- close(): void;
+declare namespace ts {
+ const servicesVersion = "0.5";
+ interface DisplayPartsSymbolWriter extends SymbolWriter {
+ displayParts(): SymbolDisplayPart[];
}
- function getFormattingScanner(sourceFile: SourceFile, startPos: number, endPos: number): FormattingScanner;
+ function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
+ function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
+ function getDefaultCompilerOptions(): CompilerOptions;
+ function getSupportedCodeFixes(): string[];
+ function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
+ let disableIncrementalParsing: boolean;
+ function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
+ function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
+ function getDefaultLibFilePath(options: CompilerOptions): string;
}
-declare namespace ts.formatting {
- class FormattingContext {
- sourceFile: SourceFile;
- formattingRequestKind: FormattingRequestKind;
- currentTokenSpan: TextRangeWithKind;
- nextTokenSpan: TextRangeWithKind;
- contextNode: Node;
- currentTokenParent: Node;
- nextTokenParent: Node;
- private contextNodeAllOnSameLine;
- private nextNodeAllOnSameLine;
- private tokensAreOnSameLine;
- private contextNodeBlockIsOnOneLine;
- private nextNodeBlockIsOnOneLine;
- constructor(sourceFile: SourceFile, formattingRequestKind: FormattingRequestKind);
- updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node): void;
- ContextNodeAllOnSameLine(): boolean;
- NextNodeAllOnSameLine(): boolean;
- TokensAreOnSameLine(): boolean;
- ContextNodeBlockIsOnOneLine(): boolean;
- NextNodeBlockIsOnOneLine(): boolean;
- private NodeIsOnOneLine(node);
- private BlockIsOnOneLine(node);
+declare namespace ts.server {
+ interface CompressedData {
+ length: number;
+ compressionKind: string;
+ data: any;
+ }
+ type RequireResult = {
+ module: {};
+ error: undefined;
+ } | {
+ module: undefined;
+ error: {};
+ };
+ interface ServerHost extends System {
+ setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
+ clearTimeout(timeoutId: any): void;
+ setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
+ clearImmediate(timeoutId: any): void;
+ gc?(): void;
+ trace?(s: string): void;
+ require?(initialPath: string, moduleName: string): RequireResult;
+ }
+ interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
+ " __sortedReadonlyArrayBrand": any;
+ }
+ interface TypingInstallerRequest {
+ readonly projectName: string;
+ readonly kind: "discover" | "closeProject";
+ }
+ interface DiscoverTypings extends TypingInstallerRequest {
+ readonly fileNames: string[];
+ readonly projectRootPath: ts.Path;
+ readonly compilerOptions: ts.CompilerOptions;
+ readonly typeAcquisition: ts.TypeAcquisition;
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly cachePath?: string;
+ readonly kind: "discover";
+ }
+ interface CloseProject extends TypingInstallerRequest {
+ readonly kind: "closeProject";
+ }
+ type ActionSet = "action::set";
+ type ActionInvalidate = "action::invalidate";
+ type EventBeginInstallTypes = "event::beginInstallTypes";
+ type EventEndInstallTypes = "event::endInstallTypes";
+ type EventInitializationFailed = "event::initializationFailed";
+ interface TypingInstallerResponse {
+ readonly kind: ActionSet | ActionInvalidate | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
+ }
+ interface InitializationFailedResponse extends TypingInstallerResponse {
+ readonly kind: EventInitializationFailed;
+ readonly message: string;
+ }
+ interface ProjectResponse extends TypingInstallerResponse {
+ readonly projectName: string;
+ }
+ interface SetTypings extends ProjectResponse {
+ readonly typeAcquisition: ts.TypeAcquisition;
+ readonly compilerOptions: ts.CompilerOptions;
+ readonly typings: string[];
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly kind: ActionSet;
+ }
+ interface InvalidateCachedTypings extends ProjectResponse {
+ readonly kind: ActionInvalidate;
+ }
+ interface InstallTypes extends ProjectResponse {
+ readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
+ readonly eventId: number;
+ readonly typingsInstallerVersion: string;
+ readonly packagesToInstall: ReadonlyArray<string>;
+ }
+ interface BeginInstallTypes extends InstallTypes {
+ readonly kind: EventBeginInstallTypes;
+ }
+ interface EndInstallTypes extends InstallTypes {
+ readonly kind: EventEndInstallTypes;
+ readonly installSuccess: boolean;
}
}
-declare namespace ts.formatting {
- const enum FormattingRequestKind {
- FormatDocument = 0,
- FormatSelection = 1,
- FormatOnEnter = 2,
- FormatOnSemicolon = 3,
- FormatOnClosingCurlyBrace = 4,
+declare namespace ts.server {
+ const ActionSet: ActionSet;
+ const ActionInvalidate: ActionInvalidate;
+ const EventBeginInstallTypes: EventBeginInstallTypes;
+ const EventEndInstallTypes: EventEndInstallTypes;
+ const EventInitializationFailed: EventInitializationFailed;
+ namespace Arguments {
+ const GlobalCacheLocation = "--globalTypingsCacheLocation";
+ const LogFile = "--logFile";
+ const EnableTelemetry = "--enableTelemetry";
+ const TypingSafeListLocation = "--typingSafeListLocation";
}
+ function hasArgument(argumentName: string): boolean;
+ function findArgument(argumentName: string): string;
}
-declare namespace ts.formatting {
- class Rule {
- Descriptor: RuleDescriptor;
- Operation: RuleOperation;
- Flag: RuleFlags;
- constructor(Descriptor: RuleDescriptor, Operation: RuleOperation, Flag?: RuleFlags);
- toString(): string;
+declare namespace ts.server {
+ enum LogLevel {
+ terse = 0,
+ normal = 1,
+ requestTime = 2,
+ verbose = 3,
}
-}
-declare namespace ts.formatting {
- const enum RuleAction {
- Ignore = 1,
- Space = 2,
- NewLine = 4,
- Delete = 8,
+ const emptyArray: ReadonlyArray<any>;
+ interface Logger {
+ close(): void;
+ hasLevel(level: LogLevel): boolean;
+ loggingEnabled(): boolean;
+ perftrc(s: string): void;
+ info(s: string): void;
+ startGroup(): void;
+ endGroup(): void;
+ msg(s: string, type?: Msg.Types): void;
+ getLogFileName(): string;
}
-}
-declare namespace ts.formatting {
- class RuleDescriptor {
- LeftTokenRange: Shared.TokenRange;
- RightTokenRange: Shared.TokenRange;
- constructor(LeftTokenRange: Shared.TokenRange, RightTokenRange: Shared.TokenRange);
- toString(): string;
- static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor;
- static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor;
- static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor;
- static create4(left: Shared.TokenRange, right: Shared.TokenRange): RuleDescriptor;
+ namespace Msg {
+ type Err = "Err";
+ const Err: Err;
+ type Info = "Info";
+ const Info: Info;
+ type Perf = "Perf";
+ const Perf: Perf;
+ type Types = Err | Info | Perf;
}
-}
-declare namespace ts.formatting {
- const enum RuleFlags {
- None = 0,
- CanDeleteNewLines = 1,
+ function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, cachePath?: string): DiscoverTypings;
+ namespace Errors {
+ function ThrowNoProject(): never;
+ function ThrowProjectLanguageServiceDisabled(): never;
+ function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never;
}
-}
-declare namespace ts.formatting {
- class RuleOperation {
- Context: RuleOperationContext;
- Action: RuleAction;
- constructor(Context: RuleOperationContext, Action: RuleAction);
- toString(): string;
- static create1(action: RuleAction): RuleOperation;
- static create2(context: RuleOperationContext, action: RuleAction): RuleOperation;
+ function getDefaultFormatCodeSettings(host: ServerHost): FormatCodeSettings;
+ function mergeMapLikes(target: MapLike<any>, source: MapLike<any>): void;
+ function removeItemFromSet<T>(items: T[], itemToRemove: T): void;
+ type NormalizedPath = string & {
+ __normalizedPathTag: any;
+ };
+ function toNormalizedPath(fileName: string): NormalizedPath;
+ function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path;
+ function asNormalizedPath(fileName: string): NormalizedPath;
+ interface NormalizedPathMap<T> {
+ get(path: NormalizedPath): T;
+ set(path: NormalizedPath, value: T): void;
+ contains(path: NormalizedPath): boolean;
+ remove(path: NormalizedPath): void;
}
-}
-declare namespace ts.formatting {
- class RuleOperationContext {
- private customContextChecks;
- constructor(...funcs: {
- (context: FormattingContext): boolean;
- }[]);
- static Any: RuleOperationContext;
- IsAny(): boolean;
- InContext(context: FormattingContext): boolean;
+ function createNormalizedPathMap<T>(): NormalizedPathMap<T>;
+ interface ProjectOptions {
+ configHasFilesProperty?: boolean;
+ files?: string[];
+ wildcardDirectories?: Map<WatchDirectoryFlags>;
+ compilerOptions?: CompilerOptions;
+ typeAcquisition?: TypeAcquisition;
+ compileOnSave?: boolean;
}
-}
-declare namespace ts.formatting {
- class Rules {
- getRuleName(rule: Rule): string;
- [name: string]: any;
- IgnoreBeforeComment: Rule;
- IgnoreAfterLineComment: Rule;
- NoSpaceBeforeSemicolon: Rule;
- NoSpaceBeforeColon: Rule;
- NoSpaceBeforeQuestionMark: Rule;
- SpaceAfterColon: Rule;
- SpaceAfterQuestionMarkInConditionalOperator: Rule;
- NoSpaceAfterQuestionMark: Rule;
- SpaceAfterSemicolon: Rule;
- SpaceAfterCloseBrace: Rule;
- SpaceBetweenCloseBraceAndElse: Rule;
- SpaceBetweenCloseBraceAndWhile: Rule;
- NoSpaceAfterCloseBrace: Rule;
- NoSpaceBeforeDot: Rule;
- NoSpaceAfterDot: Rule;
- NoSpaceBeforeOpenBracket: Rule;
- NoSpaceAfterCloseBracket: Rule;
- SpaceAfterOpenBrace: Rule;
- SpaceBeforeCloseBrace: Rule;
- NoSpaceAfterOpenBrace: Rule;
- NoSpaceBeforeCloseBrace: Rule;
- NoSpaceBetweenEmptyBraceBrackets: Rule;
- NewLineAfterOpenBraceInBlockContext: Rule;
- NewLineBeforeCloseBraceInBlockContext: Rule;
- NoSpaceAfterUnaryPrefixOperator: Rule;
- NoSpaceAfterUnaryPreincrementOperator: Rule;
- NoSpaceAfterUnaryPredecrementOperator: Rule;
- NoSpaceBeforeUnaryPostincrementOperator: Rule;
- NoSpaceBeforeUnaryPostdecrementOperator: Rule;
- SpaceAfterPostincrementWhenFollowedByAdd: Rule;
- SpaceAfterAddWhenFollowedByUnaryPlus: Rule;
- SpaceAfterAddWhenFollowedByPreincrement: Rule;
- SpaceAfterPostdecrementWhenFollowedBySubtract: Rule;
- SpaceAfterSubtractWhenFollowedByUnaryMinus: Rule;
- SpaceAfterSubtractWhenFollowedByPredecrement: Rule;
- NoSpaceBeforeComma: Rule;
- SpaceAfterCertainKeywords: Rule;
- SpaceAfterLetConstInVariableDeclaration: Rule;
- NoSpaceBeforeOpenParenInFuncCall: Rule;
- SpaceAfterFunctionInFuncDecl: Rule;
- NoSpaceBeforeOpenParenInFuncDecl: Rule;
- SpaceAfterVoidOperator: Rule;
- NoSpaceBetweenReturnAndSemicolon: Rule;
- SpaceBetweenStatements: Rule;
- SpaceAfterTryFinally: Rule;
- SpaceAfterGetSetInMember: Rule;
- SpaceBeforeBinaryKeywordOperator: Rule;
- SpaceAfterBinaryKeywordOperator: Rule;
- NoSpaceAfterConstructor: Rule;
- NoSpaceAfterModuleImport: Rule;
- SpaceAfterCertainTypeScriptKeywords: Rule;
- SpaceBeforeCertainTypeScriptKeywords: Rule;
- SpaceAfterModuleName: Rule;
- SpaceBeforeArrow: Rule;
- SpaceAfterArrow: Rule;
- NoSpaceAfterEllipsis: Rule;
- NoSpaceAfterOptionalParameters: Rule;
- NoSpaceBeforeOpenAngularBracket: Rule;
- NoSpaceBetweenCloseParenAndAngularBracket: Rule;
- NoSpaceAfterOpenAngularBracket: Rule;
- NoSpaceBeforeCloseAngularBracket: Rule;
- NoSpaceAfterCloseAngularBracket: Rule;
- NoSpaceBetweenEmptyInterfaceBraceBrackets: Rule;
- HighPriorityCommonRules: Rule[];
- LowPriorityCommonRules: Rule[];
- SpaceAfterComma: Rule;
- NoSpaceAfterComma: Rule;
- SpaceBeforeBinaryOperator: Rule;
- SpaceAfterBinaryOperator: Rule;
- NoSpaceBeforeBinaryOperator: Rule;
- NoSpaceAfterBinaryOperator: Rule;
- SpaceAfterKeywordInControl: Rule;
- NoSpaceAfterKeywordInControl: Rule;
- FunctionOpenBraceLeftTokenRange: Shared.TokenRange;
- SpaceBeforeOpenBraceInFunction: Rule;
- NewLineBeforeOpenBraceInFunction: Rule;
- TypeScriptOpenBraceLeftTokenRange: Shared.TokenRange;
- SpaceBeforeOpenBraceInTypeScriptDeclWithBlock: Rule;
- NewLineBeforeOpenBraceInTypeScriptDeclWithBlock: Rule;
- ControlOpenBraceLeftTokenRange: Shared.TokenRange;
- SpaceBeforeOpenBraceInControl: Rule;
- NewLineBeforeOpenBraceInControl: Rule;
- SpaceAfterSemicolonInFor: Rule;
- NoSpaceAfterSemicolonInFor: Rule;
- SpaceAfterOpenParen: Rule;
- SpaceBeforeCloseParen: Rule;
- NoSpaceBetweenParens: Rule;
- NoSpaceAfterOpenParen: Rule;
- NoSpaceBeforeCloseParen: Rule;
- SpaceAfterOpenBracket: Rule;
- SpaceBeforeCloseBracket: Rule;
- NoSpaceBetweenBrackets: Rule;
- NoSpaceAfterOpenBracket: Rule;
- NoSpaceBeforeCloseBracket: Rule;
- SpaceAfterAnonymousFunctionKeyword: Rule;
- NoSpaceAfterAnonymousFunctionKeyword: Rule;
- SpaceBeforeAt: Rule;
- NoSpaceAfterAt: Rule;
- SpaceAfterDecorator: Rule;
- NoSpaceBetweenFunctionKeywordAndStar: Rule;
- SpaceAfterStarInGeneratorDeclaration: Rule;
- NoSpaceBetweenYieldKeywordAndStar: Rule;
- SpaceBetweenYieldOrYieldStarAndOperand: Rule;
- SpaceBetweenAsyncAndOpenParen: Rule;
- SpaceBetweenAsyncAndFunctionKeyword: Rule;
- NoSpaceBetweenTagAndTemplateString: Rule;
- NoSpaceAfterTemplateHeadAndMiddle: Rule;
- SpaceAfterTemplateHeadAndMiddle: Rule;
- NoSpaceBeforeTemplateMiddleAndTail: Rule;
- SpaceBeforeTemplateMiddleAndTail: Rule;
- NoSpaceAfterOpenBraceInJsxExpression: Rule;
- SpaceAfterOpenBraceInJsxExpression: Rule;
- NoSpaceBeforeCloseBraceInJsxExpression: Rule;
- SpaceBeforeCloseBraceInJsxExpression: Rule;
- SpaceBeforeJsxAttribute: Rule;
- SpaceBeforeSlashInJsxOpeningElement: Rule;
- NoSpaceBeforeGreaterThanTokenInJsxOpeningElement: Rule;
- NoSpaceBeforeEqualInJsxAttribute: Rule;
- NoSpaceAfterEqualInJsxAttribute: Rule;
- NoSpaceAfterTypeAssertion: Rule;
- SpaceAfterTypeAssertion: Rule;
- constructor();
- static IsForContext(context: FormattingContext): boolean;
- static IsNotForContext(context: FormattingContext): boolean;
- static IsBinaryOpContext(context: FormattingContext): boolean;
- static IsNotBinaryOpContext(context: FormattingContext): boolean;
- static IsConditionalOperatorContext(context: FormattingContext): boolean;
- static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean;
- static IsBeforeMultilineBlockContext(context: FormattingContext): boolean;
- static IsMultilineBlockContext(context: FormattingContext): boolean;
- static IsSingleLineBlockContext(context: FormattingContext): boolean;
- static IsBlockContext(context: FormattingContext): boolean;
- static IsBeforeBlockContext(context: FormattingContext): boolean;
- static NodeIsBlockContext(node: Node): boolean;
- static IsFunctionDeclContext(context: FormattingContext): boolean;
- static IsFunctionDeclarationOrFunctionExpressionContext(context: FormattingContext): boolean;
- static IsTypeScriptDeclWithBlockContext(context: FormattingContext): boolean;
- static NodeIsTypeScriptDeclWithBlockContext(node: Node): boolean;
- static IsAfterCodeBlockContext(context: FormattingContext): boolean;
- static IsControlDeclContext(context: FormattingContext): boolean;
- static IsObjectContext(context: FormattingContext): boolean;
- static IsFunctionCallContext(context: FormattingContext): boolean;
- static IsNewContext(context: FormattingContext): boolean;
- static IsFunctionCallOrNewContext(context: FormattingContext): boolean;
- static IsPreviousTokenNotComma(context: FormattingContext): boolean;
- static IsNextTokenNotCloseBracket(context: FormattingContext): boolean;
- static IsArrowFunctionContext(context: FormattingContext): boolean;
- static IsNonJsxSameLineTokenContext(context: FormattingContext): boolean;
- static IsNonJsxElementContext(context: FormattingContext): boolean;
- static IsJsxExpressionContext(context: FormattingContext): boolean;
- static IsNextTokenParentJsxAttribute(context: FormattingContext): boolean;
- static IsJsxAttributeContext(context: FormattingContext): boolean;
- static IsJsxSelfClosingElementContext(context: FormattingContext): boolean;
- static IsNotBeforeBlockInFunctionDeclarationContext(context: FormattingContext): boolean;
- static IsEndOfDecoratorContextOnSameLine(context: FormattingContext): boolean;
- static NodeIsInDecoratorContext(node: Node): boolean;
- static IsStartOfVariableDeclarationList(context: FormattingContext): boolean;
- static IsNotFormatOnEnter(context: FormattingContext): boolean;
- static IsModuleDeclContext(context: FormattingContext): boolean;
- static IsObjectTypeContext(context: FormattingContext): boolean;
- static IsTypeArgumentOrParameterOrAssertion(token: TextRangeWithKind, parent: Node): boolean;
- static IsTypeArgumentOrParameterOrAssertionContext(context: FormattingContext): boolean;
- static IsTypeAssertionContext(context: FormattingContext): boolean;
- static IsVoidOpContext(context: FormattingContext): boolean;
- static IsYieldOrYieldStarWithOperand(context: FormattingContext): boolean;
+ function isInferredProjectName(name: string): boolean;
+ function makeInferredProjectName(counter: number): string;
+ function toSortedReadonlyArray(arr: string[]): SortedReadonlyArray<string>;
+ class ThrottledOperations {
+ private readonly host;
+ private pendingTimeouts;
+ constructor(host: ServerHost);
+ schedule(operationId: string, delay: number, cb: () => void): void;
+ private static run(self, operationId, cb);
}
-}
-declare namespace ts.formatting {
- class RulesMap {
- map: RulesBucket[];
- mapRowLength: number;
- constructor();
- static create(rules: Rule[]): RulesMap;
- Initialize(rules: Rule[]): RulesBucket[];
- FillRules(rules: Rule[], rulesBucketConstructionStateList: RulesBucketConstructionState[]): void;
- private GetRuleBucketIndex(row, column);
- private FillRule(rule, rulesBucketConstructionStateList);
- GetRule(context: FormattingContext): Rule;
- }
- enum RulesPosition {
- IgnoreRulesSpecific = 0,
- IgnoreRulesAny,
- ContextRulesSpecific,
- ContextRulesAny,
- NoContextRulesSpecific,
- NoContextRulesAny,
- }
- class RulesBucketConstructionState {
- private rulesInsertionIndexBitmap;
- constructor();
- GetInsertionIndex(maskPosition: RulesPosition): number;
- IncreaseInsertionIndex(maskPosition: RulesPosition): void;
- }
- class RulesBucket {
- private rules;
- constructor();
- Rules(): Rule[];
- AddRule(rule: Rule, specificTokens: boolean, constructionState: RulesBucketConstructionState[], rulesBucketIndex: number): void;
+ class GcTimer {
+ private readonly host;
+ private readonly delay;
+ private readonly logger;
+ private timerId;
+ constructor(host: ServerHost, delay: number, logger: Logger);
+ scheduleCollect(): void;
+ private static run(self);
}
}
-declare namespace ts.formatting {
- namespace Shared {
- interface ITokenAccess {
- GetTokens(): SyntaxKind[];
- Contains(token: SyntaxKind): boolean;
- }
- class TokenRangeAccess implements ITokenAccess {
- private tokens;
- constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]);
- GetTokens(): SyntaxKind[];
- Contains(token: SyntaxKind): boolean;
- }
- class TokenValuesAccess implements ITokenAccess {
- private tokens;
- constructor(tks: SyntaxKind[]);
- GetTokens(): SyntaxKind[];
- Contains(token: SyntaxKind): boolean;
- }
- class TokenSingleValueAccess implements ITokenAccess {
- token: SyntaxKind;
- constructor(token: SyntaxKind);
- GetTokens(): SyntaxKind[];
- Contains(tokenValue: SyntaxKind): boolean;
- }
- class TokenAllAccess implements ITokenAccess {
- GetTokens(): SyntaxKind[];
- Contains(): boolean;
- toString(): string;
- }
- class TokenRange {
- tokenAccess: ITokenAccess;
- constructor(tokenAccess: ITokenAccess);
- static FromToken(token: SyntaxKind): TokenRange;
- static FromTokens(tokens: SyntaxKind[]): TokenRange;
- static FromRange(f: SyntaxKind, to: SyntaxKind, except?: SyntaxKind[]): TokenRange;
- static AllTokens(): TokenRange;
- GetTokens(): SyntaxKind[];
- Contains(token: SyntaxKind): boolean;
- toString(): string;
- static Any: TokenRange;
- static AnyIncludingMultilineComments: TokenRange;
- static Keywords: TokenRange;
- static BinaryOperators: TokenRange;
- static BinaryKeywordOperators: TokenRange;
- static UnaryPrefixOperators: TokenRange;
- static UnaryPrefixExpressions: TokenRange;
- static UnaryPreincrementExpressions: TokenRange;
- static UnaryPostincrementExpressions: TokenRange;
- static UnaryPredecrementExpressions: TokenRange;
- static UnaryPostdecrementExpressions: TokenRange;
- static Comments: TokenRange;
- static TypeNames: TokenRange;
- }
+declare namespace ts.server.protocol {
+ namespace CommandTypes {
+ type Brace = "brace";
+ type BraceCompletion = "braceCompletion";
+ type Change = "change";
+ type Close = "close";
+ type Completions = "completions";
+ type CompletionDetails = "completionEntryDetails";
+ type CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
+ type CompileOnSaveEmitFile = "compileOnSaveEmitFile";
+ type Configure = "configure";
+ type Definition = "definition";
+ type Implementation = "implementation";
+ type Exit = "exit";
+ type Format = "format";
+ type Formatonkey = "formatonkey";
+ type Geterr = "geterr";
+ type GeterrForProject = "geterrForProject";
+ type SemanticDiagnosticsSync = "semanticDiagnosticsSync";
+ type SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
+ type NavBar = "navbar";
+ type Navto = "navto";
+ type NavTree = "navtree";
+ type NavTreeFull = "navtree-full";
+ type Occurrences = "occurrences";
+ type DocumentHighlights = "documentHighlights";
+ type Open = "open";
+ type Quickinfo = "quickinfo";
+ type References = "references";
+ type Reload = "reload";
+ type Rename = "rename";
+ type Saveto = "saveto";
+ type SignatureHelp = "signatureHelp";
+ type TypeDefinition = "typeDefinition";
+ type ProjectInfo = "projectInfo";
+ type ReloadProjects = "reloadProjects";
+ type Unknown = "unknown";
+ type OpenExternalProject = "openExternalProject";
+ type OpenExternalProjects = "openExternalProjects";
+ type CloseExternalProject = "closeExternalProject";
+ type TodoComments = "todoComments";
+ type Indentation = "indentation";
+ type DocCommentTemplate = "docCommentTemplate";
+ type CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
+ type GetCodeFixes = "getCodeFixes";
+ type GetSupportedCodeFixes = "getSupportedCodeFixes";
}
-}
-declare namespace ts.formatting {
- class RulesProvider {
- private globalRules;
- private options;
- private activeRules;
- private rulesMap;
- constructor();
- getRuleName(rule: Rule): string;
- getRuleByName(name: string): Rule;
- getRulesMap(): RulesMap;
- ensureUpToDate(options: ts.FormatCodeSettings): void;
- private createActiveRules(options);
+ interface Message {
+ seq: number;
+ type: "request" | "response" | "event";
}
-}
-declare namespace ts.formatting {
- interface TextRangeWithKind extends TextRange {
- kind: SyntaxKind;
+ interface Request extends Message {
+ command: string;
+ arguments?: any;
+ }
+ interface ReloadProjectsRequest extends Message {
+ command: CommandTypes.ReloadProjects;
+ }
+ interface Event extends Message {
+ event: string;
+ body?: any;
+ }
+ interface Response extends Message {
+ request_seq: number;
+ success: boolean;
+ command: string;
+ message?: string;
+ body?: any;
+ }
+ interface FileRequestArgs {
+ file: string;
+ projectFileName?: string;
+ }
+ interface DocCommentTemplateRequest extends FileLocationRequest {
+ command: CommandTypes.DocCommentTemplate;
+ }
+ interface DocCommandTemplateResponse extends Response {
+ body?: TextInsertion;
+ }
+ interface TodoCommentRequest extends FileRequest {
+ command: CommandTypes.TodoComments;
+ arguments: TodoCommentRequestArgs;
+ }
+ interface TodoCommentRequestArgs extends FileRequestArgs {
+ descriptors: TodoCommentDescriptor[];
+ }
+ interface TodoCommentsResponse extends Response {
+ body?: TodoComment[];
+ }
+ interface IndentationRequest extends FileLocationRequest {
+ command: CommandTypes.Indentation;
+ arguments: IndentationRequestArgs;
+ }
+ interface IndentationResponse extends Response {
+ body?: IndentationResult;
+ }
+ interface IndentationResult {
+ position: number;
+ indentation: number;
+ }
+ interface IndentationRequestArgs extends FileLocationRequestArgs {
+ options?: EditorSettings;
+ }
+ interface ProjectInfoRequestArgs extends FileRequestArgs {
+ needFileNameList: boolean;
+ }
+ interface ProjectInfoRequest extends Request {
+ command: CommandTypes.ProjectInfo;
+ arguments: ProjectInfoRequestArgs;
+ }
+ interface CompilerOptionsDiagnosticsRequest extends Request {
+ arguments: CompilerOptionsDiagnosticsRequestArgs;
+ }
+ interface CompilerOptionsDiagnosticsRequestArgs {
+ projectFileName: string;
+ }
+ interface ProjectInfo {
+ configFileName: string;
+ fileNames?: string[];
+ languageServiceDisabled?: boolean;
+ }
+ interface DiagnosticWithLinePosition {
+ message: string;
+ start: number;
+ length: number;
+ startLocation: Location;
+ endLocation: Location;
+ category: string;
+ code: number;
+ }
+ interface ProjectInfoResponse extends Response {
+ body?: ProjectInfo;
+ }
+ interface FileRequest extends Request {
+ arguments: FileRequestArgs;
+ }
+ interface FileLocationRequestArgs extends FileRequestArgs {
+ line: number;
+ offset: number;
+ }
+ interface CodeFixRequest extends Request {
+ command: CommandTypes.GetCodeFixes;
+ arguments: CodeFixRequestArgs;
+ }
+ interface CodeFixRequestArgs extends FileRequestArgs {
+ startLine: number;
+ startOffset: number;
+ endLine: number;
+ endOffset: number;
+ errorCodes?: number[];
+ }
+ interface GetCodeFixesResponse extends Response {
+ body?: CodeAction[];
+ }
+ interface FileLocationRequest extends FileRequest {
+ arguments: FileLocationRequestArgs;
+ }
+ interface GetSupportedCodeFixesRequest extends Request {
+ command: CommandTypes.GetSupportedCodeFixes;
+ }
+ interface GetSupportedCodeFixesResponse extends Response {
+ body?: string[];
+ }
+ interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
+ start: number;
+ length: number;
+ }
+ interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
+ filesToSearch: string[];
+ }
+ interface DefinitionRequest extends FileLocationRequest {
+ command: CommandTypes.Definition;
+ }
+ interface TypeDefinitionRequest extends FileLocationRequest {
+ command: CommandTypes.TypeDefinition;
+ }
+ interface ImplementationRequest extends FileLocationRequest {
+ command: CommandTypes.Implementation;
+ }
+ interface Location {
+ line: number;
+ offset: number;
+ }
+ interface TextSpan {
+ start: Location;
+ end: Location;
+ }
+ interface FileSpan extends TextSpan {
+ file: string;
+ }
+ interface DefinitionResponse extends Response {
+ body?: FileSpan[];
+ }
+ interface TypeDefinitionResponse extends Response {
+ body?: FileSpan[];
+ }
+ interface ImplementationResponse extends Response {
+ body?: FileSpan[];
+ }
+ interface BraceCompletionRequest extends FileLocationRequest {
+ command: CommandTypes.BraceCompletion;
+ arguments: BraceCompletionRequestArgs;
+ }
+ interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
+ openingBrace: string;
+ }
+ interface OccurrencesRequest extends FileLocationRequest {
+ command: CommandTypes.Occurrences;
+ }
+ interface OccurrencesResponseItem extends FileSpan {
+ isWriteAccess: boolean;
+ isInString?: true;
+ }
+ interface OccurrencesResponse extends Response {
+ body?: OccurrencesResponseItem[];
+ }
+ interface DocumentHighlightsRequest extends FileLocationRequest {
+ command: CommandTypes.DocumentHighlights;
+ arguments: DocumentHighlightsRequestArgs;
+ }
+ interface HighlightSpan extends TextSpan {
+ kind: string;
+ }
+ interface DocumentHighlightsItem {
+ file: string;
+ highlightSpans: HighlightSpan[];
+ }
+ interface DocumentHighlightsResponse extends Response {
+ body?: DocumentHighlightsItem[];
+ }
+ interface ReferencesRequest extends FileLocationRequest {
+ command: CommandTypes.References;
+ }
+ interface ReferencesResponseItem extends FileSpan {
+ lineText: string;
+ isWriteAccess: boolean;
+ isDefinition: boolean;
+ }
+ interface ReferencesResponseBody {
+ refs: ReferencesResponseItem[];
+ symbolName: string;
+ symbolStartOffset: number;
+ symbolDisplayString: string;
+ }
+ interface ReferencesResponse extends Response {
+ body?: ReferencesResponseBody;
+ }
+ interface RenameRequestArgs extends FileLocationRequestArgs {
+ findInComments?: boolean;
+ findInStrings?: boolean;
+ }
+ interface RenameRequest extends FileLocationRequest {
+ command: CommandTypes.Rename;
+ arguments: RenameRequestArgs;
+ }
+ interface RenameInfo {
+ canRename: boolean;
+ localizedErrorMessage?: string;
+ displayName: string;
+ fullDisplayName: string;
+ kind: string;
+ kindModifiers: string;
+ }
+ interface SpanGroup {
+ file: string;
+ locs: TextSpan[];
+ }
+ interface RenameResponseBody {
+ info: RenameInfo;
+ locs: SpanGroup[];
+ }
+ interface RenameResponse extends Response {
+ body?: RenameResponseBody;
+ }
+ interface ExternalFile {
+ fileName: string;
+ scriptKind?: ScriptKindName | ts.ScriptKind;
+ hasMixedContent?: boolean;
+ content?: string;
+ }
+ interface ExternalProject {
+ projectFileName: string;
+ rootFiles: ExternalFile[];
+ options: ExternalProjectCompilerOptions;
+ typingOptions?: TypeAcquisition;
+ typeAcquisition?: TypeAcquisition;
+ }
+ interface CompileOnSaveMixin {
+ compileOnSave?: boolean;
+ }
+ type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
+ interface ProjectChanges {
+ added: string[];
+ removed: string[];
+ updated: string[];
+ }
+ interface ConfigureRequestArguments {
+ hostInfo?: string;
+ file?: string;
+ formatOptions?: FormatCodeSettings;
+ extraFileExtensions?: JsFileExtensionInfo[];
+ }
+ interface ConfigureRequest extends Request {
+ command: CommandTypes.Configure;
+ arguments: ConfigureRequestArguments;
+ }
+ interface ConfigureResponse extends Response {
+ }
+ interface OpenRequestArgs extends FileRequestArgs {
+ fileContent?: string;
+ scriptKindName?: ScriptKindName;
+ }
+ type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
+ interface OpenRequest extends Request {
+ command: CommandTypes.Open;
+ arguments: OpenRequestArgs;
+ }
+ interface OpenExternalProjectRequest extends Request {
+ command: CommandTypes.OpenExternalProject;
+ arguments: OpenExternalProjectArgs;
+ }
+ type OpenExternalProjectArgs = ExternalProject;
+ interface OpenExternalProjectsRequest extends Request {
+ command: CommandTypes.OpenExternalProjects;
+ arguments: OpenExternalProjectsArgs;
+ }
+ interface OpenExternalProjectsArgs {
+ projects: ExternalProject[];
+ }
+ interface OpenExternalProjectResponse extends Response {
+ }
+ interface OpenExternalProjectsResponse extends Response {
+ }
+ interface CloseExternalProjectRequest extends Request {
+ command: CommandTypes.CloseExternalProject;
+ arguments: CloseExternalProjectRequestArgs;
+ }
+ interface CloseExternalProjectRequestArgs {
+ projectFileName: string;
+ }
+ interface CloseExternalProjectResponse extends Response {
+ }
+ interface SetCompilerOptionsForInferredProjectsRequest extends Request {
+ command: CommandTypes.CompilerOptionsForInferredProjects;
+ arguments: SetCompilerOptionsForInferredProjectsArgs;
+ }
+ interface SetCompilerOptionsForInferredProjectsArgs {
+ options: ExternalProjectCompilerOptions;
+ }
+ interface SetCompilerOptionsForInferredProjectsResponse extends Response {
+ }
+ interface ExitRequest extends Request {
+ command: CommandTypes.Exit;
+ }
+ interface CloseRequest extends FileRequest {
+ command: CommandTypes.Close;
+ }
+ interface CompileOnSaveAffectedFileListRequest extends FileRequest {
+ command: CommandTypes.CompileOnSaveAffectedFileList;
+ }
+ interface CompileOnSaveAffectedFileListSingleProject {
+ projectFileName: string;
+ fileNames: string[];
+ projectUsesOutFile: boolean;
+ }
+ interface CompileOnSaveAffectedFileListResponse extends Response {
+ body: CompileOnSaveAffectedFileListSingleProject[];
+ }
+ interface CompileOnSaveEmitFileRequest extends FileRequest {
+ command: CommandTypes.CompileOnSaveEmitFile;
+ arguments: CompileOnSaveEmitFileRequestArgs;
+ }
+ interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
+ forced?: boolean;
+ }
+ interface QuickInfoRequest extends FileLocationRequest {
+ command: CommandTypes.Quickinfo;
+ }
+ interface QuickInfoResponseBody {
+ kind: string;
+ kindModifiers: string;
+ start: Location;
+ end: Location;
+ displayString: string;
+ documentation: string;
+ tags: JSDocTagInfo[];
+ }
+ interface QuickInfoResponse extends Response {
+ body?: QuickInfoResponseBody;
+ }
+ interface FormatRequestArgs extends FileLocationRequestArgs {
+ endLine: number;
+ endOffset: number;
+ options?: FormatCodeSettings;
+ }
+ interface FormatRequest extends FileLocationRequest {
+ command: CommandTypes.Format;
+ arguments: FormatRequestArgs;
+ }
+ interface CodeEdit {
+ start: Location;
+ end: Location;
+ newText: string;
+ }
+ interface FileCodeEdits {
+ fileName: string;
+ textChanges: CodeEdit[];
+ }
+ interface CodeFixResponse extends Response {
+ body?: CodeAction[];
+ }
+ interface CodeAction {
+ description: string;
+ changes: FileCodeEdits[];
+ }
+ interface FormatResponse extends Response {
+ body?: CodeEdit[];
+ }
+ interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
+ key: string;
+ options?: FormatCodeSettings;
+ }
+ interface FormatOnKeyRequest extends FileLocationRequest {
+ command: CommandTypes.Formatonkey;
+ arguments: FormatOnKeyRequestArgs;
+ }
+ interface CompletionsRequestArgs extends FileLocationRequestArgs {
+ prefix?: string;
+ }
+ interface CompletionsRequest extends FileLocationRequest {
+ command: CommandTypes.Completions;
+ arguments: CompletionsRequestArgs;
+ }
+ interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
+ entryNames: string[];
+ }
+ interface CompletionDetailsRequest extends FileLocationRequest {
+ command: CommandTypes.CompletionDetails;
+ arguments: CompletionDetailsRequestArgs;
+ }
+ interface SymbolDisplayPart {
+ text: string;
+ kind: string;
+ }
+ interface CompletionEntry {
+ name: string;
+ kind: string;
+ kindModifiers: string;
+ sortText: string;
+ replacementSpan?: TextSpan;
+ }
+ interface CompletionEntryDetails {
+ name: string;
+ kind: string;
+ kindModifiers: string;
+ displayParts: SymbolDisplayPart[];
+ documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
+ }
+ interface CompletionsResponse extends Response {
+ body?: CompletionEntry[];
+ }
+ interface CompletionDetailsResponse extends Response {
+ body?: CompletionEntryDetails[];
+ }
+ interface SignatureHelpParameter {
+ name: string;
+ documentation: SymbolDisplayPart[];
+ displayParts: SymbolDisplayPart[];
+ isOptional: boolean;
+ }
+ interface SignatureHelpItem {
+ isVariadic: boolean;
+ prefixDisplayParts: SymbolDisplayPart[];
+ suffixDisplayParts: SymbolDisplayPart[];
+ separatorDisplayParts: SymbolDisplayPart[];
+ parameters: SignatureHelpParameter[];
+ documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
+ }
+ interface SignatureHelpItems {
+ items: SignatureHelpItem[];
+ applicableSpan: TextSpan;
+ selectedItemIndex: number;
+ argumentIndex: number;
+ argumentCount: number;
+ }
+ interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
+ }
+ interface SignatureHelpRequest extends FileLocationRequest {
+ command: CommandTypes.SignatureHelp;
+ arguments: SignatureHelpRequestArgs;
+ }
+ interface SignatureHelpResponse extends Response {
+ body?: SignatureHelpItems;
+ }
+ interface SemanticDiagnosticsSyncRequest extends FileRequest {
+ command: CommandTypes.SemanticDiagnosticsSync;
+ arguments: SemanticDiagnosticsSyncRequestArgs;
+ }
+ interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
+ includeLinePosition?: boolean;
+ }
+ interface SemanticDiagnosticsSyncResponse extends Response {
+ body?: Diagnostic[] | DiagnosticWithLinePosition[];
+ }
+ interface SyntacticDiagnosticsSyncRequest extends FileRequest {
+ command: CommandTypes.SyntacticDiagnosticsSync;
+ arguments: SyntacticDiagnosticsSyncRequestArgs;
+ }
+ interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
+ includeLinePosition?: boolean;
+ }
+ interface SyntacticDiagnosticsSyncResponse extends Response {
+ body?: Diagnostic[] | DiagnosticWithLinePosition[];
+ }
+ interface GeterrForProjectRequestArgs {
+ file: string;
+ delay: number;
+ }
+ interface GeterrForProjectRequest extends Request {
+ command: CommandTypes.GeterrForProject;
+ arguments: GeterrForProjectRequestArgs;
+ }
+ interface GeterrRequestArgs {
+ files: string[];
+ delay: number;
+ }
+ interface GeterrRequest extends Request {
+ command: CommandTypes.Geterr;
+ arguments: GeterrRequestArgs;
+ }
+ type RequestCompletedEventName = "requestCompleted";
+ interface RequestCompletedEvent extends Event {
+ event: RequestCompletedEventName;
+ body: RequestCompletedEventBody;
+ }
+ interface RequestCompletedEventBody {
+ request_seq: number;
+ }
+ interface Diagnostic {
+ start: Location;
+ end: Location;
+ text: string;
+ code?: number;
+ }
+ interface DiagnosticEventBody {
+ file: string;
+ diagnostics: Diagnostic[];
+ }
+ interface DiagnosticEvent extends Event {
+ body?: DiagnosticEventBody;
+ }
+ interface ConfigFileDiagnosticEventBody {
+ triggerFile: string;
+ configFile: string;
+ diagnostics: Diagnostic[];
+ }
+ interface ConfigFileDiagnosticEvent extends Event {
+ body?: ConfigFileDiagnosticEventBody;
+ event: "configFileDiag";
+ }
+ type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
+ interface ProjectLanguageServiceStateEvent extends Event {
+ event: ProjectLanguageServiceStateEventName;
+ body?: ProjectLanguageServiceStateEventBody;
+ }
+ interface ProjectLanguageServiceStateEventBody {
+ projectName: string;
+ languageServiceEnabled: boolean;
+ }
+ interface ReloadRequestArgs extends FileRequestArgs {
+ tmpfile: string;
+ }
+ interface ReloadRequest extends FileRequest {
+ command: CommandTypes.Reload;
+ arguments: ReloadRequestArgs;
+ }
+ interface ReloadResponse extends Response {
+ }
+ interface SavetoRequestArgs extends FileRequestArgs {
+ tmpfile: string;
+ }
+ interface SavetoRequest extends FileRequest {
+ command: CommandTypes.Saveto;
+ arguments: SavetoRequestArgs;
+ }
+ interface NavtoRequestArgs extends FileRequestArgs {
+ searchValue: string;
+ maxResultCount?: number;
+ currentFileOnly?: boolean;
+ projectFileName?: string;
+ }
+ interface NavtoRequest extends FileRequest {
+ command: CommandTypes.Navto;
+ arguments: NavtoRequestArgs;
+ }
+ interface NavtoItem {
+ name: string;
+ kind: string;
+ matchKind?: string;
+ isCaseSensitive?: boolean;
+ kindModifiers?: string;
+ file: string;
+ start: Location;
+ end: Location;
+ containerName?: string;
+ containerKind?: string;
+ }
+ interface NavtoResponse extends Response {
+ body?: NavtoItem[];
+ }
+ interface ChangeRequestArgs extends FormatRequestArgs {
+ insertString?: string;
+ }
+ interface ChangeRequest extends FileLocationRequest {
+ command: CommandTypes.Change;
+ arguments: ChangeRequestArgs;
+ }
+ interface BraceResponse extends Response {
+ body?: TextSpan[];
+ }
+ interface BraceRequest extends FileLocationRequest {
+ command: CommandTypes.Brace;
+ }
+ interface NavBarRequest extends FileRequest {
+ command: CommandTypes.NavBar;
+ }
+ interface NavTreeRequest extends FileRequest {
+ command: CommandTypes.NavTree;
+ }
+ interface NavigationBarItem {
+ text: string;
+ kind: string;
+ kindModifiers?: string;
+ spans: TextSpan[];
+ childItems?: NavigationBarItem[];
+ indent: number;
+ }
+ interface NavigationTree {
+ text: string;
+ kind: string;
+ kindModifiers: string;
+ spans: TextSpan[];
+ childItems?: NavigationTree[];
+ }
+ type TelemetryEventName = "telemetry";
+ interface TelemetryEvent extends Event {
+ event: TelemetryEventName;
+ body: TelemetryEventBody;
+ }
+ interface TelemetryEventBody {
+ telemetryEventName: string;
+ payload: any;
+ }
+ type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
+ interface TypesInstallerInitializationFailedEvent extends Event {
+ event: TypesInstallerInitializationFailedEventName;
+ body: TypesInstallerInitializationFailedEventBody;
+ }
+ interface TypesInstallerInitializationFailedEventBody {
+ message: string;
+ }
+ type TypingsInstalledTelemetryEventName = "typingsInstalled";
+ interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
+ telemetryEventName: TypingsInstalledTelemetryEventName;
+ payload: TypingsInstalledTelemetryEventPayload;
+ }
+ interface TypingsInstalledTelemetryEventPayload {
+ installedPackages: string;
+ installSuccess: boolean;
+ typingsInstallerVersion: string;
+ }
+ type BeginInstallTypesEventName = "beginInstallTypes";
+ type EndInstallTypesEventName = "endInstallTypes";
+ interface BeginInstallTypesEvent extends Event {
+ event: BeginInstallTypesEventName;
+ body: BeginInstallTypesEventBody;
+ }
+ interface EndInstallTypesEvent extends Event {
+ event: EndInstallTypesEventName;
+ body: EndInstallTypesEventBody;
+ }
+ interface InstallTypesEventBody {
+ eventId: number;
+ packages: ReadonlyArray<string>;
+ }
+ interface BeginInstallTypesEventBody extends InstallTypesEventBody {
+ }
+ interface EndInstallTypesEventBody extends InstallTypesEventBody {
+ success: boolean;
+ }
+ interface NavBarResponse extends Response {
+ body?: NavigationBarItem[];
+ }
+ interface NavTreeResponse extends Response {
+ body?: NavigationTree;
+ }
+ namespace IndentStyle {
+ type None = "None";
+ type Block = "Block";
+ type Smart = "Smart";
+ }
+ type IndentStyle = IndentStyle.None | IndentStyle.Block | IndentStyle.Smart;
+ interface EditorSettings {
+ baseIndentSize?: number;
+ indentSize?: number;
+ tabSize?: number;
+ newLineCharacter?: string;
+ convertTabsToSpaces?: boolean;
+ indentStyle?: IndentStyle | ts.IndentStyle;
+ }
+ interface FormatCodeSettings extends EditorSettings {
+ insertSpaceAfterCommaDelimiter?: boolean;
+ insertSpaceAfterSemicolonInForStatements?: boolean;
+ insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
+ insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
+ insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
+ placeOpenBraceOnNewLineForFunctions?: boolean;
+ placeOpenBraceOnNewLineForControlBlocks?: boolean;
+ }
+ interface CompilerOptions {
+ allowJs?: boolean;
+ allowSyntheticDefaultImports?: boolean;
+ allowUnreachableCode?: boolean;
+ allowUnusedLabels?: boolean;
+ baseUrl?: string;
+ charset?: string;
+ declaration?: boolean;
+ declarationDir?: string;
+ disableSizeLimit?: boolean;
+ emitBOM?: boolean;
+ emitDecoratorMetadata?: boolean;
+ experimentalDecorators?: boolean;
+ forceConsistentCasingInFileNames?: boolean;
+ inlineSourceMap?: boolean;
+ inlineSources?: boolean;
+ isolatedModules?: boolean;
+ jsx?: JsxEmit | ts.JsxEmit;
+ lib?: string[];
+ locale?: string;
+ mapRoot?: string;
+ maxNodeModuleJsDepth?: number;
+ module?: ModuleKind | ts.ModuleKind;
+ moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
+ newLine?: NewLineKind | ts.NewLineKind;
+ noEmit?: boolean;
+ noEmitHelpers?: boolean;
+ noEmitOnError?: boolean;
+ noErrorTruncation?: boolean;
+ noFallthroughCasesInSwitch?: boolean;
+ noImplicitAny?: boolean;
+ noImplicitReturns?: boolean;
+ noImplicitThis?: boolean;
+ noUnusedLocals?: boolean;
+ noUnusedParameters?: boolean;
+ noImplicitUseStrict?: boolean;
+ noLib?: boolean;
+ noResolve?: boolean;
+ out?: string;
+ outDir?: string;
+ outFile?: string;
+ paths?: MapLike<string[]>;
+ plugins?: PluginImport[];
+ preserveConstEnums?: boolean;
+ project?: string;
+ reactNamespace?: string;
+ removeComments?: boolean;
+ rootDir?: string;
+ rootDirs?: string[];
+ skipLibCheck?: boolean;
+ skipDefaultLibCheck?: boolean;
+ sourceMap?: boolean;
+ sourceRoot?: string;
+ strictNullChecks?: boolean;
+ suppressExcessPropertyErrors?: boolean;
+ suppressImplicitAnyIndexErrors?: boolean;
+ target?: ScriptTarget | ts.ScriptTarget;
+ traceResolution?: boolean;
+ types?: string[];
+ typeRoots?: string[];
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ namespace JsxEmit {
+ type None = "None";
+ type Preserve = "Preserve";
+ type ReactNative = "ReactNative";
+ type React = "React";
+ }
+ type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.ReactNative;
+ namespace ModuleKind {
+ type None = "None";
+ type CommonJS = "CommonJS";
+ type AMD = "AMD";
+ type UMD = "UMD";
+ type System = "System";
+ type ES6 = "ES6";
+ type ES2015 = "ES2015";
+ }
+ type ModuleKind = ModuleKind.None | ModuleKind.CommonJS | ModuleKind.AMD | ModuleKind.UMD | ModuleKind.System | ModuleKind.ES6 | ModuleKind.ES2015;
+ namespace ModuleResolutionKind {
+ type Classic = "Classic";
+ type Node = "Node";
+ }
+ type ModuleResolutionKind = ModuleResolutionKind.Classic | ModuleResolutionKind.Node;
+ namespace NewLineKind {
+ type Crlf = "Crlf";
+ type Lf = "Lf";
+ }
+ type NewLineKind = NewLineKind.Crlf | NewLineKind.Lf;
+ namespace ScriptTarget {
+ type ES3 = "ES3";
+ type ES5 = "ES5";
+ type ES6 = "ES6";
+ type ES2015 = "ES2015";
}
- interface TokenInfo {
- leadingTrivia: TextRangeWithKind[];
- token: TextRangeWithKind;
- trailingTrivia: TextRangeWithKind[];
- }
- function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[];
- function formatOnSemicolon(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[];
- function formatOnClosingCurly(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[];
- function formatDocument(sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[];
- function formatSelection(start: number, end: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeSettings): TextChange[];
- function getIndentationString(indentation: number, options: EditorSettings): string;
+ type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
}
-declare namespace ts.formatting {
- namespace SmartIndenter {
- function getIndentation(position: number, sourceFile: SourceFile, options: EditorSettings): number;
- function getIndentationForNode(n: Node, ignoreActualIndentationRange: TextRange, sourceFile: SourceFile, options: EditorSettings): number;
- function getBaseIndentation(options: EditorSettings): number;
- function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean;
- function findFirstNonWhitespaceCharacterAndColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorSettings): {
- column: number;
- character: number;
+declare namespace ts.server {
+ interface ServerCancellationToken extends HostCancellationToken {
+ setRequest(requestId: number): void;
+ resetRequest(requestId: number): void;
+ }
+ const nullCancellationToken: ServerCancellationToken;
+ interface PendingErrorCheck {
+ fileName: NormalizedPath;
+ project: Project;
+ }
+ interface EventSender {
+ event(payload: any, eventName: string): void;
+ }
+ namespace CommandNames {
+ const Brace: protocol.CommandTypes.Brace;
+ const BraceCompletion: protocol.CommandTypes.BraceCompletion;
+ const Change: protocol.CommandTypes.Change;
+ const Close: protocol.CommandTypes.Close;
+ const Completions: protocol.CommandTypes.Completions;
+ const CompletionDetails: protocol.CommandTypes.CompletionDetails;
+ const CompileOnSaveAffectedFileList: protocol.CommandTypes.CompileOnSaveAffectedFileList;
+ const CompileOnSaveEmitFile: protocol.CommandTypes.CompileOnSaveEmitFile;
+ const Configure: protocol.CommandTypes.Configure;
+ const Definition: protocol.CommandTypes.Definition;
+ const Exit: protocol.CommandTypes.Exit;
+ const Format: protocol.CommandTypes.Format;
+ const Formatonkey: protocol.CommandTypes.Formatonkey;
+ const Geterr: protocol.CommandTypes.Geterr;
+ const GeterrForProject: protocol.CommandTypes.GeterrForProject;
+ const Implementation: protocol.CommandTypes.Implementation;
+ const SemanticDiagnosticsSync: protocol.CommandTypes.SemanticDiagnosticsSync;
+ const SyntacticDiagnosticsSync: protocol.CommandTypes.SyntacticDiagnosticsSync;
+ const NavBar: protocol.CommandTypes.NavBar;
+ const NavTree: protocol.CommandTypes.NavTree;
+ const NavTreeFull: protocol.CommandTypes.NavTreeFull;
+ const Navto: protocol.CommandTypes.Navto;
+ const Occurrences: protocol.CommandTypes.Occurrences;
+ const DocumentHighlights: protocol.CommandTypes.DocumentHighlights;
+ const Open: protocol.CommandTypes.Open;
+ const Quickinfo: protocol.CommandTypes.Quickinfo;
+ const References: protocol.CommandTypes.References;
+ const Reload: protocol.CommandTypes.Reload;
+ const Rename: protocol.CommandTypes.Rename;
+ const Saveto: protocol.CommandTypes.Saveto;
+ const SignatureHelp: protocol.CommandTypes.SignatureHelp;
+ const TypeDefinition: protocol.CommandTypes.TypeDefinition;
+ const ProjectInfo: protocol.CommandTypes.ProjectInfo;
+ const ReloadProjects: protocol.CommandTypes.ReloadProjects;
+ const Unknown: protocol.CommandTypes.Unknown;
+ const OpenExternalProject: protocol.CommandTypes.OpenExternalProject;
+ const OpenExternalProjects: protocol.CommandTypes.OpenExternalProjects;
+ const CloseExternalProject: protocol.CommandTypes.CloseExternalProject;
+ const TodoComments: protocol.CommandTypes.TodoComments;
+ const Indentation: protocol.CommandTypes.Indentation;
+ const DocCommentTemplate: protocol.CommandTypes.DocCommentTemplate;
+ const CompilerOptionsForInferredProjects: protocol.CommandTypes.CompilerOptionsForInferredProjects;
+ const GetCodeFixes: protocol.CommandTypes.GetCodeFixes;
+ const GetSupportedCodeFixes: protocol.CommandTypes.GetSupportedCodeFixes;
+ }
+ function formatMessage<T extends protocol.Message>(msg: T, logger: server.Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string;
+ interface SessionOptions {
+ host: ServerHost;
+ cancellationToken: ServerCancellationToken;
+ useSingleInferredProject: boolean;
+ typingsInstaller: ITypingsInstaller;
+ byteLength: (buf: string, encoding?: string) => number;
+ hrtime: (start?: number[]) => number[];
+ logger: Logger;
+ canUseEvents: boolean;
+ eventHandler?: ProjectServiceEventHandler;
+ throttleWaitMilliseconds?: number;
+ globalPlugins?: string[];
+ pluginProbeLocations?: string[];
+ }
+ class Session implements EventSender {
+ private readonly gcTimer;
+ protected projectService: ProjectService;
+ private changeSeq;
+ private currentRequestId;
+ private errorCheck;
+ private eventHandler;
+ private host;
+ private readonly cancellationToken;
+ protected readonly typingsInstaller: ITypingsInstaller;
+ private byteLength;
+ private hrtime;
+ protected logger: Logger;
+ private canUseEvents;
+ constructor(opts: SessionOptions);
+ private sendRequestCompletedEvent(requestId);
+ private defaultEventHandler(event);
+ logError(err: Error, cmd: string): void;
+ send(msg: protocol.Message): void;
+ configFileDiagnosticEvent(triggerFile: string, configFile: string, diagnostics: ts.Diagnostic[]): void;
+ event(info: any, eventName: string): void;
+ output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void;
+ private semanticCheck(file, project);
+ private syntacticCheck(file, project);
+ private updateProjectStructure(seq, matchSeq, ms?);
+ private updateErrorCheck(next, checkList, seq, matchSeq, ms?, followMs?, requireOpen?);
+ private cleanProjects(caption, projects);
+ private cleanup();
+ private getEncodedSemanticClassifications(args);
+ private getProject(projectFileName);
+ private getCompilerOptionsDiagnostics(args);
+ private convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo);
+ private getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition);
+ private getDefinition(args, simplifiedResult);
+ private getTypeDefinition(args);
+ private getImplementation(args, simplifiedResult);
+ private getOccurrences(args);
+ private getSyntacticDiagnosticsSync(args);
+ private getSemanticDiagnosticsSync(args);
+ private getDocumentHighlights(args, simplifiedResult);
+ private setCompilerOptionsForInferredProjects(args);
+ private getProjectInfo(args);
+ private getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList);
+ private getRenameInfo(args);
+ private getProjects(args);
+ private getDefaultProject(args);
+ private getRenameLocations(args, simplifiedResult);
+ private getReferences(args, simplifiedResult);
+ private openClientFile(fileName, fileContent?, scriptKind?);
+ private getPosition(args, scriptInfo);
+ private getFileAndProject(args, errorOnMissingProject?);
+ private getFileAndProjectWithoutRefreshingInferredProjects(args, errorOnMissingProject?);
+ private getFileAndProjectWorker(uncheckedFileName, projectFileName, refreshInferredProjects, errorOnMissingProject);
+ private getOutliningSpans(args);
+ private getTodoComments(args);
+ private getDocCommentTemplate(args);
+ private getIndentation(args);
+ private getBreakpointStatement(args);
+ private getNameOrDottedNameSpan(args);
+ private isValidBraceCompletion(args);
+ private getQuickInfoWorker(args, simplifiedResult);
+ private getFormattingEditsForRange(args);
+ private getFormattingEditsForRangeFull(args);
+ private getFormattingEditsForDocumentFull(args);
+ private getFormattingEditsAfterKeystrokeFull(args);
+ private getFormattingEditsAfterKeystroke(args);
+ private getCompletions(args, simplifiedResult);
+ private getCompletionEntryDetails(args);
+ private getCompileOnSaveAffectedFileList(args);
+ private emitFile(args);
+ private getSignatureHelpItems(args, simplifiedResult);
+ private getDiagnostics(next, delay, fileNames);
+ private change(args);
+ private reload(args, reqSeq);
+ private saveToTmp(fileName, tempFileName);
+ private closeClientFile(fileName);
+ private decorateNavigationBarItems(items, scriptInfo);
+ private getNavigationBarItems(args, simplifiedResult);
+ private decorateNavigationTree(tree, scriptInfo);
+ private decorateSpan(span, scriptInfo);
+ private getNavigationTree(args, simplifiedResult);
+ private getNavigateToItems(args, simplifiedResult);
+ private getSupportedCodeFixes();
+ private getCodeFixes(args, simplifiedResult);
+ private mapCodeAction(codeAction, scriptInfo);
+ private convertTextChangeToCodeEdit(change, scriptInfo);
+ private getBraceMatching(args, simplifiedResult);
+ private getDiagnosticsForProject(next, delay, fileName);
+ getCanonicalFileName(fileName: string): string;
+ exit(): void;
+ private notRequired();
+ private requiredResponse(response);
+ private handlers;
+ addProtocolHandler(command: string, handler: (request: protocol.Request) => {
+ response?: any;
+ responseRequired: boolean;
+ }): void;
+ private setCurrentRequest(requestId);
+ private resetCurrentRequest(requestId);
+ executeWithRequestId<T>(requestId: number, f: () => T): T;
+ executeCommand(request: protocol.Request): {
+ response?: any;
+ responseRequired?: boolean;
};
- function findFirstNonWhitespaceColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorSettings): number;
- function nodeWillIndentChild(parent: TextRangeWithKind, child: TextRangeWithKind, indentByDefault: boolean): boolean;
- function shouldIndentChildNode(parent: TextRangeWithKind, child?: TextRangeWithKind): boolean;
+ onMessage(message: string): void;
}
}
-declare namespace ts {
- interface CodeFix {
- errorCodes: number[];
- getCodeActions(context: CodeFixContext): CodeAction[] | undefined;
+declare namespace ts.server {
+ interface LineCollection {
+ charCount(): number;
+ lineCount(): number;
+ isLeaf(): boolean;
+ walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
}
- interface CodeFixContext {
- errorCode: number;
- sourceFile: SourceFile;
- span: TextSpan;
- program: Program;
- newLineCharacter: string;
- host: LanguageServiceHost;
- cancellationToken: CancellationToken;
+ interface ILineInfo {
+ line: number;
+ offset: number;
+ text?: string;
+ leaf?: LineLeaf;
}
- namespace codefix {
- function registerCodeFix(action: CodeFix): void;
- function getSupportedErrorCodes(): string[];
- function getFixes(context: CodeFixContext): CodeAction[];
+ enum CharRangeSection {
+ PreStart = 0,
+ Start = 1,
+ Entire = 2,
+ Mid = 3,
+ End = 4,
+ PostEnd = 5,
}
-}
-declare namespace ts.codefix {
-}
-declare namespace ts.codefix {
-}
-declare namespace ts.codefix {
-}
-declare namespace ts {
- const servicesVersion = "0.5";
- interface DisplayPartsSymbolWriter extends SymbolWriter {
- displayParts(): SymbolDisplayPart[];
+ interface ILineIndexWalker {
+ goSubtree: boolean;
+ done: boolean;
+ leaf(relativeStart: number, relativeLength: number, lineCollection: LineLeaf): void;
+ pre?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection;
+ post?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection;
+ }
+ class TextChange {
+ pos: number;
+ deleteLen: number;
+ insertedText: string;
+ constructor(pos: number, deleteLen: number, insertedText?: string);
+ getTextChangeRange(): TextChangeRange;
+ }
+ class ScriptVersionCache {
+ changes: TextChange[];
+ versions: LineIndexSnapshot[];
+ minVersion: number;
+ private host;
+ private currentVersion;
+ static changeNumberThreshold: number;
+ static changeLengthThreshold: number;
+ static maxVersions: number;
+ private versionToIndex(version);
+ private currentVersionToIndex();
+ edit(pos: number, deleteLen: number, insertedText?: string): void;
+ latest(): LineIndexSnapshot;
+ latestVersion(): number;
+ reloadFromFile(filename: string): void;
+ reload(script: string): void;
+ getSnapshot(): LineIndexSnapshot;
+ getTextChangesBetweenVersions(oldVersion: number, newVersion: number): TextChangeRange;
+ static fromString(host: ServerHost, script: string): ScriptVersionCache;
+ }
+ class LineIndexSnapshot implements ts.IScriptSnapshot {
+ readonly version: number;
+ readonly cache: ScriptVersionCache;
+ index: LineIndex;
+ changesSincePreviousVersion: TextChange[];
+ constructor(version: number, cache: ScriptVersionCache);
+ getText(rangeStart: number, rangeEnd: number): string;
+ getLength(): number;
+ getLineStartPositions(): number[];
+ getLineMapper(): (line: number) => number;
+ getTextChangeRangeSinceVersion(scriptVersion: number): TextChangeRange;
+ getChangeRange(oldSnapshot: ts.IScriptSnapshot): ts.TextChangeRange;
+ }
+ class LineIndex {
+ root: LineNode;
+ checkEdits: boolean;
+ charOffsetToLineNumberAndPos(charOffset: number): ILineInfo;
+ lineNumberToInfo(lineNumber: number): ILineInfo;
+ load(lines: string[]): void;
+ walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
+ getText(rangeStart: number, rangeLength: number): string;
+ getLength(): number;
+ every(f: (ll: LineLeaf, s: number, len: number) => boolean, rangeStart: number, rangeEnd?: number): boolean;
+ edit(pos: number, deleteLength: number, newText?: string): LineIndex;
+ static buildTreeFromBottom(nodes: LineCollection[]): LineNode;
+ static linesFromText(text: string): {
+ lines: string[];
+ lineMap: number[];
+ };
+ }
+ class LineNode implements LineCollection {
+ totalChars: number;
+ totalLines: number;
+ children: LineCollection[];
+ isLeaf(): boolean;
+ updateCounts(): void;
+ execWalk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker, childIndex: number, nodeType: CharRangeSection): boolean;
+ skipChild(relativeStart: number, relativeLength: number, childIndex: number, walkFns: ILineIndexWalker, nodeType: CharRangeSection): void;
+ walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
+ charOffsetToLineNumberAndPos(lineNumber: number, charOffset: number): ILineInfo;
+ lineNumberToInfo(lineNumber: number, charOffset: number): ILineInfo;
+ childFromLineNumber(lineNumber: number, charOffset: number): {
+ child: LineCollection;
+ childIndex: number;
+ relativeLineNumber: number;
+ charOffset: number;
+ };
+ childFromCharOffset(lineNumber: number, charOffset: number): {
+ child: LineCollection;
+ childIndex: number;
+ charOffset: number;
+ lineNumber: number;
+ };
+ splitAfter(childIndex: number): LineNode;
+ remove(child: LineCollection): void;
+ findChildIndex(child: LineCollection): number;
+ insertAt(child: LineCollection, nodes: LineCollection[]): LineNode[];
+ add(collection: LineCollection): boolean;
+ charCount(): number;
+ lineCount(): number;
+ }
+ class LineLeaf implements LineCollection {
+ text: string;
+ constructor(text: string);
+ isLeaf(): boolean;
+ walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
+ charCount(): number;
+ lineCount(): number;
}
- function toEditorSettings(options: FormatCodeOptions | FormatCodeSettings): FormatCodeSettings;
- function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
- function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
- function getDefaultCompilerOptions(): CompilerOptions;
- function getSupportedCodeFixes(): string[];
- function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
- let disableIncrementalParsing: boolean;
- function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
- function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
- function getNameTable(sourceFile: SourceFile): Map<number>;
- function getDefaultLibFilePath(options: CompilerOptions): string;
}
declare namespace ts.server {
class ScriptInfo {
private readonly host;
readonly fileName: NormalizedPath;
readonly scriptKind: ScriptKind;
- isOpen: boolean;
hasMixedContent: boolean;
readonly containingProjects: Project[];
private formatCodeSettings;
readonly path: Path;
private fileWatcher;
- private svc;
- constructor(host: ServerHost, fileName: NormalizedPath, content: string, scriptKind: ScriptKind, isOpen?: boolean, hasMixedContent?: boolean);
+ private textStorage;
+ private isOpen;
+ constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent?: boolean);
+ isScriptOpen(): boolean;
+ open(newText: string): void;
+ close(): void;
+ getSnapshot(): IScriptSnapshot;
getFormatCodeSettings(): FormatCodeSettings;
attachToProject(project: Project): boolean;
isAttached(project: Project): boolean;
detachFromProject(project: Project): void;
detachAllProjects(): void;
getDefaultProject(): Project;
+ registerFileUpdate(): void;
setFormatOptions(formatSettings: FormatCodeSettings): void;
setWatcher(watcher: FileWatcher): void;
stopWatcher(): void;
@@ -10947,13 +4720,13 @@ declare namespace ts.server {
reload(script: string): void;
saveTo(fileName: string): void;
reloadFromFile(tempFileName?: NormalizedPath): void;
- snap(): LineIndexSnapshot;
getLineInfo(line: number): ILineInfo;
editContent(start: number, end: number, newText: string): void;
markContainingProjectsAsDirty(): void;
lineToTextSpan(line: number): TextSpan;
lineOffsetToPosition(line: number, offset: number): number;
positionToLineOffset(position: number): ILineInfo;
+ isJavaScript(): boolean;
}
}
declare namespace ts.server {
@@ -10973,6 +4746,7 @@ declare namespace ts.server {
startRecordingFilesWithChangedResolutions(): void;
finishRecordingFilesWithChangedResolutions(): Path[];
private resolveNamesWithLocalCache<T, R>(names, containingFile, cache, loader, getResult, getResultFileName, logChanges);
+ getNewLine(): string;
getProjectVersion(): string;
getCompilationSettings(): CompilerOptions;
useCaseSensitiveFileNames(): boolean;
@@ -11032,6 +4806,7 @@ declare namespace ts.server {
getFilesAffectedBy(scriptInfo: ScriptInfo): string[];
onProjectUpdateGraph(): void;
emitFile(scriptInfo: ScriptInfo, writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => void): boolean;
+ clear(): void;
}
function createBuilder(project: Project): Builder;
}
@@ -11043,9 +4818,6 @@ declare namespace ts.server {
}
function allRootFilesAreJsOrDts(project: Project): boolean;
function allFilesAreJsOrDts(project: Project): boolean;
- interface ProjectFilesWithTSDiagnostics extends protocol.ProjectFiles {
- projectErrors: Diagnostic[];
- }
class UnresolvedImportsMap {
readonly perFileMap: FileMap<ReadonlyArray<string>>;
private version;
@@ -11055,7 +4827,22 @@ declare namespace ts.server {
get(path: Path): ReadonlyArray<string>;
set(path: Path, value: ReadonlyArray<string>): void;
}
- function createNoSemanticFeaturesWrapper(realLanguageService: LanguageService): LanguageService;
+ interface PluginCreateInfo {
+ project: Project;
+ languageService: LanguageService;
+ languageServiceHost: LanguageServiceHost;
+ serverHost: ServerHost;
+ config: any;
+ }
+ interface PluginModule {
+ create(createInfo: PluginCreateInfo): LanguageService;
+ getExternalFiles?(proj: Project): string[];
+ }
+ interface PluginModuleFactory {
+ (mod: {
+ typescript: typeof ts;
+ }): PluginModule;
+ }
abstract class Project {
private readonly projectName;
readonly projectKind: ProjectKind;
@@ -11065,14 +4852,14 @@ declare namespace ts.server {
compileOnSaveEnabled: boolean;
private rootFiles;
private rootFilesMap;
- private lsHost;
private program;
private cachedUnresolvedImportsPerFile;
private lastCachedUnresolvedImportsList;
- private readonly languageService;
- private readonly noSemanticFeaturesLanguageService;
+ protected languageService: LanguageService;
languageServiceEnabled: boolean;
+ protected readonly lsHost: LSHost;
builder: Builder;
+ private updatedFileNames;
private lastReportedFileNames;
private lastReportedVersion;
private projectStructureVersion;
@@ -11083,7 +4870,9 @@ declare namespace ts.server {
isNonTsProject(): boolean;
isJsOnlyProject(): boolean;
getCachedUnresolvedImportsPerFile_TestOnly(): UnresolvedImportsMap;
+ static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void): {};
constructor(projectName: string, projectKind: ProjectKind, projectService: ProjectService, documentRegistry: ts.DocumentRegistry, hasExplicitListOfFiles: boolean, languageServiceEnabled: boolean, compilerOptions: CompilerOptions, compileOnSaveEnabled: boolean);
+ private setInternalCompilerOptionsForEmittingJsFiles();
getProjectErrors(): Diagnostic[];
getLanguageService(ensureSynchronized?: boolean): LanguageService;
getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[];
@@ -11093,6 +4882,7 @@ declare namespace ts.server {
getProjectName(): string;
abstract getProjectRootPath(): string | undefined;
abstract getTypeAcquisition(): TypeAcquisition;
+ getExternalFiles(): string[];
getSourceFile(path: Path): SourceFile;
updateTypes(): void;
close(): void;
@@ -11110,6 +4900,7 @@ declare namespace ts.server {
isRoot(info: ScriptInfo): boolean;
addRoot(info: ScriptInfo): void;
removeFile(info: ScriptInfo, detachFromProject?: boolean): void;
+ registerFileUpdate(fileName: string): void;
markAsDirty(): void;
private extractUnresolvedImportsFromSourceFile(file, result);
updateGraph(): boolean;
@@ -11121,14 +4912,18 @@ declare namespace ts.server {
filesToString(): string;
setCompilerOptions(compilerOptions: CompilerOptions): void;
reloadScript(filename: NormalizedPath, tempFileName?: NormalizedPath): boolean;
- getChangesSinceVersion(lastKnownVersion?: number): ProjectFilesWithTSDiagnostics;
getReferencedFiles(path: Path): Path[];
- private removeRootFileIfNecessary(info);
+ protected removeRoot(info: ScriptInfo): void;
}
class InferredProject extends Project {
private static newName;
+ private _isJsInferredProject;
+ toggleJsInferredProject(isJsInferredProject: boolean): void;
+ setCompilerOptions(options?: CompilerOptions): void;
directoriesWatchedForTsconfig: string[];
constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, compilerOptions: CompilerOptions);
+ addRoot(info: ScriptInfo): void;
+ removeRoot(info: ScriptInfo): void;
getProjectRootPath(): string;
close(): void;
getTypeAcquisition(): TypeAcquisition;
@@ -11142,13 +4937,18 @@ declare namespace ts.server {
private directoriesWatchedForWildcards;
private typeRootsWatchers;
readonly canonicalConfigFilePath: NormalizedPath;
+ private plugins;
openRefCount: number;
constructor(configFileName: NormalizedPath, projectService: ProjectService, documentRegistry: ts.DocumentRegistry, hasExplicitListOfFiles: boolean, compilerOptions: CompilerOptions, wildcardDirectories: Map<WatchDirectoryFlags>, languageServiceEnabled: boolean, compileOnSaveEnabled: boolean);
getConfigFilePath(): string;
+ enablePlugins(): void;
+ private enablePlugin(pluginConfigEntry, searchPaths);
+ private enableProxy(pluginModuleFactory, configEntry);
getProjectRootPath(): string;
setProjectErrors(projectErrors: Diagnostic[]): void;
setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void;
getTypeAcquisition(): TypeAcquisition;
+ getExternalFiles(): string[];
watchConfigFile(callback: (project: ConfiguredProject) => void): void;
watchTypeRoots(callback: (project: ConfiguredProject, path: string) => void): void;
watchConfigDirectory(callback: (project: ConfiguredProject, path: string) => void): void;
@@ -11160,6 +4960,7 @@ declare namespace ts.server {
getEffectiveTypeRoots(): string[];
}
class ExternalProject extends Project {
+ externalProjectName: string;
compileOnSaveEnabled: boolean;
private readonly projectFilePath;
private typeAcquisition;
@@ -11201,26 +5002,39 @@ declare namespace ts.server {
interface ProjectServiceEventHandler {
(event: ProjectServiceEvent): void;
}
+ interface SafeList {
+ [name: string]: {
+ match: RegExp;
+ exclude?: Array<Array<string | number>>;
+ types?: string[];
+ };
+ }
function convertFormatOptions(protocolOptions: protocol.FormatCodeSettings): FormatCodeSettings;
function convertCompilerOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): CompilerOptions & protocol.CompileOnSaveMixin;
function tryConvertScriptKindName(scriptKindName: protocol.ScriptKindName | ScriptKind): ScriptKind;
- function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind;
+ function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind.Unknown | ScriptKind.JS | ScriptKind.JSX | ScriptKind.TS | ScriptKind.TSX;
function combineProjectOutput<T>(projects: Project[], action: (project: Project) => T[], comparer?: (a: T, b: T) => number, areEqual?: (a: T, b: T) => boolean): T[];
interface HostConfiguration {
formatCodeOptions: FormatCodeSettings;
hostInfo: string;
+ extraFileExtensions?: JsFileExtensionInfo[];
}
interface OpenConfiguredProjectResult {
- configFileName?: string;
+ configFileName?: NormalizedPath;
configFileErrors?: Diagnostic[];
}
+ interface ProjectServiceOptions {
+ host: ServerHost;
+ logger: Logger;
+ cancellationToken: HostCancellationToken;
+ useSingleInferredProject: boolean;
+ typingsInstaller: ITypingsInstaller;
+ eventHandler?: ProjectServiceEventHandler;
+ throttleWaitMilliseconds?: number;
+ globalPlugins?: string[];
+ pluginProbeLocations?: string[];
+ }
class ProjectService {
- readonly host: ServerHost;
- readonly logger: Logger;
- readonly cancellationToken: HostCancellationToken;
- readonly useSingleInferredProject: boolean;
- readonly typingsInstaller: ITypingsInstaller;
- private readonly eventHandler;
readonly typingsCache: TypingsCache;
private readonly documentRegistry;
private readonly filenameToScriptInfo;
@@ -11231,14 +5045,24 @@ declare namespace ts.server {
readonly openFiles: ScriptInfo[];
private compilerOptionsForInferredProjects;
private compileOnSaveForInferredProjects;
+ private readonly projectToSizeMap;
private readonly directoryWatchers;
private readonly throttledOperations;
private readonly hostConfiguration;
+ private static safelist;
private changedFiles;
readonly toCanonicalFileName: (f: string) => string;
lastDeletedFile: ScriptInfo;
- constructor(host: ServerHost, logger: Logger, cancellationToken: HostCancellationToken, useSingleInferredProject: boolean, typingsInstaller?: ITypingsInstaller, eventHandler?: ProjectServiceEventHandler);
- getChangedFiles_TestOnly(): ScriptInfo[];
+ readonly host: ServerHost;
+ readonly logger: Logger;
+ readonly cancellationToken: HostCancellationToken;
+ readonly useSingleInferredProject: boolean;
+ readonly typingsInstaller: ITypingsInstaller;
+ readonly throttleWaitMilliseconds?: number;
+ private readonly eventHandler?;
+ readonly globalPlugins: ReadonlyArray<string>;
+ readonly pluginProbeLocations: ReadonlyArray<string>;
+ constructor(opts: ProjectServiceOptions);
ensureInferredProjectsUpToDate_TestOnly(): void;
getCompilerOptionsForInferredProjects(): CompilerOptions;
onUpdateLanguageServiceStateForProject(project: Project, languageServiceEnabled: boolean): void;
@@ -11268,7 +5092,7 @@ declare namespace ts.server {
private findConfiguredProjectByProjectName(configFileName);
private findExternalProjectByProjectName(projectFileName);
private convertConfigFileContentToProjectOptions(configFilename);
- private exceededTotalSizeLimitForNonTsFiles<T>(options, fileNames, propertyReader);
+ private exceededTotalSizeLimitForNonTsFiles<T>(name, options, fileNames, propertyReader);
private createAndAddExternalProject(projectFileName, files, options, typeAcquisition);
private reportConfigFileDiagnostics(configFileName, diagnostics, triggerFile);
private createAndAddConfiguredProject(configFileName, projectOptions, configFileErrors, clientFileName?);
@@ -11291,490 +5115,17 @@ declare namespace ts.server {
openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean): OpenConfiguredProjectResult;
closeClientFile(uncheckedFileName: string): void;
private collectChanges(lastKnownProjectVersions, currentProjects, result);
- synchronizeProjectList(knownProjects: protocol.ProjectVersionInfo[]): ProjectFilesWithTSDiagnostics[];
- applyChangesInOpenFiles(openFiles: protocol.ExternalFile[], changedFiles: protocol.ChangedOpenFile[], closedFiles: string[]): void;
private closeConfiguredProject(configFile);
closeExternalProject(uncheckedFileName: string, suppressRefresh?: boolean): void;
- openExternalProject(proj: protocol.ExternalProject): void;
+ openExternalProjects(projects: protocol.ExternalProject[]): void;
+ private static filenameEscapeRegexp;
+ private static escapeFilenameForRegex(filename);
+ resetSafeList(): void;
+ loadSafeList(fileName: string): void;
+ applySafeList(proj: protocol.ExternalProject): void;
+ openExternalProject(proj: protocol.ExternalProject, suppressRefreshOfInferredProjects?: boolean): void;
}
}
-declare namespace ts.server {
- interface PendingErrorCheck {
- fileName: NormalizedPath;
- project: Project;
- }
- interface EventSender {
- event(payload: any, eventName: string): void;
- }
- namespace CommandNames {
- const Brace: protocol.CommandTypes.Brace;
- const BraceFull: protocol.CommandTypes.BraceFull;
- const BraceCompletion: protocol.CommandTypes.BraceCompletion;
- const Change: protocol.CommandTypes.Change;
- const Close: protocol.CommandTypes.Close;
- const Completions: protocol.CommandTypes.Completions;
- const CompletionsFull: protocol.CommandTypes.CompletionsFull;
- const CompletionDetails: protocol.CommandTypes.CompletionDetails;
- const CompileOnSaveAffectedFileList: protocol.CommandTypes.CompileOnSaveAffectedFileList;
- const CompileOnSaveEmitFile: protocol.CommandTypes.CompileOnSaveEmitFile;
- const Configure: protocol.CommandTypes.Configure;
- const Definition: protocol.CommandTypes.Definition;
- const DefinitionFull: protocol.CommandTypes.DefinitionFull;
- const Exit: protocol.CommandTypes.Exit;
- const Format: protocol.CommandTypes.Format;
- const Formatonkey: protocol.CommandTypes.Formatonkey;
- const FormatFull: protocol.CommandTypes.FormatFull;
- const FormatonkeyFull: protocol.CommandTypes.FormatonkeyFull;
- const FormatRangeFull: protocol.CommandTypes.FormatRangeFull;
- const Geterr: protocol.CommandTypes.Geterr;
- const GeterrForProject: protocol.CommandTypes.GeterrForProject;
- const Implementation: protocol.CommandTypes.Implementation;
- const ImplementationFull: protocol.CommandTypes.ImplementationFull;
- const SemanticDiagnosticsSync: protocol.CommandTypes.SemanticDiagnosticsSync;
- const SyntacticDiagnosticsSync: protocol.CommandTypes.SyntacticDiagnosticsSync;
- const NavBar: protocol.CommandTypes.NavBar;
- const NavBarFull: protocol.CommandTypes.NavBarFull;
- const NavTree: protocol.CommandTypes.NavTree;
- const NavTreeFull: protocol.CommandTypes.NavTreeFull;
- const Navto: protocol.CommandTypes.Navto;
- const NavtoFull: protocol.CommandTypes.NavtoFull;
- const Occurrences: protocol.CommandTypes.Occurrences;
- const DocumentHighlights: protocol.CommandTypes.DocumentHighlights;
- const DocumentHighlightsFull: protocol.CommandTypes.DocumentHighlightsFull;
- const Open: protocol.CommandTypes.Open;
- const Quickinfo: protocol.CommandTypes.Quickinfo;
- const QuickinfoFull: protocol.CommandTypes.QuickinfoFull;
- const References: protocol.CommandTypes.References;
- const ReferencesFull: protocol.CommandTypes.ReferencesFull;
- const Reload: protocol.CommandTypes.Reload;
- const Rename: protocol.CommandTypes.Rename;
- const RenameInfoFull: protocol.CommandTypes.RenameInfoFull;
- const RenameLocationsFull: protocol.CommandTypes.RenameLocationsFull;
- const Saveto: protocol.CommandTypes.Saveto;
- const SignatureHelp: protocol.CommandTypes.SignatureHelp;
- const SignatureHelpFull: protocol.CommandTypes.SignatureHelpFull;
- const TypeDefinition: protocol.CommandTypes.TypeDefinition;
- const ProjectInfo: protocol.CommandTypes.ProjectInfo;
- const ReloadProjects: protocol.CommandTypes.ReloadProjects;
- const Unknown: protocol.CommandTypes.Unknown;
- const OpenExternalProject: protocol.CommandTypes.OpenExternalProject;
- const OpenExternalProjects: protocol.CommandTypes.OpenExternalProjects;
- const CloseExternalProject: protocol.CommandTypes.CloseExternalProject;
- const SynchronizeProjectList: protocol.CommandTypes.SynchronizeProjectList;
- const ApplyChangedToOpenFiles: protocol.CommandTypes.ApplyChangedToOpenFiles;
- const EncodedSemanticClassificationsFull: protocol.CommandTypes.EncodedSemanticClassificationsFull;
- const Cleanup: protocol.CommandTypes.Cleanup;
- const OutliningSpans: protocol.CommandTypes.OutliningSpans;
- const TodoComments: protocol.CommandTypes.TodoComments;
- const Indentation: protocol.CommandTypes.Indentation;
- const DocCommentTemplate: protocol.CommandTypes.DocCommentTemplate;
- const CompilerOptionsDiagnosticsFull: protocol.CommandTypes.CompilerOptionsDiagnosticsFull;
- const NameOrDottedNameSpan: protocol.CommandTypes.NameOrDottedNameSpan;
- const BreakpointStatement: protocol.CommandTypes.BreakpointStatement;
- const CompilerOptionsForInferredProjects: protocol.CommandTypes.CompilerOptionsForInferredProjects;
- const GetCodeFixes: protocol.CommandTypes.GetCodeFixes;
- const GetCodeFixesFull: protocol.CommandTypes.GetCodeFixesFull;
- const GetSupportedCodeFixes: protocol.CommandTypes.GetSupportedCodeFixes;
- }
- function formatMessage<T extends protocol.Message>(msg: T, logger: server.Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string;
- class Session implements EventSender {
- private host;
- protected readonly typingsInstaller: ITypingsInstaller;
- private byteLength;
- private hrtime;
- protected logger: Logger;
- protected readonly canUseEvents: boolean;
- private readonly gcTimer;
- protected projectService: ProjectService;
- private errorTimer;
- private immediateId;
- private changeSeq;
- private eventHander;
- constructor(host: ServerHost, cancellationToken: HostCancellationToken, useSingleInferredProject: boolean, typingsInstaller: ITypingsInstaller, byteLength: (buf: string, encoding?: string) => number, hrtime: (start?: number[]) => number[], logger: Logger, canUseEvents: boolean, eventHandler?: ProjectServiceEventHandler);
- private defaultEventHandler(event);
- logError(err: Error, cmd: string): void;
- send(msg: protocol.Message): void;
- configFileDiagnosticEvent(triggerFile: string, configFile: string, diagnostics: ts.Diagnostic[]): void;
- event(info: any, eventName: string): void;
- output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void;
- private semanticCheck(file, project);
- private syntacticCheck(file, project);
- private updateProjectStructure(seq, matchSeq, ms?);
- private updateErrorCheck(checkList, seq, matchSeq, ms?, followMs?, requireOpen?);
- private cleanProjects(caption, projects);
- private cleanup();
- private getEncodedSemanticClassifications(args);
- private getProject(projectFileName);
- private getCompilerOptionsDiagnostics(args);
- private convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo);
- private getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition);
- private getDefinition(args, simplifiedResult);
- private getTypeDefinition(args);
- private getImplementation(args, simplifiedResult);
- private getOccurrences(args);
- private getSyntacticDiagnosticsSync(args);
- private getSemanticDiagnosticsSync(args);
- private getDocumentHighlights(args, simplifiedResult);
- private setCompilerOptionsForInferredProjects(args);
- private getProjectInfo(args);
- private getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList);
- private getRenameInfo(args);
- private getProjects(args);
- private getRenameLocations(args, simplifiedResult);
- private getReferences(args, simplifiedResult);
- private openClientFile(fileName, fileContent?, scriptKind?);
- private getPosition(args, scriptInfo);
- private getFileAndProject(args, errorOnMissingProject?);
- private getFileAndProjectWithoutRefreshingInferredProjects(args, errorOnMissingProject?);
- private getFileAndProjectWorker(uncheckedFileName, projectFileName, refreshInferredProjects, errorOnMissingProject);
- private getOutliningSpans(args);
- private getTodoComments(args);
- private getDocCommentTemplate(args);
- private getIndentation(args);
- private getBreakpointStatement(args);
- private getNameOrDottedNameSpan(args);
- private isValidBraceCompletion(args);
- private getQuickInfoWorker(args, simplifiedResult);
- private getFormattingEditsForRange(args);
- private getFormattingEditsForRangeFull(args);
- private getFormattingEditsForDocumentFull(args);
- private getFormattingEditsAfterKeystrokeFull(args);
- private getFormattingEditsAfterKeystroke(args);
- private getCompletions(args, simplifiedResult);
- private getCompletionEntryDetails(args);
- private getCompileOnSaveAffectedFileList(args);
- private emitFile(args);
- private getSignatureHelpItems(args, simplifiedResult);
- private getDiagnostics(delay, fileNames);
- private change(args);
- private reload(args, reqSeq);
- private saveToTmp(fileName, tempFileName);
- private closeClientFile(fileName);
- private decorateNavigationBarItems(items, scriptInfo);
- private getNavigationBarItems(args, simplifiedResult);
- private decorateNavigationTree(tree, scriptInfo);
- private decorateSpan(span, scriptInfo);
- private getNavigationTree(args, simplifiedResult);
- private getNavigateToItems(args, simplifiedResult);
- private getSupportedCodeFixes();
- private getCodeFixes(args, simplifiedResult);
- private mapCodeAction(codeAction, scriptInfo);
- private convertTextChangeToCodeEdit(change, scriptInfo);
- private getBraceMatching(args, simplifiedResult);
- getDiagnosticsForProject(delay: number, fileName: string): void;
- getCanonicalFileName(fileName: string): string;
- exit(): void;
- private notRequired();
- private requiredResponse(response);
- private handlers;
- addProtocolHandler(command: string, handler: (request: protocol.Request) => {
- response?: any;
- responseRequired: boolean;
- }): void;
- executeCommand(request: protocol.Request): {
- response?: any;
- responseRequired?: boolean;
- };
- onMessage(message: string): void;
- }
-}
-declare namespace ts.server {
- interface LineCollection {
- charCount(): number;
- lineCount(): number;
- isLeaf(): boolean;
- walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
- }
- interface ILineInfo {
- line: number;
- offset: number;
- text?: string;
- leaf?: LineLeaf;
- }
- enum CharRangeSection {
- PreStart = 0,
- Start = 1,
- Entire = 2,
- Mid = 3,
- End = 4,
- PostEnd = 5,
- }
- interface ILineIndexWalker {
- goSubtree: boolean;
- done: boolean;
- leaf(relativeStart: number, relativeLength: number, lineCollection: LineLeaf): void;
- pre?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection;
- post?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection;
- }
- class TextChange {
- pos: number;
- deleteLen: number;
- insertedText: string;
- constructor(pos: number, deleteLen: number, insertedText?: string);
- getTextChangeRange(): TextChangeRange;
- }
- class ScriptVersionCache {
- changes: TextChange[];
- versions: LineIndexSnapshot[];
- minVersion: number;
- private host;
- private currentVersion;
- static changeNumberThreshold: number;
- static changeLengthThreshold: number;
- static maxVersions: number;
- private versionToIndex(version);
- private currentVersionToIndex();
- edit(pos: number, deleteLen: number, insertedText?: string): void;
- latest(): LineIndexSnapshot;
- latestVersion(): number;
- reloadFromFile(filename: string): void;
- reload(script: string): void;
- getSnapshot(): LineIndexSnapshot;
- getTextChangesBetweenVersions(oldVersion: number, newVersion: number): TextChangeRange;
- static fromString(host: ServerHost, script: string): ScriptVersionCache;
- }
- class LineIndexSnapshot implements ts.IScriptSnapshot {
- version: number;
- cache: ScriptVersionCache;
- index: LineIndex;
- changesSincePreviousVersion: TextChange[];
- constructor(version: number, cache: ScriptVersionCache);
- getText(rangeStart: number, rangeEnd: number): string;
- getLength(): number;
- getLineStartPositions(): number[];
- getLineMapper(): (line: number) => number;
- getTextChangeRangeSinceVersion(scriptVersion: number): TextChangeRange;
- getChangeRange(oldSnapshot: ts.IScriptSnapshot): ts.TextChangeRange;
- }
- class LineIndex {
- root: LineNode;
- checkEdits: boolean;
- charOffsetToLineNumberAndPos(charOffset: number): ILineInfo;
- lineNumberToInfo(lineNumber: number): ILineInfo;
- load(lines: string[]): void;
- walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
- getText(rangeStart: number, rangeLength: number): string;
- getLength(): number;
- every(f: (ll: LineLeaf, s: number, len: number) => boolean, rangeStart: number, rangeEnd?: number): boolean;
- edit(pos: number, deleteLength: number, newText?: string): LineIndex;
- static buildTreeFromBottom(nodes: LineCollection[]): LineNode;
- static linesFromText(text: string): {
- lines: string[];
- lineMap: number[];
- };
- }
- class LineNode implements LineCollection {
- totalChars: number;
- totalLines: number;
- children: LineCollection[];
- isLeaf(): boolean;
- updateCounts(): void;
- execWalk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker, childIndex: number, nodeType: CharRangeSection): boolean;
- skipChild(relativeStart: number, relativeLength: number, childIndex: number, walkFns: ILineIndexWalker, nodeType: CharRangeSection): void;
- walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
- charOffsetToLineNumberAndPos(lineNumber: number, charOffset: number): ILineInfo;
- lineNumberToInfo(lineNumber: number, charOffset: number): ILineInfo;
- childFromLineNumber(lineNumber: number, charOffset: number): {
- child: LineCollection;
- childIndex: number;
- relativeLineNumber: number;
- charOffset: number;
- };
- childFromCharOffset(lineNumber: number, charOffset: number): {
- child: LineCollection;
- childIndex: number;
- charOffset: number;
- lineNumber: number;
- };
- splitAfter(childIndex: number): LineNode;
- remove(child: LineCollection): void;
- findChildIndex(child: LineCollection): number;
- insertAt(child: LineCollection, nodes: LineCollection[]): LineNode[];
- add(collection: LineCollection): boolean;
- charCount(): number;
- lineCount(): number;
- }
- class LineLeaf implements LineCollection {
- text: string;
- constructor(text: string);
- isLeaf(): boolean;
- walk(rangeStart: number, rangeLength: number, walkFns: ILineIndexWalker): void;
- charCount(): number;
- lineCount(): number;
- }
-}
-declare let debugObjectHost: any;
-declare namespace ts {
- interface ScriptSnapshotShim {
- getText(start: number, end: number): string;
- getLength(): number;
- getChangeRange(oldSnapshot: ScriptSnapshotShim): string;
- dispose?(): void;
- }
- interface Logger {
- log(s: string): void;
- trace(s: string): void;
- error(s: string): void;
- }
- interface LanguageServiceShimHost extends Logger {
- getCompilationSettings(): string;
- getScriptFileNames(): string;
- getScriptKind?(fileName: string): ScriptKind;
- getScriptVersion(fileName: string): string;
- getScriptSnapshot(fileName: string): ScriptSnapshotShim;
- getLocalizedDiagnosticMessages(): string;
- getCancellationToken(): HostCancellationToken;
- getCurrentDirectory(): string;
- getDirectories(path: string): string;
- getDefaultLibFileName(options: string): string;
- getNewLine?(): string;
- getProjectVersion?(): string;
- useCaseSensitiveFileNames?(): boolean;
- getTypeRootsVersion?(): number;
- readDirectory(rootDir: string, extension: string, basePaths?: string, excludeEx?: string, includeFileEx?: string, includeDirEx?: string, depth?: number): string;
- readFile(path: string, encoding?: string): string;
- fileExists(path: string): boolean;
- getModuleResolutionsForFile?(fileName: string): string;
- getTypeReferenceDirectiveResolutionsForFile?(fileName: string): string;
- directoryExists(directoryName: string): boolean;
- }
- interface CoreServicesShimHost extends Logger {
- directoryExists(directoryName: string): boolean;
- fileExists(fileName: string): boolean;
- getCurrentDirectory(): string;
- getDirectories(path: string): string;
- readDirectory(rootDir: string, extension: string, basePaths?: string, excludeEx?: string, includeFileEx?: string, includeDirEx?: string, depth?: number): string;
- readFile(fileName: string): string;
- realpath?(path: string): string;
- trace(s: string): void;
- useCaseSensitiveFileNames?(): boolean;
- }
- interface IFileReference {
- path: string;
- position: number;
- length: number;
- }
- interface ShimFactory {
- registerShim(shim: Shim): void;
- unregisterShim(shim: Shim): void;
- }
- interface Shim {
- dispose(_dummy: any): void;
- }
- interface LanguageServiceShim extends Shim {
- languageService: LanguageService;
- dispose(_dummy: any): void;
- refresh(throwOnError: boolean): void;
- cleanupSemanticCache(): void;
- getSyntacticDiagnostics(fileName: string): string;
- getSemanticDiagnostics(fileName: string): string;
- getCompilerOptionsDiagnostics(): string;
- getSyntacticClassifications(fileName: string, start: number, length: number): string;
- getSemanticClassifications(fileName: string, start: number, length: number): string;
- getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string;
- getEncodedSemanticClassifications(fileName: string, start: number, length: number): string;
- getCompletionsAtPosition(fileName: string, position: number): string;
- getCompletionEntryDetails(fileName: string, position: number, entryName: string): string;
- getQuickInfoAtPosition(fileName: string, position: number): string;
- getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): string;
- getBreakpointStatementAtPosition(fileName: string, position: number): string;
- getSignatureHelpItems(fileName: string, position: number): string;
- getRenameInfo(fileName: string, position: number): string;
- findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): string;
- getDefinitionAtPosition(fileName: string, position: number): string;
- getTypeDefinitionAtPosition(fileName: string, position: number): string;
- getImplementationAtPosition(fileName: string, position: number): string;
- getReferencesAtPosition(fileName: string, position: number): string;
- findReferences(fileName: string, position: number): string;
- getOccurrencesAtPosition(fileName: string, position: number): string;
- getDocumentHighlights(fileName: string, position: number, filesToSearch: string): string;
- getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string): string;
- getNavigationBarItems(fileName: string): string;
- getNavigationTree(fileName: string): string;
- getOutliningSpans(fileName: string): string;
- getTodoComments(fileName: string, todoCommentDescriptors: string): string;
- getBraceMatchingAtPosition(fileName: string, position: number): string;
- getIndentationAtPosition(fileName: string, position: number, options: string): string;
- getFormattingEditsForRange(fileName: string, start: number, end: number, options: string): string;
- getFormattingEditsForDocument(fileName: string, options: string): string;
- getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: string): string;
- getDocCommentTemplateAtPosition(fileName: string, position: number): string;
- isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): string;
- getEmitOutput(fileName: string): string;
- getEmitOutputObject(fileName: string): EmitOutput;
- }
- interface ClassifierShim extends Shim {
- getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
- getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
- }
- interface CoreServicesShim extends Shim {
- getAutomaticTypeDirectiveNames(compilerOptionsJson: string): string;
- getPreProcessedFileInfo(fileName: string, sourceText: IScriptSnapshot): string;
- getTSConfigFileInfo(fileName: string, sourceText: IScriptSnapshot): string;
- getDefaultCompilationSettings(): string;
- discoverTypings(discoverTypingsJson: string): string;
- }
- class LanguageServiceShimHostAdapter implements LanguageServiceHost {
- private shimHost;
- private files;
- private loggingEnabled;
- private tracingEnabled;
- resolveModuleNames: (moduleName: string[], containingFile: string) => ResolvedModuleFull[];
- resolveTypeReferenceDirectives: (typeDirectiveNames: string[], containingFile: string) => ResolvedTypeReferenceDirective[];
- directoryExists: (directoryName: string) => boolean;
- constructor(shimHost: LanguageServiceShimHost);
- log(s: string): void;
- trace(s: string): void;
- error(s: string): void;
- getProjectVersion(): string;
- getTypeRootsVersion(): number;
- useCaseSensitiveFileNames(): boolean;
- getCompilationSettings(): CompilerOptions;
- getScriptFileNames(): string[];
- getScriptSnapshot(fileName: string): IScriptSnapshot;
- getScriptKind(fileName: string): ScriptKind;
- getScriptVersion(fileName: string): string;
- getLocalizedDiagnosticMessages(): any;
- getCancellationToken(): HostCancellationToken;
- getCurrentDirectory(): string;
- getDirectories(path: string): string[];
- getDefaultLibFileName(options: CompilerOptions): string;
- readDirectory(path: string, extensions?: string[], exclude?: string[], include?: string[], depth?: number): string[];
- readFile(path: string, encoding?: string): string;
- fileExists(path: string): boolean;
- }
- class CoreServicesShimHostAdapter implements ParseConfigHost, ModuleResolutionHost {
- private shimHost;
- directoryExists: (directoryName: string) => boolean;
- realpath: (path: string) => string;
- useCaseSensitiveFileNames: boolean;
- constructor(shimHost: CoreServicesShimHost);
- readDirectory(rootDir: string, extensions: string[], exclude: string[], include: string[], depth?: number): string[];
- fileExists(fileName: string): boolean;
- readFile(fileName: string): string;
- private readDirectoryFallback(rootDir, extension, exclude);
- getDirectories(path: string): string[];
- }
- function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): {
- message: string;
- start: number;
- length: number;
- category: string;
- code: number;
- }[];
- class TypeScriptServicesFactory implements ShimFactory {
- private _shims;
- private documentRegistry;
- getServicesVersion(): string;
- createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim;
- createClassifierShim(logger: Logger): ClassifierShim;
- createCoreServicesShim(host: CoreServicesShimHost): CoreServicesShim;
- close(): void;
- registerShim(shim: Shim): void;
- unregisterShim(shim: Shim): void;
- }
-}
-declare namespace TypeScript.Services {
- const TypeScriptServicesFactory: typeof ts.TypeScriptServicesFactory;
-}
-declare const toolsVersion = "2.2";
+
+export = ts;
+export as namespace ts; \ No newline at end of file
diff --git a/node_modules/typescript/lib/tsserverlibrary.js b/node_modules/typescript/lib/tsserverlibrary.js
index 4ed37099e..5acf5bb26 100644
--- a/node_modules/typescript/lib/tsserverlibrary.js
+++ b/node_modules/typescript/lib/tsserverlibrary.js
@@ -13,13 +13,455 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+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;
};
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
var ts;
(function (ts) {
+ var SyntaxKind;
+ (function (SyntaxKind) {
+ SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown";
+ SyntaxKind[SyntaxKind["EndOfFileToken"] = 1] = "EndOfFileToken";
+ SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
+ SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia";
+ SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia";
+ SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia";
+ SyntaxKind[SyntaxKind["ShebangTrivia"] = 6] = "ShebangTrivia";
+ SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 7] = "ConflictMarkerTrivia";
+ SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral";
+ SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral";
+ SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText";
+ SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral";
+ SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral";
+ SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead";
+ SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle";
+ SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail";
+ SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken";
+ SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken";
+ SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken";
+ SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken";
+ SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken";
+ SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken";
+ SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken";
+ SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken";
+ SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken";
+ SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken";
+ SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken";
+ SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken";
+ SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken";
+ SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken";
+ SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken";
+ SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken";
+ SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken";
+ SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken";
+ SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken";
+ SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken";
+ SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken";
+ SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken";
+ SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken";
+ SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken";
+ SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken";
+ SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken";
+ SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken";
+ SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken";
+ SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken";
+ SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken";
+ SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken";
+ SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken";
+ SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken";
+ SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken";
+ SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken";
+ SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken";
+ SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken";
+ SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken";
+ SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken";
+ SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken";
+ SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken";
+ SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken";
+ SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken";
+ SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken";
+ SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken";
+ SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken";
+ SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken";
+ SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier";
+ SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword";
+ SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword";
+ SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword";
+ SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword";
+ SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword";
+ SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword";
+ SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword";
+ SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword";
+ SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword";
+ SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword";
+ SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword";
+ SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword";
+ SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword";
+ SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword";
+ SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword";
+ SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword";
+ SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword";
+ SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword";
+ SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword";
+ SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword";
+ SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword";
+ SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword";
+ SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword";
+ SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword";
+ SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword";
+ SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword";
+ SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword";
+ SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword";
+ SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword";
+ SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword";
+ SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword";
+ SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword";
+ SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword";
+ SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword";
+ SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword";
+ SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword";
+ SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword";
+ SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword";
+ SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword";
+ SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword";
+ SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword";
+ SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword";
+ SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword";
+ SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword";
+ SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword";
+ SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword";
+ SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword";
+ SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword";
+ SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword";
+ SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword";
+ SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword";
+ SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword";
+ SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword";
+ SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword";
+ SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword";
+ SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword";
+ SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword";
+ SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword";
+ SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword";
+ SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword";
+ SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword";
+ SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword";
+ SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword";
+ SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword";
+ SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword";
+ SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword";
+ SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword";
+ SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword";
+ SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword";
+ SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword";
+ SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword";
+ SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName";
+ SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName";
+ SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter";
+ SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter";
+ SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator";
+ SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature";
+ SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration";
+ SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature";
+ SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration";
+ SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor";
+ SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor";
+ SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor";
+ SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature";
+ SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature";
+ SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature";
+ SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate";
+ SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference";
+ SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType";
+ SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType";
+ SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery";
+ SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral";
+ SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType";
+ SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType";
+ SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType";
+ SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType";
+ SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType";
+ SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType";
+ SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator";
+ SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType";
+ SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType";
+ SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType";
+ SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern";
+ SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern";
+ SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement";
+ SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression";
+ SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression";
+ SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression";
+ SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression";
+ SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression";
+ SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression";
+ SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression";
+ SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression";
+ SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression";
+ SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression";
+ SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction";
+ SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression";
+ SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression";
+ SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression";
+ SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression";
+ SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression";
+ SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression";
+ SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression";
+ SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression";
+ SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression";
+ SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression";
+ SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement";
+ SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression";
+ SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression";
+ SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments";
+ SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression";
+ SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty";
+ SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan";
+ SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement";
+ SyntaxKind[SyntaxKind["Block"] = 206] = "Block";
+ SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement";
+ SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement";
+ SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement";
+ SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement";
+ SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement";
+ SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement";
+ SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement";
+ SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement";
+ SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement";
+ SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement";
+ SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement";
+ SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement";
+ SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement";
+ SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement";
+ SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement";
+ SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement";
+ SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement";
+ SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement";
+ SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration";
+ SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList";
+ SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration";
+ SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration";
+ SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration";
+ SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration";
+ SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration";
+ SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration";
+ SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock";
+ SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock";
+ SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration";
+ SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration";
+ SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration";
+ SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause";
+ SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport";
+ SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports";
+ SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier";
+ SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment";
+ SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration";
+ SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports";
+ SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier";
+ SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration";
+ SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference";
+ SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement";
+ SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement";
+ SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement";
+ SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement";
+ SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute";
+ SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes";
+ SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute";
+ SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression";
+ SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause";
+ SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause";
+ SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause";
+ SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause";
+ SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment";
+ SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment";
+ SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment";
+ SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember";
+ SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile";
+ SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle";
+ SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression";
+ SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType";
+ SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType";
+ SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType";
+ SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType";
+ SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType";
+ SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType";
+ SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType";
+ SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType";
+ SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember";
+ SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference";
+ SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType";
+ SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType";
+ SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType";
+ SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType";
+ SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType";
+ SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment";
+ SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag";
+ SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["Count"] = 298] = "Count";
+ SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment";
+ SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment";
+ SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment";
+ SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment";
+ SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord";
+ SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord";
+ SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword";
+ SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword";
+ SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord";
+ SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord";
+ SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode";
+ SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode";
+ SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation";
+ SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation";
+ SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
+ SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken";
+ SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
+ SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken";
+ SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
+ SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken";
+ SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken";
+ SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken";
+ SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator";
+ SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator";
+ SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode";
+ SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode";
+ })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
+ var NodeFlags;
+ (function (NodeFlags) {
+ NodeFlags[NodeFlags["None"] = 0] = "None";
+ NodeFlags[NodeFlags["Let"] = 1] = "Let";
+ NodeFlags[NodeFlags["Const"] = 2] = "Const";
+ NodeFlags[NodeFlags["NestedNamespace"] = 4] = "NestedNamespace";
+ NodeFlags[NodeFlags["Synthesized"] = 8] = "Synthesized";
+ NodeFlags[NodeFlags["Namespace"] = 16] = "Namespace";
+ NodeFlags[NodeFlags["ExportContext"] = 32] = "ExportContext";
+ NodeFlags[NodeFlags["ContainsThis"] = 64] = "ContainsThis";
+ NodeFlags[NodeFlags["HasImplicitReturn"] = 128] = "HasImplicitReturn";
+ NodeFlags[NodeFlags["HasExplicitReturn"] = 256] = "HasExplicitReturn";
+ NodeFlags[NodeFlags["GlobalAugmentation"] = 512] = "GlobalAugmentation";
+ NodeFlags[NodeFlags["HasAsyncFunctions"] = 1024] = "HasAsyncFunctions";
+ NodeFlags[NodeFlags["DisallowInContext"] = 2048] = "DisallowInContext";
+ NodeFlags[NodeFlags["YieldContext"] = 4096] = "YieldContext";
+ NodeFlags[NodeFlags["DecoratorContext"] = 8192] = "DecoratorContext";
+ NodeFlags[NodeFlags["AwaitContext"] = 16384] = "AwaitContext";
+ NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+ NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+ NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+ NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
+ NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
+ NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
+ NodeFlags[NodeFlags["ContextFlags"] = 96256] = "ContextFlags";
+ NodeFlags[NodeFlags["TypeExcludesFlags"] = 20480] = "TypeExcludesFlags";
+ })(NodeFlags = ts.NodeFlags || (ts.NodeFlags = {}));
+ var ModifierFlags;
+ (function (ModifierFlags) {
+ ModifierFlags[ModifierFlags["None"] = 0] = "None";
+ ModifierFlags[ModifierFlags["Export"] = 1] = "Export";
+ ModifierFlags[ModifierFlags["Ambient"] = 2] = "Ambient";
+ ModifierFlags[ModifierFlags["Public"] = 4] = "Public";
+ ModifierFlags[ModifierFlags["Private"] = 8] = "Private";
+ ModifierFlags[ModifierFlags["Protected"] = 16] = "Protected";
+ ModifierFlags[ModifierFlags["Static"] = 32] = "Static";
+ ModifierFlags[ModifierFlags["Readonly"] = 64] = "Readonly";
+ ModifierFlags[ModifierFlags["Abstract"] = 128] = "Abstract";
+ ModifierFlags[ModifierFlags["Async"] = 256] = "Async";
+ ModifierFlags[ModifierFlags["Default"] = 512] = "Default";
+ ModifierFlags[ModifierFlags["Const"] = 2048] = "Const";
+ ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+ ModifierFlags[ModifierFlags["AccessibilityModifier"] = 28] = "AccessibilityModifier";
+ ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 92] = "ParameterPropertyModifier";
+ ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier";
+ ModifierFlags[ModifierFlags["TypeScriptModifier"] = 2270] = "TypeScriptModifier";
+ ModifierFlags[ModifierFlags["ExportDefault"] = 513] = "ExportDefault";
+ })(ModifierFlags = ts.ModifierFlags || (ts.ModifierFlags = {}));
+ var JsxFlags;
+ (function (JsxFlags) {
+ JsxFlags[JsxFlags["None"] = 0] = "None";
+ JsxFlags[JsxFlags["IntrinsicNamedElement"] = 1] = "IntrinsicNamedElement";
+ JsxFlags[JsxFlags["IntrinsicIndexedElement"] = 2] = "IntrinsicIndexedElement";
+ JsxFlags[JsxFlags["IntrinsicElement"] = 3] = "IntrinsicElement";
+ })(JsxFlags = ts.JsxFlags || (ts.JsxFlags = {}));
+ var RelationComparisonResult;
+ (function (RelationComparisonResult) {
+ RelationComparisonResult[RelationComparisonResult["Succeeded"] = 1] = "Succeeded";
+ RelationComparisonResult[RelationComparisonResult["Failed"] = 2] = "Failed";
+ RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported";
+ })(RelationComparisonResult = ts.RelationComparisonResult || (ts.RelationComparisonResult = {}));
+ var GeneratedIdentifierKind;
+ (function (GeneratedIdentifierKind) {
+ GeneratedIdentifierKind[GeneratedIdentifierKind["None"] = 0] = "None";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Auto"] = 1] = "Auto";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Loop"] = 2] = "Loop";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Unique"] = 3] = "Unique";
+ GeneratedIdentifierKind[GeneratedIdentifierKind["Node"] = 4] = "Node";
+ })(GeneratedIdentifierKind = ts.GeneratedIdentifierKind || (ts.GeneratedIdentifierKind = {}));
+ var NumericLiteralFlags;
+ (function (NumericLiteralFlags) {
+ NumericLiteralFlags[NumericLiteralFlags["None"] = 0] = "None";
+ NumericLiteralFlags[NumericLiteralFlags["Scientific"] = 2] = "Scientific";
+ NumericLiteralFlags[NumericLiteralFlags["Octal"] = 4] = "Octal";
+ NumericLiteralFlags[NumericLiteralFlags["HexSpecifier"] = 8] = "HexSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinarySpecifier"] = 16] = "BinarySpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["OctalSpecifier"] = 32] = "OctalSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinaryOrOctalSpecifier"] = 48] = "BinaryOrOctalSpecifier";
+ })(NumericLiteralFlags = ts.NumericLiteralFlags || (ts.NumericLiteralFlags = {}));
+ var FlowFlags;
+ (function (FlowFlags) {
+ FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable";
+ FlowFlags[FlowFlags["Start"] = 2] = "Start";
+ FlowFlags[FlowFlags["BranchLabel"] = 4] = "BranchLabel";
+ FlowFlags[FlowFlags["LoopLabel"] = 8] = "LoopLabel";
+ FlowFlags[FlowFlags["Assignment"] = 16] = "Assignment";
+ FlowFlags[FlowFlags["TrueCondition"] = 32] = "TrueCondition";
+ FlowFlags[FlowFlags["FalseCondition"] = 64] = "FalseCondition";
+ FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause";
+ FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation";
+ FlowFlags[FlowFlags["Referenced"] = 512] = "Referenced";
+ FlowFlags[FlowFlags["Shared"] = 1024] = "Shared";
+ FlowFlags[FlowFlags["PreFinally"] = 2048] = "PreFinally";
+ FlowFlags[FlowFlags["AfterFinally"] = 4096] = "AfterFinally";
+ FlowFlags[FlowFlags["Label"] = 12] = "Label";
+ FlowFlags[FlowFlags["Condition"] = 96] = "Condition";
+ })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {}));
var OperationCanceledException = (function () {
function OperationCanceledException() {
}
@@ -32,6 +474,55 @@ var ts;
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
+ var TypeFormatFlags;
+ (function (TypeFormatFlags) {
+ TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None";
+ TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 1] = "WriteArrayAsGenericType";
+ TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 2] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 4] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 8] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 16] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 2048] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 4096] = "AddUndefined";
+ })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
+ var SymbolFormatFlags;
+ (function (SymbolFormatFlags) {
+ SymbolFormatFlags[SymbolFormatFlags["None"] = 0] = "None";
+ SymbolFormatFlags[SymbolFormatFlags["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments";
+ SymbolFormatFlags[SymbolFormatFlags["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing";
+ })(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
+ var SymbolAccessibility;
+ (function (SymbolAccessibility) {
+ SymbolAccessibility[SymbolAccessibility["Accessible"] = 0] = "Accessible";
+ SymbolAccessibility[SymbolAccessibility["NotAccessible"] = 1] = "NotAccessible";
+ SymbolAccessibility[SymbolAccessibility["CannotBeNamed"] = 2] = "CannotBeNamed";
+ })(SymbolAccessibility = ts.SymbolAccessibility || (ts.SymbolAccessibility = {}));
+ var SyntheticSymbolKind;
+ (function (SyntheticSymbolKind) {
+ SyntheticSymbolKind[SyntheticSymbolKind["UnionOrIntersection"] = 0] = "UnionOrIntersection";
+ SyntheticSymbolKind[SyntheticSymbolKind["Spread"] = 1] = "Spread";
+ })(SyntheticSymbolKind = ts.SyntheticSymbolKind || (ts.SyntheticSymbolKind = {}));
+ var TypePredicateKind;
+ (function (TypePredicateKind) {
+ TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
+ TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
+ })(TypePredicateKind = ts.TypePredicateKind || (ts.TypePredicateKind = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
TypeReferenceSerializationKind[TypeReferenceSerializationKind["Unknown"] = 0] = "Unknown";
@@ -46,6 +537,191 @@ var ts;
TypeReferenceSerializationKind[TypeReferenceSerializationKind["TypeWithCallSignature"] = 9] = "TypeWithCallSignature";
TypeReferenceSerializationKind[TypeReferenceSerializationKind["ObjectType"] = 10] = "ObjectType";
})(TypeReferenceSerializationKind = ts.TypeReferenceSerializationKind || (ts.TypeReferenceSerializationKind = {}));
+ var SymbolFlags;
+ (function (SymbolFlags) {
+ SymbolFlags[SymbolFlags["None"] = 0] = "None";
+ SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable";
+ SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable";
+ SymbolFlags[SymbolFlags["Property"] = 4] = "Property";
+ SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember";
+ SymbolFlags[SymbolFlags["Function"] = 16] = "Function";
+ SymbolFlags[SymbolFlags["Class"] = 32] = "Class";
+ SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface";
+ SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum";
+ SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum";
+ SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule";
+ SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule";
+ SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral";
+ SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral";
+ SymbolFlags[SymbolFlags["Method"] = 8192] = "Method";
+ SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor";
+ SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor";
+ SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor";
+ SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature";
+ SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter";
+ SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias";
+ SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue";
+ SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType";
+ SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace";
+ SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias";
+ SymbolFlags[SymbolFlags["Prototype"] = 16777216] = "Prototype";
+ SymbolFlags[SymbolFlags["ExportStar"] = 33554432] = "ExportStar";
+ SymbolFlags[SymbolFlags["Optional"] = 67108864] = "Optional";
+ SymbolFlags[SymbolFlags["Transient"] = 134217728] = "Transient";
+ SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
+ SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
+ SymbolFlags[SymbolFlags["Value"] = 107455] = "Value";
+ SymbolFlags[SymbolFlags["Type"] = 793064] = "Type";
+ SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace";
+ SymbolFlags[SymbolFlags["Module"] = 1536] = "Module";
+ SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor";
+ SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 107454] = "FunctionScopedVariableExcludes";
+ SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes";
+ SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes";
+ SymbolFlags[SymbolFlags["PropertyExcludes"] = 0] = "PropertyExcludes";
+ SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes";
+ SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes";
+ SymbolFlags[SymbolFlags["ClassExcludes"] = 899519] = "ClassExcludes";
+ SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792968] = "InterfaceExcludes";
+ SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes";
+ SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes";
+ SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes";
+ SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes";
+ SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes";
+ SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes";
+ SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes";
+ SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530920] = "TypeParameterExcludes";
+ SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793064] = "TypeAliasExcludes";
+ SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes";
+ SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember";
+ SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
+ SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
+ SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
+ SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
+ SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
+ SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export";
+ SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
+ SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
+ })(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
+ var CheckFlags;
+ (function (CheckFlags) {
+ CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
+ CheckFlags[CheckFlags["SyntheticProperty"] = 2] = "SyntheticProperty";
+ CheckFlags[CheckFlags["SyntheticMethod"] = 4] = "SyntheticMethod";
+ CheckFlags[CheckFlags["Readonly"] = 8] = "Readonly";
+ CheckFlags[CheckFlags["Partial"] = 16] = "Partial";
+ CheckFlags[CheckFlags["HasNonUniformType"] = 32] = "HasNonUniformType";
+ CheckFlags[CheckFlags["ContainsPublic"] = 64] = "ContainsPublic";
+ CheckFlags[CheckFlags["ContainsProtected"] = 128] = "ContainsProtected";
+ CheckFlags[CheckFlags["ContainsPrivate"] = 256] = "ContainsPrivate";
+ CheckFlags[CheckFlags["ContainsStatic"] = 512] = "ContainsStatic";
+ CheckFlags[CheckFlags["Synthetic"] = 6] = "Synthetic";
+ })(CheckFlags = ts.CheckFlags || (ts.CheckFlags = {}));
+ var NodeCheckFlags;
+ (function (NodeCheckFlags) {
+ NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked";
+ NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureNewTarget"] = 8] = "CaptureNewTarget";
+ NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance";
+ NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic";
+ NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked";
+ NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuper"] = 2048] = "AsyncMethodWithSuper";
+ NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuperBinding"] = 4096] = "AsyncMethodWithSuperBinding";
+ NodeCheckFlags[NodeCheckFlags["CaptureArguments"] = 8192] = "CaptureArguments";
+ NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 16384] = "EnumValuesComputed";
+ NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 32768] = "LexicalModuleMergesWithClass";
+ NodeCheckFlags[NodeCheckFlags["LoopWithCapturedBlockScopedBinding"] = 65536] = "LoopWithCapturedBlockScopedBinding";
+ NodeCheckFlags[NodeCheckFlags["CapturedBlockScopedBinding"] = 131072] = "CapturedBlockScopedBinding";
+ NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 262144] = "BlockScopedBindingInLoop";
+ NodeCheckFlags[NodeCheckFlags["ClassWithBodyScopedClassBinding"] = 524288] = "ClassWithBodyScopedClassBinding";
+ NodeCheckFlags[NodeCheckFlags["BodyScopedClassBinding"] = 1048576] = "BodyScopedClassBinding";
+ NodeCheckFlags[NodeCheckFlags["NeedsLoopOutParameter"] = 2097152] = "NeedsLoopOutParameter";
+ NodeCheckFlags[NodeCheckFlags["AssignmentsMarked"] = 4194304] = "AssignmentsMarked";
+ NodeCheckFlags[NodeCheckFlags["ClassWithConstructorReference"] = 8388608] = "ClassWithConstructorReference";
+ NodeCheckFlags[NodeCheckFlags["ConstructorReferenceInClass"] = 16777216] = "ConstructorReferenceInClass";
+ })(NodeCheckFlags = ts.NodeCheckFlags || (ts.NodeCheckFlags = {}));
+ var TypeFlags;
+ (function (TypeFlags) {
+ TypeFlags[TypeFlags["Any"] = 1] = "Any";
+ TypeFlags[TypeFlags["String"] = 2] = "String";
+ TypeFlags[TypeFlags["Number"] = 4] = "Number";
+ TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean";
+ TypeFlags[TypeFlags["Enum"] = 16] = "Enum";
+ TypeFlags[TypeFlags["StringLiteral"] = 32] = "StringLiteral";
+ TypeFlags[TypeFlags["NumberLiteral"] = 64] = "NumberLiteral";
+ TypeFlags[TypeFlags["BooleanLiteral"] = 128] = "BooleanLiteral";
+ TypeFlags[TypeFlags["EnumLiteral"] = 256] = "EnumLiteral";
+ TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol";
+ TypeFlags[TypeFlags["Void"] = 1024] = "Void";
+ TypeFlags[TypeFlags["Undefined"] = 2048] = "Undefined";
+ TypeFlags[TypeFlags["Null"] = 4096] = "Null";
+ TypeFlags[TypeFlags["Never"] = 8192] = "Never";
+ TypeFlags[TypeFlags["TypeParameter"] = 16384] = "TypeParameter";
+ TypeFlags[TypeFlags["Object"] = 32768] = "Object";
+ TypeFlags[TypeFlags["Union"] = 65536] = "Union";
+ TypeFlags[TypeFlags["Intersection"] = 131072] = "Intersection";
+ TypeFlags[TypeFlags["Index"] = 262144] = "Index";
+ TypeFlags[TypeFlags["IndexedAccess"] = 524288] = "IndexedAccess";
+ TypeFlags[TypeFlags["FreshLiteral"] = 1048576] = "FreshLiteral";
+ TypeFlags[TypeFlags["ContainsWideningType"] = 2097152] = "ContainsWideningType";
+ TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral";
+ TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType";
+ TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
+ TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
+ TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
+ TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["StringOrNumberLiteral"] = 96] = "StringOrNumberLiteral";
+ TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
+ TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy";
+ TypeFlags[TypeFlags["Intrinsic"] = 16793231] = "Intrinsic";
+ TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
+ TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
+ TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike";
+ TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike";
+ TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
+ TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
+ TypeFlags[TypeFlags["StructuredType"] = 229376] = "StructuredType";
+ TypeFlags[TypeFlags["StructuredOrTypeVariable"] = 1032192] = "StructuredOrTypeVariable";
+ TypeFlags[TypeFlags["TypeVariable"] = 540672] = "TypeVariable";
+ TypeFlags[TypeFlags["Narrowable"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
+ TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
+ TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags";
+ })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
+ var ObjectFlags;
+ (function (ObjectFlags) {
+ ObjectFlags[ObjectFlags["Class"] = 1] = "Class";
+ ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface";
+ ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference";
+ ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple";
+ ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous";
+ ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped";
+ ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated";
+ ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral";
+ ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray";
+ ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
+ ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
+ })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {}));
+ var SignatureKind;
+ (function (SignatureKind) {
+ SignatureKind[SignatureKind["Call"] = 0] = "Call";
+ SignatureKind[SignatureKind["Construct"] = 1] = "Construct";
+ })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {}));
+ var IndexKind;
+ (function (IndexKind) {
+ IndexKind[IndexKind["String"] = 0] = "String";
+ IndexKind[IndexKind["Number"] = 1] = "Number";
+ })(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var SpecialPropertyAssignmentKind;
+ (function (SpecialPropertyAssignmentKind) {
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["None"] = 0] = "None";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ExportsProperty"] = 1] = "ExportsProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ModuleExports"] = 2] = "ModuleExports";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["PrototypeProperty"] = 3] = "PrototypeProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ThisProperty"] = 4] = "ThisProperty";
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["Property"] = 5] = "Property";
+ })(SpecialPropertyAssignmentKind = ts.SpecialPropertyAssignmentKind || (ts.SpecialPropertyAssignmentKind = {}));
var DiagnosticCategory;
(function (DiagnosticCategory) {
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
@@ -66,6 +742,179 @@ var ts;
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
+ var JsxEmit;
+ (function (JsxEmit) {
+ JsxEmit[JsxEmit["None"] = 0] = "None";
+ JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
+ JsxEmit[JsxEmit["React"] = 2] = "React";
+ JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
+ })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {}));
+ var NewLineKind;
+ (function (NewLineKind) {
+ NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed";
+ NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed";
+ })(NewLineKind = ts.NewLineKind || (ts.NewLineKind = {}));
+ var ScriptKind;
+ (function (ScriptKind) {
+ ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown";
+ ScriptKind[ScriptKind["JS"] = 1] = "JS";
+ ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
+ ScriptKind[ScriptKind["TS"] = 3] = "TS";
+ ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+ ScriptKind[ScriptKind["External"] = 5] = "External";
+ })(ScriptKind = ts.ScriptKind || (ts.ScriptKind = {}));
+ var ScriptTarget;
+ (function (ScriptTarget) {
+ ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3";
+ ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5";
+ ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015";
+ ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016";
+ ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017";
+ ScriptTarget[ScriptTarget["ESNext"] = 5] = "ESNext";
+ ScriptTarget[ScriptTarget["Latest"] = 5] = "Latest";
+ })(ScriptTarget = ts.ScriptTarget || (ts.ScriptTarget = {}));
+ var LanguageVariant;
+ (function (LanguageVariant) {
+ LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard";
+ LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX";
+ })(LanguageVariant = ts.LanguageVariant || (ts.LanguageVariant = {}));
+ var DiagnosticStyle;
+ (function (DiagnosticStyle) {
+ DiagnosticStyle[DiagnosticStyle["Simple"] = 0] = "Simple";
+ DiagnosticStyle[DiagnosticStyle["Pretty"] = 1] = "Pretty";
+ })(DiagnosticStyle = ts.DiagnosticStyle || (ts.DiagnosticStyle = {}));
+ var WatchDirectoryFlags;
+ (function (WatchDirectoryFlags) {
+ WatchDirectoryFlags[WatchDirectoryFlags["None"] = 0] = "None";
+ WatchDirectoryFlags[WatchDirectoryFlags["Recursive"] = 1] = "Recursive";
+ })(WatchDirectoryFlags = ts.WatchDirectoryFlags || (ts.WatchDirectoryFlags = {}));
+ var CharacterCodes;
+ (function (CharacterCodes) {
+ CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter";
+ CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter";
+ CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed";
+ CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn";
+ CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator";
+ CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator";
+ CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine";
+ CharacterCodes[CharacterCodes["space"] = 32] = "space";
+ CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace";
+ CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad";
+ CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad";
+ CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace";
+ CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace";
+ CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace";
+ CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace";
+ CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace";
+ CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace";
+ CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace";
+ CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace";
+ CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace";
+ CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace";
+ CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace";
+ CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace";
+ CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace";
+ CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham";
+ CharacterCodes[CharacterCodes["_"] = 95] = "_";
+ CharacterCodes[CharacterCodes["$"] = 36] = "$";
+ CharacterCodes[CharacterCodes["_0"] = 48] = "_0";
+ CharacterCodes[CharacterCodes["_1"] = 49] = "_1";
+ CharacterCodes[CharacterCodes["_2"] = 50] = "_2";
+ CharacterCodes[CharacterCodes["_3"] = 51] = "_3";
+ CharacterCodes[CharacterCodes["_4"] = 52] = "_4";
+ CharacterCodes[CharacterCodes["_5"] = 53] = "_5";
+ CharacterCodes[CharacterCodes["_6"] = 54] = "_6";
+ CharacterCodes[CharacterCodes["_7"] = 55] = "_7";
+ CharacterCodes[CharacterCodes["_8"] = 56] = "_8";
+ CharacterCodes[CharacterCodes["_9"] = 57] = "_9";
+ CharacterCodes[CharacterCodes["a"] = 97] = "a";
+ CharacterCodes[CharacterCodes["b"] = 98] = "b";
+ CharacterCodes[CharacterCodes["c"] = 99] = "c";
+ CharacterCodes[CharacterCodes["d"] = 100] = "d";
+ CharacterCodes[CharacterCodes["e"] = 101] = "e";
+ CharacterCodes[CharacterCodes["f"] = 102] = "f";
+ CharacterCodes[CharacterCodes["g"] = 103] = "g";
+ CharacterCodes[CharacterCodes["h"] = 104] = "h";
+ CharacterCodes[CharacterCodes["i"] = 105] = "i";
+ CharacterCodes[CharacterCodes["j"] = 106] = "j";
+ CharacterCodes[CharacterCodes["k"] = 107] = "k";
+ CharacterCodes[CharacterCodes["l"] = 108] = "l";
+ CharacterCodes[CharacterCodes["m"] = 109] = "m";
+ CharacterCodes[CharacterCodes["n"] = 110] = "n";
+ CharacterCodes[CharacterCodes["o"] = 111] = "o";
+ CharacterCodes[CharacterCodes["p"] = 112] = "p";
+ CharacterCodes[CharacterCodes["q"] = 113] = "q";
+ CharacterCodes[CharacterCodes["r"] = 114] = "r";
+ CharacterCodes[CharacterCodes["s"] = 115] = "s";
+ CharacterCodes[CharacterCodes["t"] = 116] = "t";
+ CharacterCodes[CharacterCodes["u"] = 117] = "u";
+ CharacterCodes[CharacterCodes["v"] = 118] = "v";
+ CharacterCodes[CharacterCodes["w"] = 119] = "w";
+ CharacterCodes[CharacterCodes["x"] = 120] = "x";
+ CharacterCodes[CharacterCodes["y"] = 121] = "y";
+ CharacterCodes[CharacterCodes["z"] = 122] = "z";
+ CharacterCodes[CharacterCodes["A"] = 65] = "A";
+ CharacterCodes[CharacterCodes["B"] = 66] = "B";
+ CharacterCodes[CharacterCodes["C"] = 67] = "C";
+ CharacterCodes[CharacterCodes["D"] = 68] = "D";
+ CharacterCodes[CharacterCodes["E"] = 69] = "E";
+ CharacterCodes[CharacterCodes["F"] = 70] = "F";
+ CharacterCodes[CharacterCodes["G"] = 71] = "G";
+ CharacterCodes[CharacterCodes["H"] = 72] = "H";
+ CharacterCodes[CharacterCodes["I"] = 73] = "I";
+ CharacterCodes[CharacterCodes["J"] = 74] = "J";
+ CharacterCodes[CharacterCodes["K"] = 75] = "K";
+ CharacterCodes[CharacterCodes["L"] = 76] = "L";
+ CharacterCodes[CharacterCodes["M"] = 77] = "M";
+ CharacterCodes[CharacterCodes["N"] = 78] = "N";
+ CharacterCodes[CharacterCodes["O"] = 79] = "O";
+ CharacterCodes[CharacterCodes["P"] = 80] = "P";
+ CharacterCodes[CharacterCodes["Q"] = 81] = "Q";
+ CharacterCodes[CharacterCodes["R"] = 82] = "R";
+ CharacterCodes[CharacterCodes["S"] = 83] = "S";
+ CharacterCodes[CharacterCodes["T"] = 84] = "T";
+ CharacterCodes[CharacterCodes["U"] = 85] = "U";
+ CharacterCodes[CharacterCodes["V"] = 86] = "V";
+ CharacterCodes[CharacterCodes["W"] = 87] = "W";
+ CharacterCodes[CharacterCodes["X"] = 88] = "X";
+ CharacterCodes[CharacterCodes["Y"] = 89] = "Y";
+ CharacterCodes[CharacterCodes["Z"] = 90] = "Z";
+ CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand";
+ CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk";
+ CharacterCodes[CharacterCodes["at"] = 64] = "at";
+ CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash";
+ CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick";
+ CharacterCodes[CharacterCodes["bar"] = 124] = "bar";
+ CharacterCodes[CharacterCodes["caret"] = 94] = "caret";
+ CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace";
+ CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket";
+ CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen";
+ CharacterCodes[CharacterCodes["colon"] = 58] = "colon";
+ CharacterCodes[CharacterCodes["comma"] = 44] = "comma";
+ CharacterCodes[CharacterCodes["dot"] = 46] = "dot";
+ CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote";
+ CharacterCodes[CharacterCodes["equals"] = 61] = "equals";
+ CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation";
+ CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan";
+ CharacterCodes[CharacterCodes["hash"] = 35] = "hash";
+ CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan";
+ CharacterCodes[CharacterCodes["minus"] = 45] = "minus";
+ CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace";
+ CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket";
+ CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen";
+ CharacterCodes[CharacterCodes["percent"] = 37] = "percent";
+ CharacterCodes[CharacterCodes["plus"] = 43] = "plus";
+ CharacterCodes[CharacterCodes["question"] = 63] = "question";
+ CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon";
+ CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote";
+ CharacterCodes[CharacterCodes["slash"] = 47] = "slash";
+ CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde";
+ CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace";
+ CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
+ CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark";
+ CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
+ CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab";
+ })(CharacterCodes = ts.CharacterCodes || (ts.CharacterCodes = {}));
var Extension;
(function (Extension) {
Extension[Extension["Ts"] = 0] = "Ts";
@@ -75,6 +924,121 @@ var ts;
Extension[Extension["Jsx"] = 4] = "Jsx";
Extension[Extension["LastTypeScriptExtension"] = 2] = "LastTypeScriptExtension";
})(Extension = ts.Extension || (ts.Extension = {}));
+ var TransformFlags;
+ (function (TransformFlags) {
+ TransformFlags[TransformFlags["None"] = 0] = "None";
+ TransformFlags[TransformFlags["TypeScript"] = 1] = "TypeScript";
+ TransformFlags[TransformFlags["ContainsTypeScript"] = 2] = "ContainsTypeScript";
+ TransformFlags[TransformFlags["ContainsJsx"] = 4] = "ContainsJsx";
+ TransformFlags[TransformFlags["ContainsESNext"] = 8] = "ContainsESNext";
+ TransformFlags[TransformFlags["ContainsES2017"] = 16] = "ContainsES2017";
+ TransformFlags[TransformFlags["ContainsES2016"] = 32] = "ContainsES2016";
+ TransformFlags[TransformFlags["ES2015"] = 64] = "ES2015";
+ TransformFlags[TransformFlags["ContainsES2015"] = 128] = "ContainsES2015";
+ TransformFlags[TransformFlags["Generator"] = 256] = "Generator";
+ TransformFlags[TransformFlags["ContainsGenerator"] = 512] = "ContainsGenerator";
+ TransformFlags[TransformFlags["DestructuringAssignment"] = 1024] = "DestructuringAssignment";
+ TransformFlags[TransformFlags["ContainsDestructuringAssignment"] = 2048] = "ContainsDestructuringAssignment";
+ TransformFlags[TransformFlags["ContainsDecorators"] = 4096] = "ContainsDecorators";
+ TransformFlags[TransformFlags["ContainsPropertyInitializer"] = 8192] = "ContainsPropertyInitializer";
+ TransformFlags[TransformFlags["ContainsLexicalThis"] = 16384] = "ContainsLexicalThis";
+ TransformFlags[TransformFlags["ContainsCapturedLexicalThis"] = 32768] = "ContainsCapturedLexicalThis";
+ TransformFlags[TransformFlags["ContainsLexicalThisInComputedPropertyName"] = 65536] = "ContainsLexicalThisInComputedPropertyName";
+ TransformFlags[TransformFlags["ContainsDefaultValueAssignments"] = 131072] = "ContainsDefaultValueAssignments";
+ TransformFlags[TransformFlags["ContainsParameterPropertyAssignments"] = 262144] = "ContainsParameterPropertyAssignments";
+ TransformFlags[TransformFlags["ContainsSpread"] = 524288] = "ContainsSpread";
+ TransformFlags[TransformFlags["ContainsObjectSpread"] = 1048576] = "ContainsObjectSpread";
+ TransformFlags[TransformFlags["ContainsRest"] = 524288] = "ContainsRest";
+ TransformFlags[TransformFlags["ContainsObjectRest"] = 1048576] = "ContainsObjectRest";
+ TransformFlags[TransformFlags["ContainsComputedPropertyName"] = 2097152] = "ContainsComputedPropertyName";
+ TransformFlags[TransformFlags["ContainsBlockScopedBinding"] = 4194304] = "ContainsBlockScopedBinding";
+ TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
+ TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
+ TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+ TransformFlags[TransformFlags["AssertTypeScript"] = 3] = "AssertTypeScript";
+ TransformFlags[TransformFlags["AssertJsx"] = 4] = "AssertJsx";
+ TransformFlags[TransformFlags["AssertESNext"] = 8] = "AssertESNext";
+ TransformFlags[TransformFlags["AssertES2017"] = 16] = "AssertES2017";
+ TransformFlags[TransformFlags["AssertES2016"] = 32] = "AssertES2016";
+ TransformFlags[TransformFlags["AssertES2015"] = 192] = "AssertES2015";
+ TransformFlags[TransformFlags["AssertGenerator"] = 768] = "AssertGenerator";
+ TransformFlags[TransformFlags["AssertDestructuringAssignment"] = 3072] = "AssertDestructuringAssignment";
+ TransformFlags[TransformFlags["NodeExcludes"] = 536872257] = "NodeExcludes";
+ TransformFlags[TransformFlags["ArrowFunctionExcludes"] = 601249089] = "ArrowFunctionExcludes";
+ TransformFlags[TransformFlags["FunctionExcludes"] = 601281857] = "FunctionExcludes";
+ TransformFlags[TransformFlags["ConstructorExcludes"] = 601015617] = "ConstructorExcludes";
+ TransformFlags[TransformFlags["MethodOrAccessorExcludes"] = 601015617] = "MethodOrAccessorExcludes";
+ TransformFlags[TransformFlags["ClassExcludes"] = 539358529] = "ClassExcludes";
+ TransformFlags[TransformFlags["ModuleExcludes"] = 574674241] = "ModuleExcludes";
+ TransformFlags[TransformFlags["TypeExcludes"] = -3] = "TypeExcludes";
+ TransformFlags[TransformFlags["ObjectLiteralExcludes"] = 540087617] = "ObjectLiteralExcludes";
+ TransformFlags[TransformFlags["ArrayLiteralOrCallOrNewExcludes"] = 537396545] = "ArrayLiteralOrCallOrNewExcludes";
+ TransformFlags[TransformFlags["VariableDeclarationListExcludes"] = 546309441] = "VariableDeclarationListExcludes";
+ TransformFlags[TransformFlags["ParameterExcludes"] = 536872257] = "ParameterExcludes";
+ TransformFlags[TransformFlags["CatchClauseExcludes"] = 537920833] = "CatchClauseExcludes";
+ TransformFlags[TransformFlags["BindingPatternExcludes"] = 537396545] = "BindingPatternExcludes";
+ TransformFlags[TransformFlags["TypeScriptClassSyntaxMask"] = 274432] = "TypeScriptClassSyntaxMask";
+ TransformFlags[TransformFlags["ES2015FunctionSyntaxMask"] = 163840] = "ES2015FunctionSyntaxMask";
+ })(TransformFlags = ts.TransformFlags || (ts.TransformFlags = {}));
+ var EmitFlags;
+ (function (EmitFlags) {
+ EmitFlags[EmitFlags["SingleLine"] = 1] = "SingleLine";
+ EmitFlags[EmitFlags["AdviseOnEmitNode"] = 2] = "AdviseOnEmitNode";
+ EmitFlags[EmitFlags["NoSubstitution"] = 4] = "NoSubstitution";
+ EmitFlags[EmitFlags["CapturesThis"] = 8] = "CapturesThis";
+ EmitFlags[EmitFlags["NoLeadingSourceMap"] = 16] = "NoLeadingSourceMap";
+ EmitFlags[EmitFlags["NoTrailingSourceMap"] = 32] = "NoTrailingSourceMap";
+ EmitFlags[EmitFlags["NoSourceMap"] = 48] = "NoSourceMap";
+ EmitFlags[EmitFlags["NoNestedSourceMaps"] = 64] = "NoNestedSourceMaps";
+ EmitFlags[EmitFlags["NoTokenLeadingSourceMaps"] = 128] = "NoTokenLeadingSourceMaps";
+ EmitFlags[EmitFlags["NoTokenTrailingSourceMaps"] = 256] = "NoTokenTrailingSourceMaps";
+ EmitFlags[EmitFlags["NoTokenSourceMaps"] = 384] = "NoTokenSourceMaps";
+ EmitFlags[EmitFlags["NoLeadingComments"] = 512] = "NoLeadingComments";
+ EmitFlags[EmitFlags["NoTrailingComments"] = 1024] = "NoTrailingComments";
+ EmitFlags[EmitFlags["NoComments"] = 1536] = "NoComments";
+ EmitFlags[EmitFlags["NoNestedComments"] = 2048] = "NoNestedComments";
+ EmitFlags[EmitFlags["HelperName"] = 4096] = "HelperName";
+ EmitFlags[EmitFlags["ExportName"] = 8192] = "ExportName";
+ EmitFlags[EmitFlags["LocalName"] = 16384] = "LocalName";
+ EmitFlags[EmitFlags["Indented"] = 32768] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 65536] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 131072] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 262144] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 524288] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 1048576] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 2097152] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 4194304] = "Iterator";
+ })(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
+ var ExternalEmitHelpers;
+ (function (ExternalEmitHelpers) {
+ ExternalEmitHelpers[ExternalEmitHelpers["Extends"] = 1] = "Extends";
+ ExternalEmitHelpers[ExternalEmitHelpers["Assign"] = 2] = "Assign";
+ ExternalEmitHelpers[ExternalEmitHelpers["Rest"] = 4] = "Rest";
+ ExternalEmitHelpers[ExternalEmitHelpers["Decorate"] = 8] = "Decorate";
+ ExternalEmitHelpers[ExternalEmitHelpers["Metadata"] = 16] = "Metadata";
+ ExternalEmitHelpers[ExternalEmitHelpers["Param"] = 32] = "Param";
+ ExternalEmitHelpers[ExternalEmitHelpers["Awaiter"] = 64] = "Awaiter";
+ ExternalEmitHelpers[ExternalEmitHelpers["Generator"] = 128] = "Generator";
+ ExternalEmitHelpers[ExternalEmitHelpers["Values"] = 256] = "Values";
+ ExternalEmitHelpers[ExternalEmitHelpers["Read"] = 512] = "Read";
+ ExternalEmitHelpers[ExternalEmitHelpers["Spread"] = 1024] = "Spread";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 2048] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 4096] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 8192] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
+ var EmitHint;
+ (function (EmitHint) {
+ EmitHint[EmitHint["SourceFile"] = 0] = "SourceFile";
+ EmitHint[EmitHint["Expression"] = 1] = "Expression";
+ EmitHint[EmitHint["IdentifierName"] = 2] = "IdentifierName";
+ EmitHint[EmitHint["Unspecified"] = 3] = "Unspecified";
+ })(EmitHint = ts.EmitHint || (ts.EmitHint = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -93,32 +1057,32 @@ var ts;
var measures;
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
performance.mark = mark;
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
function enable() {
@@ -137,22 +1101,102 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
(function (ts) {
- var createObject = Object.create;
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null);
+ var Ternary;
+ (function (Ternary) {
+ Ternary[Ternary["False"] = 0] = "False";
+ Ternary[Ternary["Maybe"] = 1] = "Maybe";
+ Ternary[Ternary["True"] = -1] = "True";
+ })(Ternary = ts.Ternary || (ts.Ternary = {}));
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ function createDictionaryObject() {
+ var map = Object.create(null);
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -165,32 +1209,27 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -204,9 +1243,19 @@ var ts;
return getCanonicalFileName(nonCanonicalizedPath);
}
ts.toPath = toPath;
+ var Comparison;
+ (function (Comparison) {
+ Comparison[Comparison["LessThan"] = -1] = "LessThan";
+ Comparison[Comparison["EqualTo"] = 0] = "EqualTo";
+ Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan";
+ })(Comparison = ts.Comparison || (ts.Comparison = {}));
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -216,6 +1265,20 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -225,7 +1288,7 @@ var ts;
ts.zipWith = zipWith;
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -235,7 +1298,7 @@ var ts;
}
ts.every = every;
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -244,8 +1307,17 @@ var ts;
return undefined;
}
ts.find = find;
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -268,7 +1340,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -278,7 +1350,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -465,21 +1537,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -763,38 +1832,55 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
- return false;
+ return result;
+ var _b;
}
- ts.someProperties = someProperties;
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ ts.convertToArray = convertToArray;
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachEntry = forEachEntry;
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ var _b;
+ }
+ ts.forEachKey = forEachKey;
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
}
- ts.appendProperty = appendProperty;
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -802,31 +1888,14 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
function equalOwnProperties(left, right, equalityComparer) {
if (left === right)
return true;
@@ -851,23 +1920,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -894,27 +1954,32 @@ var ts;
return result;
}
ts.extend = extend;
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
function isArray(value) {
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
@@ -990,6 +2055,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -1091,8 +2157,10 @@ var ts;
if (b === undefined)
return 1;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- var result = a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
return result < 0 ? -1 : result > 0 ? 1 : 0;
}
a = a.toUpperCase();
@@ -1474,36 +2542,26 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther;
var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther;
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
function isImplicitGlob(lastPathComponent) {
return !/[.*?]/.test(lastPathComponent);
}
@@ -1573,6 +2631,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -1585,34 +2644,48 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
}
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
+ }
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -1628,14 +2701,14 @@ var ts;
includeBasePaths.push(getIncludeBasePath(absolute));
}
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
};
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -1673,8 +2746,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -1685,11 +2769,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -1698,33 +2782,40 @@ var ts;
return false;
}
ts.isSupportedSourceFileName = isSupportedSourceFileName;
+ var ExtensionPriority;
+ (function (ExtensionPriority) {
+ ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles";
+ ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles";
+ ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest";
+ ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest";
+ })(ExtensionPriority = ts.ExtensionPriority || (ts.ExtensionPriority = {}));
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
return 0;
}
ts.getExtensionPriority = getExtensionPriority;
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 0;
}
- else if (extensionPriority < 5) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -1782,6 +2873,13 @@ var ts;
getTypeConstructor: function () { return Type; },
getSignatureConstructor: function () { return Signature; }
};
+ var AssertionLevel;
+ (function (AssertionLevel) {
+ AssertionLevel[AssertionLevel["None"] = 0] = "None";
+ AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal";
+ AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive";
+ AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive";
+ })(AssertionLevel = ts.AssertionLevel || (ts.AssertionLevel = {}));
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
@@ -1933,136 +3031,29 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- fileStream.Position = 0;
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
}
+ var version = process.version;
+ if (!version) {
+ return undefined;
+ }
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
+ }
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -2071,32 +3062,32 @@ var ts;
var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"];
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -2108,24 +3099,26 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
var fileName = typeof relativeFileName !== "string"
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
if (platform === "win32" || platform === "win64") {
return false;
@@ -2182,10 +3175,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -2206,6 +3199,11 @@ var ts;
function readDirectory(path, extensions, excludes, includes) {
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), getAccessibleFileSystemEntries);
}
+ var FileSystemEntryKind;
+ (function (FileSystemEntryKind) {
+ FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File";
+ FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory";
+ })(FileSystemEntryKind || (FileSystemEntryKind = {}));
function fileSystemEntryExists(path, entryKind) {
try {
var stat = _fs.statSync(path);
@@ -2262,7 +3260,7 @@ var ts;
if (!directoryExists(directoryName)) {
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -2272,7 +3270,6 @@ var ts;
if (eventName === "rename") {
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -2389,9 +3386,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
sys = getNodeSystem();
}
@@ -2460,11 +3454,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -2473,7 +3467,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -2489,6 +3483,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -2496,7 +3491,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -2528,9 +3523,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -2579,11 +3574,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -2629,6 +3625,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -2672,6 +3673,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -2682,19 +3684,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -2734,12 +3737,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -2748,19 +3751,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -2769,18 +3772,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -2801,13 +3806,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -2819,6 +3824,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -2833,6 +3839,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -2856,23 +3863,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -2904,7 +3921,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -2913,9 +3929,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -2926,8 +3950,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -2988,16 +4012,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -3006,12 +4032,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -3029,11 +4055,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -3048,11 +4074,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -3074,17 +4101,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -3095,23 +4123,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -3121,32 +4149,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -3164,7 +4227,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -3188,7 +4251,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -3196,28 +4259,40 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
})(ts || (ts = {}));
var ts;
@@ -3226,7 +4301,7 @@ var ts;
return token >= 70;
}
ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
+ var textToToken = ts.createMapFromTemplate({
"abstract": 116,
"any": 118,
"as": 117,
@@ -3250,7 +4325,7 @@ var ts;
"false": 85,
"finally": 86,
"for": 87,
- "from": 138,
+ "from": 139,
"function": 88,
"get": 124,
"if": 89,
@@ -3268,27 +4343,28 @@ var ts;
"new": 93,
"null": 94,
"number": 132,
+ "object": 133,
"package": 110,
"private": 111,
"protected": 112,
"public": 113,
"readonly": 130,
"require": 131,
- "global": 139,
+ "global": 140,
"return": 95,
- "set": 133,
+ "set": 134,
"static": 114,
- "string": 134,
+ "string": 135,
"super": 96,
"switch": 97,
- "symbol": 135,
+ "symbol": 136,
"this": 98,
"throw": 99,
"true": 100,
"try": 101,
- "type": 136,
+ "type": 137,
"typeof": 102,
- "undefined": 137,
+ "undefined": 138,
"var": 103,
"void": 104,
"while": 105,
@@ -3296,7 +4372,7 @@ var ts;
"yield": 115,
"async": 119,
"await": 120,
- "of": 140,
+ "of": 141,
"{": 16,
"}": 17,
"(": 18,
@@ -3391,9 +4467,9 @@ var ts;
}
function makeReverseMap(source) {
var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
return result;
}
var tokenStrings = makeReverseMap(textToToken);
@@ -3402,7 +4478,7 @@ var ts;
}
ts.tokenToString = tokenToString;
function stringToToken(s) {
- return textToToken[s];
+ return textToToken.get(s);
}
ts.stringToToken = stringToToken;
function computeLineStarts(text) {
@@ -3462,7 +4538,6 @@ var ts;
return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
}
ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
function isWhiteSpace(ch) {
return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
}
@@ -3598,7 +4673,7 @@ var ts;
if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
var ch = text.charCodeAt(pos);
if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
if (text.charCodeAt(pos + i) !== ch) {
return false;
}
@@ -3751,7 +4826,7 @@ var ts;
if (!comments) {
comments = [];
}
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
return comments;
}
function getLeadingCommentRanges(text, pos) {
@@ -3784,7 +4859,7 @@ var ts;
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
return false;
}
- for (var i = 1, n = name.length; i < n; i++) {
+ for (var i = 1; i < name.length; i++) {
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
return false;
}
@@ -3803,6 +4878,7 @@ var ts;
var precedingLineBreak;
var hasExtendedUnicodeEscape;
var tokenIsUnterminated;
+ var numericLiteralFlags;
setText(text, start, length);
return {
getStartPos: function () { return startPos; },
@@ -3816,6 +4892,7 @@ var ts;
isIdentifier: function () { return token === 70 || token > 106; },
isReservedWord: function () { return token >= 71 && token <= 106; },
isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
@@ -3852,6 +4929,7 @@ var ts;
var end = pos;
if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
pos++;
+ numericLiteralFlags = 2;
if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
pos++;
if (isDigit(text.charCodeAt(pos))) {
@@ -4121,8 +5199,11 @@ var ts;
var len = tokenValue.length;
if (len >= 2 && len <= 11) {
var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
+ if (ch >= 97 && ch <= 122) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
}
}
return token = 70;
@@ -4151,6 +5232,7 @@ var ts;
hasExtendedUnicodeEscape = false;
precedingLineBreak = false;
tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
while (true) {
tokenPos = pos;
if (pos >= end) {
@@ -4332,6 +5414,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 8;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
@@ -4342,6 +5425,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 16;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
@@ -4352,10 +5436,12 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 32;
return token = 8;
}
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4;
return token = 8;
}
case 49:
@@ -4602,7 +5688,14 @@ var ts;
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
- if ((char === 123) || (char === 60)) {
+ if (char === 123) {
+ break;
+ }
+ if (char === 60) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7;
+ }
break;
}
}
@@ -4777,39 +5870,11 @@ var ts;
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
ts.optionDeclarations = [
{
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
- {
name: "help",
shortName: "h",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
description: ts.Diagnostics.Print_this_message,
},
{
@@ -4818,56 +5883,73 @@ var ts;
type: "boolean"
},
{
- name: "init",
+ name: "all",
type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
},
{
- name: "inlineSourceMap",
+ name: "version",
+ shortName: "v",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
},
{
- name: "inlineSources",
+ name: "init",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
},
{
- name: "jsx",
- type: ts.createMap({
- "preserve": 1,
- "react": 2
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
+ name: "project",
+ shortName: "p",
type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
},
{
- name: "listFiles",
+ name: "pretty",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
- name: "locale",
- type: "string",
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
},
{
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0,
+ "es5": 1,
+ "es6": 2,
+ "es2015": 2,
+ "es2016": 3,
+ "es2017": 4,
+ "esnext": 5,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
},
{
name: "module",
shortName: "m",
- type: ts.createMap({
+ type: ts.createMapFromTemplate({
"none": ts.ModuleKind.None,
"commonjs": ts.ModuleKind.CommonJS,
"amd": ts.ModuleKind.AMD,
@@ -4876,238 +5958,232 @@ var ts;
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
}),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
},
{
- name: "newLine",
- type: ts.createMap({
- "crlf": 0,
- "lf": 1
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
},
{
- name: "noUnusedParameters",
+ name: "allowJs",
type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
},
{
- name: "noLib",
+ name: "checkJs",
type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
},
{
- name: "noResolve",
- type: "boolean",
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1,
+ "react-native": 3,
+ "react": 2
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
},
{
- name: "skipDefaultLibCheck",
+ name: "declaration",
+ shortName: "d",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
},
{
- name: "skipLibCheck",
+ name: "sourceMap",
type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
},
{
name: "outFile",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
},
{
name: "outDir",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
- name: "isolatedModules",
+ name: "removeComments",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
},
{
- name: "sourceMap",
+ name: "noEmit",
type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
},
{
- name: "suppressExcessPropertyErrors",
+ name: "importHelpers",
type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
},
{
- name: "suppressImplicitAnyIndexErrors",
+ name: "downlevelIteration",
type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
},
{
- name: "stripInternal",
+ name: "isolatedModules",
type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
},
{
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0,
- "es5": 1,
- "es6": 2,
- "es2015": 2,
- "es2016": 3,
- "es2017": 4,
- "esnext": 5,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
},
{
- name: "version",
- shortName: "v",
+ name: "noImplicitAny",
type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
},
{
- name: "watch",
- shortName: "w",
+ name: "strictNullChecks",
type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
},
{
- name: "experimentalDecorators",
+ name: "noImplicitThis",
type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
},
{
- name: "emitDecoratorMetadata",
+ name: "alwaysStrict",
type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
},
{
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
},
{
- name: "allowUnusedLabels",
+ name: "noUnusedParameters",
type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
},
{
name: "noImplicitReturns",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
},
{
name: "noFallthroughCasesInSwitch",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
},
{
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "baseUrl",
type: "string",
isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
},
{
name: "paths",
type: "object",
- isTSConfigOnly: true
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
},
{
name: "rootDirs",
@@ -5117,7 +6193,9 @@ var ts;
name: "rootDirs",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
},
{
name: "typeRoots",
@@ -5126,7 +6204,9 @@ var ts;
name: "typeRoots",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
},
{
name: "types",
@@ -5135,88 +6215,253 @@ var ts;
name: "types",
type: "string"
},
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
},
{
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
name: "traceResolution",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
},
{
- name: "allowJs",
+ name: "listFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
},
{
- name: "allowSyntheticDefaultImports",
+ name: "listEmittedFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0,
+ "lf": 1
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
},
{
name: "noImplicitUseStrict",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
},
{
- name: "listEmittedFiles",
- type: "boolean"
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
},
{
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
},
{
- name: "disableSizeLimit",
- type: "boolean"
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
},
{
- name: "strictNullChecks",
+ name: "skipLibCheck",
type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
},
{
- name: "importHelpers",
+ name: "allowUnusedLabels",
type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
},
{
- name: "alwaysStrict",
+ name: "allowUnreachableCode",
type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
}
];
ts.typeAcquisitionDeclarations = [
@@ -5248,8 +6493,7 @@ var ts;
ts.defaultInitCompilerOptions = {
module: ts.ModuleKind.CommonJS,
target: 1,
- noImplicitAny: false,
- sourceMap: false,
+ strict: true
};
var optionNameMapCache;
function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
@@ -5271,9 +6515,9 @@ var ts;
var optionNameMap = ts.createMap();
var shortOptionNames = ts.createMap();
ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
+ optionNameMap.set(option.name.toLowerCase(), option);
if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
+ shortOptionNames.set(option.shortName, option.name);
}
});
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
@@ -5281,19 +6525,12 @@ var ts;
}
ts.getOptionNameMap = getOptionNameMap;
function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
}
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
}
ts.parseCustomTypeOption = parseCustomTypeOption;
function parseListTypeOption(opt, value, errors) {
@@ -5337,11 +6574,12 @@ var ts;
}
else if (s.charCodeAt(0) === 45) {
s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
}
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
+ var opt = optionNameMap.get(s);
+ if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
}
@@ -5446,7 +6684,7 @@ var ts;
}
}
ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
- function generateTSConfig(options, fileNames) {
+ function generateTSConfig(options, fileNames, newLine) {
var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
var configurations = {
compilerOptions: serializeCompilerOptions(compilerOptions)
@@ -5454,7 +6692,7 @@ var ts;
if (fileNames && fileNames.length) {
configurations.files = fileNames;
}
- return configurations;
+ return writeConfigurations();
function getCustomTypeMapOfCommandLineOption(optionDefinition) {
if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
return undefined;
@@ -5467,53 +6705,121 @@ var ts;
}
}
function getNameOfCompilerOptionValue(value, customTypeMap) {
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
return key;
}
- }
- return undefined;
+ });
}
function serializeCompilerOptions(options) {
- var result = ts.createMap();
+ var result = {};
var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_5 in options) {
- if (ts.hasProperty(options, name_5)) {
- switch (name_5) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_5];
- var optionDefinition = optionsNameMap[name_5.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- result[name_5] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_5] = convertedValue;
- }
- else {
- result[name_5] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
}
+ result[name] = convertedValue;
}
- break;
+ else {
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
}
}
}
return result;
}
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
}
ts.generateTSConfig = generateTSConfig;
function removeComments(jsonText) {
@@ -5533,10 +6839,12 @@ var ts;
}
return output;
}
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
if (existingOptions === void 0) { existingOptions = {}; }
if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
if (resolutionStack.indexOf(resolvedPath) >= 0) {
@@ -5658,7 +6966,7 @@ var ts;
if (fileNames === undefined && includeSpecs === undefined) {
includeSpecs = ["**/*"];
}
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
}
@@ -5709,8 +7017,8 @@ var ts;
}
var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
+ var opt = optionNameMap.get(id);
+ if (opt) {
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
@@ -5744,8 +7052,9 @@ var ts;
}
function convertJsonOptionOfCustomType(opt, value, errors) {
var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
@@ -5762,7 +7071,7 @@ var ts;
var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
basePath = ts.normalizePath(basePath);
var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
var literalFileMap = ts.createMap();
@@ -5774,12 +7083,12 @@ var ts;
exclude = validateSpecs(exclude, errors, true);
}
var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
- var supportedExtensions = ts.getSupportedExtensions(options);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
if (fileNames) {
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
var fileName = fileNames_1[_i];
var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
+ literalFileMap.set(keyMapper(file), file);
}
}
if (include && include.length > 0) {
@@ -5790,14 +7099,13 @@ var ts;
}
removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
}
}
}
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
return {
fileNames: literalFiles.concat(wildcardFiles),
wildcardDirectories: wildcardDirectories
@@ -5805,8 +7113,8 @@ var ts;
}
function validateSpecs(specs, errors, allowTrailingRecursion) {
var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
}
@@ -5825,7 +7133,7 @@ var ts;
function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
+ var wildcardDirectories = {};
if (include !== undefined) {
var recursiveKeys = [];
for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
@@ -5846,14 +7154,15 @@ var ts;
}
}
}
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
}
}
- }
}
return wildcardDirectories;
}
@@ -5872,11 +7181,11 @@ var ts;
}
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
for (var i = 0; i < adjustedExtensionPriority; i++) {
var higherPriorityExtension = extensions[i];
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
return true;
}
}
@@ -5884,17 +7193,13 @@ var ts;
}
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
for (var i = nextExtensionPriority; i < extensions.length; i++) {
var lowerPriorityExtension = extensions[i];
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
+ wildcardFiles.delete(lowerPriorityPath);
}
}
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
function caseSensitiveKeyMapper(key) {
return key;
}
@@ -5904,384 +7209,6 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var JsTyping;
- (function (JsTyping) {
- ;
- ;
- var safeList;
- var EmptySafeList = ts.createMap();
- JsTyping.nodeCoreModuleList = [
- "buffer", "querystring", "events", "http", "cluster",
- "zlib", "os", "https", "punycode", "repl", "readline",
- "vm", "child_process", "url", "dns", "net",
- "dgram", "fs", "path", "string_decoder", "tls",
- "crypto", "stream", "util", "assert", "tty", "domain",
- "constants", "process", "v8", "timers", "console"
- ];
- var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
- function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
- var inferredTypings = ts.createMap();
- if (!typeAcquisition || !typeAcquisition.enable) {
- return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
- }
- fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
- var kind = ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f));
- return kind === 1 || kind === 2;
- });
- if (!safeList) {
- var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
- safeList = result.config ? ts.createMap(result.config) : EmptySafeList;
- }
- var filesToWatch = [];
- var searchDirs = [];
- var exclude = [];
- mergeTypings(typeAcquisition.include);
- exclude = typeAcquisition.exclude || [];
- var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
- if (projectRootPath) {
- possibleSearchDirs.push(projectRootPath);
- }
- searchDirs = ts.deduplicate(possibleSearchDirs);
- for (var _i = 0, searchDirs_1 = searchDirs; _i < searchDirs_1.length; _i++) {
- var searchDir = searchDirs_1[_i];
- var packageJsonPath = ts.combinePaths(searchDir, "package.json");
- getTypingNamesFromJson(packageJsonPath, filesToWatch);
- var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
- getTypingNamesFromJson(bowerJsonPath, filesToWatch);
- var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
- getTypingNamesFromNodeModuleFolder(nodeModulesPath);
- }
- getTypingNamesFromSourceFileNames(fileNames);
- if (unresolvedImports) {
- for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
- var moduleId = unresolvedImports_1[_a];
- var typingName = moduleId in nodeCoreModules ? "node" : moduleId;
- if (!(typingName in inferredTypings)) {
- inferredTypings[typingName] = undefined;
- }
- }
- }
- for (var name_6 in packageNameToTypingLocation) {
- if (name_6 in inferredTypings && !inferredTypings[name_6]) {
- inferredTypings[name_6] = packageNameToTypingLocation[name_6];
- }
- }
- for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
- var excludeTypingName = exclude_1[_b];
- delete inferredTypings[excludeTypingName];
- }
- var newTypingNames = [];
- var cachedTypingPaths = [];
- for (var typing in inferredTypings) {
- if (inferredTypings[typing] !== undefined) {
- cachedTypingPaths.push(inferredTypings[typing]);
- }
- else {
- newTypingNames.push(typing);
- }
- }
- return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
- function mergeTypings(typingNames) {
- if (!typingNames) {
- return;
- }
- for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
- var typing = typingNames_1[_i];
- if (!(typing in inferredTypings)) {
- inferredTypings[typing] = undefined;
- }
- }
- }
- function getTypingNamesFromJson(jsonPath, filesToWatch) {
- if (host.fileExists(jsonPath)) {
- filesToWatch.push(jsonPath);
- }
- var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
- if (result.config) {
- var jsonConfig = result.config;
- if (jsonConfig.dependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
- }
- if (jsonConfig.devDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
- }
- if (jsonConfig.optionalDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
- }
- if (jsonConfig.peerDependencies) {
- mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
- }
- }
- }
- function getTypingNamesFromSourceFileNames(fileNames) {
- var jsFileNames = ts.filter(fileNames, ts.hasJavaScriptFileExtension);
- var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
- var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
- if (safeList !== EmptySafeList) {
- mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; }));
- }
- var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
- if (hasJsxFile) {
- mergeTypings(["react"]);
- }
- }
- function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
- if (!host.directoryExists(nodeModulesPath)) {
- return;
- }
- var typingNames = [];
- var fileNames = host.readDirectory(nodeModulesPath, [".json"], undefined, undefined, 2);
- for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
- var fileName = fileNames_2[_i];
- var normalizedFileName = ts.normalizePath(fileName);
- if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
- continue;
- }
- var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
- if (!result.config) {
- continue;
- }
- var packageJson = result.config;
- if (packageJson._requiredBy &&
- ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
- continue;
- }
- if (!packageJson.name) {
- continue;
- }
- if (packageJson.typings) {
- var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
- inferredTypings[packageJson.name] = absolutePath;
- }
- else {
- typingNames.push(packageJson.name);
- }
- }
- mergeTypings(typingNames);
- }
- }
- JsTyping.discoverTypings = discoverTypings;
- })(JsTyping = ts.JsTyping || (ts.JsTyping = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- server.ActionSet = "action::set";
- server.ActionInvalidate = "action::invalidate";
- server.EventInstall = "event::install";
- var Arguments;
- (function (Arguments) {
- Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
- Arguments.LogFile = "--logFile";
- Arguments.EnableTelemetry = "--enableTelemetry";
- })(Arguments = server.Arguments || (server.Arguments = {}));
- function hasArgument(argumentName) {
- return ts.sys.args.indexOf(argumentName) >= 0;
- }
- server.hasArgument = hasArgument;
- function findArgument(argumentName) {
- var index = ts.sys.args.indexOf(argumentName);
- return index >= 0 && index < ts.sys.args.length - 1
- ? ts.sys.args[index + 1]
- : undefined;
- }
- server.findArgument = findArgument;
- })(server = ts.server || (ts.server = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- var LogLevel;
- (function (LogLevel) {
- LogLevel[LogLevel["terse"] = 0] = "terse";
- LogLevel[LogLevel["normal"] = 1] = "normal";
- LogLevel[LogLevel["requestTime"] = 2] = "requestTime";
- LogLevel[LogLevel["verbose"] = 3] = "verbose";
- })(LogLevel = server.LogLevel || (server.LogLevel = {}));
- server.emptyArray = [];
- var Msg;
- (function (Msg) {
- Msg.Err = "Err";
- Msg.Info = "Info";
- Msg.Perf = "Perf";
- })(Msg = server.Msg || (server.Msg = {}));
- function getProjectRootPath(project) {
- switch (project.projectKind) {
- case server.ProjectKind.Configured:
- return ts.getDirectoryPath(project.getProjectName());
- case server.ProjectKind.Inferred:
- return "";
- case server.ProjectKind.External:
- var projectName = ts.normalizeSlashes(project.getProjectName());
- return project.projectService.host.fileExists(projectName) ? ts.getDirectoryPath(projectName) : projectName;
- }
- }
- function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) {
- return {
- projectName: project.getProjectName(),
- fileNames: project.getFileNames(true),
- compilerOptions: project.getCompilerOptions(),
- typeAcquisition: typeAcquisition,
- unresolvedImports: unresolvedImports,
- projectRootPath: getProjectRootPath(project),
- cachePath: cachePath,
- kind: "discover"
- };
- }
- server.createInstallTypingsRequest = createInstallTypingsRequest;
- var Errors;
- (function (Errors) {
- function ThrowNoProject() {
- throw new Error("No Project.");
- }
- Errors.ThrowNoProject = ThrowNoProject;
- function ThrowProjectLanguageServiceDisabled() {
- throw new Error("The project's language service is disabled.");
- }
- Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
- function ThrowProjectDoesNotContainDocument(fileName, project) {
- throw new Error("Project '" + project.getProjectName() + "' does not contain document '" + fileName + "'");
- }
- Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
- })(Errors = server.Errors || (server.Errors = {}));
- function getDefaultFormatCodeSettings(host) {
- return {
- indentSize: 4,
- tabSize: 4,
- newLineCharacter: host.newLine || "\n",
- convertTabsToSpaces: true,
- indentStyle: ts.IndentStyle.Smart,
- insertSpaceAfterCommaDelimiter: true,
- insertSpaceAfterSemicolonInForStatements: true,
- insertSpaceBeforeAndAfterBinaryOperators: true,
- insertSpaceAfterKeywordsInControlFlowStatements: true,
- insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
- placeOpenBraceOnNewLineForFunctions: false,
- placeOpenBraceOnNewLineForControlBlocks: false,
- };
- }
- server.getDefaultFormatCodeSettings = getDefaultFormatCodeSettings;
- function mergeMaps(target, source) {
- for (var key in source) {
- if (ts.hasProperty(source, key)) {
- target[key] = source[key];
- }
- }
- }
- server.mergeMaps = mergeMaps;
- function removeItemFromSet(items, itemToRemove) {
- if (items.length === 0) {
- return;
- }
- var index = items.indexOf(itemToRemove);
- if (index < 0) {
- return;
- }
- if (index === items.length - 1) {
- items.pop();
- }
- else {
- items[index] = items.pop();
- }
- }
- server.removeItemFromSet = removeItemFromSet;
- function toNormalizedPath(fileName) {
- return ts.normalizePath(fileName);
- }
- server.toNormalizedPath = toNormalizedPath;
- function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {
- var f = ts.isRootedDiskPath(normalizedPath) ? normalizedPath : ts.getNormalizedAbsolutePath(normalizedPath, currentDirectory);
- return getCanonicalFileName(f);
- }
- server.normalizedPathToPath = normalizedPathToPath;
- function asNormalizedPath(fileName) {
- return fileName;
- }
- server.asNormalizedPath = asNormalizedPath;
- function createNormalizedPathMap() {
- var map = Object.create(null);
- return {
- get: function (path) {
- return map[path];
- },
- set: function (path, value) {
- map[path] = value;
- },
- contains: function (path) {
- return ts.hasProperty(map, path);
- },
- remove: function (path) {
- delete map[path];
- }
- };
- }
- server.createNormalizedPathMap = createNormalizedPathMap;
- function isInferredProjectName(name) {
- return /dev\/null\/inferredProject\d+\*/.test(name);
- }
- server.isInferredProjectName = isInferredProjectName;
- function makeInferredProjectName(counter) {
- return "/dev/null/inferredProject" + counter + "*";
- }
- server.makeInferredProjectName = makeInferredProjectName;
- function toSortedReadonlyArray(arr) {
- arr.sort();
- return arr;
- }
- server.toSortedReadonlyArray = toSortedReadonlyArray;
- var ThrottledOperations = (function () {
- function ThrottledOperations(host) {
- this.host = host;
- this.pendingTimeouts = ts.createMap();
- }
- ThrottledOperations.prototype.schedule = function (operationId, delay, cb) {
- if (ts.hasProperty(this.pendingTimeouts, operationId)) {
- this.host.clearTimeout(this.pendingTimeouts[operationId]);
- }
- this.pendingTimeouts[operationId] = this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb);
- };
- ThrottledOperations.run = function (self, operationId, cb) {
- delete self.pendingTimeouts[operationId];
- cb();
- };
- return ThrottledOperations;
- }());
- server.ThrottledOperations = ThrottledOperations;
- var GcTimer = (function () {
- function GcTimer(host, delay, logger) {
- this.host = host;
- this.delay = delay;
- this.logger = logger;
- }
- GcTimer.prototype.scheduleCollect = function () {
- if (!this.host.gc || this.timerId != undefined) {
- return;
- }
- this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
- };
- GcTimer.run = function (self) {
- self.timerId = undefined;
- var log = self.logger.hasLevel(LogLevel.requestTime);
- var before = log && self.host.getMemoryUsage();
- self.host.gc();
- if (log) {
- var after = self.host.getMemoryUsage();
- self.logger.perftrc("GC::before " + before + ", after " + after);
- }
- };
- return GcTimer;
- }());
- server.GcTimer = GcTimer;
- })(server = ts.server || (ts.server = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
function trace(host) {
host.trace(ts.formatMessage.apply(undefined, arguments));
}
@@ -6290,6 +7217,12 @@ var ts;
return compilerOptions.traceResolution && host.trace !== undefined;
}
ts.isTraceEnabled = isTraceEnabled;
+ var Extensions;
+ (function (Extensions) {
+ Extensions[Extensions["TypeScript"] = 0] = "TypeScript";
+ Extensions[Extensions["JavaScript"] = 1] = "JavaScript";
+ Extensions[Extensions["DtsOnly"] = 2] = "DtsOnly";
+ })(Extensions || (Extensions = {}));
function resolvedTypeScriptOnly(resolved) {
if (!resolved) {
return undefined;
@@ -6297,9 +7230,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
@@ -6311,37 +7241,28 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2:
- case 0:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
+ }
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
}
+ return path;
}
}
function readJson(path, host) {
@@ -6374,11 +7295,12 @@ var ts;
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -6433,7 +7355,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -6449,7 +7375,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -6490,31 +7417,116 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -6639,37 +7651,43 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0) || tryResolve(1);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state, true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -6680,12 +7698,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
+ }
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
+ }
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
function directoryProbablyExists(directoryName, host) {
return !host.directoryExists || host.directoryExists(directoryName);
@@ -6713,11 +7754,11 @@ var ts;
}
}
switch (extensions) {
- case 2:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -6726,113 +7767,181 @@ var ts;
}
}
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, false);
+ }
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(2, moduleName, directory, failedLookupLocations, state, true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, true, undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1) {
- return loadModuleFromNodeModulesFolder(2, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1);
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
+ }
+ }
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0) || tryResolve(1);
- return createResolvedModuleWithFailedLookupLocations(resolved, false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0) {
+ if (extensions === Extensions.TypeScript) {
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state));
}
}
}
@@ -6844,10 +7953,13 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
function forEachAncestorDirectory(directory, callback) {
while (true) {
var result = callback(directory);
@@ -6878,6 +7990,19 @@ var ts;
return undefined;
}
ts.getDeclarationOfKind = getDeclarationOfKind;
+ function findDeclaration(symbol, predicate) {
+ var declarations = symbol.declarations;
+ if (declarations) {
+ for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
+ var declaration = declarations_2[_i];
+ if (predicate(declaration)) {
+ return declaration;
+ }
+ }
+ }
+ return undefined;
+ }
+ ts.findDeclaration = findDeclaration;
var stringWriters = [];
function getSingleLineStringWriter() {
if (stringWriters.length === 0) {
@@ -6891,13 +8016,15 @@ var ts;
writeSpace: writeText,
writeStringLiteral: writeText,
writeParameter: writeText,
+ writeProperty: writeText,
writeSymbol: writeText,
writeLine: function () { return str_1 += " "; },
increaseIndent: ts.noop,
decreaseIndent: ts.noop,
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
}
return stringWriters.pop();
@@ -6913,25 +8040,25 @@ var ts;
}
ts.getFullWidth = getFullWidth;
function hasResolvedModule(sourceFile, moduleNameText) {
- return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]);
+ return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText));
}
ts.hasResolvedModule = hasResolvedModule;
function getResolvedModule(sourceFile, moduleNameText) {
- return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined;
+ return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules.get(moduleNameText) : undefined;
}
ts.getResolvedModule = getResolvedModule;
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
if (!sourceFile.resolvedModules) {
sourceFile.resolvedModules = ts.createMap();
}
- sourceFile.resolvedModules[moduleNameText] = resolvedModule;
+ sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
}
ts.setResolvedModule = setResolvedModule;
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap();
}
- sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective;
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
}
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
function moduleResolutionIsEqualTo(oldResolution, newResolution) {
@@ -6950,7 +8077,7 @@ var ts;
}
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
- var oldResolution = oldResolutions && oldResolutions[names[i]];
+ var oldResolution = oldResolutions && oldResolutions.get(names[i]);
var changed = oldResolution
? !newResolution || !comparer(oldResolution, newResolution)
: newResolution;
@@ -6963,21 +8090,21 @@ var ts;
ts.hasChangesInResolutions = hasChangesInResolutions;
function containsParseError(node) {
aggregateChildData(node);
- return (node.flags & 4194304) !== 0;
+ return (node.flags & 131072) !== 0;
}
ts.containsParseError = containsParseError;
function aggregateChildData(node) {
- if (!(node.flags & 8388608)) {
- var thisNodeOrAnySubNodesHasError = ((node.flags & 1048576) !== 0) ||
+ if (!(node.flags & 262144)) {
+ var thisNodeOrAnySubNodesHasError = ((node.flags & 32768) !== 0) ||
ts.forEachChild(node, containsParseError);
if (thisNodeOrAnySubNodesHasError) {
- node.flags |= 4194304;
+ node.flags |= 131072;
}
- node.flags |= 8388608;
+ node.flags |= 262144;
}
}
function getSourceFileOfNode(node) {
- while (node && node.kind !== 261) {
+ while (node && node.kind !== 264) {
node = node.parent;
}
return node;
@@ -6985,11 +8112,11 @@ var ts;
ts.getSourceFileOfNode = getSourceFileOfNode;
function isStatementWithLocals(node) {
switch (node.kind) {
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
return true;
}
return false;
@@ -7044,6 +8171,10 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 141;
+ }
+ ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
@@ -7054,18 +8185,18 @@ var ts;
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 292 && node._children.length > 0) {
+ if (node.kind === 293 && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
}
ts.getTokenPosOfNode = getTokenPosOfNode;
function isJSDocNode(node) {
- return node.kind >= 262 && node.kind <= 288;
+ return node.kind >= 266 && node.kind <= 292;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocTag(node) {
- return node.kind >= 278 && node.kind <= 291;
+ return node.kind >= 282 && node.kind <= 292;
}
ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -7096,16 +8227,9 @@ var ts;
return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);
}
ts.getTextOfNode = getTextOfNode;
- function getLiteralText(node, sourceFile, languageVersion) {
- if (languageVersion < 2 && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
- return getQuotedEscapedLiteralText('"', node.text, '"');
- }
+ function getLiteralText(node, sourceFile) {
if (!nodeIsSynthesized(node) && node.parent) {
- var text = getSourceTextOfNodeFromSourceFile(sourceFile, node);
- if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) {
- return node.text;
- }
- return text;
+ return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
switch (node.kind) {
case 9:
@@ -7124,19 +8248,6 @@ var ts;
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function isBinaryOrOctalIntegerLiteral(node, text) {
- if (node.kind === 8 && text.length > 1) {
- switch (text.charCodeAt(1)) {
- case 98:
- case 66:
- case 111:
- case 79:
- return true;
- }
- }
- return false;
- }
- ts.isBinaryOrOctalIntegerLiteral = isBinaryOrOctalIntegerLiteral;
function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
}
@@ -7144,10 +8255,6 @@ var ts;
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
ts.escapeIdentifier = escapeIdentifier;
- function unescapeIdentifier(identifier) {
- return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
- }
- ts.unescapeIdentifier = unescapeIdentifier;
function makeIdentifierFromModuleName(moduleName) {
return ts.getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_");
}
@@ -7159,11 +8266,11 @@ var ts;
ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
var node = getRootDeclaration(declaration);
- return node.kind === 223 && node.parent.kind === 256;
+ return node.kind === 225 && node.parent.kind === 259;
}
ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
function isAmbientModule(node) {
- return node && node.kind === 230 &&
+ return node && node.kind === 232 &&
(node.name.kind === 9 || isGlobalScopeAugmentation(node));
}
ts.isAmbientModule = isAmbientModule;
@@ -7172,11 +8279,11 @@ var ts;
}
ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
function isShorthandAmbientModule(node) {
- return node.kind === 230 && (!node.body);
+ return node && node.kind === 232 && (!node.body);
}
function isBlockScopedContainerTopLevel(node) {
- return node.kind === 261 ||
- node.kind === 230 ||
+ return node.kind === 264 ||
+ node.kind === 232 ||
isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
@@ -7189,32 +8296,36 @@ var ts;
return false;
}
switch (node.parent.kind) {
- case 261:
+ case 264:
return ts.isExternalModule(node.parent);
- case 231:
+ case 233:
return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
}
return false;
}
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
+ function isEffectiveExternalModule(node, compilerOptions) {
+ return ts.isExternalModule(node) || compilerOptions.isolatedModules;
+ }
+ ts.isEffectiveExternalModule = isEffectiveExternalModule;
function isBlockScope(node, parentNode) {
switch (node.kind) {
- case 261:
+ case 264:
+ case 234:
+ case 259:
case 232:
- case 256:
- case 230:
- case 211:
- case 212:
case 213:
- case 150:
- case 149:
+ case 214:
+ case 215:
case 151:
+ case 150:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
+ case 186:
return true;
- case 204:
+ case 206:
return parentNode && !isFunctionLike(parentNode);
}
return false;
@@ -7234,6 +8345,10 @@ var ts;
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
}
ts.declarationNameToString = declarationNameToString;
+ function getNameFromIndexInfo(info) {
+ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
+ }
+ ts.getNameFromIndexInfo = getNameFromIndexInfo;
function getTextOfPropertyName(name) {
switch (name.kind) {
case 70:
@@ -7241,7 +8356,7 @@ var ts;
case 9:
case 8:
return name.text;
- case 142:
+ case 143:
if (isStringOrNumericLiteral(name.expression)) {
return name.expression.text;
}
@@ -7252,10 +8367,10 @@ var ts;
function entityNameToString(name) {
switch (name.kind) {
case 70:
- return getFullWidth(name) === 0 ? unescapeIdentifier(name.text) : getTextOfNode(name);
- case 141:
+ return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name);
+ case 142:
return entityNameToString(name.left) + "." + entityNameToString(name.right);
- case 177:
+ case 178:
return entityNameToString(name.expression) + "." + entityNameToString(name.name);
}
}
@@ -7292,7 +8407,7 @@ var ts;
ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
function getErrorSpanForArrowFunction(sourceFile, node) {
var pos = ts.skipTrivia(sourceFile.text, node.pos);
- if (node.body && node.body.kind === 204) {
+ if (node.body && node.body.kind === 206) {
var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
if (startLine < endLine) {
@@ -7304,29 +8419,29 @@ var ts;
function getErrorSpanForNode(sourceFile, node) {
var errorNode = node;
switch (node.kind) {
- case 261:
+ case 264:
var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
if (pos_1 === sourceFile.text.length) {
return ts.createTextSpan(0, 0);
}
return getSpanOfTokenAtPosition(sourceFile, pos_1);
- case 223:
- case 174:
- case 226:
- case 197:
- case 227:
- case 230:
- case 229:
- case 260:
case 225:
- case 184:
- case 149:
- case 151:
- case 152:
+ case 175:
case 228:
+ case 198:
+ case 229:
+ case 232:
+ case 231:
+ case 263:
+ case 227:
+ case 185:
+ case 150:
+ case 152:
+ case 153:
+ case 230:
errorNode = node.name;
break;
- case 185:
+ case 186:
return getErrorSpanForArrowFunction(sourceFile, node);
}
if (errorNode === undefined) {
@@ -7347,7 +8462,7 @@ var ts;
}
ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
- return node.kind === 229 && isConst(node);
+ return node.kind === 231 && isConst(node);
}
ts.isConstEnumDeclaration = isConstEnumDeclaration;
function isConst(node) {
@@ -7360,11 +8475,11 @@ var ts;
}
ts.isLet = isLet;
function isSuperCall(n) {
- return n.kind === 179 && n.expression.kind === 96;
+ return n.kind === 180 && n.expression.kind === 96;
}
ts.isSuperCall = isSuperCall;
function isPrologueDirective(node) {
- return node.kind === 207
+ return node.kind === 209
&& node.expression.kind === 9;
}
ts.isPrologueDirective = isPrologueDirective;
@@ -7377,10 +8492,10 @@ var ts;
}
ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText;
function getJSDocCommentRanges(node, text) {
- var commentRanges = (node.kind === 144 ||
- node.kind === 143 ||
- node.kind === 184 ||
- node.kind === 185) ?
+ var commentRanges = (node.kind === 145 ||
+ node.kind === 144 ||
+ node.kind === 185 ||
+ node.kind === 186) ?
ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRangesOfNodeFromText(node, text);
return ts.filter(commentRanges, function (comment) {
@@ -7394,96 +8509,110 @@ var ts;
ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
function isPartOfTypeNode(node) {
- if (156 <= node.kind && node.kind <= 171) {
+ if (157 <= node.kind && node.kind <= 172) {
return true;
}
switch (node.kind) {
case 118:
case 132:
- case 134:
- case 121:
case 135:
- case 137:
+ case 121:
+ case 136:
+ case 138:
case 129:
return true;
case 104:
- return node.parent.kind !== 188;
- case 199:
+ return node.parent.kind !== 189;
+ case 200:
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
case 70:
- if (node.parent.kind === 141 && node.parent.right === node) {
+ if (node.parent.kind === 142 && node.parent.right === node) {
node = node.parent;
}
- else if (node.parent.kind === 177 && node.parent.name === node) {
+ else if (node.parent.kind === 178 && node.parent.name === node) {
node = node.parent;
}
- ts.Debug.assert(node.kind === 70 || node.kind === 141 || node.kind === 177, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
- case 141:
- case 177:
+ ts.Debug.assert(node.kind === 70 || node.kind === 142 || node.kind === 178, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+ case 142:
+ case 178:
case 98:
- var parent_1 = node.parent;
- if (parent_1.kind === 160) {
+ var parent = node.parent;
+ if (parent.kind === 161) {
return false;
}
- if (156 <= parent_1.kind && parent_1.kind <= 171) {
+ if (157 <= parent.kind && parent.kind <= 172) {
return true;
}
- switch (parent_1.kind) {
- case 199:
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1);
- case 143:
- return node === parent_1.constraint;
- case 147:
- case 146:
+ switch (parent.kind) {
+ case 200:
+ return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
case 144:
- case 223:
- return node === parent_1.type;
+ return node === parent.constraint;
+ case 148:
+ case 147:
+ case 145:
case 225:
- case 184:
+ return node === parent.type;
+ case 227:
case 185:
+ case 186:
+ case 151:
case 150:
case 149:
- case 148:
- case 151:
case 152:
- return node === parent_1.type;
case 153:
+ return node === parent.type;
case 154:
case 155:
- return node === parent_1.type;
- case 182:
- return node === parent_1.type;
- case 179:
+ case 156:
+ return node === parent.type;
+ case 183:
+ return node === parent.type;
case 180:
- return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0;
case 181:
+ return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0;
+ case 182:
return false;
}
}
return false;
}
ts.isPartOfTypeNode = isPartOfTypeNode;
+ function isChildOfNodeWithKind(node, kind) {
+ while (node) {
+ if (node.kind === kind) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+ ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 216:
+ case 218:
return visitor(node);
- case 232:
- case 204:
- case 208:
- case 209:
+ case 234:
+ case 206:
case 210:
case 211:
case 212:
case 213:
- case 217:
- case 218:
- case 253:
- case 254:
+ case 214:
+ case 215:
case 219:
- case 221:
+ case 220:
case 256:
+ case 257:
+ case 221:
+ case 223:
+ case 259:
return ts.forEachChild(node, traverse);
}
}
@@ -7493,24 +8622,25 @@ var ts;
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 195:
+ case 196:
visitor(node);
var operand = node.expression;
if (operand) {
traverse(operand);
}
+ return;
+ case 231:
case 229:
- case 227:
+ case 232:
case 230:
case 228:
- case 226:
- case 197:
+ case 198:
return;
default:
if (isFunctionLike(node)) {
- var name_7 = node.name;
- if (name_7 && name_7.kind === 142) {
- traverse(name_7.expression);
+ var name = node.name;
+ if (name && name.kind === 143) {
+ traverse(name.expression);
return;
}
}
@@ -7521,17 +8651,29 @@ var ts;
}
}
ts.forEachYieldExpression = forEachYieldExpression;
+ function getRestParameterElementType(node) {
+ if (node && node.kind === 163) {
+ return node.elementType;
+ }
+ else if (node && node.kind === 158) {
+ return ts.singleOrUndefined(node.typeArguments);
+ }
+ else {
+ return undefined;
+ }
+ }
+ ts.getRestParameterElementType = getRestParameterElementType;
function isVariableLike(node) {
if (node) {
switch (node.kind) {
- case 174:
+ case 175:
+ case 263:
+ case 145:
case 260:
- case 144:
- case 257:
+ case 148:
case 147:
- case 146:
- case 258:
- case 223:
+ case 261:
+ case 225:
return true;
}
}
@@ -7539,11 +8681,11 @@ var ts;
}
ts.isVariableLike = isVariableLike;
function isAccessor(node) {
- return node && (node.kind === 151 || node.kind === 152);
+ return node && (node.kind === 152 || node.kind === 153);
}
ts.isAccessor = isAccessor;
function isClassLike(node) {
- return node && (node.kind === 226 || node.kind === 197);
+ return node && (node.kind === 228 || node.kind === 198);
}
ts.isClassLike = isClassLike;
function isFunctionLike(node) {
@@ -7552,19 +8694,19 @@ var ts;
ts.isFunctionLike = isFunctionLike;
function isFunctionLikeKind(kind) {
switch (kind) {
- case 150:
- case 184:
- case 225:
+ case 151:
case 185:
+ case 227:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return true;
}
return false;
@@ -7572,13 +8714,13 @@ var ts;
ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
+ case 185:
return true;
}
return false;
@@ -7586,30 +8728,42 @@ var ts;
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
function isIterationStatement(node, lookInLabeledStatements) {
switch (node.kind) {
+ case 213:
+ case 214:
+ case 215:
case 211:
case 212:
- case 213:
- case 209:
- case 210:
return true;
- case 219:
+ case 221:
return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
}
return false;
}
ts.isIterationStatement = isIterationStatement;
+ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
+ while (true) {
+ if (beforeUnwrapLabelCallback) {
+ beforeUnwrapLabelCallback(node);
+ }
+ if (node.statement.kind !== 221) {
+ return node.statement;
+ }
+ node = node.statement;
+ }
+ }
+ ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 204 && isFunctionLike(node.parent);
+ return node && node.kind === 206 && isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
- return node && node.kind === 149 && node.parent.kind === 176;
+ return node && node.kind === 150 && node.parent.kind === 177;
}
ts.isObjectLiteralMethod = isObjectLiteralMethod;
function isObjectLiteralOrClassExpressionMethod(node) {
- return node.kind === 149 &&
- (node.parent.kind === 176 ||
- node.parent.kind === 197);
+ return node.kind === 150 &&
+ (node.parent.kind === 177 ||
+ node.parent.kind === 198);
}
ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
function isIdentifierTypePredicate(predicate) {
@@ -7645,44 +8799,57 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 142:
+ case 143:
if (isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
node = node.parent;
}
break;
- case 185:
+ case 186:
if (!includeArrowFunctions) {
continue;
}
- case 225:
- case 184:
- case 230:
- case 147:
- case 146:
- case 149:
+ case 227:
+ case 185:
+ case 232:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
case 153:
case 154:
case 155:
- case 229:
- case 261:
+ case 156:
+ case 231:
+ case 264:
return node;
}
}
}
ts.getThisContainer = getThisContainer;
+ function getNewTargetContainer(node) {
+ var container = getThisContainer(node, false);
+ if (container) {
+ switch (container.kind) {
+ case 151:
+ case 227:
+ case 185:
+ return container;
+ }
+ }
+ return undefined;
+ }
+ ts.getNewTargetContainer = getNewTargetContainer;
function getSuperContainer(node, stopOnFunctions) {
while (true) {
node = node.parent;
@@ -7690,25 +8857,25 @@ var ts;
return node;
}
switch (node.kind) {
- case 142:
+ case 143:
node = node.parent;
break;
- case 225:
- case 184:
+ case 227:
case 185:
+ case 186:
if (!stopOnFunctions) {
continue;
}
- case 147:
- case 146:
- case 149:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
+ case 153:
return node;
- case 145:
- if (node.parent.kind === 144 && isClassElement(node.parent.parent)) {
+ case 146:
+ if (node.parent.kind === 145 && isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
else if (isClassElement(node.parent)) {
@@ -7720,36 +8887,36 @@ var ts;
}
ts.getSuperContainer = getSuperContainer;
function getImmediatelyInvokedFunctionExpression(func) {
- if (func.kind === 184 || func.kind === 185) {
+ if (func.kind === 185 || func.kind === 186) {
var prev = func;
- var parent_2 = func.parent;
- while (parent_2.kind === 183) {
- prev = parent_2;
- parent_2 = parent_2.parent;
+ var parent = func.parent;
+ while (parent.kind === 184) {
+ prev = parent;
+ parent = parent.parent;
}
- if (parent_2.kind === 179 && parent_2.expression === prev) {
- return parent_2;
+ if (parent.kind === 180 && parent.expression === prev) {
+ return parent;
}
}
}
ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression;
function isSuperProperty(node) {
var kind = node.kind;
- return (kind === 177 || kind === 178)
+ return (kind === 178 || kind === 179)
&& node.expression.kind === 96;
}
ts.isSuperProperty = isSuperProperty;
function getEntityNameFromTypeNode(node) {
switch (node.kind) {
- case 157:
- case 272:
+ case 158:
+ case 276:
return node.typeName;
- case 199:
+ case 200:
return isEntityNameExpression(node.expression)
? node.expression
: undefined;
case 70:
- case 141:
+ case 142:
return node;
}
return undefined;
@@ -7757,10 +8924,12 @@ var ts;
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
function isCallLikeExpression(node) {
switch (node.kind) {
- case 179:
+ case 250:
+ case 249:
case 180:
case 181:
- case 145:
+ case 182:
+ case 146:
return true;
default:
return false;
@@ -7768,29 +8937,32 @@ var ts;
}
ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
return node.tag;
}
+ else if (isJsxOpeningLikeElement(node)) {
+ return node.tagName;
+ }
return node.expression;
}
ts.getInvokedExpression = getInvokedExpression;
function nodeCanBeDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return true;
- case 147:
- return node.parent.kind === 226;
- case 151:
+ case 148:
+ return node.parent.kind === 228;
case 152:
- case 149:
+ case 153:
+ case 150:
return node.body !== undefined
- && node.parent.kind === 226;
- case 144:
+ && node.parent.kind === 228;
+ case 145:
return node.parent.body !== undefined
- && (node.parent.kind === 150
- || node.parent.kind === 149
- || node.parent.kind === 152)
- && node.parent.parent.kind === 226;
+ && (node.parent.kind === 151
+ || node.parent.kind === 150
+ || node.parent.kind === 153)
+ && node.parent.parent.kind === 228;
}
return false;
}
@@ -7806,19 +8978,19 @@ var ts;
ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
function childIsDecorated(node) {
switch (node.kind) {
- case 226:
+ case 228:
return ts.forEach(node.members, nodeOrChildIsDecorated);
- case 149:
- case 152:
+ case 150:
+ case 153:
return ts.forEach(node.parameters, nodeIsDecorated);
}
}
ts.childIsDecorated = childIsDecorated;
function isJSXTagName(node) {
var parent = node.parent;
- if (parent.kind === 248 ||
- parent.kind === 247 ||
- parent.kind === 249) {
+ if (parent.kind === 250 ||
+ parent.kind === 249 ||
+ parent.kind === 251) {
return parent.tagName === node;
}
return false;
@@ -7832,95 +9004,96 @@ var ts;
case 100:
case 85:
case 11:
- case 175:
case 176:
case 177:
case 178:
case 179:
case 180:
case 181:
- case 200:
case 182:
case 201:
case 183:
+ case 202:
case 184:
- case 197:
case 185:
- case 188:
+ case 198:
case 186:
+ case 189:
case 187:
- case 190:
+ case 188:
case 191:
case 192:
case 193:
- case 196:
case 194:
- case 12:
- case 198:
- case 246:
- case 247:
+ case 197:
case 195:
- case 189:
+ case 12:
+ case 199:
+ case 248:
+ case 249:
+ case 196:
+ case 190:
+ case 203:
return true;
- case 141:
- while (node.parent.kind === 141) {
+ case 142:
+ while (node.parent.kind === 142) {
node = node.parent;
}
- return node.parent.kind === 160 || isJSXTagName(node);
+ return node.parent.kind === 161 || isJSXTagName(node);
case 70:
- if (node.parent.kind === 160 || isJSXTagName(node)) {
+ if (node.parent.kind === 161 || isJSXTagName(node)) {
return true;
}
case 8:
case 9:
case 98:
- var parent_3 = node.parent;
- switch (parent_3.kind) {
- case 223:
- case 144:
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
+ case 263:
case 260:
- case 257:
- case 174:
- return parent_3.initializer === node;
- case 207:
- case 208:
+ case 175:
+ return parent.initializer === node;
case 209:
case 210:
- case 216:
- case 217:
+ case 211:
+ case 212:
case 218:
- case 253:
+ case 219:
case 220:
- case 218:
- return parent_3.expression === node;
- case 211:
- var forStatement = parent_3;
- return (forStatement.initializer === node && forStatement.initializer.kind !== 224) ||
+ case 256:
+ case 222:
+ case 220:
+ return parent.expression === node;
+ case 213:
+ var forStatement = parent;
+ return (forStatement.initializer === node && forStatement.initializer.kind !== 226) ||
forStatement.condition === node ||
forStatement.incrementor === node;
- case 212:
- case 213:
- var forInStatement = parent_3;
- return (forInStatement.initializer === node && forInStatement.initializer.kind !== 224) ||
+ case 214:
+ case 215:
+ var forInStatement = parent;
+ return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226) ||
forInStatement.expression === node;
- case 182:
- case 200:
- return node === parent_3.expression;
- case 202:
- return node === parent_3.expression;
- case 142:
- return node === parent_3.expression;
- case 145:
- case 252:
- case 251:
- case 259:
+ case 183:
+ case 201:
+ return node === parent.expression;
+ case 204:
+ return node === parent.expression;
+ case 143:
+ return node === parent.expression;
+ case 146:
+ case 255:
+ case 254:
+ case 262:
return true;
- case 199:
- return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3);
+ case 200:
+ return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
default:
- if (isPartOfExpression(parent_3)) {
+ if (isPartOfExpression(parent)) {
return true;
}
}
@@ -7935,7 +9108,7 @@ var ts;
}
ts.isInstantiatedModule = isInstantiatedModule;
function isExternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind === 245;
+ return node.kind === 236 && node.moduleReference.kind === 247;
}
ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -7944,7 +9117,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function isInternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 && node.moduleReference.kind !== 245;
+ return node.kind === 236 && node.moduleReference.kind !== 247;
}
ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
function isSourceFileJavaScript(file) {
@@ -7952,38 +9125,57 @@ var ts;
}
ts.isSourceFileJavaScript = isSourceFileJavaScript;
function isInJavaScriptFile(node) {
- return node && !!(node.flags & 2097152);
+ return node && !!(node.flags & 65536);
}
ts.isInJavaScriptFile = isInJavaScriptFile;
- function isRequireCall(expression, checkArgumentIsStringLiteral) {
- var isRequire = expression.kind === 179 &&
- expression.expression.kind === 70 &&
- expression.expression.text === "require" &&
- expression.arguments.length === 1;
- return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9);
+ function isRequireCall(callExpression, checkArgumentIsStringLiteral) {
+ if (callExpression.kind !== 180) {
+ return false;
+ }
+ var _a = callExpression, expression = _a.expression, args = _a.arguments;
+ if (expression.kind !== 70 || expression.text !== "require") {
+ return false;
+ }
+ if (args.length !== 1) {
+ return false;
+ }
+ var arg = args[0];
+ return !checkArgumentIsStringLiteral || arg.kind === 9 || arg.kind === 12;
}
ts.isRequireCall = isRequireCall;
function isSingleOrDoubleQuote(charCode) {
return charCode === 39 || charCode === 34;
}
ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote;
- function isDeclarationOfFunctionExpression(s) {
- if (s.valueDeclaration && s.valueDeclaration.kind === 223) {
+ function isDeclarationOfFunctionOrClassExpression(s) {
+ if (s.valueDeclaration && s.valueDeclaration.kind === 225) {
var declaration = s.valueDeclaration;
- return declaration.initializer && declaration.initializer.kind === 184;
+ return declaration.initializer && (declaration.initializer.kind === 185 || declaration.initializer.kind === 198);
}
return false;
}
- ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression;
+ ts.isDeclarationOfFunctionOrClassExpression = isDeclarationOfFunctionOrClassExpression;
+ function getRightMostAssignedExpression(node) {
+ while (isAssignmentExpression(node, true)) {
+ node = node.right;
+ }
+ return node;
+ }
+ ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
+ function isExportsIdentifier(node) {
+ return isIdentifier(node) && node.text === "exports";
+ }
+ ts.isExportsIdentifier = isExportsIdentifier;
+ function isModuleExportsPropertyAccessExpression(node) {
+ return isPropertyAccessExpression(node) && isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
+ }
+ ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
if (!isInJavaScriptFile(expression)) {
return 0;
}
- if (expression.kind !== 192) {
- return 0;
- }
var expr = expression;
- if (expr.operatorToken.kind !== 57 || expr.left.kind !== 177) {
+ if (expr.operatorToken.kind !== 57 || expr.left.kind !== 178) {
return 0;
}
var lhs = expr.left;
@@ -7995,11 +9187,14 @@ var ts;
else if (lhsId.text === "module" && lhs.name.text === "exports") {
return 2;
}
+ else {
+ return 5;
+ }
}
else if (lhs.expression.kind === 98) {
return 4;
}
- else if (lhs.expression.kind === 177) {
+ else if (lhs.expression.kind === 178) {
var innerPropertyAccess = lhs.expression;
if (innerPropertyAccess.expression.kind === 70) {
var innerPropertyAccessIdentifier = innerPropertyAccess.expression;
@@ -8015,35 +9210,35 @@ var ts;
}
ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind;
function getExternalModuleName(node) {
- if (node.kind === 235) {
+ if (node.kind === 237) {
return node.moduleSpecifier;
}
- if (node.kind === 234) {
+ if (node.kind === 236) {
var reference = node.moduleReference;
- if (reference.kind === 245) {
+ if (reference.kind === 247) {
return reference.expression;
}
}
- if (node.kind === 241) {
+ if (node.kind === 243) {
return node.moduleSpecifier;
}
- if (node.kind === 230 && node.name.kind === 9) {
+ if (node.kind === 232 && node.name.kind === 9) {
return node.name;
}
}
ts.getExternalModuleName = getExternalModuleName;
function getNamespaceDeclarationNode(node) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
var importClause = node.importClause;
- if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 237) {
+ if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239) {
return importClause.namedBindings;
}
}
ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
function isDefaultImport(node) {
- return node.kind === 235
+ return node.kind === 237
&& node.importClause
&& !!node.importClause.name;
}
@@ -8051,13 +9246,13 @@ var ts;
function hasQuestionToken(node) {
if (node) {
switch (node.kind) {
- case 144:
+ case 145:
+ case 150:
case 149:
+ case 261:
+ case 260:
case 148:
- case 258:
- case 257:
case 147:
- case 146:
return node.questionToken !== undefined;
}
}
@@ -8065,28 +9260,36 @@ var ts;
}
ts.hasQuestionToken = hasQuestionToken;
function isJSDocConstructSignature(node) {
- return node.kind === 274 &&
+ return node.kind === 278 &&
node.parameters.length > 0 &&
- node.parameters[0].type.kind === 276;
+ node.parameters[0].type.kind === 280;
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function getCommentsFromJSDoc(node) {
return ts.map(getJSDocs(node), function (doc) { return doc.comment; });
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
+ function hasJSDocParameterTags(node) {
+ var parameterTags = getJSDocTags(node, 285);
+ return parameterTags && parameterTags.length > 0;
+ }
+ ts.hasJSDocParameterTags = hasJSDocParameterTags;
function getJSDocTags(node, kind) {
var docs = getJSDocs(node);
if (docs) {
var result = [];
for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) {
var doc = docs_1[_i];
- if (doc.kind === 281) {
+ if (doc.kind === 285) {
if (doc.kind === kind) {
result.push(doc);
}
}
else {
- result.push.apply(result, ts.filter(doc.tags, function (tag) { return tag.kind === kind; }));
+ var tags = doc.tags;
+ if (tags) {
+ result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
+ }
}
}
return result;
@@ -8106,9 +9309,9 @@ var ts;
var parent = node.parent;
var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) &&
parent.initializer === node &&
- parent.parent.parent.kind === 205;
+ parent.parent.parent.kind === 207;
var isVariableOfVariableDeclarationStatement = isVariableLike(node) &&
- parent.parent.kind === 205;
+ parent.parent.kind === 207;
var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent :
isVariableOfVariableDeclarationStatement ? parent.parent :
undefined;
@@ -8116,19 +9319,19 @@ var ts;
getJSDocsWorker(variableStatementNode);
}
var isSourceOfAssignmentExpressionStatement = parent && parent.parent &&
- parent.kind === 192 &&
+ parent.kind === 193 &&
parent.operatorToken.kind === 57 &&
- parent.parent.kind === 207;
+ parent.parent.kind === 209;
if (isSourceOfAssignmentExpressionStatement) {
getJSDocsWorker(parent.parent);
}
- var isModuleDeclaration = node.kind === 230 &&
- parent && parent.kind === 230;
- var isPropertyAssignmentExpression = parent && parent.kind === 257;
+ var isModuleDeclaration = node.kind === 232 &&
+ parent && parent.kind === 232;
+ var isPropertyAssignmentExpression = parent && parent.kind === 260;
if (isModuleDeclaration || isPropertyAssignmentExpression) {
getJSDocsWorker(parent);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
cache = ts.concatenate(cache, getJSDocParameterTags(node));
}
if (isVariableLike(node) && node.initializer) {
@@ -8137,22 +9340,23 @@ var ts;
cache = ts.concatenate(cache, node.jsDoc);
}
}
+ ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
if (!isParameter(param)) {
return undefined;
}
var func = param.parent;
- var tags = getJSDocTags(func, 281);
+ var tags = getJSDocTags(func, 285);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 281; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 70) {
- var name_8 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 281 && tag.parameterName.text === name_8; });
+ var name_1 = param.name.text;
+ return ts.filter(tags, function (tag) { return tag.kind === 285 && tag.parameterName.text === name_1; });
}
else {
return undefined;
@@ -8160,8 +9364,8 @@ var ts;
}
ts.getJSDocParameterTags = getJSDocParameterTags;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 283);
- if (!tag && node.kind === 144) {
+ var tag = getFirstJSDocTag(node, 287);
+ if (!tag && node.kind === 145) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; });
@@ -8171,15 +9375,15 @@ var ts;
}
ts.getJSDocType = getJSDocType;
function getJSDocAugmentsTag(node) {
- return getFirstJSDocTag(node, 280);
+ return getFirstJSDocTag(node, 284);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 282);
+ return getFirstJSDocTag(node, 286);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 284);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -8191,9 +9395,9 @@ var ts;
}
ts.hasDeclaredRestParameter = hasDeclaredRestParameter;
function isRestParameter(node) {
- if (node && (node.flags & 2097152)) {
- if (node.type && node.type.kind === 275 ||
- ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 275; })) {
+ if (node && (node.flags & 65536)) {
+ if (node.type && node.type.kind === 279 ||
+ ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279; })) {
return true;
}
}
@@ -8204,32 +9408,43 @@ var ts;
return node && node.dotDotDotToken !== undefined;
}
ts.isDeclaredRestParam = isDeclaredRestParam;
+ var AssignmentKind;
+ (function (AssignmentKind) {
+ AssignmentKind[AssignmentKind["None"] = 0] = "None";
+ AssignmentKind[AssignmentKind["Definite"] = 1] = "Definite";
+ AssignmentKind[AssignmentKind["Compound"] = 2] = "Compound";
+ })(AssignmentKind = ts.AssignmentKind || (ts.AssignmentKind = {}));
function getAssignmentTargetKind(node) {
var parent = node.parent;
while (true) {
switch (parent.kind) {
- case 192:
+ case 193:
var binaryOperator = parent.operatorToken.kind;
return isAssignmentOperator(binaryOperator) && parent.left === node ?
binaryOperator === 57 ? 1 : 2 :
0;
- case 190:
case 191:
+ case 192:
var unaryOperator = parent.operator;
return unaryOperator === 42 || unaryOperator === 43 ? 2 : 0;
- case 212:
- case 213:
+ case 214:
+ case 215:
return parent.initializer === node ? 1 : 0;
- case 183:
- case 175:
- case 196:
+ case 184:
+ case 176:
+ case 197:
node = parent;
break;
- case 258:
+ case 261:
if (parent.name !== node) {
return 0;
}
- case 257:
+ node = parent.parent;
+ break;
+ case 260:
+ if (parent.name === node) {
+ return 0;
+ }
node = parent.parent;
break;
default:
@@ -8243,6 +9458,17 @@ var ts;
return getAssignmentTargetKind(node) !== 0;
}
ts.isAssignmentTarget = isAssignmentTarget;
+ function isDeleteTarget(node) {
+ if (node.kind !== 178 && node.kind !== 179) {
+ return false;
+ }
+ node = node.parent;
+ while (node && node.kind === 184) {
+ node = node.parent;
+ }
+ return node && node.kind === 187;
+ }
+ ts.isDeleteTarget = isDeleteTarget;
function isNodeDescendantOf(node, ancestor) {
while (node) {
if (node === ancestor)
@@ -8254,7 +9480,7 @@ var ts;
ts.isNodeDescendantOf = isNodeDescendantOf;
function isInAmbientContext(node) {
while (node) {
- if (hasModifier(node, 2) || (node.kind === 261 && node.isDeclarationFile)) {
+ if (hasModifier(node, 2) || (node.kind === 264 && node.isDeclarationFile)) {
return true;
}
node = node.parent;
@@ -8267,7 +9493,7 @@ var ts;
return false;
}
var parent = name.parent;
- if (parent.kind === 239 || parent.kind === 243) {
+ if (parent.kind === 241 || parent.kind === 245) {
if (parent.propertyName) {
return true;
}
@@ -8280,48 +9506,48 @@ var ts;
ts.isDeclarationName = isDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
- node.parent.kind === 142 &&
+ node.parent.kind === 143 &&
isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
var parent = node.parent;
switch (parent.kind) {
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
+ case 153:
+ case 263:
case 260:
- case 257:
- case 177:
+ case 178:
return parent.name === node;
- case 141:
+ case 142:
if (parent.right === node) {
- while (parent.kind === 141) {
+ while (parent.kind === 142) {
parent = parent.parent;
}
- return parent.kind === 160;
+ return parent.kind === 161;
}
return false;
- case 174:
- case 239:
+ case 175:
+ case 241:
return parent.propertyName === node;
- case 243:
+ case 245:
return true;
}
return false;
}
ts.isIdentifierName = isIdentifierName;
function isAliasSymbolDeclaration(node) {
- return node.kind === 234 ||
- node.kind === 233 ||
- node.kind === 236 && !!node.name ||
- node.kind === 237 ||
+ return node.kind === 236 ||
+ node.kind === 235 ||
+ node.kind === 238 && !!node.name ||
node.kind === 239 ||
- node.kind === 243 ||
- node.kind === 240 && exportAssignmentIsAlias(node);
+ node.kind === 241 ||
+ node.kind === 245 ||
+ node.kind === 242 && exportAssignmentIsAlias(node);
}
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
function exportAssignmentIsAlias(node) {
@@ -8407,17 +9633,61 @@ var ts;
}
ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
function isKeyword(token) {
- return 71 <= token && token <= 140;
+ return 71 <= token && token <= 141;
}
ts.isKeyword = isKeyword;
function isTrivia(token) {
return 2 <= token && token <= 7;
}
ts.isTrivia = isTrivia;
- function isAsyncFunctionLike(node) {
- return isFunctionLike(node) && hasModifier(node, 256) && !isAccessor(node);
+ var FunctionFlags;
+ (function (FunctionFlags) {
+ FunctionFlags[FunctionFlags["Normal"] = 0] = "Normal";
+ FunctionFlags[FunctionFlags["Generator"] = 1] = "Generator";
+ FunctionFlags[FunctionFlags["Async"] = 2] = "Async";
+ FunctionFlags[FunctionFlags["AsyncOrAsyncGenerator"] = 3] = "AsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["Invalid"] = 4] = "Invalid";
+ FunctionFlags[FunctionFlags["InvalidAsyncOrAsyncGenerator"] = 7] = "InvalidAsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["InvalidGenerator"] = 5] = "InvalidGenerator";
+ })(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
+ function getFunctionFlags(node) {
+ var flags = 0;
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 150:
+ if (node.asteriskToken) {
+ flags |= 1;
+ }
+ case 186:
+ if (hasModifier(node, 256)) {
+ flags |= 2;
+ }
+ break;
+ }
+ if (!node.body) {
+ flags |= 4;
+ }
+ return flags;
}
- ts.isAsyncFunctionLike = isAsyncFunctionLike;
+ ts.getFunctionFlags = getFunctionFlags;
+ function isAsyncFunction(node) {
+ switch (node.kind) {
+ case 227:
+ case 185:
+ case 186:
+ case 150:
+ return node.body !== undefined
+ && node.asteriskToken === undefined
+ && hasModifier(node, 256);
+ }
+ return false;
+ }
+ ts.isAsyncFunction = isAsyncFunction;
+ function isNumericLiteral(node) {
+ return node.kind === 8;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9
@@ -8429,7 +9699,7 @@ var ts;
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
- return name.kind === 142 &&
+ return name.kind === 143 &&
!isStringOrNumericLiteral(name.expression) &&
!isWellKnownSymbolSyntactically(name.expression);
}
@@ -8439,10 +9709,10 @@ var ts;
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
- if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 144) {
+ if (name.kind === 70 || name.kind === 9 || name.kind === 8 || name.kind === 145) {
return name.text;
}
- if (name.kind === 142) {
+ if (name.kind === 143) {
var nameExpression = name.expression;
if (isWellKnownSymbolSyntactically(nameExpression)) {
var rightHandSideName = nameExpression.name.text;
@@ -8487,11 +9757,11 @@ var ts;
ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
- return root.kind === 144;
+ return root.kind === 145;
}
ts.isParameterDeclaration = isParameterDeclaration;
function getRootDeclaration(node) {
- while (node.kind === 174) {
+ while (node.kind === 175) {
node = node.parent.parent;
}
return node;
@@ -8499,15 +9769,15 @@ var ts;
ts.getRootDeclaration = getRootDeclaration;
function nodeStartsNewLexicalEnvironment(node) {
var kind = node.kind;
- return kind === 150
- || kind === 184
- || kind === 225
+ return kind === 151
|| kind === 185
- || kind === 149
- || kind === 151
+ || kind === 227
+ || kind === 186
+ || kind === 150
|| kind === 152
- || kind === 230
- || kind === 261;
+ || kind === 153
+ || kind === 232
+ || kind === 264;
}
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
function nodeIsSynthesized(node) {
@@ -8515,66 +9785,49 @@ var ts;
|| ts.positionIsSynthesized(node.end);
}
ts.nodeIsSynthesized = nodeIsSynthesized;
- function getOriginalNode(node, nodeTest) {
- if (node) {
- while (node.original !== undefined) {
- node = node.original;
- }
+ function getOriginalSourceFileOrBundle(sourceFileOrBundle) {
+ if (sourceFileOrBundle.kind === 265) {
+ return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile));
}
- return !nodeTest || nodeTest(node) ? node : undefined;
+ return getOriginalSourceFile(sourceFileOrBundle);
}
- ts.getOriginalNode = getOriginalNode;
- function isParseTreeNode(node) {
- return (node.flags & 8) === 0;
+ ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
+ function getOriginalSourceFile(sourceFile) {
+ return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
}
- ts.isParseTreeNode = isParseTreeNode;
- function getParseTreeNode(node, nodeTest) {
- if (isParseTreeNode(node)) {
- return node;
- }
- node = getOriginalNode(node);
- if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
- return node;
- }
- return undefined;
- }
- ts.getParseTreeNode = getParseTreeNode;
function getOriginalSourceFiles(sourceFiles) {
- var originalSourceFiles = [];
- for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
- var sourceFile = sourceFiles_1[_i];
- var originalSourceFile = getParseTreeNode(sourceFile, isSourceFile);
- if (originalSourceFile) {
- originalSourceFiles.push(originalSourceFile);
- }
- }
- return originalSourceFiles;
+ return ts.sameMap(sourceFiles, getOriginalSourceFile);
}
ts.getOriginalSourceFiles = getOriginalSourceFiles;
function getOriginalNodeId(node) {
- node = getOriginalNode(node);
+ node = ts.getOriginalNode(node);
return node ? ts.getNodeId(node) : 0;
}
ts.getOriginalNodeId = getOriginalNodeId;
+ var Associativity;
+ (function (Associativity) {
+ Associativity[Associativity["Left"] = 0] = "Left";
+ Associativity[Associativity["Right"] = 1] = "Right";
+ })(Associativity = ts.Associativity || (ts.Associativity = {}));
function getExpressionAssociativity(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorAssociativity(expression.kind, operator, hasArguments);
}
ts.getExpressionAssociativity = getExpressionAssociativity;
function getOperatorAssociativity(kind, operator, hasArguments) {
switch (kind) {
- case 180:
+ case 181:
return hasArguments ? 0 : 1;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
- case 193:
- case 195:
+ case 187:
+ case 190:
+ case 194:
+ case 196:
return 1;
- case 192:
+ case 193:
switch (operator) {
case 39:
case 57:
@@ -8598,15 +9851,15 @@ var ts;
ts.getOperatorAssociativity = getOperatorAssociativity;
function getExpressionPrecedence(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 && expression.arguments !== undefined;
return getOperatorPrecedence(expression.kind, operator, hasArguments);
}
ts.getExpressionPrecedence = getExpressionPrecedence;
function getOperator(expression) {
- if (expression.kind === 192) {
+ if (expression.kind === 193) {
return expression.operatorToken.kind;
}
- else if (expression.kind === 190 || expression.kind === 191) {
+ else if (expression.kind === 191 || expression.kind === 192) {
return expression.operator;
}
else {
@@ -8624,37 +9877,36 @@ var ts;
case 85:
case 8:
case 9:
- case 175:
case 176:
- case 184:
+ case 177:
case 185:
- case 197:
- case 246:
- case 247:
+ case 186:
+ case 198:
+ case 248:
+ case 249:
case 11:
case 12:
- case 194:
- case 183:
- case 198:
- case 297:
+ case 195:
+ case 184:
+ case 199:
return 19;
- case 181:
- case 177:
+ case 182:
case 178:
+ case 179:
return 18;
- case 180:
+ case 181:
return hasArguments ? 18 : 17;
- case 179:
+ case 180:
return 17;
- case 191:
+ case 192:
return 16;
- case 190:
- case 187:
+ case 191:
case 188:
- case 186:
case 189:
+ case 187:
+ case 190:
return 15;
- case 192:
+ case 193:
switch (operatorKind) {
case 50:
case 51:
@@ -8712,11 +9964,11 @@ var ts;
default:
return -1;
}
- case 193:
+ case 194:
return 4;
- case 195:
- return 2;
case 196:
+ return 2;
+ case 197:
return 1;
default:
return -1;
@@ -8739,21 +9991,15 @@ var ts;
return modificationCount;
}
function reattachFileDiagnostics(newFile) {
- if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) {
- return;
- }
- for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) {
- var diagnostic = _a[_i];
- diagnostic.file = newFile;
- }
+ ts.forEach(fileDiagnostics.get(newFile.fileName), function (diagnostic) { return diagnostic.file = newFile; });
}
function add(diagnostic) {
var diagnostics;
if (diagnostic.file) {
- diagnostics = fileDiagnostics[diagnostic.file.fileName];
+ diagnostics = fileDiagnostics.get(diagnostic.file.fileName);
if (!diagnostics) {
diagnostics = [];
- fileDiagnostics[diagnostic.file.fileName] = diagnostics;
+ fileDiagnostics.set(diagnostic.file.fileName, diagnostics);
}
}
else {
@@ -8770,16 +10016,16 @@ var ts;
function getDiagnostics(fileName) {
sortAndDeduplicate();
if (fileName) {
- return fileDiagnostics[fileName] || [];
+ return fileDiagnostics.get(fileName) || [];
}
var allDiagnostics = [];
function pushDiagnostic(d) {
allDiagnostics.push(d);
}
ts.forEach(nonFileDiagnostics, pushDiagnostic);
- for (var key in fileDiagnostics) {
- ts.forEach(fileDiagnostics[key], pushDiagnostic);
- }
+ fileDiagnostics.forEach(function (diagnostics) {
+ ts.forEach(diagnostics, pushDiagnostic);
+ });
return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
}
function sortAndDeduplicate() {
@@ -8788,14 +10034,14 @@ var ts;
}
diagnosticsModified = false;
nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
- for (var key in fileDiagnostics) {
- fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
- }
+ fileDiagnostics.forEach(function (diagnostics, key) {
+ fileDiagnostics.set(key, ts.sortAndDeduplicateDiagnostics(diagnostics));
+ });
}
}
ts.createDiagnosticCollection = createDiagnosticCollection;
var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
- var escapedCharsMap = ts.createMap({
+ var escapedCharsMap = ts.createMapFromTemplate({
"\0": "\\0",
"\t": "\\t",
"\v": "\\v",
@@ -8810,13 +10056,12 @@ var ts;
"\u0085": "\\u0085"
});
function escapeString(s) {
- s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
- return s;
- function getReplacement(c) {
- return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
- }
+ return s.replace(escapedCharsRegExp, getReplacement);
}
ts.escapeString = escapeString;
+ function getReplacement(c) {
+ return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
+ }
function isIntrinsicJsxName(name) {
var ch = name.substr(0, 1);
return ch.toLowerCase() === ch;
@@ -8959,129 +10204,62 @@ var ts;
ts.getDeclarationEmitOutputFilePath = getDeclarationEmitOutputFilePath;
function getSourceFilesToEmit(host, targetSourceFile) {
var options = host.getCompilerOptions();
+ var isSourceFileFromExternalLibrary = function (file) { return host.isSourceFileFromExternalLibrary(file); };
if (options.outFile || options.out) {
var moduleKind = ts.getEmitModuleKind(options);
- var moduleEmitEnabled = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
- var sourceFiles = getAllEmittableSourceFiles();
- return ts.filter(sourceFiles, moduleEmitEnabled ? isNonDeclarationFile : isBundleEmitNonExternalModule);
+ var moduleEmitEnabled_1 = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
+ return ts.filter(host.getSourceFiles(), function (sourceFile) {
+ return (moduleEmitEnabled_1 || !ts.isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary);
+ });
}
else {
- var sourceFiles = targetSourceFile === undefined ? getAllEmittableSourceFiles() : [targetSourceFile];
- return filterSourceFilesInDirectory(sourceFiles, function (file) { return host.isSourceFileFromExternalLibrary(file); });
- }
- function getAllEmittableSourceFiles() {
- return options.noEmitForJsFiles ? ts.filter(host.getSourceFiles(), function (sourceFile) { return !isSourceFileJavaScript(sourceFile); }) : host.getSourceFiles();
+ var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
+ return ts.filter(sourceFiles, function (sourceFile) { return sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary); });
}
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
- function filterSourceFilesInDirectory(sourceFiles, isSourceFileFromExternalLibrary) {
- return ts.filter(sourceFiles, function (file) { return shouldEmitInDirectory(file, isSourceFileFromExternalLibrary); });
+ function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
}
- ts.filterSourceFilesInDirectory = filterSourceFilesInDirectory;
- function isNonDeclarationFile(sourceFile) {
- return !isDeclarationFile(sourceFile);
- }
- function shouldEmitInDirectory(sourceFile, isSourceFileFromExternalLibrary) {
- return isNonDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
- }
- function isBundleEmitNonExternalModule(sourceFile) {
- return isNonDeclarationFile(sourceFile) && !ts.isExternalModule(sourceFile);
- }
- function forEachTransformedEmitFile(host, sourceFiles, action, emitOnlyDtsFiles) {
+ ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
+ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
+ var sourceFiles = ts.isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile);
var options = host.getCompilerOptions();
if (options.outFile || options.out) {
- onBundledEmit(sourceFiles);
- }
- else {
- for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
- var sourceFile = sourceFiles_2[_i];
- if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (options.declaration || emitOnlyDtsFiles) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, [sourceFile], false);
- }
- function onBundledEmit(sourceFiles) {
if (sourceFiles.length) {
var jsFilePath = options.outFile || options.out;
var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, true);
+ var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : "";
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, ts.createBundle(sourceFiles), emitOnlyDtsFiles);
+ }
+ }
+ else {
+ for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
+ var sourceFile = sourceFiles_1[_i];
+ var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, getOutputExtension(sourceFile, options));
+ var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
+ var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, sourceFile, emitOnlyDtsFiles);
}
}
}
- ts.forEachTransformedEmitFile = forEachTransformedEmitFile;
+ ts.forEachEmittedFile = forEachEmittedFile;
function getSourceMapFilePath(jsFilePath, options) {
return options.sourceMap ? jsFilePath + ".map" : undefined;
}
- function forEachExpectedEmitFile(host, action, targetSourceFile, emitOnlyDtsFiles) {
- var options = host.getCompilerOptions();
- if (options.outFile || options.out) {
- onBundledEmit(host);
- }
- else {
- var sourceFiles = targetSourceFile === undefined ? getSourceFilesToEmit(host) : [targetSourceFile];
- for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
- var sourceFile = sourceFiles_3[_i];
- if (shouldEmitInDirectory(sourceFile, function (file) { return host.isSourceFileFromExternalLibrary(file); })) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- var extension = ".js";
- if (options.jsx === 1) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1) {
- extension = ".jsx";
+ function getOutputExtension(sourceFile, options) {
+ if (options.jsx === 1) {
+ if (isSourceFileJavaScript(sourceFile)) {
+ if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
+ return ".jsx";
}
}
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: declarationFilePath
- };
- action(emitFileNames, [sourceFile], false, emitOnlyDtsFiles);
- }
- function onBundledEmit(host) {
- var bundledSources = ts.filter(getSourceFilesToEmit(host), function (sourceFile) { return !isDeclarationFile(sourceFile) &&
- !host.isSourceFileFromExternalLibrary(sourceFile) &&
- (!ts.isExternalModule(sourceFile) ||
- !!ts.getEmitModuleKind(options)); });
- if (bundledSources.length) {
- var jsFilePath = options.outFile || options.out;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined
- };
- action(emitFileNames, bundledSources, true, emitOnlyDtsFiles);
+ else if (sourceFile.languageVariant === 1) {
+ return ".jsx";
}
}
+ return ".js";
}
- ts.forEachExpectedEmitFile = forEachExpectedEmitFile;
function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
var commonSourceDirectory = host.getCommonSourceDirectory();
@@ -9106,7 +10284,7 @@ var ts;
ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap;
function getFirstConstructorWithBody(node) {
return ts.forEach(node.members, function (member) {
- if (member.kind === 150 && nodeIsPresent(member.body)) {
+ if (member.kind === 151 && nodeIsPresent(member.body)) {
return member;
}
});
@@ -9147,10 +10325,10 @@ var ts;
var setAccessor;
if (hasDynamicName(accessor)) {
firstAccessor = accessor;
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
getAccessor = accessor;
}
- else if (accessor.kind === 152) {
+ else if (accessor.kind === 153) {
setAccessor = accessor;
}
else {
@@ -9159,7 +10337,7 @@ var ts;
}
else {
ts.forEach(declarations, function (member) {
- if ((member.kind === 151 || member.kind === 152)
+ if ((member.kind === 152 || member.kind === 153)
&& hasModifier(member, 32) === hasModifier(accessor, 32)) {
var memberName = getPropertyNameForPropertyNameNode(member.name);
var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
@@ -9170,10 +10348,10 @@ var ts;
else if (!secondAccessor) {
secondAccessor = member;
}
- if (member.kind === 151 && !getAccessor) {
+ if (member.kind === 152 && !getAccessor) {
getAccessor = member;
}
- if (member.kind === 152 && !setAccessor) {
+ if (member.kind === 153 && !setAccessor) {
setAccessor = member;
}
}
@@ -9391,7 +10569,7 @@ var ts;
}
ts.isAssignmentOperator = isAssignmentOperator;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
- if (node.kind === 199 &&
+ if (node.kind === 200 &&
node.parent.token === 84 &&
isClassLike(node.parent.parent)) {
return node.parent.parent;
@@ -9409,8 +10587,8 @@ var ts;
function isDestructuringAssignment(node) {
if (isAssignmentExpression(node, true)) {
var kind = node.left.kind;
- return kind === 176
- || kind === 175;
+ return kind === 177
+ || kind === 176;
}
return false;
}
@@ -9434,31 +10612,42 @@ var ts;
return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined;
}
ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
+ function isExpressionWithTypeArgumentsInClassImplementsClause(node) {
+ return node.kind === 200
+ && isEntityNameExpression(node.expression)
+ && node.parent
+ && node.parent.token === 107
+ && node.parent.parent
+ && isClassLike(node.parent.parent);
+ }
+ ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
return node.kind === 70 ||
- node.kind === 177 && isEntityNameExpression(node.expression);
+ node.kind === 178 && isEntityNameExpression(node.expression);
}
ts.isEntityNameExpression = isEntityNameExpression;
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
- return (node.parent.kind === 141 && node.parent.right === node) ||
- (node.parent.kind === 177 && node.parent.name === node);
+ return (node.parent.kind === 142 && node.parent.right === node) ||
+ (node.parent.kind === 178 && node.parent.name === node);
}
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
- function isEmptyObjectLiteralOrArrayLiteral(expression) {
- var kind = expression.kind;
- if (kind === 176) {
- return expression.properties.length === 0;
- }
- if (kind === 175) {
- return expression.elements.length === 0;
- }
- return false;
+ function isEmptyObjectLiteral(expression) {
+ return expression.kind === 177 &&
+ expression.properties.length === 0;
}
- ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral;
+ ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
+ function isEmptyArrayLiteral(expression) {
+ return expression.kind === 176 &&
+ expression.elements.length === 0;
+ }
+ ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
+ function isExportDefaultSymbol(symbol) {
+ return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ }
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
}
@@ -9492,39 +10681,6 @@ var ts;
}
return output;
}
- ts.stringify = typeof JSON !== "undefined" && JSON.stringify
- ? JSON.stringify
- : stringifyFallback;
- function stringifyFallback(value) {
- return value === undefined ? undefined : stringifyValue(value);
- }
- function stringifyValue(value) {
- return typeof value === "string" ? "\"" + escapeString(value) + "\""
- : typeof value === "number" ? isFinite(value) ? String(value) : "null"
- : typeof value === "boolean" ? value ? "true" : "false"
- : typeof value === "object" && value ? ts.isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
- : "null";
- }
- function cycleCheck(cb, value) {
- ts.Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
- value.__cycle = true;
- var result = cb(value);
- delete value.__cycle;
- return result;
- }
- function stringifyArray(value) {
- return "[" + ts.reduceLeft(value, stringifyElement, "") + "]";
- }
- function stringifyElement(memo, value) {
- return (memo ? memo + "," : memo) + stringifyValue(value);
- }
- function stringifyObject(value) {
- return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}";
- }
- function stringifyProperty(memo, value, key) {
- return value === undefined || typeof value === "function" || key === "__cycle" ? memo
- : (memo ? memo + "," : memo) + ("\"" + escapeString(key) + "\":" + stringifyValue(value));
- }
var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function convertToBase64(input) {
var result = "";
@@ -9583,39 +10739,39 @@ var ts;
|| kind === 94) {
return true;
}
- else if (kind === 177) {
+ else if (kind === 178) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 178) {
+ else if (kind === 179) {
return isSimpleExpressionWorker(node.expression, depth + 1)
&& isSimpleExpressionWorker(node.argumentExpression, depth + 1);
}
- else if (kind === 190
- || kind === 191) {
+ else if (kind === 191
+ || kind === 192) {
return isSimpleExpressionWorker(node.operand, depth + 1);
}
- else if (kind === 192) {
+ else if (kind === 193) {
return node.operatorToken.kind !== 39
&& isSimpleExpressionWorker(node.left, depth + 1)
&& isSimpleExpressionWorker(node.right, depth + 1);
}
- else if (kind === 193) {
+ else if (kind === 194) {
return isSimpleExpressionWorker(node.condition, depth + 1)
&& isSimpleExpressionWorker(node.whenTrue, depth + 1)
&& isSimpleExpressionWorker(node.whenFalse, depth + 1);
}
- else if (kind === 188
- || kind === 187
- || kind === 186) {
+ else if (kind === 189
+ || kind === 188
+ || kind === 187) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 175) {
+ else if (kind === 176) {
return node.elements.length === 0;
}
- else if (kind === 176) {
+ else if (kind === 177) {
return node.properties.length === 0;
}
- else if (kind === 179) {
+ else if (kind === 180) {
if (!isSimpleExpressionWorker(node.expression, depth + 1)) {
return false;
}
@@ -9630,16 +10786,19 @@ var ts;
}
return false;
}
- var syntaxKindCache = ts.createMap();
+ var syntaxKindCache = [];
function formatSyntaxKind(kind) {
var syntaxKindEnum = ts.SyntaxKind;
if (syntaxKindEnum) {
- if (syntaxKindCache[kind]) {
- return syntaxKindCache[kind];
+ var cached = syntaxKindCache[kind];
+ if (cached !== undefined) {
+ return cached;
}
- for (var name_9 in syntaxKindEnum) {
- if (syntaxKindEnum[name_9] === kind) {
- return syntaxKindCache[kind] = kind.toString() + " (" + name_9 + ")";
+ for (var name in syntaxKindEnum) {
+ if (syntaxKindEnum[name] === kind) {
+ var result = kind + " (" + name + ")";
+ syntaxKindCache[kind] = result;
+ return result;
}
}
}
@@ -9648,6 +10807,14 @@ var ts;
}
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function getRangePos(range) {
+ return range ? range.pos : -1;
+ }
+ ts.getRangePos = getRangePos;
+ function getRangeEnd(range) {
+ return range ? range.end : -1;
+ }
+ ts.getRangeEnd = getRangeEnd;
function movePos(pos, value) {
return ts.positionIsSynthesized(pos) ? -1 : pos + value;
}
@@ -9722,11 +10889,11 @@ var ts;
}
ts.getStartPositionOfRange = getStartPositionOfRange;
function isDeclarationNameOfEnumOrNamespace(node) {
- var parseNode = getParseTreeNode(node);
+ var parseNode = ts.getParseTreeNode(node);
if (parseNode) {
switch (parseNode.parent.kind) {
- case 229:
- case 230:
+ case 231:
+ case 232:
return parseNode === parseNode.parent.name;
}
}
@@ -9744,7 +10911,7 @@ var ts;
if (node.symbol) {
for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 226 && declaration !== node) {
+ if (declaration.kind === 228 && declaration !== node) {
return true;
}
}
@@ -9795,6 +10962,10 @@ var ts;
return node.kind === 70;
}
ts.isIdentifier = isIdentifier;
+ function isVoidExpression(node) {
+ return node.kind === 189;
+ }
+ ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
return isIdentifier(node) && node.autoGenerateKind > 0;
}
@@ -9804,16 +10975,16 @@ var ts;
}
ts.isModifier = isModifier;
function isQualifiedName(node) {
- return node.kind === 141;
+ return node.kind === 142;
}
ts.isQualifiedName = isQualifiedName;
function isComputedPropertyName(node) {
- return node.kind === 142;
+ return node.kind === 143;
}
ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
- return kind === 141
+ return kind === 142
|| kind === 70;
}
ts.isEntityName = isEntityName;
@@ -9822,7 +10993,7 @@ var ts;
return kind === 70
|| kind === 9
|| kind === 8
- || kind === 142;
+ || kind === 143;
}
ts.isPropertyName = isPropertyName;
function isModuleName(node) {
@@ -9834,101 +11005,105 @@ var ts;
function isBindingName(node) {
var kind = node.kind;
return kind === 70
- || kind === 172
- || kind === 173;
+ || kind === 173
+ || kind === 174;
}
ts.isBindingName = isBindingName;
function isTypeParameter(node) {
- return node.kind === 143;
+ return node.kind === 144;
}
ts.isTypeParameter = isTypeParameter;
function isParameter(node) {
- return node.kind === 144;
+ return node.kind === 145;
}
ts.isParameter = isParameter;
function isDecorator(node) {
- return node.kind === 145;
+ return node.kind === 146;
}
ts.isDecorator = isDecorator;
function isMethodDeclaration(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
ts.isMethodDeclaration = isMethodDeclaration;
function isClassElement(node) {
var kind = node.kind;
- return kind === 150
- || kind === 147
- || kind === 149
- || kind === 151
+ return kind === 151
+ || kind === 148
+ || kind === 150
|| kind === 152
- || kind === 155
- || kind === 203;
+ || kind === 153
+ || kind === 156
+ || kind === 205;
}
ts.isClassElement = isClassElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
- return kind === 257
- || kind === 258
- || kind === 259
- || kind === 149
- || kind === 151
+ return kind === 260
+ || kind === 261
+ || kind === 262
+ || kind === 150
|| kind === 152
- || kind === 244;
+ || kind === 153
+ || kind === 246;
}
ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
function isTypeNodeKind(kind) {
- return (kind >= 156 && kind <= 171)
+ return (kind >= 157 && kind <= 172)
|| kind === 118
|| kind === 132
+ || kind === 133
|| kind === 121
- || kind === 134
|| kind === 135
+ || kind === 136
+ || kind === 98
|| kind === 104
+ || kind === 138
+ || kind === 94
|| kind === 129
- || kind === 199;
+ || kind === 200;
}
function isTypeNode(node) {
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
function isArrayBindingPattern(node) {
- return node.kind === 173;
+ return node.kind === 174;
}
ts.isArrayBindingPattern = isArrayBindingPattern;
function isObjectBindingPattern(node) {
- return node.kind === 172;
+ return node.kind === 173;
}
ts.isObjectBindingPattern = isObjectBindingPattern;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
- return kind === 173
- || kind === 172;
+ return kind === 174
+ || kind === 173;
}
return false;
}
ts.isBindingPattern = isBindingPattern;
function isAssignmentPattern(node) {
var kind = node.kind;
- return kind === 175
- || kind === 176;
+ return kind === 176
+ || kind === 177;
}
ts.isAssignmentPattern = isAssignmentPattern;
function isBindingElement(node) {
- return node.kind === 174;
+ return node.kind === 175;
}
ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
- return kind === 174
- || kind === 198;
+ return kind === 175
+ || kind === 199;
}
ts.isArrayBindingElement = isArrayBindingElement;
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
- case 223:
- case 144:
- case 174:
+ case 225:
+ case 145:
+ case 175:
return true;
}
return false;
@@ -9941,8 +11116,8 @@ var ts;
ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern;
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 172:
- case 176:
+ case 173:
+ case 177:
return true;
}
return false;
@@ -9950,94 +11125,100 @@ var ts;
ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern;
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
+ case 174:
+ case 176:
return true;
}
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
function isArrayLiteralExpression(node) {
- return node.kind === 175;
+ return node.kind === 176;
}
ts.isArrayLiteralExpression = isArrayLiteralExpression;
function isObjectLiteralExpression(node) {
- return node.kind === 176;
+ return node.kind === 177;
}
ts.isObjectLiteralExpression = isObjectLiteralExpression;
function isPropertyAccessExpression(node) {
- return node.kind === 177;
+ return node.kind === 178;
}
ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isPropertyAccessOrQualifiedName(node) {
+ var kind = node.kind;
+ return kind === 178
+ || kind === 142;
+ }
+ ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
function isElementAccessExpression(node) {
- return node.kind === 178;
+ return node.kind === 179;
}
ts.isElementAccessExpression = isElementAccessExpression;
function isBinaryExpression(node) {
- return node.kind === 192;
+ return node.kind === 193;
}
ts.isBinaryExpression = isBinaryExpression;
function isConditionalExpression(node) {
- return node.kind === 193;
+ return node.kind === 194;
}
ts.isConditionalExpression = isConditionalExpression;
function isCallExpression(node) {
- return node.kind === 179;
+ return node.kind === 180;
}
ts.isCallExpression = isCallExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
- return kind === 194
+ return kind === 195
|| kind === 12;
}
ts.isTemplateLiteral = isTemplateLiteral;
function isSpreadExpression(node) {
- return node.kind === 196;
+ return node.kind === 197;
}
ts.isSpreadExpression = isSpreadExpression;
function isExpressionWithTypeArguments(node) {
- return node.kind === 199;
+ return node.kind === 200;
}
ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
- return kind === 177
- || kind === 178
- || kind === 180
+ return kind === 178
|| kind === 179
- || kind === 246
- || kind === 247
|| kind === 181
- || kind === 175
- || kind === 183
+ || kind === 180
+ || kind === 248
+ || kind === 249
+ || kind === 182
|| kind === 176
- || kind === 197
|| kind === 184
+ || kind === 177
+ || kind === 198
+ || kind === 185
|| kind === 70
|| kind === 11
|| kind === 8
|| kind === 9
|| kind === 12
- || kind === 194
+ || kind === 195
|| kind === 85
|| kind === 94
|| kind === 98
|| kind === 100
|| kind === 96
- || kind === 201
- || kind === 297;
+ || kind === 202
+ || kind === 203;
}
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
ts.isLeftHandSideExpression = isLeftHandSideExpression;
function isUnaryExpressionKind(kind) {
- return kind === 190
- || kind === 191
- || kind === 186
+ return kind === 191
+ || kind === 192
|| kind === 187
|| kind === 188
|| kind === 189
- || kind === 182
+ || kind === 190
+ || kind === 183
|| isLeftHandSideExpressionKind(kind);
}
function isUnaryExpression(node) {
@@ -10045,14 +11226,13 @@ var ts;
}
ts.isUnaryExpression = isUnaryExpression;
function isExpressionKind(kind) {
- return kind === 193
- || kind === 195
- || kind === 185
- || kind === 192
+ return kind === 194
|| kind === 196
- || kind === 200
- || kind === 198
- || kind === 297
+ || kind === 186
+ || kind === 193
+ || kind === 197
+ || kind === 201
+ || kind === 199
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -10061,16 +11241,16 @@ var ts;
ts.isExpression = isExpression;
function isAssertionExpression(node) {
var kind = node.kind;
- return kind === 182
- || kind === 200;
+ return kind === 183
+ || kind === 201;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 294;
+ return node.kind === 295;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 293;
+ return node.kind === 294;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -10079,15 +11259,15 @@ var ts;
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
function isOmittedExpression(node) {
- return node.kind === 198;
+ return node.kind === 199;
}
ts.isOmittedExpression = isOmittedExpression;
function isTemplateSpan(node) {
- return node.kind === 202;
+ return node.kind === 204;
}
ts.isTemplateSpan = isTemplateSpan;
function isBlock(node) {
- return node.kind === 204;
+ return node.kind === 206;
}
ts.isBlock = isBlock;
function isConciseBody(node) {
@@ -10105,121 +11285,135 @@ var ts;
}
ts.isForInitializer = isForInitializer;
function isVariableDeclaration(node) {
- return node.kind === 223;
+ return node.kind === 225;
}
ts.isVariableDeclaration = isVariableDeclaration;
function isVariableDeclarationList(node) {
- return node.kind === 224;
+ return node.kind === 226;
}
ts.isVariableDeclarationList = isVariableDeclarationList;
function isCaseBlock(node) {
- return node.kind === 232;
+ return node.kind === 234;
}
ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
- return kind === 231
- || kind === 230;
+ return kind === 233
+ || kind === 232
+ || kind === 70;
}
ts.isModuleBody = isModuleBody;
+ function isNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 233
+ || kind === 232;
+ }
+ ts.isNamespaceBody = isNamespaceBody;
+ function isJSDocNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 70
+ || kind === 232;
+ }
+ ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
function isImportEqualsDeclaration(node) {
- return node.kind === 234;
+ return node.kind === 236;
}
ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportClause(node) {
- return node.kind === 236;
+ return node.kind === 238;
}
ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
- return kind === 238
- || kind === 237;
+ return kind === 240
+ || kind === 239;
}
ts.isNamedImportBindings = isNamedImportBindings;
function isImportSpecifier(node) {
- return node.kind === 239;
+ return node.kind === 241;
}
ts.isImportSpecifier = isImportSpecifier;
function isNamedExports(node) {
- return node.kind === 242;
+ return node.kind === 244;
}
ts.isNamedExports = isNamedExports;
function isExportSpecifier(node) {
- return node.kind === 243;
+ return node.kind === 245;
}
ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
- return node.kind === 230 || node.kind === 229;
+ return node.kind === 232 || node.kind === 231;
}
ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
function isDeclarationKind(kind) {
- return kind === 185
- || kind === 174
- || kind === 226
- || kind === 197
- || kind === 150
- || kind === 229
- || kind === 260
- || kind === 243
- || kind === 225
- || kind === 184
+ return kind === 186
+ || kind === 175
+ || kind === 228
+ || kind === 198
|| kind === 151
- || kind === 236
- || kind === 234
- || kind === 239
+ || kind === 231
+ || kind === 263
+ || kind === 245
|| kind === 227
+ || kind === 185
+ || kind === 152
+ || kind === 238
+ || kind === 236
+ || kind === 241
+ || kind === 229
+ || kind === 252
+ || kind === 150
|| kind === 149
+ || kind === 232
+ || kind === 235
+ || kind === 239
+ || kind === 145
+ || kind === 260
|| kind === 148
+ || kind === 147
+ || kind === 153
+ || kind === 261
|| kind === 230
- || kind === 233
- || kind === 237
|| kind === 144
- || kind === 257
- || kind === 147
- || kind === 146
- || kind === 152
- || kind === 258
- || kind === 228
- || kind === 143
- || kind === 223
- || kind === 285;
+ || kind === 225
+ || kind === 289;
}
function isDeclarationStatementKind(kind) {
- return kind === 225
- || kind === 244
- || kind === 226
- || kind === 227
+ return kind === 227
+ || kind === 246
|| kind === 228
|| kind === 229
|| kind === 230
- || kind === 235
- || kind === 234
- || kind === 241
- || kind === 240
- || kind === 233;
+ || kind === 231
+ || kind === 232
+ || kind === 237
+ || kind === 236
+ || kind === 243
+ || kind === 242
+ || kind === 235;
}
function isStatementKindButNotDeclarationKind(kind) {
- return kind === 215
+ return kind === 217
+ || kind === 216
+ || kind === 224
+ || kind === 211
+ || kind === 209
+ || kind === 208
|| kind === 214
+ || kind === 215
+ || kind === 213
+ || kind === 210
+ || kind === 221
+ || kind === 218
+ || kind === 220
|| kind === 222
- || kind === 209
+ || kind === 223
|| kind === 207
- || kind === 206
|| kind === 212
- || kind === 213
- || kind === 211
- || kind === 208
|| kind === 219
- || kind === 216
- || kind === 218
- || kind === 220
- || kind === 221
- || kind === 205
- || kind === 210
- || kind === 217
- || kind === 293
- || kind === 296
- || kind === 295;
+ || kind === 294
+ || kind === 297
+ || kind === 296;
}
function isDeclaration(node) {
return isDeclarationKind(node.kind);
@@ -10237,87 +11431,98 @@ var ts;
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
|| isDeclarationStatementKind(kind)
- || kind === 204;
+ || kind === 206;
}
ts.isStatement = isStatement;
function isModuleReference(node) {
var kind = node.kind;
- return kind === 245
- || kind === 141
+ return kind === 247
+ || kind === 142
|| kind === 70;
}
ts.isModuleReference = isModuleReference;
function isJsxOpeningElement(node) {
- return node.kind === 248;
+ return node.kind === 250;
}
ts.isJsxOpeningElement = isJsxOpeningElement;
function isJsxClosingElement(node) {
- return node.kind === 249;
+ return node.kind === 251;
}
ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 98
|| kind === 70
- || kind === 177;
+ || kind === 178;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
function isJsxChild(node) {
var kind = node.kind;
- return kind === 246
- || kind === 252
- || kind === 247
+ return kind === 248
+ || kind === 255
+ || kind === 249
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
+ function isJsxAttributes(node) {
+ var kind = node.kind;
+ return kind === 253;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
- return kind === 250
- || kind === 251;
+ return kind === 252
+ || kind === 254;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
function isJsxSpreadAttribute(node) {
- return node.kind === 251;
+ return node.kind === 254;
}
ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxAttribute(node) {
- return node.kind === 250;
+ return node.kind === 252;
}
ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
- || kind === 252;
+ || kind === 255;
}
ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
+ function isJsxOpeningLikeElement(node) {
+ var kind = node.kind;
+ return kind === 250
+ || kind === 249;
+ }
+ ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
function isCaseOrDefaultClause(node) {
var kind = node.kind;
- return kind === 253
- || kind === 254;
+ return kind === 256
+ || kind === 257;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isHeritageClause(node) {
- return node.kind === 255;
+ return node.kind === 258;
}
ts.isHeritageClause = isHeritageClause;
function isCatchClause(node) {
- return node.kind === 256;
+ return node.kind === 259;
}
ts.isCatchClause = isCatchClause;
function isPropertyAssignment(node) {
- return node.kind === 257;
+ return node.kind === 260;
}
ts.isPropertyAssignment = isPropertyAssignment;
function isShorthandPropertyAssignment(node) {
- return node.kind === 258;
+ return node.kind === 261;
}
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
function isEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
ts.isEnumMember = isEnumMember;
function isSourceFile(node) {
- return node.kind === 261;
+ return node.kind === 264;
}
ts.isSourceFile = isSourceFile;
function isWatchSet(options) {
@@ -10329,10 +11534,11 @@ var ts;
function getDefaultLibFileName(options) {
switch (options.target) {
case 5:
+ return "lib.esnext.full.d.ts";
case 4:
- return "lib.es2017.d.ts";
+ return "lib.es2017.full.d.ts";
case 3:
- return "lib.es2016.d.ts";
+ return "lib.es2016.full.d.ts";
case 2:
return "lib.es6.d.ts";
default:
@@ -10456,9 +11662,9 @@ var ts;
}
ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
function getTypeParameterOwner(d) {
- if (d && d.kind === 143) {
+ if (d && d.kind === 144) {
for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 227) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229) {
return current;
}
}
@@ -10466,11 +11672,11 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 150 && ts.isClassLike(node.parent.parent);
+ return ts.hasModifier(node, 92) && node.parent.kind === 151 && ts.isClassLike(node.parent.parent);
}
ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 174 || ts.isBindingPattern(node))) {
+ while (node && (node.kind === 175 || ts.isBindingPattern(node))) {
node = node.parent;
}
return node;
@@ -10478,14 +11684,14 @@ var ts;
function getCombinedModifierFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = ts.getModifierFlags(node);
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= ts.getModifierFlags(node);
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= ts.getModifierFlags(node);
}
return flags;
@@ -10494,14 +11700,14 @@ var ts;
function getCombinedNodeFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = node.flags;
- if (node.kind === 223) {
+ if (node.kind === 225) {
node = node.parent;
}
- if (node && node.kind === 224) {
+ if (node && node.kind === 226) {
flags |= node.flags;
node = node.parent;
}
- if (node && node.kind === 205) {
+ if (node && node.kind === 207) {
flags |= node.flags;
}
return flags;
@@ -10554,24 +11760,46 @@ var ts;
}
}
ts.validateLocaleAndSetLanguage = validateLocaleAndSetLanguage;
+ function getOriginalNode(node, nodeTest) {
+ if (node) {
+ while (node.original !== undefined) {
+ node = node.original;
+ }
+ }
+ return !nodeTest || nodeTest(node) ? node : undefined;
+ }
+ ts.getOriginalNode = getOriginalNode;
+ function isParseTreeNode(node) {
+ return (node.flags & 8) === 0;
+ }
+ ts.isParseTreeNode = isParseTreeNode;
+ function getParseTreeNode(node, nodeTest) {
+ if (node === undefined || isParseTreeNode(node)) {
+ return node;
+ }
+ node = getOriginalNode(node);
+ if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
+ return node;
+ }
+ return undefined;
+ }
+ ts.getParseTreeNode = getParseTreeNode;
+ function unescapeIdentifier(identifier) {
+ return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
+ }
+ ts.unescapeIdentifier = unescapeIdentifier;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var NodeConstructor;
- var SourceFileConstructor;
- function createNode(kind, location, flags) {
- var ConstructorForKind = kind === 261
- ? (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))
- : (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()));
- var node = location
- ? new ConstructorForKind(kind, location.pos, location.end)
- : new ConstructorForKind(kind, -1, -1);
- node.flags = flags | 8;
+ function createSynthesizedNode(kind) {
+ var node = ts.createNode(kind, -1, -1);
+ node.flags |= 8;
return node;
}
function updateNode(updated, original) {
if (updated !== original) {
setOriginalNode(updated, original);
+ setTextRange(updated, original);
if (original.startsOnNewLine) {
updated.startsOnNewLine = true;
}
@@ -10580,7 +11808,7 @@ var ts;
return updated;
}
ts.updateNode = updateNode;
- function createNodeArray(elements, location, hasTrailingComma) {
+ function createNodeArray(elements, hasTrailingComma) {
if (elements) {
if (ts.isNodeArray(elements)) {
return elements;
@@ -10590,32 +11818,15 @@ var ts;
elements = [];
}
var array = elements;
- if (location) {
- array.pos = location.pos;
- array.end = location.end;
- }
- else {
- array.pos = -1;
- array.end = -1;
- }
- if (hasTrailingComma) {
- array.hasTrailingComma = true;
- }
+ array.pos = -1;
+ array.end = -1;
+ array.hasTrailingComma = hasTrailingComma;
return array;
}
ts.createNodeArray = createNodeArray;
- function createSynthesizedNode(kind, startsOnNewLine) {
- var node = createNode(kind, undefined);
- node.startsOnNewLine = startsOnNewLine;
- return node;
- }
- ts.createSynthesizedNode = createSynthesizedNode;
- function createSynthesizedNodeArray(elements) {
- return createNodeArray(elements, undefined);
- }
- ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
function getSynthesizedClone(node) {
- var clone = createNode(node.kind, undefined, node.flags);
+ var clone = createSynthesizedNode(node.kind);
+ clone.flags |= node.flags;
setOriginalNode(clone, node);
for (var key in node) {
if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) {
@@ -10626,50 +11837,48 @@ var ts;
return clone;
}
ts.getSynthesizedClone = getSynthesizedClone;
- function getMutableClone(node) {
- var clone = getSynthesizedClone(node);
- clone.pos = node.pos;
- clone.end = node.end;
- clone.parent = node.parent;
- return clone;
- }
- ts.getMutableClone = getMutableClone;
- function createLiteral(value, location) {
+ function createLiteral(value) {
if (typeof value === "number") {
- var node = createNode(8, location, undefined);
- node.text = value.toString();
- return node;
+ return createNumericLiteral(value + "");
}
- else if (typeof value === "boolean") {
- return createNode(value ? 100 : 85, location, undefined);
+ if (typeof value === "boolean") {
+ return value ? createTrue() : createFalse();
}
- else if (typeof value === "string") {
- var node = createNode(9, location, undefined);
- node.text = value;
- return node;
- }
- else if (value) {
- var node = createNode(9, location, undefined);
- node.textSourceNode = value;
- node.text = value.text;
- return node;
+ if (typeof value === "string") {
+ return createStringLiteral(value);
}
+ return createLiteralFromNode(value);
}
ts.createLiteral = createLiteral;
- var nextAutoGenerateId = 0;
- function createIdentifier(text, location) {
- var node = createNode(70, location);
+ function createNumericLiteral(value) {
+ var node = createSynthesizedNode(8);
+ node.text = value;
+ node.numericLiteralFlags = 0;
+ return node;
+ }
+ ts.createNumericLiteral = createNumericLiteral;
+ function createStringLiteral(text) {
+ var node = createSynthesizedNode(9);
+ node.text = text;
+ return node;
+ }
+ function createLiteralFromNode(sourceNode) {
+ var node = createStringLiteral(sourceNode.text);
+ node.textSourceNode = sourceNode;
+ return node;
+ }
+ function createIdentifier(text) {
+ var node = createSynthesizedNode(70);
node.text = ts.escapeIdentifier(text);
- node.originalKeywordKind = ts.stringToToken(text);
+ node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
return node;
}
ts.createIdentifier = createIdentifier;
- function createTempVariable(recordTempVariable, location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ var nextAutoGenerateId = 0;
+ function createTempVariable(recordTempVariable) {
+ var name = createIdentifier("");
name.autoGenerateKind = 1;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
@@ -10679,93 +11888,387 @@ var ts;
return name;
}
ts.createTempVariable = createTempVariable;
- function createLoopVariable(location) {
- var name = createNode(70, location);
- name.text = "";
- name.originalKeywordKind = 0;
+ function createLoopVariable() {
+ var name = createIdentifier("");
name.autoGenerateKind = 2;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createLoopVariable = createLoopVariable;
- function createUniqueName(text, location) {
- var name = createNode(70, location);
- name.text = text;
- name.originalKeywordKind = 0;
+ function createUniqueName(text) {
+ var name = createIdentifier(text);
name.autoGenerateKind = 3;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createUniqueName = createUniqueName;
- function getGeneratedNameForNode(node, location) {
- var name = createNode(70, location);
- name.original = node;
- name.text = "";
- name.originalKeywordKind = 0;
+ function getGeneratedNameForNode(node) {
+ var name = createIdentifier("");
name.autoGenerateKind = 4;
name.autoGenerateId = nextAutoGenerateId;
+ name.original = node;
nextAutoGenerateId++;
return name;
}
ts.getGeneratedNameForNode = getGeneratedNameForNode;
function createToken(token) {
- return createNode(token);
+ return createSynthesizedNode(token);
}
ts.createToken = createToken;
function createSuper() {
- var node = createNode(96);
- return node;
+ return createSynthesizedNode(96);
}
ts.createSuper = createSuper;
- function createThis(location) {
- var node = createNode(98, location);
- return node;
+ function createThis() {
+ return createSynthesizedNode(98);
}
ts.createThis = createThis;
function createNull() {
- var node = createNode(94);
- return node;
+ return createSynthesizedNode(94);
}
ts.createNull = createNull;
- function createComputedPropertyName(expression, location) {
- var node = createNode(142, location);
+ function createTrue() {
+ return createSynthesizedNode(100);
+ }
+ ts.createTrue = createTrue;
+ function createFalse() {
+ return createSynthesizedNode(85);
+ }
+ ts.createFalse = createFalse;
+ function createQualifiedName(left, right) {
+ var node = createSynthesizedNode(142);
+ node.left = left;
+ node.right = asName(right);
+ return node;
+ }
+ ts.createQualifiedName = createQualifiedName;
+ function updateQualifiedName(node, left, right) {
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createQualifiedName(left, right), node)
+ : node;
+ }
+ ts.updateQualifiedName = updateQualifiedName;
+ function createComputedPropertyName(expression) {
+ var node = createSynthesizedNode(143);
node.expression = expression;
return node;
}
ts.createComputedPropertyName = createComputedPropertyName;
function updateComputedPropertyName(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createComputedPropertyName(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createComputedPropertyName(expression), node)
+ : node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer, location, flags) {
- var node = createNode(144, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var signatureDeclaration = createSynthesizedNode(kind);
+ signatureDeclaration.typeParameters = asNodeArray(typeParameters);
+ signatureDeclaration.parameters = asNodeArray(parameters);
+ signatureDeclaration.type = type;
+ return signatureDeclaration;
+ }
+ ts.createSignatureDeclaration = createSignatureDeclaration;
+ function updateSignatureDeclaration(node, typeParameters, parameters, type) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ ? updateNode(createSignatureDeclaration(node.kind, typeParameters, parameters, type), node)
+ : node;
+ }
+ function createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(159, typeParameters, parameters, type);
+ }
+ ts.createFunctionTypeNode = createFunctionTypeNode;
+ function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateFunctionTypeNode = updateFunctionTypeNode;
+ function createConstructorTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(154, typeParameters, parameters, type);
+ }
+ ts.createCallSignatureDeclaration = createCallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var methodSignature = createSignatureDeclaration(149, typeParameters, parameters, type);
+ methodSignature.name = asName(name);
+ methodSignature.questionToken = questionToken;
+ return methodSignature;
+ }
+ ts.createMethodSignature = createMethodSignature;
+ function updateMethodSignature(node, typeParameters, parameters, type, name, questionToken) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.name !== name
+ || node.questionToken !== questionToken
+ ? updateNode(createMethodSignature(typeParameters, parameters, type, name, questionToken), node)
+ : node;
+ }
+ ts.updateMethodSignature = updateMethodSignature;
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createThisTypeNode() {
+ return createSynthesizedNode(168);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createLiteralTypeNode(literal) {
+ var literalTypeNode = createSynthesizedNode(172);
+ literalTypeNode.literal = literal;
+ return literalTypeNode;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
+ function createTypeReferenceNode(typeName, typeArguments) {
+ var typeReference = createSynthesizedNode(158);
+ typeReference.typeName = asName(typeName);
+ typeReference.typeArguments = asNodeArray(typeArguments);
+ return typeReference;
+ }
+ ts.createTypeReferenceNode = createTypeReferenceNode;
+ function updateTypeReferenceNode(node, typeName, typeArguments) {
+ return node.typeName !== typeName
+ || node.typeArguments !== typeArguments
+ ? updateNode(createTypeReferenceNode(typeName, typeArguments), node)
+ : node;
+ }
+ ts.updateTypeReferenceNode = updateTypeReferenceNode;
+ function createTypePredicateNode(parameterName, type) {
+ var typePredicateNode = createSynthesizedNode(157);
+ typePredicateNode.parameterName = asName(parameterName);
+ typePredicateNode.type = type;
+ return typePredicateNode;
+ }
+ ts.createTypePredicateNode = createTypePredicateNode;
+ function updateTypePredicateNode(node, parameterName, type) {
+ return node.parameterName !== parameterName
+ || node.type !== type
+ ? updateNode(createTypePredicateNode(parameterName, type), node)
+ : node;
+ }
+ ts.updateTypePredicateNode = updateTypePredicateNode;
+ function createTypeQueryNode(exprName) {
+ var typeQueryNode = createSynthesizedNode(161);
+ typeQueryNode.exprName = exprName;
+ return typeQueryNode;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName ? updateNode(createTypeQueryNode(exprName), node) : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createArrayTypeNode(elementType) {
+ var arrayTypeNode = createSynthesizedNode(163);
+ arrayTypeNode.elementType = elementType;
+ return arrayTypeNode;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var unionTypeNode = createSynthesizedNode(kind);
+ unionTypeNode.types = createNodeArray(types);
+ return unionTypeNode;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members) {
+ var typeLiteralNode = createSynthesizedNode(162);
+ typeLiteralNode.members = createNodeArray(members);
+ return typeLiteralNode;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createTupleTypeNode(elementTypes) {
+ var tupleTypeNode = createSynthesizedNode(164);
+ tupleTypeNode.elementTypes = createNodeArray(elementTypes);
+ return tupleTypeNode;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var mappedTypeNode = createSynthesizedNode(171);
+ mappedTypeNode.readonlyToken = readonlyToken;
+ mappedTypeNode.typeParameter = typeParameter;
+ mappedTypeNode.questionToken = questionToken;
+ mappedTypeNode.type = type;
+ return mappedTypeNode;
+ }
+ ts.createMappedTypeNode = createMappedTypeNode;
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, questionToken, type) {
+ return node.readonlyToken !== readonlyToken
+ || node.typeParameter !== typeParameter
+ || node.questionToken !== questionToken
+ || node.type !== type
+ ? updateNode(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node)
+ : node;
+ }
+ ts.updateMappedTypeNode = updateMappedTypeNode;
+ function createTypeOperatorNode(type) {
+ var typeOperatorNode = createSynthesizedNode(169);
+ typeOperatorNode.operator = 126;
+ typeOperatorNode.type = type;
+ return typeOperatorNode;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var indexedAccessTypeNode = createSynthesizedNode(170);
+ indexedAccessTypeNode.objectType = objectType;
+ indexedAccessTypeNode.indexType = indexType;
+ return indexedAccessTypeNode;
+ }
+ ts.createIndexedAccessTypeNode = createIndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node, objectType, indexType) {
+ return node.objectType !== objectType
+ || node.indexType !== indexType
+ ? updateNode(createIndexedAccessTypeNode(objectType, indexType), node)
+ : node;
+ }
+ ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name, constraint, defaultType) {
+ var typeParameter = createSynthesizedNode(144);
+ typeParameter.name = asName(name);
+ typeParameter.constraint = constraint;
+ typeParameter.default = defaultType;
+ return typeParameter;
+ }
+ ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
+ return node.name !== name
+ || node.constraint !== constraint
+ || node.default !== defaultType
+ ? updateNode(createTypeParameterDeclaration(name, constraint, defaultType), node)
+ : node;
+ }
+ ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
+ function createPropertySignature(name, questionToken, type, initializer) {
+ var propertySignature = createSynthesizedNode(147);
+ propertySignature.name = asName(name);
+ propertySignature.questionToken = questionToken;
+ propertySignature.type = type;
+ propertySignature.initializer = initializer;
+ return propertySignature;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, name, questionToken, type, initializer) {
+ return node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
+ function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) {
+ var indexSignature = createSynthesizedNode(156);
+ indexSignature.decorators = asNodeArray(decorators);
+ indexSignature.modifiers = asNodeArray(modifiers);
+ indexSignature.parameters = createNodeArray(parameters);
+ indexSignature.type = type;
+ return indexSignature;
+ }
+ ts.createIndexSignatureDeclaration = createIndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignatureDeclaration(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration;
+ function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(145);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
- node.initializer = initializer ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createParameter = createParameter;
- function updateParameter(node, decorators, modifiers, dotDotDotToken, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer, node, node.flags), node);
- }
- return node;
+ function updateParameter(node, decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateParameter = updateParameter;
- function createProperty(decorators, modifiers, name, questionToken, type, initializer, location) {
- var node = createNode(147, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createDecorator(expression) {
+ var node = createSynthesizedNode(146);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createDecorator = createDecorator;
+ function updateDecorator(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createDecorator(expression), node)
+ : node;
+ }
+ ts.updateDecorator = updateDecorator;
+ function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
node.initializer = initializer;
@@ -10773,36 +12276,46 @@ var ts;
}
ts.createProperty = createProperty;
function updateProperty(node, decorators, modifiers, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateProperty = updateProperty;
- function createMethod(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(149, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(150);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
- ts.createMethod = createMethod;
- function updateMethod(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createMethod(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ ts.createMethodDeclaration = createMethodDeclaration;
+ function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateMethod = updateMethod;
- function createConstructor(decorators, modifiers, parameters, body, location, flags) {
- var node = createNode(150, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createConstructor(decorators, modifiers, parameters, body) {
+ var node = createSynthesizedNode(151);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = undefined;
@@ -10811,17 +12324,19 @@ var ts;
}
ts.createConstructor = createConstructor;
function updateConstructor(node, decorators, modifiers, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body) {
- return updateNode(createConstructor(decorators, modifiers, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createConstructor(decorators, modifiers, parameters, body), node)
+ : node;
}
ts.updateConstructor = updateConstructor;
- function createGetAccessor(decorators, modifiers, name, parameters, type, body, location, flags) {
- var node = createNode(151, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createGetAccessor(decorators, modifiers, name, parameters, type, body) {
+ var node = createSynthesizedNode(152);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = type;
@@ -10830,17 +12345,21 @@ var ts;
}
ts.createGetAccessor = createGetAccessor;
function updateGetAccessor(node, decorators, modifiers, name, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body), node)
+ : node;
}
ts.updateGetAccessor = updateGetAccessor;
- function createSetAccessor(decorators, modifiers, name, parameters, body, location, flags) {
- var node = createNode(152, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createSetAccessor(decorators, modifiers, name, parameters, body) {
+ var node = createSynthesizedNode(153);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.body = body;
@@ -10848,57 +12367,60 @@ var ts;
}
ts.createSetAccessor = createSetAccessor;
function updateSetAccessor(node, decorators, modifiers, name, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body) {
- return updateNode(createSetAccessor(decorators, modifiers, name, parameters, body, node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createSetAccessor(decorators, modifiers, name, parameters, body), node)
+ : node;
}
ts.updateSetAccessor = updateSetAccessor;
- function createObjectBindingPattern(elements, location) {
- var node = createNode(172, location);
+ function createObjectBindingPattern(elements) {
+ var node = createSynthesizedNode(173);
node.elements = createNodeArray(elements);
return node;
}
ts.createObjectBindingPattern = createObjectBindingPattern;
function updateObjectBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createObjectBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createObjectBindingPattern(elements), node)
+ : node;
}
ts.updateObjectBindingPattern = updateObjectBindingPattern;
- function createArrayBindingPattern(elements, location) {
- var node = createNode(173, location);
+ function createArrayBindingPattern(elements) {
+ var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
return node;
}
ts.createArrayBindingPattern = createArrayBindingPattern;
function updateArrayBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayBindingPattern(elements), node)
+ : node;
}
ts.updateArrayBindingPattern = updateArrayBindingPattern;
- function createBindingElement(propertyName, dotDotDotToken, name, initializer, location) {
- var node = createNode(174, location);
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+ var node = createSynthesizedNode(175);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
node.initializer = initializer;
return node;
}
ts.createBindingElement = createBindingElement;
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
- if (node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer) {
- return updateNode(createBindingElement(propertyName, dotDotDotToken, name, initializer, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createBindingElement(dotDotDotToken, propertyName, name, initializer), node)
+ : node;
}
ts.updateBindingElement = updateBindingElement;
- function createArrayLiteral(elements, location, multiLine) {
- var node = createNode(175, location);
- node.elements = parenthesizeListElements(createNodeArray(elements));
+ function createArrayLiteral(elements, multiLine) {
+ var node = createSynthesizedNode(176);
+ node.elements = ts.parenthesizeListElements(createNodeArray(elements));
if (multiLine) {
node.multiLine = true;
}
@@ -10906,14 +12428,13 @@ var ts;
}
ts.createArrayLiteral = createArrayLiteral;
function updateArrayLiteral(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayLiteral(elements, node, node.multiLine), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayLiteral(elements, node.multiLine), node)
+ : node;
}
ts.updateArrayLiteral = updateArrayLiteral;
- function createObjectLiteral(properties, location, multiLine) {
- var node = createNode(176, location);
+ function createObjectLiteral(properties, multiLine) {
+ var node = createSynthesizedNode(177);
node.properties = createNodeArray(properties);
if (multiLine) {
node.multiLine = true;
@@ -10922,431 +12443,461 @@ var ts;
}
ts.createObjectLiteral = createObjectLiteral;
function updateObjectLiteral(node, properties) {
- if (node.properties !== properties) {
- return updateNode(createObjectLiteral(properties, node, node.multiLine), node);
- }
- return node;
+ return node.properties !== properties
+ ? updateNode(createObjectLiteral(properties, node.multiLine), node)
+ : node;
}
ts.updateObjectLiteral = updateObjectLiteral;
- function createPropertyAccess(expression, name, location, flags) {
- var node = createNode(177, location, flags);
- node.expression = parenthesizeForAccess(expression);
- (node.emitNode || (node.emitNode = {})).flags |= 65536;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAccess(expression, name) {
+ var node = createSynthesizedNode(178);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.name = asName(name);
+ setEmitFlags(node, 65536);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
function updatePropertyAccess(node, expression, name) {
- if (node.expression !== expression || node.name !== name) {
- var propertyAccess = createPropertyAccess(expression, name, node, node.flags);
- (propertyAccess.emitNode || (propertyAccess.emitNode = {})).flags = getEmitFlags(node);
- return updateNode(propertyAccess, node);
- }
- return node;
+ return node.expression !== expression
+ || node.name !== name
+ ? updateNode(setEmitFlags(createPropertyAccess(expression, name), getEmitFlags(node)), node)
+ : node;
}
ts.updatePropertyAccess = updatePropertyAccess;
- function createElementAccess(expression, index, location) {
- var node = createNode(178, location);
- node.expression = parenthesizeForAccess(expression);
- node.argumentExpression = typeof index === "number" ? createLiteral(index) : index;
+ function createElementAccess(expression, index) {
+ var node = createSynthesizedNode(179);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.argumentExpression = asExpression(index);
return node;
}
ts.createElementAccess = createElementAccess;
function updateElementAccess(node, expression, argumentExpression) {
- if (node.expression !== expression || node.argumentExpression !== argumentExpression) {
- return updateNode(createElementAccess(expression, argumentExpression, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.argumentExpression !== argumentExpression
+ ? updateNode(createElementAccess(expression, argumentExpression), node)
+ : node;
}
ts.updateElementAccess = updateElementAccess;
- function createCall(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(179, location, flags);
- node.expression = parenthesizeForAccess(expression);
- if (typeArguments) {
- node.typeArguments = createNodeArray(typeArguments);
- }
- node.arguments = parenthesizeListElements(createNodeArray(argumentsArray));
+ function createCall(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(180);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray));
return node;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- if (expression !== node.expression || typeArguments !== node.typeArguments || argumentsArray !== node.arguments) {
- return updateNode(createCall(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return expression !== node.expression
+ || typeArguments !== node.typeArguments
+ || argumentsArray !== node.arguments
+ ? updateNode(createCall(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateCall = updateCall;
- function createNew(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(180, location, flags);
- node.expression = parenthesizeForNew(expression);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.arguments = argumentsArray ? parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
+ function createNew(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(181);
+ node.expression = ts.parenthesizeForNew(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
return node;
}
ts.createNew = createNew;
function updateNew(node, expression, typeArguments, argumentsArray) {
- if (node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray) {
- return updateNode(createNew(expression, typeArguments, argumentsArray, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
+ ? updateNode(createNew(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateNew = updateNew;
- function createTaggedTemplate(tag, template, location) {
- var node = createNode(181, location);
- node.tag = parenthesizeForAccess(tag);
+ function createTaggedTemplate(tag, template) {
+ var node = createSynthesizedNode(182);
+ node.tag = ts.parenthesizeForAccess(tag);
node.template = template;
return node;
}
ts.createTaggedTemplate = createTaggedTemplate;
function updateTaggedTemplate(node, tag, template) {
- if (node.tag !== tag || node.template !== template) {
- return updateNode(createTaggedTemplate(tag, template, node), node);
- }
- return node;
+ return node.tag !== tag
+ || node.template !== template
+ ? updateNode(createTaggedTemplate(tag, template), node)
+ : node;
}
ts.updateTaggedTemplate = updateTaggedTemplate;
- function createParen(expression, location) {
- var node = createNode(183, location);
+ function createTypeAssertion(type, expression) {
+ var node = createSynthesizedNode(183);
+ node.type = type;
+ node.expression = ts.parenthesizePrefixOperand(expression);
+ return node;
+ }
+ ts.createTypeAssertion = createTypeAssertion;
+ function updateTypeAssertion(node, type, expression) {
+ return node.type !== type
+ || node.expression !== expression
+ ? updateNode(createTypeAssertion(type, expression), node)
+ : node;
+ }
+ ts.updateTypeAssertion = updateTypeAssertion;
+ function createParen(expression) {
+ var node = createSynthesizedNode(184);
node.expression = expression;
return node;
}
ts.createParen = createParen;
function updateParen(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createParen(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createParen(expression), node)
+ : node;
}
ts.updateParen = updateParen;
- function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(184, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(185);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionExpression = createFunctionExpression;
- function updateFunctionExpression(node, modifiers, name, typeParameters, parameters, type, body) {
- if (node.name !== name || node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionExpression(modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.name !== name
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionExpression = updateFunctionExpression;
- function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body, location, flags) {
- var node = createNode(185, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+ var node = createSynthesizedNode(186);
+ node.modifiers = asNodeArray(modifiers);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35);
- node.body = parenthesizeConciseBody(body);
+ node.body = ts.parenthesizeConciseBody(body);
return node;
}
ts.createArrowFunction = createArrowFunction;
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, body) {
- if (node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body), node)
+ : node;
}
ts.updateArrowFunction = updateArrowFunction;
- function createDelete(expression, location) {
- var node = createNode(186, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createDelete(expression) {
+ var node = createSynthesizedNode(187);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createDelete = createDelete;
function updateDelete(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createDelete(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createDelete(expression), node)
+ : node;
}
ts.updateDelete = updateDelete;
- function createTypeOf(expression, location) {
- var node = createNode(187, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createTypeOf(expression) {
+ var node = createSynthesizedNode(188);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createTypeOf = createTypeOf;
function updateTypeOf(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createTypeOf(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createTypeOf(expression), node)
+ : node;
}
ts.updateTypeOf = updateTypeOf;
- function createVoid(expression, location) {
- var node = createNode(188, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createVoid(expression) {
+ var node = createSynthesizedNode(189);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createVoid = createVoid;
function updateVoid(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createVoid(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createVoid(expression), node)
+ : node;
}
ts.updateVoid = updateVoid;
- function createAwait(expression, location) {
- var node = createNode(189, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createAwait(expression) {
+ var node = createSynthesizedNode(190);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createAwait = createAwait;
function updateAwait(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createAwait(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createAwait(expression), node)
+ : node;
}
ts.updateAwait = updateAwait;
- function createPrefix(operator, operand, location) {
- var node = createNode(190, location);
+ function createPrefix(operator, operand) {
+ var node = createSynthesizedNode(191);
node.operator = operator;
- node.operand = parenthesizePrefixOperand(operand);
+ node.operand = ts.parenthesizePrefixOperand(operand);
return node;
}
ts.createPrefix = createPrefix;
function updatePrefix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPrefix(node.operator, operand, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPrefix(node.operator, operand), node)
+ : node;
}
ts.updatePrefix = updatePrefix;
- function createPostfix(operand, operator, location) {
- var node = createNode(191, location);
- node.operand = parenthesizePostfixOperand(operand);
+ function createPostfix(operand, operator) {
+ var node = createSynthesizedNode(192);
+ node.operand = ts.parenthesizePostfixOperand(operand);
node.operator = operator;
return node;
}
ts.createPostfix = createPostfix;
function updatePostfix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPostfix(operand, node.operator, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPostfix(operand, node.operator), node)
+ : node;
}
ts.updatePostfix = updatePostfix;
- function createBinary(left, operator, right, location) {
- var operatorToken = typeof operator === "number" ? createToken(operator) : operator;
+ function createBinary(left, operator, right) {
+ var node = createSynthesizedNode(193);
+ var operatorToken = asToken(operator);
var operatorKind = operatorToken.kind;
- var node = createNode(192, location);
- node.left = parenthesizeBinaryOperand(operatorKind, left, true, undefined);
+ node.left = ts.parenthesizeBinaryOperand(operatorKind, left, true, undefined);
node.operatorToken = operatorToken;
- node.right = parenthesizeBinaryOperand(operatorKind, right, false, node.left);
+ node.right = ts.parenthesizeBinaryOperand(operatorKind, right, false, node.left);
return node;
}
ts.createBinary = createBinary;
function updateBinary(node, left, right) {
- if (node.left !== left || node.right !== right) {
- return updateNode(createBinary(left, node.operatorToken, right, node), node);
- }
- return node;
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createBinary(left, node.operatorToken, right), node)
+ : node;
}
ts.updateBinary = updateBinary;
- function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonTokenOrLocation, whenFalse, location) {
- var node = createNode(193, whenFalse ? location : colonTokenOrLocation);
- node.condition = parenthesizeForConditionalHead(condition);
- if (whenFalse) {
- node.questionToken = questionTokenOrWhenTrue;
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- node.colonToken = colonTokenOrLocation;
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenFalse);
- }
- else {
- node.questionToken = createToken(54);
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(questionTokenOrWhenTrue);
- node.colonToken = createToken(55);
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- }
+ function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
+ var node = createSynthesizedNode(194);
+ node.condition = ts.parenthesizeForConditionalHead(condition);
+ node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54);
+ node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue);
+ node.colonToken = whenFalse ? colonToken : createToken(55);
+ node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse);
return node;
}
ts.createConditional = createConditional;
function updateConditional(node, condition, whenTrue, whenFalse) {
- if (node.condition !== condition || node.whenTrue !== whenTrue || node.whenFalse !== whenFalse) {
- return updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse, node), node);
- }
- return node;
+ return node.condition !== condition
+ || node.whenTrue !== whenTrue
+ || node.whenFalse !== whenFalse
+ ? updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse), node)
+ : node;
}
ts.updateConditional = updateConditional;
- function createTemplateExpression(head, templateSpans, location) {
- var node = createNode(194, location);
+ function createTemplateExpression(head, templateSpans) {
+ var node = createSynthesizedNode(195);
node.head = head;
node.templateSpans = createNodeArray(templateSpans);
return node;
}
ts.createTemplateExpression = createTemplateExpression;
function updateTemplateExpression(node, head, templateSpans) {
- if (node.head !== head || node.templateSpans !== templateSpans) {
- return updateNode(createTemplateExpression(head, templateSpans, node), node);
- }
- return node;
+ return node.head !== head
+ || node.templateSpans !== templateSpans
+ ? updateNode(createTemplateExpression(head, templateSpans), node)
+ : node;
}
ts.updateTemplateExpression = updateTemplateExpression;
- function createYield(asteriskToken, expression, location) {
- var node = createNode(195, location);
- node.asteriskToken = asteriskToken;
- node.expression = expression;
+ function createYield(asteriskTokenOrExpression, expression) {
+ var node = createSynthesizedNode(196);
+ node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 ? asteriskTokenOrExpression : undefined;
+ node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 ? asteriskTokenOrExpression : expression;
return node;
}
ts.createYield = createYield;
- function updateYield(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createYield(node.asteriskToken, expression, node), node);
- }
- return node;
+ function updateYield(node, asteriskToken, expression) {
+ return node.expression !== expression
+ || node.asteriskToken !== asteriskToken
+ ? updateNode(createYield(asteriskToken, expression), node)
+ : node;
}
ts.updateYield = updateYield;
- function createSpread(expression, location) {
- var node = createNode(196, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSpread(expression) {
+ var node = createSynthesizedNode(197);
+ node.expression = ts.parenthesizeExpressionForList(expression);
return node;
}
ts.createSpread = createSpread;
function updateSpread(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpread(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpread(expression), node)
+ : node;
}
ts.updateSpread = updateSpread;
- function createClassExpression(modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(197, location);
+ function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(198);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassExpression = createClassExpression;
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassExpression = updateClassExpression;
- function createOmittedExpression(location) {
- var node = createNode(198, location);
- return node;
+ function createOmittedExpression() {
+ return createSynthesizedNode(199);
}
ts.createOmittedExpression = createOmittedExpression;
- function createExpressionWithTypeArguments(typeArguments, expression, location) {
- var node = createNode(199, location);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.expression = parenthesizeForAccess(expression);
+ function createExpressionWithTypeArguments(typeArguments, expression) {
+ var node = createSynthesizedNode(200);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
return node;
}
ts.createExpressionWithTypeArguments = createExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node, typeArguments, expression) {
- if (node.typeArguments !== typeArguments || node.expression !== expression) {
- return updateNode(createExpressionWithTypeArguments(typeArguments, expression, node), node);
- }
- return node;
+ return node.typeArguments !== typeArguments
+ || node.expression !== expression
+ ? updateNode(createExpressionWithTypeArguments(typeArguments, expression), node)
+ : node;
}
ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments;
- function createTemplateSpan(expression, literal, location) {
- var node = createNode(202, location);
+ function createAsExpression(expression, type) {
+ var node = createSynthesizedNode(201);
+ node.expression = expression;
+ node.type = type;
+ return node;
+ }
+ ts.createAsExpression = createAsExpression;
+ function updateAsExpression(node, expression, type) {
+ return node.expression !== expression
+ || node.type !== type
+ ? updateNode(createAsExpression(expression, type), node)
+ : node;
+ }
+ ts.updateAsExpression = updateAsExpression;
+ function createNonNullExpression(expression) {
+ var node = createSynthesizedNode(202);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createNonNullExpression = createNonNullExpression;
+ function updateNonNullExpression(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createNonNullExpression(expression), node)
+ : node;
+ }
+ ts.updateNonNullExpression = updateNonNullExpression;
+ function createTemplateSpan(expression, literal) {
+ var node = createSynthesizedNode(204);
node.expression = expression;
node.literal = literal;
return node;
}
ts.createTemplateSpan = createTemplateSpan;
function updateTemplateSpan(node, expression, literal) {
- if (node.expression !== expression || node.literal !== literal) {
- return updateNode(createTemplateSpan(expression, literal, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.literal !== literal
+ ? updateNode(createTemplateSpan(expression, literal), node)
+ : node;
}
ts.updateTemplateSpan = updateTemplateSpan;
- function createBlock(statements, location, multiLine, flags) {
- var block = createNode(204, location, flags);
+ function createBlock(statements, multiLine) {
+ var block = createSynthesizedNode(206);
block.statements = createNodeArray(statements);
- if (multiLine) {
- block.multiLine = true;
- }
+ if (multiLine)
+ block.multiLine = multiLine;
return block;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- if (statements !== node.statements) {
- return updateNode(createBlock(statements, node, node.multiLine, node.flags), node);
- }
- return node;
+ return statements !== node.statements
+ ? updateNode(createBlock(statements, node.multiLine), node)
+ : node;
}
ts.updateBlock = updateBlock;
- function createVariableStatement(modifiers, declarationList, location, flags) {
- var node = createNode(205, location, flags);
+ function createVariableStatement(modifiers, declarationList) {
+ var node = createSynthesizedNode(207);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ node.modifiers = asNodeArray(modifiers);
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
return node;
}
ts.createVariableStatement = createVariableStatement;
function updateVariableStatement(node, modifiers, declarationList) {
- if (node.modifiers !== modifiers || node.declarationList !== declarationList) {
- return updateNode(createVariableStatement(modifiers, declarationList, node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.declarationList !== declarationList
+ ? updateNode(createVariableStatement(modifiers, declarationList), node)
+ : node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, location, flags) {
- var node = createNode(224, location, flags);
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(226);
+ node.flags |= flags;
node.declarations = createNodeArray(declarations);
return node;
}
ts.createVariableDeclarationList = createVariableDeclarationList;
function updateVariableDeclarationList(node, declarations) {
- if (node.declarations !== declarations) {
- return updateNode(createVariableDeclarationList(declarations, node, node.flags), node);
- }
- return node;
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
}
ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer, location, flags) {
- var node = createNode(223, location, flags);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(225);
+ node.name = asName(name);
node.type = type;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createVariableDeclaration = createVariableDeclaration;
function updateVariableDeclaration(node, name, type, initializer) {
- if (node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createVariableDeclaration(name, type, initializer, node, node.flags), node);
- }
- return node;
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
}
ts.updateVariableDeclaration = updateVariableDeclaration;
- function createEmptyStatement(location) {
- return createNode(206, location);
+ function createEmptyStatement() {
+ return createSynthesizedNode(208);
}
ts.createEmptyStatement = createEmptyStatement;
- function createStatement(expression, location, flags) {
- var node = createNode(207, location, flags);
- node.expression = parenthesizeExpressionForExpressionStatement(expression);
+ function createStatement(expression) {
+ var node = createSynthesizedNode(209);
+ node.expression = ts.parenthesizeExpressionForExpressionStatement(expression);
return node;
}
ts.createStatement = createStatement;
function updateStatement(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createStatement(expression, node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createStatement(expression), node)
+ : node;
}
ts.updateStatement = updateStatement;
- function createIf(expression, thenStatement, elseStatement, location) {
- var node = createNode(208, location);
+ function createIf(expression, thenStatement, elseStatement) {
+ var node = createSynthesizedNode(210);
node.expression = expression;
node.thenStatement = thenStatement;
node.elseStatement = elseStatement;
@@ -11354,42 +12905,43 @@ var ts;
}
ts.createIf = createIf;
function updateIf(node, expression, thenStatement, elseStatement) {
- if (node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement) {
- return updateNode(createIf(expression, thenStatement, elseStatement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.thenStatement !== thenStatement
+ || node.elseStatement !== elseStatement
+ ? updateNode(createIf(expression, thenStatement, elseStatement), node)
+ : node;
}
ts.updateIf = updateIf;
- function createDo(statement, expression, location) {
- var node = createNode(209, location);
+ function createDo(statement, expression) {
+ var node = createSynthesizedNode(211);
node.statement = statement;
node.expression = expression;
return node;
}
ts.createDo = createDo;
function updateDo(node, statement, expression) {
- if (node.statement !== statement || node.expression !== expression) {
- return updateNode(createDo(statement, expression, node), node);
- }
- return node;
+ return node.statement !== statement
+ || node.expression !== expression
+ ? updateNode(createDo(statement, expression), node)
+ : node;
}
ts.updateDo = updateDo;
- function createWhile(expression, statement, location) {
- var node = createNode(210, location);
+ function createWhile(expression, statement) {
+ var node = createSynthesizedNode(212);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWhile = createWhile;
function updateWhile(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWhile(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWhile(expression, statement), node)
+ : node;
}
ts.updateWhile = updateWhile;
- function createFor(initializer, condition, incrementor, statement, location) {
- var node = createNode(211, location, undefined);
+ function createFor(initializer, condition, incrementor, statement) {
+ var node = createSynthesizedNode(213);
node.initializer = initializer;
node.condition = condition;
node.incrementor = incrementor;
@@ -11398,14 +12950,16 @@ var ts;
}
ts.createFor = createFor;
function updateFor(node, initializer, condition, incrementor, statement) {
- if (node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement) {
- return updateNode(createFor(initializer, condition, incrementor, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.condition !== condition
+ || node.incrementor !== incrementor
+ || node.statement !== statement
+ ? updateNode(createFor(initializer, condition, incrementor, statement), node)
+ : node;
}
ts.updateFor = updateFor;
- function createForIn(initializer, expression, statement, location) {
- var node = createNode(212, location);
+ function createForIn(initializer, expression, statement) {
+ var node = createSynthesizedNode(214);
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
@@ -11413,127 +12967,123 @@ var ts;
}
ts.createForIn = createForIn;
function updateForIn(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForIn(initializer, expression, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForIn(initializer, expression, statement), node)
+ : node;
}
ts.updateForIn = updateForIn;
- function createForOf(initializer, expression, statement, location) {
- var node = createNode(213, location);
+ function createForOf(awaitModifier, initializer, expression, statement) {
+ var node = createSynthesizedNode(215);
+ node.awaitModifier = awaitModifier;
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
return node;
}
ts.createForOf = createForOf;
- function updateForOf(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForOf(initializer, expression, statement, node), node);
- }
- return node;
+ function updateForOf(node, awaitModifier, initializer, expression, statement) {
+ return node.awaitModifier !== awaitModifier
+ || node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForOf(awaitModifier, initializer, expression, statement), node)
+ : node;
}
ts.updateForOf = updateForOf;
- function createContinue(label, location) {
- var node = createNode(214, location);
- if (label) {
- node.label = label;
- }
+ function createContinue(label) {
+ var node = createSynthesizedNode(216);
+ node.label = asName(label);
return node;
}
ts.createContinue = createContinue;
function updateContinue(node, label) {
- if (node.label !== label) {
- return updateNode(createContinue(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createContinue(label), node)
+ : node;
}
ts.updateContinue = updateContinue;
- function createBreak(label, location) {
- var node = createNode(215, location);
- if (label) {
- node.label = label;
- }
+ function createBreak(label) {
+ var node = createSynthesizedNode(217);
+ node.label = asName(label);
return node;
}
ts.createBreak = createBreak;
function updateBreak(node, label) {
- if (node.label !== label) {
- return updateNode(createBreak(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createBreak(label), node)
+ : node;
}
ts.updateBreak = updateBreak;
- function createReturn(expression, location) {
- var node = createNode(216, location);
+ function createReturn(expression) {
+ var node = createSynthesizedNode(218);
node.expression = expression;
return node;
}
ts.createReturn = createReturn;
function updateReturn(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createReturn(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createReturn(expression), node)
+ : node;
}
ts.updateReturn = updateReturn;
- function createWith(expression, statement, location) {
- var node = createNode(217, location);
+ function createWith(expression, statement) {
+ var node = createSynthesizedNode(219);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWith = createWith;
function updateWith(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWith(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWith(expression, statement), node)
+ : node;
}
ts.updateWith = updateWith;
- function createSwitch(expression, caseBlock, location) {
- var node = createNode(218, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSwitch(expression, caseBlock) {
+ var node = createSynthesizedNode(220);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.caseBlock = caseBlock;
return node;
}
ts.createSwitch = createSwitch;
function updateSwitch(node, expression, caseBlock) {
- if (node.expression !== expression || node.caseBlock !== caseBlock) {
- return updateNode(createSwitch(expression, caseBlock, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.caseBlock !== caseBlock
+ ? updateNode(createSwitch(expression, caseBlock), node)
+ : node;
}
ts.updateSwitch = updateSwitch;
- function createLabel(label, statement, location) {
- var node = createNode(219, location);
- node.label = typeof label === "string" ? createIdentifier(label) : label;
+ function createLabel(label, statement) {
+ var node = createSynthesizedNode(221);
+ node.label = asName(label);
node.statement = statement;
return node;
}
ts.createLabel = createLabel;
function updateLabel(node, label, statement) {
- if (node.label !== label || node.statement !== statement) {
- return updateNode(createLabel(label, statement, node), node);
- }
- return node;
+ return node.label !== label
+ || node.statement !== statement
+ ? updateNode(createLabel(label, statement), node)
+ : node;
}
ts.updateLabel = updateLabel;
- function createThrow(expression, location) {
- var node = createNode(220, location);
+ function createThrow(expression) {
+ var node = createSynthesizedNode(222);
node.expression = expression;
return node;
}
ts.createThrow = createThrow;
function updateThrow(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createThrow(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createThrow(expression), node)
+ : node;
}
ts.updateThrow = updateThrow;
- function createTry(tryBlock, catchClause, finallyBlock, location) {
- var node = createNode(221, location);
+ function createTry(tryBlock, catchClause, finallyBlock) {
+ var node = createSynthesizedNode(223);
node.tryBlock = tryBlock;
node.catchClause = catchClause;
node.finallyBlock = finallyBlock;
@@ -11541,194 +13091,284 @@ var ts;
}
ts.createTry = createTry;
function updateTry(node, tryBlock, catchClause, finallyBlock) {
- if (node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock) {
- return updateNode(createTry(tryBlock, catchClause, finallyBlock, node), node);
- }
- return node;
+ return node.tryBlock !== tryBlock
+ || node.catchClause !== catchClause
+ || node.finallyBlock !== finallyBlock
+ ? updateNode(createTry(tryBlock, catchClause, finallyBlock), node)
+ : node;
}
ts.updateTry = updateTry;
- function createCaseBlock(clauses, location) {
- var node = createNode(232, location);
- node.clauses = createNodeArray(clauses);
- return node;
- }
- ts.createCaseBlock = createCaseBlock;
- function updateCaseBlock(node, clauses) {
- if (node.clauses !== clauses) {
- return updateNode(createCaseBlock(clauses, node), node);
- }
- return node;
- }
- ts.updateCaseBlock = updateCaseBlock;
- function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(225, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(227);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionDeclaration = createFunctionDeclaration;
- function updateFunctionDeclaration(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionDeclaration(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, node, node.flags), node);
- }
- return node;
+ function updateFunctionDeclaration(node, decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionDeclaration = updateFunctionDeclaration;
- function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(226, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(228);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassDeclaration = createClassDeclaration;
function updateClassDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassDeclaration = updateClassDeclaration;
- function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, location) {
- var node = createNode(235, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createEnumDeclaration(decorators, modifiers, name, members) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createEnumDeclaration = createEnumDeclaration;
+ function updateEnumDeclaration(node, decorators, modifiers, name, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.members !== members
+ ? updateNode(createEnumDeclaration(decorators, modifiers, name, members), node)
+ : node;
+ }
+ ts.updateEnumDeclaration = updateEnumDeclaration;
+ function createModuleDeclaration(decorators, modifiers, name, body, flags) {
+ var node = createSynthesizedNode(232);
+ node.flags |= flags;
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = name;
+ node.body = body;
+ return node;
+ }
+ ts.createModuleDeclaration = createModuleDeclaration;
+ function updateModuleDeclaration(node, decorators, modifiers, name, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.body !== body
+ ? updateNode(createModuleDeclaration(decorators, modifiers, name, body, node.flags), node)
+ : node;
+ }
+ ts.updateModuleDeclaration = updateModuleDeclaration;
+ function createModuleBlock(statements) {
+ var node = createSynthesizedNode(233);
+ node.statements = createNodeArray(statements);
+ return node;
+ }
+ ts.createModuleBlock = createModuleBlock;
+ function updateModuleBlock(node, statements) {
+ return node.statements !== statements
+ ? updateNode(createModuleBlock(statements), node)
+ : node;
+ }
+ ts.updateModuleBlock = updateModuleBlock;
+ function createCaseBlock(clauses) {
+ var node = createSynthesizedNode(234);
+ node.clauses = createNodeArray(clauses);
+ return node;
+ }
+ ts.createCaseBlock = createCaseBlock;
+ function updateCaseBlock(node, clauses) {
+ return node.clauses !== clauses
+ ? updateNode(createCaseBlock(clauses), node)
+ : node;
+ }
+ ts.updateCaseBlock = updateCaseBlock;
+ function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
+ var node = createSynthesizedNode(236);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.moduleReference = moduleReference;
+ return node;
+ }
+ ts.createImportEqualsDeclaration = createImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node, decorators, modifiers, name, moduleReference) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.moduleReference !== moduleReference
+ ? updateNode(createImportEqualsDeclaration(decorators, modifiers, name, moduleReference), node)
+ : node;
+ }
+ ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration;
+ function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
+ var node = createSynthesizedNode(237);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createImportDeclaration = createImportDeclaration;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+ : node;
}
ts.updateImportDeclaration = updateImportDeclaration;
- function createImportClause(name, namedBindings, location) {
- var node = createNode(236, location);
+ function createImportClause(name, namedBindings) {
+ var node = createSynthesizedNode(238);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
ts.createImportClause = createImportClause;
function updateImportClause(node, name, namedBindings) {
- if (node.name !== name || node.namedBindings !== namedBindings) {
- return updateNode(createImportClause(name, namedBindings, node), node);
- }
- return node;
+ return node.name !== name
+ || node.namedBindings !== namedBindings
+ ? updateNode(createImportClause(name, namedBindings), node)
+ : node;
}
ts.updateImportClause = updateImportClause;
- function createNamespaceImport(name, location) {
- var node = createNode(237, location);
+ function createNamespaceImport(name) {
+ var node = createSynthesizedNode(239);
node.name = name;
return node;
}
ts.createNamespaceImport = createNamespaceImport;
function updateNamespaceImport(node, name) {
- if (node.name !== name) {
- return updateNode(createNamespaceImport(name, node), node);
- }
- return node;
+ return node.name !== name
+ ? updateNode(createNamespaceImport(name), node)
+ : node;
}
ts.updateNamespaceImport = updateNamespaceImport;
- function createNamedImports(elements, location) {
- var node = createNode(238, location);
+ function createNamedImports(elements) {
+ var node = createSynthesizedNode(240);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedImports = createNamedImports;
function updateNamedImports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedImports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedImports(elements), node)
+ : node;
}
ts.updateNamedImports = updateNamedImports;
- function createImportSpecifier(propertyName, name, location) {
- var node = createNode(239, location);
+ function createImportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(241);
node.propertyName = propertyName;
node.name = name;
return node;
}
ts.createImportSpecifier = createImportSpecifier;
function updateImportSpecifier(node, propertyName, name) {
- if (node.propertyName !== propertyName || node.name !== name) {
- return updateNode(createImportSpecifier(propertyName, name, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createImportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateImportSpecifier = updateImportSpecifier;
- function createExportAssignment(decorators, modifiers, isExportEquals, expression, location) {
- var node = createNode(240, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
+ var node = createSynthesizedNode(242);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.isExportEquals = isExportEquals;
node.expression = expression;
return node;
}
ts.createExportAssignment = createExportAssignment;
function updateExportAssignment(node, decorators, modifiers, expression) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.expression !== expression) {
- return updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.expression !== expression
+ ? updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
+ : node;
}
ts.updateExportAssignment = updateExportAssignment;
- function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, location) {
- var node = createNode(241, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) {
+ var node = createSynthesizedNode(243);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.exportClause = exportClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createExportDeclaration = createExportDeclaration;
function updateExportDeclaration(node, decorators, modifiers, exportClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.exportClause !== exportClause
+ || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier), node)
+ : node;
}
ts.updateExportDeclaration = updateExportDeclaration;
- function createNamedExports(elements, location) {
- var node = createNode(242, location);
+ function createNamedExports(elements) {
+ var node = createSynthesizedNode(244);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedExports = createNamedExports;
function updateNamedExports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedExports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedExports(elements), node)
+ : node;
}
ts.updateNamedExports = updateNamedExports;
- function createExportSpecifier(name, propertyName, location) {
- var node = createNode(243, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createExportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(245);
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
return node;
}
ts.createExportSpecifier = createExportSpecifier;
- function updateExportSpecifier(node, name, propertyName) {
- if (node.name !== name || node.propertyName !== propertyName) {
- return updateNode(createExportSpecifier(name, propertyName, node), node);
- }
- return node;
+ function updateExportSpecifier(node, propertyName, name) {
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createExportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateExportSpecifier = updateExportSpecifier;
- function createJsxElement(openingElement, children, closingElement, location) {
- var node = createNode(246, location);
+ function createExternalModuleReference(expression) {
+ var node = createSynthesizedNode(247);
+ node.expression = expression;
+ return node;
+ }
+ ts.createExternalModuleReference = createExternalModuleReference;
+ function updateExternalModuleReference(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createExternalModuleReference(expression), node)
+ : node;
+ }
+ ts.updateExternalModuleReference = updateExternalModuleReference;
+ function createJsxElement(openingElement, children, closingElement) {
+ var node = createSynthesizedNode(248);
node.openingElement = openingElement;
node.children = createNodeArray(children);
node.closingElement = closingElement;
@@ -11736,95 +13376,107 @@ var ts;
}
ts.createJsxElement = createJsxElement;
function updateJsxElement(node, openingElement, children, closingElement) {
- if (node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement) {
- return updateNode(createJsxElement(openingElement, children, closingElement, node), node);
- }
- return node;
+ return node.openingElement !== openingElement
+ || node.children !== children
+ || node.closingElement !== closingElement
+ ? updateNode(createJsxElement(openingElement, children, closingElement), node)
+ : node;
}
ts.updateJsxElement = updateJsxElement;
- function createJsxSelfClosingElement(tagName, attributes, location) {
- var node = createNode(247, location);
+ function createJsxSelfClosingElement(tagName, attributes) {
+ var node = createSynthesizedNode(249);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxSelfClosingElement = createJsxSelfClosingElement;
function updateJsxSelfClosingElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxSelfClosingElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxSelfClosingElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement;
- function createJsxOpeningElement(tagName, attributes, location) {
- var node = createNode(248, location);
+ function createJsxOpeningElement(tagName, attributes) {
+ var node = createSynthesizedNode(250);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxOpeningElement = createJsxOpeningElement;
function updateJsxOpeningElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxOpeningElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxOpeningElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxOpeningElement = updateJsxOpeningElement;
- function createJsxClosingElement(tagName, location) {
- var node = createNode(249, location);
+ function createJsxClosingElement(tagName) {
+ var node = createSynthesizedNode(251);
node.tagName = tagName;
return node;
}
ts.createJsxClosingElement = createJsxClosingElement;
function updateJsxClosingElement(node, tagName) {
- if (node.tagName !== tagName) {
- return updateNode(createJsxClosingElement(tagName, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ ? updateNode(createJsxClosingElement(tagName), node)
+ : node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttribute(name, initializer, location) {
- var node = createNode(250, location);
+ function createJsxAttributes(properties) {
+ var jsxAttributes = createSynthesizedNode(253);
+ jsxAttributes.properties = createNodeArray(properties);
+ return jsxAttributes;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(jsxAttributes, properties) {
+ if (jsxAttributes.properties !== properties) {
+ return updateNode(createJsxAttributes(properties), jsxAttributes);
+ }
+ return jsxAttributes;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
+ function createJsxAttribute(name, initializer) {
+ var node = createSynthesizedNode(252);
node.name = name;
node.initializer = initializer;
return node;
}
ts.createJsxAttribute = createJsxAttribute;
function updateJsxAttribute(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createJsxAttribute(name, initializer, node), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createJsxAttribute(name, initializer), node)
+ : node;
}
ts.updateJsxAttribute = updateJsxAttribute;
- function createJsxSpreadAttribute(expression, location) {
- var node = createNode(251, location);
+ function createJsxSpreadAttribute(expression) {
+ var node = createSynthesizedNode(254);
node.expression = expression;
return node;
}
ts.createJsxSpreadAttribute = createJsxSpreadAttribute;
function updateJsxSpreadAttribute(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxSpreadAttribute(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxSpreadAttribute(expression), node)
+ : node;
}
ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute;
- function createJsxExpression(expression, location) {
- var node = createNode(252, location);
+ function createJsxExpression(dotDotDotToken, expression) {
+ var node = createSynthesizedNode(255);
+ node.dotDotDotToken = dotDotDotToken;
node.expression = expression;
return node;
}
ts.createJsxExpression = createJsxExpression;
function updateJsxExpression(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxExpression(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxExpression(node.dotDotDotToken, expression), node)
+ : node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types, location) {
- var node = createNode(255, location);
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(258);
node.token = token;
node.types = createNodeArray(types);
return node;
@@ -11832,40 +13484,40 @@ var ts;
ts.createHeritageClause = createHeritageClause;
function updateHeritageClause(node, types) {
if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types, node), node);
+ return updateNode(createHeritageClause(node.token, types), node);
}
return node;
}
ts.updateHeritageClause = updateHeritageClause;
- function createCaseClause(expression, statements, location) {
- var node = createNode(253, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createCaseClause(expression, statements) {
+ var node = createSynthesizedNode(256);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.statements = createNodeArray(statements);
return node;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements, node), node);
+ return updateNode(createCaseClause(expression, statements), node);
}
return node;
}
ts.updateCaseClause = updateCaseClause;
- function createDefaultClause(statements, location) {
- var node = createNode(254, location);
+ function createDefaultClause(statements) {
+ var node = createSynthesizedNode(257);
node.statements = createNodeArray(statements);
return node;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements, node), node);
+ return updateNode(createDefaultClause(statements), node);
}
return node;
}
ts.updateDefaultClause = updateDefaultClause;
- function createCatchClause(variableDeclaration, block, location) {
- var node = createNode(256, location);
+ function createCatchClause(variableDeclaration, block) {
+ var node = createSynthesizedNode(259);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
node.block = block;
return node;
@@ -11873,56 +13525,71 @@ var ts;
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block, node), node);
+ return updateNode(createCatchClause(variableDeclaration, block), node);
}
return node;
}
ts.updateCatchClause = updateCatchClause;
- function createPropertyAssignment(name, initializer, location) {
- var node = createNode(257, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAssignment(name, initializer) {
+ var node = createSynthesizedNode(260);
+ node.name = asName(name);
node.questionToken = undefined;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer, node), node);
+ return updateNode(createPropertyAssignment(name, initializer), node);
}
return node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
- function createShorthandPropertyAssignment(name, objectAssignmentInitializer, location) {
- var node = createNode(258, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
+ function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
+ var node = createSynthesizedNode(261);
+ node.name = asName(name);
+ node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
return node;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
- function createSpreadAssignment(expression, location) {
- var node = createNode(259, location);
- node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined;
- return node;
- }
- ts.createSpreadAssignment = createSpreadAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer, node), node);
+ return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
}
return node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
+ function createSpreadAssignment(expression) {
+ var node = createSynthesizedNode(262);
+ node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined;
+ return node;
+ }
+ ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression, node), node);
+ return updateNode(createSpreadAssignment(expression), node);
}
return node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
+ function createEnumMember(name, initializer) {
+ var node = createSynthesizedNode(263);
+ node.name = asName(name);
+ node.initializer = initializer && ts.parenthesizeExpressionForList(initializer);
+ return node;
+ }
+ ts.createEnumMember = createEnumMember;
+ function updateEnumMember(node, name, initializer) {
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createEnumMember(name, initializer), node)
+ : node;
+ }
+ ts.updateEnumMember = updateEnumMember;
function updateSourceFileNode(node, statements) {
if (node.statements !== statements) {
- var updated = createNode(261, node, node.flags);
+ var updated = createSynthesizedNode(264);
+ updated.flags |= node.flags;
updated.statements = createNodeArray(statements);
updated.endOfFileToken = node.endOfFileToken;
updated.fileName = node.fileName;
@@ -11981,56 +13648,73 @@ var ts;
return node;
}
ts.updateSourceFileNode = updateSourceFileNode;
+ function getMutableClone(node) {
+ var clone = getSynthesizedClone(node);
+ clone.pos = node.pos;
+ clone.end = node.end;
+ clone.parent = node.parent;
+ return clone;
+ }
+ ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createNode(293, original);
+ var node = createSynthesizedNode(294);
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createNode(296);
+ var node = createSynthesizedNode(297);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createNode(295);
+ var node = createSynthesizedNode(296);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
- function createPartiallyEmittedExpression(expression, original, location) {
- var node = createNode(294, location || original);
+ function createPartiallyEmittedExpression(expression, original) {
+ var node = createSynthesizedNode(295);
node.expression = expression;
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createPartiallyEmittedExpression = createPartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node, expression) {
if (node.expression !== expression) {
- return updateNode(createPartiallyEmittedExpression(expression, node.original, node), node);
+ return updateNode(createPartiallyEmittedExpression(expression, node.original), node);
}
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
- function createRawExpression(text) {
- var node = createNode(297);
- node.text = text;
+ function createBundle(sourceFiles) {
+ var node = ts.createNode(265);
+ node.sourceFiles = sourceFiles;
return node;
}
- ts.createRawExpression = createRawExpression;
+ ts.createBundle = createBundle;
+ function updateBundle(node, sourceFiles) {
+ if (node.sourceFiles !== sourceFiles) {
+ return createBundle(sourceFiles);
+ }
+ return node;
+ }
+ ts.updateBundle = updateBundle;
function createComma(left, right) {
return createBinary(left, 25, right);
}
ts.createComma = createComma;
- function createLessThan(left, right, location) {
- return createBinary(left, 26, right, location);
+ function createLessThan(left, right) {
+ return createBinary(left, 26, right);
}
ts.createLessThan = createLessThan;
- function createAssignment(left, right, location) {
- return createBinary(left, 57, right, location);
+ function createAssignment(left, right) {
+ return createBinary(left, 57, right);
}
ts.createAssignment = createAssignment;
function createStrictEquality(left, right) {
@@ -12049,8 +13733,8 @@ var ts;
return createBinary(left, 37, right);
}
ts.createSubtract = createSubtract;
- function createPostfixIncrement(operand, location) {
- return createPostfix(operand, 42, location);
+ function createPostfixIncrement(operand) {
+ return createPostfix(operand, 42);
}
ts.createPostfixIncrement = createPostfixIncrement;
function createLogicalAnd(left, right) {
@@ -12069,54 +13753,305 @@ var ts;
return createVoid(createLiteral(0));
}
ts.createVoidZero = createVoidZero;
+ function createExportDefault(expression) {
+ return createExportAssignment(undefined, undefined, false, expression);
+ }
+ ts.createExportDefault = createExportDefault;
+ function createExternalModuleExport(exportName) {
+ return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(undefined, exportName)]));
+ }
+ ts.createExternalModuleExport = createExternalModuleExport;
+ function asName(name) {
+ return typeof name === "string" ? createIdentifier(name) : name;
+ }
+ function asExpression(value) {
+ return typeof value === "string" || typeof value === "number" ? createLiteral(value) : value;
+ }
+ function asNodeArray(array) {
+ return array ? createNodeArray(array) : undefined;
+ }
+ function asToken(value) {
+ return typeof value === "number" ? createToken(value) : value;
+ }
+ function disposeEmitNodes(sourceFile) {
+ sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
+ var emitNode = sourceFile && sourceFile.emitNode;
+ var annotatedNodes = emitNode && emitNode.annotatedNodes;
+ if (annotatedNodes) {
+ for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
+ var node = annotatedNodes_1[_i];
+ node.emitNode = undefined;
+ }
+ }
+ }
+ ts.disposeEmitNodes = disposeEmitNodes;
+ function getOrCreateEmitNode(node) {
+ if (!node.emitNode) {
+ if (ts.isParseTreeNode(node)) {
+ if (node.kind === 264) {
+ return node.emitNode = { annotatedNodes: [node] };
+ }
+ var sourceFile = ts.getSourceFileOfNode(node);
+ getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
+ }
+ node.emitNode = {};
+ }
+ return node.emitNode;
+ }
+ ts.getOrCreateEmitNode = getOrCreateEmitNode;
+ function setTextRange(range, location) {
+ if (location) {
+ range.pos = location.pos;
+ range.end = location.end;
+ }
+ return range;
+ }
+ ts.setTextRange = setTextRange;
+ function getEmitFlags(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.flags;
+ }
+ ts.getEmitFlags = getEmitFlags;
+ function setEmitFlags(node, emitFlags) {
+ getOrCreateEmitNode(node).flags = emitFlags;
+ return node;
+ }
+ ts.setEmitFlags = setEmitFlags;
+ function getSourceMapRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.sourceMapRange) || node;
+ }
+ ts.getSourceMapRange = getSourceMapRange;
+ function setSourceMapRange(node, range) {
+ getOrCreateEmitNode(node).sourceMapRange = range;
+ return node;
+ }
+ ts.setSourceMapRange = setSourceMapRange;
+ function getTokenSourceMapRange(node, token) {
+ var emitNode = node.emitNode;
+ var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
+ return tokenSourceMapRanges && tokenSourceMapRanges[token];
+ }
+ ts.getTokenSourceMapRange = getTokenSourceMapRange;
+ function setTokenSourceMapRange(node, token, range) {
+ var emitNode = getOrCreateEmitNode(node);
+ var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = []);
+ tokenSourceMapRanges[token] = range;
+ return node;
+ }
+ ts.setTokenSourceMapRange = setTokenSourceMapRange;
+ function getCommentRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.commentRange) || node;
+ }
+ ts.getCommentRange = getCommentRange;
+ function setCommentRange(node, range) {
+ getOrCreateEmitNode(node).commentRange = range;
+ return node;
+ }
+ ts.setCommentRange = setCommentRange;
+ function getSyntheticLeadingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.leadingComments;
+ }
+ ts.getSyntheticLeadingComments = getSyntheticLeadingComments;
+ function setSyntheticLeadingComments(node, comments) {
+ getOrCreateEmitNode(node).leadingComments = comments;
+ return node;
+ }
+ ts.setSyntheticLeadingComments = setSyntheticLeadingComments;
+ function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticLeadingComments(node, ts.append(getSyntheticLeadingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticLeadingComment = addSyntheticLeadingComment;
+ function getSyntheticTrailingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.trailingComments;
+ }
+ ts.getSyntheticTrailingComments = getSyntheticTrailingComments;
+ function setSyntheticTrailingComments(node, comments) {
+ getOrCreateEmitNode(node).trailingComments = comments;
+ return node;
+ }
+ ts.setSyntheticTrailingComments = setSyntheticTrailingComments;
+ function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticTrailingComments(node, ts.append(getSyntheticTrailingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticTrailingComment = addSyntheticTrailingComment;
+ function getConstantValue(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.constantValue;
+ }
+ ts.getConstantValue = getConstantValue;
+ function setConstantValue(node, value) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.constantValue = value;
+ return node;
+ }
+ ts.setConstantValue = setConstantValue;
+ function addEmitHelper(node, helper) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ return node;
+ }
+ ts.addEmitHelper = addEmitHelper;
+ function addEmitHelpers(node, helpers) {
+ if (ts.some(helpers)) {
+ var emitNode = getOrCreateEmitNode(node);
+ for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
+ var helper = helpers_1[_i];
+ if (!ts.contains(emitNode.helpers, helper)) {
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ }
+ }
+ }
+ return node;
+ }
+ ts.addEmitHelpers = addEmitHelpers;
+ function removeEmitHelper(node, helper) {
+ var emitNode = node.emitNode;
+ if (emitNode) {
+ var helpers = emitNode.helpers;
+ if (helpers) {
+ return ts.orderedRemoveItem(helpers, helper);
+ }
+ }
+ return false;
+ }
+ ts.removeEmitHelper = removeEmitHelper;
+ function getEmitHelpers(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.helpers;
+ }
+ ts.getEmitHelpers = getEmitHelpers;
+ function moveEmitHelpers(source, target, predicate) {
+ var sourceEmitNode = source.emitNode;
+ var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
+ if (!ts.some(sourceEmitHelpers))
+ return;
+ var targetEmitNode = getOrCreateEmitNode(target);
+ var helpersRemoved = 0;
+ for (var i = 0; i < sourceEmitHelpers.length; i++) {
+ var helper = sourceEmitHelpers[i];
+ if (predicate(helper)) {
+ helpersRemoved++;
+ if (!ts.contains(targetEmitNode.helpers, helper)) {
+ targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
+ }
+ }
+ else if (helpersRemoved > 0) {
+ sourceEmitHelpers[i - helpersRemoved] = helper;
+ }
+ }
+ if (helpersRemoved > 0) {
+ sourceEmitHelpers.length -= helpersRemoved;
+ }
+ }
+ ts.moveEmitHelpers = moveEmitHelpers;
+ function compareEmitHelpers(x, y) {
+ if (x === y)
+ return 0;
+ if (x.priority === y.priority)
+ return 0;
+ if (x.priority === undefined)
+ return 1;
+ if (y.priority === undefined)
+ return -1;
+ return ts.compareValues(x.priority, y.priority);
+ }
+ ts.compareEmitHelpers = compareEmitHelpers;
+ function setOriginalNode(node, original) {
+ node.original = original;
+ if (original) {
+ var emitNode = original.emitNode;
+ if (emitNode)
+ node.emitNode = mergeEmitNode(emitNode, node.emitNode);
+ }
+ return node;
+ }
+ ts.setOriginalNode = setOriginalNode;
+ function mergeEmitNode(sourceEmitNode, destEmitNode) {
+ var flags = sourceEmitNode.flags, leadingComments = sourceEmitNode.leadingComments, trailingComments = sourceEmitNode.trailingComments, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
+ if (!destEmitNode)
+ destEmitNode = {};
+ if (leadingComments)
+ destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
+ if (trailingComments)
+ destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
+ if (flags)
+ destEmitNode.flags = flags;
+ if (commentRange)
+ destEmitNode.commentRange = commentRange;
+ if (sourceMapRange)
+ destEmitNode.sourceMapRange = sourceMapRange;
+ if (tokenSourceMapRanges)
+ destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
+ if (constantValue !== undefined)
+ destEmitNode.constantValue = constantValue;
+ if (helpers)
+ destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
+ return destEmitNode;
+ }
+ function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
+ if (!destRanges)
+ destRanges = [];
+ for (var key in sourceRanges) {
+ destRanges[key] = sourceRanges[key];
+ }
+ return destRanges;
+ }
+})(ts || (ts = {}));
+(function (ts) {
function createTypeCheck(value, tag) {
return tag === "undefined"
- ? createStrictEquality(value, createVoidZero())
- : createStrictEquality(createTypeOf(value), createLiteral(tag));
+ ? ts.createStrictEquality(value, ts.createVoidZero())
+ : ts.createStrictEquality(ts.createTypeOf(value), ts.createLiteral(tag));
}
ts.createTypeCheck = createTypeCheck;
function createMemberAccessForPropertyName(target, memberName, location) {
if (ts.isComputedPropertyName(memberName)) {
- return createElementAccess(target, memberName.expression, location);
+ return ts.setTextRange(ts.createElementAccess(target, memberName.expression), location);
}
else {
- var expression = ts.isIdentifier(memberName) ? createPropertyAccess(target, memberName, location) : createElementAccess(target, memberName, location);
- (expression.emitNode || (expression.emitNode = {})).flags |= 64;
+ var expression = ts.setTextRange(ts.isIdentifier(memberName)
+ ? ts.createPropertyAccess(target, memberName)
+ : ts.createElementAccess(target, memberName), memberName);
+ ts.getOrCreateEmitNode(expression).flags |= 64;
return expression;
}
}
ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName;
function createFunctionCall(func, thisArg, argumentsList, location) {
- return createCall(createPropertyAccess(func, "call"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"), undefined, [
thisArg
- ].concat(argumentsList), location);
+ ].concat(argumentsList)), location);
}
ts.createFunctionCall = createFunctionCall;
function createFunctionApply(func, thisArg, argumentsExpression, location) {
- return createCall(createPropertyAccess(func, "apply"), undefined, [
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "apply"), undefined, [
thisArg,
argumentsExpression
- ], location);
+ ]), location);
}
ts.createFunctionApply = createFunctionApply;
function createArraySlice(array, start) {
var argumentsList = [];
if (start !== undefined) {
- argumentsList.push(typeof start === "number" ? createLiteral(start) : start);
+ argumentsList.push(typeof start === "number" ? ts.createLiteral(start) : start);
}
- return createCall(createPropertyAccess(array, "slice"), undefined, argumentsList);
+ return ts.createCall(ts.createPropertyAccess(array, "slice"), undefined, argumentsList);
}
ts.createArraySlice = createArraySlice;
function createArrayConcat(array, values) {
- return createCall(createPropertyAccess(array, "concat"), undefined, values);
+ return ts.createCall(ts.createPropertyAccess(array, "concat"), undefined, values);
}
ts.createArrayConcat = createArrayConcat;
function createMathPow(left, right, location) {
- return createCall(createPropertyAccess(createIdentifier("Math"), "pow"), undefined, [left, right], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Math"), "pow"), undefined, [left, right]), location);
}
ts.createMathPow = createMathPow;
function createReactNamespace(reactNamespace, parent) {
- var react = createIdentifier(reactNamespace || "React");
+ var react = ts.createIdentifier(reactNamespace || "React");
react.flags &= ~8;
react.parent = ts.getParseTreeNode(parent);
return react;
@@ -12124,9 +14059,9 @@ var ts;
function createJsxFactoryExpressionFromEntityName(jsxFactory, parent) {
if (ts.isQualifiedName(jsxFactory)) {
var left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
- var right = createSynthesizedNode(70);
+ var right = ts.createIdentifier(jsxFactory.right.text);
right.text = jsxFactory.right.text;
- return createPropertyAccess(left, right);
+ return ts.createPropertyAccess(left, right);
}
else {
return createReactNamespace(jsxFactory.text, parent);
@@ -12135,7 +14070,7 @@ var ts;
function createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parent) {
return jsxFactoryEntity ?
createJsxFactoryExpressionFromEntityName(jsxFactoryEntity, parent) :
- createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
+ ts.createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
}
function createExpressionForJsxElement(jsxFactoryEntity, reactNamespace, tagName, props, children, parentElement, location) {
var argumentsList = [tagName];
@@ -12144,7 +14079,7 @@ var ts;
}
if (children && children.length > 0) {
if (!props) {
- argumentsList.push(createNull());
+ argumentsList.push(ts.createNull());
}
if (children.length > 1) {
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
@@ -12157,33 +14092,80 @@ var ts;
argumentsList.push(children[0]);
}
}
- return createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList, location);
+ return ts.setTextRange(ts.createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement), undefined, argumentsList), location);
}
ts.createExpressionForJsxElement = createExpressionForJsxElement;
- function createExportDefault(expression) {
- return createExportAssignment(undefined, undefined, false, expression);
- }
- ts.createExportDefault = createExportDefault;
- function createExternalModuleExport(exportName) {
- return createExportDeclaration(undefined, undefined, createNamedExports([createExportSpecifier(exportName)]));
+ function getHelperName(name) {
+ return ts.setEmitFlags(ts.createIdentifier(name), 4096 | 2);
}
- ts.createExternalModuleExport = createExternalModuleExport;
- function createLetStatement(name, initializer, location) {
- return createVariableStatement(undefined, createLetDeclarationList([createVariableDeclaration(name, undefined, initializer)]), location);
+ ts.getHelperName = getHelperName;
+ var valuesHelper = {
+ name: "typescript:values",
+ scoped: false,
+ text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n "
+ };
+ function createValuesHelper(context, expression, location) {
+ context.requestEmitHelper(valuesHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__values"), undefined, [expression]), location);
}
- ts.createLetStatement = createLetStatement;
- function createLetDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 1);
+ ts.createValuesHelper = createValuesHelper;
+ var readHelper = {
+ name: "typescript:read",
+ scoped: false,
+ text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n "
+ };
+ function createReadHelper(context, iteratorRecord, count, location) {
+ context.requestEmitHelper(readHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__read"), undefined, count !== undefined
+ ? [iteratorRecord, ts.createLiteral(count)]
+ : [iteratorRecord]), location);
+ }
+ ts.createReadHelper = createReadHelper;
+ var spreadHelper = {
+ name: "typescript:spread",
+ scoped: false,
+ text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"
+ };
+ function createSpreadHelper(context, argumentList, location) {
+ context.requestEmitHelper(readHelper);
+ context.requestEmitHelper(spreadHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__spread"), undefined, argumentList), location);
+ }
+ ts.createSpreadHelper = createSpreadHelper;
+ function createForOfBindingStatement(node, boundValue) {
+ if (ts.isVariableDeclarationList(node)) {
+ var firstDeclaration = ts.firstOrUndefined(node.declarations);
+ var updatedDeclaration = ts.updateVariableDeclaration(firstDeclaration, firstDeclaration.name, undefined, boundValue);
+ return ts.setTextRange(ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(node, [updatedDeclaration])), node);
+ }
+ else {
+ var updatedExpression = ts.setTextRange(ts.createAssignment(node, boundValue), node);
+ return ts.setTextRange(ts.createStatement(updatedExpression), node);
+ }
}
- ts.createLetDeclarationList = createLetDeclarationList;
- function createConstDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 2);
+ ts.createForOfBindingStatement = createForOfBindingStatement;
+ function insertLeadingStatement(dest, source) {
+ if (ts.isBlock(dest)) {
+ return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements));
+ }
+ else {
+ return ts.createBlock(ts.createNodeArray([dest, source]), true);
+ }
}
- ts.createConstDeclarationList = createConstDeclarationList;
- function getHelperName(name) {
- return setEmitFlags(createIdentifier(name), 4096 | 2);
+ ts.insertLeadingStatement = insertLeadingStatement;
+ function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {
+ if (!outermostLabeledStatement) {
+ return node;
+ }
+ var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221
+ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement)
+ : node);
+ if (afterRestoreLabelCallback) {
+ afterRestoreLabelCallback(outermostLabeledStatement);
+ }
+ return updated;
}
- ts.getHelperName = getHelperName;
+ ts.restoreEnclosingLabel = restoreEnclosingLabel;
function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
var target = skipParentheses(node);
switch (target.kind) {
@@ -12193,13 +14175,13 @@ var ts;
case 8:
case 9:
return false;
- case 175:
+ case 176:
var elements = target.elements;
if (elements.length === 0) {
return false;
}
return true;
- case 176:
+ case 177:
return target.properties.length > 0;
default:
return true;
@@ -12210,19 +14192,26 @@ var ts;
var thisArg;
var target;
if (ts.isSuperProperty(callee)) {
- thisArg = createThis();
+ thisArg = ts.createThis();
target = callee;
}
else if (callee.kind === 96) {
- thisArg = createThis();
- target = languageVersion < 2 ? createIdentifier("_super", callee) : callee;
+ thisArg = ts.createThis();
+ target = languageVersion < 2
+ ? ts.setTextRange(ts.createIdentifier("_super"), callee)
+ : callee;
+ }
+ else if (ts.getEmitFlags(callee) & 4096) {
+ thisArg = ts.createVoidZero();
+ target = parenthesizeForAccess(callee);
}
else {
switch (callee.kind) {
- case 177: {
+ case 178: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createPropertyAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.name, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12230,10 +14219,11 @@ var ts;
}
break;
}
- case 178: {
+ case 179: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
- thisArg = createTempVariable(recordTempVariable);
- target = createElementAccess(createAssignment(thisArg, callee.expression, callee.expression), callee.argumentExpression, callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12242,7 +14232,7 @@ var ts;
break;
}
default: {
- thisArg = createVoidZero();
+ thisArg = ts.createVoidZero();
target = parenthesizeForAccess(expression);
break;
}
@@ -12252,42 +14242,42 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, createComma);
+ return ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
if (ts.isQualifiedName(node)) {
var left = createExpressionFromEntityName(node.left);
- var right = getMutableClone(node.right);
- return createPropertyAccess(left, right, node);
+ var right = ts.getMutableClone(node.right);
+ return ts.setTextRange(ts.createPropertyAccess(left, right), node);
}
else {
- return getMutableClone(node);
+ return ts.getMutableClone(node);
}
}
ts.createExpressionFromEntityName = createExpressionFromEntityName;
function createExpressionForPropertyName(memberName) {
if (ts.isIdentifier(memberName)) {
- return createLiteral(memberName, undefined);
+ return ts.createLiteral(memberName);
}
else if (ts.isComputedPropertyName(memberName)) {
- return getMutableClone(memberName.expression);
+ return ts.getMutableClone(memberName.expression);
}
else {
- return getMutableClone(memberName);
+ return ts.getMutableClone(memberName);
}
}
ts.createExpressionForPropertyName = createExpressionForPropertyName;
function createExpressionForObjectLiteralElementLike(node, property, receiver) {
switch (property.kind) {
- case 151:
case 152:
+ case 153:
return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine);
- case 257:
+ case 260:
return createExpressionForPropertyAssignment(property, receiver);
- case 258:
+ case 261:
return createExpressionForShorthandPropertyAssignment(property, receiver);
- case 149:
+ case 150:
return createExpressionForMethodDeclaration(property, receiver);
}
}
@@ -12297,43 +14287,45 @@ var ts;
if (property === firstAccessor) {
var properties_1 = [];
if (getAccessor) {
- var getterFunction = createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body, getAccessor);
- setOriginalNode(getterFunction, getAccessor);
- var getter = createPropertyAssignment("get", getterFunction);
+ var getterFunction = ts.createFunctionExpression(getAccessor.modifiers, undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body);
+ ts.setTextRange(getterFunction, getAccessor);
+ ts.setOriginalNode(getterFunction, getAccessor);
+ var getter = ts.createPropertyAssignment("get", getterFunction);
properties_1.push(getter);
}
if (setAccessor) {
- var setterFunction = createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body, setAccessor);
- setOriginalNode(setterFunction, setAccessor);
- var setter = createPropertyAssignment("set", setterFunction);
+ var setterFunction = ts.createFunctionExpression(setAccessor.modifiers, undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body);
+ ts.setTextRange(setterFunction, setAccessor);
+ ts.setOriginalNode(setterFunction, setAccessor);
+ var setter = ts.createPropertyAssignment("set", setterFunction);
properties_1.push(setter);
}
- properties_1.push(createPropertyAssignment("enumerable", createLiteral(true)));
- properties_1.push(createPropertyAssignment("configurable", createLiteral(true)));
- var expression = createCall(createPropertyAccess(createIdentifier("Object"), "defineProperty"), undefined, [
+ properties_1.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
+ properties_1.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
+ var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
receiver,
createExpressionForPropertyName(property.name),
- createObjectLiteral(properties_1, undefined, multiLine)
- ], firstAccessor);
+ ts.createObjectLiteral(properties_1, multiLine)
+ ]), firstAccessor);
return ts.aggregateTransformFlags(expression);
}
return undefined;
}
function createExpressionForPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer, property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), property.initializer), property), property));
}
function createExpressionForShorthandPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), getSynthesizedClone(property.name), property), property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, property.name), ts.getSynthesizedClone(property.name)), property), property));
}
function createExpressionForMethodDeclaration(method, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), setOriginalNode(createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body, method), method), method), method));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, method.name, method.name), ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(method.modifiers, method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body), method), method)), method), method));
}
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
ts.getLocalName = getLocalName;
function isLocalName(node) {
- return (getEmitFlags(node) & 16384) !== 0;
+ return (ts.getEmitFlags(node) & 16384) !== 0;
}
ts.isLocalName = isLocalName;
function getExportName(node, allowComments, allowSourceMaps) {
@@ -12341,7 +14333,7 @@ var ts;
}
ts.getExportName = getExportName;
function isExportName(node) {
- return (getEmitFlags(node) & 8192) !== 0;
+ return (ts.getEmitFlags(node) & 8192) !== 0;
}
ts.isExportName = isExportName;
function getDeclarationName(node, allowComments, allowSourceMaps) {
@@ -12350,17 +14342,17 @@ var ts;
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name_10 = getMutableClone(node.name);
- emitFlags |= getEmitFlags(node.name);
+ var name = ts.getMutableClone(node.name);
+ emitFlags |= ts.getEmitFlags(node.name);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(name_10, emitFlags);
- return name_10;
+ ts.setEmitFlags(name, emitFlags);
+ return name;
}
- return getGeneratedNameForNode(node);
+ return ts.getGeneratedNameForNode(node);
}
function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {
if (ns && ts.hasModifier(node, 1)) {
@@ -12370,25 +14362,31 @@ var ts;
}
ts.getExternalModuleOrNamespaceExportName = getExternalModuleOrNamespaceExportName;
function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {
- var qualifiedName = createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : getSynthesizedClone(name), name);
+ var qualifiedName = ts.createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : ts.getSynthesizedClone(name));
+ ts.setTextRange(qualifiedName, name);
var emitFlags;
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
emitFlags |= 1536;
if (emitFlags)
- setEmitFlags(qualifiedName, emitFlags);
+ ts.setEmitFlags(qualifiedName, emitFlags);
return qualifiedName;
}
ts.getNamespaceMemberName = getNamespaceMemberName;
function convertToFunctionBody(node, multiLine) {
- return ts.isBlock(node) ? node : createBlock([createReturn(node, node)], node, multiLine);
+ return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
- function addPrologueDirectives(target, source, ensureUseStrict, visitor) {
+ function addPrologue(target, source, ensureUseStrict, visitor) {
+ var offset = addStandardPrologue(target, source, ensureUseStrict);
+ return addCustomPrologue(target, source, offset, visitor);
+ }
+ ts.addPrologue = addPrologue;
+ function addStandardPrologue(target, source, ensureUseStrict) {
ts.Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array");
var foundUseStrict = false;
var statementOffset = 0;
@@ -12407,11 +14405,16 @@ var ts;
statementOffset++;
}
if (ensureUseStrict && !foundUseStrict) {
- target.push(startOnNewLine(createStatement(createLiteral("use strict"))));
+ target.push(startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))));
}
+ return statementOffset;
+ }
+ ts.addStandardPrologue = addStandardPrologue;
+ function addCustomPrologue(target, source, statementOffset, visitor) {
+ var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 524288) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -12421,7 +14424,7 @@ var ts;
}
return statementOffset;
}
- ts.addPrologueDirectives = addPrologueDirectives;
+ ts.addCustomPrologue = addCustomPrologue;
function startsWithUseStrict(statements) {
var firstStatement = ts.firstOrUndefined(statements);
return firstStatement !== undefined
@@ -12444,33 +14447,43 @@ var ts;
}
}
if (!foundUseStrict) {
- return createNodeArray([
- startOnNewLine(createStatement(createLiteral("use strict")))
- ].concat(statements), statements);
+ return ts.setTextRange(ts.createNodeArray([
+ startOnNewLine(ts.createStatement(ts.createLiteral("use strict")))
+ ].concat(statements)), statements);
}
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
+ function parenthesizeConditionalHead(condition) {
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
+ var emittedCondition = skipPartiallyEmittedExpressions(condition);
+ var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
+ if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
+ return ts.createParen(condition);
+ }
+ return condition;
+ }
+ ts.parenthesizeConditionalHead = parenthesizeConditionalHead;
function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
var skipped = skipPartiallyEmittedExpressions(operand);
- if (skipped.kind === 183) {
+ if (skipped.kind === 184) {
return operand;
}
return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
- ? createParen(operand)
+ ? ts.createParen(operand)
: operand;
}
ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand;
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
- var binaryOperatorPrecedence = ts.getOperatorPrecedence(192, binaryOperator);
- var binaryOperatorAssociativity = ts.getOperatorAssociativity(192, binaryOperator);
+ var binaryOperatorPrecedence = ts.getOperatorPrecedence(193, binaryOperator);
+ var binaryOperatorAssociativity = ts.getOperatorAssociativity(193, binaryOperator);
var emittedOperand = skipPartiallyEmittedExpressions(operand);
var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) {
case -1:
if (!isLeftSideOfBinary
&& binaryOperatorAssociativity === 1
- && operand.kind === 195) {
+ && operand.kind === 196) {
return false;
}
return true;
@@ -12509,7 +14522,7 @@ var ts;
if (ts.isLiteralKind(node.kind)) {
return node.kind;
}
- if (node.kind === 192 && node.operatorToken.kind === 36) {
+ if (node.kind === 193 && node.operatorToken.kind === 36) {
if (node.cachedLiteralKind !== undefined) {
return node.cachedLiteralKind;
}
@@ -12524,29 +14537,30 @@ var ts;
return 0;
}
function parenthesizeForConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(193, 54);
+ var conditionalPrecedence = ts.getOperatorPrecedence(194, 54);
var emittedCondition = skipPartiallyEmittedExpressions(condition);
var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) {
- return createParen(condition);
+ return ts.createParen(condition);
}
return condition;
}
ts.parenthesizeForConditionalHead = parenthesizeForConditionalHead;
function parenthesizeSubexpressionOfConditionalExpression(e) {
- return e.kind === 192 && e.operatorToken.kind === 25
- ? createParen(e)
+ return e.kind === 193 && e.operatorToken.kind === 25
+ ? ts.createParen(e)
: e;
}
+ ts.parenthesizeSubexpressionOfConditionalExpression = parenthesizeSubexpressionOfConditionalExpression;
function parenthesizeForNew(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
switch (emittedExpression.kind) {
- case 179:
- return createParen(expression);
case 180:
+ return ts.createParen(expression);
+ case 181:
return emittedExpression.arguments
? expression
- : createParen(expression);
+ : ts.createParen(expression);
}
return parenthesizeForAccess(expression);
}
@@ -12554,23 +14568,22 @@ var ts;
function parenthesizeForAccess(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
if (ts.isLeftHandSideExpression(emittedExpression)
- && (emittedExpression.kind !== 180 || emittedExpression.arguments)
- && emittedExpression.kind !== 8) {
+ && (emittedExpression.kind !== 181 || emittedExpression.arguments)) {
return expression;
}
- return createParen(expression, expression);
+ return ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeForAccess = parenthesizeForAccess;
function parenthesizePostfixOperand(operand) {
return ts.isLeftHandSideExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePostfixOperand = parenthesizePostfixOperand;
function parenthesizePrefixOperand(operand) {
return ts.isUnaryExpression(operand)
? operand
- : createParen(operand, operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePrefixOperand = parenthesizePrefixOperand;
function parenthesizeListElements(elements) {
@@ -12585,17 +14598,18 @@ var ts;
}
}
if (result !== undefined) {
- return createNodeArray(result, elements, elements.hasTrailingComma);
+ return ts.setTextRange(ts.createNodeArray(result, elements.hasTrailingComma), elements);
}
return elements;
}
+ ts.parenthesizeListElements = parenthesizeListElements;
function parenthesizeExpressionForList(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
- var commaPrecedence = ts.getOperatorPrecedence(192, 25);
+ var commaPrecedence = ts.getOperatorPrecedence(193, 25);
return expressionPrecedence > commaPrecedence
? expression
- : createParen(expression, expression);
+ : ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeExpressionForList = parenthesizeExpressionForList;
function parenthesizeExpressionForExpressionStatement(expression) {
@@ -12603,16 +14617,16 @@ var ts;
if (ts.isCallExpression(emittedExpression)) {
var callee = emittedExpression.expression;
var kind = skipPartiallyEmittedExpressions(callee).kind;
- if (kind === 184 || kind === 185) {
- var mutableCall = getMutableClone(emittedExpression);
- mutableCall.expression = createParen(callee, callee);
+ if (kind === 185 || kind === 186) {
+ var mutableCall = ts.getMutableClone(emittedExpression);
+ mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
return recreatePartiallyEmittedExpressions(expression, mutableCall);
}
}
else {
var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind;
- if (leftmostExpressionKind === 176 || leftmostExpressionKind === 184) {
- return createParen(expression, expression);
+ if (leftmostExpressionKind === 177 || leftmostExpressionKind === 185) {
+ return ts.setTextRange(ts.createParen(expression), expression);
}
}
return expression;
@@ -12620,7 +14634,7 @@ var ts;
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = getMutableClone(originalOuterExpression);
+ var clone_1 = ts.getMutableClone(originalOuterExpression);
clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
return clone_1;
}
@@ -12629,21 +14643,21 @@ var ts;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
- case 191:
+ case 192:
node = node.operand;
continue;
- case 192:
+ case 193:
node = node.left;
continue;
- case 193:
+ case 194:
node = node.condition;
continue;
+ case 180:
case 179:
case 178:
- case 177:
node = node.expression;
continue;
- case 294:
+ case 295:
node = node.expression;
continue;
}
@@ -12651,13 +14665,19 @@ var ts;
}
}
function parenthesizeConciseBody(body) {
- var emittedBody = skipPartiallyEmittedExpressions(body);
- if (emittedBody.kind === 176) {
- return createParen(body, body);
+ if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177) {
+ return ts.setTextRange(ts.createParen(body), body);
}
return body;
}
ts.parenthesizeConciseBody = parenthesizeConciseBody;
+ var OuterExpressionKinds;
+ (function (OuterExpressionKinds) {
+ OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses";
+ OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 2] = "Assertions";
+ OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
+ OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
+ })(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7; }
var previousNode;
@@ -12677,7 +14697,7 @@ var ts;
}
ts.skipOuterExpressions = skipOuterExpressions;
function skipParentheses(node) {
- while (node.kind === 183) {
+ while (node.kind === 184) {
node = node.expression;
}
return node;
@@ -12691,7 +14711,7 @@ var ts;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 294) {
+ while (node.kind === 295) {
node = node.expression;
}
return node;
@@ -12702,120 +14722,6 @@ var ts;
return node;
}
ts.startOnNewLine = startOnNewLine;
- function setOriginalNode(node, original) {
- node.original = original;
- if (original) {
- var emitNode = original.emitNode;
- if (emitNode)
- node.emitNode = mergeEmitNode(emitNode, node.emitNode);
- }
- return node;
- }
- ts.setOriginalNode = setOriginalNode;
- function mergeEmitNode(sourceEmitNode, destEmitNode) {
- var flags = sourceEmitNode.flags, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
- if (!destEmitNode)
- destEmitNode = {};
- if (flags)
- destEmitNode.flags = flags;
- if (commentRange)
- destEmitNode.commentRange = commentRange;
- if (sourceMapRange)
- destEmitNode.sourceMapRange = sourceMapRange;
- if (tokenSourceMapRanges)
- destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
- if (constantValue !== undefined)
- destEmitNode.constantValue = constantValue;
- if (helpers)
- destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
- return destEmitNode;
- }
- function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
- if (!destRanges)
- destRanges = ts.createMap();
- ts.copyProperties(sourceRanges, destRanges);
- return destRanges;
- }
- function disposeEmitNodes(sourceFile) {
- sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
- var emitNode = sourceFile && sourceFile.emitNode;
- var annotatedNodes = emitNode && emitNode.annotatedNodes;
- if (annotatedNodes) {
- for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
- var node = annotatedNodes_1[_i];
- node.emitNode = undefined;
- }
- }
- }
- ts.disposeEmitNodes = disposeEmitNodes;
- function getOrCreateEmitNode(node) {
- if (!node.emitNode) {
- if (ts.isParseTreeNode(node)) {
- if (node.kind === 261) {
- return node.emitNode = { annotatedNodes: [node] };
- }
- var sourceFile = ts.getSourceFileOfNode(node);
- getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
- }
- node.emitNode = {};
- }
- return node.emitNode;
- }
- ts.getOrCreateEmitNode = getOrCreateEmitNode;
- function getEmitFlags(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.flags;
- }
- ts.getEmitFlags = getEmitFlags;
- function setEmitFlags(node, emitFlags) {
- getOrCreateEmitNode(node).flags = emitFlags;
- return node;
- }
- ts.setEmitFlags = setEmitFlags;
- function getSourceMapRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.sourceMapRange) || node;
- }
- ts.getSourceMapRange = getSourceMapRange;
- function setSourceMapRange(node, range) {
- getOrCreateEmitNode(node).sourceMapRange = range;
- return node;
- }
- ts.setSourceMapRange = setSourceMapRange;
- function getTokenSourceMapRange(node, token) {
- var emitNode = node.emitNode;
- var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
- return tokenSourceMapRanges && tokenSourceMapRanges[token];
- }
- ts.getTokenSourceMapRange = getTokenSourceMapRange;
- function setTokenSourceMapRange(node, token, range) {
- var emitNode = getOrCreateEmitNode(node);
- var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = ts.createMap());
- tokenSourceMapRanges[token] = range;
- return node;
- }
- ts.setTokenSourceMapRange = setTokenSourceMapRange;
- function getCommentRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.commentRange) || node;
- }
- ts.getCommentRange = getCommentRange;
- function setCommentRange(node, range) {
- getOrCreateEmitNode(node).commentRange = range;
- return node;
- }
- ts.setCommentRange = setCommentRange;
- function getConstantValue(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.constantValue;
- }
- ts.getConstantValue = getConstantValue;
- function setConstantValue(node, value) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.constantValue = value;
- return node;
- }
- ts.setConstantValue = setConstantValue;
function getExternalHelpersModuleName(node) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
var emitNode = parseNode && parseNode.emitNode;
@@ -12828,125 +14734,31 @@ var ts;
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = getEmitHelpers(node);
+ var helpers = ts.getEmitHelpers(node);
if (helpers) {
- for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
- var helper = helpers_1[_i];
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
if (!helper.scoped) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
- var emitNode = getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = createUniqueName(ts.externalHelpersModuleNameText));
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
}
}
}
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
- function addEmitHelper(node, helper) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- return node;
- }
- ts.addEmitHelper = addEmitHelper;
- function addEmitHelpers(node, helpers) {
- if (ts.some(helpers)) {
- var emitNode = getOrCreateEmitNode(node);
- for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
- var helper = helpers_2[_i];
- if (!ts.contains(emitNode.helpers, helper)) {
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- }
- }
- }
- return node;
- }
- ts.addEmitHelpers = addEmitHelpers;
- function removeEmitHelper(node, helper) {
- var emitNode = node.emitNode;
- if (emitNode) {
- var helpers = emitNode.helpers;
- if (helpers) {
- return ts.orderedRemoveItem(helpers, helper);
- }
- }
- return false;
- }
- ts.removeEmitHelper = removeEmitHelper;
- function getEmitHelpers(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.helpers;
- }
- ts.getEmitHelpers = getEmitHelpers;
- function moveEmitHelpers(source, target, predicate) {
- var sourceEmitNode = source.emitNode;
- var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
- if (!ts.some(sourceEmitHelpers))
- return;
- var targetEmitNode = getOrCreateEmitNode(target);
- var helpersRemoved = 0;
- for (var i = 0; i < sourceEmitHelpers.length; i++) {
- var helper = sourceEmitHelpers[i];
- if (predicate(helper)) {
- helpersRemoved++;
- if (!ts.contains(targetEmitNode.helpers, helper)) {
- targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
- }
- }
- else if (helpersRemoved > 0) {
- sourceEmitHelpers[i - helpersRemoved] = helper;
- }
- }
- if (helpersRemoved > 0) {
- sourceEmitHelpers.length -= helpersRemoved;
- }
- }
- ts.moveEmitHelpers = moveEmitHelpers;
- function compareEmitHelpers(x, y) {
- if (x === y)
- return 0;
- if (x.priority === y.priority)
- return 0;
- if (x.priority === undefined)
- return 1;
- if (y.priority === undefined)
- return -1;
- return ts.compareValues(x.priority, y.priority);
- }
- ts.compareEmitHelpers = compareEmitHelpers;
- function setTextRange(node, location) {
- if (location) {
- node.pos = location.pos;
- node.end = location.end;
- }
- return node;
- }
- ts.setTextRange = setTextRange;
- function setNodeFlags(node, flags) {
- node.flags = flags;
- return node;
- }
- ts.setNodeFlags = setNodeFlags;
- function setMultiLine(node, multiLine) {
- node.multiLine = multiLine;
- return node;
- }
- ts.setMultiLine = setMultiLine;
- function setHasTrailingComma(nodes, hasTrailingComma) {
- nodes.hasTrailingComma = hasTrailingComma;
- return nodes;
- }
- ts.setHasTrailingComma = setHasTrailingComma;
function getLocalNameForExternalImport(node, sourceFile) {
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- var name_11 = namespaceDeclaration.name;
- return ts.isGeneratedIdentifier(name_11) ? name_11 : createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
+ var name = namespaceDeclaration.name;
+ return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
}
- if (node.kind === 235 && node.importClause) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 237 && node.importClause) {
+ return ts.getGeneratedNameForNode(node);
}
- if (node.kind === 241 && node.moduleSpecifier) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 243 && node.moduleSpecifier) {
+ return ts.getGeneratedNameForNode(node);
}
return undefined;
}
@@ -12956,26 +14768,24 @@ var ts;
if (moduleName.kind === 9) {
return tryGetModuleNameFromDeclaration(importNode, host, resolver, compilerOptions)
|| tryRenameExternalModule(moduleName, sourceFile)
- || getSynthesizedClone(moduleName);
+ || ts.getSynthesizedClone(moduleName);
}
return undefined;
}
ts.getExternalModuleNameLiteral = getExternalModuleNameLiteral;
function tryRenameExternalModule(moduleName, sourceFile) {
- if (sourceFile.renamedDependencies && ts.hasProperty(sourceFile.renamedDependencies, moduleName.text)) {
- return createLiteral(sourceFile.renamedDependencies[moduleName.text]);
- }
- return undefined;
+ var rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
+ return rename && ts.createLiteral(rename);
}
function tryGetModuleNameFromFile(file, host, options) {
if (!file) {
return undefined;
}
if (file.moduleName) {
- return createLiteral(file.moduleName);
+ return ts.createLiteral(file.moduleName);
}
if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
- return createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
+ return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
}
@@ -13009,11 +14819,11 @@ var ts;
}
if (ts.isObjectLiteralElementLike(bindingElement)) {
switch (bindingElement.kind) {
- case 257:
+ case 260:
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
- case 258:
+ case 261:
return bindingElement.name;
- case 259:
+ case 262:
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return undefined;
@@ -13029,11 +14839,11 @@ var ts;
ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement;
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 144:
- case 174:
+ case 145:
+ case 175:
return bindingElement.dotDotDotToken;
- case 196:
- case 259:
+ case 197:
+ case 262:
return bindingElement;
}
return undefined;
@@ -13041,7 +14851,7 @@ var ts;
ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement;
function getPropertyNameOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 174:
+ case 175:
if (bindingElement.propertyName) {
var propertyName = bindingElement.propertyName;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -13049,7 +14859,7 @@ var ts;
: propertyName;
}
break;
- case 257:
+ case 260:
if (bindingElement.name) {
var propertyName = bindingElement.name;
return ts.isComputedPropertyName(propertyName) && ts.isStringOrNumericLiteral(propertyName.expression)
@@ -13057,7 +14867,7 @@ var ts;
: propertyName;
}
break;
- case 259:
+ case 262:
return bindingElement.name;
}
var target = getTargetOfBindingOrAssignmentElement(bindingElement);
@@ -13071,11 +14881,11 @@ var ts;
ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement;
function getElementsOfBindingOrAssignmentPattern(name) {
switch (name.kind) {
- case 172:
case 173:
- case 175:
- return name.elements;
+ case 174:
case 176:
+ return name.elements;
+ case 177:
return name.properties;
}
}
@@ -13084,10 +14894,12 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpread(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpread(element.name), element), element);
}
var expression = convertToAssignmentElementTarget(element.name);
- return element.initializer ? setOriginalNode(createAssignment(expression, element.initializer, element), element) : expression;
+ return element.initializer
+ ? ts.setOriginalNode(ts.setTextRange(ts.createAssignment(expression, element.initializer), element), element)
+ : expression;
}
ts.Debug.assertNode(element, ts.isExpression);
return element;
@@ -13097,14 +14909,14 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpreadAssignment(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpreadAssignment(element.name), element), element);
}
if (element.propertyName) {
var expression = convertToAssignmentElementTarget(element.name);
- return setOriginalNode(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(element.propertyName, element.initializer ? ts.createAssignment(expression, element.initializer) : expression), element), element);
}
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createShorthandPropertyAssignment(element.name, element.initializer, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createShorthandPropertyAssignment(element.name, element.initializer), element), element);
}
ts.Debug.assertNode(element, ts.isObjectLiteralElementLike);
return element;
@@ -13112,18 +14924,18 @@ var ts;
ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement;
function convertToAssignmentPattern(node) {
switch (node.kind) {
- case 173:
- case 175:
- return convertToArrayAssignmentPattern(node);
- case 172:
+ case 174:
case 176:
+ return convertToArrayAssignmentPattern(node);
+ case 173:
+ case 177:
return convertToObjectAssignmentPattern(node);
}
}
ts.convertToAssignmentPattern = convertToAssignmentPattern;
function convertToObjectAssignmentPattern(node) {
if (ts.isObjectBindingPattern(node)) {
- return setOriginalNode(createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isObjectLiteralExpression);
return node;
@@ -13131,7 +14943,7 @@ var ts;
ts.convertToObjectAssignmentPattern = convertToObjectAssignmentPattern;
function convertToArrayAssignmentPattern(node) {
if (ts.isArrayBindingPattern(node)) {
- return setOriginalNode(createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isArrayLiteralExpression);
return node;
@@ -13147,30 +14959,30 @@ var ts;
ts.convertToAssignmentElementTarget = convertToAssignmentElementTarget;
function collectExternalModuleInfo(sourceFile, resolver, compilerOptions) {
var externalImports = [];
- var exportSpecifiers = ts.createMap();
- var exportedBindings = ts.createMap();
+ var exportSpecifiers = ts.createMultiMap();
+ var exportedBindings = [];
var uniqueExports = ts.createMap();
var exportedNames;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && createImportDeclaration(undefined, undefined, createImportClause(undefined, createNamespaceImport(externalHelpersModuleName)), createLiteral(ts.externalHelpersModuleNameText));
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
if (externalHelpersImportDeclaration) {
externalImports.push(externalHelpersImportDeclaration);
}
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var node = _a[_i];
switch (node.kind) {
- case 235:
+ case 237:
externalImports.push(node);
break;
- case 234:
- if (node.moduleReference.kind === 245) {
+ case 236:
+ if (node.moduleReference.kind === 247) {
externalImports.push(node);
}
break;
- case 241:
+ case 243:
if (node.moduleSpecifier) {
if (!node.exportClause) {
externalImports.push(node);
@@ -13183,26 +14995,26 @@ var ts;
else {
for (var _b = 0, _c = node.exportClause.elements; _b < _c.length; _b++) {
var specifier = _c[_b];
- if (!uniqueExports[specifier.name.text]) {
- var name_12 = specifier.propertyName || specifier.name;
- ts.multiMapAdd(exportSpecifiers, name_12.text, specifier);
- var decl = resolver.getReferencedImportDeclaration(name_12)
- || resolver.getReferencedValueDeclaration(name_12);
+ if (!uniqueExports.get(specifier.name.text)) {
+ var name = specifier.propertyName || specifier.name;
+ exportSpecifiers.add(name.text, specifier);
+ var decl = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
if (decl) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
}
- uniqueExports[specifier.name.text] = true;
+ uniqueExports.set(specifier.name.text, true);
exportedNames = ts.append(exportedNames, specifier.name);
}
}
}
break;
- case 240:
+ case 242:
if (node.isExportEquals && !exportEquals) {
exportEquals = node;
}
break;
- case 205:
+ case 207:
if (ts.hasModifier(node, 1)) {
for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) {
var decl = _e[_d];
@@ -13210,38 +15022,38 @@ var ts;
}
}
break;
- case 225:
+ case 227:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_13 = node.name;
- if (!uniqueExports[name_13.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_13);
- uniqueExports[name_13.text] = true;
- exportedNames = ts.append(exportedNames, name_13);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
break;
- case 226:
+ case 228:
if (ts.hasModifier(node, 1)) {
if (ts.hasModifier(node, 512)) {
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
- var name_14 = node.name;
- if (!uniqueExports[name_14.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_14);
- uniqueExports[name_14.text] = true;
- exportedNames = ts.append(exportedNames, name_14);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
@@ -13261,13 +15073,23 @@ var ts;
}
}
else if (!ts.isGeneratedIdentifier(decl.name)) {
- if (!uniqueExports[decl.name.text]) {
- uniqueExports[decl.name.text] = true;
+ if (!uniqueExports.get(decl.name.text)) {
+ uniqueExports.set(decl.name.text, true);
exportedNames = ts.append(exportedNames, decl.name);
}
}
return exportedNames;
}
+ function multiMapSparseArrayAdd(map, key, value) {
+ var values = map[key];
+ if (values) {
+ values.push(value);
+ }
+ else {
+ map[key] = values = [value];
+ }
+ return values;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -13276,13 +15098,13 @@ var ts;
var IdentifierConstructor;
var SourceFileConstructor;
function createNode(kind, pos, end) {
- if (kind === 261) {
+ if (kind === 264) {
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end);
}
else if (kind === 70) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 141) {
+ else if (kind < 142) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -13318,28 +15140,29 @@ var ts;
var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
var cbNodes = cbNodeArray || cbNode;
switch (node.kind) {
- case 141:
+ case 142:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.right);
- case 143:
+ case 144:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.constraint) ||
+ visitNode(cbNode, node.default) ||
visitNode(cbNode, node.expression);
- case 258:
+ case 261:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.equalsToken) ||
visitNode(cbNode, node.objectAssignmentInitializer);
- case 259:
+ case 262:
return visitNode(cbNode, node.expression);
- case 144:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 257:
- case 223:
- case 174:
+ case 260:
+ case 225:
+ case 175:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.propertyName) ||
@@ -13348,24 +15171,24 @@ var ts;
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.initializer);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
+ case 156:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.asteriskToken) ||
@@ -13376,320 +15199,326 @@ var ts;
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.equalsGreaterThanToken) ||
visitNode(cbNode, node.body);
- case 157:
+ case 158:
return visitNode(cbNode, node.typeName) ||
visitNodes(cbNodes, node.typeArguments);
- case 156:
+ case 157:
return visitNode(cbNode, node.parameterName) ||
visitNode(cbNode, node.type);
- case 160:
- return visitNode(cbNode, node.exprName);
case 161:
- return visitNodes(cbNodes, node.members);
+ return visitNode(cbNode, node.exprName);
case 162:
- return visitNode(cbNode, node.elementType);
+ return visitNodes(cbNodes, node.members);
case 163:
- return visitNodes(cbNodes, node.elementTypes);
+ return visitNode(cbNode, node.elementType);
case 164:
+ return visitNodes(cbNodes, node.elementTypes);
case 165:
- return visitNodes(cbNodes, node.types);
case 166:
- case 168:
- return visitNode(cbNode, node.type);
+ return visitNodes(cbNodes, node.types);
+ case 167:
case 169:
+ return visitNode(cbNode, node.type);
+ case 170:
return visitNode(cbNode, node.objectType) ||
visitNode(cbNode, node.indexType);
- case 170:
+ case 171:
return visitNode(cbNode, node.readonlyToken) ||
visitNode(cbNode, node.typeParameter) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type);
- case 171:
- return visitNode(cbNode, node.literal);
case 172:
+ return visitNode(cbNode, node.literal);
case 173:
- return visitNodes(cbNodes, node.elements);
- case 175:
+ case 174:
return visitNodes(cbNodes, node.elements);
case 176:
- return visitNodes(cbNodes, node.properties);
+ return visitNodes(cbNodes, node.elements);
case 177:
+ return visitNodes(cbNodes, node.properties);
+ case 178:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.name);
- case 178:
+ case 179:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.argumentExpression);
- case 179:
case 180:
+ case 181:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments) ||
visitNodes(cbNodes, node.arguments);
- case 181:
+ case 182:
return visitNode(cbNode, node.tag) ||
visitNode(cbNode, node.template);
- case 182:
+ case 183:
return visitNode(cbNode, node.type) ||
visitNode(cbNode, node.expression);
- case 183:
- return visitNode(cbNode, node.expression);
- case 186:
+ case 184:
return visitNode(cbNode, node.expression);
case 187:
return visitNode(cbNode, node.expression);
case 188:
return visitNode(cbNode, node.expression);
- case 190:
- return visitNode(cbNode, node.operand);
- case 195:
- return visitNode(cbNode, node.asteriskToken) ||
- visitNode(cbNode, node.expression);
case 189:
return visitNode(cbNode, node.expression);
case 191:
return visitNode(cbNode, node.operand);
+ case 196:
+ return visitNode(cbNode, node.asteriskToken) ||
+ visitNode(cbNode, node.expression);
+ case 190:
+ return visitNode(cbNode, node.expression);
case 192:
+ return visitNode(cbNode, node.operand);
+ case 193:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.operatorToken) ||
visitNode(cbNode, node.right);
- case 200:
+ case 201:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.type);
- case 201:
+ case 202:
return visitNode(cbNode, node.expression);
- case 193:
+ case 203:
+ return visitNode(cbNode, node.name);
+ case 194:
return visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.whenTrue) ||
visitNode(cbNode, node.colonToken) ||
visitNode(cbNode, node.whenFalse);
- case 196:
+ case 197:
return visitNode(cbNode, node.expression);
- case 204:
- case 231:
+ case 206:
+ case 233:
return visitNodes(cbNodes, node.statements);
- case 261:
+ case 264:
return visitNodes(cbNodes, node.statements) ||
visitNode(cbNode, node.endOfFileToken);
- case 205:
+ case 207:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.declarationList);
- case 224:
+ case 226:
return visitNodes(cbNodes, node.declarations);
- case 207:
+ case 209:
return visitNode(cbNode, node.expression);
- case 208:
+ case 210:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.thenStatement) ||
visitNode(cbNode, node.elseStatement);
- case 209:
+ case 211:
return visitNode(cbNode, node.statement) ||
visitNode(cbNode, node.expression);
- case 210:
+ case 212:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 211:
+ case 213:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.incrementor) ||
visitNode(cbNode, node.statement);
- case 212:
+ case 214:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 213:
- return visitNode(cbNode, node.initializer) ||
+ case 215:
+ return visitNode(cbNode, node.awaitModifier) ||
+ visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 214:
- case 215:
- return visitNode(cbNode, node.label);
case 216:
- return visitNode(cbNode, node.expression);
case 217:
+ return visitNode(cbNode, node.label);
+ case 218:
+ return visitNode(cbNode, node.expression);
+ case 219:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 218:
+ case 220:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.caseBlock);
- case 232:
+ case 234:
return visitNodes(cbNodes, node.clauses);
- case 253:
+ case 256:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.statements);
- case 254:
+ case 257:
return visitNodes(cbNodes, node.statements);
- case 219:
+ case 221:
return visitNode(cbNode, node.label) ||
visitNode(cbNode, node.statement);
- case 220:
+ case 222:
return visitNode(cbNode, node.expression);
- case 221:
+ case 223:
return visitNode(cbNode, node.tryBlock) ||
visitNode(cbNode, node.catchClause) ||
visitNode(cbNode, node.finallyBlock);
- case 256:
+ case 259:
return visitNode(cbNode, node.variableDeclaration) ||
visitNode(cbNode, node.block);
- case 145:
+ case 146:
return visitNode(cbNode, node.expression);
- case 226:
- case 197:
+ case 228:
+ case 198:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 227:
+ case 229:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 228:
+ case 230:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNode(cbNode, node.type);
- case 229:
+ case 231:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.members);
- case 260:
+ case 263:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 230:
+ case 232:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.body);
- case 234:
+ case 236:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.moduleReference);
- case 235:
+ case 237:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.importClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 236:
+ case 238:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.namedBindings);
- case 233:
+ case 235:
return visitNode(cbNode, node.name);
- case 237:
+ case 239:
return visitNode(cbNode, node.name);
- case 238:
- case 242:
+ case 240:
+ case 244:
return visitNodes(cbNodes, node.elements);
- case 241:
+ case 243:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.exportClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 239:
- case 243:
+ case 241:
+ case 245:
return visitNode(cbNode, node.propertyName) ||
visitNode(cbNode, node.name);
- case 240:
+ case 242:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.expression);
- case 194:
+ case 195:
return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
- case 202:
+ case 204:
return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
- case 142:
+ case 143:
return visitNode(cbNode, node.expression);
- case 255:
+ case 258:
return visitNodes(cbNodes, node.types);
- case 199:
+ case 200:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments);
- case 245:
+ case 247:
return visitNode(cbNode, node.expression);
- case 244:
- return visitNodes(cbNodes, node.decorators);
case 246:
+ return visitNodes(cbNodes, node.decorators);
+ case 248:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
visitNode(cbNode, node.closingElement);
- case 247:
- case 248:
- return visitNode(cbNode, node.tagName) ||
- visitNodes(cbNodes, node.attributes);
+ case 249:
case 250:
+ return visitNode(cbNode, node.tagName) ||
+ visitNode(cbNode, node.attributes);
+ case 253:
+ return visitNodes(cbNodes, node.properties);
+ case 252:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 251:
- return visitNode(cbNode, node.expression);
- case 252:
+ case 254:
return visitNode(cbNode, node.expression);
- case 249:
+ case 255:
+ return visitNode(cbNode, node.dotDotDotToken) ||
+ visitNode(cbNode, node.expression);
+ case 251:
return visitNode(cbNode, node.tagName);
- case 262:
- return visitNode(cbNode, node.type);
case 266:
+ return visitNode(cbNode, node.type);
+ case 270:
return visitNodes(cbNodes, node.types);
- case 267:
+ case 271:
return visitNodes(cbNodes, node.types);
- case 265:
- return visitNode(cbNode, node.elementType);
case 269:
+ return visitNode(cbNode, node.elementType);
+ case 273:
return visitNode(cbNode, node.type);
- case 268:
+ case 272:
return visitNode(cbNode, node.type);
- case 270:
+ case 274:
return visitNode(cbNode, node.literal);
- case 272:
+ case 276:
return visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeArguments);
- case 273:
+ case 277:
return visitNode(cbNode, node.type);
- case 274:
+ case 278:
return visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 275:
+ case 279:
return visitNode(cbNode, node.type);
- case 276:
+ case 280:
return visitNode(cbNode, node.type);
- case 277:
+ case 281:
return visitNode(cbNode, node.type);
- case 271:
+ case 275:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.type);
- case 278:
+ case 282:
return visitNodes(cbNodes, node.tags);
- case 281:
+ case 285:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 282:
- return visitNode(cbNode, node.typeExpression);
- case 283:
+ case 286:
return visitNode(cbNode, node.typeExpression);
- case 280:
+ case 287:
return visitNode(cbNode, node.typeExpression);
case 284:
+ return visitNode(cbNode, node.typeExpression);
+ case 288:
return visitNodes(cbNodes, node.typeParameters);
- case 285:
+ case 289:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 287:
+ case 291:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 286:
+ case 290:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 294:
+ case 295:
return visitNode(cbNode, node.expression);
- case 288:
+ case 292:
return visitNode(cbNode, node.literal);
}
}
@@ -13730,7 +15559,7 @@ var ts;
var Parser;
(function (Parser) {
var scanner = ts.createScanner(5, true);
- var disallowInAndDecoratorContext = 65536 | 262144;
+ var disallowInAndDecoratorContext = 2048 | 8192;
var NodeConstructor;
var TokenConstructor;
var IdentifierConstructor;
@@ -13778,7 +15607,7 @@ var ts;
identifiers = ts.createMap();
identifierCount = 0;
nodeCount = 0;
- contextFlags = scriptKind === 1 || scriptKind === 2 ? 2097152 : 0;
+ contextFlags = scriptKind === 1 || scriptKind === 2 ? 65536 : 0;
parseErrorBeforeNextFinishedNode = false;
scanner.setText(sourceText);
scanner.setOnError(scanError);
@@ -13853,7 +15682,7 @@ var ts;
}
Parser.fixupParentReferences = fixupParentReferences;
function createSourceFile(fileName, languageVersion, scriptKind) {
- var sourceFile = new SourceFileConstructor(261, 0, sourceText.length);
+ var sourceFile = new SourceFileConstructor(264, 0, sourceText.length);
nodeCount++;
sourceFile.text = sourceText;
sourceFile.bindDiagnostics = [];
@@ -13873,16 +15702,16 @@ var ts;
}
}
function setDisallowInContext(val) {
- setContextFlag(val, 65536);
+ setContextFlag(val, 2048);
}
function setYieldContext(val) {
- setContextFlag(val, 131072);
+ setContextFlag(val, 4096);
}
function setDecoratorContext(val) {
- setContextFlag(val, 262144);
+ setContextFlag(val, 8192);
}
function setAwaitContext(val) {
- setContextFlag(val, 524288);
+ setContextFlag(val, 16384);
}
function doOutsideOfContext(context, func) {
var contextFlagsToClear = context & contextFlags;
@@ -13905,40 +15734,40 @@ var ts;
return func();
}
function allowInAnd(func) {
- return doOutsideOfContext(65536, func);
+ return doOutsideOfContext(2048, func);
}
function disallowInAnd(func) {
- return doInsideOfContext(65536, func);
+ return doInsideOfContext(2048, func);
}
function doInYieldContext(func) {
- return doInsideOfContext(131072, func);
+ return doInsideOfContext(4096, func);
}
function doInDecoratorContext(func) {
- return doInsideOfContext(262144, func);
+ return doInsideOfContext(8192, func);
}
function doInAwaitContext(func) {
- return doInsideOfContext(524288, func);
+ return doInsideOfContext(16384, func);
}
function doOutsideOfAwaitContext(func) {
- return doOutsideOfContext(524288, func);
+ return doOutsideOfContext(16384, func);
}
function doInYieldAndAwaitContext(func) {
- return doInsideOfContext(131072 | 524288, func);
+ return doInsideOfContext(4096 | 16384, func);
}
function inContext(flags) {
return (contextFlags & flags) !== 0;
}
function inYieldContext() {
- return inContext(131072);
+ return inContext(4096);
}
function inDisallowInContext() {
- return inContext(65536);
+ return inContext(2048);
}
function inDecoratorContext() {
- return inContext(262144);
+ return inContext(8192);
}
function inAwaitContext() {
- return inContext(524288);
+ return inContext(16384);
}
function parseErrorAtCurrentToken(message, arg0) {
var start = scanner.getTokenPos();
@@ -14080,7 +15909,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 141 ? new NodeConstructor(kind, pos, pos) :
+ return kind >= 142 ? new NodeConstructor(kind, pos, pos) :
kind === 70 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -14100,7 +15929,7 @@ var ts;
}
if (parseErrorBeforeNextFinishedNode) {
parseErrorBeforeNextFinishedNode = false;
- node.flags |= 1048576;
+ node.flags |= 32768;
}
return node;
}
@@ -14117,7 +15946,11 @@ var ts;
}
function internIdentifier(text) {
text = ts.escapeIdentifier(text);
- return identifiers[text] || (identifiers[text] = text);
+ var identifier = identifiers.get(text);
+ if (identifier === undefined) {
+ identifiers.set(text, identifier = text);
+ }
+ return identifier;
}
function createIdentifier(isIdentifier, diagnosticMessage) {
identifierCount++;
@@ -14162,7 +15995,7 @@ var ts;
return token() === 9 || token() === 8 || ts.tokenIsIdentifierOrKeyword(token());
}
function parseComputedPropertyName() {
- var node = createNode(142);
+ var node = createNode(143);
parseExpected(20);
node.expression = allowInAnd(parseExpression);
parseExpected(21);
@@ -14211,6 +16044,7 @@ var ts;
function nextTokenIsClassOrFunctionOrAsync() {
nextToken();
return token() === 74 || token() === 88 ||
+ (token() === 116 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 119 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
function isListElement(parsingContext, inErrorRecovery) {
@@ -14418,7 +16252,7 @@ var ts;
if (ts.containsParseError(node)) {
return undefined;
}
- var nodeContextFlags = node.flags & 3080192;
+ var nodeContextFlags = node.flags & 96256;
if (nodeContextFlags !== contextFlags) {
return undefined;
}
@@ -14467,14 +16301,14 @@ var ts;
function isReusableClassMember(node) {
if (node) {
switch (node.kind) {
- case 150:
- case 155:
case 151:
+ case 156:
case 152:
- case 147:
- case 203:
+ case 153:
+ case 148:
+ case 205:
return true;
- case 149:
+ case 150:
var methodDeclaration = node;
var nameIsConstructor = methodDeclaration.name.kind === 70 &&
methodDeclaration.name.originalKeywordKind === 122;
@@ -14486,8 +16320,8 @@ var ts;
function isReusableSwitchClause(node) {
if (node) {
switch (node.kind) {
- case 253:
- case 254:
+ case 256:
+ case 257:
return true;
}
}
@@ -14496,65 +16330,65 @@ var ts;
function isReusableStatement(node) {
if (node) {
switch (node.kind) {
- case 225:
- case 205:
- case 204:
- case 208:
+ case 227:
case 207:
+ case 206:
+ case 210:
+ case 209:
+ case 222:
+ case 218:
case 220:
+ case 217:
case 216:
- case 218:
- case 215:
case 214:
- case 212:
+ case 215:
case 213:
- case 211:
- case 210:
- case 217:
- case 206:
- case 221:
+ case 212:
case 219:
- case 209:
- case 222:
- case 235:
- case 234:
- case 241:
- case 240:
- case 230:
- case 226:
- case 227:
- case 229:
+ case 208:
+ case 223:
+ case 221:
+ case 211:
+ case 224:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
+ case 232:
case 228:
+ case 229:
+ case 231:
+ case 230:
return true;
}
}
return false;
}
function isReusableEnumMember(node) {
- return node.kind === 260;
+ return node.kind === 263;
}
function isReusableTypeMember(node) {
if (node) {
switch (node.kind) {
- case 154:
- case 148:
case 155:
- case 146:
- case 153:
+ case 149:
+ case 156:
+ case 147:
+ case 154:
return true;
}
}
return false;
}
function isReusableVariableDeclaration(node) {
- if (node.kind !== 223) {
+ if (node.kind !== 225) {
return false;
}
var variableDeclarator = node;
return variableDeclarator.initializer === undefined;
}
function isReusableParameter(node) {
- if (node.kind !== 144) {
+ if (node.kind !== 145) {
return false;
}
var parameter = node;
@@ -14599,7 +16433,6 @@ var ts;
case 25: return ts.Diagnostics.Property_assignment_expected;
}
}
- ;
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
var saveParsingContext = parsingContext;
parsingContext |= 1 << kind;
@@ -14650,7 +16483,7 @@ var ts;
function parseEntityName(allowReservedWords, diagnosticMessage) {
var entity = parseIdentifier(diagnosticMessage);
while (parseOptional(22)) {
- var node = createNode(141, entity.pos);
+ var node = createNode(142, entity.pos);
node.left = entity;
node.right = parseRightSideOfDot(allowReservedWords);
entity = finishNode(node);
@@ -14667,7 +16500,7 @@ var ts;
return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
}
function parseTemplateExpression() {
- var template = createNode(194);
+ var template = createNode(195);
template.head = parseTemplateHead();
ts.Debug.assert(template.head.kind === 13, "Template head has wrong token kind");
var templateSpans = createNodeArray();
@@ -14679,7 +16512,7 @@ var ts;
return finishNode(template);
}
function parseTemplateSpan() {
- var span = createNode(202);
+ var span = createNode(204);
span.expression = allowInAnd(parseExpression);
var literal;
if (token() === 17) {
@@ -14715,20 +16548,16 @@ var ts;
if (scanner.isUnterminated()) {
node.isUnterminated = true;
}
- var tokenPos = scanner.getTokenPos();
+ if (node.kind === 8) {
+ node.numericLiteralFlags = scanner.getNumericLiteralFlags();
+ }
nextToken();
finishNode(node);
- if (node.kind === 8
- && sourceText.charCodeAt(tokenPos) === 48
- && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
- node.isOctalLiteral = true;
- }
return node;
}
function parseTypeReference() {
- var typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
- var node = createNode(157, typeName.pos);
- node.typeName = typeName;
+ var node = createNode(158);
+ node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
if (!scanner.hasPrecedingLineBreak() && token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
}
@@ -14736,24 +16565,24 @@ var ts;
}
function parseThisTypePredicate(lhs) {
nextToken();
- var node = createNode(156, lhs.pos);
+ var node = createNode(157, lhs.pos);
node.parameterName = lhs;
node.type = parseType();
return finishNode(node);
}
function parseThisTypeNode() {
- var node = createNode(167);
+ var node = createNode(168);
nextToken();
return finishNode(node);
}
function parseTypeQuery() {
- var node = createNode(160);
+ var node = createNode(161);
parseExpected(102);
node.exprName = parseEntityName(true);
return finishNode(node);
}
function parseTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
if (parseOptional(84)) {
if (isStartOfType() || !isStartOfExpression()) {
@@ -14763,6 +16592,9 @@ var ts;
node.expression = parseUnaryExpressionOrHigher();
}
}
+ if (parseOptional(57)) {
+ node.default = parseType();
+ }
return finishNode(node);
}
function parseTypeParameters() {
@@ -14780,9 +16612,9 @@ var ts;
return token() === 23 || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 || token() === 98;
}
function parseParameter() {
- var node = createNode(144);
+ var node = createNode(145);
if (token() === 98) {
- node.name = createIdentifier(true, undefined);
+ node.name = createIdentifier(true);
node.type = parseParameterType();
return finishNode(node);
}
@@ -14840,7 +16672,7 @@ var ts;
}
function parseSignatureMember(kind) {
var node = createNode(kind);
- if (kind === 154) {
+ if (kind === 155) {
parseExpected(93);
}
fillSignature(55, false, false, false, node);
@@ -14880,7 +16712,7 @@ var ts;
return token() === 55 || token() === 25 || token() === 21;
}
function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(155, fullStart);
+ var node = createNode(156, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.parameters = parseBracketedList(16, parseParameter, 20, 21);
@@ -14892,7 +16724,7 @@ var ts;
var name = parsePropertyName();
var questionToken = parseOptionalToken(54);
if (token() === 18 || token() === 26) {
- var method = createNode(148, fullStart);
+ var method = createNode(149, fullStart);
method.modifiers = modifiers;
method.name = name;
method.questionToken = questionToken;
@@ -14901,7 +16733,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
else {
- var property = createNode(146, fullStart);
+ var property = createNode(147, fullStart);
property.modifiers = modifiers;
property.name = name;
property.questionToken = questionToken;
@@ -14914,19 +16746,19 @@ var ts;
}
}
function isTypeMemberStart() {
- var idToken;
if (token() === 18 || token() === 26) {
return true;
}
+ var idToken;
while (ts.isModifierKind(token())) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (token() === 20) {
return true;
}
if (isLiteralPropertyName()) {
- idToken = token();
+ idToken = true;
nextToken();
}
if (idToken) {
@@ -14941,10 +16773,10 @@ var ts;
}
function parseTypeMember() {
if (token() === 18 || token() === 26) {
- return parseSignatureMember(153);
+ return parseSignatureMember(154);
}
if (token() === 93 && lookAhead(isStartOfConstructSignature)) {
- return parseSignatureMember(154);
+ return parseSignatureMember(155);
}
var fullStart = getNodePos();
var modifiers = parseModifiers();
@@ -14958,7 +16790,7 @@ var ts;
return token() === 18 || token() === 26;
}
function parseTypeLiteral() {
- var node = createNode(161);
+ var node = createNode(162);
node.members = parseObjectTypeMembers();
return finishNode(node);
}
@@ -14981,14 +16813,14 @@ var ts;
return token() === 20 && nextTokenIsIdentifier() && nextToken() === 91;
}
function parseMappedTypeParameter() {
- var node = createNode(143);
+ var node = createNode(144);
node.name = parseIdentifier();
parseExpected(91);
node.constraint = parseType();
return finishNode(node);
}
function parseMappedType() {
- var node = createNode(170);
+ var node = createNode(171);
parseExpected(16);
node.readonlyToken = parseOptionalToken(130);
parseExpected(20);
@@ -15001,12 +16833,12 @@ var ts;
return finishNode(node);
}
function parseTupleType() {
- var node = createNode(163);
+ var node = createNode(164);
node.elementTypes = parseBracketedList(20, parseType, 20, 21);
return finishNode(node);
}
function parseParenthesizedType() {
- var node = createNode(166);
+ var node = createNode(167);
parseExpected(18);
node.type = parseType();
parseExpected(19);
@@ -15014,7 +16846,7 @@ var ts;
}
function parseFunctionOrConstructorType(kind) {
var node = createNode(kind);
- if (kind === 159) {
+ if (kind === 160) {
parseExpected(93);
}
fillSignature(35, false, false, false, node);
@@ -15025,7 +16857,7 @@ var ts;
return token() === 22 ? undefined : node;
}
function parseLiteralTypeNode() {
- var node = createNode(171);
+ var node = createNode(172);
node.literal = parseSimpleUnaryExpression();
finishNode(node);
return node;
@@ -15036,12 +16868,13 @@ var ts;
function parseNonArrayType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
- case 137:
+ case 136:
+ case 138:
case 129:
+ case 133:
var node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
case 9:
@@ -15078,12 +16911,12 @@ var ts;
function isStartOfType() {
switch (token()) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 98:
case 102:
@@ -15091,11 +16924,14 @@ var ts;
case 16:
case 20:
case 26:
+ case 48:
+ case 47:
case 93:
case 9:
case 8:
case 100:
case 85:
+ case 133:
return true;
case 37:
return lookAhead(nextTokenIsNumericLiteral);
@@ -15113,14 +16949,14 @@ var ts;
var type = parseNonArrayType();
while (!scanner.hasPrecedingLineBreak() && parseOptional(20)) {
if (isStartOfType()) {
- var node = createNode(169, type.pos);
+ var node = createNode(170, type.pos);
node.objectType = type;
node.indexType = parseType();
parseExpected(21);
type = finishNode(node);
}
else {
- var node = createNode(162, type.pos);
+ var node = createNode(163, type.pos);
node.elementType = type;
parseExpected(21);
type = finishNode(node);
@@ -15129,7 +16965,7 @@ var ts;
return type;
}
function parseTypeOperator(operator) {
- var node = createNode(168);
+ var node = createNode(169);
parseExpected(operator);
node.operator = operator;
node.type = parseTypeOperatorOrHigher();
@@ -15143,6 +16979,7 @@ var ts;
return parseArrayTypeOrHigher();
}
function parseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ parseOptional(operator);
var type = parseConstituentType();
if (token() === operator) {
var types = createNodeArray([type], type.pos);
@@ -15157,10 +16994,10 @@ var ts;
return type;
}
function parseIntersectionTypeOrHigher() {
- return parseUnionOrIntersectionType(165, parseTypeOperatorOrHigher, 47);
+ return parseUnionOrIntersectionType(166, parseTypeOperatorOrHigher, 47);
}
function parseUnionTypeOrHigher() {
- return parseUnionOrIntersectionType(164, parseIntersectionTypeOrHigher, 48);
+ return parseUnionOrIntersectionType(165, parseIntersectionTypeOrHigher, 48);
}
function isStartOfFunctionType() {
if (token() === 26) {
@@ -15206,7 +17043,7 @@ var ts;
var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
var type = parseType();
if (typePredicateVariable) {
- var node = createNode(156, typePredicateVariable.pos);
+ var node = createNode(157, typePredicateVariable.pos);
node.parameterName = typePredicateVariable;
node.type = type;
return finishNode(node);
@@ -15223,14 +17060,14 @@ var ts;
}
}
function parseType() {
- return doOutsideOfContext(655360, parseTypeWorker);
+ return doOutsideOfContext(20480, parseTypeWorker);
}
function parseTypeWorker() {
if (isStartOfFunctionType()) {
- return parseFunctionOrConstructorType(158);
+ return parseFunctionOrConstructorType(159);
}
if (token() === 93) {
- return parseFunctionOrConstructorType(159);
+ return parseFunctionOrConstructorType(160);
}
return parseUnionTypeOrHigher();
}
@@ -15349,7 +17186,7 @@ var ts;
return !scanner.hasPrecedingLineBreak() && isIdentifier();
}
function parseYieldExpression() {
- var node = createNode(195);
+ var node = createNode(196);
nextToken();
if (!scanner.hasPrecedingLineBreak() &&
(token() === 38 || isStartOfExpression())) {
@@ -15365,13 +17202,13 @@ var ts;
ts.Debug.assert(token() === 35, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
var node;
if (asyncModifier) {
- node = createNode(185, asyncModifier.pos);
+ node = createNode(186, asyncModifier.pos);
node.modifiers = asyncModifier;
}
else {
- node = createNode(185, identifier.pos);
+ node = createNode(186, identifier.pos);
}
- var parameter = createNode(144, identifier.pos);
+ var parameter = createNode(145, identifier.pos);
parameter.name = identifier;
finishNode(parameter);
node.parameters = createNodeArray([parameter], parameter.pos);
@@ -15505,7 +17342,7 @@ var ts;
return 0;
}
function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
- var node = createNode(185);
+ var node = createNode(186);
node.modifiers = parseModifiersForArrowFunction();
var isAsync = !!(ts.getModifierFlags(node) & 256);
fillSignature(55, false, isAsync, !allowAmbiguity, node);
@@ -15537,7 +17374,7 @@ var ts;
if (!questionToken) {
return leftOperand;
}
- var node = createNode(193, leftOperand.pos);
+ var node = createNode(194, leftOperand.pos);
node.condition = leftOperand;
node.questionToken = questionToken;
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
@@ -15550,7 +17387,7 @@ var ts;
return parseBinaryExpressionRest(precedence, leftOperand);
}
function isInOrOfKeyword(t) {
- return t === 91 || t === 140;
+ return t === 91 || t === 141;
}
function parseBinaryExpressionRest(precedence, leftOperand) {
while (true) {
@@ -15628,39 +17465,39 @@ var ts;
return -1;
}
function makeBinaryExpression(left, operatorToken, right) {
- var node = createNode(192, left.pos);
+ var node = createNode(193, left.pos);
node.left = left;
node.operatorToken = operatorToken;
node.right = right;
return finishNode(node);
}
function makeAsExpression(left, right) {
- var node = createNode(200, left.pos);
+ var node = createNode(201, left.pos);
node.expression = left;
node.type = right;
return finishNode(node);
}
function parsePrefixUnaryExpression() {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseDeleteExpression() {
- var node = createNode(186);
+ var node = createNode(187);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseTypeOfExpression() {
- var node = createNode(187);
+ var node = createNode(188);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseVoidExpression() {
- var node = createNode(188);
+ var node = createNode(189);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -15675,7 +17512,7 @@ var ts;
return false;
}
function parseAwaitExpression() {
- var node = createNode(189);
+ var node = createNode(190);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -15691,7 +17528,7 @@ var ts;
var simpleUnaryExpression = parseSimpleUnaryExpression();
if (token() === 39) {
var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
- if (simpleUnaryExpression.kind === 182) {
+ if (simpleUnaryExpression.kind === 183) {
parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
}
else {
@@ -15744,7 +17581,7 @@ var ts;
}
function parseIncrementExpression() {
if (token() === 42 || token() === 43) {
- var node = createNode(190);
+ var node = createNode(191);
node.operator = token();
nextToken();
node.operand = parseLeftHandSideExpressionOrHigher();
@@ -15756,7 +17593,7 @@ var ts;
var expression = parseLeftHandSideExpressionOrHigher();
ts.Debug.assert(ts.isLeftHandSideExpression(expression));
if ((token() === 42 || token() === 43) && !scanner.hasPrecedingLineBreak()) {
- var node = createNode(191, expression.pos);
+ var node = createNode(192, expression.pos);
node.operand = expression;
node.operator = token();
nextToken();
@@ -15779,7 +17616,7 @@ var ts;
if (token() === 18 || token() === 22 || token() === 20) {
return expression;
}
- var node = createNode(177, expression.pos);
+ var node = createNode(178, expression.pos);
node.expression = expression;
parseExpectedToken(22, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
node.name = parseRightSideOfDot(true);
@@ -15801,8 +17638,8 @@ var ts;
function parseJsxElementOrSelfClosingElement(inExpressionContext) {
var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
var result;
- if (opening.kind === 248) {
- var node = createNode(246, opening.pos);
+ if (opening.kind === 250) {
+ var node = createNode(248, opening.pos);
node.openingElement = opening;
node.children = parseJsxChildren(node.openingElement.tagName);
node.closingElement = parseJsxClosingElement(inExpressionContext);
@@ -15812,14 +17649,14 @@ var ts;
result = finishNode(node);
}
else {
- ts.Debug.assert(opening.kind === 247);
+ ts.Debug.assert(opening.kind === 249);
result = opening;
}
if (inExpressionContext && token() === 26) {
var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(true); });
if (invalidElement) {
parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element);
- var badNode = createNode(192, result.pos);
+ var badNode = createNode(193, result.pos);
badNode.end = invalidElement.end;
badNode.left = result;
badNode.right = invalidElement;
@@ -15859,20 +17696,28 @@ var ts;
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName));
break;
}
+ else if (token() === 7) {
+ break;
+ }
result.push(parseJsxChild());
}
result.end = scanner.getTokenPos();
parsingContext = saveParsingContext;
return result;
}
+ function parseJsxAttributes() {
+ var jsxAttributes = createNode(253);
+ jsxAttributes.properties = parseList(13, parseJsxAttribute);
+ return finishNode(jsxAttributes);
+ }
function parseJsxOpeningOrSelfClosingElement(inExpressionContext) {
var fullStart = scanner.getStartPos();
parseExpected(26);
var tagName = parseJsxElementName();
- var attributes = parseList(13, parseJsxAttribute);
+ var attributes = parseJsxAttributes();
var node;
if (token() === 28) {
- node = createNode(248, fullStart);
+ node = createNode(250, fullStart);
scanJsxText();
}
else {
@@ -15884,7 +17729,7 @@ var ts;
parseExpected(28, undefined, false);
scanJsxText();
}
- node = createNode(247, fullStart);
+ node = createNode(249, fullStart);
}
node.tagName = tagName;
node.attributes = attributes;
@@ -15895,7 +17740,7 @@ var ts;
var expression = token() === 98 ?
parseTokenNode() : parseIdentifierName();
while (parseOptional(22)) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -15903,9 +17748,10 @@ var ts;
return expression;
}
function parseJsxExpression(inExpressionContext) {
- var node = createNode(252);
+ var node = createNode(255);
parseExpected(16);
if (token() !== 17) {
+ node.dotDotDotToken = parseOptionalToken(23);
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
@@ -15922,7 +17768,7 @@ var ts;
return parseJsxSpreadAttribute();
}
scanJsxIdentifier();
- var node = createNode(250);
+ var node = createNode(252);
node.name = parseIdentifierName();
if (token() === 57) {
switch (scanJsxAttributeValue()) {
@@ -15937,7 +17783,7 @@ var ts;
return finishNode(node);
}
function parseJsxSpreadAttribute() {
- var node = createNode(251);
+ var node = createNode(254);
parseExpected(16);
parseExpected(23);
node.expression = parseExpression();
@@ -15945,7 +17791,7 @@ var ts;
return finishNode(node);
}
function parseJsxClosingElement(inExpressionContext) {
- var node = createNode(249);
+ var node = createNode(251);
parseExpected(27);
node.tagName = parseJsxElementName();
if (inExpressionContext) {
@@ -15958,7 +17804,7 @@ var ts;
return finishNode(node);
}
function parseTypeAssertion() {
- var node = createNode(182);
+ var node = createNode(183);
parseExpected(26);
node.type = parseType();
parseExpected(28);
@@ -15969,7 +17815,7 @@ var ts;
while (true) {
var dotToken = parseOptionalToken(22);
if (dotToken) {
- var propertyAccess = createNode(177, expression.pos);
+ var propertyAccess = createNode(178, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(true);
expression = finishNode(propertyAccess);
@@ -15977,13 +17823,13 @@ var ts;
}
if (token() === 50 && !scanner.hasPrecedingLineBreak()) {
nextToken();
- var nonNullExpression = createNode(201, expression.pos);
+ var nonNullExpression = createNode(202, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
if (!inDecoratorContext() && parseOptional(20)) {
- var indexedAccess = createNode(178, expression.pos);
+ var indexedAccess = createNode(179, expression.pos);
indexedAccess.expression = expression;
if (token() !== 21) {
indexedAccess.argumentExpression = allowInAnd(parseExpression);
@@ -15997,7 +17843,7 @@ var ts;
continue;
}
if (token() === 12 || token() === 13) {
- var tagExpression = createNode(181, expression.pos);
+ var tagExpression = createNode(182, expression.pos);
tagExpression.tag = expression;
tagExpression.template = token() === 12
? parseLiteralNode()
@@ -16016,7 +17862,7 @@ var ts;
if (!typeArguments) {
return expression;
}
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.typeArguments = typeArguments;
callExpr.arguments = parseArgumentList();
@@ -16024,7 +17870,7 @@ var ts;
continue;
}
else if (token() === 18) {
- var callExpr = createNode(179, expression.pos);
+ var callExpr = createNode(180, expression.pos);
callExpr.expression = expression;
callExpr.arguments = parseArgumentList();
expression = finishNode(callExpr);
@@ -16119,28 +17965,28 @@ var ts;
return parseIdentifier(ts.Diagnostics.Expression_expected);
}
function parseParenthesizedExpression() {
- var node = createNode(183);
+ var node = createNode(184);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
return finishNode(node);
}
function parseSpreadElement() {
- var node = createNode(196);
+ var node = createNode(197);
parseExpected(23);
node.expression = parseAssignmentExpressionOrHigher();
return finishNode(node);
}
function parseArgumentOrArrayLiteralElement() {
return token() === 23 ? parseSpreadElement() :
- token() === 25 ? createNode(198) :
+ token() === 25 ? createNode(199) :
parseAssignmentExpressionOrHigher();
}
function parseArgumentExpression() {
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
}
function parseArrayLiteralExpression() {
- var node = createNode(175);
+ var node = createNode(176);
parseExpected(20);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16151,18 +17997,18 @@ var ts;
}
function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
if (parseContextualModifier(124)) {
- return parseAccessorDeclaration(151, fullStart, decorators, modifiers);
- }
- else if (parseContextualModifier(133)) {
return parseAccessorDeclaration(152, fullStart, decorators, modifiers);
}
+ else if (parseContextualModifier(134)) {
+ return parseAccessorDeclaration(153, fullStart, decorators, modifiers);
+ }
return undefined;
}
function parseObjectLiteralElement() {
var fullStart = scanner.getStartPos();
var dotDotDotToken = parseOptionalToken(23);
if (dotDotDotToken) {
- var spreadElement = createNode(259, fullStart);
+ var spreadElement = createNode(262, fullStart);
spreadElement.expression = parseAssignmentExpressionOrHigher();
return addJSDocComment(finishNode(spreadElement));
}
@@ -16181,7 +18027,7 @@ var ts;
}
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 || token() === 17 || token() === 57);
if (isShorthandPropertyAssignment) {
- var shorthandDeclaration = createNode(258, fullStart);
+ var shorthandDeclaration = createNode(261, fullStart);
shorthandDeclaration.name = propertyName;
shorthandDeclaration.questionToken = questionToken;
var equalsToken = parseOptionalToken(57);
@@ -16192,7 +18038,7 @@ var ts;
return addJSDocComment(finishNode(shorthandDeclaration));
}
else {
- var propertyAssignment = createNode(257, fullStart);
+ var propertyAssignment = createNode(260, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
@@ -16202,7 +18048,7 @@ var ts;
}
}
function parseObjectLiteralExpression() {
- var node = createNode(176);
+ var node = createNode(177);
parseExpected(16);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16216,7 +18062,7 @@ var ts;
if (saveDecoratorContext) {
setDecoratorContext(false);
}
- var node = createNode(184);
+ var node = createNode(185);
node.modifiers = parseModifiers();
parseExpected(88);
node.asteriskToken = parseOptionalToken(38);
@@ -16238,8 +18084,15 @@ var ts;
return isIdentifier() ? parseIdentifier() : undefined;
}
function parseNewExpression() {
- var node = createNode(180);
+ var fullStart = scanner.getStartPos();
parseExpected(93);
+ if (parseOptional(22)) {
+ var node_1 = createNode(203, fullStart);
+ node_1.keywordToken = 93;
+ node_1.name = parseIdentifierName();
+ return finishNode(node_1);
+ }
+ var node = createNode(181, fullStart);
node.expression = parseMemberExpressionOrHigher();
node.typeArguments = tryParse(parseTypeArgumentsInExpression);
if (node.typeArguments || token() === 18) {
@@ -16248,7 +18101,7 @@ var ts;
return finishNode(node);
}
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
- var node = createNode(204);
+ var node = createNode(206);
if (parseExpected(16, diagnosticMessage) || ignoreMissingOpenBrace) {
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -16279,12 +18132,12 @@ var ts;
return block;
}
function parseEmptyStatement() {
- var node = createNode(206);
+ var node = createNode(208);
parseExpected(24);
return finishNode(node);
}
function parseIfStatement() {
- var node = createNode(208);
+ var node = createNode(210);
parseExpected(89);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16294,7 +18147,7 @@ var ts;
return finishNode(node);
}
function parseDoStatement() {
- var node = createNode(209);
+ var node = createNode(211);
parseExpected(80);
node.statement = parseStatement();
parseExpected(105);
@@ -16305,7 +18158,7 @@ var ts;
return finishNode(node);
}
function parseWhileStatement() {
- var node = createNode(210);
+ var node = createNode(212);
parseExpected(105);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16316,6 +18169,7 @@ var ts;
function parseForOrForInOrForOfStatement() {
var pos = getNodePos();
parseExpected(87);
+ var awaitToken = parseOptionalToken(120);
parseExpected(18);
var initializer = undefined;
if (token() !== 24) {
@@ -16327,22 +18181,23 @@ var ts;
}
}
var forOrForInOrForOfStatement;
- if (parseOptional(91)) {
- var forInStatement = createNode(212, pos);
- forInStatement.initializer = initializer;
- forInStatement.expression = allowInAnd(parseExpression);
- parseExpected(19);
- forOrForInOrForOfStatement = forInStatement;
- }
- else if (parseOptional(140)) {
- var forOfStatement = createNode(213, pos);
+ if (awaitToken ? parseExpected(141) : parseOptional(141)) {
+ var forOfStatement = createNode(215, pos);
+ forOfStatement.awaitModifier = awaitToken;
forOfStatement.initializer = initializer;
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
parseExpected(19);
forOrForInOrForOfStatement = forOfStatement;
}
+ else if (parseOptional(91)) {
+ var forInStatement = createNode(214, pos);
+ forInStatement.initializer = initializer;
+ forInStatement.expression = allowInAnd(parseExpression);
+ parseExpected(19);
+ forOrForInOrForOfStatement = forInStatement;
+ }
else {
- var forStatement = createNode(211, pos);
+ var forStatement = createNode(213, pos);
forStatement.initializer = initializer;
parseExpected(24);
if (token() !== 24 && token() !== 19) {
@@ -16360,7 +18215,7 @@ var ts;
}
function parseBreakOrContinueStatement(kind) {
var node = createNode(kind);
- parseExpected(kind === 215 ? 71 : 76);
+ parseExpected(kind === 217 ? 71 : 76);
if (!canParseSemicolon()) {
node.label = parseIdentifier();
}
@@ -16368,7 +18223,7 @@ var ts;
return finishNode(node);
}
function parseReturnStatement() {
- var node = createNode(216);
+ var node = createNode(218);
parseExpected(95);
if (!canParseSemicolon()) {
node.expression = allowInAnd(parseExpression);
@@ -16377,7 +18232,7 @@ var ts;
return finishNode(node);
}
function parseWithStatement() {
- var node = createNode(217);
+ var node = createNode(219);
parseExpected(106);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
@@ -16386,7 +18241,7 @@ var ts;
return finishNode(node);
}
function parseCaseClause() {
- var node = createNode(253);
+ var node = createNode(256);
parseExpected(72);
node.expression = allowInAnd(parseExpression);
parseExpected(55);
@@ -16394,7 +18249,7 @@ var ts;
return finishNode(node);
}
function parseDefaultClause() {
- var node = createNode(254);
+ var node = createNode(257);
parseExpected(78);
parseExpected(55);
node.statements = parseList(3, parseStatement);
@@ -16404,12 +18259,12 @@ var ts;
return token() === 72 ? parseCaseClause() : parseDefaultClause();
}
function parseSwitchStatement() {
- var node = createNode(218);
+ var node = createNode(220);
parseExpected(97);
parseExpected(18);
node.expression = allowInAnd(parseExpression);
parseExpected(19);
- var caseBlock = createNode(232, scanner.getStartPos());
+ var caseBlock = createNode(234, scanner.getStartPos());
parseExpected(16);
caseBlock.clauses = parseList(2, parseCaseOrDefaultClause);
parseExpected(17);
@@ -16417,14 +18272,14 @@ var ts;
return finishNode(node);
}
function parseThrowStatement() {
- var node = createNode(220);
+ var node = createNode(222);
parseExpected(99);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
parseSemicolon();
return finishNode(node);
}
function parseTryStatement() {
- var node = createNode(221);
+ var node = createNode(223);
parseExpected(101);
node.tryBlock = parseBlock(false);
node.catchClause = token() === 73 ? parseCatchClause() : undefined;
@@ -16435,7 +18290,7 @@ var ts;
return finishNode(node);
}
function parseCatchClause() {
- var result = createNode(256);
+ var result = createNode(259);
parseExpected(73);
if (parseExpected(18)) {
result.variableDeclaration = parseVariableDeclaration();
@@ -16445,7 +18300,7 @@ var ts;
return finishNode(result);
}
function parseDebuggerStatement() {
- var node = createNode(222);
+ var node = createNode(224);
parseExpected(77);
parseSemicolon();
return finishNode(node);
@@ -16454,13 +18309,13 @@ var ts;
var fullStart = scanner.getStartPos();
var expression = allowInAnd(parseExpression);
if (expression.kind === 70 && parseOptional(55)) {
- var labeledStatement = createNode(219, fullStart);
+ var labeledStatement = createNode(221, fullStart);
labeledStatement.label = expression;
labeledStatement.statement = parseStatement();
return addJSDocComment(finishNode(labeledStatement));
}
else {
- var expressionStatement = createNode(207, fullStart);
+ var expressionStatement = createNode(209, fullStart);
expressionStatement.expression = expression;
parseSemicolon();
return addJSDocComment(finishNode(expressionStatement));
@@ -16470,6 +18325,10 @@ var ts;
nextToken();
return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak();
}
+ function nextTokenIsClassKeywordOnSameLine() {
+ nextToken();
+ return token() === 74 && !scanner.hasPrecedingLineBreak();
+ }
function nextTokenIsFunctionKeywordOnSameLine() {
nextToken();
return token() === 88 && !scanner.hasPrecedingLineBreak();
@@ -16489,7 +18348,7 @@ var ts;
case 82:
return true;
case 108:
- case 136:
+ case 137:
return nextTokenIsIdentifierOnSameLine();
case 127:
case 128:
@@ -16506,7 +18365,7 @@ var ts;
return false;
}
continue;
- case 139:
+ case 140:
nextToken();
return token() === 16 || token() === 70 || token() === 83;
case 90:
@@ -16566,8 +18425,8 @@ var ts;
case 108:
case 127:
case 128:
- case 136:
- case 139:
+ case 137:
+ case 140:
return true;
case 113:
case 111:
@@ -16612,9 +18471,9 @@ var ts;
case 87:
return parseForOrForInOrForOfStatement();
case 76:
- return parseBreakOrContinueStatement(214);
+ return parseBreakOrContinueStatement(216);
case 71:
- return parseBreakOrContinueStatement(215);
+ return parseBreakOrContinueStatement(217);
case 95:
return parseReturnStatement();
case 106:
@@ -16633,7 +18492,7 @@ var ts;
return parseDeclaration();
case 119:
case 108:
- case 136:
+ case 137:
case 127:
case 128:
case 123:
@@ -16647,7 +18506,7 @@ var ts;
case 116:
case 114:
case 130:
- case 139:
+ case 140:
if (isStartOfDeclaration()) {
return parseDeclaration();
}
@@ -16670,11 +18529,11 @@ var ts;
return parseClassDeclaration(fullStart, decorators, modifiers);
case 108:
return parseInterfaceDeclaration(fullStart, decorators, modifiers);
- case 136:
+ case 137:
return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
case 82:
return parseEnumDeclaration(fullStart, decorators, modifiers);
- case 139:
+ case 140:
case 127:
case 128:
return parseModuleDeclaration(fullStart, decorators, modifiers);
@@ -16693,7 +18552,7 @@ var ts;
}
default:
if (decorators || modifiers) {
- var node = createMissingNode(244, true, ts.Diagnostics.Declaration_expected);
+ var node = createMissingNode(246, true, ts.Diagnostics.Declaration_expected);
node.pos = fullStart;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -16714,16 +18573,16 @@ var ts;
}
function parseArrayBindingElement() {
if (token() === 25) {
- return createNode(198);
+ return createNode(199);
}
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
node.name = parseIdentifierOrPattern();
node.initializer = parseBindingElementInitializer(false);
return finishNode(node);
}
function parseObjectBindingElement() {
- var node = createNode(174);
+ var node = createNode(175);
node.dotDotDotToken = parseOptionalToken(23);
var tokenIsIdentifier = isIdentifier();
var propertyName = parsePropertyName();
@@ -16739,14 +18598,14 @@ var ts;
return finishNode(node);
}
function parseObjectBindingPattern() {
- var node = createNode(172);
+ var node = createNode(173);
parseExpected(16);
node.elements = parseDelimitedList(9, parseObjectBindingElement);
parseExpected(17);
return finishNode(node);
}
function parseArrayBindingPattern() {
- var node = createNode(173);
+ var node = createNode(174);
parseExpected(20);
node.elements = parseDelimitedList(10, parseArrayBindingElement);
parseExpected(21);
@@ -16765,7 +18624,7 @@ var ts;
return parseIdentifier();
}
function parseVariableDeclaration() {
- var node = createNode(223);
+ var node = createNode(225);
node.name = parseIdentifierOrPattern();
node.type = parseTypeAnnotation();
if (!isInOrOfKeyword(token())) {
@@ -16774,7 +18633,7 @@ var ts;
return finishNode(node);
}
function parseVariableDeclarationList(inForStatementInitializer) {
- var node = createNode(224);
+ var node = createNode(226);
switch (token()) {
case 103:
break;
@@ -16788,7 +18647,7 @@ var ts;
ts.Debug.fail();
}
nextToken();
- if (token() === 140 && lookAhead(canFollowContextualOfKeyword)) {
+ if (token() === 141 && lookAhead(canFollowContextualOfKeyword)) {
node.declarations = createMissingList();
}
else {
@@ -16803,7 +18662,7 @@ var ts;
return nextTokenIsIdentifier() && nextToken() === 19;
}
function parseVariableStatement(fullStart, decorators, modifiers) {
- var node = createNode(205, fullStart);
+ var node = createNode(207, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.declarationList = parseVariableDeclarationList(false);
@@ -16811,7 +18670,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseFunctionDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(225, fullStart);
+ var node = createNode(227, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(88);
@@ -16824,7 +18683,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseConstructorDeclaration(pos, decorators, modifiers) {
- var node = createNode(150, pos);
+ var node = createNode(151, pos);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(122);
@@ -16833,7 +18692,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
- var method = createNode(149, fullStart);
+ var method = createNode(150, fullStart);
method.decorators = decorators;
method.modifiers = modifiers;
method.asteriskToken = asteriskToken;
@@ -16846,7 +18705,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
- var property = createNode(147, fullStart);
+ var property = createNode(148, fullStart);
property.decorators = decorators;
property.modifiers = modifiers;
property.name = name;
@@ -16854,7 +18713,7 @@ var ts;
property.type = parseTypeAnnotation();
property.initializer = ts.hasModifier(property, 32)
? allowInAnd(parseNonParameterInitializer)
- : doOutsideOfContext(131072 | 65536, parseNonParameterInitializer);
+ : doOutsideOfContext(4096 | 2048, parseNonParameterInitializer);
parseSemicolon();
return addJSDocComment(finishNode(property));
}
@@ -16916,7 +18775,7 @@ var ts;
return true;
}
if (idToken !== undefined) {
- if (!ts.isKeyword(idToken) || idToken === 133 || idToken === 124) {
+ if (!ts.isKeyword(idToken) || idToken === 134 || idToken === 124) {
return true;
}
switch (token()) {
@@ -16939,7 +18798,7 @@ var ts;
if (!parseOptional(56)) {
break;
}
- var decorator = createNode(145, decoratorStart);
+ var decorator = createNode(146, decoratorStart);
decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
finishNode(decorator);
if (!decorators) {
@@ -16996,7 +18855,7 @@ var ts;
}
function parseClassElement() {
if (token() === 24) {
- var result = createNode(203);
+ var result = createNode(205);
nextToken();
return finishNode(result);
}
@@ -17021,16 +18880,16 @@ var ts;
return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers);
}
if (decorators || modifiers) {
- var name_15 = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
- return parsePropertyDeclaration(fullStart, decorators, modifiers, name_15, undefined);
+ var name = createMissingNode(70, true, ts.Diagnostics.Declaration_expected);
+ return parsePropertyDeclaration(fullStart, decorators, modifiers, name, undefined);
}
ts.Debug.fail("Should not have attempted to parse class member declaration.");
}
function parseClassExpression() {
- return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 197);
+ return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 198);
}
function parseClassDeclaration(fullStart, decorators, modifiers) {
- return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 226);
+ return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228);
}
function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
var node = createNode(kind, fullStart);
@@ -17064,9 +18923,10 @@ var ts;
return undefined;
}
function parseHeritageClause() {
- if (token() === 84 || token() === 107) {
- var node = createNode(255);
- node.token = token();
+ var tok = token();
+ if (tok === 84 || tok === 107) {
+ var node = createNode(258);
+ node.token = tok;
nextToken();
node.types = parseDelimitedList(7, parseExpressionWithTypeArguments);
return finishNode(node);
@@ -17074,7 +18934,7 @@ var ts;
return undefined;
}
function parseExpressionWithTypeArguments() {
- var node = createNode(199);
+ var node = createNode(200);
node.expression = parseLeftHandSideExpressionOrHigher();
if (token() === 26) {
node.typeArguments = parseBracketedList(19, parseType, 26, 28);
@@ -17088,7 +18948,7 @@ var ts;
return parseList(5, parseClassElement);
}
function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(227, fullStart);
+ var node = createNode(229, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(108);
@@ -17099,10 +18959,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(228, fullStart);
+ var node = createNode(230, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- parseExpected(136);
+ parseExpected(137);
node.name = parseIdentifier();
node.typeParameters = parseTypeParameters();
parseExpected(57);
@@ -17111,13 +18971,13 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseEnumMember() {
- var node = createNode(260, scanner.getStartPos());
+ var node = createNode(263, scanner.getStartPos());
node.name = parsePropertyName();
node.initializer = allowInAnd(parseNonParameterInitializer);
return addJSDocComment(finishNode(node));
}
function parseEnumDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(229, fullStart);
+ var node = createNode(231, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(82);
@@ -17132,7 +18992,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseModuleBlock() {
- var node = createNode(231, scanner.getStartPos());
+ var node = createNode(233, scanner.getStartPos());
if (parseExpected(16)) {
node.statements = parseList(1, parseStatement);
parseExpected(17);
@@ -17143,7 +19003,7 @@ var ts;
return finishNode(node);
}
function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
var namespaceFlag = flags & 16;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -17155,10 +19015,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(230, fullStart);
+ var node = createNode(232, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- if (token() === 139) {
+ if (token() === 140) {
node.name = parseIdentifier();
node.flags |= 512;
}
@@ -17175,7 +19035,7 @@ var ts;
}
function parseModuleDeclaration(fullStart, decorators, modifiers) {
var flags = 0;
- if (token() === 139) {
+ if (token() === 140) {
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
}
else if (parseOptional(128)) {
@@ -17200,7 +19060,7 @@ var ts;
return nextToken() === 40;
}
function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) {
- var exportDeclaration = createNode(233, fullStart);
+ var exportDeclaration = createNode(235, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(117);
@@ -17215,38 +19075,41 @@ var ts;
var identifier;
if (isIdentifier()) {
identifier = parseIdentifier();
- if (token() !== 25 && token() !== 138) {
- var importEqualsDeclaration = createNode(234, fullStart);
- importEqualsDeclaration.decorators = decorators;
- importEqualsDeclaration.modifiers = modifiers;
- importEqualsDeclaration.name = identifier;
- parseExpected(57);
- importEqualsDeclaration.moduleReference = parseModuleReference();
- parseSemicolon();
- return addJSDocComment(finishNode(importEqualsDeclaration));
- }
- }
- var importDeclaration = createNode(235, fullStart);
+ if (token() !== 25 && token() !== 139) {
+ return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier);
+ }
+ }
+ var importDeclaration = createNode(237, fullStart);
importDeclaration.decorators = decorators;
importDeclaration.modifiers = modifiers;
if (identifier ||
token() === 38 ||
token() === 16) {
importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
- parseExpected(138);
+ parseExpected(139);
}
importDeclaration.moduleSpecifier = parseModuleSpecifier();
parseSemicolon();
return finishNode(importDeclaration);
}
+ function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) {
+ var importEqualsDeclaration = createNode(236, fullStart);
+ importEqualsDeclaration.decorators = decorators;
+ importEqualsDeclaration.modifiers = modifiers;
+ importEqualsDeclaration.name = identifier;
+ parseExpected(57);
+ importEqualsDeclaration.moduleReference = parseModuleReference();
+ parseSemicolon();
+ return addJSDocComment(finishNode(importEqualsDeclaration));
+ }
function parseImportClause(identifier, fullStart) {
- var importClause = createNode(236, fullStart);
+ var importClause = createNode(238, fullStart);
if (identifier) {
importClause.name = identifier;
}
if (!importClause.name ||
parseOptional(25)) {
- importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(238);
+ importClause.namedBindings = token() === 38 ? parseNamespaceImport() : parseNamedImportsOrExports(240);
}
return finishNode(importClause);
}
@@ -17256,7 +19119,7 @@ var ts;
: parseEntityName(false);
}
function parseExternalModuleReference() {
- var node = createNode(245);
+ var node = createNode(247);
parseExpected(131);
parseExpected(18);
node.expression = parseModuleSpecifier();
@@ -17274,7 +19137,7 @@ var ts;
}
}
function parseNamespaceImport() {
- var namespaceImport = createNode(237);
+ var namespaceImport = createNode(239);
parseExpected(38);
parseExpected(117);
namespaceImport.name = parseIdentifier();
@@ -17282,14 +19145,14 @@ var ts;
}
function parseNamedImportsOrExports(kind) {
var node = createNode(kind);
- node.elements = parseBracketedList(22, kind === 238 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
+ node.elements = parseBracketedList(22, kind === 240 ? parseImportSpecifier : parseExportSpecifier, 16, 17);
return finishNode(node);
}
function parseExportSpecifier() {
- return parseImportOrExportSpecifier(243);
+ return parseImportOrExportSpecifier(245);
}
function parseImportSpecifier() {
- return parseImportOrExportSpecifier(239);
+ return parseImportOrExportSpecifier(241);
}
function parseImportOrExportSpecifier(kind) {
var node = createNode(kind);
@@ -17308,23 +19171,23 @@ var ts;
else {
node.name = identifierName;
}
- if (kind === 239 && checkIdentifierIsKeyword) {
+ if (kind === 241 && checkIdentifierIsKeyword) {
parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
}
return finishNode(node);
}
function parseExportDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(241, fullStart);
+ var node = createNode(243, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(38)) {
- parseExpected(138);
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
else {
- node.exportClause = parseNamedImportsOrExports(242);
- if (token() === 138 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
- parseExpected(138);
+ node.exportClause = parseNamedImportsOrExports(244);
+ if (token() === 139 || (token() === 9 && !scanner.hasPrecedingLineBreak())) {
+ parseExpected(139);
node.moduleSpecifier = parseModuleSpecifier();
}
}
@@ -17332,7 +19195,7 @@ var ts;
return finishNode(node);
}
function parseExportAssignment(fullStart, decorators, modifiers) {
- var node = createNode(240, fullStart);
+ var node = createNode(242, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(57)) {
@@ -17351,6 +19214,7 @@ var ts;
var typeReferenceDirectives = [];
var amdDependencies = [];
var amdModuleName;
+ var checkJsDirective = undefined;
while (true) {
var kind = triviaScanner.scan();
if (kind !== 2) {
@@ -17361,7 +19225,11 @@ var ts;
break;
}
}
- var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
+ var range = {
+ kind: triviaScanner.getToken(),
+ pos: triviaScanner.getTokenPos(),
+ end: triviaScanner.getTextPos(),
+ };
var comment = sourceText.substring(range.pos, range.end);
var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
if (referencePathMatchResult) {
@@ -17401,24 +19269,71 @@ var ts;
amdDependencies.push(amdDependency);
}
}
+ var checkJsDirectiveRegEx = /^\/\/\/?\s*(@ts-check|@ts-nocheck)\s*$/gim;
+ var checkJsDirectiveMatchResult = checkJsDirectiveRegEx.exec(comment);
+ if (checkJsDirectiveMatchResult) {
+ checkJsDirective = {
+ enabled: ts.compareStrings(checkJsDirectiveMatchResult[1], "@ts-check", true) === 0,
+ end: range.end,
+ pos: range.pos
+ };
+ }
}
}
sourceFile.referencedFiles = referencedFiles;
sourceFile.typeReferenceDirectives = typeReferenceDirectives;
sourceFile.amdDependencies = amdDependencies;
sourceFile.moduleName = amdModuleName;
+ sourceFile.checkJsDirective = checkJsDirective;
}
function setExternalModuleIndicator(sourceFile) {
sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
return ts.hasModifier(node, 1)
- || node.kind === 234 && node.moduleReference.kind === 245
- || node.kind === 235
- || node.kind === 240
- || node.kind === 241
+ || node.kind === 236 && node.moduleReference.kind === 247
+ || node.kind === 237
+ || node.kind === 242
+ || node.kind === 243
? node
: undefined;
});
}
+ var ParsingContext;
+ (function (ParsingContext) {
+ ParsingContext[ParsingContext["SourceElements"] = 0] = "SourceElements";
+ ParsingContext[ParsingContext["BlockStatements"] = 1] = "BlockStatements";
+ ParsingContext[ParsingContext["SwitchClauses"] = 2] = "SwitchClauses";
+ ParsingContext[ParsingContext["SwitchClauseStatements"] = 3] = "SwitchClauseStatements";
+ ParsingContext[ParsingContext["TypeMembers"] = 4] = "TypeMembers";
+ ParsingContext[ParsingContext["ClassMembers"] = 5] = "ClassMembers";
+ ParsingContext[ParsingContext["EnumMembers"] = 6] = "EnumMembers";
+ ParsingContext[ParsingContext["HeritageClauseElement"] = 7] = "HeritageClauseElement";
+ ParsingContext[ParsingContext["VariableDeclarations"] = 8] = "VariableDeclarations";
+ ParsingContext[ParsingContext["ObjectBindingElements"] = 9] = "ObjectBindingElements";
+ ParsingContext[ParsingContext["ArrayBindingElements"] = 10] = "ArrayBindingElements";
+ ParsingContext[ParsingContext["ArgumentExpressions"] = 11] = "ArgumentExpressions";
+ ParsingContext[ParsingContext["ObjectLiteralMembers"] = 12] = "ObjectLiteralMembers";
+ ParsingContext[ParsingContext["JsxAttributes"] = 13] = "JsxAttributes";
+ ParsingContext[ParsingContext["JsxChildren"] = 14] = "JsxChildren";
+ ParsingContext[ParsingContext["ArrayLiteralMembers"] = 15] = "ArrayLiteralMembers";
+ ParsingContext[ParsingContext["Parameters"] = 16] = "Parameters";
+ ParsingContext[ParsingContext["RestProperties"] = 17] = "RestProperties";
+ ParsingContext[ParsingContext["TypeParameters"] = 18] = "TypeParameters";
+ ParsingContext[ParsingContext["TypeArguments"] = 19] = "TypeArguments";
+ ParsingContext[ParsingContext["TupleElementTypes"] = 20] = "TupleElementTypes";
+ ParsingContext[ParsingContext["HeritageClauses"] = 21] = "HeritageClauses";
+ ParsingContext[ParsingContext["ImportOrExportSpecifiers"] = 22] = "ImportOrExportSpecifiers";
+ ParsingContext[ParsingContext["JSDocFunctionParameters"] = 23] = "JSDocFunctionParameters";
+ ParsingContext[ParsingContext["JSDocTypeArguments"] = 24] = "JSDocTypeArguments";
+ ParsingContext[ParsingContext["JSDocRecordMembers"] = 25] = "JSDocRecordMembers";
+ ParsingContext[ParsingContext["JSDocTupleTypes"] = 26] = "JSDocTupleTypes";
+ ParsingContext[ParsingContext["Count"] = 27] = "Count";
+ })(ParsingContext || (ParsingContext = {}));
+ var Tristate;
+ (function (Tristate) {
+ Tristate[Tristate["False"] = 0] = "False";
+ Tristate[Tristate["True"] = 1] = "True";
+ Tristate[Tristate["Unknown"] = 2] = "Unknown";
+ })(Tristate || (Tristate = {}));
var JSDocParser;
(function (JSDocParser) {
function isJSDocType() {
@@ -17450,7 +19365,7 @@ var ts;
}
JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests;
function parseJSDocTypeExpression() {
- var result = createNode(262, scanner.getTokenPos());
+ var result = createNode(266, scanner.getTokenPos());
parseExpected(16);
result.type = parseJSDocTopLevelType();
parseExpected(17);
@@ -17461,12 +19376,12 @@ var ts;
function parseJSDocTopLevelType() {
var type = parseJSDocType();
if (token() === 48) {
- var unionType = createNode(266, type.pos);
+ var unionType = createNode(270, type.pos);
unionType.types = parseJSDocTypeList(type);
type = finishNode(unionType);
}
if (token() === 57) {
- var optionalType = createNode(273, type.pos);
+ var optionalType = createNode(277, type.pos);
nextToken();
optionalType.type = type;
type = finishNode(optionalType);
@@ -17477,20 +19392,20 @@ var ts;
var type = parseBasicTypeExpression();
while (true) {
if (token() === 20) {
- var arrayType = createNode(265, type.pos);
+ var arrayType = createNode(269, type.pos);
arrayType.elementType = type;
nextToken();
parseExpected(21);
type = finishNode(arrayType);
}
else if (token() === 54) {
- var nullableType = createNode(268, type.pos);
+ var nullableType = createNode(272, type.pos);
nullableType.type = type;
nextToken();
type = finishNode(nullableType);
}
else if (token() === 50) {
- var nonNullableType = createNode(269, type.pos);
+ var nonNullableType = createNode(273, type.pos);
nonNullableType.type = type;
nextToken();
type = finishNode(nonNullableType);
@@ -17524,14 +19439,15 @@ var ts;
case 98:
return parseJSDocThisType();
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
case 104:
case 94:
- case 137:
+ case 138:
case 129:
+ case 133:
return parseTokenNode();
case 9:
case 8:
@@ -17542,27 +19458,27 @@ var ts;
return parseJSDocTypeReference();
}
function parseJSDocThisType() {
- var result = createNode(277);
+ var result = createNode(281);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocConstructorType() {
- var result = createNode(276);
+ var result = createNode(280);
nextToken();
parseExpected(55);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocVariadicType() {
- var result = createNode(275);
+ var result = createNode(279);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocFunctionType() {
- var result = createNode(274);
+ var result = createNode(278);
nextToken();
parseExpected(18);
result.parameters = parseDelimitedList(23, parseJSDocParameter);
@@ -17575,7 +19491,7 @@ var ts;
return finishNode(result);
}
function parseJSDocParameter() {
- var parameter = createNode(144);
+ var parameter = createNode(145);
parameter.type = parseJSDocType();
if (parseOptional(57)) {
parameter.questionToken = createNode(57);
@@ -17583,7 +19499,7 @@ var ts;
return finishNode(parameter);
}
function parseJSDocTypeReference() {
- var result = createNode(272);
+ var result = createNode(276);
result.name = parseSimplePropertyName();
if (token() === 26) {
result.typeArguments = parseTypeArguments();
@@ -17617,24 +19533,24 @@ var ts;
}
}
function parseQualifiedName(left) {
- var result = createNode(141, left.pos);
+ var result = createNode(142, left.pos);
result.left = left;
result.right = parseIdentifierName();
return finishNode(result);
}
function parseJSDocRecordType() {
- var result = createNode(270);
+ var result = createNode(274);
result.literal = parseTypeLiteral();
return finishNode(result);
}
function parseJSDocNonNullableType() {
- var result = createNode(269);
+ var result = createNode(273);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocTupleType() {
- var result = createNode(267);
+ var result = createNode(271);
nextToken();
result.types = parseDelimitedList(26, parseJSDocType);
checkForTrailingComma(result.types);
@@ -17648,7 +19564,7 @@ var ts;
}
}
function parseJSDocUnionType() {
- var result = createNode(266);
+ var result = createNode(270);
nextToken();
result.types = parseJSDocTypeList(parseJSDocType());
parseExpected(19);
@@ -17664,12 +19580,12 @@ var ts;
return types;
}
function parseJSDocAllType() {
- var result = createNode(263);
+ var result = createNode(267);
nextToken();
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(288);
+ var result = createNode(292);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -17682,11 +19598,11 @@ var ts;
token() === 28 ||
token() === 57 ||
token() === 48) {
- var result = createNode(264, pos);
+ var result = createNode(268, pos);
return finishNode(result);
}
else {
- var result = createNode(268, pos);
+ var result = createNode(272, pos);
result.type = parseJSDocType();
return finishNode(result);
}
@@ -17714,6 +19630,12 @@ var ts;
return comment;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
+ var JSDocState;
+ (function (JSDocState) {
+ JSDocState[JSDocState["BeginningOfLine"] = 0] = "BeginningOfLine";
+ JSDocState[JSDocState["SawAsterisk"] = 1] = "SawAsterisk";
+ JSDocState[JSDocState["SavingComments"] = 2] = "SavingComments";
+ })(JSDocState || (JSDocState = {}));
function parseJSDocCommentWorker(start, length) {
var content = sourceText;
start = start || 0;
@@ -17771,7 +19693,7 @@ var ts;
break;
case 38:
var asterisk = scanner.getTokenText();
- if (state === 1) {
+ if (state === 1 || state === 2) {
state = 2;
pushComment(asterisk);
}
@@ -17786,7 +19708,10 @@ var ts;
break;
case 5:
var whitespace = scanner.getTokenText();
- if (state === 2 || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === 2) {
+ comments.push(whitespace);
+ }
+ else if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent - 1));
}
indent += whitespace.length;
@@ -17794,6 +19719,7 @@ var ts;
case 1:
break;
default:
+ state = 2;
pushComment(scanner.getTokenText());
break;
}
@@ -17826,7 +19752,7 @@ var ts;
content.charCodeAt(start + 3) !== 42;
}
function createJSDocComment() {
- var result = createNode(278, start);
+ var result = createNode(282, start);
result.tags = tags;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
@@ -17883,7 +19809,7 @@ var ts;
}
function parseTagComments(indent) {
var comments = [];
- var state = 1;
+ var state = 0;
var margin;
function pushComment(text) {
if (!margin) {
@@ -17936,7 +19862,7 @@ var ts;
return comments;
}
function parseUnknownTag(atToken, tagName) {
- var result = createNode(279, atToken.pos);
+ var result = createNode(283, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
@@ -17991,7 +19917,7 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(281, atToken.pos);
+ var result = createNode(285, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
@@ -18002,20 +19928,20 @@ var ts;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 282; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 286; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(282, atToken.pos);
+ var result = createNode(286, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 283; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(283, atToken.pos);
+ var result = createNode(287, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
@@ -18030,7 +19956,7 @@ var ts;
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var result = createNode(286, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.name = name;
@@ -18039,7 +19965,7 @@ var ts;
}
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
- var result = createNode(280, atToken.pos);
+ var result = createNode(284, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = typeExpression;
@@ -18048,25 +19974,28 @@ var ts;
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(285, atToken.pos);
+ var typedefTag = createNode(289, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
- while (rightNode.kind !== 70) {
+ while (true) {
+ if (rightNode.kind === 70 || !rightNode.body) {
+ typedefTag.name = rightNode.kind === 70 ? rightNode : rightNode.name;
+ break;
+ }
rightNode = rightNode.body;
}
- typedefTag.name = rightNode;
}
typedefTag.typeExpression = typeExpression;
skipWhitespace();
if (typeExpression) {
- if (typeExpression.type.kind === 272) {
+ if (typeExpression.type.kind === 276) {
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 70) {
- var name_16 = jsDocTypeReference.name;
- if (name_16.text === "Object") {
+ var name = jsDocTypeReference.name;
+ if (name.text === "Object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -18080,7 +20009,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(287, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(291, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -18110,6 +20039,7 @@ var ts;
break;
case 70:
canParseTag = false;
+ break;
case 1:
break;
}
@@ -18121,7 +20051,7 @@ var ts;
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(22)) {
- var jsDocNamespaceNode = createNode(230, pos);
+ var jsDocNamespaceNode = createNode(232, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
@@ -18165,19 +20095,19 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 284; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
while (true) {
- var name_17 = parseJSDocIdentifierName();
+ var name = parseJSDocIdentifierName();
skipWhitespace();
- if (!name_17) {
+ if (!name) {
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var typeParameter = createNode(143, name_17.pos);
- typeParameter.name = name_17;
+ var typeParameter = createNode(144, name.pos);
+ typeParameter.name = name;
finishNode(typeParameter);
typeParameters.push(typeParameter);
if (token() === 25) {
@@ -18188,7 +20118,7 @@ var ts;
break;
}
}
- var result = createNode(284, atToken.pos);
+ var result = createNode(288, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -18480,7 +20410,7 @@ var ts;
}
function visitArray(array) {
if (position >= array.pos && position < array.end) {
- for (var i = 0, n = array.length; i < n; i++) {
+ for (var i = 0; i < array.length; i++) {
var child = array[i];
if (child) {
if (child.pos === position) {
@@ -18502,21 +20432,31 @@ var ts;
}
}
}
+ var InvalidPosition;
+ (function (InvalidPosition) {
+ InvalidPosition[InvalidPosition["Value"] = -1] = "Value";
+ })(InvalidPosition || (InvalidPosition = {}));
})(IncrementalParser || (IncrementalParser = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ModuleInstanceState;
+ (function (ModuleInstanceState) {
+ ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated";
+ ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated";
+ ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly";
+ })(ModuleInstanceState = ts.ModuleInstanceState || (ts.ModuleInstanceState = {}));
function getModuleInstanceState(node) {
- if (node.kind === 227 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 230) {
return 0;
}
else if (ts.isConstEnumDeclaration(node)) {
return 2;
}
- else if ((node.kind === 235 || node.kind === 234) && !(ts.hasModifier(node, 1))) {
+ else if ((node.kind === 237 || node.kind === 236) && !(ts.hasModifier(node, 1))) {
return 0;
}
- else if (node.kind === 231) {
+ else if (node.kind === 233) {
var state_1 = 0;
ts.forEachChild(node, function (n) {
switch (getModuleInstanceState(n)) {
@@ -18532,7 +20472,7 @@ var ts;
});
return state_1;
}
- else if (node.kind === 230) {
+ else if (node.kind === 232) {
var body = node.body;
return body ? getModuleInstanceState(body) : 1;
}
@@ -18544,6 +20484,18 @@ var ts;
}
}
ts.getModuleInstanceState = getModuleInstanceState;
+ var ContainerFlags;
+ (function (ContainerFlags) {
+ ContainerFlags[ContainerFlags["None"] = 0] = "None";
+ ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer";
+ ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer";
+ ContainerFlags[ContainerFlags["IsControlFlowContainer"] = 4] = "IsControlFlowContainer";
+ ContainerFlags[ContainerFlags["IsFunctionLike"] = 8] = "IsFunctionLike";
+ ContainerFlags[ContainerFlags["IsFunctionExpression"] = 16] = "IsFunctionExpression";
+ ContainerFlags[ContainerFlags["HasLocals"] = 32] = "HasLocals";
+ ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface";
+ ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod";
+ })(ContainerFlags || (ContainerFlags = {}));
var binder = createBinder();
function bindSourceFile(file, options) {
ts.performance.mark("beforeBind");
@@ -18614,7 +20566,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if (opts.alwaysStrict && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
return true;
}
else {
@@ -18641,7 +20593,7 @@ var ts;
if (symbolFlags & 107455) {
var valueDeclaration = symbol.valueDeclaration;
if (!valueDeclaration ||
- (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 230)) {
+ (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232)) {
symbol.valueDeclaration = node;
}
}
@@ -18651,7 +20603,7 @@ var ts;
if (ts.isAmbientModule(node)) {
return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
var nameExpression = node.name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -18662,46 +20614,47 @@ var ts;
return node.name.text;
}
switch (node.kind) {
- case 150:
+ case 151:
return "__constructor";
- case 158:
- case 153:
- return "__call";
case 159:
case 154:
- return "__new";
+ return "__call";
+ case 160:
case 155:
+ return "__new";
+ case 156:
return "__index";
- case 241:
+ case 243:
return "__export";
- case 240:
+ case 242:
return node.isExportEquals ? "export=" : "default";
- case 192:
+ case 193:
switch (ts.getSpecialPropertyAssignmentKind(node)) {
case 2:
return "export=";
case 1:
case 4:
+ case 5:
return node.left.name.text;
case 3:
return node.left.expression.name.text;
}
ts.Debug.fail("Unknown binary declaration kind");
break;
- case 225:
- case 226:
+ case 227:
+ case 228:
return ts.hasModifier(node, 512) ? "default" : undefined;
- case 274:
+ case 278:
return ts.isJSDocConstructSignature(node) ? "__new" : "__call";
- case 144:
- ts.Debug.assert(node.parent.kind === 274);
+ case 145:
+ ts.Debug.assert(node.parent.kind === 278);
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 285:
+ case 289:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
- if (parentNode && parentNode.kind === 205) {
+ if (parentNode && parentNode.kind === 207) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70) {
@@ -18724,13 +20677,16 @@ var ts;
symbol = createSymbol(0, "__missing");
}
else {
- symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0, name));
+ symbol = symbolTable.get(name);
+ if (!symbol) {
+ symbolTable.set(name, symbol = createSymbol(0, name));
+ }
if (name && (includes & 788448)) {
- classifiableNames[name] = name;
+ classifiableNames.set(name, name);
}
if (symbol.flags & excludes) {
if (symbol.isReplaceableByMethod) {
- symbol = symbolTable[name] = createSymbol(0, name);
+ symbolTable.set(name, symbol = createSymbol(0, name));
}
else {
if (node.name) {
@@ -18745,7 +20701,7 @@ var ts;
}
else {
if (symbol.declarations && symbol.declarations.length &&
- (isDefaultExport || (node.kind === 240 && !node.isExportEquals))) {
+ (isDefaultExport || (node.kind === 242 && !node.isExportEquals))) {
message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
}
}
@@ -18765,7 +20721,7 @@ var ts;
function declareModuleMember(node, symbolFlags, symbolExcludes) {
var hasExportModifier = ts.getCombinedModifierFlags(node) & 1;
if (symbolFlags & 8388608) {
- if (node.kind === 243 || (node.kind === 234 && hasExportModifier)) {
+ if (node.kind === 245 || (node.kind === 236 && hasExportModifier)) {
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
}
else {
@@ -18773,7 +20729,7 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 285 &&
+ var isJSDocTypedefInJSDocNamespace = node.kind === 289 &&
node.name &&
node.name.kind === 70 &&
node.name.isInJSDocNamespace;
@@ -18828,13 +20784,13 @@ var ts;
activeLabels = undefined;
hasExplicitReturn = false;
bindChildren(node);
- node.flags &= ~64896;
+ node.flags &= ~1408;
if (!(currentFlow.flags & 1) && containerFlags & 8 && ts.nodeIsPresent(node.body)) {
node.flags |= 128;
if (hasExplicitReturn)
node.flags |= 256;
}
- if (node.kind === 261) {
+ if (node.kind === 264) {
node.flags |= emitFlags;
}
if (isIIFE) {
@@ -18910,66 +20866,72 @@ var ts;
return;
}
switch (node.kind) {
- case 210:
+ case 212:
bindWhileStatement(node);
break;
- case 209:
+ case 211:
bindDoStatement(node);
break;
- case 211:
+ case 213:
bindForStatement(node);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
bindForInOrForOfStatement(node);
break;
- case 208:
+ case 210:
bindIfStatement(node);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
bindReturnOrThrow(node);
break;
- case 215:
- case 214:
+ case 217:
+ case 216:
bindBreakOrContinueStatement(node);
break;
- case 221:
+ case 223:
bindTryStatement(node);
break;
- case 218:
+ case 220:
bindSwitchStatement(node);
break;
- case 232:
+ case 234:
bindCaseBlock(node);
break;
- case 253:
+ case 256:
bindCaseClause(node);
break;
- case 219:
+ case 221:
bindLabeledStatement(node);
break;
- case 190:
+ case 191:
bindPrefixUnaryExpressionFlow(node);
break;
- case 191:
+ case 192:
bindPostfixUnaryExpressionFlow(node);
break;
- case 192:
+ case 193:
bindBinaryExpressionFlow(node);
break;
- case 186:
+ case 187:
bindDeleteExpressionFlow(node);
break;
- case 193:
+ case 194:
bindConditionalExpressionFlow(node);
break;
- case 223:
+ case 225:
bindVariableDeclarationFlow(node);
break;
- case 179:
+ case 180:
bindCallExpressionFlow(node);
break;
+ case 282:
+ bindJSDocComment(node);
+ break;
+ case 289:
+ bindJSDocTypedefTag(node);
+ break;
default:
bindEachChild(node);
break;
@@ -18979,15 +20941,15 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 178:
return isNarrowableReference(expr);
- case 179:
+ case 180:
return hasNarrowableArgument(expr);
- case 183:
+ case 184:
return isNarrowingExpression(expr.expression);
- case 192:
+ case 193:
return isNarrowingBinaryExpression(expr);
- case 190:
+ case 191:
return expr.operator === 50 && isNarrowingExpression(expr.operand);
}
return false;
@@ -18995,7 +20957,8 @@ var ts;
function isNarrowableReference(expr) {
return expr.kind === 70 ||
expr.kind === 98 ||
- expr.kind === 177 && isNarrowableReference(expr.expression);
+ expr.kind === 96 ||
+ expr.kind === 178 && isNarrowableReference(expr.expression);
}
function hasNarrowableArgument(expr) {
if (expr.arguments) {
@@ -19006,14 +20969,14 @@ var ts;
}
}
}
- if (expr.expression.kind === 177 &&
+ if (expr.expression.kind === 178 &&
isNarrowableReference(expr.expression.expression)) {
return true;
}
return false;
}
function isNarrowingTypeofOperands(expr1, expr2) {
- return expr1.kind === 187 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
+ return expr1.kind === 188 && isNarrowableOperand(expr1.expression) && expr2.kind === 9;
}
function isNarrowingBinaryExpression(expr) {
switch (expr.operatorToken.kind) {
@@ -19034,9 +20997,9 @@ var ts;
}
function isNarrowableOperand(expr) {
switch (expr.kind) {
- case 183:
+ case 184:
return isNarrowableOperand(expr.expression);
- case 192:
+ case 193:
switch (expr.operatorToken.kind) {
case 57:
return isNarrowableOperand(expr.left);
@@ -19130,33 +21093,33 @@ var ts;
function isStatementCondition(node) {
var parent = node.parent;
switch (parent.kind) {
- case 208:
case 210:
- case 209:
- return parent.expression === node;
+ case 212:
case 211:
- case 193:
+ return parent.expression === node;
+ case 213:
+ case 194:
return parent.condition === node;
}
return false;
}
function isLogicalExpression(node) {
while (true) {
- if (node.kind === 183) {
+ if (node.kind === 184) {
node = node.expression;
}
- else if (node.kind === 190 && node.operator === 50) {
+ else if (node.kind === 191 && node.operator === 50) {
node = node.operand;
}
else {
- return node.kind === 192 && (node.operatorToken.kind === 52 ||
+ return node.kind === 193 && (node.operatorToken.kind === 52 ||
node.operatorToken.kind === 53);
}
}
}
function isTopLevelLogicalExpression(node) {
- while (node.parent.kind === 183 ||
- node.parent.kind === 190 &&
+ while (node.parent.kind === 184 ||
+ node.parent.kind === 191 &&
node.parent.operator === 50) {
node = node.parent;
}
@@ -19198,7 +21161,7 @@ var ts;
}
function bindDoStatement(node) {
var preDoLabel = createLoopLabel();
- var enclosingLabeledStatement = node.parent.kind === 219
+ var enclosingLabeledStatement = node.parent.kind === 221
? ts.lastOrUndefined(activeLabels)
: undefined;
var preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel();
@@ -19230,10 +21193,13 @@ var ts;
var postLoopLabel = createBranchLabel();
addAntecedent(preLoopLabel, currentFlow);
currentFlow = preLoopLabel;
+ if (node.kind === 215) {
+ bind(node.awaitModifier);
+ }
bind(node.expression);
addAntecedent(postLoopLabel, currentFlow);
bind(node.initializer);
- if (node.initializer.kind !== 224) {
+ if (node.initializer.kind !== 226) {
bindAssignmentTargetFlow(node.initializer);
}
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -19255,7 +21221,7 @@ var ts;
}
function bindReturnOrThrow(node) {
bind(node.expression);
- if (node.kind === 216) {
+ if (node.kind === 218) {
hasExplicitReturn = true;
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
@@ -19275,7 +21241,7 @@ var ts;
return undefined;
}
function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
- var flowLabel = node.kind === 215 ? breakTarget : continueTarget;
+ var flowLabel = node.kind === 217 ? breakTarget : continueTarget;
if (flowLabel) {
addAntecedent(flowLabel, currentFlow);
currentFlow = unreachableFlow;
@@ -19308,7 +21274,8 @@ var ts;
flowAfterCatch = currentFlow;
}
if (node.finallyBlock) {
- addAntecedent(preFinallyLabel, preTryFlow);
+ var preFinallyFlow = { flags: 2048, antecedent: preTryFlow, lock: {} };
+ addAntecedent(preFinallyLabel, preFinallyFlow);
currentFlow = finishFlowLabel(preFinallyLabel);
bind(node.finallyBlock);
if (!(currentFlow.flags & 1)) {
@@ -19318,6 +21285,11 @@ var ts;
: unreachableFlow;
}
}
+ if (!(currentFlow.flags & 1)) {
+ var afterFinallyFlow = { flags: 4096, antecedent: currentFlow };
+ preFinallyFlow.lock = afterFinallyFlow;
+ currentFlow = afterFinallyFlow;
+ }
}
else {
currentFlow = finishFlowLabel(preFinallyLabel);
@@ -19332,7 +21304,7 @@ var ts;
preSwitchCaseFlow = currentFlow;
bind(node.caseBlock);
addAntecedent(postSwitchLabel, currentFlow);
- var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 254; });
+ var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257; });
node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
if (!hasDefault) {
addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0));
@@ -19397,13 +21369,13 @@ var ts;
if (!activeLabel.referenced && !options.allowUnusedLabels) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label));
}
- if (!node.statement || node.statement.kind !== 209) {
+ if (!node.statement || node.statement.kind !== 211) {
addAntecedent(postStatementLabel, currentFlow);
currentFlow = finishFlowLabel(postStatementLabel);
}
}
function bindDestructuringTargetFlow(node) {
- if (node.kind === 192 && node.operatorToken.kind === 57) {
+ if (node.kind === 193 && node.operatorToken.kind === 57) {
bindAssignmentTargetFlow(node.left);
}
else {
@@ -19414,10 +21386,10 @@ var ts;
if (isNarrowableReference(node)) {
currentFlow = createFlowAssignment(currentFlow, node);
}
- else if (node.kind === 175) {
+ else if (node.kind === 176) {
for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
var e = _a[_i];
- if (e.kind === 196) {
+ if (e.kind === 197) {
bindAssignmentTargetFlow(e.expression);
}
else {
@@ -19425,16 +21397,16 @@ var ts;
}
}
}
- else if (node.kind === 176) {
+ else if (node.kind === 177) {
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
var p = _c[_b];
- if (p.kind === 257) {
+ if (p.kind === 260) {
bindDestructuringTargetFlow(p.initializer);
}
- else if (p.kind === 258) {
+ else if (p.kind === 261) {
bindAssignmentTargetFlow(p.name);
}
- else if (p.kind === 259) {
+ else if (p.kind === 262) {
bindAssignmentTargetFlow(p.expression);
}
}
@@ -19490,7 +21462,7 @@ var ts;
bindEachChild(node);
if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
bindAssignmentTargetFlow(node.left);
- if (operator === 57 && node.left.kind === 178) {
+ if (operator === 57 && node.left.kind === 179) {
var elementAccess = node.left;
if (isNarrowableOperand(elementAccess.expression)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -19501,7 +21473,7 @@ var ts;
}
function bindDeleteExpressionFlow(node) {
bindEachChild(node);
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
bindAssignmentTargetFlow(node.expression);
}
}
@@ -19534,16 +21506,31 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 212 || node.parent.parent.kind === 213) {
+ if (node.initializer || node.parent.parent.kind === 214 || node.parent.parent.kind === 215) {
bindInitializedVariableFlow(node);
}
}
+ function bindJSDocComment(node) {
+ ts.forEachChild(node, function (n) {
+ if (n.kind !== 289) {
+ bind(n);
+ }
+ });
+ }
+ function bindJSDocTypedefTag(node) {
+ ts.forEachChild(node, function (n) {
+ if (node.fullName && n === node.name && node.fullName.kind !== 70) {
+ return;
+ }
+ bind(n);
+ });
+ }
function bindCallExpressionFlow(node) {
var expr = node.expression;
- while (expr.kind === 183) {
+ while (expr.kind === 184) {
expr = expr.expression;
}
- if (expr.kind === 184 || expr.kind === 185) {
+ if (expr.kind === 185 || expr.kind === 186) {
bindEach(node.typeArguments);
bindEach(node.arguments);
bind(node.expression);
@@ -19551,7 +21538,7 @@ var ts;
else {
bindEachChild(node);
}
- if (node.expression.kind === 177) {
+ if (node.expression.kind === 178) {
var propertyAccess = node.expression;
if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -19560,52 +21547,53 @@ var ts;
}
function getContainerFlags(node) {
switch (node.kind) {
- case 197:
- case 226:
- case 229:
- case 176:
- case 161:
- case 287:
- case 270:
+ case 198:
+ case 228:
+ case 231:
+ case 177:
+ case 162:
+ case 291:
+ case 274:
+ case 253:
return 1;
- case 227:
+ case 229:
return 1 | 64;
- case 274:
+ case 278:
+ case 232:
case 230:
- case 228:
- case 170:
+ case 171:
return 1 | 32;
- case 261:
+ case 264:
return 1 | 4 | 32;
- case 149:
+ case 150:
if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
return 1 | 4 | 32 | 8 | 128;
}
- case 150:
- case 225:
- case 148:
case 151:
+ case 227:
+ case 149:
case 152:
case 153:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
return 1 | 4 | 32 | 8;
- case 184:
case 185:
+ case 186:
return 1 | 4 | 32 | 8 | 16;
- case 231:
+ case 233:
return 4;
- case 147:
+ case 148:
return node.initializer ? 4 : 0;
- case 256:
- case 211:
- case 212:
+ case 259:
case 213:
- case 232:
+ case 214:
+ case 215:
+ case 234:
return 2;
- case 204:
+ case 206:
return ts.isFunctionLike(node.parent) ? 0 : 2;
}
return 0;
@@ -19621,37 +21609,38 @@ var ts;
}
function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) {
switch (container.kind) {
- case 230:
+ case 232:
return declareModuleMember(node, symbolFlags, symbolExcludes);
- case 261:
+ case 264:
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
- case 197:
- case 226:
+ case 198:
+ case 228:
return declareClassMember(node, symbolFlags, symbolExcludes);
- case 229:
+ case 231:
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
- case 161:
- case 176:
- case 227:
- case 270:
- case 287:
+ case 162:
+ case 177:
+ case 229:
+ case 274:
+ case 291:
+ case 253:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
case 155:
- case 149:
- case 148:
+ case 156:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
- case 274:
- case 228:
- case 170:
+ case 186:
+ case 278:
+ case 230:
+ case 171:
return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
}
}
@@ -19666,11 +21655,11 @@ var ts;
: declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes);
}
function hasExportDeclarations(node) {
- var body = node.kind === 261 ? node : node.body;
- if (body && (body.kind === 261 || body.kind === 231)) {
+ var body = node.kind === 264 ? node : node.body;
+ if (body && (body.kind === 264 || body.kind === 233)) {
for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
var stat = _a[_i];
- if (stat.kind === 241 || stat.kind === 240) {
+ if (stat.kind === 243 || stat.kind === 242) {
return true;
}
}
@@ -19692,7 +21681,7 @@ var ts;
errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
}
if (ts.isExternalModuleAugmentation(node)) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
+ declareModuleSymbol(node);
}
else {
var pattern = void 0;
@@ -19712,12 +21701,8 @@ var ts;
}
}
else {
- var state = getModuleInstanceState(node);
- if (state === 0) {
- declareSymbolAndAddToSymbolTable(node, 1024, 0);
- }
- else {
- declareSymbolAndAddToSymbolTable(node, 512, 106639);
+ var state = declareModuleSymbol(node);
+ if (state !== 0) {
if (node.symbol.flags & (16 | 32 | 256)) {
node.symbol.constEnumOnlyModule = false;
}
@@ -19733,29 +21718,40 @@ var ts;
}
}
}
+ function declareModuleSymbol(node) {
+ var state = getModuleInstanceState(node);
+ var instantiated = state !== 0;
+ declareSymbolAndAddToSymbolTable(node, instantiated ? 512 : 1024, instantiated ? 106639 : 0);
+ return state;
+ }
function bindFunctionOrConstructorType(node) {
var symbol = createSymbol(131072, getDeclarationName(node));
addDeclarationToSymbol(symbol, node, 131072);
var typeLiteralSymbol = createSymbol(2048, "__type");
addDeclarationToSymbol(typeLiteralSymbol, node, 2048);
typeLiteralSymbol.members = ts.createMap();
- typeLiteralSymbol.members[symbol.name] = symbol;
+ typeLiteralSymbol.members.set(symbol.name, symbol);
}
function bindObjectLiteralExpression(node) {
+ var ElementKind;
+ (function (ElementKind) {
+ ElementKind[ElementKind["Property"] = 1] = "Property";
+ ElementKind[ElementKind["Accessor"] = 2] = "Accessor";
+ })(ElementKind || (ElementKind = {}));
if (inStrictMode) {
var seen = ts.createMap();
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 || prop.name.kind !== 70) {
+ if (prop.kind === 262 || prop.name.kind !== 70) {
continue;
}
var identifier = prop.name;
- var currentKind = prop.kind === 257 || prop.kind === 258 || prop.kind === 149
+ var currentKind = prop.kind === 260 || prop.kind === 261 || prop.kind === 150
? 1
: 2;
- var existingKind = seen[identifier.text];
+ var existingKind = seen.get(identifier.text);
if (!existingKind) {
- seen[identifier.text] = currentKind;
+ seen.set(identifier.text, currentKind);
continue;
}
if (currentKind === 1 && existingKind === 1) {
@@ -19766,16 +21762,22 @@ var ts;
}
return bindAnonymousDeclaration(node, 4096, "__object");
}
+ function bindJsxAttributes(node) {
+ return bindAnonymousDeclaration(node, 4096, "__jsxAttributes");
+ }
+ function bindJsxAttribute(node, symbolFlags, symbolExcludes) {
+ return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
+ }
function bindAnonymousDeclaration(node, symbolFlags, name) {
var symbol = createSymbol(symbolFlags, name);
addDeclarationToSymbol(symbol, node, symbolFlags);
}
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
switch (blockScopeContainer.kind) {
- case 230:
+ case 232:
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
- case 261:
+ case 264:
if (ts.isExternalModule(container)) {
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
@@ -19865,8 +21867,8 @@ var ts;
}
function checkStrictModeFunctionDeclaration(node) {
if (languageVersion < 2) {
- if (blockScopeContainer.kind !== 261 &&
- blockScopeContainer.kind !== 230 &&
+ if (blockScopeContainer.kind !== 264 &&
+ blockScopeContainer.kind !== 232 &&
!ts.isFunctionLike(blockScopeContainer)) {
var errorSpan = ts.getErrorSpanForNode(file, node);
file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node)));
@@ -19874,7 +21876,7 @@ var ts;
}
}
function checkStrictModeNumericLiteral(node) {
- if (inStrictMode && node.isOctalLiteral) {
+ if (inStrictMode && node.numericLiteralFlags & 4) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
}
}
@@ -19908,8 +21910,11 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
+ if (ts.isInJavaScriptFile(node)) {
+ bindJSDocTypedefTagIfAny(node);
+ }
bindWorker(node);
- if (node.kind > 140) {
+ if (node.kind > 141) {
var saveParent = parent;
parent = node;
var containerFlags = getContainerFlags(node);
@@ -19926,6 +21931,26 @@ var ts;
}
inStrictMode = saveInStrictMode;
}
+ function bindJSDocTypedefTagIfAny(node) {
+ if (!node.jsDoc) {
+ return;
+ }
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var jsDoc = _a[_i];
+ if (!jsDoc.tags) {
+ continue;
+ }
+ for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
+ var tag = _c[_b];
+ if (tag.kind === 289) {
+ var savedParent = parent;
+ parent = jsDoc;
+ bind(tag);
+ parent = savedParent;
+ }
+ }
+ }
+ }
function updateStrictModeStatementList(statements) {
if (!inStrictMode) {
for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
@@ -19949,90 +21974,88 @@ var ts;
case 70:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 285) {
+ while (parentNode && parentNode.kind !== 289) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
break;
}
case 98:
- if (currentFlow && (ts.isExpression(node) || parent.kind === 258)) {
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 261)) {
node.flowNode = currentFlow;
}
return checkStrictModeIdentifier(node);
- case 177:
+ case 178:
if (currentFlow && isNarrowableReference(node)) {
node.flowNode = currentFlow;
}
break;
- case 192:
- if (ts.isInJavaScriptFile(node)) {
- var specialKind = ts.getSpecialPropertyAssignmentKind(node);
- switch (specialKind) {
- case 1:
- bindExportsPropertyAssignment(node);
- break;
- case 2:
- bindModuleExportsAssignment(node);
- break;
- case 3:
- bindPrototypePropertyAssignment(node);
- break;
- case 4:
- bindThisPropertyAssignment(node);
- break;
- case 0:
- break;
- default:
- ts.Debug.fail("Unknown special property assignment kind");
- }
+ case 193:
+ var specialKind = ts.getSpecialPropertyAssignmentKind(node);
+ switch (specialKind) {
+ case 1:
+ bindExportsPropertyAssignment(node);
+ break;
+ case 2:
+ bindModuleExportsAssignment(node);
+ break;
+ case 3:
+ bindPrototypePropertyAssignment(node);
+ break;
+ case 4:
+ bindThisPropertyAssignment(node);
+ break;
+ case 5:
+ bindStaticPropertyAssignment(node);
+ break;
+ case 0:
+ break;
+ default:
+ ts.Debug.fail("Unknown special property assignment kind");
}
return checkStrictModeBinaryExpression(node);
- case 256:
+ case 259:
return checkStrictModeCatchClause(node);
- case 186:
+ case 187:
return checkStrictModeDeleteExpression(node);
case 8:
return checkStrictModeNumericLiteral(node);
- case 191:
+ case 192:
return checkStrictModePostfixUnaryExpression(node);
- case 190:
+ case 191:
return checkStrictModePrefixUnaryExpression(node);
- case 217:
+ case 219:
return checkStrictModeWithStatement(node);
- case 167:
+ case 168:
seenThisKeyword = true;
return;
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 143:
- return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 144:
+ return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
+ case 145:
return bindParameter(node);
- case 223:
- case 174:
- if (node.dotDotDotToken && node.parent.kind === 172) {
- emitFlags |= 32768;
- }
+ case 225:
+ case 175:
return bindVariableDeclarationOrBindingElement(node);
+ case 148:
case 147:
- case 146:
- case 271:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 0);
- case 286:
+ case 275:
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ case 290:
return bindJSDocProperty(node);
- case 257:
- case 258:
- return bindPropertyOrMethodOrAccessor(node, 4, 0);
case 260:
+ case 261:
+ return bindPropertyOrMethodOrAccessor(node, 4, 0);
+ case 263:
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
- case 259:
- case 251:
+ case 262:
+ case 254:
var root = container;
var hasRest = false;
while (root.parent) {
- if (root.kind === 176 &&
- root.parent.kind === 192 &&
+ if (root.kind === 177 &&
+ root.parent.kind === 193 &&
root.parent.operatorToken.kind === 57 &&
root.parent.left === root) {
hasRest = true;
@@ -20040,80 +22063,83 @@ var ts;
}
root = root.parent;
}
- emitFlags |= hasRest ? 32768 : 16384;
return;
- case 153:
case 154:
case 155:
+ case 156:
return declareSymbolAndAddToSymbolTable(node, 131072, 0);
+ case 150:
case 149:
- case 148:
- return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
- case 225:
+ return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 67108864 : 0), ts.isObjectLiteralMethod(node) ? 0 : 99263);
+ case 227:
return bindFunctionDeclaration(node);
- case 150:
- return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 151:
- return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ return declareSymbolAndAddToSymbolTable(node, 16384, 0);
case 152:
+ return bindPropertyOrMethodOrAccessor(node, 32768, 41919);
+ case 153:
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
- case 158:
case 159:
- case 274:
+ case 160:
+ case 278:
return bindFunctionOrConstructorType(node);
- case 161:
- case 170:
- case 287:
- case 270:
+ case 162:
+ case 171:
+ case 291:
+ case 274:
return bindAnonymousDeclaration(node, 2048, "__type");
- case 176:
+ case 177:
return bindObjectLiteralExpression(node);
- case 184:
case 185:
+ case 186:
return bindFunctionExpression(node);
- case 179:
+ case 180:
if (ts.isInJavaScriptFile(node)) {
bindCallExpression(node);
}
break;
- case 197:
- case 226:
+ case 198:
+ case 228:
inStrictMode = true;
return bindClassLikeDeclaration(node);
- case 227:
+ case 229:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 285:
+ case 289:
if (!node.fullName || node.fullName.kind === 70) {
return bindBlockScopedDeclaration(node, 524288, 793064);
}
break;
- case 228:
+ case 230:
return bindBlockScopedDeclaration(node, 524288, 793064);
- case 229:
+ case 231:
return bindEnumDeclaration(node);
- case 230:
+ case 232:
return bindModuleDeclaration(node);
- case 234:
- case 237:
+ case 253:
+ return bindJsxAttributes(node);
+ case 252:
+ return bindJsxAttribute(node, 4, 0);
+ case 236:
case 239:
- case 243:
+ case 241:
+ case 245:
return declareSymbolAndAddToSymbolTable(node, 8388608, 8388608);
- case 233:
+ case 235:
return bindNamespaceExportDeclaration(node);
- case 236:
+ case 238:
return bindImportClause(node);
- case 241:
+ case 243:
return bindExportDeclaration(node);
- case 240:
+ case 242:
return bindExportAssignment(node);
- case 261:
+ case 264:
updateStrictModeStatementList(node.statements);
return bindSourceFileIfExternalModule();
- case 204:
+ case 206:
if (!ts.isFunctionLike(node.parent)) {
return;
}
- case 231:
+ case 233:
return updateStrictModeStatementList(node.statements);
}
}
@@ -20122,7 +22148,7 @@ var ts;
if (parameterName && parameterName.kind === 70) {
checkStrictModeIdentifier(parameterName);
}
- if (parameterName && parameterName.kind === 167) {
+ if (parameterName && parameterName.kind === 168) {
seenThisKeyword = true;
}
bind(type);
@@ -20141,7 +22167,7 @@ var ts;
bindAnonymousDeclaration(node, 8388608, getDeclarationName(node));
}
else {
- var flags = node.kind === 240 && ts.exportAssignmentIsAlias(node)
+ var flags = node.kind === 242 && ts.exportAssignmentIsAlias(node)
? 8388608
: 4;
declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 | 8388608 | 32 | 16);
@@ -20151,17 +22177,17 @@ var ts;
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
}
- if (node.parent.kind !== 261) {
+ if (node.parent.kind !== 264) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
- var parent_4 = node.parent;
- if (!ts.isExternalModule(parent_4)) {
+ var parent_1 = node.parent;
+ if (!ts.isExternalModule(parent_1)) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
- if (!parent_4.isDeclarationFile) {
+ if (!parent_1.isDeclarationFile) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
@@ -20171,10 +22197,10 @@ var ts;
}
function bindExportDeclaration(node) {
if (!container.symbol || !container.symbol.exports) {
- bindAnonymousDeclaration(node, 1073741824, getDeclarationName(node));
+ bindAnonymousDeclaration(node, 33554432, getDeclarationName(node));
}
else if (!node.exportClause) {
- declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0);
+ declareSymbol(container.symbol.exports, container.symbol, node, 33554432, 0);
}
}
function bindImportClause(node) {
@@ -20194,24 +22220,56 @@ var ts;
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node.left, 4 | 7340032, 0);
}
+ function isExportsOrModuleExportsOrAlias(node) {
+ return ts.isExportsIdentifier(node) ||
+ ts.isModuleExportsPropertyAccessExpression(node) ||
+ isNameOfExportsOrModuleExportsAliasDeclaration(node);
+ }
+ function isNameOfExportsOrModuleExportsAliasDeclaration(node) {
+ if (node.kind === 70) {
+ var symbol = lookupSymbolForName(node.text);
+ if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225) {
+ var declaration = symbol.valueDeclaration;
+ if (declaration.initializer) {
+ return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
+ }
+ }
+ }
+ return false;
+ }
+ function isExportsOrModuleExportsOrAliasOrAssignemnt(node) {
+ return isExportsOrModuleExportsOrAlias(node) ||
+ (ts.isAssignmentExpression(node, true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
+ }
function bindModuleExportsAssignment(node) {
+ var assignedExpression = ts.getRightMostAssignedExpression(node.right);
+ if (ts.isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
+ setCommonJsModuleIndicator(node);
+ return;
+ }
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node, 4 | 7340032 | 512, 0);
}
function bindThisPropertyAssignment(node) {
ts.Debug.assert(ts.isInJavaScriptFile(node));
- if (container.kind === 225 || container.kind === 184) {
- container.symbol.members = container.symbol.members || ts.createMap();
- declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
- }
- else if (container.kind === 150) {
- var saveContainer = container;
- container = container.parent;
- var symbol = bindPropertyOrMethodOrAccessor(node, 4, 0);
- if (symbol) {
- symbol.isReplaceableByMethod = true;
- }
- container = saveContainer;
+ var container = ts.getThisContainer(node, false);
+ switch (container.kind) {
+ case 227:
+ case 185:
+ container.symbol.members = container.symbol.members || ts.createMap();
+ declareSymbol(container.symbol.members, container.symbol, node, 4, 0 & ~4);
+ break;
+ case 151:
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ var containingClass = container.parent;
+ var symbol = declareSymbol(ts.hasModifier(container, 32) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4, 0);
+ if (symbol) {
+ symbol.isReplaceableByMethod = true;
+ }
+ break;
}
}
function bindPrototypePropertyAssignment(node) {
@@ -20221,14 +22279,35 @@ var ts;
leftSideOfAssignment.parent = node;
constructorFunction.parent = classPrototype;
classPrototype.parent = leftSideOfAssignment;
- var funcSymbol = container.locals[constructorFunction.text];
- if (!funcSymbol || !(funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
- return;
+ bindPropertyAssignment(constructorFunction.text, leftSideOfAssignment, true);
+ }
+ function bindStaticPropertyAssignment(node) {
+ var leftSideOfAssignment = node.left;
+ var target = leftSideOfAssignment.expression;
+ leftSideOfAssignment.parent = node;
+ target.parent = leftSideOfAssignment;
+ if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
+ bindExportsPropertyAssignment(node);
+ }
+ else {
+ bindPropertyAssignment(target.text, leftSideOfAssignment, false);
+ }
+ }
+ function lookupSymbolForName(name) {
+ return (container.symbol && container.symbol.exports && container.symbol.exports.get(name)) || (container.locals && container.locals.get(name));
+ }
+ function bindPropertyAssignment(functionName, propertyAccessExpression, isPrototypeProperty) {
+ var targetSymbol = lookupSymbolForName(functionName);
+ if (targetSymbol && ts.isDeclarationOfFunctionOrClassExpression(targetSymbol)) {
+ targetSymbol = targetSymbol.valueDeclaration.initializer.symbol;
}
- if (!funcSymbol.members) {
- funcSymbol.members = ts.createMap();
+ if (!targetSymbol || !(targetSymbol.flags & (16 | 32))) {
+ return;
}
- declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4, 0);
+ var symbolTable = isPrototypeProperty ?
+ (targetSymbol.members || (targetSymbol.members = ts.createMap())) :
+ (targetSymbol.exports || (targetSymbol.exports = ts.createMap()));
+ declareSymbol(symbolTable, targetSymbol, propertyAccessExpression, 4, 0);
}
function bindCallExpression(node) {
if (!file.commonJsModuleIndicator && ts.isRequireCall(node, false)) {
@@ -20236,33 +22315,26 @@ var ts;
}
}
function bindClassLikeDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) {
- emitFlags |= 1024;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
- }
- }
- if (node.kind === 226) {
+ if (node.kind === 228) {
bindBlockScopedDeclaration(node, 32, 899519);
}
else {
var bindingName = node.name ? node.name.text : "__class";
bindAnonymousDeclaration(node, 32, bindingName);
if (node.name) {
- classifiableNames[node.name.text] = node.name.text;
+ classifiableNames.set(node.name.text, node.name.text);
}
}
var symbol = node.symbol;
- var prototypeSymbol = createSymbol(4 | 134217728, "prototype");
- if (symbol.exports[prototypeSymbol.name]) {
+ var prototypeSymbol = createSymbol(4 | 16777216, "prototype");
+ var symbolExport = symbol.exports.get(prototypeSymbol.name);
+ if (symbolExport) {
if (node.name) {
node.name.parent = node;
}
- file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
}
- symbol.exports[prototypeSymbol.name] = prototypeSymbol;
+ symbol.exports.set(prototypeSymbol.name, prototypeSymbol);
prototypeSymbol.parent = symbol;
}
function bindEnumDeclaration(node) {
@@ -20287,11 +22359,6 @@ var ts;
}
}
function bindParameter(node) {
- if (!ts.isDeclarationFile(file) &&
- !ts.isInAmbientContext(node) &&
- ts.nodeIsDecorated(node)) {
- emitFlags |= (2048 | 4096);
- }
if (inStrictMode) {
checkStrictModeEvalOrArguments(node, node.name);
}
@@ -20303,13 +22370,13 @@ var ts;
}
if (ts.isParameterPropertyDeclaration(node)) {
var classDeclaration = node.parent.parent;
- declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 536870912 : 0), 0);
+ declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 | (node.questionToken ? 67108864 : 0), 0);
}
}
function bindFunctionDeclaration(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
checkStrictModeFunctionName(node);
@@ -20323,8 +22390,8 @@ var ts;
}
function bindFunctionExpression(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow) {
@@ -20336,11 +22403,8 @@ var ts;
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
@@ -20362,15 +22426,15 @@ var ts;
return false;
}
if (currentFlow === unreachableFlow) {
- var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 206) ||
- node.kind === 226 ||
- (node.kind === 230 && shouldReportErrorOnModuleDeclaration(node)) ||
- (node.kind === 229 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
+ var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 208) ||
+ node.kind === 228 ||
+ (node.kind === 232 && shouldReportErrorOnModuleDeclaration(node)) ||
+ (node.kind === 231 && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
if (reportError) {
currentFlow = reportedUnreachableFlow;
var reportUnreachableCode = !options.allowUnreachableCode &&
!ts.isInAmbientContext(node) &&
- (node.kind !== 205 ||
+ (node.kind !== 207 ||
ts.getCombinedNodeFlags(node.declarationList) & 3 ||
ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; }));
if (reportUnreachableCode) {
@@ -20384,56 +22448,56 @@ var ts;
function computeTransformFlagsForNode(node, subtreeFlags) {
var kind = node.kind;
switch (kind) {
- case 179:
- return computeCallExpression(node, subtreeFlags);
case 180:
+ return computeCallExpression(node, subtreeFlags);
+ case 181:
return computeNewExpression(node, subtreeFlags);
- case 230:
+ case 232:
return computeModuleDeclaration(node, subtreeFlags);
- case 183:
+ case 184:
return computeParenthesizedExpression(node, subtreeFlags);
- case 192:
+ case 193:
return computeBinaryExpression(node, subtreeFlags);
- case 207:
+ case 209:
return computeExpressionStatement(node, subtreeFlags);
- case 144:
+ case 145:
return computeParameter(node, subtreeFlags);
- case 185:
+ case 186:
return computeArrowFunction(node, subtreeFlags);
- case 184:
+ case 185:
return computeFunctionExpression(node, subtreeFlags);
- case 225:
+ case 227:
return computeFunctionDeclaration(node, subtreeFlags);
- case 223:
+ case 225:
return computeVariableDeclaration(node, subtreeFlags);
- case 224:
+ case 226:
return computeVariableDeclarationList(node, subtreeFlags);
- case 205:
+ case 207:
return computeVariableStatement(node, subtreeFlags);
- case 219:
+ case 221:
return computeLabeledStatement(node, subtreeFlags);
- case 226:
+ case 228:
return computeClassDeclaration(node, subtreeFlags);
- case 197:
+ case 198:
return computeClassExpression(node, subtreeFlags);
- case 255:
+ case 258:
return computeHeritageClause(node, subtreeFlags);
- case 256:
+ case 259:
return computeCatchClause(node, subtreeFlags);
- case 199:
+ case 200:
return computeExpressionWithTypeArguments(node, subtreeFlags);
- case 150:
+ case 151:
return computeConstructor(node, subtreeFlags);
- case 147:
+ case 148:
return computePropertyDeclaration(node, subtreeFlags);
- case 149:
+ case 150:
return computeMethod(node, subtreeFlags);
- case 151:
case 152:
+ case 153:
return computeAccessor(node, subtreeFlags);
- case 234:
+ case 236:
return computeImportEquals(node, subtreeFlags);
- case 177:
+ case 178:
return computePropertyAccess(node, subtreeFlags);
default:
return computeOther(node, kind, subtreeFlags);
@@ -20458,8 +22522,8 @@ var ts;
switch (kind) {
case 96:
return true;
- case 177:
case 178:
+ case 179:
var expression = node.expression;
var expressionKind = expression.kind;
return expressionKind === 96;
@@ -20481,10 +22545,10 @@ var ts;
var transformFlags = subtreeFlags;
var operatorTokenKind = node.operatorToken.kind;
var leftKind = node.left.kind;
- if (operatorTokenKind === 57 && leftKind === 176) {
+ if (operatorTokenKind === 57 && leftKind === 177) {
transformFlags |= 8 | 192 | 3072;
}
- else if (operatorTokenKind === 57 && leftKind === 175) {
+ else if (operatorTokenKind === 57 && leftKind === 176) {
transformFlags |= 192 | 3072;
}
else if (operatorTokenKind === 39
@@ -20523,8 +22587,8 @@ var ts;
var expression = node.expression;
var expressionKind = expression.kind;
var expressionTransformFlags = expression.transformFlags;
- if (expressionKind === 200
- || expressionKind === 182) {
+ if (expressionKind === 201
+ || expressionKind === 183) {
transformFlags |= 3;
}
if (expressionTransformFlags & 1024) {
@@ -20621,9 +22685,9 @@ var ts;
transformFlags |= 8;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -20666,7 +22730,7 @@ var ts;
transformFlags |= 3;
}
if (modifierFlags & 256) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -20674,7 +22738,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
}
@@ -20689,7 +22753,7 @@ var ts;
transformFlags |= 3;
}
if (ts.hasModifier(node, 256)) {
- transformFlags |= 16;
+ transformFlags |= node.asteriskToken ? 8 : 16;
}
if (subtreeFlags & 1048576) {
transformFlags |= 8;
@@ -20697,7 +22761,7 @@ var ts;
if (subtreeFlags & 163840) {
transformFlags |= 192;
}
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
+ if (node.asteriskToken) {
transformFlags |= 768;
}
node.transformFlags = transformFlags | 536870912;
@@ -20810,8 +22874,8 @@ var ts;
var excludeFlags = 536872257;
switch (kind) {
case 119:
- case 189:
- transformFlags |= 16;
+ case 190:
+ transformFlags |= 8 | 16;
break;
case 113:
case 111:
@@ -20819,50 +22883,66 @@ var ts;
case 116:
case 123:
case 75:
- case 229:
- case 260:
- case 182:
- case 200:
+ case 231:
+ case 263:
+ case 183:
case 201:
+ case 202:
case 130:
transformFlags |= 3;
break;
- case 246:
- case 247:
case 248:
- case 10:
case 249:
case 250:
+ case 10:
case 251:
case 252:
+ case 253:
+ case 254:
+ case 255:
transformFlags |= 4;
break;
- case 213:
- transformFlags |= 8;
case 12:
case 13:
case 14:
case 15:
- case 194:
- case 181:
- case 258:
+ case 195:
+ case 182:
+ case 261:
case 114:
+ case 203:
transformFlags |= 192;
break;
- case 195:
- transformFlags |= 192 | 16777216;
+ case 9:
+ if (node.hasExtendedUnicodeEscape) {
+ transformFlags |= 192;
+ }
+ break;
+ case 8:
+ if (node.numericLiteralFlags & 48) {
+ transformFlags |= 192;
+ }
+ break;
+ case 215:
+ if (node.awaitModifier) {
+ transformFlags |= 8;
+ }
+ transformFlags |= 192;
+ break;
+ case 196:
+ transformFlags |= 8 | 192 | 16777216;
break;
case 118:
case 132:
case 129:
- case 134:
- case 121:
+ case 133:
case 135:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
case 156:
@@ -20876,26 +22956,27 @@ var ts;
case 164:
case 165:
case 166:
- case 227:
- case 228:
case 167:
+ case 229:
+ case 230:
case 168:
case 169:
case 170:
case 171:
+ case 172:
transformFlags = 3;
excludeFlags = -3;
break;
- case 142:
+ case 143:
transformFlags |= 2097152;
if (subtreeFlags & 16384) {
transformFlags |= 65536;
}
break;
- case 196:
+ case 197:
transformFlags |= 192 | 524288;
break;
- case 259:
+ case 262:
transformFlags |= 8 | 1048576;
break;
case 96:
@@ -20904,27 +22985,27 @@ var ts;
case 98:
transformFlags |= 16384;
break;
- case 172:
+ case 173:
transformFlags |= 192 | 8388608;
if (subtreeFlags & 524288) {
transformFlags |= 8 | 1048576;
}
excludeFlags = 537396545;
break;
- case 173:
+ case 174:
transformFlags |= 192 | 8388608;
excludeFlags = 537396545;
break;
- case 174:
+ case 175:
transformFlags |= 192;
if (node.dotDotDotToken) {
transformFlags |= 524288;
}
break;
- case 145:
+ case 146:
transformFlags |= 3 | 4096;
break;
- case 176:
+ case 177:
excludeFlags = 540087617;
if (subtreeFlags & 2097152) {
transformFlags |= 192;
@@ -20936,29 +23017,29 @@ var ts;
transformFlags |= 8;
}
break;
- case 175:
- case 180:
+ case 176:
+ case 181:
excludeFlags = 537396545;
if (subtreeFlags & 524288) {
transformFlags |= 192;
}
break;
- case 209:
- case 210:
case 211:
case 212:
+ case 213:
+ case 214:
if (subtreeFlags & 4194304) {
transformFlags |= 192;
}
break;
- case 261:
+ case 264:
if (subtreeFlags & 32768) {
transformFlags |= 192;
}
break;
+ case 218:
case 216:
- case 214:
- case 215:
+ case 217:
transformFlags |= 33554432;
break;
}
@@ -20966,56 +23047,57 @@ var ts;
return transformFlags & ~excludeFlags;
}
function getTransformFlagsSubtreeExclusions(kind) {
- if (kind >= 156 && kind <= 171) {
+ if (kind >= 157 && kind <= 172) {
return -3;
}
switch (kind) {
- case 179:
case 180:
- case 175:
+ case 181:
+ case 176:
return 537396545;
- case 230:
+ case 232:
return 574674241;
- case 144:
+ case 145:
return 536872257;
- case 185:
+ case 186:
return 601249089;
- case 184:
- case 225:
+ case 185:
+ case 227:
return 601281857;
- case 224:
- return 546309441;
case 226:
- case 197:
+ return 546309441;
+ case 228:
+ case 198:
return 539358529;
- case 150:
- return 601015617;
- case 149:
case 151:
+ return 601015617;
+ case 150:
case 152:
+ case 153:
return 601015617;
case 118:
case 132:
case 129:
- case 134:
- case 121:
case 135:
+ case 133:
+ case 121:
+ case 136:
case 104:
- case 143:
- case 146:
- case 148:
- case 153:
+ case 144:
+ case 147:
+ case 149:
case 154:
case 155:
- case 227:
- case 228:
+ case 156:
+ case 229:
+ case 230:
return -3;
- case 176:
+ case 177:
return 540087617;
- case 256:
+ case 259:
return 537920833;
- case 172:
case 173:
+ case 174:
return 537396545;
default:
return 536872257;
@@ -21048,23 +23130,29 @@ var ts;
ts.getSymbolId = getSymbolId;
function createTypeChecker(host, produceDiagnostics) {
var cancellationToken;
+ var requestedExternalEmitHelpers;
+ var externalHelpersModule;
var Symbol = ts.objectAllocator.getSymbolConstructor();
var Type = ts.objectAllocator.getTypeConstructor();
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
var compilerOptions = host.getCompilerOptions();
- var languageVersion = compilerOptions.target || 0;
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var modulekind = ts.getEmitModuleKind(compilerOptions);
var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters;
var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System;
- var strictNullChecks = compilerOptions.strictNullChecks;
+ var strictNullChecks = compilerOptions.strictNullChecks === undefined ? compilerOptions.strict : compilerOptions.strictNullChecks;
+ var noImplicitAny = compilerOptions.noImplicitAny === undefined ? compilerOptions.strict : compilerOptions.noImplicitAny;
+ var noImplicitThis = compilerOptions.noImplicitThis === undefined ? compilerOptions.strict : compilerOptions.noImplicitThis;
var emitResolver = createResolver();
- var undefinedSymbol = createSymbol(4 | 67108864, "undefined");
+ var nodeBuilder = createNodeBuilder();
+ var undefinedSymbol = createSymbol(4, "undefined");
undefinedSymbol.declarations = [];
- var argumentsSymbol = createSymbol(4 | 67108864, "arguments");
+ var argumentsSymbol = createSymbol(4, "arguments");
var checker = {
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
@@ -21073,47 +23161,127 @@ var ts;
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; },
+ getMergedSymbol: getMergedSymbol,
getDiagnostics: getDiagnostics,
getGlobalDiagnostics: getGlobalDiagnostics,
- getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
- getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration,
+ getTypeOfSymbolAtLocation: function (symbol, location) {
+ location = ts.getParseTreeNode(location);
+ return location ? getTypeOfSymbolAtLocation(symbol, location) : unknownType;
+ },
+ getSymbolsOfParameterPropertyDeclaration: function (parameter, parameterName) {
+ parameter = ts.getParseTreeNode(parameter, ts.isParameter);
+ ts.Debug.assert(parameter !== undefined, "Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.");
+ return getSymbolsOfParameterPropertyDeclaration(parameter, parameterName);
+ },
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
getPropertiesOfType: getPropertiesOfType,
getPropertyOfType: getPropertyOfType,
+ getIndexInfoOfType: getIndexInfoOfType,
getSignaturesOfType: getSignaturesOfType,
getIndexTypeOfType: getIndexTypeOfType,
getBaseTypes: getBaseTypes,
+ getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
+ getWidenedType: getWidenedType,
+ getTypeFromTypeNode: function (node) {
+ node = ts.getParseTreeNode(node, ts.isTypeNode);
+ return node ? getTypeFromTypeNode(node) : unknownType;
+ },
+ getParameterType: getTypeAtPosition,
getReturnTypeOfSignature: getReturnTypeOfSignature,
getNonNullableType: getNonNullableType,
- getSymbolsInScope: getSymbolsInScope,
- getSymbolAtLocation: getSymbolAtLocation,
- getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
- getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol,
- getTypeAtLocation: getTypeOfNode,
- getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment,
- typeToString: typeToString,
+ typeToTypeNode: nodeBuilder.typeToTypeNode,
+ indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
+ signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
+ getSymbolsInScope: function (location, meaning) {
+ location = ts.getParseTreeNode(location);
+ return location ? getSymbolsInScope(location, meaning) : [];
+ },
+ getSymbolAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getSymbolAtLocation(node) : undefined;
+ },
+ getShorthandAssignmentValueSymbol: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getShorthandAssignmentValueSymbol(node) : undefined;
+ },
+ getExportSpecifierLocalTargetSymbol: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExportSpecifier);
+ return node ? getExportSpecifierLocalTargetSymbol(node) : undefined;
+ },
+ getTypeAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getTypeOfNode(node) : unknownType;
+ },
+ getPropertySymbolOfDestructuringAssignment: function (location) {
+ location = ts.getParseTreeNode(location, ts.isIdentifier);
+ return location ? getPropertySymbolOfDestructuringAssignment(location) : undefined;
+ },
+ signatureToString: function (signature, enclosingDeclaration, flags, kind) {
+ return signatureToString(signature, ts.getParseTreeNode(enclosingDeclaration), flags, kind);
+ },
+ typeToString: function (type, enclosingDeclaration, flags) {
+ return typeToString(type, ts.getParseTreeNode(enclosingDeclaration), flags);
+ },
getSymbolDisplayBuilder: getSymbolDisplayBuilder,
- symbolToString: symbolToString,
+ symbolToString: function (symbol, enclosingDeclaration, meaning) {
+ return symbolToString(symbol, ts.getParseTreeNode(enclosingDeclaration), meaning);
+ },
getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
getRootSymbols: getRootSymbols,
- getContextualType: getContextualType,
+ getContextualType: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExpression);
+ return node ? getContextualType(node) : undefined;
+ },
getFullyQualifiedName: getFullyQualifiedName,
- getResolvedSignature: getResolvedSignature,
- getConstantValue: getConstantValue,
- isValidPropertyAccess: isValidPropertyAccess,
- getSignatureFromDeclaration: getSignatureFromDeclaration,
- isImplementationOfOverload: isImplementationOfOverload,
+ getResolvedSignature: function (node, candidatesOutArray) {
+ node = ts.getParseTreeNode(node, ts.isCallLikeExpression);
+ return node ? getResolvedSignature(node, candidatesOutArray) : undefined;
+ },
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
+ isValidPropertyAccess: function (node, propertyName) {
+ node = ts.getParseTreeNode(node, ts.isPropertyAccessOrQualifiedName);
+ return node ? isValidPropertyAccess(node, propertyName) : false;
+ },
+ getSignatureFromDeclaration: function (declaration) {
+ declaration = ts.getParseTreeNode(declaration, ts.isFunctionLike);
+ return declaration ? getSignatureFromDeclaration(declaration) : undefined;
+ },
+ isImplementationOfOverload: function (node) {
+ node = ts.getParseTreeNode(node, ts.isFunctionLike);
+ return node ? isImplementationOfOverload(node) : undefined;
+ },
+ getImmediateAliasedSymbol: function (symbol) {
+ ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
+ var links = getSymbolLinks(symbol);
+ if (!links.immediateTarget) {
+ var node = getDeclarationOfAliasSymbol(symbol);
+ ts.Debug.assert(!!node);
+ links.immediateTarget = getTargetOfAliasDeclaration(node, true);
+ }
+ return links.immediateTarget;
+ },
getAliasedSymbol: resolveAlias,
getEmitResolver: getEmitResolver,
getExportsOfModule: getExportsOfModuleAsArray,
+ getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
getAmbientModules: getAmbientModules,
- getJsxElementAttributesType: getJsxElementAttributesType,
+ getAllAttributesTypeFromJsxOpeningLikeElement: function (node) {
+ node = ts.getParseTreeNode(node, ts.isJsxOpeningLikeElement);
+ return node ? getAllAttributesTypeFromJsxOpeningLikeElement(node) : undefined;
+ },
getJsxIntrinsicTagNames: getJsxIntrinsicTagNames,
- isOptionalParameter: isOptionalParameter,
+ isOptionalParameter: function (node) {
+ node = ts.getParseTreeNode(node, ts.isParameter);
+ return node ? isOptionalParameter(node) : false;
+ },
tryGetMemberInModuleExports: tryGetMemberInModuleExports,
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
- }
+ },
+ getApparentType: getApparentType
};
var tupleTypes = [];
var unionTypes = ts.createMap();
@@ -21122,8 +23290,8 @@ var ts;
var numericLiteralTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
- var unknownSymbol = createSymbol(4 | 67108864, "unknown");
- var resolvingSymbol = createSymbol(67108864, "__resolving__");
+ var unknownSymbol = createSymbol(4, "unknown");
+ var resolvingSymbol = createSymbol(0, "__resolving__");
var anyType = createIntrinsicType(1, "any");
var autoType = createIntrinsicType(1, "any");
var unknownType = createIntrinsicType(1, "unknown");
@@ -21140,8 +23308,9 @@ var ts;
var voidType = createIntrinsicType(1024, "void");
var neverType = createIntrinsicType(8192, "never");
var silentNeverType = createIntrinsicType(8192, "never");
+ var nonPrimitiveType = createIntrinsicType(16777216, "object");
var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
- var emptyTypeLiteralSymbol = createSymbol(2048 | 67108864, "__type");
+ var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
emptyTypeLiteralSymbol.members = ts.createMap();
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -21149,16 +23318,15 @@ var ts;
var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
anyFunctionType.flags |= 8388608;
var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
+ var circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, undefined, 0, false, false);
var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, undefined, 0, false, false);
var silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, undefined, 0, false, false);
var enumNumberIndexInfo = createIndexInfo(stringType, true);
+ var jsObjectLiteralIndexInfo = createIndexInfo(anyType, false);
var globals = ts.createMap();
var patternAmbientModules;
- var getGlobalESSymbolConstructorSymbol;
- var getGlobalPromiseConstructorSymbol;
- var tryGetGlobalPromiseConstructorSymbol;
var globalObjectType;
var globalFunctionType;
var globalArrayType;
@@ -21167,26 +23335,26 @@ var ts;
var globalNumberType;
var globalBooleanType;
var globalRegExpType;
+ var globalThisType;
var anyArrayType;
var autoArrayType;
var anyReadonlyArrayType;
- var getGlobalTemplateStringsArrayType;
- var getGlobalESSymbolType;
- var getGlobalIterableType;
- var getGlobalIteratorType;
- var getGlobalIterableIteratorType;
- var getGlobalClassDecoratorType;
- var getGlobalParameterDecoratorType;
- var getGlobalPropertyDecoratorType;
- var getGlobalMethodDecoratorType;
- var getGlobalTypedPropertyDescriptorType;
- var getGlobalPromiseType;
- var tryGetGlobalPromiseType;
- var getGlobalPromiseLikeType;
- var getInstantiatedGlobalPromiseLikeType;
- var getGlobalPromiseConstructorLikeType;
- var getGlobalThenableType;
- var jsxElementClassType;
+ var deferredGlobalESSymbolConstructorSymbol;
+ var deferredGlobalESSymbolType;
+ var deferredGlobalTypedPropertyDescriptorType;
+ var deferredGlobalPromiseType;
+ var deferredGlobalPromiseConstructorSymbol;
+ var deferredGlobalPromiseConstructorLikeType;
+ var deferredGlobalIterableType;
+ var deferredGlobalIteratorType;
+ var deferredGlobalIterableIteratorType;
+ var deferredGlobalAsyncIterableType;
+ var deferredGlobalAsyncIteratorType;
+ var deferredGlobalAsyncIterableIteratorType;
+ var deferredGlobalTemplateStringsArrayType;
+ var deferredJsxElementClassType;
+ var deferredJsxElementType;
+ var deferredJsxStatelessElementType;
var deferredNodes;
var deferredUnusedIdentifierNodes;
var flowLoopStart = 0;
@@ -21207,9 +23375,70 @@ var ts;
var visitedFlowNodes = [];
var visitedFlowTypes = [];
var potentialThisCollisions = [];
+ var potentialNewTargetCollisions = [];
var awaitedTypeStack = [];
var diagnostics = ts.createDiagnosticCollection();
- var typeofEQFacts = ts.createMap({
+ var TypeFacts;
+ (function (TypeFacts) {
+ TypeFacts[TypeFacts["None"] = 0] = "None";
+ TypeFacts[TypeFacts["TypeofEQString"] = 1] = "TypeofEQString";
+ TypeFacts[TypeFacts["TypeofEQNumber"] = 2] = "TypeofEQNumber";
+ TypeFacts[TypeFacts["TypeofEQBoolean"] = 4] = "TypeofEQBoolean";
+ TypeFacts[TypeFacts["TypeofEQSymbol"] = 8] = "TypeofEQSymbol";
+ TypeFacts[TypeFacts["TypeofEQObject"] = 16] = "TypeofEQObject";
+ TypeFacts[TypeFacts["TypeofEQFunction"] = 32] = "TypeofEQFunction";
+ TypeFacts[TypeFacts["TypeofEQHostObject"] = 64] = "TypeofEQHostObject";
+ TypeFacts[TypeFacts["TypeofNEString"] = 128] = "TypeofNEString";
+ TypeFacts[TypeFacts["TypeofNENumber"] = 256] = "TypeofNENumber";
+ TypeFacts[TypeFacts["TypeofNEBoolean"] = 512] = "TypeofNEBoolean";
+ TypeFacts[TypeFacts["TypeofNESymbol"] = 1024] = "TypeofNESymbol";
+ TypeFacts[TypeFacts["TypeofNEObject"] = 2048] = "TypeofNEObject";
+ TypeFacts[TypeFacts["TypeofNEFunction"] = 4096] = "TypeofNEFunction";
+ TypeFacts[TypeFacts["TypeofNEHostObject"] = 8192] = "TypeofNEHostObject";
+ TypeFacts[TypeFacts["EQUndefined"] = 16384] = "EQUndefined";
+ TypeFacts[TypeFacts["EQNull"] = 32768] = "EQNull";
+ TypeFacts[TypeFacts["EQUndefinedOrNull"] = 65536] = "EQUndefinedOrNull";
+ TypeFacts[TypeFacts["NEUndefined"] = 131072] = "NEUndefined";
+ TypeFacts[TypeFacts["NENull"] = 262144] = "NENull";
+ TypeFacts[TypeFacts["NEUndefinedOrNull"] = 524288] = "NEUndefinedOrNull";
+ TypeFacts[TypeFacts["Truthy"] = 1048576] = "Truthy";
+ TypeFacts[TypeFacts["Falsy"] = 2097152] = "Falsy";
+ TypeFacts[TypeFacts["Discriminatable"] = 4194304] = "Discriminatable";
+ TypeFacts[TypeFacts["All"] = 8388607] = "All";
+ TypeFacts[TypeFacts["BaseStringStrictFacts"] = 933633] = "BaseStringStrictFacts";
+ TypeFacts[TypeFacts["BaseStringFacts"] = 3145473] = "BaseStringFacts";
+ TypeFacts[TypeFacts["StringStrictFacts"] = 4079361] = "StringStrictFacts";
+ TypeFacts[TypeFacts["StringFacts"] = 4194049] = "StringFacts";
+ TypeFacts[TypeFacts["EmptyStringStrictFacts"] = 3030785] = "EmptyStringStrictFacts";
+ TypeFacts[TypeFacts["EmptyStringFacts"] = 3145473] = "EmptyStringFacts";
+ TypeFacts[TypeFacts["NonEmptyStringStrictFacts"] = 1982209] = "NonEmptyStringStrictFacts";
+ TypeFacts[TypeFacts["NonEmptyStringFacts"] = 4194049] = "NonEmptyStringFacts";
+ TypeFacts[TypeFacts["BaseNumberStrictFacts"] = 933506] = "BaseNumberStrictFacts";
+ TypeFacts[TypeFacts["BaseNumberFacts"] = 3145346] = "BaseNumberFacts";
+ TypeFacts[TypeFacts["NumberStrictFacts"] = 4079234] = "NumberStrictFacts";
+ TypeFacts[TypeFacts["NumberFacts"] = 4193922] = "NumberFacts";
+ TypeFacts[TypeFacts["ZeroStrictFacts"] = 3030658] = "ZeroStrictFacts";
+ TypeFacts[TypeFacts["ZeroFacts"] = 3145346] = "ZeroFacts";
+ TypeFacts[TypeFacts["NonZeroStrictFacts"] = 1982082] = "NonZeroStrictFacts";
+ TypeFacts[TypeFacts["NonZeroFacts"] = 4193922] = "NonZeroFacts";
+ TypeFacts[TypeFacts["BaseBooleanStrictFacts"] = 933252] = "BaseBooleanStrictFacts";
+ TypeFacts[TypeFacts["BaseBooleanFacts"] = 3145092] = "BaseBooleanFacts";
+ TypeFacts[TypeFacts["BooleanStrictFacts"] = 4078980] = "BooleanStrictFacts";
+ TypeFacts[TypeFacts["BooleanFacts"] = 4193668] = "BooleanFacts";
+ TypeFacts[TypeFacts["FalseStrictFacts"] = 3030404] = "FalseStrictFacts";
+ TypeFacts[TypeFacts["FalseFacts"] = 3145092] = "FalseFacts";
+ TypeFacts[TypeFacts["TrueStrictFacts"] = 1981828] = "TrueStrictFacts";
+ TypeFacts[TypeFacts["TrueFacts"] = 4193668] = "TrueFacts";
+ TypeFacts[TypeFacts["SymbolStrictFacts"] = 1981320] = "SymbolStrictFacts";
+ TypeFacts[TypeFacts["SymbolFacts"] = 4193160] = "SymbolFacts";
+ TypeFacts[TypeFacts["ObjectStrictFacts"] = 6166480] = "ObjectStrictFacts";
+ TypeFacts[TypeFacts["ObjectFacts"] = 8378320] = "ObjectFacts";
+ TypeFacts[TypeFacts["FunctionStrictFacts"] = 6164448] = "FunctionStrictFacts";
+ TypeFacts[TypeFacts["FunctionFacts"] = 8376288] = "FunctionFacts";
+ TypeFacts[TypeFacts["UndefinedFacts"] = 2457472] = "UndefinedFacts";
+ TypeFacts[TypeFacts["NullFacts"] = 2340752] = "NullFacts";
+ })(TypeFacts || (TypeFacts = {}));
+ var typeofEQFacts = ts.createMapFromTemplate({
"string": 1,
"number": 2,
"boolean": 4,
@@ -21218,7 +23447,7 @@ var ts;
"object": 16,
"function": 32
});
- var typeofNEFacts = ts.createMap({
+ var typeofNEFacts = ts.createMapFromTemplate({
"string": 128,
"number": 256,
"boolean": 512,
@@ -21227,14 +23456,14 @@ var ts;
"object": 2048,
"function": 4096
});
- var typeofTypesByName = ts.createMap({
+ var typeofTypesByName = ts.createMapFromTemplate({
"string": stringType,
"number": numberType,
"boolean": booleanType,
"symbol": esSymbolType,
"undefined": undefinedType
});
- var jsxElementType;
+ var typeofType = createTypeofType();
var _jsxNamespace;
var _jsxFactoryEntity;
var jsxTypes = ts.createMap();
@@ -21253,8 +23482,21 @@ var ts;
var identityRelation = ts.createMap();
var enumRelation = ts.createMap();
var _displayBuilder;
+ var TypeSystemPropertyName;
+ (function (TypeSystemPropertyName) {
+ TypeSystemPropertyName[TypeSystemPropertyName["Type"] = 0] = "Type";
+ TypeSystemPropertyName[TypeSystemPropertyName["ResolvedBaseConstructorType"] = 1] = "ResolvedBaseConstructorType";
+ TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType";
+ TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType";
+ })(TypeSystemPropertyName || (TypeSystemPropertyName = {}));
+ var CheckMode;
+ (function (CheckMode) {
+ CheckMode[CheckMode["Normal"] = 0] = "Normal";
+ CheckMode[CheckMode["SkipContextSensitive"] = 1] = "SkipContextSensitive";
+ CheckMode[CheckMode["Inferential"] = 2] = "Inferential";
+ })(CheckMode || (CheckMode = {}));
var builtinGlobals = ts.createMap();
- builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
+ builtinGlobals.set(undefinedSymbol.name, undefinedSymbol);
initializeTypeChecker();
return checker;
function getJsxNamespace() {
@@ -21284,7 +23526,12 @@ var ts;
}
function createSymbol(flags, name) {
symbolCount++;
- return new Symbol(flags, name);
+ var symbol = (new Symbol(flags | 134217728, name));
+ symbol.checkFlags = 0;
+ return symbol;
+ }
+ function isTransientSymbol(symbol) {
+ return (symbol.flags & 134217728) !== 0;
}
function getExcludedSymbolFlags(flags) {
var result = 0;
@@ -21330,7 +23577,7 @@ var ts;
mergedSymbols[source.mergeId] = target;
}
function cloneSymbol(symbol) {
- var result = createSymbol(symbol.flags | 33554432, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
result.declarations = symbol.declarations.slice(0);
result.parent = symbol.parent;
if (symbol.valueDeclaration)
@@ -21352,12 +23599,10 @@ var ts;
target.flags |= source.flags;
if (source.valueDeclaration &&
(!target.valueDeclaration ||
- (target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
+ (target.valueDeclaration.kind === 232 && source.valueDeclaration.kind !== 232))) {
target.valueDeclaration = source.valueDeclaration;
}
- ts.forEach(source.declarations, function (node) {
- target.declarations.push(node);
- });
+ ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@@ -21370,6 +23615,9 @@ var ts;
}
recordMergedSymbol(target, source);
}
+ else if (target.flags & 1024) {
+ error(source.valueDeclaration.name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ }
else {
var message_2 = target.flags & 2 || source.flags & 2
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
@@ -21382,18 +23630,19 @@ var ts;
}
}
function mergeSymbolTable(target, source) {
- for (var id in source) {
- var targetSymbol = target[id];
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
if (!targetSymbol) {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
else {
- if (!(targetSymbol.flags & 33554432)) {
- target[id] = targetSymbol = cloneSymbol(targetSymbol);
+ if (!(targetSymbol.flags & 134217728)) {
+ targetSymbol = cloneSymbol(targetSymbol);
+ target.set(id, targetSymbol);
}
- mergeSymbol(targetSymbol, source[id]);
+ mergeSymbol(targetSymbol, sourceSymbol);
}
- }
+ });
}
function mergeModuleAugmentation(moduleName) {
var moduleAugmentation = moduleName.parent;
@@ -21414,7 +23663,7 @@ var ts;
}
mainModule = resolveExternalModuleSymbol(mainModule);
if (mainModule.flags & 1920) {
- mainModule = mainModule.flags & 33554432 ? mainModule : cloneSymbol(mainModule);
+ mainModule = mainModule.flags & 134217728 ? mainModule : cloneSymbol(mainModule);
mergeSymbol(mainModule, moduleAugmentation.symbol);
}
else {
@@ -21423,20 +23672,21 @@ var ts;
}
}
function addToSymbolTable(target, source, message) {
- for (var id in source) {
- if (target[id]) {
- ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message));
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
+ if (targetSymbol) {
+ ts.forEach(targetSymbol.declarations, addDeclarationDiagnostic(id, message));
}
else {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
- }
+ });
function addDeclarationDiagnostic(id, message) {
return function (declaration) { return diagnostics.add(ts.createDiagnosticForNode(declaration, message, id)); };
}
}
function getSymbolLinks(symbol) {
- if (symbol.flags & 67108864)
+ if (symbol.flags & 134217728)
return symbol;
var id = getSymbolId(symbol);
return symbolLinks[id] || (symbolLinks[id] = {});
@@ -21448,14 +23698,17 @@ var ts;
function getObjectFlags(type) {
return type.flags & 32768 ? type.objectFlags : 0;
}
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
function isGlobalSourceFile(node) {
- return node.kind === 261 && !ts.isExternalOrCommonJsModule(node);
+ return node.kind === 264 && !ts.isExternalOrCommonJsModule(node);
}
function getSymbol(symbols, name, meaning) {
if (meaning) {
- var symbol = symbols[name];
+ var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -21486,57 +23739,76 @@ var ts;
(!compilerOptions.outFile && !compilerOptions.out)) {
return true;
}
- if (isUsedInFunctionOrNonStaticProperty(usage)) {
+ if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
return true;
}
var sourceFiles = host.getSourceFiles();
return ts.indexOf(sourceFiles, declarationFile) <= ts.indexOf(sourceFiles, useFile);
}
if (declaration.pos <= usage.pos) {
- return declaration.kind !== 223 ||
- !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ if (declaration.kind === 175) {
+ var errorBindingElement = ts.getAncestor(usage, 175);
+ if (errorBindingElement) {
+ return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
+ declaration.pos < errorBindingElement.pos;
+ }
+ return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225), usage);
+ }
+ else if (declaration.kind === 225) {
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ }
+ return true;
+ }
+ if (usage.parent.kind === 245) {
+ return true;
}
var container = ts.getEnclosingBlockScopeContainer(declaration);
- return isUsedInFunctionOrNonStaticProperty(usage, container);
+ return isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container);
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
var container = ts.getEnclosingBlockScopeContainer(declaration);
switch (declaration.parent.parent.kind) {
- case 205:
- case 211:
+ case 207:
case 213:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration, container)) {
return true;
}
break;
}
switch (declaration.parent.parent.kind) {
- case 212:
- case 213:
+ case 214:
+ case 215:
if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
return true;
}
}
return false;
}
- function isUsedInFunctionOrNonStaticProperty(usage, container) {
- var current = usage;
- while (current) {
+ function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
+ return !!ts.findAncestor(usage, function (current) {
if (current === container) {
- return false;
+ return "quit";
}
if (ts.isFunctionLike(current)) {
return true;
}
- var initializerOfNonStaticProperty = current.parent &&
- current.parent.kind === 147 &&
- (ts.getModifierFlags(current.parent) & 32) === 0 &&
+ var initializerOfProperty = current.parent &&
+ current.parent.kind === 148 &&
current.parent.initializer === current;
- if (initializerOfNonStaticProperty) {
- return true;
+ if (initializerOfProperty) {
+ if (ts.getModifierFlags(current.parent) & 32) {
+ if (declaration.kind === 150) {
+ return true;
+ }
+ }
+ else {
+ var isDeclarationInstanceProperty = declaration.kind === 148 && !(ts.getModifierFlags(declaration) & 32);
+ if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+ return true;
+ }
+ }
}
- current = current.parent;
- }
- return false;
+ });
}
}
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
@@ -21551,18 +23823,18 @@ var ts;
if (result = getSymbol(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
- if (meaning & result.flags & 793064 && lastLocation.kind !== 278) {
+ if (meaning & result.flags & 793064 && lastLocation.kind !== 282) {
useResult = result.flags & 262144
? lastLocation === location.type ||
- lastLocation.kind === 144 ||
- lastLocation.kind === 143
+ lastLocation.kind === 145 ||
+ lastLocation.kind === 144
: false;
}
if (meaning & 107455 && result.flags & 1) {
useResult =
- lastLocation.kind === 144 ||
+ lastLocation.kind === 145 ||
(lastLocation === location.type &&
- result.valueDeclaration.kind === 144);
+ result.valueDeclaration.kind === 145);
}
}
if (useResult) {
@@ -21574,23 +23846,24 @@ var ts;
}
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location))
break;
isInExternalModule = true;
- case 230:
+ case 232:
var moduleExports = getSymbolOfNode(location).exports;
- if (location.kind === 261 || ts.isAmbientModule(location)) {
- if (result = moduleExports["default"]) {
+ if (location.kind === 264 || ts.isAmbientModule(location)) {
+ if (result = moduleExports.get("default")) {
var localSymbol = ts.getLocalSymbolForExportDefault(result);
if (localSymbol && (result.flags & meaning) && localSymbol.name === name) {
break loop;
}
result = undefined;
}
- if (moduleExports[name] &&
- moduleExports[name].flags === 8388608 &&
- ts.getDeclarationOfKind(moduleExports[name], 243)) {
+ var moduleExport = moduleExports.get(name);
+ if (moduleExport &&
+ moduleExport.flags === 8388608 &&
+ ts.getDeclarationOfKind(moduleExport, 245)) {
break;
}
}
@@ -21598,13 +23871,13 @@ var ts;
break loop;
}
break;
- case 229:
+ case 231:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
+ case 148:
case 147:
- case 146:
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
@@ -21614,17 +23887,21 @@ var ts;
}
}
break;
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
+ case 229:
if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
+ result = undefined;
+ break;
+ }
if (lastLocation && ts.getModifierFlags(lastLocation) & 32) {
error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters);
return undefined;
}
break loop;
}
- if (location.kind === 197 && meaning & 32) {
+ if (location.kind === 198 && meaning & 32) {
var className = location.name;
if (className && name === className.text) {
result = location.symbol;
@@ -21632,28 +23909,28 @@ var ts;
}
}
break;
- case 142:
+ case 143:
grandparent = location.parent.parent;
- if (ts.isClassLike(grandparent) || grandparent.kind === 227) {
+ if (ts.isClassLike(grandparent) || grandparent.kind === 229) {
if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
return undefined;
}
}
break;
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 185:
+ case 153:
+ case 227:
+ case 186:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
}
break;
- case 184:
+ case 185:
if (meaning & 3 && name === "arguments") {
result = argumentsSymbol;
break loop;
@@ -21666,8 +23943,8 @@ var ts;
}
}
break;
- case 145:
- if (location.parent && location.parent.kind === 144) {
+ case 146:
+ if (location.parent && location.parent.kind === 145) {
location = location.parent;
}
if (location.parent && ts.isClassElement(location.parent)) {
@@ -21690,7 +23967,8 @@ var ts;
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
!checkAndReportErrorForExtendingInterface(errorLocation) &&
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
- !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning)) {
+ !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
+ !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
}
}
@@ -21702,21 +23980,31 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
- if (meaning & 2) {
+ if (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
- if (exportOrLocalSymbol.flags & 2) {
+ if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
}
}
if (result && isInExternalModule && (meaning & 107455) === 107455) {
var decls = result.declarations;
- if (decls && decls.length === 1 && decls[0].kind === 233) {
+ if (decls && decls.length === 1 && decls[0].kind === 235) {
error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name);
}
}
}
return result;
}
+ function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (decl.kind === 144 && decl.parent === container) {
+ return true;
+ }
+ }
+ return false;
+ }
function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {
if ((errorLocation.kind === 70 && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) {
return false;
@@ -21757,9 +24045,9 @@ var ts;
function getEntityNameForExtendingInterface(node) {
switch (node.kind) {
case 70:
- case 177:
+ case 178:
return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
- case 199:
+ case 200:
ts.Debug.assert(ts.isEntityNameExpression(node.expression));
return node.expression;
default:
@@ -21786,65 +24074,84 @@ var ts;
}
return false;
}
- function checkResolvedBlockScopedVariable(result, errorLocation) {
- ts.Debug.assert((result.flags & 2) !== 0);
- var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
- ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
- if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 223), errorLocation)) {
- error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
- }
- }
- function isSameScopeDescendentOf(initial, parent, stopAt) {
- if (!parent) {
- return false;
+ function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) {
+ if (meaning & (107455 & ~1024 & ~793064)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~107455, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, name);
+ return true;
+ }
}
- for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
- if (current === parent) {
+ else if (meaning & (793064 & ~1024 & ~107455)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 & ~793064, undefined, undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, name);
return true;
}
}
return false;
}
+ function checkResolvedBlockScopedVariable(result, errorLocation) {
+ ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384));
+ var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231) ? d : undefined; });
+ ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined");
+ if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
+ if (result.flags & 2) {
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 32) {
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 384) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ }
+ }
+ function isSameScopeDescendentOf(initial, parent, stopAt) {
+ return parent && !!ts.findAncestor(initial, function (n) { return n === stopAt || ts.isFunctionLike(n) ? "quit" : n === parent; });
+ }
function getAnyImportSyntax(node) {
if (ts.isAliasSymbolDeclaration(node)) {
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
- while (node && node.kind !== 235) {
- node = node.parent;
- }
- return node;
+ return ts.findAncestor(node, function (n) { return n.kind === 237; });
}
}
function getDeclarationOfAliasSymbol(symbol) {
- return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
+ return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
- function getTargetOfImportEqualsDeclaration(node) {
- if (node.moduleReference.kind === 245) {
+ function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {
+ if (node.moduleReference.kind === 247) {
return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
}
- return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference);
+ return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);
}
- function getTargetOfImportClause(node) {
+ function getTargetOfImportClause(node, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
if (moduleSymbol) {
- var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ?
- moduleSymbol :
- moduleSymbol.exports["export="] ?
- getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
- resolveSymbol(moduleSymbol.exports["default"]);
+ var exportDefaultSymbol = void 0;
+ if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
+ exportDefaultSymbol = moduleSymbol;
+ }
+ else {
+ var exportValue = moduleSymbol.exports.get("export=");
+ exportDefaultSymbol = exportValue
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), "default")
+ : resolveSymbol(moduleSymbol.exports.get("default"), dontResolveAlias);
+ }
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
}
else if (!exportDefaultSymbol && allowSyntheticDefaultImports) {
- return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ return resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
return exportDefaultSymbol;
}
}
- function getTargetOfNamespaceImport(node) {
+ function getTargetOfNamespaceImport(node, dontResolveAlias) {
var moduleSpecifier = node.parent.parent.moduleSpecifier;
- return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
+ return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
if (valueSymbol.flags & (793064 | 1920)) {
@@ -21861,12 +24168,9 @@ var ts;
result.exports = valueSymbol.exports;
return result;
}
- function getExportOfModule(symbol, name) {
+ function getExportOfModule(symbol, name, dontResolveAlias) {
if (symbol.flags & 1536) {
- var exportedSymbol = getExportsOfSymbol(symbol)[name];
- if (exportedSymbol) {
- return resolveSymbol(exportedSymbol);
- }
+ return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias);
}
}
function getPropertyOfVariable(symbol, name) {
@@ -21877,71 +24181,72 @@ var ts;
}
}
}
- function getExternalModuleMember(node, specifier) {
+ function getExternalModuleMember(node, specifier, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
- var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
+ var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier, dontResolveAlias);
if (targetSymbol) {
- var name_18 = specifier.propertyName || specifier.name;
- if (name_18.text) {
+ var name = specifier.propertyName || specifier.name;
+ if (name.text) {
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
return moduleSymbol;
}
var symbolFromVariable = void 0;
- if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) {
- symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_18.text);
+ if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=")) {
+ symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name.text);
}
else {
- symbolFromVariable = getPropertyOfVariable(targetSymbol, name_18.text);
+ symbolFromVariable = getPropertyOfVariable(targetSymbol, name.text);
}
- symbolFromVariable = resolveSymbol(symbolFromVariable);
- var symbolFromModule = getExportOfModule(targetSymbol, name_18.text);
- if (!symbolFromModule && allowSyntheticDefaultImports && name_18.text === "default") {
- symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
+ var symbolFromModule = getExportOfModule(targetSymbol, name.text, dontResolveAlias);
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.text === "default") {
+ symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
var symbol = symbolFromModule && symbolFromVariable ?
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
symbolFromModule || symbolFromVariable;
if (!symbol) {
- error(name_18, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_18));
+ error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name));
}
return symbol;
}
}
}
- function getTargetOfImportSpecifier(node) {
- return getExternalModuleMember(node.parent.parent.parent, node);
+ function getTargetOfImportSpecifier(node, dontResolveAlias) {
+ return getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias);
}
- function getTargetOfNamespaceExportDeclaration(node) {
- return resolveExternalModuleSymbol(node.parent.symbol);
+ function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
+ return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node) {
+ function getTargetOfExportSpecifier(node, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
- getExternalModuleMember(node.parent.parent, node) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920);
+ getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
+ resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfExportAssignment(node) {
- return resolveEntityName(node.expression, 107455 | 793064 | 1920);
+ function getTargetOfExportAssignment(node, dontResolveAlias) {
+ return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
}
- function getTargetOfAliasDeclaration(node) {
+ function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
switch (node.kind) {
- case 234:
- return getTargetOfImportEqualsDeclaration(node);
case 236:
- return getTargetOfImportClause(node);
- case 237:
- return getTargetOfNamespaceImport(node);
+ return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
+ case 238:
+ return getTargetOfImportClause(node, dontRecursivelyResolve);
case 239:
- return getTargetOfImportSpecifier(node);
- case 243:
- return getTargetOfExportSpecifier(node);
- case 240:
- return getTargetOfExportAssignment(node);
- case 233:
- return getTargetOfNamespaceExportDeclaration(node);
+ return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
+ case 241:
+ return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
+ case 245:
+ return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ case 242:
+ return getTargetOfExportAssignment(node, dontRecursivelyResolve);
+ case 235:
+ return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
- function resolveSymbol(symbol) {
- return symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920)) ? resolveAlias(symbol) : symbol;
+ function resolveSymbol(symbol, dontResolveAlias) {
+ var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
@@ -21980,10 +24285,10 @@ var ts;
links.referenced = true;
var node = getDeclarationOfAliasSymbol(symbol);
ts.Debug.assert(!!node);
- if (node.kind === 240) {
+ if (node.kind === 242) {
checkExpressionCached(node.expression);
}
- else if (node.kind === 243) {
+ else if (node.kind === 245) {
checkExpressionCached(node.propertyName || node.name);
}
else if (ts.isInternalModuleImportEqualsDeclaration(node)) {
@@ -21995,11 +24300,11 @@ var ts;
if (entityName.kind === 70 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
entityName = entityName.parent;
}
- if (entityName.kind === 70 || entityName.parent.kind === 141) {
+ if (entityName.kind === 70 || entityName.parent.kind === 142) {
return resolveEntityName(entityName, 1920, false, dontResolveAlias);
}
else {
- ts.Debug.assert(entityName.parent.kind === 234);
+ ts.Debug.assert(entityName.parent.kind === 236);
return resolveEntityName(entityName, 107455 | 793064 | 1920, false, dontResolveAlias);
}
}
@@ -22018,9 +24323,19 @@ var ts;
return undefined;
}
}
- else if (name.kind === 141 || name.kind === 177) {
- var left = name.kind === 141 ? name.left : name.expression;
- var right = name.kind === 141 ? name.right : name.name;
+ else if (name.kind === 142 || name.kind === 178) {
+ var left = void 0;
+ if (name.kind === 142) {
+ left = name.left;
+ }
+ else if (name.kind === 178 &&
+ (name.expression.kind === 184 || ts.isEntityNameExpression(name.expression))) {
+ left = name.expression;
+ }
+ else {
+ return undefined;
+ }
+ var right = name.kind === 142 ? name.right : name.name;
var namespace = resolveEntityName(left, 1920, ignoreErrors, false, location);
if (!namespace || ts.nodeIsMissing(right)) {
return undefined;
@@ -22036,10 +24351,15 @@ var ts;
return undefined;
}
}
+ else if (name.kind === 184) {
+ return ts.isEntityNameExpression(name.expression) ?
+ resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) :
+ undefined;
+ }
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -22047,7 +24367,7 @@ var ts;
}
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) {
if (isForAugmentation === void 0) { isForAugmentation = false; }
- if (moduleReferenceExpression.kind !== 9) {
+ if (moduleReferenceExpression.kind !== 9 && moduleReferenceExpression.kind !== 12) {
return;
}
var moduleReferenceLiteral = moduleReferenceExpression;
@@ -22084,11 +24404,10 @@ var ts;
}
if (!isRelative && resolvedModule && !ts.extensionIsTypeScript(resolvedModule.extension)) {
if (isForAugmentation) {
- ts.Debug.assert(!!moduleNotFoundError);
var diag = ts.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
- error(errorNode, diag, moduleName, resolvedModule.resolvedFileName);
+ error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
- else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
+ else if (noImplicitAny && moduleNotFoundError) {
error(errorNode, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
}
return undefined;
@@ -22110,27 +24429,35 @@ var ts;
}
return undefined;
}
- function resolveExternalModuleSymbol(moduleSymbol) {
- return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol;
+ function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
+ return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports.get("export="), dontResolveAlias)) || moduleSymbol;
}
- function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
- var symbol = resolveExternalModuleSymbol(moduleSymbol);
- if (symbol && !(symbol.flags & (1536 | 3))) {
+ function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression, dontResolveAlias) {
+ var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
+ if (!dontResolveAlias && symbol && !(symbol.flags & (1536 | 3))) {
error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
symbol = undefined;
}
return symbol;
}
function hasExportAssignmentSymbol(moduleSymbol) {
- return moduleSymbol.exports["export="] !== undefined;
+ return moduleSymbol.exports.get("export=") !== undefined;
}
function getExportsOfModuleAsArray(moduleSymbol) {
return symbolsToArray(getExportsOfModule(moduleSymbol));
}
+ function getExportsAndPropertiesOfModule(moduleSymbol) {
+ var exports = getExportsOfModuleAsArray(moduleSymbol);
+ var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+ if (exportEquals !== moduleSymbol) {
+ ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+ }
+ return exports;
+ }
function tryGetMemberInModuleExports(memberName, moduleSymbol) {
var symbolTable = getExportsOfModule(moduleSymbol);
if (symbolTable) {
- return symbolTable[memberName];
+ return symbolTable.get(memberName);
}
}
function getExportsOfSymbol(symbol) {
@@ -22141,24 +24468,28 @@ var ts;
return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol));
}
function extendExportSymbols(target, source, lookupTable, exportNode) {
- for (var id in source) {
- if (id !== "default" && !target[id]) {
- target[id] = source[id];
+ source && source.forEach(function (sourceSymbol, id) {
+ if (id === "default")
+ return;
+ var targetSymbol = target.get(id);
+ if (!targetSymbol) {
+ target.set(id, sourceSymbol);
if (lookupTable && exportNode) {
- lookupTable[id] = {
+ lookupTable.set(id, {
specifierText: ts.getTextOfNode(exportNode.moduleSpecifier)
- };
+ });
}
}
- else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
- if (!lookupTable[id].exportsWithDuplicate) {
- lookupTable[id].exportsWithDuplicate = [exportNode];
+ else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
+ var collisionTracker = lookupTable.get(id);
+ if (!collisionTracker.exportsWithDuplicate) {
+ collisionTracker.exportsWithDuplicate = [exportNode];
}
else {
- lookupTable[id].exportsWithDuplicate.push(exportNode);
+ collisionTracker.exportsWithDuplicate.push(exportNode);
}
}
- }
+ });
}
function getExportsForModule(moduleSymbol) {
var visitedSymbols = [];
@@ -22170,26 +24501,26 @@ var ts;
}
visitedSymbols.push(symbol);
var symbols = ts.cloneMap(symbol.exports);
- var exportStars = symbol.exports["__export"];
+ var exportStars = symbol.exports.get("__export");
if (exportStars) {
var nestedSymbols = ts.createMap();
- var lookupTable = ts.createMap();
+ var lookupTable_1 = ts.createMap();
for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
var node = _a[_i];
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
var exportedSymbols = visit(resolvedModule);
- extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node);
+ extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
}
- for (var id in lookupTable) {
- var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate;
- if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) {
- continue;
+ lookupTable_1.forEach(function (_a, id) {
+ var exportsWithDuplicate = _a.exportsWithDuplicate;
+ if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
+ return;
}
- for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) {
- var node = exportsWithDuplicate_1[_b];
- diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable[id].specifierText, id));
+ for (var _i = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _i < exportsWithDuplicate_1.length; _i++) {
+ var node = exportsWithDuplicate_1[_i];
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable_1.get(id).specifierText, id));
}
- }
+ });
extendExportSymbols(symbols, nestedSymbols);
}
return symbols;
@@ -22211,22 +24542,13 @@ var ts;
: symbol;
}
function symbolIsValue(symbol) {
- if (symbol.flags & 16777216) {
- return symbolIsValue(getSymbolLinks(symbol).target);
- }
- if (symbol.flags & 107455) {
- return true;
- }
- if (symbol.flags & 8388608) {
- return (resolveAlias(symbol).flags & 107455) !== 0;
- }
- return false;
+ return !!(symbol.flags & 107455 || symbol.flags & 8388608 && resolveAlias(symbol).flags & 107455);
}
function findConstructorDeclaration(node) {
var members = node.members;
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
var member = members_1[_i];
- if (member.kind === 150 && ts.nodeIsPresent(member.body)) {
+ if (member.kind === 151 && ts.nodeIsPresent(member.body)) {
return member;
}
}
@@ -22254,6 +24576,9 @@ var ts;
type.symbol = symbol;
return type;
}
+ function createTypeofType() {
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ }
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
name.charCodeAt(1) === 95 &&
@@ -22262,16 +24587,15 @@ var ts;
}
function getNamedMembers(members) {
var result;
- for (var id in members) {
+ members.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
if (!result)
result = [];
- var symbol = members[id];
if (symbolIsValue(symbol)) {
result.push(symbol);
}
}
- }
+ });
return result || emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
@@ -22290,19 +24614,19 @@ var ts;
}
function forEachSymbolTableInScope(enclosingDeclaration, callback) {
var result;
- for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
- if (location_1.locals && !isGlobalSourceFile(location_1)) {
- if (result = callback(location_1.locals)) {
+ for (var location = enclosingDeclaration; location; location = location.parent) {
+ if (location.locals && !isGlobalSourceFile(location)) {
+ if (result = callback(location.locals)) {
return result;
}
}
- switch (location_1.kind) {
- case 261:
- if (!ts.isExternalOrCommonJsModule(location_1)) {
+ switch (location.kind) {
+ case 264:
+ if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
- if (result = callback(getSymbolOfNode(location_1).exports)) {
+ case 232:
+ if (result = callback(getSymbolOfNode(location).exports)) {
return result;
}
break;
@@ -22315,6 +24639,16 @@ var ts;
}
function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
function getAccessibleSymbolChainFromSymbolTable(symbols) {
+ return getAccessibleSymbolChainFromSymbolTableWorker(symbols, []);
+ }
+ function getAccessibleSymbolChainFromSymbolTableWorker(symbols, visitedSymbolTables) {
+ if (ts.contains(visitedSymbolTables, symbols)) {
+ return undefined;
+ }
+ visitedSymbolTables.push(symbols);
+ var result = trySymbolTable(symbols);
+ visitedSymbolTables.pop();
+ return result;
function canQualifySymbol(symbolFromSymbolTable, meaning) {
if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
return true;
@@ -22328,26 +24662,28 @@ var ts;
canQualifySymbol(symbolFromSymbolTable, meaning);
}
}
- if (isAccessible(symbols[symbol.name])) {
- return [symbol];
- }
- return ts.forEachProperty(symbols, function (symbolFromSymbolTable) {
- if (symbolFromSymbolTable.flags & 8388608
- && symbolFromSymbolTable.name !== "export="
- && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) {
- if (!useOnlyExternalAliasing ||
- ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
- var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
- return [symbolFromSymbolTable];
- }
- var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
- if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
- return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ function trySymbolTable(symbols) {
+ if (isAccessible(symbols.get(symbol.name))) {
+ return [symbol];
+ }
+ return ts.forEachEntry(symbols, function (symbolFromSymbolTable) {
+ if (symbolFromSymbolTable.flags & 8388608
+ && symbolFromSymbolTable.name !== "export="
+ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) {
+ if (!useOnlyExternalAliasing ||
+ ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
+ var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
+ if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ return [symbolFromSymbolTable];
+ }
+ var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
+ if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
+ return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ }
}
}
- }
- });
+ });
+ }
}
if (symbol) {
if (!(isPropertyOrMethodDeclarationSymbol(symbol))) {
@@ -22358,14 +24694,14 @@ var ts;
function needsQualification(symbol, enclosingDeclaration, meaning) {
var qualify = false;
forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
- var symbolFromSymbolTable = symbolTable[symbol.name];
+ var symbolFromSymbolTable = symbolTable.get(symbol.name);
if (!symbolFromSymbolTable) {
return false;
}
if (symbolFromSymbolTable === symbol) {
return true;
}
- symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+ symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
if (symbolFromSymbolTable.flags & meaning) {
qualify = true;
return true;
@@ -22379,10 +24715,10 @@ var ts;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
switch (declaration.kind) {
- case 147:
- case 149:
- case 151:
+ case 148:
+ case 150:
case 152:
+ case 153:
continue;
default:
return false;
@@ -22430,15 +24766,12 @@ var ts;
}
return { accessibility: 0 };
function getExternalModuleContainer(declaration) {
- for (; declaration; declaration = declaration.parent) {
- if (hasExternalModuleSymbol(declaration)) {
- return getSymbolOfNode(declaration);
- }
- }
+ var node = ts.findAncestor(declaration, hasExternalModuleSymbol);
+ return node && getSymbolOfNode(node);
}
}
function hasExternalModuleSymbol(declaration) {
- return ts.isAmbientModule(declaration) || (declaration.kind === 261 && ts.isExternalOrCommonJsModule(declaration));
+ return ts.isAmbientModule(declaration) || (declaration.kind === 264 && ts.isExternalOrCommonJsModule(declaration));
}
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
var aliasesToMakeVisible;
@@ -22472,11 +24805,11 @@ var ts;
}
function isEntityNameVisible(entityName, enclosingDeclaration) {
var meaning;
- if (entityName.parent.kind === 160 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ if (entityName.parent.kind === 161 || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning = 107455 | 1048576;
}
- else if (entityName.kind === 141 || entityName.kind === 177 ||
- entityName.parent.kind === 234) {
+ else if (entityName.kind === 142 || entityName.kind === 178 ||
+ entityName.parent.kind === 236) {
meaning = 1920;
}
else {
@@ -22524,6 +24857,483 @@ var ts;
}
return result;
}
+ function createNodeBuilder() {
+ var context;
+ return {
+ typeToTypeNode: function (type, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ }
+ };
+ function createNodeBuilderContext(enclosingDeclaration, flags) {
+ return {
+ enclosingDeclaration: enclosingDeclaration,
+ flags: flags,
+ encounteredError: false,
+ inObjectTypeLiteral: false,
+ checkAlias: true,
+ symbolStack: undefined
+ };
+ }
+ function typeToTypeNodeHelper(type) {
+ if (!type) {
+ context.encounteredError = true;
+ return undefined;
+ }
+ if (type.flags & 1) {
+ return ts.createKeywordTypeNode(118);
+ }
+ if (type.flags & 2) {
+ return ts.createKeywordTypeNode(135);
+ }
+ if (type.flags & 4) {
+ return ts.createKeywordTypeNode(132);
+ }
+ if (type.flags & 8) {
+ return ts.createKeywordTypeNode(121);
+ }
+ if (type.flags & 16) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & (32)) {
+ return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ }
+ if (type.flags & (64)) {
+ return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ }
+ if (type.flags & 128) {
+ return type.intrinsicName === "true" ? ts.createTrue() : ts.createFalse();
+ }
+ if (type.flags & 256) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 1024) {
+ return ts.createKeywordTypeNode(104);
+ }
+ if (type.flags & 2048) {
+ return ts.createKeywordTypeNode(138);
+ }
+ if (type.flags & 4096) {
+ return ts.createKeywordTypeNode(94);
+ }
+ if (type.flags & 8192) {
+ return ts.createKeywordTypeNode(129);
+ }
+ if (type.flags & 512) {
+ return ts.createKeywordTypeNode(136);
+ }
+ if (type.flags & 16777216) {
+ return ts.createKeywordTypeNode(133);
+ }
+ if (type.flags & 16384 && type.isThisType) {
+ if (context.inObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ context.encounteredError = true;
+ }
+ }
+ return ts.createThis();
+ }
+ var objectFlags = getObjectFlags(type);
+ if (objectFlags & 4) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return typeReferenceToTypeNode(type);
+ }
+ if (objectFlags & 3) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (type.flags & 16384) {
+ var name = symbolToName(type.symbol, false);
+ return ts.createTypeReferenceNode(name, undefined);
+ }
+ if (context.checkAlias && type.aliasSymbol) {
+ var name = symbolToName(type.aliasSymbol, false);
+ var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ return ts.createTypeReferenceNode(name, typeArgumentNodes);
+ }
+ context.checkAlias = false;
+ if (type.flags & 65536) {
+ var formattedUnionTypes = formatUnionTypes(type.types);
+ var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes);
+ if (unionTypeNodes && unionTypeNodes.length > 0) {
+ return ts.createUnionOrIntersectionTypeNode(165, unionTypeNodes);
+ }
+ else {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ }
+ if (type.flags & 131072) {
+ return ts.createUnionOrIntersectionTypeNode(166, mapToTypeNodeArray(type.types));
+ }
+ if (objectFlags & (16 | 32)) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ return createAnonymousTypeNode(type);
+ }
+ if (type.flags & 262144) {
+ var indexedType = type.type;
+ var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ return ts.createTypeOperatorNode(indexTypeNode);
+ }
+ if (type.flags & 524288) {
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ return ts.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
+ }
+ ts.Debug.fail("Should be unreachable.");
+ function mapToTypeNodeArray(types) {
+ var result = [];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type_1 = types_1[_i];
+ var typeNode = typeToTypeNodeHelper(type_1);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ function createMappedTypeNodeFromType(type) {
+ ts.Debug.assert(!!(type.flags & 32768));
+ var typeParameter = getTypeParameterFromMappedType(type);
+ var typeParameterNode = typeParameterToDeclaration(typeParameter);
+ var templateType = getTemplateTypeFromMappedType(type);
+ var templateTypeNode = typeToTypeNodeHelper(templateType);
+ var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130) : undefined;
+ var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54) : undefined;
+ return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ }
+ function createAnonymousTypeNode(type) {
+ var symbol = type.symbol;
+ if (symbol) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512) ||
+ shouldWriteTypeOfFunctionSymbol()) {
+ return createTypeQueryNodeFromSymbol(symbol);
+ }
+ else if (ts.contains(context.symbolStack, symbol)) {
+ var typeAlias = getTypeAliasForTypeLiteral(type);
+ if (typeAlias) {
+ var entityName = symbolToName(typeAlias, false);
+ return ts.createTypeReferenceNode(entityName, undefined);
+ }
+ else {
+ return ts.createKeywordTypeNode(118);
+ }
+ }
+ else {
+ if (!context.symbolStack) {
+ context.symbolStack = [];
+ }
+ context.symbolStack.push(symbol);
+ var result = createTypeNodeFromObjectType(type);
+ context.symbolStack.pop();
+ return result;
+ }
+ }
+ else {
+ return createTypeNodeFromObjectType(type);
+ }
+ function shouldWriteTypeOfFunctionSymbol() {
+ var isStaticMethodSymbol = !!(symbol.flags & 8192 &&
+ ts.forEach(symbol.declarations, function (declaration) { return ts.getModifierFlags(declaration) & 32; }));
+ var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
+ (symbol.parent ||
+ ts.forEach(symbol.declarations, function (declaration) {
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
+ }));
+ if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
+ return ts.contains(context.symbolStack, symbol);
+ }
+ }
+ }
+ function createTypeNodeFromObjectType(type) {
+ if (type.objectFlags & 32) {
+ if (getConstraintTypeFromMappedType(type).flags & (16384 | 262144)) {
+ return createMappedTypeNodeFromType(type);
+ }
+ }
+ var resolved = resolveStructuredTypeMembers(type);
+ if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+ if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
+ return ts.createTypeLiteralNode(undefined);
+ }
+ if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
+ var signature = resolved.callSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 159);
+ }
+ if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
+ var signature = resolved.constructSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 160);
+ }
+ }
+ var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
+ context.inObjectTypeLiteral = true;
+ var members = createTypeNodesFromResolvedType(resolved);
+ context.inObjectTypeLiteral = saveInObjectTypeLiteral;
+ return ts.createTypeLiteralNode(members);
+ }
+ function createTypeQueryNodeFromSymbol(symbol) {
+ var entityName = symbolToName(symbol, false);
+ return ts.createTypeQueryNode(entityName);
+ }
+ function typeReferenceToTypeNode(type) {
+ var typeArguments = type.typeArguments || emptyArray;
+ if (type.target === globalArrayType) {
+ var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ return ts.createArrayTypeNode(elementType);
+ }
+ else if (type.target.objectFlags & 8) {
+ if (typeArguments.length > 0) {
+ var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
+ return ts.createTupleTypeNode(tupleConstituentNodes);
+ }
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ else {
+ var outerTypeParameters = type.target.outerTypeParameters;
+ var i = 0;
+ var qualifiedName = undefined;
+ if (outerTypeParameters) {
+ var length_1 = outerTypeParameters.length;
+ while (i < length_1) {
+ var start = i;
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ do {
+ i++;
+ } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
+ if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
+ var qualifiedNamePart = symbolToName(parent, true);
+ if (!qualifiedName) {
+ qualifiedName = ts.createQualifiedName(qualifiedNamePart, undefined);
+ }
+ else {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = qualifiedNamePart;
+ qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
+ }
+ }
+ }
+ }
+ var entityName = undefined;
+ var nameIdentifier = symbolToName(type.symbol, true);
+ if (qualifiedName) {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = nameIdentifier;
+ entityName = qualifiedName;
+ }
+ else {
+ entityName = nameIdentifier;
+ }
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ var typeArgumentNodes = ts.some(typeArguments) ? mapToTypeNodeArray(typeArguments.slice(i, typeParameterCount - i)) : undefined;
+ return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
+ }
+ }
+ function createTypeNodesFromResolvedType(resolvedType) {
+ var typeElements = [];
+ for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
+ var signature = _a[_i];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 154));
+ }
+ for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
+ var signature = _c[_b];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ }
+ if (resolvedType.stringIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ }
+ if (resolvedType.numberIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ }
+ var properties = resolvedType.properties;
+ if (!properties) {
+ return typeElements;
+ }
+ for (var _d = 0, properties_2 = properties; _d < properties_2.length; _d++) {
+ var propertySymbol = properties_2[_d];
+ var propertyType = getTypeOfSymbol(propertySymbol);
+ var oldDeclaration = propertySymbol.declarations && propertySymbol.declarations[0];
+ if (!oldDeclaration) {
+ return;
+ }
+ var propertyName = oldDeclaration.name;
+ var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(54) : undefined;
+ if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length) {
+ var signatures = getSignaturesOfType(propertyType, 0);
+ for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) {
+ var signature = signatures_1[_e];
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149);
+ methodDeclaration.name = propertyName;
+ methodDeclaration.questionToken = optionalToken;
+ typeElements.push(methodDeclaration);
+ }
+ }
+ else {
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118);
+ typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ }
+ }
+ return typeElements.length ? typeElements : undefined;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 135 : 132);
+ var name = ts.getNameFromIndexInfo(indexInfo);
+ var indexingParameter = ts.createParameter(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type);
+ return ts.createIndexSignatureDeclaration(undefined, indexInfo.isReadonly ? [ts.createToken(130)] : undefined, [indexingParameter], typeNode);
+ }
+ function signatureToSignatureDeclarationHelper(signature, kind) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter); });
+ var returnTypeNode;
+ if (signature.typePredicate) {
+ var typePredicate = signature.typePredicate;
+ var parameterName = typePredicate.kind === 1 ? ts.createIdentifier(typePredicate.parameterName) : ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type);
+ returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
+ }
+ else {
+ var returnType = getReturnTypeOfSignature(signature);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ }
+ var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 ? returnTypeNode : undefined;
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ }
+ function typeParameterToDeclaration(type) {
+ var constraint = getConstraintFromTypeParameter(type);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var defaultParameter = getDefaultFromTypeParameter(type);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
+ var name = symbolToName(type.symbol, true);
+ return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
+ }
+ function symbolToParameterDeclaration(parameterSymbol) {
+ var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145);
+ var parameterType = getTypeOfSymbol(parameterSymbol);
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType);
+ var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54), parameterTypeNode, parameterDeclaration.initializer);
+ return parameterNode;
+ }
+ function symbolToName(symbol, expectsIdentifier) {
+ var chain;
+ var isTypeParameter = symbol.flags & 262144;
+ if (!isTypeParameter && context.enclosingDeclaration) {
+ chain = getSymbolChain(symbol, 0, true);
+ ts.Debug.assert(chain && chain.length > 0);
+ }
+ else {
+ chain = [symbol];
+ }
+ if (expectsIdentifier && chain.length !== 1
+ && !context.encounteredError
+ && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ context.encounteredError = true;
+ }
+ return createEntityNameFromSymbolChain(chain, chain.length - 1);
+ function createEntityNameFromSymbolChain(chain, index) {
+ ts.Debug.assert(chain && 0 <= index && index < chain.length);
+ var symbol = chain[index];
+ var typeParameterString = "";
+ if (index > 0) {
+ var parentSymbol = chain[index - 1];
+ var typeParameters = void 0;
+ if (getCheckFlags(symbol) & 1) {
+ typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
+ }
+ else {
+ var targetSymbol = getTargetSymbol(parentSymbol);
+ if (targetSymbol.flags & (32 | 64 | 524288)) {
+ typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
+ }
+ }
+ if (typeParameters && typeParameters.length > 0) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowTypeParameterInQualifiedName)) {
+ context.encounteredError = true;
+ }
+ var writer = ts.getSingleLineStringWriter();
+ var displayBuilder = getSymbolDisplayBuilder();
+ displayBuilder.buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, context.enclosingDeclaration, 0);
+ typeParameterString = writer.string();
+ ts.releaseStringWriter(writer);
+ }
+ }
+ var symbolName = getNameOfSymbol(symbol);
+ var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
+ var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
+ }
+ function getSymbolChain(symbol, meaning, endOfChain) {
+ var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, false);
+ var parentSymbol;
+ if (!accessibleSymbolChain ||
+ needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ var parentChain = getSymbolChain(parent, getQualifiedLeftMeaning(meaning), false);
+ if (parentChain) {
+ parentSymbol = parent;
+ accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [symbol]);
+ }
+ }
+ }
+ if (accessibleSymbolChain) {
+ return accessibleSymbolChain;
+ }
+ if (endOfChain ||
+ !(!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) &&
+ !(symbol.flags & (2048 | 4096))) {
+ return [symbol];
+ }
+ }
+ function getNameOfSymbol(symbol) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
+ }
+ }
+ return symbol.name;
+ }
+ }
+ }
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
var writer = ts.getSingleLineStringWriter();
getSymbolDisplayBuilder().buildTypePredicateDisplay(typePredicate, writer, enclosingDeclaration, flags);
@@ -22567,11 +25377,8 @@ var ts;
}
function getTypeAliasForTypeLiteral(type) {
if (type.symbol && type.symbol.flags & 2048) {
- var node = type.symbol.declarations[0].parent;
- while (node.kind === 166) {
- node = node.parent;
- }
- if (node.kind === 228) {
+ var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167; });
+ if (node.kind === 230) {
return getSymbolOfNode(node);
}
}
@@ -22579,29 +25386,32 @@ var ts;
}
function isTopLevelInExternalModuleAugmentation(node) {
return node && node.parent &&
- node.parent.kind === 231 &&
+ node.parent.kind === 233 &&
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
}
- function getSymbolDisplayBuilder() {
- function getNameOfSymbol(symbol) {
- if (symbol.declarations && symbol.declarations.length) {
- var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
- }
- switch (declaration.kind) {
- case 197:
- return "(Anonymous class)";
- case 184:
- case 185:
- return "(Anonymous function)";
- }
+ function getNameOfSymbol(symbol) {
+ if (symbol.declarations && symbol.declarations.length) {
+ var declaration = symbol.declarations[0];
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ switch (declaration.kind) {
+ case 198:
+ return "(Anonymous class)";
+ case 185:
+ case 186:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
+ }
+ function getSymbolDisplayBuilder() {
function appendSymbolNameOnly(symbol, writer) {
writer.writeSymbol(getNameOfSymbol(symbol), symbol);
}
@@ -22629,7 +25439,7 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
}
else {
@@ -22648,9 +25458,9 @@ var ts;
var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2));
if (!accessibleSymbolChain ||
needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
- var parent_5 = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
- if (parent_5) {
- walkSymbol(parent_5, getQualifiedLeftMeaning(meaning), false);
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ walkSymbol(parent, getQualifiedLeftMeaning(meaning), false);
}
}
if (accessibleSymbolChain) {
@@ -22680,7 +25490,7 @@ var ts;
return writeType(type, globalFlags);
function writeType(type, flags) {
var nextFlags = flags & ~512;
- if (type.flags & 16015) {
+ if (type.flags & 16793231) {
writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
? "any"
: type.intrinsicName);
@@ -22705,7 +25515,7 @@ var ts;
else if (!(flags & 512) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
- writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
+ writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
}
else if (type.flags & 196608) {
writeUnionOrIntersectionType(type, nextFlags);
@@ -22780,15 +25590,15 @@ var ts;
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
if (outerTypeParameters) {
- var length_1 = outerTypeParameters.length;
- while (i < length_1) {
+ var length_2 = outerTypeParameters.length;
+ while (i < length_2) {
var start = i;
- var parent_6 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
do {
i++;
- } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_6);
+ } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
- writeSymbolTypeReference(parent_6, typeArguments, start, i, flags);
+ writeSymbolTypeReference(parent, typeArguments, start, i, flags);
writePunctuation(writer, 22);
}
}
@@ -22814,7 +25624,8 @@ var ts;
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & (32 | 384 | 512)) {
+ if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
else if (shouldWriteTypeOfFunctionSymbol()) {
@@ -22847,7 +25658,7 @@ var ts;
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
(symbol.parent ||
ts.forEach(symbol.declarations, function (declaration) {
- return declaration.parent.kind === 261 || declaration.parent.kind === 231;
+ return declaration.parent.kind === 264 || declaration.parent.kind === 233;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
return !!(flags & 2) ||
@@ -22860,32 +25671,13 @@ var ts;
writeSpace(writer);
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags);
}
- function writeIndexSignature(info, keyword) {
- if (info) {
- if (info.isReadonly) {
- writeKeyword(writer, 130);
- writeSpace(writer);
- }
- writePunctuation(writer, 20);
- writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeKeyword(writer, keyword);
- writePunctuation(writer, 21);
- writePunctuation(writer, 55);
- writeSpace(writer);
- writeType(info.type, 0);
- writePunctuation(writer, 24);
- writer.writeLine();
- }
- }
function writePropertyWithModifiers(prop) {
if (isReadonlySymbol(prop)) {
writeKeyword(writer, 130);
writeSpace(writer);
}
buildSymbolDisplay(prop, writer);
- if (prop.flags & 536870912) {
+ if (prop.flags & 67108864) {
writePunctuation(writer, 54);
}
}
@@ -22961,15 +25753,15 @@ var ts;
writePunctuation(writer, 24);
writer.writeLine();
}
- writeIndexSignature(resolved.stringIndexInfo, 134);
- writeIndexSignature(resolved.numberIndexInfo, 132);
+ buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0, enclosingDeclaration, globalFlags, symbolStack);
+ buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
- for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) {
- var signature = signatures_1[_f];
+ for (var _f = 0, signatures_2 = signatures; _f < signatures_2.length; _f++) {
+ var signature = signatures_2[_f];
writePropertyWithModifiers(p);
buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, undefined, symbolStack);
writePunctuation(writer, 24);
@@ -23028,32 +25820,43 @@ var ts;
writeSpace(writer);
buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack);
}
+ var defaultType = getDefaultFromTypeParameter(tp);
+ if (defaultType) {
+ writeSpace(writer);
+ writePunctuation(writer, 57);
+ writeSpace(writer);
+ buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack);
+ }
}
function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) {
var parameterNode = p.valueDeclaration;
- if (ts.isRestParameter(parameterNode)) {
+ if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) {
writePunctuation(writer, 23);
}
- if (ts.isBindingPattern(parameterNode.name)) {
+ if (parameterNode && ts.isBindingPattern(parameterNode.name)) {
buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack);
}
else {
appendSymbolNameOnly(p, writer);
}
- if (isOptionalParameter(parameterNode)) {
+ if (parameterNode && isOptionalParameter(parameterNode)) {
writePunctuation(writer, 54);
}
writePunctuation(writer, 55);
writeSpace(writer);
- buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack);
+ var type = getTypeOfSymbol(p);
+ if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
+ type = includeFalsyTypes(type, 2048);
+ }
+ buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
writePunctuation(writer, 16);
buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
writePunctuation(writer, 17);
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
writePunctuation(writer, 20);
var elements = bindingPattern.elements;
buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
@@ -23067,9 +25870,9 @@ var ts;
if (ts.isOmittedExpression(bindingElement)) {
return;
}
- ts.Debug.assert(bindingElement.kind === 174);
+ ts.Debug.assert(bindingElement.kind === 175);
if (bindingElement.propertyName) {
- writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
+ writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName));
writePunctuation(writer, 55);
writeSpace(writer);
}
@@ -23141,6 +25944,10 @@ var ts;
buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
+ var returnType = getReturnTypeOfSignature(signature);
+ if (flags & 2048 && isTypeAny(returnType)) {
+ return;
+ }
if (flags & 8) {
writeSpace(writer);
writePunctuation(writer, 35);
@@ -23153,7 +25960,6 @@ var ts;
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
}
else {
- var returnType = getReturnTypeOfSignature(signature);
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
}
}
@@ -23171,6 +25977,32 @@ var ts;
buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack);
buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack);
}
+ function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) {
+ if (info) {
+ if (info.isReadonly) {
+ writeKeyword(writer, 130);
+ writeSpace(writer);
+ }
+ writePunctuation(writer, 20);
+ writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ switch (kind) {
+ case 1:
+ writeKeyword(writer, 132);
+ break;
+ case 0:
+ writeKeyword(writer, 135);
+ break;
+ }
+ writePunctuation(writer, 21);
+ writePunctuation(writer, 55);
+ writeSpace(writer);
+ buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
+ writePunctuation(writer, 24);
+ writer.writeLine();
+ }
+ }
return _displayBuilder || (_displayBuilder = {
buildSymbolDisplay: buildSymbolDisplay,
buildTypeDisplay: buildTypeDisplay,
@@ -23181,6 +26013,7 @@ var ts;
buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
buildSignatureDisplay: buildSignatureDisplay,
+ buildIndexSignatureDisplay: buildIndexSignatureDisplay,
buildReturnTypeDisplay: buildReturnTypeDisplay
});
}
@@ -23195,63 +26028,63 @@ var ts;
return false;
function determineIfDeclarationIsVisible() {
switch (node.kind) {
- case 174:
+ case 175:
return isDeclarationVisible(node.parent.parent);
- case 223:
+ case 225:
if (ts.isBindingPattern(node.name) &&
!node.name.elements.length) {
return false;
}
- case 230:
- case 226:
- case 227:
+ case 232:
case 228:
- case 225:
case 229:
- case 234:
+ case 230:
+ case 227:
+ case 231:
+ case 236:
if (ts.isExternalModuleAugmentation(node)) {
return true;
}
- var parent_7 = getDeclarationContainer(node);
+ var parent = getDeclarationContainer(node);
if (!(ts.getCombinedModifierFlags(node) & 1) &&
- !(node.kind !== 234 && parent_7.kind !== 261 && ts.isInAmbientContext(parent_7))) {
- return isGlobalSourceFile(parent_7);
+ !(node.kind !== 236 && parent.kind !== 264 && ts.isInAmbientContext(parent))) {
+ return isGlobalSourceFile(parent);
}
- return isDeclarationVisible(parent_7);
+ return isDeclarationVisible(parent);
+ case 148:
case 147:
- case 146:
- case 151:
case 152:
+ case 153:
+ case 150:
case 149:
- case 148:
if (ts.getModifierFlags(node) & (8 | 16)) {
return false;
}
- case 150:
- case 154:
- case 153:
+ case 151:
case 155:
- case 144:
- case 231:
- case 158:
+ case 154:
+ case 156:
+ case 145:
+ case 233:
case 159:
- case 161:
- case 157:
+ case 160:
case 162:
+ case 158:
case 163:
case 164:
case 165:
case 166:
+ case 167:
return isDeclarationVisible(node.parent);
- case 236:
- case 237:
+ case 238:
case 239:
+ case 241:
return false;
- case 143:
- case 261:
- case 233:
+ case 144:
+ case 264:
+ case 235:
return true;
- case 240:
+ case 242:
return false;
default:
return false;
@@ -23260,10 +26093,10 @@ var ts;
}
function collectLinkedAliases(node) {
var exportSymbol;
- if (node.parent && node.parent.kind === 240) {
+ if (node.parent && node.parent.kind === 242) {
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
- else if (node.parent.kind === 243) {
+ else if (node.parent.kind === 245) {
var exportSpecifier = node.parent;
exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
@@ -23295,8 +26128,8 @@ var ts;
function pushTypeResolution(target, propertyName) {
var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
if (resolutionCycleStartIndex >= 0) {
- var length_2 = resolutionTargets.length;
- for (var i = resolutionCycleStartIndex; i < length_2; i++) {
+ var length_3 = resolutionTargets.length;
+ for (var i = resolutionCycleStartIndex; i < length_3; i++) {
resolutionResults[i] = false;
}
return false;
@@ -23338,21 +26171,20 @@ var ts;
return resolutionResults.pop();
}
function getDeclarationContainer(node) {
- node = ts.getRootDeclaration(node);
- while (node) {
+ node = ts.findAncestor(ts.getRootDeclaration(node), function (node) {
switch (node.kind) {
- case 223:
- case 224:
+ case 225:
+ case 226:
+ case 241:
+ case 240:
case 239:
case 238:
- case 237:
- case 236:
- node = node.parent;
- break;
+ return false;
default:
- return node.parent;
+ return true;
}
- }
+ });
+ return node && node.parent;
}
function getTypeOfPrototypeProperty(prototype) {
var classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
@@ -23365,32 +26197,34 @@ var ts;
function isTypeAny(type) {
return type && (type.flags & 1) !== 0;
}
- function isTypeNever(type) {
- return type && (type.flags & 8192) !== 0;
- }
function getTypeForBindingElementParent(node) {
var symbol = getSymbolOfNode(node);
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
}
function isComputedNonLiteralName(name) {
- return name.kind === 142 && !ts.isStringOrNumericLiteral(name.expression);
+ return name.kind === 143 && !ts.isStringOrNumericLiteral(name.expression);
}
function getRestType(source, properties, symbol) {
- ts.Debug.assert(!!(source.flags & 32768), "Rest types only support object types right now.");
+ source = filterType(source, function (t) { return !(t.flags & 6144); });
+ if (source.flags & 8192) {
+ return emptyObjectType;
+ }
+ if (source.flags & 65536) {
+ return mapType(source, function (t) { return getRestType(t, properties, symbol); });
+ }
var members = ts.createMap();
var names = ts.createMap();
- for (var _i = 0, properties_2 = properties; _i < properties_2.length; _i++) {
- var name_19 = properties_2[_i];
- names[ts.getTextOfPropertyName(name_19)] = true;
+ for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
+ var name = properties_3[_i];
+ names.set(ts.getTextOfPropertyName(name), true);
}
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
- var inNamesToRemove = prop.name in names;
+ var inNamesToRemove = names.has(prop.name);
var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
- var isMethod = prop.flags & 8192;
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
- if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
- members[prop.name] = prop;
+ if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
+ members.set(prop.name, prop);
}
}
var stringIndexInfo = getIndexInfoOfType(source, 0);
@@ -23410,9 +26244,9 @@ var ts;
return parentType;
}
var type;
- if (pattern.kind === 172) {
+ if (pattern.kind === 173) {
if (declaration.dotDotDotToken) {
- if (!(parentType.flags & 32768)) {
+ if (!isValidSpreadType(parentType)) {
error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types);
return unknownType;
}
@@ -23426,25 +26260,25 @@ var ts;
type = getRestType(parentType, literalMembers, declaration.symbol);
}
else {
- var name_20 = declaration.propertyName || declaration.name;
- if (isComputedNonLiteralName(name_20)) {
+ var name = declaration.propertyName || declaration.name;
+ if (isComputedNonLiteralName(name)) {
return anyType;
}
if (declaration.initializer) {
getContextualType(declaration.initializer);
}
- var text = ts.getTextOfPropertyName(name_20);
+ var text = ts.getTextOfPropertyName(name);
type = getTypeOfPropertyOfType(parentType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1) ||
getIndexTypeOfType(parentType, 0);
if (!type) {
- error(name_20, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_20));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name));
return unknownType;
}
}
}
else {
- var elementType = checkIteratedTypeOrElementType(parentType, pattern, false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, false, false);
if (declaration.dotDotDotToken) {
type = createArrayType(elementType);
}
@@ -23471,7 +26305,7 @@ var ts;
getUnionType([type, checkExpressionCached(declaration.initializer)], true) :
type;
}
- function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) {
+ function getTypeForDeclarationFromJSDocComment(declaration) {
var jsdocType = ts.getJSDocType(declaration);
if (jsdocType) {
return getTypeFromTypeNode(jsdocType);
@@ -23484,33 +26318,35 @@ var ts;
}
function isEmptyArrayLiteral(node) {
var expr = ts.skipParentheses(node);
- return expr.kind === 175 && expr.elements.length === 0;
+ return expr.kind === 176 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 2097152) {
- var type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration);
+ if (declaration.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.parent.parent.kind === 212) {
+ if (declaration.parent.parent.kind === 214) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
}
- if (declaration.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
+ if (declaration.parent.parent.kind === 215) {
+ var forOfStatement = declaration.parent.parent;
+ return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType;
}
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
if (declaration.type) {
- return addOptionality(getTypeFromTypeNode(declaration.type), declaration.questionToken && includeOptionality);
+ var declaredType = getTypeFromTypeNode(declaration.type);
+ return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
- if ((compilerOptions.noImplicitAny || declaration.flags & 2097152) &&
- declaration.kind === 223 && !ts.isBindingPattern(declaration.name) &&
+ if ((noImplicitAny || declaration.flags & 65536) &&
+ declaration.kind === 225 && !ts.isBindingPattern(declaration.name) &&
!(ts.getCombinedModifierFlags(declaration) & 1) && !ts.isInAmbientContext(declaration)) {
if (!(ts.getCombinedNodeFlags(declaration) & 2) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) {
return autoType;
@@ -23519,10 +26355,10 @@ var ts;
return autoArrayType;
}
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var func = declaration.parent;
- if (func.kind === 152 && !ts.hasDynamicName(func)) {
- var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 151);
+ if (func.kind === 153 && !ts.hasDynamicName(func)) {
+ var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152);
if (getter) {
var getterSignature = getSignatureFromDeclaration(getter);
var thisParameter = getAccessorThisParameter(func);
@@ -23548,7 +26384,10 @@ var ts;
var type = checkDeclarationInitializer(declaration);
return addOptionality(type, declaration.questionToken && includeOptionality);
}
- if (declaration.kind === 258) {
+ if (ts.isJsxAttribute(declaration)) {
+ return trueType;
+ }
+ if (declaration.kind === 261) {
return checkIdentifier(declaration.name);
}
if (ts.isBindingPattern(declaration.name)) {
@@ -23556,6 +26395,37 @@ var ts;
}
return undefined;
}
+ function getWidenedTypeFromJSSpecialPropertyDeclarations(symbol) {
+ var types = [];
+ var definedInConstructor = false;
+ var definedInMethod = false;
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ var expression = declaration.kind === 193 ? declaration :
+ declaration.kind === 178 ? ts.getAncestor(declaration, 193) :
+ undefined;
+ if (!expression) {
+ return unknownType;
+ }
+ if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98) {
+ if (ts.getThisContainer(expression, false).kind === 151) {
+ definedInConstructor = true;
+ }
+ else {
+ definedInMethod = true;
+ }
+ }
+ if (expression.flags & 65536) {
+ var type = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type && type !== unknownType) {
+ types.push(getWidenedType(type));
+ continue;
+ }
+ }
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
+ return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ }
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
return checkDeclarationInitializer(element);
@@ -23563,28 +26433,33 @@ var ts;
if (ts.isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
}
- if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
+ if (reportErrors && noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
reportImplicitAnyError(element, anyType);
}
return anyType;
}
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
var members = ts.createMap();
+ var stringIndexInfo;
var hasComputedProperties = false;
ts.forEach(pattern.elements, function (e) {
var name = e.propertyName || e.name;
- if (isComputedNonLiteralName(name) || e.dotDotDotToken) {
+ if (isComputedNonLiteralName(name)) {
hasComputedProperties = true;
return;
}
+ if (e.dotDotDotToken) {
+ stringIndexInfo = createIndexInfo(anyType, false);
+ return;
+ }
var text = ts.getTextOfPropertyName(name);
- var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0);
+ var flags = 4 | (e.initializer ? 67108864 : 0);
var symbol = createSymbol(flags, text);
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
symbol.bindingElement = e;
- members[symbol.name] = symbol;
+ members.set(symbol.name, symbol);
});
- var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
+ var result = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, undefined);
if (includePatternInType) {
result.pattern = pattern;
}
@@ -23608,7 +26483,7 @@ var ts;
return result;
}
function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
- return pattern.kind === 172
+ return pattern.kind === 173
? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
}
@@ -23618,13 +26493,13 @@ var ts;
if (reportErrors) {
reportErrorsFromWidening(declaration, type);
}
- if (declaration.kind === 257) {
+ if (declaration.kind === 260) {
return type;
}
return getWidenedType(type);
}
type = declaration.dotDotDotToken ? anyArrayType : anyType;
- if (reportErrors && compilerOptions.noImplicitAny) {
+ if (reportErrors && noImplicitAny) {
if (!declarationBelongsToPrivateAmbientMember(declaration)) {
reportImplicitAnyError(declaration, type);
}
@@ -23633,56 +26508,38 @@ var ts;
}
function declarationBelongsToPrivateAmbientMember(declaration) {
var root = ts.getRootDeclaration(declaration);
- var memberDeclaration = root.kind === 144 ? root.parent : root;
+ var memberDeclaration = root.kind === 145 ? root.parent : root;
return isPrivateWithinAmbient(memberDeclaration);
}
function getTypeOfVariableOrParameterOrProperty(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- if (symbol.flags & 134217728) {
+ if (symbol.flags & 16777216) {
return links.type = getTypeOfPrototypeProperty(symbol);
}
var declaration = symbol.valueDeclaration;
if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
return links.type = anyType;
}
- if (declaration.kind === 240) {
+ if (declaration.kind === 242) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 2097152 && declaration.kind === 286 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 290 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
return unknownType;
}
var type = void 0;
- if (declaration.kind === 192 ||
- declaration.kind === 177 && declaration.parent.kind === 192) {
- if (declaration.flags & 2097152) {
- var jsdocType = ts.getJSDocType(declaration.parent);
- if (jsdocType) {
- return links.type = getTypeFromTypeNode(jsdocType);
- }
- }
- var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 192 ?
- checkExpressionCached(decl.right) :
- checkExpressionCached(decl.parent.right); });
- type = getUnionType(declaredTypes, true);
+ if (declaration.kind === 193 ||
+ declaration.kind === 178 && declaration.parent.kind === 193) {
+ type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol);
}
else {
type = getWidenedTypeForVariableLikeDeclaration(declaration, true);
}
if (!popTypeResolution()) {
- if (symbol.valueDeclaration.type) {
- type = unknownType;
- error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
- }
- else {
- type = anyType;
- if (compilerOptions.noImplicitAny) {
- error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
- }
- }
+ type = reportCircularityError(symbol);
}
links.type = type;
}
@@ -23690,7 +26547,7 @@ var ts;
}
function getAnnotatedAccessorType(accessor) {
if (accessor) {
- if (accessor.kind === 151) {
+ if (accessor.kind === 152) {
return accessor.type && getTypeFromTypeNode(accessor.type);
}
else {
@@ -23710,10 +26567,10 @@ var ts;
function getTypeOfAccessors(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- var getter = ts.getDeclarationOfKind(symbol, 151);
- var setter = ts.getDeclarationOfKind(symbol, 152);
- if (getter && getter.flags & 2097152) {
- var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
+ var getter = ts.getDeclarationOfKind(symbol, 152);
+ var setter = ts.getDeclarationOfKind(symbol, 153);
+ if (getter && getter.flags & 65536) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
if (jsDocType) {
return links.type = jsDocType;
}
@@ -23736,7 +26593,7 @@ var ts;
type = getReturnTypeFromBody(getter);
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
if (setter) {
error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
@@ -23751,8 +26608,8 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
- var getter_1 = ts.getDeclarationOfKind(symbol, 151);
+ if (noImplicitAny) {
+ var getter_1 = ts.getDeclarationOfKind(symbol, 152);
error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
}
}
@@ -23760,6 +26617,10 @@ var ts;
}
return links.type;
}
+ function getBaseTypeVariableOfClass(symbol) {
+ var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
+ return baseConstructorType.flags & 540672 ? baseConstructorType : undefined;
+ }
function getTypeOfFuncClassEnumModule(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
@@ -23768,8 +26629,13 @@ var ts;
}
else {
var type = createObjectType(16, symbol);
- links.type = strictNullChecks && symbol.flags & 536870912 ?
- includeFalsyTypes(type, 2048) : type;
+ if (symbol.flags & 32) {
+ var baseTypeVariable = getBaseTypeVariableOfClass(symbol);
+ links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
+ }
+ else {
+ links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ }
}
}
return links.type;
@@ -23794,12 +26660,37 @@ var ts;
function getTypeOfInstantiatedSymbol(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ if (symbolInstantiationDepth === 100) {
+ error(symbol.valueDeclaration, ts.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite);
+ links.type = unknownType;
+ }
+ else {
+ if (!pushTypeResolution(symbol, 0)) {
+ return unknownType;
+ }
+ symbolInstantiationDepth++;
+ var type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ symbolInstantiationDepth--;
+ if (!popTypeResolution()) {
+ type = reportCircularityError(symbol);
+ }
+ links.type = type;
+ }
}
return links.type;
}
+ function reportCircularityError(symbol) {
+ if (symbol.valueDeclaration.type) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
+ return unknownType;
+ }
+ if (noImplicitAny) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
+ }
+ return anyType;
+ }
function getTypeOfSymbol(symbol) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -23819,19 +26710,30 @@ var ts;
}
return unknownType;
}
+ function isReferenceToType(type, target) {
+ return type !== undefined
+ && target !== undefined
+ && (getObjectFlags(type) & 4) !== 0
+ && type.target === target;
+ }
function getTargetType(type) {
return getObjectFlags(type) & 4 ? type.target : type;
}
function hasBaseType(type, checkBase) {
return check(type);
function check(type) {
- var target = getTargetType(type);
- return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ if (getObjectFlags(type) & (3 | 4)) {
+ var target = getTargetType(type);
+ return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ }
+ else if (type.flags & 131072) {
+ return ts.forEach(type.types, check);
+ }
}
}
function appendTypeParameters(typeParameters, declarations) {
- for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
- var declaration = declarations_2[_i];
+ for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+ var declaration = declarations_3[_i];
var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration));
if (!typeParameters) {
typeParameters = [tp];
@@ -23848,9 +26750,9 @@ var ts;
if (!node) {
return typeParameters;
}
- if (node.kind === 226 || node.kind === 197 ||
- node.kind === 225 || node.kind === 184 ||
- node.kind === 149 || node.kind === 185) {
+ if (node.kind === 228 || node.kind === 198 ||
+ node.kind === 227 || node.kind === 185 ||
+ node.kind === 150 || node.kind === 186) {
var declarations = node.typeParameters;
if (declarations) {
return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
@@ -23859,15 +26761,15 @@ var ts;
}
}
function getOuterTypeParametersOfClassOrInterface(symbol) {
- var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 227);
+ var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229);
return appendOuterTypeParameters(undefined, declaration);
}
function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) {
var result;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var node = _a[_i];
- if (node.kind === 227 || node.kind === 226 ||
- node.kind === 197 || node.kind === 228) {
+ if (node.kind === 229 || node.kind === 228 ||
+ node.kind === 198 || node.kind === 230) {
var declaration = node;
if (declaration.typeParameters) {
result = appendTypeParameters(result, declaration.typeParameters);
@@ -23879,18 +26781,34 @@ var ts;
function getTypeParametersOfClassOrInterface(symbol) {
return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
}
+ function isMixinConstructorType(type) {
+ var signatures = getSignaturesOfType(type, 1);
+ if (signatures.length === 1) {
+ var s = signatures[0];
+ return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType;
+ }
+ return false;
+ }
function isConstructorType(type) {
- return type.flags & 32768 && getSignaturesOfType(type, 1).length > 0;
+ if (isValidBaseType(type) && getSignaturesOfType(type, 1).length > 0) {
+ return true;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type);
+ return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
+ }
+ return false;
}
function getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
}
- function getConstructorsForTypeArguments(type, typeArgumentNodes) {
- var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
- return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; });
+ function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var typeArgCount = ts.length(typeArgumentNodes);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ return ts.filter(getSignaturesOfType(type, 1), function (sig) { return (isJavaScript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= ts.length(sig.typeParameters); });
}
- function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
- var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
+ function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
if (typeArgumentNodes) {
var typeArguments_1 = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.map(signatures, function (sig) { return getSignatureInstantiation(sig, typeArguments_1); });
@@ -23907,14 +26825,14 @@ var ts;
return unknownType;
}
var baseConstructorType = checkExpression(baseTypeNode.expression);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072)) {
resolveStructuredTypeMembers(baseConstructorType);
}
if (!popTypeResolution()) {
error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
return type.resolvedBaseConstructorType = unknownType;
}
- if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
+ if (!(baseConstructorType.flags & 1) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
return type.resolvedBaseConstructorType = unknownType;
}
@@ -23943,8 +26861,8 @@ var ts;
}
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
- var baseConstructorType = getBaseConstructorTypeOfClass(type);
- if (!(baseConstructorType.flags & 32768)) {
+ var baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));
+ if (!(baseConstructorType.flags & (32768 | 131072 | 1))) {
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -23954,8 +26872,11 @@ var ts;
areAllOuterTypeParametersApplied(originalBaseType)) {
baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
}
+ else if (baseConstructorType.flags & 1) {
+ baseType = baseConstructorType;
+ }
else {
- var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);
if (!constructors.length) {
error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);
return;
@@ -23972,7 +26893,7 @@ var ts;
if (baseType === unknownType) {
return;
}
- if (!(getObjectFlags(getTargetType(baseType)) & 3)) {
+ if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
return;
}
@@ -23996,16 +26917,20 @@ var ts;
}
return true;
}
+ function isValidBaseType(type) {
+ return type.flags & (32768 | 16777216 | 1) && !isGenericMappedType(type) ||
+ type.flags & 131072 && !ts.forEach(type.types, function (t) { return !isValidBaseType(t); });
+ }
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 && ts.getInterfaceBaseTypeNodes(declaration)) {
+ if (declaration.kind === 229 && ts.getInterfaceBaseTypeNodes(declaration)) {
for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
var node = _c[_b];
var baseType = getTypeFromTypeNode(node);
if (baseType !== unknownType) {
- if (getObjectFlags(getTargetType(baseType)) & 3) {
+ if (isValidBaseType(baseType)) {
if (type !== baseType && !hasBaseType(baseType, type)) {
if (type.resolvedBaseTypes === emptyArray) {
type.resolvedBaseTypes = [baseType];
@@ -24029,7 +26954,7 @@ var ts;
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227) {
+ if (declaration.kind === 229) {
if (declaration.flags & 64) {
return false;
}
@@ -24062,7 +26987,7 @@ var ts;
type.outerTypeParameters = outerTypeParameters;
type.localTypeParameters = localTypeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -24079,7 +27004,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 285);
+ var declaration = ts.getDeclarationOfKind(symbol, 289);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -24090,7 +27015,7 @@ var ts;
}
}
else {
- declaration = ts.getDeclarationOfKind(symbol, 228);
+ declaration = ts.getDeclarationOfKind(symbol, 230);
type = getTypeFromTypeNode(declaration.type);
}
if (popTypeResolution()) {
@@ -24098,7 +27023,7 @@ var ts;
if (typeParameters) {
links.typeParameters = typeParameters;
links.instantiations = ts.createMap();
- links.instantiations[getTypeListId(typeParameters)] = type;
+ links.instantiations.set(getTypeListId(typeParameters), type);
}
}
else {
@@ -24115,14 +27040,14 @@ var ts;
return !ts.isInAmbientContext(member);
}
return expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8 ||
- expr.kind === 70 && !!symbol.exports[expr.text];
+ expr.kind === 70 && !!symbol.exports.get(expr.text);
}
function enumHasLiteralMembers(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
if (!isLiteralEnumMember(symbol, member)) {
@@ -24147,10 +27072,10 @@ var ts;
enumType.symbol = symbol;
if (enumHasLiteralMembers(symbol)) {
var memberTypeList = [];
- var memberTypes = ts.createMap();
+ var memberTypes = [];
for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229) {
+ if (declaration.kind === 231) {
computeEnumMemberValues(declaration);
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
@@ -24167,7 +27092,7 @@ var ts;
if (memberTypeList.length > 1) {
enumType.flags |= 65536;
enumType.types = memberTypeList;
- unionTypes[getTypeListId(memberTypeList)] = enumType;
+ unionTypes.set(getTypeListId(memberTypeList), enumType);
}
}
}
@@ -24188,9 +27113,6 @@ var ts;
if (!links.declaredType) {
var type = createType(16384);
type.symbol = symbol;
- if (!ts.getDeclarationOfKind(symbol, 143).constraint) {
- type.constraint = noConstraintType;
- }
links.declaredType = type;
}
return links.declaredType;
@@ -24203,7 +27125,6 @@ var ts;
return links.declaredType;
}
function getDeclaredTypeOfSymbol(symbol) {
- ts.Debug.assert((symbol.flags & 16777216) === 0);
if (symbol.flags & (32 | 64)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
@@ -24238,19 +27159,20 @@ var ts;
function isIndependentType(node) {
switch (node.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 136:
+ case 133:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 171:
+ case 172:
return true;
- case 162:
+ case 163:
return isIndependentType(node.elementType);
- case 157:
+ case 158:
return isIndependentTypeReference(node);
}
return false;
@@ -24259,7 +27181,7 @@ var ts;
return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 150 && (!node.type || !isIndependentType(node.type))) {
+ if (node.kind !== 151 && (!node.type || !isIndependentType(node.type))) {
return false;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
@@ -24275,12 +27197,12 @@ var ts;
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
return isIndependentVariableLikeDeclaration(declaration);
- case 149:
- case 148:
case 150:
+ case 149:
+ case 151:
return isIndependentFunctionLikeDeclaration(declaration);
}
}
@@ -24291,7 +27213,7 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
- result[symbol.name] = symbol;
+ result.set(symbol.name, symbol);
}
return result;
}
@@ -24299,15 +27221,15 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
- result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper);
+ result.set(symbol.name, mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper));
}
return result;
}
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
- if (!symbols[s.name]) {
- symbols[s.name] = s;
+ if (!symbols.has(s.name)) {
+ symbols.set(s.name, s);
}
}
}
@@ -24315,8 +27237,8 @@ var ts;
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
- type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
- type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
+ type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members.get("__call"));
+ type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members.get("__new"));
type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
}
@@ -24324,7 +27246,14 @@ var ts;
}
function getTypeWithThisArgument(type, thisArgument) {
if (getObjectFlags(type) & 4) {
- return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
+ var target = type.target;
+ var typeArguments = type.typeArguments;
+ if (ts.length(target.typeParameters) === ts.length(typeArguments)) {
+ return createTypeReference(target, ts.concatenate(typeArguments, [thisArgument || target.thisType]));
+ }
+ }
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, function (t) { return getTypeWithThisArgument(t, thisArgument); }));
}
return type;
}
@@ -24360,10 +27289,14 @@ var ts;
for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
var baseType = baseTypes_1[_i];
var instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;
- addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
+ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0));
constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1));
- stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0);
+ if (!stringIndexInfo) {
+ stringIndexInfo = instantiatedBaseType === anyType ?
+ createIndexInfo(anyType, false) :
+ getIndexInfoOfType(instantiatedBaseType, 0);
+ }
numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1);
}
}
@@ -24402,14 +27335,16 @@ var ts;
return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, undefined, 0, false, false)];
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
+ var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
- var typeArgCount = typeArguments ? typeArguments.length : 0;
+ var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var baseSig = baseSignatures_1[_i];
- var typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0;
- if (typeParamCount === typeArgCount) {
- var sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig);
+ var minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);
+ var typeParamCount = ts.length(baseSig.typeParameters);
+ if ((isJavaScript || typeArgCount >= minTypeArgumentCount) && typeArgCount <= typeParamCount) {
+ var sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, baseTypeNode)) : cloneSignature(baseSig);
sig.typeParameters = classType.localTypeParameters;
sig.resolvedReturnType = classType;
result.push(sig);
@@ -24463,7 +27398,7 @@ var ts;
s = cloneSignature(signature);
if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) {
var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), true);
- s.thisParameter = createTransientSymbol(signature.thisParameter, thisType);
+ s.thisParameter = createSymbolWithType(signature.thisParameter, thisType);
}
s.resolvedReturnType = undefined;
s.unionSignatures = unionSignatures;
@@ -24478,8 +27413,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
- var type = types_1[_i];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type = types_2[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -24505,17 +27440,44 @@ var ts;
function unionSpreadIndexInfos(info1, info2) {
return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
}
+ function includeMixinType(type, types, index) {
+ var mixedTypes = [];
+ for (var i = 0; i < types.length; i++) {
+ if (i === index) {
+ mixedTypes.push(type);
+ }
+ else if (isMixinConstructorType(types[i])) {
+ mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1)[0]));
+ }
+ }
+ return getIntersectionType(mixedTypes);
+ }
function resolveIntersectionTypeMembers(type) {
var callSignatures = emptyArray;
var constructSignatures = emptyArray;
- var stringIndexInfo = undefined;
- var numberIndexInfo = undefined;
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var t = _a[_i];
+ var stringIndexInfo;
+ var numberIndexInfo;
+ var types = type.types;
+ var mixinCount = ts.countWhere(types, isMixinConstructorType);
+ var _loop_3 = function (i) {
+ var t = type.types[i];
+ if (mixinCount === 0 || mixinCount === types.length && i === 0 || !isMixinConstructorType(t)) {
+ var signatures = getSignaturesOfType(t, 1);
+ if (signatures.length && mixinCount > 0) {
+ signatures = ts.map(signatures, function (s) {
+ var clone = cloneSignature(s);
+ clone.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, i);
+ return clone;
+ });
+ }
+ constructSignatures = ts.concatenate(constructSignatures, signatures);
+ }
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0));
- constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1));
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0));
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1));
+ };
+ for (var i = 0; i < types.length; i++) {
+ _loop_3(i);
}
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
}
@@ -24531,8 +27493,8 @@ var ts;
}
else if (symbol.flags & 2048) {
var members = symbol.members;
- var callSignatures = getSignaturesOfSymbol(members["__call"]);
- var constructSignatures = getSignaturesOfSymbol(members["__new"]);
+ var callSignatures = getSignaturesOfSymbol(members.get("__call"));
+ var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
@@ -24540,23 +27502,27 @@ var ts;
else {
var members = emptySymbols;
var constructSignatures = emptyArray;
- if (symbol.flags & 1952) {
+ var stringIndexInfo = undefined;
+ if (symbol.exports) {
members = getExportsOfSymbol(symbol);
}
if (symbol.flags & 32) {
var classType = getDeclaredTypeOfClassOrInterface(symbol);
- constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
+ constructSignatures = getSignaturesOfSymbol(symbol.members.get("__constructor"));
if (!constructSignatures.length) {
constructSignatures = getDefaultConstructSignatures(classType);
}
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
- if (baseConstructorType.flags & 32768) {
+ if (baseConstructorType.flags & (32768 | 131072 | 540672)) {
members = createSymbolTable(getNamedMembers(members));
- addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType));
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
+ }
+ else if (baseConstructorType === anyType) {
+ stringIndexInfo = createIndexInfo(anyType, false);
}
}
var numberIndexInfo = symbol.flags & 384 ? enumNumberIndexInfo : undefined;
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo);
+ setStructuredTypeMembers(type, members, emptyArray, constructSignatures, stringIndexInfo, numberIndexInfo);
if (symbol.flags & (16 | 8192)) {
type.callSignatures = getSignaturesOfSymbol(symbol);
}
@@ -24565,37 +27531,48 @@ var ts;
function resolveMappedTypeMembers(type) {
var members = ts.createMap();
var stringIndexInfo;
- var numberIndexInfo;
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var typeParameter = getTypeParameterFromMappedType(type);
var constraintType = getConstraintTypeFromMappedType(type);
var templateType = getTemplateTypeFromMappedType(type);
- var isReadonly = !!type.declaration.readonlyToken;
- var isOptional = !!type.declaration.questionToken;
- var keyType = constraintType.flags & 16384 ? getApparentType(constraintType) : constraintType;
- var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
- forEachType(iterationType, function (t) {
- var iterationMapper = createUnaryTypeMapper(typeParameter, t);
+ var modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
+ var templateReadonly = !!type.declaration.readonlyToken;
+ var templateOptional = !!type.declaration.questionToken;
+ if (type.declaration.typeParameter.constraint.kind === 169) {
+ for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
+ var propertySymbol = _a[_i];
+ addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol);
+ }
+ if (getIndexInfoOfType(modifiersType, 0)) {
+ addMemberForKeyType(stringType);
+ }
+ }
+ else {
+ var keyType = constraintType.flags & 540672 ? getApparentType(constraintType) : constraintType;
+ var iterationType = keyType.flags & 262144 ? getIndexType(getApparentType(keyType.type)) : keyType;
+ forEachType(iterationType, addMemberForKeyType);
+ }
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
+ function addMemberForKeyType(t, propertySymbol) {
+ var iterationMapper = createTypeMapper([typeParameter], [t]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
- if (t.flags & (32 | 64 | 256)) {
+ if (t.flags & 32) {
var propName = t.text;
- var prop = createSymbol(4 | 67108864 | (isOptional ? 536870912 : 0), propName);
- prop.type = addOptionality(propType, isOptional);
- prop.isReadonly = isReadonly;
- members[propName] = prop;
+ var modifiersProp = getPropertyOfType(modifiersType, propName);
+ var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
+ var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
+ prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? 8 : 0;
+ prop.type = propType;
+ if (propertySymbol) {
+ prop.syntheticOrigin = propertySymbol;
+ }
+ members.set(propName, prop);
}
else if (t.flags & 2) {
- stringIndexInfo = createIndexInfo(propType, isReadonly);
+ stringIndexInfo = createIndexInfo(propType, templateReadonly);
}
- else if (t.flags & 4) {
- numberIndexInfo = createIndexInfo(propType, isReadonly);
- }
- });
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
- numberIndexInfo = undefined;
}
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
function getTypeParameterFromMappedType(type) {
return type.typeParameter ||
@@ -24608,16 +27585,28 @@ var ts;
function getTemplateTypeFromMappedType(type) {
return type.templateType ||
(type.templateType = type.declaration.type ?
- instantiateType(getTypeFromTypeNode(type.declaration.type), type.mapper || identityMapper) :
+ instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!type.declaration.questionToken), type.mapper || identityMapper) :
unknownType);
}
- function getErasedTemplateTypeFromMappedType(type) {
- return instantiateType(getTemplateTypeFromMappedType(type), createUnaryTypeMapper(getTypeParameterFromMappedType(type), anyType));
+ function getModifiersTypeFromMappedType(type) {
+ if (!type.modifiersType) {
+ var constraintDeclaration = type.declaration.typeParameter.constraint;
+ if (constraintDeclaration.kind === 169) {
+ type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper);
+ }
+ else {
+ var declaredType = getTypeFromMappedTypeNode(type.declaration);
+ var constraint = getConstraintTypeFromMappedType(declaredType);
+ var extendedConstraint = constraint && constraint.flags & 16384 ? getConstraintOfTypeParameter(constraint) : constraint;
+ type.modifiersType = extendedConstraint && extendedConstraint.flags & 262144 ? instantiateType(extendedConstraint.type, type.mapper || identityMapper) : emptyObjectType;
+ }
+ }
+ return type.modifiersType;
}
function isGenericMappedType(type) {
if (getObjectFlags(type) & 32) {
var constraintType = getConstraintTypeFromMappedType(type);
- return !!(constraintType.flags & (16384 | 262144));
+ return maybeTypeOfKind(constraintType, 540672 | 262144);
}
return false;
}
@@ -24655,35 +27644,33 @@ var ts;
function getPropertyOfObjectType(type, name) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
}
}
function getPropertiesOfUnionOrIntersectionType(type) {
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var current = _a[_i];
- for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
- var prop = _c[_b];
- getUnionOrIntersectionProperty(type, prop.name);
- }
- if (type.flags & 65536) {
- break;
- }
- }
- var props = type.resolvedProperties;
- if (props) {
- var result = [];
- for (var key in props) {
- var prop = props[key];
- if (!(prop.flags & 268435456 && prop.isPartial)) {
- result.push(prop);
+ if (!type.resolvedProperties) {
+ var members = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var current = _a[_i];
+ for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
+ var prop = _c[_b];
+ if (!members.has(prop.name)) {
+ var combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.name);
+ if (combinedProp) {
+ members.set(prop.name, combinedProp);
+ }
+ }
+ }
+ if (type.flags & 65536) {
+ break;
}
}
- return result;
+ type.resolvedProperties = getNamedMembers(members);
}
- return emptyArray;
+ return type.resolvedProperties;
}
function getPropertiesOfType(type) {
type = getApparentType(type);
@@ -24691,41 +27678,126 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
- function getApparentTypeOfTypeParameter(type) {
- if (!type.resolvedApparentType) {
- var constraintType = getConstraintOfTypeParameter(type);
- while (constraintType && constraintType.flags & 16384) {
- constraintType = getConstraintOfTypeParameter(constraintType);
+ function getConstraintOfType(type) {
+ return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
+ type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
+ getBaseConstraintOfType(type);
+ }
+ function getConstraintOfTypeParameter(typeParameter) {
+ return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined;
+ }
+ function getConstraintOfIndexedAccess(type) {
+ var baseObjectType = getBaseConstraintOfType(type.objectType);
+ var baseIndexType = getBaseConstraintOfType(type.indexType);
+ return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined;
+ }
+ function getBaseConstraintOfType(type) {
+ if (type.flags & (540672 | 196608)) {
+ var constraint = getResolvedBaseConstraint(type);
+ if (constraint !== noConstraintType && constraint !== circularConstraintType) {
+ return constraint;
}
- type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
}
- return type.resolvedApparentType;
+ else if (type.flags & 262144) {
+ return stringType;
+ }
+ return undefined;
}
- function getApparentTypeOfIndexedAccess(type) {
- return getIndexTypeOfType(getApparentType(type.objectType), 0) || type;
+ function hasNonCircularBaseConstraint(type) {
+ return getResolvedBaseConstraint(type) !== circularConstraintType;
+ }
+ function getResolvedBaseConstraint(type) {
+ var typeStack;
+ var circular;
+ if (!type.resolvedBaseConstraint) {
+ typeStack = [];
+ var constraint = getBaseConstraint(type);
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType, type);
+ }
+ return type.resolvedBaseConstraint;
+ function getBaseConstraint(t) {
+ if (ts.contains(typeStack, t)) {
+ circular = true;
+ return undefined;
+ }
+ typeStack.push(t);
+ var result = computeBaseConstraint(t);
+ typeStack.pop();
+ return result;
+ }
+ function computeBaseConstraint(t) {
+ if (t.flags & 16384) {
+ var constraint = getConstraintFromTypeParameter(t);
+ return t.isThisType ? constraint :
+ constraint ? getBaseConstraint(constraint) : undefined;
+ }
+ if (t.flags & 196608) {
+ var types = t.types;
+ var baseTypes = [];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var type_2 = types_3[_i];
+ var baseType = getBaseConstraint(type_2);
+ if (baseType) {
+ baseTypes.push(baseType);
+ }
+ }
+ return t.flags & 65536 && baseTypes.length === types.length ? getUnionType(baseTypes) :
+ t.flags & 131072 && baseTypes.length ? getIntersectionType(baseTypes) :
+ undefined;
+ }
+ if (t.flags & 262144) {
+ return stringType;
+ }
+ if (t.flags & 524288) {
+ var baseObjectType = getBaseConstraint(t.objectType);
+ var baseIndexType = getBaseConstraint(t.indexType);
+ var baseIndexedAccess = baseObjectType && baseIndexType ? getIndexedAccessType(baseObjectType, baseIndexType) : undefined;
+ return baseIndexedAccess && baseIndexedAccess !== unknownType ? getBaseConstraint(baseIndexedAccess) : undefined;
+ }
+ return t;
+ }
+ }
+ function getApparentTypeOfIntersectionType(type) {
+ return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type));
+ }
+ function getDefaultFromTypeParameter(typeParameter) {
+ if (!typeParameter.default) {
+ if (typeParameter.target) {
+ var targetDefault = getDefaultFromTypeParameter(typeParameter.target);
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;
+ }
+ else {
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameter(decl) && decl.default; });
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
+ }
+ }
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
}
function getApparentType(type) {
- var t = type.flags & 16384 ? getApparentTypeOfTypeParameter(type) :
- type.flags & 524288 ? getApparentTypeOfIndexedAccess(type) :
- type;
- return t.flags & 262178 ? globalStringType :
- t.flags & 340 ? globalNumberType :
- t.flags & 136 ? globalBooleanType :
- t.flags & 512 ? getGlobalESSymbolType() :
- t;
+ var t = type.flags & 540672 ? getBaseConstraintOfType(type) || emptyObjectType : type;
+ return t.flags & 131072 ? getApparentTypeOfIntersectionType(t) :
+ t.flags & 262178 ? globalStringType :
+ t.flags & 340 ? globalNumberType :
+ t.flags & 136 ? globalBooleanType :
+ t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
+ t.flags & 16777216 ? emptyObjectType :
+ t;
}
function createUnionOrIntersectionProperty(containingType, name) {
- var types = containingType.types;
var props;
- var commonFlags = (containingType.flags & 131072) ? 536870912 : 0;
- var isReadonly = false;
- var isPartial = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var current = types_2[_i];
+ var types = containingType.types;
+ var isUnion = containingType.flags & 65536;
+ var excludeModifiers = isUnion ? 24 : 0;
+ var commonFlags = isUnion ? 0 : 67108864;
+ var syntheticFlag = 4;
+ var checkFlags = 0;
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var current = types_4[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- if (prop && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16))) {
+ var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
props = [prop];
@@ -24733,25 +27805,29 @@ var ts;
else if (!ts.contains(props, prop)) {
props.push(prop);
}
- if (isReadonlySymbol(prop)) {
- isReadonly = true;
+ checkFlags |= (isReadonlySymbol(prop) ? 8 : 0) |
+ (!(modifiers & 24) ? 64 : 0) |
+ (modifiers & 16 ? 128 : 0) |
+ (modifiers & 8 ? 256 : 0) |
+ (modifiers & 32 ? 512 : 0);
+ if (!isMethodLike(prop)) {
+ syntheticFlag = 2;
}
}
- else if (containingType.flags & 65536) {
- isPartial = true;
+ else if (isUnion) {
+ checkFlags |= 16;
}
}
}
if (!props) {
return undefined;
}
- if (props.length === 1 && !isPartial) {
+ if (props.length === 1 && !(checkFlags & 16)) {
return props[0];
}
var propTypes = [];
var declarations = [];
var commonType = undefined;
- var hasNonUniformType = false;
for (var _a = 0, props_1 = props; _a < props_1.length; _a++) {
var prop = props_1[_a];
if (prop.declarations) {
@@ -24762,39 +27838,37 @@ var ts;
commonType = type;
}
else if (type !== commonType) {
- hasNonUniformType = true;
+ checkFlags |= 32;
}
propTypes.push(type);
}
- var result = createSymbol(4 | 67108864 | 268435456 | commonFlags, name);
+ var result = createSymbol(4 | commonFlags, name);
+ result.checkFlags = syntheticFlag | checkFlags;
result.containingType = containingType;
- result.hasNonUniformType = hasNonUniformType;
- result.isPartial = isPartial;
result.declarations = declarations;
- result.isReadonly = isReadonly;
- result.type = containingType.flags & 65536 ? getUnionType(propTypes) : getIntersectionType(propTypes);
+ result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
return result;
}
function getUnionOrIntersectionProperty(type, name) {
- var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap());
- var property = properties[name];
+ var properties = type.propertyCache || (type.propertyCache = ts.createMap());
+ var property = properties.get(name);
if (!property) {
property = createUnionOrIntersectionProperty(type, name);
if (property) {
- properties[name] = property;
+ properties.set(name, property);
}
}
return property;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(property.flags & 268435456 && property.isPartial) ? property : undefined;
+ return property && !(getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
@@ -24853,7 +27927,7 @@ var ts;
return undefined;
}
function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var templateTag = ts.getJSDocTemplateTag(declaration);
if (templateTag) {
return getTypeParametersFromDeclaration(templateTag.typeParameters);
@@ -24873,16 +27947,16 @@ var ts;
}
function symbolsToArray(symbols) {
var result = [];
- for (var id in symbols) {
+ symbols.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
- result.push(symbols[id]);
+ result.push(symbol);
}
- }
+ });
return result;
}
function isJSDocOptionalParameter(node) {
- if (node.flags & 2097152) {
- if (node.type && node.type.kind === 273) {
+ if (node.flags & 65536) {
+ if (node.type && node.type.kind === 277) {
return true;
}
var paramTags = ts.getJSDocParameterTags(node);
@@ -24893,7 +27967,7 @@ var ts;
return true;
}
if (paramTag.typeExpression) {
- return paramTag.typeExpression.type.kind === 273;
+ return paramTag.typeExpression.type.kind === 277;
}
}
}
@@ -24917,6 +27991,12 @@ var ts;
ts.Debug.assert(parameterIndex >= 0);
return parameterIndex >= signature.minArgumentCount;
}
+ var iife = ts.getImmediatelyInvokedFunctionExpression(node.parent);
+ if (iife) {
+ return !node.type &&
+ !node.dotDotDotToken &&
+ ts.indexOf(node.parent.parameters, node) >= iife.arguments.length;
+ }
return false;
}
function createTypePredicateFromTypePredicateNode(node) {
@@ -24936,16 +28016,50 @@ var ts;
};
}
}
+ function getMinTypeArgumentCount(typeParameters) {
+ var minTypeArgumentCount = 0;
+ if (typeParameters) {
+ for (var i = 0; i < typeParameters.length; i++) {
+ if (!getDefaultFromTypeParameter(typeParameters[i])) {
+ minTypeArgumentCount = i + 1;
+ }
+ }
+ }
+ return minTypeArgumentCount;
+ }
+ function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, location) {
+ var numTypeParameters = ts.length(typeParameters);
+ if (numTypeParameters) {
+ var numTypeArguments = ts.length(typeArguments);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ if ((isJavaScript || numTypeArguments >= minTypeArgumentCount) && numTypeArguments <= numTypeParameters) {
+ if (!typeArguments) {
+ typeArguments = [];
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ typeArguments[i] = isJavaScript ? anyType : emptyObjectType;
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ var mapper = createTypeMapper(typeParameters, typeArguments);
+ var defaultType = getDefaultFromTypeParameter(typeParameters[i]);
+ typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : isJavaScript ? anyType : emptyObjectType;
+ }
+ }
+ }
+ return typeArguments;
+ }
function getSignatureFromDeclaration(declaration) {
var links = getNodeLinks(declaration);
if (!links.resolvedSignature) {
var parameters = [];
var hasLiteralTypes = false;
- var minArgumentCount = -1;
+ var minArgumentCount = 0;
var thisParameter = undefined;
var hasThisParameter = void 0;
+ var iife = ts.getImmediatelyInvokedFunctionExpression(declaration);
var isJSConstructSignature = ts.isJSDocConstructSignature(declaration);
- for (var i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) {
+ var isUntypedSignatureInJSFile = !iife && !isJSConstructSignature && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration);
+ for (var i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
var param = declaration.parameters[i];
var paramSymbol = param.symbol;
if (paramSymbol && !!(paramSymbol.flags & 4) && !ts.isBindingPattern(param.name)) {
@@ -24959,41 +28073,34 @@ var ts;
else {
parameters.push(paramSymbol);
}
- if (param.type && param.type.kind === 171) {
+ if (param.type && param.type.kind === 172) {
hasLiteralTypes = true;
}
- if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {
- if (minArgumentCount < 0) {
- minArgumentCount = i - (hasThisParameter ? 1 : 0);
- }
- }
- else {
- minArgumentCount = -1;
+ var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken ||
+ iife && parameters.length > iife.arguments.length && !param.type ||
+ isJSDocOptionalParameter(param) ||
+ isUntypedSignatureInJSFile;
+ if (!isOptionalParameter_1) {
+ minArgumentCount = parameters.length;
}
}
- if ((declaration.kind === 151 || declaration.kind === 152) &&
+ if ((declaration.kind === 152 || declaration.kind === 153) &&
!ts.hasDynamicName(declaration) &&
(!hasThisParameter || !thisParameter)) {
- var otherKind = declaration.kind === 151 ? 152 : 151;
+ var otherKind = declaration.kind === 152 ? 153 : 152;
var other = ts.getDeclarationOfKind(declaration.symbol, otherKind);
if (other) {
thisParameter = getAnnotatedAccessorThisParameter(other);
}
}
- if (minArgumentCount < 0) {
- minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0);
- }
- if (isJSConstructSignature) {
- minArgumentCount--;
- }
- var classType = declaration.kind === 150 ?
+ var classType = declaration.kind === 151 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
var typeParameters = classType ? classType.localTypeParameters :
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
getTypeParametersFromJSDocTemplate(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
- var typePredicate = declaration.type && declaration.type.kind === 156 ?
+ var typePredicate = declaration.type && declaration.type.kind === 157 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
@@ -25010,41 +28117,69 @@ var ts;
else if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.flags & 2097152) {
+ if (declaration.flags & 65536) {
var type = getReturnTypeFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
- if (declaration.kind === 151 && !ts.hasDynamicName(declaration)) {
- var setter = ts.getDeclarationOfKind(declaration.symbol, 152);
+ if (declaration.kind === 152 && !ts.hasDynamicName(declaration)) {
+ var setter = ts.getDeclarationOfKind(declaration.symbol, 153);
return getAnnotatedAccessorType(setter);
}
if (ts.nodeIsMissing(declaration.body)) {
return anyType;
}
}
+ function containsArgumentsReference(declaration) {
+ var links = getNodeLinks(declaration);
+ if (links.containsArgumentsReference === undefined) {
+ if (links.flags & 8192) {
+ links.containsArgumentsReference = true;
+ }
+ else {
+ links.containsArgumentsReference = traverse(declaration.body);
+ }
+ }
+ return links.containsArgumentsReference;
+ function traverse(node) {
+ if (!node)
+ return false;
+ switch (node.kind) {
+ case 70:
+ return node.text === "arguments" && ts.isPartOfExpression(node);
+ case 148:
+ case 150:
+ case 152:
+ case 153:
+ return node.name.kind === 143
+ && traverse(node.name);
+ default:
+ return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse);
+ }
+ }
+ }
function getSignaturesOfSymbol(symbol) {
if (!symbol)
return emptyArray;
var result = [];
- for (var i = 0, len = symbol.declarations.length; i < len; i++) {
+ for (var i = 0; i < symbol.declarations.length; i++) {
var node = symbol.declarations[i];
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 274:
+ case 186:
+ case 278:
if (i > 0 && node.body) {
var previous = symbol.declarations[i - 1];
if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) {
@@ -25088,7 +28223,7 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
var declaration = signature.declaration;
if (declaration.name) {
error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
@@ -25112,9 +28247,14 @@ var ts;
return anyType;
}
function getSignatureInstantiation(signature, typeArguments) {
+ typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters));
var instantiations = signature.instantiations || (signature.instantiations = ts.createMap());
var id = getTypeListId(typeArguments);
- return instantiations[id] || (instantiations[id] = createSignatureInstantiation(signature, typeArguments));
+ var instantiation = instantiations.get(id);
+ if (!instantiation) {
+ instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
+ }
+ return instantiation;
}
function createSignatureInstantiation(signature, typeArguments) {
return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true);
@@ -25129,7 +28269,7 @@ var ts;
}
function getOrCreateTypeFromSignature(signature) {
if (!signature.isolatedSignatureType) {
- var isConstructor = signature.declaration.kind === 150 || signature.declaration.kind === 154;
+ var isConstructor = signature.declaration.kind === 151 || signature.declaration.kind === 155;
var type = createObjectType(16);
type.members = emptySymbols;
type.properties = emptyArray;
@@ -25140,10 +28280,10 @@ var ts;
return signature.isolatedSignatureType;
}
function getIndexSymbol(symbol) {
- return symbol.members["__index"];
+ return symbol.members.get("__index");
}
function getIndexDeclarationOfSymbol(symbol, kind) {
- var syntaxKind = kind === 1 ? 132 : 134;
+ var syntaxKind = kind === 1 ? 132 : 135;
var indexSymbol = getIndexSymbol(symbol);
if (indexSymbol) {
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
@@ -25170,21 +28310,9 @@ var ts;
return undefined;
}
function getConstraintDeclaration(type) {
- return ts.getDeclarationOfKind(type.symbol, 143).constraint;
+ return ts.getDeclarationOfKind(type.symbol, 144).constraint;
}
- function hasConstraintReferenceTo(type, target) {
- var checked;
- while (type && type.flags & 16384 && !(type.isThisType) && !ts.contains(checked, type)) {
- if (type === target) {
- return true;
- }
- (checked || (checked = [])).push(type);
- var constraintDeclaration = getConstraintDeclaration(type);
- type = constraintDeclaration && getTypeFromTypeNode(constraintDeclaration);
- }
- return false;
- }
- function getConstraintOfTypeParameter(typeParameter) {
+ function getConstraintFromTypeParameter(typeParameter) {
if (!typeParameter.constraint) {
if (typeParameter.target) {
var targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
@@ -25192,28 +28320,23 @@ var ts;
}
else {
var constraintDeclaration = getConstraintDeclaration(typeParameter);
- var constraint = getTypeFromTypeNode(constraintDeclaration);
- if (hasConstraintReferenceTo(constraint, typeParameter)) {
- error(constraintDeclaration, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
- constraint = unknownType;
- }
- typeParameter.constraint = constraint;
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType;
}
}
return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
}
function getParentSymbolOfTypeParameter(typeParameter) {
- return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 143).parent);
+ return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144).parent);
}
function getTypeListId(types) {
var result = "";
if (types) {
- var length_3 = types.length;
+ var length_4 = types.length;
var i = 0;
- while (i < length_3) {
+ while (i < length_4) {
var startId = types[i].id;
var count = 1;
- while (i + count < length_3 && types[i + count].id === startId + count) {
+ while (i + count < length_4 && types[i + count].id === startId + count) {
count++;
}
if (result.length) {
@@ -25230,8 +28353,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
- var type = types_3[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -25240,9 +28363,10 @@ var ts;
}
function createTypeReference(target, typeArguments) {
var id = getTypeListId(typeArguments);
- var type = target.instantiations[id];
+ var type = target.instantiations.get(id);
if (!type) {
- type = target.instantiations[id] = createObjectType(4, target.symbol);
+ type = createObjectType(4, target.symbol);
+ target.instantiations.set(id, type);
type.flags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, 0) : 0;
type.target = target;
type.typeArguments = typeArguments;
@@ -25258,17 +28382,22 @@ var ts;
return type;
}
function getTypeReferenceArity(type) {
- return type.target.typeParameters ? type.target.typeParameters.length : 0;
+ return ts.length(type.target.typeParameters);
}
function getTypeFromClassOrInterfaceReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (!ts.isInJavaScriptFile(node) && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode)));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
@@ -25281,14 +28410,22 @@ var ts;
var links = getSymbolLinks(symbol);
var typeParameters = links.typeParameters;
var id = getTypeListId(typeArguments);
- return links.instantiations[id] || (links.instantiations[id] = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments)));
+ var instantiation = links.instantiations.get(id);
+ if (!instantiation) {
+ links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters)))));
+ }
+ return instantiation;
}
function getTypeFromTypeAliasReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode);
@@ -25309,11 +28446,11 @@ var ts;
}
function getTypeReferenceName(node) {
switch (node.kind) {
- case 157:
+ case 158:
return node.typeName;
- case 272:
+ case 276:
return node.name;
- case 199:
+ case 200:
var expr = node.expression;
if (ts.isEntityNameExpression(expr)) {
return expr;
@@ -25337,23 +28474,58 @@ var ts;
if (symbol.flags & 524288) {
return getTypeFromTypeAliasReference(node, symbol);
}
- if (symbol.flags & 107455 && node.kind === 272) {
+ if (symbol.flags & 107455 && node.kind === 276) {
return getTypeOfSymbol(symbol);
}
return getTypeFromNonGenericTypeReference(node, symbol);
}
+ function getPrimitiveTypeFromJSDocTypeReference(node) {
+ if (ts.isIdentifier(node.name)) {
+ switch (node.name.text) {
+ case "String":
+ return stringType;
+ case "Number":
+ return numberType;
+ case "Boolean":
+ return booleanType;
+ case "Void":
+ return voidType;
+ case "Undefined":
+ return undefinedType;
+ case "Null":
+ return nullType;
+ case "Object":
+ return anyType;
+ case "Function":
+ return anyFunctionType;
+ case "Array":
+ case "array":
+ return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
+ case "Promise":
+ case "promise":
+ return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
+ }
+ }
+ }
+ function getTypeFromJSDocNullableTypeNode(node) {
+ var type = getTypeFromTypeNode(node.type);
+ return strictNullChecks ? getUnionType([type, nullType]) : type;
+ }
function getTypeFromTypeReference(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
- if (node.kind === 272) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
+ if (node.kind === 276) {
+ type = getPrimitiveTypeFromJSDocTypeReference(node);
+ if (!type) {
+ var typeReferenceName = getTypeReferenceName(node);
+ symbol = resolveTypeReferenceName(typeReferenceName);
+ type = getTypeReferenceType(node, symbol);
+ }
}
else {
- var typeNameOrExpression = node.kind === 157
+ var typeNameOrExpression = node.kind === 158
? node.typeName
: ts.isEntityNameExpression(node.expression)
? node.expression
@@ -25379,12 +28551,12 @@ var ts;
function getTypeOfGlobalSymbol(symbol, arity) {
function getTypeDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
- var declaration = declarations_3[_i];
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+ var declaration = declarations_4[_i];
switch (declaration.kind) {
- case 226:
- case 227:
+ case 228:
case 229:
+ case 231:
return declaration;
}
}
@@ -25397,44 +28569,91 @@ var ts;
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
return arity ? emptyGenericType : emptyObjectType;
}
- if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
+ if (ts.length(type.typeParameters) !== arity) {
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
return arity ? emptyGenericType : emptyObjectType;
}
return type;
}
- function getGlobalValueSymbol(name) {
- return getGlobalSymbol(name, 107455, ts.Diagnostics.Cannot_find_global_value_0);
+ function getGlobalValueSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 107455, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined);
}
- function getGlobalTypeSymbol(name) {
- return getGlobalSymbol(name, 793064, ts.Diagnostics.Cannot_find_global_type_0);
+ function getGlobalTypeSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 793064, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
}
function getGlobalSymbol(name, meaning, diagnostic) {
return resolveName(undefined, name, meaning, diagnostic, name);
}
- function getGlobalType(name, arity) {
+ function getGlobalType(name, arity, reportErrors) {
+ var symbol = getGlobalTypeSymbol(name, reportErrors);
+ return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
+ }
+ function getGlobalTypedPropertyDescriptorType() {
+ return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", 1, true)) || emptyGenericType;
+ }
+ function getGlobalTemplateStringsArrayType() {
+ return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", 0, true)) || emptyObjectType;
+ }
+ function getGlobalESSymbolConstructorSymbol(reportErrors) {
+ return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
+ }
+ function getGlobalESSymbolType(reportErrors) {
+ return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalPromiseType(reportErrors) {
+ return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalPromiseConstructorSymbol(reportErrors) {
+ return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
+ }
+ function getGlobalPromiseConstructorLikeType(reportErrors) {
+ return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalAsyncIterableType(reportErrors) {
+ return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIteratorType(reportErrors) {
+ return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIterableIteratorType(reportErrors) {
+ return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableType(reportErrors) {
+ return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIteratorType(reportErrors) {
+ return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableIteratorType(reportErrors) {
+ return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalTypeOrUndefined(name, arity) {
if (arity === void 0) { arity = 0; }
- return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
+ var symbol = getGlobalSymbol(name, 793064, undefined);
+ return symbol && getTypeOfGlobalSymbol(symbol, arity);
}
function getExportedTypeFromNamespace(namespace, name) {
var namespaceSymbol = getGlobalSymbol(namespace, 1920, undefined);
var typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, 793064);
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
- function createTypedPropertyDescriptorType(propertyType) {
- var globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
- return globalTypedPropertyDescriptorType !== emptyGenericType
- ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType])
- : emptyObjectType;
- }
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
}
- function createIterableType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]);
+ function createTypedPropertyDescriptorType(propertyType) {
+ return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);
}
- function createIterableIteratorType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]);
+ function createAsyncIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(true), [iteratedType]);
+ }
+ function createAsyncIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(true), [iteratedType]);
+ }
+ function createIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableType(true), [iteratedType]);
+ }
+ function createIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(true), [iteratedType]);
}
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
@@ -25452,7 +28671,7 @@ var ts;
for (var i = 0; i < arity; i++) {
var typeParameter = createType(16384);
typeParameters.push(typeParameter);
- var property = createSymbol(4 | 67108864, "" + i);
+ var property = createSymbol(4, "" + i);
property.type = typeParameter;
properties.push(property);
}
@@ -25461,7 +28680,7 @@ var ts;
type.outerTypeParameters = undefined;
type.localTypeParameters = typeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384);
@@ -25543,14 +28762,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
- var type = types_4[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var type = types_6[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var t = types_5[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var t = types_7[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -25558,8 +28777,9 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var i = 0, len = types.length; i < len; i++) {
- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
+ if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
}
@@ -25637,10 +28857,11 @@ var ts;
return types[0];
}
var id = getTypeListId(types);
- var type = unionTypes[id];
+ var type = unionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(types, 6144);
- type = unionTypes[id] = createType(65536 | propagatedFlags);
+ type = createType(65536 | propagatedFlags);
+ unionTypes.set(id, type);
type.types = types;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -25661,13 +28882,25 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
+ typeSet.containsEmptyObject = true;
+ }
else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
- typeSet.push(type);
+ if (type.flags & 32768) {
+ typeSet.containsObjectType = true;
+ }
+ if (type.flags & 65536 && typeSet.unionIndex === undefined) {
+ typeSet.unionIndex = typeSet.length;
+ }
+ if (!(type.flags & 32768 && type.objectFlags & 16 &&
+ type.symbol && type.symbol.flags & (16 | 8192) && containsIdenticalType(typeSet, type))) {
+ typeSet.push(type);
+ }
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var type = types_9[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -25675,30 +28908,28 @@ var ts;
if (types.length === 0) {
return emptyObjectType;
}
- var _loop_2 = function (i) {
- var type_1 = types[i];
- if (type_1.flags & 65536) {
- return { value: getUnionType(ts.map(type_1.types, function (t) { return getIntersectionType(ts.replaceElement(types, i, t)); }), false, aliasSymbol, aliasTypeArguments) };
- }
- };
- for (var i = 0; i < types.length; i++) {
- var state_2 = _loop_2(i);
- if (typeof state_2 === "object")
- return state_2.value;
- }
var typeSet = [];
addTypesToIntersection(typeSet, types);
if (typeSet.containsAny) {
return anyType;
}
+ if (typeSet.containsEmptyObject && !typeSet.containsObjectType) {
+ typeSet.push(emptyObjectType);
+ }
if (typeSet.length === 1) {
return typeSet[0];
}
+ var unionIndex = typeSet.unionIndex;
+ if (unionIndex !== undefined) {
+ var unionType = typeSet[unionIndex];
+ return getUnionType(ts.map(unionType.types, function (t) { return getIntersectionType(ts.replaceElement(typeSet, unionIndex, t)); }), false, aliasSymbol, aliasTypeArguments);
+ }
var id = getTypeListId(typeSet);
- var type = intersectionTypes[id];
+ var type = intersectionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, 6144);
- type = intersectionTypes[id] = createType(131072 | propagatedFlags);
+ type = createType(131072 | propagatedFlags);
+ intersectionTypes.set(id, type);
type.types = typeSet;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -25712,7 +28943,7 @@ var ts;
}
return links.resolvedType;
}
- function getIndexTypeForTypeParameter(type) {
+ function getIndexTypeForGenericType(type) {
if (!type.resolvedIndexType) {
type.resolvedIndexType = createType(262144);
type.resolvedIndexType.type = type;
@@ -25728,7 +28959,7 @@ var ts;
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
}
function getIndexType(type) {
- return type.flags & 16384 ? getIndexTypeForTypeParameter(type) :
+ return maybeTypeOfKind(type, 540672) ? getIndexTypeForGenericType(type) :
getObjectFlags(type) & 32 ? getConstraintTypeFromMappedType(type) :
type.flags & 1 || getIndexInfoOfType(type, 0) ? stringType :
getLiteralTypeFromPropertyNames(type);
@@ -25751,7 +28982,7 @@ var ts;
return type;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
var propName = indexType.flags & (32 | 64 | 256) ?
indexType.text :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
@@ -25780,14 +29011,14 @@ var ts;
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
- if (accessExpression && ts.isAssignmentTarget(accessExpression) && indexInfo.isReadonly) {
+ if (accessExpression && indexInfo.isReadonly && (ts.isAssignmentTarget(accessExpression) || ts.isDeleteTarget(accessExpression))) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
return unknownType;
}
return indexInfo.type;
}
if (accessExpression && !isConstEnumObjectType(objectType)) {
- if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
+ if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
if (getIndexTypeOfType(objectType, 1)) {
error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
}
@@ -25799,7 +29030,7 @@ var ts;
}
}
if (accessNode) {
- var indexNode = accessNode.kind === 178 ? accessNode.argumentExpression : accessNode.indexType;
+ var indexNode = accessNode.kind === 179 ? accessNode.argumentExpression : accessNode.indexType;
if (indexType.flags & (32 | 64)) {
error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType));
}
@@ -25809,34 +29040,36 @@ var ts;
else {
error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
}
+ return unknownType;
}
- return unknownType;
+ return anyType;
}
function getIndexedAccessForMappedType(type, indexType, accessNode) {
- var accessExpression = accessNode && accessNode.kind === 178 ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 ? accessNode : undefined;
if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type));
return unknownType;
}
- var mapper = createUnaryTypeMapper(getTypeParameterFromMappedType(type), indexType);
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(type)], [indexType]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, mapper) : mapper;
- return addOptionality(instantiateType(getTemplateTypeFromMappedType(type), templateMapper), !!type.declaration.questionToken);
+ return instantiateType(getTemplateTypeFromMappedType(type), templateMapper);
}
function getIndexedAccessType(objectType, indexType, accessNode) {
- if (indexType.flags & 16384 ||
- objectType.flags & 16384 && indexType.flags & 262144 ||
+ if (maybeTypeOfKind(indexType, 540672 | 262144) ||
+ maybeTypeOfKind(objectType, 540672) && !(accessNode && accessNode.kind === 179) ||
isGenericMappedType(objectType)) {
- if (accessNode) {
- if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
- error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
- return unknownType;
- }
+ if (objectType.flags & 1) {
+ return objectType;
}
if (isGenericMappedType(objectType)) {
return getIndexedAccessForMappedType(objectType, indexType, accessNode);
}
var id = objectType.id + "," + indexType.id;
- return indexedAccessTypes[id] || (indexedAccessTypes[id] = createIndexedAccessType(objectType, indexType));
+ var type = indexedAccessTypes.get(id);
+ if (!type) {
+ indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType));
+ }
+ return type;
}
var apparentObjectType = getApparentType(objectType);
if (indexType.flags & 65536 && !(indexType.flags & 8190)) {
@@ -25876,7 +29109,7 @@ var ts;
var links = getNodeLinks(node);
if (!links.resolvedType) {
var aliasSymbol = getAliasSymbolForTypeNode(node);
- if (ts.isEmpty(node.symbol.members) && !aliasSymbol) {
+ if (node.symbol.members.size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {
@@ -25889,17 +29122,33 @@ var ts;
return links.resolvedType;
}
function getAliasSymbolForTypeNode(node) {
- return node.parent.kind === 228 ? getSymbolOfNode(node.parent) : undefined;
+ return node.parent.kind === 230 ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node) {
var symbol = getAliasSymbolForTypeNode(node);
return symbol ? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) : undefined;
}
- function getSpreadType(left, right, isFromObjectLiteral) {
- ts.Debug.assert(!!(left.flags & (32768 | 1)) && !!(right.flags & (32768 | 1)), "Only object types may be spread.");
+ function getSpreadType(left, right) {
if (left.flags & 1 || right.flags & 1) {
return anyType;
}
+ left = filterType(left, function (t) { return !(t.flags & 6144); });
+ if (left.flags & 8192) {
+ return right;
+ }
+ right = filterType(right, function (t) { return !(t.flags & 6144); });
+ if (right.flags & 8192) {
+ return left;
+ }
+ if (left.flags & 65536) {
+ return mapType(left, function (t) { return getSpreadType(t, right); });
+ }
+ if (right.flags & 65536) {
+ return mapType(right, function (t) { return getSpreadType(left, t); });
+ }
+ if (right.flags & 16777216) {
+ return emptyObjectType;
+ }
var members = ts.createMap();
var skippedPrivateMembers = ts.createMap();
var stringIndexInfo;
@@ -25914,42 +29163,55 @@ var ts;
}
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
- var isOwnProperty = !(rightProp.flags & 8192) || isFromObjectLiteral;
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
- skippedPrivateMembers[rightProp.name] = true;
+ skippedPrivateMembers.set(rightProp.name, true);
}
- else if (isOwnProperty && !isSetterWithoutGetter) {
- members[rightProp.name] = rightProp;
+ else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
+ members.set(rightProp.name, getNonReadonlySymbol(rightProp));
}
}
for (var _b = 0, _c = getPropertiesOfType(left); _b < _c.length; _b++) {
var leftProp = _c[_b];
if (leftProp.flags & 65536 && !(leftProp.flags & 32768)
- || leftProp.name in skippedPrivateMembers) {
+ || skippedPrivateMembers.has(leftProp.name)
+ || isClassMethod(leftProp)) {
continue;
}
- if (leftProp.name in members) {
- var rightProp = members[leftProp.name];
+ if (members.has(leftProp.name)) {
+ var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 536870912) {
+ if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
- var flags = 4 | 67108864 | (leftProp.flags & 536870912);
+ var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 131072)]);
result.leftSpread = leftProp;
result.rightSpread = rightProp;
result.declarations = declarations;
- result.isReadonly = isReadonlySymbol(leftProp) || isReadonlySymbol(rightProp);
- members[leftProp.name] = result;
+ members.set(leftProp.name, result);
}
}
else {
- members[leftProp.name] = leftProp;
+ members.set(leftProp.name, getNonReadonlySymbol(leftProp));
}
}
return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
+ function getNonReadonlySymbol(prop) {
+ if (!isReadonlySymbol(prop)) {
+ return prop;
+ }
+ var flags = 4 | (prop.flags & 67108864);
+ var result = createSymbol(flags, prop.name);
+ result.type = getTypeOfSymbol(prop);
+ result.declarations = prop.declarations;
+ result.syntheticOrigin = prop;
+ return result;
+ }
+ function isClassMethod(prop) {
+ return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
+ }
function createLiteralType(flags, text) {
var type = createType(flags);
type.text = text;
@@ -25971,7 +29233,11 @@ var ts;
}
function getLiteralTypeForText(flags, text) {
var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- return map[text] || (map[text] = createLiteralType(flags, text));
+ var type = map.get(text);
+ if (!type) {
+ map.set(text, type = createLiteralType(flags, text));
+ }
+ return type;
}
function getTypeFromLiteralTypeNode(node) {
var links = getNodeLinks(node);
@@ -25999,9 +29265,9 @@ var ts;
function getThisType(node) {
var container = ts.getThisContainer(node, false);
var parent = container && container.parent;
- if (parent && (ts.isClassLike(parent) || parent.kind === 227)) {
+ if (parent && (ts.isClassLike(parent) || parent.kind === 229)) {
if (!(ts.getModifierFlags(container) & 32) &&
- (container.kind !== 150 || ts.isNodeDescendantOf(node, container.body))) {
+ (container.kind !== 151 || ts.isNodeDescendantOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@@ -26018,85 +29284,82 @@ var ts;
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 118:
- case 263:
- case 264:
+ case 267:
+ case 268:
return anyType;
- case 134:
+ case 135:
return stringType;
case 132:
return numberType;
case 121:
return booleanType;
- case 135:
+ case 136:
return esSymbolType;
case 104:
return voidType;
- case 137:
+ case 138:
return undefinedType;
case 94:
return nullType;
case 129:
return neverType;
- case 289:
- return nullType;
- case 290:
- return undefinedType;
- case 291:
- return neverType;
- case 167:
+ case 133:
+ return nonPrimitiveType;
+ case 168:
case 98:
return getTypeFromThisTypeNode(node);
- case 171:
+ case 172:
return getTypeFromLiteralTypeNode(node);
- case 288:
+ case 292:
return getTypeFromLiteralTypeNode(node.literal);
- case 157:
- case 272:
+ case 158:
+ case 276:
return getTypeFromTypeReference(node);
- case 156:
+ case 157:
return booleanType;
- case 199:
+ case 200:
return getTypeFromTypeReference(node);
- case 160:
+ case 161:
return getTypeFromTypeQueryNode(node);
- case 162:
- case 265:
- return getTypeFromArrayTypeNode(node);
case 163:
- return getTypeFromTupleTypeNode(node);
+ case 269:
+ return getTypeFromArrayTypeNode(node);
case 164:
- case 266:
- return getTypeFromUnionTypeNode(node);
+ return getTypeFromTupleTypeNode(node);
case 165:
- return getTypeFromIntersectionTypeNode(node);
+ case 270:
+ return getTypeFromUnionTypeNode(node);
case 166:
- case 268:
- case 269:
- case 276:
- case 277:
+ return getTypeFromIntersectionTypeNode(node);
+ case 272:
+ return getTypeFromJSDocNullableTypeNode(node);
+ case 167:
case 273:
+ case 280:
+ case 281:
+ case 277:
return getTypeFromTypeNode(node.type);
- case 270:
+ case 274:
return getTypeFromTypeNode(node.literal);
- case 158:
case 159:
- case 161:
- case 287:
- case 274:
+ case 160:
+ case 162:
+ case 291:
+ case 278:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
- case 168:
- return getTypeFromTypeOperatorNode(node);
case 169:
- return getTypeFromIndexedAccessTypeNode(node);
+ return getTypeFromTypeOperatorNode(node);
case 170:
+ return getTypeFromIndexedAccessTypeNode(node);
+ case 171:
return getTypeFromMappedTypeNode(node);
case 70:
- case 141:
+ case 142:
var symbol = getSymbolAtLocation(node);
return symbol && getDeclaredTypeOfSymbol(symbol);
- case 267:
+ case 271:
return getTypeFromJSDocTupleType(node);
- case 275:
+ case 279:
return getTypeFromJSDocVariadicType(node);
default:
return unknownType;
@@ -26123,13 +29386,13 @@ var ts;
var instantiations = mapper.instantiations || (mapper.instantiations = []);
return instantiations[type.id] || (instantiations[type.id] = instantiator(type, mapper));
}
- function createUnaryTypeMapper(source, target) {
+ function makeUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
}
- function createBinaryTypeMapper(source1, target1, source2, target2) {
+ function makeBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
}
- function createArrayTypeMapper(sources, targets) {
+ function makeArrayTypeMapper(sources, targets) {
return function (t) {
for (var i = 0; i < sources.length; i++) {
if (t === sources[i]) {
@@ -26140,16 +29403,20 @@ var ts;
};
}
function createTypeMapper(sources, targets) {
- var count = sources.length;
- var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
- count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
- createArrayTypeMapper(sources, targets);
+ var mapper = sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
+ sources.length === 2 ? makeBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
+ makeArrayTypeMapper(sources, targets);
mapper.mappedTypes = sources;
return mapper;
}
function createTypeEraser(sources) {
return createTypeMapper(sources, undefined);
}
+ function createBackreferenceMapper(typeParameters, index) {
+ var mapper = function (t) { return ts.indexOf(typeParameters, t) >= index ? emptyObjectType : t; };
+ mapper.mappedTypes = typeParameters;
+ return mapper;
+ }
function getInferenceMapper(context) {
if (!context.mapper) {
var mapper = function (t) {
@@ -26173,7 +29440,12 @@ var ts;
}
function combineTypeMappers(mapper1, mapper2) {
var mapper = function (t) { return instantiateType(mapper1(t), mapper2); };
- mapper.mappedTypes = mapper1.mappedTypes;
+ mapper.mappedTypes = ts.concatenate(mapper1.mappedTypes, mapper2.mappedTypes);
+ return mapper;
+ }
+ function createReplacementMapper(source, target, baseMapper) {
+ var mapper = function (t) { return t === source ? target : baseMapper(t); };
+ mapper.mappedTypes = baseMapper.mappedTypes;
return mapper;
}
function cloneTypeParameter(typeParameter) {
@@ -26218,12 +29490,13 @@ var ts;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (symbol.flags & 16777216) {
+ if (getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
}
- var result = createSymbol(16777216 | 67108864 | symbol.flags, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
+ result.checkFlags = 1;
result.declarations = symbol.declarations;
result.parent = symbol.parent;
result.target = symbol;
@@ -26244,18 +29517,17 @@ var ts;
function instantiateMappedType(type, mapper) {
var constraintType = getConstraintTypeFromMappedType(type);
if (constraintType.flags & 262144) {
- var typeParameter_1 = constraintType.type;
- var mappedTypeParameter = mapper(typeParameter_1);
- if (typeParameter_1 !== mappedTypeParameter) {
- return mapType(mappedTypeParameter, function (t) {
- if (isMappableType(t)) {
- var replacementMapper = createUnaryTypeMapper(typeParameter_1, t);
- var combinedMapper = mapper.mappedTypes && mapper.mappedTypes.length === 1 ? replacementMapper : combineTypeMappers(replacementMapper, mapper);
- combinedMapper.mappedTypes = mapper.mappedTypes;
- return instantiateMappedObjectType(type, combinedMapper);
- }
- return t;
- });
+ var typeVariable_1 = constraintType.type;
+ if (typeVariable_1.flags & 16384) {
+ var mappedTypeVariable = instantiateType(typeVariable_1, mapper);
+ if (typeVariable_1 !== mappedTypeVariable) {
+ return mapType(mappedTypeVariable, function (t) {
+ if (isMappableType(t)) {
+ return instantiateMappedObjectType(type, createReplacementMapper(typeVariable_1, t, mapper));
+ }
+ return t;
+ });
+ }
}
}
return instantiateMappedObjectType(type, mapper);
@@ -26276,26 +29548,28 @@ var ts;
return false;
}
var mappedTypes = mapper.mappedTypes;
- var node = symbol.declarations[0].parent;
- while (node) {
+ return !!ts.findAncestor(symbol.declarations[0], function (node) {
+ if (node.kind === 232 || node.kind === 264) {
+ return "quit";
+ }
switch (node.kind) {
- case 158:
case 159:
- case 225:
- case 149:
- case 148:
+ case 160:
+ case 227:
case 150:
- case 153:
+ case 149:
+ case 151:
case 154:
case 155:
- case 151:
+ case 156:
case 152:
- case 184:
+ case 153:
case 185:
- case 226:
- case 197:
- case 227:
+ case 186:
case 228:
+ case 198:
+ case 229:
+ case 230:
var declaration = node;
if (declaration.typeParameters) {
for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
@@ -26305,25 +29579,34 @@ var ts;
}
}
}
- if (ts.isClassLike(node) || node.kind === 227) {
+ if (ts.isClassLike(node) || node.kind === 229) {
var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
if (thisType && ts.contains(mappedTypes, thisType)) {
return true;
}
}
break;
- case 230:
- case 261:
- return false;
+ case 171:
+ if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) {
+ return true;
+ }
+ break;
+ case 278:
+ var func = node;
+ for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
+ var p = _c[_b];
+ if (ts.contains(mappedTypes, getTypeOfNode(p))) {
+ return true;
+ }
+ }
+ break;
}
- node = node.parent;
- }
- return false;
+ });
}
function isTopLevelTypeAlias(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var parentKind = symbol.declarations[0].parent.kind;
- return parentKind === 261 || parentKind === 231;
+ return parentKind === 264 || parentKind === 233;
}
return false;
}
@@ -26375,28 +29658,34 @@ var ts;
return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration);
}
function isContextSensitive(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
switch (node.kind) {
- case 184:
case 185:
+ case 186:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 176:
+ case 177:
return ts.forEach(node.properties, isContextSensitive);
- case 175:
+ case 176:
return ts.forEach(node.elements, isContextSensitive);
- case 193:
+ case 194:
return isContextSensitive(node.whenTrue) ||
isContextSensitive(node.whenFalse);
- case 192:
+ case 193:
return node.operatorToken.kind === 53 &&
(isContextSensitive(node.left) || isContextSensitive(node.right));
- case 257:
+ case 260:
return isContextSensitive(node.initializer);
+ case 150:
case 149:
- case 148:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 183:
+ case 184:
return isContextSensitive(node.expression);
+ case 253:
+ return ts.forEach(node.properties, isContextSensitive);
+ case 252:
+ return node.initializer && isContextSensitive(node.initializer);
+ case 255:
+ return node.expression && isContextSensitive(node.expression);
}
return false;
}
@@ -26407,7 +29696,7 @@ var ts;
if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
return true;
}
- if (node.kind === 185) {
+ if (node.kind === 186) {
return false;
}
var parameter = ts.firstOrUndefined(node.parameters);
@@ -26425,9 +29714,12 @@ var ts;
result.properties = resolved.properties;
result.callSignatures = emptyArray;
result.constructSignatures = emptyArray;
- type = result;
+ return result;
}
}
+ else if (type.flags & 131072) {
+ return getIntersectionType(ts.map(type.types, getTypeWithoutSignatures));
+ }
return type;
}
function isTypeIdenticalTo(source, target) {
@@ -26446,7 +29738,7 @@ var ts;
return isTypeRelatedTo(source, target, assignableRelation);
}
function isTypeInstanceOf(source, target) {
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
}
function isTypeComparableTo(source, target) {
return isTypeRelatedTo(source, target, comparableRelation);
@@ -26464,9 +29756,9 @@ var ts;
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
}
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
- return compareSignaturesRelated(source, target, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
+ return compareSignaturesRelated(source, target, false, ignoreReturnTypes, false, undefined, compareTypesAssignable) !== 0;
}
- function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
+ function compareSignaturesRelated(source, target, checkAsCallback, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
if (source === target) {
return -1;
}
@@ -26497,9 +29789,15 @@ var ts;
var sourceParams = source.parameters;
var targetParams = target.parameters;
for (var i = 0; i < checkCount; i++) {
- var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
- var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
- var related = compareTypes(s, t, false) || compareTypes(t, s, reportErrors);
+ var sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
+ var targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
+ var sourceSig = getSingleCallSignature(getNonNullableType(sourceType));
+ var targetSig = getSingleCallSignature(getNonNullableType(targetType));
+ var callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate &&
+ (getFalsyFlags(sourceType) & 6144) === (getFalsyFlags(targetType) & 6144);
+ var related = callbacks ?
+ compareSignaturesRelated(targetSig, sourceSig, true, false, reportErrors, errorReporter, compareTypes) :
+ !checkAsCallback && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name);
@@ -26526,7 +29824,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -26589,18 +29888,33 @@ var ts;
sourceNonRestParamCount;
}
}
+ function isEmptyResolvedType(t) {
+ return t.properties.length === 0 &&
+ t.callSignatures.length === 0 &&
+ t.constructSignatures.length === 0 &&
+ !t.stringIndexInfo &&
+ !t.numberIndexInfo;
+ }
+ function isEmptyObjectType(type) {
+ return type.flags & 32768 ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
+ type.flags & 65536 ? ts.forEach(type.types, isEmptyObjectType) :
+ type.flags & 131072 ? !ts.forEach(type.types, function (t) { return !isEmptyObjectType(t); }) :
+ false;
+ }
function isEnumTypeRelatedTo(source, target, errorReporter) {
if (source === target) {
return true;
}
var id = source.id + "," + target.id;
- if (enumRelation[id] !== undefined) {
- return enumRelation[id];
+ var relation = enumRelation.get(id);
+ if (relation !== undefined) {
+ return relation;
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256) || !(target.symbol.flags & 256) ||
(source.flags & 65536) !== (target.flags & 65536)) {
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@@ -26611,11 +29925,13 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
}
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
}
}
- return enumRelation[id] = true;
+ enumRelation.set(id, true);
+ return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192)
@@ -26636,6 +29952,8 @@ var ts;
return true;
if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
return true;
+ if (source.flags & 32768 && target.flags & 16777216)
+ return true;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1)
return true;
@@ -26667,13 +29985,13 @@ var ts;
}
if (source.flags & 32768 && target.flags & 32768) {
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
return related === 1;
}
}
- if (source.flags & 507904 || target.flags & 507904) {
- return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined);
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ return checkTypeRelatedTo(source, target, relation, undefined);
}
return false;
}
@@ -26727,10 +30045,27 @@ var ts;
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
- (getGlobalESSymbolType() === source && esSymbolType === target)) {
+ (getGlobalESSymbolType(false) === source && esSymbolType === target)) {
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
+ function isUnionOrIntersectionTypeWithoutNullableConstituents(type) {
+ if (!(type.flags & 196608)) {
+ return false;
+ }
+ var seenNonNullable = false;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (t.flags & 6144) {
+ continue;
+ }
+ if (seenNonNullable) {
+ return true;
+ }
+ seenNonNullable = true;
+ }
+ return false;
+ }
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
if (source.flags & 96 && source.flags & 1048576) {
@@ -26753,7 +30088,7 @@ var ts;
}
return 0;
}
- if (target.flags & 196608) {
+ if (isUnionOrIntersectionTypeWithoutNullableConstituents(target)) {
source = getRegularTypeOfObjectLiteral(source);
}
}
@@ -26769,91 +30104,24 @@ var ts;
return result;
}
}
- else if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
- }
- else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
- }
- else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
- }
- if (target.flags & 16384) {
- if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
- if (!source.declaration.questionToken) {
- var templateType = getTemplateTypeFromMappedType(source);
- var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
- if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
- return result;
- }
- }
- }
- else {
- var constraint = getConstraintOfTypeParameter(target);
- if (constraint && constraint.flags & 262144) {
- if (result = isRelatedTo(source, constraint, reportErrors)) {
- return result;
- }
- }
- }
- }
- else if (target.flags & 262144) {
- if (source.flags & 262144) {
- if (result = isRelatedTo(target.type, source.type, false)) {
- return result;
- }
- }
- var constraint = getConstraintOfTypeParameter(target.type);
- if (constraint) {
- if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
- return result;
- }
- }
- }
- else if (target.flags & 524288) {
- if (source.flags & 524288 && source.indexType === target.indexType) {
- if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
- return result;
- }
- }
- }
- if (source.flags & 16384) {
- if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
- var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
- var templateType = getTemplateTypeFromMappedType(target);
- if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ else {
+ if (target.flags & 65536) {
+ if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
return result;
}
}
- else {
- var constraint = getConstraintOfTypeParameter(source);
- if (!constraint || constraint.flags & 1) {
- constraint = emptyObjectType;
- }
- constraint = getTypeWithThisArgument(constraint, source);
- var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
- if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
- errorInfo = saveErrorInfo;
+ else if (target.flags & 131072) {
+ if (result = typeRelatedToEachType(source, target, reportErrors)) {
return result;
}
}
- }
- else {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ else if (source.flags & 131072) {
+ if (result = someTypeRelatedToType(source, target, false)) {
return result;
}
}
- var apparentSource = getApparentType(source);
- if (apparentSource.flags & (32768 | 131072) && target.flags & 32768) {
- var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190);
- if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) {
+ if (source.flags & 1032192 || target.flags & 1032192) {
+ if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
return result;
}
@@ -26873,12 +30141,7 @@ var ts;
function isIdenticalTo(source, target) {
var result;
if (source.flags & 32768 && target.flags & 32768) {
- if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
- if (result = typeArgumentsRelatedTo(source, target, false)) {
- return result;
- }
- }
- return objectTypeRelatedTo(source, source, target, false);
+ return recursiveTypeRelatedTo(source, target, false);
}
if (source.flags & 65536 && target.flags & 65536 ||
source.flags & 131072 && target.flags & 131072) {
@@ -26890,42 +30153,43 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name) {
+ function isKnownProperty(type, name, isComparingJsxAttributes) {
if (type.flags & 32768) {
var resolved = resolveStructuredTypeMembers(type);
- if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
- resolved.stringIndexInfo ||
- (resolved.numberIndexInfo && isNumericLiteralName(name)) ||
- getPropertyOfType(type, name)) {
+ if (resolved.stringIndexInfo || resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfType(type, name) || isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
return true;
}
}
else if (type.flags & 196608) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- if (isKnownProperty(t, name)) {
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
return true;
}
}
}
return false;
}
- function isEmptyObjectType(t) {
- return t.properties.length === 0 &&
- t.callSignatures.length === 0 &&
- t.constructSignatures.length === 0 &&
- !t.stringIndexInfo &&
- !t.numberIndexInfo;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ if ((relation === assignableRelation || relation === comparableRelation) &&
+ (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
+ return false;
+ }
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!isKnownProperty(target, prop.name)) {
+ if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
- errorNode = prop.valueDeclaration;
- reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ if (ts.isJsxAttributes(errorNode)) {
+ reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
+ }
+ else {
+ errorNode = prop.valueDeclaration;
+ reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ }
}
return true;
}
@@ -26951,20 +30215,42 @@ var ts;
if (target.flags & 65536 && containsType(targetTypes, source)) {
return -1;
}
- var len = targetTypes.length;
- for (var i = 0; i < len; i++) {
- var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
+ for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
+ var type = targetTypes_1[_i];
+ var related = isRelatedTo(source, type, false);
if (related) {
return related;
}
}
+ if (reportErrors) {
+ var discriminantType = findMatchingDiscriminantType(source, target);
+ isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], true);
+ }
return 0;
}
+ function findMatchingDiscriminantType(source, target) {
+ var sourceProperties = getPropertiesOfObjectType(source);
+ if (sourceProperties) {
+ for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
+ var sourceProperty = sourceProperties_1[_i];
+ if (isDiscriminantProperty(target, sourceProperty.name)) {
+ var sourceType = getTypeOfSymbol(sourceProperty);
+ for (var _a = 0, _b = target.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ var targetType = getTypeOfPropertyOfType(type, sourceProperty.name);
+ if (targetType && isRelatedTo(sourceType, targetType)) {
+ return type;
+ }
+ }
+ }
+ }
+ }
+ }
function typeRelatedToEachType(source, target, reportErrors) {
var result = -1;
var targetTypes = target.types;
- for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
- var targetType = targetTypes_1[_i];
+ for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
+ var targetType = targetTypes_2[_i];
var related = isRelatedTo(source, targetType, reportErrors);
if (!related) {
return 0;
@@ -27017,15 +30303,15 @@ var ts;
}
return result;
}
- function objectTypeRelatedTo(source, originalSource, target, reportErrors) {
+ function recursiveTypeRelatedTo(source, target, reportErrors) {
if (overflow) {
return 0;
}
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
if (reportErrors && related === 2) {
- relation[id] = 3;
+ relation.set(id, 3);
}
else {
return related === 1 ? -1 : 0;
@@ -27033,7 +30319,7 @@ var ts;
}
if (depth > 0) {
for (var i = 0; i < depth; i++) {
- if (maybeStack[i][id]) {
+ if (maybeStack[i].get(id)) {
return 1;
}
}
@@ -27051,71 +30337,165 @@ var ts;
sourceStack[depth] = source;
targetStack[depth] = target;
maybeStack[depth] = ts.createMap();
- maybeStack[depth][id] = 1;
+ maybeStack[depth].set(id, 1);
depth++;
var saveExpandingFlags = expandingFlags;
- if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth))
+ if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
expandingFlags |= 1;
- if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth))
+ if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
expandingFlags |= 2;
+ var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : 1;
+ expandingFlags = saveExpandingFlags;
+ depth--;
+ if (result) {
+ var maybeCache = maybeStack[depth];
+ var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
+ ts.copyEntries(maybeCache, destinationCache);
+ }
+ else {
+ relation.set(id, reportErrors ? 3 : 2);
+ }
+ return result;
+ }
+ function structuredTypeRelatedTo(source, target, reportErrors) {
var result;
- if (expandingFlags === 3) {
- result = 1;
+ var saveErrorInfo = errorInfo;
+ if (target.flags & 16384) {
+ if (getObjectFlags(source) & 32 && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
+ if (!source.declaration.questionToken) {
+ var templateType = getTemplateTypeFromMappedType(source);
+ var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
+ if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+ return result;
+ }
+ }
+ }
+ }
+ else if (target.flags & 262144) {
+ if (source.flags & 262144) {
+ if (result = isRelatedTo(target.type, source.type, false)) {
+ return result;
+ }
+ }
+ var constraint = getConstraintOfType(target.type);
+ if (constraint) {
+ if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else if (target.flags & 524288) {
+ var constraint = getConstraintOfType(target);
+ if (constraint) {
+ if (result = isRelatedTo(source, constraint, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ if (source.flags & 16384) {
+ if (getObjectFlags(target) & 32 && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
+ var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
+ var templateType = getTemplateTypeFromMappedType(target);
+ if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else {
+ var constraint = getConstraintOfTypeParameter(source);
+ if (constraint || !(target.flags & 16777216)) {
+ if (!constraint || constraint.flags & 1) {
+ constraint = emptyObjectType;
+ }
+ constraint = getTypeWithThisArgument(constraint, source);
+ var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
+ if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
}
- else if (isGenericMappedType(source) || isGenericMappedType(target)) {
- result = mappedTypeRelatedTo(source, target, reportErrors);
+ else if (source.flags & 524288) {
+ var constraint = getConstraintOfType(source);
+ if (constraint) {
+ if (result = isRelatedTo(constraint, target, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else if (target.flags & 524288 && source.indexType === target.indexType) {
+ if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ return result;
+ }
+ }
}
else {
- result = propertiesRelatedTo(source, target, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 0, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 1, reportErrors);
+ if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
+ if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ return result;
+ }
+ }
+ var sourceIsPrimitive = !!(source.flags & 8190);
+ if (relation !== identityRelation) {
+ source = getApparentType(source);
+ }
+ if (source.flags & (32768 | 131072) && target.flags & 32768) {
+ var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive;
+ if (isGenericMappedType(source) || isGenericMappedType(target)) {
+ result = mappedTypeRelatedTo(source, target, reportStructuralErrors);
+ }
+ else {
+ result = propertiesRelatedTo(source, target, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 0, reportErrors);
+ result &= signaturesRelatedTo(source, target, 0, reportStructuralErrors);
if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 1, reportErrors);
+ result &= signaturesRelatedTo(source, target, 1, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 0, sourceIsPrimitive, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 1, sourceIsPrimitive, reportStructuralErrors);
+ }
+ }
}
}
}
+ if (result) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
}
}
- expandingFlags = saveExpandingFlags;
- depth--;
- if (result) {
- var maybeCache = maybeStack[depth];
- var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
- ts.copyProperties(maybeCache, destinationCache);
- }
- else {
- relation[id] = reportErrors ? 3 : 2;
- }
- return result;
+ return 0;
}
function mappedTypeRelatedTo(source, target, reportErrors) {
if (isGenericMappedType(target)) {
if (isGenericMappedType(source)) {
- var result_2;
- if (relation === identityRelation) {
- var readonlyMatches = !source.declaration.readonlyToken === !target.declaration.readonlyToken;
- var optionalMatches = !source.declaration.questionToken === !target.declaration.questionToken;
- if (readonlyMatches && optionalMatches) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getErasedTemplateTypeFromMappedType(source), getErasedTemplateTypeFromMappedType(target), reportErrors);
- }
- }
- }
- else {
- if (relation === comparableRelation || !source.declaration.questionToken || target.declaration.questionToken) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target), reportErrors);
- }
+ var sourceReadonly = !!source.declaration.readonlyToken;
+ var sourceOptional = !!source.declaration.questionToken;
+ var targetReadonly = !!target.declaration.readonlyToken;
+ var targetOptional = !!target.declaration.questionToken;
+ var modifiersRelated = relation === identityRelation ?
+ sourceReadonly === targetReadonly && sourceOptional === targetOptional :
+ relation === comparableRelation || !sourceOptional || targetOptional;
+ if (modifiersRelated) {
+ var result_2;
+ if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
+ return result_2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
}
}
}
+ else if (target.declaration.questionToken && isEmptyObjectType(source)) {
+ return -1;
+ }
}
- else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(target))) {
- return -1;
+ else if (relation !== identityRelation) {
+ var resolved = resolveStructuredTypeMembers(target);
+ if (isEmptyResolvedType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & 1) {
+ return -1;
+ }
}
return 0;
}
@@ -27126,22 +30506,28 @@ var ts;
var result = -1;
var properties = getPropertiesOfObjectType(target);
var requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & 128);
- for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
- var targetProp = properties_3[_i];
+ for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
+ var targetProp = properties_4[_i];
var sourceProp = getPropertyOfType(source, targetProp.name);
if (sourceProp !== targetProp) {
if (!sourceProp) {
- if (!(targetProp.flags & 536870912) || requireOptionalProperties) {
+ if (!(targetProp.flags & 67108864) || requireOptionalProperties) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
}
return 0;
}
}
- else if (!(targetProp.flags & 134217728)) {
+ else if (!(targetProp.flags & 16777216)) {
var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
+ if (getCheckFlags(sourceProp) & 256) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
+ }
+ return 0;
+ }
if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
if (reportErrors) {
if (sourcePropFlags & 8 && targetPropFlags & 8) {
@@ -27155,12 +30541,9 @@ var ts;
}
}
else if (targetPropFlags & 16) {
- var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32;
- var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined;
- var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp));
- if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
+ if (!isValidOverrideOf(sourceProp, targetProp)) {
if (reportErrors) {
- reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
+ reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source), typeToString(getDeclaringClass(targetProp) || target));
}
return 0;
}
@@ -27179,7 +30562,7 @@ var ts;
return 0;
}
result &= related;
- if (relation !== comparableRelation && sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) {
+ if (relation !== comparableRelation && sourceProp.flags & 67108864 && !(targetProp.flags & 67108864)) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target));
}
@@ -27200,8 +30583,8 @@ var ts;
return 0;
}
var result = -1;
- for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
- var sourceProp = sourceProperties_1[_i];
+ for (var _i = 0, sourceProperties_2 = sourceProperties; _i < sourceProperties_2.length; _i++) {
+ var sourceProp = sourceProperties_2[_i];
var targetProp = getPropertyOfObjectType(target, sourceProp.name);
if (!targetProp) {
return 0;
@@ -27257,7 +30640,7 @@ var ts;
return result;
}
function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ return compareSignaturesRelated(source, target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -27266,7 +30649,7 @@ var ts;
return 0;
}
var result = -1;
- for (var i = 0, len = sourceSignatures.length; i < len; i++) {
+ for (var i = 0; i < sourceSignatures.length; i++) {
var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], false, false, false, isRelatedTo);
if (!related) {
return 0;
@@ -27299,12 +30682,12 @@ var ts;
}
return related;
}
- function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) {
+ function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors) {
if (relation === identityRelation) {
return indexTypesIdenticalTo(source, target, kind);
}
var targetInfo = getIndexInfoOfType(target, kind);
- if (!targetInfo || ((targetInfo.type.flags & 1) && !(originalSource.flags & 8190))) {
+ if (!targetInfo || targetInfo.type.flags & 1 && !sourceIsPrimitive) {
return -1;
}
var sourceInfo = getIndexInfoOfType(source, kind) ||
@@ -27362,6 +30745,37 @@ var ts;
return false;
}
}
+ function forEachProperty(prop, callback) {
+ if (getCheckFlags(prop) & 6) {
+ for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ var p = getPropertyOfType(t, prop.name);
+ var result = p && forEachProperty(p, callback);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ }
+ return callback(prop);
+ }
+ function getDeclaringClass(prop) {
+ return prop.parent && prop.parent.flags & 32 ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;
+ }
+ function isPropertyInClassDerivedFrom(prop, baseClass) {
+ return forEachProperty(prop, function (sp) {
+ var sourceClass = getDeclaringClass(sp);
+ return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
+ });
+ }
+ function isValidOverrideOf(sourceProp, targetProp) {
+ return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
+ }
+ function isClassDerivedFromDeclaringClasses(checkClass, prop) {
+ return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
+ }
function isAbstractConstructorType(type) {
if (getObjectFlags(type) & 16) {
var symbol = type.symbol;
@@ -27374,16 +30788,18 @@ var ts;
}
return false;
}
- function isDeeplyNestedGeneric(type, stack, depth) {
- if (getObjectFlags(type) & (4 | 64) && depth >= 5) {
+ function isDeeplyNestedType(type, stack, depth) {
+ if (depth >= 5 && type.flags & 32768) {
var symbol = type.symbol;
- var count = 0;
- for (var i = 0; i < depth; i++) {
- var t = stack[i];
- if (getObjectFlags(t) & (4 | 64) && t.symbol === symbol) {
- count++;
- if (count >= 5)
- return true;
+ if (symbol) {
+ var count = 0;
+ for (var i = 0; i < depth; i++) {
+ var t = stack[i];
+ if (t.flags & 32768 && t.symbol === symbol) {
+ count++;
+ if (count >= 5)
+ return true;
+ }
}
}
}
@@ -27407,7 +30823,7 @@ var ts;
}
}
else {
- if ((sourceProp.flags & 536870912) !== (targetProp.flags & 536870912)) {
+ if ((sourceProp.flags & 67108864) !== (targetProp.flags & 67108864)) {
return 0;
}
}
@@ -27437,7 +30853,7 @@ var ts;
if (!(isMatchingSignature(source, target, partialMatch))) {
return 0;
}
- if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
+ if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) {
return 0;
}
source = getErasedSignature(source);
@@ -27475,8 +30891,8 @@ var ts;
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
function isSupertypeOfEach(candidate, types) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
if (candidate !== t && !isTypeSubtypeOf(t, candidate))
return false;
}
@@ -27484,8 +30900,8 @@ var ts;
}
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var t = types_8[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -27576,8 +30992,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var t = types_9[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -27606,7 +31022,7 @@ var ts;
types.push(undefinedType);
if (flags & 4096)
types.push(nullType);
- return getUnionType(types, true);
+ return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
@@ -27621,8 +31037,8 @@ var ts;
getSignaturesOfType(type, 0).length === 0 &&
getSignaturesOfType(type, 1).length === 0;
}
- function createTransientSymbol(source, type) {
- var symbol = createSymbol(source.flags | 67108864, source.name);
+ function createSymbolWithType(source, type) {
+ var symbol = createSymbol(source.flags, source.name);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;
@@ -27638,9 +31054,8 @@ var ts;
var property = _a[_i];
var original = getTypeOfSymbol(property);
var updated = f(original);
- members[property.name] = updated === original ? property : createTransientSymbol(property, updated);
+ members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
}
- ;
return members;
}
function getRegularTypeOfObjectLiteral(type) {
@@ -27659,11 +31074,17 @@ var ts;
type.regularType = regularNew;
return regularNew;
}
+ function getWidenedProperty(prop) {
+ var original = getTypeOfSymbol(prop);
+ var widened = getWidenedType(original);
+ return widened === original ? prop : createSymbolWithType(prop, widened);
+ }
function getWidenedTypeOfObjectLiteral(type) {
- var members = transformTypeOfMembers(type, function (prop) {
- var widened = getWidenedType(prop);
- return prop === widened ? prop : widened;
- });
+ var members = ts.createMap();
+ for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ members.set(prop.name, prop.flags & 4 ? getWidenedProperty(prop) : prop);
+ }
var stringIndexInfo = getIndexInfoOfType(type, 0);
var numberIndexInfo = getIndexInfoOfType(type, 1);
return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
@@ -27724,25 +31145,25 @@ var ts;
var typeAsString = typeToString(getWidenedType(type));
var diagnostic;
switch (declaration.kind) {
+ case 148:
case 147:
- case 146:
diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
break;
- case 144:
+ case 145:
diagnostic = declaration.dotDotDotToken ?
ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
break;
- case 174:
+ case 175:
diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
break;
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 184:
+ case 153:
case 185:
+ case 186:
if (!declaration.name) {
error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
return;
@@ -27755,7 +31176,7 @@ var ts;
error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
- if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152) {
+ if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
if (!reportWideningErrorsInType(type)) {
reportImplicitAnyError(declaration, type);
}
@@ -27781,13 +31202,14 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes) {
+ function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
return {
signature: signature,
inferUnionTypes: inferUnionTypes,
inferences: inferences,
inferredTypes: new Array(signature.typeParameters.length),
+ useAnyForNoInferences: useAnyForNoInferences
};
}
function createTypeInferencesObject() {
@@ -27798,25 +31220,69 @@ var ts;
isFixed: false,
};
}
- function couldContainTypeParameters(type) {
+ function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
- return !!(type.flags & 16384 ||
- objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
+ return !!(type.flags & 540672 ||
+ objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
objectFlags & 32 ||
- type.flags & 196608 && couldUnionOrIntersectionContainTypeParameters(type));
+ type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
- function couldUnionOrIntersectionContainTypeParameters(type) {
- if (type.couldContainTypeParameters === undefined) {
- type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters);
+ function couldUnionOrIntersectionContainTypeVariables(type) {
+ if (type.couldContainTypeVariables === undefined) {
+ type.couldContainTypeVariables = ts.forEach(type.types, couldContainTypeVariables);
}
- return type.couldContainTypeParameters;
+ return type.couldContainTypeVariables;
}
function isTypeParameterAtTopLevel(type, typeParameter) {
return type === typeParameter || type.flags & 196608 && ts.forEach(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); });
}
- function inferTypes(context, originalSource, originalTarget) {
- var typeParameters = context.signature.typeParameters;
+ function inferTypeForHomomorphicMappedType(source, target) {
+ var properties = getPropertiesOfType(source);
+ var indexInfo = getIndexInfoOfType(source, 0);
+ if (properties.length === 0 && !indexInfo) {
+ return undefined;
+ }
+ var typeVariable = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var typeVariableArray = [typeVariable];
+ var typeInferences = createTypeInferencesObject();
+ var typeInferencesArray = [typeInferences];
+ var templateType = getTemplateTypeFromMappedType(target);
+ var readonlyMask = target.declaration.readonlyToken ? false : true;
+ var optionalMask = target.declaration.questionToken ? 0 : 67108864;
+ var members = createSymbolTable(properties);
+ for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
+ var prop = properties_5[_i];
+ var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
+ if (!inferredPropType) {
+ return undefined;
+ }
+ var inferredProp = createSymbol(4 | prop.flags & optionalMask, prop.name);
+ inferredProp.checkFlags = readonlyMask && isReadonlySymbol(prop) ? 8 : 0;
+ inferredProp.declarations = prop.declarations;
+ inferredProp.type = inferredPropType;
+ members.set(prop.name, inferredProp);
+ }
+ if (indexInfo) {
+ var inferredIndexType = inferTargetType(indexInfo.type);
+ if (!inferredIndexType) {
+ return undefined;
+ }
+ indexInfo = createIndexInfo(inferredIndexType, readonlyMask && indexInfo.isReadonly);
+ }
+ return createAnonymousType(undefined, members, emptyArray, emptyArray, indexInfo, undefined);
+ function inferTargetType(sourceType) {
+ typeInferences.primary = undefined;
+ typeInferences.secondary = undefined;
+ inferTypes(typeVariableArray, typeInferencesArray, sourceType, templateType);
+ var inferences = typeInferences.primary || typeInferences.secondary;
+ return inferences && getUnionType(inferences, true);
+ }
+ }
+ function inferTypesWithContext(context, originalSource, originalTarget) {
+ inferTypes(context.signature.typeParameters, context.inferences, originalSource, originalTarget);
+ }
+ function inferTypes(typeVariables, typeInferences, originalSource, originalTarget) {
var sourceStack;
var targetStack;
var depth = 0;
@@ -27832,7 +31298,7 @@ var ts;
return false;
}
function inferFromTypes(source, target) {
- if (!couldContainTypeParameters(target)) {
+ if (!couldContainTypeVariables(target)) {
return;
}
if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
@@ -27871,13 +31337,13 @@ var ts;
target = removeTypesFromUnionOrIntersection(target, matchingTypes);
}
}
- if (target.flags & 16384) {
+ if (target.flags & 540672) {
if (source.flags & 8388608) {
return;
}
- for (var i = 0; i < typeParameters.length; i++) {
- if (target === typeParameters[i]) {
- var inferences = context.inferences[i];
+ for (var i = 0; i < typeVariables.length; i++) {
+ if (target === typeVariables[i]) {
+ var inferences = typeInferences[i];
if (!inferences.isFixed) {
var candidates = inferiority ?
inferences.secondary || (inferences.secondary = []) :
@@ -27885,7 +31351,7 @@ var ts;
if (!ts.contains(candidates, source)) {
candidates.push(source);
}
- if (!isTypeParameterAtTopLevel(originalTarget, target)) {
+ if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
inferences.topLevel = false;
}
}
@@ -27903,21 +31369,21 @@ var ts;
}
else if (target.flags & 196608) {
var targetTypes = target.types;
- var typeParameterCount = 0;
- var typeParameter = void 0;
- for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) {
- var t = targetTypes_2[_d];
- if (t.flags & 16384 && ts.contains(typeParameters, t)) {
- typeParameter = t;
- typeParameterCount++;
+ var typeVariableCount = 0;
+ var typeVariable = void 0;
+ for (var _d = 0, targetTypes_3 = targetTypes; _d < targetTypes_3.length; _d++) {
+ var t = targetTypes_3[_d];
+ if (t.flags & 540672 && ts.contains(typeVariables, t)) {
+ typeVariable = t;
+ typeVariableCount++;
}
else {
inferFromTypes(source, t);
}
}
- if (typeParameterCount === 1) {
+ if (typeVariableCount === 1) {
inferiority++;
- inferFromTypes(source, typeParameter);
+ inferFromTypes(source, typeVariable);
inferiority--;
}
}
@@ -27934,14 +31400,14 @@ var ts;
if (isInProcess(source, target)) {
return;
}
- if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) {
+ if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
return;
}
var key = source.id + "," + target.id;
- if (visited[key]) {
+ if (visited.get(key)) {
return;
}
- visited[key] = true;
+ visited.set(key, true);
if (depth === 0) {
sourceStack = [];
targetStack = [];
@@ -27957,9 +31423,16 @@ var ts;
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
- if (getObjectFlags(source) & 32) {
- inferFromTypes(getConstraintTypeFromMappedType(source), constraintType);
- inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));
+ if (constraintType.flags & 262144) {
+ var index = ts.indexOf(typeVariables, constraintType.type);
+ if (index >= 0 && !typeInferences[index].isFixed) {
+ var inferredType = inferTypeForHomomorphicMappedType(source, target);
+ if (inferredType) {
+ inferiority++;
+ inferFromTypes(inferredType, typeVariables[index]);
+ inferiority--;
+ }
+ }
return;
}
if (constraintType.flags & 16384) {
@@ -27975,8 +31448,8 @@ var ts;
}
function inferFromProperties(source, target) {
var properties = getPropertiesOfObjectType(target);
- for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
- var targetProp = properties_4[_i];
+ for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) {
+ var targetProp = properties_6[_i];
var sourceProp = getPropertyOfObjectType(source, targetProp.name);
if (sourceProp) {
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
@@ -28026,8 +31499,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
- var t = types_10[_i];
+ for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+ var t = types_13[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -28068,7 +31541,13 @@ var ts;
inferenceSucceeded = !!unionOrSuperType;
}
else {
- inferredType = emptyObjectType;
+ var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ if (defaultType) {
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ }
+ else {
+ inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ }
inferenceSucceeded = true;
}
context.inferredTypes[index] = inferredType;
@@ -28101,19 +31580,7 @@ var ts;
return links.resolvedSymbol;
}
function isInTypeQuery(node) {
- while (node) {
- switch (node.kind) {
- case 160:
- return true;
- case 70:
- case 141:
- node = node.parent;
- continue;
- default:
- return false;
- }
- }
- ts.Debug.fail("should not get here");
+ return !!ts.findAncestor(node, function (n) { return n.kind === 161 ? true : n.kind === 70 || n.kind === 142 ? false : "quit"; });
}
function getFlowCacheKey(node) {
if (node.kind === 70) {
@@ -28123,7 +31590,7 @@ var ts;
if (node.kind === 98) {
return "0";
}
- if (node.kind === 177) {
+ if (node.kind === 178) {
var key = getFlowCacheKey(node.expression);
return key && key + "." + node.name.text;
}
@@ -28134,7 +31601,7 @@ var ts;
case 70:
case 98:
return node;
- case 177:
+ case 178:
return getLeftmostIdentifierOrThis(node.expression);
}
return undefined;
@@ -28143,19 +31610,21 @@ var ts;
switch (source.kind) {
case 70:
return target.kind === 70 && getResolvedSymbol(source) === getResolvedSymbol(target) ||
- (target.kind === 223 || target.kind === 174) &&
+ (target.kind === 225 || target.kind === 175) &&
getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
case 98:
return target.kind === 98;
- case 177:
- return target.kind === 177 &&
+ case 96:
+ return target.kind === 96;
+ case 178:
+ return target.kind === 178 &&
source.name.text === target.name.text &&
isMatchingReference(source.expression, target.expression);
}
return false;
}
function containsMatchingReference(source, target) {
- while (source.kind === 177) {
+ while (source.kind === 178) {
source = source.expression;
if (isMatchingReference(source, target)) {
return true;
@@ -28164,7 +31633,7 @@ var ts;
return false;
}
function containsMatchingReferenceDiscriminant(source, target) {
- return target.kind === 177 &&
+ return target.kind === 178 &&
containsMatchingReference(source, target.expression) &&
isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
}
@@ -28172,7 +31641,7 @@ var ts;
if (expr.kind === 70) {
return getTypeOfSymbol(getResolvedSymbol(expr));
}
- if (expr.kind === 177) {
+ if (expr.kind === 178) {
var type = getDeclaredTypeOfReference(expr.expression);
return type && getTypeOfPropertyOfType(type, expr.name.text);
}
@@ -28181,9 +31650,9 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && prop.flags & 268435456) {
+ if (prop && getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
- prop.isDiscriminantProperty = prop.hasNonUniformType && isLiteralType(getTypeOfSymbol(prop));
+ prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
return prop.isDiscriminantProperty;
}
@@ -28202,7 +31671,7 @@ var ts;
}
}
}
- if (callExpression.expression.kind === 177 &&
+ if (callExpression.expression.kind === 178 &&
isOrContainsMatchingReference(reference, callExpression.expression.expression)) {
return true;
}
@@ -28241,8 +31710,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
result |= getTypeFacts(t);
}
return result;
@@ -28250,7 +31719,7 @@ var ts;
function isFunctionObjectType(type) {
var resolved = resolveStructuredTypeMembers(type);
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
- resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType));
+ resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
}
function getTypeFacts(type) {
var flags = type.flags;
@@ -28293,9 +31762,11 @@ var ts;
if (flags & 512) {
return strictNullChecks ? 1981320 : 4193160;
}
- if (flags & 16384) {
- var constraint = getConstraintOfTypeParameter(type);
- return getTypeFacts(constraint || emptyObjectType);
+ if (flags & 16777216) {
+ return strictNullChecks ? 6166480 : 8378320;
+ }
+ if (flags & 540672) {
+ return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
}
if (flags & 196608) {
return getTypeFactsOfTypes(type.types);
@@ -28321,17 +31792,23 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, undefined, false) ||
+ checkIteratedTypeOrElementType(type, undefined, false, false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, undefined, false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, undefined, false, false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
- return node.parent.kind === 175 || node.parent.kind === 257 ?
+ var isDestructuringDefaultAssignment = node.parent.kind === 176 && isDestructuringAssignmentTarget(node.parent) ||
+ node.parent.kind === 260 && isDestructuringAssignmentTarget(node.parent.parent);
+ return isDestructuringDefaultAssignment ?
getTypeWithDefault(getAssignedType(node), node.right) :
getTypeOfExpression(node.right);
}
+ function isDestructuringAssignmentTarget(parent) {
+ return parent.parent.kind === 193 && parent.parent.left === parent ||
+ parent.parent.kind === 215 && parent.parent.initializer === parent;
+ }
function getAssignedTypeOfArrayLiteralElement(node, element) {
return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element));
}
@@ -28347,21 +31824,21 @@ var ts;
function getAssignedType(node) {
var parent = node.parent;
switch (parent.kind) {
- case 212:
+ case 214:
return stringType;
- case 213:
- return checkRightHandSideOfForOf(parent.expression) || unknownType;
- case 192:
+ case 215:
+ return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType;
+ case 193:
return getAssignedTypeOfBinaryExpression(parent);
- case 186:
+ case 187:
return undefinedType;
- case 175:
+ case 176:
return getAssignedTypeOfArrayLiteralElement(parent, node);
- case 196:
+ case 197:
return getAssignedTypeOfSpreadExpression(parent);
- case 257:
+ case 260:
return getAssignedTypeOfPropertyAssignment(parent);
- case 258:
+ case 261:
return getAssignedTypeOfShorthandPropertyAssignment(parent);
}
return unknownType;
@@ -28369,7 +31846,7 @@ var ts;
function getInitialTypeOfBindingElement(node) {
var pattern = node.parent;
var parentType = getInitialType(pattern.parent);
- var type = pattern.kind === 172 ?
+ var type = pattern.kind === 173 ?
getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
!node.dotDotDotToken ?
getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) :
@@ -28384,35 +31861,35 @@ var ts;
if (node.initializer) {
return getTypeOfInitializer(node.initializer);
}
- if (node.parent.parent.kind === 212) {
+ if (node.parent.parent.kind === 214) {
return stringType;
}
- if (node.parent.parent.kind === 213) {
- return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType;
+ if (node.parent.parent.kind === 215) {
+ return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType;
}
return unknownType;
}
function getInitialType(node) {
- return node.kind === 223 ?
+ return node.kind === 225 ?
getInitialTypeOfVariableDeclaration(node) :
getInitialTypeOfBindingElement(node);
}
function getInitialOrAssignedType(node) {
- return node.kind === 223 || node.kind === 174 ?
+ return node.kind === 225 || node.kind === 175 ?
getInitialType(node) :
getAssignedType(node);
}
function isEmptyArrayAssignment(node) {
- return node.kind === 223 && node.initializer &&
+ return node.kind === 225 && node.initializer &&
isEmptyArrayLiteral(node.initializer) ||
- node.kind !== 174 && node.parent.kind === 192 &&
+ node.kind !== 175 && node.parent.kind === 193 &&
isEmptyArrayLiteral(node.parent.right);
}
function getReferenceCandidate(node) {
switch (node.kind) {
- case 183:
+ case 184:
return getReferenceCandidate(node.expression);
- case 192:
+ case 193:
switch (node.operatorToken.kind) {
case 57:
return getReferenceCandidate(node.left);
@@ -28424,13 +31901,13 @@ var ts;
}
function getReferenceRoot(node) {
var parent = node.parent;
- return parent.kind === 183 ||
- parent.kind === 192 && parent.operatorToken.kind === 57 && parent.left === node ||
- parent.kind === 192 && parent.operatorToken.kind === 25 && parent.right === node ?
+ return parent.kind === 184 ||
+ parent.kind === 193 && parent.operatorToken.kind === 57 && parent.left === node ||
+ parent.kind === 193 && parent.operatorToken.kind === 25 && parent.right === node ?
getReferenceRoot(parent) : node;
}
function getTypeOfSwitchClause(clause) {
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
return isUnitType(caseType) ? caseType : undefined;
}
@@ -28476,8 +31953,29 @@ var ts;
}
return f(type) ? type : neverType;
}
- function mapType(type, f) {
- return type.flags & 65536 ? getUnionType(ts.map(type.types, f)) : f(type);
+ function mapType(type, mapper) {
+ if (!(type.flags & 65536)) {
+ return mapper(type);
+ }
+ var types = type.types;
+ var mappedType;
+ var mappedTypes;
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var t = mapper(current);
+ if (t) {
+ if (!mappedType) {
+ mappedType = t;
+ }
+ else if (!mappedTypes) {
+ mappedTypes = [mappedType, t];
+ }
+ else {
+ mappedTypes.push(t);
+ }
+ }
+ }
+ return mappedTypes ? getUnionType(mappedTypes) : mappedType;
}
function extractTypesOfKind(type, kind) {
return filterType(type, function (t) { return (t.flags & kind) !== 0; });
@@ -28511,7 +32009,7 @@ var ts;
return evolvingArrayTypes[elementType.id] || (evolvingArrayTypes[elementType.id] = createEvolvingArrayType(elementType));
}
function addEvolvingArrayElementType(evolvingArrayType, node) {
- var elementType = getBaseTypeOfLiteralType(getTypeOfExpression(node));
+ var elementType = getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node));
return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));
}
function createFinalArrayType(elementType) {
@@ -28532,8 +32030,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var t = types_16[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -28551,11 +32049,11 @@ var ts;
function isEvolvingArrayOperationTarget(node) {
var root = getReferenceRoot(node);
var parent = root.parent;
- var isLengthPushOrUnshift = parent.kind === 177 && (parent.name.text === "length" ||
- parent.parent.kind === 179 && ts.isPushOrUnshiftIdentifier(parent.name));
- var isElementAssignment = parent.kind === 178 &&
+ var isLengthPushOrUnshift = parent.kind === 178 && (parent.name.text === "length" ||
+ parent.parent.kind === 180 && ts.isPushOrUnshiftIdentifier(parent.name));
+ var isElementAssignment = parent.kind === 179 &&
parent.expression === root &&
- parent.parent.kind === 192 &&
+ parent.parent.kind === 193 &&
parent.parent.operatorToken.kind === 57 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
@@ -28582,19 +32080,17 @@ var ts;
}
return false;
}
- function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) {
+ function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+ if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 1033215)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
return declaredType;
}
- var initialType = assumeInitialized ? declaredType :
- declaredType === autoType || declaredType === autoArrayType ? undefinedType :
- includeFalsyTypes(declaredType, 2048);
var visitedFlowStart = visitedFlowCount;
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
visitedFlowCount = visitedFlowStart;
var resultType = getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType);
- if (reference.parent.kind === 201 && getTypeWithFacts(resultType, 524288).flags & 8192) {
+ if (reference.parent.kind === 202 && getTypeWithFacts(resultType, 524288).flags & 8192) {
return declaredType;
}
return resultType;
@@ -28608,7 +32104,16 @@ var ts;
}
}
var type = void 0;
- if (flow.flags & 16) {
+ if (flow.flags & 4096) {
+ flow.locked = true;
+ type = getTypeAtFlowNode(flow.antecedent);
+ flow.locked = false;
+ }
+ else if (flow.flags & 2048) {
+ flow = flow.antecedent;
+ continue;
+ }
+ else if (flow.flags & 16) {
type = getTypeAtFlowAssignment(flow);
if (!type) {
flow = flow.antecedent;
@@ -28639,7 +32144,7 @@ var ts;
}
else if (flow.flags & 2) {
var container = flow.container;
- if (container && container !== flowContainer && reference.kind !== 177) {
+ if (container && container !== flowContainer && reference.kind !== 178 && reference.kind !== 98) {
flow = container.flowNode;
continue;
}
@@ -28682,7 +32187,7 @@ var ts;
}
function getTypeAtFlowArrayMutation(flow) {
var node = flow.node;
- var expr = node.kind === 179 ?
+ var expr = node.kind === 180 ?
node.expression.expression :
node.left.expression;
if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -28690,7 +32195,7 @@ var ts;
var type = getTypeFromFlowType(flowType);
if (getObjectFlags(type) & 256) {
var evolvedType_1 = type;
- if (node.kind === 179) {
+ if (node.kind === 180) {
for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
var arg = _a[_i];
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -28742,6 +32247,9 @@ var ts;
var seenIncomplete = false;
for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) {
var antecedent = _a[_i];
+ if (antecedent.flags & 2048 && antecedent.lock.locked) {
+ continue;
+ }
var flowType = getTypeAtFlowNode(antecedent);
var type = getTypeFromFlowType(flowType);
if (type === declaredType && declaredType === initialType) {
@@ -28765,8 +32273,9 @@ var ts;
if (!key) {
key = getFlowCacheKey(reference);
}
- if (cache[key]) {
- return cache[key];
+ var cached = cache.get(key);
+ if (cached) {
+ return cached;
}
for (var i = flowLoopStart; i < flowLoopCount; i++) {
if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key && flowLoopTypes[i].length) {
@@ -28788,8 +32297,9 @@ var ts;
firstAntecedentType = flowType;
}
var type = getTypeFromFlowType(flowType);
- if (cache[key]) {
- return cache[key];
+ var cached_1 = cache.get(key);
+ if (cached_1) {
+ return cached_1;
}
if (!ts.contains(antecedentTypes, type)) {
antecedentTypes.push(type);
@@ -28805,10 +32315,11 @@ var ts;
if (isIncomplete(firstAntecedentType)) {
return createFlowType(result, true);
}
- return cache[key] = result;
+ cache.set(key, result);
+ return result;
}
function isMatchingReferenceDiscriminant(expr) {
- return expr.kind === 177 &&
+ return expr.kind === 178 &&
declaredType.flags & 65536 &&
isMatchingReference(reference, expr.expression) &&
isDiscriminantProperty(declaredType, expr.name.text);
@@ -28842,10 +32353,10 @@ var ts;
var operator_1 = expr.operatorToken.kind;
var left_1 = getReferenceCandidate(expr.left);
var right_1 = getReferenceCandidate(expr.right);
- if (left_1.kind === 187 && right_1.kind === 9) {
+ if (left_1.kind === 188 && right_1.kind === 9) {
return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
}
- if (right_1.kind === 187 && left_1.kind === 9) {
+ if (right_1.kind === 188 && left_1.kind === 9) {
return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
}
if (isMatchingReference(reference, left_1)) {
@@ -28891,7 +32402,7 @@ var ts;
assumeTrue ? 16384 : 131072;
return getTypeWithFacts(type, facts);
}
- if (type.flags & 33281) {
+ if (type.flags & 16810497) {
return type;
}
if (assumeTrue) {
@@ -28916,14 +32427,22 @@ var ts;
assumeTrue = !assumeTrue;
}
if (assumeTrue && !(type.flags & 65536)) {
- var targetType = typeofTypesByName[literal.text];
- if (targetType && isTypeSubtypeOf(targetType, type)) {
- return targetType;
+ var targetType = typeofTypesByName.get(literal.text);
+ if (targetType) {
+ if (isTypeSubtypeOf(targetType, type)) {
+ return targetType;
+ }
+ if (type.flags & 540672) {
+ var constraint = getBaseConstraintOfType(type) || anyType;
+ if (isTypeSubtypeOf(targetType, constraint)) {
+ return getIntersectionType([type, targetType]);
+ }
+ }
}
}
var facts = assumeTrue ?
- typeofEQFacts[literal.text] || 64 :
- typeofNEFacts[literal.text] || 8192;
+ typeofEQFacts.get(literal.text) || 64 :
+ typeofNEFacts.get(literal.text) || 8192;
return getTypeWithFacts(type, facts);
}
function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) {
@@ -28992,10 +32511,9 @@ var ts;
return assignableType;
}
}
- var targetType = type.flags & 16384 ? getApparentType(type) : type;
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
- isTypeAssignableTo(candidate, targetType) ? candidate :
+ isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
}
function narrowTypeByTypePredicate(type, callExpression, assumeTrue) {
@@ -29023,7 +32541,7 @@ var ts;
}
else {
var invokedExpression = ts.skipParentheses(callExpression.expression);
- if (invokedExpression.kind === 178 || invokedExpression.kind === 177) {
+ if (invokedExpression.kind === 179 || invokedExpression.kind === 178) {
var accessExpression = invokedExpression;
var possibleReference = ts.skipParentheses(accessExpression.expression);
if (isMatchingReference(reference, possibleReference)) {
@@ -29040,15 +32558,16 @@ var ts;
switch (expr.kind) {
case 70:
case 98:
- case 177:
+ case 96:
+ case 178:
return narrowTypeByTruthiness(type, expr, assumeTrue);
- case 179:
+ case 180:
return narrowTypeByTypePredicate(type, expr, assumeTrue);
- case 183:
+ case 184:
return narrowType(type, expr.expression, assumeTrue);
- case 192:
+ case 193:
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
- case 190:
+ case 191:
if (expr.operator === 50) {
return narrowType(type, expr.operand, !assumeTrue);
}
@@ -29072,15 +32591,12 @@ var ts;
return getTypeOfSymbol(symbol);
}
function getControlFlowContainer(node) {
- while (true) {
- node = node.parent;
- if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
- node.kind === 231 ||
- node.kind === 261 ||
- node.kind === 147) {
- return node;
- }
- }
+ return ts.findAncestor(node.parent, function (node) {
+ return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
+ node.kind === 233 ||
+ node.kind === 264 ||
+ node.kind === 148;
+ });
}
function isParameterAssigned(symbol) {
var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
@@ -29094,21 +32610,13 @@ var ts;
return symbol.isAssigned || false;
}
function hasParentWithAssignmentsMarked(node) {
- while (true) {
- node = node.parent;
- if (!node) {
- return false;
- }
- if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304) {
- return true;
- }
- }
+ return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304); });
}
function markParameterAssignments(node) {
if (node.kind === 70) {
if (ts.isAssignmentTarget(node)) {
var symbol = getResolvedSymbol(node);
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 144) {
+ if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145) {
symbol.isAssigned = true;
}
}
@@ -29120,6 +32628,14 @@ var ts;
function isConstVariable(symbol) {
return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
}
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
+ var annotationIncludesUndefined = strictNullChecks &&
+ declaration.kind === 145 &&
+ declaration.initializer &&
+ getFalsyFlags(declaredType) & 2048 &&
+ !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
+ return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -29128,16 +32644,14 @@ var ts;
if (symbol === argumentsSymbol) {
var container = ts.getContainingFunction(node);
if (languageVersion < 2) {
- if (container.kind === 185) {
+ if (container.kind === 186) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
}
else if (ts.hasModifier(container, 256)) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
}
}
- if (node.flags & 524288) {
- getNodeLinks(container).flags |= 8192;
- }
+ getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
@@ -29146,7 +32660,7 @@ var ts;
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
if (localOrExportSymbol.flags & 32) {
var declaration_1 = localOrExportSymbol.valueDeclaration;
- if (declaration_1.kind === 226
+ if (declaration_1.kind === 228
&& ts.nodeIsDecorated(declaration_1)) {
var container = ts.getContainingClass(node);
while (container !== undefined) {
@@ -29158,11 +32672,11 @@ var ts;
container = ts.getContainingClass(container);
}
}
- else if (declaration_1.kind === 197) {
+ else if (declaration_1.kind === 198) {
var container = ts.getThisContainer(node, false);
while (container !== undefined) {
if (container.parent === declaration_1) {
- if (container.kind === 147 && ts.hasModifier(container, 32)) {
+ if (container.kind === 148 && ts.hasModifier(container, 32)) {
getNodeLinks(declaration_1).flags |= 8388608;
getNodeLinks(node).flags |= 16777216;
}
@@ -29174,6 +32688,7 @@ var ts;
}
checkCollisionWithCapturedSuperVariable(node, node);
checkCollisionWithCapturedThisVariable(node, node);
+ checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
var type = getTypeOfSymbol(localOrExportSymbol);
var declaration = localOrExportSymbol.valueDeclaration;
@@ -29191,22 +32706,25 @@ var ts;
if (!(localOrExportSymbol.flags & 3) || assignmentKind === 1 || !declaration) {
return type;
}
- var isParameter = ts.getRootDeclaration(declaration).kind === 144;
+ var isParameter = ts.getRootDeclaration(declaration).kind === 145;
var declarationContainer = getControlFlowContainer(declaration);
var flowContainer = getControlFlowContainer(node);
var isOuterVariable = flowContainer !== declarationContainer;
- while (flowContainer !== declarationContainer && (flowContainer.kind === 184 ||
- flowContainer.kind === 185 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
+ while (flowContainer !== declarationContainer && (flowContainer.kind === 185 ||
+ flowContainer.kind === 186 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
(isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
flowContainer = getControlFlowContainer(flowContainer);
}
var assumeInitialized = isParameter || isOuterVariable ||
- type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0) ||
+ type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node)) ||
ts.isInAmbientContext(declaration);
- var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
+ var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
+ type === autoType || type === autoArrayType ? undefinedType :
+ includeFalsyTypes(type, 2048);
+ var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(declaration.name, ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));
error(node, ts.Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
}
@@ -29220,19 +32738,12 @@ var ts;
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isInsideFunction(node, threshold) {
- var current = node;
- while (current && current !== threshold) {
- if (ts.isFunctionLike(current)) {
- return true;
- }
- current = current.parent;
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
}
function checkNestedBlockScopedBinding(node, symbol) {
if (languageVersion >= 2 ||
(symbol.flags & (2 | 32)) === 0 ||
- symbol.valueDeclaration.parent.kind === 256) {
+ symbol.valueDeclaration.parent.kind === 259) {
return;
}
var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
@@ -29250,8 +32761,8 @@ var ts;
if (usedInFunction) {
getNodeLinks(current).flags |= 65536;
}
- if (container.kind === 211 &&
- ts.getAncestor(symbol.valueDeclaration, 224).parent === container &&
+ if (container.kind === 213 &&
+ ts.getAncestor(symbol.valueDeclaration, 226).parent === container &&
isAssignedInBodyOfForStatement(node, container)) {
getNodeLinks(symbol.valueDeclaration).flags |= 2097152;
}
@@ -29263,33 +32774,25 @@ var ts;
}
function isAssignedInBodyOfForStatement(node, container) {
var current = node;
- while (current.parent.kind === 183) {
+ while (current.parent.kind === 184) {
current = current.parent;
}
var isAssigned = false;
if (ts.isAssignmentTarget(current)) {
isAssigned = true;
}
- else if ((current.parent.kind === 190 || current.parent.kind === 191)) {
+ else if ((current.parent.kind === 191 || current.parent.kind === 192)) {
var expr = current.parent;
isAssigned = expr.operator === 42 || expr.operator === 43;
}
if (!isAssigned) {
return false;
}
- while (current !== container) {
- if (current === container.statement) {
- return true;
- }
- else {
- current = current.parent;
- }
- }
- return false;
+ return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
}
function captureLexicalThis(node, container) {
getNodeLinks(node).flags |= 2;
- if (container.kind === 147 || container.kind === 150) {
+ if (container.kind === 148 || container.kind === 151) {
var classNode = container.parent;
getNodeLinks(classNode).flags |= 4;
}
@@ -29320,42 +32823,45 @@ var ts;
var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
return baseConstructorType === nullWideningType;
}
+ function checkThisBeforeSuper(node, container, diagnosticMessage) {
+ var containingClassDecl = container.parent;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
+ if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
+ var superCall = getSuperCallInConstructor(container);
+ if (!superCall || superCall.end > node.pos) {
+ error(node, diagnosticMessage);
+ }
+ }
+ }
function checkThisExpression(node) {
var container = ts.getThisContainer(node, true);
var needToCaptureLexicalThis = false;
- if (container.kind === 150) {
- var containingClassDecl = container.parent;
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
- if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
- var superCall = getSuperCallInConstructor(container);
- if (!superCall || superCall.end > node.pos) {
- error(node, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
- }
- }
+ if (container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
}
- if (container.kind === 185) {
+ if (container.kind === 186) {
container = ts.getThisContainer(container, false);
needToCaptureLexicalThis = (languageVersion < 2);
}
switch (container.kind) {
- case 230:
+ case 232:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
break;
- case 229:
+ case 231:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
break;
- case 150:
+ case 151:
if (isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
}
break;
+ case 148:
case 147:
- case 146:
if (ts.getModifierFlags(container) & 32) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
}
break;
- case 142:
+ case 143:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
break;
}
@@ -29364,8 +32870,8 @@ var ts;
}
if (ts.isFunctionLike(container) &&
(!isInParameterInitializerBeforeContainingFunction(node) || ts.getThisParameter(container))) {
- if (container.kind === 184 &&
- ts.isInJavaScriptFile(container.parent) &&
+ if (container.kind === 185 &&
+ container.parent.kind === 193 &&
ts.getSpecialPropertyAssignmentKind(container.parent) === 3) {
var className = container.parent
.left
@@ -29384,7 +32890,7 @@ var ts;
if (ts.isClassLike(container.parent)) {
var symbol = getSymbolOfNode(container.parent);
var type = ts.hasModifier(container, 32) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
- return getFlowTypeOfReference(node, type, true, undefined);
+ return getFlowTypeOfReference(node, type);
}
if (ts.isInJavaScriptFile(node)) {
var type = getTypeForThisExpressionFromJSDoc(container);
@@ -29392,34 +32898,29 @@ var ts;
return type;
}
}
- if (compilerOptions.noImplicitThis) {
+ if (noImplicitThis) {
error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
}
return anyType;
}
function getTypeForThisExpressionFromJSDoc(node) {
var jsdocType = ts.getJSDocType(node);
- if (jsdocType && jsdocType.kind === 274) {
+ if (jsdocType && jsdocType.kind === 278) {
var jsDocFunctionType = jsdocType;
- if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 277) {
+ if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281) {
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
}
}
}
function isInConstructorArgumentInitializer(node, constructorDecl) {
- for (var n = node; n && n !== constructorDecl; n = n.parent) {
- if (n.kind === 144) {
- return true;
- }
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145; });
}
function checkSuperExpression(node) {
- var isCallExpression = node.parent.kind === 179 && node.parent.expression === node;
+ var isCallExpression = node.parent.kind === 180 && node.parent.expression === node;
var container = ts.getSuperContainer(node, true);
var needToCaptureLexicalThis = false;
if (!isCallExpression) {
- while (container && container.kind === 185) {
+ while (container && container.kind === 186) {
container = ts.getSuperContainer(container, true);
needToCaptureLexicalThis = languageVersion < 2;
}
@@ -29427,17 +32928,14 @@ var ts;
var canUseSuperExpression = isLegalUsageOfSuperExpression(container);
var nodeCheckFlag = 0;
if (!canUseSuperExpression) {
- var current = node;
- while (current && current !== container && current.kind !== 142) {
- current = current.parent;
- }
- if (current && current.kind === 142) {
+ var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143; });
+ if (current && current.kind === 143) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
}
else if (isCallExpression) {
error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
}
- else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 176)) {
+ else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177)) {
error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
}
else {
@@ -29445,6 +32943,9 @@ var ts;
}
return unknownType;
}
+ if (!isCallExpression && container.kind === 151) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
+ }
if ((ts.getModifierFlags(container) & 32) || isCallExpression) {
nodeCheckFlag = 512;
}
@@ -29452,7 +32953,7 @@ var ts;
nodeCheckFlag = 256;
}
getNodeLinks(node).flags |= nodeCheckFlag;
- if (container.kind === 149 && ts.getModifierFlags(container) & 256) {
+ if (container.kind === 150 && ts.getModifierFlags(container) & 256) {
if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
getNodeLinks(container).flags |= 4096;
}
@@ -29463,7 +32964,7 @@ var ts;
if (needToCaptureLexicalThis) {
captureLexicalThis(node.parent, container);
}
- if (container.parent.kind === 176) {
+ if (container.parent.kind === 177) {
if (languageVersion < 2) {
error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
return unknownType;
@@ -29481,7 +32982,7 @@ var ts;
}
return unknownType;
}
- if (container.kind === 150 && isInConstructorArgumentInitializer(node, container)) {
+ if (container.kind === 151 && isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
return unknownType;
}
@@ -29493,32 +32994,50 @@ var ts;
return false;
}
if (isCallExpression) {
- return container.kind === 150;
+ return container.kind === 151;
}
else {
- if (ts.isClassLike(container.parent) || container.parent.kind === 176) {
+ if (ts.isClassLike(container.parent) || container.parent.kind === 177) {
if (ts.getModifierFlags(container) & 32) {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
- container.kind === 152;
+ return container.kind === 150 ||
+ container.kind === 149 ||
+ container.kind === 152 ||
+ container.kind === 153;
}
else {
- return container.kind === 149 ||
- container.kind === 148 ||
- container.kind === 151 ||
+ return container.kind === 150 ||
+ container.kind === 149 ||
container.kind === 152 ||
+ container.kind === 153 ||
+ container.kind === 148 ||
container.kind === 147 ||
- container.kind === 146 ||
- container.kind === 150;
+ container.kind === 151;
}
}
}
return false;
}
}
+ function getContainingObjectLiteral(func) {
+ return (func.kind === 150 ||
+ func.kind === 152 ||
+ func.kind === 153) && func.parent.kind === 177 ? func.parent :
+ func.kind === 185 && func.parent.kind === 260 ? func.parent.parent :
+ undefined;
+ }
+ function getThisTypeArgument(type) {
+ return getObjectFlags(type) & 4 && type.target === globalThisType ? type.typeArguments[0] : undefined;
+ }
+ function getThisTypeFromContextualType(type) {
+ return mapType(type, function (t) {
+ return t.flags & 131072 ? ts.forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);
+ });
+ }
function getContextualThisParameterType(func) {
- if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 185) {
+ if (func.kind === 186) {
+ return undefined;
+ }
+ if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
var thisParameter = contextualSignature.thisParameter;
@@ -29527,29 +33046,55 @@ var ts;
}
}
}
+ if (noImplicitThis) {
+ var containingLiteral = getContainingObjectLiteral(func);
+ if (containingLiteral) {
+ var contextualType = getApparentTypeOfContextualType(containingLiteral);
+ var literal = containingLiteral;
+ var type = contextualType;
+ while (type) {
+ var thisType = getThisTypeFromContextualType(type);
+ if (thisType) {
+ return instantiateType(thisType, getContextualMapper(containingLiteral));
+ }
+ if (literal.parent.kind !== 260) {
+ break;
+ }
+ literal = literal.parent.parent;
+ type = getApparentTypeOfContextualType(literal);
+ }
+ return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral);
+ }
+ if (func.parent.kind === 193 && func.parent.operatorToken.kind === 57) {
+ var target = func.parent.left;
+ if (target.kind === 178 || target.kind === 179) {
+ return checkExpressionCached(target.expression);
+ }
+ }
+ }
return undefined;
}
function getContextuallyTypedParameterType(parameter) {
var func = parameter.parent;
if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var iife = ts.getImmediatelyInvokedFunctionExpression(func);
- if (iife) {
+ if (iife && iife.arguments) {
var indexOfParameter = ts.indexOf(func.parameters, parameter);
- if (iife.arguments && indexOfParameter < iife.arguments.length) {
- if (parameter.dotDotDotToken) {
- var restTypes = [];
- for (var i = indexOfParameter; i < iife.arguments.length; i++) {
- restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
- }
- return createArrayType(getUnionType(restTypes));
- }
- var links = getNodeLinks(iife);
- var cached = links.resolvedSignature;
- links.resolvedSignature = anySignature;
- var type = getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter]));
- links.resolvedSignature = cached;
- return type;
- }
+ if (parameter.dotDotDotToken) {
+ var restTypes = [];
+ for (var i = indexOfParameter; i < iife.arguments.length; i++) {
+ restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
+ }
+ return restTypes.length ? createArrayType(getUnionType(restTypes)) : undefined;
+ }
+ var links = getNodeLinks(iife);
+ var cached = links.resolvedSignature;
+ links.resolvedSignature = anySignature;
+ var type = indexOfParameter < iife.arguments.length ?
+ getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter])) :
+ parameter.initializer ? undefined : undefinedWideningType;
+ links.resolvedSignature = cached;
+ return type;
}
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -29574,7 +33119,7 @@ var ts;
if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.kind === 144) {
+ if (declaration.kind === 145) {
var type = getContextuallyTypedParameterType(declaration);
if (type) {
return type;
@@ -29585,11 +33130,11 @@ var ts;
}
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
- var name_21 = declaration.propertyName || declaration.name;
- if (ts.isVariableLike(parentDeclaration) &&
+ var name = declaration.propertyName || declaration.name;
+ if (parentDeclaration.kind !== 175 &&
parentDeclaration.type &&
- !ts.isBindingPattern(name_21)) {
- var text = ts.getTextOfPropertyName(name_21);
+ !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
if (text) {
return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
}
@@ -29600,33 +33145,34 @@ var ts;
}
function getContextualTypeForReturnExpression(node) {
var func = ts.getContainingFunction(node);
- if (ts.isAsyncFunctionLike(func)) {
- var contextualReturnType = getContextualReturnType(func);
- if (contextualReturnType) {
- return getPromisedType(contextualReturnType);
+ if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
+ return undefined;
}
- return undefined;
- }
- if (func && !func.asteriskToken) {
- return getContextualReturnType(func);
+ var contextualReturnType = getContextualReturnType(func);
+ return functionFlags & 2
+ ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType)
+ : contextualReturnType;
}
return undefined;
}
function getContextualTypeForYieldOperand(node) {
var func = ts.getContainingFunction(node);
if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
var contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return node.asteriskToken
? contextualReturnType
- : getElementTypeOfIterableIterator(contextualReturnType);
+ : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2) !== 0);
}
}
return undefined;
}
function isInParameterInitializerBeforeContainingFunction(node) {
while (node.parent && !ts.isFunctionLike(node.parent)) {
- if (node.parent.kind === 144 && node.parent.initializer === node) {
+ if (node.parent.kind === 145 && node.parent.initializer === node) {
return true;
}
node = node.parent;
@@ -29635,8 +33181,8 @@ var ts;
}
function getContextualReturnType(functionDecl) {
if (functionDecl.type ||
- functionDecl.kind === 150 ||
- functionDecl.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 152))) {
+ functionDecl.kind === 151 ||
+ functionDecl.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153))) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -29655,7 +33201,7 @@ var ts;
return undefined;
}
function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
- if (template.parent.kind === 181) {
+ if (template.parent.kind === 182) {
return getContextualTypeForArgument(template.parent, substitutionExpression);
}
return undefined;
@@ -29685,38 +33231,14 @@ var ts;
}
return undefined;
}
- function applyToContextualType(type, mapper) {
- if (!(type.flags & 65536)) {
- return mapper(type);
- }
- var types = type.types;
- var mappedType;
- var mappedTypes;
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var current = types_13[_i];
- var t = mapper(current);
- if (t) {
- if (!mappedType) {
- mappedType = t;
- }
- else if (!mappedTypes) {
- mappedTypes = [mappedType, t];
- }
- else {
- mappedTypes.push(t);
- }
- }
- }
- return mappedTypes ? getUnionType(mappedTypes) : mappedType;
- }
function getTypeOfPropertyOfContextualType(type, name) {
- return applyToContextualType(type, function (t) {
+ return mapType(type, function (t) {
var prop = t.flags & 229376 ? getPropertyOfType(t, name) : undefined;
return prop ? getTypeOfSymbol(prop) : undefined;
});
}
function getIndexTypeOfContextualType(type, kind) {
- return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
+ return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
}
function contextualTypeIsTupleLikeType(type) {
return !!(type.flags & 65536 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type));
@@ -29751,7 +33273,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1)
- || (languageVersion >= 2 ? getElementTypeOfIterable(type, undefined) : undefined);
+ || getIteratedTypeOrElementType(type, undefined, false, false, false);
}
return undefined;
}
@@ -29760,19 +33282,16 @@ var ts;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
}
function getContextualTypeForJsxAttribute(attribute) {
- var kind = attribute.kind;
- var jsxElement = attribute.parent;
- var attrsType = getJsxElementAttributesType(jsxElement);
- if (attribute.kind === 250) {
- if (!attrsType || isTypeAny(attrsType)) {
+ var attributesType = getContextualType(attribute.parent);
+ if (ts.isJsxAttribute(attribute)) {
+ if (!attributesType || isTypeAny(attributesType)) {
return undefined;
}
- return getTypeOfPropertyOfType(attrsType, attribute.name.text);
+ return getTypeOfPropertyOfType(attributesType, attribute.name.text);
}
- else if (attribute.kind === 251) {
- return attrsType;
+ else {
+ return attributesType;
}
- ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]");
}
function getApparentTypeOfContextualType(node) {
var type = getContextualType(node);
@@ -29787,45 +33306,52 @@ var ts;
}
var parent = node.parent;
switch (parent.kind) {
- case 223:
- case 144:
+ case 225:
+ case 145:
+ case 148:
case 147:
- case 146:
- case 174:
+ case 175:
return getContextualTypeForInitializerExpression(node);
- case 185:
- case 216:
+ case 186:
+ case 218:
return getContextualTypeForReturnExpression(node);
- case 195:
+ case 196:
return getContextualTypeForYieldOperand(parent);
- case 179:
case 180:
+ case 181:
return getContextualTypeForArgument(parent, node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return getTypeFromTypeNode(parent.type);
- case 192:
+ case 193:
return getContextualTypeForBinaryOperand(node);
- case 257:
- case 258:
+ case 260:
+ case 261:
return getContextualTypeForObjectLiteralElement(parent);
- case 175:
+ case 176:
return getContextualTypeForElementExpression(node);
- case 193:
+ case 194:
return getContextualTypeForConditionalOperand(node);
- case 202:
- ts.Debug.assert(parent.parent.kind === 194);
+ case 204:
+ ts.Debug.assert(parent.parent.kind === 195);
return getContextualTypeForSubstitutionExpression(parent.parent, node);
- case 183:
+ case 184:
return getContextualType(parent);
- case 252:
+ case 255:
return getContextualType(parent);
- case 250:
- case 251:
+ case 252:
+ case 254:
return getContextualTypeForJsxAttribute(parent);
+ case 250:
+ case 249:
+ return getAttributesTypeFromJsxOpeningLikeElement(parent);
}
return undefined;
}
+ function getContextualMapper(node) {
+ node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
+ return node ? node.contextualMapper : identityMapper;
+ }
function getNonGenericSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
@@ -29850,7 +33376,7 @@ var ts;
return sourceLength < targetParameterCount;
}
function isFunctionExpressionOrArrowFunction(node) {
- return node.kind === 184 || node.kind === 185;
+ return node.kind === 185 || node.kind === 186;
}
function getContextualSignatureForFunctionLikeDeclaration(node) {
return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node)
@@ -29863,7 +33389,7 @@ var ts;
getApparentTypeOfContextualType(node);
}
function getContextualSignature(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var type = getContextualTypeForFunctionLikeDeclaration(node);
if (!type) {
return undefined;
@@ -29873,8 +33399,8 @@ var ts;
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var current = types_14[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var current = types_17[_i];
var signature = getNonGenericSignature(current, node);
if (signature) {
if (!signatureList) {
@@ -29896,37 +33422,37 @@ var ts;
}
return result;
}
- function isInferentialContext(mapper) {
- return mapper && mapper.context;
- }
- function checkSpreadExpression(node, contextualMapper) {
- var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false);
+ function checkSpreadExpression(node, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 1536);
+ }
+ var arrayOrIterableType = checkExpression(node.expression, checkMode);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false, false);
}
function hasDefaultValue(node) {
- return (node.kind === 174 && !!node.initializer) ||
- (node.kind === 192 && node.operatorToken.kind === 57);
+ return (node.kind === 175 && !!node.initializer) ||
+ (node.kind === 193 && node.operatorToken.kind === 57);
}
- function checkArrayLiteral(node, contextualMapper) {
+ function checkArrayLiteral(node, checkMode) {
var elements = node.elements;
var hasSpreadElement = false;
var elementTypes = [];
var inDestructuringPattern = ts.isAssignmentTarget(node);
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var e = elements_1[_i];
- if (inDestructuringPattern && e.kind === 196) {
- var restArrayType = checkExpression(e.expression, contextualMapper);
+ if (inDestructuringPattern && e.kind === 197) {
+ var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1) ||
- (languageVersion >= 2 ? getElementTypeOfIterable(restArrayType, undefined) : undefined);
+ getIteratedTypeOrElementType(restArrayType, undefined, false, false, false);
if (restElementType) {
elementTypes.push(restElementType);
}
}
else {
- var type = checkExpressionForMutableLocation(e, contextualMapper);
+ var type = checkExpressionForMutableLocation(e, checkMode);
elementTypes.push(type);
}
- hasSpreadElement = hasSpreadElement || e.kind === 196;
+ hasSpreadElement = hasSpreadElement || e.kind === 197;
}
if (!hasSpreadElement) {
if (inDestructuringPattern && elementTypes.length) {
@@ -29937,7 +33463,7 @@ var ts;
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType && contextualTypeIsTupleLikeType(contextualType)) {
var pattern = contextualType.pattern;
- if (pattern && (pattern.kind === 173 || pattern.kind === 175)) {
+ if (pattern && (pattern.kind === 174 || pattern.kind === 176)) {
var patternElements = pattern.elements;
for (var i = elementTypes.length; i < patternElements.length; i++) {
var patternElement = patternElements[i];
@@ -29945,7 +33471,7 @@ var ts;
elementTypes.push(contextualType.typeArguments[i]);
}
else {
- if (patternElement.kind !== 198) {
+ if (patternElement.kind !== 199) {
error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
elementTypes.push(unknownType);
@@ -29962,7 +33488,7 @@ var ts;
strictNullChecks ? neverType : undefinedWideningType);
}
function isNumericName(name) {
- return name.kind === 142 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
+ return name.kind === 143 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
@@ -29999,7 +33525,7 @@ var ts;
var unionType = propTypes.length ? getUnionType(propTypes, true) : undefinedType;
return createIndexInfo(unionType, false);
}
- function checkObjectLiteral(node, contextualMapper) {
+ function checkObjectLiteral(node, checkMode) {
var inDestructuringPattern = ts.isAssignmentTarget(node);
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
var propertiesTable = ts.createMap();
@@ -30008,7 +33534,8 @@ var ts;
var propagatedFlags = 0;
var contextualType = getApparentTypeOfContextualType(node);
var contextualTypeHasPattern = contextualType && contextualType.pattern &&
- (contextualType.pattern.kind === 172 || contextualType.pattern.kind === 176);
+ (contextualType.pattern.kind === 173 || contextualType.pattern.kind === 177);
+ var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node);
var typeFlags = 0;
var patternWithComputedProperties = false;
var hasComputedStringProperty = false;
@@ -30017,27 +33544,27 @@ var ts;
for (var i = 0; i < node.properties.length; i++) {
var memberDecl = node.properties[i];
var member = memberDecl.symbol;
- if (memberDecl.kind === 257 ||
- memberDecl.kind === 258 ||
+ if (memberDecl.kind === 260 ||
+ memberDecl.kind === 261 ||
ts.isObjectLiteralMethod(memberDecl)) {
var type = void 0;
- if (memberDecl.kind === 257) {
- type = checkPropertyAssignment(memberDecl, contextualMapper);
+ if (memberDecl.kind === 260) {
+ type = checkPropertyAssignment(memberDecl, checkMode);
}
- else if (memberDecl.kind === 149) {
- type = checkObjectLiteralMethod(memberDecl, contextualMapper);
+ else if (memberDecl.kind === 150) {
+ type = checkObjectLiteralMethod(memberDecl, checkMode);
}
else {
- ts.Debug.assert(memberDecl.kind === 258);
- type = checkExpressionForMutableLocation(memberDecl.name, contextualMapper);
+ ts.Debug.assert(memberDecl.kind === 261);
+ type = checkExpressionForMutableLocation(memberDecl.name, checkMode);
}
typeFlags |= type.flags;
- var prop = createSymbol(4 | 67108864 | member.flags, member.name);
+ var prop = createSymbol(4 | member.flags, member.name);
if (inDestructuringPattern) {
- var isOptional = (memberDecl.kind === 257 && hasDefaultValue(memberDecl.initializer)) ||
- (memberDecl.kind === 258 && memberDecl.objectAssignmentInitializer);
+ var isOptional = (memberDecl.kind === 260 && hasDefaultValue(memberDecl.initializer)) ||
+ (memberDecl.kind === 261 && memberDecl.objectAssignmentInitializer);
if (isOptional) {
- prop.flags |= 536870912;
+ prop.flags |= 67108864;
}
if (ts.hasDynamicName(memberDecl)) {
patternWithComputedProperties = true;
@@ -30046,9 +33573,9 @@ var ts;
else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512)) {
var impliedProp = getPropertyOfType(contextualType, member.name);
if (impliedProp) {
- prop.flags |= impliedProp.flags & 536870912;
+ prop.flags |= impliedProp.flags & 67108864;
}
- else if (!compilerOptions.suppressExcessPropertyErrors) {
+ else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0)) {
error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
}
}
@@ -30061,9 +33588,12 @@ var ts;
prop.target = member;
member = prop;
}
- else if (memberDecl.kind === 259) {
+ else if (memberDecl.kind === 262) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(memberDecl, 2);
+ }
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
propertiesArray = [];
propertiesTable = ts.createMap();
hasComputedStringProperty = false;
@@ -30071,17 +33601,17 @@ var ts;
typeFlags = 0;
}
var type = checkExpression(memberDecl.expression);
- if (!(type.flags & (32768 | 1))) {
+ if (!isValidSpreadType(type)) {
error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
return unknownType;
}
- spread = getSpreadType(spread, type, false);
+ spread = getSpreadType(spread, type);
offset = i + 1;
continue;
}
else {
- ts.Debug.assert(memberDecl.kind === 151 || memberDecl.kind === 152);
- checkAccessorDeclaration(memberDecl);
+ ts.Debug.assert(memberDecl.kind === 152 || memberDecl.kind === 153);
+ checkNodeDeferred(memberDecl);
}
if (ts.hasDynamicName(memberDecl)) {
if (isNumericName(memberDecl.name)) {
@@ -30092,34 +33622,36 @@ var ts;
}
}
else {
- propertiesTable[member.name] = member;
+ propertiesTable.set(member.name, member);
}
propertiesArray.push(member);
}
if (contextualTypeHasPattern) {
for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!propertiesTable[prop.name]) {
- if (!(prop.flags & 536870912)) {
+ if (!propertiesTable.get(prop.name)) {
+ if (!(prop.flags & 67108864)) {
error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
- propertiesTable[prop.name] = prop;
+ propertiesTable.set(prop.name, prop);
propertiesArray.push(prop);
}
}
}
if (spread !== emptyObjectType) {
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), true);
+ spread = getSpreadType(spread, createObjectLiteralType());
+ }
+ if (spread.flags & 32768) {
+ spread.flags |= propagatedFlags;
+ spread.symbol = node.symbol;
}
- spread.flags |= propagatedFlags;
- spread.symbol = node.symbol;
return spread;
}
return createObjectLiteralType();
function createObjectLiteralType() {
- var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
- var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
+ var stringIndexInfo = isJSObjectLiteral ? jsObjectLiteralIndexInfo : hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0) : undefined;
+ var numberIndexInfo = hasComputedNumberProperty && !isJSObjectLiteral ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1) : undefined;
var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
result.flags |= 4194304 | freshObjectLiteralFlag | (typeFlags & 14680064);
@@ -30136,9 +33668,14 @@ var ts;
return result;
}
}
+ function isValidSpreadType(type) {
+ return !!(type.flags & (1 | 4096 | 2048 | 16777216) ||
+ type.flags & 32768 && !isGenericMappedType(type) ||
+ type.flags & 196608 && !ts.forEach(type.types, function (t) { return !isValidSpreadType(t); }));
+ }
function checkJsxSelfClosingElement(node) {
checkJsxOpeningLikeElement(node);
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function checkJsxElement(node) {
checkJsxOpeningLikeElement(node.openingElement);
@@ -30151,85 +33688,105 @@ var ts;
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
var child = _a[_i];
switch (child.kind) {
- case 252:
+ case 255:
checkJsxExpression(child);
break;
- case 246:
+ case 248:
checkJsxElement(child);
break;
- case 247:
+ case 249:
checkJsxSelfClosingElement(child);
break;
}
}
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function isUnhyphenatedJsxName(name) {
return name.indexOf("-") < 0;
}
function isJsxIntrinsicIdentifier(tagName) {
- if (tagName.kind === 177 || tagName.kind === 98) {
+ if (tagName.kind === 178 || tagName.kind === 98) {
return false;
}
else {
return ts.isIntrinsicJsxName(tagName.text);
}
}
- function checkJsxAttribute(node, elementAttributesType, nameTable) {
- var correspondingPropType = undefined;
- if (elementAttributesType === emptyObjectType && isUnhyphenatedJsxName(node.name.text)) {
- error(node.parent, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
- }
- else if (elementAttributesType && !isTypeAny(elementAttributesType)) {
- var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text);
- correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol);
- if (isUnhyphenatedJsxName(node.name.text)) {
- var attributeType = getTypeOfPropertyOfType(elementAttributesType, ts.getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0);
- if (attributeType) {
- correspondingPropType = attributeType;
+ function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, filter, checkMode) {
+ var attributes = openingLikeElement.attributes;
+ var attributesTable = ts.createMap();
+ var spread = emptyObjectType;
+ var attributesArray = [];
+ for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
+ var attributeDecl = _a[_i];
+ var member = attributeDecl.symbol;
+ if (ts.isJsxAttribute(attributeDecl)) {
+ var exprType = attributeDecl.initializer ?
+ checkExpression(attributeDecl.initializer, checkMode) :
+ trueType;
+ var attributeSymbol = createSymbol(4 | 134217728 | member.flags, member.name);
+ attributeSymbol.declarations = member.declarations;
+ attributeSymbol.parent = member.parent;
+ if (member.valueDeclaration) {
+ attributeSymbol.valueDeclaration = member.valueDeclaration;
}
- else {
- if (!correspondingPropType) {
- error(node.name, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.name.text, typeToString(elementAttributesType));
- return unknownType;
- }
+ attributeSymbol.type = exprType;
+ attributeSymbol.target = member;
+ attributesTable.set(attributeSymbol.name, attributeSymbol);
+ attributesArray.push(attributeSymbol);
+ }
+ else {
+ ts.Debug.assert(attributeDecl.kind === 254);
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ var exprType = checkExpression(attributeDecl.expression);
+ if (!isValidSpreadType(exprType)) {
+ error(attributeDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+ return anyType;
+ }
+ if (isTypeAny(exprType)) {
+ return anyType;
}
+ spread = getSpreadType(spread, exprType);
}
}
- var exprType;
- if (node.initializer) {
- exprType = checkExpression(node.initializer);
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- else {
- exprType = booleanType;
+ attributesTable = ts.createMap();
+ if (attributesArray) {
+ ts.forEach(attributesArray, function (attr) {
+ if (!filter || filter(attr)) {
+ attributesTable.set(attr.name, attr);
+ }
+ });
}
- if (correspondingPropType) {
- checkTypeAssignableTo(exprType, correspondingPropType, node);
+ return createJsxAttributesType(attributes.symbol, attributesTable);
+ function createJsxAttributesType(symbol, attributesTable) {
+ var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, undefined, undefined);
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576;
+ result.flags |= 33554432 | 4194304 | freshObjectLiteralFlag;
+ result.objectFlags |= 128;
+ return result;
}
- nameTable[node.name.text] = true;
- return exprType;
}
- function checkJsxSpreadAttribute(node, elementAttributesType, nameTable) {
- var type = checkExpression(node.expression);
- var props = getPropertiesOfType(type);
- for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
- var prop = props_2[_i];
- if (!nameTable[prop.name]) {
- var targetPropSym = getPropertyOfType(elementAttributesType, prop.name);
- if (targetPropSym) {
- var msg = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property, prop.name);
- checkTypeAssignableTo(getTypeOfSymbol(prop), getTypeOfSymbol(targetPropSym), node, undefined, msg);
- }
- nameTable[prop.name] = true;
- }
- }
- return type;
+ function checkJsxAttributes(node, checkMode) {
+ return createJsxAttributesTypeFromAttributesProperty(node.parent, undefined, checkMode);
}
function getJsxType(name) {
- if (jsxTypes[name] === undefined) {
- return jsxTypes[name] = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType;
+ var jsxType = jsxTypes.get(name);
+ if (jsxType === undefined) {
+ jsxTypes.set(name, jsxType = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType);
}
- return jsxTypes[name];
+ return jsxType;
}
function getIntrinsicTagSymbol(node) {
var links = getNodeLinks(node);
@@ -30250,7 +33807,7 @@ var ts;
return links.resolvedSymbol = unknownSymbol;
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
}
return links.resolvedSymbol = unknownSymbol;
@@ -30294,23 +33851,86 @@ var ts;
return undefined;
}
}
- function getResolvedJsxType(node, elemType, elemClassType) {
- if (!elemType) {
- elemType = checkExpression(node.tagName);
+ function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var callSignature = getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, undefined);
+ if (callSignature !== unknownSignature) {
+ var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
+ var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ paramType = intersectTypes(intrinsicAttributes, paramType);
+ }
+ return paramType;
+ }
+ }
+ }
+ }
+ return undefined;
+ }
+ function tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ var candidatesOutArray = [];
+ getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray);
+ var result = void 0;
+ var allMatchingAttributesType = void 0;
+ for (var _i = 0, candidatesOutArray_1 = candidatesOutArray; _i < candidatesOutArray_1.length; _i++) {
+ var candidate = candidatesOutArray_1[_i];
+ var callReturnType = getReturnTypeOfSignature(candidate);
+ var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var shouldBeCandidate = true;
+ for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
+ var attribute = _b[_a];
+ if (ts.isJsxAttribute(attribute) &&
+ isUnhyphenatedJsxName(attribute.name.text) &&
+ !getPropertyOfType(paramType, attribute.name.text)) {
+ shouldBeCandidate = false;
+ break;
+ }
+ }
+ if (shouldBeCandidate) {
+ result = intersectTypes(result, paramType);
+ }
+ allMatchingAttributesType = intersectTypes(allMatchingAttributesType, paramType);
+ }
+ }
+ if (!result) {
+ result = allMatchingAttributesType;
+ }
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ result = intersectTypes(intrinsicAttributes, result);
+ }
+ return result;
+ }
+ }
+ return undefined;
+ }
+ function resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, elementType, elementClassType) {
+ if (!elementType) {
+ elementType = checkExpression(openingLikeElement.tagName);
}
- if (elemType.flags & 65536) {
- var types = elemType.types;
- return getUnionType(ts.map(types, function (type) {
- return getResolvedJsxType(node, type, elemClassType);
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ return getUnionType(types.map(function (type) {
+ return resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, type, elementClassType);
}), true);
}
- if (elemType.flags & 2) {
+ if (elementType.flags & 2) {
return anyType;
}
- else if (elemType.flags & 32) {
+ else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elemType.text;
+ var stringLiteralTypeName = elementType.text;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -30319,28 +33939,19 @@ var ts;
if (indexSignatureType) {
return indexSignatureType;
}
- error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
+ error(openingLikeElement, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
return anyType;
}
- var elemInstanceType = getJsxElementInstanceType(node, elemType);
- if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
- if (jsxElementType) {
- var callSignatures = elemType && getSignaturesOfType(elemType, 0);
- var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
- var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
- var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
- if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
- var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
- if (intrinsicAttributes !== unknownType) {
- paramType = intersectTypes(intrinsicAttributes, paramType);
- }
- return paramType;
- }
- }
+ var elemInstanceType = getJsxElementInstanceType(openingLikeElement, elementType);
+ var statelessAttributesType = shouldIncludeAllStatelessAttributesType ?
+ tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) :
+ defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType);
+ if (statelessAttributesType) {
+ return statelessAttributesType;
}
- if (elemClassType) {
- checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
+ if (elementClassType) {
+ checkTypeRelatedTo(elemInstanceType, elementClassType, assignableRelation, openingLikeElement, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
}
if (isTypeAny(elemInstanceType)) {
return elemInstanceType;
@@ -30360,10 +33971,6 @@ var ts;
else if (isTypeAny(attributesType) || (attributesType === unknownType)) {
return attributesType;
}
- else if (attributesType.flags & 65536) {
- error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
- return anyType;
- }
else {
var apparentAttributesType = attributesType;
var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes);
@@ -30386,38 +33993,72 @@ var ts;
}
}
}
- function getJsxElementAttributesType(node) {
+ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
+ ts.Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
var links = getNodeLinks(node);
- if (!links.resolvedJsxType) {
- if (isJsxIntrinsicIdentifier(node.tagName)) {
- var symbol = getIntrinsicTagSymbol(node);
- if (links.jsxFlags & 1) {
- return links.resolvedJsxType = getTypeOfSymbol(symbol);
- }
- else if (links.jsxFlags & 2) {
- return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0).type;
- }
- else {
- return links.resolvedJsxType = unknownType;
- }
+ if (!links.resolvedJsxElementAttributesType) {
+ var symbol = getIntrinsicTagSymbol(node);
+ if (links.jsxFlags & 1) {
+ return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+ }
+ else if (links.jsxFlags & 2) {
+ return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, 0).type;
}
else {
- var elemClassType = getJsxGlobalElementClassType();
- return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType);
+ return links.resolvedJsxElementAttributesType = unknownType;
}
}
- return links.resolvedJsxType;
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType) {
+ var links = getNodeLinks(node);
+ if (!links.resolvedJsxElementAttributesType) {
+ var elemClassType = getJsxGlobalElementClassType();
+ return links.resolvedJsxElementAttributesType = resolveCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType, undefined, elemClassType);
+ }
+ return links.resolvedJsxElementAttributesType;
+ }
+ function getAllAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, true);
+ }
+ }
+ function getAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, false);
+ }
}
function getJsxAttributePropertySymbol(attrib) {
- var attributesType = getJsxElementAttributesType(attrib.parent);
+ var attributesType = getAttributesTypeFromJsxOpeningLikeElement(attrib.parent.parent);
var prop = getPropertyOfType(attributesType, attrib.name.text);
return prop || unknownSymbol;
}
function getJsxGlobalElementClassType() {
- if (!jsxElementClassType) {
- jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ if (!deferredJsxElementClassType) {
+ deferredJsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ }
+ return deferredJsxElementClassType;
+ }
+ function getJsxGlobalElementType() {
+ if (!deferredJsxElementType) {
+ deferredJsxElementType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.Element);
+ }
+ return deferredJsxElementType;
+ }
+ function getJsxGlobalStatelessElementType() {
+ if (!deferredJsxStatelessElementType) {
+ var jsxElementType = getJsxGlobalElementType();
+ if (jsxElementType) {
+ deferredJsxStatelessElementType = getUnionType([jsxElementType, nullType]);
+ }
}
- return jsxElementClassType;
+ return deferredJsxStatelessElementType;
}
function getJsxIntrinsicTagNames() {
var intrinsics = getJsxType(JsxNames.IntrinsicElements);
@@ -30427,8 +34068,8 @@ var ts;
if ((compilerOptions.jsx || 0) === 0) {
error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
}
- if (jsxElementType === undefined) {
- if (compilerOptions.noImplicitAny) {
+ if (getJsxGlobalElementType() === undefined) {
+ if (noImplicitAny) {
error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
}
}
@@ -30445,61 +34086,83 @@ var ts;
markAliasSymbolAsReferenced(reactSym);
}
}
- var targetAttributesType = getJsxElementAttributesType(node);
- var nameTable = ts.createMap();
- var sawSpreadedAny = false;
- for (var i = node.attributes.length - 1; i >= 0; i--) {
- if (node.attributes[i].kind === 250) {
- checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable);
- }
- else {
- ts.Debug.assert(node.attributes[i].kind === 251);
- var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable);
- if (isTypeAny(spreadType)) {
- sawSpreadedAny = true;
- }
- }
+ checkJsxAttributesAssignableToTagNameAttributes(node);
+ }
+ function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
+ var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
+ getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
+ getCustomJsxElementAttributesType(openingLikeElement, false);
+ var sourceAttributesType = createJsxAttributesTypeFromAttributesProperty(openingLikeElement, function (attribute) {
+ return isUnhyphenatedJsxName(attribute.name) || !!(getPropertyOfType(targetAttributesType, attribute.name));
+ });
+ if (targetAttributesType === emptyObjectType && (isTypeAny(sourceAttributesType) || sourceAttributesType.properties.length > 0)) {
+ error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
- if (targetAttributesType && !sawSpreadedAny) {
- var targetProperties = getPropertiesOfType(targetAttributesType);
- for (var i = 0; i < targetProperties.length; i++) {
- if (!(targetProperties[i].flags & 536870912) &&
- !nameTable[targetProperties[i].name]) {
- error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType));
- }
- }
+ else {
+ checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
}
}
- function checkJsxExpression(node) {
+ function checkJsxExpression(node, checkMode) {
if (node.expression) {
- return checkExpression(node.expression);
+ var type = checkExpression(node.expression, checkMode);
+ if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
+ error(node, ts.Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
+ }
+ return type;
}
else {
return unknownType;
}
}
function getDeclarationKindFromSymbol(s) {
- return s.valueDeclaration ? s.valueDeclaration.kind : 147;
+ return s.valueDeclaration ? s.valueDeclaration.kind : 148;
}
function getDeclarationModifierFlagsFromSymbol(s) {
- return s.valueDeclaration ? ts.getCombinedModifierFlags(s.valueDeclaration) : s.flags & 134217728 ? 4 | 32 : 0;
+ if (s.valueDeclaration) {
+ var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+ return s.parent && s.parent.flags & 32 ? flags : flags & ~28;
+ }
+ if (getCheckFlags(s) & 6) {
+ var checkFlags = s.checkFlags;
+ var accessModifier = checkFlags & 256 ? 8 :
+ checkFlags & 64 ? 4 :
+ 16;
+ var staticModifier = checkFlags & 512 ? 32 : 0;
+ return accessModifier | staticModifier;
+ }
+ if (s.flags & 16777216) {
+ return 4 | 32;
+ }
+ return 0;
}
function getDeclarationNodeFlagsFromSymbol(s) {
return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : 0;
}
- function checkClassPropertyAccess(node, left, type, prop) {
+ function isMethodLike(symbol) {
+ return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ }
+ function checkPropertyAccessibility(node, left, type, prop) {
var flags = getDeclarationModifierFlagsFromSymbol(prop);
- var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop));
- var errorNode = node.kind === 177 || node.kind === 223 ?
+ var errorNode = node.kind === 178 || node.kind === 225 ?
node.name :
node.right;
+ if (getCheckFlags(prop) & 256) {
+ error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
+ return false;
+ }
if (left.kind === 96) {
- if (languageVersion < 2 && getDeclarationKindFromSymbol(prop) !== 149) {
- error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
- return false;
+ if (languageVersion < 2) {
+ var hasNonMethodDeclaration = forEachProperty(prop, function (p) {
+ var propKind = getDeclarationKindFromSymbol(p);
+ return propKind !== 150 && propKind !== 149;
+ });
+ if (hasNonMethodDeclaration) {
+ error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+ return false;
+ }
}
if (flags & 128) {
- error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
}
@@ -30509,7 +34172,7 @@ var ts;
if (flags & 8) {
var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
- error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
return true;
@@ -30519,10 +34182,10 @@ var ts;
}
var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
- return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined;
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
});
if (!enclosingClass) {
- error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
return false;
}
if (flags & 32) {
@@ -30538,16 +34201,17 @@ var ts;
return true;
}
function checkNonNullExpression(node) {
- var type = checkExpression(node);
- if (strictNullChecks) {
- var kind = getFalsyFlags(type) & 6144;
- if (kind) {
- error(node, kind & 2048 ? kind & 4096 ?
- ts.Diagnostics.Object_is_possibly_null_or_undefined :
- ts.Diagnostics.Object_is_possibly_undefined :
- ts.Diagnostics.Object_is_possibly_null);
- }
- return getNonNullableType(type);
+ return checkNonNullType(checkExpression(node), node);
+ }
+ function checkNonNullType(type, errorNode) {
+ var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 6144;
+ if (kind) {
+ error(errorNode, kind & 2048 ? kind & 4096 ?
+ ts.Diagnostics.Object_is_possibly_null_or_undefined :
+ ts.Diagnostics.Object_is_possibly_undefined :
+ ts.Diagnostics.Object_is_possibly_null);
+ var t = getNonNullableType(type);
+ return t.flags & (6144 | 8192) ? unknownType : t;
}
return type;
}
@@ -30576,7 +34240,7 @@ var ts;
noUnusedIdentifiers &&
(prop.flags & 106500) &&
prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (prop.flags & 16777216) {
+ if (getCheckFlags(prop) & 1) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
@@ -30584,6 +34248,15 @@ var ts;
}
}
}
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 148 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
var type = checkNonNullExpression(left);
if (isTypeAny(type) || type === silentNeverType) {
@@ -30595,16 +34268,30 @@ var ts;
}
var prop = getPropertyOfType(apparentType, right.text);
if (!prop) {
+ var stringIndexType = getIndexTypeOfType(apparentType, 0);
+ if (stringIndexType) {
+ return stringIndexType;
+ }
if (right.text && !checkAndReportErrorForExtendingInterface(node)) {
reportNonexistentProperty(right, type.flags & 16384 && type.isThisType ? apparentType : type);
}
return unknownType;
}
+ if (prop.valueDeclaration) {
+ if (isInPropertyInitializer(node) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text);
+ }
+ if (prop.valueDeclaration.kind === 228 &&
+ node.parent && node.parent.kind !== 158 &&
+ !ts.isInAmbientContext(prop.valueDeclaration) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text);
+ }
+ }
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
- if (prop.parent && prop.parent.flags & 32) {
- checkClassPropertyAccess(node, left, apparentType, prop);
- }
+ checkPropertyAccessibility(node, left, apparentType, prop);
var propType = getTypeOfSymbol(prop);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -30613,30 +34300,30 @@ var ts;
return unknownType;
}
}
- if (node.kind !== 177 || assignmentKind === 1 ||
+ if (node.kind !== 178 || assignmentKind === 1 ||
!(prop.flags & (3 | 4 | 98304)) &&
!(prop.flags & 8192 && propType.flags & 65536)) {
return propType;
}
- var flowType = getFlowTypeOfReference(node, propType, true, undefined);
+ var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isValidPropertyAccess(node, propertyName) {
- var left = node.kind === 177
+ var left = node.kind === 178
? node.expression
: node.left;
var type = checkExpression(left);
if (type !== unknownType && !isTypeAny(type)) {
var prop = getPropertyOfType(getWidenedType(type), propertyName);
- if (prop && prop.parent && prop.parent.flags & 32) {
- return checkClassPropertyAccess(node, left, type, prop);
+ if (prop) {
+ return checkPropertyAccessibility(node, left, type, prop);
}
}
return true;
}
function getForInVariableSymbol(node) {
var initializer = node.initializer;
- if (initializer.kind === 224) {
+ if (initializer.kind === 226) {
var variable = initializer.declarations[0];
if (variable && !ts.isBindingPattern(variable.name)) {
return getSymbolOfNode(variable);
@@ -30658,7 +34345,7 @@ var ts;
var child = expr;
var node = expr.parent;
while (node) {
- if (node.kind === 212 &&
+ if (node.kind === 214 &&
child === node.statement &&
getForInVariableSymbol(node) === symbol &&
hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -30676,7 +34363,7 @@ var ts;
var indexExpression = node.argumentExpression;
if (!indexExpression) {
var sourceFile = ts.getSourceFileOfNode(node);
- if (node.parent.kind === 180 && node.parent.expression === node) {
+ if (node.parent.kind === 181 && node.parent.expression === node) {
var start = ts.skipTrivia(sourceFile.text, node.expression.end);
var end = node.end;
grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
@@ -30696,7 +34383,7 @@ var ts;
error(indexExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
return unknownType;
}
- return getIndexedAccessType(objectType, indexType, node);
+ return checkIndexedAccessIndexType(getIndexedAccessType(objectType, indexType, node), node);
}
function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
if (expressionType === unknownType) {
@@ -30716,7 +34403,7 @@ var ts;
if (!leftHandSideSymbol) {
return false;
}
- var globalESSymbol = getGlobalESSymbolConstructorSymbol();
+ var globalESSymbol = getGlobalESSymbolConstructorSymbol(true);
if (!globalESSymbol) {
return false;
}
@@ -30729,10 +34416,10 @@ var ts;
return true;
}
function resolveUntypedCall(node) {
- if (node.kind === 181) {
+ if (node.kind === 182) {
checkExpression(node.template);
}
- else if (node.kind !== 145) {
+ else if (node.kind !== 146) {
ts.forEach(node.arguments, function (argument) {
checkExpression(argument);
});
@@ -30751,22 +34438,22 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
- var signature = signatures_2[_i];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
- var parent_8 = signature.declaration && signature.declaration.parent;
+ var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
- if (lastParent && parent_8 === lastParent) {
+ if (lastParent && parent === lastParent) {
index++;
}
else {
- lastParent = parent_8;
+ lastParent = parent;
index = cutoffIndex;
}
}
else {
index = cutoffIndex = result.length;
- lastParent = parent_8;
+ lastParent = parent;
}
lastSymbol = symbol;
if (signature.hasLiteralTypes) {
@@ -30783,7 +34470,7 @@ var ts;
function getSpreadArgumentIndex(args) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
- if (arg && arg.kind === 196) {
+ if (arg && arg.kind === 197) {
return i;
}
}
@@ -30796,11 +34483,14 @@ var ts;
var callIsIncomplete;
var isDecorator;
var spreadArgIndex = -1;
- if (node.kind === 181) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return true;
+ }
+ if (node.kind === 182) {
var tagExpression = node;
argCount = args.length;
typeArguments = undefined;
- if (tagExpression.template.kind === 194) {
+ if (tagExpression.template.kind === 195) {
var templateExpression = tagExpression.template;
var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans);
ts.Debug.assert(lastSpan !== undefined);
@@ -30812,7 +34502,7 @@ var ts;
callIsIncomplete = !!templateLiteral.isUnterminated;
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
isDecorator = true;
typeArguments = undefined;
argCount = getEffectiveArgumentCount(node, undefined, signature);
@@ -30820,7 +34510,7 @@ var ts;
else {
var callExpression = node;
if (!callExpression.arguments) {
- ts.Debug.assert(callExpression.kind === 180);
+ ts.Debug.assert(callExpression.kind === 181);
return signature.minArgumentCount === 0;
}
argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;
@@ -30828,8 +34518,10 @@ var ts;
typeArguments = callExpression.typeArguments;
spreadArgIndex = getSpreadArgumentIndex(args);
}
+ var numTypeParameters = ts.length(signature.typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);
var hasRightNumberOfTypeArgs = !typeArguments ||
- (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
+ (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters);
if (!hasRightNumberOfTypeArgs) {
return false;
}
@@ -30853,9 +34545,9 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true);
+ var context = createInferenceContext(signature, true, false);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypes(context, instantiateType(source, contextualMapper), target);
+ inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
});
return getSignatureInstantiation(signature, getInferredTypes(context));
}
@@ -30874,19 +34566,19 @@ var ts;
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypes(context, thisArgumentType, thisType);
+ inferTypesWithContext(context, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypes(context, argType, paramType);
+ inferTypesWithContext(context, argType, paramType);
}
}
if (excludeArgument) {
@@ -30894,7 +34586,7 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
}
}
}
@@ -30904,7 +34596,7 @@ var ts;
var typeParameters = signature.typeParameters;
var typeArgumentsAreAssignable = true;
var mapper;
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < typeArgumentNodes.length; i++) {
if (typeArgumentsAreAssignable) {
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
@@ -30924,9 +34616,29 @@ var ts;
}
return typeArgumentsAreAssignable;
}
+ function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation) {
+ var callIsIncomplete = node.attributes.end === node.end;
+ if (callIsIncomplete) {
+ return true;
+ }
+ var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;
+ var paramType = getTypeAtPosition(signature, 0);
+ var attributesType = checkExpressionWithContextualType(node.attributes, paramType, undefined);
+ var argProperties = getPropertiesOfType(attributesType);
+ for (var _i = 0, argProperties_1 = argProperties; _i < argProperties_1.length; _i++) {
+ var arg = argProperties_1[_i];
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
+ return false;
+ }
+ }
+ return checkTypeRelatedTo(attributesType, paramType, relation, undefined, headMessage);
+ }
function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation);
+ }
var thisType = getThisTypeOfSignature(signature);
- if (thisType && thisType !== voidType && node.kind !== 180) {
+ if (thisType && thisType !== voidType && node.kind !== 181) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
var errorNode = reportErrors ? (thisArgumentNode || node) : undefined;
@@ -30939,7 +34651,7 @@ var ts;
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
- if (arg === undefined || arg.kind !== 198) {
+ if (arg === undefined || arg.kind !== 199) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
@@ -30954,51 +34666,54 @@ var ts;
return true;
}
function getThisArgumentOfCall(node) {
- if (node.kind === 179) {
+ if (node.kind === 180) {
var callee = node.expression;
- if (callee.kind === 177) {
+ if (callee.kind === 178) {
return callee.expression;
}
- else if (callee.kind === 178) {
+ else if (callee.kind === 179) {
return callee.expression;
}
}
}
function getEffectiveCallArguments(node) {
var args;
- if (node.kind === 181) {
+ if (node.kind === 182) {
var template = node.template;
args = [undefined];
- if (template.kind === 194) {
+ if (template.kind === 195) {
ts.forEach(template.templateSpans, function (span) {
args.push(span.expression);
});
}
}
- else if (node.kind === 145) {
+ else if (node.kind === 146) {
return undefined;
}
+ else if (ts.isJsxOpeningLikeElement(node)) {
+ args = node.attributes.properties.length > 0 ? [node.attributes] : emptyArray;
+ }
else {
args = node.arguments || emptyArray;
}
return args;
}
function getEffectiveArgumentCount(node, args, signature) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return 1;
- case 147:
+ case 148:
return 2;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
if (languageVersion === 0) {
return 2;
}
return signature.parameters.length >= 3 ? 3 : 2;
- case 144:
+ case 145:
return 3;
}
}
@@ -31007,48 +34722,48 @@ var ts;
}
}
function getEffectiveDecoratorFirstArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
return getParentTypeOfClassElement(node);
}
ts.Debug.fail("Unsupported decorator target.");
return unknownType;
}
function getEffectiveDecoratorSecondArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a second synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
node = node.parent;
- if (node.kind === 150) {
+ if (node.kind === 151) {
return anyType;
}
}
- if (node.kind === 147 ||
- node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 148 ||
+ node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var element = node;
switch (element.name.kind) {
case 70:
case 8:
case 9:
return getLiteralTypeForText(32, element.name.text);
- case 142:
+ case 143:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
return nameType;
@@ -31065,20 +34780,20 @@ var ts;
return unknownType;
}
function getEffectiveDecoratorThirdArgumentType(node) {
- if (node.kind === 226) {
+ if (node.kind === 228) {
ts.Debug.fail("Class decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 144) {
+ if (node.kind === 145) {
return numberType;
}
- if (node.kind === 147) {
+ if (node.kind === 148) {
ts.Debug.fail("Property decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 149 ||
- node.kind === 151 ||
- node.kind === 152) {
+ if (node.kind === 150 ||
+ node.kind === 152 ||
+ node.kind === 153) {
var propertyType = getTypeOfNode(node);
return createTypedPropertyDescriptorType(propertyType);
}
@@ -31099,26 +34814,26 @@ var ts;
return unknownType;
}
function getEffectiveArgumentType(node, argIndex) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return getEffectiveDecoratorArgumentType(node, argIndex);
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return getGlobalTemplateStringsArrayType();
}
return undefined;
}
function getEffectiveArgument(node, args, argIndex) {
- if (node.kind === 145 ||
- (argIndex === 0 && node.kind === 181)) {
+ if (node.kind === 146 ||
+ (argIndex === 0 && node.kind === 182)) {
return undefined;
}
return args[argIndex];
}
function getEffectiveArgumentErrorNode(node, argIndex, arg) {
- if (node.kind === 145) {
+ if (node.kind === 146) {
return node.expression;
}
- else if (argIndex === 0 && node.kind === 181) {
+ else if (argIndex === 0 && node.kind === 182) {
return node.template;
}
else {
@@ -31126,15 +34841,30 @@ var ts;
}
}
function resolveCall(node, signatures, candidatesOutArray, headMessage) {
- var isTaggedTemplate = node.kind === 181;
- var isDecorator = node.kind === 145;
+ var isTaggedTemplate = node.kind === 182;
+ var isDecorator = node.kind === 146;
+ var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
var typeArguments;
- if (!isTaggedTemplate && !isDecorator) {
+ if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) {
typeArguments = node.typeArguments;
if (node.expression.kind !== 96) {
ts.forEach(typeArguments, checkSourceElement);
}
}
+ if (signatures.length === 1) {
+ var declaration = signatures[0].declaration;
+ if (declaration && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration)) {
+ if (containsArgumentsReference(declaration)) {
+ var signatureWithRest = cloneSignature(signatures[0]);
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ signatureWithRest.parameters = ts.concatenate(signatureWithRest.parameters, [syntheticArgsSymbol]);
+ signatureWithRest.hasRestParameter = true;
+ signatures = [signatureWithRest];
+ }
+ }
+ }
var candidates = candidatesOutArray || [];
reorderCandidates(signatures, candidates);
if (!candidates.length) {
@@ -31157,7 +34887,7 @@ var ts;
var candidateForTypeArgumentError;
var resultOfFailedInference;
var result;
- var signatureHelpTrailingComma = candidatesOutArray && node.kind === 179 && node.arguments.hasTrailingComma;
+ var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
@@ -31171,6 +34901,9 @@ var ts;
return result;
}
if (candidateForArgumentError) {
+ if (isJsxOpeningOrSelfClosingElement) {
+ return candidateForArgumentError;
+ }
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
@@ -31186,7 +34919,7 @@ var ts;
if (headMessage) {
diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
}
- reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
+ reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
}
}
else {
@@ -31222,20 +34955,20 @@ var ts;
var candidate = void 0;
var typeArgumentsAreValid = void 0;
var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false)
+ ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
: undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
- typeArgumentTypes = ts.map(typeArguments, getTypeFromTypeNode);
+ typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
}
else {
inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
typeArgumentTypes = inferenceContext.inferredTypes;
+ typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
}
if (!typeArgumentsAreValid) {
break;
@@ -31277,7 +35010,7 @@ var ts;
if (superType !== unknownType) {
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node));
if (baseTypeNode) {
- var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
+ var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
return resolveCall(node, baseConstructors, candidatesOutArray);
}
}
@@ -31388,12 +35121,13 @@ var ts;
if (containingClass) {
var containingType = getTypeOfNode(containingClass);
var baseTypes = getBaseTypes(containingType);
- if (baseTypes.length) {
+ while (baseTypes.length) {
var baseType = baseTypes[0];
if (modifiers & 16 &&
baseType.symbol === declaration.parent.symbol) {
return true;
}
+ baseTypes = getBaseTypes(baseType);
}
}
if (modifiers & 8) {
@@ -31425,16 +35159,16 @@ var ts;
}
function getDiagnosticHeadMessageForDecoratorResolution(node) {
switch (node.parent.kind) {
- case 226:
- case 197:
+ case 228:
+ case 198:
return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
- case 144:
+ case 145:
return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
- case 147:
+ case 148:
return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
}
}
@@ -31459,16 +35193,42 @@ var ts;
}
return resolveCall(node, callSignatures, candidatesOutArray, headMessage);
}
+ function getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray) {
+ ts.Debug.assert(!(elementType.flags & 65536));
+ var callSignature = resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
+ return callSignature;
+ }
+ function resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray) {
+ if (elementType.flags & 65536) {
+ var types = elementType.types;
+ var result = void 0;
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var type = types_18[_i];
+ result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
+ }
+ return result;
+ }
+ var callSignatures = elementType && getSignaturesOfType(elementType, 0);
+ if (callSignatures && callSignatures.length > 0) {
+ var callSignature = void 0;
+ callSignature = resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
+ return callSignature;
+ }
+ return undefined;
+ }
function resolveSignature(node, candidatesOutArray) {
switch (node.kind) {
- case 179:
- return resolveCallExpression(node, candidatesOutArray);
case 180:
- return resolveNewExpression(node, candidatesOutArray);
+ return resolveCallExpression(node, candidatesOutArray);
case 181:
+ return resolveNewExpression(node, candidatesOutArray);
+ case 182:
return resolveTaggedTemplateExpression(node, candidatesOutArray);
- case 145:
+ case 146:
return resolveDecorator(node, candidatesOutArray);
+ case 250:
+ case 249:
+ return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray);
}
ts.Debug.fail("Branch in 'resolveSignature' should be unreachable.");
}
@@ -31499,20 +35259,23 @@ var ts;
if (node.expression.kind === 96) {
return voidType;
}
- if (node.kind === 180) {
+ if (node.kind === 181) {
var declaration = signature.declaration;
if (declaration &&
- declaration.kind !== 150 &&
- declaration.kind !== 154 &&
- declaration.kind !== 159 &&
+ declaration.kind !== 151 &&
+ declaration.kind !== 155 &&
+ declaration.kind !== 160 &&
!ts.isJSDocConstructSignature(declaration)) {
var funcSymbol = node.expression.kind === 70 ?
getResolvedSymbol(node.expression) :
checkExpression(node.expression).symbol;
- if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
+ funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
+ }
+ if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
return getInferredClassType(funcSymbol);
}
- else if (compilerOptions.noImplicitAny) {
+ else if (noImplicitAny) {
error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
}
return anyType;
@@ -31535,9 +35298,9 @@ var ts;
return false;
}
var targetDeclarationKind = resolvedRequire.flags & 16
- ? 225
+ ? 227
: resolvedRequire.flags & 3
- ? 223
+ ? 225
: 0;
if (targetDeclarationKind !== 0) {
var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -31563,6 +35326,22 @@ var ts;
function checkNonNullAssertion(node) {
return getNonNullableType(checkExpression(node.expression));
}
+ function checkMetaProperty(node) {
+ checkGrammarMetaProperty(node);
+ var container = ts.getNewTargetContainer(node);
+ if (!container) {
+ error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
+ return unknownType;
+ }
+ else if (container.kind === 151) {
+ var symbol = getSymbolOfNode(container.parent);
+ return getTypeOfSymbol(symbol);
+ }
+ else {
+ var symbol = getSymbolOfNode(container);
+ return getTypeOfSymbol(symbol);
+ }
+ }
function getTypeOfParameter(symbol) {
var type = getTypeOfSymbol(symbol);
if (strictNullChecks) {
@@ -31578,13 +35357,16 @@ var ts;
pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType;
}
- function assignContextualParameterTypes(signature, context, mapper) {
+ function getTypeOfFirstParameterOfSignature(signature) {
+ return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ }
+ function assignContextualParameterTypes(signature, context, mapper, checkMode) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (isInferentialContext(mapper)) {
+ if (checkMode === 2) {
for (var i = 0; i < len; i++) {
var declaration = signature.parameters[i].valueDeclaration;
if (declaration.type) {
- inferTypes(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
}
}
}
@@ -31592,23 +35374,23 @@ var ts;
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
- signature.thisParameter = createTransientSymbol(context.thisParameter, undefined);
+ signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
}
}
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
}
@@ -31625,19 +35407,19 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
var links = getSymbolLinks(parameter);
if (!links.type) {
links.type = instantiateType(contextualType, mapper);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 172 ||
- parameter.valueDeclaration.name.kind === 173)) {
+ (parameter.valueDeclaration.name.kind === 173 ||
+ parameter.valueDeclaration.name.kind === 174)) {
links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (isInferentialContext(mapper)) {
- inferTypes(mapper.context, links.type, instantiateType(contextualType, mapper));
+ else if (checkMode === 2) {
+ inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
}
}
function getReturnTypeFromJSDocComment(func) {
@@ -31648,9 +35430,9 @@ var ts;
return undefined;
}
function createPromiseType(promisedType) {
- var globalPromiseType = getGlobalPromiseType();
+ var globalPromiseType = getGlobalPromiseType(true);
if (globalPromiseType !== emptyGenericType) {
- promisedType = getAwaitedType(promisedType);
+ promisedType = getAwaitedType(promisedType) || emptyObjectType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
@@ -31661,46 +35443,56 @@ var ts;
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
return unknownType;
}
+ else if (!getGlobalPromiseConstructorSymbol(true)) {
+ error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
return promiseType;
}
- function getReturnTypeFromBody(func, contextualMapper) {
+ function getReturnTypeFromBody(func, checkMode) {
var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
if (!func.body) {
return unknownType;
}
- var isAsync = ts.isAsyncFunctionLike(func);
+ var functionFlags = ts.getFunctionFlags(func);
var type;
- if (func.body.kind !== 204) {
- type = checkExpressionCached(func.body, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (func.body.kind !== 206) {
+ type = checkExpressionCached(func.body, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
}
else {
var types = void 0;
- var funcIsGenerator = !!func.asteriskToken;
- if (funcIsGenerator) {
- types = checkAndAggregateYieldOperandTypes(func, contextualMapper);
- if (types.length === 0) {
- var iterableIteratorAny = createIterableIteratorType(anyType);
- if (compilerOptions.noImplicitAny) {
+ if (functionFlags & 1) {
+ types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), checkAndAggregateReturnExpressionTypes(func, checkMode));
+ if (!types || types.length === 0) {
+ var iterableIteratorAny = functionFlags & 2
+ ? createAsyncIterableIteratorType(anyType)
+ : createIterableIteratorType(anyType);
+ if (noImplicitAny) {
error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny));
}
return iterableIteratorAny;
}
}
else {
- types = checkAndAggregateReturnExpressionTypes(func, contextualMapper);
+ types = checkAndAggregateReturnExpressionTypes(func, checkMode);
if (!types) {
- return isAsync ? createPromiseReturnType(func, neverType) : neverType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, neverType)
+ : neverType;
}
if (types.length === 0) {
- return isAsync ? createPromiseReturnType(func, voidType) : voidType;
+ return functionFlags & 2
+ ? createPromiseReturnType(func, voidType)
+ : voidType;
}
}
type = getUnionType(types, true);
- if (funcIsGenerator) {
- type = createIterableIteratorType(type);
+ if (functionFlags & 1) {
+ type = functionFlags & 2
+ ? createAsyncIterableIteratorType(type)
+ : createIterableIteratorType(type);
}
}
if (!contextualSignature) {
@@ -31712,16 +35504,24 @@ var ts;
type = getWidenedLiteralType(type);
}
var widenedType = getWidenedType(type);
- return isAsync ? createPromiseReturnType(func, widenedType) : widenedType;
+ return (functionFlags & 3) === 2
+ ? createPromiseReturnType(func, widenedType)
+ : widenedType;
}
- function checkAndAggregateYieldOperandTypes(func, contextualMapper) {
+ function checkAndAggregateYieldOperandTypes(func, checkMode) {
var aggregatedTypes = [];
+ var functionFlags = ts.getFunctionFlags(func);
ts.forEachYieldExpression(func.body, function (yieldExpression) {
var expr = yieldExpression.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
+ var type = checkExpressionCached(expr, checkMode);
if (yieldExpression.asteriskToken) {
- type = checkElementTypeOfIterable(type, yieldExpression.expression);
+ type = checkIteratedTypeOrElementType(type, yieldExpression.expression, false, (functionFlags & 2) !== 0);
+ }
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, expr, yieldExpression.asteriskToken
+ ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
+ : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (!ts.contains(aggregatedTypes, type)) {
aggregatedTypes.push(type);
@@ -31742,29 +35542,29 @@ var ts;
if (!switchTypes.length) {
return false;
}
- return eachTypeContainedIn(type, switchTypes);
+ return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}
function functionHasImplicitReturn(func) {
if (!(func.flags & 128)) {
return false;
}
var lastStatement = ts.lastOrUndefined(func.body.statements);
- if (lastStatement && lastStatement.kind === 218 && isExhaustiveSwitchStatement(lastStatement)) {
+ if (lastStatement && lastStatement.kind === 220 && isExhaustiveSwitchStatement(lastStatement)) {
return false;
}
return true;
}
- function checkAndAggregateReturnExpressionTypes(func, contextualMapper) {
- var isAsync = ts.isAsyncFunctionLike(func);
+ function checkAndAggregateReturnExpressionTypes(func, checkMode) {
+ var functionFlags = ts.getFunctionFlags(func);
var aggregatedTypes = [];
var hasReturnWithNoExpression = functionHasImplicitReturn(func);
var hasReturnOfTypeNever = false;
ts.forEachReturnStatement(func.body, function (returnStatement) {
var expr = returnStatement.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
- if (isAsync) {
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ var type = checkExpressionCached(expr, checkMode);
+ if (functionFlags & 2) {
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (type.flags & 8192) {
hasReturnOfTypeNever = true;
@@ -31778,7 +35578,7 @@ var ts;
}
});
if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever ||
- func.kind === 184 || func.kind === 185)) {
+ func.kind === 185 || func.kind === 186)) {
return undefined;
}
if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) {
@@ -31795,7 +35595,7 @@ var ts;
if (returnType && maybeTypeOfKind(returnType, 1 | 1024)) {
return;
}
- if (ts.nodeIsMissing(func.body) || func.body.kind !== 204 || !functionHasImplicitReturn(func)) {
+ if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 || !functionHasImplicitReturn(func)) {
return;
}
var hasExplicitReturn = func.flags & 256;
@@ -31821,20 +35621,20 @@ var ts;
error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
- function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
+ function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
- if (!hasGrammarError && node.kind === 184) {
+ if (!hasGrammarError && node.kind === 185) {
checkGrammarForGenerator(node);
}
- if (contextualMapper === identityMapper && isContextSensitive(node)) {
+ if (checkMode === 1 && isContextSensitive(node)) {
checkNodeDeferred(node);
return anyFunctionType;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && isInferentialContext(contextualMapper);
+ var mightFixTypeParameters = contextSensitive && checkMode === 2;
if (mightFixTypeParameters || !(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
var contextChecked = !!(links.flags & 1024);
@@ -31843,10 +35643,10 @@ var ts;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
+ assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
}
if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
- var returnType = getReturnTypeFromBody(node, contextualMapper);
+ var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
@@ -31858,31 +35658,35 @@ var ts;
}
}
}
- if (produceDiagnostics && node.kind !== 149) {
+ if (produceDiagnostics && node.kind !== 150) {
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
}
return type;
}
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
- ts.Debug.assert(node.kind !== 149 || ts.isObjectLiteralMethod(node));
- var isAsync = ts.isAsyncFunctionLike(node);
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
- if (!node.asteriskToken) {
+ ts.Debug.assert(node.kind !== 150 || ts.isObjectLiteralMethod(node));
+ var functionFlags = ts.getFunctionFlags(node);
+ var returnOrPromisedType = node.type &&
+ ((functionFlags & 3) === 2 ?
+ checkAsyncFunctionReturnType(node) :
+ getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
if (!node.type) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
- if (node.body.kind === 204) {
+ if (node.body.kind === 206) {
checkSourceElement(node.body);
}
else {
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if (isAsync) {
- var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);
+ if ((functionFlags & 3) === 2) {
+ var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body);
}
else {
@@ -31901,19 +35705,19 @@ var ts;
return true;
}
function isReadonlySymbol(symbol) {
- return symbol.isReadonly ||
- symbol.flags & 4 && (getDeclarationModifierFlagsFromSymbol(symbol) & 64) !== 0 ||
- symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 ||
+ return !!(getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
- (symbol.flags & 8) !== 0;
+ symbol.flags & 8);
}
function isReferenceToReadonlyEntity(expr, symbol) {
if (isReadonlySymbol(symbol)) {
if (symbol.flags & 4 &&
- (expr.kind === 177 || expr.kind === 178) &&
+ (expr.kind === 178 || expr.kind === 179) &&
expr.expression.kind === 98) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 150))
+ if (!(func && func.kind === 151))
return true;
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
@@ -31922,13 +35726,13 @@ var ts;
return false;
}
function isReferenceThroughNamespaceImport(expr) {
- if (expr.kind === 177 || expr.kind === 178) {
+ if (expr.kind === 178 || expr.kind === 179) {
var node = ts.skipParentheses(expr.expression);
if (node.kind === 70) {
var symbol = getNodeLinks(node).resolvedSymbol;
if (symbol.flags & 8388608) {
var declaration = getDeclarationOfAliasSymbol(symbol);
- return declaration && declaration.kind === 237;
+ return declaration && declaration.kind === 239;
}
}
}
@@ -31936,7 +35740,7 @@ var ts;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
var node = ts.skipParentheses(expr);
- if (node.kind !== 70 && node.kind !== 177 && node.kind !== 178) {
+ if (node.kind !== 70 && node.kind !== 178 && node.kind !== 179) {
error(expr, invalidReferenceMessage);
return false;
}
@@ -31944,11 +35748,21 @@ var ts;
}
function checkDeleteExpression(node) {
checkExpression(node.expression);
+ var expr = ts.skipParentheses(node.expression);
+ if (expr.kind !== 178 && expr.kind !== 179) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
+ return booleanType;
+ }
+ var links = getNodeLinks(expr);
+ var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);
+ if (symbol && isReadonlySymbol(symbol)) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
+ }
return booleanType;
}
function checkTypeOfExpression(node) {
checkExpression(node.expression);
- return stringType;
+ return typeofType;
}
function checkVoidExpression(node) {
checkExpression(node.expression);
@@ -31956,7 +35770,7 @@ var ts;
}
function checkAwaitExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 524288)) {
+ if (!(node.flags & 16384)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -31964,7 +35778,7 @@ var ts;
}
}
var operandType = checkExpression(node.expression);
- return checkAwaitedType(operandType, node);
+ return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkPrefixUnaryExpression(node) {
var operandType = checkExpression(node.operand);
@@ -31978,6 +35792,7 @@ var ts;
case 36:
case 37:
case 51:
+ checkNonNullType(operandType, node.operand);
if (maybeTypeOfKind(operandType, 512)) {
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
}
@@ -31989,7 +35804,7 @@ var ts;
booleanType;
case 42:
case 43:
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -32002,7 +35817,7 @@ var ts;
if (operandType === silentNeverType) {
return silentNeverType;
}
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
}
@@ -32014,8 +35829,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
- var t = types_15[_i];
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+ var t = types_19[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -32029,8 +35844,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+ var t = types_20[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -32039,8 +35854,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_17 = types; _a < types_17.length; _a++) {
- var t = types_17[_a];
+ for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
+ var t = types_21[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -32061,7 +35876,10 @@ var ts;
if (isTypeOfKind(leftType, 8190)) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
- if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
+ if (!(isTypeAny(rightType) ||
+ getSignaturesOfType(rightType, 0).length ||
+ getSignaturesOfType(rightType, 1).length ||
+ isTypeSubtypeOf(rightType, globalFunctionType))) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
}
return booleanType;
@@ -32070,39 +35888,41 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
return booleanType;
}
function checkObjectLiteralAssignment(node, sourceType) {
var properties = node.properties;
- for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
- var p = properties_5[_i];
+ for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
+ var p = properties_7[_i];
checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, properties);
}
return sourceType;
}
function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) {
- if (property.kind === 257 || property.kind === 258) {
- var name_22 = property.name;
- if (name_22.kind === 142) {
- checkComputedPropertyName(name_22);
+ if (property.kind === 260 || property.kind === 261) {
+ var name = property.name;
+ if (name.kind === 143) {
+ checkComputedPropertyName(name);
}
- if (isComputedNonLiteralName(name_22)) {
+ if (isComputedNonLiteralName(name)) {
return undefined;
}
- var text = ts.getTextOfPropertyName(name_22);
+ var text = ts.getTextOfPropertyName(name);
var type = isTypeAny(objectLiteralType)
? objectLiteralType
: getTypeOfPropertyOfType(objectLiteralType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1) ||
getIndexTypeOfType(objectLiteralType, 0);
if (type) {
- if (property.kind === 258) {
+ if (property.kind === 261) {
return checkDestructuringAssignment(property, type);
}
else {
@@ -32110,10 +35930,13 @@ var ts;
}
}
else {
- error(name_22, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_22));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name));
}
}
- else if (property.kind === 259) {
+ else if (property.kind === 262) {
+ if (languageVersion < 5) {
+ checkExternalEmitHelpers(property, 4);
+ }
var nonRestNames = [];
if (allProperties) {
for (var i = 0; i < allProperties.length - 1; i++) {
@@ -32127,19 +35950,22 @@ var ts;
error(property, ts.Diagnostics.Property_assignment_expected);
}
}
- function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
- var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType;
+ function checkArrayLiteralAssignment(node, sourceType, checkMode) {
+ if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, false, false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
- checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper);
+ checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
}
return sourceType;
}
- function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) {
+ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
var elements = node.elements;
var element = elements[elementIndex];
- if (element.kind !== 198) {
- if (element.kind !== 196) {
+ if (element.kind !== 199) {
+ if (element.kind !== 197) {
var propName = "" + elementIndex;
var type = isTypeAny(sourceType)
? sourceType
@@ -32147,7 +35973,7 @@ var ts;
? getTypeOfPropertyOfType(sourceType, propName)
: elementType;
if (type) {
- return checkDestructuringAssignment(element, type, contextualMapper);
+ return checkDestructuringAssignment(element, type, checkMode);
}
else {
checkExpression(element);
@@ -32165,48 +35991,48 @@ var ts;
}
else {
var restExpression = element.expression;
- if (restExpression.kind === 192 && restExpression.operatorToken.kind === 57) {
+ if (restExpression.kind === 193 && restExpression.operatorToken.kind === 57) {
error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
}
else {
- return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
+ return checkDestructuringAssignment(restExpression, createArrayType(elementType), checkMode);
}
}
}
}
return undefined;
}
- function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) {
+ function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) {
var target;
- if (exprOrAssignment.kind === 258) {
+ if (exprOrAssignment.kind === 261) {
var prop = exprOrAssignment;
if (prop.objectAssignmentInitializer) {
if (strictNullChecks &&
!(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048)) {
sourceType = getTypeWithFacts(sourceType, 131072);
}
- checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);
+ checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
}
target = exprOrAssignment.name;
}
else {
target = exprOrAssignment;
}
- if (target.kind === 192 && target.operatorToken.kind === 57) {
- checkBinaryExpression(target, contextualMapper);
+ if (target.kind === 193 && target.operatorToken.kind === 57) {
+ checkBinaryExpression(target, checkMode);
target = target.left;
}
- if (target.kind === 176) {
+ if (target.kind === 177) {
return checkObjectLiteralAssignment(target, sourceType);
}
- if (target.kind === 175) {
- return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
+ if (target.kind === 176) {
+ return checkArrayLiteralAssignment(target, sourceType, checkMode);
}
- return checkReferenceAssignment(target, sourceType, contextualMapper);
+ return checkReferenceAssignment(target, sourceType, checkMode);
}
- function checkReferenceAssignment(target, sourceType, contextualMapper) {
- var targetType = checkExpression(target, contextualMapper);
- var error = target.parent.kind === 259 ?
+ function checkReferenceAssignment(target, sourceType, checkMode) {
+ var targetType = checkExpression(target, checkMode);
+ var error = target.parent.kind === 262 ?
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
if (checkReferenceExpression(target, error)) {
@@ -32220,35 +36046,35 @@ var ts;
case 70:
case 9:
case 11:
- case 181:
- case 194:
+ case 182:
+ case 195:
case 12:
case 8:
case 100:
case 85:
case 94:
- case 137:
- case 184:
- case 197:
+ case 138:
case 185:
- case 175:
+ case 198:
+ case 186:
case 176:
- case 187:
- case 201:
- case 247:
- case 246:
+ case 177:
+ case 188:
+ case 202:
+ case 249:
+ case 248:
return true;
- case 193:
+ case 194:
return isSideEffectFree(node.whenTrue) &&
isSideEffectFree(node.whenFalse);
- case 192:
+ case 193:
if (ts.isAssignmentOperator(node.operatorToken.kind)) {
return false;
}
return isSideEffectFree(node.left) &&
isSideEffectFree(node.right);
- case 190:
case 191:
+ case 192:
switch (node.operator) {
case 50:
case 36:
@@ -32257,9 +36083,9 @@ var ts;
return true;
}
return false;
- case 188:
- case 182:
- case 200:
+ case 189:
+ case 183:
+ case 201:
default:
return false;
}
@@ -32274,16 +36100,16 @@ var ts;
firstAssignableToSecond && !secondAssignableToFirst ? type2 :
getUnionType([type1, type2], true);
}
- function checkBinaryExpression(node, contextualMapper) {
- return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node);
+ function checkBinaryExpression(node, checkMode) {
+ return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node);
}
- function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) {
+ function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
var operator = operatorToken.kind;
- if (operator === 57 && (left.kind === 176 || left.kind === 175)) {
- return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper);
+ if (operator === 57 && (left.kind === 177 || left.kind === 176)) {
+ return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode);
}
- var leftType = checkExpression(left, contextualMapper);
- var rightType = checkExpression(right, contextualMapper);
+ var leftType = checkExpression(left, checkMode);
+ var rightType = checkExpression(right, checkMode);
switch (operator) {
case 38:
case 39:
@@ -32310,12 +36136,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
var suggestedOperator = void 0;
if ((leftType.flags & 136) &&
(rightType.flags & 136) &&
@@ -32335,12 +36157,10 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- if (leftType.flags & 6144)
- leftType = rightType;
- if (rightType.flags & 6144)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ if (!isTypeOfKind(leftType, 1 | 262178) && !isTypeOfKind(rightType, 1 | 262178)) {
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
+ }
var resultType = void 0;
if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
resultType = numberType;
@@ -32369,8 +36189,8 @@ var ts;
case 29:
case 30:
if (checkForDisallowedESSymbolOperand(operator)) {
- leftType = getBaseTypeOfLiteralType(leftType);
- rightType = getBaseTypeOfLiteralType(rightType);
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -32406,11 +36226,14 @@ var ts;
checkAssignmentOperator(rightType);
return getRegularTypeOfObjectLiteral(rightType);
case 25:
- if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
}
return rightType;
}
+ function isEvalNode(node) {
+ return node.kind === 70 && node.text === "eval";
+ }
function checkForDisallowedESSymbolOperand(operator) {
var offendingSymbolOperand = maybeTypeOfKind(leftType, 512) ? left :
maybeTypeOfKind(rightType, 512) ? right :
@@ -32464,7 +36287,7 @@ var ts;
}
function checkYieldExpression(node) {
if (produceDiagnostics) {
- if (!(node.flags & 131072) || isYieldExpressionInClass(node)) {
+ if (!(node.flags & 4096) || isYieldExpressionInClass(node)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -32473,30 +36296,45 @@ var ts;
}
if (node.expression) {
var func = ts.getContainingFunction(node);
- if (func && func.asteriskToken) {
+ var functionFlags = func && ts.getFunctionFlags(func);
+ if (node.asteriskToken) {
+ if (functionFlags & 2) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 4096);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (functionFlags & 1) {
var expressionType = checkExpressionCached(node.expression, undefined);
var expressionElementType = void 0;
var nodeIsYieldStar = !!node.asteriskToken;
if (nodeIsYieldStar) {
- expressionElementType = checkElementTypeOfIterable(expressionType, node.expression);
+ expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
if (func.type) {
- var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType;
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
- checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionElementType, node.expression, ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionElementType, signatureElementType, node.expression, undefined);
}
else {
- checkTypeAssignableTo(expressionType, signatureElementType, node.expression, undefined);
+ checkTypeAssignableTo(functionFlags & 2
+ ? getAwaitedType(expressionType, node.expression, ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionType, signatureElementType, node.expression, undefined);
}
}
}
}
return anyType;
}
- function checkConditionalExpression(node, contextualMapper) {
+ function checkConditionalExpression(node, checkMode) {
checkExpression(node.condition);
- var type1 = checkExpression(node.whenTrue, contextualMapper);
- var type2 = checkExpression(node.whenFalse, contextualMapper);
+ var type1 = checkExpression(node.whenTrue, checkMode);
+ var type2 = checkExpression(node.whenFalse, checkMode);
return getBestChoiceType(type1, type2);
}
function checkLiteralExpression(node) {
@@ -32522,107 +36360,119 @@ var ts;
}
function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
var saveContextualType = node.contextualType;
+ var saveContextualMapper = node.contextualMapper;
node.contextualType = contextualType;
- var result = checkExpression(node, contextualMapper);
+ node.contextualMapper = contextualMapper;
+ var checkMode = contextualMapper === identityMapper ? 1 :
+ contextualMapper ? 2 : 0;
+ var result = checkExpression(node, checkMode);
node.contextualType = saveContextualType;
+ node.contextualMapper = saveContextualMapper;
return result;
}
- function checkExpressionCached(node, contextualMapper) {
+ function checkExpressionCached(node, checkMode) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var saveFlowLoopStart = flowLoopStart;
flowLoopStart = flowLoopCount;
- links.resolvedType = checkExpression(node, contextualMapper);
+ links.resolvedType = checkExpression(node, checkMode);
flowLoopStart = saveFlowLoopStart;
}
return links.resolvedType;
}
function isTypeAssertion(node) {
node = ts.skipParentheses(node);
- return node.kind === 182 || node.kind === 200;
+ return node.kind === 183 || node.kind === 201;
}
function checkDeclarationInitializer(declaration) {
- var type = checkExpressionCached(declaration.initializer);
+ var type = getTypeOfExpression(declaration.initializer, true);
return ts.getCombinedNodeFlags(declaration) & 2 ||
ts.getCombinedModifierFlags(declaration) & 64 && !ts.isParameterPropertyDeclaration(declaration) ||
isTypeAssertion(declaration.initializer) ? type : getWidenedLiteralType(type);
}
function isLiteralContextualType(contextualType) {
if (contextualType) {
- if (contextualType.flags & 16384) {
- var apparentType = getApparentTypeOfTypeParameter(contextualType);
- if (apparentType.flags & (2 | 4 | 8 | 16)) {
+ if (contextualType.flags & 540672) {
+ var constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
+ if (constraint.flags & (2 | 4 | 8 | 16)) {
return true;
}
- contextualType = apparentType;
+ contextualType = constraint;
}
return maybeTypeOfKind(contextualType, (480 | 262144));
}
return false;
}
- function checkExpressionForMutableLocation(node, contextualMapper) {
- var type = checkExpression(node, contextualMapper);
+ function checkExpressionForMutableLocation(node, checkMode) {
+ var type = checkExpression(node, checkMode);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type);
}
- function checkPropertyAssignment(node, contextualMapper) {
- if (node.name.kind === 142) {
+ function checkPropertyAssignment(node, checkMode) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- return checkExpressionForMutableLocation(node.initializer, contextualMapper);
+ return checkExpressionForMutableLocation(node.initializer, checkMode);
}
- function checkObjectLiteralMethod(node, contextualMapper) {
+ function checkObjectLiteralMethod(node, checkMode) {
checkGrammarMethod(node);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
- var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
- function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
- if (isInferentialContext(contextualMapper)) {
+ function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {
+ if (checkMode === 2) {
var signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
var contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
- return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
+ return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
}
}
}
return type;
}
- function getTypeOfExpression(node) {
- if (node.kind === 179 && node.expression.kind !== 96) {
+ function getTypeOfExpression(node, cache) {
+ if (node.kind === 180 && node.expression.kind !== 96 && !ts.isRequireCall(node, true)) {
var funcType = checkNonNullExpression(node.expression);
var signature = getSingleCallSignature(funcType);
if (signature && !signature.typeParameters) {
return getReturnTypeOfSignature(signature);
}
}
- return checkExpression(node);
+ return cache ? checkExpressionCached(node) : checkExpression(node);
}
- function checkExpression(node, contextualMapper) {
+ function getContextFreeTypeOfExpression(node) {
+ var saveContextualType = node.contextualType;
+ node.contextualType = anyType;
+ var type = getTypeOfExpression(node);
+ node.contextualType = saveContextualType;
+ return type;
+ }
+ function checkExpression(node, checkMode) {
var type;
- if (node.kind === 141) {
+ if (node.kind === 142) {
type = checkQualifiedName(node);
}
else {
- var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
- type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkExpressionWorker(node, checkMode);
+ type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
if (isConstEnumObjectType(type)) {
- var ok = (node.parent.kind === 177 && node.parent.expression === node) ||
- (node.parent.kind === 178 && node.parent.expression === node) ||
- ((node.kind === 70 || node.kind === 141) && isInRightSideOfImportOrExportAssignment(node));
+ var ok = (node.parent.kind === 178 && node.parent.expression === node) ||
+ (node.parent.kind === 179 && node.parent.expression === node) ||
+ ((node.kind === 70 || node.kind === 142) && isInRightSideOfImportOrExportAssignment(node));
if (!ok) {
error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
}
}
return type;
}
- function checkExpressionWorker(node, contextualMapper) {
+ function checkExpressionWorker(node, checkMode) {
switch (node.kind) {
case 70:
return checkIdentifier(node);
@@ -32637,66 +36487,70 @@ var ts;
case 100:
case 85:
return checkLiteralExpression(node);
- case 194:
+ case 195:
return checkTemplateExpression(node);
case 12:
return stringType;
case 11:
return globalRegExpType;
- case 175:
- return checkArrayLiteral(node, contextualMapper);
case 176:
- return checkObjectLiteral(node, contextualMapper);
+ return checkArrayLiteral(node, checkMode);
case 177:
- return checkPropertyAccessExpression(node);
+ return checkObjectLiteral(node, checkMode);
case 178:
- return checkIndexedAccess(node);
+ return checkPropertyAccessExpression(node);
case 179:
+ return checkIndexedAccess(node);
case 180:
- return checkCallExpression(node);
case 181:
+ return checkCallExpression(node);
+ case 182:
return checkTaggedTemplateExpression(node);
- case 183:
- return checkExpression(node.expression, contextualMapper);
- case 197:
- return checkClassExpression(node);
case 184:
+ return checkExpression(node.expression, checkMode);
+ case 198:
+ return checkClassExpression(node);
case 185:
- return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- case 187:
+ case 186:
+ return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ case 188:
return checkTypeOfExpression(node);
- case 182:
- case 200:
- return checkAssertion(node);
+ case 183:
case 201:
+ return checkAssertion(node);
+ case 202:
return checkNonNullAssertion(node);
- case 186:
+ case 203:
+ return checkMetaProperty(node);
+ case 187:
return checkDeleteExpression(node);
- case 188:
- return checkVoidExpression(node);
case 189:
- return checkAwaitExpression(node);
+ return checkVoidExpression(node);
case 190:
- return checkPrefixUnaryExpression(node);
+ return checkAwaitExpression(node);
case 191:
- return checkPostfixUnaryExpression(node);
+ return checkPrefixUnaryExpression(node);
case 192:
- return checkBinaryExpression(node, contextualMapper);
+ return checkPostfixUnaryExpression(node);
case 193:
- return checkConditionalExpression(node, contextualMapper);
- case 196:
- return checkSpreadExpression(node, contextualMapper);
- case 198:
+ return checkBinaryExpression(node, checkMode);
+ case 194:
+ return checkConditionalExpression(node, checkMode);
+ case 197:
+ return checkSpreadExpression(node, checkMode);
+ case 199:
return undefinedWideningType;
- case 195:
+ case 196:
return checkYieldExpression(node);
- case 252:
- return checkJsxExpression(node);
- case 246:
+ case 255:
+ return checkJsxExpression(node, checkMode);
+ case 248:
return checkJsxElement(node);
- case 247:
+ case 249:
return checkJsxSelfClosingElement(node);
- case 248:
+ case 253:
+ return checkJsxAttributes(node, checkMode);
+ case 250:
ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
}
return unknownType;
@@ -32706,7 +36560,16 @@ var ts;
grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
}
checkSourceElement(node.constraint);
- getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)));
+ checkSourceElement(node.default);
+ var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
+ if (!hasNonCircularBaseConstraint(typeParameter)) {
+ error(node.constraint, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
+ }
+ var constraintType = getConstraintOfTypeParameter(typeParameter);
+ var defaultType = getDefaultFromTypeParameter(typeParameter);
+ if (constraintType && defaultType) {
+ checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
+ }
if (produceDiagnostics) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
}
@@ -32717,7 +36580,7 @@ var ts;
var func = ts.getContainingFunction(node);
if (ts.getModifierFlags(node) & 92) {
func = ts.getContainingFunction(node);
- if (!(func.kind === 150 && ts.nodeIsPresent(func.body))) {
+ if (!(func.kind === 151 && ts.nodeIsPresent(func.body))) {
error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
}
}
@@ -32728,7 +36591,7 @@ var ts;
if (ts.indexOf(func.parameters, node) !== 0) {
error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter);
}
- if (func.kind === 150 || func.kind === 154 || func.kind === 159) {
+ if (func.kind === 151 || func.kind === 155 || func.kind === 160) {
error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
}
}
@@ -32736,14 +36599,6 @@ var ts;
error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
- function isSyntacticallyValidGenerator(node) {
- if (!node.asteriskToken || !node.body) {
- return false;
- }
- return node.kind === 149 ||
- node.kind === 225 ||
- node.kind === 184;
- }
function getTypePredicateParameterIndex(parameterList, parameter) {
if (parameterList) {
for (var i = 0; i < parameterList.length; i++) {
@@ -32783,9 +36638,9 @@ var ts;
else if (parameterName) {
var hasReportedError = false;
for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) {
- var name_23 = _a[_i].name;
- if (ts.isBindingPattern(name_23) &&
- checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_23, parameterName, typePredicate.parameterName)) {
+ var name = _a[_i].name;
+ if (ts.isBindingPattern(name) &&
+ checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {
hasReportedError = true;
break;
}
@@ -32798,16 +36653,16 @@ var ts;
}
function getTypePredicateParent(node) {
switch (node.parent.kind) {
+ case 186:
+ case 154:
+ case 227:
case 185:
- case 153:
- case 225:
- case 184:
- case 158:
+ case 159:
+ case 150:
case 149:
- case 148:
- var parent_9 = node.parent;
- if (node === parent_9.type) {
- return parent_9;
+ var parent = node.parent;
+ if (node === parent.type) {
+ return parent;
}
}
}
@@ -32817,29 +36672,44 @@ var ts;
if (ts.isOmittedExpression(element)) {
continue;
}
- var name_24 = element.name;
- if (name_24.kind === 70 &&
- name_24.text === predicateVariableName) {
+ var name = element.name;
+ if (name.kind === 70 &&
+ name.text === predicateVariableName) {
error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
return true;
}
- else if (name_24.kind === 173 ||
- name_24.kind === 172) {
- if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_24, predicateVariableNode, predicateVariableName)) {
+ else if (name.kind === 174 ||
+ name.kind === 173) {
+ if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
return true;
}
}
}
}
function checkSignatureDeclaration(node) {
- if (node.kind === 155) {
+ if (node.kind === 156) {
checkGrammarIndexSignature(node);
}
- else if (node.kind === 158 || node.kind === 225 || node.kind === 159 ||
- node.kind === 153 || node.kind === 150 ||
- node.kind === 154) {
+ else if (node.kind === 159 || node.kind === 227 || node.kind === 160 ||
+ node.kind === 154 || node.kind === 151 ||
+ node.kind === 155) {
checkGrammarFunctionLikeDeclaration(node);
}
+ var functionFlags = ts.getFunctionFlags(node);
+ if ((functionFlags & 7) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
+ if ((functionFlags & 5) === 1) {
+ if (functionFlags & 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 2048);
+ }
+ else if (languageVersion < 2) {
+ checkExternalEmitHelpers(node, 128);
+ }
+ }
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
if (node.type) {
@@ -32847,29 +36717,32 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (compilerOptions.noImplicitAny && !node.type) {
+ if (noImplicitAny && !node.type) {
switch (node.kind) {
- case 154:
+ case 155:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
- case 153:
+ case 154:
error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
}
}
if (node.type) {
- if (languageVersion >= 2 && isSyntacticallyValidGenerator(node)) {
+ var functionFlags_1 = ts.getFunctionFlags(node);
+ if ((functionFlags_1 & 5) === 1) {
var returnType = getTypeFromTypeNode(node.type);
if (returnType === voidType) {
error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
- var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType;
- var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType);
+ var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
+ var iterableIteratorInstantiation = functionFlags_1 & 2
+ ? createAsyncIterableIteratorType(generatorElementType)
+ : createIterableIteratorType(generatorElementType);
checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
}
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if ((functionFlags_1 & 3) === 2) {
checkAsyncFunctionReturnType(node);
}
}
@@ -32879,11 +36752,18 @@ var ts;
}
}
function checkClassForDuplicateDeclarations(node) {
+ var Declaration;
+ (function (Declaration) {
+ Declaration[Declaration["Getter"] = 1] = "Getter";
+ Declaration[Declaration["Setter"] = 2] = "Setter";
+ Declaration[Declaration["Method"] = 4] = "Method";
+ Declaration[Declaration["Property"] = 3] = "Property";
+ })(Declaration || (Declaration = {}));
var instanceNames = ts.createMap();
var staticNames = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150) {
+ if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var param = _c[_b];
if (ts.isParameterPropertyDeclaration(param)) {
@@ -32892,36 +36772,65 @@ var ts;
}
}
else {
- var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 114; });
+ var isStatic = ts.getModifierFlags(member) & 32;
var names = isStatic ? staticNames : instanceNames;
var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name);
if (memberName) {
switch (member.kind) {
- case 151:
+ case 152:
addName(names, member.name, memberName, 1);
break;
- case 152:
+ case 153:
addName(names, member.name, memberName, 2);
break;
- case 147:
+ case 148:
addName(names, member.name, memberName, 3);
break;
+ case 150:
+ addName(names, member.name, memberName, 4);
+ break;
}
}
}
}
function addName(names, location, name, meaning) {
- var prev = names[name];
+ var prev = names.get(name);
if (prev) {
- if (prev & meaning) {
+ if (prev & 4) {
+ if (meaning !== 4) {
+ error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+ }
+ }
+ else if (prev & meaning) {
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
}
else {
- names[name] = prev | meaning;
+ names.set(name, prev | meaning);
}
}
else {
- names[name] = meaning;
+ names.set(name, meaning);
+ }
+ }
+ }
+ function checkClassForStaticPropertyNameConflicts(node) {
+ for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+ var member = _a[_i];
+ var memberNameNode = member.name;
+ var isStatic = ts.getModifierFlags(member) & 32;
+ if (isStatic && memberNameNode) {
+ var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
+ switch (memberName) {
+ case "name":
+ case "length":
+ case "caller":
+ case "arguments":
+ case "prototype":
+ var message = ts.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
+ var className = getNameOfSymbol(getSymbolOfNode(node));
+ error(memberNameNode, message, memberName, className);
+ break;
+ }
}
}
}
@@ -32929,7 +36838,7 @@ var ts;
var names = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind == 146) {
+ if (member.kind === 147) {
var memberName = void 0;
switch (member.name.kind) {
case 9:
@@ -32940,18 +36849,18 @@ var ts;
default:
continue;
}
- if (names[memberName]) {
+ if (names.get(memberName)) {
error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
- names[memberName] = true;
+ names.set(memberName, true);
}
}
}
}
function checkTypeForDuplicateIndexSignatures(node) {
- if (node.kind === 227) {
+ if (node.kind === 229) {
var nodeSymbol = getSymbolOfNode(node);
if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
return;
@@ -32966,7 +36875,7 @@ var ts;
var declaration = decl;
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
switch (declaration.parameters[0].type.kind) {
- case 134:
+ case 135:
if (!seenStringIndexer) {
seenStringIndexer = true;
}
@@ -33033,12 +36942,12 @@ var ts;
if (n.kind === 98) {
error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
}
- else if (n.kind !== 184 && n.kind !== 225) {
+ else if (n.kind !== 185 && n.kind !== 227) {
ts.forEachChild(n, markThisReferencesAsErrors);
}
}
function isInstancePropertyWithInitializer(n) {
- return n.kind === 147 &&
+ return n.kind === 148 &&
!(ts.getModifierFlags(n) & 32) &&
!!n.initializer;
}
@@ -33058,7 +36967,7 @@ var ts;
var superCallStatement = void 0;
for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) {
var statement = statements_3[_i];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
superCallStatement = statement;
break;
}
@@ -33081,18 +36990,18 @@ var ts;
checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
checkDecorators(node);
checkSignatureDeclaration(node);
- if (node.kind === 151) {
+ if (node.kind === 152) {
if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128)) {
if (!(node.flags & 256)) {
error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
}
}
}
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
- var otherKind = node.kind === 151 ? 152 : 151;
+ var otherKind = node.kind === 152 ? 153 : 152;
var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
if ((ts.getModifierFlags(node) & 28) !== (ts.getModifierFlags(otherAccessor) & 28)) {
@@ -33106,17 +37015,12 @@ var ts;
}
}
var returnType = getTypeOfAccessors(getSymbolOfNode(node));
- if (node.kind === 151) {
+ if (node.kind === 152) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
}
}
- if (node.parent.kind !== 176) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
- else {
- checkNodeDeferred(node);
- }
+ checkSourceElement(node.body);
+ registerForUnusedIdentifiersCheck(node);
}
function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
var firstType = getAnnotatedType(first);
@@ -33125,14 +37029,11 @@ var ts;
error(first, message);
}
}
- function checkAccessorDeferred(node) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
function checkMissingDeclaration(node) {
checkDecorators(node);
}
function checkTypeArgumentConstraints(typeParameters, typeArgumentNodes) {
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
var typeArguments;
var mapper;
var result = true;
@@ -33140,7 +37041,7 @@ var ts;
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
if (!typeArguments) {
- typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ typeArguments = fillMissingTypeArguments(ts.map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount);
mapper = createTypeMapper(typeParameters, typeArguments);
}
var typeArgument = typeArguments[i];
@@ -33191,25 +37092,42 @@ var ts;
function checkUnionOrIntersectionType(node) {
ts.forEach(node.types, checkSourceElement);
}
+ function checkIndexedAccessIndexType(type, accessNode) {
+ if (!(type.flags & 524288)) {
+ return type;
+ }
+ var objectType = type.objectType;
+ var indexType = type.indexType;
+ if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
+ return type;
+ }
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ var constraint = getBaseConstraintOfType(objectType);
+ if (constraint && getIndexInfoOfType(constraint, 1)) {
+ return type;
+ }
+ }
+ error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
+ return type;
+ }
function checkIndexedAccessType(node) {
- getTypeFromIndexedAccessTypeNode(node);
+ checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
}
function checkMappedType(node) {
checkSourceElement(node.typeParameter);
checkSourceElement(node.type);
var type = getTypeFromMappedTypeNode(node);
var constraintType = getConstraintTypeFromMappedType(type);
- var keyType = constraintType.flags & 16384 ? getApparentTypeOfTypeParameter(constraintType) : constraintType;
- checkTypeAssignableTo(keyType, stringType, node.typeParameter.constraint);
+ checkTypeAssignableTo(constraintType, stringType, node.typeParameter.constraint);
}
function isPrivateWithinAmbient(node) {
return (ts.getModifierFlags(node) & 8) && ts.isInAmbientContext(node);
}
function getEffectiveDeclarationFlags(n, flagsToCheck) {
var flags = ts.getCombinedModifierFlags(n);
- if (n.parent.kind !== 227 &&
- n.parent.kind !== 226 &&
- n.parent.kind !== 197 &&
+ if (n.parent.kind !== 229 &&
+ n.parent.kind !== 228 &&
+ n.parent.kind !== 198 &&
ts.isInAmbientContext(n)) {
if (!(flags & 2)) {
flags |= 1;
@@ -33286,7 +37204,7 @@ var ts;
if (subsequentNode.kind === node.kind) {
var errorNode_1 = subsequentNode.name || subsequentNode;
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
- var reportError = (node.kind === 149 || node.kind === 148) &&
+ var reportError = (node.kind === 150 || node.kind === 149) &&
(ts.getModifierFlags(node) & 32) !== (ts.getModifierFlags(subsequentNode) & 32);
if (reportError) {
var diagnostic = ts.getModifierFlags(node) & 32 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
@@ -33315,15 +37233,15 @@ var ts;
}
var duplicateFunctionDeclaration = false;
var multipleConstructorImplementation = false;
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
- var current = declarations_4[_i];
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
+ var current = declarations_5[_i];
var node = current;
var inAmbientContext = ts.isInAmbientContext(node);
- var inAmbientContextOrInterface = node.parent.kind === 227 || node.parent.kind === 161 || inAmbientContext;
+ var inAmbientContextOrInterface = node.parent.kind === 229 || node.parent.kind === 162 || inAmbientContext;
if (inAmbientContextOrInterface) {
previousDeclaration = undefined;
}
- if (node.kind === 225 || node.kind === 149 || node.kind === 148 || node.kind === 150) {
+ if (node.kind === 227 || node.kind === 150 || node.kind === 149 || node.kind === 151) {
var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
someNodeFlags |= currentNodeFlags;
allNodeFlags &= currentNodeFlags;
@@ -33374,8 +37292,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) {
- var signature = signatures_3[_a];
+ for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
+ var signature = signatures_4[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -33434,16 +37352,16 @@ var ts;
}
function getDeclarationSpaces(d) {
switch (d.kind) {
- case 227:
+ case 229:
return 2097152;
- case 230:
+ case 232:
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
? 4194304 | 1048576
: 4194304;
- case 226:
- case 229:
+ case 228:
+ case 231:
return 2097152 | 1048576;
- case 234:
+ case 236:
var result_3 = 0;
var target = resolveAlias(getSymbolOfNode(d));
ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); });
@@ -33453,87 +37371,92 @@ var ts;
}
}
}
- function checkNonThenableType(type, location, message) {
- type = getWidenedType(type);
- if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) {
- if (location) {
- if (!message) {
- message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member;
- }
- error(location, message);
- }
- return unknownType;
- }
- return type;
+ function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) {
+ var promisedType = getPromisedTypeOfPromise(type, errorNode);
+ return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage);
}
- function getPromisedType(promise) {
+ function getPromisedTypeOfPromise(promise, errorNode) {
if (isTypeAny(promise)) {
return undefined;
}
- if (getObjectFlags(promise) & 4) {
- if (promise.target === tryGetGlobalPromiseType()
- || promise.target === getGlobalPromiseLikeType()) {
- return promise.typeArguments[0];
- }
+ var typeAsPromise = promise;
+ if (typeAsPromise.promisedTypeOfPromise) {
+ return typeAsPromise.promisedTypeOfPromise;
}
- var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
- if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
- return undefined;
+ if (isReferenceToType(promise, getGlobalPromiseType(false))) {
+ return typeAsPromise.promisedTypeOfPromise = promise.typeArguments[0];
}
var thenFunction = getTypeOfPropertyOfType(promise, "then");
- if (!thenFunction || isTypeAny(thenFunction)) {
+ if (isTypeAny(thenFunction)) {
return undefined;
}
- var thenSignatures = getSignaturesOfType(thenFunction, 0);
+ var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0) : emptyArray;
if (thenSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.A_promise_must_have_a_then_method);
+ }
return undefined;
}
- var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072);
+ var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 524288);
if (isTypeAny(onfulfilledParameterType)) {
return undefined;
}
var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0);
if (onfulfilledParameterSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);
+ }
return undefined;
}
- return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
+ return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), true);
}
- function getTypeOfFirstParameterOfSignature(signature) {
- return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ function checkAwaitedType(type, errorNode, diagnosticMessage) {
+ return getAwaitedType(type, errorNode, diagnosticMessage) || unknownType;
}
- function getAwaitedType(type) {
- return checkAwaitedType(type, undefined, undefined);
- }
- function checkAwaitedType(type, location, message) {
- return checkAwaitedTypeWorker(type);
- function checkAwaitedTypeWorker(type) {
- if (type.flags & 65536) {
- var types = [];
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var constituentType = _a[_i];
- types.push(checkAwaitedTypeWorker(constituentType));
- }
- return getUnionType(types, true);
+ function getAwaitedType(type, errorNode, diagnosticMessage) {
+ var typeAsAwaitable = type;
+ if (typeAsAwaitable.awaitedTypeOfType) {
+ return typeAsAwaitable.awaitedTypeOfType;
+ }
+ if (isTypeAny(type)) {
+ return typeAsAwaitable.awaitedTypeOfType = type;
+ }
+ if (type.flags & 65536) {
+ var types = void 0;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var constituentType = _a[_i];
+ types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage));
}
- else {
- var promisedType = getPromisedType(type);
- if (promisedType === undefined) {
- return checkNonThenableType(type, location, message);
- }
- else {
- if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
- if (location) {
- error(location, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol));
- }
- return unknownType;
- }
- awaitedTypeStack.push(type.id);
- var awaitedType = checkAwaitedTypeWorker(promisedType);
- awaitedTypeStack.pop();
- return awaitedType;
+ if (!types) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, true);
+ }
+ var promisedType = getPromisedTypeOfPromise(type);
+ if (promisedType) {
+ if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);
}
+ return undefined;
+ }
+ awaitedTypeStack.push(type.id);
+ var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage);
+ awaitedTypeStack.pop();
+ if (!awaitedType) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = awaitedType;
+ }
+ var thenFunction = getTypeOfPropertyOfType(type, "then");
+ if (thenFunction && getSignaturesOfType(thenFunction, 0).length > 0) {
+ if (errorNode) {
+ ts.Debug.assert(!!diagnosticMessage);
+ error(errorNode, diagnosticMessage);
}
+ return undefined;
}
+ return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
var returnType = getTypeFromTypeNode(node.type);
@@ -33541,8 +37464,8 @@ var ts;
if (returnType === unknownType) {
return unknownType;
}
- var globalPromiseType = getGlobalPromiseType();
- if (globalPromiseType !== emptyGenericType && globalPromiseType !== getTargetType(returnType)) {
+ var globalPromiseType = getGlobalPromiseType(true);
+ if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
error(node.type, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
@@ -33560,10 +37483,15 @@ var ts;
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
- error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) {
+ error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
+ else {
+ error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ }
return unknownType;
}
- var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
+ var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(true);
if (globalPromiseConstructorLikeType === emptyObjectType) {
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
return unknownType;
@@ -33578,7 +37506,7 @@ var ts;
return unknownType;
}
}
- return checkAwaitedType(returnType, node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type);
+ return checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkDecorator(node) {
var signature = getResolvedSignature(node);
@@ -33590,22 +37518,22 @@ var ts;
var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
var errorInfo;
switch (node.parent.kind) {
- case 226:
+ case 228:
var classSymbol = getSymbolOfNode(node.parent);
var classConstructorType = getTypeOfSymbol(classSymbol);
expectedReturnType = getUnionType([classConstructorType, voidType]);
break;
- case 144:
+ case 145:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
break;
- case 147:
+ case 148:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
var methodType = getTypeOfNode(node.parent);
var descriptorType = createTypedPropertyDescriptorType(methodType);
expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -33624,6 +37552,9 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function getParameterTypeNodeForDecoratorCheck(node) {
+ return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ }
function checkDecorators(node) {
if (!node.decorators) {
return;
@@ -33634,28 +37565,36 @@ var ts;
if (!compilerOptions.experimentalDecorators) {
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
}
+ var firstDecorator = node.decorators[0];
+ checkExternalEmitHelpers(firstDecorator, 8);
+ if (node.kind === 145) {
+ checkExternalEmitHelpers(firstDecorator, 32);
+ }
if (compilerOptions.emitDecoratorMetadata) {
+ checkExternalEmitHelpers(firstDecorator, 16);
switch (node.kind) {
- case 226:
+ case 228:
var constructor = ts.getFirstConstructorWithBody(node);
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
- case 149:
- case 151:
+ case 150:
case 152:
+ case 153:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
markTypeNodeAsReferenced(node.type);
break;
- case 147:
- case 144:
+ case 148:
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ break;
+ case 145:
markTypeNodeAsReferenced(node.type);
break;
}
@@ -33667,6 +37606,7 @@ var ts;
checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -33674,8 +37614,8 @@ var ts;
function checkFunctionOrMethodDeclaration(node) {
checkDecorators(node);
checkSignatureDeclaration(node);
- var isAsync = ts.isAsyncFunctionLike(node);
- if (node.name && node.name.kind === 142) {
+ var functionFlags = ts.getFunctionFlags(node);
+ if (node.name && node.name.kind === 143) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
@@ -33693,15 +37633,17 @@ var ts;
}
}
checkSourceElement(node.body);
- if (!node.asteriskToken) {
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1) === 0) {
+ var returnOrPromisedType = node.type && (functionFlags & 2
+ ? checkAsyncFunctionReturnType(node)
+ : getTypeFromTypeNode(node.type));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (produceDiagnostics && !node.type) {
- if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
+ if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
- if (node.asteriskToken && ts.nodeIsPresent(node.body)) {
+ if (functionFlags & 1 && ts.nodeIsPresent(node.body)) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
}
@@ -33717,56 +37659,54 @@ var ts;
for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) {
var node = deferredUnusedIdentifierNodes_1[_i];
switch (node.kind) {
- case 261:
- case 230:
+ case 264:
+ case 232:
checkUnusedModuleMembers(node);
break;
- case 226:
- case 197:
+ case 228:
+ case 198:
checkUnusedClassMembers(node);
checkUnusedTypeParameters(node);
break;
- case 227:
+ case 229:
checkUnusedTypeParameters(node);
break;
- case 204:
- case 232:
- case 211:
- case 212:
+ case 206:
+ case 234:
case 213:
+ case 214:
+ case 215:
checkUnusedLocalsAndParameters(node);
break;
- case 150:
- case 184:
- case 225:
- case 185:
- case 149:
case 151:
+ case 185:
+ case 227:
+ case 186:
+ case 150:
case 152:
+ case 153:
if (node.body) {
checkUnusedLocalsAndParameters(node);
}
checkUnusedTypeParameters(node);
break;
- case 148:
- case 153:
+ case 149:
case 154:
case 155:
- case 158:
+ case 156:
case 159:
+ case 160:
checkUnusedTypeParameters(node);
break;
}
- ;
}
}
}
function checkUnusedLocalsAndParameters(node) {
- if (node.parent.kind !== 227 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
- var _loop_3 = function (key) {
- var local = node.locals[key];
+ if (node.parent.kind !== 229 && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
+ node.locals.forEach(function (local) {
if (!local.isReferenced) {
- if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 144) {
+ if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
@@ -33779,22 +37719,28 @@ var ts;
ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
}
}
- };
- for (var key in node.locals) {
- _loop_3(key);
- }
+ });
}
}
+ function isRemovedPropertyFromObjectSpread(node) {
+ if (ts.isBindingElement(node) && ts.isObjectBindingPattern(node.parent)) {
+ var lastElement = ts.lastOrUndefined(node.parent.elements);
+ return lastElement !== node && !!lastElement.dotDotDotToken;
+ }
+ return false;
+ }
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 223 &&
- (declaration.parent.parent.kind === 212 ||
- declaration.parent.parent.kind === 213)) {
+ if (declaration.kind === 225 &&
+ (declaration.parent.parent.kind === 214 ||
+ declaration.parent.parent.kind === 215)) {
return;
}
}
- error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ if (!isRemovedPropertyFromObjectSpread(node.kind === 70 ? node.parent : node)) {
+ error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ }
}
function parameterNameStartsWithUnderscore(parameterName) {
return parameterName && isIdentifierThatStartsWithUnderScore(parameterName);
@@ -33807,12 +37753,12 @@ var ts;
if (node.members) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 149 || member.kind === 147) {
+ if (member.kind === 150 || member.kind === 148) {
if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8) {
error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name);
}
}
- else if (member.kind === 150) {
+ else if (member.kind === 151) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8) {
@@ -33843,21 +37789,20 @@ var ts;
}
function checkUnusedModuleMembers(node) {
if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) {
- for (var key in node.locals) {
- var local = node.locals[key];
+ node.locals.forEach(function (local) {
if (!local.isReferenced && !local.exportSymbol) {
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ errorUnusedLocal(declaration.name, local.name);
}
}
}
- }
+ });
}
}
function checkBlock(node) {
- if (node.kind === 204) {
+ if (node.kind === 206) {
checkGrammarStatementInAmbientContext(node);
}
ts.forEach(node.statements, checkSourceElement);
@@ -33879,19 +37824,19 @@ var ts;
if (!(identifier && identifier.text === name)) {
return false;
}
- if (node.kind === 147 ||
- node.kind === 146 ||
+ if (node.kind === 148 ||
+ node.kind === 147 ||
+ node.kind === 150 ||
node.kind === 149 ||
- node.kind === 148 ||
- node.kind === 151 ||
- node.kind === 152) {
+ node.kind === 152 ||
+ node.kind === 153) {
return false;
}
if (ts.isInAmbientContext(node)) {
return false;
}
var root = ts.getRootDeclaration(node);
- if (root.kind === 144 && ts.nodeIsMissing(root.parent.body)) {
+ if (root.kind === 145 && ts.nodeIsMissing(root.parent.body)) {
return false;
}
return true;
@@ -33901,9 +37846,13 @@ var ts;
potentialThisCollisions.push(node);
}
}
+ function checkCollisionWithCapturedNewTargetVariable(node, name) {
+ if (needCollisionCheckForIdentifier(node, name, "_newTarget")) {
+ potentialNewTargetCollisions.push(node);
+ }
+ }
function checkIfThisIsCapturedInEnclosingScope(node) {
- var current = node;
- while (current) {
+ ts.findAncestor(node, function (current) {
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 70;
if (isDeclaration_1) {
@@ -33912,10 +37861,23 @@ var ts;
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
}
- return;
+ return true;
}
- current = current.parent;
- }
+ });
+ }
+ function checkIfNewTargetIsCapturedInEnclosingScope(node) {
+ ts.findAncestor(node, function (current) {
+ if (getNodeCheckFlags(current) & 8) {
+ var isDeclaration_2 = node.kind !== 70;
+ if (isDeclaration_2) {
+ error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ }
+ else {
+ error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);
+ }
+ return true;
+ }
+ });
}
function checkCollisionWithCapturedSuperVariable(node, name) {
if (!needCollisionCheckForIdentifier(node, name, "_super")) {
@@ -33926,8 +37888,8 @@ var ts;
return;
}
if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
- var isDeclaration_2 = node.kind !== 70;
- if (isDeclaration_2) {
+ var isDeclaration_3 = node.kind !== 70;
+ if (isDeclaration_3) {
error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
}
else {
@@ -33942,23 +37904,23 @@ var ts;
if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent)) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent)) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
- if (!needCollisionCheckForIdentifier(node, name, "Promise")) {
+ if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) {
return;
}
- if (node.kind === 230 && ts.getModuleInstanceState(node) !== 1) {
+ if (node.kind === 232 && ts.getModuleInstanceState(node) !== 1) {
return;
}
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 8192) {
+ if (parent.kind === 264 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024) {
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
@@ -33966,7 +37928,7 @@ var ts;
if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) {
return;
}
- if (node.kind === 223 && !node.initializer) {
+ if (node.kind === 225 && !node.initializer) {
return;
}
var symbol = getSymbolOfNode(node);
@@ -33976,25 +37938,25 @@ var ts;
localDeclarationSymbol !== symbol &&
localDeclarationSymbol.flags & 2) {
if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) {
- var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 224);
- var container = varDeclList.parent.kind === 205 && varDeclList.parent.parent
+ var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226);
+ var container = varDeclList.parent.kind === 207 && varDeclList.parent.parent
? varDeclList.parent.parent
: undefined;
var namesShareScope = container &&
- (container.kind === 204 && ts.isFunctionLike(container.parent) ||
- container.kind === 231 ||
- container.kind === 230 ||
- container.kind === 261);
+ (container.kind === 206 && ts.isFunctionLike(container.parent) ||
+ container.kind === 233 ||
+ container.kind === 232 ||
+ container.kind === 264);
if (!namesShareScope) {
- var name_25 = symbolToString(localDeclarationSymbol);
- error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_25, name_25);
+ var name = symbolToString(localDeclarationSymbol);
+ error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
}
}
}
}
}
function checkParameterInitializer(node) {
- if (ts.getRootDeclaration(node).kind !== 144) {
+ if (ts.getRootDeclaration(node).kind !== 145) {
return;
}
var func = ts.getContainingFunction(node);
@@ -34003,7 +37965,7 @@ var ts;
if (ts.isTypeNode(n) || ts.isDeclarationName(n)) {
return;
}
- if (n.kind === 177) {
+ if (n.kind === 178) {
return visit(n.expression);
}
else if (n.kind === 70) {
@@ -34017,21 +37979,21 @@ var ts;
}
var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
if (enclosingContainer === func) {
- if (symbol.valueDeclaration.kind === 144) {
+ if (symbol.valueDeclaration.kind === 145 ||
+ symbol.valueDeclaration.kind === 175) {
if (symbol.valueDeclaration.pos < node.pos) {
return;
}
- var current = n;
- while (current !== node.initializer) {
- if (ts.isFunctionLike(current.parent)) {
- return;
+ if (ts.findAncestor(n, function (current) {
+ if (current === node.initializer) {
+ return "quit";
}
- if (current.parent.kind === 147 &&
- !(ts.hasModifier(current.parent, 32)) &&
- ts.isClassLike(current.parent.parent)) {
- return;
- }
- current = current.parent;
+ return ts.isFunctionLike(current.parent) ||
+ (current.parent.kind === 148 &&
+ !(ts.hasModifier(current.parent, 32)) &&
+ ts.isClassLike(current.parent.parent));
+ })) {
+ return;
}
}
error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
@@ -34048,34 +38010,40 @@ var ts;
function checkVariableLikeDeclaration(node) {
checkDecorators(node);
checkSourceElement(node.type);
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
checkComputedPropertyName(node.name);
if (node.initializer) {
checkExpressionCached(node.initializer);
}
}
- if (node.kind === 174) {
- if (node.propertyName && node.propertyName.kind === 142) {
+ if (node.kind === 175) {
+ if (node.parent.kind === 173 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 4);
+ }
+ if (node.propertyName && node.propertyName.kind === 143) {
checkComputedPropertyName(node.propertyName);
}
- var parent_10 = node.parent.parent;
- var parentType = getTypeForBindingElementParent(parent_10);
- var name_26 = node.propertyName || node.name;
- var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name_26));
+ var parent = node.parent.parent;
+ var parentType = getTypeForBindingElementParent(parent);
+ var name = node.propertyName || node.name;
+ var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name));
markPropertyAsReferenced(property);
- if (parent_10.initializer && property && getParentOfSymbol(property)) {
- checkClassPropertyAccess(parent_10, parent_10.initializer, parentType, property);
+ if (parent.initializer && property) {
+ checkPropertyAccessibility(parent, parent.initializer, parentType, property);
}
}
if (ts.isBindingPattern(node.name)) {
+ if (node.name.kind === 174 && languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512);
+ }
ts.forEach(node.name.elements, checkSourceElement);
}
- if (node.initializer && ts.getRootDeclaration(node).kind === 144 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
+ if (node.initializer && ts.getRootDeclaration(node).kind === 145 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
return;
}
if (ts.isBindingPattern(node.name)) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined);
checkParameterInitializer(node);
}
@@ -34084,7 +38052,7 @@ var ts;
var symbol = getSymbolOfNode(node);
var type = convertAutoToAny(getTypeOfVariableOrParameterOrProperty(symbol));
if (node === symbol.valueDeclaration) {
- if (node.initializer && node.parent.parent.kind !== 212) {
+ if (node.initializer && node.parent.parent.kind !== 214) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined);
checkParameterInitializer(node);
}
@@ -34102,20 +38070,21 @@ var ts;
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
- if (node.kind !== 147 && node.kind !== 146) {
+ if (node.kind !== 148 && node.kind !== 147) {
checkExportsOnMergedDeclarations(node);
- if (node.kind === 223 || node.kind === 174) {
+ if (node.kind === 225 || node.kind === 175) {
checkVarDeclaredNamesNotShadowed(node);
}
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
}
function areDeclarationFlagsIdentical(left, right) {
- if ((left.kind === 144 && right.kind === 223) ||
- (left.kind === 223 && right.kind === 144)) {
+ if ((left.kind === 145 && right.kind === 225) ||
+ (left.kind === 225 && right.kind === 145)) {
return true;
}
if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) {
@@ -34142,8 +38111,8 @@ var ts;
ts.forEach(node.declarationList.declarations, checkSourceElement);
}
function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) {
- if (node.modifiers && node.parent.kind === 176) {
- if (ts.isAsyncFunctionLike(node)) {
+ if (node.modifiers && node.parent.kind === 177) {
+ if (ts.getFunctionFlags(node) & 2) {
if (node.modifiers.length > 1) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
}
@@ -34161,7 +38130,7 @@ var ts;
checkGrammarStatementInAmbientContext(node);
checkExpression(node.expression);
checkSourceElement(node.thenStatement);
- if (node.thenStatement.kind === 206) {
+ if (node.thenStatement.kind === 208) {
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
}
checkSourceElement(node.elseStatement);
@@ -34178,12 +38147,12 @@ var ts;
}
function checkForStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.initializer && node.initializer.kind === 224) {
+ if (node.initializer && node.initializer.kind === 226) {
checkGrammarVariableDeclarationList(node.initializer);
}
}
if (node.initializer) {
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
ts.forEach(node.initializer.declarations, checkVariableDeclaration);
}
else {
@@ -34201,13 +38170,23 @@ var ts;
}
function checkForOfStatement(node) {
checkGrammarForInOrForOfStatement(node);
- if (node.initializer.kind === 224) {
+ if (node.kind === 215) {
+ if (node.awaitModifier) {
+ if (languageVersion < 4) {
+ checkExternalEmitHelpers(node, 8192);
+ }
+ }
+ else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256);
+ }
+ }
+ if (node.initializer.kind === 226) {
checkForInOrForOfVariableDeclaration(node);
}
else {
var varExpr = node.initializer;
- var iteratedType = checkRightHandSideOfForOf(node.expression);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier);
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
checkDestructuringAssignment(varExpr, iteratedType || unknownType);
}
else {
@@ -34226,7 +38205,7 @@ var ts;
function checkForInStatement(node) {
checkGrammarForInOrForOfStatement(node);
var rightType = checkNonNullExpression(node.expression);
- if (node.initializer.kind === 224) {
+ if (node.initializer.kind === 226) {
var variable = node.initializer.declarations[0];
if (variable && ts.isBindingPattern(variable.name)) {
error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -34236,7 +38215,7 @@ var ts;
else {
var varExpr = node.initializer;
var leftType = checkExpression(varExpr);
- if (varExpr.kind === 175 || varExpr.kind === 176) {
+ if (varExpr.kind === 176 || varExpr.kind === 177) {
error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
}
else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -34246,7 +38225,7 @@ var ts;
checkReferenceExpression(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access);
}
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 16384 | 524288)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 | 540672 | 16777216)) {
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
checkSourceElement(node.statement);
@@ -34261,161 +38240,199 @@ var ts;
checkVariableDeclaration(decl);
}
}
- function checkRightHandSideOfForOf(rhsExpression) {
+ function checkRightHandSideOfForOf(rhsExpression, awaitModifier) {
var expressionType = checkNonNullExpression(rhsExpression);
- return checkIteratedTypeOrElementType(expressionType, rhsExpression, true);
+ return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
if (isTypeAny(inputType)) {
return inputType;
}
- if (languageVersion >= 2) {
- return checkElementTypeOfIterable(inputType, errorNode);
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ }
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ var uplevelIteration = languageVersion >= 2;
+ var downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
+ if (uplevelIteration || downlevelIteration || allowAsyncIterable) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ if (iteratedType || uplevelIteration) {
+ return iteratedType;
+ }
}
+ var arrayType = inputType;
+ var reportedError = false;
+ var hasStringConstituent = false;
if (allowStringInput) {
- return checkElementTypeOfArrayOrString(inputType, errorNode);
- }
- if (isArrayLikeType(inputType)) {
- var indexType = getIndexTypeOfType(inputType, 1);
- if (indexType) {
- return indexType;
+ if (arrayType.flags & 65536) {
+ var arrayTypes = inputType.types;
+ var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
+ if (filteredTypes !== arrayTypes) {
+ arrayType = getUnionType(filteredTypes, true);
+ }
+ }
+ else if (arrayType.flags & 262178) {
+ arrayType = neverType;
+ }
+ hasStringConstituent = arrayType !== inputType;
+ if (hasStringConstituent) {
+ if (languageVersion < 1) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
+ reportedError = true;
+ }
+ }
+ if (arrayType.flags & 8192) {
+ return stringType;
+ }
}
}
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
+ if (!isArrayLikeType(arrayType)) {
+ if (errorNode && !reportedError) {
+ var diagnostic = !allowStringInput || hasStringConstituent
+ ? downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type
+ : downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
+ error(errorNode, diagnostic, typeToString(arrayType));
+ }
+ return hasStringConstituent ? stringType : undefined;
}
- return unknownType;
- }
- function checkElementTypeOfIterable(iterable, errorNode) {
- var elementType = getElementTypeOfIterable(iterable, errorNode);
- if (errorNode && elementType) {
- checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode);
+ var arrayElementType = getIndexTypeOfType(arrayType, 1);
+ if (hasStringConstituent && arrayElementType) {
+ if (arrayElementType.flags & 262178) {
+ return stringType;
+ }
+ return getUnionType([arrayElementType, stringType], true);
}
- return elementType || anyType;
+ return arrayElementType;
}
- function getElementTypeOfIterable(type, errorNode) {
+ function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterable = type;
- if (!typeAsIterable.iterableElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableType()) {
- typeAsIterable.iterableElementType = type.typeArguments[0];
+ if (isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable) {
+ return isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isAsyncIterable) {
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
}
- else {
- var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorFunction)) {
- return undefined;
- }
- var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray;
- if (iteratorFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
- }
- return undefined;
- }
- typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), true), errorNode);
+ }
+ if (!isAsyncIterable || allowNonAsyncIterables) {
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
+ : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
}
}
- return typeAsIterable.iterableElementType;
- }
- function getElementTypeOfIterator(type, errorNode) {
- if (isTypeAny(type)) {
- return undefined;
+ var iteratorMethodSignatures;
+ var mayBeIterable = false;
+ if (isAsyncIterable) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
+ }
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
}
- var typeAsIterator = type;
- if (!typeAsIterator.iteratorElementType) {
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIteratorType()) {
- typeAsIterator.iteratorElementType = type.typeArguments[0];
+ if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
- else {
- var iteratorNextFunction = getTypeOfPropertyOfType(type, "next");
- if (isTypeAny(iteratorNextFunction)) {
- return undefined;
- }
- var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray;
- if (iteratorNextFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
- }
- return undefined;
- }
- var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), true);
- if (isTypeAny(iteratorNextResult)) {
- return undefined;
- }
- var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
- if (!iteratorNextValue) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
- }
- return undefined;
- }
- typeAsIterator.iteratorElementType = iteratorNextValue;
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
+ mayBeIterable = true;
+ }
+ if (ts.some(iteratorMethodSignatures)) {
+ var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, false);
+ if (checkAssignability && errorNode && iteratedType) {
+ checkTypeAssignableTo(type, mayBeIterable
+ ? createIterableType(iteratedType)
+ : createAsyncIterableType(iteratedType), errorNode);
}
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType
+ : typeAsIterable.iteratedTypeOfIterable = iteratedType;
+ }
+ if (errorNode) {
+ error(errorNode, isAsyncIterable
+ ? ts.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
+ : ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
}
- return typeAsIterator.iteratorElementType;
+ return undefined;
}
- function getElementTypeOfIterableIterator(type) {
+ function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
return undefined;
}
- if ((getObjectFlags(type) & 4) && type.target === getGlobalIterableIteratorType()) {
- return type.typeArguments[0];
+ var typeAsIterator = type;
+ if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) {
+ return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator;
}
- return getElementTypeOfIterable(type, undefined) ||
- getElementTypeOfIterator(type, undefined);
- }
- function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
- ts.Debug.assert(languageVersion < 2);
- var arrayType = arrayOrStringType;
- if (arrayOrStringType.flags & 65536) {
- var arrayTypes = arrayOrStringType.types;
- var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178); });
- if (filteredTypes !== arrayTypes) {
- arrayType = getUnionType(filteredTypes, true);
- }
+ var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType;
+ if (isReferenceToType(type, getIteratorType(false))) {
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0]
+ : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0];
}
- else if (arrayOrStringType.flags & 262178) {
- arrayType = neverType;
+ var nextMethod = getTypeOfPropertyOfType(type, "next");
+ if (isTypeAny(nextMethod)) {
+ return undefined;
}
- var hasStringConstituent = arrayOrStringType !== arrayType;
- var reportedError = false;
- if (hasStringConstituent) {
- if (languageVersion < 1) {
- error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
- reportedError = true;
- }
- if (arrayType.flags & 8192) {
- return stringType;
+ var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0) : emptyArray;
+ if (nextMethodSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.An_async_iterator_must_have_a_next_method
+ : ts.Diagnostics.An_iterator_must_have_a_next_method);
}
+ return undefined;
}
- if (!isArrayLikeType(arrayType)) {
- if (!reportedError) {
- var diagnostic = hasStringConstituent
- ? ts.Diagnostics.Type_0_is_not_an_array_type
- : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
- error(errorNode, diagnostic, typeToString(arrayType));
+ var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), true);
+ if (isTypeAny(nextResult)) {
+ return undefined;
+ }
+ if (isAsyncIterator) {
+ nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
- return hasStringConstituent ? stringType : unknownType;
}
- var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType;
- if (hasStringConstituent) {
- if (arrayElementType.flags & 262178) {
- return stringType;
+ var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value");
+ if (!nextValue) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property
+ : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
}
- return getUnionType([arrayElementType, stringType], true);
+ return undefined;
}
- return arrayElementType;
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue
+ : typeAsIterator.iteratedTypeOfIterator = nextValue;
+ }
+ function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) {
+ if (isTypeAny(returnType)) {
+ return undefined;
+ }
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ || getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 151 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 152)));
+ return !!(node.kind === 152 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153)));
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType;
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
+ ? getPromisedTypeOfPromise(returnType)
+ : returnType;
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 | 1);
}
function checkReturnStatement(node) {
@@ -34431,40 +38448,41 @@ var ts;
var returnType = getReturnTypeOfSignature(signature);
if (strictNullChecks || node.expression || returnType.flags & 8192) {
var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
- if (func.asteriskToken) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1) {
return;
}
- if (func.kind === 152) {
+ if (func.kind === 153) {
if (node.expression) {
- error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
+ error(node, ts.Diagnostics.Setters_cannot_return_a_value);
}
}
- else if (func.kind === 150) {
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) {
- error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
+ else if (func.kind === 151) {
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
+ error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
}
}
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
- if (ts.isAsyncFunctionLike(func)) {
- var promisedType = getPromisedType(returnType);
- var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (functionFlags & 2) {
+ var promisedType = getPromisedTypeOfPromise(returnType);
+ var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (promisedType) {
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node);
+ checkTypeAssignableTo(awaitedType, promisedType, node);
}
}
else {
- checkTypeAssignableTo(exprType, returnType, node.expression || node);
+ checkTypeAssignableTo(exprType, returnType, node);
}
}
}
- else if (func.kind !== 150 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+ else if (func.kind !== 151 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
}
function checkWithStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.flags & 524288) {
+ if (node.flags & 16384) {
grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);
}
}
@@ -34483,7 +38501,7 @@ var ts;
var expressionType = checkExpression(node.expression);
var expressionIsLiteral = isLiteralType(expressionType);
ts.forEach(node.caseBlock.clauses, function (clause) {
- if (clause.kind === 254 && !hasDuplicateDefaultClause) {
+ if (clause.kind === 257 && !hasDuplicateDefaultClause) {
if (firstDefaultClause === undefined) {
firstDefaultClause = clause;
}
@@ -34495,7 +38513,7 @@ var ts;
hasDuplicateDefaultClause = true;
}
}
- if (produceDiagnostics && clause.kind === 253) {
+ if (produceDiagnostics && clause.kind === 256) {
var caseClause = clause;
var caseType = checkExpression(caseClause.expression);
var caseIsLiteral = isLiteralType(caseType);
@@ -34516,18 +38534,16 @@ var ts;
}
function checkLabeledStatement(node) {
if (!checkGrammarStatementInAmbientContext(node)) {
- var current = node.parent;
- while (current) {
+ ts.findAncestor(node.parent, function (current) {
if (ts.isFunctionLike(current)) {
- break;
+ return "quit";
}
- if (current.kind === 219 && current.label.text === node.label.text) {
+ if (current.kind === 221 && current.label.text === node.label.text) {
var sourceFile = ts.getSourceFileOfNode(node);
grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
- break;
+ return true;
}
- current = current.parent;
- }
+ });
}
checkSourceElement(node.statement);
}
@@ -34554,14 +38570,14 @@ var ts;
grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
}
else {
- var blockLocals = catchClause.block.locals;
- if (blockLocals) {
- for (var caughtName in catchClause.locals) {
- var blockLocal = blockLocals[caughtName];
+ var blockLocals_1 = catchClause.block.locals;
+ if (blockLocals_1) {
+ ts.forEachKey(catchClause.locals, function (caughtName) {
+ var blockLocal = blockLocals_1.get(caughtName);
if (blockLocal && (blockLocal.flags & 2) !== 0) {
grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
}
- }
+ });
}
}
}
@@ -34609,12 +38625,13 @@ var ts;
if (!indexType) {
return;
}
- if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) {
+ var propDeclaration = prop.valueDeclaration;
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (prop.valueDeclaration.name.kind === 142 || prop.parent === containingType.symbol) {
- errorNode = prop.valueDeclaration;
+ if (propDeclaration && (propDeclaration.name.kind === 143 || prop.parent === containingType.symbol)) {
+ errorNode = propDeclaration;
}
else if (indexDeclaration) {
errorNode = indexDeclaration;
@@ -34639,15 +38656,23 @@ var ts;
case "string":
case "symbol":
case "void":
+ case "object":
error(name, message, name.text);
}
}
function checkTypeParameters(typeParameterDeclarations) {
if (typeParameterDeclarations) {
- for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
+ var seenDefault = false;
+ for (var i = 0; i < typeParameterDeclarations.length; i++) {
var node = typeParameterDeclarations[i];
checkTypeParameter(node);
if (produceDiagnostics) {
+ if (node.default) {
+ seenDefault = true;
+ }
+ else if (seenDefault) {
+ error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
+ }
for (var j = 0; j < i; j++) {
if (typeParameterDeclarations[j].symbol === node.symbol) {
error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
@@ -34657,22 +38682,56 @@ var ts;
}
}
}
- function checkTypeParameterListsIdentical(node, symbol) {
+ function checkTypeParameterListsIdentical(symbol) {
if (symbol.declarations.length === 1) {
return;
}
- var firstDecl;
- for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 226 || declaration.kind === 227) {
- if (!firstDecl) {
- firstDecl = declaration;
+ var links = getSymbolLinks(symbol);
+ if (!links.typeParametersChecked) {
+ links.typeParametersChecked = true;
+ var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
+ if (declarations.length <= 1) {
+ return;
+ }
+ var type = getDeclaredTypeOfSymbol(symbol);
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
+ var name = symbolToString(symbol);
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
+ var declaration = declarations_6[_i];
+ error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
}
- else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) {
- error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text);
+ }
+ }
+ }
+ function areTypeParametersIdentical(declarations, typeParameters) {
+ var maxTypeArgumentCount = ts.length(typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
+ var declaration = declarations_7[_i];
+ var numTypeParameters = ts.length(declaration.typeParameters);
+ if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
+ return false;
+ }
+ for (var i = 0; i < numTypeParameters; i++) {
+ var source = declaration.typeParameters[i];
+ var target = typeParameters[i];
+ if (source.name.text !== target.symbol.name) {
+ return false;
+ }
+ var sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint);
+ var targetConstraint = getConstraintFromTypeParameter(target);
+ if ((sourceConstraint || targetConstraint) &&
+ (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) {
+ return false;
+ }
+ var sourceDefault = source.default && getTypeFromTypeNode(source.default);
+ var targetDefault = getDefaultFromTypeParameter(target);
+ if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {
+ return false;
}
}
}
+ return true;
}
function checkClassExpression(node) {
checkClassLikeDeclaration(node);
@@ -34692,11 +38751,12 @@ var ts;
registerForUnusedIdentifiersCheck(node);
}
function checkClassLikeDeclaration(node) {
- checkGrammarClassDeclarationHeritageClauses(node);
+ checkGrammarClassLikeDeclaration(node);
checkDecorators(node);
if (node.name) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -34706,19 +38766,26 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
var staticType = getTypeOfSymbol(symbol);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
checkClassForDuplicateDeclarations(node);
+ if (!ts.isInAmbientContext(node)) {
+ checkClassForStaticPropertyNameConflicts(node);
+ }
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
+ if (languageVersion < 2) {
+ checkExternalEmitHelpers(baseTypeNode.parent, 1);
+ }
var baseTypes = getBaseTypes(type);
if (baseTypes.length && produceDiagnostics) {
var baseType_1 = baseTypes[0];
- var staticBaseType = getBaseConstructorTypeOfClass(type);
+ var baseConstructorType = getBaseConstructorTypeOfClass(type);
+ var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
if (baseTypeNode.typeArguments) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
- for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
if (!checkTypeArgumentConstraints(constructor.typeParameters, baseTypeNode.typeArguments)) {
break;
@@ -34727,15 +38794,11 @@ var ts;
}
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
- if (baseType_1.symbol.valueDeclaration &&
- !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration) &&
- baseType_1.symbol.valueDeclaration.kind === 226) {
- if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) {
- error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class);
- }
+ if (baseConstructorType.flags & 540672 && !isMixinConstructorType(staticType)) {
+ error(node.name || node, ts.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
}
- if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32)) {
- var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
+ if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32) && !(baseConstructorType.flags & 540672)) {
+ var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);
if (ts.forEach(constructors, function (sig) { return getReturnTypeOfSignature(sig) !== baseType_1; })) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructors_must_all_have_the_same_return_type);
}
@@ -34754,8 +38817,7 @@ var ts;
if (produceDiagnostics) {
var t = getTypeFromTypeNode(typeRefNode);
if (t !== unknownType) {
- var declaredType = getObjectFlags(t) & 4 ? t.target : t;
- if (getObjectFlags(declaredType) & 3) {
+ if (isValidBaseType(t)) {
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
}
else {
@@ -34783,17 +38845,22 @@ var ts;
}
}
function getTargetSymbol(s) {
- return s.flags & 16777216 ? getSymbolLinks(s).target : s;
+ return getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
+ function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
+ return ts.filter(symbol.declarations, function (d) {
+ return d.kind === 228 || d.kind === 229;
+ });
+ }
function checkKindsOfPropertyMemberOverrides(type, baseType) {
- var baseProperties = getPropertiesOfObjectType(baseType);
+ var baseProperties = getPropertiesOfType(baseType);
for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
var baseProperty = baseProperties_1[_i];
var base = getTargetSymbol(baseProperty);
- if (base.flags & 134217728) {
+ if (base.flags & 16777216) {
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
@@ -34803,7 +38870,7 @@ var ts;
if (derived === base) {
var derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol);
if (baseDeclarationFlags & 128 && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128))) {
- if (derivedClassDecl.kind === 197) {
+ if (derivedClassDecl.kind === 198) {
error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
}
else {
@@ -34813,66 +38880,37 @@ var ts;
}
else {
var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
- if ((baseDeclarationFlags & 8) || (derivedDeclarationFlags & 8)) {
+ if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
continue;
}
- if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) {
+ if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
var errorMessage = void 0;
- if (base.flags & 8192) {
+ if (isMethodLike(base)) {
if (derived.flags & 98304) {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
}
else {
- ts.Debug.assert((derived.flags & 4) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
}
}
else if (base.flags & 4) {
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
}
else {
- ts.Debug.assert((base.flags & 98304) !== 0);
- ts.Debug.assert((derived.flags & 8192) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
function isAccessor(kind) {
- return kind === 151 || kind === 152;
- }
- function areTypeParametersIdentical(list1, list2) {
- if (!list1 && !list2) {
- return true;
- }
- if (!list1 || !list2 || list1.length !== list2.length) {
- return false;
- }
- for (var i = 0, len = list1.length; i < len; i++) {
- var tp1 = list1[i];
- var tp2 = list2[i];
- if (tp1.name.text !== tp2.name.text) {
- return false;
- }
- if (!tp1.constraint && !tp2.constraint) {
- continue;
- }
- if (!tp1.constraint || !tp2.constraint) {
- return false;
- }
- if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
- return false;
- }
- }
- return true;
+ return kind === 152 || kind === 153;
}
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
@@ -34880,16 +38918,16 @@ var ts;
return true;
}
var seen = ts.createMap();
- ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
+ ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.name, { prop: p, containingType: type }); });
var ok = true;
for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
var base = baseTypes_2[_i];
- var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType));
- for (var _a = 0, properties_6 = properties; _a < properties_6.length; _a++) {
- var prop = properties_6[_a];
- var existing = seen[prop.name];
+ var properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
+ for (var _a = 0, properties_8 = properties; _a < properties_8.length; _a++) {
+ var prop = properties_8[_a];
+ var existing = seen.get(prop.name);
if (!existing) {
- seen[prop.name] = { prop: prop, containingType: base };
+ seen.set(prop.name, { prop: prop, containingType: base });
}
else {
var isInheritedProperty = existing.containingType !== type;
@@ -34913,8 +38951,8 @@ var ts;
checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
checkExportsOnMergedDeclarations(node);
var symbol = getSymbolOfNode(node);
- checkTypeParameterListsIdentical(node, symbol);
- var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 227);
+ checkTypeParameterListsIdentical(symbol);
+ var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229);
if (node === firstInterfaceDecl) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
@@ -35010,7 +39048,7 @@ var ts;
return value;
function evalConstant(e) {
switch (e.kind) {
- case 190:
+ case 191:
var value_1 = evalConstant(e.operand);
if (value_1 === undefined) {
return undefined;
@@ -35021,7 +39059,7 @@ var ts;
case 51: return ~value_1;
}
return undefined;
- case 192:
+ case 193:
var left = evalConstant(e.left);
if (left === undefined) {
return undefined;
@@ -35045,12 +39083,13 @@ var ts;
}
return undefined;
case 8:
+ checkGrammarNumericLiteral(e);
return +e.text;
- case 183:
+ case 184:
return evalConstant(e.expression);
case 70:
+ case 179:
case 178:
- case 177:
var member = initializer.parent;
var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
var enumType_1;
@@ -35061,7 +39100,7 @@ var ts;
}
else {
var expression = void 0;
- if (e.kind === 178) {
+ if (e.kind === 179) {
if (e.argumentExpression === undefined ||
e.argumentExpression.kind !== 9) {
return undefined;
@@ -35078,7 +39117,7 @@ var ts;
if (current.kind === 70) {
break;
}
- else if (current.kind === 177) {
+ else if (current.kind === 178) {
current = current.expression;
}
else {
@@ -35118,6 +39157,7 @@ var ts;
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
checkExportsOnMergedDeclarations(node);
@@ -35138,7 +39178,7 @@ var ts;
}
var seenEnumMissingInitialInitializer_1 = false;
ts.forEach(enumSymbol.declarations, function (declaration) {
- if (declaration.kind !== 229) {
+ if (declaration.kind !== 231) {
return false;
}
var enumDeclaration = declaration;
@@ -35159,10 +39199,10 @@ var ts;
}
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
- var declaration = declarations_5[_i];
- if ((declaration.kind === 226 ||
- (declaration.kind === 225 && ts.nodeIsPresent(declaration.body))) &&
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+ var declaration = declarations_8[_i];
+ if ((declaration.kind === 228 ||
+ (declaration.kind === 227 && ts.nodeIsPresent(declaration.body))) &&
!ts.isInAmbientContext(declaration)) {
return declaration;
}
@@ -35221,7 +39261,7 @@ var ts;
error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
}
}
- var mergedClass = ts.getDeclarationOfKind(symbol, 226);
+ var mergedClass = ts.getDeclarationOfKind(symbol, 228);
if (mergedClass &&
inSameLexicalScope(node, mergedClass)) {
getNodeLinks(node).flags |= 32768;
@@ -35229,7 +39269,7 @@ var ts;
}
if (isAmbientExternalModule) {
if (ts.isExternalModuleAugmentation(node)) {
- var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432);
+ var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 134217728);
if (checkBody && node.body) {
for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) {
var statement = _a[_i];
@@ -35264,42 +39304,42 @@ var ts;
}
function checkModuleAugmentationElement(node, isGlobalAugmentation) {
switch (node.kind) {
- case 205:
+ case 207:
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
checkModuleAugmentationElement(decl, isGlobalAugmentation);
}
break;
- case 240:
- case 241:
+ case 242:
+ case 243:
grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
break;
- case 234:
- case 235:
+ case 236:
+ case 237:
grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
break;
- case 174:
- case 223:
- var name_27 = node.name;
- if (ts.isBindingPattern(name_27)) {
- for (var _b = 0, _c = name_27.elements; _b < _c.length; _b++) {
+ case 175:
+ case 225:
+ var name = node.name;
+ if (ts.isBindingPattern(name)) {
+ for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
var el = _c[_b];
checkModuleAugmentationElement(el, isGlobalAugmentation);
}
break;
}
- case 226:
- case 229:
- case 225:
+ case 228:
+ case 231:
case 227:
+ case 229:
+ case 232:
case 230:
- case 228:
if (isGlobalAugmentation) {
return;
}
var symbol = getSymbolOfNode(node);
if (symbol) {
- var reportError = !(symbol.flags & 33554432);
+ var reportError = !(symbol.flags & 134217728);
if (!reportError) {
reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
}
@@ -35311,12 +39351,12 @@ var ts;
switch (node.kind) {
case 70:
return node;
- case 141:
+ case 142:
do {
node = node.left;
} while (node.kind !== 70);
return node;
- case 177:
+ case 178:
do {
node = node.expression;
} while (node.kind !== 70);
@@ -35329,9 +39369,9 @@ var ts;
error(moduleName, ts.Diagnostics.String_literal_expected);
return false;
}
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
- error(moduleName, node.kind === 241 ?
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule) {
+ error(moduleName, node.kind === 243 ?
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
return false;
@@ -35352,7 +39392,7 @@ var ts;
(symbol.flags & 793064 ? 793064 : 0) |
(symbol.flags & 1920 ? 1920 : 0);
if (target.flags & excludedMeanings) {
- var message = node.kind === 243 ?
+ var message = node.kind === 245 ?
ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
@@ -35379,7 +39419,7 @@ var ts;
checkImportBinding(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237) {
+ if (importClause.namedBindings.kind === 239) {
checkImportBinding(importClause.namedBindings);
}
else {
@@ -35430,8 +39470,10 @@ var ts;
if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
if (node.exportClause) {
ts.forEach(node.exportClause.elements, checkExportSpecifier);
- var inAmbientExternalModule = node.parent.kind === 231 && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 && !inAmbientExternalModule) {
+ var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
+ var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
+ !node.moduleSpecifier && ts.isInAmbientContext(node);
+ if (node.parent.kind !== 264 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
}
}
@@ -35444,7 +39486,7 @@ var ts;
}
}
function checkGrammarModuleElementContext(node, errorMessage) {
- var isInAppropriateContext = node.parent.kind === 261 || node.parent.kind === 231 || node.parent.kind === 230;
+ var isInAppropriateContext = node.parent.kind === 264 || node.parent.kind === 233 || node.parent.kind === 232;
if (!isInAppropriateContext) {
grammarErrorOnFirstToken(node, errorMessage);
}
@@ -35467,9 +39509,14 @@ var ts;
if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) {
return;
}
- var container = node.parent.kind === 261 ? node.parent : node.parent.parent;
- if (container.kind === 230 && !ts.isAmbientModule(container)) {
- error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ var container = node.parent.kind === 264 ? node.parent : node.parent.parent;
+ if (container.kind === 232 && !ts.isAmbientModule(container)) {
+ if (node.isExportEquals) {
+ error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ }
+ else {
+ error(node, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
+ }
return;
}
if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && ts.getModifierFlags(node) !== 0) {
@@ -35492,50 +39539,45 @@ var ts;
}
}
function hasExportedMembers(moduleSymbol) {
- for (var id in moduleSymbol.exports) {
- if (id !== "export=") {
- return true;
- }
- }
- return false;
+ return ts.forEachEntry(moduleSymbol.exports, function (_, id) { return id !== "export="; });
}
function checkExternalModuleExports(node) {
var moduleSymbol = getSymbolOfNode(node);
var links = getSymbolLinks(moduleSymbol);
if (!links.exportsChecked) {
- var exportEqualsSymbol = moduleSymbol.exports["export="];
+ var exportEqualsSymbol = moduleSymbol.exports.get("export=");
if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
if (!isTopLevelInExternalModuleAugmentation(declaration)) {
error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);
}
}
- var exports_1 = getExportsOfModule(moduleSymbol);
- for (var id in exports_1) {
+ var exports = getExportsOfModule(moduleSymbol);
+ exports && exports.forEach(function (_a, id) {
+ var declarations = _a.declarations, flags = _a.flags;
if (id === "__export") {
- continue;
+ return;
}
- var _a = exports_1[id], declarations = _a.declarations, flags = _a.flags;
if (flags & (1920 | 64 | 384)) {
- continue;
+ return;
}
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload);
if (flags & 524288 && exportedDeclarationsCount <= 2) {
- continue;
+ return;
}
if (exportedDeclarationsCount > 1) {
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
- var declaration = declarations_6[_i];
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+ var declaration = declarations_9[_i];
if (isNotOverload(declaration)) {
diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id));
}
}
}
- }
+ });
links.exportsChecked = true;
}
function isNotOverload(declaration) {
- return (declaration.kind !== 225 && declaration.kind !== 149) ||
+ return (declaration.kind !== 227 && declaration.kind !== 150) ||
!!declaration.body;
}
}
@@ -35546,123 +39588,123 @@ var ts;
var kind = node.kind;
if (cancellationToken) {
switch (kind) {
- case 230:
- case 226:
+ case 232:
+ case 228:
+ case 229:
case 227:
- case 225:
cancellationToken.throwIfCancellationRequested();
}
}
switch (kind) {
- case 143:
- return checkTypeParameter(node);
case 144:
+ return checkTypeParameter(node);
+ case 145:
return checkParameter(node);
+ case 148:
case 147:
- case 146:
return checkPropertyDeclaration(node);
- case 158:
case 159:
- case 153:
+ case 160:
case 154:
- return checkSignatureDeclaration(node);
case 155:
return checkSignatureDeclaration(node);
+ case 156:
+ return checkSignatureDeclaration(node);
+ case 150:
case 149:
- case 148:
return checkMethodDeclaration(node);
- case 150:
- return checkConstructorDeclaration(node);
case 151:
+ return checkConstructorDeclaration(node);
case 152:
+ case 153:
return checkAccessorDeclaration(node);
- case 157:
+ case 158:
return checkTypeReferenceNode(node);
- case 156:
+ case 157:
return checkTypePredicate(node);
- case 160:
- return checkTypeQuery(node);
case 161:
- return checkTypeLiteral(node);
+ return checkTypeQuery(node);
case 162:
- return checkArrayType(node);
+ return checkTypeLiteral(node);
case 163:
- return checkTupleType(node);
+ return checkArrayType(node);
case 164:
+ return checkTupleType(node);
case 165:
- return checkUnionOrIntersectionType(node);
case 166:
- case 168:
- return checkSourceElement(node.type);
+ return checkUnionOrIntersectionType(node);
+ case 167:
case 169:
- return checkIndexedAccessType(node);
+ return checkSourceElement(node.type);
case 170:
+ return checkIndexedAccessType(node);
+ case 171:
return checkMappedType(node);
- case 225:
+ case 227:
return checkFunctionDeclaration(node);
- case 204:
- case 231:
+ case 206:
+ case 233:
return checkBlock(node);
- case 205:
- return checkVariableStatement(node);
case 207:
- return checkExpressionStatement(node);
- case 208:
- return checkIfStatement(node);
+ return checkVariableStatement(node);
case 209:
- return checkDoStatement(node);
+ return checkExpressionStatement(node);
case 210:
- return checkWhileStatement(node);
+ return checkIfStatement(node);
case 211:
- return checkForStatement(node);
+ return checkDoStatement(node);
case 212:
- return checkForInStatement(node);
+ return checkWhileStatement(node);
case 213:
- return checkForOfStatement(node);
+ return checkForStatement(node);
case 214:
+ return checkForInStatement(node);
case 215:
- return checkBreakOrContinueStatement(node);
+ return checkForOfStatement(node);
case 216:
- return checkReturnStatement(node);
case 217:
- return checkWithStatement(node);
+ return checkBreakOrContinueStatement(node);
case 218:
- return checkSwitchStatement(node);
+ return checkReturnStatement(node);
case 219:
- return checkLabeledStatement(node);
+ return checkWithStatement(node);
case 220:
- return checkThrowStatement(node);
+ return checkSwitchStatement(node);
case 221:
- return checkTryStatement(node);
+ return checkLabeledStatement(node);
+ case 222:
+ return checkThrowStatement(node);
case 223:
+ return checkTryStatement(node);
+ case 225:
return checkVariableDeclaration(node);
- case 174:
+ case 175:
return checkBindingElement(node);
- case 226:
+ case 228:
return checkClassDeclaration(node);
- case 227:
+ case 229:
return checkInterfaceDeclaration(node);
- case 228:
+ case 230:
return checkTypeAliasDeclaration(node);
- case 229:
+ case 231:
return checkEnumDeclaration(node);
- case 230:
+ case 232:
return checkModuleDeclaration(node);
- case 235:
+ case 237:
return checkImportDeclaration(node);
- case 234:
+ case 236:
return checkImportEqualsDeclaration(node);
- case 241:
+ case 243:
return checkExportDeclaration(node);
- case 240:
+ case 242:
return checkExportAssignment(node);
- case 206:
+ case 208:
checkGrammarStatementInAmbientContext(node);
return;
- case 222:
+ case 224:
checkGrammarStatementInAmbientContext(node);
return;
- case 244:
+ case 246:
return checkMissingDeclaration(node);
}
}
@@ -35675,17 +39717,17 @@ var ts;
for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) {
var node = deferredNodes_1[_i];
switch (node.kind) {
- case 184:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
break;
- case 151:
case 152:
- checkAccessorDeferred(node);
+ case 153:
+ checkAccessorDeclaration(node);
break;
- case 197:
+ case 198:
checkClassExpressionDeferred(node);
break;
}
@@ -35705,6 +39747,7 @@ var ts;
}
checkGrammarSourceFile(node);
potentialThisCollisions.length = 0;
+ potentialNewTargetCollisions.length = 0;
deferredNodes = [];
deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined;
ts.forEach(node.statements, checkSourceElement);
@@ -35724,6 +39767,10 @@ var ts;
ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
potentialThisCollisions.length = 0;
}
+ if (potentialNewTargetCollisions.length) {
+ ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
+ potentialNewTargetCollisions.length = 0;
+ }
links.flags |= 1;
}
}
@@ -35768,7 +39815,7 @@ var ts;
function isInsideWithStatementBody(node) {
if (node) {
while (node.parent) {
- if (node.parent.kind === 217 && node.parent.statement === node) {
+ if (node.parent.kind === 219 && node.parent.statement === node) {
return true;
}
node = node.parent;
@@ -35777,11 +39824,11 @@ var ts;
return false;
}
function getSymbolsInScope(location, meaning) {
- var symbols = ts.createMap();
- var memberFlags = 0;
if (isInsideWithStatementBody(location)) {
return [];
}
+ var symbols = ts.createMap();
+ var memberFlags = 0;
populateSymbols();
return symbolsToArray(symbols);
function populateSymbols() {
@@ -35790,28 +39837,28 @@ var ts;
copySymbols(location.locals, meaning);
}
switch (location.kind) {
- case 261:
+ case 264:
if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230:
+ case 232:
copySymbols(getSymbolOfNode(location).exports, meaning & 8914931);
break;
- case 229:
+ case 231:
copySymbols(getSymbolOfNode(location).exports, meaning & 8);
break;
- case 197:
+ case 198:
var className = location.name;
if (className) {
copySymbol(location.symbol, meaning);
}
- case 226:
- case 227:
+ case 228:
+ case 229:
if (!(memberFlags & 32)) {
copySymbols(getSymbolOfNode(location).members, meaning & 793064);
}
break;
- case 184:
+ case 185:
var funcName = location.name;
if (funcName) {
copySymbol(location.symbol, meaning);
@@ -35829,17 +39876,16 @@ var ts;
function copySymbol(symbol, meaning) {
if (symbol.flags & meaning) {
var id = symbol.name;
- if (!symbols[id]) {
- symbols[id] = symbol;
+ if (!symbols.has(id)) {
+ symbols.set(id, symbol);
}
}
}
function copySymbols(source, meaning) {
if (meaning) {
- for (var id in source) {
- var symbol = source[id];
+ source.forEach(function (symbol) {
copySymbol(symbol, meaning);
- }
+ });
}
}
}
@@ -35850,27 +39896,27 @@ var ts;
}
function isTypeDeclaration(node) {
switch (node.kind) {
- case 143:
- case 226:
- case 227:
+ case 144:
case 228:
case 229:
+ case 230:
+ case 231:
return true;
}
}
function isTypeReferenceIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 141) {
+ while (node.parent && node.parent.kind === 142) {
node = node.parent;
}
- return node.parent && (node.parent.kind === 157 || node.parent.kind === 272);
+ return node.parent && (node.parent.kind === 158 || node.parent.kind === 276);
}
function isHeritageClauseElementIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 177) {
+ while (node.parent && node.parent.kind === 178) {
node = node.parent;
}
- return node.parent && node.parent.kind === 199;
+ return node.parent && node.parent.kind === 200;
}
function forEachEnclosingClass(node, callback) {
var result;
@@ -35887,13 +39933,13 @@ var ts;
return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
}
function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
- while (nodeOnRightSide.parent.kind === 141) {
+ while (nodeOnRightSide.parent.kind === 142) {
nodeOnRightSide = nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 234) {
+ if (nodeOnRightSide.parent.kind === 236) {
return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 240) {
+ if (nodeOnRightSide.parent.kind === 242) {
return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
}
return undefined;
@@ -35901,27 +39947,35 @@ var ts;
function isInRightSideOfImportOrExportAssignment(node) {
return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
}
+ function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {
+ var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
+ switch (specialPropertyAssignmentKind) {
+ case 1:
+ case 3:
+ return getSymbolOfNode(entityName.parent);
+ case 4:
+ case 2:
+ case 5:
+ return getSymbolOfNode(entityName.parent.parent);
+ }
+ }
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
if (ts.isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
}
- if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 177) {
- var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
- switch (specialPropertyAssignmentKind) {
- case 1:
- case 3:
- return getSymbolOfNode(entityName.parent);
- case 4:
- case 2:
- return getSymbolOfNode(entityName.parent.parent);
- default:
+ if (ts.isInJavaScriptFile(entityName) &&
+ entityName.parent.kind === 178 &&
+ entityName.parent === entityName.parent.parent.left) {
+ var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
+ if (specialPropertyAssignmentSymbol) {
+ return specialPropertyAssignmentSymbol;
}
}
- if (entityName.parent.kind === 240 && ts.isEntityNameExpression(entityName)) {
+ if (entityName.parent.kind === 242 && ts.isEntityNameExpression(entityName)) {
return resolveEntityName(entityName, 107455 | 793064 | 1920 | 8388608);
}
- if (entityName.kind !== 177 && isInRightSideOfImportOrExportAssignment(entityName)) {
- var importEqualsDeclaration = ts.getAncestor(entityName, 234);
+ if (entityName.kind !== 178 && isInRightSideOfImportOrExportAssignment(entityName)) {
+ var importEqualsDeclaration = ts.getAncestor(entityName, 236);
ts.Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, true);
}
@@ -35930,7 +39984,7 @@ var ts;
}
if (isHeritageClauseElementIdentifier(entityName)) {
var meaning = 0;
- if (entityName.parent.kind === 199) {
+ if (entityName.parent.kind === 200) {
meaning = 793064;
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
meaning |= 107455;
@@ -35940,9 +39994,12 @@ var ts;
meaning = 1920;
}
meaning |= 8388608;
- return resolveEntityName(entityName, meaning);
+ var entityNameSymbol = resolveEntityName(entityName, meaning);
+ if (entityNameSymbol) {
+ return entityNameSymbol;
+ }
}
- else if (ts.isPartOfExpression(entityName)) {
+ if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
}
@@ -35952,14 +40009,14 @@ var ts;
}
return resolveEntityName(entityName, 107455, false, true);
}
- else if (entityName.kind === 177) {
+ else if (entityName.kind === 178) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkPropertyAccessExpression(entityName);
}
return getNodeLinks(entityName).resolvedSymbol;
}
- else if (entityName.kind === 141) {
+ else if (entityName.kind === 142) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkQualifiedName(entityName);
@@ -35968,19 +40025,19 @@ var ts;
}
}
else if (isTypeReferenceIdentifier(entityName)) {
- var meaning = (entityName.parent.kind === 157 || entityName.parent.kind === 272) ? 793064 : 1920;
+ var meaning = (entityName.parent.kind === 158 || entityName.parent.kind === 276) ? 793064 : 1920;
return resolveEntityName(entityName, meaning, false, true);
}
- else if (entityName.parent.kind === 250) {
+ else if (entityName.parent.kind === 252) {
return getJsxAttributePropertySymbol(entityName.parent);
}
- if (entityName.parent.kind === 156) {
+ if (entityName.parent.kind === 157) {
return resolveEntityName(entityName, 1);
}
return undefined;
}
function getSymbolAtLocation(node) {
- if (node.kind === 261) {
+ if (node.kind === 264) {
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
}
if (isInsideWithStatementBody(node)) {
@@ -35996,8 +40053,8 @@ var ts;
if (isInRightSideOfImportOrExportAssignment(node)) {
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
}
- else if (node.parent.kind === 174 &&
- node.parent.parent.kind === 172 &&
+ else if (node.parent.kind === 175 &&
+ node.parent.parent.kind === 173 &&
node === node.parent.propertyName) {
var typeOfPattern = getTypeOfNode(node.parent.parent);
var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text);
@@ -36008,8 +40065,8 @@ var ts;
}
switch (node.kind) {
case 70:
- case 177:
- case 141:
+ case 178:
+ case 142:
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
case 98:
var container = ts.getThisContainer(node, false);
@@ -36022,18 +40079,18 @@ var ts;
case 96:
var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node);
return type.symbol;
- case 167:
+ case 168:
return getTypeFromTypeNode(node).symbol;
case 122:
var constructorDeclaration = node.parent;
- if (constructorDeclaration && constructorDeclaration.kind === 150) {
+ if (constructorDeclaration && constructorDeclaration.kind === 151) {
return constructorDeclaration.parent.symbol;
}
return undefined;
case 9:
if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 235 || node.parent.kind === 241) &&
+ ((node.parent.kind === 237 || node.parent.kind === 243) &&
node.parent.moduleSpecifier === node)) {
return resolveExternalModuleName(node, node);
}
@@ -36041,7 +40098,7 @@ var ts;
return resolveExternalModuleName(node, node);
}
case 8:
- if (node.parent.kind === 178 && node.parent.argumentExpression === node) {
+ if (node.parent.kind === 179 && node.parent.argumentExpression === node) {
var objectType = getTypeOfExpression(node.parent.expression);
if (objectType === unknownType)
return undefined;
@@ -36055,7 +40112,7 @@ var ts;
return undefined;
}
function getShorthandAssignmentValueSymbol(location) {
- if (location && location.kind === 258) {
+ if (location && location.kind === 261) {
return resolveEntityName(location.name, 107455 | 8388608);
}
return undefined;
@@ -36070,13 +40127,22 @@ var ts;
return unknownType;
}
if (ts.isPartOfTypeNode(node)) {
- return getTypeFromTypeNode(node);
+ var typeFromTypeNode = getTypeFromTypeNode(node);
+ if (typeFromTypeNode && ts.isExpressionWithTypeArgumentsInClassImplementsClause(node)) {
+ var containingClass = ts.getContainingClass(node);
+ var classType = getTypeOfNode(containingClass);
+ typeFromTypeNode = getTypeWithThisArgument(typeFromTypeNode, classType.thisType);
+ }
+ return typeFromTypeNode;
}
if (ts.isPartOfExpression(node)) {
return getRegularTypeOfExpression(node);
}
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(node)) {
- return getBaseTypes(getDeclaredTypeOfSymbol(getSymbolOfNode(node.parent.parent)))[0];
+ var classNode = ts.getContainingClass(node);
+ var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(classNode));
+ var baseType = getBaseTypes(classType)[0];
+ return baseType && getTypeWithThisArgument(baseType, classType.thisType);
}
if (isTypeDeclaration(node)) {
var symbol = getSymbolOfNode(node);
@@ -36105,22 +40171,22 @@ var ts;
return unknownType;
}
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) {
- ts.Debug.assert(expr.kind === 176 || expr.kind === 175);
- if (expr.parent.kind === 213) {
- var iteratedType = checkRightHandSideOfForOf(expr.parent.expression);
+ ts.Debug.assert(expr.kind === 177 || expr.kind === 176);
+ if (expr.parent.kind === 215) {
+ var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 192) {
+ if (expr.parent.kind === 193) {
var iteratedType = getTypeOfExpression(expr.parent.right);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
- if (expr.parent.kind === 257) {
+ if (expr.parent.kind === 260) {
var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent);
return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent);
}
- ts.Debug.assert(expr.parent.kind === 175);
+ ts.Debug.assert(expr.parent.kind === 176);
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, false, false) || unknownType;
return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType);
}
function getPropertySymbolOfDestructuringAssignment(location) {
@@ -36144,29 +40210,32 @@ var ts;
var propsByName = createSymbolTable(getPropertiesOfType(type));
if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) {
ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
- if (!propsByName[p.name]) {
- propsByName[p.name] = p;
+ if (!propsByName.has(p.name)) {
+ propsByName.set(p.name, p);
}
});
}
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (symbol.flags & 268435456) {
+ if (getCheckFlags(symbol) & 6) {
var symbols_3 = [];
- var name_28 = symbol.name;
+ var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
- var symbol = getPropertyOfType(t, name_28);
+ var symbol = getPropertyOfType(t, name_2);
if (symbol) {
symbols_3.push(symbol);
}
});
return symbols_3;
}
- else if (symbol.flags & 67108864) {
+ else if (symbol.flags & 134217728) {
if (symbol.leftSpread) {
var links = symbol;
- return [links.leftSpread, links.rightSpread];
+ return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ }
+ if (symbol.syntheticOrigin) {
+ return getRootSymbols(symbol.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -36183,7 +40252,8 @@ var ts;
if (!ts.isGeneratedIdentifier(node)) {
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
- return getReferencedValueSymbol(node) === argumentsSymbol;
+ var isPropertyName_1 = node.parent.kind === 178 && node.parent.name === node;
+ return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol;
}
}
return false;
@@ -36199,7 +40269,7 @@ var ts;
if (symbolLinks.exportsSomeValue === undefined) {
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & 107455)
- : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue);
+ : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s) {
@@ -36223,19 +40293,15 @@ var ts;
}
symbol = exportSymbol;
}
- var parentSymbol = getParentOfSymbol(symbol);
- if (parentSymbol) {
- if (parentSymbol.flags & 512 && parentSymbol.valueDeclaration.kind === 261) {
- var symbolFile = parentSymbol.valueDeclaration;
+ var parentSymbol_1 = getParentOfSymbol(symbol);
+ if (parentSymbol_1) {
+ if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 264) {
+ var symbolFile = parentSymbol_1.valueDeclaration;
var referenceFile = ts.getSourceFileOfNode(node);
var symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
- for (var n = node.parent; n; n = n.parent) {
- if (ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
- return n;
- }
- }
+ return ts.findAncestor(node.parent, function (n) { return ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol_1; });
}
}
}
@@ -36263,7 +40329,7 @@ var ts;
else if (nodeLinks_1.flags & 131072) {
var isDeclaredInLoop = nodeLinks_1.flags & 262144;
var inLoopInitializer = ts.isIterationStatement(container, false);
- var inLoopBodyBlock = container.kind === 204 && ts.isIterationStatement(container.parent, false);
+ var inLoopBodyBlock = container.kind === 206 && ts.isIterationStatement(container.parent, false);
links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
}
else {
@@ -36298,21 +40364,17 @@ var ts;
return false;
}
function isValueAliasDeclaration(node) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
switch (node.kind) {
- case 234:
case 236:
- case 237:
+ case 238:
case 239:
- case 243:
- return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
case 241:
+ case 245:
+ return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
+ case 243:
var exportClause = node.exportClause;
return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
- case 240:
+ case 242:
return node.expression
&& node.expression.kind === 70
? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol)
@@ -36322,7 +40384,7 @@ var ts;
}
function isTopLevelValueImportEqualsWithEntityName(node) {
node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration);
- if (node === undefined || node.parent.kind !== 261 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+ if (node === undefined || node.parent.kind !== 264 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
return false;
}
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
@@ -36340,10 +40402,6 @@ var ts;
return isConstEnumSymbol(s) || s.constEnumOnlyModule;
}
function isReferencedAliasDeclaration(node, checkChildren) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- return true;
- }
if (ts.isAliasSymbolDeclaration(node)) {
var symbol = getSymbolOfNode(node);
if (symbol && getSymbolLinks(symbol).referenced) {
@@ -36364,16 +40422,30 @@ var ts;
}
return false;
}
+ function isRequiredInitializedParameter(parameter) {
+ return strictNullChecks &&
+ !isOptionalParameter(parameter) &&
+ parameter.initializer &&
+ !(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
- node = ts.getParseTreeNode(node);
- return node ? getNodeLinks(node).flags : undefined;
+ return getNodeLinks(node).flags;
}
function getEnumMemberValue(node) {
computeEnumMemberValues(node.parent);
return getNodeLinks(node).enumMemberValue;
}
+ function canHaveConstantValue(node) {
+ switch (node.kind) {
+ case 263:
+ case 178:
+ case 179:
+ return true;
+ }
+ return false;
+ }
function getConstantValue(node) {
- if (node.kind === 260) {
+ if (node.kind === 263) {
return getEnumMemberValue(node);
}
var symbol = getNodeLinks(node).resolvedSymbol;
@@ -36389,15 +40461,17 @@ var ts;
}
function getTypeReferenceSerializationKind(typeName, location) {
var valueSymbol = resolveEntityName(typeName, 107455, true, false, location);
- var globalPromiseSymbol = tryGetGlobalPromiseConstructorSymbol();
- if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
- return ts.TypeReferenceSerializationKind.Promise;
- }
- var constructorType = valueSymbol ? getTypeOfSymbol(valueSymbol) : undefined;
- if (constructorType && isConstructorType(constructorType)) {
- return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
- }
var typeSymbol = resolveEntityName(typeName, 793064, true, false, location);
+ if (valueSymbol && valueSymbol === typeSymbol) {
+ var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(false);
+ if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
+ return ts.TypeReferenceSerializationKind.Promise;
+ }
+ var constructorType = getTypeOfSymbol(valueSymbol);
+ if (constructorType && isConstructorType(constructorType)) {
+ return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
+ }
+ }
if (!typeSymbol) {
return ts.TypeReferenceSerializationKind.ObjectType;
}
@@ -36441,6 +40515,9 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
+ if (flags & 4096) {
+ type = includeFalsyTypes(type, 2048);
+ }
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
@@ -36455,10 +40532,13 @@ var ts;
var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node));
resolveBaseTypesOfClass(classType);
var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType;
+ if (!baseType.symbol) {
+ writer.reportIllegalExtends();
+ }
getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags);
}
function hasGlobalName(name) {
- return !!globals[name];
+ return globals.has(name);
}
function getReferencedValueSymbol(reference, startInDeclarationContainer) {
var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
@@ -36467,9 +40547,9 @@ var ts;
}
var location = reference;
if (startInDeclarationContainer) {
- var parent_11 = reference.parent;
- if (ts.isDeclaration(parent_11) && reference === parent_11.name) {
- location = getDeclarationContainer(parent_11);
+ var parent = reference.parent;
+ if (ts.isDeclaration(parent) && reference === parent.name) {
+ location = getDeclarationContainer(parent);
}
}
return resolveName(location, reference.text, 107455 | 1048576 | 8388608, undefined, undefined);
@@ -36502,34 +40582,46 @@ var ts;
var fileToDirective;
if (resolvedTypeReferenceDirectives) {
fileToDirective = ts.createFileMap();
- for (var key in resolvedTypeReferenceDirectives) {
- var resolvedDirective = resolvedTypeReferenceDirectives[key];
+ resolvedTypeReferenceDirectives.forEach(function (resolvedDirective, key) {
if (!resolvedDirective) {
- continue;
+ return;
}
var file = host.getSourceFile(resolvedDirective.resolvedFileName);
fileToDirective.set(file.path, key);
- }
+ });
}
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedDeclarationWithCollidingName: getReferencedDeclarationWithCollidingName,
isDeclarationWithCollidingName: isDeclarationWithCollidingName,
- isValueAliasDeclaration: isValueAliasDeclaration,
+ isValueAliasDeclaration: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? isValueAliasDeclaration(node) : true;
+ },
hasGlobalName: hasGlobalName,
- isReferencedAliasDeclaration: isReferencedAliasDeclaration,
- getNodeCheckFlags: getNodeCheckFlags,
+ isReferencedAliasDeclaration: function (node, checkChildren) {
+ node = ts.getParseTreeNode(node);
+ return node ? isReferencedAliasDeclaration(node, checkChildren) : true;
+ },
+ getNodeCheckFlags: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getNodeCheckFlags(node) : undefined;
+ },
isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
+ isRequiredInitializedParameter: isRequiredInitializedParameter,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
- getConstantValue: getConstantValue,
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
collectLinkedAliases: collectLinkedAliases,
getReferencedValueDeclaration: getReferencedValueDeclaration,
getTypeReferenceSerializationKind: getTypeReferenceSerializationKind,
@@ -36547,7 +40639,7 @@ var ts;
if (!fileToDirective) {
return undefined;
}
- var meaning = (node.kind === 177) || (node.kind === 70 && isInTypeQuery(node))
+ var meaning = (node.kind === 178) || (node.kind === 70 && isInTypeQuery(node))
? 107455 | 1048576
: 793064 | 1920;
var symbol = resolveEntityName(node, meaning, true);
@@ -36582,15 +40674,15 @@ var ts;
}
var current = symbol;
while (true) {
- var parent_12 = getParentOfSymbol(current);
- if (parent_12) {
- current = parent_12;
+ var parent = getParentOfSymbol(current);
+ if (parent) {
+ current = parent;
}
else {
break;
}
}
- if (current.valueDeclaration && current.valueDeclaration.kind === 261 && current.flags & 512) {
+ if (current.valueDeclaration && current.valueDeclaration.kind === 264 && current.flags & 512) {
return false;
}
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
@@ -36609,7 +40701,7 @@ var ts;
if (!moduleSymbol) {
return undefined;
}
- return ts.getDeclarationOfKind(moduleSymbol, 261);
+ return ts.getDeclarationOfKind(moduleSymbol, 264);
}
function initializeTypeChecker() {
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
@@ -36617,8 +40709,6 @@ var ts;
ts.bindSourceFile(file, compilerOptions);
}
var augmentations;
- var requestedExternalEmitHelpers = 0;
- var firstFileRequestingExternalHelpers;
for (var _b = 0, _c = host.getSourceFiles(); _b < _c.length; _b++) {
var file = _c[_b];
if (!ts.isExternalOrCommonJsModule(file)) {
@@ -36632,20 +40722,11 @@ var ts;
}
if (file.symbol && file.symbol.globalExports) {
var source = file.symbol.globalExports;
- for (var id in source) {
- if (!(id in globals)) {
- globals[id] = source[id];
- }
- }
- }
- if ((compilerOptions.isolatedModules || ts.isExternalModule(file)) && !file.isDeclarationFile) {
- var fileRequestedExternalEmitHelpers = file.flags & 64512;
- if (fileRequestedExternalEmitHelpers) {
- requestedExternalEmitHelpers |= fileRequestedExternalEmitHelpers;
- if (firstFileRequestingExternalHelpers === undefined) {
- firstFileRequestingExternalHelpers = file;
+ source.forEach(function (sourceSymbol, id) {
+ if (!globals.has(id)) {
+ globals.set(id, sourceSymbol);
}
- }
+ });
}
}
if (augmentations) {
@@ -36659,116 +40740,80 @@ var ts;
}
addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
- getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
+ getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments", 0, true);
getSymbolLinks(unknownSymbol).type = unknownType;
- globalArrayType = getGlobalType("Array", 1);
- globalObjectType = getGlobalType("Object");
- globalFunctionType = getGlobalType("Function");
- globalStringType = getGlobalType("String");
- globalNumberType = getGlobalType("Number");
- globalBooleanType = getGlobalType("Boolean");
- globalRegExpType = getGlobalType("RegExp");
- jsxElementType = getExportedTypeFromNamespace("JSX", JsxNames.Element);
- getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
- getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
- getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
- getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
- getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", 1); });
- getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); });
- getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", 1); });
- tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064, undefined) && getGlobalPromiseType(); });
- getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", 1); });
- getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType);
- getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); });
- tryGetGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalSymbol("Promise", 107455, undefined) && getGlobalPromiseConstructorSymbol(); });
- getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); });
- getGlobalThenableType = ts.memoize(createThenableType);
- getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); });
- if (languageVersion >= 2) {
- getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); });
- getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", 1); });
- getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", 1); });
- getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", 1); });
- }
- else {
- getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; });
- getGlobalIterableType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; });
- }
+ globalArrayType = getGlobalType("Array", 1, true);
+ globalObjectType = getGlobalType("Object", 0, true);
+ globalFunctionType = getGlobalType("Function", 0, true);
+ globalStringType = getGlobalType("String", 0, true);
+ globalNumberType = getGlobalType("Number", 0, true);
+ globalBooleanType = getGlobalType("Boolean", 0, true);
+ globalRegExpType = getGlobalType("RegExp", 0, true);
anyArrayType = createArrayType(anyType);
autoArrayType = createArrayType(autoType);
- var symbol = getGlobalSymbol("ReadonlyArray", 793064, undefined);
- globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, 1);
+ globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", 1);
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
- if (compilerOptions.importHelpers && firstFileRequestingExternalHelpers) {
- var helpersModule = resolveExternalModule(firstFileRequestingExternalHelpers, ts.externalHelpersModuleNameText, ts.Diagnostics.Cannot_find_module_0, undefined);
- if (helpersModule) {
- var exports_2 = helpersModule.exports;
- if (requestedExternalEmitHelpers & 1024 && languageVersion < 2) {
- verifyHelperSymbol(exports_2, "__extends", 107455);
- }
- if (requestedExternalEmitHelpers & 16384 &&
- (languageVersion < 5 || compilerOptions.jsx === 2)) {
- verifyHelperSymbol(exports_2, "__assign", 107455);
- }
- if (languageVersion < 5 && requestedExternalEmitHelpers & 32768) {
- verifyHelperSymbol(exports_2, "__rest", 107455);
- }
- if (requestedExternalEmitHelpers & 2048) {
- verifyHelperSymbol(exports_2, "__decorate", 107455);
- if (compilerOptions.emitDecoratorMetadata) {
- verifyHelperSymbol(exports_2, "__metadata", 107455);
- }
- }
- if (requestedExternalEmitHelpers & 4096) {
- verifyHelperSymbol(exports_2, "__param", 107455);
- }
- if (requestedExternalEmitHelpers & 8192) {
- verifyHelperSymbol(exports_2, "__awaiter", 107455);
- if (languageVersion < 2) {
- verifyHelperSymbol(exports_2, "__generator", 107455);
+ globalThisType = getGlobalTypeOrUndefined("ThisType", 1);
+ }
+ function checkExternalEmitHelpers(location, helpers) {
+ if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
+ var sourceFile = ts.getSourceFileOfNode(location);
+ if (ts.isEffectiveExternalModule(sourceFile, compilerOptions) && !ts.isInAmbientContext(location)) {
+ var helpersModule = resolveHelpersModule(sourceFile, location);
+ if (helpersModule !== unknownSymbol) {
+ var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
+ for (var helper = 1; helper <= 8192; helper <<= 1) {
+ if (uncheckedHelpers & helper) {
+ var name = getHelperName(helper);
+ var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
+ if (!symbol) {
+ error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ }
+ }
}
}
+ requestedExternalEmitHelpers |= helpers;
}
}
}
- function verifyHelperSymbol(symbols, name, meaning) {
- var symbol = getSymbol(symbols, ts.escapeIdentifier(name), meaning);
- if (!symbol) {
- error(undefined, ts.Diagnostics.Module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ function getHelperName(helper) {
+ switch (helper) {
+ case 1: return "__extends";
+ case 2: return "__assign";
+ case 4: return "__rest";
+ case 8: return "__decorate";
+ case 16: return "__metadata";
+ case 32: return "__param";
+ case 64: return "__awaiter";
+ case 128: return "__generator";
+ case 256: return "__values";
+ case 512: return "__read";
+ case 1024: return "__spread";
+ case 2048: return "__asyncGenerator";
+ case 4096: return "__asyncDelegator";
+ case 8192: return "__asyncValues";
+ default: ts.Debug.fail("Unrecognized helper.");
}
}
- function createInstantiatedPromiseLikeType() {
- var promiseLikeType = getGlobalPromiseLikeType();
- if (promiseLikeType !== emptyGenericType) {
- return createTypeReference(promiseLikeType, [anyType]);
+ function resolveHelpersModule(node, errorNode) {
+ if (!externalHelpersModule) {
+ externalHelpersModule = resolveExternalModule(node, ts.externalHelpersModuleNameText, ts.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;
}
- return emptyObjectType;
- }
- function createThenableType() {
- var thenPropertySymbol = createSymbol(67108864 | 4, "then");
- getSymbolLinks(thenPropertySymbol).type = globalFunctionType;
- var thenableType = createObjectType(16);
- thenableType.properties = [thenPropertySymbol];
- thenableType.members = createSymbolTable(thenableType.properties);
- thenableType.callSignatures = [];
- thenableType.constructSignatures = [];
- return thenableType;
+ return externalHelpersModule;
}
function checkGrammarDecorators(node) {
if (!node.decorators) {
return false;
}
if (!ts.nodeCanBeDecorated(node)) {
- if (node.kind === 149 && !ts.nodeIsPresent(node.body)) {
+ if (node.kind === 150 && !ts.nodeIsPresent(node.body)) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
}
else {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
}
}
- else if (node.kind === 151 || node.kind === 152) {
+ else if (node.kind === 152 || node.kind === 153) {
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -36786,16 +40831,16 @@ var ts;
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
var modifier = _a[_i];
if (modifier.kind !== 130) {
- if (node.kind === 146 || node.kind === 148) {
+ if (node.kind === 147 || node.kind === 149) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
}
- if (node.kind === 155) {
+ if (node.kind === 156) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
}
}
switch (modifier.kind) {
case 75:
- if (node.kind !== 229 && node.parent.kind === 226) {
+ if (node.kind !== 231 && node.parent.kind === 228) {
return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75));
}
break;
@@ -36821,7 +40866,7 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
}
else if (flags & 128) {
@@ -36844,10 +40889,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
}
- else if (node.parent.kind === 231 || node.parent.kind === 261) {
+ else if (node.parent.kind === 233 || node.parent.kind === 264) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
}
else if (flags & 128) {
@@ -36860,7 +40905,7 @@ var ts;
if (flags & 64) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
}
- else if (node.kind !== 147 && node.kind !== 146 && node.kind !== 155 && node.kind !== 144) {
+ else if (node.kind !== 148 && node.kind !== 147 && node.kind !== 156 && node.kind !== 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
flags |= 64;
@@ -36879,10 +40924,10 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
}
flags |= 1;
@@ -36894,13 +40939,13 @@ var ts;
else if (flags & 256) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
}
- else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 231) {
+ else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233) {
return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
}
flags |= 2;
@@ -36910,14 +40955,14 @@ var ts;
if (flags & 128) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
}
- if (node.kind !== 226) {
- if (node.kind !== 149 &&
- node.kind !== 147 &&
- node.kind !== 151 &&
- node.kind !== 152) {
+ if (node.kind !== 228) {
+ if (node.kind !== 150 &&
+ node.kind !== 148 &&
+ node.kind !== 152 &&
+ node.kind !== 153) {
return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
}
- if (!(node.parent.kind === 226 && ts.getModifierFlags(node.parent) & 128)) {
+ if (!(node.parent.kind === 228 && ts.getModifierFlags(node.parent) & 128)) {
return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
}
if (flags & 32) {
@@ -36936,7 +40981,7 @@ var ts;
else if (flags & 2 || ts.isInAmbientContext(node.parent)) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.kind === 144) {
+ else if (node.kind === 145) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
}
flags |= 256;
@@ -36944,7 +40989,7 @@ var ts;
break;
}
}
- if (node.kind === 150) {
+ if (node.kind === 151) {
if (flags & 32) {
return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
@@ -36959,13 +41004,13 @@ var ts;
}
return;
}
- else if ((node.kind === 235 || node.kind === 234) && flags & 2) {
+ else if ((node.kind === 237 || node.kind === 236) && flags & 2) {
return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
}
- else if (node.kind === 144 && (flags & 92) && ts.isBindingPattern(node.name)) {
+ else if (node.kind === 145 && (flags & 92) && ts.isBindingPattern(node.name)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
}
- else if (node.kind === 144 && (flags & 92) && node.dotDotDotToken) {
+ else if (node.kind === 145 && (flags & 92) && node.dotDotDotToken) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
}
if (flags & 256) {
@@ -36981,37 +41026,37 @@ var ts;
}
function shouldReportBadModifier(node) {
switch (node.kind) {
- case 151:
case 152:
- case 150:
+ case 153:
+ case 151:
+ case 148:
case 147:
- case 146:
+ case 150:
case 149:
- case 148:
- case 155:
- case 230:
- case 235:
- case 234:
- case 241:
- case 240:
- case 184:
+ case 156:
+ case 232:
+ case 237:
+ case 236:
+ case 243:
+ case 242:
case 185:
- case 144:
+ case 186:
+ case 145:
return false;
default:
- if (node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 233 || node.parent.kind === 264) {
return false;
}
switch (node.kind) {
- case 225:
- return nodeHasAnyModifiersExcept(node, 119);
- case 226:
- return nodeHasAnyModifiersExcept(node, 116);
case 227:
- case 205:
+ return nodeHasAnyModifiersExcept(node, 119);
case 228:
- return true;
+ return nodeHasAnyModifiersExcept(node, 116);
case 229:
+ case 207:
+ case 230:
+ return true;
+ case 231:
return nodeHasAnyModifiersExcept(node, 75);
default:
ts.Debug.fail();
@@ -37024,14 +41069,11 @@ var ts;
}
function checkGrammarAsyncModifier(node, asyncModifier) {
switch (node.kind) {
- case 149:
- case 225:
- case 184:
+ case 150:
+ case 227:
case 185:
- if (!node.asteriskToken) {
- return false;
- }
- break;
+ case 186:
+ return false;
}
return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
}
@@ -37088,8 +41130,12 @@ var ts;
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) ||
checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
}
+ function checkGrammarClassLikeDeclaration(node) {
+ var file = ts.getSourceFileOfNode(node);
+ return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);
+ }
function checkGrammarArrowFunction(node, file) {
- if (node.kind === 185) {
+ if (node.kind === 186) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
@@ -37124,7 +41170,7 @@ var ts;
if (!parameter.type) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
}
- if (parameter.type.kind !== 134 && parameter.type.kind !== 132) {
+ if (parameter.type.kind !== 135 && parameter.type.kind !== 132) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
}
if (!node.type) {
@@ -37151,7 +41197,7 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
var arg = args_4[_i];
- if (arg.kind === 198) {
+ if (arg.kind === 199) {
return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
}
}
@@ -37221,28 +41267,25 @@ var ts;
return false;
}
function checkGrammarComputedPropertyName(node) {
- if (node.kind !== 142) {
+ if (node.kind !== 143) {
return false;
}
var computedPropertyName = node;
- if (computedPropertyName.expression.kind === 192 && computedPropertyName.expression.operatorToken.kind === 25) {
+ if (computedPropertyName.expression.kind === 193 && computedPropertyName.expression.operatorToken.kind === 25) {
return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
}
}
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
- ts.Debug.assert(node.kind === 225 ||
- node.kind === 184 ||
- node.kind === 149);
+ ts.Debug.assert(node.kind === 227 ||
+ node.kind === 185 ||
+ node.kind === 150);
if (ts.isInAmbientContext(node)) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
}
if (!node.body) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
}
- if (languageVersion < 2) {
- return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher);
- }
}
}
function checkGrammarForInvalidQuestionMark(questionToken, message) {
@@ -37258,87 +41301,87 @@ var ts;
var GetOrSetAccessor = GetAccessor | SetAccessor;
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259) {
+ if (prop.kind === 262) {
continue;
}
- var name_29 = prop.name;
- if (name_29.kind === 142) {
- checkGrammarComputedPropertyName(name_29);
+ var name = prop.name;
+ if (name.kind === 143) {
+ checkGrammarComputedPropertyName(name);
}
- if (prop.kind === 258 && !inDestructuring && prop.objectAssignmentInitializer) {
+ if (prop.kind === 261 && !inDestructuring && prop.objectAssignmentInitializer) {
return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
}
if (prop.modifiers) {
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
var mod = _c[_b];
- if (mod.kind !== 119 || prop.kind !== 149) {
+ if (mod.kind !== 119 || prop.kind !== 150) {
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
}
}
}
var currentKind = void 0;
- if (prop.kind === 257 || prop.kind === 258) {
+ if (prop.kind === 260 || prop.kind === 261) {
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
- if (name_29.kind === 8) {
- checkGrammarNumericLiteral(name_29);
+ if (name.kind === 8) {
+ checkGrammarNumericLiteral(name);
}
currentKind = Property;
}
- else if (prop.kind === 149) {
+ else if (prop.kind === 150) {
currentKind = Property;
}
- else if (prop.kind === 151) {
+ else if (prop.kind === 152) {
currentKind = GetAccessor;
}
- else if (prop.kind === 152) {
+ else if (prop.kind === 153) {
currentKind = SetAccessor;
}
else {
ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
}
- var effectiveName = ts.getPropertyNameForPropertyNameNode(name_29);
+ var effectiveName = ts.getPropertyNameForPropertyNameNode(name);
if (effectiveName === undefined) {
continue;
}
- if (!seen[effectiveName]) {
- seen[effectiveName] = currentKind;
+ var existingKind = seen.get(effectiveName);
+ if (!existingKind) {
+ seen.set(effectiveName, currentKind);
}
else {
- var existingKind = seen[effectiveName];
if (currentKind === Property && existingKind === Property) {
- grammarErrorOnNode(name_29, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_29));
+ grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
}
else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
- seen[effectiveName] = currentKind | existingKind;
+ seen.set(effectiveName, currentKind | existingKind);
}
else {
- return grammarErrorOnNode(name_29, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
}
}
else {
- return grammarErrorOnNode(name_29, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
}
}
}
}
function checkGrammarJsxElement(node) {
var seen = ts.createMap();
- for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
+ for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
var attr = _a[_i];
- if (attr.kind === 251) {
+ if (attr.kind === 254) {
continue;
}
var jsxAttr = attr;
- var name_30 = jsxAttr.name;
- if (!seen[name_30.text]) {
- seen[name_30.text] = true;
+ var name = jsxAttr.name;
+ if (!seen.get(name.text)) {
+ seen.set(name.text, true);
}
else {
- return grammarErrorOnNode(name_30, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
}
var initializer = jsxAttr.initializer;
- if (initializer && initializer.kind === 252 && !initializer.expression) {
+ if (initializer && initializer.kind === 255 && !initializer.expression) {
return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
}
}
@@ -37347,7 +41390,12 @@ var ts;
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
- if (forInOrOfStatement.initializer.kind === 224) {
+ if (forInOrOfStatement.kind === 215 && forInOrOfStatement.awaitModifier) {
+ if ((forInOrOfStatement.flags & 16384) === 0) {
+ return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);
+ }
+ }
+ if (forInOrOfStatement.initializer.kind === 226) {
var variableList = forInOrOfStatement.initializer;
if (!checkGrammarVariableDeclarationList(variableList)) {
var declarations = variableList.declarations;
@@ -37355,20 +41403,20 @@ var ts;
return false;
}
if (declarations.length > 1) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
: ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
}
var firstDeclaration = declarations[0];
if (firstDeclaration.initializer) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
: ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
}
if (firstDeclaration.type) {
- var diagnostic = forInOrOfStatement.kind === 212
+ var diagnostic = forInOrOfStatement.kind === 214
? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
: ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -37388,15 +41436,18 @@ var ts;
else if (accessor.body === undefined && !(ts.getModifierFlags(accessor) & 128)) {
return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
}
+ else if (accessor.body && ts.getModifierFlags(accessor) & 128) {
+ return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+ }
else if (accessor.typeParameters) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
}
else if (!doesAccessorHaveCorrectParameterCount(accessor)) {
- return grammarErrorOnNode(accessor.name, kind === 151 ?
+ return grammarErrorOnNode(accessor.name, kind === 152 ?
ts.Diagnostics.A_get_accessor_cannot_have_parameters :
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
}
- else if (kind === 152) {
+ else if (kind === 153) {
if (accessor.type) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
}
@@ -37415,10 +41466,10 @@ var ts;
}
}
function doesAccessorHaveCorrectParameterCount(accessor) {
- return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 151 ? 0 : 1);
+ return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 ? 0 : 1);
}
function getAccessorThisParameter(accessor) {
- if (accessor.parameters.length === (accessor.kind === 151 ? 1 : 2)) {
+ if (accessor.parameters.length === (accessor.kind === 152 ? 1 : 2)) {
return ts.getThisParameter(accessor);
}
}
@@ -37433,7 +41484,7 @@ var ts;
checkGrammarForGenerator(node)) {
return true;
}
- if (node.parent.kind === 176) {
+ if (node.parent.kind === 177) {
if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
return true;
}
@@ -37449,10 +41500,10 @@ var ts;
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -37463,9 +41514,9 @@ var ts;
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (current.kind) {
- case 219:
+ case 221:
if (node.label && current.label.text === node.label.text) {
- var isMisplacedContinueLabel = node.kind === 214
+ var isMisplacedContinueLabel = node.kind === 216
&& !ts.isIterationStatement(current.statement, true);
if (isMisplacedContinueLabel) {
return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -37473,8 +41524,8 @@ var ts;
return false;
}
break;
- case 218:
- if (node.kind === 215 && !node.label) {
+ case 220:
+ if (node.kind === 217 && !node.label) {
return false;
}
break;
@@ -37487,13 +41538,13 @@ var ts;
current = current.parent;
}
if (node.label) {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
: ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
}
else {
- var message = node.kind === 215
+ var message = node.kind === 217
? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
: ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
@@ -37505,7 +41556,7 @@ var ts;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
}
- if (node.name.kind === 173 || node.name.kind === 172) {
+ if (node.name.kind === 174 || node.name.kind === 173) {
return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
}
if (node.initializer) {
@@ -37515,11 +41566,11 @@ var ts;
}
function isStringOrNumberLiteralExpression(expr) {
return expr.kind === 9 || expr.kind === 8 ||
- expr.kind === 190 && expr.operator === 37 &&
+ expr.kind === 191 && expr.operator === 37 &&
expr.operand.kind === 8;
}
function checkGrammarVariableDeclaration(node) {
- if (node.parent.parent.kind !== 212 && node.parent.parent.kind !== 213) {
+ if (node.parent.parent.kind !== 214 && node.parent.parent.kind !== 215) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
if (ts.isConst(node) && !node.type) {
@@ -37546,9 +41597,29 @@ var ts;
}
}
}
+ if (compilerOptions.module !== ts.ModuleKind.ES2015 && compilerOptions.module !== ts.ModuleKind.System && !compilerOptions.noEmit &&
+ !ts.isInAmbientContext(node.parent.parent) && ts.hasModifier(node.parent.parent, 1)) {
+ checkESModuleMarker(node.name);
+ }
var checkLetConstNames = (ts.isLet(node) || ts.isConst(node));
return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
}
+ function checkESModuleMarker(name) {
+ if (name.kind === 70) {
+ if (ts.unescapeIdentifier(name.text) === "__esModule") {
+ return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
+ }
+ }
+ else {
+ var elements = name.elements;
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var element = elements_2[_i];
+ if (!ts.isOmittedExpression(element)) {
+ return checkESModuleMarker(element.name);
+ }
+ }
+ }
+ }
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 70) {
if (name.originalKeywordKind === 109) {
@@ -37557,8 +41628,8 @@ var ts;
}
else {
var elements = name.elements;
- for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
- var element = elements_2[_i];
+ for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
+ var element = elements_3[_i];
if (!ts.isOmittedExpression(element)) {
checkGrammarNameInLetOrConstDeclarations(element.name);
}
@@ -37576,15 +41647,15 @@ var ts;
}
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
- case 208:
- case 209:
case 210:
- case 217:
case 211:
case 212:
+ case 219:
case 213:
+ case 214:
+ case 215:
return false;
- case 219:
+ case 221:
return allowLetAndConstDeclarations(parent.parent);
}
return true;
@@ -37599,6 +41670,13 @@ var ts;
}
}
}
+ function checkGrammarMetaProperty(node) {
+ if (node.keywordToken === 93) {
+ if (node.name.text !== "target") {
+ return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target");
+ }
+ }
+ }
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
}
@@ -37639,7 +41717,7 @@ var ts;
return true;
}
}
- else if (node.parent.kind === 227) {
+ else if (node.parent.kind === 229) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -37647,7 +41725,7 @@ var ts;
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
}
}
- else if (node.parent.kind === 161) {
+ else if (node.parent.kind === 162) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -37660,13 +41738,13 @@ var ts;
}
}
function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
- if (node.kind === 227 ||
- node.kind === 228 ||
+ if (node.kind === 229 ||
+ node.kind === 230 ||
+ node.kind === 237 ||
+ node.kind === 236 ||
+ node.kind === 243 ||
+ node.kind === 242 ||
node.kind === 235 ||
- node.kind === 234 ||
- node.kind === 241 ||
- node.kind === 240 ||
- node.kind === 233 ||
ts.getModifierFlags(node) & (2 | 1 | 512)) {
return false;
}
@@ -37675,7 +41753,7 @@ var ts;
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
- if (ts.isDeclaration(decl) || decl.kind === 205) {
+ if (ts.isDeclaration(decl) || decl.kind === 207) {
if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
return true;
}
@@ -37694,7 +41772,7 @@ var ts;
if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
}
- if (node.parent.kind === 204 || node.parent.kind === 231 || node.parent.kind === 261) {
+ if (node.parent.kind === 206 || node.parent.kind === 233 || node.parent.kind === 264) {
var links_1 = getNodeLinks(node.parent);
if (!links_1.hasReportedStatementInAmbientContext) {
return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
@@ -37705,8 +41783,22 @@ var ts;
}
}
function checkGrammarNumericLiteral(node) {
- if (node.isOctalLiteral && languageVersion >= 1) {
- return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
+ if (node.numericLiteralFlags & 4) {
+ var diagnosticMessage = void 0;
+ if (languageVersion >= 1) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 172)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 263)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
+ }
+ if (diagnosticMessage) {
+ var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37;
+ var literal = (withMinus ? "-" : "") + "0o" + node.text;
+ return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
+ }
}
}
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
@@ -37719,11 +41811,11 @@ var ts;
}
function getAmbientModules() {
var result = [];
- for (var sym in globals) {
+ globals.forEach(function (global, sym) {
if (ambientModuleSymbolRegex.test(sym)) {
- result.push(globals[sym]);
+ result.push(global);
}
- }
+ });
return result;
}
}
@@ -37731,55 +41823,359 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ;
- var nodeEdgeTraversalMap = ts.createMap((_a = {},
- _a[141] = [
- { name: "left", test: ts.isEntityName },
- { name: "right", test: ts.isIdentifier }
- ],
- _a[145] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[182] = [
- { name: "type", test: ts.isTypeNode },
- { name: "expression", test: ts.isUnaryExpression }
- ],
- _a[200] = [
- { name: "expression", test: ts.isExpression },
- { name: "type", test: ts.isTypeNode }
- ],
- _a[201] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[229] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "members", test: ts.isEnumMember }
- ],
- _a[230] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isModuleName },
- { name: "body", test: ts.isModuleBody }
- ],
- _a[231] = [
- { name: "statements", test: ts.isStatement }
- ],
- _a[234] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "moduleReference", test: ts.isModuleReference }
- ],
- _a[245] = [
- { name: "expression", test: ts.isExpression, optional: true }
- ],
- _a[260] = [
- { name: "name", test: ts.isPropertyName },
- { name: "initializer", test: ts.isExpression, optional: true, parenthesize: ts.parenthesizeExpressionForList }
- ],
- _a));
+ function visitNode(node, visitor, test, lift) {
+ if (node === undefined || visitor === undefined) {
+ return node;
+ }
+ ts.aggregateTransformFlags(node);
+ var visited = visitor(node);
+ if (visited === node) {
+ return node;
+ }
+ var visitedNode;
+ if (visited === undefined) {
+ return undefined;
+ }
+ else if (ts.isArray(visited)) {
+ visitedNode = (lift || extractSingleNode)(visited);
+ }
+ else {
+ visitedNode = visited;
+ }
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ return visitedNode;
+ }
+ ts.visitNode = visitNode;
+ function visitNodes(nodes, visitor, test, start, count) {
+ if (nodes === undefined || visitor === undefined) {
+ return nodes;
+ }
+ var updated;
+ var length = nodes.length;
+ if (start === undefined || start < 0) {
+ start = 0;
+ }
+ if (count === undefined || count > length - start) {
+ count = length - start;
+ }
+ if (start > 0 || count < length) {
+ updated = ts.createNodeArray([], nodes.hasTrailingComma && start + count === length);
+ }
+ for (var i = 0; i < count; i++) {
+ var node = nodes[i + start];
+ ts.aggregateTransformFlags(node);
+ var visited = node !== undefined ? visitor(node) : undefined;
+ if (updated !== undefined || visited === undefined || visited !== node) {
+ if (updated === undefined) {
+ updated = ts.createNodeArray(nodes.slice(0, i), nodes.hasTrailingComma);
+ ts.setTextRange(updated, nodes);
+ }
+ if (visited) {
+ if (ts.isArray(visited)) {
+ for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
+ var visitedNode = visited_1[_i];
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ updated.push(visitedNode);
+ }
+ }
+ else {
+ ts.Debug.assertNode(visited, test);
+ ts.aggregateTransformFlags(visited);
+ updated.push(visited);
+ }
+ }
+ }
+ }
+ return updated || nodes;
+ }
+ ts.visitNodes = visitNodes;
+ function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
+ context.startLexicalEnvironment();
+ statements = visitNodes(statements, visitor, ts.isStatement, start);
+ if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
+ statements = ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements)), statements);
+ }
+ var declarations = context.endLexicalEnvironment();
+ return ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements);
+ }
+ ts.visitLexicalEnvironment = visitLexicalEnvironment;
+ function visitParameterList(nodes, visitor, context, nodesVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ context.startLexicalEnvironment();
+ var updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
+ context.suspendLexicalEnvironment();
+ return updated;
+ }
+ ts.visitParameterList = visitParameterList;
+ function visitFunctionBody(node, visitor, context) {
+ context.resumeLexicalEnvironment();
+ var updated = visitNode(node, visitor, ts.isConciseBody);
+ var declarations = context.endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(updated);
+ var statements = ts.mergeLexicalEnvironment(block.statements, declarations);
+ return ts.updateBlock(block, statements);
+ }
+ return updated;
+ }
+ ts.visitFunctionBody = visitFunctionBody;
+ function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ if (node === undefined) {
+ return undefined;
+ }
+ var kind = node.kind;
+ if ((kind > 0 && kind <= 141) || kind === 168) {
+ return node;
+ }
+ switch (node.kind) {
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 297:
+ case 246:
+ return node;
+ case 142:
+ return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
+ case 143:
+ return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 159:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 154:
+ return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 155:
+ return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 149:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 156:
+ return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 145:
+ return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 146:
+ return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 158:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
+ case 162:
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ case 163:
+ return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
+ case 164:
+ return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
+ case 165:
+ case 166:
+ return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ case 167:
+ throw ts.Debug.fail("not implemented.");
+ case 169:
+ return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
+ case 170:
+ return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
+ case 171:
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
+ case 172:
+ return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
+ case 144:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
+ case 147:
+ return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 148:
+ return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 150:
+ return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 151:
+ return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 153:
+ return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 173:
+ return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
+ case 174:
+ return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
+ case 175:
+ return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 176:
+ return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression));
+ case 177:
+ return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
+ case 178:
+ return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
+ case 179:
+ return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
+ case 180:
+ return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 181:
+ return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 182:
+ return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
+ case 183:
+ return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 184:
+ return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 185:
+ return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 186:
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 187:
+ return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 188:
+ return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 189:
+ return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 190:
+ return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 193:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
+ case 191:
+ return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 192:
+ return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
+ case 195:
+ return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+ case 196:
+ return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression));
+ case 197:
+ return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 198:
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 200:
+ return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 201:
+ return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
+ case 202:
+ return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
+ case 206:
+ return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 207:
+ return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
+ case 209:
+ return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 210:
+ return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock));
+ case 211:
+ return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
+ case 212:
+ return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 213:
+ return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 214:
+ return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 215:
+ return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 216:
+ return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 217:
+ return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 218:
+ return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 219:
+ return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 220:
+ return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
+ case 221:
+ return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 222:
+ return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 223:
+ return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock));
+ case 225:
+ return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 226:
+ return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+ case 227:
+ return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 228:
+ return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 231:
+ return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+ case 232:
+ return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody));
+ case 233:
+ return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 234:
+ return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference));
+ case 237:
+ return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 238:
+ return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings));
+ case 239:
+ return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
+ case 240:
+ return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+ case 241:
+ return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 242:
+ return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
+ case 243:
+ return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 244:
+ return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+ case 245:
+ return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 247:
+ return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 248:
+ return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
+ case 253:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
+ case 249:
+ return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 250:
+ return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 251:
+ return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
+ case 252:
+ return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 255:
+ return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 256:
+ return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 257:
+ return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 258:
+ return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
+ case 259:
+ return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
+ case 260:
+ return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 261:
+ return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
+ case 262:
+ return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 263:
+ return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 264:
+ return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
+ case 295:
+ return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ default:
+ return node;
+ }
+ }
+ ts.visitEachChild = visitEachChild;
+ function extractSingleNode(nodes) {
+ ts.Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
+ return ts.singleOrUndefined(nodes);
+ }
+})(ts || (ts = {}));
+(function (ts) {
function reduceNode(node, f, initial) {
return node ? f(initial, node) : initial;
}
@@ -37793,41 +42189,45 @@ var ts;
var reduceNodes = cbNodeArray ? reduceNodeArray : ts.reduceLeft;
var cbNodes = cbNodeArray || cbNode;
var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
+ if ((kind > 0 && kind <= 141)) {
return initial;
}
- if ((kind >= 156 && kind <= 171)) {
+ if ((kind >= 157 && kind <= 172)) {
return initial;
}
var result = initial;
switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- case 293:
+ case 205:
+ case 208:
+ case 199:
+ case 224:
+ case 294:
break;
case 142:
+ result = reduceNode(node.left, cbNode, result);
+ result = reduceNode(node.right, cbNode, result);
+ break;
+ case 143:
result = reduceNode(node.expression, cbNode, result);
break;
- case 144:
+ case 145:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 145:
+ case 146:
result = reduceNode(node.expression, cbNode, result);
break;
- case 147:
+ case 148:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 149:
+ case 150:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -37836,12 +42236,12 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 150:
+ case 151:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 151:
+ case 152:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -37849,51 +42249,55 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 152:
+ case 153:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 172:
case 173:
+ case 174:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 174:
+ case 175:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 175:
+ case 176:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 176:
+ case 177:
result = reduceNodes(node.properties, cbNodes, result);
break;
- case 177:
+ case 178:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 178:
+ case 179:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.argumentExpression, cbNode, result);
break;
- case 179:
+ case 180:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 180:
+ case 181:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 181:
+ case 182:
result = reduceNode(node.tag, cbNode, result);
result = reduceNode(node.template, cbNode, result);
break;
- case 184:
+ case 183:
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 185:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
@@ -37901,117 +42305,124 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 185:
+ case 186:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 183:
- case 186:
+ case 184:
case 187:
case 188:
case 189:
- case 195:
+ case 190:
case 196:
- case 201:
+ case 197:
+ case 202:
result = reduceNode(node.expression, cbNode, result);
break;
- case 190:
case 191:
+ case 192:
result = reduceNode(node.operand, cbNode, result);
break;
- case 192:
+ case 193:
result = reduceNode(node.left, cbNode, result);
result = reduceNode(node.right, cbNode, result);
break;
- case 193:
+ case 194:
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.whenTrue, cbNode, result);
result = reduceNode(node.whenFalse, cbNode, result);
break;
- case 194:
+ case 195:
result = reduceNode(node.head, cbNode, result);
result = reduceNodes(node.templateSpans, cbNodes, result);
break;
- case 197:
+ case 198:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 199:
+ case 200:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
break;
+ case 201:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ break;
case 202:
result = reduceNode(node.expression, cbNode, result);
- result = reduceNode(node.literal, cbNode, result);
break;
case 204:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.literal, cbNode, result);
+ break;
+ case 206:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 205:
+ case 207:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.declarationList, cbNode, result);
break;
- case 207:
+ case 209:
result = reduceNode(node.expression, cbNode, result);
break;
- case 208:
+ case 210:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.thenStatement, cbNode, result);
result = reduceNode(node.elseStatement, cbNode, result);
break;
- case 209:
+ case 211:
result = reduceNode(node.statement, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 210:
- case 217:
+ case 212:
+ case 219:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 211:
+ case 213:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.incrementor, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 212:
- case 213:
+ case 214:
+ case 215:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 216:
- case 220:
+ case 218:
+ case 222:
result = reduceNode(node.expression, cbNode, result);
break;
- case 218:
+ case 220:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.caseBlock, cbNode, result);
break;
- case 219:
+ case 221:
result = reduceNode(node.label, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 221:
+ case 223:
result = reduceNode(node.tryBlock, cbNode, result);
result = reduceNode(node.catchClause, cbNode, result);
result = reduceNode(node.finallyBlock, cbNode, result);
break;
- case 223:
+ case 225:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 224:
+ case 226:
result = reduceNodes(node.declarations, cbNodes, result);
break;
- case 225:
+ case 227:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -38020,7 +42431,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 226:
+ case 228:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -38028,455 +42439,145 @@ var ts;
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
+ case 231:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNodes(node.members, cbNodes, result);
+ break;
case 232:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.body, cbNode, result);
+ break;
+ case 233:
+ result = reduceNodes(node.statements, cbNodes, result);
+ break;
+ case 234:
result = reduceNodes(node.clauses, cbNodes, result);
break;
- case 235:
+ case 236:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.moduleReference, cbNode, result);
+ break;
+ case 237:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.importClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 236:
+ case 238:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.namedBindings, cbNode, result);
break;
- case 237:
+ case 239:
result = reduceNode(node.name, cbNode, result);
break;
- case 238:
- case 242:
+ case 240:
+ case 244:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 239:
- case 243:
+ case 241:
+ case 245:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 240:
+ case 242:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 241:
+ case 243:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.exportClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 246:
+ case 247:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 248:
result = reduceNode(node.openingElement, cbNode, result);
result = ts.reduceLeft(node.children, cbNode, result);
result = reduceNode(node.closingElement, cbNode, result);
break;
- case 247:
- case 248:
+ case 249:
+ case 250:
result = reduceNode(node.tagName, cbNode, result);
- result = reduceNodes(node.attributes, cbNodes, result);
+ result = reduceNode(node.attributes, cbNode, result);
break;
- case 249:
+ case 253:
+ result = reduceNodes(node.properties, cbNodes, result);
+ break;
+ case 251:
result = reduceNode(node.tagName, cbNode, result);
break;
- case 250:
+ case 252:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 251:
+ case 254:
result = reduceNode(node.expression, cbNode, result);
break;
- case 252:
+ case 255:
result = reduceNode(node.expression, cbNode, result);
break;
- case 253:
+ case 256:
result = reduceNode(node.expression, cbNode, result);
- case 254:
+ case 257:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 255:
+ case 258:
result = reduceNodes(node.types, cbNodes, result);
break;
- case 256:
+ case 259:
result = reduceNode(node.variableDeclaration, cbNode, result);
result = reduceNode(node.block, cbNode, result);
break;
- case 257:
+ case 260:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 258:
+ case 261:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.objectAssignmentInitializer, cbNode, result);
break;
- case 259:
+ case 262:
result = reduceNode(node.expression, cbNode, result);
break;
- case 261:
+ case 263:
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
+ case 264:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 294:
+ case 295:
result = reduceNode(node.expression, cbNode, result);
break;
default:
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_1 = edgeTraversalPath; _i < edgeTraversalPath_1.length; _i++) {
- var edge = edgeTraversalPath_1[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- result = ts.isArray(value)
- ? reduceNodes(value, cbNodes, result)
- : cbNode(result, value);
- }
- }
- }
break;
}
return result;
}
ts.reduceEachChild = reduceEachChild;
- function visitNode(node, visitor, test, optional, lift, parenthesize, parentNode) {
- if (node === undefined || visitor === undefined) {
- return node;
- }
- aggregateTransformFlags(node);
- var visited = visitor(node);
- if (visited === node) {
- return node;
- }
- var visitedNode;
- if (visited === undefined) {
- if (!optional) {
- Debug.failNotOptional();
- }
- return undefined;
- }
- else if (ts.isArray(visited)) {
- visitedNode = (lift || extractSingleNode)(visited);
- }
- else {
- visitedNode = visited;
- }
- if (parenthesize !== undefined) {
- visitedNode = parenthesize(visitedNode, parentNode);
- }
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- return visitedNode;
- }
- ts.visitNode = visitNode;
- function visitNodes(nodes, visitor, test, start, count, parenthesize, parentNode) {
- if (nodes === undefined) {
- return undefined;
- }
- var updated;
- var length = nodes.length;
- if (start === undefined || start < 0) {
- start = 0;
- }
- if (count === undefined || count > length - start) {
- count = length - start;
- }
- if (start > 0 || count < length) {
- updated = ts.createNodeArray([], undefined, nodes.hasTrailingComma && start + count === length);
- }
- for (var i = 0; i < count; i++) {
- var node = nodes[i + start];
- aggregateTransformFlags(node);
- var visited = node !== undefined ? visitor(node) : undefined;
- if (updated !== undefined || visited === undefined || visited !== node) {
- if (updated === undefined) {
- updated = ts.createNodeArray(nodes.slice(0, i), nodes, nodes.hasTrailingComma);
- }
- if (visited) {
- if (ts.isArray(visited)) {
- for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
- var visitedNode = visited_1[_i];
- visitedNode = parenthesize
- ? parenthesize(visitedNode, parentNode)
- : visitedNode;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- else {
- var visitedNode = parenthesize
- ? parenthesize(visited, parentNode)
- : visited;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- }
- }
- return updated || nodes;
- }
- ts.visitNodes = visitNodes;
- function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
- context.startLexicalEnvironment();
- statements = visitNodes(statements, visitor, ts.isStatement, start);
- if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
- statements = ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements), statements);
- }
- var declarations = context.endLexicalEnvironment();
- return ts.createNodeArray(ts.concatenate(statements, declarations), statements);
- }
- ts.visitLexicalEnvironment = visitLexicalEnvironment;
- function visitParameterList(nodes, visitor, context) {
- context.startLexicalEnvironment();
- var updated = visitNodes(nodes, visitor, ts.isParameterDeclaration);
- context.suspendLexicalEnvironment();
- return updated;
- }
- ts.visitParameterList = visitParameterList;
- function visitFunctionBody(node, visitor, context) {
- context.resumeLexicalEnvironment();
- var updated = visitNode(node, visitor, ts.isConciseBody);
- var declarations = context.endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(updated);
- var statements = mergeLexicalEnvironment(block.statements, declarations);
- return ts.updateBlock(block, statements);
- }
- return updated;
- }
- ts.visitFunctionBody = visitFunctionBody;
- function visitEachChild(node, visitor, context) {
- if (node === undefined) {
- return undefined;
- }
- var kind = node.kind;
- if ((kind > 0 && kind <= 140)) {
- return node;
- }
- if ((kind >= 156 && kind <= 171)) {
- return node;
- }
- switch (node.kind) {
- case 203:
- case 206:
- case 198:
- case 222:
- return node;
- case 142:
- return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 144:
- return ts.updateParameter(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), node.dotDotDotToken, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 147:
- return ts.updateProperty(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 149:
- return ts.updateMethod(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 150:
- return ts.updateConstructor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 151:
- return ts.updateGetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 152:
- return ts.updateSetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 172:
- return ts.updateObjectBindingPattern(node, visitNodes(node.elements, visitor, ts.isBindingElement));
- case 173:
- return ts.updateArrayBindingPattern(node, visitNodes(node.elements, visitor, ts.isArrayBindingElement));
- case 174:
- return ts.updateBindingElement(node, node.dotDotDotToken, visitNode(node.propertyName, visitor, ts.isPropertyName, true), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 175:
- return ts.updateArrayLiteral(node, visitNodes(node.elements, visitor, ts.isExpression));
- case 176:
- return ts.updateObjectLiteral(node, visitNodes(node.properties, visitor, ts.isObjectLiteralElementLike));
- case 177:
- return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
- case 178:
- return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
- case 179:
- return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 180:
- return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 181:
- return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
- case 183:
- return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
- case 184:
- return ts.updateFunctionExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 185:
- return ts.updateArrowFunction(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 186:
- return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
- case 187:
- return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
- case 188:
- return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
- case 189:
- return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 192:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
- case 190:
- return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 191:
- return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 193:
- return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
- case 194:
- return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), visitNodes(node.templateSpans, visitor, ts.isTemplateSpan));
- case 195:
- return ts.updateYield(node, visitNode(node.expression, visitor, ts.isExpression));
- case 196:
- return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
- case 197:
- return ts.updateClassExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 199:
- return ts.updateExpressionWithTypeArguments(node, visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
- case 202:
- return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
- case 204:
- return ts.updateBlock(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 205:
- return ts.updateVariableStatement(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
- case 207:
- return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
- case 208:
- return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, true, liftToBlock));
- case 209:
- return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
- case 210:
- return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 211:
- return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 212:
- return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 213:
- return ts.updateForOf(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 214:
- return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 215:
- return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier, true));
- case 216:
- return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression, true));
- case 217:
- return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 218:
- return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
- case 219:
- return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, false, liftToBlock));
- case 220:
- return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
- case 221:
- return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause, true), visitNode(node.finallyBlock, visitor, ts.isBlock, true));
- case 223:
- return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, true), visitNode(node.initializer, visitor, ts.isExpression, true));
- case 224:
- return ts.updateVariableDeclarationList(node, visitNodes(node.declarations, visitor, ts.isVariableDeclaration));
- case 225:
- return ts.updateFunctionDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, true), visitFunctionBody(node.body, visitor, context));
- case 226:
- return ts.updateClassDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 232:
- return ts.updateCaseBlock(node, visitNodes(node.clauses, visitor, ts.isCaseOrDefaultClause));
- case 235:
- return ts.updateImportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
- case 236:
- return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier, true), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings, true));
- case 237:
- return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
- case 238:
- return ts.updateNamedImports(node, visitNodes(node.elements, visitor, ts.isImportSpecifier));
- case 239:
- return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 240:
- return ts.updateExportAssignment(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
- case 241:
- return ts.updateExportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports, true), visitNode(node.moduleSpecifier, visitor, ts.isExpression, true));
- case 242:
- return ts.updateNamedExports(node, visitNodes(node.elements, visitor, ts.isExportSpecifier));
- case 243:
- return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, true), visitNode(node.name, visitor, ts.isIdentifier));
- case 246:
- return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), visitNodes(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 247:
- return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 248:
- return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 249:
- return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
- case 250:
- return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
- case 251:
- return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
- case 252:
- return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- case 253:
- return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.statements, visitor, ts.isStatement));
- case 254:
- return ts.updateDefaultClause(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 255:
- return ts.updateHeritageClause(node, visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments));
- case 256:
- return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
- case 257:
- return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
- case 258:
- return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
- case 259:
- return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
- case 261:
- return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 294:
- return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- default:
- var updated = void 0;
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_2 = edgeTraversalPath; _i < edgeTraversalPath_2.length; _i++) {
- var edge = edgeTraversalPath_2[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- var visited = ts.isArray(value)
- ? visitNodes(value, visitor, edge.test, 0, value.length, edge.parenthesize, node)
- : visitNode(value, visitor, edge.test, edge.optional, edge.lift, edge.parenthesize, node);
- if (updated !== undefined || visited !== value) {
- if (updated === undefined) {
- updated = ts.getMutableClone(node);
- }
- if (visited !== value) {
- updated[edge.name] = visited;
- }
- }
- }
- }
- }
- return updated ? ts.updateNode(updated, node) : node;
- }
- }
- ts.visitEachChild = visitEachChild;
function mergeLexicalEnvironment(statements, declarations) {
if (!ts.some(declarations)) {
return statements;
}
return ts.isNodeArray(statements)
- ? ts.createNodeArray(ts.concatenate(statements, declarations), statements)
+ ? ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements)
: ts.addRange(statements, declarations);
}
ts.mergeLexicalEnvironment = mergeLexicalEnvironment;
- function mergeFunctionBodyLexicalEnvironment(body, declarations) {
- if (body && declarations !== undefined && declarations.length > 0) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.createNodeArray(ts.concatenate(body.statements, declarations), body.statements));
- }
- else {
- return ts.createBlock(ts.createNodeArray([ts.createReturn(body, body)].concat(declarations), body), body, true);
- }
- }
- return body;
- }
- ts.mergeFunctionBodyLexicalEnvironment = mergeFunctionBodyLexicalEnvironment;
function liftToBlock(nodes) {
Debug.assert(ts.every(nodes, ts.isStatement), "Cannot lift nodes to a Block.");
return ts.singleOrUndefined(nodes) || ts.createBlock(nodes);
}
ts.liftToBlock = liftToBlock;
- function extractSingleNode(nodes) {
- Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
- return ts.singleOrUndefined(nodes);
- }
function aggregateTransformFlags(node) {
aggregateTransformFlagsForNode(node);
return node;
@@ -38507,7 +42608,7 @@ var ts;
return subtreeFlags;
}
function aggregateTransformFlagsForSubtree(node) {
- if (ts.hasModifier(node, 2) || ts.isTypeNode(node)) {
+ if (ts.hasModifier(node, 2) || (ts.isTypeNode(node) && node.kind !== 200)) {
return 0;
}
return reduceEachChild(node, 0, aggregateTransformFlagsForChildNode, aggregateTransformFlagsForChildNodes);
@@ -38520,9 +42621,6 @@ var ts;
}
var Debug;
(function (Debug) {
- Debug.failNotOptional = Debug.shouldAssert(1)
- ? function (message) { return Debug.assert(false, message || "Node not optional."); }
- : ts.noop;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
: ts.noop;
@@ -38555,16 +42653,20 @@ var ts;
}
}
})(Debug = ts.Debug || (ts.Debug = {}));
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var FlattenLevel;
+ (function (FlattenLevel) {
+ FlattenLevel[FlattenLevel["All"] = 0] = "All";
+ FlattenLevel[FlattenLevel["ObjectRest"] = 1] = "ObjectRest";
+ })(FlattenLevel = ts.FlattenLevel || (ts.FlattenLevel = {}));
function flattenDestructuringAssignment(node, visitor, context, level, needsValue, createAssignmentCallback) {
var location = node;
var value;
if (ts.isDestructuringAssignment(node)) {
value = node.right;
- while (ts.isEmptyObjectLiteralOrArrayLiteral(node.left)) {
+ while (ts.isEmptyArrayLiteral(node.left) || ts.isEmptyObjectLiteral(node.left)) {
if (ts.isDestructuringAssignment(value)) {
location = node = value;
value = node.right;
@@ -38578,6 +42680,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: true,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -38612,7 +42715,7 @@ var ts;
ts.Debug.assertNode(target, createAssignmentCallback ? ts.isIdentifier : ts.isExpression);
var expression = createAssignmentCallback
? createAssignmentCallback(target, value, location)
- : ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value, location);
+ : ts.setTextRange(ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value), location);
expression.original = original;
emitExpression(expression);
}
@@ -38625,6 +42728,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: hoistTempVariables,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -38650,10 +42754,11 @@ var ts;
}
}
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
- var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name_31 = _a.name, value = _a.value, location_2 = _a.location, original = _a.original;
- var variable = ts.createVariableDeclaration(name_31, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value, location_2);
+ var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
+ var variable = ts.createVariableDeclaration(name, undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
variable.original = original;
- if (ts.isIdentifier(name_31)) {
+ ts.setTextRange(variable, location);
+ if (ts.isIdentifier(name)) {
ts.setEmitFlags(variable, 64);
}
ts.aggregateTransformFlags(variable);
@@ -38741,7 +42846,12 @@ var ts;
function flattenArrayBindingOrAssignmentPattern(flattenContext, parent, pattern, value, location) {
var elements = ts.getElementsOfBindingOrAssignmentPattern(pattern);
var numElements = elements.length;
- if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
+ if (flattenContext.level < 1 && flattenContext.downlevelIteration) {
+ value = ensureIdentifier(flattenContext, ts.createReadHelper(flattenContext.context, value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
+ ? undefined
+ : numElements, location), false, location);
+ }
+ else if (numElements !== 1 && (flattenContext.level < 1 || numElements === 0)) {
var reuseIdentifierExpressions = !ts.isDeclarationBindingElement(parent) || numElements !== 0;
value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location);
}
@@ -38799,8 +42909,8 @@ var ts;
return ts.createElementAccess(value, argumentExpression);
}
else {
- var name_32 = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
- return ts.createPropertyAccess(value, name_32);
+ var name = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
+ return ts.createPropertyAccess(value, name);
}
}
function ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) {
@@ -38811,7 +42921,7 @@ var ts;
var temp = ts.createTempVariable(undefined);
if (flattenContext.hoistTempVariables) {
flattenContext.context.hoistVariableDeclaration(temp);
- flattenContext.emitExpression(ts.createAssignment(temp, value, location));
+ flattenContext.emitExpression(ts.setTextRange(ts.createAssignment(temp, value), location));
}
else {
flattenContext.emitBindingOrAssignment(temp, value, location, undefined);
@@ -38842,7 +42952,7 @@ var ts;
var restHelper = {
name: "typescript:rest",
scoped: false,
- text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
+ text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
};
function createRestCall(context, value, elements, computedTempVariables, location) {
context.requestEmitHelper(restHelper);
@@ -38861,12 +42971,21 @@ var ts;
}
}
}
- return ts.createCall(ts.getHelperName("__rest"), undefined, [value, ts.createArrayLiteral(propertyNames, location)]);
+ return ts.createCall(ts.getHelperName("__rest"), undefined, [
+ value,
+ ts.setTextRange(ts.createArrayLiteral(propertyNames), location)
+ ]);
}
})(ts || (ts = {}));
var ts;
(function (ts) {
var USE_NEW_TYPE_METADATA_FORMAT = false;
+ var TypeScriptSubstitutionFlags;
+ (function (TypeScriptSubstitutionFlags) {
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["ClassAliases"] = 1] = "ClassAliases";
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NamespaceExports"] = 2] = "NamespaceExports";
+ TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
+ })(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -38877,8 +42996,8 @@ var ts;
var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
context.enableSubstitution(178);
+ context.enableSubstitution(179);
var currentSourceFile;
var currentNamespace;
var currentNamespaceContainerName;
@@ -38911,15 +43030,15 @@ var ts;
}
function onBeforeVisitNode(node) {
switch (node.kind) {
- case 261:
- case 232:
- case 231:
- case 204:
+ case 264:
+ case 234:
+ case 233:
+ case 206:
currentScope = node;
currentScopeFirstDeclarationsOfName = undefined;
break;
- case 226:
- case 225:
+ case 228:
+ case 227:
if (ts.hasModifier(node, 2)) {
break;
}
@@ -38944,13 +43063,13 @@ var ts;
}
function sourceElementVisitorWorker(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 240:
+ case 242:
return visitExportAssignment(node);
- case 241:
+ case 243:
return visitExportDeclaration(node);
default:
return visitorWorker(node);
@@ -38960,11 +43079,11 @@ var ts;
return saveStateAndInvoke(node, namespaceElementVisitorWorker);
}
function namespaceElementVisitorWorker(node) {
- if (node.kind === 241 ||
- node.kind === 235 ||
- node.kind === 236 ||
- (node.kind === 234 &&
- node.moduleReference.kind === 245)) {
+ if (node.kind === 243 ||
+ node.kind === 237 ||
+ node.kind === 238 ||
+ (node.kind === 236 &&
+ node.moduleReference.kind === 247)) {
return undefined;
}
else if (node.transformFlags & 1 || ts.hasModifier(node, 1)) {
@@ -38980,15 +43099,15 @@ var ts;
}
function classElementVisitorWorker(node) {
switch (node.kind) {
- case 150:
- return undefined;
- case 147:
- case 155:
case 151:
+ return undefined;
+ case 148:
+ case 156:
case 152:
- case 149:
+ case 153:
+ case 150:
return visitorWorker(node);
- case 203:
+ case 205:
return node;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39019,23 +43138,22 @@ var ts;
case 75:
case 123:
case 130:
- case 162:
case 163:
- case 161:
- case 156:
- case 143:
+ case 164:
+ case 162:
+ case 157:
+ case 144:
case 118:
case 121:
- case 134:
+ case 135:
case 132:
case 129:
case 104:
- case 135:
+ case 136:
+ case 160:
case 159:
+ case 161:
case 158:
- case 160:
- case 157:
- case 164:
case 165:
case 166:
case 167:
@@ -39043,56 +43161,58 @@ var ts;
case 169:
case 170:
case 171:
- case 155:
- case 145:
- case 228:
- case 147:
- case 150:
+ case 172:
+ case 156:
+ case 146:
+ case 230:
+ case 148:
+ return undefined;
+ case 151:
return visitConstructor(node);
- case 227:
+ case 229:
return ts.createNotEmittedStatement(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 255:
+ case 258:
return visitHeritageClause(node);
- case 199:
+ case 200:
return visitExpressionWithTypeArguments(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessor(node);
case 152:
+ return visitGetAccessor(node);
+ case 153:
return visitSetAccessor(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node);
- case 182:
- case 200:
+ case 183:
+ case 201:
return visitAssertionExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 201:
+ case 202:
return visitNonNullExpression(node);
- case 229:
+ case 231:
return visitEnumDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
- case 230:
+ case 232:
return visitModuleDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39100,7 +43220,8 @@ var ts;
}
}
function visitSourceFile(node) {
- var alwaysStrict = compilerOptions.alwaysStrict && !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
+ var alwaysStrict = (compilerOptions.alwaysStrict === undefined ? compilerOptions.strict : compilerOptions.alwaysStrict) &&
+ !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
return ts.updateSourceFileNode(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
}
function shouldEmitDecorateCallForClass(node) {
@@ -39152,11 +43273,12 @@ var ts;
return ts.singleOrMany(statements);
}
function createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, hasStaticProperties) {
- var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause), node);
+ var classDeclaration = ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause));
var emitFlags = ts.getEmitFlags(node);
if (hasStaticProperties) {
emitFlags |= 32;
}
+ ts.setTextRange(classDeclaration, node);
ts.setOriginalNode(classDeclaration, node);
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
@@ -39167,10 +43289,14 @@ var ts;
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, hasExtendsClause);
- var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members, location);
+ var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
- var statement = ts.createLetStatement(declName, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression, location);
+ ts.setTextRange(classExpression, location);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(declName, undefined, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression)
+ ], 1));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, location);
ts.setCommentRange(statement, node);
return statement;
}
@@ -39178,7 +43304,9 @@ var ts;
var staticProperties = getInitializedProperties(node, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84; }));
- var classExpression = ts.setOriginalNode(ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members, node), node);
+ var classExpression = ts.createClassExpression(undefined, node.name, undefined, heritageClauses, members);
+ ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, node);
if (staticProperties.length > 0) {
var expressions = [];
var temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -39201,7 +43329,7 @@ var ts;
members.push(constructor);
}
ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
- return ts.createNodeArray(members, node.members);
+ return ts.setTextRange(ts.createNodeArray(members), node.members);
}
function transformConstructor(node, hasExtendsClause) {
var hasInstancePropertyWithInitializer = ts.forEach(node.members, isInstanceInitializedProperty);
@@ -39212,7 +43340,7 @@ var ts;
}
var parameters = transformConstructorParameters(constructor);
var body = transformConstructorBody(node, constructor, hasExtendsClause);
- return ts.startOnNewLine(ts.setOriginalNode(ts.createConstructor(undefined, undefined, parameters, body, constructor || node), constructor));
+ return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor(undefined, undefined, parameters, body), constructor || node), constructor));
}
function transformConstructorParameters(constructor) {
return ts.visitParameterList(constructor && constructor.parameters, visitor, context)
@@ -39235,18 +43363,18 @@ var ts;
if (constructor) {
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
}
- ts.addRange(statements, endLexicalEnvironment());
- return ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : undefined, true);
+ statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+ return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true), constructor ? constructor.body : undefined);
}
function addPrologueDirectivesAndInitialSuperCall(ctor, result) {
if (ctor.body) {
var statements = ctor.body.statements;
- var index = ts.addPrologueDirectives(result, statements, false, visitor);
+ var index = ts.addPrologue(result, statements, false, visitor);
if (index === statements.length) {
return index;
}
var statement = statements[index];
- if (statement.kind === 207 && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 && ts.isSuperCall(statement.expression)) {
result.push(ts.visitNode(statement, visitor, ts.isStatement));
return index + 1;
}
@@ -39268,7 +43396,7 @@ var ts;
ts.setEmitFlags(propertyName, 1536 | 48);
var localName = ts.getMutableClone(name);
ts.setEmitFlags(localName, 1536);
- return ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), propertyName, node.name), localName), ts.moveRangePos(node, -1)));
+ return ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)));
}
function getInitializedProperties(node, isStatic) {
return ts.filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty);
@@ -39280,13 +43408,13 @@ var ts;
return isInitializedProperty(member, false);
}
function isInitializedProperty(member, isStatic) {
- return member.kind === 147
+ return member.kind === 148
&& isStatic === ts.hasModifier(member, 32)
&& member.initializer !== undefined;
}
function addInitializedPropertyStatements(statements, properties, receiver) {
- for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
- var property = properties_7[_i];
+ for (var _i = 0, properties_9 = properties; _i < properties_9.length; _i++) {
+ var property = properties_9[_i];
var statement = ts.createStatement(transformInitializedProperty(property, receiver));
ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property));
ts.setCommentRange(statement, property);
@@ -39295,8 +43423,8 @@ var ts;
}
function generateInitializedPropertyExpressions(properties, receiver) {
var expressions = [];
- for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
- var property = properties_8[_i];
+ for (var _i = 0, properties_10 = properties; _i < properties_10.length; _i++) {
+ var property = properties_10[_i];
var expression = transformInitializedProperty(property, receiver);
expression.startsOnNewLine = true;
ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property));
@@ -39353,12 +43481,12 @@ var ts;
}
function getAllDecoratorsOfClassElement(node, member) {
switch (member.kind) {
- case 151:
case 152:
+ case 153:
return getAllDecoratorsOfAccessors(node, member);
- case 149:
+ case 150:
return getAllDecoratorsOfMethod(member);
- case 147:
+ case 148:
return getAllDecoratorsOfProperty(member);
default:
return undefined;
@@ -39369,10 +43497,11 @@ var ts;
return undefined;
}
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
- if (accessor !== firstAccessor) {
+ var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
+ if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
return undefined;
}
- var decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
+ var decorators = firstAccessorWithDecorators.decorators;
var parameters = getDecoratorsOfParameters(setAccessor);
if (!decorators && !parameters) {
return undefined;
@@ -39397,14 +43526,14 @@ var ts;
}
return { decorators: decorators };
}
- function transformAllDecoratorsOfDeclaration(node, allDecorators) {
+ function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
if (!allDecorators) {
return undefined;
}
var decoratorExpressions = [];
ts.addRange(decoratorExpressions, ts.map(allDecorators.decorators, transformDecorator));
ts.addRange(decoratorExpressions, ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
- addTypeMetadata(node, decoratorExpressions);
+ addTypeMetadata(node, container, decoratorExpressions);
return decoratorExpressions;
}
function addClassElementDecorationStatements(statements, node, isStatic) {
@@ -39429,14 +43558,14 @@ var ts;
}
function generateClassElementDecorationExpression(node, member) {
var allDecorators = getAllDecoratorsOfClassElement(node, member);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
var prefix = getClassMemberPrefix(node, member);
var memberName = getExpressionForPropertyName(member, true);
var descriptor = languageVersion > 0
- ? member.kind === 147
+ ? member.kind === 148
? ts.createVoidZero()
: ts.createNull()
: undefined;
@@ -39452,7 +43581,7 @@ var ts;
}
function generateConstructorDecorationExpression(node) {
var allDecorators = getAllDecoratorsOfConstructor(node);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -39480,90 +43609,83 @@ var ts;
}
return expressions;
}
- function addTypeMetadata(node, decoratorExpressions) {
+ function addTypeMetadata(node, container, decoratorExpressions) {
if (USE_NEW_TYPE_METADATA_FORMAT) {
- addNewTypeMetadata(node, decoratorExpressions);
+ addNewTypeMetadata(node, container, decoratorExpressions);
}
else {
- addOldTypeMetadata(node, decoratorExpressions);
+ addOldTypeMetadata(node, container, decoratorExpressions);
}
}
- function addOldTypeMetadata(node, decoratorExpressions) {
+ function addOldTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
if (shouldAddTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:type", serializeTypeOfNode(node)));
}
if (shouldAddParamTypesMetadata(node)) {
- decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node, container)));
}
if (shouldAddReturnTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:returntype", serializeReturnTypeOfNode(node)));
}
}
}
- function addNewTypeMetadata(node, decoratorExpressions) {
+ function addNewTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
var properties = void 0;
if (shouldAddTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeTypeOfNode(node))));
}
if (shouldAddParamTypesMetadata(node)) {
- (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node))));
+ (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeParameterTypesOfNode(node, container))));
}
if (shouldAddReturnTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(undefined, undefined, [], undefined, ts.createToken(35), serializeReturnTypeOfNode(node))));
}
if (properties) {
- decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, undefined, true)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, true)));
}
}
}
function shouldAddTypeMetadata(node) {
var kind = node.kind;
- return kind === 149
- || kind === 151
+ return kind === 150
|| kind === 152
- || kind === 147;
+ || kind === 153
+ || kind === 148;
}
function shouldAddReturnTypeMetadata(node) {
- return node.kind === 149;
+ return node.kind === 150;
}
function shouldAddParamTypesMetadata(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 197
- || kind === 149
- || kind === 151
- || kind === 152;
+ switch (node.kind) {
+ case 228:
+ case 198:
+ return ts.getFirstConstructorWithBody(node) !== undefined;
+ case 150:
+ case 152:
+ case 153:
+ return true;
+ }
+ return false;
}
function serializeTypeOfNode(node) {
switch (node.kind) {
- case 147:
- case 144:
- case 151:
- return serializeTypeNode(node.type);
+ case 148:
+ case 145:
case 152:
+ return serializeTypeNode(node.type);
+ case 153:
return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node));
- case 226:
- case 197:
- case 149:
+ case 228:
+ case 198:
+ case 150:
return ts.createIdentifier("Function");
default:
return ts.createVoidZero();
}
}
- function getRestParameterElementType(node) {
- if (node && node.kind === 162) {
- return node.elementType;
- }
- else if (node && node.kind === 157) {
- return ts.singleOrUndefined(node.typeArguments);
- }
- else {
- return undefined;
- }
- }
- function serializeParameterTypesOfNode(node) {
+ function serializeParameterTypesOfNode(node, container) {
var valueDeclaration = ts.isClassLike(node)
? ts.getFirstConstructorWithBody(node)
: ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)
@@ -39571,7 +43693,7 @@ var ts;
: undefined;
var expressions = [];
if (valueDeclaration) {
- var parameters = valueDeclaration.parameters;
+ var parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);
var numParameters = parameters.length;
for (var i = 0; i < numParameters; i++) {
var parameter = parameters[i];
@@ -39579,7 +43701,7 @@ var ts;
continue;
}
if (parameter.dotDotDotToken) {
- expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));
+ expressions.push(serializeTypeNode(ts.getRestParameterElementType(parameter.type)));
}
else {
expressions.push(serializeTypeOfNode(parameter));
@@ -39588,11 +43710,20 @@ var ts;
}
return ts.createArrayLiteral(expressions);
}
+ function getParametersOfDecoratedDeclaration(node, container) {
+ if (container && node.kind === 152) {
+ var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
+ if (setAccessor) {
+ return setAccessor.parameters;
+ }
+ }
+ return node.parameters;
+ }
function serializeReturnTypeOfNode(node) {
if (ts.isFunctionLike(node) && node.type) {
return serializeTypeNode(node.type);
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if (ts.isAsyncFunction(node)) {
return ts.createIdentifier("Promise");
}
return ts.createVoidZero();
@@ -39603,21 +43734,26 @@ var ts;
}
switch (node.kind) {
case 104:
+ case 138:
+ case 94:
+ case 129:
return ts.createVoidZero();
- case 166:
+ case 167:
return serializeTypeNode(node.type);
- case 158:
case 159:
+ case 160:
return ts.createIdentifier("Function");
- case 162:
case 163:
+ case 164:
return ts.createIdentifier("Array");
- case 156:
+ case 157:
case 121:
return ts.createIdentifier("Boolean");
- case 134:
+ case 135:
return ts.createIdentifier("String");
- case 171:
+ case 133:
+ return ts.createIdentifier("Object");
+ case 172:
switch (node.literal.kind) {
case 9:
return ts.createIdentifier("String");
@@ -39633,44 +43769,22 @@ var ts;
break;
case 132:
return ts.createIdentifier("Number");
- case 135:
+ case 136:
return languageVersion < 2
? getGlobalSymbolNameWithFallback()
: ts.createIdentifier("Symbol");
- case 157:
+ case 158:
return serializeTypeReferenceNode(node);
+ case 166:
case 165:
- case 164:
- {
- var unionOrIntersection = node;
- var serializedUnion = void 0;
- for (var _i = 0, _a = unionOrIntersection.types; _i < _a.length; _i++) {
- var typeNode = _a[_i];
- var serializedIndividual = serializeTypeNode(typeNode);
- if (serializedIndividual.kind !== 70) {
- serializedUnion = undefined;
- break;
- }
- if (serializedIndividual.text === "Object") {
- return serializedIndividual;
- }
- if (serializedUnion && serializedUnion.text !== serializedIndividual.text) {
- serializedUnion = undefined;
- break;
- }
- serializedUnion = serializedIndividual;
- }
- if (serializedUnion) {
- return serializedUnion;
- }
- }
- case 160:
- case 168:
+ return serializeUnionOrIntersectionType(node);
+ case 161:
case 169:
case 170:
- case 161:
+ case 171:
+ case 162:
case 118:
- case 167:
+ case 168:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -39678,6 +43792,32 @@ var ts;
}
return ts.createIdentifier("Object");
}
+ function serializeUnionOrIntersectionType(node) {
+ var serializedUnion;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var serializedIndividual = serializeTypeNode(typeNode);
+ if (ts.isVoidExpression(serializedIndividual)) {
+ if (!serializedUnion) {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ else if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
+ return serializedIndividual;
+ }
+ else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ if (!ts.isIdentifier(serializedUnion) ||
+ !ts.isIdentifier(serializedIndividual) ||
+ serializedUnion.text !== serializedIndividual.text) {
+ return ts.createIdentifier("Object");
+ }
+ }
+ else {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ return serializedUnion;
+ }
function serializeTypeReferenceNode(node) {
switch (resolver.getTypeReferenceSerializationKind(node.typeName, currentScope)) {
case ts.TypeReferenceSerializationKind.Unknown:
@@ -39712,15 +43852,15 @@ var ts;
function serializeEntityNameAsExpression(node, useFallback) {
switch (node.kind) {
case 70:
- var name_33 = ts.getMutableClone(node);
- name_33.flags &= ~8;
- name_33.original = undefined;
- name_33.parent = currentScope;
+ var name = ts.getMutableClone(node);
+ name.flags &= ~8;
+ name.original = undefined;
+ name.parent = currentScope;
if (useFallback) {
- return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name_33), ts.createLiteral("undefined")), name_33);
+ return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name);
}
- return name_33;
- case 141:
+ return name;
+ case 142:
return serializeQualifiedNameAsExpression(node, useFallback);
}
}
@@ -39749,7 +43889,7 @@ var ts;
: name.expression;
}
else if (ts.isIdentifier(name)) {
- return ts.createLiteral(name.text);
+ return ts.createLiteral(ts.unescapeIdentifier(name.text));
}
else {
return ts.getSynthesizedClone(name);
@@ -39764,7 +43904,7 @@ var ts;
hoistVariableDeclaration(generatedName);
expression = ts.createAssignment(generatedName, expression);
}
- return ts.setOriginalNode(ts.createComputedPropertyName(expression, name), name);
+ return ts.updateComputedPropertyName(name, expression);
}
else {
return name;
@@ -39773,13 +43913,12 @@ var ts;
function visitHeritageClause(node) {
if (node.token === 84) {
var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1);
- return ts.createHeritageClause(84, types, node);
+ return ts.setTextRange(ts.createHeritageClause(84, types), node);
}
return undefined;
}
function visitExpressionWithTypeArguments(node) {
- var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
- return ts.createExpressionWithTypeArguments(undefined, expression, node);
+ return ts.updateExpressionWithTypeArguments(node, undefined, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
}
function shouldEmitFunctionLikeDeclaration(node) {
return !ts.nodeIsMissing(node.body);
@@ -39788,13 +43927,13 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- return ts.visitEachChild(node, visitor, context);
+ return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context));
}
function visitMethodDeclaration(node) {
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), visitPropertyNameOfClassElement(node), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
if (updated !== node) {
ts.setCommentRange(updated, node);
ts.setSourceMapRange(updated, ts.moveRangePastDecorators(node));
@@ -39830,7 +43969,7 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createNotEmittedStatement(node);
}
- var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
+ var updated = ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
if (isNamespaceExport(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
@@ -39839,10 +43978,10 @@ var ts;
return updated;
}
function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
+ if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createOmittedExpression();
}
- var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
+ var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
return updated;
}
function visitArrowFunction(node) {
@@ -39853,8 +43992,9 @@ var ts;
if (ts.parameterIsThisKeyword(node)) {
return undefined;
}
- var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression), ts.moveRangePastModifiers(node));
+ var parameter = ts.createParameter(undefined, undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
ts.setOriginalNode(parameter, node);
+ ts.setTextRange(parameter, ts.moveRangePastModifiers(node));
ts.setCommentRange(parameter, node);
ts.setSourceMapRange(parameter, ts.moveRangePastModifiers(node));
ts.setEmitFlags(parameter.name, 32);
@@ -39866,7 +44006,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)), node);
+ return ts.setTextRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -39878,7 +44018,7 @@ var ts;
return ts.flattenDestructuringAssignment(node, visitor, context, 0, false, createNamespaceExportExpression);
}
else {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression), node);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
}
function visitVariableDeclaration(node) {
@@ -39932,8 +44072,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]), node);
+ var enumStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(enumStatement, node);
+ ts.setTextRange(enumStatement, node);
ts.setEmitFlags(enumStatement, emitFlags);
statements.push(enumStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -39947,11 +44088,11 @@ var ts;
ts.addRange(statements, ts.map(node.members, transformEnumMember));
ts.addRange(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
- return ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ return ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.createStatement(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name, member), member);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -39983,16 +44124,16 @@ var ts;
if (!currentScopeFirstDeclarationsOfName) {
currentScopeFirstDeclarationsOfName = ts.createMap();
}
- if (!(name in currentScopeFirstDeclarationsOfName)) {
- currentScopeFirstDeclarationsOfName[name] = node;
+ if (!currentScopeFirstDeclarationsOfName.has(name)) {
+ currentScopeFirstDeclarationsOfName.set(name, node);
}
}
}
function isFirstEmittedDeclarationInScope(node) {
if (currentScopeFirstDeclarationsOfName) {
- var name_34 = node.symbol && node.symbol.name;
- if (name_34) {
- return currentScopeFirstDeclarationsOfName[name_34] === node;
+ var name = node.symbol && node.symbol.name;
+ if (name) {
+ return currentScopeFirstDeclarationsOfName.get(name) === node;
}
}
return false;
@@ -40004,7 +44145,7 @@ var ts;
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
- if (node.kind === 229) {
+ if (node.kind === 231) {
ts.setSourceMapRange(statement.declarationList, node);
}
else {
@@ -40045,8 +44186,9 @@ var ts;
var localName = ts.getLocalName(node, false, true);
moduleArg = ts.createAssignment(localName, moduleArg);
}
- var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]), node);
+ var moduleStatement = ts.createStatement(ts.createCall(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]));
ts.setOriginalNode(moduleStatement, node);
+ ts.setTextRange(moduleStatement, node);
ts.setEmitFlags(moduleStatement, emitFlags);
statements.push(moduleStatement);
statements.push(ts.createEndOfDeclarationMarker(node));
@@ -40064,8 +44206,8 @@ var ts;
var statementsLocation;
var blockLocation;
var body = node.body;
- if (body.kind === 231) {
- ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement));
+ if (body.kind === 233) {
+ saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
statementsLocation = body.statements;
blockLocation = body;
}
@@ -40086,14 +44228,15 @@ var ts;
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), blockLocation, true);
- if (body.kind !== 231) {
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true);
+ ts.setTextRange(block, blockLocation);
+ if (body.kind !== 233) {
ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536);
}
return block;
}
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
- if (moduleDeclaration.body.kind === 230) {
+ if (moduleDeclaration.body.kind === 232) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerModule || moduleDeclaration.body;
}
@@ -40102,18 +44245,18 @@ var ts;
if (!node.importClause) {
return node;
}
- var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause, true);
+ var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause);
return importClause
? ts.updateImportDeclaration(node, undefined, undefined, importClause, node.moduleSpecifier)
: undefined;
}
function visitImportClause(node) {
var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
- var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings, true);
+ var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined;
}
function visitNamedImportBindings(node) {
- if (node.kind === 237) {
+ if (node.kind === 239) {
return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
}
else {
@@ -40136,7 +44279,7 @@ var ts;
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
}
- var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports, true);
+ var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports);
return exportClause
? ts.updateExportDeclaration(node, undefined, undefined, exportClause, node.moduleSpecifier)
: undefined;
@@ -40165,9 +44308,9 @@ var ts;
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
- return ts.setOriginalNode(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
+ return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.setOriginalNode(ts.createVariableDeclaration(node.name, undefined, moduleReference), node)
- ]), node), node);
+ ])), node), node);
}
else {
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
@@ -40188,7 +44331,7 @@ var ts;
&& ts.hasModifier(node, 512);
}
function expressionToStatement(expression) {
- return ts.createStatement(expression, undefined);
+ return ts.createStatement(expression);
}
function addExportMemberAssignment(statements, node) {
var expression = ts.createAssignment(ts.getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, false, true), ts.getLocalName(node));
@@ -40198,10 +44341,10 @@ var ts;
statements.push(statement);
}
function createNamespaceExport(exportName, exportValue, location) {
- return ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue), location);
+ return ts.setTextRange(ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, false, true), exportValue)), location);
}
function createNamespaceExportExpression(exportName, exportValue, location) {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);
}
function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {
return ts.getNamespaceMemberName(currentNamespaceContainerName, name, false, true);
@@ -40217,7 +44360,7 @@ var ts;
function getClassAliasIfNeeded(node) {
if (resolver.getNodeCheckFlags(node) & 8388608) {
enableSubstitutionForClassAliases();
- var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? node.name.text : "default");
+ var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? ts.unescapeIdentifier(node.name.text) : "default");
classAliases[ts.getOriginalNodeId(node)] = classAlias;
hoistVariableDeclaration(classAlias);
return classAlias;
@@ -40241,37 +44384,42 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(70);
- classAliases = ts.createMap();
+ classAliases = [];
}
}
function enableSubstitutionForNamespaceExports() {
if ((enabledSubstitutions & 2) === 0) {
enabledSubstitutions |= 2;
context.enableSubstitution(70);
- context.enableSubstitution(258);
- context.enableEmitNotification(230);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(232);
}
}
function isTransformedModuleDeclaration(node) {
- return ts.getOriginalNode(node).kind === 230;
+ return ts.getOriginalNode(node).kind === 232;
}
function isTransformedEnumDeclaration(node) {
- return ts.getOriginalNode(node).kind === 229;
+ return ts.getOriginalNode(node).kind === 231;
}
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
var savedApplicableSubstitutions = applicableSubstitutions;
+ var savedCurrentSourceFile = currentSourceFile;
+ if (ts.isSourceFile(node)) {
+ currentSourceFile = node;
+ }
if (enabledSubstitutions & 2 && isTransformedModuleDeclaration(node)) {
applicableSubstitutions |= 2;
}
if (enabledSubstitutions & 8 && isTransformedEnumDeclaration(node)) {
applicableSubstitutions |= 8;
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
applicableSubstitutions = savedApplicableSubstitutions;
+ currentSourceFile = savedCurrentSourceFile;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -40281,14 +44429,14 @@ var ts;
}
function substituteShorthandPropertyAssignment(node) {
if (enabledSubstitutions & 2) {
- var name_35 = node.name;
- var exportedName = trySubstituteNamespaceExportedName(name_35);
+ var name = node.name;
+ var exportedName = trySubstituteNamespaceExportedName(name);
if (exportedName) {
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name_35, initializer, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name_35, exportedName, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedName), node);
}
}
return node;
@@ -40297,9 +44445,9 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 177:
- return substitutePropertyAccessExpression(node);
case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
return substituteElementAccessExpression(node);
}
return node;
@@ -40329,11 +44477,11 @@ var ts;
function trySubstituteNamespaceExportedName(node) {
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
var container = resolver.getReferencedExportContainer(node, false);
- if (container && container.kind !== 261) {
- var substitute = (applicableSubstitutions & 2 && container.kind === 230) ||
- (applicableSubstitutions & 8 && container.kind === 229);
+ if (container && container.kind !== 264) {
+ var substitute = (applicableSubstitutions & 2 && container.kind === 232) ||
+ (applicableSubstitutions & 8 && container.kind === 231);
if (substitute) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node, node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node), node);
}
}
}
@@ -40348,16 +44496,14 @@ var ts;
function substituteConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
+ ts.setConstantValue(node, constantValue);
var substitute = ts.createLiteral(constantValue);
- ts.setSourceMapRange(substitute, node);
- ts.setCommentRange(substitute, node);
if (!compilerOptions.removeComments) {
var propertyName = ts.isPropertyAccessExpression(node)
? ts.declarationNameToString(node.name)
: ts.getTextOfNode(node.argumentExpression);
- substitute.trailingComment = " " + propertyName + " ";
+ ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
}
- ts.setConstantValue(node, constantValue);
return substitute;
}
return node;
@@ -40372,24 +44518,24 @@ var ts;
}
}
ts.transformTypeScript = transformTypeScript;
- var paramHelper = {
- name: "typescript:param",
- scoped: false,
- priority: 4,
- text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
- };
- function createParamHelper(context, expression, parameterOffset, location) {
- context.requestEmitHelper(paramHelper);
- return ts.createCall(ts.getHelperName("__param"), undefined, [
- ts.createLiteral(parameterOffset),
- expression
- ], location);
+ function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
+ var argumentsArray = [];
+ argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, true));
+ argumentsArray.push(target);
+ if (memberName) {
+ argumentsArray.push(memberName);
+ if (descriptor) {
+ argumentsArray.push(descriptor);
+ }
+ }
+ context.requestEmitHelper(decorateHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray), location);
}
- var metadataHelper = {
- name: "typescript:metadata",
+ var decorateHelper = {
+ name: "typescript:decorate",
scoped: false,
- priority: 3,
- text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
+ priority: 2,
+ text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
};
function createMetadataHelper(context, metadataKey, metadataValue) {
context.requestEmitHelper(metadataHelper);
@@ -40398,30 +44544,289 @@ var ts;
metadataValue
]);
}
- var decorateHelper = {
- name: "typescript:decorate",
+ var metadataHelper = {
+ name: "typescript:metadata",
scoped: false,
- priority: 2,
- text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
+ priority: 3,
+ text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
};
- function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
- context.requestEmitHelper(decorateHelper);
- var argumentsArray = [];
- argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, undefined, true));
- argumentsArray.push(target);
- if (memberName) {
- argumentsArray.push(memberName);
- if (descriptor) {
- argumentsArray.push(descriptor);
+ function createParamHelper(context, expression, parameterOffset, location) {
+ context.requestEmitHelper(paramHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__param"), undefined, [
+ ts.createLiteral(parameterOffset),
+ expression
+ ]), location);
+ }
+ var paramHelper = {
+ name: "typescript:param",
+ scoped: false,
+ priority: 4,
+ text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
+ };
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var ES2017SubstitutionFlags;
+ (function (ES2017SubstitutionFlags) {
+ ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
+ function transformES2017(context) {
+ var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var currentSourceFile;
+ var enabledSubstitutions;
+ var enclosingSuperContainerFlags = 0;
+ var previousOnEmitNode = context.onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ if (ts.isDeclarationFile(node)) {
+ return node;
+ }
+ currentSourceFile = node;
+ var visited = ts.visitEachChild(node, visitor, context);
+ ts.addEmitHelpers(visited, context.readEmitHelpers());
+ currentSourceFile = undefined;
+ return visited;
+ }
+ function visitor(node) {
+ if ((node.transformFlags & 16) === 0) {
+ return node;
+ }
+ switch (node.kind) {
+ case 119:
+ return undefined;
+ case 190:
+ return visitAwaitExpression(node);
+ case 150:
+ return visitMethodDeclaration(node);
+ case 227:
+ return visitFunctionDeclaration(node);
+ case 185:
+ return visitFunctionExpression(node);
+ case 186:
+ return visitArrowFunction(node);
+ default:
+ return ts.visitEachChild(node, visitor, context);
+ }
+ }
+ function visitAwaitExpression(node) {
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
+ }
+ function visitMethodDeclaration(node) {
+ return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionDeclaration(node) {
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitFunctionExpression(node) {
+ return ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function visitArrowFunction(node) {
+ return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function transformAsyncFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var original = ts.getOriginalNode(node, ts.isFunctionLike);
+ var nodeType = original.type;
+ var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
+ var isArrowFunction = node.kind === 186;
+ var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
+ if (!isArrowFunction) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.createBlock(statements, true);
+ ts.setTextRange(block, node.body);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
+ }
+ else {
+ var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
+ var declarations = endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(expression);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(ts.concatenate(block.statements, declarations)), block.statements));
+ }
+ return expression;
+ }
+ }
+ function transformFunctionBodyWorker(body, start) {
+ if (ts.isBlock(body)) {
+ return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
+ }
+ else {
+ startLexicalEnvironment();
+ var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
+ var declarations = endLexicalEnvironment();
+ return ts.updateBlock(visited, ts.setTextRange(ts.createNodeArray(ts.concatenate(visited.statements, declarations)), visited.statements));
+ }
+ }
+ function getPromiseConstructor(type) {
+ var typeName = type && ts.getEntityNameFromTypeNode(type);
+ if (typeName && ts.isEntityName(typeName)) {
+ var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
+ if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
+ || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
+ return typeName;
+ }
+ }
+ return undefined;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
}
+ return node;
}
- return ts.createCall(ts.getHelperName("__decorate"), undefined, argumentsArray, location);
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
+ }
+ }
+ }
+ ts.transformES2017 = transformES2017;
+ var awaiterHelper = {
+ name: "typescript:awaiter",
+ scoped: false,
+ priority: 5,
+ text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };"
+ };
+ function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
+ context.requestEmitHelper(awaiterHelper);
+ var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
+ ts.createThis(),
+ hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
+ promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
+ generatorFunc
+ ]);
}
+ ts.asyncSuperHelper = {
+ name: "typescript:async-super",
+ scoped: true,
+ text: "\n const _super = name => super[name];\n "
+ };
+ ts.advancedAsyncSuperHelper = {
+ name: "typescript:advanced-async-super",
+ scoped: true,
+ text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "
+ };
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ESNextSubstitutionFlags;
+ (function (ESNextSubstitutionFlags) {
+ ESNextSubstitutionFlags[ESNextSubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ESNextSubstitutionFlags || (ESNextSubstitutionFlags = {}));
function transformESNext(context) {
- var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ var enabledSubstitutions;
+ var enclosingFunctionFlags;
+ var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
@@ -40437,53 +44842,93 @@ var ts;
function visitorNoDestructuringValue(node) {
return visitorWorker(node, true);
}
+ function visitorNoAsyncModifier(node) {
+ if (node.kind === 119) {
+ return undefined;
+ }
+ return node;
+ }
function visitorWorker(node, noDestructuringValue) {
if ((node.transformFlags & 8) === 0) {
return node;
}
switch (node.kind) {
- case 176:
+ case 190:
+ return visitAwaitExpression(node);
+ case 196:
+ return visitYieldExpression(node);
+ case 221:
+ return visitLabeledStatement(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 192:
+ case 193:
return visitBinaryExpression(node, noDestructuringValue);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
+ case 215:
+ return visitForOfStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 211:
return visitForStatement(node);
- case 188:
+ case 189:
return visitVoidExpression(node);
- case 150:
+ case 151:
return visitConstructorDeclaration(node);
- case 149:
+ case 150:
return visitMethodDeclaration(node);
- case 151:
- return visitGetAccessorDeclaration(node);
case 152:
+ return visitGetAccessorDeclaration(node);
+ case 153:
return visitSetAccessorDeclaration(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
case 185:
+ return visitFunctionExpression(node);
+ case 186:
return visitArrowFunction(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 207:
+ case 209:
return visitExpressionStatement(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, noDestructuringValue);
default:
return ts.visitEachChild(node, visitor, context);
}
}
+ function visitAwaitExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(undefined, ts.createArrayLiteral([ts.createLiteral("await"), expression])), node), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitYieldExpression(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.updateYield(node, node.asteriskToken, node.asteriskToken
+ ? createAsyncDelegatorHelper(context, expression, expression)
+ : ts.createArrayLiteral(expression
+ ? [ts.createLiteral("yield"), expression]
+ : [ts.createLiteral("yield")]));
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitLabeledStatement(node) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ var statement = ts.unwrapInnermostStatementOfLabel(node);
+ if (statement.kind === 215 && statement.awaitModifier) {
+ return visitForOfStatement(statement, node);
+ }
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
function chunkObjectLiteralElements(elements) {
var chunkObject;
var objects = [];
- for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
- var e = elements_3[_i];
- if (e.kind === 259) {
+ for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
+ var e = elements_4[_i];
+ if (e.kind === 262) {
if (chunkObject) {
objects.push(ts.createObjectLiteral(chunkObject));
chunkObject = undefined;
@@ -40495,7 +44940,7 @@ var ts;
if (!chunkObject) {
chunkObject = [];
}
- if (e.kind === 257) {
+ if (e.kind === 260) {
var p = e;
chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression)));
}
@@ -40512,7 +44957,7 @@ var ts;
function visitObjectLiteralExpression(node) {
if (node.transformFlags & 1048576) {
var objects = chunkObjectLiteralElements(node.properties);
- if (objects.length && objects[0].kind !== 176) {
+ if (objects.length && objects[0].kind !== 177) {
objects.unshift(ts.createObjectLiteral());
}
return createAssignHelper(context, objects);
@@ -40546,68 +44991,202 @@ var ts;
function visitVoidExpression(node) {
return ts.visitEachChild(node, visitorNoDestructuringValue, context);
}
- function visitForOfStatement(node) {
- var leadingStatements;
- var temp;
- var initializer = ts.skipParentheses(node.initializer);
- if (initializer.transformFlags & 1048576) {
- if (ts.isVariableDeclarationList(initializer)) {
- temp = ts.createTempVariable(undefined);
- var firstDeclaration = ts.firstOrUndefined(initializer.declarations);
- var declarations = ts.flattenDestructuringBinding(firstDeclaration, visitor, context, 1, temp, false, true);
- if (ts.some(declarations)) {
- var statement = ts.createVariableStatement(undefined, ts.updateVariableDeclarationList(initializer, declarations), initializer);
- leadingStatements = ts.append(leadingStatements, statement);
- }
- }
- else if (ts.isAssignmentPattern(initializer)) {
- temp = ts.createTempVariable(undefined);
- var expression = ts.flattenDestructuringAssignment(ts.aggregateTransformFlags(ts.createAssignment(initializer, temp, node.initializer)), visitor, context, 1);
- leadingStatements = ts.append(leadingStatements, ts.createStatement(expression, node.initializer));
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ if (node.initializer.transformFlags & 1048576) {
+ node = transformForOfStatementWithObjectRest(node);
+ }
+ if (node.awaitModifier) {
+ return transformForAwaitOfStatement(node, outermostLabeledStatement);
+ }
+ else {
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement);
+ }
+ }
+ function transformForOfStatementWithObjectRest(node) {
+ var initializerWithoutParens = ts.skipParentheses(node.initializer);
+ if (ts.isVariableDeclarationList(initializerWithoutParens) || ts.isAssignmentPattern(initializerWithoutParens)) {
+ var bodyLocation = void 0;
+ var statementsLocation = void 0;
+ var temp = ts.createTempVariable(undefined);
+ var statements = [ts.createForOfBindingStatement(initializerWithoutParens, temp)];
+ if (ts.isBlock(node.statement)) {
+ ts.addRange(statements, node.statement.statements);
+ bodyLocation = node.statement;
+ statementsLocation = node.statement.statements;
}
+ return ts.updateForOf(node, node.awaitModifier, ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(temp), node.initializer)
+ ], 1), node.initializer), node.expression, ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation));
}
- if (temp) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
- var block = ts.isBlock(statement)
- ? ts.updateBlock(statement, ts.createNodeArray(ts.concatenate(leadingStatements, statement.statements), statement.statements))
- : ts.createBlock(ts.append(leadingStatements, statement), statement, true);
- return ts.updateForOf(node, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(temp, undefined, undefined, node.initializer)
- ], node.initializer, 1), expression, block);
+ return node;
+ }
+ function convertForOfStatementHead(node, boundValue) {
+ var binding = ts.createForOfBindingStatement(node.initializer, boundValue);
+ var bodyLocation;
+ var statementsLocation;
+ var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ if (ts.isBlock(statement)) {
+ ts.addRange(statements, statement.statements);
+ bodyLocation = statement;
+ statementsLocation = statement.statements;
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ statements.push(statement);
+ }
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function transformForAwaitOfStatement(node, outermostLabeledStatement) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = createAsyncValuesHelper(context, expression, node.expression);
+ var next = ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, [])
+ ])
+ : ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []));
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"))), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createYield(undefined, enclosingFunctionFlags & 1
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createFunctionCall(returnMethod, iterator, [])
+ ])
+ : ts.createFunctionCall(returnMethod, iterator, [])))), 1)
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitParameter(node) {
if (node.transformFlags & 1048576) {
- return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.updateParameter(node, undefined, undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
}
return ts.visitEachChild(node, visitor, context);
}
function visitConstructorDeclaration(node) {
- return ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateConstructor(node, undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitGetAccessorDeclaration(node) {
- return ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateGetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitSetAccessorDeclaration(node) {
- return ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0;
+ var updated = ts.updateSetAccessor(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateMethod(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.isToken), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionDeclaration(node, undefined, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateArrowFunction(node, node.modifiers, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionExpression(node, enclosingFunctionFlags & 1
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2
+ ? undefined
+ : node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
+ }
+ function transformAsyncGeneratorFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, false, visitor);
+ appendObjectRestAssignmentsIfNeeded(statements, node);
+ statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(undefined, ts.createToken(38), node.name && ts.getGeneratedNameForNode(node.name), undefined, [], undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.updateBlock(node.body, statements);
+ if (languageVersion >= 2) {
+ if (resolver.getNodeCheckFlags(node) & 4096) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
}
function transformFunctionBody(node) {
resumeLexicalEnvironment();
- var leadingStatements;
+ var statementOffset = 0;
+ var statements = [];
+ var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
+ if (ts.isBlock(body)) {
+ statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
+ }
+ ts.addRange(statements, appendObjectRestAssignmentsIfNeeded(undefined, node));
+ var trailingStatements = endLexicalEnvironment();
+ if (statementOffset > 0 || ts.some(statements) || ts.some(trailingStatements)) {
+ var block = ts.convertToFunctionBody(body, true);
+ ts.addRange(statements, block.statements.slice(statementOffset));
+ ts.addRange(statements, trailingStatements);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(statements), block.statements));
+ }
+ return body;
+ }
+ function appendObjectRestAssignmentsIfNeeded(statements, node) {
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
if (parameter.transformFlags & 1048576) {
@@ -40616,17 +45195,95 @@ var ts;
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
ts.setEmitFlags(statement, 524288);
- leadingStatements = ts.append(leadingStatements, statement);
+ statements = ts.append(statements, statement);
}
}
}
- var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
- var trailingStatements = endLexicalEnvironment();
- if (ts.some(leadingStatements) || ts.some(trailingStatements)) {
- var block = ts.convertToFunctionBody(body, true);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(ts.concatenate(leadingStatements, block.statements), trailingStatements), block.statements));
+ return statements;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1) === 0) {
+ enabledSubstitutions |= 1;
+ context.enableSubstitution(180);
+ context.enableSubstitution(178);
+ context.enableSubstitution(179);
+ context.enableEmitNotification(228);
+ context.enableEmitNotification(150);
+ context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(151);
+ }
+ }
+ function onEmitNode(hint, node, emitCallback) {
+ if (enabledSubstitutions & 1 && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 | 4096);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178:
+ return substitutePropertyAccessExpression(node);
+ case 179:
+ return substituteElementAccessExpression(node);
+ case 180:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228
+ || kind === 151
+ || kind === 150
+ || kind === 152
+ || kind === 153;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), location);
}
- return body;
}
}
ts.transformESNext = transformESNext;
@@ -40637,25 +45294,57 @@ var ts;
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
};
function createAssignHelper(context, attributesSegments) {
+ if (context.getCompilerOptions().target >= 2) {
+ return ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "assign"), undefined, attributesSegments);
+ }
context.requestEmitHelper(assignHelper);
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var asyncGeneratorHelper = {
+ name: "typescript:asyncGenerator",
+ scoped: false,
+ text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), q = [], c, i;\n return i = { next: verb(\"next\"), \"throw\": verb(\"throw\"), \"return\": verb(\"return\") }, i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { return function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]), next(); }); }; }\n function next() { if (!c && q.length) resume((c = q.shift())[0], c[1]); }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(c[3], e); } }\n function step(r) { r.done ? settle(c[2], r) : Promise.resolve(r.value[1]).then(r.value[0] === \"yield\" ? _yield : r.value[0] === \"delegate\" ? delegate : fulfill, reject); }\n function _yield(value) { settle(c[2], { value: value, done: false }); }\n function delegate(r) { step(r.done ? r : { value: [\"yield\", r.value], done: false }); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { c = void 0, f(v), next(); }\n };\n "
+ };
+ function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(asyncGeneratorHelper);
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
+ ts.createThis(),
+ ts.createIdentifier("arguments"),
+ generatorFunc
+ ]);
+ }
+ var asyncDelegator = {
+ name: "typescript:asyncDelegator",
+ scoped: false,
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i = { next: verb(\"next\"), \"throw\": verb(\"throw\", function (e) { throw e; }), \"return\": verb(\"return\", function (v) { return { value: v, done: true }; }) };\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return { value: [\"delegate\", (o[n] || f).call(o, v)], done: false }; }; }\n };\n "
+ };
+ function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(asyncDelegator);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
+ }
+ var asyncValues = {
+ name: "typescript:asyncValues",
+ scoped: false,
+ text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n "
+ };
+ function createAsyncValuesHelper(context, expression, location) {
+ context.requestEmitHelper(asyncValues);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"), undefined, [expression]), location);
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformJsx(context) {
var compilerOptions = context.getCompilerOptions();
- var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
var visited = ts.visitEachChild(node, visitor, context);
ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
return visited;
}
function visitor(node) {
@@ -40668,11 +45357,11 @@ var ts;
}
function visitorWorker(node) {
switch (node.kind) {
- case 246:
+ case 248:
return visitJsxElement(node, false);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, false);
- case 252:
+ case 255:
return visitJsxExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -40682,11 +45371,11 @@ var ts;
switch (node.kind) {
case 10:
return visitJsxText(node);
- case 252:
+ case 255:
return visitJsxExpression(node);
- case 246:
+ case 248:
return visitJsxElement(node, true);
- case 247:
+ case 249:
return visitJsxSelfClosingElement(node, true);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -40702,7 +45391,7 @@ var ts;
function visitJsxOpeningLikeElement(node, children, isChild, location) {
var tagName = getTagName(node);
var objectProperties;
- var attrs = node.attributes;
+ var attrs = node.attributes.properties;
if (attrs.length === 0) {
objectProperties = ts.createNull();
}
@@ -40734,13 +45423,16 @@ var ts;
}
function transformJsxAttributeInitializer(node) {
if (node === undefined) {
- return ts.createLiteral(true);
+ return ts.createTrue();
}
else if (node.kind === 9) {
var decoded = tryDecodeEntities(node.text);
- return decoded ? ts.createLiteral(decoded, node) : node;
+ return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node;
}
- else if (node.kind === 252) {
+ else if (node.kind === 255) {
+ if (node.expression === undefined) {
+ return ts.createTrue();
+ }
return visitJsxExpression(node);
}
else {
@@ -40748,43 +45440,35 @@ var ts;
}
}
function visitJsxText(node) {
- var text = ts.getTextOfNode(node, true);
- var parts;
+ var fixed = fixupWhitespaceAndDecodeEntities(ts.getTextOfNode(node, true));
+ return fixed === undefined ? undefined : ts.createLiteral(fixed);
+ }
+ function fixupWhitespaceAndDecodeEntities(text) {
+ var acc;
var firstNonWhitespace = 0;
var lastNonWhitespace = -1;
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
if (ts.isLineBreak(c)) {
- if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) {
- var part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
+ if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {
+ acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));
}
firstNonWhitespace = -1;
}
- else if (!ts.isWhiteSpace(c)) {
+ else if (!ts.isWhiteSpaceSingleLine(c)) {
lastNonWhitespace = i;
if (firstNonWhitespace === -1) {
firstNonWhitespace = i;
}
}
}
- if (firstNonWhitespace !== -1) {
- var part = text.substr(firstNonWhitespace);
- if (!parts) {
- parts = [];
- }
- parts.push(ts.createLiteral(decodeEntities(part)));
- }
- if (parts) {
- return ts.reduceLeft(parts, aggregateJsxTextParts);
- }
- return undefined;
+ return firstNonWhitespace !== -1
+ ? addLineOfJsxText(acc, text.substr(firstNonWhitespace))
+ : acc;
}
- function aggregateJsxTextParts(left, right) {
- return ts.createAdd(ts.createAdd(left, ts.createLiteral(" ")), right);
+ function addLineOfJsxText(acc, trimmedLine) {
+ var decoded = decodeEntities(trimmedLine);
+ return acc === undefined ? decoded : acc + " " + decoded;
}
function decodeEntities(text) {
return text.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, function (match, _all, _number, _digits, decimal, hex, word) {
@@ -40795,7 +45479,7 @@ var ts;
return String.fromCharCode(parseInt(hex, 16));
}
else {
- var ch = entities[word];
+ var ch = entities.get(word);
return ch ? String.fromCharCode(ch) : match;
}
});
@@ -40805,16 +45489,16 @@ var ts;
return decoded === text ? undefined : decoded;
}
function getTagName(node) {
- if (node.kind === 246) {
+ if (node.kind === 248) {
return getTagName(node.openingElement);
}
else {
- var name_36 = node.tagName;
- if (ts.isIdentifier(name_36) && ts.isIntrinsicJsxName(name_36.text)) {
- return ts.createLiteral(name_36.text);
+ var name = node.tagName;
+ if (ts.isIdentifier(name) && ts.isIntrinsicJsxName(name.text)) {
+ return ts.createLiteral(name.text);
}
else {
- return ts.createExpressionFromEntityName(name_36);
+ return ts.createExpressionFromEntityName(name);
}
}
}
@@ -40832,7 +45516,7 @@ var ts;
}
}
ts.transformJsx = transformJsx;
- var entities = ts.createMap({
+ var entities = ts.createMapFromTemplate({
"quot": 0x0022,
"amp": 0x0026,
"apos": 0x0027,
@@ -41090,263 +45774,6 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function transformES2017(context) {
- var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
- var resolver = context.getEmitResolver();
- var compilerOptions = context.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var currentSourceFile;
- var enabledSubstitutions;
- var currentSuperContainer;
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
- }
- currentSourceFile = node;
- var visited = ts.visitEachChild(node, visitor, context);
- ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
- return visited;
- }
- function visitor(node) {
- if ((node.transformFlags & 16) === 0) {
- return node;
- }
- switch (node.kind) {
- case 119:
- return undefined;
- case 189:
- return visitAwaitExpression(node);
- case 149:
- return visitMethodDeclaration(node);
- case 225:
- return visitFunctionDeclaration(node);
- case 184:
- return visitFunctionExpression(node);
- case 185:
- return visitArrowFunction(node);
- default:
- return ts.visitEachChild(node, visitor, context);
- }
- }
- function visitAwaitExpression(node) {
- return ts.setOriginalNode(ts.createYield(undefined, ts.visitNode(node.expression, visitor, ts.isExpression), node), node);
- }
- function visitMethodDeclaration(node) {
- return ts.updateMethod(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
- return ts.createOmittedExpression();
- }
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function transformAsyncFunctionBody(node) {
- resumeLexicalEnvironment();
- var original = ts.getOriginalNode(node, ts.isFunctionLike);
- var nodeType = original.type;
- var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
- var isArrowFunction = node.kind === 185;
- var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
- if (!isArrowFunction) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.body.statements, false, visitor);
- statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
- ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(statements, node.body, true);
- if (languageVersion >= 2) {
- if (resolver.getNodeCheckFlags(node) & 4096) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, advancedAsyncSuperHelper);
- }
- else if (resolver.getNodeCheckFlags(node) & 2048) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, asyncSuperHelper);
- }
- }
- return block;
- }
- else {
- var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
- var declarations = endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(expression);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(block.statements, declarations), block.statements));
- }
- return expression;
- }
- }
- function transformFunctionBodyWorker(body, start) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
- }
- else {
- startLexicalEnvironment();
- var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
- var declarations = endLexicalEnvironment();
- return ts.updateBlock(visited, ts.createNodeArray(ts.concatenate(visited.statements, declarations), visited.statements));
- }
- }
- function getPromiseConstructor(type) {
- var typeName = type && ts.getEntityNameFromTypeNode(type);
- if (typeName && ts.isEntityName(typeName)) {
- var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
- if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
- || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
- return typeName;
- }
- }
- return undefined;
- }
- function enableSubstitutionForAsyncMethodsWithSuper() {
- if ((enabledSubstitutions & 1) === 0) {
- enabledSubstitutions |= 1;
- context.enableSubstitution(179);
- context.enableSubstitution(177);
- context.enableSubstitution(178);
- context.enableEmitNotification(226);
- context.enableEmitNotification(149);
- context.enableEmitNotification(151);
- context.enableEmitNotification(152);
- context.enableEmitNotification(150);
- }
- }
- function substituteExpression(node) {
- switch (node.kind) {
- case 177:
- return substitutePropertyAccessExpression(node);
- case 178:
- return substituteElementAccessExpression(node);
- case 179:
- if (enabledSubstitutions & 1) {
- return substituteCallExpression(node);
- }
- break;
- }
- return node;
- }
- function substitutePropertyAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), flags, node);
- }
- }
- return node;
- }
- function substituteElementAccessExpression(node) {
- if (enabledSubstitutions & 1 && node.expression.kind === 96) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(node.argumentExpression, flags, node);
- }
- }
- return node;
- }
- function substituteCallExpression(node) {
- var expression = node.expression;
- if (ts.isSuperProperty(expression)) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- var argumentExpression = ts.isPropertyAccessExpression(expression)
- ? substitutePropertyAccessExpression(expression)
- : substituteElementAccessExpression(expression);
- return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), undefined, [
- ts.createThis()
- ].concat(node.arguments));
- }
- }
- return node;
- }
- function isSuperContainer(node) {
- var kind = node.kind;
- return kind === 226
- || kind === 150
- || kind === 149
- || kind === 151
- || kind === 152;
- }
- function onEmitNode(emitContext, node, emitCallback) {
- if (enabledSubstitutions & 1 && isSuperContainer(node)) {
- var savedCurrentSuperContainer = currentSuperContainer;
- currentSuperContainer = node;
- previousOnEmitNode(emitContext, node, emitCallback);
- currentSuperContainer = savedCurrentSuperContainer;
- }
- else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
- return substituteExpression(node);
- }
- return node;
- }
- function createSuperAccessInAsyncMethod(argumentExpression, flags, location) {
- if (flags & 4096) {
- return ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression]), "value", location);
- }
- else {
- return ts.createCall(ts.createIdentifier("_super"), undefined, [argumentExpression], location);
- }
- }
- function getSuperContainerAsyncMethodFlags() {
- return currentSuperContainer !== undefined
- && resolver.getNodeCheckFlags(currentSuperContainer) & (2048 | 4096);
- }
- }
- ts.transformES2017 = transformES2017;
- function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
- context.requestEmitHelper(awaiterHelper);
- var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(38), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
- return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
- ts.createThis(),
- hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
- promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
- generatorFunc
- ]);
- }
- var awaiterHelper = {
- name: "typescript:awaiter",
- scoped: false,
- priority: 5,
- text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments)).next());\n });\n };"
- };
- var asyncSuperHelper = {
- name: "typescript:async-super",
- scoped: true,
- text: "\n const _super = name => super[name];"
- };
- var advancedAsyncSuperHelper = {
- name: "typescript:advanced-async-super",
- scoped: true,
- text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"
- };
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
function transformES2016(context) {
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
@@ -41361,7 +45788,7 @@ var ts;
return node;
}
switch (node.kind) {
- case 192:
+ case 193:
return visitBinaryExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -41385,19 +45812,19 @@ var ts;
if (ts.isElementAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
var argumentExpressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createElementAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), ts.createAssignment(argumentExpressionTemp, left.argumentExpression, left.argumentExpression), left);
- value = ts.createElementAccess(expressionTemp, argumentExpressionTemp, left);
+ target = ts.setTextRange(ts.createElementAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), ts.setTextRange(ts.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)), left);
+ value = ts.setTextRange(ts.createElementAccess(expressionTemp, argumentExpressionTemp), left);
}
else if (ts.isPropertyAccessExpression(left)) {
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createPropertyAccess(ts.createAssignment(expressionTemp, left.expression, left.expression), left.name, left);
- value = ts.createPropertyAccess(expressionTemp, left.name, left);
+ target = ts.setTextRange(ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), left.name), left);
+ value = ts.setTextRange(ts.createPropertyAccess(expressionTemp, left.name), left);
}
else {
target = left;
value = left;
}
- return ts.createAssignment(target, ts.createMathPow(value, right, node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.createMathPow(value, right, node)), node);
}
function visitExponentiationExpression(node) {
var left = ts.visitNode(node.left, visitor, ts.isExpression);
@@ -41409,8 +45836,78 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var ES2015SubstitutionFlags;
+ (function (ES2015SubstitutionFlags) {
+ ES2015SubstitutionFlags[ES2015SubstitutionFlags["CapturedThis"] = 1] = "CapturedThis";
+ ES2015SubstitutionFlags[ES2015SubstitutionFlags["BlockScopedBindings"] = 2] = "BlockScopedBindings";
+ })(ES2015SubstitutionFlags || (ES2015SubstitutionFlags = {}));
+ var CopyDirection;
+ (function (CopyDirection) {
+ CopyDirection[CopyDirection["ToOriginal"] = 0] = "ToOriginal";
+ CopyDirection[CopyDirection["ToOutParameter"] = 1] = "ToOutParameter";
+ })(CopyDirection || (CopyDirection = {}));
+ var Jump;
+ (function (Jump) {
+ Jump[Jump["Break"] = 2] = "Break";
+ Jump[Jump["Continue"] = 4] = "Continue";
+ Jump[Jump["Return"] = 8] = "Return";
+ })(Jump || (Jump = {}));
+ var SuperCaptureResult;
+ (function (SuperCaptureResult) {
+ SuperCaptureResult[SuperCaptureResult["NoReplacement"] = 0] = "NoReplacement";
+ SuperCaptureResult[SuperCaptureResult["ReplaceSuperCapture"] = 1] = "ReplaceSuperCapture";
+ SuperCaptureResult[SuperCaptureResult["ReplaceWithReturn"] = 2] = "ReplaceWithReturn";
+ })(SuperCaptureResult || (SuperCaptureResult = {}));
+ var HierarchyFacts;
+ (function (HierarchyFacts) {
+ HierarchyFacts[HierarchyFacts["None"] = 0] = "None";
+ HierarchyFacts[HierarchyFacts["Function"] = 1] = "Function";
+ HierarchyFacts[HierarchyFacts["ArrowFunction"] = 2] = "ArrowFunction";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBody"] = 4] = "AsyncFunctionBody";
+ HierarchyFacts[HierarchyFacts["NonStaticClassElement"] = 8] = "NonStaticClassElement";
+ HierarchyFacts[HierarchyFacts["CapturesThis"] = 16] = "CapturesThis";
+ HierarchyFacts[HierarchyFacts["ExportedVariableStatement"] = 32] = "ExportedVariableStatement";
+ HierarchyFacts[HierarchyFacts["TopLevel"] = 64] = "TopLevel";
+ HierarchyFacts[HierarchyFacts["Block"] = 128] = "Block";
+ HierarchyFacts[HierarchyFacts["IterationStatement"] = 256] = "IterationStatement";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlock"] = 512] = "IterationStatementBlock";
+ HierarchyFacts[HierarchyFacts["ForStatement"] = 1024] = "ForStatement";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement";
+ HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName";
+ HierarchyFacts[HierarchyFacts["AncestorFactsMask"] = 16383] = "AncestorFactsMask";
+ HierarchyFacts[HierarchyFacts["BlockScopeIncludes"] = 0] = "BlockScopeIncludes";
+ HierarchyFacts[HierarchyFacts["BlockScopeExcludes"] = 4032] = "BlockScopeExcludes";
+ HierarchyFacts[HierarchyFacts["SourceFileIncludes"] = 64] = "SourceFileIncludes";
+ HierarchyFacts[HierarchyFacts["SourceFileExcludes"] = 3968] = "SourceFileExcludes";
+ HierarchyFacts[HierarchyFacts["FunctionIncludes"] = 65] = "FunctionIncludes";
+ HierarchyFacts[HierarchyFacts["FunctionExcludes"] = 16286] = "FunctionExcludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyIncludes"] = 69] = "AsyncFunctionBodyIncludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyExcludes"] = 16278] = "AsyncFunctionBodyExcludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionIncludes"] = 66] = "ArrowFunctionIncludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionExcludes"] = 16256] = "ArrowFunctionExcludes";
+ HierarchyFacts[HierarchyFacts["ConstructorIncludes"] = 73] = "ConstructorIncludes";
+ HierarchyFacts[HierarchyFacts["ConstructorExcludes"] = 16278] = "ConstructorExcludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementIncludes"] = 256] = "DoOrWhileStatementIncludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementExcludes"] = 0] = "DoOrWhileStatementExcludes";
+ HierarchyFacts[HierarchyFacts["ForStatementIncludes"] = 1280] = "ForStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForStatementExcludes"] = 3008] = "ForStatementExcludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementIncludes"] = 2304] = "ForInOrForOfStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementExcludes"] = 1984] = "ForInOrForOfStatementExcludes";
+ HierarchyFacts[HierarchyFacts["BlockIncludes"] = 128] = "BlockIncludes";
+ HierarchyFacts[HierarchyFacts["BlockExcludes"] = 3904] = "BlockExcludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockIncludes"] = 512] = "IterationStatementBlockIncludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockExcludes"] = 4032] = "IterationStatementBlockExcludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameIncludes"] = 8192] = "ComputedPropertyNameIncludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameExcludes"] = 0] = "ComputedPropertyNameExcludes";
+ HierarchyFacts[HierarchyFacts["NewTarget"] = 16384] = "NewTarget";
+ HierarchyFacts[HierarchyFacts["NewTargetInComputedPropertyName"] = 32768] = "NewTargetInComputedPropertyName";
+ HierarchyFacts[HierarchyFacts["SubtreeFactsMask"] = -16384] = "SubtreeFactsMask";
+ HierarchyFacts[HierarchyFacts["PropagateNewTargetMask"] = 49152] = "PropagateNewTargetMask";
+ })(HierarchyFacts || (HierarchyFacts = {}));
function transformES2015(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
@@ -41418,15 +45915,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
var currentSourceFile;
var currentText;
- var currentParent;
- var currentNode;
- var enclosingVariableStatement;
- var enclosingBlockScopeContainer;
- var enclosingBlockScopeContainerParent;
- var enclosingFunction;
- var enclosingNonArrowFunction;
- var enclosingNonAsyncFunctionBody;
- var isInConstructorWithCapturedSuper;
+ var hierarchyFacts;
var convertedLoopState;
var enabledSubstitutions;
return transformSourceFile;
@@ -41436,247 +45925,207 @@ var ts;
}
currentSourceFile = node;
currentText = node.text;
- var visited = saveStateAndInvoke(node, visitSourceFile);
+ var visited = visitSourceFile(node);
ts.addEmitHelpers(visited, context.readEmitHelpers());
currentSourceFile = undefined;
currentText = undefined;
+ hierarchyFacts = 0;
return visited;
}
- function visitor(node) {
- return saveStateAndInvoke(node, dispatcher);
- }
- function dispatcher(node) {
- return convertedLoopState
- ? visitorForConvertedLoopWorker(node)
- : visitorWorker(node);
- }
- function saveStateAndInvoke(node, f) {
- var savedEnclosingFunction = enclosingFunction;
- var savedEnclosingNonArrowFunction = enclosingNonArrowFunction;
- var savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody;
- var savedEnclosingBlockScopeContainer = enclosingBlockScopeContainer;
- var savedEnclosingBlockScopeContainerParent = enclosingBlockScopeContainerParent;
- var savedEnclosingVariableStatement = enclosingVariableStatement;
- var savedCurrentParent = currentParent;
- var savedCurrentNode = currentNode;
- var savedConvertedLoopState = convertedLoopState;
- var savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper;
- if (ts.nodeStartsNewLexicalEnvironment(node)) {
- isInConstructorWithCapturedSuper = false;
- convertedLoopState = undefined;
- }
- onBeforeVisitNode(node);
- var visited = f(node);
- isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper;
- convertedLoopState = savedConvertedLoopState;
- enclosingFunction = savedEnclosingFunction;
- enclosingNonArrowFunction = savedEnclosingNonArrowFunction;
- enclosingNonAsyncFunctionBody = savedEnclosingNonAsyncFunctionBody;
- enclosingBlockScopeContainer = savedEnclosingBlockScopeContainer;
- enclosingBlockScopeContainerParent = savedEnclosingBlockScopeContainerParent;
- enclosingVariableStatement = savedEnclosingVariableStatement;
- currentParent = savedCurrentParent;
- currentNode = savedCurrentNode;
- return visited;
- }
- function onBeforeVisitNode(node) {
- if (currentNode) {
- if (ts.isBlockScope(currentNode, currentParent)) {
- enclosingBlockScopeContainer = currentNode;
- enclosingBlockScopeContainerParent = currentParent;
- }
- if (ts.isFunctionLike(currentNode)) {
- enclosingFunction = currentNode;
- if (currentNode.kind !== 185) {
- enclosingNonArrowFunction = currentNode;
- if (!(ts.getEmitFlags(currentNode) & 131072)) {
- enclosingNonAsyncFunctionBody = currentNode;
- }
- }
- }
- switch (currentNode.kind) {
- case 205:
- enclosingVariableStatement = currentNode;
- break;
- case 224:
- case 223:
- case 174:
- case 172:
- case 173:
- break;
- default:
- enclosingVariableStatement = undefined;
- }
- }
- currentParent = currentNode;
- currentNode = node;
+ function enterSubtree(excludeFacts, includeFacts) {
+ var ancestorFacts = hierarchyFacts;
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383;
+ return ancestorFacts;
}
- function returnCapturedThis(node) {
- return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
+ function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 | ancestorFacts;
}
function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
- return isInConstructorWithCapturedSuper && node.kind === 216 && !node.expression;
+ return hierarchyFacts & 4096
+ && node.kind === 218
+ && !node.expression;
}
- function shouldCheckNode(node) {
- return (node.transformFlags & 64) !== 0 ||
- node.kind === 219 ||
- (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ function shouldVisitNode(node) {
+ return (node.transformFlags & 128) !== 0
+ || convertedLoopState !== undefined
+ || (hierarchyFacts & 4096 && ts.isStatement(node))
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
}
- function visitorWorker(node) {
- if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
- return returnCapturedThis(node);
- }
- else if (shouldCheckNode(node)) {
+ function visitor(node) {
+ if (shouldVisitNode(node)) {
return visitJavaScript(node);
}
- else if (node.transformFlags & 128 || (isInConstructorWithCapturedSuper && !ts.isExpression(node))) {
- return ts.visitEachChild(node, visitor, context);
- }
else {
return node;
}
}
- function visitorForConvertedLoopWorker(node) {
- var result;
- if (shouldCheckNode(node)) {
- result = visitJavaScript(node);
+ function functionBodyVisitor(node) {
+ if (shouldVisitNode(node)) {
+ return visitBlock(node, true);
}
- else {
- result = visitNodesInConvertedLoop(node);
- }
- return result;
+ return node;
}
- function visitNodesInConvertedLoop(node) {
- switch (node.kind) {
- case 216:
- node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node;
- return visitReturnStatement(node);
- case 205:
- return visitVariableStatement(node);
- case 218:
- return visitSwitchStatement(node);
- case 215:
- case 214:
- return visitBreakOrContinueStatement(node);
- case 98:
- return visitThisKeyword(node);
- case 70:
- return visitIdentifier(node);
- default:
- return ts.visitEachChild(node, visitor, context);
+ function callExpressionVisitor(node) {
+ if (node.kind === 96) {
+ return visitSuperKeyword(true);
}
+ return visitor(node);
}
function visitJavaScript(node) {
switch (node.kind) {
case 114:
return undefined;
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 197:
+ case 198:
return visitClassExpression(node);
- case 144:
+ case 145:
return visitParameter(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 185:
+ case 186:
return visitArrowFunction(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 223:
+ case 225:
return visitVariableDeclaration(node);
case 70:
return visitIdentifier(node);
- case 224:
+ case 226:
return visitVariableDeclarationList(node);
- case 219:
+ case 220:
+ return visitSwitchStatement(node);
+ case 234:
+ return visitCaseBlock(node);
+ case 206:
+ return visitBlock(node, false);
+ case 217:
+ case 216:
+ return visitBreakOrContinueStatement(node);
+ case 221:
return visitLabeledStatement(node);
- case 209:
- return visitDoStatement(node);
- case 210:
- return visitWhileStatement(node);
case 211:
- return visitForStatement(node);
case 212:
- return visitForInStatement(node);
+ return visitDoOrWhileStatement(node, undefined);
case 213:
- return visitForOfStatement(node);
- case 207:
+ return visitForStatement(node, undefined);
+ case 214:
+ return visitForInStatement(node, undefined);
+ case 215:
+ return visitForOfStatement(node, undefined);
+ case 209:
return visitExpressionStatement(node);
- case 176:
+ case 177:
return visitObjectLiteralExpression(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 258:
+ case 261:
return visitShorthandPropertyAssignment(node);
- case 175:
+ case 143:
+ return visitComputedPropertyName(node);
+ case 176:
return visitArrayLiteralExpression(node);
- case 179:
- return visitCallExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
- case 183:
+ case 184:
return visitParenthesizedExpression(node, true);
- case 192:
+ case 193:
return visitBinaryExpression(node, true);
case 12:
case 13:
case 14:
case 15:
return visitTemplateLiteral(node);
- case 181:
+ case 9:
+ return visitStringLiteral(node);
+ case 8:
+ return visitNumericLiteral(node);
+ case 182:
return visitTaggedTemplateExpression(node);
- case 194:
- return visitTemplateExpression(node);
case 195:
- return visitYieldExpression(node);
+ return visitTemplateExpression(node);
case 196:
+ return visitYieldExpression(node);
+ case 197:
return visitSpreadElement(node);
case 96:
- return visitSuperKeyword();
- case 195:
- return ts.visitEachChild(node, visitor, context);
- case 149:
+ return visitSuperKeyword(false);
+ case 98:
+ return visitThisKeyword(node);
+ case 203:
+ return visitMetaProperty(node);
+ case 150:
return visitMethodDeclaration(node);
- case 205:
+ case 152:
+ case 153:
+ return visitAccessorDeclaration(node);
+ case 207:
return visitVariableStatement(node);
+ case 218:
+ return visitReturnStatement(node);
default:
- ts.Debug.failBadSyntaxKind(node);
return ts.visitEachChild(node, visitor, context);
}
}
function visitSourceFile(node) {
+ var ancestorFacts = enterSubtree(3968, 64);
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, false, visitor);
+ var statementOffset = ts.addStandardPrologue(statements, node.statements, false);
addCaptureThisForNodeIfNeeded(statements, node);
+ statementOffset = ts.addCustomPrologue(statements, node.statements, statementOffset, visitor);
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
ts.addRange(statements, endLexicalEnvironment());
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ exitSubtree(ancestorFacts, 0, 0);
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
function visitSwitchStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
- convertedLoopState.allowedNonLabeledJumps |= 2;
- var result = ts.visitEachChild(node, visitor, context);
- convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
- return result;
+ if (convertedLoopState !== undefined) {
+ var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
+ convertedLoopState.allowedNonLabeledJumps |= 2;
+ var result = ts.visitEachChild(node, visitor, context);
+ convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
+ return result;
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitCaseBlock(node) {
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function returnCapturedThis(node) {
+ return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
}
function visitReturnStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- convertedLoopState.nonLocalJumps |= 8;
- return ts.createReturn(ts.createObjectLiteral([
- ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
- ? ts.visitNode(node.expression, visitor, ts.isExpression)
- : ts.createVoidZero())
- ]));
+ if (convertedLoopState) {
+ convertedLoopState.nonLocalJumps |= 8;
+ if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ node = returnCapturedThis(node);
+ }
+ return ts.createReturn(ts.createObjectLiteral([
+ ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
+ ? ts.visitNode(node.expression, visitor, ts.isExpression)
+ : ts.createVoidZero())
+ ]));
+ }
+ else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ return returnCapturedThis(node);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitThisKeyword(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- if (enclosingFunction && enclosingFunction.kind === 185) {
- convertedLoopState.containsLexicalThis = true;
- return node;
+ if (convertedLoopState) {
+ if (hierarchyFacts & 2) {
+ convertedLoopState.containsLexicalThis = true;
+ return node;
+ }
+ return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
}
- return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
+ return node;
}
function visitIdentifier(node) {
if (!convertedLoopState) {
@@ -41685,20 +46134,20 @@ var ts;
if (ts.isGeneratedIdentifier(node)) {
return node;
}
- if (node.text !== "arguments" && !resolver.isArgumentsLocalBinding(node)) {
+ if (node.text !== "arguments" || !resolver.isArgumentsLocalBinding(node)) {
return node;
}
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = ts.createUniqueName("arguments"));
}
function visitBreakOrContinueStatement(node) {
if (convertedLoopState) {
- var jump = node.kind === 215 ? 2 : 4;
- var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||
+ var jump = node.kind === 217 ? 2 : 4;
+ var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) ||
(!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
if (!canUseBreakOrContinue) {
var labelMarker = void 0;
if (!node.label) {
- if (node.kind === 215) {
+ if (node.kind === 217) {
convertedLoopState.nonLocalJumps |= 2;
labelMarker = "break";
}
@@ -41708,7 +46157,7 @@ var ts;
}
}
else {
- if (node.kind === 215) {
+ if (node.kind === 217) {
labelMarker = "break-" + node.label.text;
setLabeledJump(convertedLoopState, true, node.label.text, labelMarker);
}
@@ -41741,8 +46190,9 @@ var ts;
var variable = ts.createVariableDeclaration(ts.getLocalName(node, true), undefined, transformClassLikeDeclarationToExpression(node));
ts.setOriginalNode(variable, node);
var statements = [];
- var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]), node);
+ var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([variable]));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, node);
ts.startOnNewLine(statement);
statements.push(statement);
if (ts.hasModifier(node, 1)) {
@@ -41797,23 +46247,29 @@ var ts;
ts.setEmitFlags(statement, 1536 | 384);
statements.push(statement);
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, node.members), undefined, true);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), node.members), true);
ts.setEmitFlags(block, 1536);
return block;
}
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
if (extendsClauseElement) {
- statements.push(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node)), extendsClauseElement));
+ statements.push(ts.setTextRange(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node))), extendsClauseElement));
}
}
function addConstructor(statements, node, extendsClauseElement) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16278, 73);
var constructor = ts.getFirstConstructorWithBody(node);
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
- var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper), constructor || node);
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getDeclarationName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
+ ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
}
statements.push(constructorFunction);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
}
function transformConstructorParameters(constructor, hasSynthesizedSuper) {
return ts.visitParameterList(constructor && !hasSynthesizedSuper && constructor.parameters, visitor, context)
@@ -41827,48 +46283,55 @@ var ts;
statementOffset = 0;
}
else if (constructor) {
- statementOffset = ts.addPrologueDirectives(statements, constructor.body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, constructor.body.statements, false);
}
if (constructor) {
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
+ if (!hasSynthesizedSuper) {
+ statementOffset = ts.addCustomPrologue(statements, constructor.body.statements, statementOffset, visitor);
+ }
ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
}
- var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94;
+ var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
if (superCaptureStatus === 1 || superCaptureStatus === 2) {
statementOffset++;
}
if (constructor) {
- var body = saveStateAndInvoke(constructor, function (constructor) {
- isInConstructorWithCapturedSuper = superCaptureStatus === 1;
- return ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset);
- });
- ts.addRange(statements, body);
+ if (superCaptureStatus === 1) {
+ hierarchyFacts |= 4096;
+ }
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, statementOffset));
}
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== 2
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(ts.createReturn(ts.createIdentifier("_this")));
}
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, constructor ? constructor.body.statements : node.members), constructor ? constructor.body : node, true);
+ if (constructor) {
+ prependCaptureNewTargetIfNeeded(statements, constructor, false);
+ }
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true);
+ ts.setTextRange(block, constructor ? constructor.body : node);
if (!constructor) {
ts.setEmitFlags(block, 1536);
}
return block;
}
function isSufficientlyCoveredByReturnStatements(statement) {
- if (statement.kind === 216) {
+ if (statement.kind === 218) {
return true;
}
- else if (statement.kind === 208) {
+ else if (statement.kind === 210) {
var ifStatement = statement;
if (ifStatement.elseStatement) {
return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
}
}
- else if (statement.kind === 204) {
+ else if (statement.kind === 206) {
var lastStatement = ts.lastOrUndefined(statement.statements);
if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
return true;
@@ -41876,8 +46339,8 @@ var ts;
}
return false;
}
- function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, hasExtendsClause, hasSynthesizedSuper, statementOffset) {
- if (!hasExtendsClause) {
+ function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, isDerivedClass, hasSynthesizedSuper, statementOffset) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -41897,42 +46360,43 @@ var ts;
var ctorStatements = ctor.body.statements;
if (statementOffset < ctorStatements.length) {
firstStatement = ctorStatements[statementOffset];
- if (firstStatement.kind === 207 && ts.isSuperCall(firstStatement.expression)) {
- var superCall = firstStatement.expression;
- superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
+ if (firstStatement.kind === 209 && ts.isSuperCall(firstStatement.expression)) {
+ superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression);
}
}
- if (superCallExpression && statementOffset === ctorStatements.length - 1) {
+ if (superCallExpression
+ && statementOffset === ctorStatements.length - 1
+ && !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
- if (superCallExpression.kind !== 192
- || superCallExpression.left.kind !== 179) {
+ if (superCallExpression.kind !== 193
+ || superCallExpression.left.kind !== 180) {
ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'.");
}
ts.setCommentRange(returnStatement, ts.getCommentRange(ts.setEmitFlags(superCallExpression.left, 1536)));
statements.push(returnStatement);
return 2;
}
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
if (superCallExpression) {
return 1;
}
return 0;
}
+ function createActualThis() {
+ return ts.setEmitFlags(ts.createThis(), 4);
+ }
function createDefaultSuperCallOrThis() {
- var actualThis = ts.createThis();
- ts.setEmitFlags(actualThis, 4);
- var superCall = ts.createFunctionApply(ts.createIdentifier("_super"), actualThis, ts.createIdentifier("arguments"));
- return ts.createLogicalOr(superCall, actualThis);
+ return ts.createLogicalOr(ts.createLogicalAnd(ts.createStrictInequality(ts.createIdentifier("_super"), ts.createNull()), ts.createFunctionApply(ts.createIdentifier("_super"), createActualThis(), ts.createIdentifier("arguments"))), createActualThis());
}
function visitParameter(node) {
if (node.dotDotDotToken) {
return undefined;
}
else if (ts.isBindingPattern(node.name)) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, ts.getGeneratedNameForNode(node), undefined, undefined, undefined), node), node);
}
else if (node.initializer) {
- return ts.setOriginalNode(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined, node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(undefined, undefined, undefined, node.name, undefined, undefined, undefined), node), node);
}
else {
return node;
@@ -41947,15 +46411,15 @@ var ts;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- var name_37 = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
+ var name = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
if (dotDotDotToken) {
continue;
}
- if (ts.isBindingPattern(name_37)) {
- addDefaultValueAssignmentForBindingPattern(statements, parameter, name_37, initializer);
+ if (ts.isBindingPattern(name)) {
+ addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer);
}
else if (initializer) {
- addDefaultValueAssignmentForInitializer(statements, parameter, name_37, initializer);
+ addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);
}
}
}
@@ -41970,10 +46434,11 @@ var ts;
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
initializer = ts.visitNode(initializer, visitor, ts.isExpression);
- var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.createBlock([
- ts.createStatement(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer)), parameter))
- ], parameter), 1 | 32 | 384), undefined, parameter);
+ var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.setTextRange(ts.createBlock([
+ ts.createStatement(ts.setTextRange(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer))), parameter))
+ ]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
+ ts.setTextRange(statement, parameter);
ts.setEmitFlags(statement, 384 | 32 | 524288);
statements.push(statement);
}
@@ -41990,22 +46455,22 @@ var ts;
var expressionName = ts.getSynthesizedClone(parameter.name);
var restIndex = node.parameters.length - 1;
var temp = ts.createLoopVariable();
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ]), parameter), 524288));
- var forStatement = ts.createFor(ts.createVariableDeclarationList([
+ ])), parameter), 524288));
+ var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
- ], parameter), ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length"), parameter), ts.createPostfixIncrement(temp, parameter), ts.createBlock([
- ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
+ ]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
+ ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
? temp
- : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp)), parameter))
+ : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
ts.setEmitFlags(forStatement, 524288);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
function addCaptureThisForNodeIfNeeded(statements, node) {
- if (node.transformFlags & 32768 && node.kind !== 185) {
+ if (node.transformFlags & 32768 && node.kind !== 186) {
captureThisForNode(statements, node, ts.createThis());
}
}
@@ -42013,29 +46478,62 @@ var ts;
enableSubstitutionsForCapturedThis();
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
- ]), originalStatement);
+ ]));
ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
}
+ function prependCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
+ if (hierarchyFacts & 16384) {
+ var newTarget = void 0;
+ switch (node.kind) {
+ case 186:
+ return statements;
+ case 150:
+ case 152:
+ case 153:
+ newTarget = ts.createVoidZero();
+ break;
+ case 151:
+ newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor");
+ break;
+ case 227:
+ case 185:
+ newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4), 92, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4), "constructor"), ts.createVoidZero());
+ break;
+ default:
+ ts.Debug.failBadSyntaxKind(node);
+ break;
+ }
+ var captureNewTargetStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration("_newTarget", undefined, newTarget)
+ ]));
+ if (copyOnWrite) {
+ return [captureNewTargetStatement].concat(statements);
+ }
+ statements.unshift(captureNewTargetStatement);
+ }
+ return statements;
+ }
function addClassMembers(statements, node) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
switch (member.kind) {
- case 203:
+ case 205:
statements.push(transformSemicolonClassElementToStatement(member));
break;
- case 149:
- statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member));
+ case 150:
+ statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
break;
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.members, member);
if (member === accessors.firstAccessor) {
- statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors));
+ statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
}
break;
- case 150:
+ case 151:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -42044,28 +46542,32 @@ var ts;
}
}
function transformSemicolonClassElementToStatement(member) {
- return ts.createEmptyStatement(member);
+ return ts.setTextRange(ts.createEmptyStatement(), member);
}
- function transformClassMethodDeclarationToStatement(receiver, member) {
+ function transformClassMethodDeclarationToStatement(receiver, member, container) {
+ var ancestorFacts = enterSubtree(0, 0);
var commentRange = ts.getCommentRange(member);
var sourceMapRange = ts.getSourceMapRange(member);
var memberName = ts.createMemberAccessForPropertyName(receiver, ts.visitNode(member.name, visitor, ts.isPropertyName), member.name);
- var memberFunction = transformFunctionLikeToExpression(member, member, undefined);
+ var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
ts.setEmitFlags(memberFunction, 1536);
ts.setSourceMapRange(memberFunction, sourceMapRange);
- var statement = ts.createStatement(ts.createAssignment(memberName, memberFunction), member);
+ var statement = ts.setTextRange(ts.createStatement(ts.createAssignment(memberName, memberFunction)), member);
ts.setOriginalNode(statement, member);
ts.setCommentRange(statement, commentRange);
ts.setEmitFlags(statement, 48);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return statement;
}
- function transformAccessorsToStatement(receiver, accessors) {
- var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, false), ts.getSourceMapRange(accessors.firstAccessor));
+ function transformAccessorsToStatement(receiver, accessors, container) {
+ var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, container, false));
ts.setEmitFlags(statement, 1536);
+ ts.setSourceMapRange(statement, ts.getSourceMapRange(accessors.firstAccessor));
return statement;
}
- function transformAccessorsToExpression(receiver, _a, startsOnNewLine) {
+ function transformAccessorsToExpression(receiver, _a, container, startsOnNewLine) {
var firstAccessor = _a.firstAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
+ var ancestorFacts = enterSubtree(0, 0);
var target = ts.getMutableClone(receiver);
ts.setEmitFlags(target, 1536 | 32);
ts.setSourceMapRange(target, firstAccessor.name);
@@ -42074,7 +46576,7 @@ var ts;
ts.setSourceMapRange(propertyName, firstAccessor.name);
var properties = [];
if (getAccessor) {
- var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined);
+ var getterFunction = transformFunctionLikeToExpression(getAccessor, undefined, undefined, container);
ts.setSourceMapRange(getterFunction, ts.getSourceMapRange(getAccessor));
ts.setEmitFlags(getterFunction, 512);
var getter = ts.createPropertyAssignment("get", getterFunction);
@@ -42082,51 +46584,86 @@ var ts;
properties.push(getter);
}
if (setAccessor) {
- var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined);
+ var setterFunction = transformFunctionLikeToExpression(setAccessor, undefined, undefined, container);
ts.setSourceMapRange(setterFunction, ts.getSourceMapRange(setAccessor));
ts.setEmitFlags(setterFunction, 512);
var setter = ts.createPropertyAssignment("set", setterFunction);
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
- properties.push(ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), ts.createPropertyAssignment("configurable", ts.createLiteral(true)));
+ properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
target,
propertyName,
- ts.createObjectLiteral(properties, undefined, true)
+ ts.createObjectLiteral(properties, true)
]);
if (startsOnNewLine) {
call.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return call;
}
function visitArrowFunction(node) {
if (node.transformFlags & 16384) {
enableSubstitutionsForCapturedThis();
}
- var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node), node);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16256, 66);
+ var func = ts.createFunctionExpression(undefined, undefined, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformFunctionBody(node));
+ ts.setTextRange(func, node);
ts.setOriginalNode(func, node);
ts.setEmitFlags(func, 8);
+ exitSubtree(ancestorFacts, 0, 0);
+ convertedLoopState = savedConvertedLoopState;
return func;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var ancestorFacts = ts.getEmitFlags(node) & 131072
+ ? enterSubtree(16278, 69)
+ : enterSubtree(16286, 65);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionExpression(node, undefined, node.asteriskToken, name, undefined, parameters, undefined, body);
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.transformFlags & 64
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
}
- function transformFunctionLikeToExpression(node, location, name) {
- var savedContainingNonArrowFunction = enclosingNonArrowFunction;
- if (node.kind !== 185) {
- enclosingNonArrowFunction = node;
+ function transformFunctionLikeToExpression(node, location, name, container) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = container && ts.isClassLike(container) && !ts.hasModifier(node, 32)
+ ? enterSubtree(16286, 65 | 8)
+ : enterSubtree(16286, 65);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (hierarchyFacts & 16384 && !name && (node.kind === 227 || node.kind === 185)) {
+ name = ts.getGeneratedNameForNode(node);
}
- var expression = ts.setOriginalNode(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, saveStateAndInvoke(node, transformFunctionBody), location), node);
- enclosingNonArrowFunction = savedContainingNonArrowFunction;
- return expression;
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, node.asteriskToken, name, undefined, parameters, undefined, body), location), node);
}
function transformFunctionBody(node) {
var multiLine = false;
@@ -42138,7 +46675,7 @@ var ts;
var statementOffset;
resumeLexicalEnvironment();
if (ts.isBlock(body)) {
- statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, body.statements, false);
}
addCaptureThisForNodeIfNeeded(statements, node);
addDefaultValueAssignmentsIfNeeded(statements, node);
@@ -42147,6 +46684,7 @@ var ts;
multiLine = true;
}
if (ts.isBlock(body)) {
+ statementOffset = ts.addCustomPrologue(statements, body.statements, statementOffset, visitor);
statementsLocation = body.statements;
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, statementOffset));
if (!multiLine && body.multiLine) {
@@ -42154,7 +46692,7 @@ var ts;
}
}
else {
- ts.Debug.assert(node.kind === 185);
+ ts.Debug.assert(node.kind === 186);
statementsLocation = ts.moveRangeEnd(body, -1);
var equalsGreaterThanToken = node.equalsGreaterThanToken;
if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) {
@@ -42166,17 +46704,20 @@ var ts;
}
}
var expression = ts.visitNode(body, visitor, ts.isExpression);
- var returnStatement = ts.createReturn(expression, body);
+ var returnStatement = ts.createReturn(expression);
+ ts.setTextRange(returnStatement, body);
ts.setEmitFlags(returnStatement, 384 | 32 | 1024);
statements.push(returnStatement);
closeBraceLocation = body;
}
var lexicalEnvironment = context.endLexicalEnvironment();
ts.addRange(statements, lexicalEnvironment);
+ prependCaptureNewTargetIfNeeded(statements, node, false);
if (!multiLine && lexicalEnvironment && lexicalEnvironment.length) {
multiLine = true;
}
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), node.body, multiLine);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), multiLine);
+ ts.setTextRange(block, node.body);
if (!multiLine && singleLine) {
ts.setEmitFlags(block, 1);
}
@@ -42186,11 +46727,26 @@ var ts;
ts.setOriginalNode(block, node.body);
return block;
}
+ function visitFunctionBodyDownLevel(node) {
+ var updated = ts.visitFunctionBody(node.body, functionBodyVisitor, context);
+ return ts.updateBlock(updated, ts.setTextRange(ts.createNodeArray(prependCaptureNewTargetIfNeeded(updated.statements, node, true)), updated.statements));
+ }
+ function visitBlock(node, isFunctionBody) {
+ if (isFunctionBody) {
+ return ts.visitEachChild(node, visitor, context);
+ }
+ var ancestorFacts = hierarchyFacts & 256
+ ? enterSubtree(4032, 512)
+ : enterSubtree(3904, 128);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
function visitExpressionStatement(node) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateStatement(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateStatement(node, visitBinaryExpression(node.expression, false));
}
return ts.visitEachChild(node, visitor, context);
@@ -42198,9 +46754,9 @@ var ts;
function visitParenthesizedExpression(node, needsDestructuringValue) {
if (!needsDestructuringValue) {
switch (node.expression.kind) {
- case 183:
+ case 184:
return ts.updateParen(node, visitParenthesizedExpression(node.expression, false));
- case 192:
+ case 193:
return ts.updateParen(node, visitBinaryExpression(node.expression, false));
}
}
@@ -42210,9 +46766,12 @@ var ts;
if (ts.isDestructuringAssignment(node)) {
return ts.flattenDestructuringAssignment(node, visitor, context, 0, needsDestructuringValue);
}
+ return ts.visitEachChild(node, visitor, context);
}
function visitVariableStatement(node) {
- if (convertedLoopState && (ts.getCombinedNodeFlags(node.declarationList) & 3) == 0) {
+ var ancestorFacts = enterSubtree(0, ts.hasModifier(node, 1) ? 32 : 0);
+ var updated;
+ if (convertedLoopState && (node.declarationList.flags & 3) === 0) {
var assignments = void 0;
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
@@ -42225,53 +46784,59 @@ var ts;
else {
assignment = ts.createBinary(decl.name, 57, ts.visitNode(decl.initializer, visitor, ts.isExpression));
}
- (assignments || (assignments = [])).push(assignment);
+ assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- return ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); }), node);
+ updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25, acc); })), node);
}
else {
- return undefined;
+ updated = undefined;
}
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function visitVariableDeclarationList(node) {
- if (node.flags & 3) {
- enableSubstitutionsForBlockScopedBindings();
+ if (node.transformFlags & 64) {
+ if (node.flags & 3) {
+ enableSubstitutionsForBlockScopedBindings();
+ }
+ var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ ? visitVariableDeclarationInLetDeclarationList
+ : visitVariableDeclaration));
+ var declarationList = ts.createVariableDeclarationList(declarations);
+ ts.setOriginalNode(declarationList, node);
+ ts.setTextRange(declarationList, node);
+ ts.setCommentRange(declarationList, node);
+ if (node.transformFlags & 8388608
+ && (ts.isBindingPattern(node.declarations[0].name)
+ || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
+ var firstDeclaration = ts.firstOrUndefined(declarations);
+ var lastDeclaration = ts.lastOrUndefined(declarations);
+ ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ }
+ return declarationList;
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
- ? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
- var declarationList = ts.createVariableDeclarationList(declarations, node);
- ts.setOriginalNode(declarationList, node);
- ts.setCommentRange(declarationList, node);
- if (node.transformFlags & 8388608
- && (ts.isBindingPattern(node.declarations[0].name)
- || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
- var firstDeclaration = ts.firstOrUndefined(declarations);
- var lastDeclaration = ts.lastOrUndefined(declarations);
- ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
- }
- return declarationList;
+ return ts.visitEachChild(node, visitor, context);
}
function shouldEmitExplicitInitializerForLetDeclaration(node) {
var flags = resolver.getNodeCheckFlags(node);
var isCapturedInFunction = flags & 131072;
var isDeclaredInLoop = flags & 262144;
- var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(enclosingBlockScopeContainer)
+ var emittedAsTopLevel = (hierarchyFacts & 64) !== 0
|| (isCapturedInFunction
&& isDeclaredInLoop
- && ts.isBlock(enclosingBlockScopeContainer)
- && ts.isIterationStatement(enclosingBlockScopeContainerParent, false));
+ && (hierarchyFacts & 512) !== 0);
var emitExplicitInitializer = !emittedAsTopLevel
- && enclosingBlockScopeContainer.kind !== 212
- && enclosingBlockScopeContainer.kind !== 213
+ && (hierarchyFacts & 2048) === 0
&& (!resolver.isDeclarationWithCollidingName(node)
|| (isDeclaredInLoop
&& !isCapturedInFunction
- && !ts.isIterationStatement(enclosingBlockScopeContainer, false)));
+ && (hierarchyFacts & (1024 | 2048)) === 0));
return emitExplicitInitializer;
}
function visitVariableDeclarationInLetDeclarationList(node) {
@@ -42287,84 +46852,94 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitVariableDeclaration(node) {
+ var ancestorFacts = enterSubtree(32, 0);
+ var updated;
if (ts.isBindingPattern(node.name)) {
- var hoistTempVariables = enclosingVariableStatement
- && ts.hasModifier(enclosingVariableStatement, 1);
- return ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, hoistTempVariables);
+ updated = ts.flattenDestructuringBinding(node, visitor, context, 0, undefined, (ancestorFacts & 32) !== 0);
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
+ }
+ function recordLabel(node) {
+ convertedLoopState.labels.set(node.label.text, node.label.text);
+ }
+ function resetLabel(node) {
+ convertedLoopState.labels.set(node.label.text, undefined);
}
function visitLabeledStatement(node) {
- if (convertedLoopState) {
- if (!convertedLoopState.labels) {
- convertedLoopState.labels = ts.createMap();
- }
- convertedLoopState.labels[node.label.text] = node.label.text;
+ if (convertedLoopState && !convertedLoopState.labels) {
+ convertedLoopState.labels = ts.createMap();
}
- var result;
- if (ts.isIterationStatement(node.statement, false) && shouldConvertIterationStatementBody(node.statement)) {
- result = ts.visitNodes(ts.createNodeArray([node.statement]), visitor, ts.isStatement);
- }
- else {
- result = ts.visitEachChild(node, visitor, context);
- }
- if (convertedLoopState) {
- convertedLoopState.labels[node.label.text] = undefined;
+ var statement = ts.unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);
+ return ts.isIterationStatement(statement, false)
+ ? visitIterationStatement(statement, node)
+ : ts.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement), node, convertedLoopState && resetLabel);
+ }
+ function visitIterationStatement(node, outermostLabeledStatement) {
+ switch (node.kind) {
+ case 211:
+ case 212:
+ return visitDoOrWhileStatement(node, outermostLabeledStatement);
+ case 213:
+ return visitForStatement(node, outermostLabeledStatement);
+ case 214:
+ return visitForInStatement(node, outermostLabeledStatement);
+ case 215:
+ return visitForOfStatement(node, outermostLabeledStatement);
}
- return result;
}
- function visitDoStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {
+ var ancestorFacts = enterSubtree(excludeFacts, includeFacts);
+ var updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert);
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
- function visitWhileStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitDoOrWhileStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(0, 256, node, outermostLabeledStatement);
}
- function visitForStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(3008, 1280, node, outermostLabeledStatement);
}
- function visitForInStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForInStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement);
}
- function visitForOfStatement(node) {
- return convertIterationStatementBodyIfNecessary(node, convertForOfToFor);
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984, 2304, node, outermostLabeledStatement, compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray);
}
- function convertForOfToFor(node, convertedLoopBodyStatements) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var initializer = node.initializer;
+ function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {
var statements = [];
- var counter = ts.createLoopVariable();
- var rhsReference = expression.kind === 70
- ? ts.createUniqueName(expression.text)
- : ts.createTempVariable(undefined);
- var elementAccess = ts.createElementAccess(rhsReference, counter);
- if (ts.isVariableDeclarationList(initializer)) {
- if (initializer.flags & 3) {
+ if (ts.isVariableDeclarationList(node.initializer)) {
+ if (node.initializer.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var firstOriginalDeclaration = ts.firstOrUndefined(initializer.declarations);
+ var firstOriginalDeclaration = ts.firstOrUndefined(node.initializer.declarations);
if (firstOriginalDeclaration && ts.isBindingPattern(firstOriginalDeclaration.name)) {
- var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, elementAccess);
- var declarationList = ts.createVariableDeclarationList(declarations, initializer);
- ts.setOriginalNode(declarationList, initializer);
+ var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0, boundValue);
+ var declarationList = ts.setTextRange(ts.createVariableDeclarationList(declarations), node.initializer);
+ ts.setOriginalNode(declarationList, node.initializer);
var firstDeclaration = declarations[0];
var lastDeclaration = ts.lastOrUndefined(declarations);
ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
statements.push(ts.createVariableStatement(undefined, declarationList));
}
else {
- statements.push(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, ts.createElementAccess(rhsReference, counter))
- ], ts.moveRangePos(initializer, -1)), initializer), ts.moveRangeEnd(initializer, -1)));
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.setOriginalNode(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(undefined), undefined, boundValue)
+ ]), ts.moveRangePos(node.initializer, -1)), node.initializer)), ts.moveRangeEnd(node.initializer, -1)));
}
}
else {
- var assignment = ts.createAssignment(initializer, elementAccess);
+ var assignment = ts.createAssignment(node.initializer, boundValue);
if (ts.isDestructuringAssignment(assignment)) {
- statements.push(ts.createStatement(ts.flattenDestructuringAssignment(assignment, visitor, context, 0)));
+ ts.aggregateTransformFlags(assignment);
+ statements.push(ts.createStatement(visitBinaryExpression(assignment, false)));
}
else {
- assignment.end = initializer.end;
- statements.push(ts.createStatement(assignment, ts.moveRangeEnd(initializer, -1)));
+ assignment.end = node.initializer.end;
+ statements.push(ts.setTextRange(ts.createStatement(ts.visitNode(assignment, visitor, ts.isExpression)), ts.moveRangeEnd(node.initializer, -1)));
}
}
var bodyLocation;
@@ -42373,7 +46948,7 @@ var ts;
ts.addRange(statements, convertedLoopBodyStatements);
}
else {
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
if (ts.isBlock(statement)) {
ts.addRange(statements, statement.statements);
bodyLocation = statement;
@@ -42383,39 +46958,82 @@ var ts;
statements.push(statement);
}
}
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
+ }
+ function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var counter = ts.createLoopVariable();
+ var rhsReference = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
ts.setEmitFlags(expression, 48 | ts.getEmitFlags(expression));
- var body = ts.createBlock(ts.createNodeArray(statements, statementsLocation), bodyLocation);
- ts.setEmitFlags(body, 48 | 384);
- var forStatement = ts.createFor(ts.setEmitFlags(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0), ts.moveRangePos(node.expression, -1)),
- ts.createVariableDeclaration(rhsReference, undefined, expression, node.expression)
- ], node.expression), 1048576), ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length"), node.expression), ts.createPostfixIncrement(counter, node.expression), body, node);
+ var forStatement = ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(counter, undefined, ts.createLiteral(0)), ts.moveRangePos(node.expression, -1)),
+ ts.setTextRange(ts.createVariableDeclaration(rhsReference, undefined, expression), node.expression)
+ ]), node.expression), 1048576), ts.setTextRange(ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length")), node.expression), ts.setTextRange(ts.createPostfixIncrement(counter), node.expression), convertForOfStatementHead(node, ts.createElementAccess(rhsReference, counter), convertedLoopBodyStatements)), node);
ts.setEmitFlags(forStatement, 256);
- return forStatement;
+ ts.setTextRange(forStatement, node);
+ return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(undefined);
+ var values = ts.createValuesHelper(context, expression, node.expression);
+ var next = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, values), node.expression),
+ ts.createVariableDeclaration(result, undefined, next)
+ ]), node.expression), 1048576), ts.createLogicalNot(ts.createPropertyAccess(result, "done")), ts.createAssignment(result, next), convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)), node), 256);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1)), ts.createBlock([
+ ts.createTry(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createFunctionCall(returnMethod, iterator, []))), 1),
+ ]), undefined, ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
+ ]), 1))
+ ]));
}
function visitObjectLiteralExpression(node) {
var properties = node.properties;
var numProperties = properties.length;
var numInitialProperties = numProperties;
+ var numInitialPropertiesWithoutYield = numProperties;
for (var i = 0; i < numProperties; i++) {
var property = properties[i];
- if (property.transformFlags & 16777216
- || property.name.kind === 142) {
+ if ((property.transformFlags & 16777216 && hierarchyFacts & 4)
+ && i < numInitialPropertiesWithoutYield) {
+ numInitialPropertiesWithoutYield = i;
+ }
+ if (property.name.kind === 143) {
numInitialProperties = i;
break;
}
}
- ts.Debug.assert(numInitialProperties !== numProperties);
- var temp = ts.createTempVariable(hoistVariableDeclaration);
- var expressions = [];
- var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, node.multiLine), 32768));
- if (node.multiLine) {
- assignment.startsOnNewLine = true;
+ if (numInitialProperties !== numProperties) {
+ if (numInitialPropertiesWithoutYield < numInitialProperties) {
+ numInitialProperties = numInitialPropertiesWithoutYield;
+ }
+ var temp = ts.createTempVariable(hoistVariableDeclaration);
+ var expressions = [];
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 32768));
+ if (node.multiLine) {
+ assignment.startsOnNewLine = true;
+ }
+ expressions.push(assignment);
+ addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
+ expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
+ return ts.inlineExpressions(expressions);
}
- expressions.push(assignment);
- addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
- expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
- return ts.inlineExpressions(expressions);
+ return ts.visitEachChild(node, visitor, context);
}
function shouldConvertIterationStatementBody(node) {
return (resolver.getNodeCheckFlags(node) & 65536) !== 0;
@@ -42439,14 +47057,16 @@ var ts;
}
}
}
- function convertIterationStatementBodyIfNecessary(node, convert) {
+ function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert) {
if (!shouldConvertIterationStatementBody(node)) {
var saveAllowedNonLabeledJumps = void 0;
if (convertedLoopState) {
saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
convertedLoopState.allowedNonLabeledJumps = 2 | 4;
}
- var result = convert ? convert(node, undefined) : ts.visitEachChild(node, visitor, context);
+ var result = convert
+ ? convert(node, outermostLabeledStatement, undefined)
+ : ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement, convertedLoopState && resetLabel);
if (convertedLoopState) {
convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;
}
@@ -42455,11 +47075,11 @@ var ts;
var functionName = ts.createUniqueName("_loop");
var loopInitializer;
switch (node.kind) {
- case 211:
- case 212:
case 213:
+ case 214:
+ case 215:
var initializer = node.initializer;
- if (initializer && initializer.kind === 224) {
+ if (initializer && initializer.kind === 226) {
loopInitializer = initializer;
}
break;
@@ -42485,19 +47105,26 @@ var ts;
convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables;
}
}
- var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement);
+ startLexicalEnvironment();
+ var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
+ var lexicalEnvironment = endLexicalEnvironment();
var currentState = convertedLoopState;
convertedLoopState = outerConvertedLoopState;
- if (loopOutParameters.length) {
+ if (loopOutParameters.length || lexicalEnvironment) {
var statements_4 = ts.isBlock(loopBody) ? loopBody.statements.slice() : [loopBody];
- copyOutParameters(loopOutParameters, 1, statements_4);
- loopBody = ts.createBlock(statements_4, undefined, true);
+ if (loopOutParameters.length) {
+ copyOutParameters(loopOutParameters, 1, statements_4);
+ }
+ ts.addRange(statements_4, lexicalEnvironment);
+ loopBody = ts.createBlock(statements_4, true);
+ }
+ if (ts.isBlock(loopBody)) {
+ loopBody.multiLine = true;
}
- if (!ts.isBlock(loopBody)) {
- loopBody = ts.createBlock([loopBody], undefined, true);
+ else {
+ loopBody = ts.createBlock([loopBody], true);
}
- var isAsyncBlockContainingAwait = enclosingNonArrowFunction
- && (ts.getEmitFlags(enclosingNonArrowFunction) & 131072) !== 0
+ var isAsyncBlockContainingAwait = hierarchyFacts & 4
&& (node.statement.transformFlags & 16777216) !== 0;
var loopBodyFlags = 0;
if (currentState.containsLexicalThis) {
@@ -42556,19 +47183,18 @@ var ts;
var convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, isAsyncBlockContainingAwait);
var loop;
if (convert) {
- loop = convert(node, convertedLoopBodyStatements);
+ loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- loop = ts.getMutableClone(node);
- loop.statement = undefined;
- loop = ts.visitEachChild(loop, visitor, context);
- loop.statement = ts.createBlock(convertedLoopBodyStatements, undefined, true);
- loop.transformFlags = 0;
- ts.aggregateTransformFlags(loop);
- }
- statements.push(currentParent.kind === 219
- ? ts.createLabel(currentParent.label, loop)
- : loop);
+ var clone_4 = ts.getMutableClone(node);
+ clone_4.statement = undefined;
+ clone_4 = ts.visitEachChild(clone_4, visitor, context);
+ clone_4.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_4.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_4);
+ loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ statements.push(loop);
return statements;
}
function copyOutParameter(outParam, copyDirection) {
@@ -42589,7 +47215,9 @@ var ts;
!state.labeledNonLocalBreaks &&
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
- var callResult = isAsyncBlockContainingAwait ? ts.createYield(ts.createToken(38), call) : call;
+ var callResult = isAsyncBlockContainingAwait
+ ? ts.createYield(ts.createToken(38), ts.setEmitFlags(call, 4194304))
+ : call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
copyOutParameters(state.loopOutParameters, 0, statements);
@@ -42627,23 +47255,22 @@ var ts;
if (!state.labeledNonLocalBreaks) {
state.labeledNonLocalBreaks = ts.createMap();
}
- state.labeledNonLocalBreaks[labelText] = labelMarker;
+ state.labeledNonLocalBreaks.set(labelText, labelMarker);
}
else {
if (!state.labeledNonLocalContinues) {
state.labeledNonLocalContinues = ts.createMap();
}
- state.labeledNonLocalContinues[labelText] = labelMarker;
+ state.labeledNonLocalContinues.set(labelText, labelMarker);
}
}
function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {
if (!table) {
return;
}
- for (var labelText in table) {
- var labelMarker = table[labelText];
+ table.forEach(function (labelMarker, labelText) {
var statements = [];
- if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) {
+ if (!outerLoop || (outerLoop.labels && outerLoop.labels.get(labelText))) {
var label = ts.createIdentifier(labelText);
statements.push(isBreak ? ts.createBreak(label) : ts.createContinue(label));
}
@@ -42652,7 +47279,7 @@ var ts;
statements.push(ts.createReturn(loopResultName));
}
caseClauses.push(ts.createCaseClause(ts.createLiteral(labelMarker), statements));
- }
+ });
}
function processLoopVariableDeclaration(decl, loopParameters, loopOutParameters) {
var name = decl.name;
@@ -42667,7 +47294,7 @@ var ts;
else {
loopParameters.push(ts.createParameter(undefined, undefined, undefined, name));
if (resolver.getNodeCheckFlags(decl) & 2097152) {
- var outParamName = ts.createUniqueName("out_" + name.text);
+ var outParamName = ts.createUniqueName("out_" + ts.unescapeIdentifier(name.text));
loopOutParameters.push({ originalName: name, outParamName: outParamName });
}
}
@@ -42678,22 +47305,22 @@ var ts;
for (var i = start; i < numProperties; i++) {
var property = properties[i];
switch (property.kind) {
- case 151:
case 152:
+ case 153:
var accessors = ts.getAllAccessorDeclarations(node.properties, property);
if (property === accessors.firstAccessor) {
- expressions.push(transformAccessorsToExpression(receiver, accessors, node.multiLine));
+ expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine));
}
break;
- case 257:
+ case 150:
+ expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
+ break;
+ case 260:
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 258:
+ case 261:
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 149:
- expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node.multiLine));
- break;
default:
ts.Debug.failBadSyntaxKind(node);
break;
@@ -42701,34 +47328,49 @@ var ts;
}
}
function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name), property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
return expression;
}
- function transformObjectLiteralMethodDeclarationToExpression(method, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined), method);
+ function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {
+ var ancestorFacts = enterSubtree(0, 0);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, method, undefined, container));
+ ts.setTextRange(expression, method);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 16384 : 0);
return expression;
}
function visitCatchClause(node) {
- ts.Debug.assert(ts.isBindingPattern(node.variableDeclaration.name));
- var temp = ts.createTempVariable(undefined);
- var newVariableDeclaration = ts.createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration);
- var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
- var list = ts.createVariableDeclarationList(vars, node.variableDeclaration, node.variableDeclaration.flags);
- var destructure = ts.createVariableStatement(undefined, list);
- return ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ var ancestorFacts = enterSubtree(4032, 0);
+ var updated;
+ if (ts.isBindingPattern(node.variableDeclaration.name)) {
+ var temp = ts.createTempVariable(undefined);
+ var newVariableDeclaration = ts.createVariableDeclaration(temp);
+ ts.setTextRange(newVariableDeclaration, node.variableDeclaration);
+ var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0, temp);
+ var list = ts.createVariableDeclarationList(vars);
+ ts.setTextRange(list, node.variableDeclaration);
+ var destructure = ts.createVariableStatement(undefined, list);
+ updated = ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0, 0);
+ return updated;
}
function addStatementToStartOfBlock(block, statement) {
var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
@@ -42736,21 +47378,43 @@ var ts;
}
function visitMethodDeclaration(node) {
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
- var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined);
+ var functionExpression = transformFunctionLikeToExpression(node, ts.moveRangePos(node, -1), undefined, undefined);
ts.setEmitFlags(functionExpression, 512 | ts.getEmitFlags(functionExpression));
- return ts.createPropertyAssignment(node.name, functionExpression, node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, functionExpression), node);
+ }
+ function visitAccessorDeclaration(node) {
+ ts.Debug.assert(!ts.isComputedPropertyName(node.name));
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286, 65);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, 0);
+ convertedLoopState = savedConvertedLoopState;
+ return updated;
}
function visitShorthandPropertyAssignment(node) {
- return ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name), node);
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name)), node);
+ }
+ function visitComputedPropertyName(node) {
+ var ancestorFacts = enterSubtree(0, 8192);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152, hierarchyFacts & 49152 ? 32768 : 0);
+ return updated;
}
function visitYieldExpression(node) {
return ts.visitEachChild(node, visitor, context);
}
function visitArrayLiteralExpression(node) {
- return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ if (node.transformFlags & 64) {
+ return transformAndSpreadElements(node.elements, true, node.multiLine, node.elements.hasTrailingComma);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
- return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ if (node.transformFlags & 64) {
+ return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
+ }
+ return ts.updateCall(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression), undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
}
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
@@ -42762,38 +47426,54 @@ var ts;
}
var resultingCall;
if (node.transformFlags & 524288) {
- resultingCall = ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
+ resultingCall = ts.createFunctionApply(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
}
else {
- resultingCall = ts.createFunctionCall(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
+ resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression), node);
}
if (node.expression.kind === 96) {
var actualThis = ts.createThis();
ts.setEmitFlags(actualThis, 4);
var initializer = ts.createLogicalOr(resultingCall, actualThis);
- return assignToCapturedThis
+ resultingCall = assignToCapturedThis
? ts.createAssignment(ts.createIdentifier("_this"), initializer)
: initializer;
}
- return resultingCall;
+ return ts.setOriginalNode(resultingCall, node);
}
function visitNewExpression(node) {
- ts.Debug.assert((node.transformFlags & 524288) !== 0);
- var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ if (node.transformFlags & 524288) {
+ var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
+ return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), false, false, false)), undefined, []);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function transformAndSpreadElements(elements, needsUniqueCopy, multiLine, hasTrailingComma) {
var numElements = elements.length;
var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
}));
- if (segments.length === 1) {
- var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 175
- ? ts.createArraySlice(segments[0])
- : segments[0];
+ if (compilerOptions.downlevelIteration) {
+ if (segments.length === 1) {
+ var firstSegment = segments[0];
+ if (ts.isCallExpression(firstSegment)
+ && ts.isIdentifier(firstSegment.expression)
+ && (ts.getEmitFlags(firstSegment.expression) & 4096)
+ && firstSegment.expression.text === "___spread") {
+ return segments[0];
+ }
+ }
+ return ts.createSpreadHelper(context, segments);
+ }
+ else {
+ if (segments.length === 1) {
+ var firstElement = elements[0];
+ return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176
+ ? ts.createArraySlice(segments[0])
+ : segments[0];
+ }
+ return ts.createArrayConcat(segments.shift(), segments);
}
- return ts.createArrayConcat(segments.shift(), segments);
}
function partitionSpread(node) {
return ts.isSpreadExpression(node)
@@ -42804,7 +47484,7 @@ var ts;
return ts.map(chunk, visitExpressionOfSpread);
}
function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
- return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, undefined, hasTrailingComma), visitor, ts.isExpression), undefined, multiLine);
+ return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
}
function visitSpreadElement(node) {
return ts.visitNode(node.expression, visitor, ts.isExpression);
@@ -42813,7 +47493,19 @@ var ts;
return ts.visitNode(node.expression, visitor, ts.isExpression);
}
function visitTemplateLiteral(node) {
- return ts.createLiteral(node.text, node);
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ function visitStringLiteral(node) {
+ if (node.hasExtendedUnicodeEscape) {
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ return node;
+ }
+ function visitNumericLiteral(node) {
+ if (node.numericLiteralFlags & 48) {
+ return ts.setTextRange(ts.createNumericLiteral(node.text), node);
+ }
+ return node;
}
function visitTaggedTemplateExpression(node) {
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
@@ -42847,7 +47539,7 @@ var ts;
var isLast = node.kind === 12 || node.kind === 15;
text = text.substring(1, text.length - (isLast ? 1 : 2));
text = text.replace(/\r\n?/g, "\n");
- return ts.createLiteral(text, node);
+ return ts.setTextRange(ts.createLiteral(text), node);
}
function visitTemplateExpression(node) {
var expressions = [];
@@ -42855,7 +47547,8 @@ var ts;
addTemplateSpans(expressions, node);
var expression = ts.reduceLeft(expressions, ts.createAdd);
if (ts.nodeIsSynthesized(expression)) {
- ts.setTextRange(expression, node);
+ expression.pos = node.pos;
+ expression.end = node.end;
}
return expression;
}
@@ -42878,21 +47571,34 @@ var ts;
}
}
}
- function visitSuperKeyword() {
- return enclosingNonAsyncFunctionBody
- && ts.isClassElement(enclosingNonAsyncFunctionBody)
- && !ts.hasModifier(enclosingNonAsyncFunctionBody, 32)
- && currentParent.kind !== 179
+ function visitSuperKeyword(isExpressionOfCall) {
+ return hierarchyFacts & 8
+ && !isExpressionOfCall
? ts.createPropertyAccess(ts.createIdentifier("_super"), "prototype")
: ts.createIdentifier("_super");
}
- function onEmitNode(emitContext, node, emitCallback) {
- var savedEnclosingFunction = enclosingFunction;
+ function visitMetaProperty(node) {
+ if (node.keywordToken === 93 && node.name.text === "target") {
+ if (hierarchyFacts & 8192) {
+ hierarchyFacts |= 32768;
+ }
+ else {
+ hierarchyFacts |= 16384;
+ }
+ return ts.createIdentifier("_newTarget");
+ }
+ return node;
+ }
+ function onEmitNode(hint, node, emitCallback) {
if (enabledSubstitutions & 1 && ts.isFunctionLike(node)) {
- enclosingFunction = node;
+ var ancestorFacts = enterSubtree(16286, ts.getEmitFlags(node) & 8
+ ? 65 | 16
+ : 65);
+ previousOnEmitNode(hint, node, emitCallback);
+ exitSubtree(ancestorFacts, 0, 0);
+ return;
}
- previousOnEmitNode(emitContext, node, emitCallback);
- enclosingFunction = savedEnclosingFunction;
+ previousOnEmitNode(hint, node, emitCallback);
}
function enableSubstitutionsForBlockScopedBindings() {
if ((enabledSubstitutions & 2) === 0) {
@@ -42904,18 +47610,18 @@ var ts;
if ((enabledSubstitutions & 1) === 0) {
enabledSubstitutions |= 1;
context.enableSubstitution(98);
- context.enableEmitNotification(150);
- context.enableEmitNotification(149);
context.enableEmitNotification(151);
+ context.enableEmitNotification(150);
context.enableEmitNotification(152);
+ context.enableEmitNotification(153);
+ context.enableEmitNotification(186);
context.enableEmitNotification(185);
- context.enableEmitNotification(184);
- context.enableEmitNotification(225);
+ context.enableEmitNotification(227);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
if (ts.isIdentifier(node)) {
@@ -42927,7 +47633,7 @@ var ts;
if (enabledSubstitutions & 2) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
- return ts.getGeneratedNameForNode(original);
+ return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
}
}
return node;
@@ -42935,10 +47641,10 @@ var ts;
function isNameOfDeclarationWithCollidingName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 174:
- case 226:
- case 229:
- case 223:
+ case 175:
+ case 228:
+ case 231:
+ case 225:
return parent.name === node
&& resolver.isDeclarationWithCollidingName(parent);
}
@@ -42957,16 +47663,15 @@ var ts;
if (enabledSubstitutions & 2) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
if (declaration) {
- return ts.getGeneratedNameForNode(declaration.name);
+ return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
}
}
return node;
}
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
- && enclosingFunction
- && ts.getEmitFlags(enclosingFunction) & 8) {
- return ts.createIdentifier("_this", node);
+ && hierarchyFacts & 16) {
+ return ts.setTextRange(ts.createIdentifier("_this"), node);
}
return node;
}
@@ -42982,11 +47687,11 @@ var ts;
return false;
}
var statement = ts.firstOrUndefined(constructor.body.statements);
- if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 207) {
+ if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209) {
return false;
}
var statementExpression = statement.expression;
- if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 179) {
+ if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180) {
return false;
}
var callTarget = statementExpression.expression;
@@ -42994,7 +47699,7 @@ var ts;
return false;
}
var callArgument = ts.singleOrUndefined(statementExpression.arguments);
- if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 196) {
+ if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197) {
return false;
}
var expression = callArgument.expression;
@@ -43013,18 +47718,65 @@ var ts;
name: "typescript:extends",
scoped: false,
priority: 0,
- text: "\n var __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };"
+ text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
};
})(ts || (ts = {}));
var ts;
(function (ts) {
- var instructionNames = ts.createMap((_a = {},
- _a[2] = "return",
- _a[3] = "break",
- _a[4] = "yield",
- _a[5] = "yield*",
- _a[7] = "endfinally",
- _a));
+ var OpCode;
+ (function (OpCode) {
+ OpCode[OpCode["Nop"] = 0] = "Nop";
+ OpCode[OpCode["Statement"] = 1] = "Statement";
+ OpCode[OpCode["Assign"] = 2] = "Assign";
+ OpCode[OpCode["Break"] = 3] = "Break";
+ OpCode[OpCode["BreakWhenTrue"] = 4] = "BreakWhenTrue";
+ OpCode[OpCode["BreakWhenFalse"] = 5] = "BreakWhenFalse";
+ OpCode[OpCode["Yield"] = 6] = "Yield";
+ OpCode[OpCode["YieldStar"] = 7] = "YieldStar";
+ OpCode[OpCode["Return"] = 8] = "Return";
+ OpCode[OpCode["Throw"] = 9] = "Throw";
+ OpCode[OpCode["Endfinally"] = 10] = "Endfinally";
+ })(OpCode || (OpCode = {}));
+ var BlockAction;
+ (function (BlockAction) {
+ BlockAction[BlockAction["Open"] = 0] = "Open";
+ BlockAction[BlockAction["Close"] = 1] = "Close";
+ })(BlockAction || (BlockAction = {}));
+ var CodeBlockKind;
+ (function (CodeBlockKind) {
+ CodeBlockKind[CodeBlockKind["Exception"] = 0] = "Exception";
+ CodeBlockKind[CodeBlockKind["With"] = 1] = "With";
+ CodeBlockKind[CodeBlockKind["Switch"] = 2] = "Switch";
+ CodeBlockKind[CodeBlockKind["Loop"] = 3] = "Loop";
+ CodeBlockKind[CodeBlockKind["Labeled"] = 4] = "Labeled";
+ })(CodeBlockKind || (CodeBlockKind = {}));
+ var ExceptionBlockState;
+ (function (ExceptionBlockState) {
+ ExceptionBlockState[ExceptionBlockState["Try"] = 0] = "Try";
+ ExceptionBlockState[ExceptionBlockState["Catch"] = 1] = "Catch";
+ ExceptionBlockState[ExceptionBlockState["Finally"] = 2] = "Finally";
+ ExceptionBlockState[ExceptionBlockState["Done"] = 3] = "Done";
+ })(ExceptionBlockState || (ExceptionBlockState = {}));
+ var Instruction;
+ (function (Instruction) {
+ Instruction[Instruction["Next"] = 0] = "Next";
+ Instruction[Instruction["Throw"] = 1] = "Throw";
+ Instruction[Instruction["Return"] = 2] = "Return";
+ Instruction[Instruction["Break"] = 3] = "Break";
+ Instruction[Instruction["Yield"] = 4] = "Yield";
+ Instruction[Instruction["YieldStar"] = 5] = "YieldStar";
+ Instruction[Instruction["Catch"] = 6] = "Catch";
+ Instruction[Instruction["Endfinally"] = 7] = "Endfinally";
+ })(Instruction || (Instruction = {}));
+ function getInstructionName(instruction) {
+ switch (instruction) {
+ case 2: return "return";
+ case 3: return "break";
+ case 4: return "yield";
+ case 5: return "yield*";
+ case 7: return "endfinally";
+ }
+ }
function transformGenerators(context) {
var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistFunctionDeclaration = context.hoistFunctionDeclaration, hoistVariableDeclaration = context.hoistVariableDeclaration;
var compilerOptions = context.getCompilerOptions();
@@ -43090,13 +47842,13 @@ var ts;
}
function visitJavaScriptInStatementContainingYield(node) {
switch (node.kind) {
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
default:
return visitJavaScriptInGeneratorFunctionBody(node);
@@ -43104,24 +47856,24 @@ var ts;
}
function visitJavaScriptInGeneratorFunctionBody(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
- case 151:
case 152:
+ case 153:
return visitAccessorDeclaration(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 215:
+ case 217:
return visitBreakStatement(node);
- case 214:
- return visitContinueStatement(node);
case 216:
+ return visitContinueStatement(node);
+ case 218:
return visitReturnStatement(node);
default:
if (node.transformFlags & 16777216) {
@@ -43137,21 +47889,21 @@ var ts;
}
function visitJavaScriptContainingYield(node) {
switch (node.kind) {
- case 192:
- return visitBinaryExpression(node);
case 193:
+ return visitBinaryExpression(node);
+ case 194:
return visitConditionalExpression(node);
- case 195:
+ case 196:
return visitYieldExpression(node);
- case 175:
- return visitArrayLiteralExpression(node);
case 176:
+ return visitArrayLiteralExpression(node);
+ case 177:
return visitObjectLiteralExpression(node);
- case 178:
- return visitElementAccessExpression(node);
case 179:
- return visitCallExpression(node);
+ return visitElementAccessExpression(node);
case 180:
+ return visitCallExpression(node);
+ case 181:
return visitNewExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -43159,9 +47911,9 @@ var ts;
}
function visitGenerator(node) {
switch (node.kind) {
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 184:
+ case 185:
return visitFunctionExpression(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -43169,8 +47921,8 @@ var ts;
}
}
function visitFunctionDeclaration(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -43190,8 +47942,8 @@ var ts;
}
}
function visitFunctionExpression(node) {
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072) {
- node = ts.setOriginalNode(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body), node), node);
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(undefined, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
}
else {
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
@@ -43243,7 +47995,7 @@ var ts;
operationLocations = undefined;
state = ts.createTempVariable(undefined);
resumeLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, body.statements, false, visitor);
+ var statementOffset = ts.addPrologue(statements, body.statements, false, visitor);
transformAndEmitStatements(body.statements, statementOffset);
var buildResult = build();
ts.addRange(statements, endLexicalEnvironment());
@@ -43261,7 +48013,7 @@ var ts;
operationArguments = savedOperationArguments;
operationLocations = savedOperationLocations;
state = savedState;
- return ts.createBlock(statements, body, body.multiLine);
+ return ts.setTextRange(ts.createBlock(statements, body.multiLine), body);
}
function visitVariableStatement(node) {
if (node.transformFlags & 16777216) {
@@ -43318,10 +48070,10 @@ var ts;
if (containsYield(right)) {
var target = void 0;
switch (left.kind) {
- case 177:
+ case 178:
target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
break;
- case 178:
+ case 179:
target = ts.updateElementAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
break;
default:
@@ -43330,7 +48082,7 @@ var ts;
}
var operator = node.operatorToken.kind;
if (isCompoundAssignment(operator)) {
- return ts.createBinary(target, 57, ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression), node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.setTextRange(ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression)), node)), node);
}
else {
return ts.updateBinary(node, target, ts.visitNode(right, visitor, ts.isExpression));
@@ -43346,10 +48098,10 @@ var ts;
else if (node.operatorToken.kind === 25) {
return visitCommaExpression(node);
}
- var clone_4 = ts.getMutableClone(node);
- clone_4.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
- clone_4.right = ts.visitNode(node.right, visitor, ts.isExpression);
- return clone_4;
+ var clone_5 = ts.getMutableClone(node);
+ clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
+ clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression);
+ return clone_5;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43405,38 +48157,43 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- emitYieldStar(expression, node);
+ var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ ? ts.createValuesHelper(context, expression, node)
+ : expression;
+ emitYieldStar(iterator, node);
}
else {
emitYield(expression, node);
}
markLabel(resumeLabel);
- return createGeneratorResume();
+ return createGeneratorResume(node);
}
function visitArrayLiteralExpression(node) {
return visitElements(node.elements, undefined, undefined, node.multiLine);
}
function visitElements(elements, leadingElement, location, multiLine) {
var numInitialElements = countInitialNodesWithoutYield(elements);
- var temp = declareLocal();
- var hasAssignedTemp = false;
+ var temp;
if (numInitialElements > 0) {
+ temp = declareLocal();
var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
emitAssignment(temp, ts.createArrayLiteral(leadingElement
? [leadingElement].concat(initialElements) : initialElements));
leadingElement = undefined;
- hasAssignedTemp = true;
}
var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
- return hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, location, multiLine);
+ return temp
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location);
function reduceElement(expressions, element) {
if (containsYield(element) && expressions.length > 0) {
+ var hasAssignedTemp = temp !== undefined;
+ if (!temp) {
+ temp = declareLocal();
+ }
emitAssignment(temp, hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, undefined, multiLine));
- hasAssignedTemp = true;
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine));
leadingElement = undefined;
expressions = [];
}
@@ -43449,7 +48206,7 @@ var ts;
var multiLine = node.multiLine;
var numInitialProperties = countInitialNodesWithoutYield(properties);
var temp = declareLocal();
- emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), undefined, multiLine));
+ emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), multiLine));
var expressions = ts.reduceLeft(properties, reduceProperty, [], numInitialProperties);
expressions.push(multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
return ts.inlineExpressions(expressions);
@@ -43471,10 +48228,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- var clone_5 = ts.getMutableClone(node);
- clone_5.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
- clone_5.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
- return clone_5;
+ var clone_6 = ts.getMutableClone(node);
+ clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
+ clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
+ return clone_6;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43488,7 +48245,7 @@ var ts;
function visitNewExpression(node) {
if (ts.forEach(node.arguments, containsYield)) {
var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.setOriginalNode(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, [], node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments, ts.createVoidZero())), undefined, []), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43517,38 +48274,38 @@ var ts;
}
function transformAndEmitStatementWorker(node) {
switch (node.kind) {
- case 204:
+ case 206:
return transformAndEmitBlock(node);
- case 207:
+ case 209:
return transformAndEmitExpressionStatement(node);
- case 208:
+ case 210:
return transformAndEmitIfStatement(node);
- case 209:
+ case 211:
return transformAndEmitDoStatement(node);
- case 210:
+ case 212:
return transformAndEmitWhileStatement(node);
- case 211:
+ case 213:
return transformAndEmitForStatement(node);
- case 212:
- return transformAndEmitForInStatement(node);
case 214:
+ return transformAndEmitForInStatement(node);
+ case 216:
return transformAndEmitContinueStatement(node);
- case 215:
+ case 217:
return transformAndEmitBreakStatement(node);
- case 216:
+ case 218:
return transformAndEmitReturnStatement(node);
- case 217:
+ case 219:
return transformAndEmitWithStatement(node);
- case 218:
+ case 220:
return transformAndEmitSwitchStatement(node);
- case 219:
+ case 221:
return transformAndEmitLabeledStatement(node);
- case 220:
+ case 222:
return transformAndEmitThrowStatement(node);
- case 221:
+ case 223:
return transformAndEmitTryStatement(node);
default:
- return emitStatement(ts.visitNode(node, visitor, ts.isStatement, true));
+ return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
}
}
function transformAndEmitBlock(node) {
@@ -43565,7 +48322,9 @@ var ts;
function transformAndEmitVariableDeclarationList(node) {
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
- hoistVariableDeclaration(variable.name);
+ var name = ts.getSynthesizedClone(variable.name);
+ ts.setCommentRange(name, variable.name);
+ hoistVariableDeclaration(name);
}
var variables = ts.getInitializedVariables(node);
var numVariables = variables.length;
@@ -43595,7 +48354,7 @@ var ts;
if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {
var endLabel = defineLabel();
var elseLabel = node.elseStatement ? defineLabel() : undefined;
- emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression));
+ emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression), node.expression);
transformAndEmitEmbeddedStatement(node.thenStatement);
if (node.elseStatement) {
emitBreak(endLabel);
@@ -43674,7 +48433,7 @@ var ts;
transformAndEmitVariableDeclarationList(initializer);
}
else {
- emitStatement(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression), initializer));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression)), initializer));
}
}
markLabel(conditionLabel);
@@ -43684,7 +48443,7 @@ var ts;
transformAndEmitEmbeddedStatement(node.statement);
markLabel(incrementLabel);
if (node.incrementor) {
- emitStatement(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression), node.incrementor));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression)), node.incrementor));
}
emitBreak(conditionLabel);
endLoopBlock();
@@ -43698,7 +48457,7 @@ var ts;
beginScriptLoopBlock();
}
var initializer = node.initializer;
- if (ts.isVariableDeclarationList(initializer)) {
+ if (initializer && ts.isVariableDeclarationList(initializer)) {
for (var _i = 0, _a = initializer.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
@@ -43706,7 +48465,7 @@ var ts;
var variables = ts.getInitializedVariables(initializer);
node = ts.updateFor(node, variables.length > 0
? ts.inlineExpressions(ts.map(variables, transformInitializedVariable))
- : undefined, ts.visitNode(node.condition, visitor, ts.isExpression, true), ts.visitNode(node.incrementor, visitor, ts.isExpression, true), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -43764,7 +48523,7 @@ var ts;
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
}
- node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -43803,10 +48562,10 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function transformAndEmitReturnStatement(node) {
- emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function visitReturnStatement(node) {
- return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression, true), node);
+ return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression), node);
}
function transformAndEmitWithStatement(node) {
if (containsYield(node)) {
@@ -43829,7 +48588,7 @@ var ts;
for (var i = 0; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
clauseLabels.push(defineLabel());
- if (clause.kind === 254 && defaultClauseIndex === -1) {
+ if (clause.kind === 257 && defaultClauseIndex === -1) {
defaultClauseIndex = i;
}
}
@@ -43839,7 +48598,7 @@ var ts;
var defaultClausesSkipped = 0;
for (var i = clausesWritten; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
- if (clause.kind === 253) {
+ if (clause.kind === 256) {
var caseClause = clause;
if (containsYield(caseClause.expression) && pendingClauses.length > 0) {
break;
@@ -43941,9 +48700,9 @@ var ts;
}
return -1;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -43955,17 +48714,17 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (renamedCatchVariables && ts.hasProperty(renamedCatchVariables, node.text)) {
+ if (!ts.isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
var original = ts.getOriginalNode(node);
if (ts.isIdentifier(original) && original.parent) {
var declaration = resolver.getReferencedValueDeclaration(original);
if (declaration) {
- var name_38 = ts.getProperty(renamedCatchVariableDeclarations, String(ts.getOriginalNodeId(declaration)));
- if (name_38) {
- var clone_6 = ts.getMutableClone(name_38);
- ts.setSourceMapRange(clone_6, node);
- ts.setCommentRange(clone_6, node);
- return clone_6;
+ var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
+ if (name) {
+ var clone_7 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_7, node);
+ ts.setCommentRange(clone_7, node);
+ return clone_7;
}
}
}
@@ -43974,7 +48733,7 @@ var ts;
}
function cacheExpression(node) {
var temp;
- if (ts.isGeneratedIdentifier(node)) {
+ if (ts.isGeneratedIdentifier(node) || ts.getEmitFlags(node) & 4096) {
return node;
}
temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -44066,15 +48825,22 @@ var ts;
}
function beginCatchBlock(variable) {
ts.Debug.assert(peekBlockKind() === 0);
- var text = variable.name.text;
- var name = declareLocal(text);
- if (!renamedCatchVariables) {
- renamedCatchVariables = ts.createMap();
- renamedCatchVariableDeclarations = ts.createMap();
- context.enableSubstitution(70);
+ var name;
+ if (ts.isGeneratedIdentifier(variable.name)) {
+ name = variable.name;
+ hoistVariableDeclaration(variable.name);
+ }
+ else {
+ var text = variable.name.text;
+ name = declareLocal(text);
+ if (!renamedCatchVariables) {
+ renamedCatchVariables = ts.createMap();
+ renamedCatchVariableDeclarations = [];
+ context.enableSubstitution(70);
+ }
+ renamedCatchVariables.set(text, true);
+ renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
}
- renamedCatchVariables[text] = true;
- renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
var exception = peekBlock();
ts.Debug.assert(exception.state < 1);
var endLabel = exception.endLabel;
@@ -44274,23 +49040,23 @@ var ts;
}
function createInstruction(instruction) {
var literal = ts.createLiteral(instruction);
- literal.trailingComment = instructionNames[instruction];
+ ts.addSyntheticTrailingComment(literal, 3, getInstructionName(instruction));
return literal;
}
function createInlineBreak(label, location) {
ts.Debug.assert(label > 0, "Invalid label: " + label);
- return ts.createReturn(ts.createArrayLiteral([
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), location);
+ ])), location);
}
function createInlineReturn(expression, location) {
- return ts.createReturn(ts.createArrayLiteral(expression
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), location);
+ : [createInstruction(2)])), location);
}
function createGeneratorResume(location) {
- return ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, [], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(state, "sent"), undefined, []), location);
}
function emitNop() {
emitWorker(0);
@@ -44356,7 +49122,7 @@ var ts;
currentExceptionBlock = undefined;
withBlockStack = undefined;
var buildResult = buildStatements();
- return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, undefined, buildResult.length > 0)), 262144));
+ return createGeneratorHelper(context, ts.setEmitFlags(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, state)], undefined, ts.createBlock(buildResult, buildResult.length > 0)), 262144));
}
function buildStatements() {
if (operations) {
@@ -44565,51 +49331,51 @@ var ts;
}
}
function writeAssign(left, right, operationLocation) {
- writeStatement(ts.createStatement(ts.createAssignment(left, right), operationLocation));
+ writeStatement(ts.setTextRange(ts.createStatement(ts.createAssignment(left, right)), operationLocation));
}
function writeThrow(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createThrow(expression, operationLocation));
+ writeStatement(ts.setTextRange(ts.createThrow(expression), operationLocation));
}
function writeReturn(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2), expression]
- : [createInstruction(2)]), operationLocation));
+ : [createInstruction(2)])), operationLocation), 384));
}
function writeBreak(label, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeBreakWhenTrue(label, condition, operationLocation) {
- writeStatement(ts.createIf(condition, ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(condition, ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeBreakWhenFalse(label, condition, operationLocation) {
- writeStatement(ts.createIf(ts.createLogicalNot(condition), ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(ts.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384)), 1));
}
function writeYield(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(4), expression]
- : [createInstruction(4)]), operationLocation));
+ : [createInstruction(4)])), operationLocation), 384));
}
function writeYieldStar(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(5),
expression
- ]), operationLocation));
+ ])), operationLocation), 384));
}
function writeEndfinally() {
lastOperationWasAbrupt = true;
@@ -44627,23 +49393,47 @@ var ts;
name: "typescript:generator",
scoped: false,
priority: 6,
- text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;\n return { next: verb(0), \"throw\": verb(1), \"return\": verb(2) };\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
+ text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
};
- var _a;
})(ts || (ts = {}));
var ts;
(function (ts) {
function transformES5(context) {
+ var compilerOptions = context.getCompilerOptions();
+ var previousOnEmitNode;
+ var noSubstitution;
+ if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) {
+ previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ context.enableEmitNotification(250);
+ context.enableEmitNotification(251);
+ context.enableEmitNotification(249);
+ noSubstitution = [];
+ }
var previousOnSubstituteNode = context.onSubstituteNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177);
- context.enableSubstitution(257);
+ context.enableSubstitution(178);
+ context.enableSubstitution(260);
return transformSourceFile;
function transformSourceFile(node) {
return node;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onEmitNode(hint, node, emitCallback) {
+ switch (node.kind) {
+ case 250:
+ case 251:
+ case 249:
+ var tagName = node.tagName;
+ noSubstitution[ts.getOriginalNodeId(tagName)] = true;
+ break;
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ function onSubstituteNode(hint, node) {
+ if (node.id && noSubstitution && noSubstitution[node.id]) {
+ return previousOnSubstituteNode(hint, node);
+ }
+ node = previousOnSubstituteNode(hint, node);
if (ts.isPropertyAccessExpression(node)) {
return substitutePropertyAccessExpression(node);
}
@@ -44655,7 +49445,7 @@ var ts;
function substitutePropertyAccessExpression(node) {
var literalName = trySubstituteReservedName(node.name);
if (literalName) {
- return ts.createElementAccess(node.expression, literalName, node);
+ return ts.setTextRange(ts.createElementAccess(node.expression, literalName), node);
}
return node;
}
@@ -44669,7 +49459,7 @@ var ts;
function trySubstituteReservedName(name) {
var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
if (token >= 71 && token <= 106) {
- return ts.createLiteral(name, name);
+ return ts.setTextRange(ts.createLiteral(name), name);
}
return undefined;
}
@@ -44679,12 +49469,13 @@ var ts;
var ts;
(function (ts) {
function transformModule(context) {
- var transformModuleDelegates = ts.createMap((_a = {},
- _a[ts.ModuleKind.None] = transformCommonJSModule,
- _a[ts.ModuleKind.CommonJS] = transformCommonJSModule,
- _a[ts.ModuleKind.AMD] = transformAMDModule,
- _a[ts.ModuleKind.UMD] = transformUMDModule,
- _a));
+ function getTransformModuleDelegate(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.AMD: return transformAMDModule;
+ case ts.ModuleKind.UMD: return transformUMDModule;
+ default: return transformCommonJSModule;
+ }
+ }
var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
@@ -44696,40 +49487,49 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
+ context.enableSubstitution(193);
context.enableSubstitution(191);
- context.enableSubstitution(258);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
+ context.enableSubstitution(192);
+ context.enableSubstitution(261);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
var currentSourceFile;
var currentModuleInfo;
var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
return node;
}
currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(node)] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- var transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ts.ModuleKind.None];
+ currentModuleInfo = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
+ moduleInfoMap[ts.getOriginalNodeId(node)] = currentModuleInfo;
+ var transformModule = getTransformModuleDelegate(moduleKind);
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
return ts.aggregateTransformFlags(updated);
}
+ function shouldEmitUnderscoreUnderscoreESModule() {
+ if (!currentModuleInfo.exportEquals && ts.isExternalModule(currentSourceFile)) {
+ return true;
+ }
+ return false;
+ }
function transformCommonJSModule(node) {
startLexicalEnvironment();
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
+ }
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
addExportEqualsIfNeeded(statements, false);
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ ts.addRange(statements, endLexicalEnvironment());
+ var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
if (currentModuleInfo.hasExportStarsToExportValues) {
ts.addEmitHelper(updated, exportStarHelper);
}
@@ -44738,15 +49538,8 @@ var ts;
function transformAMDModule(node) {
var define = ts.createIdentifier("define");
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
- return transformAsynchronousModule(node, define, moduleName, true);
- }
- function transformUMDModule(node) {
- var define = ts.createRawExpression(umdHelper);
- return transformAsynchronousModule(node, define, undefined, false);
- }
- function transformAsynchronousModule(node, define, moduleName, includeNonAmdDependencies) {
- var _a = collectAsynchronousDependencies(node, includeNonAmdDependencies), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
- return ts.updateSourceFileNode(node, ts.createNodeArray([
+ var _a = collectAsynchronousDependencies(node, true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(define, undefined, (moduleName ? [moduleName] : []).concat([
ts.createArrayLiteral([
ts.createLiteral("require"),
@@ -44757,7 +49550,37 @@ var ts;
ts.createParameter(undefined, undefined, undefined, "exports")
].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
])))
- ], node.statements));
+ ]), node.statements));
+ }
+ function transformUMDModule(node) {
+ var _a = collectAsynchronousDependencies(node, false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ var umdHeader = ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, "factory")], undefined, ts.setTextRange(ts.createBlock([
+ ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("module"), "object"), ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), "object")), ts.createBlock([
+ ts.createVariableStatement(undefined, [
+ ts.createVariableDeclaration("v", undefined, ts.createCall(ts.createIdentifier("factory"), undefined, [
+ ts.createIdentifier("require"),
+ ts.createIdentifier("exports")
+ ]))
+ ]),
+ ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1)
+ ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([
+ ts.createStatement(ts.createCall(ts.createIdentifier("define"), undefined, [
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createIdentifier("factory")
+ ]))
+ ])))
+ ], true), undefined));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(umdHeader, undefined, [
+ ts.createFunctionExpression(undefined, undefined, undefined, undefined, [
+ ts.createParameter(undefined, undefined, undefined, "require"),
+ ts.createParameter(undefined, undefined, undefined, "exports")
+ ].concat(importAliasNames), undefined, transformAsynchronousModuleBody(node))
+ ]))
+ ]), node.statements));
}
function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
var aliasedModuleNames = [];
@@ -44777,13 +49600,15 @@ var ts;
var importNode = _c[_b];
var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
- if (includeNonAmdDependencies && importAliasName) {
- ts.setEmitFlags(importAliasName, 4);
- aliasedModuleNames.push(externalModuleName);
- importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
- }
- else {
- unaliasedModuleNames.push(externalModuleName);
+ if (externalModuleName) {
+ if (includeNonAmdDependencies && importAliasName) {
+ ts.setEmitFlags(importAliasName, 4);
+ aliasedModuleNames.push(externalModuleName);
+ importAliasNames.push(ts.createParameter(undefined, undefined, undefined, importAliasName));
+ }
+ else {
+ unaliasedModuleNames.push(externalModuleName);
+ }
}
}
return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
@@ -44791,12 +49616,15 @@ var ts;
function transformAsynchronousModuleBody(node) {
startLexicalEnvironment();
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true));
+ var statementOffset = ts.addPrologue(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
+ }
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
addExportEqualsIfNeeded(statements, true);
- var body = ts.createBlock(statements, undefined, true);
+ ts.addRange(statements, endLexicalEnvironment());
+ var body = ts.createBlock(statements, true);
if (currentModuleInfo.hasExportStarsToExportValues) {
ts.addEmitHelper(body, exportStarHelper);
}
@@ -44805,12 +49633,14 @@ var ts;
function addExportEqualsIfNeeded(statements, emitAsReturn) {
if (currentModuleInfo.exportEquals) {
if (emitAsReturn) {
- var statement = ts.createReturn(currentModuleInfo.exportEquals.expression, currentModuleInfo.exportEquals);
+ var statement = ts.createReturn(currentModuleInfo.exportEquals.expression);
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
ts.setEmitFlags(statement, 384 | 1536);
statements.push(statement);
}
else {
- var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression), currentModuleInfo.exportEquals);
+ var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression));
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
ts.setEmitFlags(statement, 1536);
statements.push(statement);
}
@@ -44818,23 +49648,23 @@ var ts;
}
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 241:
+ case 243:
return visitExportDeclaration(node);
- case 240:
+ case 242:
return visitExportAssignment(node);
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 295:
- return visitMergeDeclarationMarker(node);
case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
return visitEndOfDeclarationMarker(node);
default:
return node;
@@ -44845,7 +49675,7 @@ var ts;
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (moduleKind !== ts.ModuleKind.AMD) {
if (!node.importClause) {
- return ts.createStatement(createRequireCall(node), node);
+ return ts.setTextRange(ts.createStatement(createRequireCall(node)), node);
}
else {
var variables = [];
@@ -44858,13 +49688,13 @@ var ts;
variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)));
}
}
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, undefined, languageVersion >= 2 ? 2 : 0), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(variables, languageVersion >= 2 ? 2 : 0)), node));
}
}
else if (namespaceDeclaration && ts.isDefaultImport(node)) {
statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node), node)
- ], undefined, languageVersion >= 2 ? 2 : 0)));
+ ts.setTextRange(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name), undefined, ts.getGeneratedNameForNode(node)), node)
+ ], languageVersion >= 2 ? 2 : 0)));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -44888,17 +49718,17 @@ var ts;
var statements;
if (moduleKind !== ts.ModuleKind.AMD) {
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(node.name, createRequireCall(node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(node.name, createRequireCall(node))), node));
}
else {
- statements = ts.append(statements, ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getSynthesizedClone(node.name), undefined, createRequireCall(node))
- ], undefined, languageVersion >= 2 ? 2 : 0), node));
+ ], languageVersion >= 2 ? 2 : 0)), node));
}
}
else {
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node))), node));
}
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
@@ -44918,23 +49748,23 @@ var ts;
if (node.exportClause) {
var statements = [];
if (moduleKind !== ts.ModuleKind.AMD) {
- statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ statements.push(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(generatedName, undefined, createRequireCall(node))
- ]), node));
+ ])), node));
}
for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
var specifier = _a[_i];
var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
- statements.push(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue), specifier));
+ statements.push(ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier));
}
return ts.singleOrMany(statements);
}
else {
- return ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
+ return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
moduleKind !== ts.ModuleKind.AMD
? createRequireCall(node)
: generatedName
- ]), node);
+ ])), node);
}
}
function visitExportAssignment(node) {
@@ -44955,7 +49785,7 @@ var ts;
function visitFunctionDeclaration(node) {
var statements;
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body, node), node));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, node.parameters, undefined, node.body), node), node));
}
else {
statements = ts.append(statements, node);
@@ -44972,7 +49802,7 @@ var ts;
function visitClassDeclaration(node) {
var statements;
if (ts.hasModifier(node, 1)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members, node), node));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, node.heritageClauses, node.members), node), node));
}
else {
statements = ts.append(statements, node);
@@ -45008,7 +49838,7 @@ var ts;
statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
}
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
}
else {
@@ -45028,11 +49858,11 @@ var ts;
return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
}
else {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name, node.name), node.initializer);
+ return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name), node.name), node.initializer);
}
}
function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
}
@@ -45064,10 +49894,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237:
+ case 239:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238:
+ case 240:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -45125,7 +49955,7 @@ var ts;
}
function appendExportsOfDeclaration(statements, decl) {
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
var exportSpecifier = exportSpecifiers_1[_i];
@@ -45135,28 +49965,28 @@ var ts;
return statements;
}
function appendExportStatement(statements, exportName, expression, location, allowComments) {
- if (exportName.text === "default") {
- var sourceFile = ts.getOriginalNode(currentSourceFile, ts.isSourceFile);
- if (sourceFile && !sourceFile.symbol.exports["___esModule"]) {
- if (languageVersion === 0) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true))));
- }
- else {
- statements = ts.append(statements, ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
- ts.createIdentifier("exports"),
- ts.createLiteral("__esModule"),
- ts.createObjectLiteral([
- ts.createPropertyAssignment("value", ts.createLiteral(true))
- ])
- ])));
- }
- }
- }
statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
return statements;
}
+ function createUnderscoreUnderscoreESModule() {
+ var statement;
+ if (languageVersion === 0) {
+ statement = ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true)));
+ }
+ else {
+ statement = ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"), undefined, [
+ ts.createIdentifier("exports"),
+ ts.createLiteral("__esModule"),
+ ts.createObjectLiteral([
+ ts.createPropertyAssignment("value", ts.createLiteral(true))
+ ])
+ ]));
+ }
+ ts.setEmitFlags(statement, 524288);
+ return statement;
+ }
function createExportStatement(name, value, location, allowComments) {
- var statement = ts.createStatement(createExportExpression(name, value), location);
+ var statement = ts.setTextRange(ts.createStatement(createExportExpression(name, value)), location);
ts.startOnNewLine(statement);
if (!allowComments) {
ts.setEmitFlags(statement, 1536);
@@ -45164,7 +49994,7 @@ var ts;
return statement;
}
function createExportExpression(name, value, location) {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value, location);
+ return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location);
}
function modifierVisitor(node) {
switch (node.kind) {
@@ -45174,26 +50004,26 @@ var ts;
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
currentSourceFile = node;
currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
- noSubstitution = ts.createMap();
- previousOnEmitNode(emitContext, node, emitCallback);
+ noSubstitution = [];
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
currentModuleInfo = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (node.id && noSubstitution[node.id]) {
return node;
}
- if (emitContext === 1) {
+ if (hint === 1) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -45207,9 +50037,9 @@ var ts;
if (exportedOrImportedName !== name) {
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name, initializer, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name, exportedOrImportedName, node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedOrImportedName), node);
}
return node;
}
@@ -45217,10 +50047,10 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 192:
+ case 193:
return substituteBinaryExpression(node);
+ case 192:
case 191:
- case 190:
return substituteUnaryExpression(node);
}
return node;
@@ -45235,17 +50065,17 @@ var ts;
}
if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
- if (exportContainer && exportContainer.kind === 261) {
- return ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node), node);
+ if (exportContainer && exportContainer.kind === 264) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)), node);
}
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- var name_39 = importDeclaration.propertyName || importDeclaration.name;
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name_39), node);
+ var name = importDeclaration.propertyName || importDeclaration.name;
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name)), node);
}
}
}
@@ -45278,8 +50108,8 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1), node)
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 ? 58 : 59), ts.createLiteral(1)), node)
: node;
for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
var exportName = exportedNames_2[_i];
@@ -45301,7 +50131,6 @@ var ts;
}
}
}
- var _a;
}
ts.transformModule = transformModule;
var exportStarHelper = {
@@ -45309,7 +50138,6 @@ var ts;
scoped: true,
text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
};
- var umdHelper = "\n (function (dependencies, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(dependencies, factory);\n }\n })";
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -45323,14 +50151,14 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70);
- context.enableSubstitution(192);
- context.enableSubstitution(190);
+ context.enableSubstitution(193);
context.enableSubstitution(191);
- context.enableEmitNotification(261);
- var moduleInfoMap = ts.createMap();
- var deferredExports = ts.createMap();
- var exportFunctionsMap = ts.createMap();
- var noSubstitutionMap = ts.createMap();
+ context.enableSubstitution(192);
+ context.enableEmitNotification(264);
+ var moduleInfoMap = [];
+ var deferredExports = [];
+ var exportFunctionsMap = [];
+ var noSubstitutionMap = [];
var currentSourceFile;
var moduleInfo;
var exportFunction;
@@ -45349,7 +50177,8 @@ var ts;
currentSourceFile = node;
enclosingBlockScopedContainer = node;
moduleInfo = moduleInfoMap[id] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- exportFunction = exportFunctionsMap[id] = ts.createUniqueName("exports");
+ exportFunction = ts.createUniqueName("exports");
+ exportFunctionsMap[id] = exportFunction;
contextObject = ts.createUniqueName("context");
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
@@ -45359,11 +50188,11 @@ var ts;
], undefined, moduleBodyBlock);
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
var dependencies = ts.createArrayLiteral(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray([
+ var updated = ts.setEmitFlags(ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("System"), "register"), undefined, moduleName
? [moduleName, dependencies, moduleBodyFunction]
: [dependencies, moduleBodyFunction]))
- ], node.statements));
+ ]), node.statements)), 1024);
if (!(compilerOptions.outFile || compilerOptions.out)) {
ts.moveEmitHelpers(updated, moduleBodyBlock, function (helper) { return !helper.scoped; });
}
@@ -45385,17 +50214,19 @@ var ts;
for (var i = 0; i < externalImports.length; i++) {
var externalImport = externalImports[i];
var externalModuleName = ts.getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions);
- var text = externalModuleName.text;
- if (ts.hasProperty(groupIndices, text)) {
- var groupIndex = groupIndices[text];
- dependencyGroups[groupIndex].externalImports.push(externalImport);
- }
- else {
- groupIndices[text] = dependencyGroups.length;
- dependencyGroups.push({
- name: externalModuleName,
- externalImports: [externalImport]
- });
+ if (externalModuleName) {
+ var text = externalModuleName.text;
+ var groupIndex = groupIndices.get(text);
+ if (groupIndex !== undefined) {
+ dependencyGroups[groupIndex].externalImports.push(externalImport);
+ }
+ else {
+ groupIndices.set(text, dependencyGroups.length);
+ dependencyGroups.push({
+ name: externalModuleName,
+ externalImports: [externalImport]
+ });
+ }
}
}
return dependencyGroups;
@@ -45403,30 +50234,33 @@ var ts;
function createSystemModuleBody(node, dependencyGroups) {
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("__moduleName", undefined, ts.createLogicalAnd(contextObject, ts.createPropertyAccess(contextObject, "id")))
])));
- ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, true);
+ ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
var executeStatements = ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset);
ts.addRange(statements, hoistedStatements);
ts.addRange(statements, endLexicalEnvironment());
var exportStarFunction = addExportStarIfNeeded(statements);
- statements.push(ts.createReturn(ts.setMultiLine(ts.createObjectLiteral([
+ var moduleObject = ts.createObjectLiteral([
ts.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
- ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, undefined, true)))
- ]), true)));
- return ts.createBlock(statements, undefined, true);
+ ts.createPropertyAssignment("execute", ts.createFunctionExpression(undefined, undefined, undefined, undefined, [], undefined, ts.createBlock(executeStatements, true)))
+ ]);
+ moduleObject.multiLine = true;
+ statements.push(ts.createReturn(moduleObject));
+ return ts.createBlock(statements, true);
}
function addExportStarIfNeeded(statements) {
if (!moduleInfo.hasExportStarsToExportValues) {
return;
}
- if (!moduleInfo.exportedNames && ts.isEmpty(moduleInfo.exportSpecifiers)) {
+ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) {
var hasExportDeclarationWithExportClause = false;
for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
var externalImport = _a[_i];
- if (externalImport.kind === 241 && externalImport.exportClause) {
+ if (externalImport.kind === 243 && externalImport.exportClause) {
hasExportDeclarationWithExportClause = true;
break;
}
@@ -45444,12 +50278,12 @@ var ts;
if (exportedLocalName.text === "default") {
continue;
}
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createTrue()));
}
}
for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) {
var externalImport = _e[_d];
- if (externalImport.kind !== 241) {
+ if (externalImport.kind !== 243) {
continue;
}
var exportDecl = externalImport;
@@ -45458,12 +50292,12 @@ var ts;
}
for (var _f = 0, _g = exportDecl.exportClause.elements; _f < _g.length; _f++) {
var element = _g[_f];
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createTrue()));
}
}
var exportedNamesStorageRef = ts.createUniqueName("exportedNames");
statements.push(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, undefined, true))
+ ts.createVariableDeclaration(exportedNamesStorageRef, undefined, ts.createObjectLiteral(exportedNames, true))
])));
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
statements.push(exportStarFunction);
@@ -45488,7 +50322,7 @@ var ts;
ts.setEmitFlags(ts.createIf(condition, ts.createStatement(ts.createAssignment(ts.createElementAccess(exports, n), ts.createElementAccess(m, n)))), 1)
])),
ts.createStatement(ts.createCall(exportFunction, undefined, [exports]))
- ], undefined, true));
+ ], true));
}
function createSettersArray(exportStarFunction, dependencyGroups) {
var setters = [];
@@ -45501,15 +50335,15 @@ var ts;
var entry = _b[_a];
var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile);
switch (entry.kind) {
- case 235:
+ case 237:
if (!entry.importClause) {
break;
}
- case 234:
+ case 236:
ts.Debug.assert(importVariableName !== undefined);
statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName)));
break;
- case 241:
+ case 243:
ts.Debug.assert(importVariableName !== undefined);
if (entry.exportClause) {
var properties = [];
@@ -45517,7 +50351,7 @@ var ts;
var e = _d[_c];
properties.push(ts.createPropertyAssignment(ts.createLiteral(e.name.text), ts.createElementAccess(parameterName, ts.createLiteral((e.propertyName || e.name).text))));
}
- statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, undefined, true)])));
+ statements.push(ts.createStatement(ts.createCall(exportFunction, undefined, [ts.createObjectLiteral(properties, true)])));
}
else {
statements.push(ts.createStatement(ts.createCall(exportStarFunction, undefined, [parameterName])));
@@ -45525,19 +50359,19 @@ var ts;
break;
}
}
- setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, undefined, true)));
+ setters.push(ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, parameterName)], undefined, ts.createBlock(statements, true)));
}
- return ts.createArrayLiteral(setters, undefined, true);
+ return ts.createArrayLiteral(setters, true);
}
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235:
+ case 237:
return visitImportDeclaration(node);
- case 234:
+ case 236:
return visitImportEqualsDeclaration(node);
- case 241:
+ case 243:
return undefined;
- case 240:
+ case 242:
return visitExportAssignment(node);
default:
return nestedElementVisitor(node);
@@ -45586,7 +50420,7 @@ var ts;
}
function visitFunctionDeclaration(node) {
if (ts.hasModifier(node, 1)) {
- hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
+ hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
}
else {
hoistedStatements = ts.append(hoistedStatements, node);
@@ -45604,7 +50438,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- statements = ts.append(statements, ts.createStatement(ts.createAssignment(name, ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement), node)), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -45632,7 +50466,7 @@ var ts;
}
var statements;
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
if (isMarkedDeclaration) {
var id = ts.getOriginalNodeId(node);
@@ -45658,7 +50492,7 @@ var ts;
}
function shouldHoistVariableDeclarationList(node) {
return (ts.getEmitFlags(node) & 1048576) === 0
- && (enclosingBlockScopedContainer.kind === 261
+ && (enclosingBlockScopedContainer.kind === 264
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
@@ -45676,11 +50510,11 @@ var ts;
function createVariableAssignment(name, value, location, isExportedDeclaration) {
hoistVariableDeclaration(ts.getSynthesizedClone(name));
return isExportedDeclaration
- ? createExportExpression(name, preventSubstitution(ts.createAssignment(name, value, location)))
- : preventSubstitution(ts.createAssignment(name, value, location));
+ ? createExportExpression(name, preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)))
+ : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location));
}
function visitMergeDeclarationMarker(node) {
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207) {
var id = ts.getOriginalNodeId(node);
var isExportedDeclaration = ts.hasModifier(node.original, 1);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -45713,10 +50547,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237:
+ case 239:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238:
+ case 240:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -45786,7 +50620,7 @@ var ts;
return statements;
}
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = moduleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = moduleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
var exportSpecifier = exportSpecifiers_2[_i];
@@ -45815,43 +50649,43 @@ var ts;
}
function nestedElementVisitor(node) {
switch (node.kind) {
- case 205:
+ case 207:
return visitVariableStatement(node);
- case 225:
+ case 227:
return visitFunctionDeclaration(node);
- case 226:
+ case 228:
return visitClassDeclaration(node);
- case 211:
+ case 213:
return visitForStatement(node);
- case 212:
+ case 214:
return visitForInStatement(node);
- case 213:
+ case 215:
return visitForOfStatement(node);
- case 209:
+ case 211:
return visitDoStatement(node);
- case 210:
+ case 212:
return visitWhileStatement(node);
- case 219:
+ case 221:
return visitLabeledStatement(node);
- case 217:
+ case 219:
return visitWithStatement(node);
- case 218:
+ case 220:
return visitSwitchStatement(node);
- case 232:
+ case 234:
return visitCaseBlock(node);
- case 253:
+ case 256:
return visitCaseClause(node);
- case 254:
+ case 257:
return visitDefaultClause(node);
- case 221:
+ case 223:
return visitTryStatement(node);
- case 256:
+ case 259:
return visitCatchClause(node);
- case 204:
+ case 206:
return visitBlock(node);
- case 295:
- return visitMergeDeclarationMarker(node);
case 296:
+ return visitMergeDeclarationMarker(node);
+ case 297:
return visitEndOfDeclarationMarker(node);
default:
return destructuringVisitor(node);
@@ -45860,21 +50694,21 @@ var ts;
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression, true), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForInStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForOf(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -45883,6 +50717,9 @@ var ts;
&& shouldHoistVariableDeclarationList(node);
}
function visitForInitializer(node) {
+ if (!node) {
+ return node;
+ }
if (shouldHoistForInitializer(node)) {
var expressions = void 0;
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
@@ -45896,16 +50733,16 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
+ return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitLabeledStatement(node) {
- return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, false, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
function visitSwitchStatement(node) {
return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
@@ -45942,7 +50779,7 @@ var ts;
}
function destructuringVisitor(node) {
if (node.transformFlags & 1024
- && node.kind === 192) {
+ && node.kind === 193) {
return visitDestructuringAssignment(node);
}
else if (node.transformFlags & 2048) {
@@ -45959,7 +50796,7 @@ var ts;
return ts.visitEachChild(node, destructuringVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
- if (ts.isAssignmentExpression(node)) {
+ if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
else if (ts.isSpreadExpression(node)) {
@@ -45979,7 +50816,7 @@ var ts;
}
else if (ts.isIdentifier(node)) {
var container = resolver.getReferencedExportContainer(node);
- return container !== undefined && container.kind === 261;
+ return container !== undefined && container.kind === 264;
}
else {
return false;
@@ -45993,8 +50830,8 @@ var ts;
}
return node;
}
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264) {
var id = ts.getOriginalNodeId(node);
currentSourceFile = node;
moduleInfo = moduleInfoMap[id];
@@ -46003,22 +50840,22 @@ var ts;
if (noSubstitution) {
delete noSubstitutionMap[id];
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
moduleInfo = undefined;
exportFunction = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (isSubstitutionPrevented(node)) {
return node;
}
- if (emitContext === 1) {
+ if (hint === 1) {
return substituteExpression(node);
}
return node;
@@ -46027,10 +50864,10 @@ var ts;
switch (node.kind) {
case 70:
return substituteExpressionIdentifier(node);
- case 192:
+ case 193:
return substituteBinaryExpression(node);
- case 190:
case 191:
+ case 192:
return substituteUnaryExpression(node);
}
return node;
@@ -46047,10 +50884,10 @@ var ts;
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")), node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name), node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name)), node);
}
}
}
@@ -46082,14 +50919,14 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191
- ? ts.createPrefix(node.operator, node.operand, node)
+ var expression = node.kind === 192
+ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node)
: node;
for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
var exportName = exportedNames_4[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
- if (node.kind === 191) {
+ if (node.kind === 192) {
expression = node.operator === 42
? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1))
: ts.createAdd(preventSubstitution(expression), ts.createLiteral(1));
@@ -46106,7 +50943,7 @@ var ts;
|| resolver.getReferencedValueDeclaration(name);
if (valueDeclaration) {
var exportContainer = resolver.getReferencedExportContainer(name, false);
- if (exportContainer && exportContainer.kind === 261) {
+ if (exportContainer && exportContainer.kind === 264) {
exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration));
}
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -46116,7 +50953,7 @@ var ts;
}
function preventSubstitution(node) {
if (noSubstitution === undefined)
- noSubstitution = ts.createMap();
+ noSubstitution = [];
noSubstitution[ts.getNodeId(node)] = true;
return node;
}
@@ -46134,7 +50971,7 @@ var ts;
var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableEmitNotification(261);
+ context.enableEmitNotification(264);
context.enableSubstitution(70);
var currentSourceFile;
return transformSourceFile;
@@ -46146,10 +50983,10 @@ var ts;
var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
if (externalHelpersModuleName) {
var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements);
+ var statementOffset = ts.addPrologue(statements, node.statements);
ts.append(statements, ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -46159,9 +50996,9 @@ var ts;
}
function visitor(node) {
switch (node.kind) {
- case 234:
+ case 236:
return undefined;
- case 240:
+ case 242:
return visitExportAssignment(node);
}
return node;
@@ -46169,19 +51006,19 @@ var ts;
function visitExportAssignment(node) {
return node.isExportEquals ? undefined : node;
}
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
if (ts.isSourceFile(node)) {
currentSourceFile = node;
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isIdentifier(node) && emitContext === 1) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isIdentifier(node) && hint === 1) {
return substituteExpressionIdentifier(node);
}
return node;
@@ -46200,19 +51037,34 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var moduleTransformerMap = ts.createMap((_a = {},
- _a[ts.ModuleKind.ES2015] = ts.transformES2015Module,
- _a[ts.ModuleKind.System] = ts.transformSystemModule,
- _a[ts.ModuleKind.AMD] = ts.transformModule,
- _a[ts.ModuleKind.CommonJS] = ts.transformModule,
- _a[ts.ModuleKind.UMD] = ts.transformModule,
- _a[ts.ModuleKind.None] = ts.transformModule,
- _a));
- function getTransformers(compilerOptions) {
+ function getModuleTransformer(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.ES2015:
+ return ts.transformES2015Module;
+ case ts.ModuleKind.System:
+ return ts.transformSystemModule;
+ default:
+ return ts.transformModule;
+ }
+ }
+ var TransformationState;
+ (function (TransformationState) {
+ TransformationState[TransformationState["Uninitialized"] = 0] = "Uninitialized";
+ TransformationState[TransformationState["Initialized"] = 1] = "Initialized";
+ TransformationState[TransformationState["Completed"] = 2] = "Completed";
+ TransformationState[TransformationState["Disposed"] = 3] = "Disposed";
+ })(TransformationState || (TransformationState = {}));
+ var SyntaxKindFeatureFlags;
+ (function (SyntaxKindFeatureFlags) {
+ SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["Substitution"] = 1] = "Substitution";
+ SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["EmitNotifications"] = 2] = "EmitNotifications";
+ })(SyntaxKindFeatureFlags || (SyntaxKindFeatureFlags = {}));
+ function getTransformers(compilerOptions, customTransformers) {
var jsx = compilerOptions.jsx;
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var transformers = [];
+ ts.addRange(transformers, customTransformers && customTransformers.before);
transformers.push(ts.transformTypeScript);
if (jsx === 2) {
transformers.push(ts.transformJsx);
@@ -46230,16 +51082,16 @@ var ts;
transformers.push(ts.transformES2015);
transformers.push(ts.transformGenerators);
}
- transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ts.ModuleKind.None]);
+ transformers.push(getModuleTransformer(moduleKind));
if (languageVersion < 1) {
transformers.push(ts.transformES5);
}
+ ts.addRange(transformers, customTransformers && customTransformers.after);
return transformers;
}
ts.getTransformers = getTransformers;
- function transformFiles(resolver, host, sourceFiles, transformers) {
+ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
var enabledSyntaxKindFeatures = new Array(298);
- var lexicalEnvironmentDisabled = false;
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -46247,8 +51099,11 @@ var ts;
var lexicalEnvironmentStackOffset = 0;
var lexicalEnvironmentSuspended = false;
var emitHelpers;
+ var onSubstituteNode = function (_, node) { return node; };
+ var onEmitNode = function (hint, node, callback) { return callback(hint, node); };
+ var state = 0;
var context = {
- getCompilerOptions: function () { return host.getCompilerOptions(); },
+ getCompilerOptions: function () { return options; },
getEmitResolver: function () { return resolver; },
getEmitHost: function () { return host; },
startLexicalEnvironment: startLexicalEnvironment,
@@ -46259,65 +51114,77 @@ var ts;
hoistFunctionDeclaration: hoistFunctionDeclaration,
requestEmitHelper: requestEmitHelper,
readEmitHelpers: readEmitHelpers,
- onSubstituteNode: function (_emitContext, node) { return node; },
enableSubstitution: enableSubstitution,
- isSubstitutionEnabled: isSubstitutionEnabled,
- onEmitNode: function (node, emitContext, emitCallback) { return emitCallback(node, emitContext); },
enableEmitNotification: enableEmitNotification,
- isEmitNotificationEnabled: isEmitNotificationEnabled
+ isSubstitutionEnabled: isSubstitutionEnabled,
+ isEmitNotificationEnabled: isEmitNotificationEnabled,
+ get onSubstituteNode() { return onSubstituteNode; },
+ set onSubstituteNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onSubstituteNode = value;
+ },
+ get onEmitNode() { return onEmitNode; },
+ set onEmitNode(value) {
+ ts.Debug.assert(state < 1, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onEmitNode = value;
+ }
};
+ for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
+ var node = nodes_4[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ ts.performance.mark("beforeTransform");
var transformation = ts.chain.apply(void 0, transformers)(context);
- var transformed = ts.map(sourceFiles, transformSourceFile);
- lexicalEnvironmentDisabled = true;
+ state = 1;
+ var transformed = ts.map(nodes, allowDtsFiles ? transformation : transformRoot);
+ state = 2;
+ ts.performance.mark("afterTransform");
+ ts.performance.measure("transformTime", "beforeTransform", "afterTransform");
return {
transformed: transformed,
- emitNodeWithSubstitution: emitNodeWithSubstitution,
- emitNodeWithNotification: emitNodeWithNotification
+ substituteNode: substituteNode,
+ emitNodeWithNotification: emitNodeWithNotification,
+ dispose: dispose
};
- function transformSourceFile(sourceFile) {
- if (ts.isDeclarationFile(sourceFile)) {
- return sourceFile;
- }
- return transformation(sourceFile);
+ function transformRoot(node) {
+ return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
}
function enableSubstitution(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 1;
}
function isSubstitutionEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 1) !== 0
&& (ts.getEmitFlags(node) & 4) === 0;
}
- function emitNodeWithSubstitution(emitContext, node, emitCallback) {
- if (node) {
- if (isSubstitutionEnabled(node)) {
- var substitute = context.onSubstituteNode(emitContext, node);
- if (substitute && substitute !== node) {
- emitCallback(emitContext, substitute);
- return;
- }
- }
- emitCallback(emitContext, node);
- }
+ function substituteNode(hint, node) {
+ ts.Debug.assert(state < 3, "Cannot substitute a node after the result is disposed.");
+ return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
}
function enableEmitNotification(kind) {
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 2;
}
function isEmitNotificationEnabled(node) {
return (enabledSyntaxKindFeatures[node.kind] & 2) !== 0
|| (ts.getEmitFlags(node) & 2) !== 0;
}
- function emitNodeWithNotification(emitContext, node, emitCallback) {
+ function emitNodeWithNotification(hint, node, emitCallback) {
+ ts.Debug.assert(state < 3, "Cannot invoke TransformationResult callbacks after the result is disposed.");
if (node) {
if (isEmitNotificationEnabled(node)) {
- context.onEmitNode(emitContext, node, emitCallback);
+ onEmitNode(hint, node, emitCallback);
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
}
}
function hoistVariableDeclaration(name) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
var decl = ts.createVariableDeclaration(name);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
@@ -46327,7 +51194,8 @@ var ts;
}
}
function hoistFunctionDeclaration(func) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -46336,7 +51204,8 @@ var ts;
}
}
function startLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot start a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations;
lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations;
@@ -46345,17 +51214,20 @@ var ts;
lexicalEnvironmentFunctionDeclarations = undefined;
}
function suspendLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot suspend a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended.");
lexicalEnvironmentSuspended = true;
}
function resumeLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot resume a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended.");
lexicalEnvironmentSuspended = false;
}
function endLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot end a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
var statements;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
@@ -46382,33 +51254,52 @@ var ts;
return statements;
}
function requestEmitHelper(helper) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper.");
emitHelpers = ts.append(emitHelpers, helper);
}
function readEmitHelpers() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
var helpers = emitHelpers;
emitHelpers = undefined;
return helpers;
}
+ function dispose() {
+ if (state < 3) {
+ for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
+ var node = nodes_5[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ lexicalEnvironmentVariableDeclarations = undefined;
+ lexicalEnvironmentVariableDeclarationsStack = undefined;
+ lexicalEnvironmentFunctionDeclarations = undefined;
+ lexicalEnvironmentFunctionDeclarationsStack = undefined;
+ onSubstituteNode = undefined;
+ onEmitNode = undefined;
+ emitHelpers = undefined;
+ state = 3;
+ }
+ }
}
- ts.transformFiles = transformFiles;
- var _a;
+ ts.transformNodes = transformNodes;
})(ts || (ts = {}));
var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
- ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
+ ts.forEachEmittedFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
- function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
+ function getDeclarationDiagnosticsFromFile(_a, sourceFileOrBundle) {
var declarationFilePath = _a.declarationFilePath;
- emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit, false);
+ emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sourceFileOrBundle, false);
}
}
ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
- function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles) {
+ function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
@@ -46470,7 +51361,7 @@ var ts;
var oldWriter = writer;
ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
- ts.Debug.assert(aliasEmitInfo.node.kind === 235);
+ ts.Debug.assert(aliasEmitInfo.node.kind === 237);
createAndSetNewTextWriterWithSymbolWriter();
ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit));
for (var i = 0; i < aliasEmitInfo.indent; i++) {
@@ -46493,9 +51384,9 @@ var ts;
}
});
if (usedTypeDirectiveReferences) {
- for (var directive in usedTypeDirectiveReferences) {
+ ts.forEachKey(usedTypeDirectiveReferences, function (directive) {
referencesOutput += "/// <reference types=\"" + directive + "\" />" + newLine;
- }
+ });
}
return {
reportedDeclarationError: reportedDeclarationError,
@@ -46520,12 +51411,14 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
+ writer.reportIllegalExtends = reportIllegalExtends;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
writer.writeSpace = writer.write;
writer.writeStringLiteral = writer.writeLiteral;
writer.writeParameter = writer.write;
+ writer.writeProperty = writer.write;
writer.writeSymbol = writer.write;
setWriter(writer);
}
@@ -46541,10 +51434,10 @@ var ts;
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
- if (declaration.kind === 223) {
+ if (declaration.kind === 225) {
nodeToCheck = declaration.parent.parent;
}
- else if (declaration.kind === 238 || declaration.kind === 239 || declaration.kind === 236) {
+ else if (declaration.kind === 240 || declaration.kind === 241 || declaration.kind === 238) {
ts.Debug.fail("We should be getting ImportDeclaration instead to write");
}
else {
@@ -46555,7 +51448,7 @@ var ts;
moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; });
}
if (moduleElementEmitInfo) {
- if (moduleElementEmitInfo.node.kind === 235) {
+ if (moduleElementEmitInfo.node.kind === 237) {
moduleElementEmitInfo.isVisible = true;
}
else {
@@ -46563,12 +51456,12 @@ var ts;
for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
increaseIndent();
}
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
asynchronousSubModuleDeclarationEmitInfo = [];
}
writeModuleElement(nodeToCheck);
- if (nodeToCheck.kind === 230) {
+ if (nodeToCheck.kind === 232) {
moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
asynchronousSubModuleDeclarationEmitInfo = undefined;
}
@@ -46587,8 +51480,8 @@ var ts;
}
for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) {
var directive = typeReferenceDirectives_1[_i];
- if (!(directive in usedTypeDirectiveReferences)) {
- usedTypeDirectiveReferences[directive] = directive;
+ if (!usedTypeDirectiveReferences.has(directive)) {
+ usedTypeDirectiveReferences.set(directive, directive);
}
}
}
@@ -46615,6 +51508,12 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
+ function reportIllegalExtends() {
+ if (errorNameNode) {
+ reportedDeclarationError = true;
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, ts.declarationNameToString(errorNameNode)));
+ }
+ }
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
@@ -46624,12 +51523,16 @@ var ts;
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
- if (type) {
+ var shouldUseResolverType = declaration.kind === 145 &&
+ resolver.isRequiredInitializedParameter(declaration);
+ if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 | 1024, writer);
+ var format = 2 | 1024 |
+ (shouldUseResolverType ? 4096 : 0);
+ resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
}
@@ -46646,15 +51549,15 @@ var ts;
}
}
function emitLines(nodes) {
- for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
- var node = nodes_4[_i];
+ for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) {
+ var node = nodes_6[_i];
emit(node);
}
}
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
- for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
- var node = nodes_5[_i];
+ for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
+ var node = nodes_7[_i];
if (!canEmitFn || canEmitFn(node)) {
if (currentWriterPos !== writer.getTextPos()) {
write(separator);
@@ -46681,49 +51584,50 @@ var ts;
function emitType(type) {
switch (type.kind) {
case 118:
- case 134:
+ case 135:
case 132:
case 121:
- case 135:
+ case 133:
+ case 136:
case 104:
- case 137:
+ case 138:
case 94:
case 129:
- case 167:
- case 171:
+ case 168:
+ case 172:
return writeTextOfNode(currentText, type);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(type);
- case 157:
+ case 158:
return emitTypeReference(type);
- case 160:
+ case 161:
return emitTypeQuery(type);
- case 162:
- return emitArrayType(type);
case 163:
- return emitTupleType(type);
+ return emitArrayType(type);
case 164:
- return emitUnionType(type);
+ return emitTupleType(type);
case 165:
- return emitIntersectionType(type);
+ return emitUnionType(type);
case 166:
+ return emitIntersectionType(type);
+ case 167:
return emitParenType(type);
- case 168:
- return emitTypeOperator(type);
case 169:
- return emitIndexedAccessType(type);
+ return emitTypeOperator(type);
case 170:
+ return emitIndexedAccessType(type);
+ case 171:
return emitMappedType(type);
- case 158:
case 159:
+ case 160:
return emitSignatureDeclarationWithJsDocComments(type);
- case 161:
+ case 162:
return emitTypeLiteral(type);
case 70:
return emitEntityName(type);
- case 141:
+ case 142:
return emitEntityName(type);
- case 156:
+ case 157:
return emitTypePredicate(type);
}
function writeEntityName(entityName) {
@@ -46731,22 +51635,22 @@ var ts;
writeTextOfNode(currentText, entityName);
}
else {
- var left = entityName.kind === 141 ? entityName.left : entityName.expression;
- var right = entityName.kind === 141 ? entityName.right : entityName.name;
+ var left = entityName.kind === 142 ? entityName.left : entityName.expression;
+ var right = entityName.kind === 142 ? entityName.right : entityName.name;
writeEntityName(left);
write(".");
writeTextOfNode(currentText, right);
}
}
function emitEntityName(entityName) {
- var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 234 ? entityName.parent : enclosingDeclaration);
+ var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 236 ? entityName.parent : enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeEntityName(entityName);
}
function emitExpressionWithTypeArguments(node) {
if (ts.isEntityNameExpression(node.expression)) {
- ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 177);
+ ts.Debug.assert(node.expression.kind === 70 || node.expression.kind === 178);
emitEntityName(node.expression);
if (node.typeArguments) {
write("<");
@@ -46850,15 +51754,15 @@ var ts;
}
function getExportDefaultTempVariableName() {
var baseName = "_default";
- if (!(baseName in currentIdentifiers)) {
+ if (!currentIdentifiers.has(baseName)) {
return baseName;
}
var count = 0;
while (true) {
count++;
- var name_40 = baseName + "_" + count;
- if (!(name_40 in currentIdentifiers)) {
- return name_40;
+ var name = baseName + "_" + count;
+ if (!currentIdentifiers.has(name)) {
+ return name;
}
}
}
@@ -46902,10 +51806,10 @@ var ts;
if (isModuleElementVisible) {
writeModuleElement(node);
}
- else if (node.kind === 234 ||
- (node.parent.kind === 261 && isCurrentFileExternalModule)) {
+ else if (node.kind === 236 ||
+ (node.parent.kind === 264 && isCurrentFileExternalModule)) {
var isVisible = void 0;
- if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 261) {
+ if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264) {
asynchronousSubModuleDeclarationEmitInfo.push({
node: node,
outputPos: writer.getTextPos(),
@@ -46914,7 +51818,7 @@ var ts;
});
}
else {
- if (node.kind === 235) {
+ if (node.kind === 237) {
var importDeclaration = node;
if (importDeclaration.importClause) {
isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
@@ -46932,30 +51836,30 @@ var ts;
}
function writeModuleElement(node) {
switch (node.kind) {
- case 225:
+ case 227:
return writeFunctionDeclaration(node);
- case 205:
+ case 207:
return writeVariableStatement(node);
- case 227:
+ case 229:
return writeInterfaceDeclaration(node);
- case 226:
- return writeClassDeclaration(node);
case 228:
+ return writeClassDeclaration(node);
+ case 230:
return writeTypeAliasDeclaration(node);
- case 229:
+ case 231:
return writeEnumDeclaration(node);
- case 230:
+ case 232:
return writeModuleDeclaration(node);
- case 234:
+ case 236:
return writeImportEqualsDeclaration(node);
- case 235:
+ case 237:
return writeImportDeclaration(node);
default:
ts.Debug.fail("Unknown symbol kind");
}
}
function emitModuleElementDeclarationFlags(node) {
- if (node.parent.kind === 261) {
+ if (node.parent.kind === 264) {
var modifiers = ts.getModifierFlags(node);
if (modifiers & 1) {
write("export ");
@@ -46963,7 +51867,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 227 && !noDeclare) {
+ else if (node.kind !== 229 && !noDeclare) {
write("declare ");
}
}
@@ -47013,7 +51917,7 @@ var ts;
}
function isVisibleNamedBinding(namedBindings) {
if (namedBindings) {
- if (namedBindings.kind === 237) {
+ if (namedBindings.kind === 239) {
return resolver.isDeclarationVisible(namedBindings);
}
else {
@@ -47036,7 +51940,7 @@ var ts;
if (currentWriterPos !== writer.getTextPos()) {
write(", ");
}
- if (node.importClause.namedBindings.kind === 237) {
+ if (node.importClause.namedBindings.kind === 239) {
write("* as ");
writeTextOfNode(currentText, node.importClause.namedBindings.name);
}
@@ -47053,13 +51957,13 @@ var ts;
writer.writeLine();
}
function emitExternalModuleSpecifier(parent) {
- resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 230;
+ resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232;
var moduleSpecifier;
- if (parent.kind === 234) {
+ if (parent.kind === 236) {
var node = parent;
moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node);
}
- else if (parent.kind === 230) {
+ else if (parent.kind === 232) {
moduleSpecifier = parent.name;
}
else {
@@ -47127,7 +52031,7 @@ var ts;
writeTextOfNode(currentText, node.name);
}
}
- while (node.body && node.body.kind !== 231) {
+ while (node.body && node.body.kind !== 233) {
node = node.body;
write(".");
writeTextOfNode(currentText, node.name);
@@ -47197,7 +52101,7 @@ var ts;
writeLine();
}
function isPrivateMethodTypeParameter(node) {
- return node.parent.kind === 149 && ts.hasModifier(node.parent, 8);
+ return node.parent.kind === 150 && ts.hasModifier(node.parent, 8);
}
function emitTypeParameters(typeParameters) {
function emitTypeParameter(node) {
@@ -47207,52 +52111,69 @@ var ts;
writeTextOfNode(currentText, node.name);
if (node.constraint && !isPrivateMethodTypeParameter(node)) {
write(" extends ");
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- (node.parent.parent && node.parent.parent.kind === 161)) {
- ts.Debug.assert(node.parent.kind === 149 ||
- node.parent.kind === 148 ||
- node.parent.kind === 158 ||
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
node.parent.kind === 159 ||
- node.parent.kind === 153 ||
- node.parent.kind === 154);
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
emitType(node.constraint);
}
else {
emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
}
}
+ if (node.default && !isPrivateMethodTypeParameter(node)) {
+ write(" = ");
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ (node.parent.parent && node.parent.parent.kind === 162)) {
+ ts.Debug.assert(node.parent.kind === 150 ||
+ node.parent.kind === 149 ||
+ node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.kind === 154 ||
+ node.parent.kind === 155);
+ emitType(node.default);
+ }
+ else {
+ emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError);
+ }
+ }
function getTypeParameterConstraintVisibilityError() {
var diagnosticMessage;
switch (node.parent.kind) {
- case 226:
+ case 228:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
break;
- case 227:
+ case 229:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
- case 154:
+ case 155:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 153:
+ case 154:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
}
else {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
break;
- case 225:
+ case 227:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
- case 228:
+ case 230:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;
default:
@@ -47271,7 +52192,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(typeReferences, isImplementsList) {
+ function emitHeritageClause(className, typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -47285,17 +52206,19 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
+ errorNameNode = className;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
+ errorNameNode = undefined;
}
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
- if (node.parent.parent.kind === 226) {
+ if (node.parent.parent.kind === 228) {
diagnosticMessage = isImplementsList ?
ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
- ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
+ ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
}
else {
- diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
+ diagnosticMessage = ts.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
}
return {
diagnosticMessage: diagnosticMessage,
@@ -47327,9 +52250,10 @@ var ts;
emitTypeParameters(node.typeParameters);
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- emitHeritageClause([baseTypeNode], false);
+ node.name;
+ emitHeritageClause(node.name, [baseTypeNode], false);
}
- emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -47350,7 +52274,7 @@ var ts;
emitTypeParameters(node.typeParameters);
var interfaceExtendsTypes = ts.filter(ts.getInterfaceBaseTypeNodes(node), function (base) { return ts.isEntityNameExpression(base.expression); });
if (interfaceExtendsTypes && interfaceExtendsTypes.length) {
- emitHeritageClause(interfaceExtendsTypes, false);
+ emitHeritageClause(node.name, interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -47372,17 +52296,17 @@ var ts;
writeLine();
}
function emitVariableDeclaration(node) {
- if (node.kind !== 223 || resolver.isDeclarationVisible(node)) {
+ if (node.kind !== 225 || resolver.isDeclarationVisible(node)) {
if (ts.isBindingPattern(node.name)) {
emitBindingPattern(node.name);
}
else {
writeTextOfNode(currentText, node.name);
- if ((node.kind === 147 || node.kind === 146 ||
- (node.kind === 144 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
+ if ((node.kind === 148 || node.kind === 147 ||
+ (node.kind === 145 && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
write("?");
}
- if ((node.kind === 147 || node.kind === 146) && node.parent.kind === 161) {
+ if ((node.kind === 148 || node.kind === 147) && node.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (resolver.isLiteralConstDeclaration(node)) {
@@ -47395,14 +52319,14 @@ var ts;
}
}
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
- if (node.kind === 223) {
+ if (node.kind === 225) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
}
- else if (node.kind === 147 || node.kind === 146) {
+ else if (node.kind === 148 || node.kind === 147) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47410,7 +52334,7 @@ var ts;
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47436,7 +52360,7 @@ var ts;
var elements = [];
for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
var element = _a[_i];
- if (element.kind !== 198) {
+ if (element.kind !== 199) {
elements.push(element);
}
}
@@ -47502,7 +52426,7 @@ var ts;
accessorWithTypeAnnotation = node;
var type = getTypeAnnotationFromAccessor(node);
if (!type) {
- var anotherAccessor = node.kind === 151 ? accessors.setAccessor : accessors.getAccessor;
+ var anotherAccessor = node.kind === 152 ? accessors.setAccessor : accessors.getAccessor;
type = getTypeAnnotationFromAccessor(anotherAccessor);
if (type) {
accessorWithTypeAnnotation = anotherAccessor;
@@ -47515,7 +52439,7 @@ var ts;
}
function getTypeAnnotationFromAccessor(accessor) {
if (accessor) {
- return accessor.kind === 151
+ return accessor.kind === 152
? accessor.type
: accessor.parameters.length > 0
? accessor.parameters[0].type
@@ -47524,7 +52448,7 @@ var ts;
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
- if (accessorWithTypeAnnotation.kind === 152) {
+ if (accessorWithTypeAnnotation.kind === 153) {
if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
@@ -47570,17 +52494,17 @@ var ts;
}
if (!resolver.isImplementationOfOverload(node)) {
emitJsDocComments(node);
- if (node.kind === 225) {
+ if (node.kind === 227) {
emitModuleElementDeclarationFlags(node);
}
- else if (node.kind === 149 || node.kind === 150) {
+ else if (node.kind === 150 || node.kind === 151) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
}
- if (node.kind === 225) {
+ if (node.kind === 227) {
write("function ");
writeTextOfNode(currentText, node.name);
}
- else if (node.kind === 150) {
+ else if (node.kind === 151) {
write("constructor");
}
else {
@@ -47600,15 +52524,15 @@ var ts;
var prevEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = node;
var closeParenthesizedFunctionType = false;
- if (node.kind === 155) {
+ if (node.kind === 156) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
write("[");
}
else {
- if (node.kind === 154 || node.kind === 159) {
+ if (node.kind === 155 || node.kind === 160) {
write("new ");
}
- else if (node.kind === 158) {
+ else if (node.kind === 159) {
var currentOutput = writer.getText();
if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") {
closeParenthesizedFunctionType = true;
@@ -47619,20 +52543,20 @@ var ts;
write("(");
}
emitCommaList(node.parameters, emitParameterDeclaration);
- if (node.kind === 155) {
+ if (node.kind === 156) {
write("]");
}
else {
write(")");
}
- var isFunctionTypeOrConstructorType = node.kind === 158 || node.kind === 159;
- if (isFunctionTypeOrConstructorType || node.parent.kind === 161) {
+ var isFunctionTypeOrConstructorType = node.kind === 159 || node.kind === 160;
+ if (isFunctionTypeOrConstructorType || node.parent.kind === 162) {
if (node.type) {
write(isFunctionTypeOrConstructorType ? " => " : ": ");
emitType(node.type);
}
}
- else if (node.kind !== 150 && !ts.hasModifier(node, 8)) {
+ else if (node.kind !== 151 && !ts.hasModifier(node, 8)) {
writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
}
enclosingDeclaration = prevEnclosingDeclaration;
@@ -47646,23 +52570,23 @@ var ts;
function getReturnTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
switch (node.kind) {
- case 154:
+ case 155:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 153:
+ case 154:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 155:
+ case 156:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node, 32)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47670,7 +52594,7 @@ var ts;
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
}
- else if (node.parent.kind === 226) {
+ else if (node.parent.kind === 228) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -47683,7 +52607,7 @@ var ts;
ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
}
break;
- case 225:
+ case 227:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -47715,9 +52639,9 @@ var ts;
write("?");
}
decreaseIndent();
- if (node.parent.kind === 158 ||
- node.parent.kind === 159 ||
- node.parent.parent.kind === 161) {
+ if (node.parent.kind === 159 ||
+ node.parent.kind === 160 ||
+ node.parent.parent.kind === 162) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (!ts.hasModifier(node.parent, 8)) {
@@ -47733,22 +52657,26 @@ var ts;
}
function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
switch (node.parent.kind) {
- case 150:
+ case 151:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
- case 154:
+ case 155:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 153:
+ case 154:
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 156:
+ return symbolAccessibilityResult.errorModuleName ?
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 150:
case 149:
- case 148:
if (ts.hasModifier(node.parent, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -47756,7 +52684,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226) {
+ else if (node.parent.parent.kind === 228) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47768,7 +52696,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
- case 225:
+ case 227:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -47779,12 +52707,12 @@ var ts;
}
}
function emitBindingPattern(bindingPattern) {
- if (bindingPattern.kind === 172) {
+ if (bindingPattern.kind === 173) {
write("{");
emitCommaList(bindingPattern.elements, emitBindingElement);
write("}");
}
- else if (bindingPattern.kind === 173) {
+ else if (bindingPattern.kind === 174) {
write("[");
var elements = bindingPattern.elements;
emitCommaList(elements, emitBindingElement);
@@ -47795,10 +52723,10 @@ var ts;
}
}
function emitBindingElement(bindingElement) {
- if (bindingElement.kind === 198) {
+ if (bindingElement.kind === 199) {
write(" ");
}
- else if (bindingElement.kind === 174) {
+ else if (bindingElement.kind === 175) {
if (bindingElement.propertyName) {
writeTextOfNode(currentText, bindingElement.propertyName);
write(": ");
@@ -47820,39 +52748,39 @@ var ts;
}
function emitNode(node) {
switch (node.kind) {
- case 225:
- case 230:
- case 234:
case 227:
- case 226:
- case 228:
+ case 232:
+ case 236:
case 229:
+ case 228:
+ case 230:
+ case 231:
return emitModuleElement(node, isModuleElementVisible(node));
- case 205:
+ case 207:
return emitModuleElement(node, isVariableStatementVisible(node));
- case 235:
+ case 237:
return emitModuleElement(node, !node.importClause);
- case 241:
+ case 243:
return emitExportDeclaration(node);
+ case 151:
case 150:
case 149:
- case 148:
return writeFunctionDeclaration(node);
- case 154:
- case 153:
case 155:
+ case 154:
+ case 156:
return emitSignatureDeclarationWithJsDocComments(node);
- case 151:
case 152:
+ case 153:
return emitAccessorDeclaration(node);
+ case 148:
case 147:
- case 146:
return emitPropertyDeclaration(node);
- case 260:
+ case 263:
return emitEnumMemberDeclaration(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 261:
+ case 264:
return emitSourceFile(node);
}
}
@@ -47863,14 +52791,15 @@ var ts;
declFileName = referencedFile.fileName;
}
else {
- ts.forEachExpectedEmitFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
}
if (declFileName) {
declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
}
return addedBundledEmitReference;
- function getDeclFileName(emitFileNames, _sourceFiles, isBundledEmit) {
+ function getDeclFileName(emitFileNames, sourceFileOrBundle) {
+ var isBundledEmit = sourceFileOrBundle.kind === 265;
if (isBundledEmit && !addBundledFileReference) {
return;
}
@@ -47880,10 +52809,11 @@ var ts;
}
}
}
- function writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
- var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles);
+ function writeDeclarationFile(declarationFilePath, sourceFileOrBundle, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
+ var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles);
var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit;
if (!emitSkipped) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
var declarationOutput = emitDeclarationResult.referencesOutput
+ getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles);
@@ -47937,7 +52867,7 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
- function initialize(filePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
+ function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
}
@@ -47968,9 +52898,8 @@ var ts;
}
if (compilerOptions.mapRoot) {
sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
- if (!isBundledEmit) {
- ts.Debug.assert(sourceFiles.length === 1);
- sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir));
+ if (sourceFileOrBundle.kind === 264) {
+ sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir));
}
if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
@@ -48061,28 +52990,28 @@ var ts;
ts.performance.measure("Source Map", "beforeSourcemap", "afterSourcemap");
}
}
- function emitNodeWithSourceMap(emitContext, node, emitCallback) {
+ function emitNodeWithSourceMap(hint, node, emitCallback) {
if (disabled) {
- return emitCallback(emitContext, node);
+ return emitCallback(hint, node);
}
if (node) {
var emitNode = node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end;
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 16) === 0
&& pos >= 0) {
emitPos(ts.skipTrivia(currentSourceText, pos));
}
if (emitFlags & 64) {
disabled = true;
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
disabled = false;
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
- if (node.kind !== 293
+ if (node.kind !== 294
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
@@ -48131,7 +53060,7 @@ var ts;
return;
}
encodeLastRecordedSourceMapSpan();
- return ts.stringify({
+ return JSON.stringify({
version: 3,
file: sourceMapData.sourceMapFile,
sourceRoot: sourceMapData.sourceMapSourceRoot,
@@ -48183,11 +53112,10 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- function createCommentWriter(host, writer, sourceMap) {
- var compilerOptions = host.getCompilerOptions();
- var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var newLine = host.getNewLine();
- var emitPos = sourceMap.emitPos;
+ function createCommentWriter(printerOptions, emitPos) {
+ var extendedDiagnostics = printerOptions.extendedDiagnostics;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var writer;
var containerPos = -1;
var containerEnd = -1;
var declarationListContainerEnd = -1;
@@ -48196,37 +53124,34 @@ var ts;
var currentLineMap;
var detachedCommentsInfo;
var hasWrittenComment = false;
- var disabled = compilerOptions.removeComments;
+ var disabled = printerOptions.removeComments;
return {
reset: reset,
+ setWriter: setWriter,
setSourceFile: setSourceFile,
emitNodeWithComments: emitNodeWithComments,
emitBodyWithDetachedComments: emitBodyWithDetachedComments,
emitTrailingCommentsOfPosition: emitTrailingCommentsOfPosition,
+ emitLeadingCommentsOfPosition: emitLeadingCommentsOfPosition,
};
- function emitNodeWithComments(emitContext, node, emitCallback) {
+ function emitNodeWithComments(hint, node, emitCallback) {
if (disabled) {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
return;
}
if (node) {
- var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
- var emitFlags = ts.getEmitFlags(node);
+ hasWrittenComment = false;
+ var emitNode = node.emitNode;
+ var emitFlags = emitNode && emitNode.flags;
+ var _a = emitNode && emitNode.commentRange || node, pos = _a.pos, end = _a.end;
if ((pos < 0 && end < 0) || (pos === end)) {
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
}
else {
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 293;
+ var isEmittedNode = node.kind !== 294;
var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
if (!skipLeadingComments) {
@@ -48240,23 +53165,16 @@ var ts;
}
if (!skipTrailingComments) {
containerEnd = end;
- if (node.kind === 224) {
+ if (node.kind === 226) {
declarationListContainerEnd = end;
}
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "preEmitNodeWithComment");
}
- if (emitFlags & 2048) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
if (extendedDiagnostics) {
- ts.performance.mark("beginEmitNodeWithComment");
+ ts.performance.mark("postEmitNodeWithComment");
}
containerPos = savedContainerPos;
containerEnd = savedContainerEnd;
@@ -48265,11 +53183,75 @@ var ts;
emitTrailingComments(end);
}
if (extendedDiagnostics) {
- ts.performance.measure("commentTime", "beginEmitNodeWithComment");
+ ts.performance.measure("commentTime", "postEmitNodeWithComment");
}
}
}
}
+ function emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback) {
+ var leadingComments = emitNode && emitNode.leadingComments;
+ if (ts.some(leadingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("preEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(leadingComments, emitLeadingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "preEmitNodeWithSynthesizedComments");
+ }
+ }
+ emitNodeWithNestedComments(hint, node, emitFlags, emitCallback);
+ var trailingComments = emitNode && emitNode.trailingComments;
+ if (ts.some(trailingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("postEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(trailingComments, emitTrailingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "postEmitNodeWithSynthesizedComments");
+ }
+ }
+ }
+ function emitLeadingSynthesizedComment(comment) {
+ if (comment.kind === 2) {
+ writer.writeLine();
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine || comment.kind === 2) {
+ writer.writeLine();
+ }
+ else {
+ writer.write(" ");
+ }
+ }
+ function emitTrailingSynthesizedComment(comment) {
+ if (!writer.isAtStartOfLine()) {
+ writer.write(" ");
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine) {
+ writer.writeLine();
+ }
+ }
+ function writeSynthesizedComment(comment) {
+ var text = formatSynthesizedComment(comment);
+ var lineMap = comment.kind === 3 ? ts.computeLineStarts(text) : undefined;
+ ts.writeCommentRange(text, lineMap, writer, 0, text.length, newLine);
+ }
+ function formatSynthesizedComment(comment) {
+ return comment.kind === 3
+ ? "/*" + comment.text + "*/"
+ : "//" + comment.text;
+ }
+ function emitNodeWithNestedComments(hint, node, emitFlags, emitCallback) {
+ if (emitFlags & 2048) {
+ disabled = true;
+ emitCallback(hint, node);
+ disabled = false;
+ }
+ else {
+ emitCallback(hint, node);
+ }
+ }
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
if (extendedDiagnostics) {
ts.performance.mark("preEmitBodyWithDetachedComments");
@@ -48297,6 +53279,9 @@ var ts;
}
if (!skipTrailingComments) {
emitLeadingComments(detachedRange.end, true);
+ if (hasWrittenComment && !writer.isAtStartOfLine()) {
+ writer.writeLine();
+ }
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "beginEmitBodyWithDetachedCommetns");
@@ -48321,9 +53306,11 @@ var ts;
ts.emitNewLineBeforeLeadingCommentOfPosition(currentLineMap, writer, rangePos, commentPos);
hasWrittenComment = true;
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48331,6 +53318,12 @@ var ts;
writer.write(" ");
}
}
+ function emitLeadingCommentsOfPosition(pos) {
+ if (disabled || pos === -1) {
+ return;
+ }
+ emitLeadingComments(pos, true);
+ }
function emitTrailingComments(pos) {
forEachTrailingCommentToEmit(pos, emitTrailingComment);
}
@@ -48338,9 +53331,11 @@ var ts;
if (!writer.isAtStartOfLine()) {
writer.write(" ");
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48358,9 +53353,11 @@ var ts;
}
}
function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -48389,6 +53386,9 @@ var ts;
currentLineMap = undefined;
detachedCommentsInfo = undefined;
}
+ function setWriter(output) {
+ writer = output;
+ }
function setSourceFile(sourceFile) {
currentSourceFile = sourceFile;
currentText = currentSourceFile.text;
@@ -48420,9 +53420,11 @@ var ts;
}
}
function writeComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
}
function isTripleSlashComment(commentPos, commentEnd) {
if (currentText.charCodeAt(commentPos + 1) === 47 &&
@@ -48440,63 +53442,55 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- var id = function (s) { return s; };
- var nullTransformers = [function (_) { return id; }];
- function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) {
- var delimiters = createDelimiterMap();
- var brackets = createBracketsMap();
+ var delimiters = createDelimiterMap();
+ var brackets = createBracketsMap();
+ function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles, transformers) {
var compilerOptions = host.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined;
var emitterDiagnostics = ts.createDiagnosticCollection();
var newLine = host.getNewLine();
- var transformers = emitOnlyDtsFiles ? nullTransformers : ts.getTransformers(compilerOptions);
var writer = ts.createTextWriter(newLine);
- var write = writer.write, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent;
var sourceMap = ts.createSourceMapWriter(host, writer);
- var emitNodeWithSourceMap = sourceMap.emitNodeWithSourceMap, emitTokenWithSourceMap = sourceMap.emitTokenWithSourceMap;
- var comments = ts.createCommentWriter(host, writer, sourceMap);
- var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition;
- var nodeIdToGeneratedName;
- var autoGeneratedIdToGeneratedName;
- var generatedNameSet;
- var tempFlags;
var currentSourceFile;
- var currentText;
- var currentFileIdentifiers;
var bundledHelpers;
var isOwnFileEmit;
var emitSkipped = false;
var sourceFiles = ts.getSourceFilesToEmit(host, targetSourceFile);
- ts.performance.mark("beforeTransform");
- var _a = ts.transformFiles(resolver, host, sourceFiles, transformers), transformed = _a.transformed, emitNodeWithSubstitution = _a.emitNodeWithSubstitution, emitNodeWithNotification = _a.emitNodeWithNotification;
- ts.performance.measure("transformTime", "beforeTransform");
+ var transform = ts.transformNodes(resolver, host, compilerOptions, sourceFiles, transformers, false);
+ var printer = createPrinter(compilerOptions, {
+ hasGlobalName: resolver.hasGlobalName,
+ onEmitNode: transform.emitNodeWithNotification,
+ substituteNode: transform.substituteNode,
+ onEmitSourceMapOfNode: sourceMap.emitNodeWithSourceMap,
+ onEmitSourceMapOfToken: sourceMap.emitTokenWithSourceMap,
+ onEmitSourceMapOfPosition: sourceMap.emitPos,
+ onEmitHelpers: emitHelpers,
+ onSetSourceFile: setSourceFile,
+ });
ts.performance.mark("beforePrint");
- ts.forEachTransformedEmitFile(host, transformed, emitFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, emitSourceFileOrBundle, transform.transformed, emitOnlyDtsFiles);
ts.performance.measure("printTime", "beforePrint");
- for (var _b = 0, sourceFiles_4 = sourceFiles; _b < sourceFiles_4.length; _b++) {
- var sourceFile = sourceFiles_4[_b];
- ts.disposeEmitNodes(sourceFile);
- }
+ transform.dispose();
return {
emitSkipped: emitSkipped,
diagnostics: emitterDiagnostics.getDiagnostics(),
emittedFiles: emittedFilesList,
sourceMaps: sourceMapDataList
};
- function emitFile(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, isBundledEmit) {
+ function emitSourceFileOrBundle(_a, sourceFileOrBundle) {
+ var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath;
if (!host.isEmitBlocked(jsFilePath) && !compilerOptions.noEmit) {
if (!emitOnlyDtsFiles) {
- printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
+ printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
}
}
else {
emitSkipped = true;
}
if (declarationFilePath) {
- emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFiles(sourceFiles), isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
+ emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFileOrBundle(sourceFileOrBundle), host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
}
if (!emitSkipped && emittedFilesList) {
if (!emitOnlyDtsFiles) {
@@ -48510,24 +53504,24 @@ var ts;
}
}
}
- function printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
- sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
- nodeIdToGeneratedName = [];
- autoGeneratedIdToGeneratedName = [];
- generatedNameSet = ts.createMap();
- bundledHelpers = isBundledEmit ? ts.createMap() : undefined;
- isOwnFileEmit = !isBundledEmit;
- if (isBundledEmit && moduleKind) {
- for (var _a = 0, sourceFiles_5 = sourceFiles; _a < sourceFiles_5.length; _a++) {
- var sourceFile = sourceFiles_5[_a];
- emitHelpers(sourceFile, true);
- }
+ function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) {
+ var bundle = sourceFileOrBundle.kind === 265 ? sourceFileOrBundle : undefined;
+ var sourceFile = sourceFileOrBundle.kind === 264 ? sourceFileOrBundle : undefined;
+ var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
+ sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
+ if (bundle) {
+ bundledHelpers = ts.createMap();
+ isOwnFileEmit = false;
+ printer.writeBundle(bundle, writer);
}
- ts.forEach(sourceFiles, printSourceFile);
- writeLine();
+ else {
+ isOwnFileEmit = true;
+ printer.writeFile(sourceFile, writer);
+ }
+ writer.writeLine();
var sourceMappingURL = sourceMap.getSourceMappingURL();
if (sourceMappingURL) {
- write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
+ writer.write("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
}
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), false, sourceFiles);
@@ -48537,20 +53531,164 @@ var ts;
}
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), compilerOptions.emitBOM, sourceFiles);
sourceMap.reset();
- comments.reset();
writer.reset();
- tempFlags = 0;
currentSourceFile = undefined;
- currentText = undefined;
+ bundledHelpers = undefined;
isOwnFileEmit = false;
}
- function printSourceFile(node) {
+ function setSourceFile(node) {
currentSourceFile = node;
- currentText = node.text;
- currentFileIdentifiers = node.identifiers;
sourceMap.setSourceFile(node);
- comments.setSourceFile(node);
- pipelineEmitWithNotification(0, node);
+ }
+ function emitHelpers(node, writeLines) {
+ var helpersEmitted = false;
+ var bundle = node.kind === 265 ? node : undefined;
+ if (bundle && moduleKind === ts.ModuleKind.None) {
+ return;
+ }
+ var numNodes = bundle ? bundle.sourceFiles.length : 1;
+ for (var i = 0; i < numNodes; i++) {
+ var currentNode = bundle ? bundle.sourceFiles[i] : node;
+ var sourceFile = ts.isSourceFile(currentNode) ? currentNode : currentSourceFile;
+ var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
+ var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
+ var helpers = ts.getEmitHelpers(currentNode);
+ if (helpers) {
+ for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
+ var helper = _b[_a];
+ if (!helper.scoped) {
+ if (shouldSkip)
+ continue;
+ if (shouldBundle) {
+ if (bundledHelpers.get(helper.name)) {
+ continue;
+ }
+ bundledHelpers.set(helper.name, true);
+ }
+ }
+ else if (bundle) {
+ continue;
+ }
+ writeLines(helper.text);
+ helpersEmitted = true;
+ }
+ }
+ }
+ return helpersEmitted;
+ }
+ }
+ ts.emitFiles = emitFiles;
+ function createPrinter(printerOptions, handlers) {
+ if (printerOptions === void 0) { printerOptions = {}; }
+ if (handlers === void 0) { handlers = {}; }
+ var hasGlobalName = handlers.hasGlobalName, onEmitSourceMapOfNode = handlers.onEmitSourceMapOfNode, onEmitSourceMapOfToken = handlers.onEmitSourceMapOfToken, onEmitSourceMapOfPosition = handlers.onEmitSourceMapOfPosition, onEmitNode = handlers.onEmitNode, onEmitHelpers = handlers.onEmitHelpers, onSetSourceFile = handlers.onSetSourceFile, substituteNode = handlers.substituteNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
+ var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
+ var currentSourceFile;
+ var nodeIdToGeneratedName;
+ var autoGeneratedIdToGeneratedName;
+ var generatedNames;
+ var tempFlagsStack;
+ var tempFlags;
+ var writer;
+ var ownWriter;
+ reset();
+ return {
+ printNode: printNode,
+ printFile: printFile,
+ printBundle: printBundle,
+ writeNode: writeNode,
+ writeFile: writeFile,
+ writeBundle: writeBundle
+ };
+ function printNode(hint, node, sourceFile) {
+ switch (hint) {
+ case 0:
+ ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
+ break;
+ case 2:
+ ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
+ break;
+ case 1:
+ ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
+ break;
+ }
+ switch (node.kind) {
+ case 264: return printFile(node);
+ case 265: return printBundle(node);
+ }
+ writeNode(hint, node, sourceFile, beginPrint());
+ return endPrint();
+ }
+ function printBundle(bundle) {
+ writeBundle(bundle, beginPrint());
+ return endPrint();
+ }
+ function printFile(sourceFile) {
+ writeFile(sourceFile, beginPrint());
+ return endPrint();
+ }
+ function writeNode(hint, node, sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ print(hint, node, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function writeBundle(bundle, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(bundle);
+ emitPrologueDirectivesIfNeeded(bundle);
+ emitHelpersIndirect(bundle);
+ for (var _a = 0, _b = bundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ print(0, sourceFile, sourceFile);
+ }
+ reset();
+ writer = previousWriter;
+ }
+ function writeFile(sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(sourceFile);
+ emitPrologueDirectivesIfNeeded(sourceFile);
+ print(0, sourceFile, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function beginPrint() {
+ return ownWriter || (ownWriter = ts.createTextWriter(newLine));
+ }
+ function endPrint() {
+ var text = ownWriter.getText();
+ ownWriter.reset();
+ return text;
+ }
+ function print(hint, node, sourceFile) {
+ setSourceFile(sourceFile);
+ pipelineEmitWithNotification(hint, node);
+ }
+ function setSourceFile(sourceFile) {
+ currentSourceFile = sourceFile;
+ comments.setSourceFile(sourceFile);
+ if (onSetSourceFile) {
+ onSetSourceFile(sourceFile);
+ }
+ }
+ function setWriter(output) {
+ writer = output;
+ comments.setWriter(output);
+ }
+ function reset() {
+ nodeIdToGeneratedName = [];
+ autoGeneratedIdToGeneratedName = [];
+ generatedNames = ts.createMap();
+ tempFlagsStack = [];
+ tempFlags = 0;
+ comments.reset();
+ setWriter(undefined);
}
function emit(node) {
pipelineEmitWithNotification(3, node);
@@ -48561,51 +53699,53 @@ var ts;
function emitExpression(node) {
pipelineEmitWithNotification(1, node);
}
- function pipelineEmitWithNotification(emitContext, node) {
- emitNodeWithNotification(emitContext, node, pipelineEmitWithComments);
- }
- function pipelineEmitWithComments(emitContext, node) {
- if (emitContext === 0) {
- pipelineEmitWithSourceMap(emitContext, node);
- return;
+ function pipelineEmitWithNotification(hint, node) {
+ if (onEmitNode) {
+ onEmitNode(hint, node, pipelineEmitWithComments);
}
- emitNodeWithComments(emitContext, node, pipelineEmitWithSourceMap);
- }
- function pipelineEmitWithSourceMap(emitContext, node) {
- if (emitContext === 0
- || emitContext === 2) {
- pipelineEmitWithSubstitution(emitContext, node);
- return;
+ else {
+ pipelineEmitWithComments(hint, node);
}
- emitNodeWithSourceMap(emitContext, node, pipelineEmitWithSubstitution);
}
- function pipelineEmitWithSubstitution(emitContext, node) {
- emitNodeWithSubstitution(emitContext, node, pipelineEmitForContext);
- }
- function pipelineEmitForContext(emitContext, node) {
- switch (emitContext) {
- case 0: return pipelineEmitInSourceFileContext(node);
- case 2: return pipelineEmitInIdentifierNameContext(node);
- case 3: return pipelineEmitInUnspecifiedContext(node);
- case 1: return pipelineEmitInExpressionContext(node);
+ function pipelineEmitWithComments(hint, node) {
+ node = trySubstituteNode(hint, node);
+ if (emitNodeWithComments && hint !== 0) {
+ emitNodeWithComments(hint, node, pipelineEmitWithSourceMap);
+ }
+ else {
+ pipelineEmitWithSourceMap(hint, node);
}
}
- function pipelineEmitInSourceFileContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 261:
- return emitSourceFile(node);
+ function pipelineEmitWithSourceMap(hint, node) {
+ if (onEmitSourceMapOfNode && hint !== 0 && hint !== 2) {
+ onEmitSourceMapOfNode(hint, node, pipelineEmitWithHint);
+ }
+ else {
+ pipelineEmitWithHint(hint, node);
}
}
- function pipelineEmitInIdentifierNameContext(node) {
- var kind = node.kind;
- switch (kind) {
- case 70:
- return emitIdentifier(node);
+ function pipelineEmitWithHint(hint, node) {
+ switch (hint) {
+ case 0: return pipelineEmitSourceFile(node);
+ case 2: return pipelineEmitIdentifierName(node);
+ case 1: return pipelineEmitExpression(node);
+ case 3: return pipelineEmitUnspecified(node);
}
}
- function pipelineEmitInUnspecifiedContext(node) {
+ function pipelineEmitSourceFile(node) {
+ ts.Debug.assertNode(node, ts.isSourceFile);
+ emitSourceFile(node);
+ }
+ function pipelineEmitIdentifierName(node) {
+ ts.Debug.assertNode(node, ts.isIdentifier);
+ emitIdentifier(node);
+ }
+ function pipelineEmitUnspecified(node) {
var kind = node.kind;
+ if (ts.isKeyword(kind)) {
+ writeTokenText(kind);
+ return;
+ }
switch (kind) {
case 13:
case 14:
@@ -48613,229 +53753,201 @@ var ts;
return emitLiteral(node);
case 70:
return emitIdentifier(node);
- case 75:
- case 78:
- case 83:
- case 104:
- case 111:
- case 112:
- case 113:
- case 114:
- case 116:
- case 117:
- case 118:
- case 119:
- case 120:
- case 121:
- case 122:
- case 123:
- case 124:
- case 125:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- writeTokenText(kind);
- return;
- case 141:
- return emitQualifiedName(node);
case 142:
- return emitComputedPropertyName(node);
+ return emitQualifiedName(node);
case 143:
- return emitTypeParameter(node);
+ return emitComputedPropertyName(node);
case 144:
- return emitParameter(node);
+ return emitTypeParameter(node);
case 145:
- return emitDecorator(node);
+ return emitParameter(node);
case 146:
- return emitPropertySignature(node);
+ return emitDecorator(node);
case 147:
- return emitPropertyDeclaration(node);
+ return emitPropertySignature(node);
case 148:
- return emitMethodSignature(node);
+ return emitPropertyDeclaration(node);
case 149:
- return emitMethodDeclaration(node);
+ return emitMethodSignature(node);
case 150:
- return emitConstructor(node);
+ return emitMethodDeclaration(node);
case 151:
+ return emitConstructor(node);
case 152:
- return emitAccessorDeclaration(node);
case 153:
- return emitCallSignature(node);
+ return emitAccessorDeclaration(node);
case 154:
- return emitConstructSignature(node);
+ return emitCallSignature(node);
case 155:
- return emitIndexSignature(node);
+ return emitConstructSignature(node);
case 156:
- return emitTypePredicate(node);
+ return emitIndexSignature(node);
case 157:
- return emitTypeReference(node);
+ return emitTypePredicate(node);
case 158:
- return emitFunctionType(node);
+ return emitTypeReference(node);
case 159:
- return emitConstructorType(node);
+ return emitFunctionType(node);
case 160:
- return emitTypeQuery(node);
+ return emitConstructorType(node);
case 161:
- return emitTypeLiteral(node);
+ return emitTypeQuery(node);
case 162:
- return emitArrayType(node);
+ return emitTypeLiteral(node);
case 163:
- return emitTupleType(node);
+ return emitArrayType(node);
case 164:
- return emitUnionType(node);
+ return emitTupleType(node);
case 165:
- return emitIntersectionType(node);
+ return emitUnionType(node);
case 166:
+ return emitIntersectionType(node);
+ case 167:
return emitParenthesizedType(node);
- case 199:
+ case 200:
return emitExpressionWithTypeArguments(node);
- case 167:
- return emitThisType();
case 168:
- return emitTypeOperator(node);
+ return emitThisType();
case 169:
- return emitIndexedAccessType(node);
+ return emitTypeOperator(node);
case 170:
- return emitMappedType(node);
+ return emitIndexedAccessType(node);
case 171:
- return emitLiteralType(node);
+ return emitMappedType(node);
case 172:
- return emitObjectBindingPattern(node);
+ return emitLiteralType(node);
case 173:
- return emitArrayBindingPattern(node);
+ return emitObjectBindingPattern(node);
case 174:
+ return emitArrayBindingPattern(node);
+ case 175:
return emitBindingElement(node);
- case 202:
+ case 204:
return emitTemplateSpan(node);
- case 203:
+ case 205:
return emitSemicolonClassElement();
- case 204:
+ case 206:
return emitBlock(node);
- case 205:
+ case 207:
return emitVariableStatement(node);
- case 206:
+ case 208:
return emitEmptyStatement();
- case 207:
+ case 209:
return emitExpressionStatement(node);
- case 208:
+ case 210:
return emitIfStatement(node);
- case 209:
+ case 211:
return emitDoStatement(node);
- case 210:
+ case 212:
return emitWhileStatement(node);
- case 211:
+ case 213:
return emitForStatement(node);
- case 212:
+ case 214:
return emitForInStatement(node);
- case 213:
+ case 215:
return emitForOfStatement(node);
- case 214:
+ case 216:
return emitContinueStatement(node);
- case 215:
+ case 217:
return emitBreakStatement(node);
- case 216:
+ case 218:
return emitReturnStatement(node);
- case 217:
+ case 219:
return emitWithStatement(node);
- case 218:
+ case 220:
return emitSwitchStatement(node);
- case 219:
+ case 221:
return emitLabeledStatement(node);
- case 220:
+ case 222:
return emitThrowStatement(node);
- case 221:
+ case 223:
return emitTryStatement(node);
- case 222:
+ case 224:
return emitDebuggerStatement(node);
- case 223:
+ case 225:
return emitVariableDeclaration(node);
- case 224:
+ case 226:
return emitVariableDeclarationList(node);
- case 225:
+ case 227:
return emitFunctionDeclaration(node);
- case 226:
+ case 228:
return emitClassDeclaration(node);
- case 227:
+ case 229:
return emitInterfaceDeclaration(node);
- case 228:
+ case 230:
return emitTypeAliasDeclaration(node);
- case 229:
+ case 231:
return emitEnumDeclaration(node);
- case 230:
+ case 232:
return emitModuleDeclaration(node);
- case 231:
+ case 233:
return emitModuleBlock(node);
- case 232:
- return emitCaseBlock(node);
case 234:
+ return emitCaseBlock(node);
+ case 236:
return emitImportEqualsDeclaration(node);
- case 235:
+ case 237:
return emitImportDeclaration(node);
- case 236:
+ case 238:
return emitImportClause(node);
- case 237:
+ case 239:
return emitNamespaceImport(node);
- case 238:
+ case 240:
return emitNamedImports(node);
- case 239:
+ case 241:
return emitImportSpecifier(node);
- case 240:
+ case 242:
return emitExportAssignment(node);
- case 241:
+ case 243:
return emitExportDeclaration(node);
- case 242:
+ case 244:
return emitNamedExports(node);
- case 243:
+ case 245:
return emitExportSpecifier(node);
- case 244:
+ case 246:
return;
- case 245:
+ case 247:
return emitExternalModuleReference(node);
case 10:
return emitJsxText(node);
- case 248:
+ case 250:
return emitJsxOpeningElement(node);
- case 249:
+ case 251:
return emitJsxClosingElement(node);
- case 250:
+ case 252:
return emitJsxAttribute(node);
- case 251:
+ case 253:
+ return emitJsxAttributes(node);
+ case 254:
return emitJsxSpreadAttribute(node);
- case 252:
+ case 255:
return emitJsxExpression(node);
- case 253:
+ case 256:
return emitCaseClause(node);
- case 254:
+ case 257:
return emitDefaultClause(node);
- case 255:
+ case 258:
return emitHeritageClause(node);
- case 256:
+ case 259:
return emitCatchClause(node);
- case 257:
+ case 260:
return emitPropertyAssignment(node);
- case 258:
+ case 261:
return emitShorthandPropertyAssignment(node);
- case 259:
+ case 262:
return emitSpreadAssignment(node);
- case 260:
+ case 263:
return emitEnumMember(node);
}
if (ts.isExpression(node)) {
- return pipelineEmitWithSubstitution(1, node);
+ return pipelineEmitExpression(trySubstituteNode(1, node));
+ }
+ if (ts.isToken(node)) {
+ writeTokenText(kind);
+ return;
}
}
- function pipelineEmitInExpressionContext(node) {
+ function pipelineEmitExpression(node) {
var kind = node.kind;
switch (kind) {
case 8:
@@ -48853,77 +53965,82 @@ var ts;
case 98:
writeTokenText(kind);
return;
- case 175:
- return emitArrayLiteralExpression(node);
case 176:
- return emitObjectLiteralExpression(node);
+ return emitArrayLiteralExpression(node);
case 177:
- return emitPropertyAccessExpression(node);
+ return emitObjectLiteralExpression(node);
case 178:
- return emitElementAccessExpression(node);
+ return emitPropertyAccessExpression(node);
case 179:
- return emitCallExpression(node);
+ return emitElementAccessExpression(node);
case 180:
- return emitNewExpression(node);
+ return emitCallExpression(node);
case 181:
- return emitTaggedTemplateExpression(node);
+ return emitNewExpression(node);
case 182:
- return emitTypeAssertionExpression(node);
+ return emitTaggedTemplateExpression(node);
case 183:
- return emitParenthesizedExpression(node);
+ return emitTypeAssertionExpression(node);
case 184:
- return emitFunctionExpression(node);
+ return emitParenthesizedExpression(node);
case 185:
- return emitArrowFunction(node);
+ return emitFunctionExpression(node);
case 186:
- return emitDeleteExpression(node);
+ return emitArrowFunction(node);
case 187:
- return emitTypeOfExpression(node);
+ return emitDeleteExpression(node);
case 188:
- return emitVoidExpression(node);
+ return emitTypeOfExpression(node);
case 189:
- return emitAwaitExpression(node);
+ return emitVoidExpression(node);
case 190:
- return emitPrefixUnaryExpression(node);
+ return emitAwaitExpression(node);
case 191:
- return emitPostfixUnaryExpression(node);
+ return emitPrefixUnaryExpression(node);
case 192:
- return emitBinaryExpression(node);
+ return emitPostfixUnaryExpression(node);
case 193:
- return emitConditionalExpression(node);
+ return emitBinaryExpression(node);
case 194:
- return emitTemplateExpression(node);
+ return emitConditionalExpression(node);
case 195:
- return emitYieldExpression(node);
+ return emitTemplateExpression(node);
case 196:
- return emitSpreadExpression(node);
+ return emitYieldExpression(node);
case 197:
- return emitClassExpression(node);
+ return emitSpreadExpression(node);
case 198:
+ return emitClassExpression(node);
+ case 199:
return;
- case 200:
- return emitAsExpression(node);
case 201:
+ return emitAsExpression(node);
+ case 202:
return emitNonNullExpression(node);
- case 246:
+ case 203:
+ return emitMetaProperty(node);
+ case 248:
return emitJsxElement(node);
- case 247:
+ case 249:
return emitJsxSelfClosingElement(node);
- case 294:
+ case 295:
return emitPartiallyEmittedExpression(node);
- case 297:
- return writeLines(node.text);
+ }
+ }
+ function trySubstituteNode(hint, node) {
+ return node && substituteNode && substituteNode(hint, node) || node;
+ }
+ function emitHelpersIndirect(node) {
+ if (onEmitHelpers) {
+ onEmitHelpers(node, writeLines);
}
}
function emitNumericLiteral(node) {
emitLiteral(node);
- if (node.trailingComment) {
- write(" /*" + node.trailingComment + "*/");
- }
}
function emitLiteral(node) {
var text = getLiteralTextOfNode(node);
- if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap)
+ if ((printerOptions.sourceMap || printerOptions.inlineSourceMap)
&& (node.kind === 9 || ts.isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
@@ -48962,8 +54079,8 @@ var ts;
writeIfPresent(node.dotDotDotToken, "...");
emit(node.name);
writeIfPresent(node.questionToken, "?");
- emitExpressionWithPrefix(" = ", node.initializer);
emitWithPrefix(": ", node.type);
+ emitExpressionWithPrefix(" = ", node.initializer);
}
function emitDecorator(decorator) {
write("@");
@@ -49010,7 +54127,7 @@ var ts;
function emitAccessorDeclaration(node) {
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
- write(node.kind === 151 ? "get " : "set ");
+ write(node.kind === 152 ? "get " : "set ");
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
@@ -49110,17 +54227,13 @@ var ts;
write("{");
writeLine();
increaseIndent();
- if (node.readonlyToken) {
- write("readonly ");
- }
+ writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
write(" in ");
emit(node.typeParameter.constraint);
write("]");
- if (node.questionToken) {
- write("?");
- }
+ writeIfPresent(node.questionToken, "?");
write(": ");
emit(node.type);
write(";");
@@ -49180,7 +54293,7 @@ var ts;
increaseIndent();
}
var preferNewLine = node.multiLine ? 32768 : 0;
- var allowTrailingComma = languageVersion >= 1 ? 32 : 0;
+ var allowTrailingComma = currentSourceFile.languageVersion >= 1 ? 32 : 0;
emitList(node, properties, 978 | allowTrailingComma | preferNewLine);
if (indentedFlag) {
decreaseIndent();
@@ -49192,7 +54305,7 @@ var ts;
var indentAfterDot = false;
if (!(ts.getEmitFlags(node) & 65536)) {
var dotRangeStart = node.expression.end;
- var dotRangeEnd = ts.skipTrivia(currentText, node.expression.end) + 1;
+ var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 22, pos: dotRangeStart, end: dotRangeEnd };
indentBeforeDot = needsIndentation(node, node.expression, dotToken);
indentAfterDot = needsIndentation(node, dotToken, node.name);
@@ -49206,15 +54319,17 @@ var ts;
decreaseIndentIf(indentBeforeDot, indentAfterDot);
}
function needsDotDotForPropertyAccess(expression) {
- if (expression.kind === 8) {
+ expression = ts.skipPartiallyEmittedExpressions(expression);
+ if (ts.isNumericLiteral(expression)) {
var text = getLiteralTextOfNode(expression);
- return text.indexOf(ts.tokenToString(22)) < 0;
+ return !expression.numericLiteralFlags
+ && text.indexOf(ts.tokenToString(22)) < 0;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
return isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
- && compilerOptions.removeComments;
+ && printerOptions.removeComments;
}
}
function emitElementAccessExpression(node) {
@@ -49240,11 +54355,9 @@ var ts;
emitExpression(node.template);
}
function emitTypeAssertionExpression(node) {
- if (node.type) {
- write("<");
- emit(node.type);
- write(">");
- }
+ write("<");
+ emit(node.type);
+ write(">");
emitExpression(node.expression);
}
function emitParenthesizedExpression(node) {
@@ -49291,7 +54404,7 @@ var ts;
}
function shouldEmitWhitespaceBeforeOperand(node) {
var operand = node.operand;
- return operand.kind === 190
+ return operand.kind === 191
&& ((node.operator === 36 && (operand.operator === 36 || operand.operator === 42))
|| (node.operator === 37 && (operand.operator === 37 || operand.operator === 43)));
}
@@ -49357,6 +54470,11 @@ var ts;
emitExpression(node.expression);
write("!");
}
+ function emitMetaProperty(node) {
+ writeToken(node.keywordToken, node.pos);
+ write(".");
+ emit(node.name);
+ }
function emitTemplateSpan(node) {
emitExpression(node.expression);
emit(node.literal);
@@ -49370,6 +54488,9 @@ var ts;
else {
writeToken(16, node.pos, node);
emitBlockStatements(node);
+ increaseIndent();
+ emitLeadingCommentsOfPosition(node.statements.end);
+ decreaseIndent();
writeToken(17, node.statements.end, node);
}
}
@@ -49399,27 +54520,27 @@ var ts;
writeToken(18, openParenPos, node);
emitExpression(node.expression);
writeToken(19, node.expression.end, node);
- emitEmbeddedStatement(node.thenStatement);
+ emitEmbeddedStatement(node, node.thenStatement);
if (node.elseStatement) {
- writeLine();
+ writeLineOrSpace(node);
writeToken(81, node.thenStatement.end, node);
- if (node.elseStatement.kind === 208) {
+ if (node.elseStatement.kind === 210) {
write(" ");
emit(node.elseStatement);
}
else {
- emitEmbeddedStatement(node.elseStatement);
+ emitEmbeddedStatement(node, node.elseStatement);
}
}
}
function emitDoStatement(node) {
write("do");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
if (ts.isBlock(node.statement)) {
write(" ");
}
else {
- writeLine();
+ writeLineOrSpace(node);
}
write("while (");
emitExpression(node.expression);
@@ -49429,7 +54550,7 @@ var ts;
write("while (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -49441,7 +54562,7 @@ var ts;
write(";");
emitExpressionWithPrefix(" ", node.incrementor);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForInStatement(node) {
var openParenPos = writeToken(87, node.pos);
@@ -49451,21 +54572,22 @@ var ts;
write(" in ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForOfStatement(node) {
var openParenPos = writeToken(87, node.pos);
write(" ");
+ emitWithSuffix(node.awaitModifier, " ");
writeToken(18, openParenPos);
emitForBinding(node.initializer);
write(" of ");
emitExpression(node.expression);
writeToken(19, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForBinding(node) {
if (node !== undefined) {
- if (node.kind === 224) {
+ if (node.kind === 226) {
emit(node);
}
else {
@@ -49492,7 +54614,7 @@ var ts;
write("with (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitSwitchStatement(node) {
var openParenPos = writeToken(97, node.pos);
@@ -49516,9 +54638,12 @@ var ts;
function emitTryStatement(node) {
write("try ");
emit(node.tryBlock);
- emit(node.catchClause);
+ if (node.catchClause) {
+ writeLineOrSpace(node);
+ emit(node.catchClause);
+ }
if (node.finallyBlock) {
- writeLine();
+ writeLineOrSpace(node);
write("finally ");
emit(node.finallyBlock);
}
@@ -49546,6 +54671,9 @@ var ts;
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
+ function emitBlockCallback(_hint, body) {
+ emitBlockFunctionBody(body);
+ }
function emitSignatureAndBody(node, emitSignatureHead) {
var body = node.body;
if (body) {
@@ -49556,14 +54684,23 @@ var ts;
}
if (ts.getEmitFlags(node) & 262144) {
emitSignatureHead(node);
- emitBlockFunctionBody(body);
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
emitSignatureHead(node);
- emitBlockFunctionBody(body);
- tempFlags = savedTempFlags;
+ if (onEmitNode) {
+ onEmitNode(3, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
+ popNameGenerationScope();
}
if (indentedFlag) {
decreaseIndent();
@@ -49612,9 +54749,15 @@ var ts;
function emitBlockFunctionBody(body) {
write(" {");
increaseIndent();
- emitBodyWithDetachedComments(body, body.statements, shouldEmitBlockFunctionBodyOnSingleLine(body)
+ var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
? emitBlockFunctionBodyOnSingleLine
- : emitBlockFunctionBodyWorker);
+ : emitBlockFunctionBodyWorker;
+ if (emitBodyWithDetachedComments) {
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
decreaseIndent();
writeToken(17, body.statements.end, body);
}
@@ -49623,8 +54766,9 @@ var ts;
}
function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine) {
var statementOffset = emitPrologueDirectives(body.statements, true);
- var helpersEmitted = emitHelpers(body);
- if (statementOffset === 0 && !helpersEmitted && emitBlockFunctionBodyOnSingleLine) {
+ var pos = writer.getTextPos();
+ emitHelpersIndirect(body);
+ if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine) {
decreaseIndent();
emitList(body, body.statements, 384);
increaseIndent();
@@ -49647,15 +54791,14 @@ var ts;
}
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, 256);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 65);
write("}");
+ popNameGenerationScope();
if (indentedFlag) {
decreaseIndent();
}
- tempFlags = savedTempFlags;
}
function emitInterfaceDeclaration(node) {
emitDecorators(node, node.decorators);
@@ -49682,19 +54825,18 @@ var ts;
emitModifiers(node, node.modifiers);
write("enum ");
emit(node.name);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 81);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
function emitModuleDeclaration(node) {
emitModifiers(node, node.modifiers);
write(node.flags & 16 ? "namespace " : "module ");
emit(node.name);
var body = node.body;
- while (body.kind === 230) {
+ while (body.kind === 232) {
write(".");
emit(body.name);
body = body.body;
@@ -49707,13 +54849,11 @@ var ts;
write("{ }");
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write("{");
- increaseIndent();
emitBlockStatements(node);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
}
function emitCaseBlock(node) {
@@ -49815,14 +54955,18 @@ var ts;
write("<");
emitJsxTagName(node.tagName);
write(" ");
- emitList(node, node.attributes, 131328);
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write("/>");
}
function emitJsxOpeningElement(node) {
write("<");
emitJsxTagName(node.tagName);
- writeIfAny(node.attributes, " ");
- emitList(node, node.attributes, 131328);
+ writeIfAny(node.attributes.properties, " ");
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write(">");
}
function emitJsxText(node) {
@@ -49833,6 +54977,9 @@ var ts;
emitJsxTagName(node.tagName);
write(">");
}
+ function emitJsxAttributes(node) {
+ emitList(node, node.properties, 131328);
+ }
function emitJsxAttribute(node) {
emit(node.name);
emitWithPrefix("=", node.initializer);
@@ -49845,6 +54992,9 @@ var ts;
function emitJsxExpression(node) {
if (node.expression) {
write("{");
+ if (node.dotDotDotToken) {
+ write("...");
+ }
emitExpression(node.expression);
write("}");
}
@@ -49887,7 +55037,6 @@ var ts;
emitList(node, node.types, 272);
}
function emitCatchClause(node) {
- writeLine();
var openParenPos = writeToken(73, node.pos);
write(" ");
writeToken(18, openParenPos);
@@ -49900,7 +55049,7 @@ var ts;
emit(node.name);
write(": ");
var initializer = node.initializer;
- if ((ts.getEmitFlags(initializer) & 512) === 0) {
+ if (emitTrailingCommentsOfPosition && (ts.getEmitFlags(initializer) & 512) === 0) {
var commentRange = ts.getCommentRange(initializer);
emitTrailingCommentsOfPosition(commentRange.pos);
}
@@ -49925,28 +55074,43 @@ var ts;
}
function emitSourceFile(node) {
writeLine();
- emitShebang();
- emitBodyWithDetachedComments(node, node.statements, emitSourceFileWorker);
+ var statements = node.statements;
+ if (emitBodyWithDetachedComments) {
+ var shouldEmitDetachedComment = statements.length === 0 ||
+ !ts.isPrologueDirective(statements[0]) ||
+ ts.nodeIsSynthesized(statements[0]);
+ if (shouldEmitDetachedComment) {
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
+ return;
+ }
+ }
+ emitSourceFileWorker(node);
}
function emitSourceFileWorker(node) {
var statements = node.statements;
- var statementOffset = emitPrologueDirectives(statements);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
- emitHelpers(node);
- emitList(node, statements, 1, statementOffset);
- tempFlags = savedTempFlags;
+ pushNameGenerationScope();
+ emitHelpersIndirect(node);
+ var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
+ emitList(node, statements, 1, index === -1 ? statements.length : index);
+ popNameGenerationScope();
}
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
- function emitPrologueDirectives(statements, startWithNewLine) {
+ function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
- if (ts.isPrologueDirective(statements[i])) {
- if (startWithNewLine || i > 0) {
- writeLine();
+ var statement = statements[i];
+ if (ts.isPrologueDirective(statement)) {
+ var shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;
+ if (shouldEmitPrologueDirective) {
+ if (startWithNewLine || i > 0) {
+ writeLine();
+ }
+ emit(statement);
+ if (seenPrologueDirectives) {
+ seenPrologueDirectives.set(statement.expression.text, statement.expression.text);
+ }
}
- emit(statements[i]);
}
else {
return i;
@@ -49954,71 +55118,37 @@ var ts;
}
return statements.length;
}
- function emitHelpers(node, isBundle) {
- var sourceFile = ts.isSourceFile(node) ? node : currentSourceFile;
- var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
- var shouldBundle = ts.isSourceFile(node) && !isOwnFileEmit;
- var helpersEmitted = false;
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
- var helper = _b[_a];
- if (!helper.scoped) {
- if (shouldSkip)
- continue;
- if (shouldBundle) {
- if (bundledHelpers[helper.name]) {
- continue;
- }
- bundledHelpers[helper.name] = true;
- }
- }
- else if (isBundle) {
- continue;
- }
- writeLines(helper.text);
- helpersEmitted = true;
- }
+ function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ setSourceFile(sourceFileOrBundle);
+ emitPrologueDirectives(sourceFileOrBundle.statements);
}
- if (helpersEmitted) {
- writeLine();
+ else {
+ var seenPrologueDirectives = ts.createMap();
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ setSourceFile(sourceFile);
+ emitPrologueDirectives(sourceFile.statements, true, seenPrologueDirectives);
+ }
}
- return helpersEmitted;
}
- function writeLines(text) {
- var lines = text.split(/\r\n?|\n/g);
- var indentation = guessIndentation(lines);
- for (var i = 0; i < lines.length; i++) {
- var line = indentation ? lines[i].slice(indentation) : lines[i];
- if (line.length) {
- if (i > 0) {
- writeLine();
- }
- write(line);
+ function emitShebangIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ var shebang = ts.getShebang(sourceFileOrBundle.text);
+ if (shebang) {
+ write(shebang);
+ writeLine();
+ return true;
}
}
- }
- function guessIndentation(lines) {
- var indentation;
- for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
- var line = lines_1[_a];
- for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
- if (!ts.isWhiteSpace(line.charCodeAt(i))) {
- if (indentation === undefined || i < indentation) {
- indentation = i;
- break;
- }
+ else {
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ if (emitShebangIfNeeded(sourceFile)) {
+ break;
}
}
}
- return indentation;
- }
- function emitShebang() {
- var shebang = ts.getShebang(currentText);
- if (shebang) {
- write(shebang);
- writeLine();
- }
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
@@ -50044,8 +55174,8 @@ var ts;
write(suffix);
}
}
- function emitEmbeddedStatement(node) {
- if (ts.isBlock(node)) {
+ function emitEmbeddedStatement(parent, node) {
+ if (ts.isBlock(node) || ts.getEmitFlags(parent) & 1) {
write(" ");
emit(node);
}
@@ -50102,6 +55232,9 @@ var ts;
if (format & 7680) {
write(getOpeningBracket(format));
}
+ if (onBeforeEmitNodeArray) {
+ onBeforeEmitNodeArray(children);
+ }
if (isEmpty) {
if (format & 1) {
writeLine();
@@ -50129,6 +55262,9 @@ var ts;
for (var i = 0; i < count; i++) {
var child = children[start + i];
if (previousSibling) {
+ if (delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
write(delimiter);
if (shouldWriteSeparatingLineTerminator(previousSibling, child, format)) {
if ((format & (3 | 64)) === 0) {
@@ -50143,8 +55279,10 @@ var ts;
}
}
if (shouldEmitInterveningComments) {
- var commentRange = ts.getCommentRange(child);
- emitTrailingCommentsOfPosition(commentRange.pos);
+ if (emitTrailingCommentsOfPosition) {
+ var commentRange = ts.getCommentRange(child);
+ emitTrailingCommentsOfPosition(commentRange.pos);
+ }
}
else {
shouldEmitInterveningComments = mayEmitInterveningComments;
@@ -50160,6 +55298,9 @@ var ts;
if (format & 16 && hasTrailingComma) {
write(",");
}
+ if (previousSibling && delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
if (format & 64) {
decreaseIndent();
}
@@ -50170,28 +55311,80 @@ var ts;
write(" ");
}
}
+ if (onAfterEmitNodeArray) {
+ onAfterEmitNodeArray(children);
+ }
if (format & 7680) {
write(getClosingBracket(format));
}
}
+ function write(s) {
+ writer.write(s);
+ }
+ function writeLine() {
+ writer.writeLine();
+ }
+ function increaseIndent() {
+ writer.increaseIndent();
+ }
+ function decreaseIndent() {
+ writer.decreaseIndent();
+ }
function writeIfAny(nodes, text) {
- if (nodes && nodes.length > 0) {
+ if (ts.some(nodes)) {
write(text);
}
}
function writeIfPresent(node, text) {
- if (node !== undefined) {
+ if (node) {
write(text);
}
}
function writeToken(token, pos, contextNode) {
- return emitTokenWithSourceMap(contextNode, token, pos, writeTokenText);
+ return onEmitSourceMapOfToken
+ ? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
+ : writeTokenText(token, pos);
}
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
return pos < 0 ? pos : pos + tokenString.length;
}
+ function writeLineOrSpace(node) {
+ if (ts.getEmitFlags(node) & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ }
+ }
+ function writeLines(text) {
+ var lines = text.split(/\r\n?|\n/g);
+ var indentation = guessIndentation(lines);
+ for (var i = 0; i < lines.length; i++) {
+ var line = indentation ? lines[i].slice(indentation) : lines[i];
+ if (line.length) {
+ writeLine();
+ write(line);
+ writeLine();
+ }
+ }
+ }
+ function guessIndentation(lines) {
+ var indentation;
+ for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
+ var line = lines_1[_a];
+ for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
+ if (!ts.isWhiteSpace(line.charCodeAt(i))) {
+ if (indentation === undefined || i < indentation) {
+ indentation = i;
+ break;
+ }
+ }
+ }
+ }
+ return indentation;
+ }
function increaseIndentIf(value, valueToWriteWhenNotIndenting) {
if (value) {
increaseIndent();
@@ -50296,15 +55489,23 @@ var ts;
&& !ts.nodeIsSynthesized(node2)
&& !ts.rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile);
}
+ function isSingleLineEmptyBlock(block) {
+ return !block.multiLine
+ && isEmptyBlock(block);
+ }
+ function isEmptyBlock(block) {
+ return block.statements.length === 0
+ && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ }
function skipSynthesizedParentheses(node) {
- while (node.kind === 183 && ts.nodeIsSynthesized(node)) {
+ while (node.kind === 184 && ts.nodeIsSynthesized(node)) {
node = node.expression;
}
return node;
}
function getTextOfNode(node, includeTrivia) {
if (ts.isGeneratedIdentifier(node)) {
- return getGeneratedIdentifier(node);
+ return generateName(node);
}
else if (ts.isIdentifier(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
return ts.unescapeIdentifier(node.text);
@@ -50327,25 +55528,39 @@ var ts;
return getLiteralTextOfNode(textSourceNode);
}
}
- return ts.getLiteralText(node, currentSourceFile, languageVersion);
+ return ts.getLiteralText(node, currentSourceFile);
}
- function isSingleLineEmptyBlock(block) {
- return !block.multiLine
- && isEmptyBlock(block);
+ function pushNameGenerationScope() {
+ tempFlagsStack.push(tempFlags);
+ tempFlags = 0;
}
- function isEmptyBlock(block) {
- return block.statements.length === 0
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ function popNameGenerationScope() {
+ tempFlags = tempFlagsStack.pop();
+ }
+ function generateName(name) {
+ if (name.autoGenerateKind === 4) {
+ var node = getNodeForGeneratedName(name);
+ return generateNameCached(node);
+ }
+ else {
+ var autoGenerateId = name.autoGenerateId;
+ return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(makeName(name)));
+ }
+ }
+ function generateNameCached(node) {
+ var nodeId = ts.getNodeId(node);
+ return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
}
function isUniqueName(name) {
- return !resolver.hasGlobalName(name) &&
- !ts.hasProperty(currentFileIdentifiers, name) &&
- !ts.hasProperty(generatedNameSet, name);
+ return !(hasGlobalName && hasGlobalName(name))
+ && !currentSourceFile.identifiers.has(name)
+ && !generatedNames.has(name);
}
function isUniqueLocalName(name, container) {
for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) {
- if (node.locals && ts.hasProperty(node.locals, name)) {
- if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
+ if (node.locals) {
+ var local = node.locals.get(name);
+ if (local && local.flags & (107455 | 1048576 | 8388608)) {
return false;
}
}
@@ -50354,21 +55569,21 @@ var ts;
}
function makeTempVariableName(flags) {
if (flags && !(tempFlags & flags)) {
- var name_41 = flags === 268435456 ? "_i" : "_n";
- if (isUniqueName(name_41)) {
+ var name = flags === 268435456 ? "_i" : "_n";
+ if (isUniqueName(name)) {
tempFlags |= flags;
- return name_41;
+ return name;
}
}
while (true) {
var count = tempFlags & 268435455;
tempFlags++;
if (count !== 8 && count !== 13) {
- var name_42 = count < 26
+ var name = count < 26
? "_" + String.fromCharCode(97 + count)
: "_" + (count - 26);
- if (isUniqueName(name_42)) {
- return name_42;
+ if (isUniqueName(name)) {
+ return name;
}
}
}
@@ -50381,7 +55596,8 @@ var ts;
while (true) {
var generatedName = baseName + i;
if (isUniqueName(generatedName)) {
- return generatedNameSet[generatedName] = generatedName;
+ generatedNames.set(generatedName, generatedName);
+ return generatedName;
}
i++;
}
@@ -50402,34 +55618,44 @@ var ts;
function generateNameForClassExpression() {
return makeUniqueName("class");
}
+ function generateNameForMethodOrAccessor(node) {
+ if (ts.isIdentifier(node.name)) {
+ return generateNameCached(node.name);
+ }
+ return makeTempVariableName(0);
+ }
function generateNameForNode(node) {
switch (node.kind) {
case 70:
return makeUniqueName(getTextOfNode(node));
- case 230:
- case 229:
+ case 232:
+ case 231:
return generateNameForModuleOrEnum(node);
- case 235:
- case 241:
+ case 237:
+ case 243:
return generateNameForImportOrExportDeclaration(node);
- case 225:
- case 226:
- case 240:
+ case 227:
+ case 228:
+ case 242:
return generateNameForExportDefault();
- case 197:
+ case 198:
return generateNameForClassExpression();
+ case 150:
+ case 152:
+ case 153:
+ return generateNameForMethodOrAccessor(node);
default:
return makeTempVariableName(0);
}
}
- function generateName(name) {
+ function makeName(name) {
switch (name.autoGenerateKind) {
case 1:
return makeTempVariableName(0);
case 2:
return makeTempVariableName(268435456);
case 3:
- return makeUniqueName(name.text);
+ return makeUniqueName(ts.unescapeIdentifier(name.text));
}
ts.Debug.fail("Unsupported GeneratedIdentifierKind.");
}
@@ -50448,48 +55674,106 @@ var ts;
}
return node;
}
- function getGeneratedIdentifier(name) {
- if (name.autoGenerateKind === 4) {
- var node = getNodeForGeneratedName(name);
- var nodeId = ts.getNodeId(node);
- return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
- }
- else {
- var autoGenerateId = name.autoGenerateId;
- return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(generateName(name)));
- }
- }
- function createDelimiterMap() {
- var delimiters = [];
- delimiters[0] = "";
- delimiters[16] = ",";
- delimiters[4] = " |";
- delimiters[8] = " &";
- return delimiters;
- }
- function getDelimiter(format) {
- return delimiters[format & 28];
- }
- function createBracketsMap() {
- var brackets = [];
- brackets[512] = ["{", "}"];
- brackets[1024] = ["(", ")"];
- brackets[2048] = ["<", ">"];
- brackets[4096] = ["[", "]"];
- return brackets;
- }
- function getOpeningBracket(format) {
- return brackets[format & 7680][0];
- }
- function getClosingBracket(format) {
- return brackets[format & 7680][1];
- }
}
- ts.emitFiles = emitFiles;
+ ts.createPrinter = createPrinter;
+ function createDelimiterMap() {
+ var delimiters = [];
+ delimiters[0] = "";
+ delimiters[16] = ",";
+ delimiters[4] = " |";
+ delimiters[8] = " &";
+ return delimiters;
+ }
+ function getDelimiter(format) {
+ return delimiters[format & 28];
+ }
+ function createBracketsMap() {
+ var brackets = [];
+ brackets[512] = ["{", "}"];
+ brackets[1024] = ["(", ")"];
+ brackets[2048] = ["<", ">"];
+ brackets[4096] = ["[", "]"];
+ return brackets;
+ }
+ function getOpeningBracket(format) {
+ return brackets[format & 7680][0];
+ }
+ function getClosingBracket(format) {
+ return brackets[format & 7680][1];
+ }
+ var TempFlags;
+ (function (TempFlags) {
+ TempFlags[TempFlags["Auto"] = 0] = "Auto";
+ TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
+ TempFlags[TempFlags["_i"] = 268435456] = "_i";
+ })(TempFlags || (TempFlags = {}));
+ var ListFormat;
+ (function (ListFormat) {
+ ListFormat[ListFormat["None"] = 0] = "None";
+ ListFormat[ListFormat["SingleLine"] = 0] = "SingleLine";
+ ListFormat[ListFormat["MultiLine"] = 1] = "MultiLine";
+ ListFormat[ListFormat["PreserveLines"] = 2] = "PreserveLines";
+ ListFormat[ListFormat["LinesMask"] = 3] = "LinesMask";
+ ListFormat[ListFormat["NotDelimited"] = 0] = "NotDelimited";
+ ListFormat[ListFormat["BarDelimited"] = 4] = "BarDelimited";
+ ListFormat[ListFormat["AmpersandDelimited"] = 8] = "AmpersandDelimited";
+ ListFormat[ListFormat["CommaDelimited"] = 16] = "CommaDelimited";
+ ListFormat[ListFormat["DelimitersMask"] = 28] = "DelimitersMask";
+ ListFormat[ListFormat["AllowTrailingComma"] = 32] = "AllowTrailingComma";
+ ListFormat[ListFormat["Indented"] = 64] = "Indented";
+ ListFormat[ListFormat["SpaceBetweenBraces"] = 128] = "SpaceBetweenBraces";
+ ListFormat[ListFormat["SpaceBetweenSiblings"] = 256] = "SpaceBetweenSiblings";
+ ListFormat[ListFormat["Braces"] = 512] = "Braces";
+ ListFormat[ListFormat["Parenthesis"] = 1024] = "Parenthesis";
+ ListFormat[ListFormat["AngleBrackets"] = 2048] = "AngleBrackets";
+ ListFormat[ListFormat["SquareBrackets"] = 4096] = "SquareBrackets";
+ ListFormat[ListFormat["BracketsMask"] = 7680] = "BracketsMask";
+ ListFormat[ListFormat["OptionalIfUndefined"] = 8192] = "OptionalIfUndefined";
+ ListFormat[ListFormat["OptionalIfEmpty"] = 16384] = "OptionalIfEmpty";
+ ListFormat[ListFormat["Optional"] = 24576] = "Optional";
+ ListFormat[ListFormat["PreferNewLine"] = 32768] = "PreferNewLine";
+ ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
+ ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
+ ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
+ ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
+ ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
+ ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
+ ListFormat[ListFormat["ObjectBindingPatternElements"] = 432] = "ObjectBindingPatternElements";
+ ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
+ ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
+ ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
+ ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
+ ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
+ ListFormat[ListFormat["SingleLineBlockStatements"] = 384] = "SingleLineBlockStatements";
+ ListFormat[ListFormat["MultiLineBlockStatements"] = 65] = "MultiLineBlockStatements";
+ ListFormat[ListFormat["VariableDeclarationList"] = 272] = "VariableDeclarationList";
+ ListFormat[ListFormat["SingleLineFunctionBodyStatements"] = 384] = "SingleLineFunctionBodyStatements";
+ ListFormat[ListFormat["MultiLineFunctionBodyStatements"] = 1] = "MultiLineFunctionBodyStatements";
+ ListFormat[ListFormat["ClassHeritageClauses"] = 256] = "ClassHeritageClauses";
+ ListFormat[ListFormat["ClassMembers"] = 65] = "ClassMembers";
+ ListFormat[ListFormat["InterfaceMembers"] = 65] = "InterfaceMembers";
+ ListFormat[ListFormat["EnumMembers"] = 81] = "EnumMembers";
+ ListFormat[ListFormat["CaseBlockClauses"] = 65] = "CaseBlockClauses";
+ ListFormat[ListFormat["NamedImportsOrExportsElements"] = 432] = "NamedImportsOrExportsElements";
+ ListFormat[ListFormat["JsxElementChildren"] = 131072] = "JsxElementChildren";
+ ListFormat[ListFormat["JsxElementAttributes"] = 131328] = "JsxElementAttributes";
+ ListFormat[ListFormat["CaseOrDefaultClauseStatements"] = 81985] = "CaseOrDefaultClauseStatements";
+ ListFormat[ListFormat["HeritageClauseTypes"] = 272] = "HeritageClauseTypes";
+ ListFormat[ListFormat["SourceFileStatements"] = 65537] = "SourceFileStatements";
+ ListFormat[ListFormat["Decorators"] = 24577] = "Decorators";
+ ListFormat[ListFormat["TypeArguments"] = 26960] = "TypeArguments";
+ ListFormat[ListFormat["TypeParameters"] = 26960] = "TypeParameters";
+ ListFormat[ListFormat["Parameters"] = 1360] = "Parameters";
+ ListFormat[ListFormat["IndexSignatureParameters"] = 4432] = "IndexSignatureParameters";
+ })(ListFormat || (ListFormat = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var emptyArray = [];
+ var ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
function findConfigFile(searchPath, fileExists, configName) {
if (configName === void 0) { configName = "tsconfig.json"; }
while (true) {
@@ -50521,7 +55805,8 @@ var ts;
commonPathComponents = sourcePathComponents;
return;
}
- for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
+ var n = Math.min(commonPathComponents.length, sourcePathComponents.length);
+ for (var i = 0; i < n; i++) {
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
if (i === 0) {
return true;
@@ -50548,7 +55833,6 @@ var ts;
function getCanonicalFileName(fileName) {
return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
}
- var unsupportedFileEncodingErrorCode = -2147024809;
function getSourceFile(fileName, languageVersion, onError) {
var text;
try {
@@ -50559,20 +55843,18 @@ var ts;
}
catch (e) {
if (onError) {
- onError(e.number === unsupportedFileEncodingErrorCode
- ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
- : e.message);
+ onError(e.message);
}
text = "";
}
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath) {
- if (directoryPath in existingDirectories) {
+ if (existingDirectories.has(directoryPath)) {
return true;
}
if (ts.sys.directoryExists(directoryPath)) {
- existingDirectories[directoryPath] = true;
+ existingDirectories.set(directoryPath, true);
return true;
}
return false;
@@ -50591,9 +55873,10 @@ var ts;
}
var hash = ts.sys.createHash(data);
var mtimeBefore = ts.sys.getModifiedTime(fileName);
- if (mtimeBefore && fileName in outputFingerprints) {
- var fingerprint = outputFingerprints[fileName];
- if (fingerprint.byteOrderMark === writeByteOrderMark &&
+ if (mtimeBefore) {
+ var fingerprint = outputFingerprints.get(fileName);
+ if (fingerprint &&
+ fingerprint.byteOrderMark === writeByteOrderMark &&
fingerprint.hash === hash &&
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
return;
@@ -50601,11 +55884,11 @@ var ts;
}
ts.sys.writeFile(fileName, data, writeByteOrderMark);
var mtimeAfter = ts.sys.getModifiedTime(fileName);
- outputFingerprints[fileName] = {
+ outputFingerprints.set(fileName, {
hash: hash,
byteOrderMark: writeByteOrderMark,
mtime: mtimeAfter
- };
+ });
}
function writeFile(fileName, data, writeByteOrderMark, onError) {
try {
@@ -50704,10 +55987,14 @@ var ts;
var resolutions = [];
var cache = ts.createMap();
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
- var name_43 = names_1[_i];
- var result = name_43 in cache
- ? cache[name_43]
- : cache[name_43] = loader(name_43, containingFile);
+ var name = names_1[_i];
+ var result = void 0;
+ if (cache.has(name)) {
+ result = cache.get(name);
+ }
+ else {
+ cache.set(name, result = loader(name, containingFile));
+ }
resolutions.push(result);
}
return resolutions;
@@ -50719,6 +56006,8 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var cachedSemanticDiagnosticsForFile = {};
+ var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
var fileProcessingDiagnostics = ts.createDiagnosticCollection();
var maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0;
@@ -50732,6 +56021,7 @@ var ts;
var currentDirectory = host.getCurrentDirectory();
var supportedExtensions = ts.getSupportedExtensions(options);
var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName);
+ var moduleResolutionCache;
var resolveModuleNamesWorker;
if (host.resolveModuleNames) {
resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile).map(function (resolved) {
@@ -50744,7 +56034,8 @@ var ts;
}); };
}
else {
- var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host).resolvedModule; };
+ moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); });
+ var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache).resolvedModule; };
resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); };
}
var resolveTypeReferenceDirectiveNamesWorker;
@@ -50780,6 +56071,7 @@ var ts;
}
}
}
+ moduleResolutionCache = undefined;
oldProgram = undefined;
program = {
getRootFileNames: function () { return rootNames; },
@@ -50813,7 +56105,7 @@ var ts;
return program;
function getCommonSourceDirectory() {
if (commonSourceDirectory === undefined) {
- var emittedFiles = ts.filterSourceFilesInDirectory(files, isSourceFileFromExternalLibrary);
+ var emittedFiles = ts.filter(files, function (file) { return ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary); });
if (options.rootDir && checkSourceFilesBelongToPath(emittedFiles, options.rootDir)) {
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory);
}
@@ -50832,7 +56124,7 @@ var ts;
classifiableNames = ts.createMap();
for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
var sourceFile = files_2[_i];
- ts.copyProperties(sourceFile.classifiableNames, classifiableNames);
+ ts.copyEntries(sourceFile.classifiableNames, classifiableNames);
}
}
return classifiableNames;
@@ -50875,7 +56167,7 @@ var ts;
: emptyArray;
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] == predictedToResolveToAmbientModuleMarker) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
result[i] = undefined;
}
else {
@@ -50986,7 +56278,7 @@ var ts;
newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
- for (var i = 0, len = newSourceFiles.length; i < len; i++) {
+ for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
}
files = newSourceFiles;
@@ -51015,7 +56307,7 @@ var ts;
};
}
function isSourceFileFromExternalLibrary(file) {
- return sourceFilesFoundSearchingNodeModules[file.path];
+ return sourceFilesFoundSearchingNodeModules.get(file.path);
}
function getDiagnosticsProducingTypeChecker() {
return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true));
@@ -51026,13 +56318,13 @@ var ts;
function getTypeChecker() {
return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false));
}
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
- return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles); });
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers) {
+ return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers); });
}
function isEmitBlocked(emitFileName) {
return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName));
}
- function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
+ function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers) {
var declarationDiagnostics = [];
if (options.noEmit) {
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
@@ -51053,7 +56345,8 @@ var ts;
}
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile);
ts.performance.mark("beforeEmit");
- var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles);
+ var transformers = emitOnlyDtsFiles ? [] : ts.getTransformers(options, customTransformers);
+ var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles, transformers);
ts.performance.mark("afterEmit");
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
return emitResult;
@@ -51114,16 +56407,42 @@ var ts;
}
}
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedSemanticDiagnosticsForFile, getSemanticDiagnosticsForFileNoCache);
+ }
+ function getSemanticDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
var bindDiagnostics = sourceFile.bindDiagnostics;
- var checkDiagnostics = ts.isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
+ var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
- return bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ return ts.isSourceFileJavaScript(sourceFile)
+ ? ts.filter(diagnostics, shouldReportDiagnostic)
+ : diagnostics;
});
}
+ function shouldReportDiagnostic(diagnostic) {
+ var file = diagnostic.file, start = diagnostic.start;
+ if (file) {
+ var lineStarts = ts.getLineStarts(file);
+ var line = ts.computeLineAndCharacterOfPosition(lineStarts, start).line;
+ while (line > 0) {
+ var previousLineText = file.text.slice(lineStarts[line - 1], lineStarts[line]);
+ var result = ignoreDiagnosticCommentRegEx.exec(previousLineText);
+ if (!result) {
+ return true;
+ }
+ if (result[3]) {
+ return false;
+ }
+ line--;
+ }
+ }
+ return true;
+ }
function getJavaScriptSyntacticDiagnosticsForFile(sourceFile) {
return runWithCancellationToken(function () {
var diagnostics = [];
@@ -51132,57 +56451,57 @@ var ts;
return diagnostics;
function walk(node) {
switch (parent.kind) {
- case 144:
- case 147:
+ case 145:
+ case 148:
if (parent.questionToken === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
return;
}
- case 149:
- case 148:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
+ case 227:
+ case 186:
+ case 227:
case 225:
- case 223:
if (parent.type === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file));
return;
}
}
switch (node.kind) {
- case 234:
+ case 236:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file));
return;
- case 240:
+ case 242:
if (node.isExportEquals) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 255:
+ case 258:
var heritageClause = node;
if (heritageClause.token === 107) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 227:
+ case 229:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));
return;
- case 230:
+ case 232:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));
return;
- case 228:
+ case 230:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));
return;
- case 229:
+ case 231:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));
return;
- case 182:
+ case 183:
var typeAssertionExpression = node;
diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));
return;
@@ -51197,26 +56516,26 @@ var ts;
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
}
switch (parent.kind) {
- case 226:
- case 149:
- case 148:
+ case 228:
case 150:
+ case 149:
case 151:
case 152:
- case 184:
- case 225:
+ case 153:
case 185:
- case 225:
+ case 227:
+ case 186:
+ case 227:
if (nodes === parent.typeParameters) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));
return;
}
- case 205:
+ case 207:
if (nodes === parent.modifiers) {
- return checkModifiers(nodes, parent.kind === 205);
+ return checkModifiers(nodes, parent.kind === 207);
}
break;
- case 147:
+ case 148:
if (nodes === parent.modifiers) {
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
var modifier = _a[_i];
@@ -51227,23 +56546,23 @@ var ts;
return;
}
break;
- case 144:
+ case 145:
if (nodes === parent.modifiers) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 179:
case 180:
- case 199:
+ case 181:
+ case 200:
if (nodes === parent.typeArguments) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file));
return;
}
break;
}
- for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) {
- var node = nodes_6[_b];
+ for (var _b = 0, nodes_8 = nodes; _b < nodes_8.length; _b++) {
+ var node = nodes_8[_b];
walk(node);
}
}
@@ -51279,11 +56598,33 @@ var ts;
});
}
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
+ }
+ function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
return ts.getDeclarationDiagnostics(getEmitHost(ts.noop), resolver, sourceFile);
});
}
+ function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics) {
+ var cachedResult = sourceFile
+ ? cache.perFile && cache.perFile.get(sourceFile.path)
+ : cache.allDiagnostics;
+ if (cachedResult) {
+ return cachedResult;
+ }
+ var result = getDiagnostics(sourceFile, cancellationToken) || emptyArray;
+ if (sourceFile) {
+ if (!cache.perFile) {
+ cache.perFile = ts.createFileMap();
+ }
+ cache.perFile.set(sourceFile.path, result);
+ }
+ else {
+ cache.allDiagnostics = result;
+ }
+ return result;
+ }
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
@@ -51323,11 +56664,10 @@ var ts;
if (options.importHelpers
&& (options.isolatedModules || isExternalModuleFile)
&& !file.isDeclarationFile) {
- var externalHelpersModuleReference = ts.createSynthesizedNode(9);
- externalHelpersModuleReference.text = ts.externalHelpersModuleNameText;
- var importDecl = ts.createSynthesizedNode(235);
- importDecl.parent = file;
+ var externalHelpersModuleReference = ts.createLiteral(ts.externalHelpersModuleNameText);
+ var importDecl = ts.createImportDeclaration(undefined, undefined, undefined);
externalHelpersModuleReference.parent = importDecl;
+ importDecl.parent = file;
imports = [externalHelpersModuleReference];
}
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
@@ -51343,9 +56683,9 @@ var ts;
return;
function collectModuleReferences(node, inAmbientModule) {
switch (node.kind) {
- case 235:
- case 234:
- case 241:
+ case 237:
+ case 236:
+ case 243:
var moduleNameExpr = ts.getExternalModuleName(node);
if (!moduleNameExpr || moduleNameExpr.kind !== 9) {
break;
@@ -51357,7 +56697,7 @@ var ts;
(imports || (imports = [])).push(moduleNameExpr);
}
break;
- case 230:
+ case 232:
if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
@@ -51441,18 +56781,18 @@ var ts;
if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) {
reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd);
}
- if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
- sourceFilesFoundSearchingNodeModules[file_1.path] = false;
+ if (file_1 && sourceFilesFoundSearchingNodeModules.get(file_1.path) && currentNodeModulesDepth === 0) {
+ sourceFilesFoundSearchingNodeModules.set(file_1.path, false);
if (!options.noResolve) {
processReferencedFiles(file_1, isDefaultLib);
processTypeReferenceDirectives(file_1);
}
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
- else if (file_1 && modulesWithElidedImports[file_1.path]) {
+ else if (file_1 && modulesWithElidedImports.get(file_1.path)) {
if (currentNodeModulesDepth < maxNodeModuleJsDepth) {
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
}
@@ -51468,7 +56808,7 @@ var ts;
});
filesByName.set(path, file);
if (file) {
- sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
+ sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
file.path = path;
if (host.useCaseSensitiveFileNames()) {
var existingFile = filesByNameIgnoreCase.get(path);
@@ -51512,7 +56852,7 @@ var ts;
}
}
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) {
- var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective];
+ var previousResolution = resolvedTypeReferenceDirectives.get(typeReferenceDirective);
if (previousResolution && previousResolution.primary) {
return;
}
@@ -51540,7 +56880,7 @@ var ts;
fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective));
}
if (saveResolution) {
- resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective;
+ resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
}
}
function createDiagnostic(refFile, refPos, refEnd, message) {
@@ -51581,7 +56921,7 @@ var ts;
var elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;
var shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport;
if (elideImport) {
- modulesWithElidedImports[file.path] = true;
+ modulesWithElidedImports.set(file.path, true);
}
else if (shouldAddFile) {
var path = ts.toPath(resolvedFileName, currentDirectory, getCanonicalFileName);
@@ -51599,8 +56939,8 @@ var ts;
}
function computeCommonSourceDirectory(sourceFiles) {
var fileNames = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var file = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
+ var file = sourceFiles_2[_i];
if (!file.isDeclarationFile) {
fileNames.push(file.fileName);
}
@@ -51611,8 +56951,8 @@ var ts;
var allFilesBelongToPath = true;
if (sourceFiles) {
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
+ for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
+ var sourceFile = sourceFiles_3[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
@@ -51705,7 +57045,7 @@ var ts;
if (options.lib && options.noLib) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"));
}
- if (options.noImplicitUseStrict && options.alwaysStrict) {
+ if (options.noImplicitUseStrict && (options.alwaysStrict === undefined ? options.strict : options.alwaysStrict)) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"));
}
var languageVersion = options.target || 0;
@@ -51745,6 +57085,9 @@ var ts;
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+ if (options.checkJs && !options.allowJs) {
+ programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"));
+ }
if (options.emitDecoratorMetadata &&
!options.experimentalDecorators) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
@@ -51763,7 +57106,7 @@ var ts;
if (!options.noEmit && !options.suppressOutputPathCheck) {
var emitHost = getEmitHost();
var emitFilesSeen_1 = ts.createFileMap(!host.useCaseSensitiveFileNames() ? function (key) { return key.toLocaleLowerCase(); } : undefined);
- ts.forEachExpectedEmitFile(emitHost, function (emitFileNames) {
+ ts.forEachEmittedFile(emitHost, function (emitFileNames) {
verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen_1);
verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen_1);
});
@@ -51825,7 +57168,9 @@ var ts;
this.text = text;
}
StringScriptSnapshot.prototype.getText = function (start, end) {
- return this.text.substring(start, end);
+ return start === 0 && end === this.text.length
+ ? this.text
+ : this.text.substring(start, end);
};
StringScriptSnapshot.prototype.getLength = function () {
return this.text.length;
@@ -51884,6 +57229,22 @@ var ts;
SymbolDisplayPartKind[SymbolDisplayPartKind["functionName"] = 20] = "functionName";
SymbolDisplayPartKind[SymbolDisplayPartKind["regularExpressionLiteral"] = 21] = "regularExpressionLiteral";
})(SymbolDisplayPartKind = ts.SymbolDisplayPartKind || (ts.SymbolDisplayPartKind = {}));
+ var OutputFileType;
+ (function (OutputFileType) {
+ OutputFileType[OutputFileType["JavaScript"] = 0] = "JavaScript";
+ OutputFileType[OutputFileType["SourceMap"] = 1] = "SourceMap";
+ OutputFileType[OutputFileType["Declaration"] = 2] = "Declaration";
+ })(OutputFileType = ts.OutputFileType || (ts.OutputFileType = {}));
+ var EndOfLineState;
+ (function (EndOfLineState) {
+ EndOfLineState[EndOfLineState["None"] = 0] = "None";
+ EndOfLineState[EndOfLineState["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia";
+ EndOfLineState[EndOfLineState["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral";
+ EndOfLineState[EndOfLineState["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral";
+ EndOfLineState[EndOfLineState["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate";
+ EndOfLineState[EndOfLineState["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail";
+ EndOfLineState[EndOfLineState["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition";
+ })(EndOfLineState = ts.EndOfLineState || (ts.EndOfLineState = {}));
var TokenClass;
(function (TokenClass) {
TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation";
@@ -51908,7 +57269,7 @@ var ts;
ScriptElementKind.interfaceElement = "interface";
ScriptElementKind.typeElement = "type";
ScriptElementKind.enumElement = "enum";
- ScriptElementKind.enumMemberElement = "const";
+ ScriptElementKind.enumMemberElement = "enum member";
ScriptElementKind.variableElement = "var";
ScriptElementKind.localVariableElement = "local var";
ScriptElementKind.functionElement = "function";
@@ -51930,6 +57291,7 @@ var ts;
ScriptElementKind.letElement = "let";
ScriptElementKind.directory = "directory";
ScriptElementKind.externalModuleName = "external module name";
+ ScriptElementKind.jsxAttribute = "JSX attribute";
})(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {}));
var ScriptElementKindModifier;
(function (ScriptElementKindModifier) {
@@ -51971,40 +57333,76 @@ var ts;
ClassificationTypeNames.jsxText = "jsx text";
ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
+ var ClassificationType;
+ (function (ClassificationType) {
+ ClassificationType[ClassificationType["comment"] = 1] = "comment";
+ ClassificationType[ClassificationType["identifier"] = 2] = "identifier";
+ ClassificationType[ClassificationType["keyword"] = 3] = "keyword";
+ ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral";
+ ClassificationType[ClassificationType["operator"] = 5] = "operator";
+ ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral";
+ ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
+ ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace";
+ ClassificationType[ClassificationType["text"] = 9] = "text";
+ ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation";
+ ClassificationType[ClassificationType["className"] = 11] = "className";
+ ClassificationType[ClassificationType["enumName"] = 12] = "enumName";
+ ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName";
+ ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName";
+ ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName";
+ ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName";
+ ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName";
+ ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName";
+ ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName";
+ ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName";
+ ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
+ ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute";
+ ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText";
+ ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
+ })(ClassificationType = ts.ClassificationType || (ts.ClassificationType = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.scanner = ts.createScanner(5, true);
ts.emptyArray = [];
+ var SemanticMeaning;
+ (function (SemanticMeaning) {
+ SemanticMeaning[SemanticMeaning["None"] = 0] = "None";
+ SemanticMeaning[SemanticMeaning["Value"] = 1] = "Value";
+ SemanticMeaning[SemanticMeaning["Type"] = 2] = "Type";
+ SemanticMeaning[SemanticMeaning["Namespace"] = 4] = "Namespace";
+ SemanticMeaning[SemanticMeaning["All"] = 7] = "All";
+ })(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {}));
function getMeaningFromDeclaration(node) {
switch (node.kind) {
- case 144:
- case 223:
- case 174:
+ case 145:
+ case 225:
+ case 175:
+ case 148:
case 147:
- case 146:
- case 257:
- case 258:
case 260:
- case 149:
- case 148:
+ case 261:
+ case 263:
case 150:
+ case 149:
case 151:
case 152:
- case 225:
- case 184:
+ case 153:
+ case 227:
case 185:
- case 256:
+ case 186:
+ case 259:
+ case 252:
return 1;
- case 143:
- case 227:
- case 228:
- case 161:
- return 2;
- case 226:
+ case 144:
case 229:
- return 1 | 2;
case 230:
+ case 162:
+ return 2;
+ case 228:
+ case 231:
+ return 1 | 2;
+ case 232:
if (ts.isAmbientModule(node)) {
return 4 | 1;
}
@@ -52014,21 +57412,24 @@ var ts;
else {
return 4;
}
- case 238:
- case 239:
- case 234:
- case 235:
case 240:
case 241:
+ case 236:
+ case 237:
+ case 242:
+ case 243:
return 1 | 2 | 4;
- case 261:
+ case 264:
return 4 | 1;
}
return 1 | 2 | 4;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
- if (node.parent.kind === 240) {
+ if (node.kind === 264) {
+ return 1;
+ }
+ else if (node.parent.kind === 242) {
return 1 | 2 | 4;
}
else if (isInRightSideOfImport(node)) {
@@ -52050,15 +57451,15 @@ var ts;
ts.getMeaningFromLocation = getMeaningFromLocation;
function getMeaningFromRightHandSideOfImportEquals(node) {
ts.Debug.assert(node.kind === 70);
- if (node.parent.kind === 141 &&
+ if (node.parent.kind === 142 &&
node.parent.right === node &&
- node.parent.parent.kind === 234) {
+ node.parent.parent.kind === 236) {
return 1 | 2 | 4;
}
return 4;
}
function isInRightSideOfImport(node) {
- while (node.parent.kind === 141) {
+ while (node.parent.kind === 142) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
@@ -52069,27 +57470,27 @@ var ts;
function isQualifiedNameNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 141) {
- while (root.parent && root.parent.kind === 141) {
+ if (root.parent.kind === 142) {
+ while (root.parent && root.parent.kind === 142) {
root = root.parent;
}
isLastClause = root.right === node;
}
- return root.parent.kind === 157 && !isLastClause;
+ return root.parent.kind === 158 && !isLastClause;
}
function isPropertyAccessNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 177) {
- while (root.parent && root.parent.kind === 177) {
+ if (root.parent.kind === 178) {
+ while (root.parent && root.parent.kind === 178) {
root = root.parent;
}
isLastClause = root.name === node;
}
- if (!isLastClause && root.parent.kind === 199 && root.parent.parent.kind === 255) {
+ if (!isLastClause && root.parent.kind === 200 && root.parent.parent.kind === 258) {
var decl = root.parent.parent.parent;
- return (decl.kind === 226 && root.parent.parent.token === 107) ||
- (decl.kind === 227 && root.parent.parent.token === 84);
+ return (decl.kind === 228 && root.parent.parent.token === 107) ||
+ (decl.kind === 229 && root.parent.parent.token === 84);
}
return false;
}
@@ -52097,17 +57498,17 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 157 ||
- (node.parent.kind === 199 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
+ return node.parent.kind === 158 ||
+ (node.parent.kind === 200 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
(node.kind === 98 && !ts.isPartOfExpression(node)) ||
- node.kind === 167;
+ node.kind === 168;
}
function isCallExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 179);
+ return isCallOrNewExpressionTarget(node, 180);
}
ts.isCallExpressionTarget = isCallExpressionTarget;
function isNewExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 180);
+ return isCallOrNewExpressionTarget(node, 181);
}
ts.isNewExpressionTarget = isNewExpressionTarget;
function isCallOrNewExpressionTarget(node, kind) {
@@ -52120,7 +57521,7 @@ var ts;
ts.climbPastPropertyAccess = climbPastPropertyAccess;
function getTargetLabel(referenceNode, labelName) {
while (referenceNode) {
- if (referenceNode.kind === 219 && referenceNode.label.text === labelName) {
+ if (referenceNode.kind === 221 && referenceNode.label.text === labelName) {
return referenceNode.label;
}
referenceNode = referenceNode.parent;
@@ -52130,13 +57531,13 @@ var ts;
ts.getTargetLabel = getTargetLabel;
function isJumpStatementTarget(node) {
return node.kind === 70 &&
- (node.parent.kind === 215 || node.parent.kind === 214) &&
+ (node.parent.kind === 217 || node.parent.kind === 216) &&
node.parent.label === node;
}
ts.isJumpStatementTarget = isJumpStatementTarget;
function isLabelOfLabeledStatement(node) {
return node.kind === 70 &&
- node.parent.kind === 219 &&
+ node.parent.kind === 221 &&
node.parent.label === node;
}
function isLabelName(node) {
@@ -52144,15 +57545,15 @@ var ts;
}
ts.isLabelName = isLabelName;
function isRightSideOfQualifiedName(node) {
- return node.parent.kind === 141 && node.parent.right === node;
+ return node.parent.kind === 142 && node.parent.right === node;
}
ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName;
function isRightSideOfPropertyAccess(node) {
- return node && node.parent && node.parent.kind === 177 && node.parent.name === node;
+ return node && node.parent && node.parent.kind === 178 && node.parent.name === node;
}
ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess;
function isNameOfModuleDeclaration(node) {
- return node.parent.kind === 230 && node.parent.name === node;
+ return node.parent.kind === 232 && node.parent.name === node;
}
ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration;
function isNameOfFunctionDeclaration(node) {
@@ -52163,19 +57564,19 @@ var ts;
function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) {
if (node.kind === 9 || node.kind === 8) {
switch (node.parent.kind) {
+ case 148:
case 147:
- case 146:
- case 257:
case 260:
+ case 263:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 230:
+ case 153:
+ case 232:
return node.parent.name === node;
- case 178:
+ case 179:
return node.parent.argumentExpression === node;
- case 142:
+ case 143:
return true;
}
}
@@ -52219,17 +57620,17 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 261:
+ case 264:
+ case 150:
case 149:
- case 148:
- case 225:
- case 184:
- case 151:
- case 152:
- case 226:
case 227:
+ case 185:
+ case 152:
+ case 153:
+ case 228:
case 229:
- case 230:
+ case 231:
+ case 232:
return node;
}
}
@@ -52237,46 +57638,46 @@ var ts;
ts.getContainerNode = getContainerNode;
function getNodeKind(node) {
switch (node.kind) {
- case 261:
+ case 264:
return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement;
- case 230:
+ case 232:
return ts.ScriptElementKind.moduleElement;
- case 226:
- case 197:
+ case 228:
+ case 198:
return ts.ScriptElementKind.classElement;
- case 227: return ts.ScriptElementKind.interfaceElement;
- case 228: return ts.ScriptElementKind.typeElement;
- case 229: return ts.ScriptElementKind.enumElement;
- case 223:
+ case 229: return ts.ScriptElementKind.interfaceElement;
+ case 230: return ts.ScriptElementKind.typeElement;
+ case 231: return ts.ScriptElementKind.enumElement;
+ case 225:
return getKindOfVariableDeclaration(node);
- case 174:
+ case 175:
return getKindOfVariableDeclaration(ts.getRootDeclaration(node));
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
return ts.ScriptElementKind.functionElement;
- case 151: return ts.ScriptElementKind.memberGetAccessorElement;
- case 152: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 152: return ts.ScriptElementKind.memberGetAccessorElement;
+ case 153: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 150:
case 149:
- case 148:
return ts.ScriptElementKind.memberFunctionElement;
+ case 148:
case 147:
- case 146:
return ts.ScriptElementKind.memberVariableElement;
- case 155: return ts.ScriptElementKind.indexSignatureElement;
- case 154: return ts.ScriptElementKind.constructSignatureElement;
- case 153: return ts.ScriptElementKind.callSignatureElement;
- case 150: return ts.ScriptElementKind.constructorImplementationElement;
- case 143: return ts.ScriptElementKind.typeParameterElement;
- case 260: return ts.ScriptElementKind.enumMemberElement;
- case 144: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
- case 234:
- case 239:
+ case 156: return ts.ScriptElementKind.indexSignatureElement;
+ case 155: return ts.ScriptElementKind.constructSignatureElement;
+ case 154: return ts.ScriptElementKind.callSignatureElement;
+ case 151: return ts.ScriptElementKind.constructorImplementationElement;
+ case 144: return ts.ScriptElementKind.typeParameterElement;
+ case 263: return ts.ScriptElementKind.enumMemberElement;
+ case 145: return ts.hasModifier(node, 92) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
case 236:
- case 243:
- case 237:
+ case 241:
+ case 238:
+ case 245:
+ case 239:
return ts.ScriptElementKind.alias;
- case 285:
+ case 289:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -52290,21 +57691,12 @@ var ts;
}
}
ts.getNodeKind = getNodeKind;
- function getStringLiteralTypeForNode(node, typeChecker) {
- var searchNode = node.parent.kind === 171 ? node.parent : node;
- var type = typeChecker.getTypeAtLocation(searchNode);
- if (type && type.flags & 32) {
- return type;
- }
- return undefined;
- }
- ts.getStringLiteralTypeForNode = getStringLiteralTypeForNode;
function isThis(node) {
switch (node.kind) {
case 98:
return true;
case 70:
- return ts.identifierIsThisKeyword(node) && node.parent.kind === 144;
+ return ts.identifierIsThisKeyword(node) && node.parent.kind === 145;
default:
return false;
}
@@ -52312,7 +57704,7 @@ var ts;
ts.isThis = isThis;
var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*</;
function getLineStartPositionForPosition(position, sourceFile) {
- var lineStarts = sourceFile.getLineStarts();
+ var lineStarts = ts.getLineStarts(sourceFile);
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
return lineStarts[line];
}
@@ -52348,41 +57740,41 @@ var ts;
return false;
}
switch (n.kind) {
- case 226:
- case 227:
+ case 228:
case 229:
- case 176:
- case 172:
- case 161:
- case 204:
case 231:
- case 232:
- case 238:
- case 242:
+ case 177:
+ case 173:
+ case 162:
+ case 206:
+ case 233:
+ case 234:
+ case 240:
+ case 244:
return nodeEndsWith(n, 17, sourceFile);
- case 256:
+ case 259:
return isCompletedNode(n.block, sourceFile);
- case 180:
+ case 181:
if (!n.arguments) {
return true;
}
- case 179:
- case 183:
- case 166:
+ case 180:
+ case 184:
+ case 167:
return nodeEndsWith(n, 19, sourceFile);
- case 158:
case 159:
+ case 160:
return isCompletedNode(n.type, sourceFile);
- case 150:
case 151:
case 152:
- case 225:
- case 184:
- case 149:
- case 148:
- case 154:
case 153:
+ case 227:
case 185:
+ case 150:
+ case 149:
+ case 155:
+ case 154:
+ case 186:
if (n.body) {
return isCompletedNode(n.body, sourceFile);
}
@@ -52390,65 +57782,65 @@ var ts;
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 19, sourceFile);
- case 230:
+ case 232:
return n.body && isCompletedNode(n.body, sourceFile);
- case 208:
+ case 210:
if (n.elseStatement) {
return isCompletedNode(n.elseStatement, sourceFile);
}
return isCompletedNode(n.thenStatement, sourceFile);
- case 207:
+ case 209:
return isCompletedNode(n.expression, sourceFile) ||
hasChildOfKind(n, 24);
- case 175:
- case 173:
- case 178:
- case 142:
- case 163:
+ case 176:
+ case 174:
+ case 179:
+ case 143:
+ case 164:
return nodeEndsWith(n, 21, sourceFile);
- case 155:
+ case 156:
if (n.type) {
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 21, sourceFile);
- case 253:
- case 254:
+ case 256:
+ case 257:
return false;
- case 211:
- case 212:
case 213:
- case 210:
+ case 214:
+ case 215:
+ case 212:
return isCompletedNode(n.statement, sourceFile);
- case 209:
+ case 211:
var hasWhileKeyword = findChildOfKind(n, 105, sourceFile);
if (hasWhileKeyword) {
return nodeEndsWith(n, 19, sourceFile);
}
return isCompletedNode(n.statement, sourceFile);
- case 160:
+ case 161:
return isCompletedNode(n.exprName, sourceFile);
- case 187:
- case 186:
case 188:
- case 195:
+ case 187:
+ case 189:
case 196:
+ case 197:
var unaryWordExpression = n;
return isCompletedNode(unaryWordExpression.expression, sourceFile);
- case 181:
+ case 182:
return isCompletedNode(n.template, sourceFile);
- case 194:
+ case 195:
var lastSpan = ts.lastOrUndefined(n.templateSpans);
return isCompletedNode(lastSpan, sourceFile);
- case 202:
+ case 204:
return ts.nodeIsPresent(n.literal);
- case 241:
- case 235:
+ case 243:
+ case 237:
return ts.nodeIsPresent(n.moduleSpecifier);
- case 190:
+ case 191:
return isCompletedNode(n.operand, sourceFile);
- case 192:
- return isCompletedNode(n.right, sourceFile);
case 193:
+ return isCompletedNode(n.right, sourceFile);
+ case 194:
return isCompletedNode(n.whenFalse, sourceFile);
default:
return true;
@@ -52491,7 +57883,7 @@ var ts;
ts.findChildOfKind = findChildOfKind;
function findContainingList(node) {
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
- if (c.kind === 292 && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 293 && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -52523,7 +57915,7 @@ var ts;
if (includeJsDocComment === void 0) { includeJsDocComment = false; }
var current = sourceFile;
outer: while (true) {
- if (isToken(current)) {
+ if (ts.isToken(current)) {
return current;
}
if (includeJsDocComment) {
@@ -52546,8 +57938,8 @@ var ts;
}
}
}
- for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) {
- var child = current.getChildAt(i);
+ for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
+ var child = _b[_a];
if (ts.isJSDocNode(child)) {
continue;
}
@@ -52571,7 +57963,7 @@ var ts;
}
function findTokenOnLeftOfPosition(file, position) {
var tokenAtPosition = getTokenAtPosition(file, position);
- if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
+ if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
return findPrecedingToken(position, file);
@@ -52580,7 +57972,7 @@ var ts;
function findNextToken(previousToken, parent) {
return find(parent);
function find(n) {
- if (isToken(n) && n.pos === previousToken.end) {
+ if (ts.isToken(n) && n.pos === previousToken.end) {
return n;
}
var children = n.getChildren();
@@ -52599,7 +57991,7 @@ var ts;
function findPrecedingToken(position, sourceFile, startNode) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
@@ -52607,11 +57999,11 @@ var ts;
return candidate && findRightmostToken(candidate);
}
function find(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
- for (var i = 0, len = children.length; i < len; i++) {
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
if (position < child.end && (nodeHasTokens(child) || child.kind === 10)) {
var start = child.getStart(sourceFile);
@@ -52626,7 +58018,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 261);
+ ts.Debug.assert(startNode !== undefined || n.kind === 264);
if (children.length) {
var candidate = findRightmostChildNodeWithTokens(children, children.length);
return candidate && findRightmostToken(candidate);
@@ -52671,13 +58063,13 @@ var ts;
if (token.kind === 26 && token.parent.kind === 10) {
return true;
}
- if (token.kind === 26 && token.parent.kind === 252) {
+ if (token.kind === 26 && token.parent.kind === 255) {
return true;
}
- if (token && token.kind === 17 && token.parent.kind === 252) {
+ if (token && token.kind === 17 && token.parent.kind === 255) {
return true;
}
- if (token.kind === 26 && token.parent.kind === 249) {
+ if (token.kind === 26 && token.parent.kind === 251) {
return true;
}
return false;
@@ -52694,10 +58086,10 @@ var ts;
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return predicate ?
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 ? position <= c.end : position < c.end) &&
+ (c.kind === 2 ? position <= c.end : position < c.end) &&
predicate(c); }) :
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 ? position <= c.end : position < c.end); });
+ (c.kind === 2 ? position <= c.end : position < c.end); });
}
return false;
}
@@ -52714,7 +58106,7 @@ var ts;
ts.hasDocComment = hasDocComment;
function getJsDocTagAtPosition(sourceFile, position) {
var node = ts.getTokenAtPosition(sourceFile, position);
- if (isToken(node)) {
+ if (ts.isToken(node)) {
switch (node.kind) {
case 103:
case 109:
@@ -52768,19 +58160,15 @@ var ts;
}
ts.getNodeModifiers = getNodeModifiers;
function getTypeArgumentOrTypeParameterList(node) {
- if (node.kind === 157 || node.kind === 179) {
+ if (node.kind === 158 || node.kind === 180) {
return node.typeArguments;
}
- if (ts.isFunctionLike(node) || node.kind === 226 || node.kind === 227) {
+ if (ts.isFunctionLike(node) || node.kind === 228 || node.kind === 229) {
return node.typeParameters;
}
return undefined;
}
ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList;
- function isToken(n) {
- return n.kind >= 0 && n.kind <= 140;
- }
- ts.isToken = isToken;
function isWord(kind) {
return kind === 70 || ts.isKeyword(kind);
}
@@ -52837,18 +58225,18 @@ var ts;
}
ts.compareDataObjects = compareDataObjects;
function isArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- if (node.kind === 175 ||
- node.kind === 176) {
- if (node.parent.kind === 192 &&
+ if (node.kind === 176 ||
+ node.kind === 177) {
+ if (node.parent.kind === 193 &&
node.parent.left === node &&
node.parent.operatorToken.kind === 57) {
return true;
}
- if (node.parent.kind === 213 &&
+ if (node.parent.kind === 215 &&
node.parent.initializer === node) {
return true;
}
- if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 257 ? node.parent.parent : node.parent)) {
+ if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 ? node.parent.parent : node.parent)) {
return true;
}
}
@@ -52876,10 +58264,43 @@ var ts;
}
}
ts.isInNonReferenceComment = isInNonReferenceComment;
+ function createTextSpanFromNode(node, sourceFile) {
+ return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
+ }
+ ts.createTextSpanFromNode = createTextSpanFromNode;
+ function isTypeKeyword(kind) {
+ switch (kind) {
+ case 118:
+ case 121:
+ case 129:
+ case 132:
+ case 133:
+ case 135:
+ case 136:
+ case 104:
+ return true;
+ default:
+ return false;
+ }
+ }
+ ts.isTypeKeyword = isTypeKeyword;
+ function isExternalModuleSymbol(moduleSymbol) {
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536));
+ return moduleSymbol.name.charCodeAt(0) === 34;
+ }
+ ts.isExternalModuleSymbol = isExternalModuleSymbol;
+ function nodeSeenTracker() {
+ var seen = [];
+ return function (node) {
+ var id = ts.getNodeId(node);
+ return !seen[id] && (seen[id] = true);
+ };
+ }
+ ts.nodeSeenTracker = nodeSeenTracker;
})(ts || (ts = {}));
(function (ts) {
function isFirstDeclarationOfSymbolParameter(symbol) {
- return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 144;
+ return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145;
}
ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter;
var displayPartWriter = getDisplayPartWriter();
@@ -52896,13 +58317,15 @@ var ts;
writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); },
writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); },
writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); },
+ writeProperty: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.propertyName); },
writeSymbol: writeSymbol,
writeLine: writeLine,
increaseIndent: function () { indent++; },
decreaseIndent: function () { indent--; },
clear: resetWriter,
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
function writeIndent() {
if (lineStart) {
@@ -53050,21 +58473,16 @@ var ts;
}
ts.signatureToDisplayParts = signatureToDisplayParts;
function getDeclaredName(typeChecker, symbol, location) {
- if (isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- else if (ts.isStringOrNumericLiteral(location) &&
- location.parent.kind === 142) {
+ if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143) {
return location.text;
}
var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- var name = typeChecker.symbolToString(localExportDefaultSymbol || symbol);
- return name;
+ return typeChecker.symbolToString(localExportDefaultSymbol || symbol);
}
ts.getDeclaredName = getDeclaredName;
function isImportOrExportSpecifierName(location) {
return location.parent &&
- (location.parent.kind === 239 || location.parent.kind === 243) &&
+ (location.parent.kind === 241 || location.parent.kind === 245) &&
location.parent.propertyName === location;
}
ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName;
@@ -53075,7 +58493,6 @@ var ts;
(name.charCodeAt(0) === 34 || name.charCodeAt(0) === 39)) {
return name.substring(1, length - 1);
}
- ;
return name;
}
ts.stripQuotes = stripQuotes;
@@ -53121,6 +58538,21 @@ var ts;
};
}
ts.sanitizeConfigFile = sanitizeConfigFile;
+ function getFirstNonSpaceCharacterPosition(text, position) {
+ while (ts.isWhiteSpace(text.charCodeAt(position))) {
+ position += 1;
+ }
+ return position;
+ }
+ ts.getFirstNonSpaceCharacterPosition = getFirstNonSpaceCharacterPosition;
+ function getOpenBrace(constructor, sourceFile) {
+ return constructor.body.getFirstToken(sourceFile);
+ }
+ ts.getOpenBrace = getOpenBrace;
+ function getOpenBraceOfClassLike(declaration, sourceFile) {
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ }
+ ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -53169,89 +58601,89 @@ var ts;
function spanInNode(node) {
if (node) {
switch (node.kind) {
- case 205:
+ case 207:
return spanInVariableDeclaration(node.declarationList.declarations[0]);
- case 223:
+ case 225:
+ case 148:
case 147:
- case 146:
return spanInVariableDeclaration(node);
- case 144:
+ case 145:
return spanInParameterDeclaration(node);
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 150:
- case 184:
+ case 153:
+ case 151:
case 185:
+ case 186:
return spanInFunctionDeclaration(node);
- case 204:
+ case 206:
if (ts.isFunctionBlock(node)) {
return spanInFunctionBlock(node);
}
- case 231:
+ case 233:
return spanInBlock(node);
- case 256:
+ case 259:
return spanInBlock(node.block);
- case 207:
+ case 209:
return textSpan(node.expression);
- case 216:
+ case 218:
return textSpan(node.getChildAt(0), node.expression);
- case 210:
+ case 212:
return textSpanEndingAtNextToken(node, node.expression);
- case 209:
+ case 211:
return spanInNode(node.statement);
- case 222:
+ case 224:
return textSpan(node.getChildAt(0));
- case 208:
+ case 210:
return textSpanEndingAtNextToken(node, node.expression);
- case 219:
+ case 221:
return spanInNode(node.statement);
- case 215:
- case 214:
+ case 217:
+ case 216:
return textSpan(node.getChildAt(0), node.label);
- case 211:
+ case 213:
return spanInForStatement(node);
- case 212:
+ case 214:
return textSpanEndingAtNextToken(node, node.expression);
- case 213:
+ case 215:
return spanInInitializerOfForLike(node);
- case 218:
+ case 220:
return textSpanEndingAtNextToken(node, node.expression);
- case 253:
- case 254:
+ case 256:
+ case 257:
return spanInNode(node.statements[0]);
- case 221:
+ case 223:
return spanInBlock(node.tryBlock);
- case 220:
+ case 222:
return textSpan(node, node.expression);
- case 240:
+ case 242:
return textSpan(node, node.expression);
- case 234:
+ case 236:
return textSpan(node, node.moduleReference);
- case 235:
+ case 237:
return textSpan(node, node.moduleSpecifier);
- case 241:
+ case 243:
return textSpan(node, node.moduleSpecifier);
- case 230:
+ case 232:
if (ts.getModuleInstanceState(node) !== 1) {
return undefined;
}
- case 226:
- case 229:
- case 260:
- case 174:
+ case 228:
+ case 231:
+ case 263:
+ case 175:
return textSpan(node);
- case 217:
+ case 219:
return spanInNode(node.statement);
- case 145:
+ case 146:
return spanInNodeArray(node.parent.decorators);
- case 172:
case 173:
+ case 174:
return spanInBindingPattern(node);
- case 227:
- case 228:
+ case 229:
+ case 230:
return undefined;
case 24:
case 1:
@@ -53279,20 +58711,20 @@ var ts;
case 73:
case 86:
return spanInNextNode(node);
- case 140:
+ case 141:
return spanInOfKeyword(node);
default:
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node)) {
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node);
}
if ((node.kind === 70 ||
- node.kind == 196 ||
- node.kind === 257 ||
- node.kind === 258) &&
+ node.kind === 197 ||
+ node.kind === 260 ||
+ node.kind === 261) &&
ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
return textSpan(node);
}
- if (node.kind === 192) {
+ if (node.kind === 193) {
var binaryExpression = node;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) {
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left);
@@ -53307,38 +58739,38 @@ var ts;
}
if (ts.isPartOfExpression(node)) {
switch (node.parent.kind) {
- case 209:
+ case 211:
return spanInPreviousNode(node);
- case 145:
+ case 146:
return spanInNode(node.parent);
- case 211:
case 213:
+ case 215:
return textSpan(node);
- case 192:
+ case 193:
if (node.parent.operatorToken.kind === 25) {
return textSpan(node);
}
break;
- case 185:
+ case 186:
if (node.parent.body === node) {
return textSpan(node);
}
break;
}
}
- if (node.parent.kind === 257 &&
+ if (node.parent.kind === 260 &&
node.parent.name === node &&
!ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {
return spanInNode(node.parent.initializer);
}
- if (node.parent.kind === 182 && node.parent.type === node) {
+ if (node.parent.kind === 183 && node.parent.type === node) {
return spanInNextNode(node.parent.type);
}
if (ts.isFunctionLike(node.parent) && node.parent.type === node) {
return spanInPreviousNode(node);
}
- if ((node.parent.kind === 223 ||
- node.parent.kind === 144)) {
+ if ((node.parent.kind === 225 ||
+ node.parent.kind === 145)) {
var paramOrVarDecl = node.parent;
if (paramOrVarDecl.initializer === node ||
paramOrVarDecl.type === node ||
@@ -53346,7 +58778,7 @@ var ts;
return spanInPreviousNode(node);
}
}
- if (node.parent.kind === 192) {
+ if (node.parent.kind === 193) {
var binaryExpression = node.parent;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) &&
(binaryExpression.right === node ||
@@ -53358,8 +58790,8 @@ var ts;
}
}
function textSpanFromVariableDeclaration(variableDeclaration) {
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] === variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 &&
+ variableDeclaration.parent.declarations[0] === variableDeclaration) {
return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
}
else {
@@ -53367,7 +58799,7 @@ var ts;
}
}
function spanInVariableDeclaration(variableDeclaration) {
- if (variableDeclaration.parent.parent.kind === 212) {
+ if (variableDeclaration.parent.parent.kind === 214) {
return spanInNode(variableDeclaration.parent.parent);
}
if (ts.isBindingPattern(variableDeclaration.name)) {
@@ -53375,11 +58807,11 @@ var ts;
}
if (variableDeclaration.initializer ||
ts.hasModifier(variableDeclaration, 1) ||
- variableDeclaration.parent.parent.kind === 213) {
+ variableDeclaration.parent.parent.kind === 215) {
return textSpanFromVariableDeclaration(variableDeclaration);
}
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] !== variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 &&
+ variableDeclaration.parent.declarations[0] !== variableDeclaration) {
return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
}
}
@@ -53407,7 +58839,7 @@ var ts;
}
function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) {
return ts.hasModifier(functionDeclaration, 1) ||
- (functionDeclaration.parent.kind === 226 && functionDeclaration.kind !== 150);
+ (functionDeclaration.parent.kind === 228 && functionDeclaration.kind !== 151);
}
function spanInFunctionDeclaration(functionDeclaration) {
if (!functionDeclaration.body) {
@@ -53427,22 +58859,22 @@ var ts;
}
function spanInBlock(block) {
switch (block.parent.kind) {
- case 230:
+ case 232:
if (ts.getModuleInstanceState(block.parent) !== 1) {
return undefined;
}
- case 210:
- case 208:
case 212:
+ case 210:
+ case 214:
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
- case 211:
case 213:
+ case 215:
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
}
return spanInNode(block.statements[0]);
}
function spanInInitializerOfForLike(forLikeStatement) {
- if (forLikeStatement.initializer.kind === 224) {
+ if (forLikeStatement.initializer.kind === 226) {
var variableDeclarationList = forLikeStatement.initializer;
if (variableDeclarationList.declarations.length > 0) {
return spanInNode(variableDeclarationList.declarations[0]);
@@ -53464,62 +58896,62 @@ var ts;
}
}
function spanInBindingPattern(bindingPattern) {
- var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 198 ? element : undefined; });
+ var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
- if (bindingPattern.parent.kind === 174) {
+ if (bindingPattern.parent.kind === 175) {
return textSpan(bindingPattern.parent);
}
return textSpanFromVariableDeclaration(bindingPattern.parent);
}
function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- ts.Debug.assert(node.kind !== 173 && node.kind !== 172);
- var elements = node.kind === 175 ?
+ ts.Debug.assert(node.kind !== 174 && node.kind !== 173);
+ var elements = node.kind === 176 ?
node.elements :
node.properties;
- var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 198 ? element : undefined; });
+ var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
- return textSpan(node.parent.kind === 192 ? node.parent : node);
+ return textSpan(node.parent.kind === 193 ? node.parent : node);
}
function spanInOpenBraceToken(node) {
switch (node.parent.kind) {
- case 229:
+ case 231:
var enumDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile));
- case 226:
+ case 228:
var classDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile));
- case 232:
+ case 234:
return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]);
}
return spanInNode(node.parent);
}
function spanInCloseBraceToken(node) {
switch (node.parent.kind) {
- case 231:
+ case 233:
if (ts.getModuleInstanceState(node.parent.parent) !== 1) {
return undefined;
}
- case 229:
- case 226:
+ case 231:
+ case 228:
return textSpan(node);
- case 204:
+ case 206:
if (ts.isFunctionBlock(node.parent)) {
return textSpan(node);
}
- case 256:
+ case 259:
return spanInNode(ts.lastOrUndefined(node.parent.statements));
- case 232:
+ case 234:
var caseBlock = node.parent;
var lastClause = ts.lastOrUndefined(caseBlock.clauses);
if (lastClause) {
return spanInNode(ts.lastOrUndefined(lastClause.statements));
}
return undefined;
- case 172:
+ case 173:
var bindingPattern = node.parent;
return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
default:
@@ -53532,7 +58964,7 @@ var ts;
}
function spanInCloseBracketToken(node) {
switch (node.parent.kind) {
- case 173:
+ case 174:
var bindingPattern = node.parent;
return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
default:
@@ -53544,33 +58976,33 @@ var ts;
}
}
function spanInOpenParenToken(node) {
- if (node.parent.kind === 209 ||
- node.parent.kind === 179 ||
- node.parent.kind === 180) {
+ if (node.parent.kind === 211 ||
+ node.parent.kind === 180 ||
+ node.parent.kind === 181) {
return spanInPreviousNode(node);
}
- if (node.parent.kind === 183) {
+ if (node.parent.kind === 184) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInCloseParenToken(node) {
switch (node.parent.kind) {
- case 184:
- case 225:
case 185:
+ case 227:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
- case 150:
- case 210:
- case 209:
+ case 153:
+ case 151:
+ case 212:
case 211:
case 213:
- case 179:
+ case 215:
case 180:
- case 183:
+ case 181:
+ case 184:
return spanInPreviousNode(node);
default:
return spanInNode(node.parent);
@@ -53578,26 +59010,26 @@ var ts;
}
function spanInColonToken(node) {
if (ts.isFunctionLike(node.parent) ||
- node.parent.kind === 257 ||
- node.parent.kind === 144) {
+ node.parent.kind === 260 ||
+ node.parent.kind === 145) {
return spanInPreviousNode(node);
}
return spanInNode(node.parent);
}
function spanInGreaterThanOrLessThanToken(node) {
- if (node.parent.kind === 182) {
+ if (node.parent.kind === 183) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInWhileKeyword(node) {
- if (node.parent.kind === 209) {
+ if (node.parent.kind === 211) {
return textSpanEndingAtNextToken(node, node.parent.expression);
}
return spanInNode(node.parent);
}
function spanInOfKeyword(node) {
- if (node.parent.kind === 213) {
+ if (node.parent.kind === 215) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
@@ -53628,7 +59060,7 @@ var ts;
function canFollow(keyword1, keyword2) {
if (ts.isAccessibilityModifier(keyword1)) {
if (keyword2 === 124 ||
- keyword2 === 133 ||
+ keyword2 === 134 ||
keyword2 === 122 ||
keyword2 === 114) {
return true;
@@ -53641,9 +59073,9 @@ var ts;
var entries = [];
var dense = classifications.spans;
var lastEnd = 0;
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_4 = dense[i + 1];
+ var length_5 = dense[i + 1];
var type = dense[i + 2];
if (lastEnd >= 0) {
var whitespaceLength_1 = start - lastEnd;
@@ -53651,8 +59083,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_4, classification: convertClassification(type) });
- lastEnd = start + length_4;
+ entries.push({ length: length_5, classification: convertClassification(type) });
+ lastEnd = start + length_5;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -53744,10 +59176,10 @@ var ts;
angleBracketStack--;
}
else if (token === 118 ||
- token === 134 ||
+ token === 135 ||
token === 132 ||
token === 121 ||
- token === 135) {
+ token === 136) {
if (angleBracketStack > 0 && !syntacticClassifierAbsent) {
token = 70;
}
@@ -53902,7 +59334,7 @@ var ts;
}
}
function isKeyword(token) {
- return token >= 71 && token <= 140;
+ return token >= 71 && token <= 141;
}
function classFromKind(token) {
if (isKeyword(token)) {
@@ -53948,10 +59380,10 @@ var ts;
ts.getSemanticClassifications = getSemanticClassifications;
function checkForClassificationCancellation(cancellationToken, kind) {
switch (kind) {
- case 230:
- case 226:
+ case 232:
+ case 228:
+ case 229:
case 227:
- case 225:
cancellationToken.throwIfCancellationRequested();
}
}
@@ -53995,7 +59427,7 @@ var ts;
return undefined;
function hasValueSideModule(symbol) {
return ts.forEach(symbol.declarations, function (declaration) {
- return declaration.kind === 230 &&
+ return declaration.kind === 232 &&
ts.getModuleInstanceState(declaration) === 1;
});
}
@@ -54006,7 +59438,7 @@ var ts;
checkForClassificationCancellation(cancellationToken, kind);
if (kind === 70 && !ts.nodeIsMissing(node)) {
var identifier = node;
- if (classifiableNames[identifier.text]) {
+ if (classifiableNames.get(identifier.text)) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
var type = classifySymbol(symbol, ts.getMeaningFromLocation(node));
@@ -54052,7 +59484,7 @@ var ts;
ts.Debug.assert(classifications.spans.length % 3 === 0);
var dense = classifications.spans;
var result = [];
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
result.push({
textSpan: ts.createTextSpan(dense[i], dense[i + 1]),
classificationType: getClassificationTypeName(dense[i + 2])
@@ -54136,16 +59568,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18);
pos = tag.tagName.end;
switch (tag.kind) {
- case 281:
+ case 285:
processJSDocParameterTag(tag);
break;
- case 284:
+ case 288:
processJSDocTemplateTag(tag);
break;
- case 283:
+ case 287:
processElement(tag.typeExpression);
break;
- case 282:
+ case 286:
processElement(tag.typeExpression);
break;
}
@@ -54226,22 +59658,22 @@ var ts;
}
function tryClassifyJsxElementName(token) {
switch (token.parent && token.parent.kind) {
- case 248:
+ case 250:
if (token.parent.tagName === token) {
return 19;
}
break;
- case 249:
+ case 251:
if (token.parent.tagName === token) {
return 20;
}
break;
- case 247:
+ case 249:
if (token.parent.tagName === token) {
return 21;
}
break;
- case 250:
+ case 252:
if (token.parent.name === token) {
return 22;
}
@@ -54261,17 +59693,17 @@ var ts;
if (ts.isPunctuation(tokenKind)) {
if (token) {
if (tokenKind === 57) {
- if (token.parent.kind === 223 ||
- token.parent.kind === 147 ||
- token.parent.kind === 144 ||
- token.parent.kind === 250) {
+ if (token.parent.kind === 225 ||
+ token.parent.kind === 148 ||
+ token.parent.kind === 145 ||
+ token.parent.kind === 252) {
return 5;
}
}
- if (token.parent.kind === 192 ||
- token.parent.kind === 190 ||
+ if (token.parent.kind === 193 ||
token.parent.kind === 191 ||
- token.parent.kind === 193) {
+ token.parent.kind === 192 ||
+ token.parent.kind === 194) {
return 5;
}
}
@@ -54281,7 +59713,7 @@ var ts;
return 4;
}
else if (tokenKind === 9) {
- return token.parent.kind === 250 ? 24 : 6;
+ return token.parent.kind === 252 ? 24 : 6;
}
else if (tokenKind === 11) {
return 6;
@@ -54295,32 +59727,32 @@ var ts;
else if (tokenKind === 70) {
if (token) {
switch (token.parent.kind) {
- case 226:
+ case 228:
if (token.parent.name === token) {
return 11;
}
return;
- case 143:
+ case 144:
if (token.parent.name === token) {
return 15;
}
return;
- case 227:
+ case 229:
if (token.parent.name === token) {
return 13;
}
return;
- case 229:
+ case 231:
if (token.parent.name === token) {
return 12;
}
return;
- case 230:
+ case 232:
if (token.parent.name === token) {
return 14;
}
return;
- case 144:
+ case 145:
if (token.parent.name === token) {
return ts.isThisIdentifier(token) ? 3 : 17;
}
@@ -54336,9 +59768,8 @@ var ts;
}
if (ts.decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) {
checkForClassificationCancellation(cancellationToken, element.kind);
- var children = element.getChildren(sourceFile);
- for (var i = 0, n = children.length; i < n; i++) {
- var child = children[i];
+ for (var _i = 0, _a = element.getChildren(sourceFile); _i < _a.length; _i++) {
+ var child = _a[_i];
if (!tryClassifyNode(child)) {
processElement(child);
}
@@ -54352,208 +59783,25 @@ var ts;
(function (ts) {
var Completions;
(function (Completions) {
- function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
- if (ts.isInReferenceComment(sourceFile, position)) {
- return getTripleSlashReferenceCompletion(sourceFile, position);
- }
- if (ts.isInString(sourceFile, position)) {
- return getStringLiteralCompletionEntries(sourceFile, position);
- }
- var completionData = getCompletionData(typeChecker, log, sourceFile, position);
- if (!completionData) {
- return undefined;
- }
- var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isJsDocTagName = completionData.isJsDocTagName;
- if (isJsDocTagName) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getAllJsDocCompletionEntries() };
- }
- var entries = [];
- if (ts.isSourceFileJavaScript(sourceFile)) {
- var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, true);
- ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames));
- }
- else {
- if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 &&
- location.parent && location.parent.kind === 249) {
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
- return undefined;
- }
- }
- getCompletionEntriesFromSymbols(symbols, entries, location, true);
- }
- if (!isMemberCompletion && !isJsDocTagName) {
- ts.addRange(entries, keywordCompletions);
- }
- return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
- function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames) {
- var entries = [];
- var nameTable = ts.getNameTable(sourceFile);
- for (var name_44 in nameTable) {
- if (nameTable[name_44] === position) {
- continue;
- }
- if (!uniqueNames[name_44]) {
- uniqueNames[name_44] = name_44;
- var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name_44), compilerOptions.target, true);
- if (displayName) {
- var entry = {
- name: displayName,
- kind: ts.ScriptElementKind.warning,
- kindModifiers: "",
- sortText: "1"
- };
- entries.push(entry);
- }
- }
- }
- return entries;
- }
- function createCompletionEntry(symbol, location, performCharacterChecks) {
- var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, compilerOptions.target, performCharacterChecks, location);
- if (!displayName) {
- return undefined;
- }
- return {
- name: displayName,
- kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- sortText: "0",
- };
- }
- function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks) {
- var start = ts.timestamp();
- var uniqueNames = ts.createMap();
- if (symbols) {
- for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
- var symbol = symbols_4[_i];
- var entry = createCompletionEntry(symbol, location, performCharacterChecks);
- if (entry) {
- var id = ts.escapeIdentifier(entry.name);
- if (!uniqueNames[id]) {
- entries.push(entry);
- uniqueNames[id] = id;
- }
- }
- }
- }
- log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
- return uniqueNames;
- }
- function getStringLiteralCompletionEntries(sourceFile, position) {
- var node = ts.findPrecedingToken(position, sourceFile);
- if (!node || node.kind !== 9) {
- return undefined;
- }
- if (node.parent.kind === 257 &&
- node.parent.parent.kind === 176 &&
- node.parent.name === node) {
- return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent);
- }
- else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
- return getStringLiteralCompletionEntriesFromElementAccess(node.parent);
- }
- else if (node.parent.kind === 235 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
- return getStringLiteralCompletionEntriesFromModuleNames(node);
- }
- else {
- var argumentInfo = ts.SignatureHelp.getContainingArgumentInfo(node, position, sourceFile);
- if (argumentInfo) {
- return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo);
- }
- return getStringLiteralCompletionEntriesFromContextualType(node);
- }
- }
- function getStringLiteralCompletionEntriesFromPropertyAssignment(element) {
- var type = typeChecker.getContextualType(element.parent);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- }
- function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo) {
- var candidates = [];
- var entries = [];
- typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
- for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
- var candidate = candidates_3[_i];
- if (candidate.parameters.length > argumentInfo.argumentIndex) {
- var parameter = candidate.parameters[argumentInfo.argumentIndex];
- addStringLiteralCompletionsFromType(typeChecker.getTypeAtLocation(parameter.valueDeclaration), entries);
- }
- }
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromElementAccess(node) {
- var type = typeChecker.getTypeAtLocation(node.expression);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromContextualType(node) {
- var type = typeChecker.getContextualType(node);
- if (type) {
- var entries_2 = [];
- addStringLiteralCompletionsFromType(type, entries_2);
- if (entries_2.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
- }
- }
- return undefined;
- }
- function addStringLiteralCompletionsFromType(type, result) {
- if (!type) {
- return;
- }
- if (type.flags & 65536) {
- ts.forEach(type.types, function (t) { return addStringLiteralCompletionsFromType(t, result); });
- }
- else {
- if (type.flags & 32) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
- }
- }
- }
- function getStringLiteralCompletionEntriesFromModuleNames(node) {
+ var PathCompletions;
+ (function (PathCompletions) {
+ function getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker) {
var literalValue = ts.normalizeSlashes(node.text);
var scriptPath = node.getSourceFile().path;
var scriptDirectory = ts.getDirectoryPath(scriptPath);
var span = getDirectoryFragmentTextSpan(node.text, node.getStart() + 1);
var entries;
if (isPathRelativeToScript(literalValue) || ts.isRootedDiskPath(literalValue)) {
+ var extensions = ts.getSupportedExtensions(compilerOptions);
if (compilerOptions.rootDirs) {
- entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, extensions, false, span, compilerOptions, host, scriptPath);
}
else {
- entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensions, false, span, host, scriptPath);
}
}
else {
- entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span);
+ entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span, compilerOptions, host, typeChecker);
}
return {
isGlobalCompletion: false,
@@ -54562,6 +59810,7 @@ var ts;
entries: entries
};
}
+ PathCompletions.getStringLiteralCompletionEntriesFromModuleNames = getStringLiteralCompletionEntriesFromModuleNames;
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase) {
rootDirs = ts.map(rootDirs, function (rootDirectory) { return ts.normalizePath(ts.isRootedDiskPath(rootDirectory) ? rootDirectory : ts.combinePaths(basePath, rootDirectory)); });
var relativeDirectory;
@@ -54574,18 +59823,18 @@ var ts;
}
return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
}
- function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, exclude) {
+ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, compilerOptions, host, exclude) {
var basePath = compilerOptions.project || host.getCurrentDirectory();
var ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
var baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase);
var result = [];
for (var _i = 0, baseDirectories_1 = baseDirectories; _i < baseDirectories_1.length; _i++) {
var baseDirectory = baseDirectories_1[_i];
- getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, exclude, result);
+ getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, host, exclude, result);
}
return result;
}
- function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, exclude, result) {
+ function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, host, exclude, result) {
if (result === void 0) { result = []; }
if (fragment === undefined) {
fragment = "";
@@ -54610,13 +59859,13 @@ var ts;
continue;
}
var foundFileName = includeExtensions ? ts.getBaseFileName(filePath) : ts.removeFileExtension(ts.getBaseFileName(filePath));
- if (!foundFiles[foundFileName]) {
- foundFiles[foundFileName] = true;
+ if (!foundFiles.get(foundFileName)) {
+ foundFiles.set(foundFileName, true);
}
}
- for (var foundFile in foundFiles) {
+ ts.forEachKey(foundFiles, function (foundFile) {
result.push(createCompletionEntryForModule(foundFile, ts.ScriptElementKind.scriptElement, span));
- }
+ });
}
var directories = tryGetDirectories(host, baseDirectory);
if (directories) {
@@ -54629,14 +59878,14 @@ var ts;
}
return result;
}
- function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span) {
+ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span, compilerOptions, host, typeChecker) {
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths;
var result;
if (baseUrl) {
var fileExtensions = ts.getSupportedExtensions(compilerOptions);
var projectDir = compilerOptions.project || host.getCurrentDirectory();
var absolute = ts.isRootedDiskPath(baseUrl) ? baseUrl : ts.combinePaths(projectDir, baseUrl);
- result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, false, span);
+ result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, false, span, host);
if (paths) {
for (var path in paths) {
if (paths.hasOwnProperty(path)) {
@@ -54644,7 +59893,7 @@ var ts;
if (paths[path]) {
for (var _i = 0, _a = paths[path]; _i < _a.length; _i++) {
var pattern = _a[_i];
- for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions); _b < _c.length; _b++) {
+ for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host); _b < _c.length; _b++) {
var match = _c[_b];
result.push(createCompletionEntryForModule(match, ts.ScriptElementKind.externalModuleName, span));
}
@@ -54665,13 +59914,13 @@ var ts;
result = [];
}
getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, span, result);
- for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions); _d < _e.length; _d++) {
+ for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions, typeChecker, host); _d < _e.length; _d++) {
var moduleName = _e[_d];
result.push(createCompletionEntryForModule(moduleName, ts.ScriptElementKind.externalModuleName, span));
}
return result;
}
- function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions) {
+ function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host) {
if (host.readDirectory) {
var parsed = ts.hasZeroOrOneAsteriskCharacter(pattern) ? ts.tryParsePattern(pattern) : undefined;
if (parsed) {
@@ -54694,8 +59943,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_5 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_5)));
+ var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
}
return result;
}
@@ -54703,7 +59952,7 @@ var ts;
}
return undefined;
}
- function enumeratePotentialNonRelativeModules(fragment, scriptPath, options) {
+ function enumeratePotentialNonRelativeModules(fragment, scriptPath, options, typeChecker, host) {
var isNestedModule = fragment.indexOf(ts.directorySeparator) !== -1;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
var ambientModules = ts.map(typeChecker.getAmbientModules(), function (sym) { return ts.stripQuotes(sym.name); });
@@ -54738,7 +59987,7 @@ var ts;
}
return ts.deduplicate(nonRelativeModules);
}
- function getTripleSlashReferenceCompletion(sourceFile, position) {
+ function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
var token = ts.getTokenAtPosition(sourceFile, position);
if (!token) {
return undefined;
@@ -54766,7 +60015,7 @@ var ts;
var scriptPath = ts.getDirectoryPath(sourceFile.path);
if (kind === "path") {
var span_10 = getDirectoryFragmentTextSpan(toComplete, range.pos + prefix.length);
- completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), true, span_10, sourceFile.path);
+ completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), true, span_10, host, sourceFile.path);
}
else {
var span_11 = { start: range.pos + prefix.length, length: match[0].length - prefix.length };
@@ -54775,6 +60024,7 @@ var ts;
}
return completionInfo;
}
+ PathCompletions.getTripleSlashReferenceCompletion = getTripleSlashReferenceCompletion;
function getCompletionEntriesFromTypings(host, options, scriptPath, span, result) {
if (result === void 0) { result = []; }
if (options.types) {
@@ -54797,7 +60047,7 @@ var ts;
}
}
if (host.getDirectories) {
- for (var _c = 0, _d = findPackageJsons(scriptPath); _c < _d.length; _c++) {
+ for (var _c = 0, _d = findPackageJsons(scriptPath, host); _c < _d.length; _c++) {
var packageJson = _d[_c];
var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types");
getCompletionEntriesFromDirectories(host, typesDir, span, result);
@@ -54817,7 +60067,7 @@ var ts;
}
}
}
- function findPackageJsons(currentDir) {
+ function findPackageJsons(currentDir, host) {
var paths = [];
var currentConfigPath;
while (true) {
@@ -54825,11 +60075,11 @@ var ts;
if (currentConfigPath) {
paths.push(currentConfigPath);
currentDir = ts.getDirectoryPath(currentConfigPath);
- var parent_13 = ts.getDirectoryPath(currentDir);
- if (currentDir === parent_13) {
+ var parent = ts.getDirectoryPath(currentDir);
+ if (currentDir === parent) {
break;
}
- currentDir = parent_13;
+ currentDir = parent;
}
else {
break;
@@ -54840,7 +60090,7 @@ var ts;
function enumerateNodeModulesVisibleToScript(host, scriptPath) {
var result = [];
if (host.readFile && host.fileExists) {
- for (var _i = 0, _a = findPackageJsons(scriptPath); _i < _a.length; _i++) {
+ for (var _i = 0, _a = findPackageJsons(scriptPath, host); _i < _a.length; _i++) {
var packageJson = _a[_i];
var contents = tryReadingPackageJson(packageJson);
if (!contents) {
@@ -54901,21 +60151,256 @@ var ts;
function normalizeAndPreserveTrailingSlash(path) {
return ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(ts.normalizePath(path)) : ts.normalizePath(path);
}
+ var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
+ var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
+ function tryGetDirectories(host, directoryName) {
+ return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
+ }
+ function tryReadDirectory(host, path, extensions, exclude, include) {
+ return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
+ }
+ function tryReadFile(host, path) {
+ return tryIOAndConsumeErrors(host, host.readFile, path);
+ }
+ function tryFileExists(host, path) {
+ return tryIOAndConsumeErrors(host, host.fileExists, path);
+ }
+ function tryDirectoryExists(host, path) {
+ try {
+ return ts.directoryProbablyExists(path, host);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ function tryIOAndConsumeErrors(host, toApply) {
+ var args = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ args[_i - 2] = arguments[_i];
+ }
+ try {
+ return toApply && toApply.apply(host, args);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ })(PathCompletions = Completions.PathCompletions || (Completions.PathCompletions = {}));
+ })(Completions = ts.Completions || (ts.Completions = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var Completions;
+ (function (Completions) {
+ function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
+ if (ts.isInReferenceComment(sourceFile, position)) {
+ return Completions.PathCompletions.getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host);
+ }
+ if (ts.isInString(sourceFile, position)) {
+ return getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log);
+ }
+ var completionData = getCompletionData(typeChecker, log, sourceFile, position);
+ if (!completionData) {
+ return undefined;
+ }
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, requestJsDocTagName = completionData.requestJsDocTagName, requestJsDocTag = completionData.requestJsDocTag;
+ if (requestJsDocTagName) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagNameCompletions() };
+ }
+ if (requestJsDocTag) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ }
+ var entries = [];
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
+ ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames, compilerOptions.target));
+ }
+ else {
+ if (!symbols || symbols.length === 0) {
+ if (sourceFile.languageVariant === 1 &&
+ location.parent && location.parent.kind === 251) {
+ var tagName = location.parent.parent.openingElement.tagName;
+ entries.push({
+ name: tagName.text,
+ kind: undefined,
+ kindModifiers: undefined,
+ sortText: "0",
+ });
+ }
+ else {
+ return undefined;
+ }
+ }
+ getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
+ }
+ if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ ts.addRange(entries, keywordCompletions);
+ }
+ return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
}
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
+ function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames, target) {
+ var entries = [];
+ var nameTable = ts.getNameTable(sourceFile);
+ nameTable.forEach(function (pos, name) {
+ if (pos === position) {
+ return;
+ }
+ if (!uniqueNames.get(name)) {
+ uniqueNames.set(name, name);
+ var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name), target, true);
+ if (displayName) {
+ var entry = {
+ name: displayName,
+ kind: ts.ScriptElementKind.warning,
+ kindModifiers: "",
+ sortText: "1"
+ };
+ entries.push(entry);
+ }
+ }
+ });
+ return entries;
+ }
+ function createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target) {
+ var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location);
+ if (!displayName) {
+ return undefined;
+ }
+ return {
+ name: displayName,
+ kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
+ kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
+ sortText: "0",
+ };
+ }
+ function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks, typeChecker, target, log) {
+ var start = ts.timestamp();
+ var uniqueNames = ts.createMap();
+ if (symbols) {
+ for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
+ var symbol = symbols_4[_i];
+ var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
+ if (entry) {
+ var id = ts.escapeIdentifier(entry.name);
+ if (!uniqueNames.get(id)) {
+ entries.push(entry);
+ uniqueNames.set(id, id);
+ }
+ }
+ }
+ }
+ log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
+ return uniqueNames;
+ }
+ function getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log) {
+ var node = ts.findPrecedingToken(position, sourceFile);
+ if (!node || node.kind !== 9) {
+ return undefined;
+ }
+ if (node.parent.kind === 260 &&
+ node.parent.parent.kind === 177 &&
+ node.parent.name === node) {
+ return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
+ return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (node.parent.kind === 237 || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
+ return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker);
+ }
+ else if (isEqualityExpression(node.parent)) {
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.left === node ? node.parent.right : node.parent.left), typeChecker);
+ }
+ else if (ts.isCaseOrDefaultClause(node.parent)) {
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.parent.parent.expression), typeChecker);
+ }
+ else {
+ var argumentInfo = ts.SignatureHelp.getImmediatelyContainingArgumentInfo(node, position, sourceFile);
+ if (argumentInfo) {
+ return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker);
+ }
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getContextualType(node), typeChecker);
+ }
+ }
+ function getStringLiteralCompletionEntriesFromPropertyAssignment(element, typeChecker, target, log) {
+ var type = typeChecker.getContextualType(element.parent);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ }
+ function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
+ var candidates = [];
+ var entries = [];
+ typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
+ for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
+ var candidate = candidates_3[_i];
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker);
+ }
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromElementAccess(node, typeChecker, target, log) {
+ var type = typeChecker.getTypeAtLocation(node.expression);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromType(type, typeChecker) {
+ if (type) {
+ var entries = [];
+ addStringLiteralCompletionsFromType(type, entries, typeChecker);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ if (type && type.flags & 16384) {
+ type = typeChecker.getApparentType(type);
+ }
+ if (!type) {
+ return;
+ }
+ if (type.flags & 65536) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ addStringLiteralCompletionsFromType(t, result, typeChecker);
+ }
+ }
+ else if (type.flags & 32) {
+ result.push({
+ name: type.text,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
+ }
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_3 = completionData.location;
- var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_3) === entryName ? s : undefined; });
+ var symbols = completionData.symbols, location_1 = completionData.location;
+ var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_1) === entryName ? s : undefined; });
if (symbol) {
- var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_3, location_3, 7), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind;
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_1, location_1, 7), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind, tags = _a.tags;
return {
name: entryName,
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
kind: symbolKind,
displayParts: displayParts,
- documentation: documentation
+ documentation: documentation,
+ tags: tags
};
}
}
@@ -54926,7 +60411,8 @@ var ts;
kind: ts.ScriptElementKind.keyword,
kindModifiers: ts.ScriptElementKindModifier.none,
displayParts: [ts.displayPart(entryName, ts.SymbolDisplayPartKind.keyword)],
- documentation: undefined
+ documentation: undefined,
+ tags: undefined
};
}
return undefined;
@@ -54935,15 +60421,16 @@ var ts;
function getCompletionEntrySymbol(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_4 = completionData.location;
- return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_4) === entryName ? s : undefined; });
+ var symbols = completionData.symbols, location_2 = completionData.location;
+ return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, false, location_2) === entryName ? s : undefined; });
}
return undefined;
}
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var isJsDocTagName = false;
+ var requestJsDocTagName = false;
+ var requestJsDocTag = false;
var start = ts.timestamp();
var currentToken = ts.getTokenAtPosition(sourceFile, position);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
@@ -54951,19 +60438,25 @@ var ts;
var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
if (insideComment) {
- if (ts.hasDocComment(sourceFile, position) && sourceFile.text.charCodeAt(position - 1) === 64) {
- isJsDocTagName = true;
+ if (ts.hasDocComment(sourceFile, position)) {
+ if (sourceFile.text.charCodeAt(position - 1) === 64) {
+ requestJsDocTagName = true;
+ }
+ else {
+ var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
+ requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ }
}
var insideJsDocTagExpression = false;
var tag = ts.getJsDocTagAtPosition(sourceFile, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- isJsDocTagName = true;
+ requestJsDocTagName = true;
}
switch (tag.kind) {
- case 283:
- case 281:
- case 282:
+ case 287:
+ case 285:
+ case 286:
var tagWithExpression = tag;
if (tagWithExpression.typeExpression) {
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
@@ -54971,8 +60464,8 @@ var ts;
break;
}
}
- if (isJsDocTagName) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, isJsDocTagName: isJsDocTagName };
+ if (requestJsDocTagName || requestJsDocTag) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
}
if (!insideJsDocTagExpression) {
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
@@ -54998,13 +60491,13 @@ var ts;
log("Returning an empty list because completion was requested in an invalid position.");
return undefined;
}
- var parent_14 = contextToken.parent, kind = contextToken.kind;
- if (kind === 22) {
- if (parent_14.kind === 177) {
+ var parent = contextToken.parent;
+ if (contextToken.kind === 22) {
+ if (parent.kind === 178) {
node = contextToken.parent.expression;
isRightOfDot = true;
}
- else if (parent_14.kind === 141) {
+ else if (parent.kind === 142) {
node = contextToken.parent.left;
isRightOfDot = true;
}
@@ -55013,13 +60506,29 @@ var ts;
}
}
else if (sourceFile.languageVariant === 1) {
- if (kind === 26) {
- isRightOfOpenTag = true;
- location = contextToken;
+ if (parent && parent.kind === 178) {
+ contextToken = parent;
+ parent = parent.parent;
}
- else if (kind === 40 && contextToken.parent.kind === 249) {
- isStartingCloseTag = true;
- location = contextToken;
+ switch (parent.kind) {
+ case 251:
+ if (contextToken.kind === 40) {
+ isStartingCloseTag = true;
+ location = contextToken;
+ }
+ break;
+ case 193:
+ if (!(parent.left.flags & 32768)) {
+ break;
+ }
+ case 249:
+ case 248:
+ case 250:
+ if (contextToken.kind === 26) {
+ isRightOfOpenTag = true;
+ location = contextToken;
+ }
+ break;
}
}
}
@@ -55057,12 +60566,12 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), isJsDocTagName: isJsDocTagName };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
function getTypeScriptMemberSymbols() {
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
- if (node.kind === 70 || node.kind === 141 || node.kind === 177) {
+ if (node.kind === 70 || node.kind === 142 || node.kind === 178) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol && symbol.flags & 8388608) {
symbol = typeChecker.getAliasedSymbol(symbol);
@@ -55108,10 +60617,10 @@ var ts;
}
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
- if ((jsxContainer.kind === 247) || (jsxContainer.kind === 248)) {
- attrsType = typeChecker.getJsxElementAttributesType(jsxContainer);
+ if ((jsxContainer.kind === 249) || (jsxContainer.kind === 250)) {
+ attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer);
if (attrsType) {
- symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes);
+ symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties);
isMemberCompletion = true;
isNewIdentifierLocation = false;
return true;
@@ -55129,9 +60638,9 @@ var ts;
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
if (scopeNode) {
isGlobalCompletion =
- scopeNode.kind === 261 ||
- scopeNode.kind === 194 ||
- scopeNode.kind === 252 ||
+ scopeNode.kind === 264 ||
+ scopeNode.kind === 195 ||
+ scopeNode.kind === 255 ||
ts.isStatement(scopeNode);
}
var symbolMeanings = 793064 | 107455 | 1920 | 8388608;
@@ -55159,11 +60668,11 @@ var ts;
return true;
}
if (contextToken.kind === 28 && contextToken.parent) {
- if (contextToken.parent.kind === 248) {
+ if (contextToken.parent.kind === 250) {
return true;
}
- if (contextToken.parent.kind === 249 || contextToken.parent.kind === 247) {
- return contextToken.parent.parent && contextToken.parent.parent.kind === 246;
+ if (contextToken.parent.kind === 251 || contextToken.parent.kind === 249) {
+ return contextToken.parent.parent && contextToken.parent.parent.kind === 248;
}
}
return false;
@@ -55173,40 +60682,40 @@ var ts;
var containingNodeKind = previousToken.parent.kind;
switch (previousToken.kind) {
case 25:
- return containingNodeKind === 179
- || containingNodeKind === 150
- || containingNodeKind === 180
- || containingNodeKind === 175
- || containingNodeKind === 192
- || containingNodeKind === 158;
+ return containingNodeKind === 180
+ || containingNodeKind === 151
+ || containingNodeKind === 181
+ || containingNodeKind === 176
+ || containingNodeKind === 193
+ || containingNodeKind === 159;
case 18:
- return containingNodeKind === 179
- || containingNodeKind === 150
- || containingNodeKind === 180
- || containingNodeKind === 183
- || containingNodeKind === 166;
+ return containingNodeKind === 180
+ || containingNodeKind === 151
+ || containingNodeKind === 181
+ || containingNodeKind === 184
+ || containingNodeKind === 167;
case 20:
- return containingNodeKind === 175
- || containingNodeKind === 155
- || containingNodeKind === 142;
+ return containingNodeKind === 176
+ || containingNodeKind === 156
+ || containingNodeKind === 143;
case 127:
case 128:
return true;
case 22:
- return containingNodeKind === 230;
+ return containingNodeKind === 232;
case 16:
- return containingNodeKind === 226;
+ return containingNodeKind === 228;
case 57:
- return containingNodeKind === 223
- || containingNodeKind === 192;
+ return containingNodeKind === 225
+ || containingNodeKind === 193;
case 13:
- return containingNodeKind === 194;
+ return containingNodeKind === 195;
case 14:
- return containingNodeKind === 202;
+ return containingNodeKind === 204;
case 113:
case 111:
case 112:
- return containingNodeKind === 147;
+ return containingNodeKind === 148;
}
switch (previousToken.getText()) {
case "public":
@@ -55237,22 +60746,22 @@ var ts;
isMemberCompletion = true;
var typeForObject;
var existingMembers;
- if (objectLikeContainer.kind === 176) {
+ if (objectLikeContainer.kind === 177) {
isNewIdentifierLocation = true;
typeForObject = typeChecker.getContextualType(objectLikeContainer);
typeForObject = typeForObject && typeForObject.getNonNullableType();
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 172) {
+ else if (objectLikeContainer.kind === 173) {
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
if (ts.isVariableLike(rootDeclaration)) {
var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 144) {
+ if (!canGetType && rootDeclaration.kind === 145) {
if (ts.isExpression(rootDeclaration.parent)) {
canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- else if (rootDeclaration.parent.kind === 149 || rootDeclaration.parent.kind === 152) {
+ else if (rootDeclaration.parent.kind === 150 || rootDeclaration.parent.kind === 153) {
canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
@@ -55278,9 +60787,9 @@ var ts;
return true;
}
function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) {
- var declarationKind = namedImportsOrExports.kind === 238 ?
- 235 :
- 241;
+ var declarationKind = namedImportsOrExports.kind === 240 ?
+ 237 :
+ 243;
var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind);
var moduleSpecifier = importOrExportDeclaration.moduleSpecifier;
if (!moduleSpecifier) {
@@ -55288,12 +60797,13 @@ var ts;
}
isMemberCompletion = true;
isNewIdentifierLocation = false;
- var exports;
- var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importOrExportDeclaration.moduleSpecifier);
- if (moduleSpecifierSymbol) {
- exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol);
+ var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);
+ if (!moduleSpecifierSymbol) {
+ symbols = ts.emptyArray;
+ return true;
}
- symbols = exports ? filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements) : ts.emptyArray;
+ var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
+ symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
function tryGetObjectLikeCompletionContainer(contextToken) {
@@ -55301,9 +60811,9 @@ var ts;
switch (contextToken.kind) {
case 16:
case 25:
- var parent_15 = contextToken.parent;
- if (parent_15 && (parent_15.kind === 176 || parent_15.kind === 172)) {
- return parent_15;
+ var parent = contextToken.parent;
+ if (parent && (parent.kind === 177 || parent.kind === 173)) {
+ return parent;
}
break;
}
@@ -55316,8 +60826,8 @@ var ts;
case 16:
case 25:
switch (contextToken.parent.kind) {
- case 238:
- case 242:
+ case 240:
+ case 244:
return contextToken.parent;
}
}
@@ -55326,34 +60836,35 @@ var ts;
}
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
- var parent_16 = contextToken.parent;
+ var parent = contextToken.parent;
switch (contextToken.kind) {
case 27:
case 40:
case 70:
- case 250:
- case 251:
- if (parent_16 && (parent_16.kind === 247 || parent_16.kind === 248)) {
- return parent_16;
+ case 178:
+ case 253:
+ case 252:
+ case 254:
+ if (parent && (parent.kind === 249 || parent.kind === 250)) {
+ return parent;
}
- else if (parent_16.kind === 250) {
- return parent_16.parent;
+ else if (parent.kind === 252) {
+ return parent.parent.parent;
}
break;
case 9:
- if (parent_16 && ((parent_16.kind === 250) || (parent_16.kind === 251))) {
- return parent_16.parent;
+ if (parent && ((parent.kind === 252) || (parent.kind === 254))) {
+ return parent.parent.parent;
}
break;
case 17:
- if (parent_16 &&
- parent_16.kind === 252 &&
- parent_16.parent &&
- (parent_16.parent.kind === 250)) {
- return parent_16.parent.parent;
+ if (parent &&
+ parent.kind === 255 &&
+ parent.parent && parent.parent.kind === 252) {
+ return parent.parent.parent.parent;
}
- if (parent_16 && parent_16.kind === 251) {
- return parent_16.parent;
+ if (parent && parent.kind === 254) {
+ return parent.parent.parent;
}
break;
}
@@ -55361,85 +60872,82 @@ var ts;
return undefined;
}
function isFunction(kind) {
+ if (!ts.isFunctionLikeKind(kind)) {
+ return false;
+ }
switch (kind) {
- case 184:
- case 185:
- case 225:
- case 149:
- case 148:
case 151:
- case 152:
- case 153:
- case 154:
- case 155:
+ case 160:
+ case 159:
+ return false;
+ default:
return true;
}
- return false;
}
function isSolelyIdentifierDefinitionLocation(contextToken) {
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
case 25:
- return containingNodeKind === 223 ||
- containingNodeKind === 224 ||
- containingNodeKind === 205 ||
- containingNodeKind === 229 ||
- isFunction(containingNodeKind) ||
+ return containingNodeKind === 225 ||
containingNodeKind === 226 ||
- containingNodeKind === 197 ||
- containingNodeKind === 227 ||
- containingNodeKind === 173 ||
- containingNodeKind === 228;
+ containingNodeKind === 207 ||
+ containingNodeKind === 231 ||
+ isFunction(containingNodeKind) ||
+ containingNodeKind === 228 ||
+ containingNodeKind === 198 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 174 ||
+ containingNodeKind === 230;
case 22:
- return containingNodeKind === 173;
- case 55:
return containingNodeKind === 174;
+ case 55:
+ return containingNodeKind === 175;
case 20:
- return containingNodeKind === 173;
+ return containingNodeKind === 174;
case 18:
- return containingNodeKind === 256 ||
+ return containingNodeKind === 259 ||
isFunction(containingNodeKind);
case 16:
- return containingNodeKind === 229 ||
- containingNodeKind === 227 ||
- containingNodeKind === 161;
+ return containingNodeKind === 231 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 162;
case 24:
- return containingNodeKind === 146 &&
+ return containingNodeKind === 147 &&
contextToken.parent && contextToken.parent.parent &&
- (contextToken.parent.parent.kind === 227 ||
- contextToken.parent.parent.kind === 161);
+ (contextToken.parent.parent.kind === 229 ||
+ contextToken.parent.parent.kind === 162);
case 26:
- return containingNodeKind === 226 ||
- containingNodeKind === 197 ||
- containingNodeKind === 227 ||
- containingNodeKind === 228 ||
+ return containingNodeKind === 228 ||
+ containingNodeKind === 198 ||
+ containingNodeKind === 229 ||
+ containingNodeKind === 230 ||
isFunction(containingNodeKind);
case 114:
- return containingNodeKind === 147;
+ return containingNodeKind === 148;
case 23:
- return containingNodeKind === 144 ||
+ return containingNodeKind === 145 ||
(contextToken.parent && contextToken.parent.parent &&
- contextToken.parent.parent.kind === 173);
+ contextToken.parent.parent.kind === 174);
case 113:
case 111:
case 112:
- return containingNodeKind === 144;
+ return containingNodeKind === 145;
case 117:
- return containingNodeKind === 239 ||
- containingNodeKind === 243 ||
- containingNodeKind === 237;
+ return containingNodeKind === 241 ||
+ containingNodeKind === 245 ||
+ containingNodeKind === 239;
case 74:
case 82:
case 108:
case 88:
case 103:
case 124:
- case 133:
+ case 134:
case 90:
case 109:
case 75:
case 115:
- case 136:
+ case 137:
return true;
}
switch (contextToken.getText()) {
@@ -55476,13 +60984,13 @@ var ts;
if (element.getStart() <= position && position <= element.getEnd()) {
continue;
}
- var name_45 = element.propertyName || element.name;
- existingImportsOrExports[name_45.text] = true;
+ var name = element.propertyName || element.name;
+ existingImportsOrExports.set(name.text, true);
}
- if (!ts.someProperties(existingImportsOrExports)) {
+ if (existingImportsOrExports.size === 0) {
return ts.filter(exportsOfModule, function (e) { return e.name !== "default"; });
}
- return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports[e.name]; });
+ return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports.get(e.name); });
}
function filterObjectMembersList(contextualMemberSymbols, existingMembers) {
if (!existingMembers || existingMembers.length === 0) {
@@ -55491,19 +60999,19 @@ var ts;
var existingMemberNames = ts.createMap();
for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) {
var m = existingMembers_1[_i];
- if (m.kind !== 257 &&
- m.kind !== 258 &&
- m.kind !== 174 &&
- m.kind !== 149 &&
- m.kind !== 151 &&
- m.kind !== 152) {
+ if (m.kind !== 260 &&
+ m.kind !== 261 &&
+ m.kind !== 175 &&
+ m.kind !== 150 &&
+ m.kind !== 152 &&
+ m.kind !== 153) {
continue;
}
if (m.getStart() <= position && position <= m.getEnd()) {
continue;
}
var existingName = void 0;
- if (m.kind === 174 && m.propertyName) {
+ if (m.kind === 175 && m.propertyName) {
if (m.propertyName.kind === 70) {
existingName = m.propertyName.text;
}
@@ -55511,9 +61019,9 @@ var ts;
else {
existingName = m.name.text;
}
- existingMemberNames[existingName] = true;
+ existingMemberNames.set(existingName, true);
}
- return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames[m.name]; });
+ return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
function filterJsxAttributes(symbols, attributes) {
var seenNames = ts.createMap();
@@ -55522,11 +61030,11 @@ var ts;
if (attr.getStart() <= position && position <= attr.getEnd()) {
continue;
}
- if (attr.kind === 250) {
- seenNames[attr.name.text] = true;
+ if (attr.kind === 252) {
+ seenNames.set(attr.name.text, true);
}
}
- return ts.filter(symbols, function (a) { return !seenNames[a.name]; });
+ return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
}
function getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location) {
@@ -55555,7 +61063,7 @@ var ts;
return name;
}
var keywordCompletions = [];
- for (var i = 71; i <= 140; i++) {
+ for (var i = 71; i <= 141; i++) {
keywordCompletions.push({
name: ts.tokenToString(i),
kind: ts.ScriptElementKind.keyword,
@@ -55563,37 +61071,14 @@ var ts;
sortText: "0"
});
}
- var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
- var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
- function tryGetDirectories(host, directoryName) {
- return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
+ function isEqualityExpression(node) {
+ return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
- function tryReadDirectory(host, path, extensions, exclude, include) {
- return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
- }
- function tryReadFile(host, path) {
- return tryIOAndConsumeErrors(host, host.readFile, path);
- }
- function tryFileExists(host, path) {
- return tryIOAndConsumeErrors(host, host.fileExists, path);
- }
- function tryDirectoryExists(host, path) {
- try {
- return ts.directoryProbablyExists(path, host);
- }
- catch (e) { }
- return undefined;
- }
- function tryIOAndConsumeErrors(host, toApply) {
- var args = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- args[_i - 2] = arguments[_i];
- }
- try {
- return toApply && toApply.apply(host, args);
- }
- catch (e) { }
- return undefined;
+ function isEqualityOperatorKind(kind) {
+ return kind === 31 ||
+ kind === 32 ||
+ kind === 33 ||
+ kind === 34;
}
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
@@ -55603,495 +61088,474 @@ var ts;
(function (DocumentHighlights) {
function getDocumentHighlights(typeChecker, cancellationToken, sourceFile, position, sourceFilesToSearch) {
var node = ts.getTouchingWord(sourceFile, position);
+ return node && (getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile));
+ }
+ DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
+ function getHighlightSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var end = node.getEnd();
+ return {
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(start, end),
+ kind: ts.HighlightSpanKind.none
+ };
+ }
+ function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ return referenceEntries && convertReferencedSymbols(referenceEntries);
+ }
+ function convertReferencedSymbols(referenceEntries) {
+ var fileNameToDocumentHighlights = ts.createMap();
+ for (var _i = 0, referenceEntries_1 = referenceEntries; _i < referenceEntries_1.length; _i++) {
+ var entry = referenceEntries_1[_i];
+ var _a = ts.FindAllReferences.toHighlightSpan(entry), fileName = _a.fileName, span_12 = _a.span;
+ var highlightSpans = fileNameToDocumentHighlights.get(fileName);
+ if (!highlightSpans) {
+ fileNameToDocumentHighlights.set(fileName, highlightSpans = []);
+ }
+ highlightSpans.push(span_12);
+ }
+ return ts.arrayFrom(fileNameToDocumentHighlights.entries(), function (_a) {
+ var fileName = _a[0], highlightSpans = _a[1];
+ return ({ fileName: fileName, highlightSpans: highlightSpans });
+ });
+ }
+ function getSyntacticDocumentHighlights(node, sourceFile) {
+ var highlightSpans = getHighlightSpans(node, sourceFile);
+ if (!highlightSpans || highlightSpans.length === 0) {
+ return undefined;
+ }
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ function hasKind(node, kind) {
+ return node !== undefined && node.kind === kind;
+ }
+ function parent(node) {
+ return node && node.parent;
+ }
+ function getHighlightSpans(node, sourceFile) {
if (!node) {
return undefined;
}
- return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node);
- function getHighlightSpanForNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- return {
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- kind: ts.HighlightSpanKind.none
- };
+ switch (node.kind) {
+ case 89:
+ case 81:
+ if (hasKind(node.parent, 210)) {
+ return getIfElseOccurrences(node.parent, sourceFile);
+ }
+ break;
+ case 95:
+ if (hasKind(node.parent, 218)) {
+ return highlightSpans(getReturnOccurrences(node.parent));
+ }
+ break;
+ case 99:
+ if (hasKind(node.parent, 222)) {
+ return highlightSpans(getThrowOccurrences(node.parent));
+ }
+ break;
+ case 101:
+ case 73:
+ case 86:
+ var tryStatement = node.kind === 73 ? parent(parent(node)) : parent(node);
+ if (hasKind(tryStatement, 223)) {
+ return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile));
+ }
+ break;
+ case 97:
+ if (hasKind(node.parent, 220)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent));
+ }
+ break;
+ case 72:
+ case 78:
+ if (hasKind(parent(parent(parent(node))), 220)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent));
+ }
+ break;
+ case 71:
+ case 76:
+ if (hasKind(node.parent, 217) || hasKind(node.parent, 216)) {
+ return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent));
+ }
+ break;
+ case 87:
+ if (hasKind(node.parent, 213) ||
+ hasKind(node.parent, 214) ||
+ hasKind(node.parent, 215)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 105:
+ case 80:
+ if (hasKind(node.parent, 212) || hasKind(node.parent, 211)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 122:
+ if (hasKind(node.parent, 151)) {
+ return highlightSpans(getConstructorOccurrences(node.parent));
+ }
+ break;
+ case 124:
+ case 134:
+ if (hasKind(node.parent, 152) || hasKind(node.parent, 153)) {
+ return highlightSpans(getGetAndSetOccurrences(node.parent));
+ }
+ break;
+ default:
+ if (ts.isModifierKind(node.kind) && node.parent &&
+ (ts.isDeclaration(node.parent) || node.parent.kind === 207)) {
+ return highlightSpans(getModifierOccurrences(node.kind, node.parent));
+ }
}
- function getSemanticDocumentHighlights(node) {
- if (node.kind === 70 ||
- node.kind === 98 ||
- node.kind === 167 ||
- node.kind === 96 ||
- node.kind === 9 ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFilesToSearch, false, false, false);
- return convertReferencedSymbols(referencedSymbols);
+ function highlightSpans(nodes) {
+ return nodes && nodes.map(function (node) { return getHighlightSpanForNode(node, sourceFile); });
+ }
+ }
+ function aggregateOwnedThrowStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 222) {
+ statementAccumulator.push(node);
}
- return undefined;
- function convertReferencedSymbols(referencedSymbols) {
- if (!referencedSymbols) {
- return undefined;
+ else if (node.kind === 223) {
+ var tryStatement = node;
+ if (tryStatement.catchClause) {
+ aggregate(tryStatement.catchClause);
}
- var fileNameToDocumentHighlights = ts.createMap();
- var result = [];
- for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
- var referencedSymbol = referencedSymbols_1[_i];
- for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
- var referenceEntry = _b[_a];
- var fileName = referenceEntry.fileName;
- var documentHighlights = fileNameToDocumentHighlights[fileName];
- if (!documentHighlights) {
- documentHighlights = { fileName: fileName, highlightSpans: [] };
- fileNameToDocumentHighlights[fileName] = documentHighlights;
- result.push(documentHighlights);
- }
- documentHighlights.highlightSpans.push({
- textSpan: referenceEntry.textSpan,
- kind: referenceEntry.isWriteAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference
- });
- }
+ else {
+ aggregate(tryStatement.tryBlock);
}
- return result;
+ if (tryStatement.finallyBlock) {
+ aggregate(tryStatement.finallyBlock);
+ }
+ }
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
}
- function getSyntacticDocumentHighlights(node) {
- var fileName = sourceFile.fileName;
- var highlightSpans = getHighlightSpans(node);
- if (!highlightSpans || highlightSpans.length === 0) {
- return undefined;
+ }
+ function getThrowStatementOwner(throwStatement) {
+ var child = throwStatement;
+ while (child.parent) {
+ var parent_2 = child.parent;
+ if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264) {
+ return parent_2;
}
- return [{ fileName: fileName, highlightSpans: highlightSpans }];
- function hasKind(node, kind) {
- return node !== undefined && node.kind === kind;
+ if (parent_2.kind === 223) {
+ var tryStatement = parent_2;
+ if (tryStatement.tryBlock === child && tryStatement.catchClause) {
+ return child;
+ }
}
- function parent(node) {
- return node && node.parent;
+ child = parent_2;
+ }
+ return undefined;
+ }
+ function aggregateAllBreakAndContinueStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 217 || node.kind === 216) {
+ statementAccumulator.push(node);
}
- function getHighlightSpans(node) {
- if (node) {
- switch (node.kind) {
- case 89:
- case 81:
- if (hasKind(node.parent, 208)) {
- return getIfElseOccurrences(node.parent);
- }
- break;
- case 95:
- if (hasKind(node.parent, 216)) {
- return getReturnOccurrences(node.parent);
- }
- break;
- case 99:
- if (hasKind(node.parent, 220)) {
- return getThrowOccurrences(node.parent);
- }
- break;
- case 73:
- if (hasKind(parent(parent(node)), 221)) {
- return getTryCatchFinallyOccurrences(node.parent.parent);
- }
- break;
- case 101:
- case 86:
- if (hasKind(parent(node), 221)) {
- return getTryCatchFinallyOccurrences(node.parent);
- }
- break;
- case 97:
- if (hasKind(node.parent, 218)) {
- return getSwitchCaseDefaultOccurrences(node.parent);
- }
- break;
- case 72:
- case 78:
- if (hasKind(parent(parent(parent(node))), 218)) {
- return getSwitchCaseDefaultOccurrences(node.parent.parent.parent);
- }
- break;
- case 71:
- case 76:
- if (hasKind(node.parent, 215) || hasKind(node.parent, 214)) {
- return getBreakOrContinueStatementOccurrences(node.parent);
- }
- break;
- case 87:
- if (hasKind(node.parent, 211) ||
- hasKind(node.parent, 212) ||
- hasKind(node.parent, 213)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 105:
- case 80:
- if (hasKind(node.parent, 210) || hasKind(node.parent, 209)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 122:
- if (hasKind(node.parent, 150)) {
- return getConstructorOccurrences(node.parent);
- }
- break;
- case 124:
- case 133:
- if (hasKind(node.parent, 151) || hasKind(node.parent, 152)) {
- return getGetAndSetOccurrences(node.parent);
- }
- break;
- default:
- if (ts.isModifierKind(node.kind) && node.parent &&
- (ts.isDeclaration(node.parent) || node.parent.kind === 205)) {
- return getModifierOccurrences(node.kind, node.parent);
- }
- }
- }
- return undefined;
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
- function aggregateOwnedThrowStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 220) {
- statementAccumulator.push(node);
- }
- else if (node.kind === 221) {
- var tryStatement = node;
- if (tryStatement.catchClause) {
- aggregate(tryStatement.catchClause);
- }
- else {
- aggregate(tryStatement.tryBlock);
- }
- if (tryStatement.finallyBlock) {
- aggregate(tryStatement.finallyBlock);
- }
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
+ }
+ }
+ function ownsBreakOrContinueStatement(owner, statement) {
+ var actualOwner = getBreakOrContinueOwner(statement);
+ return actualOwner && actualOwner === owner;
+ }
+ function getBreakOrContinueOwner(statement) {
+ for (var node = statement.parent; node; node = node.parent) {
+ switch (node.kind) {
+ case 220:
+ if (statement.kind === 216) {
+ continue;
}
- }
- }
- function getThrowStatementOwner(throwStatement) {
- var child = throwStatement;
- while (child.parent) {
- var parent_17 = child.parent;
- if (ts.isFunctionBlock(parent_17) || parent_17.kind === 261) {
- return parent_17;
+ case 213:
+ case 214:
+ case 215:
+ case 212:
+ case 211:
+ if (!statement.label || isLabeledBy(node, statement.label.text)) {
+ return node;
}
- if (parent_17.kind === 221) {
- var tryStatement = parent_17;
- if (tryStatement.tryBlock === child && tryStatement.catchClause) {
- return child;
- }
+ break;
+ default:
+ if (ts.isFunctionLike(node)) {
+ return undefined;
}
- child = parent_17;
- }
+ break;
+ }
+ }
+ return undefined;
+ }
+ function getModifierOccurrences(modifier, declaration) {
+ var container = declaration.parent;
+ if (ts.isAccessibilityModifier(modifier)) {
+ if (!(container.kind === 228 ||
+ container.kind === 198 ||
+ (declaration.kind === 145 && hasKind(container, 151)))) {
return undefined;
}
- function aggregateAllBreakAndContinueStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 215 || node.kind === 214) {
- statementAccumulator.push(node);
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
- }
- }
+ }
+ else if (modifier === 114) {
+ if (!(container.kind === 228 || container.kind === 198)) {
+ return undefined;
}
- function ownsBreakOrContinueStatement(owner, statement) {
- var actualOwner = getBreakOrContinueOwner(statement);
- return actualOwner && actualOwner === owner;
+ }
+ else if (modifier === 83 || modifier === 123) {
+ if (!(container.kind === 233 || container.kind === 264)) {
+ return undefined;
}
- function getBreakOrContinueOwner(statement) {
- for (var node_1 = statement.parent; node_1; node_1 = node_1.parent) {
- switch (node_1.kind) {
- case 218:
- if (statement.kind === 214) {
- continue;
- }
- case 211:
- case 212:
- case 213:
- case 210:
- case 209:
- if (!statement.label || isLabeledBy(node_1, statement.label.text)) {
- return node_1;
- }
- break;
- default:
- if (ts.isFunctionLike(node_1)) {
- return undefined;
- }
- break;
- }
- }
+ }
+ else if (modifier === 116) {
+ if (!(container.kind === 228 || declaration.kind === 228)) {
return undefined;
}
- function getModifierOccurrences(modifier, declaration) {
- var container = declaration.parent;
- if (ts.isAccessibilityModifier(modifier)) {
- if (!(container.kind === 226 ||
- container.kind === 197 ||
- (declaration.kind === 144 && hasKind(container, 150)))) {
- return undefined;
- }
- }
- else if (modifier === 114) {
- if (!(container.kind === 226 || container.kind === 197)) {
- return undefined;
- }
- }
- else if (modifier === 83 || modifier === 123) {
- if (!(container.kind === 231 || container.kind === 261)) {
- return undefined;
- }
- }
- else if (modifier === 116) {
- if (!(container.kind === 226 || declaration.kind === 226)) {
- return undefined;
- }
+ }
+ else {
+ return undefined;
+ }
+ var keywords = [];
+ var modifierFlag = getFlagFromModifier(modifier);
+ var nodes;
+ switch (container.kind) {
+ case 233:
+ case 264:
+ if (modifierFlag & 128) {
+ nodes = declaration.members.concat(declaration);
}
else {
- return undefined;
- }
- var keywords = [];
- var modifierFlag = getFlagFromModifier(modifier);
- var nodes;
- switch (container.kind) {
- case 231:
- case 261:
- if (modifierFlag & 128) {
- nodes = declaration.members.concat(declaration);
- }
- else {
- nodes = container.statements;
- }
- break;
- case 150:
- nodes = container.parameters.concat(container.parent.members);
- break;
- case 226:
- case 197:
- nodes = container.members;
- if (modifierFlag & 28) {
- var constructor = ts.forEach(container.members, function (member) {
- return member.kind === 150 && member;
- });
- if (constructor) {
- nodes = nodes.concat(constructor.parameters);
- }
- }
- else if (modifierFlag & 128) {
- nodes = nodes.concat(container);
- }
- break;
- default:
- ts.Debug.fail("Invalid container kind.");
+ nodes = container.statements;
}
- ts.forEach(nodes, function (node) {
- if (ts.getModifierFlags(node) & modifierFlag) {
- ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- function getFlagFromModifier(modifier) {
- switch (modifier) {
- case 113:
- return 4;
- case 111:
- return 8;
- case 112:
- return 16;
- case 114:
- return 32;
- case 83:
- return 1;
- case 123:
- return 2;
- case 116:
- return 128;
- default:
- ts.Debug.fail();
+ break;
+ case 151:
+ nodes = container.parameters.concat(container.parent.members);
+ break;
+ case 228:
+ case 198:
+ nodes = container.members;
+ if (modifierFlag & 28) {
+ var constructor = ts.forEach(container.members, function (member) {
+ return member.kind === 151 && member;
+ });
+ if (constructor) {
+ nodes = nodes.concat(constructor.parameters);
}
}
- }
- function pushKeywordIf(keywordList, token) {
- var expected = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- expected[_i - 2] = arguments[_i];
- }
- if (token && ts.contains(expected, token.kind)) {
- keywordList.push(token);
- return true;
+ else if (modifierFlag & 128) {
+ nodes = nodes.concat(container);
}
- return false;
+ break;
+ default:
+ ts.Debug.fail("Invalid container kind.");
+ }
+ ts.forEach(nodes, function (node) {
+ if (ts.getModifierFlags(node) & modifierFlag) {
+ ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
}
- function getGetAndSetOccurrences(accessorDeclaration) {
- var keywords = [];
- tryPushAccessorKeyword(accessorDeclaration.symbol, 151);
- tryPushAccessorKeyword(accessorDeclaration.symbol, 152);
- return ts.map(keywords, getHighlightSpanForNode);
- function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
- var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
- if (accessor) {
- ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 133); });
- }
- }
+ });
+ return keywords;
+ function getFlagFromModifier(modifier) {
+ switch (modifier) {
+ case 113:
+ return 4;
+ case 111:
+ return 8;
+ case 112:
+ return 16;
+ case 114:
+ return 32;
+ case 83:
+ return 1;
+ case 123:
+ return 2;
+ case 116:
+ return 128;
+ default:
+ ts.Debug.fail();
}
- function getConstructorOccurrences(constructorDeclaration) {
- var declarations = constructorDeclaration.symbol.getDeclarations();
- var keywords = [];
- ts.forEach(declarations, function (declaration) {
- ts.forEach(declaration.getChildren(), function (token) {
- return pushKeywordIf(keywords, token, 122);
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getLoopBreakContinueOccurrences(loopNode) {
- var keywords = [];
- if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) {
- if (loopNode.kind === 209) {
- var loopTokens = loopNode.getChildren();
- for (var i = loopTokens.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, loopTokens[i], 105)) {
- break;
- }
- }
- }
- }
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(loopNode, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71, 76);
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
- var owner = getBreakOrContinueOwner(breakOrContinueStatement);
- if (owner) {
- switch (owner.kind) {
- case 211:
- case 212:
- case 213:
- case 209:
- case 210:
- return getLoopBreakContinueOccurrences(owner);
- case 218:
- return getSwitchCaseDefaultOccurrences(owner);
+ }
+ }
+ function pushKeywordIf(keywordList, token) {
+ var expected = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ expected[_i - 2] = arguments[_i];
+ }
+ if (token && ts.contains(expected, token.kind)) {
+ keywordList.push(token);
+ return true;
+ }
+ return false;
+ }
+ function getGetAndSetOccurrences(accessorDeclaration) {
+ var keywords = [];
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 152);
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 153);
+ return keywords;
+ function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
+ var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
+ if (accessor) {
+ ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124, 134); });
+ }
+ }
+ }
+ function getConstructorOccurrences(constructorDeclaration) {
+ var declarations = constructorDeclaration.symbol.getDeclarations();
+ var keywords = [];
+ ts.forEach(declarations, function (declaration) {
+ ts.forEach(declaration.getChildren(), function (token) {
+ return pushKeywordIf(keywords, token, 122);
+ });
+ });
+ return keywords;
+ }
+ function getLoopBreakContinueOccurrences(loopNode) {
+ var keywords = [];
+ if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87, 105, 80)) {
+ if (loopNode.kind === 211) {
+ var loopTokens = loopNode.getChildren();
+ for (var i = loopTokens.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, loopTokens[i], 105)) {
+ break;
}
}
- return undefined;
}
- function getSwitchCaseDefaultOccurrences(switchStatement) {
- var keywords = [];
- pushKeywordIf(keywords, switchStatement.getFirstToken(), 97);
- ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
- pushKeywordIf(keywords, clause.getFirstToken(), 72, 78);
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(switchStatement, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71);
- }
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
+ }
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(loopNode, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71, 76);
}
- function getTryCatchFinallyOccurrences(tryStatement) {
- var keywords = [];
- pushKeywordIf(keywords, tryStatement.getFirstToken(), 101);
- if (tryStatement.catchClause) {
- pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73);
- }
- if (tryStatement.finallyBlock) {
- var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile);
- pushKeywordIf(keywords, finallyKeyword, 86);
- }
- return ts.map(keywords, getHighlightSpanForNode);
+ });
+ return keywords;
+ }
+ function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
+ var owner = getBreakOrContinueOwner(breakOrContinueStatement);
+ if (owner) {
+ switch (owner.kind) {
+ case 213:
+ case 214:
+ case 215:
+ case 211:
+ case 212:
+ return getLoopBreakContinueOccurrences(owner);
+ case 220:
+ return getSwitchCaseDefaultOccurrences(owner);
}
- function getThrowOccurrences(throwStatement) {
- var owner = getThrowStatementOwner(throwStatement);
- if (!owner) {
- return undefined;
+ }
+ return undefined;
+ }
+ function getSwitchCaseDefaultOccurrences(switchStatement) {
+ var keywords = [];
+ pushKeywordIf(keywords, switchStatement.getFirstToken(), 97);
+ ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
+ pushKeywordIf(keywords, clause.getFirstToken(), 72, 78);
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(switchStatement, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71);
}
- var keywords = [];
- ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
- });
- if (ts.isFunctionBlock(owner)) {
- ts.forEachReturnStatement(owner, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
- });
+ });
+ });
+ return keywords;
+ }
+ function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {
+ var keywords = [];
+ pushKeywordIf(keywords, tryStatement.getFirstToken(), 101);
+ if (tryStatement.catchClause) {
+ pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73);
+ }
+ if (tryStatement.finallyBlock) {
+ var finallyKeyword = ts.findChildOfKind(tryStatement, 86, sourceFile);
+ pushKeywordIf(keywords, finallyKeyword, 86);
+ }
+ return keywords;
+ }
+ function getThrowOccurrences(throwStatement) {
+ var owner = getThrowStatementOwner(throwStatement);
+ if (!owner) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
+ });
+ if (ts.isFunctionBlock(owner)) {
+ ts.forEachReturnStatement(owner, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
+ });
+ }
+ return keywords;
+ }
+ function getReturnOccurrences(returnStatement) {
+ var func = ts.getContainingFunction(returnStatement);
+ if (!(func && hasKind(func.body, 206))) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEachReturnStatement(func.body, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
+ });
+ ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
+ });
+ return keywords;
+ }
+ function getIfElseOccurrences(ifStatement, sourceFile) {
+ var keywords = [];
+ while (hasKind(ifStatement.parent, 210) && ifStatement.parent.elseStatement === ifStatement) {
+ ifStatement = ifStatement.parent;
+ }
+ while (ifStatement) {
+ var children = ifStatement.getChildren();
+ pushKeywordIf(keywords, children[0], 89);
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, children[i], 81)) {
+ break;
}
- return ts.map(keywords, getHighlightSpanForNode);
}
- function getReturnOccurrences(returnStatement) {
- var func = ts.getContainingFunction(returnStatement);
- if (!(func && hasKind(func.body, 204))) {
- return undefined;
- }
- var keywords = [];
- ts.forEachReturnStatement(func.body, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95);
- });
- ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99);
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getIfElseOccurrences(ifStatement) {
- var keywords = [];
- while (hasKind(ifStatement.parent, 208) && ifStatement.parent.elseStatement === ifStatement) {
- ifStatement = ifStatement.parent;
- }
- while (ifStatement) {
- var children = ifStatement.getChildren();
- pushKeywordIf(keywords, children[0], 89);
- for (var i = children.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, children[i], 81)) {
- break;
- }
- }
- if (!hasKind(ifStatement.elseStatement, 208)) {
+ if (!hasKind(ifStatement.elseStatement, 210)) {
+ break;
+ }
+ ifStatement = ifStatement.elseStatement;
+ }
+ var result = [];
+ for (var i = 0; i < keywords.length; i++) {
+ if (keywords[i].kind === 81 && i < keywords.length - 1) {
+ var elseKeyword = keywords[i];
+ var ifKeyword = keywords[i + 1];
+ var shouldCombindElseAndIf = true;
+ for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
+ if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
+ shouldCombindElseAndIf = false;
break;
}
- ifStatement = ifStatement.elseStatement;
}
- var result = [];
- for (var i = 0; i < keywords.length; i++) {
- if (keywords[i].kind === 81 && i < keywords.length - 1) {
- var elseKeyword = keywords[i];
- var ifKeyword = keywords[i + 1];
- var shouldCombindElseAndIf = true;
- for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
- if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
- shouldCombindElseAndIf = false;
- break;
- }
- }
- if (shouldCombindElseAndIf) {
- result.push({
- fileName: fileName,
- textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
- kind: ts.HighlightSpanKind.reference
- });
- i++;
- continue;
- }
- }
- result.push(getHighlightSpanForNode(keywords[i]));
+ if (shouldCombindElseAndIf) {
+ result.push({
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
+ kind: ts.HighlightSpanKind.reference
+ });
+ i++;
+ continue;
}
- return result;
}
+ result.push(getHighlightSpanForNode(keywords[i], sourceFile));
}
+ return result;
}
- DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
function isLabeledBy(node, labelName) {
- for (var owner = node.parent; owner.kind === 219; owner = owner.parent) {
+ for (var owner = node.parent; owner.kind === 221; owner = owner.parent) {
if (owner.label.text === labelName) {
return true;
}
@@ -56110,15 +61574,15 @@ var ts;
return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + "|" + settings.allowJs + "|" + settings.baseUrl + "|" + JSON.stringify(settings.typeRoots) + "|" + JSON.stringify(settings.rootDirs) + "|" + JSON.stringify(settings.paths);
}
function getBucketForCompilationSettings(key, createIfMissing) {
- var bucket = buckets[key];
+ var bucket = buckets.get(key);
if (!bucket && createIfMissing) {
- buckets[key] = bucket = ts.createFileMap();
+ buckets.set(key, bucket = ts.createFileMap());
}
return bucket;
}
function reportStats() {
- var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
- var entries = buckets[name];
+ var bucketInfoArray = ts.arrayFrom(buckets.keys()).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
+ var entries = buckets.get(name);
var sourceFiles = [];
entries.forEachValue(function (key, entry) {
sourceFiles.push({
@@ -56206,179 +61670,871 @@ var ts;
(function (ts) {
var FindAllReferences;
(function (FindAllReferences) {
- function findReferencedSymbols(typeChecker, cancellationToken, sourceFiles, sourceFile, position, findInStrings, findInComments) {
- var node = ts.getTouchingPropertyName(sourceFile, position, true);
- if (node === sourceFile) {
- return undefined;
+ function createImportTracker(sourceFiles, checker, cancellationToken) {
+ var allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);
+ return function (exportSymbol, exportInfo, isForRename) {
+ var _a = getImportersForExport(sourceFiles, allDirectImports, exportInfo, checker, cancellationToken), directImports = _a.directImports, indirectUsers = _a.indirectUsers;
+ return __assign({ indirectUsers: indirectUsers }, getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename));
+ };
+ }
+ FindAllReferences.createImportTracker = createImportTracker;
+ var ExportKind;
+ (function (ExportKind) {
+ ExportKind[ExportKind["Named"] = 0] = "Named";
+ ExportKind[ExportKind["Default"] = 1] = "Default";
+ ExportKind[ExportKind["ExportEquals"] = 2] = "ExportEquals";
+ })(ExportKind = FindAllReferences.ExportKind || (FindAllReferences.ExportKind = {}));
+ var ImportExport;
+ (function (ImportExport) {
+ ImportExport[ImportExport["Import"] = 0] = "Import";
+ ImportExport[ImportExport["Export"] = 1] = "Export";
+ })(ImportExport = FindAllReferences.ImportExport || (FindAllReferences.ImportExport = {}));
+ function getImportersForExport(sourceFiles, allDirectImports, _a, checker, cancellationToken) {
+ var exportingModuleSymbol = _a.exportingModuleSymbol, exportKind = _a.exportKind;
+ var markSeenDirectImport = ts.nodeSeenTracker();
+ var markSeenIndirectUser = ts.nodeSeenTracker();
+ var directImports = [];
+ var isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports;
+ var indirectUserDeclarations = isAvailableThroughGlobal ? undefined : [];
+ handleDirectImports(exportingModuleSymbol);
+ return { directImports: directImports, indirectUsers: getIndirectUsers() };
+ function getIndirectUsers() {
+ if (isAvailableThroughGlobal) {
+ return sourceFiles;
+ }
+ for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (ts.isExternalModuleAugmentation(decl)) {
+ addIndirectUser(decl);
+ }
+ }
+ return indirectUserDeclarations.map(ts.getSourceFileOfNode);
}
- switch (node.kind) {
- case 8:
- if (!ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- break;
+ function handleDirectImports(exportingModuleSymbol) {
+ var theseDirectImports = getDirectImports(exportingModuleSymbol);
+ if (theseDirectImports)
+ for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
+ var direct = theseDirectImports_1[_i];
+ if (!markSeenDirectImport(direct)) {
+ continue;
+ }
+ cancellationToken.throwIfCancellationRequested();
+ switch (direct.kind) {
+ case 180:
+ if (!isAvailableThroughGlobal) {
+ var parent = direct.parent;
+ if (exportKind === 2 && parent.kind === 225) {
+ var name = parent.name;
+ if (name.kind === 70) {
+ directImports.push(name);
+ break;
+ }
+ }
+ addIndirectUser(direct.getSourceFile());
+ }
+ break;
+ case 236:
+ handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1));
+ break;
+ case 237:
+ var namedBindings = direct.importClause && direct.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239) {
+ handleNamespaceImport(direct, namedBindings.name);
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ case 243:
+ if (!direct.exportClause) {
+ handleDirectImports(getContainingModuleSymbol(direct, checker));
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ }
}
- case 70:
- case 98:
- case 122:
- case 9:
- return getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, false);
}
- return undefined;
+ function handleNamespaceImport(importDeclaration, name, isReExport) {
+ if (exportKind === 2) {
+ directImports.push(importDeclaration);
+ }
+ else if (!isAvailableThroughGlobal) {
+ var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration);
+ ts.Debug.assert(sourceFileLike.kind === 264 || sourceFileLike.kind === 232);
+ if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {
+ addIndirectUsers(sourceFileLike);
+ }
+ else {
+ addIndirectUser(sourceFileLike);
+ }
+ }
+ }
+ function addIndirectUser(sourceFileLike) {
+ ts.Debug.assert(!isAvailableThroughGlobal);
+ var isNew = markSeenIndirectUser(sourceFileLike);
+ if (isNew) {
+ indirectUserDeclarations.push(sourceFileLike);
+ }
+ return isNew;
+ }
+ function addIndirectUsers(sourceFileLike) {
+ if (!addIndirectUser(sourceFileLike)) {
+ return;
+ }
+ var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536));
+ var directImports = getDirectImports(moduleSymbol);
+ if (directImports)
+ for (var _i = 0, directImports_1 = directImports; _i < directImports_1.length; _i++) {
+ var directImport = directImports_1[_i];
+ addIndirectUsers(getSourceFileLikeForImportDeclaration(directImport));
+ }
+ }
+ function getDirectImports(moduleSymbol) {
+ return allDirectImports.get(ts.getSymbolId(moduleSymbol).toString());
+ }
+ }
+ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) {
+ var exportName = exportSymbol.name;
+ var importSearches = [];
+ var singleReferences = [];
+ function addSearch(location, symbol) {
+ importSearches.push([location, symbol]);
+ }
+ if (directImports)
+ for (var _i = 0, directImports_2 = directImports; _i < directImports_2.length; _i++) {
+ var decl = directImports_2[_i];
+ handleImport(decl);
+ }
+ return { importSearches: importSearches, singleReferences: singleReferences };
+ function handleImport(decl) {
+ if (decl.kind === 236) {
+ if (isExternalModuleImportEquals(decl)) {
+ handleNamespaceImportLike(decl.name);
+ }
+ return;
+ }
+ if (decl.kind === 70) {
+ handleNamespaceImportLike(decl);
+ return;
+ }
+ if (decl.moduleSpecifier.kind !== 9) {
+ return;
+ }
+ if (decl.kind === 243) {
+ searchForNamedImport(decl.exportClause);
+ return;
+ }
+ var importClause = decl.importClause;
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239) {
+ handleNamespaceImportLike(namedBindings.name);
+ return;
+ }
+ if (exportKind === 0) {
+ searchForNamedImport(namedBindings);
+ }
+ else {
+ var name = importClause.name;
+ if (name && (!isForRename || name.text === symbolName(exportSymbol))) {
+ var defaultImportAlias = checker.getSymbolAtLocation(name);
+ addSearch(name, defaultImportAlias);
+ }
+ if (!isForRename && exportKind === 1) {
+ ts.Debug.assert(exportName === "default");
+ searchForNamedImport(namedBindings);
+ }
+ }
+ }
+ function handleNamespaceImportLike(importName) {
+ if (exportKind === 2 && (!isForRename || importName.text === exportName)) {
+ addSearch(importName, checker.getSymbolAtLocation(importName));
+ }
+ }
+ function searchForNamedImport(namedBindings) {
+ if (namedBindings)
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ var name = element.name, propertyName = element.propertyName;
+ if ((propertyName || name).text !== exportName) {
+ continue;
+ }
+ if (propertyName) {
+ singleReferences.push(propertyName);
+ if (!isForRename) {
+ addSearch(name, checker.getSymbolAtLocation(name));
+ }
+ }
+ else {
+ var localSymbol = element.kind === 245 && element.propertyName
+ ? checker.getExportSpecifierLocalTargetSymbol(element)
+ : checker.getSymbolAtLocation(name);
+ addSearch(name, localSymbol);
+ }
+ }
+ }
+ }
+ function findNamespaceReExports(sourceFileLike, name, checker) {
+ var namespaceImportSymbol = checker.getSymbolAtLocation(name);
+ return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) {
+ if (statement.kind !== 243)
+ return;
+ var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier;
+ if (moduleSpecifier || !exportClause)
+ return;
+ for (var _i = 0, _b = exportClause.elements; _i < _b.length; _i++) {
+ var element = _b[_i];
+ if (checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol) {
+ return true;
+ }
+ }
+ });
+ }
+ function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
+ var map = ts.createMap();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var sourceFile = sourceFiles_4[_i];
+ cancellationToken.throwIfCancellationRequested();
+ forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol) {
+ var id = ts.getSymbolId(moduleSymbol).toString();
+ var imports = map.get(id);
+ if (!imports) {
+ map.set(id, imports = []);
+ }
+ imports.push(importDecl);
+ }
+ });
+ }
+ return map;
+ }
+ function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
+ return ts.forEach(sourceFileLike.kind === 264 ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) {
+ return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action));
+ });
+ }
+ function forEachImport(sourceFile, action) {
+ if (sourceFile.externalModuleIndicator) {
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var moduleSpecifier = _a[_i];
+ action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
+ }
+ }
+ else {
+ forEachPossibleImportOrExportStatement(sourceFile, function (statement) {
+ switch (statement.kind) {
+ case 243:
+ case 237: {
+ var decl = statement;
+ if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9) {
+ action(decl, decl.moduleSpecifier);
+ }
+ break;
+ }
+ case 236: {
+ var decl = statement;
+ var moduleReference = decl.moduleReference;
+ if (moduleReference.kind === 247 &&
+ moduleReference.expression.kind === 9) {
+ action(decl, moduleReference.expression);
+ }
+ break;
+ }
+ }
+ });
+ if (sourceFile.flags & 65536) {
+ sourceFile.forEachChild(function recur(node) {
+ if (ts.isRequireCall(node, true)) {
+ action(node, node.arguments[0]);
+ }
+ else {
+ node.forEachChild(recur);
+ }
+ });
+ }
+ }
+ }
+ function importerFromModuleSpecifier(moduleSpecifier) {
+ var decl = moduleSpecifier.parent;
+ if (decl.kind === 237 || decl.kind === 243) {
+ return decl;
+ }
+ ts.Debug.assert(decl.kind === 247);
+ return decl.parent;
+ }
+ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
+ return comingFromExport ? getExport() : getExport() || getImport();
+ function getExport() {
+ var parent = node.parent;
+ if (symbol.flags & 7340032) {
+ if (parent.kind === 178) {
+ return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193
+ ? getSpecialPropertyExport(parent.parent, false)
+ : undefined;
+ }
+ else {
+ var exportSymbol = symbol.exportSymbol;
+ ts.Debug.assert(!!exportSymbol);
+ return exportInfo(exportSymbol, getExportKindForDeclaration(parent));
+ }
+ }
+ else {
+ var exportNode = parent.kind === 225 ? ts.getAncestor(parent, 207) : parent;
+ if (ts.hasModifier(exportNode, 1)) {
+ if (exportNode.kind === 236 && exportNode.moduleReference === node) {
+ if (comingFromExport) {
+ return undefined;
+ }
+ var lhsSymbol = checker.getSymbolAtLocation(exportNode.name);
+ return { kind: 0, symbol: lhsSymbol, isNamedImport: false };
+ }
+ else {
+ return exportInfo(symbol, getExportKindForDeclaration(exportNode));
+ }
+ }
+ else if (parent.kind === 242) {
+ var exportingModuleSymbol = parent.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ }
+ else if (parent.kind === 193) {
+ return getSpecialPropertyExport(parent, true);
+ }
+ else if (parent.parent.kind === 193) {
+ return getSpecialPropertyExport(parent.parent, true);
+ }
+ }
+ function getSpecialPropertyExport(node, useLhsSymbol) {
+ var kind;
+ switch (ts.getSpecialPropertyAssignmentKind(node)) {
+ case 1:
+ kind = 0;
+ break;
+ case 2:
+ kind = 2;
+ break;
+ default:
+ return undefined;
+ }
+ var sym = useLhsSymbol ? checker.getSymbolAtLocation(node.left.name) : symbol;
+ return sym && exportInfo(sym, kind);
+ }
+ }
+ function getImport() {
+ var isImport = isNodeImport(node);
+ if (!isImport)
+ return;
+ var importedSymbol = checker.getImmediateAliasedSymbol(symbol);
+ if (importedSymbol) {
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ if (importedSymbol.name === "export=") {
+ importedSymbol = checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0, symbol: importedSymbol }, isImport);
+ }
+ }
+ }
+ function exportInfo(symbol, kind) {
+ var exportInfo = getExportInfo(symbol, kind, checker);
+ return exportInfo && { kind: 1, symbol: symbol, exportInfo: exportInfo };
+ }
+ function getExportKindForDeclaration(node) {
+ return ts.hasModifier(node, 512) ? 1 : 0;
+ }
+ }
+ FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function isNodeImport(node) {
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 236:
+ return parent.name === node && isExternalModuleImportEquals(parent)
+ ? { isNamedImport: false }
+ : undefined;
+ case 241:
+ return parent.propertyName ? undefined : { isNamedImport: true };
+ case 238:
+ case 239:
+ ts.Debug.assert(parent.name === node);
+ return { isNamedImport: false };
+ default:
+ return undefined;
+ }
+ }
+ function getExportInfo(exportSymbol, exportKind, checker) {
+ var exportingModuleSymbol = checker.getMergedSymbol(exportSymbol.parent);
+ return ts.isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } : undefined;
+ }
+ FindAllReferences.getExportInfo = getExportInfo;
+ function symbolName(symbol) {
+ if (symbol.name !== "default") {
+ return symbol.name;
+ }
+ var name = ts.forEach(symbol.declarations, function (_a) {
+ var name = _a.name;
+ return name && name.kind === 70 && name.text;
+ });
+ ts.Debug.assert(!!name);
+ return name;
+ }
+ function skipExportSpecifierSymbol(symbol, checker) {
+ if (symbol.declarations)
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) {
+ return checker.getExportSpecifierLocalTargetSymbol(declaration);
+ }
+ }
+ return symbol;
+ }
+ function getContainingModuleSymbol(importer, checker) {
+ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
+ }
+ function getSourceFileLikeForImportDeclaration(node) {
+ if (node.kind === 180) {
+ return node.getSourceFile();
+ }
+ var parent = node.parent;
+ if (parent.kind === 264) {
+ return parent;
+ }
+ ts.Debug.assert(parent.kind === 233 && isAmbientModuleDeclaration(parent.parent));
+ return parent.parent;
+ }
+ function isAmbientModuleDeclaration(node) {
+ return node.kind === 232 && node.name.kind === 9;
+ }
+ function isExternalModuleImportEquals(_a) {
+ var moduleReference = _a.moduleReference;
+ return moduleReference.kind === 247 && moduleReference.expression.kind === 9;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ function nodeEntry(node, isInString) {
+ return { type: "node", node: node, isInString: isInString };
+ }
+ FindAllReferences.nodeEntry = nodeEntry;
+ function findReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position);
+ if (!referencedSymbols || !referencedSymbols.length) {
+ return undefined;
+ }
+ var out = [];
+ for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
+ var _a = referencedSymbols_1[_i], definition = _a.definition, references = _a.references;
+ if (definition) {
+ out.push({ definition: definitionToReferencedSymbolDefinitionInfo(definition, checker), references: references.map(toReferenceEntry) });
+ }
+ }
+ return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, implementations) {
- if (!implementations) {
+ function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
+ }
+ FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
+ function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ if (node.parent.kind === 261) {
+ var result_4 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
+ return result_4;
+ }
+ else if (node.kind === 96 || ts.isSuperProperty(node.parent)) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
+ }
+ else {
+ return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ }
+ }
+ function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ return ts.map(x, toReferenceEntry);
+ }
+ FindAllReferences.findReferencedEntries = findReferencedEntries;
+ function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ }
+ FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
+ function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ }
+ function flattenEntries(referenceSymbols) {
+ return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
+ }
+ function definitionToReferencedSymbolDefinitionInfo(def, checker) {
+ var info = (function () {
+ switch (def.type) {
+ case "symbol": {
+ var symbol = def.symbol, node_2 = def.node;
+ var declarations = symbol.declarations;
+ if (!declarations || declarations.length === 0) {
+ return undefined;
+ }
+ var _a = getDefinitionKindAndDisplayParts(symbol, node_2, checker), displayParts_1 = _a.displayParts, kind_1 = _a.kind;
+ var name_3 = displayParts_1.map(function (p) { return p.text; }).join("");
+ return { node: node_2, name: name_3, kind: kind_1, displayParts: displayParts_1 };
+ }
+ case "label": {
+ var node_3 = def.node;
+ return { node: node_3, name: node_3.text, kind: ts.ScriptElementKind.label, displayParts: [ts.displayPart(node_3.text, ts.SymbolDisplayPartKind.text)] };
+ }
+ case "keyword": {
+ var node_4 = def.node;
+ var name_4 = ts.tokenToString(node_4.kind);
+ return { node: node_4, name: name_4, kind: ts.ScriptElementKind.keyword, displayParts: [{ text: name_4, kind: ts.ScriptElementKind.keyword }] };
+ }
+ case "this": {
+ var node_5 = def.node;
+ var symbol = checker.getSymbolAtLocation(node_5);
+ var displayParts_2 = symbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node_5.getSourceFile(), ts.getContainerNode(node_5), node_5).displayParts;
+ return { node: node_5, name: "this", kind: ts.ScriptElementKind.variableElement, displayParts: displayParts_2 };
+ }
+ case "string": {
+ var node_6 = def.node;
+ return { node: node_6, name: node_6.text, kind: ts.ScriptElementKind.variableElement, displayParts: [ts.displayPart(ts.getTextOfNode(node_6), ts.SymbolDisplayPartKind.stringLiteral)] };
+ }
+ }
+ })();
+ if (!info) {
+ return undefined;
+ }
+ var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts;
+ var sourceFile = node.getSourceFile();
+ return {
+ containerKind: "",
+ containerName: "",
+ fileName: sourceFile.fileName,
+ kind: kind,
+ name: name,
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
+ displayParts: displayParts
+ };
+ }
+ function getDefinitionKindAndDisplayParts(symbol, node, checker) {
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node.getSourceFile(), ts.getContainerNode(node), node), displayParts = _a.displayParts, symbolKind = _a.symbolKind;
+ return { displayParts: displayParts, kind: symbolKind };
+ }
+ function toReferenceEntry(entry) {
+ if (entry.type === "span") {
+ return { textSpan: entry.textSpan, fileName: entry.fileName, isWriteAccess: false, isDefinition: false };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ return {
+ fileName: node.getSourceFile().fileName,
+ textSpan: getTextSpan(node),
+ isWriteAccess: isWriteAccess(node),
+ isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isInString: isInString
+ };
+ }
+ function toImplementationLocation(entry, checker) {
+ if (entry.type === "node") {
+ var node = entry.node;
+ return __assign({ textSpan: getTextSpan(node), fileName: node.getSourceFile().fileName }, implementationKindDisplayParts(node, checker));
+ }
+ else {
+ var textSpan = entry.textSpan, fileName = entry.fileName;
+ return { textSpan: textSpan, fileName: fileName, kind: ts.ScriptElementKind.unknown, displayParts: [] };
+ }
+ }
+ function implementationKindDisplayParts(node, checker) {
+ var symbol = checker.getSymbolAtLocation(ts.isDeclaration(node) && node.name ? node.name : node);
+ if (symbol) {
+ return getDefinitionKindAndDisplayParts(symbol, node, checker);
+ }
+ else if (node.kind === 177) {
+ return {
+ kind: ts.ScriptElementKind.interfaceElement,
+ displayParts: [ts.punctuationPart(18), ts.textPart("object literal"), ts.punctuationPart(19)]
+ };
+ }
+ else if (node.kind === 198) {
+ return {
+ kind: ts.ScriptElementKind.localClassElement,
+ displayParts: [ts.punctuationPart(18), ts.textPart("anonymous local class"), ts.punctuationPart(19)]
+ };
+ }
+ else {
+ return { kind: ts.getNodeKind(node), displayParts: [] };
+ }
+ }
+ function toHighlightSpan(entry) {
+ if (entry.type === "span") {
+ var fileName_1 = entry.fileName, textSpan = entry.textSpan;
+ return { fileName: fileName_1, span: { textSpan: textSpan, kind: ts.HighlightSpanKind.reference } };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ var fileName = entry.node.getSourceFile().fileName;
+ var writeAccess = isWriteAccess(node);
+ var span = {
+ textSpan: getTextSpan(node),
+ kind: writeAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference,
+ isInString: isInString
+ };
+ return { fileName: fileName, span: span };
+ }
+ FindAllReferences.toHighlightSpan = toHighlightSpan;
+ function getTextSpan(node) {
+ var start = node.getStart();
+ var end = node.getEnd();
+ if (node.kind === 9) {
+ start += 1;
+ end -= 1;
+ }
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ function isWriteAccess(node) {
+ if (node.kind === 70 && ts.isDeclarationName(node)) {
+ return true;
+ }
+ var parent = node.parent;
+ if (parent) {
+ if (parent.kind === 192 || parent.kind === 191) {
+ return true;
+ }
+ else if (parent.kind === 193 && parent.left === node) {
+ var operator = parent.operatorToken.kind;
+ return 57 <= operator && operator <= 69;
+ }
+ }
+ return false;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ var Core;
+ (function (Core) {
+ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ if (node.kind === 264) {
+ return undefined;
+ }
+ if (!options.implementations) {
+ var special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken);
+ if (special) {
+ return special;
+ }
+ }
+ var symbol = checker.getSymbolAtLocation(node);
+ if (!symbol) {
+ if (!options.implementations && node.kind === 9) {
+ return getReferencesForStringLiteral(node, sourceFiles, cancellationToken);
+ }
+ return undefined;
+ }
+ if (!symbol.declarations || !symbol.declarations.length) {
+ return undefined;
+ }
+ return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
+ }
+ Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
+ if (ts.isTypeKeyword(node.kind)) {
+ return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
+ }
if (ts.isLabelName(node)) {
if (ts.isJumpStatementTarget(node)) {
var labelDefinition = ts.getTargetLabel(node.parent, node.text);
- return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined;
+ return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition);
}
else {
return getLabelReferencesInNode(node.parent, node);
}
}
if (ts.isThis(node)) {
- return getReferencesForThisKeyword(node, sourceFiles);
+ return getReferencesForThisKeyword(node, sourceFiles, cancellationToken);
}
if (node.kind === 96) {
return getReferencesForSuperKeyword(node);
}
- }
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (!implementations && !symbol && node.kind === 9) {
- return getReferencesForStringLiteral(node, sourceFiles);
- }
- if (!symbol) {
return undefined;
}
- var declarations = symbol.declarations;
- if (!declarations || !declarations.length) {
- return undefined;
- }
- var result;
- var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), declarations);
- var declaredName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var scope = getSymbolScope(symbol);
- var symbolToIndex = [];
- if (scope) {
- result = [];
- getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
- }
- else {
- var internedName = getInternedName(symbol, node);
- for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
- var sourceFile = sourceFiles_8[_i];
- cancellationToken.throwIfCancellationRequested();
- var nameTable = ts.getNameTable(sourceFile);
- if (nameTable[internedName] !== undefined) {
- result = result || [];
- getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
+ function getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options) {
+ symbol = skipPastExportOrImportSpecifier(symbol, node, checker);
+ var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), symbol.declarations);
+ var result = [];
+ var state = createState(sourceFiles, node, checker, cancellationToken, searchMeaning, options, result);
+ var search = state.createSearch(node, symbol, undefined, { allSearchSymbols: populateSearchSymbolSet(symbol, node, checker, options.implementations) });
+ var scope = getSymbolScope(symbol);
+ if (scope) {
+ getReferencesInContainer(scope, scope.getSourceFile(), search, state);
+ }
+ else {
+ for (var _i = 0, _a = state.sourceFiles; _i < _a.length; _i++) {
+ var sourceFile = _a[_i];
+ state.cancellationToken.throwIfCancellationRequested();
+ searchForName(sourceFile, search, state);
}
}
+ return result;
}
- return result;
- function getDefinition(symbol) {
- var info = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, node.getSourceFile(), ts.getContainerNode(node), node);
- var name = ts.map(info.displayParts, function (p) { return p.text; }).join("");
- var declarations = symbol.declarations;
- if (!declarations || declarations.length === 0) {
- return undefined;
+ function skipPastExportOrImportSpecifier(symbol, node, checker) {
+ var parent = node.parent;
+ if (ts.isExportSpecifier(parent)) {
+ return getLocalSymbolForExportSpecifier(node, symbol, parent, checker);
}
- return {
- containerKind: "",
- containerName: "",
- name: name,
- kind: info.symbolKind,
- fileName: declarations[0].getSourceFile().fileName,
- textSpan: ts.createTextSpan(declarations[0].getStart(), 0),
- displayParts: info.displayParts
- };
+ if (ts.isImportSpecifier(parent) && parent.propertyName === node) {
+ return checker.getImmediateAliasedSymbol(symbol);
+ }
+ return symbol;
}
- function getAliasSymbolForPropertyNameSymbol(symbol, location) {
- if (symbol.flags & 8388608) {
- var defaultImport = ts.getDeclarationOfKind(symbol, 236);
- if (defaultImport) {
- return typeChecker.getAliasedSymbol(symbol);
+ function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
+ var symbolIdToReferences = [];
+ var inheritsFromCache = ts.createMap();
+ var sourceFileToSeenSymbols = [];
+ var isForConstructor = originalLocation.kind === 122;
+ var importTracker;
+ return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference,
+ markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() });
+ function getImportSearches(exportSymbol, exportInfo) {
+ if (!importTracker)
+ importTracker = FindAllReferences.createImportTracker(sourceFiles, checker, cancellationToken);
+ return importTracker(exportSymbol, exportInfo, options.isForRename);
+ }
+ function createSearch(location, symbol, comingFrom, searchOptions) {
+ if (searchOptions === void 0) { searchOptions = {}; }
+ var _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(checker, symbol, location)) : _a, _b = searchOptions.allSearchSymbols, allSearchSymbols = _b === void 0 ? undefined : _b;
+ var escapedText = ts.escapeIdentifier(text);
+ var parents = options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, checker);
+ return { location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents, includes: includes };
+ function includes(referenceSymbol) {
+ return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol;
+ }
+ }
+ function referenceAdder(referenceSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(referenceSymbol);
+ var references = symbolIdToReferences[symbolId];
+ if (!references) {
+ references = symbolIdToReferences[symbolId] = [];
+ result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ }
+ return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
+ }
+ function addStringOrCommentReference(fileName, textSpan) {
+ result.push({
+ definition: undefined,
+ references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
+ });
+ }
+ function markSearchedSymbol(sourceFile, symbol) {
+ var sourceId = ts.getNodeId(sourceFile);
+ var symbolId = ts.getSymbolId(symbol);
+ var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
+ }
+ }
+ function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
+ var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
+ if (singleReferences.length) {
+ var addRef = state.referenceAdder(exportSymbol, exportLocation);
+ for (var _i = 0, singleReferences_1 = singleReferences; _i < singleReferences_1.length; _i++) {
+ var singleRef = singleReferences_1[_i];
+ addRef(singleRef);
}
- var importOrExportSpecifier = ts.forEach(symbol.declarations, function (declaration) { return (declaration.kind === 239 ||
- declaration.kind === 243) ? declaration : undefined; });
- if (importOrExportSpecifier &&
- (!importOrExportSpecifier.propertyName ||
- importOrExportSpecifier.propertyName === location)) {
- return importOrExportSpecifier.kind === 239 ?
- typeChecker.getAliasedSymbol(symbol) :
- typeChecker.getExportSpecifierLocalTargetSymbol(importOrExportSpecifier);
+ }
+ for (var _b = 0, importSearches_1 = importSearches; _b < importSearches_1.length; _b++) {
+ var _c = importSearches_1[_b], importLocation = _c[0], importSymbol = _c[1];
+ getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1), state);
+ }
+ if (indirectUsers.length) {
+ var indirectSearch = void 0;
+ switch (exportInfo.exportKind) {
+ case 0:
+ indirectSearch = state.createSearch(exportLocation, exportSymbol, 1);
+ break;
+ case 1:
+ indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
+ break;
+ case 2:
+ break;
+ }
+ if (indirectSearch) {
+ for (var _d = 0, indirectUsers_1 = indirectUsers; _d < indirectUsers_1.length; _d++) {
+ var indirectUser = indirectUsers_1[_d];
+ searchForName(indirectUser, indirectSearch, state);
+ }
}
}
- return undefined;
}
- function followAliasIfNecessary(symbol, location) {
- return getAliasSymbolForPropertyNameSymbol(symbol, location) || symbol;
+ function searchForImportedSymbol(symbol, state) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ getReferencesInSourceFile(declaration.getSourceFile(), state.createSearch(declaration, symbol, 0), state);
+ }
}
- function getPropertySymbolOfDestructuringAssignment(location) {
+ function searchForName(sourceFile, search, state) {
+ if (ts.getNameTable(sourceFile).get(search.escapedText) !== undefined) {
+ getReferencesInSourceFile(sourceFile, search, state);
+ }
+ }
+ function getPropertySymbolOfDestructuringAssignment(location, checker) {
return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) &&
- typeChecker.getPropertySymbolOfDestructuringAssignment(location);
+ checker.getPropertySymbolOfDestructuringAssignment(location);
}
function isObjectBindingPatternElementWithoutPropertyName(symbol) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175);
return bindingElement &&
- bindingElement.parent.kind === 172 &&
+ bindingElement.parent.kind === 173 &&
!bindingElement.propertyName;
}
- function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol) {
+ function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) {
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174);
- var typeOfPattern = typeChecker.getTypeAtLocation(bindingElement.parent);
- return typeOfPattern && typeChecker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175);
+ var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent);
+ return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
}
return undefined;
}
- function getInternedName(symbol, location) {
- if (ts.isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- symbol = localExportDefaultSymbol || symbol;
- return ts.stripQuotes(symbol.name);
- }
function getSymbolScope(symbol) {
- var valueDeclaration = symbol.valueDeclaration;
- if (valueDeclaration && (valueDeclaration.kind === 184 || valueDeclaration.kind === 197)) {
+ var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration;
+ if (valueDeclaration && (valueDeclaration.kind === 185 || valueDeclaration.kind === 198)) {
return valueDeclaration;
}
- if (symbol.flags & (4 | 8192)) {
- var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (ts.getModifierFlags(d) & 8) ? d : undefined; });
+ if (!declarations) {
+ return undefined;
+ }
+ if (flags & (4 | 8192)) {
+ var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); });
if (privateDeclaration) {
- return ts.getAncestor(privateDeclaration, 226);
+ return ts.getAncestor(privateDeclaration, 228);
}
}
- if (symbol.flags & 8388608) {
+ if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
}
- if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
+ if (parent && !((parent.flags & 1536) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
return undefined;
}
- if (symbol.parent || (symbol.flags & 268435456)) {
+ if ((flags & 134217728 && symbol.checkFlags & 6)) {
return undefined;
}
var scope;
- var declarations = symbol.getDeclarations();
- if (declarations) {
- for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
- var declaration = declarations_7[_i];
- var container = ts.getContainerNode(declaration);
- if (!container) {
- return undefined;
- }
- if (scope && scope !== container) {
- return undefined;
- }
- if (container.kind === 261 && !ts.isExternalModule(container)) {
- return undefined;
- }
- scope = container;
+ for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
+ var declaration = declarations_10[_i];
+ var container = ts.getContainerNode(declaration);
+ if (scope && scope !== container) {
+ return undefined;
}
+ if (!container || container.kind === 264 && !ts.isExternalOrCommonJsModule(container)) {
+ return undefined;
+ }
+ scope = container;
}
- return scope;
+ return parent ? scope.getSourceFile() : scope;
}
function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
var positions = [];
@@ -56390,7 +62546,6 @@ var ts;
var symbolNameLength = symbolName.length;
var position = text.indexOf(symbolName, start);
while (position >= 0) {
- cancellationToken.throwIfCancellationRequested();
if (position > end)
break;
var endPosition = position + symbolNameLength;
@@ -56407,242 +62562,277 @@ var ts;
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
+ var position = possiblePositions_1[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.getWidth() !== labelName.length) {
- return;
+ continue;
}
if (node === targetLabel ||
(ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = {
- containerKind: "",
- containerName: "",
- fileName: targetLabel.getSourceFile().fileName,
- kind: ts.ScriptElementKind.label,
- name: labelName,
- textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()),
- displayParts: [ts.displayPart(labelName, ts.SymbolDisplayPartKind.text)]
- };
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "label", node: targetLabel }, references: references }];
}
function isValidReferencePosition(node, searchSymbolName) {
- if (node) {
- switch (node.kind) {
- case 70:
- return node.getWidth() === searchSymbolName.length;
- case 9:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- isNameOfExternalModuleImportOrDeclaration(node)) {
- return node.getWidth() === searchSymbolName.length + 2;
- }
- break;
- case 8:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- return node.getWidth() === searchSymbolName.length;
- }
- break;
+ switch (node && node.kind) {
+ case 70:
+ return node.getWidth() === searchSymbolName.length;
+ case 9:
+ return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
+ node.getWidth() === searchSymbolName.length + 2;
+ case 8:
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ default:
+ return false;
+ }
+ }
+ function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken) {
+ var references = [];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
+ cancellationToken.throwIfCancellationRequested();
+ addReferencesForKeywordInFile(sourceFile, keywordKind, ts.tokenToString(keywordKind), references);
+ }
+ return references.length ? [{ definition: { type: "keyword", node: references[0].node }, references: references }] : undefined;
+ }
+ function addReferencesForKeywordInFile(sourceFile, kind, searchText, references) {
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile.getStart(), sourceFile.getEnd());
+ for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
+ var position = possiblePositions_2[_i];
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (referenceLocation.kind === kind) {
+ references.push(FindAllReferences.nodeEntry(referenceLocation));
}
}
- return false;
}
- function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) {
- var sourceFile = container.getSourceFile();
- var start = findInComments ? container.getFullStart() : container.getStart();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, start, container.getEnd());
- var parents = getParentSymbolsOfPropertyAccess();
- var inheritsFromCache = ts.createMap();
- if (possiblePositions.length) {
- var searchSymbols_1 = populateSearchSymbolSet(searchSymbol, searchLocation);
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
- if (!isValidReferencePosition(referenceLocation, searchText)) {
- if (!implementations && ((findInStrings && ts.isInString(sourceFile, position)) ||
- (findInComments && ts.isInNonReferenceComment(sourceFile, position)))) {
- result.push({
- definition: undefined,
- references: [{
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpan(position, searchText.length),
- isWriteAccess: false,
- isDefinition: false
- }]
- });
- }
- return;
- }
- if (!(ts.getMeaningFromLocation(referenceLocation) & searchMeaning)) {
- return;
- }
- var referenceSymbol = typeChecker.getSymbolAtLocation(referenceLocation);
- if (referenceSymbol) {
- var referenceSymbolDeclaration = referenceSymbol.valueDeclaration;
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration);
- var relatedSymbol = getRelatedSymbol(searchSymbols_1, referenceSymbol, referenceLocation, searchLocation.kind === 122, parents, inheritsFromCache);
- if (relatedSymbol) {
- addReferenceToRelatedSymbol(referenceLocation, relatedSymbol);
- }
- else if (!(referenceSymbol.flags & 67108864) && searchSymbols_1.indexOf(shorthandValueSymbol) >= 0) {
- addReferenceToRelatedSymbol(referenceSymbolDeclaration.name, shorthandValueSymbol);
- }
- else if (searchLocation.kind === 122) {
- findAdditionalConstructorReferences(referenceSymbol, referenceLocation);
- }
- }
- });
+ function getReferencesInSourceFile(sourceFile, search, state) {
+ state.cancellationToken.throwIfCancellationRequested();
+ return getReferencesInContainer(sourceFile, sourceFile, search, state);
+ }
+ function getReferencesInContainer(container, sourceFile, search, state) {
+ if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
+ return;
}
- return;
- function getParentSymbolsOfPropertyAccess() {
- if (implementations) {
- var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(searchLocation);
- if (propertyAccessExpression) {
- var localParentType = typeChecker.getTypeAtLocation(propertyAccessExpression.expression);
- if (localParentType) {
- if (localParentType.symbol && localParentType.symbol.flags & (32 | 64) && localParentType.symbol !== searchSymbol.parent) {
- return [localParentType.symbol];
- }
- else if (localParentType.flags & 196608) {
- return getSymbolsForClassAndInterfaceComponents(localParentType);
- }
- }
- }
+ var start = state.findInComments ? container.getFullStart() : container.getStart();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, search.text, start, container.getEnd());
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ getReferencesAtLocation(sourceFile, position, search, state);
+ }
+ }
+ function getReferencesAtLocation(sourceFile, position, search, state) {
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (!isValidReferencePosition(referenceLocation, search.text)) {
+ if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
+ return;
+ }
+ if (!(ts.getMeaningFromLocation(referenceLocation) & state.searchMeaning)) {
+ return;
+ }
+ var referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation);
+ if (!referenceSymbol) {
+ return;
+ }
+ var parent = referenceLocation.parent;
+ if (ts.isImportSpecifier(parent) && parent.propertyName === referenceLocation) {
+ return;
}
- function getPropertyAccessExpressionFromRightHandSide(node) {
- return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ if (ts.isExportSpecifier(parent)) {
+ ts.Debug.assert(referenceLocation.kind === 70);
+ getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state);
+ return;
+ }
+ var relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
+ if (!relatedSymbol) {
+ getReferenceForShorthandProperty(referenceSymbol, search, state);
+ return;
+ }
+ if (state.isForConstructor) {
+ findConstructorReferences(referenceLocation, sourceFile, search, state);
+ }
+ else {
+ addReference(referenceLocation, relatedSymbol, search.location, state);
+ }
+ getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
+ }
+ function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ var exportDeclaration = parent.parent;
+ var localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker);
+ if (!search.includes(localSymbol)) {
+ return;
}
- function findAdditionalConstructorReferences(referenceSymbol, referenceLocation) {
- ts.Debug.assert(ts.isClassLike(searchSymbol.valueDeclaration));
- var referenceClass = referenceLocation.parent;
- if (referenceSymbol === searchSymbol && ts.isClassLike(referenceClass)) {
- ts.Debug.assert(referenceClass.name === referenceLocation);
- addReferences(findOwnConstructorCalls(searchSymbol));
+ if (!propertyName) {
+ addRef();
+ }
+ else if (referenceLocation === propertyName) {
+ if (!exportDeclaration.moduleSpecifier) {
+ addRef();
}
- else {
- var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
- if (classExtending && ts.isClassLike(classExtending) && followAliasIfNecessary(referenceSymbol, referenceLocation) === searchSymbol) {
- addReferences(superConstructorAccesses(classExtending));
- }
+ if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ addReference(name, referenceSymbol, name, state);
}
}
- function addReferences(references) {
- if (references.length) {
- var referencedSymbol = getReferencedSymbol(searchSymbol);
- ts.addRange(referencedSymbol.references, ts.map(references, getReferenceEntryFromNode));
+ else {
+ if (state.markSeenReExportRHS(referenceLocation)) {
+ addRef();
}
}
- function findOwnConstructorCalls(classSymbol) {
- var result = [];
- for (var _i = 0, _a = classSymbol.members["__constructor"].declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150);
- var ctrKeyword = decl.getChildAt(0);
- ts.Debug.assert(ctrKeyword.kind === 122);
- result.push(ctrKeyword);
- }
- ts.forEachProperty(classSymbol.exports, function (member) {
- var decl = member.valueDeclaration;
- if (decl && decl.kind === 149) {
- var body = decl.body;
- if (body) {
- forEachDescendantOfKind(body, 98, function (thisKeyword) {
- if (ts.isNewExpressionTarget(thisKeyword)) {
- result.push(thisKeyword);
- }
- });
- }
- }
- });
- return result;
+ if (!(referenceLocation === propertyName && state.isForRename)) {
+ var exportKind = referenceLocation.originalKeywordKind === 78 ? 1 : 0;
+ var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
+ ts.Debug.assert(!!exportInfo);
+ searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state);
+ }
+ if (search.comingFrom !== 1 && exportDeclaration.moduleSpecifier && !propertyName) {
+ searchForImportedSymbol(state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier), state);
+ }
+ function addRef() {
+ addReference(referenceLocation, localSymbol, search.location, state);
+ }
+ }
+ function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) {
+ return isExportSpecifierAlias(referenceLocation, exportSpecifier) ? checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) : referenceSymbol;
+ }
+ function isExportSpecifierAlias(referenceLocation, exportSpecifier) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ ts.Debug.assert(propertyName === referenceLocation || name === referenceLocation);
+ if (propertyName) {
+ return propertyName === referenceLocation;
}
- function superConstructorAccesses(cls) {
- var symbol = cls.symbol;
- var ctr = symbol.members["__constructor"];
- if (!ctr) {
- return [];
+ else {
+ return !parent.parent.moduleSpecifier;
+ }
+ }
+ function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) {
+ var importOrExport = FindAllReferences.getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1);
+ if (!importOrExport)
+ return;
+ var symbol = importOrExport.symbol;
+ if (importOrExport.kind === 0) {
+ if (!state.isForRename || importOrExport.isNamedImport) {
+ searchForImportedSymbol(symbol, state);
}
- var result = [];
- for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150);
+ }
+ else {
+ searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state);
+ }
+ }
+ function getReferenceForShorthandProperty(_a, search, state) {
+ var flags = _a.flags, valueDeclaration = _a.valueDeclaration;
+ var shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration);
+ if (!(flags & 134217728) && search.includes(shorthandValueSymbol)) {
+ addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ }
+ }
+ function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
+ var addRef = state.referenceAdder(relatedSymbol, searchLocation);
+ if (state.implementations) {
+ addImplementationReferences(referenceLocation, addRef, state);
+ }
+ else {
+ addRef(referenceLocation);
+ }
+ }
+ function findConstructorReferences(referenceLocation, sourceFile, search, state) {
+ if (ts.isNewExpressionTarget(referenceLocation)) {
+ addReference(referenceLocation, search.symbol, search.location, state);
+ }
+ var pusher = state.referenceAdder(search.symbol, search.location);
+ if (ts.isClassLike(referenceLocation.parent)) {
+ ts.Debug.assert(referenceLocation.parent.name === referenceLocation);
+ findOwnConstructorReferences(search.symbol, sourceFile, pusher);
+ }
+ else {
+ var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
+ if (classExtending && ts.isClassLike(classExtending)) {
+ findSuperConstructorAccesses(classExtending, pusher);
+ }
+ }
+ }
+ function getPropertyAccessExpressionFromRightHandSide(node) {
+ return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ }
+ function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
+ for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ var ctrKeyword = ts.findChildOfKind(decl, 122, sourceFile);
+ ts.Debug.assert(decl.kind === 151 && !!ctrKeyword);
+ addNode(ctrKeyword);
+ }
+ classSymbol.exports.forEach(function (member) {
+ var decl = member.valueDeclaration;
+ if (decl && decl.kind === 150) {
var body = decl.body;
if (body) {
- forEachDescendantOfKind(body, 96, function (node) {
- if (ts.isCallExpressionTarget(node)) {
- result.push(node);
+ forEachDescendantOfKind(body, 98, function (thisKeyword) {
+ if (ts.isNewExpressionTarget(thisKeyword)) {
+ addNode(thisKeyword);
}
});
}
}
- ;
- return result;
+ });
+ }
+ function findSuperConstructorAccesses(cls, addNode) {
+ var symbol = cls.symbol;
+ var ctr = symbol.members.get("__constructor");
+ if (!ctr) {
+ return;
}
- function getReferencedSymbol(symbol) {
- var symbolId = ts.getSymbolId(symbol);
- var index = symbolToIndex[symbolId];
- if (index === undefined) {
- index = result.length;
- symbolToIndex[symbolId] = index;
- result.push({
- definition: getDefinition(symbol),
- references: []
+ for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ ts.Debug.assert(decl.kind === 151);
+ var body = decl.body;
+ if (body) {
+ forEachDescendantOfKind(body, 96, function (node) {
+ if (ts.isCallExpressionTarget(node)) {
+ addNode(node);
+ }
});
}
- return result[index];
- }
- function addReferenceToRelatedSymbol(node, relatedSymbol) {
- var references = getReferencedSymbol(relatedSymbol).references;
- if (implementations) {
- getImplementationReferenceEntryForNode(node, references);
- }
- else {
- references.push(getReferenceEntryFromNode(node));
- }
}
}
- function getImplementationReferenceEntryForNode(refNode, result) {
+ function addImplementationReferences(refNode, addReference, state) {
if (ts.isDeclarationName(refNode) && isImplementation(refNode.parent)) {
- result.push(getReferenceEntryFromNode(refNode.parent));
+ addReference(refNode.parent);
+ return;
}
- else if (refNode.kind === 70) {
- if (refNode.parent.kind === 258) {
- getReferenceEntriesForShorthandPropertyAssignment(refNode, typeChecker, result);
- }
- var containingClass = getContainingClassIfInHeritageClause(refNode);
- if (containingClass) {
- result.push(getReferenceEntryFromNode(containingClass));
- return;
- }
- var containingTypeReference = getContainingTypeReference(refNode);
- if (containingTypeReference) {
- var parent_18 = containingTypeReference.parent;
- if (ts.isVariableLike(parent_18) && parent_18.type === containingTypeReference && parent_18.initializer && isImplementationExpression(parent_18.initializer)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.initializer));
- }
- else if (ts.isFunctionLike(parent_18) && parent_18.type === containingTypeReference && parent_18.body) {
- if (parent_18.body.kind === 204) {
- ts.forEachReturnStatement(parent_18.body, function (returnStatement) {
- if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
- maybeAdd(getReferenceEntryFromNode(returnStatement.expression));
- }
- });
- }
- else if (isImplementationExpression(parent_18.body)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.body));
- }
+ if (refNode.kind !== 70) {
+ return;
+ }
+ if (refNode.parent.kind === 261) {
+ getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference);
+ }
+ var containingClass = getContainingClassIfInHeritageClause(refNode);
+ if (containingClass) {
+ addReference(containingClass);
+ return;
+ }
+ var containingTypeReference = getContainingTypeReference(refNode);
+ if (containingTypeReference && state.markSeenContainingTypeReference(containingTypeReference)) {
+ var parent = containingTypeReference.parent;
+ if (ts.isVariableLike(parent) && parent.type === containingTypeReference && parent.initializer && isImplementationExpression(parent.initializer)) {
+ addReference(parent.initializer);
+ }
+ else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) {
+ if (parent.body.kind === 206) {
+ ts.forEachReturnStatement(parent.body, function (returnStatement) {
+ if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
+ addReference(returnStatement.expression);
+ }
+ });
}
- else if (ts.isAssertionExpression(parent_18) && isImplementationExpression(parent_18.expression)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.expression));
+ else if (isImplementationExpression(parent.body)) {
+ addReference(parent.body);
}
}
- }
- function maybeAdd(a) {
- if (!ts.forEach(result, function (b) { return a.fileName === b.fileName && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; })) {
- result.push(a);
+ else if (ts.isAssertionExpression(parent) && isImplementationExpression(parent.expression)) {
+ addReference(parent.expression);
}
}
}
@@ -56671,28 +62861,32 @@ var ts;
}
function getContainingClassIfInHeritageClause(node) {
if (node && node.parent) {
- if (node.kind === 199
- && node.parent.kind === 255
+ if (node.kind === 200
+ && node.parent.kind === 258
&& ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
- else if (node.kind === 70 || node.kind === 177) {
+ else if (node.kind === 70 || node.kind === 178) {
return getContainingClassIfInHeritageClause(node.parent);
}
}
return undefined;
}
function isImplementationExpression(node) {
- if (node.kind === 183) {
- return isImplementationExpression(node.expression);
+ switch (node.kind) {
+ case 184:
+ return isImplementationExpression(node.expression);
+ case 186:
+ case 185:
+ case 177:
+ case 198:
+ case 176:
+ return true;
+ default:
+ return false;
}
- return node.kind === 185 ||
- node.kind === 184 ||
- node.kind === 176 ||
- node.kind === 197 ||
- node.kind === 175;
}
- function explicitlyInheritsFrom(child, parent, cachedResults) {
+ function explicitlyInheritsFrom(child, parent, cachedResults, checker) {
var parentIsInterface = parent.getFlags() & 64;
return searchHierarchy(child);
function searchHierarchy(symbol) {
@@ -56700,10 +62894,11 @@ var ts;
return true;
}
var key = ts.getSymbolId(symbol) + "," + ts.getSymbolId(parent);
- if (key in cachedResults) {
- return cachedResults[key];
+ var cached = cachedResults.get(key);
+ if (cached !== undefined) {
+ return cached;
}
- cachedResults[key] = false;
+ cachedResults.set(key, false);
var inherits = ts.forEach(symbol.getDeclarations(), function (declaration) {
if (ts.isClassLike(declaration)) {
if (parentIsInterface) {
@@ -56719,19 +62914,19 @@ var ts;
}
return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
}
- else if (declaration.kind === 227) {
+ else if (declaration.kind === 229) {
if (parentIsInterface) {
return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference);
}
}
return false;
});
- cachedResults[key] = inherits;
+ cachedResults.set(key, inherits);
return inherits;
}
function searchTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type && type.symbol) {
return searchHierarchy(type.symbol);
}
@@ -56746,13 +62941,13 @@ var ts;
}
var staticFlag = 32;
switch (searchSpaceNode.kind) {
- case 147:
- case 146:
- case 149:
case 148:
+ case 147:
case 150:
+ case 149:
case 151:
case 152:
+ case 153:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent;
break;
@@ -56762,51 +62957,51 @@ var ts;
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.kind !== 96) {
- return;
+ continue;
}
var container = ts.getSuperContainer(node, false);
if (container && (32 & ts.getModifierFlags(container)) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = getDefinition(searchSpaceNode.symbol);
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "symbol", symbol: searchSpaceNode.symbol, node: superKeyword }, references: references }];
}
- function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) {
+ function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {
var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false);
var staticFlag = 32;
switch (searchSpaceNode.kind) {
+ case 150:
case 149:
- case 148:
if (ts.isObjectLiteralMethod(searchSpaceNode)) {
break;
}
+ case 148:
case 147:
- case 146:
- case 150:
case 151:
case 152:
+ case 153:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent;
break;
- case 261:
+ case 264:
if (ts.isExternalModule(searchSpaceNode)) {
return undefined;
}
- case 225:
- case 184:
+ case 227:
+ case 185:
break;
default:
return undefined;
}
var references = [];
var possiblePositions;
- if (searchSpaceNode.kind === 261) {
+ if (searchSpaceNode.kind === 264) {
ts.forEach(sourceFiles, function (sourceFile) {
+ cancellationToken.throwIfCancellationRequested();
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
@@ -56816,139 +63011,109 @@ var ts;
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
- var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword);
- var displayParts = thisOrSuperSymbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), ts.getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts;
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: "this",
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: displayParts
- },
+ definition: { type: "this", node: thisOrSuperKeyword },
references: references
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
var node = ts.getTouchingWord(sourceFile, position);
if (!node || !ts.isThis(node)) {
return;
}
var container = ts.getThisContainer(node, false);
switch (searchSpaceNode.kind) {
- case 184:
- case 225:
+ case 185:
+ case 227:
if (searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
+ case 150:
case 149:
- case 148:
if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 197:
- case 226:
+ case 198:
+ case 228:
if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32) === staticFlag) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 261:
- if (container.kind === 261 && !ts.isExternalModule(container)) {
- result.push(getReferenceEntryFromNode(node));
+ case 264:
+ if (container.kind === 264 && !ts.isExternalModule(container)) {
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
}
});
}
}
- function getReferencesForStringLiteral(node, sourceFiles) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (!type) {
- return undefined;
- }
+ function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_9 = sourceFiles; _i < sourceFiles_9.length; _i++) {
- var sourceFile = sourceFiles_9[_i];
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, type.text, sourceFile.getStart(), sourceFile.getEnd());
- getReferencesForStringLiteralInFile(sourceFile, type, possiblePositions, references);
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_i];
+ cancellationToken.throwIfCancellationRequested();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: type.text,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: [ts.displayPart(ts.getTextOfNode(node), ts.SymbolDisplayPartKind.stringLiteral)]
- },
+ definition: { type: "string", node: node },
references: references
}];
- function getReferencesForStringLiteralInFile(sourceFile, searchType, possiblePositions, references) {
- for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
- var position = possiblePositions_1[_i];
- cancellationToken.throwIfCancellationRequested();
- var node_2 = ts.getTouchingWord(sourceFile, position);
- if (!node_2 || node_2.kind !== 9) {
- return;
- }
- var type_2 = ts.getStringLiteralTypeForNode(node_2, typeChecker);
- if (type_2 === searchType) {
- references.push(getReferenceEntryFromNode(node_2));
+ function getReferencesForStringLiteralInFile(sourceFile, searchText, possiblePositions, references) {
+ for (var _i = 0, possiblePositions_5 = possiblePositions; _i < possiblePositions_5.length; _i++) {
+ var position = possiblePositions_5[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position);
+ if (node_7 && node_7.kind === 9 && node_7.text === searchText) {
+ references.push(FindAllReferences.nodeEntry(node_7, true));
}
}
}
}
- function populateSearchSymbolSet(symbol, location) {
+ function populateSearchSymbolSet(symbol, location, checker, implementations) {
var result = [symbol];
- var containingObjectLiteralElement = getContainingObjectLiteralElement(location);
- if (containingObjectLiteralElement && containingObjectLiteralElement.kind !== 258) {
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(location);
- if (propertySymbol) {
- result.push(propertySymbol);
- }
- }
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(symbol, location);
- if (aliasSymbol) {
- result = result.concat(populateSearchSymbolSet(aliasSymbol, location));
- }
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location);
if (containingObjectLiteralElement) {
- ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- ts.addRange(result, typeChecker.getRootSymbols(contextualSymbol));
+ if (containingObjectLiteralElement.kind !== 261) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker);
+ if (propertySymbol) {
+ result.push(propertySymbol);
+ }
+ }
+ ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker), function (contextualSymbol) {
+ ts.addRange(result, checker.getRootSymbols(contextualSymbol));
});
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent);
+ var shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent);
if (shorthandValueSymbol) {
result.push(shorthandValueSymbol);
}
}
- if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 144 &&
+ if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 &&
ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) {
- result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
+ ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
}
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol);
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);
if (bindingElementPropertySymbol) {
result.push(bindingElementPropertySymbol);
}
- ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
+ for (var _i = 0, _a = checker.getRootSymbols(symbol); _i < _a.length; _i++) {
+ var rootSymbol = _a[_i];
if (rootSymbol !== symbol) {
result.push(rootSymbol);
}
if (!implementations && rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) {
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap());
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap(), checker);
}
- });
+ }
return result;
}
- function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) {
+ function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache, checker) {
if (!symbol) {
return;
}
- if (symbol.name in previousIterationSymbolsCache) {
+ if (previousIterationSymbolsCache.has(symbol.name)) {
return;
}
if (symbol.flags & (32 | 64)) {
@@ -56957,7 +63122,7 @@ var ts;
getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference);
}
- else if (declaration.kind === 227) {
+ else if (declaration.kind === 229) {
ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference);
}
});
@@ -56965,62 +63130,56 @@ var ts;
return;
function getPropertySymbolFromTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type) {
- var propertySymbol = typeChecker.getPropertyOfType(type, propertyName);
+ var propertySymbol = checker.getPropertyOfType(type, propertyName);
if (propertySymbol) {
- result.push.apply(result, typeChecker.getRootSymbols(propertySymbol));
+ result.push.apply(result, checker.getRootSymbols(propertySymbol));
}
- previousIterationSymbolsCache[symbol.name] = symbol;
- getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache);
+ previousIterationSymbolsCache.set(symbol.name, symbol);
+ getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache, checker);
}
}
}
}
- function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation, searchLocationIsConstructor, parents, cache) {
- if (ts.contains(searchSymbols, referenceSymbol)) {
- return (!searchLocationIsConstructor || ts.isNewExpressionTarget(referenceLocation)) && referenceSymbol;
+ function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {
+ if (search.includes(referenceSymbol)) {
+ return referenceSymbol;
}
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(referenceSymbol, referenceLocation);
- if (aliasSymbol) {
- return getRelatedSymbol(searchSymbols, aliasSymbol, referenceLocation, searchLocationIsConstructor, parents, cache);
- }
- var containingObjectLiteralElement = getContainingObjectLiteralElement(referenceLocation);
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(referenceLocation);
if (containingObjectLiteralElement) {
- var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, state.checker), function (contextualSymbol) {
+ return ts.find(state.checker.getRootSymbols(contextualSymbol), search.includes);
});
if (contextualSymbol) {
return contextualSymbol;
}
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation);
- if (propertySymbol && searchSymbols.indexOf(propertySymbol) >= 0) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation, state.checker);
+ if (propertySymbol && search.includes(propertySymbol)) {
return propertySymbol;
}
}
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol);
- if (bindingElementPropertySymbol && searchSymbols.indexOf(bindingElementPropertySymbol) >= 0) {
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol, state.checker);
+ if (bindingElementPropertySymbol && search.includes(bindingElementPropertySymbol)) {
return bindingElementPropertySymbol;
}
- return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) {
- if (searchSymbols.indexOf(rootSymbol) >= 0) {
+ return ts.forEach(state.checker.getRootSymbols(referenceSymbol), function (rootSymbol) {
+ if (search.includes(rootSymbol)) {
return rootSymbol;
}
if (rootSymbol.parent && rootSymbol.parent.flags & (32 | 64)) {
- if (parents) {
- if (!ts.forEach(parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, cache); })) {
- return undefined;
- }
+ if (search.parents && !ts.some(search.parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, state.checker); })) {
+ return undefined;
}
- var result_4 = [];
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_4, ts.createMap());
- return ts.forEach(result_4, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var result = [];
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, ts.createMap(), state.checker);
+ return ts.find(result, search.includes);
}
return undefined;
});
}
function getNameFromObjectLiteralElement(node) {
- if (node.name.kind === 142) {
+ if (node.name.kind === 143) {
var nameExpression = node.name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -57029,15 +63188,15 @@ var ts;
}
return node.name.text;
}
- function getPropertySymbolsFromContextualType(node) {
+ function getPropertySymbolsFromContextualType(node, checker) {
var objectLiteral = node.parent;
- var contextualType = typeChecker.getContextualType(objectLiteral);
+ var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
var result_5 = [];
- var symbol_2 = contextualType.getProperty(name);
- if (symbol_2) {
- result_5.push(symbol_2);
+ var symbol = contextualType.getProperty(name);
+ if (symbol) {
+ result_5.push(symbol);
}
if (contextualType.flags & 65536) {
ts.forEach(contextualType.types, function (t) {
@@ -57056,8 +63215,8 @@ var ts;
var lastIterationMeaning = void 0;
do {
lastIterationMeaning = meaning;
- for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
- var declaration = declarations_8[_i];
+ for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
+ var declaration = declarations_11[_i];
var declarationMeaning = ts.getMeaningFromDeclaration(declaration);
if (declarationMeaning & meaning) {
meaning |= declarationMeaning;
@@ -57067,137 +63226,86 @@ var ts;
}
return meaning;
}
- }
- FindAllReferences.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
- function convertReferences(referenceSymbols) {
- if (!referenceSymbols) {
- return undefined;
- }
- var referenceEntries = [];
- for (var _i = 0, referenceSymbols_1 = referenceSymbols; _i < referenceSymbols_1.length; _i++) {
- var referenceSymbol = referenceSymbols_1[_i];
- ts.addRange(referenceEntries, referenceSymbol.references);
- }
- return referenceEntries;
- }
- FindAllReferences.convertReferences = convertReferences;
- function isImplementation(node) {
- if (!node) {
- return false;
- }
- else if (ts.isVariableLike(node)) {
- if (node.initializer) {
- return true;
- }
- else if (node.kind === 223) {
- var parentStatement = getParentStatementOfVariableDeclaration(node);
- return parentStatement && ts.hasModifier(parentStatement, 2);
+ function isImplementation(node) {
+ if (!node) {
+ return false;
}
- }
- else if (ts.isFunctionLike(node)) {
- return !!node.body || ts.hasModifier(node, 2);
- }
- else {
- switch (node.kind) {
- case 226:
- case 197:
- case 229:
- case 230:
+ else if (ts.isVariableLike(node)) {
+ if (node.initializer) {
return true;
+ }
+ else if (node.kind === 225) {
+ var parentStatement = getParentStatementOfVariableDeclaration(node);
+ return parentStatement && ts.hasModifier(parentStatement, 2);
+ }
+ }
+ else if (ts.isFunctionLike(node)) {
+ return !!node.body || ts.hasModifier(node, 2);
+ }
+ else {
+ switch (node.kind) {
+ case 228:
+ case 198:
+ case 231:
+ case 232:
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- function getParentStatementOfVariableDeclaration(node) {
- if (node.parent && node.parent.parent && node.parent.parent.kind === 205) {
- ts.Debug.assert(node.parent.kind === 224);
- return node.parent.parent;
+ function getParentStatementOfVariableDeclaration(node) {
+ if (node.parent && node.parent.parent && node.parent.parent.kind === 207) {
+ ts.Debug.assert(node.parent.kind === 226);
+ return node.parent.parent;
+ }
}
- }
- function getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result) {
- var refSymbol = typeChecker.getSymbolAtLocation(node);
- var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
- if (shorthandSymbol) {
- for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (ts.getMeaningFromDeclaration(declaration) & 1) {
- result.push(getReferenceEntryFromNode(declaration));
+ function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference) {
+ var refSymbol = checker.getSymbolAtLocation(node);
+ var shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
+ if (shorthandSymbol) {
+ for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.getMeaningFromDeclaration(declaration) & 1) {
+ addReference(declaration);
+ }
}
}
}
- }
- FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
- function getReferenceEntryFromNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- if (node.kind === 9) {
- start += 1;
- end -= 1;
+ Core.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
+ function forEachDescendantOfKind(node, kind, action) {
+ ts.forEachChild(node, function (child) {
+ if (child.kind === kind) {
+ action(child);
+ }
+ forEachDescendantOfKind(child, kind, action);
+ });
}
- return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node)
- };
- }
- FindAllReferences.getReferenceEntryFromNode = getReferenceEntryFromNode;
- function isWriteAccess(node) {
- if (node.kind === 70 && ts.isDeclarationName(node)) {
- return true;
+ function tryGetClassByExtendingIdentifier(node) {
+ return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
}
- var parent = node.parent;
- if (parent) {
- if (parent.kind === 191 || parent.kind === 190) {
- return true;
- }
- else if (parent.kind === 192 && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 57 <= operator && operator <= 69;
+ function isNameOfExternalModuleImportOrDeclaration(node) {
+ if (node.kind === 9) {
+ return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
+ return false;
}
- return false;
- }
- function forEachDescendantOfKind(node, kind, action) {
- ts.forEachChild(node, function (child) {
- if (child.kind === kind) {
- action(child);
+ function getParentSymbolsOfPropertyAccess(location, symbol, checker) {
+ var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(location);
+ if (!propertyAccessExpression) {
+ return undefined;
+ }
+ var localParentType = checker.getTypeAtLocation(propertyAccessExpression.expression);
+ if (!localParentType) {
+ return undefined;
+ }
+ if (localParentType.symbol && localParentType.symbol.flags & (32 | 64) && localParentType.symbol !== symbol.parent) {
+ return [localParentType.symbol];
+ }
+ else if (localParentType.flags & 196608) {
+ return getSymbolsForClassAndInterfaceComponents(localParentType);
}
- forEachDescendantOfKind(child, kind, action);
- });
- }
- function getContainingObjectLiteralElement(node) {
- switch (node.kind) {
- case 9:
- case 8:
- if (node.parent.kind === 142) {
- return isObjectLiteralPropertyDeclaration(node.parent.parent) ? node.parent.parent : undefined;
- }
- case 70:
- return isObjectLiteralPropertyDeclaration(node.parent) && node.parent.name === node ? node.parent : undefined;
- }
- return undefined;
- }
- function isObjectLiteralPropertyDeclaration(node) {
- switch (node.kind) {
- case 257:
- case 258:
- case 149:
- case 151:
- case 152:
- return true;
- }
- return false;
- }
- function tryGetClassByExtendingIdentifier(node) {
- return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
- }
- function isNameOfExternalModuleImportOrDeclaration(node) {
- if (node.kind === 9) {
- return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
- return false;
- }
+ })(Core = FindAllReferences.Core || (FindAllReferences.Core = {}));
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
var ts;
@@ -57215,11 +63323,9 @@ var ts;
}
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
- var referenceFile = program.getResolvedTypeReferenceDirectives()[typeReferenceDirective.fileName];
- if (referenceFile && referenceFile.resolvedFileName) {
- return [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
- }
- return undefined;
+ var referenceFile = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName);
+ return referenceFile && referenceFile.resolvedFileName &&
+ [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
var node = ts.getTouchingPropertyName(sourceFile, position);
if (node === sourceFile) {
@@ -57228,7 +63334,7 @@ var ts;
if (ts.isJumpStatementTarget(node)) {
var labelName = node.text;
var label = ts.getTargetLabel(node.parent, node.text);
- return label ? [createDefinitionInfo(label, ts.ScriptElementKind.label, labelName, undefined)] : undefined;
+ return label ? [createDefinitionInfoFromName(label, ts.ScriptElementKind.label, labelName, undefined)] : undefined;
}
var typeChecker = program.getTypeChecker();
var calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
@@ -57243,11 +63349,11 @@ var ts;
var declaration = symbol.declarations[0];
if (node.kind === 70 &&
(node.parent === declaration ||
- (declaration.kind === 239 && declaration.parent && declaration.parent.kind === 238))) {
+ (declaration.kind === 241 && declaration.parent && declaration.parent.kind === 240))) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
}
- if (node.parent.kind === 258) {
+ if (node.parent.kind === 261) {
var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);
if (!shorthandSymbol) {
return [];
@@ -57258,6 +63364,22 @@ var ts;
var shorthandContainerName_1 = typeChecker.symbolToString(symbol.parent, node);
return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind_1, shorthandSymbolName_1, shorthandContainerName_1); });
}
+ if (ts.isJsxOpeningLikeElement(node.parent)) {
+ var _a = getSymbolInfo(typeChecker, symbol, node), symbolName = _a.symbolName, symbolKind = _a.symbolKind, containerName = _a.containerName;
+ return [createDefinitionInfo(symbol.valueDeclaration, symbolKind, symbolName, containerName)];
+ }
+ var element = ts.getContainingObjectLiteralElement(node);
+ if (element) {
+ if (typeChecker.getContextualType(element.parent)) {
+ var result = [];
+ var propertySymbols = ts.getPropertySymbolsFromContextualType(typeChecker, element);
+ for (var _i = 0, propertySymbols_1 = propertySymbols; _i < propertySymbols_1.length; _i++) {
+ var propertySymbol = propertySymbols_1[_i];
+ result.push.apply(result, getDefinitionFromSymbol(typeChecker, propertySymbol, node));
+ }
+ return result;
+ }
+ }
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
@@ -57321,31 +63443,45 @@ var ts;
return false;
}
function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) {
+ if (!signatureDeclarations) {
+ return false;
+ }
var declarations = [];
var definition;
- ts.forEach(signatureDeclarations, function (d) {
- if ((selectConstructors && d.kind === 150) ||
- (!selectConstructors && (d.kind === 225 || d.kind === 149 || d.kind === 148))) {
+ for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) {
+ var d = signatureDeclarations_1[_i];
+ if (selectConstructors ? d.kind === 151 : isSignatureDeclaration(d)) {
declarations.push(d);
if (d.body)
definition = d;
}
- });
- if (definition) {
- result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName));
- return true;
}
- else if (declarations.length) {
- result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
+ if (declarations.length) {
+ result.push(createDefinitionInfo(definition || ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
return true;
}
return false;
}
}
+ function isSignatureDeclaration(node) {
+ switch (node.kind) {
+ case 151:
+ case 227:
+ case 150:
+ case 149:
+ return true;
+ default:
+ return false;
+ }
+ }
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
+ return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ }
+ function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
+ var sourceFile = name.getSourceFile();
return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromNode(name, sourceFile),
kind: symbolKind,
name: symbolName,
containerKind: undefined,
@@ -57392,37 +63528,16 @@ var ts;
}
function tryGetSignatureDeclaration(typeChecker, node) {
var callLike = getAncestorCallLikeExpression(node);
- return callLike && typeChecker.getResolvedSignature(callLike).declaration;
- }
- })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var GoToImplementation;
- (function (GoToImplementation) {
- function getImplementationAtPosition(typeChecker, cancellationToken, sourceFiles, node) {
- if (node.parent.kind === 258) {
- var result = [];
- ts.FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result);
- return result.length > 0 ? result : undefined;
- }
- else if (node.kind === 96 || ts.isSuperProperty(node.parent)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- return symbol.valueDeclaration && [ts.FindAllReferences.getReferenceEntryFromNode(symbol.valueDeclaration)];
- }
- else {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, false, false, true);
- var result = ts.flatMap(referencedSymbols, function (symbol) {
- return ts.map(symbol.references, function (_a) {
- var textSpan = _a.textSpan, fileName = _a.fileName;
- return ({ textSpan: textSpan, fileName: fileName });
- });
- });
- return result && result.length > 0 ? result : undefined;
+ var signature = callLike && typeChecker.getResolvedSignature(callLike);
+ if (signature) {
+ var decl = signature.declaration;
+ if (decl && isSignatureDeclaration(decl)) {
+ return decl;
+ }
}
+ return undefined;
}
- GoToImplementation.getImplementationAtPosition = getImplementationAtPosition;
- })(GoToImplementation = ts.GoToImplementation || (ts.GoToImplementation = {}));
+ })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -57451,6 +63566,7 @@ var ts;
"lends",
"link",
"memberOf",
+ "method",
"name",
"namespace",
"param",
@@ -57469,7 +63585,8 @@ var ts;
"prop",
"version"
];
- var jsDocCompletionEntries;
+ var jsDocTagNameCompletionEntries;
+ var jsDocTagCompletionEntries;
function getJsDocCommentsFromDeclarations(declarations) {
var documentationComment = [];
forEachUnique(declarations, function (declaration) {
@@ -57490,9 +63607,32 @@ var ts;
return documentationComment;
}
JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations;
+ function getJsDocTagsFromDeclarations(declarations) {
+ var tags = [];
+ forEachUnique(declarations, function (declaration) {
+ var jsDocs = ts.getJSDocs(declaration);
+ if (!jsDocs) {
+ return;
+ }
+ for (var _i = 0, jsDocs_1 = jsDocs; _i < jsDocs_1.length; _i++) {
+ var doc = jsDocs_1[_i];
+ var tagsForDoc = doc.tags;
+ if (tagsForDoc) {
+ tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283; }).map(function (jsDocTag) {
+ return {
+ name: jsDocTag.tagName.text,
+ text: jsDocTag.comment
+ };
+ }));
+ }
+ }
+ });
+ return tags;
+ }
+ JsDoc.getJsDocTagsFromDeclarations = getJsDocTagsFromDeclarations;
function forEachUnique(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (ts.indexOf(array, array[i]) === i) {
var result = callback(array[i], i);
if (result) {
@@ -57503,8 +63643,8 @@ var ts;
}
return undefined;
}
- function getAllJsDocCompletionEntries() {
- return jsDocCompletionEntries || (jsDocCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ function getJSDocTagNameCompletions() {
+ return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
return {
name: tagName,
kind: ts.ScriptElementKind.keyword,
@@ -57513,7 +63653,18 @@ var ts;
};
}));
}
- JsDoc.getAllJsDocCompletionEntries = getAllJsDocCompletionEntries;
+ JsDoc.getJSDocTagNameCompletions = getJSDocTagNameCompletions;
+ function getJSDocTagCompletions() {
+ return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ return {
+ name: "@" + tagName,
+ kind: ts.ScriptElementKind.keyword,
+ kindModifiers: "",
+ sortText: "0"
+ };
+ }));
+ }
+ JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
function getDocCommentTemplateAtPosition(newLine, sourceFile, position) {
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
@@ -57526,16 +63677,16 @@ var ts;
var commentOwner;
findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) {
switch (commentOwner.kind) {
- case 225:
- case 149:
+ case 227:
case 150:
- case 226:
- case 205:
+ case 151:
+ case 228:
+ case 207:
break findOwner;
- case 261:
+ case 264:
return undefined;
- case 230:
- if (commentOwner.parent.kind === 230) {
+ case 232:
+ if (commentOwner.parent.kind === 232) {
return undefined;
}
break findOwner;
@@ -57547,14 +63698,20 @@ var ts;
var parameters = getParametersForJsDocOwningNode(commentOwner);
var posLineAndChar = sourceFile.getLineAndCharacterOfPosition(position);
var lineStart = sourceFile.getLineStarts()[posLineAndChar.line];
- var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character);
+ var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character).replace(/\S/i, function () { return " "; });
+ var isJavaScriptFile = ts.hasJavaScriptFileExtension(sourceFile.fileName);
var docParams = "";
- for (var i = 0, numParams = parameters.length; i < numParams; i++) {
+ for (var i = 0; i < parameters.length; i++) {
var currentName = parameters[i].name;
var paramName = currentName.kind === 70 ?
currentName.text :
"param" + i;
- docParams += indentationStr + " * @param " + paramName + newLine;
+ if (isJavaScriptFile) {
+ docParams += indentationStr + " * @param {any} " + paramName + newLine;
+ }
+ else {
+ docParams += indentationStr + " * @param " + paramName + newLine;
+ }
}
var preamble = "/**" + newLine +
indentationStr + " * ";
@@ -57569,7 +63726,7 @@ var ts;
if (ts.isFunctionLike(commentOwner)) {
return commentOwner.parameters;
}
- if (commentOwner.kind === 205) {
+ if (commentOwner.kind === 207) {
var varStatement = commentOwner;
var varDeclarations = varStatement.declarationList.declarations;
if (varDeclarations.length === 1 && varDeclarations[0].initializer) {
@@ -57579,17 +63736,17 @@ var ts;
return ts.emptyArray;
}
function getParametersFromRightHandSideOfAssignment(rightHandSide) {
- while (rightHandSide.kind === 183) {
+ while (rightHandSide.kind === 184) {
rightHandSide = rightHandSide.expression;
}
switch (rightHandSide.kind) {
- case 184:
case 185:
+ case 186:
return rightHandSide.parameters;
- case 197:
+ case 198:
for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150) {
+ if (member.kind === 151) {
return member.parameters;
}
}
@@ -57601,46 +63758,211 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var JsTyping;
+ (function (JsTyping) {
+ var safeList;
+ var EmptySafeList = ts.createMap();
+ JsTyping.nodeCoreModuleList = [
+ "buffer", "querystring", "events", "http", "cluster",
+ "zlib", "os", "https", "punycode", "repl", "readline",
+ "vm", "child_process", "url", "dns", "net",
+ "dgram", "fs", "path", "string_decoder", "tls",
+ "crypto", "stream", "util", "assert", "tty", "domain",
+ "constants", "process", "v8", "timers", "console"
+ ];
+ var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
+ function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
+ var inferredTypings = ts.createMap();
+ if (!typeAcquisition || !typeAcquisition.enable) {
+ return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
+ }
+ fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
+ var kind = ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f));
+ return kind === 1 || kind === 2;
+ });
+ if (!safeList) {
+ var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
+ safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
+ }
+ var filesToWatch = [];
+ var searchDirs = [];
+ var exclude = [];
+ mergeTypings(typeAcquisition.include);
+ exclude = typeAcquisition.exclude || [];
+ var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
+ if (projectRootPath) {
+ possibleSearchDirs.push(projectRootPath);
+ }
+ searchDirs = ts.deduplicate(possibleSearchDirs);
+ for (var _i = 0, searchDirs_1 = searchDirs; _i < searchDirs_1.length; _i++) {
+ var searchDir = searchDirs_1[_i];
+ var packageJsonPath = ts.combinePaths(searchDir, "package.json");
+ getTypingNamesFromJson(packageJsonPath, filesToWatch);
+ var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
+ getTypingNamesFromJson(bowerJsonPath, filesToWatch);
+ var bowerComponentsPath = ts.combinePaths(searchDir, "bower_components");
+ getTypingNamesFromPackagesFolder(bowerComponentsPath);
+ var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
+ getTypingNamesFromPackagesFolder(nodeModulesPath);
+ }
+ getTypingNamesFromSourceFileNames(fileNames);
+ if (unresolvedImports) {
+ for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
+ var moduleId = unresolvedImports_1[_a];
+ var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
+ if (!inferredTypings.has(typingName)) {
+ inferredTypings.set(typingName, undefined);
+ }
+ }
+ }
+ packageNameToTypingLocation.forEach(function (typingLocation, name) {
+ if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
+ inferredTypings.set(name, typingLocation);
+ }
+ });
+ for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
+ var excludeTypingName = exclude_1[_b];
+ inferredTypings.delete(excludeTypingName);
+ }
+ var newTypingNames = [];
+ var cachedTypingPaths = [];
+ inferredTypings.forEach(function (inferred, typing) {
+ if (inferred !== undefined) {
+ cachedTypingPaths.push(inferred);
+ }
+ else {
+ newTypingNames.push(typing);
+ }
+ });
+ return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
+ function mergeTypings(typingNames) {
+ if (!typingNames) {
+ return;
+ }
+ for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
+ var typing = typingNames_1[_i];
+ if (!inferredTypings.has(typing)) {
+ inferredTypings.set(typing, undefined);
+ }
+ }
+ }
+ function getTypingNamesFromJson(jsonPath, filesToWatch) {
+ if (host.fileExists(jsonPath)) {
+ filesToWatch.push(jsonPath);
+ }
+ var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
+ if (result.config) {
+ var jsonConfig = result.config;
+ if (jsonConfig.dependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
+ }
+ if (jsonConfig.devDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
+ }
+ if (jsonConfig.optionalDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
+ }
+ if (jsonConfig.peerDependencies) {
+ mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
+ }
+ }
+ }
+ function getTypingNamesFromSourceFileNames(fileNames) {
+ var jsFileNames = ts.filter(fileNames, ts.hasJavaScriptFileExtension);
+ var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
+ var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
+ if (safeList !== EmptySafeList) {
+ mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
+ }
+ var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
+ if (hasJsxFile) {
+ mergeTypings(["react"]);
+ }
+ }
+ function getTypingNamesFromPackagesFolder(packagesFolderPath) {
+ filesToWatch.push(packagesFolderPath);
+ if (!host.directoryExists(packagesFolderPath)) {
+ return;
+ }
+ var typingNames = [];
+ var fileNames = host.readDirectory(packagesFolderPath, [".json"], undefined, undefined, 2);
+ for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
+ var fileName = fileNames_2[_i];
+ var normalizedFileName = ts.normalizePath(fileName);
+ var baseFileName = ts.getBaseFileName(normalizedFileName);
+ if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
+ continue;
+ }
+ var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
+ if (!result.config) {
+ continue;
+ }
+ var packageJson = result.config;
+ if (baseFileName === "package.json" && packageJson._requiredBy &&
+ ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
+ continue;
+ }
+ if (!packageJson.name) {
+ continue;
+ }
+ if (packageJson.typings) {
+ var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
+ inferredTypings.set(packageJson.name, absolutePath);
+ }
+ else {
+ typingNames.push(packageJson.name);
+ }
+ }
+ mergeTypings(typingNames);
+ }
+ }
+ JsTyping.discoverTypings = discoverTypings;
+ })(JsTyping = ts.JsTyping || (ts.JsTyping = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var NavigateTo;
(function (NavigateTo) {
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- ts.forEach(sourceFiles, function (sourceFile) {
+ var _loop_4 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
- return;
+ return "continue";
}
- var nameToDeclarations = sourceFile.getNamedDeclarations();
- for (var name_46 in nameToDeclarations) {
- var declarations = nameToDeclarations[name_46];
+ ts.forEachEntry(sourceFile.getNamedDeclarations(), function (declarations, name) {
if (declarations) {
- var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_46);
+ var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name);
if (!matches) {
- continue;
+ return;
}
- for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
- var declaration = declarations_9[_i];
+ for (var _i = 0, declarations_12 = declarations; _i < declarations_12.length; _i++) {
+ var declaration = declarations_12[_i];
if (patternMatcher.patternContainsDots) {
var containers = getContainers(declaration);
if (!containers) {
- return undefined;
+ return true;
}
- matches = patternMatcher.getMatches(containers, name_46);
+ matches = patternMatcher.getMatches(containers, name);
if (!matches) {
- continue;
+ return;
}
}
var fileName = sourceFile.fileName;
var matchKind = bestMatchKind(matches);
- rawItems.push({ name: name_46, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
+ rawItems.push({ name: name, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
}
}
- }
- });
+ });
+ };
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
+ _loop_4(sourceFile);
+ }
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
- if (decl.kind === 236 || decl.kind === 239 || decl.kind === 234) {
+ if (decl.kind === 238 || decl.kind === 241 || decl.kind === 236) {
var importer = checker.getSymbolAtLocation(decl.name);
var imported = checker.getAliasedSymbol(importer);
return importer.name !== imported.name;
@@ -57681,7 +64003,7 @@ var ts;
if (text !== undefined) {
containers.unshift(text);
}
- else if (declaration.name.kind === 142) {
+ else if (declaration.name.kind === 143) {
return tryAddComputedPropertyName(declaration.name.expression, containers, true);
}
else {
@@ -57698,7 +64020,7 @@ var ts;
}
return true;
}
- if (expression.kind === 177) {
+ if (expression.kind === 178) {
var propertyAccess = expression;
if (includeLastPortion) {
containers.unshift(propertyAccess.name.text);
@@ -57709,7 +64031,7 @@ var ts;
}
function getContainers(declaration) {
var containers = [];
- if (declaration.name.kind === 142) {
+ if (declaration.name.kind === 143) {
if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) {
return undefined;
}
@@ -57750,7 +64072,7 @@ var ts;
matchKind: ts.PatternMatchKind[rawItem.matchKind],
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
- textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()),
+ textSpan: ts.createTextSpanFromNode(declaration),
containerName: container && container.name ? container.name.text : "",
containerKind: container && container.name ? ts.getNodeKind(container) : ""
};
@@ -57763,21 +64085,41 @@ var ts;
(function (ts) {
var NavigationBar;
(function (NavigationBar) {
- function getNavigationBarItems(sourceFile) {
+ var whiteSpaceRegex = /\s+/g;
+ var curCancellationToken;
+ var curSourceFile;
+ var parentsStack = [];
+ var parent;
+ var emptyChildItemArray = [];
+ function getNavigationBarItems(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
- curSourceFile = undefined;
- return result;
+ try {
+ return ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationBarItems = getNavigationBarItems;
- function getNavigationTree(sourceFile) {
+ function getNavigationTree(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = convertToTree(rootNavigationBarNode(sourceFile));
- curSourceFile = undefined;
- return result;
+ try {
+ return convertToTree(rootNavigationBarNode(sourceFile));
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationTree = getNavigationTree;
- var curSourceFile;
+ function reset() {
+ curSourceFile = undefined;
+ curCancellationToken = undefined;
+ parentsStack = [];
+ parent = undefined;
+ emptyChildItemArray = [];
+ }
function nodeText(node) {
return node.getText(curSourceFile);
}
@@ -57792,8 +64134,6 @@ var ts;
parent.children = [child];
}
}
- var parentsStack = [];
- var parent;
function rootNavigationBarNode(sourceFile) {
ts.Debug.assert(!parentsStack.length);
var root = { node: sourceFile, additionalNodes: undefined, parent: undefined, children: undefined, indent: 0 };
@@ -57837,11 +64177,12 @@ var ts;
endNode();
}
function addChildrenRecursively(node) {
+ curCancellationToken.throwIfCancellationRequested();
if (!node || ts.isToken(node)) {
return;
}
switch (node.kind) {
- case 150:
+ case 151:
var ctr = node;
addNodeWithRecursiveChild(ctr, ctr.body);
for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) {
@@ -57851,28 +64192,28 @@ var ts;
}
}
break;
- case 149:
- case 151:
+ case 150:
case 152:
- case 148:
+ case 153:
+ case 149:
if (!ts.hasDynamicName(node)) {
addNodeWithRecursiveChild(node, node.body);
}
break;
+ case 148:
case 147:
- case 146:
if (!ts.hasDynamicName(node)) {
addLeafNode(node);
}
break;
- case 236:
+ case 238:
var importClause = node;
if (importClause.name) {
addLeafNode(importClause);
}
var namedBindings = importClause.namedBindings;
if (namedBindings) {
- if (namedBindings.kind === 237) {
+ if (namedBindings.kind === 239) {
addLeafNode(namedBindings);
}
else {
@@ -57883,12 +64224,12 @@ var ts;
}
}
break;
- case 174:
- case 223:
+ case 175:
+ case 225:
var decl = node;
- var name_47 = decl.name;
- if (ts.isBindingPattern(name_47)) {
- addChildrenRecursively(name_47);
+ var name = decl.name;
+ if (ts.isBindingPattern(name)) {
+ addChildrenRecursively(name);
}
else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) {
addChildrenRecursively(decl.initializer);
@@ -57897,12 +64238,12 @@ var ts;
addNodeWithRecursiveChild(decl, decl.initializer);
}
break;
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
addNodeWithRecursiveChild(node, node.body);
break;
- case 229:
+ case 231:
startNode(node);
for (var _d = 0, _e = node.members; _d < _e.length; _d++) {
var member = _e[_d];
@@ -57912,9 +64253,9 @@ var ts;
}
endNode();
break;
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
+ case 229:
startNode(node);
for (var _f = 0, _g = node.members; _f < _g.length; _f++) {
var member = _g[_f];
@@ -57922,21 +64263,21 @@ var ts;
}
endNode();
break;
- case 230:
+ case 232:
addNodeWithRecursiveChild(node, getInteriorModule(node).body);
break;
- case 243:
- case 234:
- case 155:
- case 153:
+ case 245:
+ case 236:
+ case 156:
case 154:
- case 228:
+ case 155:
+ case 230:
addLeafNode(node);
break;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 285) {
+ if (tag.kind === 289) {
addLeafNode(tag);
}
});
@@ -57952,9 +64293,9 @@ var ts;
if (!name) {
return true;
}
- var itemsWithSameName = nameToItems[name];
+ var itemsWithSameName = nameToItems.get(name);
if (!itemsWithSameName) {
- nameToItems[name] = child;
+ nameToItems.set(name, child);
return true;
}
if (itemsWithSameName instanceof Array) {
@@ -57972,7 +64313,7 @@ var ts;
if (tryMerge(itemWithSameName, child)) {
return false;
}
- nameToItems[name] = [itemWithSameName, child];
+ nameToItems.set(name, [itemWithSameName, child]);
return true;
}
function tryMerge(a, b) {
@@ -57984,12 +64325,12 @@ var ts;
}
});
function shouldReallyMerge(a, b) {
- return a.kind === b.kind && (a.kind !== 230 || areSameModule(a, b));
+ return a.kind === b.kind && (a.kind !== 232 || areSameModule(a, b));
function areSameModule(a, b) {
if (a.body.kind !== b.body.kind) {
return false;
}
- if (a.body.kind !== 230) {
+ if (a.body.kind !== 232) {
return true;
}
return areSameModule(a.body, b.body);
@@ -58015,32 +64356,15 @@ var ts;
function compareChildren(child1, child2) {
var name1 = tryGetName(child1.node), name2 = tryGetName(child2.node);
if (name1 && name2) {
- var cmp = localeCompareFix(name1, name2);
+ var cmp = ts.compareStringsCaseInsensitive(name1, name2);
return cmp !== 0 ? cmp : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
else {
return name1 ? 1 : name2 ? -1 : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
}
- var localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
- var localeCompareFix = localeCompareIsCorrect ? ts.collator.compare : function (a, b) {
- for (var i = 0; i < Math.min(a.length, b.length); i++) {
- var chA = a.charAt(i), chB = b.charAt(i);
- if (chA === "\"" && chB === "'") {
- return 1;
- }
- if (chA === "'" && chB === "\"") {
- return -1;
- }
- var cmp = ts.compareStrings(chA.toLocaleLowerCase(), chB.toLocaleLowerCase());
- if (cmp !== 0) {
- return cmp;
- }
- }
- return a.length - b.length;
- };
function tryGetName(node) {
- if (node.kind === 230) {
+ if (node.kind === 232) {
return getModuleName(node);
}
var decl = node;
@@ -58048,18 +64372,18 @@ var ts;
return ts.getPropertyNameForPropertyNameNode(decl.name);
}
switch (node.kind) {
- case 184:
case 185:
- case 197:
+ case 186:
+ case 198:
return getFunctionOrClassName(node);
- case 285:
+ case 289:
return getJSDocTypedefTagName(node);
default:
return undefined;
}
}
function getItemName(node) {
- if (node.kind === 230) {
+ if (node.kind === 232) {
return getModuleName(node);
}
var name = node.name;
@@ -58070,29 +64394,29 @@ var ts;
}
}
switch (node.kind) {
- case 261:
+ case 264:
var sourceFile = node;
return ts.isExternalModule(sourceFile)
? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\""
: "<global>";
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
- case 226:
- case 197:
+ case 228:
+ case 198:
if (ts.getModifierFlags(node) & 512) {
return "default";
}
return getFunctionOrClassName(node);
- case 150:
+ case 151:
return "constructor";
- case 154:
+ case 155:
return "new()";
- case 153:
+ case 154:
return "()";
- case 155:
+ case 156:
return "[]";
- case 285:
+ case 289:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -58104,7 +64428,7 @@ var ts;
}
else {
var parentNode = node.parent && node.parent.parent;
- if (parentNode && parentNode.kind === 205) {
+ if (parentNode && parentNode.kind === 207) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70) {
@@ -58132,24 +64456,24 @@ var ts;
return topLevel;
function isTopLevel(item) {
switch (navigationBarNodeKind(item)) {
- case 226:
- case 197:
+ case 228:
+ case 198:
+ case 231:
case 229:
- case 227:
+ case 232:
+ case 264:
case 230:
- case 261:
- case 228:
- case 285:
+ case 289:
return true;
- case 150:
- case 149:
case 151:
+ case 150:
case 152:
- case 223:
+ case 153:
+ case 225:
return hasSomeImportantChild(item);
+ case 186:
+ case 227:
case 185:
- case 225:
- case 184:
return isTopLevelFunctionDeclaration(item);
default:
return false;
@@ -58159,10 +64483,10 @@ var ts;
return false;
}
switch (navigationBarNodeKind(item.parent)) {
- case 231:
- case 261:
- case 149:
+ case 233:
+ case 264:
case 150:
+ case 151:
return true;
default:
return hasSomeImportantChild(item);
@@ -58171,17 +64495,16 @@ var ts;
function hasSomeImportantChild(item) {
return ts.forEach(item.children, function (child) {
var childKind = navigationBarNodeKind(child);
- return childKind !== 223 && childKind !== 174;
+ return childKind !== 225 && childKind !== 175;
});
}
}
}
- var emptyChildItemArray = [];
function convertToTree(n) {
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToTree)
};
@@ -58190,7 +64513,7 @@ var ts;
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToChildItem) || emptyChildItemArray,
indent: n.indent,
@@ -58226,35 +64549,41 @@ var ts;
}
var result = [];
result.push(moduleDeclaration.name.text);
- while (moduleDeclaration.body && moduleDeclaration.body.kind === 230) {
+ while (moduleDeclaration.body && moduleDeclaration.body.kind === 232) {
moduleDeclaration = moduleDeclaration.body;
result.push(moduleDeclaration.name.text);
}
return result.join(".");
}
function getInteriorModule(decl) {
- return decl.body.kind === 230 ? getInteriorModule(decl.body) : decl;
+ return decl.body.kind === 232 ? getInteriorModule(decl.body) : decl;
}
function isComputedProperty(member) {
- return !member.name || member.name.kind === 142;
+ return !member.name || member.name.kind === 143;
}
function getNodeSpan(node) {
- return node.kind === 261
+ return node.kind === 264
? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd())
- : ts.createTextSpanFromBounds(node.getStart(curSourceFile), node.getEnd());
+ : ts.createTextSpanFromNode(node, curSourceFile);
+ }
+ function getModifiers(node) {
+ if (node.parent && node.parent.kind === 225) {
+ node = node.parent;
+ }
+ return ts.getNodeModifiers(node);
}
function getFunctionOrClassName(node) {
if (node.name && ts.getFullWidth(node.name) > 0) {
return ts.declarationNameToString(node.name);
}
- else if (node.parent.kind === 223) {
+ else if (node.parent.kind === 225) {
return ts.declarationNameToString(node.parent.name);
}
- else if (node.parent.kind === 192 &&
+ else if (node.parent.kind === 193 &&
node.parent.operatorToken.kind === 57) {
return nodeText(node.parent.left).replace(whiteSpaceRegex, "");
}
- else if (node.parent.kind === 257 && node.parent.name) {
+ else if (node.parent.kind === 260 && node.parent.name) {
return nodeText(node.parent.name);
}
else if (ts.getModifierFlags(node) & 512) {
@@ -58265,38 +64594,37 @@ var ts;
}
}
function isFunctionOrClassExpression(node) {
- return node.kind === 184 || node.kind === 185 || node.kind === 197;
+ return node.kind === 185 || node.kind === 186 || node.kind === 198;
}
- var whiteSpaceRegex = /\s+/g;
})(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var OutliningElementsCollector;
(function (OutliningElementsCollector) {
- function collectElements(sourceFile) {
+ function collectElements(sourceFile, cancellationToken) {
var elements = [];
var collapseText = "...";
function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) {
if (hintSpanNode && startElement && endElement) {
- var span_12 = {
+ var span_13 = {
textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end),
- hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
+ hintSpan: ts.createTextSpanFromNode(hintSpanNode, sourceFile),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_12);
+ elements.push(span_13);
}
}
function addOutliningSpanComments(commentSpan, autoCollapse) {
if (commentSpan) {
- var span_13 = {
+ var span_14 = {
textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_13);
+ elements.push(span_14);
}
}
function addOutliningForLeadingCommentsForNode(n) {
@@ -58308,6 +64636,7 @@ var ts;
var singleLineCommentCount = 0;
for (var _i = 0, comments_4 = comments; _i < comments_4.length; _i++) {
var currentComment = comments_4[_i];
+ cancellationToken.throwIfCancellationRequested();
if (currentComment.kind === 2) {
if (isFirstSingleLineComment) {
firstSingleLineCommentStart = currentComment.pos;
@@ -58330,19 +64659,20 @@ var ts;
function combineAndAddMultipleSingleLineComments(count, start, end) {
if (count > 1) {
var multipleSingleLineComments = {
+ kind: 2,
pos: start,
end: end,
- kind: 2
};
addOutliningSpanComments(multipleSingleLineComments, false);
}
}
function autoCollapse(node) {
- return ts.isFunctionBlock(node) && node.parent.kind !== 185;
+ return ts.isFunctionBlock(node) && node.parent.kind !== 186;
}
var depth = 0;
var maxDepth = 20;
function walk(n) {
+ cancellationToken.throwIfCancellationRequested();
if (depth > maxDepth) {
return;
}
@@ -58350,26 +64680,26 @@ var ts;
addOutliningForLeadingCommentsForNode(n);
}
switch (n.kind) {
- case 204:
+ case 206:
if (!ts.isFunctionBlock(n)) {
- var parent_19 = n.parent;
+ var parent = n.parent;
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
- if (parent_19.kind === 209 ||
- parent_19.kind === 212 ||
- parent_19.kind === 213 ||
- parent_19.kind === 211 ||
- parent_19.kind === 208 ||
- parent_19.kind === 210 ||
- parent_19.kind === 217 ||
- parent_19.kind === 256) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ if (parent.kind === 211 ||
+ parent.kind === 214 ||
+ parent.kind === 215 ||
+ parent.kind === 213 ||
+ parent.kind === 210 ||
+ parent.kind === 212 ||
+ parent.kind === 219 ||
+ parent.kind === 259) {
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- if (parent_19.kind === 221) {
- var tryStatement = parent_19;
+ if (parent.kind === 223) {
+ var tryStatement = parent;
if (tryStatement.tryBlock === n) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
else if (tryStatement.finallyBlock === n) {
@@ -58380,32 +64710,32 @@ var ts;
}
}
}
- var span_14 = ts.createTextSpanFromBounds(n.getStart(), n.end);
+ var span_15 = ts.createTextSpanFromNode(n);
elements.push({
- textSpan: span_14,
- hintSpan: span_14,
+ textSpan: span_15,
+ hintSpan: span_15,
bannerText: collapseText,
autoCollapse: autoCollapse(n)
});
break;
}
- case 231: {
+ case 233: {
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 226:
- case 227:
+ case 228:
case 229:
- case 176:
- case 232: {
+ case 231:
+ case 177:
+ case 234: {
var openBrace = ts.findChildOfKind(n, 16, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17, sourceFile);
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 175:
+ case 176:
var openBracket = ts.findChildOfKind(n, 20, sourceFile);
var closeBracket = ts.findChildOfKind(n, 21, sourceFile);
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
@@ -58482,10 +64812,11 @@ var ts;
return totalMatch;
}
function getWordSpans(word) {
- if (!(word in stringToWordSpans)) {
- stringToWordSpans[word] = breakIntoWordSpans(word);
+ var spans = stringToWordSpans.get(word);
+ if (!spans) {
+ stringToWordSpans.set(word, spans = breakIntoWordSpans(word));
}
- return stringToWordSpans[word];
+ return spans;
}
function matchTextChunk(candidate, chunk, punctuationStripped) {
var index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
@@ -58502,9 +64833,9 @@ var ts;
if (index > 0) {
var wordSpans = getWordSpans(candidate);
for (var _i = 0, wordSpans_1 = wordSpans; _i < wordSpans_1.length; _i++) {
- var span_15 = wordSpans_1[_i];
- if (partStartsWith(candidate, span_15, chunk.text, true)) {
- return createPatternMatch(PatternMatchKind.substring, punctuationStripped, partStartsWith(candidate, span_15, chunk.text, false));
+ var span_16 = wordSpans_1[_i];
+ if (partStartsWith(candidate, span_16, chunk.text, true)) {
+ return createPatternMatch(PatternMatchKind.substring, punctuationStripped, partStartsWith(candidate, span_16, chunk.text, false));
}
}
}
@@ -58667,7 +64998,8 @@ var ts;
return str === str.toLowerCase();
}
function indexOfIgnoringCase(string, value) {
- for (var i = 0, n = string.length - value.length; i <= n; i++) {
+ var n = string.length - value.length;
+ for (var i = 0; i <= n; i++) {
if (startsWithIgnoringCase(string, value, i)) {
return i;
}
@@ -58675,7 +65007,7 @@ var ts;
return -1;
}
function startsWithIgnoringCase(string, value, start) {
- for (var i = 0, n = value.length; i < n; i++) {
+ for (var i = 0; i < value.length; i++) {
var ch1 = toLowerCase(string.charCodeAt(i + start));
var ch2 = value.charCodeAt(i);
if (ch1 !== ch2) {
@@ -58743,7 +65075,7 @@ var ts;
function breakIntoSpans(identifier, word) {
var result = [];
var wordStart = 0;
- for (var i = 1, n = identifier.length; i < n; i++) {
+ for (var i = 1; i < identifier.length; i++) {
var lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
var currentIsDigit = isDigit(identifier.charCodeAt(i));
var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
@@ -58917,7 +65249,7 @@ var ts;
else {
if (token === 70 || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58943,7 +65275,7 @@ var ts;
}
if (token === 17) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58957,7 +65289,7 @@ var ts;
token = nextToken();
if (token === 70 || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58983,7 +65315,7 @@ var ts;
}
if (token === 17) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -58993,7 +65325,7 @@ var ts;
}
else if (token === 38) {
token = nextToken();
- if (token === 138) {
+ if (token === 139) {
token = nextToken();
if (token === 9) {
recordModuleName();
@@ -59120,90 +65452,85 @@ var ts;
var Rename;
(function (Rename) {
function getRenameInfo(typeChecker, defaultLibFileName, getCanonicalFileName, sourceFile, position) {
- var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName));
+ var getCanonicalDefaultLibName = ts.memoize(function () { return getCanonicalFileName(ts.normalizePath(defaultLibFileName)); });
var node = ts.getTouchingWord(sourceFile, position, true);
- if (node) {
- if (node.kind === 70 ||
- node.kind === 9 ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- ts.isThis(node)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (symbol) {
- var declarations = symbol.getDeclarations();
- if (declarations && declarations.length > 0) {
- if (ts.forEach(declarations, isDefinedInLibraryFile)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
- if (kind) {
- return {
- canRename: true,
- kind: kind,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: typeChecker.getFullyQualifiedName(symbol),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
- else if (node.kind === 9) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (type) {
- if (isDefinedInLibraryFile(node)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- else {
- var displayName = ts.stripQuotes(type.text);
- return {
- canRename: true,
- kind: ts.ScriptElementKind.variableElement,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: displayName,
- kindModifiers: ts.ScriptElementKindModifier.none,
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
+ var renameInfo = node && nodeIsEligibleForRename(node)
+ ? getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile)
+ : undefined;
+ return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element);
+ function isDefinedInLibraryFile(declaration) {
+ if (!defaultLibFileName) {
+ return false;
}
+ var sourceFile = declaration.getSourceFile();
+ var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile.fileName));
+ return canonicalName === getCanonicalDefaultLibName();
}
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element));
- function getRenameInfoError(localizedErrorMessage) {
- return {
- canRename: false,
- localizedErrorMessage: localizedErrorMessage,
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- };
- }
- function isDefinedInLibraryFile(declaration) {
- if (defaultLibFileName) {
- var sourceFile_1 = declaration.getSourceFile();
- var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_1.fileName));
- if (canonicalName === canonicalDefaultLibName) {
- return true;
+ }
+ Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ if (symbol) {
+ var declarations = symbol.getDeclarations();
+ if (declarations && declarations.length > 0) {
+ if (ts.some(declarations, isDefinedInLibraryFile)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
+ if (node.kind === 70 &&
+ node.originalKeywordKind === 78 &&
+ symbol.parent.flags & 1536) {
+ return undefined;
+ }
+ var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
+ var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
+ return kind ? getRenameInfoSuccess(displayName, typeChecker.getFullyQualifiedName(symbol), kind, ts.SymbolDisplay.getSymbolModifiers(symbol), node, sourceFile) : undefined;
}
- return false;
}
- function createTriggerSpanForNode(node, sourceFile) {
- var start = node.getStart(sourceFile);
- var width = node.getWidth(sourceFile);
- if (node.kind === 9) {
- start += 1;
- width -= 2;
+ else if (node.kind === 9) {
+ if (isDefinedInLibraryFile(node)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
- return ts.createTextSpan(start, width);
+ var displayName = ts.stripQuotes(node.text);
+ return getRenameInfoSuccess(displayName, displayName, ts.ScriptElementKind.variableElement, ts.ScriptElementKindModifier.none, node, sourceFile);
}
}
- Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) {
+ return {
+ canRename: true,
+ kind: kind,
+ displayName: displayName,
+ localizedErrorMessage: undefined,
+ fullDisplayName: fullDisplayName,
+ kindModifiers: kindModifiers,
+ triggerSpan: createTriggerSpanForNode(node, sourceFile)
+ };
+ }
+ function getRenameInfoError(diagnostic) {
+ return {
+ canRename: false,
+ localizedErrorMessage: ts.getLocaleSpecificMessage(diagnostic),
+ displayName: undefined,
+ fullDisplayName: undefined,
+ kind: undefined,
+ kindModifiers: undefined,
+ triggerSpan: undefined
+ };
+ }
+ function createTriggerSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var width = node.getWidth(sourceFile);
+ if (node.kind === 9) {
+ start += 1;
+ width -= 2;
+ }
+ return ts.createTextSpan(start, width);
+ }
+ function nodeIsEligibleForRename(node) {
+ return node.kind === 70 ||
+ node.kind === 9 ||
+ ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
+ ts.isThis(node);
+ }
})(Rename = ts.Rename || (ts.Rename = {}));
})(ts || (ts = {}));
var ts;
@@ -59211,6 +65538,13 @@ var ts;
var SignatureHelp;
(function (SignatureHelp) {
var emptyArray = [];
+ var ArgumentListKind;
+ (function (ArgumentListKind) {
+ ArgumentListKind[ArgumentListKind["TypeArguments"] = 0] = "TypeArguments";
+ ArgumentListKind[ArgumentListKind["CallArguments"] = 1] = "CallArguments";
+ ArgumentListKind[ArgumentListKind["TaggedTemplateArguments"] = 2] = "TaggedTemplateArguments";
+ ArgumentListKind[ArgumentListKind["JSXAttributesArguments"] = 3] = "JSXAttributesArguments";
+ })(ArgumentListKind = SignatureHelp.ArgumentListKind || (SignatureHelp.ArgumentListKind = {}));
function getSignatureHelpItems(program, sourceFile, position, cancellationToken) {
var typeChecker = program.getTypeChecker();
var startingToken = ts.findTokenOnLeftOfPosition(sourceFile, position);
@@ -59236,14 +65570,14 @@ var ts;
}
SignatureHelp.getSignatureHelpItems = getSignatureHelpItems;
function createJavaScriptSignatureHelpItems(argumentInfo, program) {
- if (argumentInfo.invocation.kind !== 179) {
+ if (argumentInfo.invocation.kind !== 180) {
return undefined;
}
var callExpression = argumentInfo.invocation;
var expression = callExpression.expression;
var name = expression.kind === 70
? expression
- : expression.kind === 177
+ : expression.kind === 178
? expression.name
: undefined;
if (!name || !name.text) {
@@ -59253,10 +65587,10 @@ var ts;
for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) {
var sourceFile = _a[_i];
var nameToDeclarations = sourceFile.getNamedDeclarations();
- var declarations = nameToDeclarations[name.text];
+ var declarations = nameToDeclarations.get(name.text);
if (declarations) {
- for (var _b = 0, declarations_10 = declarations; _b < declarations_10.length; _b++) {
- var declaration = declarations_10[_b];
+ for (var _b = 0, declarations_13 = declarations; _b < declarations_13.length; _b++) {
+ var declaration = declarations_13[_b];
var symbol = declaration.symbol;
if (symbol) {
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
@@ -59272,7 +65606,7 @@ var ts;
}
}
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 179 || node.parent.kind === 180) {
+ if (node.parent.kind === 180 || node.parent.kind === 181) {
var callExpression = node.parent;
if (node.kind === 26 ||
node.kind === 18) {
@@ -59304,23 +65638,23 @@ var ts;
}
return undefined;
}
- else if (node.kind === 12 && node.parent.kind === 181) {
+ else if (node.kind === 12 && node.parent.kind === 182) {
if (ts.isInsideTemplateLiteral(node, position)) {
return getArgumentListInfoForTemplate(node.parent, 0, sourceFile);
}
}
- else if (node.kind === 13 && node.parent.parent.kind === 181) {
+ else if (node.kind === 13 && node.parent.parent.kind === 182) {
var templateExpression = node.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194);
+ ts.Debug.assert(templateExpression.kind === 195);
var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1;
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
- else if (node.parent.kind === 202 && node.parent.parent.parent.kind === 181) {
+ else if (node.parent.kind === 204 && node.parent.parent.parent.kind === 182) {
var templateSpan = node.parent;
var templateExpression = templateSpan.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194);
+ ts.Debug.assert(templateExpression.kind === 195);
if (node.kind === 15 && !ts.isInsideTemplateLiteral(node, position)) {
return undefined;
}
@@ -59328,8 +65662,20 @@ var ts;
var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position);
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
+ else if (node.parent && ts.isJsxOpeningLikeElement(node.parent)) {
+ var attributeSpanStart = node.parent.attributes.getFullStart();
+ var attributeSpanEnd = ts.skipTrivia(sourceFile.text, node.parent.attributes.getEnd(), false);
+ return {
+ kind: 3,
+ invocation: node.parent,
+ argumentsSpan: ts.createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),
+ argumentIndex: 0,
+ argumentCount: 1
+ };
+ }
return undefined;
}
+ SignatureHelp.getImmediatelyContainingArgumentInfo = getImmediatelyContainingArgumentInfo;
function getArgumentIndex(argumentsList, node) {
var argumentIndex = 0;
var listChildren = argumentsList.getChildren();
@@ -59384,7 +65730,7 @@ var ts;
var template = taggedTemplate.template;
var applicableSpanStart = template.getStart();
var applicableSpanEnd = template.getEnd();
- if (template.kind === 194) {
+ if (template.kind === 195) {
var lastSpan = ts.lastOrUndefined(template.templateSpans);
if (lastSpan.literal.getFullWidth() === 0) {
applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false);
@@ -59393,7 +65739,7 @@ var ts;
return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);
}
function getContainingArgumentInfo(node, position, sourceFile) {
- for (var n = node; n.kind !== 261; n = n.parent) {
+ for (var n = node; n.kind !== 264; n = n.parent) {
if (ts.isFunctionBlock(n)) {
return undefined;
}
@@ -59476,7 +65822,8 @@ var ts;
suffixDisplayParts: suffixDisplayParts,
separatorDisplayParts: [ts.punctuationPart(25), ts.spacePart()],
parameters: signatureHelpParameters,
- documentation: candidateSignature.getDocumentationComment()
+ documentation: candidateSignature.getDocumentationComment(),
+ tags: candidateSignature.getJsDocTags()
};
});
var argumentIndex = argumentListInfo.argumentIndex;
@@ -59523,9 +65870,9 @@ var ts;
var SymbolDisplay;
(function (SymbolDisplay) {
function getSymbolKind(typeChecker, symbol, location) {
- var flags = symbol.getFlags();
+ var flags = symbol.flags;
if (flags & 32)
- return ts.getDeclarationOfKind(symbol, 197) ?
+ return ts.getDeclarationOfKind(symbol, 198) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
if (flags & 384)
return ts.ScriptElementKind.enumElement;
@@ -59535,12 +65882,12 @@ var ts;
return ts.ScriptElementKind.interfaceElement;
if (flags & 262144)
return ts.ScriptElementKind.typeParameterElement;
- var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location);
+ var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
if (result === ts.ScriptElementKind.unknown) {
if (flags & 262144)
return ts.ScriptElementKind.typeParameterElement;
if (flags & 8)
- return ts.ScriptElementKind.variableElement;
+ return ts.ScriptElementKind.enumMemberElement;
if (flags & 8388608)
return ts.ScriptElementKind.alias;
if (flags & 1536)
@@ -59549,7 +65896,7 @@ var ts;
return result;
}
SymbolDisplay.getSymbolKind = getSymbolKind;
- function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location) {
+ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) {
if (typeChecker.isUndefinedSymbol(symbol)) {
return ts.ScriptElementKind.variableElement;
}
@@ -59559,6 +65906,7 @@ var ts;
if (location.kind === 98 && ts.isExpression(location)) {
return ts.ScriptElementKind.parameterElement;
}
+ var flags = symbol.flags;
if (flags & 3) {
if (ts.isFirstDeclarationOfSymbolParameter(symbol)) {
return ts.ScriptElementKind.parameterElement;
@@ -59582,7 +65930,7 @@ var ts;
if (flags & 16384)
return ts.ScriptElementKind.constructorImplementationElement;
if (flags & 4) {
- if (flags & 268435456) {
+ if (flags & 134217728 && symbol.checkFlags & 6) {
var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
var rootSymbolFlags = rootSymbol.getFlags();
if (rootSymbolFlags & (98308 | 3)) {
@@ -59599,6 +65947,9 @@ var ts;
}
return unionPropertyKind;
}
+ if (location.parent && ts.isJsxAttribute(location.parent)) {
+ return ts.ScriptElementKind.jsxAttribute;
+ }
return ts.ScriptElementKind.memberVariableElement;
}
return ts.ScriptElementKind.unknown;
@@ -59613,8 +65964,9 @@ var ts;
if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); }
var displayParts = [];
var documentation;
+ var tags;
var symbolFlags = symbol.flags;
- var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, symbolFlags, location);
+ var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
var hasAddedSymbolInfo;
var isThisExpression = location.kind === 98 && ts.isExpression(location);
var type;
@@ -59625,26 +65977,29 @@ var ts;
var signature = void 0;
type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location);
if (type) {
- if (location.parent && location.parent.kind === 177) {
+ if (location.parent && location.parent.kind === 178) {
var right = location.parent.name;
if (right === location || (right && right.getFullWidth() === 0)) {
location = location.parent;
}
}
- var callExpression = void 0;
- if (location.kind === 179 || location.kind === 180) {
- callExpression = location;
+ var callExpressionLike = void 0;
+ if (location.kind === 180 || location.kind === 181) {
+ callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
- callExpression = location.parent;
+ callExpressionLike = location.parent;
}
- if (callExpression) {
+ else if (location.parent && ts.isJsxOpeningLikeElement(location.parent) && ts.isFunctionLike(symbol.valueDeclaration)) {
+ callExpressionLike = location.parent;
+ }
+ if (callExpressionLike) {
var candidateSignatures = [];
- signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures);
+ signature = typeChecker.getResolvedSignature(callExpressionLike, candidateSignatures);
if (!signature && candidateSignatures.length) {
signature = candidateSignatures[0];
}
- var useConstructSignatures = callExpression.kind === 180 || callExpression.expression.kind === 96;
+ var useConstructSignatures = callExpressionLike.kind === 181 || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96);
var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) {
signature = allSignatures.length ? allSignatures[0] : undefined;
@@ -59668,6 +66023,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
switch (symbolKind) {
+ case ts.ScriptElementKind.jsxAttribute:
case ts.ScriptElementKind.memberVariableElement:
case ts.ScriptElementKind.variableElement:
case ts.ScriptElementKind.constElement:
@@ -59692,21 +66048,21 @@ var ts;
}
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) ||
- (location.kind === 122 && location.parent.kind === 150)) {
+ (location.kind === 122 && location.parent.kind === 151)) {
var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 150 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ var allSignatures = functionDeclaration.kind === 151 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
}
else {
signature = allSignatures[0];
}
- if (functionDeclaration.kind === 150) {
+ if (functionDeclaration.kind === 151) {
symbolKind = ts.ScriptElementKind.constructorImplementationElement;
addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
}
else {
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 153 &&
+ addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 &&
!(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
}
addSignatureDisplayParts(signature, allSignatures);
@@ -59715,7 +66071,7 @@ var ts;
}
}
if (symbolFlags & 32 && !hasAddedSymbolInfo && !isThisExpression) {
- if (ts.getDeclarationOfKind(symbol, 197)) {
+ if (ts.getDeclarationOfKind(symbol, 198)) {
pushTypePart(ts.ScriptElementKind.localClassElement);
}
else {
@@ -59734,7 +66090,7 @@ var ts;
}
if (symbolFlags & 524288) {
addNewLineIfDisplayPartsExist();
- displayParts.push(ts.keywordPart(136));
+ displayParts.push(ts.keywordPart(137));
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
writeTypeParametersOfSymbol(symbol, sourceFile);
@@ -59755,7 +66111,7 @@ var ts;
}
if (symbolFlags & 1536) {
addNewLineIfDisplayPartsExist();
- var declaration = ts.getDeclarationOfKind(symbol, 230);
+ var declaration = ts.getDeclarationOfKind(symbol, 232);
var isNamespace = declaration && declaration.name && declaration.name.kind === 70;
displayParts.push(ts.keywordPart(isNamespace ? 128 : 127));
displayParts.push(ts.spacePart());
@@ -59774,25 +66130,25 @@ var ts;
writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration);
}
else {
- var declaration = ts.getDeclarationOfKind(symbol, 143);
+ var declaration = ts.getDeclarationOfKind(symbol, 144);
ts.Debug.assert(declaration !== undefined);
declaration = declaration.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
var signature = typeChecker.getSignatureFromDeclaration(declaration);
- if (declaration.kind === 154) {
+ if (declaration.kind === 155) {
displayParts.push(ts.keywordPart(93));
displayParts.push(ts.spacePart());
}
- else if (declaration.kind !== 153 && declaration.name) {
+ else if (declaration.kind !== 154 && declaration.name) {
addFullSymbolName(declaration.symbol);
}
ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32));
}
- else if (declaration.kind === 228) {
+ else if (declaration.kind === 230) {
addInPrefix();
- displayParts.push(ts.keywordPart(136));
+ displayParts.push(ts.keywordPart(137));
displayParts.push(ts.spacePart());
addFullSymbolName(declaration.symbol);
writeTypeParametersOfSymbol(declaration.symbol, sourceFile);
@@ -59801,9 +66157,10 @@ var ts;
}
}
if (symbolFlags & 8) {
+ symbolKind = ts.ScriptElementKind.enumMemberElement;
addPrefixForAnyFunctionOrVar(symbol, "enum member");
var declaration = symbol.declarations[0];
- if (declaration.kind === 260) {
+ if (declaration.kind === 263) {
var constantValue = typeChecker.getConstantValue(declaration);
if (constantValue !== undefined) {
displayParts.push(ts.spacePart());
@@ -59815,7 +66172,7 @@ var ts;
}
if (symbolFlags & 8388608) {
addNewLineIfDisplayPartsExist();
- if (symbol.declarations[0].kind === 233) {
+ if (symbol.declarations[0].kind === 235) {
displayParts.push(ts.keywordPart(83));
displayParts.push(ts.spacePart());
displayParts.push(ts.keywordPart(128));
@@ -59826,7 +66183,7 @@ var ts;
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 234) {
+ if (declaration.kind === 236) {
var importEqualsDeclaration = declaration;
if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) {
displayParts.push(ts.spacePart());
@@ -59861,6 +66218,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
if (symbolKind === ts.ScriptElementKind.memberVariableElement ||
+ symbolKind === ts.ScriptElementKind.jsxAttribute ||
symbolFlags & 3 ||
symbolKind === ts.ScriptElementKind.localVariableElement ||
isThisExpression) {
@@ -59893,11 +66251,12 @@ var ts;
}
if (!documentation) {
documentation = symbol.getDocumentationComment();
+ tags = symbol.getJsDocTags();
if (documentation.length === 0 && symbol.flags & 4) {
- if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 261; })) {
+ if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264; })) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (!declaration.parent || declaration.parent.kind !== 192) {
+ if (!declaration.parent || declaration.parent.kind !== 193) {
continue;
}
var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right);
@@ -59905,6 +66264,7 @@ var ts;
continue;
}
documentation = rhsSymbol.getDocumentationComment();
+ tags = rhsSymbol.getJsDocTags();
if (documentation.length > 0) {
break;
}
@@ -59912,7 +66272,7 @@ var ts;
}
}
}
- return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind };
+ return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind, tags: tags };
function addNewLineIfDisplayPartsExist() {
if (displayParts.length) {
displayParts.push(ts.lineBreakPart());
@@ -59963,6 +66323,7 @@ var ts;
displayParts.push(ts.punctuationPart(19));
}
documentation = signature.getDocumentationComment();
+ tags = signature.getJsDocTags();
}
function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) {
var typeParameterParts = ts.mapToDisplayParts(function (writer) {
@@ -59977,14 +66338,14 @@ var ts;
return false;
}
return ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 184) {
+ if (declaration.kind === 185) {
return true;
}
- if (declaration.kind !== 223 && declaration.kind !== 225) {
+ if (declaration.kind !== 225 && declaration.kind !== 227) {
return false;
}
- for (var parent_20 = declaration.parent; !ts.isFunctionBlock(parent_20); parent_20 = parent_20.parent) {
- if (parent_20.kind === 261 || parent_20.kind === 231) {
+ for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) {
+ if (parent.kind === 264 || parent.kind === 233) {
return false;
}
}
@@ -60019,7 +66380,7 @@ var ts;
sourceFile.moduleName = transpileOptions.moduleName;
}
if (transpileOptions.renamedDependencies) {
- sourceFile.renamedDependencies = ts.createMap(transpileOptions.renamedDependencies);
+ sourceFile.renamedDependencies = ts.createMapFromTemplate(transpileOptions.renamedDependencies);
}
var newLine = ts.getNewLineCharacter(options);
var outputText;
@@ -60065,10 +66426,10 @@ var ts;
var commandLineOptionsStringToEnum;
function fixupCompilerOptions(options, diagnostics) {
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || ts.filter(ts.optionDeclarations, function (o) {
- return typeof o.type === "object" && !ts.forEachProperty(o.type, function (v) { return typeof v !== "number"; });
+ return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_4 = function (opt) {
+ var _loop_5 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -60077,17 +66438,18 @@ var ts;
options[opt.name] = ts.parseCustomTypeOption(opt, value, diagnostics);
}
else {
- if (!ts.forEachProperty(opt.type, function (v) { return v === value; })) {
+ if (!ts.forEachEntry(opt.type, function (v) { return v === value; })) {
diagnostics.push(ts.createCompilerDiagnosticForInvalidCustomType(opt));
}
}
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_4(opt);
+ _loop_5(opt);
}
return options;
}
+ ts.fixupCompilerOptions = fixupCompilerOptions;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -60096,10 +66458,19 @@ var ts;
var standardScanner = ts.createScanner(5, false, 0);
var jsxScanner = ts.createScanner(5, false, 1);
var scanner;
- function getFormattingScanner(sourceFile, startPos, endPos) {
+ var ScanAction;
+ (function (ScanAction) {
+ ScanAction[ScanAction["Scan"] = 0] = "Scan";
+ ScanAction[ScanAction["RescanGreaterThanToken"] = 1] = "RescanGreaterThanToken";
+ ScanAction[ScanAction["RescanSlashToken"] = 2] = "RescanSlashToken";
+ ScanAction[ScanAction["RescanTemplateToken"] = 3] = "RescanTemplateToken";
+ ScanAction[ScanAction["RescanJsxIdentifier"] = 4] = "RescanJsxIdentifier";
+ ScanAction[ScanAction["RescanJsxText"] = 5] = "RescanJsxText";
+ })(ScanAction || (ScanAction = {}));
+ function getFormattingScanner(text, languageVariant, startPos, endPos) {
ts.Debug.assert(scanner === undefined, "Scanner should be undefined");
- scanner = sourceFile.languageVariant === 1 ? jsxScanner : standardScanner;
- scanner.setText(sourceFile.text);
+ scanner = languageVariant === 1 ? jsxScanner : standardScanner;
+ scanner.setText(text);
scanner.setTextPos(startPos);
var wasNewLine = true;
var leadingTrivia;
@@ -60175,10 +66546,10 @@ var ts;
function shouldRescanJsxIdentifier(node) {
if (node.parent) {
switch (node.parent.kind) {
+ case 252:
case 250:
- case 248:
+ case 251:
case 249:
- case 247:
return node.kind === 70;
}
}
@@ -60287,8 +66658,8 @@ var ts;
}
function isOnToken() {
ts.Debug.assert(scanner !== undefined);
- var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
- var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
+ var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
+ var startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos();
return startPos < endPos && current !== 1 && !ts.isTrivia(current);
}
function fixTokenKind(tokenInfo, container) {
@@ -60392,6 +66763,20 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var FormattingRequestKind;
+ (function (FormattingRequestKind) {
+ FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument";
+ FormattingRequestKind[FormattingRequestKind["FormatSelection"] = 1] = "FormatSelection";
+ FormattingRequestKind[FormattingRequestKind["FormatOnEnter"] = 2] = "FormatOnEnter";
+ FormattingRequestKind[FormattingRequestKind["FormatOnSemicolon"] = 3] = "FormatOnSemicolon";
+ FormattingRequestKind[FormattingRequestKind["FormatOnClosingCurlyBrace"] = 4] = "FormatOnClosingCurlyBrace";
+ })(FormattingRequestKind = formatting.FormattingRequestKind || (formatting.FormattingRequestKind = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var Rule = (function () {
function Rule(Descriptor, Operation, Flag) {
if (Flag === void 0) { Flag = 0; }
@@ -60413,6 +66798,19 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var RuleAction;
+ (function (RuleAction) {
+ RuleAction[RuleAction["Ignore"] = 1] = "Ignore";
+ RuleAction[RuleAction["Space"] = 2] = "Space";
+ RuleAction[RuleAction["NewLine"] = 4] = "NewLine";
+ RuleAction[RuleAction["Delete"] = 8] = "Delete";
+ })(RuleAction = formatting.RuleAction || (formatting.RuleAction = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var RuleDescriptor = (function () {
function RuleDescriptor(LeftTokenRange, RightTokenRange) {
this.LeftTokenRange = LeftTokenRange;
@@ -60443,6 +66841,17 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var RuleFlags;
+ (function (RuleFlags) {
+ RuleFlags[RuleFlags["None"] = 0] = "None";
+ RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines";
+ })(RuleFlags = formatting.RuleFlags || (formatting.RuleFlags = {}));
+ })(formatting = ts.formatting || (ts.formatting = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var formatting;
+ (function (formatting) {
var RuleOperation = (function () {
function RuleOperation(Context, Action) {
this.Context = Context;
@@ -60511,10 +66920,10 @@ var ts;
this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2));
this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2));
+ this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromRange(0, 141, [19])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2));
this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17, 81), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17, 105), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([19, 21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.FromTokens([21, 25, 24])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
@@ -60525,10 +66934,10 @@ var ts;
this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19, 3, 80, 101, 86, 81]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2));
- this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8));
- this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8));
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
@@ -60548,18 +66957,20 @@ var ts;
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109, 75]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2));
this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95, 24), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([19, 80, 81, 72]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2));
this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101, 86]), 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 133]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
+ this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124, 134]), 70), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127, 131]), 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 133, 114, 136, 138]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 138])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116, 74, 123, 78, 82, 83, 84, 124, 107, 90, 108, 127, 128, 111, 113, 112, 130, 134, 114, 137, 139, 126]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84, 107, 139])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9, 16), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2));
this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 35), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(35, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
@@ -60573,7 +66984,7 @@ var ts;
this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8));
this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 133, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2));
+ this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116, 70, 83, 78, 74, 114, 113, 111, 112, 124, 134, 20, 38])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2));
this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8));
this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38, formatting.Shared.TokenRange.FromTokens([70, 18])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2));
this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115, 38), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8));
@@ -60586,6 +66997,7 @@ var ts;
this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40, 28), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8));
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator,
@@ -60614,7 +67026,7 @@ var ts;
this.NoSpaceBetweenTagAndTemplateString,
this.SpaceBeforeJsxAttribute, this.SpaceBeforeSlashInJsxOpeningElement, this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement,
this.NoSpaceBeforeEqualInJsxAttribute, this.NoSpaceAfterEqualInJsxAttribute,
- this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
+ this.NoSpaceAfterModuleImport,
this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords,
this.SpaceAfterModuleName,
this.SpaceBeforeArrow, this.SpaceAfterArrow,
@@ -60629,6 +67041,7 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
+ this.NoSpaceBeforeNonNullAssertionOperator
];
this.LowPriorityCommonRules = [
this.NoSpaceBeforeSemicolon,
@@ -60637,7 +67050,6 @@ var ts;
this.NoSpaceBeforeOpenBracket,
this.NoSpaceAfterCloseBracket,
this.SpaceAfterSemicolon,
- this.NoSpaceBeforeOpenParenInFuncDecl,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
@@ -60678,43 +67090,44 @@ var ts;
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
- for (var name_48 in o) {
- if (o[name_48] === rule) {
- return name_48;
+ for (var name in o) {
+ if (o[name] === rule) {
+ return name;
}
}
throw new Error("Unknown rule");
};
Rules.IsForContext = function (context) {
- return context.contextNode.kind === 211;
+ return context.contextNode.kind === 213;
};
Rules.IsNotForContext = function (context) {
return !Rules.IsForContext(context);
};
Rules.IsBinaryOpContext = function (context) {
switch (context.contextNode.kind) {
- case 192:
case 193:
- case 200:
- case 243:
- case 239:
- case 156:
- case 164:
+ case 194:
+ case 201:
+ case 245:
+ case 241:
+ case 157:
case 165:
+ case 166:
return true;
- case 174:
- case 228:
- case 234:
- case 223:
- case 144:
- case 260:
+ case 175:
+ case 230:
+ case 236:
+ case 225:
+ case 145:
+ case 263:
+ case 148:
case 147:
- case 146:
return context.currentTokenSpan.kind === 57 || context.nextTokenSpan.kind === 57;
- case 212:
+ case 214:
+ case 144:
return context.currentTokenSpan.kind === 91 || context.nextTokenSpan.kind === 91;
- case 213:
- return context.currentTokenSpan.kind === 140 || context.nextTokenSpan.kind === 140;
+ case 215:
+ return context.currentTokenSpan.kind === 141 || context.nextTokenSpan.kind === 141;
}
return false;
};
@@ -60722,11 +67135,14 @@ var ts;
return !Rules.IsBinaryOpContext(context);
};
Rules.IsConditionalOperatorContext = function (context) {
- return context.contextNode.kind === 193;
+ return context.contextNode.kind === 194;
};
Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) {
return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context);
};
+ Rules.IsBraceWrappedContext = function (context) {
+ return context.contextNode.kind === 173 || Rules.IsSingleLineBlockContext(context);
+ };
Rules.IsBeforeMultilineBlockContext = function (context) {
return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine());
};
@@ -60747,90 +67163,96 @@ var ts;
return true;
}
switch (node.kind) {
- case 204:
- case 232:
- case 176:
- case 231:
+ case 206:
+ case 234:
+ case 177:
+ case 233:
return true;
}
return false;
};
Rules.IsFunctionDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 225:
+ case 227:
+ case 150:
case 149:
- case 148:
- case 151:
case 152:
case 153:
- case 184:
- case 150:
+ case 154:
case 185:
- case 227:
+ case 151:
+ case 186:
+ case 229:
return true;
}
return false;
};
Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) {
- return context.contextNode.kind === 225 || context.contextNode.kind === 184;
+ return context.contextNode.kind === 227 || context.contextNode.kind === 185;
};
Rules.IsTypeScriptDeclWithBlockContext = function (context) {
return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode);
};
Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) {
switch (node.kind) {
- case 226:
- case 197:
- case 227:
+ case 228:
+ case 198:
case 229:
- case 161:
- case 230:
- case 241:
- case 242:
- case 235:
- case 238:
+ case 231:
+ case 162:
+ case 232:
+ case 243:
+ case 244:
+ case 237:
+ case 240:
return true;
}
return false;
};
Rules.IsAfterCodeBlockContext = function (context) {
switch (context.currentTokenParent.kind) {
- case 226:
- case 230:
- case 229:
- case 204:
- case 256:
+ case 228:
+ case 232:
case 231:
- case 218:
+ case 259:
+ case 233:
+ case 220:
return true;
+ case 206: {
+ var blockParent = context.currentTokenParent.parent;
+ if (blockParent.kind !== 186 &&
+ blockParent.kind !== 185) {
+ return true;
+ }
+ }
}
return false;
};
Rules.IsControlDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 208:
- case 218:
- case 211:
- case 212:
- case 213:
case 210:
- case 221:
- case 209:
- case 217:
- case 256:
+ case 220:
+ case 213:
+ case 214:
+ case 215:
+ case 212:
+ case 223:
+ case 211:
+ case 219:
+ case 259:
return true;
default:
return false;
}
};
Rules.IsObjectContext = function (context) {
- return context.contextNode.kind === 176;
+ return context.contextNode.kind === 177;
};
Rules.IsFunctionCallContext = function (context) {
- return context.contextNode.kind === 179;
+ return context.contextNode.kind === 180;
};
Rules.IsNewContext = function (context) {
- return context.contextNode.kind === 180;
+ return context.contextNode.kind === 181;
};
Rules.IsFunctionCallOrNewContext = function (context) {
return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context);
@@ -60842,25 +67264,25 @@ var ts;
return context.nextTokenSpan.kind !== 21;
};
Rules.IsArrowFunctionContext = function (context) {
- return context.contextNode.kind === 185;
+ return context.contextNode.kind === 186;
};
Rules.IsNonJsxSameLineTokenContext = function (context) {
return context.TokensAreOnSameLine() && context.contextNode.kind !== 10;
};
Rules.IsNonJsxElementContext = function (context) {
- return context.contextNode.kind !== 246;
+ return context.contextNode.kind !== 248;
};
Rules.IsJsxExpressionContext = function (context) {
- return context.contextNode.kind === 252;
+ return context.contextNode.kind === 255;
};
Rules.IsNextTokenParentJsxAttribute = function (context) {
- return context.nextTokenParent.kind === 250;
+ return context.nextTokenParent.kind === 252;
};
Rules.IsJsxAttributeContext = function (context) {
- return context.contextNode.kind === 250;
+ return context.contextNode.kind === 252;
};
Rules.IsJsxSelfClosingElementContext = function (context) {
- return context.contextNode.kind === 247;
+ return context.contextNode.kind === 249;
};
Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) {
return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context);
@@ -60875,41 +67297,42 @@ var ts;
while (ts.isPartOfExpression(node)) {
node = node.parent;
}
- return node.kind === 145;
+ return node.kind === 146;
};
Rules.IsStartOfVariableDeclarationList = function (context) {
- return context.currentTokenParent.kind === 224 &&
+ return context.currentTokenParent.kind === 226 &&
context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;
};
Rules.IsNotFormatOnEnter = function (context) {
return context.formattingRequestKind !== 2;
};
Rules.IsModuleDeclContext = function (context) {
- return context.contextNode.kind === 230;
+ return context.contextNode.kind === 232;
};
Rules.IsObjectTypeContext = function (context) {
- return context.contextNode.kind === 161;
+ return context.contextNode.kind === 162;
};
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 26 && token.kind !== 28) {
return false;
}
switch (parent.kind) {
- case 157:
- case 182:
- case 226:
- case 197:
+ case 158:
+ case 183:
+ case 230:
+ case 228:
+ case 198:
+ case 229:
case 227:
- case 225:
- case 184:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 153:
case 154:
- case 179:
+ case 155:
case 180:
- case 199:
+ case 181:
+ case 200:
return true;
default:
return false;
@@ -60920,13 +67343,16 @@ var ts;
Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent);
};
Rules.IsTypeAssertionContext = function (context) {
- return context.contextNode.kind === 182;
+ return context.contextNode.kind === 183;
};
Rules.IsVoidOpContext = function (context) {
- return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 188;
+ return context.currentTokenSpan.kind === 104 && context.currentTokenParent.kind === 189;
};
Rules.IsYieldOrYieldStarWithOperand = function (context) {
- return context.contextNode.kind === 195 && context.contextNode.expression !== undefined;
+ return context.contextNode.kind === 196 && context.contextNode.expression !== undefined;
+ };
+ Rules.IsNonNullAssertionContext = function (context) {
+ return context.contextNode.kind === 202;
};
return Rules;
}());
@@ -60948,7 +67374,7 @@ var ts;
return result;
};
RulesMap.prototype.Initialize = function (rules) {
- this.mapRowLength = 140 + 1;
+ this.mapRowLength = 141 + 1;
this.map = new Array(this.mapRowLength * this.mapRowLength);
var rulesBucketConstructionStateList = new Array(this.map.length);
this.FillRules(rules, rulesBucketConstructionStateList);
@@ -60961,7 +67387,7 @@ var ts;
});
};
RulesMap.prototype.GetRuleBucketIndex = function (row, column) {
- ts.Debug.assert(row <= 140 && column <= 140, "Must compute formatting context from tokens");
+ ts.Debug.assert(row <= 141 && column <= 141, "Must compute formatting context from tokens");
var rulesBucketIndex = (row * this.mapRowLength) + column;
return rulesBucketIndex;
};
@@ -61125,7 +67551,7 @@ var ts;
}
TokenAllAccess.prototype.GetTokens = function () {
var result = [];
- for (var token = 0; token <= 140; token++) {
+ for (var token = 0; token <= 141; token++) {
result.push(token);
}
return result;
@@ -61169,9 +67595,9 @@ var ts;
}());
TokenRange.Any = TokenRange.AllTokens();
TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3]));
- TokenRange.Keywords = TokenRange.FromRange(71, 140);
+ TokenRange.Keywords = TokenRange.FromRange(71, 141);
TokenRange.BinaryOperators = TokenRange.FromRange(26, 69);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 140, 117, 125]);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91, 92, 141, 117, 125]);
TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42, 43, 51, 50]);
TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 70, 18, 20, 16, 98, 93]);
TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]);
@@ -61179,7 +67605,7 @@ var ts;
TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70, 18, 98, 93]);
TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70, 19, 21, 93]);
TokenRange.Comments = TokenRange.FromTokens([2, 3]);
- TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 134, 121, 135, 104, 118]);
+ TokenRange.TypeNames = TokenRange.FromTokens([70, 132, 135, 121, 136, 104, 118]);
Shared.TokenRange = TokenRange;
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
@@ -61201,6 +67627,9 @@ var ts;
RulesProvider.prototype.getRulesMap = function () {
return this.rulesMap;
};
+ RulesProvider.prototype.getFormatOptions = function () {
+ return this.options;
+ };
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
var activeRules = this.createActiveRules(options);
@@ -61212,6 +67641,12 @@ var ts;
};
RulesProvider.prototype.createActiveRules = function (options) {
var rules = this.globalRules.HighPriorityCommonRules.slice(0);
+ if (options.insertSpaceAfterConstructor) {
+ rules.push(this.globalRules.SpaceAfterConstructor);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceAfterConstructor);
+ }
if (options.insertSpaceAfterCommaDelimiter) {
rules.push(this.globalRules.SpaceAfterComma);
}
@@ -61290,6 +67725,12 @@ var ts;
rules.push(this.globalRules.NoSpaceBeforeBinaryOperator);
rules.push(this.globalRules.NoSpaceAfterBinaryOperator);
}
+ if (options.insertSpaceBeforeFunctionParenthesis) {
+ rules.push(this.globalRules.SpaceBeforeOpenParenInFuncDecl);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceBeforeOpenParenInFuncDecl);
+ }
if (options.placeOpenBraceOnNewLineForControlBlocks) {
rules.push(this.globalRules.NewLineBeforeOpenBraceInControl);
}
@@ -61315,6 +67756,10 @@ var ts;
(function (ts) {
var formatting;
(function (formatting) {
+ var Constants;
+ (function (Constants) {
+ Constants[Constants["Unknown"] = -1] = "Unknown";
+ })(Constants || (Constants = {}));
function formatOnEnter(position, sourceFile, rulesProvider, options) {
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
if (line === 0) {
@@ -61387,17 +67832,17 @@ var ts;
}
function isListElement(parent, node) {
switch (parent.kind) {
- case 226:
- case 227:
+ case 228:
+ case 229:
return ts.rangeContainsRange(parent.members, node);
- case 230:
+ case 232:
var body = parent.body;
- return body && body.kind === 231 && ts.rangeContainsRange(body.statements, node);
- case 261:
- case 204:
- case 231:
+ return body && body.kind === 233 && ts.rangeContainsRange(body.statements, node);
+ case 264:
+ case 206:
+ case 233:
return ts.rangeContainsRange(parent.statements, node);
- case 256:
+ case 259:
return ts.rangeContainsRange(parent.block.statements, node);
}
return false;
@@ -61476,12 +67921,17 @@ var ts;
}
return 0;
}
+ function formatNode(node, sourceFileLike, languageVariant, initialIndentation, delta, rulesProvider) {
+ var range = { pos: 0, end: sourceFileLike.text.length };
+ return formatSpanWorker(range, node, initialIndentation, delta, formatting.getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end), rulesProvider.getFormatOptions(), rulesProvider, 1, function (_) { return false; }, sourceFileLike);
+ }
+ formatting.formatNode = formatNode;
function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) {
- var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange);
- var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var enclosingNode = findEnclosingNode(originalRange, sourceFile);
- var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end);
- var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options);
+ return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options), getOwnOrInheritedDelta(enclosingNode, options, sourceFile), formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end), options, rulesProvider, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile);
+ }
+ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, options, rulesProvider, requestKind, rangeContainsError, sourceFile) {
+ var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -61496,7 +67946,6 @@ var ts;
if (enclosingNode.decorators) {
undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line;
}
- var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile);
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
}
if (!formattingScanner.isOnToken()) {
@@ -61553,18 +68002,18 @@ var ts;
return node.modifiers[0].kind;
}
switch (node.kind) {
- case 226: return 74;
- case 227: return 108;
- case 225: return 88;
- case 229: return 229;
- case 151: return 124;
- case 152: return 133;
- case 149:
+ case 228: return 74;
+ case 229: return 108;
+ case 227: return 88;
+ case 231: return 231;
+ case 152: return 124;
+ case 153: return 134;
+ case 150:
if (node.asteriskToken) {
return 38;
}
- case 147:
- case 144:
+ case 148:
+ case 145:
return node.name.kind;
}
}
@@ -61588,17 +68037,30 @@ var ts;
switch (kind) {
case 16:
case 17:
- case 20:
- case 21:
case 18:
case 19:
case 81:
case 105:
case 56:
return indentation;
- default:
- return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
+ case 40:
+ case 28: {
+ if (container.kind === 250 ||
+ container.kind === 251 ||
+ container.kind === 249) {
+ return indentation;
+ }
+ break;
+ }
+ case 20:
+ case 21: {
+ if (container.kind !== 171) {
+ return indentation;
+ }
+ break;
+ }
}
+ return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
},
getIndentation: function () { return indentation; },
getDelta: function (child) { return getEffectiveDelta(delta, child); },
@@ -61639,7 +68101,7 @@ var ts;
if (tokenInfo.token.end > node.end) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
}
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
var childStartPos = child.getStart(sourceFile);
@@ -61669,7 +68131,7 @@ var ts;
if (tokenInfo.token.end > childStartPos) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
}
if (!formattingScanner.isOnToken()) {
return inheritedIndentation;
@@ -61680,11 +68142,11 @@ var ts;
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
return inheritedIndentation;
}
- var effectiveParentStartLine = child.kind === 145 ? childStartLine : undecoratedParentStartLine;
+ var effectiveParentStartLine = child.kind === 146 ? childStartLine : undecoratedParentStartLine;
var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine);
processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);
childContextNode = node;
- if (isFirstListItem && parent.kind === 175 && inheritedIndentation === -1) {
+ if (isFirstListItem && parent.kind === 176 && inheritedIndentation === -1) {
inheritedIndentation = childIndentation.indentation;
}
return inheritedIndentation;
@@ -61704,10 +68166,10 @@ var ts;
startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1, parent, parentDynamicIndentation, parentStartLine);
listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta);
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
else {
- consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent);
}
}
}
@@ -61720,7 +68182,7 @@ var ts;
if (formattingScanner.isOnToken()) {
var tokenInfo = formattingScanner.readTokenInfo(parent);
if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) {
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
}
}
@@ -61910,7 +68372,7 @@ var ts;
startLine++;
}
var delta = indentation - nonWhitespaceColumnInFirstPart.column;
- for (var i = startIndex, len = parts.length; i < len; i++, startLine++) {
+ for (var i = startIndex; i < parts.length; i++, startLine++) {
var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile);
var nonWhitespaceCharacterAndColumn = i === 0
? nonWhitespaceColumnInFirstPart
@@ -62000,12 +68462,12 @@ var ts;
}
function getOpenTokenForList(node, list) {
switch (node.kind) {
+ case 151:
+ case 227:
+ case 185:
case 150:
- case 225:
- case 184:
case 149:
- case 148:
- case 185:
+ case 186:
if (node.typeParameters === list) {
return 26;
}
@@ -62013,8 +68475,8 @@ var ts;
return 18;
}
break;
- case 179:
case 180:
+ case 181:
if (node.typeArguments === list) {
return 26;
}
@@ -62022,7 +68484,7 @@ var ts;
return 18;
}
break;
- case 157:
+ case 158:
if (node.typeArguments === list) {
return 26;
}
@@ -62095,7 +68557,12 @@ var ts;
(function (formatting) {
var SmartIndenter;
(function (SmartIndenter) {
- function getIndentation(position, sourceFile, options) {
+ var Value;
+ (function (Value) {
+ Value[Value["Unknown"] = -1] = "Unknown";
+ })(Value || (Value = {}));
+ function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace) {
+ if (assumeNewLineBeforeCloseBrace === void 0) { assumeNewLineBeforeCloseBrace = false; }
if (position > sourceFile.text.length) {
return getBaseIndentation(options);
}
@@ -62123,7 +68590,7 @@ var ts;
var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile);
return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options);
}
- if (precedingToken.kind === 25 && precedingToken.parent.kind !== 192) {
+ if (precedingToken.kind === 25 && precedingToken.parent.kind !== 193) {
var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options);
if (actualIndentation !== -1) {
return actualIndentation;
@@ -62136,8 +68603,9 @@ var ts;
while (current) {
if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) {
currentStart = getStartLineAndCharacterForNode(current, sourceFile);
- if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) {
- indentationDelta = 0;
+ var nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile);
+ if (nextTokenKind !== 0) {
+ indentationDelta = assumeNewLineBeforeCloseBrace && nextTokenKind === 2 ? options.indentSize : 0;
}
else {
indentationDelta = lineAtPosition !== currentStart.line ? options.indentSize : 0;
@@ -62225,31 +68693,37 @@ var ts;
}
function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) {
var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) &&
- (parent.kind === 261 || !parentAndChildShareLine);
+ (parent.kind === 264 || !parentAndChildShareLine);
if (!useActualIndentation) {
return -1;
}
return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options);
}
+ var NextTokenKind;
+ (function (NextTokenKind) {
+ NextTokenKind[NextTokenKind["Unknown"] = 0] = "Unknown";
+ NextTokenKind[NextTokenKind["OpenBrace"] = 1] = "OpenBrace";
+ NextTokenKind[NextTokenKind["CloseBrace"] = 2] = "CloseBrace";
+ })(NextTokenKind || (NextTokenKind = {}));
function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) {
var nextToken = ts.findNextToken(precedingToken, current);
if (!nextToken) {
- return false;
+ return 0;
}
if (nextToken.kind === 16) {
- return true;
+ return 1;
}
else if (nextToken.kind === 17) {
var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line;
- return lineAtPosition === nextTokenStartLine;
+ return lineAtPosition === nextTokenStartLine ? 2 : 0;
}
- return false;
+ return 0;
}
function getStartLineAndCharacterForNode(n, sourceFile) {
return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));
}
function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) {
- if (parent.kind === 208 && parent.elseStatement === child) {
+ if (parent.kind === 210 && parent.elseStatement === child) {
var elseKeyword = ts.findChildOfKind(parent, 81, sourceFile);
ts.Debug.assert(elseKeyword !== undefined);
var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line;
@@ -62258,53 +68732,49 @@ var ts;
return false;
}
SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement;
+ function getListIfStartEndIsInListRange(list, start, end) {
+ return list && ts.rangeContainsStartEnd(list, start, end) ? list : undefined;
+ }
function getContainingList(node, sourceFile) {
if (node.parent) {
switch (node.parent.kind) {
- case 157:
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) {
- return node.parent.typeArguments;
- }
- break;
- case 176:
+ case 158:
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd());
+ case 177:
return node.parent.properties;
- case 175:
+ case 176:
return node.parent.elements;
- case 225:
- case 184:
+ case 227:
case 185:
+ case 186:
+ case 150:
case 149:
- case 148:
- case 153:
- case 154: {
+ case 154:
+ case 151:
+ case 160:
+ case 155: {
var start = node.getStart(sourceFile);
- if (node.parent.typeParameters &&
- ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) {
- return node.parent.typeParameters;
- }
- if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) {
- return node.parent.parameters;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd());
}
- case 180:
- case 179: {
+ case 228:
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd());
+ case 181:
+ case 180: {
var start = node.getStart(sourceFile);
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) {
- return node.parent.typeArguments;
- }
- if (node.parent.arguments &&
- ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) {
- return node.parent.arguments;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd());
}
+ case 226:
+ return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd());
+ case 240:
+ case 244:
+ return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd());
}
}
return undefined;
}
+ SmartIndenter.getContainingList = getContainingList;
function getActualIndentationForListItem(node, sourceFile, options) {
var containingList = getContainingList(node, sourceFile);
return containingList ? getActualIndentationFromList(containingList) : -1;
@@ -62317,8 +68787,8 @@ var ts;
if (node.kind === 19) {
return -1;
}
- if (node.parent && (node.parent.kind === 179 ||
- node.parent.kind === 180) &&
+ if (node.parent && (node.parent.kind === 180 ||
+ node.parent.kind === 181) &&
node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
@@ -62336,10 +68806,10 @@ var ts;
function getStartingExpression(node) {
while (true) {
switch (node.kind) {
- case 179:
case 180:
- case 177:
+ case 181:
case 178:
+ case 179:
node = node.expression;
break;
default:
@@ -62393,48 +68863,49 @@ var ts;
SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn;
function nodeContentIsAlwaysIndented(kind) {
switch (kind) {
- case 207:
- case 226:
- case 197:
- case 227:
- case 229:
+ case 209:
case 228:
- case 175:
- case 204:
+ case 198:
+ case 229:
case 231:
+ case 230:
case 176:
- case 161:
- case 163:
- case 232:
- case 254:
- case 253:
- case 183:
+ case 206:
+ case 233:
case 177:
- case 179:
+ case 162:
+ case 171:
+ case 164:
+ case 234:
+ case 257:
+ case 256:
+ case 184:
+ case 178:
case 180:
- case 205:
- case 223:
- case 240:
- case 216:
- case 193:
+ case 181:
+ case 207:
+ case 225:
+ case 242:
+ case 218:
+ case 194:
+ case 174:
case 173:
- case 172:
- case 248:
- case 247:
- case 252:
- case 148:
- case 153:
+ case 250:
+ case 249:
+ case 255:
+ case 149:
case 154:
- case 144:
- case 158:
+ case 155:
+ case 145:
case 159:
- case 166:
- case 181:
- case 189:
- case 242:
- case 238:
- case 243:
- case 239:
+ case 160:
+ case 167:
+ case 182:
+ case 190:
+ case 244:
+ case 240:
+ case 245:
+ case 241:
return true;
}
return false;
@@ -62442,27 +68913,27 @@ var ts;
function nodeWillIndentChild(parent, child, indentByDefault) {
var childKind = child ? child.kind : 0;
switch (parent.kind) {
- case 209:
- case 210:
+ case 211:
case 212:
+ case 214:
+ case 215:
case 213:
- case 211:
- case 208:
- case 225:
- case 184:
- case 149:
+ case 210:
+ case 227:
case 185:
case 150:
+ case 186:
case 151:
case 152:
- return childKind !== 204;
- case 241:
- return childKind !== 242;
- case 235:
- return childKind !== 236 ||
- (child.namedBindings && child.namedBindings.kind !== 238);
- case 246:
- return childKind !== 249;
+ case 153:
+ return childKind !== 206;
+ case 243:
+ return childKind !== 244;
+ case 237:
+ return childKind !== 238 ||
+ (child.namedBindings && child.namedBindings.kind !== 240);
+ case 248:
+ return childKind !== 251;
}
return indentByDefault;
}
@@ -62476,9 +68947,502 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var textChanges;
+ (function (textChanges) {
+ function getPos(n) {
+ return n["__pos"];
+ }
+ function setPos(n, pos) {
+ n["__pos"] = pos;
+ }
+ function getEnd(n) {
+ return n["__end"];
+ }
+ function setEnd(n, end) {
+ n["__end"] = end;
+ }
+ var Position;
+ (function (Position) {
+ Position[Position["FullStart"] = 0] = "FullStart";
+ Position[Position["Start"] = 1] = "Start";
+ })(Position = textChanges.Position || (textChanges.Position = {}));
+ function skipWhitespacesAndLineBreaks(text, start) {
+ return ts.skipTrivia(text, start, false, true);
+ }
+ function hasCommentsBeforeLineBreak(text, start) {
+ var i = start;
+ while (i < text.length) {
+ var ch = text.charCodeAt(i);
+ if (ts.isWhiteSpaceSingleLine(ch)) {
+ i++;
+ continue;
+ }
+ return ch === 47;
+ }
+ return false;
+ }
+ function getSeparatorCharacter(separator) {
+ return ts.tokenToString(separator.kind);
+ }
+ textChanges.getSeparatorCharacter = getSeparatorCharacter;
+ function getAdjustedStartPosition(sourceFile, node, options, position) {
+ if (options.useNonAdjustedStartPosition) {
+ return node.getFullStart();
+ }
+ var fullStart = node.getFullStart();
+ var start = node.getStart(sourceFile);
+ if (fullStart === start) {
+ return start;
+ }
+ var fullStartLine = ts.getLineStartPositionForPosition(fullStart, sourceFile);
+ var startLine = ts.getLineStartPositionForPosition(start, sourceFile);
+ if (startLine === fullStartLine) {
+ return position === Position.Start ? start : fullStart;
+ }
+ var adjustedStartPosition = ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, fullStartLine) + 1, sourceFile);
+ adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition);
+ return ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile);
+ }
+ textChanges.getAdjustedStartPosition = getAdjustedStartPosition;
+ function getAdjustedEndPosition(sourceFile, node, options) {
+ if (options.useNonAdjustedEndPosition) {
+ return node.getEnd();
+ }
+ var end = node.getEnd();
+ var newEnd = ts.skipTrivia(sourceFile.text, end, true);
+ return newEnd !== end && ts.isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))
+ ? newEnd
+ : end;
+ }
+ textChanges.getAdjustedEndPosition = getAdjustedEndPosition;
+ function isSeparator(node, candidate) {
+ return candidate && node.parent && (candidate.kind === 25 || (candidate.kind === 24 && node.parent.kind === 177));
+ }
+ function spaces(count) {
+ var s = "";
+ for (var i = 0; i < count; i++) {
+ s += " ";
+ }
+ return s;
+ }
+ var ChangeTracker = (function () {
+ function ChangeTracker(newLine, rulesProvider, validator) {
+ this.newLine = newLine;
+ this.rulesProvider = rulesProvider;
+ this.validator = validator;
+ this.changes = [];
+ this.newLineCharacter = ts.getNewLineCharacter({ newLine: newLine });
+ }
+ ChangeTracker.fromCodeFixContext = function (context) {
+ return new ChangeTracker(context.newLineCharacter === "\n" ? 1 : 0, context.rulesProvider);
+ };
+ ChangeTracker.prototype.deleteNode = function (sourceFile, node, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, node, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, node, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteRange = function (sourceFile, range) {
+ this.changes.push({ sourceFile: sourceFile, range: range });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeRange = function (sourceFile, startNode, endNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeInList = function (sourceFile, node) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(node, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(node);
+ if (index < 0) {
+ return this;
+ }
+ if (containingList.length === 1) {
+ this.deleteNode(sourceFile, node);
+ return this;
+ }
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ if (nextToken && isSeparator(node, nextToken)) {
+ var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), false, true);
+ var nextElement = containingList[index + 1];
+ var endPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, nextElement, {}, Position.FullStart), false, true);
+ this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });
+ }
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ if (previousToken && isSeparator(node, previousToken)) {
+ this.deleteNodeRange(sourceFile, previousToken, node);
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.replaceRange = function (sourceFile, range, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, range: range, options: options, node: newNode });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNode = function (sourceFile, oldNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, oldNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, oldNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNodeRange = function (sourceFile, startNode, endNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAt = function (sourceFile, pos, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, options: options, node: newNode, range: { pos: pos, end: pos } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeBefore = function (sourceFile, before, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, before, options, Position.Start);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: startPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) {
+ if (options === void 0) { options = {}; }
+ if ((ts.isStatementButNotDeclaration(after)) ||
+ after.kind === 148 ||
+ after.kind === 147 ||
+ after.kind === 149) {
+ if (sourceFile.text.charCodeAt(after.end - 1) !== 59) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ options: {},
+ range: { pos: after.end, end: after.end },
+ node: ts.createToken(24)
+ });
+ }
+ }
+ var endPosition = getAdjustedEndPosition(sourceFile, after, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: endPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeInListAfter = function (sourceFile, after, newNode) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(after, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(after);
+ if (index < 0) {
+ return this;
+ }
+ var end = after.getEnd();
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ if (nextToken && isSeparator(after, nextToken)) {
+ var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
+ var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
+ var prefix = void 0;
+ var startPos = void 0;
+ if (lineAndCharOfNextToken.line === lineAndCharOfNextElement.line) {
+ startPos = nextToken.end;
+ prefix = spaces(lineAndCharOfNextElement.character - lineAndCharOfNextToken.character);
+ }
+ else {
+ startPos = ts.getStartPositionOfLine(lineAndCharOfNextElement.line, sourceFile);
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: startPos, end: containingList[index + 1].getStart(sourceFile) },
+ node: newNode,
+ useIndentationFromFile: true,
+ options: {
+ prefix: prefix,
+ suffix: "" + ts.tokenToString(nextToken.kind) + sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))
+ }
+ });
+ }
+ }
+ else {
+ var afterStart = after.getStart(sourceFile);
+ var afterStartLinePosition = ts.getLineStartPositionForPosition(afterStart, sourceFile);
+ var separator = void 0;
+ var multilineList = false;
+ if (containingList.length === 1) {
+ separator = 25;
+ }
+ else {
+ var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile);
+ separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25;
+ var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile);
+ multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;
+ }
+ if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) {
+ multilineList = true;
+ }
+ if (multilineList) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: ts.createToken(separator),
+ options: {}
+ });
+ var indentation = ts.formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.rulesProvider.getFormatOptions());
+ var insertPos = ts.skipTrivia(sourceFile.text, end, true, false);
+ if (insertPos !== end && ts.isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) {
+ insertPos--;
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: insertPos, end: insertPos },
+ node: newNode,
+ options: { indentation: indentation, prefix: this.newLineCharacter }
+ });
+ }
+ else {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: newNode,
+ options: { prefix: ts.tokenToString(separator) + " " }
+ });
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.getChanges = function () {
+ var _this = this;
+ var changesPerFile = ts.createFileMap();
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var c = _a[_i];
+ var changesInFile = changesPerFile.get(c.sourceFile.path);
+ if (!changesInFile) {
+ changesPerFile.set(c.sourceFile.path, changesInFile = []);
+ }
+ changesInFile.push(c);
+ }
+ var fileChangesList = [];
+ changesPerFile.forEachValue(function (path) {
+ var changesInFile = changesPerFile.get(path);
+ var sourceFile = changesInFile[0].sourceFile;
+ var fileTextChanges = { fileName: sourceFile.fileName, textChanges: [] };
+ for (var _i = 0, _a = ChangeTracker.normalize(changesInFile); _i < _a.length; _i++) {
+ var c = _a[_i];
+ fileTextChanges.textChanges.push({
+ span: _this.computeSpan(c, sourceFile),
+ newText: _this.computeNewText(c, sourceFile)
+ });
+ }
+ fileChangesList.push(fileTextChanges);
+ });
+ return fileChangesList;
+ };
+ ChangeTracker.prototype.computeSpan = function (change, _sourceFile) {
+ return ts.createTextSpanFromBounds(change.range.pos, change.range.end);
+ };
+ ChangeTracker.prototype.computeNewText = function (change, sourceFile) {
+ if (!change.node) {
+ return "";
+ }
+ var options = change.options || {};
+ var nonFormattedText = getNonformattedText(change.node, sourceFile, this.newLine);
+ if (this.validator) {
+ this.validator(nonFormattedText);
+ }
+ var formatOptions = this.rulesProvider.getFormatOptions();
+ var pos = change.range.pos;
+ var posStartsLine = ts.getLineStartPositionForPosition(pos, sourceFile) === pos;
+ var initialIndentation = change.options.indentation !== undefined
+ ? change.options.indentation
+ : change.useIndentationFromFile
+ ? ts.formatting.SmartIndenter.getIndentation(change.range.pos, sourceFile, formatOptions, posStartsLine || (change.options.prefix === this.newLineCharacter))
+ : 0;
+ var delta = change.options.delta !== undefined
+ ? change.options.delta
+ : ts.formatting.SmartIndenter.shouldIndentChildNode(change.node)
+ ? formatOptions.indentSize
+ : 0;
+ var text = applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, this.rulesProvider);
+ text = posStartsLine || change.options.indentation !== undefined ? text : text.replace(/^\s+/, "");
+ return (options.prefix || "") + text + (options.suffix || "");
+ };
+ ChangeTracker.normalize = function (changes) {
+ var normalized = ts.stableSort(changes, function (a, b) { return a.range.pos - b.range.pos; });
+ for (var i = 0; i < normalized.length - 2; i++) {
+ ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos);
+ }
+ return normalized;
+ };
+ return ChangeTracker;
+ }());
+ textChanges.ChangeTracker = ChangeTracker;
+ function getNonformattedText(node, sourceFile, newLine) {
+ var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var writer = new Writer(ts.getNewLineCharacter(options));
+ var printer = ts.createPrinter(options, writer);
+ printer.writeNode(3, node, sourceFile, writer);
+ return { text: writer.getText(), node: assignPositionsToNode(node) };
+ }
+ textChanges.getNonformattedText = getNonformattedText;
+ function applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, rulesProvider) {
+ var lineMap = ts.computeLineStarts(nonFormattedText.text);
+ var file = {
+ text: nonFormattedText.text,
+ lineMap: lineMap,
+ getLineAndCharacterOfPosition: function (pos) { return ts.computeLineAndCharacterOfPosition(lineMap, pos); }
+ };
+ var changes = ts.formatting.formatNode(nonFormattedText.node, file, sourceFile.languageVariant, initialIndentation, delta, rulesProvider);
+ return applyChanges(nonFormattedText.text, changes);
+ }
+ textChanges.applyFormatting = applyFormatting;
+ function applyChanges(text, changes) {
+ for (var i = changes.length - 1; i >= 0; i--) {
+ var change = changes[i];
+ text = "" + text.substring(0, change.span.start) + change.newText + text.substring(ts.textSpanEnd(change.span));
+ }
+ return text;
+ }
+ textChanges.applyChanges = applyChanges;
+ function isTrivia(s) {
+ return ts.skipTrivia(s, 0) === s.length;
+ }
+ var nullTransformationContext = {
+ enableEmitNotification: ts.noop,
+ enableSubstitution: ts.noop,
+ endLexicalEnvironment: function () { return undefined; },
+ getCompilerOptions: ts.notImplemented,
+ getEmitHost: ts.notImplemented,
+ getEmitResolver: ts.notImplemented,
+ hoistFunctionDeclaration: ts.noop,
+ hoistVariableDeclaration: ts.noop,
+ isEmitNotificationEnabled: ts.notImplemented,
+ isSubstitutionEnabled: ts.notImplemented,
+ onEmitNode: ts.noop,
+ onSubstituteNode: ts.notImplemented,
+ readEmitHelpers: ts.notImplemented,
+ requestEmitHelper: ts.noop,
+ resumeLexicalEnvironment: ts.noop,
+ startLexicalEnvironment: ts.noop,
+ suspendLexicalEnvironment: ts.noop
+ };
+ function assignPositionsToNode(node) {
+ var visited = ts.visitEachChild(node, assignPositionsToNode, nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
+ var newNode = ts.nodeIsSynthesized(visited)
+ ? visited
+ : (Proxy.prototype = visited, new Proxy());
+ newNode.pos = getPos(node);
+ newNode.end = getEnd(node);
+ return newNode;
+ function Proxy() { }
+ }
+ function assignPositionsToNodeArray(nodes, visitor, test, start, count) {
+ var visited = ts.visitNodes(nodes, visitor, test, start, count);
+ if (!visited) {
+ return visited;
+ }
+ var nodeArray = visited === nodes ? ts.createNodeArray(visited.slice(0)) : visited;
+ nodeArray.pos = getPos(nodes);
+ nodeArray.end = getEnd(nodes);
+ return nodeArray;
+ }
+ var Writer = (function () {
+ function Writer(newLine) {
+ var _this = this;
+ this.lastNonTriviaPosition = 0;
+ this.writer = ts.createTextWriter(newLine);
+ this.onEmitNode = function (hint, node, printCallback) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ printCallback(hint, node);
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onBeforeEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setPos(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setEnd(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ }
+ Writer.prototype.setLastNonTriviaPosition = function (s, force) {
+ if (force || !isTrivia(s)) {
+ this.lastNonTriviaPosition = this.writer.getTextPos();
+ var i = 0;
+ while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) {
+ i++;
+ }
+ this.lastNonTriviaPosition -= i;
+ }
+ };
+ Writer.prototype.write = function (s) {
+ this.writer.write(s);
+ this.setLastNonTriviaPosition(s, false);
+ };
+ Writer.prototype.writeTextOfNode = function (text, node) {
+ this.writer.writeTextOfNode(text, node);
+ };
+ Writer.prototype.writeLine = function () {
+ this.writer.writeLine();
+ };
+ Writer.prototype.increaseIndent = function () {
+ this.writer.increaseIndent();
+ };
+ Writer.prototype.decreaseIndent = function () {
+ this.writer.decreaseIndent();
+ };
+ Writer.prototype.getText = function () {
+ return this.writer.getText();
+ };
+ Writer.prototype.rawWrite = function (s) {
+ this.writer.rawWrite(s);
+ this.setLastNonTriviaPosition(s, false);
+ };
+ Writer.prototype.writeLiteral = function (s) {
+ this.writer.writeLiteral(s);
+ this.setLastNonTriviaPosition(s, true);
+ };
+ Writer.prototype.getTextPos = function () {
+ return this.writer.getTextPos();
+ };
+ Writer.prototype.getLine = function () {
+ return this.writer.getLine();
+ };
+ Writer.prototype.getColumn = function () {
+ return this.writer.getColumn();
+ };
+ Writer.prototype.getIndent = function () {
+ return this.writer.getIndent();
+ };
+ Writer.prototype.isAtStartOfLine = function () {
+ return this.writer.isAtStartOfLine();
+ };
+ Writer.prototype.reset = function () {
+ this.writer.reset();
+ this.lastNonTriviaPosition = 0;
+ };
+ return Writer;
+ }());
+ })(textChanges = ts.textChanges || (ts.textChanges = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
- var codeFixes = ts.createMap();
+ var codeFixes = [];
function registerCodeFix(action) {
ts.forEach(action.errorCodes, function (error) {
var fixes = codeFixes[error];
@@ -62512,25 +69476,204 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
- function getOpenBraceEnd(constructor, sourceFile) {
- return constructor.body.getFirstToken(sourceFile).getEnd();
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Class_0_incorrectly_implements_interface_1.code],
+ getCodeActions: getActionForClassLikeIncorrectImplementsInterface
+ });
+ function getActionForClassLikeIncorrectImplementsInterface(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ var classDeclaration = ts.getContainingClass(token);
+ if (!classDeclaration) {
+ return undefined;
+ }
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var classType = checker.getTypeAtLocation(classDeclaration);
+ var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(classDeclaration);
+ var hasNumericIndexSignature = !!checker.getIndexTypeOfType(classType, 1);
+ var hasStringIndexSignature = !!checker.getIndexTypeOfType(classType, 0);
+ var result = [];
+ for (var _i = 0, implementedTypeNodes_2 = implementedTypeNodes; _i < implementedTypeNodes_2.length; _i++) {
+ var implementedTypeNode = implementedTypeNodes_2[_i];
+ var implementedType = checker.getTypeAtLocation(implementedTypeNode);
+ var implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
+ var nonPrivateMembers = implementedTypeSymbols.filter(function (symbol) { return !(ts.getModifierFlags(symbol.valueDeclaration) & 8); });
+ var newNodes = [];
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 1, hasNumericIndexSignature, newNodes);
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 0, hasStringIndexSignature, newNodes);
+ newNodes = newNodes.concat(codefix.createMissingMemberNodes(classDeclaration, nonPrivateMembers, checker));
+ var message = ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_interface_0), [implementedTypeNode.getText()]);
+ if (newNodes.length > 0) {
+ pushAction(result, newNodes, message);
+ }
+ }
+ return result;
+ function createAndAddMissingIndexSignatureDeclaration(type, kind, hasIndexSigOfKind, newNodes) {
+ if (hasIndexSigOfKind) {
+ return;
+ }
+ var indexInfoOfKind = checker.getIndexInfoOfType(type, kind);
+ if (!indexInfoOfKind) {
+ return;
+ }
+ var newIndexSignatureDeclaration = checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration);
+ newNodes.push(newIndexSignatureDeclaration);
+ }
+ function pushAction(result, newNodes, description) {
+ var newAction = {
+ description: description,
+ changes: codefix.newNodesToChanges(newNodes, openBrace, context)
+ };
+ result.push(newAction);
+ }
}
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- if (token.kind !== 122) {
- return undefined;
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ getCodeActions: getActionsForAddMissingMember
+ });
+ function getActionsForAddMissingMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind !== 70) {
+ return undefined;
+ }
+ if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98) {
+ return undefined;
+ }
+ var classMemberDeclaration = ts.getThisContainer(token, false);
+ if (!ts.isClassElement(classMemberDeclaration)) {
+ return undefined;
+ }
+ var classDeclaration = classMemberDeclaration.parent;
+ if (!classDeclaration || !ts.isClassLike(classDeclaration)) {
+ return undefined;
+ }
+ var isStatic = ts.hasModifier(classMemberDeclaration, 32);
+ return ts.isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
+ function getActionsForAddMissingMemberInJavaScriptFile() {
+ var memberName = token.getText();
+ if (isStatic) {
+ if (classDeclaration.kind === 198) {
+ return undefined;
+ }
+ var className = classDeclaration.name.getText();
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classDeclaration.getEnd(), length: 0 },
+ newText: "" + context.newLineCharacter + className + "." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
}
- var newPosition = getOpenBraceEnd(token.parent, sourceFile);
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
- changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "super();", span: { start: newPosition, length: 0 } }] }]
+ else {
+ var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
+ if (!classConstructor) {
+ return undefined;
+ }
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classConstructor.body.getEnd() - 1, length: 0 },
+ newText: "this." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
+ }
+ }
+ function getActionsForAddMissingMemberInTypeScriptFile() {
+ var typeNode;
+ if (token.parent.parent.kind === 193) {
+ var binaryExpression = token.parent.parent;
+ var checker = context.program.getTypeChecker();
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
+ }
+ typeNode = typeNode || ts.createKeywordTypeNode(118);
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var property = ts.createProperty(undefined, isStatic ? [ts.createToken(114)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined);
+ var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter });
+ var actions = [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_declaration_for_missing_property_0), [token.getText()]),
+ changes: propertyChangeTracker.getChanges()
}];
+ if (!isStatic) {
+ var stringTypeNode = ts.createKeywordTypeNode(135);
+ var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined);
+ var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode);
+ var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ actions.push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ changes: indexSignatureChangeTracker.getChanges()
+ });
+ }
+ return actions;
}
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
});
codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
+ });
+ function getActionForClassLikeMissingAbstractMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ if (ts.isClassLike(token.parent)) {
+ var classDeclaration = token.parent;
+ var extendsNode = ts.getClassExtendsHeritageClauseElement(classDeclaration);
+ var instantiatedExtendsType = checker.getTypeAtLocation(extendsNode);
+ var extendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType);
+ var abstractAndNonPrivateExtendsSymbols = extendsSymbols.filter(symbolPointsToNonPrivateAndAbstractMember);
+ var newNodes = codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, checker);
+ var changes = codefix.newNodesToChanges(newNodes, ts.getOpenBraceOfClassLike(classDeclaration, sourceFile), context);
+ if (changes && changes.length > 0) {
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_inherited_abstract_class),
+ changes: changes
+ }];
+ }
+ }
+ return undefined;
+ }
+ function symbolPointsToNonPrivateAndAbstractMember(symbol) {
+ var decls = symbol.getDeclarations();
+ ts.Debug.assert(!!(decls && decls.length > 0));
+ var flags = ts.getModifierFlags(decls[0]);
+ return !(flags & 8) && !!(flags & 128);
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
errorCodes: [ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
@@ -62543,7 +69686,7 @@ var ts;
if (!superCall) {
return undefined;
}
- if (superCall.expression && superCall.expression.kind == 179) {
+ if (superCall.expression && superCall.expression.kind === 180) {
var arguments_1 = superCall.expression.arguments;
for (var i = 0; i < arguments_1.length; i++) {
if (arguments_1[i].expression === token) {
@@ -62551,23 +69694,15 @@ var ts;
}
}
}
- var newPosition = getOpenBraceEnd(constructor, sourceFile);
- var changes = [{
- fileName: sourceFile.fileName, textChanges: [{
- newText: superCall.getText(sourceFile),
- span: { start: newPosition, length: 0 }
- },
- {
- newText: "",
- span: { start: superCall.getStart(sourceFile), length: superCall.getWidth(sourceFile) }
- }]
- }];
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(constructor, sourceFile), superCall, { suffix: context.newLineCharacter });
+ changeTracker.deleteNode(sourceFile, superCall);
return [{
description: ts.getLocaleSpecificMessage(ts.Diagnostics.Make_super_call_the_first_statement_in_the_constructor),
- changes: changes
+ changes: changeTracker.getChanges()
}];
function findSuperCall(n) {
- if (n.kind === 207 && ts.isSuperCall(n.expression)) {
+ if (n.kind === 209 && ts.isSuperCall(n.expression)) {
return n;
}
if (ts.isFunctionLike(n)) {
@@ -62583,6 +69718,248 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 122) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var superCall = ts.createStatement(ts.createCall(ts.createSuper(), undefined, ts.emptyArray));
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(token.parent, sourceFile), superCall, { suffix: context.newLineCharacter });
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var classDeclNode = ts.getContainingClass(token);
+ if (!(token.kind === 70 && ts.isClassLike(classDeclNode))) {
+ return undefined;
+ }
+ var heritageClauses = classDeclNode.heritageClauses;
+ if (!(heritageClauses && heritageClauses.length > 0)) {
+ return undefined;
+ }
+ var extendsToken = heritageClauses[0].getFirstToken();
+ if (!(extendsToken && extendsToken.kind === 84)) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107));
+ for (var i = 1; i < heritageClauses.length; i++) {
+ var keywordToken = heritageClauses[i].getFirstToken();
+ if (keywordToken) {
+ changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25));
+ }
+ }
+ var result = [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Change_extends_to_implements),
+ changes: changeTracker.getChanges()
+ }];
+ return result;
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 70) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createThis(), token));
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_this_to_unresolved_variable),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics._0_is_declared_but_never_used.code,
+ ts.Diagnostics.Property_0_is_declared_but_never_used.code
+ ],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind === 20) {
+ token = ts.getTokenAtPosition(sourceFile, start + 1);
+ }
+ switch (token.kind) {
+ case 70:
+ switch (token.parent.kind) {
+ case 225:
+ switch (token.parent.parent.parent.kind) {
+ case 213:
+ var forStatement = token.parent.parent.parent;
+ var forInitializer = forStatement.initializer;
+ if (forInitializer.declarations.length === 1) {
+ return deleteNode(forInitializer);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 215:
+ var forOfStatement = token.parent.parent.parent;
+ if (forOfStatement.initializer.kind === 226) {
+ var forOfInitializer = forOfStatement.initializer;
+ return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
+ }
+ break;
+ case 214:
+ return undefined;
+ case 259:
+ var catchClause = token.parent.parent;
+ var parameter = catchClause.variableDeclaration.getChildren()[0];
+ return deleteNode(parameter);
+ default:
+ var variableStatement = token.parent.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return deleteNode(variableStatement);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ }
+ case 144:
+ var typeParameters = token.parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
+ if (!previousToken || previousToken.kind !== 26) {
+ return deleteRange(typeParameters);
+ }
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
+ if (!nextToken || nextToken.kind !== 28) {
+ return deleteRange(typeParameters);
+ }
+ return deleteNodeRange(previousToken, nextToken);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 145:
+ var functionDeclaration = token.parent.parent;
+ if (functionDeclaration.parameters.length === 1) {
+ return deleteNode(token.parent);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 236:
+ var importEquals = ts.getAncestor(token, 236);
+ return deleteNode(importEquals);
+ case 241:
+ var namedImports = token.parent.parent;
+ if (namedImports.elements.length === 1) {
+ var importSpec = ts.getAncestor(token, 237);
+ return deleteNode(importSpec);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 238:
+ var importClause = token.parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 237);
+ return deleteNode(importDecl);
+ }
+ else {
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
+ if (nextToken && nextToken.kind === 25) {
+ return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) });
+ }
+ else {
+ return deleteNode(importClause.name);
+ }
+ }
+ case 239:
+ var namespaceImport = token.parent;
+ if (namespaceImport.name === token && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 237);
+ return deleteNode(importDecl);
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
+ if (previousToken && previousToken.kind === 25) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return deleteRange({ pos: startPosition, end: namespaceImport.end });
+ }
+ return deleteRange(namespaceImport);
+ }
+ }
+ break;
+ case 148:
+ case 239:
+ return deleteNode(token.parent);
+ }
+ if (ts.isDeclarationName(token)) {
+ return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
+ function deleteNode(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
+ }
+ function deleteRange(range) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteRange(sourceFile, range));
+ }
+ function deleteNodeInList(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeInList(sourceFile, n));
+ }
+ function deleteNodeRange(start, end) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeRange(sourceFile, start, end));
+ }
+ function replaceNode(n, newNode) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).replaceNode(sourceFile, n, newNode));
+ }
+ function makeChange(changeTracker) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -62591,18 +69968,19 @@ var ts;
})(ModuleSpecifierComparison || (ModuleSpecifierComparison = {}));
var ImportCodeActionMap = (function () {
function ImportCodeActionMap() {
- this.symbolIdToActionMap = ts.createMap();
+ this.symbolIdToActionMap = [];
}
ImportCodeActionMap.prototype.addAction = function (symbolId, newAction) {
if (!newAction) {
return;
}
- if (!this.symbolIdToActionMap[symbolId]) {
+ var actions = this.symbolIdToActionMap[symbolId];
+ if (!actions) {
this.symbolIdToActionMap[symbolId] = [newAction];
return;
}
if (newAction.kind === "CodeChange") {
- this.symbolIdToActionMap[symbolId].push(newAction);
+ actions.push(newAction);
return;
}
var updatedNewImports = [];
@@ -62635,8 +70013,8 @@ var ts;
};
ImportCodeActionMap.prototype.getAllActions = function () {
var result = [];
- for (var symbolId in this.symbolIdToActionMap) {
- result = ts.concatenate(result, this.symbolIdToActionMap[symbolId]);
+ for (var key in this.symbolIdToActionMap) {
+ result = ts.concatenate(result, this.symbolIdToActionMap[key]);
}
return result;
};
@@ -62665,7 +70043,11 @@ var ts;
return ImportCodeActionMap;
}());
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Cannot_find_name_0.code],
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_namespace_0.code,
+ ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
+ ],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var checker = context.program.getTypeChecker();
@@ -62674,18 +70056,22 @@ var ts;
var token = ts.getTokenAtPosition(sourceFile, context.span.start);
var name = token.getText();
var symbolIdActionMap = new ImportCodeActionMap();
- var cachedImportDeclarations = ts.createMap();
- var cachedNewImportInsertPosition;
- var allPotentialModules = checker.getAmbientModules();
+ var cachedImportDeclarations = [];
+ var lastImportDeclaration;
+ var currentTokenMeaning = ts.getMeaningFromLocation(token);
+ if (context.errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
+ var symbol = checker.getAliasedSymbol(checker.getSymbolAtLocation(token));
+ return getCodeActionForImport(symbol, false, true);
+ }
+ var candidateModules = checker.getAmbientModules();
for (var _i = 0, allSourceFiles_1 = allSourceFiles; _i < allSourceFiles_1.length; _i++) {
var otherSourceFile = allSourceFiles_1[_i];
if (otherSourceFile !== sourceFile && ts.isExternalOrCommonJsModule(otherSourceFile)) {
- allPotentialModules.push(otherSourceFile.symbol);
+ candidateModules.push(otherSourceFile.symbol);
}
}
- var currentTokenMeaning = ts.getMeaningFromLocation(token);
- for (var _a = 0, allPotentialModules_1 = allPotentialModules; _a < allPotentialModules_1.length; _a++) {
- var moduleSymbol = allPotentialModules_1[_a];
+ for (var _a = 0, candidateModules_1 = candidateModules; _a < candidateModules_1.length; _a++) {
+ var moduleSymbol = candidateModules_1[_a];
context.cancellationToken.throwIfCancellationRequested();
var defaultExport = checker.tryGetMemberInModuleExports("default", moduleSymbol);
if (defaultExport) {
@@ -62704,8 +70090,9 @@ var ts;
return symbolIdActionMap.getAllActions();
function getImportDeclarations(moduleSymbol) {
var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- if (cachedImportDeclarations[moduleSymbolId]) {
- return cachedImportDeclarations[moduleSymbolId];
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
}
var existingDeclarations = [];
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
@@ -62720,10 +70107,10 @@ var ts;
function getImportDeclaration(moduleSpecifier) {
var node = moduleSpecifier;
while (node) {
- if (node.kind === 235) {
+ if (node.kind === 237) {
return node;
}
- if (node.kind === 234) {
+ if (node.kind === 236) {
return node;
}
node = node.parent;
@@ -62741,7 +70128,7 @@ var ts;
var declarations = symbol.getDeclarations();
return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
}
- function getCodeActionForImport(moduleSymbol, isDefault) {
+ function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
var existingDeclarations = getImportDeclarations(moduleSymbol);
if (existingDeclarations.length > 0) {
return getCodeActionsForExistingImport(existingDeclarations);
@@ -62754,11 +70141,11 @@ var ts;
var namespaceImportDeclaration;
var namedImportDeclaration;
var existingModuleSpecifier;
- for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
- var declaration = declarations_11[_i];
- if (declaration.kind === 235) {
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 237) {
var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 237) {
+ if (namedBindings && namedBindings.kind === 239) {
namespaceImportDeclaration = declaration;
}
else {
@@ -62774,94 +70161,82 @@ var ts;
if (namespaceImportDeclaration) {
actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
}
- if (namedImportDeclaration && namedImportDeclaration.importClause &&
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
(namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
- var textChange = getTextChangeForImportClause(namedImportDeclaration.importClause);
+ var fileTextChanges = getTextChangeForImportClause(namedImportDeclaration.importClause);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(namedImportDeclaration.moduleSpecifier.getText());
- actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], textChange.newText, textChange.span, sourceFile.fileName, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
}
else {
actions.push(getCodeActionForNewImport(existingModuleSpecifier));
}
return actions;
function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 245) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 247) {
return declaration.moduleReference.expression.getText();
}
return declaration.moduleReference.getText();
}
function getTextChangeForImportClause(importClause) {
- var newImportText = isDefault ? "default as " + name : name;
var importList = importClause.namedBindings;
- if (!importList && importClause.name) {
- var start = importClause.name.getEnd();
- return {
- newText: ", { " + newImportText + " }",
- span: { start: start, length: 0 }
- };
+ var newImportSpecifier = ts.createImportSpecifier(undefined, ts.createIdentifier(name));
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
}
- if (importList.elements.length === 0) {
- var start = importList.getStart();
- return {
- newText: "{ " + newImportText + " }",
- span: { start: start, length: importList.getEnd() - start }
- };
- }
- var insertPoint = importList.elements[importList.elements.length - 1].getEnd();
- var startLine = ts.getLineOfLocalPosition(sourceFile, importList.getStart());
- var endLine = ts.getLineOfLocalPosition(sourceFile, importList.getEnd());
- var oneImportPerLine = endLine - startLine > importList.elements.length;
- return {
- newText: "," + (oneImportPerLine ? context.newLineCharacter : " ") + newImportText,
- span: { start: insertPoint, length: 0 }
- };
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
}
function getCodeActionForNamespaceImport(declaration) {
var namespacePrefix;
- if (declaration.kind === 235) {
+ if (declaration.kind === 237) {
namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
namespacePrefix = declaration.name.getText();
}
namespacePrefix = ts.stripQuotes(namespacePrefix);
- return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], namespacePrefix + ".", { start: token.getStart(), length: 0 }, sourceFile.fileName, "CodeChange");
+ return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
}
}
function getCodeActionForNewImport(moduleSpecifier) {
- if (!cachedNewImportInsertPosition) {
- var lastModuleSpecifierEnd = -1;
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var moduleSpecifier_1 = _a[_i];
- var end = moduleSpecifier_1.getEnd();
- if (!lastModuleSpecifierEnd || end > lastModuleSpecifierEnd) {
- lastModuleSpecifierEnd = end;
+ if (!lastImportDeclaration) {
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 236 || statement.kind === 237) {
+ lastImportDeclaration = statement;
+ break;
}
}
- cachedNewImportInsertPosition = lastModuleSpecifierEnd > 0 ? sourceFile.getLineEndOfPosition(lastModuleSpecifierEnd) : sourceFile.getStart();
}
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- var importStatementText = isDefault
- ? "import " + name + " from \"" + moduleSpecifierWithoutQuotes + "\""
- : "import { " + name + " } from \"" + moduleSpecifierWithoutQuotes + "\"";
- var newText = cachedNewImportInsertPosition === sourceFile.getStart()
- ? importStatementText + ";" + context.newLineCharacter + context.newLineCharacter
- : "" + context.newLineCharacter + importStatementText + ";";
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], newText, { start: cachedNewImportInsertPosition, length: 0 }, sourceFile.fileName, "NewImport", moduleSpecifierWithoutQuotes);
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(name), undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(undefined, ts.createNamespaceImport(ts.createIdentifier(name)))
+ : ts.createImportClause(undefined, ts.createNamedImports([ts.createImportSpecifier(undefined, ts.createIdentifier(name))]));
+ var importDecl = ts.createImportDeclaration(undefined, undefined, importClause, ts.createLiteral(moduleSpecifierWithoutQuotes));
+ if (!lastImportDeclaration) {
+ changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: "" + context.newLineCharacter + context.newLineCharacter });
+ }
+ else {
+ changeTracker.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl, { suffix: context.newLineCharacter });
+ }
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.path;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().path;
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
var sourceDirectory = ts.getDirectoryPath(fileName);
var options = context.program.getCompilerOptions();
return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
tryGetModuleNameFromTypeRoots() ||
tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 261) {
+ if (moduleSymbol.valueDeclaration.kind !== 264) {
return moduleSymbol.name;
}
}
@@ -62869,11 +70244,11 @@ var ts;
if (!options.baseUrl) {
return undefined;
}
- var normalizedBaseUrl = ts.toPath(options.baseUrl, ts.getDirectoryPath(options.baseUrl), getCanonicalFileName);
- var relativeName = tryRemoveParentDirectoryName(moduleFileName, normalizedBaseUrl);
+ var relativeName = getRelativePathIfInDirectory(moduleFileName, options.baseUrl);
if (!relativeName) {
return undefined;
}
+ var relativeNameWithIndex = ts.removeFileExtension(relativeName);
relativeName = removeExtensionAndIndexPostFix(relativeName);
if (options.paths) {
for (var key in options.paths) {
@@ -62893,7 +70268,7 @@ var ts;
return key.replace("\*", matchedStar);
}
}
- else if (pattern === relativeName) {
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
return key;
}
}
@@ -62903,9 +70278,8 @@ var ts;
}
function tryGetModuleNameFromRootDirs() {
if (options.rootDirs) {
- var normalizedRootDirs = ts.map(options.rootDirs, function (rootDir) { return ts.toPath(rootDir, undefined, getCanonicalFileName); });
- var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, normalizedRootDirs);
- var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, normalizedRootDirs);
+ var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, options.rootDirs);
+ var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, options.rootDirs);
if (normalizedTargetPath !== undefined) {
var relativePath = normalizedSourcePath !== undefined ? getRelativePath(normalizedTargetPath, normalizedSourcePath) : normalizedTargetPath;
return ts.removeFileExtension(relativePath);
@@ -62967,7 +70341,7 @@ var ts;
function getPathRelativeToRootDirs(path, rootDirs) {
for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
var rootDir = rootDirs_2[_i];
- var relativeName = tryRemoveParentDirectoryName(path, rootDir);
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
if (relativeName !== undefined) {
return relativeName;
}
@@ -62981,25 +70355,23 @@ var ts;
}
return fileName;
}
+ function getRelativePathIfInDirectory(path, directoryPath) {
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
+ return ts.isRootedDiskPath(relativePath) || ts.startsWith(relativePath, "..") ? undefined : relativePath;
+ }
function getRelativePath(path, directoryPath) {
var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- function tryRemoveParentDirectoryName(path, parentDirectory) {
- var index = path.indexOf(parentDirectory);
- if (index === 0) {
- return ts.endsWith(parentDirectory, ts.directorySeparator)
- ? path.substring(parentDirectory.length)
- : path.substring(parentDirectory.length + 1);
- }
- return undefined;
- }
}
}
- function createCodeAction(description, diagnosticArgs, newText, span, fileName, kind, moduleSpecifier) {
+ function createChangeTracker() {
+ return ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ }
+ function createCodeAction(description, diagnosticArgs, changes, kind, moduleSpecifier) {
return {
description: ts.formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)),
- changes: [{ fileName: fileName, textChanges: [{ newText: newText, span: span }] }],
+ changes: changes,
kind: kind,
moduleSpecifier: moduleSpecifier
};
@@ -63013,150 +70385,225 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [
- ts.Diagnostics._0_is_declared_but_never_used.code,
- ts.Diagnostics.Property_0_is_declared_but_never_used.code
- ],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
- if (token.kind === 20) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
- }
- switch (token.kind) {
- case 70:
- switch (token.parent.kind) {
- case 223:
- switch (token.parent.parent.parent.kind) {
- case 211:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return createCodeFix("", forInitializer.pos, forInitializer.end - forInitializer.pos);
- }
- else {
- return removeSingleItem(forInitializer.declarations, token);
- }
- case 213:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 224) {
- var forOfInitializer = forOfStatement.initializer;
- return createCodeFix("{}", forOfInitializer.declarations[0].pos, forOfInitializer.declarations[0].end - forOfInitializer.declarations[0].pos);
- }
- break;
- case 212:
- return undefined;
- case 256:
- var catchClause = token.parent.parent;
- var parameter = catchClause.variableDeclaration.getChildren()[0];
- return createCodeFix("", parameter.pos, parameter.end - parameter.pos);
- default:
- var variableStatement = token.parent.parent.parent;
- if (variableStatement.declarationList.declarations.length === 1) {
- return createCodeFix("", variableStatement.pos, variableStatement.end - variableStatement.pos);
- }
- else {
- var declarations = variableStatement.declarationList.declarations;
- return removeSingleItem(declarations, token);
- }
- }
- case 143:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 2);
- }
- else {
- return removeSingleItem(typeParameters, token);
- }
- case 144:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else {
- return removeSingleItem(functionDeclaration.parameters, token);
- }
- case 234:
- var importEquals = findImportDeclaration(token);
- return createCodeFix("", importEquals.pos, importEquals.end - importEquals.pos);
- case 239:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- var importSpec = findImportDeclaration(token);
- return createCodeFix("", importSpec.pos, importSpec.end - importSpec.pos);
- }
- else {
- return removeSingleItem(namedImports.elements, token);
- }
- case 236:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = findImportDeclaration(importClause);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- return createCodeFix("", importClause.name.pos, importClause.namedBindings.pos - importClause.name.pos);
- }
- case 237:
- var namespaceImport = token.parent;
- if (namespaceImport.name == token && !namespaceImport.parent.name) {
- var importDecl = findImportDeclaration(namespaceImport);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- var start_4 = namespaceImport.parent.name.end;
- return createCodeFix("", start_4, namespaceImport.parent.namedBindings.end - start_4);
- }
- }
- break;
- case 147:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- case 237:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- if (ts.isDeclarationName(token)) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return createCodeFix("", token.parent.parent.pos, token.parent.parent.end - token.parent.parent.pos);
- }
- else {
- return undefined;
- }
- function findImportDeclaration(token) {
- var importDecl = token;
- while (importDecl.kind != 235 && importDecl.parent) {
- importDecl = importDecl.parent;
- }
- return importDecl;
+ errorCodes: getApplicableDiagnosticCodes(),
+ getCodeActions: getDisableJsDiagnosticsCodeActions
+ });
+ function getApplicableDiagnosticCodes() {
+ var allDiagnostcs = ts.Diagnostics;
+ return Object.keys(allDiagnostcs)
+ .filter(function (d) { return allDiagnostcs[d] && allDiagnostcs[d].category === ts.DiagnosticCategory.Error; })
+ .map(function (d) { return allDiagnostcs[d].code; });
+ }
+ function getIgnoreCommentLocationForLocation(sourceFile, position, newLineCharacter) {
+ var line = ts.getLineAndCharacterOfPosition(sourceFile, position).line;
+ var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile);
+ var startPosition = ts.getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
+ if (!ts.isInComment(sourceFile, startPosition) && !ts.isInString(sourceFile, startPosition) && !ts.isInTemplateString(sourceFile, startPosition)) {
+ var token = ts.getTouchingToken(sourceFile, startPosition);
+ var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
+ if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
+ return {
+ span: { start: startPosition, length: 0 },
+ newText: "// @ts-ignore" + newLineCharacter
+ };
}
- function createCodeFix(newText, start, length) {
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_unused_identifiers),
- changes: [{
- fileName: sourceFile.fileName,
- textChanges: [{ newText: newText, span: { start: start, length: length } }]
+ }
+ return {
+ span: { start: position, length: 0 },
+ newText: (position === startPosition ? "" : newLineCharacter) + "// @ts-ignore" + newLineCharacter
+ };
+ }
+ function getDisableJsDiagnosticsCodeActions(context) {
+ var sourceFile = context.sourceFile, program = context.program, newLineCharacter = context.newLineCharacter, span = context.span;
+ if (!ts.isInJavaScriptFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
+ return undefined;
+ }
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Ignore_this_error_message),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [getIgnoreCommentLocationForLocation(sourceFile, span.start, newLineCharacter)]
+ }]
+ },
+ {
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Disable_checking_for_this_file),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: {
+ start: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.pos : 0,
+ length: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.end - sourceFile.checkJsDirective.pos : 0
+ },
+ newText: "// @ts-nocheck" + newLineCharacter
}]
- }];
+ }]
+ }];
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ function newNodesToChanges(newNodes, insertAfter, context) {
+ var sourceFile = context.sourceFile;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ for (var _i = 0, newNodes_1 = newNodes; _i < newNodes_1.length; _i++) {
+ var newNode = newNodes_1[_i];
+ changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: context.newLineCharacter });
+ }
+ var changes = changeTracker.getChanges();
+ if (!ts.some(changes)) {
+ return changes;
+ }
+ ts.Debug.assert(changes.length === 1);
+ var consolidatedChanges = [{
+ fileName: changes[0].fileName,
+ textChanges: [{
+ span: changes[0].textChanges[0].span,
+ newText: changes[0].textChanges.reduce(function (prev, cur) { return prev + cur.newText; }, "")
+ }]
+ }];
+ return consolidatedChanges;
+ }
+ codefix.newNodesToChanges = newNodesToChanges;
+ function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, checker) {
+ var classMembers = classDeclaration.symbol.members;
+ var missingMembers = possiblyMissingSymbols.filter(function (symbol) { return !classMembers.has(symbol.getName()); });
+ var newNodes = [];
+ for (var _i = 0, missingMembers_1 = missingMembers; _i < missingMembers_1.length; _i++) {
+ var symbol = missingMembers_1[_i];
+ var newNode = createNewNodeForMemberSymbol(symbol, classDeclaration, checker);
+ if (newNode) {
+ if (Array.isArray(newNode)) {
+ newNodes = newNodes.concat(newNode);
+ }
+ else {
+ newNodes.push(newNode);
+ }
}
- function removeSingleItem(elements, token) {
- if (elements[0] === token.parent) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos + 1);
+ }
+ return newNodes;
+ }
+ codefix.createMissingMemberNodes = createMissingMemberNodes;
+ function createNewNodeForMemberSymbol(symbol, enclosingDeclaration, checker) {
+ var declarations = symbol.getDeclarations();
+ if (!(declarations && declarations.length)) {
+ return undefined;
+ }
+ var declaration = declarations[0];
+ var name = ts.getSynthesizedClone(declaration.name);
+ var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
+ var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
+ var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
+ var optional = !!(symbol.flags & 67108864);
+ switch (declaration.kind) {
+ case 152:
+ case 153:
+ case 147:
+ case 148:
+ var typeNode = checker.typeToTypeNode(type, enclosingDeclaration);
+ var property = ts.createProperty(undefined, modifiers, name, optional ? ts.createToken(54) : undefined, typeNode, undefined);
+ return property;
+ case 149:
+ case 150:
+ var signatures = checker.getSignaturesOfType(type, 0);
+ if (!ts.some(signatures)) {
+ return undefined;
+ }
+ if (declarations.length === 1) {
+ ts.Debug.assert(signatures.length === 1);
+ var signature = signatures[0];
+ return signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ }
+ var signatureDeclarations = [];
+ for (var i = 0; i < signatures.length; i++) {
+ var signature = signatures[i];
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration);
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
+ }
+ if (declarations.length > signatures.length) {
+ var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]);
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
}
else {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 1);
+ ts.Debug.assert(declarations.length === signatures.length);
+ var methodImplementingSignatures = createMethodImplementingSignatures(signatures, name, optional, modifiers);
+ signatureDeclarations.push(methodImplementingSignatures);
}
+ return signatureDeclarations;
+ default:
+ return undefined;
+ }
+ function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150, enclosingDeclaration);
+ if (signatureDeclaration) {
+ signatureDeclaration.decorators = undefined;
+ signatureDeclaration.modifiers = modifiers;
+ signatureDeclaration.name = name;
+ signatureDeclaration.questionToken = optional ? ts.createToken(54) : undefined;
+ signatureDeclaration.body = body;
}
+ return signatureDeclaration;
}
- });
+ }
+ function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
+ var maxArgsSignature = signatures[0];
+ var minArgumentCount = signatures[0].minArgumentCount;
+ var someSigHasRestParameter = false;
+ for (var i = 0; i < signatures.length; i++) {
+ var sig = signatures[i];
+ minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount);
+ if (sig.hasRestParameter) {
+ someSigHasRestParameter = true;
+ }
+ if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) {
+ maxArgsSignature = sig;
+ }
+ }
+ var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0);
+ var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); });
+ var parameters = [];
+ for (var i = 0; i < maxNonRestArgs; i++) {
+ var anyType = ts.createKeywordTypeNode(118);
+ var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(54) : undefined, anyType, undefined);
+ parameters.push(newParameter);
+ }
+ if (someSigHasRestParameter) {
+ var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118));
+ var restParameter = ts.createParameter(undefined, undefined, ts.createToken(23), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(54) : undefined, anyArrayType, undefined);
+ parameters.push(restParameter);
+ }
+ return createStubbedMethod(modifiers, name, optional, undefined, parameters, undefined);
+ }
+ function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
+ return ts.createMethodDeclaration(undefined, modifiers, undefined, name, optional ? ts.createToken(54) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ }
+ codefix.createStubbedMethod = createStubbedMethod;
+ function createStubbedMethodBody() {
+ return ts.createBlock([ts.createThrow(ts.createNew(ts.createIdentifier("Error"), undefined, [ts.createLiteral("Method not implemented.")]))], true);
+ }
+ function createVisibilityModifier(flags) {
+ if (flags & 4) {
+ return ts.createToken(113);
+ }
+ else if (flags & 16) {
+ return ts.createToken(112);
+ }
+ return undefined;
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.servicesVersion = "0.5";
function createNode(kind, pos, end, parent) {
- var node = kind >= 141 ? new NodeObject(kind, pos, end) :
+ var node = kind >= 142 ? new NodeObject(kind, pos, end) :
kind === 70 ? new IdentifierObject(70, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -63214,11 +70661,11 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(292, nodes.pos, nodes.end, this);
+ var list = createNode(293, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
- for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
- var node = nodes_7[_i];
+ for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
+ var node = nodes_9[_i];
if (pos < node.pos) {
pos = this.addSyntheticNodes(list._children, pos, node.pos);
}
@@ -63233,11 +70680,11 @@ var ts;
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
var children;
- if (this.kind >= 141) {
+ if (this.kind >= 142) {
ts.scanner.setText((sourceFile || this.getSourceFile()).text);
children = [];
var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 278 && this.kind <= 291;
+ var useJSDocScanner_1 = this.kind >= 282 && this.kind <= 292;
var processNode = function (node) {
var isJSDocTagNode = ts.isJSDocTag(node);
if (!isJSDocTagNode && pos_3 < node.pos) {
@@ -63290,8 +70737,10 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = children[0];
- return child.kind < 141 ? child : child.getFirstToken(sourceFile);
+ var child = ts.find(children, function (kid) { return kid.kind < 266 || kid.kind > 292; });
+ return child.kind < 142 ?
+ child :
+ child.getFirstToken(sourceFile);
};
NodeObject.prototype.getLastToken = function (sourceFile) {
var children = this.getChildren(sourceFile);
@@ -63299,7 +70748,10 @@ var ts;
if (!child) {
return undefined;
}
- return child.kind < 141 ? child : child.getLastToken(sourceFile);
+ return child.kind < 142 ? child : child.getLastToken(sourceFile);
+ };
+ NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) {
+ return ts.forEachChild(this, cbNode, cbNodeArray);
};
return NodeObject;
}());
@@ -63352,6 +70804,9 @@ var ts;
TokenOrIdentifierObject.prototype.getLastToken = function () {
return undefined;
};
+ TokenOrIdentifierObject.prototype.forEachChild = function () {
+ return undefined;
+ };
return TokenOrIdentifierObject;
}());
var SymbolObject = (function () {
@@ -63374,6 +70829,12 @@ var ts;
}
return this.documentationComment;
};
+ SymbolObject.prototype.getJsDocTags = function () {
+ if (this.tags === undefined) {
+ this.tags = ts.JsDoc.getJsDocTagsFromDeclarations(this.declarations);
+ }
+ return this.tags;
+ };
return SymbolObject;
}());
var TokenObject = (function (_super) {
@@ -63457,6 +70918,12 @@ var ts;
}
return this.documentationComment;
};
+ SignatureObject.prototype.getJsDocTags = function () {
+ if (this.jsDocTags === undefined) {
+ this.jsDocTags = this.declaration ? ts.JsDoc.getJsDocTagsFromDeclarations([this.declaration]) : [];
+ }
+ return this.jsDocTags;
+ };
return SignatureObject;
}());
var SourceFileObject = (function (_super) {
@@ -63496,17 +70963,21 @@ var ts;
return this.namedDeclarations;
};
SourceFileObject.prototype.computeNamedDeclarations = function () {
- var result = ts.createMap();
+ var result = ts.createMultiMap();
ts.forEachChild(this, visit);
return result;
function addDeclaration(declaration) {
var name = getDeclarationName(declaration);
if (name) {
- ts.multiMapAdd(result, name, declaration);
+ result.add(name, declaration);
}
}
function getDeclarations(name) {
- return result[name] || (result[name] = []);
+ var declarations = result.get(name);
+ if (!declarations) {
+ result.set(name, declarations = []);
+ }
+ return declarations;
}
function getDeclarationName(declaration) {
if (declaration.name) {
@@ -63514,9 +70985,9 @@ var ts;
if (result_7 !== undefined) {
return result_7;
}
- if (declaration.name.kind === 142) {
+ if (declaration.name.kind === 143) {
var expr = declaration.name.expression;
- if (expr.kind === 177) {
+ if (expr.kind === 178) {
return expr.name.text;
}
return getTextOfIdentifierOrLiteral(expr);
@@ -63536,10 +71007,10 @@ var ts;
}
function visit(node) {
switch (node.kind) {
- case 225:
- case 184:
+ case 227:
+ case 185:
+ case 150:
case 149:
- case 148:
var functionDeclaration = node;
var declarationName = getDeclarationName(functionDeclaration);
if (declarationName) {
@@ -63553,33 +71024,33 @@ var ts;
else {
declarations.push(functionDeclaration);
}
- ts.forEachChild(node, visit);
}
+ ts.forEachChild(node, visit);
break;
- case 226:
- case 197:
- case 227:
case 228:
+ case 198:
case 229:
case 230:
- case 234:
- case 243:
- case 239:
- case 234:
+ case 231:
+ case 232:
case 236:
- case 237:
- case 151:
+ case 245:
+ case 241:
+ case 236:
+ case 238:
+ case 239:
case 152:
- case 161:
+ case 153:
+ case 162:
addDeclaration(node);
ts.forEachChild(node, visit);
break;
- case 144:
+ case 145:
if (!ts.hasModifier(node, 92)) {
break;
}
- case 223:
- case 174: {
+ case 225:
+ case 175: {
var decl = node;
if (ts.isBindingPattern(decl.name)) {
ts.forEachChild(decl.name, visit);
@@ -63588,24 +71059,24 @@ var ts;
if (decl.initializer)
visit(decl.initializer);
}
- case 260:
+ case 263:
+ case 148:
case 147:
- case 146:
addDeclaration(node);
break;
- case 241:
+ case 243:
if (node.exportClause) {
ts.forEach(node.exportClause.elements, visit);
}
break;
- case 235:
+ case 237:
var importClause = node.importClause;
if (importClause) {
if (importClause.name) {
addDeclaration(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237) {
+ if (importClause.namedBindings.kind === 239) {
addDeclaration(importClause.namedBindings);
}
else {
@@ -63831,6 +71302,30 @@ var ts;
};
return CancellationTokenObject;
}());
+ var ThrottledCancellationToken = (function () {
+ function ThrottledCancellationToken(hostCancellationToken, throttleWaitMilliseconds) {
+ if (throttleWaitMilliseconds === void 0) { throttleWaitMilliseconds = 20; }
+ this.hostCancellationToken = hostCancellationToken;
+ this.throttleWaitMilliseconds = throttleWaitMilliseconds;
+ this.lastCancellationCheckTime = 0;
+ }
+ ThrottledCancellationToken.prototype.isCancellationRequested = function () {
+ var time = ts.timestamp();
+ var duration = Math.abs(time - this.lastCancellationCheckTime);
+ if (duration >= this.throttleWaitMilliseconds) {
+ this.lastCancellationCheckTime = time;
+ return this.hostCancellationToken.isCancellationRequested();
+ }
+ return false;
+ };
+ ThrottledCancellationToken.prototype.throwIfCancellationRequested = function () {
+ if (this.isCancellationRequested()) {
+ throw new ts.OperationCanceledException();
+ }
+ };
+ return ThrottledCancellationToken;
+ }());
+ ts.ThrottledCancellationToken = ThrottledCancellationToken;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
@@ -64048,10 +71543,10 @@ var ts;
if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
switch (node.kind) {
case 70:
- case 177:
- case 141:
+ case 178:
+ case 142:
case 98:
- case 167:
+ case 168:
case 96:
var type = typeChecker.getTypeAtLocation(node);
if (type) {
@@ -64060,7 +71555,8 @@ var ts;
kindModifiers: ts.ScriptElementKindModifier.none,
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: ts.typeToDisplayParts(typeChecker, type, ts.getContainerNode(node)),
- documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined
+ documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined,
+ tags: type.symbol ? type.symbol.getJsDocTags() : undefined
};
}
}
@@ -64072,26 +71568,27 @@ var ts;
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: displayPartsDocumentationsAndKind.displayParts,
- documentation: displayPartsDocumentationsAndKind.documentation
+ documentation: displayPartsDocumentationsAndKind.documentation,
+ tags: displayPartsDocumentationsAndKind.tags
};
}
function getDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position);
}
- function getImplementationAtPosition(fileName, position) {
- synchronizeHostData();
- return ts.GoToImplementation.getImplementationAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), ts.getTouchingPropertyName(getValidSourceFile(fileName), position));
- }
function getTypeDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position);
}
+ function getImplementationAtPosition(fileName, position) {
+ synchronizeHostData();
+ return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ }
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
if (results) {
- var sourceFile_2 = getCanonicalFileName(ts.normalizeSlashes(fileName));
- results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_2; });
+ var sourceFile_1 = getCanonicalFileName(ts.normalizeSlashes(fileName));
+ results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_1; });
}
return results;
}
@@ -64102,7 +71599,6 @@ var ts;
return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
- synchronizeHostData();
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
function convertDocumentHighlights(documentHighlights) {
if (!documentHighlights) {
@@ -64117,7 +71613,8 @@ var ts;
fileName: entry.fileName,
textSpan: highlightSpan.textSpan,
isWriteAccess: highlightSpan.kind === ts.HighlightSpanKind.writtenReference,
- isDefinition: false
+ isDefinition: false,
+ isInString: highlightSpan.isInString,
});
}
}
@@ -64125,20 +71622,18 @@ var ts;
}
}
function findRenameLocations(fileName, position, findInStrings, findInComments) {
- var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position, { findInStrings: findInStrings, findInComments: findInComments, isForRename: true });
}
function getReferencesAtPosition(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, false, false);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position);
}
- function findReferences(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, false, false);
- return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; });
+ function getReferences(fileName, position, options) {
+ synchronizeHostData();
+ return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
- function findReferencedSymbols(fileName, position, findInStrings, findInComments) {
+ function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, findInStrings, findInComments);
+ return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
synchronizeHostData();
@@ -64156,7 +71651,8 @@ var ts;
text: data
});
}
- var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles);
+ var customTransformers = host.getCustomTransformers && host.getCustomTransformers();
+ var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers);
return {
outputFiles: outputFiles,
emitSkipped: emitOutput.emitSkipped
@@ -64180,15 +71676,15 @@ var ts;
return;
}
switch (node.kind) {
- case 177:
- case 141:
+ case 178:
+ case 142:
case 9:
case 85:
case 100:
case 94:
case 96:
case 98:
- case 167:
+ case 168:
case 70:
break;
default:
@@ -64200,7 +71696,7 @@ var ts;
nodeForStartPos = nodeForStartPos.parent;
}
else if (ts.isNameOfModuleDeclaration(nodeForStartPos)) {
- if (nodeForStartPos.parent.parent.kind === 230 &&
+ if (nodeForStartPos.parent.parent.kind === 232 &&
nodeForStartPos.parent.parent.body === nodeForStartPos.parent) {
nodeForStartPos = nodeForStartPos.parent.parent.name;
}
@@ -64219,10 +71715,10 @@ var ts;
return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position);
}
function getNavigationBarItems(fileName) {
- return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function getNavigationTree(fileName) {
- return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function isTsOrTsxFile(fileName) {
var kind = ts.getScriptKind(fileName, host);
@@ -64250,7 +71746,7 @@ var ts;
}
function getOutliningSpans(fileName) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- return ts.OutliningElementsCollector.collectElements(sourceFile);
+ return ts.OutliningElementsCollector.collectElements(sourceFile, cancellationToken);
}
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
@@ -64326,13 +71822,13 @@ var ts;
}
return [];
}
- function getCodeFixesAtPosition(fileName, start, end, errorCodes) {
+ function getCodeFixesAtPosition(fileName, start, end, errorCodes, formatOptions) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
var span = { start: start, length: end - start };
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
var allFixes = [];
- ts.forEach(errorCodes, function (error) {
+ ts.forEach(ts.deduplicate(errorCodes), function (error) {
cancellationToken.throwIfCancellationRequested();
var context = {
errorCode: error,
@@ -64341,7 +71837,8 @@ var ts;
program: program,
newLineCharacter: newLineChar,
host: host,
- cancellationToken: cancellationToken
+ cancellationToken: cancellationToken,
+ rulesProvider: getRuleProvider(formatOptions)
};
var fixes = ts.codefix.getFixes(context);
if (fixes) {
@@ -64358,7 +71855,7 @@ var ts;
return false;
}
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position)) {
+ if (ts.isInString(sourceFile, position)) {
return false;
}
if (ts.isInsideJsxElementOrAttribute(sourceFile, position)) {
@@ -64389,7 +71886,7 @@ var ts;
continue;
}
var descriptor = undefined;
- for (var i = 0, n = descriptors.length; i < n; i++) {
+ for (var i = 0; i < descriptors.length; i++) {
if (matchArray[i + firstDescriptorCaptureIndex]) {
descriptor = descriptors[i];
}
@@ -64493,15 +71990,15 @@ var ts;
function walk(node) {
switch (node.kind) {
case 70:
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
break;
case 9:
case 8:
if (ts.isDeclarationName(node) ||
- node.parent.kind === 245 ||
+ node.parent.kind === 247 ||
isArgumentOfElementAccessExpression(node) ||
ts.isLiteralComputedPropertyDeclarationName(node)) {
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
}
break;
default:
@@ -64514,11 +72011,66 @@ var ts;
}
}
}
+ function setNameTable(text, node) {
+ nameTable.set(text, nameTable.get(text) === undefined ? node.pos : -1);
+ }
+ }
+ function isObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 252:
+ case 254:
+ case 260:
+ case 261:
+ case 150:
+ case 152:
+ case 153:
+ return true;
+ }
+ return false;
+ }
+ function getContainingObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 9:
+ case 8:
+ if (node.parent.kind === 143) {
+ return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined;
+ }
+ case 70:
+ return isObjectLiteralElement(node.parent) &&
+ (node.parent.parent.kind === 177 || node.parent.parent.kind === 253) &&
+ node.parent.name === node ? node.parent : undefined;
+ }
+ return undefined;
+ }
+ ts.getContainingObjectLiteralElement = getContainingObjectLiteralElement;
+ function getPropertySymbolsFromContextualType(typeChecker, node) {
+ var objectLiteral = node.parent;
+ var contextualType = typeChecker.getContextualType(objectLiteral);
+ var name = ts.getTextOfPropertyName(node.name);
+ if (name && contextualType) {
+ var result_8 = [];
+ var symbol = contextualType.getProperty(name);
+ if (contextualType.flags & 65536) {
+ ts.forEach(contextualType.types, function (t) {
+ var symbol = t.getProperty(name);
+ if (symbol) {
+ result_8.push(symbol);
+ }
+ });
+ return result_8;
+ }
+ if (symbol) {
+ result_8.push(symbol);
+ return result_8;
+ }
+ }
+ return undefined;
}
+ ts.getPropertySymbolsFromContextualType = getPropertySymbolsFromContextualType;
function isArgumentOfElementAccessExpression(node) {
return node &&
node.parent &&
- node.parent.kind === 178 &&
+ node.parent.kind === 179 &&
node.parent.argumentExpression === node;
}
function getDefaultLibFilePath(options) {
@@ -64528,31 +72080,2854 @@ var ts;
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
}
ts.getDefaultLibFilePath = getDefaultLibFilePath;
- function initializeServices() {
- ts.objectAllocator = getServicesObjectAllocator();
- }
- initializeServices();
+ ts.objectAllocator = getServicesObjectAllocator();
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ server.ActionSet = "action::set";
+ server.ActionInvalidate = "action::invalidate";
+ server.EventBeginInstallTypes = "event::beginInstallTypes";
+ server.EventEndInstallTypes = "event::endInstallTypes";
+ server.EventInitializationFailed = "event::initializationFailed";
+ var Arguments;
+ (function (Arguments) {
+ Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
+ Arguments.LogFile = "--logFile";
+ Arguments.EnableTelemetry = "--enableTelemetry";
+ Arguments.TypingSafeListLocation = "--typingSafeListLocation";
+ })(Arguments = server.Arguments || (server.Arguments = {}));
+ function hasArgument(argumentName) {
+ return ts.sys.args.indexOf(argumentName) >= 0;
+ }
+ server.hasArgument = hasArgument;
+ function findArgument(argumentName) {
+ var index = ts.sys.args.indexOf(argumentName);
+ return index >= 0 && index < ts.sys.args.length - 1
+ ? ts.sys.args[index + 1]
+ : undefined;
+ }
+ server.findArgument = findArgument;
+ })(server = ts.server || (ts.server = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ var LogLevel;
+ (function (LogLevel) {
+ LogLevel[LogLevel["terse"] = 0] = "terse";
+ LogLevel[LogLevel["normal"] = 1] = "normal";
+ LogLevel[LogLevel["requestTime"] = 2] = "requestTime";
+ LogLevel[LogLevel["verbose"] = 3] = "verbose";
+ })(LogLevel = server.LogLevel || (server.LogLevel = {}));
+ server.emptyArray = [];
+ var Msg;
+ (function (Msg) {
+ Msg.Err = "Err";
+ Msg.Info = "Info";
+ Msg.Perf = "Perf";
+ })(Msg = server.Msg || (server.Msg = {}));
+ function getProjectRootPath(project) {
+ switch (project.projectKind) {
+ case server.ProjectKind.Configured:
+ return ts.getDirectoryPath(project.getProjectName());
+ case server.ProjectKind.Inferred:
+ return "";
+ case server.ProjectKind.External:
+ var projectName = ts.normalizeSlashes(project.getProjectName());
+ return project.projectService.host.fileExists(projectName) ? ts.getDirectoryPath(projectName) : projectName;
+ }
+ }
+ function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) {
+ return {
+ projectName: project.getProjectName(),
+ fileNames: project.getFileNames(true),
+ compilerOptions: project.getCompilerOptions(),
+ typeAcquisition: typeAcquisition,
+ unresolvedImports: unresolvedImports,
+ projectRootPath: getProjectRootPath(project),
+ cachePath: cachePath,
+ kind: "discover"
+ };
+ }
+ server.createInstallTypingsRequest = createInstallTypingsRequest;
+ var Errors;
+ (function (Errors) {
+ function ThrowNoProject() {
+ throw new Error("No Project.");
+ }
+ Errors.ThrowNoProject = ThrowNoProject;
+ function ThrowProjectLanguageServiceDisabled() {
+ throw new Error("The project's language service is disabled.");
+ }
+ Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
+ function ThrowProjectDoesNotContainDocument(fileName, project) {
+ throw new Error("Project '" + project.getProjectName() + "' does not contain document '" + fileName + "'");
+ }
+ Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
+ })(Errors = server.Errors || (server.Errors = {}));
+ function getDefaultFormatCodeSettings(host) {
+ return {
+ indentSize: 4,
+ tabSize: 4,
+ newLineCharacter: host.newLine || "\n",
+ convertTabsToSpaces: true,
+ indentStyle: ts.IndentStyle.Smart,
+ insertSpaceAfterConstructor: false,
+ insertSpaceAfterCommaDelimiter: true,
+ insertSpaceAfterSemicolonInForStatements: true,
+ insertSpaceBeforeAndAfterBinaryOperators: true,
+ insertSpaceAfterKeywordsInControlFlowStatements: true,
+ insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
+ insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
+ insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
+ insertSpaceBeforeFunctionParenthesis: false,
+ placeOpenBraceOnNewLineForFunctions: false,
+ placeOpenBraceOnNewLineForControlBlocks: false,
+ };
+ }
+ server.getDefaultFormatCodeSettings = getDefaultFormatCodeSettings;
+ function mergeMapLikes(target, source) {
+ for (var key in source) {
+ if (ts.hasProperty(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ server.mergeMapLikes = mergeMapLikes;
+ function removeItemFromSet(items, itemToRemove) {
+ if (items.length === 0) {
+ return;
+ }
+ var index = items.indexOf(itemToRemove);
+ if (index < 0) {
+ return;
+ }
+ if (index === items.length - 1) {
+ items.pop();
+ }
+ else {
+ items[index] = items.pop();
+ }
+ }
+ server.removeItemFromSet = removeItemFromSet;
+ function toNormalizedPath(fileName) {
+ return ts.normalizePath(fileName);
+ }
+ server.toNormalizedPath = toNormalizedPath;
+ function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {
+ var f = ts.isRootedDiskPath(normalizedPath) ? normalizedPath : ts.getNormalizedAbsolutePath(normalizedPath, currentDirectory);
+ return getCanonicalFileName(f);
+ }
+ server.normalizedPathToPath = normalizedPathToPath;
+ function asNormalizedPath(fileName) {
+ return fileName;
+ }
+ server.asNormalizedPath = asNormalizedPath;
+ function createNormalizedPathMap() {
+ var map = ts.createMap();
+ return {
+ get: function (path) {
+ return map.get(path);
+ },
+ set: function (path, value) {
+ map.set(path, value);
+ },
+ contains: function (path) {
+ return map.has(path);
+ },
+ remove: function (path) {
+ map.delete(path);
+ }
+ };
+ }
+ server.createNormalizedPathMap = createNormalizedPathMap;
+ function isInferredProjectName(name) {
+ return /dev\/null\/inferredProject\d+\*/.test(name);
+ }
+ server.isInferredProjectName = isInferredProjectName;
+ function makeInferredProjectName(counter) {
+ return "/dev/null/inferredProject" + counter + "*";
+ }
+ server.makeInferredProjectName = makeInferredProjectName;
+ function toSortedReadonlyArray(arr) {
+ arr.sort();
+ return arr;
+ }
+ server.toSortedReadonlyArray = toSortedReadonlyArray;
+ var ThrottledOperations = (function () {
+ function ThrottledOperations(host) {
+ this.host = host;
+ this.pendingTimeouts = ts.createMap();
+ }
+ ThrottledOperations.prototype.schedule = function (operationId, delay, cb) {
+ var pendingTimeout = this.pendingTimeouts.get(operationId);
+ if (pendingTimeout) {
+ this.host.clearTimeout(pendingTimeout);
+ }
+ this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
+ };
+ ThrottledOperations.run = function (self, operationId, cb) {
+ self.pendingTimeouts.delete(operationId);
+ cb();
+ };
+ return ThrottledOperations;
+ }());
+ server.ThrottledOperations = ThrottledOperations;
+ var GcTimer = (function () {
+ function GcTimer(host, delay, logger) {
+ this.host = host;
+ this.delay = delay;
+ this.logger = logger;
+ }
+ GcTimer.prototype.scheduleCollect = function () {
+ if (!this.host.gc || this.timerId !== undefined) {
+ return;
+ }
+ this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
+ };
+ GcTimer.run = function (self) {
+ self.timerId = undefined;
+ var log = self.logger.hasLevel(LogLevel.requestTime);
+ var before = log && self.host.getMemoryUsage();
+ self.host.gc();
+ if (log) {
+ var after = self.host.getMemoryUsage();
+ self.logger.perftrc("GC::before " + before + ", after " + after);
+ }
+ };
+ return GcTimer;
+ }());
+ server.GcTimer = GcTimer;
+ })(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var server;
(function (server) {
+ server.nullCancellationToken = {
+ isCancellationRequested: function () { return false; },
+ setRequest: function () { return void 0; },
+ resetRequest: function () { return void 0; }
+ };
+ function hrTimeToMilliseconds(time) {
+ var seconds = time[0];
+ var nanoseconds = time[1];
+ return ((1e9 * seconds) + nanoseconds) / 1000000.0;
+ }
+ function shouldSkipSemanticCheck(project) {
+ if (project.projectKind === server.ProjectKind.Inferred || project.projectKind === server.ProjectKind.External) {
+ return project.isJsOnlyProject();
+ }
+ else {
+ var options = project.getCompilerOptions();
+ return options.skipLibCheck && !options.checkJs && project.isJsOnlyProject();
+ }
+ }
+ function compareNumber(a, b) {
+ return a - b;
+ }
+ function compareFileStart(a, b) {
+ if (a.file < b.file) {
+ return -1;
+ }
+ else if (a.file === b.file) {
+ var n = compareNumber(a.start.line, b.start.line);
+ if (n === 0) {
+ return compareNumber(a.start.offset, b.start.offset);
+ }
+ else
+ return n;
+ }
+ else {
+ return 1;
+ }
+ }
+ function formatDiag(fileName, project, diag) {
+ var scriptInfo = project.getScriptInfoForNormalizedPath(fileName);
+ return {
+ start: scriptInfo.positionToLineOffset(diag.start),
+ end: scriptInfo.positionToLineOffset(diag.start + diag.length),
+ text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
+ code: diag.code
+ };
+ }
+ function formatConfigFileDiag(diag) {
+ return {
+ start: undefined,
+ end: undefined,
+ text: ts.flattenDiagnosticMessageText(diag.messageText, "\n")
+ };
+ }
+ function allEditsBeforePos(edits, pos) {
+ for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) {
+ var edit = edits_1[_i];
+ if (ts.textSpanEnd(edit.span) >= pos) {
+ return false;
+ }
+ }
+ return true;
+ }
+ var CommandNames;
+ (function (CommandNames) {
+ CommandNames.Brace = "brace";
+ CommandNames.BraceFull = "brace-full";
+ CommandNames.BraceCompletion = "braceCompletion";
+ CommandNames.Change = "change";
+ CommandNames.Close = "close";
+ CommandNames.Completions = "completions";
+ CommandNames.CompletionsFull = "completions-full";
+ CommandNames.CompletionDetails = "completionEntryDetails";
+ CommandNames.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
+ CommandNames.CompileOnSaveEmitFile = "compileOnSaveEmitFile";
+ CommandNames.Configure = "configure";
+ CommandNames.Definition = "definition";
+ CommandNames.DefinitionFull = "definition-full";
+ CommandNames.Exit = "exit";
+ CommandNames.Format = "format";
+ CommandNames.Formatonkey = "formatonkey";
+ CommandNames.FormatFull = "format-full";
+ CommandNames.FormatonkeyFull = "formatonkey-full";
+ CommandNames.FormatRangeFull = "formatRange-full";
+ CommandNames.Geterr = "geterr";
+ CommandNames.GeterrForProject = "geterrForProject";
+ CommandNames.Implementation = "implementation";
+ CommandNames.ImplementationFull = "implementation-full";
+ CommandNames.SemanticDiagnosticsSync = "semanticDiagnosticsSync";
+ CommandNames.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
+ CommandNames.NavBar = "navbar";
+ CommandNames.NavBarFull = "navbar-full";
+ CommandNames.NavTree = "navtree";
+ CommandNames.NavTreeFull = "navtree-full";
+ CommandNames.Navto = "navto";
+ CommandNames.NavtoFull = "navto-full";
+ CommandNames.Occurrences = "occurrences";
+ CommandNames.DocumentHighlights = "documentHighlights";
+ CommandNames.DocumentHighlightsFull = "documentHighlights-full";
+ CommandNames.Open = "open";
+ CommandNames.Quickinfo = "quickinfo";
+ CommandNames.QuickinfoFull = "quickinfo-full";
+ CommandNames.References = "references";
+ CommandNames.ReferencesFull = "references-full";
+ CommandNames.Reload = "reload";
+ CommandNames.Rename = "rename";
+ CommandNames.RenameInfoFull = "rename-full";
+ CommandNames.RenameLocationsFull = "renameLocations-full";
+ CommandNames.Saveto = "saveto";
+ CommandNames.SignatureHelp = "signatureHelp";
+ CommandNames.SignatureHelpFull = "signatureHelp-full";
+ CommandNames.TypeDefinition = "typeDefinition";
+ CommandNames.ProjectInfo = "projectInfo";
+ CommandNames.ReloadProjects = "reloadProjects";
+ CommandNames.Unknown = "unknown";
+ CommandNames.OpenExternalProject = "openExternalProject";
+ CommandNames.OpenExternalProjects = "openExternalProjects";
+ CommandNames.CloseExternalProject = "closeExternalProject";
+ CommandNames.SynchronizeProjectList = "synchronizeProjectList";
+ CommandNames.ApplyChangedToOpenFiles = "applyChangedToOpenFiles";
+ CommandNames.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full";
+ CommandNames.Cleanup = "cleanup";
+ CommandNames.OutliningSpans = "outliningSpans";
+ CommandNames.TodoComments = "todoComments";
+ CommandNames.Indentation = "indentation";
+ CommandNames.DocCommentTemplate = "docCommentTemplate";
+ CommandNames.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full";
+ CommandNames.NameOrDottedNameSpan = "nameOrDottedNameSpan";
+ CommandNames.BreakpointStatement = "breakpointStatement";
+ CommandNames.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
+ CommandNames.GetCodeFixes = "getCodeFixes";
+ CommandNames.GetCodeFixesFull = "getCodeFixes-full";
+ CommandNames.GetSupportedCodeFixes = "getSupportedCodeFixes";
+ })(CommandNames = server.CommandNames || (server.CommandNames = {}));
+ function formatMessage(msg, logger, byteLength, newLine) {
+ var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
+ var json = JSON.stringify(msg);
+ if (verboseLogging) {
+ logger.info(msg.type + ": " + json);
+ }
+ var len = byteLength(json, "utf8");
+ return "Content-Length: " + (1 + len) + "\r\n\r\n" + json + newLine;
+ }
+ server.formatMessage = formatMessage;
+ var MultistepOperation = (function () {
+ function MultistepOperation(operationHost) {
+ var _this = this;
+ this.operationHost = operationHost;
+ this.completed = true;
+ this.next = {
+ immediate: function (action) { return _this.immediate(action); },
+ delay: function (ms, action) { return _this.delay(ms, action); }
+ };
+ }
+ MultistepOperation.prototype.startNew = function (action) {
+ this.complete();
+ this.requestId = this.operationHost.getCurrentRequestId();
+ this.completed = false;
+ this.executeAction(action);
+ };
+ MultistepOperation.prototype.complete = function () {
+ if (!this.completed) {
+ if (this.requestId) {
+ this.operationHost.sendRequestCompletedEvent(this.requestId);
+ }
+ this.completed = true;
+ }
+ this.setTimerHandle(undefined);
+ this.setImmediateId(undefined);
+ };
+ MultistepOperation.prototype.immediate = function (action) {
+ var _this = this;
+ var requestId = this.requestId;
+ ts.Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id");
+ this.setImmediateId(this.operationHost.getServerHost().setImmediate(function () {
+ _this.immediateId = undefined;
+ _this.operationHost.executeWithRequestId(requestId, function () { return _this.executeAction(action); });
+ }));
+ };
+ MultistepOperation.prototype.delay = function (ms, action) {
+ var _this = this;
+ var requestId = this.requestId;
+ ts.Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id");
+ this.setTimerHandle(this.operationHost.getServerHost().setTimeout(function () {
+ _this.timerHandle = undefined;
+ _this.operationHost.executeWithRequestId(requestId, function () { return _this.executeAction(action); });
+ }, ms));
+ };
+ MultistepOperation.prototype.executeAction = function (action) {
+ var stop = false;
+ try {
+ if (this.operationHost.isCancellationRequested()) {
+ stop = true;
+ }
+ else {
+ action(this.next);
+ }
+ }
+ catch (e) {
+ stop = true;
+ if (!(e instanceof ts.OperationCanceledException)) {
+ this.operationHost.logError(e, "delayed processing of request " + this.requestId);
+ }
+ }
+ if (stop || !this.hasPendingWork()) {
+ this.complete();
+ }
+ };
+ MultistepOperation.prototype.setTimerHandle = function (timerHandle) {
+ if (this.timerHandle !== undefined) {
+ this.operationHost.getServerHost().clearTimeout(this.timerHandle);
+ }
+ this.timerHandle = timerHandle;
+ };
+ MultistepOperation.prototype.setImmediateId = function (immediateId) {
+ if (this.immediateId !== undefined) {
+ this.operationHost.getServerHost().clearImmediate(this.immediateId);
+ }
+ this.immediateId = immediateId;
+ };
+ MultistepOperation.prototype.hasPendingWork = function () {
+ return !!this.timerHandle || !!this.immediateId;
+ };
+ return MultistepOperation;
+ }());
+ var Session = (function () {
+ function Session(opts) {
+ var _this = this;
+ this.changeSeq = 0;
+ this.handlers = ts.createMapFromTemplate((_a = {},
+ _a[CommandNames.OpenExternalProject] = function (request) {
+ _this.projectService.openExternalProject(request.arguments, false);
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.OpenExternalProjects] = function (request) {
+ _this.projectService.openExternalProjects(request.arguments.projects);
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.CloseExternalProject] = function (request) {
+ _this.projectService.closeExternalProject(request.arguments.projectFileName);
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.SynchronizeProjectList] = function (request) {
+ var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects);
+ if (!result.some(function (p) { return p.projectErrors && p.projectErrors.length !== 0; })) {
+ return _this.requiredResponse(result);
+ }
+ var converted = ts.map(result, function (p) {
+ if (!p.projectErrors || p.projectErrors.length === 0) {
+ return p;
+ }
+ return {
+ info: p.info,
+ changes: p.changes,
+ files: p.files,
+ projectErrors: _this.convertToDiagnosticsWithLinePosition(p.projectErrors, undefined)
+ };
+ });
+ return _this.requiredResponse(converted);
+ },
+ _a[CommandNames.ApplyChangedToOpenFiles] = function (request) {
+ _this.projectService.applyChangesInOpenFiles(request.arguments.openFiles, request.arguments.changedFiles, request.arguments.closedFiles);
+ _this.changeSeq++;
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.Exit] = function () {
+ _this.exit();
+ return _this.notRequired();
+ },
+ _a[CommandNames.Definition] = function (request) {
+ return _this.requiredResponse(_this.getDefinition(request.arguments, true));
+ },
+ _a[CommandNames.DefinitionFull] = function (request) {
+ return _this.requiredResponse(_this.getDefinition(request.arguments, false));
+ },
+ _a[CommandNames.TypeDefinition] = function (request) {
+ return _this.requiredResponse(_this.getTypeDefinition(request.arguments));
+ },
+ _a[CommandNames.Implementation] = function (request) {
+ return _this.requiredResponse(_this.getImplementation(request.arguments, true));
+ },
+ _a[CommandNames.ImplementationFull] = function (request) {
+ return _this.requiredResponse(_this.getImplementation(request.arguments, false));
+ },
+ _a[CommandNames.References] = function (request) {
+ return _this.requiredResponse(_this.getReferences(request.arguments, true));
+ },
+ _a[CommandNames.ReferencesFull] = function (request) {
+ return _this.requiredResponse(_this.getReferences(request.arguments, false));
+ },
+ _a[CommandNames.Rename] = function (request) {
+ return _this.requiredResponse(_this.getRenameLocations(request.arguments, true));
+ },
+ _a[CommandNames.RenameLocationsFull] = function (request) {
+ return _this.requiredResponse(_this.getRenameLocations(request.arguments, false));
+ },
+ _a[CommandNames.RenameInfoFull] = function (request) {
+ return _this.requiredResponse(_this.getRenameInfo(request.arguments));
+ },
+ _a[CommandNames.Open] = function (request) {
+ _this.openClientFile(server.toNormalizedPath(request.arguments.file), request.arguments.fileContent, server.convertScriptKindName(request.arguments.scriptKindName));
+ return _this.notRequired();
+ },
+ _a[CommandNames.Quickinfo] = function (request) {
+ return _this.requiredResponse(_this.getQuickInfoWorker(request.arguments, true));
+ },
+ _a[CommandNames.QuickinfoFull] = function (request) {
+ return _this.requiredResponse(_this.getQuickInfoWorker(request.arguments, false));
+ },
+ _a[CommandNames.OutliningSpans] = function (request) {
+ return _this.requiredResponse(_this.getOutliningSpans(request.arguments));
+ },
+ _a[CommandNames.TodoComments] = function (request) {
+ return _this.requiredResponse(_this.getTodoComments(request.arguments));
+ },
+ _a[CommandNames.Indentation] = function (request) {
+ return _this.requiredResponse(_this.getIndentation(request.arguments));
+ },
+ _a[CommandNames.NameOrDottedNameSpan] = function (request) {
+ return _this.requiredResponse(_this.getNameOrDottedNameSpan(request.arguments));
+ },
+ _a[CommandNames.BreakpointStatement] = function (request) {
+ return _this.requiredResponse(_this.getBreakpointStatement(request.arguments));
+ },
+ _a[CommandNames.BraceCompletion] = function (request) {
+ return _this.requiredResponse(_this.isValidBraceCompletion(request.arguments));
+ },
+ _a[CommandNames.DocCommentTemplate] = function (request) {
+ return _this.requiredResponse(_this.getDocCommentTemplate(request.arguments));
+ },
+ _a[CommandNames.Format] = function (request) {
+ return _this.requiredResponse(_this.getFormattingEditsForRange(request.arguments));
+ },
+ _a[CommandNames.Formatonkey] = function (request) {
+ return _this.requiredResponse(_this.getFormattingEditsAfterKeystroke(request.arguments));
+ },
+ _a[CommandNames.FormatFull] = function (request) {
+ return _this.requiredResponse(_this.getFormattingEditsForDocumentFull(request.arguments));
+ },
+ _a[CommandNames.FormatonkeyFull] = function (request) {
+ return _this.requiredResponse(_this.getFormattingEditsAfterKeystrokeFull(request.arguments));
+ },
+ _a[CommandNames.FormatRangeFull] = function (request) {
+ return _this.requiredResponse(_this.getFormattingEditsForRangeFull(request.arguments));
+ },
+ _a[CommandNames.Completions] = function (request) {
+ return _this.requiredResponse(_this.getCompletions(request.arguments, true));
+ },
+ _a[CommandNames.CompletionsFull] = function (request) {
+ return _this.requiredResponse(_this.getCompletions(request.arguments, false));
+ },
+ _a[CommandNames.CompletionDetails] = function (request) {
+ return _this.requiredResponse(_this.getCompletionEntryDetails(request.arguments));
+ },
+ _a[CommandNames.CompileOnSaveAffectedFileList] = function (request) {
+ return _this.requiredResponse(_this.getCompileOnSaveAffectedFileList(request.arguments));
+ },
+ _a[CommandNames.CompileOnSaveEmitFile] = function (request) {
+ return _this.requiredResponse(_this.emitFile(request.arguments));
+ },
+ _a[CommandNames.SignatureHelp] = function (request) {
+ return _this.requiredResponse(_this.getSignatureHelpItems(request.arguments, true));
+ },
+ _a[CommandNames.SignatureHelpFull] = function (request) {
+ return _this.requiredResponse(_this.getSignatureHelpItems(request.arguments, false));
+ },
+ _a[CommandNames.CompilerOptionsDiagnosticsFull] = function (request) {
+ return _this.requiredResponse(_this.getCompilerOptionsDiagnostics(request.arguments));
+ },
+ _a[CommandNames.EncodedSemanticClassificationsFull] = function (request) {
+ return _this.requiredResponse(_this.getEncodedSemanticClassifications(request.arguments));
+ },
+ _a[CommandNames.Cleanup] = function () {
+ _this.cleanup();
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.SemanticDiagnosticsSync] = function (request) {
+ return _this.requiredResponse(_this.getSemanticDiagnosticsSync(request.arguments));
+ },
+ _a[CommandNames.SyntacticDiagnosticsSync] = function (request) {
+ return _this.requiredResponse(_this.getSyntacticDiagnosticsSync(request.arguments));
+ },
+ _a[CommandNames.Geterr] = function (request) {
+ _this.errorCheck.startNew(function (next) { return _this.getDiagnostics(next, request.arguments.delay, request.arguments.files); });
+ return _this.notRequired();
+ },
+ _a[CommandNames.GeterrForProject] = function (request) {
+ _this.errorCheck.startNew(function (next) { return _this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file); });
+ return _this.notRequired();
+ },
+ _a[CommandNames.Change] = function (request) {
+ _this.change(request.arguments);
+ return _this.notRequired();
+ },
+ _a[CommandNames.Configure] = function (request) {
+ _this.projectService.setHostConfiguration(request.arguments);
+ _this.output(undefined, CommandNames.Configure, request.seq);
+ return _this.notRequired();
+ },
+ _a[CommandNames.Reload] = function (request) {
+ _this.reload(request.arguments, request.seq);
+ return _this.requiredResponse({ reloadFinished: true });
+ },
+ _a[CommandNames.Saveto] = function (request) {
+ var savetoArgs = request.arguments;
+ _this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile);
+ return _this.notRequired();
+ },
+ _a[CommandNames.Close] = function (request) {
+ var closeArgs = request.arguments;
+ _this.closeClientFile(closeArgs.file);
+ return _this.notRequired();
+ },
+ _a[CommandNames.Navto] = function (request) {
+ return _this.requiredResponse(_this.getNavigateToItems(request.arguments, true));
+ },
+ _a[CommandNames.NavtoFull] = function (request) {
+ return _this.requiredResponse(_this.getNavigateToItems(request.arguments, false));
+ },
+ _a[CommandNames.Brace] = function (request) {
+ return _this.requiredResponse(_this.getBraceMatching(request.arguments, true));
+ },
+ _a[CommandNames.BraceFull] = function (request) {
+ return _this.requiredResponse(_this.getBraceMatching(request.arguments, false));
+ },
+ _a[CommandNames.NavBar] = function (request) {
+ return _this.requiredResponse(_this.getNavigationBarItems(request.arguments, true));
+ },
+ _a[CommandNames.NavBarFull] = function (request) {
+ return _this.requiredResponse(_this.getNavigationBarItems(request.arguments, false));
+ },
+ _a[CommandNames.NavTree] = function (request) {
+ return _this.requiredResponse(_this.getNavigationTree(request.arguments, true));
+ },
+ _a[CommandNames.NavTreeFull] = function (request) {
+ return _this.requiredResponse(_this.getNavigationTree(request.arguments, false));
+ },
+ _a[CommandNames.Occurrences] = function (request) {
+ return _this.requiredResponse(_this.getOccurrences(request.arguments));
+ },
+ _a[CommandNames.DocumentHighlights] = function (request) {
+ return _this.requiredResponse(_this.getDocumentHighlights(request.arguments, true));
+ },
+ _a[CommandNames.DocumentHighlightsFull] = function (request) {
+ return _this.requiredResponse(_this.getDocumentHighlights(request.arguments, false));
+ },
+ _a[CommandNames.CompilerOptionsForInferredProjects] = function (request) {
+ _this.setCompilerOptionsForInferredProjects(request.arguments);
+ return _this.requiredResponse(true);
+ },
+ _a[CommandNames.ProjectInfo] = function (request) {
+ return _this.requiredResponse(_this.getProjectInfo(request.arguments));
+ },
+ _a[CommandNames.ReloadProjects] = function () {
+ _this.projectService.reloadProjects();
+ return _this.notRequired();
+ },
+ _a[CommandNames.GetCodeFixes] = function (request) {
+ return _this.requiredResponse(_this.getCodeFixes(request.arguments, true));
+ },
+ _a[CommandNames.GetCodeFixesFull] = function (request) {
+ return _this.requiredResponse(_this.getCodeFixes(request.arguments, false));
+ },
+ _a[CommandNames.GetSupportedCodeFixes] = function () {
+ return _this.requiredResponse(_this.getSupportedCodeFixes());
+ },
+ _a));
+ this.host = opts.host;
+ this.cancellationToken = opts.cancellationToken;
+ this.typingsInstaller = opts.typingsInstaller;
+ this.byteLength = opts.byteLength;
+ this.hrtime = opts.hrtime;
+ this.logger = opts.logger;
+ this.canUseEvents = opts.canUseEvents;
+ var throttleWaitMilliseconds = opts.throttleWaitMilliseconds;
+ this.eventHandler = this.canUseEvents
+ ? opts.eventHandler || (function (event) { return _this.defaultEventHandler(event); })
+ : undefined;
+ var multistepOperationHost = {
+ executeWithRequestId: function (requestId, action) { return _this.executeWithRequestId(requestId, action); },
+ getCurrentRequestId: function () { return _this.currentRequestId; },
+ getServerHost: function () { return _this.host; },
+ logError: function (err, cmd) { return _this.logError(err, cmd); },
+ sendRequestCompletedEvent: function (requestId) { return _this.sendRequestCompletedEvent(requestId); },
+ isCancellationRequested: function () { return _this.cancellationToken.isCancellationRequested(); }
+ };
+ this.errorCheck = new MultistepOperation(multistepOperationHost);
+ var settings = {
+ host: this.host,
+ logger: this.logger,
+ cancellationToken: this.cancellationToken,
+ useSingleInferredProject: opts.useSingleInferredProject,
+ typingsInstaller: this.typingsInstaller,
+ throttleWaitMilliseconds: throttleWaitMilliseconds,
+ eventHandler: this.eventHandler,
+ globalPlugins: opts.globalPlugins,
+ pluginProbeLocations: opts.pluginProbeLocations
+ };
+ this.projectService = new server.ProjectService(settings);
+ this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
+ var _a;
+ }
+ Session.prototype.sendRequestCompletedEvent = function (requestId) {
+ var event = {
+ seq: 0,
+ type: "event",
+ event: "requestCompleted",
+ body: { request_seq: requestId }
+ };
+ this.send(event);
+ };
+ Session.prototype.defaultEventHandler = function (event) {
+ var _this = this;
+ switch (event.eventName) {
+ case server.ContextEvent:
+ var _a = event.data, project_1 = _a.project, fileName_2 = _a.fileName;
+ this.projectService.logger.info("got context event, updating diagnostics for " + fileName_2);
+ this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, [{ fileName: fileName_2, project: project_1 }], _this.changeSeq, function (n) { return n === _this.changeSeq; }, 100); });
+ break;
+ case server.ConfigFileDiagEvent:
+ var _b = event.data, triggerFile = _b.triggerFile, configFileName = _b.configFileName, diagnostics = _b.diagnostics;
+ this.configFileDiagnosticEvent(triggerFile, configFileName, diagnostics);
+ break;
+ case server.ProjectLanguageServiceStateEvent:
+ var eventName = "projectLanguageServiceState";
+ this.event({
+ projectName: event.data.project.getProjectName(),
+ languageServiceEnabled: event.data.languageServiceEnabled
+ }, eventName);
+ break;
+ }
+ };
+ Session.prototype.logError = function (err, cmd) {
+ var msg = "Exception on executing command " + cmd;
+ if (err.message) {
+ msg += ":\n" + err.message;
+ if (err.stack) {
+ msg += "\n" + err.stack;
+ }
+ }
+ this.logger.msg(msg, server.Msg.Err);
+ };
+ Session.prototype.send = function (msg) {
+ if (msg.type === "event" && !this.canUseEvents) {
+ if (this.logger.hasLevel(server.LogLevel.verbose)) {
+ this.logger.info("Session does not support events: ignored event: " + JSON.stringify(msg));
+ }
+ return;
+ }
+ this.host.write(formatMessage(msg, this.logger, this.byteLength, this.host.newLine));
+ };
+ Session.prototype.configFileDiagnosticEvent = function (triggerFile, configFile, diagnostics) {
+ var bakedDiags = ts.map(diagnostics, formatConfigFileDiag);
+ var ev = {
+ seq: 0,
+ type: "event",
+ event: "configFileDiag",
+ body: {
+ triggerFile: triggerFile,
+ configFile: configFile,
+ diagnostics: bakedDiags
+ }
+ };
+ this.send(ev);
+ };
+ Session.prototype.event = function (info, eventName) {
+ var ev = {
+ seq: 0,
+ type: "event",
+ event: eventName,
+ body: info
+ };
+ this.send(ev);
+ };
+ Session.prototype.output = function (info, cmdName, reqSeq, errorMsg) {
+ if (reqSeq === void 0) { reqSeq = 0; }
+ var res = {
+ seq: 0,
+ type: "response",
+ command: cmdName,
+ request_seq: reqSeq,
+ success: !errorMsg,
+ };
+ if (!errorMsg) {
+ res.body = info;
+ }
+ else {
+ res.message = errorMsg;
+ }
+ this.send(res);
+ };
+ Session.prototype.semanticCheck = function (file, project) {
+ try {
+ var diags = [];
+ if (!shouldSkipSemanticCheck(project)) {
+ diags = project.getLanguageService().getSemanticDiagnostics(file);
+ }
+ var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); });
+ this.event({ file: file, diagnostics: bakedDiags }, "semanticDiag");
+ }
+ catch (err) {
+ this.logError(err, "semantic check");
+ }
+ };
+ Session.prototype.syntacticCheck = function (file, project) {
+ try {
+ var diags = project.getLanguageService().getSyntacticDiagnostics(file);
+ if (diags) {
+ var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); });
+ this.event({ file: file, diagnostics: bakedDiags }, "syntaxDiag");
+ }
+ }
+ catch (err) {
+ this.logError(err, "syntactic check");
+ }
+ };
+ Session.prototype.updateProjectStructure = function (seq, matchSeq, ms) {
+ var _this = this;
+ if (ms === void 0) { ms = 1500; }
+ this.host.setTimeout(function () {
+ if (matchSeq(seq)) {
+ _this.projectService.refreshInferredProjects();
+ }
+ }, ms);
+ };
+ Session.prototype.updateErrorCheck = function (next, checkList, seq, matchSeq, ms, followMs, requireOpen) {
+ var _this = this;
+ if (ms === void 0) { ms = 1500; }
+ if (followMs === void 0) { followMs = 200; }
+ if (requireOpen === void 0) { requireOpen = true; }
+ if (followMs > ms) {
+ followMs = ms;
+ }
+ var index = 0;
+ var checkOne = function () {
+ if (matchSeq(seq)) {
+ var checkSpec_1 = checkList[index];
+ index++;
+ if (checkSpec_1.project.containsFile(checkSpec_1.fileName, requireOpen)) {
+ _this.syntacticCheck(checkSpec_1.fileName, checkSpec_1.project);
+ next.immediate(function () {
+ _this.semanticCheck(checkSpec_1.fileName, checkSpec_1.project);
+ if (checkList.length > index) {
+ next.delay(followMs, checkOne);
+ }
+ });
+ }
+ }
+ };
+ if ((checkList.length > index) && (matchSeq(seq))) {
+ next.delay(ms, checkOne);
+ }
+ };
+ Session.prototype.cleanProjects = function (caption, projects) {
+ if (!projects) {
+ return;
+ }
+ this.logger.info("cleaning " + caption);
+ for (var _i = 0, projects_1 = projects; _i < projects_1.length; _i++) {
+ var p = projects_1[_i];
+ p.getLanguageService(false).cleanupSemanticCache();
+ }
+ };
+ Session.prototype.cleanup = function () {
+ this.cleanProjects("inferred projects", this.projectService.inferredProjects);
+ this.cleanProjects("configured projects", this.projectService.configuredProjects);
+ this.cleanProjects("external projects", this.projectService.externalProjects);
+ if (this.host.gc) {
+ this.logger.info("host.gc()");
+ this.host.gc();
+ }
+ };
+ Session.prototype.getEncodedSemanticClassifications = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ return project.getLanguageService().getEncodedSemanticClassifications(file, args);
+ };
+ Session.prototype.getProject = function (projectFileName) {
+ return projectFileName && this.projectService.findProject(projectFileName);
+ };
+ Session.prototype.getCompilerOptionsDiagnostics = function (args) {
+ var project = this.getProject(args.projectFileName);
+ return this.convertToDiagnosticsWithLinePosition(project.getLanguageService().getCompilerOptionsDiagnostics(), undefined);
+ };
+ Session.prototype.convertToDiagnosticsWithLinePosition = function (diagnostics, scriptInfo) {
+ var _this = this;
+ return diagnostics.map(function (d) { return ({
+ message: ts.flattenDiagnosticMessageText(d.messageText, _this.host.newLine),
+ start: d.start,
+ length: d.length,
+ category: ts.DiagnosticCategory[d.category].toLowerCase(),
+ code: d.code,
+ startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start),
+ endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length)
+ }); });
+ };
+ Session.prototype.getDiagnosticsWorker = function (args, isSemantic, selector, includeLinePosition) {
+ var _a = this.getFileAndProject(args), project = _a.project, file = _a.file;
+ if (isSemantic && shouldSkipSemanticCheck(project)) {
+ return [];
+ }
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var diagnostics = selector(project, file);
+ return includeLinePosition
+ ? this.convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo)
+ : diagnostics.map(function (d) { return formatDiag(file, project, d); });
+ };
+ Session.prototype.getDefinition = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var definitions = project.getLanguageService().getDefinitionAtPosition(file, position);
+ if (!definitions) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ return definitions.map(function (def) {
+ var defScriptInfo = project.getScriptInfo(def.fileName);
+ return {
+ file: def.fileName,
+ start: defScriptInfo.positionToLineOffset(def.textSpan.start),
+ end: defScriptInfo.positionToLineOffset(ts.textSpanEnd(def.textSpan))
+ };
+ });
+ }
+ else {
+ return definitions;
+ }
+ };
+ Session.prototype.getTypeDefinition = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var definitions = project.getLanguageService().getTypeDefinitionAtPosition(file, position);
+ if (!definitions) {
+ return undefined;
+ }
+ return definitions.map(function (def) {
+ var defScriptInfo = project.getScriptInfo(def.fileName);
+ return {
+ file: def.fileName,
+ start: defScriptInfo.positionToLineOffset(def.textSpan.start),
+ end: defScriptInfo.positionToLineOffset(ts.textSpanEnd(def.textSpan))
+ };
+ });
+ };
+ Session.prototype.getImplementation = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
+ var implementations = project.getLanguageService().getImplementationAtPosition(file, position);
+ if (!implementations) {
+ return [];
+ }
+ if (simplifiedResult) {
+ return implementations.map(function (_a) {
+ var fileName = _a.fileName, textSpan = _a.textSpan;
+ var scriptInfo = project.getScriptInfo(fileName);
+ return {
+ file: fileName,
+ start: scriptInfo.positionToLineOffset(textSpan.start),
+ end: scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan))
+ };
+ });
+ }
+ else {
+ return implementations;
+ }
+ };
+ Session.prototype.getOccurrences = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var occurrences = project.getLanguageService().getOccurrencesAtPosition(file, position);
+ if (!occurrences) {
+ return undefined;
+ }
+ return occurrences.map(function (occurrence) {
+ var fileName = occurrence.fileName, isWriteAccess = occurrence.isWriteAccess, textSpan = occurrence.textSpan, isInString = occurrence.isInString;
+ var scriptInfo = project.getScriptInfo(fileName);
+ var start = scriptInfo.positionToLineOffset(textSpan.start);
+ var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan));
+ var result = {
+ start: start,
+ end: end,
+ file: fileName,
+ isWriteAccess: isWriteAccess,
+ };
+ if (isInString) {
+ result.isInString = isInString;
+ }
+ return result;
+ });
+ };
+ Session.prototype.getSyntacticDiagnosticsSync = function (args) {
+ return this.getDiagnosticsWorker(args, false, function (project, file) { return project.getLanguageService().getSyntacticDiagnostics(file); }, args.includeLinePosition);
+ };
+ Session.prototype.getSemanticDiagnosticsSync = function (args) {
+ return this.getDiagnosticsWorker(args, true, function (project, file) { return project.getLanguageService().getSemanticDiagnostics(file); }, args.includeLinePosition);
+ };
+ Session.prototype.getDocumentHighlights = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var documentHighlights = project.getLanguageService().getDocumentHighlights(file, position, args.filesToSearch);
+ if (!documentHighlights) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ return documentHighlights.map(convertToDocumentHighlightsItem);
+ }
+ else {
+ return documentHighlights;
+ }
+ function convertToDocumentHighlightsItem(documentHighlights) {
+ var fileName = documentHighlights.fileName, highlightSpans = documentHighlights.highlightSpans;
+ var scriptInfo = project.getScriptInfo(fileName);
+ return {
+ file: fileName,
+ highlightSpans: highlightSpans.map(convertHighlightSpan)
+ };
+ function convertHighlightSpan(highlightSpan) {
+ var textSpan = highlightSpan.textSpan, kind = highlightSpan.kind;
+ var start = scriptInfo.positionToLineOffset(textSpan.start);
+ var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan));
+ return { start: start, end: end, kind: kind };
+ }
+ }
+ };
+ Session.prototype.setCompilerOptionsForInferredProjects = function (args) {
+ this.projectService.setCompilerOptionsForInferredProjects(args.options);
+ };
+ Session.prototype.getProjectInfo = function (args) {
+ return this.getProjectInfoWorker(args.file, args.projectFileName, args.needFileNameList);
+ };
+ Session.prototype.getProjectInfoWorker = function (uncheckedFileName, projectFileName, needFileNameList) {
+ var project = this.getFileAndProjectWorker(uncheckedFileName, projectFileName, true, true).project;
+ var projectInfo = {
+ configFileName: project.getProjectName(),
+ languageServiceDisabled: !project.languageServiceEnabled,
+ fileNames: needFileNameList ? project.getFileNames() : undefined
+ };
+ return projectInfo;
+ };
+ Session.prototype.getRenameInfo = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ return project.getLanguageService().getRenameInfo(file, position);
+ };
+ Session.prototype.getProjects = function (args) {
+ var projects;
+ if (args.projectFileName) {
+ var project = this.getProject(args.projectFileName);
+ if (project) {
+ projects = [project];
+ }
+ }
+ else {
+ var scriptInfo = this.projectService.getScriptInfo(args.file);
+ projects = scriptInfo.containingProjects;
+ }
+ projects = ts.filter(projects, function (p) { return p.languageServiceEnabled; });
+ if (!projects || !projects.length) {
+ return server.Errors.ThrowNoProject();
+ }
+ return projects;
+ };
+ Session.prototype.getDefaultProject = function (args) {
+ if (args.projectFileName) {
+ var project = this.getProject(args.projectFileName);
+ if (project) {
+ return project;
+ }
+ }
+ var info = this.projectService.getScriptInfo(args.file);
+ return info.getDefaultProject();
+ };
+ Session.prototype.getRenameLocations = function (args, simplifiedResult) {
+ var file = server.toNormalizedPath(args.file);
+ var info = this.projectService.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, info);
+ var projects = this.getProjects(args);
+ if (simplifiedResult) {
+ var defaultProject = this.getDefaultProject(args);
+ var renameInfo = defaultProject.getLanguageService().getRenameInfo(file, position);
+ if (!renameInfo) {
+ return undefined;
+ }
+ if (!renameInfo.canRename) {
+ return {
+ info: renameInfo,
+ locs: []
+ };
+ }
+ var fileSpans = server.combineProjectOutput(projects, function (project) {
+ var renameLocations = project.getLanguageService().findRenameLocations(file, position, args.findInStrings, args.findInComments);
+ if (!renameLocations) {
+ return [];
+ }
+ return renameLocations.map(function (location) {
+ var locationScriptInfo = project.getScriptInfo(location.fileName);
+ return {
+ file: location.fileName,
+ start: locationScriptInfo.positionToLineOffset(location.textSpan.start),
+ end: locationScriptInfo.positionToLineOffset(ts.textSpanEnd(location.textSpan)),
+ };
+ });
+ }, compareRenameLocation, function (a, b) { return a.file === b.file && a.start.line === b.start.line && a.start.offset === b.start.offset; });
+ var locs = fileSpans.reduce(function (accum, cur) {
+ var curFileAccum;
+ if (accum.length > 0) {
+ curFileAccum = accum[accum.length - 1];
+ if (curFileAccum.file !== cur.file) {
+ curFileAccum = undefined;
+ }
+ }
+ if (!curFileAccum) {
+ curFileAccum = { file: cur.file, locs: [] };
+ accum.push(curFileAccum);
+ }
+ curFileAccum.locs.push({ start: cur.start, end: cur.end });
+ return accum;
+ }, []);
+ return { info: renameInfo, locs: locs };
+ }
+ else {
+ return server.combineProjectOutput(projects, function (p) { return p.getLanguageService().findRenameLocations(file, position, args.findInStrings, args.findInComments); }, undefined, renameLocationIsEqualTo);
+ }
+ function renameLocationIsEqualTo(a, b) {
+ if (a === b) {
+ return true;
+ }
+ if (!a || !b) {
+ return false;
+ }
+ return a.fileName === b.fileName &&
+ a.textSpan.start === b.textSpan.start &&
+ a.textSpan.length === b.textSpan.length;
+ }
+ function compareRenameLocation(a, b) {
+ if (a.file < b.file) {
+ return -1;
+ }
+ else if (a.file > b.file) {
+ return 1;
+ }
+ else {
+ if (a.start.line < b.start.line) {
+ return 1;
+ }
+ else if (a.start.line > b.start.line) {
+ return -1;
+ }
+ else {
+ return b.start.offset - a.start.offset;
+ }
+ }
+ }
+ };
+ Session.prototype.getReferences = function (args, simplifiedResult) {
+ var file = server.toNormalizedPath(args.file);
+ var projects = this.getProjects(args);
+ var defaultProject = this.getDefaultProject(args);
+ var scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ if (simplifiedResult) {
+ var nameInfo = defaultProject.getLanguageService().getQuickInfoAtPosition(file, position);
+ if (!nameInfo) {
+ return undefined;
+ }
+ var displayString = ts.displayPartsToString(nameInfo.displayParts);
+ var nameSpan = nameInfo.textSpan;
+ var nameColStart = scriptInfo.positionToLineOffset(nameSpan.start).offset;
+ var nameText = scriptInfo.getSnapshot().getText(nameSpan.start, ts.textSpanEnd(nameSpan));
+ var refs = server.combineProjectOutput(projects, function (project) {
+ var references = project.getLanguageService().getReferencesAtPosition(file, position);
+ if (!references) {
+ return [];
+ }
+ return references.map(function (ref) {
+ var refScriptInfo = project.getScriptInfo(ref.fileName);
+ var start = refScriptInfo.positionToLineOffset(ref.textSpan.start);
+ var refLineSpan = refScriptInfo.lineToTextSpan(start.line - 1);
+ var lineText = refScriptInfo.getSnapshot().getText(refLineSpan.start, ts.textSpanEnd(refLineSpan)).replace(/\r|\n/g, "");
+ return {
+ file: ref.fileName,
+ start: start,
+ lineText: lineText,
+ end: refScriptInfo.positionToLineOffset(ts.textSpanEnd(ref.textSpan)),
+ isWriteAccess: ref.isWriteAccess,
+ isDefinition: ref.isDefinition
+ };
+ });
+ }, compareFileStart, areReferencesResponseItemsForTheSameLocation);
+ return {
+ refs: refs,
+ symbolName: nameText,
+ symbolStartOffset: nameColStart,
+ symbolDisplayString: displayString
+ };
+ }
+ else {
+ return server.combineProjectOutput(projects, function (project) { return project.getLanguageService().findReferences(file, position); }, undefined, undefined);
+ }
+ function areReferencesResponseItemsForTheSameLocation(a, b) {
+ if (a && b) {
+ return a.file === b.file &&
+ a.start === b.start &&
+ a.end === b.end;
+ }
+ return false;
+ }
+ };
+ Session.prototype.openClientFile = function (fileName, fileContent, scriptKind) {
+ var _a = this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind), configFileName = _a.configFileName, configFileErrors = _a.configFileErrors;
+ if (this.eventHandler) {
+ this.eventHandler({
+ eventName: "configFileDiag",
+ data: { triggerFile: fileName, configFileName: configFileName, diagnostics: configFileErrors || [] }
+ });
+ }
+ };
+ Session.prototype.getPosition = function (args, scriptInfo) {
+ return args.position !== undefined ? args.position : scriptInfo.lineOffsetToPosition(args.line, args.offset);
+ };
+ Session.prototype.getFileAndProject = function (args, errorOnMissingProject) {
+ if (errorOnMissingProject === void 0) { errorOnMissingProject = true; }
+ return this.getFileAndProjectWorker(args.file, args.projectFileName, true, errorOnMissingProject);
+ };
+ Session.prototype.getFileAndProjectWithoutRefreshingInferredProjects = function (args, errorOnMissingProject) {
+ if (errorOnMissingProject === void 0) { errorOnMissingProject = true; }
+ return this.getFileAndProjectWorker(args.file, args.projectFileName, false, errorOnMissingProject);
+ };
+ Session.prototype.getFileAndProjectWorker = function (uncheckedFileName, projectFileName, refreshInferredProjects, errorOnMissingProject) {
+ var file = server.toNormalizedPath(uncheckedFileName);
+ var project = this.getProject(projectFileName) || this.projectService.getDefaultProjectForFile(file, refreshInferredProjects);
+ if (!project && errorOnMissingProject) {
+ return server.Errors.ThrowNoProject();
+ }
+ return { file: file, project: project };
+ };
+ Session.prototype.getOutliningSpans = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ return project.getLanguageService(false).getOutliningSpans(file);
+ };
+ Session.prototype.getTodoComments = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ return project.getLanguageService().getTodoComments(file, args.descriptors);
+ };
+ Session.prototype.getDocCommentTemplate = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ return project.getLanguageService(false).getDocCommentTemplateAtPosition(file, position);
+ };
+ Session.prototype.getIndentation = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
+ var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
+ var indentation = project.getLanguageService(false).getIndentationAtPosition(file, position, options);
+ return { position: position, indentation: indentation };
+ };
+ Session.prototype.getBreakpointStatement = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
+ return project.getLanguageService(false).getBreakpointStatementAtPosition(file, position);
+ };
+ Session.prototype.getNameOrDottedNameSpan = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
+ return project.getLanguageService(false).getNameOrDottedNameSpan(file, position, position);
+ };
+ Session.prototype.isValidBraceCompletion = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
+ return project.getLanguageService(false).isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0));
+ };
+ Session.prototype.getQuickInfoWorker = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo));
+ if (!quickInfo) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ var displayString = ts.displayPartsToString(quickInfo.displayParts);
+ var docString = ts.displayPartsToString(quickInfo.documentation);
+ return {
+ kind: quickInfo.kind,
+ kindModifiers: quickInfo.kindModifiers,
+ start: scriptInfo.positionToLineOffset(quickInfo.textSpan.start),
+ end: scriptInfo.positionToLineOffset(ts.textSpanEnd(quickInfo.textSpan)),
+ displayString: displayString,
+ documentation: docString,
+ tags: quickInfo.tags || []
+ };
+ }
+ else {
+ return quickInfo;
+ }
+ };
+ Session.prototype.getFormattingEditsForRange = function (args) {
+ var _this = this;
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset);
+ var endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ var edits = project.getLanguageService(false).getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file));
+ if (!edits) {
+ return undefined;
+ }
+ return edits.map(function (edit) { return _this.convertTextChangeToCodeEdit(edit, scriptInfo); });
+ };
+ Session.prototype.getFormattingEditsForRangeFull = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
+ return project.getLanguageService(false).getFormattingEditsForRange(file, args.position, args.endPosition, options);
+ };
+ Session.prototype.getFormattingEditsForDocumentFull = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
+ return project.getLanguageService(false).getFormattingEditsForDocument(file, options);
+ };
+ Session.prototype.getFormattingEditsAfterKeystrokeFull = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
+ return project.getLanguageService(false).getFormattingEditsAfterKeystroke(file, args.position, args.key, options);
+ };
+ Session.prototype.getFormattingEditsAfterKeystroke = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = scriptInfo.lineOffsetToPosition(args.line, args.offset);
+ var formatOptions = this.projectService.getFormatCodeOptions(file);
+ var edits = project.getLanguageService(false).getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions);
+ if ((args.key === "\n") && ((!edits) || (edits.length === 0) || allEditsBeforePos(edits, position))) {
+ var lineInfo = scriptInfo.getLineInfo(args.line);
+ if (lineInfo && (lineInfo.leaf) && (lineInfo.leaf.text)) {
+ var lineText = lineInfo.leaf.text;
+ if (lineText.search("\\S") < 0) {
+ var preferredIndent = project.getLanguageService(false).getIndentationAtPosition(file, position, formatOptions);
+ var hasIndent = 0;
+ var i = void 0, len = void 0;
+ for (i = 0, len = lineText.length; i < len; i++) {
+ if (lineText.charAt(i) === " ") {
+ hasIndent++;
+ }
+ else if (lineText.charAt(i) === "\t") {
+ hasIndent += formatOptions.tabSize;
+ }
+ else {
+ break;
+ }
+ }
+ if (preferredIndent !== hasIndent) {
+ var firstNoWhiteSpacePosition = lineInfo.offset + i;
+ edits.push({
+ span: ts.createTextSpanFromBounds(lineInfo.offset, firstNoWhiteSpacePosition),
+ newText: ts.formatting.getIndentationString(preferredIndent, formatOptions)
+ });
+ }
+ }
+ }
+ }
+ if (!edits) {
+ return undefined;
+ }
+ return edits.map(function (edit) {
+ return {
+ start: scriptInfo.positionToLineOffset(edit.span.start),
+ end: scriptInfo.positionToLineOffset(ts.textSpanEnd(edit.span)),
+ newText: edit.newText ? edit.newText : ""
+ };
+ });
+ };
+ Session.prototype.getCompletions = function (args, simplifiedResult) {
+ var _this = this;
+ var prefix = args.prefix || "";
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var completions = project.getLanguageService().getCompletionsAtPosition(file, position);
+ if (!completions) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ return completions.entries.reduce(function (result, entry) {
+ if (completions.isMemberCompletion || (entry.name.toLowerCase().indexOf(prefix.toLowerCase()) === 0)) {
+ var name = entry.name, kind = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, replacementSpan = entry.replacementSpan;
+ var convertedSpan = replacementSpan ? _this.decorateSpan(replacementSpan, scriptInfo) : undefined;
+ result.push({ name: name, kind: kind, kindModifiers: kindModifiers, sortText: sortText, replacementSpan: convertedSpan });
+ }
+ return result;
+ }, []).sort(function (a, b) { return ts.compareStrings(a.name, b.name); });
+ }
+ else {
+ return completions;
+ }
+ };
+ Session.prototype.getCompletionEntryDetails = function (args) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ return args.entryNames.reduce(function (accum, entryName) {
+ var details = project.getLanguageService().getCompletionEntryDetails(file, position, entryName);
+ if (details) {
+ accum.push(details);
+ }
+ return accum;
+ }, []);
+ };
+ Session.prototype.getCompileOnSaveAffectedFileList = function (args) {
+ var info = this.projectService.getScriptInfo(args.file);
+ var result = [];
+ if (!info) {
+ return [];
+ }
+ var projectsToSearch = args.projectFileName ? [this.projectService.findProject(args.projectFileName)] : info.containingProjects;
+ for (var _i = 0, projectsToSearch_1 = projectsToSearch; _i < projectsToSearch_1.length; _i++) {
+ var project = projectsToSearch_1[_i];
+ if (project.compileOnSaveEnabled && project.languageServiceEnabled) {
+ result.push({
+ projectFileName: project.getProjectName(),
+ fileNames: project.getCompileOnSaveAffectedFileList(info),
+ projectUsesOutFile: !!project.getCompilerOptions().outFile || !!project.getCompilerOptions().out
+ });
+ }
+ }
+ return result;
+ };
+ Session.prototype.emitFile = function (args) {
+ var _this = this;
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ if (!project) {
+ server.Errors.ThrowNoProject();
+ }
+ if (!project.languageServiceEnabled) {
+ return false;
+ }
+ var scriptInfo = project.getScriptInfo(file);
+ return project.builder.emitFile(scriptInfo, function (path, data, writeByteOrderMark) { return _this.host.writeFile(path, data, writeByteOrderMark); });
+ };
+ Session.prototype.getSignatureHelpItems = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var helpItems = project.getLanguageService().getSignatureHelpItems(file, position);
+ if (!helpItems) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ var span_17 = helpItems.applicableSpan;
+ return {
+ items: helpItems.items,
+ applicableSpan: {
+ start: scriptInfo.positionToLineOffset(span_17.start),
+ end: scriptInfo.positionToLineOffset(span_17.start + span_17.length)
+ },
+ selectedItemIndex: helpItems.selectedItemIndex,
+ argumentIndex: helpItems.argumentIndex,
+ argumentCount: helpItems.argumentCount,
+ };
+ }
+ else {
+ return helpItems;
+ }
+ };
+ Session.prototype.getDiagnostics = function (next, delay, fileNames) {
+ var _this = this;
+ var checkList = fileNames.reduce(function (accum, uncheckedFileName) {
+ var fileName = server.toNormalizedPath(uncheckedFileName);
+ var project = _this.projectService.getDefaultProjectForFile(fileName, true);
+ if (project) {
+ accum.push({ fileName: fileName, project: project });
+ }
+ return accum;
+ }, []);
+ if (checkList.length > 0) {
+ this.updateErrorCheck(next, checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay);
+ }
+ };
+ Session.prototype.change = function (args) {
+ var _this = this;
+ var _a = this.getFileAndProject(args, false), file = _a.file, project = _a.project;
+ if (project) {
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var start = scriptInfo.lineOffsetToPosition(args.line, args.offset);
+ var end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ if (start >= 0) {
+ scriptInfo.editContent(start, end, args.insertString);
+ this.changeSeq++;
+ }
+ this.updateProjectStructure(this.changeSeq, function (n) { return n === _this.changeSeq; });
+ }
+ };
+ Session.prototype.reload = function (args, reqSeq) {
+ var file = server.toNormalizedPath(args.file);
+ var tempFileName = args.tmpfile && server.toNormalizedPath(args.tmpfile);
+ var project = this.projectService.getDefaultProjectForFile(file, true);
+ if (project) {
+ this.changeSeq++;
+ if (project.reloadScript(file, tempFileName)) {
+ this.output(undefined, CommandNames.Reload, reqSeq);
+ }
+ }
+ };
+ Session.prototype.saveToTmp = function (fileName, tempFileName) {
+ var scriptInfo = this.projectService.getScriptInfo(fileName);
+ if (scriptInfo) {
+ scriptInfo.saveTo(tempFileName);
+ }
+ };
+ Session.prototype.closeClientFile = function (fileName) {
+ if (!fileName) {
+ return;
+ }
+ var file = ts.normalizePath(fileName);
+ this.projectService.closeClientFile(file);
+ };
+ Session.prototype.decorateNavigationBarItems = function (items, scriptInfo) {
+ var _this = this;
+ return ts.map(items, function (item) { return ({
+ text: item.text,
+ kind: item.kind,
+ kindModifiers: item.kindModifiers,
+ spans: item.spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); }),
+ childItems: _this.decorateNavigationBarItems(item.childItems, scriptInfo),
+ indent: item.indent
+ }); });
+ };
+ Session.prototype.getNavigationBarItems = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var items = project.getLanguageService(false).getNavigationBarItems(file);
+ return !items
+ ? undefined
+ : simplifiedResult
+ ? this.decorateNavigationBarItems(items, project.getScriptInfoForNormalizedPath(file))
+ : items;
+ };
+ Session.prototype.decorateNavigationTree = function (tree, scriptInfo) {
+ var _this = this;
+ return {
+ text: tree.text,
+ kind: tree.kind,
+ kindModifiers: tree.kindModifiers,
+ spans: tree.spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); }),
+ childItems: ts.map(tree.childItems, function (item) { return _this.decorateNavigationTree(item, scriptInfo); })
+ };
+ };
+ Session.prototype.decorateSpan = function (span, scriptInfo) {
+ return {
+ start: scriptInfo.positionToLineOffset(span.start),
+ end: scriptInfo.positionToLineOffset(ts.textSpanEnd(span))
+ };
+ };
+ Session.prototype.getNavigationTree = function (args, simplifiedResult) {
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
+ var tree = project.getLanguageService(false).getNavigationTree(file);
+ return !tree
+ ? undefined
+ : simplifiedResult
+ ? this.decorateNavigationTree(tree, project.getScriptInfoForNormalizedPath(file))
+ : tree;
+ };
+ Session.prototype.getNavigateToItems = function (args, simplifiedResult) {
+ var projects = this.getProjects(args);
+ var fileName = args.currentFileOnly ? args.file && ts.normalizeSlashes(args.file) : undefined;
+ if (simplifiedResult) {
+ return server.combineProjectOutput(projects, function (project) {
+ var navItems = project.getLanguageService().getNavigateToItems(args.searchValue, args.maxResultCount, fileName, project.isNonTsProject());
+ if (!navItems) {
+ return [];
+ }
+ return navItems.map(function (navItem) {
+ var scriptInfo = project.getScriptInfo(navItem.fileName);
+ var start = scriptInfo.positionToLineOffset(navItem.textSpan.start);
+ var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(navItem.textSpan));
+ var bakedItem = {
+ name: navItem.name,
+ kind: navItem.kind,
+ file: navItem.fileName,
+ start: start,
+ end: end,
+ };
+ if (navItem.kindModifiers && (navItem.kindModifiers !== "")) {
+ bakedItem.kindModifiers = navItem.kindModifiers;
+ }
+ if (navItem.matchKind !== "none") {
+ bakedItem.matchKind = navItem.matchKind;
+ }
+ if (navItem.containerName && (navItem.containerName.length > 0)) {
+ bakedItem.containerName = navItem.containerName;
+ }
+ if (navItem.containerKind && (navItem.containerKind.length > 0)) {
+ bakedItem.containerKind = navItem.containerKind;
+ }
+ return bakedItem;
+ });
+ }, undefined, areNavToItemsForTheSameLocation);
+ }
+ else {
+ return server.combineProjectOutput(projects, function (project) { return project.getLanguageService().getNavigateToItems(args.searchValue, args.maxResultCount, fileName, project.isNonTsProject()); }, undefined, navigateToItemIsEqualTo);
+ }
+ function navigateToItemIsEqualTo(a, b) {
+ if (a === b) {
+ return true;
+ }
+ if (!a || !b) {
+ return false;
+ }
+ return a.containerKind === b.containerKind &&
+ a.containerName === b.containerName &&
+ a.fileName === b.fileName &&
+ a.isCaseSensitive === b.isCaseSensitive &&
+ a.kind === b.kind &&
+ a.kindModifiers === b.containerName &&
+ a.matchKind === b.matchKind &&
+ a.name === b.name &&
+ a.textSpan.start === b.textSpan.start &&
+ a.textSpan.length === b.textSpan.length;
+ }
+ function areNavToItemsForTheSameLocation(a, b) {
+ if (a && b) {
+ return a.file === b.file &&
+ a.start === b.start &&
+ a.end === b.end;
+ }
+ return false;
+ }
+ };
+ Session.prototype.getSupportedCodeFixes = function () {
+ return ts.getSupportedCodeFixes();
+ };
+ Session.prototype.getCodeFixes = function (args, simplifiedResult) {
+ var _this = this;
+ if (args.errorCodes.length === 0) {
+ return undefined;
+ }
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var startPosition = getStartPosition();
+ var endPosition = getEndPosition();
+ var formatOptions = this.projectService.getFormatCodeOptions(file);
+ var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, formatOptions);
+ if (!codeActions) {
+ return undefined;
+ }
+ if (simplifiedResult) {
+ return codeActions.map(function (codeAction) { return _this.mapCodeAction(codeAction, scriptInfo); });
+ }
+ else {
+ return codeActions;
+ }
+ function getStartPosition() {
+ return args.startPosition !== undefined ? args.startPosition : scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
+ }
+ function getEndPosition() {
+ return args.endPosition !== undefined ? args.endPosition : scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ }
+ };
+ Session.prototype.mapCodeAction = function (codeAction, scriptInfo) {
+ var _this = this;
+ return {
+ description: codeAction.description,
+ changes: codeAction.changes.map(function (change) { return ({
+ fileName: change.fileName,
+ textChanges: change.textChanges.map(function (textChange) { return _this.convertTextChangeToCodeEdit(textChange, scriptInfo); })
+ }); })
+ };
+ };
+ Session.prototype.convertTextChangeToCodeEdit = function (change, scriptInfo) {
+ return {
+ start: scriptInfo.positionToLineOffset(change.span.start),
+ end: scriptInfo.positionToLineOffset(change.span.start + change.span.length),
+ newText: change.newText ? change.newText : ""
+ };
+ };
+ Session.prototype.getBraceMatching = function (args, simplifiedResult) {
+ var _this = this;
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var position = this.getPosition(args, scriptInfo);
+ var spans = project.getLanguageService(false).getBraceMatchingAtPosition(file, position);
+ return !spans
+ ? undefined
+ : simplifiedResult
+ ? spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); })
+ : spans;
+ };
+ Session.prototype.getDiagnosticsForProject = function (next, delay, fileName) {
+ var _this = this;
+ var _a = this.getProjectInfoWorker(fileName, undefined, true), fileNames = _a.fileNames, languageServiceDisabled = _a.languageServiceDisabled;
+ if (languageServiceDisabled) {
+ return;
+ }
+ var fileNamesInProject = fileNames.filter(function (value) { return value.indexOf("lib.d.ts") < 0; });
+ var highPriorityFiles = [];
+ var mediumPriorityFiles = [];
+ var lowPriorityFiles = [];
+ var veryLowPriorityFiles = [];
+ var normalizedFileName = server.toNormalizedPath(fileName);
+ var project = this.projectService.getDefaultProjectForFile(normalizedFileName, true);
+ for (var _i = 0, fileNamesInProject_1 = fileNamesInProject; _i < fileNamesInProject_1.length; _i++) {
+ var fileNameInProject = fileNamesInProject_1[_i];
+ if (this.getCanonicalFileName(fileNameInProject) === this.getCanonicalFileName(fileName))
+ highPriorityFiles.push(fileNameInProject);
+ else {
+ var info = this.projectService.getScriptInfo(fileNameInProject);
+ if (!info.isScriptOpen()) {
+ if (fileNameInProject.indexOf(".d.ts") > 0)
+ veryLowPriorityFiles.push(fileNameInProject);
+ else
+ lowPriorityFiles.push(fileNameInProject);
+ }
+ else
+ mediumPriorityFiles.push(fileNameInProject);
+ }
+ }
+ fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);
+ if (fileNamesInProject.length > 0) {
+ var checkList = fileNamesInProject.map(function (fileName) { return ({ fileName: fileName, project: project }); });
+ this.updateErrorCheck(next, checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay, 200, false);
+ }
+ };
+ Session.prototype.getCanonicalFileName = function (fileName) {
+ var name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
+ return ts.normalizePath(name);
+ };
+ Session.prototype.exit = function () {
+ };
+ Session.prototype.notRequired = function () {
+ return { responseRequired: false };
+ };
+ Session.prototype.requiredResponse = function (response) {
+ return { response: response, responseRequired: true };
+ };
+ Session.prototype.addProtocolHandler = function (command, handler) {
+ if (this.handlers.has(command)) {
+ throw new Error("Protocol handler already exists for command \"" + command + "\"");
+ }
+ this.handlers.set(command, handler);
+ };
+ Session.prototype.setCurrentRequest = function (requestId) {
+ ts.Debug.assert(this.currentRequestId === undefined);
+ this.currentRequestId = requestId;
+ this.cancellationToken.setRequest(requestId);
+ };
+ Session.prototype.resetCurrentRequest = function (requestId) {
+ ts.Debug.assert(this.currentRequestId === requestId);
+ this.currentRequestId = undefined;
+ this.cancellationToken.resetRequest(requestId);
+ };
+ Session.prototype.executeWithRequestId = function (requestId, f) {
+ try {
+ this.setCurrentRequest(requestId);
+ return f();
+ }
+ finally {
+ this.resetCurrentRequest(requestId);
+ }
+ };
+ Session.prototype.executeCommand = function (request) {
+ var handler = this.handlers.get(request.command);
+ if (handler) {
+ return this.executeWithRequestId(request.seq, function () { return handler(request); });
+ }
+ else {
+ this.logger.msg("Unrecognized JSON command: " + JSON.stringify(request), server.Msg.Err);
+ this.output(undefined, CommandNames.Unknown, request.seq, "Unrecognized JSON command: " + request.command);
+ return { responseRequired: false };
+ }
+ };
+ Session.prototype.onMessage = function (message) {
+ this.gcTimer.scheduleCollect();
+ var start;
+ if (this.logger.hasLevel(server.LogLevel.requestTime)) {
+ start = this.hrtime();
+ if (this.logger.hasLevel(server.LogLevel.verbose)) {
+ this.logger.info("request: " + message);
+ }
+ }
+ var request;
+ try {
+ request = JSON.parse(message);
+ var _a = this.executeCommand(request), response = _a.response, responseRequired = _a.responseRequired;
+ if (this.logger.hasLevel(server.LogLevel.requestTime)) {
+ var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
+ if (responseRequired) {
+ this.logger.perftrc(request.seq + "::" + request.command + ": elapsed time (in milliseconds) " + elapsedTime);
+ }
+ else {
+ this.logger.perftrc(request.seq + "::" + request.command + ": async elapsed time (in milliseconds) " + elapsedTime);
+ }
+ }
+ if (response) {
+ this.output(response, request.command, request.seq);
+ }
+ else if (responseRequired) {
+ this.output(undefined, request.command, request.seq, "No content available.");
+ }
+ }
+ catch (err) {
+ if (err instanceof ts.OperationCanceledException) {
+ this.output({ canceled: true }, request.command, request.seq);
+ return;
+ }
+ this.logError(err, message);
+ this.output(undefined, request ? request.command : CommandNames.Unknown, request ? request.seq : 0, "Error processing request. " + err.message + "\n" + err.stack);
+ }
+ };
+ return Session;
+ }());
+ server.Session = Session;
+ })(server = ts.server || (ts.server = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ var lineCollectionCapacity = 4;
+ var CharRangeSection;
+ (function (CharRangeSection) {
+ CharRangeSection[CharRangeSection["PreStart"] = 0] = "PreStart";
+ CharRangeSection[CharRangeSection["Start"] = 1] = "Start";
+ CharRangeSection[CharRangeSection["Entire"] = 2] = "Entire";
+ CharRangeSection[CharRangeSection["Mid"] = 3] = "Mid";
+ CharRangeSection[CharRangeSection["End"] = 4] = "End";
+ CharRangeSection[CharRangeSection["PostEnd"] = 5] = "PostEnd";
+ })(CharRangeSection = server.CharRangeSection || (server.CharRangeSection = {}));
+ var BaseLineIndexWalker = (function () {
+ function BaseLineIndexWalker() {
+ this.goSubtree = true;
+ this.done = false;
+ }
+ BaseLineIndexWalker.prototype.leaf = function (_rangeStart, _rangeLength, _ll) {
+ };
+ return BaseLineIndexWalker;
+ }());
+ var EditWalker = (function (_super) {
+ __extends(EditWalker, _super);
+ function EditWalker() {
+ var _this = _super.call(this) || this;
+ _this.lineIndex = new LineIndex();
+ _this.endBranch = [];
+ _this.state = CharRangeSection.Entire;
+ _this.initialText = "";
+ _this.trailingText = "";
+ _this.suppressTrailingText = false;
+ _this.lineIndex.root = new LineNode();
+ _this.startPath = [_this.lineIndex.root];
+ _this.stack = [_this.lineIndex.root];
+ return _this;
+ }
+ EditWalker.prototype.insertLines = function (insertedText) {
+ if (this.suppressTrailingText) {
+ this.trailingText = "";
+ }
+ if (insertedText) {
+ insertedText = this.initialText + insertedText + this.trailingText;
+ }
+ else {
+ insertedText = this.initialText + this.trailingText;
+ }
+ var lm = LineIndex.linesFromText(insertedText);
+ var lines = lm.lines;
+ if (lines.length > 1) {
+ if (lines[lines.length - 1] === "") {
+ lines.length--;
+ }
+ }
+ var branchParent;
+ var lastZeroCount;
+ for (var k = this.endBranch.length - 1; k >= 0; k--) {
+ this.endBranch[k].updateCounts();
+ if (this.endBranch[k].charCount() === 0) {
+ lastZeroCount = this.endBranch[k];
+ if (k > 0) {
+ branchParent = this.endBranch[k - 1];
+ }
+ else {
+ branchParent = this.branchNode;
+ }
+ }
+ }
+ if (lastZeroCount) {
+ branchParent.remove(lastZeroCount);
+ }
+ var insertionNode = this.startPath[this.startPath.length - 2];
+ var leafNode = this.startPath[this.startPath.length - 1];
+ var len = lines.length;
+ if (len > 0) {
+ leafNode.text = lines[0];
+ if (len > 1) {
+ var insertedNodes = new Array(len - 1);
+ var startNode = leafNode;
+ for (var i = 1; i < lines.length; i++) {
+ insertedNodes[i - 1] = new LineLeaf(lines[i]);
+ }
+ var pathIndex = this.startPath.length - 2;
+ while (pathIndex >= 0) {
+ insertionNode = this.startPath[pathIndex];
+ insertedNodes = insertionNode.insertAt(startNode, insertedNodes);
+ pathIndex--;
+ startNode = insertionNode;
+ }
+ var insertedNodesLen = insertedNodes.length;
+ while (insertedNodesLen > 0) {
+ var newRoot = new LineNode();
+ newRoot.add(this.lineIndex.root);
+ insertedNodes = newRoot.insertAt(this.lineIndex.root, insertedNodes);
+ insertedNodesLen = insertedNodes.length;
+ this.lineIndex.root = newRoot;
+ }
+ this.lineIndex.root.updateCounts();
+ }
+ else {
+ for (var j = this.startPath.length - 2; j >= 0; j--) {
+ this.startPath[j].updateCounts();
+ }
+ }
+ }
+ else {
+ insertionNode.remove(leafNode);
+ for (var j = this.startPath.length - 2; j >= 0; j--) {
+ this.startPath[j].updateCounts();
+ }
+ }
+ return this.lineIndex;
+ };
+ EditWalker.prototype.post = function (_relativeStart, _relativeLength, lineCollection) {
+ if (lineCollection === this.lineCollectionAtBranch) {
+ this.state = CharRangeSection.End;
+ }
+ this.stack.length--;
+ return undefined;
+ };
+ EditWalker.prototype.pre = function (_relativeStart, _relativeLength, lineCollection, _parent, nodeType) {
+ var currentNode = this.stack[this.stack.length - 1];
+ if ((this.state === CharRangeSection.Entire) && (nodeType === CharRangeSection.Start)) {
+ this.state = CharRangeSection.Start;
+ this.branchNode = currentNode;
+ this.lineCollectionAtBranch = lineCollection;
+ }
+ var child;
+ function fresh(node) {
+ if (node.isLeaf()) {
+ return new LineLeaf("");
+ }
+ else
+ return new LineNode();
+ }
+ switch (nodeType) {
+ case CharRangeSection.PreStart:
+ this.goSubtree = false;
+ if (this.state !== CharRangeSection.End) {
+ currentNode.add(lineCollection);
+ }
+ break;
+ case CharRangeSection.Start:
+ if (this.state === CharRangeSection.End) {
+ this.goSubtree = false;
+ }
+ else {
+ child = fresh(lineCollection);
+ currentNode.add(child);
+ this.startPath[this.startPath.length] = child;
+ }
+ break;
+ case CharRangeSection.Entire:
+ if (this.state !== CharRangeSection.End) {
+ child = fresh(lineCollection);
+ currentNode.add(child);
+ this.startPath[this.startPath.length] = child;
+ }
+ else {
+ if (!lineCollection.isLeaf()) {
+ child = fresh(lineCollection);
+ currentNode.add(child);
+ this.endBranch[this.endBranch.length] = child;
+ }
+ }
+ break;
+ case CharRangeSection.Mid:
+ this.goSubtree = false;
+ break;
+ case CharRangeSection.End:
+ if (this.state !== CharRangeSection.End) {
+ this.goSubtree = false;
+ }
+ else {
+ if (!lineCollection.isLeaf()) {
+ child = fresh(lineCollection);
+ currentNode.add(child);
+ this.endBranch[this.endBranch.length] = child;
+ }
+ }
+ break;
+ case CharRangeSection.PostEnd:
+ this.goSubtree = false;
+ if (this.state !== CharRangeSection.Start) {
+ currentNode.add(lineCollection);
+ }
+ break;
+ }
+ if (this.goSubtree) {
+ this.stack[this.stack.length] = child;
+ }
+ return lineCollection;
+ };
+ EditWalker.prototype.leaf = function (relativeStart, relativeLength, ll) {
+ if (this.state === CharRangeSection.Start) {
+ this.initialText = ll.text.substring(0, relativeStart);
+ }
+ else if (this.state === CharRangeSection.Entire) {
+ this.initialText = ll.text.substring(0, relativeStart);
+ this.trailingText = ll.text.substring(relativeStart + relativeLength);
+ }
+ else {
+ this.trailingText = ll.text.substring(relativeStart + relativeLength);
+ }
+ };
+ return EditWalker;
+ }(BaseLineIndexWalker));
+ var TextChange = (function () {
+ function TextChange(pos, deleteLen, insertedText) {
+ this.pos = pos;
+ this.deleteLen = deleteLen;
+ this.insertedText = insertedText;
+ }
+ TextChange.prototype.getTextChangeRange = function () {
+ return ts.createTextChangeRange(ts.createTextSpan(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0);
+ };
+ return TextChange;
+ }());
+ server.TextChange = TextChange;
+ var ScriptVersionCache = (function () {
+ function ScriptVersionCache() {
+ this.changes = [];
+ this.versions = new Array(ScriptVersionCache.maxVersions);
+ this.minVersion = 0;
+ this.currentVersion = 0;
+ }
+ ScriptVersionCache.prototype.versionToIndex = function (version) {
+ if (version < this.minVersion || version > this.currentVersion) {
+ return undefined;
+ }
+ return version % ScriptVersionCache.maxVersions;
+ };
+ ScriptVersionCache.prototype.currentVersionToIndex = function () {
+ return this.currentVersion % ScriptVersionCache.maxVersions;
+ };
+ ScriptVersionCache.prototype.edit = function (pos, deleteLen, insertedText) {
+ this.changes[this.changes.length] = new TextChange(pos, deleteLen, insertedText);
+ if ((this.changes.length > ScriptVersionCache.changeNumberThreshold) ||
+ (deleteLen > ScriptVersionCache.changeLengthThreshold) ||
+ (insertedText && (insertedText.length > ScriptVersionCache.changeLengthThreshold))) {
+ this.getSnapshot();
+ }
+ };
+ ScriptVersionCache.prototype.latest = function () {
+ return this.versions[this.currentVersionToIndex()];
+ };
+ ScriptVersionCache.prototype.latestVersion = function () {
+ if (this.changes.length > 0) {
+ this.getSnapshot();
+ }
+ return this.currentVersion;
+ };
+ ScriptVersionCache.prototype.reloadFromFile = function (filename) {
+ var content = this.host.readFile(filename);
+ if (!content) {
+ content = "";
+ }
+ this.reload(content);
+ };
+ ScriptVersionCache.prototype.reload = function (script) {
+ this.currentVersion++;
+ this.changes = [];
+ var snap = new LineIndexSnapshot(this.currentVersion, this);
+ for (var i = 0; i < this.versions.length; i++) {
+ this.versions[i] = undefined;
+ }
+ this.versions[this.currentVersionToIndex()] = snap;
+ snap.index = new LineIndex();
+ var lm = LineIndex.linesFromText(script);
+ snap.index.load(lm.lines);
+ this.minVersion = this.currentVersion;
+ };
+ ScriptVersionCache.prototype.getSnapshot = function () {
+ var snap = this.versions[this.currentVersionToIndex()];
+ if (this.changes.length > 0) {
+ var snapIndex = snap.index;
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var change = _a[_i];
+ snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText);
+ }
+ snap = new LineIndexSnapshot(this.currentVersion + 1, this);
+ snap.index = snapIndex;
+ snap.changesSincePreviousVersion = this.changes;
+ this.currentVersion = snap.version;
+ this.versions[this.currentVersionToIndex()] = snap;
+ this.changes = [];
+ if ((this.currentVersion - this.minVersion) >= ScriptVersionCache.maxVersions) {
+ this.minVersion = (this.currentVersion - ScriptVersionCache.maxVersions) + 1;
+ }
+ }
+ return snap;
+ };
+ ScriptVersionCache.prototype.getTextChangesBetweenVersions = function (oldVersion, newVersion) {
+ if (oldVersion < newVersion) {
+ if (oldVersion >= this.minVersion) {
+ var textChangeRanges = [];
+ for (var i = oldVersion + 1; i <= newVersion; i++) {
+ var snap = this.versions[this.versionToIndex(i)];
+ for (var _i = 0, _a = snap.changesSincePreviousVersion; _i < _a.length; _i++) {
+ var textChange = _a[_i];
+ textChangeRanges[textChangeRanges.length] = textChange.getTextChangeRange();
+ }
+ }
+ return ts.collapseTextChangeRangesAcrossMultipleVersions(textChangeRanges);
+ }
+ else {
+ return undefined;
+ }
+ }
+ else {
+ return ts.unchangedTextChangeRange;
+ }
+ };
+ ScriptVersionCache.fromString = function (host, script) {
+ var svc = new ScriptVersionCache();
+ var snap = new LineIndexSnapshot(0, svc);
+ svc.versions[svc.currentVersion] = snap;
+ svc.host = host;
+ snap.index = new LineIndex();
+ var lm = LineIndex.linesFromText(script);
+ snap.index.load(lm.lines);
+ return svc;
+ };
+ return ScriptVersionCache;
+ }());
+ ScriptVersionCache.changeNumberThreshold = 8;
+ ScriptVersionCache.changeLengthThreshold = 256;
+ ScriptVersionCache.maxVersions = 8;
+ server.ScriptVersionCache = ScriptVersionCache;
+ var LineIndexSnapshot = (function () {
+ function LineIndexSnapshot(version, cache) {
+ this.version = version;
+ this.cache = cache;
+ this.changesSincePreviousVersion = [];
+ }
+ LineIndexSnapshot.prototype.getText = function (rangeStart, rangeEnd) {
+ return this.index.getText(rangeStart, rangeEnd - rangeStart);
+ };
+ LineIndexSnapshot.prototype.getLength = function () {
+ return this.index.root.charCount();
+ };
+ LineIndexSnapshot.prototype.getLineStartPositions = function () {
+ var starts = [-1];
+ var count = 1;
+ var pos = 0;
+ this.index.every(function (ll) {
+ starts[count] = pos;
+ count++;
+ pos += ll.text.length;
+ return true;
+ }, 0);
+ return starts;
+ };
+ LineIndexSnapshot.prototype.getLineMapper = function () {
+ var _this = this;
+ return function (line) {
+ return _this.index.lineNumberToInfo(line).offset;
+ };
+ };
+ LineIndexSnapshot.prototype.getTextChangeRangeSinceVersion = function (scriptVersion) {
+ if (this.version <= scriptVersion) {
+ return ts.unchangedTextChangeRange;
+ }
+ else {
+ return this.cache.getTextChangesBetweenVersions(scriptVersion, this.version);
+ }
+ };
+ LineIndexSnapshot.prototype.getChangeRange = function (oldSnapshot) {
+ if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) {
+ return this.getTextChangeRangeSinceVersion(oldSnapshot.version);
+ }
+ };
+ return LineIndexSnapshot;
+ }());
+ server.LineIndexSnapshot = LineIndexSnapshot;
+ var LineIndex = (function () {
+ function LineIndex() {
+ this.checkEdits = false;
+ }
+ LineIndex.prototype.charOffsetToLineNumberAndPos = function (charOffset) {
+ return this.root.charOffsetToLineNumberAndPos(1, charOffset);
+ };
+ LineIndex.prototype.lineNumberToInfo = function (lineNumber) {
+ var lineCount = this.root.lineCount();
+ if (lineNumber <= lineCount) {
+ var lineInfo = this.root.lineNumberToInfo(lineNumber, 0);
+ lineInfo.line = lineNumber;
+ return lineInfo;
+ }
+ else {
+ return {
+ line: lineNumber,
+ offset: this.root.charCount()
+ };
+ }
+ };
+ LineIndex.prototype.load = function (lines) {
+ if (lines.length > 0) {
+ var leaves = [];
+ for (var i = 0; i < lines.length; i++) {
+ leaves[i] = new LineLeaf(lines[i]);
+ }
+ this.root = LineIndex.buildTreeFromBottom(leaves);
+ }
+ else {
+ this.root = new LineNode();
+ }
+ };
+ LineIndex.prototype.walk = function (rangeStart, rangeLength, walkFns) {
+ this.root.walk(rangeStart, rangeLength, walkFns);
+ };
+ LineIndex.prototype.getText = function (rangeStart, rangeLength) {
+ var accum = "";
+ if ((rangeLength > 0) && (rangeStart < this.root.charCount())) {
+ this.walk(rangeStart, rangeLength, {
+ goSubtree: true,
+ done: false,
+ leaf: function (relativeStart, relativeLength, ll) {
+ accum = accum.concat(ll.text.substring(relativeStart, relativeStart + relativeLength));
+ }
+ });
+ }
+ return accum;
+ };
+ LineIndex.prototype.getLength = function () {
+ return this.root.charCount();
+ };
+ LineIndex.prototype.every = function (f, rangeStart, rangeEnd) {
+ if (!rangeEnd) {
+ rangeEnd = this.root.charCount();
+ }
+ var walkFns = {
+ goSubtree: true,
+ done: false,
+ leaf: function (relativeStart, relativeLength, ll) {
+ if (!f(ll, relativeStart, relativeLength)) {
+ this.done = true;
+ }
+ }
+ };
+ this.walk(rangeStart, rangeEnd - rangeStart, walkFns);
+ return !walkFns.done;
+ };
+ LineIndex.prototype.edit = function (pos, deleteLength, newText) {
+ function editFlat(source, s, dl, nt) {
+ if (nt === void 0) { nt = ""; }
+ return source.substring(0, s) + nt + source.substring(s + dl, source.length);
+ }
+ if (this.root.charCount() === 0) {
+ if (newText !== undefined) {
+ this.load(LineIndex.linesFromText(newText).lines);
+ return this;
+ }
+ }
+ else {
+ var checkText = void 0;
+ if (this.checkEdits) {
+ checkText = editFlat(this.getText(0, this.root.charCount()), pos, deleteLength, newText);
+ }
+ var walker = new EditWalker();
+ if (pos >= this.root.charCount()) {
+ pos = this.root.charCount() - 1;
+ var endString = this.getText(pos, 1);
+ if (newText) {
+ newText = endString + newText;
+ }
+ else {
+ newText = endString;
+ }
+ deleteLength = 0;
+ walker.suppressTrailingText = true;
+ }
+ else if (deleteLength > 0) {
+ var e = pos + deleteLength;
+ var lineInfo = this.charOffsetToLineNumberAndPos(e);
+ if ((lineInfo && (lineInfo.offset === 0))) {
+ deleteLength += lineInfo.text.length;
+ if (newText) {
+ newText = newText + lineInfo.text;
+ }
+ else {
+ newText = lineInfo.text;
+ }
+ }
+ }
+ if (pos < this.root.charCount()) {
+ this.root.walk(pos, deleteLength, walker);
+ walker.insertLines(newText);
+ }
+ if (this.checkEdits) {
+ var updatedText = this.getText(0, this.root.charCount());
+ ts.Debug.assert(checkText === updatedText, "buffer edit mismatch");
+ }
+ return walker.lineIndex;
+ }
+ };
+ LineIndex.buildTreeFromBottom = function (nodes) {
+ var nodeCount = Math.ceil(nodes.length / lineCollectionCapacity);
+ var interiorNodes = [];
+ var nodeIndex = 0;
+ for (var i = 0; i < nodeCount; i++) {
+ interiorNodes[i] = new LineNode();
+ var charCount = 0;
+ var lineCount = 0;
+ for (var j = 0; j < lineCollectionCapacity; j++) {
+ if (nodeIndex < nodes.length) {
+ interiorNodes[i].add(nodes[nodeIndex]);
+ charCount += nodes[nodeIndex].charCount();
+ lineCount += nodes[nodeIndex].lineCount();
+ }
+ else {
+ break;
+ }
+ nodeIndex++;
+ }
+ interiorNodes[i].totalChars = charCount;
+ interiorNodes[i].totalLines = lineCount;
+ }
+ if (interiorNodes.length === 1) {
+ return interiorNodes[0];
+ }
+ else {
+ return this.buildTreeFromBottom(interiorNodes);
+ }
+ };
+ LineIndex.linesFromText = function (text) {
+ var lineStarts = ts.computeLineStarts(text);
+ if (lineStarts.length === 0) {
+ return { lines: [], lineMap: lineStarts };
+ }
+ var lines = new Array(lineStarts.length);
+ var lc = lineStarts.length - 1;
+ for (var lmi = 0; lmi < lc; lmi++) {
+ lines[lmi] = text.substring(lineStarts[lmi], lineStarts[lmi + 1]);
+ }
+ var endText = text.substring(lineStarts[lc]);
+ if (endText.length > 0) {
+ lines[lc] = endText;
+ }
+ else {
+ lines.length--;
+ }
+ return { lines: lines, lineMap: lineStarts };
+ };
+ return LineIndex;
+ }());
+ server.LineIndex = LineIndex;
+ var LineNode = (function () {
+ function LineNode() {
+ this.totalChars = 0;
+ this.totalLines = 0;
+ this.children = [];
+ }
+ LineNode.prototype.isLeaf = function () {
+ return false;
+ };
+ LineNode.prototype.updateCounts = function () {
+ this.totalChars = 0;
+ this.totalLines = 0;
+ for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
+ var child = _a[_i];
+ this.totalChars += child.charCount();
+ this.totalLines += child.lineCount();
+ }
+ };
+ LineNode.prototype.execWalk = function (rangeStart, rangeLength, walkFns, childIndex, nodeType) {
+ if (walkFns.pre) {
+ walkFns.pre(rangeStart, rangeLength, this.children[childIndex], this, nodeType);
+ }
+ if (walkFns.goSubtree) {
+ this.children[childIndex].walk(rangeStart, rangeLength, walkFns);
+ if (walkFns.post) {
+ walkFns.post(rangeStart, rangeLength, this.children[childIndex], this, nodeType);
+ }
+ }
+ else {
+ walkFns.goSubtree = true;
+ }
+ return walkFns.done;
+ };
+ LineNode.prototype.skipChild = function (relativeStart, relativeLength, childIndex, walkFns, nodeType) {
+ if (walkFns.pre && (!walkFns.done)) {
+ walkFns.pre(relativeStart, relativeLength, this.children[childIndex], this, nodeType);
+ walkFns.goSubtree = true;
+ }
+ };
+ LineNode.prototype.walk = function (rangeStart, rangeLength, walkFns) {
+ var childIndex = 0;
+ var child = this.children[0];
+ var childCharCount = child.charCount();
+ var adjustedStart = rangeStart;
+ while (adjustedStart >= childCharCount) {
+ this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, CharRangeSection.PreStart);
+ adjustedStart -= childCharCount;
+ childIndex++;
+ child = this.children[childIndex];
+ childCharCount = child.charCount();
+ }
+ if ((adjustedStart + rangeLength) <= childCharCount) {
+ if (this.execWalk(adjustedStart, rangeLength, walkFns, childIndex, CharRangeSection.Entire)) {
+ return;
+ }
+ }
+ else {
+ if (this.execWalk(adjustedStart, childCharCount - adjustedStart, walkFns, childIndex, CharRangeSection.Start)) {
+ return;
+ }
+ var adjustedLength = rangeLength - (childCharCount - adjustedStart);
+ childIndex++;
+ child = this.children[childIndex];
+ childCharCount = child.charCount();
+ while (adjustedLength > childCharCount) {
+ if (this.execWalk(0, childCharCount, walkFns, childIndex, CharRangeSection.Mid)) {
+ return;
+ }
+ adjustedLength -= childCharCount;
+ childIndex++;
+ child = this.children[childIndex];
+ childCharCount = child.charCount();
+ }
+ if (adjustedLength > 0) {
+ if (this.execWalk(0, adjustedLength, walkFns, childIndex, CharRangeSection.End)) {
+ return;
+ }
+ }
+ }
+ if (walkFns.pre) {
+ var clen = this.children.length;
+ if (childIndex < (clen - 1)) {
+ for (var ej = childIndex + 1; ej < clen; ej++) {
+ this.skipChild(0, 0, ej, walkFns, CharRangeSection.PostEnd);
+ }
+ }
+ }
+ };
+ LineNode.prototype.charOffsetToLineNumberAndPos = function (lineNumber, charOffset) {
+ var childInfo = this.childFromCharOffset(lineNumber, charOffset);
+ if (!childInfo.child) {
+ return {
+ line: lineNumber,
+ offset: charOffset,
+ };
+ }
+ else if (childInfo.childIndex < this.children.length) {
+ if (childInfo.child.isLeaf()) {
+ return {
+ line: childInfo.lineNumber,
+ offset: childInfo.charOffset,
+ text: (childInfo.child).text,
+ leaf: (childInfo.child)
+ };
+ }
+ else {
+ var lineNode = (childInfo.child);
+ return lineNode.charOffsetToLineNumberAndPos(childInfo.lineNumber, childInfo.charOffset);
+ }
+ }
+ else {
+ var lineInfo = this.lineNumberToInfo(this.lineCount(), 0);
+ return { line: this.lineCount(), offset: lineInfo.leaf.charCount() };
+ }
+ };
+ LineNode.prototype.lineNumberToInfo = function (lineNumber, charOffset) {
+ var childInfo = this.childFromLineNumber(lineNumber, charOffset);
+ if (!childInfo.child) {
+ return {
+ line: lineNumber,
+ offset: charOffset
+ };
+ }
+ else if (childInfo.child.isLeaf()) {
+ return {
+ line: lineNumber,
+ offset: childInfo.charOffset,
+ text: (childInfo.child).text,
+ leaf: (childInfo.child)
+ };
+ }
+ else {
+ var lineNode = (childInfo.child);
+ return lineNode.lineNumberToInfo(childInfo.relativeLineNumber, childInfo.charOffset);
+ }
+ };
+ LineNode.prototype.childFromLineNumber = function (lineNumber, charOffset) {
+ var child;
+ var relativeLineNumber = lineNumber;
+ var i;
+ var len;
+ for (i = 0, len = this.children.length; i < len; i++) {
+ child = this.children[i];
+ var childLineCount = child.lineCount();
+ if (childLineCount >= relativeLineNumber) {
+ break;
+ }
+ else {
+ relativeLineNumber -= childLineCount;
+ charOffset += child.charCount();
+ }
+ }
+ return {
+ child: child,
+ childIndex: i,
+ relativeLineNumber: relativeLineNumber,
+ charOffset: charOffset
+ };
+ };
+ LineNode.prototype.childFromCharOffset = function (lineNumber, charOffset) {
+ var child;
+ var i;
+ var len;
+ for (i = 0, len = this.children.length; i < len; i++) {
+ child = this.children[i];
+ if (child.charCount() > charOffset) {
+ break;
+ }
+ else {
+ charOffset -= child.charCount();
+ lineNumber += child.lineCount();
+ }
+ }
+ return {
+ child: child,
+ childIndex: i,
+ charOffset: charOffset,
+ lineNumber: lineNumber
+ };
+ };
+ LineNode.prototype.splitAfter = function (childIndex) {
+ var splitNode;
+ var clen = this.children.length;
+ childIndex++;
+ var endLength = childIndex;
+ if (childIndex < clen) {
+ splitNode = new LineNode();
+ while (childIndex < clen) {
+ splitNode.add(this.children[childIndex]);
+ childIndex++;
+ }
+ splitNode.updateCounts();
+ }
+ this.children.length = endLength;
+ return splitNode;
+ };
+ LineNode.prototype.remove = function (child) {
+ var childIndex = this.findChildIndex(child);
+ var clen = this.children.length;
+ if (childIndex < (clen - 1)) {
+ for (var i = childIndex; i < (clen - 1); i++) {
+ this.children[i] = this.children[i + 1];
+ }
+ }
+ this.children.length--;
+ };
+ LineNode.prototype.findChildIndex = function (child) {
+ var childIndex = 0;
+ var clen = this.children.length;
+ while ((this.children[childIndex] !== child) && (childIndex < clen))
+ childIndex++;
+ return childIndex;
+ };
+ LineNode.prototype.insertAt = function (child, nodes) {
+ var childIndex = this.findChildIndex(child);
+ var clen = this.children.length;
+ var nodeCount = nodes.length;
+ if ((clen < lineCollectionCapacity) && (childIndex === (clen - 1)) && (nodeCount === 1)) {
+ this.add(nodes[0]);
+ this.updateCounts();
+ return [];
+ }
+ else {
+ var shiftNode = this.splitAfter(childIndex);
+ var nodeIndex = 0;
+ childIndex++;
+ while ((childIndex < lineCollectionCapacity) && (nodeIndex < nodeCount)) {
+ this.children[childIndex] = nodes[nodeIndex];
+ childIndex++;
+ nodeIndex++;
+ }
+ var splitNodes = [];
+ var splitNodeCount = 0;
+ if (nodeIndex < nodeCount) {
+ splitNodeCount = Math.ceil((nodeCount - nodeIndex) / lineCollectionCapacity);
+ splitNodes = new Array(splitNodeCount);
+ var splitNodeIndex = 0;
+ for (var i = 0; i < splitNodeCount; i++) {
+ splitNodes[i] = new LineNode();
+ }
+ var splitNode = splitNodes[0];
+ while (nodeIndex < nodeCount) {
+ splitNode.add(nodes[nodeIndex]);
+ nodeIndex++;
+ if (splitNode.children.length === lineCollectionCapacity) {
+ splitNodeIndex++;
+ splitNode = splitNodes[splitNodeIndex];
+ }
+ }
+ for (var i = splitNodes.length - 1; i >= 0; i--) {
+ if (splitNodes[i].children.length === 0) {
+ splitNodes.length--;
+ }
+ }
+ }
+ if (shiftNode) {
+ splitNodes[splitNodes.length] = shiftNode;
+ }
+ this.updateCounts();
+ for (var i = 0; i < splitNodeCount; i++) {
+ splitNodes[i].updateCounts();
+ }
+ return splitNodes;
+ }
+ };
+ LineNode.prototype.add = function (collection) {
+ this.children[this.children.length] = collection;
+ return (this.children.length < lineCollectionCapacity);
+ };
+ LineNode.prototype.charCount = function () {
+ return this.totalChars;
+ };
+ LineNode.prototype.lineCount = function () {
+ return this.totalLines;
+ };
+ return LineNode;
+ }());
+ server.LineNode = LineNode;
+ var LineLeaf = (function () {
+ function LineLeaf(text) {
+ this.text = text;
+ }
+ LineLeaf.prototype.isLeaf = function () {
+ return true;
+ };
+ LineLeaf.prototype.walk = function (rangeStart, rangeLength, walkFns) {
+ walkFns.leaf(rangeStart, rangeLength, this);
+ };
+ LineLeaf.prototype.charCount = function () {
+ return this.text.length;
+ };
+ LineLeaf.prototype.lineCount = function () {
+ return 1;
+ };
+ return LineLeaf;
+ }());
+ server.LineLeaf = LineLeaf;
+ })(server = ts.server || (ts.server = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var server;
+ (function (server) {
+ var TextStorage = (function () {
+ function TextStorage(host, fileName) {
+ this.host = host;
+ this.fileName = fileName;
+ this.svcVersion = 0;
+ this.textVersion = 0;
+ }
+ TextStorage.prototype.getVersion = function () {
+ return this.svc
+ ? "SVC-" + this.svcVersion + "-" + this.svc.getSnapshot().version
+ : "Text-" + this.textVersion;
+ };
+ TextStorage.prototype.hasScriptVersionCache = function () {
+ return this.svc !== undefined;
+ };
+ TextStorage.prototype.useScriptVersionCache = function (newText) {
+ this.switchToScriptVersionCache(newText);
+ };
+ TextStorage.prototype.useText = function (newText) {
+ this.svc = undefined;
+ this.setText(newText);
+ };
+ TextStorage.prototype.edit = function (start, end, newText) {
+ this.switchToScriptVersionCache().edit(start, end - start, newText);
+ };
+ TextStorage.prototype.reload = function (text) {
+ if (this.svc) {
+ this.svc.reload(text);
+ }
+ else {
+ this.setText(text);
+ }
+ };
+ TextStorage.prototype.reloadFromFile = function (tempFileName) {
+ if (this.svc || (tempFileName !== this.fileName)) {
+ this.reload(this.getFileText(tempFileName));
+ }
+ else {
+ this.setText(undefined);
+ }
+ };
+ TextStorage.prototype.getSnapshot = function () {
+ return this.svc
+ ? this.svc.getSnapshot()
+ : ts.ScriptSnapshot.fromString(this.getOrLoadText());
+ };
+ TextStorage.prototype.getLineInfo = function (line) {
+ return this.switchToScriptVersionCache().getSnapshot().index.lineNumberToInfo(line);
+ };
+ TextStorage.prototype.lineToTextSpan = function (line) {
+ if (!this.svc) {
+ var lineMap = this.getLineMap();
+ var start = lineMap[line];
+ var end = line + 1 < lineMap.length ? lineMap[line + 1] : this.text.length;
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineInfo = index.lineNumberToInfo(line + 1);
+ var len;
+ if (lineInfo.leaf) {
+ len = lineInfo.leaf.text.length;
+ }
+ else {
+ var nextLineInfo = index.lineNumberToInfo(line + 2);
+ len = nextLineInfo.offset - lineInfo.offset;
+ }
+ return ts.createTextSpan(lineInfo.offset, len);
+ };
+ TextStorage.prototype.lineOffsetToPosition = function (line, offset) {
+ if (!this.svc) {
+ return ts.computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1);
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineInfo = index.lineNumberToInfo(line);
+ return (lineInfo.offset + offset - 1);
+ };
+ TextStorage.prototype.positionToLineOffset = function (position) {
+ if (!this.svc) {
+ var _a = ts.computeLineAndCharacterOfPosition(this.getLineMap(), position), line = _a.line, character = _a.character;
+ return { line: line + 1, offset: character + 1 };
+ }
+ var index = this.svc.getSnapshot().index;
+ var lineOffset = index.charOffsetToLineNumberAndPos(position);
+ return { line: lineOffset.line, offset: lineOffset.offset + 1 };
+ };
+ TextStorage.prototype.getFileText = function (tempFileName) {
+ return this.host.readFile(tempFileName || this.fileName) || "";
+ };
+ TextStorage.prototype.ensureNoScriptVersionCache = function () {
+ ts.Debug.assert(!this.svc, "ScriptVersionCache should not be set");
+ };
+ TextStorage.prototype.switchToScriptVersionCache = function (newText) {
+ if (!this.svc) {
+ this.svc = server.ScriptVersionCache.fromString(this.host, newText !== undefined ? newText : this.getOrLoadText());
+ this.svcVersion++;
+ this.text = undefined;
+ }
+ return this.svc;
+ };
+ TextStorage.prototype.getOrLoadText = function () {
+ this.ensureNoScriptVersionCache();
+ if (this.text === undefined) {
+ this.setText(this.getFileText());
+ }
+ return this.text;
+ };
+ TextStorage.prototype.getLineMap = function () {
+ this.ensureNoScriptVersionCache();
+ return this.lineMap || (this.lineMap = ts.computeLineStarts(this.getOrLoadText()));
+ };
+ TextStorage.prototype.setText = function (newText) {
+ this.ensureNoScriptVersionCache();
+ if (newText === undefined || this.text !== newText) {
+ this.text = newText;
+ this.lineMap = undefined;
+ this.textVersion++;
+ }
+ };
+ return TextStorage;
+ }());
+ server.TextStorage = TextStorage;
var ScriptInfo = (function () {
- function ScriptInfo(host, fileName, content, scriptKind, isOpen, hasMixedContent) {
- if (isOpen === void 0) { isOpen = false; }
+ function ScriptInfo(host, fileName, scriptKind, hasMixedContent) {
if (hasMixedContent === void 0) { hasMixedContent = false; }
this.host = host;
this.fileName = fileName;
this.scriptKind = scriptKind;
- this.isOpen = isOpen;
this.hasMixedContent = hasMixedContent;
this.containingProjects = [];
this.path = ts.toPath(fileName, host.getCurrentDirectory(), ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames));
- this.svc = server.ScriptVersionCache.fromString(host, content);
+ this.textStorage = new TextStorage(host, fileName);
+ if (hasMixedContent) {
+ this.textStorage.reload("");
+ }
this.scriptKind = scriptKind
? scriptKind
: ts.getScriptKindFromFileName(fileName);
}
+ ScriptInfo.prototype.isScriptOpen = function () {
+ return this.isOpen;
+ };
+ ScriptInfo.prototype.open = function (newText) {
+ this.isOpen = true;
+ this.textStorage.useScriptVersionCache(newText);
+ this.markContainingProjectsAsDirty();
+ };
+ ScriptInfo.prototype.close = function () {
+ this.isOpen = false;
+ this.textStorage.useText(this.hasMixedContent ? "" : undefined);
+ this.markContainingProjectsAsDirty();
+ };
+ ScriptInfo.prototype.getSnapshot = function () {
+ return this.textStorage.getSnapshot();
+ };
ScriptInfo.prototype.getFormatCodeSettings = function () {
return this.formatCodeSettings;
};
@@ -64601,17 +74976,37 @@ var ts;
this.containingProjects.length = 0;
};
ScriptInfo.prototype.getDefaultProject = function () {
- if (this.containingProjects.length === 0) {
- return server.Errors.ThrowNoProject();
+ switch (this.containingProjects.length) {
+ case 0:
+ return server.Errors.ThrowNoProject();
+ case 1:
+ return this.containingProjects[0];
+ default:
+ var firstExternalProject = void 0;
+ for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) {
+ var project = _a[_i];
+ if (project.projectKind === server.ProjectKind.Configured) {
+ return project;
+ }
+ else if (project.projectKind === server.ProjectKind.External && !firstExternalProject) {
+ firstExternalProject = project;
+ }
+ }
+ return firstExternalProject || this.containingProjects[0];
+ }
+ };
+ ScriptInfo.prototype.registerFileUpdate = function () {
+ for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) {
+ var p = _a[_i];
+ p.registerFileUpdate(this.path);
}
- return this.containingProjects[0];
};
ScriptInfo.prototype.setFormatOptions = function (formatSettings) {
if (formatSettings) {
if (!this.formatCodeSettings) {
this.formatCodeSettings = server.getDefaultFormatCodeSettings(this.host);
}
- server.mergeMaps(this.formatCodeSettings, formatSettings);
+ server.mergeMapLikes(this.formatCodeSettings, formatSettings);
}
};
ScriptInfo.prototype.setWatcher = function (watcher) {
@@ -64625,14 +75020,14 @@ var ts;
}
};
ScriptInfo.prototype.getLatestVersion = function () {
- return this.svc.latestVersion().toString();
+ return this.textStorage.getVersion();
};
ScriptInfo.prototype.reload = function (script) {
- this.svc.reload(script);
+ this.textStorage.reload(script);
this.markContainingProjectsAsDirty();
};
ScriptInfo.prototype.saveTo = function (fileName) {
- var snap = this.snap();
+ var snap = this.textStorage.getSnapshot();
this.host.writeFile(fileName, snap.getText(0, snap.getLength()));
};
ScriptInfo.prototype.reloadFromFile = function (tempFileName) {
@@ -64640,19 +75035,15 @@ var ts;
this.reload("");
}
else {
- this.svc.reloadFromFile(tempFileName || this.fileName);
+ this.textStorage.reloadFromFile(tempFileName);
this.markContainingProjectsAsDirty();
}
};
- ScriptInfo.prototype.snap = function () {
- return this.svc.getSnapshot();
- };
ScriptInfo.prototype.getLineInfo = function (line) {
- var snap = this.snap();
- return snap.index.lineNumberToInfo(line);
+ return this.textStorage.getLineInfo(line);
};
ScriptInfo.prototype.editContent = function (start, end, newText) {
- this.svc.edit(start, end - start, newText);
+ this.textStorage.edit(start, end, newText);
this.markContainingProjectsAsDirty();
};
ScriptInfo.prototype.markContainingProjectsAsDirty = function () {
@@ -64662,27 +75053,16 @@ var ts;
}
};
ScriptInfo.prototype.lineToTextSpan = function (line) {
- var index = this.snap().index;
- var lineInfo = index.lineNumberToInfo(line + 1);
- var len;
- if (lineInfo.leaf) {
- len = lineInfo.leaf.text.length;
- }
- else {
- var nextLineInfo = index.lineNumberToInfo(line + 2);
- len = nextLineInfo.offset - lineInfo.offset;
- }
- return ts.createTextSpan(lineInfo.offset, len);
+ return this.textStorage.lineToTextSpan(line);
};
ScriptInfo.prototype.lineOffsetToPosition = function (line, offset) {
- var index = this.snap().index;
- var lineInfo = index.lineNumberToInfo(line);
- return (lineInfo.offset + offset - 1);
+ return this.textStorage.lineOffsetToPosition(line, offset);
};
ScriptInfo.prototype.positionToLineOffset = function (position) {
- var index = this.snap().index;
- var lineOffset = index.charOffsetToLineNumberAndPos(position);
- return { line: lineOffset.line, offset: lineOffset.offset + 1 };
+ return this.textStorage.positionToLineOffset(position);
+ };
+ ScriptInfo.prototype.isJavaScript = function () {
+ return this.scriptKind === 1 || this.scriptKind === 2;
};
return ScriptInfo;
}());
@@ -64701,6 +75081,7 @@ var ts;
this.cancellationToken = cancellationToken;
this.resolvedModuleNames = ts.createFileMap();
this.resolvedTypeReferenceDirectives = ts.createFileMap();
+ this.cancellationToken = new ts.ThrottledCancellationToken(cancellationToken, project.projectService.throttleWaitMilliseconds);
this.getCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
if (host.trace) {
this.trace = function (s) { return host.trace(s); };
@@ -64710,7 +75091,7 @@ var ts;
? _this.project.projectService.typingsInstaller.globalTypingsCacheLocation
: undefined;
var primaryResult = ts.resolveModuleName(moduleName, containingFile, compilerOptions, host);
- if (!(primaryResult.resolvedModule && ts.extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) {
+ if (ts.moduleHasNonRelativeName(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) {
var _a = ts.loadModuleFromGlobalCache(moduleName, _this.project.getProjectName(), compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
if (resolvedModule) {
return { resolvedModule: resolvedModule, failedLookupLocations: primaryResult.failedLookupLocations.concat(failedLookupLocations) };
@@ -64738,15 +75119,16 @@ var ts;
var compilerOptions = this.getCompilationSettings();
var lastDeletedFileName = this.project.projectService.lastDeletedFile && this.project.projectService.lastDeletedFile.fileName;
for (var _i = 0, names_2 = names; _i < names_2.length; _i++) {
- var name_49 = names_2[_i];
- var resolution = newResolutions[name_49];
+ var name = names_2[_i];
+ var resolution = newResolutions.get(name);
if (!resolution) {
- var existingResolution = currentResolutionsInFile && currentResolutionsInFile[name_49];
+ var existingResolution = currentResolutionsInFile && currentResolutionsInFile.get(name);
if (moduleResolutionIsValid(existingResolution)) {
resolution = existingResolution;
}
else {
- newResolutions[name_49] = resolution = loader(name_49, containingFile, compilerOptions, this);
+ resolution = loader(name, containingFile, compilerOptions, this);
+ newResolutions.set(name, resolution);
}
if (logChanges && this.filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
this.filesWithChangedSetOfUnresolvedImports.push(path);
@@ -64786,6 +75168,9 @@ var ts;
return resolution.failedLookupLocations.length === 0;
}
};
+ LSHost.prototype.getNewLine = function () {
+ return this.host.newLine;
+ };
LSHost.prototype.getProjectVersion = function () {
return this.project.getProjectVersion();
};
@@ -64811,7 +75196,7 @@ var ts;
LSHost.prototype.getScriptSnapshot = function (filename) {
var scriptInfo = this.project.getScriptInfoLSHost(filename);
if (scriptInfo) {
- return scriptInfo.snap();
+ return scriptInfo.getSnapshot();
}
};
LSHost.prototype.getScriptFileNames = function () {
@@ -64891,18 +75276,19 @@ var ts;
var unique = 0;
for (var _i = 0, arr1_1 = arr1; _i < arr1_1.length; _i++) {
var v = arr1_1[_i];
- if (set[v] !== true) {
- set[v] = true;
+ if (set.get(v) !== true) {
+ set.set(v, true);
unique++;
}
}
for (var _a = 0, arr2_1 = arr2; _a < arr2_1.length; _a++) {
var v = arr2_1[_a];
- if (!ts.hasProperty(set, v)) {
+ var isSet = set.get(v);
+ if (isSet === undefined) {
return false;
}
- if (set[v] === true) {
- set[v] = false;
+ if (isSet === true) {
+ set.set(v, false);
unique--;
}
}
@@ -64914,7 +75300,7 @@ var ts;
!setIsEqualTo(opt1.exclude, opt2.exclude);
}
function compilerOptionsChanged(opt1, opt2) {
- return opt1.allowJs != opt2.allowJs;
+ return opt1.allowJs !== opt2.allowJs;
}
function unresolvedImportsChanged(imports1, imports2) {
if (imports1 === imports2) {
@@ -64932,38 +75318,38 @@ var ts;
if (!typeAcquisition || !typeAcquisition.enable) {
return server.emptyArray;
}
- var entry = this.perProjectCache[project.getProjectName()];
+ var entry = this.perProjectCache.get(project.getProjectName());
var result = entry ? entry.typings : server.emptyArray;
if (forceRefresh ||
!entry ||
typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) ||
compilerOptionsChanged(project.getCompilerOptions(), entry.compilerOptions) ||
unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) {
- this.perProjectCache[project.getProjectName()] = {
+ this.perProjectCache.set(project.getProjectName(), {
compilerOptions: project.getCompilerOptions(),
typeAcquisition: typeAcquisition,
typings: result,
unresolvedImports: unresolvedImports,
poisoned: true
- };
+ });
this.installer.enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
}
return result;
};
TypingsCache.prototype.updateTypingsForProject = function (projectName, compilerOptions, typeAcquisition, unresolvedImports, newTypings) {
- this.perProjectCache[projectName] = {
+ this.perProjectCache.set(projectName, {
compilerOptions: compilerOptions,
typeAcquisition: typeAcquisition,
typings: server.toSortedReadonlyArray(newTypings),
unresolvedImports: unresolvedImports,
poisoned: false
- };
+ });
};
TypingsCache.prototype.deleteTypingsForProject = function (projectName) {
- delete this.perProjectCache[projectName];
+ this.perProjectCache.delete(projectName);
};
TypingsCache.prototype.onProjectClosed = function (project) {
- delete this.perProjectCache[project.getProjectName()];
+ this.perProjectCache.delete(project.getProjectName());
this.installer.onProjectClosed(project);
};
return TypingsCache;
@@ -64991,7 +75377,7 @@ var ts;
BuilderFileInfo.prototype.containsOnlyAmbientModules = function (sourceFile) {
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var statement = _a[_i];
- if (statement.kind !== 230 || statement.name.kind !== 9) {
+ if (statement.kind !== 232 || statement.name.kind !== 9) {
return false;
}
}
@@ -65027,10 +75413,15 @@ var ts;
function AbstractBuilder(project, ctor) {
this.project = project;
this.ctor = ctor;
- this.fileInfos = ts.createFileMap();
}
+ AbstractBuilder.prototype.getFileInfos = function () {
+ return this.fileInfos_doNotAccessDirectly || (this.fileInfos_doNotAccessDirectly = ts.createFileMap());
+ };
+ AbstractBuilder.prototype.clear = function () {
+ this.fileInfos_doNotAccessDirectly = undefined;
+ };
AbstractBuilder.prototype.getFileInfo = function (path) {
- return this.fileInfos.get(path);
+ return this.getFileInfos().get(path);
};
AbstractBuilder.prototype.getOrCreateFileInfo = function (path) {
var fileInfo = this.getFileInfo(path);
@@ -65042,16 +75433,16 @@ var ts;
return fileInfo;
};
AbstractBuilder.prototype.getFileInfoPaths = function () {
- return this.fileInfos.getKeys();
+ return this.getFileInfos().getKeys();
};
AbstractBuilder.prototype.setFileInfo = function (path, info) {
- this.fileInfos.set(path, info);
+ this.getFileInfos().set(path, info);
};
AbstractBuilder.prototype.removeFileInfo = function (path) {
- this.fileInfos.remove(path);
+ this.getFileInfos().remove(path);
};
AbstractBuilder.prototype.forEachFileInfo = function (action) {
- this.fileInfos.forEachValue(function (_path, value) { return action(value); });
+ this.getFileInfos().forEachValue(function (_path, value) { return action(value); });
};
AbstractBuilder.prototype.emitFile = function (scriptInfo, writeFile) {
var fileInfo = this.getFileInfo(scriptInfo.path);
@@ -65097,7 +75488,7 @@ var ts;
var ModuleBuilderFileInfo = (function (_super) {
__extends(ModuleBuilderFileInfo, _super);
function ModuleBuilderFileInfo() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.references = [];
_this.referencedBy = [];
return _this;
@@ -65107,7 +75498,6 @@ var ts;
var r = rf.scriptInfo.fileName;
return (l < r ? -1 : (l > r ? 1 : 0));
};
- ;
ModuleBuilderFileInfo.addToReferenceList = function (array, fileInfo) {
if (array.length === 0) {
array.push(fileInfo);
@@ -65153,6 +75543,10 @@ var ts;
_this.project = project;
return _this;
}
+ ModuleBuilder.prototype.clear = function () {
+ this.projectVersionForDependencyGraph = undefined;
+ _super.prototype.clear.call(this);
+ };
ModuleBuilder.prototype.getReferencedFileInfos = function (fileInfo) {
var _this = this;
if (!fileInfo.isExternalModuleOrHasOnlyAmbientExternalModules()) {
@@ -65235,25 +75629,25 @@ var ts;
}
var queue = fileInfo.referencedBy.slice(0);
var fileNameSet = ts.createMap();
- fileNameSet[scriptInfo.fileName] = scriptInfo;
+ fileNameSet.set(scriptInfo.fileName, scriptInfo);
while (queue.length > 0) {
var processingFileInfo = queue.pop();
if (processingFileInfo.updateShapeSignature() && processingFileInfo.referencedBy.length > 0) {
for (var _i = 0, _a = processingFileInfo.referencedBy; _i < _a.length; _i++) {
var potentialFileInfo = _a[_i];
- if (!fileNameSet[potentialFileInfo.scriptInfo.fileName]) {
+ if (!fileNameSet.has(potentialFileInfo.scriptInfo.fileName)) {
queue.push(potentialFileInfo);
}
}
}
- fileNameSet[processingFileInfo.scriptInfo.fileName] = processingFileInfo.scriptInfo;
+ fileNameSet.set(processingFileInfo.scriptInfo.fileName, processingFileInfo.scriptInfo);
}
var result = [];
- for (var fileName in fileNameSet) {
- if (shouldEmitFile(fileNameSet[fileName])) {
+ fileNameSet.forEach(function (scriptInfo, fileName) {
+ if (shouldEmitFile(scriptInfo)) {
result.push(fileName);
}
- }
+ });
return result;
};
return ModuleBuilder;
@@ -65349,107 +75743,6 @@ var ts;
return UnresolvedImportsMap;
}());
server.UnresolvedImportsMap = UnresolvedImportsMap;
- var emptyResult = [];
- var getEmptyResult = function () { return emptyResult; };
- var getUndefined = function () { return undefined; };
- var emptyEncodedSemanticClassifications = { spans: emptyResult, endOfLineState: 0 };
- function createNoSemanticFeaturesWrapper(realLanguageService) {
- return {
- cleanupSemanticCache: ts.noop,
- getSyntacticDiagnostics: function (fileName) {
- return fileName ? realLanguageService.getSyntacticDiagnostics(fileName) : emptyResult;
- },
- getSemanticDiagnostics: getEmptyResult,
- getCompilerOptionsDiagnostics: function () {
- return realLanguageService.getCompilerOptionsDiagnostics();
- },
- getSyntacticClassifications: function (fileName, span) {
- return realLanguageService.getSyntacticClassifications(fileName, span);
- },
- getEncodedSyntacticClassifications: function (fileName, span) {
- return realLanguageService.getEncodedSyntacticClassifications(fileName, span);
- },
- getSemanticClassifications: getEmptyResult,
- getEncodedSemanticClassifications: function () {
- return emptyEncodedSemanticClassifications;
- },
- getCompletionsAtPosition: getUndefined,
- findReferences: getEmptyResult,
- getCompletionEntryDetails: getUndefined,
- getQuickInfoAtPosition: getUndefined,
- findRenameLocations: getEmptyResult,
- getNameOrDottedNameSpan: function (fileName, startPos, endPos) {
- return realLanguageService.getNameOrDottedNameSpan(fileName, startPos, endPos);
- },
- getBreakpointStatementAtPosition: function (fileName, position) {
- return realLanguageService.getBreakpointStatementAtPosition(fileName, position);
- },
- getBraceMatchingAtPosition: function (fileName, position) {
- return realLanguageService.getBraceMatchingAtPosition(fileName, position);
- },
- getSignatureHelpItems: getUndefined,
- getDefinitionAtPosition: getEmptyResult,
- getRenameInfo: function () { return ({
- canRename: false,
- localizedErrorMessage: ts.getLocaleSpecificMessage(ts.Diagnostics.Language_service_is_disabled),
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- }); },
- getTypeDefinitionAtPosition: getUndefined,
- getReferencesAtPosition: getEmptyResult,
- getDocumentHighlights: getEmptyResult,
- getOccurrencesAtPosition: getEmptyResult,
- getNavigateToItems: getEmptyResult,
- getNavigationBarItems: function (fileName) {
- return realLanguageService.getNavigationBarItems(fileName);
- },
- getNavigationTree: function (fileName) {
- return realLanguageService.getNavigationTree(fileName);
- },
- getOutliningSpans: function (fileName) {
- return realLanguageService.getOutliningSpans(fileName);
- },
- getTodoComments: getEmptyResult,
- getIndentationAtPosition: function (fileName, position, options) {
- return realLanguageService.getIndentationAtPosition(fileName, position, options);
- },
- getFormattingEditsForRange: function (fileName, start, end, options) {
- return realLanguageService.getFormattingEditsForRange(fileName, start, end, options);
- },
- getFormattingEditsForDocument: function (fileName, options) {
- return realLanguageService.getFormattingEditsForDocument(fileName, options);
- },
- getFormattingEditsAfterKeystroke: function (fileName, position, key, options) {
- return realLanguageService.getFormattingEditsAfterKeystroke(fileName, position, key, options);
- },
- getDocCommentTemplateAtPosition: function (fileName, position) {
- return realLanguageService.getDocCommentTemplateAtPosition(fileName, position);
- },
- isValidBraceCompletionAtPosition: function (fileName, position, openingBrace) {
- return realLanguageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace);
- },
- getEmitOutput: getUndefined,
- getProgram: function () {
- return realLanguageService.getProgram();
- },
- getNonBoundSourceFile: function (fileName) {
- return realLanguageService.getNonBoundSourceFile(fileName);
- },
- dispose: function () {
- return realLanguageService.dispose();
- },
- getCompletionEntrySymbol: getUndefined,
- getImplementationAtPosition: getEmptyResult,
- getSourceFile: function (fileName) {
- return realLanguageService.getSourceFile(fileName);
- },
- getCodeFixesAtPosition: getEmptyResult
- };
- }
- server.createNoSemanticFeaturesWrapper = createNoSemanticFeaturesWrapper;
var Project = (function () {
function Project(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) {
this.projectName = projectName;
@@ -65471,16 +75764,13 @@ var ts;
this.compilerOptions.allowNonTsExtensions = true;
this.compilerOptions.allowJs = true;
}
- else if (hasExplicitListOfFiles) {
+ else if (hasExplicitListOfFiles || this.compilerOptions.allowJs) {
this.compilerOptions.allowNonTsExtensions = true;
}
- if (this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) {
- this.compilerOptions.noEmitForJsFiles = true;
- }
+ this.setInternalCompilerOptionsForEmittingJsFiles();
this.lsHost = new server.LSHost(this.projectService.host, this, this.projectService.cancellationToken);
this.lsHost.setCompilationSettings(this.compilerOptions);
this.languageService = ts.createLanguageService(this.lsHost, this.documentRegistry);
- this.noSemanticFeaturesLanguageService = createNoSemanticFeaturesWrapper(this.languageService);
if (!languageServiceEnabled) {
this.disableLanguageService();
}
@@ -65498,6 +75788,21 @@ var ts;
Project.prototype.getCachedUnresolvedImportsPerFile_TestOnly = function () {
return this.cachedUnresolvedImportsPerFile;
};
+ Project.resolveModule = function (moduleName, initialDir, host, log) {
+ var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
+ log("Loading " + moduleName + " from " + initialDir + " (resolved to " + resolvedPath + ")");
+ var result = host.require(resolvedPath, moduleName);
+ if (result.error) {
+ log("Failed to load module: " + JSON.stringify(result.error));
+ return undefined;
+ }
+ return result.module;
+ };
+ Project.prototype.setInternalCompilerOptionsForEmittingJsFiles = function () {
+ if (this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) {
+ this.compilerOptions.noEmitForJsFiles = true;
+ }
+ };
Project.prototype.getProjectErrors = function () {
return this.projectErrors;
};
@@ -65506,9 +75811,7 @@ var ts;
if (ensureSynchronized) {
this.updateGraph();
}
- return this.languageServiceEnabled
- ? this.languageService
- : this.noSemanticFeaturesLanguageService;
+ return this.languageService;
};
Project.prototype.getCompileOnSaveAffectedFileList = function (scriptInfo) {
if (!this.languageServiceEnabled) {
@@ -65538,6 +75841,9 @@ var ts;
Project.prototype.getProjectName = function () {
return this.projectName;
};
+ Project.prototype.getExternalFiles = function () {
+ return [];
+ };
Project.prototype.getSourceFile = function (path) {
if (!this.program) {
return undefined;
@@ -65557,7 +75863,7 @@ var ts;
info.detachFromProject(this);
}
}
- else {
+ if (!this.program || !this.languageServiceEnabled) {
for (var _b = 0, _c = this.rootFiles; _b < _c.length; _b++) {
var root = _c[_b];
root.detachFromProject(this);
@@ -65582,7 +75888,9 @@ var ts;
if (this.rootFiles) {
for (var _i = 0, _a = this.rootFiles; _i < _a.length; _i++) {
var f = _a[_i];
- result.push(f.fileName);
+ if (this.languageServiceEnabled || f.isScriptOpen()) {
+ result.push(f.fileName);
+ }
}
if (this.typingFiles) {
for (var _b = 0, _c = this.typingFiles; _b < _c.length; _b++) {
@@ -65598,6 +75906,9 @@ var ts;
};
Project.prototype.getScriptInfos = function () {
var _this = this;
+ if (!this.languageServiceEnabled) {
+ return this.rootFiles;
+ }
return ts.map(this.program.getSourceFiles(), function (sourceFile) {
var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.path);
if (!scriptInfo) {
@@ -65656,7 +75967,7 @@ var ts;
};
Project.prototype.containsFile = function (filename, requireOpen) {
var info = this.projectService.getScriptInfoForNormalizedPath(filename);
- if (info && (info.isOpen || !requireOpen)) {
+ if (info && (info.isScriptOpen() || !requireOpen)) {
return this.containsScriptInfo(info);
}
};
@@ -65673,7 +75984,9 @@ var ts;
};
Project.prototype.removeFile = function (info, detachFromProject) {
if (detachFromProject === void 0) { detachFromProject = true; }
- this.removeRootFileIfNecessary(info);
+ if (this.isRoot(info)) {
+ this.removeRoot(info);
+ }
this.lsHost.notifyFileRemoved(info);
this.cachedUnresolvedImportsPerFile.remove(info.path);
if (detachFromProject) {
@@ -65681,23 +75994,26 @@ var ts;
}
this.markAsDirty();
};
+ Project.prototype.registerFileUpdate = function (fileName) {
+ (this.updatedFileNames || (this.updatedFileNames = ts.createMap())).set(fileName, fileName);
+ };
Project.prototype.markAsDirty = function () {
this.projectStateVersion++;
};
Project.prototype.extractUnresolvedImportsFromSourceFile = function (file, result) {
var cached = this.cachedUnresolvedImportsPerFile.get(file.path);
if (cached) {
- for (var _i = 0, cached_1 = cached; _i < cached_1.length; _i++) {
- var f = cached_1[_i];
+ for (var _i = 0, cached_2 = cached; _i < cached_2.length; _i++) {
+ var f = cached_2[_i];
result.push(f);
}
return;
}
var unresolvedImports;
if (file.resolvedModules) {
- for (var name_50 in file.resolvedModules) {
- if (!file.resolvedModules[name_50] && !ts.isExternalModuleNameRelative(name_50)) {
- var trimmed = name_50.trim();
+ file.resolvedModules.forEach(function (resolvedModule, name) {
+ if (!resolvedModule && !ts.isExternalModuleNameRelative(name)) {
+ var trimmed = name.trim();
var i = trimmed.indexOf("/");
if (i !== -1 && trimmed.charCodeAt(0) === 64) {
i = trimmed.indexOf("/", i + 1);
@@ -65708,14 +76024,11 @@ var ts;
(unresolvedImports || (unresolvedImports = [])).push(trimmed);
result.push(trimmed);
}
- }
+ });
}
this.cachedUnresolvedImportsPerFile.set(file.path, unresolvedImports || server.emptyArray);
};
Project.prototype.updateGraph = function () {
- if (!this.languageServiceEnabled) {
- return true;
- }
this.lsHost.startRecordingFilesWithChangedResolutions();
var hasChanges = this.updateGraphWorker();
var changedFiles = this.lsHost.finishRecordingFilesWithChangedResolutions() || server.emptyArray;
@@ -65737,6 +76050,12 @@ var ts;
if (this.setTypings(cachedTypings)) {
hasChanges = this.updateGraphWorker() || hasChanges;
}
+ if (this.languageServiceEnabled) {
+ this.builder.onProjectUpdateGraph();
+ }
+ else {
+ this.builder.clear();
+ }
if (hasChanges) {
this.projectStructureVersion++;
}
@@ -65769,7 +76088,6 @@ var ts;
}
}
}
- this.builder.onProjectUpdateGraph();
return hasChanges;
};
Project.prototype.getScriptInfoLSHost = function (fileName) {
@@ -65802,15 +76120,13 @@ var ts;
};
Project.prototype.setCompilerOptions = function (compilerOptions) {
if (compilerOptions) {
- if (this.projectKind === ProjectKind.Inferred) {
- compilerOptions.allowJs = true;
- }
compilerOptions.allowNonTsExtensions = true;
if (ts.changesAffectModuleResolution(this.compilerOptions, compilerOptions)) {
this.cachedUnresolvedImportsPerFile.clear();
this.lastCachedUnresolvedImportsList = undefined;
}
this.compilerOptions = compilerOptions;
+ this.setInternalCompilerOptionsForEmittingJsFiles();
this.lsHost.setCompilationSettings(compilerOptions);
this.markAsDirty();
}
@@ -65830,29 +76146,33 @@ var ts;
projectName: this.getProjectName(),
version: this.projectStructureVersion,
isInferred: this.projectKind === ProjectKind.Inferred,
- options: this.getCompilerOptions()
+ options: this.getCompilerOptions(),
+ languageServiceDisabled: !this.languageServiceEnabled
};
+ var updatedFileNames = this.updatedFileNames;
+ this.updatedFileNames = undefined;
if (this.lastReportedFileNames && lastKnownVersion === this.lastReportedVersion) {
- if (this.projectStructureVersion == this.lastReportedVersion) {
+ if (this.projectStructureVersion === this.lastReportedVersion && !updatedFileNames) {
return { info: info, projectErrors: this.projectErrors };
}
- var lastReportedFileNames = this.lastReportedFileNames;
- var currentFiles = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
- var added = [];
- var removed = [];
- for (var id in currentFiles) {
- if (!ts.hasProperty(lastReportedFileNames, id)) {
- added.push(id);
+ var lastReportedFileNames_1 = this.lastReportedFileNames;
+ var currentFiles_1 = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
+ var added_1 = [];
+ var removed_1 = [];
+ var updated = ts.arrayFrom(updatedFileNames.keys());
+ ts.forEachKey(currentFiles_1, function (id) {
+ if (!lastReportedFileNames_1.has(id)) {
+ added_1.push(id);
}
- }
- for (var id in lastReportedFileNames) {
- if (!ts.hasProperty(currentFiles, id)) {
- removed.push(id);
+ });
+ ts.forEachKey(lastReportedFileNames_1, function (id) {
+ if (!currentFiles_1.has(id)) {
+ removed_1.push(id);
}
- }
- this.lastReportedFileNames = currentFiles;
+ });
+ this.lastReportedFileNames = currentFiles_1;
this.lastReportedVersion = this.projectStructureVersion;
- return { info: info, changes: { added: added, removed: removed }, projectErrors: this.projectErrors };
+ return { info: info, changes: { added: added_1, removed: removed_1, updated: updated }, projectErrors: this.projectErrors };
}
else {
var projectFileNames = this.getFileNames();
@@ -65879,7 +76199,7 @@ var ts;
if (symbol && symbol.declarations && symbol.declarations[0]) {
var declarationSourceFile = symbol.declarations[0].getSourceFile();
if (declarationSourceFile) {
- referencedFiles[declarationSourceFile.path] = true;
+ referencedFiles.set(declarationSourceFile.path, true);
}
}
}
@@ -65890,28 +76210,25 @@ var ts;
for (var _b = 0, _c = sourceFile.referencedFiles; _b < _c.length; _b++) {
var referencedFile = _c[_b];
var referencedPath = ts.toPath(referencedFile.fileName, currentDirectory, getCanonicalFileName);
- referencedFiles[referencedPath] = true;
+ referencedFiles.set(referencedPath, true);
}
}
if (sourceFile.resolvedTypeReferenceDirectiveNames) {
- for (var typeName in sourceFile.resolvedTypeReferenceDirectiveNames) {
- var resolvedTypeReferenceDirective = sourceFile.resolvedTypeReferenceDirectiveNames[typeName];
+ sourceFile.resolvedTypeReferenceDirectiveNames.forEach(function (resolvedTypeReferenceDirective) {
if (!resolvedTypeReferenceDirective) {
- continue;
+ return;
}
var fileName = resolvedTypeReferenceDirective.resolvedFileName;
var typeFilePath = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
- referencedFiles[typeFilePath] = true;
- }
+ referencedFiles.set(typeFilePath, true);
+ });
}
- var allFileNames = ts.map(Object.keys(referencedFiles), function (key) { return key; });
+ var allFileNames = ts.arrayFrom(referencedFiles.keys());
return ts.filter(allFileNames, function (file) { return _this.projectService.host.fileExists(file); });
};
- Project.prototype.removeRootFileIfNecessary = function (info) {
- if (this.isRoot(info)) {
- remove(this.rootFiles, info);
- this.rootFilesMap.remove(info.path);
- }
+ Project.prototype.removeRoot = function (info) {
+ remove(this.rootFiles, info);
+ this.rootFilesMap.remove(info.path);
};
return Project;
}());
@@ -65920,9 +76237,44 @@ var ts;
__extends(InferredProject, _super);
function InferredProject(projectService, documentRegistry, compilerOptions) {
var _this = _super.call(this, InferredProject.newName(), ProjectKind.Inferred, projectService, documentRegistry, undefined, true, compilerOptions, false) || this;
+ _this._isJsInferredProject = false;
_this.directoriesWatchedForTsconfig = [];
return _this;
}
+ InferredProject.prototype.toggleJsInferredProject = function (isJsInferredProject) {
+ if (isJsInferredProject !== this._isJsInferredProject) {
+ this._isJsInferredProject = isJsInferredProject;
+ this.setCompilerOptions();
+ }
+ };
+ InferredProject.prototype.setCompilerOptions = function (options) {
+ var newOptions = options ? ts.clone(options) : this.getCompilerOptions();
+ if (!newOptions) {
+ return;
+ }
+ if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") {
+ newOptions.maxNodeModuleJsDepth = 2;
+ }
+ else if (!this._isJsInferredProject) {
+ newOptions.maxNodeModuleJsDepth = undefined;
+ }
+ newOptions.allowJs = true;
+ _super.prototype.setCompilerOptions.call(this, newOptions);
+ };
+ InferredProject.prototype.addRoot = function (info) {
+ if (!this._isJsInferredProject && info.isJavaScript()) {
+ this.toggleJsInferredProject(true);
+ }
+ _super.prototype.addRoot.call(this, info);
+ };
+ InferredProject.prototype.removeRoot = function (info) {
+ if (this._isJsInferredProject && info.isJavaScript()) {
+ if (ts.filter(this.getRootScriptInfos(), function (info) { return info.isJavaScript(); }).length === 0) {
+ this.toggleJsInferredProject(false);
+ }
+ }
+ _super.prototype.removeRoot.call(this, info);
+ };
InferredProject.prototype.getProjectRootPath = function () {
if (this.projectService.useSingleInferredProject) {
return undefined;
@@ -65961,13 +76313,78 @@ var ts;
var _this = _super.call(this, configFileName, ProjectKind.Configured, projectService, documentRegistry, hasExplicitListOfFiles, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) || this;
_this.wildcardDirectories = wildcardDirectories;
_this.compileOnSaveEnabled = compileOnSaveEnabled;
+ _this.plugins = [];
_this.openRefCount = 0;
_this.canonicalConfigFilePath = server.asNormalizedPath(projectService.toCanonicalFileName(configFileName));
+ _this.enablePlugins();
return _this;
}
ConfiguredProject.prototype.getConfigFilePath = function () {
return this.getProjectName();
};
+ ConfiguredProject.prototype.enablePlugins = function () {
+ var host = this.projectService.host;
+ var options = this.getCompilerOptions();
+ if (!host.require) {
+ this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
+ return;
+ }
+ var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
+ if (options.plugins) {
+ for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
+ var pluginConfigEntry = _a[_i];
+ this.enablePlugin(pluginConfigEntry, searchPaths);
+ }
+ }
+ if (this.projectService.globalPlugins) {
+ var _loop_6 = function (globalPluginName) {
+ if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
+ return "continue";
+ this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths);
+ };
+ var this_1 = this;
+ for (var _b = 0, _c = this.projectService.globalPlugins; _b < _c.length; _b++) {
+ var globalPluginName = _c[_b];
+ _loop_6(globalPluginName);
+ }
+ }
+ };
+ ConfiguredProject.prototype.enablePlugin = function (pluginConfigEntry, searchPaths) {
+ var _this = this;
+ var log = function (message) {
+ _this.projectService.logger.info(message);
+ };
+ for (var _i = 0, searchPaths_1 = searchPaths; _i < searchPaths_1.length; _i++) {
+ var searchPath = searchPaths_1[_i];
+ var resolvedModule = Project.resolveModule(pluginConfigEntry.name, searchPath, this.projectService.host, log);
+ if (resolvedModule) {
+ this.enableProxy(resolvedModule, pluginConfigEntry);
+ return;
+ }
+ }
+ this.projectService.logger.info("Couldn't find " + pluginConfigEntry.name + " anywhere in paths: " + searchPaths.join(","));
+ };
+ ConfiguredProject.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
+ try {
+ if (typeof pluginModuleFactory !== "function") {
+ this.projectService.logger.info("Skipped loading plugin " + configEntry.name + " because it did expose a proper factory function");
+ return;
+ }
+ var info = {
+ config: configEntry,
+ project: this,
+ languageService: this.languageService,
+ languageServiceHost: this.lsHost,
+ serverHost: this.projectService.host
+ };
+ var pluginModule = pluginModuleFactory({ typescript: ts });
+ this.languageService = pluginModule.create(info);
+ this.plugins.push(pluginModule);
+ }
+ catch (e) {
+ this.projectService.logger.info("Plugin activation failed: " + e);
+ }
+ };
ConfiguredProject.prototype.getProjectRootPath = function () {
return ts.getDirectoryPath(this.getConfigFilePath());
};
@@ -65980,6 +76397,21 @@ var ts;
ConfiguredProject.prototype.getTypeAcquisition = function () {
return this.typeAcquisition;
};
+ ConfiguredProject.prototype.getExternalFiles = function () {
+ var items = [];
+ for (var _i = 0, _a = this.plugins; _i < _a.length; _i++) {
+ var plugin = _a[_i];
+ if (typeof plugin.getExternalFiles === "function") {
+ try {
+ items.push.apply(items, plugin.getExternalFiles(this));
+ }
+ catch (e) {
+ this.projectService.logger.info("A plugin threw an exception in getExternalFiles: " + e);
+ }
+ }
+ }
+ return items;
+ };
ConfiguredProject.prototype.watchConfigFile = function (callback) {
var _this = this;
this.projectFileWatcher = this.projectService.host.watchFile(this.getConfigFilePath(), function (_) { return callback(_this); });
@@ -66010,14 +76442,14 @@ var ts;
return;
}
var configDirectoryPath = ts.getDirectoryPath(this.getConfigFilePath());
- this.directoriesWatchedForWildcards = ts.reduceProperties(this.wildcardDirectories, function (watchers, flag, directory) {
+ this.directoriesWatchedForWildcards = ts.createMap();
+ this.wildcardDirectories.forEach(function (flag, directory) {
if (ts.comparePaths(configDirectoryPath, directory, ".", !_this.projectService.host.useCaseSensitiveFileNames) !== 0) {
var recursive = (flag & 1) !== 0;
_this.projectService.logger.info("Add " + (recursive ? "recursive " : "") + "watcher for: " + directory);
- watchers[directory] = _this.projectService.host.watchDirectory(directory, function (path) { return callback(_this, path); }, recursive);
+ _this.directoriesWatchedForWildcards.set(directory, _this.projectService.host.watchDirectory(directory, function (path) { return callback(_this, path); }, recursive));
}
- return watchers;
- }, {});
+ });
};
ConfiguredProject.prototype.stopWatchingDirectory = function () {
if (this.directoryWatcher) {
@@ -66037,9 +76469,9 @@ var ts;
}
this.typeRootsWatchers = undefined;
}
- for (var id in this.directoriesWatchedForWildcards) {
- this.directoriesWatchedForWildcards[id].close();
- }
+ this.directoriesWatchedForWildcards.forEach(function (watcher) {
+ watcher.close();
+ });
this.directoriesWatchedForWildcards = undefined;
this.stopWatchingDirectory();
};
@@ -66060,6 +76492,7 @@ var ts;
__extends(ExternalProject, _super);
function ExternalProject(externalProjectName, projectService, documentRegistry, compilerOptions, languageServiceEnabled, compileOnSaveEnabled, projectFilePath) {
var _this = _super.call(this, externalProjectName, ProjectKind.External, projectService, documentRegistry, true, languageServiceEnabled, compilerOptions, compileOnSaveEnabled) || this;
+ _this.externalProjectName = externalProjectName;
_this.compileOnSaveEnabled = compileOnSaveEnabled;
_this.projectFilePath = projectFilePath;
return _this;
@@ -66116,36 +76549,60 @@ var ts;
var option = commandLineOptions_1[_i];
if (typeof option.type === "object") {
var optionMap = option.type;
- for (var id in optionMap) {
- ts.Debug.assert(typeof optionMap[id] === "number");
- }
- map[option.name] = optionMap;
+ optionMap.forEach(function (value) {
+ ts.Debug.assert(typeof value === "number");
+ });
+ map.set(option.name, optionMap);
}
}
return map;
}
var compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(ts.optionDeclarations);
- var indentStyle = ts.createMap({
+ var indentStyle = ts.createMapFromTemplate({
"none": ts.IndentStyle.None,
"block": ts.IndentStyle.Block,
"smart": ts.IndentStyle.Smart
});
+ var defaultTypeSafeList = {
+ "jquery": {
+ "match": /jquery(-(\.?\d+)+)?(\.intellisense)?(\.min)?\.js$/i,
+ "types": ["jquery"]
+ },
+ "WinJS": {
+ "match": /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["winjs"]
+ },
+ "Kendo": {
+ "match": /^(.*\/kendo)\/kendo\.all\.min\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["kendo-ui"]
+ },
+ "Office Nuget": {
+ "match": /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,
+ "exclude": [["^", 1, "/.*"]],
+ "types": ["office"]
+ },
+ "Minified files": {
+ "match": /^(.+\.min\.js)$/i,
+ "exclude": [["^", 1, "$"]]
+ }
+ };
function convertFormatOptions(protocolOptions) {
if (typeof protocolOptions.indentStyle === "string") {
- protocolOptions.indentStyle = indentStyle[protocolOptions.indentStyle.toLowerCase()];
+ protocolOptions.indentStyle = indentStyle.get(protocolOptions.indentStyle.toLowerCase());
ts.Debug.assert(protocolOptions.indentStyle !== undefined);
}
return protocolOptions;
}
server.convertFormatOptions = convertFormatOptions;
function convertCompilerOptions(protocolOptions) {
- for (var id in compilerOptionConverters) {
+ compilerOptionConverters.forEach(function (mappedValues, id) {
var propertyValue = protocolOptions[id];
if (typeof propertyValue === "string") {
- var mappedValues = compilerOptionConverters[id];
- protocolOptions[id] = mappedValues[propertyValue.toLowerCase()];
+ protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase());
}
- }
+ });
return protocolOptions;
}
server.convertCompilerOptions = convertCompilerOptions;
@@ -66178,7 +76635,10 @@ var ts;
var fileNamePropertyReader = {
getFileName: function (x) { return x; },
getScriptKind: function (_) { return undefined; },
- hasMixedContent: function (_) { return false; }
+ hasMixedContent: function (fileName, extraFileExtensions) {
+ var mixedContentExtensions = ts.map(ts.filter(extraFileExtensions, function (item) { return item.isMixedContent; }), function (item) { return item.extension; });
+ return ts.forEach(mixedContentExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
+ }
};
var externalFilePropertyReader = {
getFileName: function (x) { return x.fileName; },
@@ -66186,8 +76646,8 @@ var ts;
hasMixedContent: function (x) { return x.hasMixedContent; }
};
function findProjectByName(projectName, projects) {
- for (var _i = 0, projects_1 = projects; _i < projects_1.length; _i++) {
- var proj = projects_1[_i];
+ for (var _i = 0, projects_2 = projects; _i < projects_2.length; _i++) {
+ var proj = projects_2[_i];
if (proj.getProjectName() === projectName) {
return proj;
}
@@ -66209,24 +76669,25 @@ var ts;
this.directoryWatchersRefCount = ts.createMap();
}
DirectoryWatchers.prototype.stopWatchingDirectory = function (directory) {
- this.directoryWatchersRefCount[directory]--;
- if (this.directoryWatchersRefCount[directory] === 0) {
+ var refCount = this.directoryWatchersRefCount.get(directory) - 1;
+ this.directoryWatchersRefCount.set(directory, refCount);
+ if (refCount === 0) {
this.projectService.logger.info("Close directory watcher for: " + directory);
- this.directoryWatchersForTsconfig[directory].close();
- delete this.directoryWatchersForTsconfig[directory];
+ this.directoryWatchersForTsconfig.get(directory).close();
+ this.directoryWatchersForTsconfig.delete(directory);
}
};
DirectoryWatchers.prototype.startWatchingContainingDirectoriesForFile = function (fileName, project, callback) {
var currentPath = ts.getDirectoryPath(fileName);
var parentPath = ts.getDirectoryPath(currentPath);
- while (currentPath != parentPath) {
- if (!this.directoryWatchersForTsconfig[currentPath]) {
+ while (currentPath !== parentPath) {
+ if (!this.directoryWatchersForTsconfig.has(currentPath)) {
this.projectService.logger.info("Add watcher for: " + currentPath);
- this.directoryWatchersForTsconfig[currentPath] = this.projectService.host.watchDirectory(currentPath, callback);
- this.directoryWatchersRefCount[currentPath] = 1;
+ this.directoryWatchersForTsconfig.set(currentPath, this.projectService.host.watchDirectory(currentPath, callback));
+ this.directoryWatchersRefCount.set(currentPath, 1);
}
else {
- this.directoryWatchersRefCount[currentPath] += 1;
+ this.directoryWatchersRefCount.set(currentPath, this.directoryWatchersRefCount.get(currentPath) + 1);
}
project.directoriesWatchedForTsconfig.push(currentPath);
currentPath = parentPath;
@@ -66236,31 +76697,35 @@ var ts;
return DirectoryWatchers;
}());
var ProjectService = (function () {
- function ProjectService(host, logger, cancellationToken, useSingleInferredProject, typingsInstaller, eventHandler) {
- if (typingsInstaller === void 0) { typingsInstaller = server.nullTypingsInstaller; }
- this.host = host;
- this.logger = logger;
- this.cancellationToken = cancellationToken;
- this.useSingleInferredProject = useSingleInferredProject;
- this.typingsInstaller = typingsInstaller;
- this.eventHandler = eventHandler;
+ function ProjectService(opts) {
this.filenameToScriptInfo = ts.createFileMap();
this.externalProjectToConfiguredProjectMap = ts.createMap();
this.externalProjects = [];
this.inferredProjects = [];
this.configuredProjects = [];
this.openFiles = [];
- ts.Debug.assert(!!host.createHash, "'ServerHost.createHash' is required for ProjectService");
- this.toCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ this.projectToSizeMap = ts.createMap();
+ this.host = opts.host;
+ this.logger = opts.logger;
+ this.cancellationToken = opts.cancellationToken;
+ this.useSingleInferredProject = opts.useSingleInferredProject;
+ this.typingsInstaller = opts.typingsInstaller || server.nullTypingsInstaller;
+ this.throttleWaitMilliseconds = opts.throttleWaitMilliseconds;
+ this.eventHandler = opts.eventHandler;
+ this.globalPlugins = opts.globalPlugins || server.emptyArray;
+ this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
+ ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
+ this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);
- this.throttledOperations = new server.ThrottledOperations(host);
+ this.throttledOperations = new server.ThrottledOperations(this.host);
this.typingsInstaller.attach(this);
this.typingsCache = new server.TypingsCache(this.typingsInstaller);
this.hostConfiguration = {
formatCodeOptions: server.getDefaultFormatCodeSettings(this.host),
- hostInfo: "Unknown host"
+ hostInfo: "Unknown host",
+ extraFileExtensions: []
};
- this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames, host.getCurrentDirectory());
+ this.documentRegistry = ts.createDocumentRegistry(this.host.useCaseSensitiveFileNames, this.host.getCurrentDirectory());
}
ProjectService.prototype.getChangedFiles_TestOnly = function () {
return this.changedFiles;
@@ -66364,8 +76829,8 @@ var ts;
};
ProjectService.prototype.updateProjectGraphs = function (projects) {
var shouldRefreshInferredProjects = false;
- for (var _i = 0, projects_2 = projects; _i < projects_2.length; _i++) {
- var p = projects_2[_i];
+ for (var _i = 0, projects_3 = projects; _i < projects_3.length; _i++) {
+ var p = projects_3[_i];
if (!p.updateGraph()) {
shouldRefreshInferredProjects = true;
}
@@ -66384,7 +76849,7 @@ var ts;
this.handleDeletedFile(info);
}
else {
- if (info && (!info.isOpen)) {
+ if (info && (!info.isScriptOpen())) {
info.reloadFromFile();
this.updateProjectGraphs(info.containingProjects);
}
@@ -66393,7 +76858,7 @@ var ts;
ProjectService.prototype.handleDeletedFile = function (info) {
this.logger.info(info.fileName + " deleted");
info.stopWatcher();
- if (!info.isOpen) {
+ if (!info.isScriptOpen()) {
this.filenameToScriptInfo.remove(info.path);
this.lastDeletedFile = info;
var containingProjects = info.containingProjects.slice();
@@ -66424,7 +76889,7 @@ var ts;
};
ProjectService.prototype.onSourceFileInDirectoryChangedForConfiguredProject = function (project, fileName) {
var _this = this;
- if (fileName && !ts.isSupportedSourceFileName(fileName, project.getCompilerOptions())) {
+ if (fileName && !ts.isSupportedSourceFileName(fileName, project.getCompilerOptions(), this.hostConfiguration.extraFileExtensions)) {
return;
}
this.logger.info("Detected source file changes: " + fileName);
@@ -66450,7 +76915,7 @@ var ts;
this.refreshInferredProjects();
};
ProjectService.prototype.onConfigFileAddedForInferredProject = function (fileName) {
- if (ts.getBaseFileName(fileName) != "tsconfig.json") {
+ if (ts.getBaseFileName(fileName) !== "tsconfig.json") {
this.logger.info(fileName + " is not tsconfig.json");
return;
}
@@ -66469,9 +76934,11 @@ var ts;
switch (project.projectKind) {
case server.ProjectKind.External:
server.removeItemFromSet(this.externalProjects, project);
+ this.projectToSizeMap.delete(project.externalProjectName);
break;
case server.ProjectKind.Configured:
server.removeItemFromSet(this.configuredProjects, project);
+ this.projectToSizeMap.delete(project.canonicalConfigFilePath);
break;
case server.ProjectKind.Inferred:
server.removeItemFromSet(this.inferredProjects, project);
@@ -66507,13 +76974,17 @@ var ts;
if (!this.useSingleInferredProject) {
for (var _b = 0, _c = this.openFiles; _b < _c.length; _b++) {
var f = _c[_b];
- if (f.containingProjects.length === 0) {
+ if (f.containingProjects.length === 0 || !inferredProject.containsScriptInfo(f)) {
continue;
}
- var defaultProject = f.getDefaultProject();
- if (isRootFileInInferredProject(info) && defaultProject !== inferredProject && inferredProject.containsScriptInfo(f)) {
- this.removeProject(defaultProject);
- f.attachToProject(inferredProject);
+ for (var _d = 0, _e = f.containingProjects; _d < _e.length; _d++) {
+ var fContainingProject = _e[_d];
+ if (fContainingProject.projectKind === server.ProjectKind.Inferred &&
+ fContainingProject.isRoot(f) &&
+ fContainingProject !== inferredProject) {
+ this.removeProject(fContainingProject);
+ f.attachToProject(inferredProject);
+ }
}
}
}
@@ -66523,13 +76994,15 @@ var ts;
}
};
ProjectService.prototype.closeOpenFile = function (info) {
- info.reloadFromFile();
+ info.close();
server.removeItemFromSet(this.openFiles, info);
- info.isOpen = false;
var projectsToRemove;
for (var _i = 0, _a = info.containingProjects; _i < _a.length; _i++) {
var p = _a[_i];
if (p.projectKind === server.ProjectKind.Configured) {
+ if (info.hasMixedContent) {
+ info.registerFileUpdate();
+ }
if (p.deleteOpenRef() === 0) {
(projectsToRemove || (projectsToRemove = [])).push(p);
}
@@ -66537,6 +77010,9 @@ var ts;
else if (p.projectKind === server.ProjectKind.Inferred && p.isRoot(info)) {
(projectsToRemove || (projectsToRemove = [])).push(p);
}
+ if (!p.languageServiceEnabled) {
+ p.markAsDirty();
+ }
}
if (projectsToRemove) {
for (var _b = 0, projectsToRemove_1 = projectsToRemove; _b < projectsToRemove_1.length; _b++) {
@@ -66620,8 +77096,8 @@ var ts;
}
this.logger.endGroup();
function printProjects(logger, projects, counter) {
- for (var _i = 0, projects_3 = projects; _i < projects_3.length; _i++) {
- var project = projects_3[_i];
+ for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
+ var project = projects_4[_i];
project.updateGraph();
logger.info("Project '" + project.getProjectName() + "' (" + server.ProjectKind[project.projectKind] + ") " + counter);
logger.info(project.filesToString());
@@ -66654,7 +77130,7 @@ var ts;
config = sanitizedConfig;
errors = diagnostics.length ? diagnostics : [result.error];
}
- var parsedCommandLine = ts.parseJsonConfigFileContent(config, this.host, ts.getDirectoryPath(configFilename), {}, configFilename);
+ var parsedCommandLine = ts.parseJsonConfigFileContent(config, this.host, ts.getDirectoryPath(configFilename), {}, configFilename, [], this.hostConfiguration.extraFileExtensions);
if (parsedCommandLine.errors.length) {
errors = ts.concatenate(errors, parsedCommandLine.errors);
}
@@ -66667,16 +77143,19 @@ var ts;
files: parsedCommandLine.fileNames,
compilerOptions: parsedCommandLine.options,
configHasFilesProperty: config["files"] !== undefined,
- wildcardDirectories: ts.createMap(parsedCommandLine.wildcardDirectories),
+ wildcardDirectories: ts.createMapFromTemplate(parsedCommandLine.wildcardDirectories),
typeAcquisition: parsedCommandLine.typeAcquisition,
compileOnSave: parsedCommandLine.compileOnSave
};
return { success: true, projectOptions: projectOptions, configFileErrors: errors };
};
- ProjectService.prototype.exceededTotalSizeLimitForNonTsFiles = function (options, fileNames, propertyReader) {
+ ProjectService.prototype.exceededTotalSizeLimitForNonTsFiles = function (name, options, fileNames, propertyReader) {
if (options && options.disableSizeLimit || !this.host.getFileSize) {
return false;
}
+ var availableSpace = server.maxProgramSizeForNonTsFiles;
+ this.projectToSizeMap.set(name, 0);
+ this.projectToSizeMap.forEach(function (val) { return (availableSpace -= (val || 0)); });
var totalNonTsFileSize = 0;
for (var _i = 0, fileNames_3 = fileNames; _i < fileNames_3.length; _i++) {
var f = fileNames_3[_i];
@@ -66689,11 +77168,15 @@ var ts;
return true;
}
}
+ if (totalNonTsFileSize > availableSpace) {
+ return true;
+ }
+ this.projectToSizeMap.set(name, totalNonTsFileSize);
return false;
};
ProjectService.prototype.createAndAddExternalProject = function (projectFileName, files, options, typeAcquisition) {
var compilerOptions = convertCompilerOptions(options);
- var project = new server.ExternalProject(projectFileName, this, this.documentRegistry, compilerOptions, !this.exceededTotalSizeLimitForNonTsFiles(compilerOptions, files, externalFilePropertyReader), options.compileOnSave === undefined ? true : options.compileOnSave);
+ var project = new server.ExternalProject(projectFileName, this, this.documentRegistry, compilerOptions, !this.exceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), options.compileOnSave === undefined ? true : options.compileOnSave);
this.addFilesToProjectAndUpdateGraph(project, files, externalFilePropertyReader, undefined, typeAcquisition, undefined);
this.externalProjects.push(project);
return project;
@@ -66709,7 +77192,7 @@ var ts;
};
ProjectService.prototype.createAndAddConfiguredProject = function (configFileName, projectOptions, configFileErrors, clientFileName) {
var _this = this;
- var sizeLimitExceeded = this.exceededTotalSizeLimitForNonTsFiles(projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader);
+ var sizeLimitExceeded = this.exceededTotalSizeLimitForNonTsFiles(configFileName, projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader);
var project = new server.ConfiguredProject(configFileName, this, this.documentRegistry, projectOptions.configHasFilesProperty, projectOptions.compilerOptions, projectOptions.wildcardDirectories, !sizeLimitExceeded, projectOptions.compileOnSave === undefined ? false : projectOptions.compileOnSave);
this.addFilesToProjectAndUpdateGraph(project, projectOptions.files, fileNamePropertyReader, clientFileName, projectOptions.typeAcquisition, configFileErrors);
project.watchConfigFile(function (project) { return _this.onConfigChangedForConfiguredProject(project); });
@@ -66733,9 +77216,9 @@ var ts;
var f = files_4[_i];
var rootFilename = propertyReader.getFileName(f);
var scriptKind = propertyReader.getScriptKind(f);
- var hasMixedContent = propertyReader.hasMixedContent(f);
+ var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);
if (this.host.fileExists(rootFilename)) {
- var info = this.getOrCreateScriptInfoForNormalizedPath(server.toNormalizedPath(rootFilename), clientFileName == rootFilename, undefined, scriptKind, hasMixedContent);
+ var info = this.getOrCreateScriptInfoForNormalizedPath(server.toNormalizedPath(rootFilename), clientFileName === rootFilename, undefined, scriptKind, hasMixedContent);
project.addRoot(info);
}
else {
@@ -66750,7 +77233,7 @@ var ts;
var conversionResult = this.convertConfigFileContentToProjectOptions(configFileName);
var projectOptions = conversionResult.success
? conversionResult.projectOptions
- : { files: [], compilerOptions: {} };
+ : { files: [], compilerOptions: {}, typeAcquisition: { enable: false } };
var project = this.createAndAddConfiguredProject(configFileName, projectOptions, conversionResult.configFileErrors, clientFileName);
return {
success: conversionResult.success,
@@ -66777,7 +77260,7 @@ var ts;
rootFilesChanged = true;
if (!scriptInfo) {
var scriptKind = propertyReader.getScriptKind(f);
- var hasMixedContent = propertyReader.hasMixedContent(f);
+ var hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);
scriptInfo = this.getOrCreateScriptInfoForNormalizedPath(normalizedPath, false, undefined, scriptKind, hasMixedContent);
}
}
@@ -66808,7 +77291,7 @@ var ts;
if (toAdd) {
for (var _d = 0, toAdd_1 = toAdd; _d < toAdd_1.length; _d++) {
var f = toAdd_1[_d];
- if (f.isOpen && isRootFileInInferredProject(f)) {
+ if (f.isScriptOpen() && isRootFileInInferredProject(f)) {
var inferredProject = f.containingProjects[0];
inferredProject.removeFile(f);
if (!inferredProject.hasRoots()) {
@@ -66838,7 +77321,7 @@ var ts;
this.updateNonInferredProject(project, [], fileNamePropertyReader, {}, {}, false, configFileErrors);
return configFileErrors;
}
- if (this.exceededTotalSizeLimitForNonTsFiles(projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader)) {
+ if (this.exceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader)) {
project.setCompilerOptions(projectOptions.compilerOptions);
if (!project.languageServiceEnabled) {
return configFileErrors;
@@ -66847,9 +77330,7 @@ var ts;
project.stopWatchingDirectory();
}
else {
- if (!project.languageServiceEnabled) {
- project.enableLanguageService();
- }
+ project.enableLanguageService();
this.watchConfigDirectoryForProject(project, projectOptions);
this.updateNonInferredProject(project, projectOptions.files, fileNamePropertyReader, projectOptions.compilerOptions, projectOptions.typeAcquisition, projectOptions.compileOnSave, configFileErrors);
}
@@ -66879,29 +77360,30 @@ var ts;
var _this = this;
var info = this.getScriptInfoForNormalizedPath(fileName);
if (!info) {
- var content = void 0;
- if (this.host.fileExists(fileName)) {
- content = fileContent || (hasMixedContent ? "" : this.host.readFile(fileName));
- }
- if (!content) {
+ if (openedByClient || this.host.fileExists(fileName)) {
+ info = new server.ScriptInfo(this.host, fileName, scriptKind, hasMixedContent);
+ this.filenameToScriptInfo.set(info.path, info);
if (openedByClient) {
- content = "";
+ if (fileContent === undefined) {
+ fileContent = this.host.readFile(fileName) || "";
+ }
}
- }
- if (content !== undefined) {
- info = new server.ScriptInfo(this.host, fileName, content, scriptKind, openedByClient, hasMixedContent);
- this.filenameToScriptInfo.set(info.path, info);
- if (!info.isOpen && !hasMixedContent) {
- info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
+ else {
+ if (!hasMixedContent) {
+ info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
+ }
}
}
}
if (info) {
- if (fileContent !== undefined) {
- info.reload(fileContent);
+ if (openedByClient && !info.isScriptOpen()) {
+ info.open(fileContent);
+ if (hasMixedContent) {
+ info.registerFileUpdate();
+ }
}
- if (openedByClient) {
- info.isOpen = true;
+ else if (fileContent !== undefined) {
+ info.reload(fileContent);
}
}
return info;
@@ -66926,9 +77408,13 @@ var ts;
this.logger.info("Host information " + args.hostInfo);
}
if (args.formatOptions) {
- server.mergeMaps(this.hostConfiguration.formatCodeOptions, convertFormatOptions(args.formatOptions));
+ server.mergeMapLikes(this.hostConfiguration.formatCodeOptions, convertFormatOptions(args.formatOptions));
this.logger.info("Format host information updated");
}
+ if (args.extraFileExtensions) {
+ this.hostConfiguration.extraFileExtensions = args.extraFileExtensions;
+ this.logger.info("Host file extension mappings updated");
+ }
}
};
ProjectService.prototype.closeLog = function () {
@@ -66976,30 +77462,39 @@ var ts;
return this.openClientFileWithNormalizedPath(server.toNormalizedPath(fileName), fileContent, scriptKind);
};
ProjectService.prototype.openClientFileWithNormalizedPath = function (fileName, fileContent, scriptKind, hasMixedContent) {
- var _a = this.findContainingExternalProject(fileName)
- ? {}
- : this.openOrUpdateConfiguredProjectForFile(fileName), _b = _a.configFileName, configFileName = _b === void 0 ? undefined : _b, _c = _a.configFileErrors, configFileErrors = _c === void 0 ? undefined : _c;
+ var configFileName;
+ var configFileErrors;
+ var project = this.findContainingExternalProject(fileName);
+ if (!project) {
+ (_a = this.openOrUpdateConfiguredProjectForFile(fileName), configFileName = _a.configFileName, configFileErrors = _a.configFileErrors);
+ if (configFileName) {
+ project = this.findConfiguredProjectByProjectName(configFileName);
+ }
+ }
+ if (project && !project.languageServiceEnabled) {
+ project.markAsDirty();
+ }
var info = this.getOrCreateScriptInfoForNormalizedPath(fileName, true, fileContent, scriptKind, hasMixedContent);
this.assignScriptInfoToInferredProjectIfNecessary(info, true);
this.printProjects();
return { configFileName: configFileName, configFileErrors: configFileErrors };
+ var _a;
};
ProjectService.prototype.closeClientFile = function (uncheckedFileName) {
var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName));
if (info) {
this.closeOpenFile(info);
- info.isOpen = false;
}
this.printProjects();
};
ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) {
- var _loop_5 = function (proj) {
+ var _loop_7 = function (proj) {
var knownProject = ts.forEach(lastKnownProjectVersions, function (p) { return p.projectName === proj.getProjectName() && p; });
result.push(proj.getChangesSinceVersion(knownProject && knownProject.version));
};
for (var _i = 0, currentProjects_1 = currentProjects; _i < currentProjects_1.length; _i++) {
var proj = currentProjects_1[_i];
- _loop_5(proj);
+ _loop_7(proj);
}
};
ProjectService.prototype.synchronizeProjectList = function (knownProjects) {
@@ -67015,7 +77510,7 @@ var ts;
for (var _i = 0, openFiles_1 = openFiles; _i < openFiles_1.length; _i++) {
var file = openFiles_1[_i];
var scriptInfo = this.getScriptInfo(file.fileName);
- ts.Debug.assert(!scriptInfo || !scriptInfo.isOpen);
+ ts.Debug.assert(!scriptInfo || !scriptInfo.isScriptOpen());
var normalizedPath = scriptInfo ? scriptInfo.fileName : server.toNormalizedPath(file.fileName);
this.openClientFileWithNormalizedPath(normalizedPath, file.content, tryConvertScriptKindName(file.scriptKind), file.hasMixedContent);
}
@@ -67058,7 +77553,7 @@ var ts;
ProjectService.prototype.closeExternalProject = function (uncheckedFileName, suppressRefresh) {
if (suppressRefresh === void 0) { suppressRefresh = false; }
var fileName = server.toNormalizedPath(uncheckedFileName);
- var configFiles = this.externalProjectToConfiguredProjectMap[fileName];
+ var configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
if (configFiles) {
var shouldRefreshInferredProjects = false;
for (var _i = 0, configFiles_1 = configFiles; _i < configFiles_1.length; _i++) {
@@ -67067,7 +77562,7 @@ var ts;
shouldRefreshInferredProjects = true;
}
}
- delete this.externalProjectToConfiguredProjectMap[fileName];
+ this.externalProjectToConfiguredProjectMap.delete(fileName);
if (shouldRefreshInferredProjects && !suppressRefresh) {
this.refreshInferredProjects();
}
@@ -67082,11 +77577,111 @@ var ts;
}
}
};
- ProjectService.prototype.openExternalProject = function (proj) {
+ ProjectService.prototype.openExternalProjects = function (projects) {
+ var _this = this;
+ var projectsToClose = ts.arrayToMap(this.externalProjects, function (p) { return p.getProjectName(); }, function (_) { return true; });
+ ts.forEachKey(this.externalProjectToConfiguredProjectMap, function (externalProjectName) {
+ projectsToClose.set(externalProjectName, true);
+ });
+ for (var _i = 0, projects_5 = projects; _i < projects_5.length; _i++) {
+ var externalProject = projects_5[_i];
+ this.openExternalProject(externalProject, true);
+ projectsToClose.delete(externalProject.projectFileName);
+ }
+ ts.forEachKey(projectsToClose, function (externalProjectName) {
+ _this.closeExternalProject(externalProjectName, true);
+ });
+ this.refreshInferredProjects();
+ };
+ ProjectService.escapeFilenameForRegex = function (filename) {
+ return filename.replace(this.filenameEscapeRegexp, "\\$&");
+ };
+ ProjectService.prototype.resetSafeList = function () {
+ ProjectService.safelist = defaultTypeSafeList;
+ };
+ ProjectService.prototype.loadSafeList = function (fileName) {
+ var raw = JSON.parse(this.host.readFile(fileName, "utf-8"));
+ for (var _i = 0, _a = Object.keys(raw); _i < _a.length; _i++) {
+ var k = _a[_i];
+ raw[k].match = new RegExp(raw[k].match, "i");
+ }
+ ProjectService.safelist = raw;
+ };
+ ProjectService.prototype.applySafeList = function (proj) {
+ var _this = this;
+ var rootFiles = proj.rootFiles, typeAcquisition = proj.typeAcquisition;
+ var types = (typeAcquisition && typeAcquisition.include) || [];
+ var excludeRules = [];
+ var normalizedNames = rootFiles.map(function (f) { return ts.normalizeSlashes(f.fileName); });
+ var _loop_8 = function (name) {
+ var rule = ProjectService.safelist[name];
+ for (var _i = 0, normalizedNames_1 = normalizedNames; _i < normalizedNames_1.length; _i++) {
+ var root = normalizedNames_1[_i];
+ if (rule.match.test(root)) {
+ this_2.logger.info("Excluding files based on rule " + name);
+ if (rule.types) {
+ for (var _a = 0, _b = rule.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ if (types.indexOf(type) < 0) {
+ types.push(type);
+ }
+ }
+ }
+ if (rule.exclude) {
+ var _loop_9 = function (exclude) {
+ var processedRule = root.replace(rule.match, function () {
+ var groups = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ groups[_i] = arguments[_i];
+ }
+ return exclude.map(function (groupNumberOrString) {
+ if (typeof groupNumberOrString === "number") {
+ if (typeof groups[groupNumberOrString] !== "string") {
+ _this.logger.info("Incorrect RegExp specification in safelist rule " + name + " - not enough groups");
+ return "\\*";
+ }
+ return ProjectService.escapeFilenameForRegex(groups[groupNumberOrString]);
+ }
+ return groupNumberOrString;
+ }).join("");
+ });
+ if (excludeRules.indexOf(processedRule) === -1) {
+ excludeRules.push(processedRule);
+ }
+ };
+ for (var _c = 0, _d = rule.exclude; _c < _d.length; _c++) {
+ var exclude = _d[_c];
+ _loop_9(exclude);
+ }
+ }
+ else {
+ var escaped = ProjectService.escapeFilenameForRegex(root);
+ if (excludeRules.indexOf(escaped) < 0) {
+ excludeRules.push(escaped);
+ }
+ }
+ }
+ }
+ if (types.length > 0) {
+ proj.typeAcquisition = proj.typeAcquisition || {};
+ proj.typeAcquisition.include = types;
+ }
+ };
+ var this_2 = this;
+ for (var _i = 0, _a = Object.keys(ProjectService.safelist); _i < _a.length; _i++) {
+ var name = _a[_i];
+ _loop_8(name);
+ }
+ var excludeRegexes = excludeRules.map(function (e) { return new RegExp(e, "i"); });
+ proj.rootFiles = proj.rootFiles.filter(function (_file, index) { return !excludeRegexes.some(function (re) { return re.test(normalizedNames[index]); }); });
+ };
+ ProjectService.prototype.openExternalProject = function (proj, suppressRefreshOfInferredProjects) {
+ if (suppressRefreshOfInferredProjects === void 0) { suppressRefreshOfInferredProjects = false; }
if (proj.typingOptions && !proj.typeAcquisition) {
var typeAcquisition = ts.convertEnableAutoDiscoveryToEnable(proj.typingOptions);
proj.typeAcquisition = typeAcquisition;
}
+ this.applySafeList(proj);
var tsConfigFiles;
var rootFiles = [];
for (var _i = 0, _a = proj.rootFiles; _i < _a.length; _i++) {
@@ -67108,17 +77703,24 @@ var ts;
var exisingConfigFiles;
if (externalProject) {
if (!tsConfigFiles) {
- this.updateNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, convertCompilerOptions(proj.options), proj.typeAcquisition, proj.options.compileOnSave, undefined);
+ var compilerOptions = convertCompilerOptions(proj.options);
+ if (this.exceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, proj.rootFiles, externalFilePropertyReader)) {
+ externalProject.disableLanguageService();
+ }
+ else {
+ externalProject.enableLanguageService();
+ }
+ this.updateNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, undefined);
return;
}
this.closeExternalProject(proj.projectFileName, true);
}
- else if (this.externalProjectToConfiguredProjectMap[proj.projectFileName]) {
+ else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
if (!tsConfigFiles) {
this.closeExternalProject(proj.projectFileName, true);
}
else {
- var oldConfigFiles = this.externalProjectToConfiguredProjectMap[proj.projectFileName];
+ var oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
var iNew = 0;
var iOld = 0;
while (iNew < tsConfigFiles.length && iOld < oldConfigFiles.length) {
@@ -67143,7 +77745,7 @@ var ts;
}
}
if (tsConfigFiles) {
- this.externalProjectToConfiguredProjectMap[proj.projectFileName] = tsConfigFiles;
+ this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, tsConfigFiles);
for (var _b = 0, tsConfigFiles_1 = tsConfigFiles; _b < tsConfigFiles_1.length; _b++) {
var tsconfigFile = tsConfigFiles_1[_b];
var project = this.findConfiguredProjectByProjectName(tsconfigFile);
@@ -67157,2331 +77759,20 @@ var ts;
}
}
else {
- delete this.externalProjectToConfiguredProjectMap[proj.projectFileName];
+ this.externalProjectToConfiguredProjectMap.delete(proj.projectFileName);
this.createAndAddExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition);
}
- this.refreshInferredProjects();
+ if (!suppressRefreshOfInferredProjects) {
+ this.refreshInferredProjects();
+ }
};
return ProjectService;
}());
+ ProjectService.safelist = defaultTypeSafeList;
+ ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
server.ProjectService = ProjectService;
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- function hrTimeToMilliseconds(time) {
- var seconds = time[0];
- var nanoseconds = time[1];
- return ((1e9 * seconds) + nanoseconds) / 1000000.0;
- }
- function shouldSkipSematicCheck(project) {
- if (project.getCompilerOptions().skipLibCheck !== undefined) {
- return false;
- }
- if ((project.projectKind === server.ProjectKind.Inferred || project.projectKind === server.ProjectKind.External) && project.isJsOnlyProject()) {
- return true;
- }
- return false;
- }
- function compareNumber(a, b) {
- return a - b;
- }
- function compareFileStart(a, b) {
- if (a.file < b.file) {
- return -1;
- }
- else if (a.file == b.file) {
- var n = compareNumber(a.start.line, b.start.line);
- if (n === 0) {
- return compareNumber(a.start.offset, b.start.offset);
- }
- else
- return n;
- }
- else {
- return 1;
- }
- }
- function formatDiag(fileName, project, diag) {
- var scriptInfo = project.getScriptInfoForNormalizedPath(fileName);
- return {
- start: scriptInfo.positionToLineOffset(diag.start),
- end: scriptInfo.positionToLineOffset(diag.start + diag.length),
- text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
- code: diag.code
- };
- }
- function formatConfigFileDiag(diag) {
- return {
- start: undefined,
- end: undefined,
- text: ts.flattenDiagnosticMessageText(diag.messageText, "\n")
- };
- }
- function allEditsBeforePos(edits, pos) {
- for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) {
- var edit = edits_1[_i];
- if (ts.textSpanEnd(edit.span) >= pos) {
- return false;
- }
- }
- return true;
- }
- var CommandNames;
- (function (CommandNames) {
- CommandNames.Brace = "brace";
- CommandNames.BraceFull = "brace-full";
- CommandNames.BraceCompletion = "braceCompletion";
- CommandNames.Change = "change";
- CommandNames.Close = "close";
- CommandNames.Completions = "completions";
- CommandNames.CompletionsFull = "completions-full";
- CommandNames.CompletionDetails = "completionEntryDetails";
- CommandNames.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
- CommandNames.CompileOnSaveEmitFile = "compileOnSaveEmitFile";
- CommandNames.Configure = "configure";
- CommandNames.Definition = "definition";
- CommandNames.DefinitionFull = "definition-full";
- CommandNames.Exit = "exit";
- CommandNames.Format = "format";
- CommandNames.Formatonkey = "formatonkey";
- CommandNames.FormatFull = "format-full";
- CommandNames.FormatonkeyFull = "formatonkey-full";
- CommandNames.FormatRangeFull = "formatRange-full";
- CommandNames.Geterr = "geterr";
- CommandNames.GeterrForProject = "geterrForProject";
- CommandNames.Implementation = "implementation";
- CommandNames.ImplementationFull = "implementation-full";
- CommandNames.SemanticDiagnosticsSync = "semanticDiagnosticsSync";
- CommandNames.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
- CommandNames.NavBar = "navbar";
- CommandNames.NavBarFull = "navbar-full";
- CommandNames.NavTree = "navtree";
- CommandNames.NavTreeFull = "navtree-full";
- CommandNames.Navto = "navto";
- CommandNames.NavtoFull = "navto-full";
- CommandNames.Occurrences = "occurrences";
- CommandNames.DocumentHighlights = "documentHighlights";
- CommandNames.DocumentHighlightsFull = "documentHighlights-full";
- CommandNames.Open = "open";
- CommandNames.Quickinfo = "quickinfo";
- CommandNames.QuickinfoFull = "quickinfo-full";
- CommandNames.References = "references";
- CommandNames.ReferencesFull = "references-full";
- CommandNames.Reload = "reload";
- CommandNames.Rename = "rename";
- CommandNames.RenameInfoFull = "rename-full";
- CommandNames.RenameLocationsFull = "renameLocations-full";
- CommandNames.Saveto = "saveto";
- CommandNames.SignatureHelp = "signatureHelp";
- CommandNames.SignatureHelpFull = "signatureHelp-full";
- CommandNames.TypeDefinition = "typeDefinition";
- CommandNames.ProjectInfo = "projectInfo";
- CommandNames.ReloadProjects = "reloadProjects";
- CommandNames.Unknown = "unknown";
- CommandNames.OpenExternalProject = "openExternalProject";
- CommandNames.OpenExternalProjects = "openExternalProjects";
- CommandNames.CloseExternalProject = "closeExternalProject";
- CommandNames.SynchronizeProjectList = "synchronizeProjectList";
- CommandNames.ApplyChangedToOpenFiles = "applyChangedToOpenFiles";
- CommandNames.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full";
- CommandNames.Cleanup = "cleanup";
- CommandNames.OutliningSpans = "outliningSpans";
- CommandNames.TodoComments = "todoComments";
- CommandNames.Indentation = "indentation";
- CommandNames.DocCommentTemplate = "docCommentTemplate";
- CommandNames.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full";
- CommandNames.NameOrDottedNameSpan = "nameOrDottedNameSpan";
- CommandNames.BreakpointStatement = "breakpointStatement";
- CommandNames.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
- CommandNames.GetCodeFixes = "getCodeFixes";
- CommandNames.GetCodeFixesFull = "getCodeFixes-full";
- CommandNames.GetSupportedCodeFixes = "getSupportedCodeFixes";
- })(CommandNames = server.CommandNames || (server.CommandNames = {}));
- function formatMessage(msg, logger, byteLength, newLine) {
- var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
- var json = JSON.stringify(msg);
- if (verboseLogging) {
- logger.info(msg.type + ": " + json);
- }
- var len = byteLength(json, "utf8");
- return "Content-Length: " + (1 + len) + "\r\n\r\n" + json + newLine;
- }
- server.formatMessage = formatMessage;
- var Session = (function () {
- function Session(host, cancellationToken, useSingleInferredProject, typingsInstaller, byteLength, hrtime, logger, canUseEvents, eventHandler) {
- var _this = this;
- this.host = host;
- this.typingsInstaller = typingsInstaller;
- this.byteLength = byteLength;
- this.hrtime = hrtime;
- this.logger = logger;
- this.canUseEvents = canUseEvents;
- this.changeSeq = 0;
- this.handlers = ts.createMap((_a = {},
- _a[CommandNames.OpenExternalProject] = function (request) {
- _this.projectService.openExternalProject(request.arguments);
- return _this.requiredResponse(true);
- },
- _a[CommandNames.OpenExternalProjects] = function (request) {
- for (var _i = 0, _a = request.arguments.projects; _i < _a.length; _i++) {
- var proj = _a[_i];
- _this.projectService.openExternalProject(proj);
- }
- return _this.requiredResponse(true);
- },
- _a[CommandNames.CloseExternalProject] = function (request) {
- _this.projectService.closeExternalProject(request.arguments.projectFileName);
- return _this.requiredResponse(true);
- },
- _a[CommandNames.SynchronizeProjectList] = function (request) {
- var result = _this.projectService.synchronizeProjectList(request.arguments.knownProjects);
- if (!result.some(function (p) { return p.projectErrors && p.projectErrors.length !== 0; })) {
- return _this.requiredResponse(result);
- }
- var converted = ts.map(result, function (p) {
- if (!p.projectErrors || p.projectErrors.length === 0) {
- return p;
- }
- return {
- info: p.info,
- changes: p.changes,
- files: p.files,
- projectErrors: _this.convertToDiagnosticsWithLinePosition(p.projectErrors, undefined)
- };
- });
- return _this.requiredResponse(converted);
- },
- _a[CommandNames.ApplyChangedToOpenFiles] = function (request) {
- _this.projectService.applyChangesInOpenFiles(request.arguments.openFiles, request.arguments.changedFiles, request.arguments.closedFiles);
- _this.changeSeq++;
- return _this.requiredResponse(true);
- },
- _a[CommandNames.Exit] = function () {
- _this.exit();
- return _this.notRequired();
- },
- _a[CommandNames.Definition] = function (request) {
- return _this.requiredResponse(_this.getDefinition(request.arguments, true));
- },
- _a[CommandNames.DefinitionFull] = function (request) {
- return _this.requiredResponse(_this.getDefinition(request.arguments, false));
- },
- _a[CommandNames.TypeDefinition] = function (request) {
- return _this.requiredResponse(_this.getTypeDefinition(request.arguments));
- },
- _a[CommandNames.Implementation] = function (request) {
- return _this.requiredResponse(_this.getImplementation(request.arguments, true));
- },
- _a[CommandNames.ImplementationFull] = function (request) {
- return _this.requiredResponse(_this.getImplementation(request.arguments, false));
- },
- _a[CommandNames.References] = function (request) {
- return _this.requiredResponse(_this.getReferences(request.arguments, true));
- },
- _a[CommandNames.ReferencesFull] = function (request) {
- return _this.requiredResponse(_this.getReferences(request.arguments, false));
- },
- _a[CommandNames.Rename] = function (request) {
- return _this.requiredResponse(_this.getRenameLocations(request.arguments, true));
- },
- _a[CommandNames.RenameLocationsFull] = function (request) {
- return _this.requiredResponse(_this.getRenameLocations(request.arguments, false));
- },
- _a[CommandNames.RenameInfoFull] = function (request) {
- return _this.requiredResponse(_this.getRenameInfo(request.arguments));
- },
- _a[CommandNames.Open] = function (request) {
- _this.openClientFile(server.toNormalizedPath(request.arguments.file), request.arguments.fileContent, server.convertScriptKindName(request.arguments.scriptKindName));
- return _this.notRequired();
- },
- _a[CommandNames.Quickinfo] = function (request) {
- return _this.requiredResponse(_this.getQuickInfoWorker(request.arguments, true));
- },
- _a[CommandNames.QuickinfoFull] = function (request) {
- return _this.requiredResponse(_this.getQuickInfoWorker(request.arguments, false));
- },
- _a[CommandNames.OutliningSpans] = function (request) {
- return _this.requiredResponse(_this.getOutliningSpans(request.arguments));
- },
- _a[CommandNames.TodoComments] = function (request) {
- return _this.requiredResponse(_this.getTodoComments(request.arguments));
- },
- _a[CommandNames.Indentation] = function (request) {
- return _this.requiredResponse(_this.getIndentation(request.arguments));
- },
- _a[CommandNames.NameOrDottedNameSpan] = function (request) {
- return _this.requiredResponse(_this.getNameOrDottedNameSpan(request.arguments));
- },
- _a[CommandNames.BreakpointStatement] = function (request) {
- return _this.requiredResponse(_this.getBreakpointStatement(request.arguments));
- },
- _a[CommandNames.BraceCompletion] = function (request) {
- return _this.requiredResponse(_this.isValidBraceCompletion(request.arguments));
- },
- _a[CommandNames.DocCommentTemplate] = function (request) {
- return _this.requiredResponse(_this.getDocCommentTemplate(request.arguments));
- },
- _a[CommandNames.Format] = function (request) {
- return _this.requiredResponse(_this.getFormattingEditsForRange(request.arguments));
- },
- _a[CommandNames.Formatonkey] = function (request) {
- return _this.requiredResponse(_this.getFormattingEditsAfterKeystroke(request.arguments));
- },
- _a[CommandNames.FormatFull] = function (request) {
- return _this.requiredResponse(_this.getFormattingEditsForDocumentFull(request.arguments));
- },
- _a[CommandNames.FormatonkeyFull] = function (request) {
- return _this.requiredResponse(_this.getFormattingEditsAfterKeystrokeFull(request.arguments));
- },
- _a[CommandNames.FormatRangeFull] = function (request) {
- return _this.requiredResponse(_this.getFormattingEditsForRangeFull(request.arguments));
- },
- _a[CommandNames.Completions] = function (request) {
- return _this.requiredResponse(_this.getCompletions(request.arguments, true));
- },
- _a[CommandNames.CompletionsFull] = function (request) {
- return _this.requiredResponse(_this.getCompletions(request.arguments, false));
- },
- _a[CommandNames.CompletionDetails] = function (request) {
- return _this.requiredResponse(_this.getCompletionEntryDetails(request.arguments));
- },
- _a[CommandNames.CompileOnSaveAffectedFileList] = function (request) {
- return _this.requiredResponse(_this.getCompileOnSaveAffectedFileList(request.arguments));
- },
- _a[CommandNames.CompileOnSaveEmitFile] = function (request) {
- return _this.requiredResponse(_this.emitFile(request.arguments));
- },
- _a[CommandNames.SignatureHelp] = function (request) {
- return _this.requiredResponse(_this.getSignatureHelpItems(request.arguments, true));
- },
- _a[CommandNames.SignatureHelpFull] = function (request) {
- return _this.requiredResponse(_this.getSignatureHelpItems(request.arguments, false));
- },
- _a[CommandNames.CompilerOptionsDiagnosticsFull] = function (request) {
- return _this.requiredResponse(_this.getCompilerOptionsDiagnostics(request.arguments));
- },
- _a[CommandNames.EncodedSemanticClassificationsFull] = function (request) {
- return _this.requiredResponse(_this.getEncodedSemanticClassifications(request.arguments));
- },
- _a[CommandNames.Cleanup] = function () {
- _this.cleanup();
- return _this.requiredResponse(true);
- },
- _a[CommandNames.SemanticDiagnosticsSync] = function (request) {
- return _this.requiredResponse(_this.getSemanticDiagnosticsSync(request.arguments));
- },
- _a[CommandNames.SyntacticDiagnosticsSync] = function (request) {
- return _this.requiredResponse(_this.getSyntacticDiagnosticsSync(request.arguments));
- },
- _a[CommandNames.Geterr] = function (request) {
- var geterrArgs = request.arguments;
- return { response: _this.getDiagnostics(geterrArgs.delay, geterrArgs.files), responseRequired: false };
- },
- _a[CommandNames.GeterrForProject] = function (request) {
- var _a = request.arguments, file = _a.file, delay = _a.delay;
- return { response: _this.getDiagnosticsForProject(delay, file), responseRequired: false };
- },
- _a[CommandNames.Change] = function (request) {
- _this.change(request.arguments);
- return _this.notRequired();
- },
- _a[CommandNames.Configure] = function (request) {
- _this.projectService.setHostConfiguration(request.arguments);
- _this.output(undefined, CommandNames.Configure, request.seq);
- return _this.notRequired();
- },
- _a[CommandNames.Reload] = function (request) {
- _this.reload(request.arguments, request.seq);
- return _this.requiredResponse({ reloadFinished: true });
- },
- _a[CommandNames.Saveto] = function (request) {
- var savetoArgs = request.arguments;
- _this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile);
- return _this.notRequired();
- },
- _a[CommandNames.Close] = function (request) {
- var closeArgs = request.arguments;
- _this.closeClientFile(closeArgs.file);
- return _this.notRequired();
- },
- _a[CommandNames.Navto] = function (request) {
- return _this.requiredResponse(_this.getNavigateToItems(request.arguments, true));
- },
- _a[CommandNames.NavtoFull] = function (request) {
- return _this.requiredResponse(_this.getNavigateToItems(request.arguments, false));
- },
- _a[CommandNames.Brace] = function (request) {
- return _this.requiredResponse(_this.getBraceMatching(request.arguments, true));
- },
- _a[CommandNames.BraceFull] = function (request) {
- return _this.requiredResponse(_this.getBraceMatching(request.arguments, false));
- },
- _a[CommandNames.NavBar] = function (request) {
- return _this.requiredResponse(_this.getNavigationBarItems(request.arguments, true));
- },
- _a[CommandNames.NavBarFull] = function (request) {
- return _this.requiredResponse(_this.getNavigationBarItems(request.arguments, false));
- },
- _a[CommandNames.NavTree] = function (request) {
- return _this.requiredResponse(_this.getNavigationTree(request.arguments, true));
- },
- _a[CommandNames.NavTreeFull] = function (request) {
- return _this.requiredResponse(_this.getNavigationTree(request.arguments, false));
- },
- _a[CommandNames.Occurrences] = function (request) {
- return _this.requiredResponse(_this.getOccurrences(request.arguments));
- },
- _a[CommandNames.DocumentHighlights] = function (request) {
- return _this.requiredResponse(_this.getDocumentHighlights(request.arguments, true));
- },
- _a[CommandNames.DocumentHighlightsFull] = function (request) {
- return _this.requiredResponse(_this.getDocumentHighlights(request.arguments, false));
- },
- _a[CommandNames.CompilerOptionsForInferredProjects] = function (request) {
- _this.setCompilerOptionsForInferredProjects(request.arguments);
- return _this.requiredResponse(true);
- },
- _a[CommandNames.ProjectInfo] = function (request) {
- return _this.requiredResponse(_this.getProjectInfo(request.arguments));
- },
- _a[CommandNames.ReloadProjects] = function () {
- _this.projectService.reloadProjects();
- return _this.notRequired();
- },
- _a[CommandNames.GetCodeFixes] = function (request) {
- return _this.requiredResponse(_this.getCodeFixes(request.arguments, true));
- },
- _a[CommandNames.GetCodeFixesFull] = function (request) {
- return _this.requiredResponse(_this.getCodeFixes(request.arguments, false));
- },
- _a[CommandNames.GetSupportedCodeFixes] = function () {
- return _this.requiredResponse(_this.getSupportedCodeFixes());
- },
- _a));
- this.eventHander = canUseEvents
- ? eventHandler || (function (event) { return _this.defaultEventHandler(event); })
- : undefined;
- this.projectService = new server.ProjectService(host, logger, cancellationToken, useSingleInferredProject, typingsInstaller, this.eventHander);
- this.gcTimer = new server.GcTimer(host, 7000, logger);
- var _a;
- }
- Session.prototype.defaultEventHandler = function (event) {
- var _this = this;
- switch (event.eventName) {
- case server.ContextEvent:
- var _a = event.data, project = _a.project, fileName = _a.fileName;
- this.projectService.logger.info("got context event, updating diagnostics for " + fileName);
- this.updateErrorCheck([{ fileName: fileName, project: project }], this.changeSeq, function (n) { return n === _this.changeSeq; }, 100);
- break;
- case server.ConfigFileDiagEvent:
- var _b = event.data, triggerFile = _b.triggerFile, configFileName = _b.configFileName, diagnostics = _b.diagnostics;
- this.configFileDiagnosticEvent(triggerFile, configFileName, diagnostics);
- break;
- case server.ProjectLanguageServiceStateEvent:
- var eventName = "projectLanguageServiceState";
- this.event({
- projectName: event.data.project.getProjectName(),
- languageServiceEnabled: event.data.languageServiceEnabled
- }, eventName);
- break;
- }
- };
- Session.prototype.logError = function (err, cmd) {
- var msg = "Exception on executing command " + cmd;
- if (err.message) {
- msg += ":\n" + err.message;
- if (err.stack) {
- msg += "\n" + err.stack;
- }
- }
- this.logger.msg(msg, server.Msg.Err);
- };
- Session.prototype.send = function (msg) {
- if (msg.type === "event" && !this.canUseEvents) {
- if (this.logger.hasLevel(server.LogLevel.verbose)) {
- this.logger.info("Session does not support events: ignored event: " + JSON.stringify(msg));
- }
- return;
- }
- this.host.write(formatMessage(msg, this.logger, this.byteLength, this.host.newLine));
- };
- Session.prototype.configFileDiagnosticEvent = function (triggerFile, configFile, diagnostics) {
- var bakedDiags = ts.map(diagnostics, formatConfigFileDiag);
- var ev = {
- seq: 0,
- type: "event",
- event: "configFileDiag",
- body: {
- triggerFile: triggerFile,
- configFile: configFile,
- diagnostics: bakedDiags
- }
- };
- this.send(ev);
- };
- Session.prototype.event = function (info, eventName) {
- var ev = {
- seq: 0,
- type: "event",
- event: eventName,
- body: info,
- };
- this.send(ev);
- };
- Session.prototype.output = function (info, cmdName, reqSeq, errorMsg) {
- if (reqSeq === void 0) { reqSeq = 0; }
- var res = {
- seq: 0,
- type: "response",
- command: cmdName,
- request_seq: reqSeq,
- success: !errorMsg,
- };
- if (!errorMsg) {
- res.body = info;
- }
- else {
- res.message = errorMsg;
- }
- this.send(res);
- };
- Session.prototype.semanticCheck = function (file, project) {
- try {
- var diags = [];
- if (!shouldSkipSematicCheck(project)) {
- diags = project.getLanguageService().getSemanticDiagnostics(file);
- }
- var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); });
- this.event({ file: file, diagnostics: bakedDiags }, "semanticDiag");
- }
- catch (err) {
- this.logError(err, "semantic check");
- }
- };
- Session.prototype.syntacticCheck = function (file, project) {
- try {
- var diags = project.getLanguageService().getSyntacticDiagnostics(file);
- if (diags) {
- var bakedDiags = diags.map(function (diag) { return formatDiag(file, project, diag); });
- this.event({ file: file, diagnostics: bakedDiags }, "syntaxDiag");
- }
- }
- catch (err) {
- this.logError(err, "syntactic check");
- }
- };
- Session.prototype.updateProjectStructure = function (seq, matchSeq, ms) {
- var _this = this;
- if (ms === void 0) { ms = 1500; }
- this.host.setTimeout(function () {
- if (matchSeq(seq)) {
- _this.projectService.refreshInferredProjects();
- }
- }, ms);
- };
- Session.prototype.updateErrorCheck = function (checkList, seq, matchSeq, ms, followMs, requireOpen) {
- var _this = this;
- if (ms === void 0) { ms = 1500; }
- if (followMs === void 0) { followMs = 200; }
- if (requireOpen === void 0) { requireOpen = true; }
- if (followMs > ms) {
- followMs = ms;
- }
- if (this.errorTimer) {
- this.host.clearTimeout(this.errorTimer);
- }
- if (this.immediateId) {
- this.host.clearImmediate(this.immediateId);
- this.immediateId = undefined;
- }
- var index = 0;
- var checkOne = function () {
- if (matchSeq(seq)) {
- var checkSpec_1 = checkList[index];
- index++;
- if (checkSpec_1.project.containsFile(checkSpec_1.fileName, requireOpen)) {
- _this.syntacticCheck(checkSpec_1.fileName, checkSpec_1.project);
- _this.immediateId = _this.host.setImmediate(function () {
- _this.semanticCheck(checkSpec_1.fileName, checkSpec_1.project);
- _this.immediateId = undefined;
- if (checkList.length > index) {
- _this.errorTimer = _this.host.setTimeout(checkOne, followMs);
- }
- else {
- _this.errorTimer = undefined;
- }
- });
- }
- }
- };
- if ((checkList.length > index) && (matchSeq(seq))) {
- this.errorTimer = this.host.setTimeout(checkOne, ms);
- }
- };
- Session.prototype.cleanProjects = function (caption, projects) {
- if (!projects) {
- return;
- }
- this.logger.info("cleaning " + caption);
- for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
- var p = projects_4[_i];
- p.getLanguageService(false).cleanupSemanticCache();
- }
- };
- Session.prototype.cleanup = function () {
- this.cleanProjects("inferred projects", this.projectService.inferredProjects);
- this.cleanProjects("configured projects", this.projectService.configuredProjects);
- this.cleanProjects("external projects", this.projectService.externalProjects);
- if (this.host.gc) {
- this.logger.info("host.gc()");
- this.host.gc();
- }
- };
- Session.prototype.getEncodedSemanticClassifications = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- return project.getLanguageService().getEncodedSemanticClassifications(file, args);
- };
- Session.prototype.getProject = function (projectFileName) {
- return projectFileName && this.projectService.findProject(projectFileName);
- };
- Session.prototype.getCompilerOptionsDiagnostics = function (args) {
- var project = this.getProject(args.projectFileName);
- return this.convertToDiagnosticsWithLinePosition(project.getLanguageService().getCompilerOptionsDiagnostics(), undefined);
- };
- Session.prototype.convertToDiagnosticsWithLinePosition = function (diagnostics, scriptInfo) {
- var _this = this;
- return diagnostics.map(function (d) { return ({
- message: ts.flattenDiagnosticMessageText(d.messageText, _this.host.newLine),
- start: d.start,
- length: d.length,
- category: ts.DiagnosticCategory[d.category].toLowerCase(),
- code: d.code,
- startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start),
- endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length)
- }); });
- };
- Session.prototype.getDiagnosticsWorker = function (args, isSemantic, selector, includeLinePosition) {
- var _a = this.getFileAndProject(args), project = _a.project, file = _a.file;
- if (isSemantic && shouldSkipSematicCheck(project)) {
- return [];
- }
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var diagnostics = selector(project, file);
- return includeLinePosition
- ? this.convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo)
- : diagnostics.map(function (d) { return formatDiag(file, project, d); });
- };
- Session.prototype.getDefinition = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var definitions = project.getLanguageService().getDefinitionAtPosition(file, position);
- if (!definitions) {
- return undefined;
- }
- if (simplifiedResult) {
- return definitions.map(function (def) {
- var defScriptInfo = project.getScriptInfo(def.fileName);
- return {
- file: def.fileName,
- start: defScriptInfo.positionToLineOffset(def.textSpan.start),
- end: defScriptInfo.positionToLineOffset(ts.textSpanEnd(def.textSpan))
- };
- });
- }
- else {
- return definitions;
- }
- };
- Session.prototype.getTypeDefinition = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var definitions = project.getLanguageService().getTypeDefinitionAtPosition(file, position);
- if (!definitions) {
- return undefined;
- }
- return definitions.map(function (def) {
- var defScriptInfo = project.getScriptInfo(def.fileName);
- return {
- file: def.fileName,
- start: defScriptInfo.positionToLineOffset(def.textSpan.start),
- end: defScriptInfo.positionToLineOffset(ts.textSpanEnd(def.textSpan))
- };
- });
- };
- Session.prototype.getImplementation = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var implementations = project.getLanguageService().getImplementationAtPosition(file, position);
- if (!implementations) {
- return [];
- }
- if (simplifiedResult) {
- return implementations.map(function (impl) { return ({
- file: impl.fileName,
- start: scriptInfo.positionToLineOffset(impl.textSpan.start),
- end: scriptInfo.positionToLineOffset(ts.textSpanEnd(impl.textSpan))
- }); });
- }
- else {
- return implementations;
- }
- };
- Session.prototype.getOccurrences = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var occurrences = project.getLanguageService().getOccurrencesAtPosition(file, position);
- if (!occurrences) {
- return undefined;
- }
- return occurrences.map(function (occurrence) {
- var fileName = occurrence.fileName, isWriteAccess = occurrence.isWriteAccess, textSpan = occurrence.textSpan;
- var scriptInfo = project.getScriptInfo(fileName);
- var start = scriptInfo.positionToLineOffset(textSpan.start);
- var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan));
- return {
- start: start,
- end: end,
- file: fileName,
- isWriteAccess: isWriteAccess,
- };
- });
- };
- Session.prototype.getSyntacticDiagnosticsSync = function (args) {
- return this.getDiagnosticsWorker(args, false, function (project, file) { return project.getLanguageService().getSyntacticDiagnostics(file); }, args.includeLinePosition);
- };
- Session.prototype.getSemanticDiagnosticsSync = function (args) {
- return this.getDiagnosticsWorker(args, true, function (project, file) { return project.getLanguageService().getSemanticDiagnostics(file); }, args.includeLinePosition);
- };
- Session.prototype.getDocumentHighlights = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var documentHighlights = project.getLanguageService().getDocumentHighlights(file, position, args.filesToSearch);
- if (!documentHighlights) {
- return undefined;
- }
- if (simplifiedResult) {
- return documentHighlights.map(convertToDocumentHighlightsItem);
- }
- else {
- return documentHighlights;
- }
- function convertToDocumentHighlightsItem(documentHighlights) {
- var fileName = documentHighlights.fileName, highlightSpans = documentHighlights.highlightSpans;
- var scriptInfo = project.getScriptInfo(fileName);
- return {
- file: fileName,
- highlightSpans: highlightSpans.map(convertHighlightSpan)
- };
- function convertHighlightSpan(highlightSpan) {
- var textSpan = highlightSpan.textSpan, kind = highlightSpan.kind;
- var start = scriptInfo.positionToLineOffset(textSpan.start);
- var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(textSpan));
- return { start: start, end: end, kind: kind };
- }
- }
- };
- Session.prototype.setCompilerOptionsForInferredProjects = function (args) {
- this.projectService.setCompilerOptionsForInferredProjects(args.options);
- };
- Session.prototype.getProjectInfo = function (args) {
- return this.getProjectInfoWorker(args.file, args.projectFileName, args.needFileNameList);
- };
- Session.prototype.getProjectInfoWorker = function (uncheckedFileName, projectFileName, needFileNameList) {
- var project = this.getFileAndProjectWorker(uncheckedFileName, projectFileName, true, true).project;
- var projectInfo = {
- configFileName: project.getProjectName(),
- languageServiceDisabled: !project.languageServiceEnabled,
- fileNames: needFileNameList ? project.getFileNames() : undefined
- };
- return projectInfo;
- };
- Session.prototype.getRenameInfo = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- return project.getLanguageService().getRenameInfo(file, position);
- };
- Session.prototype.getProjects = function (args) {
- var projects;
- if (args.projectFileName) {
- var project = this.getProject(args.projectFileName);
- if (project) {
- projects = [project];
- }
- }
- else {
- var scriptInfo = this.projectService.getScriptInfo(args.file);
- projects = scriptInfo.containingProjects;
- }
- projects = ts.filter(projects, function (p) { return p.languageServiceEnabled; });
- if (!projects || !projects.length) {
- return server.Errors.ThrowNoProject();
- }
- return projects;
- };
- Session.prototype.getRenameLocations = function (args, simplifiedResult) {
- var file = server.toNormalizedPath(args.file);
- var info = this.projectService.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, info);
- var projects = this.getProjects(args);
- if (simplifiedResult) {
- var defaultProject = projects[0];
- var renameInfo = defaultProject.getLanguageService().getRenameInfo(file, position);
- if (!renameInfo) {
- return undefined;
- }
- if (!renameInfo.canRename) {
- return {
- info: renameInfo,
- locs: []
- };
- }
- var fileSpans = server.combineProjectOutput(projects, function (project) {
- var renameLocations = project.getLanguageService().findRenameLocations(file, position, args.findInStrings, args.findInComments);
- if (!renameLocations) {
- return [];
- }
- return renameLocations.map(function (location) {
- var locationScriptInfo = project.getScriptInfo(location.fileName);
- return {
- file: location.fileName,
- start: locationScriptInfo.positionToLineOffset(location.textSpan.start),
- end: locationScriptInfo.positionToLineOffset(ts.textSpanEnd(location.textSpan)),
- };
- });
- }, compareRenameLocation, function (a, b) { return a.file === b.file && a.start.line === b.start.line && a.start.offset === b.start.offset; });
- var locs = fileSpans.reduce(function (accum, cur) {
- var curFileAccum;
- if (accum.length > 0) {
- curFileAccum = accum[accum.length - 1];
- if (curFileAccum.file !== cur.file) {
- curFileAccum = undefined;
- }
- }
- if (!curFileAccum) {
- curFileAccum = { file: cur.file, locs: [] };
- accum.push(curFileAccum);
- }
- curFileAccum.locs.push({ start: cur.start, end: cur.end });
- return accum;
- }, []);
- return { info: renameInfo, locs: locs };
- }
- else {
- return server.combineProjectOutput(projects, function (p) { return p.getLanguageService().findRenameLocations(file, position, args.findInStrings, args.findInComments); }, undefined, renameLocationIsEqualTo);
- }
- function renameLocationIsEqualTo(a, b) {
- if (a === b) {
- return true;
- }
- if (!a || !b) {
- return false;
- }
- return a.fileName === b.fileName &&
- a.textSpan.start === b.textSpan.start &&
- a.textSpan.length === b.textSpan.length;
- }
- function compareRenameLocation(a, b) {
- if (a.file < b.file) {
- return -1;
- }
- else if (a.file > b.file) {
- return 1;
- }
- else {
- if (a.start.line < b.start.line) {
- return 1;
- }
- else if (a.start.line > b.start.line) {
- return -1;
- }
- else {
- return b.start.offset - a.start.offset;
- }
- }
- }
- };
- Session.prototype.getReferences = function (args, simplifiedResult) {
- var file = server.toNormalizedPath(args.file);
- var projects = this.getProjects(args);
- var defaultProject = projects[0];
- var scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- if (simplifiedResult) {
- var nameInfo = defaultProject.getLanguageService().getQuickInfoAtPosition(file, position);
- if (!nameInfo) {
- return undefined;
- }
- var displayString = ts.displayPartsToString(nameInfo.displayParts);
- var nameSpan = nameInfo.textSpan;
- var nameColStart = scriptInfo.positionToLineOffset(nameSpan.start).offset;
- var nameText = scriptInfo.snap().getText(nameSpan.start, ts.textSpanEnd(nameSpan));
- var refs = server.combineProjectOutput(projects, function (project) {
- var references = project.getLanguageService().getReferencesAtPosition(file, position);
- if (!references) {
- return [];
- }
- return references.map(function (ref) {
- var refScriptInfo = project.getScriptInfo(ref.fileName);
- var start = refScriptInfo.positionToLineOffset(ref.textSpan.start);
- var refLineSpan = refScriptInfo.lineToTextSpan(start.line - 1);
- var lineText = refScriptInfo.snap().getText(refLineSpan.start, ts.textSpanEnd(refLineSpan)).replace(/\r|\n/g, "");
- return {
- file: ref.fileName,
- start: start,
- lineText: lineText,
- end: refScriptInfo.positionToLineOffset(ts.textSpanEnd(ref.textSpan)),
- isWriteAccess: ref.isWriteAccess,
- isDefinition: ref.isDefinition
- };
- });
- }, compareFileStart, areReferencesResponseItemsForTheSameLocation);
- return {
- refs: refs,
- symbolName: nameText,
- symbolStartOffset: nameColStart,
- symbolDisplayString: displayString
- };
- }
- else {
- return server.combineProjectOutput(projects, function (project) { return project.getLanguageService().findReferences(file, position); }, undefined, undefined);
- }
- function areReferencesResponseItemsForTheSameLocation(a, b) {
- if (a && b) {
- return a.file === b.file &&
- a.start === b.start &&
- a.end === b.end;
- }
- return false;
- }
- };
- Session.prototype.openClientFile = function (fileName, fileContent, scriptKind) {
- var _a = this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind), configFileName = _a.configFileName, configFileErrors = _a.configFileErrors;
- if (this.eventHander) {
- this.eventHander({
- eventName: "configFileDiag",
- data: { triggerFile: fileName, configFileName: configFileName, diagnostics: configFileErrors || [] }
- });
- }
- };
- Session.prototype.getPosition = function (args, scriptInfo) {
- return args.position !== undefined ? args.position : scriptInfo.lineOffsetToPosition(args.line, args.offset);
- };
- Session.prototype.getFileAndProject = function (args, errorOnMissingProject) {
- if (errorOnMissingProject === void 0) { errorOnMissingProject = true; }
- return this.getFileAndProjectWorker(args.file, args.projectFileName, true, errorOnMissingProject);
- };
- Session.prototype.getFileAndProjectWithoutRefreshingInferredProjects = function (args, errorOnMissingProject) {
- if (errorOnMissingProject === void 0) { errorOnMissingProject = true; }
- return this.getFileAndProjectWorker(args.file, args.projectFileName, false, errorOnMissingProject);
- };
- Session.prototype.getFileAndProjectWorker = function (uncheckedFileName, projectFileName, refreshInferredProjects, errorOnMissingProject) {
- var file = server.toNormalizedPath(uncheckedFileName);
- var project = this.getProject(projectFileName) || this.projectService.getDefaultProjectForFile(file, refreshInferredProjects);
- if (!project && errorOnMissingProject) {
- return server.Errors.ThrowNoProject();
- }
- return { file: file, project: project };
- };
- Session.prototype.getOutliningSpans = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- return project.getLanguageService(false).getOutliningSpans(file);
- };
- Session.prototype.getTodoComments = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- return project.getLanguageService().getTodoComments(file, args.descriptors);
- };
- Session.prototype.getDocCommentTemplate = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- return project.getLanguageService(false).getDocCommentTemplateAtPosition(file, position);
- };
- Session.prototype.getIndentation = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
- var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
- var indentation = project.getLanguageService(false).getIndentationAtPosition(file, position, options);
- return { position: position, indentation: indentation };
- };
- Session.prototype.getBreakpointStatement = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
- return project.getLanguageService(false).getBreakpointStatementAtPosition(file, position);
- };
- Session.prototype.getNameOrDottedNameSpan = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
- return project.getLanguageService(false).getNameOrDottedNameSpan(file, position, position);
- };
- Session.prototype.isValidBraceCompletion = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var position = this.getPosition(args, project.getScriptInfoForNormalizedPath(file));
- return project.getLanguageService(false).isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0));
- };
- Session.prototype.getQuickInfoWorker = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo));
- if (!quickInfo) {
- return undefined;
- }
- if (simplifiedResult) {
- var displayString = ts.displayPartsToString(quickInfo.displayParts);
- var docString = ts.displayPartsToString(quickInfo.documentation);
- return {
- kind: quickInfo.kind,
- kindModifiers: quickInfo.kindModifiers,
- start: scriptInfo.positionToLineOffset(quickInfo.textSpan.start),
- end: scriptInfo.positionToLineOffset(ts.textSpanEnd(quickInfo.textSpan)),
- displayString: displayString,
- documentation: docString,
- };
- }
- else {
- return quickInfo;
- }
- };
- Session.prototype.getFormattingEditsForRange = function (args) {
- var _this = this;
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset);
- var endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
- var edits = project.getLanguageService(false).getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file));
- if (!edits) {
- return undefined;
- }
- return edits.map(function (edit) { return _this.convertTextChangeToCodeEdit(edit, scriptInfo); });
- };
- Session.prototype.getFormattingEditsForRangeFull = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
- return project.getLanguageService(false).getFormattingEditsForRange(file, args.position, args.endPosition, options);
- };
- Session.prototype.getFormattingEditsForDocumentFull = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
- return project.getLanguageService(false).getFormattingEditsForDocument(file, options);
- };
- Session.prototype.getFormattingEditsAfterKeystrokeFull = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var options = args.options ? server.convertFormatOptions(args.options) : this.projectService.getFormatCodeOptions(file);
- return project.getLanguageService(false).getFormattingEditsAfterKeystroke(file, args.position, args.key, options);
- };
- Session.prototype.getFormattingEditsAfterKeystroke = function (args) {
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = scriptInfo.lineOffsetToPosition(args.line, args.offset);
- var formatOptions = this.projectService.getFormatCodeOptions(file);
- var edits = project.getLanguageService(false).getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions);
- if ((args.key == "\n") && ((!edits) || (edits.length === 0) || allEditsBeforePos(edits, position))) {
- var lineInfo = scriptInfo.getLineInfo(args.line);
- if (lineInfo && (lineInfo.leaf) && (lineInfo.leaf.text)) {
- var lineText = lineInfo.leaf.text;
- if (lineText.search("\\S") < 0) {
- var preferredIndent = project.getLanguageService(false).getIndentationAtPosition(file, position, formatOptions);
- var hasIndent = 0;
- var i = void 0, len = void 0;
- for (i = 0, len = lineText.length; i < len; i++) {
- if (lineText.charAt(i) == " ") {
- hasIndent++;
- }
- else if (lineText.charAt(i) == "\t") {
- hasIndent += formatOptions.tabSize;
- }
- else {
- break;
- }
- }
- if (preferredIndent !== hasIndent) {
- var firstNoWhiteSpacePosition = lineInfo.offset + i;
- edits.push({
- span: ts.createTextSpanFromBounds(lineInfo.offset, firstNoWhiteSpacePosition),
- newText: ts.formatting.getIndentationString(preferredIndent, formatOptions)
- });
- }
- }
- }
- }
- if (!edits) {
- return undefined;
- }
- return edits.map(function (edit) {
- return {
- start: scriptInfo.positionToLineOffset(edit.span.start),
- end: scriptInfo.positionToLineOffset(ts.textSpanEnd(edit.span)),
- newText: edit.newText ? edit.newText : ""
- };
- });
- };
- Session.prototype.getCompletions = function (args, simplifiedResult) {
- var _this = this;
- var prefix = args.prefix || "";
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var completions = project.getLanguageService().getCompletionsAtPosition(file, position);
- if (!completions) {
- return undefined;
- }
- if (simplifiedResult) {
- return completions.entries.reduce(function (result, entry) {
- if (completions.isMemberCompletion || (entry.name.toLowerCase().indexOf(prefix.toLowerCase()) === 0)) {
- var name_51 = entry.name, kind = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, replacementSpan = entry.replacementSpan;
- var convertedSpan = replacementSpan ? _this.decorateSpan(replacementSpan, scriptInfo) : undefined;
- result.push({ name: name_51, kind: kind, kindModifiers: kindModifiers, sortText: sortText, replacementSpan: convertedSpan });
- }
- return result;
- }, []).sort(function (a, b) { return ts.compareStrings(a.name, b.name); });
- }
- else {
- return completions;
- }
- };
- Session.prototype.getCompletionEntryDetails = function (args) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- return args.entryNames.reduce(function (accum, entryName) {
- var details = project.getLanguageService().getCompletionEntryDetails(file, position, entryName);
- if (details) {
- accum.push(details);
- }
- return accum;
- }, []);
- };
- Session.prototype.getCompileOnSaveAffectedFileList = function (args) {
- var info = this.projectService.getScriptInfo(args.file);
- var result = [];
- if (!info) {
- return [];
- }
- var projectsToSearch = args.projectFileName ? [this.projectService.findProject(args.projectFileName)] : info.containingProjects;
- for (var _i = 0, projectsToSearch_1 = projectsToSearch; _i < projectsToSearch_1.length; _i++) {
- var project = projectsToSearch_1[_i];
- if (project.compileOnSaveEnabled && project.languageServiceEnabled) {
- result.push({
- projectFileName: project.getProjectName(),
- fileNames: project.getCompileOnSaveAffectedFileList(info)
- });
- }
- }
- return result;
- };
- Session.prototype.emitFile = function (args) {
- var _this = this;
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- if (!project) {
- server.Errors.ThrowNoProject();
- }
- var scriptInfo = project.getScriptInfo(file);
- return project.builder.emitFile(scriptInfo, function (path, data, writeByteOrderMark) { return _this.host.writeFile(path, data, writeByteOrderMark); });
- };
- Session.prototype.getSignatureHelpItems = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var helpItems = project.getLanguageService().getSignatureHelpItems(file, position);
- if (!helpItems) {
- return undefined;
- }
- if (simplifiedResult) {
- var span_16 = helpItems.applicableSpan;
- return {
- items: helpItems.items,
- applicableSpan: {
- start: scriptInfo.positionToLineOffset(span_16.start),
- end: scriptInfo.positionToLineOffset(span_16.start + span_16.length)
- },
- selectedItemIndex: helpItems.selectedItemIndex,
- argumentIndex: helpItems.argumentIndex,
- argumentCount: helpItems.argumentCount,
- };
- }
- else {
- return helpItems;
- }
- };
- Session.prototype.getDiagnostics = function (delay, fileNames) {
- var _this = this;
- var checkList = fileNames.reduce(function (accum, uncheckedFileName) {
- var fileName = server.toNormalizedPath(uncheckedFileName);
- var project = _this.projectService.getDefaultProjectForFile(fileName, true);
- if (project) {
- accum.push({ fileName: fileName, project: project });
- }
- return accum;
- }, []);
- if (checkList.length > 0) {
- this.updateErrorCheck(checkList, this.changeSeq, function (n) { return n === _this.changeSeq; }, delay);
- }
- };
- Session.prototype.change = function (args) {
- var _this = this;
- var _a = this.getFileAndProject(args, false), file = _a.file, project = _a.project;
- if (project) {
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var start = scriptInfo.lineOffsetToPosition(args.line, args.offset);
- var end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
- if (start >= 0) {
- scriptInfo.editContent(start, end, args.insertString);
- this.changeSeq++;
- }
- this.updateProjectStructure(this.changeSeq, function (n) { return n === _this.changeSeq; });
- }
- };
- Session.prototype.reload = function (args, reqSeq) {
- var file = server.toNormalizedPath(args.file);
- var tempFileName = args.tmpfile && server.toNormalizedPath(args.tmpfile);
- var project = this.projectService.getDefaultProjectForFile(file, true);
- if (project) {
- this.changeSeq++;
- if (project.reloadScript(file, tempFileName)) {
- this.output(undefined, CommandNames.Reload, reqSeq);
- }
- }
- };
- Session.prototype.saveToTmp = function (fileName, tempFileName) {
- var scriptInfo = this.projectService.getScriptInfo(fileName);
- if (scriptInfo) {
- scriptInfo.saveTo(tempFileName);
- }
- };
- Session.prototype.closeClientFile = function (fileName) {
- if (!fileName) {
- return;
- }
- var file = ts.normalizePath(fileName);
- this.projectService.closeClientFile(file);
- };
- Session.prototype.decorateNavigationBarItems = function (items, scriptInfo) {
- var _this = this;
- return ts.map(items, function (item) { return ({
- text: item.text,
- kind: item.kind,
- kindModifiers: item.kindModifiers,
- spans: item.spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); }),
- childItems: _this.decorateNavigationBarItems(item.childItems, scriptInfo),
- indent: item.indent
- }); });
- };
- Session.prototype.getNavigationBarItems = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var items = project.getLanguageService(false).getNavigationBarItems(file);
- return !items
- ? undefined
- : simplifiedResult
- ? this.decorateNavigationBarItems(items, project.getScriptInfoForNormalizedPath(file))
- : items;
- };
- Session.prototype.decorateNavigationTree = function (tree, scriptInfo) {
- var _this = this;
- return {
- text: tree.text,
- kind: tree.kind,
- kindModifiers: tree.kindModifiers,
- spans: tree.spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); }),
- childItems: ts.map(tree.childItems, function (item) { return _this.decorateNavigationTree(item, scriptInfo); })
- };
- };
- Session.prototype.decorateSpan = function (span, scriptInfo) {
- return {
- start: scriptInfo.positionToLineOffset(span.start),
- end: scriptInfo.positionToLineOffset(ts.textSpanEnd(span))
- };
- };
- Session.prototype.getNavigationTree = function (args, simplifiedResult) {
- var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
- var tree = project.getLanguageService(false).getNavigationTree(file);
- return !tree
- ? undefined
- : simplifiedResult
- ? this.decorateNavigationTree(tree, project.getScriptInfoForNormalizedPath(file))
- : tree;
- };
- Session.prototype.getNavigateToItems = function (args, simplifiedResult) {
- var projects = this.getProjects(args);
- var fileName = args.currentFileOnly ? args.file && ts.normalizeSlashes(args.file) : undefined;
- if (simplifiedResult) {
- return server.combineProjectOutput(projects, function (project) {
- var navItems = project.getLanguageService().getNavigateToItems(args.searchValue, args.maxResultCount, fileName, project.isNonTsProject());
- if (!navItems) {
- return [];
- }
- return navItems.map(function (navItem) {
- var scriptInfo = project.getScriptInfo(navItem.fileName);
- var start = scriptInfo.positionToLineOffset(navItem.textSpan.start);
- var end = scriptInfo.positionToLineOffset(ts.textSpanEnd(navItem.textSpan));
- var bakedItem = {
- name: navItem.name,
- kind: navItem.kind,
- file: navItem.fileName,
- start: start,
- end: end,
- };
- if (navItem.kindModifiers && (navItem.kindModifiers !== "")) {
- bakedItem.kindModifiers = navItem.kindModifiers;
- }
- if (navItem.matchKind !== "none") {
- bakedItem.matchKind = navItem.matchKind;
- }
- if (navItem.containerName && (navItem.containerName.length > 0)) {
- bakedItem.containerName = navItem.containerName;
- }
- if (navItem.containerKind && (navItem.containerKind.length > 0)) {
- bakedItem.containerKind = navItem.containerKind;
- }
- return bakedItem;
- });
- }, undefined, areNavToItemsForTheSameLocation);
- }
- else {
- return server.combineProjectOutput(projects, function (project) { return project.getLanguageService().getNavigateToItems(args.searchValue, args.maxResultCount, fileName, project.isNonTsProject()); }, undefined, navigateToItemIsEqualTo);
- }
- function navigateToItemIsEqualTo(a, b) {
- if (a === b) {
- return true;
- }
- if (!a || !b) {
- return false;
- }
- return a.containerKind === b.containerKind &&
- a.containerName === b.containerName &&
- a.fileName === b.fileName &&
- a.isCaseSensitive === b.isCaseSensitive &&
- a.kind === b.kind &&
- a.kindModifiers === b.containerName &&
- a.matchKind === b.matchKind &&
- a.name === b.name &&
- a.textSpan.start === b.textSpan.start &&
- a.textSpan.length === b.textSpan.length;
- }
- function areNavToItemsForTheSameLocation(a, b) {
- if (a && b) {
- return a.file === b.file &&
- a.start === b.start &&
- a.end === b.end;
- }
- return false;
- }
- };
- Session.prototype.getSupportedCodeFixes = function () {
- return ts.getSupportedCodeFixes();
- };
- Session.prototype.getCodeFixes = function (args, simplifiedResult) {
- var _this = this;
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var startPosition = getStartPosition();
- var endPosition = getEndPosition();
- var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes);
- if (!codeActions) {
- return undefined;
- }
- if (simplifiedResult) {
- return codeActions.map(function (codeAction) { return _this.mapCodeAction(codeAction, scriptInfo); });
- }
- else {
- return codeActions;
- }
- function getStartPosition() {
- return args.startPosition !== undefined ? args.startPosition : scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
- }
- function getEndPosition() {
- return args.endPosition !== undefined ? args.endPosition : scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
- }
- };
- Session.prototype.mapCodeAction = function (codeAction, scriptInfo) {
- var _this = this;
- return {
- description: codeAction.description,
- changes: codeAction.changes.map(function (change) { return ({
- fileName: change.fileName,
- textChanges: change.textChanges.map(function (textChange) { return _this.convertTextChangeToCodeEdit(textChange, scriptInfo); })
- }); })
- };
- };
- Session.prototype.convertTextChangeToCodeEdit = function (change, scriptInfo) {
- return {
- start: scriptInfo.positionToLineOffset(change.span.start),
- end: scriptInfo.positionToLineOffset(change.span.start + change.span.length),
- newText: change.newText ? change.newText : ""
- };
- };
- Session.prototype.getBraceMatching = function (args, simplifiedResult) {
- var _this = this;
- var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
- var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var position = this.getPosition(args, scriptInfo);
- var spans = project.getLanguageService(false).getBraceMatchingAtPosition(file, position);
- return !spans
- ? undefined
- : simplifiedResult
- ? spans.map(function (span) { return _this.decorateSpan(span, scriptInfo); })
- : spans;
- };
- Session.prototype.getDiagnosticsForProject = function (delay, fileName) {
- var _this = this;
- var _a = this.getProjectInfoWorker(fileName, undefined, true), fileNames = _a.fileNames, languageServiceDisabled = _a.languageServiceDisabled;
- if (languageServiceDisabled) {
- return;
- }
- var fileNamesInProject = fileNames.filter(function (value) { return value.indexOf("lib.d.ts") < 0; });
- var highPriorityFiles = [];
- var mediumPriorityFiles = [];
- var lowPriorityFiles = [];
- var veryLowPriorityFiles = [];
- var normalizedFileName = server.toNormalizedPath(fileName);
- var project = this.projectService.getDefaultProjectForFile(normalizedFileName, true);
- for (var _i = 0, fileNamesInProject_1 = fileNamesInProject; _i < fileNamesInProject_1.length; _i++) {
- var fileNameInProject = fileNamesInProject_1[_i];
- if (this.getCanonicalFileName(fileNameInProject) == this.getCanonicalFileName(fileName))
- highPriorityFiles.push(fileNameInProject);
- else {
- var info = this.projectService.getScriptInfo(fileNameInProject);
- if (!info.isOpen) {
- if (fileNameInProject.indexOf(".d.ts") > 0)
- veryLowPriorityFiles.push(fileNameInProject);
- else
- lowPriorityFiles.push(fileNameInProject);
- }
- else
- mediumPriorityFiles.push(fileNameInProject);
- }
- }
- fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);
- if (fileNamesInProject.length > 0) {
- var checkList = fileNamesInProject.map(function (fileName) { return ({ fileName: fileName, project: project }); });
- this.updateErrorCheck(checkList, this.changeSeq, function (n) { return n == _this.changeSeq; }, delay, 200, false);
- }
- };
- Session.prototype.getCanonicalFileName = function (fileName) {
- var name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
- return ts.normalizePath(name);
- };
- Session.prototype.exit = function () {
- };
- Session.prototype.notRequired = function () {
- return { responseRequired: false };
- };
- Session.prototype.requiredResponse = function (response) {
- return { response: response, responseRequired: true };
- };
- Session.prototype.addProtocolHandler = function (command, handler) {
- if (command in this.handlers) {
- throw new Error("Protocol handler already exists for command \"" + command + "\"");
- }
- this.handlers[command] = handler;
- };
- Session.prototype.executeCommand = function (request) {
- var handler = this.handlers[request.command];
- if (handler) {
- return handler(request);
- }
- else {
- this.logger.msg("Unrecognized JSON command: " + JSON.stringify(request), server.Msg.Err);
- this.output(undefined, CommandNames.Unknown, request.seq, "Unrecognized JSON command: " + request.command);
- return { responseRequired: false };
- }
- };
- Session.prototype.onMessage = function (message) {
- this.gcTimer.scheduleCollect();
- var start;
- if (this.logger.hasLevel(server.LogLevel.requestTime)) {
- start = this.hrtime();
- if (this.logger.hasLevel(server.LogLevel.verbose)) {
- this.logger.info("request: " + message);
- }
- }
- var request;
- try {
- request = JSON.parse(message);
- var _a = this.executeCommand(request), response = _a.response, responseRequired = _a.responseRequired;
- if (this.logger.hasLevel(server.LogLevel.requestTime)) {
- var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
- if (responseRequired) {
- this.logger.perftrc(request.seq + "::" + request.command + ": elapsed time (in milliseconds) " + elapsedTime);
- }
- else {
- this.logger.perftrc(request.seq + "::" + request.command + ": async elapsed time (in milliseconds) " + elapsedTime);
- }
- }
- if (response) {
- this.output(response, request.command, request.seq);
- }
- else if (responseRequired) {
- this.output(undefined, request.command, request.seq, "No content available.");
- }
- }
- catch (err) {
- if (err instanceof ts.OperationCanceledException) {
- this.output({ canceled: true }, request.command, request.seq);
- return;
- }
- this.logError(err, message);
- this.output(undefined, request ? request.command : CommandNames.Unknown, request ? request.seq : 0, "Error processing request. " + err.message + "\n" + err.stack);
- }
- };
- return Session;
- }());
- server.Session = Session;
- })(server = ts.server || (ts.server = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
- var server;
- (function (server) {
- var lineCollectionCapacity = 4;
- var CharRangeSection;
- (function (CharRangeSection) {
- CharRangeSection[CharRangeSection["PreStart"] = 0] = "PreStart";
- CharRangeSection[CharRangeSection["Start"] = 1] = "Start";
- CharRangeSection[CharRangeSection["Entire"] = 2] = "Entire";
- CharRangeSection[CharRangeSection["Mid"] = 3] = "Mid";
- CharRangeSection[CharRangeSection["End"] = 4] = "End";
- CharRangeSection[CharRangeSection["PostEnd"] = 5] = "PostEnd";
- })(CharRangeSection = server.CharRangeSection || (server.CharRangeSection = {}));
- var BaseLineIndexWalker = (function () {
- function BaseLineIndexWalker() {
- this.goSubtree = true;
- this.done = false;
- }
- BaseLineIndexWalker.prototype.leaf = function (_rangeStart, _rangeLength, _ll) {
- };
- return BaseLineIndexWalker;
- }());
- var EditWalker = (function (_super) {
- __extends(EditWalker, _super);
- function EditWalker() {
- var _this = _super.call(this) || this;
- _this.lineIndex = new LineIndex();
- _this.endBranch = [];
- _this.state = CharRangeSection.Entire;
- _this.initialText = "";
- _this.trailingText = "";
- _this.suppressTrailingText = false;
- _this.lineIndex.root = new LineNode();
- _this.startPath = [_this.lineIndex.root];
- _this.stack = [_this.lineIndex.root];
- return _this;
- }
- EditWalker.prototype.insertLines = function (insertedText) {
- if (this.suppressTrailingText) {
- this.trailingText = "";
- }
- if (insertedText) {
- insertedText = this.initialText + insertedText + this.trailingText;
- }
- else {
- insertedText = this.initialText + this.trailingText;
- }
- var lm = LineIndex.linesFromText(insertedText);
- var lines = lm.lines;
- if (lines.length > 1) {
- if (lines[lines.length - 1] == "") {
- lines.length--;
- }
- }
- var branchParent;
- var lastZeroCount;
- for (var k = this.endBranch.length - 1; k >= 0; k--) {
- this.endBranch[k].updateCounts();
- if (this.endBranch[k].charCount() === 0) {
- lastZeroCount = this.endBranch[k];
- if (k > 0) {
- branchParent = this.endBranch[k - 1];
- }
- else {
- branchParent = this.branchNode;
- }
- }
- }
- if (lastZeroCount) {
- branchParent.remove(lastZeroCount);
- }
- var insertionNode = this.startPath[this.startPath.length - 2];
- var leafNode = this.startPath[this.startPath.length - 1];
- var len = lines.length;
- if (len > 0) {
- leafNode.text = lines[0];
- if (len > 1) {
- var insertedNodes = new Array(len - 1);
- var startNode = leafNode;
- for (var i = 1, len_1 = lines.length; i < len_1; i++) {
- insertedNodes[i - 1] = new LineLeaf(lines[i]);
- }
- var pathIndex = this.startPath.length - 2;
- while (pathIndex >= 0) {
- insertionNode = this.startPath[pathIndex];
- insertedNodes = insertionNode.insertAt(startNode, insertedNodes);
- pathIndex--;
- startNode = insertionNode;
- }
- var insertedNodesLen = insertedNodes.length;
- while (insertedNodesLen > 0) {
- var newRoot = new LineNode();
- newRoot.add(this.lineIndex.root);
- insertedNodes = newRoot.insertAt(this.lineIndex.root, insertedNodes);
- insertedNodesLen = insertedNodes.length;
- this.lineIndex.root = newRoot;
- }
- this.lineIndex.root.updateCounts();
- }
- else {
- for (var j = this.startPath.length - 2; j >= 0; j--) {
- this.startPath[j].updateCounts();
- }
- }
- }
- else {
- insertionNode.remove(leafNode);
- for (var j = this.startPath.length - 2; j >= 0; j--) {
- this.startPath[j].updateCounts();
- }
- }
- return this.lineIndex;
- };
- EditWalker.prototype.post = function (_relativeStart, _relativeLength, lineCollection) {
- if (lineCollection === this.lineCollectionAtBranch) {
- this.state = CharRangeSection.End;
- }
- this.stack.length--;
- return undefined;
- };
- EditWalker.prototype.pre = function (_relativeStart, _relativeLength, lineCollection, _parent, nodeType) {
- var currentNode = this.stack[this.stack.length - 1];
- if ((this.state === CharRangeSection.Entire) && (nodeType === CharRangeSection.Start)) {
- this.state = CharRangeSection.Start;
- this.branchNode = currentNode;
- this.lineCollectionAtBranch = lineCollection;
- }
- var child;
- function fresh(node) {
- if (node.isLeaf()) {
- return new LineLeaf("");
- }
- else
- return new LineNode();
- }
- switch (nodeType) {
- case CharRangeSection.PreStart:
- this.goSubtree = false;
- if (this.state !== CharRangeSection.End) {
- currentNode.add(lineCollection);
- }
- break;
- case CharRangeSection.Start:
- if (this.state === CharRangeSection.End) {
- this.goSubtree = false;
- }
- else {
- child = fresh(lineCollection);
- currentNode.add(child);
- this.startPath[this.startPath.length] = child;
- }
- break;
- case CharRangeSection.Entire:
- if (this.state !== CharRangeSection.End) {
- child = fresh(lineCollection);
- currentNode.add(child);
- this.startPath[this.startPath.length] = child;
- }
- else {
- if (!lineCollection.isLeaf()) {
- child = fresh(lineCollection);
- currentNode.add(child);
- this.endBranch[this.endBranch.length] = child;
- }
- }
- break;
- case CharRangeSection.Mid:
- this.goSubtree = false;
- break;
- case CharRangeSection.End:
- if (this.state !== CharRangeSection.End) {
- this.goSubtree = false;
- }
- else {
- if (!lineCollection.isLeaf()) {
- child = fresh(lineCollection);
- currentNode.add(child);
- this.endBranch[this.endBranch.length] = child;
- }
- }
- break;
- case CharRangeSection.PostEnd:
- this.goSubtree = false;
- if (this.state !== CharRangeSection.Start) {
- currentNode.add(lineCollection);
- }
- break;
- }
- if (this.goSubtree) {
- this.stack[this.stack.length] = child;
- }
- return lineCollection;
- };
- EditWalker.prototype.leaf = function (relativeStart, relativeLength, ll) {
- if (this.state === CharRangeSection.Start) {
- this.initialText = ll.text.substring(0, relativeStart);
- }
- else if (this.state === CharRangeSection.Entire) {
- this.initialText = ll.text.substring(0, relativeStart);
- this.trailingText = ll.text.substring(relativeStart + relativeLength);
- }
- else {
- this.trailingText = ll.text.substring(relativeStart + relativeLength);
- }
- };
- return EditWalker;
- }(BaseLineIndexWalker));
- var TextChange = (function () {
- function TextChange(pos, deleteLen, insertedText) {
- this.pos = pos;
- this.deleteLen = deleteLen;
- this.insertedText = insertedText;
- }
- TextChange.prototype.getTextChangeRange = function () {
- return ts.createTextChangeRange(ts.createTextSpan(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0);
- };
- return TextChange;
- }());
- server.TextChange = TextChange;
- var ScriptVersionCache = (function () {
- function ScriptVersionCache() {
- this.changes = [];
- this.versions = new Array(ScriptVersionCache.maxVersions);
- this.minVersion = 0;
- this.currentVersion = 0;
- }
- ScriptVersionCache.prototype.versionToIndex = function (version) {
- if (version < this.minVersion || version > this.currentVersion) {
- return undefined;
- }
- return version % ScriptVersionCache.maxVersions;
- };
- ScriptVersionCache.prototype.currentVersionToIndex = function () {
- return this.currentVersion % ScriptVersionCache.maxVersions;
- };
- ScriptVersionCache.prototype.edit = function (pos, deleteLen, insertedText) {
- this.changes[this.changes.length] = new TextChange(pos, deleteLen, insertedText);
- if ((this.changes.length > ScriptVersionCache.changeNumberThreshold) ||
- (deleteLen > ScriptVersionCache.changeLengthThreshold) ||
- (insertedText && (insertedText.length > ScriptVersionCache.changeLengthThreshold))) {
- this.getSnapshot();
- }
- };
- ScriptVersionCache.prototype.latest = function () {
- return this.versions[this.currentVersionToIndex()];
- };
- ScriptVersionCache.prototype.latestVersion = function () {
- if (this.changes.length > 0) {
- this.getSnapshot();
- }
- return this.currentVersion;
- };
- ScriptVersionCache.prototype.reloadFromFile = function (filename) {
- var content = this.host.readFile(filename);
- if (!content) {
- content = "";
- }
- this.reload(content);
- };
- ScriptVersionCache.prototype.reload = function (script) {
- this.currentVersion++;
- this.changes = [];
- var snap = new LineIndexSnapshot(this.currentVersion, this);
- for (var i = 0; i < this.versions.length; i++) {
- this.versions[i] = undefined;
- }
- this.versions[this.currentVersionToIndex()] = snap;
- snap.index = new LineIndex();
- var lm = LineIndex.linesFromText(script);
- snap.index.load(lm.lines);
- this.minVersion = this.currentVersion;
- };
- ScriptVersionCache.prototype.getSnapshot = function () {
- var snap = this.versions[this.currentVersionToIndex()];
- if (this.changes.length > 0) {
- var snapIndex = snap.index;
- for (var i = 0, len = this.changes.length; i < len; i++) {
- var change = this.changes[i];
- snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText);
- }
- snap = new LineIndexSnapshot(this.currentVersion + 1, this);
- snap.index = snapIndex;
- snap.changesSincePreviousVersion = this.changes;
- this.currentVersion = snap.version;
- this.versions[this.currentVersionToIndex()] = snap;
- this.changes = [];
- if ((this.currentVersion - this.minVersion) >= ScriptVersionCache.maxVersions) {
- this.minVersion = (this.currentVersion - ScriptVersionCache.maxVersions) + 1;
- }
- }
- return snap;
- };
- ScriptVersionCache.prototype.getTextChangesBetweenVersions = function (oldVersion, newVersion) {
- if (oldVersion < newVersion) {
- if (oldVersion >= this.minVersion) {
- var textChangeRanges = [];
- for (var i = oldVersion + 1; i <= newVersion; i++) {
- var snap = this.versions[this.versionToIndex(i)];
- for (var j = 0, len = snap.changesSincePreviousVersion.length; j < len; j++) {
- var textChange = snap.changesSincePreviousVersion[j];
- textChangeRanges[textChangeRanges.length] = textChange.getTextChangeRange();
- }
- }
- return ts.collapseTextChangeRangesAcrossMultipleVersions(textChangeRanges);
- }
- else {
- return undefined;
- }
- }
- else {
- return ts.unchangedTextChangeRange;
- }
- };
- ScriptVersionCache.fromString = function (host, script) {
- var svc = new ScriptVersionCache();
- var snap = new LineIndexSnapshot(0, svc);
- svc.versions[svc.currentVersion] = snap;
- svc.host = host;
- snap.index = new LineIndex();
- var lm = LineIndex.linesFromText(script);
- snap.index.load(lm.lines);
- return svc;
- };
- return ScriptVersionCache;
- }());
- ScriptVersionCache.changeNumberThreshold = 8;
- ScriptVersionCache.changeLengthThreshold = 256;
- ScriptVersionCache.maxVersions = 8;
- server.ScriptVersionCache = ScriptVersionCache;
- var LineIndexSnapshot = (function () {
- function LineIndexSnapshot(version, cache) {
- this.version = version;
- this.cache = cache;
- this.changesSincePreviousVersion = [];
- }
- LineIndexSnapshot.prototype.getText = function (rangeStart, rangeEnd) {
- return this.index.getText(rangeStart, rangeEnd - rangeStart);
- };
- LineIndexSnapshot.prototype.getLength = function () {
- return this.index.root.charCount();
- };
- LineIndexSnapshot.prototype.getLineStartPositions = function () {
- var starts = [-1];
- var count = 1;
- var pos = 0;
- this.index.every(function (ll) {
- starts[count] = pos;
- count++;
- pos += ll.text.length;
- return true;
- }, 0);
- return starts;
- };
- LineIndexSnapshot.prototype.getLineMapper = function () {
- var _this = this;
- return function (line) {
- return _this.index.lineNumberToInfo(line).offset;
- };
- };
- LineIndexSnapshot.prototype.getTextChangeRangeSinceVersion = function (scriptVersion) {
- if (this.version <= scriptVersion) {
- return ts.unchangedTextChangeRange;
- }
- else {
- return this.cache.getTextChangesBetweenVersions(scriptVersion, this.version);
- }
- };
- LineIndexSnapshot.prototype.getChangeRange = function (oldSnapshot) {
- var oldSnap = oldSnapshot;
- return this.getTextChangeRangeSinceVersion(oldSnap.version);
- };
- return LineIndexSnapshot;
- }());
- server.LineIndexSnapshot = LineIndexSnapshot;
- var LineIndex = (function () {
- function LineIndex() {
- this.checkEdits = false;
- }
- LineIndex.prototype.charOffsetToLineNumberAndPos = function (charOffset) {
- return this.root.charOffsetToLineNumberAndPos(1, charOffset);
- };
- LineIndex.prototype.lineNumberToInfo = function (lineNumber) {
- var lineCount = this.root.lineCount();
- if (lineNumber <= lineCount) {
- var lineInfo = this.root.lineNumberToInfo(lineNumber, 0);
- lineInfo.line = lineNumber;
- return lineInfo;
- }
- else {
- return {
- line: lineNumber,
- offset: this.root.charCount()
- };
- }
- };
- LineIndex.prototype.load = function (lines) {
- if (lines.length > 0) {
- var leaves = [];
- for (var i = 0, len = lines.length; i < len; i++) {
- leaves[i] = new LineLeaf(lines[i]);
- }
- this.root = LineIndex.buildTreeFromBottom(leaves);
- }
- else {
- this.root = new LineNode();
- }
- };
- LineIndex.prototype.walk = function (rangeStart, rangeLength, walkFns) {
- this.root.walk(rangeStart, rangeLength, walkFns);
- };
- LineIndex.prototype.getText = function (rangeStart, rangeLength) {
- var accum = "";
- if ((rangeLength > 0) && (rangeStart < this.root.charCount())) {
- this.walk(rangeStart, rangeLength, {
- goSubtree: true,
- done: false,
- leaf: function (relativeStart, relativeLength, ll) {
- accum = accum.concat(ll.text.substring(relativeStart, relativeStart + relativeLength));
- }
- });
- }
- return accum;
- };
- LineIndex.prototype.getLength = function () {
- return this.root.charCount();
- };
- LineIndex.prototype.every = function (f, rangeStart, rangeEnd) {
- if (!rangeEnd) {
- rangeEnd = this.root.charCount();
- }
- var walkFns = {
- goSubtree: true,
- done: false,
- leaf: function (relativeStart, relativeLength, ll) {
- if (!f(ll, relativeStart, relativeLength)) {
- this.done = true;
- }
- }
- };
- this.walk(rangeStart, rangeEnd - rangeStart, walkFns);
- return !walkFns.done;
- };
- LineIndex.prototype.edit = function (pos, deleteLength, newText) {
- function editFlat(source, s, dl, nt) {
- if (nt === void 0) { nt = ""; }
- return source.substring(0, s) + nt + source.substring(s + dl, source.length);
- }
- if (this.root.charCount() === 0) {
- if (newText !== undefined) {
- this.load(LineIndex.linesFromText(newText).lines);
- return this;
- }
- }
- else {
- var checkText = void 0;
- if (this.checkEdits) {
- checkText = editFlat(this.getText(0, this.root.charCount()), pos, deleteLength, newText);
- }
- var walker = new EditWalker();
- if (pos >= this.root.charCount()) {
- pos = this.root.charCount() - 1;
- var endString = this.getText(pos, 1);
- if (newText) {
- newText = endString + newText;
- }
- else {
- newText = endString;
- }
- deleteLength = 0;
- walker.suppressTrailingText = true;
- }
- else if (deleteLength > 0) {
- var e = pos + deleteLength;
- var lineInfo = this.charOffsetToLineNumberAndPos(e);
- if ((lineInfo && (lineInfo.offset === 0))) {
- deleteLength += lineInfo.text.length;
- if (newText) {
- newText = newText + lineInfo.text;
- }
- else {
- newText = lineInfo.text;
- }
- }
- }
- if (pos < this.root.charCount()) {
- this.root.walk(pos, deleteLength, walker);
- walker.insertLines(newText);
- }
- if (this.checkEdits) {
- var updatedText = this.getText(0, this.root.charCount());
- ts.Debug.assert(checkText == updatedText, "buffer edit mismatch");
- }
- return walker.lineIndex;
- }
- };
- LineIndex.buildTreeFromBottom = function (nodes) {
- var nodeCount = Math.ceil(nodes.length / lineCollectionCapacity);
- var interiorNodes = [];
- var nodeIndex = 0;
- for (var i = 0; i < nodeCount; i++) {
- interiorNodes[i] = new LineNode();
- var charCount = 0;
- var lineCount = 0;
- for (var j = 0; j < lineCollectionCapacity; j++) {
- if (nodeIndex < nodes.length) {
- interiorNodes[i].add(nodes[nodeIndex]);
- charCount += nodes[nodeIndex].charCount();
- lineCount += nodes[nodeIndex].lineCount();
- }
- else {
- break;
- }
- nodeIndex++;
- }
- interiorNodes[i].totalChars = charCount;
- interiorNodes[i].totalLines = lineCount;
- }
- if (interiorNodes.length === 1) {
- return interiorNodes[0];
- }
- else {
- return this.buildTreeFromBottom(interiorNodes);
- }
- };
- LineIndex.linesFromText = function (text) {
- var lineStarts = ts.computeLineStarts(text);
- if (lineStarts.length === 0) {
- return { lines: [], lineMap: lineStarts };
- }
- var lines = new Array(lineStarts.length);
- var lc = lineStarts.length - 1;
- for (var lmi = 0; lmi < lc; lmi++) {
- lines[lmi] = text.substring(lineStarts[lmi], lineStarts[lmi + 1]);
- }
- var endText = text.substring(lineStarts[lc]);
- if (endText.length > 0) {
- lines[lc] = endText;
- }
- else {
- lines.length--;
- }
- return { lines: lines, lineMap: lineStarts };
- };
- return LineIndex;
- }());
- server.LineIndex = LineIndex;
- var LineNode = (function () {
- function LineNode() {
- this.totalChars = 0;
- this.totalLines = 0;
- this.children = [];
- }
- LineNode.prototype.isLeaf = function () {
- return false;
- };
- LineNode.prototype.updateCounts = function () {
- this.totalChars = 0;
- this.totalLines = 0;
- for (var i = 0, len = this.children.length; i < len; i++) {
- var child = this.children[i];
- this.totalChars += child.charCount();
- this.totalLines += child.lineCount();
- }
- };
- LineNode.prototype.execWalk = function (rangeStart, rangeLength, walkFns, childIndex, nodeType) {
- if (walkFns.pre) {
- walkFns.pre(rangeStart, rangeLength, this.children[childIndex], this, nodeType);
- }
- if (walkFns.goSubtree) {
- this.children[childIndex].walk(rangeStart, rangeLength, walkFns);
- if (walkFns.post) {
- walkFns.post(rangeStart, rangeLength, this.children[childIndex], this, nodeType);
- }
- }
- else {
- walkFns.goSubtree = true;
- }
- return walkFns.done;
- };
- LineNode.prototype.skipChild = function (relativeStart, relativeLength, childIndex, walkFns, nodeType) {
- if (walkFns.pre && (!walkFns.done)) {
- walkFns.pre(relativeStart, relativeLength, this.children[childIndex], this, nodeType);
- walkFns.goSubtree = true;
- }
- };
- LineNode.prototype.walk = function (rangeStart, rangeLength, walkFns) {
- var childIndex = 0;
- var child = this.children[0];
- var childCharCount = child.charCount();
- var adjustedStart = rangeStart;
- while (adjustedStart >= childCharCount) {
- this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, CharRangeSection.PreStart);
- adjustedStart -= childCharCount;
- childIndex++;
- child = this.children[childIndex];
- childCharCount = child.charCount();
- }
- if ((adjustedStart + rangeLength) <= childCharCount) {
- if (this.execWalk(adjustedStart, rangeLength, walkFns, childIndex, CharRangeSection.Entire)) {
- return;
- }
- }
- else {
- if (this.execWalk(adjustedStart, childCharCount - adjustedStart, walkFns, childIndex, CharRangeSection.Start)) {
- return;
- }
- var adjustedLength = rangeLength - (childCharCount - adjustedStart);
- childIndex++;
- child = this.children[childIndex];
- childCharCount = child.charCount();
- while (adjustedLength > childCharCount) {
- if (this.execWalk(0, childCharCount, walkFns, childIndex, CharRangeSection.Mid)) {
- return;
- }
- adjustedLength -= childCharCount;
- childIndex++;
- child = this.children[childIndex];
- childCharCount = child.charCount();
- }
- if (adjustedLength > 0) {
- if (this.execWalk(0, adjustedLength, walkFns, childIndex, CharRangeSection.End)) {
- return;
- }
- }
- }
- if (walkFns.pre) {
- var clen = this.children.length;
- if (childIndex < (clen - 1)) {
- for (var ej = childIndex + 1; ej < clen; ej++) {
- this.skipChild(0, 0, ej, walkFns, CharRangeSection.PostEnd);
- }
- }
- }
- };
- LineNode.prototype.charOffsetToLineNumberAndPos = function (lineNumber, charOffset) {
- var childInfo = this.childFromCharOffset(lineNumber, charOffset);
- if (!childInfo.child) {
- return {
- line: lineNumber,
- offset: charOffset,
- };
- }
- else if (childInfo.childIndex < this.children.length) {
- if (childInfo.child.isLeaf()) {
- return {
- line: childInfo.lineNumber,
- offset: childInfo.charOffset,
- text: (childInfo.child).text,
- leaf: (childInfo.child)
- };
- }
- else {
- var lineNode = (childInfo.child);
- return lineNode.charOffsetToLineNumberAndPos(childInfo.lineNumber, childInfo.charOffset);
- }
- }
- else {
- var lineInfo = this.lineNumberToInfo(this.lineCount(), 0);
- return { line: this.lineCount(), offset: lineInfo.leaf.charCount() };
- }
- };
- LineNode.prototype.lineNumberToInfo = function (lineNumber, charOffset) {
- var childInfo = this.childFromLineNumber(lineNumber, charOffset);
- if (!childInfo.child) {
- return {
- line: lineNumber,
- offset: charOffset
- };
- }
- else if (childInfo.child.isLeaf()) {
- return {
- line: lineNumber,
- offset: childInfo.charOffset,
- text: (childInfo.child).text,
- leaf: (childInfo.child)
- };
- }
- else {
- var lineNode = (childInfo.child);
- return lineNode.lineNumberToInfo(childInfo.relativeLineNumber, childInfo.charOffset);
- }
- };
- LineNode.prototype.childFromLineNumber = function (lineNumber, charOffset) {
- var child;
- var relativeLineNumber = lineNumber;
- var i;
- var len;
- for (i = 0, len = this.children.length; i < len; i++) {
- child = this.children[i];
- var childLineCount = child.lineCount();
- if (childLineCount >= relativeLineNumber) {
- break;
- }
- else {
- relativeLineNumber -= childLineCount;
- charOffset += child.charCount();
- }
- }
- return {
- child: child,
- childIndex: i,
- relativeLineNumber: relativeLineNumber,
- charOffset: charOffset
- };
- };
- LineNode.prototype.childFromCharOffset = function (lineNumber, charOffset) {
- var child;
- var i;
- var len;
- for (i = 0, len = this.children.length; i < len; i++) {
- child = this.children[i];
- if (child.charCount() > charOffset) {
- break;
- }
- else {
- charOffset -= child.charCount();
- lineNumber += child.lineCount();
- }
- }
- return {
- child: child,
- childIndex: i,
- charOffset: charOffset,
- lineNumber: lineNumber
- };
- };
- LineNode.prototype.splitAfter = function (childIndex) {
- var splitNode;
- var clen = this.children.length;
- childIndex++;
- var endLength = childIndex;
- if (childIndex < clen) {
- splitNode = new LineNode();
- while (childIndex < clen) {
- splitNode.add(this.children[childIndex]);
- childIndex++;
- }
- splitNode.updateCounts();
- }
- this.children.length = endLength;
- return splitNode;
- };
- LineNode.prototype.remove = function (child) {
- var childIndex = this.findChildIndex(child);
- var clen = this.children.length;
- if (childIndex < (clen - 1)) {
- for (var i = childIndex; i < (clen - 1); i++) {
- this.children[i] = this.children[i + 1];
- }
- }
- this.children.length--;
- };
- LineNode.prototype.findChildIndex = function (child) {
- var childIndex = 0;
- var clen = this.children.length;
- while ((this.children[childIndex] !== child) && (childIndex < clen))
- childIndex++;
- return childIndex;
- };
- LineNode.prototype.insertAt = function (child, nodes) {
- var childIndex = this.findChildIndex(child);
- var clen = this.children.length;
- var nodeCount = nodes.length;
- if ((clen < lineCollectionCapacity) && (childIndex === (clen - 1)) && (nodeCount === 1)) {
- this.add(nodes[0]);
- this.updateCounts();
- return [];
- }
- else {
- var shiftNode = this.splitAfter(childIndex);
- var nodeIndex = 0;
- childIndex++;
- while ((childIndex < lineCollectionCapacity) && (nodeIndex < nodeCount)) {
- this.children[childIndex] = nodes[nodeIndex];
- childIndex++;
- nodeIndex++;
- }
- var splitNodes = [];
- var splitNodeCount = 0;
- if (nodeIndex < nodeCount) {
- splitNodeCount = Math.ceil((nodeCount - nodeIndex) / lineCollectionCapacity);
- splitNodes = new Array(splitNodeCount);
- var splitNodeIndex = 0;
- for (var i = 0; i < splitNodeCount; i++) {
- splitNodes[i] = new LineNode();
- }
- var splitNode = splitNodes[0];
- while (nodeIndex < nodeCount) {
- splitNode.add(nodes[nodeIndex]);
- nodeIndex++;
- if (splitNode.children.length === lineCollectionCapacity) {
- splitNodeIndex++;
- splitNode = splitNodes[splitNodeIndex];
- }
- }
- for (var i = splitNodes.length - 1; i >= 0; i--) {
- if (splitNodes[i].children.length === 0) {
- splitNodes.length--;
- }
- }
- }
- if (shiftNode) {
- splitNodes[splitNodes.length] = shiftNode;
- }
- this.updateCounts();
- for (var i = 0; i < splitNodeCount; i++) {
- splitNodes[i].updateCounts();
- }
- return splitNodes;
- }
- };
- LineNode.prototype.add = function (collection) {
- this.children[this.children.length] = collection;
- return (this.children.length < lineCollectionCapacity);
- };
- LineNode.prototype.charCount = function () {
- return this.totalChars;
- };
- LineNode.prototype.lineCount = function () {
- return this.totalLines;
- };
- return LineNode;
- }());
- server.LineNode = LineNode;
- var LineLeaf = (function () {
- function LineLeaf(text) {
- this.text = text;
- }
- LineLeaf.prototype.isLeaf = function () {
- return true;
- };
- LineLeaf.prototype.walk = function (rangeStart, rangeLength, walkFns) {
- walkFns.leaf(rangeStart, rangeLength, this);
- };
- LineLeaf.prototype.charCount = function () {
- return this.text.length;
- };
- LineLeaf.prototype.lineCount = function () {
- return 1;
- };
- return LineLeaf;
- }());
- server.LineLeaf = LineLeaf;
- })(server = ts.server || (ts.server = {}));
-})(ts || (ts = {}));
var debugObjectHost = (function () { return this; })();
var ts;
(function (ts) {
@@ -69503,7 +77794,7 @@ var ts;
ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) {
var oldSnapshotShim = oldSnapshot;
var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
- if (encoded == null) {
+ if (encoded === null) {
return null;
}
var decoded = JSON.parse(encoded);
@@ -69571,10 +77862,12 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () {
var settingsJson = this.shimHost.getCompilationSettings();
- if (settingsJson == null || settingsJson == "") {
+ if (settingsJson === null || settingsJson === "") {
throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
}
- return JSON.parse(settingsJson);
+ var compilerOptions = JSON.parse(settingsJson);
+ compilerOptions.allowNonTsExtensions = true;
+ return compilerOptions;
};
LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () {
var encoded = this.shimHost.getScriptFileNames();
@@ -69597,7 +77890,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () {
var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
- if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") {
+ if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") {
return null;
}
try {
@@ -69610,7 +77903,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () {
var hostCancellationToken = this.shimHost.getCancellationToken();
- return new ThrottledCancellationToken(hostCancellationToken);
+ return new ts.ThrottledCancellationToken(hostCancellationToken);
};
LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () {
return this.shimHost.getCurrentDirectory();
@@ -69634,22 +77927,6 @@ var ts;
return LanguageServiceShimHostAdapter;
}());
ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter;
- var ThrottledCancellationToken = (function () {
- function ThrottledCancellationToken(hostCancellationToken) {
- this.hostCancellationToken = hostCancellationToken;
- this.lastCancellationCheckTime = 0;
- }
- ThrottledCancellationToken.prototype.isCancellationRequested = function () {
- var time = ts.timestamp();
- var duration = Math.abs(time - this.lastCancellationCheckTime);
- if (duration > 10) {
- this.lastCancellationCheckTime = time;
- return this.hostCancellationToken.isCancellationRequested();
- }
- return false;
- };
- return ThrottledCancellationToken;
- }());
var CoreServicesShimHostAdapter = (function () {
function CoreServicesShimHostAdapter(shimHost) {
var _this = this;
@@ -70012,12 +78289,6 @@ var ts;
var compilerOptions = JSON.parse(compilerOptionsJson);
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
- if (resolvedFileName && !compilerOptions.allowJs && ts.fileExtensionIs(resolvedFileName, ".js")) {
- return {
- resolvedFileName: undefined,
- failedLookupLocations: []
- };
- }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -70157,7 +78428,7 @@ var ts;
this._shims.push(shim);
};
TypeScriptServicesFactory.prototype.unregisterShim = function (shim) {
- for (var i = 0, n = this._shims.length; i < n; i++) {
+ for (var i = 0; i < this._shims.length; i++) {
if (this._shims[i] === shim) {
delete this._shims[i];
return;
@@ -70179,4 +78450,4 @@ var TypeScript;
Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
})(Services = TypeScript.Services || (TypeScript.Services = {}));
})(TypeScript || (TypeScript = {}));
-var toolsVersion = "2.2";
+var toolsVersion = "2.3";
diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts
index cec498e41..7e6fac11b 100644
--- a/node_modules/typescript/lib/typescript.d.ts
+++ b/node_modules/typescript/lib/typescript.d.ts
@@ -14,11 +14,36 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
interface MapLike<T> {
[index: string]: T;
}
- interface Map<T> extends MapLike<T> {
- __mapBrand: any;
+ /** ES6 Map interface. */
+ interface Map<T> {
+ get(key: string): T;
+ has(key: string): boolean;
+ set(key: string, value: T): this;
+ delete(key: string): boolean;
+ clear(): void;
+ forEach(action: (value: T, key: string) => void): void;
+ readonly size: number;
+ keys(): Iterator<string>;
+ values(): Iterator<T>;
+ entries(): Iterator<[string, T]>;
+ }
+ /** ES6 Iterator type. */
+ interface Iterator<T> {
+ next(): {
+ value: T;
+ done: false;
+ } | {
+ value: never;
+ done: true;
+ };
}
type Path = string & {
__pathBrand: any;
@@ -170,171 +195,171 @@ declare namespace ts {
ReadonlyKeyword = 130,
RequireKeyword = 131,
NumberKeyword = 132,
- SetKeyword = 133,
- StringKeyword = 134,
- SymbolKeyword = 135,
- TypeKeyword = 136,
- UndefinedKeyword = 137,
- FromKeyword = 138,
- GlobalKeyword = 139,
- OfKeyword = 140,
- QualifiedName = 141,
- ComputedPropertyName = 142,
- TypeParameter = 143,
- Parameter = 144,
- Decorator = 145,
- PropertySignature = 146,
- PropertyDeclaration = 147,
- MethodSignature = 148,
- MethodDeclaration = 149,
- Constructor = 150,
- GetAccessor = 151,
- SetAccessor = 152,
- CallSignature = 153,
- ConstructSignature = 154,
- IndexSignature = 155,
- TypePredicate = 156,
- TypeReference = 157,
- FunctionType = 158,
- ConstructorType = 159,
- TypeQuery = 160,
- TypeLiteral = 161,
- ArrayType = 162,
- TupleType = 163,
- UnionType = 164,
- IntersectionType = 165,
- ParenthesizedType = 166,
- ThisType = 167,
- TypeOperator = 168,
- IndexedAccessType = 169,
- MappedType = 170,
- LiteralType = 171,
- ObjectBindingPattern = 172,
- ArrayBindingPattern = 173,
- BindingElement = 174,
- ArrayLiteralExpression = 175,
- ObjectLiteralExpression = 176,
- PropertyAccessExpression = 177,
- ElementAccessExpression = 178,
- CallExpression = 179,
- NewExpression = 180,
- TaggedTemplateExpression = 181,
- TypeAssertionExpression = 182,
- ParenthesizedExpression = 183,
- FunctionExpression = 184,
- ArrowFunction = 185,
- DeleteExpression = 186,
- TypeOfExpression = 187,
- VoidExpression = 188,
- AwaitExpression = 189,
- PrefixUnaryExpression = 190,
- PostfixUnaryExpression = 191,
- BinaryExpression = 192,
- ConditionalExpression = 193,
- TemplateExpression = 194,
- YieldExpression = 195,
- SpreadElement = 196,
- ClassExpression = 197,
- OmittedExpression = 198,
- ExpressionWithTypeArguments = 199,
- AsExpression = 200,
- NonNullExpression = 201,
- TemplateSpan = 202,
- SemicolonClassElement = 203,
- Block = 204,
- VariableStatement = 205,
- EmptyStatement = 206,
- ExpressionStatement = 207,
- IfStatement = 208,
- DoStatement = 209,
- WhileStatement = 210,
- ForStatement = 211,
- ForInStatement = 212,
- ForOfStatement = 213,
- ContinueStatement = 214,
- BreakStatement = 215,
- ReturnStatement = 216,
- WithStatement = 217,
- SwitchStatement = 218,
- LabeledStatement = 219,
- ThrowStatement = 220,
- TryStatement = 221,
- DebuggerStatement = 222,
- VariableDeclaration = 223,
- VariableDeclarationList = 224,
- FunctionDeclaration = 225,
- ClassDeclaration = 226,
- InterfaceDeclaration = 227,
- TypeAliasDeclaration = 228,
- EnumDeclaration = 229,
- ModuleDeclaration = 230,
- ModuleBlock = 231,
- CaseBlock = 232,
- NamespaceExportDeclaration = 233,
- ImportEqualsDeclaration = 234,
- ImportDeclaration = 235,
- ImportClause = 236,
- NamespaceImport = 237,
- NamedImports = 238,
- ImportSpecifier = 239,
- ExportAssignment = 240,
- ExportDeclaration = 241,
- NamedExports = 242,
- ExportSpecifier = 243,
- MissingDeclaration = 244,
- ExternalModuleReference = 245,
- JsxElement = 246,
- JsxSelfClosingElement = 247,
- JsxOpeningElement = 248,
- JsxClosingElement = 249,
- JsxAttribute = 250,
- JsxSpreadAttribute = 251,
- JsxExpression = 252,
- CaseClause = 253,
- DefaultClause = 254,
- HeritageClause = 255,
- CatchClause = 256,
- PropertyAssignment = 257,
- ShorthandPropertyAssignment = 258,
- SpreadAssignment = 259,
- EnumMember = 260,
- SourceFile = 261,
- JSDocTypeExpression = 262,
- JSDocAllType = 263,
- JSDocUnknownType = 264,
- JSDocArrayType = 265,
- JSDocUnionType = 266,
- JSDocTupleType = 267,
- JSDocNullableType = 268,
- JSDocNonNullableType = 269,
- JSDocRecordType = 270,
- JSDocRecordMember = 271,
- JSDocTypeReference = 272,
- JSDocOptionalType = 273,
- JSDocFunctionType = 274,
- JSDocVariadicType = 275,
- JSDocConstructorType = 276,
- JSDocThisType = 277,
- JSDocComment = 278,
- JSDocTag = 279,
- JSDocAugmentsTag = 280,
- JSDocParameterTag = 281,
- JSDocReturnTag = 282,
- JSDocTypeTag = 283,
- JSDocTemplateTag = 284,
- JSDocTypedefTag = 285,
- JSDocPropertyTag = 286,
- JSDocTypeLiteral = 287,
- JSDocLiteralType = 288,
- JSDocNullKeyword = 289,
- JSDocUndefinedKeyword = 290,
- JSDocNeverKeyword = 291,
- SyntaxList = 292,
- NotEmittedStatement = 293,
- PartiallyEmittedExpression = 294,
- MergeDeclarationMarker = 295,
- EndOfDeclarationMarker = 296,
- RawExpression = 297,
+ ObjectKeyword = 133,
+ SetKeyword = 134,
+ StringKeyword = 135,
+ SymbolKeyword = 136,
+ TypeKeyword = 137,
+ UndefinedKeyword = 138,
+ FromKeyword = 139,
+ GlobalKeyword = 140,
+ OfKeyword = 141,
+ QualifiedName = 142,
+ ComputedPropertyName = 143,
+ TypeParameter = 144,
+ Parameter = 145,
+ Decorator = 146,
+ PropertySignature = 147,
+ PropertyDeclaration = 148,
+ MethodSignature = 149,
+ MethodDeclaration = 150,
+ Constructor = 151,
+ GetAccessor = 152,
+ SetAccessor = 153,
+ CallSignature = 154,
+ ConstructSignature = 155,
+ IndexSignature = 156,
+ TypePredicate = 157,
+ TypeReference = 158,
+ FunctionType = 159,
+ ConstructorType = 160,
+ TypeQuery = 161,
+ TypeLiteral = 162,
+ ArrayType = 163,
+ TupleType = 164,
+ UnionType = 165,
+ IntersectionType = 166,
+ ParenthesizedType = 167,
+ ThisType = 168,
+ TypeOperator = 169,
+ IndexedAccessType = 170,
+ MappedType = 171,
+ LiteralType = 172,
+ ObjectBindingPattern = 173,
+ ArrayBindingPattern = 174,
+ BindingElement = 175,
+ ArrayLiteralExpression = 176,
+ ObjectLiteralExpression = 177,
+ PropertyAccessExpression = 178,
+ ElementAccessExpression = 179,
+ CallExpression = 180,
+ NewExpression = 181,
+ TaggedTemplateExpression = 182,
+ TypeAssertionExpression = 183,
+ ParenthesizedExpression = 184,
+ FunctionExpression = 185,
+ ArrowFunction = 186,
+ DeleteExpression = 187,
+ TypeOfExpression = 188,
+ VoidExpression = 189,
+ AwaitExpression = 190,
+ PrefixUnaryExpression = 191,
+ PostfixUnaryExpression = 192,
+ BinaryExpression = 193,
+ ConditionalExpression = 194,
+ TemplateExpression = 195,
+ YieldExpression = 196,
+ SpreadElement = 197,
+ ClassExpression = 198,
+ OmittedExpression = 199,
+ ExpressionWithTypeArguments = 200,
+ AsExpression = 201,
+ NonNullExpression = 202,
+ MetaProperty = 203,
+ TemplateSpan = 204,
+ SemicolonClassElement = 205,
+ Block = 206,
+ VariableStatement = 207,
+ EmptyStatement = 208,
+ ExpressionStatement = 209,
+ IfStatement = 210,
+ DoStatement = 211,
+ WhileStatement = 212,
+ ForStatement = 213,
+ ForInStatement = 214,
+ ForOfStatement = 215,
+ ContinueStatement = 216,
+ BreakStatement = 217,
+ ReturnStatement = 218,
+ WithStatement = 219,
+ SwitchStatement = 220,
+ LabeledStatement = 221,
+ ThrowStatement = 222,
+ TryStatement = 223,
+ DebuggerStatement = 224,
+ VariableDeclaration = 225,
+ VariableDeclarationList = 226,
+ FunctionDeclaration = 227,
+ ClassDeclaration = 228,
+ InterfaceDeclaration = 229,
+ TypeAliasDeclaration = 230,
+ EnumDeclaration = 231,
+ ModuleDeclaration = 232,
+ ModuleBlock = 233,
+ CaseBlock = 234,
+ NamespaceExportDeclaration = 235,
+ ImportEqualsDeclaration = 236,
+ ImportDeclaration = 237,
+ ImportClause = 238,
+ NamespaceImport = 239,
+ NamedImports = 240,
+ ImportSpecifier = 241,
+ ExportAssignment = 242,
+ ExportDeclaration = 243,
+ NamedExports = 244,
+ ExportSpecifier = 245,
+ MissingDeclaration = 246,
+ ExternalModuleReference = 247,
+ JsxElement = 248,
+ JsxSelfClosingElement = 249,
+ JsxOpeningElement = 250,
+ JsxClosingElement = 251,
+ JsxAttribute = 252,
+ JsxAttributes = 253,
+ JsxSpreadAttribute = 254,
+ JsxExpression = 255,
+ CaseClause = 256,
+ DefaultClause = 257,
+ HeritageClause = 258,
+ CatchClause = 259,
+ PropertyAssignment = 260,
+ ShorthandPropertyAssignment = 261,
+ SpreadAssignment = 262,
+ EnumMember = 263,
+ SourceFile = 264,
+ Bundle = 265,
+ JSDocTypeExpression = 266,
+ JSDocAllType = 267,
+ JSDocUnknownType = 268,
+ JSDocArrayType = 269,
+ JSDocUnionType = 270,
+ JSDocTupleType = 271,
+ JSDocNullableType = 272,
+ JSDocNonNullableType = 273,
+ JSDocRecordType = 274,
+ JSDocRecordMember = 275,
+ JSDocTypeReference = 276,
+ JSDocOptionalType = 277,
+ JSDocFunctionType = 278,
+ JSDocVariadicType = 279,
+ JSDocConstructorType = 280,
+ JSDocThisType = 281,
+ JSDocComment = 282,
+ JSDocTag = 283,
+ JSDocAugmentsTag = 284,
+ JSDocParameterTag = 285,
+ JSDocReturnTag = 286,
+ JSDocTypeTag = 287,
+ JSDocTemplateTag = 288,
+ JSDocTypedefTag = 289,
+ JSDocPropertyTag = 290,
+ JSDocTypeLiteral = 291,
+ JSDocLiteralType = 292,
+ SyntaxList = 293,
+ NotEmittedStatement = 294,
+ PartiallyEmittedExpression = 295,
+ MergeDeclarationMarker = 296,
+ EndOfDeclarationMarker = 297,
Count = 298,
FirstAssignment = 57,
LastAssignment = 69,
@@ -343,15 +368,15 @@ declare namespace ts {
FirstReservedWord = 71,
LastReservedWord = 106,
FirstKeyword = 71,
- LastKeyword = 140,
+ LastKeyword = 141,
FirstFutureReservedWord = 107,
LastFutureReservedWord = 115,
- FirstTypeNode = 156,
- LastTypeNode = 171,
+ FirstTypeNode = 157,
+ LastTypeNode = 172,
FirstPunctuation = 16,
LastPunctuation = 69,
FirstToken = 0,
- LastToken = 140,
+ LastToken = 141,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
@@ -360,11 +385,11 @@ declare namespace ts {
LastTemplateToken = 15,
FirstBinaryOperator = 26,
LastBinaryOperator = 69,
- FirstNode = 141,
- FirstJSDocNode = 262,
- LastJSDocNode = 288,
- FirstJSDocTagNode = 278,
- LastJSDocTagNode = 291,
+ FirstNode = 142,
+ FirstJSDocNode = 266,
+ LastJSDocNode = 292,
+ FirstJSDocTagNode = 282,
+ LastJSDocTagNode = 292,
}
enum NodeFlags {
None = 0,
@@ -378,26 +403,20 @@ declare namespace ts {
HasImplicitReturn = 128,
HasExplicitReturn = 256,
GlobalAugmentation = 512,
- HasClassExtends = 1024,
- HasDecorators = 2048,
- HasParamDecorators = 4096,
- HasAsyncFunctions = 8192,
- HasSpreadAttribute = 16384,
- HasRestAttribute = 32768,
- DisallowInContext = 65536,
- YieldContext = 131072,
- DecoratorContext = 262144,
- AwaitContext = 524288,
- ThisNodeHasError = 1048576,
- JavaScriptFile = 2097152,
- ThisNodeOrAnySubNodesHasError = 4194304,
- HasAggregatedChildData = 8388608,
+ HasAsyncFunctions = 1024,
+ DisallowInContext = 2048,
+ YieldContext = 4096,
+ DecoratorContext = 8192,
+ AwaitContext = 16384,
+ ThisNodeHasError = 32768,
+ JavaScriptFile = 65536,
+ ThisNodeOrAnySubNodesHasError = 131072,
+ HasAggregatedChildData = 262144,
BlockScoped = 3,
ReachabilityCheckFlags = 384,
- EmitHelperFlags = 64512,
- ReachabilityAndEmitFlags = 64896,
- ContextFlags = 3080192,
- TypeExcludesFlags = 655360,
+ ReachabilityAndEmitFlags = 1408,
+ ContextFlags = 96256,
+ TypeExcludesFlags = 20480,
}
enum ModifierFlags {
None = 0,
@@ -449,6 +468,7 @@ declare namespace ts {
type EndOfFileToken = Token<SyntaxKind.EndOfFileToken>;
type AtToken = Token<SyntaxKind.AtToken>;
type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
+ type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
type ModifiersArray = NodeArray<Modifier>;
interface Identifier extends PrimaryExpression {
@@ -485,8 +505,10 @@ declare namespace ts {
}
interface TypeParameterDeclaration extends Declaration {
kind: SyntaxKind.TypeParameter;
+ parent?: DeclarationWithTypeParameters;
name: Identifier;
constraint?: TypeNode;
+ default?: TypeNode;
expression?: Expression;
}
interface SignatureDeclaration extends Declaration {
@@ -504,17 +526,19 @@ declare namespace ts {
type BindingName = Identifier | BindingPattern;
interface VariableDeclaration extends Declaration {
kind: SyntaxKind.VariableDeclaration;
- parent?: VariableDeclarationList;
+ parent?: VariableDeclarationList | CatchClause;
name: BindingName;
type?: TypeNode;
initializer?: Expression;
}
interface VariableDeclarationList extends Node {
kind: SyntaxKind.VariableDeclarationList;
+ parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
interface ParameterDeclaration extends Declaration {
kind: SyntaxKind.Parameter;
+ parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
questionToken?: QuestionToken;
@@ -523,6 +547,7 @@ declare namespace ts {
}
interface BindingElement extends Declaration {
kind: SyntaxKind.BindingElement;
+ parent?: BindingPattern;
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
@@ -546,7 +571,7 @@ declare namespace ts {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
- type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration | AccessorDeclaration | SpreadAssignment;
+ type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
interface PropertyAssignment extends ObjectLiteralElement {
kind: SyntaxKind.PropertyAssignment;
name: PropertyName;
@@ -577,10 +602,12 @@ declare namespace ts {
}
interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<BindingElement>;
}
interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<ArrayBindingElement>;
}
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
@@ -615,41 +642,45 @@ declare namespace ts {
}
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
kind: SyntaxKind.Constructor;
+ parent?: ClassDeclaration | ClassExpression;
body?: FunctionBody;
}
+ /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
interface SemicolonClassElement extends ClassElement {
kind: SyntaxKind.SemicolonClassElement;
+ parent?: ClassDeclaration | ClassExpression;
}
interface GetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.GetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
interface SetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.SetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
+ parent?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode;
}
interface TypeNode extends Node {
_typeNodeBrand: any;
}
interface KeywordTypeNode extends TypeNode {
- kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.VoidKeyword;
+ kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
- interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
- kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
- }
- interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
+ type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
+ interface FunctionTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.FunctionType;
}
- interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
+ interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
interface TypeReferenceNode extends TypeNode {
@@ -678,15 +709,14 @@ declare namespace ts {
kind: SyntaxKind.TupleType;
elementTypes: NodeArray<TypeNode>;
}
- interface UnionOrIntersectionTypeNode extends TypeNode {
- kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType;
- types: NodeArray<TypeNode>;
- }
- interface UnionTypeNode extends UnionOrIntersectionTypeNode {
+ type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+ interface UnionTypeNode extends TypeNode {
kind: SyntaxKind.UnionType;
+ types: NodeArray<TypeNode>;
}
- interface IntersectionTypeNode extends UnionOrIntersectionTypeNode {
+ interface IntersectionTypeNode extends TypeNode {
kind: SyntaxKind.IntersectionType;
+ types: NodeArray<TypeNode>;
}
interface ParenthesizedTypeNode extends TypeNode {
kind: SyntaxKind.ParenthesizedType;
@@ -704,6 +734,7 @@ declare namespace ts {
}
interface MappedTypeNode extends TypeNode, Declaration {
kind: SyntaxKind.MappedType;
+ parent?: TypeAliasDeclaration;
readonlyToken?: ReadonlyToken;
typeParameter: TypeParameterDeclaration;
questionToken?: QuestionToken;
@@ -718,11 +749,14 @@ declare namespace ts {
}
interface Expression extends Node {
_expressionBrand: any;
- contextualType?: Type;
}
interface OmittedExpression extends Expression {
kind: SyntaxKind.OmittedExpression;
}
+ interface PartiallyEmittedExpression extends LeftHandSideExpression {
+ kind: SyntaxKind.PartiallyEmittedExpression;
+ expression: Expression;
+ }
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
@@ -750,13 +784,13 @@ declare namespace ts {
interface PrimaryExpression extends MemberExpression {
_primaryExpressionBrand: any;
}
- interface NullLiteral extends PrimaryExpression {
+ interface NullLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.NullKeyword;
}
- interface BooleanLiteral extends PrimaryExpression {
+ interface BooleanLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
}
- interface ThisExpression extends PrimaryExpression {
+ interface ThisExpression extends PrimaryExpression, KeywordTypeNode {
kind: SyntaxKind.ThisKeyword;
}
interface SuperExpression extends PrimaryExpression {
@@ -864,16 +898,18 @@ declare namespace ts {
}
interface NumericLiteral extends LiteralExpression {
kind: SyntaxKind.NumericLiteral;
- trailingComment?: string;
}
interface TemplateHead extends LiteralLikeNode {
kind: SyntaxKind.TemplateHead;
+ parent?: TemplateExpression;
}
interface TemplateMiddle extends LiteralLikeNode {
kind: SyntaxKind.TemplateMiddle;
+ parent?: TemplateSpan;
}
interface TemplateTail extends LiteralLikeNode {
kind: SyntaxKind.TemplateTail;
+ parent?: TemplateSpan;
}
type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
interface TemplateExpression extends PrimaryExpression {
@@ -883,6 +919,7 @@ declare namespace ts {
}
interface TemplateSpan extends Node {
kind: SyntaxKind.TemplateSpan;
+ parent?: TemplateExpression;
expression: Expression;
literal: TemplateMiddle | TemplateTail;
}
@@ -899,18 +936,18 @@ declare namespace ts {
expression: Expression;
}
/**
- * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
- * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
- * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
- * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
- **/
+ * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
+ * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
+ * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
+ * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
+ */
interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
properties: NodeArray<T>;
}
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
kind: SyntaxKind.ObjectLiteralExpression;
}
- type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+ type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
interface PropertyAccessExpression extends MemberExpression, Declaration {
kind: SyntaxKind.PropertyAccessExpression;
@@ -945,6 +982,7 @@ declare namespace ts {
}
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
+ parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
@@ -952,14 +990,14 @@ declare namespace ts {
kind: SyntaxKind.NewExpression;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
- arguments: NodeArray<Expression>;
+ arguments?: NodeArray<Expression>;
}
interface TaggedTemplateExpression extends MemberExpression {
kind: SyntaxKind.TaggedTemplateExpression;
tag: LeftHandSideExpression;
template: TemplateLiteral;
}
- type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
+ type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
interface AsExpression extends Expression {
kind: SyntaxKind.AsExpression;
expression: Expression;
@@ -975,49 +1013,67 @@ declare namespace ts {
kind: SyntaxKind.NonNullExpression;
expression: Expression;
}
+ interface MetaProperty extends PrimaryExpression {
+ kind: SyntaxKind.MetaProperty;
+ keywordToken: SyntaxKind;
+ name: Identifier;
+ }
interface JsxElement extends PrimaryExpression {
kind: SyntaxKind.JsxElement;
openingElement: JsxOpeningElement;
children: NodeArray<JsxChild>;
closingElement: JsxClosingElement;
}
+ type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
+ type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
type JsxTagNameExpression = PrimaryExpression | PropertyAccessExpression;
+ interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
+ parent?: JsxOpeningLikeElement;
+ }
interface JsxOpeningElement extends Expression {
kind: SyntaxKind.JsxOpeningElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
interface JsxSelfClosingElement extends PrimaryExpression {
kind: SyntaxKind.JsxSelfClosingElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
- type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
- type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
- interface JsxAttribute extends Node {
+ interface JsxAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxAttribute;
+ parent?: JsxAttributes;
name: Identifier;
initializer?: StringLiteral | JsxExpression;
}
- interface JsxSpreadAttribute extends Node {
+ interface JsxSpreadAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxSpreadAttribute;
+ parent?: JsxAttributes;
expression: Expression;
}
interface JsxClosingElement extends Node {
kind: SyntaxKind.JsxClosingElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
}
interface JsxExpression extends Expression {
kind: SyntaxKind.JsxExpression;
+ parent?: JsxElement | JsxAttributeLike;
+ dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
expression?: Expression;
}
interface JsxText extends Node {
kind: SyntaxKind.JsxText;
+ parent?: JsxElement;
}
type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
interface Statement extends Node {
_statementBrand: any;
}
+ interface NotEmittedStatement extends Statement {
+ kind: SyntaxKind.NotEmittedStatement;
+ }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1028,7 +1084,7 @@ declare namespace ts {
kind: SyntaxKind.MissingDeclaration;
name?: Identifier;
}
- type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
+ type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
interface Block extends Statement {
kind: SyntaxKind.Block;
statements: NodeArray<Statement>;
@@ -1072,6 +1128,7 @@ declare namespace ts {
}
interface ForOfStatement extends IterationStatement {
kind: SyntaxKind.ForOfStatement;
+ awaitModifier?: AwaitKeywordToken;
initializer: ForInitializer;
expression: Expression;
}
@@ -1101,15 +1158,18 @@ declare namespace ts {
}
interface CaseBlock extends Node {
kind: SyntaxKind.CaseBlock;
+ parent?: SwitchStatement;
clauses: NodeArray<CaseOrDefaultClause>;
}
interface CaseClause extends Node {
kind: SyntaxKind.CaseClause;
+ parent?: CaseBlock;
expression: Expression;
statements: NodeArray<Statement>;
}
interface DefaultClause extends Node {
kind: SyntaxKind.DefaultClause;
+ parent?: CaseBlock;
statements: NodeArray<Statement>;
}
type CaseOrDefaultClause = CaseClause | DefaultClause;
@@ -1130,6 +1190,7 @@ declare namespace ts {
}
interface CatchClause extends Node {
kind: SyntaxKind.CatchClause;
+ parent?: TryStatement;
variableDeclaration: VariableDeclaration;
block: Block;
}
@@ -1165,8 +1226,9 @@ declare namespace ts {
}
interface HeritageClause extends Node {
kind: SyntaxKind.HeritageClause;
- token: SyntaxKind;
- types?: NodeArray<ExpressionWithTypeArguments>;
+ parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression;
+ token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+ types: NodeArray<ExpressionWithTypeArguments>;
}
interface TypeAliasDeclaration extends DeclarationStatement {
kind: SyntaxKind.TypeAliasDeclaration;
@@ -1176,6 +1238,7 @@ declare namespace ts {
}
interface EnumMember extends Declaration {
kind: SyntaxKind.EnumMember;
+ parent?: EnumDeclaration;
name: PropertyName;
initializer?: Expression;
}
@@ -1184,91 +1247,121 @@ declare namespace ts {
name: Identifier;
members: NodeArray<EnumMember>;
}
- type ModuleBody = ModuleBlock | ModuleDeclaration;
type ModuleName = Identifier | StringLiteral;
+ type ModuleBody = NamespaceBody | JSDocNamespaceBody;
interface ModuleDeclaration extends DeclarationStatement {
kind: SyntaxKind.ModuleDeclaration;
- name: Identifier | StringLiteral;
- body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
+ parent?: ModuleBody | SourceFile;
+ name: ModuleName;
+ body?: ModuleBody | JSDocNamespaceDeclaration;
}
+ type NamespaceBody = ModuleBlock | NamespaceDeclaration;
interface NamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: ModuleBlock | NamespaceDeclaration;
+ body: NamespaceBody;
}
+ type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
interface JSDocNamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: JSDocNamespaceDeclaration | Identifier;
+ body: JSDocNamespaceBody;
}
interface ModuleBlock extends Node, Statement {
kind: SyntaxKind.ModuleBlock;
+ parent?: ModuleDeclaration;
statements: NodeArray<Statement>;
}
type ModuleReference = EntityName | ExternalModuleReference;
+ /**
+ * One of:
+ * - import x = require("mod");
+ * - import x = M.x;
+ */
interface ImportEqualsDeclaration extends DeclarationStatement {
kind: SyntaxKind.ImportEqualsDeclaration;
+ parent?: SourceFile | ModuleBlock;
name: Identifier;
moduleReference: ModuleReference;
}
interface ExternalModuleReference extends Node {
kind: SyntaxKind.ExternalModuleReference;
+ parent?: ImportEqualsDeclaration;
expression?: Expression;
}
interface ImportDeclaration extends Statement {
kind: SyntaxKind.ImportDeclaration;
+ parent?: SourceFile | ModuleBlock;
importClause?: ImportClause;
+ /** If this is not a StringLiteral it will be a grammar error. */
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
interface ImportClause extends Declaration {
kind: SyntaxKind.ImportClause;
+ parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
interface NamespaceImport extends Declaration {
kind: SyntaxKind.NamespaceImport;
+ parent?: ImportClause;
name: Identifier;
}
interface NamespaceExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.NamespaceExportDeclaration;
name: Identifier;
- moduleReference: LiteralLikeNode;
}
interface ExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.ExportDeclaration;
+ parent?: SourceFile | ModuleBlock;
exportClause?: NamedExports;
+ /** If this is not a StringLiteral it will be a grammar error. */
moduleSpecifier?: Expression;
}
interface NamedImports extends Node {
kind: SyntaxKind.NamedImports;
+ parent?: ImportClause;
elements: NodeArray<ImportSpecifier>;
}
interface NamedExports extends Node {
kind: SyntaxKind.NamedExports;
+ parent?: ExportDeclaration;
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
interface ImportSpecifier extends Declaration {
kind: SyntaxKind.ImportSpecifier;
+ parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
interface ExportSpecifier extends Declaration {
kind: SyntaxKind.ExportSpecifier;
+ parent?: NamedExports;
propertyName?: Identifier;
name: Identifier;
}
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
interface ExportAssignment extends DeclarationStatement {
kind: SyntaxKind.ExportAssignment;
+ parent?: SourceFile;
isExportEquals?: boolean;
expression: Expression;
}
interface FileReference extends TextRange {
fileName: string;
}
+ interface CheckJsDirective extends TextRange {
+ enabled: boolean;
+ }
+ type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
interface CommentRange extends TextRange {
hasTrailingNewLine?: boolean;
- kind: SyntaxKind;
+ kind: CommentKind;
+ }
+ interface SynthesizedComment extends CommentRange {
+ text: string;
+ pos: -1;
+ end: -1;
}
interface JSDocTypeExpression extends Node {
kind: SyntaxKind.JSDocTypeExpression;
@@ -1412,9 +1505,21 @@ declare namespace ts {
ArrayMutation = 256,
Referenced = 512,
Shared = 1024,
+ PreFinally = 2048,
+ AfterFinally = 4096,
Label = 12,
Condition = 96,
}
+ interface FlowLock {
+ locked?: boolean;
+ }
+ interface AfterFinallyFlow extends FlowNode, FlowLock {
+ antecedent: FlowNode;
+ }
+ interface PreFinallyFlow extends FlowNode {
+ antecedent: FlowNode;
+ lock: FlowLock;
+ }
interface FlowNode {
flags: FlowFlags;
id?: number;
@@ -1457,7 +1562,6 @@ declare namespace ts {
statements: NodeArray<Statement>;
endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
fileName: string;
- path: Path;
text: string;
amdDependencies: AmdDependency[];
moduleName: string;
@@ -1476,6 +1580,10 @@ declare namespace ts {
hasNoDefaultLib: boolean;
languageVersion: ScriptTarget;
}
+ interface Bundle extends Node {
+ kind: SyntaxKind.Bundle;
+ sourceFiles: SourceFile[];
+ }
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
getSourceFile(fileName: string): SourceFile;
@@ -1486,9 +1594,9 @@ declare namespace ts {
useCaseSensitiveFileNames: boolean;
readDirectory(rootDir: string, extensions: string[], excludes: string[], includes: string[]): string[];
/**
- * Gets a value indicating whether the specified path exists and is a file.
- * @param path The path to test.
- */
+ * Gets a value indicating whether the specified path exists and is a file.
+ * @param path The path to test.
+ */
fileExists(path: string): boolean;
readFile(path: string): string;
}
@@ -1521,7 +1629,7 @@ declare namespace ts {
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files.
*/
- emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean): EmitResult;
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
@@ -1532,6 +1640,12 @@ declare namespace ts {
*/
getTypeChecker(): TypeChecker;
}
+ interface CustomTransformers {
+ /** Custom transformers to evaluate before built-in transformations. */
+ before?: TransformerFactory<SourceFile>[];
+ /** Custom transformers to evaluate after built-in transformations. */
+ after?: TransformerFactory<SourceFile>[];
+ }
interface SourceMapSpan {
/** Line number in the .js file. */
emittedLine: number;
@@ -1575,11 +1689,20 @@ declare namespace ts {
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
getPropertiesOfType(type: Type): Symbol[];
getPropertyOfType(type: Type, propertyName: string): Symbol;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
- getBaseTypes(type: InterfaceType): ObjectType[];
+ getBaseTypes(type: InterfaceType): BaseType[];
+ getBaseTypeOfLiteralType(type: Type): Type;
+ getWidenedType(type: Type): Type;
getReturnTypeOfSignature(signature: Signature): Type;
getNonNullableType(type: Type): Type;
+ /** Note that the resulting nodes cannot be checked. */
+ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode;
+ /** Note that the resulting nodes cannot be checked. */
+ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration;
+ /** Note that the resulting nodes cannot be checked. */
+ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
@@ -1587,6 +1710,8 @@ declare namespace ts {
getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
getTypeAtLocation(node: Node): Type;
+ getTypeFromTypeNode(node: TypeNode): Type;
+ signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string;
getSymbolDisplayBuilder(): SymbolDisplayBuilder;
@@ -1602,18 +1727,30 @@ declare namespace ts {
isUnknownSymbol(symbol: Symbol): boolean;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
+ /** Follow all aliases to get the original symbol. */
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
+ getApparentType(type: Type): Type;
+ }
+ enum NodeBuilderFlags {
+ None = 0,
+ allowThisInObjectLiteral = 1,
+ allowQualifedNameInPlaceOfIdentifier = 2,
+ allowTypeParameterInQualifiedName = 4,
+ allowAnonymousIdentifier = 8,
+ allowEmptyUnionOrIntersection = 16,
+ allowEmptyTuple = 32,
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
+ buildIndexSignatureDisplay(info: IndexInfo, writer: SymbolWriter, kind: IndexKind, enclosingDeclaration?: Node, globalFlags?: TypeFormatFlags, symbolStack?: Symbol[]): void;
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@@ -1629,6 +1766,7 @@ declare namespace ts {
writeSpace(text: string): void;
writeStringLiteral(text: string): void;
writeParameter(text: string): void;
+ writeProperty(text: string): void;
writeSymbol(text: string, symbol: Symbol): void;
writeLine(): void;
increaseIndent(): void;
@@ -1636,6 +1774,7 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
+ reportIllegalExtends(): void;
}
enum TypeFormatFlags {
None = 0,
@@ -1650,6 +1789,8 @@ declare namespace ts {
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
+ SuppressAnyReturnType = 2048,
+ AddUndefined = 4096,
}
enum SymbolFormatFlags {
None = 0,
@@ -1699,13 +1840,10 @@ declare namespace ts {
ExportType = 2097152,
ExportNamespace = 4194304,
Alias = 8388608,
- Instantiated = 16777216,
- Merged = 33554432,
- Transient = 67108864,
- Prototype = 134217728,
- SyntheticProperty = 268435456,
- Optional = 536870912,
- ExportStar = 1073741824,
+ Prototype = 16777216,
+ ExportStar = 33554432,
+ Optional = 67108864,
+ Transient = 134217728,
Enum = 384,
Variable = 3,
Value = 107455,
@@ -1771,6 +1909,7 @@ declare namespace ts {
Intersection = 131072,
Index = 262144,
IndexedAccess = 524288,
+ NonPrimitive = 16777216,
Literal = 480,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
@@ -1780,9 +1919,10 @@ declare namespace ts {
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
- StructuredOrTypeParameter = 507904,
- Narrowable = 1033215,
- NotUnionOrUnit = 33281,
+ StructuredOrTypeVariable = 1032192,
+ TypeVariable = 540672,
+ Narrowable = 17810431,
+ NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
@@ -1798,7 +1938,7 @@ declare namespace ts {
regularType?: LiteralType;
}
interface EnumType extends Type {
- memberTypes: Map<EnumLiteralType>;
+ memberTypes: EnumLiteralType[];
}
interface EnumLiteralType extends LiteralType {
baseType: EnumType & UnionType;
@@ -1819,12 +1959,14 @@ declare namespace ts {
interface ObjectType extends Type {
objectFlags: ObjectFlags;
}
+ /** Class and interface types (TypeFlags.Class and TypeFlags.Interface). */
interface InterfaceType extends ObjectType {
typeParameters: TypeParameter[];
outerTypeParameters: TypeParameter[];
localTypeParameters: TypeParameter[];
thisType: TypeParameter;
}
+ type BaseType = ObjectType | IntersectionType;
interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
@@ -1832,6 +1974,16 @@ declare namespace ts {
declaredStringIndexInfo: IndexInfo;
declaredNumberIndexInfo: IndexInfo;
}
+ /**
+ * Type references (TypeFlags.Reference). When a class or interface has type parameters or
+ * a "this" type, references to the class or interface are made using type references. The
+ * typeArguments property specifies the types to substitute for the type parameters of the
+ * class or interface and optionally includes an extra element that specifies the type to
+ * substitute for "this" in the resulting instantiation. When no extra argument is present,
+ * the type reference itself is substituted for "this". The typeArguments property is undefined
+ * if the class or interface has no type parameters and the reference isn't specifying an
+ * explicit "this" argument.
+ */
interface TypeReference extends ObjectType {
target: GenericType;
typeArguments: Type[];
@@ -1850,15 +2002,19 @@ declare namespace ts {
elementType: Type;
finalArrayType?: Type;
}
- interface TypeParameter extends Type {
- constraint: Type;
+ interface TypeVariable extends Type {
}
- interface IndexType extends Type {
- type: TypeParameter;
+ interface TypeParameter extends TypeVariable {
+ constraint: Type;
+ default?: Type;
}
- interface IndexedAccessType extends Type {
+ interface IndexedAccessType extends TypeVariable {
objectType: Type;
indexType: Type;
+ constraint?: Type;
+ }
+ interface IndexType extends Type {
+ type: TypeVariable | UnionOrIntersectionType;
}
enum SignatureKind {
Call = 0,
@@ -1878,6 +2034,10 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
+ interface JsFileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ }
interface DiagnosticMessage {
key: string;
category: DiagnosticCategory;
@@ -1913,7 +2073,10 @@ declare namespace ts {
Classic = 1,
NodeJs = 2,
}
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]>;
+ interface PluginImport {
+ name: string;
+ }
+ type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[];
interface CompilerOptions {
allowJs?: boolean;
allowSyntheticDefaultImports?: boolean;
@@ -1922,9 +2085,11 @@ declare namespace ts {
alwaysStrict?: boolean;
baseUrl?: string;
charset?: string;
+ checkJs?: boolean;
declaration?: boolean;
declarationDir?: string;
disableSizeLimit?: boolean;
+ downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
experimentalDecorators?: boolean;
@@ -1969,6 +2134,7 @@ declare namespace ts {
skipDefaultLibCheck?: boolean;
sourceMap?: boolean;
sourceRoot?: string;
+ strict?: boolean;
strictNullChecks?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
@@ -2007,6 +2173,7 @@ declare namespace ts {
None = 0,
Preserve = 1,
React = 2,
+ ReactNative = 3,
}
enum NewLineKind {
CarriageReturnLineFeed = 0,
@@ -2022,6 +2189,7 @@ declare namespace ts {
JSX = 2,
TS = 3,
TSX = 4,
+ External = 5,
}
enum ScriptTarget {
ES3 = 0,
@@ -2102,7 +2270,6 @@ declare namespace ts {
}
interface ResolvedModuleWithFailedLookupLocations {
resolvedModule: ResolvedModuleFull | undefined;
- failedLookupLocations: string[];
}
interface ResolvedTypeReferenceDirective {
primary: boolean;
@@ -2131,6 +2298,206 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
+ enum EmitFlags {
+ SingleLine = 1,
+ AdviseOnEmitNode = 2,
+ NoSubstitution = 4,
+ CapturesThis = 8,
+ NoLeadingSourceMap = 16,
+ NoTrailingSourceMap = 32,
+ NoSourceMap = 48,
+ NoNestedSourceMaps = 64,
+ NoTokenLeadingSourceMaps = 128,
+ NoTokenTrailingSourceMaps = 256,
+ NoTokenSourceMaps = 384,
+ NoLeadingComments = 512,
+ NoTrailingComments = 1024,
+ NoComments = 1536,
+ NoNestedComments = 2048,
+ HelperName = 4096,
+ ExportName = 8192,
+ LocalName = 16384,
+ Indented = 32768,
+ NoIndentation = 65536,
+ AsyncFunctionBody = 131072,
+ ReuseTempVariableScope = 262144,
+ CustomPrologue = 524288,
+ NoHoisting = 1048576,
+ HasEndOfDeclarationMarker = 2097152,
+ Iterator = 4194304,
+ }
+ interface EmitHelper {
+ readonly name: string;
+ readonly scoped: boolean;
+ readonly text: string;
+ readonly priority?: number;
+ }
+ enum EmitHint {
+ SourceFile = 0,
+ Expression = 1,
+ IdentifierName = 2,
+ Unspecified = 3,
+ }
+ interface TransformationContext {
+ /** Gets the compiler options supplied to the transformer. */
+ getCompilerOptions(): CompilerOptions;
+ /** Starts a new lexical environment. */
+ startLexicalEnvironment(): void;
+ /** Suspends the current lexical environment, usually after visiting a parameter list. */
+ suspendLexicalEnvironment(): void;
+ /** Resumes a suspended lexical environment, usually before visiting a function body. */
+ resumeLexicalEnvironment(): void;
+ /** Ends a lexical environment, returning any declarations. */
+ endLexicalEnvironment(): Statement[];
+ /** Hoists a function declaration to the containing scope. */
+ hoistFunctionDeclaration(node: FunctionDeclaration): void;
+ /** Hoists a variable declaration to the containing scope. */
+ hoistVariableDeclaration(node: Identifier): void;
+ /** Records a request for a non-scoped emit helper in the current context. */
+ requestEmitHelper(helper: EmitHelper): void;
+ /** Gets and resets the requested non-scoped emit helpers. */
+ readEmitHelpers(): EmitHelper[] | undefined;
+ /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
+ enableSubstitution(kind: SyntaxKind): void;
+ /** Determines whether expression substitutions are enabled for the provided node. */
+ isSubstitutionEnabled(node: Node): boolean;
+ /**
+ * Hook used by transformers to substitute expressions just before they
+ * are emitted by the pretty printer.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onSubstituteNode: (hint: EmitHint, node: Node) => Node;
+ /**
+ * Enables before/after emit notifications in the pretty printer for the provided
+ * SyntaxKind.
+ */
+ enableEmitNotification(kind: SyntaxKind): void;
+ /**
+ * Determines whether before/after emit notifications should be raised in the pretty
+ * printer when it emits a node.
+ */
+ isEmitNotificationEnabled(node: Node): boolean;
+ /**
+ * Hook used to allow transformers to capture state before or after
+ * the printer emits a node.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
+ }
+ interface TransformationResult<T extends Node> {
+ /** Gets the transformed source files. */
+ transformed: T[];
+ /** Gets diagnostics for the transformation. */
+ diagnostics?: Diagnostic[];
+ /**
+ * Gets a substitute for a node, if one is available; otherwise, returns the original node.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ substituteNode(hint: EmitHint, node: Node): Node;
+ /**
+ * Emits a node with possible notification.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * Clean up EmitNode entries on any parse-tree nodes.
+ */
+ dispose(): void;
+ }
+ /**
+ * A function that is used to initialize and return a `Transformer` callback, which in turn
+ * will be used to transform one or more nodes.
+ */
+ type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
+ /**
+ * A function that transforms a node.
+ */
+ type Transformer<T extends Node> = (node: T) => T;
+ /**
+ * A function that accepts and possibly transforms a node.
+ */
+ type Visitor = (node: Node) => VisitResult<Node>;
+ type VisitResult<T extends Node> = T | T[];
+ interface Printer {
+ /**
+ * Print a node and its subtree as-is, without any emit transformations.
+ * @param hint A value indicating the purpose of a node. This is primarily used to
+ * distinguish between an `Identifier` used in an expression position, versus an
+ * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
+ * should just pass `Unspecified`.
+ * @param node The node to print. The node and its subtree are printed as-is, without any
+ * emit transformations.
+ * @param sourceFile A source file that provides context for the node. The source text of
+ * the file is used to emit the original source content for literals and identifiers, while
+ * the identifiers of the source file are used when generating unique names to avoid
+ * collisions.
+ */
+ printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
+ /**
+ * Prints a source file as-is, without any emit transformations.
+ */
+ printFile(sourceFile: SourceFile): string;
+ /**
+ * Prints a bundle of source files as-is, without any emit transformations.
+ */
+ printBundle(bundle: Bundle): string;
+ }
+ interface PrintHandlers {
+ /**
+ * A hook used by the Printer when generating unique names to avoid collisions with
+ * globally defined names that exist outside of the current source file.
+ */
+ hasGlobalName?(name: string): boolean;
+ /**
+ * A hook used by the Printer to provide notifications prior to emitting a node. A
+ * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
+ * `node` values.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback that, when invoked, will emit the node.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * onEmitNode(hint, node, emitCallback) {
+ * // set up or track state prior to emitting the node...
+ * emitCallback(hint, node);
+ * // restore state after emitting the node...
+ * }
+ * });
+ * ```
+ */
+ onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * A hook used by the Printer to perform just-in-time substitution of a node. This is
+ * primarily used by node transformations that need to substitute one node for another,
+ * such as replacing `myExportedVar` with `exports.myExportedVar`.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * substituteNode(hint, node) {
+ * // perform substitution if necessary...
+ * return node;
+ * }
+ * });
+ * ```
+ */
+ substituteNode?(hint: EmitHint, node: Node): Node;
+ }
+ interface PrinterOptions {
+ removeComments?: boolean;
+ newLine?: NewLineKind;
+ }
interface TextSpan {
start: number;
length: number;
@@ -2145,8 +2512,10 @@ declare namespace ts {
}
declare namespace ts {
/** The version of the TypeScript compiler release */
- const version = "2.2.0-dev.20161127";
+ const version = "2.3.0-dev.20170419";
}
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
+declare function clearTimeout(handle: any): void;
declare namespace ts {
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
type DirectoryWatcherCallback = (fileName: string) => void;
@@ -2192,6 +2561,7 @@ declare namespace ts {
directoryName: string;
referenceCount: number;
}
+ function getNodeMajorVersion(): number;
let sys: System;
}
declare namespace ts {
@@ -2237,12 +2607,12 @@ declare namespace ts {
function isWhiteSpaceSingleLine(ch: number): boolean;
function isLineBreak(ch: number): boolean;
function couldStartTrivia(text: string, pos: number): boolean;
- function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function getLeadingCommentRanges(text: string, pos: number): CommentRange[];
- function getTrailingCommentRanges(text: string, pos: number): CommentRange[];
+ function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
/** Optionally, get the shebang */
function getShebang(text: string): string;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
@@ -2282,15 +2652,414 @@ declare namespace ts {
function getCombinedModifierFlags(node: Node): ModifierFlags;
function getCombinedNodeFlags(node: Node): NodeFlags;
/**
- * Checks to see if the locale is in the appropriate format,
- * and if it is, attempts to set the appropriate language.
- */
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
function validateLocaleAndSetLanguage(locale: string, sys: {
getExecutingFilePath(): string;
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}, errors?: Diagnostic[]): void;
+ function getOriginalNode(node: Node): Node;
+ function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node: Node): boolean;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode(node: Node): Node;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode<T extends Node>(node: Node, nodeTest?: (node: Node) => node is T): T;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeIdentifier(identifier: string): string;
+}
+declare namespace ts {
+ /**
+ * Make `elements` into a `NodeArray<T>`. If `elements` is `undefined`, returns an empty `NodeArray<T>`.
+ */
+ function createNodeArray<T extends Node>(elements?: T[], hasTrailingComma?: boolean): NodeArray<T>;
+ function createLiteral(value: string): StringLiteral;
+ function createLiteral(value: number): NumericLiteral;
+ function createLiteral(value: boolean): BooleanLiteral;
+ /** Create a string literal whose source text is read from a source node during emit. */
+ function createLiteral(sourceNode: StringLiteral | NumericLiteral | Identifier): StringLiteral;
+ function createLiteral(value: string | number | boolean): PrimaryExpression;
+ function createNumericLiteral(value: string): NumericLiteral;
+ function createIdentifier(text: string): Identifier;
+ /** Create a unique temporary variable. */
+ function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
+ /** Create a unique temporary variable for use in a loop. */
+ function createLoopVariable(): Identifier;
+ /** Create a unique name based on the supplied text. */
+ function createUniqueName(text: string): Identifier;
+ /** Create a unique name generated for a node. */
+ function getGeneratedNameForNode(node: Node): Identifier;
+ function createToken<TKind extends SyntaxKind>(token: TKind): Token<TKind>;
+ function createSuper(): SuperExpression;
+ function createThis(): ThisExpression & Token<SyntaxKind.ThisKeyword>;
+ function createNull(): NullLiteral & Token<SyntaxKind.NullKeyword>;
+ function createTrue(): BooleanLiteral & Token<SyntaxKind.TrueKeyword>;
+ function createFalse(): BooleanLiteral & Token<SyntaxKind.FalseKeyword>;
+ function createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
+ function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+ function createComputedPropertyName(expression: Expression): ComputedPropertyName;
+ function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
+ function createSignatureDeclaration(kind: SyntaxKind, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): SignatureDeclaration;
+ function createFunctionTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): FunctionTypeNode;
+ function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): FunctionTypeNode;
+ function createConstructorTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructorTypeNode;
+ function updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function createKeywordTypeNode(kind: KeywordTypeNode["kind"]): KeywordTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
+ function createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
+ function createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ function createTypePredicateNode(parameterName: Identifier | ThisTypeNode | string, type: TypeNode): TypePredicateNode;
+ function updateTypePredicateNode(node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode): TypePredicateNode;
+ function createTypeQueryNode(exprName: EntityName): TypeQueryNode;
+ function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
+ function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType, types: TypeNode[]): UnionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.IntersectionType, types: TypeNode[]): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node: UnionOrIntersectionTypeNode, types: NodeArray<TypeNode>): UnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members: TypeElement[]): TypeLiteralNode;
+ function updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
+ function createTupleTypeNode(elementTypes: TypeNode[]): TupleTypeNode;
+ function updateTypleTypeNode(node: TupleTypeNode, elementTypes: TypeNode[]): TupleTypeNode;
+ function createMappedTypeNode(readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
+ function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name: string | Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function createPropertySignature(name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createIndexSignatureDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function createParameter(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ function updateParameter(node: ParameterDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ function createDecorator(expression: Expression): Decorator;
+ function updateDecorator(node: Decorator, expression: Expression): Decorator;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function createMethodDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function updateMethod(node: MethodDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function createConstructor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function updateConstructor(node: ConstructorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function createGetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function updateGetAccessor(node: GetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function createSetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function updateSetAccessor(node: SetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
+ function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
+ function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
+ function updateArrayBindingPattern(node: ArrayBindingPattern, elements: ArrayBindingElement[]): ArrayBindingPattern;
+ function createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
+ function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
+ function createArrayLiteral(elements?: Expression[], multiLine?: boolean): ArrayLiteralExpression;
+ function updateArrayLiteral(node: ArrayLiteralExpression, elements: Expression[]): ArrayLiteralExpression;
+ function createObjectLiteral(properties?: ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
+ function updateObjectLiteral(node: ObjectLiteralExpression, properties: ObjectLiteralElementLike[]): ObjectLiteralExpression;
+ function createPropertyAccess(expression: Expression, name: string | Identifier): PropertyAccessExpression;
+ function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier): PropertyAccessExpression;
+ function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression;
+ function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
+ function createCall(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function updateCall(node: CallExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function createNew(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function updateNew(node: NewExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function createTaggedTemplate(tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+ function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+ function createParen(expression: Expression): ParenthesizedExpression;
+ function updateParen(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
+ function createFunctionExpression(modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function updateFunctionExpression(node: FunctionExpression, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function createArrowFunction(modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ function updateArrowFunction(node: ArrowFunction, modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
+ function createDelete(expression: Expression): DeleteExpression;
+ function updateDelete(node: DeleteExpression, expression: Expression): DeleteExpression;
+ function createTypeOf(expression: Expression): TypeOfExpression;
+ function updateTypeOf(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+ function createVoid(expression: Expression): VoidExpression;
+ function updateVoid(node: VoidExpression, expression: Expression): VoidExpression;
+ function createAwait(expression: Expression): AwaitExpression;
+ function updateAwait(node: AwaitExpression, expression: Expression): AwaitExpression;
+ function createPrefix(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
+ function updatePrefix(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
+ function createPostfix(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
+ function updatePostfix(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
+ function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
+ function updateBinary(node: BinaryExpression, left: Expression, right: Expression): BinaryExpression;
+ function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+ function updateConditional(node: ConditionalExpression, condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createTemplateExpression(head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
+ function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
+ function createYield(expression?: Expression): YieldExpression;
+ function createYield(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
+ function updateYield(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ function createSpread(expression: Expression): SpreadElement;
+ function updateSpread(node: SpreadElement, expression: Expression): SpreadElement;
+ function createClassExpression(modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function updateClassExpression(node: ClassExpression, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function createOmittedExpression(): OmittedExpression;
+ function createExpressionWithTypeArguments(typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
+ function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
+ function createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+ function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+ function createNonNullExpression(expression: Expression): NonNullExpression;
+ function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createBlock(statements: Statement[], multiLine?: boolean): Block;
+ function updateBlock(node: Block, statements: Statement[]): Block;
+ function createVariableStatement(modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList | VariableDeclaration[]): VariableStatement;
+ function updateVariableStatement(node: VariableStatement, modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createEmptyStatement(): EmptyStatement;
+ function createStatement(expression: Expression): ExpressionStatement;
+ function updateStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
+ function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+ function updateIf(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
+ function createDo(statement: Statement, expression: Expression): DoStatement;
+ function updateDo(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
+ function createWhile(expression: Expression, statement: Statement): WhileStatement;
+ function updateWhile(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
+ function createFor(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function updateFor(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function createForIn(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function updateForIn(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function createForOf(awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function updateForOf(node: ForOfStatement, awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function createContinue(label?: string | Identifier): ContinueStatement;
+ function updateContinue(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
+ function createBreak(label?: string | Identifier): BreakStatement;
+ function updateBreak(node: BreakStatement, label: Identifier | undefined): BreakStatement;
+ function createReturn(expression?: Expression): ReturnStatement;
+ function updateReturn(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
+ function createWith(expression: Expression, statement: Statement): WithStatement;
+ function updateWith(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
+ function createSwitch(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function updateSwitch(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function createLabel(label: string | Identifier, statement: Statement): LabeledStatement;
+ function updateLabel(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
+ function createThrow(expression: Expression): ThrowStatement;
+ function updateThrow(node: ThrowStatement, expression: Expression): ThrowStatement;
+ function createTry(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function updateTry(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function createFunctionDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function updateFunctionDeclaration(node: FunctionDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function createClassDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function updateClassDeclaration(node: ClassDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function createEnumDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, members: EnumMember[]): EnumDeclaration;
+ function updateEnumDeclaration(node: EnumDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, members: EnumMember[]): EnumDeclaration;
+ function createModuleDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ function updateModuleDeclaration(node: ModuleDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ function createModuleBlock(statements: Statement[]): ModuleBlock;
+ function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
+ function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
+ function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
+ function createImportEqualsDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function createImportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier?: Expression): ImportDeclaration;
+ function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression | undefined): ImportDeclaration;
+ function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings): ImportClause;
+ function createNamespaceImport(name: Identifier): NamespaceImport;
+ function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
+ function createNamedImports(elements: ImportSpecifier[]): NamedImports;
+ function updateNamedImports(node: NamedImports, elements: ImportSpecifier[]): NamedImports;
+ function createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function createExportAssignment(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, isExportEquals: boolean, expression: Expression): ExportAssignment;
+ function updateExportAssignment(node: ExportAssignment, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, expression: Expression): ExportAssignment;
+ function createExportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier?: Expression): ExportDeclaration;
+ function updateExportDeclaration(node: ExportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier: Expression | undefined): ExportDeclaration;
+ function createNamedExports(elements: ExportSpecifier[]): NamedExports;
+ function updateNamedExports(node: NamedExports, elements: ExportSpecifier[]): NamedExports;
+ function createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
+ function updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
+ function createExternalModuleReference(expression: Expression): ExternalModuleReference;
+ function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+ function createJsxElement(openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function createJsxSelfClosingElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function createJsxOpeningElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
+ function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
+ function createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(jsxAttributes: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
+ function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+ function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
+ function createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
+ function updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
+ function createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
+ function createCaseClause(expression: Expression, statements: Statement[]): CaseClause;
+ function updateCaseClause(node: CaseClause, expression: Expression, statements: Statement[]): CaseClause;
+ function createDefaultClause(statements: Statement[]): DefaultClause;
+ function updateDefaultClause(node: DefaultClause, statements: Statement[]): DefaultClause;
+ function createCatchClause(variableDeclaration: string | VariableDeclaration, block: Block): CatchClause;
+ function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration, block: Block): CatchClause;
+ function createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
+ function updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
+ function createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+ function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
+ function createSpreadAssignment(expression: Expression): SpreadAssignment;
+ function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+ function createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
+ function updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
+ function updateSourceFileNode(node: SourceFile, statements: Statement[]): SourceFile;
+ /**
+ * Creates a shallow, memberwise clone of a node for mutation.
+ */
+ function getMutableClone<T extends Node>(node: T): T;
+ /**
+ * Creates a synthetic statement to act as a placeholder for a not-emitted statement in
+ * order to preserve comments.
+ *
+ * @param original The original statement.
+ */
+ function createNotEmittedStatement(original: Node): NotEmittedStatement;
+ /**
+ * Creates a synthetic expression to act as a placeholder for a not-emitted expression in
+ * order to preserve comments or sourcemap positions.
+ *
+ * @param expression The inner expression to emit.
+ * @param original The original outer expression.
+ * @param location The location for the expression. Defaults to the positions from "original" if provided.
+ */
+ function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
+ function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createBundle(sourceFiles: SourceFile[]): Bundle;
+ function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
+ function createComma(left: Expression, right: Expression): Expression;
+ function createLessThan(left: Expression, right: Expression): Expression;
+ function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
+ function createAssignment(left: Expression, right: Expression): BinaryExpression;
+ function createStrictEquality(left: Expression, right: Expression): BinaryExpression;
+ function createStrictInequality(left: Expression, right: Expression): BinaryExpression;
+ function createAdd(left: Expression, right: Expression): BinaryExpression;
+ function createSubtract(left: Expression, right: Expression): BinaryExpression;
+ function createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
+ function createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalOr(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalNot(operand: Expression): PrefixUnaryExpression;
+ function createVoidZero(): VoidExpression;
+ function createExportDefault(expression: Expression): ExportAssignment;
+ function createExternalModuleExport(exportName: Identifier): ExportDeclaration;
+ /**
+ * Clears any EmitNode entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile: SourceFile): void;
+ function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
+ /**
+ * Gets flags that control emit behavior of a node.
+ */
+ function getEmitFlags(node: Node): EmitFlags | undefined;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange<T extends Node>(node: T, range: TextRange | undefined): T;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange | undefined): T;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange<T extends Node>(node: T, range: TextRange): T;
+ function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ /**
+ * Gets the constant value to emit for an expression.
+ */
+ function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node: Node): EmitHelper[] | undefined;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
+ function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@@ -2301,6 +3070,10 @@ declare namespace ts {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare namespace ts {
+ /** Array that is only intended to be pushed to, never read. */
+ interface Push<T> {
+ push(value: T): void;
+ }
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
@@ -2313,17 +3086,120 @@ declare namespace ts {
*/
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
/**
- * Given a set of options, returns the set of type directive names
- * that should be included for this program automatically.
- * This list could either come from the config file,
- * or from enumerating the types root + initial secondary types lookup location.
- * More type directives might appear in the program later as a result of loading actual source files;
- * this list is only the set of defaults that are implicitly included.
- */
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
- function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
+ /**
+ * Cached module resolutions per containing directory.
+ * This assumes that any module id will have the same resolution for sibling files located in the same folder.
+ */
+ interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForDirectory(directoryName: string): Map<ResolvedModuleWithFailedLookupLocations>;
+ }
+ /**
+ * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
+ * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
+ */
+ interface NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string): PerModuleNameCache;
+ }
+ interface PerModuleNameCache {
+ get(directory: string): ResolvedModuleWithFailedLookupLocations;
+ set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
+ }
+ function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string): ModuleResolutionCache;
+ function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache): ResolvedModuleWithFailedLookupLocations;
+}
+declare namespace ts {
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): NodeArray<ParameterDeclaration>;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a concise body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
+}
+declare namespace ts {
+ function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
}
declare namespace ts {
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
@@ -2340,31 +3216,32 @@ declare namespace ts {
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
+ function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine;
/**
- * Read tsconfig.json file
- * @param fileName The path to the config file
- */
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
function readConfigFile(fileName: string, readFile: (path: string) => string): {
config?: any;
error?: Diagnostic;
};
/**
- * Parse the text of the tsconfig.json file
- * @param fileName The path to the config file
- * @param jsonText The text of the config file
- */
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
function parseConfigFileTextToJson(fileName: string, jsonText: string, stripComments?: boolean): {
config?: any;
error?: Diagnostic;
};
/**
- * Parse the contents of a config file (tsconfig.json).
- * @param json The contents of the config file to parse
- * @param host Instance of ParseConfigHost used to enumerate files in folder.
- * @param basePath A root directory to resolve relative path entries in the config
- * file to. e.g. outDir
- */
- function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[]): ParsedCommandLine;
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: JsFileExtensionInfo[]): ParsedCommandLine;
function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
@@ -2391,12 +3268,14 @@ declare namespace ts {
getText(sourceFile?: SourceFile): string;
getFirstToken(sourceFile?: SourceFile): Node;
getLastToken(sourceFile?: SourceFile): Node;
+ forEachChild<T>(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
@@ -2408,15 +3287,16 @@ declare namespace ts {
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
- getBaseTypes(): ObjectType[];
+ getBaseTypes(): BaseType[];
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): Type[];
+ getTypeParameters(): TypeParameter[];
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface SourceFile {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
@@ -2425,6 +3305,9 @@ declare namespace ts {
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
}
+ interface SourceFileLike {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
/**
* Represents an immutable snapshot of a script at a specified time.Once acquired, the
* snapshot is observably immutable. i.e. the same calls with the same parameters will return
@@ -2483,6 +3366,10 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
directoryExists?(directoryName: string): boolean;
getDirectories?(directoryName: string): string[];
+ /**
+ * Gets a set of custom transformers to use during emit.
+ */
+ getCustomTransformers?(): CustomTransformers | undefined;
}
interface LanguageService {
cleanupSemanticCache(): void;
@@ -2528,7 +3415,7 @@ declare namespace ts {
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
- getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[]): CodeAction[];
+ getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
dispose(): void;
@@ -2604,19 +3491,20 @@ declare namespace ts {
/** The position in newText the caret should point to after the insertion. */
caretOffset: number;
}
- interface RenameLocation {
+ interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
}
- interface ReferenceEntry {
- textSpan: TextSpan;
- fileName: string;
+ interface RenameLocation extends DocumentSpan {
+ }
+ interface ReferenceEntry extends DocumentSpan {
isWriteAccess: boolean;
isDefinition: boolean;
+ isInString?: true;
}
- interface ImplementationLocation {
- textSpan: TextSpan;
- fileName: string;
+ interface ImplementationLocation extends DocumentSpan {
+ kind: string;
+ displayParts: SymbolDisplayPart[];
}
interface DocumentHighlights {
fileName: string;
@@ -2630,6 +3518,7 @@ declare namespace ts {
}
interface HighlightSpan {
fileName?: string;
+ isInString?: true;
textSpan: TextSpan;
kind: string;
}
@@ -2669,6 +3558,7 @@ declare namespace ts {
InsertSpaceAfterCommaDelimiter: boolean;
InsertSpaceAfterSemicolonInForStatements: boolean;
InsertSpaceBeforeAndAfterBinaryOperators: boolean;
+ InsertSpaceAfterConstructor?: boolean;
InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
@@ -2677,6 +3567,7 @@ declare namespace ts {
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
InsertSpaceAfterTypeAssertion?: boolean;
+ InsertSpaceBeforeFunctionParenthesis?: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
}
@@ -2684,6 +3575,7 @@ declare namespace ts {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
@@ -2692,6 +3584,7 @@ declare namespace ts {
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
insertSpaceAfterTypeAssertion?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
@@ -2738,12 +3631,17 @@ declare namespace ts {
text: string;
kind: string;
}
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
interface QuickInfo {
kind: string;
kindModifiers: string;
textSpan: TextSpan;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface RenameInfo {
canRename: boolean;
@@ -2774,6 +3672,7 @@ declare namespace ts {
separatorDisplayParts: SymbolDisplayPart[];
parameters: SignatureHelpParameter[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
/**
* Represents a set of signature help items, and the preferred item that should be selected.
@@ -2800,10 +3699,10 @@ declare namespace ts {
kindModifiers: string;
sortText: string;
/**
- * An optional span that indicates the text to be replaced by this completion item. It will be
- * set if the required span differs from the one generated by the default replacement behavior and should
- * be used in that case
- */
+ * An optional span that indicates the text to be replaced by this completion item. It will be
+ * set if the required span differs from the one generated by the default replacement behavior and should
+ * be used in that case
+ */
replacementSpan?: TextSpan;
}
interface CompletionEntryDetails {
@@ -2812,6 +3711,7 @@ declare namespace ts {
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface OutliningSpan {
/** The span of the document to actually collapse. */
@@ -2821,9 +3721,9 @@ declare namespace ts {
/** The text to display in the editor for the collapsed region. */
bannerText: string;
/**
- * Whether or not this region should be automatically collapsed when
- * the 'Collapse to Definitions' command is invoked.
- */
+ * Whether or not this region should be automatically collapsed when
+ * the 'Collapse to Definitions' command is invoked.
+ */
autoCollapse: boolean;
}
interface EmitOutput {
@@ -2911,7 +3811,7 @@ declare namespace ts {
const typeElement = "type";
/** enum E */
const enumElement = "enum";
- const enumMemberElement = "const";
+ const enumMemberElement = "enum member";
/**
* Inside module and script only
* const v = ..
@@ -2954,6 +3854,10 @@ declare namespace ts {
const letElement = "let";
const directory = "directory";
const externalModuleName = "external module name";
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ */
+ const jsxAttribute = "JSX attribute";
}
namespace ScriptElementKindModifier {
const none = "";
@@ -3022,61 +3926,61 @@ declare namespace ts {
}
declare namespace ts {
/**
- * The document registry represents a store of SourceFile objects that can be shared between
- * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
- * of files in the context.
- * SourceFile objects account for most of the memory usage by the language service. Sharing
- * the same DocumentRegistry instance between different instances of LanguageService allow
- * for more efficient memory utilization since all projects will share at least the library
- * file (lib.d.ts).
- *
- * A more advanced use of the document registry is to serialize sourceFile objects to disk
- * and re-hydrate them when needed.
- *
- * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
- * to all subsequent createLanguageService calls.
- */
+ * The document registry represents a store of SourceFile objects that can be shared between
+ * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
+ * of files in the context.
+ * SourceFile objects account for most of the memory usage by the language service. Sharing
+ * the same DocumentRegistry instance between different instances of LanguageService allow
+ * for more efficient memory utilization since all projects will share at least the library
+ * file (lib.d.ts).
+ *
+ * A more advanced use of the document registry is to serialize sourceFile objects to disk
+ * and re-hydrate them when needed.
+ *
+ * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
+ * to all subsequent createLanguageService calls.
+ */
interface DocumentRegistry {
/**
- * Request a stored SourceFile with a given fileName and compilationSettings.
- * The first call to acquire will call createLanguageServiceSourceFile to generate
- * the SourceFile if was not found in the registry.
- *
- * @param fileName The name of the file requested
- * @param compilationSettings Some compilation settings like target affects the
- * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
- * multiple copies of the same file for different compilation settings.
- * @parm scriptSnapshot Text of the file. Only used if the file was not found
- * in the registry and a new one was created.
- * @parm version Current version of the file. Only used if the file was not found
- * in the registry and a new one was created.
- */
+ * Request a stored SourceFile with a given fileName and compilationSettings.
+ * The first call to acquire will call createLanguageServiceSourceFile to generate
+ * the SourceFile if was not found in the registry.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @parm scriptSnapshot Text of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ * @parm version Current version of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ */
acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
/**
- * Request an updated version of an already existing SourceFile with a given fileName
- * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
- * to get an updated SourceFile.
- *
- * @param fileName The name of the file requested
- * @param compilationSettings Some compilation settings like target affects the
- * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
- * multiple copies of the same file for different compilation settings.
- * @param scriptSnapshot Text of the file.
- * @param version Current version of the file.
- */
+ * Request an updated version of an already existing SourceFile with a given fileName
+ * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
+ * to get an updated SourceFile.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @param scriptSnapshot Text of the file.
+ * @param version Current version of the file.
+ */
updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
/**
- * Informs the DocumentRegistry that a file is not needed any longer.
- *
- * Note: It is not allowed to call release on a SourceFile that was not acquired from
- * this registry originally.
- *
- * @param fileName The name of the file to be released
- * @param compilationSettings The compilation settings used to acquire the file
- */
+ * Informs the DocumentRegistry that a file is not needed any longer.
+ *
+ * Note: It is not allowed to call release on a SourceFile that was not acquired from
+ * this registry originally.
+ *
+ * @param fileName The name of the file to be released
+ * @param compilationSettings The compilation settings used to acquire the file
+ */
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
reportStats(): string;
@@ -3120,11 +4024,20 @@ declare namespace ts {
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
/**
- * Get the path of the default library files (lib.d.ts) as distributed with the typescript
- * node package.
- * The functionality is not supported if the ts module is consumed outside of a node module.
- */
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
function getDefaultLibFilePath(options: CompilerOptions): string;
}
+declare namespace ts {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
+}
export = ts; \ No newline at end of file
diff --git a/node_modules/typescript/lib/typescript.js b/node_modules/typescript/lib/typescript.js
index d4ad545cf..ad7cbabef 100644
--- a/node_modules/typescript/lib/typescript.js
+++ b/node_modules/typescript/lib/typescript.js
@@ -13,11 +13,24 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+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;
};
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
var ts;
(function (ts) {
// token > SyntaxKind.Identifer => token is a keyword
@@ -168,191 +181,191 @@ var ts;
SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword";
SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword";
SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword";
- SyntaxKind[SyntaxKind["SetKeyword"] = 133] = "SetKeyword";
- SyntaxKind[SyntaxKind["StringKeyword"] = 134] = "StringKeyword";
- SyntaxKind[SyntaxKind["SymbolKeyword"] = 135] = "SymbolKeyword";
- SyntaxKind[SyntaxKind["TypeKeyword"] = 136] = "TypeKeyword";
- SyntaxKind[SyntaxKind["UndefinedKeyword"] = 137] = "UndefinedKeyword";
- SyntaxKind[SyntaxKind["FromKeyword"] = 138] = "FromKeyword";
- SyntaxKind[SyntaxKind["GlobalKeyword"] = 139] = "GlobalKeyword";
- SyntaxKind[SyntaxKind["OfKeyword"] = 140] = "OfKeyword";
+ SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword";
+ SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword";
+ SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword";
+ SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword";
+ SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword";
+ SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword";
+ SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword";
+ SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword";
+ SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword";
// Parse tree nodes
// Names
- SyntaxKind[SyntaxKind["QualifiedName"] = 141] = "QualifiedName";
- SyntaxKind[SyntaxKind["ComputedPropertyName"] = 142] = "ComputedPropertyName";
+ SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName";
+ SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName";
// Signature elements
- SyntaxKind[SyntaxKind["TypeParameter"] = 143] = "TypeParameter";
- SyntaxKind[SyntaxKind["Parameter"] = 144] = "Parameter";
- SyntaxKind[SyntaxKind["Decorator"] = 145] = "Decorator";
+ SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter";
+ SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter";
+ SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator";
// TypeMember
- SyntaxKind[SyntaxKind["PropertySignature"] = 146] = "PropertySignature";
- SyntaxKind[SyntaxKind["PropertyDeclaration"] = 147] = "PropertyDeclaration";
- SyntaxKind[SyntaxKind["MethodSignature"] = 148] = "MethodSignature";
- SyntaxKind[SyntaxKind["MethodDeclaration"] = 149] = "MethodDeclaration";
- SyntaxKind[SyntaxKind["Constructor"] = 150] = "Constructor";
- SyntaxKind[SyntaxKind["GetAccessor"] = 151] = "GetAccessor";
- SyntaxKind[SyntaxKind["SetAccessor"] = 152] = "SetAccessor";
- SyntaxKind[SyntaxKind["CallSignature"] = 153] = "CallSignature";
- SyntaxKind[SyntaxKind["ConstructSignature"] = 154] = "ConstructSignature";
- SyntaxKind[SyntaxKind["IndexSignature"] = 155] = "IndexSignature";
+ SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature";
+ SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration";
+ SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature";
+ SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration";
+ SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor";
+ SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor";
+ SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor";
+ SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature";
+ SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature";
+ SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature";
// Type
- SyntaxKind[SyntaxKind["TypePredicate"] = 156] = "TypePredicate";
- SyntaxKind[SyntaxKind["TypeReference"] = 157] = "TypeReference";
- SyntaxKind[SyntaxKind["FunctionType"] = 158] = "FunctionType";
- SyntaxKind[SyntaxKind["ConstructorType"] = 159] = "ConstructorType";
- SyntaxKind[SyntaxKind["TypeQuery"] = 160] = "TypeQuery";
- SyntaxKind[SyntaxKind["TypeLiteral"] = 161] = "TypeLiteral";
- SyntaxKind[SyntaxKind["ArrayType"] = 162] = "ArrayType";
- SyntaxKind[SyntaxKind["TupleType"] = 163] = "TupleType";
- SyntaxKind[SyntaxKind["UnionType"] = 164] = "UnionType";
- SyntaxKind[SyntaxKind["IntersectionType"] = 165] = "IntersectionType";
- SyntaxKind[SyntaxKind["ParenthesizedType"] = 166] = "ParenthesizedType";
- SyntaxKind[SyntaxKind["ThisType"] = 167] = "ThisType";
- SyntaxKind[SyntaxKind["TypeOperator"] = 168] = "TypeOperator";
- SyntaxKind[SyntaxKind["IndexedAccessType"] = 169] = "IndexedAccessType";
- SyntaxKind[SyntaxKind["MappedType"] = 170] = "MappedType";
- SyntaxKind[SyntaxKind["LiteralType"] = 171] = "LiteralType";
+ SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate";
+ SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference";
+ SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType";
+ SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType";
+ SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery";
+ SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral";
+ SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType";
+ SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType";
+ SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType";
+ SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType";
+ SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType";
+ SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType";
+ SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator";
+ SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType";
+ SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType";
+ SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType";
// Binding patterns
- SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 172] = "ObjectBindingPattern";
- SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 173] = "ArrayBindingPattern";
- SyntaxKind[SyntaxKind["BindingElement"] = 174] = "BindingElement";
+ SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern";
+ SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern";
+ SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement";
// Expression
- SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 175] = "ArrayLiteralExpression";
- SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 176] = "ObjectLiteralExpression";
- SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 177] = "PropertyAccessExpression";
- SyntaxKind[SyntaxKind["ElementAccessExpression"] = 178] = "ElementAccessExpression";
- SyntaxKind[SyntaxKind["CallExpression"] = 179] = "CallExpression";
- SyntaxKind[SyntaxKind["NewExpression"] = 180] = "NewExpression";
- SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 181] = "TaggedTemplateExpression";
- SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 182] = "TypeAssertionExpression";
- SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 183] = "ParenthesizedExpression";
- SyntaxKind[SyntaxKind["FunctionExpression"] = 184] = "FunctionExpression";
- SyntaxKind[SyntaxKind["ArrowFunction"] = 185] = "ArrowFunction";
- SyntaxKind[SyntaxKind["DeleteExpression"] = 186] = "DeleteExpression";
- SyntaxKind[SyntaxKind["TypeOfExpression"] = 187] = "TypeOfExpression";
- SyntaxKind[SyntaxKind["VoidExpression"] = 188] = "VoidExpression";
- SyntaxKind[SyntaxKind["AwaitExpression"] = 189] = "AwaitExpression";
- SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 190] = "PrefixUnaryExpression";
- SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 191] = "PostfixUnaryExpression";
- SyntaxKind[SyntaxKind["BinaryExpression"] = 192] = "BinaryExpression";
- SyntaxKind[SyntaxKind["ConditionalExpression"] = 193] = "ConditionalExpression";
- SyntaxKind[SyntaxKind["TemplateExpression"] = 194] = "TemplateExpression";
- SyntaxKind[SyntaxKind["YieldExpression"] = 195] = "YieldExpression";
- SyntaxKind[SyntaxKind["SpreadElement"] = 196] = "SpreadElement";
- SyntaxKind[SyntaxKind["ClassExpression"] = 197] = "ClassExpression";
- SyntaxKind[SyntaxKind["OmittedExpression"] = 198] = "OmittedExpression";
- SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 199] = "ExpressionWithTypeArguments";
- SyntaxKind[SyntaxKind["AsExpression"] = 200] = "AsExpression";
- SyntaxKind[SyntaxKind["NonNullExpression"] = 201] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression";
+ SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression";
+ SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression";
+ SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression";
+ SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression";
+ SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression";
+ SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression";
+ SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression";
+ SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression";
+ SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression";
+ SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction";
+ SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression";
+ SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression";
+ SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression";
+ SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression";
+ SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression";
+ SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression";
+ SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression";
+ SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression";
+ SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression";
+ SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression";
+ SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement";
+ SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression";
+ SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression";
+ SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments";
+ SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression";
+ SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty";
// Misc
- SyntaxKind[SyntaxKind["TemplateSpan"] = 202] = "TemplateSpan";
- SyntaxKind[SyntaxKind["SemicolonClassElement"] = 203] = "SemicolonClassElement";
+ SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan";
+ SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement";
// Element
- SyntaxKind[SyntaxKind["Block"] = 204] = "Block";
- SyntaxKind[SyntaxKind["VariableStatement"] = 205] = "VariableStatement";
- SyntaxKind[SyntaxKind["EmptyStatement"] = 206] = "EmptyStatement";
- SyntaxKind[SyntaxKind["ExpressionStatement"] = 207] = "ExpressionStatement";
- SyntaxKind[SyntaxKind["IfStatement"] = 208] = "IfStatement";
- SyntaxKind[SyntaxKind["DoStatement"] = 209] = "DoStatement";
- SyntaxKind[SyntaxKind["WhileStatement"] = 210] = "WhileStatement";
- SyntaxKind[SyntaxKind["ForStatement"] = 211] = "ForStatement";
- SyntaxKind[SyntaxKind["ForInStatement"] = 212] = "ForInStatement";
- SyntaxKind[SyntaxKind["ForOfStatement"] = 213] = "ForOfStatement";
- SyntaxKind[SyntaxKind["ContinueStatement"] = 214] = "ContinueStatement";
- SyntaxKind[SyntaxKind["BreakStatement"] = 215] = "BreakStatement";
- SyntaxKind[SyntaxKind["ReturnStatement"] = 216] = "ReturnStatement";
- SyntaxKind[SyntaxKind["WithStatement"] = 217] = "WithStatement";
- SyntaxKind[SyntaxKind["SwitchStatement"] = 218] = "SwitchStatement";
- SyntaxKind[SyntaxKind["LabeledStatement"] = 219] = "LabeledStatement";
- SyntaxKind[SyntaxKind["ThrowStatement"] = 220] = "ThrowStatement";
- SyntaxKind[SyntaxKind["TryStatement"] = 221] = "TryStatement";
- SyntaxKind[SyntaxKind["DebuggerStatement"] = 222] = "DebuggerStatement";
- SyntaxKind[SyntaxKind["VariableDeclaration"] = 223] = "VariableDeclaration";
- SyntaxKind[SyntaxKind["VariableDeclarationList"] = 224] = "VariableDeclarationList";
- SyntaxKind[SyntaxKind["FunctionDeclaration"] = 225] = "FunctionDeclaration";
- SyntaxKind[SyntaxKind["ClassDeclaration"] = 226] = "ClassDeclaration";
- SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 227] = "InterfaceDeclaration";
- SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 228] = "TypeAliasDeclaration";
- SyntaxKind[SyntaxKind["EnumDeclaration"] = 229] = "EnumDeclaration";
- SyntaxKind[SyntaxKind["ModuleDeclaration"] = 230] = "ModuleDeclaration";
- SyntaxKind[SyntaxKind["ModuleBlock"] = 231] = "ModuleBlock";
- SyntaxKind[SyntaxKind["CaseBlock"] = 232] = "CaseBlock";
- SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 233] = "NamespaceExportDeclaration";
- SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 234] = "ImportEqualsDeclaration";
- SyntaxKind[SyntaxKind["ImportDeclaration"] = 235] = "ImportDeclaration";
- SyntaxKind[SyntaxKind["ImportClause"] = 236] = "ImportClause";
- SyntaxKind[SyntaxKind["NamespaceImport"] = 237] = "NamespaceImport";
- SyntaxKind[SyntaxKind["NamedImports"] = 238] = "NamedImports";
- SyntaxKind[SyntaxKind["ImportSpecifier"] = 239] = "ImportSpecifier";
- SyntaxKind[SyntaxKind["ExportAssignment"] = 240] = "ExportAssignment";
- SyntaxKind[SyntaxKind["ExportDeclaration"] = 241] = "ExportDeclaration";
- SyntaxKind[SyntaxKind["NamedExports"] = 242] = "NamedExports";
- SyntaxKind[SyntaxKind["ExportSpecifier"] = 243] = "ExportSpecifier";
- SyntaxKind[SyntaxKind["MissingDeclaration"] = 244] = "MissingDeclaration";
+ SyntaxKind[SyntaxKind["Block"] = 206] = "Block";
+ SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement";
+ SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement";
+ SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement";
+ SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement";
+ SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement";
+ SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement";
+ SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement";
+ SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement";
+ SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement";
+ SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement";
+ SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement";
+ SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement";
+ SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement";
+ SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement";
+ SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement";
+ SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement";
+ SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement";
+ SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement";
+ SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration";
+ SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList";
+ SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration";
+ SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration";
+ SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration";
+ SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration";
+ SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration";
+ SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration";
+ SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock";
+ SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock";
+ SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration";
+ SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration";
+ SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration";
+ SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause";
+ SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport";
+ SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports";
+ SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier";
+ SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment";
+ SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration";
+ SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports";
+ SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier";
+ SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration";
// Module references
- SyntaxKind[SyntaxKind["ExternalModuleReference"] = 245] = "ExternalModuleReference";
+ SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference";
// JSX
- SyntaxKind[SyntaxKind["JsxElement"] = 246] = "JsxElement";
- SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 247] = "JsxSelfClosingElement";
- SyntaxKind[SyntaxKind["JsxOpeningElement"] = 248] = "JsxOpeningElement";
- SyntaxKind[SyntaxKind["JsxClosingElement"] = 249] = "JsxClosingElement";
- SyntaxKind[SyntaxKind["JsxAttribute"] = 250] = "JsxAttribute";
- SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 251] = "JsxSpreadAttribute";
- SyntaxKind[SyntaxKind["JsxExpression"] = 252] = "JsxExpression";
+ SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement";
+ SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement";
+ SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement";
+ SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement";
+ SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute";
+ SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes";
+ SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute";
+ SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression";
// Clauses
- SyntaxKind[SyntaxKind["CaseClause"] = 253] = "CaseClause";
- SyntaxKind[SyntaxKind["DefaultClause"] = 254] = "DefaultClause";
- SyntaxKind[SyntaxKind["HeritageClause"] = 255] = "HeritageClause";
- SyntaxKind[SyntaxKind["CatchClause"] = 256] = "CatchClause";
+ SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause";
+ SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause";
+ SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause";
+ SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause";
// Property assignments
- SyntaxKind[SyntaxKind["PropertyAssignment"] = 257] = "PropertyAssignment";
- SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 258] = "ShorthandPropertyAssignment";
- SyntaxKind[SyntaxKind["SpreadAssignment"] = 259] = "SpreadAssignment";
+ SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment";
+ SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment";
+ SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment";
// Enum
- SyntaxKind[SyntaxKind["EnumMember"] = 260] = "EnumMember";
+ SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember";
// Top-level nodes
- SyntaxKind[SyntaxKind["SourceFile"] = 261] = "SourceFile";
+ SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile";
+ SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle";
// JSDoc nodes
- SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 262] = "JSDocTypeExpression";
+ SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression";
// The * type
- SyntaxKind[SyntaxKind["JSDocAllType"] = 263] = "JSDocAllType";
+ SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType";
// The ? type
- SyntaxKind[SyntaxKind["JSDocUnknownType"] = 264] = "JSDocUnknownType";
- SyntaxKind[SyntaxKind["JSDocArrayType"] = 265] = "JSDocArrayType";
- SyntaxKind[SyntaxKind["JSDocUnionType"] = 266] = "JSDocUnionType";
- SyntaxKind[SyntaxKind["JSDocTupleType"] = 267] = "JSDocTupleType";
- SyntaxKind[SyntaxKind["JSDocNullableType"] = 268] = "JSDocNullableType";
- SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 269] = "JSDocNonNullableType";
- SyntaxKind[SyntaxKind["JSDocRecordType"] = 270] = "JSDocRecordType";
- SyntaxKind[SyntaxKind["JSDocRecordMember"] = 271] = "JSDocRecordMember";
- SyntaxKind[SyntaxKind["JSDocTypeReference"] = 272] = "JSDocTypeReference";
- SyntaxKind[SyntaxKind["JSDocOptionalType"] = 273] = "JSDocOptionalType";
- SyntaxKind[SyntaxKind["JSDocFunctionType"] = 274] = "JSDocFunctionType";
- SyntaxKind[SyntaxKind["JSDocVariadicType"] = 275] = "JSDocVariadicType";
- SyntaxKind[SyntaxKind["JSDocConstructorType"] = 276] = "JSDocConstructorType";
- SyntaxKind[SyntaxKind["JSDocThisType"] = 277] = "JSDocThisType";
- SyntaxKind[SyntaxKind["JSDocComment"] = 278] = "JSDocComment";
- SyntaxKind[SyntaxKind["JSDocTag"] = 279] = "JSDocTag";
- SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 280] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 281] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 282] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 283] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 284] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 285] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 286] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 287] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 288] = "JSDocLiteralType";
- SyntaxKind[SyntaxKind["JSDocNullKeyword"] = 289] = "JSDocNullKeyword";
- SyntaxKind[SyntaxKind["JSDocUndefinedKeyword"] = 290] = "JSDocUndefinedKeyword";
- SyntaxKind[SyntaxKind["JSDocNeverKeyword"] = 291] = "JSDocNeverKeyword";
+ SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType";
+ SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType";
+ SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType";
+ SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType";
+ SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType";
+ SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType";
+ SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType";
+ SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember";
+ SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference";
+ SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType";
+ SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType";
+ SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType";
+ SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType";
+ SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType";
+ SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment";
+ SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag";
+ SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType";
// Synthesized list
- SyntaxKind[SyntaxKind["SyntaxList"] = 292] = "SyntaxList";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList";
// Transformation nodes
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 293] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 294] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 295] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 296] = "EndOfDeclarationMarker";
- SyntaxKind[SyntaxKind["RawExpression"] = 297] = "RawExpression";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker";
// Enum value count
SyntaxKind[SyntaxKind["Count"] = 298] = "Count";
// Markers
@@ -363,15 +376,15 @@ var ts;
SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord";
SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord";
SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword";
- SyntaxKind[SyntaxKind["LastKeyword"] = 140] = "LastKeyword";
+ SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword";
SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord";
SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord";
- SyntaxKind[SyntaxKind["FirstTypeNode"] = 156] = "FirstTypeNode";
- SyntaxKind[SyntaxKind["LastTypeNode"] = 171] = "LastTypeNode";
+ SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode";
+ SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode";
SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation";
SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation";
SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
- SyntaxKind[SyntaxKind["LastToken"] = 140] = "LastToken";
+ SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken";
SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken";
SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
@@ -380,11 +393,11 @@ var ts;
SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken";
SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator";
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator";
- SyntaxKind[SyntaxKind["FirstNode"] = 141] = "FirstNode";
- SyntaxKind[SyntaxKind["FirstJSDocNode"] = 262] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 288] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 278] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 291] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode";
+ SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -399,28 +412,22 @@ var ts;
NodeFlags[NodeFlags["HasImplicitReturn"] = 128] = "HasImplicitReturn";
NodeFlags[NodeFlags["HasExplicitReturn"] = 256] = "HasExplicitReturn";
NodeFlags[NodeFlags["GlobalAugmentation"] = 512] = "GlobalAugmentation";
- NodeFlags[NodeFlags["HasClassExtends"] = 1024] = "HasClassExtends";
- NodeFlags[NodeFlags["HasDecorators"] = 2048] = "HasDecorators";
- NodeFlags[NodeFlags["HasParamDecorators"] = 4096] = "HasParamDecorators";
- NodeFlags[NodeFlags["HasAsyncFunctions"] = 8192] = "HasAsyncFunctions";
- NodeFlags[NodeFlags["HasSpreadAttribute"] = 16384] = "HasSpreadAttribute";
- NodeFlags[NodeFlags["HasRestAttribute"] = 32768] = "HasRestAttribute";
- NodeFlags[NodeFlags["DisallowInContext"] = 65536] = "DisallowInContext";
- NodeFlags[NodeFlags["YieldContext"] = 131072] = "YieldContext";
- NodeFlags[NodeFlags["DecoratorContext"] = 262144] = "DecoratorContext";
- NodeFlags[NodeFlags["AwaitContext"] = 524288] = "AwaitContext";
- NodeFlags[NodeFlags["ThisNodeHasError"] = 1048576] = "ThisNodeHasError";
- NodeFlags[NodeFlags["JavaScriptFile"] = 2097152] = "JavaScriptFile";
- NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 4194304] = "ThisNodeOrAnySubNodesHasError";
- NodeFlags[NodeFlags["HasAggregatedChildData"] = 8388608] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["HasAsyncFunctions"] = 1024] = "HasAsyncFunctions";
+ NodeFlags[NodeFlags["DisallowInContext"] = 2048] = "DisallowInContext";
+ NodeFlags[NodeFlags["YieldContext"] = 4096] = "YieldContext";
+ NodeFlags[NodeFlags["DecoratorContext"] = 8192] = "DecoratorContext";
+ NodeFlags[NodeFlags["AwaitContext"] = 16384] = "AwaitContext";
+ NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+ NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+ NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+ NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
- NodeFlags[NodeFlags["EmitHelperFlags"] = 64512] = "EmitHelperFlags";
- NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 64896] = "ReachabilityAndEmitFlags";
+ NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
// Parsing context flags
- NodeFlags[NodeFlags["ContextFlags"] = 3080192] = "ContextFlags";
+ NodeFlags[NodeFlags["ContextFlags"] = 96256] = "ContextFlags";
// Exclude these flags when parsing a Type
- NodeFlags[NodeFlags["TypeExcludesFlags"] = 655360] = "TypeExcludesFlags";
+ NodeFlags[NodeFlags["TypeExcludesFlags"] = 20480] = "TypeExcludesFlags";
})(NodeFlags = ts.NodeFlags || (ts.NodeFlags = {}));
var ModifierFlags;
(function (ModifierFlags) {
@@ -469,6 +476,17 @@ var ts;
GeneratedIdentifierKind[GeneratedIdentifierKind["Unique"] = 3] = "Unique";
GeneratedIdentifierKind[GeneratedIdentifierKind["Node"] = 4] = "Node";
})(GeneratedIdentifierKind = ts.GeneratedIdentifierKind || (ts.GeneratedIdentifierKind = {}));
+ /* @internal */
+ var NumericLiteralFlags;
+ (function (NumericLiteralFlags) {
+ NumericLiteralFlags[NumericLiteralFlags["None"] = 0] = "None";
+ NumericLiteralFlags[NumericLiteralFlags["Scientific"] = 2] = "Scientific";
+ NumericLiteralFlags[NumericLiteralFlags["Octal"] = 4] = "Octal";
+ NumericLiteralFlags[NumericLiteralFlags["HexSpecifier"] = 8] = "HexSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinarySpecifier"] = 16] = "BinarySpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["OctalSpecifier"] = 32] = "OctalSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinaryOrOctalSpecifier"] = 48] = "BinaryOrOctalSpecifier";
+ })(NumericLiteralFlags = ts.NumericLiteralFlags || (ts.NumericLiteralFlags = {}));
var FlowFlags;
(function (FlowFlags) {
FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable";
@@ -482,6 +500,8 @@ var ts;
FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation";
FlowFlags[FlowFlags["Referenced"] = 512] = "Referenced";
FlowFlags[FlowFlags["Shared"] = 1024] = "Shared";
+ FlowFlags[FlowFlags["PreFinally"] = 2048] = "PreFinally";
+ FlowFlags[FlowFlags["AfterFinally"] = 4096] = "AfterFinally";
FlowFlags[FlowFlags["Label"] = 12] = "Label";
FlowFlags[FlowFlags["Condition"] = 96] = "Condition";
})(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {}));
@@ -503,6 +523,16 @@ var ts;
// Diagnostics were produced and outputs were generated in spite of them.
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeFormatFlags;
(function (TypeFormatFlags) {
TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None";
@@ -517,6 +547,8 @@ var ts;
TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 2048] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 4096] = "AddUndefined";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -549,8 +581,7 @@ var ts;
TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
})(TypePredicateKind = ts.TypePredicateKind || (ts.TypePredicateKind = {}));
- /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator
- * metadata */
+ /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator metadata */
/* @internal */
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
@@ -598,13 +629,10 @@ var ts;
SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType";
SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace";
SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias";
- SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated";
- SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged";
- SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient";
- SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype";
- SymbolFlags[SymbolFlags["SyntheticProperty"] = 268435456] = "SyntheticProperty";
- SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional";
- SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar";
+ SymbolFlags[SymbolFlags["Prototype"] = 16777216] = "Prototype";
+ SymbolFlags[SymbolFlags["ExportStar"] = 33554432] = "ExportStar";
+ SymbolFlags[SymbolFlags["Optional"] = 67108864] = "Optional";
+ SymbolFlags[SymbolFlags["Transient"] = 134217728] = "Transient";
SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
SymbolFlags[SymbolFlags["Value"] = 107455] = "Value";
@@ -648,11 +676,27 @@ var ts;
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
/* @internal */
+ var CheckFlags;
+ (function (CheckFlags) {
+ CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
+ CheckFlags[CheckFlags["SyntheticProperty"] = 2] = "SyntheticProperty";
+ CheckFlags[CheckFlags["SyntheticMethod"] = 4] = "SyntheticMethod";
+ CheckFlags[CheckFlags["Readonly"] = 8] = "Readonly";
+ CheckFlags[CheckFlags["Partial"] = 16] = "Partial";
+ CheckFlags[CheckFlags["HasNonUniformType"] = 32] = "HasNonUniformType";
+ CheckFlags[CheckFlags["ContainsPublic"] = 64] = "ContainsPublic";
+ CheckFlags[CheckFlags["ContainsProtected"] = 128] = "ContainsProtected";
+ CheckFlags[CheckFlags["ContainsPrivate"] = 256] = "ContainsPrivate";
+ CheckFlags[CheckFlags["ContainsStatic"] = 512] = "ContainsStatic";
+ CheckFlags[CheckFlags["Synthetic"] = 6] = "Synthetic";
+ })(CheckFlags = ts.CheckFlags || (ts.CheckFlags = {}));
+ /* @internal */
var NodeCheckFlags;
(function (NodeCheckFlags) {
NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked";
NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis";
NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureNewTarget"] = 8] = "CaptureNewTarget";
NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance";
NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic";
NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked";
@@ -701,6 +745,9 @@ var ts;
TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral";
/* @internal */
TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType";
+ TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
+ /* @internal */
+ TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
/* @internal */
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
@@ -709,7 +756,7 @@ var ts;
TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy";
/* @internal */
- TypeFlags[TypeFlags["Intrinsic"] = 16015] = "Intrinsic";
+ TypeFlags[TypeFlags["Intrinsic"] = 16793231] = "Intrinsic";
/* @internal */
TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
@@ -718,11 +765,12 @@ var ts;
TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
TypeFlags[TypeFlags["StructuredType"] = 229376] = "StructuredType";
- TypeFlags[TypeFlags["StructuredOrTypeParameter"] = 507904] = "StructuredOrTypeParameter";
+ TypeFlags[TypeFlags["StructuredOrTypeVariable"] = 1032192] = "StructuredOrTypeVariable";
+ TypeFlags[TypeFlags["TypeVariable"] = 540672] = "TypeVariable";
// 'Narrowable' types are types where narrowing actually narrows.
// This *should* be every type other than null, undefined, void, and never
- TypeFlags[TypeFlags["Narrowable"] = 1033215] = "Narrowable";
- TypeFlags[TypeFlags["NotUnionOrUnit"] = 33281] = "NotUnionOrUnit";
+ TypeFlags[TypeFlags["Narrowable"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
/* @internal */
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
/* @internal */
@@ -764,6 +812,8 @@ var ts;
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["PrototypeProperty"] = 3] = "PrototypeProperty";
/// this.name = expr
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ThisProperty"] = 4] = "ThisProperty";
+ // F.name = expr
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["Property"] = 5] = "Property";
})(SpecialPropertyAssignmentKind = ts.SpecialPropertyAssignmentKind || (ts.SpecialPropertyAssignmentKind = {}));
var DiagnosticCategory;
(function (DiagnosticCategory) {
@@ -790,6 +840,7 @@ var ts;
JsxEmit[JsxEmit["None"] = 0] = "None";
JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
JsxEmit[JsxEmit["React"] = 2] = "React";
+ JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
})(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {}));
var NewLineKind;
(function (NewLineKind) {
@@ -803,6 +854,7 @@ var ts;
ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
ScriptKind[ScriptKind["TS"] = 3] = "TS";
ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+ ScriptKind[ScriptKind["External"] = 5] = "External";
})(ScriptKind = ts.ScriptKind || (ts.ScriptKind = {}));
var ScriptTarget;
(function (ScriptTarget) {
@@ -1037,7 +1089,6 @@ var ts;
TransformFlags[TransformFlags["TypeScriptClassSyntaxMask"] = 274432] = "TypeScriptClassSyntaxMask";
TransformFlags[TransformFlags["ES2015FunctionSyntaxMask"] = 163840] = "ES2015FunctionSyntaxMask";
})(TransformFlags = ts.TransformFlags || (ts.TransformFlags = {}));
- /* @internal */
var EmitFlags;
(function (EmitFlags) {
EmitFlags[EmitFlags["SingleLine"] = 1] = "SingleLine";
@@ -1065,15 +1116,45 @@ var ts;
EmitFlags[EmitFlags["CustomPrologue"] = 524288] = "CustomPrologue";
EmitFlags[EmitFlags["NoHoisting"] = 1048576] = "NoHoisting";
EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 2097152] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 4194304] = "Iterator";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
+ /**
+ * Used by the checker, this enum keeps track of external emit helpers that should be type
+ * checked.
+ */
/* @internal */
- var EmitContext;
- (function (EmitContext) {
- EmitContext[EmitContext["SourceFile"] = 0] = "SourceFile";
- EmitContext[EmitContext["Expression"] = 1] = "Expression";
- EmitContext[EmitContext["IdentifierName"] = 2] = "IdentifierName";
- EmitContext[EmitContext["Unspecified"] = 3] = "Unspecified";
- })(EmitContext = ts.EmitContext || (ts.EmitContext = {}));
+ var ExternalEmitHelpers;
+ (function (ExternalEmitHelpers) {
+ ExternalEmitHelpers[ExternalEmitHelpers["Extends"] = 1] = "Extends";
+ ExternalEmitHelpers[ExternalEmitHelpers["Assign"] = 2] = "Assign";
+ ExternalEmitHelpers[ExternalEmitHelpers["Rest"] = 4] = "Rest";
+ ExternalEmitHelpers[ExternalEmitHelpers["Decorate"] = 8] = "Decorate";
+ ExternalEmitHelpers[ExternalEmitHelpers["Metadata"] = 16] = "Metadata";
+ ExternalEmitHelpers[ExternalEmitHelpers["Param"] = 32] = "Param";
+ ExternalEmitHelpers[ExternalEmitHelpers["Awaiter"] = 64] = "Awaiter";
+ ExternalEmitHelpers[ExternalEmitHelpers["Generator"] = 128] = "Generator";
+ ExternalEmitHelpers[ExternalEmitHelpers["Values"] = 256] = "Values";
+ ExternalEmitHelpers[ExternalEmitHelpers["Read"] = 512] = "Read";
+ ExternalEmitHelpers[ExternalEmitHelpers["Spread"] = 1024] = "Spread";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 2048] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 4096] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 8192] = "AsyncValues";
+ // Helpers included by ES2015 for..of
+ ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
+ // Helpers included by ES2017 for..await..of
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ // Helpers included by ES2015 spread
+ ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
+ var EmitHint;
+ (function (EmitHint) {
+ EmitHint[EmitHint["SourceFile"] = 0] = "SourceFile";
+ EmitHint[EmitHint["Expression"] = 1] = "Expression";
+ EmitHint[EmitHint["IdentifierName"] = 2] = "IdentifierName";
+ EmitHint[EmitHint["Unspecified"] = 3] = "Unspecified";
+ })(EmitHint = ts.EmitHint || (ts.EmitHint = {}));
})(ts || (ts = {}));
/*@internal*/
var ts;
@@ -1101,8 +1182,8 @@ var ts;
*/
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
@@ -1118,9 +1199,9 @@ var ts;
*/
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
@@ -1130,7 +1211,7 @@ var ts;
* @param markName The name of the mark.
*/
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
/**
@@ -1139,7 +1220,7 @@ var ts;
* @param measureName The name of the measure whose durations should be accumulated.
*/
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
/**
@@ -1148,9 +1229,9 @@ var ts;
* @param cb The action to perform for each measure
*/
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
/** Enables (and resets) performance measurements for the compiler. */
@@ -1174,7 +1255,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
/* @internal */
(function (ts) {
@@ -1193,25 +1274,106 @@ var ts;
Ternary[Ternary["Maybe"] = 1] = "Maybe";
Ternary[Ternary["True"] = -1] = "True";
})(Ternary = ts.Ternary || (ts.Ternary = {}));
- var createObject = Object.create;
// More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times.
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null); // tslint:disable-line:no-null-keyword
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(/*locales*/ undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B".
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ /** Create a MapLike with good performance. */
+ function createDictionaryObject() {
+ var map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword
// Using 'delete' on an object causes V8 to put the object in dictionary mode.
// This disables creation of hidden classes, which are expensive when an object is
// constantly changing shape.
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ /** Create a new map. If a template object is provided, the map will copy entries from it. */
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
// Copies keys/values from template. Note that for..in will not throw if
// template is undefined, and instead will just exit the loop.
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ // Internet Explorer's Map doesn't support iteration, so don't use it.
+ // tslint:disable-next-line:no-in-operator
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ // Keep the class inside a function so it doesn't get compiled if it's not used.
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ // tslint:disable-next-line:no-in-operator
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -1224,33 +1386,28 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
// path should already be well-formed so it does not need to be normalized
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -1270,6 +1427,10 @@ var ts;
Comparison[Comparison["EqualTo"] = 0] = "EqualTo";
Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan";
})(Comparison = ts.Comparison || (ts.Comparison = {}));
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
/**
* Iterates through 'array' by index and performs the callback on each element of array until the callback
* returns a truthy value, then returns that value.
@@ -1277,7 +1438,7 @@ var ts;
*/
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -1287,6 +1448,26 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ /**
+ * Iterates through the parent chain of a node and performs the callback on each parent until the callback
+ * returns a truthy value, then returns that value.
+ * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit"
+ * At that point findAncestor returns undefined.
+ */
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -1301,7 +1482,7 @@ var ts;
*/
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -1312,7 +1493,7 @@ var ts;
ts.every = every;
/** Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. */
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -1321,12 +1502,22 @@ var ts;
return undefined;
}
ts.find = find;
+ /** Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. */
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
/**
* Returns the first truthy result of `callback`, or else fails.
* This is like `forEach`, but never returns undefined.
*/
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -1349,7 +1540,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -1359,7 +1550,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -1569,21 +1760,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -1901,9 +2089,6 @@ var ts;
/**
* Indicates whether a map-like contains an own property with the specified key.
*
- * NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
- * the 'in' operator.
- *
* @param map A map-like.
* @param key A property key.
*/
@@ -1914,9 +2099,6 @@ var ts;
/**
* Gets the value of an owned property in a map-like.
*
- * NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
- * an indexer.
- *
* @param map A map-like.
* @param key A property key.
*/
@@ -1941,56 +2123,61 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- /**
- * Enumerates the properties of a Map<T>, invoking a callback and returning the first truthy result.
- *
- * @param map A map for which properties should be enumerated.
- * @param callback A callback to invoke for each property.
- */
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- /**
- * Returns true if a Map<T> has some matching property.
- *
- * @param map A map whose properties should be tested.
- * @param predicate An optional callback used to test each property.
- */
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
- return false;
+ return result;
+ var _b;
}
- ts.someProperties = someProperties;
+ ts.convertToArray = convertToArray;
/**
- * Performs a shallow copy of the properties from a source Map<T> to a target MapLike<T>
- *
- * @param source A map from which properties should be copied.
- * @param target A map to which properties should be copied.
+ * Calls `callback` for each entry in the map, returning the first truthy result.
+ * Use `map.forEach` instead for normal iteration.
*/
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachEntry = forEachEntry;
+ /** `forEachEntry` for just keys. */
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ var _b;
}
- ts.appendProperty = appendProperty;
+ ts.forEachKey = forEachKey;
+ /** Copy entries from `source` to `target`. */
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
+ }
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -1998,52 +2185,15 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
/**
- * Reduce the properties of a map.
- *
- * NOTE: This is intended for use with Map<T> objects. For MapLike<T> objects, use
- * reduceOwnProperties instead as it offers better runtime safety.
- *
- * @param map The map to reduce
- * @param callback An aggregation function that is called for each entry in the map
- * @param initial The initial value for the reduction.
- */
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- /**
- * Reduce the properties defined on a map-like (but not from its prototype chain).
- *
- * NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
- * reduceProperties instead as it offers better performance.
- *
- * @param map The map-like to reduce
- * @param callback An aggregation function that is called for each entry in the map
- * @param initial The initial value for the reduction.
- */
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
- /**
* Performs a shallow equality comparison of the contents of two map-likes.
*
* @param left A map-like whose properties should be compared.
@@ -2073,23 +2223,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -2116,36 +2257,32 @@ var ts;
return result;
}
ts.extend = extend;
- /**
- * Adds the value to an array of values associated with the key, and returns the array.
- * Creates the array if it does not already exist.
- */
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- /**
- * Removes a value from an array of values associated with the key.
- * Does not preserve the order of those values.
- * Does nothing if `key` is not in `map`, or `value` is not in `map[key]`.
- */
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
/**
* Tests whether a value is an array.
*/
@@ -2226,6 +2363,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -2328,9 +2466,12 @@ var ts;
if (b === undefined)
return 1 /* GreaterThan */;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- // accent means a ≠ b, a ≠ á, a = A
- var result = a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" });
+ // Checking if "collator exists indicates that Intl is available.
+ // We still have to check if "collator.compare" is correct. If it is not, use "String.localeComapre"
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" }); // accent means a ≠ b, a ≠ á, a = A
return result < 0 ? -1 /* LessThan */ : result > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
}
a = a.toUpperCase();
@@ -2403,7 +2544,7 @@ var ts;
ts.normalizeSlashes = normalizeSlashes;
/**
* Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files")
- */
+ */
function getRootLength(path) {
if (path.charCodeAt(0) === 47 /* slash */) {
if (path.charCodeAt(1) !== 47 /* slash */)
@@ -2775,6 +2916,17 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
@@ -2785,31 +2937,10 @@ var ts;
* files or directories, does not match subdirectories that start with a . character
*/
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
/**
* An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension,
* and does not contain any glob characters itself.
@@ -2888,6 +3019,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -2900,34 +3032,50 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ // Associate an array of results with each include regex. This keeps results in order of the "include" order.
+ // If there are no "includes", then just put everything in results[0].
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
+ }
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
}
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -2952,7 +3100,7 @@ var ts;
}
// Sort the offsets array using either the literal or canonical path representations.
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
@@ -2961,7 +3109,7 @@ var ts;
// subpath of an existing base path
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -3010,8 +3158,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -3022,11 +3181,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -3044,14 +3203,13 @@ var ts;
(function (ExtensionPriority) {
ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles";
ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles";
- ExtensionPriority[ExtensionPriority["Limit"] = 5] = "Limit";
ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest";
ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest";
})(ExtensionPriority = ts.ExtensionPriority || (ts.ExtensionPriority = {}));
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
// If its not in the list of supported extensions, this is likely a
@@ -3062,27 +3220,27 @@ var ts;
/**
* Adjusts an extension priority to be the highest priority within the same range.
*/
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
return 0 /* TypeScriptFiles */;
}
- else if (extensionPriority < 5 /* Limit */) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2 /* DeclarationAndJavaScriptFiles */;
}
else {
- return 5 /* Limit */;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
/**
* Gets the next lowest extension priority for a given priority.
*/
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
return 2 /* DeclarationAndJavaScriptFiles */;
}
else {
- return 5 /* Limit */;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -3329,144 +3487,30 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2 /*text*/;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1 /*binary*/;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- // Load file and read the first two bytes into a string with no interpretation
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- // Position must be at 0 before encoding can be changed
- fileStream.Position = 0;
- // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- // ReadText method always strips byte order mark from resulting string
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- // Write characters in UTF-8 encoding
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM).
- // If not, start from position 0, as the BOM will be added automatically when charset==utf8.
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2 /*overwrite*/);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, /*useCaseSensitiveFileNames*/ false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
}
+ var version = process.version;
+ if (!version) {
+ return undefined;
+ }
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
+ }
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -3476,32 +3520,32 @@ var ts;
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
// One file can have multiple watchers
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -3513,7 +3557,7 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
// When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
@@ -3521,18 +3565,20 @@ var ts;
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
// Some applications save a working file via rename operations
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
// win32\win64 are case insensitive platforms
if (platform === "win32" || platform === "win64") {
@@ -3553,7 +3599,7 @@ var ts;
if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
// Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js,
// flip all byte pairs and treat as little endian.
- len &= ~1;
+ len &= ~1; // Round down to a multiple of 2
for (var i = 0; i < len; i += 2) {
var temp = buffer[i];
buffer[i] = buffer[i + 1];
@@ -3580,7 +3626,7 @@ var ts;
var fd;
try {
fd = _fs.openSync(fileName, "w");
- _fs.writeSync(fd, data, undefined, "utf8");
+ _fs.writeSync(fd, data, /*position*/ undefined, "utf8");
}
finally {
if (fd !== undefined) {
@@ -3600,10 +3646,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -3685,9 +3731,10 @@ var ts;
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
var options;
if (!directoryExists(directoryName)) {
+ // do nothing if target folder does not exist
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -3701,7 +3748,6 @@ var ts;
// When deleting a file, the passed baseFileName is null
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -3765,6 +3811,7 @@ var ts;
require("source-map-support").install();
}
catch (e) {
+ // Could not enable source maps.
}
},
setTimeout: setTimeout,
@@ -3820,9 +3867,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
// process and process.nextTick checks if current environment is node-like
// process.browser check excludes webpack and browserify
@@ -3897,11 +3941,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -3910,7 +3954,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -3926,6 +3970,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -3933,7 +3978,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -3965,9 +4010,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -4016,11 +4061,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -4066,6 +4112,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -4109,6 +4160,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -4119,19 +4171,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -4171,12 +4224,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -4185,19 +4238,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -4206,18 +4259,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -4238,13 +4293,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -4256,6 +4311,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -4270,6 +4326,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -4293,23 +4350,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -4341,7 +4408,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -4350,9 +4416,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -4363,8 +4437,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -4425,16 +4499,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -4443,12 +4519,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -4466,11 +4542,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -4485,11 +4561,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -4511,17 +4588,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -4532,23 +4610,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -4558,32 +4636,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -4601,7 +4714,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -4625,7 +4738,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -4633,28 +4746,40 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
})(ts || (ts = {}));
/// <reference path="core.ts"/>
@@ -4666,7 +4791,7 @@ var ts;
return token >= 70 /* Identifier */;
}
ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
+ var textToToken = ts.createMapFromTemplate({
"abstract": 116 /* AbstractKeyword */,
"any": 118 /* AnyKeyword */,
"as": 117 /* AsKeyword */,
@@ -4690,7 +4815,7 @@ var ts;
"false": 85 /* FalseKeyword */,
"finally": 86 /* FinallyKeyword */,
"for": 87 /* ForKeyword */,
- "from": 138 /* FromKeyword */,
+ "from": 139 /* FromKeyword */,
"function": 88 /* FunctionKeyword */,
"get": 124 /* GetKeyword */,
"if": 89 /* IfKeyword */,
@@ -4708,27 +4833,28 @@ var ts;
"new": 93 /* NewKeyword */,
"null": 94 /* NullKeyword */,
"number": 132 /* NumberKeyword */,
+ "object": 133 /* ObjectKeyword */,
"package": 110 /* PackageKeyword */,
"private": 111 /* PrivateKeyword */,
"protected": 112 /* ProtectedKeyword */,
"public": 113 /* PublicKeyword */,
"readonly": 130 /* ReadonlyKeyword */,
"require": 131 /* RequireKeyword */,
- "global": 139 /* GlobalKeyword */,
+ "global": 140 /* GlobalKeyword */,
"return": 95 /* ReturnKeyword */,
- "set": 133 /* SetKeyword */,
+ "set": 134 /* SetKeyword */,
"static": 114 /* StaticKeyword */,
- "string": 134 /* StringKeyword */,
+ "string": 135 /* StringKeyword */,
"super": 96 /* SuperKeyword */,
"switch": 97 /* SwitchKeyword */,
- "symbol": 135 /* SymbolKeyword */,
+ "symbol": 136 /* SymbolKeyword */,
"this": 98 /* ThisKeyword */,
"throw": 99 /* ThrowKeyword */,
"true": 100 /* TrueKeyword */,
"try": 101 /* TryKeyword */,
- "type": 136 /* TypeKeyword */,
+ "type": 137 /* TypeKeyword */,
"typeof": 102 /* TypeOfKeyword */,
- "undefined": 137 /* UndefinedKeyword */,
+ "undefined": 138 /* UndefinedKeyword */,
"var": 103 /* VarKeyword */,
"void": 104 /* VoidKeyword */,
"while": 105 /* WhileKeyword */,
@@ -4736,7 +4862,7 @@ var ts;
"yield": 115 /* YieldKeyword */,
"async": 119 /* AsyncKeyword */,
"await": 120 /* AwaitKeyword */,
- "of": 140 /* OfKeyword */,
+ "of": 141 /* OfKeyword */,
"{": 16 /* OpenBraceToken */,
"}": 17 /* CloseBraceToken */,
"(": 18 /* OpenParenToken */,
@@ -4876,9 +5002,9 @@ var ts;
}
function makeReverseMap(source) {
var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
return result;
}
var tokenStrings = makeReverseMap(textToToken);
@@ -4888,7 +5014,7 @@ var ts;
ts.tokenToString = tokenToString;
/* @internal */
function stringToToken(s) {
- return textToToken[s];
+ return textToToken.get(s);
}
ts.stringToToken = stringToToken;
/* @internal */
@@ -4904,6 +5030,7 @@ var ts;
if (text.charCodeAt(pos) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
result.push(lineStart);
lineStart = pos;
@@ -4962,7 +5089,6 @@ var ts;
return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
}
ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
function isWhiteSpace(ch) {
return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
}
@@ -5049,6 +5175,7 @@ var ts;
if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
pos++;
if (stopAfterLineBreak) {
@@ -5121,7 +5248,7 @@ var ts;
if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
var ch = text.charCodeAt(pos);
if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
if (text.charCodeAt(pos + i) !== ch) {
return false;
}
@@ -5203,6 +5330,7 @@ var ts;
if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
pos++;
if (trailing) {
@@ -5298,15 +5426,15 @@ var ts;
if (!comments) {
comments = [];
}
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
return comments;
}
function getLeadingCommentRanges(text, pos) {
- return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ return reduceEachLeadingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
}
ts.getLeadingCommentRanges = getLeadingCommentRanges;
function getTrailingCommentRanges(text, pos) {
- return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ return reduceEachTrailingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
/** Optionally, get the shebang */
@@ -5333,7 +5461,7 @@ var ts;
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
return false;
}
- for (var i = 1, n = name.length; i < n; i++) {
+ for (var i = 1; i < name.length; i++) {
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
return false;
}
@@ -5357,6 +5485,7 @@ var ts;
var precedingLineBreak;
var hasExtendedUnicodeEscape;
var tokenIsUnterminated;
+ var numericLiteralFlags;
setText(text, start, length);
return {
getStartPos: function () { return startPos; },
@@ -5370,6 +5499,7 @@ var ts;
isIdentifier: function () { return token === 70 /* Identifier */ || token > 106 /* LastReservedWord */; },
isReservedWord: function () { return token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */; },
isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
@@ -5406,6 +5536,7 @@ var ts;
var end = pos;
if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) {
pos++;
+ numericLiteralFlags = 2 /* Scientific */;
if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */)
pos++;
if (isDigit(text.charCodeAt(pos))) {
@@ -5604,7 +5735,7 @@ var ts;
if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) {
pos++;
}
- // fall through
+ // falls through
case 10 /* lineFeed */:
case 8232 /* lineSeparator */:
case 8233 /* paragraphSeparator */:
@@ -5705,8 +5836,11 @@ var ts;
var len = tokenValue.length;
if (len >= 2 && len <= 11) {
var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
+ if (ch >= 97 /* a */ && ch <= 122 /* z */) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
}
}
return token = 70 /* Identifier */;
@@ -5738,6 +5872,7 @@ var ts;
hasExtendedUnicodeEscape = false;
precedingLineBreak = false;
tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
while (true) {
tokenPos = pos;
if (pos >= end) {
@@ -5923,6 +6058,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 8 /* HexSpecifier */;
return token = 8 /* NumericLiteral */;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) {
@@ -5933,6 +6069,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 16 /* BinarySpecifier */;
return token = 8 /* NumericLiteral */;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) {
@@ -5943,16 +6080,19 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 32 /* OctalSpecifier */;
return token = 8 /* NumericLiteral */;
}
// Try to parse as an octal
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4 /* Octal */;
return token = 8 /* NumericLiteral */;
}
// This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero
// can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being
// permissive and allowing decimal digits of the form 08* and 09* (which many browsers also do).
+ // falls through
case 49 /* _1 */:
case 50 /* _2 */:
case 51 /* _3 */:
@@ -6206,7 +6346,14 @@ var ts;
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
- if ((char === 123 /* openBrace */) || (char === 60 /* lessThan */)) {
+ if (char === 123 /* openBrace */) {
+ break;
+ }
+ if (char === 60 /* lessThan */) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7 /* ConflictMarkerTrivia */;
+ }
break;
}
}
@@ -6399,6 +6546,19 @@ var ts;
return undefined;
}
ts.getDeclarationOfKind = getDeclarationOfKind;
+ function findDeclaration(symbol, predicate) {
+ var declarations = symbol.declarations;
+ if (declarations) {
+ for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
+ var declaration = declarations_2[_i];
+ if (predicate(declaration)) {
+ return declaration;
+ }
+ }
+ }
+ return undefined;
+ }
+ ts.findDeclaration = findDeclaration;
// Pool writers to avoid needing to allocate them for every symbol we write.
var stringWriters = [];
function getSingleLineStringWriter() {
@@ -6413,6 +6573,7 @@ var ts;
writeSpace: writeText,
writeStringLiteral: writeText,
writeParameter: writeText,
+ writeProperty: writeText,
writeSymbol: writeText,
// Completely ignore indentation for string writers. And map newlines to
// a single space.
@@ -6421,7 +6582,8 @@ var ts;
decreaseIndent: ts.noop,
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
}
return stringWriters.pop();
@@ -6437,25 +6599,25 @@ var ts;
}
ts.getFullWidth = getFullWidth;
function hasResolvedModule(sourceFile, moduleNameText) {
- return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]);
+ return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText));
}
ts.hasResolvedModule = hasResolvedModule;
function getResolvedModule(sourceFile, moduleNameText) {
- return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined;
+ return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules.get(moduleNameText) : undefined;
}
ts.getResolvedModule = getResolvedModule;
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
if (!sourceFile.resolvedModules) {
sourceFile.resolvedModules = ts.createMap();
}
- sourceFile.resolvedModules[moduleNameText] = resolvedModule;
+ sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
}
ts.setResolvedModule = setResolvedModule;
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap();
}
- sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective;
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
}
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
/* @internal */
@@ -6477,7 +6639,7 @@ var ts;
}
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
- var oldResolution = oldResolutions && oldResolutions[names[i]];
+ var oldResolution = oldResolutions && oldResolutions.get(names[i]);
var changed = oldResolution
? !newResolution || !comparer(oldResolution, newResolution)
: newResolution;
@@ -6491,28 +6653,28 @@ var ts;
// Returns true if this node contains a parse error anywhere underneath it.
function containsParseError(node) {
aggregateChildData(node);
- return (node.flags & 4194304 /* ThisNodeOrAnySubNodesHasError */) !== 0;
+ return (node.flags & 131072 /* ThisNodeOrAnySubNodesHasError */) !== 0;
}
ts.containsParseError = containsParseError;
function aggregateChildData(node) {
- if (!(node.flags & 8388608 /* HasAggregatedChildData */)) {
+ if (!(node.flags & 262144 /* HasAggregatedChildData */)) {
// A node is considered to contain a parse error if:
// a) the parser explicitly marked that it had an error
// b) any of it's children reported that it had an error.
- var thisNodeOrAnySubNodesHasError = ((node.flags & 1048576 /* ThisNodeHasError */) !== 0) ||
+ var thisNodeOrAnySubNodesHasError = ((node.flags & 32768 /* ThisNodeHasError */) !== 0) ||
ts.forEachChild(node, containsParseError);
// If so, mark ourselves accordingly.
if (thisNodeOrAnySubNodesHasError) {
- node.flags |= 4194304 /* ThisNodeOrAnySubNodesHasError */;
+ node.flags |= 131072 /* ThisNodeOrAnySubNodesHasError */;
}
// Also mark that we've propagated the child information to this node. This way we can
// always consult the bit directly on this node without needing to check its children
// again.
- node.flags |= 8388608 /* HasAggregatedChildData */;
+ node.flags |= 262144 /* HasAggregatedChildData */;
}
}
function getSourceFileOfNode(node) {
- while (node && node.kind !== 261 /* SourceFile */) {
+ while (node && node.kind !== 264 /* SourceFile */) {
node = node.parent;
}
return node;
@@ -6520,11 +6682,11 @@ var ts;
ts.getSourceFileOfNode = getSourceFileOfNode;
function isStatementWithLocals(node) {
switch (node.kind) {
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return true;
}
return false;
@@ -6599,6 +6761,10 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
+ function isToken(n) {
+ return n.kind >= 0 /* FirstToken */ && n.kind <= 141 /* LastToken */;
+ }
+ ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
// With nodes that have no width (i.e. 'Missing' nodes), we actually *don't*
// want to skip trivia because this will launch us forward to the next token.
@@ -6615,18 +6781,18 @@ var ts;
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
// trivia for the list, we may have skipped the JSDocComment as well. So we should process its
// first child to determine the actual position of its first token.
- if (node.kind === 292 /* SyntaxList */ && node._children.length > 0) {
+ if (node.kind === 293 /* SyntaxList */ && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
}
ts.getTokenPosOfNode = getTokenPosOfNode;
function isJSDocNode(node) {
- return node.kind >= 262 /* FirstJSDocNode */ && node.kind <= 288 /* LastJSDocNode */;
+ return node.kind >= 266 /* FirstJSDocNode */ && node.kind <= 292 /* LastJSDocNode */;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocTag(node) {
- return node.kind >= 278 /* FirstJSDocTagNode */ && node.kind <= 291 /* LastJSDocTagNode */;
+ return node.kind >= 282 /* FirstJSDocTagNode */ && node.kind <= 292 /* LastJSDocTagNode */;
}
ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -6657,20 +6823,11 @@ var ts;
return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);
}
ts.getTextOfNode = getTextOfNode;
- function getLiteralText(node, sourceFile, languageVersion) {
- // Any template literal or string literal with an extended escape
- // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal.
- if (languageVersion < 2 /* ES2015 */ && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
- return getQuotedEscapedLiteralText('"', node.text, '"');
- }
+ function getLiteralText(node, sourceFile) {
// If we don't need to downlevel and we can reach the original source text using
// the node's parent reference, then simply get the text as it was originally written.
if (!nodeIsSynthesized(node) && node.parent) {
- var text = getSourceTextOfNodeFromSourceFile(sourceFile, node);
- if (languageVersion < 2 /* ES2015 */ && isBinaryOrOctalIntegerLiteral(node, text)) {
- return node.text;
- }
- return text;
+ return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
// If we can't reach the original source text, use the canonical form if it's a number,
// or an escaped quoted form of the original text if it's string-like.
@@ -6691,19 +6848,6 @@ var ts;
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function isBinaryOrOctalIntegerLiteral(node, text) {
- if (node.kind === 8 /* NumericLiteral */ && text.length > 1) {
- switch (text.charCodeAt(1)) {
- case 98 /* b */:
- case 66 /* B */:
- case 111 /* o */:
- case 79 /* O */:
- return true;
- }
- }
- return false;
- }
- ts.isBinaryOrOctalIntegerLiteral = isBinaryOrOctalIntegerLiteral;
function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
}
@@ -6712,11 +6856,6 @@ var ts;
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier;
}
ts.escapeIdentifier = escapeIdentifier;
- // Remove extra underscore from escaped identifier
- function unescapeIdentifier(identifier) {
- return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier;
- }
- ts.unescapeIdentifier = unescapeIdentifier;
// Make an identifier from an external module name by extracting the string after the last "/" and replacing
// all non-alphanumeric characters with underscores
function makeIdentifierFromModuleName(moduleName) {
@@ -6730,26 +6869,26 @@ var ts;
ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
var node = getRootDeclaration(declaration);
- return node.kind === 223 /* VariableDeclaration */ && node.parent.kind === 256 /* CatchClause */;
+ return node.kind === 225 /* VariableDeclaration */ && node.parent.kind === 259 /* CatchClause */;
}
ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
function isAmbientModule(node) {
- return node && node.kind === 230 /* ModuleDeclaration */ &&
+ return node && node.kind === 232 /* ModuleDeclaration */ &&
(node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node));
}
ts.isAmbientModule = isAmbientModule;
- /** Given a symbol for a module, checks that it is either an untyped import or a shorthand ambient module. */
+ /** Given a symbol for a module, checks that it is a shorthand ambient module. */
function isShorthandAmbientModuleSymbol(moduleSymbol) {
return isShorthandAmbientModule(moduleSymbol.valueDeclaration);
}
ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
function isShorthandAmbientModule(node) {
// The only kind of module that can be missing a body is a shorthand ambient module.
- return node.kind === 230 /* ModuleDeclaration */ && (!node.body);
+ return node && node.kind === 232 /* ModuleDeclaration */ && (!node.body);
}
function isBlockScopedContainerTopLevel(node) {
- return node.kind === 261 /* SourceFile */ ||
- node.kind === 230 /* ModuleDeclaration */ ||
+ return node.kind === 264 /* SourceFile */ ||
+ node.kind === 232 /* ModuleDeclaration */ ||
isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
@@ -6765,32 +6904,36 @@ var ts;
return false;
}
switch (node.parent.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return ts.isExternalModule(node.parent);
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
}
return false;
}
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
+ function isEffectiveExternalModule(node, compilerOptions) {
+ return ts.isExternalModule(node) || compilerOptions.isolatedModules;
+ }
+ ts.isEffectiveExternalModule = isEffectiveExternalModule;
function isBlockScope(node, parentNode) {
switch (node.kind) {
- case 261 /* SourceFile */:
- case 232 /* CaseBlock */:
- case 256 /* CatchClause */:
- case 230 /* ModuleDeclaration */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 264 /* SourceFile */:
+ case 234 /* CaseBlock */:
+ case 259 /* CatchClause */:
+ case 232 /* ModuleDeclaration */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return true;
- case 204 /* Block */:
+ case 206 /* Block */:
// function block is not considered block-scope container
// see comment in binder.ts: bind(...), case for SyntaxKind.Block
return parentNode && !isFunctionLike(parentNode);
@@ -6817,6 +6960,10 @@ var ts;
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
}
ts.declarationNameToString = declarationNameToString;
+ function getNameFromIndexInfo(info) {
+ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
+ }
+ ts.getNameFromIndexInfo = getNameFromIndexInfo;
function getTextOfPropertyName(name) {
switch (name.kind) {
case 70 /* Identifier */:
@@ -6824,7 +6971,7 @@ var ts;
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
return name.text;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
if (isStringOrNumericLiteral(name.expression)) {
return name.expression.text;
}
@@ -6835,10 +6982,10 @@ var ts;
function entityNameToString(name) {
switch (name.kind) {
case 70 /* Identifier */:
- return getFullWidth(name) === 0 ? unescapeIdentifier(name.text) : getTextOfNode(name);
- case 141 /* QualifiedName */:
+ return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name);
+ case 142 /* QualifiedName */:
return entityNameToString(name.left) + "." + entityNameToString(name.right);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return entityNameToString(name.expression) + "." + entityNameToString(name.name);
}
}
@@ -6875,7 +7022,7 @@ var ts;
ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
function getErrorSpanForArrowFunction(sourceFile, node) {
var pos = ts.skipTrivia(sourceFile.text, node.pos);
- if (node.body && node.body.kind === 204 /* Block */) {
+ if (node.body && node.body.kind === 206 /* Block */) {
var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
if (startLine < endLine) {
@@ -6889,7 +7036,7 @@ var ts;
function getErrorSpanForNode(sourceFile, node) {
var errorNode = node;
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false);
if (pos_1 === sourceFile.text.length) {
// file is empty - return span for the beginning of the file
@@ -6898,23 +7045,23 @@ var ts;
return getSpanOfTokenAtPosition(sourceFile, pos_1);
// This list is a work in progress. Add missing node kinds to improve their error
// spans.
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 228 /* TypeAliasDeclaration */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 230 /* TypeAliasDeclaration */:
errorNode = node.name;
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return getErrorSpanForArrowFunction(sourceFile, node);
}
if (errorNode === undefined) {
@@ -6937,7 +7084,7 @@ var ts;
}
ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
- return node.kind === 229 /* EnumDeclaration */ && isConst(node);
+ return node.kind === 231 /* EnumDeclaration */ && isConst(node);
}
ts.isConstEnumDeclaration = isConstEnumDeclaration;
function isConst(node) {
@@ -6950,11 +7097,11 @@ var ts;
}
ts.isLet = isLet;
function isSuperCall(n) {
- return n.kind === 179 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */;
+ return n.kind === 180 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */;
}
ts.isSuperCall = isSuperCall;
function isPrologueDirective(node) {
- return node.kind === 207 /* ExpressionStatement */
+ return node.kind === 209 /* ExpressionStatement */
&& node.expression.kind === 9 /* StringLiteral */;
}
ts.isPrologueDirective = isPrologueDirective;
@@ -6967,10 +7114,10 @@ var ts;
}
ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText;
function getJSDocCommentRanges(node, text) {
- var commentRanges = (node.kind === 144 /* Parameter */ ||
- node.kind === 143 /* TypeParameter */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 185 /* ArrowFunction */) ?
+ var commentRanges = (node.kind === 145 /* Parameter */ ||
+ node.kind === 144 /* TypeParameter */ ||
+ node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 186 /* ArrowFunction */) ?
ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRangesOfNodeFromText(node, text);
// True if the comment starts with '/**' but not if it is '/**/'
@@ -6985,79 +7132,80 @@ var ts;
ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
function isPartOfTypeNode(node) {
- if (156 /* FirstTypeNode */ <= node.kind && node.kind <= 171 /* LastTypeNode */) {
+ if (157 /* FirstTypeNode */ <= node.kind && node.kind <= 172 /* LastTypeNode */) {
return true;
}
switch (node.kind) {
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
return true;
case 104 /* VoidKeyword */:
- return node.parent.kind !== 188 /* VoidExpression */;
- case 199 /* ExpressionWithTypeArguments */:
+ return node.parent.kind !== 189 /* VoidExpression */;
+ case 200 /* ExpressionWithTypeArguments */:
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
// Identifiers and qualified names may be type nodes, depending on their context. Climb
// above them to find the lowest container
case 70 /* Identifier */:
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
- if (node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node) {
+ if (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) {
node = node.parent;
}
- else if (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node) {
+ else if (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node) {
node = node.parent;
}
// At this point, node is either a qualified name or an identifier
- ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */ || node.kind === 177 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
- case 141 /* QualifiedName */:
- case 177 /* PropertyAccessExpression */:
+ ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+ // falls through
+ case 142 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
case 98 /* ThisKeyword */:
- var parent_1 = node.parent;
- if (parent_1.kind === 160 /* TypeQuery */) {
+ var parent = node.parent;
+ if (parent.kind === 161 /* TypeQuery */) {
return false;
}
// Do not recursively call isPartOfTypeNode on the parent. In the example:
//
// let a: A.B.C;
//
- // Calling isPartOfTypeNode would consider the qualified name A.B a type node. Only C or
- // A.B.C is a type node.
- if (156 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 171 /* LastTypeNode */) {
+ // Calling isPartOfTypeNode would consider the qualified name A.B a type node.
+ // Only C and A.B.C are type nodes.
+ if (157 /* FirstTypeNode */ <= parent.kind && parent.kind <= 172 /* LastTypeNode */) {
return true;
}
- switch (parent_1.kind) {
- case 199 /* ExpressionWithTypeArguments */:
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1);
- case 143 /* TypeParameter */:
- return node === parent_1.constraint;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 144 /* Parameter */:
- case 223 /* VariableDeclaration */:
- return node === parent_1.type;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return node === parent_1.type;
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- return node === parent_1.type;
- case 182 /* TypeAssertionExpression */:
- return node === parent_1.type;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0;
- case 181 /* TaggedTemplateExpression */:
+ switch (parent.kind) {
+ case 200 /* ExpressionWithTypeArguments */:
+ return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
+ case 144 /* TypeParameter */:
+ return node === parent.constraint;
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 225 /* VariableDeclaration */:
+ return node === parent.type;
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return node === parent.type;
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ return node === parent.type;
+ case 183 /* TypeAssertionExpression */:
+ return node === parent.type;
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0;
+ case 182 /* TaggedTemplateExpression */:
// TODO (drosen): TaggedTemplateExpressions may eventually support type arguments.
return false;
}
@@ -7065,29 +7213,43 @@ var ts;
return false;
}
ts.isPartOfTypeNode = isPartOfTypeNode;
+ function isChildOfNodeWithKind(node, kind) {
+ while (node) {
+ if (node.kind === kind) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+ ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 191 /* PrefixUnaryExpression */;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
// Warning: This has the same semantics as the forEach family of functions,
// in that traversal terminates in the event that 'visitor' supplies a truthy value.
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitor(node);
- case 232 /* CaseBlock */:
- case 204 /* Block */:
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 217 /* WithStatement */:
- case 218 /* SwitchStatement */:
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
- case 219 /* LabeledStatement */:
- case 221 /* TryStatement */:
- case 256 /* CatchClause */:
+ case 234 /* CaseBlock */:
+ case 206 /* Block */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 219 /* WithStatement */:
+ case 220 /* SwitchStatement */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
+ case 221 /* LabeledStatement */:
+ case 223 /* TryStatement */:
+ case 259 /* CatchClause */:
return ts.forEachChild(node, traverse);
}
}
@@ -7097,29 +7259,30 @@ var ts;
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
visitor(node);
var operand = node.expression;
if (operand) {
traverse(operand);
}
- case 229 /* EnumDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ return;
+ case 231 /* EnumDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
// These are not allowed inside a generator now, but eventually they may be allowed
// as local types. Regardless, any yield statements contained within them should be
// skipped in this traversal.
return;
default:
if (isFunctionLike(node)) {
- var name_5 = node.name;
- if (name_5 && name_5.kind === 142 /* ComputedPropertyName */) {
+ var name = node.name;
+ if (name && name.kind === 143 /* ComputedPropertyName */) {
// Note that we will not include methods/accessors of a class because they would require
// first descending into the class. This is by design.
- traverse(name_5.expression);
+ traverse(name.expression);
return;
}
}
@@ -7132,17 +7295,35 @@ var ts;
}
}
ts.forEachYieldExpression = forEachYieldExpression;
+ /**
+ * Gets the most likely element type for a TypeNode. This is not an exhaustive test
+ * as it assumes a rest argument can only be an array type (either T[], or Array<T>).
+ *
+ * @param node The type node.
+ */
+ function getRestParameterElementType(node) {
+ if (node && node.kind === 163 /* ArrayType */) {
+ return node.elementType;
+ }
+ else if (node && node.kind === 158 /* TypeReference */) {
+ return ts.singleOrUndefined(node.typeArguments);
+ }
+ else {
+ return undefined;
+ }
+ }
+ ts.getRestParameterElementType = getRestParameterElementType;
function isVariableLike(node) {
if (node) {
switch (node.kind) {
- case 174 /* BindingElement */:
- case 260 /* EnumMember */:
- case 144 /* Parameter */:
- case 257 /* PropertyAssignment */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 258 /* ShorthandPropertyAssignment */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 263 /* EnumMember */:
+ case 145 /* Parameter */:
+ case 260 /* PropertyAssignment */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 225 /* VariableDeclaration */:
return true;
}
}
@@ -7150,11 +7331,11 @@ var ts;
}
ts.isVariableLike = isVariableLike;
function isAccessor(node) {
- return node && (node.kind === 151 /* GetAccessor */ || node.kind === 152 /* SetAccessor */);
+ return node && (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */);
}
ts.isAccessor = isAccessor;
function isClassLike(node) {
- return node && (node.kind === 226 /* ClassDeclaration */ || node.kind === 197 /* ClassExpression */);
+ return node && (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */);
}
ts.isClassLike = isClassLike;
function isFunctionLike(node) {
@@ -7163,19 +7344,19 @@ var ts;
ts.isFunctionLike = isFunctionLike;
function isFunctionLikeKind(kind) {
switch (kind) {
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return true;
}
return false;
@@ -7183,13 +7364,13 @@ var ts;
ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return true;
}
return false;
@@ -7197,30 +7378,42 @@ var ts;
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
function isIterationStatement(node, lookInLabeledStatements) {
switch (node.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
return true;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
}
return false;
}
ts.isIterationStatement = isIterationStatement;
+ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
+ while (true) {
+ if (beforeUnwrapLabelCallback) {
+ beforeUnwrapLabelCallback(node);
+ }
+ if (node.statement.kind !== 221 /* LabeledStatement */) {
+ return node.statement;
+ }
+ node = node.statement;
+ }
+ }
+ ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 204 /* Block */ && isFunctionLike(node.parent);
+ return node && node.kind === 206 /* Block */ && isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
- return node && node.kind === 149 /* MethodDeclaration */ && node.parent.kind === 176 /* ObjectLiteralExpression */;
+ return node && node.kind === 150 /* MethodDeclaration */ && node.parent.kind === 177 /* ObjectLiteralExpression */;
}
ts.isObjectLiteralMethod = isObjectLiteralMethod;
function isObjectLiteralOrClassExpressionMethod(node) {
- return node.kind === 149 /* MethodDeclaration */ &&
- (node.parent.kind === 176 /* ObjectLiteralExpression */ ||
- node.parent.kind === 197 /* ClassExpression */);
+ return node.kind === 150 /* MethodDeclaration */ &&
+ (node.parent.kind === 177 /* ObjectLiteralExpression */ ||
+ node.parent.kind === 198 /* ClassExpression */);
}
ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
function isIdentifierTypePredicate(predicate) {
@@ -7256,7 +7449,7 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
// If the grandparent node is an object literal (as opposed to a class),
// then the computed property is not a 'this' container.
// A computed property name in a class needs to be a this container
@@ -7271,9 +7464,9 @@ var ts;
// the *body* of the container.
node = node.parent;
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 144 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) {
// If the decorator's parent is a Parameter, we resolve the this container from
// the grandparent class declaration.
node = node.parent.parent;
@@ -7284,39 +7477,52 @@ var ts;
node = node.parent;
}
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
if (!includeArrowFunctions) {
continue;
}
- // Fall through
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 230 /* ModuleDeclaration */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 229 /* EnumDeclaration */:
- case 261 /* SourceFile */:
+ // falls through
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 232 /* ModuleDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 231 /* EnumDeclaration */:
+ case 264 /* SourceFile */:
return node;
}
}
}
ts.getThisContainer = getThisContainer;
+ function getNewTargetContainer(node) {
+ var container = getThisContainer(node, /*includeArrowFunctions*/ false);
+ if (container) {
+ switch (container.kind) {
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ return container;
+ }
+ }
+ return undefined;
+ }
+ ts.getNewTargetContainer = getNewTargetContainer;
/**
- * Given an super call/property node, returns the closest node where
- * - a super call/property access is legal in the node and not legal in the parent node the node.
- * i.e. super call is legal in constructor but not legal in the class body.
- * - the container is an arrow function (so caller might need to call getSuperContainer again in case it needs to climb higher)
- * - a super call/property is definitely illegal in the container (but might be legal in some subnode)
- * i.e. super property access is illegal in function declaration but can be legal in the statement list
- */
+ * Given an super call/property node, returns the closest node where
+ * - a super call/property access is legal in the node and not legal in the parent node the node.
+ * i.e. super call is legal in constructor but not legal in the class body.
+ * - the container is an arrow function (so caller might need to call getSuperContainer again in case it needs to climb higher)
+ * - a super call/property is definitely illegal in the container (but might be legal in some subnode)
+ * i.e. super property access is illegal in function declaration but can be legal in the statement list
+ */
function getSuperContainer(node, stopOnFunctions) {
while (true) {
node = node.parent;
@@ -7324,26 +7530,27 @@ var ts;
return node;
}
switch (node.kind) {
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
node = node.parent;
break;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
if (!stopOnFunctions) {
continue;
}
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return node;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 144 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) {
// If the decorator's parent is a Parameter, we resolve the this container from
// the grandparent class declaration.
node = node.parent.parent;
@@ -7359,15 +7566,15 @@ var ts;
}
ts.getSuperContainer = getSuperContainer;
function getImmediatelyInvokedFunctionExpression(func) {
- if (func.kind === 184 /* FunctionExpression */ || func.kind === 185 /* ArrowFunction */) {
+ if (func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */) {
var prev = func;
- var parent_2 = func.parent;
- while (parent_2.kind === 183 /* ParenthesizedExpression */) {
- prev = parent_2;
- parent_2 = parent_2.parent;
+ var parent = func.parent;
+ while (parent.kind === 184 /* ParenthesizedExpression */) {
+ prev = parent;
+ parent = parent.parent;
}
- if (parent_2.kind === 179 /* CallExpression */ && parent_2.expression === prev) {
- return parent_2;
+ if (parent.kind === 180 /* CallExpression */ && parent.expression === prev) {
+ return parent;
}
}
}
@@ -7377,21 +7584,21 @@ var ts;
*/
function isSuperProperty(node) {
var kind = node.kind;
- return (kind === 177 /* PropertyAccessExpression */ || kind === 178 /* ElementAccessExpression */)
+ return (kind === 178 /* PropertyAccessExpression */ || kind === 179 /* ElementAccessExpression */)
&& node.expression.kind === 96 /* SuperKeyword */;
}
ts.isSuperProperty = isSuperProperty;
function getEntityNameFromTypeNode(node) {
switch (node.kind) {
- case 157 /* TypeReference */:
- case 272 /* JSDocTypeReference */:
+ case 158 /* TypeReference */:
+ case 276 /* JSDocTypeReference */:
return node.typeName;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return isEntityNameExpression(node.expression)
? node.expression
: undefined;
case 70 /* Identifier */:
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return node;
}
return undefined;
@@ -7399,10 +7606,12 @@ var ts;
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
function isCallLikeExpression(node) {
switch (node.kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 145 /* Decorator */:
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 146 /* Decorator */:
return true;
default:
return false;
@@ -7410,34 +7619,37 @@ var ts;
}
ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
return node.tag;
}
+ else if (isJsxOpeningLikeElement(node)) {
+ return node.tagName;
+ }
// Will either be a CallExpression, NewExpression, or Decorator.
return node.expression;
}
ts.getInvokedExpression = getInvokedExpression;
function nodeCanBeDecorated(node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
// classes are valid targets
return true;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// property declarations are valid if their parent is a class declaration.
- return node.parent.kind === 226 /* ClassDeclaration */;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
+ return node.parent.kind === 228 /* ClassDeclaration */;
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
// if this method has a body and its parent is a class declaration, this is a valid target.
return node.body !== undefined
- && node.parent.kind === 226 /* ClassDeclaration */;
- case 144 /* Parameter */:
+ && node.parent.kind === 228 /* ClassDeclaration */;
+ case 145 /* Parameter */:
// if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target;
return node.parent.body !== undefined
- && (node.parent.kind === 150 /* Constructor */
- || node.parent.kind === 149 /* MethodDeclaration */
- || node.parent.kind === 152 /* SetAccessor */)
- && node.parent.parent.kind === 226 /* ClassDeclaration */;
+ && (node.parent.kind === 151 /* Constructor */
+ || node.parent.kind === 150 /* MethodDeclaration */
+ || node.parent.kind === 153 /* SetAccessor */)
+ && node.parent.parent.kind === 228 /* ClassDeclaration */;
}
return false;
}
@@ -7453,19 +7665,19 @@ var ts;
ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
function childIsDecorated(node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return ts.forEach(node.members, nodeOrChildIsDecorated);
- case 149 /* MethodDeclaration */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 153 /* SetAccessor */:
return ts.forEach(node.parameters, nodeIsDecorated);
}
}
ts.childIsDecorated = childIsDecorated;
function isJSXTagName(node) {
var parent = node.parent;
- if (parent.kind === 248 /* JsxOpeningElement */ ||
- parent.kind === 247 /* JsxSelfClosingElement */ ||
- parent.kind === 249 /* JsxClosingElement */) {
+ if (parent.kind === 250 /* JsxOpeningElement */ ||
+ parent.kind === 249 /* JsxSelfClosingElement */ ||
+ parent.kind === 251 /* JsxClosingElement */) {
return parent.tagName === node;
}
return false;
@@ -7479,96 +7691,97 @@ var ts;
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
case 11 /* RegularExpressionLiteral */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 200 /* AsExpression */:
- case 182 /* TypeAssertionExpression */:
- case 201 /* NonNullExpression */:
- case 183 /* ParenthesizedExpression */:
- case 184 /* FunctionExpression */:
- case 197 /* ClassExpression */:
- case 185 /* ArrowFunction */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 187 /* TypeOfExpression */:
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
- case 192 /* BinaryExpression */:
- case 193 /* ConditionalExpression */:
- case 196 /* SpreadElement */:
- case 194 /* TemplateExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 201 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 202 /* NonNullExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 185 /* FunctionExpression */:
+ case 198 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 188 /* TypeOfExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
+ case 193 /* BinaryExpression */:
+ case 194 /* ConditionalExpression */:
+ case 197 /* SpreadElement */:
+ case 195 /* TemplateExpression */:
case 12 /* NoSubstitutionTemplateLiteral */:
- case 198 /* OmittedExpression */:
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
- case 195 /* YieldExpression */:
- case 189 /* AwaitExpression */:
+ case 199 /* OmittedExpression */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 196 /* YieldExpression */:
+ case 190 /* AwaitExpression */:
+ case 203 /* MetaProperty */:
return true;
- case 141 /* QualifiedName */:
- while (node.parent.kind === 141 /* QualifiedName */) {
+ case 142 /* QualifiedName */:
+ while (node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
- return node.parent.kind === 160 /* TypeQuery */ || isJSXTagName(node);
+ return node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node);
case 70 /* Identifier */:
- if (node.parent.kind === 160 /* TypeQuery */ || isJSXTagName(node)) {
+ if (node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node)) {
return true;
}
- // fall through
+ // falls through
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
case 98 /* ThisKeyword */:
- var parent_3 = node.parent;
- switch (parent_3.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 260 /* EnumMember */:
- case 257 /* PropertyAssignment */:
- case 174 /* BindingElement */:
- return parent_3.initializer === node;
- case 207 /* ExpressionStatement */:
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 216 /* ReturnStatement */:
- case 217 /* WithStatement */:
- case 218 /* SwitchStatement */:
- case 253 /* CaseClause */:
- case 220 /* ThrowStatement */:
- case 218 /* SwitchStatement */:
- return parent_3.expression === node;
- case 211 /* ForStatement */:
- var forStatement = parent_3;
- return (forStatement.initializer === node && forStatement.initializer.kind !== 224 /* VariableDeclarationList */) ||
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 263 /* EnumMember */:
+ case 260 /* PropertyAssignment */:
+ case 175 /* BindingElement */:
+ return parent.initializer === node;
+ case 209 /* ExpressionStatement */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 218 /* ReturnStatement */:
+ case 219 /* WithStatement */:
+ case 220 /* SwitchStatement */:
+ case 256 /* CaseClause */:
+ case 222 /* ThrowStatement */:
+ case 220 /* SwitchStatement */:
+ return parent.expression === node;
+ case 213 /* ForStatement */:
+ var forStatement = parent;
+ return (forStatement.initializer === node && forStatement.initializer.kind !== 226 /* VariableDeclarationList */) ||
forStatement.condition === node ||
forStatement.incrementor === node;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- var forInStatement = parent_3;
- return (forInStatement.initializer === node && forInStatement.initializer.kind !== 224 /* VariableDeclarationList */) ||
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ var forInStatement = parent;
+ return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226 /* VariableDeclarationList */) ||
forInStatement.expression === node;
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
- return node === parent_3.expression;
- case 202 /* TemplateSpan */:
- return node === parent_3.expression;
- case 142 /* ComputedPropertyName */:
- return node === parent_3.expression;
- case 145 /* Decorator */:
- case 252 /* JsxExpression */:
- case 251 /* JsxSpreadAttribute */:
- case 259 /* SpreadAssignment */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
+ return node === parent.expression;
+ case 204 /* TemplateSpan */:
+ return node === parent.expression;
+ case 143 /* ComputedPropertyName */:
+ return node === parent.expression;
+ case 146 /* Decorator */:
+ case 255 /* JsxExpression */:
+ case 254 /* JsxSpreadAttribute */:
+ case 262 /* SpreadAssignment */:
return true;
- case 199 /* ExpressionWithTypeArguments */:
- return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3);
+ case 200 /* ExpressionWithTypeArguments */:
+ return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
default:
- if (isPartOfExpression(parent_3)) {
+ if (isPartOfExpression(parent)) {
return true;
}
}
@@ -7583,7 +7796,7 @@ var ts;
}
ts.isInstantiatedModule = isInstantiatedModule;
function isExternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 245 /* ExternalModuleReference */;
+ return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */;
}
ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -7592,7 +7805,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function isInternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 245 /* ExternalModuleReference */;
+ return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 247 /* ExternalModuleReference */;
}
ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
function isSourceFileJavaScript(file) {
@@ -7600,21 +7813,27 @@ var ts;
}
ts.isSourceFileJavaScript = isSourceFileJavaScript;
function isInJavaScriptFile(node) {
- return node && !!(node.flags & 2097152 /* JavaScriptFile */);
+ return node && !!(node.flags & 65536 /* JavaScriptFile */);
}
ts.isInJavaScriptFile = isInJavaScriptFile;
/**
* Returns true if the node is a CallExpression to the identifier 'require' with
- * exactly one argument.
+ * exactly one argument (of the form 'require("name")').
* This function does not test if the node is in a JavaScript file or not.
- */
- function isRequireCall(expression, checkArgumentIsStringLiteral) {
- // of the form 'require("name")'
- var isRequire = expression.kind === 179 /* CallExpression */ &&
- expression.expression.kind === 70 /* Identifier */ &&
- expression.expression.text === "require" &&
- expression.arguments.length === 1;
- return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9 /* StringLiteral */);
+ */
+ function isRequireCall(callExpression, checkArgumentIsStringLiteral) {
+ if (callExpression.kind !== 180 /* CallExpression */) {
+ return false;
+ }
+ var _a = callExpression, expression = _a.expression, args = _a.arguments;
+ if (expression.kind !== 70 /* Identifier */ || expression.text !== "require") {
+ return false;
+ }
+ if (args.length !== 1) {
+ return false;
+ }
+ var arg = args[0];
+ return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 12 /* NoSubstitutionTemplateLiteral */;
}
ts.isRequireCall = isRequireCall;
function isSingleOrDoubleQuote(charCode) {
@@ -7625,25 +7844,37 @@ var ts;
* Returns true if the node is a variable declaration whose initializer is a function expression.
* This function does not test if the node is in a JavaScript file or not.
*/
- function isDeclarationOfFunctionExpression(s) {
- if (s.valueDeclaration && s.valueDeclaration.kind === 223 /* VariableDeclaration */) {
+ function isDeclarationOfFunctionOrClassExpression(s) {
+ if (s.valueDeclaration && s.valueDeclaration.kind === 225 /* VariableDeclaration */) {
var declaration = s.valueDeclaration;
- return declaration.initializer && declaration.initializer.kind === 184 /* FunctionExpression */;
+ return declaration.initializer && (declaration.initializer.kind === 185 /* FunctionExpression */ || declaration.initializer.kind === 198 /* ClassExpression */);
}
return false;
}
- ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression;
+ ts.isDeclarationOfFunctionOrClassExpression = isDeclarationOfFunctionOrClassExpression;
+ function getRightMostAssignedExpression(node) {
+ while (isAssignmentExpression(node, /*excludeCompoundAssignements*/ true)) {
+ node = node.right;
+ }
+ return node;
+ }
+ ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
+ function isExportsIdentifier(node) {
+ return isIdentifier(node) && node.text === "exports";
+ }
+ ts.isExportsIdentifier = isExportsIdentifier;
+ function isModuleExportsPropertyAccessExpression(node) {
+ return isPropertyAccessExpression(node) && isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
+ }
+ ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
/// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property
/// assignments we treat as special in the binder
function getSpecialPropertyAssignmentKind(expression) {
if (!isInJavaScriptFile(expression)) {
return 0 /* None */;
}
- if (expression.kind !== 192 /* BinaryExpression */) {
- return 0 /* None */;
- }
var expr = expression;
- if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 177 /* PropertyAccessExpression */) {
+ if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 178 /* PropertyAccessExpression */) {
return 0 /* None */;
}
var lhs = expr.left;
@@ -7657,11 +7888,15 @@ var ts;
// module.exports = expr
return 2 /* ModuleExports */;
}
+ else {
+ // F.x = expr
+ return 5 /* Property */;
+ }
}
else if (lhs.expression.kind === 98 /* ThisKeyword */) {
return 4 /* ThisProperty */;
}
- else if (lhs.expression.kind === 177 /* PropertyAccessExpression */) {
+ else if (lhs.expression.kind === 178 /* PropertyAccessExpression */) {
// chained dot, e.g. x.y.z = expr; this var is the 'x.y' part
var innerPropertyAccess = lhs.expression;
if (innerPropertyAccess.expression.kind === 70 /* Identifier */) {
@@ -7679,35 +7914,35 @@ var ts;
}
ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind;
function getExternalModuleName(node) {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
return node.moduleSpecifier;
}
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
var reference = node.moduleReference;
- if (reference.kind === 245 /* ExternalModuleReference */) {
+ if (reference.kind === 247 /* ExternalModuleReference */) {
return reference.expression;
}
}
- if (node.kind === 241 /* ExportDeclaration */) {
+ if (node.kind === 243 /* ExportDeclaration */) {
return node.moduleSpecifier;
}
- if (node.kind === 230 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) {
return node.name;
}
}
ts.getExternalModuleName = getExternalModuleName;
function getNamespaceDeclarationNode(node) {
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
var importClause = node.importClause;
- if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239 /* NamespaceImport */) {
return importClause.namedBindings;
}
}
ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
function isDefaultImport(node) {
- return node.kind === 235 /* ImportDeclaration */
+ return node.kind === 237 /* ImportDeclaration */
&& node.importClause
&& !!node.importClause.name;
}
@@ -7715,13 +7950,13 @@ var ts;
function hasQuestionToken(node) {
if (node) {
switch (node.kind) {
- case 144 /* Parameter */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 258 /* ShorthandPropertyAssignment */:
- case 257 /* PropertyAssignment */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return node.questionToken !== undefined;
}
}
@@ -7729,28 +7964,36 @@ var ts;
}
ts.hasQuestionToken = hasQuestionToken;
function isJSDocConstructSignature(node) {
- return node.kind === 274 /* JSDocFunctionType */ &&
+ return node.kind === 278 /* JSDocFunctionType */ &&
node.parameters.length > 0 &&
- node.parameters[0].type.kind === 276 /* JSDocConstructorType */;
+ node.parameters[0].type.kind === 280 /* JSDocConstructorType */;
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function getCommentsFromJSDoc(node) {
return ts.map(getJSDocs(node), function (doc) { return doc.comment; });
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
+ function hasJSDocParameterTags(node) {
+ var parameterTags = getJSDocTags(node, 285 /* JSDocParameterTag */);
+ return parameterTags && parameterTags.length > 0;
+ }
+ ts.hasJSDocParameterTags = hasJSDocParameterTags;
function getJSDocTags(node, kind) {
var docs = getJSDocs(node);
if (docs) {
var result = [];
for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) {
var doc = docs_1[_i];
- if (doc.kind === 281 /* JSDocParameterTag */) {
+ if (doc.kind === 285 /* JSDocParameterTag */) {
if (doc.kind === kind) {
result.push(doc);
}
}
else {
- result.push.apply(result, ts.filter(doc.tags, function (tag) { return tag.kind === kind; }));
+ var tags = doc.tags;
+ if (tags) {
+ result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
+ }
}
}
return result;
@@ -7776,9 +8019,9 @@ var ts;
// var x = function(name) { return name.length; }
var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) &&
parent.initializer === node &&
- parent.parent.parent.kind === 205 /* VariableStatement */;
+ parent.parent.parent.kind === 207 /* VariableStatement */;
var isVariableOfVariableDeclarationStatement = isVariableLike(node) &&
- parent.parent.kind === 205 /* VariableStatement */;
+ parent.parent.kind === 207 /* VariableStatement */;
var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent :
isVariableOfVariableDeclarationStatement ? parent.parent :
undefined;
@@ -7787,20 +8030,20 @@ var ts;
}
// Also recognize when the node is the RHS of an assignment expression
var isSourceOfAssignmentExpressionStatement = parent && parent.parent &&
- parent.kind === 192 /* BinaryExpression */ &&
+ parent.kind === 193 /* BinaryExpression */ &&
parent.operatorToken.kind === 57 /* EqualsToken */ &&
- parent.parent.kind === 207 /* ExpressionStatement */;
+ parent.parent.kind === 209 /* ExpressionStatement */;
if (isSourceOfAssignmentExpressionStatement) {
getJSDocsWorker(parent.parent);
}
- var isModuleDeclaration = node.kind === 230 /* ModuleDeclaration */ &&
- parent && parent.kind === 230 /* ModuleDeclaration */;
- var isPropertyAssignmentExpression = parent && parent.kind === 257 /* PropertyAssignment */;
+ var isModuleDeclaration = node.kind === 232 /* ModuleDeclaration */ &&
+ parent && parent.kind === 232 /* ModuleDeclaration */;
+ var isPropertyAssignmentExpression = parent && parent.kind === 260 /* PropertyAssignment */;
if (isModuleDeclaration || isPropertyAssignmentExpression) {
getJSDocsWorker(parent);
}
// Pull parameter comments from declaring function as well
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
cache = ts.concatenate(cache, getJSDocParameterTags(node));
}
if (isVariableLike(node) && node.initializer) {
@@ -7809,23 +8052,24 @@ var ts;
cache = ts.concatenate(cache, node.jsDoc);
}
}
+ ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
if (!isParameter(param)) {
return undefined;
}
var func = param.parent;
- var tags = getJSDocTags(func, 281 /* JSDocParameterTag */);
+ var tags = getJSDocTags(func, 285 /* JSDocParameterTag */);
if (!param.name) {
// this is an anonymous jsdoc param from a `function(type1, type2): type3` specification
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 281 /* JSDocParameterTag */; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 70 /* Identifier */) {
- var name_6 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 281 /* JSDocParameterTag */ && tag.parameterName.text === name_6; });
+ var name_1 = param.name.text;
+ return ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */ && tag.parameterName.text === name_1; });
}
else {
// TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines
@@ -7835,8 +8079,8 @@ var ts;
}
ts.getJSDocParameterTags = getJSDocParameterTags;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 283 /* JSDocTypeTag */);
- if (!tag && node.kind === 144 /* Parameter */) {
+ var tag = getFirstJSDocTag(node, 287 /* JSDocTypeTag */);
+ if (!tag && node.kind === 145 /* Parameter */) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; });
@@ -7846,15 +8090,15 @@ var ts;
}
ts.getJSDocType = getJSDocType;
function getJSDocAugmentsTag(node) {
- return getFirstJSDocTag(node, 280 /* JSDocAugmentsTag */);
+ return getFirstJSDocTag(node, 284 /* JSDocAugmentsTag */);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 282 /* JSDocReturnTag */);
+ return getFirstJSDocTag(node, 286 /* JSDocReturnTag */);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 284 /* JSDocTemplateTag */);
+ return getFirstJSDocTag(node, 288 /* JSDocTemplateTag */);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -7866,9 +8110,9 @@ var ts;
}
ts.hasDeclaredRestParameter = hasDeclaredRestParameter;
function isRestParameter(node) {
- if (node && (node.flags & 2097152 /* JavaScriptFile */)) {
- if (node.type && node.type.kind === 275 /* JSDocVariadicType */ ||
- ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 275 /* JSDocVariadicType */; })) {
+ if (node && (node.flags & 65536 /* JavaScriptFile */)) {
+ if (node.type && node.type.kind === 279 /* JSDocVariadicType */ ||
+ ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279 /* JSDocVariadicType */; })) {
return true;
}
}
@@ -7889,29 +8133,33 @@ var ts;
var parent = node.parent;
while (true) {
switch (parent.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
var binaryOperator = parent.operatorToken.kind;
return isAssignmentOperator(binaryOperator) && parent.left === node ?
binaryOperator === 57 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ :
0 /* None */;
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
var unaryOperator = parent.operator;
return unaryOperator === 42 /* PlusPlusToken */ || unaryOperator === 43 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return parent.initializer === node ? 1 /* Definite */ : 0 /* None */;
- case 183 /* ParenthesizedExpression */:
- case 175 /* ArrayLiteralExpression */:
- case 196 /* SpreadElement */:
+ case 184 /* ParenthesizedExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 197 /* SpreadElement */:
node = parent;
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
if (parent.name !== node) {
return 0 /* None */;
}
- // Fall through
- case 257 /* PropertyAssignment */:
+ node = parent.parent;
+ break;
+ case 260 /* PropertyAssignment */:
+ if (parent.name === node) {
+ return 0 /* None */;
+ }
node = parent.parent;
break;
default:
@@ -7923,11 +8171,24 @@ var ts;
ts.getAssignmentTargetKind = getAssignmentTargetKind;
// A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property
// assignment in an object literal that is an assignment target, or if it is parented by an array literal that is
- // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'.
+ // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ a }] = xxx'.
+ // (Note that `p` is not a target in the above examples, only `a`.)
function isAssignmentTarget(node) {
return getAssignmentTargetKind(node) !== 0 /* None */;
}
ts.isAssignmentTarget = isAssignmentTarget;
+ // a node is delete target iff. it is PropertyAccessExpression/ElementAccessExpression with parentheses skipped
+ function isDeleteTarget(node) {
+ if (node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) {
+ return false;
+ }
+ node = node.parent;
+ while (node && node.kind === 184 /* ParenthesizedExpression */) {
+ node = node.parent;
+ }
+ return node && node.kind === 187 /* DeleteExpression */;
+ }
+ ts.isDeleteTarget = isDeleteTarget;
function isNodeDescendantOf(node, ancestor) {
while (node) {
if (node === ancestor)
@@ -7939,7 +8200,7 @@ var ts;
ts.isNodeDescendantOf = isNodeDescendantOf;
function isInAmbientContext(node) {
while (node) {
- if (hasModifier(node, 2 /* Ambient */) || (node.kind === 261 /* SourceFile */ && node.isDeclarationFile)) {
+ if (hasModifier(node, 2 /* Ambient */) || (node.kind === 264 /* SourceFile */ && node.isDeclarationFile)) {
return true;
}
node = node.parent;
@@ -7953,7 +8214,7 @@ var ts;
return false;
}
var parent = name.parent;
- if (parent.kind === 239 /* ImportSpecifier */ || parent.kind === 243 /* ExportSpecifier */) {
+ if (parent.kind === 241 /* ImportSpecifier */ || parent.kind === 245 /* ExportSpecifier */) {
if (parent.propertyName) {
return true;
}
@@ -7966,7 +8227,7 @@ var ts;
ts.isDeclarationName = isDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) &&
- node.parent.kind === 142 /* ComputedPropertyName */ &&
+ node.parent.kind === 143 /* ComputedPropertyName */ &&
isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
@@ -7974,31 +8235,31 @@ var ts;
function isIdentifierName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 260 /* EnumMember */:
- case 257 /* PropertyAssignment */:
- case 177 /* PropertyAccessExpression */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 263 /* EnumMember */:
+ case 260 /* PropertyAssignment */:
+ case 178 /* PropertyAccessExpression */:
// Name in member declaration or property name in property access
return parent.name === node;
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
// Name on right hand side of dot in a type query
if (parent.right === node) {
- while (parent.kind === 141 /* QualifiedName */) {
+ while (parent.kind === 142 /* QualifiedName */) {
parent = parent.parent;
}
- return parent.kind === 160 /* TypeQuery */;
+ return parent.kind === 161 /* TypeQuery */;
}
return false;
- case 174 /* BindingElement */:
- case 239 /* ImportSpecifier */:
+ case 175 /* BindingElement */:
+ case 241 /* ImportSpecifier */:
// Property name in binding element or import specifier
return parent.propertyName === node;
- case 243 /* ExportSpecifier */:
+ case 245 /* ExportSpecifier */:
// Any name in an export specifier
return true;
}
@@ -8014,13 +8275,13 @@ var ts;
// export = <EntityNameExpression>
// export default <EntityNameExpression>
function isAliasSymbolDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ ||
- node.kind === 233 /* NamespaceExportDeclaration */ ||
- node.kind === 236 /* ImportClause */ && !!node.name ||
- node.kind === 237 /* NamespaceImport */ ||
- node.kind === 239 /* ImportSpecifier */ ||
- node.kind === 243 /* ExportSpecifier */ ||
- node.kind === 240 /* ExportAssignment */ && exportAssignmentIsAlias(node);
+ return node.kind === 236 /* ImportEqualsDeclaration */ ||
+ node.kind === 235 /* NamespaceExportDeclaration */ ||
+ node.kind === 238 /* ImportClause */ && !!node.name ||
+ node.kind === 239 /* NamespaceImport */ ||
+ node.kind === 241 /* ImportSpecifier */ ||
+ node.kind === 245 /* ExportSpecifier */ ||
+ node.kind === 242 /* ExportAssignment */ && exportAssignmentIsAlias(node);
}
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
function exportAssignmentIsAlias(node) {
@@ -8106,17 +8367,62 @@ var ts;
}
ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
function isKeyword(token) {
- return 71 /* FirstKeyword */ <= token && token <= 140 /* LastKeyword */;
+ return 71 /* FirstKeyword */ <= token && token <= 141 /* LastKeyword */;
}
ts.isKeyword = isKeyword;
function isTrivia(token) {
return 2 /* FirstTriviaToken */ <= token && token <= 7 /* LastTriviaToken */;
}
ts.isTrivia = isTrivia;
- function isAsyncFunctionLike(node) {
- return isFunctionLike(node) && hasModifier(node, 256 /* Async */) && !isAccessor(node);
+ var FunctionFlags;
+ (function (FunctionFlags) {
+ FunctionFlags[FunctionFlags["Normal"] = 0] = "Normal";
+ FunctionFlags[FunctionFlags["Generator"] = 1] = "Generator";
+ FunctionFlags[FunctionFlags["Async"] = 2] = "Async";
+ FunctionFlags[FunctionFlags["AsyncOrAsyncGenerator"] = 3] = "AsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["Invalid"] = 4] = "Invalid";
+ FunctionFlags[FunctionFlags["InvalidAsyncOrAsyncGenerator"] = 7] = "InvalidAsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["InvalidGenerator"] = 5] = "InvalidGenerator";
+ })(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
+ function getFunctionFlags(node) {
+ var flags = 0 /* Normal */;
+ switch (node.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ if (node.asteriskToken) {
+ flags |= 1 /* Generator */;
+ }
+ // falls through
+ case 186 /* ArrowFunction */:
+ if (hasModifier(node, 256 /* Async */)) {
+ flags |= 2 /* Async */;
+ }
+ break;
+ }
+ if (!node.body) {
+ flags |= 4 /* Invalid */;
+ }
+ return flags;
+ }
+ ts.getFunctionFlags = getFunctionFlags;
+ function isAsyncFunction(node) {
+ switch (node.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ return node.body !== undefined
+ && node.asteriskToken === undefined
+ && hasModifier(node, 256 /* Async */);
+ }
+ return false;
+ }
+ ts.isAsyncFunction = isAsyncFunction;
+ function isNumericLiteral(node) {
+ return node.kind === 8 /* NumericLiteral */;
}
- ts.isAsyncFunctionLike = isAsyncFunctionLike;
+ ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -8135,7 +8441,7 @@ var ts;
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
- return name.kind === 142 /* ComputedPropertyName */ &&
+ return name.kind === 143 /* ComputedPropertyName */ &&
!isStringOrNumericLiteral(name.expression) &&
!isWellKnownSymbolSyntactically(name.expression);
}
@@ -8150,10 +8456,10 @@ var ts;
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
- if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 144 /* Parameter */) {
+ if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 145 /* Parameter */) {
return name.text;
}
- if (name.kind === 142 /* ComputedPropertyName */) {
+ if (name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = name.expression;
if (isWellKnownSymbolSyntactically(nameExpression)) {
var rightHandSideName = nameExpression.name.text;
@@ -8201,11 +8507,11 @@ var ts;
ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
- return root.kind === 144 /* Parameter */;
+ return root.kind === 145 /* Parameter */;
}
ts.isParameterDeclaration = isParameterDeclaration;
function getRootDeclaration(node) {
- while (node.kind === 174 /* BindingElement */) {
+ while (node.kind === 175 /* BindingElement */) {
node = node.parent.parent;
}
return node;
@@ -8213,15 +8519,15 @@ var ts;
ts.getRootDeclaration = getRootDeclaration;
function nodeStartsNewLexicalEnvironment(node) {
var kind = node.kind;
- return kind === 150 /* Constructor */
- || kind === 184 /* FunctionExpression */
- || kind === 225 /* FunctionDeclaration */
- || kind === 185 /* ArrowFunction */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 230 /* ModuleDeclaration */
- || kind === 261 /* SourceFile */;
+ return kind === 151 /* Constructor */
+ || kind === 185 /* FunctionExpression */
+ || kind === 227 /* FunctionDeclaration */
+ || kind === 186 /* ArrowFunction */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 264 /* SourceFile */;
}
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
function nodeIsSynthesized(node) {
@@ -8229,49 +8535,22 @@ var ts;
|| ts.positionIsSynthesized(node.end);
}
ts.nodeIsSynthesized = nodeIsSynthesized;
- function getOriginalNode(node, nodeTest) {
- if (node) {
- while (node.original !== undefined) {
- node = node.original;
- }
+ function getOriginalSourceFileOrBundle(sourceFileOrBundle) {
+ if (sourceFileOrBundle.kind === 265 /* Bundle */) {
+ return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile));
}
- return !nodeTest || nodeTest(node) ? node : undefined;
- }
- ts.getOriginalNode = getOriginalNode;
- /**
- * Gets a value indicating whether a node originated in the parse tree.
- *
- * @param node The node to test.
- */
- function isParseTreeNode(node) {
- return (node.flags & 8 /* Synthesized */) === 0;
+ return getOriginalSourceFile(sourceFileOrBundle);
}
- ts.isParseTreeNode = isParseTreeNode;
- function getParseTreeNode(node, nodeTest) {
- if (isParseTreeNode(node)) {
- return node;
- }
- node = getOriginalNode(node);
- if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
- return node;
- }
- return undefined;
+ ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
+ function getOriginalSourceFile(sourceFile) {
+ return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
}
- ts.getParseTreeNode = getParseTreeNode;
function getOriginalSourceFiles(sourceFiles) {
- var originalSourceFiles = [];
- for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
- var sourceFile = sourceFiles_1[_i];
- var originalSourceFile = getParseTreeNode(sourceFile, isSourceFile);
- if (originalSourceFile) {
- originalSourceFiles.push(originalSourceFile);
- }
- }
- return originalSourceFiles;
+ return ts.sameMap(sourceFiles, getOriginalSourceFile);
}
ts.getOriginalSourceFiles = getOriginalSourceFiles;
function getOriginalNodeId(node) {
- node = getOriginalNode(node);
+ node = ts.getOriginalNode(node);
return node ? ts.getNodeId(node) : 0;
}
ts.getOriginalNodeId = getOriginalNodeId;
@@ -8282,23 +8561,23 @@ var ts;
})(Associativity = ts.Associativity || (ts.Associativity = {}));
function getExpressionAssociativity(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 /* NewExpression */ && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined;
return getOperatorAssociativity(expression.kind, operator, hasArguments);
}
ts.getExpressionAssociativity = getExpressionAssociativity;
function getOperatorAssociativity(kind, operator, hasArguments) {
switch (kind) {
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return hasArguments ? 0 /* Left */ : 1 /* Right */;
- case 190 /* PrefixUnaryExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 189 /* AwaitExpression */:
- case 193 /* ConditionalExpression */:
- case 195 /* YieldExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 190 /* AwaitExpression */:
+ case 194 /* ConditionalExpression */:
+ case 196 /* YieldExpression */:
return 1 /* Right */;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (operator) {
case 39 /* AsteriskAsteriskToken */:
case 57 /* EqualsToken */:
@@ -8322,15 +8601,15 @@ var ts;
ts.getOperatorAssociativity = getOperatorAssociativity;
function getExpressionPrecedence(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 /* NewExpression */ && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined;
return getOperatorPrecedence(expression.kind, operator, hasArguments);
}
ts.getExpressionPrecedence = getExpressionPrecedence;
function getOperator(expression) {
- if (expression.kind === 192 /* BinaryExpression */) {
+ if (expression.kind === 193 /* BinaryExpression */) {
return expression.operatorToken.kind;
}
- else if (expression.kind === 190 /* PrefixUnaryExpression */ || expression.kind === 191 /* PostfixUnaryExpression */) {
+ else if (expression.kind === 191 /* PrefixUnaryExpression */ || expression.kind === 192 /* PostfixUnaryExpression */) {
return expression.operator;
}
else {
@@ -8348,37 +8627,36 @@ var ts;
case 85 /* FalseKeyword */:
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 197 /* ClassExpression */:
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 198 /* ClassExpression */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
case 11 /* RegularExpressionLiteral */:
case 12 /* NoSubstitutionTemplateLiteral */:
- case 194 /* TemplateExpression */:
- case 183 /* ParenthesizedExpression */:
- case 198 /* OmittedExpression */:
- case 297 /* RawExpression */:
+ case 195 /* TemplateExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 199 /* OmittedExpression */:
return 19;
- case 181 /* TaggedTemplateExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return 18;
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return hasArguments ? 18 : 17;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return 17;
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return 16;
- case 190 /* PrefixUnaryExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 189 /* AwaitExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 190 /* AwaitExpression */:
return 15;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (operatorKind) {
case 50 /* ExclamationToken */:
case 51 /* TildeToken */:
@@ -8436,11 +8714,11 @@ var ts;
default:
return -1;
}
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return 4;
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return 2;
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return 1;
default:
return -1;
@@ -8463,21 +8741,15 @@ var ts;
return modificationCount;
}
function reattachFileDiagnostics(newFile) {
- if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) {
- return;
- }
- for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) {
- var diagnostic = _a[_i];
- diagnostic.file = newFile;
- }
+ ts.forEach(fileDiagnostics.get(newFile.fileName), function (diagnostic) { return diagnostic.file = newFile; });
}
function add(diagnostic) {
var diagnostics;
if (diagnostic.file) {
- diagnostics = fileDiagnostics[diagnostic.file.fileName];
+ diagnostics = fileDiagnostics.get(diagnostic.file.fileName);
if (!diagnostics) {
diagnostics = [];
- fileDiagnostics[diagnostic.file.fileName] = diagnostics;
+ fileDiagnostics.set(diagnostic.file.fileName, diagnostics);
}
}
else {
@@ -8494,16 +8766,16 @@ var ts;
function getDiagnostics(fileName) {
sortAndDeduplicate();
if (fileName) {
- return fileDiagnostics[fileName] || [];
+ return fileDiagnostics.get(fileName) || [];
}
var allDiagnostics = [];
function pushDiagnostic(d) {
allDiagnostics.push(d);
}
ts.forEach(nonFileDiagnostics, pushDiagnostic);
- for (var key in fileDiagnostics) {
- ts.forEach(fileDiagnostics[key], pushDiagnostic);
- }
+ fileDiagnostics.forEach(function (diagnostics) {
+ ts.forEach(diagnostics, pushDiagnostic);
+ });
return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
}
function sortAndDeduplicate() {
@@ -8512,9 +8784,9 @@ var ts;
}
diagnosticsModified = false;
nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
- for (var key in fileDiagnostics) {
- fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
- }
+ fileDiagnostics.forEach(function (diagnostics, key) {
+ fileDiagnostics.set(key, ts.sortAndDeduplicateDiagnostics(diagnostics));
+ });
}
}
ts.createDiagnosticCollection = createDiagnosticCollection;
@@ -8524,7 +8796,7 @@ var ts;
// the map below must be updated. Note that this regexp *does not* include the 'delete' character.
// There is no reason for this other than that JSON.stringify does not handle it either.
var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
- var escapedCharsMap = ts.createMap({
+ var escapedCharsMap = ts.createMapFromTemplate({
"\0": "\\0",
"\t": "\\t",
"\v": "\\v",
@@ -8544,13 +8816,12 @@ var ts;
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s) {
- s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
- return s;
- function getReplacement(c) {
- return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
- }
+ return s.replace(escapedCharsRegExp, getReplacement);
}
ts.escapeString = escapeString;
+ function getReplacement(c) {
+ return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
+ }
function isIntrinsicJsxName(name) {
var ch = name.substr(0, 1);
return ch.toLowerCase() === ch;
@@ -8707,168 +8978,77 @@ var ts;
*/
function getSourceFilesToEmit(host, targetSourceFile) {
var options = host.getCompilerOptions();
+ var isSourceFileFromExternalLibrary = function (file) { return host.isSourceFileFromExternalLibrary(file); };
if (options.outFile || options.out) {
var moduleKind = ts.getEmitModuleKind(options);
- var moduleEmitEnabled = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
- var sourceFiles = getAllEmittableSourceFiles();
+ var moduleEmitEnabled_1 = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
// Can emit only sources that are not declaration file and are either non module code or module with --module or --target es6 specified
- return ts.filter(sourceFiles, moduleEmitEnabled ? isNonDeclarationFile : isBundleEmitNonExternalModule);
+ return ts.filter(host.getSourceFiles(), function (sourceFile) {
+ return (moduleEmitEnabled_1 || !ts.isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary);
+ });
}
else {
- var sourceFiles = targetSourceFile === undefined ? getAllEmittableSourceFiles() : [targetSourceFile];
- return filterSourceFilesInDirectory(sourceFiles, function (file) { return host.isSourceFileFromExternalLibrary(file); });
- }
- function getAllEmittableSourceFiles() {
- return options.noEmitForJsFiles ? ts.filter(host.getSourceFiles(), function (sourceFile) { return !isSourceFileJavaScript(sourceFile); }) : host.getSourceFiles();
+ var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
+ return ts.filter(sourceFiles, function (sourceFile) { return sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary); });
}
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
- /** Don't call this for `--outFile`, just for `--outDir` or plain emit. */
- function filterSourceFilesInDirectory(sourceFiles, isSourceFileFromExternalLibrary) {
- return ts.filter(sourceFiles, function (file) { return shouldEmitInDirectory(file, isSourceFileFromExternalLibrary); });
- }
- ts.filterSourceFilesInDirectory = filterSourceFilesInDirectory;
- function isNonDeclarationFile(sourceFile) {
- return !isDeclarationFile(sourceFile);
- }
- /**
- * Whether a file should be emitted in a non-`--outFile` case.
- * Don't emit if source file is a declaration file, or was located under node_modules
- */
- function shouldEmitInDirectory(sourceFile, isSourceFileFromExternalLibrary) {
- return isNonDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
- }
- function isBundleEmitNonExternalModule(sourceFile) {
- return isNonDeclarationFile(sourceFile) && !ts.isExternalModule(sourceFile);
+ /** Don't call this for `--outFile`, just for `--outDir` or plain emit. `--outFile` needs additional checks. */
+ function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
}
+ ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
/**
- * Iterates over each source file to emit. The source files are expected to have been
- * transformed for use by the pretty printer.
- *
- * Originally part of `forEachExpectedEmitFile`, this functionality was extracted to support
- * transformations.
+ * Iterates over the source files that are expected to have an emit output.
*
* @param host An EmitHost.
- * @param sourceFiles The transformed source files to emit.
* @param action The action to execute.
+ * @param sourceFilesOrTargetSourceFile
+ * If an array, the full list of source files to emit.
+ * Else, calls `getSourceFilesToEmit` with the (optional) target source file to determine the list of source files to emit.
*/
- function forEachTransformedEmitFile(host, sourceFiles, action, emitOnlyDtsFiles) {
+ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
+ var sourceFiles = ts.isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile);
var options = host.getCompilerOptions();
- // Emit on each source file
if (options.outFile || options.out) {
- onBundledEmit(sourceFiles);
- }
- else {
- for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
- var sourceFile = sourceFiles_2[_i];
- // Don't emit if source file is a declaration file, or was located under node_modules
- if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
- // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
- // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
- var extension = ".js";
- if (options.jsx === 1 /* Preserve */) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1 /* JSX */) {
- // TypeScript source file preserving JSX syntax
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (options.declaration || emitOnlyDtsFiles) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, [sourceFile], /*isBundledEmit*/ false);
- }
- function onBundledEmit(sourceFiles) {
if (sourceFiles.length) {
var jsFilePath = options.outFile || options.out;
var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, /*isBundledEmit*/ true);
+ var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : "";
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, ts.createBundle(sourceFiles), emitOnlyDtsFiles);
+ }
+ }
+ else {
+ for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
+ var sourceFile = sourceFiles_1[_i];
+ var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, getOutputExtension(sourceFile, options));
+ var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
+ var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, sourceFile, emitOnlyDtsFiles);
}
}
}
- ts.forEachTransformedEmitFile = forEachTransformedEmitFile;
+ ts.forEachEmittedFile = forEachEmittedFile;
function getSourceMapFilePath(jsFilePath, options) {
return options.sourceMap ? jsFilePath + ".map" : undefined;
}
- /**
- * Iterates over the source files that are expected to have an emit output. This function
- * is used by the legacy emitter and the declaration emitter and should not be used by
- * the tree transforming emitter.
- *
- * @param host An EmitHost.
- * @param action The action to execute.
- * @param targetSourceFile An optional target source file to emit.
- */
- function forEachExpectedEmitFile(host, action, targetSourceFile, emitOnlyDtsFiles) {
- var options = host.getCompilerOptions();
- // Emit on each source file
- if (options.outFile || options.out) {
- onBundledEmit(host);
- }
- else {
- var sourceFiles = targetSourceFile === undefined ? getSourceFilesToEmit(host) : [targetSourceFile];
- for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
- var sourceFile = sourceFiles_3[_i];
- if (shouldEmitInDirectory(sourceFile, function (file) { return host.isSourceFileFromExternalLibrary(file); })) {
- onSingleFileEmit(host, sourceFile);
+ // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
+ // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
+ // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
+ function getOutputExtension(sourceFile, options) {
+ if (options.jsx === 1 /* Preserve */) {
+ if (isSourceFileJavaScript(sourceFile)) {
+ if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
+ return ".jsx";
}
}
- }
- function onSingleFileEmit(host, sourceFile) {
- // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
- // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
- // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
- var extension = ".js";
- if (options.jsx === 1 /* Preserve */) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1 /* JSX */) {
- // TypeScript source file preserving JSX syntax
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: declarationFilePath
- };
- action(emitFileNames, [sourceFile], /*isBundledEmit*/ false, emitOnlyDtsFiles);
- }
- function onBundledEmit(host) {
- // Can emit only sources that are not declaration file and are either non module code or module with
- // --module or --target es6 specified. Files included by searching under node_modules are also not emitted.
- var bundledSources = ts.filter(getSourceFilesToEmit(host), function (sourceFile) { return !isDeclarationFile(sourceFile) &&
- !host.isSourceFileFromExternalLibrary(sourceFile) &&
- (!ts.isExternalModule(sourceFile) ||
- !!ts.getEmitModuleKind(options)); });
- if (bundledSources.length) {
- var jsFilePath = options.outFile || options.out;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined
- };
- action(emitFileNames, bundledSources, /*isBundledEmit*/ true, emitOnlyDtsFiles);
+ else if (sourceFile.languageVariant === 1 /* JSX */) {
+ // TypeScript source file preserving JSX syntax
+ return ".jsx";
}
}
+ return ".js";
}
- ts.forEachExpectedEmitFile = forEachExpectedEmitFile;
function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
var commonSourceDirectory = host.getCommonSourceDirectory();
@@ -8893,7 +9073,7 @@ var ts;
ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap;
function getFirstConstructorWithBody(node) {
return ts.forEach(node.members, function (member) {
- if (member.kind === 150 /* Constructor */ && nodeIsPresent(member.body)) {
+ if (member.kind === 151 /* Constructor */ && nodeIsPresent(member.body)) {
return member;
}
});
@@ -8935,10 +9115,10 @@ var ts;
var setAccessor;
if (hasDynamicName(accessor)) {
firstAccessor = accessor;
- if (accessor.kind === 151 /* GetAccessor */) {
+ if (accessor.kind === 152 /* GetAccessor */) {
getAccessor = accessor;
}
- else if (accessor.kind === 152 /* SetAccessor */) {
+ else if (accessor.kind === 153 /* SetAccessor */) {
setAccessor = accessor;
}
else {
@@ -8947,7 +9127,7 @@ var ts;
}
else {
ts.forEach(declarations, function (member) {
- if ((member.kind === 151 /* GetAccessor */ || member.kind === 152 /* SetAccessor */)
+ if ((member.kind === 152 /* GetAccessor */ || member.kind === 153 /* SetAccessor */)
&& hasModifier(member, 32 /* Static */) === hasModifier(accessor, 32 /* Static */)) {
var memberName = getPropertyNameForPropertyNameNode(member.name);
var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
@@ -8958,10 +9138,10 @@ var ts;
else if (!secondAccessor) {
secondAccessor = member;
}
- if (member.kind === 151 /* GetAccessor */ && !getAccessor) {
+ if (member.kind === 152 /* GetAccessor */ && !getAccessor) {
getAccessor = member;
}
- if (member.kind === 152 /* SetAccessor */ && !setAccessor) {
+ if (member.kind === 153 /* SetAccessor */ && !setAccessor) {
setAccessor = member;
}
}
@@ -9224,7 +9404,7 @@ var ts;
ts.isAssignmentOperator = isAssignmentOperator;
/** Get `C` given `N` if `N` is in the position `class C extends N` where `N` is an ExpressionWithTypeArguments. */
function tryGetClassExtendingExpressionWithTypeArguments(node) {
- if (node.kind === 199 /* ExpressionWithTypeArguments */ &&
+ if (node.kind === 200 /* ExpressionWithTypeArguments */ &&
node.parent.token === 84 /* ExtendsKeyword */ &&
isClassLike(node.parent.parent)) {
return node.parent.parent;
@@ -9242,8 +9422,8 @@ var ts;
function isDestructuringAssignment(node) {
if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
var kind = node.left.kind;
- return kind === 176 /* ObjectLiteralExpression */
- || kind === 175 /* ArrayLiteralExpression */;
+ return kind === 177 /* ObjectLiteralExpression */
+ || kind === 176 /* ArrayLiteralExpression */;
}
return false;
}
@@ -9269,31 +9449,42 @@ var ts;
return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined;
}
ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
+ function isExpressionWithTypeArgumentsInClassImplementsClause(node) {
+ return node.kind === 200 /* ExpressionWithTypeArguments */
+ && isEntityNameExpression(node.expression)
+ && node.parent
+ && node.parent.token === 107 /* ImplementsKeyword */
+ && node.parent.parent
+ && isClassLike(node.parent.parent);
+ }
+ ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
return node.kind === 70 /* Identifier */ ||
- node.kind === 177 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression);
+ node.kind === 178 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression);
}
ts.isEntityNameExpression = isEntityNameExpression;
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
- return (node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node) ||
- (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node);
+ return (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) ||
+ (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node);
}
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
- function isEmptyObjectLiteralOrArrayLiteral(expression) {
- var kind = expression.kind;
- if (kind === 176 /* ObjectLiteralExpression */) {
- return expression.properties.length === 0;
- }
- if (kind === 175 /* ArrayLiteralExpression */) {
- return expression.elements.length === 0;
- }
- return false;
+ function isEmptyObjectLiteral(expression) {
+ return expression.kind === 177 /* ObjectLiteralExpression */ &&
+ expression.properties.length === 0;
+ }
+ ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
+ function isEmptyArrayLiteral(expression) {
+ return expression.kind === 176 /* ArrayLiteralExpression */ &&
+ expression.elements.length === 0;
}
- ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral;
+ ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
+ function isExportDefaultSymbol(symbol) {
+ return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */);
+ }
/** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
@@ -9333,47 +9524,6 @@ var ts;
}
return output;
}
- /**
- * Serialize an object graph into a JSON string. This is intended only for use on an acyclic graph
- * as the fallback implementation does not check for circular references by default.
- */
- ts.stringify = typeof JSON !== "undefined" && JSON.stringify
- ? JSON.stringify
- : stringifyFallback;
- /**
- * Serialize an object graph into a JSON string.
- */
- function stringifyFallback(value) {
- // JSON.stringify returns `undefined` here, instead of the string "undefined".
- return value === undefined ? undefined : stringifyValue(value);
- }
- function stringifyValue(value) {
- return typeof value === "string" ? "\"" + escapeString(value) + "\""
- : typeof value === "number" ? isFinite(value) ? String(value) : "null"
- : typeof value === "boolean" ? value ? "true" : "false"
- : typeof value === "object" && value ? ts.isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
- : "null";
- }
- function cycleCheck(cb, value) {
- ts.Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
- value.__cycle = true;
- var result = cb(value);
- delete value.__cycle;
- return result;
- }
- function stringifyArray(value) {
- return "[" + ts.reduceLeft(value, stringifyElement, "") + "]";
- }
- function stringifyElement(memo, value) {
- return (memo ? memo + "," : memo) + stringifyValue(value);
- }
- function stringifyObject(value) {
- return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}";
- }
- function stringifyProperty(memo, value, key) {
- return value === undefined || typeof value === "function" || key === "__cycle" ? memo
- : (memo ? memo + "," : memo) + ("\"" + escapeString(key) + "\":" + stringifyValue(value));
- }
var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
/**
* Converts a string to a base-64 encoded ASCII string.
@@ -9446,39 +9596,39 @@ var ts;
|| kind === 94 /* NullKeyword */) {
return true;
}
- else if (kind === 177 /* PropertyAccessExpression */) {
+ else if (kind === 178 /* PropertyAccessExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 178 /* ElementAccessExpression */) {
+ else if (kind === 179 /* ElementAccessExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1)
&& isSimpleExpressionWorker(node.argumentExpression, depth + 1);
}
- else if (kind === 190 /* PrefixUnaryExpression */
- || kind === 191 /* PostfixUnaryExpression */) {
+ else if (kind === 191 /* PrefixUnaryExpression */
+ || kind === 192 /* PostfixUnaryExpression */) {
return isSimpleExpressionWorker(node.operand, depth + 1);
}
- else if (kind === 192 /* BinaryExpression */) {
+ else if (kind === 193 /* BinaryExpression */) {
return node.operatorToken.kind !== 39 /* AsteriskAsteriskToken */
&& isSimpleExpressionWorker(node.left, depth + 1)
&& isSimpleExpressionWorker(node.right, depth + 1);
}
- else if (kind === 193 /* ConditionalExpression */) {
+ else if (kind === 194 /* ConditionalExpression */) {
return isSimpleExpressionWorker(node.condition, depth + 1)
&& isSimpleExpressionWorker(node.whenTrue, depth + 1)
&& isSimpleExpressionWorker(node.whenFalse, depth + 1);
}
- else if (kind === 188 /* VoidExpression */
- || kind === 187 /* TypeOfExpression */
- || kind === 186 /* DeleteExpression */) {
+ else if (kind === 189 /* VoidExpression */
+ || kind === 188 /* TypeOfExpression */
+ || kind === 187 /* DeleteExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 175 /* ArrayLiteralExpression */) {
+ else if (kind === 176 /* ArrayLiteralExpression */) {
return node.elements.length === 0;
}
- else if (kind === 176 /* ObjectLiteralExpression */) {
+ else if (kind === 177 /* ObjectLiteralExpression */) {
return node.properties.length === 0;
}
- else if (kind === 179 /* CallExpression */) {
+ else if (kind === 180 /* CallExpression */) {
if (!isSimpleExpressionWorker(node.expression, depth + 1)) {
return false;
}
@@ -9493,16 +9643,19 @@ var ts;
}
return false;
}
- var syntaxKindCache = ts.createMap();
+ var syntaxKindCache = [];
function formatSyntaxKind(kind) {
var syntaxKindEnum = ts.SyntaxKind;
if (syntaxKindEnum) {
- if (syntaxKindCache[kind]) {
- return syntaxKindCache[kind];
+ var cached = syntaxKindCache[kind];
+ if (cached !== undefined) {
+ return cached;
}
- for (var name_7 in syntaxKindEnum) {
- if (syntaxKindEnum[name_7] === kind) {
- return syntaxKindCache[kind] = kind.toString() + " (" + name_7 + ")";
+ for (var name in syntaxKindEnum) {
+ if (syntaxKindEnum[name] === kind) {
+ var result = kind + " (" + name + ")";
+ syntaxKindCache[kind] = result;
+ return result;
}
}
}
@@ -9511,6 +9664,14 @@ var ts;
}
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function getRangePos(range) {
+ return range ? range.pos : -1;
+ }
+ ts.getRangePos = getRangePos;
+ function getRangeEnd(range) {
+ return range ? range.end : -1;
+ }
+ ts.getRangeEnd = getRangeEnd;
/**
* Increases (or decreases) a position by the provided amount.
*
@@ -9642,11 +9803,11 @@ var ts;
* declaration.
*/
function isDeclarationNameOfEnumOrNamespace(node) {
- var parseNode = getParseTreeNode(node);
+ var parseNode = ts.getParseTreeNode(node);
if (parseNode) {
switch (parseNode.parent.kind) {
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
return parseNode === parseNode.parent.name;
}
}
@@ -9667,7 +9828,7 @@ var ts;
if (node.symbol) {
for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 226 /* ClassDeclaration */ && declaration !== node) {
+ if (declaration.kind === 228 /* ClassDeclaration */ && declaration !== node) {
return true;
}
}
@@ -9732,6 +9893,10 @@ var ts;
return node.kind === 70 /* Identifier */;
}
ts.isIdentifier = isIdentifier;
+ function isVoidExpression(node) {
+ return node.kind === 189 /* VoidExpression */;
+ }
+ ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
// Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`.
return isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
@@ -9744,16 +9909,16 @@ var ts;
ts.isModifier = isModifier;
// Names
function isQualifiedName(node) {
- return node.kind === 141 /* QualifiedName */;
+ return node.kind === 142 /* QualifiedName */;
}
ts.isQualifiedName = isQualifiedName;
function isComputedPropertyName(node) {
- return node.kind === 142 /* ComputedPropertyName */;
+ return node.kind === 143 /* ComputedPropertyName */;
}
ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
- return kind === 141 /* QualifiedName */
+ return kind === 142 /* QualifiedName */
|| kind === 70 /* Identifier */;
}
ts.isEntityName = isEntityName;
@@ -9762,7 +9927,7 @@ var ts;
return kind === 70 /* Identifier */
|| kind === 9 /* StringLiteral */
|| kind === 8 /* NumericLiteral */
- || kind === 142 /* ComputedPropertyName */;
+ || kind === 143 /* ComputedPropertyName */;
}
ts.isPropertyName = isPropertyName;
function isModuleName(node) {
@@ -9774,61 +9939,65 @@ var ts;
function isBindingName(node) {
var kind = node.kind;
return kind === 70 /* Identifier */
- || kind === 172 /* ObjectBindingPattern */
- || kind === 173 /* ArrayBindingPattern */;
+ || kind === 173 /* ObjectBindingPattern */
+ || kind === 174 /* ArrayBindingPattern */;
}
ts.isBindingName = isBindingName;
// Signature elements
function isTypeParameter(node) {
- return node.kind === 143 /* TypeParameter */;
+ return node.kind === 144 /* TypeParameter */;
}
ts.isTypeParameter = isTypeParameter;
function isParameter(node) {
- return node.kind === 144 /* Parameter */;
+ return node.kind === 145 /* Parameter */;
}
ts.isParameter = isParameter;
function isDecorator(node) {
- return node.kind === 145 /* Decorator */;
+ return node.kind === 146 /* Decorator */;
}
ts.isDecorator = isDecorator;
// Type members
function isMethodDeclaration(node) {
- return node.kind === 149 /* MethodDeclaration */;
+ return node.kind === 150 /* MethodDeclaration */;
}
ts.isMethodDeclaration = isMethodDeclaration;
function isClassElement(node) {
var kind = node.kind;
- return kind === 150 /* Constructor */
- || kind === 147 /* PropertyDeclaration */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 155 /* IndexSignature */
- || kind === 203 /* SemicolonClassElement */;
+ return kind === 151 /* Constructor */
+ || kind === 148 /* PropertyDeclaration */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 156 /* IndexSignature */
+ || kind === 205 /* SemicolonClassElement */;
}
ts.isClassElement = isClassElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
- return kind === 257 /* PropertyAssignment */
- || kind === 258 /* ShorthandPropertyAssignment */
- || kind === 259 /* SpreadAssignment */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 244 /* MissingDeclaration */;
+ return kind === 260 /* PropertyAssignment */
+ || kind === 261 /* ShorthandPropertyAssignment */
+ || kind === 262 /* SpreadAssignment */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 246 /* MissingDeclaration */;
}
ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
// Type
function isTypeNodeKind(kind) {
- return (kind >= 156 /* FirstTypeNode */ && kind <= 171 /* LastTypeNode */)
+ return (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */)
|| kind === 118 /* AnyKeyword */
|| kind === 132 /* NumberKeyword */
+ || kind === 133 /* ObjectKeyword */
|| kind === 121 /* BooleanKeyword */
- || kind === 134 /* StringKeyword */
- || kind === 135 /* SymbolKeyword */
+ || kind === 135 /* StringKeyword */
+ || kind === 136 /* SymbolKeyword */
+ || kind === 98 /* ThisKeyword */
|| kind === 104 /* VoidKeyword */
+ || kind === 138 /* UndefinedKeyword */
+ || kind === 94 /* NullKeyword */
|| kind === 129 /* NeverKeyword */
- || kind === 199 /* ExpressionWithTypeArguments */;
+ || kind === 200 /* ExpressionWithTypeArguments */;
}
/**
* Node test that determines whether a node is a valid type node.
@@ -9841,36 +10010,36 @@ var ts;
ts.isTypeNode = isTypeNode;
// Binding patterns
function isArrayBindingPattern(node) {
- return node.kind === 173 /* ArrayBindingPattern */;
+ return node.kind === 174 /* ArrayBindingPattern */;
}
ts.isArrayBindingPattern = isArrayBindingPattern;
function isObjectBindingPattern(node) {
- return node.kind === 172 /* ObjectBindingPattern */;
+ return node.kind === 173 /* ObjectBindingPattern */;
}
ts.isObjectBindingPattern = isObjectBindingPattern;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
- return kind === 173 /* ArrayBindingPattern */
- || kind === 172 /* ObjectBindingPattern */;
+ return kind === 174 /* ArrayBindingPattern */
+ || kind === 173 /* ObjectBindingPattern */;
}
return false;
}
ts.isBindingPattern = isBindingPattern;
function isAssignmentPattern(node) {
var kind = node.kind;
- return kind === 175 /* ArrayLiteralExpression */
- || kind === 176 /* ObjectLiteralExpression */;
+ return kind === 176 /* ArrayLiteralExpression */
+ || kind === 177 /* ObjectLiteralExpression */;
}
ts.isAssignmentPattern = isAssignmentPattern;
function isBindingElement(node) {
- return node.kind === 174 /* BindingElement */;
+ return node.kind === 175 /* BindingElement */;
}
ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
- return kind === 174 /* BindingElement */
- || kind === 198 /* OmittedExpression */;
+ return kind === 175 /* BindingElement */
+ || kind === 199 /* OmittedExpression */;
}
ts.isArrayBindingElement = isArrayBindingElement;
/**
@@ -9878,9 +10047,9 @@ var ts;
*/
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 174 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 175 /* BindingElement */:
return true;
}
return false;
@@ -9899,8 +10068,8 @@ var ts;
*/
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 172 /* ObjectBindingPattern */:
- case 176 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 177 /* ObjectLiteralExpression */:
return true;
}
return false;
@@ -9911,8 +10080,8 @@ var ts;
*/
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
return true;
}
return false;
@@ -9920,86 +10089,92 @@ var ts;
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
// Expression
function isArrayLiteralExpression(node) {
- return node.kind === 175 /* ArrayLiteralExpression */;
+ return node.kind === 176 /* ArrayLiteralExpression */;
}
ts.isArrayLiteralExpression = isArrayLiteralExpression;
function isObjectLiteralExpression(node) {
- return node.kind === 176 /* ObjectLiteralExpression */;
+ return node.kind === 177 /* ObjectLiteralExpression */;
}
ts.isObjectLiteralExpression = isObjectLiteralExpression;
function isPropertyAccessExpression(node) {
- return node.kind === 177 /* PropertyAccessExpression */;
+ return node.kind === 178 /* PropertyAccessExpression */;
}
ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isPropertyAccessOrQualifiedName(node) {
+ var kind = node.kind;
+ return kind === 178 /* PropertyAccessExpression */
+ || kind === 142 /* QualifiedName */;
+ }
+ ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
function isElementAccessExpression(node) {
- return node.kind === 178 /* ElementAccessExpression */;
+ return node.kind === 179 /* ElementAccessExpression */;
}
ts.isElementAccessExpression = isElementAccessExpression;
function isBinaryExpression(node) {
- return node.kind === 192 /* BinaryExpression */;
+ return node.kind === 193 /* BinaryExpression */;
}
ts.isBinaryExpression = isBinaryExpression;
function isConditionalExpression(node) {
- return node.kind === 193 /* ConditionalExpression */;
+ return node.kind === 194 /* ConditionalExpression */;
}
ts.isConditionalExpression = isConditionalExpression;
function isCallExpression(node) {
- return node.kind === 179 /* CallExpression */;
+ return node.kind === 180 /* CallExpression */;
}
ts.isCallExpression = isCallExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
- return kind === 194 /* TemplateExpression */
+ return kind === 195 /* TemplateExpression */
|| kind === 12 /* NoSubstitutionTemplateLiteral */;
}
ts.isTemplateLiteral = isTemplateLiteral;
function isSpreadExpression(node) {
- return node.kind === 196 /* SpreadElement */;
+ return node.kind === 197 /* SpreadElement */;
}
ts.isSpreadExpression = isSpreadExpression;
function isExpressionWithTypeArguments(node) {
- return node.kind === 199 /* ExpressionWithTypeArguments */;
+ return node.kind === 200 /* ExpressionWithTypeArguments */;
}
ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
- return kind === 177 /* PropertyAccessExpression */
- || kind === 178 /* ElementAccessExpression */
- || kind === 180 /* NewExpression */
- || kind === 179 /* CallExpression */
- || kind === 246 /* JsxElement */
- || kind === 247 /* JsxSelfClosingElement */
- || kind === 181 /* TaggedTemplateExpression */
- || kind === 175 /* ArrayLiteralExpression */
- || kind === 183 /* ParenthesizedExpression */
- || kind === 176 /* ObjectLiteralExpression */
- || kind === 197 /* ClassExpression */
- || kind === 184 /* FunctionExpression */
+ return kind === 178 /* PropertyAccessExpression */
+ || kind === 179 /* ElementAccessExpression */
+ || kind === 181 /* NewExpression */
+ || kind === 180 /* CallExpression */
+ || kind === 248 /* JsxElement */
+ || kind === 249 /* JsxSelfClosingElement */
+ || kind === 182 /* TaggedTemplateExpression */
+ || kind === 176 /* ArrayLiteralExpression */
+ || kind === 184 /* ParenthesizedExpression */
+ || kind === 177 /* ObjectLiteralExpression */
+ || kind === 198 /* ClassExpression */
+ || kind === 185 /* FunctionExpression */
|| kind === 70 /* Identifier */
|| kind === 11 /* RegularExpressionLiteral */
|| kind === 8 /* NumericLiteral */
|| kind === 9 /* StringLiteral */
|| kind === 12 /* NoSubstitutionTemplateLiteral */
- || kind === 194 /* TemplateExpression */
+ || kind === 195 /* TemplateExpression */
|| kind === 85 /* FalseKeyword */
|| kind === 94 /* NullKeyword */
|| kind === 98 /* ThisKeyword */
|| kind === 100 /* TrueKeyword */
|| kind === 96 /* SuperKeyword */
- || kind === 201 /* NonNullExpression */
- || kind === 297 /* RawExpression */;
+ || kind === 202 /* NonNullExpression */
+ || kind === 203 /* MetaProperty */;
}
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
ts.isLeftHandSideExpression = isLeftHandSideExpression;
function isUnaryExpressionKind(kind) {
- return kind === 190 /* PrefixUnaryExpression */
- || kind === 191 /* PostfixUnaryExpression */
- || kind === 186 /* DeleteExpression */
- || kind === 187 /* TypeOfExpression */
- || kind === 188 /* VoidExpression */
- || kind === 189 /* AwaitExpression */
- || kind === 182 /* TypeAssertionExpression */
+ return kind === 191 /* PrefixUnaryExpression */
+ || kind === 192 /* PostfixUnaryExpression */
+ || kind === 187 /* DeleteExpression */
+ || kind === 188 /* TypeOfExpression */
+ || kind === 189 /* VoidExpression */
+ || kind === 190 /* AwaitExpression */
+ || kind === 183 /* TypeAssertionExpression */
|| isLeftHandSideExpressionKind(kind);
}
function isUnaryExpression(node) {
@@ -10007,14 +10182,13 @@ var ts;
}
ts.isUnaryExpression = isUnaryExpression;
function isExpressionKind(kind) {
- return kind === 193 /* ConditionalExpression */
- || kind === 195 /* YieldExpression */
- || kind === 185 /* ArrowFunction */
- || kind === 192 /* BinaryExpression */
- || kind === 196 /* SpreadElement */
- || kind === 200 /* AsExpression */
- || kind === 198 /* OmittedExpression */
- || kind === 297 /* RawExpression */
+ return kind === 194 /* ConditionalExpression */
+ || kind === 196 /* YieldExpression */
+ || kind === 186 /* ArrowFunction */
+ || kind === 193 /* BinaryExpression */
+ || kind === 197 /* SpreadElement */
+ || kind === 201 /* AsExpression */
+ || kind === 199 /* OmittedExpression */
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -10023,16 +10197,16 @@ var ts;
ts.isExpression = isExpression;
function isAssertionExpression(node) {
var kind = node.kind;
- return kind === 182 /* TypeAssertionExpression */
- || kind === 200 /* AsExpression */;
+ return kind === 183 /* TypeAssertionExpression */
+ || kind === 201 /* AsExpression */;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 294 /* PartiallyEmittedExpression */;
+ return node.kind === 295 /* PartiallyEmittedExpression */;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 293 /* NotEmittedStatement */;
+ return node.kind === 294 /* NotEmittedStatement */;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -10041,17 +10215,17 @@ var ts;
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
function isOmittedExpression(node) {
- return node.kind === 198 /* OmittedExpression */;
+ return node.kind === 199 /* OmittedExpression */;
}
ts.isOmittedExpression = isOmittedExpression;
// Misc
function isTemplateSpan(node) {
- return node.kind === 202 /* TemplateSpan */;
+ return node.kind === 204 /* TemplateSpan */;
}
ts.isTemplateSpan = isTemplateSpan;
// Element
function isBlock(node) {
- return node.kind === 204 /* Block */;
+ return node.kind === 206 /* Block */;
}
ts.isBlock = isBlock;
function isConciseBody(node) {
@@ -10069,121 +10243,135 @@ var ts;
}
ts.isForInitializer = isForInitializer;
function isVariableDeclaration(node) {
- return node.kind === 223 /* VariableDeclaration */;
+ return node.kind === 225 /* VariableDeclaration */;
}
ts.isVariableDeclaration = isVariableDeclaration;
function isVariableDeclarationList(node) {
- return node.kind === 224 /* VariableDeclarationList */;
+ return node.kind === 226 /* VariableDeclarationList */;
}
ts.isVariableDeclarationList = isVariableDeclarationList;
function isCaseBlock(node) {
- return node.kind === 232 /* CaseBlock */;
+ return node.kind === 234 /* CaseBlock */;
}
ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
- return kind === 231 /* ModuleBlock */
- || kind === 230 /* ModuleDeclaration */;
+ return kind === 233 /* ModuleBlock */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 70 /* Identifier */;
}
ts.isModuleBody = isModuleBody;
+ function isNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 233 /* ModuleBlock */
+ || kind === 232 /* ModuleDeclaration */;
+ }
+ ts.isNamespaceBody = isNamespaceBody;
+ function isJSDocNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 70 /* Identifier */
+ || kind === 232 /* ModuleDeclaration */;
+ }
+ ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
function isImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */;
+ return node.kind === 236 /* ImportEqualsDeclaration */;
}
ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportClause(node) {
- return node.kind === 236 /* ImportClause */;
+ return node.kind === 238 /* ImportClause */;
}
ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
- return kind === 238 /* NamedImports */
- || kind === 237 /* NamespaceImport */;
+ return kind === 240 /* NamedImports */
+ || kind === 239 /* NamespaceImport */;
}
ts.isNamedImportBindings = isNamedImportBindings;
function isImportSpecifier(node) {
- return node.kind === 239 /* ImportSpecifier */;
+ return node.kind === 241 /* ImportSpecifier */;
}
ts.isImportSpecifier = isImportSpecifier;
function isNamedExports(node) {
- return node.kind === 242 /* NamedExports */;
+ return node.kind === 244 /* NamedExports */;
}
ts.isNamedExports = isNamedExports;
function isExportSpecifier(node) {
- return node.kind === 243 /* ExportSpecifier */;
+ return node.kind === 245 /* ExportSpecifier */;
}
ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
- return node.kind === 230 /* ModuleDeclaration */ || node.kind === 229 /* EnumDeclaration */;
+ return node.kind === 232 /* ModuleDeclaration */ || node.kind === 231 /* EnumDeclaration */;
}
ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
function isDeclarationKind(kind) {
- return kind === 185 /* ArrowFunction */
- || kind === 174 /* BindingElement */
- || kind === 226 /* ClassDeclaration */
- || kind === 197 /* ClassExpression */
- || kind === 150 /* Constructor */
- || kind === 229 /* EnumDeclaration */
- || kind === 260 /* EnumMember */
- || kind === 243 /* ExportSpecifier */
- || kind === 225 /* FunctionDeclaration */
- || kind === 184 /* FunctionExpression */
- || kind === 151 /* GetAccessor */
- || kind === 236 /* ImportClause */
- || kind === 234 /* ImportEqualsDeclaration */
- || kind === 239 /* ImportSpecifier */
- || kind === 227 /* InterfaceDeclaration */
- || kind === 149 /* MethodDeclaration */
- || kind === 148 /* MethodSignature */
- || kind === 230 /* ModuleDeclaration */
- || kind === 233 /* NamespaceExportDeclaration */
- || kind === 237 /* NamespaceImport */
- || kind === 144 /* Parameter */
- || kind === 257 /* PropertyAssignment */
- || kind === 147 /* PropertyDeclaration */
- || kind === 146 /* PropertySignature */
- || kind === 152 /* SetAccessor */
- || kind === 258 /* ShorthandPropertyAssignment */
- || kind === 228 /* TypeAliasDeclaration */
- || kind === 143 /* TypeParameter */
- || kind === 223 /* VariableDeclaration */
- || kind === 285 /* JSDocTypedefTag */;
+ return kind === 186 /* ArrowFunction */
+ || kind === 175 /* BindingElement */
+ || kind === 228 /* ClassDeclaration */
+ || kind === 198 /* ClassExpression */
+ || kind === 151 /* Constructor */
+ || kind === 231 /* EnumDeclaration */
+ || kind === 263 /* EnumMember */
+ || kind === 245 /* ExportSpecifier */
+ || kind === 227 /* FunctionDeclaration */
+ || kind === 185 /* FunctionExpression */
+ || kind === 152 /* GetAccessor */
+ || kind === 238 /* ImportClause */
+ || kind === 236 /* ImportEqualsDeclaration */
+ || kind === 241 /* ImportSpecifier */
+ || kind === 229 /* InterfaceDeclaration */
+ || kind === 252 /* JsxAttribute */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 149 /* MethodSignature */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 235 /* NamespaceExportDeclaration */
+ || kind === 239 /* NamespaceImport */
+ || kind === 145 /* Parameter */
+ || kind === 260 /* PropertyAssignment */
+ || kind === 148 /* PropertyDeclaration */
+ || kind === 147 /* PropertySignature */
+ || kind === 153 /* SetAccessor */
+ || kind === 261 /* ShorthandPropertyAssignment */
+ || kind === 230 /* TypeAliasDeclaration */
+ || kind === 144 /* TypeParameter */
+ || kind === 225 /* VariableDeclaration */
+ || kind === 289 /* JSDocTypedefTag */;
}
function isDeclarationStatementKind(kind) {
- return kind === 225 /* FunctionDeclaration */
- || kind === 244 /* MissingDeclaration */
- || kind === 226 /* ClassDeclaration */
- || kind === 227 /* InterfaceDeclaration */
- || kind === 228 /* TypeAliasDeclaration */
- || kind === 229 /* EnumDeclaration */
- || kind === 230 /* ModuleDeclaration */
- || kind === 235 /* ImportDeclaration */
- || kind === 234 /* ImportEqualsDeclaration */
- || kind === 241 /* ExportDeclaration */
- || kind === 240 /* ExportAssignment */
- || kind === 233 /* NamespaceExportDeclaration */;
+ return kind === 227 /* FunctionDeclaration */
+ || kind === 246 /* MissingDeclaration */
+ || kind === 228 /* ClassDeclaration */
+ || kind === 229 /* InterfaceDeclaration */
+ || kind === 230 /* TypeAliasDeclaration */
+ || kind === 231 /* EnumDeclaration */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 237 /* ImportDeclaration */
+ || kind === 236 /* ImportEqualsDeclaration */
+ || kind === 243 /* ExportDeclaration */
+ || kind === 242 /* ExportAssignment */
+ || kind === 235 /* NamespaceExportDeclaration */;
}
function isStatementKindButNotDeclarationKind(kind) {
- return kind === 215 /* BreakStatement */
- || kind === 214 /* ContinueStatement */
- || kind === 222 /* DebuggerStatement */
- || kind === 209 /* DoStatement */
- || kind === 207 /* ExpressionStatement */
- || kind === 206 /* EmptyStatement */
- || kind === 212 /* ForInStatement */
- || kind === 213 /* ForOfStatement */
- || kind === 211 /* ForStatement */
- || kind === 208 /* IfStatement */
- || kind === 219 /* LabeledStatement */
- || kind === 216 /* ReturnStatement */
- || kind === 218 /* SwitchStatement */
- || kind === 220 /* ThrowStatement */
- || kind === 221 /* TryStatement */
- || kind === 205 /* VariableStatement */
- || kind === 210 /* WhileStatement */
- || kind === 217 /* WithStatement */
- || kind === 293 /* NotEmittedStatement */
- || kind === 296 /* EndOfDeclarationMarker */
- || kind === 295 /* MergeDeclarationMarker */;
+ return kind === 217 /* BreakStatement */
+ || kind === 216 /* ContinueStatement */
+ || kind === 224 /* DebuggerStatement */
+ || kind === 211 /* DoStatement */
+ || kind === 209 /* ExpressionStatement */
+ || kind === 208 /* EmptyStatement */
+ || kind === 214 /* ForInStatement */
+ || kind === 215 /* ForOfStatement */
+ || kind === 213 /* ForStatement */
+ || kind === 210 /* IfStatement */
+ || kind === 221 /* LabeledStatement */
+ || kind === 218 /* ReturnStatement */
+ || kind === 220 /* SwitchStatement */
+ || kind === 222 /* ThrowStatement */
+ || kind === 223 /* TryStatement */
+ || kind === 207 /* VariableStatement */
+ || kind === 212 /* WhileStatement */
+ || kind === 219 /* WithStatement */
+ || kind === 294 /* NotEmittedStatement */
+ || kind === 297 /* EndOfDeclarationMarker */
+ || kind === 296 /* MergeDeclarationMarker */;
}
function isDeclaration(node) {
return isDeclarationKind(node.kind);
@@ -10204,93 +10392,104 @@ var ts;
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
|| isDeclarationStatementKind(kind)
- || kind === 204 /* Block */;
+ || kind === 206 /* Block */;
}
ts.isStatement = isStatement;
// Module references
function isModuleReference(node) {
var kind = node.kind;
- return kind === 245 /* ExternalModuleReference */
- || kind === 141 /* QualifiedName */
+ return kind === 247 /* ExternalModuleReference */
+ || kind === 142 /* QualifiedName */
|| kind === 70 /* Identifier */;
}
ts.isModuleReference = isModuleReference;
// JSX
function isJsxOpeningElement(node) {
- return node.kind === 248 /* JsxOpeningElement */;
+ return node.kind === 250 /* JsxOpeningElement */;
}
ts.isJsxOpeningElement = isJsxOpeningElement;
function isJsxClosingElement(node) {
- return node.kind === 249 /* JsxClosingElement */;
+ return node.kind === 251 /* JsxClosingElement */;
}
ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 98 /* ThisKeyword */
|| kind === 70 /* Identifier */
- || kind === 177 /* PropertyAccessExpression */;
+ || kind === 178 /* PropertyAccessExpression */;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
function isJsxChild(node) {
var kind = node.kind;
- return kind === 246 /* JsxElement */
- || kind === 252 /* JsxExpression */
- || kind === 247 /* JsxSelfClosingElement */
+ return kind === 248 /* JsxElement */
+ || kind === 255 /* JsxExpression */
+ || kind === 249 /* JsxSelfClosingElement */
|| kind === 10 /* JsxText */;
}
ts.isJsxChild = isJsxChild;
+ function isJsxAttributes(node) {
+ var kind = node.kind;
+ return kind === 253 /* JsxAttributes */;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
- return kind === 250 /* JsxAttribute */
- || kind === 251 /* JsxSpreadAttribute */;
+ return kind === 252 /* JsxAttribute */
+ || kind === 254 /* JsxSpreadAttribute */;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
function isJsxSpreadAttribute(node) {
- return node.kind === 251 /* JsxSpreadAttribute */;
+ return node.kind === 254 /* JsxSpreadAttribute */;
}
ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxAttribute(node) {
- return node.kind === 250 /* JsxAttribute */;
+ return node.kind === 252 /* JsxAttribute */;
}
ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
- || kind === 252 /* JsxExpression */;
+ || kind === 255 /* JsxExpression */;
}
ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
+ function isJsxOpeningLikeElement(node) {
+ var kind = node.kind;
+ return kind === 250 /* JsxOpeningElement */
+ || kind === 249 /* JsxSelfClosingElement */;
+ }
+ ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
// Clauses
function isCaseOrDefaultClause(node) {
var kind = node.kind;
- return kind === 253 /* CaseClause */
- || kind === 254 /* DefaultClause */;
+ return kind === 256 /* CaseClause */
+ || kind === 257 /* DefaultClause */;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isHeritageClause(node) {
- return node.kind === 255 /* HeritageClause */;
+ return node.kind === 258 /* HeritageClause */;
}
ts.isHeritageClause = isHeritageClause;
function isCatchClause(node) {
- return node.kind === 256 /* CatchClause */;
+ return node.kind === 259 /* CatchClause */;
}
ts.isCatchClause = isCatchClause;
// Property assignments
function isPropertyAssignment(node) {
- return node.kind === 257 /* PropertyAssignment */;
+ return node.kind === 260 /* PropertyAssignment */;
}
ts.isPropertyAssignment = isPropertyAssignment;
function isShorthandPropertyAssignment(node) {
- return node.kind === 258 /* ShorthandPropertyAssignment */;
+ return node.kind === 261 /* ShorthandPropertyAssignment */;
}
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
// Enum
function isEnumMember(node) {
- return node.kind === 260 /* EnumMember */;
+ return node.kind === 263 /* EnumMember */;
}
ts.isEnumMember = isEnumMember;
// Top-level nodes
function isSourceFile(node) {
- return node.kind === 261 /* SourceFile */;
+ return node.kind === 264 /* SourceFile */;
}
ts.isSourceFile = isSourceFile;
function isWatchSet(options) {
@@ -10303,12 +10502,13 @@ var ts;
function getDefaultLibFileName(options) {
switch (options.target) {
case 5 /* ESNext */:
+ return "lib.esnext.full.d.ts";
case 4 /* ES2017 */:
- return "lib.es2017.d.ts";
+ return "lib.es2017.full.d.ts";
case 3 /* ES2016 */:
- return "lib.es2016.d.ts";
+ return "lib.es2016.full.d.ts";
case 2 /* ES2015 */:
- return "lib.es6.d.ts";
+ return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
default:
return "lib.d.ts";
}
@@ -10516,13 +10716,13 @@ var ts;
oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
}
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength:*/ newEndN - oldStartN);
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
}
ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
function getTypeParameterOwner(d) {
- if (d && d.kind === 143 /* TypeParameter */) {
+ if (d && d.kind === 144 /* TypeParameter */) {
for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229 /* InterfaceDeclaration */) {
return current;
}
}
@@ -10530,11 +10730,11 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 150 /* Constructor */ && ts.isClassLike(node.parent.parent);
+ return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 151 /* Constructor */ && ts.isClassLike(node.parent.parent);
}
ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 174 /* BindingElement */ || ts.isBindingPattern(node))) {
+ while (node && (node.kind === 175 /* BindingElement */ || ts.isBindingPattern(node))) {
node = node.parent;
}
return node;
@@ -10542,14 +10742,14 @@ var ts;
function getCombinedModifierFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = ts.getModifierFlags(node);
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
node = node.parent;
}
- if (node && node.kind === 224 /* VariableDeclarationList */) {
+ if (node && node.kind === 226 /* VariableDeclarationList */) {
flags |= ts.getModifierFlags(node);
node = node.parent;
}
- if (node && node.kind === 205 /* VariableStatement */) {
+ if (node && node.kind === 207 /* VariableStatement */) {
flags |= ts.getModifierFlags(node);
}
return flags;
@@ -10565,23 +10765,23 @@ var ts;
function getCombinedNodeFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = node.flags;
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
node = node.parent;
}
- if (node && node.kind === 224 /* VariableDeclarationList */) {
+ if (node && node.kind === 226 /* VariableDeclarationList */) {
flags |= node.flags;
node = node.parent;
}
- if (node && node.kind === 205 /* VariableStatement */) {
+ if (node && node.kind === 207 /* VariableStatement */) {
flags |= node.flags;
}
return flags;
}
ts.getCombinedNodeFlags = getCombinedNodeFlags;
/**
- * Checks to see if the locale is in the appropriate format,
- * and if it is, attempts to set the appropriate language.
- */
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
function validateLocaleAndSetLanguage(locale, sys, errors) {
var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
if (!matchResult) {
@@ -10632,27 +10832,60 @@ var ts;
}
}
ts.validateLocaleAndSetLanguage = validateLocaleAndSetLanguage;
+ function getOriginalNode(node, nodeTest) {
+ if (node) {
+ while (node.original !== undefined) {
+ node = node.original;
+ }
+ }
+ return !nodeTest || nodeTest(node) ? node : undefined;
+ }
+ ts.getOriginalNode = getOriginalNode;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node) {
+ return (node.flags & 8 /* Synthesized */) === 0;
+ }
+ ts.isParseTreeNode = isParseTreeNode;
+ function getParseTreeNode(node, nodeTest) {
+ if (node === undefined || isParseTreeNode(node)) {
+ return node;
+ }
+ node = getOriginalNode(node);
+ if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
+ return node;
+ }
+ return undefined;
+ }
+ ts.getParseTreeNode = getParseTreeNode;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeIdentifier(identifier) {
+ return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier;
+ }
+ ts.unescapeIdentifier = unescapeIdentifier;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
/// <reference path="utilities.ts"/>
-/* @internal */
var ts;
(function (ts) {
- var NodeConstructor;
- var SourceFileConstructor;
- function createNode(kind, location, flags) {
- var ConstructorForKind = kind === 261 /* SourceFile */
- ? (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))
- : (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()));
- var node = location
- ? new ConstructorForKind(kind, location.pos, location.end)
- : new ConstructorForKind(kind, /*pos*/ -1, /*end*/ -1);
- node.flags = flags | 8 /* Synthesized */;
+ function createSynthesizedNode(kind) {
+ var node = ts.createNode(kind, -1, -1);
+ node.flags |= 8 /* Synthesized */;
return node;
}
+ /* @internal */
function updateNode(updated, original) {
if (updated !== original) {
setOriginalNode(updated, original);
+ setTextRange(updated, original);
if (original.startsOnNewLine) {
updated.startsOnNewLine = true;
}
@@ -10661,7 +10894,10 @@ var ts;
return updated;
}
ts.updateNode = updateNode;
- function createNodeArray(elements, location, hasTrailingComma) {
+ /**
+ * Make `elements` into a `NodeArray<T>`. If `elements` is `undefined`, returns an empty `NodeArray<T>`.
+ */
+ function createNodeArray(elements, hasTrailingComma) {
if (elements) {
if (ts.isNodeArray(elements)) {
return elements;
@@ -10671,38 +10907,22 @@ var ts;
elements = [];
}
var array = elements;
- if (location) {
- array.pos = location.pos;
- array.end = location.end;
- }
- else {
- array.pos = -1;
- array.end = -1;
- }
- if (hasTrailingComma) {
- array.hasTrailingComma = true;
- }
+ array.pos = -1;
+ array.end = -1;
+ array.hasTrailingComma = hasTrailingComma;
return array;
}
ts.createNodeArray = createNodeArray;
- function createSynthesizedNode(kind, startsOnNewLine) {
- var node = createNode(kind, /*location*/ undefined);
- node.startsOnNewLine = startsOnNewLine;
- return node;
- }
- ts.createSynthesizedNode = createSynthesizedNode;
- function createSynthesizedNodeArray(elements) {
- return createNodeArray(elements, /*location*/ undefined);
- }
- ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
/**
* Creates a shallow, memberwise clone of a node with no source map location.
*/
+ /* @internal */
function getSynthesizedClone(node) {
// We don't use "clone" from core.ts here, as we need to preserve the prototype chain of
// the original node. We also need to exclude specific properties and only include own-
// properties (to skip members already defined on the shared prototype).
- var clone = createNode(node.kind, /*location*/ undefined, node.flags);
+ var clone = createSynthesizedNode(node.kind);
+ clone.flags |= node.flags;
setOriginalNode(clone, node);
for (var key in node) {
if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) {
@@ -10713,54 +10933,50 @@ var ts;
return clone;
}
ts.getSynthesizedClone = getSynthesizedClone;
- /**
- * Creates a shallow, memberwise clone of a node for mutation.
- */
- function getMutableClone(node) {
- var clone = getSynthesizedClone(node);
- clone.pos = node.pos;
- clone.end = node.end;
- clone.parent = node.parent;
- return clone;
- }
- ts.getMutableClone = getMutableClone;
- function createLiteral(value, location) {
+ function createLiteral(value) {
if (typeof value === "number") {
- var node = createNode(8 /* NumericLiteral */, location, /*flags*/ undefined);
- node.text = value.toString();
- return node;
+ return createNumericLiteral(value + "");
}
- else if (typeof value === "boolean") {
- return createNode(value ? 100 /* TrueKeyword */ : 85 /* FalseKeyword */, location, /*flags*/ undefined);
+ if (typeof value === "boolean") {
+ return value ? createTrue() : createFalse();
}
- else if (typeof value === "string") {
- var node = createNode(9 /* StringLiteral */, location, /*flags*/ undefined);
- node.text = value;
- return node;
- }
- else if (value) {
- var node = createNode(9 /* StringLiteral */, location, /*flags*/ undefined);
- node.textSourceNode = value;
- node.text = value.text;
- return node;
+ if (typeof value === "string") {
+ return createStringLiteral(value);
}
+ return createLiteralFromNode(value);
}
ts.createLiteral = createLiteral;
+ function createNumericLiteral(value) {
+ var node = createSynthesizedNode(8 /* NumericLiteral */);
+ node.text = value;
+ node.numericLiteralFlags = 0;
+ return node;
+ }
+ ts.createNumericLiteral = createNumericLiteral;
+ function createStringLiteral(text) {
+ var node = createSynthesizedNode(9 /* StringLiteral */);
+ node.text = text;
+ return node;
+ }
+ function createLiteralFromNode(sourceNode) {
+ var node = createStringLiteral(sourceNode.text);
+ node.textSourceNode = sourceNode;
+ return node;
+ }
// Identifiers
- var nextAutoGenerateId = 0;
- function createIdentifier(text, location) {
- var node = createNode(70 /* Identifier */, location);
+ function createIdentifier(text) {
+ var node = createSynthesizedNode(70 /* Identifier */);
node.text = ts.escapeIdentifier(text);
- node.originalKeywordKind = ts.stringToToken(text);
+ node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */;
node.autoGenerateKind = 0 /* None */;
node.autoGenerateId = 0;
return node;
}
ts.createIdentifier = createIdentifier;
- function createTempVariable(recordTempVariable, location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ var nextAutoGenerateId = 0;
+ /** Create a unique temporary variable. */
+ function createTempVariable(recordTempVariable) {
+ var name = createIdentifier("");
name.autoGenerateKind = 1 /* Auto */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
@@ -10770,98 +10986,399 @@ var ts;
return name;
}
ts.createTempVariable = createTempVariable;
- function createLoopVariable(location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique temporary variable for use in a loop. */
+ function createLoopVariable() {
+ var name = createIdentifier("");
name.autoGenerateKind = 2 /* Loop */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createLoopVariable = createLoopVariable;
- function createUniqueName(text, location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = text;
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique name based on the supplied text. */
+ function createUniqueName(text) {
+ var name = createIdentifier(text);
name.autoGenerateKind = 3 /* Unique */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createUniqueName = createUniqueName;
- function getGeneratedNameForNode(node, location) {
- var name = createNode(70 /* Identifier */, location);
- name.original = node;
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique name generated for a node. */
+ function getGeneratedNameForNode(node) {
+ var name = createIdentifier("");
name.autoGenerateKind = 4 /* Node */;
name.autoGenerateId = nextAutoGenerateId;
+ name.original = node;
nextAutoGenerateId++;
return name;
}
ts.getGeneratedNameForNode = getGeneratedNameForNode;
// Punctuation
function createToken(token) {
- return createNode(token);
+ return createSynthesizedNode(token);
}
ts.createToken = createToken;
// Reserved words
function createSuper() {
- var node = createNode(96 /* SuperKeyword */);
- return node;
+ return createSynthesizedNode(96 /* SuperKeyword */);
}
ts.createSuper = createSuper;
- function createThis(location) {
- var node = createNode(98 /* ThisKeyword */, location);
- return node;
+ function createThis() {
+ return createSynthesizedNode(98 /* ThisKeyword */);
}
ts.createThis = createThis;
function createNull() {
- var node = createNode(94 /* NullKeyword */);
- return node;
+ return createSynthesizedNode(94 /* NullKeyword */);
}
ts.createNull = createNull;
+ function createTrue() {
+ return createSynthesizedNode(100 /* TrueKeyword */);
+ }
+ ts.createTrue = createTrue;
+ function createFalse() {
+ return createSynthesizedNode(85 /* FalseKeyword */);
+ }
+ ts.createFalse = createFalse;
// Names
- function createComputedPropertyName(expression, location) {
- var node = createNode(142 /* ComputedPropertyName */, location);
+ function createQualifiedName(left, right) {
+ var node = createSynthesizedNode(142 /* QualifiedName */);
+ node.left = left;
+ node.right = asName(right);
+ return node;
+ }
+ ts.createQualifiedName = createQualifiedName;
+ function updateQualifiedName(node, left, right) {
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createQualifiedName(left, right), node)
+ : node;
+ }
+ ts.updateQualifiedName = updateQualifiedName;
+ function createComputedPropertyName(expression) {
+ var node = createSynthesizedNode(143 /* ComputedPropertyName */);
node.expression = expression;
return node;
}
ts.createComputedPropertyName = createComputedPropertyName;
function updateComputedPropertyName(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createComputedPropertyName(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createComputedPropertyName(expression), node)
+ : node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
+ // Type Elements
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var signatureDeclaration = createSynthesizedNode(kind);
+ signatureDeclaration.typeParameters = asNodeArray(typeParameters);
+ signatureDeclaration.parameters = asNodeArray(parameters);
+ signatureDeclaration.type = type;
+ return signatureDeclaration;
+ }
+ ts.createSignatureDeclaration = createSignatureDeclaration;
+ function updateSignatureDeclaration(node, typeParameters, parameters, type) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ ? updateNode(createSignatureDeclaration(node.kind, typeParameters, parameters, type), node)
+ : node;
+ }
+ function createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(159 /* FunctionType */, typeParameters, parameters, type);
+ }
+ ts.createFunctionTypeNode = createFunctionTypeNode;
+ function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateFunctionTypeNode = updateFunctionTypeNode;
+ function createConstructorTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160 /* ConstructorType */, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(154 /* CallSignature */, typeParameters, parameters, type);
+ }
+ ts.createCallSignatureDeclaration = createCallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155 /* ConstructSignature */, typeParameters, parameters, type);
+ }
+ ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var methodSignature = createSignatureDeclaration(149 /* MethodSignature */, typeParameters, parameters, type);
+ methodSignature.name = asName(name);
+ methodSignature.questionToken = questionToken;
+ return methodSignature;
+ }
+ ts.createMethodSignature = createMethodSignature;
+ function updateMethodSignature(node, typeParameters, parameters, type, name, questionToken) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.name !== name
+ || node.questionToken !== questionToken
+ ? updateNode(createMethodSignature(typeParameters, parameters, type, name, questionToken), node)
+ : node;
+ }
+ ts.updateMethodSignature = updateMethodSignature;
+ // Types
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createThisTypeNode() {
+ return createSynthesizedNode(168 /* ThisType */);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createLiteralTypeNode(literal) {
+ var literalTypeNode = createSynthesizedNode(172 /* LiteralType */);
+ literalTypeNode.literal = literal;
+ return literalTypeNode;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
+ function createTypeReferenceNode(typeName, typeArguments) {
+ var typeReference = createSynthesizedNode(158 /* TypeReference */);
+ typeReference.typeName = asName(typeName);
+ typeReference.typeArguments = asNodeArray(typeArguments);
+ return typeReference;
+ }
+ ts.createTypeReferenceNode = createTypeReferenceNode;
+ function updateTypeReferenceNode(node, typeName, typeArguments) {
+ return node.typeName !== typeName
+ || node.typeArguments !== typeArguments
+ ? updateNode(createTypeReferenceNode(typeName, typeArguments), node)
+ : node;
+ }
+ ts.updateTypeReferenceNode = updateTypeReferenceNode;
+ function createTypePredicateNode(parameterName, type) {
+ var typePredicateNode = createSynthesizedNode(157 /* TypePredicate */);
+ typePredicateNode.parameterName = asName(parameterName);
+ typePredicateNode.type = type;
+ return typePredicateNode;
+ }
+ ts.createTypePredicateNode = createTypePredicateNode;
+ function updateTypePredicateNode(node, parameterName, type) {
+ return node.parameterName !== parameterName
+ || node.type !== type
+ ? updateNode(createTypePredicateNode(parameterName, type), node)
+ : node;
+ }
+ ts.updateTypePredicateNode = updateTypePredicateNode;
+ function createTypeQueryNode(exprName) {
+ var typeQueryNode = createSynthesizedNode(161 /* TypeQuery */);
+ typeQueryNode.exprName = exprName;
+ return typeQueryNode;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName ? updateNode(createTypeQueryNode(exprName), node) : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createArrayTypeNode(elementType) {
+ var arrayTypeNode = createSynthesizedNode(163 /* ArrayType */);
+ arrayTypeNode.elementType = elementType;
+ return arrayTypeNode;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var unionTypeNode = createSynthesizedNode(kind);
+ unionTypeNode.types = createNodeArray(types);
+ return unionTypeNode;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members) {
+ var typeLiteralNode = createSynthesizedNode(162 /* TypeLiteral */);
+ typeLiteralNode.members = createNodeArray(members);
+ return typeLiteralNode;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createTupleTypeNode(elementTypes) {
+ var tupleTypeNode = createSynthesizedNode(164 /* TupleType */);
+ tupleTypeNode.elementTypes = createNodeArray(elementTypes);
+ return tupleTypeNode;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var mappedTypeNode = createSynthesizedNode(171 /* MappedType */);
+ mappedTypeNode.readonlyToken = readonlyToken;
+ mappedTypeNode.typeParameter = typeParameter;
+ mappedTypeNode.questionToken = questionToken;
+ mappedTypeNode.type = type;
+ return mappedTypeNode;
+ }
+ ts.createMappedTypeNode = createMappedTypeNode;
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, questionToken, type) {
+ return node.readonlyToken !== readonlyToken
+ || node.typeParameter !== typeParameter
+ || node.questionToken !== questionToken
+ || node.type !== type
+ ? updateNode(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node)
+ : node;
+ }
+ ts.updateMappedTypeNode = updateMappedTypeNode;
+ function createTypeOperatorNode(type) {
+ var typeOperatorNode = createSynthesizedNode(169 /* TypeOperator */);
+ typeOperatorNode.operator = 126 /* KeyOfKeyword */;
+ typeOperatorNode.type = type;
+ return typeOperatorNode;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var indexedAccessTypeNode = createSynthesizedNode(170 /* IndexedAccessType */);
+ indexedAccessTypeNode.objectType = objectType;
+ indexedAccessTypeNode.indexType = indexType;
+ return indexedAccessTypeNode;
+ }
+ ts.createIndexedAccessTypeNode = createIndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node, objectType, indexType) {
+ return node.objectType !== objectType
+ || node.indexType !== indexType
+ ? updateNode(createIndexedAccessTypeNode(objectType, indexType), node)
+ : node;
+ }
+ ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode;
+ // Type Declarations
+ function createTypeParameterDeclaration(name, constraint, defaultType) {
+ var typeParameter = createSynthesizedNode(144 /* TypeParameter */);
+ typeParameter.name = asName(name);
+ typeParameter.constraint = constraint;
+ typeParameter.default = defaultType;
+ return typeParameter;
+ }
+ ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
+ return node.name !== name
+ || node.constraint !== constraint
+ || node.default !== defaultType
+ ? updateNode(createTypeParameterDeclaration(name, constraint, defaultType), node)
+ : node;
+ }
+ ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
+ // Signature elements
+ function createPropertySignature(name, questionToken, type, initializer) {
+ var propertySignature = createSynthesizedNode(147 /* PropertySignature */);
+ propertySignature.name = asName(name);
+ propertySignature.questionToken = questionToken;
+ propertySignature.type = type;
+ propertySignature.initializer = initializer;
+ return propertySignature;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, name, questionToken, type, initializer) {
+ return node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
+ function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) {
+ var indexSignature = createSynthesizedNode(156 /* IndexSignature */);
+ indexSignature.decorators = asNodeArray(decorators);
+ indexSignature.modifiers = asNodeArray(modifiers);
+ indexSignature.parameters = createNodeArray(parameters);
+ indexSignature.type = type;
+ return indexSignature;
+ }
+ ts.createIndexSignatureDeclaration = createIndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignatureDeclaration(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration;
// Signature elements
- function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer, location, flags) {
- var node = createNode(144 /* Parameter */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(145 /* Parameter */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
- node.initializer = initializer ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createParameter = createParameter;
- function updateParameter(node, decorators, modifiers, dotDotDotToken, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node);
- }
- return node;
+ function updateParameter(node, decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateParameter = updateParameter;
+ function createDecorator(expression) {
+ var node = createSynthesizedNode(146 /* Decorator */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createDecorator = createDecorator;
+ function updateDecorator(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createDecorator(expression), node)
+ : node;
+ }
+ ts.updateDecorator = updateDecorator;
// Type members
- function createProperty(decorators, modifiers, name, questionToken, type, initializer, location) {
- var node = createNode(147 /* PropertyDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148 /* PropertyDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
node.initializer = initializer;
@@ -10869,36 +11386,46 @@ var ts;
}
ts.createProperty = createProperty;
function updateProperty(node, decorators, modifiers, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateProperty = updateProperty;
- function createMethod(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(149 /* MethodDeclaration */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(150 /* MethodDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
- ts.createMethod = createMethod;
- function updateMethod(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createMethod(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ ts.createMethodDeclaration = createMethodDeclaration;
+ function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateMethod = updateMethod;
- function createConstructor(decorators, modifiers, parameters, body, location, flags) {
- var node = createNode(150 /* Constructor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createConstructor(decorators, modifiers, parameters, body) {
+ var node = createSynthesizedNode(151 /* Constructor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = undefined;
@@ -10907,17 +11434,19 @@ var ts;
}
ts.createConstructor = createConstructor;
function updateConstructor(node, decorators, modifiers, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body) {
- return updateNode(createConstructor(decorators, modifiers, parameters, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createConstructor(decorators, modifiers, parameters, body), node)
+ : node;
}
ts.updateConstructor = updateConstructor;
- function createGetAccessor(decorators, modifiers, name, parameters, type, body, location, flags) {
- var node = createNode(151 /* GetAccessor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createGetAccessor(decorators, modifiers, name, parameters, type, body) {
+ var node = createSynthesizedNode(152 /* GetAccessor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = type;
@@ -10926,17 +11455,21 @@ var ts;
}
ts.createGetAccessor = createGetAccessor;
function updateGetAccessor(node, decorators, modifiers, name, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body), node)
+ : node;
}
ts.updateGetAccessor = updateGetAccessor;
- function createSetAccessor(decorators, modifiers, name, parameters, body, location, flags) {
- var node = createNode(152 /* SetAccessor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createSetAccessor(decorators, modifiers, name, parameters, body) {
+ var node = createSynthesizedNode(153 /* SetAccessor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.body = body;
@@ -10944,59 +11477,62 @@ var ts;
}
ts.createSetAccessor = createSetAccessor;
function updateSetAccessor(node, decorators, modifiers, name, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body) {
- return updateNode(createSetAccessor(decorators, modifiers, name, parameters, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createSetAccessor(decorators, modifiers, name, parameters, body), node)
+ : node;
}
ts.updateSetAccessor = updateSetAccessor;
// Binding Patterns
- function createObjectBindingPattern(elements, location) {
- var node = createNode(172 /* ObjectBindingPattern */, location);
+ function createObjectBindingPattern(elements) {
+ var node = createSynthesizedNode(173 /* ObjectBindingPattern */);
node.elements = createNodeArray(elements);
return node;
}
ts.createObjectBindingPattern = createObjectBindingPattern;
function updateObjectBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createObjectBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createObjectBindingPattern(elements), node)
+ : node;
}
ts.updateObjectBindingPattern = updateObjectBindingPattern;
- function createArrayBindingPattern(elements, location) {
- var node = createNode(173 /* ArrayBindingPattern */, location);
+ function createArrayBindingPattern(elements) {
+ var node = createSynthesizedNode(174 /* ArrayBindingPattern */);
node.elements = createNodeArray(elements);
return node;
}
ts.createArrayBindingPattern = createArrayBindingPattern;
function updateArrayBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayBindingPattern(elements), node)
+ : node;
}
ts.updateArrayBindingPattern = updateArrayBindingPattern;
- function createBindingElement(propertyName, dotDotDotToken, name, initializer, location) {
- var node = createNode(174 /* BindingElement */, location);
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+ var node = createSynthesizedNode(175 /* BindingElement */);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
node.initializer = initializer;
return node;
}
ts.createBindingElement = createBindingElement;
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
- if (node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer) {
- return updateNode(createBindingElement(propertyName, dotDotDotToken, name, initializer, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createBindingElement(dotDotDotToken, propertyName, name, initializer), node)
+ : node;
}
ts.updateBindingElement = updateBindingElement;
// Expression
- function createArrayLiteral(elements, location, multiLine) {
- var node = createNode(175 /* ArrayLiteralExpression */, location);
- node.elements = parenthesizeListElements(createNodeArray(elements));
+ function createArrayLiteral(elements, multiLine) {
+ var node = createSynthesizedNode(176 /* ArrayLiteralExpression */);
+ node.elements = ts.parenthesizeListElements(createNodeArray(elements));
if (multiLine) {
node.multiLine = true;
}
@@ -11004,14 +11540,13 @@ var ts;
}
ts.createArrayLiteral = createArrayLiteral;
function updateArrayLiteral(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayLiteral(elements, node, node.multiLine), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayLiteral(elements, node.multiLine), node)
+ : node;
}
ts.updateArrayLiteral = updateArrayLiteral;
- function createObjectLiteral(properties, location, multiLine) {
- var node = createNode(176 /* ObjectLiteralExpression */, location);
+ function createObjectLiteral(properties, multiLine) {
+ var node = createSynthesizedNode(177 /* ObjectLiteralExpression */);
node.properties = createNodeArray(properties);
if (multiLine) {
node.multiLine = true;
@@ -11020,436 +11555,465 @@ var ts;
}
ts.createObjectLiteral = createObjectLiteral;
function updateObjectLiteral(node, properties) {
- if (node.properties !== properties) {
- return updateNode(createObjectLiteral(properties, node, node.multiLine), node);
- }
- return node;
+ return node.properties !== properties
+ ? updateNode(createObjectLiteral(properties, node.multiLine), node)
+ : node;
}
ts.updateObjectLiteral = updateObjectLiteral;
- function createPropertyAccess(expression, name, location, flags) {
- var node = createNode(177 /* PropertyAccessExpression */, location, flags);
- node.expression = parenthesizeForAccess(expression);
- (node.emitNode || (node.emitNode = {})).flags |= 65536 /* NoIndentation */;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAccess(expression, name) {
+ var node = createSynthesizedNode(178 /* PropertyAccessExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.name = asName(name);
+ setEmitFlags(node, 65536 /* NoIndentation */);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
function updatePropertyAccess(node, expression, name) {
- if (node.expression !== expression || node.name !== name) {
- var propertyAccess = createPropertyAccess(expression, name, /*location*/ node, node.flags);
- // Because we are updating existed propertyAccess we want to inherit its emitFlags instead of using default from createPropertyAccess
- (propertyAccess.emitNode || (propertyAccess.emitNode = {})).flags = getEmitFlags(node);
- return updateNode(propertyAccess, node);
- }
- return node;
+ // Because we are updating existed propertyAccess we want to inherit its emitFlags
+ // instead of using the default from createPropertyAccess
+ return node.expression !== expression
+ || node.name !== name
+ ? updateNode(setEmitFlags(createPropertyAccess(expression, name), getEmitFlags(node)), node)
+ : node;
}
ts.updatePropertyAccess = updatePropertyAccess;
- function createElementAccess(expression, index, location) {
- var node = createNode(178 /* ElementAccessExpression */, location);
- node.expression = parenthesizeForAccess(expression);
- node.argumentExpression = typeof index === "number" ? createLiteral(index) : index;
+ function createElementAccess(expression, index) {
+ var node = createSynthesizedNode(179 /* ElementAccessExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.argumentExpression = asExpression(index);
return node;
}
ts.createElementAccess = createElementAccess;
function updateElementAccess(node, expression, argumentExpression) {
- if (node.expression !== expression || node.argumentExpression !== argumentExpression) {
- return updateNode(createElementAccess(expression, argumentExpression, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.argumentExpression !== argumentExpression
+ ? updateNode(createElementAccess(expression, argumentExpression), node)
+ : node;
}
ts.updateElementAccess = updateElementAccess;
- function createCall(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(179 /* CallExpression */, location, flags);
- node.expression = parenthesizeForAccess(expression);
- if (typeArguments) {
- node.typeArguments = createNodeArray(typeArguments);
- }
- node.arguments = parenthesizeListElements(createNodeArray(argumentsArray));
+ function createCall(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(180 /* CallExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray));
return node;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- if (expression !== node.expression || typeArguments !== node.typeArguments || argumentsArray !== node.arguments) {
- return updateNode(createCall(expression, typeArguments, argumentsArray, /*location*/ node, node.flags), node);
- }
- return node;
+ return expression !== node.expression
+ || typeArguments !== node.typeArguments
+ || argumentsArray !== node.arguments
+ ? updateNode(createCall(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateCall = updateCall;
- function createNew(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(180 /* NewExpression */, location, flags);
- node.expression = parenthesizeForNew(expression);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.arguments = argumentsArray ? parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
+ function createNew(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(181 /* NewExpression */);
+ node.expression = ts.parenthesizeForNew(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
return node;
}
ts.createNew = createNew;
function updateNew(node, expression, typeArguments, argumentsArray) {
- if (node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray) {
- return updateNode(createNew(expression, typeArguments, argumentsArray, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
+ ? updateNode(createNew(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateNew = updateNew;
- function createTaggedTemplate(tag, template, location) {
- var node = createNode(181 /* TaggedTemplateExpression */, location);
- node.tag = parenthesizeForAccess(tag);
+ function createTaggedTemplate(tag, template) {
+ var node = createSynthesizedNode(182 /* TaggedTemplateExpression */);
+ node.tag = ts.parenthesizeForAccess(tag);
node.template = template;
return node;
}
ts.createTaggedTemplate = createTaggedTemplate;
function updateTaggedTemplate(node, tag, template) {
- if (node.tag !== tag || node.template !== template) {
- return updateNode(createTaggedTemplate(tag, template, node), node);
- }
- return node;
+ return node.tag !== tag
+ || node.template !== template
+ ? updateNode(createTaggedTemplate(tag, template), node)
+ : node;
}
ts.updateTaggedTemplate = updateTaggedTemplate;
- function createParen(expression, location) {
- var node = createNode(183 /* ParenthesizedExpression */, location);
+ function createTypeAssertion(type, expression) {
+ var node = createSynthesizedNode(183 /* TypeAssertionExpression */);
+ node.type = type;
+ node.expression = ts.parenthesizePrefixOperand(expression);
+ return node;
+ }
+ ts.createTypeAssertion = createTypeAssertion;
+ function updateTypeAssertion(node, type, expression) {
+ return node.type !== type
+ || node.expression !== expression
+ ? updateNode(createTypeAssertion(type, expression), node)
+ : node;
+ }
+ ts.updateTypeAssertion = updateTypeAssertion;
+ function createParen(expression) {
+ var node = createSynthesizedNode(184 /* ParenthesizedExpression */);
node.expression = expression;
return node;
}
ts.createParen = createParen;
function updateParen(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createParen(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createParen(expression), node)
+ : node;
}
ts.updateParen = updateParen;
- function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(184 /* FunctionExpression */, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(185 /* FunctionExpression */);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionExpression = createFunctionExpression;
- function updateFunctionExpression(node, modifiers, name, typeParameters, parameters, type, body) {
- if (node.name !== name || node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionExpression(modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.name !== name
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionExpression = updateFunctionExpression;
- function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body, location, flags) {
- var node = createNode(185 /* ArrowFunction */, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+ var node = createSynthesizedNode(186 /* ArrowFunction */);
+ node.modifiers = asNodeArray(modifiers);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35 /* EqualsGreaterThanToken */);
- node.body = parenthesizeConciseBody(body);
+ node.body = ts.parenthesizeConciseBody(body);
return node;
}
ts.createArrowFunction = createArrowFunction;
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, body) {
- if (node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body), node)
+ : node;
}
ts.updateArrowFunction = updateArrowFunction;
- function createDelete(expression, location) {
- var node = createNode(186 /* DeleteExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createDelete(expression) {
+ var node = createSynthesizedNode(187 /* DeleteExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createDelete = createDelete;
function updateDelete(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createDelete(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createDelete(expression), node)
+ : node;
}
ts.updateDelete = updateDelete;
- function createTypeOf(expression, location) {
- var node = createNode(187 /* TypeOfExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createTypeOf(expression) {
+ var node = createSynthesizedNode(188 /* TypeOfExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createTypeOf = createTypeOf;
function updateTypeOf(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createTypeOf(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createTypeOf(expression), node)
+ : node;
}
ts.updateTypeOf = updateTypeOf;
- function createVoid(expression, location) {
- var node = createNode(188 /* VoidExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createVoid(expression) {
+ var node = createSynthesizedNode(189 /* VoidExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createVoid = createVoid;
function updateVoid(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createVoid(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createVoid(expression), node)
+ : node;
}
ts.updateVoid = updateVoid;
- function createAwait(expression, location) {
- var node = createNode(189 /* AwaitExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createAwait(expression) {
+ var node = createSynthesizedNode(190 /* AwaitExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createAwait = createAwait;
function updateAwait(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createAwait(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createAwait(expression), node)
+ : node;
}
ts.updateAwait = updateAwait;
- function createPrefix(operator, operand, location) {
- var node = createNode(190 /* PrefixUnaryExpression */, location);
+ function createPrefix(operator, operand) {
+ var node = createSynthesizedNode(191 /* PrefixUnaryExpression */);
node.operator = operator;
- node.operand = parenthesizePrefixOperand(operand);
+ node.operand = ts.parenthesizePrefixOperand(operand);
return node;
}
ts.createPrefix = createPrefix;
function updatePrefix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPrefix(node.operator, operand, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPrefix(node.operator, operand), node)
+ : node;
}
ts.updatePrefix = updatePrefix;
- function createPostfix(operand, operator, location) {
- var node = createNode(191 /* PostfixUnaryExpression */, location);
- node.operand = parenthesizePostfixOperand(operand);
+ function createPostfix(operand, operator) {
+ var node = createSynthesizedNode(192 /* PostfixUnaryExpression */);
+ node.operand = ts.parenthesizePostfixOperand(operand);
node.operator = operator;
return node;
}
ts.createPostfix = createPostfix;
function updatePostfix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPostfix(operand, node.operator, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPostfix(operand, node.operator), node)
+ : node;
}
ts.updatePostfix = updatePostfix;
- function createBinary(left, operator, right, location) {
- var operatorToken = typeof operator === "number" ? createToken(operator) : operator;
+ function createBinary(left, operator, right) {
+ var node = createSynthesizedNode(193 /* BinaryExpression */);
+ var operatorToken = asToken(operator);
var operatorKind = operatorToken.kind;
- var node = createNode(192 /* BinaryExpression */, location);
- node.left = parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined);
+ node.left = ts.parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined);
node.operatorToken = operatorToken;
- node.right = parenthesizeBinaryOperand(operatorKind, right, /*isLeftSideOfBinary*/ false, node.left);
+ node.right = ts.parenthesizeBinaryOperand(operatorKind, right, /*isLeftSideOfBinary*/ false, node.left);
return node;
}
ts.createBinary = createBinary;
function updateBinary(node, left, right) {
- if (node.left !== left || node.right !== right) {
- return updateNode(createBinary(left, node.operatorToken, right, /*location*/ node), node);
- }
- return node;
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createBinary(left, node.operatorToken, right), node)
+ : node;
}
ts.updateBinary = updateBinary;
- function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonTokenOrLocation, whenFalse, location) {
- var node = createNode(193 /* ConditionalExpression */, whenFalse ? location : colonTokenOrLocation);
- node.condition = parenthesizeForConditionalHead(condition);
- if (whenFalse) {
- // second overload
- node.questionToken = questionTokenOrWhenTrue;
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- node.colonToken = colonTokenOrLocation;
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenFalse);
- }
- else {
- // first overload
- node.questionToken = createToken(54 /* QuestionToken */);
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(questionTokenOrWhenTrue);
- node.colonToken = createToken(55 /* ColonToken */);
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- }
+ function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
+ var node = createSynthesizedNode(194 /* ConditionalExpression */);
+ node.condition = ts.parenthesizeForConditionalHead(condition);
+ node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54 /* QuestionToken */);
+ node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue);
+ node.colonToken = whenFalse ? colonToken : createToken(55 /* ColonToken */);
+ node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse);
return node;
}
ts.createConditional = createConditional;
function updateConditional(node, condition, whenTrue, whenFalse) {
- if (node.condition !== condition || node.whenTrue !== whenTrue || node.whenFalse !== whenFalse) {
- return updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse, node), node);
- }
- return node;
+ return node.condition !== condition
+ || node.whenTrue !== whenTrue
+ || node.whenFalse !== whenFalse
+ ? updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse), node)
+ : node;
}
ts.updateConditional = updateConditional;
- function createTemplateExpression(head, templateSpans, location) {
- var node = createNode(194 /* TemplateExpression */, location);
+ function createTemplateExpression(head, templateSpans) {
+ var node = createSynthesizedNode(195 /* TemplateExpression */);
node.head = head;
node.templateSpans = createNodeArray(templateSpans);
return node;
}
ts.createTemplateExpression = createTemplateExpression;
function updateTemplateExpression(node, head, templateSpans) {
- if (node.head !== head || node.templateSpans !== templateSpans) {
- return updateNode(createTemplateExpression(head, templateSpans, node), node);
- }
- return node;
+ return node.head !== head
+ || node.templateSpans !== templateSpans
+ ? updateNode(createTemplateExpression(head, templateSpans), node)
+ : node;
}
ts.updateTemplateExpression = updateTemplateExpression;
- function createYield(asteriskToken, expression, location) {
- var node = createNode(195 /* YieldExpression */, location);
- node.asteriskToken = asteriskToken;
- node.expression = expression;
+ function createYield(asteriskTokenOrExpression, expression) {
+ var node = createSynthesizedNode(196 /* YieldExpression */);
+ node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined;
+ node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 /* AsteriskToken */ ? asteriskTokenOrExpression : expression;
return node;
}
ts.createYield = createYield;
- function updateYield(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createYield(node.asteriskToken, expression, node), node);
- }
- return node;
+ function updateYield(node, asteriskToken, expression) {
+ return node.expression !== expression
+ || node.asteriskToken !== asteriskToken
+ ? updateNode(createYield(asteriskToken, expression), node)
+ : node;
}
ts.updateYield = updateYield;
- function createSpread(expression, location) {
- var node = createNode(196 /* SpreadElement */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSpread(expression) {
+ var node = createSynthesizedNode(197 /* SpreadElement */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
return node;
}
ts.createSpread = createSpread;
function updateSpread(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpread(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpread(expression), node)
+ : node;
}
ts.updateSpread = updateSpread;
- function createClassExpression(modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(197 /* ClassExpression */, location);
+ function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(198 /* ClassExpression */);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassExpression = createClassExpression;
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassExpression = updateClassExpression;
- function createOmittedExpression(location) {
- var node = createNode(198 /* OmittedExpression */, location);
- return node;
+ function createOmittedExpression() {
+ return createSynthesizedNode(199 /* OmittedExpression */);
}
ts.createOmittedExpression = createOmittedExpression;
- function createExpressionWithTypeArguments(typeArguments, expression, location) {
- var node = createNode(199 /* ExpressionWithTypeArguments */, location);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.expression = parenthesizeForAccess(expression);
+ function createExpressionWithTypeArguments(typeArguments, expression) {
+ var node = createSynthesizedNode(200 /* ExpressionWithTypeArguments */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
return node;
}
ts.createExpressionWithTypeArguments = createExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node, typeArguments, expression) {
- if (node.typeArguments !== typeArguments || node.expression !== expression) {
- return updateNode(createExpressionWithTypeArguments(typeArguments, expression, node), node);
- }
- return node;
+ return node.typeArguments !== typeArguments
+ || node.expression !== expression
+ ? updateNode(createExpressionWithTypeArguments(typeArguments, expression), node)
+ : node;
}
ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments;
+ function createAsExpression(expression, type) {
+ var node = createSynthesizedNode(201 /* AsExpression */);
+ node.expression = expression;
+ node.type = type;
+ return node;
+ }
+ ts.createAsExpression = createAsExpression;
+ function updateAsExpression(node, expression, type) {
+ return node.expression !== expression
+ || node.type !== type
+ ? updateNode(createAsExpression(expression, type), node)
+ : node;
+ }
+ ts.updateAsExpression = updateAsExpression;
+ function createNonNullExpression(expression) {
+ var node = createSynthesizedNode(202 /* NonNullExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createNonNullExpression = createNonNullExpression;
+ function updateNonNullExpression(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createNonNullExpression(expression), node)
+ : node;
+ }
+ ts.updateNonNullExpression = updateNonNullExpression;
// Misc
- function createTemplateSpan(expression, literal, location) {
- var node = createNode(202 /* TemplateSpan */, location);
+ function createTemplateSpan(expression, literal) {
+ var node = createSynthesizedNode(204 /* TemplateSpan */);
node.expression = expression;
node.literal = literal;
return node;
}
ts.createTemplateSpan = createTemplateSpan;
function updateTemplateSpan(node, expression, literal) {
- if (node.expression !== expression || node.literal !== literal) {
- return updateNode(createTemplateSpan(expression, literal, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.literal !== literal
+ ? updateNode(createTemplateSpan(expression, literal), node)
+ : node;
}
ts.updateTemplateSpan = updateTemplateSpan;
// Element
- function createBlock(statements, location, multiLine, flags) {
- var block = createNode(204 /* Block */, location, flags);
+ function createBlock(statements, multiLine) {
+ var block = createSynthesizedNode(206 /* Block */);
block.statements = createNodeArray(statements);
- if (multiLine) {
- block.multiLine = true;
- }
+ if (multiLine)
+ block.multiLine = multiLine;
return block;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- if (statements !== node.statements) {
- return updateNode(createBlock(statements, /*location*/ node, node.multiLine, node.flags), node);
- }
- return node;
+ return statements !== node.statements
+ ? updateNode(createBlock(statements, node.multiLine), node)
+ : node;
}
ts.updateBlock = updateBlock;
- function createVariableStatement(modifiers, declarationList, location, flags) {
- var node = createNode(205 /* VariableStatement */, location, flags);
+ function createVariableStatement(modifiers, declarationList) {
+ var node = createSynthesizedNode(207 /* VariableStatement */);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ node.modifiers = asNodeArray(modifiers);
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
return node;
}
ts.createVariableStatement = createVariableStatement;
function updateVariableStatement(node, modifiers, declarationList) {
- if (node.modifiers !== modifiers || node.declarationList !== declarationList) {
- return updateNode(createVariableStatement(modifiers, declarationList, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.declarationList !== declarationList
+ ? updateNode(createVariableStatement(modifiers, declarationList), node)
+ : node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, location, flags) {
- var node = createNode(224 /* VariableDeclarationList */, location, flags);
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(226 /* VariableDeclarationList */);
+ node.flags |= flags;
node.declarations = createNodeArray(declarations);
return node;
}
ts.createVariableDeclarationList = createVariableDeclarationList;
function updateVariableDeclarationList(node, declarations) {
- if (node.declarations !== declarations) {
- return updateNode(createVariableDeclarationList(declarations, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
}
ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer, location, flags) {
- var node = createNode(223 /* VariableDeclaration */, location, flags);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(225 /* VariableDeclaration */);
+ node.name = asName(name);
node.type = type;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createVariableDeclaration = createVariableDeclaration;
function updateVariableDeclaration(node, name, type, initializer) {
- if (node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createVariableDeclaration(name, type, initializer, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
}
ts.updateVariableDeclaration = updateVariableDeclaration;
- function createEmptyStatement(location) {
- return createNode(206 /* EmptyStatement */, location);
+ function createEmptyStatement() {
+ return createSynthesizedNode(208 /* EmptyStatement */);
}
ts.createEmptyStatement = createEmptyStatement;
- function createStatement(expression, location, flags) {
- var node = createNode(207 /* ExpressionStatement */, location, flags);
- node.expression = parenthesizeExpressionForExpressionStatement(expression);
+ function createStatement(expression) {
+ var node = createSynthesizedNode(209 /* ExpressionStatement */);
+ node.expression = ts.parenthesizeExpressionForExpressionStatement(expression);
return node;
}
ts.createStatement = createStatement;
function updateStatement(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createStatement(expression, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createStatement(expression), node)
+ : node;
}
ts.updateStatement = updateStatement;
- function createIf(expression, thenStatement, elseStatement, location) {
- var node = createNode(208 /* IfStatement */, location);
+ function createIf(expression, thenStatement, elseStatement) {
+ var node = createSynthesizedNode(210 /* IfStatement */);
node.expression = expression;
node.thenStatement = thenStatement;
node.elseStatement = elseStatement;
@@ -11457,42 +12021,43 @@ var ts;
}
ts.createIf = createIf;
function updateIf(node, expression, thenStatement, elseStatement) {
- if (node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement) {
- return updateNode(createIf(expression, thenStatement, elseStatement, /*location*/ node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.thenStatement !== thenStatement
+ || node.elseStatement !== elseStatement
+ ? updateNode(createIf(expression, thenStatement, elseStatement), node)
+ : node;
}
ts.updateIf = updateIf;
- function createDo(statement, expression, location) {
- var node = createNode(209 /* DoStatement */, location);
+ function createDo(statement, expression) {
+ var node = createSynthesizedNode(211 /* DoStatement */);
node.statement = statement;
node.expression = expression;
return node;
}
ts.createDo = createDo;
function updateDo(node, statement, expression) {
- if (node.statement !== statement || node.expression !== expression) {
- return updateNode(createDo(statement, expression, node), node);
- }
- return node;
+ return node.statement !== statement
+ || node.expression !== expression
+ ? updateNode(createDo(statement, expression), node)
+ : node;
}
ts.updateDo = updateDo;
- function createWhile(expression, statement, location) {
- var node = createNode(210 /* WhileStatement */, location);
+ function createWhile(expression, statement) {
+ var node = createSynthesizedNode(212 /* WhileStatement */);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWhile = createWhile;
function updateWhile(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWhile(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWhile(expression, statement), node)
+ : node;
}
ts.updateWhile = updateWhile;
- function createFor(initializer, condition, incrementor, statement, location) {
- var node = createNode(211 /* ForStatement */, location, /*flags*/ undefined);
+ function createFor(initializer, condition, incrementor, statement) {
+ var node = createSynthesizedNode(213 /* ForStatement */);
node.initializer = initializer;
node.condition = condition;
node.incrementor = incrementor;
@@ -11501,14 +12066,16 @@ var ts;
}
ts.createFor = createFor;
function updateFor(node, initializer, condition, incrementor, statement) {
- if (node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement) {
- return updateNode(createFor(initializer, condition, incrementor, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.condition !== condition
+ || node.incrementor !== incrementor
+ || node.statement !== statement
+ ? updateNode(createFor(initializer, condition, incrementor, statement), node)
+ : node;
}
ts.updateFor = updateFor;
- function createForIn(initializer, expression, statement, location) {
- var node = createNode(212 /* ForInStatement */, location);
+ function createForIn(initializer, expression, statement) {
+ var node = createSynthesizedNode(214 /* ForInStatement */);
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
@@ -11516,127 +12083,123 @@ var ts;
}
ts.createForIn = createForIn;
function updateForIn(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForIn(initializer, expression, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForIn(initializer, expression, statement), node)
+ : node;
}
ts.updateForIn = updateForIn;
- function createForOf(initializer, expression, statement, location) {
- var node = createNode(213 /* ForOfStatement */, location);
+ function createForOf(awaitModifier, initializer, expression, statement) {
+ var node = createSynthesizedNode(215 /* ForOfStatement */);
+ node.awaitModifier = awaitModifier;
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
return node;
}
ts.createForOf = createForOf;
- function updateForOf(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForOf(initializer, expression, statement, node), node);
- }
- return node;
+ function updateForOf(node, awaitModifier, initializer, expression, statement) {
+ return node.awaitModifier !== awaitModifier
+ || node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForOf(awaitModifier, initializer, expression, statement), node)
+ : node;
}
ts.updateForOf = updateForOf;
- function createContinue(label, location) {
- var node = createNode(214 /* ContinueStatement */, location);
- if (label) {
- node.label = label;
- }
+ function createContinue(label) {
+ var node = createSynthesizedNode(216 /* ContinueStatement */);
+ node.label = asName(label);
return node;
}
ts.createContinue = createContinue;
function updateContinue(node, label) {
- if (node.label !== label) {
- return updateNode(createContinue(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createContinue(label), node)
+ : node;
}
ts.updateContinue = updateContinue;
- function createBreak(label, location) {
- var node = createNode(215 /* BreakStatement */, location);
- if (label) {
- node.label = label;
- }
+ function createBreak(label) {
+ var node = createSynthesizedNode(217 /* BreakStatement */);
+ node.label = asName(label);
return node;
}
ts.createBreak = createBreak;
function updateBreak(node, label) {
- if (node.label !== label) {
- return updateNode(createBreak(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createBreak(label), node)
+ : node;
}
ts.updateBreak = updateBreak;
- function createReturn(expression, location) {
- var node = createNode(216 /* ReturnStatement */, location);
+ function createReturn(expression) {
+ var node = createSynthesizedNode(218 /* ReturnStatement */);
node.expression = expression;
return node;
}
ts.createReturn = createReturn;
function updateReturn(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createReturn(expression, /*location*/ node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createReturn(expression), node)
+ : node;
}
ts.updateReturn = updateReturn;
- function createWith(expression, statement, location) {
- var node = createNode(217 /* WithStatement */, location);
+ function createWith(expression, statement) {
+ var node = createSynthesizedNode(219 /* WithStatement */);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWith = createWith;
function updateWith(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWith(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWith(expression, statement), node)
+ : node;
}
ts.updateWith = updateWith;
- function createSwitch(expression, caseBlock, location) {
- var node = createNode(218 /* SwitchStatement */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSwitch(expression, caseBlock) {
+ var node = createSynthesizedNode(220 /* SwitchStatement */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.caseBlock = caseBlock;
return node;
}
ts.createSwitch = createSwitch;
function updateSwitch(node, expression, caseBlock) {
- if (node.expression !== expression || node.caseBlock !== caseBlock) {
- return updateNode(createSwitch(expression, caseBlock, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.caseBlock !== caseBlock
+ ? updateNode(createSwitch(expression, caseBlock), node)
+ : node;
}
ts.updateSwitch = updateSwitch;
- function createLabel(label, statement, location) {
- var node = createNode(219 /* LabeledStatement */, location);
- node.label = typeof label === "string" ? createIdentifier(label) : label;
+ function createLabel(label, statement) {
+ var node = createSynthesizedNode(221 /* LabeledStatement */);
+ node.label = asName(label);
node.statement = statement;
return node;
}
ts.createLabel = createLabel;
function updateLabel(node, label, statement) {
- if (node.label !== label || node.statement !== statement) {
- return updateNode(createLabel(label, statement, node), node);
- }
- return node;
+ return node.label !== label
+ || node.statement !== statement
+ ? updateNode(createLabel(label, statement), node)
+ : node;
}
ts.updateLabel = updateLabel;
- function createThrow(expression, location) {
- var node = createNode(220 /* ThrowStatement */, location);
+ function createThrow(expression) {
+ var node = createSynthesizedNode(222 /* ThrowStatement */);
node.expression = expression;
return node;
}
ts.createThrow = createThrow;
function updateThrow(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createThrow(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createThrow(expression), node)
+ : node;
}
ts.updateThrow = updateThrow;
- function createTry(tryBlock, catchClause, finallyBlock, location) {
- var node = createNode(221 /* TryStatement */, location);
+ function createTry(tryBlock, catchClause, finallyBlock) {
+ var node = createSynthesizedNode(223 /* TryStatement */);
node.tryBlock = tryBlock;
node.catchClause = catchClause;
node.finallyBlock = finallyBlock;
@@ -11644,195 +12207,286 @@ var ts;
}
ts.createTry = createTry;
function updateTry(node, tryBlock, catchClause, finallyBlock) {
- if (node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock) {
- return updateNode(createTry(tryBlock, catchClause, finallyBlock, node), node);
- }
- return node;
+ return node.tryBlock !== tryBlock
+ || node.catchClause !== catchClause
+ || node.finallyBlock !== finallyBlock
+ ? updateNode(createTry(tryBlock, catchClause, finallyBlock), node)
+ : node;
}
ts.updateTry = updateTry;
- function createCaseBlock(clauses, location) {
- var node = createNode(232 /* CaseBlock */, location);
- node.clauses = createNodeArray(clauses);
- return node;
- }
- ts.createCaseBlock = createCaseBlock;
- function updateCaseBlock(node, clauses) {
- if (node.clauses !== clauses) {
- return updateNode(createCaseBlock(clauses, node), node);
- }
- return node;
- }
- ts.updateCaseBlock = updateCaseBlock;
- function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(225 /* FunctionDeclaration */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(227 /* FunctionDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionDeclaration = createFunctionDeclaration;
- function updateFunctionDeclaration(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionDeclaration(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ function updateFunctionDeclaration(node, decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionDeclaration = updateFunctionDeclaration;
- function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(226 /* ClassDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(228 /* ClassDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassDeclaration = createClassDeclaration;
function updateClassDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassDeclaration = updateClassDeclaration;
- function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, location) {
- var node = createNode(235 /* ImportDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createEnumDeclaration(decorators, modifiers, name, members) {
+ var node = createSynthesizedNode(231 /* EnumDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createEnumDeclaration = createEnumDeclaration;
+ function updateEnumDeclaration(node, decorators, modifiers, name, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.members !== members
+ ? updateNode(createEnumDeclaration(decorators, modifiers, name, members), node)
+ : node;
+ }
+ ts.updateEnumDeclaration = updateEnumDeclaration;
+ function createModuleDeclaration(decorators, modifiers, name, body, flags) {
+ var node = createSynthesizedNode(232 /* ModuleDeclaration */);
+ node.flags |= flags;
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = name;
+ node.body = body;
+ return node;
+ }
+ ts.createModuleDeclaration = createModuleDeclaration;
+ function updateModuleDeclaration(node, decorators, modifiers, name, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.body !== body
+ ? updateNode(createModuleDeclaration(decorators, modifiers, name, body, node.flags), node)
+ : node;
+ }
+ ts.updateModuleDeclaration = updateModuleDeclaration;
+ function createModuleBlock(statements) {
+ var node = createSynthesizedNode(233 /* ModuleBlock */);
+ node.statements = createNodeArray(statements);
+ return node;
+ }
+ ts.createModuleBlock = createModuleBlock;
+ function updateModuleBlock(node, statements) {
+ return node.statements !== statements
+ ? updateNode(createModuleBlock(statements), node)
+ : node;
+ }
+ ts.updateModuleBlock = updateModuleBlock;
+ function createCaseBlock(clauses) {
+ var node = createSynthesizedNode(234 /* CaseBlock */);
+ node.clauses = createNodeArray(clauses);
+ return node;
+ }
+ ts.createCaseBlock = createCaseBlock;
+ function updateCaseBlock(node, clauses) {
+ return node.clauses !== clauses
+ ? updateNode(createCaseBlock(clauses), node)
+ : node;
+ }
+ ts.updateCaseBlock = updateCaseBlock;
+ function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
+ var node = createSynthesizedNode(236 /* ImportEqualsDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.moduleReference = moduleReference;
+ return node;
+ }
+ ts.createImportEqualsDeclaration = createImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node, decorators, modifiers, name, moduleReference) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.moduleReference !== moduleReference
+ ? updateNode(createImportEqualsDeclaration(decorators, modifiers, name, moduleReference), node)
+ : node;
+ }
+ ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration;
+ function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
+ var node = createSynthesizedNode(237 /* ImportDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createImportDeclaration = createImportDeclaration;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+ : node;
}
ts.updateImportDeclaration = updateImportDeclaration;
- function createImportClause(name, namedBindings, location) {
- var node = createNode(236 /* ImportClause */, location);
+ function createImportClause(name, namedBindings) {
+ var node = createSynthesizedNode(238 /* ImportClause */);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
ts.createImportClause = createImportClause;
function updateImportClause(node, name, namedBindings) {
- if (node.name !== name || node.namedBindings !== namedBindings) {
- return updateNode(createImportClause(name, namedBindings, node), node);
- }
- return node;
+ return node.name !== name
+ || node.namedBindings !== namedBindings
+ ? updateNode(createImportClause(name, namedBindings), node)
+ : node;
}
ts.updateImportClause = updateImportClause;
- function createNamespaceImport(name, location) {
- var node = createNode(237 /* NamespaceImport */, location);
+ function createNamespaceImport(name) {
+ var node = createSynthesizedNode(239 /* NamespaceImport */);
node.name = name;
return node;
}
ts.createNamespaceImport = createNamespaceImport;
function updateNamespaceImport(node, name) {
- if (node.name !== name) {
- return updateNode(createNamespaceImport(name, node), node);
- }
- return node;
+ return node.name !== name
+ ? updateNode(createNamespaceImport(name), node)
+ : node;
}
ts.updateNamespaceImport = updateNamespaceImport;
- function createNamedImports(elements, location) {
- var node = createNode(238 /* NamedImports */, location);
+ function createNamedImports(elements) {
+ var node = createSynthesizedNode(240 /* NamedImports */);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedImports = createNamedImports;
function updateNamedImports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedImports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedImports(elements), node)
+ : node;
}
ts.updateNamedImports = updateNamedImports;
- function createImportSpecifier(propertyName, name, location) {
- var node = createNode(239 /* ImportSpecifier */, location);
+ function createImportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(241 /* ImportSpecifier */);
node.propertyName = propertyName;
node.name = name;
return node;
}
ts.createImportSpecifier = createImportSpecifier;
function updateImportSpecifier(node, propertyName, name) {
- if (node.propertyName !== propertyName || node.name !== name) {
- return updateNode(createImportSpecifier(propertyName, name, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createImportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateImportSpecifier = updateImportSpecifier;
- function createExportAssignment(decorators, modifiers, isExportEquals, expression, location) {
- var node = createNode(240 /* ExportAssignment */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
+ var node = createSynthesizedNode(242 /* ExportAssignment */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.isExportEquals = isExportEquals;
node.expression = expression;
return node;
}
ts.createExportAssignment = createExportAssignment;
function updateExportAssignment(node, decorators, modifiers, expression) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.expression !== expression) {
- return updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.expression !== expression
+ ? updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
+ : node;
}
ts.updateExportAssignment = updateExportAssignment;
- function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, location) {
- var node = createNode(241 /* ExportDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) {
+ var node = createSynthesizedNode(243 /* ExportDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.exportClause = exportClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createExportDeclaration = createExportDeclaration;
function updateExportDeclaration(node, decorators, modifiers, exportClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.exportClause !== exportClause
+ || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier), node)
+ : node;
}
ts.updateExportDeclaration = updateExportDeclaration;
- function createNamedExports(elements, location) {
- var node = createNode(242 /* NamedExports */, location);
+ function createNamedExports(elements) {
+ var node = createSynthesizedNode(244 /* NamedExports */);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedExports = createNamedExports;
function updateNamedExports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedExports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedExports(elements), node)
+ : node;
}
ts.updateNamedExports = updateNamedExports;
- function createExportSpecifier(name, propertyName, location) {
- var node = createNode(243 /* ExportSpecifier */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createExportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(245 /* ExportSpecifier */);
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
return node;
}
ts.createExportSpecifier = createExportSpecifier;
- function updateExportSpecifier(node, name, propertyName) {
- if (node.name !== name || node.propertyName !== propertyName) {
- return updateNode(createExportSpecifier(name, propertyName, node), node);
- }
- return node;
+ function updateExportSpecifier(node, propertyName, name) {
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createExportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateExportSpecifier = updateExportSpecifier;
+ // Module references
+ function createExternalModuleReference(expression) {
+ var node = createSynthesizedNode(247 /* ExternalModuleReference */);
+ node.expression = expression;
+ return node;
+ }
+ ts.createExternalModuleReference = createExternalModuleReference;
+ function updateExternalModuleReference(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createExternalModuleReference(expression), node)
+ : node;
+ }
+ ts.updateExternalModuleReference = updateExternalModuleReference;
// JSX
- function createJsxElement(openingElement, children, closingElement, location) {
- var node = createNode(246 /* JsxElement */, location);
+ function createJsxElement(openingElement, children, closingElement) {
+ var node = createSynthesizedNode(248 /* JsxElement */);
node.openingElement = openingElement;
node.children = createNodeArray(children);
node.closingElement = closingElement;
@@ -11840,96 +12494,108 @@ var ts;
}
ts.createJsxElement = createJsxElement;
function updateJsxElement(node, openingElement, children, closingElement) {
- if (node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement) {
- return updateNode(createJsxElement(openingElement, children, closingElement, node), node);
- }
- return node;
+ return node.openingElement !== openingElement
+ || node.children !== children
+ || node.closingElement !== closingElement
+ ? updateNode(createJsxElement(openingElement, children, closingElement), node)
+ : node;
}
ts.updateJsxElement = updateJsxElement;
- function createJsxSelfClosingElement(tagName, attributes, location) {
- var node = createNode(247 /* JsxSelfClosingElement */, location);
+ function createJsxSelfClosingElement(tagName, attributes) {
+ var node = createSynthesizedNode(249 /* JsxSelfClosingElement */);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxSelfClosingElement = createJsxSelfClosingElement;
function updateJsxSelfClosingElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxSelfClosingElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxSelfClosingElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement;
- function createJsxOpeningElement(tagName, attributes, location) {
- var node = createNode(248 /* JsxOpeningElement */, location);
+ function createJsxOpeningElement(tagName, attributes) {
+ var node = createSynthesizedNode(250 /* JsxOpeningElement */);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxOpeningElement = createJsxOpeningElement;
function updateJsxOpeningElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxOpeningElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxOpeningElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxOpeningElement = updateJsxOpeningElement;
- function createJsxClosingElement(tagName, location) {
- var node = createNode(249 /* JsxClosingElement */, location);
+ function createJsxClosingElement(tagName) {
+ var node = createSynthesizedNode(251 /* JsxClosingElement */);
node.tagName = tagName;
return node;
}
ts.createJsxClosingElement = createJsxClosingElement;
function updateJsxClosingElement(node, tagName) {
- if (node.tagName !== tagName) {
- return updateNode(createJsxClosingElement(tagName, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ ? updateNode(createJsxClosingElement(tagName), node)
+ : node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttribute(name, initializer, location) {
- var node = createNode(250 /* JsxAttribute */, location);
+ function createJsxAttributes(properties) {
+ var jsxAttributes = createSynthesizedNode(253 /* JsxAttributes */);
+ jsxAttributes.properties = createNodeArray(properties);
+ return jsxAttributes;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(jsxAttributes, properties) {
+ if (jsxAttributes.properties !== properties) {
+ return updateNode(createJsxAttributes(properties), jsxAttributes);
+ }
+ return jsxAttributes;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
+ function createJsxAttribute(name, initializer) {
+ var node = createSynthesizedNode(252 /* JsxAttribute */);
node.name = name;
node.initializer = initializer;
return node;
}
ts.createJsxAttribute = createJsxAttribute;
function updateJsxAttribute(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createJsxAttribute(name, initializer, node), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createJsxAttribute(name, initializer), node)
+ : node;
}
ts.updateJsxAttribute = updateJsxAttribute;
- function createJsxSpreadAttribute(expression, location) {
- var node = createNode(251 /* JsxSpreadAttribute */, location);
+ function createJsxSpreadAttribute(expression) {
+ var node = createSynthesizedNode(254 /* JsxSpreadAttribute */);
node.expression = expression;
return node;
}
ts.createJsxSpreadAttribute = createJsxSpreadAttribute;
function updateJsxSpreadAttribute(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxSpreadAttribute(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxSpreadAttribute(expression), node)
+ : node;
}
ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute;
- function createJsxExpression(expression, location) {
- var node = createNode(252 /* JsxExpression */, location);
+ function createJsxExpression(dotDotDotToken, expression) {
+ var node = createSynthesizedNode(255 /* JsxExpression */);
+ node.dotDotDotToken = dotDotDotToken;
node.expression = expression;
return node;
}
ts.createJsxExpression = createJsxExpression;
function updateJsxExpression(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxExpression(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxExpression(node.dotDotDotToken, expression), node)
+ : node;
}
ts.updateJsxExpression = updateJsxExpression;
// Clauses
- function createHeritageClause(token, types, location) {
- var node = createNode(255 /* HeritageClause */, location);
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(258 /* HeritageClause */);
node.token = token;
node.types = createNodeArray(types);
return node;
@@ -11937,40 +12603,40 @@ var ts;
ts.createHeritageClause = createHeritageClause;
function updateHeritageClause(node, types) {
if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types, node), node);
+ return updateNode(createHeritageClause(node.token, types), node);
}
return node;
}
ts.updateHeritageClause = updateHeritageClause;
- function createCaseClause(expression, statements, location) {
- var node = createNode(253 /* CaseClause */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createCaseClause(expression, statements) {
+ var node = createSynthesizedNode(256 /* CaseClause */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.statements = createNodeArray(statements);
return node;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements, node), node);
+ return updateNode(createCaseClause(expression, statements), node);
}
return node;
}
ts.updateCaseClause = updateCaseClause;
- function createDefaultClause(statements, location) {
- var node = createNode(254 /* DefaultClause */, location);
+ function createDefaultClause(statements) {
+ var node = createSynthesizedNode(257 /* DefaultClause */);
node.statements = createNodeArray(statements);
return node;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements, node), node);
+ return updateNode(createDefaultClause(statements), node);
}
return node;
}
ts.updateDefaultClause = updateDefaultClause;
- function createCatchClause(variableDeclaration, block, location) {
- var node = createNode(256 /* CatchClause */, location);
+ function createCatchClause(variableDeclaration, block) {
+ var node = createSynthesizedNode(259 /* CatchClause */);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
node.block = block;
return node;
@@ -11978,58 +12644,74 @@ var ts;
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block, node), node);
+ return updateNode(createCatchClause(variableDeclaration, block), node);
}
return node;
}
ts.updateCatchClause = updateCatchClause;
// Property assignments
- function createPropertyAssignment(name, initializer, location) {
- var node = createNode(257 /* PropertyAssignment */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAssignment(name, initializer) {
+ var node = createSynthesizedNode(260 /* PropertyAssignment */);
+ node.name = asName(name);
node.questionToken = undefined;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer, node), node);
+ return updateNode(createPropertyAssignment(name, initializer), node);
}
return node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
- function createShorthandPropertyAssignment(name, objectAssignmentInitializer, location) {
- var node = createNode(258 /* ShorthandPropertyAssignment */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
+ function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
+ var node = createSynthesizedNode(261 /* ShorthandPropertyAssignment */);
+ node.name = asName(name);
+ node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
return node;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
- function createSpreadAssignment(expression, location) {
- var node = createNode(259 /* SpreadAssignment */, location);
- node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined;
- return node;
- }
- ts.createSpreadAssignment = createSpreadAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer, node), node);
+ return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
}
return node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
+ function createSpreadAssignment(expression) {
+ var node = createSynthesizedNode(262 /* SpreadAssignment */);
+ node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined;
+ return node;
+ }
+ ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression, node), node);
+ return updateNode(createSpreadAssignment(expression), node);
}
return node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
+ // Enum
+ function createEnumMember(name, initializer) {
+ var node = createSynthesizedNode(263 /* EnumMember */);
+ node.name = asName(name);
+ node.initializer = initializer && ts.parenthesizeExpressionForList(initializer);
+ return node;
+ }
+ ts.createEnumMember = createEnumMember;
+ function updateEnumMember(node, name, initializer) {
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createEnumMember(name, initializer), node)
+ : node;
+ }
+ ts.updateEnumMember = updateEnumMember;
// Top-level nodes
function updateSourceFileNode(node, statements) {
if (node.statements !== statements) {
- var updated = createNode(261 /* SourceFile */, /*location*/ node, node.flags);
+ var updated = createSynthesizedNode(264 /* SourceFile */);
+ updated.flags |= node.flags;
updated.statements = createNodeArray(statements);
updated.endOfFileToken = node.endOfFileToken;
updated.fileName = node.fileName;
@@ -12088,6 +12770,17 @@ var ts;
return node;
}
ts.updateSourceFileNode = updateSourceFileNode;
+ /**
+ * Creates a shallow, memberwise clone of a node for mutation.
+ */
+ function getMutableClone(node) {
+ var clone = getSynthesizedClone(node);
+ clone.pos = node.pos;
+ clone.end = node.end;
+ clone.parent = node.parent;
+ return clone;
+ }
+ ts.getMutableClone = getMutableClone;
// Transformation nodes
/**
* Creates a synthetic statement to act as a placeholder for a not-emitted statement in
@@ -12096,8 +12789,9 @@ var ts;
* @param original The original statement.
*/
function createNotEmittedStatement(original) {
- var node = createNode(293 /* NotEmittedStatement */, /*location*/ original);
+ var node = createSynthesizedNode(294 /* NotEmittedStatement */);
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
@@ -12105,8 +12799,9 @@ var ts;
* Creates a synthetic element to act as a placeholder for the end of an emitted declaration in
* order to properly emit exports.
*/
+ /* @internal */
function createEndOfDeclarationMarker(original) {
- var node = createNode(296 /* EndOfDeclarationMarker */);
+ var node = createSynthesizedNode(297 /* EndOfDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12116,8 +12811,9 @@ var ts;
* Creates a synthetic element to act as a placeholder for the beginning of a merged declaration in
* order to properly emit exports.
*/
+ /* @internal */
function createMergeDeclarationMarker(original) {
- var node = createNode(295 /* MergeDeclarationMarker */);
+ var node = createSynthesizedNode(296 /* MergeDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12131,44 +12827,45 @@ var ts;
* @param original The original outer expression.
* @param location The location for the expression. Defaults to the positions from "original" if provided.
*/
- function createPartiallyEmittedExpression(expression, original, location) {
- var node = createNode(294 /* PartiallyEmittedExpression */, /*location*/ location || original);
+ function createPartiallyEmittedExpression(expression, original) {
+ var node = createSynthesizedNode(295 /* PartiallyEmittedExpression */);
node.expression = expression;
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createPartiallyEmittedExpression = createPartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node, expression) {
if (node.expression !== expression) {
- return updateNode(createPartiallyEmittedExpression(expression, node.original, node), node);
+ return updateNode(createPartiallyEmittedExpression(expression, node.original), node);
}
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
- /**
- * Creates a node that emits a string of raw text in an expression position. Raw text is never
- * transformed, should be ES3 compliant, and should have the same precedence as
- * PrimaryExpression.
- *
- * @param text The raw text of the node.
- */
- function createRawExpression(text) {
- var node = createNode(297 /* RawExpression */);
- node.text = text;
+ function createBundle(sourceFiles) {
+ var node = ts.createNode(265 /* Bundle */);
+ node.sourceFiles = sourceFiles;
+ return node;
+ }
+ ts.createBundle = createBundle;
+ function updateBundle(node, sourceFiles) {
+ if (node.sourceFiles !== sourceFiles) {
+ return createBundle(sourceFiles);
+ }
return node;
}
- ts.createRawExpression = createRawExpression;
+ ts.updateBundle = updateBundle;
// Compound nodes
function createComma(left, right) {
return createBinary(left, 25 /* CommaToken */, right);
}
ts.createComma = createComma;
- function createLessThan(left, right, location) {
- return createBinary(left, 26 /* LessThanToken */, right, location);
+ function createLessThan(left, right) {
+ return createBinary(left, 26 /* LessThanToken */, right);
}
ts.createLessThan = createLessThan;
- function createAssignment(left, right, location) {
- return createBinary(left, 57 /* EqualsToken */, right, location);
+ function createAssignment(left, right) {
+ return createBinary(left, 57 /* EqualsToken */, right);
}
ts.createAssignment = createAssignment;
function createStrictEquality(left, right) {
@@ -12187,8 +12884,8 @@ var ts;
return createBinary(left, 37 /* MinusToken */, right);
}
ts.createSubtract = createSubtract;
- function createPostfixIncrement(operand, location) {
- return createPostfix(operand, 42 /* PlusPlusToken */, location);
+ function createPostfixIncrement(operand) {
+ return createPostfix(operand, 42 /* PlusPlusToken */);
}
ts.createPostfixIncrement = createPostfixIncrement;
function createLogicalAnd(left, right) {
@@ -12207,61 +12904,378 @@ var ts;
return createVoid(createLiteral(0));
}
ts.createVoidZero = createVoidZero;
+ function createExportDefault(expression) {
+ return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression);
+ }
+ ts.createExportDefault = createExportDefault;
+ function createExternalModuleExport(exportName) {
+ return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(/*propertyName*/ undefined, exportName)]));
+ }
+ ts.createExternalModuleExport = createExternalModuleExport;
+ function asName(name) {
+ return typeof name === "string" ? createIdentifier(name) : name;
+ }
+ function asExpression(value) {
+ return typeof value === "string" || typeof value === "number" ? createLiteral(value) : value;
+ }
+ function asNodeArray(array) {
+ return array ? createNodeArray(array) : undefined;
+ }
+ function asToken(value) {
+ return typeof value === "number" ? createToken(value) : value;
+ }
+ /**
+ * Clears any EmitNode entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile) {
+ // During transformation we may need to annotate a parse tree node with transient
+ // transformation properties. As parse tree nodes live longer than transformation
+ // nodes, we need to make sure we reclaim any memory allocated for custom ranges
+ // from these nodes to ensure we do not hold onto entire subtrees just for position
+ // information. We also need to reset these nodes to a pre-transformation state
+ // for incremental parsing scenarios so that we do not impact later emit.
+ sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
+ var emitNode = sourceFile && sourceFile.emitNode;
+ var annotatedNodes = emitNode && emitNode.annotatedNodes;
+ if (annotatedNodes) {
+ for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
+ var node = annotatedNodes_1[_i];
+ node.emitNode = undefined;
+ }
+ }
+ }
+ ts.disposeEmitNodes = disposeEmitNodes;
+ /**
+ * Associates a node with the current transformation, initializing
+ * various transient transformation properties.
+ */
+ /* @internal */
+ function getOrCreateEmitNode(node) {
+ if (!node.emitNode) {
+ if (ts.isParseTreeNode(node)) {
+ // To avoid holding onto transformation artifacts, we keep track of any
+ // parse tree node we are annotating. This allows us to clean them up after
+ // all transformations have completed.
+ if (node.kind === 264 /* SourceFile */) {
+ return node.emitNode = { annotatedNodes: [node] };
+ }
+ var sourceFile = ts.getSourceFileOfNode(node);
+ getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
+ }
+ node.emitNode = {};
+ }
+ return node.emitNode;
+ }
+ ts.getOrCreateEmitNode = getOrCreateEmitNode;
+ function setTextRange(range, location) {
+ if (location) {
+ range.pos = location.pos;
+ range.end = location.end;
+ }
+ return range;
+ }
+ ts.setTextRange = setTextRange;
+ /**
+ * Gets flags that control emit behavior of a node.
+ */
+ function getEmitFlags(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.flags;
+ }
+ ts.getEmitFlags = getEmitFlags;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags(node, emitFlags) {
+ getOrCreateEmitNode(node).flags = emitFlags;
+ return node;
+ }
+ ts.setEmitFlags = setEmitFlags;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.sourceMapRange) || node;
+ }
+ ts.getSourceMapRange = getSourceMapRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange(node, range) {
+ getOrCreateEmitNode(node).sourceMapRange = range;
+ return node;
+ }
+ ts.setSourceMapRange = setSourceMapRange;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node, token) {
+ var emitNode = node.emitNode;
+ var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
+ return tokenSourceMapRanges && tokenSourceMapRanges[token];
+ }
+ ts.getTokenSourceMapRange = getTokenSourceMapRange;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange(node, token, range) {
+ var emitNode = getOrCreateEmitNode(node);
+ var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = []);
+ tokenSourceMapRanges[token] = range;
+ return node;
+ }
+ ts.setTokenSourceMapRange = setTokenSourceMapRange;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.commentRange) || node;
+ }
+ ts.getCommentRange = getCommentRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange(node, range) {
+ getOrCreateEmitNode(node).commentRange = range;
+ return node;
+ }
+ ts.setCommentRange = setCommentRange;
+ function getSyntheticLeadingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.leadingComments;
+ }
+ ts.getSyntheticLeadingComments = getSyntheticLeadingComments;
+ function setSyntheticLeadingComments(node, comments) {
+ getOrCreateEmitNode(node).leadingComments = comments;
+ return node;
+ }
+ ts.setSyntheticLeadingComments = setSyntheticLeadingComments;
+ function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticLeadingComments(node, ts.append(getSyntheticLeadingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticLeadingComment = addSyntheticLeadingComment;
+ function getSyntheticTrailingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.trailingComments;
+ }
+ ts.getSyntheticTrailingComments = getSyntheticTrailingComments;
+ function setSyntheticTrailingComments(node, comments) {
+ getOrCreateEmitNode(node).trailingComments = comments;
+ return node;
+ }
+ ts.setSyntheticTrailingComments = setSyntheticTrailingComments;
+ function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticTrailingComments(node, ts.append(getSyntheticTrailingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticTrailingComment = addSyntheticTrailingComment;
+ /**
+ * Gets the constant value to emit for an expression.
+ */
+ function getConstantValue(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.constantValue;
+ }
+ ts.getConstantValue = getConstantValue;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node, value) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.constantValue = value;
+ return node;
+ }
+ ts.setConstantValue = setConstantValue;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper(node, helper) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ return node;
+ }
+ ts.addEmitHelper = addEmitHelper;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers(node, helpers) {
+ if (ts.some(helpers)) {
+ var emitNode = getOrCreateEmitNode(node);
+ for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
+ var helper = helpers_1[_i];
+ if (!ts.contains(emitNode.helpers, helper)) {
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ }
+ }
+ }
+ return node;
+ }
+ ts.addEmitHelpers = addEmitHelpers;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node, helper) {
+ var emitNode = node.emitNode;
+ if (emitNode) {
+ var helpers = emitNode.helpers;
+ if (helpers) {
+ return ts.orderedRemoveItem(helpers, helper);
+ }
+ }
+ return false;
+ }
+ ts.removeEmitHelper = removeEmitHelper;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.helpers;
+ }
+ ts.getEmitHelpers = getEmitHelpers;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source, target, predicate) {
+ var sourceEmitNode = source.emitNode;
+ var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
+ if (!ts.some(sourceEmitHelpers))
+ return;
+ var targetEmitNode = getOrCreateEmitNode(target);
+ var helpersRemoved = 0;
+ for (var i = 0; i < sourceEmitHelpers.length; i++) {
+ var helper = sourceEmitHelpers[i];
+ if (predicate(helper)) {
+ helpersRemoved++;
+ if (!ts.contains(targetEmitNode.helpers, helper)) {
+ targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
+ }
+ }
+ else if (helpersRemoved > 0) {
+ sourceEmitHelpers[i - helpersRemoved] = helper;
+ }
+ }
+ if (helpersRemoved > 0) {
+ sourceEmitHelpers.length -= helpersRemoved;
+ }
+ }
+ ts.moveEmitHelpers = moveEmitHelpers;
+ /* @internal */
+ function compareEmitHelpers(x, y) {
+ if (x === y)
+ return 0 /* EqualTo */;
+ if (x.priority === y.priority)
+ return 0 /* EqualTo */;
+ if (x.priority === undefined)
+ return 1 /* GreaterThan */;
+ if (y.priority === undefined)
+ return -1 /* LessThan */;
+ return ts.compareValues(x.priority, y.priority);
+ }
+ ts.compareEmitHelpers = compareEmitHelpers;
+ function setOriginalNode(node, original) {
+ node.original = original;
+ if (original) {
+ var emitNode = original.emitNode;
+ if (emitNode)
+ node.emitNode = mergeEmitNode(emitNode, node.emitNode);
+ }
+ return node;
+ }
+ ts.setOriginalNode = setOriginalNode;
+ function mergeEmitNode(sourceEmitNode, destEmitNode) {
+ var flags = sourceEmitNode.flags, leadingComments = sourceEmitNode.leadingComments, trailingComments = sourceEmitNode.trailingComments, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
+ if (!destEmitNode)
+ destEmitNode = {};
+ if (leadingComments)
+ destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
+ if (trailingComments)
+ destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
+ if (flags)
+ destEmitNode.flags = flags;
+ if (commentRange)
+ destEmitNode.commentRange = commentRange;
+ if (sourceMapRange)
+ destEmitNode.sourceMapRange = sourceMapRange;
+ if (tokenSourceMapRanges)
+ destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
+ if (constantValue !== undefined)
+ destEmitNode.constantValue = constantValue;
+ if (helpers)
+ destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
+ return destEmitNode;
+ }
+ function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
+ if (!destRanges)
+ destRanges = [];
+ for (var key in sourceRanges) {
+ destRanges[key] = sourceRanges[key];
+ }
+ return destRanges;
+ }
+})(ts || (ts = {}));
+/* @internal */
+(function (ts) {
+ // Compound nodes
function createTypeCheck(value, tag) {
return tag === "undefined"
- ? createStrictEquality(value, createVoidZero())
- : createStrictEquality(createTypeOf(value), createLiteral(tag));
+ ? ts.createStrictEquality(value, ts.createVoidZero())
+ : ts.createStrictEquality(ts.createTypeOf(value), ts.createLiteral(tag));
}
ts.createTypeCheck = createTypeCheck;
function createMemberAccessForPropertyName(target, memberName, location) {
if (ts.isComputedPropertyName(memberName)) {
- return createElementAccess(target, memberName.expression, location);
+ return ts.setTextRange(ts.createElementAccess(target, memberName.expression), location);
}
else {
- var expression = ts.isIdentifier(memberName) ? createPropertyAccess(target, memberName, location) : createElementAccess(target, memberName, location);
- (expression.emitNode || (expression.emitNode = {})).flags |= 64 /* NoNestedSourceMaps */;
+ var expression = ts.setTextRange(ts.isIdentifier(memberName)
+ ? ts.createPropertyAccess(target, memberName)
+ : ts.createElementAccess(target, memberName), memberName);
+ ts.getOrCreateEmitNode(expression).flags |= 64 /* NoNestedSourceMaps */;
return expression;
}
}
ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName;
function createFunctionCall(func, thisArg, argumentsList, location) {
- return createCall(createPropertyAccess(func, "call"),
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"),
/*typeArguments*/ undefined, [
thisArg
- ].concat(argumentsList), location);
+ ].concat(argumentsList)), location);
}
ts.createFunctionCall = createFunctionCall;
function createFunctionApply(func, thisArg, argumentsExpression, location) {
- return createCall(createPropertyAccess(func, "apply"),
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "apply"),
/*typeArguments*/ undefined, [
thisArg,
argumentsExpression
- ], location);
+ ]), location);
}
ts.createFunctionApply = createFunctionApply;
function createArraySlice(array, start) {
var argumentsList = [];
if (start !== undefined) {
- argumentsList.push(typeof start === "number" ? createLiteral(start) : start);
+ argumentsList.push(typeof start === "number" ? ts.createLiteral(start) : start);
}
- return createCall(createPropertyAccess(array, "slice"), /*typeArguments*/ undefined, argumentsList);
+ return ts.createCall(ts.createPropertyAccess(array, "slice"), /*typeArguments*/ undefined, argumentsList);
}
ts.createArraySlice = createArraySlice;
function createArrayConcat(array, values) {
- return createCall(createPropertyAccess(array, "concat"),
+ return ts.createCall(ts.createPropertyAccess(array, "concat"),
/*typeArguments*/ undefined, values);
}
ts.createArrayConcat = createArrayConcat;
function createMathPow(left, right, location) {
- return createCall(createPropertyAccess(createIdentifier("Math"), "pow"),
- /*typeArguments*/ undefined, [left, right], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Math"), "pow"),
+ /*typeArguments*/ undefined, [left, right]), location);
}
ts.createMathPow = createMathPow;
function createReactNamespace(reactNamespace, parent) {
// To ensure the emit resolver can properly resolve the namespace, we need to
// treat this identifier as if it were a source tree node by clearing the `Synthesized`
// flag and setting a parent node.
- var react = createIdentifier(reactNamespace || "React");
+ var react = ts.createIdentifier(reactNamespace || "React");
react.flags &= ~8 /* Synthesized */;
// Set the parent that is in parse tree
// this makes sure that parent chain is intact for checker to traverse complete scope tree
@@ -12271,9 +13285,9 @@ var ts;
function createJsxFactoryExpressionFromEntityName(jsxFactory, parent) {
if (ts.isQualifiedName(jsxFactory)) {
var left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
- var right = createSynthesizedNode(70 /* Identifier */);
+ var right = ts.createIdentifier(jsxFactory.right.text);
right.text = jsxFactory.right.text;
- return createPropertyAccess(left, right);
+ return ts.createPropertyAccess(left, right);
}
else {
return createReactNamespace(jsxFactory.text, parent);
@@ -12282,7 +13296,7 @@ var ts;
function createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parent) {
return jsxFactoryEntity ?
createJsxFactoryExpressionFromEntityName(jsxFactoryEntity, parent) :
- createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
+ ts.createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
}
function createExpressionForJsxElement(jsxFactoryEntity, reactNamespace, tagName, props, children, parentElement, location) {
var argumentsList = [tagName];
@@ -12291,7 +13305,7 @@ var ts;
}
if (children && children.length > 0) {
if (!props) {
- argumentsList.push(createNull());
+ argumentsList.push(ts.createNull());
}
if (children.length > 1) {
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
@@ -12304,35 +13318,89 @@ var ts;
argumentsList.push(children[0]);
}
}
- return createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement),
- /*typeArguments*/ undefined, argumentsList, location);
+ return ts.setTextRange(ts.createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement),
+ /*typeArguments*/ undefined, argumentsList), location);
}
ts.createExpressionForJsxElement = createExpressionForJsxElement;
- function createExportDefault(expression) {
- return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression);
- }
- ts.createExportDefault = createExportDefault;
- function createExternalModuleExport(exportName) {
- return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(exportName)]));
- }
- ts.createExternalModuleExport = createExternalModuleExport;
- function createLetStatement(name, initializer, location) {
- return createVariableStatement(/*modifiers*/ undefined, createLetDeclarationList([createVariableDeclaration(name, /*type*/ undefined, initializer)]), location);
- }
- ts.createLetStatement = createLetStatement;
- function createLetDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 1 /* Let */);
- }
- ts.createLetDeclarationList = createLetDeclarationList;
- function createConstDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 2 /* Const */);
- }
- ts.createConstDeclarationList = createConstDeclarationList;
// Helpers
function getHelperName(name) {
- return setEmitFlags(createIdentifier(name), 4096 /* HelperName */ | 2 /* AdviseOnEmitNode */);
+ return ts.setEmitFlags(ts.createIdentifier(name), 4096 /* HelperName */ | 2 /* AdviseOnEmitNode */);
}
ts.getHelperName = getHelperName;
+ var valuesHelper = {
+ name: "typescript:values",
+ scoped: false,
+ text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n "
+ };
+ function createValuesHelper(context, expression, location) {
+ context.requestEmitHelper(valuesHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__values"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
+ ts.createValuesHelper = createValuesHelper;
+ var readHelper = {
+ name: "typescript:read",
+ scoped: false,
+ text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n "
+ };
+ function createReadHelper(context, iteratorRecord, count, location) {
+ context.requestEmitHelper(readHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__read"),
+ /*typeArguments*/ undefined, count !== undefined
+ ? [iteratorRecord, ts.createLiteral(count)]
+ : [iteratorRecord]), location);
+ }
+ ts.createReadHelper = createReadHelper;
+ var spreadHelper = {
+ name: "typescript:spread",
+ scoped: false,
+ text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"
+ };
+ function createSpreadHelper(context, argumentList, location) {
+ context.requestEmitHelper(readHelper);
+ context.requestEmitHelper(spreadHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__spread"),
+ /*typeArguments*/ undefined, argumentList), location);
+ }
+ ts.createSpreadHelper = createSpreadHelper;
+ // Utilities
+ function createForOfBindingStatement(node, boundValue) {
+ if (ts.isVariableDeclarationList(node)) {
+ var firstDeclaration = ts.firstOrUndefined(node.declarations);
+ var updatedDeclaration = ts.updateVariableDeclaration(firstDeclaration, firstDeclaration.name,
+ /*typeNode*/ undefined, boundValue);
+ return ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.updateVariableDeclarationList(node, [updatedDeclaration])),
+ /*location*/ node);
+ }
+ else {
+ var updatedExpression = ts.setTextRange(ts.createAssignment(node, boundValue), /*location*/ node);
+ return ts.setTextRange(ts.createStatement(updatedExpression), /*location*/ node);
+ }
+ }
+ ts.createForOfBindingStatement = createForOfBindingStatement;
+ function insertLeadingStatement(dest, source) {
+ if (ts.isBlock(dest)) {
+ return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements));
+ }
+ else {
+ return ts.createBlock(ts.createNodeArray([dest, source]), /*multiLine*/ true);
+ }
+ }
+ ts.insertLeadingStatement = insertLeadingStatement;
+ function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {
+ if (!outermostLabeledStatement) {
+ return node;
+ }
+ var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 /* LabeledStatement */
+ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement)
+ : node);
+ if (afterRestoreLabelCallback) {
+ afterRestoreLabelCallback(outermostLabeledStatement);
+ }
+ return updated;
+ }
+ ts.restoreEnclosingLabel = restoreEnclosingLabel;
function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
var target = skipParentheses(node);
switch (target.kind) {
@@ -12342,13 +13410,13 @@ var ts;
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
return false;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
var elements = target.elements;
if (elements.length === 0) {
return false;
}
return true;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return target.properties.length > 0;
default:
return true;
@@ -12359,22 +13427,27 @@ var ts;
var thisArg;
var target;
if (ts.isSuperProperty(callee)) {
- thisArg = createThis();
+ thisArg = ts.createThis();
target = callee;
}
else if (callee.kind === 96 /* SuperKeyword */) {
- thisArg = createThis();
- target = languageVersion < 2 /* ES2015 */ ? createIdentifier("_super", /*location*/ callee) : callee;
+ thisArg = ts.createThis();
+ target = languageVersion < 2 /* ES2015 */
+ ? ts.setTextRange(ts.createIdentifier("_super"), callee)
+ : callee;
+ }
+ else if (ts.getEmitFlags(callee) & 4096 /* HelperName */) {
+ thisArg = ts.createVoidZero();
+ target = parenthesizeForAccess(callee);
}
else {
switch (callee.kind) {
- case 177 /* PropertyAccessExpression */: {
+ case 178 /* PropertyAccessExpression */: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
// for `a.b()` target is `(_a = a).b` and thisArg is `_a`
- thisArg = createTempVariable(recordTempVariable);
- target = createPropertyAccess(createAssignment(thisArg, callee.expression,
- /*location*/ callee.expression), callee.name,
- /*location*/ callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12382,13 +13455,12 @@ var ts;
}
break;
}
- case 178 /* ElementAccessExpression */: {
+ case 179 /* ElementAccessExpression */: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
// for `a[b]()` target is `(_a = a)[b]` and thisArg is `_a`
- thisArg = createTempVariable(recordTempVariable);
- target = createElementAccess(createAssignment(thisArg, callee.expression,
- /*location*/ callee.expression), callee.argumentExpression,
- /*location*/ callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12398,7 +13470,7 @@ var ts;
}
default: {
// for `a()` target is `a` and thisArg is `void 0`
- thisArg = createVoidZero();
+ thisArg = ts.createVoidZero();
target = parenthesizeForAccess(expression);
break;
}
@@ -12408,42 +13480,42 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, createComma);
+ return ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
if (ts.isQualifiedName(node)) {
var left = createExpressionFromEntityName(node.left);
- var right = getMutableClone(node.right);
- return createPropertyAccess(left, right, /*location*/ node);
+ var right = ts.getMutableClone(node.right);
+ return ts.setTextRange(ts.createPropertyAccess(left, right), node);
}
else {
- return getMutableClone(node);
+ return ts.getMutableClone(node);
}
}
ts.createExpressionFromEntityName = createExpressionFromEntityName;
function createExpressionForPropertyName(memberName) {
if (ts.isIdentifier(memberName)) {
- return createLiteral(memberName, /*location*/ undefined);
+ return ts.createLiteral(memberName);
}
else if (ts.isComputedPropertyName(memberName)) {
- return getMutableClone(memberName.expression);
+ return ts.getMutableClone(memberName.expression);
}
else {
- return getMutableClone(memberName);
+ return ts.getMutableClone(memberName);
}
}
ts.createExpressionForPropertyName = createExpressionForPropertyName;
function createExpressionForObjectLiteralElementLike(node, property, receiver) {
switch (property.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine);
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return createExpressionForPropertyAssignment(property, receiver);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return createExpressionForShorthandPropertyAssignment(property, receiver);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return createExpressionForMethodDeclaration(property, receiver);
}
}
@@ -12453,57 +13525,55 @@ var ts;
if (property === firstAccessor) {
var properties_1 = [];
if (getAccessor) {
- var getterFunction = createFunctionExpression(getAccessor.modifiers,
+ var getterFunction = ts.createFunctionExpression(getAccessor.modifiers,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, getAccessor.parameters,
- /*type*/ undefined, getAccessor.body,
- /*location*/ getAccessor);
- setOriginalNode(getterFunction, getAccessor);
- var getter = createPropertyAssignment("get", getterFunction);
+ /*type*/ undefined, getAccessor.body);
+ ts.setTextRange(getterFunction, getAccessor);
+ ts.setOriginalNode(getterFunction, getAccessor);
+ var getter = ts.createPropertyAssignment("get", getterFunction);
properties_1.push(getter);
}
if (setAccessor) {
- var setterFunction = createFunctionExpression(setAccessor.modifiers,
+ var setterFunction = ts.createFunctionExpression(setAccessor.modifiers,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, setAccessor.parameters,
- /*type*/ undefined, setAccessor.body,
- /*location*/ setAccessor);
- setOriginalNode(setterFunction, setAccessor);
- var setter = createPropertyAssignment("set", setterFunction);
+ /*type*/ undefined, setAccessor.body);
+ ts.setTextRange(setterFunction, setAccessor);
+ ts.setOriginalNode(setterFunction, setAccessor);
+ var setter = ts.createPropertyAssignment("set", setterFunction);
properties_1.push(setter);
}
- properties_1.push(createPropertyAssignment("enumerable", createLiteral(true)));
- properties_1.push(createPropertyAssignment("configurable", createLiteral(true)));
- var expression = createCall(createPropertyAccess(createIdentifier("Object"), "defineProperty"),
+ properties_1.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
+ properties_1.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
+ var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
receiver,
createExpressionForPropertyName(property.name),
- createObjectLiteral(properties_1, /*location*/ undefined, multiLine)
- ],
+ ts.createObjectLiteral(properties_1, multiLine)
+ ]),
/*location*/ firstAccessor);
return ts.aggregateTransformFlags(expression);
}
return undefined;
}
function createExpressionForPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), property.initializer,
- /*location*/ property),
- /*original*/ property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), property.initializer), property), property));
}
function createExpressionForShorthandPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), getSynthesizedClone(property.name),
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), ts.getSynthesizedClone(property.name)),
/*location*/ property),
/*original*/ property));
}
function createExpressionForMethodDeclaration(method, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, method.name, /*location*/ method.name), setOriginalNode(createFunctionExpression(method.modifiers, method.asteriskToken,
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, method.name, /*location*/ method.name), ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(method.modifiers, method.asteriskToken,
/*name*/ undefined,
/*typeParameters*/ undefined, method.parameters,
- /*type*/ undefined, method.body,
+ /*type*/ undefined, method.body),
/*location*/ method),
- /*original*/ method),
+ /*original*/ method)),
/*location*/ method),
/*original*/ method));
}
@@ -12525,7 +13595,7 @@ var ts;
* Gets whether an identifier should only be referred to by its local name.
*/
function isLocalName(node) {
- return (getEmitFlags(node) & 16384 /* LocalName */) !== 0;
+ return (ts.getEmitFlags(node) & 16384 /* LocalName */) !== 0;
}
ts.isLocalName = isLocalName;
/**
@@ -12547,7 +13617,7 @@ var ts;
* name points to an exported symbol.
*/
function isExportName(node) {
- return (getEmitFlags(node) & 8192 /* ExportName */) !== 0;
+ return (ts.getEmitFlags(node) & 8192 /* ExportName */) !== 0;
}
ts.isExportName = isExportName;
/**
@@ -12563,17 +13633,17 @@ var ts;
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name_8 = getMutableClone(node.name);
- emitFlags |= getEmitFlags(node.name);
+ var name = ts.getMutableClone(node.name);
+ emitFlags |= ts.getEmitFlags(node.name);
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
emitFlags |= 1536 /* NoComments */;
if (emitFlags)
- setEmitFlags(name_8, emitFlags);
- return name_8;
+ ts.setEmitFlags(name, emitFlags);
+ return name;
}
- return getGeneratedNameForNode(node);
+ return ts.getGeneratedNameForNode(node);
}
/**
* Gets the exported name of a declaration for use in expressions.
@@ -12602,19 +13672,20 @@ var ts;
* @param allowSourceMaps A value indicating whether source maps may be emitted for the name.
*/
function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {
- var qualifiedName = createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : getSynthesizedClone(name), /*location*/ name);
+ var qualifiedName = ts.createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : ts.getSynthesizedClone(name));
+ ts.setTextRange(qualifiedName, name);
var emitFlags;
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
emitFlags |= 1536 /* NoComments */;
if (emitFlags)
- setEmitFlags(qualifiedName, emitFlags);
+ ts.setEmitFlags(qualifiedName, emitFlags);
return qualifiedName;
}
ts.getNamespaceMemberName = getNamespaceMemberName;
function convertToFunctionBody(node, multiLine) {
- return ts.isBlock(node) ? node : createBlock([createReturn(node, /*location*/ node)], /*location*/ node, multiLine);
+ return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
function isUseStrictPrologue(node) {
@@ -12631,7 +13702,18 @@ var ts;
* @param ensureUseStrict: boolean determining whether the function need to add prologue-directives
* @param visitor: Optional callback used to visit any custom prologue directives.
*/
- function addPrologueDirectives(target, source, ensureUseStrict, visitor) {
+ function addPrologue(target, source, ensureUseStrict, visitor) {
+ var offset = addStandardPrologue(target, source, ensureUseStrict);
+ return addCustomPrologue(target, source, offset, visitor);
+ }
+ ts.addPrologue = addPrologue;
+ /**
+ * Add just the standard (string-expression) prologue-directives into target statement-array.
+ * The function needs to be called during each transformation step.
+ * This function needs to be called whenever we transform the statement
+ * list of a source file, namespace, or function-like body.
+ */
+ function addStandardPrologue(target, source, ensureUseStrict) {
ts.Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array");
var foundUseStrict = false;
var statementOffset = 0;
@@ -12650,11 +13732,22 @@ var ts;
statementOffset++;
}
if (ensureUseStrict && !foundUseStrict) {
- target.push(startOnNewLine(createStatement(createLiteral("use strict"))));
+ target.push(startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))));
}
+ return statementOffset;
+ }
+ ts.addStandardPrologue = addStandardPrologue;
+ /**
+ * Add just the custom prologue-directives into target statement-array.
+ * The function needs to be called during each transformation step.
+ * This function needs to be called whenever we transform the statement
+ * list of a source file, namespace, or function-like body.
+ */
+ function addCustomPrologue(target, source, statementOffset, visitor) {
+ var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (getEmitFlags(statement) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(statement) & 524288 /* CustomPrologue */) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -12664,7 +13757,7 @@ var ts;
}
return statementOffset;
}
- ts.addPrologueDirectives = addPrologueDirectives;
+ ts.addCustomPrologue = addCustomPrologue;
function startsWithUseStrict(statements) {
var firstStatement = ts.firstOrUndefined(statements);
return firstStatement !== undefined
@@ -12692,13 +13785,23 @@ var ts;
}
}
if (!foundUseStrict) {
- return createNodeArray([
- startOnNewLine(createStatement(createLiteral("use strict")))
- ].concat(statements), statements);
+ return ts.setTextRange(ts.createNodeArray([
+ startOnNewLine(ts.createStatement(ts.createLiteral("use strict")))
+ ].concat(statements)), statements);
}
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
+ function parenthesizeConditionalHead(condition) {
+ var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */);
+ var emittedCondition = skipPartiallyEmittedExpressions(condition);
+ var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
+ if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) {
+ return ts.createParen(condition);
+ }
+ return condition;
+ }
+ ts.parenthesizeConditionalHead = parenthesizeConditionalHead;
/**
* Wraps the operand to a BinaryExpression in parentheses if they are needed to preserve the intended
* order of operations.
@@ -12711,11 +13814,11 @@ var ts;
function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
var skipped = skipPartiallyEmittedExpressions(operand);
// If the resulting expression is already parenthesized, we do not need to do any further processing.
- if (skipped.kind === 183 /* ParenthesizedExpression */) {
+ if (skipped.kind === 184 /* ParenthesizedExpression */) {
return operand;
}
return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
- ? createParen(operand)
+ ? ts.createParen(operand)
: operand;
}
ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand;
@@ -12745,8 +13848,8 @@ var ts;
//
// If `a ** d` is on the left of operator `**`, we need to parenthesize to preserve
// the intended order of operations: `(a ** b) ** c`
- var binaryOperatorPrecedence = ts.getOperatorPrecedence(192 /* BinaryExpression */, binaryOperator);
- var binaryOperatorAssociativity = ts.getOperatorAssociativity(192 /* BinaryExpression */, binaryOperator);
+ var binaryOperatorPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, binaryOperator);
+ var binaryOperatorAssociativity = ts.getOperatorAssociativity(193 /* BinaryExpression */, binaryOperator);
var emittedOperand = skipPartiallyEmittedExpressions(operand);
var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) {
@@ -12755,7 +13858,7 @@ var ts;
// and is a yield expression, then we do not need parentheses.
if (!isLeftSideOfBinary
&& binaryOperatorAssociativity === 1 /* Right */
- && operand.kind === 195 /* YieldExpression */) {
+ && operand.kind === 196 /* YieldExpression */) {
return false;
}
return true;
@@ -12843,7 +13946,7 @@ var ts;
if (ts.isLiteralKind(node.kind)) {
return node.kind;
}
- if (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) {
+ if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) {
if (node.cachedLiteralKind !== undefined) {
return node.cachedLiteralKind;
}
@@ -12858,11 +13961,11 @@ var ts;
return 0 /* Unknown */;
}
function parenthesizeForConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(193 /* ConditionalExpression */, 54 /* QuestionToken */);
+ var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */);
var emittedCondition = skipPartiallyEmittedExpressions(condition);
var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) {
- return createParen(condition);
+ return ts.createParen(condition);
}
return condition;
}
@@ -12871,10 +13974,11 @@ var ts;
// per ES grammar both 'whenTrue' and 'whenFalse' parts of conditional expression are assignment expressions
// so in case when comma expression is introduced as a part of previous transformations
// if should be wrapped in parens since comma operator has the lowest precedence
- return e.kind === 192 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */
- ? createParen(e)
+ return e.kind === 193 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */
+ ? ts.createParen(e)
: e;
}
+ ts.parenthesizeSubexpressionOfConditionalExpression = parenthesizeSubexpressionOfConditionalExpression;
/**
* Wraps an expression in parentheses if it is needed in order to use the expression
* as the expression of a NewExpression node.
@@ -12884,12 +13988,12 @@ var ts;
function parenthesizeForNew(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
switch (emittedExpression.kind) {
- case 179 /* CallExpression */:
- return createParen(expression);
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ return ts.createParen(expression);
+ case 181 /* NewExpression */:
return emittedExpression.arguments
? expression
- : createParen(expression);
+ : ts.createParen(expression);
}
return parenthesizeForAccess(expression);
}
@@ -12902,32 +14006,29 @@ var ts;
*/
function parenthesizeForAccess(expression) {
// isLeftHandSideExpression is almost the correct criterion for when it is not necessary
- // to parenthesize the expression before a dot. The known exceptions are:
+ // to parenthesize the expression before a dot. The known exception is:
//
// NewExpression:
// new C.x -> not the same as (new C).x
- // NumericLiteral
- // 1.x -> not the same as (1).x
//
var emittedExpression = skipPartiallyEmittedExpressions(expression);
if (ts.isLeftHandSideExpression(emittedExpression)
- && (emittedExpression.kind !== 180 /* NewExpression */ || emittedExpression.arguments)
- && emittedExpression.kind !== 8 /* NumericLiteral */) {
+ && (emittedExpression.kind !== 181 /* NewExpression */ || emittedExpression.arguments)) {
return expression;
}
- return createParen(expression, /*location*/ expression);
+ return ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeForAccess = parenthesizeForAccess;
function parenthesizePostfixOperand(operand) {
return ts.isLeftHandSideExpression(operand)
? operand
- : createParen(operand, /*location*/ operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePostfixOperand = parenthesizePostfixOperand;
function parenthesizePrefixOperand(operand) {
return ts.isUnaryExpression(operand)
? operand
- : createParen(operand, /*location*/ operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePrefixOperand = parenthesizePrefixOperand;
function parenthesizeListElements(elements) {
@@ -12942,17 +14043,18 @@ var ts;
}
}
if (result !== undefined) {
- return createNodeArray(result, elements, elements.hasTrailingComma);
+ return ts.setTextRange(ts.createNodeArray(result, elements.hasTrailingComma), elements);
}
return elements;
}
+ ts.parenthesizeListElements = parenthesizeListElements;
function parenthesizeExpressionForList(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
- var commaPrecedence = ts.getOperatorPrecedence(192 /* BinaryExpression */, 25 /* CommaToken */);
+ var commaPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, 25 /* CommaToken */);
return expressionPrecedence > commaPrecedence
? expression
- : createParen(expression, /*location*/ expression);
+ : ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeExpressionForList = parenthesizeExpressionForList;
function parenthesizeExpressionForExpressionStatement(expression) {
@@ -12960,16 +14062,16 @@ var ts;
if (ts.isCallExpression(emittedExpression)) {
var callee = emittedExpression.expression;
var kind = skipPartiallyEmittedExpressions(callee).kind;
- if (kind === 184 /* FunctionExpression */ || kind === 185 /* ArrowFunction */) {
- var mutableCall = getMutableClone(emittedExpression);
- mutableCall.expression = createParen(callee, /*location*/ callee);
+ if (kind === 185 /* FunctionExpression */ || kind === 186 /* ArrowFunction */) {
+ var mutableCall = ts.getMutableClone(emittedExpression);
+ mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
return recreatePartiallyEmittedExpressions(expression, mutableCall);
}
}
else {
var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind;
- if (leftmostExpressionKind === 176 /* ObjectLiteralExpression */ || leftmostExpressionKind === 184 /* FunctionExpression */) {
- return createParen(expression, /*location*/ expression);
+ if (leftmostExpressionKind === 177 /* ObjectLiteralExpression */ || leftmostExpressionKind === 185 /* FunctionExpression */) {
+ return ts.setTextRange(ts.createParen(expression), expression);
}
}
return expression;
@@ -12983,7 +14085,7 @@ var ts;
*/
function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = getMutableClone(originalOuterExpression);
+ var clone_1 = ts.getMutableClone(originalOuterExpression);
clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
return clone_1;
}
@@ -12992,21 +14094,21 @@ var ts;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
node = node.operand;
continue;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
node = node.left;
continue;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
node = node.condition;
continue;
- case 179 /* CallExpression */:
- case 178 /* ElementAccessExpression */:
- case 177 /* PropertyAccessExpression */:
+ case 180 /* CallExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
node = node.expression;
continue;
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
node = node.expression;
continue;
}
@@ -13014,9 +14116,8 @@ var ts;
}
}
function parenthesizeConciseBody(body) {
- var emittedBody = skipPartiallyEmittedExpressions(body);
- if (emittedBody.kind === 176 /* ObjectLiteralExpression */) {
- return createParen(body, /*location*/ body);
+ if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177 /* ObjectLiteralExpression */) {
+ return ts.setTextRange(ts.createParen(body), body);
}
return body;
}
@@ -13047,7 +14148,7 @@ var ts;
}
ts.skipOuterExpressions = skipOuterExpressions;
function skipParentheses(node) {
- while (node.kind === 183 /* ParenthesizedExpression */) {
+ while (node.kind === 184 /* ParenthesizedExpression */) {
node = node.expression;
}
return node;
@@ -13061,7 +14162,7 @@ var ts;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 294 /* PartiallyEmittedExpression */) {
+ while (node.kind === 295 /* PartiallyEmittedExpression */) {
node = node.expression;
}
return node;
@@ -13072,188 +14173,6 @@ var ts;
return node;
}
ts.startOnNewLine = startOnNewLine;
- function setOriginalNode(node, original) {
- node.original = original;
- if (original) {
- var emitNode = original.emitNode;
- if (emitNode)
- node.emitNode = mergeEmitNode(emitNode, node.emitNode);
- }
- return node;
- }
- ts.setOriginalNode = setOriginalNode;
- function mergeEmitNode(sourceEmitNode, destEmitNode) {
- var flags = sourceEmitNode.flags, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
- if (!destEmitNode)
- destEmitNode = {};
- if (flags)
- destEmitNode.flags = flags;
- if (commentRange)
- destEmitNode.commentRange = commentRange;
- if (sourceMapRange)
- destEmitNode.sourceMapRange = sourceMapRange;
- if (tokenSourceMapRanges)
- destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
- if (constantValue !== undefined)
- destEmitNode.constantValue = constantValue;
- if (helpers)
- destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
- return destEmitNode;
- }
- function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
- if (!destRanges)
- destRanges = ts.createMap();
- ts.copyProperties(sourceRanges, destRanges);
- return destRanges;
- }
- /**
- * Clears any EmitNode entries from parse-tree nodes.
- * @param sourceFile A source file.
- */
- function disposeEmitNodes(sourceFile) {
- // During transformation we may need to annotate a parse tree node with transient
- // transformation properties. As parse tree nodes live longer than transformation
- // nodes, we need to make sure we reclaim any memory allocated for custom ranges
- // from these nodes to ensure we do not hold onto entire subtrees just for position
- // information. We also need to reset these nodes to a pre-transformation state
- // for incremental parsing scenarios so that we do not impact later emit.
- sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
- var emitNode = sourceFile && sourceFile.emitNode;
- var annotatedNodes = emitNode && emitNode.annotatedNodes;
- if (annotatedNodes) {
- for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
- var node = annotatedNodes_1[_i];
- node.emitNode = undefined;
- }
- }
- }
- ts.disposeEmitNodes = disposeEmitNodes;
- /**
- * Associates a node with the current transformation, initializing
- * various transient transformation properties.
- *
- * @param node The node.
- */
- function getOrCreateEmitNode(node) {
- if (!node.emitNode) {
- if (ts.isParseTreeNode(node)) {
- // To avoid holding onto transformation artifacts, we keep track of any
- // parse tree node we are annotating. This allows us to clean them up after
- // all transformations have completed.
- if (node.kind === 261 /* SourceFile */) {
- return node.emitNode = { annotatedNodes: [node] };
- }
- var sourceFile = ts.getSourceFileOfNode(node);
- getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
- }
- node.emitNode = {};
- }
- return node.emitNode;
- }
- ts.getOrCreateEmitNode = getOrCreateEmitNode;
- /**
- * Gets flags that control emit behavior of a node.
- *
- * @param node The node.
- */
- function getEmitFlags(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.flags;
- }
- ts.getEmitFlags = getEmitFlags;
- /**
- * Sets flags that control emit behavior of a node.
- *
- * @param node The node.
- * @param emitFlags The NodeEmitFlags for the node.
- */
- function setEmitFlags(node, emitFlags) {
- getOrCreateEmitNode(node).flags = emitFlags;
- return node;
- }
- ts.setEmitFlags = setEmitFlags;
- /**
- * Gets a custom text range to use when emitting source maps.
- *
- * @param node The node.
- */
- function getSourceMapRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.sourceMapRange) || node;
- }
- ts.getSourceMapRange = getSourceMapRange;
- /**
- * Sets a custom text range to use when emitting source maps.
- *
- * @param node The node.
- * @param range The text range.
- */
- function setSourceMapRange(node, range) {
- getOrCreateEmitNode(node).sourceMapRange = range;
- return node;
- }
- ts.setSourceMapRange = setSourceMapRange;
- /**
- * Gets the TextRange to use for source maps for a token of a node.
- *
- * @param node The node.
- * @param token The token.
- */
- function getTokenSourceMapRange(node, token) {
- var emitNode = node.emitNode;
- var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
- return tokenSourceMapRanges && tokenSourceMapRanges[token];
- }
- ts.getTokenSourceMapRange = getTokenSourceMapRange;
- /**
- * Sets the TextRange to use for source maps for a token of a node.
- *
- * @param node The node.
- * @param token The token.
- * @param range The text range.
- */
- function setTokenSourceMapRange(node, token, range) {
- var emitNode = getOrCreateEmitNode(node);
- var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = ts.createMap());
- tokenSourceMapRanges[token] = range;
- return node;
- }
- ts.setTokenSourceMapRange = setTokenSourceMapRange;
- /**
- * Gets a custom text range to use when emitting comments.
- *
- * @param node The node.
- */
- function getCommentRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.commentRange) || node;
- }
- ts.getCommentRange = getCommentRange;
- /**
- * Sets a custom text range to use when emitting comments.
- */
- function setCommentRange(node, range) {
- getOrCreateEmitNode(node).commentRange = range;
- return node;
- }
- ts.setCommentRange = setCommentRange;
- /**
- * Gets the constant value to emit for an expression.
- */
- function getConstantValue(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.constantValue;
- }
- ts.getConstantValue = getConstantValue;
- /**
- * Sets the constant value to emit for an expression.
- */
- function setConstantValue(node, value) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.constantValue = value;
- return node;
- }
- ts.setConstantValue = setConstantValue;
function getExternalHelpersModuleName(node) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
var emitNode = parseNode && parseNode.emitNode;
@@ -13266,14 +14185,14 @@ var ts;
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = getEmitHelpers(node);
+ var helpers = ts.getEmitHelpers(node);
if (helpers) {
- for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
- var helper = helpers_1[_i];
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
if (!helper.scoped) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
- var emitNode = getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = createUniqueName(ts.externalHelpersModuleNameText));
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
}
}
}
@@ -13281,128 +14200,19 @@ var ts;
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
/**
- * Adds an EmitHelper to a node.
- */
- function addEmitHelper(node, helper) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- return node;
- }
- ts.addEmitHelper = addEmitHelper;
- /**
- * Adds an EmitHelper to a node.
- */
- function addEmitHelpers(node, helpers) {
- if (ts.some(helpers)) {
- var emitNode = getOrCreateEmitNode(node);
- for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
- var helper = helpers_2[_i];
- if (!ts.contains(emitNode.helpers, helper)) {
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- }
- }
- }
- return node;
- }
- ts.addEmitHelpers = addEmitHelpers;
- /**
- * Removes an EmitHelper from a node.
- */
- function removeEmitHelper(node, helper) {
- var emitNode = node.emitNode;
- if (emitNode) {
- var helpers = emitNode.helpers;
- if (helpers) {
- return ts.orderedRemoveItem(helpers, helper);
- }
- }
- return false;
- }
- ts.removeEmitHelper = removeEmitHelper;
- /**
- * Gets the EmitHelpers of a node.
- */
- function getEmitHelpers(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.helpers;
- }
- ts.getEmitHelpers = getEmitHelpers;
- /**
- * Moves matching emit helpers from a source node to a target node.
- */
- function moveEmitHelpers(source, target, predicate) {
- var sourceEmitNode = source.emitNode;
- var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
- if (!ts.some(sourceEmitHelpers))
- return;
- var targetEmitNode = getOrCreateEmitNode(target);
- var helpersRemoved = 0;
- for (var i = 0; i < sourceEmitHelpers.length; i++) {
- var helper = sourceEmitHelpers[i];
- if (predicate(helper)) {
- helpersRemoved++;
- if (!ts.contains(targetEmitNode.helpers, helper)) {
- targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
- }
- }
- else if (helpersRemoved > 0) {
- sourceEmitHelpers[i - helpersRemoved] = helper;
- }
- }
- if (helpersRemoved > 0) {
- sourceEmitHelpers.length -= helpersRemoved;
- }
- }
- ts.moveEmitHelpers = moveEmitHelpers;
- function compareEmitHelpers(x, y) {
- if (x === y)
- return 0 /* EqualTo */;
- if (x.priority === y.priority)
- return 0 /* EqualTo */;
- if (x.priority === undefined)
- return 1 /* GreaterThan */;
- if (y.priority === undefined)
- return -1 /* LessThan */;
- return ts.compareValues(x.priority, y.priority);
- }
- ts.compareEmitHelpers = compareEmitHelpers;
- function setTextRange(node, location) {
- if (location) {
- node.pos = location.pos;
- node.end = location.end;
- }
- return node;
- }
- ts.setTextRange = setTextRange;
- function setNodeFlags(node, flags) {
- node.flags = flags;
- return node;
- }
- ts.setNodeFlags = setNodeFlags;
- function setMultiLine(node, multiLine) {
- node.multiLine = multiLine;
- return node;
- }
- ts.setMultiLine = setMultiLine;
- function setHasTrailingComma(nodes, hasTrailingComma) {
- nodes.hasTrailingComma = hasTrailingComma;
- return nodes;
- }
- ts.setHasTrailingComma = setHasTrailingComma;
- /**
* Get the name of that target module from an import or export declaration
*/
function getLocalNameForExternalImport(node, sourceFile) {
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- var name_9 = namespaceDeclaration.name;
- return ts.isGeneratedIdentifier(name_9) ? name_9 : createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
+ var name = namespaceDeclaration.name;
+ return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
}
- if (node.kind === 235 /* ImportDeclaration */ && node.importClause) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 237 /* ImportDeclaration */ && node.importClause) {
+ return ts.getGeneratedNameForNode(node);
}
- if (node.kind === 241 /* ExportDeclaration */ && node.moduleSpecifier) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 243 /* ExportDeclaration */ && node.moduleSpecifier) {
+ return ts.getGeneratedNameForNode(node);
}
return undefined;
}
@@ -13420,7 +14230,7 @@ var ts;
if (moduleName.kind === 9 /* StringLiteral */) {
return tryGetModuleNameFromDeclaration(importNode, host, resolver, compilerOptions)
|| tryRenameExternalModule(moduleName, sourceFile)
- || getSynthesizedClone(moduleName);
+ || ts.getSynthesizedClone(moduleName);
}
return undefined;
}
@@ -13430,10 +14240,8 @@ var ts;
* Here we check if alternative name was provided for a given moduleName and return it if possible.
*/
function tryRenameExternalModule(moduleName, sourceFile) {
- if (sourceFile.renamedDependencies && ts.hasProperty(sourceFile.renamedDependencies, moduleName.text)) {
- return createLiteral(sourceFile.renamedDependencies[moduleName.text]);
- }
- return undefined;
+ var rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
+ return rename && ts.createLiteral(rename);
}
/**
* Get the name of a module as should be written in the emitted output.
@@ -13447,10 +14255,10 @@ var ts;
return undefined;
}
if (file.moduleName) {
- return createLiteral(file.moduleName);
+ return ts.createLiteral(file.moduleName);
}
if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
- return createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
+ return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
}
@@ -13521,7 +14329,7 @@ var ts;
}
if (ts.isObjectLiteralElementLike(bindingElement)) {
switch (bindingElement.kind) {
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
// `b` in `({ a: b } = ...)`
// `b` in `({ a: b = 1 } = ...)`
// `{b}` in `({ a: {b} } = ...)`
@@ -13533,11 +14341,11 @@ var ts;
// `b[0]` in `({ a: b[0] } = ...)`
// `b[0]` in `({ a: b[0] = 1 } = ...)`
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
// `a` in `({ a } = ...)`
// `a` in `({ a = 1 } = ...)`
return bindingElement.name;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
// `a` in `({ ...a } = ...)`
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -13569,12 +14377,12 @@ var ts;
*/
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 144 /* Parameter */:
- case 174 /* BindingElement */:
+ case 145 /* Parameter */:
+ case 175 /* BindingElement */:
// `...` in `let [...a] = ...`
return bindingElement.dotDotDotToken;
- case 196 /* SpreadElement */:
- case 259 /* SpreadAssignment */:
+ case 197 /* SpreadElement */:
+ case 262 /* SpreadAssignment */:
// `...` in `[...a] = ...`
return bindingElement;
}
@@ -13586,7 +14394,7 @@ var ts;
*/
function getPropertyNameOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
// `a` in `let { a: b } = ...`
// `[a]` in `let { [a]: b } = ...`
// `"a"` in `let { "a": b } = ...`
@@ -13598,7 +14406,7 @@ var ts;
: propertyName;
}
break;
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
// `a` in `({ a: b } = ...)`
// `[a]` in `({ [a]: b } = ...)`
// `"a"` in `({ "a": b } = ...)`
@@ -13610,7 +14418,7 @@ var ts;
: propertyName;
}
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
// `a` in `({ ...a } = ...)`
return bindingElement.name;
}
@@ -13628,13 +14436,13 @@ var ts;
*/
function getElementsOfBindingOrAssignmentPattern(name) {
switch (name.kind) {
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
// `a` in `{a}`
// `a` in `[a]`
return name.elements;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
// `a` in `{a}`
return name.properties;
}
@@ -13644,10 +14452,12 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpread(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpread(element.name), element), element);
}
var expression = convertToAssignmentElementTarget(element.name);
- return element.initializer ? setOriginalNode(createAssignment(expression, element.initializer, element), element) : expression;
+ return element.initializer
+ ? ts.setOriginalNode(ts.setTextRange(ts.createAssignment(expression, element.initializer), element), element)
+ : expression;
}
ts.Debug.assertNode(element, ts.isExpression);
return element;
@@ -13657,14 +14467,14 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpreadAssignment(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpreadAssignment(element.name), element), element);
}
if (element.propertyName) {
var expression = convertToAssignmentElementTarget(element.name);
- return setOriginalNode(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(element.propertyName, element.initializer ? ts.createAssignment(expression, element.initializer) : expression), element), element);
}
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createShorthandPropertyAssignment(element.name, element.initializer, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createShorthandPropertyAssignment(element.name, element.initializer), element), element);
}
ts.Debug.assertNode(element, ts.isObjectLiteralElementLike);
return element;
@@ -13672,18 +14482,18 @@ var ts;
ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement;
function convertToAssignmentPattern(node) {
switch (node.kind) {
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
return convertToArrayAssignmentPattern(node);
- case 172 /* ObjectBindingPattern */:
- case 176 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 177 /* ObjectLiteralExpression */:
return convertToObjectAssignmentPattern(node);
}
}
ts.convertToAssignmentPattern = convertToAssignmentPattern;
function convertToObjectAssignmentPattern(node) {
if (ts.isObjectBindingPattern(node)) {
- return setOriginalNode(createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isObjectLiteralExpression);
return node;
@@ -13691,7 +14501,7 @@ var ts;
ts.convertToObjectAssignmentPattern = convertToObjectAssignmentPattern;
function convertToArrayAssignmentPattern(node) {
if (ts.isArrayBindingPattern(node)) {
- return setOriginalNode(createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isArrayLiteralExpression);
return node;
@@ -13707,37 +14517,37 @@ var ts;
ts.convertToAssignmentElementTarget = convertToAssignmentElementTarget;
function collectExternalModuleInfo(sourceFile, resolver, compilerOptions) {
var externalImports = [];
- var exportSpecifiers = ts.createMap();
- var exportedBindings = ts.createMap();
+ var exportSpecifiers = ts.createMultiMap();
+ var exportedBindings = [];
var uniqueExports = ts.createMap();
var exportedNames;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && createImportDeclaration(
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
/*decorators*/ undefined,
- /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)), createLiteral(ts.externalHelpersModuleNameText));
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
if (externalHelpersImportDeclaration) {
externalImports.push(externalHelpersImportDeclaration);
}
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var node = _a[_i];
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// import "mod"
// import x from "mod"
// import * as x from "mod"
// import { x, y } from "mod"
externalImports.push(node);
break;
- case 234 /* ImportEqualsDeclaration */:
- if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ case 236 /* ImportEqualsDeclaration */:
+ if (node.moduleReference.kind === 247 /* ExternalModuleReference */) {
// import x = require("mod")
externalImports.push(node);
}
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
if (node.moduleSpecifier) {
if (!node.exportClause) {
// export * from "mod"
@@ -13753,27 +14563,27 @@ var ts;
// export { x, y }
for (var _b = 0, _c = node.exportClause.elements; _b < _c.length; _b++) {
var specifier = _c[_b];
- if (!uniqueExports[specifier.name.text]) {
- var name_10 = specifier.propertyName || specifier.name;
- ts.multiMapAdd(exportSpecifiers, name_10.text, specifier);
- var decl = resolver.getReferencedImportDeclaration(name_10)
- || resolver.getReferencedValueDeclaration(name_10);
+ if (!uniqueExports.get(specifier.name.text)) {
+ var name = specifier.propertyName || specifier.name;
+ exportSpecifiers.add(name.text, specifier);
+ var decl = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
if (decl) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
}
- uniqueExports[specifier.name.text] = true;
+ uniqueExports.set(specifier.name.text, true);
exportedNames = ts.append(exportedNames, specifier.name);
}
}
}
break;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
if (node.isExportEquals && !exportEquals) {
// export = x
exportEquals = node;
}
break;
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
if (ts.hasModifier(node, 1 /* Export */)) {
for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) {
var decl = _e[_d];
@@ -13781,42 +14591,42 @@ var ts;
}
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
if (ts.hasModifier(node, 1 /* Export */)) {
if (ts.hasModifier(node, 512 /* Default */)) {
// export default function() { }
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
// export function x() { }
- var name_11 = node.name;
- if (!uniqueExports[name_11.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_11);
- uniqueExports[name_11.text] = true;
- exportedNames = ts.append(exportedNames, name_11);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
break;
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
if (ts.hasModifier(node, 1 /* Export */)) {
if (ts.hasModifier(node, 512 /* Default */)) {
// export default class { }
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
// export class x { }
- var name_12 = node.name;
- if (!uniqueExports[name_12.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_12);
- uniqueExports[name_12.text] = true;
- exportedNames = ts.append(exportedNames, name_12);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
@@ -13836,13 +14646,24 @@ var ts;
}
}
else if (!ts.isGeneratedIdentifier(decl.name)) {
- if (!uniqueExports[decl.name.text]) {
- uniqueExports[decl.name.text] = true;
+ if (!uniqueExports.get(decl.name.text)) {
+ uniqueExports.set(decl.name.text, true);
exportedNames = ts.append(exportedNames, decl.name);
}
}
return exportedNames;
}
+ /** Use a sparse array as a multi-map. */
+ function multiMapSparseArrayAdd(map, key, value) {
+ var values = map[key];
+ if (values) {
+ values.push(value);
+ }
+ else {
+ map[key] = values = [value];
+ }
+ return values;
+ }
})(ts || (ts = {}));
/// <reference path="utilities.ts"/>
/// <reference path="scanner.ts"/>
@@ -13854,13 +14675,13 @@ var ts;
var IdentifierConstructor;
var SourceFileConstructor;
function createNode(kind, pos, end) {
- if (kind === 261 /* SourceFile */) {
+ if (kind === 264 /* SourceFile */) {
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end);
}
else if (kind === 70 /* Identifier */) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 141 /* FirstNode */) {
+ else if (kind < 142 /* FirstNode */) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -13903,28 +14724,29 @@ var ts;
var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
var cbNodes = cbNodeArray || cbNode;
switch (node.kind) {
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.right);
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.constraint) ||
+ visitNode(cbNode, node.default) ||
visitNode(cbNode, node.expression);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.equalsToken) ||
visitNode(cbNode, node.objectAssignmentInitializer);
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
return visitNode(cbNode, node.expression);
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.propertyName) ||
@@ -13933,24 +14755,24 @@ var ts;
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.initializer);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.asteriskToken) ||
@@ -13961,320 +14783,326 @@ var ts;
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.equalsGreaterThanToken) ||
visitNode(cbNode, node.body);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return visitNode(cbNode, node.typeName) ||
visitNodes(cbNodes, node.typeArguments);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return visitNode(cbNode, node.parameterName) ||
visitNode(cbNode, node.type);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return visitNode(cbNode, node.exprName);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return visitNodes(cbNodes, node.members);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return visitNode(cbNode, node.elementType);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return visitNodes(cbNodes, node.elementTypes);
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return visitNodes(cbNodes, node.types);
- case 166 /* ParenthesizedType */:
- case 168 /* TypeOperator */:
+ case 167 /* ParenthesizedType */:
+ case 169 /* TypeOperator */:
return visitNode(cbNode, node.type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return visitNode(cbNode, node.objectType) ||
visitNode(cbNode, node.indexType);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return visitNode(cbNode, node.readonlyToken) ||
visitNode(cbNode, node.typeParameter) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return visitNode(cbNode, node.literal);
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return visitNodes(cbNodes, node.elements);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return visitNodes(cbNodes, node.elements);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitNodes(cbNodes, node.properties);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.name);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.argumentExpression);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments) ||
visitNodes(cbNodes, node.arguments);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return visitNode(cbNode, node.tag) ||
visitNode(cbNode, node.template);
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
return visitNode(cbNode, node.type) ||
visitNode(cbNode, node.expression);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitNode(cbNode, node.expression);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return visitNode(cbNode, node.expression);
- case 187 /* TypeOfExpression */:
+ case 188 /* TypeOfExpression */:
return visitNode(cbNode, node.expression);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return visitNode(cbNode, node.expression);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return visitNode(cbNode, node.operand);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitNode(cbNode, node.asteriskToken) ||
visitNode(cbNode, node.expression);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return visitNode(cbNode, node.expression);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return visitNode(cbNode, node.operand);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.operatorToken) ||
visitNode(cbNode, node.right);
- case 200 /* AsExpression */:
+ case 201 /* AsExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.type);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return visitNode(cbNode, node.expression);
- case 193 /* ConditionalExpression */:
+ case 203 /* MetaProperty */:
+ return visitNode(cbNode, node.name);
+ case 194 /* ConditionalExpression */:
return visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.whenTrue) ||
visitNode(cbNode, node.colonToken) ||
visitNode(cbNode, node.whenFalse);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return visitNode(cbNode, node.expression);
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return visitNodes(cbNodes, node.statements);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return visitNodes(cbNodes, node.statements) ||
visitNode(cbNode, node.endOfFileToken);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.declarationList);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return visitNodes(cbNodes, node.declarations);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return visitNode(cbNode, node.expression);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.thenStatement) ||
visitNode(cbNode, node.elseStatement);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitNode(cbNode, node.statement) ||
visitNode(cbNode, node.expression);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.incrementor) ||
visitNode(cbNode, node.statement);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 213 /* ForOfStatement */:
- return visitNode(cbNode, node.initializer) ||
+ case 215 /* ForOfStatement */:
+ return visitNode(cbNode, node.awaitModifier) ||
+ visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
return visitNode(cbNode, node.label);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitNode(cbNode, node.expression);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.caseBlock);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return visitNodes(cbNodes, node.clauses);
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.statements);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return visitNodes(cbNodes, node.statements);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitNode(cbNode, node.label) ||
visitNode(cbNode, node.statement);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return visitNode(cbNode, node.expression);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return visitNode(cbNode, node.tryBlock) ||
visitNode(cbNode, node.catchClause) ||
visitNode(cbNode, node.finallyBlock);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitNode(cbNode, node.variableDeclaration) ||
visitNode(cbNode, node.block);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return visitNode(cbNode, node.expression);
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNode(cbNode, node.type);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.members);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.body);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.moduleReference);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.importClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.namedBindings);
- case 233 /* NamespaceExportDeclaration */:
+ case 235 /* NamespaceExportDeclaration */:
return visitNode(cbNode, node.name);
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
return visitNode(cbNode, node.name);
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return visitNodes(cbNodes, node.elements);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.exportClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return visitNode(cbNode, node.propertyName) ||
visitNode(cbNode, node.name);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.expression);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return visitNode(cbNode, node.expression);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return visitNodes(cbNodes, node.types);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments);
- case 245 /* ExternalModuleReference */:
+ case 247 /* ExternalModuleReference */:
return visitNode(cbNode, node.expression);
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return visitNodes(cbNodes, node.decorators);
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
visitNode(cbNode, node.closingElement);
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
return visitNode(cbNode, node.tagName) ||
- visitNodes(cbNodes, node.attributes);
- case 250 /* JsxAttribute */:
+ visitNode(cbNode, node.attributes);
+ case 253 /* JsxAttributes */:
+ return visitNodes(cbNodes, node.properties);
+ case 252 /* JsxAttribute */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 251 /* JsxSpreadAttribute */:
- return visitNode(cbNode, node.expression);
- case 252 /* JsxExpression */:
+ case 254 /* JsxSpreadAttribute */:
return visitNode(cbNode, node.expression);
- case 249 /* JsxClosingElement */:
+ case 255 /* JsxExpression */:
+ return visitNode(cbNode, node.dotDotDotToken) ||
+ visitNode(cbNode, node.expression);
+ case 251 /* JsxClosingElement */:
return visitNode(cbNode, node.tagName);
- case 262 /* JSDocTypeExpression */:
+ case 266 /* JSDocTypeExpression */:
return visitNode(cbNode, node.type);
- case 266 /* JSDocUnionType */:
+ case 270 /* JSDocUnionType */:
return visitNodes(cbNodes, node.types);
- case 267 /* JSDocTupleType */:
+ case 271 /* JSDocTupleType */:
return visitNodes(cbNodes, node.types);
- case 265 /* JSDocArrayType */:
+ case 269 /* JSDocArrayType */:
return visitNode(cbNode, node.elementType);
- case 269 /* JSDocNonNullableType */:
+ case 273 /* JSDocNonNullableType */:
return visitNode(cbNode, node.type);
- case 268 /* JSDocNullableType */:
+ case 272 /* JSDocNullableType */:
return visitNode(cbNode, node.type);
- case 270 /* JSDocRecordType */:
+ case 274 /* JSDocRecordType */:
return visitNode(cbNode, node.literal);
- case 272 /* JSDocTypeReference */:
+ case 276 /* JSDocTypeReference */:
return visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeArguments);
- case 273 /* JSDocOptionalType */:
+ case 277 /* JSDocOptionalType */:
return visitNode(cbNode, node.type);
- case 274 /* JSDocFunctionType */:
+ case 278 /* JSDocFunctionType */:
return visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 275 /* JSDocVariadicType */:
+ case 279 /* JSDocVariadicType */:
return visitNode(cbNode, node.type);
- case 276 /* JSDocConstructorType */:
+ case 280 /* JSDocConstructorType */:
return visitNode(cbNode, node.type);
- case 277 /* JSDocThisType */:
+ case 281 /* JSDocThisType */:
return visitNode(cbNode, node.type);
- case 271 /* JSDocRecordMember */:
+ case 275 /* JSDocRecordMember */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.type);
- case 278 /* JSDocComment */:
+ case 282 /* JSDocComment */:
return visitNodes(cbNodes, node.tags);
- case 281 /* JSDocParameterTag */:
+ case 285 /* JSDocParameterTag */:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 282 /* JSDocReturnTag */:
+ case 286 /* JSDocReturnTag */:
return visitNode(cbNode, node.typeExpression);
- case 283 /* JSDocTypeTag */:
+ case 287 /* JSDocTypeTag */:
return visitNode(cbNode, node.typeExpression);
- case 280 /* JSDocAugmentsTag */:
+ case 284 /* JSDocAugmentsTag */:
return visitNode(cbNode, node.typeExpression);
- case 284 /* JSDocTemplateTag */:
+ case 288 /* JSDocTemplateTag */:
return visitNodes(cbNodes, node.typeParameters);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 287 /* JSDocTypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 286 /* JSDocPropertyTag */:
+ case 290 /* JSDocPropertyTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
return visitNode(cbNode, node.expression);
- case 288 /* JSDocLiteralType */:
+ case 292 /* JSDocLiteralType */:
return visitNode(cbNode, node.literal);
}
}
@@ -14292,6 +15120,7 @@ var ts;
return Parser.parseIsolatedEntityName(text, languageVersion);
}
ts.parseIsolatedEntityName = parseIsolatedEntityName;
+ // See also `isExternalOrCommonJsModule` in utilities.ts
function isExternalModule(file) {
return file.externalModuleIndicator !== undefined;
}
@@ -14334,7 +15163,7 @@ var ts;
// Share a single scanner across all calls to parse a source file. This helps speed things
// up by avoiding the cost of creating/compiling scanners over and over again.
var scanner = ts.createScanner(5 /* Latest */, /*skipTrivia*/ true);
- var disallowInAndDecoratorContext = 65536 /* DisallowInContext */ | 262144 /* DecoratorContext */;
+ var disallowInAndDecoratorContext = 2048 /* DisallowInContext */ | 8192 /* DecoratorContext */;
// capture constructors in 'initializeState' to avoid null checks
var NodeConstructor;
var TokenConstructor;
@@ -14458,7 +15287,7 @@ var ts;
identifiers = ts.createMap();
identifierCount = 0;
nodeCount = 0;
- contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 2097152 /* JavaScriptFile */ : 0 /* None */;
+ contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 65536 /* JavaScriptFile */ : 0 /* None */;
parseErrorBeforeNextFinishedNode = false;
// Initialize and prime the scanner before parsing the source elements.
scanner.setText(sourceText);
@@ -14546,7 +15375,7 @@ var ts;
function createSourceFile(fileName, languageVersion, scriptKind) {
// code from createNode is inlined here so createNode won't have to deal with special case of creating source files
// this is quite rare comparing to other nodes and createNode should be as fast as possible
- var sourceFile = new SourceFileConstructor(261 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length);
+ var sourceFile = new SourceFileConstructor(264 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length);
nodeCount++;
sourceFile.text = sourceText;
sourceFile.bindDiagnostics = [];
@@ -14566,16 +15395,16 @@ var ts;
}
}
function setDisallowInContext(val) {
- setContextFlag(val, 65536 /* DisallowInContext */);
+ setContextFlag(val, 2048 /* DisallowInContext */);
}
function setYieldContext(val) {
- setContextFlag(val, 131072 /* YieldContext */);
+ setContextFlag(val, 4096 /* YieldContext */);
}
function setDecoratorContext(val) {
- setContextFlag(val, 262144 /* DecoratorContext */);
+ setContextFlag(val, 8192 /* DecoratorContext */);
}
function setAwaitContext(val) {
- setContextFlag(val, 524288 /* AwaitContext */);
+ setContextFlag(val, 16384 /* AwaitContext */);
}
function doOutsideOfContext(context, func) {
// contextFlagsToClear will contain only the context flags that are
@@ -14616,40 +15445,40 @@ var ts;
return func();
}
function allowInAnd(func) {
- return doOutsideOfContext(65536 /* DisallowInContext */, func);
+ return doOutsideOfContext(2048 /* DisallowInContext */, func);
}
function disallowInAnd(func) {
- return doInsideOfContext(65536 /* DisallowInContext */, func);
+ return doInsideOfContext(2048 /* DisallowInContext */, func);
}
function doInYieldContext(func) {
- return doInsideOfContext(131072 /* YieldContext */, func);
+ return doInsideOfContext(4096 /* YieldContext */, func);
}
function doInDecoratorContext(func) {
- return doInsideOfContext(262144 /* DecoratorContext */, func);
+ return doInsideOfContext(8192 /* DecoratorContext */, func);
}
function doInAwaitContext(func) {
- return doInsideOfContext(524288 /* AwaitContext */, func);
+ return doInsideOfContext(16384 /* AwaitContext */, func);
}
function doOutsideOfAwaitContext(func) {
- return doOutsideOfContext(524288 /* AwaitContext */, func);
+ return doOutsideOfContext(16384 /* AwaitContext */, func);
}
function doInYieldAndAwaitContext(func) {
- return doInsideOfContext(131072 /* YieldContext */ | 524288 /* AwaitContext */, func);
+ return doInsideOfContext(4096 /* YieldContext */ | 16384 /* AwaitContext */, func);
}
function inContext(flags) {
return (contextFlags & flags) !== 0;
}
function inYieldContext() {
- return inContext(131072 /* YieldContext */);
+ return inContext(4096 /* YieldContext */);
}
function inDisallowInContext() {
- return inContext(65536 /* DisallowInContext */);
+ return inContext(2048 /* DisallowInContext */);
}
function inDecoratorContext() {
- return inContext(262144 /* DecoratorContext */);
+ return inContext(8192 /* DecoratorContext */);
}
function inAwaitContext() {
- return inContext(524288 /* AwaitContext */);
+ return inContext(16384 /* AwaitContext */);
}
function parseErrorAtCurrentToken(message, arg0) {
var start = scanner.getTokenPos();
@@ -14830,7 +15659,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 141 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
+ return kind >= 142 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
kind === 70 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -14853,7 +15682,7 @@ var ts;
// flag so that we don't mark any subsequent nodes.
if (parseErrorBeforeNextFinishedNode) {
parseErrorBeforeNextFinishedNode = false;
- node.flags |= 1048576 /* ThisNodeHasError */;
+ node.flags |= 32768 /* ThisNodeHasError */;
}
return node;
}
@@ -14870,7 +15699,11 @@ var ts;
}
function internIdentifier(text) {
text = ts.escapeIdentifier(text);
- return identifiers[text] || (identifiers[text] = text);
+ var identifier = identifiers.get(text);
+ if (identifier === undefined) {
+ identifiers.set(text, identifier = text);
+ }
+ return identifier;
}
// An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues
// with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for
@@ -14922,7 +15755,7 @@ var ts;
// PropertyName [Yield]:
// LiteralPropertyName
// ComputedPropertyName[?Yield]
- var node = createNode(142 /* ComputedPropertyName */);
+ var node = createNode(143 /* ComputedPropertyName */);
parseExpected(20 /* OpenBracketToken */);
// We parse any expression (including a comma expression). But the grammar
// says that only an assignment expression is allowed, so the grammar checker
@@ -14975,6 +15808,7 @@ var ts;
function nextTokenIsClassOrFunctionOrAsync() {
nextToken();
return token() === 74 /* ClassKeyword */ || token() === 88 /* FunctionKeyword */ ||
+ (token() === 116 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 119 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
// True if positioned at the start of a list element
@@ -15015,7 +15849,7 @@ var ts;
case 9 /* ObjectBindingElements */:
return token() === 20 /* OpenBracketToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName();
case 7 /* HeritageClauseElement */:
- // If we see { } then only consume it as an expression if it is followed by , or {
+ // If we see `{ ... }` then only consume it as an expression if it is followed by `,` or `{`
// That way we won't consume the body of a class in its heritage clause.
if (token() === 16 /* OpenBraceToken */) {
return lookAhead(isValidHeritageClauseObjectLiteral);
@@ -15247,7 +16081,7 @@ var ts;
// differently depending on what mode it is in.
//
// This also applies to all our other context flags as well.
- var nodeContextFlags = node.flags & 3080192 /* ContextFlags */;
+ var nodeContextFlags = node.flags & 96256 /* ContextFlags */;
if (nodeContextFlags !== contextFlags) {
return undefined;
}
@@ -15329,14 +16163,14 @@ var ts;
function isReusableClassMember(node) {
if (node) {
switch (node.kind) {
- case 150 /* Constructor */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 147 /* PropertyDeclaration */:
- case 203 /* SemicolonClassElement */:
+ case 151 /* Constructor */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 205 /* SemicolonClassElement */:
return true;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
// Method declarations are not necessarily reusable. An object-literal
// may have a method calls "constructor(...)" and we must reparse that
// into an actual .ConstructorDeclaration.
@@ -15351,8 +16185,8 @@ var ts;
function isReusableSwitchClause(node) {
if (node) {
switch (node.kind) {
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
return true;
}
}
@@ -15361,58 +16195,58 @@ var ts;
function isReusableStatement(node) {
if (node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 205 /* VariableStatement */:
- case 204 /* Block */:
- case 208 /* IfStatement */:
- case 207 /* ExpressionStatement */:
- case 220 /* ThrowStatement */:
- case 216 /* ReturnStatement */:
- case 218 /* SwitchStatement */:
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 211 /* ForStatement */:
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
- case 206 /* EmptyStatement */:
- case 221 /* TryStatement */:
- case 219 /* LabeledStatement */:
- case 209 /* DoStatement */:
- case 222 /* DebuggerStatement */:
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
- case 240 /* ExportAssignment */:
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 207 /* VariableStatement */:
+ case 206 /* Block */:
+ case 210 /* IfStatement */:
+ case 209 /* ExpressionStatement */:
+ case 222 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 220 /* SwitchStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
+ case 208 /* EmptyStatement */:
+ case 223 /* TryStatement */:
+ case 221 /* LabeledStatement */:
+ case 211 /* DoStatement */:
+ case 224 /* DebuggerStatement */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return true;
}
}
return false;
}
function isReusableEnumMember(node) {
- return node.kind === 260 /* EnumMember */;
+ return node.kind === 263 /* EnumMember */;
}
function isReusableTypeMember(node) {
if (node) {
switch (node.kind) {
- case 154 /* ConstructSignature */:
- case 148 /* MethodSignature */:
- case 155 /* IndexSignature */:
- case 146 /* PropertySignature */:
- case 153 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 149 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ case 147 /* PropertySignature */:
+ case 154 /* CallSignature */:
return true;
}
}
return false;
}
function isReusableVariableDeclaration(node) {
- if (node.kind !== 223 /* VariableDeclaration */) {
+ if (node.kind !== 225 /* VariableDeclaration */) {
return false;
}
// Very subtle incremental parsing bug. Consider the following code:
@@ -15433,7 +16267,7 @@ var ts;
return variableDeclarator.initializer === undefined;
}
function isReusableParameter(node) {
- if (node.kind !== 144 /* Parameter */) {
+ if (node.kind !== 145 /* Parameter */) {
return false;
}
// See the comment in isReusableVariableDeclaration for why we do this.
@@ -15480,7 +16314,6 @@ var ts;
case 25 /* JSDocRecordMembers */: return ts.Diagnostics.Property_assignment_expected;
}
}
- ;
// Parses a comma-delimited list of elements
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
var saveParsingContext = parsingContext;
@@ -15546,7 +16379,7 @@ var ts;
function parseEntityName(allowReservedWords, diagnosticMessage) {
var entity = parseIdentifier(diagnosticMessage);
while (parseOptional(22 /* DotToken */)) {
- var node = createNode(141 /* QualifiedName */, entity.pos); // !!!
+ var node = createNode(142 /* QualifiedName */, entity.pos); // !!!
node.left = entity;
node.right = parseRightSideOfDot(allowReservedWords);
entity = finishNode(node);
@@ -15585,7 +16418,7 @@ var ts;
return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
}
function parseTemplateExpression() {
- var template = createNode(194 /* TemplateExpression */);
+ var template = createNode(195 /* TemplateExpression */);
template.head = parseTemplateHead();
ts.Debug.assert(template.head.kind === 13 /* TemplateHead */, "Template head has wrong token kind");
var templateSpans = createNodeArray();
@@ -15597,7 +16430,7 @@ var ts;
return finishNode(template);
}
function parseTemplateSpan() {
- var span = createNode(202 /* TemplateSpan */);
+ var span = createNode(204 /* TemplateSpan */);
span.expression = allowInAnd(parseExpression);
var literal;
if (token() === 17 /* CloseBraceToken */) {
@@ -15633,27 +16466,23 @@ var ts;
if (scanner.isUnterminated()) {
node.isUnterminated = true;
}
- var tokenPos = scanner.getTokenPos();
- nextToken();
- finishNode(node);
// Octal literals are not allowed in strict mode or ES5
// Note that theoretically the following condition would hold true literals like 009,
// which is not octal.But because of how the scanner separates the tokens, we would
// never get a token like this. Instead, we would get 00 and 9 as two separate tokens.
// We also do not need to check for negatives because any prefix operator would be part of a
// parent unary expression.
- if (node.kind === 8 /* NumericLiteral */
- && sourceText.charCodeAt(tokenPos) === 48 /* _0 */
- && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
- node.isOctalLiteral = true;
+ if (node.kind === 8 /* NumericLiteral */) {
+ node.numericLiteralFlags = scanner.getNumericLiteralFlags();
}
+ nextToken();
+ finishNode(node);
return node;
}
// TYPES
function parseTypeReference() {
- var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
- var node = createNode(157 /* TypeReference */, typeName.pos);
- node.typeName = typeName;
+ var node = createNode(158 /* TypeReference */);
+ node.typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
if (!scanner.hasPrecedingLineBreak() && token() === 26 /* LessThanToken */) {
node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */);
}
@@ -15661,24 +16490,24 @@ var ts;
}
function parseThisTypePredicate(lhs) {
nextToken();
- var node = createNode(156 /* TypePredicate */, lhs.pos);
+ var node = createNode(157 /* TypePredicate */, lhs.pos);
node.parameterName = lhs;
node.type = parseType();
return finishNode(node);
}
function parseThisTypeNode() {
- var node = createNode(167 /* ThisType */);
+ var node = createNode(168 /* ThisType */);
nextToken();
return finishNode(node);
}
function parseTypeQuery() {
- var node = createNode(160 /* TypeQuery */);
+ var node = createNode(161 /* TypeQuery */);
parseExpected(102 /* TypeOfKeyword */);
node.exprName = parseEntityName(/*allowReservedWords*/ true);
return finishNode(node);
}
function parseTypeParameter() {
- var node = createNode(143 /* TypeParameter */);
+ var node = createNode(144 /* TypeParameter */);
node.name = parseIdentifier();
if (parseOptional(84 /* ExtendsKeyword */)) {
// It's not uncommon for people to write improper constraints to a generic. If the
@@ -15699,6 +16528,9 @@ var ts;
node.expression = parseUnaryExpressionOrHigher();
}
}
+ if (parseOptional(57 /* EqualsToken */)) {
+ node.default = parseType();
+ }
return finishNode(node);
}
function parseTypeParameters() {
@@ -15716,9 +16548,9 @@ var ts;
return token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 /* AtToken */ || token() === 98 /* ThisKeyword */;
}
function parseParameter() {
- var node = createNode(144 /* Parameter */);
+ var node = createNode(145 /* Parameter */);
if (token() === 98 /* ThisKeyword */) {
- node.name = createIdentifier(/*isIdentifier*/ true, undefined);
+ node.name = createIdentifier(/*isIdentifier*/ true);
node.type = parseParameterType();
return finishNode(node);
}
@@ -15815,7 +16647,7 @@ var ts;
}
function parseSignatureMember(kind) {
var node = createNode(kind);
- if (kind === 154 /* ConstructSignature */) {
+ if (kind === 155 /* ConstructSignature */) {
parseExpected(93 /* NewKeyword */);
}
fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node);
@@ -15879,7 +16711,7 @@ var ts;
return token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || token() === 21 /* CloseBracketToken */;
}
function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(155 /* IndexSignature */, fullStart);
+ var node = createNode(156 /* IndexSignature */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */);
@@ -15891,7 +16723,7 @@ var ts;
var name = parsePropertyName();
var questionToken = parseOptionalToken(54 /* QuestionToken */);
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
- var method = createNode(148 /* MethodSignature */, fullStart);
+ var method = createNode(149 /* MethodSignature */, fullStart);
method.modifiers = modifiers;
method.name = name;
method.questionToken = questionToken;
@@ -15902,7 +16734,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
else {
- var property = createNode(146 /* PropertySignature */, fullStart);
+ var property = createNode(147 /* PropertySignature */, fullStart);
property.modifiers = modifiers;
property.name = name;
property.questionToken = questionToken;
@@ -15918,14 +16750,14 @@ var ts;
}
}
function isTypeMemberStart() {
- var idToken;
// Return true if we have the start of a signature member
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
return true;
}
+ var idToken;
// Eat up all modifiers, but hold on to the last one in case it is actually an identifier
while (ts.isModifierKind(token())) {
- idToken = token();
+ idToken = true;
nextToken();
}
// Index signatures and computed property names are type members
@@ -15934,7 +16766,7 @@ var ts;
}
// Try to get the first property-like token following all modifiers
if (isLiteralPropertyName()) {
- idToken = token();
+ idToken = true;
nextToken();
}
// If we were able to get any potential identifier, check that it is
@@ -15951,10 +16783,10 @@ var ts;
}
function parseTypeMember() {
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
- return parseSignatureMember(153 /* CallSignature */);
+ return parseSignatureMember(154 /* CallSignature */);
}
if (token() === 93 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) {
- return parseSignatureMember(154 /* ConstructSignature */);
+ return parseSignatureMember(155 /* ConstructSignature */);
}
var fullStart = getNodePos();
var modifiers = parseModifiers();
@@ -15968,7 +16800,7 @@ var ts;
return token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */;
}
function parseTypeLiteral() {
- var node = createNode(161 /* TypeLiteral */);
+ var node = createNode(162 /* TypeLiteral */);
node.members = parseObjectTypeMembers();
return finishNode(node);
}
@@ -15991,14 +16823,14 @@ var ts;
return token() === 20 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 91 /* InKeyword */;
}
function parseMappedTypeParameter() {
- var node = createNode(143 /* TypeParameter */);
+ var node = createNode(144 /* TypeParameter */);
node.name = parseIdentifier();
parseExpected(91 /* InKeyword */);
node.constraint = parseType();
return finishNode(node);
}
function parseMappedType() {
- var node = createNode(170 /* MappedType */);
+ var node = createNode(171 /* MappedType */);
parseExpected(16 /* OpenBraceToken */);
node.readonlyToken = parseOptionalToken(130 /* ReadonlyKeyword */);
parseExpected(20 /* OpenBracketToken */);
@@ -16011,12 +16843,12 @@ var ts;
return finishNode(node);
}
function parseTupleType() {
- var node = createNode(163 /* TupleType */);
+ var node = createNode(164 /* TupleType */);
node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */);
return finishNode(node);
}
function parseParenthesizedType() {
- var node = createNode(166 /* ParenthesizedType */);
+ var node = createNode(167 /* ParenthesizedType */);
parseExpected(18 /* OpenParenToken */);
node.type = parseType();
parseExpected(19 /* CloseParenToken */);
@@ -16024,7 +16856,7 @@ var ts;
}
function parseFunctionOrConstructorType(kind) {
var node = createNode(kind);
- if (kind === 159 /* ConstructorType */) {
+ if (kind === 160 /* ConstructorType */) {
parseExpected(93 /* NewKeyword */);
}
fillSignature(35 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node);
@@ -16035,7 +16867,7 @@ var ts;
return token() === 22 /* DotToken */ ? undefined : node;
}
function parseLiteralTypeNode() {
- var node = createNode(171 /* LiteralType */);
+ var node = createNode(172 /* LiteralType */);
node.literal = parseSimpleUnaryExpression();
finishNode(node);
return node;
@@ -16046,12 +16878,13 @@ var ts;
function parseNonArrayType() {
switch (token()) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
+ case 133 /* ObjectKeyword */:
// If these are followed by a dot, then parse these out as a dotted type reference instead.
var node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
@@ -16089,12 +16922,12 @@ var ts;
function isStartOfType() {
switch (token()) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 98 /* ThisKeyword */:
case 102 /* TypeOfKeyword */:
@@ -16102,11 +16935,14 @@ var ts;
case 16 /* OpenBraceToken */:
case 20 /* OpenBracketToken */:
case 26 /* LessThanToken */:
+ case 48 /* BarToken */:
+ case 47 /* AmpersandToken */:
case 93 /* NewKeyword */:
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
+ case 133 /* ObjectKeyword */:
return true;
case 37 /* MinusToken */:
return lookAhead(nextTokenIsNumericLiteral);
@@ -16126,14 +16962,14 @@ var ts;
var type = parseNonArrayType();
while (!scanner.hasPrecedingLineBreak() && parseOptional(20 /* OpenBracketToken */)) {
if (isStartOfType()) {
- var node = createNode(169 /* IndexedAccessType */, type.pos);
+ var node = createNode(170 /* IndexedAccessType */, type.pos);
node.objectType = type;
node.indexType = parseType();
parseExpected(21 /* CloseBracketToken */);
type = finishNode(node);
}
else {
- var node = createNode(162 /* ArrayType */, type.pos);
+ var node = createNode(163 /* ArrayType */, type.pos);
node.elementType = type;
parseExpected(21 /* CloseBracketToken */);
type = finishNode(node);
@@ -16142,7 +16978,7 @@ var ts;
return type;
}
function parseTypeOperator(operator) {
- var node = createNode(168 /* TypeOperator */);
+ var node = createNode(169 /* TypeOperator */);
parseExpected(operator);
node.operator = operator;
node.type = parseTypeOperatorOrHigher();
@@ -16156,6 +16992,7 @@ var ts;
return parseArrayTypeOrHigher();
}
function parseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ parseOptional(operator);
var type = parseConstituentType();
if (token() === operator) {
var types = createNodeArray([type], type.pos);
@@ -16170,10 +17007,10 @@ var ts;
return type;
}
function parseIntersectionTypeOrHigher() {
- return parseUnionOrIntersectionType(165 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */);
+ return parseUnionOrIntersectionType(166 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */);
}
function parseUnionTypeOrHigher() {
- return parseUnionOrIntersectionType(164 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */);
+ return parseUnionOrIntersectionType(165 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */);
}
function isStartOfFunctionType() {
if (token() === 26 /* LessThanToken */) {
@@ -16230,7 +17067,7 @@ var ts;
var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
var type = parseType();
if (typePredicateVariable) {
- var node = createNode(156 /* TypePredicate */, typePredicateVariable.pos);
+ var node = createNode(157 /* TypePredicate */, typePredicateVariable.pos);
node.parameterName = typePredicateVariable;
node.type = type;
return finishNode(node);
@@ -16249,14 +17086,14 @@ var ts;
function parseType() {
// The rules about 'yield' only apply to actual code/expression contexts. They don't
// apply to 'type' contexts. So we disable these parameters here before moving on.
- return doOutsideOfContext(655360 /* TypeExcludesFlags */, parseTypeWorker);
+ return doOutsideOfContext(20480 /* TypeExcludesFlags */, parseTypeWorker);
}
function parseTypeWorker() {
if (isStartOfFunctionType()) {
- return parseFunctionOrConstructorType(158 /* FunctionType */);
+ return parseFunctionOrConstructorType(159 /* FunctionType */);
}
if (token() === 93 /* NewKeyword */) {
- return parseFunctionOrConstructorType(159 /* ConstructorType */);
+ return parseFunctionOrConstructorType(160 /* ConstructorType */);
}
return parseUnionTypeOrHigher();
}
@@ -16457,7 +17294,7 @@ var ts;
return !scanner.hasPrecedingLineBreak() && isIdentifier();
}
function parseYieldExpression() {
- var node = createNode(195 /* YieldExpression */);
+ var node = createNode(196 /* YieldExpression */);
// YieldExpression[In] :
// yield
// yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield]
@@ -16479,13 +17316,13 @@ var ts;
ts.Debug.assert(token() === 35 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
var node;
if (asyncModifier) {
- node = createNode(185 /* ArrowFunction */, asyncModifier.pos);
+ node = createNode(186 /* ArrowFunction */, asyncModifier.pos);
node.modifiers = asyncModifier;
}
else {
- node = createNode(185 /* ArrowFunction */, identifier.pos);
+ node = createNode(186 /* ArrowFunction */, identifier.pos);
}
- var parameter = createNode(144 /* Parameter */, identifier.pos);
+ var parameter = createNode(145 /* Parameter */, identifier.pos);
parameter.name = identifier;
finishNode(parameter);
node.parameters = createNodeArray([parameter], parameter.pos);
@@ -16667,7 +17504,7 @@ var ts;
return 0 /* False */;
}
function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
- var node = createNode(185 /* ArrowFunction */);
+ var node = createNode(186 /* ArrowFunction */);
node.modifiers = parseModifiersForArrowFunction();
var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */);
// Arrow functions are never generators.
@@ -16733,7 +17570,7 @@ var ts;
}
// Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and
// we do not that for the 'whenFalse' part.
- var node = createNode(193 /* ConditionalExpression */, leftOperand.pos);
+ var node = createNode(194 /* ConditionalExpression */, leftOperand.pos);
node.condition = leftOperand;
node.questionToken = questionToken;
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
@@ -16746,7 +17583,7 @@ var ts;
return parseBinaryExpressionRest(precedence, leftOperand);
}
function isInOrOfKeyword(t) {
- return t === 91 /* InKeyword */ || t === 140 /* OfKeyword */;
+ return t === 91 /* InKeyword */ || t === 141 /* OfKeyword */;
}
function parseBinaryExpressionRest(precedence, leftOperand) {
while (true) {
@@ -16854,39 +17691,39 @@ var ts;
return -1;
}
function makeBinaryExpression(left, operatorToken, right) {
- var node = createNode(192 /* BinaryExpression */, left.pos);
+ var node = createNode(193 /* BinaryExpression */, left.pos);
node.left = left;
node.operatorToken = operatorToken;
node.right = right;
return finishNode(node);
}
function makeAsExpression(left, right) {
- var node = createNode(200 /* AsExpression */, left.pos);
+ var node = createNode(201 /* AsExpression */, left.pos);
node.expression = left;
node.type = right;
return finishNode(node);
}
function parsePrefixUnaryExpression() {
- var node = createNode(190 /* PrefixUnaryExpression */);
+ var node = createNode(191 /* PrefixUnaryExpression */);
node.operator = token();
nextToken();
node.operand = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseDeleteExpression() {
- var node = createNode(186 /* DeleteExpression */);
+ var node = createNode(187 /* DeleteExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseTypeOfExpression() {
- var node = createNode(187 /* TypeOfExpression */);
+ var node = createNode(188 /* TypeOfExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseVoidExpression() {
- var node = createNode(188 /* VoidExpression */);
+ var node = createNode(189 /* VoidExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -16902,7 +17739,7 @@ var ts;
return false;
}
function parseAwaitExpression() {
- var node = createNode(189 /* AwaitExpression */);
+ var node = createNode(190 /* AwaitExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -16945,7 +17782,7 @@ var ts;
var simpleUnaryExpression = parseSimpleUnaryExpression();
if (token() === 39 /* AsteriskAsteriskToken */) {
var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
- if (simpleUnaryExpression.kind === 182 /* TypeAssertionExpression */) {
+ if (simpleUnaryExpression.kind === 183 /* TypeAssertionExpression */) {
parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
}
else {
@@ -16990,6 +17827,7 @@ var ts;
if (isAwaitExpression()) {
return parseAwaitExpression();
}
+ // falls through
default:
return parseIncrementExpression();
}
@@ -17023,7 +17861,7 @@ var ts;
return false;
}
// We are in JSX context and the token is part of JSXElement.
- // Fall through
+ // falls through
default:
return true;
}
@@ -17041,7 +17879,7 @@ var ts;
*/
function parseIncrementExpression() {
if (token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) {
- var node = createNode(190 /* PrefixUnaryExpression */);
+ var node = createNode(191 /* PrefixUnaryExpression */);
node.operator = token();
nextToken();
node.operand = parseLeftHandSideExpressionOrHigher();
@@ -17054,7 +17892,7 @@ var ts;
var expression = parseLeftHandSideExpressionOrHigher();
ts.Debug.assert(ts.isLeftHandSideExpression(expression));
if ((token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) {
- var node = createNode(191 /* PostfixUnaryExpression */, expression.pos);
+ var node = createNode(192 /* PostfixUnaryExpression */, expression.pos);
node.operand = expression;
node.operator = token();
nextToken();
@@ -17158,7 +17996,7 @@ var ts;
}
// If we have seen "super" it must be followed by '(' or '.'.
// If it wasn't then just try to parse out a '.' and report an error.
- var node = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var node = createNode(178 /* PropertyAccessExpression */, expression.pos);
node.expression = expression;
parseExpectedToken(22 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
@@ -17183,8 +18021,8 @@ var ts;
function parseJsxElementOrSelfClosingElement(inExpressionContext) {
var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
var result;
- if (opening.kind === 248 /* JsxOpeningElement */) {
- var node = createNode(246 /* JsxElement */, opening.pos);
+ if (opening.kind === 250 /* JsxOpeningElement */) {
+ var node = createNode(248 /* JsxElement */, opening.pos);
node.openingElement = opening;
node.children = parseJsxChildren(node.openingElement.tagName);
node.closingElement = parseJsxClosingElement(inExpressionContext);
@@ -17194,7 +18032,7 @@ var ts;
result = finishNode(node);
}
else {
- ts.Debug.assert(opening.kind === 247 /* JsxSelfClosingElement */);
+ ts.Debug.assert(opening.kind === 249 /* JsxSelfClosingElement */);
// Nothing else to do for self-closing elements
result = opening;
}
@@ -17209,7 +18047,7 @@ var ts;
var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); });
if (invalidElement) {
parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element);
- var badNode = createNode(192 /* BinaryExpression */, result.pos);
+ var badNode = createNode(193 /* BinaryExpression */, result.pos);
badNode.end = invalidElement.end;
badNode.left = result;
badNode.right = invalidElement;
@@ -17252,23 +18090,31 @@ var ts;
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName));
break;
}
+ else if (token() === 7 /* ConflictMarkerTrivia */) {
+ break;
+ }
result.push(parseJsxChild());
}
result.end = scanner.getTokenPos();
parsingContext = saveParsingContext;
return result;
}
+ function parseJsxAttributes() {
+ var jsxAttributes = createNode(253 /* JsxAttributes */);
+ jsxAttributes.properties = parseList(13 /* JsxAttributes */, parseJsxAttribute);
+ return finishNode(jsxAttributes);
+ }
function parseJsxOpeningOrSelfClosingElement(inExpressionContext) {
var fullStart = scanner.getStartPos();
parseExpected(26 /* LessThanToken */);
var tagName = parseJsxElementName();
- var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute);
+ var attributes = parseJsxAttributes();
var node;
if (token() === 28 /* GreaterThanToken */) {
// Closing tag, so scan the immediately-following text with the JSX scanning instead
// of regular scanning to avoid treating illegal characters (e.g. '#') as immediate
// scanning errors
- node = createNode(248 /* JsxOpeningElement */, fullStart);
+ node = createNode(250 /* JsxOpeningElement */, fullStart);
scanJsxText();
}
else {
@@ -17280,7 +18126,7 @@ var ts;
parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false);
scanJsxText();
}
- node = createNode(247 /* JsxSelfClosingElement */, fullStart);
+ node = createNode(249 /* JsxSelfClosingElement */, fullStart);
}
node.tagName = tagName;
node.attributes = attributes;
@@ -17296,7 +18142,7 @@ var ts;
var expression = token() === 98 /* ThisKeyword */ ?
parseTokenNode() : parseIdentifierName();
while (parseOptional(22 /* DotToken */)) {
- var propertyAccess = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
expression = finishNode(propertyAccess);
@@ -17304,9 +18150,10 @@ var ts;
return expression;
}
function parseJsxExpression(inExpressionContext) {
- var node = createNode(252 /* JsxExpression */);
+ var node = createNode(255 /* JsxExpression */);
parseExpected(16 /* OpenBraceToken */);
if (token() !== 17 /* CloseBraceToken */) {
+ node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
@@ -17323,7 +18170,7 @@ var ts;
return parseJsxSpreadAttribute();
}
scanJsxIdentifier();
- var node = createNode(250 /* JsxAttribute */);
+ var node = createNode(252 /* JsxAttribute */);
node.name = parseIdentifierName();
if (token() === 57 /* EqualsToken */) {
switch (scanJsxAttributeValue()) {
@@ -17338,7 +18185,7 @@ var ts;
return finishNode(node);
}
function parseJsxSpreadAttribute() {
- var node = createNode(251 /* JsxSpreadAttribute */);
+ var node = createNode(254 /* JsxSpreadAttribute */);
parseExpected(16 /* OpenBraceToken */);
parseExpected(23 /* DotDotDotToken */);
node.expression = parseExpression();
@@ -17346,7 +18193,7 @@ var ts;
return finishNode(node);
}
function parseJsxClosingElement(inExpressionContext) {
- var node = createNode(249 /* JsxClosingElement */);
+ var node = createNode(251 /* JsxClosingElement */);
parseExpected(27 /* LessThanSlashToken */);
node.tagName = parseJsxElementName();
if (inExpressionContext) {
@@ -17359,7 +18206,7 @@ var ts;
return finishNode(node);
}
function parseTypeAssertion() {
- var node = createNode(182 /* TypeAssertionExpression */);
+ var node = createNode(183 /* TypeAssertionExpression */);
parseExpected(26 /* LessThanToken */);
node.type = parseType();
parseExpected(28 /* GreaterThanToken */);
@@ -17370,7 +18217,7 @@ var ts;
while (true) {
var dotToken = parseOptionalToken(22 /* DotToken */);
if (dotToken) {
- var propertyAccess = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
expression = finishNode(propertyAccess);
@@ -17378,14 +18225,14 @@ var ts;
}
if (token() === 50 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) {
nextToken();
- var nonNullExpression = createNode(201 /* NonNullExpression */, expression.pos);
+ var nonNullExpression = createNode(202 /* NonNullExpression */, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
// when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName
if (!inDecoratorContext() && parseOptional(20 /* OpenBracketToken */)) {
- var indexedAccess = createNode(178 /* ElementAccessExpression */, expression.pos);
+ var indexedAccess = createNode(179 /* ElementAccessExpression */, expression.pos);
indexedAccess.expression = expression;
// It's not uncommon for a user to write: "new Type[]".
// Check for that common pattern and report a better error message.
@@ -17401,7 +18248,7 @@ var ts;
continue;
}
if (token() === 12 /* NoSubstitutionTemplateLiteral */ || token() === 13 /* TemplateHead */) {
- var tagExpression = createNode(181 /* TaggedTemplateExpression */, expression.pos);
+ var tagExpression = createNode(182 /* TaggedTemplateExpression */, expression.pos);
tagExpression.tag = expression;
tagExpression.template = token() === 12 /* NoSubstitutionTemplateLiteral */
? parseLiteralNode()
@@ -17424,7 +18271,7 @@ var ts;
if (!typeArguments) {
return expression;
}
- var callExpr = createNode(179 /* CallExpression */, expression.pos);
+ var callExpr = createNode(180 /* CallExpression */, expression.pos);
callExpr.expression = expression;
callExpr.typeArguments = typeArguments;
callExpr.arguments = parseArgumentList();
@@ -17432,7 +18279,7 @@ var ts;
continue;
}
else if (token() === 18 /* OpenParenToken */) {
- var callExpr = createNode(179 /* CallExpression */, expression.pos);
+ var callExpr = createNode(180 /* CallExpression */, expression.pos);
callExpr.expression = expression;
callExpr.arguments = parseArgumentList();
expression = finishNode(callExpr);
@@ -17542,28 +18389,28 @@ var ts;
return parseIdentifier(ts.Diagnostics.Expression_expected);
}
function parseParenthesizedExpression() {
- var node = createNode(183 /* ParenthesizedExpression */);
+ var node = createNode(184 /* ParenthesizedExpression */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
parseExpected(19 /* CloseParenToken */);
return finishNode(node);
}
function parseSpreadElement() {
- var node = createNode(196 /* SpreadElement */);
+ var node = createNode(197 /* SpreadElement */);
parseExpected(23 /* DotDotDotToken */);
node.expression = parseAssignmentExpressionOrHigher();
return finishNode(node);
}
function parseArgumentOrArrayLiteralElement() {
return token() === 23 /* DotDotDotToken */ ? parseSpreadElement() :
- token() === 25 /* CommaToken */ ? createNode(198 /* OmittedExpression */) :
+ token() === 25 /* CommaToken */ ? createNode(199 /* OmittedExpression */) :
parseAssignmentExpressionOrHigher();
}
function parseArgumentExpression() {
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
}
function parseArrayLiteralExpression() {
- var node = createNode(175 /* ArrayLiteralExpression */);
+ var node = createNode(176 /* ArrayLiteralExpression */);
parseExpected(20 /* OpenBracketToken */);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17574,10 +18421,10 @@ var ts;
}
function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
if (parseContextualModifier(124 /* GetKeyword */)) {
- return parseAccessorDeclaration(151 /* GetAccessor */, fullStart, decorators, modifiers);
+ return parseAccessorDeclaration(152 /* GetAccessor */, fullStart, decorators, modifiers);
}
- else if (parseContextualModifier(133 /* SetKeyword */)) {
- return parseAccessorDeclaration(152 /* SetAccessor */, fullStart, decorators, modifiers);
+ else if (parseContextualModifier(134 /* SetKeyword */)) {
+ return parseAccessorDeclaration(153 /* SetAccessor */, fullStart, decorators, modifiers);
}
return undefined;
}
@@ -17585,7 +18432,7 @@ var ts;
var fullStart = scanner.getStartPos();
var dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
if (dotDotDotToken) {
- var spreadElement = createNode(259 /* SpreadAssignment */, fullStart);
+ var spreadElement = createNode(262 /* SpreadAssignment */, fullStart);
spreadElement.expression = parseAssignmentExpressionOrHigher();
return addJSDocComment(finishNode(spreadElement));
}
@@ -17610,7 +18457,7 @@ var ts;
// this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 /* CommaToken */ || token() === 17 /* CloseBraceToken */ || token() === 57 /* EqualsToken */);
if (isShorthandPropertyAssignment) {
- var shorthandDeclaration = createNode(258 /* ShorthandPropertyAssignment */, fullStart);
+ var shorthandDeclaration = createNode(261 /* ShorthandPropertyAssignment */, fullStart);
shorthandDeclaration.name = propertyName;
shorthandDeclaration.questionToken = questionToken;
var equalsToken = parseOptionalToken(57 /* EqualsToken */);
@@ -17621,7 +18468,7 @@ var ts;
return addJSDocComment(finishNode(shorthandDeclaration));
}
else {
- var propertyAssignment = createNode(257 /* PropertyAssignment */, fullStart);
+ var propertyAssignment = createNode(260 /* PropertyAssignment */, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
@@ -17631,7 +18478,7 @@ var ts;
}
}
function parseObjectLiteralExpression() {
- var node = createNode(176 /* ObjectLiteralExpression */);
+ var node = createNode(177 /* ObjectLiteralExpression */);
parseExpected(16 /* OpenBraceToken */);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17650,7 +18497,7 @@ var ts;
if (saveDecoratorContext) {
setDecoratorContext(/*val*/ false);
}
- var node = createNode(184 /* FunctionExpression */);
+ var node = createNode(185 /* FunctionExpression */);
node.modifiers = parseModifiers();
parseExpected(88 /* FunctionKeyword */);
node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */);
@@ -17672,8 +18519,15 @@ var ts;
return isIdentifier() ? parseIdentifier() : undefined;
}
function parseNewExpression() {
- var node = createNode(180 /* NewExpression */);
+ var fullStart = scanner.getStartPos();
parseExpected(93 /* NewKeyword */);
+ if (parseOptional(22 /* DotToken */)) {
+ var node_1 = createNode(203 /* MetaProperty */, fullStart);
+ node_1.keywordToken = 93 /* NewKeyword */;
+ node_1.name = parseIdentifierName();
+ return finishNode(node_1);
+ }
+ var node = createNode(181 /* NewExpression */, fullStart);
node.expression = parseMemberExpressionOrHigher();
node.typeArguments = tryParse(parseTypeArgumentsInExpression);
if (node.typeArguments || token() === 18 /* OpenParenToken */) {
@@ -17683,7 +18537,7 @@ var ts;
}
// STATEMENTS
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
- var node = createNode(204 /* Block */);
+ var node = createNode(206 /* Block */);
if (parseExpected(16 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) {
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17716,12 +18570,12 @@ var ts;
return block;
}
function parseEmptyStatement() {
- var node = createNode(206 /* EmptyStatement */);
+ var node = createNode(208 /* EmptyStatement */);
parseExpected(24 /* SemicolonToken */);
return finishNode(node);
}
function parseIfStatement() {
- var node = createNode(208 /* IfStatement */);
+ var node = createNode(210 /* IfStatement */);
parseExpected(89 /* IfKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17731,7 +18585,7 @@ var ts;
return finishNode(node);
}
function parseDoStatement() {
- var node = createNode(209 /* DoStatement */);
+ var node = createNode(211 /* DoStatement */);
parseExpected(80 /* DoKeyword */);
node.statement = parseStatement();
parseExpected(105 /* WhileKeyword */);
@@ -17746,7 +18600,7 @@ var ts;
return finishNode(node);
}
function parseWhileStatement() {
- var node = createNode(210 /* WhileStatement */);
+ var node = createNode(212 /* WhileStatement */);
parseExpected(105 /* WhileKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17757,6 +18611,7 @@ var ts;
function parseForOrForInOrForOfStatement() {
var pos = getNodePos();
parseExpected(87 /* ForKeyword */);
+ var awaitToken = parseOptionalToken(120 /* AwaitKeyword */);
parseExpected(18 /* OpenParenToken */);
var initializer = undefined;
if (token() !== 24 /* SemicolonToken */) {
@@ -17768,22 +18623,23 @@ var ts;
}
}
var forOrForInOrForOfStatement;
- if (parseOptional(91 /* InKeyword */)) {
- var forInStatement = createNode(212 /* ForInStatement */, pos);
- forInStatement.initializer = initializer;
- forInStatement.expression = allowInAnd(parseExpression);
- parseExpected(19 /* CloseParenToken */);
- forOrForInOrForOfStatement = forInStatement;
- }
- else if (parseOptional(140 /* OfKeyword */)) {
- var forOfStatement = createNode(213 /* ForOfStatement */, pos);
+ if (awaitToken ? parseExpected(141 /* OfKeyword */) : parseOptional(141 /* OfKeyword */)) {
+ var forOfStatement = createNode(215 /* ForOfStatement */, pos);
+ forOfStatement.awaitModifier = awaitToken;
forOfStatement.initializer = initializer;
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
parseExpected(19 /* CloseParenToken */);
forOrForInOrForOfStatement = forOfStatement;
}
+ else if (parseOptional(91 /* InKeyword */)) {
+ var forInStatement = createNode(214 /* ForInStatement */, pos);
+ forInStatement.initializer = initializer;
+ forInStatement.expression = allowInAnd(parseExpression);
+ parseExpected(19 /* CloseParenToken */);
+ forOrForInOrForOfStatement = forInStatement;
+ }
else {
- var forStatement = createNode(211 /* ForStatement */, pos);
+ var forStatement = createNode(213 /* ForStatement */, pos);
forStatement.initializer = initializer;
parseExpected(24 /* SemicolonToken */);
if (token() !== 24 /* SemicolonToken */ && token() !== 19 /* CloseParenToken */) {
@@ -17801,7 +18657,7 @@ var ts;
}
function parseBreakOrContinueStatement(kind) {
var node = createNode(kind);
- parseExpected(kind === 215 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */);
+ parseExpected(kind === 217 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */);
if (!canParseSemicolon()) {
node.label = parseIdentifier();
}
@@ -17809,7 +18665,7 @@ var ts;
return finishNode(node);
}
function parseReturnStatement() {
- var node = createNode(216 /* ReturnStatement */);
+ var node = createNode(218 /* ReturnStatement */);
parseExpected(95 /* ReturnKeyword */);
if (!canParseSemicolon()) {
node.expression = allowInAnd(parseExpression);
@@ -17818,7 +18674,7 @@ var ts;
return finishNode(node);
}
function parseWithStatement() {
- var node = createNode(217 /* WithStatement */);
+ var node = createNode(219 /* WithStatement */);
parseExpected(106 /* WithKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17827,7 +18683,7 @@ var ts;
return finishNode(node);
}
function parseCaseClause() {
- var node = createNode(253 /* CaseClause */);
+ var node = createNode(256 /* CaseClause */);
parseExpected(72 /* CaseKeyword */);
node.expression = allowInAnd(parseExpression);
parseExpected(55 /* ColonToken */);
@@ -17835,7 +18691,7 @@ var ts;
return finishNode(node);
}
function parseDefaultClause() {
- var node = createNode(254 /* DefaultClause */);
+ var node = createNode(257 /* DefaultClause */);
parseExpected(78 /* DefaultKeyword */);
parseExpected(55 /* ColonToken */);
node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement);
@@ -17845,12 +18701,12 @@ var ts;
return token() === 72 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause();
}
function parseSwitchStatement() {
- var node = createNode(218 /* SwitchStatement */);
+ var node = createNode(220 /* SwitchStatement */);
parseExpected(97 /* SwitchKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
parseExpected(19 /* CloseParenToken */);
- var caseBlock = createNode(232 /* CaseBlock */, scanner.getStartPos());
+ var caseBlock = createNode(234 /* CaseBlock */, scanner.getStartPos());
parseExpected(16 /* OpenBraceToken */);
caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause);
parseExpected(17 /* CloseBraceToken */);
@@ -17865,7 +18721,7 @@ var ts;
// directly as that might consume an expression on the following line.
// We just return 'undefined' in that case. The actual error will be reported in the
// grammar walker.
- var node = createNode(220 /* ThrowStatement */);
+ var node = createNode(222 /* ThrowStatement */);
parseExpected(99 /* ThrowKeyword */);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
parseSemicolon();
@@ -17873,7 +18729,7 @@ var ts;
}
// TODO: Review for error recovery
function parseTryStatement() {
- var node = createNode(221 /* TryStatement */);
+ var node = createNode(223 /* TryStatement */);
parseExpected(101 /* TryKeyword */);
node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false);
node.catchClause = token() === 73 /* CatchKeyword */ ? parseCatchClause() : undefined;
@@ -17886,7 +18742,7 @@ var ts;
return finishNode(node);
}
function parseCatchClause() {
- var result = createNode(256 /* CatchClause */);
+ var result = createNode(259 /* CatchClause */);
parseExpected(73 /* CatchKeyword */);
if (parseExpected(18 /* OpenParenToken */)) {
result.variableDeclaration = parseVariableDeclaration();
@@ -17896,7 +18752,7 @@ var ts;
return finishNode(result);
}
function parseDebuggerStatement() {
- var node = createNode(222 /* DebuggerStatement */);
+ var node = createNode(224 /* DebuggerStatement */);
parseExpected(77 /* DebuggerKeyword */);
parseSemicolon();
return finishNode(node);
@@ -17908,13 +18764,13 @@ var ts;
var fullStart = scanner.getStartPos();
var expression = allowInAnd(parseExpression);
if (expression.kind === 70 /* Identifier */ && parseOptional(55 /* ColonToken */)) {
- var labeledStatement = createNode(219 /* LabeledStatement */, fullStart);
+ var labeledStatement = createNode(221 /* LabeledStatement */, fullStart);
labeledStatement.label = expression;
labeledStatement.statement = parseStatement();
return addJSDocComment(finishNode(labeledStatement));
}
else {
- var expressionStatement = createNode(207 /* ExpressionStatement */, fullStart);
+ var expressionStatement = createNode(209 /* ExpressionStatement */, fullStart);
expressionStatement.expression = expression;
parseSemicolon();
return addJSDocComment(finishNode(expressionStatement));
@@ -17924,6 +18780,10 @@ var ts;
nextToken();
return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak();
}
+ function nextTokenIsClassKeywordOnSameLine() {
+ nextToken();
+ return token() === 74 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak();
+ }
function nextTokenIsFunctionKeywordOnSameLine() {
nextToken();
return token() === 88 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak();
@@ -17964,7 +18824,7 @@ var ts;
//
// could be legal, it would add complexity for very little gain.
case 108 /* InterfaceKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return nextTokenIsIdentifierOnSameLine();
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
@@ -17982,7 +18842,7 @@ var ts;
return false;
}
continue;
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
nextToken();
return token() === 16 /* OpenBraceToken */ || token() === 70 /* Identifier */ || token() === 83 /* ExportKeyword */;
case 90 /* ImportKeyword */:
@@ -18044,8 +18904,8 @@ var ts;
case 108 /* InterfaceKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
- case 136 /* TypeKeyword */:
- case 139 /* GlobalKeyword */:
+ case 137 /* TypeKeyword */:
+ case 140 /* GlobalKeyword */:
// When these don't start a declaration, they're an identifier in an expression statement
return true;
case 113 /* PublicKeyword */:
@@ -18095,9 +18955,9 @@ var ts;
case 87 /* ForKeyword */:
return parseForOrForInOrForOfStatement();
case 76 /* ContinueKeyword */:
- return parseBreakOrContinueStatement(214 /* ContinueStatement */);
+ return parseBreakOrContinueStatement(216 /* ContinueStatement */);
case 71 /* BreakKeyword */:
- return parseBreakOrContinueStatement(215 /* BreakStatement */);
+ return parseBreakOrContinueStatement(217 /* BreakStatement */);
case 95 /* ReturnKeyword */:
return parseReturnStatement();
case 106 /* WithKeyword */:
@@ -18117,7 +18977,7 @@ var ts;
return parseDeclaration();
case 119 /* AsyncKeyword */:
case 108 /* InterfaceKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
case 123 /* DeclareKeyword */:
@@ -18131,7 +18991,7 @@ var ts;
case 116 /* AbstractKeyword */:
case 114 /* StaticKeyword */:
case 130 /* ReadonlyKeyword */:
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
if (isStartOfDeclaration()) {
return parseDeclaration();
}
@@ -18154,11 +19014,11 @@ var ts;
return parseClassDeclaration(fullStart, decorators, modifiers);
case 108 /* InterfaceKeyword */:
return parseInterfaceDeclaration(fullStart, decorators, modifiers);
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
case 82 /* EnumKeyword */:
return parseEnumDeclaration(fullStart, decorators, modifiers);
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
return parseModuleDeclaration(fullStart, decorators, modifiers);
@@ -18179,7 +19039,7 @@ var ts;
if (decorators || modifiers) {
// We reached this point because we encountered decorators and/or modifiers and assumed a declaration
// would follow. For recovery and error reporting purposes, return an incomplete declaration.
- var node = createMissingNode(244 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
+ var node = createMissingNode(246 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
node.pos = fullStart;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -18201,16 +19061,16 @@ var ts;
// DECLARATIONS
function parseArrayBindingElement() {
if (token() === 25 /* CommaToken */) {
- return createNode(198 /* OmittedExpression */);
+ return createNode(199 /* OmittedExpression */);
}
- var node = createNode(174 /* BindingElement */);
+ var node = createNode(175 /* BindingElement */);
node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
node.name = parseIdentifierOrPattern();
node.initializer = parseBindingElementInitializer(/*inParameter*/ false);
return finishNode(node);
}
function parseObjectBindingElement() {
- var node = createNode(174 /* BindingElement */);
+ var node = createNode(175 /* BindingElement */);
node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
var tokenIsIdentifier = isIdentifier();
var propertyName = parsePropertyName();
@@ -18226,14 +19086,14 @@ var ts;
return finishNode(node);
}
function parseObjectBindingPattern() {
- var node = createNode(172 /* ObjectBindingPattern */);
+ var node = createNode(173 /* ObjectBindingPattern */);
parseExpected(16 /* OpenBraceToken */);
node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement);
parseExpected(17 /* CloseBraceToken */);
return finishNode(node);
}
function parseArrayBindingPattern() {
- var node = createNode(173 /* ArrayBindingPattern */);
+ var node = createNode(174 /* ArrayBindingPattern */);
parseExpected(20 /* OpenBracketToken */);
node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement);
parseExpected(21 /* CloseBracketToken */);
@@ -18252,7 +19112,7 @@ var ts;
return parseIdentifier();
}
function parseVariableDeclaration() {
- var node = createNode(223 /* VariableDeclaration */);
+ var node = createNode(225 /* VariableDeclaration */);
node.name = parseIdentifierOrPattern();
node.type = parseTypeAnnotation();
if (!isInOrOfKeyword(token())) {
@@ -18261,7 +19121,7 @@ var ts;
return finishNode(node);
}
function parseVariableDeclarationList(inForStatementInitializer) {
- var node = createNode(224 /* VariableDeclarationList */);
+ var node = createNode(226 /* VariableDeclarationList */);
switch (token()) {
case 103 /* VarKeyword */:
break;
@@ -18284,7 +19144,7 @@ var ts;
// So we need to look ahead to determine if 'of' should be treated as a keyword in
// this context.
// The checker will then give an error that there is an empty declaration list.
- if (token() === 140 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) {
+ if (token() === 141 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) {
node.declarations = createMissingList();
}
else {
@@ -18299,7 +19159,7 @@ var ts;
return nextTokenIsIdentifier() && nextToken() === 19 /* CloseParenToken */;
}
function parseVariableStatement(fullStart, decorators, modifiers) {
- var node = createNode(205 /* VariableStatement */, fullStart);
+ var node = createNode(207 /* VariableStatement */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false);
@@ -18307,7 +19167,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseFunctionDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(225 /* FunctionDeclaration */, fullStart);
+ var node = createNode(227 /* FunctionDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(88 /* FunctionKeyword */);
@@ -18320,7 +19180,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseConstructorDeclaration(pos, decorators, modifiers) {
- var node = createNode(150 /* Constructor */, pos);
+ var node = createNode(151 /* Constructor */, pos);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(122 /* ConstructorKeyword */);
@@ -18329,7 +19189,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
- var method = createNode(149 /* MethodDeclaration */, fullStart);
+ var method = createNode(150 /* MethodDeclaration */, fullStart);
method.decorators = decorators;
method.modifiers = modifiers;
method.asteriskToken = asteriskToken;
@@ -18342,7 +19202,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
- var property = createNode(147 /* PropertyDeclaration */, fullStart);
+ var property = createNode(148 /* PropertyDeclaration */, fullStart);
property.decorators = decorators;
property.modifiers = modifiers;
property.name = name;
@@ -18359,7 +19219,7 @@ var ts;
// The checker may still error in the static case to explicitly disallow the yield expression.
property.initializer = ts.hasModifier(property, 32 /* Static */)
? allowInAnd(parseNonParameterInitializer)
- : doOutsideOfContext(131072 /* YieldContext */ | 65536 /* DisallowInContext */, parseNonParameterInitializer);
+ : doOutsideOfContext(4096 /* YieldContext */ | 2048 /* DisallowInContext */, parseNonParameterInitializer);
parseSemicolon();
return addJSDocComment(finishNode(property));
}
@@ -18435,7 +19295,7 @@ var ts;
// If we were able to get any potential identifier...
if (idToken !== undefined) {
// If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse.
- if (!ts.isKeyword(idToken) || idToken === 133 /* SetKeyword */ || idToken === 124 /* GetKeyword */) {
+ if (!ts.isKeyword(idToken) || idToken === 134 /* SetKeyword */ || idToken === 124 /* GetKeyword */) {
return true;
}
// If it *is* a keyword, but not an accessor, check a little farther along
@@ -18465,7 +19325,7 @@ var ts;
if (!parseOptional(56 /* AtToken */)) {
break;
}
- var decorator = createNode(145 /* Decorator */, decoratorStart);
+ var decorator = createNode(146 /* Decorator */, decoratorStart);
decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
finishNode(decorator);
if (!decorators) {
@@ -18531,7 +19391,7 @@ var ts;
}
function parseClassElement() {
if (token() === 24 /* SemicolonToken */) {
- var result = createNode(203 /* SemicolonClassElement */);
+ var result = createNode(205 /* SemicolonClassElement */);
nextToken();
return finishNode(result);
}
@@ -18559,8 +19419,8 @@ var ts;
}
if (decorators || modifiers) {
// treat this as a property declaration with a missing name.
- var name_13 = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
- return parsePropertyDeclaration(fullStart, decorators, modifiers, name_13, /*questionToken*/ undefined);
+ var name = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
+ return parsePropertyDeclaration(fullStart, decorators, modifiers, name, /*questionToken*/ undefined);
}
// 'isClassMemberStart' should have hinted not to attempt parsing.
ts.Debug.fail("Should not have attempted to parse class member declaration.");
@@ -18569,10 +19429,10 @@ var ts;
return parseClassDeclarationOrExpression(
/*fullStart*/ scanner.getStartPos(),
/*decorators*/ undefined,
- /*modifiers*/ undefined, 197 /* ClassExpression */);
+ /*modifiers*/ undefined, 198 /* ClassExpression */);
}
function parseClassDeclaration(fullStart, decorators, modifiers) {
- return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 226 /* ClassDeclaration */);
+ return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228 /* ClassDeclaration */);
}
function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
var node = createNode(kind, fullStart);
@@ -18615,9 +19475,10 @@ var ts;
return undefined;
}
function parseHeritageClause() {
- if (token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */) {
- var node = createNode(255 /* HeritageClause */);
- node.token = token();
+ var tok = token();
+ if (tok === 84 /* ExtendsKeyword */ || tok === 107 /* ImplementsKeyword */) {
+ var node = createNode(258 /* HeritageClause */);
+ node.token = tok;
nextToken();
node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments);
return finishNode(node);
@@ -18625,7 +19486,7 @@ var ts;
return undefined;
}
function parseExpressionWithTypeArguments() {
- var node = createNode(199 /* ExpressionWithTypeArguments */);
+ var node = createNode(200 /* ExpressionWithTypeArguments */);
node.expression = parseLeftHandSideExpressionOrHigher();
if (token() === 26 /* LessThanToken */) {
node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */);
@@ -18639,7 +19500,7 @@ var ts;
return parseList(5 /* ClassMembers */, parseClassElement);
}
function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(227 /* InterfaceDeclaration */, fullStart);
+ var node = createNode(229 /* InterfaceDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(108 /* InterfaceKeyword */);
@@ -18650,10 +19511,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(228 /* TypeAliasDeclaration */, fullStart);
+ var node = createNode(230 /* TypeAliasDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- parseExpected(136 /* TypeKeyword */);
+ parseExpected(137 /* TypeKeyword */);
node.name = parseIdentifier();
node.typeParameters = parseTypeParameters();
parseExpected(57 /* EqualsToken */);
@@ -18666,13 +19527,13 @@ var ts;
// ConstantEnumMemberSection, which starts at the beginning of an enum declaration
// or any time an integer literal initializer is encountered.
function parseEnumMember() {
- var node = createNode(260 /* EnumMember */, scanner.getStartPos());
+ var node = createNode(263 /* EnumMember */, scanner.getStartPos());
node.name = parsePropertyName();
node.initializer = allowInAnd(parseNonParameterInitializer);
return addJSDocComment(finishNode(node));
}
function parseEnumDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(229 /* EnumDeclaration */, fullStart);
+ var node = createNode(231 /* EnumDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(82 /* EnumKeyword */);
@@ -18687,7 +19548,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseModuleBlock() {
- var node = createNode(231 /* ModuleBlock */, scanner.getStartPos());
+ var node = createNode(233 /* ModuleBlock */, scanner.getStartPos());
if (parseExpected(16 /* OpenBraceToken */)) {
node.statements = parseList(1 /* BlockStatements */, parseStatement);
parseExpected(17 /* CloseBraceToken */);
@@ -18698,7 +19559,7 @@ var ts;
return finishNode(node);
}
function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
- var node = createNode(230 /* ModuleDeclaration */, fullStart);
+ var node = createNode(232 /* ModuleDeclaration */, fullStart);
// If we are parsing a dotted namespace name, we want to
// propagate the 'Namespace' flag across the names if set.
var namespaceFlag = flags & 16 /* Namespace */;
@@ -18712,10 +19573,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(230 /* ModuleDeclaration */, fullStart);
+ var node = createNode(232 /* ModuleDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- if (token() === 139 /* GlobalKeyword */) {
+ if (token() === 140 /* GlobalKeyword */) {
// parse 'global' as name of global scope augmentation
node.name = parseIdentifier();
node.flags |= 512 /* GlobalAugmentation */;
@@ -18733,7 +19594,7 @@ var ts;
}
function parseModuleDeclaration(fullStart, decorators, modifiers) {
var flags = 0;
- if (token() === 139 /* GlobalKeyword */) {
+ if (token() === 140 /* GlobalKeyword */) {
// global augmentation
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
}
@@ -18759,7 +19620,7 @@ var ts;
return nextToken() === 40 /* SlashToken */;
}
function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) {
- var exportDeclaration = createNode(233 /* NamespaceExportDeclaration */, fullStart);
+ var exportDeclaration = createNode(235 /* NamespaceExportDeclaration */, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(117 /* AsKeyword */);
@@ -18774,22 +19635,12 @@ var ts;
var identifier;
if (isIdentifier()) {
identifier = parseIdentifier();
- if (token() !== 25 /* CommaToken */ && token() !== 138 /* FromKeyword */) {
- // ImportEquals declaration of type:
- // import x = require("mod"); or
- // import x = M.x;
- var importEqualsDeclaration = createNode(234 /* ImportEqualsDeclaration */, fullStart);
- importEqualsDeclaration.decorators = decorators;
- importEqualsDeclaration.modifiers = modifiers;
- importEqualsDeclaration.name = identifier;
- parseExpected(57 /* EqualsToken */);
- importEqualsDeclaration.moduleReference = parseModuleReference();
- parseSemicolon();
- return addJSDocComment(finishNode(importEqualsDeclaration));
+ if (token() !== 25 /* CommaToken */ && token() !== 139 /* FromKeyword */) {
+ return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier);
}
}
// Import statement
- var importDeclaration = createNode(235 /* ImportDeclaration */, fullStart);
+ var importDeclaration = createNode(237 /* ImportDeclaration */, fullStart);
importDeclaration.decorators = decorators;
importDeclaration.modifiers = modifiers;
// ImportDeclaration:
@@ -18799,12 +19650,22 @@ var ts;
token() === 38 /* AsteriskToken */ ||
token() === 16 /* OpenBraceToken */) {
importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
- parseExpected(138 /* FromKeyword */);
+ parseExpected(139 /* FromKeyword */);
}
importDeclaration.moduleSpecifier = parseModuleSpecifier();
parseSemicolon();
return finishNode(importDeclaration);
}
+ function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) {
+ var importEqualsDeclaration = createNode(236 /* ImportEqualsDeclaration */, fullStart);
+ importEqualsDeclaration.decorators = decorators;
+ importEqualsDeclaration.modifiers = modifiers;
+ importEqualsDeclaration.name = identifier;
+ parseExpected(57 /* EqualsToken */);
+ importEqualsDeclaration.moduleReference = parseModuleReference();
+ parseSemicolon();
+ return addJSDocComment(finishNode(importEqualsDeclaration));
+ }
function parseImportClause(identifier, fullStart) {
// ImportClause:
// ImportedDefaultBinding
@@ -18812,7 +19673,7 @@ var ts;
// NamedImports
// ImportedDefaultBinding, NameSpaceImport
// ImportedDefaultBinding, NamedImports
- var importClause = createNode(236 /* ImportClause */, fullStart);
+ var importClause = createNode(238 /* ImportClause */, fullStart);
if (identifier) {
// ImportedDefaultBinding:
// ImportedBinding
@@ -18822,7 +19683,7 @@ var ts;
// parse namespace or named imports
if (!importClause.name ||
parseOptional(25 /* CommaToken */)) {
- importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(238 /* NamedImports */);
+ importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(240 /* NamedImports */);
}
return finishNode(importClause);
}
@@ -18832,7 +19693,7 @@ var ts;
: parseEntityName(/*allowReservedWords*/ false);
}
function parseExternalModuleReference() {
- var node = createNode(245 /* ExternalModuleReference */);
+ var node = createNode(247 /* ExternalModuleReference */);
parseExpected(131 /* RequireKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = parseModuleSpecifier();
@@ -18855,7 +19716,7 @@ var ts;
function parseNamespaceImport() {
// NameSpaceImport:
// * as ImportedBinding
- var namespaceImport = createNode(237 /* NamespaceImport */);
+ var namespaceImport = createNode(239 /* NamespaceImport */);
parseExpected(38 /* AsteriskToken */);
parseExpected(117 /* AsKeyword */);
namespaceImport.name = parseIdentifier();
@@ -18870,14 +19731,14 @@ var ts;
// ImportsList:
// ImportSpecifier
// ImportsList, ImportSpecifier
- node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 238 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */);
+ node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 240 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */);
return finishNode(node);
}
function parseExportSpecifier() {
- return parseImportOrExportSpecifier(243 /* ExportSpecifier */);
+ return parseImportOrExportSpecifier(245 /* ExportSpecifier */);
}
function parseImportSpecifier() {
- return parseImportOrExportSpecifier(239 /* ImportSpecifier */);
+ return parseImportOrExportSpecifier(241 /* ImportSpecifier */);
}
function parseImportOrExportSpecifier(kind) {
var node = createNode(kind);
@@ -18902,27 +19763,27 @@ var ts;
else {
node.name = identifierName;
}
- if (kind === 239 /* ImportSpecifier */ && checkIdentifierIsKeyword) {
+ if (kind === 241 /* ImportSpecifier */ && checkIdentifierIsKeyword) {
// Report error identifier expected
parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
}
return finishNode(node);
}
function parseExportDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(241 /* ExportDeclaration */, fullStart);
+ var node = createNode(243 /* ExportDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(38 /* AsteriskToken */)) {
- parseExpected(138 /* FromKeyword */);
+ parseExpected(139 /* FromKeyword */);
node.moduleSpecifier = parseModuleSpecifier();
}
else {
- node.exportClause = parseNamedImportsOrExports(242 /* NamedExports */);
+ node.exportClause = parseNamedImportsOrExports(244 /* NamedExports */);
// It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios,
// the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`)
// If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect.
- if (token() === 138 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) {
- parseExpected(138 /* FromKeyword */);
+ if (token() === 139 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) {
+ parseExpected(139 /* FromKeyword */);
node.moduleSpecifier = parseModuleSpecifier();
}
}
@@ -18930,7 +19791,7 @@ var ts;
return finishNode(node);
}
function parseExportAssignment(fullStart, decorators, modifiers) {
- var node = createNode(240 /* ExportAssignment */, fullStart);
+ var node = createNode(242 /* ExportAssignment */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(57 /* EqualsToken */)) {
@@ -18949,6 +19810,7 @@ var ts;
var typeReferenceDirectives = [];
var amdDependencies = [];
var amdModuleName;
+ var checkJsDirective = undefined;
// Keep scanning all the leading trivia in the file until we get to something that
// isn't trivia. Any single line comment will be analyzed to see if it is a
// reference comment.
@@ -18962,7 +19824,11 @@ var ts;
break;
}
}
- var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
+ var range = {
+ kind: triviaScanner.getToken(),
+ pos: triviaScanner.getTokenPos(),
+ end: triviaScanner.getTextPos(),
+ };
var comment = sourceText.substring(range.pos, range.end);
var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
if (referencePathMatchResult) {
@@ -19002,20 +19868,30 @@ var ts;
amdDependencies.push(amdDependency);
}
}
+ var checkJsDirectiveRegEx = /^\/\/\/?\s*(@ts-check|@ts-nocheck)\s*$/gim;
+ var checkJsDirectiveMatchResult = checkJsDirectiveRegEx.exec(comment);
+ if (checkJsDirectiveMatchResult) {
+ checkJsDirective = {
+ enabled: ts.compareStrings(checkJsDirectiveMatchResult[1], "@ts-check", /*ignoreCase*/ true) === 0 /* EqualTo */,
+ end: range.end,
+ pos: range.pos
+ };
+ }
}
}
sourceFile.referencedFiles = referencedFiles;
sourceFile.typeReferenceDirectives = typeReferenceDirectives;
sourceFile.amdDependencies = amdDependencies;
sourceFile.moduleName = amdModuleName;
+ sourceFile.checkJsDirective = checkJsDirective;
}
function setExternalModuleIndicator(sourceFile) {
sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
return ts.hasModifier(node, 1 /* Export */)
- || node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 245 /* ExternalModuleReference */
- || node.kind === 235 /* ImportDeclaration */
- || node.kind === 240 /* ExportAssignment */
- || node.kind === 241 /* ExportDeclaration */
+ || node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */
+ || node.kind === 237 /* ImportDeclaration */
+ || node.kind === 242 /* ExportAssignment */
+ || node.kind === 243 /* ExportDeclaration */
? node
: undefined;
});
@@ -19090,7 +19966,7 @@ var ts;
// Parses out a JSDoc type expression.
/* @internal */
function parseJSDocTypeExpression() {
- var result = createNode(262 /* JSDocTypeExpression */, scanner.getTokenPos());
+ var result = createNode(266 /* JSDocTypeExpression */, scanner.getTokenPos());
parseExpected(16 /* OpenBraceToken */);
result.type = parseJSDocTopLevelType();
parseExpected(17 /* CloseBraceToken */);
@@ -19101,12 +19977,12 @@ var ts;
function parseJSDocTopLevelType() {
var type = parseJSDocType();
if (token() === 48 /* BarToken */) {
- var unionType = createNode(266 /* JSDocUnionType */, type.pos);
+ var unionType = createNode(270 /* JSDocUnionType */, type.pos);
unionType.types = parseJSDocTypeList(type);
type = finishNode(unionType);
}
if (token() === 57 /* EqualsToken */) {
- var optionalType = createNode(273 /* JSDocOptionalType */, type.pos);
+ var optionalType = createNode(277 /* JSDocOptionalType */, type.pos);
nextToken();
optionalType.type = type;
type = finishNode(optionalType);
@@ -19117,20 +19993,20 @@ var ts;
var type = parseBasicTypeExpression();
while (true) {
if (token() === 20 /* OpenBracketToken */) {
- var arrayType = createNode(265 /* JSDocArrayType */, type.pos);
+ var arrayType = createNode(269 /* JSDocArrayType */, type.pos);
arrayType.elementType = type;
nextToken();
parseExpected(21 /* CloseBracketToken */);
type = finishNode(arrayType);
}
else if (token() === 54 /* QuestionToken */) {
- var nullableType = createNode(268 /* JSDocNullableType */, type.pos);
+ var nullableType = createNode(272 /* JSDocNullableType */, type.pos);
nullableType.type = type;
nextToken();
type = finishNode(nullableType);
}
else if (token() === 50 /* ExclamationToken */) {
- var nonNullableType = createNode(269 /* JSDocNonNullableType */, type.pos);
+ var nonNullableType = createNode(273 /* JSDocNonNullableType */, type.pos);
nonNullableType.type = type;
nextToken();
type = finishNode(nonNullableType);
@@ -19164,14 +20040,15 @@ var ts;
case 98 /* ThisKeyword */:
return parseJSDocThisType();
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
case 94 /* NullKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
+ case 133 /* ObjectKeyword */:
return parseTokenNode();
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -19182,27 +20059,27 @@ var ts;
return parseJSDocTypeReference();
}
function parseJSDocThisType() {
- var result = createNode(277 /* JSDocThisType */);
+ var result = createNode(281 /* JSDocThisType */);
nextToken();
parseExpected(55 /* ColonToken */);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocConstructorType() {
- var result = createNode(276 /* JSDocConstructorType */);
+ var result = createNode(280 /* JSDocConstructorType */);
nextToken();
parseExpected(55 /* ColonToken */);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocVariadicType() {
- var result = createNode(275 /* JSDocVariadicType */);
+ var result = createNode(279 /* JSDocVariadicType */);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocFunctionType() {
- var result = createNode(274 /* JSDocFunctionType */);
+ var result = createNode(278 /* JSDocFunctionType */);
nextToken();
parseExpected(18 /* OpenParenToken */);
result.parameters = parseDelimitedList(23 /* JSDocFunctionParameters */, parseJSDocParameter);
@@ -19215,7 +20092,7 @@ var ts;
return finishNode(result);
}
function parseJSDocParameter() {
- var parameter = createNode(144 /* Parameter */);
+ var parameter = createNode(145 /* Parameter */);
parameter.type = parseJSDocType();
if (parseOptional(57 /* EqualsToken */)) {
// TODO(rbuckton): Can this be changed to SyntaxKind.QuestionToken?
@@ -19224,7 +20101,7 @@ var ts;
return finishNode(parameter);
}
function parseJSDocTypeReference() {
- var result = createNode(272 /* JSDocTypeReference */);
+ var result = createNode(276 /* JSDocTypeReference */);
result.name = parseSimplePropertyName();
if (token() === 26 /* LessThanToken */) {
result.typeArguments = parseTypeArguments();
@@ -19259,24 +20136,24 @@ var ts;
}
}
function parseQualifiedName(left) {
- var result = createNode(141 /* QualifiedName */, left.pos);
+ var result = createNode(142 /* QualifiedName */, left.pos);
result.left = left;
result.right = parseIdentifierName();
return finishNode(result);
}
function parseJSDocRecordType() {
- var result = createNode(270 /* JSDocRecordType */);
+ var result = createNode(274 /* JSDocRecordType */);
result.literal = parseTypeLiteral();
return finishNode(result);
}
function parseJSDocNonNullableType() {
- var result = createNode(269 /* JSDocNonNullableType */);
+ var result = createNode(273 /* JSDocNonNullableType */);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocTupleType() {
- var result = createNode(267 /* JSDocTupleType */);
+ var result = createNode(271 /* JSDocTupleType */);
nextToken();
result.types = parseDelimitedList(26 /* JSDocTupleTypes */, parseJSDocType);
checkForTrailingComma(result.types);
@@ -19290,7 +20167,7 @@ var ts;
}
}
function parseJSDocUnionType() {
- var result = createNode(266 /* JSDocUnionType */);
+ var result = createNode(270 /* JSDocUnionType */);
nextToken();
result.types = parseJSDocTypeList(parseJSDocType());
parseExpected(19 /* CloseParenToken */);
@@ -19306,12 +20183,12 @@ var ts;
return types;
}
function parseJSDocAllType() {
- var result = createNode(263 /* JSDocAllType */);
+ var result = createNode(267 /* JSDocAllType */);
nextToken();
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(288 /* JSDocLiteralType */);
+ var result = createNode(292 /* JSDocLiteralType */);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -19334,11 +20211,11 @@ var ts;
token() === 28 /* GreaterThanToken */ ||
token() === 57 /* EqualsToken */ ||
token() === 48 /* BarToken */) {
- var result = createNode(264 /* JSDocUnknownType */, pos);
+ var result = createNode(268 /* JSDocUnknownType */, pos);
return finishNode(result);
}
else {
- var result = createNode(268 /* JSDocNullableType */, pos);
+ var result = createNode(272 /* JSDocNullableType */, pos);
result.type = parseJSDocType();
return finishNode(result);
}
@@ -19437,7 +20314,7 @@ var ts;
break;
case 38 /* AsteriskToken */:
var asterisk = scanner.getTokenText();
- if (state === 1 /* SawAsterisk */) {
+ if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) {
// If we've already seen an asterisk, then we can no longer parse a tag on this line
state = 2 /* SavingComments */;
pushComment(asterisk);
@@ -19458,7 +20335,10 @@ var ts;
case 5 /* WhitespaceTrivia */:
// only collect whitespace if we're already saving comments or have just crossed the comment indent margin
var whitespace = scanner.getTokenText();
- if (state === 2 /* SavingComments */ || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === 2 /* SavingComments */) {
+ comments.push(whitespace);
+ }
+ else if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent - 1));
}
indent += whitespace.length;
@@ -19466,6 +20346,8 @@ var ts;
case 1 /* EndOfFileToken */:
break;
default:
+ // anything other than whitespace or asterisk at the beginning of the line starts the comment text
+ state = 2 /* SavingComments */;
pushComment(scanner.getTokenText());
break;
}
@@ -19498,7 +20380,7 @@ var ts;
content.charCodeAt(start + 3) !== 42 /* asterisk */;
}
function createJSDocComment() {
- var result = createNode(278 /* JSDocComment */, start);
+ var result = createNode(282 /* JSDocComment */, start);
result.tags = tags;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
@@ -19556,7 +20438,7 @@ var ts;
}
function parseTagComments(indent) {
var comments = [];
- var state = 1 /* SawAsterisk */;
+ var state = 0 /* BeginningOfLine */;
var margin;
function pushComment(text) {
if (!margin) {
@@ -19597,7 +20479,8 @@ var ts;
indent += scanner.getTokenText().length;
break;
}
- // FALLTHROUGH otherwise to record the * as a comment
+ // record the * as a comment
+ // falls through
default:
state = 2 /* SavingComments */; // leading identifiers start recording as well
pushComment(scanner.getTokenText());
@@ -19614,7 +20497,7 @@ var ts;
return comments;
}
function parseUnknownTag(atToken, tagName) {
- var result = createNode(279 /* JSDocTag */, atToken.pos);
+ var result = createNode(283 /* JSDocTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
@@ -19671,7 +20554,7 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(281 /* JSDocParameterTag */, atToken.pos);
+ var result = createNode(285 /* JSDocParameterTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
@@ -19682,20 +20565,20 @@ var ts;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 282 /* JSDocReturnTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 286 /* JSDocReturnTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(282 /* JSDocReturnTag */, atToken.pos);
+ var result = createNode(286 /* JSDocReturnTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 283 /* JSDocTypeTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocTypeTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(283 /* JSDocTypeTag */, atToken.pos);
+ var result = createNode(287 /* JSDocTypeTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
@@ -19710,7 +20593,7 @@ var ts;
parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var result = createNode(286 /* JSDocPropertyTag */, atToken.pos);
+ var result = createNode(290 /* JSDocPropertyTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.name = name;
@@ -19719,7 +20602,7 @@ var ts;
}
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
- var result = createNode(280 /* JSDocAugmentsTag */, atToken.pos);
+ var result = createNode(284 /* JSDocAugmentsTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = typeExpression;
@@ -19728,25 +20611,30 @@ var ts;
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(285 /* JSDocTypedefTag */, atToken.pos);
+ var typedefTag = createNode(289 /* JSDocTypedefTag */, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
- while (rightNode.kind !== 70 /* Identifier */) {
+ while (true) {
+ if (rightNode.kind === 70 /* Identifier */ || !rightNode.body) {
+ // if node is identifier - use it as name
+ // otherwise use name of the rightmost part that we were able to parse
+ typedefTag.name = rightNode.kind === 70 /* Identifier */ ? rightNode : rightNode.name;
+ break;
+ }
rightNode = rightNode.body;
}
- typedefTag.name = rightNode;
}
typedefTag.typeExpression = typeExpression;
skipWhitespace();
if (typeExpression) {
- if (typeExpression.type.kind === 272 /* JSDocTypeReference */) {
+ if (typeExpression.type.kind === 276 /* JSDocTypeReference */) {
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 70 /* Identifier */) {
- var name_14 = jsDocTypeReference.name;
- if (name_14.text === "Object") {
+ var name = jsDocTypeReference.name;
+ if (name.text === "Object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -19760,7 +20648,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(287 /* JSDocTypeLiteral */, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(291 /* JSDocTypeLiteral */, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -19790,6 +20678,7 @@ var ts;
break;
case 70 /* Identifier */:
canParseTag = false;
+ break;
case 1 /* EndOfFileToken */:
break;
}
@@ -19801,7 +20690,7 @@ var ts;
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(22 /* DotToken */)) {
- var jsDocNamespaceNode = createNode(230 /* ModuleDeclaration */, pos);
+ var jsDocNamespaceNode = createNode(232 /* ModuleDeclaration */, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */);
@@ -19847,20 +20736,20 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 284 /* JSDocTemplateTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTemplateTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
// Type parameter list looks like '@template T,U,V'
var typeParameters = createNodeArray();
while (true) {
- var name_15 = parseJSDocIdentifierName();
+ var name = parseJSDocIdentifierName();
skipWhitespace();
- if (!name_15) {
+ if (!name) {
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var typeParameter = createNode(143 /* TypeParameter */, name_15.pos);
- typeParameter.name = name_15;
+ var typeParameter = createNode(144 /* TypeParameter */, name.pos);
+ typeParameter.name = name;
finishNode(typeParameter);
typeParameters.push(typeParameter);
if (token() === 25 /* CommaToken */) {
@@ -19871,7 +20760,7 @@ var ts;
break;
}
}
- var result = createNode(284 /* JSDocTemplateTag */, atToken.pos);
+ var result = createNode(288 /* JSDocTemplateTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -20345,7 +21234,7 @@ var ts;
if (position >= array.pos && position < array.end) {
// position was in this array. Search through this array to see if we find a
// viable element.
- for (var i = 0, n = array.length; i < n; i++) {
+ for (var i = 0; i < array.length; i++) {
var child = array[i];
if (child) {
if (child.pos === position) {
@@ -20391,16 +21280,16 @@ var ts;
function getModuleInstanceState(node) {
// A module is uninstantiated if it contains only
// 1. interface declarations, type alias declarations
- if (node.kind === 227 /* InterfaceDeclaration */ || node.kind === 228 /* TypeAliasDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 230 /* TypeAliasDeclaration */) {
return 0 /* NonInstantiated */;
}
else if (ts.isConstEnumDeclaration(node)) {
return 2 /* ConstEnumOnly */;
}
- else if ((node.kind === 235 /* ImportDeclaration */ || node.kind === 234 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) {
+ else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) {
return 0 /* NonInstantiated */;
}
- else if (node.kind === 231 /* ModuleBlock */) {
+ else if (node.kind === 233 /* ModuleBlock */) {
var state_1 = 0 /* NonInstantiated */;
ts.forEachChild(node, function (n) {
switch (getModuleInstanceState(n)) {
@@ -20419,7 +21308,7 @@ var ts;
});
return state_1;
}
- else if (node.kind === 230 /* ModuleDeclaration */) {
+ else if (node.kind === 232 /* ModuleDeclaration */) {
var body = node.body;
return body ? getModuleInstanceState(body) : 1 /* Instantiated */;
}
@@ -20532,7 +21421,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if (opts.alwaysStrict && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
// bind in strict mode source files with alwaysStrict option
return true;
}
@@ -20560,7 +21449,7 @@ var ts;
if (symbolFlags & 107455 /* Value */) {
var valueDeclaration = symbol.valueDeclaration;
if (!valueDeclaration ||
- (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 230 /* ModuleDeclaration */)) {
+ (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232 /* ModuleDeclaration */)) {
// other kinds of value declarations take precedence over modules
symbol.valueDeclaration = node;
}
@@ -20573,7 +21462,7 @@ var ts;
if (ts.isAmbientModule(node)) {
return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
}
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = node.name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
@@ -20585,27 +21474,28 @@ var ts;
return node.name.text;
}
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return "__constructor";
- case 158 /* FunctionType */:
- case 153 /* CallSignature */:
+ case 159 /* FunctionType */:
+ case 154 /* CallSignature */:
return "__call";
- case 159 /* ConstructorType */:
- case 154 /* ConstructSignature */:
+ case 160 /* ConstructorType */:
+ case 155 /* ConstructSignature */:
return "__new";
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return "__index";
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return "__export";
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return node.isExportEquals ? "export=" : "default";
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (ts.getSpecialPropertyAssignmentKind(node)) {
case 2 /* ModuleExports */:
// module.exports = ...
return "export=";
case 1 /* ExportsProperty */:
case 4 /* ThisProperty */:
+ case 5 /* Property */:
// exports.x = ... or this.y = ...
return node.left.name.text;
case 3 /* PrototypeProperty */:
@@ -20614,22 +21504,22 @@ var ts;
}
ts.Debug.fail("Unknown binary declaration kind");
break;
- case 225 /* FunctionDeclaration */:
- case 226 /* ClassDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
return ts.hasModifier(node, 512 /* Default */) ? "default" : undefined;
- case 274 /* JSDocFunctionType */:
+ case 278 /* JSDocFunctionType */:
return ts.isJSDocConstructSignature(node) ? "__new" : "__call";
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Parameters with names are handled at the top of this function. Parameters
// without names can only come from JSDocFunctionTypes.
- ts.Debug.assert(node.parent.kind === 274 /* JSDocFunctionType */);
+ ts.Debug.assert(node.parent.kind === 278 /* JSDocFunctionType */);
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
- if (parentNode && parentNode.kind === 205 /* VariableStatement */) {
+ if (parentNode && parentNode.kind === 207 /* VariableStatement */) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70 /* Identifier */) {
@@ -20684,15 +21574,18 @@ var ts;
// Otherwise, we'll be merging into a compatible existing symbol (for example when
// you have multiple 'vars' with the same name in the same container). In this case
// just add this node into the declarations list of the symbol.
- symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0 /* None */, name));
+ symbol = symbolTable.get(name);
+ if (!symbol) {
+ symbolTable.set(name, symbol = createSymbol(0 /* None */, name));
+ }
if (name && (includes & 788448 /* Classifiable */)) {
- classifiableNames[name] = name;
+ classifiableNames.set(name, name);
}
if (symbol.flags & excludes) {
if (symbol.isReplaceableByMethod) {
// Javascript constructor-declared symbols can be discarded in favor of
// prototype symbols like methods.
- symbol = symbolTable[name] = createSymbol(0 /* None */, name);
+ symbolTable.set(name, symbol = createSymbol(0 /* None */, name));
}
else {
if (node.name) {
@@ -20716,7 +21609,7 @@ var ts;
// 1. multiple export default of class declaration or function declaration by checking NodeFlags.Default
// 2. multiple export default of export assignment. This one doesn't have NodeFlags.Default on (as export default doesn't considered as modifiers)
if (symbol.declarations && symbol.declarations.length &&
- (isDefaultExport || (node.kind === 240 /* ExportAssignment */ && !node.isExportEquals))) {
+ (isDefaultExport || (node.kind === 242 /* ExportAssignment */ && !node.isExportEquals))) {
message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
}
}
@@ -20736,11 +21629,11 @@ var ts;
function declareModuleMember(node, symbolFlags, symbolExcludes) {
var hasExportModifier = ts.getCombinedModifierFlags(node) & 1 /* Export */;
if (symbolFlags & 8388608 /* Alias */) {
- if (node.kind === 243 /* ExportSpecifier */ || (node.kind === 234 /* ImportEqualsDeclaration */ && hasExportModifier)) {
+ if (node.kind === 245 /* ExportSpecifier */ || (node.kind === 236 /* ImportEqualsDeclaration */ && hasExportModifier)) {
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
}
else {
- return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
+ return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
else {
@@ -20759,7 +21652,7 @@ var ts;
// during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation
// and this case is specially handled. Module augmentations should only be merged with original module definition
// and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed.
- var isJSDocTypedefInJSDocNamespace = node.kind === 285 /* JSDocTypedefTag */ &&
+ var isJSDocTypedefInJSDocNamespace = node.kind === 289 /* JSDocTypedefTag */ &&
node.name &&
node.name.kind === 70 /* Identifier */ &&
node.name.isInJSDocNamespace;
@@ -20767,13 +21660,13 @@ var ts;
var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) |
(symbolFlags & 793064 /* Type */ ? 2097152 /* ExportType */ : 0) |
(symbolFlags & 1920 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0);
- var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes);
+ var local = declareSymbol(container.locals, /*parent*/ undefined, node, exportKind, symbolExcludes);
local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
node.localSymbol = local;
return local;
}
else {
- return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
+ return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
}
@@ -20840,14 +21733,13 @@ var ts;
hasExplicitReturn = false;
bindChildren(node);
// Reset all reachability check related flags on node (for incremental scenarios)
- // Reset all emit helper flags on node (for incremental scenarios)
- node.flags &= ~64896 /* ReachabilityAndEmitFlags */;
+ node.flags &= ~1408 /* ReachabilityAndEmitFlags */;
if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && ts.nodeIsPresent(node.body)) {
node.flags |= 128 /* HasImplicitReturn */;
if (hasExplicitReturn)
node.flags |= 256 /* HasExplicitReturn */;
}
- if (node.kind === 261 /* SourceFile */) {
+ if (node.kind === 264 /* SourceFile */) {
node.flags |= emitFlags;
}
if (isIIFE) {
@@ -20926,66 +21818,72 @@ var ts;
return;
}
switch (node.kind) {
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
bindWhileStatement(node);
break;
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
bindDoStatement(node);
break;
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
bindForStatement(node);
break;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
bindForInOrForOfStatement(node);
break;
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
bindIfStatement(node);
break;
- case 216 /* ReturnStatement */:
- case 220 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 222 /* ThrowStatement */:
bindReturnOrThrow(node);
break;
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
bindBreakOrContinueStatement(node);
break;
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
bindTryStatement(node);
break;
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
bindSwitchStatement(node);
break;
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
bindCaseBlock(node);
break;
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
bindCaseClause(node);
break;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
bindLabeledStatement(node);
break;
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
bindPrefixUnaryExpressionFlow(node);
break;
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
bindPostfixUnaryExpressionFlow(node);
break;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
bindBinaryExpressionFlow(node);
break;
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
bindDeleteExpressionFlow(node);
break;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
bindConditionalExpressionFlow(node);
break;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
bindVariableDeclarationFlow(node);
break;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
bindCallExpressionFlow(node);
break;
+ case 282 /* JSDocComment */:
+ bindJSDocComment(node);
+ break;
+ case 289 /* JSDocTypedefTag */:
+ bindJSDocTypedefTag(node);
+ break;
default:
bindEachChild(node);
break;
@@ -20995,15 +21893,15 @@ var ts;
switch (expr.kind) {
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return isNarrowableReference(expr);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return hasNarrowableArgument(expr);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isNarrowingExpression(expr.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return isNarrowingBinaryExpression(expr);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return expr.operator === 50 /* ExclamationToken */ && isNarrowingExpression(expr.operand);
}
return false;
@@ -21011,7 +21909,8 @@ var ts;
function isNarrowableReference(expr) {
return expr.kind === 70 /* Identifier */ ||
expr.kind === 98 /* ThisKeyword */ ||
- expr.kind === 177 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression);
+ expr.kind === 96 /* SuperKeyword */ ||
+ expr.kind === 178 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression);
}
function hasNarrowableArgument(expr) {
if (expr.arguments) {
@@ -21022,14 +21921,14 @@ var ts;
}
}
}
- if (expr.expression.kind === 177 /* PropertyAccessExpression */ &&
+ if (expr.expression.kind === 178 /* PropertyAccessExpression */ &&
isNarrowableReference(expr.expression.expression)) {
return true;
}
return false;
}
function isNarrowingTypeofOperands(expr1, expr2) {
- return expr1.kind === 187 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */;
+ return expr1.kind === 188 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */;
}
function isNarrowingBinaryExpression(expr) {
switch (expr.operatorToken.kind) {
@@ -21050,9 +21949,9 @@ var ts;
}
function isNarrowableOperand(expr) {
switch (expr.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isNarrowableOperand(expr.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (expr.operatorToken.kind) {
case 57 /* EqualsToken */:
return isNarrowableOperand(expr.left);
@@ -21147,33 +22046,33 @@ var ts;
function isStatementCondition(node) {
var parent = node.parent;
switch (parent.kind) {
- case 208 /* IfStatement */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
+ case 210 /* IfStatement */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
return parent.expression === node;
- case 211 /* ForStatement */:
- case 193 /* ConditionalExpression */:
+ case 213 /* ForStatement */:
+ case 194 /* ConditionalExpression */:
return parent.condition === node;
}
return false;
}
function isLogicalExpression(node) {
while (true) {
- if (node.kind === 183 /* ParenthesizedExpression */) {
+ if (node.kind === 184 /* ParenthesizedExpression */) {
node = node.expression;
}
- else if (node.kind === 190 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) {
+ else if (node.kind === 191 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) {
node = node.operand;
}
else {
- return node.kind === 192 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ ||
+ return node.kind === 193 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ ||
node.operatorToken.kind === 53 /* BarBarToken */);
}
}
}
function isTopLevelLogicalExpression(node) {
- while (node.parent.kind === 183 /* ParenthesizedExpression */ ||
- node.parent.kind === 190 /* PrefixUnaryExpression */ &&
+ while (node.parent.kind === 184 /* ParenthesizedExpression */ ||
+ node.parent.kind === 191 /* PrefixUnaryExpression */ &&
node.parent.operator === 50 /* ExclamationToken */) {
node = node.parent;
}
@@ -21215,7 +22114,7 @@ var ts;
}
function bindDoStatement(node) {
var preDoLabel = createLoopLabel();
- var enclosingLabeledStatement = node.parent.kind === 219 /* LabeledStatement */
+ var enclosingLabeledStatement = node.parent.kind === 221 /* LabeledStatement */
? ts.lastOrUndefined(activeLabels)
: undefined;
// if do statement is wrapped in labeled statement then target labels for break/continue with or without
@@ -21249,10 +22148,13 @@ var ts;
var postLoopLabel = createBranchLabel();
addAntecedent(preLoopLabel, currentFlow);
currentFlow = preLoopLabel;
+ if (node.kind === 215 /* ForOfStatement */) {
+ bind(node.awaitModifier);
+ }
bind(node.expression);
addAntecedent(postLoopLabel, currentFlow);
bind(node.initializer);
- if (node.initializer.kind !== 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind !== 226 /* VariableDeclarationList */) {
bindAssignmentTargetFlow(node.initializer);
}
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -21274,7 +22176,7 @@ var ts;
}
function bindReturnOrThrow(node) {
bind(node.expression);
- if (node.kind === 216 /* ReturnStatement */) {
+ if (node.kind === 218 /* ReturnStatement */) {
hasExplicitReturn = true;
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
@@ -21294,7 +22196,7 @@ var ts;
return undefined;
}
function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
- var flowLabel = node.kind === 215 /* BreakStatement */ ? breakTarget : continueTarget;
+ var flowLabel = node.kind === 217 /* BreakStatement */ ? breakTarget : continueTarget;
if (flowLabel) {
addAntecedent(flowLabel, currentFlow);
currentFlow = unreachableFlow;
@@ -21330,7 +22232,32 @@ var ts;
if (node.finallyBlock) {
// in finally flow is combined from pre-try/flow from try/flow from catch
// pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable
- addAntecedent(preFinallyLabel, preTryFlow);
+ // also for finally blocks we inject two extra edges into the flow graph.
+ // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it
+ // second -> edge that represents post-finally flow.
+ // these edges are used in following scenario:
+ // let a; (1)
+ // try { a = someOperation(); (2)}
+ // finally { (3) console.log(a) } (4)
+ // (5) a
+ // flow graph for this case looks roughly like this (arrows show ):
+ // (1-pre-try-flow) <--.. <-- (2-post-try-flow)
+ // ^ ^
+ // |*****(3-pre-finally-label) -----|
+ // ^
+ // |-- ... <-- (4-post-finally-label) <--- (5)
+ // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account
+ // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5)
+ // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable
+ // Simply speaking code inside finally block is treated as reachable as pre-try-flow
+ // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally.
+ // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from
+ // final flows of these blocks without taking pre-try flow into account.
+ //
+ // extra edges that we inject allows to control this behavior
+ // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped.
+ var preFinallyFlow = { flags: 2048 /* PreFinally */, antecedent: preTryFlow, lock: {} };
+ addAntecedent(preFinallyLabel, preFinallyFlow);
currentFlow = finishFlowLabel(preFinallyLabel);
bind(node.finallyBlock);
// if flow after finally is unreachable - keep it
@@ -21346,6 +22273,11 @@ var ts;
: unreachableFlow;
}
}
+ if (!(currentFlow.flags & 1 /* Unreachable */)) {
+ var afterFinallyFlow = { flags: 4096 /* AfterFinally */, antecedent: currentFlow };
+ preFinallyFlow.lock = afterFinallyFlow;
+ currentFlow = afterFinallyFlow;
+ }
}
else {
currentFlow = finishFlowLabel(preFinallyLabel);
@@ -21360,7 +22292,7 @@ var ts;
preSwitchCaseFlow = currentFlow;
bind(node.caseBlock);
addAntecedent(postSwitchLabel, currentFlow);
- var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 254 /* DefaultClause */; });
+ var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257 /* DefaultClause */; });
// We mark a switch statement as possibly exhaustive if it has no default clause and if all
// case clauses have unreachable end points (e.g. they all return).
node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
@@ -21427,14 +22359,14 @@ var ts;
if (!activeLabel.referenced && !options.allowUnusedLabels) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label));
}
- if (!node.statement || node.statement.kind !== 209 /* DoStatement */) {
+ if (!node.statement || node.statement.kind !== 211 /* DoStatement */) {
// do statement sets current flow inside bindDoStatement
addAntecedent(postStatementLabel, currentFlow);
currentFlow = finishFlowLabel(postStatementLabel);
}
}
function bindDestructuringTargetFlow(node) {
- if (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) {
+ if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) {
bindAssignmentTargetFlow(node.left);
}
else {
@@ -21445,10 +22377,10 @@ var ts;
if (isNarrowableReference(node)) {
currentFlow = createFlowAssignment(currentFlow, node);
}
- else if (node.kind === 175 /* ArrayLiteralExpression */) {
+ else if (node.kind === 176 /* ArrayLiteralExpression */) {
for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
var e = _a[_i];
- if (e.kind === 196 /* SpreadElement */) {
+ if (e.kind === 197 /* SpreadElement */) {
bindAssignmentTargetFlow(e.expression);
}
else {
@@ -21456,16 +22388,16 @@ var ts;
}
}
}
- else if (node.kind === 176 /* ObjectLiteralExpression */) {
+ else if (node.kind === 177 /* ObjectLiteralExpression */) {
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
var p = _c[_b];
- if (p.kind === 257 /* PropertyAssignment */) {
+ if (p.kind === 260 /* PropertyAssignment */) {
bindDestructuringTargetFlow(p.initializer);
}
- else if (p.kind === 258 /* ShorthandPropertyAssignment */) {
+ else if (p.kind === 261 /* ShorthandPropertyAssignment */) {
bindAssignmentTargetFlow(p.name);
}
- else if (p.kind === 259 /* SpreadAssignment */) {
+ else if (p.kind === 262 /* SpreadAssignment */) {
bindAssignmentTargetFlow(p.expression);
}
}
@@ -21521,7 +22453,7 @@ var ts;
bindEachChild(node);
if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
bindAssignmentTargetFlow(node.left);
- if (operator === 57 /* EqualsToken */ && node.left.kind === 178 /* ElementAccessExpression */) {
+ if (operator === 57 /* EqualsToken */ && node.left.kind === 179 /* ElementAccessExpression */) {
var elementAccess = node.left;
if (isNarrowableOperand(elementAccess.expression)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -21532,7 +22464,7 @@ var ts;
}
function bindDeleteExpressionFlow(node) {
bindEachChild(node);
- if (node.expression.kind === 177 /* PropertyAccessExpression */) {
+ if (node.expression.kind === 178 /* PropertyAccessExpression */) {
bindAssignmentTargetFlow(node.expression);
}
}
@@ -21565,19 +22497,37 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 212 /* ForInStatement */ || node.parent.parent.kind === 213 /* ForOfStatement */) {
+ if (node.initializer || node.parent.parent.kind === 214 /* ForInStatement */ || node.parent.parent.kind === 215 /* ForOfStatement */) {
bindInitializedVariableFlow(node);
}
}
+ function bindJSDocComment(node) {
+ ts.forEachChild(node, function (n) {
+ if (n.kind !== 289 /* JSDocTypedefTag */) {
+ bind(n);
+ }
+ });
+ }
+ function bindJSDocTypedefTag(node) {
+ ts.forEachChild(node, function (n) {
+ // if the node has a fullName "A.B.C", that means symbol "C" was already bound
+ // when we visit "fullName"; so when we visit the name "C" as the next child of
+ // the jsDocTypedefTag, we should skip binding it.
+ if (node.fullName && n === node.name && node.fullName.kind !== 70 /* Identifier */) {
+ return;
+ }
+ bind(n);
+ });
+ }
function bindCallExpressionFlow(node) {
// If the target of the call expression is a function expression or arrow function we have
// an immediately invoked function expression (IIFE). Initialize the flowNode property to
// the current control flow (which includes evaluation of the IIFE arguments).
var expr = node.expression;
- while (expr.kind === 183 /* ParenthesizedExpression */) {
+ while (expr.kind === 184 /* ParenthesizedExpression */) {
expr = expr.expression;
}
- if (expr.kind === 184 /* FunctionExpression */ || expr.kind === 185 /* ArrowFunction */) {
+ if (expr.kind === 185 /* FunctionExpression */ || expr.kind === 186 /* ArrowFunction */) {
bindEach(node.typeArguments);
bindEach(node.arguments);
bind(node.expression);
@@ -21585,7 +22535,7 @@ var ts;
else {
bindEachChild(node);
}
- if (node.expression.kind === 177 /* PropertyAccessExpression */) {
+ if (node.expression.kind === 178 /* PropertyAccessExpression */) {
var propertyAccess = node.expression;
if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -21594,52 +22544,54 @@ var ts;
}
function getContainerFlags(node) {
switch (node.kind) {
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 161 /* TypeLiteral */:
- case 287 /* JSDocTypeLiteral */:
- case 270 /* JSDocRecordType */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 162 /* TypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
+ case 274 /* JSDocRecordType */:
+ case 253 /* JsxAttributes */:
return 1 /* IsContainer */;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return 1 /* IsContainer */ | 64 /* IsInterface */;
- case 274 /* JSDocFunctionType */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 170 /* MappedType */:
+ case 278 /* JSDocFunctionType */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 171 /* MappedType */:
return 1 /* IsContainer */ | 32 /* HasLocals */;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethod */;
}
- case 150 /* Constructor */:
- case 225 /* FunctionDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ // falls through
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return 4 /* IsControlFlowContainer */;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
- case 256 /* CatchClause */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 232 /* CaseBlock */:
+ case 259 /* CatchClause */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 234 /* CaseBlock */:
return 2 /* IsBlockScopedContainer */;
- case 204 /* Block */:
+ case 206 /* Block */:
// do not treat blocks directly inside a function as a block-scoped-container.
// Locals that reside in this block should go to the function locals. Otherwise 'x'
// would not appear to be a redeclaration of a block scoped local in the following
@@ -21676,42 +22628,43 @@ var ts;
// members are declared (for example, a member of a class will go into a specific
// symbol table depending on if it is static or not). We defer to specialized
// handlers to take care of declaring these child members.
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return declareModuleMember(node, symbolFlags, symbolExcludes);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
return declareClassMember(node, symbolFlags, symbolExcludes);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
- case 161 /* TypeLiteral */:
- case 176 /* ObjectLiteralExpression */:
- case 227 /* InterfaceDeclaration */:
- case 270 /* JSDocRecordType */:
- case 287 /* JSDocTypeLiteral */:
+ case 162 /* TypeLiteral */:
+ case 177 /* ObjectLiteralExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 274 /* JSDocRecordType */:
+ case 291 /* JSDocTypeLiteral */:
+ case 253 /* JsxAttributes */:
// Interface/Object-types always have their children added to the 'members' of
// their container. They are only accessible through an instance of their
// container, and are never in scope otherwise (even inside the body of the
// object / type / interface declaring them). An exception is type parameters,
// which are in scope without qualification (similar to 'locals').
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 274 /* JSDocFunctionType */:
- case 228 /* TypeAliasDeclaration */:
- case 170 /* MappedType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 278 /* JSDocFunctionType */:
+ case 230 /* TypeAliasDeclaration */:
+ case 171 /* MappedType */:
// All the children of these container types are never visible through another
// symbol (i.e. through another symbol's 'exports' or 'members'). Instead,
// they're only accessed 'lexically' (i.e. from code that exists underneath
@@ -21729,14 +22682,14 @@ var ts;
function declareSourceFileMember(node, symbolFlags, symbolExcludes) {
return ts.isExternalModule(file)
? declareModuleMember(node, symbolFlags, symbolExcludes)
- : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes);
+ : declareSymbol(file.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
function hasExportDeclarations(node) {
- var body = node.kind === 261 /* SourceFile */ ? node : node.body;
- if (body && (body.kind === 261 /* SourceFile */ || body.kind === 231 /* ModuleBlock */)) {
+ var body = node.kind === 264 /* SourceFile */ ? node : node.body;
+ if (body && (body.kind === 264 /* SourceFile */ || body.kind === 233 /* ModuleBlock */)) {
for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
var stat = _a[_i];
- if (stat.kind === 241 /* ExportDeclaration */ || stat.kind === 240 /* ExportAssignment */) {
+ if (stat.kind === 243 /* ExportDeclaration */ || stat.kind === 242 /* ExportAssignment */) {
return true;
}
}
@@ -21760,7 +22713,7 @@ var ts;
errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
}
if (ts.isExternalModuleAugmentation(node)) {
- declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */);
+ declareModuleSymbol(node);
}
else {
var pattern = void 0;
@@ -21780,12 +22733,8 @@ var ts;
}
}
else {
- var state = getModuleInstanceState(node);
- if (state === 0 /* NonInstantiated */) {
- declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */);
- }
- else {
- declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */);
+ var state = declareModuleSymbol(node);
+ if (state !== 0 /* NonInstantiated */) {
if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) {
// if module was already merged with some function, class or non-const enum
// treat is a non-const-enum-only
@@ -21805,6 +22754,12 @@ var ts;
}
}
}
+ function declareModuleSymbol(node) {
+ var state = getModuleInstanceState(node);
+ var instantiated = state !== 0 /* NonInstantiated */;
+ declareSymbolAndAddToSymbolTable(node, instantiated ? 512 /* ValueModule */ : 1024 /* NamespaceModule */, instantiated ? 106639 /* ValueModuleExcludes */ : 0 /* NamespaceModuleExcludes */);
+ return state;
+ }
function bindFunctionOrConstructorType(node) {
// For a given function symbol "<...>(...) => T" we want to generate a symbol identical
// to the one we would get for: { <...>(...): T }
@@ -21817,7 +22772,7 @@ var ts;
var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type");
addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */);
typeLiteralSymbol.members = ts.createMap();
- typeLiteralSymbol.members[symbol.name] = symbol;
+ typeLiteralSymbol.members.set(symbol.name, symbol);
}
function bindObjectLiteralExpression(node) {
var ElementKind;
@@ -21829,7 +22784,7 @@ var ts;
var seen = ts.createMap();
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) {
+ if (prop.kind === 262 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) {
continue;
}
var identifier = prop.name;
@@ -21841,12 +22796,12 @@ var ts;
// c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
// d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
// and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
- var currentKind = prop.kind === 257 /* PropertyAssignment */ || prop.kind === 258 /* ShorthandPropertyAssignment */ || prop.kind === 149 /* MethodDeclaration */
+ var currentKind = prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */ || prop.kind === 150 /* MethodDeclaration */
? 1 /* Property */
: 2 /* Accessor */;
- var existingKind = seen[identifier.text];
+ var existingKind = seen.get(identifier.text);
if (!existingKind) {
- seen[identifier.text] = currentKind;
+ seen.set(identifier.text, currentKind);
continue;
}
if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) {
@@ -21857,27 +22812,33 @@ var ts;
}
return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object");
}
+ function bindJsxAttributes(node) {
+ return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__jsxAttributes");
+ }
+ function bindJsxAttribute(node, symbolFlags, symbolExcludes) {
+ return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
+ }
function bindAnonymousDeclaration(node, symbolFlags, name) {
var symbol = createSymbol(symbolFlags, name);
addDeclarationToSymbol(symbol, node, symbolFlags);
}
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
switch (blockScopeContainer.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (ts.isExternalModule(container)) {
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
}
- // fall through.
+ // falls through
default:
if (!blockScopeContainer.locals) {
blockScopeContainer.locals = ts.createMap();
addToContainerChain(blockScopeContainer);
}
- declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes);
+ declareSymbol(blockScopeContainer.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
function bindBlockScopedVariableDeclaration(node) {
@@ -21977,8 +22938,8 @@ var ts;
function checkStrictModeFunctionDeclaration(node) {
if (languageVersion < 2 /* ES2015 */) {
// Report error if function is not top level function declaration
- if (blockScopeContainer.kind !== 261 /* SourceFile */ &&
- blockScopeContainer.kind !== 230 /* ModuleDeclaration */ &&
+ if (blockScopeContainer.kind !== 264 /* SourceFile */ &&
+ blockScopeContainer.kind !== 232 /* ModuleDeclaration */ &&
!ts.isFunctionLike(blockScopeContainer)) {
// We check first if the name is inside class declaration or class expression; if so give explicit message
// otherwise report generic error message.
@@ -21988,7 +22949,7 @@ var ts;
}
}
function checkStrictModeNumericLiteral(node) {
- if (inStrictMode && node.isOctalLiteral) {
+ if (inStrictMode && node.numericLiteralFlags & 4 /* Octal */) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
}
}
@@ -22028,6 +22989,18 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
+ // Even though in the AST the jsdoc @typedef node belongs to the current node,
+ // its symbol might be in the same scope with the current node's symbol. Consider:
+ //
+ // /** @typedef {string | number} MyType */
+ // function foo();
+ //
+ // Here the current node is "foo", which is a container, but the scope of "MyType" should
+ // not be inside "foo". Therefore we always bind @typedef before bind the parent node,
+ // and skip binding this tag later when binding all the other jsdoc tags.
+ if (ts.isInJavaScriptFile(node)) {
+ bindJSDocTypedefTagIfAny(node);
+ }
// First we bind declaration nodes to a symbol if possible. We'll both create a symbol
// and then potentially add the symbol to an appropriate symbol table. Possible
// destination symbol tables are:
@@ -22044,7 +23017,7 @@ var ts;
// the current 'container' node when it changes. This helps us know which symbol table
// a local should go into for example. Since terminal nodes are known not to have
// children, as an optimization we don't process those.
- if (node.kind > 140 /* LastToken */) {
+ if (node.kind > 141 /* LastToken */) {
var saveParent = parent;
parent = node;
var containerFlags = getContainerFlags(node);
@@ -22061,6 +23034,26 @@ var ts;
}
inStrictMode = saveInStrictMode;
}
+ function bindJSDocTypedefTagIfAny(node) {
+ if (!node.jsDoc) {
+ return;
+ }
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var jsDoc = _a[_i];
+ if (!jsDoc.tags) {
+ continue;
+ }
+ for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
+ var tag = _c[_b];
+ if (tag.kind === 289 /* JSDocTypedefTag */) {
+ var savedParent = parent;
+ parent = jsDoc;
+ bind(tag);
+ parent = savedParent;
+ }
+ }
+ }
+ }
function updateStrictModeStatementList(statements) {
if (!inStrictMode) {
for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
@@ -22091,91 +23084,90 @@ var ts;
// current "blockScopeContainer" needs to be set to its immediate namespace parent.
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 285 /* JSDocTypedefTag */) {
+ while (parentNode && parentNode.kind !== 289 /* JSDocTypedefTag */) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
break;
}
+ // falls through
case 98 /* ThisKeyword */:
- if (currentFlow && (ts.isExpression(node) || parent.kind === 258 /* ShorthandPropertyAssignment */)) {
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 261 /* ShorthandPropertyAssignment */)) {
node.flowNode = currentFlow;
}
return checkStrictModeIdentifier(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
if (currentFlow && isNarrowableReference(node)) {
node.flowNode = currentFlow;
}
break;
- case 192 /* BinaryExpression */:
- if (ts.isInJavaScriptFile(node)) {
- var specialKind = ts.getSpecialPropertyAssignmentKind(node);
- switch (specialKind) {
- case 1 /* ExportsProperty */:
- bindExportsPropertyAssignment(node);
- break;
- case 2 /* ModuleExports */:
- bindModuleExportsAssignment(node);
- break;
- case 3 /* PrototypeProperty */:
- bindPrototypePropertyAssignment(node);
- break;
- case 4 /* ThisProperty */:
- bindThisPropertyAssignment(node);
- break;
- case 0 /* None */:
- // Nothing to do
- break;
- default:
- ts.Debug.fail("Unknown special property assignment kind");
- }
+ case 193 /* BinaryExpression */:
+ var specialKind = ts.getSpecialPropertyAssignmentKind(node);
+ switch (specialKind) {
+ case 1 /* ExportsProperty */:
+ bindExportsPropertyAssignment(node);
+ break;
+ case 2 /* ModuleExports */:
+ bindModuleExportsAssignment(node);
+ break;
+ case 3 /* PrototypeProperty */:
+ bindPrototypePropertyAssignment(node);
+ break;
+ case 4 /* ThisProperty */:
+ bindThisPropertyAssignment(node);
+ break;
+ case 5 /* Property */:
+ bindStaticPropertyAssignment(node);
+ break;
+ case 0 /* None */:
+ // Nothing to do
+ break;
+ default:
+ ts.Debug.fail("Unknown special property assignment kind");
}
return checkStrictModeBinaryExpression(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return checkStrictModeCatchClause(node);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return checkStrictModeDeleteExpression(node);
case 8 /* NumericLiteral */:
return checkStrictModeNumericLiteral(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return checkStrictModePostfixUnaryExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return checkStrictModePrefixUnaryExpression(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return checkStrictModeWithStatement(node);
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
seenThisKeyword = true;
return;
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return checkTypePredicate(node);
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530920 /* TypeParameterExcludes */);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return bindParameter(node);
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- if (node.dotDotDotToken && node.parent.kind === 172 /* ObjectBindingPattern */) {
- emitFlags |= 32768 /* HasRestAttribute */;
- }
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
return bindVariableDeclarationOrBindingElement(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 271 /* JSDocRecordMember */:
- return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
- case 286 /* JSDocPropertyTag */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 275 /* JSDocRecordMember */:
+ return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ case 290 /* JSDocPropertyTag */:
return bindJSDocProperty(node);
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */);
- case 259 /* SpreadAssignment */:
- case 251 /* JsxSpreadAttribute */:
+ case 262 /* SpreadAssignment */:
+ case 254 /* JsxSpreadAttribute */:
var root = container;
var hasRest = false;
while (root.parent) {
- if (root.kind === 176 /* ObjectLiteralExpression */ &&
- root.parent.kind === 192 /* BinaryExpression */ &&
+ if (root.kind === 177 /* ObjectLiteralExpression */ &&
+ root.parent.kind === 193 /* BinaryExpression */ &&
root.parent.operatorToken.kind === 57 /* EqualsToken */ &&
root.parent.left === root) {
hasRest = true;
@@ -22183,88 +23175,92 @@ var ts;
}
root = root.parent;
}
- emitFlags |= hasRest ? 32768 /* HasRestAttribute */ : 16384 /* HasSpreadAttribute */;
return;
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
// If this is an ObjectLiteralExpression method, then it sits in the same space
// as other properties in the object literal. So we use SymbolFlags.PropertyExcludes
// so that it will conflict with any other object literal members with the same
// name.
- return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */);
- case 225 /* FunctionDeclaration */:
+ return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */);
+ case 227 /* FunctionDeclaration */:
return bindFunctionDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 278 /* JSDocFunctionType */:
return bindFunctionOrConstructorType(node);
- case 161 /* TypeLiteral */:
- case 170 /* MappedType */:
- case 287 /* JSDocTypeLiteral */:
- case 270 /* JSDocRecordType */:
+ case 162 /* TypeLiteral */:
+ case 171 /* MappedType */:
+ case 291 /* JSDocTypeLiteral */:
+ case 274 /* JSDocRecordType */:
return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return bindObjectLiteralExpression(node);
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return bindFunctionExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
if (ts.isInJavaScriptFile(node)) {
bindCallExpression(node);
}
break;
// Members of classes, interfaces, and modules
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
// All classes are automatically in strict mode in ES6.
inStrictMode = true;
return bindClassLikeDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
if (!node.fullName || node.fullName.kind === 70 /* Identifier */) {
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
}
break;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return bindEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return bindModuleDeclaration(node);
+ // Jsx-attributes
+ case 253 /* JsxAttributes */:
+ return bindJsxAttributes(node);
+ case 252 /* JsxAttribute */:
+ return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */);
// Imports and exports
- case 234 /* ImportEqualsDeclaration */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */);
- case 233 /* NamespaceExportDeclaration */:
+ case 235 /* NamespaceExportDeclaration */:
return bindNamespaceExportDeclaration(node);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return bindImportClause(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return bindExportDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return bindExportAssignment(node);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
updateStrictModeStatementList(node.statements);
return bindSourceFileIfExternalModule();
- case 204 /* Block */:
+ case 206 /* Block */:
if (!ts.isFunctionLike(node.parent)) {
return;
}
- // Fall through
- case 231 /* ModuleBlock */:
+ // falls through
+ case 233 /* ModuleBlock */:
return updateStrictModeStatementList(node.statements);
}
}
@@ -22273,7 +23269,7 @@ var ts;
if (parameterName && parameterName.kind === 70 /* Identifier */) {
checkStrictModeIdentifier(parameterName);
}
- if (parameterName && parameterName.kind === 167 /* ThisType */) {
+ if (parameterName && parameterName.kind === 168 /* ThisType */) {
seenThisKeyword = true;
}
bind(type);
@@ -22296,7 +23292,7 @@ var ts;
// An export default clause with an expression exports a value
// We want to exclude both class and function here, this is necessary to issue an error when there are both
// default export-assignment and default export function and class declaration.
- var flags = node.kind === 240 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node)
+ var flags = node.kind === 242 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node)
? 8388608 /* Alias */
: 4 /* Property */;
declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 /* Property */ | 8388608 /* AliasExcludes */ | 32 /* Class */ | 16 /* Function */);
@@ -22306,17 +23302,17 @@ var ts;
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
}
- if (node.parent.kind !== 261 /* SourceFile */) {
+ if (node.parent.kind !== 264 /* SourceFile */) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
- var parent_4 = node.parent;
- if (!ts.isExternalModule(parent_4)) {
+ var parent_1 = node.parent;
+ if (!ts.isExternalModule(parent_1)) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
- if (!parent_4.isDeclarationFile) {
+ if (!parent_1.isDeclarationFile) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
@@ -22327,11 +23323,11 @@ var ts;
function bindExportDeclaration(node) {
if (!container.symbol || !container.symbol.exports) {
// Export * in some sort of block construct
- bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node));
+ bindAnonymousDeclaration(node, 33554432 /* ExportStar */, getDeclarationName(node));
}
else if (!node.exportClause) {
// All export * declarations are collected in an __export symbol
- declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */);
+ declareSymbol(container.symbol.exports, container.symbol, node, 33554432 /* ExportStar */, 0 /* None */);
}
}
function bindImportClause(node) {
@@ -22353,30 +23349,67 @@ var ts;
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node.left, 4 /* Property */ | 7340032 /* Export */, 0 /* None */);
}
+ function isExportsOrModuleExportsOrAlias(node) {
+ return ts.isExportsIdentifier(node) ||
+ ts.isModuleExportsPropertyAccessExpression(node) ||
+ isNameOfExportsOrModuleExportsAliasDeclaration(node);
+ }
+ function isNameOfExportsOrModuleExportsAliasDeclaration(node) {
+ if (node.kind === 70 /* Identifier */) {
+ var symbol = lookupSymbolForName(node.text);
+ if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225 /* VariableDeclaration */) {
+ var declaration = symbol.valueDeclaration;
+ if (declaration.initializer) {
+ return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
+ }
+ }
+ }
+ return false;
+ }
+ function isExportsOrModuleExportsOrAliasOrAssignemnt(node) {
+ return isExportsOrModuleExportsOrAlias(node) ||
+ (ts.isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
+ }
function bindModuleExportsAssignment(node) {
+ // A common practice in node modules is to set 'export = module.exports = {}', this ensures that 'exports'
+ // is still pointing to 'module.exports'.
+ // We do not want to consider this as 'export=' since a module can have only one of these.
+ // Similarlly we do not want to treat 'module.exports = exports' as an 'export='.
+ var assignedExpression = ts.getRightMostAssignedExpression(node.right);
+ if (ts.isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
+ // Mark it as a module in case there are no other exports in the file
+ setCommonJsModuleIndicator(node);
+ return;
+ }
// 'module.exports = expr' assignment
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node, 4 /* Property */ | 7340032 /* Export */ | 512 /* ValueModule */, 0 /* None */);
}
function bindThisPropertyAssignment(node) {
ts.Debug.assert(ts.isInJavaScriptFile(node));
- // Declare a 'member' if the container is an ES5 class or ES6 constructor
- if (container.kind === 225 /* FunctionDeclaration */ || container.kind === 184 /* FunctionExpression */) {
- container.symbol.members = container.symbol.members || ts.createMap();
- // It's acceptable for multiple 'this' assignments of the same identifier to occur
- declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */);
- }
- else if (container.kind === 150 /* Constructor */) {
- // this.foo assignment in a JavaScript class
- // Bind this property to the containing class
- var saveContainer = container;
- container = container.parent;
- var symbol = bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* None */);
- if (symbol) {
- // constructor-declared symbols can be overwritten by subsequent method declarations
- symbol.isReplaceableByMethod = true;
- }
- container = saveContainer;
+ var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
+ switch (container.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ // Declare a 'member' if the container is an ES5 class or ES6 constructor
+ container.symbol.members = container.symbol.members || ts.createMap();
+ // It's acceptable for multiple 'this' assignments of the same identifier to occur
+ declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */);
+ break;
+ case 151 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ // this.foo assignment in a JavaScript class
+ // Bind this property to the containing class
+ var containingClass = container.parent;
+ var symbol = declareSymbol(ts.hasModifier(container, 32 /* Static */) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4 /* Property */, 0 /* None */);
+ if (symbol) {
+ // symbols declared through 'this' property assignements can be overwritten by subsequent method declarations
+ symbol.isReplaceableByMethod = true;
+ }
+ break;
}
}
function bindPrototypePropertyAssignment(node) {
@@ -22390,16 +23423,44 @@ var ts;
leftSideOfAssignment.parent = node;
constructorFunction.parent = classPrototype;
classPrototype.parent = leftSideOfAssignment;
- var funcSymbol = container.locals[constructorFunction.text];
- if (!funcSymbol || !(funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ bindPropertyAssignment(constructorFunction.text, leftSideOfAssignment, /*isPrototypeProperty*/ true);
+ }
+ function bindStaticPropertyAssignment(node) {
+ // We saw a node of the form 'x.y = z'. Declare a 'member' y on x if x was a function.
+ // Look up the function in the local scope, since prototype assignments should
+ // follow the function declaration
+ var leftSideOfAssignment = node.left;
+ var target = leftSideOfAssignment.expression;
+ // Fix up parent pointers since we're going to use these nodes before we bind into them
+ leftSideOfAssignment.parent = node;
+ target.parent = leftSideOfAssignment;
+ if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
+ // This can be an alias for the 'exports' or 'module.exports' names, e.g.
+ // var util = module.exports;
+ // util.property = function ...
+ bindExportsPropertyAssignment(node);
+ }
+ else {
+ bindPropertyAssignment(target.text, leftSideOfAssignment, /*isPrototypeProperty*/ false);
+ }
+ }
+ function lookupSymbolForName(name) {
+ return (container.symbol && container.symbol.exports && container.symbol.exports.get(name)) || (container.locals && container.locals.get(name));
+ }
+ function bindPropertyAssignment(functionName, propertyAccessExpression, isPrototypeProperty) {
+ var targetSymbol = lookupSymbolForName(functionName);
+ if (targetSymbol && ts.isDeclarationOfFunctionOrClassExpression(targetSymbol)) {
+ targetSymbol = targetSymbol.valueDeclaration.initializer.symbol;
+ }
+ if (!targetSymbol || !(targetSymbol.flags & (16 /* Function */ | 32 /* Class */))) {
return;
}
// Set up the members collection if it doesn't exist already
- if (!funcSymbol.members) {
- funcSymbol.members = ts.createMap();
- }
+ var symbolTable = isPrototypeProperty ?
+ (targetSymbol.members || (targetSymbol.members = ts.createMap())) :
+ (targetSymbol.exports || (targetSymbol.exports = ts.createMap()));
// Declare the method/property
- declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4 /* Property */, 0 /* PropertyExcludes */);
+ declareSymbol(symbolTable, targetSymbol, propertyAccessExpression, 4 /* Property */, 0 /* PropertyExcludes */);
}
function bindCallExpression(node) {
// We're only inspecting call expressions to detect CommonJS modules, so we can skip
@@ -22409,15 +23470,7 @@ var ts;
}
}
function bindClassLikeDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) {
- emitFlags |= 1024 /* HasClassExtends */;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048 /* HasDecorators */;
- }
- }
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */);
}
else {
@@ -22425,7 +23478,7 @@ var ts;
bindAnonymousDeclaration(node, 32 /* Class */, bindingName);
// Add name of class expression into the map for semantic classifier
if (node.name) {
- classifiableNames[node.name.text] = node.name.text;
+ classifiableNames.set(node.name.text, node.name.text);
}
}
var symbol = node.symbol;
@@ -22438,14 +23491,15 @@ var ts;
// Note: we check for this here because this class may be merging into a module. The
// module might have an exported variable called 'prototype'. We can't allow that as
// that would clash with the built-in 'prototype' for the class.
- var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype");
- if (symbol.exports[prototypeSymbol.name]) {
+ var prototypeSymbol = createSymbol(4 /* Property */ | 16777216 /* Prototype */, "prototype");
+ var symbolExport = symbol.exports.get(prototypeSymbol.name);
+ if (symbolExport) {
if (node.name) {
node.name.parent = node;
}
- file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
}
- symbol.exports[prototypeSymbol.name] = prototypeSymbol;
+ symbol.exports.set(prototypeSymbol.name, prototypeSymbol);
prototypeSymbol.parent = symbol;
}
function bindEnumDeclaration(node) {
@@ -22479,11 +23533,6 @@ var ts;
}
}
function bindParameter(node) {
- if (!ts.isDeclarationFile(file) &&
- !ts.isInAmbientContext(node) &&
- ts.nodeIsDecorated(node)) {
- emitFlags |= (2048 /* HasDecorators */ | 4096 /* HasParamDecorators */);
- }
if (inStrictMode) {
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
// strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
@@ -22499,13 +23548,13 @@ var ts;
// containing class.
if (ts.isParameterPropertyDeclaration(node)) {
var classDeclaration = node.parent.parent;
- declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
}
}
function bindFunctionDeclaration(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
checkStrictModeFunctionName(node);
@@ -22519,8 +23568,8 @@ var ts;
}
function bindFunctionExpression(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
if (currentFlow) {
@@ -22532,11 +23581,8 @@ var ts;
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048 /* HasDecorators */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
@@ -22561,13 +23607,13 @@ var ts;
if (currentFlow === unreachableFlow) {
var reportError =
// report error on all statements except empty ones
- (ts.isStatementButNotDeclaration(node) && node.kind !== 206 /* EmptyStatement */) ||
+ (ts.isStatementButNotDeclaration(node) && node.kind !== 208 /* EmptyStatement */) ||
// report error on class declarations
- node.kind === 226 /* ClassDeclaration */ ||
+ node.kind === 228 /* ClassDeclaration */ ||
// report error on instantiated modules or const-enums only modules if preserveConstEnums is set
- (node.kind === 230 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) ||
+ (node.kind === 232 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) ||
// report error on regular enums and const enums if preserveConstEnums is set
- (node.kind === 229 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
+ (node.kind === 231 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
if (reportError) {
currentFlow = reportedUnreachableFlow;
// unreachable code is reported if
@@ -22581,7 +23627,7 @@ var ts;
// On the other side we do want to report errors on non-initialized 'lets' because of TDZ
var reportUnreachableCode = !options.allowUnreachableCode &&
!ts.isInAmbientContext(node) &&
- (node.kind !== 205 /* VariableStatement */ ||
+ (node.kind !== 207 /* VariableStatement */ ||
ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */ ||
ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; }));
if (reportUnreachableCode) {
@@ -22601,56 +23647,56 @@ var ts;
function computeTransformFlagsForNode(node, subtreeFlags) {
var kind = node.kind;
switch (kind) {
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return computeCallExpression(node, subtreeFlags);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return computeNewExpression(node, subtreeFlags);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return computeModuleDeclaration(node, subtreeFlags);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return computeParenthesizedExpression(node, subtreeFlags);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return computeBinaryExpression(node, subtreeFlags);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return computeExpressionStatement(node, subtreeFlags);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return computeParameter(node, subtreeFlags);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return computeArrowFunction(node, subtreeFlags);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return computeFunctionExpression(node, subtreeFlags);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return computeFunctionDeclaration(node, subtreeFlags);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return computeVariableDeclaration(node, subtreeFlags);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return computeVariableDeclarationList(node, subtreeFlags);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return computeVariableStatement(node, subtreeFlags);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return computeLabeledStatement(node, subtreeFlags);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return computeClassDeclaration(node, subtreeFlags);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return computeClassExpression(node, subtreeFlags);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return computeHeritageClause(node, subtreeFlags);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return computeCatchClause(node, subtreeFlags);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return computeExpressionWithTypeArguments(node, subtreeFlags);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return computeConstructor(node, subtreeFlags);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return computePropertyDeclaration(node, subtreeFlags);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return computeMethod(node, subtreeFlags);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return computeAccessor(node, subtreeFlags);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return computeImportEquals(node, subtreeFlags);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return computePropertyAccess(node, subtreeFlags);
default:
return computeOther(node, kind, subtreeFlags);
@@ -22677,8 +23723,8 @@ var ts;
switch (kind) {
case 96 /* SuperKeyword */:
return true;
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
var expression = node.expression;
var expressionKind = expression.kind;
return expressionKind === 96 /* SuperKeyword */;
@@ -22702,12 +23748,12 @@ var ts;
var transformFlags = subtreeFlags;
var operatorTokenKind = node.operatorToken.kind;
var leftKind = node.left.kind;
- if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ObjectLiteralExpression */) {
+ if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 177 /* ObjectLiteralExpression */) {
// Destructuring object assignments with are ES2015 syntax
// and possibly ESNext if they contain rest
transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */;
}
- else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 175 /* ArrayLiteralExpression */) {
+ else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ArrayLiteralExpression */) {
// Destructuring assignments are ES2015 syntax.
transformFlags |= 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */;
}
@@ -22757,8 +23803,8 @@ var ts;
// If the node is synthesized, it means the emitter put the parentheses there,
// not the user. If we didn't want them, the emitter would not have put them
// there.
- if (expressionKind === 200 /* AsExpression */
- || expressionKind === 182 /* TypeAssertionExpression */) {
+ if (expressionKind === 201 /* AsExpression */
+ || expressionKind === 183 /* TypeAssertionExpression */) {
transformFlags |= 3 /* AssertTypeScript */;
}
// If the expression of a ParenthesizedExpression is a destructuring assignment,
@@ -22883,10 +23929,9 @@ var ts;
}
// An async method declaration is ES2017 syntax.
if (ts.hasModifier(node, 256 /* Async */)) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
- // Currently, we only support generators that were originally async function bodies.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
@@ -22940,7 +23985,7 @@ var ts;
}
// An async function declaration is ES2017 syntax.
if (modifierFlags & 256 /* Async */) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
// function declarations with object rest destructuring are ES Next syntax
if (subtreeFlags & 1048576 /* ContainsObjectRest */) {
@@ -22957,7 +24002,7 @@ var ts;
// down-level generator.
// Currently we do not support transforming any other generator fucntions
// down level.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
}
@@ -22975,7 +24020,7 @@ var ts;
}
// An async function expression is ES2017 syntax.
if (ts.hasModifier(node, 256 /* Async */)) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
// function expressions with object rest destructuring are ES Next syntax
if (subtreeFlags & 1048576 /* ContainsObjectRest */) {
@@ -22990,9 +24035,7 @@ var ts;
// If a FunctionExpression is generator function and is the body of a
// transformed async function, then this node can be transformed to a
// down-level generator.
- // Currently we do not support transforming any other generator fucntions
- // down level.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
@@ -23123,9 +24166,9 @@ var ts;
var excludeFlags = 536872257 /* NodeExcludes */;
switch (kind) {
case 119 /* AsyncKeyword */:
- case 189 /* AwaitExpression */:
- // async/await is ES2017 syntax
- transformFlags |= 16 /* AssertES2017 */;
+ case 190 /* AwaitExpression */:
+ // async/await is ES2017 syntax, but may be ESNext syntax (for async generators)
+ transformFlags |= 8 /* AssertESNext */ | 16 /* AssertES2017 */;
break;
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
@@ -23133,81 +24176,98 @@ var ts;
case 116 /* AbstractKeyword */:
case 123 /* DeclareKeyword */:
case 75 /* ConstKeyword */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
- case 201 /* NonNullExpression */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
+ case 202 /* NonNullExpression */:
case 130 /* ReadonlyKeyword */:
// These nodes are TypeScript syntax.
transformFlags |= 3 /* AssertTypeScript */;
break;
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
case 10 /* JsxText */:
- case 249 /* JsxClosingElement */:
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
- case 252 /* JsxExpression */:
+ case 251 /* JsxClosingElement */:
+ case 252 /* JsxAttribute */:
+ case 253 /* JsxAttributes */:
+ case 254 /* JsxSpreadAttribute */:
+ case 255 /* JsxExpression */:
// These nodes are Jsx syntax.
transformFlags |= 4 /* AssertJsx */;
break;
- case 213 /* ForOfStatement */:
- // for-of might be ESNext if it has a rest destructuring
- transformFlags |= 8 /* AssertESNext */;
- // FALLTHROUGH
case 12 /* NoSubstitutionTemplateLiteral */:
case 13 /* TemplateHead */:
case 14 /* TemplateMiddle */:
case 15 /* TemplateTail */:
- case 194 /* TemplateExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 195 /* TemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 261 /* ShorthandPropertyAssignment */:
case 114 /* StaticKeyword */:
+ case 203 /* MetaProperty */:
// These nodes are ES6 syntax.
transformFlags |= 192 /* AssertES2015 */;
break;
- case 195 /* YieldExpression */:
- // This node is ES6 syntax.
- transformFlags |= 192 /* AssertES2015 */ | 16777216 /* ContainsYield */;
+ case 9 /* StringLiteral */:
+ if (node.hasExtendedUnicodeEscape) {
+ transformFlags |= 192 /* AssertES2015 */;
+ }
+ break;
+ case 8 /* NumericLiteral */:
+ if (node.numericLiteralFlags & 48 /* BinaryOrOctalSpecifier */) {
+ transformFlags |= 192 /* AssertES2015 */;
+ }
+ break;
+ case 215 /* ForOfStatement */:
+ // This node is either ES2015 syntax or ES2017 syntax (if it is a for-await-of).
+ if (node.awaitModifier) {
+ transformFlags |= 8 /* AssertESNext */;
+ }
+ transformFlags |= 192 /* AssertES2015 */;
+ break;
+ case 196 /* YieldExpression */:
+ // This node is either ES2015 syntax (in a generator) or ES2017 syntax (in an async
+ // generator).
+ transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 16777216 /* ContainsYield */;
break;
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
- case 134 /* StringKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 135 /* StringKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 143 /* TypeParameter */:
- case 146 /* PropertySignature */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 156 /* TypePredicate */:
- case 157 /* TypeReference */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 160 /* TypeQuery */:
- case 161 /* TypeLiteral */:
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 167 /* ThisType */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 171 /* LiteralType */:
+ case 144 /* TypeParameter */:
+ case 147 /* PropertySignature */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 157 /* TypePredicate */:
+ case 158 /* TypeReference */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 161 /* TypeQuery */:
+ case 162 /* TypeLiteral */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 168 /* ThisType */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 172 /* LiteralType */:
// Types and signatures are TypeScript syntax, and exclude all other facts.
transformFlags = 3 /* AssertTypeScript */;
excludeFlags = -3 /* TypeExcludes */;
break;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
// Even though computed property names are ES6, we don't treat them as such.
// This is so that they can flow through PropertyName transforms unaffected.
// Instead, we mark the container as ES6, so that it can properly handle the transform.
@@ -23224,10 +24284,10 @@ var ts;
transformFlags |= 65536 /* ContainsLexicalThisInComputedPropertyName */;
}
break;
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
transformFlags |= 192 /* AssertES2015 */ | 524288 /* ContainsSpread */;
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectSpread */;
break;
case 96 /* SuperKeyword */:
@@ -23238,28 +24298,28 @@ var ts;
// Mark this node and its ancestors as containing a lexical `this` keyword.
transformFlags |= 16384 /* ContainsLexicalThis */;
break;
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */;
if (subtreeFlags & 524288 /* ContainsRest */) {
transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectRest */;
}
excludeFlags = 537396545 /* BindingPatternExcludes */;
break;
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */;
excludeFlags = 537396545 /* BindingPatternExcludes */;
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
transformFlags |= 192 /* AssertES2015 */;
if (node.dotDotDotToken) {
transformFlags |= 524288 /* ContainsRest */;
}
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// This node is TypeScript syntax, and marks its container as also being TypeScript syntax.
transformFlags |= 3 /* AssertTypeScript */ | 4096 /* ContainsDecorators */;
break;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
excludeFlags = 540087617 /* ObjectLiteralExcludes */;
if (subtreeFlags & 2097152 /* ContainsComputedPropertyName */) {
// If an ObjectLiteralExpression contains a ComputedPropertyName, then it
@@ -23277,8 +24337,8 @@ var ts;
transformFlags |= 8 /* AssertESNext */;
}
break;
- case 175 /* ArrayLiteralExpression */:
- case 180 /* NewExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 181 /* NewExpression */:
excludeFlags = 537396545 /* ArrayLiteralOrCallOrNewExcludes */;
if (subtreeFlags & 524288 /* ContainsSpread */) {
// If the this node contains a SpreadExpression, then it is an ES6
@@ -23286,23 +24346,23 @@ var ts;
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
// A loop containing a block scoped binding *may* need to be transformed from ES6.
if (subtreeFlags & 4194304 /* ContainsBlockScopedBinding */) {
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (subtreeFlags & 32768 /* ContainsCapturedLexicalThis */) {
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 216 /* ReturnStatement */:
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 218 /* ReturnStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
transformFlags |= 33554432 /* ContainsHoistedDeclarationOrCompletion */;
break;
}
@@ -23318,56 +24378,57 @@ var ts;
*/
/* @internal */
function getTransformFlagsSubtreeExclusions(kind) {
- if (kind >= 156 /* FirstTypeNode */ && kind <= 171 /* LastTypeNode */) {
+ if (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) {
return -3 /* TypeExcludes */;
}
switch (kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 175 /* ArrayLiteralExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 176 /* ArrayLiteralExpression */:
return 537396545 /* ArrayLiteralOrCallOrNewExcludes */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return 574674241 /* ModuleExcludes */;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return 536872257 /* ParameterExcludes */;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return 601249089 /* ArrowFunctionExcludes */;
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
return 601281857 /* FunctionExcludes */;
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return 546309441 /* VariableDeclarationListExcludes */;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return 539358529 /* ClassExcludes */;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return 601015617 /* ConstructorExcludes */;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return 601015617 /* MethodOrAccessorExcludes */;
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
+ case 133 /* ObjectKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 143 /* TypeParameter */:
- case 146 /* PropertySignature */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 144 /* TypeParameter */:
+ case 147 /* PropertySignature */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return -3 /* TypeExcludes */;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return 540087617 /* ObjectLiteralExcludes */;
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return 537920833 /* CatchClauseExcludes */;
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return 537396545 /* BindingPatternExcludes */;
default:
return 536872257 /* NodeExcludes */;
@@ -23406,10 +24467,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- /** Create Resolved from a file with unknown extension. */
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
/** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
@@ -23422,37 +24479,29 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ /** Reads from "main" or "types"/"typings" depending on `extensions`. */
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2 /* DtsOnly */:
- case 0 /* TypeScript */:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1 /* JavaScript */:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
+ }
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
}
+ return path;
}
}
function readJson(path, host) {
@@ -23488,13 +24537,15 @@ var ts;
function getDefaultTypeRoots(currentDirectory, host) {
if (!host.directoryExists) {
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
+ // And if it doesn't exist, tough.
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -23555,7 +24606,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2 /* DtsOnly */, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -23572,7 +24627,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2 /* DtsOnly */, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*cache*/ undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -23587,13 +24643,13 @@ var ts;
}
ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
/**
- * Given a set of options, returns the set of type directive names
- * that should be included for this program automatically.
- * This list could either come from the config file,
- * or from enumerating the types root + initial secondary types lookup location.
- * More type directives might appear in the program later as a result of loading actual source files;
- * this list is only the set of defaults that are implicitly included.
- */
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
function getAutomaticTypeDirectiveNames(options, host) {
// Use explicit type list from tsconfig.json
if (options.types) {
@@ -23625,31 +24681,135 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ /**
+ * At first this function add entry directory -> module resolution result to the table.
+ * Then it computes the set of parent folders for 'directory' that should have the same module resolution result
+ * and for every parent folder in set it adds entry: parent -> module resolution. .
+ * Lets say we first directory name: /a/b/c/d/e and resolution result is: /a/b/bar.ts.
+ * Set of parent folders that should have the same result will be:
+ * [
+ * /a/b/c/d, /a/b/c, /a/b
+ * ]
+ * this means that request for module resolution from file in any of these folder will be immediately found in cache.
+ */
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ // if entry is already in cache do nothing
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ // find common prefix between directory and resolved file name
+ // this common prefix should be the shorted path that has the same resolution
+ // directory: /a/b/c/d/e
+ // resolvedFileName: /a/b/foo.d.ts
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ // find first position where directory and resolution differs
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ // find last directory separator before position i
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ // put result in per-module name cache
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -23842,38 +25002,45 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, /*jsOnly*/ false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ /* @internal */
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0 /* TypeScript */) || tryResolve(1 /* JavaScript */);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state, /*considerPackageJson*/ true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -23884,12 +25051,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
+ }
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
/* @internal */
function directoryProbablyExists(directoryName, host) {
@@ -23928,11 +25118,11 @@ var ts;
}
}
switch (extensions) {
- case 2 /* DtsOnly */:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0 /* TypeScript */:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1 /* JavaScript */:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -23942,120 +25132,191 @@ var ts;
}
/** Return the file if it exists. */
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- // A package.json "typings" may specify an exact filename, or may choose to omit an extension.
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- // Note: this would allow a package.json to specify a ".js" file as typings. Maybe that should be forbidden.
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0 /* TypeScript */, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ // Even if extensions is DtsOnly, we can still look up a .ts file as a result of package.json "types"
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ // Don't do package.json lookup recursively, because Node.js' package lookup doesn't.
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ false);
+ }
+ /** Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension. */
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ /** True if `extension` is one of the supported `extensions`. */
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
// Extensions parameter here doesn't actually matter, because typesOnly ensures we're just doing @types lookup, which is always DtsOnly.
- return loadModuleFromNodeModulesWorker(2 /* DtsOnly */, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ true, /*cache*/ undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
/** Load a module from a single node_modules directory, but not from any ancestors' node_modules directories. */
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1 /* JavaScript */) {
- return loadModuleFromNodeModulesFolder(2 /* DtsOnly */, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
+ }
+ }
+ /** For a scoped package, we must look in `@types/foo__bar` instead of `@types/@foo/bar`. */
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1); // Take off the "@"
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0 /* TypeScript */) || tryResolve(1 /* JavaScript */);
- return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
// Climb up parent directories looking for a module.
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0 /* TypeScript */) {
+ if (extensions === Extensions.TypeScript) {
// If we didn't find the file normally, look it up in @types.
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state));
}
}
}
@@ -24072,10 +25333,17 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2 /* DtsOnly */, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ /**
+ * Wraps value to SearchResult.
+ * @returns undefined if value is undefined or { value } otherwise
+ */
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
/** Calls `callback` on `directory` and every ancestor directory it has, returning the first defined result. */
function forEachAncestorDirectory(directory, callback) {
while (true) {
@@ -24128,23 +25396,34 @@ var ts;
// is because diagnostics can be quite expensive, and we want to allow hosts to bail out if
// they no longer need the information (for example, if the user started editing again).
var cancellationToken;
+ var requestedExternalEmitHelpers;
+ var externalHelpersModule;
var Symbol = ts.objectAllocator.getSymbolConstructor();
var Type = ts.objectAllocator.getTypeConstructor();
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
var compilerOptions = host.getCompilerOptions();
- var languageVersion = compilerOptions.target || 0 /* ES3 */;
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var modulekind = ts.getEmitModuleKind(compilerOptions);
var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters;
var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System;
- var strictNullChecks = compilerOptions.strictNullChecks;
+ var strictNullChecks = compilerOptions.strictNullChecks === undefined ? compilerOptions.strict : compilerOptions.strictNullChecks;
+ var noImplicitAny = compilerOptions.noImplicitAny === undefined ? compilerOptions.strict : compilerOptions.noImplicitAny;
+ var noImplicitThis = compilerOptions.noImplicitThis === undefined ? compilerOptions.strict : compilerOptions.noImplicitThis;
var emitResolver = createResolver();
- var undefinedSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "undefined");
+ var nodeBuilder = createNodeBuilder();
+ var undefinedSymbol = createSymbol(4 /* Property */, "undefined");
undefinedSymbol.declarations = [];
- var argumentsSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "arguments");
+ var argumentsSymbol = createSymbol(4 /* Property */, "arguments");
+ // for public members that accept a Node or one of its subtypes, we must guard against
+ // synthetic nodes created during transformations by calling `getParseTreeNode`.
+ // for most of these, we perform the guard only on `checker` to avoid any possible
+ // extra cost of calling `getParseTreeNode` when calling these functions from inside the
+ // checker.
var checker = {
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
@@ -24153,49 +25432,129 @@ var ts;
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; },
+ getMergedSymbol: getMergedSymbol,
getDiagnostics: getDiagnostics,
getGlobalDiagnostics: getGlobalDiagnostics,
- getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
- getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration,
+ getTypeOfSymbolAtLocation: function (symbol, location) {
+ location = ts.getParseTreeNode(location);
+ return location ? getTypeOfSymbolAtLocation(symbol, location) : unknownType;
+ },
+ getSymbolsOfParameterPropertyDeclaration: function (parameter, parameterName) {
+ parameter = ts.getParseTreeNode(parameter, ts.isParameter);
+ ts.Debug.assert(parameter !== undefined, "Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.");
+ return getSymbolsOfParameterPropertyDeclaration(parameter, parameterName);
+ },
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
getPropertiesOfType: getPropertiesOfType,
getPropertyOfType: getPropertyOfType,
+ getIndexInfoOfType: getIndexInfoOfType,
getSignaturesOfType: getSignaturesOfType,
getIndexTypeOfType: getIndexTypeOfType,
getBaseTypes: getBaseTypes,
+ getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
+ getWidenedType: getWidenedType,
+ getTypeFromTypeNode: function (node) {
+ node = ts.getParseTreeNode(node, ts.isTypeNode);
+ return node ? getTypeFromTypeNode(node) : unknownType;
+ },
+ getParameterType: getTypeAtPosition,
getReturnTypeOfSignature: getReturnTypeOfSignature,
getNonNullableType: getNonNullableType,
- getSymbolsInScope: getSymbolsInScope,
- getSymbolAtLocation: getSymbolAtLocation,
- getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
- getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol,
- getTypeAtLocation: getTypeOfNode,
- getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment,
- typeToString: typeToString,
+ typeToTypeNode: nodeBuilder.typeToTypeNode,
+ indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
+ signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
+ getSymbolsInScope: function (location, meaning) {
+ location = ts.getParseTreeNode(location);
+ return location ? getSymbolsInScope(location, meaning) : [];
+ },
+ getSymbolAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getSymbolAtLocation(node) : undefined;
+ },
+ getShorthandAssignmentValueSymbol: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getShorthandAssignmentValueSymbol(node) : undefined;
+ },
+ getExportSpecifierLocalTargetSymbol: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExportSpecifier);
+ return node ? getExportSpecifierLocalTargetSymbol(node) : undefined;
+ },
+ getTypeAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getTypeOfNode(node) : unknownType;
+ },
+ getPropertySymbolOfDestructuringAssignment: function (location) {
+ location = ts.getParseTreeNode(location, ts.isIdentifier);
+ return location ? getPropertySymbolOfDestructuringAssignment(location) : undefined;
+ },
+ signatureToString: function (signature, enclosingDeclaration, flags, kind) {
+ return signatureToString(signature, ts.getParseTreeNode(enclosingDeclaration), flags, kind);
+ },
+ typeToString: function (type, enclosingDeclaration, flags) {
+ return typeToString(type, ts.getParseTreeNode(enclosingDeclaration), flags);
+ },
getSymbolDisplayBuilder: getSymbolDisplayBuilder,
- symbolToString: symbolToString,
+ symbolToString: function (symbol, enclosingDeclaration, meaning) {
+ return symbolToString(symbol, ts.getParseTreeNode(enclosingDeclaration), meaning);
+ },
getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
getRootSymbols: getRootSymbols,
- getContextualType: getContextualType,
+ getContextualType: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExpression);
+ return node ? getContextualType(node) : undefined;
+ },
getFullyQualifiedName: getFullyQualifiedName,
- getResolvedSignature: getResolvedSignature,
- getConstantValue: getConstantValue,
- isValidPropertyAccess: isValidPropertyAccess,
- getSignatureFromDeclaration: getSignatureFromDeclaration,
- isImplementationOfOverload: isImplementationOfOverload,
+ getResolvedSignature: function (node, candidatesOutArray) {
+ node = ts.getParseTreeNode(node, ts.isCallLikeExpression);
+ return node ? getResolvedSignature(node, candidatesOutArray) : undefined;
+ },
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
+ isValidPropertyAccess: function (node, propertyName) {
+ node = ts.getParseTreeNode(node, ts.isPropertyAccessOrQualifiedName);
+ return node ? isValidPropertyAccess(node, propertyName) : false;
+ },
+ getSignatureFromDeclaration: function (declaration) {
+ declaration = ts.getParseTreeNode(declaration, ts.isFunctionLike);
+ return declaration ? getSignatureFromDeclaration(declaration) : undefined;
+ },
+ isImplementationOfOverload: function (node) {
+ node = ts.getParseTreeNode(node, ts.isFunctionLike);
+ return node ? isImplementationOfOverload(node) : undefined;
+ },
+ getImmediateAliasedSymbol: function (symbol) {
+ ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here.");
+ var links = getSymbolLinks(symbol);
+ if (!links.immediateTarget) {
+ var node = getDeclarationOfAliasSymbol(symbol);
+ ts.Debug.assert(!!node);
+ links.immediateTarget = getTargetOfAliasDeclaration(node, /*dontRecursivelyResolve*/ true);
+ }
+ return links.immediateTarget;
+ },
getAliasedSymbol: resolveAlias,
getEmitResolver: getEmitResolver,
getExportsOfModule: getExportsOfModuleAsArray,
+ getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
getAmbientModules: getAmbientModules,
- getJsxElementAttributesType: getJsxElementAttributesType,
+ getAllAttributesTypeFromJsxOpeningLikeElement: function (node) {
+ node = ts.getParseTreeNode(node, ts.isJsxOpeningLikeElement);
+ return node ? getAllAttributesTypeFromJsxOpeningLikeElement(node) : undefined;
+ },
getJsxIntrinsicTagNames: getJsxIntrinsicTagNames,
- isOptionalParameter: isOptionalParameter,
+ isOptionalParameter: function (node) {
+ node = ts.getParseTreeNode(node, ts.isParameter);
+ return node ? isOptionalParameter(node) : false;
+ },
tryGetMemberInModuleExports: tryGetMemberInModuleExports,
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
// we deliberately exclude augmentations
// since we are only interested in declarations of the module itself
return tryFindAmbientModule(moduleName, /*withAugmentations*/ false);
- }
+ },
+ getApparentType: getApparentType
};
var tupleTypes = [];
var unionTypes = ts.createMap();
@@ -24204,8 +25563,8 @@ var ts;
var numericLiteralTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
- var unknownSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "unknown");
- var resolvingSymbol = createSymbol(67108864 /* Transient */, "__resolving__");
+ var unknownSymbol = createSymbol(4 /* Property */, "unknown");
+ var resolvingSymbol = createSymbol(0, "__resolving__");
var anyType = createIntrinsicType(1 /* Any */, "any");
var autoType = createIntrinsicType(1 /* Any */, "any");
var unknownType = createIntrinsicType(1 /* Any */, "unknown");
@@ -24222,8 +25581,9 @@ var ts;
var voidType = createIntrinsicType(1024 /* Void */, "void");
var neverType = createIntrinsicType(8192 /* Never */, "never");
var silentNeverType = createIntrinsicType(8192 /* Never */, "never");
+ var nonPrimitiveType = createIntrinsicType(16777216 /* NonPrimitive */, "object");
var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
- var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */ | 67108864 /* Transient */, "__type");
+ var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type");
emptyTypeLiteralSymbol.members = ts.createMap();
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -24233,21 +25593,20 @@ var ts;
// in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes.
anyFunctionType.flags |= 8388608 /* ContainsAnyFunctionType */;
var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
+ var circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true);
+ var jsObjectLiteralIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
var globals = ts.createMap();
/**
* List of every ambient module with a "*" wildcard.
* Unlike other ambient modules, these can't be stored in `globals` because symbol tables only deal with exact matches.
* This is only used if there is no exact match.
- */
+ */
var patternAmbientModules;
- var getGlobalESSymbolConstructorSymbol;
- var getGlobalPromiseConstructorSymbol;
- var tryGetGlobalPromiseConstructorSymbol;
var globalObjectType;
var globalFunctionType;
var globalArrayType;
@@ -24256,29 +25615,29 @@ var ts;
var globalNumberType;
var globalBooleanType;
var globalRegExpType;
+ var globalThisType;
var anyArrayType;
var autoArrayType;
var anyReadonlyArrayType;
// The library files are only loaded when the feature is used.
// This allows users to just specify library files they want to used through --lib
// and they will not get an error from not having unrelated library files
- var getGlobalTemplateStringsArrayType;
- var getGlobalESSymbolType;
- var getGlobalIterableType;
- var getGlobalIteratorType;
- var getGlobalIterableIteratorType;
- var getGlobalClassDecoratorType;
- var getGlobalParameterDecoratorType;
- var getGlobalPropertyDecoratorType;
- var getGlobalMethodDecoratorType;
- var getGlobalTypedPropertyDescriptorType;
- var getGlobalPromiseType;
- var tryGetGlobalPromiseType;
- var getGlobalPromiseLikeType;
- var getInstantiatedGlobalPromiseLikeType;
- var getGlobalPromiseConstructorLikeType;
- var getGlobalThenableType;
- var jsxElementClassType;
+ var deferredGlobalESSymbolConstructorSymbol;
+ var deferredGlobalESSymbolType;
+ var deferredGlobalTypedPropertyDescriptorType;
+ var deferredGlobalPromiseType;
+ var deferredGlobalPromiseConstructorSymbol;
+ var deferredGlobalPromiseConstructorLikeType;
+ var deferredGlobalIterableType;
+ var deferredGlobalIteratorType;
+ var deferredGlobalIterableIteratorType;
+ var deferredGlobalAsyncIterableType;
+ var deferredGlobalAsyncIteratorType;
+ var deferredGlobalAsyncIterableIteratorType;
+ var deferredGlobalTemplateStringsArrayType;
+ var deferredJsxElementClassType;
+ var deferredJsxElementType;
+ var deferredJsxStatelessElementType;
var deferredNodes;
var deferredUnusedIdentifierNodes;
var flowLoopStart = 0;
@@ -24299,6 +25658,7 @@ var ts;
var visitedFlowNodes = [];
var visitedFlowTypes = [];
var potentialThisCollisions = [];
+ var potentialNewTargetCollisions = [];
var awaitedTypeStack = [];
var diagnostics = ts.createDiagnosticCollection();
var TypeFacts;
@@ -24364,7 +25724,7 @@ var ts;
TypeFacts[TypeFacts["UndefinedFacts"] = 2457472] = "UndefinedFacts";
TypeFacts[TypeFacts["NullFacts"] = 2340752] = "NullFacts";
})(TypeFacts || (TypeFacts = {}));
- var typeofEQFacts = ts.createMap({
+ var typeofEQFacts = ts.createMapFromTemplate({
"string": 1 /* TypeofEQString */,
"number": 2 /* TypeofEQNumber */,
"boolean": 4 /* TypeofEQBoolean */,
@@ -24373,7 +25733,7 @@ var ts;
"object": 16 /* TypeofEQObject */,
"function": 32 /* TypeofEQFunction */
});
- var typeofNEFacts = ts.createMap({
+ var typeofNEFacts = ts.createMapFromTemplate({
"string": 128 /* TypeofNEString */,
"number": 256 /* TypeofNENumber */,
"boolean": 512 /* TypeofNEBoolean */,
@@ -24382,14 +25742,14 @@ var ts;
"object": 2048 /* TypeofNEObject */,
"function": 4096 /* TypeofNEFunction */
});
- var typeofTypesByName = ts.createMap({
+ var typeofTypesByName = ts.createMapFromTemplate({
"string": stringType,
"number": numberType,
"boolean": booleanType,
"symbol": esSymbolType,
"undefined": undefinedType
});
- var jsxElementType;
+ var typeofType = createTypeofType();
var _jsxNamespace;
var _jsxFactoryEntity;
/** Things we lazy load from the JSX namespace */
@@ -24417,8 +25777,14 @@ var ts;
TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType";
TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType";
})(TypeSystemPropertyName || (TypeSystemPropertyName = {}));
+ var CheckMode;
+ (function (CheckMode) {
+ CheckMode[CheckMode["Normal"] = 0] = "Normal";
+ CheckMode[CheckMode["SkipContextSensitive"] = 1] = "SkipContextSensitive";
+ CheckMode[CheckMode["Inferential"] = 2] = "Inferential";
+ })(CheckMode || (CheckMode = {}));
var builtinGlobals = ts.createMap();
- builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
+ builtinGlobals.set(undefinedSymbol.name, undefinedSymbol);
initializeTypeChecker();
return checker;
function getJsxNamespace() {
@@ -24450,7 +25816,12 @@ var ts;
}
function createSymbol(flags, name) {
symbolCount++;
- return new Symbol(flags, name);
+ var symbol = (new Symbol(flags | 134217728 /* Transient */, name));
+ symbol.checkFlags = 0;
+ return symbol;
+ }
+ function isTransientSymbol(symbol) {
+ return (symbol.flags & 134217728 /* Transient */) !== 0;
}
function getExcludedSymbolFlags(flags) {
var result = 0;
@@ -24496,7 +25867,7 @@ var ts;
mergedSymbols[source.mergeId] = target;
}
function cloneSymbol(symbol) {
- var result = createSymbol(symbol.flags | 33554432 /* Merged */, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
result.declarations = symbol.declarations.slice(0);
result.parent = symbol.parent;
if (symbol.valueDeclaration)
@@ -24519,13 +25890,11 @@ var ts;
target.flags |= source.flags;
if (source.valueDeclaration &&
(!target.valueDeclaration ||
- (target.valueDeclaration.kind === 230 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 230 /* ModuleDeclaration */))) {
+ (target.valueDeclaration.kind === 232 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 232 /* ModuleDeclaration */))) {
// other kinds of value declarations take precedence over modules
target.valueDeclaration = source.valueDeclaration;
}
- ts.forEach(source.declarations, function (node) {
- target.declarations.push(node);
- });
+ ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@@ -24538,6 +25907,9 @@ var ts;
}
recordMergedSymbol(target, source);
}
+ else if (target.flags & 1024 /* NamespaceModule */) {
+ error(source.valueDeclaration.name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ }
else {
var message_2 = target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
@@ -24550,18 +25922,19 @@ var ts;
}
}
function mergeSymbolTable(target, source) {
- for (var id in source) {
- var targetSymbol = target[id];
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
if (!targetSymbol) {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
else {
- if (!(targetSymbol.flags & 33554432 /* Merged */)) {
- target[id] = targetSymbol = cloneSymbol(targetSymbol);
+ if (!(targetSymbol.flags & 134217728 /* Transient */)) {
+ targetSymbol = cloneSymbol(targetSymbol);
+ target.set(id, targetSymbol);
}
- mergeSymbol(targetSymbol, source[id]);
+ mergeSymbol(targetSymbol, sourceSymbol);
}
- }
+ });
}
function mergeModuleAugmentation(moduleName) {
var moduleAugmentation = moduleName.parent;
@@ -24590,7 +25963,7 @@ var ts;
if (mainModule.flags & 1920 /* Namespace */) {
// if module symbol has already been merged - it is safe to use it.
// otherwise clone it
- mainModule = mainModule.flags & 33554432 /* Merged */ ? mainModule : cloneSymbol(mainModule);
+ mainModule = mainModule.flags & 134217728 /* Transient */ ? mainModule : cloneSymbol(mainModule);
mergeSymbol(mainModule, moduleAugmentation.symbol);
}
else {
@@ -24599,21 +25972,22 @@ var ts;
}
}
function addToSymbolTable(target, source, message) {
- for (var id in source) {
- if (target[id]) {
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
+ if (targetSymbol) {
// Error on redeclarations
- ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message));
+ ts.forEach(targetSymbol.declarations, addDeclarationDiagnostic(id, message));
}
else {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
- }
+ });
function addDeclarationDiagnostic(id, message) {
return function (declaration) { return diagnostics.add(ts.createDiagnosticForNode(declaration, message, id)); };
}
}
function getSymbolLinks(symbol) {
- if (symbol.flags & 67108864 /* Transient */)
+ if (symbol.flags & 134217728 /* Transient */)
return symbol;
var id = getSymbolId(symbol);
return symbolLinks[id] || (symbolLinks[id] = {});
@@ -24625,14 +25999,17 @@ var ts;
function getObjectFlags(type) {
return type.flags & 32768 /* Object */ ? type.objectFlags : 0;
}
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0;
+ }
function isGlobalSourceFile(node) {
- return node.kind === 261 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
+ return node.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
}
function getSymbol(symbols, name, meaning) {
if (meaning) {
- var symbol = symbols[name];
+ var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -24669,12 +26046,12 @@ var ts;
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
(!compilerOptions.outFile && !compilerOptions.out)) {
- // nodes are in different files and order cannot be determines
+ // nodes are in different files and order cannot be determined
return true;
}
// declaration is after usage
// can be legal if usage is deferred (i.e. inside function or in initializer of instance property)
- if (isUsedInFunctionOrNonStaticProperty(usage)) {
+ if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
return true;
}
var sourceFiles = host.getSourceFiles();
@@ -24682,20 +26059,41 @@ var ts;
}
if (declaration.pos <= usage.pos) {
// declaration is before usage
- // still might be illegal if usage is in the initializer of the variable declaration
- return declaration.kind !== 223 /* VariableDeclaration */ ||
- !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ if (declaration.kind === 175 /* BindingElement */) {
+ // still might be illegal if declaration and usage are both binding elements (eg var [a = b, b = b] = [1, 2])
+ var errorBindingElement = ts.getAncestor(usage, 175 /* BindingElement */);
+ if (errorBindingElement) {
+ return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
+ declaration.pos < errorBindingElement.pos;
+ }
+ // or it might be illegal if usage happens before parent variable is declared (eg var [a] = a)
+ return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225 /* VariableDeclaration */), usage);
+ }
+ else if (declaration.kind === 225 /* VariableDeclaration */) {
+ // still might be illegal if usage is in the initializer of the variable declaration (eg var a = a)
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ }
+ return true;
+ }
+ // declaration is after usage, but it can still be legal if usage is deferred:
+ // 1. inside an export specifier
+ // 2. inside a function
+ // 3. inside an instance property initializer, a reference to a non-instance property
+ // 4. inside a static property initializer, a reference to a static method in the same class
+ // or if usage is in a type context:
+ // 1. inside a type query (typeof in type position)
+ if (usage.parent.kind === 245 /* ExportSpecifier */) {
+ // export specifiers do not use the variable, they only make it available for use
+ return true;
}
- // declaration is after usage
- // can be legal if usage is deferred (i.e. inside function or in initializer of instance property)
var container = ts.getEnclosingBlockScopeContainer(declaration);
- return isUsedInFunctionOrNonStaticProperty(usage, container);
+ return isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container);
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
var container = ts.getEnclosingBlockScopeContainer(declaration);
switch (declaration.parent.parent.kind) {
- case 205 /* VariableStatement */:
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 207 /* VariableStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
// variable statement/for/for-of statement case,
// use site should not be inside variable declaration (initializer of declaration or binding element)
if (isSameScopeDescendentOf(usage, declaration, container)) {
@@ -24704,8 +26102,8 @@ var ts;
break;
}
switch (declaration.parent.parent.kind) {
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
// ForIn/ForOf case - use site should not be used in expression part
if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
return true;
@@ -24713,25 +26111,31 @@ var ts;
}
return false;
}
- function isUsedInFunctionOrNonStaticProperty(usage, container) {
- var current = usage;
- while (current) {
+ function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
+ return !!ts.findAncestor(usage, function (current) {
if (current === container) {
- return false;
+ return "quit";
}
if (ts.isFunctionLike(current)) {
return true;
}
- var initializerOfNonStaticProperty = current.parent &&
- current.parent.kind === 147 /* PropertyDeclaration */ &&
- (ts.getModifierFlags(current.parent) & 32 /* Static */) === 0 &&
+ var initializerOfProperty = current.parent &&
+ current.parent.kind === 148 /* PropertyDeclaration */ &&
current.parent.initializer === current;
- if (initializerOfNonStaticProperty) {
- return true;
+ if (initializerOfProperty) {
+ if (ts.getModifierFlags(current.parent) & 32 /* Static */) {
+ if (declaration.kind === 150 /* MethodDeclaration */) {
+ return true;
+ }
+ }
+ else {
+ var isDeclarationInstanceProperty = declaration.kind === 148 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */);
+ if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+ return true;
+ }
+ }
}
- current = current.parent;
- }
- return false;
+ });
}
}
// Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and
@@ -24756,11 +26160,11 @@ var ts;
// - parameters are only in the scope of function body
// This restriction does not apply to JSDoc comment types because they are parented
// at a higher level than type parameters would normally be
- if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 278 /* JSDocComment */) {
+ if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 282 /* JSDocComment */) {
useResult = result.flags & 262144 /* TypeParameter */
? lastLocation === location.type ||
- lastLocation.kind === 144 /* Parameter */ ||
- lastLocation.kind === 143 /* TypeParameter */
+ lastLocation.kind === 145 /* Parameter */ ||
+ lastLocation.kind === 144 /* TypeParameter */
: false;
}
if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) {
@@ -24769,9 +26173,9 @@ var ts;
// however it is detected separately when checking initializers of parameters
// to make sure that they reference no variables declared after them.
useResult =
- lastLocation.kind === 144 /* Parameter */ ||
+ lastLocation.kind === 145 /* Parameter */ ||
(lastLocation === location.type &&
- result.valueDeclaration.kind === 144 /* Parameter */);
+ result.valueDeclaration.kind === 145 /* Parameter */);
}
}
if (useResult) {
@@ -24783,16 +26187,17 @@ var ts;
}
}
switch (location.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (!ts.isExternalOrCommonJsModule(location))
break;
isInExternalModule = true;
- case 230 /* ModuleDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
var moduleExports = getSymbolOfNode(location).exports;
- if (location.kind === 261 /* SourceFile */ || ts.isAmbientModule(location)) {
+ if (location.kind === 264 /* SourceFile */ || ts.isAmbientModule(location)) {
// It's an external module. First see if the module has an export default and if the local
// name of that export default matches.
- if (result = moduleExports["default"]) {
+ if (result = moduleExports.get("default")) {
var localSymbol = ts.getLocalSymbolForExportDefault(result);
if (localSymbol && (result.flags & meaning) && localSymbol.name === name) {
break loop;
@@ -24810,9 +26215,10 @@ var ts;
// 2. We check === SymbolFlags.Alias in order to check that the symbol is *purely*
// an alias. If we used &, we'd be throwing out symbols that have non alias aspects,
// which is not the desired behavior.
- if (moduleExports[name] &&
- moduleExports[name].flags === 8388608 /* Alias */ &&
- ts.getDeclarationOfKind(moduleExports[name], 243 /* ExportSpecifier */)) {
+ var moduleExport = moduleExports.get(name);
+ if (moduleExport &&
+ moduleExport.flags === 8388608 /* Alias */ &&
+ ts.getDeclarationOfKind(moduleExport, 245 /* ExportSpecifier */)) {
break;
}
}
@@ -24820,13 +26226,13 @@ var ts;
break loop;
}
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
break loop;
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
// TypeScript 1.0 spec (April 2014): 8.4.1
// Initializer expressions for instance member variables are evaluated in the scope
// of the class constructor body but are not permitted to reference parameters or
@@ -24843,10 +26249,15 @@ var ts;
}
}
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
+ if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
+ // ignore type parameters not declared in this container
+ result = undefined;
+ break;
+ }
if (lastLocation && ts.getModifierFlags(lastLocation) & 32 /* Static */) {
// TypeScript 1.0 spec (April 2014): 3.4.1
// The scope of a type parameter extends over the entire declaration with which the type
@@ -24856,7 +26267,7 @@ var ts;
}
break loop;
}
- if (location.kind === 197 /* ClassExpression */ && meaning & 32 /* Class */) {
+ if (location.kind === 198 /* ClassExpression */ && meaning & 32 /* Class */) {
var className = location.name;
if (className && name === className.text) {
result = location.symbol;
@@ -24872,9 +26283,9 @@ var ts;
// [foo<T>()]() { } // <-- Reference to T from class's own computed property
// }
//
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
grandparent = location.parent.parent;
- if (ts.isClassLike(grandparent) || grandparent.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isClassLike(grandparent) || grandparent.kind === 229 /* InterfaceDeclaration */) {
// A reference to this grandparent's type parameters would be an error
if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
@@ -24882,19 +26293,19 @@ var ts;
}
}
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
if (meaning & 3 /* Variable */ && name === "arguments") {
result = argumentsSymbol;
break loop;
}
break;
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
if (meaning & 3 /* Variable */ && name === "arguments") {
result = argumentsSymbol;
break loop;
@@ -24907,7 +26318,7 @@ var ts;
}
}
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are resolved at the class declaration. Resolving at the parameter
// or member would result in looking up locals in the method.
//
@@ -24916,7 +26327,7 @@ var ts;
// method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
// }
//
- if (location.parent && location.parent.kind === 144 /* Parameter */) {
+ if (location.parent && location.parent.kind === 145 /* Parameter */) {
location = location.parent;
}
//
@@ -24945,7 +26356,8 @@ var ts;
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
!checkAndReportErrorForExtendingInterface(errorLocation) &&
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
- !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning)) {
+ !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
+ !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
}
}
@@ -24967,31 +26379,41 @@ var ts;
// interface bar {}
// }
// const foo/*1*/: foo/*2*/.bar;
- // The foo at /*1*/ and /*2*/ will share same symbol with two meaning
- // block - scope variable and namespace module. However, only when we
+ // The foo at /*1*/ and /*2*/ will share same symbol with two meanings:
+ // block-scoped variable and namespace module. However, only when we
// try to resolve name in /*1*/ which is used in variable position,
- // we want to check for block- scoped
- if (meaning & 2 /* BlockScopedVariable */) {
+ // we want to check for block-scoped
+ if (meaning & 2 /* BlockScopedVariable */ ||
+ ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */)) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
- if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */) {
+ if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
}
}
// If we're in an external module, we can't reference value symbols created from UMD export declarations
if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) {
var decls = result.declarations;
- if (decls && decls.length === 1 && decls[0].kind === 233 /* NamespaceExportDeclaration */) {
+ if (decls && decls.length === 1 && decls[0].kind === 235 /* NamespaceExportDeclaration */) {
error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name);
}
}
}
return result;
}
+ function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (decl.kind === 144 /* TypeParameter */ && decl.parent === container) {
+ return true;
+ }
+ }
+ return false;
+ }
function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {
if ((errorLocation.kind === 70 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) {
return false;
}
- var container = ts.getThisContainer(errorLocation, /* includeArrowFunctions */ true);
+ var container = ts.getThisContainer(errorLocation, /*includeArrowFunctions*/ true);
var location = container;
while (location) {
if (ts.isClassLike(location.parent)) {
@@ -25034,9 +26456,9 @@ var ts;
function getEntityNameForExtendingInterface(node) {
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
ts.Debug.assert(ts.isEntityNameExpression(node.expression));
return node.expression;
default:
@@ -25063,13 +26485,38 @@ var ts;
}
return false;
}
+ function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) {
+ if (meaning & (107455 /* Value */ & ~1024 /* NamespaceModule */ & ~793064 /* Type */)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~107455 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, name);
+ return true;
+ }
+ }
+ else if (meaning & (793064 /* Type */ & ~1024 /* NamespaceModule */ & ~107455 /* Value */)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~793064 /* Type */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, name);
+ return true;
+ }
+ }
+ return false;
+ }
function checkResolvedBlockScopedVariable(result, errorLocation) {
- ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0);
+ ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
// Block-scoped variables cannot be used before their definition
- var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
- ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
- if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 223 /* VariableDeclaration */), errorLocation)) {
- error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231 /* EnumDeclaration */) ? d : undefined; });
+ ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined");
+ if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
+ if (result.flags & 2 /* BlockScopedVariable */) {
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 32 /* Class */) {
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 384 /* Enum */) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
}
}
/* Starting from 'initial' node walk up the parent chain until 'stopAt' node is reached.
@@ -25077,56 +26524,50 @@ var ts;
* Return false if 'stopAt' node is reached or isFunctionLike(current) === true.
*/
function isSameScopeDescendentOf(initial, parent, stopAt) {
- if (!parent) {
- return false;
- }
- for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
- if (current === parent) {
- return true;
- }
- }
- return false;
+ return parent && !!ts.findAncestor(initial, function (n) { return n === stopAt || ts.isFunctionLike(n) ? "quit" : n === parent; });
}
function getAnyImportSyntax(node) {
if (ts.isAliasSymbolDeclaration(node)) {
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
- while (node && node.kind !== 235 /* ImportDeclaration */) {
- node = node.parent;
- }
- return node;
+ return ts.findAncestor(node, function (n) { return n.kind === 237 /* ImportDeclaration */; });
}
}
function getDeclarationOfAliasSymbol(symbol) {
- return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
+ return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
- function getTargetOfImportEqualsDeclaration(node) {
- if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {
+ if (node.moduleReference.kind === 247 /* ExternalModuleReference */) {
return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
}
- return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference);
+ return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);
}
- function getTargetOfImportClause(node) {
+ function getTargetOfImportClause(node, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
if (moduleSymbol) {
- var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ?
- moduleSymbol :
- moduleSymbol.exports["export="] ?
- getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
- resolveSymbol(moduleSymbol.exports["default"]);
+ var exportDefaultSymbol = void 0;
+ if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
+ exportDefaultSymbol = moduleSymbol;
+ }
+ else {
+ var exportValue = moduleSymbol.exports.get("export=");
+ exportDefaultSymbol = exportValue
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), "default")
+ : resolveSymbol(moduleSymbol.exports.get("default"), dontResolveAlias);
+ }
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
}
else if (!exportDefaultSymbol && allowSyntheticDefaultImports) {
- return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ return resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
return exportDefaultSymbol;
}
}
- function getTargetOfNamespaceImport(node) {
+ function getTargetOfNamespaceImport(node, dontResolveAlias) {
var moduleSpecifier = node.parent.parent.moduleSpecifier;
- return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
+ return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
// This function creates a synthetic symbol that combines the value side of one symbol with the
// type/namespace side of another symbol. Consider this example:
@@ -25161,12 +26602,9 @@ var ts;
result.exports = valueSymbol.exports;
return result;
}
- function getExportOfModule(symbol, name) {
+ function getExportOfModule(symbol, name, dontResolveAlias) {
if (symbol.flags & 1536 /* Module */) {
- var exportedSymbol = getExportsOfSymbol(symbol)[name];
- if (exportedSymbol) {
- return resolveSymbol(exportedSymbol);
- }
+ return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias);
}
}
function getPropertyOfVariable(symbol, name) {
@@ -25177,74 +26615,75 @@ var ts;
}
}
}
- function getExternalModuleMember(node, specifier) {
+ function getExternalModuleMember(node, specifier, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
- var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
+ var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier, dontResolveAlias);
if (targetSymbol) {
- var name_16 = specifier.propertyName || specifier.name;
- if (name_16.text) {
+ var name = specifier.propertyName || specifier.name;
+ if (name.text) {
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
return moduleSymbol;
}
var symbolFromVariable = void 0;
// First check if module was specified with "export=". If so, get the member from the resolved type
- if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) {
- symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_16.text);
+ if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=")) {
+ symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name.text);
}
else {
- symbolFromVariable = getPropertyOfVariable(targetSymbol, name_16.text);
+ symbolFromVariable = getPropertyOfVariable(targetSymbol, name.text);
}
// if symbolFromVariable is export - get its final target
- symbolFromVariable = resolveSymbol(symbolFromVariable);
- var symbolFromModule = getExportOfModule(targetSymbol, name_16.text);
+ symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
+ var symbolFromModule = getExportOfModule(targetSymbol, name.text, dontResolveAlias);
// If the export member we're looking for is default, and there is no real default but allowSyntheticDefaultImports is on, return the entire module as the default
- if (!symbolFromModule && allowSyntheticDefaultImports && name_16.text === "default") {
- symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.text === "default") {
+ symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
var symbol = symbolFromModule && symbolFromVariable ?
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
symbolFromModule || symbolFromVariable;
if (!symbol) {
- error(name_16, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_16));
+ error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name));
}
return symbol;
}
}
}
- function getTargetOfImportSpecifier(node) {
- return getExternalModuleMember(node.parent.parent.parent, node);
+ function getTargetOfImportSpecifier(node, dontResolveAlias) {
+ return getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias);
}
- function getTargetOfNamespaceExportDeclaration(node) {
- return resolveExternalModuleSymbol(node.parent.symbol);
+ function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
+ return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node) {
+ function getTargetOfExportSpecifier(node, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
- getExternalModuleMember(node.parent.parent, node) :
- resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */);
+ getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
+ resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
- function getTargetOfExportAssignment(node) {
- return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */);
+ function getTargetOfExportAssignment(node, dontResolveAlias) {
+ return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
- function getTargetOfAliasDeclaration(node) {
+ function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- return getTargetOfImportEqualsDeclaration(node);
- case 236 /* ImportClause */:
- return getTargetOfImportClause(node);
- case 237 /* NamespaceImport */:
- return getTargetOfNamespaceImport(node);
- case 239 /* ImportSpecifier */:
- return getTargetOfImportSpecifier(node);
- case 243 /* ExportSpecifier */:
- return getTargetOfExportSpecifier(node);
- case 240 /* ExportAssignment */:
- return getTargetOfExportAssignment(node);
- case 233 /* NamespaceExportDeclaration */:
- return getTargetOfNamespaceExportDeclaration(node);
- }
- }
- function resolveSymbol(symbol) {
- return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */)) ? resolveAlias(symbol) : symbol;
+ case 236 /* ImportEqualsDeclaration */:
+ return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
+ case 238 /* ImportClause */:
+ return getTargetOfImportClause(node, dontRecursivelyResolve);
+ case 239 /* NamespaceImport */:
+ return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
+ case 241 /* ImportSpecifier */:
+ return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
+ case 245 /* ExportSpecifier */:
+ return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ case 242 /* ExportAssignment */:
+ return getTargetOfExportAssignment(node, dontRecursivelyResolve);
+ case 235 /* NamespaceExportDeclaration */:
+ return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
+ }
+ }
+ function resolveSymbol(symbol, dontResolveAlias) {
+ var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */));
+ return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here.");
@@ -25286,11 +26725,11 @@ var ts;
links.referenced = true;
var node = getDeclarationOfAliasSymbol(symbol);
ts.Debug.assert(!!node);
- if (node.kind === 240 /* ExportAssignment */) {
+ if (node.kind === 242 /* ExportAssignment */) {
// export default <symbol>
checkExpressionCached(node.expression);
}
- else if (node.kind === 243 /* ExportSpecifier */) {
+ else if (node.kind === 245 /* ExportSpecifier */) {
// export { <symbol> } or export { <symbol> as foo }
checkExpressionCached(node.propertyName || node.name);
}
@@ -25312,20 +26751,22 @@ var ts;
entityName = entityName.parent;
}
// Check for case 1 and 3 in the above example
- if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 141 /* QualifiedName */) {
+ if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 142 /* QualifiedName */) {
return resolveEntityName(entityName, 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
else {
// Case 2 in above example
// entityName.kind could be a QualifiedName or a Missing identifier
- ts.Debug.assert(entityName.parent.kind === 234 /* ImportEqualsDeclaration */);
+ ts.Debug.assert(entityName.parent.kind === 236 /* ImportEqualsDeclaration */);
return resolveEntityName(entityName, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
}
function getFullyQualifiedName(symbol) {
return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol);
}
- // Resolves a qualified name and any involved aliases
+ /**
+ * Resolves a qualified name and any involved aliases.
+ */
function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias, location) {
if (ts.nodeIsMissing(name)) {
return undefined;
@@ -25338,9 +26779,23 @@ var ts;
return undefined;
}
}
- else if (name.kind === 141 /* QualifiedName */ || name.kind === 177 /* PropertyAccessExpression */) {
- var left = name.kind === 141 /* QualifiedName */ ? name.left : name.expression;
- var right = name.kind === 141 /* QualifiedName */ ? name.right : name.name;
+ else if (name.kind === 142 /* QualifiedName */ || name.kind === 178 /* PropertyAccessExpression */) {
+ var left = void 0;
+ if (name.kind === 142 /* QualifiedName */) {
+ left = name.left;
+ }
+ else if (name.kind === 178 /* PropertyAccessExpression */ &&
+ (name.expression.kind === 184 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) {
+ left = name.expression;
+ }
+ else {
+ // If the expression in property-access expression is not entity-name or parenthsizedExpression (e.g. it is a call expression), it won't be able to successfully resolve the name.
+ // This is the case when we are trying to do any language service operation in heritage clauses. By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression
+ // will attempt to checkPropertyAccessExpression to resolve symbol.
+ // i.e class C extends foo()./*do language service operation here*/B {}
+ return undefined;
+ }
+ var right = name.kind === 142 /* QualifiedName */ ? name.right : name.name;
var namespace = resolveEntityName(left, 1920 /* Namespace */, ignoreErrors, /*dontResolveAlias*/ false, location);
if (!namespace || ts.nodeIsMissing(right)) {
return undefined;
@@ -25356,10 +26811,19 @@ var ts;
return undefined;
}
}
+ else if (name.kind === 184 /* ParenthesizedExpression */) {
+ // If the expression in parenthesizedExpression is not an entity-name (e.g. it is a call expression), it won't be able to successfully resolve the name.
+ // This is the case when we are trying to do any language service operation in heritage clauses.
+ // By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression will attempt to checkPropertyAccessExpression to resolve symbol.
+ // i.e class C extends foo()./*do language service operation here*/B {}
+ return ts.isEntityNameExpression(name.expression) ?
+ resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) :
+ undefined;
+ }
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -25367,7 +26831,7 @@ var ts;
}
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) {
if (isForAugmentation === void 0) { isForAugmentation = false; }
- if (moduleReferenceExpression.kind !== 9 /* StringLiteral */) {
+ if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 12 /* NoSubstitutionTemplateLiteral */) {
return;
}
var moduleReferenceLiteral = moduleReferenceExpression;
@@ -25409,11 +26873,10 @@ var ts;
// May be an untyped module. If so, ignore resolutionDiagnostic.
if (!isRelative && resolvedModule && !ts.extensionIsTypeScript(resolvedModule.extension)) {
if (isForAugmentation) {
- ts.Debug.assert(!!moduleNotFoundError);
var diag = ts.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
- error(errorNode, diag, moduleName, resolvedModule.resolvedFileName);
+ error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
- else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
+ else if (noImplicitAny && moduleNotFoundError) {
error(errorNode, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
}
// Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first.
@@ -25439,30 +26902,38 @@ var ts;
}
// An external module with an 'export =' declaration resolves to the target of the 'export =' declaration,
// and an external module with no 'export =' declaration resolves to the module itself.
- function resolveExternalModuleSymbol(moduleSymbol) {
- return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol;
+ function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
+ return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports.get("export="), dontResolveAlias)) || moduleSymbol;
}
// An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export ='
// references a symbol that is at least declared as a module or a variable. The target of the 'export =' may
// combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable).
- function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
- var symbol = resolveExternalModuleSymbol(moduleSymbol);
- if (symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) {
+ function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression, dontResolveAlias) {
+ var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
+ if (!dontResolveAlias && symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) {
error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
symbol = undefined;
}
return symbol;
}
function hasExportAssignmentSymbol(moduleSymbol) {
- return moduleSymbol.exports["export="] !== undefined;
+ return moduleSymbol.exports.get("export=") !== undefined;
}
function getExportsOfModuleAsArray(moduleSymbol) {
return symbolsToArray(getExportsOfModule(moduleSymbol));
}
+ function getExportsAndPropertiesOfModule(moduleSymbol) {
+ var exports = getExportsOfModuleAsArray(moduleSymbol);
+ var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+ if (exportEquals !== moduleSymbol) {
+ ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+ }
+ return exports;
+ }
function tryGetMemberInModuleExports(memberName, moduleSymbol) {
var symbolTable = getExportsOfModule(moduleSymbol);
if (symbolTable) {
- return symbolTable[memberName];
+ return symbolTable.get(memberName);
}
}
function getExportsOfSymbol(symbol) {
@@ -25477,24 +26948,28 @@ var ts;
* Not passing `lookupTable` and `exportNode` disables this collection, and just extends the tables
*/
function extendExportSymbols(target, source, lookupTable, exportNode) {
- for (var id in source) {
- if (id !== "default" && !target[id]) {
- target[id] = source[id];
+ source && source.forEach(function (sourceSymbol, id) {
+ if (id === "default")
+ return;
+ var targetSymbol = target.get(id);
+ if (!targetSymbol) {
+ target.set(id, sourceSymbol);
if (lookupTable && exportNode) {
- lookupTable[id] = {
+ lookupTable.set(id, {
specifierText: ts.getTextOfNode(exportNode.moduleSpecifier)
- };
+ });
}
}
- else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
- if (!lookupTable[id].exportsWithDuplicate) {
- lookupTable[id].exportsWithDuplicate = [exportNode];
+ else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
+ var collisionTracker = lookupTable.get(id);
+ if (!collisionTracker.exportsWithDuplicate) {
+ collisionTracker.exportsWithDuplicate = [exportNode];
}
else {
- lookupTable[id].exportsWithDuplicate.push(exportNode);
+ collisionTracker.exportsWithDuplicate.push(exportNode);
}
}
- }
+ });
}
function getExportsForModule(moduleSymbol) {
var visitedSymbols = [];
@@ -25510,27 +26985,27 @@ var ts;
visitedSymbols.push(symbol);
var symbols = ts.cloneMap(symbol.exports);
// All export * declarations are collected in an __export symbol by the binder
- var exportStars = symbol.exports["__export"];
+ var exportStars = symbol.exports.get("__export");
if (exportStars) {
var nestedSymbols = ts.createMap();
- var lookupTable = ts.createMap();
+ var lookupTable_1 = ts.createMap();
for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
var node = _a[_i];
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
var exportedSymbols = visit(resolvedModule);
- extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node);
+ extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
}
- for (var id in lookupTable) {
- var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate;
+ lookupTable_1.forEach(function (_a, id) {
+ var exportsWithDuplicate = _a.exportsWithDuplicate;
// It's not an error if the file with multiple `export *`s with duplicate names exports a member with that name itself
- if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) {
- continue;
+ if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
+ return;
}
- for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) {
- var node = exportsWithDuplicate_1[_b];
- diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable[id].specifierText, id));
+ for (var _i = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _i < exportsWithDuplicate_1.length; _i++) {
+ var node = exportsWithDuplicate_1[_i];
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable_1.get(id).specifierText, id));
}
- }
+ });
extendExportSymbols(symbols, nestedSymbols);
}
return symbols;
@@ -25552,26 +27027,13 @@ var ts;
: symbol;
}
function symbolIsValue(symbol) {
- // If it is an instantiated symbol, then it is a value if the symbol it is an
- // instantiation of is a value.
- if (symbol.flags & 16777216 /* Instantiated */) {
- return symbolIsValue(getSymbolLinks(symbol).target);
- }
- // If the symbol has the value flag, it is trivially a value.
- if (symbol.flags & 107455 /* Value */) {
- return true;
- }
- // If it is an alias, then it is a value if the symbol it resolves to is a value.
- if (symbol.flags & 8388608 /* Alias */) {
- return (resolveAlias(symbol).flags & 107455 /* Value */) !== 0;
- }
- return false;
+ return !!(symbol.flags & 107455 /* Value */ || symbol.flags & 8388608 /* Alias */ && resolveAlias(symbol).flags & 107455 /* Value */);
}
function findConstructorDeclaration(node) {
var members = node.members;
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
var member = members_1[_i];
- if (member.kind === 150 /* Constructor */ && ts.nodeIsPresent(member.body)) {
+ if (member.kind === 151 /* Constructor */ && ts.nodeIsPresent(member.body)) {
return member;
}
}
@@ -25599,6 +27061,9 @@ var ts;
type.symbol = symbol;
return type;
}
+ function createTypeofType() {
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32 /* StringLiteral */, s); }));
+ }
// A reserved member name starts with two underscores, but the third character cannot be an underscore
// or the @ symbol. A third underscore indicates an escaped form of an identifer that started
// with at least two underscores. The @ character indicates that the name is denoted by a well known ES
@@ -25611,16 +27076,15 @@ var ts;
}
function getNamedMembers(members) {
var result;
- for (var id in members) {
+ members.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
if (!result)
result = [];
- var symbol = members[id];
if (symbolIsValue(symbol)) {
result.push(symbol);
}
}
- }
+ });
return result || emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
@@ -25639,20 +27103,21 @@ var ts;
}
function forEachSymbolTableInScope(enclosingDeclaration, callback) {
var result;
- for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
+ for (var location = enclosingDeclaration; location; location = location.parent) {
// Locals of a source file are not in scope (because they get merged into the global symbol table)
- if (location_1.locals && !isGlobalSourceFile(location_1)) {
- if (result = callback(location_1.locals)) {
+ if (location.locals && !isGlobalSourceFile(location)) {
+ if (result = callback(location.locals)) {
return result;
}
}
- switch (location_1.kind) {
- case 261 /* SourceFile */:
- if (!ts.isExternalOrCommonJsModule(location_1)) {
+ switch (location.kind) {
+ case 264 /* SourceFile */:
+ if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230 /* ModuleDeclaration */:
- if (result = callback(getSymbolOfNode(location_1).exports)) {
+ // falls through
+ case 232 /* ModuleDeclaration */:
+ if (result = callback(getSymbolOfNode(location).exports)) {
return result;
}
break;
@@ -25666,6 +27131,16 @@ var ts;
}
function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
function getAccessibleSymbolChainFromSymbolTable(symbols) {
+ return getAccessibleSymbolChainFromSymbolTableWorker(symbols, []);
+ }
+ function getAccessibleSymbolChainFromSymbolTableWorker(symbols, visitedSymbolTables) {
+ if (ts.contains(visitedSymbolTables, symbols)) {
+ return undefined;
+ }
+ visitedSymbolTables.push(symbols);
+ var result = trySymbolTable(symbols);
+ visitedSymbolTables.pop();
+ return result;
function canQualifySymbol(symbolFromSymbolTable, meaning) {
// If the symbol is equivalent and doesn't need further qualification, this symbol is accessible
if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
@@ -25684,31 +27159,33 @@ var ts;
canQualifySymbol(symbolFromSymbolTable, meaning);
}
}
- // If symbol is directly available by its name in the symbol table
- if (isAccessible(symbols[symbol.name])) {
- return [symbol];
- }
- // Check if symbol is any of the alias
- return ts.forEachProperty(symbols, function (symbolFromSymbolTable) {
- if (symbolFromSymbolTable.flags & 8388608 /* Alias */
- && symbolFromSymbolTable.name !== "export="
- && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243 /* ExportSpecifier */)) {
- if (!useOnlyExternalAliasing ||
- // Is this external alias, then use it to name
- ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
- var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
- return [symbolFromSymbolTable];
- }
- // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
- // but only if the symbolFromSymbolTable can be qualified
- var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
- if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
- return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ function trySymbolTable(symbols) {
+ // If symbol is directly available by its name in the symbol table
+ if (isAccessible(symbols.get(symbol.name))) {
+ return [symbol];
+ }
+ // Check if symbol is any of the alias
+ return ts.forEachEntry(symbols, function (symbolFromSymbolTable) {
+ if (symbolFromSymbolTable.flags & 8388608 /* Alias */
+ && symbolFromSymbolTable.name !== "export="
+ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) {
+ if (!useOnlyExternalAliasing ||
+ // Is this external alias, then use it to name
+ ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
+ var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
+ if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ return [symbolFromSymbolTable];
+ }
+ // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
+ // but only if the symbolFromSymbolTable can be qualified
+ var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
+ if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
+ return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ }
}
}
- }
- });
+ });
+ }
}
if (symbol) {
if (!(isPropertyOrMethodDeclarationSymbol(symbol))) {
@@ -25720,7 +27197,7 @@ var ts;
var qualify = false;
forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
// If symbol of this name is not available in the symbol table we are ok
- var symbolFromSymbolTable = symbolTable[symbol.name];
+ var symbolFromSymbolTable = symbolTable.get(symbol.name);
if (!symbolFromSymbolTable) {
// Continue to the next symbol table
return false;
@@ -25731,7 +27208,7 @@ var ts;
return true;
}
// Qualify if the symbol from symbol table has same meaning as expected
- symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+ symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
if (symbolFromSymbolTable.flags & meaning) {
qualify = true;
return true;
@@ -25746,10 +27223,10 @@ var ts;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
continue;
default:
return false;
@@ -25822,15 +27299,12 @@ var ts;
}
return { accessibility: 0 /* Accessible */ };
function getExternalModuleContainer(declaration) {
- for (; declaration; declaration = declaration.parent) {
- if (hasExternalModuleSymbol(declaration)) {
- return getSymbolOfNode(declaration);
- }
- }
+ var node = ts.findAncestor(declaration, hasExternalModuleSymbol);
+ return node && getSymbolOfNode(node);
}
}
function hasExternalModuleSymbol(declaration) {
- return ts.isAmbientModule(declaration) || (declaration.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
+ return ts.isAmbientModule(declaration) || (declaration.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
}
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
var aliasesToMakeVisible;
@@ -25871,12 +27345,12 @@ var ts;
function isEntityNameVisible(entityName, enclosingDeclaration) {
// get symbol of the first identifier of the entityName
var meaning;
- if (entityName.parent.kind === 160 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ if (entityName.parent.kind === 161 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
// Typeof value
meaning = 107455 /* Value */ | 1048576 /* ExportValue */;
}
- else if (entityName.kind === 141 /* QualifiedName */ || entityName.kind === 177 /* PropertyAccessExpression */ ||
- entityName.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ else if (entityName.kind === 142 /* QualifiedName */ || entityName.kind === 178 /* PropertyAccessExpression */ ||
+ entityName.parent.kind === 236 /* ImportEqualsDeclaration */) {
// Left identifier from type reference or TypeAlias
// Entity name of the import declaration
meaning = 1920 /* Namespace */;
@@ -25928,6 +27402,516 @@ var ts;
}
return result;
}
+ function createNodeBuilder() {
+ var context;
+ return {
+ typeToTypeNode: function (type, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ }
+ };
+ function createNodeBuilderContext(enclosingDeclaration, flags) {
+ return {
+ enclosingDeclaration: enclosingDeclaration,
+ flags: flags,
+ encounteredError: false,
+ inObjectTypeLiteral: false,
+ checkAlias: true,
+ symbolStack: undefined
+ };
+ }
+ function typeToTypeNodeHelper(type) {
+ if (!type) {
+ context.encounteredError = true;
+ // TODO(aozgaa): should we return implict any (undefined) or explicit any (keywordtypenode)?
+ return undefined;
+ }
+ if (type.flags & 1 /* Any */) {
+ return ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ }
+ if (type.flags & 2 /* String */) {
+ return ts.createKeywordTypeNode(135 /* StringKeyword */);
+ }
+ if (type.flags & 4 /* Number */) {
+ return ts.createKeywordTypeNode(132 /* NumberKeyword */);
+ }
+ if (type.flags & 8 /* Boolean */) {
+ return ts.createKeywordTypeNode(121 /* BooleanKeyword */);
+ }
+ if (type.flags & 16 /* Enum */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & (32 /* StringLiteral */)) {
+ return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ }
+ if (type.flags & (64 /* NumberLiteral */)) {
+ return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ }
+ if (type.flags & 128 /* BooleanLiteral */) {
+ return type.intrinsicName === "true" ? ts.createTrue() : ts.createFalse();
+ }
+ if (type.flags & 256 /* EnumLiteral */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 1024 /* Void */) {
+ return ts.createKeywordTypeNode(104 /* VoidKeyword */);
+ }
+ if (type.flags & 2048 /* Undefined */) {
+ return ts.createKeywordTypeNode(138 /* UndefinedKeyword */);
+ }
+ if (type.flags & 4096 /* Null */) {
+ return ts.createKeywordTypeNode(94 /* NullKeyword */);
+ }
+ if (type.flags & 8192 /* Never */) {
+ return ts.createKeywordTypeNode(129 /* NeverKeyword */);
+ }
+ if (type.flags & 512 /* ESSymbol */) {
+ return ts.createKeywordTypeNode(136 /* SymbolKeyword */);
+ }
+ if (type.flags & 16777216 /* NonPrimitive */) {
+ return ts.createKeywordTypeNode(133 /* ObjectKeyword */);
+ }
+ if (type.flags & 16384 /* TypeParameter */ && type.isThisType) {
+ if (context.inObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ context.encounteredError = true;
+ }
+ }
+ return ts.createThis();
+ }
+ var objectFlags = getObjectFlags(type);
+ if (objectFlags & 4 /* Reference */) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ return typeReferenceToTypeNode(type);
+ }
+ if (objectFlags & 3 /* ClassOrInterface */) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ // TODO(aozgaa): handle type arguments.
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 16384 /* TypeParameter */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter.
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (context.checkAlias && type.aliasSymbol) {
+ var name = symbolToName(type.aliasSymbol, /*expectsIdentifier*/ false);
+ var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ return ts.createTypeReferenceNode(name, typeArgumentNodes);
+ }
+ context.checkAlias = false;
+ if (type.flags & 65536 /* Union */) {
+ var formattedUnionTypes = formatUnionTypes(type.types);
+ var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes);
+ if (unionTypeNodes && unionTypeNodes.length > 0) {
+ return ts.createUnionOrIntersectionTypeNode(165 /* UnionType */, unionTypeNodes);
+ }
+ else {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ }
+ if (type.flags & 131072 /* Intersection */) {
+ return ts.createUnionOrIntersectionTypeNode(166 /* IntersectionType */, mapToTypeNodeArray(type.types));
+ }
+ if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ // The type is an object literal type.
+ return createAnonymousTypeNode(type);
+ }
+ if (type.flags & 262144 /* Index */) {
+ var indexedType = type.type;
+ var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ return ts.createTypeOperatorNode(indexTypeNode);
+ }
+ if (type.flags & 524288 /* IndexedAccess */) {
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ return ts.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
+ }
+ ts.Debug.fail("Should be unreachable.");
+ function mapToTypeNodeArray(types) {
+ var result = [];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type_1 = types_1[_i];
+ var typeNode = typeToTypeNodeHelper(type_1);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ function createMappedTypeNodeFromType(type) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ var typeParameter = getTypeParameterFromMappedType(type);
+ var typeParameterNode = typeParameterToDeclaration(typeParameter);
+ var templateType = getTemplateTypeFromMappedType(type);
+ var templateTypeNode = typeToTypeNodeHelper(templateType);
+ var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130 /* ReadonlyKeyword */) : undefined;
+ var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54 /* QuestionToken */) : undefined;
+ return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ }
+ function createAnonymousTypeNode(type) {
+ var symbol = type.symbol;
+ if (symbol) {
+ // Always use 'typeof T' for type of class, enum, and module objects
+ if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) ||
+ shouldWriteTypeOfFunctionSymbol()) {
+ return createTypeQueryNodeFromSymbol(symbol);
+ }
+ else if (ts.contains(context.symbolStack, symbol)) {
+ // If type is an anonymous type literal in a type alias declaration, use type alias name
+ var typeAlias = getTypeAliasForTypeLiteral(type);
+ if (typeAlias) {
+ // The specified symbol flags need to be reinterpreted as type flags
+ var entityName = symbolToName(typeAlias, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
+ }
+ else {
+ return ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ }
+ }
+ else {
+ // Since instantiations of the same anonymous type have the same symbol, tracking symbols instead
+ // of types allows us to catch circular references to instantiations of the same anonymous type
+ if (!context.symbolStack) {
+ context.symbolStack = [];
+ }
+ context.symbolStack.push(symbol);
+ var result = createTypeNodeFromObjectType(type);
+ context.symbolStack.pop();
+ return result;
+ }
+ }
+ else {
+ // Anonymous types without a symbol are never circular.
+ return createTypeNodeFromObjectType(type);
+ }
+ function shouldWriteTypeOfFunctionSymbol() {
+ var isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */ &&
+ ts.forEach(symbol.declarations, function (declaration) { return ts.getModifierFlags(declaration) & 32 /* Static */; }));
+ var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) &&
+ (symbol.parent ||
+ ts.forEach(symbol.declarations, function (declaration) {
+ return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */;
+ }));
+ if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
+ // typeof is allowed only for static/non local functions
+ return ts.contains(context.symbolStack, symbol); // it is type of the symbol uses itself recursively
+ }
+ }
+ }
+ function createTypeNodeFromObjectType(type) {
+ if (type.objectFlags & 32 /* Mapped */) {
+ if (getConstraintTypeFromMappedType(type).flags & (16384 /* TypeParameter */ | 262144 /* Index */)) {
+ return createMappedTypeNodeFromType(type);
+ }
+ }
+ var resolved = resolveStructuredTypeMembers(type);
+ if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+ if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
+ return ts.createTypeLiteralNode(/*members*/ undefined);
+ }
+ if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
+ var signature = resolved.callSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 159 /* FunctionType */);
+ }
+ if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
+ var signature = resolved.constructSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 160 /* ConstructorType */);
+ }
+ }
+ var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
+ context.inObjectTypeLiteral = true;
+ var members = createTypeNodesFromResolvedType(resolved);
+ context.inObjectTypeLiteral = saveInObjectTypeLiteral;
+ return ts.createTypeLiteralNode(members);
+ }
+ function createTypeQueryNodeFromSymbol(symbol) {
+ var entityName = symbolToName(symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeQueryNode(entityName);
+ }
+ function typeReferenceToTypeNode(type) {
+ var typeArguments = type.typeArguments || emptyArray;
+ if (type.target === globalArrayType) {
+ var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ return ts.createArrayTypeNode(elementType);
+ }
+ else if (type.target.objectFlags & 8 /* Tuple */) {
+ if (typeArguments.length > 0) {
+ var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
+ return ts.createTupleTypeNode(tupleConstituentNodes);
+ }
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ else {
+ var outerTypeParameters = type.target.outerTypeParameters;
+ var i = 0;
+ var qualifiedName = undefined;
+ if (outerTypeParameters) {
+ var length_1 = outerTypeParameters.length;
+ while (i < length_1) {
+ // Find group of type arguments for type parameters with the same declaring container.
+ var start = i;
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ do {
+ i++;
+ } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
+ // When type parameters are their own type arguments for the whole group (i.e. we have
+ // the default outer type arguments), we don't show the group.
+ if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
+ var qualifiedNamePart = symbolToName(parent, /*expectsIdentifier*/ true);
+ if (!qualifiedName) {
+ qualifiedName = ts.createQualifiedName(qualifiedNamePart, /*right*/ undefined);
+ }
+ else {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = qualifiedNamePart;
+ qualifiedName = ts.createQualifiedName(qualifiedName, /*right*/ undefined);
+ }
+ }
+ }
+ }
+ var entityName = undefined;
+ var nameIdentifier = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ if (qualifiedName) {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = nameIdentifier;
+ entityName = qualifiedName;
+ }
+ else {
+ entityName = nameIdentifier;
+ }
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ var typeArgumentNodes = ts.some(typeArguments) ? mapToTypeNodeArray(typeArguments.slice(i, typeParameterCount - i)) : undefined;
+ return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
+ }
+ }
+ function createTypeNodesFromResolvedType(resolvedType) {
+ var typeElements = [];
+ for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
+ var signature = _a[_i];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 154 /* CallSignature */));
+ }
+ for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
+ var signature = _c[_b];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* ConstructSignature */));
+ }
+ if (resolvedType.stringIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */));
+ }
+ if (resolvedType.numberIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */));
+ }
+ var properties = resolvedType.properties;
+ if (!properties) {
+ return typeElements;
+ }
+ for (var _d = 0, properties_2 = properties; _d < properties_2.length; _d++) {
+ var propertySymbol = properties_2[_d];
+ var propertyType = getTypeOfSymbol(propertySymbol);
+ var oldDeclaration = propertySymbol.declarations && propertySymbol.declarations[0];
+ if (!oldDeclaration) {
+ return;
+ }
+ var propertyName = oldDeclaration.name;
+ var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(54 /* QuestionToken */) : undefined;
+ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length) {
+ var signatures = getSignaturesOfType(propertyType, 0 /* Call */);
+ for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) {
+ var signature = signatures_1[_e];
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149 /* MethodSignature */);
+ methodDeclaration.name = propertyName;
+ methodDeclaration.questionToken = optionalToken;
+ typeElements.push(methodDeclaration);
+ }
+ }
+ else {
+ // TODO(aozgaa): should we create a node with explicit or implict any?
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode,
+ /*initializer*/ undefined));
+ }
+ }
+ return typeElements.length ? typeElements : undefined;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 135 /* StringKeyword */ : 132 /* NumberKeyword */);
+ var name = ts.getNameFromIndexInfo(indexInfo);
+ var indexingParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, name,
+ /*questionToken*/ undefined, indexerTypeNode,
+ /*initializer*/ undefined);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type);
+ return ts.createIndexSignatureDeclaration(
+ /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(130 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode);
+ }
+ function signatureToSignatureDeclarationHelper(signature, kind) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter); });
+ var returnTypeNode;
+ if (signature.typePredicate) {
+ var typePredicate = signature.typePredicate;
+ var parameterName = typePredicate.kind === 1 /* Identifier */ ? ts.createIdentifier(typePredicate.parameterName) : ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type);
+ returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
+ }
+ else {
+ var returnType = getReturnTypeOfSignature(signature);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ }
+ var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 /* AnyKeyword */ ? returnTypeNode : undefined;
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ }
+ function typeParameterToDeclaration(type) {
+ var constraint = getConstraintFromTypeParameter(type);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var defaultParameter = getDefaultFromTypeParameter(type);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
+ }
+ function symbolToParameterDeclaration(parameterSymbol) {
+ var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145 /* Parameter */);
+ var parameterType = getTypeOfSymbol(parameterSymbol);
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType);
+ // TODO(aozgaa): In the future, check initializer accessibility.
+ var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23 /* DotDotDotToken */),
+ // Clone name to remove trivia.
+ ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer);
+ return parameterNode;
+ }
+ function symbolToName(symbol, expectsIdentifier) {
+ // Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration.
+ var chain;
+ var isTypeParameter = symbol.flags & 262144 /* TypeParameter */;
+ if (!isTypeParameter && context.enclosingDeclaration) {
+ chain = getSymbolChain(symbol, 0 /* None */, /*endOfChain*/ true);
+ ts.Debug.assert(chain && chain.length > 0);
+ }
+ else {
+ chain = [symbol];
+ }
+ if (expectsIdentifier && chain.length !== 1
+ && !context.encounteredError
+ && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ context.encounteredError = true;
+ }
+ return createEntityNameFromSymbolChain(chain, chain.length - 1);
+ function createEntityNameFromSymbolChain(chain, index) {
+ ts.Debug.assert(chain && 0 <= index && index < chain.length);
+ // const parentIndex = index - 1;
+ var symbol = chain[index];
+ var typeParameterString = "";
+ if (index > 0) {
+ var parentSymbol = chain[index - 1];
+ var typeParameters = void 0;
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
+ }
+ else {
+ var targetSymbol = getTargetSymbol(parentSymbol);
+ if (targetSymbol.flags & (32 /* Class */ | 64 /* Interface */ | 524288 /* TypeAlias */)) {
+ typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
+ }
+ }
+ if (typeParameters && typeParameters.length > 0) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowTypeParameterInQualifiedName)) {
+ context.encounteredError = true;
+ }
+ var writer = ts.getSingleLineStringWriter();
+ var displayBuilder = getSymbolDisplayBuilder();
+ displayBuilder.buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, context.enclosingDeclaration, 0);
+ typeParameterString = writer.string();
+ ts.releaseStringWriter(writer);
+ }
+ }
+ var symbolName = getNameOfSymbol(symbol);
+ var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
+ var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
+ }
+ /** @param endOfChain Set to false for recursive calls; non-recursive calls should always output something. */
+ function getSymbolChain(symbol, meaning, endOfChain) {
+ var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, /*useOnlyExternalAliasing*/ false);
+ var parentSymbol;
+ if (!accessibleSymbolChain ||
+ needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
+ // Go up and add our parent.
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ var parentChain = getSymbolChain(parent, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
+ if (parentChain) {
+ parentSymbol = parent;
+ accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [symbol]);
+ }
+ }
+ }
+ if (accessibleSymbolChain) {
+ return accessibleSymbolChain;
+ }
+ if (
+ // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols.
+ endOfChain ||
+ // If a parent symbol is an external module, don't write it. (We prefer just `x` vs `"foo/bar".x`.)
+ !(!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) &&
+ // If a parent symbol is an anonymous type, don't write it.
+ !(symbol.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */))) {
+ return [symbol];
+ }
+ }
+ function getNameOfSymbol(symbol) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 198 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return "(Anonymous function)";
+ }
+ }
+ return symbol.name;
+ }
+ }
+ }
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
var writer = ts.getSingleLineStringWriter();
getSymbolDisplayBuilder().buildTypePredicateDisplay(typePredicate, writer, enclosingDeclaration, flags);
@@ -25971,11 +27955,8 @@ var ts;
}
function getTypeAliasForTypeLiteral(type) {
if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) {
- var node = type.symbol.declarations[0].parent;
- while (node.kind === 166 /* ParenthesizedType */) {
- node = node.parent;
- }
- if (node.kind === 228 /* TypeAliasDeclaration */) {
+ var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167 /* ParenthesizedType */; });
+ if (node.kind === 230 /* TypeAliasDeclaration */) {
return getSymbolOfNode(node);
}
}
@@ -25983,29 +27964,32 @@ var ts;
}
function isTopLevelInExternalModuleAugmentation(node) {
return node && node.parent &&
- node.parent.kind === 231 /* ModuleBlock */ &&
+ node.parent.kind === 233 /* ModuleBlock */ &&
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
}
- function getSymbolDisplayBuilder() {
- function getNameOfSymbol(symbol) {
- if (symbol.declarations && symbol.declarations.length) {
- var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
- }
- switch (declaration.kind) {
- case 197 /* ClassExpression */:
- return "(Anonymous class)";
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- return "(Anonymous function)";
- }
+ function getNameOfSymbol(symbol) {
+ if (symbol.declarations && symbol.declarations.length) {
+ var declaration = symbol.declarations[0];
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ switch (declaration.kind) {
+ case 198 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
+ }
+ function getSymbolDisplayBuilder() {
/**
* Writes only the name of the symbol out to the writer. Uses the original source text
* for the name of the symbol if it is available to match how the user wrote the name.
@@ -26047,7 +28031,7 @@ var ts;
if (parentSymbol) {
// Write type arguments of instantiated class/interface here
if (flags & 1 /* WriteTypeParametersOrArguments */) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
}
else {
@@ -26075,9 +28059,9 @@ var ts;
if (!accessibleSymbolChain ||
needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
// Go up and add our parent.
- var parent_5 = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
- if (parent_5) {
- walkSymbol(parent_5, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ walkSymbol(parent, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
}
}
if (accessibleSymbolChain) {
@@ -26115,7 +28099,7 @@ var ts;
function writeType(type, flags) {
var nextFlags = flags & ~512 /* InTypeAlias */;
// Write undefined/null type as any
- if (type.flags & 16015 /* Intrinsic */) {
+ if (type.flags & 16793231 /* Intrinsic */) {
// Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving
writer.writeKeyword(!(globalFlags & 16 /* WriteOwnNameForAnyLike */) && isTypeAny(type)
? "any"
@@ -26142,7 +28126,7 @@ var ts;
else if (!(flags & 512 /* InTypeAlias */) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
var typeArguments = type.aliasTypeArguments;
- writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
+ writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
}
else if (type.flags & 196608 /* UnionOrIntersection */) {
writeUnionOrIntersectionType(type, nextFlags);
@@ -26223,18 +28207,18 @@ var ts;
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
if (outerTypeParameters) {
- var length_1 = outerTypeParameters.length;
- while (i < length_1) {
+ var length_2 = outerTypeParameters.length;
+ while (i < length_2) {
// Find group of type arguments for type parameters with the same declaring container.
var start = i;
- var parent_6 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
do {
i++;
- } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_6);
+ } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
// When type parameters are their own type arguments for the whole group (i.e. we have
// the default outer type arguments), we don't show the group.
if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
- writeSymbolTypeReference(parent_6, typeArguments, start, i, flags);
+ writeSymbolTypeReference(parent, typeArguments, start, i, flags);
writePunctuation(writer, 22 /* DotToken */);
}
}
@@ -26261,7 +28245,8 @@ var ts;
var symbol = type.symbol;
if (symbol) {
// Always use 'typeof T' for type of class, enum, and module objects
- if (symbol.flags & (32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {
+ if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 /* Enum */ | 512 /* ValueModule */)) {
writeTypeOfSymbol(type, flags);
}
else if (shouldWriteTypeOfFunctionSymbol()) {
@@ -26300,7 +28285,7 @@ var ts;
var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) &&
(symbol.parent ||
ts.forEach(symbol.declarations, function (declaration) {
- return declaration.parent.kind === 261 /* SourceFile */ || declaration.parent.kind === 231 /* ModuleBlock */;
+ return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
// typeof is allowed only for static/non local functions
@@ -26314,32 +28299,13 @@ var ts;
writeSpace(writer);
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags);
}
- function writeIndexSignature(info, keyword) {
- if (info) {
- if (info.isReadonly) {
- writeKeyword(writer, 130 /* ReadonlyKeyword */);
- writeSpace(writer);
- }
- writePunctuation(writer, 20 /* OpenBracketToken */);
- writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
- writePunctuation(writer, 55 /* ColonToken */);
- writeSpace(writer);
- writeKeyword(writer, keyword);
- writePunctuation(writer, 21 /* CloseBracketToken */);
- writePunctuation(writer, 55 /* ColonToken */);
- writeSpace(writer);
- writeType(info.type, 0 /* None */);
- writePunctuation(writer, 24 /* SemicolonToken */);
- writer.writeLine();
- }
- }
function writePropertyWithModifiers(prop) {
if (isReadonlySymbol(prop)) {
writeKeyword(writer, 130 /* ReadonlyKeyword */);
writeSpace(writer);
}
buildSymbolDisplay(prop, writer);
- if (prop.flags & 536870912 /* Optional */) {
+ if (prop.flags & 67108864 /* Optional */) {
writePunctuation(writer, 54 /* QuestionToken */);
}
}
@@ -26416,15 +28382,15 @@ var ts;
writePunctuation(writer, 24 /* SemicolonToken */);
writer.writeLine();
}
- writeIndexSignature(resolved.stringIndexInfo, 134 /* StringKeyword */);
- writeIndexSignature(resolved.numberIndexInfo, 132 /* NumberKeyword */);
+ buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0 /* String */, enclosingDeclaration, globalFlags, symbolStack);
+ buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1 /* Number */, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
var t = getTypeOfSymbol(p);
if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0 /* Call */);
- for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) {
- var signature = signatures_1[_f];
+ for (var _f = 0, signatures_2 = signatures; _f < signatures_2.length; _f++) {
+ var signature = signatures_2[_f];
writePropertyWithModifiers(p);
buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack);
writePunctuation(writer, 24 /* SemicolonToken */);
@@ -26483,33 +28449,44 @@ var ts;
writeSpace(writer);
buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack);
}
+ var defaultType = getDefaultFromTypeParameter(tp);
+ if (defaultType) {
+ writeSpace(writer);
+ writePunctuation(writer, 57 /* EqualsToken */);
+ writeSpace(writer);
+ buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack);
+ }
}
function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) {
var parameterNode = p.valueDeclaration;
- if (ts.isRestParameter(parameterNode)) {
+ if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) {
writePunctuation(writer, 23 /* DotDotDotToken */);
}
- if (ts.isBindingPattern(parameterNode.name)) {
+ if (parameterNode && ts.isBindingPattern(parameterNode.name)) {
buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack);
}
else {
appendSymbolNameOnly(p, writer);
}
- if (isOptionalParameter(parameterNode)) {
+ if (parameterNode && isOptionalParameter(parameterNode)) {
writePunctuation(writer, 54 /* QuestionToken */);
}
writePunctuation(writer, 55 /* ColonToken */);
writeSpace(writer);
- buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack);
+ var type = getTypeOfSymbol(p);
+ if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
+ type = includeFalsyTypes(type, 2048 /* Undefined */);
+ }
+ buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) {
// We have to explicitly emit square bracket and bracket because these tokens are not stored inside the node.
- if (bindingPattern.kind === 172 /* ObjectBindingPattern */) {
+ if (bindingPattern.kind === 173 /* ObjectBindingPattern */) {
writePunctuation(writer, 16 /* OpenBraceToken */);
buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
writePunctuation(writer, 17 /* CloseBraceToken */);
}
- else if (bindingPattern.kind === 173 /* ArrayBindingPattern */) {
+ else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) {
writePunctuation(writer, 20 /* OpenBracketToken */);
var elements = bindingPattern.elements;
buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
@@ -26523,9 +28500,9 @@ var ts;
if (ts.isOmittedExpression(bindingElement)) {
return;
}
- ts.Debug.assert(bindingElement.kind === 174 /* BindingElement */);
+ ts.Debug.assert(bindingElement.kind === 175 /* BindingElement */);
if (bindingElement.propertyName) {
- writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
+ writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName));
writePunctuation(writer, 55 /* ColonToken */);
writeSpace(writer);
}
@@ -26597,6 +28574,10 @@ var ts;
buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
+ var returnType = getReturnTypeOfSignature(signature);
+ if (flags & 2048 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
+ return;
+ }
if (flags & 8 /* WriteArrowStyleSignature */) {
writeSpace(writer);
writePunctuation(writer, 35 /* EqualsGreaterThanToken */);
@@ -26609,7 +28590,6 @@ var ts;
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
}
else {
- var returnType = getReturnTypeOfSignature(signature);
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
}
}
@@ -26629,6 +28609,32 @@ var ts;
buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack);
buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack);
}
+ function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) {
+ if (info) {
+ if (info.isReadonly) {
+ writeKeyword(writer, 130 /* ReadonlyKeyword */);
+ writeSpace(writer);
+ }
+ writePunctuation(writer, 20 /* OpenBracketToken */);
+ writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
+ writePunctuation(writer, 55 /* ColonToken */);
+ writeSpace(writer);
+ switch (kind) {
+ case 1 /* Number */:
+ writeKeyword(writer, 132 /* NumberKeyword */);
+ break;
+ case 0 /* String */:
+ writeKeyword(writer, 135 /* StringKeyword */);
+ break;
+ }
+ writePunctuation(writer, 21 /* CloseBracketToken */);
+ writePunctuation(writer, 55 /* ColonToken */);
+ writeSpace(writer);
+ buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
+ writePunctuation(writer, 24 /* SemicolonToken */);
+ writer.writeLine();
+ }
+ }
return _displayBuilder || (_displayBuilder = {
buildSymbolDisplay: buildSymbolDisplay,
buildTypeDisplay: buildTypeDisplay,
@@ -26639,6 +28645,7 @@ var ts;
buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
buildSignatureDisplay: buildSignatureDisplay,
+ buildIndexSignatureDisplay: buildIndexSignatureDisplay,
buildReturnTypeDisplay: buildReturnTypeDisplay
});
}
@@ -26653,75 +28660,76 @@ var ts;
return false;
function determineIfDeclarationIsVisible() {
switch (node.kind) {
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return isDeclarationVisible(node.parent.parent);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
if (ts.isBindingPattern(node.name) &&
!node.name.elements.length) {
// If the binding pattern is empty, this variable declaration is not visible
return false;
}
- // Otherwise fall through
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 229 /* EnumDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// external module augmentation is always visible
if (ts.isExternalModuleAugmentation(node)) {
return true;
}
- var parent_7 = getDeclarationContainer(node);
+ var parent = getDeclarationContainer(node);
// If the node is not exported or it is not ambient module element (except import declaration)
if (!(ts.getCombinedModifierFlags(node) & 1 /* Export */) &&
- !(node.kind !== 234 /* ImportEqualsDeclaration */ && parent_7.kind !== 261 /* SourceFile */ && ts.isInAmbientContext(parent_7))) {
- return isGlobalSourceFile(parent_7);
+ !(node.kind !== 236 /* ImportEqualsDeclaration */ && parent.kind !== 264 /* SourceFile */ && ts.isInAmbientContext(parent))) {
+ return isGlobalSourceFile(parent);
}
// Exported members/ambient module elements (exception import declaration) are visible if parent is visible
- return isDeclarationVisible(parent_7);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ return isDeclarationVisible(parent);
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.getModifierFlags(node) & (8 /* Private */ | 16 /* Protected */)) {
// Private/protected properties/methods are not visible
return false;
}
- // Public properties/methods are visible if its parents are visible, so const it fall into next case statement
- case 150 /* Constructor */:
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 155 /* IndexSignature */:
- case 144 /* Parameter */:
- case 231 /* ModuleBlock */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 161 /* TypeLiteral */:
- case 157 /* TypeReference */:
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
+ // Public properties/methods are visible if its parents are visible, so:
+ // falls through
+ case 151 /* Constructor */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 156 /* IndexSignature */:
+ case 145 /* Parameter */:
+ case 233 /* ModuleBlock */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 162 /* TypeLiteral */:
+ case 158 /* TypeReference */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
return isDeclarationVisible(node.parent);
// Default binding, import specifier and namespace import is visible
// only on demand so by default it is not visible
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
return false;
// Type parameters are always visible
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
// Source file and namespace export are always visible
- case 261 /* SourceFile */:
- case 233 /* NamespaceExportDeclaration */:
+ case 264 /* SourceFile */:
+ case 235 /* NamespaceExportDeclaration */:
return true;
// Export assignments do not create name bindings outside the module
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return false;
default:
return false;
@@ -26730,10 +28738,10 @@ var ts;
}
function collectLinkedAliases(node) {
var exportSymbol;
- if (node.parent && node.parent.kind === 240 /* ExportAssignment */) {
+ if (node.parent && node.parent.kind === 242 /* ExportAssignment */) {
exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node);
}
- else if (node.parent.kind === 243 /* ExportSpecifier */) {
+ else if (node.parent.kind === 245 /* ExportSpecifier */) {
var exportSpecifier = node.parent;
exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
@@ -26778,8 +28786,8 @@ var ts;
var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
if (resolutionCycleStartIndex >= 0) {
// A cycle was found
- var length_2 = resolutionTargets.length;
- for (var i = resolutionCycleStartIndex; i < length_2; i++) {
+ var length_3 = resolutionTargets.length;
+ for (var i = resolutionCycleStartIndex; i < length_3; i++) {
resolutionResults[i] = false;
}
return false;
@@ -26823,21 +28831,20 @@ var ts;
return resolutionResults.pop();
}
function getDeclarationContainer(node) {
- node = ts.getRootDeclaration(node);
- while (node) {
+ node = ts.findAncestor(ts.getRootDeclaration(node), function (node) {
switch (node.kind) {
- case 223 /* VariableDeclaration */:
- case 224 /* VariableDeclarationList */:
- case 239 /* ImportSpecifier */:
- case 238 /* NamedImports */:
- case 237 /* NamespaceImport */:
- case 236 /* ImportClause */:
- node = node.parent;
- break;
+ case 225 /* VariableDeclaration */:
+ case 226 /* VariableDeclarationList */:
+ case 241 /* ImportSpecifier */:
+ case 240 /* NamedImports */:
+ case 239 /* NamespaceImport */:
+ case 238 /* ImportClause */:
+ return false;
default:
- return node.parent;
+ return true;
}
- }
+ });
+ return node && node.parent;
}
function getTypeOfPrototypeProperty(prototype) {
// TypeScript 1.0 spec (April 2014): 8.4
@@ -26855,9 +28862,6 @@ var ts;
function isTypeAny(type) {
return type && (type.flags & 1 /* Any */) !== 0;
}
- function isTypeNever(type) {
- return type && (type.flags & 8192 /* Never */) !== 0;
- }
// Return the type of a binding element parent. We check SymbolLinks first to see if a type has been
// assigned by contextual typing.
function getTypeForBindingElementParent(node) {
@@ -26865,24 +28869,29 @@ var ts;
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false);
}
function isComputedNonLiteralName(name) {
- return name.kind === 142 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression);
+ return name.kind === 143 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression);
}
function getRestType(source, properties, symbol) {
- ts.Debug.assert(!!(source.flags & 32768 /* Object */), "Rest types only support object types right now.");
+ source = filterType(source, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (source.flags & 8192 /* Never */) {
+ return emptyObjectType;
+ }
+ if (source.flags & 65536 /* Union */) {
+ return mapType(source, function (t) { return getRestType(t, properties, symbol); });
+ }
var members = ts.createMap();
var names = ts.createMap();
- for (var _i = 0, properties_2 = properties; _i < properties_2.length; _i++) {
- var name_17 = properties_2[_i];
- names[ts.getTextOfPropertyName(name_17)] = true;
+ for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
+ var name = properties_3[_i];
+ names.set(ts.getTextOfPropertyName(name), true);
}
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
- var inNamesToRemove = prop.name in names;
+ var inNamesToRemove = names.has(prop.name);
var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
- var isMethod = prop.flags & 8192 /* Method */;
var isSetOnlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
- if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
- members[prop.name] = prop;
+ if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
+ members.set(prop.name, prop);
}
}
var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */);
@@ -26907,9 +28916,9 @@ var ts;
return parentType;
}
var type;
- if (pattern.kind === 172 /* ObjectBindingPattern */) {
+ if (pattern.kind === 173 /* ObjectBindingPattern */) {
if (declaration.dotDotDotToken) {
- if (!(parentType.flags & 32768 /* Object */)) {
+ if (!isValidSpreadType(parentType)) {
error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types);
return unknownType;
}
@@ -26924,8 +28933,8 @@ var ts;
}
else {
// Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form)
- var name_18 = declaration.propertyName || declaration.name;
- if (isComputedNonLiteralName(name_18)) {
+ var name = declaration.propertyName || declaration.name;
+ if (isComputedNonLiteralName(name)) {
// computed properties with non-literal names are treated as 'any'
return anyType;
}
@@ -26934,12 +28943,12 @@ var ts;
}
// Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature,
// or otherwise the type of the string index signature.
- var text = ts.getTextOfPropertyName(name_18);
+ var text = ts.getTextOfPropertyName(name);
type = getTypeOfPropertyOfType(parentType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1 /* Number */) ||
getIndexTypeOfType(parentType, 0 /* String */);
if (!type) {
- error(name_18, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_18));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name));
return unknownType;
}
}
@@ -26948,7 +28957,7 @@ var ts;
// This elementType will be used if the specific property corresponding to this index is not
// present (aka the tuple element property). This call also checks that the parentType is in
// fact an iterable or array (depending on target language).
- var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
if (declaration.dotDotDotToken) {
// Rest element has an array type with the same element type as the parent type
type = createArrayType(elementType);
@@ -26979,7 +28988,7 @@ var ts;
getUnionType([type, checkExpressionCached(declaration.initializer)], /*subtypeReduction*/ true) :
type;
}
- function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) {
+ function getTypeForDeclarationFromJSDocComment(declaration) {
var jsdocType = ts.getJSDocType(declaration);
if (jsdocType) {
return getTypeFromTypeNode(jsdocType);
@@ -26992,44 +29001,46 @@ var ts;
}
function isEmptyArrayLiteral(node) {
var expr = ts.skipParentheses(node);
- return expr.kind === 175 /* ArrayLiteralExpression */ && expr.elements.length === 0;
+ return expr.kind === 176 /* ArrayLiteralExpression */ && expr.elements.length === 0;
}
function addOptionality(type, optional) {
return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
}
// Return the inferred type for a variable, parameter, or property declaration
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
// If this is a variable in a JavaScript file, then use the JSDoc type (if it has
// one as its type), otherwise fallback to the below standard TS codepaths to
// try to figure it out.
- var type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration);
+ var type = getTypeForDeclarationFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
// A variable declared in a for..in statement is of type string, or of type keyof T when the
// right hand expression is of a type parameter type.
- if (declaration.parent.parent.kind === 212 /* ForInStatement */) {
+ if (declaration.parent.parent.kind === 214 /* ForInStatement */) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 /* TypeParameter */ | 262144 /* Index */) ? indexType : stringType;
}
- if (declaration.parent.parent.kind === 213 /* ForOfStatement */) {
+ if (declaration.parent.parent.kind === 215 /* ForOfStatement */) {
// checkRightHandSideOfForOf will return undefined if the for-of expression type was
// missing properties/signatures required to get its iteratedType (like
// [Symbol.iterator] or next). This may be because we accessed properties from anyType,
// or it may have led to an error inside getElementTypeOfIterable.
- return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
+ var forOfStatement = declaration.parent.parent;
+ return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType;
}
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
// Use type from type annotation if one is present
if (declaration.type) {
- return addOptionality(getTypeFromTypeNode(declaration.type), /*optional*/ declaration.questionToken && includeOptionality);
+ var declaredType = getTypeFromTypeNode(declaration.type);
+ return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality);
}
- if ((compilerOptions.noImplicitAny || declaration.flags & 2097152 /* JavaScriptFile */) &&
- declaration.kind === 223 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) &&
+ if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) &&
+ declaration.kind === 225 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) &&
!(ts.getCombinedModifierFlags(declaration) & 1 /* Export */) && !ts.isInAmbientContext(declaration)) {
// If --noImplicitAny is on or the declaration is in a Javascript file,
// use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no
@@ -27043,11 +29054,11 @@ var ts;
return autoArrayType;
}
}
- if (declaration.kind === 144 /* Parameter */) {
+ if (declaration.kind === 145 /* Parameter */) {
var func = declaration.parent;
// For a parameter of a set accessor, use the type of the get accessor if one is present
- if (func.kind === 152 /* SetAccessor */ && !ts.hasDynamicName(func)) {
- var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 151 /* GetAccessor */);
+ if (func.kind === 153 /* SetAccessor */ && !ts.hasDynamicName(func)) {
+ var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152 /* GetAccessor */);
if (getter) {
var getterSignature = getSignatureFromDeclaration(getter);
var thisParameter = getAccessorThisParameter(func);
@@ -27076,8 +29087,13 @@ var ts;
var type = checkDeclarationInitializer(declaration);
return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality);
}
+ if (ts.isJsxAttribute(declaration)) {
+ // if JSX attribute doesn't have initializer, by default the attribute will have boolean value of true.
+ // I.e <Elem attr /> is sugar for <Elem attr={true} />
+ return trueType;
+ }
// If it is a short-hand property assignment, use the type of the identifier
- if (declaration.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (declaration.kind === 261 /* ShorthandPropertyAssignment */) {
return checkIdentifier(declaration.name);
}
// If the declaration specifies a binding pattern, use the type implied by the binding pattern
@@ -27087,6 +29103,38 @@ var ts;
// No type specified and nothing can be inferred
return undefined;
}
+ function getWidenedTypeFromJSSpecialPropertyDeclarations(symbol) {
+ var types = [];
+ var definedInConstructor = false;
+ var definedInMethod = false;
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ var expression = declaration.kind === 193 /* BinaryExpression */ ? declaration :
+ declaration.kind === 178 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 193 /* BinaryExpression */) :
+ undefined;
+ if (!expression) {
+ return unknownType;
+ }
+ if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98 /* ThisKeyword */) {
+ if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 151 /* Constructor */) {
+ definedInConstructor = true;
+ }
+ else {
+ definedInMethod = true;
+ }
+ }
+ if (expression.flags & 65536 /* JavaScriptFile */) {
+ // If there is a JSDoc type, use it
+ var type = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type && type !== unknownType) {
+ types.push(getWidenedType(type));
+ continue;
+ }
+ }
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
+ return getWidenedType(addOptionality(getUnionType(types, /*subtypeReduction*/ true), definedInMethod && !definedInConstructor));
+ }
// Return the type implied by a binding pattern element. This is the type of the initializer of the element if
// one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding
// pattern. Otherwise, it is the type any.
@@ -27097,7 +29145,7 @@ var ts;
if (ts.isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
}
- if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
+ if (reportErrors && noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
reportImplicitAnyError(element, anyType);
}
return anyType;
@@ -27105,22 +29153,27 @@ var ts;
// Return the type implied by an object binding pattern
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
var members = ts.createMap();
+ var stringIndexInfo;
var hasComputedProperties = false;
ts.forEach(pattern.elements, function (e) {
var name = e.propertyName || e.name;
- if (isComputedNonLiteralName(name) || e.dotDotDotToken) {
- // do not include computed properties or rests in the implied type
+ if (isComputedNonLiteralName(name)) {
+ // do not include computed properties in the implied type
hasComputedProperties = true;
return;
}
+ if (e.dotDotDotToken) {
+ stringIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
+ return;
+ }
var text = ts.getTextOfPropertyName(name);
- var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0);
+ var flags = 4 /* Property */ | (e.initializer ? 67108864 /* Optional */ : 0);
var symbol = createSymbol(flags, text);
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
symbol.bindingElement = e;
- members[symbol.name] = symbol;
+ members.set(symbol.name, symbol);
});
- var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
+ var result = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, undefined);
if (includePatternInType) {
result.pattern = pattern;
}
@@ -27153,7 +29206,7 @@ var ts;
// parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of
// the parameter.
function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
- return pattern.kind === 172 /* ObjectBindingPattern */
+ return pattern.kind === 173 /* ObjectBindingPattern */
? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
}
@@ -27175,7 +29228,7 @@ var ts;
// During a normal type check we'll never get to here with a property assignment (the check of the containing
// object literal uses a different path). We exclude widening only so that language services and type verification
// tools see the actual type.
- if (declaration.kind === 257 /* PropertyAssignment */) {
+ if (declaration.kind === 260 /* PropertyAssignment */) {
return type;
}
return getWidenedType(type);
@@ -27183,7 +29236,7 @@ var ts;
// Rest parameters default to type any[], other parameters default to type any
type = declaration.dotDotDotToken ? anyArrayType : anyType;
// Report implicit any errors unless this is a private property within an ambient declaration
- if (reportErrors && compilerOptions.noImplicitAny) {
+ if (reportErrors && noImplicitAny) {
if (!declarationBelongsToPrivateAmbientMember(declaration)) {
reportImplicitAnyError(declaration, type);
}
@@ -27192,14 +29245,14 @@ var ts;
}
function declarationBelongsToPrivateAmbientMember(declaration) {
var root = ts.getRootDeclaration(declaration);
- var memberDeclaration = root.kind === 144 /* Parameter */ ? root.parent : root;
+ var memberDeclaration = root.kind === 145 /* Parameter */ ? root.parent : root;
return isPrivateWithinAmbient(memberDeclaration);
}
function getTypeOfVariableOrParameterOrProperty(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
// Handle prototype property
- if (symbol.flags & 134217728 /* Prototype */) {
+ if (symbol.flags & 16777216 /* Prototype */) {
return links.type = getTypeOfPrototypeProperty(symbol);
}
// Handle catch clause variables
@@ -27208,10 +29261,10 @@ var ts;
return links.type = anyType;
}
// Handle export default expressions
- if (declaration.kind === 240 /* ExportAssignment */) {
+ if (declaration.kind === 242 /* ExportAssignment */) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 2097152 /* JavaScriptFile */ && declaration.kind === 286 /* JSDocPropertyTag */ && declaration.typeExpression) {
+ if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 290 /* JSDocPropertyTag */ && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
// Handle variable, parameter or property
@@ -27224,36 +29277,15 @@ var ts;
// * exports.p = expr
// * this.p = expr
// * className.prototype.method = expr
- if (declaration.kind === 192 /* BinaryExpression */ ||
- declaration.kind === 177 /* PropertyAccessExpression */ && declaration.parent.kind === 192 /* BinaryExpression */) {
- // Use JS Doc type if present on parent expression statement
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
- var jsdocType = ts.getJSDocType(declaration.parent);
- if (jsdocType) {
- return links.type = getTypeFromTypeNode(jsdocType);
- }
- }
- var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 192 /* BinaryExpression */ ?
- checkExpressionCached(decl.right) :
- checkExpressionCached(decl.parent.right); });
- type = getUnionType(declaredTypes, /*subtypeReduction*/ true);
+ if (declaration.kind === 193 /* BinaryExpression */ ||
+ declaration.kind === 178 /* PropertyAccessExpression */ && declaration.parent.kind === 193 /* BinaryExpression */) {
+ type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol);
}
else {
type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true);
}
if (!popTypeResolution()) {
- if (symbol.valueDeclaration.type) {
- // Variable has type annotation that circularly references the variable itself
- type = unknownType;
- error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
- }
- else {
- // Variable has initializer that circularly references the variable itself
- type = anyType;
- if (compilerOptions.noImplicitAny) {
- error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
- }
- }
+ type = reportCircularityError(symbol);
}
links.type = type;
}
@@ -27261,7 +29293,7 @@ var ts;
}
function getAnnotatedAccessorType(accessor) {
if (accessor) {
- if (accessor.kind === 151 /* GetAccessor */) {
+ if (accessor.kind === 152 /* GetAccessor */) {
return accessor.type && getTypeFromTypeNode(accessor.type);
}
else {
@@ -27281,10 +29313,10 @@ var ts;
function getTypeOfAccessors(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- var getter = ts.getDeclarationOfKind(symbol, 151 /* GetAccessor */);
- var setter = ts.getDeclarationOfKind(symbol, 152 /* SetAccessor */);
- if (getter && getter.flags & 2097152 /* JavaScriptFile */) {
- var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
+ var getter = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */);
+ var setter = ts.getDeclarationOfKind(symbol, 153 /* SetAccessor */);
+ if (getter && getter.flags & 65536 /* JavaScriptFile */) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
if (jsDocType) {
return links.type = jsDocType;
}
@@ -27310,7 +29342,7 @@ var ts;
type = getReturnTypeFromBody(getter);
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
if (setter) {
error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
@@ -27325,8 +29357,8 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
- var getter_1 = ts.getDeclarationOfKind(symbol, 151 /* GetAccessor */);
+ if (noImplicitAny) {
+ var getter_1 = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */);
error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
}
}
@@ -27334,6 +29366,10 @@ var ts;
}
return links.type;
}
+ function getBaseTypeVariableOfClass(symbol) {
+ var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
+ return baseConstructorType.flags & 540672 /* TypeVariable */ ? baseConstructorType : undefined;
+ }
function getTypeOfFuncClassEnumModule(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
@@ -27342,8 +29378,13 @@ var ts;
}
else {
var type = createObjectType(16 /* Anonymous */, symbol);
- links.type = strictNullChecks && symbol.flags & 536870912 /* Optional */ ?
- includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ if (symbol.flags & 32 /* Class */) {
+ var baseTypeVariable = getBaseTypeVariableOfClass(symbol);
+ links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
+ }
+ else {
+ links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ }
}
}
return links.type;
@@ -27373,12 +29414,39 @@ var ts;
function getTypeOfInstantiatedSymbol(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ if (symbolInstantiationDepth === 100) {
+ error(symbol.valueDeclaration, ts.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite);
+ links.type = unknownType;
+ }
+ else {
+ if (!pushTypeResolution(symbol, 0 /* Type */)) {
+ return unknownType;
+ }
+ symbolInstantiationDepth++;
+ var type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ symbolInstantiationDepth--;
+ if (!popTypeResolution()) {
+ type = reportCircularityError(symbol);
+ }
+ links.type = type;
+ }
}
return links.type;
}
+ function reportCircularityError(symbol) {
+ // Check if variable has type annotation that circularly references the variable itself
+ if (symbol.valueDeclaration.type) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
+ return unknownType;
+ }
+ // Otherwise variable has initializer that circularly references the variable itself
+ if (noImplicitAny) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
+ }
+ return anyType;
+ }
function getTypeOfSymbol(symbol) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
@@ -27398,22 +29466,33 @@ var ts;
}
return unknownType;
}
+ function isReferenceToType(type, target) {
+ return type !== undefined
+ && target !== undefined
+ && (getObjectFlags(type) & 4 /* Reference */) !== 0
+ && type.target === target;
+ }
function getTargetType(type) {
return getObjectFlags(type) & 4 /* Reference */ ? type.target : type;
}
function hasBaseType(type, checkBase) {
return check(type);
function check(type) {
- var target = getTargetType(type);
- return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ if (getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */)) {
+ var target = getTargetType(type);
+ return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ }
+ else if (type.flags & 131072 /* Intersection */) {
+ return ts.forEach(type.types, check);
+ }
}
}
// Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set.
// The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set
// in-place and returns the same array.
function appendTypeParameters(typeParameters, declarations) {
- for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
- var declaration = declarations_2[_i];
+ for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+ var declaration = declarations_3[_i];
var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration));
if (!typeParameters) {
typeParameters = [tp];
@@ -27433,9 +29512,9 @@ var ts;
if (!node) {
return typeParameters;
}
- if (node.kind === 226 /* ClassDeclaration */ || node.kind === 197 /* ClassExpression */ ||
- node.kind === 225 /* FunctionDeclaration */ || node.kind === 184 /* FunctionExpression */ ||
- node.kind === 149 /* MethodDeclaration */ || node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */ ||
+ node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 150 /* MethodDeclaration */ || node.kind === 186 /* ArrowFunction */) {
var declarations = node.typeParameters;
if (declarations) {
return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
@@ -27445,8 +29524,8 @@ var ts;
}
// The outer type parameters are those defined by enclosing generic classes, methods, or functions.
function getOuterTypeParametersOfClassOrInterface(symbol) {
- var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 227 /* InterfaceDeclaration */);
- return appendOuterTypeParameters(undefined, declaration);
+ var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */);
+ return appendOuterTypeParameters(/*typeParameters*/ undefined, declaration);
}
// The local type parameters are the combined set of type parameters from all declarations of the class,
// interface, or type alias.
@@ -27454,8 +29533,8 @@ var ts;
var result;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var node = _a[_i];
- if (node.kind === 227 /* InterfaceDeclaration */ || node.kind === 226 /* ClassDeclaration */ ||
- node.kind === 197 /* ClassExpression */ || node.kind === 228 /* TypeAliasDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 228 /* ClassDeclaration */ ||
+ node.kind === 198 /* ClassExpression */ || node.kind === 230 /* TypeAliasDeclaration */) {
var declaration = node;
if (declaration.typeParameters) {
result = appendTypeParameters(result, declaration.typeParameters);
@@ -27469,29 +29548,50 @@ var ts;
function getTypeParametersOfClassOrInterface(symbol) {
return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
}
+ // A type is a mixin constructor if it has a single construct signature taking no type parameters and a single
+ // rest parameter of type any[].
+ function isMixinConstructorType(type) {
+ var signatures = getSignaturesOfType(type, 1 /* Construct */);
+ if (signatures.length === 1) {
+ var s = signatures[0];
+ return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType;
+ }
+ return false;
+ }
function isConstructorType(type) {
- return type.flags & 32768 /* Object */ && getSignaturesOfType(type, 1 /* Construct */).length > 0;
+ if (isValidBaseType(type) && getSignaturesOfType(type, 1 /* Construct */).length > 0) {
+ return true;
+ }
+ if (type.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(type);
+ return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
+ }
+ return false;
}
function getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
}
- function getConstructorsForTypeArguments(type, typeArgumentNodes) {
- var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
- return ts.filter(getSignaturesOfType(type, 1 /* Construct */), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; });
+ function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var typeArgCount = ts.length(typeArgumentNodes);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ return ts.filter(getSignaturesOfType(type, 1 /* Construct */), function (sig) { return (isJavaScript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= ts.length(sig.typeParameters); });
}
- function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
- var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
+ function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
if (typeArgumentNodes) {
var typeArguments_1 = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.map(signatures, function (sig) { return getSignatureInstantiation(sig, typeArguments_1); });
}
return signatures;
}
- // The base constructor of a class can resolve to
- // undefinedType if the class has no extends clause,
- // unknownType if an error occurred during resolution of the extends expression,
- // nullType if the extends expression is the null value, or
- // an object type with at least one construct signature.
+ /**
+ * The base constructor of a class can resolve to
+ * * undefinedType if the class has no extends clause,
+ * * unknownType if an error occurred during resolution of the extends expression,
+ * * nullType if the extends expression is the null value,
+ * * anyType if the extends expression has type any, or
+ * * an object type with at least one construct signature.
+ */
function getBaseConstructorTypeOfClass(type) {
if (!type.resolvedBaseConstructorType) {
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -27502,7 +29602,7 @@ var ts;
return unknownType;
}
var baseConstructorType = checkExpression(baseTypeNode.expression);
- if (baseConstructorType.flags & 32768 /* Object */) {
+ if (baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */)) {
// Resolving the members of a class requires us to resolve the base class of that class.
// We force resolution here such that we catch circularities now.
resolveStructuredTypeMembers(baseConstructorType);
@@ -27511,7 +29611,7 @@ var ts;
error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
return type.resolvedBaseConstructorType = unknownType;
}
- if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
+ if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
return type.resolvedBaseConstructorType = unknownType;
}
@@ -27540,8 +29640,8 @@ var ts;
}
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
- var baseConstructorType = getBaseConstructorTypeOfClass(type);
- if (!(baseConstructorType.flags & 32768 /* Object */)) {
+ var baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));
+ if (!(baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */ | 1 /* Any */))) {
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -27554,11 +29654,14 @@ var ts;
// type arguments in the same manner as a type reference to get the same error reporting experience.
baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
}
+ else if (baseConstructorType.flags & 1 /* Any */) {
+ baseType = baseConstructorType;
+ }
else {
// The class derives from a "class-like" constructor function, check that we have at least one construct signature
// with a matching number of type parameters and use the return type of the first instantiated signature. Elsewhere
// we check that all instantiated signatures return the same type.
- var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);
if (!constructors.length) {
error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);
return;
@@ -27576,7 +29679,7 @@ var ts;
if (baseType === unknownType) {
return;
}
- if (!(getObjectFlags(getTargetType(baseType)) & 3 /* ClassOrInterface */)) {
+ if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
return;
}
@@ -27602,16 +29705,22 @@ var ts;
}
return true;
}
+ // A valid base type is `any`, any non-generic object type or intersection of non-generic
+ // object types.
+ function isValidBaseType(type) {
+ return type.flags & (32768 /* Object */ | 16777216 /* NonPrimitive */ | 1 /* Any */) && !isGenericMappedType(type) ||
+ type.flags & 131072 /* Intersection */ && !ts.forEach(type.types, function (t) { return !isValidBaseType(t); });
+ }
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) {
+ if (declaration.kind === 229 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) {
for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
var node = _c[_b];
var baseType = getTypeFromTypeNode(node);
if (baseType !== unknownType) {
- if (getObjectFlags(getTargetType(baseType)) & 3 /* ClassOrInterface */) {
+ if (isValidBaseType(baseType)) {
if (type !== baseType && !hasBaseType(baseType, type)) {
if (type.resolvedBaseTypes === emptyArray) {
type.resolvedBaseTypes = [baseType];
@@ -27638,7 +29747,7 @@ var ts;
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ if (declaration.kind === 229 /* InterfaceDeclaration */) {
if (declaration.flags & 64 /* ContainsThis */) {
return false;
}
@@ -27676,7 +29785,7 @@ var ts;
type.outerTypeParameters = outerTypeParameters;
type.localTypeParameters = localTypeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384 /* TypeParameter */);
@@ -27695,7 +29804,7 @@ var ts;
if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 285 /* JSDocTypedefTag */);
+ var declaration = ts.getDeclarationOfKind(symbol, 289 /* JSDocTypedefTag */);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -27706,7 +29815,7 @@ var ts;
}
}
else {
- declaration = ts.getDeclarationOfKind(symbol, 228 /* TypeAliasDeclaration */);
+ declaration = ts.getDeclarationOfKind(symbol, 230 /* TypeAliasDeclaration */);
type = getTypeFromTypeNode(declaration.type);
}
if (popTypeResolution()) {
@@ -27716,7 +29825,7 @@ var ts;
// an instantiation of the type alias with the type parameters supplied as type arguments.
links.typeParameters = typeParameters;
links.instantiations = ts.createMap();
- links.instantiations[getTypeListId(typeParameters)] = type;
+ links.instantiations.set(getTypeListId(typeParameters), type);
}
}
else {
@@ -27733,14 +29842,14 @@ var ts;
return !ts.isInAmbientContext(member);
}
return expr.kind === 8 /* NumericLiteral */ ||
- expr.kind === 190 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
+ expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */ ||
- expr.kind === 70 /* Identifier */ && !!symbol.exports[expr.text];
+ expr.kind === 70 /* Identifier */ && !!symbol.exports.get(expr.text);
}
function enumHasLiteralMembers(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229 /* EnumDeclaration */) {
+ if (declaration.kind === 231 /* EnumDeclaration */) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
if (!isLiteralEnumMember(symbol, member)) {
@@ -27765,10 +29874,10 @@ var ts;
enumType.symbol = symbol;
if (enumHasLiteralMembers(symbol)) {
var memberTypeList = [];
- var memberTypes = ts.createMap();
+ var memberTypes = [];
for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229 /* EnumDeclaration */) {
+ if (declaration.kind === 231 /* EnumDeclaration */) {
computeEnumMemberValues(declaration);
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
@@ -27785,7 +29894,7 @@ var ts;
if (memberTypeList.length > 1) {
enumType.flags |= 65536 /* Union */;
enumType.types = memberTypeList;
- unionTypes[getTypeListId(memberTypeList)] = enumType;
+ unionTypes.set(getTypeListId(memberTypeList), enumType);
}
}
}
@@ -27806,9 +29915,6 @@ var ts;
if (!links.declaredType) {
var type = createType(16384 /* TypeParameter */);
type.symbol = symbol;
- if (!ts.getDeclarationOfKind(symbol, 143 /* TypeParameter */).constraint) {
- type.constraint = noConstraintType;
- }
links.declaredType = type;
}
return links.declaredType;
@@ -27821,7 +29927,6 @@ var ts;
return links.declaredType;
}
function getDeclaredTypeOfSymbol(symbol) {
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0);
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
@@ -27860,19 +29965,20 @@ var ts;
function isIndependentType(node) {
switch (node.kind) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 133 /* ObjectKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 129 /* NeverKeyword */:
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return true;
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return isIndependentType(node.elementType);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return isIndependentTypeReference(node);
}
return false;
@@ -27885,7 +29991,7 @@ var ts;
// A function-like declaration is considered independent (free of this references) if it has a return type
// annotation that is considered independent and if each parameter is considered independent.
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 150 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
+ if (node.kind !== 151 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
return false;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
@@ -27906,12 +30012,12 @@ var ts;
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return isIndependentVariableLikeDeclaration(declaration);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
return isIndependentFunctionLikeDeclaration(declaration);
}
}
@@ -27922,7 +30028,7 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
- result[symbol.name] = symbol;
+ result.set(symbol.name, symbol);
}
return result;
}
@@ -27932,15 +30038,15 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
- result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper);
+ result.set(symbol.name, mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper));
}
return result;
}
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
- if (!symbols[s.name]) {
- symbols[s.name] = s;
+ if (!symbols.has(s.name)) {
+ symbols.set(s.name, s);
}
}
}
@@ -27948,8 +30054,8 @@ var ts;
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
- type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
- type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
+ type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members.get("__call"));
+ type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members.get("__new"));
type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */);
type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */);
}
@@ -27957,7 +30063,14 @@ var ts;
}
function getTypeWithThisArgument(type, thisArgument) {
if (getObjectFlags(type) & 4 /* Reference */) {
- return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
+ var target = type.target;
+ var typeArguments = type.typeArguments;
+ if (ts.length(target.typeParameters) === ts.length(typeArguments)) {
+ return createTypeReference(target, ts.concatenate(typeArguments, [thisArgument || target.thisType]));
+ }
+ }
+ else if (type.flags & 131072 /* Intersection */) {
+ return getIntersectionType(ts.map(type.types, function (t) { return getTypeWithThisArgument(t, thisArgument); }));
}
return type;
}
@@ -27993,10 +30106,14 @@ var ts;
for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
var baseType = baseTypes_1[_i];
var instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;
- addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
+ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */));
constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */));
- stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0 /* String */);
+ if (!stringIndexInfo) {
+ stringIndexInfo = instantiatedBaseType === anyType ?
+ createIndexInfo(anyType, /*isReadonly*/ false) :
+ getIndexInfoOfType(instantiatedBaseType, 0 /* String */);
+ }
numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1 /* Number */);
}
}
@@ -28035,14 +30152,16 @@ var ts;
return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)];
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
+ var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
- var typeArgCount = typeArguments ? typeArguments.length : 0;
+ var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var baseSig = baseSignatures_1[_i];
- var typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0;
- if (typeParamCount === typeArgCount) {
- var sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig);
+ var minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);
+ var typeParamCount = ts.length(baseSig.typeParameters);
+ if ((isJavaScript || typeArgCount >= minTypeArgumentCount) && typeArgCount <= typeParamCount) {
+ var sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, baseTypeNode)) : cloneSignature(baseSig);
sig.typeParameters = classType.localTypeParameters;
sig.resolvedReturnType = classType;
result.push(sig);
@@ -28105,7 +30224,7 @@ var ts;
s = cloneSignature(signature);
if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) {
var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), /*subtypeReduction*/ true);
- s.thisParameter = createTransientSymbol(signature.thisParameter, thisType);
+ s.thisParameter = createSymbolWithType(signature.thisParameter, thisType);
}
// Clear resolved return type we possibly got from cloneSignature
s.resolvedReturnType = undefined;
@@ -28121,8 +30240,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
- var type = types_1[_i];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type = types_2[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -28150,22 +30269,57 @@ var ts;
function unionSpreadIndexInfos(info1, info2) {
return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
}
+ function includeMixinType(type, types, index) {
+ var mixedTypes = [];
+ for (var i = 0; i < types.length; i++) {
+ if (i === index) {
+ mixedTypes.push(type);
+ }
+ else if (isMixinConstructorType(types[i])) {
+ mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1 /* Construct */)[0]));
+ }
+ }
+ return getIntersectionType(mixedTypes);
+ }
function resolveIntersectionTypeMembers(type) {
// The members and properties collections are empty for intersection types. To get all properties of an
// intersection type use getPropertiesOfType (only the language service uses this).
var callSignatures = emptyArray;
var constructSignatures = emptyArray;
- var stringIndexInfo = undefined;
- var numberIndexInfo = undefined;
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var t = _a[_i];
+ var stringIndexInfo;
+ var numberIndexInfo;
+ var types = type.types;
+ var mixinCount = ts.countWhere(types, isMixinConstructorType);
+ var _loop_3 = function (i) {
+ var t = type.types[i];
+ // When an intersection type contains mixin constructor types, the construct signatures from
+ // those types are discarded and their return types are mixed into the return types of all
+ // other construct signatures in the intersection type. For example, the intersection type
+ // '{ new(...args: any[]) => A } & { new(s: string) => B }' has a single construct signature
+ // 'new(s: string) => A & B'.
+ if (mixinCount === 0 || mixinCount === types.length && i === 0 || !isMixinConstructorType(t)) {
+ var signatures = getSignaturesOfType(t, 1 /* Construct */);
+ if (signatures.length && mixinCount > 0) {
+ signatures = ts.map(signatures, function (s) {
+ var clone = cloneSignature(s);
+ clone.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, i);
+ return clone;
+ });
+ }
+ constructSignatures = ts.concatenate(constructSignatures, signatures);
+ }
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0 /* Call */));
- constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1 /* Construct */));
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0 /* String */));
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1 /* Number */));
+ };
+ for (var i = 0; i < types.length; i++) {
+ _loop_3(i);
}
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
}
+ /**
+ * Converts an AnonymousType to a ResolvedType.
+ */
function resolveAnonymousTypeMembers(type) {
var symbol = type.symbol;
if (type.target) {
@@ -28178,8 +30332,8 @@ var ts;
}
else if (symbol.flags & 2048 /* TypeLiteral */) {
var members = symbol.members;
- var callSignatures = getSignaturesOfSymbol(members["__call"]);
- var constructSignatures = getSignaturesOfSymbol(members["__new"]);
+ var callSignatures = getSignaturesOfSymbol(members.get("__call"));
+ var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */);
var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */);
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
@@ -28188,23 +30342,27 @@ var ts;
// Combinations of function, class, enum and module
var members = emptySymbols;
var constructSignatures = emptyArray;
- if (symbol.flags & 1952 /* HasExports */) {
+ var stringIndexInfo = undefined;
+ if (symbol.exports) {
members = getExportsOfSymbol(symbol);
}
if (symbol.flags & 32 /* Class */) {
var classType = getDeclaredTypeOfClassOrInterface(symbol);
- constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
+ constructSignatures = getSignaturesOfSymbol(symbol.members.get("__constructor"));
if (!constructSignatures.length) {
constructSignatures = getDefaultConstructSignatures(classType);
}
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
- if (baseConstructorType.flags & 32768 /* Object */) {
+ if (baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */ | 540672 /* TypeVariable */)) {
members = createSymbolTable(getNamedMembers(members));
- addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType));
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
+ }
+ else if (baseConstructorType === anyType) {
+ stringIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
}
}
var numberIndexInfo = symbol.flags & 384 /* Enum */ ? enumNumberIndexInfo : undefined;
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo);
+ setStructuredTypeMembers(type, members, emptyArray, constructSignatures, stringIndexInfo, numberIndexInfo);
// We resolve the members before computing the signatures because a signature may use
// typeof with a qualified name expression that circularly references the type we are
// in the process of resolving (see issue #6072). The temporarily empty signature list
@@ -28218,7 +30376,6 @@ var ts;
function resolveMappedTypeMembers(type) {
var members = ts.createMap();
var stringIndexInfo;
- var numberIndexInfo;
// Resolve upfront such that recursive references see an empty object type.
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
// In { [P in K]: T }, we refer to P as the type parameter type, K as the constraint type,
@@ -28226,43 +30383,53 @@ var ts;
var typeParameter = getTypeParameterFromMappedType(type);
var constraintType = getConstraintTypeFromMappedType(type);
var templateType = getTemplateTypeFromMappedType(type);
- var isReadonly = !!type.declaration.readonlyToken;
- var isOptional = !!type.declaration.questionToken;
- // First, if the constraint type is a type parameter, obtain the base constraint. Then,
- // if the key type is a 'keyof X', obtain 'keyof C' where C is the base constraint of X.
- // Finally, iterate over the constituents of the resulting iteration type.
- var keyType = constraintType.flags & 16384 /* TypeParameter */ ? getApparentType(constraintType) : constraintType;
- var iterationType = keyType.flags & 262144 /* Index */ ? getIndexType(getApparentType(keyType.type)) : keyType;
- forEachType(iterationType, function (t) {
+ var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); // The 'T' in 'keyof T'
+ var templateReadonly = !!type.declaration.readonlyToken;
+ var templateOptional = !!type.declaration.questionToken;
+ if (type.declaration.typeParameter.constraint.kind === 169 /* TypeOperator */) {
+ // We have a { [P in keyof T]: X }
+ for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
+ var propertySymbol = _a[_i];
+ addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol);
+ }
+ if (getIndexInfoOfType(modifiersType, 0 /* String */)) {
+ addMemberForKeyType(stringType);
+ }
+ }
+ else {
+ // First, if the constraint type is a type parameter, obtain the base constraint. Then,
+ // if the key type is a 'keyof X', obtain 'keyof C' where C is the base constraint of X.
+ // Finally, iterate over the constituents of the resulting iteration type.
+ var keyType = constraintType.flags & 540672 /* TypeVariable */ ? getApparentType(constraintType) : constraintType;
+ var iterationType = keyType.flags & 262144 /* Index */ ? getIndexType(getApparentType(keyType.type)) : keyType;
+ forEachType(iterationType, addMemberForKeyType);
+ }
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
+ function addMemberForKeyType(t, propertySymbol) {
// Create a mapper from T to the current iteration type constituent. Then, if the
// mapped type is itself an instantiated type, combine the iteration mapper with the
// instantiation mapper.
- var iterationMapper = createUnaryTypeMapper(typeParameter, t);
+ var iterationMapper = createTypeMapper([typeParameter], [t]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
- // If the current iteration type constituent is a literal type, create a property.
- // Otherwise, for type string create a string index signature and for type number
- // create a numeric index signature.
- if (t.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */)) {
+ // If the current iteration type constituent is a string literal type, create a property.
+ // Otherwise, for type string create a string index signature.
+ if (t.flags & 32 /* StringLiteral */) {
var propName = t.text;
- var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | (isOptional ? 536870912 /* Optional */ : 0), propName);
- prop.type = addOptionality(propType, isOptional);
- prop.isReadonly = isReadonly;
- members[propName] = prop;
+ var modifiersProp = getPropertyOfType(modifiersType, propName);
+ var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864 /* Optional */);
+ var prop = createSymbol(4 /* Property */ | (isOptional ? 67108864 /* Optional */ : 0), propName);
+ prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? 8 /* Readonly */ : 0;
+ prop.type = propType;
+ if (propertySymbol) {
+ prop.syntheticOrigin = propertySymbol;
+ }
+ members.set(propName, prop);
}
else if (t.flags & 2 /* String */) {
- stringIndexInfo = createIndexInfo(propType, isReadonly);
- }
- else if (t.flags & 4 /* Number */) {
- numberIndexInfo = createIndexInfo(propType, isReadonly);
+ stringIndexInfo = createIndexInfo(propType, templateReadonly);
}
- });
- // If we created both a string and a numeric string index signature, and if the two index
- // signatures have identical types, discard the redundant numeric index signature.
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
- numberIndexInfo = undefined;
}
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
function getTypeParameterFromMappedType(type) {
return type.typeParameter ||
@@ -28275,16 +30442,34 @@ var ts;
function getTemplateTypeFromMappedType(type) {
return type.templateType ||
(type.templateType = type.declaration.type ?
- instantiateType(getTypeFromTypeNode(type.declaration.type), type.mapper || identityMapper) :
+ instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!type.declaration.questionToken), type.mapper || identityMapper) :
unknownType);
}
- function getErasedTemplateTypeFromMappedType(type) {
- return instantiateType(getTemplateTypeFromMappedType(type), createUnaryTypeMapper(getTypeParameterFromMappedType(type), anyType));
+ function getModifiersTypeFromMappedType(type) {
+ if (!type.modifiersType) {
+ var constraintDeclaration = type.declaration.typeParameter.constraint;
+ if (constraintDeclaration.kind === 169 /* TypeOperator */) {
+ // If the constraint declaration is a 'keyof T' node, the modifiers type is T. We check
+ // AST nodes here because, when T is a non-generic type, the logic below eagerly resolves
+ // 'keyof T' to a literal union type and we can't recover T from that type.
+ type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper);
+ }
+ else {
+ // Otherwise, get the declared constraint type, and if the constraint type is a type parameter,
+ // get the constraint of that type parameter. If the resulting type is an indexed type 'keyof T',
+ // the modifiers type is T. Otherwise, the modifiers type is {}.
+ var declaredType = getTypeFromMappedTypeNode(type.declaration);
+ var constraint = getConstraintTypeFromMappedType(declaredType);
+ var extendedConstraint = constraint && constraint.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(constraint) : constraint;
+ type.modifiersType = extendedConstraint && extendedConstraint.flags & 262144 /* Index */ ? instantiateType(extendedConstraint.type, type.mapper || identityMapper) : emptyObjectType;
+ }
+ }
+ return type.modifiersType;
}
function isGenericMappedType(type) {
if (getObjectFlags(type) & 32 /* Mapped */) {
var constraintType = getConstraintTypeFromMappedType(type);
- return !!(constraintType.flags & (16384 /* TypeParameter */ | 262144 /* Index */));
+ return maybeTypeOfKind(constraintType, 540672 /* TypeVariable */ | 262144 /* Index */);
}
return false;
}
@@ -28321,42 +30506,40 @@ var ts;
return emptyArray;
}
/** If the given type is an object type and that type has a property by the given name,
- * return the symbol for that property. Otherwise return undefined. */
+ * return the symbol for that property. Otherwise return undefined.
+ */
function getPropertyOfObjectType(type, name) {
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
}
}
function getPropertiesOfUnionOrIntersectionType(type) {
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var current = _a[_i];
- for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
- var prop = _c[_b];
- getUnionOrIntersectionProperty(type, prop.name);
- }
- // The properties of a union type are those that are present in all constituent types, so
- // we only need to check the properties of the first type
- if (type.flags & 65536 /* Union */) {
- break;
- }
- }
- var props = type.resolvedProperties;
- if (props) {
- var result = [];
- for (var key in props) {
- var prop = props[key];
- // We need to filter out partial properties in union types
- if (!(prop.flags & 268435456 /* SyntheticProperty */ && prop.isPartial)) {
- result.push(prop);
+ if (!type.resolvedProperties) {
+ var members = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var current = _a[_i];
+ for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
+ var prop = _c[_b];
+ if (!members.has(prop.name)) {
+ var combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.name);
+ if (combinedProp) {
+ members.set(prop.name, combinedProp);
+ }
+ }
+ }
+ // The properties of a union type are those that are present in all constituent types, so
+ // we only need to check the properties of the first type
+ if (type.flags & 65536 /* Union */) {
+ break;
}
}
- return result;
+ type.resolvedProperties = getNamedMembers(members);
}
- return emptyArray;
+ return type.resolvedProperties;
}
function getPropertiesOfType(type) {
type = getApparentType(type);
@@ -28364,25 +30547,114 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getConstraintOfType(type) {
+ return type.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(type) :
+ type.flags & 524288 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) :
+ getBaseConstraintOfType(type);
+ }
+ function getConstraintOfTypeParameter(typeParameter) {
+ return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined;
+ }
+ function getConstraintOfIndexedAccess(type) {
+ var baseObjectType = getBaseConstraintOfType(type.objectType);
+ var baseIndexType = getBaseConstraintOfType(type.indexType);
+ return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined;
+ }
+ function getBaseConstraintOfType(type) {
+ if (type.flags & (540672 /* TypeVariable */ | 196608 /* UnionOrIntersection */)) {
+ var constraint = getResolvedBaseConstraint(type);
+ if (constraint !== noConstraintType && constraint !== circularConstraintType) {
+ return constraint;
+ }
+ }
+ else if (type.flags & 262144 /* Index */) {
+ return stringType;
+ }
+ return undefined;
+ }
+ function hasNonCircularBaseConstraint(type) {
+ return getResolvedBaseConstraint(type) !== circularConstraintType;
+ }
/**
- * The apparent type of a type parameter is the base constraint instantiated with the type parameter
- * as the type argument for the 'this' type.
+ * Return the resolved base constraint of a type variable. The noConstraintType singleton is returned if the
+ * type variable has no constraint, and the circularConstraintType singleton is returned if the constraint
+ * circularly references the type variable.
*/
- function getApparentTypeOfTypeParameter(type) {
- if (!type.resolvedApparentType) {
- var constraintType = getConstraintOfTypeParameter(type);
- while (constraintType && constraintType.flags & 16384 /* TypeParameter */) {
- constraintType = getConstraintOfTypeParameter(constraintType);
+ function getResolvedBaseConstraint(type) {
+ var typeStack;
+ var circular;
+ if (!type.resolvedBaseConstraint) {
+ typeStack = [];
+ var constraint = getBaseConstraint(type);
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType, type);
+ }
+ return type.resolvedBaseConstraint;
+ function getBaseConstraint(t) {
+ if (ts.contains(typeStack, t)) {
+ circular = true;
+ return undefined;
+ }
+ typeStack.push(t);
+ var result = computeBaseConstraint(t);
+ typeStack.pop();
+ return result;
+ }
+ function computeBaseConstraint(t) {
+ if (t.flags & 16384 /* TypeParameter */) {
+ var constraint = getConstraintFromTypeParameter(t);
+ return t.isThisType ? constraint :
+ constraint ? getBaseConstraint(constraint) : undefined;
+ }
+ if (t.flags & 196608 /* UnionOrIntersection */) {
+ var types = t.types;
+ var baseTypes = [];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var type_2 = types_3[_i];
+ var baseType = getBaseConstraint(type_2);
+ if (baseType) {
+ baseTypes.push(baseType);
+ }
+ }
+ return t.flags & 65536 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) :
+ t.flags & 131072 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) :
+ undefined;
}
- type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
+ if (t.flags & 262144 /* Index */) {
+ return stringType;
+ }
+ if (t.flags & 524288 /* IndexedAccess */) {
+ var baseObjectType = getBaseConstraint(t.objectType);
+ var baseIndexType = getBaseConstraint(t.indexType);
+ var baseIndexedAccess = baseObjectType && baseIndexType ? getIndexedAccessType(baseObjectType, baseIndexType) : undefined;
+ return baseIndexedAccess && baseIndexedAccess !== unknownType ? getBaseConstraint(baseIndexedAccess) : undefined;
+ }
+ return t;
}
- return type.resolvedApparentType;
+ }
+ function getApparentTypeOfIntersectionType(type) {
+ return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type));
}
/**
- * The apparent type of an indexed access T[K] is the type of T's string index signature, if any.
+ * Gets the default type for a type parameter.
+ *
+ * If the type parameter is the result of an instantiation, this gets the instantiated
+ * default type of its target. If the type parameter has no default type, `undefined`
+ * is returned.
+ *
+ * This function *does not* perform a circularity check.
*/
- function getApparentTypeOfIndexedAccess(type) {
- return getIndexTypeOfType(getApparentType(type.objectType), 0 /* String */) || type;
+ function getDefaultFromTypeParameter(typeParameter) {
+ if (!typeParameter.default) {
+ if (typeParameter.target) {
+ var targetDefault = getDefaultFromTypeParameter(typeParameter.target);
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;
+ }
+ else {
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameter(decl) && decl.default; });
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
+ }
+ }
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
}
/**
* For a type parameter, return the base constraint of the type parameter. For the string, number,
@@ -28390,28 +30662,31 @@ var ts;
* type itself. Note that the apparent type of a union type is the union type itself.
*/
function getApparentType(type) {
- var t = type.flags & 16384 /* TypeParameter */ ? getApparentTypeOfTypeParameter(type) :
- type.flags & 524288 /* IndexedAccess */ ? getApparentTypeOfIndexedAccess(type) :
- type;
- return t.flags & 262178 /* StringLike */ ? globalStringType :
- t.flags & 340 /* NumberLike */ ? globalNumberType :
- t.flags & 136 /* BooleanLike */ ? globalBooleanType :
- t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType() :
- t;
+ var t = type.flags & 540672 /* TypeVariable */ ? getBaseConstraintOfType(type) || emptyObjectType : type;
+ return t.flags & 131072 /* Intersection */ ? getApparentTypeOfIntersectionType(t) :
+ t.flags & 262178 /* StringLike */ ? globalStringType :
+ t.flags & 340 /* NumberLike */ ? globalNumberType :
+ t.flags & 136 /* BooleanLike */ ? globalBooleanType :
+ t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) :
+ t.flags & 16777216 /* NonPrimitive */ ? emptyObjectType :
+ t;
}
function createUnionOrIntersectionProperty(containingType, name) {
- var types = containingType.types;
var props;
+ var types = containingType.types;
+ var isUnion = containingType.flags & 65536 /* Union */;
+ var excludeModifiers = isUnion ? 24 /* NonPublicAccessibilityModifier */ : 0;
// Flags we want to propagate to the result if they exist in all source symbols
- var commonFlags = (containingType.flags & 131072 /* Intersection */) ? 536870912 /* Optional */ : 0 /* None */;
- var isReadonly = false;
- var isPartial = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var current = types_2[_i];
+ var commonFlags = isUnion ? 0 /* None */ : 67108864 /* Optional */;
+ var syntheticFlag = 4 /* SyntheticMethod */;
+ var checkFlags = 0;
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var current = types_4[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- if (prop && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */))) {
+ var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
props = [prop];
@@ -28419,25 +30694,29 @@ var ts;
else if (!ts.contains(props, prop)) {
props.push(prop);
}
- if (isReadonlySymbol(prop)) {
- isReadonly = true;
+ checkFlags |= (isReadonlySymbol(prop) ? 8 /* Readonly */ : 0) |
+ (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 64 /* ContainsPublic */ : 0) |
+ (modifiers & 16 /* Protected */ ? 128 /* ContainsProtected */ : 0) |
+ (modifiers & 8 /* Private */ ? 256 /* ContainsPrivate */ : 0) |
+ (modifiers & 32 /* Static */ ? 512 /* ContainsStatic */ : 0);
+ if (!isMethodLike(prop)) {
+ syntheticFlag = 2 /* SyntheticProperty */;
}
}
- else if (containingType.flags & 65536 /* Union */) {
- isPartial = true;
+ else if (isUnion) {
+ checkFlags |= 16 /* Partial */;
}
}
}
if (!props) {
return undefined;
}
- if (props.length === 1 && !isPartial) {
+ if (props.length === 1 && !(checkFlags & 16 /* Partial */)) {
return props[0];
}
var propTypes = [];
var declarations = [];
var commonType = undefined;
- var hasNonUniformType = false;
for (var _a = 0, props_1 = props; _a < props_1.length; _a++) {
var prop = props_1[_a];
if (prop.declarations) {
@@ -28448,17 +30727,15 @@ var ts;
commonType = type;
}
else if (type !== commonType) {
- hasNonUniformType = true;
+ checkFlags |= 32 /* HasNonUniformType */;
}
propTypes.push(type);
}
- var result = createSymbol(4 /* Property */ | 67108864 /* Transient */ | 268435456 /* SyntheticProperty */ | commonFlags, name);
+ var result = createSymbol(4 /* Property */ | commonFlags, name);
+ result.checkFlags = syntheticFlag | checkFlags;
result.containingType = containingType;
- result.hasNonUniformType = hasNonUniformType;
- result.isPartial = isPartial;
result.declarations = declarations;
- result.isReadonly = isReadonly;
- result.type = containingType.flags & 65536 /* Union */ ? getUnionType(propTypes) : getIntersectionType(propTypes);
+ result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
return result;
}
// Return the symbol for a given property in a union or intersection type, or undefined if the property
@@ -28467,12 +30744,12 @@ var ts;
// these partial properties when identifying discriminant properties, but otherwise they are filtered out
// and do not appear to be present in the union type.
function getUnionOrIntersectionProperty(type, name) {
- var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap());
- var property = properties[name];
+ var properties = type.propertyCache || (type.propertyCache = ts.createMap());
+ var property = properties.get(name);
if (!property) {
property = createUnionOrIntersectionProperty(type, name);
if (property) {
- properties[name] = property;
+ properties.set(name, property);
}
}
return property;
@@ -28480,7 +30757,7 @@ var ts;
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
// We need to filter out partial properties in union types
- return property && !(property.flags & 268435456 /* SyntheticProperty */ && property.isPartial) ? property : undefined;
+ return property && !(getCheckFlags(property) & 16 /* Partial */) ? property : undefined;
}
/**
* Return the symbol for the property with the given name in the given type. Creates synthetic union properties when
@@ -28494,7 +30771,7 @@ var ts;
type = getApparentType(type);
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
@@ -28561,7 +30838,7 @@ var ts;
return undefined;
}
function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
var templateTag = ts.getJSDocTemplateTag(declaration);
if (templateTag) {
return getTypeParametersFromDeclaration(templateTag.typeParameters);
@@ -28583,16 +30860,16 @@ var ts;
}
function symbolsToArray(symbols) {
var result = [];
- for (var id in symbols) {
+ symbols.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
- result.push(symbols[id]);
+ result.push(symbol);
}
- }
+ });
return result;
}
function isJSDocOptionalParameter(node) {
- if (node.flags & 2097152 /* JavaScriptFile */) {
- if (node.type && node.type.kind === 273 /* JSDocOptionalType */) {
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ if (node.type && node.type.kind === 277 /* JSDocOptionalType */) {
return true;
}
var paramTags = ts.getJSDocParameterTags(node);
@@ -28603,7 +30880,7 @@ var ts;
return true;
}
if (paramTag.typeExpression) {
- return paramTag.typeExpression.type.kind === 273 /* JSDocOptionalType */;
+ return paramTag.typeExpression.type.kind === 277 /* JSDocOptionalType */;
}
}
}
@@ -28628,6 +30905,12 @@ var ts;
ts.Debug.assert(parameterIndex >= 0);
return parameterIndex >= signature.minArgumentCount;
}
+ var iife = ts.getImmediatelyInvokedFunctionExpression(node.parent);
+ if (iife) {
+ return !node.type &&
+ !node.dotDotDotToken &&
+ ts.indexOf(node.parent.parameters, node) >= iife.arguments.length;
+ }
return false;
}
function createTypePredicateFromTypePredicateNode(node) {
@@ -28647,19 +30930,68 @@ var ts;
};
}
}
+ /**
+ * Gets the minimum number of type arguments needed to satisfy all non-optional type
+ * parameters.
+ */
+ function getMinTypeArgumentCount(typeParameters) {
+ var minTypeArgumentCount = 0;
+ if (typeParameters) {
+ for (var i = 0; i < typeParameters.length; i++) {
+ if (!getDefaultFromTypeParameter(typeParameters[i])) {
+ minTypeArgumentCount = i + 1;
+ }
+ }
+ }
+ return minTypeArgumentCount;
+ }
+ /**
+ * Fill in default types for unsupplied type arguments. If `typeArguments` is undefined
+ * when a default type is supplied, a new array will be created and returned.
+ *
+ * @param typeArguments The supplied type arguments.
+ * @param typeParameters The requested type parameters.
+ * @param minTypeArgumentCount The minimum number of required type arguments.
+ */
+ function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, location) {
+ var numTypeParameters = ts.length(typeParameters);
+ if (numTypeParameters) {
+ var numTypeArguments = ts.length(typeArguments);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ if ((isJavaScript || numTypeArguments >= minTypeArgumentCount) && numTypeArguments <= numTypeParameters) {
+ if (!typeArguments) {
+ typeArguments = [];
+ }
+ // Map an unsatisfied type parameter with a default type.
+ // If a type parameter does not have a default type, or if the default type
+ // is a forward reference, the empty object type is used.
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ typeArguments[i] = isJavaScript ? anyType : emptyObjectType;
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ var mapper = createTypeMapper(typeParameters, typeArguments);
+ var defaultType = getDefaultFromTypeParameter(typeParameters[i]);
+ typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : isJavaScript ? anyType : emptyObjectType;
+ }
+ }
+ }
+ return typeArguments;
+ }
function getSignatureFromDeclaration(declaration) {
var links = getNodeLinks(declaration);
if (!links.resolvedSignature) {
var parameters = [];
var hasLiteralTypes = false;
- var minArgumentCount = -1;
+ var minArgumentCount = 0;
var thisParameter = undefined;
var hasThisParameter = void 0;
+ var iife = ts.getImmediatelyInvokedFunctionExpression(declaration);
var isJSConstructSignature = ts.isJSDocConstructSignature(declaration);
+ var isUntypedSignatureInJSFile = !iife && !isJSConstructSignature && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration);
// If this is a JSDoc construct signature, then skip the first parameter in the
// parameter list. The first parameter represents the return type of the construct
// signature.
- for (var i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) {
+ for (var i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
var param = declaration.parameters[i];
var paramSymbol = param.symbol;
// Include parameter symbol instead of property symbol in the signature
@@ -28674,43 +31006,36 @@ var ts;
else {
parameters.push(paramSymbol);
}
- if (param.type && param.type.kind === 171 /* LiteralType */) {
+ if (param.type && param.type.kind === 172 /* LiteralType */) {
hasLiteralTypes = true;
}
- if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {
- if (minArgumentCount < 0) {
- minArgumentCount = i - (hasThisParameter ? 1 : 0);
- }
- }
- else {
- // If we see any required parameters, it means the prior ones were not in fact optional.
- minArgumentCount = -1;
+ // Record a new minimum argument count if this is not an optional parameter
+ var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken ||
+ iife && parameters.length > iife.arguments.length && !param.type ||
+ isJSDocOptionalParameter(param) ||
+ isUntypedSignatureInJSFile;
+ if (!isOptionalParameter_1) {
+ minArgumentCount = parameters.length;
}
}
// If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation
- if ((declaration.kind === 151 /* GetAccessor */ || declaration.kind === 152 /* SetAccessor */) &&
+ if ((declaration.kind === 152 /* GetAccessor */ || declaration.kind === 153 /* SetAccessor */) &&
!ts.hasDynamicName(declaration) &&
(!hasThisParameter || !thisParameter)) {
- var otherKind = declaration.kind === 151 /* GetAccessor */ ? 152 /* SetAccessor */ : 151 /* GetAccessor */;
+ var otherKind = declaration.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */;
var other = ts.getDeclarationOfKind(declaration.symbol, otherKind);
if (other) {
thisParameter = getAnnotatedAccessorThisParameter(other);
}
}
- if (minArgumentCount < 0) {
- minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0);
- }
- if (isJSConstructSignature) {
- minArgumentCount--;
- }
- var classType = declaration.kind === 150 /* Constructor */ ?
+ var classType = declaration.kind === 151 /* Constructor */ ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
var typeParameters = classType ? classType.localTypeParameters :
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
getTypeParametersFromJSDocTemplate(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
- var typePredicate = declaration.type && declaration.type.kind === 156 /* TypePredicate */ ?
+ var typePredicate = declaration.type && declaration.type.kind === 157 /* TypePredicate */ ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
@@ -28727,7 +31052,7 @@ var ts;
else if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
var type = getReturnTypeFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
@@ -28735,35 +31060,63 @@ var ts;
}
// TypeScript 1.0 spec (April 2014):
// If only one accessor includes a type annotation, the other behaves as if it had the same type annotation.
- if (declaration.kind === 151 /* GetAccessor */ && !ts.hasDynamicName(declaration)) {
- var setter = ts.getDeclarationOfKind(declaration.symbol, 152 /* SetAccessor */);
+ if (declaration.kind === 152 /* GetAccessor */ && !ts.hasDynamicName(declaration)) {
+ var setter = ts.getDeclarationOfKind(declaration.symbol, 153 /* SetAccessor */);
return getAnnotatedAccessorType(setter);
}
if (ts.nodeIsMissing(declaration.body)) {
return anyType;
}
}
+ function containsArgumentsReference(declaration) {
+ var links = getNodeLinks(declaration);
+ if (links.containsArgumentsReference === undefined) {
+ if (links.flags & 8192 /* CaptureArguments */) {
+ links.containsArgumentsReference = true;
+ }
+ else {
+ links.containsArgumentsReference = traverse(declaration.body);
+ }
+ }
+ return links.containsArgumentsReference;
+ function traverse(node) {
+ if (!node)
+ return false;
+ switch (node.kind) {
+ case 70 /* Identifier */:
+ return node.text === "arguments" && ts.isPartOfExpression(node);
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return node.name.kind === 143 /* ComputedPropertyName */
+ && traverse(node.name);
+ default:
+ return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse);
+ }
+ }
+ }
function getSignaturesOfSymbol(symbol) {
if (!symbol)
return emptyArray;
var result = [];
- for (var i = 0, len = symbol.declarations.length; i < len; i++) {
+ for (var i = 0; i < symbol.declarations.length; i++) {
var node = symbol.declarations[i];
switch (node.kind) {
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 278 /* JSDocFunctionType */:
// Don't include signature if node is the implementation of an overloaded function. A node is considered
// an implementation node if it has a body and the previous node is of the same kind and immediately
// precedes the implementation node (i.e. has the same parent and ends where the implementation starts).
@@ -28810,7 +31163,7 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
var declaration = signature.declaration;
if (declaration.name) {
error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
@@ -28834,9 +31187,14 @@ var ts;
return anyType;
}
function getSignatureInstantiation(signature, typeArguments) {
+ typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters));
var instantiations = signature.instantiations || (signature.instantiations = ts.createMap());
var id = getTypeListId(typeArguments);
- return instantiations[id] || (instantiations[id] = createSignatureInstantiation(signature, typeArguments));
+ var instantiation = instantiations.get(id);
+ if (!instantiation) {
+ instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
+ }
+ return instantiation;
}
function createSignatureInstantiation(signature, typeArguments) {
return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), /*eraseTypeParameters*/ true);
@@ -28855,7 +31213,7 @@ var ts;
// object type literal or interface (using the new keyword). Each way of declaring a constructor
// will result in a different declaration kind.
if (!signature.isolatedSignatureType) {
- var isConstructor = signature.declaration.kind === 150 /* Constructor */ || signature.declaration.kind === 154 /* ConstructSignature */;
+ var isConstructor = signature.declaration.kind === 151 /* Constructor */ || signature.declaration.kind === 155 /* ConstructSignature */;
var type = createObjectType(16 /* Anonymous */);
type.members = emptySymbols;
type.properties = emptyArray;
@@ -28866,10 +31224,10 @@ var ts;
return signature.isolatedSignatureType;
}
function getIndexSymbol(symbol) {
- return symbol.members["__index"];
+ return symbol.members.get("__index");
}
function getIndexDeclarationOfSymbol(symbol, kind) {
- var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 134 /* StringKeyword */;
+ var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 135 /* StringKeyword */;
var indexSymbol = getIndexSymbol(symbol);
if (indexSymbol) {
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
@@ -28896,21 +31254,9 @@ var ts;
return undefined;
}
function getConstraintDeclaration(type) {
- return ts.getDeclarationOfKind(type.symbol, 143 /* TypeParameter */).constraint;
+ return ts.getDeclarationOfKind(type.symbol, 144 /* TypeParameter */).constraint;
}
- function hasConstraintReferenceTo(type, target) {
- var checked;
- while (type && type.flags & 16384 /* TypeParameter */ && !(type.isThisType) && !ts.contains(checked, type)) {
- if (type === target) {
- return true;
- }
- (checked || (checked = [])).push(type);
- var constraintDeclaration = getConstraintDeclaration(type);
- type = constraintDeclaration && getTypeFromTypeNode(constraintDeclaration);
- }
- return false;
- }
- function getConstraintOfTypeParameter(typeParameter) {
+ function getConstraintFromTypeParameter(typeParameter) {
if (!typeParameter.constraint) {
if (typeParameter.target) {
var targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
@@ -28918,28 +31264,23 @@ var ts;
}
else {
var constraintDeclaration = getConstraintDeclaration(typeParameter);
- var constraint = getTypeFromTypeNode(constraintDeclaration);
- if (hasConstraintReferenceTo(constraint, typeParameter)) {
- error(constraintDeclaration, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
- constraint = unknownType;
- }
- typeParameter.constraint = constraint;
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType;
}
}
return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
}
function getParentSymbolOfTypeParameter(typeParameter) {
- return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 143 /* TypeParameter */).parent);
+ return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144 /* TypeParameter */).parent);
}
function getTypeListId(types) {
var result = "";
if (types) {
- var length_3 = types.length;
+ var length_4 = types.length;
var i = 0;
- while (i < length_3) {
+ while (i < length_4) {
var startId = types[i].id;
var count = 1;
- while (i + count < length_3 && types[i + count].id === startId + count) {
+ while (i + count < length_4 && types[i + count].id === startId + count) {
count++;
}
if (result.length) {
@@ -28960,8 +31301,8 @@ var ts;
// that care about the presence of such types at arbitrary depth in a containing type.
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
- var type = types_3[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -28970,9 +31311,10 @@ var ts;
}
function createTypeReference(target, typeArguments) {
var id = getTypeListId(typeArguments);
- var type = target.instantiations[id];
+ var type = target.instantiations.get(id);
if (!type) {
- type = target.instantiations[id] = createObjectType(4 /* Reference */, target.symbol);
+ type = createObjectType(4 /* Reference */, target.symbol);
+ target.instantiations.set(id, type);
type.flags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, /*excludeKinds*/ 0) : 0;
type.target = target;
type.typeArguments = typeArguments;
@@ -28988,21 +31330,26 @@ var ts;
return type;
}
function getTypeReferenceArity(type) {
- return type.target.typeParameters ? type.target.typeParameters.length : 0;
+ return ts.length(type.target.typeParameters);
}
// Get type from reference to class or interface
function getTypeFromClassOrInterfaceReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (!ts.isInJavaScriptFile(node) && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
// In a type reference, the outer type parameters of the referenced class or interface are automatically
// supplied as type arguments and the type reference only specifies arguments for the local type parameters
// of the class or interface.
- return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode)));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
@@ -29015,7 +31362,11 @@ var ts;
var links = getSymbolLinks(symbol);
var typeParameters = links.typeParameters;
var id = getTypeListId(typeArguments);
- return links.instantiations[id] || (links.instantiations[id] = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments)));
+ var instantiation = links.instantiations.get(id);
+ if (!instantiation) {
+ links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters)))));
+ }
+ return instantiation;
}
// Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include
// references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the
@@ -29024,8 +31375,12 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode);
@@ -29047,11 +31402,11 @@ var ts;
}
function getTypeReferenceName(node) {
switch (node.kind) {
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return node.typeName;
- case 272 /* JSDocTypeReference */:
+ case 276 /* JSDocTypeReference */:
return node.name;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
// We only support expressions that are simple qualified names. For other
// expressions this produces undefined.
var expr = node.expression;
@@ -29077,7 +31432,7 @@ var ts;
if (symbol.flags & 524288 /* TypeAlias */) {
return getTypeFromTypeAliasReference(node, symbol);
}
- if (symbol.flags & 107455 /* Value */ && node.kind === 272 /* JSDocTypeReference */) {
+ if (symbol.flags & 107455 /* Value */ && node.kind === 276 /* JSDocTypeReference */) {
// A JSDocTypeReference may have resolved to a value (as opposed to a type). In
// that case, the type of this reference is just the type of the value we resolved
// to.
@@ -29085,19 +31440,54 @@ var ts;
}
return getTypeFromNonGenericTypeReference(node, symbol);
}
+ function getPrimitiveTypeFromJSDocTypeReference(node) {
+ if (ts.isIdentifier(node.name)) {
+ switch (node.name.text) {
+ case "String":
+ return stringType;
+ case "Number":
+ return numberType;
+ case "Boolean":
+ return booleanType;
+ case "Void":
+ return voidType;
+ case "Undefined":
+ return undefinedType;
+ case "Null":
+ return nullType;
+ case "Object":
+ return anyType;
+ case "Function":
+ return anyFunctionType;
+ case "Array":
+ case "array":
+ return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
+ case "Promise":
+ case "promise":
+ return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
+ }
+ }
+ }
+ function getTypeFromJSDocNullableTypeNode(node) {
+ var type = getTypeFromTypeNode(node.type);
+ return strictNullChecks ? getUnionType([type, nullType]) : type;
+ }
function getTypeFromTypeReference(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
- if (node.kind === 272 /* JSDocTypeReference */) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
+ if (node.kind === 276 /* JSDocTypeReference */) {
+ type = getPrimitiveTypeFromJSDocTypeReference(node);
+ if (!type) {
+ var typeReferenceName = getTypeReferenceName(node);
+ symbol = resolveTypeReferenceName(typeReferenceName);
+ type = getTypeReferenceType(node, symbol);
+ }
}
else {
// We only support expressions that are simple qualified names. For other expressions this produces undefined.
- var typeNameOrExpression = node.kind === 157 /* TypeReference */
+ var typeNameOrExpression = node.kind === 158 /* TypeReference */
? node.typeName
: ts.isEntityNameExpression(node.expression)
? node.expression
@@ -29129,12 +31519,12 @@ var ts;
function getTypeOfGlobalSymbol(symbol, arity) {
function getTypeDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
- var declaration = declarations_3[_i];
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+ var declaration = declarations_4[_i];
switch (declaration.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
return declaration;
}
}
@@ -29147,24 +31537,68 @@ var ts;
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
return arity ? emptyGenericType : emptyObjectType;
}
- if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
+ if (ts.length(type.typeParameters) !== arity) {
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
return arity ? emptyGenericType : emptyObjectType;
}
return type;
}
- function getGlobalValueSymbol(name) {
- return getGlobalSymbol(name, 107455 /* Value */, ts.Diagnostics.Cannot_find_global_value_0);
+ function getGlobalValueSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 107455 /* Value */, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined);
}
- function getGlobalTypeSymbol(name) {
- return getGlobalSymbol(name, 793064 /* Type */, ts.Diagnostics.Cannot_find_global_type_0);
+ function getGlobalTypeSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 793064 /* Type */, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
}
function getGlobalSymbol(name, meaning, diagnostic) {
return resolveName(undefined, name, meaning, diagnostic, name);
}
- function getGlobalType(name, arity) {
+ function getGlobalType(name, arity, reportErrors) {
+ var symbol = getGlobalTypeSymbol(name, reportErrors);
+ return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
+ }
+ function getGlobalTypedPropertyDescriptorType() {
+ return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", /*arity*/ 1, /*reportErrors*/ true)) || emptyGenericType;
+ }
+ function getGlobalTemplateStringsArrayType() {
+ return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", /*arity*/ 0, /*reportErrors*/ true)) || emptyObjectType;
+ }
+ function getGlobalESSymbolConstructorSymbol(reportErrors) {
+ return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
+ }
+ function getGlobalESSymbolType(reportErrors) {
+ return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalPromiseType(reportErrors) {
+ return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalPromiseConstructorSymbol(reportErrors) {
+ return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
+ }
+ function getGlobalPromiseConstructorLikeType(reportErrors) {
+ return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", /*arity*/ 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalAsyncIterableType(reportErrors) {
+ return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIteratorType(reportErrors) {
+ return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIterableIteratorType(reportErrors) {
+ return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableType(reportErrors) {
+ return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIteratorType(reportErrors) {
+ return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableIteratorType(reportErrors) {
+ return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalTypeOrUndefined(name, arity) {
if (arity === void 0) { arity = 0; }
- return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
+ var symbol = getGlobalSymbol(name, 793064 /* Type */, /*diagnostic*/ undefined);
+ return symbol && getTypeOfGlobalSymbol(symbol, arity);
}
/**
* Returns a type that is inside a namespace at the global scope, e.g.
@@ -29176,25 +31610,25 @@ var ts;
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
/**
- * Creates a TypeReference for a generic `TypedPropertyDescriptor<T>`.
- */
- function createTypedPropertyDescriptorType(propertyType) {
- var globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
- return globalTypedPropertyDescriptorType !== emptyGenericType
- ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType])
- : emptyObjectType;
- }
- /**
* Instantiates a global type that is generic with some element type, and returns that instantiation.
*/
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
}
- function createIterableType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]);
+ function createTypedPropertyDescriptorType(propertyType) {
+ return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);
+ }
+ function createAsyncIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(/*reportErrors*/ true), [iteratedType]);
+ }
+ function createAsyncIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(/*reportErrors*/ true), [iteratedType]);
}
- function createIterableIteratorType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]);
+ function createIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableType(/*reportErrors*/ true), [iteratedType]);
+ }
+ function createIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(/*reportErrors*/ true), [iteratedType]);
}
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
@@ -29219,7 +31653,7 @@ var ts;
for (var i = 0; i < arity; i++) {
var typeParameter = createType(16384 /* TypeParameter */);
typeParameters.push(typeParameter);
- var property = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i);
+ var property = createSymbol(4 /* Property */, "" + i);
property.type = typeParameter;
properties.push(property);
}
@@ -29228,7 +31662,7 @@ var ts;
type.outerTypeParameters = undefined;
type.localTypeParameters = typeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384 /* TypeParameter */);
@@ -29312,14 +31746,14 @@ var ts;
// Add the given types to the given type set. Order is preserved, duplicates are removed,
// and nested types of the given kind are flattened into the set.
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
- var type = types_4[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var type = types_6[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var t = types_5[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var t = types_7[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -29327,8 +31761,9 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var i = 0, len = types.length; i < len; i++) {
- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
+ if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
}
@@ -29414,10 +31849,11 @@ var ts;
return types[0];
}
var id = getTypeListId(types);
- var type = unionTypes[id];
+ var type = unionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(types, /*excludeKinds*/ 6144 /* Nullable */);
- type = unionTypes[id] = createType(65536 /* Union */ | propagatedFlags);
+ type = createType(65536 /* Union */ | propagatedFlags);
+ unionTypes.set(id, type);
type.types = types;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -29438,15 +31874,27 @@ var ts;
else if (type.flags & 1 /* Any */) {
typeSet.containsAny = true;
}
+ else if (getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type)) {
+ typeSet.containsEmptyObject = true;
+ }
else if (!(type.flags & 8192 /* Never */) && (strictNullChecks || !(type.flags & 6144 /* Nullable */)) && !ts.contains(typeSet, type)) {
- typeSet.push(type);
+ if (type.flags & 32768 /* Object */) {
+ typeSet.containsObjectType = true;
+ }
+ if (type.flags & 65536 /* Union */ && typeSet.unionIndex === undefined) {
+ typeSet.unionIndex = typeSet.length;
+ }
+ if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */ &&
+ type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */) && containsIdenticalType(typeSet, type))) {
+ typeSet.push(type);
+ }
}
}
// Add the given types to the given type set. Order is preserved, duplicates are removed,
// and nested types of the given kind are flattened into the set.
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var type = types_9[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -29464,31 +31912,31 @@ var ts;
if (types.length === 0) {
return emptyObjectType;
}
- var _loop_2 = function (i) {
- var type_1 = types[i];
- if (type_1.flags & 65536 /* Union */) {
- return { value: getUnionType(ts.map(type_1.types, function (t) { return getIntersectionType(ts.replaceElement(types, i, t)); }),
- /*subtypeReduction*/ false, aliasSymbol, aliasTypeArguments) };
- }
- };
- for (var i = 0; i < types.length; i++) {
- var state_2 = _loop_2(i);
- if (typeof state_2 === "object")
- return state_2.value;
- }
var typeSet = [];
addTypesToIntersection(typeSet, types);
if (typeSet.containsAny) {
return anyType;
}
+ if (typeSet.containsEmptyObject && !typeSet.containsObjectType) {
+ typeSet.push(emptyObjectType);
+ }
if (typeSet.length === 1) {
return typeSet[0];
}
+ var unionIndex = typeSet.unionIndex;
+ if (unionIndex !== undefined) {
+ // We are attempting to construct a type of the form X & (A | B) & Y. Transform this into a type of
+ // the form X & A & Y | X & B & Y and recursively reduce until no union type constituents remain.
+ var unionType = typeSet[unionIndex];
+ return getUnionType(ts.map(unionType.types, function (t) { return getIntersectionType(ts.replaceElement(typeSet, unionIndex, t)); }),
+ /*subtypeReduction*/ false, aliasSymbol, aliasTypeArguments);
+ }
var id = getTypeListId(typeSet);
- var type = intersectionTypes[id];
+ var type = intersectionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, /*excludeKinds*/ 6144 /* Nullable */);
- type = intersectionTypes[id] = createType(131072 /* Intersection */ | propagatedFlags);
+ type = createType(131072 /* Intersection */ | propagatedFlags);
+ intersectionTypes.set(id, type);
type.types = typeSet;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -29502,7 +31950,7 @@ var ts;
}
return links.resolvedType;
}
- function getIndexTypeForTypeParameter(type) {
+ function getIndexTypeForGenericType(type) {
if (!type.resolvedIndexType) {
type.resolvedIndexType = createType(262144 /* Index */);
type.resolvedIndexType.type = type;
@@ -29518,7 +31966,7 @@ var ts;
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
}
function getIndexType(type) {
- return type.flags & 16384 /* TypeParameter */ ? getIndexTypeForTypeParameter(type) :
+ return maybeTypeOfKind(type, 540672 /* TypeVariable */) ? getIndexTypeForGenericType(type) :
getObjectFlags(type) & 32 /* Mapped */ ? getConstraintTypeFromMappedType(type) :
type.flags & 1 /* Any */ || getIndexInfoOfType(type, 0 /* String */) ? stringType :
getLiteralTypeFromPropertyNames(type);
@@ -29541,7 +31989,7 @@ var ts;
return type;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
- var accessExpression = accessNode && accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined;
var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ?
indexType.text :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
@@ -29570,14 +32018,14 @@ var ts;
getIndexInfoOfType(objectType, 0 /* String */) ||
undefined;
if (indexInfo) {
- if (accessExpression && ts.isAssignmentTarget(accessExpression) && indexInfo.isReadonly) {
+ if (accessExpression && indexInfo.isReadonly && (ts.isAssignmentTarget(accessExpression) || ts.isDeleteTarget(accessExpression))) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
return unknownType;
}
return indexInfo.type;
}
if (accessExpression && !isConstEnumObjectType(objectType)) {
- if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
+ if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
if (getIndexTypeOfType(objectType, 1 /* Number */)) {
error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
}
@@ -29589,7 +32037,7 @@ var ts;
}
}
if (accessNode) {
- var indexNode = accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType;
+ var indexNode = accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType;
if (indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */)) {
error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType));
}
@@ -29599,32 +32047,32 @@ var ts;
else {
error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
}
+ return unknownType;
}
- return unknownType;
+ return anyType;
}
function getIndexedAccessForMappedType(type, indexType, accessNode) {
- var accessExpression = accessNode && accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined;
if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type));
return unknownType;
}
- var mapper = createUnaryTypeMapper(getTypeParameterFromMappedType(type), indexType);
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(type)], [indexType]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, mapper) : mapper;
- return addOptionality(instantiateType(getTemplateTypeFromMappedType(type), templateMapper), !!type.declaration.questionToken);
+ return instantiateType(getTemplateTypeFromMappedType(type), templateMapper);
}
function getIndexedAccessType(objectType, indexType, accessNode) {
- if (indexType.flags & 16384 /* TypeParameter */ ||
- objectType.flags & 16384 /* TypeParameter */ && indexType.flags & 262144 /* Index */ ||
+ // If the index type is generic, if the object type is generic and doesn't originate in an expression,
+ // or if the object type is a mapped type with a generic constraint, we are performing a higher-order
+ // index access where we cannot meaningfully access the properties of the object type. Note that for a
+ // generic T and a non-generic K, we eagerly resolve T[K] if it originates in an expression. This is to
+ // preserve backwards compatibility. For example, an element access 'this["foo"]' has always been resolved
+ // eagerly using the constraint type of 'this' at the given location.
+ if (maybeTypeOfKind(indexType, 540672 /* TypeVariable */ | 262144 /* Index */) ||
+ maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 179 /* ElementAccessExpression */) ||
isGenericMappedType(objectType)) {
- // If either the object type or the index type are type parameters, or if the object type is a mapped
- // type with a generic constraint, we are performing a higher-order index access where we cannot
- // meaningfully access the properties of the object type. In those cases, we first check that the
- // index type is assignable to 'keyof T' for the object type.
- if (accessNode) {
- if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
- error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
- return unknownType;
- }
+ if (objectType.flags & 1 /* Any */) {
+ return objectType;
}
// If the object type is a mapped type { [P in K]: E }, we instantiate E using a mapper that substitutes
// the index type for P. For example, for an index access { [P in K]: Box<T[P]> }[X], we construct the
@@ -29634,8 +32082,13 @@ var ts;
}
// Otherwise we defer the operation by creating an indexed access type.
var id = objectType.id + "," + indexType.id;
- return indexedAccessTypes[id] || (indexedAccessTypes[id] = createIndexedAccessType(objectType, indexType));
+ var type = indexedAccessTypes.get(id);
+ if (!type) {
+ indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType));
+ }
+ return type;
}
+ // In the following we resolve T[K] to the type of the property in T selected by K.
var apparentObjectType = getApparentType(objectType);
if (indexType.flags & 65536 /* Union */ && !(indexType.flags & 8190 /* Primitive */)) {
var propTypes = [];
@@ -29677,7 +32130,7 @@ var ts;
if (!links.resolvedType) {
// Deferred resolution of members is handled by resolveObjectTypeMembers
var aliasSymbol = getAliasSymbolForTypeNode(node);
- if (ts.isEmpty(node.symbol.members) && !aliasSymbol) {
+ if (node.symbol.members.size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {
@@ -29690,7 +32143,7 @@ var ts;
return links.resolvedType;
}
function getAliasSymbolForTypeNode(node) {
- return node.parent.kind === 228 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined;
+ return node.parent.kind === 230 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node) {
var symbol = getAliasSymbolForTypeNode(node);
@@ -29701,11 +32154,27 @@ var ts;
* this function should be called in a left folding style, with left = previous result of getSpreadType
* and right = the new element to be spread.
*/
- function getSpreadType(left, right, isFromObjectLiteral) {
- ts.Debug.assert(!!(left.flags & (32768 /* Object */ | 1 /* Any */)) && !!(right.flags & (32768 /* Object */ | 1 /* Any */)), "Only object types may be spread.");
+ function getSpreadType(left, right) {
if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) {
return anyType;
}
+ left = filterType(left, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (left.flags & 8192 /* Never */) {
+ return right;
+ }
+ right = filterType(right, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (right.flags & 8192 /* Never */) {
+ return left;
+ }
+ if (left.flags & 65536 /* Union */) {
+ return mapType(left, function (t) { return getSpreadType(t, right); });
+ }
+ if (right.flags & 65536 /* Union */) {
+ return mapType(right, function (t) { return getSpreadType(left, t); });
+ }
+ if (right.flags & 16777216 /* NonPrimitive */) {
+ return emptyObjectType;
+ }
var members = ts.createMap();
var skippedPrivateMembers = ts.createMap();
var stringIndexInfo;
@@ -29722,42 +32191,55 @@ var ts;
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
// we approximate own properties as non-methods plus methods that are inside the object literal
- var isOwnProperty = !(rightProp.flags & 8192 /* Method */) || isFromObjectLiteral;
var isSetterWithoutGetter = rightProp.flags & 65536 /* SetAccessor */ && !(rightProp.flags & 32768 /* GetAccessor */);
if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
- skippedPrivateMembers[rightProp.name] = true;
+ skippedPrivateMembers.set(rightProp.name, true);
}
- else if (isOwnProperty && !isSetterWithoutGetter) {
- members[rightProp.name] = rightProp;
+ else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
+ members.set(rightProp.name, getNonReadonlySymbol(rightProp));
}
}
for (var _b = 0, _c = getPropertiesOfType(left); _b < _c.length; _b++) {
var leftProp = _c[_b];
if (leftProp.flags & 65536 /* SetAccessor */ && !(leftProp.flags & 32768 /* GetAccessor */)
- || leftProp.name in skippedPrivateMembers) {
+ || skippedPrivateMembers.has(leftProp.name)
+ || isClassMethod(leftProp)) {
continue;
}
- if (leftProp.name in members) {
- var rightProp = members[leftProp.name];
+ if (members.has(leftProp.name)) {
+ var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 536870912 /* Optional */) {
+ if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 67108864 /* Optional */) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
- var flags = 4 /* Property */ | 67108864 /* Transient */ | (leftProp.flags & 536870912 /* Optional */);
+ var flags = 4 /* Property */ | (leftProp.flags & 67108864 /* Optional */);
var result = createSymbol(flags, leftProp.name);
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 131072 /* NEUndefined */)]);
result.leftSpread = leftProp;
result.rightSpread = rightProp;
result.declarations = declarations;
- result.isReadonly = isReadonlySymbol(leftProp) || isReadonlySymbol(rightProp);
- members[leftProp.name] = result;
+ members.set(leftProp.name, result);
}
}
else {
- members[leftProp.name] = leftProp;
+ members.set(leftProp.name, getNonReadonlySymbol(leftProp));
}
}
return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
+ function getNonReadonlySymbol(prop) {
+ if (!isReadonlySymbol(prop)) {
+ return prop;
+ }
+ var flags = 4 /* Property */ | (prop.flags & 67108864 /* Optional */);
+ var result = createSymbol(flags, prop.name);
+ result.type = getTypeOfSymbol(prop);
+ result.declarations = prop.declarations;
+ result.syntheticOrigin = prop;
+ return result;
+ }
+ function isClassMethod(prop) {
+ return prop.flags & 8192 /* Method */ && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
+ }
function createLiteralType(flags, text) {
var type = createType(flags);
type.text = text;
@@ -29779,7 +32261,11 @@ var ts;
}
function getLiteralTypeForText(flags, text) {
var map = flags & 32 /* StringLiteral */ ? stringLiteralTypes : numericLiteralTypes;
- return map[text] || (map[text] = createLiteralType(flags, text));
+ var type = map.get(text);
+ if (!type) {
+ map.set(text, type = createLiteralType(flags, text));
+ }
+ return type;
}
function getTypeFromLiteralTypeNode(node) {
var links = getNodeLinks(node);
@@ -29807,9 +32293,9 @@ var ts;
function getThisType(node) {
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
var parent = container && container.parent;
- if (parent && (ts.isClassLike(parent) || parent.kind === 227 /* InterfaceDeclaration */)) {
+ if (parent && (ts.isClassLike(parent) || parent.kind === 229 /* InterfaceDeclaration */)) {
if (!(ts.getModifierFlags(container) & 32 /* Static */) &&
- (container.kind !== 150 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) {
+ (container.kind !== 151 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@@ -29826,87 +32312,84 @@ var ts;
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 118 /* AnyKeyword */:
- case 263 /* JSDocAllType */:
- case 264 /* JSDocUnknownType */:
+ case 267 /* JSDocAllType */:
+ case 268 /* JSDocUnknownType */:
return anyType;
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
return stringType;
case 132 /* NumberKeyword */:
return numberType;
case 121 /* BooleanKeyword */:
return booleanType;
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
return esSymbolType;
case 104 /* VoidKeyword */:
return voidType;
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
return undefinedType;
case 94 /* NullKeyword */:
return nullType;
case 129 /* NeverKeyword */:
return neverType;
- case 289 /* JSDocNullKeyword */:
- return nullType;
- case 290 /* JSDocUndefinedKeyword */:
- return undefinedType;
- case 291 /* JSDocNeverKeyword */:
- return neverType;
- case 167 /* ThisType */:
+ case 133 /* ObjectKeyword */:
+ return nonPrimitiveType;
+ case 168 /* ThisType */:
case 98 /* ThisKeyword */:
return getTypeFromThisTypeNode(node);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return getTypeFromLiteralTypeNode(node);
- case 288 /* JSDocLiteralType */:
+ case 292 /* JSDocLiteralType */:
return getTypeFromLiteralTypeNode(node.literal);
- case 157 /* TypeReference */:
- case 272 /* JSDocTypeReference */:
+ case 158 /* TypeReference */:
+ case 276 /* JSDocTypeReference */:
return getTypeFromTypeReference(node);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return booleanType;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return getTypeFromTypeReference(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return getTypeFromTypeQueryNode(node);
- case 162 /* ArrayType */:
- case 265 /* JSDocArrayType */:
+ case 163 /* ArrayType */:
+ case 269 /* JSDocArrayType */:
return getTypeFromArrayTypeNode(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return getTypeFromTupleTypeNode(node);
- case 164 /* UnionType */:
- case 266 /* JSDocUnionType */:
+ case 165 /* UnionType */:
+ case 270 /* JSDocUnionType */:
return getTypeFromUnionTypeNode(node);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return getTypeFromIntersectionTypeNode(node);
- case 166 /* ParenthesizedType */:
- case 268 /* JSDocNullableType */:
- case 269 /* JSDocNonNullableType */:
- case 276 /* JSDocConstructorType */:
- case 277 /* JSDocThisType */:
- case 273 /* JSDocOptionalType */:
+ case 272 /* JSDocNullableType */:
+ return getTypeFromJSDocNullableTypeNode(node);
+ case 167 /* ParenthesizedType */:
+ case 273 /* JSDocNonNullableType */:
+ case 280 /* JSDocConstructorType */:
+ case 281 /* JSDocThisType */:
+ case 277 /* JSDocOptionalType */:
return getTypeFromTypeNode(node.type);
- case 270 /* JSDocRecordType */:
+ case 274 /* JSDocRecordType */:
return getTypeFromTypeNode(node.literal);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 161 /* TypeLiteral */:
- case 287 /* JSDocTypeLiteral */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 162 /* TypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
+ case 278 /* JSDocFunctionType */:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return getTypeFromTypeOperatorNode(node);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return getTypeFromIndexedAccessTypeNode(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return getTypeFromMappedTypeNode(node);
// This function assumes that an identifier or qualified name is a type expression
// Callers should first ensure this by calling isTypeNode
case 70 /* Identifier */:
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
var symbol = getSymbolAtLocation(node);
return symbol && getDeclaredTypeOfSymbol(symbol);
- case 267 /* JSDocTupleType */:
+ case 271 /* JSDocTupleType */:
return getTypeFromJSDocTupleType(node);
- case 275 /* JSDocVariadicType */:
+ case 279 /* JSDocVariadicType */:
return getTypeFromJSDocVariadicType(node);
default:
return unknownType;
@@ -29933,13 +32416,13 @@ var ts;
var instantiations = mapper.instantiations || (mapper.instantiations = []);
return instantiations[type.id] || (instantiations[type.id] = instantiator(type, mapper));
}
- function createUnaryTypeMapper(source, target) {
+ function makeUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
}
- function createBinaryTypeMapper(source1, target1, source2, target2) {
+ function makeBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
}
- function createArrayTypeMapper(sources, targets) {
+ function makeArrayTypeMapper(sources, targets) {
return function (t) {
for (var i = 0; i < sources.length; i++) {
if (t === sources[i]) {
@@ -29950,15 +32433,23 @@ var ts;
};
}
function createTypeMapper(sources, targets) {
- var count = sources.length;
- var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
- count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
- createArrayTypeMapper(sources, targets);
+ var mapper = sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
+ sources.length === 2 ? makeBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
+ makeArrayTypeMapper(sources, targets);
mapper.mappedTypes = sources;
return mapper;
}
function createTypeEraser(sources) {
- return createTypeMapper(sources, undefined);
+ return createTypeMapper(sources, /*targets*/ undefined);
+ }
+ /**
+ * Maps forward-references to later types parameters to the empty object type.
+ * This is used during inference when instantiating type parameter defaults.
+ */
+ function createBackreferenceMapper(typeParameters, index) {
+ var mapper = function (t) { return ts.indexOf(typeParameters, t) >= index ? emptyObjectType : t; };
+ mapper.mappedTypes = typeParameters;
+ return mapper;
}
function getInferenceMapper(context) {
if (!context.mapper) {
@@ -29983,7 +32474,12 @@ var ts;
}
function combineTypeMappers(mapper1, mapper2) {
var mapper = function (t) { return instantiateType(mapper1(t), mapper2); };
- mapper.mappedTypes = mapper1.mappedTypes;
+ mapper.mappedTypes = ts.concatenate(mapper1.mappedTypes, mapper2.mappedTypes);
+ return mapper;
+ }
+ function createReplacementMapper(source, target, baseMapper) {
+ var mapper = function (t) { return t === source ? target : baseMapper(t); };
+ mapper.mappedTypes = baseMapper.mappedTypes;
return mapper;
}
function cloneTypeParameter(typeParameter) {
@@ -30031,7 +32527,7 @@ var ts;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
var links = getSymbolLinks(symbol);
// If symbol being instantiated is itself a instantiation, fetch the original target and combine the
// type mappers. This ensures that original type identities are properly preserved and that aliases
@@ -30041,7 +32537,8 @@ var ts;
}
// Keep the flags from the symbol we're instantiating. Mark that is instantiated, and
// also transient so that we can just store data on it directly.
- var result = createSymbol(16777216 /* Instantiated */ | 67108864 /* Transient */ | symbol.flags, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
+ result.checkFlags = 1 /* Instantiated */;
result.declarations = symbol.declarations;
result.parent = symbol.parent;
result.target = symbol;
@@ -30060,25 +32557,24 @@ var ts;
return result;
}
function instantiateMappedType(type, mapper) {
- // Check if we have an isomorphic mapped type, i.e. a type of the form { [P in keyof T]: X } for some
- // type parameter T. If so, the mapped type is distributive over a union type and when T is instantiated
+ // Check if we have a homomorphic mapped type, i.e. a type of the form { [P in keyof T]: X } for some
+ // type variable T. If so, the mapped type is distributive over a union type and when T is instantiated
// to a union type A | B, we produce { [P in keyof A]: X } | { [P in keyof B]: X }. Furthermore, for
- // isomorphic mapped types we leave primitive types alone. For example, when T is instantiated to a
+ // homomorphic mapped types we leave primitive types alone. For example, when T is instantiated to a
// union type A | undefined, we produce { [P in keyof A]: X } | undefined.
var constraintType = getConstraintTypeFromMappedType(type);
if (constraintType.flags & 262144 /* Index */) {
- var typeParameter_1 = constraintType.type;
- var mappedTypeParameter = mapper(typeParameter_1);
- if (typeParameter_1 !== mappedTypeParameter) {
- return mapType(mappedTypeParameter, function (t) {
- if (isMappableType(t)) {
- var replacementMapper = createUnaryTypeMapper(typeParameter_1, t);
- var combinedMapper = mapper.mappedTypes && mapper.mappedTypes.length === 1 ? replacementMapper : combineTypeMappers(replacementMapper, mapper);
- combinedMapper.mappedTypes = mapper.mappedTypes;
- return instantiateMappedObjectType(type, combinedMapper);
- }
- return t;
- });
+ var typeVariable_1 = constraintType.type;
+ if (typeVariable_1.flags & 16384 /* TypeParameter */) {
+ var mappedTypeVariable = instantiateType(typeVariable_1, mapper);
+ if (typeVariable_1 !== mappedTypeVariable) {
+ return mapType(mappedTypeVariable, function (t) {
+ if (isMappableType(t)) {
+ return instantiateMappedObjectType(type, createReplacementMapper(typeVariable_1, t, mapper));
+ }
+ return t;
+ });
+ }
}
}
return instantiateMappedObjectType(type, mapper);
@@ -30102,26 +32598,28 @@ var ts;
// Starting with the parent of the symbol's declaration, check if the mapper maps any of
// the type parameters introduced by enclosing declarations. We just pick the first
// declaration since multiple declarations will all have the same parent anyway.
- var node = symbol.declarations[0].parent;
- while (node) {
+ return !!ts.findAncestor(symbol.declarations[0], function (node) {
+ if (node.kind === 232 /* ModuleDeclaration */ || node.kind === 264 /* SourceFile */) {
+ return "quit";
+ }
switch (node.kind) {
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
var declaration = node;
if (declaration.typeParameters) {
for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
@@ -30131,25 +32629,34 @@ var ts;
}
}
}
- if (ts.isClassLike(node) || node.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isClassLike(node) || node.kind === 229 /* InterfaceDeclaration */) {
var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
if (thisType && ts.contains(mappedTypes, thisType)) {
return true;
}
}
break;
- case 230 /* ModuleDeclaration */:
- case 261 /* SourceFile */:
- return false;
+ case 171 /* MappedType */:
+ if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) {
+ return true;
+ }
+ break;
+ case 278 /* JSDocFunctionType */:
+ var func = node;
+ for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
+ var p = _c[_b];
+ if (ts.contains(mappedTypes, getTypeOfNode(p))) {
+ return true;
+ }
+ }
+ break;
}
- node = node.parent;
- }
- return false;
+ });
}
function isTopLevelTypeAlias(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var parentKind = symbol.declarations[0].parent.kind;
- return parentKind === 261 /* SourceFile */ || parentKind === 231 /* ModuleBlock */;
+ return parentKind === 264 /* SourceFile */ || parentKind === 233 /* ModuleBlock */;
}
return false;
}
@@ -30226,28 +32733,36 @@ var ts;
// Returns true if the given expression contains (at any level of nesting) a function or arrow expression
// that is subject to contextual typing.
function isContextSensitive(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return ts.forEach(node.properties, isContextSensitive);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return ts.forEach(node.elements, isContextSensitive);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isContextSensitive(node.whenTrue) ||
isContextSensitive(node.whenFalse);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return node.operatorToken.kind === 53 /* BarBarToken */ &&
(isContextSensitive(node.left) || isContextSensitive(node.right));
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return isContextSensitive(node.initializer);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isContextSensitive(node.expression);
+ case 253 /* JsxAttributes */:
+ return ts.forEach(node.properties, isContextSensitive);
+ case 252 /* JsxAttribute */:
+ // If there is no initializer, JSX attribute has a boolean value of true which is not context sensitive.
+ return node.initializer && isContextSensitive(node.initializer);
+ case 255 /* JsxExpression */:
+ // It is possible to that node.expression is undefined (e.g <div x={} />)
+ return node.expression && isContextSensitive(node.expression);
}
return false;
}
@@ -30261,7 +32776,7 @@ var ts;
return true;
}
// For arrow functions we now know we're not context sensitive.
- if (node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 186 /* ArrowFunction */) {
return false;
}
// If the first parameter is not an explicit 'this' parameter, then the function has
@@ -30283,9 +32798,12 @@ var ts;
result.properties = resolved.properties;
result.callSignatures = emptyArray;
result.constructSignatures = emptyArray;
- type = result;
+ return result;
}
}
+ else if (type.flags & 131072 /* Intersection */) {
+ return getIntersectionType(ts.map(type.types, getTypeWithoutSignatures));
+ }
return type;
}
// TYPE CHECKING
@@ -30308,7 +32826,7 @@ var ts;
// subtype of T but not structurally identical to T. This specifically means that two distinct but
// structurally identical types (such as two classes) are not considered instances of each other.
function isTypeInstanceOf(source, target) {
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
}
/**
* This is *not* a bi-directional relationship.
@@ -30334,12 +32852,13 @@ var ts;
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
}
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
- return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */;
+ return compareSignaturesRelated(source, target, /*checkAsCallback*/ false, ignoreReturnTypes, /*reportErrors*/ false,
+ /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */;
}
/**
* See signatureRelatedTo, compareSignaturesIdentical
*/
- function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
+ function compareSignaturesRelated(source, target, checkAsCallback, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
// TODO (drosen): De-duplicate code between related functions.
if (source === target) {
return -1 /* True */;
@@ -30374,9 +32893,23 @@ var ts;
var sourceParams = source.parameters;
var targetParams = target.parameters;
for (var i = 0; i < checkCount; i++) {
- var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
- var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
- var related = compareTypes(s, t, /*reportErrors*/ false) || compareTypes(t, s, reportErrors);
+ var sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
+ var targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
+ var sourceSig = getSingleCallSignature(getNonNullableType(sourceType));
+ var targetSig = getSingleCallSignature(getNonNullableType(targetType));
+ // In order to ensure that any generic type Foo<T> is at least co-variant with respect to T no matter
+ // how Foo uses T, we need to relate parameters bi-variantly (given that parameters are input positions,
+ // they naturally relate only contra-variantly). However, if the source and target parameters both have
+ // function types with a single call signature, we known we are relating two callback parameters. In
+ // that case it is sufficient to only relate the parameters of the signatures co-variantly because,
+ // similar to return values, callback parameters are output positions. This means that a Promise<T>,
+ // where T is used only in callback parameter positions, will be co-variant (as opposed to bi-variant)
+ // with respect to T.
+ var callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate &&
+ (getFalsyFlags(sourceType) & 6144 /* Nullable */) === (getFalsyFlags(targetType) & 6144 /* Nullable */);
+ var related = callbacks ?
+ compareSignaturesRelated(targetSig, sourceSig, /*checkAsCallback*/ true, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, compareTypes) :
+ !checkAsCallback && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name);
@@ -30404,7 +32937,11 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ // When relating callback signatures, we still need to relate return types bi-variantly as otherwise
+ // the containing type wouldn't be co-variant. For example, interface Foo<T> { add(cb: () => T): void }
+ // wouldn't be co-variant for T without this rule.
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, /*reportErrors*/ false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -30471,18 +33008,33 @@ var ts;
sourceNonRestParamCount;
}
}
+ function isEmptyResolvedType(t) {
+ return t.properties.length === 0 &&
+ t.callSignatures.length === 0 &&
+ t.constructSignatures.length === 0 &&
+ !t.stringIndexInfo &&
+ !t.numberIndexInfo;
+ }
+ function isEmptyObjectType(type) {
+ return type.flags & 32768 /* Object */ ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
+ type.flags & 65536 /* Union */ ? ts.forEach(type.types, isEmptyObjectType) :
+ type.flags & 131072 /* Intersection */ ? !ts.forEach(type.types, function (t) { return !isEmptyObjectType(t); }) :
+ false;
+ }
function isEnumTypeRelatedTo(source, target, errorReporter) {
if (source === target) {
return true;
}
var id = source.id + "," + target.id;
- if (enumRelation[id] !== undefined) {
- return enumRelation[id];
+ var relation = enumRelation.get(id);
+ if (relation !== undefined) {
+ return relation;
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */) ||
(source.flags & 65536 /* Union */) !== (target.flags & 65536 /* Union */)) {
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@@ -30493,11 +33045,13 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
}
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
}
}
- return enumRelation[id] = true;
+ enumRelation.set(id, true);
+ return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192 /* Never */)
@@ -30518,6 +33072,8 @@ var ts;
return true;
if (source.flags & 4096 /* Null */ && (!strictNullChecks || target.flags & 4096 /* Null */))
return true;
+ if (source.flags & 32768 /* Object */ && target.flags & 16777216 /* NonPrimitive */)
+ return true;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1 /* Any */)
return true;
@@ -30549,13 +33105,13 @@ var ts;
}
if (source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */) {
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
return related === 1 /* Succeeded */;
}
}
- if (source.flags & 507904 /* StructuredOrTypeParameter */ || target.flags & 507904 /* StructuredOrTypeParameter */) {
- return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined);
+ if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ return checkTypeRelatedTo(source, target, relation, /*errorNode*/ undefined);
}
return false;
}
@@ -30619,14 +33175,35 @@ var ts;
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
- (getGlobalESSymbolType() === source && esSymbolType === target)) {
+ (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) {
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
- // Compare two types and return
- // Ternary.True if they are related with no assumptions,
- // Ternary.Maybe if they are related with assumptions of other relationships, or
- // Ternary.False if they are not related.
+ function isUnionOrIntersectionTypeWithoutNullableConstituents(type) {
+ if (!(type.flags & 196608 /* UnionOrIntersection */)) {
+ return false;
+ }
+ // at this point we know that this is union or intersection type possibly with nullable constituents.
+ // check if we still will have compound type if we ignore nullable components.
+ var seenNonNullable = false;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (t.flags & 6144 /* Nullable */) {
+ continue;
+ }
+ if (seenNonNullable) {
+ return true;
+ }
+ seenNonNullable = true;
+ }
+ return false;
+ }
+ /**
+ * Compare two types and return
+ * * Ternary.True if they are related with no assumptions,
+ * * Ternary.Maybe if they are related with assumptions of other relationships, or
+ * * Ternary.False if they are not related.
+ */
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
if (source.flags & 96 /* StringOrNumberLiteral */ && source.flags & 1048576 /* FreshLiteral */) {
@@ -30654,7 +33231,7 @@ var ts;
// and intersection types are further deconstructed on the target side, we don't want to
// make the check again (as it might fail for a partial target type). Therefore we obtain
// the regular source type and proceed with that.
- if (target.flags & 196608 /* UnionOrIntersection */) {
+ if (isUnionOrIntersectionTypeWithoutNullableConstituents(target)) {
source = getRegularTypeOfObjectLiteral(source);
}
}
@@ -30673,122 +33250,37 @@ var ts;
return result;
}
}
- else if (target.flags & 65536 /* Union */) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
- return result;
- }
- }
- else if (target.flags & 131072 /* Intersection */) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
- }
- else if (source.flags & 131072 /* Intersection */) {
- // Check to see if any constituents of the intersection are immediately related to the target.
- //
- // Don't report errors though. Checking whether a constituent is related to the source is not actually
- // useful and leads to some confusing error messages. Instead it is better to let the below checks
- // take care of this, or to not elaborate at all. For instance,
- //
- // - For an object type (such as 'C = A & B'), users are usually more interested in structural errors.
- //
- // - For a union type (such as '(A | B) = (C & D)'), it's better to hold onto the whole intersection
- // than to report that 'D' is not assignable to 'A' or 'B'.
- //
- // - For a primitive type or type parameter (such as 'number = A & B') there is no point in
- // breaking the intersection apart.
- if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) {
- return result;
- }
- }
- if (target.flags & 16384 /* TypeParameter */) {
- // A source type { [P in keyof T]: X } is related to a target type T if X is related to T[P].
- if (getObjectFlags(source) & 32 /* Mapped */ && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
- if (!source.declaration.questionToken) {
- var templateType = getTemplateTypeFromMappedType(source);
- var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
- if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
- return result;
- }
- }
- }
- else {
- // Given a type parameter K with a constraint keyof T, a type S is
- // assignable to K if S is assignable to keyof T.
- var constraint = getConstraintOfTypeParameter(target);
- if (constraint && constraint.flags & 262144 /* Index */) {
- if (result = isRelatedTo(source, constraint, reportErrors)) {
- return result;
- }
- }
- }
- }
- else if (target.flags & 262144 /* Index */) {
- // A keyof S is related to a keyof T if T is related to S.
- if (source.flags & 262144 /* Index */) {
- if (result = isRelatedTo(target.type, source.type, /*reportErrors*/ false)) {
- return result;
- }
- }
- // Given a type parameter T with a constraint C, a type S is assignable to
- // keyof T if S is assignable to keyof C.
- var constraint = getConstraintOfTypeParameter(target.type);
- if (constraint) {
- if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
- return result;
- }
- }
- }
- else if (target.flags & 524288 /* IndexedAccess */) {
- // if we have indexed access types with identical index types, see if relationship holds for
- // the two object types.
- if (source.flags & 524288 /* IndexedAccess */ && source.indexType === target.indexType) {
- if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
- return result;
- }
- }
- }
- if (source.flags & 16384 /* TypeParameter */) {
- // A source type T is related to a target type { [P in keyof T]: X } if T[P] is related to X.
- if (getObjectFlags(target) & 32 /* Mapped */ && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
- var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
- var templateType = getTemplateTypeFromMappedType(target);
- if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ else {
+ if (target.flags & 65536 /* Union */) {
+ if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
return result;
}
}
- else {
- var constraint = getConstraintOfTypeParameter(source);
- if (!constraint || constraint.flags & 1 /* Any */) {
- constraint = emptyObjectType;
- }
- // The constraint may need to be further instantiated with its 'this' type.
- constraint = getTypeWithThisArgument(constraint, source);
- // Report constraint errors only if the constraint is not the empty object type
- var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
- if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
- errorInfo = saveErrorInfo;
+ else if (target.flags & 131072 /* Intersection */) {
+ if (result = typeRelatedToEachType(source, target, reportErrors)) {
return result;
}
}
- }
- else {
- if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
- // We have type references to same target type, see if relationship holds for all type arguments
- if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ else if (source.flags & 131072 /* Intersection */) {
+ // Check to see if any constituents of the intersection are immediately related to the target.
+ //
+ // Don't report errors though. Checking whether a constituent is related to the source is not actually
+ // useful and leads to some confusing error messages. Instead it is better to let the below checks
+ // take care of this, or to not elaborate at all. For instance,
+ //
+ // - For an object type (such as 'C = A & B'), users are usually more interested in structural errors.
+ //
+ // - For a union type (such as '(A | B) = (C & D)'), it's better to hold onto the whole intersection
+ // than to report that 'D' is not assignable to 'A' or 'B'.
+ //
+ // - For a primitive type or type parameter (such as 'number = A & B') there is no point in
+ // breaking the intersection apart.
+ if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) {
return result;
}
}
- // Even if relationship doesn't hold for unions, intersections, or generic type references,
- // it may hold in a structural comparison.
- var apparentSource = getApparentType(source);
- // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates
- // to X. Failing both of those we want to check if the aggregation of A and B's members structurally
- // relates to X. Thus, we include intersection types on the source side here.
- if (apparentSource.flags & (32768 /* Object */ | 131072 /* Intersection */) && target.flags & 32768 /* Object */) {
- // Report structural errors only if we haven't reported any errors yet
- var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190 /* Primitive */);
- if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) {
+ if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
return result;
}
@@ -30808,13 +33300,7 @@ var ts;
function isIdenticalTo(source, target) {
var result;
if (source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */) {
- if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
- // We have type references to same target type, see if all type arguments are identical
- if (result = typeArgumentsRelatedTo(source, target, /*reportErrors*/ false)) {
- return result;
- }
- }
- return objectTypeRelatedTo(source, source, target, /*reportErrors*/ false);
+ return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false);
}
if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ ||
source.flags & 131072 /* Intersection */ && target.flags & 131072 /* Intersection */) {
@@ -30830,45 +33316,49 @@ var ts;
// is considered known if the object type is empty and the check is for assignability, if the object type has
// index signatures, or if the property is actually declared in the object type. In a union or intersection
// type, a property is considered known if it is known in any constituent type.
- function isKnownProperty(type, name) {
+ function isKnownProperty(type, name, isComparingJsxAttributes) {
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
- resolved.stringIndexInfo ||
- (resolved.numberIndexInfo && isNumericLiteralName(name)) ||
- getPropertyOfType(type, name)) {
+ if (resolved.stringIndexInfo || resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfType(type, name) || isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ // For JSXAttributes, if the attribute has a hyphenated name, consider that the attribute to be known.
return true;
}
}
else if (type.flags & 196608 /* UnionOrIntersection */) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- if (isKnownProperty(t, name)) {
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
return true;
}
}
}
return false;
}
- function isEmptyObjectType(t) {
- return t.properties.length === 0 &&
- t.callSignatures.length === 0 &&
- t.constructSignatures.length === 0 &&
- !t.stringIndexInfo &&
- !t.numberIndexInfo;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768 /* Object */) && !(getObjectFlags(target) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
+ if ((relation === assignableRelation || relation === comparableRelation) &&
+ (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
+ return false;
+ }
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!isKnownProperty(target, prop.name)) {
+ if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
// We know *exactly* where things went wrong when comparing the types.
// Use this property as the error node as this will be more helpful in
// reasoning about what went wrong.
ts.Debug.assert(!!errorNode);
- errorNode = prop.valueDeclaration;
- reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ if (ts.isJsxAttributes(errorNode)) {
+ // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal.
+ // However, using an object-literal error message will be very confusing to the users so we give different a message.
+ reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
+ }
+ else {
+ errorNode = prop.valueDeclaration;
+ reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ }
}
return true;
}
@@ -30894,20 +33384,42 @@ var ts;
if (target.flags & 65536 /* Union */ && containsType(targetTypes, source)) {
return -1 /* True */;
}
- var len = targetTypes.length;
- for (var i = 0; i < len; i++) {
- var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
+ for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
+ var type = targetTypes_1[_i];
+ var related = isRelatedTo(source, type, /*reportErrors*/ false);
if (related) {
return related;
}
}
+ if (reportErrors) {
+ var discriminantType = findMatchingDiscriminantType(source, target);
+ isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], /*reportErrors*/ true);
+ }
return 0 /* False */;
}
+ function findMatchingDiscriminantType(source, target) {
+ var sourceProperties = getPropertiesOfObjectType(source);
+ if (sourceProperties) {
+ for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
+ var sourceProperty = sourceProperties_1[_i];
+ if (isDiscriminantProperty(target, sourceProperty.name)) {
+ var sourceType = getTypeOfSymbol(sourceProperty);
+ for (var _a = 0, _b = target.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ var targetType = getTypeOfPropertyOfType(type, sourceProperty.name);
+ if (targetType && isRelatedTo(sourceType, targetType)) {
+ return type;
+ }
+ }
+ }
+ }
+ }
+ }
function typeRelatedToEachType(source, target, reportErrors) {
var result = -1 /* True */;
var targetTypes = target.types;
- for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
- var targetType = targetTypes_1[_i];
+ for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
+ var targetType = targetTypes_2[_i];
var related = isRelatedTo(source, targetType, reportErrors);
if (!related) {
return 0 /* False */;
@@ -30960,22 +33472,22 @@ var ts;
}
return result;
}
- // Determine if two object types are related by structure. First, check if the result is already available in the global cache.
+ // Determine if possibly recursive types are related. First, check if the result is already available in the global cache.
// Second, check if we have already started a comparison of the given two types in which case we assume the result to be true.
// Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
// and issue an error. Otherwise, actually compare the structure of the two types.
- function objectTypeRelatedTo(source, originalSource, target, reportErrors) {
+ function recursiveTypeRelatedTo(source, target, reportErrors) {
if (overflow) {
return 0 /* False */;
}
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
if (reportErrors && related === 2 /* Failed */) {
// We are elaborating errors and the cached result is an unreported failure. Record the result as a reported
// failure and continue computing the relation such that errors get reported.
- relation[id] = 3 /* FailedAndReported */;
+ relation.set(id, 3 /* FailedAndReported */);
}
else {
return related === 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
@@ -30984,7 +33496,7 @@ var ts;
if (depth > 0) {
for (var i = 0; i < depth; i++) {
// If source and target are already being compared, consider them related with assumptions
- if (maybeStack[i][id]) {
+ if (maybeStack[i].get(id)) {
return 1 /* Maybe */;
}
}
@@ -31002,75 +33514,192 @@ var ts;
sourceStack[depth] = source;
targetStack[depth] = target;
maybeStack[depth] = ts.createMap();
- maybeStack[depth][id] = 1 /* Succeeded */;
+ maybeStack[depth].set(id, 1 /* Succeeded */);
depth++;
var saveExpandingFlags = expandingFlags;
- if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth))
+ if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
expandingFlags |= 1;
- if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth))
+ if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
expandingFlags |= 2;
- var result;
- if (expandingFlags === 3) {
- result = 1 /* Maybe */;
- }
- else if (isGenericMappedType(source) || isGenericMappedType(target)) {
- result = mappedTypeRelatedTo(source, target, reportErrors);
- }
- else {
- result = propertiesRelatedTo(source, target, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 0 /* Call */, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportErrors);
- if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 0 /* String */, reportErrors);
- if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 1 /* Number */, reportErrors);
- }
- }
- }
- }
- }
+ var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : 1 /* Maybe */;
expandingFlags = saveExpandingFlags;
depth--;
if (result) {
var maybeCache = maybeStack[depth];
// If result is definitely true, copy assumptions to global cache, else copy to next level up
var destinationCache = (result === -1 /* True */ || depth === 0) ? relation : maybeStack[depth - 1];
- ts.copyProperties(maybeCache, destinationCache);
+ ts.copyEntries(maybeCache, destinationCache);
}
else {
// A false result goes straight into global cache (when something is false under assumptions it
// will also be false without assumptions)
- relation[id] = reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */;
+ relation.set(id, reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */);
}
return result;
}
- // A type [P in S]: X is related to a type [P in T]: Y if T is related to S and X is related to Y.
- function mappedTypeRelatedTo(source, target, reportErrors) {
- if (isGenericMappedType(target)) {
- if (isGenericMappedType(source)) {
- var result_2;
- if (relation === identityRelation) {
- var readonlyMatches = !source.declaration.readonlyToken === !target.declaration.readonlyToken;
- var optionalMatches = !source.declaration.questionToken === !target.declaration.questionToken;
- if (readonlyMatches && optionalMatches) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getErasedTemplateTypeFromMappedType(source), getErasedTemplateTypeFromMappedType(target), reportErrors);
- }
+ function structuredTypeRelatedTo(source, target, reportErrors) {
+ var result;
+ var saveErrorInfo = errorInfo;
+ if (target.flags & 16384 /* TypeParameter */) {
+ // A source type { [P in keyof T]: X } is related to a target type T if X is related to T[P].
+ if (getObjectFlags(source) & 32 /* Mapped */ && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
+ if (!source.declaration.questionToken) {
+ var templateType = getTemplateTypeFromMappedType(source);
+ var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
+ if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+ return result;
}
}
+ }
+ }
+ else if (target.flags & 262144 /* Index */) {
+ // A keyof S is related to a keyof T if T is related to S.
+ if (source.flags & 262144 /* Index */) {
+ if (result = isRelatedTo(target.type, source.type, /*reportErrors*/ false)) {
+ return result;
+ }
+ }
+ // A type S is assignable to keyof T if S is assignable to keyof C, where C is the
+ // constraint of T.
+ var constraint = getConstraintOfType(target.type);
+ if (constraint) {
+ if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else if (target.flags & 524288 /* IndexedAccess */) {
+ // A type S is related to a type T[K] if S is related to A[K], where K is string-like and
+ // A is the apparent type of S.
+ var constraint = getConstraintOfType(target);
+ if (constraint) {
+ if (result = isRelatedTo(source, constraint, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ if (source.flags & 16384 /* TypeParameter */) {
+ // A source type T is related to a target type { [P in keyof T]: X } if T[P] is related to X.
+ if (getObjectFlags(target) & 32 /* Mapped */ && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
+ var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
+ var templateType = getTemplateTypeFromMappedType(target);
+ if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else {
+ var constraint = getConstraintOfTypeParameter(source);
+ // A type parameter with no constraint is not related to the non-primitive object type.
+ if (constraint || !(target.flags & 16777216 /* NonPrimitive */)) {
+ if (!constraint || constraint.flags & 1 /* Any */) {
+ constraint = emptyObjectType;
+ }
+ // The constraint may need to be further instantiated with its 'this' type.
+ constraint = getTypeWithThisArgument(constraint, source);
+ // Report constraint errors only if the constraint is not the empty object type
+ var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
+ if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ }
+ else if (source.flags & 524288 /* IndexedAccess */) {
+ // A type S[K] is related to a type T if A[K] is related to T, where K is string-like and
+ // A is the apparent type of S.
+ var constraint = getConstraintOfType(source);
+ if (constraint) {
+ if (result = isRelatedTo(constraint, target, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else if (target.flags & 524288 /* IndexedAccess */ && source.indexType === target.indexType) {
+ // if we have indexed access types with identical index types, see if relationship holds for
+ // the two object types.
+ if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else {
+ if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
+ // We have type references to same target type, see if relationship holds for all type arguments
+ if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ return result;
+ }
+ }
+ // Even if relationship doesn't hold for unions, intersections, or generic type references,
+ // it may hold in a structural comparison.
+ var sourceIsPrimitive = !!(source.flags & 8190 /* Primitive */);
+ if (relation !== identityRelation) {
+ source = getApparentType(source);
+ }
+ // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates
+ // to X. Failing both of those we want to check if the aggregation of A and B's members structurally
+ // relates to X. Thus, we include intersection types on the source side here.
+ if (source.flags & (32768 /* Object */ | 131072 /* Intersection */) && target.flags & 32768 /* Object */) {
+ // Report structural errors only if we haven't reported any errors yet
+ var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive;
+ if (isGenericMappedType(source) || isGenericMappedType(target)) {
+ result = mappedTypeRelatedTo(source, target, reportStructuralErrors);
+ }
else {
- if (relation === comparableRelation || !source.declaration.questionToken || target.declaration.questionToken) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target), reportErrors);
+ result = propertiesRelatedTo(source, target, reportStructuralErrors);
+ if (result) {
+ result &= signaturesRelatedTo(source, target, 0 /* Call */, reportStructuralErrors);
+ if (result) {
+ result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 0 /* String */, sourceIsPrimitive, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 1 /* Number */, sourceIsPrimitive, reportStructuralErrors);
+ }
+ }
}
}
}
+ if (result) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
}
}
- else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(target))) {
- return -1 /* True */;
+ return 0 /* False */;
+ }
+ // A type [P in S]: X is related to a type [Q in T]: Y if T is related to S and X' is
+ // related to Y, where X' is an instantiation of X in which P is replaced with Q. Notice
+ // that S and T are contra-variant whereas X and Y are co-variant.
+ function mappedTypeRelatedTo(source, target, reportErrors) {
+ if (isGenericMappedType(target)) {
+ if (isGenericMappedType(source)) {
+ var sourceReadonly = !!source.declaration.readonlyToken;
+ var sourceOptional = !!source.declaration.questionToken;
+ var targetReadonly = !!target.declaration.readonlyToken;
+ var targetOptional = !!target.declaration.questionToken;
+ var modifiersRelated = relation === identityRelation ?
+ sourceReadonly === targetReadonly && sourceOptional === targetOptional :
+ relation === comparableRelation || !sourceOptional || targetOptional;
+ if (modifiersRelated) {
+ var result_2;
+ if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
+ return result_2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
+ }
+ }
+ }
+ else if (target.declaration.questionToken && isEmptyObjectType(source)) {
+ return -1 /* True */;
+ }
+ }
+ else if (relation !== identityRelation) {
+ var resolved = resolveStructuredTypeMembers(target);
+ if (isEmptyResolvedType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & 1 /* Any */) {
+ return -1 /* True */;
+ }
}
return 0 /* False */;
}
@@ -31081,22 +33710,28 @@ var ts;
var result = -1 /* True */;
var properties = getPropertiesOfObjectType(target);
var requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & 128 /* ObjectLiteral */);
- for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
- var targetProp = properties_3[_i];
+ for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
+ var targetProp = properties_4[_i];
var sourceProp = getPropertyOfType(source, targetProp.name);
if (sourceProp !== targetProp) {
if (!sourceProp) {
- if (!(targetProp.flags & 536870912 /* Optional */) || requireOptionalProperties) {
+ if (!(targetProp.flags & 67108864 /* Optional */) || requireOptionalProperties) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
}
return 0 /* False */;
}
}
- else if (!(targetProp.flags & 134217728 /* Prototype */)) {
+ else if (!(targetProp.flags & 16777216 /* Prototype */)) {
var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) {
+ if (getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
+ }
+ return 0 /* False */;
+ }
if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
if (reportErrors) {
if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) {
@@ -31110,12 +33745,9 @@ var ts;
}
}
else if (targetPropFlags & 16 /* Protected */) {
- var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32 /* Class */;
- var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined;
- var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp));
- if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
+ if (!isValidOverrideOf(sourceProp, targetProp)) {
if (reportErrors) {
- reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
+ reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source), typeToString(getDeclaringClass(targetProp) || target));
}
return 0 /* False */;
}
@@ -31135,7 +33767,7 @@ var ts;
}
result &= related;
// When checking for comparability, be more lenient with optional properties.
- if (relation !== comparableRelation && sourceProp.flags & 536870912 /* Optional */ && !(targetProp.flags & 536870912 /* Optional */)) {
+ if (relation !== comparableRelation && sourceProp.flags & 67108864 /* Optional */ && !(targetProp.flags & 67108864 /* Optional */)) {
// TypeScript 1.0 spec (April 2014): 3.8.3
// S is a subtype of a type T, and T is a supertype of S if ...
// S' and T are object types and, for each member M in T..
@@ -31163,8 +33795,8 @@ var ts;
return 0 /* False */;
}
var result = -1 /* True */;
- for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
- var sourceProp = sourceProperties_1[_i];
+ for (var _i = 0, sourceProperties_2 = sourceProperties; _i < sourceProperties_2.length; _i++) {
+ var sourceProp = sourceProperties_2[_i];
var targetProp = getPropertyOfObjectType(target, sourceProp.name);
if (!targetProp) {
return 0 /* False */;
@@ -31228,7 +33860,7 @@ var ts;
* See signatureAssignableTo, compareSignaturesIdentical
*/
function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
+ return compareSignaturesRelated(source, target, /*checkAsCallback*/ false, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -31237,7 +33869,7 @@ var ts;
return 0 /* False */;
}
var result = -1 /* True */;
- for (var i = 0, len = sourceSignatures.length; i < len; i++) {
+ for (var i = 0; i < sourceSignatures.length; i++) {
var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, isRelatedTo);
if (!related) {
return 0 /* False */;
@@ -31270,12 +33902,12 @@ var ts;
}
return related;
}
- function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) {
+ function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors) {
if (relation === identityRelation) {
return indexTypesIdenticalTo(source, target, kind);
}
var targetInfo = getIndexInfoOfType(target, kind);
- if (!targetInfo || ((targetInfo.type.flags & 1 /* Any */) && !(originalSource.flags & 8190 /* Primitive */))) {
+ if (!targetInfo || targetInfo.type.flags & 1 /* Any */ && !sourceIsPrimitive) {
// Index signature of type any permits assignment from everything but primitives
return -1 /* True */;
}
@@ -31337,6 +33969,45 @@ var ts;
return false;
}
}
+ // Invoke the callback for each underlying property symbol of the given symbol and return the first
+ // value that isn't undefined.
+ function forEachProperty(prop, callback) {
+ if (getCheckFlags(prop) & 6 /* Synthetic */) {
+ for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ var p = getPropertyOfType(t, prop.name);
+ var result = p && forEachProperty(p, callback);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ }
+ return callback(prop);
+ }
+ // Return the declaring class type of a property or undefined if property not declared in class
+ function getDeclaringClass(prop) {
+ return prop.parent && prop.parent.flags & 32 /* Class */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;
+ }
+ // Return true if some underlying source property is declared in a class that derives
+ // from the given base class.
+ function isPropertyInClassDerivedFrom(prop, baseClass) {
+ return forEachProperty(prop, function (sp) {
+ var sourceClass = getDeclaringClass(sp);
+ return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
+ });
+ }
+ // Return true if source property is a valid override of protected parts of target property.
+ function isValidOverrideOf(sourceProp, targetProp) {
+ return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ?
+ !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
+ }
+ // Return true if the given class derives from each of the declaring classes of the protected
+ // constituents of the given property.
+ function isClassDerivedFromDeclaringClasses(checkClass, prop) {
+ return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 /* Protected */ ?
+ !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
+ }
// Return true if the given type is the constructor type for an abstract class
function isAbstractConstructorType(type) {
if (getObjectFlags(type) & 16 /* Anonymous */) {
@@ -31350,22 +34021,24 @@ var ts;
}
return false;
}
- // Return true if the given type is part of a deeply nested chain of generic instantiations. We consider this to be the case
- // when structural type comparisons have been started for 10 or more instantiations of the same generic type. It is possible,
- // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely expanding.
- // Effectively, we will generate a false positive when two types are structurally equal to at least 10 levels, but unequal at
- // some level beyond that.
- function isDeeplyNestedGeneric(type, stack, depth) {
- // We track type references (created by createTypeReference) and instantiated types (created by instantiateType)
- if (getObjectFlags(type) & (4 /* Reference */ | 64 /* Instantiated */) && depth >= 5) {
+ // Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
+ // for 5 or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
+ // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
+ // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least 5
+ // levels, but unequal at some level beyond that.
+ function isDeeplyNestedType(type, stack, depth) {
+ // We track all object types that have an associated symbol (representing the origin of the type)
+ if (depth >= 5 && type.flags & 32768 /* Object */) {
var symbol = type.symbol;
- var count = 0;
- for (var i = 0; i < depth; i++) {
- var t = stack[i];
- if (getObjectFlags(t) & (4 /* Reference */ | 64 /* Instantiated */) && t.symbol === symbol) {
- count++;
- if (count >= 5)
- return true;
+ if (symbol) {
+ var count = 0;
+ for (var i = 0; i < depth; i++) {
+ var t = stack[i];
+ if (t.flags & 32768 /* Object */ && t.symbol === symbol) {
+ count++;
+ if (count >= 5)
+ return true;
+ }
}
}
}
@@ -31392,7 +34065,7 @@ var ts;
}
}
else {
- if ((sourceProp.flags & 536870912 /* Optional */) !== (targetProp.flags & 536870912 /* Optional */)) {
+ if ((sourceProp.flags & 67108864 /* Optional */) !== (targetProp.flags & 67108864 /* Optional */)) {
return 0 /* False */;
}
}
@@ -31436,7 +34109,7 @@ var ts;
// the constraints with a common set of type arguments to get relatable entities in places where
// type parameters occur in the constraints. The complexity of doing that doesn't seem worthwhile,
// particularly as we're comparing erased versions of the signatures below.
- if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
+ if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) {
return 0 /* False */;
}
// Spec 1.0 Section 3.8.3 & 3.8.4:
@@ -31476,8 +34149,8 @@ var ts;
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
function isSupertypeOfEach(candidate, types) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
if (candidate !== t && !isTypeSubtypeOf(t, candidate))
return false;
}
@@ -31485,8 +34158,8 @@ var ts;
}
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var t = types_8[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -31592,8 +34265,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var t = types_9[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -31625,7 +34298,7 @@ var ts;
types.push(undefinedType);
if (flags & 4096 /* Null */)
types.push(nullType);
- return getUnionType(types, /*subtypeReduction*/ true);
+ return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 /* DefinitelyFalsy */ ?
@@ -31644,8 +34317,8 @@ var ts;
getSignaturesOfType(type, 0 /* Call */).length === 0 &&
getSignaturesOfType(type, 1 /* Construct */).length === 0;
}
- function createTransientSymbol(source, type) {
- var symbol = createSymbol(source.flags | 67108864 /* Transient */, source.name);
+ function createSymbolWithType(source, type) {
+ var symbol = createSymbol(source.flags, source.name);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;
@@ -31661,9 +34334,8 @@ var ts;
var property = _a[_i];
var original = getTypeOfSymbol(property);
var updated = f(original);
- members[property.name] = updated === original ? property : createTransientSymbol(property, updated);
+ members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
}
- ;
return members;
}
/**
@@ -31687,11 +34359,19 @@ var ts;
type.regularType = regularNew;
return regularNew;
}
+ function getWidenedProperty(prop) {
+ var original = getTypeOfSymbol(prop);
+ var widened = getWidenedType(original);
+ return widened === original ? prop : createSymbolWithType(prop, widened);
+ }
function getWidenedTypeOfObjectLiteral(type) {
- var members = transformTypeOfMembers(type, function (prop) {
- var widened = getWidenedType(prop);
- return prop === widened ? prop : widened;
- });
+ var members = ts.createMap();
+ for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ // Since get accessors already widen their return value there is no need to
+ // widen accessor based properties here.
+ members.set(prop.name, prop.flags & 4 /* Property */ ? getWidenedProperty(prop) : prop);
+ }
var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */);
var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */);
return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
@@ -31763,25 +34443,25 @@ var ts;
var typeAsString = typeToString(getWidenedType(type));
var diagnostic;
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
diagnostic = declaration.dotDotDotToken ?
ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
break;
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
if (!declaration.name) {
error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
return;
@@ -31794,7 +34474,7 @@ var ts;
error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
- if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
+ if (produceDiagnostics && noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
// Report implicit any error within type if possible, otherwise report error on declaration
if (!reportWideningErrorsInType(type)) {
reportImplicitAnyError(declaration, type);
@@ -31821,13 +34501,14 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes) {
+ function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
return {
signature: signature,
inferUnionTypes: inferUnionTypes,
inferences: inferences,
inferredTypes: new Array(signature.typeParameters.length),
+ useAnyForNoInferences: useAnyForNoInferences
};
}
function createTypeInferencesObject() {
@@ -31841,25 +34522,73 @@ var ts;
// Return true if the given type could possibly reference a type parameter for which
// we perform type inference (i.e. a type parameter of a generic function). We cache
// results for union and intersection types for performance reasons.
- function couldContainTypeParameters(type) {
+ function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
- return !!(type.flags & 16384 /* TypeParameter */ ||
- objectFlags & 4 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
+ return !!(type.flags & 540672 /* TypeVariable */ ||
+ objectFlags & 4 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) ||
objectFlags & 32 /* Mapped */ ||
- type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeParameters(type));
+ type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeVariables(type));
}
- function couldUnionOrIntersectionContainTypeParameters(type) {
- if (type.couldContainTypeParameters === undefined) {
- type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters);
+ function couldUnionOrIntersectionContainTypeVariables(type) {
+ if (type.couldContainTypeVariables === undefined) {
+ type.couldContainTypeVariables = ts.forEach(type.types, couldContainTypeVariables);
}
- return type.couldContainTypeParameters;
+ return type.couldContainTypeVariables;
}
function isTypeParameterAtTopLevel(type, typeParameter) {
return type === typeParameter || type.flags & 196608 /* UnionOrIntersection */ && ts.forEach(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); });
}
- function inferTypes(context, originalSource, originalTarget) {
- var typeParameters = context.signature.typeParameters;
+ // Infer a suitable input type for a homomorphic mapped type { [P in keyof T]: X }. We construct
+ // an object type with the same set of properties as the source type, where the type of each
+ // property is computed by inferring from the source property type to X for the type
+ // variable T[P] (i.e. we treat the type T[P] as the type variable we're inferring for).
+ function inferTypeForHomomorphicMappedType(source, target) {
+ var properties = getPropertiesOfType(source);
+ var indexInfo = getIndexInfoOfType(source, 0 /* String */);
+ if (properties.length === 0 && !indexInfo) {
+ return undefined;
+ }
+ var typeVariable = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var typeVariableArray = [typeVariable];
+ var typeInferences = createTypeInferencesObject();
+ var typeInferencesArray = [typeInferences];
+ var templateType = getTemplateTypeFromMappedType(target);
+ var readonlyMask = target.declaration.readonlyToken ? false : true;
+ var optionalMask = target.declaration.questionToken ? 0 : 67108864 /* Optional */;
+ var members = createSymbolTable(properties);
+ for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
+ var prop = properties_5[_i];
+ var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
+ if (!inferredPropType) {
+ return undefined;
+ }
+ var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.name);
+ inferredProp.checkFlags = readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0;
+ inferredProp.declarations = prop.declarations;
+ inferredProp.type = inferredPropType;
+ members.set(prop.name, inferredProp);
+ }
+ if (indexInfo) {
+ var inferredIndexType = inferTargetType(indexInfo.type);
+ if (!inferredIndexType) {
+ return undefined;
+ }
+ indexInfo = createIndexInfo(inferredIndexType, readonlyMask && indexInfo.isReadonly);
+ }
+ return createAnonymousType(undefined, members, emptyArray, emptyArray, indexInfo, undefined);
+ function inferTargetType(sourceType) {
+ typeInferences.primary = undefined;
+ typeInferences.secondary = undefined;
+ inferTypes(typeVariableArray, typeInferencesArray, sourceType, templateType);
+ var inferences = typeInferences.primary || typeInferences.secondary;
+ return inferences && getUnionType(inferences, /*subtypeReduction*/ true);
+ }
+ }
+ function inferTypesWithContext(context, originalSource, originalTarget) {
+ inferTypes(context.signature.typeParameters, context.inferences, originalSource, originalTarget);
+ }
+ function inferTypes(typeVariables, typeInferences, originalSource, originalTarget) {
var sourceStack;
var targetStack;
var depth = 0;
@@ -31875,7 +34604,7 @@ var ts;
return false;
}
function inferFromTypes(source, target) {
- if (!couldContainTypeParameters(target)) {
+ if (!couldContainTypeVariables(target)) {
return;
}
if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
@@ -31927,7 +34656,7 @@ var ts;
target = removeTypesFromUnionOrIntersection(target, matchingTypes);
}
}
- if (target.flags & 16384 /* TypeParameter */) {
+ if (target.flags & 540672 /* TypeVariable */) {
// If target is a type parameter, make an inference, unless the source type contains
// the anyFunctionType (the wildcard type that's used to avoid contextually typing functions).
// Because the anyFunctionType is internal, it should not be exposed to the user by adding
@@ -31937,9 +34666,9 @@ var ts;
if (source.flags & 8388608 /* ContainsAnyFunctionType */) {
return;
}
- for (var i = 0; i < typeParameters.length; i++) {
- if (target === typeParameters[i]) {
- var inferences = context.inferences[i];
+ for (var i = 0; i < typeVariables.length; i++) {
+ if (target === typeVariables[i]) {
+ var inferences = typeInferences[i];
if (!inferences.isFixed) {
// Any inferences that are made to a type parameter in a union type are inferior
// to inferences made to a flat (non-union) type. This is because if we infer to
@@ -31953,7 +34682,7 @@ var ts;
if (!ts.contains(candidates, source)) {
candidates.push(source);
}
- if (!isTypeParameterAtTopLevel(originalTarget, target)) {
+ if (target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
inferences.topLevel = false;
}
}
@@ -31972,25 +34701,25 @@ var ts;
}
else if (target.flags & 196608 /* UnionOrIntersection */) {
var targetTypes = target.types;
- var typeParameterCount = 0;
- var typeParameter = void 0;
- // First infer to each type in union or intersection that isn't a type parameter
- for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) {
- var t = targetTypes_2[_d];
- if (t.flags & 16384 /* TypeParameter */ && ts.contains(typeParameters, t)) {
- typeParameter = t;
- typeParameterCount++;
+ var typeVariableCount = 0;
+ var typeVariable = void 0;
+ // First infer to each type in union or intersection that isn't a type variable
+ for (var _d = 0, targetTypes_3 = targetTypes; _d < targetTypes_3.length; _d++) {
+ var t = targetTypes_3[_d];
+ if (t.flags & 540672 /* TypeVariable */ && ts.contains(typeVariables, t)) {
+ typeVariable = t;
+ typeVariableCount++;
}
else {
inferFromTypes(source, t);
}
}
- // Next, if target containings a single naked type parameter, make a secondary inference to that type
- // parameter. This gives meaningful results for union types in co-variant positions and intersection
+ // Next, if target containings a single naked type variable, make a secondary inference to that type
+ // variable. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
- if (typeParameterCount === 1) {
+ if (typeVariableCount === 1) {
inferiority++;
- inferFromTypes(source, typeParameter);
+ inferFromTypes(source, typeVariable);
inferiority--;
}
}
@@ -32008,14 +34737,14 @@ var ts;
if (isInProcess(source, target)) {
return;
}
- if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) {
+ if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
return;
}
var key = source.id + "," + target.id;
- if (visited[key]) {
+ if (visited.get(key)) {
return;
}
- visited[key] = true;
+ visited.set(key, true);
if (depth === 0) {
sourceStack = [];
targetStack = [];
@@ -32031,12 +34760,25 @@ var ts;
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32 /* Mapped */) {
var constraintType = getConstraintTypeFromMappedType(target);
- if (getObjectFlags(source) & 32 /* Mapped */) {
- inferFromTypes(getConstraintTypeFromMappedType(source), constraintType);
- inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));
+ if (constraintType.flags & 262144 /* Index */) {
+ // We're inferring from some source type S to a homomorphic mapped type { [P in keyof T]: X },
+ // where T is a type variable. Use inferTypeForHomomorphicMappedType to infer a suitable source
+ // type and then make a secondary inference from that type to T. We make a secondary inference
+ // such that direct inferences to T get priority over inferences to Partial<T>, for example.
+ var index = ts.indexOf(typeVariables, constraintType.type);
+ if (index >= 0 && !typeInferences[index].isFixed) {
+ var inferredType = inferTypeForHomomorphicMappedType(source, target);
+ if (inferredType) {
+ inferiority++;
+ inferFromTypes(inferredType, typeVariables[index]);
+ inferiority--;
+ }
+ }
return;
}
if (constraintType.flags & 16384 /* TypeParameter */) {
+ // We're inferring from some source type S to a mapped type { [P in T]: X }, where T is a type
+ // parameter. Infer from 'keyof S' to T and infer from a union of each property type in S to X.
inferFromTypes(getIndexType(source), constraintType);
inferFromTypes(getUnionType(ts.map(getPropertiesOfType(source), getTypeOfSymbol)), getTemplateTypeFromMappedType(target));
return;
@@ -32049,8 +34791,8 @@ var ts;
}
function inferFromProperties(source, target) {
var properties = getPropertiesOfObjectType(target);
- for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
- var targetProp = properties_4[_i];
+ for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) {
+ var targetProp = properties_6[_i];
var sourceProp = getPropertyOfObjectType(source, targetProp.name);
if (sourceProp) {
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
@@ -32100,8 +34842,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
- var t = types_10[_i];
+ for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+ var t = types_13[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -32151,11 +34893,20 @@ var ts;
inferenceSucceeded = !!unionOrSuperType;
}
else {
- // Infer the empty object type when no inferences were made. It is important to remember that
- // in this case, inference still succeeds, meaning there is no error for not having inference
- // candidates. An inference error only occurs when there are *conflicting* candidates, i.e.
+ // Infer either the default or the empty object type when no inferences were
+ // made. It is important to remember that in this case, inference still
+ // succeeds, meaning there is no error for not having inference candidates. An
+ // inference error only occurs when there are *conflicting* candidates, i.e.
// candidates with no common supertype.
- inferredType = emptyObjectType;
+ var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ if (defaultType) {
+ // Instantiate the default type. Any forward reference to a type
+ // parameter should be instantiated to the empty object type.
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ }
+ else {
+ inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ }
inferenceSucceeded = true;
}
context.inferredTypes[index] = inferredType;
@@ -32196,19 +34947,7 @@ var ts;
// TypeScript 1.0 spec (April 2014): 3.6.3
// A type query consists of the keyword typeof followed by an expression.
// The expression is restricted to a single identifier or a sequence of identifiers separated by periods
- while (node) {
- switch (node.kind) {
- case 160 /* TypeQuery */:
- return true;
- case 70 /* Identifier */:
- case 141 /* QualifiedName */:
- node = node.parent;
- continue;
- default:
- return false;
- }
- }
- ts.Debug.fail("should not get here");
+ return !!ts.findAncestor(node, function (n) { return n.kind === 161 /* TypeQuery */ ? true : n.kind === 70 /* Identifier */ || n.kind === 142 /* QualifiedName */ ? false : "quit"; });
}
// Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers
// separated by dots). The key consists of the id of the symbol referenced by the
@@ -32222,7 +34961,7 @@ var ts;
if (node.kind === 98 /* ThisKeyword */) {
return "0";
}
- if (node.kind === 177 /* PropertyAccessExpression */) {
+ if (node.kind === 178 /* PropertyAccessExpression */) {
var key = getFlowCacheKey(node.expression);
return key && key + "." + node.name.text;
}
@@ -32233,7 +34972,7 @@ var ts;
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
return node;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return getLeftmostIdentifierOrThis(node.expression);
}
return undefined;
@@ -32242,19 +34981,21 @@ var ts;
switch (source.kind) {
case 70 /* Identifier */:
return target.kind === 70 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) ||
- (target.kind === 223 /* VariableDeclaration */ || target.kind === 174 /* BindingElement */) &&
+ (target.kind === 225 /* VariableDeclaration */ || target.kind === 175 /* BindingElement */) &&
getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
case 98 /* ThisKeyword */:
return target.kind === 98 /* ThisKeyword */;
- case 177 /* PropertyAccessExpression */:
- return target.kind === 177 /* PropertyAccessExpression */ &&
+ case 96 /* SuperKeyword */:
+ return target.kind === 96 /* SuperKeyword */;
+ case 178 /* PropertyAccessExpression */:
+ return target.kind === 178 /* PropertyAccessExpression */ &&
source.name.text === target.name.text &&
isMatchingReference(source.expression, target.expression);
}
return false;
}
function containsMatchingReference(source, target) {
- while (source.kind === 177 /* PropertyAccessExpression */) {
+ while (source.kind === 178 /* PropertyAccessExpression */) {
source = source.expression;
if (isMatchingReference(source, target)) {
return true;
@@ -32267,7 +35008,7 @@ var ts;
// a possible discriminant if its type differs in the constituents of containing union type, and if every
// choice is a unit type or a union of unit types.
function containsMatchingReferenceDiscriminant(source, target) {
- return target.kind === 177 /* PropertyAccessExpression */ &&
+ return target.kind === 178 /* PropertyAccessExpression */ &&
containsMatchingReference(source, target.expression) &&
isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
}
@@ -32275,7 +35016,7 @@ var ts;
if (expr.kind === 70 /* Identifier */) {
return getTypeOfSymbol(getResolvedSymbol(expr));
}
- if (expr.kind === 177 /* PropertyAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */) {
var type = getDeclaredTypeOfReference(expr.expression);
return type && getTypeOfPropertyOfType(type, expr.name.text);
}
@@ -32284,9 +35025,9 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536 /* Union */) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && prop.flags & 268435456 /* SyntheticProperty */) {
+ if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
if (prop.isDiscriminantProperty === undefined) {
- prop.isDiscriminantProperty = prop.hasNonUniformType && isLiteralType(getTypeOfSymbol(prop));
+ prop.isDiscriminantProperty = prop.checkFlags & 32 /* HasNonUniformType */ && isLiteralType(getTypeOfSymbol(prop));
}
return prop.isDiscriminantProperty;
}
@@ -32305,7 +35046,7 @@ var ts;
}
}
}
- if (callExpression.expression.kind === 177 /* PropertyAccessExpression */ &&
+ if (callExpression.expression.kind === 178 /* PropertyAccessExpression */ &&
isOrContainsMatchingReference(reference, callExpression.expression.expression)) {
return true;
}
@@ -32347,8 +35088,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0 /* None */;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
result |= getTypeFacts(t);
}
return result;
@@ -32358,7 +35099,7 @@ var ts;
// check. This gives us a quicker out in the common case where an object type is not a function.
var resolved = resolveStructuredTypeMembers(type);
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
- resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType));
+ resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
}
function getTypeFacts(type) {
var flags = type.flags;
@@ -32401,9 +35142,11 @@ var ts;
if (flags & 512 /* ESSymbol */) {
return strictNullChecks ? 1981320 /* SymbolStrictFacts */ : 4193160 /* SymbolFacts */;
}
- if (flags & 16384 /* TypeParameter */) {
- var constraint = getConstraintOfTypeParameter(type);
- return getTypeFacts(constraint || emptyObjectType);
+ if (flags & 16777216 /* NonPrimitive */) {
+ return strictNullChecks ? 6166480 /* ObjectStrictFacts */ : 8378320 /* ObjectFacts */;
+ }
+ if (flags & 540672 /* TypeVariable */) {
+ return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
}
if (flags & 196608 /* UnionOrIntersection */) {
return getTypeFactsOfTypes(type.types);
@@ -32429,17 +35172,23 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) ||
+ checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
- return node.parent.kind === 175 /* ArrayLiteralExpression */ || node.parent.kind === 257 /* PropertyAssignment */ ?
+ var isDestructuringDefaultAssignment = node.parent.kind === 176 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) ||
+ node.parent.kind === 260 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent);
+ return isDestructuringDefaultAssignment ?
getTypeWithDefault(getAssignedType(node), node.right) :
getTypeOfExpression(node.right);
}
+ function isDestructuringAssignmentTarget(parent) {
+ return parent.parent.kind === 193 /* BinaryExpression */ && parent.parent.left === parent ||
+ parent.parent.kind === 215 /* ForOfStatement */ && parent.parent.initializer === parent;
+ }
function getAssignedTypeOfArrayLiteralElement(node, element) {
return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element));
}
@@ -32455,21 +35204,21 @@ var ts;
function getAssignedType(node) {
var parent = node.parent;
switch (parent.kind) {
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return stringType;
- case 213 /* ForOfStatement */:
- return checkRightHandSideOfForOf(parent.expression) || unknownType;
- case 192 /* BinaryExpression */:
+ case 215 /* ForOfStatement */:
+ return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType;
+ case 193 /* BinaryExpression */:
return getAssignedTypeOfBinaryExpression(parent);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return undefinedType;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return getAssignedTypeOfArrayLiteralElement(parent, node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return getAssignedTypeOfSpreadExpression(parent);
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return getAssignedTypeOfPropertyAssignment(parent);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return getAssignedTypeOfShorthandPropertyAssignment(parent);
}
return unknownType;
@@ -32477,7 +35226,7 @@ var ts;
function getInitialTypeOfBindingElement(node) {
var pattern = node.parent;
var parentType = getInitialType(pattern.parent);
- var type = pattern.kind === 172 /* ObjectBindingPattern */ ?
+ var type = pattern.kind === 173 /* ObjectBindingPattern */ ?
getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
!node.dotDotDotToken ?
getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) :
@@ -32495,35 +35244,35 @@ var ts;
if (node.initializer) {
return getTypeOfInitializer(node.initializer);
}
- if (node.parent.parent.kind === 212 /* ForInStatement */) {
+ if (node.parent.parent.kind === 214 /* ForInStatement */) {
return stringType;
}
- if (node.parent.parent.kind === 213 /* ForOfStatement */) {
- return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType;
+ if (node.parent.parent.kind === 215 /* ForOfStatement */) {
+ return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType;
}
return unknownType;
}
function getInitialType(node) {
- return node.kind === 223 /* VariableDeclaration */ ?
+ return node.kind === 225 /* VariableDeclaration */ ?
getInitialTypeOfVariableDeclaration(node) :
getInitialTypeOfBindingElement(node);
}
function getInitialOrAssignedType(node) {
- return node.kind === 223 /* VariableDeclaration */ || node.kind === 174 /* BindingElement */ ?
+ return node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */ ?
getInitialType(node) :
getAssignedType(node);
}
function isEmptyArrayAssignment(node) {
- return node.kind === 223 /* VariableDeclaration */ && node.initializer &&
+ return node.kind === 225 /* VariableDeclaration */ && node.initializer &&
isEmptyArrayLiteral(node.initializer) ||
- node.kind !== 174 /* BindingElement */ && node.parent.kind === 192 /* BinaryExpression */ &&
+ node.kind !== 175 /* BindingElement */ && node.parent.kind === 193 /* BinaryExpression */ &&
isEmptyArrayLiteral(node.parent.right);
}
function getReferenceCandidate(node) {
switch (node.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return getReferenceCandidate(node.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (node.operatorToken.kind) {
case 57 /* EqualsToken */:
return getReferenceCandidate(node.left);
@@ -32535,13 +35284,13 @@ var ts;
}
function getReferenceRoot(node) {
var parent = node.parent;
- return parent.kind === 183 /* ParenthesizedExpression */ ||
- parent.kind === 192 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node ||
- parent.kind === 192 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ?
+ return parent.kind === 184 /* ParenthesizedExpression */ ||
+ parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node ||
+ parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ?
getReferenceRoot(parent) : node;
}
function getTypeOfSwitchClause(clause) {
- if (clause.kind === 253 /* CaseClause */) {
+ if (clause.kind === 256 /* CaseClause */) {
var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
return isUnitType(caseType) ? caseType : undefined;
}
@@ -32589,8 +35338,32 @@ var ts;
}
return f(type) ? type : neverType;
}
- function mapType(type, f) {
- return type.flags & 65536 /* Union */ ? getUnionType(ts.map(type.types, f)) : f(type);
+ // Apply a mapping function to a type and return the resulting type. If the source type
+ // is a union type, the mapping function is applied to each constituent type and a union
+ // of the resulting types is returned.
+ function mapType(type, mapper) {
+ if (!(type.flags & 65536 /* Union */)) {
+ return mapper(type);
+ }
+ var types = type.types;
+ var mappedType;
+ var mappedTypes;
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var t = mapper(current);
+ if (t) {
+ if (!mappedType) {
+ mappedType = t;
+ }
+ else if (!mappedTypes) {
+ mappedTypes = [mappedType, t];
+ }
+ else {
+ mappedTypes.push(t);
+ }
+ }
+ }
+ return mappedTypes ? getUnionType(mappedTypes) : mappedType;
}
function extractTypesOfKind(type, kind) {
return filterType(type, function (t) { return (t.flags & kind) !== 0; });
@@ -32634,7 +35407,7 @@ var ts;
// we defer subtype reduction until the evolving array type is finalized into a manifest
// array type.
function addEvolvingArrayElementType(evolvingArrayType, node) {
- var elementType = getBaseTypeOfLiteralType(getTypeOfExpression(node));
+ var elementType = getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node));
return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));
}
function createFinalArrayType(elementType) {
@@ -32656,8 +35429,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var t = types_16[_i];
if (!(t.flags & 8192 /* Never */)) {
if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {
return false;
@@ -32680,11 +35453,11 @@ var ts;
function isEvolvingArrayOperationTarget(node) {
var root = getReferenceRoot(node);
var parent = root.parent;
- var isLengthPushOrUnshift = parent.kind === 177 /* PropertyAccessExpression */ && (parent.name.text === "length" ||
- parent.parent.kind === 179 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name));
- var isElementAssignment = parent.kind === 178 /* ElementAccessExpression */ &&
+ var isLengthPushOrUnshift = parent.kind === 178 /* PropertyAccessExpression */ && (parent.name.text === "length" ||
+ parent.parent.kind === 180 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name));
+ var isElementAssignment = parent.kind === 179 /* ElementAccessExpression */ &&
parent.expression === root &&
- parent.parent.kind === 192 /* BinaryExpression */ &&
+ parent.parent.kind === 193 /* BinaryExpression */ &&
parent.parent.operatorToken.kind === 57 /* EqualsToken */ &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
@@ -32711,14 +35484,12 @@ var ts;
}
return false;
}
- function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) {
+ function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+ if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 1033215 /* Narrowable */)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431 /* Narrowable */)) {
return declaredType;
}
- var initialType = assumeInitialized ? declaredType :
- declaredType === autoType || declaredType === autoArrayType ? undefinedType :
- includeFalsyTypes(declaredType, 2048 /* Undefined */);
var visitedFlowStart = visitedFlowCount;
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
visitedFlowCount = visitedFlowStart;
@@ -32727,7 +35498,7 @@ var ts;
// on empty arrays are possible without implicit any errors and new element types can be inferred without
// type mismatch errors.
var resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType);
- if (reference.parent.kind === 201 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) {
+ if (reference.parent.kind === 202 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) {
return declaredType;
}
return resultType;
@@ -32744,7 +35515,19 @@ var ts;
}
}
var type = void 0;
- if (flow.flags & 16 /* Assignment */) {
+ if (flow.flags & 4096 /* AfterFinally */) {
+ // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement
+ flow.locked = true;
+ type = getTypeAtFlowNode(flow.antecedent);
+ flow.locked = false;
+ }
+ else if (flow.flags & 2048 /* PreFinally */) {
+ // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel
+ // so here just redirect to antecedent
+ flow = flow.antecedent;
+ continue;
+ }
+ else if (flow.flags & 16 /* Assignment */) {
type = getTypeAtFlowAssignment(flow);
if (!type) {
flow = flow.antecedent;
@@ -32776,7 +35559,7 @@ var ts;
else if (flow.flags & 2 /* Start */) {
// Check if we should continue with the control flow of the containing function.
var container = flow.container;
- if (container && container !== flowContainer && reference.kind !== 177 /* PropertyAccessExpression */) {
+ if (container && container !== flowContainer && reference.kind !== 178 /* PropertyAccessExpression */ && reference.kind !== 98 /* ThisKeyword */) {
flow = container.flowNode;
continue;
}
@@ -32830,7 +35613,7 @@ var ts;
}
function getTypeAtFlowArrayMutation(flow) {
var node = flow.node;
- var expr = node.kind === 179 /* CallExpression */ ?
+ var expr = node.kind === 180 /* CallExpression */ ?
node.expression.expression :
node.left.expression;
if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -32838,7 +35621,7 @@ var ts;
var type = getTypeFromFlowType(flowType);
if (getObjectFlags(type) & 256 /* EvolvingArray */) {
var evolvedType_1 = type;
- if (node.kind === 179 /* CallExpression */) {
+ if (node.kind === 180 /* CallExpression */) {
for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
var arg = _a[_i];
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -32897,6 +35680,12 @@ var ts;
var seenIncomplete = false;
for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) {
var antecedent = _a[_i];
+ if (antecedent.flags & 2048 /* PreFinally */ && antecedent.lock.locked) {
+ // if flow correspond to branch from pre-try to finally and this branch is locked - this means that
+ // we initially have started following the flow outside the finally block.
+ // in this case we should ignore this branch.
+ continue;
+ }
var flowType = getTypeAtFlowNode(antecedent);
var type = getTypeFromFlowType(flowType);
// If the type at a particular antecedent path is the declared type and the
@@ -32929,8 +35718,9 @@ var ts;
if (!key) {
key = getFlowCacheKey(reference);
}
- if (cache[key]) {
- return cache[key];
+ var cached = cache.get(key);
+ if (cached) {
+ return cached;
}
// If this flow loop junction and reference are already being processed, return
// the union of the types computed for each branch so far, marked as incomplete.
@@ -32965,8 +35755,9 @@ var ts;
// If we see a value appear in the cache it is a sign that control flow analysis
// was restarted and completed by checkExpressionCached. We can simply pick up
// the resulting type and bail out.
- if (cache[key]) {
- return cache[key];
+ var cached_1 = cache.get(key);
+ if (cached_1) {
+ return cached_1;
}
if (!ts.contains(antecedentTypes, type)) {
antecedentTypes.push(type);
@@ -32990,10 +35781,11 @@ var ts;
if (isIncomplete(firstAntecedentType)) {
return createFlowType(result, /*incomplete*/ true);
}
- return cache[key] = result;
+ cache.set(key, result);
+ return result;
}
function isMatchingReferenceDiscriminant(expr) {
- return expr.kind === 177 /* PropertyAccessExpression */ &&
+ return expr.kind === 178 /* PropertyAccessExpression */ &&
declaredType.flags & 65536 /* Union */ &&
isMatchingReference(reference, expr.expression) &&
isDiscriminantProperty(declaredType, expr.name.text);
@@ -33027,10 +35819,10 @@ var ts;
var operator_1 = expr.operatorToken.kind;
var left_1 = getReferenceCandidate(expr.left);
var right_1 = getReferenceCandidate(expr.right);
- if (left_1.kind === 187 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) {
+ if (left_1.kind === 188 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) {
return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
}
- if (right_1.kind === 187 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) {
+ if (right_1.kind === 188 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) {
return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
}
if (isMatchingReference(reference, left_1)) {
@@ -33076,7 +35868,7 @@ var ts;
assumeTrue ? 16384 /* EQUndefined */ : 131072 /* NEUndefined */;
return getTypeWithFacts(type, facts);
}
- if (type.flags & 33281 /* NotUnionOrUnit */) {
+ if (type.flags & 16810497 /* NotUnionOrUnit */) {
return type;
}
if (assumeTrue) {
@@ -33107,14 +35899,22 @@ var ts;
// We narrow a non-union type to an exact primitive type if the non-union type
// is a supertype of that primitive type. For example, type 'any' can be narrowed
// to one of the primitive types.
- var targetType = typeofTypesByName[literal.text];
- if (targetType && isTypeSubtypeOf(targetType, type)) {
- return targetType;
+ var targetType = typeofTypesByName.get(literal.text);
+ if (targetType) {
+ if (isTypeSubtypeOf(targetType, type)) {
+ return targetType;
+ }
+ if (type.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(type) || anyType;
+ if (isTypeSubtypeOf(targetType, constraint)) {
+ return getIntersectionType([type, targetType]);
+ }
+ }
}
}
var facts = assumeTrue ?
- typeofEQFacts[literal.text] || 64 /* TypeofEQHostObject */ :
- typeofNEFacts[literal.text] || 8192 /* TypeofNEHostObject */;
+ typeofEQFacts.get(literal.text) || 64 /* TypeofEQHostObject */ :
+ typeofNEFacts.get(literal.text) || 8192 /* TypeofNEHostObject */;
return getTypeWithFacts(type, facts);
}
function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) {
@@ -33197,10 +35997,9 @@ var ts;
// Otherwise, if the candidate type is assignable to the target type, narrow to the candidate
// type. Otherwise, the types are completely unrelated, so narrow to an intersection of the
// two types.
- var targetType = type.flags & 16384 /* TypeParameter */ ? getApparentType(type) : type;
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
- isTypeAssignableTo(candidate, targetType) ? candidate :
+ isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
}
function narrowTypeByTypePredicate(type, callExpression, assumeTrue) {
@@ -33229,7 +36028,7 @@ var ts;
}
else {
var invokedExpression = ts.skipParentheses(callExpression.expression);
- if (invokedExpression.kind === 178 /* ElementAccessExpression */ || invokedExpression.kind === 177 /* PropertyAccessExpression */) {
+ if (invokedExpression.kind === 179 /* ElementAccessExpression */ || invokedExpression.kind === 178 /* PropertyAccessExpression */) {
var accessExpression = invokedExpression;
var possibleReference = ts.skipParentheses(accessExpression.expression);
if (isMatchingReference(reference, possibleReference)) {
@@ -33248,15 +36047,16 @@ var ts;
switch (expr.kind) {
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
- case 177 /* PropertyAccessExpression */:
+ case 96 /* SuperKeyword */:
+ case 178 /* PropertyAccessExpression */:
return narrowTypeByTruthiness(type, expr, assumeTrue);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return narrowTypeByTypePredicate(type, expr, assumeTrue);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return narrowType(type, expr.expression, assumeTrue);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
if (expr.operator === 50 /* ExclamationToken */) {
return narrowType(type, expr.operand, !assumeTrue);
}
@@ -33289,15 +36089,12 @@ var ts;
return getTypeOfSymbol(symbol);
}
function getControlFlowContainer(node) {
- while (true) {
- node = node.parent;
- if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
- node.kind === 231 /* ModuleBlock */ ||
- node.kind === 261 /* SourceFile */ ||
- node.kind === 147 /* PropertyDeclaration */) {
- return node;
- }
- }
+ return ts.findAncestor(node.parent, function (node) {
+ return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
+ node.kind === 233 /* ModuleBlock */ ||
+ node.kind === 264 /* SourceFile */ ||
+ node.kind === 148 /* PropertyDeclaration */;
+ });
}
// Check if a parameter is assigned anywhere within its declaring function.
function isParameterAssigned(symbol) {
@@ -33312,21 +36109,13 @@ var ts;
return symbol.isAssigned || false;
}
function hasParentWithAssignmentsMarked(node) {
- while (true) {
- node = node.parent;
- if (!node) {
- return false;
- }
- if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */) {
- return true;
- }
- }
+ return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */); });
}
function markParameterAssignments(node) {
if (node.kind === 70 /* Identifier */) {
if (ts.isAssignmentTarget(node)) {
var symbol = getResolvedSymbol(node);
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 144 /* Parameter */) {
+ if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145 /* Parameter */) {
symbol.isAssigned = true;
}
}
@@ -33338,6 +36127,15 @@ var ts;
function isConstVariable(symbol) {
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
}
+ /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
+ var annotationIncludesUndefined = strictNullChecks &&
+ declaration.kind === 145 /* Parameter */ &&
+ declaration.initializer &&
+ getFalsyFlags(declaredType) & 2048 /* Undefined */ &&
+ !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */);
+ return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072 /* NEUndefined */) : declaredType;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -33352,16 +36150,14 @@ var ts;
if (symbol === argumentsSymbol) {
var container = ts.getContainingFunction(node);
if (languageVersion < 2 /* ES2015 */) {
- if (container.kind === 185 /* ArrowFunction */) {
+ if (container.kind === 186 /* ArrowFunction */) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
}
else if (ts.hasModifier(container, 256 /* Async */)) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
}
}
- if (node.flags & 524288 /* AwaitContext */) {
- getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
- }
+ getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
return getTypeOfSymbol(symbol);
}
if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
@@ -33373,7 +36169,7 @@ var ts;
// Due to the emit for class decorators, any reference to the class from inside of the class body
// must instead be rewritten to point to a temporary variable to avoid issues with the double-bind
// behavior of class names in ES6.
- if (declaration_1.kind === 226 /* ClassDeclaration */
+ if (declaration_1.kind === 228 /* ClassDeclaration */
&& ts.nodeIsDecorated(declaration_1)) {
var container = ts.getContainingClass(node);
while (container !== undefined) {
@@ -33385,14 +36181,14 @@ var ts;
container = ts.getContainingClass(container);
}
}
- else if (declaration_1.kind === 197 /* ClassExpression */) {
+ else if (declaration_1.kind === 198 /* ClassExpression */) {
// When we emit a class expression with static members that contain a reference
// to the constructor in the initializer, we will need to substitute that
// binding with an alias as the class name is not in scope.
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
while (container !== undefined) {
if (container.parent === declaration_1) {
- if (container.kind === 147 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) {
+ if (container.kind === 148 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) {
getNodeLinks(declaration_1).flags |= 8388608 /* ClassWithConstructorReference */;
getNodeLinks(node).flags |= 16777216 /* ConstructorReferenceInClass */;
}
@@ -33404,6 +36200,7 @@ var ts;
}
checkCollisionWithCapturedSuperVariable(node, node);
checkCollisionWithCapturedThisVariable(node, node);
+ checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
var type = getTypeOfSymbol(localOrExportSymbol);
var declaration = localOrExportSymbol.valueDeclaration;
@@ -33426,15 +36223,15 @@ var ts;
// The declaration container is the innermost function that encloses the declaration of the variable
// or parameter. The flow container is the innermost function starting with which we analyze the control
// flow graph to determine the control flow based type.
- var isParameter = ts.getRootDeclaration(declaration).kind === 144 /* Parameter */;
+ var isParameter = ts.getRootDeclaration(declaration).kind === 145 /* Parameter */;
var declarationContainer = getControlFlowContainer(declaration);
var flowContainer = getControlFlowContainer(node);
var isOuterVariable = flowContainer !== declarationContainer;
// When the control flow originates in a function expression or arrow function and we are referencing
// a const variable or parameter from an outer function, we extend the origin of the control flow
// analysis to include the immediately enclosing function.
- while (flowContainer !== declarationContainer && (flowContainer.kind === 184 /* FunctionExpression */ ||
- flowContainer.kind === 185 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
+ while (flowContainer !== declarationContainer && (flowContainer.kind === 185 /* FunctionExpression */ ||
+ flowContainer.kind === 186 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
(isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
flowContainer = getControlFlowContainer(flowContainer);
}
@@ -33442,15 +36239,18 @@ var ts;
// the entire control flow graph from the variable's declaration (i.e. when the flow container and
// declaration container are the same).
var assumeInitialized = isParameter || isOuterVariable ||
- type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0) ||
+ type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node)) ||
ts.isInAmbientContext(declaration);
- var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
+ var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
+ type === autoType || type === autoArrayType ? undefinedType :
+ includeFalsyTypes(type, 2048 /* Undefined */);
+ var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
// A variable is considered uninitialized when it is possible to analyze the entire control flow graph
// from declaration to use, and when the variable's declared type doesn't include undefined but the
// control flow based type does include undefined.
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(declaration.name, ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));
error(node, ts.Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
}
@@ -33465,19 +36265,12 @@ var ts;
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isInsideFunction(node, threshold) {
- var current = node;
- while (current && current !== threshold) {
- if (ts.isFunctionLike(current)) {
- return true;
- }
- current = current.parent;
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
}
function checkNestedBlockScopedBinding(node, symbol) {
if (languageVersion >= 2 /* ES2015 */ ||
(symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 ||
- symbol.valueDeclaration.parent.kind === 256 /* CatchClause */) {
+ symbol.valueDeclaration.parent.kind === 259 /* CatchClause */) {
return;
}
// 1. walk from the use site up to the declaration and check
@@ -33502,8 +36295,8 @@ var ts;
}
// mark variables that are declared in loop initializer and reassigned inside the body of ForStatement.
// if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back.
- if (container.kind === 211 /* ForStatement */ &&
- ts.getAncestor(symbol.valueDeclaration, 224 /* VariableDeclarationList */).parent === container &&
+ if (container.kind === 213 /* ForStatement */ &&
+ ts.getAncestor(symbol.valueDeclaration, 226 /* VariableDeclarationList */).parent === container &&
isAssignedInBodyOfForStatement(node, container)) {
getNodeLinks(symbol.valueDeclaration).flags |= 2097152 /* NeedsLoopOutParameter */;
}
@@ -33515,9 +36308,9 @@ var ts;
}
}
function isAssignedInBodyOfForStatement(node, container) {
- var current = node;
// skip parenthesized nodes
- while (current.parent.kind === 183 /* ParenthesizedExpression */) {
+ var current = node;
+ while (current.parent.kind === 184 /* ParenthesizedExpression */) {
current = current.parent;
}
// check if node is used as LHS in some assignment expression
@@ -33525,7 +36318,7 @@ var ts;
if (ts.isAssignmentTarget(current)) {
isAssigned = true;
}
- else if ((current.parent.kind === 190 /* PrefixUnaryExpression */ || current.parent.kind === 191 /* PostfixUnaryExpression */)) {
+ else if ((current.parent.kind === 191 /* PrefixUnaryExpression */ || current.parent.kind === 192 /* PostfixUnaryExpression */)) {
var expr = current.parent;
isAssigned = expr.operator === 42 /* PlusPlusToken */ || expr.operator === 43 /* MinusMinusToken */;
}
@@ -33534,19 +36327,11 @@ var ts;
}
// at this point we know that node is the target of assignment
// now check that modification happens inside the statement part of the ForStatement
- while (current !== container) {
- if (current === container.statement) {
- return true;
- }
- else {
- current = current.parent;
- }
- }
- return false;
+ return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
}
function captureLexicalThis(node, container) {
getNodeLinks(node).flags |= 2 /* LexicalThis */;
- if (container.kind === 147 /* PropertyDeclaration */ || container.kind === 150 /* Constructor */) {
+ if (container.kind === 148 /* PropertyDeclaration */ || container.kind === 151 /* Constructor */) {
var classNode = container.parent;
getNodeLinks(classNode).flags |= 4 /* CaptureThis */;
}
@@ -33589,58 +36374,63 @@ var ts;
var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
return baseConstructorType === nullWideningType;
}
+ function checkThisBeforeSuper(node, container, diagnosticMessage) {
+ var containingClassDecl = container.parent;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
+ // If a containing class does not have extends clause or the class extends null
+ // skip checking whether super statement is called before "this" accessing.
+ if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
+ var superCall = getSuperCallInConstructor(container);
+ // We should give an error in the following cases:
+ // - No super-call
+ // - "this" is accessing before super-call.
+ // i.e super(this)
+ // this.x; super();
+ // We want to make sure that super-call is done before accessing "this" so that
+ // "this" is not accessed as a parameter of the super-call.
+ if (!superCall || superCall.end > node.pos) {
+ // In ES6, super inside constructor of class-declaration has to precede "this" accessing
+ error(node, diagnosticMessage);
+ }
+ }
+ }
function checkThisExpression(node) {
// Stop at the first arrow function so that we can
// tell whether 'this' needs to be captured.
var container = ts.getThisContainer(node, /* includeArrowFunctions */ true);
var needToCaptureLexicalThis = false;
- if (container.kind === 150 /* Constructor */) {
- var containingClassDecl = container.parent;
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
- // If a containing class does not have extends clause or the class extends null
- // skip checking whether super statement is called before "this" accessing.
- if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
- var superCall = getSuperCallInConstructor(container);
- // We should give an error in the following cases:
- // - No super-call
- // - "this" is accessing before super-call.
- // i.e super(this)
- // this.x; super();
- // We want to make sure that super-call is done before accessing "this" so that
- // "this" is not accessed as a parameter of the super-call.
- if (!superCall || superCall.end > node.pos) {
- // In ES6, super inside constructor of class-declaration has to precede "this" accessing
- error(node, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
- }
- }
+ if (container.kind === 151 /* Constructor */) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
}
// Now skip arrow functions to get the "real" owner of 'this'.
- if (container.kind === 185 /* ArrowFunction */) {
+ if (container.kind === 186 /* ArrowFunction */) {
container = ts.getThisContainer(container, /* includeArrowFunctions */ false);
// When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code
needToCaptureLexicalThis = (languageVersion < 2 /* ES2015 */);
}
switch (container.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
// do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
// do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
if (isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
+ // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
if (ts.getModifierFlags(container) & 32 /* Static */) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
+ // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
}
break;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
break;
}
@@ -33652,8 +36442,8 @@ var ts;
// Note: a parameter initializer should refer to class-this unless function-this is explicitly annotated.
// If this is a function in a JS file, it might be a class method. Check if it's the RHS
// of a x.prototype.y = function [name]() { .... }
- if (container.kind === 184 /* FunctionExpression */ &&
- ts.isInJavaScriptFile(container.parent) &&
+ if (container.kind === 185 /* FunctionExpression */ &&
+ container.parent.kind === 193 /* BinaryExpression */ &&
ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) {
// Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container')
var className = container.parent // x.prototype.y = f
@@ -33673,7 +36463,7 @@ var ts;
if (ts.isClassLike(container.parent)) {
var symbol = getSymbolOfNode(container.parent);
var type = ts.hasModifier(container, 32 /* Static */) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
- return getFlowTypeOfReference(node, type, /*assumeInitialized*/ true, /*flowContainer*/ undefined);
+ return getFlowTypeOfReference(node, type);
}
if (ts.isInJavaScriptFile(node)) {
var type = getTypeForThisExpressionFromJSDoc(container);
@@ -33681,7 +36471,7 @@ var ts;
return type;
}
}
- if (compilerOptions.noImplicitThis) {
+ if (noImplicitThis) {
// With noImplicitThis, functions may not reference 'this' if it has type 'any'
error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
}
@@ -33689,28 +36479,23 @@ var ts;
}
function getTypeForThisExpressionFromJSDoc(node) {
var jsdocType = ts.getJSDocType(node);
- if (jsdocType && jsdocType.kind === 274 /* JSDocFunctionType */) {
+ if (jsdocType && jsdocType.kind === 278 /* JSDocFunctionType */) {
var jsDocFunctionType = jsdocType;
- if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 277 /* JSDocThisType */) {
+ if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281 /* JSDocThisType */) {
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
}
}
}
function isInConstructorArgumentInitializer(node, constructorDecl) {
- for (var n = node; n && n !== constructorDecl; n = n.parent) {
- if (n.kind === 144 /* Parameter */) {
- return true;
- }
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145 /* Parameter */; });
}
function checkSuperExpression(node) {
- var isCallExpression = node.parent.kind === 179 /* CallExpression */ && node.parent.expression === node;
+ var isCallExpression = node.parent.kind === 180 /* CallExpression */ && node.parent.expression === node;
var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true);
var needToCaptureLexicalThis = false;
// adjust the container reference in case if super is used inside arrow functions with arbitrarily deep nesting
if (!isCallExpression) {
- while (container && container.kind === 185 /* ArrowFunction */) {
+ while (container && container.kind === 186 /* ArrowFunction */) {
container = ts.getSuperContainer(container, /*stopOnFunctions*/ true);
needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */;
}
@@ -33723,17 +36508,14 @@ var ts;
// class B {
// [super.foo()]() {}
// }
- var current = node;
- while (current && current !== container && current.kind !== 142 /* ComputedPropertyName */) {
- current = current.parent;
- }
- if (current && current.kind === 142 /* ComputedPropertyName */) {
+ var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143 /* ComputedPropertyName */; });
+ if (current && current.kind === 143 /* ComputedPropertyName */) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
}
else if (isCallExpression) {
error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
}
- else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 176 /* ObjectLiteralExpression */)) {
+ else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */)) {
error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
}
else {
@@ -33741,6 +36523,9 @@ var ts;
}
return unknownType;
}
+ if (!isCallExpression && container.kind === 151 /* Constructor */) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
+ }
if ((ts.getModifierFlags(container) & 32 /* Static */) || isCallExpression) {
nodeCheckFlag = 512 /* SuperStatic */;
}
@@ -33804,7 +36589,7 @@ var ts;
// This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set.
// This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment
// while a property access can.
- if (container.kind === 149 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) {
+ if (container.kind === 150 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) {
if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
getNodeLinks(container).flags |= 4096 /* AsyncMethodWithSuperBinding */;
}
@@ -33818,7 +36603,7 @@ var ts;
// in this case they should also use correct lexical this
captureLexicalThis(node.parent, container);
}
- if (container.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (container.parent.kind === 177 /* ObjectLiteralExpression */) {
if (languageVersion < 2 /* ES2015 */) {
error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
return unknownType;
@@ -33838,7 +36623,7 @@ var ts;
}
return unknownType;
}
- if (container.kind === 150 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) {
+ if (container.kind === 151 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) {
// issue custom error message for super property access in constructor arguments (to be aligned with old compiler)
error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
return unknownType;
@@ -33853,7 +36638,7 @@ var ts;
if (isCallExpression) {
// TS 1.0 SPEC (April 2014): 4.8.1
// Super calls are only permitted in constructors of derived classes
- return container.kind === 150 /* Constructor */;
+ return container.kind === 151 /* Constructor */;
}
else {
// TS 1.0 SPEC (April 2014)
@@ -33861,29 +36646,47 @@ var ts;
// - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance
// - In a static member function or static member accessor
// topmost container must be something that is directly nested in the class declaration\object literal expression
- if (ts.isClassLike(container.parent) || container.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */) {
if (ts.getModifierFlags(container) & 32 /* Static */) {
- return container.kind === 149 /* MethodDeclaration */ ||
- container.kind === 148 /* MethodSignature */ ||
- container.kind === 151 /* GetAccessor */ ||
- container.kind === 152 /* SetAccessor */;
+ return container.kind === 150 /* MethodDeclaration */ ||
+ container.kind === 149 /* MethodSignature */ ||
+ container.kind === 152 /* GetAccessor */ ||
+ container.kind === 153 /* SetAccessor */;
}
else {
- return container.kind === 149 /* MethodDeclaration */ ||
- container.kind === 148 /* MethodSignature */ ||
- container.kind === 151 /* GetAccessor */ ||
- container.kind === 152 /* SetAccessor */ ||
- container.kind === 147 /* PropertyDeclaration */ ||
- container.kind === 146 /* PropertySignature */ ||
- container.kind === 150 /* Constructor */;
+ return container.kind === 150 /* MethodDeclaration */ ||
+ container.kind === 149 /* MethodSignature */ ||
+ container.kind === 152 /* GetAccessor */ ||
+ container.kind === 153 /* SetAccessor */ ||
+ container.kind === 148 /* PropertyDeclaration */ ||
+ container.kind === 147 /* PropertySignature */ ||
+ container.kind === 151 /* Constructor */;
}
}
}
return false;
}
}
+ function getContainingObjectLiteral(func) {
+ return (func.kind === 150 /* MethodDeclaration */ ||
+ func.kind === 152 /* GetAccessor */ ||
+ func.kind === 153 /* SetAccessor */) && func.parent.kind === 177 /* ObjectLiteralExpression */ ? func.parent :
+ func.kind === 185 /* FunctionExpression */ && func.parent.kind === 260 /* PropertyAssignment */ ? func.parent.parent :
+ undefined;
+ }
+ function getThisTypeArgument(type) {
+ return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? type.typeArguments[0] : undefined;
+ }
+ function getThisTypeFromContextualType(type) {
+ return mapType(type, function (t) {
+ return t.flags & 131072 /* Intersection */ ? ts.forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);
+ });
+ }
function getContextualThisParameterType(func) {
- if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 185 /* ArrowFunction */) {
+ if (func.kind === 186 /* ArrowFunction */) {
+ return undefined;
+ }
+ if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
var thisParameter = contextualSignature.thisParameter;
@@ -33892,6 +36695,40 @@ var ts;
}
}
}
+ if (noImplicitThis) {
+ var containingLiteral = getContainingObjectLiteral(func);
+ if (containingLiteral) {
+ // We have an object literal method. Check if the containing object literal has a contextual type
+ // that includes a ThisType<T>. If so, T is the contextual type for 'this'. We continue looking in
+ // any directly enclosing object literals.
+ var contextualType = getApparentTypeOfContextualType(containingLiteral);
+ var literal = containingLiteral;
+ var type = contextualType;
+ while (type) {
+ var thisType = getThisTypeFromContextualType(type);
+ if (thisType) {
+ return instantiateType(thisType, getContextualMapper(containingLiteral));
+ }
+ if (literal.parent.kind !== 260 /* PropertyAssignment */) {
+ break;
+ }
+ literal = literal.parent.parent;
+ type = getApparentTypeOfContextualType(literal);
+ }
+ // There was no contextual ThisType<T> for the containing object literal, so the contextual type
+ // for 'this' is the non-null form of the contextual type for the containing object literal or
+ // the type of the object literal itself.
+ return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral);
+ }
+ // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the
+ // contextual type for 'this' is 'obj'.
+ if (func.parent.kind === 193 /* BinaryExpression */ && func.parent.operatorToken.kind === 57 /* EqualsToken */) {
+ var target = func.parent.left;
+ if (target.kind === 178 /* PropertyAccessExpression */ || target.kind === 179 /* ElementAccessExpression */) {
+ return checkExpressionCached(target.expression);
+ }
+ }
+ }
return undefined;
}
// Return contextual type of parameter or undefined if no contextual type is available
@@ -33899,23 +36736,23 @@ var ts;
var func = parameter.parent;
if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var iife = ts.getImmediatelyInvokedFunctionExpression(func);
- if (iife) {
+ if (iife && iife.arguments) {
var indexOfParameter = ts.indexOf(func.parameters, parameter);
- if (iife.arguments && indexOfParameter < iife.arguments.length) {
- if (parameter.dotDotDotToken) {
- var restTypes = [];
- for (var i = indexOfParameter; i < iife.arguments.length; i++) {
- restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
- }
- return createArrayType(getUnionType(restTypes));
- }
- var links = getNodeLinks(iife);
- var cached = links.resolvedSignature;
- links.resolvedSignature = anySignature;
- var type = getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter]));
- links.resolvedSignature = cached;
- return type;
- }
+ if (parameter.dotDotDotToken) {
+ var restTypes = [];
+ for (var i = indexOfParameter; i < iife.arguments.length; i++) {
+ restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
+ }
+ return restTypes.length ? createArrayType(getUnionType(restTypes)) : undefined;
+ }
+ var links = getNodeLinks(iife);
+ var cached = links.resolvedSignature;
+ links.resolvedSignature = anySignature;
+ var type = indexOfParameter < iife.arguments.length ?
+ getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter])) :
+ parameter.initializer ? undefined : undefinedWideningType;
+ links.resolvedSignature = cached;
+ return type;
}
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -33949,7 +36786,7 @@ var ts;
if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.kind === 144 /* Parameter */) {
+ if (declaration.kind === 145 /* Parameter */) {
var type = getContextuallyTypedParameterType(declaration);
if (type) {
return type;
@@ -33960,11 +36797,11 @@ var ts;
}
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
- var name_19 = declaration.propertyName || declaration.name;
- if (ts.isVariableLike(parentDeclaration) &&
+ var name = declaration.propertyName || declaration.name;
+ if (parentDeclaration.kind !== 175 /* BindingElement */ &&
parentDeclaration.type &&
- !ts.isBindingPattern(name_19)) {
- var text = ts.getTextOfPropertyName(name_19);
+ !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
if (text) {
return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
}
@@ -33975,33 +36812,34 @@ var ts;
}
function getContextualTypeForReturnExpression(node) {
var func = ts.getContainingFunction(node);
- if (ts.isAsyncFunctionLike(func)) {
- var contextualReturnType = getContextualReturnType(func);
- if (contextualReturnType) {
- return getPromisedType(contextualReturnType);
+ if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1 /* Generator */) {
+ return undefined;
}
- return undefined;
- }
- if (func && !func.asteriskToken) {
- return getContextualReturnType(func);
+ var contextualReturnType = getContextualReturnType(func);
+ return functionFlags & 2 /* Async */
+ ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType) // Async function
+ : contextualReturnType; // Regular function
}
return undefined;
}
function getContextualTypeForYieldOperand(node) {
var func = ts.getContainingFunction(node);
if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
var contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return node.asteriskToken
? contextualReturnType
- : getElementTypeOfIterableIterator(contextualReturnType);
+ : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2 /* Async */) !== 0);
}
}
return undefined;
}
function isInParameterInitializerBeforeContainingFunction(node) {
while (node.parent && !ts.isFunctionLike(node.parent)) {
- if (node.parent.kind === 144 /* Parameter */ && node.parent.initializer === node) {
+ if (node.parent.kind === 145 /* Parameter */ && node.parent.initializer === node) {
return true;
}
node = node.parent;
@@ -34012,8 +36850,8 @@ var ts;
// If the containing function has a return type annotation, is a constructor, or is a get accessor whose
// corresponding set accessor has a type annotation, return statements in the function are contextually typed
if (functionDecl.type ||
- functionDecl.kind === 150 /* Constructor */ ||
- functionDecl.kind === 151 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 152 /* SetAccessor */))) {
+ functionDecl.kind === 151 /* Constructor */ ||
+ functionDecl.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153 /* SetAccessor */))) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
// Otherwise, if the containing function is contextually typed by a function type with exactly one call signature
@@ -34035,7 +36873,7 @@ var ts;
return undefined;
}
function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
- if (template.parent.kind === 181 /* TaggedTemplateExpression */) {
+ if (template.parent.kind === 182 /* TaggedTemplateExpression */) {
return getContextualTypeForArgument(template.parent, substitutionExpression);
}
return undefined;
@@ -34069,41 +36907,14 @@ var ts;
}
return undefined;
}
- // Apply a mapping function to a contextual type and return the resulting type. If the contextual type
- // is a union type, the mapping function is applied to each constituent type and a union of the resulting
- // types is returned.
- function applyToContextualType(type, mapper) {
- if (!(type.flags & 65536 /* Union */)) {
- return mapper(type);
- }
- var types = type.types;
- var mappedType;
- var mappedTypes;
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var current = types_13[_i];
- var t = mapper(current);
- if (t) {
- if (!mappedType) {
- mappedType = t;
- }
- else if (!mappedTypes) {
- mappedTypes = [mappedType, t];
- }
- else {
- mappedTypes.push(t);
- }
- }
- }
- return mappedTypes ? getUnionType(mappedTypes) : mappedType;
- }
function getTypeOfPropertyOfContextualType(type, name) {
- return applyToContextualType(type, function (t) {
+ return mapType(type, function (t) {
var prop = t.flags & 229376 /* StructuredType */ ? getPropertyOfType(t, name) : undefined;
return prop ? getTypeOfSymbol(prop) : undefined;
});
}
function getIndexTypeOfContextualType(type, kind) {
- return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
+ return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
}
// Return true if the given contextual type is a tuple-like type
function contextualTypeIsTupleLikeType(type) {
@@ -34150,7 +36961,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1 /* Number */)
- || (languageVersion >= 2 /* ES2015 */ ? getElementTypeOfIterable(type, /*errorNode*/ undefined) : undefined);
+ || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
}
return undefined;
}
@@ -34160,19 +36971,19 @@ var ts;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
}
function getContextualTypeForJsxAttribute(attribute) {
- var kind = attribute.kind;
- var jsxElement = attribute.parent;
- var attrsType = getJsxElementAttributesType(jsxElement);
- if (attribute.kind === 250 /* JsxAttribute */) {
- if (!attrsType || isTypeAny(attrsType)) {
+ // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
+ // which is a type of the parameter of the signature we are trying out.
+ // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
+ var attributesType = getContextualType(attribute.parent);
+ if (ts.isJsxAttribute(attribute)) {
+ if (!attributesType || isTypeAny(attributesType)) {
return undefined;
}
- return getTypeOfPropertyOfType(attrsType, attribute.name.text);
+ return getTypeOfPropertyOfType(attributesType, attribute.name.text);
}
- else if (attribute.kind === 251 /* JsxSpreadAttribute */) {
- return attrsType;
+ else {
+ return attributesType;
}
- ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]");
}
// Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily
// be "pushed" onto a node using the contextualType property.
@@ -34207,45 +37018,52 @@ var ts;
}
var parent = node.parent;
switch (parent.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 174 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 175 /* BindingElement */:
return getContextualTypeForInitializerExpression(node);
- case 185 /* ArrowFunction */:
- case 216 /* ReturnStatement */:
+ case 186 /* ArrowFunction */:
+ case 218 /* ReturnStatement */:
return getContextualTypeForReturnExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return getContextualTypeForYieldOperand(parent);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return getContextualTypeForArgument(parent, node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
return getTypeFromTypeNode(parent.type);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return getContextualTypeForBinaryOperand(node);
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return getContextualTypeForObjectLiteralElement(parent);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return getContextualTypeForElementExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return getContextualTypeForConditionalOperand(node);
- case 202 /* TemplateSpan */:
- ts.Debug.assert(parent.parent.kind === 194 /* TemplateExpression */);
+ case 204 /* TemplateSpan */:
+ ts.Debug.assert(parent.parent.kind === 195 /* TemplateExpression */);
return getContextualTypeForSubstitutionExpression(parent.parent, node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return getContextualType(parent);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return getContextualType(parent);
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
return getContextualTypeForJsxAttribute(parent);
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ return getAttributesTypeFromJsxOpeningLikeElement(parent);
}
return undefined;
}
+ function getContextualMapper(node) {
+ node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
+ return node ? node.contextualMapper : identityMapper;
+ }
// If the given type is an object or union type, if that type has a single signature, and if
// that signature is non-generic, return the signature. Otherwise return undefined.
function getNonGenericSignature(type, node) {
@@ -34273,7 +37091,7 @@ var ts;
return sourceLength < targetParameterCount;
}
function isFunctionExpressionOrArrowFunction(node) {
- return node.kind === 184 /* FunctionExpression */ || node.kind === 185 /* ArrowFunction */;
+ return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */;
}
function getContextualSignatureForFunctionLikeDeclaration(node) {
// Only function expressions, arrow functions, and object literal methods are contextually typed.
@@ -34292,7 +37110,7 @@ var ts;
// all identical ignoring their return type, the result is same signature but with return type as
// union type of return types from these signatures
function getContextualSignature(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
var type = getContextualTypeForFunctionLikeDeclaration(node);
if (!type) {
return undefined;
@@ -34302,8 +37120,8 @@ var ts;
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var current = types_14[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var current = types_17[_i];
var signature = getNonGenericSignature(current, node);
if (signature) {
if (!signatureList) {
@@ -34330,46 +37148,25 @@ var ts;
}
return result;
}
- /**
- * Detect if the mapper implies an inference context. Specifically, there are 4 possible values
- * for a mapper. Let's go through each one of them:
- *
- * 1. undefined - this means we are not doing inferential typing, but we may do contextual typing,
- * which could cause us to assign a parameter a type
- * 2. identityMapper - means we want to avoid assigning a parameter a type, whether or not we are in
- * inferential typing (context is undefined for the identityMapper)
- * 3. a mapper created by createInferenceMapper - we are doing inferential typing, we want to assign
- * types to parameters and fix type parameters (context is defined)
- * 4. an instantiation mapper created by createTypeMapper or createTypeEraser - this should never be
- * passed as the contextual mapper when checking an expression (context is undefined for these)
- *
- * isInferentialContext is detecting if we are in case 3
- */
- function isInferentialContext(mapper) {
- return mapper && mapper.context;
- }
- function checkSpreadExpression(node, contextualMapper) {
- // It is usually not safe to call checkExpressionCached if we can be contextually typing.
- // You can tell that we are contextually typing because of the contextualMapper parameter.
- // While it is true that a spread element can have a contextual type, it does not do anything
- // with this type. It is neither affected by it, nor does it propagate it to its operand.
- // So the fact that contextualMapper is passed is not important, because the operand of a spread
- // element is not contextually typed.
- var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false);
+ function checkSpreadExpression(node, checkMode) {
+ if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 1536 /* SpreadIncludes */);
+ }
+ var arrayOrIterableType = checkExpression(node.expression, checkMode);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
}
function hasDefaultValue(node) {
- return (node.kind === 174 /* BindingElement */ && !!node.initializer) ||
- (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */);
+ return (node.kind === 175 /* BindingElement */ && !!node.initializer) ||
+ (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */);
}
- function checkArrayLiteral(node, contextualMapper) {
+ function checkArrayLiteral(node, checkMode) {
var elements = node.elements;
var hasSpreadElement = false;
var elementTypes = [];
var inDestructuringPattern = ts.isAssignmentTarget(node);
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var e = elements_1[_i];
- if (inDestructuringPattern && e.kind === 196 /* SpreadElement */) {
+ if (inDestructuringPattern && e.kind === 197 /* SpreadElement */) {
// Given the following situation:
// var c: {};
// [...c] = ["", 0];
@@ -34382,18 +37179,18 @@ var ts;
// get the contextual element type from it. So we do something similar to
// getContextualTypeForElementExpression, which will crucially not error
// if there is no index type / iterated type.
- var restArrayType = checkExpression(e.expression, contextualMapper);
+ var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) ||
- (languageVersion >= 2 /* ES2015 */ ? getElementTypeOfIterable(restArrayType, /*errorNode*/ undefined) : undefined);
+ getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
if (restElementType) {
elementTypes.push(restElementType);
}
}
else {
- var type = checkExpressionForMutableLocation(e, contextualMapper);
+ var type = checkExpressionForMutableLocation(e, checkMode);
elementTypes.push(type);
}
- hasSpreadElement = hasSpreadElement || e.kind === 196 /* SpreadElement */;
+ hasSpreadElement = hasSpreadElement || e.kind === 197 /* SpreadElement */;
}
if (!hasSpreadElement) {
// If array literal is actually a destructuring pattern, mark it as an implied type. We do this such
@@ -34408,7 +37205,7 @@ var ts;
var pattern = contextualType.pattern;
// If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting
// tuple type with the corresponding binding or assignment element types to make the lengths equal.
- if (pattern && (pattern.kind === 173 /* ArrayBindingPattern */ || pattern.kind === 175 /* ArrayLiteralExpression */)) {
+ if (pattern && (pattern.kind === 174 /* ArrayBindingPattern */ || pattern.kind === 176 /* ArrayLiteralExpression */)) {
var patternElements = pattern.elements;
for (var i = elementTypes.length; i < patternElements.length; i++) {
var patternElement = patternElements[i];
@@ -34416,7 +37213,7 @@ var ts;
elementTypes.push(contextualType.typeArguments[i]);
}
else {
- if (patternElement.kind !== 198 /* OmittedExpression */) {
+ if (patternElement.kind !== 199 /* OmittedExpression */) {
error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
elementTypes.push(unknownType);
@@ -34433,7 +37230,7 @@ var ts;
strictNullChecks ? neverType : undefinedWideningType);
}
function isNumericName(name) {
- return name.kind === 142 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text);
+ return name.kind === 143 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
// It seems odd to consider an expression of type Any to result in a numeric name,
@@ -34495,7 +37292,7 @@ var ts;
var unionType = propTypes.length ? getUnionType(propTypes, /*subtypeReduction*/ true) : undefinedType;
return createIndexInfo(unionType, /*isReadonly*/ false);
}
- function checkObjectLiteral(node, contextualMapper) {
+ function checkObjectLiteral(node, checkMode) {
var inDestructuringPattern = ts.isAssignmentTarget(node);
// Grammar checking
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
@@ -34505,7 +37302,8 @@ var ts;
var propagatedFlags = 0;
var contextualType = getApparentTypeOfContextualType(node);
var contextualTypeHasPattern = contextualType && contextualType.pattern &&
- (contextualType.pattern.kind === 172 /* ObjectBindingPattern */ || contextualType.pattern.kind === 176 /* ObjectLiteralExpression */);
+ (contextualType.pattern.kind === 173 /* ObjectBindingPattern */ || contextualType.pattern.kind === 177 /* ObjectLiteralExpression */);
+ var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node);
var typeFlags = 0;
var patternWithComputedProperties = false;
var hasComputedStringProperty = false;
@@ -34514,29 +37312,29 @@ var ts;
for (var i = 0; i < node.properties.length; i++) {
var memberDecl = node.properties[i];
var member = memberDecl.symbol;
- if (memberDecl.kind === 257 /* PropertyAssignment */ ||
- memberDecl.kind === 258 /* ShorthandPropertyAssignment */ ||
+ if (memberDecl.kind === 260 /* PropertyAssignment */ ||
+ memberDecl.kind === 261 /* ShorthandPropertyAssignment */ ||
ts.isObjectLiteralMethod(memberDecl)) {
var type = void 0;
- if (memberDecl.kind === 257 /* PropertyAssignment */) {
- type = checkPropertyAssignment(memberDecl, contextualMapper);
+ if (memberDecl.kind === 260 /* PropertyAssignment */) {
+ type = checkPropertyAssignment(memberDecl, checkMode);
}
- else if (memberDecl.kind === 149 /* MethodDeclaration */) {
- type = checkObjectLiteralMethod(memberDecl, contextualMapper);
+ else if (memberDecl.kind === 150 /* MethodDeclaration */) {
+ type = checkObjectLiteralMethod(memberDecl, checkMode);
}
else {
- ts.Debug.assert(memberDecl.kind === 258 /* ShorthandPropertyAssignment */);
- type = checkExpressionForMutableLocation(memberDecl.name, contextualMapper);
+ ts.Debug.assert(memberDecl.kind === 261 /* ShorthandPropertyAssignment */);
+ type = checkExpressionForMutableLocation(memberDecl.name, checkMode);
}
typeFlags |= type.flags;
- var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | member.flags, member.name);
+ var prop = createSymbol(4 /* Property */ | member.flags, member.name);
if (inDestructuringPattern) {
// If object literal is an assignment pattern and if the assignment pattern specifies a default value
// for the property, make the property optional.
- var isOptional = (memberDecl.kind === 257 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
- (memberDecl.kind === 258 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
+ var isOptional = (memberDecl.kind === 260 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
+ (memberDecl.kind === 261 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
if (isOptional) {
- prop.flags |= 536870912 /* Optional */;
+ prop.flags |= 67108864 /* Optional */;
}
if (ts.hasDynamicName(memberDecl)) {
patternWithComputedProperties = true;
@@ -34547,9 +37345,9 @@ var ts;
// binding pattern specifies a default value for the property, make the property optional.
var impliedProp = getPropertyOfType(contextualType, member.name);
if (impliedProp) {
- prop.flags |= impliedProp.flags & 536870912 /* Optional */;
+ prop.flags |= impliedProp.flags & 67108864 /* Optional */;
}
- else if (!compilerOptions.suppressExcessPropertyErrors) {
+ else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0 /* String */)) {
error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
}
}
@@ -34562,9 +37360,12 @@ var ts;
prop.target = member;
member = prop;
}
- else if (memberDecl.kind === 259 /* SpreadAssignment */) {
+ else if (memberDecl.kind === 262 /* SpreadAssignment */) {
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(memberDecl, 2 /* Assign */);
+ }
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), /*isFromObjectLiteral*/ true);
+ spread = getSpreadType(spread, createObjectLiteralType());
propertiesArray = [];
propertiesTable = ts.createMap();
hasComputedStringProperty = false;
@@ -34572,11 +37373,11 @@ var ts;
typeFlags = 0;
}
var type = checkExpression(memberDecl.expression);
- if (!(type.flags & (32768 /* Object */ | 1 /* Any */))) {
+ if (!isValidSpreadType(type)) {
error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
return unknownType;
}
- spread = getSpreadType(spread, type, /*isFromObjectLiteral*/ false);
+ spread = getSpreadType(spread, type);
offset = i + 1;
continue;
}
@@ -34586,8 +37387,8 @@ var ts;
// an ordinary function declaration(section 6.1) with no parameters.
// A set accessor declaration is processed in the same manner
// as an ordinary function declaration with a single parameter and a Void return type.
- ts.Debug.assert(memberDecl.kind === 151 /* GetAccessor */ || memberDecl.kind === 152 /* SetAccessor */);
- checkAccessorDeclaration(memberDecl);
+ ts.Debug.assert(memberDecl.kind === 152 /* GetAccessor */ || memberDecl.kind === 153 /* SetAccessor */);
+ checkNodeDeferred(memberDecl);
}
if (ts.hasDynamicName(memberDecl)) {
if (isNumericName(memberDecl.name)) {
@@ -34598,7 +37399,7 @@ var ts;
}
}
else {
- propertiesTable[member.name] = member;
+ propertiesTable.set(member.name, member);
}
propertiesArray.push(member);
}
@@ -34607,27 +37408,30 @@ var ts;
if (contextualTypeHasPattern) {
for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!propertiesTable[prop.name]) {
- if (!(prop.flags & 536870912 /* Optional */)) {
+ if (!propertiesTable.get(prop.name)) {
+ if (!(prop.flags & 67108864 /* Optional */)) {
error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
- propertiesTable[prop.name] = prop;
+ propertiesTable.set(prop.name, prop);
propertiesArray.push(prop);
}
}
}
if (spread !== emptyObjectType) {
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), /*isFromObjectLiteral*/ true);
+ spread = getSpreadType(spread, createObjectLiteralType());
+ }
+ if (spread.flags & 32768 /* Object */) {
+ // only set the symbol and flags if this is a (fresh) object type
+ spread.flags |= propagatedFlags;
+ spread.symbol = node.symbol;
}
- spread.flags |= propagatedFlags;
- spread.symbol = node.symbol;
return spread;
}
return createObjectLiteralType();
function createObjectLiteralType() {
- var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0 /* String */) : undefined;
- var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1 /* Number */) : undefined;
+ var stringIndexInfo = isJSObjectLiteral ? jsObjectLiteralIndexInfo : hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0 /* String */) : undefined;
+ var numberIndexInfo = hasComputedNumberProperty && !isJSObjectLiteral ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1 /* Number */) : undefined;
var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshLiteral */;
result.flags |= 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */);
@@ -34644,9 +37448,14 @@ var ts;
return result;
}
}
+ function isValidSpreadType(type) {
+ return !!(type.flags & (1 /* Any */ | 4096 /* Null */ | 2048 /* Undefined */ | 16777216 /* NonPrimitive */) ||
+ type.flags & 32768 /* Object */ && !isGenericMappedType(type) ||
+ type.flags & 196608 /* UnionOrIntersection */ && !ts.forEach(type.types, function (t) { return !isValidSpreadType(t); }));
+ }
function checkJsxSelfClosingElement(node) {
checkJsxOpeningLikeElement(node);
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function checkJsxElement(node) {
// Check attributes
@@ -34662,18 +37471,18 @@ var ts;
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
var child = _a[_i];
switch (child.kind) {
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
checkJsxExpression(child);
break;
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
checkJsxElement(child);
break;
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
checkJsxSelfClosingElement(child);
break;
}
}
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
/**
* Returns true iff the JSX element name would be a valid JS identifier, ignoring restrictions about keywords not being identifiers
@@ -34687,81 +37496,114 @@ var ts;
*/
function isJsxIntrinsicIdentifier(tagName) {
// TODO (yuisu): comment
- if (tagName.kind === 177 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) {
+ if (tagName.kind === 178 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) {
return false;
}
else {
return ts.isIntrinsicJsxName(tagName.text);
}
}
- function checkJsxAttribute(node, elementAttributesType, nameTable) {
- var correspondingPropType = undefined;
- // Look up the corresponding property for this attribute
- if (elementAttributesType === emptyObjectType && isUnhyphenatedJsxName(node.name.text)) {
- // If there is no 'props' property, you may not have non-"data-" attributes
- error(node.parent, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
- }
- else if (elementAttributesType && !isTypeAny(elementAttributesType)) {
- var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text);
- correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol);
- if (isUnhyphenatedJsxName(node.name.text)) {
- var attributeType = getTypeOfPropertyOfType(elementAttributesType, ts.getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0 /* String */);
- if (attributeType) {
- correspondingPropType = attributeType;
+ /**
+ * Get attributes type of the JSX opening-like element. The result is from resolving "attributes" property of the opening-like element.
+ *
+ * @param openingLikeElement a JSX opening-like element
+ * @param filter a function to remove attributes that will not participate in checking whether attributes are assignable
+ * @return an anonymous type (similar to the one returned by checkObjectLiteral) in which its properties are attributes property.
+ * @remarks Because this function calls getSpreadType, it needs to use the same checks as checkObjectLiteral,
+ * which also calls getSpreadType.
+ */
+ function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, filter, checkMode) {
+ var attributes = openingLikeElement.attributes;
+ var attributesTable = ts.createMap();
+ var spread = emptyObjectType;
+ var attributesArray = [];
+ for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
+ var attributeDecl = _a[_i];
+ var member = attributeDecl.symbol;
+ if (ts.isJsxAttribute(attributeDecl)) {
+ var exprType = attributeDecl.initializer ?
+ checkExpression(attributeDecl.initializer, checkMode) :
+ trueType; // <Elem attr /> is sugar for <Elem attr={true} />
+ var attributeSymbol = createSymbol(4 /* Property */ | 134217728 /* Transient */ | member.flags, member.name);
+ attributeSymbol.declarations = member.declarations;
+ attributeSymbol.parent = member.parent;
+ if (member.valueDeclaration) {
+ attributeSymbol.valueDeclaration = member.valueDeclaration;
}
- else {
- // If there's no corresponding property with this name, error
- if (!correspondingPropType) {
- error(node.name, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.name.text, typeToString(elementAttributesType));
- return unknownType;
- }
+ attributeSymbol.type = exprType;
+ attributeSymbol.target = member;
+ attributesTable.set(attributeSymbol.name, attributeSymbol);
+ attributesArray.push(attributeSymbol);
+ }
+ else {
+ ts.Debug.assert(attributeDecl.kind === 254 /* JsxSpreadAttribute */);
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ var exprType = checkExpression(attributeDecl.expression);
+ if (!isValidSpreadType(exprType)) {
+ error(attributeDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+ return anyType;
+ }
+ if (isTypeAny(exprType)) {
+ return anyType;
}
+ spread = getSpreadType(spread, exprType);
}
}
- var exprType;
- if (node.initializer) {
- exprType = checkExpression(node.initializer);
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- else {
- // <Elem attr /> is sugar for <Elem attr={true} />
- exprType = booleanType;
+ attributesTable = ts.createMap();
+ if (attributesArray) {
+ ts.forEach(attributesArray, function (attr) {
+ if (!filter || filter(attr)) {
+ attributesTable.set(attr.name, attr);
+ }
+ });
}
- if (correspondingPropType) {
- checkTypeAssignableTo(exprType, correspondingPropType, node);
+ return createJsxAttributesType(attributes.symbol, attributesTable);
+ /**
+ * Create anonymous type from given attributes symbol table.
+ * @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable
+ * @param attributesTable a symbol table of attributes property
+ */
+ function createJsxAttributesType(symbol, attributesTable) {
+ var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined);
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshLiteral */;
+ result.flags |= 33554432 /* JsxAttributes */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag;
+ result.objectFlags |= 128 /* ObjectLiteral */;
+ return result;
}
- nameTable[node.name.text] = true;
- return exprType;
}
- function checkJsxSpreadAttribute(node, elementAttributesType, nameTable) {
- var type = checkExpression(node.expression);
- var props = getPropertiesOfType(type);
- for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
- var prop = props_2[_i];
- // Is there a corresponding property in the element attributes type? Skip checking of properties
- // that have already been assigned to, as these are not actually pushed into the resulting type
- if (!nameTable[prop.name]) {
- var targetPropSym = getPropertyOfType(elementAttributesType, prop.name);
- if (targetPropSym) {
- var msg = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property, prop.name);
- checkTypeAssignableTo(getTypeOfSymbol(prop), getTypeOfSymbol(targetPropSym), node, undefined, msg);
- }
- nameTable[prop.name] = true;
- }
- }
- return type;
+ /**
+ * Check attributes property of opening-like element. This function is called during chooseOverload to get call signature of a JSX opening-like element.
+ * (See "checkApplicableSignatureForJsxOpeningLikeElement" for how the function is used)
+ * @param node a JSXAttributes to be resolved of its type
+ */
+ function checkJsxAttributes(node, checkMode) {
+ return createJsxAttributesTypeFromAttributesProperty(node.parent, /*filter*/ undefined, checkMode);
}
function getJsxType(name) {
- if (jsxTypes[name] === undefined) {
- return jsxTypes[name] = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType;
+ var jsxType = jsxTypes.get(name);
+ if (jsxType === undefined) {
+ jsxTypes.set(name, jsxType = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType);
}
- return jsxTypes[name];
+ return jsxType;
}
/**
- * Looks up an intrinsic tag name and returns a symbol that either points to an intrinsic
- * property (in which case nodeLinks.jsxFlags will be IntrinsicNamedElement) or an intrinsic
- * string index signature (in which case nodeLinks.jsxFlags will be IntrinsicIndexedElement).
- * May also return unknownSymbol if both of these lookups fail.
- */
+ * Looks up an intrinsic tag name and returns a symbol that either points to an intrinsic
+ * property (in which case nodeLinks.jsxFlags will be IntrinsicNamedElement) or an intrinsic
+ * string index signature (in which case nodeLinks.jsxFlags will be IntrinsicIndexedElement).
+ * May also return unknownSymbol if both of these lookups fail.
+ */
function getIntrinsicTagSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
@@ -34784,7 +37626,7 @@ var ts;
return links.resolvedSymbol = unknownSymbol;
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
}
return links.resolvedSymbol = unknownSymbol;
@@ -34849,28 +37691,133 @@ var ts;
}
}
/**
- * Given React element instance type and the class type, resolve the Jsx type
- * Pass elemType to handle individual type in the union typed element type.
- */
- function getResolvedJsxType(node, elemType, elemClassType) {
- if (!elemType) {
- elemType = checkExpression(node.tagName);
+ * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
+ * Return only attributes type of successfully resolved call signature.
+ * This function assumes that the caller handled other possible element type of the JSX element (e.g. stateful component)
+ * Unlike tryGetAllJsxStatelessFunctionAttributesType, this function is a default behavior of type-checkers.
+ * @param openingLikeElement a JSX opening-like element to find attributes type
+ * @param elementType a type of the opening-like element. This elementType can't be an union type
+ * @param elemInstanceType an element instance type (the result of newing or invoking this tag)
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global
+ */
+ function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ // We don't call getResolvedSignature here because we have already resolve the type of JSX Element.
+ var callSignature = getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, /*candidatesOutArray*/ undefined);
+ if (callSignature !== unknownSignature) {
+ var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
+ var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ // Intersect in JSX.IntrinsicAttributes if it exists
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ paramType = intersectTypes(intrinsicAttributes, paramType);
+ }
+ return paramType;
+ }
+ }
+ }
}
- if (elemType.flags & 65536 /* Union */) {
- var types = elemType.types;
- return getUnionType(ts.map(types, function (type) {
- return getResolvedJsxType(node, type, elemClassType);
+ return undefined;
+ }
+ /**
+ * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
+ * Return all attributes type of resolved call signature including candidate signatures.
+ * This function assumes that the caller handled other possible element type of the JSX element.
+ * This function is a behavior used by language service when looking up completion in JSX element.
+ * @param openingLikeElement a JSX opening-like element to find attributes type
+ * @param elementType a type of the opening-like element. This elementType can't be an union type
+ * @param elemInstanceType an element instance type (the result of newing or invoking this tag)
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global
+ */
+ function tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ // Is this is a stateless function component? See if its single signature's return type is assignable to the JSX Element Type
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ // We don't call getResolvedSignature because here we have already resolve the type of JSX Element.
+ var candidatesOutArray = [];
+ getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray);
+ var result = void 0;
+ var allMatchingAttributesType = void 0;
+ for (var _i = 0, candidatesOutArray_1 = candidatesOutArray; _i < candidatesOutArray_1.length; _i++) {
+ var candidate = candidatesOutArray_1[_i];
+ var callReturnType = getReturnTypeOfSignature(candidate);
+ var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var shouldBeCandidate = true;
+ for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
+ var attribute = _b[_a];
+ if (ts.isJsxAttribute(attribute) &&
+ isUnhyphenatedJsxName(attribute.name.text) &&
+ !getPropertyOfType(paramType, attribute.name.text)) {
+ shouldBeCandidate = false;
+ break;
+ }
+ }
+ if (shouldBeCandidate) {
+ result = intersectTypes(result, paramType);
+ }
+ allMatchingAttributesType = intersectTypes(allMatchingAttributesType, paramType);
+ }
+ }
+ // If we can't find any matching, just return everything.
+ if (!result) {
+ result = allMatchingAttributesType;
+ }
+ // Intersect in JSX.IntrinsicAttributes if it exists
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ result = intersectTypes(intrinsicAttributes, result);
+ }
+ return result;
+ }
+ }
+ return undefined;
+ }
+ /**
+ * Resolve attributes type of the given opening-like element. The attributes type is a type of attributes associated with the given elementType.
+ * For instance:
+ * declare function Foo(attr: { p1: string}): JSX.Element;
+ * <Foo p1={10} />; // This function will try resolve "Foo" and return an attributes type of "Foo" which is "{ p1: string }"
+ *
+ * The function is intended to initially be called from getAttributesTypeFromJsxOpeningLikeElement which already handle JSX-intrinsic-element..
+ * This function will try to resolve custom JSX attributes type in following order: string literal, stateless function, and stateful component
+ *
+ * @param openingLikeElement a non-intrinsic JSXOPeningLikeElement
+ * @param shouldIncludeAllStatelessAttributesType a boolean indicating whether to include all attributes types from all stateless function signature
+ * @param elementType an instance type of the given opening-like element. If undefined, the function will check type openinglikeElement's tagname.
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global (imported from react.d.ts)
+ * @return attributes type if able to resolve the type of node
+ * anyType if there is no type ElementAttributesProperty or there is an error
+ * emptyObjectType if there is no "prop" in the element instance type
+ */
+ function resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, elementType, elementClassType) {
+ if (!elementType) {
+ elementType = checkExpression(openingLikeElement.tagName);
+ }
+ if (elementType.flags & 65536 /* Union */) {
+ var types = elementType.types;
+ return getUnionType(types.map(function (type) {
+ return resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, type, elementClassType);
}), /*subtypeReduction*/ true);
}
// If the elemType is a string type, we have to return anyType to prevent an error downstream as we will try to find construct or call signature of the type
- if (elemType.flags & 2 /* String */) {
+ if (elementType.flags & 2 /* String */) {
return anyType;
}
- else if (elemType.flags & 32 /* StringLiteral */) {
+ else if (elementType.flags & 32 /* StringLiteral */) {
// If the elemType is a stringLiteral type, we can then provide a check to make sure that the string literal type is one of the Jsx intrinsic element type
+ // For example:
+ // var CustomTag: "h1" = "h1";
+ // <CustomTag> Hello World </CustomTag>
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elemType.text;
+ var stringLiteralTypeName = elementType.text;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -34879,34 +37826,24 @@ var ts;
if (indexSignatureType) {
return indexSignatureType;
}
- error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
+ error(openingLikeElement, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
// If we need to report an error, we already done so here. So just return any to prevent any more error downstream
return anyType;
}
// Get the element instance type (the result of newing or invoking this tag)
- var elemInstanceType = getJsxElementInstanceType(node, elemType);
- if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
- // Is this is a stateless function component? See if its single signature's return type is
- // assignable to the JSX Element Type
- if (jsxElementType) {
- var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */);
- var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
- var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
- var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
- if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
- // Intersect in JSX.IntrinsicAttributes if it exists
- var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
- if (intrinsicAttributes !== unknownType) {
- paramType = intersectTypes(intrinsicAttributes, paramType);
- }
- return paramType;
- }
- }
+ var elemInstanceType = getJsxElementInstanceType(openingLikeElement, elementType);
+ // If we should include all stateless attributes type, then get all attributes type from all stateless function signature.
+ // Otherwise get only attributes type from the signature picked by choose-overload logic.
+ var statelessAttributesType = shouldIncludeAllStatelessAttributesType ?
+ tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) :
+ defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType);
+ if (statelessAttributesType) {
+ return statelessAttributesType;
}
// Issue an error if this return type isn't assignable to JSX.ElementClass
- if (elemClassType) {
- checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
+ if (elementClassType) {
+ checkTypeRelatedTo(elemInstanceType, elementClassType, assignableRelation, openingLikeElement, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
}
if (isTypeAny(elemInstanceType)) {
return elemInstanceType;
@@ -34930,11 +37867,6 @@ var ts;
// Props is of type 'any' or unknown
return attributesType;
}
- else if (attributesType.flags & 65536 /* Union */) {
- // Props cannot be a union type
- error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
- return anyType;
- }
else {
// Normal case -- add in IntrinsicClassElements<T> and IntrinsicElements
var apparentAttributesType = attributesType;
@@ -34959,30 +37891,68 @@ var ts;
}
}
/**
- * Given an opening/self-closing element, get the 'element attributes type', i.e. the type that tells
- * us which attributes are valid on a given element.
+ * Get attributes type of the given intrinsic opening-like Jsx element by resolving the tag name.
+ * The function is intended to be called from a function which has checked that the opening element is an intrinsic element.
+ * @param node an intrinsic JSX opening-like element
*/
- function getJsxElementAttributesType(node) {
+ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
+ ts.Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
var links = getNodeLinks(node);
- if (!links.resolvedJsxType) {
- if (isJsxIntrinsicIdentifier(node.tagName)) {
- var symbol = getIntrinsicTagSymbol(node);
- if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {
- return links.resolvedJsxType = getTypeOfSymbol(symbol);
- }
- else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
- return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0 /* String */).type;
- }
- else {
- return links.resolvedJsxType = unknownType;
- }
+ if (!links.resolvedJsxElementAttributesType) {
+ var symbol = getIntrinsicTagSymbol(node);
+ if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {
+ return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+ }
+ else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
+ return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, 0 /* String */).type;
}
else {
- var elemClassType = getJsxGlobalElementClassType();
- return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType);
+ return links.resolvedJsxElementAttributesType = unknownType;
}
}
- return links.resolvedJsxType;
+ return links.resolvedJsxElementAttributesType;
+ }
+ /**
+ * Get attributes type of the given custom opening-like JSX element.
+ * This function is intended to be called from a caller that handles intrinsic JSX element already.
+ * @param node a custom JSX opening-like element
+ * @param shouldIncludeAllStatelessAttributesType a boolean value used by language service to get all possible attributes type from an overload stateless function component
+ */
+ function getCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType) {
+ var links = getNodeLinks(node);
+ if (!links.resolvedJsxElementAttributesType) {
+ var elemClassType = getJsxGlobalElementClassType();
+ return links.resolvedJsxElementAttributesType = resolveCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType, /*elementType*/ undefined, elemClassType);
+ }
+ return links.resolvedJsxElementAttributesType;
+ }
+ /**
+ * Get all possible attributes type, especially from an overload stateless function component, of the given JSX opening-like element.
+ * This function is called by language service (see: completions-tryGetGlobalSymbols).
+ * @param node a JSX opening-like element to get attributes type for
+ */
+ function getAllAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ // Because in language service, the given JSX opening-like element may be incomplete and therefore,
+ // we can't resolve to exact signature if the element is a stateless function component so the best thing to do is return all attributes type from all overloads.
+ return getCustomJsxElementAttributesType(node, /*shouldIncludeAllStatelessAttributesType*/ true);
+ }
+ }
+ /**
+ * Get the attributes type, which indicates the attributes that are valid on the given JSXOpeningLikeElement.
+ * @param node a JSXOpeningLikeElement node
+ * @return an attributes type of the given node
+ */
+ function getAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, /*shouldIncludeAllStatelessAttributesType*/ false);
+ }
}
/**
* Given a JSX attribute, returns the symbol for the corresponds property
@@ -34990,17 +37960,34 @@ var ts;
* that have no matching element attributes type property.
*/
function getJsxAttributePropertySymbol(attrib) {
- var attributesType = getJsxElementAttributesType(attrib.parent);
+ var attributesType = getAttributesTypeFromJsxOpeningLikeElement(attrib.parent.parent);
var prop = getPropertyOfType(attributesType, attrib.name.text);
return prop || unknownSymbol;
}
function getJsxGlobalElementClassType() {
- if (!jsxElementClassType) {
- jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ if (!deferredJsxElementClassType) {
+ deferredJsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
}
- return jsxElementClassType;
+ return deferredJsxElementClassType;
}
- /// Returns all the properties of the Jsx.IntrinsicElements interface
+ function getJsxGlobalElementType() {
+ if (!deferredJsxElementType) {
+ deferredJsxElementType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.Element);
+ }
+ return deferredJsxElementType;
+ }
+ function getJsxGlobalStatelessElementType() {
+ if (!deferredJsxStatelessElementType) {
+ var jsxElementType = getJsxGlobalElementType();
+ if (jsxElementType) {
+ deferredJsxStatelessElementType = getUnionType([jsxElementType, nullType]);
+ }
+ }
+ return deferredJsxStatelessElementType;
+ }
+ /**
+ * Returns all the properties of the Jsx.IntrinsicElements interface
+ */
function getJsxIntrinsicTagNames() {
var intrinsics = getJsxType(JsxNames.IntrinsicElements);
return intrinsics ? getPropertiesOfType(intrinsics) : emptyArray;
@@ -35010,8 +37997,8 @@ var ts;
if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) {
error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
}
- if (jsxElementType === undefined) {
- if (compilerOptions.noImplicitAny) {
+ if (getJsxGlobalElementType() === undefined) {
+ if (noImplicitAny) {
error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
}
}
@@ -35033,39 +38020,46 @@ var ts;
markAliasSymbolAsReferenced(reactSym);
}
}
- var targetAttributesType = getJsxElementAttributesType(node);
- var nameTable = ts.createMap();
- // Process this array in right-to-left order so we know which
- // attributes (mostly from spreads) are being overwritten and
- // thus should have their types ignored
- var sawSpreadedAny = false;
- for (var i = node.attributes.length - 1; i >= 0; i--) {
- if (node.attributes[i].kind === 250 /* JsxAttribute */) {
- checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable);
- }
- else {
- ts.Debug.assert(node.attributes[i].kind === 251 /* JsxSpreadAttribute */);
- var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable);
- if (isTypeAny(spreadType)) {
- sawSpreadedAny = true;
- }
- }
+ checkJsxAttributesAssignableToTagNameAttributes(node);
+ }
+ /**
+ * Check whether the given attributes of JSX opening-like element is assignable to the tagName attributes.
+ * Get the attributes type of the opening-like element through resolving the tagName, "target attributes"
+ * Check assignablity between given attributes property, "source attributes", and the "target attributes"
+ * @param openingLikeElement an opening-like JSX element to check its JSXAttributes
+ */
+ function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
+ // The function involves following steps:
+ // 1. Figure out expected attributes type by resolving tagName of the JSX opening-like element, targetAttributesType.
+ // During these steps, we will try to resolve the tagName as intrinsic name, stateless function, stateful component (in the order)
+ // 2. Solved JSX attributes type given by users, sourceAttributesType, which is by resolving "attributes" property of the JSX opening-like element.
+ // 3. Check if the two are assignable to each other
+ // targetAttributesType is a type of an attributes from resolving tagName of an opening-like JSX element.
+ var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
+ getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
+ getCustomJsxElementAttributesType(openingLikeElement, /*shouldIncludeAllStatelessAttributesType*/ false);
+ // sourceAttributesType is a type of an attributes properties.
+ // i.e <div attr1={10} attr2="string" />
+ // attr1 and attr2 are treated as JSXAttributes attached in the JsxOpeningLikeElement as "attributes".
+ var sourceAttributesType = createJsxAttributesTypeFromAttributesProperty(openingLikeElement, function (attribute) {
+ return isUnhyphenatedJsxName(attribute.name) || !!(getPropertyOfType(targetAttributesType, attribute.name));
+ });
+ // If the targetAttributesType is an emptyObjectType, indicating that there is no property named 'props' on this instance type.
+ // but there exists a sourceAttributesType, we need to explicitly give an error as normal assignability check allow excess properties and will pass.
+ if (targetAttributesType === emptyObjectType && (isTypeAny(sourceAttributesType) || sourceAttributesType.properties.length > 0)) {
+ error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
- // Check that all required properties have been provided. If an 'any'
- // was spreaded in, though, assume that it provided all required properties
- if (targetAttributesType && !sawSpreadedAny) {
- var targetProperties = getPropertiesOfType(targetAttributesType);
- for (var i = 0; i < targetProperties.length; i++) {
- if (!(targetProperties[i].flags & 536870912 /* Optional */) &&
- !nameTable[targetProperties[i].name]) {
- error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType));
- }
- }
+ else {
+ checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
}
}
- function checkJsxExpression(node) {
+ function checkJsxExpression(node, checkMode) {
if (node.expression) {
- return checkExpression(node.expression);
+ var type = checkExpression(node.expression, checkMode);
+ if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
+ error(node, ts.Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
+ }
+ return type;
}
else {
return unknownType;
@@ -35074,14 +38068,32 @@ var ts;
// If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized
// '.prototype' property as well as synthesized tuple index properties.
function getDeclarationKindFromSymbol(s) {
- return s.valueDeclaration ? s.valueDeclaration.kind : 147 /* PropertyDeclaration */;
+ return s.valueDeclaration ? s.valueDeclaration.kind : 148 /* PropertyDeclaration */;
}
function getDeclarationModifierFlagsFromSymbol(s) {
- return s.valueDeclaration ? ts.getCombinedModifierFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 4 /* Public */ | 32 /* Static */ : 0;
+ if (s.valueDeclaration) {
+ var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+ return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */;
+ }
+ if (getCheckFlags(s) & 6 /* Synthetic */) {
+ var checkFlags = s.checkFlags;
+ var accessModifier = checkFlags & 256 /* ContainsPrivate */ ? 8 /* Private */ :
+ checkFlags & 64 /* ContainsPublic */ ? 4 /* Public */ :
+ 16 /* Protected */;
+ var staticModifier = checkFlags & 512 /* ContainsStatic */ ? 32 /* Static */ : 0;
+ return accessModifier | staticModifier;
+ }
+ if (s.flags & 16777216 /* Prototype */) {
+ return 4 /* Public */ | 32 /* Static */;
+ }
+ return 0;
}
function getDeclarationNodeFlagsFromSymbol(s) {
return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : 0;
}
+ function isMethodLike(symbol) {
+ return !!(symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */);
+ }
/**
* Check whether the requested property access is valid.
* Returns true if node is a valid property access, and false otherwise.
@@ -35090,12 +38102,16 @@ var ts;
* @param type The type of left.
* @param prop The symbol for the right hand side of the property access.
*/
- function checkClassPropertyAccess(node, left, type, prop) {
+ function checkPropertyAccessibility(node, left, type, prop) {
var flags = getDeclarationModifierFlagsFromSymbol(prop);
- var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop));
- var errorNode = node.kind === 177 /* PropertyAccessExpression */ || node.kind === 223 /* VariableDeclaration */ ?
+ var errorNode = node.kind === 178 /* PropertyAccessExpression */ || node.kind === 225 /* VariableDeclaration */ ?
node.name :
node.right;
+ if (getCheckFlags(prop) & 256 /* ContainsPrivate */) {
+ // Synthetic property with private constituent property
+ error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
+ return false;
+ }
if (left.kind === 96 /* SuperKeyword */) {
// TS 1.0 spec (April 2014): 4.8.2
// - In a constructor, instance member function, instance member accessor, or
@@ -35104,18 +38120,22 @@ var ts;
// - In a static member function or static member accessor
// where this references the constructor function object of a derived class,
// a super property access is permitted and must specify a public static member function of the base class.
- if (languageVersion < 2 /* ES2015 */ && getDeclarationKindFromSymbol(prop) !== 149 /* MethodDeclaration */) {
- // `prop` refers to a *property* declared in the super class
- // rather than a *method*, so it does not satisfy the above criteria.
- error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
- return false;
+ if (languageVersion < 2 /* ES2015 */) {
+ var hasNonMethodDeclaration = forEachProperty(prop, function (p) {
+ var propKind = getDeclarationKindFromSymbol(p);
+ return propKind !== 150 /* MethodDeclaration */ && propKind !== 149 /* MethodSignature */;
+ });
+ if (hasNonMethodDeclaration) {
+ error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+ return false;
+ }
}
if (flags & 128 /* Abstract */) {
// A method cannot be accessed in a super property access if the method is abstract.
// This error could mask a private property access error. But, a member
// cannot simultaneously be private and abstract, so this will trigger an
// additional error elsewhere.
- error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
}
@@ -35128,7 +38148,7 @@ var ts;
if (flags & 8 /* Private */) {
var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
- error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
return true;
@@ -35138,14 +38158,15 @@ var ts;
if (left.kind === 96 /* SuperKeyword */) {
return true;
}
- // Get the enclosing class that has the declaring class as its base type
+ // Find the first enclosing class that has the declaring classes of the protected constituents
+ // of the property as base classes
var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
- return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined;
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
});
// A protected property is accessible if the property is within the declaring class or classes derived from it
if (!enclosingClass) {
- error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
return false;
}
// No further restrictions for static properties
@@ -35157,7 +38178,6 @@ var ts;
// get the original type -- represented as the type constraint of the 'this' type
type = getConstraintOfTypeParameter(type);
}
- // TODO: why is the first part of this check here?
if (!(getObjectFlags(getTargetType(type)) & 3 /* ClassOrInterface */ && hasBaseType(type, enclosingClass))) {
error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass));
return false;
@@ -35165,16 +38185,17 @@ var ts;
return true;
}
function checkNonNullExpression(node) {
- var type = checkExpression(node);
- if (strictNullChecks) {
- var kind = getFalsyFlags(type) & 6144 /* Nullable */;
- if (kind) {
- error(node, kind & 2048 /* Undefined */ ? kind & 4096 /* Null */ ?
- ts.Diagnostics.Object_is_possibly_null_or_undefined :
- ts.Diagnostics.Object_is_possibly_undefined :
- ts.Diagnostics.Object_is_possibly_null);
- }
- return getNonNullableType(type);
+ return checkNonNullType(checkExpression(node), node);
+ }
+ function checkNonNullType(type, errorNode) {
+ var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 6144 /* Nullable */;
+ if (kind) {
+ error(errorNode, kind & 2048 /* Undefined */ ? kind & 4096 /* Null */ ?
+ ts.Diagnostics.Object_is_possibly_null_or_undefined :
+ ts.Diagnostics.Object_is_possibly_undefined :
+ ts.Diagnostics.Object_is_possibly_null);
+ var t = getNonNullableType(type);
+ return t.flags & (6144 /* Nullable */ | 8192 /* Never */) ? unknownType : t;
}
return type;
}
@@ -35203,7 +38224,7 @@ var ts;
noUnusedIdentifiers &&
(prop.flags & 106500 /* ClassMember */) &&
prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
- if (prop.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(prop) & 1 /* Instantiated */) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
@@ -35211,6 +38232,15 @@ var ts;
}
}
}
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 148 /* PropertyDeclaration */ && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
var type = checkNonNullExpression(left);
if (isTypeAny(type) || type === silentNeverType) {
@@ -35223,16 +38253,30 @@ var ts;
}
var prop = getPropertyOfType(apparentType, right.text);
if (!prop) {
+ var stringIndexType = getIndexTypeOfType(apparentType, 0 /* String */);
+ if (stringIndexType) {
+ return stringIndexType;
+ }
if (right.text && !checkAndReportErrorForExtendingInterface(node)) {
reportNonexistentProperty(right, type.flags & 16384 /* TypeParameter */ && type.isThisType ? apparentType : type);
}
return unknownType;
}
+ if (prop.valueDeclaration) {
+ if (isInPropertyInitializer(node) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text);
+ }
+ if (prop.valueDeclaration.kind === 228 /* ClassDeclaration */ &&
+ node.parent && node.parent.kind !== 158 /* TypeReference */ &&
+ !ts.isInAmbientContext(prop.valueDeclaration) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text);
+ }
+ }
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
- if (prop.parent && prop.parent.flags & 32 /* Class */) {
- checkClassPropertyAccess(node, left, apparentType, prop);
- }
+ checkPropertyAccessibility(node, left, apparentType, prop);
var propType = getTypeOfSymbol(prop);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -35244,23 +38288,23 @@ var ts;
// Only compute control flow type if this is a property access expression that isn't an
// assignment target, and the referenced property was declared as a variable, property,
// accessor, or optional method.
- if (node.kind !== 177 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ ||
+ if (node.kind !== 178 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ ||
!(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) &&
!(prop.flags & 8192 /* Method */ && propType.flags & 65536 /* Union */)) {
return propType;
}
- var flowType = getFlowTypeOfReference(node, propType, /*assumeInitialized*/ true, /*flowContainer*/ undefined);
+ var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isValidPropertyAccess(node, propertyName) {
- var left = node.kind === 177 /* PropertyAccessExpression */
+ var left = node.kind === 178 /* PropertyAccessExpression */
? node.expression
: node.left;
var type = checkExpression(left);
if (type !== unknownType && !isTypeAny(type)) {
var prop = getPropertyOfType(getWidenedType(type), propertyName);
- if (prop && prop.parent && prop.parent.flags & 32 /* Class */) {
- return checkClassPropertyAccess(node, left, type, prop);
+ if (prop) {
+ return checkPropertyAccessibility(node, left, type, prop);
}
}
return true;
@@ -35270,7 +38314,7 @@ var ts;
*/
function getForInVariableSymbol(node) {
var initializer = node.initializer;
- if (initializer.kind === 224 /* VariableDeclarationList */) {
+ if (initializer.kind === 226 /* VariableDeclarationList */) {
var variable = initializer.declarations[0];
if (variable && !ts.isBindingPattern(variable.name)) {
return getSymbolOfNode(variable);
@@ -35299,7 +38343,7 @@ var ts;
var child = expr;
var node = expr.parent;
while (node) {
- if (node.kind === 212 /* ForInStatement */ &&
+ if (node.kind === 214 /* ForInStatement */ &&
child === node.statement &&
getForInVariableSymbol(node) === symbol &&
hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -35317,7 +38361,7 @@ var ts;
var indexExpression = node.argumentExpression;
if (!indexExpression) {
var sourceFile = ts.getSourceFileOfNode(node);
- if (node.parent.kind === 180 /* NewExpression */ && node.parent.expression === node) {
+ if (node.parent.kind === 181 /* NewExpression */ && node.parent.expression === node) {
var start = ts.skipTrivia(sourceFile.text, node.expression.end);
var end = node.end;
grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
@@ -35337,7 +38381,7 @@ var ts;
error(indexExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
return unknownType;
}
- return getIndexedAccessType(objectType, indexType, node);
+ return checkIndexedAccessIndexType(getIndexedAccessType(objectType, indexType, node), node);
}
function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
if (expressionType === unknownType) {
@@ -35361,7 +38405,7 @@ var ts;
if (!leftHandSideSymbol) {
return false;
}
- var globalESSymbol = getGlobalESSymbolConstructorSymbol();
+ var globalESSymbol = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ true);
if (!globalESSymbol) {
// Already errored when we tried to look up the symbol
return false;
@@ -35375,10 +38419,10 @@ var ts;
return true;
}
function resolveUntypedCall(node) {
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
checkExpression(node.template);
}
- else if (node.kind !== 145 /* Decorator */) {
+ else if (node.kind !== 146 /* Decorator */) {
ts.forEach(node.arguments, function (argument) {
checkExpression(argument);
});
@@ -35405,16 +38449,16 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
- var signature = signatures_2[_i];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
- var parent_8 = signature.declaration && signature.declaration.parent;
+ var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
- if (lastParent && parent_8 === lastParent) {
+ if (lastParent && parent === lastParent) {
index++;
}
else {
- lastParent = parent_8;
+ lastParent = parent;
index = cutoffIndex;
}
}
@@ -35422,7 +38466,7 @@ var ts;
// current declaration belongs to a different symbol
// set cutoffIndex so re-orderings in the future won't change result set from 0 to cutoffIndex
index = cutoffIndex = result.length;
- lastParent = parent_8;
+ lastParent = parent;
}
lastSymbol = symbol;
// specialized signatures always need to be placed before non-specialized signatures regardless
@@ -35444,7 +38488,7 @@ var ts;
function getSpreadArgumentIndex(args) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
- if (arg && arg.kind === 196 /* SpreadElement */) {
+ if (arg && arg.kind === 197 /* SpreadElement */) {
return i;
}
}
@@ -35457,13 +38501,17 @@ var ts;
var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments
var isDecorator;
var spreadArgIndex = -1;
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ // The arity check will be done in "checkApplicableSignatureForJsxOpeningLikeElement".
+ return true;
+ }
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
var tagExpression = node;
// Even if the call is incomplete, we'll have a missing expression as our last argument,
// so we can say the count is just the arg list length
argCount = args.length;
typeArguments = undefined;
- if (tagExpression.template.kind === 194 /* TemplateExpression */) {
+ if (tagExpression.template.kind === 195 /* TemplateExpression */) {
// If a tagged template expression lacks a tail literal, the call is incomplete.
// Specifically, a template only can end in a TemplateTail or a Missing literal.
var templateExpression = tagExpression.template;
@@ -35480,7 +38528,7 @@ var ts;
callIsIncomplete = !!templateLiteral.isUnterminated;
}
}
- else if (node.kind === 145 /* Decorator */) {
+ else if (node.kind === 146 /* Decorator */) {
isDecorator = true;
typeArguments = undefined;
argCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature);
@@ -35489,19 +38537,21 @@ var ts;
var callExpression = node;
if (!callExpression.arguments) {
// This only happens when we have something of the form: 'new C'
- ts.Debug.assert(callExpression.kind === 180 /* NewExpression */);
+ ts.Debug.assert(callExpression.kind === 181 /* NewExpression */);
return signature.minArgumentCount === 0;
}
argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;
- // If we are missing the close paren, the call is incomplete.
+ // If we are missing the close parenthesis, the call is incomplete.
callIsIncomplete = callExpression.arguments.end === callExpression.end;
typeArguments = callExpression.typeArguments;
spreadArgIndex = getSpreadArgumentIndex(args);
}
// If the user supplied type arguments, but the number of type arguments does not match
// the declared number of type parameters, the call has an incorrect arity.
+ var numTypeParameters = ts.length(signature.typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);
var hasRightNumberOfTypeArgs = !typeArguments ||
- (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
+ (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters);
if (!hasRightNumberOfTypeArgs) {
return false;
}
@@ -35531,10 +38581,10 @@ var ts;
}
// Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec)
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, /*inferUnionTypes*/ true);
+ var context = createInferenceContext(signature, /*inferUnionTypes*/ true, /*useAnyForNoInferences*/ false);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
// Type parameters from outer context referenced by source type are fixed by instantiation of the source type
- inferTypes(context, instantiateType(source, contextualMapper), target);
+ inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
});
return getSignatureInstantiation(signature, getInferredTypes(context));
}
@@ -35565,7 +38615,7 @@ var ts;
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypes(context, thisArgumentType, thisType);
+ inferTypesWithContext(context, thisArgumentType, thisType);
}
// We perform two passes over the arguments. In the first pass we infer from all arguments, but use
// wildcards for all context sensitive function expressions.
@@ -35573,7 +38623,7 @@ var ts;
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
// If the effective argument is 'undefined', then it is an argument that is present but is synthetic.
- if (arg === undefined || arg.kind !== 198 /* OmittedExpression */) {
+ if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
// If the effective argument type is 'undefined', there is no synthetic type
@@ -35584,7 +38634,7 @@ var ts;
var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypes(context, argType, paramType);
+ inferTypesWithContext(context, argType, paramType);
}
}
// In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this
@@ -35598,7 +38648,7 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
}
}
}
@@ -35608,7 +38658,7 @@ var ts;
var typeParameters = signature.typeParameters;
var typeArgumentsAreAssignable = true;
var mapper;
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < typeArgumentNodes.length; i++) {
if (typeArgumentsAreAssignable /* so far */) {
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
@@ -35628,9 +38678,44 @@ var ts;
}
return typeArgumentsAreAssignable;
}
+ /**
+ * Check if the given signature can possibly be a signature called by the JSX opening-like element.
+ * @param node a JSX opening-like element we are trying to figure its call signature
+ * @param signature a candidate signature we are trying whether it is a call signature
+ * @param relation a relationship to check parameter and argument type
+ * @param excludeArgument
+ */
+ function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation) {
+ // JSX opening-like element has correct arity for stateless-function component if the one of the following condition is true:
+ // 1. callIsIncomplete
+ // 2. attributes property has same number of properties as the parameter object type.
+ // We can figure that out by resolving attributes property and check number of properties in the resolved type
+ // If the call has correct arity, we will then check if the argument type and parameter type is assignable
+ var callIsIncomplete = node.attributes.end === node.end; // If we are missing the close "/>", the call is incomplete
+ if (callIsIncomplete) {
+ return true;
+ }
+ var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;
+ // Stateless function components can have maximum of three arguments: "props", "context", and "updater".
+ // However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props,
+ // can be specified by users through attributes property.
+ var paramType = getTypeAtPosition(signature, 0);
+ var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*contextualMapper*/ undefined);
+ var argProperties = getPropertiesOfType(attributesType);
+ for (var _i = 0, argProperties_1 = argProperties; _i < argProperties_1.length; _i++) {
+ var arg = argProperties_1[_i];
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
+ return false;
+ }
+ }
+ return checkTypeRelatedTo(attributesType, paramType, relation, /*errorNode*/ undefined, headMessage);
+ }
function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation);
+ }
var thisType = getThisTypeOfSignature(signature);
- if (thisType && thisType !== voidType && node.kind !== 180 /* NewExpression */) {
+ if (thisType && thisType !== voidType && node.kind !== 181 /* NewExpression */) {
// If the called expression is not of the form `x.f` or `x["f"]`, then sourceType = voidType
// If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible.
// If the expression is a new expression, then the check is skipped.
@@ -35647,7 +38732,7 @@ var ts;
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
// If the effective argument is 'undefined', then it is an argument that is present but is synthetic.
- if (arg === undefined || arg.kind !== 198 /* OmittedExpression */) {
+ if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) {
// Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter)
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
@@ -35669,12 +38754,12 @@ var ts;
* Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise.
*/
function getThisArgumentOfCall(node) {
- if (node.kind === 179 /* CallExpression */) {
+ if (node.kind === 180 /* CallExpression */) {
var callee = node.expression;
- if (callee.kind === 177 /* PropertyAccessExpression */) {
+ if (callee.kind === 178 /* PropertyAccessExpression */) {
return callee.expression;
}
- else if (callee.kind === 178 /* ElementAccessExpression */) {
+ else if (callee.kind === 179 /* ElementAccessExpression */) {
return callee.expression;
}
}
@@ -35690,53 +38775,56 @@ var ts;
*/
function getEffectiveCallArguments(node) {
var args;
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
var template = node.template;
args = [undefined];
- if (template.kind === 194 /* TemplateExpression */) {
+ if (template.kind === 195 /* TemplateExpression */) {
ts.forEach(template.templateSpans, function (span) {
args.push(span.expression);
});
}
}
- else if (node.kind === 145 /* Decorator */) {
+ else if (node.kind === 146 /* Decorator */) {
// For a decorator, we return undefined as we will determine
// the number and types of arguments for a decorator using
// `getEffectiveArgumentCount` and `getEffectiveArgumentType` below.
return undefined;
}
+ else if (ts.isJsxOpeningLikeElement(node)) {
+ args = node.attributes.properties.length > 0 ? [node.attributes] : emptyArray;
+ }
else {
args = node.arguments || emptyArray;
}
return args;
}
/**
- * Returns the effective argument count for a node that works like a function invocation.
- * If 'node' is a Decorator, the number of arguments is derived from the decoration
- * target and the signature:
- * If 'node.target' is a class declaration or class expression, the effective argument
- * count is 1.
- * If 'node.target' is a parameter declaration, the effective argument count is 3.
- * If 'node.target' is a property declaration, the effective argument count is 2.
- * If 'node.target' is a method or accessor declaration, the effective argument count
- * is 3, although it can be 2 if the signature only accepts two arguments, allowing
- * us to match a property decorator.
- * Otherwise, the argument count is the length of the 'args' array.
- */
+ * Returns the effective argument count for a node that works like a function invocation.
+ * If 'node' is a Decorator, the number of arguments is derived from the decoration
+ * target and the signature:
+ * If 'node.target' is a class declaration or class expression, the effective argument
+ * count is 1.
+ * If 'node.target' is a parameter declaration, the effective argument count is 3.
+ * If 'node.target' is a property declaration, the effective argument count is 2.
+ * If 'node.target' is a method or accessor declaration, the effective argument count
+ * is 3, although it can be 2 if the signature only accepts two arguments, allowing
+ * us to match a property decorator.
+ * Otherwise, the argument count is the length of the 'args' array.
+ */
function getEffectiveArgumentCount(node, args, signature) {
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
// A class decorator will have one argument (see `ClassDecorator` in core.d.ts)
return 1;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// A property declaration decorator will have two arguments (see
// `PropertyDecorator` in core.d.ts)
return 2;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
// A method or accessor declaration decorator will have two or three arguments (see
// `PropertyDecorator` and `MethodDecorator` in core.d.ts)
// If we are emitting decorators for ES3, we will only pass two arguments.
@@ -35746,7 +38834,7 @@ var ts;
// If the method decorator signature only accepts a target and a key, we will only
// type check those arguments.
return signature.parameters.length >= 3 ? 3 : 2;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// A parameter declaration decorator will have three arguments (see
// `ParameterDecorator` in core.d.ts)
return 3;
@@ -35757,38 +38845,38 @@ var ts;
}
}
/**
- * Returns the effective type of the first argument to a decorator.
- * If 'node' is a class declaration or class expression, the effective argument type
- * is the type of the static side of the class.
- * If 'node' is a parameter declaration, the effective argument type is either the type
- * of the static or instance side of the class for the parameter's parent method,
- * depending on whether the method is declared static.
- * For a constructor, the type is always the type of the static side of the class.
- * If 'node' is a property, method, or accessor declaration, the effective argument
- * type is the type of the static or instance side of the parent class for class
- * element, depending on whether the element is declared static.
- */
+ * Returns the effective type of the first argument to a decorator.
+ * If 'node' is a class declaration or class expression, the effective argument type
+ * is the type of the static side of the class.
+ * If 'node' is a parameter declaration, the effective argument type is either the type
+ * of the static or instance side of the class for the parameter's parent method,
+ * depending on whether the method is declared static.
+ * For a constructor, the type is always the type of the static side of the class.
+ * If 'node' is a property, method, or accessor declaration, the effective argument
+ * type is the type of the static or instance side of the parent class for class
+ * element, depending on whether the element is declared static.
+ */
function getEffectiveDecoratorFirstArgumentType(node) {
// The first argument to a decorator is its `target`.
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
// For a class decorator, the `target` is the type of the class (e.g. the
// "static" or "constructor" side of the class)
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
// For a parameter decorator, the `target` is the parent type of the
// parameter's containing method.
node = node.parent;
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// For a property or method decorator, the `target` is the
// "static"-side type of the parent of the member if the member is
// declared "static"; otherwise, it is the "instance"-side type of the
@@ -35799,37 +38887,39 @@ var ts;
return unknownType;
}
/**
- * Returns the effective type for the second argument to a decorator.
- * If 'node' is a parameter, its effective argument type is one of the following:
- * If 'node.parent' is a constructor, the effective argument type is 'any', as we
- * will emit `undefined`.
- * If 'node.parent' is a member with an identifier, numeric, or string literal name,
- * the effective argument type will be a string literal type for the member name.
- * If 'node.parent' is a computed property name, the effective argument type will
- * either be a symbol type or the string type.
- * If 'node' is a member with an identifier, numeric, or string literal name, the
- * effective argument type will be a string literal type for the member name.
- * If 'node' is a computed property name, the effective argument type will either
- * be a symbol type or the string type.
- * A class decorator does not have a second argument type.
- */
+ * Returns the effective type for the second argument to a decorator.
+ * If 'node' is a parameter, its effective argument type is one of the following:
+ * If 'node.parent' is a constructor, the effective argument type is 'any', as we
+ * will emit `undefined`.
+ * If 'node.parent' is a member with an identifier, numeric, or string literal name,
+ * the effective argument type will be a string literal type for the member name.
+ * If 'node.parent' is a computed property name, the effective argument type will
+ * either be a symbol type or the string type.
+ * If 'node' is a member with an identifier, numeric, or string literal name, the
+ * effective argument type will be a string literal type for the member name.
+ * If 'node' is a computed property name, the effective argument type will either
+ * be a symbol type or the string type.
+ * A class decorator does not have a second argument type.
+ */
function getEffectiveDecoratorSecondArgumentType(node) {
// The second argument to a decorator is its `propertyKey`
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
ts.Debug.fail("Class decorators should not have a second synthetic argument.");
return unknownType;
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
node = node.parent;
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
// For a constructor parameter decorator, the `propertyKey` will be `undefined`.
return anyType;
}
+ // For a non-constructor parameter decorator, the `propertyKey` will be either
+ // a string or a symbol, based on the name of the parameter's containing method.
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// The `propertyKey` for a property or method decorator will be a
// string literal type if the member name is an identifier, number, or string;
// otherwise, if the member name is a computed property name it will
@@ -35840,7 +38930,7 @@ var ts;
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
return getLiteralTypeForText(32 /* StringLiteral */, element.name.text);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512 /* ESSymbol */)) {
return nameType;
@@ -35857,30 +38947,30 @@ var ts;
return unknownType;
}
/**
- * Returns the effective argument type for the third argument to a decorator.
- * If 'node' is a parameter, the effective argument type is the number type.
- * If 'node' is a method or accessor, the effective argument type is a
- * `TypedPropertyDescriptor<T>` instantiated with the type of the member.
- * Class and property decorators do not have a third effective argument.
- */
+ * Returns the effective argument type for the third argument to a decorator.
+ * If 'node' is a parameter, the effective argument type is the number type.
+ * If 'node' is a method or accessor, the effective argument type is a
+ * `TypedPropertyDescriptor<T>` instantiated with the type of the member.
+ * Class and property decorators do not have a third effective argument.
+ */
function getEffectiveDecoratorThirdArgumentType(node) {
// The third argument to a decorator is either its `descriptor` for a method decorator
// or its `parameterIndex` for a parameter decorator
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
ts.Debug.fail("Class decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
// The `parameterIndex` for a parameter decorator is always a number
return numberType;
}
- if (node.kind === 147 /* PropertyDeclaration */) {
+ if (node.kind === 148 /* PropertyDeclaration */) {
ts.Debug.fail("Property decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// The `descriptor` for a method decorator will be a `TypedPropertyDescriptor<T>`
// for the type of the member.
var propertyType = getTypeOfNode(node);
@@ -35890,8 +38980,8 @@ var ts;
return unknownType;
}
/**
- * Returns the effective argument type for the provided argument to a decorator.
- */
+ * Returns the effective argument type for the provided argument to a decorator.
+ */
function getEffectiveDecoratorArgumentType(node, argIndex) {
if (argIndex === 0) {
return getEffectiveDecoratorFirstArgumentType(node.parent);
@@ -35906,16 +38996,16 @@ var ts;
return unknownType;
}
/**
- * Gets the effective argument type for an argument in a call expression.
- */
+ * Gets the effective argument type for an argument in a call expression.
+ */
function getEffectiveArgumentType(node, argIndex) {
// Decorators provide special arguments, a tagged template expression provides
// a special first argument, and string literals get string literal types
// unless we're reporting errors
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
return getEffectiveDecoratorArgumentType(node, argIndex);
}
- else if (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */) {
+ else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) {
return getGlobalTemplateStringsArrayType();
}
// This is not a synthetic argument, so we return 'undefined'
@@ -35923,25 +39013,25 @@ var ts;
return undefined;
}
/**
- * Gets the effective argument expression for an argument in a call expression.
- */
+ * Gets the effective argument expression for an argument in a call expression.
+ */
function getEffectiveArgument(node, args, argIndex) {
// For a decorator or the first argument of a tagged template expression we return undefined.
- if (node.kind === 145 /* Decorator */ ||
- (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */)) {
+ if (node.kind === 146 /* Decorator */ ||
+ (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */)) {
return undefined;
}
return args[argIndex];
}
/**
- * Gets the error node to use when reporting errors for an effective argument.
- */
+ * Gets the error node to use when reporting errors for an effective argument.
+ */
function getEffectiveArgumentErrorNode(node, argIndex, arg) {
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
// For a decorator, we use the expression of the decorator for error reporting.
return node.expression;
}
- else if (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */) {
+ else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) {
// For a the first argument of a tagged template expression, we use the template of the tag for error reporting.
return node.template;
}
@@ -35950,16 +39040,31 @@ var ts;
}
}
function resolveCall(node, signatures, candidatesOutArray, headMessage) {
- var isTaggedTemplate = node.kind === 181 /* TaggedTemplateExpression */;
- var isDecorator = node.kind === 145 /* Decorator */;
+ var isTaggedTemplate = node.kind === 182 /* TaggedTemplateExpression */;
+ var isDecorator = node.kind === 146 /* Decorator */;
+ var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
var typeArguments;
- if (!isTaggedTemplate && !isDecorator) {
+ if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) {
typeArguments = node.typeArguments;
// We already perform checking on the type arguments on the class declaration itself.
if (node.expression.kind !== 96 /* SuperKeyword */) {
ts.forEach(typeArguments, checkSourceElement);
}
}
+ if (signatures.length === 1) {
+ var declaration = signatures[0].declaration;
+ if (declaration && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration)) {
+ if (containsArgumentsReference(declaration)) {
+ var signatureWithRest = cloneSignature(signatures[0]);
+ var syntheticArgsSymbol = createSymbol(3 /* Variable */, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ signatureWithRest.parameters = ts.concatenate(signatureWithRest.parameters, [syntheticArgsSymbol]);
+ signatureWithRest.hasRestParameter = true;
+ signatures = [signatureWithRest];
+ }
+ }
+ }
var candidates = candidatesOutArray || [];
// reorderCandidates fills up the candidates array directly
reorderCandidates(signatures, candidates);
@@ -36022,7 +39127,7 @@ var ts;
var result;
// If we are in signature help, a trailing comma indicates that we intend to provide another argument,
// so we will only accept overloads with arity at least 1 higher than the current number of provided arguments.
- var signatureHelpTrailingComma = candidatesOutArray && node.kind === 179 /* CallExpression */ && node.arguments.hasTrailingComma;
+ var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 /* CallExpression */ && node.arguments.hasTrailingComma;
// Section 4.12.1:
// if the candidate list contains one or more signatures for which the type of each argument
// expression is a subtype of each corresponding parameter type, the return type of the first
@@ -36051,6 +39156,10 @@ var ts;
// If candidate is undefined, it means that no candidates had a suitable arity. In that case,
// skip the checkApplicableSignature check.
if (candidateForArgumentError) {
+ if (isJsxOpeningOrSelfClosingElement) {
+ // We do not report any error here because any error will be handled in "resolveCustomJsxElementAttributesType".
+ return candidateForArgumentError;
+ }
// excludeArgument is undefined, in this case also equivalent to [undefined, undefined, ...]
// The importance of excludeArgument is to prevent us from typing function expression parameters
// in arguments too early. If possible, we'd like to only type them once we know the correct
@@ -36072,7 +39181,7 @@ var ts;
if (headMessage) {
diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
}
- reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
+ reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
}
}
else {
@@ -36113,20 +39222,20 @@ var ts;
var candidate = void 0;
var typeArgumentsAreValid = void 0;
var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false)
+ ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false, /*useAnyForNoInferences*/ ts.isInJavaScriptFile(node))
: undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
- typeArgumentTypes = ts.map(typeArguments, getTypeFromTypeNode);
+ typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false);
}
else {
inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
typeArgumentTypes = inferenceContext.inferredTypes;
+ typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
}
if (!typeArgumentsAreValid) {
break;
@@ -36136,7 +39245,7 @@ var ts;
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) {
break;
}
- var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
+ var index = excludeArgument ? ts.indexOf(excludeArgument, /*value*/ true) : -1;
if (index < 0) {
return candidate;
}
@@ -36175,7 +39284,7 @@ var ts;
// with the type arguments specified in the extends clause.
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node));
if (baseTypeNode) {
- var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
+ var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
return resolveCall(node, baseConstructors, candidatesOutArray);
}
}
@@ -36329,12 +39438,13 @@ var ts;
if (containingClass) {
var containingType = getTypeOfNode(containingClass);
var baseTypes = getBaseTypes(containingType);
- if (baseTypes.length) {
+ while (baseTypes.length) {
var baseType = baseTypes[0];
if (modifiers & 16 /* Protected */ &&
baseType.symbol === declaration.parent.symbol) {
return true;
}
+ baseTypes = getBaseTypes(baseType);
}
}
if (modifiers & 8 /* Private */) {
@@ -36366,26 +39476,26 @@ var ts;
return resolveCall(node, callSignatures, candidatesOutArray);
}
/**
- * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression.
- */
+ * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression.
+ */
function getDiagnosticHeadMessageForDecoratorResolution(node) {
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
}
}
/**
- * Resolves a decorator as if it were a call expression.
- */
+ * Resolves a decorator as if it were a call expression.
+ */
function resolveDecorator(node, candidatesOutArray) {
var funcType = checkExpression(node.expression);
var apparentType = getApparentType(funcType);
@@ -36407,21 +39517,73 @@ var ts;
}
return resolveCall(node, callSignatures, candidatesOutArray, headMessage);
}
+ /**
+ * This function is similar to getResolvedSignature but is exclusively for trying to resolve JSX stateless-function component.
+ * The main reason we have to use this function instead of getResolvedSignature because, the caller of this function will already check the type of openingLikeElement's tagName
+ * and pass the type as elementType. The elementType can not be a union (as such case should be handled by the caller of this function)
+ * Note: at this point, we are still not sure whether the opening-like element is a stateless function component or not.
+ * @param openingLikeElement an opening-like JSX element to try to resolve as JSX stateless function
+ * @param elementType an element type of the opneing-like element by checking opening-like element's tagname.
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ */
+ function getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ var callSignature = resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
+ return callSignature;
+ }
+ /**
+ * Try treating a given opening-like element as stateless function component and resolve a tagName to a function signature.
+ * @param openingLikeElement an JSX opening-like element we want to try resolve its stateless function if possible
+ * @param elementType a type of the opening-like JSX element, a result of resolving tagName in opening-like element.
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ * @return a resolved signature if we can find function matching function signature through resolve call or a first signature in the list of functions.
+ * otherwise return undefined if tag-name of the opening-like element doesn't have call signatures
+ */
+ function resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray) {
+ // If this function is called from language service, elementType can be a union type. This is not possible if the function is called from compiler (see: resolveCustomJsxElementAttributesType)
+ if (elementType.flags & 65536 /* Union */) {
+ var types = elementType.types;
+ var result = void 0;
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var type = types_18[_i];
+ result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
+ }
+ return result;
+ }
+ var callSignatures = elementType && getSignaturesOfType(elementType, 0 /* Call */);
+ if (callSignatures && callSignatures.length > 0) {
+ var callSignature = void 0;
+ callSignature = resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
+ return callSignature;
+ }
+ return undefined;
+ }
function resolveSignature(node, candidatesOutArray) {
switch (node.kind) {
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return resolveCallExpression(node, candidatesOutArray);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return resolveNewExpression(node, candidatesOutArray);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return resolveTaggedTemplateExpression(node, candidatesOutArray);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return resolveDecorator(node, candidatesOutArray);
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ // This code-path is called by language service
+ return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray);
}
ts.Debug.fail("Branch in 'resolveSignature' should be unreachable.");
}
- // candidatesOutArray is passed by signature help in the language service, and collectCandidates
- // must fill it up with the appropriate candidate signatures
+ /**
+ * Resolve a signature of a given call-like expression.
+ * @param node a call-like expression to try resolve a signature for
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ * @return a signature of the call-like expression or undefined if one can't be found
+ */
function getResolvedSignature(node, candidatesOutArray) {
var links = getNodeLinks(node);
// If getResolvedSignature has already been called, we will have cached the resolvedSignature.
@@ -36464,12 +39626,12 @@ var ts;
if (node.expression.kind === 96 /* SuperKeyword */) {
return voidType;
}
- if (node.kind === 180 /* NewExpression */) {
+ if (node.kind === 181 /* NewExpression */) {
var declaration = signature.declaration;
if (declaration &&
- declaration.kind !== 150 /* Constructor */ &&
- declaration.kind !== 154 /* ConstructSignature */ &&
- declaration.kind !== 159 /* ConstructorType */ &&
+ declaration.kind !== 151 /* Constructor */ &&
+ declaration.kind !== 155 /* ConstructSignature */ &&
+ declaration.kind !== 160 /* ConstructorType */ &&
!ts.isJSDocConstructSignature(declaration)) {
// When resolved signature is a call signature (and not a construct signature) the result type is any, unless
// the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations
@@ -36479,10 +39641,13 @@ var ts;
var funcSymbol = node.expression.kind === 70 /* Identifier */ ?
getResolvedSymbol(node.expression) :
checkExpression(node.expression).symbol;
- if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
+ funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
+ }
+ if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16 /* Function */) {
return getInferredClassType(funcSymbol);
}
- else if (compilerOptions.noImplicitAny) {
+ else if (noImplicitAny) {
error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
}
return anyType;
@@ -36509,9 +39674,9 @@ var ts;
return false;
}
var targetDeclarationKind = resolvedRequire.flags & 16 /* Function */
- ? 225 /* FunctionDeclaration */
+ ? 227 /* FunctionDeclaration */
: resolvedRequire.flags & 3 /* Variable */
- ? 223 /* VariableDeclaration */
+ ? 225 /* VariableDeclaration */
: 0 /* Unknown */;
if (targetDeclarationKind !== 0 /* Unknown */) {
var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -36538,6 +39703,22 @@ var ts;
function checkNonNullAssertion(node) {
return getNonNullableType(checkExpression(node.expression));
}
+ function checkMetaProperty(node) {
+ checkGrammarMetaProperty(node);
+ var container = ts.getNewTargetContainer(node);
+ if (!container) {
+ error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
+ return unknownType;
+ }
+ else if (container.kind === 151 /* Constructor */) {
+ var symbol = getSymbolOfNode(container.parent);
+ return getTypeOfSymbol(symbol);
+ }
+ else {
+ var symbol = getSymbolOfNode(container);
+ return getTypeOfSymbol(symbol);
+ }
+ }
function getTypeOfParameter(symbol) {
var type = getTypeOfSymbol(symbol);
if (strictNullChecks) {
@@ -36553,13 +39734,16 @@ var ts;
pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType;
}
- function assignContextualParameterTypes(signature, context, mapper) {
+ function getTypeOfFirstParameterOfSignature(signature) {
+ return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ }
+ function assignContextualParameterTypes(signature, context, mapper, checkMode) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (isInferentialContext(mapper)) {
+ if (checkMode === 2 /* Inferential */) {
for (var i = 0; i < len; i++) {
var declaration = signature.parameters[i].valueDeclaration;
if (declaration.type) {
- inferTypes(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
}
}
}
@@ -36567,23 +39751,23 @@ var ts;
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
- signature.thisParameter = createTransientSymbol(context.thisParameter, undefined);
+ signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
}
}
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
}
@@ -36602,19 +39786,19 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
var links = getSymbolLinks(parameter);
if (!links.type) {
links.type = instantiateType(contextualType, mapper);
// if inference didn't come up with anything but {}, fall back to the binding pattern if present.
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 172 /* ObjectBindingPattern */ ||
- parameter.valueDeclaration.name.kind === 173 /* ArrayBindingPattern */)) {
+ (parameter.valueDeclaration.name.kind === 173 /* ObjectBindingPattern */ ||
+ parameter.valueDeclaration.name.kind === 174 /* ArrayBindingPattern */)) {
links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (isInferentialContext(mapper)) {
+ else if (checkMode === 2 /* Inferential */) {
// Even if the parameter already has a type, it might be because it was given a type while
// processing the function as an argument to a prior signature during overload resolution.
// If this was the case, it may have caused some type parameters to be fixed. So here,
@@ -36644,7 +39828,7 @@ var ts;
// T in the second overload so that we do not infer Base as a candidate for T
// (inferring Base would make type argument inference inconsistent between the two
// overloads).
- inferTypes(mapper.context, links.type, instantiateType(contextualType, mapper));
+ inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
}
}
function getReturnTypeFromJSDocComment(func) {
@@ -36656,10 +39840,10 @@ var ts;
}
function createPromiseType(promisedType) {
// creates a `Promise<T>` type where `T` is the promisedType argument
- var globalPromiseType = getGlobalPromiseType();
+ var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true);
if (globalPromiseType !== emptyGenericType) {
// if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type
- promisedType = getAwaitedType(promisedType);
+ promisedType = getAwaitedType(promisedType) || emptyObjectType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
@@ -36670,53 +39854,63 @@ var ts;
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
return unknownType;
}
+ else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) {
+ error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
return promiseType;
}
- function getReturnTypeFromBody(func, contextualMapper) {
+ function getReturnTypeFromBody(func, checkMode) {
var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
if (!func.body) {
return unknownType;
}
- var isAsync = ts.isAsyncFunctionLike(func);
+ var functionFlags = ts.getFunctionFlags(func);
var type;
- if (func.body.kind !== 204 /* Block */) {
- type = checkExpressionCached(func.body, contextualMapper);
- if (isAsync) {
+ if (func.body.kind !== 206 /* Block */) {
+ type = checkExpressionCached(func.body, checkMode);
+ if (functionFlags & 2 /* Async */) {
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body should be unwrapped to its awaited type, which we will wrap in
// the native Promise<T> type later in this function.
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ type = checkAwaitedType(type, /*errorNode*/ func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
}
else {
var types = void 0;
- var funcIsGenerator = !!func.asteriskToken;
- if (funcIsGenerator) {
- types = checkAndAggregateYieldOperandTypes(func, contextualMapper);
- if (types.length === 0) {
- var iterableIteratorAny = createIterableIteratorType(anyType);
- if (compilerOptions.noImplicitAny) {
+ if (functionFlags & 1 /* Generator */) {
+ types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), checkAndAggregateReturnExpressionTypes(func, checkMode));
+ if (!types || types.length === 0) {
+ var iterableIteratorAny = functionFlags & 2 /* Async */
+ ? createAsyncIterableIteratorType(anyType) // AsyncGenerator function
+ : createIterableIteratorType(anyType); // Generator function
+ if (noImplicitAny) {
error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny));
}
return iterableIteratorAny;
}
}
else {
- types = checkAndAggregateReturnExpressionTypes(func, contextualMapper);
+ types = checkAndAggregateReturnExpressionTypes(func, checkMode);
if (!types) {
// For an async function, the return type will not be never, but rather a Promise for never.
- return isAsync ? createPromiseReturnType(func, neverType) : neverType;
+ return functionFlags & 2 /* Async */
+ ? createPromiseReturnType(func, neverType) // Async function
+ : neverType; // Normal function
}
if (types.length === 0) {
// For an async function, the return type will not be void, but rather a Promise for void.
- return isAsync ? createPromiseReturnType(func, voidType) : voidType;
+ return functionFlags & 2 /* Async */
+ ? createPromiseReturnType(func, voidType) // Async function
+ : voidType; // Normal function
}
}
// Return a union of the return expression types.
type = getUnionType(types, /*subtypeReduction*/ true);
- if (funcIsGenerator) {
- type = createIterableIteratorType(type);
+ if (functionFlags & 1 /* Generator */) {
+ type = functionFlags & 2 /* Async */
+ ? createAsyncIterableIteratorType(type) // AsyncGenerator function
+ : createIterableIteratorType(type); // Generator function
}
}
if (!contextualSignature) {
@@ -36731,17 +39925,25 @@ var ts;
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body is awaited type of the body, wrapped in a native Promise<T> type.
- return isAsync ? createPromiseReturnType(func, widenedType) : widenedType;
+ return (functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ ? createPromiseReturnType(func, widenedType) // Async function
+ : widenedType; // Generator function, AsyncGenerator function, or normal function
}
- function checkAndAggregateYieldOperandTypes(func, contextualMapper) {
+ function checkAndAggregateYieldOperandTypes(func, checkMode) {
var aggregatedTypes = [];
+ var functionFlags = ts.getFunctionFlags(func);
ts.forEachYieldExpression(func.body, function (yieldExpression) {
var expr = yieldExpression.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
+ var type = checkExpressionCached(expr, checkMode);
if (yieldExpression.asteriskToken) {
// A yield* expression effectively yields everything that its operand yields
- type = checkElementTypeOfIterable(type, yieldExpression.expression);
+ type = checkIteratedTypeOrElementType(type, yieldExpression.expression, /*allowStringInput*/ false, (functionFlags & 2 /* Async */) !== 0);
+ }
+ if (functionFlags & 2 /* Async */) {
+ type = checkAwaitedType(type, expr, yieldExpression.asteriskToken
+ ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
+ : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (!ts.contains(aggregatedTypes, type)) {
aggregatedTypes.push(type);
@@ -36762,33 +39964,33 @@ var ts;
if (!switchTypes.length) {
return false;
}
- return eachTypeContainedIn(type, switchTypes);
+ return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}
function functionHasImplicitReturn(func) {
if (!(func.flags & 128 /* HasImplicitReturn */)) {
return false;
}
var lastStatement = ts.lastOrUndefined(func.body.statements);
- if (lastStatement && lastStatement.kind === 218 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) {
+ if (lastStatement && lastStatement.kind === 220 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) {
return false;
}
return true;
}
- function checkAndAggregateReturnExpressionTypes(func, contextualMapper) {
- var isAsync = ts.isAsyncFunctionLike(func);
+ function checkAndAggregateReturnExpressionTypes(func, checkMode) {
+ var functionFlags = ts.getFunctionFlags(func);
var aggregatedTypes = [];
var hasReturnWithNoExpression = functionHasImplicitReturn(func);
var hasReturnOfTypeNever = false;
ts.forEachReturnStatement(func.body, function (returnStatement) {
var expr = returnStatement.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
- if (isAsync) {
+ var type = checkExpressionCached(expr, checkMode);
+ if (functionFlags & 2 /* Async */) {
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body should be unwrapped to its awaited type, which should be wrapped in
// the native Promise<T> type by the caller.
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (type.flags & 8192 /* Never */) {
hasReturnOfTypeNever = true;
@@ -36802,7 +40004,7 @@ var ts;
}
});
if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever ||
- func.kind === 184 /* FunctionExpression */ || func.kind === 185 /* ArrowFunction */)) {
+ func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */)) {
return undefined;
}
if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) {
@@ -36831,7 +40033,7 @@ var ts;
}
// If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check.
// also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw
- if (ts.nodeIsMissing(func.body) || func.body.kind !== 204 /* Block */ || !functionHasImplicitReturn(func)) {
+ if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 /* Block */ || !functionHasImplicitReturn(func)) {
return;
}
var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */;
@@ -36863,22 +40065,22 @@ var ts;
error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
- function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
// Grammar checking
var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
- if (!hasGrammarError && node.kind === 184 /* FunctionExpression */) {
+ if (!hasGrammarError && node.kind === 185 /* FunctionExpression */) {
checkGrammarForGenerator(node);
}
// The identityMapper object is used to indicate that function expressions are wildcards
- if (contextualMapper === identityMapper && isContextSensitive(node)) {
+ if (checkMode === 1 /* SkipContextSensitive */ && isContextSensitive(node)) {
checkNodeDeferred(node);
return anyFunctionType;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && isInferentialContext(contextualMapper);
+ var mightFixTypeParameters = contextSensitive && checkMode === 2 /* Inferential */;
// Check if function expression is contextually typed and assign parameter types if so.
// See the comment in assignTypeToParameterAndFixTypeParameters to understand why we need to
// check mightFixTypeParameters.
@@ -36893,10 +40095,10 @@ var ts;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0 /* Call */)[0];
if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
+ assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
}
if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
- var returnType = getReturnTypeFromBody(node, contextualMapper);
+ var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
@@ -36908,17 +40110,21 @@ var ts;
}
}
}
- if (produceDiagnostics && node.kind !== 149 /* MethodDeclaration */) {
+ if (produceDiagnostics && node.kind !== 150 /* MethodDeclaration */) {
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
}
return type;
}
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
- var isAsync = ts.isAsyncFunctionLike(node);
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
- if (!node.asteriskToken) {
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ var functionFlags = ts.getFunctionFlags(node);
+ var returnOrPromisedType = node.type &&
+ ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ?
+ checkAsyncFunctionReturnType(node) :
+ getTypeFromTypeNode(node.type)); // AsyncGenerator function, Generator function, or normal function
+ if ((functionFlags & 1 /* Generator */) === 0) {
// return is not necessary in the body of generators
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
@@ -36931,7 +40137,7 @@ var ts;
// checkFunctionExpressionBodies). So it must be done now.
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
- if (node.body.kind === 204 /* Block */) {
+ if (node.body.kind === 206 /* Block */) {
checkSourceElement(node.body);
}
else {
@@ -36942,8 +40148,8 @@ var ts;
// its return type annotation.
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if (isAsync) {
- var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);
+ if ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body);
}
else {
@@ -36968,21 +40174,21 @@ var ts;
// Get accessors without matching set accessors
// Enum members
// Unions and intersections of the above (unions and intersections eagerly set isReadonly on creation)
- return symbol.isReadonly ||
- symbol.flags & 4 /* Property */ && (getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */) !== 0 ||
- symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0 ||
+ return !!(getCheckFlags(symbol) & 8 /* Readonly */ ||
+ symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
+ symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ ||
symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) ||
- (symbol.flags & 8 /* EnumMember */) !== 0;
+ symbol.flags & 8 /* EnumMember */);
}
function isReferenceToReadonlyEntity(expr, symbol) {
if (isReadonlySymbol(symbol)) {
// Allow assignments to readonly properties within constructors of the same class declaration.
if (symbol.flags & 4 /* Property */ &&
- (expr.kind === 177 /* PropertyAccessExpression */ || expr.kind === 178 /* ElementAccessExpression */) &&
+ (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) &&
expr.expression.kind === 98 /* ThisKeyword */) {
// Look for if this is the constructor for the class that `symbol` is a property of.
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 150 /* Constructor */))
+ if (!(func && func.kind === 151 /* Constructor */))
return true;
// If func.parent is a class and symbol is a (readonly) property of that class, or
// if func is a constructor and symbol is a (readonly) parameter property declared in it,
@@ -36994,13 +40200,13 @@ var ts;
return false;
}
function isReferenceThroughNamespaceImport(expr) {
- if (expr.kind === 177 /* PropertyAccessExpression */ || expr.kind === 178 /* ElementAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) {
var node = ts.skipParentheses(expr.expression);
if (node.kind === 70 /* Identifier */) {
var symbol = getNodeLinks(node).resolvedSymbol;
if (symbol.flags & 8388608 /* Alias */) {
var declaration = getDeclarationOfAliasSymbol(symbol);
- return declaration && declaration.kind === 237 /* NamespaceImport */;
+ return declaration && declaration.kind === 239 /* NamespaceImport */;
}
}
}
@@ -37009,7 +40215,7 @@ var ts;
function checkReferenceExpression(expr, invalidReferenceMessage) {
// References are combinations of identifiers, parentheses, and property accesses.
var node = ts.skipParentheses(expr);
- if (node.kind !== 70 /* Identifier */ && node.kind !== 177 /* PropertyAccessExpression */ && node.kind !== 178 /* ElementAccessExpression */) {
+ if (node.kind !== 70 /* Identifier */ && node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) {
error(expr, invalidReferenceMessage);
return false;
}
@@ -37017,11 +40223,21 @@ var ts;
}
function checkDeleteExpression(node) {
checkExpression(node.expression);
+ var expr = ts.skipParentheses(node.expression);
+ if (expr.kind !== 178 /* PropertyAccessExpression */ && expr.kind !== 179 /* ElementAccessExpression */) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
+ return booleanType;
+ }
+ var links = getNodeLinks(expr);
+ var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);
+ if (symbol && isReadonlySymbol(symbol)) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
+ }
return booleanType;
}
function checkTypeOfExpression(node) {
checkExpression(node.expression);
- return stringType;
+ return typeofType;
}
function checkVoidExpression(node) {
checkExpression(node.expression);
@@ -37030,7 +40246,7 @@ var ts;
function checkAwaitExpression(node) {
// Grammar checking
if (produceDiagnostics) {
- if (!(node.flags & 524288 /* AwaitContext */)) {
+ if (!(node.flags & 16384 /* AwaitContext */)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -37038,7 +40254,7 @@ var ts;
}
}
var operandType = checkExpression(node.expression);
- return checkAwaitedType(operandType, node);
+ return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkPrefixUnaryExpression(node) {
var operandType = checkExpression(node.operand);
@@ -37052,6 +40268,7 @@ var ts;
case 36 /* PlusToken */:
case 37 /* MinusToken */:
case 51 /* TildeToken */:
+ checkNonNullType(operandType, node.operand);
if (maybeTypeOfKind(operandType, 512 /* ESSymbol */)) {
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
}
@@ -37063,7 +40280,7 @@ var ts;
booleanType;
case 42 /* PlusPlusToken */:
case 43 /* MinusMinusToken */:
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
// run check only if former checks succeeded to avoid reporting cascading errors
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
@@ -37077,7 +40294,7 @@ var ts;
if (operandType === silentNeverType) {
return silentNeverType;
}
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
// run check only if former checks succeeded to avoid reporting cascading errors
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
@@ -37092,8 +40309,8 @@ var ts;
}
if (type.flags & 196608 /* UnionOrIntersection */) {
var types = type.types;
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
- var t = types_15[_i];
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+ var t = types_19[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -37110,8 +40327,8 @@ var ts;
}
if (type.flags & 65536 /* Union */) {
var types = type.types;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+ var t = types_20[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -37120,8 +40337,8 @@ var ts;
}
if (type.flags & 131072 /* Intersection */) {
var types = type.types;
- for (var _a = 0, types_17 = types; _a < types_17.length; _a++) {
- var t = types_17[_a];
+ for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
+ var t = types_21[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -37141,14 +40358,17 @@ var ts;
}
// TypeScript 1.0 spec (April 2014): 4.15.4
// The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type,
- // and the right operand to be of type Any or a subtype of the 'Function' interface type.
+ // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature.
// The result is always of the Boolean primitive type.
// NOTE: do not raise error if leftType is unknown as related error was already reported
if (isTypeOfKind(leftType, 8190 /* Primitive */)) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
// NOTE: do not raise error if right is unknown as related error was already reported
- if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
+ if (!(isTypeAny(rightType) ||
+ getSignaturesOfType(rightType, 0 /* Call */).length ||
+ getSignaturesOfType(rightType, 1 /* Construct */).length ||
+ isTypeSubtypeOf(rightType, globalFunctionType))) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
}
return booleanType;
@@ -37157,6 +40377,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
// TypeScript 1.0 spec (April 2014): 4.15.5
// The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type,
// and the right operand to be of type Any, an object type, or a type parameter type.
@@ -37164,37 +40386,37 @@ var ts;
if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 /* NumberLike */ | 512 /* ESSymbol */))) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 16384 /* TypeParameter */ | 524288 /* IndexedAccess */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
return booleanType;
}
function checkObjectLiteralAssignment(node, sourceType) {
var properties = node.properties;
- for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
- var p = properties_5[_i];
+ for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
+ var p = properties_7[_i];
checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, properties);
}
return sourceType;
}
/** Note: If property cannot be a SpreadAssignment, then allProperties does not need to be provided */
function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) {
- if (property.kind === 257 /* PropertyAssignment */ || property.kind === 258 /* ShorthandPropertyAssignment */) {
- var name_20 = property.name;
- if (name_20.kind === 142 /* ComputedPropertyName */) {
- checkComputedPropertyName(name_20);
+ if (property.kind === 260 /* PropertyAssignment */ || property.kind === 261 /* ShorthandPropertyAssignment */) {
+ var name = property.name;
+ if (name.kind === 143 /* ComputedPropertyName */) {
+ checkComputedPropertyName(name);
}
- if (isComputedNonLiteralName(name_20)) {
+ if (isComputedNonLiteralName(name)) {
return undefined;
}
- var text = ts.getTextOfPropertyName(name_20);
+ var text = ts.getTextOfPropertyName(name);
var type = isTypeAny(objectLiteralType)
? objectLiteralType
: getTypeOfPropertyOfType(objectLiteralType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1 /* Number */) ||
getIndexTypeOfType(objectLiteralType, 0 /* String */);
if (type) {
- if (property.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (property.kind === 261 /* ShorthandPropertyAssignment */) {
return checkDestructuringAssignment(property, type);
}
else {
@@ -37203,10 +40425,13 @@ var ts;
}
}
else {
- error(name_20, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_20));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name));
}
}
- else if (property.kind === 259 /* SpreadAssignment */) {
+ else if (property.kind === 262 /* SpreadAssignment */) {
+ if (languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(property, 4 /* Rest */);
+ }
var nonRestNames = [];
if (allProperties) {
for (var i = 0; i < allProperties.length - 1; i++) {
@@ -37220,22 +40445,25 @@ var ts;
error(property, ts.Diagnostics.Property_assignment_expected);
}
}
- function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
+ function checkArrayLiteralAssignment(node, sourceType, checkMode) {
+ if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512 /* Read */);
+ }
// This elementType will be used if the specific property corresponding to this index is not
// present (aka the tuple element property). This call also checks that the parentType is in
// fact an iterable or array (depending on target language).
- var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
- checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper);
+ checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
}
return sourceType;
}
- function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) {
+ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
var elements = node.elements;
var element = elements[elementIndex];
- if (element.kind !== 198 /* OmittedExpression */) {
- if (element.kind !== 196 /* SpreadElement */) {
+ if (element.kind !== 199 /* OmittedExpression */) {
+ if (element.kind !== 197 /* SpreadElement */) {
var propName = "" + elementIndex;
var type = isTypeAny(sourceType)
? sourceType
@@ -37243,7 +40471,7 @@ var ts;
? getTypeOfPropertyOfType(sourceType, propName)
: elementType;
if (type) {
- return checkDestructuringAssignment(element, type, contextualMapper);
+ return checkDestructuringAssignment(element, type, checkMode);
}
else {
// We still need to check element expression here because we may need to set appropriate flag on the expression
@@ -37263,20 +40491,20 @@ var ts;
}
else {
var restExpression = element.expression;
- if (restExpression.kind === 192 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) {
+ if (restExpression.kind === 193 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) {
error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
}
else {
- return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
+ return checkDestructuringAssignment(restExpression, createArrayType(elementType), checkMode);
}
}
}
}
return undefined;
}
- function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) {
+ function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) {
var target;
- if (exprOrAssignment.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (exprOrAssignment.kind === 261 /* ShorthandPropertyAssignment */) {
var prop = exprOrAssignment;
if (prop.objectAssignmentInitializer) {
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
@@ -37285,28 +40513,28 @@ var ts;
!(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048 /* Undefined */)) {
sourceType = getTypeWithFacts(sourceType, 131072 /* NEUndefined */);
}
- checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);
+ checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
}
target = exprOrAssignment.name;
}
else {
target = exprOrAssignment;
}
- if (target.kind === 192 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) {
- checkBinaryExpression(target, contextualMapper);
+ if (target.kind === 193 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) {
+ checkBinaryExpression(target, checkMode);
target = target.left;
}
- if (target.kind === 176 /* ObjectLiteralExpression */) {
+ if (target.kind === 177 /* ObjectLiteralExpression */) {
return checkObjectLiteralAssignment(target, sourceType);
}
- if (target.kind === 175 /* ArrayLiteralExpression */) {
- return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
+ if (target.kind === 176 /* ArrayLiteralExpression */) {
+ return checkArrayLiteralAssignment(target, sourceType, checkMode);
}
- return checkReferenceAssignment(target, sourceType, contextualMapper);
+ return checkReferenceAssignment(target, sourceType, checkMode);
}
- function checkReferenceAssignment(target, sourceType, contextualMapper) {
- var targetType = checkExpression(target, contextualMapper);
- var error = target.parent.kind === 259 /* SpreadAssignment */ ?
+ function checkReferenceAssignment(target, sourceType, checkMode) {
+ var targetType = checkExpression(target, checkMode);
+ var error = target.parent.kind === 262 /* SpreadAssignment */ ?
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
if (checkReferenceExpression(target, error)) {
@@ -37328,35 +40556,35 @@ var ts;
case 70 /* Identifier */:
case 9 /* StringLiteral */:
case 11 /* RegularExpressionLiteral */:
- case 181 /* TaggedTemplateExpression */:
- case 194 /* TemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 195 /* TemplateExpression */:
case 12 /* NoSubstitutionTemplateLiteral */:
case 8 /* NumericLiteral */:
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
case 94 /* NullKeyword */:
- case 137 /* UndefinedKeyword */:
- case 184 /* FunctionExpression */:
- case 197 /* ClassExpression */:
- case 185 /* ArrowFunction */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 187 /* TypeOfExpression */:
- case 201 /* NonNullExpression */:
- case 247 /* JsxSelfClosingElement */:
- case 246 /* JsxElement */:
+ case 138 /* UndefinedKeyword */:
+ case 185 /* FunctionExpression */:
+ case 198 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 188 /* TypeOfExpression */:
+ case 202 /* NonNullExpression */:
+ case 249 /* JsxSelfClosingElement */:
+ case 248 /* JsxElement */:
return true;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isSideEffectFree(node.whenTrue) &&
isSideEffectFree(node.whenFalse);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
if (ts.isAssignmentOperator(node.operatorToken.kind)) {
return false;
}
return isSideEffectFree(node.left) &&
isSideEffectFree(node.right);
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
// Unary operators ~, !, +, and - have no side effects.
// The rest do.
switch (node.operator) {
@@ -37368,9 +40596,9 @@ var ts;
}
return false;
// Some forms listed here for clarity
- case 188 /* VoidExpression */: // Explicit opt-out
- case 182 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings
- case 200 /* AsExpression */: // Not SEF, but can produce useful type warnings
+ case 189 /* VoidExpression */: // Explicit opt-out
+ case 183 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings
+ case 201 /* AsExpression */: // Not SEF, but can produce useful type warnings
default:
return false;
}
@@ -37385,16 +40613,16 @@ var ts;
firstAssignableToSecond && !secondAssignableToFirst ? type2 :
getUnionType([type1, type2], /*subtypeReduction*/ true);
}
- function checkBinaryExpression(node, contextualMapper) {
- return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node);
+ function checkBinaryExpression(node, checkMode) {
+ return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node);
}
- function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) {
+ function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
var operator = operatorToken.kind;
- if (operator === 57 /* EqualsToken */ && (left.kind === 176 /* ObjectLiteralExpression */ || left.kind === 175 /* ArrayLiteralExpression */)) {
- return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper);
+ if (operator === 57 /* EqualsToken */ && (left.kind === 177 /* ObjectLiteralExpression */ || left.kind === 176 /* ArrayLiteralExpression */)) {
+ return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode);
}
- var leftType = checkExpression(left, contextualMapper);
- var rightType = checkExpression(right, contextualMapper);
+ var leftType = checkExpression(left, checkMode);
+ var rightType = checkExpression(right, checkMode);
switch (operator) {
case 38 /* AsteriskToken */:
case 39 /* AsteriskAsteriskToken */:
@@ -37421,18 +40649,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- // TypeScript 1.0 spec (April 2014): 4.19.1
- // These operators require their operands to be of type Any, the Number primitive type,
- // or an enum type. Operands of an enum type are treated
- // as having the primitive type Number. If one operand is the null or undefined value,
- // it is treated as having the type of the other operand.
- // The result is always of the Number primitive type.
- if (leftType.flags & 6144 /* Nullable */)
- leftType = rightType;
- if (rightType.flags & 6144 /* Nullable */)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
var suggestedOperator = void 0;
// if a user tries to apply a bitwise operator to 2 boolean operands
// try and return them a helpful suggestion
@@ -37455,16 +40673,10 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- // TypeScript 1.0 spec (April 2014): 4.19.2
- // The binary + operator requires both operands to be of the Number primitive type or an enum type,
- // or at least one of the operands to be of type Any or the String primitive type.
- // If one operand is the null or undefined value, it is treated as having the type of the other operand.
- if (leftType.flags & 6144 /* Nullable */)
- leftType = rightType;
- if (rightType.flags & 6144 /* Nullable */)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ if (!isTypeOfKind(leftType, 1 /* Any */ | 262178 /* StringLike */) && !isTypeOfKind(rightType, 1 /* Any */ | 262178 /* StringLike */)) {
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
+ }
var resultType = void 0;
if (isTypeOfKind(leftType, 340 /* NumberLike */) && isTypeOfKind(rightType, 340 /* NumberLike */)) {
// Operands of an enum type are treated as having the primitive type Number.
@@ -37499,8 +40711,8 @@ var ts;
case 29 /* LessThanEqualsToken */:
case 30 /* GreaterThanEqualsToken */:
if (checkForDisallowedESSymbolOperand(operator)) {
- leftType = getBaseTypeOfLiteralType(leftType);
- rightType = getBaseTypeOfLiteralType(rightType);
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -37536,11 +40748,14 @@ var ts;
checkAssignmentOperator(rightType);
return getRegularTypeOfObjectLiteral(rightType);
case 25 /* CommaToken */:
- if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
}
return rightType;
}
+ function isEvalNode(node) {
+ return node.kind === 70 /* Identifier */ && node.text === "eval";
+ }
// Return true if there was no error, false if there was an error.
function checkForDisallowedESSymbolOperand(operator) {
var offendingSymbolOperand = maybeTypeOfKind(leftType, 512 /* ESSymbol */) ? left :
@@ -37603,7 +40818,7 @@ var ts;
function checkYieldExpression(node) {
// Grammar checking
if (produceDiagnostics) {
- if (!(node.flags & 131072 /* YieldContext */) || isYieldExpressionInClass(node)) {
+ if (!(node.flags & 4096 /* YieldContext */) || isYieldExpressionInClass(node)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -37614,23 +40829,40 @@ var ts;
var func = ts.getContainingFunction(node);
// If the user's code is syntactically correct, the func should always have a star. After all,
// we are in a yield context.
- if (func && func.asteriskToken) {
+ var functionFlags = func && ts.getFunctionFlags(func);
+ if (node.asteriskToken) {
+ if (functionFlags & 2 /* Async */) {
+ if (languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 4096 /* AsyncDelegator */);
+ }
+ }
+ else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256 /* Values */);
+ }
+ }
+ if (functionFlags & 1 /* Generator */) {
var expressionType = checkExpressionCached(node.expression, /*contextualMapper*/ undefined);
var expressionElementType = void 0;
var nodeIsYieldStar = !!node.asteriskToken;
if (nodeIsYieldStar) {
- expressionElementType = checkElementTypeOfIterable(expressionType, node.expression);
+ expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, /*allowStringInput*/ false, (functionFlags & 2 /* Async */) !== 0);
}
// There is no point in doing an assignability check if the function
// has no explicit return type because the return type is directly computed
// from the yield expressions.
if (func.type) {
- var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType;
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2 /* Async */) !== 0) || anyType;
if (nodeIsYieldStar) {
- checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, /*headMessage*/ undefined);
+ checkTypeAssignableTo(functionFlags & 2 /* Async */
+ ? getAwaitedType(expressionElementType, node.expression, ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionElementType, signatureElementType, node.expression,
+ /*headMessage*/ undefined);
}
else {
- checkTypeAssignableTo(expressionType, signatureElementType, node.expression, /*headMessage*/ undefined);
+ checkTypeAssignableTo(functionFlags & 2 /* Async */
+ ? getAwaitedType(expressionType, node.expression, ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionType, signatureElementType, node.expression,
+ /*headMessage*/ undefined);
}
}
}
@@ -37638,10 +40870,10 @@ var ts;
// Both yield and yield* expressions have type 'any'
return anyType;
}
- function checkConditionalExpression(node, contextualMapper) {
+ function checkConditionalExpression(node, checkMode) {
checkExpression(node.condition);
- var type1 = checkExpression(node.whenTrue, contextualMapper);
- var type2 = checkExpression(node.whenFalse, contextualMapper);
+ var type1 = checkExpression(node.whenTrue, checkMode);
+ var type2 = checkExpression(node.whenFalse, checkMode);
return getBestChoiceType(type1, type2);
}
function checkLiteralExpression(node) {
@@ -37672,12 +40904,17 @@ var ts;
}
function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
var saveContextualType = node.contextualType;
+ var saveContextualMapper = node.contextualMapper;
node.contextualType = contextualType;
- var result = checkExpression(node, contextualMapper);
+ node.contextualMapper = contextualMapper;
+ var checkMode = contextualMapper === identityMapper ? 1 /* SkipContextSensitive */ :
+ contextualMapper ? 2 /* Inferential */ : 0 /* Normal */;
+ var result = checkExpression(node, checkMode);
node.contextualType = saveContextualType;
+ node.contextualMapper = saveContextualMapper;
return result;
}
- function checkExpressionCached(node, contextualMapper) {
+ function checkExpressionCached(node, checkMode) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
// When computing a type that we're going to cache, we need to ignore any ongoing control flow
@@ -37685,83 +40922,87 @@ var ts;
// to the top of the stack ensures all transient types are computed from a known point.
var saveFlowLoopStart = flowLoopStart;
flowLoopStart = flowLoopCount;
- links.resolvedType = checkExpression(node, contextualMapper);
+ links.resolvedType = checkExpression(node, checkMode);
flowLoopStart = saveFlowLoopStart;
}
return links.resolvedType;
}
function isTypeAssertion(node) {
node = ts.skipParentheses(node);
- return node.kind === 182 /* TypeAssertionExpression */ || node.kind === 200 /* AsExpression */;
+ return node.kind === 183 /* TypeAssertionExpression */ || node.kind === 201 /* AsExpression */;
}
function checkDeclarationInitializer(declaration) {
- var type = checkExpressionCached(declaration.initializer);
+ var type = getTypeOfExpression(declaration.initializer, /*cache*/ true);
return ts.getCombinedNodeFlags(declaration) & 2 /* Const */ ||
ts.getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !ts.isParameterPropertyDeclaration(declaration) ||
isTypeAssertion(declaration.initializer) ? type : getWidenedLiteralType(type);
}
function isLiteralContextualType(contextualType) {
if (contextualType) {
- if (contextualType.flags & 16384 /* TypeParameter */) {
- var apparentType = getApparentTypeOfTypeParameter(contextualType);
+ if (contextualType.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
// If the type parameter is constrained to the base primitive type we're checking for,
// consider this a literal context. For example, given a type parameter 'T extends string',
// this causes us to infer string literal types for T.
- if (apparentType.flags & (2 /* String */ | 4 /* Number */ | 8 /* Boolean */ | 16 /* Enum */)) {
+ if (constraint.flags & (2 /* String */ | 4 /* Number */ | 8 /* Boolean */ | 16 /* Enum */)) {
return true;
}
- contextualType = apparentType;
+ contextualType = constraint;
}
return maybeTypeOfKind(contextualType, (480 /* Literal */ | 262144 /* Index */));
}
return false;
}
- function checkExpressionForMutableLocation(node, contextualMapper) {
- var type = checkExpression(node, contextualMapper);
+ function checkExpressionForMutableLocation(node, checkMode) {
+ var type = checkExpression(node, checkMode);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type);
}
- function checkPropertyAssignment(node, contextualMapper) {
+ function checkPropertyAssignment(node, checkMode) {
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
- return checkExpressionForMutableLocation(node.initializer, contextualMapper);
+ return checkExpressionForMutableLocation(node.initializer, checkMode);
}
- function checkObjectLiteralMethod(node, contextualMapper) {
+ function checkObjectLiteralMethod(node, checkMode) {
// Grammar checking
checkGrammarMethod(node);
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
- var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
- function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
- if (isInferentialContext(contextualMapper)) {
+ function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {
+ if (checkMode === 2 /* Inferential */) {
var signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
var contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
- return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
+ return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
}
}
}
return type;
}
- // Returns the type of an expression. Unlike checkExpression, this function is simply concerned
- // with computing the type and may not fully check all contained sub-expressions for errors.
- function getTypeOfExpression(node) {
+ /**
+ * Returns the type of an expression. Unlike checkExpression, this function is simply concerned
+ * with computing the type and may not fully check all contained sub-expressions for errors.
+ * A cache argument of true indicates that if the function performs a full type check, it is ok
+ * to cache the result.
+ */
+ function getTypeOfExpression(node, cache) {
// Optimize for the common case of a call to a function with a single non-generic call
// signature where we can just fetch the return type without checking the arguments.
- if (node.kind === 179 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */) {
+ if (node.kind === 180 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
var funcType = checkNonNullExpression(node.expression);
var signature = getSingleCallSignature(funcType);
if (signature && !signature.typeParameters) {
@@ -37771,7 +41012,21 @@ var ts;
// Otherwise simply call checkExpression. Ideally, the entire family of checkXXX functions
// should have a parameter that indicates whether full error checking is required such that
// we can perform the optimizations locally.
- return checkExpression(node);
+ return cache ? checkExpressionCached(node) : checkExpression(node);
+ }
+ /**
+ * Returns the type of an expression. Unlike checkExpression, this function is simply concerned
+ * with computing the type and may not fully check all contained sub-expressions for errors.
+ * It is intended for uses where you know there is no contextual type,
+ * and requesting the contextual type might cause a circularity or other bad behaviour.
+ * It sets the contextual type of the node to any before calling getTypeOfExpression.
+ */
+ function getContextFreeTypeOfExpression(node) {
+ var saveContextualType = node.contextualType;
+ node.contextualType = anyType;
+ var type = getTypeOfExpression(node);
+ node.contextualType = saveContextualType;
+ return type;
}
// Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When
// contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the
@@ -37780,30 +41035,30 @@ var ts;
// object, it serves as an indicator that all contained function and arrow expressions should be considered to
// have the wildcard function type; this form of type check is used during overload resolution to exclude
// contextually typed function and arrow expressions in the initial phase.
- function checkExpression(node, contextualMapper) {
+ function checkExpression(node, checkMode) {
var type;
- if (node.kind === 141 /* QualifiedName */) {
+ if (node.kind === 142 /* QualifiedName */) {
type = checkQualifiedName(node);
}
else {
- var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
- type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkExpressionWorker(node, checkMode);
+ type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
if (isConstEnumObjectType(type)) {
// enum object type for const enums are only permitted in:
// - 'left' in property access
// - 'object' in indexed access
// - target in rhs of import statement
- var ok = (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.expression === node) ||
- (node.parent.kind === 178 /* ElementAccessExpression */ && node.parent.expression === node) ||
- ((node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));
+ var ok = (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.expression === node) ||
+ (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.expression === node) ||
+ ((node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));
if (!ok) {
error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
}
}
return type;
}
- function checkExpressionWorker(node, contextualMapper) {
+ function checkExpressionWorker(node, checkMode) {
switch (node.kind) {
case 70 /* Identifier */:
return checkIdentifier(node);
@@ -37818,66 +41073,70 @@ var ts;
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
return checkLiteralExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return checkTemplateExpression(node);
case 12 /* NoSubstitutionTemplateLiteral */:
return stringType;
case 11 /* RegularExpressionLiteral */:
return globalRegExpType;
- case 175 /* ArrayLiteralExpression */:
- return checkArrayLiteral(node, contextualMapper);
- case 176 /* ObjectLiteralExpression */:
- return checkObjectLiteral(node, contextualMapper);
- case 177 /* PropertyAccessExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ return checkArrayLiteral(node, checkMode);
+ case 177 /* ObjectLiteralExpression */:
+ return checkObjectLiteral(node, checkMode);
+ case 178 /* PropertyAccessExpression */:
return checkPropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return checkIndexedAccess(node);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return checkCallExpression(node);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return checkTaggedTemplateExpression(node);
- case 183 /* ParenthesizedExpression */:
- return checkExpression(node.expression, contextualMapper);
- case 197 /* ClassExpression */:
+ case 184 /* ParenthesizedExpression */:
+ return checkExpression(node.expression, checkMode);
+ case 198 /* ClassExpression */:
return checkClassExpression(node);
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- case 187 /* TypeOfExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ case 188 /* TypeOfExpression */:
return checkTypeOfExpression(node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
return checkAssertion(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return checkNonNullAssertion(node);
- case 186 /* DeleteExpression */:
+ case 203 /* MetaProperty */:
+ return checkMetaProperty(node);
+ case 187 /* DeleteExpression */:
return checkDeleteExpression(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return checkVoidExpression(node);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return checkAwaitExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return checkPrefixUnaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return checkPostfixUnaryExpression(node);
- case 192 /* BinaryExpression */:
- return checkBinaryExpression(node, contextualMapper);
- case 193 /* ConditionalExpression */:
- return checkConditionalExpression(node, contextualMapper);
- case 196 /* SpreadElement */:
- return checkSpreadExpression(node, contextualMapper);
- case 198 /* OmittedExpression */:
+ case 193 /* BinaryExpression */:
+ return checkBinaryExpression(node, checkMode);
+ case 194 /* ConditionalExpression */:
+ return checkConditionalExpression(node, checkMode);
+ case 197 /* SpreadElement */:
+ return checkSpreadExpression(node, checkMode);
+ case 199 /* OmittedExpression */:
return undefinedWideningType;
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return checkYieldExpression(node);
- case 252 /* JsxExpression */:
- return checkJsxExpression(node);
- case 246 /* JsxElement */:
+ case 255 /* JsxExpression */:
+ return checkJsxExpression(node, checkMode);
+ case 248 /* JsxElement */:
return checkJsxElement(node);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return checkJsxSelfClosingElement(node);
- case 248 /* JsxOpeningElement */:
+ case 253 /* JsxAttributes */:
+ return checkJsxAttributes(node, checkMode);
+ case 250 /* JsxOpeningElement */:
ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
}
return unknownType;
@@ -37889,7 +41148,16 @@ var ts;
grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
}
checkSourceElement(node.constraint);
- getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)));
+ checkSourceElement(node.default);
+ var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
+ if (!hasNonCircularBaseConstraint(typeParameter)) {
+ error(node.constraint, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
+ }
+ var constraintType = getConstraintOfTypeParameter(typeParameter);
+ var defaultType = getDefaultFromTypeParameter(typeParameter);
+ if (constraintType && defaultType) {
+ checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
+ }
if (produceDiagnostics) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
}
@@ -37905,7 +41173,7 @@ var ts;
var func = ts.getContainingFunction(node);
if (ts.getModifierFlags(node) & 92 /* ParameterPropertyModifier */) {
func = ts.getContainingFunction(node);
- if (!(func.kind === 150 /* Constructor */ && ts.nodeIsPresent(func.body))) {
+ if (!(func.kind === 151 /* Constructor */ && ts.nodeIsPresent(func.body))) {
error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
}
}
@@ -37916,7 +41184,7 @@ var ts;
if (ts.indexOf(func.parameters, node) !== 0) {
error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter);
}
- if (func.kind === 150 /* Constructor */ || func.kind === 154 /* ConstructSignature */ || func.kind === 159 /* ConstructorType */) {
+ if (func.kind === 151 /* Constructor */ || func.kind === 155 /* ConstructSignature */ || func.kind === 160 /* ConstructorType */) {
error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
}
}
@@ -37926,14 +41194,6 @@ var ts;
error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
- function isSyntacticallyValidGenerator(node) {
- if (!node.asteriskToken || !node.body) {
- return false;
- }
- return node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 225 /* FunctionDeclaration */ ||
- node.kind === 184 /* FunctionExpression */;
- }
function getTypePredicateParameterIndex(parameterList, parameter) {
if (parameterList) {
for (var i = 0; i < parameterList.length; i++) {
@@ -37967,7 +41227,7 @@ var ts;
error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);
}
else {
- var leadingError = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);
+ var leadingError = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);
checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type,
/*headMessage*/ undefined, leadingError);
}
@@ -37975,9 +41235,9 @@ var ts;
else if (parameterName) {
var hasReportedError = false;
for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) {
- var name_21 = _a[_i].name;
- if (ts.isBindingPattern(name_21) &&
- checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_21, parameterName, typePredicate.parameterName)) {
+ var name = _a[_i].name;
+ if (ts.isBindingPattern(name) &&
+ checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {
hasReportedError = true;
break;
}
@@ -37990,16 +41250,16 @@ var ts;
}
function getTypePredicateParent(node) {
switch (node.parent.kind) {
- case 185 /* ArrowFunction */:
- case 153 /* CallSignature */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 158 /* FunctionType */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- var parent_9 = node.parent;
- if (node === parent_9.type) {
- return parent_9;
+ case 186 /* ArrowFunction */:
+ case 154 /* CallSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 159 /* FunctionType */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ var parent = node.parent;
+ if (node === parent.type) {
+ return parent;
}
}
}
@@ -38009,15 +41269,15 @@ var ts;
if (ts.isOmittedExpression(element)) {
continue;
}
- var name_22 = element.name;
- if (name_22.kind === 70 /* Identifier */ &&
- name_22.text === predicateVariableName) {
+ var name = element.name;
+ if (name.kind === 70 /* Identifier */ &&
+ name.text === predicateVariableName) {
error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
return true;
}
- else if (name_22.kind === 173 /* ArrayBindingPattern */ ||
- name_22.kind === 172 /* ObjectBindingPattern */) {
- if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_22, predicateVariableNode, predicateVariableName)) {
+ else if (name.kind === 174 /* ArrayBindingPattern */ ||
+ name.kind === 173 /* ObjectBindingPattern */) {
+ if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
return true;
}
}
@@ -38025,14 +41285,29 @@ var ts;
}
function checkSignatureDeclaration(node) {
// Grammar checking
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
checkGrammarIndexSignature(node);
}
- else if (node.kind === 158 /* FunctionType */ || node.kind === 225 /* FunctionDeclaration */ || node.kind === 159 /* ConstructorType */ ||
- node.kind === 153 /* CallSignature */ || node.kind === 150 /* Constructor */ ||
- node.kind === 154 /* ConstructSignature */) {
+ else if (node.kind === 159 /* FunctionType */ || node.kind === 227 /* FunctionDeclaration */ || node.kind === 160 /* ConstructorType */ ||
+ node.kind === 154 /* CallSignature */ || node.kind === 151 /* Constructor */ ||
+ node.kind === 155 /* ConstructSignature */) {
checkGrammarFunctionLikeDeclaration(node);
}
+ var functionFlags = ts.getFunctionFlags(node);
+ if ((functionFlags & 7 /* InvalidAsyncOrAsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 64 /* Awaiter */);
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(node, 128 /* Generator */);
+ }
+ }
+ if ((functionFlags & 5 /* InvalidGenerator */) === 1 /* Generator */) {
+ if (functionFlags & 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 2048 /* AsyncGenerator */);
+ }
+ else if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(node, 128 /* Generator */);
+ }
+ }
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
if (node.type) {
@@ -38040,25 +41315,28 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (compilerOptions.noImplicitAny && !node.type) {
+ if (noImplicitAny && !node.type) {
switch (node.kind) {
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
}
}
if (node.type) {
- if (languageVersion >= 2 /* ES2015 */ && isSyntacticallyValidGenerator(node)) {
+ var functionFlags_1 = ts.getFunctionFlags(node);
+ if ((functionFlags_1 & 5 /* InvalidGenerator */) === 1 /* Generator */) {
var returnType = getTypeFromTypeNode(node.type);
if (returnType === voidType) {
error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
- var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType;
- var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType);
+ var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType;
+ var iterableIteratorInstantiation = functionFlags_1 & 2 /* Async */
+ ? createAsyncIterableIteratorType(generatorElementType) // AsyncGenerator function
+ : createIterableIteratorType(generatorElementType); // Generator function
// Naively, one could check that IterableIterator<any> is assignable to the return type annotation.
// However, that would not catch the error in the following case.
//
@@ -38068,7 +41346,7 @@ var ts;
checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
}
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if ((functionFlags_1 & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
checkAsyncFunctionReturnType(node);
}
}
@@ -38078,17 +41356,18 @@ var ts;
}
}
function checkClassForDuplicateDeclarations(node) {
- var Accessor;
- (function (Accessor) {
- Accessor[Accessor["Getter"] = 1] = "Getter";
- Accessor[Accessor["Setter"] = 2] = "Setter";
- Accessor[Accessor["Property"] = 3] = "Property";
- })(Accessor || (Accessor = {}));
+ var Declaration;
+ (function (Declaration) {
+ Declaration[Declaration["Getter"] = 1] = "Getter";
+ Declaration[Declaration["Setter"] = 2] = "Setter";
+ Declaration[Declaration["Method"] = 4] = "Method";
+ Declaration[Declaration["Property"] = 3] = "Property";
+ })(Declaration || (Declaration = {}));
var instanceNames = ts.createMap();
var staticNames = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150 /* Constructor */) {
+ if (member.kind === 151 /* Constructor */) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var param = _c[_b];
if (ts.isParameterPropertyDeclaration(param)) {
@@ -38097,36 +41376,76 @@ var ts;
}
}
else {
- var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 114 /* StaticKeyword */; });
+ var isStatic = ts.getModifierFlags(member) & 32 /* Static */;
var names = isStatic ? staticNames : instanceNames;
var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name);
if (memberName) {
switch (member.kind) {
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
addName(names, member.name, memberName, 1 /* Getter */);
break;
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
addName(names, member.name, memberName, 2 /* Setter */);
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
addName(names, member.name, memberName, 3 /* Property */);
break;
+ case 150 /* MethodDeclaration */:
+ addName(names, member.name, memberName, 4 /* Method */);
+ break;
}
}
}
}
function addName(names, location, name, meaning) {
- var prev = names[name];
+ var prev = names.get(name);
if (prev) {
- if (prev & meaning) {
+ if (prev & 4 /* Method */) {
+ if (meaning !== 4 /* Method */) {
+ error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+ }
+ }
+ else if (prev & meaning) {
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
}
else {
- names[name] = prev | meaning;
+ names.set(name, prev | meaning);
}
}
else {
- names[name] = meaning;
+ names.set(name, meaning);
+ }
+ }
+ }
+ /**
+ * Static members being set on a constructor function may conflict with built-in properties
+ * of Function. Esp. in ECMAScript 5 there are non-configurable and non-writable
+ * built-in properties. This check issues a transpile error when a class has a static
+ * member with the same name as a non-writable built-in property.
+ *
+ * @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.3
+ * @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-the-function-constructor
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-function-instances
+ */
+ function checkClassForStaticPropertyNameConflicts(node) {
+ for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+ var member = _a[_i];
+ var memberNameNode = member.name;
+ var isStatic = ts.getModifierFlags(member) & 32 /* Static */;
+ if (isStatic && memberNameNode) {
+ var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
+ switch (memberName) {
+ case "name":
+ case "length":
+ case "caller":
+ case "arguments":
+ case "prototype":
+ var message = ts.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
+ var className = getNameOfSymbol(getSymbolOfNode(node));
+ error(memberNameNode, message, memberName, className);
+ break;
+ }
}
}
}
@@ -38134,7 +41453,7 @@ var ts;
var names = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind == 146 /* PropertySignature */) {
+ if (member.kind === 147 /* PropertySignature */) {
var memberName = void 0;
switch (member.name.kind) {
case 9 /* StringLiteral */:
@@ -38145,18 +41464,18 @@ var ts;
default:
continue;
}
- if (names[memberName]) {
+ if (names.get(memberName)) {
error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
- names[memberName] = true;
+ names.set(memberName, true);
}
}
}
}
function checkTypeForDuplicateIndexSignatures(node) {
- if (node.kind === 227 /* InterfaceDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */) {
var nodeSymbol = getSymbolOfNode(node);
// in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration
// to prevent this run check only for the first declaration of a given kind
@@ -38176,7 +41495,7 @@ var ts;
var declaration = decl;
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
switch (declaration.parameters[0].type.kind) {
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
if (!seenStringIndexer) {
seenStringIndexer = true;
}
@@ -38252,12 +41571,12 @@ var ts;
if (n.kind === 98 /* ThisKeyword */) {
error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
}
- else if (n.kind !== 184 /* FunctionExpression */ && n.kind !== 225 /* FunctionDeclaration */) {
+ else if (n.kind !== 185 /* FunctionExpression */ && n.kind !== 227 /* FunctionDeclaration */) {
ts.forEachChild(n, markThisReferencesAsErrors);
}
}
function isInstancePropertyWithInitializer(n) {
- return n.kind === 147 /* PropertyDeclaration */ &&
+ return n.kind === 148 /* PropertyDeclaration */ &&
!(ts.getModifierFlags(n) & 32 /* Static */) &&
!!n.initializer;
}
@@ -38287,7 +41606,7 @@ var ts;
var superCallStatement = void 0;
for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) {
var statement = statements_3[_i];
- if (statement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
superCallStatement = statement;
break;
}
@@ -38311,7 +41630,7 @@ var ts;
checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
checkDecorators(node);
checkSignatureDeclaration(node);
- if (node.kind === 151 /* GetAccessor */) {
+ if (node.kind === 152 /* GetAccessor */) {
if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128 /* HasImplicitReturn */)) {
if (!(node.flags & 256 /* HasExplicitReturn */)) {
error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
@@ -38321,13 +41640,13 @@ var ts;
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
// TypeScript 1.0 spec (April 2014): 8.4.3
// Accessors for the same member name must specify the same accessibility.
- var otherKind = node.kind === 151 /* GetAccessor */ ? 152 /* SetAccessor */ : 151 /* GetAccessor */;
+ var otherKind = node.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */;
var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
if ((ts.getModifierFlags(node) & 28 /* AccessibilityModifier */) !== (ts.getModifierFlags(otherAccessor) & 28 /* AccessibilityModifier */)) {
@@ -38343,17 +41662,12 @@ var ts;
}
}
var returnType = getTypeOfAccessors(getSymbolOfNode(node));
- if (node.kind === 151 /* GetAccessor */) {
+ if (node.kind === 152 /* GetAccessor */) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
}
}
- if (node.parent.kind !== 176 /* ObjectLiteralExpression */) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
- else {
- checkNodeDeferred(node);
- }
+ checkSourceElement(node.body);
+ registerForUnusedIdentifiersCheck(node);
}
function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
var firstType = getAnnotatedType(first);
@@ -38362,14 +41676,11 @@ var ts;
error(first, message);
}
}
- function checkAccessorDeferred(node) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
function checkMissingDeclaration(node) {
checkDecorators(node);
}
function checkTypeArgumentConstraints(typeParameters, typeArgumentNodes) {
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
var typeArguments;
var mapper;
var result = true;
@@ -38377,7 +41688,7 @@ var ts;
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
if (!typeArguments) {
- typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ typeArguments = fillMissingTypeArguments(ts.map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount);
mapper = createTypeMapper(typeParameters, typeArguments);
}
var typeArgument = typeArguments[i];
@@ -38430,16 +41741,36 @@ var ts;
function checkUnionOrIntersectionType(node) {
ts.forEach(node.types, checkSourceElement);
}
+ function checkIndexedAccessIndexType(type, accessNode) {
+ if (!(type.flags & 524288 /* IndexedAccess */)) {
+ return type;
+ }
+ // Check if the index type is assignable to 'keyof T' for the object type.
+ var objectType = type.objectType;
+ var indexType = type.indexType;
+ if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
+ return type;
+ }
+ // Check if we're indexing with a numeric type and the object type is a generic
+ // type with a constraint that has a numeric index signature.
+ if (maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && isTypeOfKind(indexType, 340 /* NumberLike */)) {
+ var constraint = getBaseConstraintOfType(objectType);
+ if (constraint && getIndexInfoOfType(constraint, 1 /* Number */)) {
+ return type;
+ }
+ }
+ error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
+ return type;
+ }
function checkIndexedAccessType(node) {
- getTypeFromIndexedAccessTypeNode(node);
+ checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
}
function checkMappedType(node) {
checkSourceElement(node.typeParameter);
checkSourceElement(node.type);
var type = getTypeFromMappedTypeNode(node);
var constraintType = getConstraintTypeFromMappedType(type);
- var keyType = constraintType.flags & 16384 /* TypeParameter */ ? getApparentTypeOfTypeParameter(constraintType) : constraintType;
- checkTypeAssignableTo(keyType, stringType, node.typeParameter.constraint);
+ checkTypeAssignableTo(constraintType, stringType, node.typeParameter.constraint);
}
function isPrivateWithinAmbient(node) {
return (ts.getModifierFlags(node) & 8 /* Private */) && ts.isInAmbientContext(node);
@@ -38448,9 +41779,9 @@ var ts;
var flags = ts.getCombinedModifierFlags(n);
// children of classes (even ambient classes) should not be marked as ambient or export
// because those flags have no useful semantics there.
- if (n.parent.kind !== 227 /* InterfaceDeclaration */ &&
- n.parent.kind !== 226 /* ClassDeclaration */ &&
- n.parent.kind !== 197 /* ClassExpression */ &&
+ if (n.parent.kind !== 229 /* InterfaceDeclaration */ &&
+ n.parent.kind !== 228 /* ClassDeclaration */ &&
+ n.parent.kind !== 198 /* ClassExpression */ &&
ts.isInAmbientContext(n)) {
if (!(flags & 2 /* Ambient */)) {
// It is nested in an ambient context, which means it is automatically exported
@@ -38538,7 +41869,7 @@ var ts;
var errorNode_1 = subsequentNode.name || subsequentNode;
// TODO(jfreeman): These are methods, so handle computed name case
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
- var reportError = (node.kind === 149 /* MethodDeclaration */ || node.kind === 148 /* MethodSignature */) &&
+ var reportError = (node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */) &&
(ts.getModifierFlags(node) & 32 /* Static */) !== (ts.getModifierFlags(subsequentNode) & 32 /* Static */);
// we can get here in two cases
// 1. mixed static and instance class members
@@ -38573,11 +41904,11 @@ var ts;
}
var duplicateFunctionDeclaration = false;
var multipleConstructorImplementation = false;
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
- var current = declarations_4[_i];
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
+ var current = declarations_5[_i];
var node = current;
var inAmbientContext = ts.isInAmbientContext(node);
- var inAmbientContextOrInterface = node.parent.kind === 227 /* InterfaceDeclaration */ || node.parent.kind === 161 /* TypeLiteral */ || inAmbientContext;
+ var inAmbientContextOrInterface = node.parent.kind === 229 /* InterfaceDeclaration */ || node.parent.kind === 162 /* TypeLiteral */ || inAmbientContext;
if (inAmbientContextOrInterface) {
// check if declarations are consecutive only if they are non-ambient
// 1. ambient declarations can be interleaved
@@ -38588,7 +41919,7 @@ var ts;
// 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one
previousDeclaration = undefined;
}
- if (node.kind === 225 /* FunctionDeclaration */ || node.kind === 149 /* MethodDeclaration */ || node.kind === 148 /* MethodSignature */ || node.kind === 150 /* Constructor */) {
+ if (node.kind === 227 /* FunctionDeclaration */ || node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */ || node.kind === 151 /* Constructor */) {
var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
someNodeFlags |= currentNodeFlags;
allNodeFlags &= currentNodeFlags;
@@ -38640,8 +41971,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) {
- var signature = signatures_3[_a];
+ for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
+ var signature = signatures_4[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -38710,16 +42041,16 @@ var ts;
}
function getDeclarationSpaces(d) {
switch (d.kind) {
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return 2097152 /* ExportType */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */
? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */
: 4194304 /* ExportNamespace */;
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
return 2097152 /* ExportType */ | 1048576 /* ExportValue */;
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
var result_3 = 0;
var target = resolveAlias(getSymbolOfNode(d));
ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); });
@@ -38729,25 +42060,16 @@ var ts;
}
}
}
- function checkNonThenableType(type, location, message) {
- type = getWidenedType(type);
- if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) {
- if (location) {
- if (!message) {
- message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member;
- }
- error(location, message);
- }
- return unknownType;
- }
- return type;
+ function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) {
+ var promisedType = getPromisedTypeOfPromise(type, errorNode);
+ return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage);
}
/**
- * Gets the "promised type" of a promise.
- * @param type The type of the promise.
- * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
- */
- function getPromisedType(promise) {
+ * Gets the "promised type" of a promise.
+ * @param type The type of the promise.
+ * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
+ */
+ function getPromisedTypeOfPromise(promise, errorNode) {
//
// { // promise
// then( // thenFunction
@@ -38760,127 +42082,140 @@ var ts;
if (isTypeAny(promise)) {
return undefined;
}
- if (getObjectFlags(promise) & 4 /* Reference */) {
- if (promise.target === tryGetGlobalPromiseType()
- || promise.target === getGlobalPromiseLikeType()) {
- return promise.typeArguments[0];
- }
+ var typeAsPromise = promise;
+ if (typeAsPromise.promisedTypeOfPromise) {
+ return typeAsPromise.promisedTypeOfPromise;
}
- var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
- if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
- return undefined;
+ if (isReferenceToType(promise, getGlobalPromiseType(/*reportErrors*/ false))) {
+ return typeAsPromise.promisedTypeOfPromise = promise.typeArguments[0];
}
var thenFunction = getTypeOfPropertyOfType(promise, "then");
- if (!thenFunction || isTypeAny(thenFunction)) {
+ if (isTypeAny(thenFunction)) {
return undefined;
}
- var thenSignatures = getSignaturesOfType(thenFunction, 0 /* Call */);
+ var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray;
if (thenSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.A_promise_must_have_a_then_method);
+ }
return undefined;
}
- var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072 /* NEUndefined */);
+ var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 524288 /* NEUndefinedOrNull */);
if (isTypeAny(onfulfilledParameterType)) {
return undefined;
}
var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */);
if (onfulfilledParameterSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);
+ }
return undefined;
}
- return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true);
- }
- function getTypeOfFirstParameterOfSignature(signature) {
- return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true);
}
/**
- * Gets the "awaited type" of a type.
- * @param type The type to await.
- * @remarks The "awaited type" of an expression is its "promised type" if the expression is a
- * Promise-like type; otherwise, it is the type of the expression. This is used to reflect
- * The runtime behavior of the `await` keyword.
- */
- function getAwaitedType(type) {
- return checkAwaitedType(type, /*location*/ undefined, /*message*/ undefined);
+ * Gets the "awaited type" of a type.
+ * @param type The type to await.
+ * @remarks The "awaited type" of an expression is its "promised type" if the expression is a
+ * Promise-like type; otherwise, it is the type of the expression. This is used to reflect
+ * The runtime behavior of the `await` keyword.
+ */
+ function checkAwaitedType(type, errorNode, diagnosticMessage) {
+ return getAwaitedType(type, errorNode, diagnosticMessage) || unknownType;
}
- function checkAwaitedType(type, location, message) {
- return checkAwaitedTypeWorker(type);
- function checkAwaitedTypeWorker(type) {
- if (type.flags & 65536 /* Union */) {
- var types = [];
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var constituentType = _a[_i];
- types.push(checkAwaitedTypeWorker(constituentType));
- }
- return getUnionType(types, /*subtypeReduction*/ true);
+ function getAwaitedType(type, errorNode, diagnosticMessage) {
+ var typeAsAwaitable = type;
+ if (typeAsAwaitable.awaitedTypeOfType) {
+ return typeAsAwaitable.awaitedTypeOfType;
+ }
+ if (isTypeAny(type)) {
+ return typeAsAwaitable.awaitedTypeOfType = type;
+ }
+ if (type.flags & 65536 /* Union */) {
+ var types = void 0;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var constituentType = _a[_i];
+ types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage));
}
- else {
- var promisedType = getPromisedType(type);
- if (promisedType === undefined) {
- // The type was not a PromiseLike, so it could not be unwrapped any further.
- // As long as the type does not have a callable "then" property, it is
- // safe to return the type; otherwise, an error will have been reported in
- // the call to checkNonThenableType and we will return unknownType.
- //
- // An example of a non-promise "thenable" might be:
- //
- // await { then(): void {} }
- //
- // The "thenable" does not match the minimal definition for a PromiseLike. When
- // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise
- // will never settle. We treat this as an error to help flag an early indicator
- // of a runtime problem. If the user wants to return this value from an async
- // function, they would need to wrap it in some other value. If they want it to
- // be treated as a promise, they can cast to <any>.
- return checkNonThenableType(type, location, message);
- }
- else {
- if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
- // We have a bad actor in the form of a promise whose promised type is
- // the same promise type, or a mutually recursive promise. Return the
- // unknown type as we cannot guess the shape. If this were the actual
- // case in the JavaScript, this Promise would never resolve.
- //
- // An example of a bad actor with a singly-recursive promise type might
- // be:
- //
- // interface BadPromise {
- // then(
- // onfulfilled: (value: BadPromise) => any,
- // onrejected: (error: any) => any): BadPromise;
- // }
- //
- // The above interface will pass the PromiseLike check, and return a
- // promised type of `BadPromise`. Since this is a self reference, we
- // don't want to keep recursing ad infinitum.
- //
- // An example of a bad actor in the form of a mutually-recursive
- // promise type might be:
- //
- // interface BadPromiseA {
- // then(
- // onfulfilled: (value: BadPromiseB) => any,
- // onrejected: (error: any) => any): BadPromiseB;
- // }
- //
- // interface BadPromiseB {
- // then(
- // onfulfilled: (value: BadPromiseA) => any,
- // onrejected: (error: any) => any): BadPromiseA;
- // }
- //
- if (location) {
- error(location, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol));
- }
- return unknownType;
- }
- // Keep track of the type we're about to unwrap to avoid bad recursive promise types.
- // See the comments above for more information.
- awaitedTypeStack.push(type.id);
- var awaitedType = checkAwaitedTypeWorker(promisedType);
- awaitedTypeStack.pop();
- return awaitedType;
+ if (!types) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, /*subtypeReduction*/ true);
+ }
+ var promisedType = getPromisedTypeOfPromise(type);
+ if (promisedType) {
+ if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
+ // Verify that we don't have a bad actor in the form of a promise whose
+ // promised type is the same as the promise type, or a mutually recursive
+ // promise. If so, we return undefined as we cannot guess the shape. If this
+ // were the actual case in the JavaScript, this Promise would never resolve.
+ //
+ // An example of a bad actor with a singly-recursive promise type might
+ // be:
+ //
+ // interface BadPromise {
+ // then(
+ // onfulfilled: (value: BadPromise) => any,
+ // onrejected: (error: any) => any): BadPromise;
+ // }
+ // The above interface will pass the PromiseLike check, and return a
+ // promised type of `BadPromise`. Since this is a self reference, we
+ // don't want to keep recursing ad infinitum.
+ //
+ // An example of a bad actor in the form of a mutually-recursive
+ // promise type might be:
+ //
+ // interface BadPromiseA {
+ // then(
+ // onfulfilled: (value: BadPromiseB) => any,
+ // onrejected: (error: any) => any): BadPromiseB;
+ // }
+ //
+ // interface BadPromiseB {
+ // then(
+ // onfulfilled: (value: BadPromiseA) => any,
+ // onrejected: (error: any) => any): BadPromiseA;
+ // }
+ //
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);
}
+ return undefined;
+ }
+ // Keep track of the type we're about to unwrap to avoid bad recursive promise types.
+ // See the comments above for more information.
+ awaitedTypeStack.push(type.id);
+ var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage);
+ awaitedTypeStack.pop();
+ if (!awaitedType) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = awaitedType;
+ }
+ // The type was not a promise, so it could not be unwrapped any further.
+ // As long as the type does not have a callable "then" property, it is
+ // safe to return the type; otherwise, an error will be reported in
+ // the call to getNonThenableType and we will return undefined.
+ //
+ // An example of a non-promise "thenable" might be:
+ //
+ // await { then(): void {} }
+ //
+ // The "thenable" does not match the minimal definition for a promise. When
+ // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise
+ // will never settle. We treat this as an error to help flag an early indicator
+ // of a runtime problem. If the user wants to return this value from an async
+ // function, they would need to wrap it in some other value. If they want it to
+ // be treated as a promise, they can cast to <any>.
+ var thenFunction = getTypeOfPropertyOfType(type, "then");
+ if (thenFunction && getSignaturesOfType(thenFunction, 0 /* Call */).length > 0) {
+ if (errorNode) {
+ ts.Debug.assert(!!diagnosticMessage);
+ error(errorNode, diagnosticMessage);
}
+ return undefined;
}
+ return typeAsAwaitable.awaitedTypeOfType = type;
}
/**
* Checks the return type of an async function to ensure it is a compatible
@@ -38925,8 +42260,8 @@ var ts;
if (returnType === unknownType) {
return unknownType;
}
- var globalPromiseType = getGlobalPromiseType();
- if (globalPromiseType !== emptyGenericType && globalPromiseType !== getTargetType(returnType)) {
+ var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true);
+ if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
// The promise type was not a valid type reference to the global promise type, so we
// report an error and return the unknown type.
error(node.type, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
@@ -38947,10 +42282,15 @@ var ts;
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
- error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) {
+ error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
+ else {
+ error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ }
return unknownType;
}
- var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
+ var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(/*reportErrors*/ true);
if (globalPromiseConstructorLikeType === emptyObjectType) {
// If we couldn't resolve the global PromiseConstructorLike type we cannot verify
// compatibility with __awaiter.
@@ -38969,7 +42309,7 @@ var ts;
}
}
// Get and return the awaited type of the return type.
- return checkAwaitedType(returnType, node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type);
+ return checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
/** Check a decorator */
function checkDecorator(node) {
@@ -38982,22 +42322,22 @@ var ts;
var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
var errorInfo;
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var classSymbol = getSymbolOfNode(node.parent);
var classConstructorType = getTypeOfSymbol(classSymbol);
expectedReturnType = getUnionType([classConstructorType, voidType]);
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var methodType = getTypeOfNode(node.parent);
var descriptorType = createTypedPropertyDescriptorType(methodType);
expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -39020,6 +42360,9 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function getParameterTypeNodeForDecoratorCheck(node) {
+ return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ }
/** Check the decorators of a node */
function checkDecorators(node) {
if (!node.decorators) {
@@ -39033,29 +42376,37 @@ var ts;
if (!compilerOptions.experimentalDecorators) {
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
}
+ var firstDecorator = node.decorators[0];
+ checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */);
+ if (node.kind === 145 /* Parameter */) {
+ checkExternalEmitHelpers(firstDecorator, 32 /* Param */);
+ }
if (compilerOptions.emitDecoratorMetadata) {
+ checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */);
// we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator.
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var constructor = ts.getFirstConstructorWithBody(node);
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
markTypeNodeAsReferenced(node.type);
break;
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ break;
+ case 145 /* Parameter */:
markTypeNodeAsReferenced(node.type);
break;
}
@@ -39067,6 +42418,7 @@ var ts;
checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -39074,11 +42426,11 @@ var ts;
function checkFunctionOrMethodDeclaration(node) {
checkDecorators(node);
checkSignatureDeclaration(node);
- var isAsync = ts.isAsyncFunctionLike(node);
+ var functionFlags = ts.getFunctionFlags(node);
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name && node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name && node.name.kind === 143 /* ComputedPropertyName */) {
// This check will account for methods in class/interface declarations,
// as well as accessors in classes/object literals
checkComputedPropertyName(node.name);
@@ -39109,17 +42461,19 @@ var ts;
}
}
checkSourceElement(node.body);
- if (!node.asteriskToken) {
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1 /* Generator */) === 0) {
+ var returnOrPromisedType = node.type && (functionFlags & 2 /* Async */
+ ? checkAsyncFunctionReturnType(node) // Async function
+ : getTypeFromTypeNode(node.type)); // normal function
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (produceDiagnostics && !node.type) {
// Report an implicit any error if there is no body, no explicit return type, and node is not a private method
// in an ambient context
- if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
+ if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
- if (node.asteriskToken && ts.nodeIsPresent(node.body)) {
+ if (functionFlags & 1 /* Generator */ && ts.nodeIsPresent(node.body)) {
// A generator with a body and no type annotation can still cause errors. It can error if the
// yielded values have no common supertype, or it can give an implicit any error if it has no
// yielded values. The only way to trigger these errors is to try checking its return type.
@@ -39138,56 +42492,54 @@ var ts;
for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) {
var node = deferredUnusedIdentifierNodes_1[_i];
switch (node.kind) {
- case 261 /* SourceFile */:
- case 230 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 232 /* ModuleDeclaration */:
checkUnusedModuleMembers(node);
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
checkUnusedClassMembers(node);
checkUnusedTypeParameters(node);
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
checkUnusedTypeParameters(node);
break;
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
checkUnusedLocalsAndParameters(node);
break;
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
if (node.body) {
checkUnusedLocalsAndParameters(node);
}
checkUnusedTypeParameters(node);
break;
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
checkUnusedTypeParameters(node);
break;
}
- ;
}
}
}
function checkUnusedLocalsAndParameters(node) {
- if (node.parent.kind !== 227 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
- var _loop_3 = function (key) {
- var local = node.locals[key];
+ if (node.parent.kind !== 229 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
+ node.locals.forEach(function (local) {
if (!local.isReferenced) {
- if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 144 /* Parameter */) {
+ if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145 /* Parameter */) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
@@ -39200,22 +42552,28 @@ var ts;
ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
}
}
- };
- for (var key in node.locals) {
- _loop_3(key);
- }
+ });
+ }
+ }
+ function isRemovedPropertyFromObjectSpread(node) {
+ if (ts.isBindingElement(node) && ts.isObjectBindingPattern(node.parent)) {
+ var lastElement = ts.lastOrUndefined(node.parent.elements);
+ return lastElement !== node && !!lastElement.dotDotDotToken;
}
+ return false;
}
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 223 /* VariableDeclaration */ &&
- (declaration.parent.parent.kind === 212 /* ForInStatement */ ||
- declaration.parent.parent.kind === 213 /* ForOfStatement */)) {
+ if (declaration.kind === 225 /* VariableDeclaration */ &&
+ (declaration.parent.parent.kind === 214 /* ForInStatement */ ||
+ declaration.parent.parent.kind === 215 /* ForOfStatement */)) {
return;
}
}
- error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ if (!isRemovedPropertyFromObjectSpread(node.kind === 70 /* Identifier */ ? node.parent : node)) {
+ error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ }
}
function parameterNameStartsWithUnderscore(parameterName) {
return parameterName && isIdentifierThatStartsWithUnderScore(parameterName);
@@ -39228,12 +42586,12 @@ var ts;
if (node.members) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 149 /* MethodDeclaration */ || member.kind === 147 /* PropertyDeclaration */) {
+ if (member.kind === 150 /* MethodDeclaration */ || member.kind === 148 /* PropertyDeclaration */) {
if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8 /* Private */) {
error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name);
}
}
- else if (member.kind === 150 /* Constructor */) {
+ else if (member.kind === 151 /* Constructor */) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8 /* Private */) {
@@ -39266,22 +42624,21 @@ var ts;
}
function checkUnusedModuleMembers(node) {
if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) {
- for (var key in node.locals) {
- var local = node.locals[key];
+ node.locals.forEach(function (local) {
if (!local.isReferenced && !local.exportSymbol) {
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ errorUnusedLocal(declaration.name, local.name);
}
}
}
- }
+ });
}
}
function checkBlock(node) {
// Grammar checking for SyntaxKind.Block
- if (node.kind === 204 /* Block */) {
+ if (node.kind === 206 /* Block */) {
checkGrammarStatementInAmbientContext(node);
}
ts.forEach(node.statements, checkSourceElement);
@@ -39304,12 +42661,12 @@ var ts;
if (!(identifier && identifier.text === name)) {
return false;
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 146 /* PropertySignature */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 148 /* MethodSignature */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 147 /* PropertySignature */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 149 /* MethodSignature */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// it is ok to have member named '_super' or '_this' - member access is always qualified
return false;
}
@@ -39318,7 +42675,7 @@ var ts;
return false;
}
var root = ts.getRootDeclaration(node);
- if (root.kind === 144 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) {
+ if (root.kind === 145 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) {
// just an overload - no codegen impact
return false;
}
@@ -39329,10 +42686,14 @@ var ts;
potentialThisCollisions.push(node);
}
}
+ function checkCollisionWithCapturedNewTargetVariable(node, name) {
+ if (needCollisionCheckForIdentifier(node, name, "_newTarget")) {
+ potentialNewTargetCollisions.push(node);
+ }
+ }
// this function will run after checking the source file so 'CaptureThis' is correct for all nodes
function checkIfThisIsCapturedInEnclosingScope(node) {
- var current = node;
- while (current) {
+ ts.findAncestor(node, function (current) {
if (getNodeCheckFlags(current) & 4 /* CaptureThis */) {
var isDeclaration_1 = node.kind !== 70 /* Identifier */;
if (isDeclaration_1) {
@@ -39341,10 +42702,23 @@ var ts;
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
}
- return;
+ return true;
}
- current = current.parent;
- }
+ });
+ }
+ function checkIfNewTargetIsCapturedInEnclosingScope(node) {
+ ts.findAncestor(node, function (current) {
+ if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) {
+ var isDeclaration_2 = node.kind !== 70 /* Identifier */;
+ if (isDeclaration_2) {
+ error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ }
+ else {
+ error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);
+ }
+ return true;
+ }
+ });
}
function checkCollisionWithCapturedSuperVariable(node, name) {
if (!needCollisionCheckForIdentifier(node, name, "_super")) {
@@ -39357,8 +42731,8 @@ var ts;
return;
}
if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
- var isDeclaration_2 = node.kind !== 70 /* Identifier */;
- if (isDeclaration_2) {
+ var isDeclaration_3 = node.kind !== 70 /* Identifier */;
+ if (isDeclaration_3) {
error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
}
else {
@@ -39375,27 +42749,27 @@ var ts;
return;
}
// Uninstantiated modules shouldnt do this check
- if (node.kind === 230 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return;
}
// In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
+ if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
// If the declaration happens to be in external module, report error that require and exports are reserved keywords
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
- if (!needCollisionCheckForIdentifier(node, name, "Promise")) {
+ if (languageVersion >= 4 /* ES2017 */ || !needCollisionCheckForIdentifier(node, name, "Promise")) {
return;
}
// Uninstantiated modules shouldnt do this check
- if (node.kind === 230 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return;
}
// In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 8192 /* HasAsyncFunctions */) {
+ if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) {
// If the declaration happens to be in external module, report error that Promise is a reserved identifier.
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
@@ -39430,7 +42804,7 @@ var ts;
// skip variable declarations that don't have initializers
// NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern
// so we'll always treat binding elements as initialized
- if (node.kind === 223 /* VariableDeclaration */ && !node.initializer) {
+ if (node.kind === 225 /* VariableDeclaration */ && !node.initializer) {
return;
}
var symbol = getSymbolOfNode(node);
@@ -39440,24 +42814,24 @@ var ts;
localDeclarationSymbol !== symbol &&
localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) {
if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) {
- var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 224 /* VariableDeclarationList */);
- var container = varDeclList.parent.kind === 205 /* VariableStatement */ && varDeclList.parent.parent
+ var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226 /* VariableDeclarationList */);
+ var container = varDeclList.parent.kind === 207 /* VariableStatement */ && varDeclList.parent.parent
? varDeclList.parent.parent
: undefined;
// names of block-scoped and function scoped variables can collide only
// if block scoped variable is defined in the function\module\source file scope (because of variable hoisting)
var namesShareScope = container &&
- (container.kind === 204 /* Block */ && ts.isFunctionLike(container.parent) ||
- container.kind === 231 /* ModuleBlock */ ||
- container.kind === 230 /* ModuleDeclaration */ ||
- container.kind === 261 /* SourceFile */);
+ (container.kind === 206 /* Block */ && ts.isFunctionLike(container.parent) ||
+ container.kind === 233 /* ModuleBlock */ ||
+ container.kind === 232 /* ModuleDeclaration */ ||
+ container.kind === 264 /* SourceFile */);
// here we know that function scoped variable is shadowed by block scoped one
// if they are defined in the same scope - binder has already reported redeclaration error
// otherwise if variable has an initializer - show error that initialization will fail
// since LHS will be block scoped name instead of function scoped
if (!namesShareScope) {
- var name_23 = symbolToString(localDeclarationSymbol);
- error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_23, name_23);
+ var name = symbolToString(localDeclarationSymbol);
+ error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
}
}
}
@@ -39465,7 +42839,7 @@ var ts;
}
// Check that a parameter initializer contains no references to parameters declared to the right of itself
function checkParameterInitializer(node) {
- if (ts.getRootDeclaration(node).kind !== 144 /* Parameter */) {
+ if (ts.getRootDeclaration(node).kind !== 145 /* Parameter */) {
return;
}
var func = ts.getContainingFunction(node);
@@ -39476,7 +42850,7 @@ var ts;
// skip declaration names (i.e. in object literal expressions)
return;
}
- if (n.kind === 177 /* PropertyAccessExpression */) {
+ if (n.kind === 178 /* PropertyAccessExpression */) {
// skip property names in property access expression
return visit(n.expression);
}
@@ -39495,27 +42869,28 @@ var ts;
// so we need to do a bit of extra work to check if reference is legal
var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
if (enclosingContainer === func) {
- if (symbol.valueDeclaration.kind === 144 /* Parameter */) {
+ if (symbol.valueDeclaration.kind === 145 /* Parameter */ ||
+ symbol.valueDeclaration.kind === 175 /* BindingElement */) {
// it is ok to reference parameter in initializer if either
// - parameter is located strictly on the left of current parameter declaration
if (symbol.valueDeclaration.pos < node.pos) {
return;
}
// - parameter is wrapped in function-like entity
- var current = n;
- while (current !== node.initializer) {
- if (ts.isFunctionLike(current.parent)) {
- return;
+ if (ts.findAncestor(n, function (current) {
+ if (current === node.initializer) {
+ return "quit";
}
- // computed property names/initializers in instance property declaration of class like entities
- // are executed in constructor and thus deferred
- if (current.parent.kind === 147 /* PropertyDeclaration */ &&
- !(ts.hasModifier(current.parent, 32 /* Static */)) &&
- ts.isClassLike(current.parent.parent)) {
- return;
- }
- current = current.parent;
+ return ts.isFunctionLike(current.parent) ||
+ // computed property names/initializers in instance property declaration of class like entities
+ // are executed in constructor and thus deferred
+ (current.parent.kind === 148 /* PropertyDeclaration */ &&
+ !(ts.hasModifier(current.parent, 32 /* Static */)) &&
+ ts.isClassLike(current.parent.parent));
+ })) {
+ return;
}
+ // fall through to report error
}
error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
}
@@ -39536,40 +42911,46 @@ var ts;
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
if (node.initializer) {
checkExpressionCached(node.initializer);
}
}
- if (node.kind === 174 /* BindingElement */) {
+ if (node.kind === 175 /* BindingElement */) {
+ if (node.parent.kind === 173 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 4 /* Rest */);
+ }
// check computed properties inside property names of binding elements
- if (node.propertyName && node.propertyName.kind === 142 /* ComputedPropertyName */) {
+ if (node.propertyName && node.propertyName.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.propertyName);
}
// check private/protected variable access
- var parent_10 = node.parent.parent;
- var parentType = getTypeForBindingElementParent(parent_10);
- var name_24 = node.propertyName || node.name;
- var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name_24));
+ var parent = node.parent.parent;
+ var parentType = getTypeForBindingElementParent(parent);
+ var name = node.propertyName || node.name;
+ var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name));
markPropertyAsReferenced(property);
- if (parent_10.initializer && property && getParentOfSymbol(property)) {
- checkClassPropertyAccess(parent_10, parent_10.initializer, parentType, property);
+ if (parent.initializer && property) {
+ checkPropertyAccessibility(parent, parent.initializer, parentType, property);
}
}
// For a binding pattern, check contained binding elements
if (ts.isBindingPattern(node.name)) {
+ if (node.name.kind === 174 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512 /* Read */);
+ }
ts.forEach(node.name.elements, checkSourceElement);
}
// For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body
- if (node.initializer && ts.getRootDeclaration(node).kind === 144 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
+ if (node.initializer && ts.getRootDeclaration(node).kind === 145 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
return;
}
// For a binding pattern, validate the initializer and exit
if (ts.isBindingPattern(node.name)) {
// Don't validate for-in initializer as it is already an error
- if (node.initializer && node.parent.parent.kind !== 212 /* ForInStatement */) {
+ if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined);
checkParameterInitializer(node);
}
@@ -39580,7 +42961,7 @@ var ts;
if (node === symbol.valueDeclaration) {
// Node is the primary declaration of the symbol, just validate the initializer
// Don't validate for-in initializer as it is already an error
- if (node.initializer && node.parent.parent.kind !== 212 /* ForInStatement */) {
+ if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined);
checkParameterInitializer(node);
}
@@ -39600,21 +42981,22 @@ var ts;
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
- if (node.kind !== 147 /* PropertyDeclaration */ && node.kind !== 146 /* PropertySignature */) {
+ if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */) {
// We know we don't have a binding pattern or computed name here
checkExportsOnMergedDeclarations(node);
- if (node.kind === 223 /* VariableDeclaration */ || node.kind === 174 /* BindingElement */) {
+ if (node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */) {
checkVarDeclaredNamesNotShadowed(node);
}
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
}
function areDeclarationFlagsIdentical(left, right) {
- if ((left.kind === 144 /* Parameter */ && right.kind === 223 /* VariableDeclaration */) ||
- (left.kind === 223 /* VariableDeclaration */ && right.kind === 144 /* Parameter */)) {
+ if ((left.kind === 145 /* Parameter */ && right.kind === 225 /* VariableDeclaration */) ||
+ (left.kind === 225 /* VariableDeclaration */ && right.kind === 145 /* Parameter */)) {
// Differences in optionality between parameters and variables are allowed.
return true;
}
@@ -39644,8 +43026,8 @@ var ts;
}
function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) {
// We only disallow modifier on a method declaration if it is a property of object-literal-expression
- if (node.modifiers && node.parent.kind === 176 /* ObjectLiteralExpression */) {
- if (ts.isAsyncFunctionLike(node)) {
+ if (node.modifiers && node.parent.kind === 177 /* ObjectLiteralExpression */) {
+ if (ts.getFunctionFlags(node) & 2 /* Async */) {
if (node.modifiers.length > 1) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
}
@@ -39665,7 +43047,7 @@ var ts;
checkGrammarStatementInAmbientContext(node);
checkExpression(node.expression);
checkSourceElement(node.thenStatement);
- if (node.thenStatement.kind === 206 /* EmptyStatement */) {
+ if (node.thenStatement.kind === 208 /* EmptyStatement */) {
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
}
checkSourceElement(node.elseStatement);
@@ -39685,12 +43067,12 @@ var ts;
function checkForStatement(node) {
// Grammar checking
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.initializer && node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer && node.initializer.kind === 226 /* VariableDeclarationList */) {
checkGrammarVariableDeclarationList(node.initializer);
}
}
if (node.initializer) {
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
ts.forEach(node.initializer.declarations, checkVariableDeclaration);
}
else {
@@ -39708,19 +43090,29 @@ var ts;
}
function checkForOfStatement(node) {
checkGrammarForInOrForOfStatement(node);
+ if (node.kind === 215 /* ForOfStatement */) {
+ if (node.awaitModifier) {
+ if (languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */);
+ }
+ }
+ else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256 /* ForOfIncludes */);
+ }
+ }
// Check the LHS and RHS
// If the LHS is a declaration, just check it as a variable declaration, which will in turn check the RHS
// via checkRightHandSideOfForOf.
// If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference.
// Then check that the RHS is assignable to it.
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
checkForInOrForOfVariableDeclaration(node);
}
else {
var varExpr = node.initializer;
- var iteratedType = checkRightHandSideOfForOf(node.expression);
+ var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier);
// There may be a destructuring assignment on the left side
- if (varExpr.kind === 175 /* ArrayLiteralExpression */ || varExpr.kind === 176 /* ObjectLiteralExpression */) {
+ if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) {
// iteratedType may be undefined. In this case, we still want to check the structure of
// varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like
// to short circuit the type relation checking as much as possible, so we pass the unknownType.
@@ -39752,7 +43144,7 @@ var ts;
// for (let VarDecl in Expr) Statement
// VarDecl must be a variable declaration without a type annotation that declares a variable of type Any,
// and Expr must be an expression of type Any, an object type, or a type parameter type.
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
var variable = node.initializer.declarations[0];
if (variable && ts.isBindingPattern(variable.name)) {
error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -39766,7 +43158,7 @@ var ts;
// and Expr must be an expression of type Any, an object type, or a type parameter type.
var varExpr = node.initializer;
var leftType = checkExpression(varExpr);
- if (varExpr.kind === 175 /* ArrayLiteralExpression */ || varExpr.kind === 176 /* ObjectLiteralExpression */) {
+ if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) {
error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
}
else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -39779,7 +43171,7 @@ var ts;
}
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
// in this case error about missing name is already reported - do not report extra one
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 16384 /* TypeParameter */ | 524288 /* IndexedAccess */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
checkSourceElement(node.statement);
@@ -39795,52 +43187,113 @@ var ts;
checkVariableDeclaration(decl);
}
}
- function checkRightHandSideOfForOf(rhsExpression) {
+ function checkRightHandSideOfForOf(rhsExpression, awaitModifier) {
var expressionType = checkNonNullExpression(rhsExpression);
- return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true);
+ return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
if (isTypeAny(inputType)) {
return inputType;
}
- if (languageVersion >= 2 /* ES2015 */) {
- return checkElementTypeOfIterable(inputType, errorNode);
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, /*checkAssignability*/ true) || anyType;
+ }
+ /**
+ * When consuming an iterable type in a for..of, spread, or iterator destructuring assignment
+ * we want to get the iterated type of an iterable for ES2015 or later, or the iterated type
+ * of a iterable (if defined globally) or element type of an array like for ES2015 or earlier.
+ */
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ var uplevelIteration = languageVersion >= 2 /* ES2015 */;
+ var downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
+ // Get the iterated type of an `Iterable<T>` or `IterableIterator<T>` only in ES2015
+ // or higher, when inside of an async generator or for-await-if, or when
+ // downlevelIteration is requested.
+ if (uplevelIteration || downlevelIteration || allowAsyncIterable) {
+ // We only report errors for an invalid iterable type in ES2015 or higher.
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ if (iteratedType || uplevelIteration) {
+ return iteratedType;
+ }
}
+ var arrayType = inputType;
+ var reportedError = false;
+ var hasStringConstituent = false;
+ // If strings are permitted, remove any string-like constituents from the array type.
+ // This allows us to find other non-string element types from an array unioned with
+ // a string.
if (allowStringInput) {
- return checkElementTypeOfArrayOrString(inputType, errorNode);
- }
- if (isArrayLikeType(inputType)) {
- var indexType = getIndexTypeOfType(inputType, 1 /* Number */);
- if (indexType) {
- return indexType;
+ if (arrayType.flags & 65536 /* Union */) {
+ // After we remove all types that are StringLike, we will know if there was a string constituent
+ // based on whether the result of filter is a new array.
+ var arrayTypes = inputType.types;
+ var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178 /* StringLike */); });
+ if (filteredTypes !== arrayTypes) {
+ arrayType = getUnionType(filteredTypes, /*subtypeReduction*/ true);
+ }
+ }
+ else if (arrayType.flags & 262178 /* StringLike */) {
+ arrayType = neverType;
+ }
+ hasStringConstituent = arrayType !== inputType;
+ if (hasStringConstituent) {
+ if (languageVersion < 1 /* ES5 */) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
+ reportedError = true;
+ }
+ }
+ // Now that we've removed all the StringLike types, if no constituents remain, then the entire
+ // arrayOrStringType was a string.
+ if (arrayType.flags & 8192 /* Never */) {
+ return stringType;
+ }
}
}
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
+ if (!isArrayLikeType(arrayType)) {
+ if (errorNode && !reportedError) {
+ // Which error we report depends on whether we allow strings or if there was a
+ // string constituent. For example, if the input type is number | string, we
+ // want to say that number is not an array type. But if the input was just
+ // number and string input is allowed, we want to say that number is not an
+ // array type or a string type.
+ var diagnostic = !allowStringInput || hasStringConstituent
+ ? downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type
+ : downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
+ error(errorNode, diagnostic, typeToString(arrayType));
+ }
+ return hasStringConstituent ? stringType : undefined;
}
- return unknownType;
- }
- /**
- * When errorNode is undefined, it means we should not report any errors.
- */
- function checkElementTypeOfIterable(iterable, errorNode) {
- var elementType = getElementTypeOfIterable(iterable, errorNode);
- // Now even though we have extracted the iteratedType, we will have to validate that the type
- // passed in is actually an Iterable.
- if (errorNode && elementType) {
- checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode);
+ var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */);
+ if (hasStringConstituent && arrayElementType) {
+ // This is just an optimization for the case where arrayOrStringType is string | string[]
+ if (arrayElementType.flags & 262178 /* StringLike */) {
+ return stringType;
+ }
+ return getUnionType([arrayElementType, stringType], /*subtypeReduction*/ true);
}
- return elementType || anyType;
+ return arrayElementType;
}
/**
* We want to treat type as an iterable, and get the type it is an iterable of. The iterable
* must have the following structure (annotated with the names of the variables below):
*
- * { // iterable
- * [Symbol.iterator]: { // iteratorFunction
- * (): Iterator<T>
+ * { // iterable
+ * [Symbol.iterator]: { // iteratorMethod
+ * (): Iterator<T>
+ * }
+ * }
+ *
+ * For an async iterable, we expect the following structure:
+ *
+ * { // iterable
+ * [Symbol.asyncIterator]: { // iteratorMethod
+ * (): AsyncIterator<T>
+ * }
* }
- * }
*
* T is the type we are after. At every level that involves analyzing return types
* of signatures, we union the return types of all the signatures.
@@ -39852,166 +43305,170 @@ var ts;
* caller requested it. Then the caller can decide what to do in the case where there is no iterated
* type. This is different from returning anyType, because that would signify that we have matched the
* whole pattern and that T (above) is 'any'.
+ *
+ * For a **for-of** statement, `yield*` (in a normal generator), spread, array
+ * destructuring, or normal generator we will only ever look for a `[Symbol.iterator]()`
+ * method.
+ *
+ * For an async generator we will only ever look at the `[Symbol.asyncIterator]()` method.
+ *
+ * For a **for-await-of** statement or a `yield*` in an async generator we will look for
+ * the `[Symbol.asyncIterator]()` method first, and then the `[Symbol.iterator]()` method.
*/
- function getElementTypeOfIterable(type, errorNode) {
+ function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterable = type;
- if (!typeAsIterable.iterableElementType) {
- // As an optimization, if the type is instantiated directly using the globalIterableType (Iterable<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIterableType()) {
- typeAsIterable.iterableElementType = type.typeArguments[0];
+ if (isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable) {
+ return isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isAsyncIterable) {
+ // As an optimization, if the type is an instantiation of the global `AsyncIterable<T>`
+ // or the global `AsyncIterableIterator<T>` then just grab its type argument.
+ if (isReferenceToType(type, getGlobalAsyncIterableType(/*reportErrors*/ false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(/*reportErrors*/ false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
+ }
+ }
+ if (!isAsyncIterable || allowNonAsyncIterables) {
+ // As an optimization, if the type is an instantiation of the global `Iterable<T>` or
+ // `IterableIterator<T>` then just grab its type argument.
+ if (isReferenceToType(type, getGlobalIterableType(/*reportErrors*/ false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(/*reportErrors*/ false))) {
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
+ : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
+ }
+ var iteratorMethodSignatures;
+ var mayBeIterable = false;
+ if (isAsyncIterable) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
- else {
- var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorFunction)) {
- return undefined;
- }
- var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0 /* Call */) : emptyArray;
- if (iteratorFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
- }
- return undefined;
- }
- typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true), errorNode);
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
+ }
+ if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
+ mayBeIterable = true;
+ }
+ if (ts.some(iteratorMethodSignatures)) {
+ var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, /*isAsyncIterator*/ false);
+ if (checkAssignability && errorNode && iteratedType) {
+ // If `checkAssignability` was specified, we were called from
+ // `checkIteratedTypeOrElementType`. As such, we need to validate that
+ // the type passed in is actually an Iterable.
+ checkTypeAssignableTo(type, mayBeIterable
+ ? createIterableType(iteratedType)
+ : createAsyncIterableType(iteratedType), errorNode);
+ }
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType
+ : typeAsIterable.iteratedTypeOfIterable = iteratedType;
+ }
+ if (errorNode) {
+ error(errorNode, isAsyncIterable
+ ? ts.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
+ : ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
}
- return typeAsIterable.iterableElementType;
+ return undefined;
}
/**
- * This function has very similar logic as getElementTypeOfIterable, except that it operates on
+ * This function has very similar logic as getIteratedTypeOfIterable, except that it operates on
* Iterators instead of Iterables. Here is the structure:
*
* { // iterator
- * next: { // iteratorNextFunction
- * (): { // iteratorNextResult
- * value: T // iteratorNextValue
+ * next: { // nextMethod
+ * (): { // nextResult
+ * value: T // nextValue
* }
* }
* }
*
+ * For an async iterator, we expect the following structure:
+ *
+ * { // iterator
+ * next: { // nextMethod
+ * (): PromiseLike<{ // nextResult
+ * value: T // nextValue
+ * }>
+ * }
+ * }
*/
- function getElementTypeOfIterator(type, errorNode) {
+ function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterator = type;
- if (!typeAsIterator.iteratorElementType) {
- // As an optimization, if the type is instantiated directly using the globalIteratorType (Iterator<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIteratorType()) {
- typeAsIterator.iteratorElementType = type.typeArguments[0];
- }
- else {
- var iteratorNextFunction = getTypeOfPropertyOfType(type, "next");
- if (isTypeAny(iteratorNextFunction)) {
- return undefined;
- }
- var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0 /* Call */) : emptyArray;
- if (iteratorNextFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
- }
- return undefined;
- }
- var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
- if (isTypeAny(iteratorNextResult)) {
- return undefined;
- }
- var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
- if (!iteratorNextValue) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
- }
- return undefined;
- }
- typeAsIterator.iteratorElementType = iteratorNextValue;
- }
+ if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) {
+ return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator;
+ }
+ // As an optimization, if the type is an instantiation of the global `Iterator<T>` (for
+ // a non-async iterator) or the global `AsyncIterator<T>` (for an async-iterator) then
+ // just grab its type argument.
+ var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType;
+ if (isReferenceToType(type, getIteratorType(/*reportErrors*/ false))) {
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0]
+ : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0];
+ }
+ // Both async and non-async iterators must have a `next` method.
+ var nextMethod = getTypeOfPropertyOfType(type, "next");
+ if (isTypeAny(nextMethod)) {
+ return undefined;
}
- return typeAsIterator.iteratorElementType;
- }
- function getElementTypeOfIterableIterator(type) {
- if (isTypeAny(type)) {
+ var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0 /* Call */) : emptyArray;
+ if (nextMethodSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.An_async_iterator_must_have_a_next_method
+ : ts.Diagnostics.An_iterator_must_have_a_next_method);
+ }
return undefined;
}
- // As an optimization, if the type is instantiated directly using the globalIterableIteratorType (IterableIterator<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIterableIteratorType()) {
- return type.typeArguments[0];
+ var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
- return getElementTypeOfIterable(type, /*errorNode*/ undefined) ||
- getElementTypeOfIterator(type, /*errorNode*/ undefined);
- }
- /**
- * This function does the following steps:
- * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents.
- * 2. Take the element types of the array constituents.
- * 3. Return the union of the element types, and string if there was a string constituent.
- *
- * For example:
- * string -> string
- * number[] -> number
- * string[] | number[] -> string | number
- * string | number[] -> string | number
- * string | string[] | number[] -> string | number
- *
- * It also errors if:
- * 1. Some constituent is neither a string nor an array.
- * 2. Some constituent is a string and target is less than ES5 (because in ES3 string is not indexable).
- */
- function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
- ts.Debug.assert(languageVersion < 2 /* ES2015 */);
- var arrayType = arrayOrStringType;
- if (arrayOrStringType.flags & 65536 /* Union */) {
- // After we remove all types that are StringLike, we will know if there was a string constituent
- // based on whether the result of filter is a new array.
- var arrayTypes = arrayOrStringType.types;
- var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178 /* StringLike */); });
- if (filteredTypes !== arrayTypes) {
- arrayType = getUnionType(filteredTypes, /*subtypeReduction*/ true);
- }
- }
- else if (arrayOrStringType.flags & 262178 /* StringLike */) {
- arrayType = neverType;
- }
- var hasStringConstituent = arrayOrStringType !== arrayType;
- var reportedError = false;
- if (hasStringConstituent) {
- if (languageVersion < 1 /* ES5 */) {
- error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
- reportedError = true;
- }
- // Now that we've removed all the StringLike types, if no constituents remain, then the entire
- // arrayOrStringType was a string.
- if (arrayType.flags & 8192 /* Never */) {
- return stringType;
+ // For an async iterator, we must get the awaited type of the return type.
+ if (isAsyncIterator) {
+ nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
}
- if (!isArrayLikeType(arrayType)) {
- if (!reportedError) {
- // Which error we report depends on whether there was a string constituent. For example,
- // if the input type is number | string, we want to say that number is not an array type.
- // But if the input was just number, we want to say that number is not an array type
- // or a string type.
- var diagnostic = hasStringConstituent
- ? ts.Diagnostics.Type_0_is_not_an_array_type
- : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
- error(errorNode, diagnostic, typeToString(arrayType));
+ var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value");
+ if (!nextValue) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property
+ : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
}
- return hasStringConstituent ? stringType : unknownType;
+ return undefined;
}
- var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */) || unknownType;
- if (hasStringConstituent) {
- // This is just an optimization for the case where arrayOrStringType is string | string[]
- if (arrayElementType.flags & 262178 /* StringLike */) {
- return stringType;
- }
- return getUnionType([arrayElementType, stringType], /*subtypeReduction*/ true);
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue
+ : typeAsIterator.iteratedTypeOfIterator = nextValue;
+ }
+ /**
+ * A generator may have a return type of `Iterator<T>`, `Iterable<T>`, or
+ * `IterableIterator<T>`. An async generator may have a return type of `AsyncIterator<T>`,
+ * `AsyncIterable<T>`, or `AsyncIterableIterator<T>`. This function can be used to extract
+ * the iterated type from this return type for contextual typing and verifying signatures.
+ */
+ function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) {
+ if (isTypeAny(returnType)) {
+ return undefined;
}
- return arrayElementType;
+ return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, isAsyncGenerator, /*allowNonAsyncIterables*/ false, /*checkAssignability*/ false)
+ || getIteratedTypeOfIterator(returnType, /*errorNode*/ undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
// Grammar checking
@@ -40019,10 +43476,12 @@ var ts;
// TODO: Check that target label is valid
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 151 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 152 /* SetAccessor */)));
+ return !!(node.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153 /* SetAccessor */)));
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType;
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ ? getPromisedTypeOfPromise(returnType) // Async function
+ : returnType; // AsyncGenerator function, Generator function, or normal function
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 /* Void */ | 1 /* Any */);
}
function checkReturnStatement(node) {
@@ -40039,40 +43498,41 @@ var ts;
var returnType = getReturnTypeOfSignature(signature);
if (strictNullChecks || node.expression || returnType.flags & 8192 /* Never */) {
var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
- if (func.asteriskToken) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1 /* Generator */) {
// A generator does not need its return expressions checked against its return type.
// Instead, the yield expressions are checked against the element type.
// TODO: Check return expressions of generators when return type tracking is added
// for generators.
return;
}
- if (func.kind === 152 /* SetAccessor */) {
+ if (func.kind === 153 /* SetAccessor */) {
if (node.expression) {
- error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
+ error(node, ts.Diagnostics.Setters_cannot_return_a_value);
}
}
- else if (func.kind === 150 /* Constructor */) {
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) {
- error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
+ else if (func.kind === 151 /* Constructor */) {
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
+ error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
}
}
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
- if (ts.isAsyncFunctionLike(func)) {
- var promisedType = getPromisedType(returnType);
- var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (functionFlags & 2 /* Async */) {
+ var promisedType = getPromisedTypeOfPromise(returnType);
+ var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (promisedType) {
// If the function has a return type, but promisedType is
// undefined, an error will be reported in checkAsyncFunctionReturnType
// so we don't need to report one here.
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node);
+ checkTypeAssignableTo(awaitedType, promisedType, node);
}
}
else {
- checkTypeAssignableTo(exprType, returnType, node.expression || node);
+ checkTypeAssignableTo(exprType, returnType, node);
}
}
}
- else if (func.kind !== 150 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+ else if (func.kind !== 151 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
// The function has a return type, but the return statement doesn't have an expression.
error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
@@ -40081,7 +43541,7 @@ var ts;
function checkWithStatement(node) {
// Grammar checking for withStatement
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.flags & 524288 /* AwaitContext */) {
+ if (node.flags & 16384 /* AwaitContext */) {
grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);
}
}
@@ -40102,7 +43562,7 @@ var ts;
var expressionIsLiteral = isLiteralType(expressionType);
ts.forEach(node.caseBlock.clauses, function (clause) {
// Grammar check for duplicate default clauses, skip if we already report duplicate default clause
- if (clause.kind === 254 /* DefaultClause */ && !hasDuplicateDefaultClause) {
+ if (clause.kind === 257 /* DefaultClause */ && !hasDuplicateDefaultClause) {
if (firstDefaultClause === undefined) {
firstDefaultClause = clause;
}
@@ -40114,7 +43574,7 @@ var ts;
hasDuplicateDefaultClause = true;
}
}
- if (produceDiagnostics && clause.kind === 253 /* CaseClause */) {
+ if (produceDiagnostics && clause.kind === 256 /* CaseClause */) {
var caseClause = clause;
// TypeScript 1.0 spec (April 2014): 5.9
// In a 'switch' statement, each 'case' expression must be of a type that is comparable
@@ -40140,18 +43600,16 @@ var ts;
function checkLabeledStatement(node) {
// Grammar checking
if (!checkGrammarStatementInAmbientContext(node)) {
- var current = node.parent;
- while (current) {
+ ts.findAncestor(node.parent, function (current) {
if (ts.isFunctionLike(current)) {
- break;
+ return "quit";
}
- if (current.kind === 219 /* LabeledStatement */ && current.label.text === node.label.text) {
+ if (current.kind === 221 /* LabeledStatement */ && current.label.text === node.label.text) {
var sourceFile = ts.getSourceFileOfNode(node);
grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
- break;
+ return true;
}
- current = current.parent;
- }
+ });
}
// ensure that label is unique
checkSourceElement(node.statement);
@@ -40182,14 +43640,14 @@ var ts;
grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
}
else {
- var blockLocals = catchClause.block.locals;
- if (blockLocals) {
- for (var caughtName in catchClause.locals) {
- var blockLocal = blockLocals[caughtName];
+ var blockLocals_1 = catchClause.block.locals;
+ if (blockLocals_1) {
+ ts.forEachKey(catchClause.locals, function (caughtName) {
+ var blockLocal = blockLocals_1.get(caughtName);
if (blockLocal && (blockLocal.flags & 2 /* BlockScopedVariable */) !== 0) {
grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
}
- }
+ });
}
}
}
@@ -40241,15 +43699,16 @@ var ts;
if (!indexType) {
return;
}
+ var propDeclaration = prop.valueDeclaration;
// index is numeric and property name is not valid numeric literal
- if (indexKind === 1 /* Number */ && !isNumericName(prop.valueDeclaration.name)) {
+ if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
return;
}
// perform property check if property or indexer is declared in 'type'
// this allows to rule out cases when both property and indexer are inherited from the base class
var errorNode;
- if (prop.valueDeclaration.name.kind === 142 /* ComputedPropertyName */ || prop.parent === containingType.symbol) {
- errorNode = prop.valueDeclaration;
+ if (propDeclaration && (propDeclaration.name.kind === 143 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) {
+ errorNode = propDeclaration;
}
else if (indexDeclaration) {
errorNode = indexDeclaration;
@@ -40279,16 +43738,26 @@ var ts;
case "string":
case "symbol":
case "void":
+ case "object":
error(name, message, name.text);
}
}
- /** Check each type parameter and check that type parameters have no duplicate type parameter declarations */
+ /**
+ * Check each type parameter and check that type parameters have no duplicate type parameter declarations
+ */
function checkTypeParameters(typeParameterDeclarations) {
if (typeParameterDeclarations) {
- for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
+ var seenDefault = false;
+ for (var i = 0; i < typeParameterDeclarations.length; i++) {
var node = typeParameterDeclarations[i];
checkTypeParameter(node);
if (produceDiagnostics) {
+ if (node.default) {
+ seenDefault = true;
+ }
+ else if (seenDefault) {
+ error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
+ }
for (var j = 0; j < i; j++) {
if (typeParameterDeclarations[j].symbol === node.symbol) {
error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
@@ -40299,22 +43768,64 @@ var ts;
}
}
/** Check that type parameter lists are identical across multiple declarations */
- function checkTypeParameterListsIdentical(node, symbol) {
+ function checkTypeParameterListsIdentical(symbol) {
if (symbol.declarations.length === 1) {
return;
}
- var firstDecl;
- for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 226 /* ClassDeclaration */ || declaration.kind === 227 /* InterfaceDeclaration */) {
- if (!firstDecl) {
- firstDecl = declaration;
+ var links = getSymbolLinks(symbol);
+ if (!links.typeParametersChecked) {
+ links.typeParametersChecked = true;
+ var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
+ if (declarations.length <= 1) {
+ return;
+ }
+ var type = getDeclaredTypeOfSymbol(symbol);
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
+ // Report an error on every conflicting declaration.
+ var name = symbolToString(symbol);
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
+ var declaration = declarations_6[_i];
+ error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
+ }
+ }
+ }
+ }
+ function areTypeParametersIdentical(declarations, typeParameters) {
+ var maxTypeArgumentCount = ts.length(typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
+ var declaration = declarations_7[_i];
+ // If this declaration has too few or too many type parameters, we report an error
+ var numTypeParameters = ts.length(declaration.typeParameters);
+ if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
+ return false;
+ }
+ for (var i = 0; i < numTypeParameters; i++) {
+ var source = declaration.typeParameters[i];
+ var target = typeParameters[i];
+ // If the type parameter node does not have the same as the resolved type
+ // parameter at this position, we report an error.
+ if (source.name.text !== target.symbol.name) {
+ return false;
}
- else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) {
- error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text);
+ // If the type parameter node does not have an identical constraint as the resolved
+ // type parameter at this position, we report an error.
+ var sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint);
+ var targetConstraint = getConstraintFromTypeParameter(target);
+ if ((sourceConstraint || targetConstraint) &&
+ (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) {
+ return false;
+ }
+ // If the type parameter node has a default and it is not identical to the default
+ // for the type parameter at this position, we report an error.
+ var sourceDefault = source.default && getTypeFromTypeNode(source.default);
+ var targetDefault = getDefaultFromTypeParameter(target);
+ if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {
+ return false;
}
}
}
+ return true;
}
function checkClassExpression(node) {
checkClassLikeDeclaration(node);
@@ -40334,11 +43845,12 @@ var ts;
registerForUnusedIdentifiersCheck(node);
}
function checkClassLikeDeclaration(node) {
- checkGrammarClassDeclarationHeritageClauses(node);
+ checkGrammarClassLikeDeclaration(node);
checkDecorators(node);
if (node.name) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -40348,19 +43860,27 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
var staticType = getTypeOfSymbol(symbol);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
checkClassForDuplicateDeclarations(node);
+ // Only check for reserved static identifiers on non-ambient context.
+ if (!ts.isInAmbientContext(node)) {
+ checkClassForStaticPropertyNameConflicts(node);
+ }
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(baseTypeNode.parent, 1 /* Extends */);
+ }
var baseTypes = getBaseTypes(type);
if (baseTypes.length && produceDiagnostics) {
var baseType_1 = baseTypes[0];
- var staticBaseType = getBaseConstructorTypeOfClass(type);
+ var baseConstructorType = getBaseConstructorTypeOfClass(type);
+ var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
if (baseTypeNode.typeArguments) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
- for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
if (!checkTypeArgumentConstraints(constructor.typeParameters, baseTypeNode.typeArguments)) {
break;
@@ -40369,19 +43889,15 @@ var ts;
}
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
- if (baseType_1.symbol.valueDeclaration &&
- !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration) &&
- baseType_1.symbol.valueDeclaration.kind === 226 /* ClassDeclaration */) {
- if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) {
- error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class);
- }
+ if (baseConstructorType.flags & 540672 /* TypeVariable */ && !isMixinConstructorType(staticType)) {
+ error(node.name || node, ts.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
}
- if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */)) {
+ if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 540672 /* TypeVariable */)) {
// When the static base type is a "class-like" constructor function (but not actually a class), we verify
// that all instantiated base constructor signatures return the same type. We can simply compare the type
// references (as opposed to checking the structure of the types) because elsewhere we have already checked
// that the base type is a class or interface type (and not, for example, an anonymous object type).
- var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);
if (ts.forEach(constructors, function (sig) { return getReturnTypeOfSignature(sig) !== baseType_1; })) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructors_must_all_have_the_same_return_type);
}
@@ -40400,8 +43916,7 @@ var ts;
if (produceDiagnostics) {
var t = getTypeFromTypeNode(typeRefNode);
if (t !== unknownType) {
- var declaredType = getObjectFlags(t) & 4 /* Reference */ ? t.target : t;
- if (getObjectFlags(declaredType) & 3 /* ClassOrInterface */) {
+ if (isValidBaseType(t)) {
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
}
else {
@@ -40431,11 +43946,16 @@ var ts;
function getTargetSymbol(s) {
// if symbol is instantiated its flags are not copied from the 'target'
// so we'll need to get back original 'target' symbol to work with correct set of flags
- return s.flags & 16777216 /* Instantiated */ ? getSymbolLinks(s).target : s;
+ return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
+ function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
+ return ts.filter(symbol.declarations, function (d) {
+ return d.kind === 228 /* ClassDeclaration */ || d.kind === 229 /* InterfaceDeclaration */;
+ });
+ }
function checkKindsOfPropertyMemberOverrides(type, baseType) {
// TypeScript 1.0 spec (April 2014): 8.2.3
// A derived class inherits all members from its base class it doesn't override.
@@ -40451,11 +43971,11 @@ var ts;
// Base class instance member variables and accessors can be overridden by
// derived class instance member variables and accessors, but not by other kinds of members.
// NOTE: assignability is checked in checkClassDeclaration
- var baseProperties = getPropertiesOfObjectType(baseType);
+ var baseProperties = getPropertiesOfType(baseType);
for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
var baseProperty = baseProperties_1[_i];
var base = getTargetSymbol(baseProperty);
- if (base.flags & 134217728 /* Prototype */) {
+ if (base.flags & 16777216 /* Prototype */) {
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
@@ -40472,7 +43992,7 @@ var ts;
// If there is no declaration for the derived class (as in the case of class expressions),
// then the class cannot be declared abstract.
if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128 /* Abstract */))) {
- if (derivedClassDecl.kind === 197 /* ClassExpression */) {
+ if (derivedClassDecl.kind === 198 /* ClassExpression */) {
error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
}
else {
@@ -40483,7 +44003,7 @@ var ts;
else {
// derived overrides base.
var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
- if ((baseDeclarationFlags & 8 /* Private */) || (derivedDeclarationFlags & 8 /* Private */)) {
+ if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) {
// either base or derived property is private - not override, skip it
continue;
}
@@ -40491,64 +44011,32 @@ var ts;
// value of 'static' is not the same for properties - not override, skip it
continue;
}
- if ((base.flags & derived.flags & 8192 /* Method */) || ((base.flags & 98308 /* PropertyOrAccessor */) && (derived.flags & 98308 /* PropertyOrAccessor */))) {
+ if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 /* PropertyOrAccessor */ && derived.flags & 98308 /* PropertyOrAccessor */) {
// method is overridden with method or property/accessor is overridden with property/accessor - correct case
continue;
}
var errorMessage = void 0;
- if (base.flags & 8192 /* Method */) {
+ if (isMethodLike(base)) {
if (derived.flags & 98304 /* Accessor */) {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
}
else {
- ts.Debug.assert((derived.flags & 4 /* Property */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
}
}
else if (base.flags & 4 /* Property */) {
- ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
}
else {
- ts.Debug.assert((base.flags & 98304 /* Accessor */) !== 0);
- ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
function isAccessor(kind) {
- return kind === 151 /* GetAccessor */ || kind === 152 /* SetAccessor */;
- }
- function areTypeParametersIdentical(list1, list2) {
- if (!list1 && !list2) {
- return true;
- }
- if (!list1 || !list2 || list1.length !== list2.length) {
- return false;
- }
- // TypeScript 1.0 spec (April 2014):
- // When a generic interface has multiple declarations, all declarations must have identical type parameter
- // lists, i.e. identical type parameter names with identical constraints in identical order.
- for (var i = 0, len = list1.length; i < len; i++) {
- var tp1 = list1[i];
- var tp2 = list2[i];
- if (tp1.name.text !== tp2.name.text) {
- return false;
- }
- if (!tp1.constraint && !tp2.constraint) {
- continue;
- }
- if (!tp1.constraint || !tp2.constraint) {
- return false;
- }
- if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
- return false;
- }
- }
- return true;
+ return kind === 152 /* GetAccessor */ || kind === 153 /* SetAccessor */;
}
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
@@ -40556,16 +44044,16 @@ var ts;
return true;
}
var seen = ts.createMap();
- ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
+ ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.name, { prop: p, containingType: type }); });
var ok = true;
for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
var base = baseTypes_2[_i];
- var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType));
- for (var _a = 0, properties_6 = properties; _a < properties_6.length; _a++) {
- var prop = properties_6[_a];
- var existing = seen[prop.name];
+ var properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
+ for (var _a = 0, properties_8 = properties; _a < properties_8.length; _a++) {
+ var prop = properties_8[_a];
+ var existing = seen.get(prop.name);
if (!existing) {
- seen[prop.name] = { prop: prop, containingType: base };
+ seen.set(prop.name, { prop: prop, containingType: base });
}
else {
var isInheritedProperty = existing.containingType !== type;
@@ -40573,7 +44061,7 @@ var ts;
ok = false;
var typeName1 = typeToString(existing.containingType);
var typeName2 = typeToString(base);
- var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2);
+ var errorInfo = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2);
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);
diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(typeNode, errorInfo));
}
@@ -40590,9 +44078,9 @@ var ts;
checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
checkExportsOnMergedDeclarations(node);
var symbol = getSymbolOfNode(node);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
// Only check this symbol once
- var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 227 /* InterfaceDeclaration */);
+ var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */);
if (node === firstInterfaceDecl) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
@@ -40699,7 +44187,7 @@ var ts;
return value;
function evalConstant(e) {
switch (e.kind) {
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
var value_1 = evalConstant(e.operand);
if (value_1 === undefined) {
return undefined;
@@ -40710,7 +44198,7 @@ var ts;
case 51 /* TildeToken */: return ~value_1;
}
return undefined;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
var left = evalConstant(e.left);
if (left === undefined) {
return undefined;
@@ -40734,12 +44222,13 @@ var ts;
}
return undefined;
case 8 /* NumericLiteral */:
+ checkGrammarNumericLiteral(e);
return +e.text;
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return evalConstant(e.expression);
case 70 /* Identifier */:
- case 178 /* ElementAccessExpression */:
- case 177 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
var member = initializer.parent;
var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
var enumType_1;
@@ -40752,7 +44241,7 @@ var ts;
}
else {
var expression = void 0;
- if (e.kind === 178 /* ElementAccessExpression */) {
+ if (e.kind === 179 /* ElementAccessExpression */) {
if (e.argumentExpression === undefined ||
e.argumentExpression.kind !== 9 /* StringLiteral */) {
return undefined;
@@ -40770,7 +44259,7 @@ var ts;
if (current.kind === 70 /* Identifier */) {
break;
}
- else if (current.kind === 177 /* PropertyAccessExpression */) {
+ else if (current.kind === 178 /* PropertyAccessExpression */) {
current = current.expression;
}
else {
@@ -40814,6 +44303,7 @@ var ts;
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
checkExportsOnMergedDeclarations(node);
@@ -40842,7 +44332,7 @@ var ts;
var seenEnumMissingInitialInitializer_1 = false;
ts.forEach(enumSymbol.declarations, function (declaration) {
// return true if we hit a violation of the rule, false otherwise
- if (declaration.kind !== 229 /* EnumDeclaration */) {
+ if (declaration.kind !== 231 /* EnumDeclaration */) {
return false;
}
var enumDeclaration = declaration;
@@ -40863,10 +44353,10 @@ var ts;
}
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
- var declaration = declarations_5[_i];
- if ((declaration.kind === 226 /* ClassDeclaration */ ||
- (declaration.kind === 225 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) &&
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+ var declaration = declarations_8[_i];
+ if ((declaration.kind === 228 /* ClassDeclaration */ ||
+ (declaration.kind === 227 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) &&
!ts.isInAmbientContext(declaration)) {
return declaration;
}
@@ -40930,7 +44420,7 @@ var ts;
}
// if the module merges with a class declaration in the same lexical scope,
// we need to track this to ensure the correct emit.
- var mergedClass = ts.getDeclarationOfKind(symbol, 226 /* ClassDeclaration */);
+ var mergedClass = ts.getDeclarationOfKind(symbol, 228 /* ClassDeclaration */);
if (mergedClass &&
inSameLexicalScope(node, mergedClass)) {
getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */;
@@ -40943,7 +44433,7 @@ var ts;
// We can detect if augmentation was applied using following rules:
// - augmentation for a global scope is always applied
// - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module).
- var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432 /* Merged */);
+ var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 134217728 /* Transient */);
if (checkBody && node.body) {
// body of ambient external module is always a module block
for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) {
@@ -40981,39 +44471,39 @@ var ts;
}
function checkModuleAugmentationElement(node, isGlobalAugmentation) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// error each individual name in variable statement instead of marking the entire variable statement
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
checkModuleAugmentationElement(decl, isGlobalAugmentation);
}
break;
- case 240 /* ExportAssignment */:
- case 241 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 243 /* ExportDeclaration */:
grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
break;
- case 234 /* ImportEqualsDeclaration */:
- case 235 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 237 /* ImportDeclaration */:
grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
break;
- case 174 /* BindingElement */:
- case 223 /* VariableDeclaration */:
- var name_25 = node.name;
- if (ts.isBindingPattern(name_25)) {
- for (var _b = 0, _c = name_25.elements; _b < _c.length; _b++) {
+ case 175 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ var name = node.name;
+ if (ts.isBindingPattern(name)) {
+ for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
var el = _c[_b];
// mark individual names in binding pattern
checkModuleAugmentationElement(el, isGlobalAugmentation);
}
break;
}
- // fallthrough
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ // falls through
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
if (isGlobalAugmentation) {
return;
}
@@ -41023,7 +44513,7 @@ var ts;
// this is done it two steps
// 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error
// 2. main check - report error if value declaration of the parent symbol is module augmentation)
- var reportError = !(symbol.flags & 33554432 /* Merged */);
+ var reportError = !(symbol.flags & 134217728 /* Transient */);
if (!reportError) {
// symbol should not originate in augmentation
reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
@@ -41036,12 +44526,12 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return node;
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
do {
node = node.left;
} while (node.kind !== 70 /* Identifier */);
return node;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
do {
node = node.expression;
} while (node.kind !== 70 /* Identifier */);
@@ -41054,9 +44544,9 @@ var ts;
error(moduleName, ts.Diagnostics.String_literal_expected);
return false;
}
- var inAmbientExternalModule = node.parent.kind === 231 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 /* SourceFile */ && !inAmbientExternalModule) {
- error(moduleName, node.kind === 241 /* ExportDeclaration */ ?
+ var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
+ if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule) {
+ error(moduleName, node.kind === 243 /* ExportDeclaration */ ?
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
return false;
@@ -41089,7 +44579,7 @@ var ts;
(symbol.flags & 793064 /* Type */ ? 793064 /* Type */ : 0) |
(symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);
if (target.flags & excludedMeanings) {
- var message = node.kind === 243 /* ExportSpecifier */ ?
+ var message = node.kind === 245 /* ExportSpecifier */ ?
ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
@@ -41117,7 +44607,7 @@ var ts;
checkImportBinding(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause.namedBindings.kind === 239 /* NamespaceImport */) {
checkImportBinding(importClause.namedBindings);
}
else {
@@ -41174,8 +44664,10 @@ var ts;
// export { x, y }
// export { x, y } from "foo"
ts.forEach(node.exportClause.elements, checkExportSpecifier);
- var inAmbientExternalModule = node.parent.kind === 231 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 /* SourceFile */ && !inAmbientExternalModule) {
+ var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
+ var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ &&
+ !node.moduleSpecifier && ts.isInAmbientContext(node);
+ if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
}
}
@@ -41189,7 +44681,7 @@ var ts;
}
}
function checkGrammarModuleElementContext(node, errorMessage) {
- var isInAppropriateContext = node.parent.kind === 261 /* SourceFile */ || node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 230 /* ModuleDeclaration */;
+ var isInAppropriateContext = node.parent.kind === 264 /* SourceFile */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 232 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
grammarErrorOnFirstToken(node, errorMessage);
}
@@ -41215,9 +44707,14 @@ var ts;
// If we hit an export assignment in an illegal context, just bail out to avoid cascading errors.
return;
}
- var container = node.parent.kind === 261 /* SourceFile */ ? node.parent : node.parent.parent;
- if (container.kind === 230 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
- error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ var container = node.parent.kind === 264 /* SourceFile */ ? node.parent : node.parent.parent;
+ if (container.kind === 232 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
+ if (node.isExportEquals) {
+ error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ }
+ else {
+ error(node, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
+ }
return;
}
// Grammar checking
@@ -41243,18 +44740,13 @@ var ts;
}
}
function hasExportedMembers(moduleSymbol) {
- for (var id in moduleSymbol.exports) {
- if (id !== "export=") {
- return true;
- }
- }
- return false;
+ return ts.forEachEntry(moduleSymbol.exports, function (_, id) { return id !== "export="; });
}
function checkExternalModuleExports(node) {
var moduleSymbol = getSymbolOfNode(node);
var links = getSymbolLinks(moduleSymbol);
if (!links.exportsChecked) {
- var exportEqualsSymbol = moduleSymbol.exports["export="];
+ var exportEqualsSymbol = moduleSymbol.exports.get("export=");
if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
if (!isTopLevelInExternalModuleAugmentation(declaration)) {
@@ -41263,35 +44755,35 @@ var ts;
}
// Checks for export * conflicts
var exports = getExportsOfModule(moduleSymbol);
- for (var id in exports) {
+ exports && exports.forEach(function (_a, id) {
+ var declarations = _a.declarations, flags = _a.flags;
if (id === "__export") {
- continue;
+ return;
}
- var _a = exports[id], declarations = _a.declarations, flags = _a.flags;
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
// (TS Exceptions: namespaces, function overloads, enums, and interfaces)
if (flags & (1920 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) {
- continue;
+ return;
}
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload);
if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) {
// it is legal to merge type alias with other values
// so count should be either 1 (just type alias) or 2 (type alias + merged value)
- continue;
+ return;
}
if (exportedDeclarationsCount > 1) {
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
- var declaration = declarations_6[_i];
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+ var declaration = declarations_9[_i];
if (isNotOverload(declaration)) {
diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id));
}
}
}
- }
+ });
links.exportsChecked = true;
}
function isNotOverload(declaration) {
- return (declaration.kind !== 225 /* FunctionDeclaration */ && declaration.kind !== 149 /* MethodDeclaration */) ||
+ return (declaration.kind !== 227 /* FunctionDeclaration */ && declaration.kind !== 150 /* MethodDeclaration */) ||
!!declaration.body;
}
}
@@ -41304,123 +44796,123 @@ var ts;
// Only bother checking on a few construct kinds. We don't want to be excessively
// hitting the cancellation token on every node we check.
switch (kind) {
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
cancellationToken.throwIfCancellationRequested();
}
}
switch (kind) {
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return checkTypeParameter(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return checkParameter(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return checkPropertyDeclaration(node);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
return checkSignatureDeclaration(node);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return checkSignatureDeclaration(node);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return checkMethodDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return checkConstructorDeclaration(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return checkAccessorDeclaration(node);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return checkTypeReferenceNode(node);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return checkTypePredicate(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return checkTypeQuery(node);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return checkTypeLiteral(node);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return checkArrayType(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return checkTupleType(node);
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return checkUnionOrIntersectionType(node);
- case 166 /* ParenthesizedType */:
- case 168 /* TypeOperator */:
+ case 167 /* ParenthesizedType */:
+ case 169 /* TypeOperator */:
return checkSourceElement(node.type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return checkIndexedAccessType(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return checkMappedType(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return checkFunctionDeclaration(node);
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return checkBlock(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return checkVariableStatement(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return checkExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return checkIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return checkDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return checkWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return checkForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return checkForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return checkForOfStatement(node);
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
return checkBreakOrContinueStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return checkReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return checkWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return checkSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return checkLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return checkThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return checkTryStatement(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return checkVariableDeclaration(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return checkBindingElement(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return checkClassDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return checkInterfaceDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return checkTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return checkEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return checkModuleDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return checkImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return checkImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return checkExportDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return checkExportAssignment(node);
- case 206 /* EmptyStatement */:
+ case 208 /* EmptyStatement */:
checkGrammarStatementInAmbientContext(node);
return;
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
checkGrammarStatementInAmbientContext(node);
return;
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return checkMissingDeclaration(node);
}
}
@@ -41442,17 +44934,17 @@ var ts;
for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) {
var node = deferredNodes_1[_i];
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
break;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- checkAccessorDeferred(node);
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ checkAccessorDeclaration(node);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
checkClassExpressionDeferred(node);
break;
}
@@ -41477,6 +44969,7 @@ var ts;
// Grammar checking
checkGrammarSourceFile(node);
potentialThisCollisions.length = 0;
+ potentialNewTargetCollisions.length = 0;
deferredNodes = [];
deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined;
ts.forEach(node.statements, checkSourceElement);
@@ -41496,6 +44989,10 @@ var ts;
ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
potentialThisCollisions.length = 0;
}
+ if (potentialNewTargetCollisions.length) {
+ ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
+ potentialNewTargetCollisions.length = 0;
+ }
links.flags |= 1 /* TypeChecked */;
}
}
@@ -41553,7 +45050,7 @@ var ts;
function isInsideWithStatementBody(node) {
if (node) {
while (node.parent) {
- if (node.parent.kind === 217 /* WithStatement */ && node.parent.statement === node) {
+ if (node.parent.kind === 219 /* WithStatement */ && node.parent.statement === node) {
return true;
}
node = node.parent;
@@ -41562,12 +45059,12 @@ var ts;
return false;
}
function getSymbolsInScope(location, meaning) {
- var symbols = ts.createMap();
- var memberFlags = 0 /* None */;
if (isInsideWithStatementBody(location)) {
// We cannot answer semantic questions within a with block, do not proceed any further
return [];
}
+ var symbols = ts.createMap();
+ var memberFlags = 0 /* None */;
populateSymbols();
return symbolsToArray(symbols);
function populateSymbols() {
@@ -41576,25 +45073,27 @@ var ts;
copySymbols(location.locals, meaning);
}
switch (location.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230 /* ModuleDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */);
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
var className = location.name;
if (className) {
copySymbol(location.symbol, meaning);
}
- // fall through; this fall-through is necessary because we would like to handle
+ // falls through
+ // this fall-through is necessary because we would like to handle
// type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
// If we didn't come from static member of class or interface,
// add the type parameters into the symbol table
// (type parameters of classDeclaration/classExpression and interface are in member property of the symbol.
@@ -41603,7 +45102,7 @@ var ts;
copySymbols(getSymbolOfNode(location).members, meaning & 793064 /* Type */);
}
break;
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
var funcName = location.name;
if (funcName) {
copySymbol(location.symbol, meaning);
@@ -41631,17 +45130,16 @@ var ts;
// We will copy all symbol regardless of its reserved name because
// symbolsToArray will check whether the key is a reserved name and
// it will not copy symbol with reserved name to the array
- if (!symbols[id]) {
- symbols[id] = symbol;
+ if (!symbols.has(id)) {
+ symbols.set(id, symbol);
}
}
}
function copySymbols(source, meaning) {
if (meaning) {
- for (var id in source) {
- var symbol = source[id];
+ source.forEach(function (symbol) {
copySymbol(symbol, meaning);
- }
+ });
}
}
}
@@ -41652,28 +45150,28 @@ var ts;
}
function isTypeDeclaration(node) {
switch (node.kind) {
- case 143 /* TypeParameter */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 144 /* TypeParameter */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
return true;
}
}
// True if the given identifier is part of a type reference
function isTypeReferenceIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 141 /* QualifiedName */) {
+ while (node.parent && node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
- return node.parent && (node.parent.kind === 157 /* TypeReference */ || node.parent.kind === 272 /* JSDocTypeReference */);
+ return node.parent && (node.parent.kind === 158 /* TypeReference */ || node.parent.kind === 276 /* JSDocTypeReference */);
}
function isHeritageClauseElementIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 177 /* PropertyAccessExpression */) {
+ while (node.parent && node.parent.kind === 178 /* PropertyAccessExpression */) {
node = node.parent;
}
- return node.parent && node.parent.kind === 199 /* ExpressionWithTypeArguments */;
+ return node.parent && node.parent.kind === 200 /* ExpressionWithTypeArguments */;
}
function forEachEnclosingClass(node, callback) {
var result;
@@ -41690,13 +45188,13 @@ var ts;
return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
}
function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
- while (nodeOnRightSide.parent.kind === 141 /* QualifiedName */) {
+ while (nodeOnRightSide.parent.kind === 142 /* QualifiedName */) {
nodeOnRightSide = nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ if (nodeOnRightSide.parent.kind === 236 /* ImportEqualsDeclaration */) {
return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 240 /* ExportAssignment */) {
+ if (nodeOnRightSide.parent.kind === 242 /* ExportAssignment */) {
return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
}
return undefined;
@@ -41704,29 +45202,38 @@ var ts;
function isInRightSideOfImportOrExportAssignment(node) {
return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
}
+ function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {
+ var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
+ switch (specialPropertyAssignmentKind) {
+ case 1 /* ExportsProperty */:
+ case 3 /* PrototypeProperty */:
+ return getSymbolOfNode(entityName.parent);
+ case 4 /* ThisProperty */:
+ case 2 /* ModuleExports */:
+ case 5 /* Property */:
+ return getSymbolOfNode(entityName.parent.parent);
+ }
+ }
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
if (ts.isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
}
- if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 177 /* PropertyAccessExpression */) {
- var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
- switch (specialPropertyAssignmentKind) {
- case 1 /* ExportsProperty */:
- case 3 /* PrototypeProperty */:
- return getSymbolOfNode(entityName.parent);
- case 4 /* ThisProperty */:
- case 2 /* ModuleExports */:
- return getSymbolOfNode(entityName.parent.parent);
- default:
+ if (ts.isInJavaScriptFile(entityName) &&
+ entityName.parent.kind === 178 /* PropertyAccessExpression */ &&
+ entityName.parent === entityName.parent.parent.left) {
+ // Check if this is a special property assignment
+ var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
+ if (specialPropertyAssignmentSymbol) {
+ return specialPropertyAssignmentSymbol;
}
}
- if (entityName.parent.kind === 240 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) {
+ if (entityName.parent.kind === 242 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) {
return resolveEntityName(entityName,
/*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
}
- if (entityName.kind !== 177 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) {
+ if (entityName.kind !== 178 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) {
// Since we already checked for ExportAssignment, this really could only be an Import
- var importEqualsDeclaration = ts.getAncestor(entityName, 234 /* ImportEqualsDeclaration */);
+ var importEqualsDeclaration = ts.getAncestor(entityName, 236 /* ImportEqualsDeclaration */);
ts.Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, /*dontResolveAlias*/ true);
}
@@ -41736,7 +45243,7 @@ var ts;
if (isHeritageClauseElementIdentifier(entityName)) {
var meaning = 0 /* None */;
// In an interface or class, we're definitely interested in a type.
- if (entityName.parent.kind === 199 /* ExpressionWithTypeArguments */) {
+ if (entityName.parent.kind === 200 /* ExpressionWithTypeArguments */) {
meaning = 793064 /* Type */;
// In a class 'extends' clause we are also looking for a value.
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
@@ -41747,9 +45254,12 @@ var ts;
meaning = 1920 /* Namespace */;
}
meaning |= 8388608 /* Alias */;
- return resolveEntityName(entityName, meaning);
+ var entityNameSymbol = resolveEntityName(entityName, meaning);
+ if (entityNameSymbol) {
+ return entityNameSymbol;
+ }
}
- else if (ts.isPartOfExpression(entityName)) {
+ if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
// Missing entity name.
return undefined;
@@ -41760,14 +45270,14 @@ var ts;
}
return resolveEntityName(entityName, 107455 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true);
}
- else if (entityName.kind === 177 /* PropertyAccessExpression */) {
+ else if (entityName.kind === 178 /* PropertyAccessExpression */) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkPropertyAccessExpression(entityName);
}
return getNodeLinks(entityName).resolvedSymbol;
}
- else if (entityName.kind === 141 /* QualifiedName */) {
+ else if (entityName.kind === 142 /* QualifiedName */) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkQualifiedName(entityName);
@@ -41776,20 +45286,20 @@ var ts;
}
}
else if (isTypeReferenceIdentifier(entityName)) {
- var meaning = (entityName.parent.kind === 157 /* TypeReference */ || entityName.parent.kind === 272 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */;
+ var meaning = (entityName.parent.kind === 158 /* TypeReference */ || entityName.parent.kind === 276 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */;
return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true);
}
- else if (entityName.parent.kind === 250 /* JsxAttribute */) {
+ else if (entityName.parent.kind === 252 /* JsxAttribute */) {
return getJsxAttributePropertySymbol(entityName.parent);
}
- if (entityName.parent.kind === 156 /* TypePredicate */) {
+ if (entityName.parent.kind === 157 /* TypePredicate */) {
return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */);
}
// Do we want to return undefined here?
return undefined;
}
function getSymbolAtLocation(node) {
- if (node.kind === 261 /* SourceFile */) {
+ if (node.kind === 264 /* SourceFile */) {
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
}
if (isInsideWithStatementBody(node)) {
@@ -41807,8 +45317,8 @@ var ts;
if (isInRightSideOfImportOrExportAssignment(node)) {
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
}
- else if (node.parent.kind === 174 /* BindingElement */ &&
- node.parent.parent.kind === 172 /* ObjectBindingPattern */ &&
+ else if (node.parent.kind === 175 /* BindingElement */ &&
+ node.parent.parent.kind === 173 /* ObjectBindingPattern */ &&
node === node.parent.propertyName) {
var typeOfPattern = getTypeOfNode(node.parent.parent);
var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text);
@@ -41819,8 +45329,8 @@ var ts;
}
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
case 98 /* ThisKeyword */:
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
@@ -41830,16 +45340,16 @@ var ts;
return sig.thisParameter;
}
}
- // fallthrough
+ // falls through
case 96 /* SuperKeyword */:
var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node);
return type.symbol;
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
return getTypeFromTypeNode(node).symbol;
case 122 /* ConstructorKeyword */:
// constructor keyword for an overload, should take us to the definition if it exist
var constructorDeclaration = node.parent;
- if (constructorDeclaration && constructorDeclaration.kind === 150 /* Constructor */) {
+ if (constructorDeclaration && constructorDeclaration.kind === 151 /* Constructor */) {
return constructorDeclaration.parent.symbol;
}
return undefined;
@@ -41847,17 +45357,17 @@ var ts;
// External module name in an import declaration
if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 235 /* ImportDeclaration */ || node.parent.kind === 241 /* ExportDeclaration */) &&
+ ((node.parent.kind === 237 /* ImportDeclaration */ || node.parent.kind === 243 /* ExportDeclaration */) &&
node.parent.moduleSpecifier === node)) {
return resolveExternalModuleName(node, node);
}
if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
return resolveExternalModuleName(node, node);
}
- // Fall through
+ // falls through
case 8 /* NumericLiteral */:
// index access
- if (node.parent.kind === 178 /* ElementAccessExpression */ && node.parent.argumentExpression === node) {
+ if (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.argumentExpression === node) {
var objectType = getTypeOfExpression(node.parent.expression);
if (objectType === unknownType)
return undefined;
@@ -41874,7 +45384,7 @@ var ts;
// The function returns a value symbol of an identifier in the short-hand property assignment.
// This is necessary as an identifier in short-hand property assignment can contains two meaning:
// property name and property value.
- if (location && location.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (location && location.kind === 261 /* ShorthandPropertyAssignment */) {
return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */);
}
return undefined;
@@ -41891,7 +45401,13 @@ var ts;
return unknownType;
}
if (ts.isPartOfTypeNode(node)) {
- return getTypeFromTypeNode(node);
+ var typeFromTypeNode = getTypeFromTypeNode(node);
+ if (typeFromTypeNode && ts.isExpressionWithTypeArgumentsInClassImplementsClause(node)) {
+ var containingClass = ts.getContainingClass(node);
+ var classType = getTypeOfNode(containingClass);
+ typeFromTypeNode = getTypeWithThisArgument(typeFromTypeNode, classType.thisType);
+ }
+ return typeFromTypeNode;
}
if (ts.isPartOfExpression(node)) {
return getRegularTypeOfExpression(node);
@@ -41899,7 +45415,10 @@ var ts;
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(node)) {
// A SyntaxKind.ExpressionWithTypeArguments is considered a type node, except when it occurs in the
// extends clause of a class. We handle that case here.
- return getBaseTypes(getDeclaredTypeOfSymbol(getSymbolOfNode(node.parent.parent)))[0];
+ var classNode = ts.getContainingClass(node);
+ var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(classNode));
+ var baseType = getBaseTypes(classType)[0];
+ return baseType && getTypeWithThisArgument(baseType, classType.thisType);
}
if (isTypeDeclaration(node)) {
// In this case, we call getSymbolOfNode instead of getSymbolAtLocation because it is a declaration
@@ -41936,31 +45455,31 @@ var ts;
// [ a ] from
// [a] = [ some array ...]
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) {
- ts.Debug.assert(expr.kind === 176 /* ObjectLiteralExpression */ || expr.kind === 175 /* ArrayLiteralExpression */);
+ ts.Debug.assert(expr.kind === 177 /* ObjectLiteralExpression */ || expr.kind === 176 /* ArrayLiteralExpression */);
// If this is from "for of"
// for ( { a } of elems) {
// }
- if (expr.parent.kind === 213 /* ForOfStatement */) {
- var iteratedType = checkRightHandSideOfForOf(expr.parent.expression);
+ if (expr.parent.kind === 215 /* ForOfStatement */) {
+ var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
// If this is from "for" initializer
// for ({a } = elems[0];.....) { }
- if (expr.parent.kind === 192 /* BinaryExpression */) {
+ if (expr.parent.kind === 193 /* BinaryExpression */) {
var iteratedType = getTypeOfExpression(expr.parent.right);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
// If this is from nested object binding pattern
// for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) {
- if (expr.parent.kind === 257 /* PropertyAssignment */) {
+ if (expr.parent.kind === 260 /* PropertyAssignment */) {
var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent);
return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent);
}
// Array literal assignment - array destructuring pattern
- ts.Debug.assert(expr.parent.kind === 175 /* ArrayLiteralExpression */);
+ ts.Debug.assert(expr.parent.kind === 176 /* ArrayLiteralExpression */);
// [{ property1: p1, property2 }] = elems;
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType);
}
// Gets the property symbol corresponding to the property in destructuring assignment
@@ -41981,9 +45500,9 @@ var ts;
return getRegularTypeOfLiteralType(getTypeOfExpression(expr));
}
/**
- * Gets either the static or instance type of a class element, based on
- * whether the element is declared as "static".
- */
+ * Gets either the static or instance type of a class element, based on
+ * whether the element is declared as "static".
+ */
function getParentTypeOfClassElement(node) {
var classSymbol = getSymbolOfNode(node.parent);
return ts.getModifierFlags(node) & 32 /* Static */
@@ -41997,29 +45516,32 @@ var ts;
var propsByName = createSymbolTable(getPropertiesOfType(type));
if (getSignaturesOfType(type, 0 /* Call */).length || getSignaturesOfType(type, 1 /* Construct */).length) {
ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
- if (!propsByName[p.name]) {
- propsByName[p.name] = p;
+ if (!propsByName.has(p.name)) {
+ propsByName.set(p.name, p);
}
});
}
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (symbol.flags & 268435456 /* SyntheticProperty */) {
+ if (getCheckFlags(symbol) & 6 /* Synthetic */) {
var symbols_3 = [];
- var name_26 = symbol.name;
+ var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
- var symbol = getPropertyOfType(t, name_26);
+ var symbol = getPropertyOfType(t, name_2);
if (symbol) {
symbols_3.push(symbol);
}
});
return symbols_3;
}
- else if (symbol.flags & 67108864 /* Transient */) {
+ else if (symbol.flags & 134217728 /* Transient */) {
if (symbol.leftSpread) {
var links = symbol;
- return [links.leftSpread, links.rightSpread];
+ return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ }
+ if (symbol.syntheticOrigin) {
+ return getRootSymbols(symbol.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -42037,7 +45559,8 @@ var ts;
if (!ts.isGeneratedIdentifier(node)) {
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
- return getReferencedValueSymbol(node) === argumentsSymbol;
+ var isPropertyName_1 = node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node;
+ return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol;
}
}
return false;
@@ -42058,7 +45581,7 @@ var ts;
// otherwise - check if at least one export is value
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & 107455 /* Value */)
- : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue);
+ : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s) {
@@ -42091,20 +45614,16 @@ var ts;
}
symbol = exportSymbol;
}
- var parentSymbol = getParentOfSymbol(symbol);
- if (parentSymbol) {
- if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 261 /* SourceFile */) {
- var symbolFile = parentSymbol.valueDeclaration;
+ var parentSymbol_1 = getParentOfSymbol(symbol);
+ if (parentSymbol_1) {
+ if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 264 /* SourceFile */) {
+ var symbolFile = parentSymbol_1.valueDeclaration;
var referenceFile = ts.getSourceFileOfNode(node);
// If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined.
var symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
- for (var n = node.parent; n; n = n.parent) {
- if (ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
- return n;
- }
- }
+ return ts.findAncestor(node.parent, function (n) { return ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol_1; });
}
}
}
@@ -42150,7 +45669,7 @@ var ts;
// they will not collide with anything
var isDeclaredInLoop = nodeLinks_1.flags & 262144 /* BlockScopedBindingInLoop */;
var inLoopInitializer = ts.isIterationStatement(container, /*lookInLabeledStatements*/ false);
- var inLoopBodyBlock = container.kind === 204 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false);
+ var inLoopBodyBlock = container.kind === 206 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false);
links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
}
else {
@@ -42190,22 +45709,17 @@ var ts;
return false;
}
function isValueAliasDeclaration(node) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- // A synthesized node comes from an emit transformation and is always a value.
- return true;
- }
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
var exportClause = node.exportClause;
return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return node.expression
&& node.expression.kind === 70 /* Identifier */
? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol)
@@ -42215,7 +45729,7 @@ var ts;
}
function isTopLevelValueImportEqualsWithEntityName(node) {
node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration);
- if (node === undefined || node.parent.kind !== 261 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+ if (node === undefined || node.parent.kind !== 264 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
// parent is not source file or it is not reference to internal module
return false;
}
@@ -42236,11 +45750,6 @@ var ts;
return isConstEnumSymbol(s) || s.constEnumOnlyModule;
}
function isReferencedAliasDeclaration(node, checkChildren) {
- node = ts.getParseTreeNode(node);
- // Purely synthesized nodes are always emitted.
- if (node === undefined) {
- return true;
- }
if (ts.isAliasSymbolDeclaration(node)) {
var symbol = getSymbolOfNode(node);
if (symbol && getSymbolLinks(symbol).referenced) {
@@ -42272,16 +45781,30 @@ var ts;
}
return false;
}
+ function isRequiredInitializedParameter(parameter) {
+ return strictNullChecks &&
+ !isOptionalParameter(parameter) &&
+ parameter.initializer &&
+ !(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
+ }
function getNodeCheckFlags(node) {
- node = ts.getParseTreeNode(node);
- return node ? getNodeLinks(node).flags : undefined;
+ return getNodeLinks(node).flags;
}
function getEnumMemberValue(node) {
computeEnumMemberValues(node.parent);
return getNodeLinks(node).enumMemberValue;
}
+ function canHaveConstantValue(node) {
+ switch (node.kind) {
+ case 263 /* EnumMember */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ return true;
+ }
+ return false;
+ }
function getConstantValue(node) {
- if (node.kind === 260 /* EnumMember */) {
+ if (node.kind === 263 /* EnumMember */) {
return getEnumMemberValue(node);
}
var symbol = getNodeLinks(node).resolvedSymbol;
@@ -42299,16 +45822,18 @@ var ts;
function getTypeReferenceSerializationKind(typeName, location) {
// Resolve the symbol as a value to ensure the type can be reached at runtime during emit.
var valueSymbol = resolveEntityName(typeName, 107455 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location);
- var globalPromiseSymbol = tryGetGlobalPromiseConstructorSymbol();
- if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
- return ts.TypeReferenceSerializationKind.Promise;
- }
- var constructorType = valueSymbol ? getTypeOfSymbol(valueSymbol) : undefined;
- if (constructorType && isConstructorType(constructorType)) {
- return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
- }
// Resolve the symbol as a type so that we can provide a more useful hint for the type serializer.
var typeSymbol = resolveEntityName(typeName, 793064 /* Type */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location);
+ if (valueSymbol && valueSymbol === typeSymbol) {
+ var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(/*reportErrors*/ false);
+ if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
+ return ts.TypeReferenceSerializationKind.Promise;
+ }
+ var constructorType = getTypeOfSymbol(valueSymbol);
+ if (constructorType && isConstructorType(constructorType)) {
+ return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
+ }
+ }
// We might not be able to resolve type symbol so use unknown type in that case (eg error case)
if (!typeSymbol) {
return ts.TypeReferenceSerializationKind.ObjectType;
@@ -42354,6 +45879,9 @@ var ts;
var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
+ if (flags & 4096 /* AddUndefined */) {
+ type = includeFalsyTypes(type, 2048 /* Undefined */);
+ }
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
@@ -42368,10 +45896,13 @@ var ts;
var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node));
resolveBaseTypesOfClass(classType);
var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType;
+ if (!baseType.symbol) {
+ writer.reportIllegalExtends();
+ }
getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags);
}
function hasGlobalName(name) {
- return !!globals[name];
+ return globals.has(name);
}
function getReferencedValueSymbol(reference, startInDeclarationContainer) {
var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
@@ -42382,9 +45913,9 @@ var ts;
if (startInDeclarationContainer) {
// When resolving the name of a declaration as a value, we need to start resolution
// at a point outside of the declaration.
- var parent_11 = reference.parent;
- if (ts.isDeclaration(parent_11) && reference === parent_11.name) {
- location = getDeclarationContainer(parent_11);
+ var parent = reference.parent;
+ if (ts.isDeclaration(parent) && reference === parent.name) {
+ location = getDeclarationContainer(parent);
}
}
return resolveName(location, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined);
@@ -42420,34 +45951,48 @@ var ts;
if (resolvedTypeReferenceDirectives) {
// populate reverse mapping: file path -> type reference directive that was resolved to this file
fileToDirective = ts.createFileMap();
- for (var key in resolvedTypeReferenceDirectives) {
- var resolvedDirective = resolvedTypeReferenceDirectives[key];
+ resolvedTypeReferenceDirectives.forEach(function (resolvedDirective, key) {
if (!resolvedDirective) {
- continue;
+ return;
}
var file = host.getSourceFile(resolvedDirective.resolvedFileName);
fileToDirective.set(file.path, key);
- }
+ });
}
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedDeclarationWithCollidingName: getReferencedDeclarationWithCollidingName,
isDeclarationWithCollidingName: isDeclarationWithCollidingName,
- isValueAliasDeclaration: isValueAliasDeclaration,
+ isValueAliasDeclaration: function (node) {
+ node = ts.getParseTreeNode(node);
+ // Synthesized nodes are always treated like values.
+ return node ? isValueAliasDeclaration(node) : true;
+ },
hasGlobalName: hasGlobalName,
- isReferencedAliasDeclaration: isReferencedAliasDeclaration,
- getNodeCheckFlags: getNodeCheckFlags,
+ isReferencedAliasDeclaration: function (node, checkChildren) {
+ node = ts.getParseTreeNode(node);
+ // Synthesized nodes are always treated as referenced.
+ return node ? isReferencedAliasDeclaration(node, checkChildren) : true;
+ },
+ getNodeCheckFlags: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getNodeCheckFlags(node) : undefined;
+ },
isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
+ isRequiredInitializedParameter: isRequiredInitializedParameter,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
- getConstantValue: getConstantValue,
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
collectLinkedAliases: collectLinkedAliases,
getReferencedValueDeclaration: getReferencedValueDeclaration,
getTypeReferenceSerializationKind: getTypeReferenceSerializationKind,
@@ -42470,7 +46015,7 @@ var ts;
// property access can only be used as values
// qualified names can only be used as types\namespaces
// identifiers are treated as values only if they appear in type queries
- var meaning = (node.kind === 177 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node))
+ var meaning = (node.kind === 178 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node))
? 107455 /* Value */ | 1048576 /* ExportValue */
: 793064 /* Type */ | 1920 /* Namespace */;
var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true);
@@ -42513,15 +46058,15 @@ var ts;
// external modules cannot define or contribute to type declaration files
var current = symbol;
while (true) {
- var parent_12 = getParentOfSymbol(current);
- if (parent_12) {
- current = parent_12;
+ var parent = getParentOfSymbol(current);
+ if (parent) {
+ current = parent;
}
else {
break;
}
}
- if (current.valueDeclaration && current.valueDeclaration.kind === 261 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
+ if (current.valueDeclaration && current.valueDeclaration.kind === 264 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
return false;
}
// check that at least one declaration of top level symbol originates from type declaration file
@@ -42541,7 +46086,7 @@ var ts;
if (!moduleSymbol) {
return undefined;
}
- return ts.getDeclarationOfKind(moduleSymbol, 261 /* SourceFile */);
+ return ts.getDeclarationOfKind(moduleSymbol, 264 /* SourceFile */);
}
function initializeTypeChecker() {
// Bind all source files and propagate errors
@@ -42551,8 +46096,6 @@ var ts;
}
// Initialize global symbol table
var augmentations;
- var requestedExternalEmitHelpers = 0;
- var firstFileRequestingExternalHelpers;
for (var _b = 0, _c = host.getSourceFiles(); _b < _c.length; _b++) {
var file = _c[_b];
if (!ts.isExternalOrCommonJsModule(file)) {
@@ -42567,20 +46110,11 @@ var ts;
if (file.symbol && file.symbol.globalExports) {
// Merge in UMD exports with first-in-wins semantics (see #9771)
var source = file.symbol.globalExports;
- for (var id in source) {
- if (!(id in globals)) {
- globals[id] = source[id];
- }
- }
- }
- if ((compilerOptions.isolatedModules || ts.isExternalModule(file)) && !file.isDeclarationFile) {
- var fileRequestedExternalEmitHelpers = file.flags & 64512 /* EmitHelperFlags */;
- if (fileRequestedExternalEmitHelpers) {
- requestedExternalEmitHelpers |= fileRequestedExternalEmitHelpers;
- if (firstFileRequestingExternalHelpers === undefined) {
- firstFileRequestingExternalHelpers = file;
+ source.forEach(function (sourceSymbol, id) {
+ if (!globals.has(id)) {
+ globals.set(id, sourceSymbol);
}
- }
+ });
}
}
if (augmentations) {
@@ -42597,110 +46131,67 @@ var ts;
// Setup global builtins
addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
- getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
+ getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments", /*arity*/ 0, /*reportErrors*/ true);
getSymbolLinks(unknownSymbol).type = unknownType;
// Initialize special types
- globalArrayType = getGlobalType("Array", /*arity*/ 1);
- globalObjectType = getGlobalType("Object");
- globalFunctionType = getGlobalType("Function");
- globalStringType = getGlobalType("String");
- globalNumberType = getGlobalType("Number");
- globalBooleanType = getGlobalType("Boolean");
- globalRegExpType = getGlobalType("RegExp");
- jsxElementType = getExportedTypeFromNamespace("JSX", JsxNames.Element);
- getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
- getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
- getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
- getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
- getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", /*arity*/ 1); });
- getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); });
- getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", /*arity*/ 1); });
- tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064 /* Type */, /*diagnostic*/ undefined) && getGlobalPromiseType(); });
- getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", /*arity*/ 1); });
- getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType);
- getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); });
- tryGetGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalSymbol("Promise", 107455 /* Value */, /*diagnostic*/ undefined) && getGlobalPromiseConstructorSymbol(); });
- getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); });
- getGlobalThenableType = ts.memoize(createThenableType);
- getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); });
- if (languageVersion >= 2 /* ES2015 */) {
- getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); });
- getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", /*arity*/ 1); });
- getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", /*arity*/ 1); });
- getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", /*arity*/ 1); });
- }
- else {
- getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; });
- getGlobalIterableType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; });
- }
+ globalArrayType = getGlobalType("Array", /*arity*/ 1, /*reportErrors*/ true);
+ globalObjectType = getGlobalType("Object", /*arity*/ 0, /*reportErrors*/ true);
+ globalFunctionType = getGlobalType("Function", /*arity*/ 0, /*reportErrors*/ true);
+ globalStringType = getGlobalType("String", /*arity*/ 0, /*reportErrors*/ true);
+ globalNumberType = getGlobalType("Number", /*arity*/ 0, /*reportErrors*/ true);
+ globalBooleanType = getGlobalType("Boolean", /*arity*/ 0, /*reportErrors*/ true);
+ globalRegExpType = getGlobalType("RegExp", /*arity*/ 0, /*reportErrors*/ true);
anyArrayType = createArrayType(anyType);
autoArrayType = createArrayType(autoType);
- var symbol = getGlobalSymbol("ReadonlyArray", 793064 /* Type */, /*diagnostic*/ undefined);
- globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, /*arity*/ 1);
+ globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", /*arity*/ 1);
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
- // If we have specified that we are importing helpers, we should report global
- // errors if we cannot resolve the helpers external module, or if it does not have
- // the necessary helpers exported.
- if (compilerOptions.importHelpers && firstFileRequestingExternalHelpers) {
- // Find the first reference to the helpers module.
- var helpersModule = resolveExternalModule(firstFileRequestingExternalHelpers, ts.externalHelpersModuleNameText, ts.Diagnostics.Cannot_find_module_0,
- /*errorNode*/ undefined);
- // If we found the module, report errors if it does not have the necessary exports.
- if (helpersModule) {
- var exports = helpersModule.exports;
- if (requestedExternalEmitHelpers & 1024 /* HasClassExtends */ && languageVersion < 2 /* ES2015 */) {
- verifyHelperSymbol(exports, "__extends", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 16384 /* HasSpreadAttribute */ &&
- (languageVersion < 5 /* ESNext */ || compilerOptions.jsx === 2 /* React */)) {
- verifyHelperSymbol(exports, "__assign", 107455 /* Value */);
- }
- if (languageVersion < 5 /* ESNext */ && requestedExternalEmitHelpers & 32768 /* HasRestAttribute */) {
- verifyHelperSymbol(exports, "__rest", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 2048 /* HasDecorators */) {
- verifyHelperSymbol(exports, "__decorate", 107455 /* Value */);
- if (compilerOptions.emitDecoratorMetadata) {
- verifyHelperSymbol(exports, "__metadata", 107455 /* Value */);
- }
- }
- if (requestedExternalEmitHelpers & 4096 /* HasParamDecorators */) {
- verifyHelperSymbol(exports, "__param", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 8192 /* HasAsyncFunctions */) {
- verifyHelperSymbol(exports, "__awaiter", 107455 /* Value */);
- if (languageVersion < 2 /* ES2015 */) {
- verifyHelperSymbol(exports, "__generator", 107455 /* Value */);
+ globalThisType = getGlobalTypeOrUndefined("ThisType", /*arity*/ 1);
+ }
+ function checkExternalEmitHelpers(location, helpers) {
+ if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
+ var sourceFile = ts.getSourceFileOfNode(location);
+ if (ts.isEffectiveExternalModule(sourceFile, compilerOptions) && !ts.isInAmbientContext(location)) {
+ var helpersModule = resolveHelpersModule(sourceFile, location);
+ if (helpersModule !== unknownSymbol) {
+ var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
+ for (var helper = 1 /* FirstEmitHelper */; helper <= 8192 /* LastEmitHelper */; helper <<= 1) {
+ if (uncheckedHelpers & helper) {
+ var name = getHelperName(helper);
+ var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455 /* Value */);
+ if (!symbol) {
+ error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ }
+ }
}
}
+ requestedExternalEmitHelpers |= helpers;
}
}
}
- function verifyHelperSymbol(symbols, name, meaning) {
- var symbol = getSymbol(symbols, ts.escapeIdentifier(name), meaning);
- if (!symbol) {
- error(/*location*/ undefined, ts.Diagnostics.Module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ function getHelperName(helper) {
+ switch (helper) {
+ case 1 /* Extends */: return "__extends";
+ case 2 /* Assign */: return "__assign";
+ case 4 /* Rest */: return "__rest";
+ case 8 /* Decorate */: return "__decorate";
+ case 16 /* Metadata */: return "__metadata";
+ case 32 /* Param */: return "__param";
+ case 64 /* Awaiter */: return "__awaiter";
+ case 128 /* Generator */: return "__generator";
+ case 256 /* Values */: return "__values";
+ case 512 /* Read */: return "__read";
+ case 1024 /* Spread */: return "__spread";
+ case 2048 /* AsyncGenerator */: return "__asyncGenerator";
+ case 4096 /* AsyncDelegator */: return "__asyncDelegator";
+ case 8192 /* AsyncValues */: return "__asyncValues";
+ default: ts.Debug.fail("Unrecognized helper.");
}
}
- function createInstantiatedPromiseLikeType() {
- var promiseLikeType = getGlobalPromiseLikeType();
- if (promiseLikeType !== emptyGenericType) {
- return createTypeReference(promiseLikeType, [anyType]);
+ function resolveHelpersModule(node, errorNode) {
+ if (!externalHelpersModule) {
+ externalHelpersModule = resolveExternalModule(node, ts.externalHelpersModuleNameText, ts.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;
}
- return emptyObjectType;
- }
- function createThenableType() {
- // build the thenable type that is used to verify against a non-promise "thenable" operand to `await`.
- var thenPropertySymbol = createSymbol(67108864 /* Transient */ | 4 /* Property */, "then");
- getSymbolLinks(thenPropertySymbol).type = globalFunctionType;
- var thenableType = createObjectType(16 /* Anonymous */);
- thenableType.properties = [thenPropertySymbol];
- thenableType.members = createSymbolTable(thenableType.properties);
- thenableType.callSignatures = [];
- thenableType.constructSignatures = [];
- return thenableType;
+ return externalHelpersModule;
}
// GRAMMAR CHECKING
function checkGrammarDecorators(node) {
@@ -42708,14 +46199,14 @@ var ts;
return false;
}
if (!ts.nodeCanBeDecorated(node)) {
- if (node.kind === 149 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) {
+ if (node.kind === 150 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
}
else {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
}
}
- else if (node.kind === 151 /* GetAccessor */ || node.kind === 152 /* SetAccessor */) {
+ else if (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */) {
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -42733,16 +46224,16 @@ var ts;
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
var modifier = _a[_i];
if (modifier.kind !== 130 /* ReadonlyKeyword */) {
- if (node.kind === 146 /* PropertySignature */ || node.kind === 148 /* MethodSignature */) {
+ if (node.kind === 147 /* PropertySignature */ || node.kind === 149 /* MethodSignature */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
}
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
}
}
switch (modifier.kind) {
case 75 /* ConstKeyword */:
- if (node.kind !== 229 /* EnumDeclaration */ && node.parent.kind === 226 /* ClassDeclaration */) {
+ if (node.kind !== 231 /* EnumDeclaration */ && node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75 /* ConstKeyword */));
}
break;
@@ -42768,7 +46259,7 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
}
- else if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
}
else if (flags & 128 /* Abstract */) {
@@ -42791,10 +46282,10 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
}
- else if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
}
else if (flags & 128 /* Abstract */) {
@@ -42807,7 +46298,7 @@ var ts;
if (flags & 64 /* Readonly */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
}
- else if (node.kind !== 147 /* PropertyDeclaration */ && node.kind !== 146 /* PropertySignature */ && node.kind !== 155 /* IndexSignature */ && node.kind !== 144 /* Parameter */) {
+ else if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */ && node.kind !== 156 /* IndexSignature */ && node.kind !== 145 /* Parameter */) {
// If node.kind === SyntaxKind.Parameter, checkParameter report an error if it's not a parameter property.
return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
@@ -42827,10 +46318,10 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
}
flags |= 1 /* Export */;
@@ -42842,13 +46333,13 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
}
- else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 231 /* ModuleBlock */) {
+ else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233 /* ModuleBlock */) {
return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
}
flags |= 2 /* Ambient */;
@@ -42858,14 +46349,14 @@ var ts;
if (flags & 128 /* Abstract */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
}
- if (node.kind !== 226 /* ClassDeclaration */) {
- if (node.kind !== 149 /* MethodDeclaration */ &&
- node.kind !== 147 /* PropertyDeclaration */ &&
- node.kind !== 151 /* GetAccessor */ &&
- node.kind !== 152 /* SetAccessor */) {
+ if (node.kind !== 228 /* ClassDeclaration */) {
+ if (node.kind !== 150 /* MethodDeclaration */ &&
+ node.kind !== 148 /* PropertyDeclaration */ &&
+ node.kind !== 152 /* GetAccessor */ &&
+ node.kind !== 153 /* SetAccessor */) {
return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
}
- if (!(node.parent.kind === 226 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) {
+ if (!(node.parent.kind === 228 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) {
return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
}
if (flags & 32 /* Static */) {
@@ -42884,7 +46375,7 @@ var ts;
else if (flags & 2 /* Ambient */ || ts.isInAmbientContext(node.parent)) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
}
flags |= 256 /* Async */;
@@ -42892,7 +46383,7 @@ var ts;
break;
}
}
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
if (flags & 32 /* Static */) {
return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
@@ -42907,13 +46398,13 @@ var ts;
}
return;
}
- else if ((node.kind === 235 /* ImportDeclaration */ || node.kind === 234 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
+ else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
}
- else if (node.kind === 144 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) {
+ else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
}
- else if (node.kind === 144 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) {
+ else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
}
if (flags & 256 /* Async */) {
@@ -42933,37 +46424,37 @@ var ts;
}
function shouldReportBadModifier(node) {
switch (node.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 155 /* IndexSignature */:
- case 230 /* ModuleDeclaration */:
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
- case 240 /* ExportAssignment */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 144 /* Parameter */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ case 232 /* ModuleDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 145 /* Parameter */:
return false;
default:
- if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return false;
}
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return nodeHasAnyModifiersExcept(node, 119 /* AsyncKeyword */);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return nodeHasAnyModifiersExcept(node, 116 /* AbstractKeyword */);
- case 227 /* InterfaceDeclaration */:
- case 205 /* VariableStatement */:
- case 228 /* TypeAliasDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 207 /* VariableStatement */:
+ case 230 /* TypeAliasDeclaration */:
return true;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return nodeHasAnyModifiersExcept(node, 75 /* ConstKeyword */);
default:
ts.Debug.fail();
@@ -42976,14 +46467,11 @@ var ts;
}
function checkGrammarAsyncModifier(node, asyncModifier) {
switch (node.kind) {
- case 149 /* MethodDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- if (!node.asteriskToken) {
- return false;
- }
- break;
+ case 150 /* MethodDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return false;
}
return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
}
@@ -43041,8 +46529,12 @@ var ts;
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) ||
checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
}
+ function checkGrammarClassLikeDeclaration(node) {
+ var file = ts.getSourceFileOfNode(node);
+ return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);
+ }
function checkGrammarArrowFunction(node, file) {
- if (node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 186 /* ArrowFunction */) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
@@ -43077,7 +46569,7 @@ var ts;
if (!parameter.type) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
}
- if (parameter.type.kind !== 134 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) {
+ if (parameter.type.kind !== 135 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
}
if (!node.type) {
@@ -43105,7 +46597,7 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
var arg = args_4[_i];
- if (arg.kind === 198 /* OmittedExpression */) {
+ if (arg.kind === 199 /* OmittedExpression */) {
return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
}
}
@@ -43178,28 +46670,25 @@ var ts;
}
function checkGrammarComputedPropertyName(node) {
// If node is not a computedPropertyName, just skip the grammar checking
- if (node.kind !== 142 /* ComputedPropertyName */) {
+ if (node.kind !== 143 /* ComputedPropertyName */) {
return false;
}
var computedPropertyName = node;
- if (computedPropertyName.expression.kind === 192 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) {
+ if (computedPropertyName.expression.kind === 193 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) {
return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
}
}
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
- ts.Debug.assert(node.kind === 225 /* FunctionDeclaration */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 149 /* MethodDeclaration */);
+ ts.Debug.assert(node.kind === 227 /* FunctionDeclaration */ ||
+ node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 150 /* MethodDeclaration */);
if (ts.isInAmbientContext(node)) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
}
if (!node.body) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
}
- if (languageVersion < 2 /* ES2015 */) {
- return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher);
- }
}
}
function checkGrammarForInvalidQuestionMark(questionToken, message) {
@@ -43215,15 +46704,15 @@ var ts;
var GetOrSetAccessor = GetAccessor | SetAccessor;
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 /* SpreadAssignment */) {
+ if (prop.kind === 262 /* SpreadAssignment */) {
continue;
}
- var name_27 = prop.name;
- if (name_27.kind === 142 /* ComputedPropertyName */) {
+ var name = prop.name;
+ if (name.kind === 143 /* ComputedPropertyName */) {
// If the name is not a ComputedPropertyName, the grammar checking will skip it
- checkGrammarComputedPropertyName(name_27);
+ checkGrammarComputedPropertyName(name);
}
- if (prop.kind === 258 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
+ if (prop.kind === 261 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
// having objectAssignmentInitializer is only valid in ObjectAssignmentPattern
// outside of destructuring it is a syntax error
return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
@@ -43232,7 +46721,7 @@ var ts;
if (prop.modifiers) {
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
var mod = _c[_b];
- if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 149 /* MethodDeclaration */) {
+ if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 150 /* MethodDeclaration */) {
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
}
}
@@ -43246,69 +46735,69 @@ var ts;
// d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
// and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
var currentKind = void 0;
- if (prop.kind === 257 /* PropertyAssignment */ || prop.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */) {
// Grammar checking for computedPropertyName and shorthandPropertyAssignment
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
- if (name_27.kind === 8 /* NumericLiteral */) {
- checkGrammarNumericLiteral(name_27);
+ if (name.kind === 8 /* NumericLiteral */) {
+ checkGrammarNumericLiteral(name);
}
currentKind = Property;
}
- else if (prop.kind === 149 /* MethodDeclaration */) {
+ else if (prop.kind === 150 /* MethodDeclaration */) {
currentKind = Property;
}
- else if (prop.kind === 151 /* GetAccessor */) {
+ else if (prop.kind === 152 /* GetAccessor */) {
currentKind = GetAccessor;
}
- else if (prop.kind === 152 /* SetAccessor */) {
+ else if (prop.kind === 153 /* SetAccessor */) {
currentKind = SetAccessor;
}
else {
ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
}
- var effectiveName = ts.getPropertyNameForPropertyNameNode(name_27);
+ var effectiveName = ts.getPropertyNameForPropertyNameNode(name);
if (effectiveName === undefined) {
continue;
}
- if (!seen[effectiveName]) {
- seen[effectiveName] = currentKind;
+ var existingKind = seen.get(effectiveName);
+ if (!existingKind) {
+ seen.set(effectiveName, currentKind);
}
else {
- var existingKind = seen[effectiveName];
if (currentKind === Property && existingKind === Property) {
- grammarErrorOnNode(name_27, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_27));
+ grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
}
else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
- seen[effectiveName] = currentKind | existingKind;
+ seen.set(effectiveName, currentKind | existingKind);
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
}
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
}
}
}
}
function checkGrammarJsxElement(node) {
var seen = ts.createMap();
- for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
+ for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
var attr = _a[_i];
- if (attr.kind === 251 /* JsxSpreadAttribute */) {
+ if (attr.kind === 254 /* JsxSpreadAttribute */) {
continue;
}
var jsxAttr = attr;
- var name_28 = jsxAttr.name;
- if (!seen[name_28.text]) {
- seen[name_28.text] = true;
+ var name = jsxAttr.name;
+ if (!seen.get(name.text)) {
+ seen.set(name.text, true);
}
else {
- return grammarErrorOnNode(name_28, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
}
var initializer = jsxAttr.initializer;
- if (initializer && initializer.kind === 252 /* JsxExpression */ && !initializer.expression) {
+ if (initializer && initializer.kind === 255 /* JsxExpression */ && !initializer.expression) {
return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
}
}
@@ -43317,7 +46806,12 @@ var ts;
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
- if (forInOrOfStatement.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (forInOrOfStatement.kind === 215 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
+ if ((forInOrOfStatement.flags & 16384 /* AwaitContext */) === 0 /* None */) {
+ return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);
+ }
+ }
+ if (forInOrOfStatement.initializer.kind === 226 /* VariableDeclarationList */) {
var variableList = forInOrOfStatement.initializer;
if (!checkGrammarVariableDeclarationList(variableList)) {
var declarations = variableList.declarations;
@@ -43332,20 +46826,20 @@ var ts;
return false;
}
if (declarations.length > 1) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
: ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
}
var firstDeclaration = declarations[0];
if (firstDeclaration.initializer) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
: ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
}
if (firstDeclaration.type) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
: ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -43365,15 +46859,18 @@ var ts;
else if (accessor.body === undefined && !(ts.getModifierFlags(accessor) & 128 /* Abstract */)) {
return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
}
+ else if (accessor.body && ts.getModifierFlags(accessor) & 128 /* Abstract */) {
+ return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+ }
else if (accessor.typeParameters) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
}
else if (!doesAccessorHaveCorrectParameterCount(accessor)) {
- return grammarErrorOnNode(accessor.name, kind === 151 /* GetAccessor */ ?
+ return grammarErrorOnNode(accessor.name, kind === 152 /* GetAccessor */ ?
ts.Diagnostics.A_get_accessor_cannot_have_parameters :
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
}
- else if (kind === 152 /* SetAccessor */) {
+ else if (kind === 153 /* SetAccessor */) {
if (accessor.type) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
}
@@ -43392,14 +46889,14 @@ var ts;
}
}
/** Does the accessor have the right number of parameters?
-
- A get accessor has no parameters or a single `this` parameter.
- A set accessor has one parameter or a `this` parameter and one more parameter */
+ * A get accessor has no parameters or a single `this` parameter.
+ * A set accessor has one parameter or a `this` parameter and one more parameter.
+ */
function doesAccessorHaveCorrectParameterCount(accessor) {
- return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 151 /* GetAccessor */ ? 0 : 1);
+ return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 0 : 1);
}
function getAccessorThisParameter(accessor) {
- if (accessor.parameters.length === (accessor.kind === 151 /* GetAccessor */ ? 1 : 2)) {
+ if (accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 1 : 2)) {
return ts.getThisParameter(accessor);
}
}
@@ -43414,7 +46911,7 @@ var ts;
checkGrammarForGenerator(node)) {
return true;
}
- if (node.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (node.parent.kind === 177 /* ObjectLiteralExpression */) {
if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
return true;
}
@@ -43435,10 +46932,10 @@ var ts;
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
- else if (node.parent.kind === 227 /* InterfaceDeclaration */) {
+ else if (node.parent.kind === 229 /* InterfaceDeclaration */) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
- else if (node.parent.kind === 161 /* TypeLiteral */) {
+ else if (node.parent.kind === 162 /* TypeLiteral */) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -43449,11 +46946,11 @@ var ts;
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (current.kind) {
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
if (node.label && current.label.text === node.label.text) {
// found matching label - verify that label usage is correct
// continue can only target labels that are on iteration statements
- var isMisplacedContinueLabel = node.kind === 214 /* ContinueStatement */
+ var isMisplacedContinueLabel = node.kind === 216 /* ContinueStatement */
&& !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true);
if (isMisplacedContinueLabel) {
return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -43461,8 +46958,8 @@ var ts;
return false;
}
break;
- case 218 /* SwitchStatement */:
- if (node.kind === 215 /* BreakStatement */ && !node.label) {
+ case 220 /* SwitchStatement */:
+ if (node.kind === 217 /* BreakStatement */ && !node.label) {
// unlabeled break within switch statement - ok
return false;
}
@@ -43477,13 +46974,13 @@ var ts;
current = current.parent;
}
if (node.label) {
- var message = node.kind === 215 /* BreakStatement */
+ var message = node.kind === 217 /* BreakStatement */
? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
: ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
}
else {
- var message = node.kind === 215 /* BreakStatement */
+ var message = node.kind === 217 /* BreakStatement */
? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
: ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
@@ -43495,7 +46992,7 @@ var ts;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
}
- if (node.name.kind === 173 /* ArrayBindingPattern */ || node.name.kind === 172 /* ObjectBindingPattern */) {
+ if (node.name.kind === 174 /* ArrayBindingPattern */ || node.name.kind === 173 /* ObjectBindingPattern */) {
return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
}
if (node.initializer) {
@@ -43506,11 +47003,11 @@ var ts;
}
function isStringOrNumberLiteralExpression(expr) {
return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ ||
- expr.kind === 190 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
+ expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */;
}
function checkGrammarVariableDeclaration(node) {
- if (node.parent.parent.kind !== 212 /* ForInStatement */ && node.parent.parent.kind !== 213 /* ForOfStatement */) {
+ if (node.parent.parent.kind !== 214 /* ForInStatement */ && node.parent.parent.kind !== 215 /* ForOfStatement */) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
if (ts.isConst(node) && !node.type) {
@@ -43539,6 +47036,10 @@ var ts;
}
}
}
+ if (compilerOptions.module !== ts.ModuleKind.ES2015 && compilerOptions.module !== ts.ModuleKind.System && !compilerOptions.noEmit &&
+ !ts.isInAmbientContext(node.parent.parent) && ts.hasModifier(node.parent.parent, 1 /* Export */)) {
+ checkESModuleMarker(node.name);
+ }
var checkLetConstNames = (ts.isLet(node) || ts.isConst(node));
// 1. LexicalDeclaration : LetOrConst BindingList ;
// It is a Syntax Error if the BoundNames of BindingList contains "let".
@@ -43548,6 +47049,22 @@ var ts;
// and its Identifier is eval or arguments
return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
}
+ function checkESModuleMarker(name) {
+ if (name.kind === 70 /* Identifier */) {
+ if (ts.unescapeIdentifier(name.text) === "__esModule") {
+ return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
+ }
+ }
+ else {
+ var elements = name.elements;
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var element = elements_2[_i];
+ if (!ts.isOmittedExpression(element)) {
+ return checkESModuleMarker(element.name);
+ }
+ }
+ }
+ }
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 70 /* Identifier */) {
if (name.originalKeywordKind === 109 /* LetKeyword */) {
@@ -43556,8 +47073,8 @@ var ts;
}
else {
var elements = name.elements;
- for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
- var element = elements_2[_i];
+ for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
+ var element = elements_3[_i];
if (!ts.isOmittedExpression(element)) {
checkGrammarNameInLetOrConstDeclarations(element.name);
}
@@ -43575,15 +47092,15 @@ var ts;
}
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return false;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return allowLetAndConstDeclarations(parent.parent);
}
return true;
@@ -43598,6 +47115,13 @@ var ts;
}
}
}
+ function checkGrammarMetaProperty(node) {
+ if (node.keywordToken === 93 /* NewKeyword */) {
+ if (node.name.text !== "target") {
+ return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target");
+ }
+ }
+ }
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
}
@@ -43638,7 +47162,7 @@ var ts;
return true;
}
}
- else if (node.parent.kind === 227 /* InterfaceDeclaration */) {
+ else if (node.parent.kind === 229 /* InterfaceDeclaration */) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -43646,7 +47170,7 @@ var ts;
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
}
}
- else if (node.parent.kind === 161 /* TypeLiteral */) {
+ else if (node.parent.kind === 162 /* TypeLiteral */) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -43671,13 +47195,13 @@ var ts;
// export_opt AmbientDeclaration
//
// TODO: The spec needs to be amended to reflect this grammar.
- if (node.kind === 227 /* InterfaceDeclaration */ ||
- node.kind === 228 /* TypeAliasDeclaration */ ||
- node.kind === 235 /* ImportDeclaration */ ||
- node.kind === 234 /* ImportEqualsDeclaration */ ||
- node.kind === 241 /* ExportDeclaration */ ||
- node.kind === 240 /* ExportAssignment */ ||
- node.kind === 233 /* NamespaceExportDeclaration */ ||
+ if (node.kind === 229 /* InterfaceDeclaration */ ||
+ node.kind === 230 /* TypeAliasDeclaration */ ||
+ node.kind === 237 /* ImportDeclaration */ ||
+ node.kind === 236 /* ImportEqualsDeclaration */ ||
+ node.kind === 243 /* ExportDeclaration */ ||
+ node.kind === 242 /* ExportAssignment */ ||
+ node.kind === 235 /* NamespaceExportDeclaration */ ||
ts.getModifierFlags(node) & (2 /* Ambient */ | 1 /* Export */ | 512 /* Default */)) {
return false;
}
@@ -43686,7 +47210,7 @@ var ts;
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
- if (ts.isDeclaration(decl) || decl.kind === 205 /* VariableStatement */) {
+ if (ts.isDeclaration(decl) || decl.kind === 207 /* VariableStatement */) {
if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
return true;
}
@@ -43712,7 +47236,7 @@ var ts;
// to prevent noisiness. So use a bit on the block to indicate if
// this has already been reported, and don't report if it has.
//
- if (node.parent.kind === 204 /* Block */ || node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 206 /* Block */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
var links_1 = getNodeLinks(node.parent);
// Check if the containing block ever report this error
if (!links_1.hasReportedStatementInAmbientContext) {
@@ -43720,13 +47244,30 @@ var ts;
}
}
else {
+ // We must be parented by a statement. If so, there's no need
+ // to report the error as our parent will have already done it.
+ // Debug.assert(isStatement(node.parent));
}
}
}
function checkGrammarNumericLiteral(node) {
// Grammar checking
- if (node.isOctalLiteral && languageVersion >= 1 /* ES5 */) {
- return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
+ if (node.numericLiteralFlags & 4 /* Octal */) {
+ var diagnosticMessage = void 0;
+ if (languageVersion >= 1 /* ES5 */) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 172 /* LiteralType */)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 263 /* EnumMember */)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
+ }
+ if (diagnosticMessage) {
+ var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37 /* MinusToken */;
+ var literal = (withMinus ? "-" : "") + "0o" + node.text;
+ return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
+ }
}
}
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
@@ -43739,11 +47280,11 @@ var ts;
}
function getAmbientModules() {
var result = [];
- for (var sym in globals) {
+ globals.forEach(function (global, sym) {
if (ambientModuleSymbolRegex.test(sym)) {
- result.push(globals[sym]);
+ result.push(global);
}
- }
+ });
return result;
}
}
@@ -43752,73 +47293,408 @@ var ts;
/// <reference path="checker.ts" />
/// <reference path="factory.ts" />
/// <reference path="utilities.ts" />
-/* @internal */
var ts;
(function (ts) {
- ;
+ function visitNode(node, visitor, test, lift) {
+ if (node === undefined || visitor === undefined) {
+ return node;
+ }
+ ts.aggregateTransformFlags(node);
+ var visited = visitor(node);
+ if (visited === node) {
+ return node;
+ }
+ var visitedNode;
+ if (visited === undefined) {
+ return undefined;
+ }
+ else if (ts.isArray(visited)) {
+ visitedNode = (lift || extractSingleNode)(visited);
+ }
+ else {
+ visitedNode = visited;
+ }
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ return visitedNode;
+ }
+ ts.visitNode = visitNode;
/**
- * This map contains information about the shape of each Node in "types.ts" pertaining to how
- * each node should be traversed during a transformation.
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
*
- * Each edge corresponds to a property in a Node subtype that should be traversed when visiting
- * each child. The properties are assigned in the order in which traversal should occur.
- *
- * We only add entries for nodes that do not have a create/update pair defined in factory.ts
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes(nodes, visitor, test, start, count) {
+ if (nodes === undefined || visitor === undefined) {
+ return nodes;
+ }
+ var updated;
+ // Ensure start and count have valid values
+ var length = nodes.length;
+ if (start === undefined || start < 0) {
+ start = 0;
+ }
+ if (count === undefined || count > length - start) {
+ count = length - start;
+ }
+ if (start > 0 || count < length) {
+ // If we are not visiting all of the original nodes, we must always create a new array.
+ // Since this is a fragment of a node array, we do not copy over the previous location
+ // and will only copy over `hasTrailingComma` if we are including the last element.
+ updated = ts.createNodeArray([], /*hasTrailingComma*/ nodes.hasTrailingComma && start + count === length);
+ }
+ // Visit each original node.
+ for (var i = 0; i < count; i++) {
+ var node = nodes[i + start];
+ ts.aggregateTransformFlags(node);
+ var visited = node !== undefined ? visitor(node) : undefined;
+ if (updated !== undefined || visited === undefined || visited !== node) {
+ if (updated === undefined) {
+ // Ensure we have a copy of `nodes`, up to the current index.
+ updated = ts.createNodeArray(nodes.slice(0, i), nodes.hasTrailingComma);
+ ts.setTextRange(updated, nodes);
+ }
+ if (visited) {
+ if (ts.isArray(visited)) {
+ for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
+ var visitedNode = visited_1[_i];
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ updated.push(visitedNode);
+ }
+ }
+ else {
+ ts.Debug.assertNode(visited, test);
+ ts.aggregateTransformFlags(visited);
+ updated.push(visited);
+ }
+ }
+ }
+ }
+ return updated || nodes;
+ }
+ ts.visitNodes = visitNodes;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
+ context.startLexicalEnvironment();
+ statements = visitNodes(statements, visitor, ts.isStatement, start);
+ if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
+ statements = ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements)), statements);
+ }
+ var declarations = context.endLexicalEnvironment();
+ return ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements);
+ }
+ ts.visitLexicalEnvironment = visitLexicalEnvironment;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes, visitor, context, nodesVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ context.startLexicalEnvironment();
+ var updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
+ context.suspendLexicalEnvironment();
+ return updated;
+ }
+ ts.visitParameterList = visitParameterList;
+ function visitFunctionBody(node, visitor, context) {
+ context.resumeLexicalEnvironment();
+ var updated = visitNode(node, visitor, ts.isConciseBody);
+ var declarations = context.endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(updated);
+ var statements = ts.mergeLexicalEnvironment(block.statements, declarations);
+ return ts.updateBlock(block, statements);
+ }
+ return updated;
+ }
+ ts.visitFunctionBody = visitFunctionBody;
+ function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ if (node === undefined) {
+ return undefined;
+ }
+ var kind = node.kind;
+ // No need to visit nodes with no children.
+ if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */) || kind === 168 /* ThisType */) {
+ return node;
+ }
+ switch (node.kind) {
+ case 205 /* SemicolonClassElement */:
+ case 208 /* EmptyStatement */:
+ case 199 /* OmittedExpression */:
+ case 224 /* DebuggerStatement */:
+ case 297 /* EndOfDeclarationMarker */:
+ case 246 /* MissingDeclaration */:
+ // No need to visit nodes with no children.
+ return node;
+ // Names
+ case 142 /* QualifiedName */:
+ return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
+ case 143 /* ComputedPropertyName */:
+ return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Signatures and Signature Elements
+ case 159 /* FunctionType */:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 160 /* ConstructorType */:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 154 /* CallSignature */:
+ return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 155 /* ConstructSignature */:
+ return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 149 /* MethodSignature */:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 156 /* IndexSignature */:
+ return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 145 /* Parameter */:
+ return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 146 /* Decorator */:
+ return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Types
+ case 158 /* TypeReference */:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 157 /* TypePredicate */:
+ return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161 /* TypeQuery */:
+ return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
+ case 162 /* TypeLiteral */:
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ case 163 /* ArrayType */:
+ return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
+ case 164 /* TupleType */:
+ return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ case 167 /* ParenthesizedType */:
+ throw ts.Debug.fail("not implemented.");
+ case 169 /* TypeOperator */:
+ return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
+ case 170 /* IndexedAccessType */:
+ return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
+ case 171 /* MappedType */:
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
+ case 172 /* LiteralType */:
+ return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
+ // Type Declarations
+ case 144 /* TypeParameter */:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
+ // Type members
+ case 147 /* PropertySignature */:
+ return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 148 /* PropertyDeclaration */:
+ return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 150 /* MethodDeclaration */:
+ return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 151 /* Constructor */:
+ return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 152 /* GetAccessor */:
+ return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 153 /* SetAccessor */:
+ return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ // Binding patterns
+ case 173 /* ObjectBindingPattern */:
+ return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
+ case 174 /* ArrayBindingPattern */:
+ return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
+ case 175 /* BindingElement */:
+ return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression));
+ // Expression
+ case 176 /* ArrayLiteralExpression */:
+ return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression));
+ case 177 /* ObjectLiteralExpression */:
+ return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
+ case 178 /* PropertyAccessExpression */:
+ return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
+ case 179 /* ElementAccessExpression */:
+ return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
+ case 180 /* CallExpression */:
+ return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 181 /* NewExpression */:
+ return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 182 /* TaggedTemplateExpression */:
+ return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
+ case 183 /* TypeAssertionExpression */:
+ return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 184 /* ParenthesizedExpression */:
+ return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 185 /* FunctionExpression */:
+ return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 186 /* ArrowFunction */:
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 187 /* DeleteExpression */:
+ return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 188 /* TypeOfExpression */:
+ return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 189 /* VoidExpression */:
+ return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 190 /* AwaitExpression */:
+ return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 193 /* BinaryExpression */:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
+ case 191 /* PrefixUnaryExpression */:
+ return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 192 /* PostfixUnaryExpression */:
+ return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194 /* ConditionalExpression */:
+ return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
+ case 195 /* TemplateExpression */:
+ return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+ case 196 /* YieldExpression */:
+ return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression));
+ case 197 /* SpreadElement */:
+ return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 198 /* ClassExpression */:
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 200 /* ExpressionWithTypeArguments */:
+ return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 201 /* AsExpression */:
+ return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
+ case 202 /* NonNullExpression */:
+ return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Misc
+ case 204 /* TemplateSpan */:
+ return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
+ // Element
+ case 206 /* Block */:
+ return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 207 /* VariableStatement */:
+ return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
+ case 209 /* ExpressionStatement */:
+ return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 210 /* IfStatement */:
+ return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock));
+ case 211 /* DoStatement */:
+ return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
+ case 212 /* WhileStatement */:
+ return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 213 /* ForStatement */:
+ return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 214 /* ForInStatement */:
+ return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 215 /* ForOfStatement */:
+ return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 216 /* ContinueStatement */:
+ return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 217 /* BreakStatement */:
+ return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 218 /* ReturnStatement */:
+ return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 219 /* WithStatement */:
+ return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 220 /* SwitchStatement */:
+ return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
+ case 221 /* LabeledStatement */:
+ return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 222 /* ThrowStatement */:
+ return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 223 /* TryStatement */:
+ return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock));
+ case 225 /* VariableDeclaration */:
+ return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 226 /* VariableDeclarationList */:
+ return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+ case 227 /* FunctionDeclaration */:
+ return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 228 /* ClassDeclaration */:
+ return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 231 /* EnumDeclaration */:
+ return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+ case 232 /* ModuleDeclaration */:
+ return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody));
+ case 233 /* ModuleBlock */:
+ return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 234 /* CaseBlock */:
+ return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236 /* ImportEqualsDeclaration */:
+ return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference));
+ case 237 /* ImportDeclaration */:
+ return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 238 /* ImportClause */:
+ return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings));
+ case 239 /* NamespaceImport */:
+ return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
+ case 240 /* NamedImports */:
+ return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+ case 241 /* ImportSpecifier */:
+ return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 242 /* ExportAssignment */:
+ return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
+ case 243 /* ExportDeclaration */:
+ return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 244 /* NamedExports */:
+ return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+ case 245 /* ExportSpecifier */:
+ return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ // Module references
+ case 247 /* ExternalModuleReference */:
+ return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
+ // JSX
+ case 248 /* JsxElement */:
+ return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
+ case 253 /* JsxAttributes */:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
+ case 249 /* JsxSelfClosingElement */:
+ return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 250 /* JsxOpeningElement */:
+ return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 251 /* JsxClosingElement */:
+ return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
+ case 252 /* JsxAttribute */:
+ return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254 /* JsxSpreadAttribute */:
+ return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 255 /* JsxExpression */:
+ return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Clauses
+ case 256 /* CaseClause */:
+ return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 257 /* DefaultClause */:
+ return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 258 /* HeritageClause */:
+ return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
+ case 259 /* CatchClause */:
+ return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
+ // Property assignments
+ case 260 /* PropertyAssignment */:
+ return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 261 /* ShorthandPropertyAssignment */:
+ return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
+ case 262 /* SpreadAssignment */:
+ return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Enum
+ case 263 /* EnumMember */:
+ return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ // Top-level nodes
+ case 264 /* SourceFile */:
+ return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
+ // Transformation nodes
+ case 295 /* PartiallyEmittedExpression */:
+ return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ default:
+ return node;
+ }
+ }
+ ts.visitEachChild = visitEachChild;
+ /**
+ * Extracts the single node from a NodeArray.
*
- * NOTE: This needs to be kept up to date with changes to nodes in "types.ts". Currently, this
- * map is not comprehensive. Only node edges relevant to tree transformation are
- * currently defined. We may extend this to be more comprehensive, and eventually
- * supplant the existing `forEachChild` implementation if performance is not
- * significantly impacted.
+ * @param nodes The NodeArray.
*/
- var nodeEdgeTraversalMap = ts.createMap((_a = {},
- _a[141 /* QualifiedName */] = [
- { name: "left", test: ts.isEntityName },
- { name: "right", test: ts.isIdentifier }
- ],
- _a[145 /* Decorator */] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[182 /* TypeAssertionExpression */] = [
- { name: "type", test: ts.isTypeNode },
- { name: "expression", test: ts.isUnaryExpression }
- ],
- _a[200 /* AsExpression */] = [
- { name: "expression", test: ts.isExpression },
- { name: "type", test: ts.isTypeNode }
- ],
- _a[201 /* NonNullExpression */] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[229 /* EnumDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "members", test: ts.isEnumMember }
- ],
- _a[230 /* ModuleDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isModuleName },
- { name: "body", test: ts.isModuleBody }
- ],
- _a[231 /* ModuleBlock */] = [
- { name: "statements", test: ts.isStatement }
- ],
- _a[234 /* ImportEqualsDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "moduleReference", test: ts.isModuleReference }
- ],
- _a[245 /* ExternalModuleReference */] = [
- { name: "expression", test: ts.isExpression, optional: true }
- ],
- _a[260 /* EnumMember */] = [
- { name: "name", test: ts.isPropertyName },
- { name: "initializer", test: ts.isExpression, optional: true, parenthesize: ts.parenthesizeExpressionForList }
- ],
- _a));
+ function extractSingleNode(nodes) {
+ ts.Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
+ return ts.singleOrUndefined(nodes);
+ }
+})(ts || (ts = {}));
+/* @internal */
+(function (ts) {
function reduceNode(node, f, initial) {
return node ? f(initial, node) : initial;
}
@@ -43827,8 +47703,7 @@ var ts;
}
/**
* Similar to `reduceLeft`, performs a reduction against each child of a node.
- * NOTE: Unlike `forEachChild`, this does *not* visit every node. Only nodes added to the
- * `nodeEdgeTraversalMap` above will be visited.
+ * NOTE: Unlike `forEachChild`, this does *not* visit every node.
*
* @param node The node containing the children to reduce.
* @param initial The initial value to supply to the reduction.
@@ -43842,47 +47717,51 @@ var ts;
var cbNodes = cbNodeArray || cbNode;
var kind = node.kind;
// No need to visit nodes with no children.
- if ((kind > 0 /* FirstToken */ && kind <= 140 /* LastToken */)) {
+ if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */)) {
return initial;
}
// We do not yet support types.
- if ((kind >= 156 /* TypePredicate */ && kind <= 171 /* LiteralType */)) {
+ if ((kind >= 157 /* TypePredicate */ && kind <= 172 /* LiteralType */)) {
return initial;
}
var result = initial;
switch (node.kind) {
// Leaf nodes
- case 203 /* SemicolonClassElement */:
- case 206 /* EmptyStatement */:
- case 198 /* OmittedExpression */:
- case 222 /* DebuggerStatement */:
- case 293 /* NotEmittedStatement */:
+ case 205 /* SemicolonClassElement */:
+ case 208 /* EmptyStatement */:
+ case 199 /* OmittedExpression */:
+ case 224 /* DebuggerStatement */:
+ case 294 /* NotEmittedStatement */:
// No need to visit nodes with no children.
break;
// Names
- case 142 /* ComputedPropertyName */:
+ case 142 /* QualifiedName */:
+ result = reduceNode(node.left, cbNode, result);
+ result = reduceNode(node.right, cbNode, result);
+ break;
+ case 143 /* ComputedPropertyName */:
result = reduceNode(node.expression, cbNode, result);
break;
// Signature elements
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
result = reduceNode(node.expression, cbNode, result);
break;
// Type member
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43891,12 +47770,12 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43904,7 +47783,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43912,45 +47791,49 @@ var ts;
result = reduceNode(node.body, cbNode, result);
break;
// Binding patterns
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
// Expression
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
result = reduceNodes(node.properties, cbNodes, result);
break;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.argumentExpression, cbNode, result);
break;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
result = reduceNode(node.tag, cbNode, result);
result = reduceNode(node.template, cbNode, result);
break;
- case 184 /* FunctionExpression */:
+ case 183 /* TypeAssertionExpression */:
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 185 /* FunctionExpression */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
@@ -43958,119 +47841,126 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 183 /* ParenthesizedExpression */:
- case 186 /* DeleteExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 189 /* AwaitExpression */:
- case 195 /* YieldExpression */:
- case 196 /* SpreadElement */:
- case 201 /* NonNullExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 187 /* DeleteExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 190 /* AwaitExpression */:
+ case 196 /* YieldExpression */:
+ case 197 /* SpreadElement */:
+ case 202 /* NonNullExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
result = reduceNode(node.operand, cbNode, result);
break;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
result = reduceNode(node.left, cbNode, result);
result = reduceNode(node.right, cbNode, result);
break;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.whenTrue, cbNode, result);
result = reduceNode(node.whenFalse, cbNode, result);
break;
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
result = reduceNode(node.head, cbNode, result);
result = reduceNodes(node.templateSpans, cbNodes, result);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
break;
+ case 201 /* AsExpression */:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ break;
+ case 202 /* NonNullExpression */:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
// Misc
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.literal, cbNode, result);
break;
// Element
- case 204 /* Block */:
+ case 206 /* Block */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.declarationList, cbNode, result);
break;
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.thenStatement, cbNode, result);
result = reduceNode(node.elseStatement, cbNode, result);
break;
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
result = reduceNode(node.statement, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.incrementor, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 216 /* ReturnStatement */:
- case 220 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 222 /* ThrowStatement */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.caseBlock, cbNode, result);
break;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
result = reduceNode(node.label, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
result = reduceNode(node.tryBlock, cbNode, result);
result = reduceNode(node.catchClause, cbNode, result);
result = reduceNode(node.finallyBlock, cbNode, result);
break;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
result = reduceNodes(node.declarations, cbNodes, result);
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -44079,7 +47969,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -44087,484 +47977,148 @@ var ts;
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 232 /* CaseBlock */:
+ case 231 /* EnumDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNodes(node.members, cbNodes, result);
+ break;
+ case 232 /* ModuleDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.body, cbNode, result);
+ break;
+ case 233 /* ModuleBlock */:
+ result = reduceNodes(node.statements, cbNodes, result);
+ break;
+ case 234 /* CaseBlock */:
result = reduceNodes(node.clauses, cbNodes, result);
break;
- case 235 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.moduleReference, cbNode, result);
+ break;
+ case 237 /* ImportDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.importClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.namedBindings, cbNode, result);
break;
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
result = reduceNode(node.name, cbNode, result);
break;
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.exportClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
+ // Module references
+ case 247 /* ExternalModuleReference */:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
// JSX
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
result = reduceNode(node.openingElement, cbNode, result);
result = ts.reduceLeft(node.children, cbNode, result);
result = reduceNode(node.closingElement, cbNode, result);
break;
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
result = reduceNode(node.tagName, cbNode, result);
- result = reduceNodes(node.attributes, cbNodes, result);
+ result = reduceNode(node.attributes, cbNode, result);
+ break;
+ case 253 /* JsxAttributes */:
+ result = reduceNodes(node.properties, cbNodes, result);
break;
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
result = reduceNode(node.tagName, cbNode, result);
break;
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 251 /* JsxSpreadAttribute */:
+ case 254 /* JsxSpreadAttribute */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
// Clauses
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
result = reduceNode(node.expression, cbNode, result);
- // fall-through
- case 254 /* DefaultClause */:
+ // falls through
+ case 257 /* DefaultClause */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
result = reduceNodes(node.types, cbNodes, result);
break;
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
result = reduceNode(node.variableDeclaration, cbNode, result);
result = reduceNode(node.block, cbNode, result);
break;
// Property assignments
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.objectAssignmentInitializer, cbNode, result);
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
result = reduceNode(node.expression, cbNode, result);
break;
+ // Enum
+ case 263 /* EnumMember */:
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
// Top-level nodes
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 294 /* PartiallyEmittedExpression */:
+ // Transformation nodes
+ case 295 /* PartiallyEmittedExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
default:
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_1 = edgeTraversalPath; _i < edgeTraversalPath_1.length; _i++) {
- var edge = edgeTraversalPath_1[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- result = ts.isArray(value)
- ? reduceNodes(value, cbNodes, result)
- : cbNode(result, value);
- }
- }
- }
break;
}
return result;
}
ts.reduceEachChild = reduceEachChild;
- function visitNode(node, visitor, test, optional, lift, parenthesize, parentNode) {
- if (node === undefined || visitor === undefined) {
- return node;
- }
- aggregateTransformFlags(node);
- var visited = visitor(node);
- if (visited === node) {
- return node;
- }
- var visitedNode;
- if (visited === undefined) {
- if (!optional) {
- Debug.failNotOptional();
- }
- return undefined;
- }
- else if (ts.isArray(visited)) {
- visitedNode = (lift || extractSingleNode)(visited);
- }
- else {
- visitedNode = visited;
- }
- if (parenthesize !== undefined) {
- visitedNode = parenthesize(visitedNode, parentNode);
- }
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- return visitedNode;
- }
- ts.visitNode = visitNode;
- function visitNodes(nodes, visitor, test, start, count, parenthesize, parentNode) {
- if (nodes === undefined) {
- return undefined;
- }
- var updated;
- // Ensure start and count have valid values
- var length = nodes.length;
- if (start === undefined || start < 0) {
- start = 0;
- }
- if (count === undefined || count > length - start) {
- count = length - start;
- }
- if (start > 0 || count < length) {
- // If we are not visiting all of the original nodes, we must always create a new array.
- // Since this is a fragment of a node array, we do not copy over the previous location
- // and will only copy over `hasTrailingComma` if we are including the last element.
- updated = ts.createNodeArray([], /*location*/ undefined,
- /*hasTrailingComma*/ nodes.hasTrailingComma && start + count === length);
- }
- // Visit each original node.
- for (var i = 0; i < count; i++) {
- var node = nodes[i + start];
- aggregateTransformFlags(node);
- var visited = node !== undefined ? visitor(node) : undefined;
- if (updated !== undefined || visited === undefined || visited !== node) {
- if (updated === undefined) {
- // Ensure we have a copy of `nodes`, up to the current index.
- updated = ts.createNodeArray(nodes.slice(0, i), /*location*/ nodes, nodes.hasTrailingComma);
- }
- if (visited) {
- if (ts.isArray(visited)) {
- for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
- var visitedNode = visited_1[_i];
- visitedNode = parenthesize
- ? parenthesize(visitedNode, parentNode)
- : visitedNode;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- else {
- var visitedNode = parenthesize
- ? parenthesize(visited, parentNode)
- : visited;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- }
- }
- return updated || nodes;
- }
- ts.visitNodes = visitNodes;
- /**
- * Starts a new lexical environment and visits a statement list, ending the lexical environment
- * and merging hoisted declarations upon completion.
- */
- function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
- context.startLexicalEnvironment();
- statements = visitNodes(statements, visitor, ts.isStatement, start);
- if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
- statements = ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements), statements);
- }
- var declarations = context.endLexicalEnvironment();
- return ts.createNodeArray(ts.concatenate(statements, declarations), statements);
- }
- ts.visitLexicalEnvironment = visitLexicalEnvironment;
- /**
- * Starts a new lexical environment and visits a parameter list, suspending the lexical
- * environment upon completion.
- */
- function visitParameterList(nodes, visitor, context) {
- context.startLexicalEnvironment();
- var updated = visitNodes(nodes, visitor, ts.isParameterDeclaration);
- context.suspendLexicalEnvironment();
- return updated;
- }
- ts.visitParameterList = visitParameterList;
- function visitFunctionBody(node, visitor, context) {
- context.resumeLexicalEnvironment();
- var updated = visitNode(node, visitor, ts.isConciseBody);
- var declarations = context.endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(updated);
- var statements = mergeLexicalEnvironment(block.statements, declarations);
- return ts.updateBlock(block, statements);
- }
- return updated;
- }
- ts.visitFunctionBody = visitFunctionBody;
- function visitEachChild(node, visitor, context) {
- if (node === undefined) {
- return undefined;
- }
- var kind = node.kind;
- // No need to visit nodes with no children.
- if ((kind > 0 /* FirstToken */ && kind <= 140 /* LastToken */)) {
- return node;
- }
- // We do not yet support types.
- if ((kind >= 156 /* TypePredicate */ && kind <= 171 /* LiteralType */)) {
- return node;
- }
- switch (node.kind) {
- case 203 /* SemicolonClassElement */:
- case 206 /* EmptyStatement */:
- case 198 /* OmittedExpression */:
- case 222 /* DebuggerStatement */:
- // No need to visit nodes with no children.
- return node;
- // Names
- case 142 /* ComputedPropertyName */:
- return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- // Signature elements
- case 144 /* Parameter */:
- return ts.updateParameter(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), node.dotDotDotToken, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- // Type member
- case 147 /* PropertyDeclaration */:
- return ts.updateProperty(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- case 149 /* MethodDeclaration */:
- return ts.updateMethod(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 150 /* Constructor */:
- return ts.updateConstructor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 151 /* GetAccessor */:
- return ts.updateGetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 152 /* SetAccessor */:
- return ts.updateSetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- // Binding patterns
- case 172 /* ObjectBindingPattern */:
- return ts.updateObjectBindingPattern(node, visitNodes(node.elements, visitor, ts.isBindingElement));
- case 173 /* ArrayBindingPattern */:
- return ts.updateArrayBindingPattern(node, visitNodes(node.elements, visitor, ts.isArrayBindingElement));
- case 174 /* BindingElement */:
- return ts.updateBindingElement(node, node.dotDotDotToken, visitNode(node.propertyName, visitor, ts.isPropertyName, /*optional*/ true), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- // Expression
- case 175 /* ArrayLiteralExpression */:
- return ts.updateArrayLiteral(node, visitNodes(node.elements, visitor, ts.isExpression));
- case 176 /* ObjectLiteralExpression */:
- return ts.updateObjectLiteral(node, visitNodes(node.properties, visitor, ts.isObjectLiteralElementLike));
- case 177 /* PropertyAccessExpression */:
- return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
- case 178 /* ElementAccessExpression */:
- return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
- case 179 /* CallExpression */:
- return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 180 /* NewExpression */:
- return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 181 /* TaggedTemplateExpression */:
- return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
- case 183 /* ParenthesizedExpression */:
- return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
- case 184 /* FunctionExpression */:
- return ts.updateFunctionExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 185 /* ArrowFunction */:
- return ts.updateArrowFunction(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 186 /* DeleteExpression */:
- return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
- case 187 /* TypeOfExpression */:
- return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
- case 188 /* VoidExpression */:
- return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
- case 189 /* AwaitExpression */:
- return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 192 /* BinaryExpression */:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
- case 190 /* PrefixUnaryExpression */:
- return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 191 /* PostfixUnaryExpression */:
- return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 193 /* ConditionalExpression */:
- return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
- case 194 /* TemplateExpression */:
- return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), visitNodes(node.templateSpans, visitor, ts.isTemplateSpan));
- case 195 /* YieldExpression */:
- return ts.updateYield(node, visitNode(node.expression, visitor, ts.isExpression));
- case 196 /* SpreadElement */:
- return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
- case 197 /* ClassExpression */:
- return ts.updateClassExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 199 /* ExpressionWithTypeArguments */:
- return ts.updateExpressionWithTypeArguments(node, visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
- // Misc
- case 202 /* TemplateSpan */:
- return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
- // Element
- case 204 /* Block */:
- return ts.updateBlock(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 205 /* VariableStatement */:
- return ts.updateVariableStatement(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
- case 207 /* ExpressionStatement */:
- return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
- case 208 /* IfStatement */:
- return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, /*optional*/ false, liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, /*optional*/ true, liftToBlock));
- case 209 /* DoStatement */:
- return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
- case 210 /* WhileStatement */:
- return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 211 /* ForStatement */:
- return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 212 /* ForInStatement */:
- return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 213 /* ForOfStatement */:
- return ts.updateForOf(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 214 /* ContinueStatement */:
- return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier, /*optional*/ true));
- case 215 /* BreakStatement */:
- return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier, /*optional*/ true));
- case 216 /* ReturnStatement */:
- return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true));
- case 217 /* WithStatement */:
- return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 218 /* SwitchStatement */:
- return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
- case 219 /* LabeledStatement */:
- return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 220 /* ThrowStatement */:
- return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
- case 221 /* TryStatement */:
- return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause, /*optional*/ true), visitNode(node.finallyBlock, visitor, ts.isBlock, /*optional*/ true));
- case 223 /* VariableDeclaration */:
- return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- case 224 /* VariableDeclarationList */:
- return ts.updateVariableDeclarationList(node, visitNodes(node.declarations, visitor, ts.isVariableDeclaration));
- case 225 /* FunctionDeclaration */:
- return ts.updateFunctionDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 226 /* ClassDeclaration */:
- return ts.updateClassDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 232 /* CaseBlock */:
- return ts.updateCaseBlock(node, visitNodes(node.clauses, visitor, ts.isCaseOrDefaultClause));
- case 235 /* ImportDeclaration */:
- return ts.updateImportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause, /*optional*/ true), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
- case 236 /* ImportClause */:
- return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings, /*optional*/ true));
- case 237 /* NamespaceImport */:
- return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
- case 238 /* NamedImports */:
- return ts.updateNamedImports(node, visitNodes(node.elements, visitor, ts.isImportSpecifier));
- case 239 /* ImportSpecifier */:
- return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.name, visitor, ts.isIdentifier));
- case 240 /* ExportAssignment */:
- return ts.updateExportAssignment(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
- case 241 /* ExportDeclaration */:
- return ts.updateExportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports, /*optional*/ true), visitNode(node.moduleSpecifier, visitor, ts.isExpression, /*optional*/ true));
- case 242 /* NamedExports */:
- return ts.updateNamedExports(node, visitNodes(node.elements, visitor, ts.isExportSpecifier));
- case 243 /* ExportSpecifier */:
- return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.name, visitor, ts.isIdentifier));
- // JSX
- case 246 /* JsxElement */:
- return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), visitNodes(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 247 /* JsxSelfClosingElement */:
- return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 248 /* JsxOpeningElement */:
- return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 249 /* JsxClosingElement */:
- return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
- case 250 /* JsxAttribute */:
- return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
- case 251 /* JsxSpreadAttribute */:
- return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
- case 252 /* JsxExpression */:
- return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- // Clauses
- case 253 /* CaseClause */:
- return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.statements, visitor, ts.isStatement));
- case 254 /* DefaultClause */:
- return ts.updateDefaultClause(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 255 /* HeritageClause */:
- return ts.updateHeritageClause(node, visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments));
- case 256 /* CatchClause */:
- return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
- // Property assignments
- case 257 /* PropertyAssignment */:
- return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
- case 258 /* ShorthandPropertyAssignment */:
- return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
- case 259 /* SpreadAssignment */:
- return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
- // Top-level nodes
- case 261 /* SourceFile */:
- return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- // Transformation nodes
- case 294 /* PartiallyEmittedExpression */:
- return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- default:
- var updated = void 0;
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_2 = edgeTraversalPath; _i < edgeTraversalPath_2.length; _i++) {
- var edge = edgeTraversalPath_2[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- var visited = ts.isArray(value)
- ? visitNodes(value, visitor, edge.test, 0, value.length, edge.parenthesize, node)
- : visitNode(value, visitor, edge.test, edge.optional, edge.lift, edge.parenthesize, node);
- if (updated !== undefined || visited !== value) {
- if (updated === undefined) {
- updated = ts.getMutableClone(node);
- }
- if (visited !== value) {
- updated[edge.name] = visited;
- }
- }
- }
- }
- }
- return updated ? ts.updateNode(updated, node) : node;
- }
- // return node;
- }
- ts.visitEachChild = visitEachChild;
function mergeLexicalEnvironment(statements, declarations) {
if (!ts.some(declarations)) {
return statements;
}
return ts.isNodeArray(statements)
- ? ts.createNodeArray(ts.concatenate(statements, declarations), statements)
+ ? ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements)
: ts.addRange(statements, declarations);
}
ts.mergeLexicalEnvironment = mergeLexicalEnvironment;
- function mergeFunctionBodyLexicalEnvironment(body, declarations) {
- if (body && declarations !== undefined && declarations.length > 0) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.createNodeArray(ts.concatenate(body.statements, declarations), body.statements));
- }
- else {
- return ts.createBlock(ts.createNodeArray([ts.createReturn(body, /*location*/ body)].concat(declarations), body),
- /*location*/ body,
- /*multiLine*/ true);
- }
- }
- return body;
- }
- ts.mergeFunctionBodyLexicalEnvironment = mergeFunctionBodyLexicalEnvironment;
/**
* Lifts a NodeArray containing only Statement nodes to a block.
*
@@ -44576,15 +48130,6 @@ var ts;
}
ts.liftToBlock = liftToBlock;
/**
- * Extracts the single node from a NodeArray.
- *
- * @param nodes The NodeArray.
- */
- function extractSingleNode(nodes) {
- Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
- return ts.singleOrUndefined(nodes);
- }
- /**
* Aggregates the TransformFlags for a Node and its subtree.
*/
function aggregateTransformFlags(node) {
@@ -44629,7 +48174,7 @@ var ts;
function aggregateTransformFlagsForSubtree(node) {
// We do not transform ambient declarations or types, so there is no need to
// recursively aggregate transform flags.
- if (ts.hasModifier(node, 2 /* Ambient */) || ts.isTypeNode(node)) {
+ if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 200 /* ExpressionWithTypeArguments */)) {
return 0 /* None */;
}
// Aggregate the transform flags of each child.
@@ -44647,9 +48192,6 @@ var ts;
}
var Debug;
(function (Debug) {
- Debug.failNotOptional = Debug.shouldAssert(1 /* Normal */)
- ? function (message) { return Debug.assert(false, message || "Node not optional."); }
- : ts.noop;
Debug.failBadSyntaxKind = Debug.shouldAssert(1 /* Normal */)
? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
: ts.noop;
@@ -44682,7 +48224,6 @@ var ts;
}
}
})(Debug = ts.Debug || (ts.Debug = {}));
- var _a;
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
@@ -44710,7 +48251,7 @@ var ts;
var value;
if (ts.isDestructuringAssignment(node)) {
value = node.right;
- while (ts.isEmptyObjectLiteralOrArrayLiteral(node.left)) {
+ while (ts.isEmptyArrayLiteral(node.left) || ts.isEmptyObjectLiteral(node.left)) {
if (ts.isDestructuringAssignment(value)) {
location = node = value;
value = node.right;
@@ -44724,6 +48265,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: true,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -44772,7 +48314,7 @@ var ts;
ts.Debug.assertNode(target, createAssignmentCallback ? ts.isIdentifier : ts.isExpression);
var expression = createAssignmentCallback
? createAssignmentCallback(target, value, location)
- : ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value, location);
+ : ts.setTextRange(ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value), location);
expression.original = original;
emitExpression(expression);
}
@@ -44796,6 +48338,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: hoistTempVariables,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -44821,11 +48364,12 @@ var ts;
}
}
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
- var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name_29 = _a.name, value = _a.value, location_2 = _a.location, original = _a.original;
- var variable = ts.createVariableDeclaration(name_29,
- /*type*/ undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value, location_2);
+ var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
+ var variable = ts.createVariableDeclaration(name,
+ /*type*/ undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
variable.original = original;
- if (ts.isIdentifier(name_29)) {
+ ts.setTextRange(variable, location);
+ if (ts.isIdentifier(name)) {
ts.setEmitFlags(variable, 64 /* NoNestedSourceMaps */);
}
ts.aggregateTransformFlags(variable);
@@ -44947,7 +48491,14 @@ var ts;
function flattenArrayBindingOrAssignmentPattern(flattenContext, parent, pattern, value, location) {
var elements = ts.getElementsOfBindingOrAssignmentPattern(pattern);
var numElements = elements.length;
- if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0)) {
+ if (flattenContext.level < 1 /* ObjectRest */ && flattenContext.downlevelIteration) {
+ // Read the elements of the iterable into an array
+ value = ensureIdentifier(flattenContext, ts.createReadHelper(flattenContext.context, value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
+ ? undefined
+ : numElements, location),
+ /*reuseIdentifierExpressions*/ false, location);
+ }
+ else if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0)) {
// For anything other than a single-element destructuring we need to generate a temporary
// to ensure value is evaluated exactly once. Additionally, if we have zero elements
// we need to emit *something* to ensure that in case a 'var' keyword was already emitted,
@@ -45029,8 +48580,8 @@ var ts;
return ts.createElementAccess(value, argumentExpression);
}
else {
- var name_30 = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
- return ts.createPropertyAccess(value, name_30);
+ var name = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
+ return ts.createPropertyAccess(value, name);
}
}
/**
@@ -45052,7 +48603,7 @@ var ts;
var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
if (flattenContext.hoistTempVariables) {
flattenContext.context.hoistVariableDeclaration(temp);
- flattenContext.emitExpression(ts.createAssignment(temp, value, location));
+ flattenContext.emitExpression(ts.setTextRange(ts.createAssignment(temp, value), location));
}
else {
flattenContext.emitBindingOrAssignment(temp, value, location, /*original*/ undefined);
@@ -45075,7 +48626,7 @@ var ts;
return ts.createObjectLiteral(ts.map(elements, ts.convertToObjectAssignmentElement));
}
function makeBindingElement(name) {
- return ts.createBindingElement(/*propertyName*/ undefined, /*dotDotDotToken*/ undefined, name);
+ return ts.createBindingElement(/*dotDotDotToken*/ undefined, /*propertyName*/ undefined, name);
}
function makeAssignmentElement(name) {
return name;
@@ -45083,10 +48634,11 @@ var ts;
var restHelper = {
name: "typescript:rest",
scoped: false,
- text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
+ text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
};
/** Given value: o, propName: p, pattern: { a, b, ...p } from the original statement
- * `{ a, b, ...p } = o`, create `p = __rest(o, ["a", "b"]);`*/
+ * `{ a, b, ...p } = o`, create `p = __rest(o, ["a", "b"]);`
+ */
function createRestCall(context, value, elements, computedTempVariables, location) {
context.requestEmitHelper(restHelper);
var propertyNames = [];
@@ -45105,7 +48657,11 @@ var ts;
}
}
}
- return ts.createCall(ts.getHelperName("__rest"), undefined, [value, ts.createArrayLiteral(propertyNames, location)]);
+ return ts.createCall(ts.getHelperName("__rest"),
+ /*typeArguments*/ undefined, [
+ value,
+ ts.setTextRange(ts.createArrayLiteral(propertyNames), location)
+ ]);
}
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
@@ -45140,8 +48696,8 @@ var ts;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
// Enable substitution for property/element access to emit const enum values.
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(178 /* ElementAccessExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
// These variables contain state that changes as we descend into the tree.
var currentSourceFile;
var currentNamespace;
@@ -45205,15 +48761,15 @@ var ts;
*/
function onBeforeVisitNode(node) {
switch (node.kind) {
- case 261 /* SourceFile */:
- case 232 /* CaseBlock */:
- case 231 /* ModuleBlock */:
- case 204 /* Block */:
+ case 264 /* SourceFile */:
+ case 234 /* CaseBlock */:
+ case 233 /* ModuleBlock */:
+ case 206 /* Block */:
currentScope = node;
currentScopeFirstDeclarationsOfName = undefined;
break;
- case 226 /* ClassDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 227 /* FunctionDeclaration */:
if (ts.hasModifier(node, 2 /* Ambient */)) {
break;
}
@@ -45260,13 +48816,13 @@ var ts;
*/
function sourceElementVisitorWorker(node) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitImportEqualsDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitExportAssignment(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return visitExportDeclaration(node);
default:
return visitorWorker(node);
@@ -45286,11 +48842,11 @@ var ts;
* @param node The node to visit.
*/
function namespaceElementVisitorWorker(node) {
- if (node.kind === 241 /* ExportDeclaration */ ||
- node.kind === 235 /* ImportDeclaration */ ||
- node.kind === 236 /* ImportClause */ ||
- (node.kind === 234 /* ImportEqualsDeclaration */ &&
- node.moduleReference.kind === 245 /* ExternalModuleReference */)) {
+ if (node.kind === 243 /* ExportDeclaration */ ||
+ node.kind === 237 /* ImportDeclaration */ ||
+ node.kind === 238 /* ImportClause */ ||
+ (node.kind === 236 /* ImportEqualsDeclaration */ &&
+ node.moduleReference.kind === 247 /* ExternalModuleReference */)) {
// do not emit ES6 imports and exports since they are illegal inside a namespace
return undefined;
}
@@ -45320,19 +48876,19 @@ var ts;
*/
function classElementVisitorWorker(node) {
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// TypeScript constructors are transformed in `visitClassDeclaration`.
// We elide them here as `visitorWorker` checks transform flags, which could
// erronously include an ES6 constructor without TypeScript syntax.
return undefined;
- case 147 /* PropertyDeclaration */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
// Fallback to the default visit behavior.
return visitorWorker(node);
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
return node;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -45372,46 +48928,47 @@ var ts;
case 123 /* DeclareKeyword */:
case 130 /* ReadonlyKeyword */:
// TypeScript accessibility and readonly modifiers are elided.
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 161 /* TypeLiteral */:
- case 156 /* TypePredicate */:
- case 143 /* TypeParameter */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 162 /* TypeLiteral */:
+ case 157 /* TypePredicate */:
+ case 144 /* TypeParameter */:
case 118 /* AnyKeyword */:
case 121 /* BooleanKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
case 104 /* VoidKeyword */:
- case 135 /* SymbolKeyword */:
- case 159 /* ConstructorType */:
- case 158 /* FunctionType */:
- case 160 /* TypeQuery */:
- case 157 /* TypeReference */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
- case 167 /* ThisType */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 171 /* LiteralType */:
+ case 136 /* SymbolKeyword */:
+ case 160 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 161 /* TypeQuery */:
+ case 158 /* TypeReference */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
+ case 168 /* ThisType */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 172 /* LiteralType */:
// TypeScript type nodes are elided.
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
// TypeScript index signatures are elided.
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// TypeScript decorators are elided. They will be emitted as part of visitClassDeclaration.
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
// TypeScript type-only declarations are elided.
- case 147 /* PropertyDeclaration */:
- // TypeScript property declarations are elided.
- case 150 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ // TypeScript property declarations are elided.
+ return undefined;
+ case 151 /* Constructor */:
return visitConstructor(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
// TypeScript interfaces are elided, but some comments may be preserved.
// See the implementation of `getLeadingComments` in comments.ts for more details.
return ts.createNotEmittedStatement(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
// This is a class declaration with TypeScript syntax extensions.
//
// TypeScript class syntax extensions include:
@@ -45422,7 +48979,7 @@ var ts;
// - index signatures
// - method overload signatures
return visitClassDeclaration(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
// This is a class expression with TypeScript syntax extensions.
//
// TypeScript class syntax extensions include:
@@ -45433,35 +48990,35 @@ var ts;
// - index signatures
// - method overload signatures
return visitClassExpression(node);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
// This is a heritage clause with TypeScript syntax extensions.
//
// TypeScript heritage clause extensions include:
// - `implements` clause
return visitHeritageClause(node);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
// TypeScript supports type arguments on an expression in an `extends` heritage clause.
return visitExpressionWithTypeArguments(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
// TypeScript method declarations may have decorators, modifiers
// or type annotations.
return visitMethodDeclaration(node);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
// Get Accessors can have TypeScript modifiers, decorators, and type annotations.
return visitGetAccessor(node);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
// Set Accessors can have TypeScript modifiers and type annotations.
return visitSetAccessor(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
// Typescript function declarations can have modifiers, decorators, and type annotations.
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
// TypeScript function expressions can have modifiers and type annotations.
return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
// TypeScript arrow functions can have modifiers and type annotations.
return visitArrowFunction(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// This is a parameter declaration with TypeScript syntax extensions.
//
// TypeScript parameter declaration syntax extensions include:
@@ -45471,33 +49028,33 @@ var ts;
// - type annotations
// - this parameters
return visitParameter(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
// ParenthesizedExpressions are TypeScript if their expression is a
// TypeAssertion or AsExpression
return visitParenthesizedExpression(node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
// TypeScript type assertions are removed, but their subtrees are preserved.
return visitAssertionExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
// TypeScript non-null expressions are removed, but their subtrees are preserved.
return visitNonNullExpression(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
// TypeScript enum declarations do not exist in ES6 and must be rewritten.
return visitEnumDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// TypeScript namespace exports for variable statements must be transformed.
return visitVariableStatement(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// TypeScript namespace declarations must be transformed.
return visitModuleDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// TypeScript namespace or external module import.
return visitImportEqualsDeclaration(node);
default:
@@ -45506,7 +49063,8 @@ var ts;
}
}
function visitSourceFile(node) {
- var alwaysStrict = compilerOptions.alwaysStrict && !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
+ var alwaysStrict = (compilerOptions.alwaysStrict === undefined ? compilerOptions.strict : compilerOptions.alwaysStrict) &&
+ !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
return ts.updateSourceFileNode(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, /*start*/ 0, alwaysStrict));
}
/**
@@ -45602,13 +49160,14 @@ var ts;
// }
var classDeclaration = ts.createClassDeclaration(
/*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name,
- /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause), node);
- var emitFlags = ts.getEmitFlags(node);
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause));
// To better align with the old emitter, we should not emit a trailing source map
// entry if the class has static properties.
+ var emitFlags = ts.getEmitFlags(node);
if (hasStaticProperties) {
emitFlags |= 32 /* NoTrailingSourceMap */;
}
+ ts.setTextRange(classDeclaration, node);
ts.setOriginalNode(classDeclaration, node);
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
@@ -45716,12 +49275,18 @@ var ts;
// }
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, hasExtendsClause);
- var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members, location);
+ var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, location);
// let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference
// or decoratedClassAlias if the class contain self-reference.
- var statement = ts.createLetStatement(declName, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression, location);
+ var statement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(declName,
+ /*type*/ undefined, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression)
+ ], 1 /* Let */));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, location);
ts.setCommentRange(statement, node);
return statement;
}
@@ -45738,10 +49303,11 @@ var ts;
var staticProperties = getInitializedProperties(node, /*isStatic*/ true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84 /* ExtendsKeyword */; }));
- var classExpression = ts.setOriginalNode(ts.createClassExpression(
+ var classExpression = ts.createClassExpression(
/*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, heritageClauses, members,
- /*location*/ node), node);
+ /*typeParameters*/ undefined, heritageClauses, members);
+ ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, node);
if (staticProperties.length > 0) {
var expressions = [];
var temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -45773,7 +49339,7 @@ var ts;
members.push(constructor);
}
ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
- return ts.createNodeArray(members, /*location*/ node.members);
+ return ts.setTextRange(ts.createNodeArray(members), /*location*/ node.members);
}
/**
* Transforms (or creates) a constructor for a class.
@@ -45798,10 +49364,9 @@ var ts;
// constructor(${parameters}) {
// ${body}
// }
- return ts.startOnNewLine(ts.setOriginalNode(ts.createConstructor(
+ return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor(
/*decorators*/ undefined,
- /*modifiers*/ undefined, parameters, body,
- /*location*/ constructor || node), constructor));
+ /*modifiers*/ undefined, parameters, body), constructor || node), constructor));
}
/**
* Transforms (or creates) the parameters for the constructor of a class with
@@ -45883,11 +49448,11 @@ var ts;
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
}
// End the lexical environment.
- ts.addRange(statements, endLexicalEnvironment());
- return ts.createBlock(ts.createNodeArray(statements,
+ statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+ return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ constructor ? constructor.body.statements : node.members),
- /*location*/ constructor ? constructor.body : undefined,
- /*multiLine*/ true);
+ /*multiLine*/ true),
+ /*location*/ constructor ? constructor.body : undefined);
}
/**
* Adds super call and preceding prologue directives into the list of statements.
@@ -45899,13 +49464,13 @@ var ts;
if (ctor.body) {
var statements = ctor.body.statements;
// add prologue directives to the list (if any)
- var index = ts.addPrologueDirectives(result, statements, /*ensureUseStrict*/ false, visitor);
+ var index = ts.addPrologue(result, statements, /*ensureUseStrict*/ false, visitor);
if (index === statements.length) {
// list contains nothing but prologue directives (or empty) - exit
return index;
}
var statement = statements[index];
- if (statement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
result.push(ts.visitNode(statement, visitor, ts.isStatement));
return index + 1;
}
@@ -45942,9 +49507,7 @@ var ts;
ts.setEmitFlags(propertyName, 1536 /* NoComments */ | 48 /* NoSourceMap */);
var localName = ts.getMutableClone(name);
ts.setEmitFlags(localName, 1536 /* NoComments */);
- return ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), propertyName,
- /*location*/ node.name), localName),
- /*location*/ ts.moveRangePos(node, -1)));
+ return ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)));
}
/**
* Gets all property declarations with initializers on either the static or instance side of a class.
@@ -45978,7 +49541,7 @@ var ts;
* @param isStatic A value indicating whether the member should be a static or instance member.
*/
function isInitializedProperty(member, isStatic) {
- return member.kind === 147 /* PropertyDeclaration */
+ return member.kind === 148 /* PropertyDeclaration */
&& isStatic === ts.hasModifier(member, 32 /* Static */)
&& member.initializer !== undefined;
}
@@ -45989,8 +49552,8 @@ var ts;
* @param receiver The receiver on which each property should be assigned.
*/
function addInitializedPropertyStatements(statements, properties, receiver) {
- for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
- var property = properties_7[_i];
+ for (var _i = 0, properties_9 = properties; _i < properties_9.length; _i++) {
+ var property = properties_9[_i];
var statement = ts.createStatement(transformInitializedProperty(property, receiver));
ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property));
ts.setCommentRange(statement, property);
@@ -46005,8 +49568,8 @@ var ts;
*/
function generateInitializedPropertyExpressions(properties, receiver) {
var expressions = [];
- for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
- var property = properties_8[_i];
+ for (var _i = 0, properties_10 = properties; _i < properties_10.length; _i++) {
+ var property = properties_10[_i];
var expression = transformInitializedProperty(property, receiver);
expression.startsOnNewLine = true;
ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property));
@@ -46113,12 +49676,12 @@ var ts;
*/
function getAllDecoratorsOfClassElement(node, member) {
switch (member.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return getAllDecoratorsOfAccessors(node, member);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return getAllDecoratorsOfMethod(member);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return getAllDecoratorsOfProperty(member);
default:
return undefined;
@@ -46135,10 +49698,11 @@ var ts;
return undefined;
}
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
- if (accessor !== firstAccessor) {
+ var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
+ if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
return undefined;
}
- var decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
+ var decorators = firstAccessorWithDecorators.decorators;
var parameters = getDecoratorsOfParameters(setAccessor);
if (!decorators && !parameters) {
return undefined;
@@ -46179,14 +49743,14 @@ var ts;
* @param node The declaration node.
* @param allDecorators An object containing all of the decorators for the declaration.
*/
- function transformAllDecoratorsOfDeclaration(node, allDecorators) {
+ function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
if (!allDecorators) {
return undefined;
}
var decoratorExpressions = [];
ts.addRange(decoratorExpressions, ts.map(allDecorators.decorators, transformDecorator));
ts.addRange(decoratorExpressions, ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
- addTypeMetadata(node, decoratorExpressions);
+ addTypeMetadata(node, container, decoratorExpressions);
return decoratorExpressions;
}
/**
@@ -46233,7 +49797,7 @@ var ts;
*/
function generateClassElementDecorationExpression(node, member) {
var allDecorators = getAllDecoratorsOfClassElement(node, member);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -46270,7 +49834,7 @@ var ts;
var prefix = getClassMemberPrefix(node, member);
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true);
var descriptor = languageVersion > 0 /* ES3 */
- ? member.kind === 147 /* PropertyDeclaration */
+ ? member.kind === 148 /* PropertyDeclaration */
? ts.createVoidZero()
: ts.createNull()
: undefined;
@@ -46296,7 +49860,7 @@ var ts;
*/
function generateConstructorDecorationExpression(node) {
var allDecorators = getAllDecoratorsOfConstructor(node);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -46342,41 +49906,41 @@ var ts;
* @param node The declaration node.
* @param decoratorExpressions The destination array to which to add new decorator expressions.
*/
- function addTypeMetadata(node, decoratorExpressions) {
+ function addTypeMetadata(node, container, decoratorExpressions) {
if (USE_NEW_TYPE_METADATA_FORMAT) {
- addNewTypeMetadata(node, decoratorExpressions);
+ addNewTypeMetadata(node, container, decoratorExpressions);
}
else {
- addOldTypeMetadata(node, decoratorExpressions);
+ addOldTypeMetadata(node, container, decoratorExpressions);
}
}
- function addOldTypeMetadata(node, decoratorExpressions) {
+ function addOldTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
if (shouldAddTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:type", serializeTypeOfNode(node)));
}
if (shouldAddParamTypesMetadata(node)) {
- decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node, container)));
}
if (shouldAddReturnTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:returntype", serializeReturnTypeOfNode(node)));
}
}
}
- function addNewTypeMetadata(node, decoratorExpressions) {
+ function addNewTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
var properties = void 0;
if (shouldAddTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeTypeOfNode(node))));
}
if (shouldAddParamTypesMetadata(node)) {
- (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node))));
+ (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container))));
}
if (shouldAddReturnTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node))));
}
if (properties) {
- decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*multiLine*/ true)));
}
}
}
@@ -46389,10 +49953,10 @@ var ts;
*/
function shouldAddTypeMetadata(node) {
var kind = node.kind;
- return kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 147 /* PropertyDeclaration */;
+ return kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 148 /* PropertyDeclaration */;
}
/**
* Determines whether to emit the "design:returntype" metadata based on the node's kind.
@@ -46402,7 +49966,7 @@ var ts;
* @param node The node to test.
*/
function shouldAddReturnTypeMetadata(node) {
- return node.kind === 149 /* MethodDeclaration */;
+ return node.kind === 150 /* MethodDeclaration */;
}
/**
* Determines whether to emit the "design:paramtypes" metadata based on the node's kind.
@@ -46412,12 +49976,16 @@ var ts;
* @param node The node to test.
*/
function shouldAddParamTypesMetadata(node) {
- var kind = node.kind;
- return kind === 226 /* ClassDeclaration */
- || kind === 197 /* ClassExpression */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */;
+ switch (node.kind) {
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ return ts.getFirstConstructorWithBody(node) !== undefined;
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return true;
+ }
+ return false;
}
/**
* Serializes the type of a node for use with decorator type metadata.
@@ -46426,43 +49994,26 @@ var ts;
*/
function serializeTypeOfNode(node) {
switch (node.kind) {
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
- case 151 /* GetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
+ case 152 /* GetAccessor */:
return serializeTypeNode(node.type);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node));
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 149 /* MethodDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 150 /* MethodDeclaration */:
return ts.createIdentifier("Function");
default:
return ts.createVoidZero();
}
}
/**
- * Gets the most likely element type for a TypeNode. This is not an exhaustive test
- * as it assumes a rest argument can only be an array type (either T[], or Array<T>).
- *
- * @param node The type node.
- */
- function getRestParameterElementType(node) {
- if (node && node.kind === 162 /* ArrayType */) {
- return node.elementType;
- }
- else if (node && node.kind === 157 /* TypeReference */) {
- return ts.singleOrUndefined(node.typeArguments);
- }
- else {
- return undefined;
- }
- }
- /**
* Serializes the types of the parameters of a node for use with decorator type metadata.
*
* @param node The node that should have its parameter types serialized.
*/
- function serializeParameterTypesOfNode(node) {
+ function serializeParameterTypesOfNode(node, container) {
var valueDeclaration = ts.isClassLike(node)
? ts.getFirstConstructorWithBody(node)
: ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)
@@ -46470,7 +50021,7 @@ var ts;
: undefined;
var expressions = [];
if (valueDeclaration) {
- var parameters = valueDeclaration.parameters;
+ var parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);
var numParameters = parameters.length;
for (var i = 0; i < numParameters; i++) {
var parameter = parameters[i];
@@ -46478,7 +50029,7 @@ var ts;
continue;
}
if (parameter.dotDotDotToken) {
- expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));
+ expressions.push(serializeTypeNode(ts.getRestParameterElementType(parameter.type)));
}
else {
expressions.push(serializeTypeOfNode(parameter));
@@ -46487,6 +50038,15 @@ var ts;
}
return ts.createArrayLiteral(expressions);
}
+ function getParametersOfDecoratedDeclaration(node, container) {
+ if (container && node.kind === 152 /* GetAccessor */) {
+ var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
+ if (setAccessor) {
+ return setAccessor.parameters;
+ }
+ }
+ return node.parameters;
+ }
/**
* Serializes the return type of a node for use with decorator type metadata.
*
@@ -46496,7 +50056,7 @@ var ts;
if (ts.isFunctionLike(node) && node.type) {
return serializeTypeNode(node.type);
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if (ts.isAsyncFunction(node)) {
return ts.createIdentifier("Promise");
}
return ts.createVoidZero();
@@ -46525,21 +50085,26 @@ var ts;
}
switch (node.kind) {
case 104 /* VoidKeyword */:
+ case 138 /* UndefinedKeyword */:
+ case 94 /* NullKeyword */:
+ case 129 /* NeverKeyword */:
return ts.createVoidZero();
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return serializeTypeNode(node.type);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return ts.createIdentifier("Function");
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
return ts.createIdentifier("Array");
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
case 121 /* BooleanKeyword */:
return ts.createIdentifier("Boolean");
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
return ts.createIdentifier("String");
- case 171 /* LiteralType */:
+ case 133 /* ObjectKeyword */:
+ return ts.createIdentifier("Object");
+ case 172 /* LiteralType */:
switch (node.literal.kind) {
case 9 /* StringLiteral */:
return ts.createIdentifier("String");
@@ -46555,49 +50120,22 @@ var ts;
break;
case 132 /* NumberKeyword */:
return ts.createIdentifier("Number");
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
return languageVersion < 2 /* ES2015 */
? getGlobalSymbolNameWithFallback()
: ts.createIdentifier("Symbol");
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return serializeTypeReferenceNode(node);
- case 165 /* IntersectionType */:
- case 164 /* UnionType */:
- {
- var unionOrIntersection = node;
- var serializedUnion = void 0;
- for (var _i = 0, _a = unionOrIntersection.types; _i < _a.length; _i++) {
- var typeNode = _a[_i];
- var serializedIndividual = serializeTypeNode(typeNode);
- // Non identifier
- if (serializedIndividual.kind !== 70 /* Identifier */) {
- serializedUnion = undefined;
- break;
- }
- // One of the individual is global object, return immediately
- if (serializedIndividual.text === "Object") {
- return serializedIndividual;
- }
- // Different types
- if (serializedUnion && serializedUnion.text !== serializedIndividual.text) {
- serializedUnion = undefined;
- break;
- }
- serializedUnion = serializedIndividual;
- }
- // If we were able to find common type
- if (serializedUnion) {
- return serializedUnion;
- }
- }
- // Fallthrough
- case 160 /* TypeQuery */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 161 /* TypeLiteral */:
+ case 166 /* IntersectionType */:
+ case 165 /* UnionType */:
+ return serializeUnionOrIntersectionType(node);
+ case 161 /* TypeQuery */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 162 /* TypeLiteral */:
case 118 /* AnyKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -46605,6 +50143,37 @@ var ts;
}
return ts.createIdentifier("Object");
}
+ function serializeUnionOrIntersectionType(node) {
+ var serializedUnion;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var serializedIndividual = serializeTypeNode(typeNode);
+ if (ts.isVoidExpression(serializedIndividual)) {
+ // If we dont have any other type already set, set the initial type
+ if (!serializedUnion) {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ else if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
+ // One of the individual is global object, return immediately
+ return serializedIndividual;
+ }
+ else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ // Different types
+ if (!ts.isIdentifier(serializedUnion) ||
+ !ts.isIdentifier(serializedIndividual) ||
+ serializedUnion.text !== serializedIndividual.text) {
+ return ts.createIdentifier("Object");
+ }
+ }
+ else {
+ // Initialize the union type
+ serializedUnion = serializedIndividual;
+ }
+ }
+ // If we were able to find common type, use it
+ return serializedUnion;
+ }
/**
* Serializes a TypeReferenceNode to an appropriate JS constructor value for use with
* decorator type metadata.
@@ -46654,15 +50223,15 @@ var ts;
case 70 /* Identifier */:
// Create a clone of the name with a new parent, and treat it as if it were
// a source tree node for the purposes of the checker.
- var name_31 = ts.getMutableClone(node);
- name_31.flags &= ~8 /* Synthesized */;
- name_31.original = undefined;
- name_31.parent = currentScope;
+ var name = ts.getMutableClone(node);
+ name.flags &= ~8 /* Synthesized */;
+ name.original = undefined;
+ name.parent = currentScope;
if (useFallback) {
- return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name_31), ts.createLiteral("undefined")), name_31);
+ return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name);
}
- return name_31;
- case 141 /* QualifiedName */:
+ return name;
+ case 142 /* QualifiedName */:
return serializeQualifiedNameAsExpression(node, useFallback);
}
}
@@ -46708,7 +50277,7 @@ var ts;
: name.expression;
}
else if (ts.isIdentifier(name)) {
- return ts.createLiteral(name.text);
+ return ts.createLiteral(ts.unescapeIdentifier(name.text));
}
else {
return ts.getSynthesizedClone(name);
@@ -46730,7 +50299,7 @@ var ts;
hoistVariableDeclaration(generatedName);
expression = ts.createAssignment(generatedName, expression);
}
- return ts.setOriginalNode(ts.createComputedPropertyName(expression, /*location*/ name), name);
+ return ts.updateComputedPropertyName(name, expression);
}
else {
return name;
@@ -46748,7 +50317,7 @@ var ts;
function visitHeritageClause(node) {
if (node.token === 84 /* ExtendsKeyword */) {
var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1);
- return ts.createHeritageClause(84 /* ExtendsKeyword */, types, node);
+ return ts.setTextRange(ts.createHeritageClause(84 /* ExtendsKeyword */, types), node);
}
return undefined;
}
@@ -46761,9 +50330,8 @@ var ts;
* @param node The ExpressionWithTypeArguments to transform.
*/
function visitExpressionWithTypeArguments(node) {
- var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
- return ts.createExpressionWithTypeArguments(
- /*typeArguments*/ undefined, expression, node);
+ return ts.updateExpressionWithTypeArguments(node,
+ /*typeArguments*/ undefined, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
}
/**
* Determines whether to emit a function-like declaration. We should not emit the
@@ -46778,7 +50346,7 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- return ts.visitEachChild(node, visitor, context);
+ return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context));
}
/**
* Visits a method declaration of a class.
@@ -46795,7 +50363,8 @@ var ts;
return undefined;
}
var updated = ts.updateMethod(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), visitPropertyNameOfClassElement(node),
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node),
+ /*questionToken*/ undefined,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
if (updated !== node) {
@@ -46877,7 +50446,7 @@ var ts;
return ts.createNotEmittedStatement(node);
}
var updated = ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
if (isNamespaceExport(node)) {
@@ -46896,12 +50465,12 @@ var ts;
* @param node The function expression node.
*/
function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
+ if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createOmittedExpression();
}
- var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
+ var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
+ /*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
return updated;
}
/**
@@ -46933,11 +50502,11 @@ var ts;
/*decorators*/ undefined,
/*modifiers*/ undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
/*questionToken*/ undefined,
- /*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression),
- /*location*/ ts.moveRangePastModifiers(node));
+ /*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
// While we emit the source map for the node after skipping decorators and modifiers,
// we need to emit the comments for the original range.
ts.setOriginalNode(parameter, node);
+ ts.setTextRange(parameter, ts.moveRangePastModifiers(node));
ts.setCommentRange(parameter, node);
ts.setSourceMapRange(parameter, ts.moveRangePastModifiers(node));
ts.setEmitFlags(parameter.name, 32 /* NoTrailingSourceMap */);
@@ -46956,8 +50525,7 @@ var ts;
// elide statement if there are no initialized variables.
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)),
- /*location*/ node);
+ return ts.setTextRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -46970,7 +50538,7 @@ var ts;
/*needsValue*/ false, createNamespaceExportExpression);
}
else {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression),
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)),
/*location*/ node);
}
}
@@ -46996,13 +50564,13 @@ var ts;
// code if the casted expression has a lower precedence than the rest of the
// expression.
//
+ // To preserve comments, we return a "PartiallyEmittedExpression" here which will
+ // preserve the position information of the original expression.
+ //
// Due to the auto-parenthesization rules used by the visitor and factory functions
// we can safely elide the parentheses here, as a new synthetic
// ParenthesizedExpression will be inserted if we remove parentheses too
// aggressively.
- //
- // To preserve comments, we return a "PartiallyEmittedExpression" here which will
- // preserve the position information of the original expression.
return ts.createPartiallyEmittedExpression(expression, node);
}
return ts.visitEachChild(node, visitor, context);
@@ -47084,9 +50652,9 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
/*type*/ undefined, transformEnumBody(node, containerName)),
- /*typeArguments*/ undefined, [moduleArg]),
- /*location*/ node);
+ /*typeArguments*/ undefined, [moduleArg]));
ts.setOriginalNode(enumStatement, node);
+ ts.setTextRange(enumStatement, node);
ts.setEmitFlags(enumStatement, emitFlags);
statements.push(enumStatement);
// Add a DeclarationMarker for the enum to preserve trailing comments and mark
@@ -47107,8 +50675,7 @@ var ts;
ts.addRange(statements, ts.map(node.members, transformEnumMember));
ts.addRange(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
- return ts.createBlock(ts.createNodeArray(statements, /*location*/ node.members),
- /*location*/ undefined,
+ return ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), /*location*/ node.members),
/*multiLine*/ true);
}
/**
@@ -47121,9 +50688,7 @@ var ts;
// we pass false as 'generateNameForComputedPropertyName' for a backward compatibility purposes
// old emitter always generate 'expression' part of the name as-is.
var name = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ false);
- return ts.createStatement(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name,
- /*location*/ member),
- /*location*/ member);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
}
/**
* Transforms the value of an enum member.
@@ -47176,8 +50741,8 @@ var ts;
if (!currentScopeFirstDeclarationsOfName) {
currentScopeFirstDeclarationsOfName = ts.createMap();
}
- if (!(name in currentScopeFirstDeclarationsOfName)) {
- currentScopeFirstDeclarationsOfName[name] = node;
+ if (!currentScopeFirstDeclarationsOfName.has(name)) {
+ currentScopeFirstDeclarationsOfName.set(name, node);
}
}
}
@@ -47187,9 +50752,9 @@ var ts;
*/
function isFirstEmittedDeclarationInScope(node) {
if (currentScopeFirstDeclarationsOfName) {
- var name_32 = node.symbol && node.symbol.name;
- if (name_32) {
- return currentScopeFirstDeclarationsOfName[name_32] === node;
+ var name = node.symbol && node.symbol.name;
+ if (name) {
+ return currentScopeFirstDeclarationsOfName.get(name) === node;
}
}
return false;
@@ -47206,7 +50771,7 @@ var ts;
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
// Adjust the source map emit to match the old emitter.
- if (node.kind === 229 /* EnumDeclaration */) {
+ if (node.kind === 231 /* EnumDeclaration */) {
ts.setSourceMapRange(statement.declarationList, node);
}
else {
@@ -47298,9 +50863,9 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
/*type*/ undefined, transformModuleBody(node, containerName)),
- /*typeArguments*/ undefined, [moduleArg]),
- /*location*/ node);
+ /*typeArguments*/ undefined, [moduleArg]));
ts.setOriginalNode(moduleStatement, node);
+ ts.setTextRange(moduleStatement, node);
ts.setEmitFlags(moduleStatement, emitFlags);
statements.push(moduleStatement);
// Add a DeclarationMarker for the namespace to preserve trailing comments and mark
@@ -47325,8 +50890,8 @@ var ts;
var statementsLocation;
var blockLocation;
var body = node.body;
- if (body.kind === 231 /* ModuleBlock */) {
- ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement));
+ if (body.kind === 233 /* ModuleBlock */) {
+ saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
statementsLocation = body.statements;
blockLocation = body;
}
@@ -47347,10 +50912,10 @@ var ts;
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
- var block = ts.createBlock(ts.createNodeArray(statements,
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ statementsLocation),
- /*location*/ blockLocation,
/*multiLine*/ true);
+ ts.setTextRange(block, blockLocation);
// namespace hello.hi.world {
// function foo() {}
//
@@ -47371,13 +50936,13 @@ var ts;
// })(hi = hello.hi || (hello.hi = {}));
// })(hello || (hello = {}));
// We only want to emit comment on the namespace which contains block body itself, not the containing namespaces.
- if (body.kind !== 231 /* ModuleBlock */) {
+ if (body.kind !== 233 /* ModuleBlock */) {
ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536 /* NoComments */);
}
return block;
}
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
- if (moduleDeclaration.body.kind === 230 /* ModuleDeclaration */) {
+ if (moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerModule || moduleDeclaration.body;
}
@@ -47394,7 +50959,7 @@ var ts;
return node;
}
// Elide the declaration if the import clause was elided.
- var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause, /*optional*/ true);
+ var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause);
return importClause
? ts.updateImportDeclaration(node,
/*decorators*/ undefined,
@@ -47409,7 +50974,7 @@ var ts;
function visitImportClause(node) {
// Elide the import clause if we elide both its name and its named bindings.
var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
- var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings, /*optional*/ true);
+ var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined;
}
/**
@@ -47418,7 +50983,7 @@ var ts;
* @param node The named import bindings node.
*/
function visitNamedImportBindings(node) {
- if (node.kind === 237 /* NamespaceImport */) {
+ if (node.kind === 239 /* NamespaceImport */) {
// Elide a namespace import if it is not referenced.
return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
}
@@ -47465,7 +51030,7 @@ var ts;
return undefined;
}
// Elide the export declaration if all of its named exports are elided.
- var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports, /*optional*/ true);
+ var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports);
return exportClause
? ts.updateExportDeclaration(node,
/*decorators*/ undefined,
@@ -47525,10 +51090,10 @@ var ts;
if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
// export var ${name} = ${moduleReference};
// var ${name} = ${moduleReference};
- return ts.setOriginalNode(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
+ return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.setOriginalNode(ts.createVariableDeclaration(node.name,
/*type*/ undefined, moduleReference), node)
- ]), node), node);
+ ])), node), node);
}
else {
// exports.${name} = ${moduleReference};
@@ -47573,7 +51138,7 @@ var ts;
* Creates a statement for the provided expression. This is used in calls to `map`.
*/
function expressionToStatement(expression) {
- return ts.createStatement(expression, /*location*/ undefined);
+ return ts.createStatement(expression);
}
function addExportMemberAssignment(statements, node) {
var expression = ts.createAssignment(ts.getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true), ts.getLocalName(node));
@@ -47583,10 +51148,10 @@ var ts;
statements.push(statement);
}
function createNamespaceExport(exportName, exportValue, location) {
- return ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue), location);
+ return ts.setTextRange(ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue)), location);
}
function createNamespaceExportExpression(exportName, exportValue, location) {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);
}
function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {
return ts.getNamespaceMemberName(currentNamespaceContainerName, name, /*allowComments*/ false, /*allowSourceMaps*/ true);
@@ -47614,7 +51179,7 @@ var ts;
function getClassAliasIfNeeded(node) {
if (resolver.getNodeCheckFlags(node) & 8388608 /* ClassWithConstructorReference */) {
enableSubstitutionForClassAliases();
- var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? node.name.text : "default");
+ var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? ts.unescapeIdentifier(node.name.text) : "default");
classAliases[ts.getOriginalNodeId(node)] = classAlias;
hoistVariableDeclaration(classAlias);
return classAlias;
@@ -47641,7 +51206,7 @@ var ts;
// substitute class names inside of a class declaration.
context.enableSubstitution(70 /* Identifier */);
// Keep track of class aliases.
- classAliases = ts.createMap();
+ classAliases = [];
}
}
function enableSubstitutionForNamespaceExports() {
@@ -47650,44 +51215,49 @@ var ts;
// We need to enable substitutions for identifiers and shorthand property assignments. This allows us to
// substitute the names of exported members of a namespace.
context.enableSubstitution(70 /* Identifier */);
- context.enableSubstitution(258 /* ShorthandPropertyAssignment */);
+ context.enableSubstitution(261 /* ShorthandPropertyAssignment */);
// We need to be notified when entering and exiting namespaces.
- context.enableEmitNotification(230 /* ModuleDeclaration */);
+ context.enableEmitNotification(232 /* ModuleDeclaration */);
}
}
function isTransformedModuleDeclaration(node) {
- return ts.getOriginalNode(node).kind === 230 /* ModuleDeclaration */;
+ return ts.getOriginalNode(node).kind === 232 /* ModuleDeclaration */;
}
function isTransformedEnumDeclaration(node) {
- return ts.getOriginalNode(node).kind === 229 /* EnumDeclaration */;
+ return ts.getOriginalNode(node).kind === 231 /* EnumDeclaration */;
}
/**
* Hook for node emit.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
var savedApplicableSubstitutions = applicableSubstitutions;
+ var savedCurrentSourceFile = currentSourceFile;
+ if (ts.isSourceFile(node)) {
+ currentSourceFile = node;
+ }
if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {
applicableSubstitutions |= 2 /* NamespaceExports */;
}
if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {
applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
applicableSubstitutions = savedApplicableSubstitutions;
+ currentSourceFile = savedCurrentSourceFile;
}
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -47697,16 +51267,16 @@ var ts;
}
function substituteShorthandPropertyAssignment(node) {
if (enabledSubstitutions & 2 /* NamespaceExports */) {
- var name_33 = node.name;
- var exportedName = trySubstituteNamespaceExportedName(name_33);
+ var name = node.name;
+ var exportedName = trySubstituteNamespaceExportedName(name);
if (exportedName) {
// A shorthand property with an assignment initializer is probably part of a
// destructuring assignment
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name_33, initializer, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name_33, exportedName, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedName), node);
}
}
return node;
@@ -47715,9 +51285,9 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return substituteExpressionIdentifier(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return substitutePropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return substituteElementAccessExpression(node);
}
return node;
@@ -47755,11 +51325,12 @@ var ts;
// If we are nested within a namespace declaration, we may need to qualifiy
// an identifier that is exported from a merged namespace.
var container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false);
- if (container && container.kind !== 261 /* SourceFile */) {
- var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 230 /* ModuleDeclaration */) ||
- (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 229 /* EnumDeclaration */);
+ if (container && container.kind !== 264 /* SourceFile */) {
+ var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 232 /* ModuleDeclaration */) ||
+ (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 231 /* EnumDeclaration */);
if (substitute) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node),
+ /*location*/ node);
}
}
}
@@ -47774,16 +51345,15 @@ var ts;
function substituteConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
+ // track the constant value on the node for the printer in needsDotDotForPropertyAccess
+ ts.setConstantValue(node, constantValue);
var substitute = ts.createLiteral(constantValue);
- ts.setSourceMapRange(substitute, node);
- ts.setCommentRange(substitute, node);
if (!compilerOptions.removeComments) {
var propertyName = ts.isPropertyAccessExpression(node)
? ts.declarationNameToString(node.name)
: ts.getTextOfNode(node.argumentExpression);
- substitute.trailingComment = " " + propertyName + " ";
+ ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + propertyName + " ");
}
- ts.setConstantValue(node, constantValue);
return substitute;
}
return node;
@@ -47798,19 +51368,33 @@ var ts;
}
}
ts.transformTypeScript = transformTypeScript;
- var paramHelper = {
- name: "typescript:param",
+ function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
+ var argumentsArray = [];
+ argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, /*multiLine*/ true));
+ argumentsArray.push(target);
+ if (memberName) {
+ argumentsArray.push(memberName);
+ if (descriptor) {
+ argumentsArray.push(descriptor);
+ }
+ }
+ context.requestEmitHelper(decorateHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"),
+ /*typeArguments*/ undefined, argumentsArray), location);
+ }
+ var decorateHelper = {
+ name: "typescript:decorate",
scoped: false,
- priority: 4,
- text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
+ priority: 2,
+ text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
};
- function createParamHelper(context, expression, parameterOffset, location) {
- context.requestEmitHelper(paramHelper);
- return ts.createCall(ts.getHelperName("__param"),
+ function createMetadataHelper(context, metadataKey, metadataValue) {
+ context.requestEmitHelper(metadataHelper);
+ return ts.createCall(ts.getHelperName("__metadata"),
/*typeArguments*/ undefined, [
- ts.createLiteral(parameterOffset),
- expression
- ], location);
+ ts.createLiteral(metadataKey),
+ metadataValue
+ ]);
}
var metadataHelper = {
name: "typescript:metadata",
@@ -47818,41 +51402,391 @@ var ts;
priority: 3,
text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
};
- function createMetadataHelper(context, metadataKey, metadataValue) {
- context.requestEmitHelper(metadataHelper);
- return ts.createCall(ts.getHelperName("__metadata"),
+ function createParamHelper(context, expression, parameterOffset, location) {
+ context.requestEmitHelper(paramHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__param"),
/*typeArguments*/ undefined, [
- ts.createLiteral(metadataKey),
- metadataValue
- ]);
+ ts.createLiteral(parameterOffset),
+ expression
+ ]), location);
}
- var decorateHelper = {
- name: "typescript:decorate",
+ var paramHelper = {
+ name: "typescript:param",
scoped: false,
- priority: 2,
- text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
+ priority: 4,
+ text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
};
- function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
- context.requestEmitHelper(decorateHelper);
- var argumentsArray = [];
- argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, /*location*/ undefined, /*multiLine*/ true));
- argumentsArray.push(target);
- if (memberName) {
- argumentsArray.push(memberName);
- if (descriptor) {
- argumentsArray.push(descriptor);
+})(ts || (ts = {}));
+/// <reference path="../factory.ts" />
+/// <reference path="../visitor.ts" />
+/*@internal*/
+var ts;
+(function (ts) {
+ var ES2017SubstitutionFlags;
+ (function (ES2017SubstitutionFlags) {
+ /** Enables substitutions for async methods with `super` calls. */
+ ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
+ function transformES2017(context) {
+ var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ // These variables contain state that changes as we descend into the tree.
+ var currentSourceFile;
+ /**
+ * Keeps track of whether expression substitution has been enabled for specific edge cases.
+ * They are persisted between each SourceFile transformation and should not be reset.
+ */
+ var enabledSubstitutions;
+ /**
+ * This keeps track of containers where `super` is valid, for use with
+ * just-in-time substitution for `super` expressions inside of async methods.
+ */
+ var enclosingSuperContainerFlags = 0;
+ // Save the previous transformation hooks.
+ var previousOnEmitNode = context.onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ // Set new transformation hooks.
+ context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ if (ts.isDeclarationFile(node)) {
+ return node;
+ }
+ currentSourceFile = node;
+ var visited = ts.visitEachChild(node, visitor, context);
+ ts.addEmitHelpers(visited, context.readEmitHelpers());
+ currentSourceFile = undefined;
+ return visited;
+ }
+ function visitor(node) {
+ if ((node.transformFlags & 16 /* ContainsES2017 */) === 0) {
+ return node;
+ }
+ switch (node.kind) {
+ case 119 /* AsyncKeyword */:
+ // ES2017 async modifier should be elided for targets < ES2017
+ return undefined;
+ case 190 /* AwaitExpression */:
+ return visitAwaitExpression(node);
+ case 150 /* MethodDeclaration */:
+ return visitMethodDeclaration(node);
+ case 227 /* FunctionDeclaration */:
+ return visitFunctionDeclaration(node);
+ case 185 /* FunctionExpression */:
+ return visitFunctionExpression(node);
+ case 186 /* ArrowFunction */:
+ return visitArrowFunction(node);
+ default:
+ return ts.visitEachChild(node, visitor, context);
}
}
- return ts.createCall(ts.getHelperName("__decorate"), /*typeArguments*/ undefined, argumentsArray, location);
+ /**
+ * Visits an AwaitExpression node.
+ *
+ * This function will be called any time a ES2017 await expression is encountered.
+ *
+ * @param node The node to visit.
+ */
+ function visitAwaitExpression(node) {
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(
+ /*asteriskToken*/ undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
+ }
+ /**
+ * Visits a MethodDeclaration node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked as async
+ *
+ * @param node The node to visit.
+ */
+ function visitMethodDeclaration(node) {
+ return ts.updateMethod(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits a FunctionDeclaration node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionDeclaration(node) {
+ return ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits a FunctionExpression node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionExpression(node) {
+ return ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits an ArrowFunction.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitArrowFunction(node) {
+ return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier),
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function transformAsyncFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var original = ts.getOriginalNode(node, ts.isFunctionLike);
+ var nodeType = original.type;
+ var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined;
+ var isArrowFunction = node.kind === 186 /* ArrowFunction */;
+ var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0;
+ // An async function is emit as an outer function that calls an inner
+ // generator function. To preserve lexical bindings, we pass the current
+ // `this` and `arguments` objects to `__awaiter`. The generator function
+ // passed to `__awaiter` is executed inside of the callback to the
+ // promise constructor.
+ if (!isArrowFunction) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
+ statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.createBlock(statements, /*multiLine*/ true);
+ ts.setTextRange(block, node.body);
+ // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
+ // This step isn't needed if we eventually transform this to ES5.
+ if (languageVersion >= 2 /* ES2015 */) {
+ if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
+ }
+ else {
+ var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
+ var declarations = endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(expression);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(ts.concatenate(block.statements, declarations)), block.statements));
+ }
+ return expression;
+ }
+ }
+ function transformFunctionBodyWorker(body, start) {
+ if (ts.isBlock(body)) {
+ return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
+ }
+ else {
+ startLexicalEnvironment();
+ var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
+ var declarations = endLexicalEnvironment();
+ return ts.updateBlock(visited, ts.setTextRange(ts.createNodeArray(ts.concatenate(visited.statements, declarations)), visited.statements));
+ }
+ }
+ function getPromiseConstructor(type) {
+ var typeName = type && ts.getEntityNameFromTypeNode(type);
+ if (typeName && ts.isEntityName(typeName)) {
+ var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
+ if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
+ || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
+ return typeName;
+ }
+ }
+ return undefined;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
+ enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
+ // We need to enable substitutions for call, property access, and element access
+ // if we need to rewrite super calls.
+ context.enableSubstitution(180 /* CallExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
+ // We need to be notified when entering and exiting declarations that bind super.
+ context.enableEmitNotification(228 /* ClassDeclaration */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(151 /* Constructor */);
+ }
+ }
+ /**
+ * Hook for node emit.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emit A callback used to emit the node in the printer.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ // If we need to support substitutions for `super` in an async method,
+ // we should track it here.
+ if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178 /* PropertyAccessExpression */:
+ return substitutePropertyAccessExpression(node);
+ case 179 /* ElementAccessExpression */:
+ return substituteElementAccessExpression(node);
+ case 180 /* CallExpression */:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
+ /*typeArguments*/ undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228 /* ClassDeclaration */
+ || kind === 151 /* Constructor */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), location);
+ }
+ }
+ }
+ ts.transformES2017 = transformES2017;
+ var awaiterHelper = {
+ name: "typescript:awaiter",
+ scoped: false,
+ priority: 5,
+ text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };"
+ };
+ function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
+ context.requestEmitHelper(awaiterHelper);
+ var generatorFunc = ts.createFunctionExpression(
+ /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */),
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ [],
+ /*type*/ undefined, body);
+ // Mark this node as originally an async function
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ return ts.createCall(ts.getHelperName("__awaiter"),
+ /*typeArguments*/ undefined, [
+ ts.createThis(),
+ hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
+ promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
+ generatorFunc
+ ]);
}
+ ts.asyncSuperHelper = {
+ name: "typescript:async-super",
+ scoped: true,
+ text: "\n const _super = name => super[name];\n "
+ };
+ ts.advancedAsyncSuperHelper = {
+ name: "typescript:advanced-async-super",
+ scoped: true,
+ text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "
+ };
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/// <reference path="es2017.ts" />
/*@internal*/
var ts;
(function (ts) {
+ var ESNextSubstitutionFlags;
+ (function (ESNextSubstitutionFlags) {
+ /** Enables substitutions for async methods with `super` calls. */
+ ESNextSubstitutionFlags[ESNextSubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ESNextSubstitutionFlags || (ESNextSubstitutionFlags = {}));
function transformESNext(context) {
- var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ var enabledSubstitutions;
+ var enclosingFunctionFlags;
+ var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
@@ -47868,53 +51802,95 @@ var ts;
function visitorNoDestructuringValue(node) {
return visitorWorker(node, /*noDestructuringValue*/ true);
}
+ function visitorNoAsyncModifier(node) {
+ if (node.kind === 119 /* AsyncKeyword */) {
+ return undefined;
+ }
+ return node;
+ }
function visitorWorker(node, noDestructuringValue) {
if ((node.transformFlags & 8 /* ContainsESNext */) === 0) {
return node;
}
switch (node.kind) {
- case 176 /* ObjectLiteralExpression */:
+ case 190 /* AwaitExpression */:
+ return visitAwaitExpression(node);
+ case 196 /* YieldExpression */:
+ return visitYieldExpression(node);
+ case 221 /* LabeledStatement */:
+ return visitLabeledStatement(node);
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node, noDestructuringValue);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
- case 213 /* ForOfStatement */:
- return visitForOfStatement(node);
- case 211 /* ForStatement */:
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return visitVoidExpression(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return visitConstructorDeclaration(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return visitMethodDeclaration(node);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
return visitGetAccessorDeclaration(node);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return visitSetAccessorDeclaration(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return visitArrowFunction(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return visitParameter(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return visitExpressionStatement(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitParenthesizedExpression(node, noDestructuringValue);
default:
return ts.visitEachChild(node, visitor, context);
}
}
+ function visitAwaitExpression(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(
+ /*asteriskToken*/ undefined, ts.createArrayLiteral([ts.createLiteral("await"), expression])),
+ /*location*/ node), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitYieldExpression(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.updateYield(node, node.asteriskToken, node.asteriskToken
+ ? createAsyncDelegatorHelper(context, expression, expression)
+ : ts.createArrayLiteral(expression
+ ? [ts.createLiteral("yield"), expression]
+ : [ts.createLiteral("yield")]));
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitLabeledStatement(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var statement = ts.unwrapInnermostStatementOfLabel(node);
+ if (statement.kind === 215 /* ForOfStatement */ && statement.awaitModifier) {
+ return visitForOfStatement(statement, node);
+ }
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
function chunkObjectLiteralElements(elements) {
var chunkObject;
var objects = [];
- for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
- var e = elements_3[_i];
- if (e.kind === 259 /* SpreadAssignment */) {
+ for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
+ var e = elements_4[_i];
+ if (e.kind === 262 /* SpreadAssignment */) {
if (chunkObject) {
objects.push(ts.createObjectLiteral(chunkObject));
chunkObject = undefined;
@@ -47926,7 +51902,7 @@ var ts;
if (!chunkObject) {
chunkObject = [];
}
- if (e.kind === 257 /* PropertyAssignment */) {
+ if (e.kind === 260 /* PropertyAssignment */) {
var p = e;
chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression)));
}
@@ -47948,7 +51924,7 @@ var ts;
// If the first element is a spread element, then the first argument to __assign is {}:
// { ...o, a, b, ...o2 } => __assign({}, o, {a, b}, o2)
var objects = chunkObjectLiteralElements(node.properties);
- if (objects.length && objects[0].kind !== 176 /* ObjectLiteralExpression */) {
+ if (objects.length && objects[0].kind !== 177 /* ObjectLiteralExpression */) {
objects.unshift(ts.createObjectLiteral());
}
return createAssignHelper(context, objects);
@@ -47998,41 +51974,101 @@ var ts;
*
* @param node A ForOfStatement.
*/
- function visitForOfStatement(node) {
- var leadingStatements;
- var temp;
- var initializer = ts.skipParentheses(node.initializer);
- if (initializer.transformFlags & 1048576 /* ContainsObjectRest */) {
- if (ts.isVariableDeclarationList(initializer)) {
- temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
- var firstDeclaration = ts.firstOrUndefined(initializer.declarations);
- var declarations = ts.flattenDestructuringBinding(firstDeclaration, visitor, context, 1 /* ObjectRest */, temp,
- /*doNotRecordTempVariablesInLine*/ false,
- /*skipInitializer*/ true);
- if (ts.some(declarations)) {
- var statement = ts.createVariableStatement(
- /*modifiers*/ undefined, ts.updateVariableDeclarationList(initializer, declarations),
- /*location*/ initializer);
- leadingStatements = ts.append(leadingStatements, statement);
- }
- }
- else if (ts.isAssignmentPattern(initializer)) {
- temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
- var expression = ts.flattenDestructuringAssignment(ts.aggregateTransformFlags(ts.createAssignment(initializer, temp, /*location*/ node.initializer)), visitor, context, 1 /* ObjectRest */);
- leadingStatements = ts.append(leadingStatements, ts.createStatement(expression, /*location*/ node.initializer));
- }
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ if (node.initializer.transformFlags & 1048576 /* ContainsObjectRest */) {
+ node = transformForOfStatementWithObjectRest(node);
}
- if (temp) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
- var block = ts.isBlock(statement)
- ? ts.updateBlock(statement, ts.createNodeArray(ts.concatenate(leadingStatements, statement.statements), statement.statements))
- : ts.createBlock(ts.append(leadingStatements, statement), statement, /*multiLine*/ true);
- return ts.updateForOf(node, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(temp, /*type*/ undefined, /*initializer*/ undefined, node.initializer)
- ], node.initializer, 1 /* Let */), expression, block);
+ if (node.awaitModifier) {
+ return transformForAwaitOfStatement(node, outermostLabeledStatement);
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement);
+ }
+ }
+ function transformForOfStatementWithObjectRest(node) {
+ var initializerWithoutParens = ts.skipParentheses(node.initializer);
+ if (ts.isVariableDeclarationList(initializerWithoutParens) || ts.isAssignmentPattern(initializerWithoutParens)) {
+ var bodyLocation = void 0;
+ var statementsLocation = void 0;
+ var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var statements = [ts.createForOfBindingStatement(initializerWithoutParens, temp)];
+ if (ts.isBlock(node.statement)) {
+ ts.addRange(statements, node.statement.statements);
+ bodyLocation = node.statement;
+ statementsLocation = node.statement.statements;
+ }
+ return ts.updateForOf(node, node.awaitModifier, ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(temp), node.initializer)
+ ], 1 /* Let */), node.initializer), node.expression, ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation));
+ }
+ return node;
+ }
+ function convertForOfStatementHead(node, boundValue) {
+ var binding = ts.createForOfBindingStatement(node.initializer, boundValue);
+ var bodyLocation;
+ var statementsLocation;
+ var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ if (ts.isBlock(statement)) {
+ ts.addRange(statements, statement.statements);
+ bodyLocation = statement;
+ statementsLocation = statement.statements;
+ }
+ else {
+ statements.push(statement);
+ }
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
+ }
+ function transformForAwaitOfStatement(node, outermostLabeledStatement) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var values = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
+ var next = ts.createYield(
+ /*asteriskToken*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, [])
+ ])
+ : ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []));
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, values), node.expression),
+ ts.createVariableDeclaration(result, /*type*/ undefined, next)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
+ /*incrementor*/ ts.createAssignment(result, next),
+ /*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"))),
+ /*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1 /* SingleLine */)), ts.createBlock([
+ ts.createTry(
+ /*tryBlock*/ ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createYield(
+ /*asteriskToken*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createFunctionCall(returnMethod, iterator, [])
+ ])
+ : ts.createFunctionCall(returnMethod, iterator, [])))), 1 /* SingleLine */)
+ ]),
+ /*catchClause*/ undefined,
+ /*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1 /* SingleLine */)
+ ]), 1 /* SingleLine */))
+ ]));
}
function visitParameter(node) {
if (node.transformFlags & 1048576 /* ContainsObjectRest */) {
@@ -48041,48 +52077,137 @@ var ts;
return ts.updateParameter(node,
/*decorators*/ undefined,
/*modifiers*/ undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node),
+ /*questionToken*/ undefined,
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
}
return ts.visitEachChild(node, visitor, context);
}
function visitConstructorDeclaration(node) {
- return ts.updateConstructor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateConstructor(node,
/*decorators*/ undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitGetAccessorDeclaration(node) {
- return ts.updateGetAccessor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateGetAccessor(node,
/*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitSetAccessorDeclaration(node) {
- return ts.updateSetAccessor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateSetAccessor(node,
/*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitMethodDeclaration(node) {
- return ts.updateMethod(node,
- /*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName),
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateMethod(node,
+ /*decorators*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.isToken),
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, node.modifiers, node.name,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, node.modifiers,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateArrowFunction(node, node.modifiers,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, node.modifiers, node.name,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionExpression(node, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
+ }
+ function transformAsyncGeneratorFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
+ appendObjectRestAssignmentsIfNeeded(statements, node);
+ statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(
+ /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name),
+ /*typeParameters*/ undefined,
+ /*parameters*/ [],
+ /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.updateBlock(node.body, statements);
+ // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
+ // This step isn't needed if we eventually transform this to ES5.
+ if (languageVersion >= 2 /* ES2015 */) {
+ if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
}
function transformFunctionBody(node) {
resumeLexicalEnvironment();
- var leadingStatements;
+ var statementOffset = 0;
+ var statements = [];
+ var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
+ if (ts.isBlock(body)) {
+ statementOffset = ts.addPrologue(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ }
+ ts.addRange(statements, appendObjectRestAssignmentsIfNeeded(/*statements*/ undefined, node));
+ var trailingStatements = endLexicalEnvironment();
+ if (statementOffset > 0 || ts.some(statements) || ts.some(trailingStatements)) {
+ var block = ts.convertToFunctionBody(body, /*multiLine*/ true);
+ ts.addRange(statements, block.statements.slice(statementOffset));
+ ts.addRange(statements, trailingStatements);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(statements), block.statements));
+ }
+ return body;
+ }
+ function appendObjectRestAssignmentsIfNeeded(statements, node) {
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
if (parameter.transformFlags & 1048576 /* ContainsObjectRest */) {
@@ -48094,17 +52219,116 @@ var ts;
var statement = ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList(declarations));
ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
- leadingStatements = ts.append(leadingStatements, statement);
+ statements = ts.append(statements, statement);
}
}
}
- var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
- var trailingStatements = endLexicalEnvironment();
- if (ts.some(leadingStatements) || ts.some(trailingStatements)) {
- var block = ts.convertToFunctionBody(body, /*multiLine*/ true);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(ts.concatenate(leadingStatements, block.statements), trailingStatements), block.statements));
+ return statements;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
+ enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
+ // We need to enable substitutions for call, property access, and element access
+ // if we need to rewrite super calls.
+ context.enableSubstitution(180 /* CallExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
+ // We need to be notified when entering and exiting declarations that bind super.
+ context.enableEmitNotification(228 /* ClassDeclaration */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(151 /* Constructor */);
+ }
+ }
+ /**
+ * Called by the printer just before a node is printed.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to be printed.
+ * @param emitCallback The callback used to emit the node.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ // If we need to support substitutions for `super` in an async method,
+ // we should track it here.
+ if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint The context for the emitter.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178 /* PropertyAccessExpression */:
+ return substitutePropertyAccessExpression(node);
+ case 179 /* ElementAccessExpression */:
+ return substituteElementAccessExpression(node);
+ case 180 /* CallExpression */:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
+ /*typeArguments*/ undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228 /* ClassDeclaration */
+ || kind === 151 /* Constructor */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), location);
}
- return body;
}
}
ts.transformESNext = transformESNext;
@@ -48115,11 +52339,51 @@ var ts;
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
};
function createAssignHelper(context, attributesSegments) {
+ if (context.getCompilerOptions().target >= 2 /* ES2015 */) {
+ return ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "assign"),
+ /*typeArguments*/ undefined, attributesSegments);
+ }
context.requestEmitHelper(assignHelper);
return ts.createCall(ts.getHelperName("__assign"),
/*typeArguments*/ undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var asyncGeneratorHelper = {
+ name: "typescript:asyncGenerator",
+ scoped: false,
+ text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), q = [], c, i;\n return i = { next: verb(\"next\"), \"throw\": verb(\"throw\"), \"return\": verb(\"return\") }, i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { return function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]), next(); }); }; }\n function next() { if (!c && q.length) resume((c = q.shift())[0], c[1]); }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(c[3], e); } }\n function step(r) { r.done ? settle(c[2], r) : Promise.resolve(r.value[1]).then(r.value[0] === \"yield\" ? _yield : r.value[0] === \"delegate\" ? delegate : fulfill, reject); }\n function _yield(value) { settle(c[2], { value: value, done: false }); }\n function delegate(r) { step(r.done ? r : { value: [\"yield\", r.value], done: false }); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { c = void 0, f(v), next(); }\n };\n "
+ };
+ function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(asyncGeneratorHelper);
+ // Mark this node as originally an async function
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ return ts.createCall(ts.getHelperName("__asyncGenerator"),
+ /*typeArguments*/ undefined, [
+ ts.createThis(),
+ ts.createIdentifier("arguments"),
+ generatorFunc
+ ]);
+ }
+ var asyncDelegator = {
+ name: "typescript:asyncDelegator",
+ scoped: false,
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i = { next: verb(\"next\"), \"throw\": verb(\"throw\", function (e) { throw e; }), \"return\": verb(\"return\", function (v) { return { value: v, done: true }; }) };\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return { value: [\"delegate\", (o[n] || f).call(o, v)], done: false }; }; }\n };\n "
+ };
+ function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(asyncDelegator);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
+ var asyncValues = {
+ name: "typescript:asyncValues",
+ scoped: false,
+ text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n "
+ };
+ function createAsyncValuesHelper(context, expression, location) {
+ context.requestEmitHelper(asyncValues);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
@@ -48129,7 +52393,6 @@ var ts;
(function (ts) {
function transformJsx(context) {
var compilerOptions = context.getCompilerOptions();
- var currentSourceFile;
return transformSourceFile;
/**
* Transform JSX-specific syntax in a SourceFile.
@@ -48140,10 +52403,8 @@ var ts;
if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
var visited = ts.visitEachChild(node, visitor, context);
ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
return visited;
}
function visitor(node) {
@@ -48156,11 +52417,11 @@ var ts;
}
function visitorWorker(node) {
switch (node.kind) {
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitJsxElement(node, /*isChild*/ false);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return visitJsxSelfClosingElement(node, /*isChild*/ false);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return visitJsxExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -48170,11 +52431,11 @@ var ts;
switch (node.kind) {
case 10 /* JsxText */:
return visitJsxText(node);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return visitJsxExpression(node);
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitJsxElement(node, /*isChild*/ true);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return visitJsxSelfClosingElement(node, /*isChild*/ true);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -48190,7 +52451,7 @@ var ts;
function visitJsxOpeningLikeElement(node, children, isChild, location) {
var tagName = getTagName(node);
var objectProperties;
- var attrs = node.attributes;
+ var attrs = node.attributes.properties;
if (attrs.length === 0) {
// When there are no attributes, React wants "null"
objectProperties = ts.createNull();
@@ -48229,13 +52490,16 @@ var ts;
}
function transformJsxAttributeInitializer(node) {
if (node === undefined) {
- return ts.createLiteral(true);
+ return ts.createTrue();
}
else if (node.kind === 9 /* StringLiteral */) {
var decoded = tryDecodeEntities(node.text);
- return decoded ? ts.createLiteral(decoded, /*location*/ node) : node;
+ return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node;
}
- else if (node.kind === 252 /* JsxExpression */) {
+ else if (node.kind === 255 /* JsxExpression */) {
+ if (node.expression === undefined) {
+ return ts.createTrue();
+ }
return visitJsxExpression(node);
}
else {
@@ -48243,54 +52507,61 @@ var ts;
}
}
function visitJsxText(node) {
- var text = ts.getTextOfNode(node, /*includeTrivia*/ true);
- var parts;
+ var fixed = fixupWhitespaceAndDecodeEntities(ts.getTextOfNode(node, /*includeTrivia*/ true));
+ return fixed === undefined ? undefined : ts.createLiteral(fixed);
+ }
+ /**
+ * JSX trims whitespace at the end and beginning of lines, except that the
+ * start/end of a tag is considered a start/end of a line only if that line is
+ * on the same line as the closing tag. See examples in
+ * tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx
+ * See also https://www.w3.org/TR/html4/struct/text.html#h-9.1 and https://www.w3.org/TR/CSS2/text.html#white-space-model
+ *
+ * An equivalent algorithm would be:
+ * - If there is only one line, return it.
+ * - If there is only whitespace (but multiple lines), return `undefined`.
+ * - Split the text into lines.
+ * - 'trimRight' the first line, 'trimLeft' the last line, 'trim' middle lines.
+ * - Decode entities on each line (individually).
+ * - Remove empty lines and join the rest with " ".
+ */
+ function fixupWhitespaceAndDecodeEntities(text) {
+ var acc;
+ // First non-whitespace character on this line.
var firstNonWhitespace = 0;
+ // Last non-whitespace character on this line.
var lastNonWhitespace = -1;
- // JSX trims whitespace at the end and beginning of lines, except that the
- // start/end of a tag is considered a start/end of a line only if that line is
- // on the same line as the closing tag. See examples in
- // tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx
+ // These initial values are special because the first line is:
+ // firstNonWhitespace = 0 to indicate that we want leading whitsepace,
+ // but lastNonWhitespace = -1 as a special flag to indicate that we *don't* include the line if it's all whitespace.
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
if (ts.isLineBreak(c)) {
- if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) {
- var part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1);
- if (!parts) {
- parts = [];
- }
- // We do not escape the string here as that is handled by the printer
- // when it emits the literal. We do, however, need to decode JSX entities.
- parts.push(ts.createLiteral(decodeEntities(part)));
+ // If we've seen any non-whitespace characters on this line, add the 'trim' of the line.
+ // (lastNonWhitespace === -1 is a special flag to detect whether the first line is all whitespace.)
+ if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {
+ acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));
}
+ // Reset firstNonWhitespace for the next line.
+ // Don't bother to reset lastNonWhitespace because we ignore it if firstNonWhitespace = -1.
firstNonWhitespace = -1;
}
- else if (!ts.isWhiteSpace(c)) {
+ else if (!ts.isWhiteSpaceSingleLine(c)) {
lastNonWhitespace = i;
if (firstNonWhitespace === -1) {
firstNonWhitespace = i;
}
}
}
- if (firstNonWhitespace !== -1) {
- var part = text.substr(firstNonWhitespace);
- if (!parts) {
- parts = [];
- }
- // We do not escape the string here as that is handled by the printer
- // when it emits the literal. We do, however, need to decode JSX entities.
- parts.push(ts.createLiteral(decodeEntities(part)));
- }
- if (parts) {
- return ts.reduceLeft(parts, aggregateJsxTextParts);
- }
- return undefined;
+ return firstNonWhitespace !== -1
+ ? addLineOfJsxText(acc, text.substr(firstNonWhitespace))
+ : acc;
}
- /**
- * Aggregates two expressions by interpolating them with a whitespace literal.
- */
- function aggregateJsxTextParts(left, right) {
- return ts.createAdd(ts.createAdd(left, ts.createLiteral(" ")), right);
+ function addLineOfJsxText(acc, trimmedLine) {
+ // We do not escape the string here as that is handled by the printer
+ // when it emits the literal. We do, however, need to decode JSX entities.
+ var decoded = decodeEntities(trimmedLine);
+ return acc === undefined ? decoded : acc + " " + decoded;
}
/**
* Replace entities like "&nbsp;", "&#123;", and "&#xDEADBEEF;" with the characters they encode.
@@ -48305,7 +52576,7 @@ var ts;
return String.fromCharCode(parseInt(hex, 16));
}
else {
- var ch = entities[word];
+ var ch = entities.get(word);
// If this is not a valid entity, then just use `match` (replace it with itself, i.e. don't replace)
return ch ? String.fromCharCode(ch) : match;
}
@@ -48317,16 +52588,16 @@ var ts;
return decoded === text ? undefined : decoded;
}
function getTagName(node) {
- if (node.kind === 246 /* JsxElement */) {
+ if (node.kind === 248 /* JsxElement */) {
return getTagName(node.openingElement);
}
else {
- var name_34 = node.tagName;
- if (ts.isIdentifier(name_34) && ts.isIntrinsicJsxName(name_34.text)) {
- return ts.createLiteral(name_34.text);
+ var name = node.tagName;
+ if (ts.isIdentifier(name) && ts.isIntrinsicJsxName(name.text)) {
+ return ts.createLiteral(name.text);
}
else {
- return ts.createExpressionFromEntityName(name_34);
+ return ts.createExpressionFromEntityName(name);
}
}
}
@@ -48349,7 +52620,7 @@ var ts;
}
}
ts.transformJsx = transformJsx;
- var entities = ts.createMap({
+ var entities = ts.createMapFromTemplate({
"quot": 0x0022,
"amp": 0x0026,
"apos": 0x0027,
@@ -48610,375 +52881,6 @@ var ts;
/*@internal*/
var ts;
(function (ts) {
- var ES2017SubstitutionFlags;
- (function (ES2017SubstitutionFlags) {
- /** Enables substitutions for async methods with `super` calls. */
- ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
- })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
- function transformES2017(context) {
- var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
- var resolver = context.getEmitResolver();
- var compilerOptions = context.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- // These variables contain state that changes as we descend into the tree.
- var currentSourceFile;
- /**
- * Keeps track of whether expression substitution has been enabled for specific edge cases.
- * They are persisted between each SourceFile transformation and should not be reset.
- */
- var enabledSubstitutions;
- /**
- * This keeps track of containers where `super` is valid, for use with
- * just-in-time substitution for `super` expressions inside of async methods.
- */
- var currentSuperContainer;
- // Save the previous transformation hooks.
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- // Set new transformation hooks.
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
- }
- currentSourceFile = node;
- var visited = ts.visitEachChild(node, visitor, context);
- ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
- return visited;
- }
- function visitor(node) {
- if ((node.transformFlags & 16 /* ContainsES2017 */) === 0) {
- return node;
- }
- switch (node.kind) {
- case 119 /* AsyncKeyword */:
- // ES2017 async modifier should be elided for targets < ES2017
- return undefined;
- case 189 /* AwaitExpression */:
- // ES2017 'await' expressions must be transformed for targets < ES2017.
- return visitAwaitExpression(node);
- case 149 /* MethodDeclaration */:
- // ES2017 method declarations may be 'async'
- return visitMethodDeclaration(node);
- case 225 /* FunctionDeclaration */:
- // ES2017 function declarations may be 'async'
- return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
- // ES2017 function expressions may be 'async'
- return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
- // ES2017 arrow functions may be 'async'
- return visitArrowFunction(node);
- default:
- return ts.visitEachChild(node, visitor, context);
- }
- }
- /**
- * Visits an AwaitExpression node.
- *
- * This function will be called any time a ES2017 await expression is encountered.
- *
- * @param node The node to visit.
- */
- function visitAwaitExpression(node) {
- return ts.setOriginalNode(ts.createYield(
- /*asteriskToken*/ undefined, ts.visitNode(node.expression, visitor, ts.isExpression),
- /*location*/ node), node);
- }
- /**
- * Visits a MethodDeclaration node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked as async
- *
- * @param node The node to visit.
- */
- function visitMethodDeclaration(node) {
- return ts.updateMethod(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits a FunctionDeclaration node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits a FunctionExpression node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
- return ts.createOmittedExpression();
- }
- return ts.updateFunctionExpression(node,
- /*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits an ArrowFunction.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier),
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function transformAsyncFunctionBody(node) {
- resumeLexicalEnvironment();
- var original = ts.getOriginalNode(node, ts.isFunctionLike);
- var nodeType = original.type;
- var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined;
- var isArrowFunction = node.kind === 185 /* ArrowFunction */;
- var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0;
- // An async function is emit as an outer function that calls an inner
- // generator function. To preserve lexical bindings, we pass the current
- // `this` and `arguments` objects to `__awaiter`. The generator function
- // passed to `__awaiter` is executed inside of the callback to the
- // promise constructor.
- if (!isArrowFunction) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
- statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
- ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(statements, /*location*/ node.body, /*multiLine*/ true);
- // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
- // This step isn't needed if we eventually transform this to ES5.
- if (languageVersion >= 2 /* ES2015 */) {
- if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, advancedAsyncSuperHelper);
- }
- else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, asyncSuperHelper);
- }
- }
- return block;
- }
- else {
- var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
- var declarations = endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(expression);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(block.statements, declarations), block.statements));
- }
- return expression;
- }
- }
- function transformFunctionBodyWorker(body, start) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
- }
- else {
- startLexicalEnvironment();
- var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
- var declarations = endLexicalEnvironment();
- return ts.updateBlock(visited, ts.createNodeArray(ts.concatenate(visited.statements, declarations), visited.statements));
- }
- }
- function getPromiseConstructor(type) {
- var typeName = type && ts.getEntityNameFromTypeNode(type);
- if (typeName && ts.isEntityName(typeName)) {
- var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
- if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
- || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
- return typeName;
- }
- }
- return undefined;
- }
- function enableSubstitutionForAsyncMethodsWithSuper() {
- if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
- enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
- // We need to enable substitutions for call, property access, and element access
- // if we need to rewrite super calls.
- context.enableSubstitution(179 /* CallExpression */);
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(178 /* ElementAccessExpression */);
- // We need to be notified when entering and exiting declarations that bind super.
- context.enableEmitNotification(226 /* ClassDeclaration */);
- context.enableEmitNotification(149 /* MethodDeclaration */);
- context.enableEmitNotification(151 /* GetAccessor */);
- context.enableEmitNotification(152 /* SetAccessor */);
- context.enableEmitNotification(150 /* Constructor */);
- }
- }
- function substituteExpression(node) {
- switch (node.kind) {
- case 177 /* PropertyAccessExpression */:
- return substitutePropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
- return substituteElementAccessExpression(node);
- case 179 /* CallExpression */:
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) {
- return substituteCallExpression(node);
- }
- break;
- }
- return node;
- }
- function substitutePropertyAccessExpression(node) {
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && node.expression.kind === 96 /* SuperKeyword */) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), flags, node);
- }
- }
- return node;
- }
- function substituteElementAccessExpression(node) {
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && node.expression.kind === 96 /* SuperKeyword */) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(node.argumentExpression, flags, node);
- }
- }
- return node;
- }
- function substituteCallExpression(node) {
- var expression = node.expression;
- if (ts.isSuperProperty(expression)) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- var argumentExpression = ts.isPropertyAccessExpression(expression)
- ? substitutePropertyAccessExpression(expression)
- : substituteElementAccessExpression(expression);
- return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
- /*typeArguments*/ undefined, [
- ts.createThis()
- ].concat(node.arguments));
- }
- }
- return node;
- }
- function isSuperContainer(node) {
- var kind = node.kind;
- return kind === 226 /* ClassDeclaration */
- || kind === 150 /* Constructor */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */;
- }
- /**
- * Hook for node emit.
- *
- * @param node The node to emit.
- * @param emit A callback used to emit the node in the printer.
- */
- function onEmitNode(emitContext, node, emitCallback) {
- // If we need to support substitutions for `super` in an async method,
- // we should track it here.
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
- var savedCurrentSuperContainer = currentSuperContainer;
- currentSuperContainer = node;
- previousOnEmitNode(emitContext, node, emitCallback);
- currentSuperContainer = savedCurrentSuperContainer;
- }
- else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- /**
- * Hooks node substitutions.
- *
- * @param node The node to substitute.
- * @param isExpression A value indicating whether the node is to be used in an expression
- * position.
- */
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
- return substituteExpression(node);
- }
- return node;
- }
- function createSuperAccessInAsyncMethod(argumentExpression, flags, location) {
- if (flags & 4096 /* AsyncMethodWithSuperBinding */) {
- return ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
- /*typeArguments*/ undefined, [argumentExpression]), "value", location);
- }
- else {
- return ts.createCall(ts.createIdentifier("_super"),
- /*typeArguments*/ undefined, [argumentExpression], location);
- }
- }
- function getSuperContainerAsyncMethodFlags() {
- return currentSuperContainer !== undefined
- && resolver.getNodeCheckFlags(currentSuperContainer) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
- }
- }
- ts.transformES2017 = transformES2017;
- function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
- context.requestEmitHelper(awaiterHelper);
- var generatorFunc = ts.createFunctionExpression(
- /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */),
- /*name*/ undefined,
- /*typeParameters*/ undefined,
- /*parameters*/ [],
- /*type*/ undefined, body);
- // Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
- return ts.createCall(ts.getHelperName("__awaiter"),
- /*typeArguments*/ undefined, [
- ts.createThis(),
- hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
- promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
- generatorFunc
- ]);
- }
- var awaiterHelper = {
- name: "typescript:awaiter",
- scoped: false,
- priority: 5,
- text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments)).next());\n });\n };"
- };
- var asyncSuperHelper = {
- name: "typescript:async-super",
- scoped: true,
- text: "\n const _super = name => super[name];"
- };
- var advancedAsyncSuperHelper = {
- name: "typescript:advanced-async-super",
- scoped: true,
- text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"
- };
-})(ts || (ts = {}));
-/// <reference path="../factory.ts" />
-/// <reference path="../visitor.ts" />
-/*@internal*/
-var ts;
-(function (ts) {
function transformES2016(context) {
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
@@ -48993,7 +52895,7 @@ var ts;
return node;
}
switch (node.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -49018,25 +52920,21 @@ var ts;
// Transforms `a[x] **= b` into `(_a = a)[_x = x] = Math.pow(_a[_x], b)`
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
var argumentExpressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createElementAccess(ts.createAssignment(expressionTemp, left.expression, /*location*/ left.expression), ts.createAssignment(argumentExpressionTemp, left.argumentExpression, /*location*/ left.argumentExpression),
- /*location*/ left);
- value = ts.createElementAccess(expressionTemp, argumentExpressionTemp,
- /*location*/ left);
+ target = ts.setTextRange(ts.createElementAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), ts.setTextRange(ts.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)), left);
+ value = ts.setTextRange(ts.createElementAccess(expressionTemp, argumentExpressionTemp), left);
}
else if (ts.isPropertyAccessExpression(left)) {
// Transforms `a.x **= b` into `(_a = a).x = Math.pow(_a.x, b)`
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createPropertyAccess(ts.createAssignment(expressionTemp, left.expression, /*location*/ left.expression), left.name,
- /*location*/ left);
- value = ts.createPropertyAccess(expressionTemp, left.name,
- /*location*/ left);
+ target = ts.setTextRange(ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), left.name), left);
+ value = ts.setTextRange(ts.createPropertyAccess(expressionTemp, left.name), left);
}
else {
// Transforms `a **= b` into `a = Math.pow(a, b)`
target = left;
value = left;
}
- return ts.createAssignment(target, ts.createMathPow(value, right, /*location*/ node), /*location*/ node);
+ return ts.setTextRange(ts.createAssignment(target, ts.createMathPow(value, right, /*location*/ node)), node);
}
function visitExponentiationExpression(node) {
// Transforms `a ** b` into `Math.pow(a, b)`
@@ -49049,6 +52947,7 @@ var ts;
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/// <reference path="./destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
@@ -49094,8 +52993,85 @@ var ts;
*/
SuperCaptureResult[SuperCaptureResult["ReplaceWithReturn"] = 2] = "ReplaceWithReturn";
})(SuperCaptureResult || (SuperCaptureResult = {}));
+ // Facts we track as we traverse the tree
+ var HierarchyFacts;
+ (function (HierarchyFacts) {
+ HierarchyFacts[HierarchyFacts["None"] = 0] = "None";
+ //
+ // Ancestor facts
+ //
+ HierarchyFacts[HierarchyFacts["Function"] = 1] = "Function";
+ HierarchyFacts[HierarchyFacts["ArrowFunction"] = 2] = "ArrowFunction";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBody"] = 4] = "AsyncFunctionBody";
+ HierarchyFacts[HierarchyFacts["NonStaticClassElement"] = 8] = "NonStaticClassElement";
+ HierarchyFacts[HierarchyFacts["CapturesThis"] = 16] = "CapturesThis";
+ HierarchyFacts[HierarchyFacts["ExportedVariableStatement"] = 32] = "ExportedVariableStatement";
+ HierarchyFacts[HierarchyFacts["TopLevel"] = 64] = "TopLevel";
+ HierarchyFacts[HierarchyFacts["Block"] = 128] = "Block";
+ HierarchyFacts[HierarchyFacts["IterationStatement"] = 256] = "IterationStatement";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlock"] = 512] = "IterationStatementBlock";
+ HierarchyFacts[HierarchyFacts["ForStatement"] = 1024] = "ForStatement";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement";
+ HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName";
+ // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below.
+ //
+ // Ancestor masks
+ //
+ HierarchyFacts[HierarchyFacts["AncestorFactsMask"] = 16383] = "AncestorFactsMask";
+ // We are always in *some* kind of block scope, but only specific block-scope containers are
+ // top-level or Blocks.
+ HierarchyFacts[HierarchyFacts["BlockScopeIncludes"] = 0] = "BlockScopeIncludes";
+ HierarchyFacts[HierarchyFacts["BlockScopeExcludes"] = 4032] = "BlockScopeExcludes";
+ // A source file is a top-level block scope.
+ HierarchyFacts[HierarchyFacts["SourceFileIncludes"] = 64] = "SourceFileIncludes";
+ HierarchyFacts[HierarchyFacts["SourceFileExcludes"] = 3968] = "SourceFileExcludes";
+ // Functions, methods, and accessors are both new lexical scopes and new block scopes.
+ HierarchyFacts[HierarchyFacts["FunctionIncludes"] = 65] = "FunctionIncludes";
+ HierarchyFacts[HierarchyFacts["FunctionExcludes"] = 16286] = "FunctionExcludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyIncludes"] = 69] = "AsyncFunctionBodyIncludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyExcludes"] = 16278] = "AsyncFunctionBodyExcludes";
+ // Arrow functions are lexically scoped to their container, but are new block scopes.
+ HierarchyFacts[HierarchyFacts["ArrowFunctionIncludes"] = 66] = "ArrowFunctionIncludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionExcludes"] = 16256] = "ArrowFunctionExcludes";
+ // Constructors are both new lexical scopes and new block scopes. Constructors are also
+ // always considered non-static members of a class.
+ HierarchyFacts[HierarchyFacts["ConstructorIncludes"] = 73] = "ConstructorIncludes";
+ HierarchyFacts[HierarchyFacts["ConstructorExcludes"] = 16278] = "ConstructorExcludes";
+ // 'do' and 'while' statements are not block scopes. We track that the subtree is contained
+ // within an IterationStatement to indicate whether the embedded statement is an
+ // IterationStatementBlock.
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementIncludes"] = 256] = "DoOrWhileStatementIncludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementExcludes"] = 0] = "DoOrWhileStatementExcludes";
+ // 'for' statements are new block scopes and have special handling for 'let' declarations.
+ HierarchyFacts[HierarchyFacts["ForStatementIncludes"] = 1280] = "ForStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForStatementExcludes"] = 3008] = "ForStatementExcludes";
+ // 'for-in' and 'for-of' statements are new block scopes and have special handling for
+ // 'let' declarations.
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementIncludes"] = 2304] = "ForInOrForOfStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementExcludes"] = 1984] = "ForInOrForOfStatementExcludes";
+ // Blocks (other than function bodies) are new block scopes.
+ HierarchyFacts[HierarchyFacts["BlockIncludes"] = 128] = "BlockIncludes";
+ HierarchyFacts[HierarchyFacts["BlockExcludes"] = 3904] = "BlockExcludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockIncludes"] = 512] = "IterationStatementBlockIncludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockExcludes"] = 4032] = "IterationStatementBlockExcludes";
+ // Computed property names track subtree flags differently than their containing members.
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameIncludes"] = 8192] = "ComputedPropertyNameIncludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameExcludes"] = 0] = "ComputedPropertyNameExcludes";
+ //
+ // Subtree facts
+ //
+ HierarchyFacts[HierarchyFacts["NewTarget"] = 16384] = "NewTarget";
+ HierarchyFacts[HierarchyFacts["NewTargetInComputedPropertyName"] = 32768] = "NewTargetInComputedPropertyName";
+ //
+ // Subtree masks
+ //
+ HierarchyFacts[HierarchyFacts["SubtreeFactsMask"] = -16384] = "SubtreeFactsMask";
+ HierarchyFacts[HierarchyFacts["PropagateNewTargetMask"] = 49152] = "PropagateNewTargetMask";
+ })(HierarchyFacts || (HierarchyFacts = {}));
function transformES2015(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
@@ -49103,15 +53079,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
var currentSourceFile;
var currentText;
- var currentParent;
- var currentNode;
- var enclosingVariableStatement;
- var enclosingBlockScopeContainer;
- var enclosingBlockScopeContainerParent;
- var enclosingFunction;
- var enclosingNonArrowFunction;
- var enclosingNonAsyncFunctionBody;
- var isInConstructorWithCapturedSuper;
+ var hierarchyFacts;
/**
* Used to track if we are emitting body of the converted loop
*/
@@ -49129,257 +53097,221 @@ var ts;
}
currentSourceFile = node;
currentText = node.text;
- var visited = saveStateAndInvoke(node, visitSourceFile);
+ var visited = visitSourceFile(node);
ts.addEmitHelpers(visited, context.readEmitHelpers());
currentSourceFile = undefined;
currentText = undefined;
+ hierarchyFacts = 0 /* None */;
return visited;
}
- function visitor(node) {
- return saveStateAndInvoke(node, dispatcher);
- }
- function dispatcher(node) {
- return convertedLoopState
- ? visitorForConvertedLoopWorker(node)
- : visitorWorker(node);
- }
- function saveStateAndInvoke(node, f) {
- var savedEnclosingFunction = enclosingFunction;
- var savedEnclosingNonArrowFunction = enclosingNonArrowFunction;
- var savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody;
- var savedEnclosingBlockScopeContainer = enclosingBlockScopeContainer;
- var savedEnclosingBlockScopeContainerParent = enclosingBlockScopeContainerParent;
- var savedEnclosingVariableStatement = enclosingVariableStatement;
- var savedCurrentParent = currentParent;
- var savedCurrentNode = currentNode;
- var savedConvertedLoopState = convertedLoopState;
- var savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper;
- if (ts.nodeStartsNewLexicalEnvironment(node)) {
- // don't treat content of nodes that start new lexical environment as part of converted loop copy or constructor body
- isInConstructorWithCapturedSuper = false;
- convertedLoopState = undefined;
- }
- onBeforeVisitNode(node);
- var visited = f(node);
- isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper;
- convertedLoopState = savedConvertedLoopState;
- enclosingFunction = savedEnclosingFunction;
- enclosingNonArrowFunction = savedEnclosingNonArrowFunction;
- enclosingNonAsyncFunctionBody = savedEnclosingNonAsyncFunctionBody;
- enclosingBlockScopeContainer = savedEnclosingBlockScopeContainer;
- enclosingBlockScopeContainerParent = savedEnclosingBlockScopeContainerParent;
- enclosingVariableStatement = savedEnclosingVariableStatement;
- currentParent = savedCurrentParent;
- currentNode = savedCurrentNode;
- return visited;
- }
- function onBeforeVisitNode(node) {
- if (currentNode) {
- if (ts.isBlockScope(currentNode, currentParent)) {
- enclosingBlockScopeContainer = currentNode;
- enclosingBlockScopeContainerParent = currentParent;
- }
- if (ts.isFunctionLike(currentNode)) {
- enclosingFunction = currentNode;
- if (currentNode.kind !== 185 /* ArrowFunction */) {
- enclosingNonArrowFunction = currentNode;
- if (!(ts.getEmitFlags(currentNode) & 131072 /* AsyncFunctionBody */)) {
- enclosingNonAsyncFunctionBody = currentNode;
- }
- }
- }
- // keep track of the enclosing variable statement when in the context of
- // variable statements, variable declarations, binding elements, and binding
- // patterns.
- switch (currentNode.kind) {
- case 205 /* VariableStatement */:
- enclosingVariableStatement = currentNode;
- break;
- case 224 /* VariableDeclarationList */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
- break;
- default:
- enclosingVariableStatement = undefined;
- }
- }
- currentParent = currentNode;
- currentNode = node;
+ /**
+ * Sets the `HierarchyFacts` for this node prior to visiting this node's subtree, returning the facts set prior to modification.
+ * @param excludeFacts The existing `HierarchyFacts` to reset before visiting the subtree.
+ * @param includeFacts The new `HierarchyFacts` to set before visiting the subtree.
+ */
+ function enterSubtree(excludeFacts, includeFacts) {
+ var ancestorFacts = hierarchyFacts;
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383 /* AncestorFactsMask */;
+ return ancestorFacts;
}
- function returnCapturedThis(node) {
- return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
+ /**
+ * Restores the `HierarchyFacts` for this node's ancestor after visiting this node's
+ * subtree, propagating specific facts from the subtree.
+ * @param ancestorFacts The `HierarchyFacts` of the ancestor to restore after visiting the subtree.
+ * @param excludeFacts The existing `HierarchyFacts` of the subtree that should not be propagated.
+ * @param includeFacts The new `HierarchyFacts` of the subtree that should be propagated.
+ */
+ function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 /* SubtreeFactsMask */ | ancestorFacts;
}
function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
- return isInConstructorWithCapturedSuper && node.kind === 216 /* ReturnStatement */ && !node.expression;
+ return hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */
+ && node.kind === 218 /* ReturnStatement */
+ && !node.expression;
}
- function shouldCheckNode(node) {
- return (node.transformFlags & 64 /* ES2015 */) !== 0 ||
- node.kind === 219 /* LabeledStatement */ ||
- (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
+ function shouldVisitNode(node) {
+ return (node.transformFlags & 128 /* ContainsES2015 */) !== 0
+ || convertedLoopState !== undefined
+ || (hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ && ts.isStatement(node))
+ || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
}
- function visitorWorker(node) {
- if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
- return returnCapturedThis(node);
- }
- else if (shouldCheckNode(node)) {
+ function visitor(node) {
+ if (shouldVisitNode(node)) {
return visitJavaScript(node);
}
- else if (node.transformFlags & 128 /* ContainsES2015 */ || (isInConstructorWithCapturedSuper && !ts.isExpression(node))) {
- // we want to dive in this branch either if node has children with ES2015 specific syntax
- // or we are inside constructor that captures result of the super call so all returns without expression should be
- // rewritten. Note: we skip expressions since returns should never appear there
- return ts.visitEachChild(node, visitor, context);
- }
else {
return node;
}
}
- function visitorForConvertedLoopWorker(node) {
- var result;
- if (shouldCheckNode(node)) {
- result = visitJavaScript(node);
- }
- else {
- result = visitNodesInConvertedLoop(node);
+ function functionBodyVisitor(node) {
+ if (shouldVisitNode(node)) {
+ return visitBlock(node, /*isFunctionBody*/ true);
}
- return result;
+ return node;
}
- function visitNodesInConvertedLoop(node) {
- switch (node.kind) {
- case 216 /* ReturnStatement */:
- node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node;
- return visitReturnStatement(node);
- case 205 /* VariableStatement */:
- return visitVariableStatement(node);
- case 218 /* SwitchStatement */:
- return visitSwitchStatement(node);
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
- return visitBreakOrContinueStatement(node);
- case 98 /* ThisKeyword */:
- return visitThisKeyword(node);
- case 70 /* Identifier */:
- return visitIdentifier(node);
- default:
- return ts.visitEachChild(node, visitor, context);
+ function callExpressionVisitor(node) {
+ if (node.kind === 96 /* SuperKeyword */) {
+ return visitSuperKeyword(/*isExpressionOfCall*/ true);
}
+ return visitor(node);
}
function visitJavaScript(node) {
switch (node.kind) {
case 114 /* StaticKeyword */:
return undefined; // elide static keyword
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return visitClassExpression(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return visitParameter(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return visitArrowFunction(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
case 70 /* Identifier */:
return visitIdentifier(node);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return visitVariableDeclarationList(node);
- case 219 /* LabeledStatement */:
+ case 220 /* SwitchStatement */:
+ return visitSwitchStatement(node);
+ case 234 /* CaseBlock */:
+ return visitCaseBlock(node);
+ case 206 /* Block */:
+ return visitBlock(node, /*isFunctionBody*/ false);
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ return visitBreakOrContinueStatement(node);
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
- case 209 /* DoStatement */:
- return visitDoStatement(node);
- case 210 /* WhileStatement */:
- return visitWhileStatement(node);
- case 211 /* ForStatement */:
- return visitForStatement(node);
- case 212 /* ForInStatement */:
- return visitForInStatement(node);
- case 213 /* ForOfStatement */:
- return visitForOfStatement(node);
- case 207 /* ExpressionStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return visitDoOrWhileStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 213 /* ForStatement */:
+ return visitForStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 214 /* ForInStatement */:
+ return visitForInStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 209 /* ExpressionStatement */:
return visitExpressionStatement(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitCatchClause(node);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return visitShorthandPropertyAssignment(node);
- case 175 /* ArrayLiteralExpression */:
+ case 143 /* ComputedPropertyName */:
+ return visitComputedPropertyName(node);
+ case 176 /* ArrayLiteralExpression */:
return visitArrayLiteralExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitParenthesizedExpression(node, /*needsDestructuringValue*/ true);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node, /*needsDestructuringValue*/ true);
case 12 /* NoSubstitutionTemplateLiteral */:
case 13 /* TemplateHead */:
case 14 /* TemplateMiddle */:
case 15 /* TemplateTail */:
return visitTemplateLiteral(node);
- case 181 /* TaggedTemplateExpression */:
+ case 9 /* StringLiteral */:
+ return visitStringLiteral(node);
+ case 8 /* NumericLiteral */:
+ return visitNumericLiteral(node);
+ case 182 /* TaggedTemplateExpression */:
return visitTaggedTemplateExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return visitTemplateExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitYieldExpression(node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return visitSpreadElement(node);
case 96 /* SuperKeyword */:
- return visitSuperKeyword();
- case 195 /* YieldExpression */:
- // `yield` will be handled by a generators transform.
- return ts.visitEachChild(node, visitor, context);
- case 149 /* MethodDeclaration */:
+ return visitSuperKeyword(/*isExpressionOfCall*/ false);
+ case 98 /* ThisKeyword */:
+ return visitThisKeyword(node);
+ case 203 /* MetaProperty */:
+ return visitMetaProperty(node);
+ case 150 /* MethodDeclaration */:
return visitMethodDeclaration(node);
- case 205 /* VariableStatement */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return visitAccessorDeclaration(node);
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
+ case 218 /* ReturnStatement */:
+ return visitReturnStatement(node);
default:
- ts.Debug.failBadSyntaxKind(node);
return ts.visitEachChild(node, visitor, context);
}
}
function visitSourceFile(node) {
+ var ancestorFacts = enterSubtree(3968 /* SourceFileExcludes */, 64 /* SourceFileIncludes */);
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ false, visitor);
+ var statementOffset = ts.addStandardPrologue(statements, node.statements, /*ensureUseStrict*/ false);
addCaptureThisForNodeIfNeeded(statements, node);
+ statementOffset = ts.addCustomPrologue(statements, node.statements, statementOffset, visitor);
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
ts.addRange(statements, endLexicalEnvironment());
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
function visitSwitchStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
- // for switch statement allow only non-labeled break
- convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */;
- var result = ts.visitEachChild(node, visitor, context);
- convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
- return result;
+ if (convertedLoopState !== undefined) {
+ var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
+ // for switch statement allow only non-labeled break
+ convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */;
+ var result = ts.visitEachChild(node, visitor, context);
+ convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
+ return result;
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitCaseBlock(node) {
+ var ancestorFacts = enterSubtree(4032 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
+ function returnCapturedThis(node) {
+ return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
}
function visitReturnStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- convertedLoopState.nonLocalJumps |= 8 /* Return */;
- return ts.createReturn(ts.createObjectLiteral([
- ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
- ? ts.visitNode(node.expression, visitor, ts.isExpression)
- : ts.createVoidZero())
- ]));
+ if (convertedLoopState) {
+ convertedLoopState.nonLocalJumps |= 8 /* Return */;
+ if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ node = returnCapturedThis(node);
+ }
+ return ts.createReturn(ts.createObjectLiteral([
+ ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
+ ? ts.visitNode(node.expression, visitor, ts.isExpression)
+ : ts.createVoidZero())
+ ]));
+ }
+ else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ return returnCapturedThis(node);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitThisKeyword(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- if (enclosingFunction && enclosingFunction.kind === 185 /* ArrowFunction */) {
- // if the enclosing function is an ArrowFunction is then we use the captured 'this' keyword.
- convertedLoopState.containsLexicalThis = true;
- return node;
+ if (convertedLoopState) {
+ if (hierarchyFacts & 2 /* ArrowFunction */) {
+ // if the enclosing function is an ArrowFunction then we use the captured 'this' keyword.
+ convertedLoopState.containsLexicalThis = true;
+ return node;
+ }
+ return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
}
- return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
+ return node;
}
function visitIdentifier(node) {
if (!convertedLoopState) {
@@ -49388,7 +53320,7 @@ var ts;
if (ts.isGeneratedIdentifier(node)) {
return node;
}
- if (node.text !== "arguments" && !resolver.isArgumentsLocalBinding(node)) {
+ if (node.text !== "arguments" || !resolver.isArgumentsLocalBinding(node)) {
return node;
}
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = ts.createUniqueName("arguments"));
@@ -49399,13 +53331,13 @@ var ts;
// it is possible if either
// - break/continue is labeled and label is located inside the converted loop
// - break/continue is non-labeled and located in non-converted loop/switch statement
- var jump = node.kind === 215 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */;
- var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||
+ var jump = node.kind === 217 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */;
+ var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) ||
(!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
if (!canUseBreakOrContinue) {
var labelMarker = void 0;
if (!node.label) {
- if (node.kind === 215 /* BreakStatement */) {
+ if (node.kind === 217 /* BreakStatement */) {
convertedLoopState.nonLocalJumps |= 2 /* Break */;
labelMarker = "break";
}
@@ -49416,7 +53348,7 @@ var ts;
}
}
else {
- if (node.kind === 215 /* BreakStatement */) {
+ if (node.kind === 217 /* BreakStatement */) {
labelMarker = "break-" + node.label.text;
setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker);
}
@@ -49464,8 +53396,9 @@ var ts;
/*type*/ undefined, transformClassLikeDeclarationToExpression(node));
ts.setOriginalNode(variable, node);
var statements = [];
- var statement = ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([variable]), /*location*/ node);
+ var statement = ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([variable]));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, node);
ts.startOnNewLine(statement);
statements.push(statement);
// Add an `export default` statement for default exports (for `--target es5 --module es6`)
@@ -49583,7 +53516,7 @@ var ts;
ts.setEmitFlags(statement, 1536 /* NoComments */ | 384 /* NoTokenSourceMaps */);
statements.push(statement);
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, /*location*/ node.members), /*location*/ undefined, /*multiLine*/ true);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), /*location*/ node.members), /*multiLine*/ true);
ts.setEmitFlags(block, 1536 /* NoComments */);
return block;
}
@@ -49596,7 +53529,7 @@ var ts;
*/
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
if (extendsClauseElement) {
- statements.push(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node)),
+ statements.push(ts.setTextRange(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node))),
/*location*/ extendsClauseElement));
}
}
@@ -49608,6 +53541,9 @@ var ts;
* @param extendsClauseElement The expression for the class `extends` clause.
*/
function addConstructor(statements, node, extendsClauseElement) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16278 /* ConstructorExcludes */, 73 /* ConstructorIncludes */);
var constructor = ts.getFirstConstructorWithBody(node);
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
var constructorFunction = ts.createFunctionDeclaration(
@@ -49615,12 +53551,14 @@ var ts;
/*modifiers*/ undefined,
/*asteriskToken*/ undefined, ts.getDeclarationName(node),
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
- /*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper),
- /*location*/ constructor || node);
+ /*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
+ ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8 /* CapturesThis */);
}
statements.push(constructorFunction);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
}
/**
* Transforms the parameters of the constructor declaration of a class.
@@ -49658,38 +53596,46 @@ var ts;
statementOffset = 0;
}
else if (constructor) {
- // Otherwise, try to emit all potential prologue directives first.
- statementOffset = ts.addPrologueDirectives(statements, constructor.body.statements, /*ensureUseStrict*/ false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, constructor.body.statements, /*ensureUseStrict*/ false);
}
if (constructor) {
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
+ if (!hasSynthesizedSuper) {
+ // If no super call has been synthesized, emit custom prologue directives.
+ statementOffset = ts.addCustomPrologue(statements, constructor.body.statements, statementOffset, visitor);
+ }
ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
}
- var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ // determine whether the class is known syntactically to be a derived class (e.g. a
+ // class that extends a value that is not syntactically known to be `null`).
+ var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94 /* NullKeyword */;
+ var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
// The last statement expression was replaced. Skip it.
if (superCaptureStatus === 1 /* ReplaceSuperCapture */ || superCaptureStatus === 2 /* ReplaceWithReturn */) {
statementOffset++;
}
if (constructor) {
- var body = saveStateAndInvoke(constructor, function (constructor) {
- isInConstructorWithCapturedSuper = superCaptureStatus === 1 /* ReplaceSuperCapture */;
- return ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, /*start*/ statementOffset);
- });
- ts.addRange(statements, body);
+ if (superCaptureStatus === 1 /* ReplaceSuperCapture */) {
+ hierarchyFacts |= 4096 /* ConstructorWithCapturedSuper */;
+ }
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, /*start*/ statementOffset));
}
// Return `_this` unless we're sure enough that it would be pointless to add a return statement.
// If there's a constructor that we can tell returns in enough places, then we *do not* want to add a return.
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== 2 /* ReplaceWithReturn */
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(ts.createReturn(ts.createIdentifier("_this")));
}
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements,
+ if (constructor) {
+ prependCaptureNewTargetIfNeeded(statements, constructor, /*copyOnWrite*/ false);
+ }
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ constructor ? constructor.body.statements : node.members),
- /*location*/ constructor ? constructor.body : node,
/*multiLine*/ true);
+ ts.setTextRange(block, constructor ? constructor.body : node);
if (!constructor) {
ts.setEmitFlags(block, 1536 /* NoComments */);
}
@@ -49702,17 +53648,17 @@ var ts;
*/
function isSufficientlyCoveredByReturnStatements(statement) {
// A return statement is considered covered.
- if (statement.kind === 216 /* ReturnStatement */) {
+ if (statement.kind === 218 /* ReturnStatement */) {
return true;
}
- else if (statement.kind === 208 /* IfStatement */) {
+ else if (statement.kind === 210 /* IfStatement */) {
var ifStatement = statement;
if (ifStatement.elseStatement) {
return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
}
}
- else if (statement.kind === 204 /* Block */) {
+ else if (statement.kind === 206 /* Block */) {
var lastStatement = ts.lastOrUndefined(statement.statements);
if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
return true;
@@ -49725,9 +53671,9 @@ var ts;
*
* @returns The new statement offset into the `statements` array.
*/
- function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, hasExtendsClause, hasSynthesizedSuper, statementOffset) {
+ function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, isDerivedClass, hasSynthesizedSuper, statementOffset) {
// If this isn't a derived class, just capture 'this' for arrow functions if necessary.
- if (!hasExtendsClause) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -49770,16 +53716,18 @@ var ts;
var ctorStatements = ctor.body.statements;
if (statementOffset < ctorStatements.length) {
firstStatement = ctorStatements[statementOffset];
- if (firstStatement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) {
- var superCall = firstStatement.expression;
- superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
+ if (firstStatement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) {
+ superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression);
}
}
- // Return the result if we have an immediate super() call on the last statement.
- if (superCallExpression && statementOffset === ctorStatements.length - 1) {
+ // Return the result if we have an immediate super() call on the last statement,
+ // but only if the constructor itself doesn't use 'this' elsewhere.
+ if (superCallExpression
+ && statementOffset === ctorStatements.length - 1
+ && !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) {
var returnStatement = ts.createReturn(superCallExpression);
- if (superCallExpression.kind !== 192 /* BinaryExpression */
- || superCallExpression.left.kind !== 179 /* CallExpression */) {
+ if (superCallExpression.kind !== 193 /* BinaryExpression */
+ || superCallExpression.left.kind !== 180 /* CallExpression */) {
ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'.");
}
// Shift comments from the original super call to the return statement.
@@ -49788,18 +53736,18 @@ var ts;
return 2 /* ReplaceWithReturn */;
}
// Perform the capture.
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
// If we're actually replacing the original statement, we need to signal this to the caller.
if (superCallExpression) {
return 1 /* ReplaceSuperCapture */;
}
return 0 /* NoReplacement */;
}
+ function createActualThis() {
+ return ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */);
+ }
function createDefaultSuperCallOrThis() {
- var actualThis = ts.createThis();
- ts.setEmitFlags(actualThis, 4 /* NoSubstitution */);
- var superCall = ts.createFunctionApply(ts.createIdentifier("_super"), actualThis, ts.createIdentifier("arguments"));
- return ts.createLogicalOr(superCall, actualThis);
+ return ts.createLogicalOr(ts.createLogicalAnd(ts.createStrictInequality(ts.createIdentifier("_super"), ts.createNull()), ts.createFunctionApply(ts.createIdentifier("_super"), createActualThis(), ts.createIdentifier("arguments"))), createActualThis());
}
/**
* Visits a parameter declaration.
@@ -49814,25 +53762,25 @@ var ts;
else if (ts.isBindingPattern(node.name)) {
// Binding patterns are converted into a generated name and are
// evaluated inside the function body.
- return ts.setOriginalNode(ts.createParameter(
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(
/*decorators*/ undefined,
/*modifiers*/ undefined,
/*dotDotDotToken*/ undefined, ts.getGeneratedNameForNode(node),
/*questionToken*/ undefined,
/*type*/ undefined,
- /*initializer*/ undefined,
+ /*initializer*/ undefined),
/*location*/ node),
/*original*/ node);
}
else if (node.initializer) {
// Initializers are elided
- return ts.setOriginalNode(ts.createParameter(
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(
/*decorators*/ undefined,
/*modifiers*/ undefined,
/*dotDotDotToken*/ undefined, node.name,
/*questionToken*/ undefined,
/*type*/ undefined,
- /*initializer*/ undefined,
+ /*initializer*/ undefined),
/*location*/ node),
/*original*/ node);
}
@@ -49862,17 +53810,17 @@ var ts;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- var name_35 = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
+ var name = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
// A rest parameter cannot have a binding pattern or an initializer,
// so let's just ignore it.
if (dotDotDotToken) {
continue;
}
- if (ts.isBindingPattern(name_35)) {
- addDefaultValueAssignmentForBindingPattern(statements, parameter, name_35, initializer);
+ if (ts.isBindingPattern(name)) {
+ addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer);
}
else if (initializer) {
- addDefaultValueAssignmentForInitializer(statements, parameter, name_35, initializer);
+ addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);
}
}
}
@@ -49907,13 +53855,11 @@ var ts;
*/
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
initializer = ts.visitNode(initializer, visitor, ts.isExpression);
- var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.createBlock([
- ts.createStatement(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48 /* NoSourceMap */), ts.setEmitFlags(initializer, 48 /* NoSourceMap */ | ts.getEmitFlags(initializer)),
- /*location*/ parameter))
- ], /*location*/ parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */),
- /*elseStatement*/ undefined,
- /*location*/ parameter);
+ var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.setTextRange(ts.createBlock([
+ ts.createStatement(ts.setTextRange(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48 /* NoSourceMap */), ts.setEmitFlags(initializer, 48 /* NoSourceMap */ | ts.getEmitFlags(initializer))), parameter))
+ ]), parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */));
statement.startsOnNewLine = true;
+ ts.setTextRange(statement, parameter);
ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 524288 /* CustomPrologue */);
statements.push(statement);
}
@@ -49950,22 +53896,21 @@ var ts;
var restIndex = node.parameters.length - 1;
var temp = ts.createLoopVariable();
// var param = [];
- statements.push(ts.setEmitFlags(ts.createVariableStatement(
+ statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName,
/*type*/ undefined, ts.createArrayLiteral([]))
- ]),
+ ])),
/*location*/ parameter), 524288 /* CustomPrologue */));
// for (var _i = restIndex; _i < arguments.length; _i++) {
// param[_i - restIndex] = arguments[_i];
// }
- var forStatement = ts.createFor(ts.createVariableDeclarationList([
+ var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, /*type*/ undefined, ts.createLiteral(restIndex))
- ], /*location*/ parameter), ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length"),
- /*location*/ parameter), ts.createPostfixIncrement(temp, /*location*/ parameter), ts.createBlock([
- ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
+ ]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
+ ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
? temp
- : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp)),
+ : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))),
/*location*/ parameter))
]));
ts.setEmitFlags(forStatement, 524288 /* CustomPrologue */);
@@ -49979,7 +53924,7 @@ var ts;
* @param node A node.
*/
function addCaptureThisForNodeIfNeeded(statements, node) {
- if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 185 /* ArrowFunction */) {
+ if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 186 /* ArrowFunction */) {
captureThisForNode(statements, node, ts.createThis());
}
}
@@ -49989,11 +53934,52 @@ var ts;
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this",
/*type*/ undefined, initializer)
- ]), originalStatement);
+ ]));
ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 524288 /* CustomPrologue */);
+ ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
}
+ function prependCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
+ if (hierarchyFacts & 16384 /* NewTarget */) {
+ var newTarget = void 0;
+ switch (node.kind) {
+ case 186 /* ArrowFunction */:
+ return statements;
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ // Methods and accessors cannot be constructors, so 'new.target' will
+ // always return 'undefined'.
+ newTarget = ts.createVoidZero();
+ break;
+ case 151 /* Constructor */:
+ // Class constructors can only be called with `new`, so `this.constructor`
+ // should be relatively safe to use.
+ newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor");
+ break;
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ // Functions can be called or constructed, and may have a `this` due to
+ // being a member or when calling an imported function via `other_1.f()`.
+ newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 92 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero());
+ break;
+ default:
+ ts.Debug.failBadSyntaxKind(node);
+ break;
+ }
+ var captureNewTargetStatement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration("_newTarget",
+ /*type*/ undefined, newTarget)
+ ]));
+ if (copyOnWrite) {
+ return [captureNewTargetStatement].concat(statements);
+ }
+ statements.unshift(captureNewTargetStatement);
+ }
+ return statements;
+ }
/**
* Adds statements to the class body function for a class to define the members of the
* class.
@@ -50005,20 +53991,20 @@ var ts;
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
switch (member.kind) {
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
statements.push(transformSemicolonClassElementToStatement(member));
break;
- case 149 /* MethodDeclaration */:
- statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member));
+ case 150 /* MethodDeclaration */:
+ statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
break;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var accessors = ts.getAllAccessorDeclarations(node.members, member);
if (member === accessors.firstAccessor) {
- statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors));
+ statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
}
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// Constructors are handled in visitClassExpression/visitClassDeclaration
break;
default:
@@ -50033,7 +54019,7 @@ var ts;
* @param member The SemicolonClassElement node.
*/
function transformSemicolonClassElementToStatement(member) {
- return ts.createEmptyStatement(/*location*/ member);
+ return ts.setTextRange(ts.createEmptyStatement(), member);
}
/**
* Transforms a MethodDeclaration into a statement for a class body function.
@@ -50041,14 +54027,15 @@ var ts;
* @param receiver The receiver for the member.
* @param member The MethodDeclaration node.
*/
- function transformClassMethodDeclarationToStatement(receiver, member) {
+ function transformClassMethodDeclarationToStatement(receiver, member, container) {
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
var commentRange = ts.getCommentRange(member);
var sourceMapRange = ts.getSourceMapRange(member);
var memberName = ts.createMemberAccessForPropertyName(receiver, ts.visitNode(member.name, visitor, ts.isPropertyName), /*location*/ member.name);
- var memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined);
+ var memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined, container);
ts.setEmitFlags(memberFunction, 1536 /* NoComments */);
ts.setSourceMapRange(memberFunction, sourceMapRange);
- var statement = ts.createStatement(ts.createAssignment(memberName, memberFunction),
+ var statement = ts.setTextRange(ts.createStatement(ts.createAssignment(memberName, memberFunction)),
/*location*/ member);
ts.setOriginalNode(statement, member);
ts.setCommentRange(statement, commentRange);
@@ -50056,6 +54043,7 @@ var ts;
// No source map should be emitted for this statement to align with the
// old emitter.
ts.setEmitFlags(statement, 48 /* NoSourceMap */);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return statement;
}
/**
@@ -50064,13 +54052,13 @@ var ts;
* @param receiver The receiver for the member.
* @param accessors The set of related get/set accessors.
*/
- function transformAccessorsToStatement(receiver, accessors) {
- var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, /*startsOnNewLine*/ false),
- /*location*/ ts.getSourceMapRange(accessors.firstAccessor));
+ function transformAccessorsToStatement(receiver, accessors, container) {
+ var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, container, /*startsOnNewLine*/ false));
// The location for the statement is used to emit source maps only.
// No comments should be emitted for this statement to align with the
// old emitter.
ts.setEmitFlags(statement, 1536 /* NoComments */);
+ ts.setSourceMapRange(statement, ts.getSourceMapRange(accessors.firstAccessor));
return statement;
}
/**
@@ -50079,8 +54067,9 @@ var ts;
*
* @param receiver The receiver for the member.
*/
- function transformAccessorsToExpression(receiver, _a, startsOnNewLine) {
+ function transformAccessorsToExpression(receiver, _a, container, startsOnNewLine) {
var firstAccessor = _a.firstAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
// To align with source maps in the old emitter, the receiver and property name
// arguments are both mapped contiguously to the accessor name.
var target = ts.getMutableClone(receiver);
@@ -50091,7 +54080,7 @@ var ts;
ts.setSourceMapRange(propertyName, firstAccessor.name);
var properties = [];
if (getAccessor) {
- var getterFunction = transformFunctionLikeToExpression(getAccessor, /*location*/ undefined, /*name*/ undefined);
+ var getterFunction = transformFunctionLikeToExpression(getAccessor, /*location*/ undefined, /*name*/ undefined, container);
ts.setSourceMapRange(getterFunction, ts.getSourceMapRange(getAccessor));
ts.setEmitFlags(getterFunction, 512 /* NoLeadingComments */);
var getter = ts.createPropertyAssignment("get", getterFunction);
@@ -50099,23 +54088,24 @@ var ts;
properties.push(getter);
}
if (setAccessor) {
- var setterFunction = transformFunctionLikeToExpression(setAccessor, /*location*/ undefined, /*name*/ undefined);
+ var setterFunction = transformFunctionLikeToExpression(setAccessor, /*location*/ undefined, /*name*/ undefined, container);
ts.setSourceMapRange(setterFunction, ts.getSourceMapRange(setAccessor));
ts.setEmitFlags(setterFunction, 512 /* NoLeadingComments */);
var setter = ts.createPropertyAssignment("set", setterFunction);
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
- properties.push(ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), ts.createPropertyAssignment("configurable", ts.createLiteral(true)));
+ properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
propertyName,
- ts.createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true)
+ ts.createObjectLiteral(properties, /*multiLine*/ true)
]);
if (startsOnNewLine) {
call.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return call;
}
/**
@@ -50127,14 +54117,20 @@ var ts;
if (node.transformFlags & 16384 /* ContainsLexicalThis */) {
enableSubstitutionsForCapturedThis();
}
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16256 /* ArrowFunctionExcludes */, 66 /* ArrowFunctionIncludes */);
var func = ts.createFunctionExpression(
/*modifiers*/ undefined,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node), node);
+ /*type*/ undefined, transformFunctionBody(node));
+ ts.setTextRange(func, node);
ts.setOriginalNode(func, node);
ts.setEmitFlags(func, 8 /* CapturesThis */);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
return func;
}
/**
@@ -50143,12 +54139,24 @@ var ts;
* @param node a FunctionExpression node.
*/
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node,
- /*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, node.transformFlags & 64 /* ES2015 */
+ var ancestorFacts = ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */
+ ? enterSubtree(16278 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */)
+ : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64 /* ES2015 */
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384 /* NewTarget */
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionExpression(node,
+ /*modifiers*/ undefined, node.asteriskToken, name,
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body);
}
/**
* Visits a FunctionDeclaration node.
@@ -50156,12 +54164,22 @@ var ts;
* @param node a FunctionDeclaration node.
*/
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, node.modifiers, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, node.transformFlags & 64 /* ES2015 */
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64 /* ES2015 */
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384 /* NewTarget */
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name,
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body);
}
/**
* Transforms a function-like node into a FunctionExpression.
@@ -50170,18 +54188,24 @@ var ts;
* @param location The source-map location for the new FunctionExpression.
* @param name The name of the new FunctionExpression.
*/
- function transformFunctionLikeToExpression(node, location, name) {
- var savedContainingNonArrowFunction = enclosingNonArrowFunction;
- if (node.kind !== 185 /* ArrowFunction */) {
- enclosingNonArrowFunction = node;
+ function transformFunctionLikeToExpression(node, location, name, container) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = container && ts.isClassLike(container) && !ts.hasModifier(node, 32 /* Static */)
+ ? enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */)
+ : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */)) {
+ name = ts.getGeneratedNameForNode(node);
}
- var expression = ts.setOriginalNode(ts.createFunctionExpression(
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(
/*modifiers*/ undefined, node.asteriskToken, name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, saveStateAndInvoke(node, transformFunctionBody), location),
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body), location),
/*original*/ node);
- enclosingNonArrowFunction = savedContainingNonArrowFunction;
- return expression;
}
/**
* Transforms the body of a function-like node.
@@ -50199,8 +54223,8 @@ var ts;
resumeLexicalEnvironment();
if (ts.isBlock(body)) {
// ensureUseStrict is false because no new prologue-directive should be added.
- // addPrologueDirectives will simply put already-existing directives at the beginning of the target statement-array
- statementOffset = ts.addPrologueDirectives(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ // addStandardPrologue will put already-existing directives at the beginning of the target statement-array
+ statementOffset = ts.addStandardPrologue(statements, body.statements, /*ensureUseStrict*/ false);
}
addCaptureThisForNodeIfNeeded(statements, node);
addDefaultValueAssignmentsIfNeeded(statements, node);
@@ -50210,6 +54234,8 @@ var ts;
multiLine = true;
}
if (ts.isBlock(body)) {
+ // addCustomPrologue puts already-existing directives at the beginning of the target statement-array
+ statementOffset = ts.addCustomPrologue(statements, body.statements, statementOffset, visitor);
statementsLocation = body.statements;
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, statementOffset));
// If the original body was a multi-line block, this must be a multi-line block.
@@ -50218,7 +54244,7 @@ var ts;
}
}
else {
- ts.Debug.assert(node.kind === 185 /* ArrowFunction */);
+ ts.Debug.assert(node.kind === 186 /* ArrowFunction */);
// To align with the old emitter, we use a synthetic end position on the location
// for the statement list we synthesize when we down-level an arrow function with
// an expression function body. This prevents both comments and source maps from
@@ -50234,7 +54260,8 @@ var ts;
}
}
var expression = ts.visitNode(body, visitor, ts.isExpression);
- var returnStatement = ts.createReturn(expression, /*location*/ body);
+ var returnStatement = ts.createReturn(expression);
+ ts.setTextRange(returnStatement, body);
ts.setEmitFlags(returnStatement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 1024 /* NoTrailingComments */);
statements.push(returnStatement);
// To align with the source map emit for the old emitter, we set a custom
@@ -50243,11 +54270,13 @@ var ts;
}
var lexicalEnvironment = context.endLexicalEnvironment();
ts.addRange(statements, lexicalEnvironment);
+ prependCaptureNewTargetIfNeeded(statements, node, /*copyOnWrite*/ false);
// If we added any final generated statements, this must be a multi-line block
if (!multiLine && lexicalEnvironment && lexicalEnvironment.length) {
multiLine = true;
}
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), node.body, multiLine);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), multiLine);
+ ts.setTextRange(block, node.body);
if (!multiLine && singleLine) {
ts.setEmitFlags(block, 1 /* SingleLine */);
}
@@ -50257,6 +54286,23 @@ var ts;
ts.setOriginalNode(block, node.body);
return block;
}
+ function visitFunctionBodyDownLevel(node) {
+ var updated = ts.visitFunctionBody(node.body, functionBodyVisitor, context);
+ return ts.updateBlock(updated, ts.setTextRange(ts.createNodeArray(prependCaptureNewTargetIfNeeded(updated.statements, node, /*copyOnWrite*/ true)),
+ /*location*/ updated.statements));
+ }
+ function visitBlock(node, isFunctionBody) {
+ if (isFunctionBody) {
+ // A function body is not a block scope.
+ return ts.visitEachChild(node, visitor, context);
+ }
+ var ancestorFacts = hierarchyFacts & 256 /* IterationStatement */
+ ? enterSubtree(4032 /* IterationStatementBlockExcludes */, 512 /* IterationStatementBlockIncludes */)
+ : enterSubtree(3904 /* BlockExcludes */, 128 /* BlockIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
/**
* Visits an ExpressionStatement that contains a destructuring assignment.
*
@@ -50265,9 +54311,9 @@ var ts;
function visitExpressionStatement(node) {
// If we are here it is most likely because our expression is a destructuring assignment.
switch (node.expression.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return ts.updateStatement(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false));
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return ts.updateStatement(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false));
}
return ts.visitEachChild(node, visitor, context);
@@ -50282,10 +54328,13 @@ var ts;
function visitParenthesizedExpression(node, needsDestructuringValue) {
// If we are here it is most likely because our expression is a destructuring assignment.
if (!needsDestructuringValue) {
+ // By default we always emit the RHS at the end of a flattened destructuring
+ // expression. If we are in a state where we do not need the destructuring value,
+ // we pass that information along to the children that care about it.
switch (node.expression.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return ts.updateParen(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false));
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return ts.updateParen(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false));
}
}
@@ -50303,9 +54352,12 @@ var ts;
if (ts.isDestructuringAssignment(node)) {
return ts.flattenDestructuringAssignment(node, visitor, context, 0 /* All */, needsDestructuringValue);
}
+ return ts.visitEachChild(node, visitor, context);
}
function visitVariableStatement(node) {
- if (convertedLoopState && (ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) == 0) {
+ var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */);
+ var updated;
+ if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) {
// we are inside a converted loop - hoist variable declarations
var assignments = void 0;
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -50319,18 +54371,22 @@ var ts;
else {
assignment = ts.createBinary(decl.name, 57 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression));
}
- (assignments || (assignments = [])).push(assignment);
+ assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- return ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); }), node);
+ updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); })), node);
}
else {
// none of declarations has initializer - the entire variable statement can be deleted
- return undefined;
+ updated = undefined;
}
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
/**
* Visits a VariableDeclarationList that is block scoped (e.g. `let` or `const`).
@@ -50338,25 +54394,29 @@ var ts;
* @param node A VariableDeclarationList node.
*/
function visitVariableDeclarationList(node) {
- if (node.flags & 3 /* BlockScoped */) {
- enableSubstitutionsForBlockScopedBindings();
- }
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
- ? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
- var declarationList = ts.createVariableDeclarationList(declarations, /*location*/ node);
- ts.setOriginalNode(declarationList, node);
- ts.setCommentRange(declarationList, node);
- if (node.transformFlags & 8388608 /* ContainsBindingPattern */
- && (ts.isBindingPattern(node.declarations[0].name)
- || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
- // If the first or last declaration is a binding pattern, we need to modify
- // the source map range for the declaration list.
- var firstDeclaration = ts.firstOrUndefined(declarations);
- var lastDeclaration = ts.lastOrUndefined(declarations);
- ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ if (node.transformFlags & 64 /* ES2015 */) {
+ if (node.flags & 3 /* BlockScoped */) {
+ enableSubstitutionsForBlockScopedBindings();
+ }
+ var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
+ ? visitVariableDeclarationInLetDeclarationList
+ : visitVariableDeclaration));
+ var declarationList = ts.createVariableDeclarationList(declarations);
+ ts.setOriginalNode(declarationList, node);
+ ts.setTextRange(declarationList, node);
+ ts.setCommentRange(declarationList, node);
+ if (node.transformFlags & 8388608 /* ContainsBindingPattern */
+ && (ts.isBindingPattern(node.declarations[0].name)
+ || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
+ // If the first or last declaration is a binding pattern, we need to modify
+ // the source map range for the declaration list.
+ var firstDeclaration = ts.firstOrUndefined(declarations);
+ var lastDeclaration = ts.lastOrUndefined(declarations);
+ ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ }
+ return declarationList;
}
- return declarationList;
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Gets a value indicating whether we should emit an explicit initializer for a variable
@@ -50407,18 +54467,16 @@ var ts;
var flags = resolver.getNodeCheckFlags(node);
var isCapturedInFunction = flags & 131072 /* CapturedBlockScopedBinding */;
var isDeclaredInLoop = flags & 262144 /* BlockScopedBindingInLoop */;
- var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(enclosingBlockScopeContainer)
+ var emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0
|| (isCapturedInFunction
&& isDeclaredInLoop
- && ts.isBlock(enclosingBlockScopeContainer)
- && ts.isIterationStatement(enclosingBlockScopeContainerParent, /*lookInLabeledStatements*/ false));
+ && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0);
var emitExplicitInitializer = !emittedAsTopLevel
- && enclosingBlockScopeContainer.kind !== 212 /* ForInStatement */
- && enclosingBlockScopeContainer.kind !== 213 /* ForOfStatement */
+ && (hierarchyFacts & 2048 /* ForInOrForOfStatement */) === 0
&& (!resolver.isDeclarationWithCollidingName(node)
|| (isDeclaredInLoop
&& !isCapturedInFunction
- && !ts.isIterationStatement(enclosingBlockScopeContainer, /*lookInLabeledStatements*/ false)));
+ && (hierarchyFacts & (1024 /* ForStatement */ | 2048 /* ForInOrForOfStatement */)) === 0));
return emitExplicitInitializer;
}
/**
@@ -50447,101 +54505,77 @@ var ts;
* @param node A VariableDeclaration node.
*/
function visitVariableDeclaration(node) {
- // If we are here it is because the name contains a binding pattern.
+ var ancestorFacts = enterSubtree(32 /* ExportedVariableStatement */, 0 /* None */);
+ var updated;
if (ts.isBindingPattern(node.name)) {
- var hoistTempVariables = enclosingVariableStatement
- && ts.hasModifier(enclosingVariableStatement, 1 /* Export */);
- return ts.flattenDestructuringBinding(node, visitor, context, 0 /* All */,
- /*value*/ undefined, hoistTempVariables);
- }
- return ts.visitEachChild(node, visitor, context);
- }
- function visitLabeledStatement(node) {
- if (convertedLoopState) {
- if (!convertedLoopState.labels) {
- convertedLoopState.labels = ts.createMap();
- }
- convertedLoopState.labels[node.label.text] = node.label.text;
- }
- var result;
- if (ts.isIterationStatement(node.statement, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node.statement)) {
- result = ts.visitNodes(ts.createNodeArray([node.statement]), visitor, ts.isStatement);
+ updated = ts.flattenDestructuringBinding(node, visitor, context, 0 /* All */,
+ /*value*/ undefined, (ancestorFacts & 32 /* ExportedVariableStatement */) !== 0);
}
else {
- result = ts.visitEachChild(node, visitor, context);
+ updated = ts.visitEachChild(node, visitor, context);
}
- if (convertedLoopState) {
- convertedLoopState.labels[node.label.text] = undefined;
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
+ function recordLabel(node) {
+ convertedLoopState.labels.set(node.label.text, node.label.text);
+ }
+ function resetLabel(node) {
+ convertedLoopState.labels.set(node.label.text, undefined);
+ }
+ function visitLabeledStatement(node) {
+ if (convertedLoopState && !convertedLoopState.labels) {
+ convertedLoopState.labels = ts.createMap();
}
- return result;
+ var statement = ts.unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);
+ return ts.isIterationStatement(statement, /*lookInLabeledStatements*/ false)
+ ? visitIterationStatement(statement, /*outermostLabeledStatement*/ node)
+ : ts.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement), node, convertedLoopState && resetLabel);
}
- function visitDoStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitIterationStatement(node, outermostLabeledStatement) {
+ switch (node.kind) {
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return visitDoOrWhileStatement(node, outermostLabeledStatement);
+ case 213 /* ForStatement */:
+ return visitForStatement(node, outermostLabeledStatement);
+ case 214 /* ForInStatement */:
+ return visitForInStatement(node, outermostLabeledStatement);
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, outermostLabeledStatement);
+ }
+ }
+ function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {
+ var ancestorFacts = enterSubtree(excludeFacts, includeFacts);
+ var updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
- function visitWhileStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitDoOrWhileStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(0 /* DoOrWhileStatementExcludes */, 256 /* DoOrWhileStatementIncludes */, node, outermostLabeledStatement);
}
- function visitForStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(3008 /* ForStatementExcludes */, 1280 /* ForStatementIncludes */, node, outermostLabeledStatement);
}
- function visitForInStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForInStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984 /* ForInOrForOfStatementExcludes */, 2304 /* ForInOrForOfStatementIncludes */, node, outermostLabeledStatement);
}
- /**
- * Visits a ForOfStatement and converts it into a compatible ForStatement.
- *
- * @param node A ForOfStatement.
- */
- function visitForOfStatement(node) {
- return convertIterationStatementBodyIfNecessary(node, convertForOfToFor);
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984 /* ForInOrForOfStatementExcludes */, 2304 /* ForInOrForOfStatementIncludes */, node, outermostLabeledStatement, compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray);
}
- function convertForOfToFor(node, convertedLoopBodyStatements) {
- // The following ES6 code:
- //
- // for (let v of expr) { }
- //
- // should be emitted as
- //
- // for (var _i = 0, _a = expr; _i < _a.length; _i++) {
- // var v = _a[_i];
- // }
- //
- // where _a and _i are temps emitted to capture the RHS and the counter,
- // respectively.
- // When the left hand side is an expression instead of a let declaration,
- // the "let v" is not emitted.
- // When the left hand side is a let/const, the v is renamed if there is
- // another v in scope.
- // Note that all assignments to the LHS are emitted in the body, including
- // all destructuring.
- // Note also that because an extra statement is needed to assign to the LHS,
- // for-of bodies are always emitted as blocks.
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var initializer = node.initializer;
+ function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {
var statements = [];
- // In the case where the user wrote an identifier as the RHS, like this:
- //
- // for (let v of arr) { }
- //
- // we don't want to emit a temporary variable for the RHS, just use it directly.
- var counter = ts.createLoopVariable();
- var rhsReference = expression.kind === 70 /* Identifier */
- ? ts.createUniqueName(expression.text)
- : ts.createTempVariable(/*recordTempVariable*/ undefined);
- var elementAccess = ts.createElementAccess(rhsReference, counter);
- // Initialize LHS
- // var v = _a[_i];
- if (ts.isVariableDeclarationList(initializer)) {
- if (initializer.flags & 3 /* BlockScoped */) {
+ if (ts.isVariableDeclarationList(node.initializer)) {
+ if (node.initializer.flags & 3 /* BlockScoped */) {
enableSubstitutionsForBlockScopedBindings();
}
- var firstOriginalDeclaration = ts.firstOrUndefined(initializer.declarations);
+ var firstOriginalDeclaration = ts.firstOrUndefined(node.initializer.declarations);
if (firstOriginalDeclaration && ts.isBindingPattern(firstOriginalDeclaration.name)) {
// This works whether the declaration is a var, let, or const.
// It will use rhsIterationValue _a[_i] as the initializer.
- var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0 /* All */, elementAccess);
- var declarationList = ts.createVariableDeclarationList(declarations, /*location*/ initializer);
- ts.setOriginalNode(declarationList, initializer);
+ var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0 /* All */, boundValue);
+ var declarationList = ts.setTextRange(ts.createVariableDeclarationList(declarations), node.initializer);
+ ts.setOriginalNode(declarationList, node.initializer);
// Adjust the source map range for the first declaration to align with the old
// emitter.
var firstDeclaration = declarations[0];
@@ -50553,27 +54587,24 @@ var ts;
else {
// The following call does not include the initializer, so we have
// to emit it separately.
- statements.push(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.setOriginalNode(ts.createVariableDeclarationList([
+ statements.push(ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.setOriginalNode(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(/*recordTempVariable*/ undefined),
- /*type*/ undefined, ts.createElementAccess(rhsReference, counter))
- ], /*location*/ ts.moveRangePos(initializer, -1)), initializer),
- /*location*/ ts.moveRangeEnd(initializer, -1)));
+ /*type*/ undefined, boundValue)
+ ]), ts.moveRangePos(node.initializer, -1)), node.initializer)), ts.moveRangeEnd(node.initializer, -1)));
}
}
else {
// Initializer is an expression. Emit the expression in the body, so that it's
// evaluated on every iteration.
- var assignment = ts.createAssignment(initializer, elementAccess);
+ var assignment = ts.createAssignment(node.initializer, boundValue);
if (ts.isDestructuringAssignment(assignment)) {
- // This is a destructuring pattern, so we flatten the destructuring instead.
- statements.push(ts.createStatement(ts.flattenDestructuringAssignment(assignment, visitor, context, 0 /* All */)));
+ ts.aggregateTransformFlags(assignment);
+ statements.push(ts.createStatement(visitBinaryExpression(assignment, /*needsDestructuringValue*/ false)));
}
else {
- // Currently there is not way to check that assignment is binary expression of destructing assignment
- // so we have to cast never type to binaryExpression
- assignment.end = initializer.end;
- statements.push(ts.createStatement(assignment, /*location*/ ts.moveRangeEnd(initializer, -1)));
+ assignment.end = node.initializer.end;
+ statements.push(ts.setTextRange(ts.createStatement(ts.visitNode(assignment, visitor, ts.isExpression)), ts.moveRangeEnd(node.initializer, -1)));
}
}
var bodyLocation;
@@ -50582,7 +54613,7 @@ var ts;
ts.addRange(statements, convertedLoopBodyStatements);
}
else {
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
if (ts.isBlock(statement)) {
ts.addRange(statements, statement.statements);
bodyLocation = statement;
@@ -50592,22 +54623,92 @@ var ts;
statements.push(statement);
}
}
- // The old emitter does not emit source maps for the expression
- ts.setEmitFlags(expression, 48 /* NoSourceMap */ | ts.getEmitFlags(expression));
// The old emitter does not emit source maps for the block.
// We add the location to preserve comments.
- var body = ts.createBlock(ts.createNodeArray(statements, /*location*/ statementsLocation),
- /*location*/ bodyLocation);
- ts.setEmitFlags(body, 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
- var forStatement = ts.createFor(ts.setEmitFlags(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(counter, /*type*/ undefined, ts.createLiteral(0), /*location*/ ts.moveRangePos(node.expression, -1)),
- ts.createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression)
- ], /*location*/ node.expression), 1048576 /* NoHoisting */), ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length"),
- /*location*/ node.expression), ts.createPostfixIncrement(counter, /*location*/ node.expression), body,
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
+ }
+ function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ // The following ES6 code:
+ //
+ // for (let v of expr) { }
+ //
+ // should be emitted as
+ //
+ // for (var _i = 0, _a = expr; _i < _a.length; _i++) {
+ // var v = _a[_i];
+ // }
+ //
+ // where _a and _i are temps emitted to capture the RHS and the counter,
+ // respectively.
+ // When the left hand side is an expression instead of a let declaration,
+ // the "let v" is not emitted.
+ // When the left hand side is a let/const, the v is renamed if there is
+ // another v in scope.
+ // Note that all assignments to the LHS are emitted in the body, including
+ // all destructuring.
+ // Note also that because an extra statement is needed to assign to the LHS,
+ // for-of bodies are always emitted as blocks.
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ // In the case where the user wrote an identifier as the RHS, like this:
+ //
+ // for (let v of arr) { }
+ //
+ // we don't want to emit a temporary variable for the RHS, just use it directly.
+ var counter = ts.createLoopVariable();
+ var rhsReference = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ // The old emitter does not emit source maps for the expression
+ ts.setEmitFlags(expression, 48 /* NoSourceMap */ | ts.getEmitFlags(expression));
+ var forStatement = ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(counter, /*type*/ undefined, ts.createLiteral(0)), ts.moveRangePos(node.expression, -1)),
+ ts.setTextRange(ts.createVariableDeclaration(rhsReference, /*type*/ undefined, expression), node.expression)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.setTextRange(ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length")), node.expression),
+ /*incrementor*/ ts.setTextRange(ts.createPostfixIncrement(counter), node.expression),
+ /*statement*/ convertForOfStatementHead(node, ts.createElementAccess(rhsReference, counter), convertedLoopBodyStatements)),
/*location*/ node);
// Disable trailing source maps for the OpenParenToken to align source map emit with the old emitter.
ts.setEmitFlags(forStatement, 256 /* NoTokenTrailingSourceMaps */);
- return forStatement;
+ ts.setTextRange(forStatement, node);
+ return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var values = ts.createValuesHelper(context, expression, node.expression);
+ var next = ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, values), node.expression),
+ ts.createVariableDeclaration(result, /*type*/ undefined, next)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
+ /*incrementor*/ ts.createAssignment(result, next),
+ /*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)),
+ /*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1 /* SingleLine */)), ts.createBlock([
+ ts.createTry(
+ /*tryBlock*/ ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createFunctionCall(returnMethod, iterator, []))), 1 /* SingleLine */),
+ ]),
+ /*catchClause*/ undefined,
+ /*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1 /* SingleLine */)
+ ]), 1 /* SingleLine */))
+ ]));
}
/**
* Visits an ObjectLiteralExpression with computed propety names.
@@ -50621,31 +54722,39 @@ var ts;
// Find the first computed property.
// Everything until that point can be emitted as part of the initial object literal.
var numInitialProperties = numProperties;
+ var numInitialPropertiesWithoutYield = numProperties;
for (var i = 0; i < numProperties; i++) {
var property = properties[i];
- if (property.transformFlags & 16777216 /* ContainsYield */
- || property.name.kind === 142 /* ComputedPropertyName */) {
+ if ((property.transformFlags & 16777216 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */)
+ && i < numInitialPropertiesWithoutYield) {
+ numInitialPropertiesWithoutYield = i;
+ }
+ if (property.name.kind === 143 /* ComputedPropertyName */) {
numInitialProperties = i;
break;
}
}
- ts.Debug.assert(numInitialProperties !== numProperties);
- // For computed properties, we need to create a unique handle to the object
- // literal so we can modify it without risking internal assignments tainting the object.
- var temp = ts.createTempVariable(hoistVariableDeclaration);
- // Write out the first non-computed properties, then emit the rest through indexing on the temp variable.
- var expressions = [];
- var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties),
- /*location*/ undefined, node.multiLine), 32768 /* Indented */));
- if (node.multiLine) {
- assignment.startsOnNewLine = true;
- }
- expressions.push(assignment);
- addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
- // We need to clone the temporary identifier so that we can write it on a
- // new line
- expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
- return ts.inlineExpressions(expressions);
+ if (numInitialProperties !== numProperties) {
+ if (numInitialPropertiesWithoutYield < numInitialProperties) {
+ numInitialProperties = numInitialPropertiesWithoutYield;
+ }
+ // For computed properties, we need to create a unique handle to the object
+ // literal so we can modify it without risking internal assignments tainting the object.
+ var temp = ts.createTempVariable(hoistVariableDeclaration);
+ // Write out the first non-computed properties, then emit the rest through indexing on the temp variable.
+ var expressions = [];
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 32768 /* Indented */));
+ if (node.multiLine) {
+ assignment.startsOnNewLine = true;
+ }
+ expressions.push(assignment);
+ addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
+ // We need to clone the temporary identifier so that we can write it on a
+ // new line
+ expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
+ return ts.inlineExpressions(expressions);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function shouldConvertIterationStatementBody(node) {
return (resolver.getNodeCheckFlags(node) & 65536 /* LoopWithCapturedBlockScopedBinding */) !== 0;
@@ -50672,7 +54781,7 @@ var ts;
}
}
}
- function convertIterationStatementBodyIfNecessary(node, convert) {
+ function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert) {
if (!shouldConvertIterationStatementBody(node)) {
var saveAllowedNonLabeledJumps = void 0;
if (convertedLoopState) {
@@ -50681,7 +54790,9 @@ var ts;
saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
convertedLoopState.allowedNonLabeledJumps = 2 /* Break */ | 4 /* Continue */;
}
- var result = convert ? convert(node, /*convertedLoopBodyStatements*/ undefined) : ts.visitEachChild(node, visitor, context);
+ var result = convert
+ ? convert(node, outermostLabeledStatement, /*convertedLoopBodyStatements*/ undefined)
+ : ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement, convertedLoopState && resetLabel);
if (convertedLoopState) {
convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;
}
@@ -50690,11 +54801,11 @@ var ts;
var functionName = ts.createUniqueName("_loop");
var loopInitializer;
switch (node.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
var initializer = node.initializer;
- if (initializer && initializer.kind === 224 /* VariableDeclarationList */) {
+ if (initializer && initializer.kind === 226 /* VariableDeclarationList */) {
loopInitializer = initializer;
}
break;
@@ -50730,19 +54841,26 @@ var ts;
convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables;
}
}
- var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement);
+ startLexicalEnvironment();
+ var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
+ var lexicalEnvironment = endLexicalEnvironment();
var currentState = convertedLoopState;
convertedLoopState = outerConvertedLoopState;
- if (loopOutParameters.length) {
+ if (loopOutParameters.length || lexicalEnvironment) {
var statements_4 = ts.isBlock(loopBody) ? loopBody.statements.slice() : [loopBody];
- copyOutParameters(loopOutParameters, 1 /* ToOutParameter */, statements_4);
- loopBody = ts.createBlock(statements_4, /*location*/ undefined, /*multiline*/ true);
+ if (loopOutParameters.length) {
+ copyOutParameters(loopOutParameters, 1 /* ToOutParameter */, statements_4);
+ }
+ ts.addRange(statements_4, lexicalEnvironment);
+ loopBody = ts.createBlock(statements_4, /*multiline*/ true);
}
- if (!ts.isBlock(loopBody)) {
- loopBody = ts.createBlock([loopBody], /*location*/ undefined, /*multiline*/ true);
+ if (ts.isBlock(loopBody)) {
+ loopBody.multiLine = true;
}
- var isAsyncBlockContainingAwait = enclosingNonArrowFunction
- && (ts.getEmitFlags(enclosingNonArrowFunction) & 131072 /* AsyncFunctionBody */) !== 0
+ else {
+ loopBody = ts.createBlock([loopBody], /*multiline*/ true);
+ }
+ var isAsyncBlockContainingAwait = hierarchyFacts & 4 /* AsyncFunctionBody */
&& (node.statement.transformFlags & 16777216 /* ContainsYield */) !== 0;
var loopBodyFlags = 0;
if (currentState.containsLexicalThis) {
@@ -50825,25 +54943,22 @@ var ts;
var convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, isAsyncBlockContainingAwait);
var loop;
if (convert) {
- loop = convert(node, convertedLoopBodyStatements);
+ loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- loop = ts.getMutableClone(node);
+ var clone_4 = ts.getMutableClone(node);
// clean statement part
- loop.statement = undefined;
+ clone_4.statement = undefined;
// visit childnodes to transform initializer/condition/incrementor parts
- loop = ts.visitEachChild(loop, visitor, context);
+ clone_4 = ts.visitEachChild(clone_4, visitor, context);
// set loop statement
- loop.statement = ts.createBlock(convertedLoopBodyStatements,
- /*location*/ undefined,
- /*multiline*/ true);
+ clone_4.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
// reset and re-aggregate the transform flags
- loop.transformFlags = 0;
- ts.aggregateTransformFlags(loop);
+ clone_4.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_4);
+ loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
}
- statements.push(currentParent.kind === 219 /* LabeledStatement */
- ? ts.createLabel(currentParent.label, loop)
- : loop);
+ statements.push(loop);
return statements;
}
function copyOutParameter(outParam, copyDirection) {
@@ -50867,7 +54982,9 @@ var ts;
!state.labeledNonLocalBreaks &&
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; }));
- var callResult = isAsyncBlockContainingAwait ? ts.createYield(ts.createToken(38 /* AsteriskToken */), call) : call;
+ var callResult = isAsyncBlockContainingAwait
+ ? ts.createYield(ts.createToken(38 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */))
+ : call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
copyOutParameters(state.loopOutParameters, 0 /* ToOriginal */, statements);
@@ -50906,26 +55023,25 @@ var ts;
if (!state.labeledNonLocalBreaks) {
state.labeledNonLocalBreaks = ts.createMap();
}
- state.labeledNonLocalBreaks[labelText] = labelMarker;
+ state.labeledNonLocalBreaks.set(labelText, labelMarker);
}
else {
if (!state.labeledNonLocalContinues) {
state.labeledNonLocalContinues = ts.createMap();
}
- state.labeledNonLocalContinues[labelText] = labelMarker;
+ state.labeledNonLocalContinues.set(labelText, labelMarker);
}
}
function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {
if (!table) {
return;
}
- for (var labelText in table) {
- var labelMarker = table[labelText];
+ table.forEach(function (labelMarker, labelText) {
var statements = [];
// if there are no outer converted loop or outer label in question is located inside outer converted loop
// then emit labeled break\continue
// otherwise propagate pair 'label -> marker' to outer converted loop and emit 'return labelMarker' so outer loop can later decide what to do
- if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) {
+ if (!outerLoop || (outerLoop.labels && outerLoop.labels.get(labelText))) {
var label = ts.createIdentifier(labelText);
statements.push(isBreak ? ts.createBreak(label) : ts.createContinue(label));
}
@@ -50934,7 +55050,7 @@ var ts;
statements.push(ts.createReturn(loopResultName));
}
caseClauses.push(ts.createCaseClause(ts.createLiteral(labelMarker), statements));
- }
+ });
}
function processLoopVariableDeclaration(decl, loopParameters, loopOutParameters) {
var name = decl.name;
@@ -50949,7 +55065,7 @@ var ts;
else {
loopParameters.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name));
if (resolver.getNodeCheckFlags(decl) & 2097152 /* NeedsLoopOutParameter */) {
- var outParamName = ts.createUniqueName("out_" + name.text);
+ var outParamName = ts.createUniqueName("out_" + ts.unescapeIdentifier(name.text));
loopOutParameters.push({ originalName: name, outParamName: outParamName });
}
}
@@ -50969,22 +55085,22 @@ var ts;
for (var i = start; i < numProperties; i++) {
var property = properties[i];
switch (property.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var accessors = ts.getAllAccessorDeclarations(node.properties, property);
if (property === accessors.firstAccessor) {
- expressions.push(transformAccessorsToExpression(receiver, accessors, node.multiLine));
+ expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine));
}
break;
- case 257 /* PropertyAssignment */:
+ case 150 /* MethodDeclaration */:
+ expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
+ break;
+ case 260 /* PropertyAssignment */:
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 149 /* MethodDeclaration */:
- expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node.multiLine));
- break;
default:
ts.Debug.failBadSyntaxKind(node);
break;
@@ -50999,8 +55115,8 @@ var ts;
* @param receiver The receiver for the assignment.
*/
function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression),
- /*location*/ property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
@@ -51014,8 +55130,8 @@ var ts;
* @param receiver The receiver for the assignment.
*/
function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name),
- /*location*/ property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
@@ -51028,22 +55144,34 @@ var ts;
* @param method The MethodDeclaration node.
* @param receiver The receiver for the assignment.
*/
- function transformObjectLiteralMethodDeclarationToExpression(method, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, /*location*/ method, /*name*/ undefined),
- /*location*/ method);
+ function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, /*location*/ method, /*name*/ undefined, container));
+ ts.setTextRange(expression, method);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return expression;
}
function visitCatchClause(node) {
- ts.Debug.assert(ts.isBindingPattern(node.variableDeclaration.name));
- var temp = ts.createTempVariable(undefined);
- var newVariableDeclaration = ts.createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration);
- var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0 /* All */, temp);
- var list = ts.createVariableDeclarationList(vars, /*location*/ node.variableDeclaration, /*flags*/ node.variableDeclaration.flags);
- var destructure = ts.createVariableStatement(undefined, list);
- return ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ var ancestorFacts = enterSubtree(4032 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);
+ var updated;
+ if (ts.isBindingPattern(node.variableDeclaration.name)) {
+ var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var newVariableDeclaration = ts.createVariableDeclaration(temp);
+ ts.setTextRange(newVariableDeclaration, node.variableDeclaration);
+ var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0 /* All */, temp);
+ var list = ts.createVariableDeclarationList(vars);
+ ts.setTextRange(list, node.variableDeclaration);
+ var destructure = ts.createVariableStatement(/*modifiers*/ undefined, list);
+ updated = ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
function addStatementToStartOfBlock(block, statement) {
var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
@@ -51060,20 +55188,41 @@ var ts;
// Methods on classes are handled in visitClassDeclaration/visitClassExpression.
// Methods with computed property names are handled in visitObjectLiteralExpression.
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
- var functionExpression = transformFunctionLikeToExpression(node, /*location*/ ts.moveRangePos(node, -1), /*name*/ undefined);
+ var functionExpression = transformFunctionLikeToExpression(node, /*location*/ ts.moveRangePos(node, -1), /*name*/ undefined, /*container*/ undefined);
ts.setEmitFlags(functionExpression, 512 /* NoLeadingComments */ | ts.getEmitFlags(functionExpression));
- return ts.createPropertyAssignment(node.name, functionExpression,
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, functionExpression),
/*location*/ node);
}
/**
+ * Visits an AccessorDeclaration of an ObjectLiteralExpression.
+ *
+ * @param node An AccessorDeclaration node.
+ */
+ function visitAccessorDeclaration(node) {
+ ts.Debug.assert(!ts.isComputedPropertyName(node.name));
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return updated;
+ }
+ /**
* Visits a ShorthandPropertyAssignment and transforms it into a PropertyAssignment.
*
* @param node A ShorthandPropertyAssignment node.
*/
function visitShorthandPropertyAssignment(node) {
- return ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name),
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name)),
/*location*/ node);
}
+ function visitComputedPropertyName(node) {
+ var ancestorFacts = enterSubtree(0 /* ComputedPropertyNameExcludes */, 8192 /* ComputedPropertyNameIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 32768 /* NewTargetInComputedPropertyName */ : 0 /* None */);
+ return updated;
+ }
/**
* Visits a YieldExpression node.
*
@@ -51089,8 +55238,11 @@ var ts;
* @param node An ArrayLiteralExpression node.
*/
function visitArrayLiteralExpression(node) {
- // We are here because we contain a SpreadElementExpression.
- return transformAndSpreadElements(node.elements, /*needsUniqueCopy*/ true, node.multiLine, /*hasTrailingComma*/ node.elements.hasTrailingComma);
+ if (node.transformFlags & 64 /* ES2015 */) {
+ // We are here because we contain a SpreadElementExpression.
+ return transformAndSpreadElements(node.elements, /*needsUniqueCopy*/ true, node.multiLine, /*hasTrailingComma*/ node.elements.hasTrailingComma);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Visits a CallExpression that contains either a spread element or `super`.
@@ -51098,7 +55250,11 @@ var ts;
* @param node a CallExpression.
*/
function visitCallExpression(node) {
- return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true);
+ if (node.transformFlags & 64 /* ES2015 */) {
+ return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true);
+ }
+ return ts.updateCall(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression),
+ /*typeArguments*/ undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
}
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ false);
@@ -51125,7 +55281,7 @@ var ts;
// _super.apply(this, a.concat([b]))
// _super.m.apply(this, a.concat([b]))
// _super.prototype.m.apply(this, a.concat([b]))
- resultingCall = ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false));
+ resultingCall = ts.createFunctionApply(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false));
}
else {
// [source]
@@ -51137,18 +55293,18 @@ var ts;
// _super.call(this, a)
// _super.m.call(this, a)
// _super.prototype.m.call(this, a)
- resultingCall = ts.createFunctionCall(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression),
+ resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression),
/*location*/ node);
}
if (node.expression.kind === 96 /* SuperKeyword */) {
var actualThis = ts.createThis();
ts.setEmitFlags(actualThis, 4 /* NoSubstitution */);
var initializer = ts.createLogicalOr(resultingCall, actualThis);
- return assignToCapturedThis
+ resultingCall = assignToCapturedThis
? ts.createAssignment(ts.createIdentifier("_this"), initializer)
: initializer;
}
- return resultingCall;
+ return ts.setOriginalNode(resultingCall, node);
}
/**
* Visits a NewExpression that contains a spread element.
@@ -51156,16 +55312,18 @@ var ts;
* @param node A NewExpression node.
*/
function visitNewExpression(node) {
- // We are here because we contain a SpreadElementExpression.
- ts.Debug.assert((node.transformFlags & 524288 /* ContainsSpread */) !== 0);
- // [source]
- // new C(...a)
- //
- // [output]
- // new ((_a = C).bind.apply(_a, [void 0].concat(a)))()
- var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)),
- /*typeArguments*/ undefined, []);
+ if (node.transformFlags & 524288 /* ContainsSpread */) {
+ // We are here because we contain a SpreadElementExpression.
+ // [source]
+ // new C(...a)
+ //
+ // [output]
+ // new ((_a = C).bind.apply(_a, [void 0].concat(a)))()
+ var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
+ return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)),
+ /*typeArguments*/ undefined, []);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Transforms an array of Expression nodes that contains a SpreadExpression.
@@ -51186,14 +55344,28 @@ var ts;
var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
}));
- if (segments.length === 1) {
- var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 175 /* ArrayLiteralExpression */
- ? ts.createArraySlice(segments[0])
- : segments[0];
+ if (compilerOptions.downlevelIteration) {
+ if (segments.length === 1) {
+ var firstSegment = segments[0];
+ if (ts.isCallExpression(firstSegment)
+ && ts.isIdentifier(firstSegment.expression)
+ && (ts.getEmitFlags(firstSegment.expression) & 4096 /* HelperName */)
+ && firstSegment.expression.text === "___spread") {
+ return segments[0];
+ }
+ }
+ return ts.createSpreadHelper(context, segments);
+ }
+ else {
+ if (segments.length === 1) {
+ var firstElement = elements[0];
+ return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 /* ArrayLiteralExpression */
+ ? ts.createArraySlice(segments[0])
+ : segments[0];
+ }
+ // Rewrite using the pattern <segment0>.concat(<segment1>, <segment2>, ...)
+ return ts.createArrayConcat(segments.shift(), segments);
}
- // Rewrite using the pattern <segment0>.concat(<segment1>, <segment2>, ...)
- return ts.createArrayConcat(segments.shift(), segments);
}
function partitionSpread(node) {
return ts.isSpreadExpression(node)
@@ -51204,8 +55376,7 @@ var ts;
return ts.map(chunk, visitExpressionOfSpread);
}
function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
- return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, /*location*/ undefined, hasTrailingComma), visitor, ts.isExpression),
- /*location*/ undefined, multiLine);
+ return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
}
function visitSpreadElement(node) {
return ts.visitNode(node.expression, visitor, ts.isExpression);
@@ -51224,7 +55395,29 @@ var ts;
* @param node A template literal.
*/
function visitTemplateLiteral(node) {
- return ts.createLiteral(node.text, /*location*/ node);
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ /**
+ * Visits a string literal with an extended unicode escape.
+ *
+ * @param node A string literal.
+ */
+ function visitStringLiteral(node) {
+ if (node.hasExtendedUnicodeEscape) {
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ return node;
+ }
+ /**
+ * Visits a binary or octal (ES6) numeric literal.
+ *
+ * @param node A string literal.
+ */
+ function visitNumericLiteral(node) {
+ if (node.numericLiteralFlags & 48 /* BinaryOrOctalSpecifier */) {
+ return ts.setTextRange(ts.createNumericLiteral(node.text), node);
+ }
+ return node;
}
/**
* Visits a TaggedTemplateExpression node.
@@ -51284,7 +55477,7 @@ var ts;
// ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's
// <CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for both TV and TRV.
text = text.replace(/\r\n?/g, "\n");
- return ts.createLiteral(text, /*location*/ node);
+ return ts.setTextRange(ts.createLiteral(text), node);
}
/**
* Visits a TemplateExpression node.
@@ -51306,7 +55499,8 @@ var ts;
// "abc" + (1 << 2) + ""
var expression = ts.reduceLeft(expressions, ts.createAdd);
if (ts.nodeIsSynthesized(expression)) {
- ts.setTextRange(expression, node);
+ expression.pos = node.pos;
+ expression.end = node.end;
}
return expression;
}
@@ -51368,27 +55562,42 @@ var ts;
/**
* Visits the `super` keyword
*/
- function visitSuperKeyword() {
- return enclosingNonAsyncFunctionBody
- && ts.isClassElement(enclosingNonAsyncFunctionBody)
- && !ts.hasModifier(enclosingNonAsyncFunctionBody, 32 /* Static */)
- && currentParent.kind !== 179 /* CallExpression */
+ function visitSuperKeyword(isExpressionOfCall) {
+ return hierarchyFacts & 8 /* NonStaticClassElement */
+ && !isExpressionOfCall
? ts.createPropertyAccess(ts.createIdentifier("_super"), "prototype")
: ts.createIdentifier("_super");
}
+ function visitMetaProperty(node) {
+ if (node.keywordToken === 93 /* NewKeyword */ && node.name.text === "target") {
+ if (hierarchyFacts & 8192 /* ComputedPropertyName */) {
+ hierarchyFacts |= 32768 /* NewTargetInComputedPropertyName */;
+ }
+ else {
+ hierarchyFacts |= 16384 /* NewTarget */;
+ }
+ return ts.createIdentifier("_newTarget");
+ }
+ return node;
+ }
/**
* Called by the printer just before a node is printed.
*
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to be printed.
+ * @param emitCallback The callback used to emit the node.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- var savedEnclosingFunction = enclosingFunction;
+ function onEmitNode(hint, node, emitCallback) {
if (enabledSubstitutions & 1 /* CapturedThis */ && ts.isFunctionLike(node)) {
// If we are tracking a captured `this`, keep track of the enclosing function.
- enclosingFunction = node;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, ts.getEmitFlags(node) & 8 /* CapturesThis */
+ ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */
+ : 65 /* FunctionIncludes */);
+ previousOnEmitNode(hint, node, emitCallback);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return;
}
- previousOnEmitNode(emitContext, node, emitCallback);
- enclosingFunction = savedEnclosingFunction;
+ previousOnEmitNode(hint, node, emitCallback);
}
/**
* Enables a more costly code path for substitutions when we determine a source file
@@ -51408,24 +55617,24 @@ var ts;
if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) {
enabledSubstitutions |= 1 /* CapturedThis */;
context.enableSubstitution(98 /* ThisKeyword */);
- context.enableEmitNotification(150 /* Constructor */);
- context.enableEmitNotification(149 /* MethodDeclaration */);
- context.enableEmitNotification(151 /* GetAccessor */);
- context.enableEmitNotification(152 /* SetAccessor */);
- context.enableEmitNotification(185 /* ArrowFunction */);
- context.enableEmitNotification(184 /* FunctionExpression */);
- context.enableEmitNotification(225 /* FunctionDeclaration */);
+ context.enableEmitNotification(151 /* Constructor */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(186 /* ArrowFunction */);
+ context.enableEmitNotification(185 /* FunctionExpression */);
+ context.enableEmitNotification(227 /* FunctionDeclaration */);
}
}
/**
* Hooks node substitutions.
*
- * @param emitContext The context for the emitter.
+ * @param hint The context for the emitter.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
if (ts.isIdentifier(node)) {
@@ -51442,7 +55651,7 @@ var ts;
if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
- return ts.getGeneratedNameForNode(original);
+ return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
}
}
return node;
@@ -51456,10 +55665,10 @@ var ts;
function isNameOfDeclarationWithCollidingName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 174 /* BindingElement */:
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 225 /* VariableDeclaration */:
return parent.name === node
&& resolver.isDeclarationWithCollidingName(parent);
}
@@ -51488,7 +55697,7 @@ var ts;
if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
if (declaration) {
- return ts.getGeneratedNameForNode(declaration.name);
+ return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
}
}
return node;
@@ -51500,9 +55709,8 @@ var ts;
*/
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1 /* CapturedThis */
- && enclosingFunction
- && ts.getEmitFlags(enclosingFunction) & 8 /* CapturesThis */) {
- return ts.createIdentifier("_this", /*location*/ node);
+ && hierarchyFacts & 16 /* CapturesThis */) {
+ return ts.setTextRange(ts.createIdentifier("_this"), node);
}
return node;
}
@@ -51518,11 +55726,11 @@ var ts;
return false;
}
var statement = ts.firstOrUndefined(constructor.body.statements);
- if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 207 /* ExpressionStatement */) {
+ if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209 /* ExpressionStatement */) {
return false;
}
var statementExpression = statement.expression;
- if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 179 /* CallExpression */) {
+ if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180 /* CallExpression */) {
return false;
}
var callTarget = statementExpression.expression;
@@ -51530,7 +55738,7 @@ var ts;
return false;
}
var callArgument = ts.singleOrUndefined(statementExpression.arguments);
- if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 196 /* SpreadElement */) {
+ if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197 /* SpreadElement */) {
return false;
}
var expression = callArgument.expression;
@@ -51550,11 +55758,123 @@ var ts;
name: "typescript:extends",
scoped: false,
priority: 0,
- text: "\n var __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };"
+ text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
};
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/*@internal*/
+var ts;
+(function (ts) {
+ /**
+ * Transforms ES5 syntax into ES3 syntax.
+ *
+ * @param context Context and state information for the transformation.
+ */
+ function transformES5(context) {
+ var compilerOptions = context.getCompilerOptions();
+ // enable emit notification only if using --jsx preserve or react-native
+ var previousOnEmitNode;
+ var noSubstitution;
+ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) {
+ previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ context.enableEmitNotification(250 /* JsxOpeningElement */);
+ context.enableEmitNotification(251 /* JsxClosingElement */);
+ context.enableEmitNotification(249 /* JsxSelfClosingElement */);
+ noSubstitution = [];
+ }
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(260 /* PropertyAssignment */);
+ return transformSourceFile;
+ /**
+ * Transforms an ES5 source file to ES3.
+ *
+ * @param node A SourceFile
+ */
+ function transformSourceFile(node) {
+ return node;
+ }
+ /**
+ * Called by the printer just before a node is printed.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ switch (node.kind) {
+ case 250 /* JsxOpeningElement */:
+ case 251 /* JsxClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
+ var tagName = node.tagName;
+ noSubstitution[ts.getOriginalNodeId(tagName)] = true;
+ break;
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ if (node.id && noSubstitution && noSubstitution[node.id]) {
+ return previousOnSubstituteNode(hint, node);
+ }
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isPropertyAccessExpression(node)) {
+ return substitutePropertyAccessExpression(node);
+ }
+ else if (ts.isPropertyAssignment(node)) {
+ return substitutePropertyAssignment(node);
+ }
+ return node;
+ }
+ /**
+ * Substitutes a PropertyAccessExpression whose name is a reserved word.
+ *
+ * @param node A PropertyAccessExpression
+ */
+ function substitutePropertyAccessExpression(node) {
+ var literalName = trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.setTextRange(ts.createElementAccess(node.expression, literalName), node);
+ }
+ return node;
+ }
+ /**
+ * Substitutes a PropertyAssignment whose name is a reserved word.
+ *
+ * @param node A PropertyAssignment
+ */
+ function substitutePropertyAssignment(node) {
+ var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ }
+ return node;
+ }
+ /**
+ * If an identifier name is a reserved word, returns a string literal for the name.
+ *
+ * @param name An Identifier
+ */
+ function trySubstituteReservedName(name) {
+ var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
+ if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) {
+ return ts.setTextRange(ts.createLiteral(name), name);
+ }
+ return undefined;
+ }
+ }
+ ts.transformES5 = transformES5;
+})(ts || (ts = {}));
+/// <reference path="../factory.ts" />
+/// <reference path="../visitor.ts" />
// Transforms generator functions into a compatible ES5 representation with similar runtime
// semantics. This is accomplished by first transforming the body of each generator
// function into an intermediate representation that is the compiled into a JavaScript
@@ -51725,13 +56045,15 @@ var ts;
Instruction[Instruction["Catch"] = 6] = "Catch";
Instruction[Instruction["Endfinally"] = 7] = "Endfinally";
})(Instruction || (Instruction = {}));
- var instructionNames = ts.createMap((_a = {},
- _a[2 /* Return */] = "return",
- _a[3 /* Break */] = "break",
- _a[4 /* Yield */] = "yield",
- _a[5 /* YieldStar */] = "yield*",
- _a[7 /* Endfinally */] = "endfinally",
- _a));
+ function getInstructionName(instruction) {
+ switch (instruction) {
+ case 2 /* Return */: return "return";
+ case 3 /* Break */: return "break";
+ case 4 /* Yield */: return "yield";
+ case 5 /* YieldStar */: return "yield*";
+ case 7 /* Endfinally */: return "endfinally";
+ }
+ }
function transformGenerators(context) {
var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistFunctionDeclaration = context.hoistFunctionDeclaration, hoistVariableDeclaration = context.hoistVariableDeclaration;
var compilerOptions = context.getCompilerOptions();
@@ -51823,13 +56145,13 @@ var ts;
*/
function visitJavaScriptInStatementContainingYield(node) {
switch (node.kind) {
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitWhileStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
default:
return visitJavaScriptInGeneratorFunctionBody(node);
@@ -51842,24 +56164,24 @@ var ts;
*/
function visitJavaScriptInGeneratorFunctionBody(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return visitAccessorDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitForInStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return visitBreakStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return visitContinueStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitReturnStatement(node);
default:
if (node.transformFlags & 16777216 /* ContainsYield */) {
@@ -51880,21 +56202,21 @@ var ts;
*/
function visitJavaScriptContainingYield(node) {
switch (node.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return visitConditionalExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitYieldExpression(node);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return visitArrayLiteralExpression(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return visitElementAccessExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -51907,9 +56229,9 @@ var ts;
*/
function visitGenerator(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -51927,12 +56249,12 @@ var ts;
*/
function visitFunctionDeclaration(node) {
// Currently, we only support generators that were originally async functions.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
- node = ts.setOriginalNode(ts.createFunctionDeclaration(
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(
/*decorators*/ undefined, node.modifiers,
/*asteriskToken*/ undefined, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformGeneratorFunctionBody(node.body),
+ /*type*/ undefined, transformGeneratorFunctionBody(node.body)),
/*location*/ node), node);
}
else {
@@ -51965,12 +56287,12 @@ var ts;
*/
function visitFunctionExpression(node) {
// Currently, we only support generators that were originally async functions.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
- node = ts.setOriginalNode(ts.createFunctionExpression(
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(
/*modifiers*/ undefined,
/*asteriskToken*/ undefined, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformGeneratorFunctionBody(node.body),
+ /*type*/ undefined, transformGeneratorFunctionBody(node.body)),
/*location*/ node), node);
}
else {
@@ -52039,7 +56361,7 @@ var ts;
state = ts.createTempVariable(/*recordTempVariable*/ undefined);
// Build the generator
resumeLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ var statementOffset = ts.addPrologue(statements, body.statements, /*ensureUseStrict*/ false, visitor);
transformAndEmitStatements(body.statements, statementOffset);
var buildResult = build();
ts.addRange(statements, endLexicalEnvironment());
@@ -52058,7 +56380,7 @@ var ts;
operationArguments = savedOperationArguments;
operationLocations = savedOperationLocations;
state = savedState;
- return ts.createBlock(statements, /*location*/ body, body.multiLine);
+ return ts.setTextRange(ts.createBlock(statements, body.multiLine), body);
}
/**
* Visits a variable statement.
@@ -52137,7 +56459,7 @@ var ts;
if (containsYield(right)) {
var target = void 0;
switch (left.kind) {
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
// [source]
// a.b = yield;
//
@@ -52149,7 +56471,7 @@ var ts;
// _a.b = %sent%;
target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
break;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
// [source]
// a[b] = yield;
//
@@ -52168,7 +56490,7 @@ var ts;
}
var operator = node.operatorToken.kind;
if (isCompoundAssignment(operator)) {
- return ts.createBinary(target, 57 /* EqualsToken */, ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression), node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.setTextRange(ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression)), node)), node);
}
else {
return ts.updateBinary(node, target, ts.visitNode(right, visitor, ts.isExpression));
@@ -52192,10 +56514,10 @@ var ts;
// _a = a();
// .yield resumeLabel
// _a + %sent% + c()
- var clone_4 = ts.getMutableClone(node);
- clone_4.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
- clone_4.right = ts.visitNode(node.right, visitor, ts.isExpression);
- return clone_4;
+ var clone_5 = ts.getMutableClone(node);
+ clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
+ clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression);
+ return clone_5;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52330,17 +56652,19 @@ var ts;
// .yield resumeLabel, (a())
// .mark resumeLabel
// x = %sent%;
- // NOTE: we are explicitly not handling YieldStar at this time.
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- emitYieldStar(expression, /*location*/ node);
+ var iterator = (ts.getEmitFlags(node.expression) & 4194304 /* Iterator */) === 0
+ ? ts.createValuesHelper(context, expression, /*location*/ node)
+ : expression;
+ emitYieldStar(iterator, /*location*/ node);
}
else {
emitYield(expression, /*location*/ node);
}
markLabel(resumeLabel);
- return createGeneratorResume();
+ return createGeneratorResume(/*location*/ node);
}
/**
* Visits an ArrayLiteralExpression that contains a YieldExpression.
@@ -52368,26 +56692,27 @@ var ts;
// .mark resumeLabel
// ar = _a.concat([%sent%, 2]);
var numInitialElements = countInitialNodesWithoutYield(elements);
- var temp = declareLocal();
- var hasAssignedTemp = false;
+ var temp;
if (numInitialElements > 0) {
+ temp = declareLocal();
var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
emitAssignment(temp, ts.createArrayLiteral(leadingElement
? [leadingElement].concat(initialElements) : initialElements));
leadingElement = undefined;
- hasAssignedTemp = true;
}
var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
- return hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, /*location*/ undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, location, multiLine);
+ return temp
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location);
function reduceElement(expressions, element) {
if (containsYield(element) && expressions.length > 0) {
+ var hasAssignedTemp = temp !== undefined;
+ if (!temp) {
+ temp = declareLocal();
+ }
emitAssignment(temp, hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, /*location*/ undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions,
- /*location*/ undefined, multiLine));
- hasAssignedTemp = true;
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine));
leadingElement = undefined;
expressions = [];
}
@@ -52417,8 +56742,7 @@ var ts;
var multiLine = node.multiLine;
var numInitialProperties = countInitialNodesWithoutYield(properties);
var temp = declareLocal();
- emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties),
- /*location*/ undefined, multiLine));
+ emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), multiLine));
var expressions = ts.reduceLeft(properties, reduceProperty, [], numInitialProperties);
expressions.push(multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
return ts.inlineExpressions(expressions);
@@ -52454,10 +56778,10 @@ var ts;
// .yield resumeLabel
// .mark resumeLabel
// a = _a[%sent%]
- var clone_5 = ts.getMutableClone(node);
- clone_5.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
- clone_5.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
- return clone_5;
+ var clone_6 = ts.getMutableClone(node);
+ clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
+ clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
+ return clone_6;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52492,10 +56816,9 @@ var ts;
// .mark resumeLabel
// new (_b.apply(_a, _c.concat([%sent%, 2])));
var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.setOriginalNode(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
+ return ts.setOriginalNode(ts.setTextRange(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
/*leadingElement*/ ts.createVoidZero())),
- /*typeArguments*/ undefined, [],
- /*location*/ node), node);
+ /*typeArguments*/ undefined, []), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52524,38 +56847,38 @@ var ts;
}
function transformAndEmitStatementWorker(node) {
switch (node.kind) {
- case 204 /* Block */:
+ case 206 /* Block */:
return transformAndEmitBlock(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return transformAndEmitExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return transformAndEmitIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return transformAndEmitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return transformAndEmitWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return transformAndEmitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return transformAndEmitForInStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return transformAndEmitContinueStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return transformAndEmitBreakStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return transformAndEmitReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return transformAndEmitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return transformAndEmitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return transformAndEmitLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return transformAndEmitThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return transformAndEmitTryStatement(node);
default:
- return emitStatement(ts.visitNode(node, visitor, ts.isStatement, /*optional*/ true));
+ return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
}
}
function transformAndEmitBlock(node) {
@@ -52572,7 +56895,9 @@ var ts;
function transformAndEmitVariableDeclarationList(node) {
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
- hoistVariableDeclaration(variable.name);
+ var name = ts.getSynthesizedClone(variable.name);
+ ts.setCommentRange(name, variable.name);
+ hoistVariableDeclaration(name);
}
var variables = ts.getInitializedVariables(node);
var numVariables = variables.length;
@@ -52615,7 +56940,7 @@ var ts;
if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {
var endLabel = defineLabel();
var elseLabel = node.elseStatement ? defineLabel() : undefined;
- emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression));
+ emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression), /*location*/ node.expression);
transformAndEmitEmbeddedStatement(node.thenStatement);
if (node.elseStatement) {
emitBreak(endLabel);
@@ -52738,8 +57063,7 @@ var ts;
transformAndEmitVariableDeclarationList(initializer);
}
else {
- emitStatement(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression),
- /*location*/ initializer));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression)), initializer));
}
}
markLabel(conditionLabel);
@@ -52749,8 +57073,7 @@ var ts;
transformAndEmitEmbeddedStatement(node.statement);
markLabel(incrementLabel);
if (node.incrementor) {
- emitStatement(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression),
- /*location*/ node.incrementor));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression)), node.incrementor));
}
emitBreak(conditionLabel);
endLoopBlock();
@@ -52764,7 +57087,7 @@ var ts;
beginScriptLoopBlock();
}
var initializer = node.initializer;
- if (ts.isVariableDeclarationList(initializer)) {
+ if (initializer && ts.isVariableDeclarationList(initializer)) {
for (var _i = 0, _a = initializer.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
@@ -52772,7 +57095,7 @@ var ts;
var variables = ts.getInitializedVariables(initializer);
node = ts.updateFor(node, variables.length > 0
? ts.inlineExpressions(ts.map(variables, transformInitializedVariable))
- : undefined, ts.visitNode(node.condition, visitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.incrementor, visitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -52864,7 +57187,7 @@ var ts;
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
}
- node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -52903,11 +57226,11 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function transformAndEmitReturnStatement(node) {
- emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true),
+ emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
/*location*/ node);
}
function visitReturnStatement(node) {
- return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true),
+ return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
/*location*/ node);
}
function transformAndEmitWithStatement(node) {
@@ -52972,7 +57295,7 @@ var ts;
for (var i = 0; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
clauseLabels.push(defineLabel());
- if (clause.kind === 254 /* DefaultClause */ && defaultClauseIndex === -1) {
+ if (clause.kind === 257 /* DefaultClause */ && defaultClauseIndex === -1) {
defaultClauseIndex = i;
}
}
@@ -52985,7 +57308,7 @@ var ts;
var defaultClausesSkipped = 0;
for (var i = clausesWritten; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
- if (clause.kind === 253 /* CaseClause */) {
+ if (clause.kind === 256 /* CaseClause */) {
var caseClause = clause;
if (containsYield(caseClause.expression) && pendingClauses.length > 0) {
break;
@@ -53127,9 +57450,9 @@ var ts;
}
return -1;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
return node;
@@ -53141,17 +57464,17 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (renamedCatchVariables && ts.hasProperty(renamedCatchVariables, node.text)) {
+ if (!ts.isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
var original = ts.getOriginalNode(node);
if (ts.isIdentifier(original) && original.parent) {
var declaration = resolver.getReferencedValueDeclaration(original);
if (declaration) {
- var name_36 = ts.getProperty(renamedCatchVariableDeclarations, String(ts.getOriginalNodeId(declaration)));
- if (name_36) {
- var clone_6 = ts.getMutableClone(name_36);
- ts.setSourceMapRange(clone_6, node);
- ts.setCommentRange(clone_6, node);
- return clone_6;
+ var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
+ if (name) {
+ var clone_7 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_7, node);
+ ts.setCommentRange(clone_7, node);
+ return clone_7;
}
}
}
@@ -53160,7 +57483,7 @@ var ts;
}
function cacheExpression(node) {
var temp;
- if (ts.isGeneratedIdentifier(node)) {
+ if (ts.isGeneratedIdentifier(node) || ts.getEmitFlags(node) & 4096 /* HelperName */) {
return node;
}
temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -53288,15 +57611,23 @@ var ts;
*/
function beginCatchBlock(variable) {
ts.Debug.assert(peekBlockKind() === 0 /* Exception */);
- var text = variable.name.text;
- var name = declareLocal(text);
- if (!renamedCatchVariables) {
- renamedCatchVariables = ts.createMap();
- renamedCatchVariableDeclarations = ts.createMap();
- context.enableSubstitution(70 /* Identifier */);
+ // generated identifiers should already be unique within a file
+ var name;
+ if (ts.isGeneratedIdentifier(variable.name)) {
+ name = variable.name;
+ hoistVariableDeclaration(variable.name);
+ }
+ else {
+ var text = variable.name.text;
+ name = declareLocal(text);
+ if (!renamedCatchVariables) {
+ renamedCatchVariables = ts.createMap();
+ renamedCatchVariableDeclarations = [];
+ context.enableSubstitution(70 /* Identifier */);
+ }
+ renamedCatchVariables.set(text, true);
+ renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
}
- renamedCatchVariables[text] = true;
- renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
var exception = peekBlock();
ts.Debug.assert(exception.state < 1 /* Catch */);
var endLabel = exception.endLabel;
@@ -53566,7 +57897,7 @@ var ts;
*/
function createInstruction(instruction) {
var literal = ts.createLiteral(instruction);
- literal.trailingComment = instructionNames[instruction];
+ ts.addSyntheticTrailingComment(literal, 3 /* MultiLineCommentTrivia */, getInstructionName(instruction));
return literal;
}
/**
@@ -53577,10 +57908,10 @@ var ts;
*/
function createInlineBreak(label, location) {
ts.Debug.assert(label > 0, "Invalid label: " + label);
- return ts.createReturn(ts.createArrayLiteral([
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), location);
+ ])), location);
}
/**
* Creates a statement that can be used indicate a Return operation.
@@ -53589,15 +57920,16 @@ var ts;
* @param location An optional source map location for the statement.
*/
function createInlineReturn(expression, location) {
- return ts.createReturn(ts.createArrayLiteral(expression
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2 /* Return */), expression]
- : [createInstruction(2 /* Return */)]), location);
+ : [createInstruction(2 /* Return */)])), location);
}
/**
* Creates an expression that can be used to resume from a Yield operation.
*/
function createGeneratorResume(location) {
- return ts.createCall(ts.createPropertyAccess(state, "sent"), /*typeArguments*/ undefined, [], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(state, "sent"),
+ /*typeArguments*/ undefined, []), location);
}
/**
* Emits an empty instruction.
@@ -53743,7 +58075,6 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
/*type*/ undefined, ts.createBlock(buildResult,
- /*location*/ undefined,
/*multiLine*/ buildResult.length > 0)), 262144 /* ReuseTempVariableScope */));
}
/**
@@ -54014,7 +58345,7 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeAssign(left, right, operationLocation) {
- writeStatement(ts.createStatement(ts.createAssignment(left, right), operationLocation));
+ writeStatement(ts.setTextRange(ts.createStatement(ts.createAssignment(left, right)), operationLocation));
}
/**
* Writes a Throw operation to the current label's statement list.
@@ -54025,7 +58356,7 @@ var ts;
function writeThrow(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createThrow(expression, operationLocation));
+ writeStatement(ts.setTextRange(ts.createThrow(expression), operationLocation));
}
/**
* Writes a Return operation to the current label's statement list.
@@ -54036,9 +58367,9 @@ var ts;
function writeReturn(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2 /* Return */), expression]
- : [createInstruction(2 /* Return */)]), operationLocation));
+ : [createInstruction(2 /* Return */)])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a Break operation to the current label's statement list.
@@ -54048,10 +58379,10 @@ var ts;
*/
function writeBreak(label, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a BreakWhenTrue operation to the current label's statement list.
@@ -54061,10 +58392,10 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeBreakWhenTrue(label, condition, operationLocation) {
- writeStatement(ts.createIf(condition, ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(condition, ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */)), 1 /* SingleLine */));
}
/**
* Writes a BreakWhenFalse operation to the current label's statement list.
@@ -54074,10 +58405,10 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeBreakWhenFalse(label, condition, operationLocation) {
- writeStatement(ts.createIf(ts.createLogicalNot(condition), ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(ts.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */)), 1 /* SingleLine */));
}
/**
* Writes a Yield operation to the current label's statement list.
@@ -54087,9 +58418,9 @@ var ts;
*/
function writeYield(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(4 /* Yield */), expression]
- : [createInstruction(4 /* Yield */)]), operationLocation));
+ : [createInstruction(4 /* Yield */)])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a YieldStar instruction to the current label's statement list.
@@ -54099,10 +58430,10 @@ var ts;
*/
function writeYieldStar(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(5 /* YieldStar */),
expression
- ]), operationLocation));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes an Endfinally instruction to the current label's statement list.
@@ -54183,157 +58514,918 @@ var ts;
name: "typescript:generator",
scoped: false,
priority: 6,
- text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;\n return { next: verb(0), \"throw\": verb(1), \"return\": verb(2) };\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
+ text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
};
- var _a;
})(ts || (ts = {}));
-/// <reference path="../factory.ts" />
-/// <reference path="../visitor.ts" />
+/// <reference path="../../factory.ts" />
+/// <reference path="../../visitor.ts" />
+/// <reference path="../destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
- /**
- * Transforms ES5 syntax into ES3 syntax.
- *
- * @param context Context and state information for the transformation.
- */
- function transformES5(context) {
+ function transformModule(context) {
+ function getTransformModuleDelegate(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.AMD: return transformAMDModule;
+ case ts.ModuleKind.UMD: return transformUMDModule;
+ default: return transformCommonJSModule;
+ }
+ }
+ var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var compilerOptions = context.getCompilerOptions();
+ var resolver = context.getEmitResolver();
+ var host = context.getEmitHost();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
var previousOnSubstituteNode = context.onSubstituteNode;
+ var previousOnEmitNode = context.onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(257 /* PropertyAssignment */);
+ context.onEmitNode = onEmitNode;
+ context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols.
+ context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols.
+ context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(261 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
+ context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file.
+ var moduleInfoMap = []; // The ExternalModuleInfo for each file.
+ var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
+ var currentSourceFile; // The current file.
+ var currentModuleInfo; // The ExternalModuleInfo for the current file.
+ var noSubstitution; // Set of nodes for which substitution rules should be ignored.
return transformSourceFile;
/**
- * Transforms an ES5 source file to ES3.
+ * Transforms the module aspects of a SourceFile.
*
- * @param node A SourceFile
+ * @param node The SourceFile node.
*/
function transformSourceFile(node) {
- return node;
+ if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ return node;
+ }
+ currentSourceFile = node;
+ currentModuleInfo = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
+ moduleInfoMap[ts.getOriginalNodeId(node)] = currentModuleInfo;
+ // Perform the transformation.
+ var transformModule = getTransformModuleDelegate(moduleKind);
+ var updated = transformModule(node);
+ currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ return ts.aggregateTransformFlags(updated);
+ }
+ function shouldEmitUnderscoreUnderscoreESModule() {
+ if (!currentModuleInfo.exportEquals && ts.isExternalModule(currentSourceFile)) {
+ return true;
+ }
+ return false;
}
/**
- * Hooks node substitutions.
+ * Transforms a SourceFile into a CommonJS module.
*
- * @param emitContext The context for the emitter.
- * @param node The node to substitute.
+ * @param node The SourceFile node.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isPropertyAccessExpression(node)) {
- return substitutePropertyAccessExpression(node);
+ function transformCommonJSModule(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- else if (ts.isPropertyAssignment(node)) {
- return substitutePropertyAssignment(node);
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
+ ts.addRange(statements, endLexicalEnvironment());
+ var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ // If we have any `export * from ...` declarations
+ // we need to inform the emitter to add the __export helper.
+ ts.addEmitHelper(updated, exportStarHelper);
}
- return node;
+ return updated;
}
/**
- * Substitutes a PropertyAccessExpression whose name is a reserved word.
+ * Transforms a SourceFile into an AMD module.
*
- * @param node A PropertyAccessExpression
+ * @param node The SourceFile node.
*/
- function substitutePropertyAccessExpression(node) {
- var literalName = trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.createElementAccess(node.expression, literalName, /*location*/ node);
+ function transformAMDModule(node) {
+ var define = ts.createIdentifier("define");
+ var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
+ // An AMD define function has the following shape:
+ //
+ // define(id?, dependencies?, factory);
+ //
+ // This has the shape of the following:
+ //
+ // define(name, ["module1", "module2"], function (module1Alias) { ... }
+ //
+ // The location of the alias in the parameter list in the factory function needs to
+ // match the position of the module name in the dependency list.
+ //
+ // To ensure this is true in cases of modules with no aliases, e.g.:
+ //
+ // import "module"
+ //
+ // or
+ //
+ // /// <amd-dependency path= "a.css" />
+ //
+ // we need to add modules without alias names to the end of the dependencies list
+ var _a = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ // Create an updated SourceFile:
+ //
+ // define(moduleName?, ["module1", "module2"], function ...
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(define,
+ /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([
+ // Add the dependency array argument:
+ //
+ // ["require", "exports", module1", "module2", ...]
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ // Add the module body function argument:
+ //
+ // function (require, exports, module1, module2) ...
+ ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
+ ].concat(importAliasNames),
+ /*type*/ undefined, transformAsynchronousModuleBody(node))
+ ])))
+ ]),
+ /*location*/ node.statements));
+ }
+ /**
+ * Transforms a SourceFile into a UMD module.
+ *
+ * @param node The SourceFile node.
+ */
+ function transformUMDModule(node) {
+ var _a = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ var umdHeader = ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "factory")],
+ /*type*/ undefined, ts.setTextRange(ts.createBlock([
+ ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("module"), "object"), ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), "object")), ts.createBlock([
+ ts.createVariableStatement(
+ /*modifiers*/ undefined, [
+ ts.createVariableDeclaration("v",
+ /*type*/ undefined, ts.createCall(ts.createIdentifier("factory"),
+ /*typeArguments*/ undefined, [
+ ts.createIdentifier("require"),
+ ts.createIdentifier("exports")
+ ]))
+ ]),
+ ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1 /* SingleLine */)
+ ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([
+ ts.createStatement(ts.createCall(ts.createIdentifier("define"),
+ /*typeArguments*/ undefined, [
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createIdentifier("factory")
+ ]))
+ ])))
+ ],
+ /*multiLine*/ true),
+ /*location*/ undefined));
+ // Create an updated SourceFile:
+ //
+ // (function (factory) {
+ // if (typeof module === "object" && typeof module.exports === "object") {
+ // var v = factory(require, exports);
+ // if (v !== undefined) module.exports = v;
+ // }
+ // else if (typeof define === 'function' && define.amd) {
+ // define(["require", "exports"], factory);
+ // }
+ // })(function ...)
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(umdHeader,
+ /*typeArguments*/ undefined, [
+ // Add the module body function argument:
+ //
+ // function (require, exports) ...
+ ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
+ ].concat(importAliasNames),
+ /*type*/ undefined, transformAsynchronousModuleBody(node))
+ ]))
+ ]),
+ /*location*/ node.statements));
+ }
+ /**
+ * Collect the additional asynchronous dependencies for the module.
+ *
+ * @param node The source file.
+ * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies.
+ */
+ function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
+ // names of modules with corresponding parameter in the factory function
+ var aliasedModuleNames = [];
+ // names of modules with no corresponding parameters in factory function
+ var unaliasedModuleNames = [];
+ // names of the parameters in the factory function; these
+ // parameters need to match the indexes of the corresponding
+ // module names in aliasedModuleNames.
+ var importAliasNames = [];
+ // Fill in amd-dependency tags
+ for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
+ var amdDependency = _a[_i];
+ if (amdDependency.name) {
+ aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name));
+ }
+ else {
+ unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ }
}
- return node;
+ for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
+ var importNode = _c[_b];
+ // Find the name of the external module
+ var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ // Find the name of the module alias, if there is one
+ var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
+ // It is possible that externalModuleName is undefined if it is not string literal.
+ // This can happen in the invalid import syntax.
+ // E.g : "import * from alias from 'someLib';"
+ if (externalModuleName) {
+ if (includeNonAmdDependencies && importAliasName) {
+ // Set emitFlags on the name of the classDeclaration
+ // This is so that when printer will not substitute the identifier
+ ts.setEmitFlags(importAliasName, 4 /* NoSubstitution */);
+ aliasedModuleNames.push(externalModuleName);
+ importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName));
+ }
+ else {
+ unaliasedModuleNames.push(externalModuleName);
+ }
+ }
+ }
+ return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
}
/**
- * Substitutes a PropertyAssignment whose name is a reserved word.
+ * Transforms a SourceFile into an AMD or UMD module body.
*
- * @param node A PropertyAssignment
+ * @param node The SourceFile node.
*/
- function substitutePropertyAssignment(node) {
- var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ function transformAsynchronousModuleBody(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- return node;
+ // Visit each statement of the module body.
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ // Append the 'export =' statement if provided.
+ addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true);
+ // End the lexical environment for the module body
+ // and merge any new lexical declarations.
+ ts.addRange(statements, endLexicalEnvironment());
+ var body = ts.createBlock(statements, /*multiLine*/ true);
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ // If we have any `export * from ...` declarations
+ // we need to inform the emitter to add the __export helper.
+ ts.addEmitHelper(body, exportStarHelper);
+ }
+ return body;
}
/**
- * If an identifier name is a reserved word, returns a string literal for the name.
+ * Adds the down-level representation of `export=` to the statement list if one exists
+ * in the source file.
*
- * @param name An Identifier
+ * @param statements The Statement list to modify.
+ * @param emitAsReturn A value indicating whether to emit the `export=` statement as a
+ * return statement.
*/
- function trySubstituteReservedName(name) {
- var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
- if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) {
- return ts.createLiteral(name, /*location*/ name);
+ function addExportEqualsIfNeeded(statements, emitAsReturn) {
+ if (currentModuleInfo.exportEquals) {
+ if (emitAsReturn) {
+ var statement = ts.createReturn(currentModuleInfo.exportEquals.expression);
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 1536 /* NoComments */);
+ statements.push(statement);
+ }
+ else {
+ var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression));
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 1536 /* NoComments */);
+ statements.push(statement);
+ }
}
- return undefined;
}
- }
- ts.transformES5 = transformES5;
-})(ts || (ts = {}));
-/// <reference path="../../factory.ts" />
-/// <reference path="../../visitor.ts" />
-/*@internal*/
-var ts;
-(function (ts) {
- function transformES2015Module(context) {
- var compilerOptions = context.getCompilerOptions();
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- context.enableEmitNotification(261 /* SourceFile */);
- context.enableSubstitution(70 /* Identifier */);
- var currentSourceFile;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
+ //
+ // Top-Level Source Element Visitors
+ //
+ /**
+ * Visits a node at the top level of the source file.
+ *
+ * @param node The node to visit.
+ */
+ function sourceElementVisitor(node) {
+ switch (node.kind) {
+ case 237 /* ImportDeclaration */:
+ return visitImportDeclaration(node);
+ case 236 /* ImportEqualsDeclaration */:
+ return visitImportEqualsDeclaration(node);
+ case 243 /* ExportDeclaration */:
+ return visitExportDeclaration(node);
+ case 242 /* ExportAssignment */:
+ return visitExportAssignment(node);
+ case 207 /* VariableStatement */:
+ return visitVariableStatement(node);
+ case 227 /* FunctionDeclaration */:
+ return visitFunctionDeclaration(node);
+ case 228 /* ClassDeclaration */:
+ return visitClassDeclaration(node);
+ case 296 /* MergeDeclarationMarker */:
+ return visitMergeDeclarationMarker(node);
+ case 297 /* EndOfDeclarationMarker */:
+ return visitEndOfDeclarationMarker(node);
+ default:
+ // This visitor does not descend into the tree, as export/import statements
+ // are only transformed at the top level of a file.
+ return node;
}
- if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
- var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
- if (externalHelpersModuleName) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements);
- ts.append(statements, ts.createImportDeclaration(
- /*decorators*/ undefined,
- /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
- ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ }
+ /**
+ * Visits an ImportDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitImportDeclaration(node) {
+ var statements;
+ var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (!node.importClause) {
+ // import "mod";
+ return ts.setTextRange(ts.createStatement(createRequireCall(node)), node);
}
else {
- return ts.visitEachChild(node, visitor, context);
+ var variables = [];
+ if (namespaceDeclaration && !ts.isDefaultImport(node)) {
+ // import * as n from "mod";
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, createRequireCall(node)));
+ }
+ else {
+ // import d from "mod";
+ // import { x, y } from "mod";
+ // import d, { x, y } from "mod";
+ // import d, * as n from "mod";
+ variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node),
+ /*type*/ undefined, createRequireCall(node)));
+ if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, ts.getGeneratedNameForNode(node)));
+ }
+ }
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList(variables, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)),
+ /*location*/ node));
}
}
+ else if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ // import d, * as n from "mod";
+ statements = ts.append(statements, ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, ts.getGeneratedNameForNode(node)),
+ /*location*/ node)
+ ], languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)));
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Creates a `require()` call to import an external module.
+ *
+ * @param importNode The declararation to import.
+ */
+ function createRequireCall(importNode) {
+ var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ var args = [];
+ if (moduleName) {
+ args.push(moduleName);
+ }
+ return ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, args);
+ }
+ /**
+ * Visits an ImportEqualsDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitImportEqualsDeclaration(node) {
+ ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
+ var statements;
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(node.name, createRequireCall(node))), node));
+ }
+ else {
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getSynthesizedClone(node.name),
+ /*type*/ undefined, createRequireCall(node))
+ ],
+ /*flags*/ languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)), node));
+ }
+ }
+ else {
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node))), node));
+ }
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportEqualsDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits an ExportDeclaration node.
+ *
+ * @param The node to visit.
+ */
+ function visitExportDeclaration(node) {
+ if (!node.moduleSpecifier) {
+ // Elide export declarations with no module specifier as they are handled
+ // elsewhere.
+ return undefined;
+ }
+ var generatedName = ts.getGeneratedNameForNode(node);
+ if (node.exportClause) {
+ var statements = [];
+ // export { x, y } from "mod";
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ statements.push(ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(generatedName,
+ /*type*/ undefined, createRequireCall(node))
+ ])),
+ /*location*/ node));
+ }
+ for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
+ var specifier = _a[_i];
+ var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
+ statements.push(ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier));
+ }
+ return ts.singleOrMany(statements);
+ }
+ else {
+ // export * from "mod";
+ return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
+ /*typeArguments*/ undefined, [
+ moduleKind !== ts.ModuleKind.AMD
+ ? createRequireCall(node)
+ : generatedName
+ ])), node);
+ }
+ }
+ /**
+ * Visits an ExportAssignment node.
+ *
+ * @param node The node to visit.
+ */
+ function visitExportAssignment(node) {
+ if (node.isExportEquals) {
+ return undefined;
+ }
+ var statements;
+ var original = node.original;
+ if (original && hasAssociatedEndOfDeclarationMarker(original)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
+ }
+ else {
+ statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a FunctionDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ /*typeParameters*/ undefined, node.parameters,
+ /*type*/ undefined, node.body),
+ /*location*/ node),
+ /*original*/ node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a ClassDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitClassDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ /*typeParameters*/ undefined, node.heritageClauses, node.members), node), node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a VariableStatement node.
+ *
+ * @param node The node to visit.
+ */
+ function visitVariableStatement(node) {
+ var statements;
+ var variables;
+ var expressions;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ var modifiers = void 0;
+ // If we're exporting these variables, then these just become assignments to 'exports.x'.
+ // We only want to emit assignments for variables with initializers.
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var variable = _a[_i];
+ if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
+ if (!modifiers) {
+ modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
+ }
+ variables = ts.append(variables, variable);
+ }
+ else if (variable.initializer) {
+ expressions = ts.append(expressions, transformInitializedVariable(variable));
+ }
+ }
+ if (variables) {
+ statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
+ }
+ if (expressions) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
+ }
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfVariableStatement(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Transforms an exported variable with an initializer into an expression.
+ *
+ * @param node The node to transform.
+ */
+ function transformInitializedVariable(node) {
+ if (ts.isBindingPattern(node.name)) {
+ return ts.flattenDestructuringAssignment(node,
+ /*visitor*/ undefined, context, 0 /* All */,
+ /*needsValue*/ false, createExportExpression);
+ }
+ else {
+ return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name),
+ /*location*/ node.name), node.initializer);
+ }
+ }
+ /**
+ * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
+ * and transformed declaration.
+ *
+ * @param node The node to visit.
+ */
+ function visitMergeDeclarationMarker(node) {
+ // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding
+ // declaration we do not emit a leading variable declaration. To preserve the
+ // begin/end semantics of the declararation and to properly handle exports
+ // we wrapped the leading variable declaration in a `MergeDeclarationMarker`.
+ //
+ // To balance the declaration, add the exports of the elided variable
+ // statement.
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
+ }
return node;
}
- function visitor(node) {
+ /**
+ * Determines whether a node has an associated EndOfDeclarationMarker.
+ *
+ * @param node The node to test.
+ */
+ function hasAssociatedEndOfDeclarationMarker(node) {
+ return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ }
+ /**
+ * Visits a DeclarationMarker used as a placeholder for the end of a transformed
+ * declaration.
+ *
+ * @param node The node to visit.
+ */
+ function visitEndOfDeclarationMarker(node) {
+ // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual
+ // end of the transformed declaration. We use this marker to emit any deferred exports
+ // of the declaration.
+ var id = ts.getOriginalNodeId(node);
+ var statements = deferredExports[id];
+ if (statements) {
+ delete deferredExports[id];
+ return ts.append(statements, node);
+ }
+ return node;
+ }
+ /**
+ * Appends the exports of an ImportDeclaration to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfImportDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ var importClause = decl.importClause;
+ if (!importClause) {
+ return statements;
+ }
+ if (importClause.name) {
+ statements = appendExportsOfDeclaration(statements, importClause);
+ }
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings) {
+ switch (namedBindings.kind) {
+ case 239 /* NamespaceImport */:
+ statements = appendExportsOfDeclaration(statements, namedBindings);
+ break;
+ case 240 /* NamedImports */:
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var importBinding = _a[_i];
+ statements = appendExportsOfDeclaration(statements, importBinding);
+ }
+ break;
+ }
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfImportEqualsDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ return appendExportsOfDeclaration(statements, decl);
+ }
+ /**
+ * Appends the exports of a VariableStatement to a statement list, returning the statement
+ * list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param node The VariableStatement whose exports are to be recorded.
+ */
+ function appendExportsOfVariableStatement(statements, node) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ statements = appendExportsOfBindingElement(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a VariableDeclaration or BindingElement to a statement list,
+ * returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfBindingElement(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.isBindingPattern(decl.name)) {
+ for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ if (!ts.isOmittedExpression(element)) {
+ statements = appendExportsOfBindingElement(statements, element);
+ }
+ }
+ }
+ else if (!ts.isGeneratedIdentifier(decl.name)) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list,
+ * returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfHoistedDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.hasModifier(decl, 1 /* Export */)) {
+ var exportName = ts.hasModifier(decl, 512 /* Default */) ? ts.createIdentifier("default") : decl.name;
+ statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), /*location*/ decl);
+ }
+ if (decl.name) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a declaration to a statement list, returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration to export.
+ */
+ function appendExportsOfDeclaration(statements, decl) {
+ var name = ts.getDeclarationName(decl);
+ var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name.text);
+ if (exportSpecifiers) {
+ for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
+ var exportSpecifier = exportSpecifiers_1[_i];
+ statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name);
+ }
+ }
+ return statements;
+ }
+ /**
+ * Appends the down-level representation of an export to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param exportName The name of the export.
+ * @param expression The expression to export.
+ * @param location The location to use for source maps and comments for the export.
+ * @param allowComments Whether to allow comments on the export.
+ */
+ function appendExportStatement(statements, exportName, expression, location, allowComments) {
+ statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
+ return statements;
+ }
+ function createUnderscoreUnderscoreESModule() {
+ var statement;
+ if (languageVersion === 0 /* ES3 */) {
+ statement = ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(/*value*/ true)));
+ }
+ else {
+ statement = ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
+ /*typeArguments*/ undefined, [
+ ts.createIdentifier("exports"),
+ ts.createLiteral("__esModule"),
+ ts.createObjectLiteral([
+ ts.createPropertyAssignment("value", ts.createLiteral(/*value*/ true))
+ ])
+ ]));
+ }
+ ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ return statement;
+ }
+ /**
+ * Creates a call to the current file's export function to export a value.
+ *
+ * @param name The bound name of the export.
+ * @param value The exported value.
+ * @param location The location to use for source maps and comments for the export.
+ * @param allowComments An optional value indicating whether to emit comments for the statement.
+ */
+ function createExportStatement(name, value, location, allowComments) {
+ var statement = ts.setTextRange(ts.createStatement(createExportExpression(name, value)), location);
+ ts.startOnNewLine(statement);
+ if (!allowComments) {
+ ts.setEmitFlags(statement, 1536 /* NoComments */);
+ }
+ return statement;
+ }
+ /**
+ * Creates a call to the current file's export function to export a value.
+ *
+ * @param name The bound name of the export.
+ * @param value The exported value.
+ * @param location The location to use for source maps and comments for the export.
+ */
+ function createExportExpression(name, value, location) {
+ return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location);
+ }
+ //
+ // Modifier Visitors
+ //
+ /**
+ * Visit nodes to elide module-specific modifiers.
+ *
+ * @param node The node to visit.
+ */
+ function modifierVisitor(node) {
+ // Elide module-specific modifiers.
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- // Elide `import=` as it is not legal with --module ES6
+ case 83 /* ExportKeyword */:
+ case 78 /* DefaultKeyword */:
return undefined;
- case 240 /* ExportAssignment */:
- return visitExportAssignment(node);
}
return node;
}
- function visitExportAssignment(node) {
- // Elide `export=` as it is not legal with --module ES6
- return node.isExportEquals ? undefined : node;
- }
//
// Emit Notification
//
/**
- * Hook for node emit.
+ * Hook for node emit notifications.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (ts.isSourceFile(node)) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264 /* SourceFile */) {
currentSourceFile = node;
- previousOnEmitNode(emitContext, node, emitCallback);
+ currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
+ noSubstitution = [];
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -54342,30 +59434,192 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isIdentifier(node) && emitContext === 1 /* Expression */) {
- return substituteExpressionIdentifier(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (node.id && noSubstitution[node.id]) {
+ return node;
+ }
+ if (hint === 1 /* Expression */) {
+ return substituteExpression(node);
+ }
+ else if (ts.isShorthandPropertyAssignment(node)) {
+ return substituteShorthandPropertyAssignment(node);
+ }
+ return node;
+ }
+ /**
+ * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported
+ * or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteShorthandPropertyAssignment(node) {
+ var name = node.name;
+ var exportedOrImportedName = substituteExpressionIdentifier(name);
+ if (exportedOrImportedName !== name) {
+ // A shorthand property with an assignment initializer is probably part of a
+ // destructuring assignment
+ if (node.objectAssignmentInitializer) {
+ var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
+ }
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedOrImportedName), node);
+ }
+ return node;
+ }
+ /**
+ * Substitution for an Expression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 70 /* Identifier */:
+ return substituteExpressionIdentifier(node);
+ case 193 /* BinaryExpression */:
+ return substituteBinaryExpression(node);
+ case 192 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ return substituteUnaryExpression(node);
}
return node;
}
+ /**
+ * Substitution for an Identifier expression that may contain an imported or exported
+ * symbol.
+ *
+ * @param node The node to substitute.
+ */
function substituteExpressionIdentifier(node) {
if (ts.getEmitFlags(node) & 4096 /* HelperName */) {
var externalHelpersModuleName = ts.getExternalHelpersModuleName(currentSourceFile);
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
+ return node;
+ }
+ if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
+ var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
+ if (exportContainer && exportContainer.kind === 264 /* SourceFile */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)),
+ /*location*/ node);
+ }
+ var importDeclaration = resolver.getReferencedImportDeclaration(node);
+ if (importDeclaration) {
+ if (ts.isImportClause(importDeclaration)) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")),
+ /*location*/ node);
+ }
+ else if (ts.isImportSpecifier(importDeclaration)) {
+ var name = importDeclaration.propertyName || importDeclaration.name;
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name)),
+ /*location*/ node);
+ }
+ }
}
return node;
}
+ /**
+ * Substitution for a BinaryExpression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteBinaryExpression(node) {
+ // When we see an assignment expression whose left-hand side is an exported symbol,
+ // we should ensure all exports of that symbol are updated with the correct value.
+ //
+ // - We do not substitute generated identifiers for any reason.
+ // - We do not substitute identifiers tagged with the LocalName flag.
+ // - We do not substitute identifiers that were originally the name of an enum or
+ // namespace due to how they are transformed in TypeScript.
+ // - We only substitute identifiers that are exported at the top level.
+ if (ts.isAssignmentOperator(node.operatorToken.kind)
+ && ts.isIdentifier(node.left)
+ && !ts.isGeneratedIdentifier(node.left)
+ && !ts.isLocalName(node.left)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
+ var exportedNames = getExports(node.left);
+ if (exportedNames) {
+ // For each additional export of the declaration, apply an export assignment.
+ var expression = node;
+ for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
+ var exportName = exportedNames_1[_i];
+ // Mark the node to prevent triggering this rule again.
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression, /*location*/ node);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ /**
+ * Substitution for a UnaryExpression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteUnaryExpression(node) {
+ // When we see a prefix or postfix increment expression whose operand is an exported
+ // symbol, we should ensure all exports of that symbol are updated with the correct
+ // value.
+ //
+ // - We do not substitute generated identifiers for any reason.
+ // - We do not substitute identifiers tagged with the LocalName flag.
+ // - We do not substitute identifiers that were originally the name of an enum or
+ // namespace due to how they are transformed in TypeScript.
+ // - We only substitute identifiers that are exported at the top level.
+ if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */)
+ && ts.isIdentifier(node.operand)
+ && !ts.isGeneratedIdentifier(node.operand)
+ && !ts.isLocalName(node.operand)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
+ var exportedNames = getExports(node.operand);
+ if (exportedNames) {
+ var expression = node.kind === 192 /* PostfixUnaryExpression */
+ ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1)),
+ /*location*/ node)
+ : node;
+ for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
+ var exportName = exportedNames_2[_i];
+ // Mark the node to prevent triggering this rule again.
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ /**
+ * Gets the additional exports of a name.
+ *
+ * @param name The name.
+ */
+ function getExports(name) {
+ if (!ts.isGeneratedIdentifier(name)) {
+ var valueDeclaration = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
+ if (valueDeclaration) {
+ return currentModuleInfo
+ && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
+ }
+ }
+ }
}
- ts.transformES2015Module = transformES2015Module;
+ ts.transformModule = transformModule;
+ // emit output for the __export helper function
+ var exportStarHelper = {
+ name: "typescript:export-star",
+ scoped: true,
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
+ };
})(ts || (ts = {}));
/// <reference path="../../factory.ts" />
/// <reference path="../../visitor.ts" />
+/// <reference path="../destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
@@ -54379,14 +59633,14 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers for imported symbols.
- context.enableSubstitution(192 /* BinaryExpression */); // Substitutes assignments to exported symbols.
- context.enableSubstitution(190 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(191 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableEmitNotification(261 /* SourceFile */); // Restore state when substituting nodes in a file.
- var moduleInfoMap = ts.createMap(); // The ExternalModuleInfo for each file.
- var deferredExports = ts.createMap(); // Exports to defer until an EndOfDeclarationMarker is found.
- var exportFunctionsMap = ts.createMap(); // The export function associated with a source file.
- var noSubstitutionMap = ts.createMap(); // Set of nodes for which substitution rules should be ignored for each file.
+ context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols.
+ context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file.
+ var moduleInfoMap = []; // The ExternalModuleInfo for each file.
+ var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
+ var exportFunctionsMap = []; // The export function associated with a source file.
+ var noSubstitutionMap = []; // Set of nodes for which substitution rules should be ignored for each file.
var currentSourceFile; // The current file.
var moduleInfo; // ExternalModuleInfo for the current file.
var exportFunction; // The export function for the current file.
@@ -54425,7 +59679,8 @@ var ts;
moduleInfo = moduleInfoMap[id] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
// Make sure that the name of the 'exports' function does not conflict with
// existing identifiers.
- exportFunction = exportFunctionsMap[id] = ts.createUniqueName("exports");
+ exportFunction = ts.createUniqueName("exports");
+ exportFunctionsMap[id] = exportFunction;
contextObject = ts.createUniqueName("context");
// Add the body of the module.
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
@@ -54444,12 +59699,12 @@ var ts;
// So the helper will be emit at the correct position instead of at the top of the source-file
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
var dependencies = ts.createArrayLiteral(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray([
+ var updated = ts.setEmitFlags(ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("System"), "register"),
/*typeArguments*/ undefined, moduleName
? [moduleName, dependencies, moduleBodyFunction]
: [dependencies, moduleBodyFunction]))
- ], node.statements));
+ ]), node.statements)), 1024 /* NoTrailingComments */);
if (!(compilerOptions.outFile || compilerOptions.out)) {
ts.moveEmitHelpers(updated, moduleBodyBlock, function (helper) { return !helper.scoped; });
}
@@ -54476,18 +59731,20 @@ var ts;
for (var i = 0; i < externalImports.length; i++) {
var externalImport = externalImports[i];
var externalModuleName = ts.getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions);
- var text = externalModuleName.text;
- if (ts.hasProperty(groupIndices, text)) {
- // deduplicate/group entries in dependency list by the dependency name
- var groupIndex = groupIndices[text];
- dependencyGroups[groupIndex].externalImports.push(externalImport);
- }
- else {
- groupIndices[text] = dependencyGroups.length;
- dependencyGroups.push({
- name: externalModuleName,
- externalImports: [externalImport]
- });
+ if (externalModuleName) {
+ var text = externalModuleName.text;
+ var groupIndex = groupIndices.get(text);
+ if (groupIndex !== undefined) {
+ // deduplicate/group entries in dependency list by the dependency name
+ dependencyGroups[groupIndex].externalImports.push(externalImport);
+ }
+ else {
+ groupIndices.set(text, dependencyGroups.length);
+ dependencyGroups.push({
+ name: externalModuleName,
+ externalImports: [externalImport]
+ });
+ }
}
}
return dependencyGroups;
@@ -54545,7 +59802,8 @@ var ts;
// only in the outer module body and not in the inner one.
startLexicalEnvironment();
// Add any prologue directives.
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
// var __moduleName = context_1 && context_1.id;
statements.push(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
@@ -54553,7 +59811,7 @@ var ts;
/*type*/ undefined, ts.createLogicalAnd(contextObject, ts.createPropertyAccess(contextObject, "id")))
])));
// Visit the synthetic external helpers import declaration if present
- ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true);
+ ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
// Visit the statements of the source file, emitting any transformations into
// the `executeStatements` array. We do this *before* we fill the `setters` array
// as we both emit transformations as well as aggregate some data used when creating
@@ -54567,7 +59825,7 @@ var ts;
// - Temporary variables will appear at the top rather than at the bottom of the file
ts.addRange(statements, endLexicalEnvironment());
var exportStarFunction = addExportStarIfNeeded(statements);
- statements.push(ts.createReturn(ts.setMultiLine(ts.createObjectLiteral([
+ var moduleObject = ts.createObjectLiteral([
ts.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
ts.createPropertyAssignment("execute", ts.createFunctionExpression(
/*modifiers*/ undefined,
@@ -54575,12 +59833,11 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined,
/*parameters*/ [],
- /*type*/ undefined, ts.createBlock(executeStatements,
- /*location*/ undefined,
- /*multiLine*/ true)))
- ]),
- /*multiLine*/ true)));
- return ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true);
+ /*type*/ undefined, ts.createBlock(executeStatements, /*multiLine*/ true)))
+ ]);
+ moduleObject.multiLine = true;
+ statements.push(ts.createReturn(moduleObject));
+ return ts.createBlock(statements, /*multiLine*/ true);
}
/**
* Adds an exportStar function to a statement list if it is needed for the file.
@@ -54596,13 +59853,13 @@ var ts;
// to support this we store names of local/indirect exported entries in a set.
// this set is used to filter names brought by star expors.
// local names set should only be added if we have anything exported
- if (!moduleInfo.exportedNames && ts.isEmpty(moduleInfo.exportSpecifiers)) {
+ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) {
// no exported declarations (export var ...) or export specifiers (export {x})
// check if we have any non star export declarations.
var hasExportDeclarationWithExportClause = false;
for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
var externalImport = _a[_i];
- if (externalImport.kind === 241 /* ExportDeclaration */ && externalImport.exportClause) {
+ if (externalImport.kind === 243 /* ExportDeclaration */ && externalImport.exportClause) {
hasExportDeclarationWithExportClause = true;
break;
}
@@ -54622,12 +59879,12 @@ var ts;
continue;
}
// write name of exported declaration, i.e 'export var x...'
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createTrue()));
}
}
for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) {
var externalImport = _e[_d];
- if (externalImport.kind !== 241 /* ExportDeclaration */) {
+ if (externalImport.kind !== 243 /* ExportDeclaration */) {
continue;
}
var exportDecl = externalImport;
@@ -54638,14 +59895,14 @@ var ts;
for (var _f = 0, _g = exportDecl.exportClause.elements; _f < _g.length; _f++) {
var element = _g[_f];
// write name of indirectly exported entry, i.e. 'export {x} from ...'
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createTrue()));
}
}
var exportedNamesStorageRef = ts.createUniqueName("exportedNames");
statements.push(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(exportedNamesStorageRef,
- /*type*/ undefined, ts.createObjectLiteral(exportedNames, /*location*/ undefined, /*multiline*/ true))
+ /*type*/ undefined, ts.createObjectLiteral(exportedNames, /*multiline*/ true))
])));
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
statements.push(exportStarFunction);
@@ -54686,9 +59943,7 @@ var ts;
])),
ts.createStatement(ts.createCall(exportFunction,
/*typeArguments*/ undefined, [exports]))
- ],
- /*location*/ undefined,
- /*multiline*/ true));
+ ], /*multiline*/ true));
}
/**
* Creates an array setter callbacks for each dependency group.
@@ -54708,19 +59963,19 @@ var ts;
var entry = _b[_a];
var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile);
switch (entry.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
if (!entry.importClause) {
// 'import "..."' case
// module is imported only for side-effects, no emit required
break;
}
- // fall-through
- case 234 /* ImportEqualsDeclaration */:
+ // falls through
+ case 236 /* ImportEqualsDeclaration */:
ts.Debug.assert(importVariableName !== undefined);
// save import into the local
statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName)));
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
ts.Debug.assert(importVariableName !== undefined);
if (entry.exportClause) {
// export {a, b as c} from 'foo'
@@ -54737,7 +59992,7 @@ var ts;
properties.push(ts.createPropertyAssignment(ts.createLiteral(e.name.text), ts.createElementAccess(parameterName, ts.createLiteral((e.propertyName || e.name).text))));
}
statements.push(ts.createStatement(ts.createCall(exportFunction,
- /*typeArguments*/ undefined, [ts.createObjectLiteral(properties, /*location*/ undefined, /*multiline*/ true)])));
+ /*typeArguments*/ undefined, [ts.createObjectLiteral(properties, /*multiline*/ true)])));
}
else {
// export * from 'foo'
@@ -54756,9 +60011,9 @@ var ts;
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
- /*type*/ undefined, ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true)));
+ /*type*/ undefined, ts.createBlock(statements, /*multiLine*/ true)));
}
- return ts.createArrayLiteral(setters, /*location*/ undefined, /*multiLine*/ true);
+ return ts.createArrayLiteral(setters, /*multiLine*/ true);
}
//
// Top-level Source Element Visitors
@@ -54770,15 +60025,15 @@ var ts;
*/
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// ExportDeclarations are elided as they are handled via
// `appendExportsOfDeclaration`.
return undefined;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitExportAssignment(node);
default:
return nestedElementVisitor(node);
@@ -54851,7 +60106,7 @@ var ts;
*/
function visitFunctionDeclaration(node) {
if (ts.hasModifier(node, 1 /* Export */)) {
- hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration),
/*type*/ undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
}
@@ -54879,11 +60134,9 @@ var ts;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
// Rewrite the class declaration into an assignment of a class expression.
- statements = ts.append(statements, ts.createStatement(ts.createAssignment(name, ts.createClassExpression(
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(
/*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement),
- /*location*/ node)),
- /*location*/ node));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
var id = ts.getOriginalNodeId(node);
@@ -54918,7 +60171,7 @@ var ts;
}
var statements;
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), /*location*/ node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
if (isMarkedDeclaration) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -54956,7 +60209,7 @@ var ts;
function shouldHoistVariableDeclarationList(node) {
// hoist only non-block scoped declarations or block scoped declarations parented by source file
return (ts.getEmitFlags(node) & 1048576 /* NoHoisting */) === 0
- && (enclosingBlockScopedContainer.kind === 261 /* SourceFile */
+ && (enclosingBlockScopedContainer.kind === 264 /* SourceFile */
|| (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0);
}
/**
@@ -55003,8 +60256,8 @@ var ts;
function createVariableAssignment(name, value, location, isExportedDeclaration) {
hoistVariableDeclaration(ts.getSynthesizedClone(name));
return isExportedDeclaration
- ? createExportExpression(name, preventSubstitution(ts.createAssignment(name, value, location)))
- : preventSubstitution(ts.createAssignment(name, value, location));
+ ? createExportExpression(name, preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)))
+ : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location));
}
/**
* Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
@@ -55020,7 +60273,7 @@ var ts;
//
// To balance the declaration, we defer the exports of the elided variable
// statement until we visit this declaration's `EndOfDeclarationMarker`.
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205 /* VariableStatement */) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) {
var id = ts.getOriginalNodeId(node);
var isExportedDeclaration = ts.hasModifier(node.original, 1 /* Export */);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -55076,10 +60329,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238 /* NamedImports */:
+ case 240 /* NamedImports */:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -55197,10 +60450,10 @@ var ts;
return statements;
}
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = moduleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = moduleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
- var exportSpecifier = exportSpecifiers_1[_i];
+ for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
+ var exportSpecifier = exportSpecifiers_2[_i];
if (exportSpecifier.name.text !== excludeName) {
statements = appendExportStatement(statements, exportSpecifier.name, name);
}
@@ -55258,43 +60511,43 @@ var ts;
*/
function nestedElementVisitor(node) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return visitForOfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitWhileStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return visitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitSwitchStatement(node);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return visitCaseBlock(node);
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return visitCaseClause(node);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return visitDefaultClause(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return visitTryStatement(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitCatchClause(node);
- case 204 /* Block */:
+ case 206 /* Block */:
return visitBlock(node);
- case 295 /* MergeDeclarationMarker */:
+ case 296 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 296 /* EndOfDeclarationMarker */:
+ case 297 /* EndOfDeclarationMarker */:
return visitEndOfDeclarationMarker(node);
default:
return destructuringVisitor(node);
@@ -55308,7 +60561,7 @@ var ts;
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55320,7 +60573,7 @@ var ts;
function visitForInStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55332,7 +60585,7 @@ var ts;
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForOf(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55352,6 +60605,9 @@ var ts;
* @param node The node to visit.
*/
function visitForInitializer(node) {
+ if (!node) {
+ return node;
+ }
if (shouldHoistForInitializer(node)) {
var expressions = void 0;
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
@@ -55370,7 +60626,7 @@ var ts;
* @param node The node to visit.
*/
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
+ return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
}
/**
* Visits the body of a WhileStatement to hoist declarations.
@@ -55378,7 +60634,7 @@ var ts;
* @param node The node to visit.
*/
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a LabeledStatement to hoist declarations.
@@ -55386,7 +60642,7 @@ var ts;
* @param node The node to visit.
*/
function visitLabeledStatement(node) {
- return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a WithStatement to hoist declarations.
@@ -55394,7 +60650,7 @@ var ts;
* @param node The node to visit.
*/
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a SwitchStatement to hoist declarations.
@@ -55474,7 +60730,7 @@ var ts;
*/
function destructuringVisitor(node) {
if (node.transformFlags & 1024 /* DestructuringAssignment */
- && node.kind === 192 /* BinaryExpression */) {
+ && node.kind === 193 /* BinaryExpression */) {
return visitDestructuringAssignment(node);
}
else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) {
@@ -55502,7 +60758,7 @@ var ts;
* @param node The destructuring target.
*/
function hasExportedReferenceInDestructuringTarget(node) {
- if (ts.isAssignmentExpression(node)) {
+ if (ts.isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
else if (ts.isSpreadExpression(node)) {
@@ -55522,7 +60778,7 @@ var ts;
}
else if (ts.isIdentifier(node)) {
var container = resolver.getReferencedExportContainer(node);
- return container !== undefined && container.kind === 261 /* SourceFile */;
+ return container !== undefined && container.kind === 264 /* SourceFile */;
}
else {
return false;
@@ -55550,12 +60806,12 @@ var ts;
/**
* Hook for node emit notifications.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
- * @param emit A callback used to emit the node in the printer.
+ * @param emitCallback A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261 /* SourceFile */) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264 /* SourceFile */) {
var id = ts.getOriginalNodeId(node);
currentSourceFile = node;
moduleInfo = moduleInfoMap[id];
@@ -55564,14 +60820,14 @@ var ts;
if (noSubstitution) {
delete noSubstitutionMap[id];
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
moduleInfo = undefined;
exportFunction = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -55580,15 +60836,15 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (isSubstitutionPrevented(node)) {
return node;
}
- if (emitContext === 1 /* Expression */) {
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
return node;
@@ -55602,10 +60858,10 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return substituteExpressionIdentifier(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return substituteBinaryExpression(node);
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return substituteUnaryExpression(node);
}
return node;
@@ -55633,11 +60889,11 @@ var ts;
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"),
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")),
/*location*/ node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name),
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name)),
/*location*/ node);
}
}
@@ -55667,8 +60923,8 @@ var ts;
if (exportedNames) {
// For each additional export of the declaration, apply an export assignment.
var expression = node;
- for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
- var exportName = exportedNames_1[_i];
+ for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
+ var exportName = exportedNames_3[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
return expression;
@@ -55698,15 +60954,14 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191 /* PostfixUnaryExpression */
- ? ts.createPrefix(node.operator, node.operand,
- /*location*/ node)
+ var expression = node.kind === 192 /* PostfixUnaryExpression */
+ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node)
: node;
- for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
- var exportName = exportedNames_2[_i];
+ for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
+ var exportName = exportedNames_4[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
- if (node.kind === 191 /* PostfixUnaryExpression */) {
+ if (node.kind === 192 /* PostfixUnaryExpression */) {
expression = node.operator === 42 /* PlusPlusToken */
? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1))
: ts.createAdd(preventSubstitution(expression), ts.createLiteral(1));
@@ -55728,7 +60983,7 @@ var ts;
|| resolver.getReferencedValueDeclaration(name);
if (valueDeclaration) {
var exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false);
- if (exportContainer && exportContainer.kind === 261 /* SourceFile */) {
+ if (exportContainer && exportContainer.kind === 264 /* SourceFile */) {
exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration));
}
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -55743,7 +60998,7 @@ var ts;
*/
function preventSubstitution(node) {
if (noSubstitution === undefined)
- noSubstitution = ts.createMap();
+ noSubstitution = [];
noSubstitution[ts.getNodeId(node)] = true;
return node;
}
@@ -55763,852 +61018,69 @@ var ts;
/*@internal*/
var ts;
(function (ts) {
- function transformModule(context) {
- var transformModuleDelegates = ts.createMap((_a = {},
- _a[ts.ModuleKind.None] = transformCommonJSModule,
- _a[ts.ModuleKind.CommonJS] = transformCommonJSModule,
- _a[ts.ModuleKind.AMD] = transformAMDModule,
- _a[ts.ModuleKind.UMD] = transformUMDModule,
- _a));
- var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ function transformES2015Module(context) {
var compilerOptions = context.getCompilerOptions();
- var resolver = context.getEmitResolver();
- var host = context.getEmitHost();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var moduleKind = ts.getEmitModuleKind(compilerOptions);
- var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
- context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols.
- context.enableSubstitution(192 /* BinaryExpression */); // Substitutes assignments to exported symbols.
- context.enableSubstitution(190 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(191 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(258 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
- context.enableEmitNotification(261 /* SourceFile */); // Restore state when substituting nodes in a file.
- var moduleInfoMap = ts.createMap(); // The ExternalModuleInfo for each file.
- var deferredExports = ts.createMap(); // Exports to defer until an EndOfDeclarationMarker is found.
- var currentSourceFile; // The current file.
- var currentModuleInfo; // The ExternalModuleInfo for the current file.
- var noSubstitution; // Set of nodes for which substitution rules should be ignored.
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableEmitNotification(264 /* SourceFile */);
+ context.enableSubstitution(70 /* Identifier */);
+ var currentSourceFile;
return transformSourceFile;
- /**
- * Transforms the module aspects of a SourceFile.
- *
- * @param node The SourceFile node.
- */
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(node)] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- // Perform the transformation.
- var transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ts.ModuleKind.None];
- var updated = transformModule(node);
- currentSourceFile = undefined;
- currentModuleInfo = undefined;
- return ts.aggregateTransformFlags(updated);
- }
- /**
- * Transforms a SourceFile into a CommonJS module.
- *
- * @param node The SourceFile node.
- */
- function transformCommonJSModule(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
- addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
- ts.addEmitHelper(updated, exportStarHelper);
- }
- return updated;
- }
- /**
- * Transforms a SourceFile into an AMD module.
- *
- * @param node The SourceFile node.
- */
- function transformAMDModule(node) {
- var define = ts.createIdentifier("define");
- var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
- return transformAsynchronousModule(node, define, moduleName, /*includeNonAmdDependencies*/ true);
- }
- /**
- * Transforms a SourceFile into a UMD module.
- *
- * @param node The SourceFile node.
- */
- function transformUMDModule(node) {
- var define = ts.createRawExpression(umdHelper);
- return transformAsynchronousModule(node, define, /*moduleName*/ undefined, /*includeNonAmdDependencies*/ false);
- }
- /**
- * Transforms a SourceFile into an AMD or UMD module.
- *
- * @param node The SourceFile node.
- * @param define The expression used to define the module.
- * @param moduleName An expression for the module name, if available.
- * @param includeNonAmdDependencies A value indicating whether to incldue any non-AMD dependencies.
- */
- function transformAsynchronousModule(node, define, moduleName, includeNonAmdDependencies) {
- // An AMD define function has the following shape:
- //
- // define(id?, dependencies?, factory);
- //
- // This has the shape of the following:
- //
- // define(name, ["module1", "module2"], function (module1Alias) { ... }
- //
- // The location of the alias in the parameter list in the factory function needs to
- // match the position of the module name in the dependency list.
- //
- // To ensure this is true in cases of modules with no aliases, e.g.:
- //
- // import "module"
- //
- // or
- //
- // /// <amd-dependency path= "a.css" />
- //
- // we need to add modules without alias names to the end of the dependencies list
- var _a = collectAsynchronousDependencies(node, includeNonAmdDependencies), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
- // Create an updated SourceFile:
- //
- // define(moduleName?, ["module1", "module2"], function ...
- return ts.updateSourceFileNode(node, ts.createNodeArray([
- ts.createStatement(ts.createCall(define,
- /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([
- // Add the dependency array argument:
- //
- // ["require", "exports", module1", "module2", ...]
- ts.createArrayLiteral([
- ts.createLiteral("require"),
- ts.createLiteral("exports")
- ].concat(aliasedModuleNames, unaliasedModuleNames)),
- // Add the module body function argument:
- //
- // function (require, exports, module1, module2) ...
- ts.createFunctionExpression(
- /*modifiers*/ undefined,
- /*asteriskToken*/ undefined,
- /*name*/ undefined,
- /*typeParameters*/ undefined, [
- ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
- ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
- ].concat(importAliasNames),
- /*type*/ undefined, transformAsynchronousModuleBody(node))
- ])))
- ],
- /*location*/ node.statements));
- }
- /**
- * Collect the additional asynchronous dependencies for the module.
- *
- * @param node The source file.
- * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies.
- */
- function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
- // names of modules with corresponding parameter in the factory function
- var aliasedModuleNames = [];
- // names of modules with no corresponding parameters in factory function
- var unaliasedModuleNames = [];
- // names of the parameters in the factory function; these
- // parameters need to match the indexes of the corresponding
- // module names in aliasedModuleNames.
- var importAliasNames = [];
- // Fill in amd-dependency tags
- for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
- var amdDependency = _a[_i];
- if (amdDependency.name) {
- aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name));
- }
- else {
- unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- }
- }
- for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
- var importNode = _c[_b];
- // Find the name of the external module
- var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- // Find the name of the module alias, if there is one
- var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
- if (includeNonAmdDependencies && importAliasName) {
- // Set emitFlags on the name of the classDeclaration
- // This is so that when printer will not substitute the identifier
- ts.setEmitFlags(importAliasName, 4 /* NoSubstitution */);
- aliasedModuleNames.push(externalModuleName);
- importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName));
- }
- else {
- unaliasedModuleNames.push(externalModuleName);
- }
- }
- return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
- }
- /**
- * Transforms a SourceFile into an AMD or UMD module body.
- *
- * @param node The SourceFile node.
- */
- function transformAsynchronousModuleBody(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- // Visit each statement of the module body.
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- // End the lexical environment for the module body
- // and merge any new lexical declarations.
- ts.addRange(statements, endLexicalEnvironment());
- // Append the 'export =' statement if provided.
- addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true);
- var body = ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
- // If we have any `export * from ...` declarations
- // we need to inform the emitter to add the __export helper.
- ts.addEmitHelper(body, exportStarHelper);
- }
- return body;
- }
- /**
- * Adds the down-level representation of `export=` to the statement list if one exists
- * in the source file.
- *
- * @param statements The Statement list to modify.
- * @param emitAsReturn A value indicating whether to emit the `export=` statement as a
- * return statement.
- */
- function addExportEqualsIfNeeded(statements, emitAsReturn) {
- if (currentModuleInfo.exportEquals) {
- if (emitAsReturn) {
- var statement = ts.createReturn(currentModuleInfo.exportEquals.expression,
- /*location*/ currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 1536 /* NoComments */);
- statements.push(statement);
- }
- else {
- var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression),
- /*location*/ currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 1536 /* NoComments */);
- statements.push(statement);
- }
- }
- }
- //
- // Top-Level Source Element Visitors
- //
- /**
- * Visits a node at the top level of the source file.
- *
- * @param node The node to visit.
- */
- function sourceElementVisitor(node) {
- switch (node.kind) {
- case 235 /* ImportDeclaration */:
- return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
- return visitImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
- return visitExportDeclaration(node);
- case 240 /* ExportAssignment */:
- return visitExportAssignment(node);
- case 205 /* VariableStatement */:
- return visitVariableStatement(node);
- case 225 /* FunctionDeclaration */:
- return visitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
- return visitClassDeclaration(node);
- case 295 /* MergeDeclarationMarker */:
- return visitMergeDeclarationMarker(node);
- case 296 /* EndOfDeclarationMarker */:
- return visitEndOfDeclarationMarker(node);
- default:
- // This visitor does not descend into the tree, as export/import statements
- // are only transformed at the top level of a file.
- return node;
- }
- }
- /**
- * Visits an ImportDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitImportDeclaration(node) {
- var statements;
- var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (!node.importClause) {
- // import "mod";
- return ts.createStatement(createRequireCall(node), /*location*/ node);
- }
- else {
- var variables = [];
- if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- // import * as n from "mod";
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, createRequireCall(node)));
- }
- else {
- // import d from "mod";
- // import { x, y } from "mod";
- // import d, { x, y } from "mod";
- // import d, * as n from "mod";
- variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node),
- /*type*/ undefined, createRequireCall(node)));
- if (namespaceDeclaration && ts.isDefaultImport(node)) {
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, ts.getGeneratedNameForNode(node)));
- }
- }
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList(variables,
- /*location*/ undefined, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */),
- /*location*/ node));
- }
- }
- else if (namespaceDeclaration && ts.isDefaultImport(node)) {
- // import d, * as n from "mod";
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, ts.getGeneratedNameForNode(node),
- /*location*/ node)
- ],
- /*location*/ undefined, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)));
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Creates a `require()` call to import an external module.
- *
- * @param importNode The declararation to import.
- */
- function createRequireCall(importNode) {
- var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- var args = [];
- if (moduleName) {
- args.push(moduleName);
- }
- return ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, args);
- }
- /**
- * Visits an ImportEqualsDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitImportEqualsDeclaration(node) {
- ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
- var statements;
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(node.name, createRequireCall(node)),
- /*location*/ node));
+ if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
+ var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
+ if (externalHelpersModuleName) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements);
+ ts.append(statements, ts.createImportDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
+ ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
else {
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(node.name),
- /*type*/ undefined, createRequireCall(node))
- ],
- /*location*/ undefined,
- /*flags*/ languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */),
- /*location*/ node));
- }
- }
- else {
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node)),
- /*location*/ node));
- }
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportEqualsDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits an ExportDeclaration node.
- *
- * @param The node to visit.
- */
- function visitExportDeclaration(node) {
- if (!node.moduleSpecifier) {
- // Elide export declarations with no module specifier as they are handled
- // elsewhere.
- return undefined;
- }
- var generatedName = ts.getGeneratedNameForNode(node);
- if (node.exportClause) {
- var statements = [];
- // export { x, y } from "mod";
- if (moduleKind !== ts.ModuleKind.AMD) {
- statements.push(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(generatedName,
- /*type*/ undefined, createRequireCall(node))
- ]),
- /*location*/ node));
- }
- for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
- var specifier = _a[_i];
- var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
- statements.push(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue),
- /*location*/ specifier));
- }
- return ts.singleOrMany(statements);
- }
- else {
- // export * from "mod";
- return ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
- /*typeArguments*/ undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ]),
- /*location*/ node);
- }
- }
- /**
- * Visits an ExportAssignment node.
- *
- * @param node The node to visit.
- */
- function visitExportAssignment(node) {
- if (node.isExportEquals) {
- return undefined;
- }
- var statements;
- var original = node.original;
- if (original && hasAssociatedEndOfDeclarationMarker(original)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
- }
- else {
- statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a FunctionDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitFunctionDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createFunctionDeclaration(
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
- /*typeParameters*/ undefined, node.parameters,
- /*type*/ undefined, node.body,
- /*location*/ node),
- /*original*/ node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a ClassDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitClassDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createClassDeclaration(
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
- /*typeParameters*/ undefined, node.heritageClauses, node.members,
- /*location*/ node),
- /*original*/ node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a VariableStatement node.
- *
- * @param node The node to visit.
- */
- function visitVariableStatement(node) {
- var statements;
- var variables;
- var expressions;
- if (ts.hasModifier(node, 1 /* Export */)) {
- var modifiers = void 0;
- // If we're exporting these variables, then these just become assignments to 'exports.x'.
- // We only want to emit assignments for variables with initializers.
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var variable = _a[_i];
- if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
- if (!modifiers) {
- modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
- }
- variables = ts.append(variables, variable);
- }
- else if (variable.initializer) {
- expressions = ts.append(expressions, transformInitializedVariable(variable));
- }
- }
- if (variables) {
- statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
- }
- if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), /*location*/ node));
+ return ts.visitEachChild(node, visitor, context);
}
}
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfVariableStatement(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Transforms an exported variable with an initializer into an expression.
- *
- * @param node The node to transform.
- */
- function transformInitializedVariable(node) {
- if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node,
- /*visitor*/ undefined, context, 0 /* All */,
- /*needsValue*/ false, createExportExpression);
- }
- else {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name,
- /*location*/ node.name), node.initializer);
- }
- }
- /**
- * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
- * and transformed declaration.
- *
- * @param node The node to visit.
- */
- function visitMergeDeclarationMarker(node) {
- // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding
- // declaration we do not emit a leading variable declaration. To preserve the
- // begin/end semantics of the declararation and to properly handle exports
- // we wrapped the leading variable declaration in a `MergeDeclarationMarker`.
- //
- // To balance the declaration, add the exports of the elided variable
- // statement.
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205 /* VariableStatement */) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
- }
return node;
}
- /**
- * Determines whether a node has an associated EndOfDeclarationMarker.
- *
- * @param node The node to test.
- */
- function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
- }
- /**
- * Visits a DeclarationMarker used as a placeholder for the end of a transformed
- * declaration.
- *
- * @param node The node to visit.
- */
- function visitEndOfDeclarationMarker(node) {
- // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual
- // end of the transformed declaration. We use this marker to emit any deferred exports
- // of the declaration.
- var id = ts.getOriginalNodeId(node);
- var statements = deferredExports[id];
- if (statements) {
- delete deferredExports[id];
- return ts.append(statements, node);
- }
- return node;
- }
- /**
- * Appends the exports of an ImportDeclaration to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfImportDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- var importClause = decl.importClause;
- if (!importClause) {
- return statements;
- }
- if (importClause.name) {
- statements = appendExportsOfDeclaration(statements, importClause);
- }
- var namedBindings = importClause.namedBindings;
- if (namedBindings) {
- switch (namedBindings.kind) {
- case 237 /* NamespaceImport */:
- statements = appendExportsOfDeclaration(statements, namedBindings);
- break;
- case 238 /* NamedImports */:
- for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
- var importBinding = _a[_i];
- statements = appendExportsOfDeclaration(statements, importBinding);
- }
- break;
- }
- }
- return statements;
- }
- /**
- * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfImportEqualsDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- return appendExportsOfDeclaration(statements, decl);
- }
- /**
- * Appends the exports of a VariableStatement to a statement list, returning the statement
- * list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param node The VariableStatement whose exports are to be recorded.
- */
- function appendExportsOfVariableStatement(statements, node) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- statements = appendExportsOfBindingElement(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a VariableDeclaration or BindingElement to a statement list,
- * returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfBindingElement(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.isBindingPattern(decl.name)) {
- for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
- var element = _a[_i];
- if (!ts.isOmittedExpression(element)) {
- statements = appendExportsOfBindingElement(statements, element);
- }
- }
- }
- else if (!ts.isGeneratedIdentifier(decl.name)) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list,
- * returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfHoistedDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.hasModifier(decl, 1 /* Export */)) {
- var exportName = ts.hasModifier(decl, 512 /* Default */) ? ts.createIdentifier("default") : decl.name;
- statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), /*location*/ decl);
- }
- if (decl.name) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a declaration to a statement list, returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration to export.
- */
- function appendExportsOfDeclaration(statements, decl) {
- var name = ts.getDeclarationName(decl);
- var exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text];
- if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
- var exportSpecifier = exportSpecifiers_2[_i];
- statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name);
- }
- }
- return statements;
- }
- /**
- * Appends the down-level representation of an export to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param exportName The name of the export.
- * @param expression The expression to export.
- * @param location The location to use for source maps and comments for the export.
- * @param allowComments Whether to allow comments on the export.
- */
- function appendExportStatement(statements, exportName, expression, location, allowComments) {
- if (exportName.text === "default") {
- var sourceFile = ts.getOriginalNode(currentSourceFile, ts.isSourceFile);
- if (sourceFile && !sourceFile.symbol.exports["___esModule"]) {
- if (languageVersion === 0 /* ES3 */) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true))));
- }
- else {
- statements = ts.append(statements, ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
- /*typeArguments*/ undefined, [
- ts.createIdentifier("exports"),
- ts.createLiteral("__esModule"),
- ts.createObjectLiteral([
- ts.createPropertyAssignment("value", ts.createLiteral(true))
- ])
- ])));
- }
- }
- }
- statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
- return statements;
- }
- /**
- * Creates a call to the current file's export function to export a value.
- *
- * @param name The bound name of the export.
- * @param value The exported value.
- * @param location The location to use for source maps and comments for the export.
- * @param allowComments An optional value indicating whether to emit comments for the statement.
- */
- function createExportStatement(name, value, location, allowComments) {
- var statement = ts.createStatement(createExportExpression(name, value), location);
- ts.startOnNewLine(statement);
- if (!allowComments) {
- ts.setEmitFlags(statement, 1536 /* NoComments */);
- }
- return statement;
- }
- /**
- * Creates a call to the current file's export function to export a value.
- *
- * @param name The bound name of the export.
- * @param value The exported value.
- * @param location The location to use for source maps and comments for the export.
- */
- function createExportExpression(name, value, location) {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value, location);
- }
- //
- // Modifier Visitors
- //
- /**
- * Visit nodes to elide module-specific modifiers.
- *
- * @param node The node to visit.
- */
- function modifierVisitor(node) {
- // Elide module-specific modifiers.
+ function visitor(node) {
switch (node.kind) {
- case 83 /* ExportKeyword */:
- case 78 /* DefaultKeyword */:
+ case 236 /* ImportEqualsDeclaration */:
+ // Elide `import=` as it is not legal with --module ES6
return undefined;
+ case 242 /* ExportAssignment */:
+ return visitExportAssignment(node);
}
return node;
}
+ function visitExportAssignment(node) {
+ // Elide `export=` as it is not legal with --module ES6
+ return node.isExportEquals ? undefined : node;
+ }
//
// Emit Notification
//
/**
- * Hook for node emit notifications.
+ * Hook for node emit.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261 /* SourceFile */) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (ts.isSourceFile(node)) {
currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
- noSubstitution = ts.createMap();
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
- currentModuleInfo = undefined;
- noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -56617,191 +61089,27 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
- * @param node The node to substitute.
- */
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (node.id && noSubstitution[node.id]) {
- return node;
- }
- if (emitContext === 1 /* Expression */) {
- return substituteExpression(node);
- }
- else if (ts.isShorthandPropertyAssignment(node)) {
- return substituteShorthandPropertyAssignment(node);
- }
- return node;
- }
- /**
- * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported
- * or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteShorthandPropertyAssignment(node) {
- var name = node.name;
- var exportedOrImportedName = substituteExpressionIdentifier(name);
- if (exportedOrImportedName !== name) {
- // A shorthand property with an assignment initializer is probably part of a
- // destructuring assignment
- if (node.objectAssignmentInitializer) {
- var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name, initializer, /*location*/ node);
- }
- return ts.createPropertyAssignment(name, exportedOrImportedName, /*location*/ node);
- }
- return node;
- }
- /**
- * Substitution for an Expression that may contain an imported or exported symbol.
- *
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function substituteExpression(node) {
- switch (node.kind) {
- case 70 /* Identifier */:
- return substituteExpressionIdentifier(node);
- case 192 /* BinaryExpression */:
- return substituteBinaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
- case 190 /* PrefixUnaryExpression */:
- return substituteUnaryExpression(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isIdentifier(node) && hint === 1 /* Expression */) {
+ return substituteExpressionIdentifier(node);
}
return node;
}
- /**
- * Substitution for an Identifier expression that may contain an imported or exported
- * symbol.
- *
- * @param node The node to substitute.
- */
function substituteExpressionIdentifier(node) {
if (ts.getEmitFlags(node) & 4096 /* HelperName */) {
var externalHelpersModuleName = ts.getExternalHelpersModuleName(currentSourceFile);
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
- return node;
- }
- if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
- var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
- if (exportContainer && exportContainer.kind === 261 /* SourceFile */) {
- return ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node),
- /*location*/ node);
- }
- var importDeclaration = resolver.getReferencedImportDeclaration(node);
- if (importDeclaration) {
- if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"),
- /*location*/ node);
- }
- else if (ts.isImportSpecifier(importDeclaration)) {
- var name_37 = importDeclaration.propertyName || importDeclaration.name;
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name_37),
- /*location*/ node);
- }
- }
- }
- return node;
- }
- /**
- * Substitution for a BinaryExpression that may contain an imported or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteBinaryExpression(node) {
- // When we see an assignment expression whose left-hand side is an exported symbol,
- // we should ensure all exports of that symbol are updated with the correct value.
- //
- // - We do not substitute generated identifiers for any reason.
- // - We do not substitute identifiers tagged with the LocalName flag.
- // - We do not substitute identifiers that were originally the name of an enum or
- // namespace due to how they are transformed in TypeScript.
- // - We only substitute identifiers that are exported at the top level.
- if (ts.isAssignmentOperator(node.operatorToken.kind)
- && ts.isIdentifier(node.left)
- && !ts.isGeneratedIdentifier(node.left)
- && !ts.isLocalName(node.left)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
- var exportedNames = getExports(node.left);
- if (exportedNames) {
- // For each additional export of the declaration, apply an export assignment.
- var expression = node;
- for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
- var exportName = exportedNames_3[_i];
- // Mark the node to prevent triggering this rule again.
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression, /*location*/ node);
- }
- return expression;
- }
- }
- return node;
- }
- /**
- * Substitution for a UnaryExpression that may contain an imported or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteUnaryExpression(node) {
- // When we see a prefix or postfix increment expression whose operand is an exported
- // symbol, we should ensure all exports of that symbol are updated with the correct
- // value.
- //
- // - We do not substitute generated identifiers for any reason.
- // - We do not substitute identifiers tagged with the LocalName flag.
- // - We do not substitute identifiers that were originally the name of an enum or
- // namespace due to how they are transformed in TypeScript.
- // - We only substitute identifiers that are exported at the top level.
- if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */)
- && ts.isIdentifier(node.operand)
- && !ts.isGeneratedIdentifier(node.operand)
- && !ts.isLocalName(node.operand)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
- var exportedNames = getExports(node.operand);
- if (exportedNames) {
- var expression = node.kind === 191 /* PostfixUnaryExpression */
- ? ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1),
- /*location*/ node)
- : node;
- for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
- var exportName = exportedNames_4[_i];
- // Mark the node to prevent triggering this rule again.
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression);
- }
- return expression;
- }
}
return node;
}
- /**
- * Gets the additional exports of a name.
- *
- * @param name The name.
- */
- function getExports(name) {
- if (!ts.isGeneratedIdentifier(name)) {
- var valueDeclaration = resolver.getReferencedImportDeclaration(name)
- || resolver.getReferencedValueDeclaration(name);
- if (valueDeclaration) {
- return currentModuleInfo
- && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
- }
- }
- }
- var _a;
}
- ts.transformModule = transformModule;
- // emit output for the __export helper function
- var exportStarHelper = {
- name: "typescript:export-star",
- scoped: true,
- text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
- };
- // emit output for the UMD helper function.
- var umdHelper = "\n (function (dependencies, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(dependencies, factory);\n }\n })";
+ ts.transformES2015Module = transformES2015Module;
})(ts || (ts = {}));
/// <reference path="visitor.ts" />
/// <reference path="transformers/ts.ts" />
@@ -56818,24 +61126,34 @@ var ts;
/* @internal */
var ts;
(function (ts) {
- var moduleTransformerMap = ts.createMap((_a = {},
- _a[ts.ModuleKind.ES2015] = ts.transformES2015Module,
- _a[ts.ModuleKind.System] = ts.transformSystemModule,
- _a[ts.ModuleKind.AMD] = ts.transformModule,
- _a[ts.ModuleKind.CommonJS] = ts.transformModule,
- _a[ts.ModuleKind.UMD] = ts.transformModule,
- _a[ts.ModuleKind.None] = ts.transformModule,
- _a));
+ function getModuleTransformer(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.ES2015:
+ return ts.transformES2015Module;
+ case ts.ModuleKind.System:
+ return ts.transformSystemModule;
+ default:
+ return ts.transformModule;
+ }
+ }
+ var TransformationState;
+ (function (TransformationState) {
+ TransformationState[TransformationState["Uninitialized"] = 0] = "Uninitialized";
+ TransformationState[TransformationState["Initialized"] = 1] = "Initialized";
+ TransformationState[TransformationState["Completed"] = 2] = "Completed";
+ TransformationState[TransformationState["Disposed"] = 3] = "Disposed";
+ })(TransformationState || (TransformationState = {}));
var SyntaxKindFeatureFlags;
(function (SyntaxKindFeatureFlags) {
SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["Substitution"] = 1] = "Substitution";
SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["EmitNotifications"] = 2] = "EmitNotifications";
})(SyntaxKindFeatureFlags || (SyntaxKindFeatureFlags = {}));
- function getTransformers(compilerOptions) {
+ function getTransformers(compilerOptions, customTransformers) {
var jsx = compilerOptions.jsx;
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var transformers = [];
+ ts.addRange(transformers, customTransformers && customTransformers.before);
transformers.push(ts.transformTypeScript);
if (jsx === 2 /* React */) {
transformers.push(ts.transformJsx);
@@ -56853,12 +61171,13 @@ var ts;
transformers.push(ts.transformES2015);
transformers.push(ts.transformGenerators);
}
- transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ts.ModuleKind.None]);
+ transformers.push(getModuleTransformer(moduleKind));
// The ES5 transformer is last so that it can substitute expressions like `exports.default`
// for ES3.
if (languageVersion < 1 /* ES5 */) {
transformers.push(ts.transformES5);
}
+ ts.addRange(transformers, customTransformers && customTransformers.after);
return transformers;
}
ts.getTransformers = getTransformers;
@@ -56866,13 +61185,14 @@ var ts;
* Transforms an array of SourceFiles by passing them through each transformer.
*
* @param resolver The emit resolver provided by the checker.
- * @param host The emit host.
- * @param sourceFiles An array of source files
- * @param transforms An array of Transformers.
+ * @param host The emit host object used to interact with the file system.
+ * @param options Compiler options to surface in the `TransformationContext`.
+ * @param nodes An array of nodes to transform.
+ * @param transforms An array of `TransformerFactory` callbacks.
+ * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files.
*/
- function transformFiles(resolver, host, sourceFiles, transformers) {
+ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
var enabledSyntaxKindFeatures = new Array(298 /* Count */);
- var lexicalEnvironmentDisabled = false;
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -56880,10 +61200,13 @@ var ts;
var lexicalEnvironmentStackOffset = 0;
var lexicalEnvironmentSuspended = false;
var emitHelpers;
+ var onSubstituteNode = function (_, node) { return node; };
+ var onEmitNode = function (hint, node, callback) { return callback(hint, node); };
+ var state = 0 /* Uninitialized */;
// The transformation context is provided to each transformer as part of transformer
// initialization.
var context = {
- getCompilerOptions: function () { return host.getCompilerOptions(); },
+ getCompilerOptions: function () { return options; },
getEmitResolver: function () { return resolver; },
getEmitHost: function () { return host; },
startLexicalEnvironment: startLexicalEnvironment,
@@ -56894,39 +61217,53 @@ var ts;
hoistFunctionDeclaration: hoistFunctionDeclaration,
requestEmitHelper: requestEmitHelper,
readEmitHelpers: readEmitHelpers,
- onSubstituteNode: function (_emitContext, node) { return node; },
enableSubstitution: enableSubstitution,
- isSubstitutionEnabled: isSubstitutionEnabled,
- onEmitNode: function (node, emitContext, emitCallback) { return emitCallback(node, emitContext); },
enableEmitNotification: enableEmitNotification,
- isEmitNotificationEnabled: isEmitNotificationEnabled
+ isSubstitutionEnabled: isSubstitutionEnabled,
+ isEmitNotificationEnabled: isEmitNotificationEnabled,
+ get onSubstituteNode() { return onSubstituteNode; },
+ set onSubstituteNode(value) {
+ ts.Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onSubstituteNode = value;
+ },
+ get onEmitNode() { return onEmitNode; },
+ set onEmitNode(value) {
+ ts.Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onEmitNode = value;
+ }
};
+ // Ensure the parse tree is clean before applying transformations
+ for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
+ var node = nodes_4[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ ts.performance.mark("beforeTransform");
// Chain together and initialize each transformer.
var transformation = ts.chain.apply(void 0, transformers)(context);
- // Transform each source file.
- var transformed = ts.map(sourceFiles, transformSourceFile);
- // Disable modification of the lexical environment.
- lexicalEnvironmentDisabled = true;
+ // prevent modification of transformation hooks.
+ state = 1 /* Initialized */;
+ // Transform each node.
+ var transformed = ts.map(nodes, allowDtsFiles ? transformation : transformRoot);
+ // prevent modification of the lexical environment.
+ state = 2 /* Completed */;
+ ts.performance.mark("afterTransform");
+ ts.performance.measure("transformTime", "beforeTransform", "afterTransform");
return {
transformed: transformed,
- emitNodeWithSubstitution: emitNodeWithSubstitution,
- emitNodeWithNotification: emitNodeWithNotification
+ substituteNode: substituteNode,
+ emitNodeWithNotification: emitNodeWithNotification,
+ dispose: dispose
};
- /**
- * Transforms a source file.
- *
- * @param sourceFile The source file to transform.
- */
- function transformSourceFile(sourceFile) {
- if (ts.isDeclarationFile(sourceFile)) {
- return sourceFile;
- }
- return transformation(sourceFile);
+ function transformRoot(node) {
+ return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
}
/**
* Enables expression substitutions in the pretty printer for the provided SyntaxKind.
*/
function enableSubstitution(kind) {
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 1 /* Substitution */;
}
/**
@@ -56939,26 +61276,19 @@ var ts;
/**
* Emits a node with possible substitution.
*
- * @param emitContext The current emit context.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node or its substitute.
*/
- function emitNodeWithSubstitution(emitContext, node, emitCallback) {
- if (node) {
- if (isSubstitutionEnabled(node)) {
- var substitute = context.onSubstituteNode(emitContext, node);
- if (substitute && substitute !== node) {
- emitCallback(emitContext, substitute);
- return;
- }
- }
- emitCallback(emitContext, node);
- }
+ function substituteNode(hint, node) {
+ ts.Debug.assert(state < 3 /* Disposed */, "Cannot substitute a node after the result is disposed.");
+ return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
}
/**
* Enables before/after emit notifications in the pretty printer for the provided SyntaxKind.
*/
function enableEmitNotification(kind) {
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;
}
/**
@@ -56972,17 +61302,18 @@ var ts;
/**
* Emits a node with possible emit notification.
*
- * @param emitContext The current emit context.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node.
*/
- function emitNodeWithNotification(emitContext, node, emitCallback) {
+ function emitNodeWithNotification(hint, node, emitCallback) {
+ ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed.");
if (node) {
if (isEmitNotificationEnabled(node)) {
- context.onEmitNode(emitContext, node, emitCallback);
+ onEmitNode(hint, node, emitCallback);
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
}
}
@@ -56990,7 +61321,8 @@ var ts;
* Records a hoisted variable declaration for the provided name within a lexical environment.
*/
function hoistVariableDeclaration(name) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
var decl = ts.createVariableDeclaration(name);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
@@ -57003,7 +61335,8 @@ var ts;
* Records a hoisted function declaration within a lexical environment.
*/
function hoistFunctionDeclaration(func) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -57016,7 +61349,8 @@ var ts;
* are pushed onto a stack, and the related storage variables are reset.
*/
function startLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot start a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
// Save the current lexical environment. Rather than resizing the array we adjust the
// stack size variable. This allows us to reuse existing array slots we've
@@ -57030,13 +61364,15 @@ var ts;
}
/** Suspends the current lexical environment, usually after visiting a parameter list. */
function suspendLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot suspend a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended.");
lexicalEnvironmentSuspended = true;
}
/** Resumes a suspended lexical environment, usually before visiting a function body. */
function resumeLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot resume a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended.");
lexicalEnvironmentSuspended = false;
}
@@ -57045,7 +61381,8 @@ var ts;
* any hoisted declarations added in this environment are returned.
*/
function endLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot end a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
var statements;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
@@ -57074,19 +61411,39 @@ var ts;
return statements;
}
function requestEmitHelper(helper) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper.");
emitHelpers = ts.append(emitHelpers, helper);
}
function readEmitHelpers() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
var helpers = emitHelpers;
emitHelpers = undefined;
return helpers;
}
- }
- ts.transformFiles = transformFiles;
- var _a;
+ function dispose() {
+ if (state < 3 /* Disposed */) {
+ // Clean up emit nodes on parse tree
+ for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
+ var node = nodes_5[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ // Release references to external entries for GC purposes.
+ lexicalEnvironmentVariableDeclarations = undefined;
+ lexicalEnvironmentVariableDeclarationsStack = undefined;
+ lexicalEnvironmentFunctionDeclarations = undefined;
+ lexicalEnvironmentFunctionDeclarationsStack = undefined;
+ onSubstituteNode = undefined;
+ onEmitNode = undefined;
+ emitHelpers = undefined;
+ // Prevent further use of the transformation result.
+ state = 3 /* Disposed */;
+ }
+ }
+ }
+ ts.transformNodes = transformNodes;
})(ts || (ts = {}));
/// <reference path="checker.ts"/>
/* @internal */
@@ -57131,10 +61488,9 @@ var ts;
*
* @param filePath The path to the generated output file.
* @param sourceMapFilePath The path to the output source map file.
- * @param sourceFiles The input source files for the program.
- * @param isBundledEmit A value indicating whether the generated output file is a bundle.
+ * @param sourceFileOrBundle The input source file or bundle for the program.
*/
- function initialize(filePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
+ function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
}
@@ -57170,11 +61526,10 @@ var ts;
}
if (compilerOptions.mapRoot) {
sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
- if (!isBundledEmit) {
- ts.Debug.assert(sourceFiles.length === 1);
+ if (sourceFileOrBundle.kind === 264 /* SourceFile */) {
// For modules or multiple emit files the mapRoot will have directory structure like the sources
// So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map
- sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir));
+ sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir));
}
if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
// The relative paths are relative to the common directory
@@ -57297,31 +61652,32 @@ var ts;
/**
* Emits a node with possible leading and trailing source maps.
*
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node.
*/
- function emitNodeWithSourceMap(emitContext, node, emitCallback) {
+ function emitNodeWithSourceMap(hint, node, emitCallback) {
if (disabled) {
- return emitCallback(emitContext, node);
+ return emitCallback(hint, node);
}
if (node) {
var emitNode = node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end;
- if (node.kind !== 293 /* NotEmittedStatement */
+ if (node.kind !== 294 /* NotEmittedStatement */
&& (emitFlags & 16 /* NoLeadingSourceMap */) === 0
&& pos >= 0) {
emitPos(ts.skipTrivia(currentSourceText, pos));
}
if (emitFlags & 64 /* NoNestedSourceMaps */) {
disabled = true;
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
disabled = false;
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
- if (node.kind !== 293 /* NotEmittedStatement */
+ if (node.kind !== 294 /* NotEmittedStatement */
&& (emitFlags & 32 /* NoTrailingSourceMap */) === 0
&& end >= 0) {
emitPos(end);
@@ -57391,7 +61747,7 @@ var ts;
return;
}
encodeLastRecordedSourceMapSpan();
- return ts.stringify({
+ return JSON.stringify({
version: 3,
file: sourceMapData.sourceMapFile,
sourceRoot: sourceMapData.sourceMapSourceRoot,
@@ -57456,11 +61812,10 @@ var ts;
/* @internal */
var ts;
(function (ts) {
- function createCommentWriter(host, writer, sourceMap) {
- var compilerOptions = host.getCompilerOptions();
- var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var newLine = host.getNewLine();
- var emitPos = sourceMap.emitPos;
+ function createCommentWriter(printerOptions, emitPos) {
+ var extendedDiagnostics = printerOptions.extendedDiagnostics;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var writer;
var containerPos = -1;
var containerEnd = -1;
var declarationListContainerEnd = -1;
@@ -57469,38 +61824,35 @@ var ts;
var currentLineMap;
var detachedCommentsInfo;
var hasWrittenComment = false;
- var disabled = compilerOptions.removeComments;
+ var disabled = printerOptions.removeComments;
return {
reset: reset,
+ setWriter: setWriter,
setSourceFile: setSourceFile,
emitNodeWithComments: emitNodeWithComments,
emitBodyWithDetachedComments: emitBodyWithDetachedComments,
emitTrailingCommentsOfPosition: emitTrailingCommentsOfPosition,
+ emitLeadingCommentsOfPosition: emitLeadingCommentsOfPosition,
};
- function emitNodeWithComments(emitContext, node, emitCallback) {
+ function emitNodeWithComments(hint, node, emitCallback) {
if (disabled) {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
return;
}
if (node) {
- var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
- var emitFlags = ts.getEmitFlags(node);
+ hasWrittenComment = false;
+ var emitNode = node.emitNode;
+ var emitFlags = emitNode && emitNode.flags;
+ var _a = emitNode && emitNode.commentRange || node, pos = _a.pos, end = _a.end;
if ((pos < 0 && end < 0) || (pos === end)) {
// Both pos and end are synthesized, so just emit the node without comments.
- if (emitFlags & 2048 /* NoNestedComments */) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
}
else {
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 293 /* NotEmittedStatement */;
+ var isEmittedNode = node.kind !== 294 /* NotEmittedStatement */;
var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0;
var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0;
// Emit leading comments if the position is not synthesized and the node
@@ -57519,23 +61871,16 @@ var ts;
containerEnd = end;
// To avoid invalid comment emit in a down-level binding pattern, we
// keep track of the last declaration list container's end
- if (node.kind === 224 /* VariableDeclarationList */) {
+ if (node.kind === 226 /* VariableDeclarationList */) {
declarationListContainerEnd = end;
}
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "preEmitNodeWithComment");
}
- if (emitFlags & 2048 /* NoNestedComments */) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
if (extendedDiagnostics) {
- ts.performance.mark("beginEmitNodeWithComment");
+ ts.performance.mark("postEmitNodeWithComment");
}
// Restore previous container state.
containerPos = savedContainerPos;
@@ -57547,11 +61892,75 @@ var ts;
emitTrailingComments(end);
}
if (extendedDiagnostics) {
- ts.performance.measure("commentTime", "beginEmitNodeWithComment");
+ ts.performance.measure("commentTime", "postEmitNodeWithComment");
}
}
}
}
+ function emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback) {
+ var leadingComments = emitNode && emitNode.leadingComments;
+ if (ts.some(leadingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("preEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(leadingComments, emitLeadingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "preEmitNodeWithSynthesizedComments");
+ }
+ }
+ emitNodeWithNestedComments(hint, node, emitFlags, emitCallback);
+ var trailingComments = emitNode && emitNode.trailingComments;
+ if (ts.some(trailingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("postEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(trailingComments, emitTrailingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "postEmitNodeWithSynthesizedComments");
+ }
+ }
+ }
+ function emitLeadingSynthesizedComment(comment) {
+ if (comment.kind === 2 /* SingleLineCommentTrivia */) {
+ writer.writeLine();
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine || comment.kind === 2 /* SingleLineCommentTrivia */) {
+ writer.writeLine();
+ }
+ else {
+ writer.write(" ");
+ }
+ }
+ function emitTrailingSynthesizedComment(comment) {
+ if (!writer.isAtStartOfLine()) {
+ writer.write(" ");
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine) {
+ writer.writeLine();
+ }
+ }
+ function writeSynthesizedComment(comment) {
+ var text = formatSynthesizedComment(comment);
+ var lineMap = comment.kind === 3 /* MultiLineCommentTrivia */ ? ts.computeLineStarts(text) : undefined;
+ ts.writeCommentRange(text, lineMap, writer, 0, text.length, newLine);
+ }
+ function formatSynthesizedComment(comment) {
+ return comment.kind === 3 /* MultiLineCommentTrivia */
+ ? "/*" + comment.text + "*/"
+ : "//" + comment.text;
+ }
+ function emitNodeWithNestedComments(hint, node, emitFlags, emitCallback) {
+ if (emitFlags & 2048 /* NoNestedComments */) {
+ disabled = true;
+ emitCallback(hint, node);
+ disabled = false;
+ }
+ else {
+ emitCallback(hint, node);
+ }
+ }
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
if (extendedDiagnostics) {
ts.performance.mark("preEmitBodyWithDetachedComments");
@@ -57579,6 +61988,9 @@ var ts;
}
if (!skipTrailingComments) {
emitLeadingComments(detachedRange.end, /*isEmittedNode*/ true);
+ if (hasWrittenComment && !writer.isAtStartOfLine()) {
+ writer.writeLine();
+ }
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "beginEmitBodyWithDetachedCommetns");
@@ -57612,9 +62024,11 @@ var ts;
hasWrittenComment = true;
}
// Leading comments are emitted at /*leading comment1 */space/*leading comment*/space
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57622,6 +62036,12 @@ var ts;
writer.write(" ");
}
}
+ function emitLeadingCommentsOfPosition(pos) {
+ if (disabled || pos === -1) {
+ return;
+ }
+ emitLeadingComments(pos, /*isEmittedNode*/ true);
+ }
function emitTrailingComments(pos) {
forEachTrailingCommentToEmit(pos, emitTrailingComment);
}
@@ -57630,9 +62050,11 @@ var ts;
if (!writer.isAtStartOfLine()) {
writer.write(" ");
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57651,9 +62073,11 @@ var ts;
}
function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
// trailing comments of a position are emitted at /*trailing comment1 */space/*trailing comment*/space
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57684,6 +62108,9 @@ var ts;
currentLineMap = undefined;
detachedCommentsInfo = undefined;
}
+ function setWriter(output) {
+ writer = output;
+ }
function setSourceFile(sourceFile) {
currentSourceFile = sourceFile;
currentText = currentSourceFile.text;
@@ -57716,15 +62143,17 @@ var ts;
}
}
function writeComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
}
/**
* Determine if the given comment is a triple-slash
*
* @return true if the comment is a triple-slash comment else false
- **/
+ */
function isTripleSlashComment(commentPos, commentEnd) {
// Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text
// so that we don't end up computing comment string and doing match for all // comments
@@ -57747,15 +62176,17 @@ var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
- ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
+ ts.forEachEmittedFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
- function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
+ function getDeclarationDiagnosticsFromFile(_a, sourceFileOrBundle) {
var declarationFilePath = _a.declarationFilePath;
- emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit, /*emitOnlyDtsFiles*/ false);
+ emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sourceFileOrBundle, /*emitOnlyDtsFiles*/ false);
}
}
ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
- function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles) {
+ function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
+ var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */;
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
@@ -57829,7 +62260,7 @@ var ts;
var oldWriter = writer;
ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
- ts.Debug.assert(aliasEmitInfo.node.kind === 235 /* ImportDeclaration */);
+ ts.Debug.assert(aliasEmitInfo.node.kind === 237 /* ImportDeclaration */);
createAndSetNewTextWriterWithSymbolWriter();
ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit));
for (var i = 0; i < aliasEmitInfo.indent; i++) {
@@ -57855,9 +62286,9 @@ var ts;
}
});
if (usedTypeDirectiveReferences) {
- for (var directive in usedTypeDirectiveReferences) {
+ ts.forEachKey(usedTypeDirectiveReferences, function (directive) {
referencesOutput += "/// <reference types=\"" + directive + "\" />" + newLine;
- }
+ });
}
return {
reportedDeclarationError: reportedDeclarationError,
@@ -57882,12 +62313,14 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
+ writer.reportIllegalExtends = reportIllegalExtends;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
writer.writeSpace = writer.write;
writer.writeStringLiteral = writer.writeLiteral;
writer.writeParameter = writer.write;
+ writer.writeProperty = writer.write;
writer.writeSymbol = writer.write;
setWriter(writer);
}
@@ -57903,10 +62336,10 @@ var ts;
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
- if (declaration.kind === 223 /* VariableDeclaration */) {
+ if (declaration.kind === 225 /* VariableDeclaration */) {
nodeToCheck = declaration.parent.parent;
}
- else if (declaration.kind === 238 /* NamedImports */ || declaration.kind === 239 /* ImportSpecifier */ || declaration.kind === 236 /* ImportClause */) {
+ else if (declaration.kind === 240 /* NamedImports */ || declaration.kind === 241 /* ImportSpecifier */ || declaration.kind === 238 /* ImportClause */) {
ts.Debug.fail("We should be getting ImportDeclaration instead to write");
}
else {
@@ -57924,7 +62357,7 @@ var ts;
// Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing,
// we would write alias foo declaration when we visit it since it would now be marked as visible
if (moduleElementEmitInfo) {
- if (moduleElementEmitInfo.node.kind === 235 /* ImportDeclaration */) {
+ if (moduleElementEmitInfo.node.kind === 237 /* ImportDeclaration */) {
// we have to create asynchronous output only after we have collected complete information
// because it is possible to enable multiple bindings as asynchronously visible
moduleElementEmitInfo.isVisible = true;
@@ -57934,12 +62367,12 @@ var ts;
for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
increaseIndent();
}
- if (nodeToCheck.kind === 230 /* ModuleDeclaration */) {
+ if (nodeToCheck.kind === 232 /* ModuleDeclaration */) {
ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
asynchronousSubModuleDeclarationEmitInfo = [];
}
writeModuleElement(nodeToCheck);
- if (nodeToCheck.kind === 230 /* ModuleDeclaration */) {
+ if (nodeToCheck.kind === 232 /* ModuleDeclaration */) {
moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
asynchronousSubModuleDeclarationEmitInfo = undefined;
}
@@ -57958,8 +62391,8 @@ var ts;
}
for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) {
var directive = typeReferenceDirectives_1[_i];
- if (!(directive in usedTypeDirectiveReferences)) {
- usedTypeDirectiveReferences[directive] = directive;
+ if (!usedTypeDirectiveReferences.has(directive)) {
+ usedTypeDirectiveReferences.set(directive, directive);
}
}
}
@@ -57988,6 +62421,12 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
+ function reportIllegalExtends() {
+ if (errorNameNode) {
+ reportedDeclarationError = true;
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, ts.declarationNameToString(errorNameNode)));
+ }
+ }
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
@@ -57997,13 +62436,19 @@ var ts;
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
- if (type) {
+ // use the checker's type, not the declared type,
+ // for non-optional initialized parameters that aren't a parameter property
+ var shouldUseResolverType = declaration.kind === 145 /* Parameter */ &&
+ resolver.isRequiredInitializedParameter(declaration);
+ if (type && !shouldUseResolverType) {
// Write the type
emitType(type);
}
else {
errorNameNode = declaration.name;
- resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ var format = 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */ |
+ (shouldUseResolverType ? 4096 /* AddUndefined */ : 0);
+ resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
}
@@ -58021,15 +62466,15 @@ var ts;
}
}
function emitLines(nodes) {
- for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
- var node = nodes_4[_i];
+ for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) {
+ var node = nodes_6[_i];
emit(node);
}
}
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
- for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
- var node = nodes_5[_i];
+ for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
+ var node = nodes_7[_i];
if (!canEmitFn || canEmitFn(node)) {
if (currentWriterPos !== writer.getTextPos()) {
write(separator);
@@ -58057,49 +62502,50 @@ var ts;
function emitType(type) {
switch (type.kind) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 129 /* NeverKeyword */:
- case 167 /* ThisType */:
- case 171 /* LiteralType */:
+ case 168 /* ThisType */:
+ case 172 /* LiteralType */:
return writeTextOfNode(currentText, type);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return emitExpressionWithTypeArguments(type);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return emitTypeReference(type);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return emitTypeQuery(type);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return emitArrayType(type);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return emitTupleType(type);
- case 164 /* UnionType */:
+ case 165 /* UnionType */:
return emitUnionType(type);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return emitIntersectionType(type);
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return emitParenType(type);
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return emitTypeOperator(type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return emitIndexedAccessType(type);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return emitMappedType(type);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return emitSignatureDeclarationWithJsDocComments(type);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return emitTypeLiteral(type);
case 70 /* Identifier */:
return emitEntityName(type);
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return emitEntityName(type);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return emitTypePredicate(type);
}
function writeEntityName(entityName) {
@@ -58107,8 +62553,8 @@ var ts;
writeTextOfNode(currentText, entityName);
}
else {
- var left = entityName.kind === 141 /* QualifiedName */ ? entityName.left : entityName.expression;
- var right = entityName.kind === 141 /* QualifiedName */ ? entityName.right : entityName.name;
+ var left = entityName.kind === 142 /* QualifiedName */ ? entityName.left : entityName.expression;
+ var right = entityName.kind === 142 /* QualifiedName */ ? entityName.right : entityName.name;
writeEntityName(left);
write(".");
writeTextOfNode(currentText, right);
@@ -58117,14 +62563,14 @@ var ts;
function emitEntityName(entityName) {
var visibilityResult = resolver.isEntityNameVisible(entityName,
// Aliases can be written asynchronously so use correct enclosing declaration
- entityName.parent.kind === 234 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration);
+ entityName.parent.kind === 236 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeEntityName(entityName);
}
function emitExpressionWithTypeArguments(node) {
if (ts.isEntityNameExpression(node.expression)) {
- ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 177 /* PropertyAccessExpression */);
+ ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 178 /* PropertyAccessExpression */);
emitEntityName(node.expression);
if (node.typeArguments) {
write("<");
@@ -58224,7 +62670,7 @@ var ts;
currentIdentifiers = node.identifiers;
isCurrentFileExternalModule = ts.isExternalModule(node);
enclosingDeclaration = node;
- ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true /* remove comments */);
+ ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComents*/ true);
emitLines(node.statements);
}
// Return a temp variable name to be used in `export default` statements.
@@ -58233,15 +62679,15 @@ var ts;
// do not need to keep track of created temp names.
function getExportDefaultTempVariableName() {
var baseName = "_default";
- if (!(baseName in currentIdentifiers)) {
+ if (!currentIdentifiers.has(baseName)) {
return baseName;
}
var count = 0;
while (true) {
count++;
- var name_38 = baseName + "_" + count;
- if (!(name_38 in currentIdentifiers)) {
- return name_38;
+ var name = baseName + "_" + count;
+ if (!currentIdentifiers.has(name)) {
+ return name;
}
}
}
@@ -58288,10 +62734,10 @@ var ts;
if (isModuleElementVisible) {
writeModuleElement(node);
}
- else if (node.kind === 234 /* ImportEqualsDeclaration */ ||
- (node.parent.kind === 261 /* SourceFile */ && isCurrentFileExternalModule)) {
+ else if (node.kind === 236 /* ImportEqualsDeclaration */ ||
+ (node.parent.kind === 264 /* SourceFile */ && isCurrentFileExternalModule)) {
var isVisible = void 0;
- if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 261 /* SourceFile */) {
+ if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264 /* SourceFile */) {
// Import declaration of another module that is visited async so lets put it in right spot
asynchronousSubModuleDeclarationEmitInfo.push({
node: node,
@@ -58301,7 +62747,7 @@ var ts;
});
}
else {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
var importDeclaration = node;
if (importDeclaration.importClause) {
isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
@@ -58319,23 +62765,23 @@ var ts;
}
function writeModuleElement(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return writeFunctionDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return writeVariableStatement(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return writeInterfaceDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return writeClassDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return writeTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return writeEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return writeModuleDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return writeImportEqualsDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return writeImportDeclaration(node);
default:
ts.Debug.fail("Unknown symbol kind");
@@ -58343,7 +62789,7 @@ var ts;
}
function emitModuleElementDeclarationFlags(node) {
// If the node is parented in the current source file we need to emit export declare or just export
- if (node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 264 /* SourceFile */) {
var modifiers = ts.getModifierFlags(node);
// If the node is exported
if (modifiers & 1 /* Export */) {
@@ -58352,7 +62798,7 @@ var ts;
if (modifiers & 512 /* Default */) {
write("default ");
}
- else if (node.kind !== 227 /* InterfaceDeclaration */ && !noDeclare) {
+ else if (node.kind !== 229 /* InterfaceDeclaration */ && !noDeclare) {
write("declare ");
}
}
@@ -58404,7 +62850,7 @@ var ts;
}
function isVisibleNamedBinding(namedBindings) {
if (namedBindings) {
- if (namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings.kind === 239 /* NamespaceImport */) {
return resolver.isDeclarationVisible(namedBindings);
}
else {
@@ -58428,7 +62874,7 @@ var ts;
// If the default binding was emitted, write the separated
write(", ");
}
- if (node.importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (node.importClause.namedBindings.kind === 239 /* NamespaceImport */) {
write("* as ");
writeTextOfNode(currentText, node.importClause.namedBindings.name);
}
@@ -58449,13 +62895,13 @@ var ts;
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
// external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}'
// so compiler will treat them as external modules.
- resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 230 /* ModuleDeclaration */;
+ resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232 /* ModuleDeclaration */;
var moduleSpecifier;
- if (parent.kind === 234 /* ImportEqualsDeclaration */) {
+ if (parent.kind === 236 /* ImportEqualsDeclaration */) {
var node = parent;
moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node);
}
- else if (parent.kind === 230 /* ModuleDeclaration */) {
+ else if (parent.kind === 232 /* ModuleDeclaration */) {
moduleSpecifier = parent.name;
}
else {
@@ -58525,7 +62971,7 @@ var ts;
writeTextOfNode(currentText, node.name);
}
}
- while (node.body && node.body.kind !== 231 /* ModuleBlock */) {
+ while (node.body && node.body.kind !== 233 /* ModuleBlock */) {
node = node.body;
write(".");
writeTextOfNode(currentText, node.name);
@@ -58595,7 +63041,7 @@ var ts;
writeLine();
}
function isPrivateMethodTypeParameter(node) {
- return node.parent.kind === 149 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */);
+ return node.parent.kind === 150 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */);
}
function emitTypeParameters(typeParameters) {
function emitTypeParameter(node) {
@@ -58606,53 +63052,70 @@ var ts;
// If there is constraint present and this is not a type parameter of the private method emit the constraint
if (node.constraint && !isPrivateMethodTypeParameter(node)) {
write(" extends ");
- if (node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- (node.parent.parent && node.parent.parent.kind === 161 /* TypeLiteral */)) {
- ts.Debug.assert(node.parent.kind === 149 /* MethodDeclaration */ ||
- node.parent.kind === 148 /* MethodSignature */ ||
- node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- node.parent.kind === 153 /* CallSignature */ ||
- node.parent.kind === 154 /* ConstructSignature */);
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) {
+ ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ ||
+ node.parent.kind === 149 /* MethodSignature */ ||
+ node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.kind === 154 /* CallSignature */ ||
+ node.parent.kind === 155 /* ConstructSignature */);
emitType(node.constraint);
}
else {
emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
}
}
+ if (node.default && !isPrivateMethodTypeParameter(node)) {
+ write(" = ");
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) {
+ ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ ||
+ node.parent.kind === 149 /* MethodSignature */ ||
+ node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.kind === 154 /* CallSignature */ ||
+ node.parent.kind === 155 /* ConstructSignature */);
+ emitType(node.default);
+ }
+ else {
+ emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError);
+ }
+ }
function getTypeParameterConstraintVisibilityError() {
// Type parameter constraints are named by user so we should always be able to name it
var diagnosticMessage;
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node.parent, 32 /* Static */)) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
}
else {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;
default:
@@ -58671,7 +63134,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(typeReferences, isImplementsList) {
+ function emitHeritageClause(className, typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -58685,20 +63148,22 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
+ errorNameNode = className;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ errorNameNode = undefined;
}
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
// Heritage clause is written by user so it can always be named
- if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
// Class or Interface implemented/extended is inaccessible
diagnosticMessage = isImplementsList ?
ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
- ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
+ ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
}
else {
// interface is inaccessible
- diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
+ diagnosticMessage = ts.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
}
return {
diagnosticMessage: diagnosticMessage,
@@ -58730,9 +63195,10 @@ var ts;
emitTypeParameters(node.typeParameters);
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- emitHeritageClause([baseTypeNode], /*isImplementsList*/ false);
+ node.name;
+ emitHeritageClause(node.name, [baseTypeNode], /*isImplementsList*/ false);
}
- emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
+ emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
write(" {");
writeLine();
increaseIndent();
@@ -58753,7 +63219,7 @@ var ts;
emitTypeParameters(node.typeParameters);
var interfaceExtendsTypes = ts.filter(ts.getInterfaceBaseTypeNodes(node), function (base) { return ts.isEntityNameExpression(base.expression); });
if (interfaceExtendsTypes && interfaceExtendsTypes.length) {
- emitHeritageClause(interfaceExtendsTypes, /*isImplementsList*/ false);
+ emitHeritageClause(node.name, interfaceExtendsTypes, /*isImplementsList*/ false);
}
write(" {");
writeLine();
@@ -58777,7 +63243,7 @@ var ts;
function emitVariableDeclaration(node) {
// If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted
// so there is no check needed to see if declaration is visible
- if (node.kind !== 223 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) {
+ if (node.kind !== 225 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) {
if (ts.isBindingPattern(node.name)) {
emitBindingPattern(node.name);
}
@@ -58788,11 +63254,11 @@ var ts;
writeTextOfNode(currentText, node.name);
// If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor
// we don't want to emit property declaration with "?"
- if ((node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */ ||
- (node.kind === 144 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
+ if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */ ||
+ (node.kind === 145 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
write("?");
}
- if ((node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */) && node.parent.kind === 161 /* TypeLiteral */) {
+ if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) && node.parent.kind === 162 /* TypeLiteral */) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (resolver.isLiteralConstDeclaration(node)) {
@@ -58805,14 +63271,14 @@ var ts;
}
}
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
}
- else if (node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */) {
+ else if (node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) {
// TODO(jfreeman): Deal with computed properties in error reporting.
if (ts.hasModifier(node, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
@@ -58821,7 +63287,7 @@ var ts;
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -58853,7 +63319,7 @@ var ts;
var elements = [];
for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
var element = _a[_i];
- if (element.kind !== 198 /* OmittedExpression */) {
+ if (element.kind !== 199 /* OmittedExpression */) {
elements.push(element);
}
}
@@ -58923,7 +63389,7 @@ var ts;
var type = getTypeAnnotationFromAccessor(node);
if (!type) {
// couldn't get type for the first accessor, try the another one
- var anotherAccessor = node.kind === 151 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor;
+ var anotherAccessor = node.kind === 152 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor;
type = getTypeAnnotationFromAccessor(anotherAccessor);
if (type) {
accessorWithTypeAnnotation = anotherAccessor;
@@ -58936,7 +63402,7 @@ var ts;
}
function getTypeAnnotationFromAccessor(accessor) {
if (accessor) {
- return accessor.kind === 151 /* GetAccessor */
+ return accessor.kind === 152 /* GetAccessor */
? accessor.type // Getter - return type
: accessor.parameters.length > 0
? accessor.parameters[0].type // Setter parameter type
@@ -58945,7 +63411,7 @@ var ts;
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
- if (accessorWithTypeAnnotation.kind === 152 /* SetAccessor */) {
+ if (accessorWithTypeAnnotation.kind === 153 /* SetAccessor */) {
// Setters have to have type named and cannot infer it so, the type should always be named
if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32 /* Static */)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
@@ -58995,17 +63461,17 @@ var ts;
// so no need to verify if the declaration is visible
if (!resolver.isImplementationOfOverload(node)) {
emitJsDocComments(node);
- if (node.kind === 225 /* FunctionDeclaration */) {
+ if (node.kind === 227 /* FunctionDeclaration */) {
emitModuleElementDeclarationFlags(node);
}
- else if (node.kind === 149 /* MethodDeclaration */ || node.kind === 150 /* Constructor */) {
+ else if (node.kind === 150 /* MethodDeclaration */ || node.kind === 151 /* Constructor */) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
}
- if (node.kind === 225 /* FunctionDeclaration */) {
+ if (node.kind === 227 /* FunctionDeclaration */) {
write("function ");
writeTextOfNode(currentText, node.name);
}
- else if (node.kind === 150 /* Constructor */) {
+ else if (node.kind === 151 /* Constructor */) {
write("constructor");
}
else {
@@ -59025,17 +63491,17 @@ var ts;
var prevEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = node;
var closeParenthesizedFunctionType = false;
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
// Index signature can have readonly modifier
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
write("[");
}
else {
// Construct signature or constructor type write new Signature
- if (node.kind === 154 /* ConstructSignature */ || node.kind === 159 /* ConstructorType */) {
+ if (node.kind === 155 /* ConstructSignature */ || node.kind === 160 /* ConstructorType */) {
write("new ");
}
- else if (node.kind === 158 /* FunctionType */) {
+ else if (node.kind === 159 /* FunctionType */) {
var currentOutput = writer.getText();
// Do not generate incorrect type when function type with type parameters is type argument
// This could happen if user used space between two '<' making it error free
@@ -59050,22 +63516,22 @@ var ts;
}
// Parameters
emitCommaList(node.parameters, emitParameterDeclaration);
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
write("]");
}
else {
write(")");
}
// If this is not a constructor and is not private, emit the return type
- var isFunctionTypeOrConstructorType = node.kind === 158 /* FunctionType */ || node.kind === 159 /* ConstructorType */;
- if (isFunctionTypeOrConstructorType || node.parent.kind === 161 /* TypeLiteral */) {
+ var isFunctionTypeOrConstructorType = node.kind === 159 /* FunctionType */ || node.kind === 160 /* ConstructorType */;
+ if (isFunctionTypeOrConstructorType || node.parent.kind === 162 /* TypeLiteral */) {
// Emit type literal signature return type only if specified
if (node.type) {
write(isFunctionTypeOrConstructorType ? " => " : ": ");
emitType(node.type);
}
}
- else if (node.kind !== 150 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) {
+ else if (node.kind !== 151 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) {
writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
}
enclosingDeclaration = prevEnclosingDeclaration;
@@ -59079,26 +63545,26 @@ var ts;
function getReturnTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
switch (node.kind) {
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node, 32 /* Static */)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
@@ -59106,7 +63572,7 @@ var ts;
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -59120,7 +63586,7 @@ var ts;
ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -59155,9 +63621,9 @@ var ts;
write("?");
}
decreaseIndent();
- if (node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- node.parent.parent.kind === 161 /* TypeLiteral */) {
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.parent.kind === 162 /* TypeLiteral */) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (!ts.hasModifier(node.parent, 8 /* Private */)) {
@@ -59173,24 +63639,29 @@ var ts;
}
function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
switch (node.parent.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
// Interfaces cannot have parameter types that cannot be named
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
// Interfaces cannot have parameter types that cannot be named
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ // Interfaces cannot have parameter types that cannot be named
+ return symbolAccessibilityResult.errorModuleName ?
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node.parent, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
@@ -59198,7 +63669,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -59211,7 +63682,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -59223,12 +63694,12 @@ var ts;
}
function emitBindingPattern(bindingPattern) {
// We have to explicitly emit square bracket and bracket because these tokens are not store inside the node.
- if (bindingPattern.kind === 172 /* ObjectBindingPattern */) {
+ if (bindingPattern.kind === 173 /* ObjectBindingPattern */) {
write("{");
emitCommaList(bindingPattern.elements, emitBindingElement);
write("}");
}
- else if (bindingPattern.kind === 173 /* ArrayBindingPattern */) {
+ else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) {
write("[");
var elements = bindingPattern.elements;
emitCommaList(elements, emitBindingElement);
@@ -59239,7 +63710,7 @@ var ts;
}
}
function emitBindingElement(bindingElement) {
- if (bindingElement.kind === 198 /* OmittedExpression */) {
+ if (bindingElement.kind === 199 /* OmittedExpression */) {
// If bindingElement is an omittedExpression (i.e. containing elision),
// we will emit blank space (although this may differ from users' original code,
// it allows emitSeparatedList to write separator appropriately)
@@ -59248,7 +63719,7 @@ var ts;
// emit : function foo([ , x, , ]) {}
write(" ");
}
- else if (bindingElement.kind === 174 /* BindingElement */) {
+ else if (bindingElement.kind === 175 /* BindingElement */) {
if (bindingElement.propertyName) {
// bindingElement has propertyName property in the following case:
// { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y"
@@ -59287,40 +63758,40 @@ var ts;
}
function emitNode(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 226 /* ClassDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
return emitModuleElement(node, isModuleElementVisible(node));
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return emitModuleElement(node, isVariableStatementVisible(node));
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// Import declaration without import clause is visible, otherwise it is not visible
return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return emitExportDeclaration(node);
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return writeFunctionDeclaration(node);
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 155 /* IndexSignature */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 156 /* IndexSignature */:
return emitSignatureDeclarationWithJsDocComments(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return emitAccessorDeclaration(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return emitPropertyDeclaration(node);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return emitEnumMemberDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return emitExportAssignment(node);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return emitSourceFile(node);
}
}
@@ -59338,7 +63809,7 @@ var ts;
}
else {
// Get the declaration file path
- ts.forEachExpectedEmitFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
}
if (declFileName) {
declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
@@ -59346,8 +63817,9 @@ var ts;
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
}
return addedBundledEmitReference;
- function getDeclFileName(emitFileNames, _sourceFiles, isBundledEmit) {
+ function getDeclFileName(emitFileNames, sourceFileOrBundle) {
// Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path
+ var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */;
if (isBundledEmit && !addBundledFileReference) {
return;
}
@@ -59358,10 +63830,11 @@ var ts;
}
}
/* @internal */
- function writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
- var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles);
+ function writeDeclarationFile(declarationFilePath, sourceFileOrBundle, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
+ var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles);
var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit;
if (!emitSkipped) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
var declarationOutput = emitDeclarationResult.referencesOutput
+ getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles);
@@ -59384,83 +63857,73 @@ var ts;
}
ts.writeDeclarationFile = writeDeclarationFile;
})(ts || (ts = {}));
-/// <reference path="checker.ts"/>
+/// <reference path="checker.ts" />
/// <reference path="transformer.ts" />
-/// <reference path="declarationEmitter.ts"/>
-/// <reference path="sourcemap.ts"/>
+/// <reference path="declarationEmitter.ts" />
+/// <reference path="sourcemap.ts" />
/// <reference path="comments.ts" />
-/* @internal */
var ts;
(function (ts) {
- // Flags enum to track count of temp variables and a few dedicated names
- var TempFlags;
- (function (TempFlags) {
- TempFlags[TempFlags["Auto"] = 0] = "Auto";
- TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
- TempFlags[TempFlags["_i"] = 268435456] = "_i";
- })(TempFlags || (TempFlags = {}));
- var id = function (s) { return s; };
- var nullTransformers = [function (_) { return id; }];
+ var delimiters = createDelimiterMap();
+ var brackets = createBracketsMap();
+ /*@internal*/
// targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
- function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) {
- var delimiters = createDelimiterMap();
- var brackets = createBracketsMap();
+ function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles, transformers) {
var compilerOptions = host.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined;
var emitterDiagnostics = ts.createDiagnosticCollection();
var newLine = host.getNewLine();
- var transformers = emitOnlyDtsFiles ? nullTransformers : ts.getTransformers(compilerOptions);
var writer = ts.createTextWriter(newLine);
- var write = writer.write, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent;
var sourceMap = ts.createSourceMapWriter(host, writer);
- var emitNodeWithSourceMap = sourceMap.emitNodeWithSourceMap, emitTokenWithSourceMap = sourceMap.emitTokenWithSourceMap;
- var comments = ts.createCommentWriter(host, writer, sourceMap);
- var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition;
- var nodeIdToGeneratedName;
- var autoGeneratedIdToGeneratedName;
- var generatedNameSet;
- var tempFlags;
var currentSourceFile;
- var currentText;
- var currentFileIdentifiers;
var bundledHelpers;
var isOwnFileEmit;
var emitSkipped = false;
var sourceFiles = ts.getSourceFilesToEmit(host, targetSourceFile);
// Transform the source files
- ts.performance.mark("beforeTransform");
- var _a = ts.transformFiles(resolver, host, sourceFiles, transformers), transformed = _a.transformed, emitNodeWithSubstitution = _a.emitNodeWithSubstitution, emitNodeWithNotification = _a.emitNodeWithNotification;
- ts.performance.measure("transformTime", "beforeTransform");
+ var transform = ts.transformNodes(resolver, host, compilerOptions, sourceFiles, transformers, /*allowDtsFiles*/ false);
+ // Create a printer to print the nodes
+ var printer = createPrinter(compilerOptions, {
+ // resolver hooks
+ hasGlobalName: resolver.hasGlobalName,
+ // transform hooks
+ onEmitNode: transform.emitNodeWithNotification,
+ substituteNode: transform.substituteNode,
+ // sourcemap hooks
+ onEmitSourceMapOfNode: sourceMap.emitNodeWithSourceMap,
+ onEmitSourceMapOfToken: sourceMap.emitTokenWithSourceMap,
+ onEmitSourceMapOfPosition: sourceMap.emitPos,
+ // emitter hooks
+ onEmitHelpers: emitHelpers,
+ onSetSourceFile: setSourceFile,
+ });
// Emit each output file
ts.performance.mark("beforePrint");
- ts.forEachTransformedEmitFile(host, transformed, emitFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, emitSourceFileOrBundle, transform.transformed, emitOnlyDtsFiles);
ts.performance.measure("printTime", "beforePrint");
// Clean up emit nodes on parse tree
- for (var _b = 0, sourceFiles_4 = sourceFiles; _b < sourceFiles_4.length; _b++) {
- var sourceFile = sourceFiles_4[_b];
- ts.disposeEmitNodes(sourceFile);
- }
+ transform.dispose();
return {
emitSkipped: emitSkipped,
diagnostics: emitterDiagnostics.getDiagnostics(),
emittedFiles: emittedFilesList,
sourceMaps: sourceMapDataList
};
- function emitFile(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, isBundledEmit) {
+ function emitSourceFileOrBundle(_a, sourceFileOrBundle) {
+ var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath;
// Make sure not to write js file and source map file if any of them cannot be written
if (!host.isEmitBlocked(jsFilePath) && !compilerOptions.noEmit) {
if (!emitOnlyDtsFiles) {
- printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
+ printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
}
}
else {
emitSkipped = true;
}
if (declarationFilePath) {
- emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFiles(sourceFiles), isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
+ emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFileOrBundle(sourceFileOrBundle), host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
}
if (!emitSkipped && emittedFilesList) {
if (!emitOnlyDtsFiles) {
@@ -59474,26 +63937,24 @@ var ts;
}
}
}
- function printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
- sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
- nodeIdToGeneratedName = [];
- autoGeneratedIdToGeneratedName = [];
- generatedNameSet = ts.createMap();
- bundledHelpers = isBundledEmit ? ts.createMap() : undefined;
- isOwnFileEmit = !isBundledEmit;
- // Emit helpers from all the files
- if (isBundledEmit && moduleKind) {
- for (var _a = 0, sourceFiles_5 = sourceFiles; _a < sourceFiles_5.length; _a++) {
- var sourceFile = sourceFiles_5[_a];
- emitHelpers(sourceFile, /*isBundle*/ true);
- }
- }
- // Print each transformed source file.
- ts.forEach(sourceFiles, printSourceFile);
- writeLine();
+ function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) {
+ var bundle = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle : undefined;
+ var sourceFile = sourceFileOrBundle.kind === 264 /* SourceFile */ ? sourceFileOrBundle : undefined;
+ var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
+ sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
+ if (bundle) {
+ bundledHelpers = ts.createMap();
+ isOwnFileEmit = false;
+ printer.writeBundle(bundle, writer);
+ }
+ else {
+ isOwnFileEmit = true;
+ printer.writeFile(sourceFile, writer);
+ }
+ writer.writeLine();
var sourceMappingURL = sourceMap.getSourceMappingURL();
if (sourceMappingURL) {
- write("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Sometimes tools can sometimes see this line as a source mapping url comment
+ writer.write("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Sometimes tools can sometimes see this line as a source mapping url comment
}
// Write the source map
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
@@ -59507,138 +63968,232 @@ var ts;
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), compilerOptions.emitBOM, sourceFiles);
// Reset state
sourceMap.reset();
- comments.reset();
writer.reset();
- tempFlags = 0 /* Auto */;
currentSourceFile = undefined;
- currentText = undefined;
+ bundledHelpers = undefined;
isOwnFileEmit = false;
}
- function printSourceFile(node) {
+ function setSourceFile(node) {
currentSourceFile = node;
- currentText = node.text;
- currentFileIdentifiers = node.identifiers;
sourceMap.setSourceFile(node);
- comments.setSourceFile(node);
- pipelineEmitWithNotification(0 /* SourceFile */, node);
}
- /**
- * Emits a node.
- */
+ function emitHelpers(node, writeLines) {
+ var helpersEmitted = false;
+ var bundle = node.kind === 265 /* Bundle */ ? node : undefined;
+ if (bundle && moduleKind === ts.ModuleKind.None) {
+ return;
+ }
+ var numNodes = bundle ? bundle.sourceFiles.length : 1;
+ for (var i = 0; i < numNodes; i++) {
+ var currentNode = bundle ? bundle.sourceFiles[i] : node;
+ var sourceFile = ts.isSourceFile(currentNode) ? currentNode : currentSourceFile;
+ var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
+ var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
+ var helpers = ts.getEmitHelpers(currentNode);
+ if (helpers) {
+ for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
+ var helper = _b[_a];
+ if (!helper.scoped) {
+ // Skip the helper if it can be skipped and the noEmitHelpers compiler
+ // option is set, or if it can be imported and the importHelpers compiler
+ // option is set.
+ if (shouldSkip)
+ continue;
+ // Skip the helper if it can be bundled but hasn't already been emitted and we
+ // are emitting a bundled module.
+ if (shouldBundle) {
+ if (bundledHelpers.get(helper.name)) {
+ continue;
+ }
+ bundledHelpers.set(helper.name, true);
+ }
+ }
+ else if (bundle) {
+ // Skip the helper if it is scoped and we are emitting bundled helpers
+ continue;
+ }
+ writeLines(helper.text);
+ helpersEmitted = true;
+ }
+ }
+ }
+ return helpersEmitted;
+ }
+ }
+ ts.emitFiles = emitFiles;
+ function createPrinter(printerOptions, handlers) {
+ if (printerOptions === void 0) { printerOptions = {}; }
+ if (handlers === void 0) { handlers = {}; }
+ var hasGlobalName = handlers.hasGlobalName, onEmitSourceMapOfNode = handlers.onEmitSourceMapOfNode, onEmitSourceMapOfToken = handlers.onEmitSourceMapOfToken, onEmitSourceMapOfPosition = handlers.onEmitSourceMapOfPosition, onEmitNode = handlers.onEmitNode, onEmitHelpers = handlers.onEmitHelpers, onSetSourceFile = handlers.onSetSourceFile, substituteNode = handlers.substituteNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
+ var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
+ var currentSourceFile;
+ var nodeIdToGeneratedName; // Map of generated names for specific nodes.
+ var autoGeneratedIdToGeneratedName; // Map of generated names for temp and loop variables.
+ var generatedNames; // Set of names generated by the NameGenerator.
+ var tempFlagsStack; // Stack of enclosing name generation scopes.
+ var tempFlags; // TempFlags for the current name generation scope.
+ var writer;
+ var ownWriter;
+ reset();
+ return {
+ // public API
+ printNode: printNode,
+ printFile: printFile,
+ printBundle: printBundle,
+ // internal API
+ writeNode: writeNode,
+ writeFile: writeFile,
+ writeBundle: writeBundle
+ };
+ function printNode(hint, node, sourceFile) {
+ switch (hint) {
+ case 0 /* SourceFile */:
+ ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
+ break;
+ case 2 /* IdentifierName */:
+ ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
+ break;
+ case 1 /* Expression */:
+ ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
+ break;
+ }
+ switch (node.kind) {
+ case 264 /* SourceFile */: return printFile(node);
+ case 265 /* Bundle */: return printBundle(node);
+ }
+ writeNode(hint, node, sourceFile, beginPrint());
+ return endPrint();
+ }
+ function printBundle(bundle) {
+ writeBundle(bundle, beginPrint());
+ return endPrint();
+ }
+ function printFile(sourceFile) {
+ writeFile(sourceFile, beginPrint());
+ return endPrint();
+ }
+ function writeNode(hint, node, sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ print(hint, node, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function writeBundle(bundle, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(bundle);
+ emitPrologueDirectivesIfNeeded(bundle);
+ emitHelpersIndirect(bundle);
+ for (var _a = 0, _b = bundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ print(0 /* SourceFile */, sourceFile, sourceFile);
+ }
+ reset();
+ writer = previousWriter;
+ }
+ function writeFile(sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(sourceFile);
+ emitPrologueDirectivesIfNeeded(sourceFile);
+ print(0 /* SourceFile */, sourceFile, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function beginPrint() {
+ return ownWriter || (ownWriter = ts.createTextWriter(newLine));
+ }
+ function endPrint() {
+ var text = ownWriter.getText();
+ ownWriter.reset();
+ return text;
+ }
+ function print(hint, node, sourceFile) {
+ setSourceFile(sourceFile);
+ pipelineEmitWithNotification(hint, node);
+ }
+ function setSourceFile(sourceFile) {
+ currentSourceFile = sourceFile;
+ comments.setSourceFile(sourceFile);
+ if (onSetSourceFile) {
+ onSetSourceFile(sourceFile);
+ }
+ }
+ function setWriter(output) {
+ writer = output;
+ comments.setWriter(output);
+ }
+ function reset() {
+ nodeIdToGeneratedName = [];
+ autoGeneratedIdToGeneratedName = [];
+ generatedNames = ts.createMap();
+ tempFlagsStack = [];
+ tempFlags = 0 /* Auto */;
+ comments.reset();
+ setWriter(/*output*/ undefined);
+ }
function emit(node) {
pipelineEmitWithNotification(3 /* Unspecified */, node);
}
- /**
- * Emits an IdentifierName.
- */
function emitIdentifierName(node) {
pipelineEmitWithNotification(2 /* IdentifierName */, node);
}
- /**
- * Emits an expression node.
- */
function emitExpression(node) {
pipelineEmitWithNotification(1 /* Expression */, node);
}
- /**
- * Emits a node with possible notification.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called from printSourceFile, emit, emitExpression, or
- * emitIdentifierName.
- */
- function pipelineEmitWithNotification(emitContext, node) {
- emitNodeWithNotification(emitContext, node, pipelineEmitWithComments);
- }
- /**
- * Emits a node with comments.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithNotification.
- */
- function pipelineEmitWithComments(emitContext, node) {
- // Do not emit comments for SourceFile
- if (emitContext === 0 /* SourceFile */) {
- pipelineEmitWithSourceMap(emitContext, node);
- return;
+ function pipelineEmitWithNotification(hint, node) {
+ if (onEmitNode) {
+ onEmitNode(hint, node, pipelineEmitWithComments);
}
- emitNodeWithComments(emitContext, node, pipelineEmitWithSourceMap);
- }
- /**
- * Emits a node with source maps.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithComments.
- */
- function pipelineEmitWithSourceMap(emitContext, node) {
- // Do not emit source mappings for SourceFile or IdentifierName
- if (emitContext === 0 /* SourceFile */
- || emitContext === 2 /* IdentifierName */) {
- pipelineEmitWithSubstitution(emitContext, node);
- return;
+ else {
+ pipelineEmitWithComments(hint, node);
}
- emitNodeWithSourceMap(emitContext, node, pipelineEmitWithSubstitution);
- }
- /**
- * Emits a node with possible substitution.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithSourceMap or
- * pipelineEmitInUnspecifiedContext (when picking a more specific context).
- */
- function pipelineEmitWithSubstitution(emitContext, node) {
- emitNodeWithSubstitution(emitContext, node, pipelineEmitForContext);
}
- /**
- * Emits a node.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithSubstitution.
- */
- function pipelineEmitForContext(emitContext, node) {
- switch (emitContext) {
- case 0 /* SourceFile */: return pipelineEmitInSourceFileContext(node);
- case 2 /* IdentifierName */: return pipelineEmitInIdentifierNameContext(node);
- case 3 /* Unspecified */: return pipelineEmitInUnspecifiedContext(node);
- case 1 /* Expression */: return pipelineEmitInExpressionContext(node);
+ function pipelineEmitWithComments(hint, node) {
+ node = trySubstituteNode(hint, node);
+ if (emitNodeWithComments && hint !== 0 /* SourceFile */) {
+ emitNodeWithComments(hint, node, pipelineEmitWithSourceMap);
+ }
+ else {
+ pipelineEmitWithSourceMap(hint, node);
}
}
- /**
- * Emits a node in the SourceFile EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInSourceFileContext(node) {
- var kind = node.kind;
- switch (kind) {
- // Top-level nodes
- case 261 /* SourceFile */:
- return emitSourceFile(node);
+ function pipelineEmitWithSourceMap(hint, node) {
+ if (onEmitSourceMapOfNode && hint !== 0 /* SourceFile */ && hint !== 2 /* IdentifierName */) {
+ onEmitSourceMapOfNode(hint, node, pipelineEmitWithHint);
+ }
+ else {
+ pipelineEmitWithHint(hint, node);
}
}
- /**
- * Emits a node in the IdentifierName EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInIdentifierNameContext(node) {
- var kind = node.kind;
- switch (kind) {
- // Identifiers
- case 70 /* Identifier */:
- return emitIdentifier(node);
+ function pipelineEmitWithHint(hint, node) {
+ switch (hint) {
+ case 0 /* SourceFile */: return pipelineEmitSourceFile(node);
+ case 2 /* IdentifierName */: return pipelineEmitIdentifierName(node);
+ case 1 /* Expression */: return pipelineEmitExpression(node);
+ case 3 /* Unspecified */: return pipelineEmitUnspecified(node);
}
}
- /**
- * Emits a node in the Unspecified EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInUnspecifiedContext(node) {
+ function pipelineEmitSourceFile(node) {
+ ts.Debug.assertNode(node, ts.isSourceFile);
+ emitSourceFile(node);
+ }
+ function pipelineEmitIdentifierName(node) {
+ ts.Debug.assertNode(node, ts.isIdentifier);
+ emitIdentifier(node);
+ }
+ function pipelineEmitUnspecified(node) {
var kind = node.kind;
+ // Reserved words
+ // Strict mode reserved words
+ // Contextual keywords
+ if (ts.isKeyword(kind)) {
+ writeTokenText(kind);
+ return;
+ }
switch (kind) {
// Pseudo-literals
case 13 /* TemplateHead */:
@@ -59648,254 +64203,217 @@ var ts;
// Identifiers
case 70 /* Identifier */:
return emitIdentifier(node);
- // Reserved words
- case 75 /* ConstKeyword */:
- case 78 /* DefaultKeyword */:
- case 83 /* ExportKeyword */:
- case 104 /* VoidKeyword */:
- // Strict mode reserved words
- case 111 /* PrivateKeyword */:
- case 112 /* ProtectedKeyword */:
- case 113 /* PublicKeyword */:
- case 114 /* StaticKeyword */:
- // Contextual keywords
- case 116 /* AbstractKeyword */:
- case 117 /* AsKeyword */:
- case 118 /* AnyKeyword */:
- case 119 /* AsyncKeyword */:
- case 120 /* AwaitKeyword */:
- case 121 /* BooleanKeyword */:
- case 122 /* ConstructorKeyword */:
- case 123 /* DeclareKeyword */:
- case 124 /* GetKeyword */:
- case 125 /* IsKeyword */:
- case 127 /* ModuleKeyword */:
- case 128 /* NamespaceKeyword */:
- case 129 /* NeverKeyword */:
- case 130 /* ReadonlyKeyword */:
- case 131 /* RequireKeyword */:
- case 132 /* NumberKeyword */:
- case 133 /* SetKeyword */:
- case 134 /* StringKeyword */:
- case 135 /* SymbolKeyword */:
- case 136 /* TypeKeyword */:
- case 137 /* UndefinedKeyword */:
- case 138 /* FromKeyword */:
- case 139 /* GlobalKeyword */:
- case 140 /* OfKeyword */:
- writeTokenText(kind);
- return;
// Parse tree nodes
// Names
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return emitQualifiedName(node);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return emitComputedPropertyName(node);
// Signature elements
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return emitTypeParameter(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return emitParameter(node);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return emitDecorator(node);
// Type members
- case 146 /* PropertySignature */:
+ case 147 /* PropertySignature */:
return emitPropertySignature(node);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return emitPropertyDeclaration(node);
- case 148 /* MethodSignature */:
+ case 149 /* MethodSignature */:
return emitMethodSignature(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return emitMethodDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return emitConstructor(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return emitAccessorDeclaration(node);
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
return emitCallSignature(node);
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
return emitConstructSignature(node);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return emitIndexSignature(node);
// Types
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return emitTypePredicate(node);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return emitTypeReference(node);
- case 158 /* FunctionType */:
+ case 159 /* FunctionType */:
return emitFunctionType(node);
- case 159 /* ConstructorType */:
+ case 160 /* ConstructorType */:
return emitConstructorType(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return emitTypeQuery(node);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return emitTypeLiteral(node);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return emitArrayType(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return emitTupleType(node);
- case 164 /* UnionType */:
+ case 165 /* UnionType */:
return emitUnionType(node);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return emitIntersectionType(node);
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return emitParenthesizedType(node);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return emitExpressionWithTypeArguments(node);
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
return emitThisType();
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return emitTypeOperator(node);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return emitIndexedAccessType(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return emitMappedType(node);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return emitLiteralType(node);
// Binding patterns
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
return emitObjectBindingPattern(node);
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return emitArrayBindingPattern(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return emitBindingElement(node);
// Misc
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return emitTemplateSpan(node);
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
return emitSemicolonClassElement();
// Statements
- case 204 /* Block */:
+ case 206 /* Block */:
return emitBlock(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return emitVariableStatement(node);
- case 206 /* EmptyStatement */:
+ case 208 /* EmptyStatement */:
return emitEmptyStatement();
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return emitExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return emitIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return emitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return emitWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return emitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return emitForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return emitForOfStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return emitContinueStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return emitBreakStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return emitReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return emitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return emitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return emitLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return emitThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return emitTryStatement(node);
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
return emitDebuggerStatement(node);
// Declarations
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return emitVariableDeclaration(node);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return emitVariableDeclarationList(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return emitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return emitClassDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return emitInterfaceDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return emitTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return emitEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return emitModuleDeclaration(node);
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return emitModuleBlock(node);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return emitCaseBlock(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return emitImportEqualsDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return emitImportDeclaration(node);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return emitImportClause(node);
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
return emitNamespaceImport(node);
- case 238 /* NamedImports */:
+ case 240 /* NamedImports */:
return emitNamedImports(node);
- case 239 /* ImportSpecifier */:
+ case 241 /* ImportSpecifier */:
return emitImportSpecifier(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return emitExportAssignment(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return emitExportDeclaration(node);
- case 242 /* NamedExports */:
+ case 244 /* NamedExports */:
return emitNamedExports(node);
- case 243 /* ExportSpecifier */:
+ case 245 /* ExportSpecifier */:
return emitExportSpecifier(node);
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return;
// Module references
- case 245 /* ExternalModuleReference */:
+ case 247 /* ExternalModuleReference */:
return emitExternalModuleReference(node);
// JSX (non-expression)
case 10 /* JsxText */:
return emitJsxText(node);
- case 248 /* JsxOpeningElement */:
+ case 250 /* JsxOpeningElement */:
return emitJsxOpeningElement(node);
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
return emitJsxClosingElement(node);
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
return emitJsxAttribute(node);
- case 251 /* JsxSpreadAttribute */:
+ case 253 /* JsxAttributes */:
+ return emitJsxAttributes(node);
+ case 254 /* JsxSpreadAttribute */:
return emitJsxSpreadAttribute(node);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return emitJsxExpression(node);
// Clauses
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return emitCaseClause(node);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return emitDefaultClause(node);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return emitHeritageClause(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return emitCatchClause(node);
// Property assignments
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return emitPropertyAssignment(node);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return emitShorthandPropertyAssignment(node);
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
return emitSpreadAssignment(node);
// Enum
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return emitEnumMember(node);
}
// If the node is an expression, try to emit it as an expression with
// substitution.
if (ts.isExpression(node)) {
- return pipelineEmitWithSubstitution(1 /* Expression */, node);
+ return pipelineEmitExpression(trySubstituteNode(1 /* Expression */, node));
+ }
+ if (ts.isToken(node)) {
+ writeTokenText(kind);
+ return;
}
}
- /**
- * Emits a node in the Expression EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInExpressionContext(node) {
+ function pipelineEmitExpression(node) {
var kind = node.kind;
switch (kind) {
// Literals
@@ -59917,68 +64435,76 @@ var ts;
writeTokenText(kind);
return;
// Expressions
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return emitArrayLiteralExpression(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return emitObjectLiteralExpression(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return emitPropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return emitElementAccessExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return emitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return emitNewExpression(node);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return emitTaggedTemplateExpression(node);
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
return emitTypeAssertionExpression(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return emitParenthesizedExpression(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return emitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return emitArrowFunction(node);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return emitDeleteExpression(node);
- case 187 /* TypeOfExpression */:
+ case 188 /* TypeOfExpression */:
return emitTypeOfExpression(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return emitVoidExpression(node);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return emitAwaitExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return emitPrefixUnaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return emitPostfixUnaryExpression(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return emitBinaryExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return emitConditionalExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return emitTemplateExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return emitYieldExpression(node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return emitSpreadExpression(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return emitClassExpression(node);
- case 198 /* OmittedExpression */:
+ case 199 /* OmittedExpression */:
return;
- case 200 /* AsExpression */:
+ case 201 /* AsExpression */:
return emitAsExpression(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return emitNonNullExpression(node);
+ case 203 /* MetaProperty */:
+ return emitMetaProperty(node);
// JSX
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return emitJsxElement(node);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return emitJsxSelfClosingElement(node);
// Transformation nodes
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
return emitPartiallyEmittedExpression(node);
- case 297 /* RawExpression */:
- return writeLines(node.text);
+ }
+ }
+ function trySubstituteNode(hint, node) {
+ return node && substituteNode && substituteNode(hint, node) || node;
+ }
+ function emitHelpersIndirect(node) {
+ if (onEmitHelpers) {
+ onEmitHelpers(node, writeLines);
}
}
//
@@ -59987,9 +64513,6 @@ var ts;
// SyntaxKind.NumericLiteral
function emitNumericLiteral(node) {
emitLiteral(node);
- if (node.trailingComment) {
- write(" /*" + node.trailingComment + "*/");
- }
}
// SyntaxKind.StringLiteral
// SyntaxKind.RegularExpressionLiteral
@@ -59999,7 +64522,7 @@ var ts;
// SyntaxKind.TemplateTail
function emitLiteral(node) {
var text = getLiteralTextOfNode(node);
- if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap)
+ if ((printerOptions.sourceMap || printerOptions.inlineSourceMap)
&& (node.kind === 9 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
@@ -60047,8 +64570,8 @@ var ts;
writeIfPresent(node.dotDotDotToken, "...");
emit(node.name);
writeIfPresent(node.questionToken, "?");
- emitExpressionWithPrefix(" = ", node.initializer);
emitWithPrefix(": ", node.type);
+ emitExpressionWithPrefix(" = ", node.initializer);
}
function emitDecorator(decorator) {
write("@");
@@ -60098,7 +64621,7 @@ var ts;
function emitAccessorDeclaration(node) {
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
- write(node.kind === 151 /* GetAccessor */ ? "get " : "set ");
+ write(node.kind === 152 /* GetAccessor */ ? "get " : "set ");
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
@@ -60201,17 +64724,13 @@ var ts;
write("{");
writeLine();
increaseIndent();
- if (node.readonlyToken) {
- write("readonly ");
- }
+ writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
write(" in ");
emit(node.typeParameter.constraint);
write("]");
- if (node.questionToken) {
- write("?");
- }
+ writeIfPresent(node.questionToken, "?");
write(": ");
emit(node.type);
write(";");
@@ -60277,7 +64796,7 @@ var ts;
increaseIndent();
}
var preferNewLine = node.multiLine ? 32768 /* PreferNewLine */ : 0 /* None */;
- var allowTrailingComma = languageVersion >= 1 /* ES5 */ ? 32 /* AllowTrailingComma */ : 0 /* None */;
+ var allowTrailingComma = currentSourceFile.languageVersion >= 1 /* ES5 */ ? 32 /* AllowTrailingComma */ : 0 /* None */;
emitList(node, properties, 978 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine);
if (indentedFlag) {
decreaseIndent();
@@ -60289,7 +64808,7 @@ var ts;
var indentAfterDot = false;
if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) {
var dotRangeStart = node.expression.end;
- var dotRangeEnd = ts.skipTrivia(currentText, node.expression.end) + 1;
+ var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 22 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd };
indentBeforeDot = needsIndentation(node, node.expression, dotToken);
indentAfterDot = needsIndentation(node, dotToken, node.name);
@@ -60305,10 +64824,12 @@ var ts;
// 1..toString is a valid property access, emit a dot after the literal
// Also emit a dot if expression is a integer const enum value - it will appear in generated code as numeric literal
function needsDotDotForPropertyAccess(expression) {
- if (expression.kind === 8 /* NumericLiteral */) {
- // check if numeric literal was originally written with a dot
+ expression = ts.skipPartiallyEmittedExpressions(expression);
+ if (ts.isNumericLiteral(expression)) {
+ // check if numeric literal is a decimal literal that was originally written with a dot
var text = getLiteralTextOfNode(expression);
- return text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0;
+ return !expression.numericLiteralFlags
+ && text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
// check if constant enum value is integer
@@ -60316,7 +64837,7 @@ var ts;
// isFinite handles cases when constantValue is undefined
return isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
- && compilerOptions.removeComments;
+ && printerOptions.removeComments;
}
}
function emitElementAccessExpression(node) {
@@ -60342,11 +64863,9 @@ var ts;
emitExpression(node.template);
}
function emitTypeAssertionExpression(node) {
- if (node.type) {
- write("<");
- emit(node.type);
- write(">");
- }
+ write("<");
+ emit(node.type);
+ write(">");
emitExpression(node.expression);
}
function emitParenthesizedExpression(node) {
@@ -60405,7 +64924,7 @@ var ts;
// expression a prefix increment whose operand is a plus expression - (++(+x))
// The same is true of minus of course.
var operand = node.operand;
- return operand.kind === 190 /* PrefixUnaryExpression */
+ return operand.kind === 191 /* PrefixUnaryExpression */
&& ((node.operator === 36 /* PlusToken */ && (operand.operator === 36 /* PlusToken */ || operand.operator === 42 /* PlusPlusToken */))
|| (node.operator === 37 /* MinusToken */ && (operand.operator === 37 /* MinusToken */ || operand.operator === 43 /* MinusMinusToken */)));
}
@@ -60471,6 +64990,11 @@ var ts;
emitExpression(node.expression);
write("!");
}
+ function emitMetaProperty(node) {
+ writeToken(node.keywordToken, node.pos);
+ write(".");
+ emit(node.name);
+ }
//
// Misc
//
@@ -60490,6 +65014,10 @@ var ts;
else {
writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node);
emitBlockStatements(node);
+ // We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted
+ increaseIndent();
+ emitLeadingCommentsOfPosition(node.statements.end);
+ decreaseIndent();
writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node);
}
}
@@ -60519,27 +65047,27 @@ var ts;
writeToken(18 /* OpenParenToken */, openParenPos, node);
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end, node);
- emitEmbeddedStatement(node.thenStatement);
+ emitEmbeddedStatement(node, node.thenStatement);
if (node.elseStatement) {
- writeLine();
+ writeLineOrSpace(node);
writeToken(81 /* ElseKeyword */, node.thenStatement.end, node);
- if (node.elseStatement.kind === 208 /* IfStatement */) {
+ if (node.elseStatement.kind === 210 /* IfStatement */) {
write(" ");
emit(node.elseStatement);
}
else {
- emitEmbeddedStatement(node.elseStatement);
+ emitEmbeddedStatement(node, node.elseStatement);
}
}
}
function emitDoStatement(node) {
write("do");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
if (ts.isBlock(node.statement)) {
write(" ");
}
else {
- writeLine();
+ writeLineOrSpace(node);
}
write("while (");
emitExpression(node.expression);
@@ -60549,7 +65077,7 @@ var ts;
write("while (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
@@ -60561,7 +65089,7 @@ var ts;
write(";");
emitExpressionWithPrefix(" ", node.incrementor);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForInStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
@@ -60571,21 +65099,22 @@ var ts;
write(" in ");
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForOfStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
write(" ");
+ emitWithSuffix(node.awaitModifier, " ");
writeToken(18 /* OpenParenToken */, openParenPos);
emitForBinding(node.initializer);
write(" of ");
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForBinding(node) {
if (node !== undefined) {
- if (node.kind === 224 /* VariableDeclarationList */) {
+ if (node.kind === 226 /* VariableDeclarationList */) {
emit(node);
}
else {
@@ -60612,7 +65141,7 @@ var ts;
write("with (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitSwitchStatement(node) {
var openParenPos = writeToken(97 /* SwitchKeyword */, node.pos);
@@ -60636,9 +65165,12 @@ var ts;
function emitTryStatement(node) {
write("try ");
emit(node.tryBlock);
- emit(node.catchClause);
+ if (node.catchClause) {
+ writeLineOrSpace(node);
+ emit(node.catchClause);
+ }
if (node.finallyBlock) {
- writeLine();
+ writeLineOrSpace(node);
write("finally ");
emit(node.finallyBlock);
}
@@ -60669,6 +65201,9 @@ var ts;
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
+ function emitBlockCallback(_hint, body) {
+ emitBlockFunctionBody(body);
+ }
function emitSignatureAndBody(node, emitSignatureHead) {
var body = node.body;
if (body) {
@@ -60679,14 +65214,23 @@ var ts;
}
if (ts.getEmitFlags(node) & 262144 /* ReuseTempVariableScope */) {
emitSignatureHead(node);
- emitBlockFunctionBody(body);
+ if (onEmitNode) {
+ onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
emitSignatureHead(node);
- emitBlockFunctionBody(body);
- tempFlags = savedTempFlags;
+ if (onEmitNode) {
+ onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
+ popNameGenerationScope();
}
if (indentedFlag) {
decreaseIndent();
@@ -60741,9 +65285,15 @@ var ts;
function emitBlockFunctionBody(body) {
write(" {");
increaseIndent();
- emitBodyWithDetachedComments(body, body.statements, shouldEmitBlockFunctionBodyOnSingleLine(body)
+ var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
? emitBlockFunctionBodyOnSingleLine
- : emitBlockFunctionBodyWorker);
+ : emitBlockFunctionBodyWorker;
+ if (emitBodyWithDetachedComments) {
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
decreaseIndent();
writeToken(17 /* CloseBraceToken */, body.statements.end, body);
}
@@ -60753,8 +65303,9 @@ var ts;
function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine) {
// Emit all the prologue directives (like "use strict").
var statementOffset = emitPrologueDirectives(body.statements, /*startWithNewLine*/ true);
- var helpersEmitted = emitHelpers(body);
- if (statementOffset === 0 && !helpersEmitted && emitBlockFunctionBodyOnSingleLine) {
+ var pos = writer.getTextPos();
+ emitHelpersIndirect(body);
+ if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine) {
decreaseIndent();
emitList(body, body.statements, 384 /* SingleLineFunctionBodyStatements */);
increaseIndent();
@@ -60777,15 +65328,14 @@ var ts;
}
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, 256 /* ClassHeritageClauses */);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 65 /* ClassMembers */);
write("}");
+ popNameGenerationScope();
if (indentedFlag) {
decreaseIndent();
}
- tempFlags = savedTempFlags;
}
function emitInterfaceDeclaration(node) {
emitDecorators(node, node.decorators);
@@ -60812,19 +65362,18 @@ var ts;
emitModifiers(node, node.modifiers);
write("enum ");
emit(node.name);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 81 /* EnumMembers */);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
function emitModuleDeclaration(node) {
emitModifiers(node, node.modifiers);
write(node.flags & 16 /* Namespace */ ? "namespace " : "module ");
emit(node.name);
var body = node.body;
- while (body.kind === 230 /* ModuleDeclaration */) {
+ while (body.kind === 232 /* ModuleDeclaration */) {
write(".");
emit(body.name);
body = body.body;
@@ -60837,13 +65386,11 @@ var ts;
write("{ }");
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write("{");
- increaseIndent();
emitBlockStatements(node);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
}
function emitCaseBlock(node) {
@@ -60951,14 +65498,20 @@ var ts;
write("<");
emitJsxTagName(node.tagName);
write(" ");
- emitList(node, node.attributes, 131328 /* JsxElementAttributes */);
+ // We are checking here so we won't re-enter the emiting pipeline and emit extra sourcemap
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write("/>");
}
function emitJsxOpeningElement(node) {
write("<");
emitJsxTagName(node.tagName);
- writeIfAny(node.attributes, " ");
- emitList(node, node.attributes, 131328 /* JsxElementAttributes */);
+ writeIfAny(node.attributes.properties, " ");
+ // We are checking here so we won't re-enter the emitting pipeline and emit extra sourcemap
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write(">");
}
function emitJsxText(node) {
@@ -60969,6 +65522,9 @@ var ts;
emitJsxTagName(node.tagName);
write(">");
}
+ function emitJsxAttributes(node) {
+ emitList(node, node.properties, 131328 /* JsxElementAttributes */);
+ }
function emitJsxAttribute(node) {
emit(node.name);
emitWithPrefix("=", node.initializer);
@@ -60981,6 +65537,9 @@ var ts;
function emitJsxExpression(node) {
if (node.expression) {
write("{");
+ if (node.dotDotDotToken) {
+ write("...");
+ }
emitExpression(node.expression);
write("}");
}
@@ -61028,7 +65587,6 @@ var ts;
emitList(node, node.types, 272 /* HeritageClauseTypes */);
}
function emitCatchClause(node) {
- writeLine();
var openParenPos = writeToken(73 /* CatchKeyword */, node.pos);
write(" ");
writeToken(18 /* OpenParenToken */, openParenPos);
@@ -61051,7 +65609,7 @@ var ts;
// "comment1" is not considered to be leading comment for node.initializer
// but rather a trailing comment on the previous node.
var initializer = node.initializer;
- if ((ts.getEmitFlags(initializer) & 512 /* NoLeadingComments */) === 0) {
+ if (emitTrailingCommentsOfPosition && (ts.getEmitFlags(initializer) & 512 /* NoLeadingComments */) === 0) {
var commentRange = ts.getCommentRange(initializer);
emitTrailingCommentsOfPosition(commentRange.pos);
}
@@ -61082,17 +65640,27 @@ var ts;
//
function emitSourceFile(node) {
writeLine();
- emitShebang();
- emitBodyWithDetachedComments(node, node.statements, emitSourceFileWorker);
+ var statements = node.statements;
+ if (emitBodyWithDetachedComments) {
+ // Emit detached comment if there are no prologue directives or if the first node is synthesized.
+ // The synthesized node will have no leading comment so some comments may be missed.
+ var shouldEmitDetachedComment = statements.length === 0 ||
+ !ts.isPrologueDirective(statements[0]) ||
+ ts.nodeIsSynthesized(statements[0]);
+ if (shouldEmitDetachedComment) {
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
+ return;
+ }
+ }
+ emitSourceFileWorker(node);
}
function emitSourceFileWorker(node) {
var statements = node.statements;
- var statementOffset = emitPrologueDirectives(statements);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
- emitHelpers(node);
- emitList(node, statements, 1 /* MultiLine */, statementOffset);
- tempFlags = savedTempFlags;
+ pushNameGenerationScope();
+ emitHelpersIndirect(node);
+ var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
+ emitList(node, statements, 1 /* MultiLine */, index === -1 ? statements.length : index);
+ popNameGenerationScope();
}
// Transformation nodes
function emitPartiallyEmittedExpression(node) {
@@ -61102,13 +65670,20 @@ var ts;
* Emits any prologue directives at the start of a Statement list, returning the
* number of prologue directives written to the output.
*/
- function emitPrologueDirectives(statements, startWithNewLine) {
+ function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
- if (ts.isPrologueDirective(statements[i])) {
- if (startWithNewLine || i > 0) {
- writeLine();
+ var statement = statements[i];
+ if (ts.isPrologueDirective(statement)) {
+ var shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;
+ if (shouldEmitPrologueDirective) {
+ if (startWithNewLine || i > 0) {
+ writeLine();
+ }
+ emit(statement);
+ if (seenPrologueDirectives) {
+ seenPrologueDirectives.set(statement.expression.text, statement.expression.text);
+ }
}
- emit(statements[i]);
}
else {
// return index of the first non prologue directive
@@ -61117,81 +65692,42 @@ var ts;
}
return statements.length;
}
- function emitHelpers(node, isBundle) {
- var sourceFile = ts.isSourceFile(node) ? node : currentSourceFile;
- var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
- var shouldBundle = ts.isSourceFile(node) && !isOwnFileEmit;
- var helpersEmitted = false;
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
- var helper = _b[_a];
- if (!helper.scoped) {
- // Skip the helper if it can be skipped and the noEmitHelpers compiler
- // option is set, or if it can be imported and the importHelpers compiler
- // option is set.
- if (shouldSkip)
- continue;
- // Skip the helper if it can be bundled but hasn't already been emitted and we
- // are emitting a bundled module.
- if (shouldBundle) {
- if (bundledHelpers[helper.name]) {
- continue;
- }
- bundledHelpers[helper.name] = true;
- }
- }
- else if (isBundle) {
- // Skip the helper if it is scoped and we are emitting bundled helpers
- continue;
- }
- writeLines(helper.text);
- helpersEmitted = true;
- }
+ function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ setSourceFile(sourceFileOrBundle);
+ emitPrologueDirectives(sourceFileOrBundle.statements);
}
- if (helpersEmitted) {
- writeLine();
+ else {
+ var seenPrologueDirectives = ts.createMap();
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ setSourceFile(sourceFile);
+ emitPrologueDirectives(sourceFile.statements, /*startWithNewLine*/ true, seenPrologueDirectives);
+ }
}
- return helpersEmitted;
}
- function writeLines(text) {
- var lines = text.split(/\r\n?|\n/g);
- var indentation = guessIndentation(lines);
- for (var i = 0; i < lines.length; i++) {
- var line = indentation ? lines[i].slice(indentation) : lines[i];
- if (line.length) {
- if (i > 0) {
- writeLine();
- }
- write(line);
+ function emitShebangIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ var shebang = ts.getShebang(sourceFileOrBundle.text);
+ if (shebang) {
+ write(shebang);
+ writeLine();
+ return true;
}
}
- }
- function guessIndentation(lines) {
- var indentation;
- for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
- var line = lines_1[_a];
- for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
- if (!ts.isWhiteSpace(line.charCodeAt(i))) {
- if (indentation === undefined || i < indentation) {
- indentation = i;
- break;
- }
+ else {
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ // Emit only the first encountered shebang
+ if (emitShebangIfNeeded(sourceFile)) {
+ break;
}
}
}
- return indentation;
}
//
// Helpers
//
- function emitShebang() {
- var shebang = ts.getShebang(currentText);
- if (shebang) {
- write(shebang);
- writeLine();
- }
- }
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
emitList(node, modifiers, 256 /* Modifiers */);
@@ -61216,8 +65752,8 @@ var ts;
write(suffix);
}
}
- function emitEmbeddedStatement(node) {
- if (ts.isBlock(node)) {
+ function emitEmbeddedStatement(parent, node) {
+ if (ts.isBlock(node) || ts.getEmitFlags(parent) & 1 /* SingleLine */) {
write(" ");
emit(node);
}
@@ -61274,6 +65810,9 @@ var ts;
if (format & 7680 /* BracketsMask */) {
write(getOpeningBracket(format));
}
+ if (onBeforeEmitNodeArray) {
+ onBeforeEmitNodeArray(children);
+ }
if (isEmpty) {
// Write a line terminator if the parent node was multi-line
if (format & 1 /* MultiLine */) {
@@ -61306,6 +65845,15 @@ var ts;
var child = children[start + i];
// Write the delimiter if this is not the first node.
if (previousSibling) {
+ // i.e
+ // function commentedParameters(
+ // /* Parameter a */
+ // a
+ // /* End of parameter a */ -> this comment isn't considered to be trailing comment of parameter "a" due to newline
+ // ,
+ if (delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
write(delimiter);
// Write either a line terminator or whitespace to separate the elements.
if (shouldWriteSeparatingLineTerminator(previousSibling, child, format)) {
@@ -61322,14 +65870,16 @@ var ts;
write(" ");
}
}
+ // Emit this child.
if (shouldEmitInterveningComments) {
- var commentRange = ts.getCommentRange(child);
- emitTrailingCommentsOfPosition(commentRange.pos);
+ if (emitTrailingCommentsOfPosition) {
+ var commentRange = ts.getCommentRange(child);
+ emitTrailingCommentsOfPosition(commentRange.pos);
+ }
}
else {
shouldEmitInterveningComments = mayEmitInterveningComments;
}
- // Emit this child.
emit(child);
if (shouldDecreaseIndentAfterEmit) {
decreaseIndent();
@@ -61342,6 +65892,15 @@ var ts;
if (format & 16 /* CommaDelimited */ && hasTrailingComma) {
write(",");
}
+ // Emit any trailing comment of the last element in the list
+ // i.e
+ // var array = [...
+ // 2
+ // /* end of element 2 */
+ // ];
+ if (previousSibling && delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
// Decrease the indent, if requested.
if (format & 64 /* Indented */) {
decreaseIndent();
@@ -61354,28 +65913,80 @@ var ts;
write(" ");
}
}
+ if (onAfterEmitNodeArray) {
+ onAfterEmitNodeArray(children);
+ }
if (format & 7680 /* BracketsMask */) {
write(getClosingBracket(format));
}
}
+ function write(s) {
+ writer.write(s);
+ }
+ function writeLine() {
+ writer.writeLine();
+ }
+ function increaseIndent() {
+ writer.increaseIndent();
+ }
+ function decreaseIndent() {
+ writer.decreaseIndent();
+ }
function writeIfAny(nodes, text) {
- if (nodes && nodes.length > 0) {
+ if (ts.some(nodes)) {
write(text);
}
}
function writeIfPresent(node, text) {
- if (node !== undefined) {
+ if (node) {
write(text);
}
}
function writeToken(token, pos, contextNode) {
- return emitTokenWithSourceMap(contextNode, token, pos, writeTokenText);
+ return onEmitSourceMapOfToken
+ ? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
+ : writeTokenText(token, pos);
}
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
return pos < 0 ? pos : pos + tokenString.length;
}
+ function writeLineOrSpace(node) {
+ if (ts.getEmitFlags(node) & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ }
+ }
+ function writeLines(text) {
+ var lines = text.split(/\r\n?|\n/g);
+ var indentation = guessIndentation(lines);
+ for (var i = 0; i < lines.length; i++) {
+ var line = indentation ? lines[i].slice(indentation) : lines[i];
+ if (line.length) {
+ writeLine();
+ write(line);
+ writeLine();
+ }
+ }
+ }
+ function guessIndentation(lines) {
+ var indentation;
+ for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
+ var line = lines_1[_a];
+ for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
+ if (!ts.isWhiteSpace(line.charCodeAt(i))) {
+ if (indentation === undefined || i < indentation) {
+ indentation = i;
+ break;
+ }
+ }
+ }
+ }
+ return indentation;
+ }
function increaseIndentIf(value, valueToWriteWhenNotIndenting) {
if (value) {
increaseIndent();
@@ -61485,15 +66096,23 @@ var ts;
&& !ts.nodeIsSynthesized(node2)
&& !ts.rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile);
}
+ function isSingleLineEmptyBlock(block) {
+ return !block.multiLine
+ && isEmptyBlock(block);
+ }
+ function isEmptyBlock(block) {
+ return block.statements.length === 0
+ && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ }
function skipSynthesizedParentheses(node) {
- while (node.kind === 183 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) {
+ while (node.kind === 184 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) {
node = node.expression;
}
return node;
}
function getTextOfNode(node, includeTrivia) {
if (ts.isGeneratedIdentifier(node)) {
- return getGeneratedIdentifier(node);
+ return generateName(node);
}
else if (ts.isIdentifier(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
return ts.unescapeIdentifier(node.text);
@@ -61516,26 +66135,60 @@ var ts;
return getLiteralTextOfNode(textSourceNode);
}
}
- return ts.getLiteralText(node, currentSourceFile, languageVersion);
+ return ts.getLiteralText(node, currentSourceFile);
}
- function isSingleLineEmptyBlock(block) {
- return !block.multiLine
- && isEmptyBlock(block);
+ /**
+ * Push a new name generation scope.
+ */
+ function pushNameGenerationScope() {
+ tempFlagsStack.push(tempFlags);
+ tempFlags = 0;
}
- function isEmptyBlock(block) {
- return block.statements.length === 0
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ /**
+ * Pop the current name generation scope.
+ */
+ function popNameGenerationScope() {
+ tempFlags = tempFlagsStack.pop();
+ }
+ /**
+ * Generate the text for a generated identifier.
+ */
+ function generateName(name) {
+ if (name.autoGenerateKind === 4 /* Node */) {
+ // Node names generate unique names based on their original node
+ // and are cached based on that node's id.
+ var node = getNodeForGeneratedName(name);
+ return generateNameCached(node);
+ }
+ else {
+ // Auto, Loop, and Unique names are cached based on their unique
+ // autoGenerateId.
+ var autoGenerateId = name.autoGenerateId;
+ return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(makeName(name)));
+ }
}
+ function generateNameCached(node) {
+ var nodeId = ts.getNodeId(node);
+ return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
+ }
+ /**
+ * Returns a value indicating whether a name is unique globally, within the current file,
+ * or within the NameGenerator.
+ */
function isUniqueName(name) {
- return !resolver.hasGlobalName(name) &&
- !ts.hasProperty(currentFileIdentifiers, name) &&
- !ts.hasProperty(generatedNameSet, name);
+ return !(hasGlobalName && hasGlobalName(name))
+ && !currentSourceFile.identifiers.has(name)
+ && !generatedNames.has(name);
}
+ /**
+ * Returns a value indicating whether a name is unique within a container.
+ */
function isUniqueLocalName(name, container) {
for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) {
- if (node.locals && ts.hasProperty(node.locals, name)) {
+ if (node.locals) {
+ var local = node.locals.get(name);
// We conservatively include alias symbols to cover cases where they're emitted as locals
- if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {
+ if (local && local.flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {
return false;
}
}
@@ -61543,16 +66196,16 @@ var ts;
return true;
}
/**
- * Return the next available name in the pattern _a ... _z, _0, _1, ...
- * TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name.
- * Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
- */
+ * Return the next available name in the pattern _a ... _z, _0, _1, ...
+ * TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name.
+ * Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
+ */
function makeTempVariableName(flags) {
if (flags && !(tempFlags & flags)) {
- var name_39 = flags === 268435456 /* _i */ ? "_i" : "_n";
- if (isUniqueName(name_39)) {
+ var name = flags === 268435456 /* _i */ ? "_i" : "_n";
+ if (isUniqueName(name)) {
tempFlags |= flags;
- return name_39;
+ return name;
}
}
while (true) {
@@ -61560,19 +66213,21 @@ var ts;
tempFlags++;
// Skip over 'i' and 'n'
if (count !== 8 && count !== 13) {
- var name_40 = count < 26
+ var name = count < 26
? "_" + String.fromCharCode(97 /* a */ + count)
: "_" + (count - 26);
- if (isUniqueName(name_40)) {
- return name_40;
+ if (isUniqueName(name)) {
+ return name;
}
}
}
}
- // Generate a name that is unique within the current file and doesn't conflict with any names
- // in global scope. The name is formed by adding an '_n' suffix to the specified base name,
- // where n is a positive integer. Note that names generated by makeTempVariableName and
- // makeUniqueName are guaranteed to never conflict.
+ /**
+ * Generate a name that is unique within the current file and doesn't conflict with any names
+ * in global scope. The name is formed by adding an '_n' suffix to the specified base name,
+ * where n is a positive integer. Note that names generated by makeTempVariableName and
+ * makeUniqueName are guaranteed to never conflict.
+ */
function makeUniqueName(baseName) {
// Find the first unique 'name_n', where n is a positive number
if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) {
@@ -61582,73 +66237,90 @@ var ts;
while (true) {
var generatedName = baseName + i;
if (isUniqueName(generatedName)) {
- return generatedNameSet[generatedName] = generatedName;
+ generatedNames.set(generatedName, generatedName);
+ return generatedName;
}
i++;
}
}
+ /**
+ * Generates a unique name for a ModuleDeclaration or EnumDeclaration.
+ */
function generateNameForModuleOrEnum(node) {
var name = getTextOfNode(node.name);
// Use module/enum name itself if it is unique, otherwise make a unique variation
return isUniqueLocalName(name, node) ? name : makeUniqueName(name);
}
+ /**
+ * Generates a unique name for an ImportDeclaration or ExportDeclaration.
+ */
function generateNameForImportOrExportDeclaration(node) {
var expr = ts.getExternalModuleName(node);
var baseName = expr.kind === 9 /* StringLiteral */ ?
ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module";
return makeUniqueName(baseName);
}
+ /**
+ * Generates a unique name for a default export.
+ */
function generateNameForExportDefault() {
return makeUniqueName("default");
}
+ /**
+ * Generates a unique name for a class expression.
+ */
function generateNameForClassExpression() {
return makeUniqueName("class");
}
+ function generateNameForMethodOrAccessor(node) {
+ if (ts.isIdentifier(node.name)) {
+ return generateNameCached(node.name);
+ }
+ return makeTempVariableName(0 /* Auto */);
+ }
/**
* Generates a unique name from a node.
- *
- * @param node A node.
*/
function generateNameForNode(node) {
switch (node.kind) {
case 70 /* Identifier */:
return makeUniqueName(getTextOfNode(node));
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
return generateNameForModuleOrEnum(node);
- case 235 /* ImportDeclaration */:
- case 241 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 243 /* ExportDeclaration */:
return generateNameForImportOrExportDeclaration(node);
- case 225 /* FunctionDeclaration */:
- case 226 /* ClassDeclaration */:
- case 240 /* ExportAssignment */:
+ case 227 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 242 /* ExportAssignment */:
return generateNameForExportDefault();
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return generateNameForClassExpression();
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return generateNameForMethodOrAccessor(node);
default:
return makeTempVariableName(0 /* Auto */);
}
}
/**
* Generates a unique identifier for a node.
- *
- * @param name A generated name.
*/
- function generateName(name) {
+ function makeName(name) {
switch (name.autoGenerateKind) {
case 1 /* Auto */:
return makeTempVariableName(0 /* Auto */);
case 2 /* Loop */:
return makeTempVariableName(268435456 /* _i */);
case 3 /* Unique */:
- return makeUniqueName(name.text);
+ return makeUniqueName(ts.unescapeIdentifier(name.text));
}
ts.Debug.fail("Unsupported GeneratedIdentifierKind.");
}
/**
* Gets the node from which a name should be generated.
- *
- * @param name A generated name wrapper.
*/
function getNodeForGeneratedName(name) {
var autoGenerateId = name.autoGenerateId;
@@ -61668,53 +66340,40 @@ var ts;
// otherwise, return the original node for the source;
return node;
}
- /**
- * Gets the generated identifier text from a generated identifier.
- *
- * @param name The generated identifier.
- */
- function getGeneratedIdentifier(name) {
- if (name.autoGenerateKind === 4 /* Node */) {
- // Generated names generate unique names based on their original node
- // and are cached based on that node's id
- var node = getNodeForGeneratedName(name);
- var nodeId = ts.getNodeId(node);
- return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
- }
- else {
- // Auto, Loop, and Unique names are cached based on their unique
- // autoGenerateId.
- var autoGenerateId = name.autoGenerateId;
- return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(generateName(name)));
- }
- }
- function createDelimiterMap() {
- var delimiters = [];
- delimiters[0 /* None */] = "";
- delimiters[16 /* CommaDelimited */] = ",";
- delimiters[4 /* BarDelimited */] = " |";
- delimiters[8 /* AmpersandDelimited */] = " &";
- return delimiters;
- }
- function getDelimiter(format) {
- return delimiters[format & 28 /* DelimitersMask */];
- }
- function createBracketsMap() {
- var brackets = [];
- brackets[512 /* Braces */] = ["{", "}"];
- brackets[1024 /* Parenthesis */] = ["(", ")"];
- brackets[2048 /* AngleBrackets */] = ["<", ">"];
- brackets[4096 /* SquareBrackets */] = ["[", "]"];
- return brackets;
- }
- function getOpeningBracket(format) {
- return brackets[format & 7680 /* BracketsMask */][0];
- }
- function getClosingBracket(format) {
- return brackets[format & 7680 /* BracketsMask */][1];
- }
}
- ts.emitFiles = emitFiles;
+ ts.createPrinter = createPrinter;
+ function createDelimiterMap() {
+ var delimiters = [];
+ delimiters[0 /* None */] = "";
+ delimiters[16 /* CommaDelimited */] = ",";
+ delimiters[4 /* BarDelimited */] = " |";
+ delimiters[8 /* AmpersandDelimited */] = " &";
+ return delimiters;
+ }
+ function getDelimiter(format) {
+ return delimiters[format & 28 /* DelimitersMask */];
+ }
+ function createBracketsMap() {
+ var brackets = [];
+ brackets[512 /* Braces */] = ["{", "}"];
+ brackets[1024 /* Parenthesis */] = ["(", ")"];
+ brackets[2048 /* AngleBrackets */] = ["<", ">"];
+ brackets[4096 /* SquareBrackets */] = ["[", "]"];
+ return brackets;
+ }
+ function getOpeningBracket(format) {
+ return brackets[format & 7680 /* BracketsMask */][0];
+ }
+ function getClosingBracket(format) {
+ return brackets[format & 7680 /* BracketsMask */][1];
+ }
+ // Flags enum to track count of temp variables and a few dedicated names
+ var TempFlags;
+ (function (TempFlags) {
+ TempFlags[TempFlags["Auto"] = 0] = "Auto";
+ TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
+ TempFlags[TempFlags["_i"] = 268435456] = "_i";
+ })(TempFlags || (TempFlags = {}));
var ListFormat;
(function (ListFormat) {
ListFormat[ListFormat["None"] = 0] = "None";
@@ -61790,6 +66449,7 @@ var ts;
var ts;
(function (ts) {
var emptyArray = [];
+ var ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
function findConfigFile(searchPath, fileExists, configName) {
if (configName === void 0) { configName = "tsconfig.json"; }
while (true) {
@@ -61824,7 +66484,8 @@ var ts;
commonPathComponents = sourcePathComponents;
return;
}
- for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
+ var n = Math.min(commonPathComponents.length, sourcePathComponents.length);
+ for (var i = 0; i < n; i++) {
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
if (i === 0) {
// Failed to find any common path component
@@ -61857,8 +66518,6 @@ var ts;
// otherwise use toLowerCase as a canonical form.
return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
}
- // returned by CScript sys environment
- var unsupportedFileEncodingErrorCode = -2147024809;
function getSourceFile(fileName, languageVersion, onError) {
var text;
try {
@@ -61869,20 +66528,18 @@ var ts;
}
catch (e) {
if (onError) {
- onError(e.number === unsupportedFileEncodingErrorCode
- ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
- : e.message);
+ onError(e.message);
}
text = "";
}
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath) {
- if (directoryPath in existingDirectories) {
+ if (existingDirectories.has(directoryPath)) {
return true;
}
if (ts.sys.directoryExists(directoryPath)) {
- existingDirectories[directoryPath] = true;
+ existingDirectories.set(directoryPath, true);
return true;
}
return false;
@@ -61901,10 +66558,11 @@ var ts;
}
var hash = ts.sys.createHash(data);
var mtimeBefore = ts.sys.getModifiedTime(fileName);
- if (mtimeBefore && fileName in outputFingerprints) {
- var fingerprint = outputFingerprints[fileName];
+ if (mtimeBefore) {
+ var fingerprint = outputFingerprints.get(fileName);
// If output has not been changed, and the file has no external modification
- if (fingerprint.byteOrderMark === writeByteOrderMark &&
+ if (fingerprint &&
+ fingerprint.byteOrderMark === writeByteOrderMark &&
fingerprint.hash === hash &&
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
return;
@@ -61912,11 +66570,11 @@ var ts;
}
ts.sys.writeFile(fileName, data, writeByteOrderMark);
var mtimeAfter = ts.sys.getModifiedTime(fileName);
- outputFingerprints[fileName] = {
+ outputFingerprints.set(fileName, {
hash: hash,
byteOrderMark: writeByteOrderMark,
mtime: mtimeAfter
- };
+ });
}
function writeFile(fileName, data, writeByteOrderMark, onError) {
try {
@@ -62015,10 +66673,14 @@ var ts;
var resolutions = [];
var cache = ts.createMap();
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
- var name_41 = names_1[_i];
- var result = name_41 in cache
- ? cache[name_41]
- : cache[name_41] = loader(name_41, containingFile);
+ var name = names_1[_i];
+ var result = void 0;
+ if (cache.has(name)) {
+ result = cache.get(name);
+ }
+ else {
+ cache.set(name, result = loader(name, containingFile));
+ }
resolutions.push(result);
}
return resolutions;
@@ -62030,6 +66692,8 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var cachedSemanticDiagnosticsForFile = {};
+ var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
var fileProcessingDiagnostics = ts.createDiagnosticCollection();
// The below settings are to track if a .js file should be add to the program if loaded via searching under node_modules.
@@ -62054,6 +66718,7 @@ var ts;
var supportedExtensions = ts.getSupportedExtensions(options);
// Map storing if there is emit blocking diagnostics for given input
var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName);
+ var moduleResolutionCache;
var resolveModuleNamesWorker;
if (host.resolveModuleNames) {
resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile).map(function (resolved) {
@@ -62067,7 +66732,8 @@ var ts;
}); };
}
else {
- var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host).resolvedModule; };
+ moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); });
+ var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache).resolvedModule; };
resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); };
}
var resolveTypeReferenceDirectiveNamesWorker;
@@ -62113,6 +66779,8 @@ var ts;
}
}
}
+ // unconditionally set moduleResolutionCache to undefined to avoid unnecessary leaks
+ moduleResolutionCache = undefined;
// unconditionally set oldProgram to undefined to prevent it from being captured in closure
oldProgram = undefined;
program = {
@@ -62147,7 +66815,7 @@ var ts;
return program;
function getCommonSourceDirectory() {
if (commonSourceDirectory === undefined) {
- var emittedFiles = ts.filterSourceFilesInDirectory(files, isSourceFileFromExternalLibrary);
+ var emittedFiles = ts.filter(files, function (file) { return ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary); });
if (options.rootDir && checkSourceFilesBelongToPath(emittedFiles, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory);
@@ -62171,7 +66839,7 @@ var ts;
classifiableNames = ts.createMap();
for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
var sourceFile = files_2[_i];
- ts.copyProperties(sourceFile.classifiableNames, classifiableNames);
+ ts.copyEntries(sourceFile.classifiableNames, classifiableNames);
}
}
return classifiableNames;
@@ -62245,7 +66913,7 @@ var ts;
// combine results of resolutions and predicted results
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] == predictedToResolveToAmbientModuleMarker) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
result[i] = undefined;
}
else {
@@ -62378,7 +67046,7 @@ var ts;
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
// update fileName -> file mapping
- for (var i = 0, len = newSourceFiles.length; i < len; i++) {
+ for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
}
files = newSourceFiles;
@@ -62407,7 +67075,7 @@ var ts;
};
}
function isSourceFileFromExternalLibrary(file) {
- return sourceFilesFoundSearchingNodeModules[file.path];
+ return sourceFilesFoundSearchingNodeModules.get(file.path);
}
function getDiagnosticsProducingTypeChecker() {
return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ true));
@@ -62418,13 +67086,13 @@ var ts;
function getTypeChecker() {
return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ false));
}
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
- return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles); });
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers) {
+ return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers); });
}
function isEmitBlocked(emitFileName) {
return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName));
}
- function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
+ function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers) {
var declarationDiagnostics = [];
if (options.noEmit) {
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
@@ -62456,7 +67124,8 @@ var ts;
// checked is to not pass the file to getEmitResolver.
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile);
ts.performance.mark("beforeEmit");
- var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles);
+ var transformers = emitOnlyDtsFiles ? [] : ts.getTransformers(options, customTransformers);
+ var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles, transformers);
ts.performance.mark("afterEmit");
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
return emitResult;
@@ -62529,19 +67198,48 @@ var ts;
}
}
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedSemanticDiagnosticsForFile, getSemanticDiagnosticsForFileNoCache);
+ }
+ function getSemanticDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
var bindDiagnostics = sourceFile.bindDiagnostics;
- // For JavaScript files, we don't want to report semantic errors.
- // Instead, we'll report errors for using TypeScript-only constructs from within a
- // JavaScript file when we get syntactic diagnostics for the file.
- var checkDiagnostics = ts.isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
+ // For JavaScript files, we don't want to report semantic errors unless explicitly requested.
+ var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
- return bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ return ts.isSourceFileJavaScript(sourceFile)
+ ? ts.filter(diagnostics, shouldReportDiagnostic)
+ : diagnostics;
});
}
+ /**
+ * Skip errors if previous line start with '// @ts-ignore' comment, not counting non-empty non-comment lines
+ */
+ function shouldReportDiagnostic(diagnostic) {
+ var file = diagnostic.file, start = diagnostic.start;
+ if (file) {
+ var lineStarts = ts.getLineStarts(file);
+ var line = ts.computeLineAndCharacterOfPosition(lineStarts, start).line;
+ while (line > 0) {
+ var previousLineText = file.text.slice(lineStarts[line - 1], lineStarts[line]);
+ var result = ignoreDiagnosticCommentRegEx.exec(previousLineText);
+ if (!result) {
+ // non-empty line
+ return true;
+ }
+ if (result[3]) {
+ // @ts-ignore
+ return false;
+ }
+ line--;
+ }
+ }
+ return true;
+ }
function getJavaScriptSyntacticDiagnosticsForFile(sourceFile) {
return runWithCancellationToken(function () {
var diagnostics = [];
@@ -62552,23 +67250,23 @@ var ts;
// Return directly from the case if the given node doesnt want to visit each child
// Otherwise break to visit each child
switch (parent.kind) {
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
if (parent.questionToken === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
return;
}
- // Pass through
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 223 /* VariableDeclaration */:
+ // falls through
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 225 /* VariableDeclaration */:
// type annotation
if (parent.type === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file));
@@ -62576,35 +67274,35 @@ var ts;
}
}
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file));
return;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
if (node.isExportEquals) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
var heritageClause = node;
if (heritageClause.token === 107 /* ImplementsKeyword */) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));
return;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));
return;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));
return;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));
return;
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
var typeAssertionExpression = node;
diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));
return;
@@ -62619,29 +67317,29 @@ var ts;
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
}
switch (parent.kind) {
- case 226 /* ClassDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
// Check type parameters
if (nodes === parent.typeParameters) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));
return;
}
- // pass through
- case 205 /* VariableStatement */:
+ // falls through
+ case 207 /* VariableStatement */:
// Check modifiers
if (nodes === parent.modifiers) {
- return checkModifiers(nodes, parent.kind === 205 /* VariableStatement */);
+ return checkModifiers(nodes, parent.kind === 207 /* VariableStatement */);
}
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// Check modifiers of property declaration
if (nodes === parent.modifiers) {
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
@@ -62653,16 +67351,16 @@ var ts;
return;
}
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Check modifiers of parameter declaration
if (nodes === parent.modifiers) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 199 /* ExpressionWithTypeArguments */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 200 /* ExpressionWithTypeArguments */:
// Check type arguments
if (nodes === parent.typeArguments) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file));
@@ -62670,8 +67368,8 @@ var ts;
}
break;
}
- for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) {
- var node = nodes_6[_b];
+ for (var _b = 0, nodes_8 = nodes; _b < nodes_8.length; _b++) {
+ var node = nodes_8[_b];
walk(node);
}
}
@@ -62683,7 +67381,8 @@ var ts;
if (isConstValid) {
continue;
}
- // Fallthrough to report error
+ // to report error,
+ // falls through
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
@@ -62711,12 +67410,34 @@ var ts;
});
}
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
+ }
+ function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
return ts.getDeclarationDiagnostics(getEmitHost(ts.noop), resolver, sourceFile);
});
}
+ function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics) {
+ var cachedResult = sourceFile
+ ? cache.perFile && cache.perFile.get(sourceFile.path)
+ : cache.allDiagnostics;
+ if (cachedResult) {
+ return cachedResult;
+ }
+ var result = getDiagnostics(sourceFile, cancellationToken) || emptyArray;
+ if (sourceFile) {
+ if (!cache.perFile) {
+ cache.perFile = ts.createFileMap();
+ }
+ cache.perFile.set(sourceFile.path, result);
+ }
+ else {
+ cache.allDiagnostics = result;
+ }
+ return result;
+ }
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
@@ -62759,11 +67480,10 @@ var ts;
&& (options.isolatedModules || isExternalModuleFile)
&& !file.isDeclarationFile) {
// synthesize 'import "tslib"' declaration
- var externalHelpersModuleReference = ts.createSynthesizedNode(9 /* StringLiteral */);
- externalHelpersModuleReference.text = ts.externalHelpersModuleNameText;
- var importDecl = ts.createSynthesizedNode(235 /* ImportDeclaration */);
- importDecl.parent = file;
+ var externalHelpersModuleReference = ts.createLiteral(ts.externalHelpersModuleNameText);
+ var importDecl = ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, /*importClause*/ undefined);
externalHelpersModuleReference.parent = importDecl;
+ importDecl.parent = file;
imports = [externalHelpersModuleReference];
}
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
@@ -62779,9 +67499,9 @@ var ts;
return;
function collectModuleReferences(node, inAmbientModule) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
var moduleNameExpr = ts.getExternalModuleName(node);
if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) {
break;
@@ -62796,7 +67516,7 @@ var ts;
(imports || (imports = [])).push(moduleNameExpr);
}
break;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) {
var moduleName = node.name;
// Ambient module declarations can be interpreted as augmentations for some existing external modules.
@@ -62896,18 +67616,18 @@ var ts;
}
// If the file was previously found via a node_modules search, but is now being processed as a root file,
// then everything it sucks in may also be marked incorrectly, and needs to be checked again.
- if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
- sourceFilesFoundSearchingNodeModules[file_1.path] = false;
+ if (file_1 && sourceFilesFoundSearchingNodeModules.get(file_1.path) && currentNodeModulesDepth === 0) {
+ sourceFilesFoundSearchingNodeModules.set(file_1.path, false);
if (!options.noResolve) {
processReferencedFiles(file_1, isDefaultLib);
processTypeReferenceDirectives(file_1);
}
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
- else if (file_1 && modulesWithElidedImports[file_1.path]) {
+ else if (file_1 && modulesWithElidedImports.get(file_1.path)) {
if (currentNodeModulesDepth < maxNodeModuleJsDepth) {
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
}
@@ -62924,7 +67644,7 @@ var ts;
});
filesByName.set(path, file);
if (file) {
- sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
+ sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
file.path = path;
if (host.useCaseSensitiveFileNames()) {
// for case-sensitive file systems check if we've already seen some file with similar filename ignoring case
@@ -62973,7 +67693,7 @@ var ts;
}
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) {
// If we already found this library as a primary reference - nothing to do
- var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective];
+ var previousResolution = resolvedTypeReferenceDirectives.get(typeReferenceDirective);
if (previousResolution && previousResolution.primary) {
return;
}
@@ -63007,7 +67727,7 @@ var ts;
fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective));
}
if (saveResolution) {
- resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective;
+ resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
}
}
function createDiagnostic(refFile, refPos, refEnd, message) {
@@ -63056,7 +67776,7 @@ var ts;
// This may still end up being an untyped module -- the file won't be included but imports will be allowed.
var shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport;
if (elideImport) {
- modulesWithElidedImports[file.path] = true;
+ modulesWithElidedImports.set(file.path, true);
}
else if (shouldAddFile) {
var path = ts.toPath(resolvedFileName, currentDirectory, getCanonicalFileName);
@@ -63075,8 +67795,8 @@ var ts;
}
function computeCommonSourceDirectory(sourceFiles) {
var fileNames = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var file = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
+ var file = sourceFiles_2[_i];
if (!file.isDeclarationFile) {
fileNames.push(file.fileName);
}
@@ -63087,8 +67807,8 @@ var ts;
var allFilesBelongToPath = true;
if (sourceFiles) {
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
+ for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
+ var sourceFile = sourceFiles_3[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
@@ -63182,7 +67902,7 @@ var ts;
if (options.lib && options.noLib) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"));
}
- if (options.noImplicitUseStrict && options.alwaysStrict) {
+ if (options.noImplicitUseStrict && (options.alwaysStrict === undefined ? options.strict : options.alwaysStrict)) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"));
}
var languageVersion = options.target || 0 /* ES3 */;
@@ -63228,6 +67948,9 @@ var ts;
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+ if (options.checkJs && !options.allowJs) {
+ programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"));
+ }
if (options.emitDecoratorMetadata &&
!options.experimentalDecorators) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
@@ -63247,7 +67970,7 @@ var ts;
if (!options.noEmit && !options.suppressOutputPathCheck) {
var emitHost = getEmitHost();
var emitFilesSeen_1 = ts.createFileMap(!host.useCaseSensitiveFileNames() ? function (key) { return key.toLocaleLowerCase(); } : undefined);
- ts.forEachExpectedEmitFile(emitHost, function (emitFileNames) {
+ ts.forEachEmittedFile(emitHost, function (emitFileNames) {
verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen_1);
verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen_1);
});
@@ -63323,40 +68046,13 @@ var ts;
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
/* @internal */
ts.optionDeclarations = [
- {
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
+ // CommandLine only options
{
name: "help",
shortName: "h",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
description: ts.Diagnostics.Print_this_message,
},
{
@@ -63365,56 +68061,74 @@ var ts;
type: "boolean"
},
{
- name: "init",
+ name: "all",
type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
},
{
- name: "inlineSourceMap",
+ name: "version",
+ shortName: "v",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
},
{
- name: "inlineSources",
+ name: "init",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
},
{
- name: "jsx",
- type: ts.createMap({
- "preserve": 1 /* Preserve */,
- "react": 2 /* React */
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
+ name: "project",
+ shortName: "p",
type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
},
{
- name: "listFiles",
+ name: "pretty",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
- name: "locale",
- type: "string",
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
},
+ // Basic
{
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0 /* ES3 */,
+ "es5": 1 /* ES5 */,
+ "es6": 2 /* ES2015 */,
+ "es2015": 2 /* ES2015 */,
+ "es2016": 3 /* ES2016 */,
+ "es2017": 4 /* ES2017 */,
+ "esnext": 5 /* ESNext */,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
},
{
name: "module",
shortName: "m",
- type: ts.createMap({
+ type: ts.createMapFromTemplate({
"none": ts.ModuleKind.None,
"commonjs": ts.ModuleKind.CommonJS,
"amd": ts.ModuleKind.AMD,
@@ -63423,233 +68137,230 @@ var ts;
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
}),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
},
{
- name: "newLine",
- type: ts.createMap({
- "crlf": 0 /* CarriageReturnLineFeed */,
- "lf": 1 /* LineFeed */
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ // JavaScript only
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ // Host only
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ // ES2015 Or ESNext By-feature options
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
},
{
- name: "noUnusedParameters",
+ name: "allowJs",
type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
},
{
- name: "noLib",
+ name: "checkJs",
type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
},
{
- name: "noResolve",
- type: "boolean",
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1 /* Preserve */,
+ "react-native": 3 /* ReactNative */,
+ "react": 2 /* React */
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
},
{
- name: "skipDefaultLibCheck",
+ name: "declaration",
+ shortName: "d",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
},
{
- name: "skipLibCheck",
+ name: "sourceMap",
type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- // for correct behaviour, please use outFile
- paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
},
{
name: "outFile",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
},
{
name: "outDir",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
- name: "isolatedModules",
+ name: "removeComments",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
},
{
- name: "sourceMap",
+ name: "noEmit",
type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
},
{
- name: "suppressExcessPropertyErrors",
+ name: "importHelpers",
type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
},
{
- name: "suppressImplicitAnyIndexErrors",
+ name: "downlevelIteration",
type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
},
{
- name: "stripInternal",
+ name: "isolatedModules",
type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
},
+ // Strict Type Checks
{
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0 /* ES3 */,
- "es5": 1 /* ES5 */,
- "es6": 2 /* ES2015 */,
- "es2015": 2 /* ES2015 */,
- "es2016": 3 /* ES2016 */,
- "es2017": 4 /* ES2017 */,
- "esnext": 5 /* ESNext */,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
},
{
- name: "version",
- shortName: "v",
+ name: "noImplicitAny",
type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
},
{
- name: "watch",
- shortName: "w",
+ name: "strictNullChecks",
type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
},
{
- name: "experimentalDecorators",
+ name: "noImplicitThis",
type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
},
{
- name: "emitDecoratorMetadata",
+ name: "alwaysStrict",
type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
},
+ // Additional Checks
{
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
},
{
- name: "allowUnusedLabels",
+ name: "noUnusedParameters",
type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
},
{
name: "noImplicitReturns",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
},
{
name: "noFallthroughCasesInSwitch",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
},
+ // Module Resolution
{
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "baseUrl",
type: "string",
isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
},
{
@@ -63657,7 +68368,9 @@ var ts;
// use type = object to copy the value as-is
name: "paths",
type: "object",
- isTSConfigOnly: true
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
},
{
// this option can only be specified in tsconfig.json
@@ -63669,7 +68382,9 @@ var ts;
name: "rootDirs",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
},
{
name: "typeRoots",
@@ -63678,7 +68393,9 @@ var ts;
name: "typeRoots",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
},
{
name: "types",
@@ -63687,91 +68404,258 @@ var ts;
name: "types",
type: "string"
},
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
},
{
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ // Source Maps
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ // Experimental
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ // Advanced
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
name: "traceResolution",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
},
{
- name: "allowJs",
+ name: "listFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
},
{
- name: "allowSyntheticDefaultImports",
+ name: "listEmittedFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ // for correct behaviour, please use outFile
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0 /* CarriageReturnLineFeed */,
+ "lf": 1 /* LineFeed */
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
},
{
name: "noImplicitUseStrict",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
},
{
- name: "listEmittedFiles",
- type: "boolean"
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
},
{
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- // JavaScript only
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- // Host only
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- // ES2015 Or ESNext By-feature options
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
},
{
- name: "disableSizeLimit",
- type: "boolean"
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
},
{
- name: "strictNullChecks",
+ name: "skipLibCheck",
type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
},
{
- name: "importHelpers",
+ name: "allowUnusedLabels",
type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
},
{
- name: "alwaysStrict",
+ name: "allowUnreachableCode",
type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ // A list of plugins to load in the language service
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
}
];
/* @internal */
@@ -63808,8 +68692,7 @@ var ts;
ts.defaultInitCompilerOptions = {
module: ts.ModuleKind.CommonJS,
target: 1 /* ES5 */,
- noImplicitAny: false,
- sourceMap: false,
+ strict: true
};
var optionNameMapCache;
/* @internal */
@@ -63834,9 +68717,9 @@ var ts;
var optionNameMap = ts.createMap();
var shortOptionNames = ts.createMap();
ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
+ optionNameMap.set(option.name.toLowerCase(), option);
if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
+ shortOptionNames.set(option.shortName, option.name);
}
});
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
@@ -63845,20 +68728,13 @@ var ts;
ts.getOptionNameMap = getOptionNameMap;
/* @internal */
function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
}
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
/* @internal */
function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
}
ts.parseCustomTypeOption = parseCustomTypeOption;
/* @internal */
@@ -63882,7 +68758,6 @@ var ts;
}
}
ts.parseListTypeOption = parseListTypeOption;
- /* @internal */
function parseCommandLine(commandLine, readFile) {
var options = {};
var fileNames = [];
@@ -63905,11 +68780,12 @@ var ts;
else if (s.charCodeAt(0) === 45 /* minus */) {
s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase();
// Try to translate short option names to their full equivalents.
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
}
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
+ var opt = optionNameMap.get(s);
+ if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
}
@@ -63997,9 +68873,9 @@ var ts;
}
ts.parseCommandLine = parseCommandLine;
/**
- * Read tsconfig.json file
- * @param fileName The path to the config file
- */
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -64012,10 +68888,10 @@ var ts;
}
ts.readConfigFile = readConfigFile;
/**
- * Parse the text of the tsconfig.json file
- * @param fileName The path to the config file
- * @param jsonText The text of the config file
- */
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
function parseConfigFileTextToJson(fileName, jsonText, stripComments) {
if (stripComments === void 0) { stripComments = true; }
try {
@@ -64033,7 +68909,7 @@ var ts;
* @param fileNames array of filenames to be generated into tsconfig.json
*/
/* @internal */
- function generateTSConfig(options, fileNames) {
+ function generateTSConfig(options, fileNames, newLine) {
var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
var configurations = {
compilerOptions: serializeCompilerOptions(compilerOptions)
@@ -64042,7 +68918,7 @@ var ts;
// only set the files property if we have at least one file
configurations.files = fileNames;
}
- return configurations;
+ return writeConfigurations();
function getCustomTypeMapOfCommandLineOption(optionDefinition) {
if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
// this is of a type CommandLineOptionOfPrimitiveType
@@ -64057,58 +68933,130 @@ var ts;
}
function getNameOfCompilerOptionValue(value, customTypeMap) {
// There is a typeMap associated with this command-line option so use it to map value back to its name
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
return key;
}
- }
- return undefined;
+ });
}
function serializeCompilerOptions(options) {
- var result = ts.createMap();
+ var result = {};
var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_42 in options) {
- if (ts.hasProperty(options, name_42)) {
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
// tsconfig only options cannot be specified via command line,
// so we can assume that only types that can appear here string | number | boolean
- switch (name_42) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_42];
- var optionDefinition = optionsNameMap[name_42.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- // There is no map associated with this compiler option then use the value as-is
- // This is the case if the value is expect to be string, number, boolean or list of string
- result[name_42] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_42] = convertedValue;
- }
- else {
- // There is a typeMap associated with this command-line option so use it to map value back to its name
- result[name_42] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ // There is no map associated with this compiler option then use the value as-is
+ // This is the case if the value is expect to be string, number, boolean or list of string
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
}
+ result[name] = convertedValue;
}
- break;
+ else {
+ // There is a typeMap associated with this command-line option so use it to map value back to its name
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
}
}
}
return result;
}
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ // Filter applicable options to place in the file
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ // Serialize all options and thier descriptions
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ // Write the output
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ // Print out each row, aligning all the descriptions on the same column.
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
}
ts.generateTSConfig = generateTSConfig;
/**
@@ -64136,16 +69084,18 @@ var ts;
return output;
}
/**
- * Parse the contents of a config file (tsconfig.json).
- * @param json The contents of the config file to parse
- * @param host Instance of ParseConfigHost used to enumerate files in folder.
- * @param basePath A root directory to resolve relative path entries in the config
- * file to. e.g. outDir
- */
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
if (existingOptions === void 0) { existingOptions = {}; }
if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
if (resolutionStack.indexOf(resolvedPath) >= 0) {
@@ -64272,7 +69222,7 @@ var ts;
if (fileNames === undefined && includeSpecs === undefined) {
includeSpecs = ["**/*"];
}
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
}
@@ -64323,8 +69273,8 @@ var ts;
}
var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
+ var opt = optionNameMap.get(id);
+ if (opt) {
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
@@ -64358,8 +69308,9 @@ var ts;
}
function convertJsonOptionOfCustomType(opt, value, errors) {
var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
@@ -64449,7 +69400,7 @@ var ts;
* @param host The host used to resolve files and directories.
* @param errors An array for diagnostic reporting.
*/
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
basePath = ts.normalizePath(basePath);
// The exclude spec list is converted into a regular expression, which allows us to quickly
// test whether a file or directory should be excluded before recursively traversing the
@@ -64476,14 +69427,14 @@ var ts;
var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
// Rather than requery this for each file and filespec, we query the supported extensions
// once and store it on the expansion context.
- var supportedExtensions = ts.getSupportedExtensions(options);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
// Literal files are always included verbatim. An "include" or "exclude" specification cannot
// remove a literal file.
if (fileNames) {
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
var fileName = fileNames_1[_i];
var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
+ literalFileMap.set(keyMapper(file), file);
}
}
if (include && include.length > 0) {
@@ -64504,14 +69455,13 @@ var ts;
// same directory, we should remove it.
removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
}
}
}
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
return {
fileNames: literalFiles.concat(wildcardFiles),
wildcardDirectories: wildcardDirectories
@@ -64519,8 +69469,8 @@ var ts;
}
function validateSpecs(specs, errors, allowTrailingRecursion) {
var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
}
@@ -64554,7 +69504,7 @@ var ts;
// /a/b/a?z - Watch /a/b directly to catch any new file matching a?z
var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
+ var wildcardDirectories = {};
if (include !== undefined) {
var recursiveKeys = [];
for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
@@ -64576,14 +69526,15 @@ var ts;
}
}
// Remove any subpaths under an existing recursively watched directory.
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
}
}
- }
}
return wildcardDirectories;
}
@@ -64610,11 +69561,11 @@ var ts;
*/
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
for (var i = 0 /* Highest */; i < adjustedExtensionPriority; i++) {
var higherPriorityExtension = extensions[i];
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
return true;
}
}
@@ -64630,24 +69581,14 @@ var ts;
*/
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
for (var i = nextExtensionPriority; i < extensions.length; i++) {
var lowerPriorityExtension = extensions[i];
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
+ wildcardFiles.delete(lowerPriorityPath);
}
}
/**
- * Adds a file to an array of files.
- *
- * @param output The output array.
- * @param file The file path.
- */
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
- /**
* Gets a case sensitive key.
*
* @param key The original key.
@@ -64673,7 +69614,9 @@ var ts;
this.text = text;
}
StringScriptSnapshot.prototype.getText = function (start, end) {
- return this.text.substring(start, end);
+ return start === 0 && end === this.text.length
+ ? this.text
+ : this.text.substring(start, end);
};
StringScriptSnapshot.prototype.getLength = function () {
return this.text.length;
@@ -64783,8 +69726,7 @@ var ts;
ScriptElementKind.typeElement = "type";
/** enum E */
ScriptElementKind.enumElement = "enum";
- // TODO: GH#9983
- ScriptElementKind.enumMemberElement = "const";
+ ScriptElementKind.enumMemberElement = "enum member";
/**
* Inside module and script only
* const v = ..
@@ -64827,6 +69769,10 @@ var ts;
ScriptElementKind.letElement = "let";
ScriptElementKind.directory = "directory";
ScriptElementKind.externalModuleName = "external module name";
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ */
+ ScriptElementKind.jsxAttribute = "JSX attribute";
})(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {}));
var ScriptElementKindModifier;
(function (ScriptElementKindModifier) {
@@ -64912,33 +69858,34 @@ var ts;
})(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {}));
function getMeaningFromDeclaration(node) {
switch (node.kind) {
- case 144 /* Parameter */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
- case 260 /* EnumMember */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 256 /* CatchClause */:
+ case 145 /* Parameter */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 263 /* EnumMember */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 259 /* CatchClause */:
+ case 252 /* JsxAttribute */:
return 1 /* Value */;
- case 143 /* TypeParameter */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 161 /* TypeLiteral */:
+ case 144 /* TypeParameter */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 162 /* TypeLiteral */:
return 2 /* Type */;
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
return 1 /* Value */ | 2 /* Type */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.isAmbientModule(node)) {
return 4 /* Namespace */ | 1 /* Value */;
}
@@ -64948,22 +69895,25 @@ var ts;
else {
return 4 /* Namespace */;
}
- case 238 /* NamedImports */:
- case 239 /* ImportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 235 /* ImportDeclaration */:
- case 240 /* ExportAssignment */:
- case 241 /* ExportDeclaration */:
+ case 240 /* NamedImports */:
+ case 241 /* ImportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 243 /* ExportDeclaration */:
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
// An external module can be a Value
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return 4 /* Namespace */ | 1 /* Value */;
}
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
- if (node.parent.kind === 240 /* ExportAssignment */) {
+ if (node.kind === 264 /* SourceFile */) {
+ return 1 /* Value */;
+ }
+ else if (node.parent.kind === 242 /* ExportAssignment */) {
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
else if (isInRightSideOfImport(node)) {
@@ -64988,15 +69938,15 @@ var ts;
// import a = |b|; // Namespace
// import a = |b.c|; // Value, type, namespace
// import a = |b.c|.d; // Namespace
- if (node.parent.kind === 141 /* QualifiedName */ &&
+ if (node.parent.kind === 142 /* QualifiedName */ &&
node.parent.right === node &&
- node.parent.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ node.parent.parent.kind === 236 /* ImportEqualsDeclaration */) {
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
return 4 /* Namespace */;
}
function isInRightSideOfImport(node) {
- while (node.parent.kind === 141 /* QualifiedName */) {
+ while (node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
@@ -65007,27 +69957,27 @@ var ts;
function isQualifiedNameNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 141 /* QualifiedName */) {
- while (root.parent && root.parent.kind === 141 /* QualifiedName */) {
+ if (root.parent.kind === 142 /* QualifiedName */) {
+ while (root.parent && root.parent.kind === 142 /* QualifiedName */) {
root = root.parent;
}
isLastClause = root.right === node;
}
- return root.parent.kind === 157 /* TypeReference */ && !isLastClause;
+ return root.parent.kind === 158 /* TypeReference */ && !isLastClause;
}
function isPropertyAccessNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 177 /* PropertyAccessExpression */) {
- while (root.parent && root.parent.kind === 177 /* PropertyAccessExpression */) {
+ if (root.parent.kind === 178 /* PropertyAccessExpression */) {
+ while (root.parent && root.parent.kind === 178 /* PropertyAccessExpression */) {
root = root.parent;
}
isLastClause = root.name === node;
}
- if (!isLastClause && root.parent.kind === 199 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 255 /* HeritageClause */) {
+ if (!isLastClause && root.parent.kind === 200 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 258 /* HeritageClause */) {
var decl = root.parent.parent.parent;
- return (decl.kind === 226 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) ||
- (decl.kind === 227 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */);
+ return (decl.kind === 228 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) ||
+ (decl.kind === 229 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */);
}
return false;
}
@@ -65035,17 +69985,17 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 157 /* TypeReference */ ||
- (node.parent.kind === 199 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
+ return node.parent.kind === 158 /* TypeReference */ ||
+ (node.parent.kind === 200 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
(node.kind === 98 /* ThisKeyword */ && !ts.isPartOfExpression(node)) ||
- node.kind === 167 /* ThisType */;
+ node.kind === 168 /* ThisType */;
}
function isCallExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 179 /* CallExpression */);
+ return isCallOrNewExpressionTarget(node, 180 /* CallExpression */);
}
ts.isCallExpressionTarget = isCallExpressionTarget;
function isNewExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 180 /* NewExpression */);
+ return isCallOrNewExpressionTarget(node, 181 /* NewExpression */);
}
ts.isNewExpressionTarget = isNewExpressionTarget;
function isCallOrNewExpressionTarget(node, kind) {
@@ -65058,7 +70008,7 @@ var ts;
ts.climbPastPropertyAccess = climbPastPropertyAccess;
function getTargetLabel(referenceNode, labelName) {
while (referenceNode) {
- if (referenceNode.kind === 219 /* LabeledStatement */ && referenceNode.label.text === labelName) {
+ if (referenceNode.kind === 221 /* LabeledStatement */ && referenceNode.label.text === labelName) {
return referenceNode.label;
}
referenceNode = referenceNode.parent;
@@ -65068,13 +70018,13 @@ var ts;
ts.getTargetLabel = getTargetLabel;
function isJumpStatementTarget(node) {
return node.kind === 70 /* Identifier */ &&
- (node.parent.kind === 215 /* BreakStatement */ || node.parent.kind === 214 /* ContinueStatement */) &&
+ (node.parent.kind === 217 /* BreakStatement */ || node.parent.kind === 216 /* ContinueStatement */) &&
node.parent.label === node;
}
ts.isJumpStatementTarget = isJumpStatementTarget;
function isLabelOfLabeledStatement(node) {
return node.kind === 70 /* Identifier */ &&
- node.parent.kind === 219 /* LabeledStatement */ &&
+ node.parent.kind === 221 /* LabeledStatement */ &&
node.parent.label === node;
}
function isLabelName(node) {
@@ -65082,15 +70032,15 @@ var ts;
}
ts.isLabelName = isLabelName;
function isRightSideOfQualifiedName(node) {
- return node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node;
+ return node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node;
}
ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName;
function isRightSideOfPropertyAccess(node) {
- return node && node.parent && node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node;
+ return node && node.parent && node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node;
}
ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess;
function isNameOfModuleDeclaration(node) {
- return node.parent.kind === 230 /* ModuleDeclaration */ && node.parent.name === node;
+ return node.parent.kind === 232 /* ModuleDeclaration */ && node.parent.name === node;
}
ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration;
function isNameOfFunctionDeclaration(node) {
@@ -65101,19 +70051,19 @@ var ts;
function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) {
if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) {
switch (node.parent.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 260 /* EnumMember */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 230 /* ModuleDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 263 /* EnumMember */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 232 /* ModuleDeclaration */:
return node.parent.name === node;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return node.parent.argumentExpression === node;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return true;
}
}
@@ -65162,17 +70112,17 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 261 /* SourceFile */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
return node;
}
}
@@ -65180,46 +70130,46 @@ var ts;
ts.getContainerNode = getContainerNode;
function getNodeKind(node) {
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return ts.ScriptElementKind.moduleElement;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return ts.ScriptElementKind.classElement;
- case 227 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement;
- case 228 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement;
- case 229 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement;
- case 223 /* VariableDeclaration */:
+ case 229 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement;
+ case 230 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement;
+ case 231 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement;
+ case 225 /* VariableDeclaration */:
return getKindOfVariableDeclaration(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return getKindOfVariableDeclaration(ts.getRootDeclaration(node));
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return ts.ScriptElementKind.functionElement;
- case 151 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement;
- case 152 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 152 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement;
+ case 153 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return ts.ScriptElementKind.memberFunctionElement;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return ts.ScriptElementKind.memberVariableElement;
- case 155 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement;
- case 154 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement;
- case 153 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement;
- case 150 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement;
- case 143 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement;
- case 260 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement;
- case 144 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
- case 234 /* ImportEqualsDeclaration */:
- case 239 /* ImportSpecifier */:
- case 236 /* ImportClause */:
- case 243 /* ExportSpecifier */:
- case 237 /* NamespaceImport */:
+ case 156 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement;
+ case 155 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement;
+ case 154 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement;
+ case 151 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement;
+ case 144 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement;
+ case 263 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement;
+ case 145 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
+ case 236 /* ImportEqualsDeclaration */:
+ case 241 /* ImportSpecifier */:
+ case 238 /* ImportClause */:
+ case 245 /* ExportSpecifier */:
+ case 239 /* NamespaceImport */:
return ts.ScriptElementKind.alias;
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -65233,15 +70183,6 @@ var ts;
}
}
ts.getNodeKind = getNodeKind;
- function getStringLiteralTypeForNode(node, typeChecker) {
- var searchNode = node.parent.kind === 171 /* LiteralType */ ? node.parent : node;
- var type = typeChecker.getTypeAtLocation(searchNode);
- if (type && type.flags & 32 /* StringLiteral */) {
- return type;
- }
- return undefined;
- }
- ts.getStringLiteralTypeForNode = getStringLiteralTypeForNode;
function isThis(node) {
switch (node.kind) {
case 98 /* ThisKeyword */:
@@ -65249,7 +70190,7 @@ var ts;
return true;
case 70 /* Identifier */:
// 'this' as a parameter
- return ts.identifierIsThisKeyword(node) && node.parent.kind === 144 /* Parameter */;
+ return ts.identifierIsThisKeyword(node) && node.parent.kind === 145 /* Parameter */;
default:
return false;
}
@@ -65258,7 +70199,7 @@ var ts;
// Matches the beginning of a triple slash directive
var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*</;
function getLineStartPositionForPosition(position, sourceFile) {
- var lineStarts = sourceFile.getLineStarts();
+ var lineStarts = ts.getLineStarts(sourceFile);
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
return lineStarts[line];
}
@@ -65294,42 +70235,42 @@ var ts;
return false;
}
switch (n.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 172 /* ObjectBindingPattern */:
- case 161 /* TypeLiteral */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
- case 232 /* CaseBlock */:
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 162 /* TypeLiteral */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
+ case 234 /* CaseBlock */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return nodeEndsWith(n, 17 /* CloseBraceToken */, sourceFile);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return isCompletedNode(n.block, sourceFile);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
if (!n.arguments) {
return true;
}
- // fall through
- case 179 /* CallExpression */:
- case 183 /* ParenthesizedExpression */:
- case 166 /* ParenthesizedType */:
+ // falls through
+ case 180 /* CallExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 167 /* ParenthesizedType */:
return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return isCompletedNode(n.type, sourceFile);
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 185 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 186 /* ArrowFunction */:
if (n.body) {
return isCompletedNode(n.body, sourceFile);
}
@@ -65339,67 +70280,67 @@ var ts;
// Even though type parameters can be unclosed, we can get away with
// having at least a closing paren.
return hasChildOfKind(n, 19 /* CloseParenToken */, sourceFile);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return n.body && isCompletedNode(n.body, sourceFile);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
if (n.elseStatement) {
return isCompletedNode(n.elseStatement, sourceFile);
}
return isCompletedNode(n.thenStatement, sourceFile);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return isCompletedNode(n.expression, sourceFile) ||
hasChildOfKind(n, 24 /* SemicolonToken */);
- case 175 /* ArrayLiteralExpression */:
- case 173 /* ArrayBindingPattern */:
- case 178 /* ElementAccessExpression */:
- case 142 /* ComputedPropertyName */:
- case 163 /* TupleType */:
+ case 176 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 179 /* ElementAccessExpression */:
+ case 143 /* ComputedPropertyName */:
+ case 164 /* TupleType */:
return nodeEndsWith(n, 21 /* CloseBracketToken */, sourceFile);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
if (n.type) {
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 21 /* CloseBracketToken */, sourceFile);
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
// there is no such thing as terminator token for CaseClause/DefaultClause so for simplicity always consider them non-completed
return false;
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
return isCompletedNode(n.statement, sourceFile);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')';
var hasWhileKeyword = findChildOfKind(n, 105 /* WhileKeyword */, sourceFile);
if (hasWhileKeyword) {
return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile);
}
return isCompletedNode(n.statement, sourceFile);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return isCompletedNode(n.exprName, sourceFile);
- case 187 /* TypeOfExpression */:
- case 186 /* DeleteExpression */:
- case 188 /* VoidExpression */:
- case 195 /* YieldExpression */:
- case 196 /* SpreadElement */:
+ case 188 /* TypeOfExpression */:
+ case 187 /* DeleteExpression */:
+ case 189 /* VoidExpression */:
+ case 196 /* YieldExpression */:
+ case 197 /* SpreadElement */:
var unaryWordExpression = n;
return isCompletedNode(unaryWordExpression.expression, sourceFile);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return isCompletedNode(n.template, sourceFile);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
var lastSpan = ts.lastOrUndefined(n.templateSpans);
return isCompletedNode(lastSpan, sourceFile);
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return ts.nodeIsPresent(n.literal);
- case 241 /* ExportDeclaration */:
- case 235 /* ImportDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
return ts.nodeIsPresent(n.moduleSpecifier);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return isCompletedNode(n.operand, sourceFile);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return isCompletedNode(n.right, sourceFile);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isCompletedNode(n.whenFalse, sourceFile);
default:
return true;
@@ -65455,7 +70396,7 @@ var ts;
// for the position of the relevant node (or comma).
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
// find syntax list that covers the span of the node
- if (c.kind === 292 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 293 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -65497,7 +70438,7 @@ var ts;
if (includeJsDocComment === void 0) { includeJsDocComment = false; }
var current = sourceFile;
outer: while (true) {
- if (isToken(current)) {
+ if (ts.isToken(current)) {
// exit early
return current;
}
@@ -65522,8 +70463,8 @@ var ts;
}
}
// find the child that contains 'position'
- for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) {
- var child = current.getChildAt(i);
+ for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
+ var child = _b[_a];
// all jsDocComment nodes were already visited
if (ts.isJSDocNode(child)) {
continue;
@@ -65547,18 +70488,18 @@ var ts;
}
}
/**
- * The token on the left of the position is the token that strictly includes the position
- * or sits to the left of the cursor if it is on a boundary. For example
- *
- * fo|o -> will return foo
- * foo <comment> |bar -> will return foo
- *
- */
+ * The token on the left of the position is the token that strictly includes the position
+ * or sits to the left of the cursor if it is on a boundary. For example
+ *
+ * fo|o -> will return foo
+ * foo <comment> |bar -> will return foo
+ *
+ */
function findTokenOnLeftOfPosition(file, position) {
// Ideally, getTokenAtPosition should return a token. However, it is currently
// broken, so we do a check to make sure the result was indeed a token.
var tokenAtPosition = getTokenAtPosition(file, position);
- if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
+ if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
return findPrecedingToken(position, file);
@@ -65567,7 +70508,7 @@ var ts;
function findNextToken(previousToken, parent) {
return find(parent);
function find(n) {
- if (isToken(n) && n.pos === previousToken.end) {
+ if (ts.isToken(n) && n.pos === previousToken.end) {
// this is token that starts at the end of previous token - return it
return n;
}
@@ -65590,7 +70531,7 @@ var ts;
function findPrecedingToken(position, sourceFile, startNode) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
@@ -65598,11 +70539,11 @@ var ts;
return candidate && findRightmostToken(candidate);
}
function find(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
- for (var i = 0, len = children.length; i < len; i++) {
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
// condition 'position < child.end' checks if child node end after the position
// in the example below this condition will be false for 'aaaa' and 'bbbb' and true for 'ccc'
@@ -65627,7 +70568,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 261 /* SourceFile */);
+ ts.Debug.assert(startNode !== undefined || n.kind === 264 /* SourceFile */);
// Here we know that none of child token nodes embrace the position,
// the only known case is when position is at the end of the file.
// Try to find the rightmost token in the file without filtering.
@@ -65686,17 +70627,17 @@ var ts;
return true;
}
// <div> { | </div> or <div a={| </div>
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 252 /* JsxExpression */) {
+ if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 255 /* JsxExpression */) {
return true;
}
// <div> {
// |
// } < /div>
- if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 252 /* JsxExpression */) {
+ if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 255 /* JsxExpression */) {
return true;
}
// <div>|</div>
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 249 /* JsxClosingElement */) {
+ if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 251 /* JsxClosingElement */) {
return true;
}
return false;
@@ -65727,10 +70668,10 @@ var ts;
// Internally, we represent the end of the comment at the newline and closing '/', respectively.
return predicate ?
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end) &&
+ (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end) &&
predicate(c); }) :
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
+ (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
}
return false;
}
@@ -65751,7 +70692,7 @@ var ts;
*/
function getJsDocTagAtPosition(sourceFile, position) {
var node = ts.getTokenAtPosition(sourceFile, position);
- if (isToken(node)) {
+ if (ts.isToken(node)) {
switch (node.kind) {
case 103 /* VarKeyword */:
case 109 /* LetKeyword */:
@@ -65808,19 +70749,15 @@ var ts;
}
ts.getNodeModifiers = getNodeModifiers;
function getTypeArgumentOrTypeParameterList(node) {
- if (node.kind === 157 /* TypeReference */ || node.kind === 179 /* CallExpression */) {
+ if (node.kind === 158 /* TypeReference */ || node.kind === 180 /* CallExpression */) {
return node.typeArguments;
}
- if (ts.isFunctionLike(node) || node.kind === 226 /* ClassDeclaration */ || node.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isFunctionLike(node) || node.kind === 228 /* ClassDeclaration */ || node.kind === 229 /* InterfaceDeclaration */) {
return node.typeParameters;
}
return undefined;
}
ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList;
- function isToken(n) {
- return n.kind >= 0 /* FirstToken */ && n.kind <= 140 /* LastToken */;
- }
- ts.isToken = isToken;
function isWord(kind) {
return kind === 70 /* Identifier */ || ts.isKeyword(kind);
}
@@ -65877,18 +70814,18 @@ var ts;
}
ts.compareDataObjects = compareDataObjects;
function isArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- if (node.kind === 175 /* ArrayLiteralExpression */ ||
- node.kind === 176 /* ObjectLiteralExpression */) {
+ if (node.kind === 176 /* ArrayLiteralExpression */ ||
+ node.kind === 177 /* ObjectLiteralExpression */) {
// [a,b,c] from:
// [a, b, c] = someExpression;
- if (node.parent.kind === 192 /* BinaryExpression */ &&
+ if (node.parent.kind === 193 /* BinaryExpression */ &&
node.parent.left === node &&
node.parent.operatorToken.kind === 57 /* EqualsToken */) {
return true;
}
// [a, b, c] from:
// for([a, b, c] of expression)
- if (node.parent.kind === 213 /* ForOfStatement */ &&
+ if (node.parent.kind === 215 /* ForOfStatement */ &&
node.parent.initializer === node) {
return true;
}
@@ -65896,7 +70833,7 @@ var ts;
// [x, [a, b, c] ] = someExpression
// or
// {x, a: {a, b, c} } = someExpression
- if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 257 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {
+ if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {
return true;
}
}
@@ -65924,12 +70861,47 @@ var ts;
}
}
ts.isInNonReferenceComment = isInNonReferenceComment;
+ function createTextSpanFromNode(node, sourceFile) {
+ return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
+ }
+ ts.createTextSpanFromNode = createTextSpanFromNode;
+ function isTypeKeyword(kind) {
+ switch (kind) {
+ case 118 /* AnyKeyword */:
+ case 121 /* BooleanKeyword */:
+ case 129 /* NeverKeyword */:
+ case 132 /* NumberKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 135 /* StringKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 104 /* VoidKeyword */:
+ return true;
+ default:
+ return false;
+ }
+ }
+ ts.isTypeKeyword = isTypeKeyword;
+ /** True if the symbol is for an external module, as opposed to a namespace. */
+ function isExternalModuleSymbol(moduleSymbol) {
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
+ return moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */;
+ }
+ ts.isExternalModuleSymbol = isExternalModuleSymbol;
+ /** Returns `true` the first time it encounters a node and `false` afterwards. */
+ function nodeSeenTracker() {
+ var seen = [];
+ return function (node) {
+ var id = ts.getNodeId(node);
+ return !seen[id] && (seen[id] = true);
+ };
+ }
+ ts.nodeSeenTracker = nodeSeenTracker;
})(ts || (ts = {}));
// Display-part writer helpers
/* @internal */
(function (ts) {
function isFirstDeclarationOfSymbolParameter(symbol) {
- return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 144 /* Parameter */;
+ return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145 /* Parameter */;
}
ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter;
var displayPartWriter = getDisplayPartWriter();
@@ -65946,13 +70918,15 @@ var ts;
writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); },
writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); },
writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); },
+ writeProperty: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.propertyName); },
writeSymbol: writeSymbol,
writeLine: writeLine,
increaseIndent: function () { indent++; },
decreaseIndent: function () { indent--; },
clear: resetWriter,
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
function writeIndent() {
if (lineStart) {
@@ -66105,23 +71079,18 @@ var ts;
function getDeclaredName(typeChecker, symbol, location) {
// If this is an export or import specifier it could have been renamed using the 'as' syntax.
// If so we want to search for whatever is under the cursor.
- if (isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- else if (ts.isStringOrNumericLiteral(location) &&
- location.parent.kind === 142 /* ComputedPropertyName */) {
+ if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143 /* ComputedPropertyName */) {
return location.text;
}
// Try to get the local symbol if we're dealing with an 'export default'
// since that symbol has the "true" name.
var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- var name = typeChecker.symbolToString(localExportDefaultSymbol || symbol);
- return name;
+ return typeChecker.symbolToString(localExportDefaultSymbol || symbol);
}
ts.getDeclaredName = getDeclaredName;
function isImportOrExportSpecifierName(location) {
return location.parent &&
- (location.parent.kind === 239 /* ImportSpecifier */ || location.parent.kind === 243 /* ExportSpecifier */) &&
+ (location.parent.kind === 241 /* ImportSpecifier */ || location.parent.kind === 245 /* ExportSpecifier */) &&
location.parent.propertyName === location;
}
ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName;
@@ -66137,7 +71106,6 @@ var ts;
(name.charCodeAt(0) === 34 /* doubleQuote */ || name.charCodeAt(0) === 39 /* singleQuote */)) {
return name.substring(1, length - 1);
}
- ;
return name;
}
ts.stripQuotes = stripQuotes;
@@ -66188,6 +71156,22 @@ var ts;
};
}
ts.sanitizeConfigFile = sanitizeConfigFile;
+ function getFirstNonSpaceCharacterPosition(text, position) {
+ while (ts.isWhiteSpace(text.charCodeAt(position))) {
+ position += 1;
+ }
+ return position;
+ }
+ ts.getFirstNonSpaceCharacterPosition = getFirstNonSpaceCharacterPosition;
+ function getOpenBrace(constructor, sourceFile) {
+ // First token is the open curly, this is where we want to put the 'super' call.
+ return constructor.body.getFirstToken(sourceFile);
+ }
+ ts.getOpenBrace = getOpenBrace;
+ function getOpenBraceOfClassLike(declaration, sourceFile) {
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ }
+ ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -66236,7 +71220,7 @@ var ts;
function canFollow(keyword1, keyword2) {
if (ts.isAccessibilityModifier(keyword1)) {
if (keyword2 === 124 /* GetKeyword */ ||
- keyword2 === 133 /* SetKeyword */ ||
+ keyword2 === 134 /* SetKeyword */ ||
keyword2 === 122 /* ConstructorKeyword */ ||
keyword2 === 114 /* StaticKeyword */) {
// Allow things like "public get", "public constructor" and "public static".
@@ -66255,9 +71239,9 @@ var ts;
var entries = [];
var dense = classifications.spans;
var lastEnd = 0;
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_4 = dense[i + 1];
+ var length_5 = dense[i + 1];
var type = dense[i + 2];
// Make a whitespace entry between the last item and this one.
if (lastEnd >= 0) {
@@ -66266,8 +71250,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_4, classification: convertClassification(type) });
- lastEnd = start + length_4;
+ entries.push({ length: length_5, classification: convertClassification(type) });
+ lastEnd = start + length_5;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -66335,7 +71319,7 @@ var ts;
case 5 /* InTemplateMiddleOrTail */:
text = "}\n" + text;
offset = 2;
- // fallthrough
+ // falls through
case 6 /* InTemplateSubstitutionPosition */:
templateStack.push(13 /* TemplateHead */);
break;
@@ -66395,10 +71379,10 @@ var ts;
angleBracketStack--;
}
else if (token === 118 /* AnyKeyword */ ||
- token === 134 /* StringKeyword */ ||
+ token === 135 /* StringKeyword */ ||
token === 132 /* NumberKeyword */ ||
token === 121 /* BooleanKeyword */ ||
- token === 135 /* SymbolKeyword */) {
+ token === 136 /* SymbolKeyword */) {
if (angleBracketStack > 0 && !syntacticClassifierAbsent) {
// If it looks like we're could be in something generic, don't classify this
// as a keyword. We may just get overwritten by the syntactic classifier,
@@ -66570,7 +71554,7 @@ var ts;
}
}
function isKeyword(token) {
- return token >= 71 /* FirstKeyword */ && token <= 140 /* LastKeyword */;
+ return token >= 71 /* FirstKeyword */ && token <= 141 /* LastKeyword */;
}
function classFromKind(token) {
if (isKeyword(token)) {
@@ -66627,10 +71611,10 @@ var ts;
// That means we're calling back into the host around every 1.2k of the file we process.
// Lib.d.ts has similar numbers.
switch (kind) {
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
cancellationToken.throwIfCancellationRequested();
}
}
@@ -66681,7 +71665,7 @@ var ts;
*/
function hasValueSideModule(symbol) {
return ts.forEach(symbol.declarations, function (declaration) {
- return declaration.kind === 230 /* ModuleDeclaration */ &&
+ return declaration.kind === 232 /* ModuleDeclaration */ &&
ts.getModuleInstanceState(declaration) === 1 /* Instantiated */;
});
}
@@ -66696,7 +71680,7 @@ var ts;
// Only bother calling into the typechecker if this is an identifier that
// could possibly resolve to a type name. This makes classification run
// in a third of the time it would normally take.
- if (classifiableNames[identifier.text]) {
+ if (classifiableNames.get(identifier.text)) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
var type = classifySymbol(symbol, ts.getMeaningFromLocation(node));
@@ -66742,7 +71726,7 @@ var ts;
ts.Debug.assert(classifications.spans.length % 3 === 0);
var dense = classifications.spans;
var result = [];
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
result.push({
textSpan: ts.createTextSpan(dense[i], dense[i + 1]),
classificationType: getClassificationTypeName(dense[i + 2])
@@ -66845,16 +71829,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */);
pos = tag.tagName.end;
switch (tag.kind) {
- case 281 /* JSDocParameterTag */:
+ case 285 /* JSDocParameterTag */:
processJSDocParameterTag(tag);
break;
- case 284 /* JSDocTemplateTag */:
+ case 288 /* JSDocTemplateTag */:
processJSDocTemplateTag(tag);
break;
- case 283 /* JSDocTypeTag */:
+ case 287 /* JSDocTypeTag */:
processElement(tag.typeExpression);
break;
- case 282 /* JSDocReturnTag */:
+ case 286 /* JSDocReturnTag */:
processElement(tag.typeExpression);
break;
}
@@ -66941,22 +71925,22 @@ var ts;
}
function tryClassifyJsxElementName(token) {
switch (token.parent && token.parent.kind) {
- case 248 /* JsxOpeningElement */:
+ case 250 /* JsxOpeningElement */:
if (token.parent.tagName === token) {
return 19 /* jsxOpenTagName */;
}
break;
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
if (token.parent.tagName === token) {
return 20 /* jsxCloseTagName */;
}
break;
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
if (token.parent.tagName === token) {
return 21 /* jsxSelfClosingTagName */;
}
break;
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
if (token.parent.name === token) {
return 22 /* jsxAttribute */;
}
@@ -66984,17 +71968,17 @@ var ts;
if (token) {
if (tokenKind === 57 /* EqualsToken */) {
// the '=' in a variable declaration is special cased here.
- if (token.parent.kind === 223 /* VariableDeclaration */ ||
- token.parent.kind === 147 /* PropertyDeclaration */ ||
- token.parent.kind === 144 /* Parameter */ ||
- token.parent.kind === 250 /* JsxAttribute */) {
+ if (token.parent.kind === 225 /* VariableDeclaration */ ||
+ token.parent.kind === 148 /* PropertyDeclaration */ ||
+ token.parent.kind === 145 /* Parameter */ ||
+ token.parent.kind === 252 /* JsxAttribute */) {
return 5 /* operator */;
}
}
- if (token.parent.kind === 192 /* BinaryExpression */ ||
- token.parent.kind === 190 /* PrefixUnaryExpression */ ||
- token.parent.kind === 191 /* PostfixUnaryExpression */ ||
- token.parent.kind === 193 /* ConditionalExpression */) {
+ if (token.parent.kind === 193 /* BinaryExpression */ ||
+ token.parent.kind === 191 /* PrefixUnaryExpression */ ||
+ token.parent.kind === 192 /* PostfixUnaryExpression */ ||
+ token.parent.kind === 194 /* ConditionalExpression */) {
return 5 /* operator */;
}
}
@@ -67004,7 +71988,7 @@ var ts;
return 4 /* numericLiteral */;
}
else if (tokenKind === 9 /* StringLiteral */) {
- return token.parent.kind === 250 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */;
+ return token.parent.kind === 252 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */;
}
else if (tokenKind === 11 /* RegularExpressionLiteral */) {
// TODO: we should get another classification type for these literals.
@@ -67020,32 +72004,32 @@ var ts;
else if (tokenKind === 70 /* Identifier */) {
if (token) {
switch (token.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
if (token.parent.name === token) {
return 11 /* className */;
}
return;
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
if (token.parent.name === token) {
return 15 /* typeParameterName */;
}
return;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
if (token.parent.name === token) {
return 13 /* interfaceName */;
}
return;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
if (token.parent.name === token) {
return 12 /* enumName */;
}
return;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (token.parent.name === token) {
return 14 /* moduleName */;
}
return;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
if (token.parent.name === token) {
return ts.isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */;
}
@@ -67062,9 +72046,8 @@ var ts;
// Ignore nodes that don't intersect the original span to classify.
if (ts.decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) {
checkForClassificationCancellation(cancellationToken, element.kind);
- var children = element.getChildren(sourceFile);
- for (var i = 0, n = children.length; i < n; i++) {
- var child = children[i];
+ for (var _i = 0, _a = element.getChildren(sourceFile); _i < _a.length; _i++) {
+ var child = _a[_i];
if (!tryClassifyNode(child)) {
// Recurse into our child nodes.
processElement(child);
@@ -67075,259 +72058,31 @@ var ts;
}
ts.getEncodedSyntacticClassifications = getEncodedSyntacticClassifications;
})(ts || (ts = {}));
-/// <reference path='../compiler/utilities.ts' />
/* @internal */
var ts;
(function (ts) {
var Completions;
(function (Completions) {
- function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
- if (ts.isInReferenceComment(sourceFile, position)) {
- return getTripleSlashReferenceCompletion(sourceFile, position);
- }
- if (ts.isInString(sourceFile, position)) {
- return getStringLiteralCompletionEntries(sourceFile, position);
- }
- var completionData = getCompletionData(typeChecker, log, sourceFile, position);
- if (!completionData) {
- return undefined;
- }
- var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isJsDocTagName = completionData.isJsDocTagName;
- if (isJsDocTagName) {
- // If the current position is a jsDoc tag name, only tag names should be provided for completion
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getAllJsDocCompletionEntries() };
- }
- var entries = [];
- if (ts.isSourceFileJavaScript(sourceFile)) {
- var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true);
- ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames));
- }
- else {
- if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 /* JSX */ &&
- location.parent && location.parent.kind === 249 /* JsxClosingElement */) {
- // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
- // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
- // For example:
- // var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
- return undefined;
- }
- }
- getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true);
- }
- // Add keywords if this is not a member completion list
- if (!isMemberCompletion && !isJsDocTagName) {
- ts.addRange(entries, keywordCompletions);
- }
- return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
- function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames) {
- var entries = [];
- var nameTable = ts.getNameTable(sourceFile);
- for (var name_43 in nameTable) {
- // Skip identifiers produced only from the current location
- if (nameTable[name_43] === position) {
- continue;
- }
- if (!uniqueNames[name_43]) {
- uniqueNames[name_43] = name_43;
- var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name_43), compilerOptions.target, /*performCharacterChecks*/ true);
- if (displayName) {
- var entry = {
- name: displayName,
- kind: ts.ScriptElementKind.warning,
- kindModifiers: "",
- sortText: "1"
- };
- entries.push(entry);
- }
- }
- }
- return entries;
- }
- function createCompletionEntry(symbol, location, performCharacterChecks) {
- // Try to get a valid display name for this symbol, if we could not find one, then ignore it.
- // We would like to only show things that can be added after a dot, so for instance numeric properties can
- // not be accessed with a dot (a.1 <- invalid)
- var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, compilerOptions.target, performCharacterChecks, location);
- if (!displayName) {
- return undefined;
- }
- // TODO(drosen): Right now we just permit *all* semantic meanings when calling
- // 'getSymbolKind' which is permissible given that it is backwards compatible; but
- // really we should consider passing the meaning for the node so that we don't report
- // that a suggestion for a value is an interface. We COULD also just do what
- // 'getSymbolModifiers' does, which is to use the first declaration.
- // Use a 'sortText' of 0' so that all symbol completion entries come before any other
- // entries (like JavaScript identifier entries).
- return {
- name: displayName,
- kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- sortText: "0",
- };
- }
- function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks) {
- var start = ts.timestamp();
- var uniqueNames = ts.createMap();
- if (symbols) {
- for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
- var symbol = symbols_4[_i];
- var entry = createCompletionEntry(symbol, location, performCharacterChecks);
- if (entry) {
- var id = ts.escapeIdentifier(entry.name);
- if (!uniqueNames[id]) {
- entries.push(entry);
- uniqueNames[id] = id;
- }
- }
- }
- }
- log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
- return uniqueNames;
- }
- function getStringLiteralCompletionEntries(sourceFile, position) {
- var node = ts.findPrecedingToken(position, sourceFile);
- if (!node || node.kind !== 9 /* StringLiteral */) {
- return undefined;
- }
- if (node.parent.kind === 257 /* PropertyAssignment */ &&
- node.parent.parent.kind === 176 /* ObjectLiteralExpression */ &&
- node.parent.name === node) {
- // Get quoted name of properties of the object literal expression
- // i.e. interface ConfigFiles {
- // 'jspm:dev': string
- // }
- // let files: ConfigFiles = {
- // '/*completion position*/'
- // }
- //
- // function foo(c: ConfigFiles) {}
- // foo({
- // '/*completion position*/'
- // });
- return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent);
- }
- else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
- // Get all names of properties on the expression
- // i.e. interface A {
- // 'prop1': string
- // }
- // let a: A;
- // a['/*completion position*/']
- return getStringLiteralCompletionEntriesFromElementAccess(node.parent);
- }
- else if (node.parent.kind === 235 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
- // Get all known external module names or complete a path to a module
- // i.e. import * as ns from "/*completion position*/";
- // import x = require("/*completion position*/");
- // var y = require("/*completion position*/");
- return getStringLiteralCompletionEntriesFromModuleNames(node);
- }
- else {
- var argumentInfo = ts.SignatureHelp.getContainingArgumentInfo(node, position, sourceFile);
- if (argumentInfo) {
- // Get string literal completions from specialized signatures of the target
- // i.e. declare function f(a: 'A');
- // f("/*completion position*/")
- return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo);
- }
- // Get completion for string literal from string literal type
- // i.e. var x: "hi" | "hello" = "/*completion position*/"
- return getStringLiteralCompletionEntriesFromContextualType(node);
- }
- }
- function getStringLiteralCompletionEntriesFromPropertyAssignment(element) {
- var type = typeChecker.getContextualType(element.parent);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, /*performCharacterChecks*/ false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- }
- function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo) {
- var candidates = [];
- var entries = [];
- typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
- for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
- var candidate = candidates_3[_i];
- if (candidate.parameters.length > argumentInfo.argumentIndex) {
- var parameter = candidate.parameters[argumentInfo.argumentIndex];
- addStringLiteralCompletionsFromType(typeChecker.getTypeAtLocation(parameter.valueDeclaration), entries);
- }
- }
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromElementAccess(node) {
- var type = typeChecker.getTypeAtLocation(node.expression);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, /*performCharacterChecks*/ false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromContextualType(node) {
- var type = typeChecker.getContextualType(node);
- if (type) {
- var entries_2 = [];
- addStringLiteralCompletionsFromType(type, entries_2);
- if (entries_2.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
- }
- }
- return undefined;
- }
- function addStringLiteralCompletionsFromType(type, result) {
- if (!type) {
- return;
- }
- if (type.flags & 65536 /* Union */) {
- ts.forEach(type.types, function (t) { return addStringLiteralCompletionsFromType(t, result); });
- }
- else {
- if (type.flags & 32 /* StringLiteral */) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
- }
- }
- }
- function getStringLiteralCompletionEntriesFromModuleNames(node) {
+ var PathCompletions;
+ (function (PathCompletions) {
+ function getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker) {
var literalValue = ts.normalizeSlashes(node.text);
var scriptPath = node.getSourceFile().path;
var scriptDirectory = ts.getDirectoryPath(scriptPath);
var span = getDirectoryFragmentTextSpan(node.text, node.getStart() + 1);
var entries;
if (isPathRelativeToScript(literalValue) || ts.isRootedDiskPath(literalValue)) {
+ var extensions = ts.getSupportedExtensions(compilerOptions);
if (compilerOptions.rootDirs) {
- entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, extensions, /*includeExtensions*/ false, span, compilerOptions, host, scriptPath);
}
else {
- entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensions, /*includeExtensions*/ false, span, host, scriptPath);
}
}
else {
// Check for node modules
- entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span);
+ entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span, compilerOptions, host, typeChecker);
}
return {
isGlobalCompletion: false,
@@ -67336,6 +72091,7 @@ var ts;
entries: entries
};
}
+ PathCompletions.getStringLiteralCompletionEntriesFromModuleNames = getStringLiteralCompletionEntriesFromModuleNames;
/**
* Takes a script path and returns paths for all potential folders that could be merged with its
* containing folder via the "rootDirs" compiler option
@@ -67355,21 +72111,21 @@ var ts;
// Now find a path for each potential directory that is to be merged with the one containing the script
return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
}
- function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, exclude) {
+ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, compilerOptions, host, exclude) {
var basePath = compilerOptions.project || host.getCurrentDirectory();
var ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
var baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase);
var result = [];
for (var _i = 0, baseDirectories_1 = baseDirectories; _i < baseDirectories_1.length; _i++) {
var baseDirectory = baseDirectories_1[_i];
- getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, exclude, result);
+ getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, host, exclude, result);
}
return result;
}
/**
* Given a path ending at a directory, gets the completions for the path, and filters for those entries containing the basename.
*/
- function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, exclude, result) {
+ function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, host, exclude, result) {
if (result === void 0) { result = []; }
if (fragment === undefined) {
fragment = "";
@@ -67405,13 +72161,13 @@ var ts;
continue;
}
var foundFileName = includeExtensions ? ts.getBaseFileName(filePath) : ts.removeFileExtension(ts.getBaseFileName(filePath));
- if (!foundFiles[foundFileName]) {
- foundFiles[foundFileName] = true;
+ if (!foundFiles.get(foundFileName)) {
+ foundFiles.set(foundFileName, true);
}
}
- for (var foundFile in foundFiles) {
+ ts.forEachKey(foundFiles, function (foundFile) {
result.push(createCompletionEntryForModule(foundFile, ts.ScriptElementKind.scriptElement, span));
- }
+ });
}
// If possible, get folder completion as well
var directories = tryGetDirectories(host, baseDirectory);
@@ -67432,14 +72188,14 @@ var ts;
* Modules from node_modules (i.e. those listed in package.json)
* This includes all files that are found in node_modules/moduleName/ with acceptable file extensions
*/
- function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span) {
+ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span, compilerOptions, host, typeChecker) {
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths;
var result;
if (baseUrl) {
var fileExtensions = ts.getSupportedExtensions(compilerOptions);
var projectDir = compilerOptions.project || host.getCurrentDirectory();
var absolute = ts.isRootedDiskPath(baseUrl) ? baseUrl : ts.combinePaths(projectDir, baseUrl);
- result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, /*includeExtensions*/ false, span);
+ result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, /*includeExtensions*/ false, span, host);
if (paths) {
for (var path in paths) {
if (paths.hasOwnProperty(path)) {
@@ -67447,7 +72203,7 @@ var ts;
if (paths[path]) {
for (var _i = 0, _a = paths[path]; _i < _a.length; _i++) {
var pattern = _a[_i];
- for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions); _b < _c.length; _b++) {
+ for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host); _b < _c.length; _b++) {
var match = _c[_b];
result.push(createCompletionEntryForModule(match, ts.ScriptElementKind.externalModuleName, span));
}
@@ -67468,13 +72224,13 @@ var ts;
result = [];
}
getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, span, result);
- for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions); _d < _e.length; _d++) {
+ for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions, typeChecker, host); _d < _e.length; _d++) {
var moduleName = _e[_d];
result.push(createCompletionEntryForModule(moduleName, ts.ScriptElementKind.externalModuleName, span));
}
return result;
}
- function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions) {
+ function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host) {
if (host.readDirectory) {
var parsed = ts.hasZeroOrOneAsteriskCharacter(pattern) ? ts.tryParsePattern(pattern) : undefined;
if (parsed) {
@@ -67493,7 +72249,7 @@ var ts;
// that encodes the suffix, but we would have to escape the character "?" which readDirectory
// doesn't support. For now, this is safer but slower
var includeGlob = normalizedSuffix ? "**/*" : "./*";
- var matches = tryReadDirectory(host, baseDirectory, fileExtensions, undefined, [includeGlob]);
+ var matches = tryReadDirectory(host, baseDirectory, fileExtensions, /*exclude*/ undefined, [includeGlob]);
if (matches) {
var result = [];
// Trim away prefix and suffix
@@ -67504,8 +72260,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_5 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_5)));
+ var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
}
return result;
}
@@ -67513,7 +72269,7 @@ var ts;
}
return undefined;
}
- function enumeratePotentialNonRelativeModules(fragment, scriptPath, options) {
+ function enumeratePotentialNonRelativeModules(fragment, scriptPath, options, typeChecker, host) {
// Check If this is a nested module
var isNestedModule = fragment.indexOf(ts.directorySeparator) !== -1;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
@@ -67553,7 +72309,7 @@ var ts;
}
return ts.deduplicate(nonRelativeModules);
}
- function getTripleSlashReferenceCompletion(sourceFile, position) {
+ function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
var token = ts.getTokenAtPosition(sourceFile, position);
if (!token) {
return undefined;
@@ -67589,7 +72345,7 @@ var ts;
if (kind === "path") {
// Give completions for a relative path
var span_10 = getDirectoryFragmentTextSpan(toComplete, range.pos + prefix.length);
- completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ true, span_10, sourceFile.path);
+ completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ true, span_10, host, sourceFile.path);
}
else {
// Give completions based on the typings available
@@ -67599,6 +72355,7 @@ var ts;
}
return completionInfo;
}
+ PathCompletions.getTripleSlashReferenceCompletion = getTripleSlashReferenceCompletion;
function getCompletionEntriesFromTypings(host, options, scriptPath, span, result) {
if (result === void 0) { result = []; }
// Check for typings specified in compiler options
@@ -67624,7 +72381,7 @@ var ts;
}
if (host.getDirectories) {
// Also get all @types typings installed in visible node_modules directories
- for (var _c = 0, _d = findPackageJsons(scriptPath); _c < _d.length; _c++) {
+ for (var _c = 0, _d = findPackageJsons(scriptPath, host); _c < _d.length; _c++) {
var packageJson = _d[_c];
var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types");
getCompletionEntriesFromDirectories(host, typesDir, span, result);
@@ -67644,7 +72401,7 @@ var ts;
}
}
}
- function findPackageJsons(currentDir) {
+ function findPackageJsons(currentDir, host) {
var paths = [];
var currentConfigPath;
while (true) {
@@ -67652,11 +72409,11 @@ var ts;
if (currentConfigPath) {
paths.push(currentConfigPath);
currentDir = ts.getDirectoryPath(currentConfigPath);
- var parent_13 = ts.getDirectoryPath(currentDir);
- if (currentDir === parent_13) {
+ var parent = ts.getDirectoryPath(currentDir);
+ if (currentDir === parent) {
break;
}
- currentDir = parent_13;
+ currentDir = parent;
}
else {
break;
@@ -67667,7 +72424,7 @@ var ts;
function enumerateNodeModulesVisibleToScript(host, scriptPath) {
var result = [];
if (host.readFile && host.fileExists) {
- for (var _i = 0, _a = findPackageJsons(scriptPath); _i < _a.length; _i++) {
+ for (var _i = 0, _a = findPackageJsons(scriptPath, host); _i < _a.length; _i++) {
var packageJson = _a[_i];
var contents = tryReadingPackageJson(packageJson);
if (!contents) {
@@ -67731,26 +72488,326 @@ var ts;
function normalizeAndPreserveTrailingSlash(path) {
return ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(ts.normalizePath(path)) : ts.normalizePath(path);
}
+ /**
+ * Matches a triple slash reference directive with an incomplete string literal for its path. Used
+ * to determine if the caret is currently within the string literal and capture the literal fragment
+ * for completions.
+ * For example, this matches
+ *
+ * /// <reference path="fragment
+ *
+ * but not
+ *
+ * /// <reference path="fragment"
+ */
+ var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
+ var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
+ function tryGetDirectories(host, directoryName) {
+ return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
+ }
+ function tryReadDirectory(host, path, extensions, exclude, include) {
+ return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
+ }
+ function tryReadFile(host, path) {
+ return tryIOAndConsumeErrors(host, host.readFile, path);
+ }
+ function tryFileExists(host, path) {
+ return tryIOAndConsumeErrors(host, host.fileExists, path);
+ }
+ function tryDirectoryExists(host, path) {
+ try {
+ return ts.directoryProbablyExists(path, host);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ function tryIOAndConsumeErrors(host, toApply) {
+ var args = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ args[_i - 2] = arguments[_i];
+ }
+ try {
+ return toApply && toApply.apply(host, args);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ })(PathCompletions = Completions.PathCompletions || (Completions.PathCompletions = {}));
+ })(Completions = ts.Completions || (ts.Completions = {}));
+})(ts || (ts = {}));
+/// <reference path="./pathCompletions.ts" />
+/* @internal */
+var ts;
+(function (ts) {
+ var Completions;
+ (function (Completions) {
+ function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
+ if (ts.isInReferenceComment(sourceFile, position)) {
+ return Completions.PathCompletions.getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host);
+ }
+ if (ts.isInString(sourceFile, position)) {
+ return getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log);
+ }
+ var completionData = getCompletionData(typeChecker, log, sourceFile, position);
+ if (!completionData) {
+ return undefined;
+ }
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, requestJsDocTagName = completionData.requestJsDocTagName, requestJsDocTag = completionData.requestJsDocTag;
+ if (requestJsDocTagName) {
+ // If the current position is a jsDoc tag name, only tag names should be provided for completion
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagNameCompletions() };
+ }
+ if (requestJsDocTag) {
+ // If the current position is a jsDoc tag, only tags should be provided for completion
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ }
+ var entries = [];
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log);
+ ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames, compilerOptions.target));
+ }
+ else {
+ if (!symbols || symbols.length === 0) {
+ if (sourceFile.languageVariant === 1 /* JSX */ &&
+ location.parent && location.parent.kind === 251 /* JsxClosingElement */) {
+ // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
+ // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
+ // For example:
+ // var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
+ var tagName = location.parent.parent.openingElement.tagName;
+ entries.push({
+ name: tagName.text,
+ kind: undefined,
+ kindModifiers: undefined,
+ sortText: "0",
+ });
+ }
+ else {
+ return undefined;
+ }
+ }
+ getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log);
+ }
+ // Add keywords if this is not a member completion list
+ if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ ts.addRange(entries, keywordCompletions);
+ }
+ return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
}
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
+ function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames, target) {
+ var entries = [];
+ var nameTable = ts.getNameTable(sourceFile);
+ nameTable.forEach(function (pos, name) {
+ // Skip identifiers produced only from the current location
+ if (pos === position) {
+ return;
+ }
+ if (!uniqueNames.get(name)) {
+ uniqueNames.set(name, name);
+ var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name), target, /*performCharacterChecks*/ true);
+ if (displayName) {
+ var entry = {
+ name: displayName,
+ kind: ts.ScriptElementKind.warning,
+ kindModifiers: "",
+ sortText: "1"
+ };
+ entries.push(entry);
+ }
+ }
+ });
+ return entries;
+ }
+ function createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target) {
+ // Try to get a valid display name for this symbol, if we could not find one, then ignore it.
+ // We would like to only show things that can be added after a dot, so for instance numeric properties can
+ // not be accessed with a dot (a.1 <- invalid)
+ var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location);
+ if (!displayName) {
+ return undefined;
+ }
+ // TODO(drosen): Right now we just permit *all* semantic meanings when calling
+ // 'getSymbolKind' which is permissible given that it is backwards compatible; but
+ // really we should consider passing the meaning for the node so that we don't report
+ // that a suggestion for a value is an interface. We COULD also just do what
+ // 'getSymbolModifiers' does, which is to use the first declaration.
+ // Use a 'sortText' of 0' so that all symbol completion entries come before any other
+ // entries (like JavaScript identifier entries).
+ return {
+ name: displayName,
+ kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
+ kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
+ sortText: "0",
+ };
+ }
+ function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks, typeChecker, target, log) {
+ var start = ts.timestamp();
+ var uniqueNames = ts.createMap();
+ if (symbols) {
+ for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
+ var symbol = symbols_4[_i];
+ var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
+ if (entry) {
+ var id = ts.escapeIdentifier(entry.name);
+ if (!uniqueNames.get(id)) {
+ entries.push(entry);
+ uniqueNames.set(id, id);
+ }
+ }
+ }
+ }
+ log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
+ return uniqueNames;
+ }
+ function getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log) {
+ var node = ts.findPrecedingToken(position, sourceFile);
+ if (!node || node.kind !== 9 /* StringLiteral */) {
+ return undefined;
+ }
+ if (node.parent.kind === 260 /* PropertyAssignment */ &&
+ node.parent.parent.kind === 177 /* ObjectLiteralExpression */ &&
+ node.parent.name === node) {
+ // Get quoted name of properties of the object literal expression
+ // i.e. interface ConfigFiles {
+ // 'jspm:dev': string
+ // }
+ // let files: ConfigFiles = {
+ // '/*completion position*/'
+ // }
+ //
+ // function foo(c: ConfigFiles) {}
+ // foo({
+ // '/*completion position*/'
+ // });
+ return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
+ // Get all names of properties on the expression
+ // i.e. interface A {
+ // 'prop1': string
+ // }
+ // let a: A;
+ // a['/*completion position*/']
+ return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (node.parent.kind === 237 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
+ // Get all known external module names or complete a path to a module
+ // i.e. import * as ns from "/*completion position*/";
+ // import x = require("/*completion position*/");
+ // var y = require("/*completion position*/");
+ return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker);
+ }
+ else if (isEqualityExpression(node.parent)) {
+ // Get completions from the type of the other operand
+ // i.e. switch (a) {
+ // case '/*completion position*/'
+ // }
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.left === node ? node.parent.right : node.parent.left), typeChecker);
+ }
+ else if (ts.isCaseOrDefaultClause(node.parent)) {
+ // Get completions from the type of the switch expression
+ // i.e. x === '/*completion position'
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.parent.parent.expression), typeChecker);
+ }
+ else {
+ var argumentInfo = ts.SignatureHelp.getImmediatelyContainingArgumentInfo(node, position, sourceFile);
+ if (argumentInfo) {
+ // Get string literal completions from specialized signatures of the target
+ // i.e. declare function f(a: 'A');
+ // f("/*completion position*/")
+ return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker);
+ }
+ // Get completion for string literal from string literal type
+ // i.e. var x: "hi" | "hello" = "/*completion position*/"
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getContextualType(node), typeChecker);
+ }
+ }
+ function getStringLiteralCompletionEntriesFromPropertyAssignment(element, typeChecker, target, log) {
+ var type = typeChecker.getContextualType(element.parent);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, /*performCharacterChecks*/ false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ }
+ function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
+ var candidates = [];
+ var entries = [];
+ typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
+ for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
+ var candidate = candidates_3[_i];
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker);
+ }
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromElementAccess(node, typeChecker, target, log) {
+ var type = typeChecker.getTypeAtLocation(node.expression);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, /*performCharacterChecks*/ false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromType(type, typeChecker) {
+ if (type) {
+ var entries = [];
+ addStringLiteralCompletionsFromType(type, entries, typeChecker);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ if (type && type.flags & 16384 /* TypeParameter */) {
+ type = typeChecker.getApparentType(type);
+ }
+ if (!type) {
+ return;
+ }
+ if (type.flags & 65536 /* Union */) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ addStringLiteralCompletionsFromType(t, result, typeChecker);
+ }
+ }
+ else if (type.flags & 32 /* StringLiteral */) {
+ result.push({
+ name: type.text,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
+ }
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
// Compute all the completion symbols again.
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_3 = completionData.location;
+ var symbols = completionData.symbols, location_1 = completionData.location;
// Find the symbol with the matching entry name.
// We don't need to perform character checks here because we're only comparing the
// name against 'entryName' (which is known to be good), not building a new
// completion entry.
- var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_3) === entryName ? s : undefined; });
+ var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_1) === entryName ? s : undefined; });
if (symbol) {
- var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_3, location_3, 7 /* All */), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind;
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_1, location_1, 7 /* All */), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind, tags = _a.tags;
return {
name: entryName,
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
kind: symbolKind,
displayParts: displayParts,
- documentation: documentation
+ documentation: documentation,
+ tags: tags
};
}
}
@@ -67762,7 +72819,8 @@ var ts;
kind: ts.ScriptElementKind.keyword,
kindModifiers: ts.ScriptElementKindModifier.none,
displayParts: [ts.displayPart(entryName, ts.SymbolDisplayPartKind.keyword)],
- documentation: undefined
+ documentation: undefined,
+ tags: undefined
};
}
return undefined;
@@ -67772,19 +72830,22 @@ var ts;
// Compute all the completion symbols again.
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_4 = completionData.location;
+ var symbols = completionData.symbols, location_2 = completionData.location;
// Find the symbol with the matching entry name.
// We don't need to perform character checks here because we're only comparing the
// name against 'entryName' (which is known to be good), not building a new
// completion entry.
- return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_4) === entryName ? s : undefined; });
+ return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_2) === entryName ? s : undefined; });
}
return undefined;
}
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var isJsDocTagName = false;
+ // JsDoc tag-name is just the name of the JSDoc tagname (exclude "@")
+ var requestJsDocTagName = false;
+ // JsDoc tag includes both "@" and tag-name
+ var requestJsDocTag = false;
var start = ts.timestamp();
var currentToken = ts.getTokenAtPosition(sourceFile, position);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
@@ -67793,10 +72854,32 @@ var ts;
var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
if (insideComment) {
- // The current position is next to the '@' sign, when no tag name being provided yet.
- // Provide a full list of tag names
- if (ts.hasDocComment(sourceFile, position) && sourceFile.text.charCodeAt(position - 1) === 64 /* at */) {
- isJsDocTagName = true;
+ if (ts.hasDocComment(sourceFile, position)) {
+ // The current position is next to the '@' sign, when no tag name being provided yet.
+ // Provide a full list of tag names
+ if (sourceFile.text.charCodeAt(position - 1) === 64 /* at */) {
+ requestJsDocTagName = true;
+ }
+ else {
+ // When completion is requested without "@", we will have check to make sure that
+ // there are no comments prefix the request position. We will only allow "*" and space.
+ // e.g
+ // /** |c| /*
+ //
+ // /**
+ // |c|
+ // */
+ //
+ // /**
+ // * |c|
+ // */
+ //
+ // /**
+ // * |c|
+ // */
+ var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
+ requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ }
}
// Completion should work inside certain JsDoc tags. For example:
// /** @type {number | string} */
@@ -67805,12 +72888,12 @@ var ts;
var tag = ts.getJsDocTagAtPosition(sourceFile, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- isJsDocTagName = true;
+ requestJsDocTagName = true;
}
switch (tag.kind) {
- case 283 /* JSDocTypeTag */:
- case 281 /* JSDocParameterTag */:
- case 282 /* JSDocReturnTag */:
+ case 287 /* JSDocTypeTag */:
+ case 285 /* JSDocParameterTag */:
+ case 286 /* JSDocReturnTag */:
var tagWithExpression = tag;
if (tagWithExpression.typeExpression) {
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
@@ -67818,8 +72901,8 @@ var ts;
break;
}
}
- if (isJsDocTagName) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, isJsDocTagName: isJsDocTagName };
+ if (requestJsDocTagName || requestJsDocTag) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
}
if (!insideJsDocTagExpression) {
// Proceed if the current position is in jsDoc tag expression; otherwise it is a normal
@@ -67855,13 +72938,13 @@ var ts;
log("Returning an empty list because completion was requested in an invalid position.");
return undefined;
}
- var parent_14 = contextToken.parent, kind = contextToken.kind;
- if (kind === 22 /* DotToken */) {
- if (parent_14.kind === 177 /* PropertyAccessExpression */) {
+ var parent = contextToken.parent;
+ if (contextToken.kind === 22 /* DotToken */) {
+ if (parent.kind === 178 /* PropertyAccessExpression */) {
node = contextToken.parent.expression;
isRightOfDot = true;
}
- else if (parent_14.kind === 141 /* QualifiedName */) {
+ else if (parent.kind === 142 /* QualifiedName */) {
node = contextToken.parent.left;
isRightOfDot = true;
}
@@ -67872,13 +72955,34 @@ var ts;
}
}
else if (sourceFile.languageVariant === 1 /* JSX */) {
- if (kind === 26 /* LessThanToken */) {
- isRightOfOpenTag = true;
- location = contextToken;
+ // <UI.Test /* completion position */ />
+ // If the tagname is a property access expression, we will then walk up to the top most of property access expression.
+ // Then, try to get a JSX container and its associated attributes type.
+ if (parent && parent.kind === 178 /* PropertyAccessExpression */) {
+ contextToken = parent;
+ parent = parent.parent;
}
- else if (kind === 40 /* SlashToken */ && contextToken.parent.kind === 249 /* JsxClosingElement */) {
- isStartingCloseTag = true;
- location = contextToken;
+ switch (parent.kind) {
+ case 251 /* JsxClosingElement */:
+ if (contextToken.kind === 40 /* SlashToken */) {
+ isStartingCloseTag = true;
+ location = contextToken;
+ }
+ break;
+ case 193 /* BinaryExpression */:
+ if (!(parent.left.flags & 32768 /* ThisNodeHasError */)) {
+ // It has a left-hand side, so we're not in an opening JSX tag.
+ break;
+ }
+ // falls through
+ case 249 /* JsxSelfClosingElement */:
+ case 248 /* JsxElement */:
+ case 250 /* JsxOpeningElement */:
+ if (contextToken.kind === 26 /* LessThanToken */) {
+ isRightOfOpenTag = true;
+ location = contextToken;
+ }
+ break;
}
}
}
@@ -67919,13 +73023,13 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), isJsDocTagName: isJsDocTagName };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
function getTypeScriptMemberSymbols() {
// Right of dot member completion list
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
- if (node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */ || node.kind === 177 /* PropertyAccessExpression */) {
+ if (node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */) {
var symbol = typeChecker.getSymbolAtLocation(node);
// This is an alias, follow what it aliases
if (symbol && symbol.flags & 8388608 /* Alias */) {
@@ -67981,11 +73085,11 @@ var ts;
}
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
- if ((jsxContainer.kind === 247 /* JsxSelfClosingElement */) || (jsxContainer.kind === 248 /* JsxOpeningElement */)) {
+ if ((jsxContainer.kind === 249 /* JsxSelfClosingElement */) || (jsxContainer.kind === 250 /* JsxOpeningElement */)) {
// Cursor is inside a JSX self-closing element or opening element
- attrsType = typeChecker.getJsxElementAttributesType(jsxContainer);
+ attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer);
if (attrsType) {
- symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes);
+ symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties);
isMemberCompletion = true;
isNewIdentifierLocation = false;
return true;
@@ -68029,9 +73133,9 @@ var ts;
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
if (scopeNode) {
isGlobalCompletion =
- scopeNode.kind === 261 /* SourceFile */ ||
- scopeNode.kind === 194 /* TemplateExpression */ ||
- scopeNode.kind === 252 /* JsxExpression */ ||
+ scopeNode.kind === 264 /* SourceFile */ ||
+ scopeNode.kind === 195 /* TemplateExpression */ ||
+ scopeNode.kind === 255 /* JsxExpression */ ||
ts.isStatement(scopeNode);
}
/// TODO filter meaning based on the current context
@@ -68064,11 +73168,11 @@ var ts;
return true;
}
if (contextToken.kind === 28 /* GreaterThanToken */ && contextToken.parent) {
- if (contextToken.parent.kind === 248 /* JsxOpeningElement */) {
+ if (contextToken.parent.kind === 250 /* JsxOpeningElement */) {
return true;
}
- if (contextToken.parent.kind === 249 /* JsxClosingElement */ || contextToken.parent.kind === 247 /* JsxSelfClosingElement */) {
- return contextToken.parent.parent && contextToken.parent.parent.kind === 246 /* JsxElement */;
+ if (contextToken.parent.kind === 251 /* JsxClosingElement */ || contextToken.parent.kind === 249 /* JsxSelfClosingElement */) {
+ return contextToken.parent.parent && contextToken.parent.parent.kind === 248 /* JsxElement */;
}
}
return false;
@@ -68078,40 +73182,40 @@ var ts;
var containingNodeKind = previousToken.parent.kind;
switch (previousToken.kind) {
case 25 /* CommaToken */:
- return containingNodeKind === 179 /* CallExpression */ // func( a, |
- || containingNodeKind === 150 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
- || containingNodeKind === 180 /* NewExpression */ // new C(a, |
- || containingNodeKind === 175 /* ArrayLiteralExpression */ // [a, |
- || containingNodeKind === 192 /* BinaryExpression */ // const x = (a, |
- || containingNodeKind === 158 /* FunctionType */; // var x: (s: string, list|
+ return containingNodeKind === 180 /* CallExpression */ // func( a, |
+ || containingNodeKind === 151 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
+ || containingNodeKind === 181 /* NewExpression */ // new C(a, |
+ || containingNodeKind === 176 /* ArrayLiteralExpression */ // [a, |
+ || containingNodeKind === 193 /* BinaryExpression */ // const x = (a, |
+ || containingNodeKind === 159 /* FunctionType */; // var x: (s: string, list|
case 18 /* OpenParenToken */:
- return containingNodeKind === 179 /* CallExpression */ // func( |
- || containingNodeKind === 150 /* Constructor */ // constructor( |
- || containingNodeKind === 180 /* NewExpression */ // new C(a|
- || containingNodeKind === 183 /* ParenthesizedExpression */ // const x = (a|
- || containingNodeKind === 166 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
+ return containingNodeKind === 180 /* CallExpression */ // func( |
+ || containingNodeKind === 151 /* Constructor */ // constructor( |
+ || containingNodeKind === 181 /* NewExpression */ // new C(a|
+ || containingNodeKind === 184 /* ParenthesizedExpression */ // const x = (a|
+ || containingNodeKind === 167 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
case 20 /* OpenBracketToken */:
- return containingNodeKind === 175 /* ArrayLiteralExpression */ // [ |
- || containingNodeKind === 155 /* IndexSignature */ // [ | : string ]
- || containingNodeKind === 142 /* ComputedPropertyName */; // [ | /* this can become an index signature */
+ return containingNodeKind === 176 /* ArrayLiteralExpression */ // [ |
+ || containingNodeKind === 156 /* IndexSignature */ // [ | : string ]
+ || containingNodeKind === 143 /* ComputedPropertyName */; // [ | /* this can become an index signature */
case 127 /* ModuleKeyword */: // module |
case 128 /* NamespaceKeyword */:
return true;
case 22 /* DotToken */:
- return containingNodeKind === 230 /* ModuleDeclaration */; // module A.|
+ return containingNodeKind === 232 /* ModuleDeclaration */; // module A.|
case 16 /* OpenBraceToken */:
- return containingNodeKind === 226 /* ClassDeclaration */; // class A{ |
+ return containingNodeKind === 228 /* ClassDeclaration */; // class A{ |
case 57 /* EqualsToken */:
- return containingNodeKind === 223 /* VariableDeclaration */ // const x = a|
- || containingNodeKind === 192 /* BinaryExpression */; // x = a|
+ return containingNodeKind === 225 /* VariableDeclaration */ // const x = a|
+ || containingNodeKind === 193 /* BinaryExpression */; // x = a|
case 13 /* TemplateHead */:
- return containingNodeKind === 194 /* TemplateExpression */; // `aa ${|
+ return containingNodeKind === 195 /* TemplateExpression */; // `aa ${|
case 14 /* TemplateMiddle */:
- return containingNodeKind === 202 /* TemplateSpan */; // `aa ${10} dd ${|
+ return containingNodeKind === 204 /* TemplateSpan */; // `aa ${10} dd ${|
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
- return containingNodeKind === 147 /* PropertyDeclaration */; // class A{ public |
+ return containingNodeKind === 148 /* PropertyDeclaration */; // class A{ public |
}
// Previous token may have been a keyword that was converted to an identifier.
switch (previousToken.getText()) {
@@ -68154,7 +73258,7 @@ var ts;
isMemberCompletion = true;
var typeForObject;
var existingMembers;
- if (objectLikeContainer.kind === 176 /* ObjectLiteralExpression */) {
+ if (objectLikeContainer.kind === 177 /* ObjectLiteralExpression */) {
// We are completing on contextual types, but may also include properties
// other than those within the declared type.
isNewIdentifierLocation = true;
@@ -68164,7 +73268,7 @@ var ts;
typeForObject = typeForObject && typeForObject.getNonNullableType();
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 172 /* ObjectBindingPattern */) {
+ else if (objectLikeContainer.kind === 173 /* ObjectBindingPattern */) {
// We are *only* completing on properties from the type being destructured.
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
@@ -68175,11 +73279,11 @@ var ts;
// Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed -
// type of parameter will flow in from the contextual type of the function
var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 144 /* Parameter */) {
+ if (!canGetType && rootDeclaration.kind === 145 /* Parameter */) {
if (ts.isExpression(rootDeclaration.parent)) {
canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- else if (rootDeclaration.parent.kind === 149 /* MethodDeclaration */ || rootDeclaration.parent.kind === 152 /* SetAccessor */) {
+ else if (rootDeclaration.parent.kind === 150 /* MethodDeclaration */ || rootDeclaration.parent.kind === 153 /* SetAccessor */) {
canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
@@ -68221,9 +73325,9 @@ var ts;
* @returns true if 'symbols' was successfully populated; false otherwise.
*/
function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) {
- var declarationKind = namedImportsOrExports.kind === 238 /* NamedImports */ ?
- 235 /* ImportDeclaration */ :
- 241 /* ExportDeclaration */;
+ var declarationKind = namedImportsOrExports.kind === 240 /* NamedImports */ ?
+ 237 /* ImportDeclaration */ :
+ 243 /* ExportDeclaration */;
var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind);
var moduleSpecifier = importOrExportDeclaration.moduleSpecifier;
if (!moduleSpecifier) {
@@ -68231,12 +73335,13 @@ var ts;
}
isMemberCompletion = true;
isNewIdentifierLocation = false;
- var exports;
- var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importOrExportDeclaration.moduleSpecifier);
- if (moduleSpecifierSymbol) {
- exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol);
+ var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);
+ if (!moduleSpecifierSymbol) {
+ symbols = ts.emptyArray;
+ return true;
}
- symbols = exports ? filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements) : ts.emptyArray;
+ var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
+ symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
/**
@@ -68248,9 +73353,9 @@ var ts;
switch (contextToken.kind) {
case 16 /* OpenBraceToken */: // const x = { |
case 25 /* CommaToken */:
- var parent_15 = contextToken.parent;
- if (parent_15 && (parent_15.kind === 176 /* ObjectLiteralExpression */ || parent_15.kind === 172 /* ObjectBindingPattern */)) {
- return parent_15;
+ var parent = contextToken.parent;
+ if (parent && (parent.kind === 177 /* ObjectLiteralExpression */ || parent.kind === 173 /* ObjectBindingPattern */)) {
+ return parent;
}
break;
}
@@ -68267,8 +73372,8 @@ var ts;
case 16 /* OpenBraceToken */: // import { |
case 25 /* CommaToken */:
switch (contextToken.parent.kind) {
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return contextToken.parent;
}
}
@@ -68277,37 +73382,55 @@ var ts;
}
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
- var parent_16 = contextToken.parent;
+ var parent = contextToken.parent;
switch (contextToken.kind) {
case 27 /* LessThanSlashToken */:
case 40 /* SlashToken */:
case 70 /* Identifier */:
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
- if (parent_16 && (parent_16.kind === 247 /* JsxSelfClosingElement */ || parent_16.kind === 248 /* JsxOpeningElement */)) {
- return parent_16;
+ case 178 /* PropertyAccessExpression */:
+ case 253 /* JsxAttributes */:
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
+ if (parent && (parent.kind === 249 /* JsxSelfClosingElement */ || parent.kind === 250 /* JsxOpeningElement */)) {
+ return parent;
}
- else if (parent_16.kind === 250 /* JsxAttribute */) {
- return parent_16.parent;
+ else if (parent.kind === 252 /* JsxAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
// The context token is the closing } or " of an attribute, which means
// its parent is a JsxExpression, whose parent is a JsxAttribute,
// whose parent is a JsxOpeningLikeElement
case 9 /* StringLiteral */:
- if (parent_16 && ((parent_16.kind === 250 /* JsxAttribute */) || (parent_16.kind === 251 /* JsxSpreadAttribute */))) {
- return parent_16.parent;
+ if (parent && ((parent.kind === 252 /* JsxAttribute */) || (parent.kind === 254 /* JsxSpreadAttribute */))) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
case 17 /* CloseBraceToken */:
- if (parent_16 &&
- parent_16.kind === 252 /* JsxExpression */ &&
- parent_16.parent &&
- (parent_16.parent.kind === 250 /* JsxAttribute */)) {
- return parent_16.parent.parent;
+ if (parent &&
+ parent.kind === 255 /* JsxExpression */ &&
+ parent.parent && parent.parent.kind === 252 /* JsxAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ // each JsxAttribute can have initializer as JsxExpression
+ return parent.parent.parent.parent;
}
- if (parent_16 && parent_16.kind === 251 /* JsxSpreadAttribute */) {
- return parent_16.parent;
+ if (parent && parent.kind === 254 /* JsxSpreadAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
}
@@ -68315,20 +73438,17 @@ var ts;
return undefined;
}
function isFunction(kind) {
+ if (!ts.isFunctionLikeKind(kind)) {
+ return false;
+ }
switch (kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 151 /* Constructor */:
+ case 160 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ return false;
+ default:
return true;
}
- return false;
}
/**
* @returns true if we are certain that the currently edited location must define a new location; false otherwise.
@@ -68337,66 +73457,66 @@ var ts;
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
case 25 /* CommaToken */:
- return containingNodeKind === 223 /* VariableDeclaration */ ||
- containingNodeKind === 224 /* VariableDeclarationList */ ||
- containingNodeKind === 205 /* VariableStatement */ ||
- containingNodeKind === 229 /* EnumDeclaration */ ||
+ return containingNodeKind === 225 /* VariableDeclaration */ ||
+ containingNodeKind === 226 /* VariableDeclarationList */ ||
+ containingNodeKind === 207 /* VariableStatement */ ||
+ containingNodeKind === 231 /* EnumDeclaration */ ||
isFunction(containingNodeKind) ||
- containingNodeKind === 226 /* ClassDeclaration */ ||
- containingNodeKind === 197 /* ClassExpression */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 173 /* ArrayBindingPattern */ ||
- containingNodeKind === 228 /* TypeAliasDeclaration */; // type Map, K, |
+ containingNodeKind === 228 /* ClassDeclaration */ ||
+ containingNodeKind === 198 /* ClassExpression */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 174 /* ArrayBindingPattern */ ||
+ containingNodeKind === 230 /* TypeAliasDeclaration */; // type Map, K, |
case 22 /* DotToken */:
- return containingNodeKind === 173 /* ArrayBindingPattern */; // var [.|
+ return containingNodeKind === 174 /* ArrayBindingPattern */; // var [.|
case 55 /* ColonToken */:
- return containingNodeKind === 174 /* BindingElement */; // var {x :html|
+ return containingNodeKind === 175 /* BindingElement */; // var {x :html|
case 20 /* OpenBracketToken */:
- return containingNodeKind === 173 /* ArrayBindingPattern */; // var [x|
+ return containingNodeKind === 174 /* ArrayBindingPattern */; // var [x|
case 18 /* OpenParenToken */:
- return containingNodeKind === 256 /* CatchClause */ ||
+ return containingNodeKind === 259 /* CatchClause */ ||
isFunction(containingNodeKind);
case 16 /* OpenBraceToken */:
- return containingNodeKind === 229 /* EnumDeclaration */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 161 /* TypeLiteral */; // const x : { |
+ return containingNodeKind === 231 /* EnumDeclaration */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 162 /* TypeLiteral */; // const x : { |
case 24 /* SemicolonToken */:
- return containingNodeKind === 146 /* PropertySignature */ &&
+ return containingNodeKind === 147 /* PropertySignature */ &&
contextToken.parent && contextToken.parent.parent &&
- (contextToken.parent.parent.kind === 227 /* InterfaceDeclaration */ ||
- contextToken.parent.parent.kind === 161 /* TypeLiteral */); // const x : { a; |
+ (contextToken.parent.parent.kind === 229 /* InterfaceDeclaration */ ||
+ contextToken.parent.parent.kind === 162 /* TypeLiteral */); // const x : { a; |
case 26 /* LessThanToken */:
- return containingNodeKind === 226 /* ClassDeclaration */ ||
- containingNodeKind === 197 /* ClassExpression */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 228 /* TypeAliasDeclaration */ ||
+ return containingNodeKind === 228 /* ClassDeclaration */ ||
+ containingNodeKind === 198 /* ClassExpression */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 230 /* TypeAliasDeclaration */ ||
isFunction(containingNodeKind);
case 114 /* StaticKeyword */:
- return containingNodeKind === 147 /* PropertyDeclaration */;
+ return containingNodeKind === 148 /* PropertyDeclaration */;
case 23 /* DotDotDotToken */:
- return containingNodeKind === 144 /* Parameter */ ||
+ return containingNodeKind === 145 /* Parameter */ ||
(contextToken.parent && contextToken.parent.parent &&
- contextToken.parent.parent.kind === 173 /* ArrayBindingPattern */); // var [...z|
+ contextToken.parent.parent.kind === 174 /* ArrayBindingPattern */); // var [...z|
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
- return containingNodeKind === 144 /* Parameter */;
+ return containingNodeKind === 145 /* Parameter */;
case 117 /* AsKeyword */:
- return containingNodeKind === 239 /* ImportSpecifier */ ||
- containingNodeKind === 243 /* ExportSpecifier */ ||
- containingNodeKind === 237 /* NamespaceImport */;
+ return containingNodeKind === 241 /* ImportSpecifier */ ||
+ containingNodeKind === 245 /* ExportSpecifier */ ||
+ containingNodeKind === 239 /* NamespaceImport */;
case 74 /* ClassKeyword */:
case 82 /* EnumKeyword */:
case 108 /* InterfaceKeyword */:
case 88 /* FunctionKeyword */:
case 103 /* VarKeyword */:
case 124 /* GetKeyword */:
- case 133 /* SetKeyword */:
+ case 134 /* SetKeyword */:
case 90 /* ImportKeyword */:
case 109 /* LetKeyword */:
case 75 /* ConstKeyword */:
case 115 /* YieldKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return true;
}
// Previous token may have been a keyword that was converted to an identifier.
@@ -68444,13 +73564,13 @@ var ts;
if (element.getStart() <= position && position <= element.getEnd()) {
continue;
}
- var name_44 = element.propertyName || element.name;
- existingImportsOrExports[name_44.text] = true;
+ var name = element.propertyName || element.name;
+ existingImportsOrExports.set(name.text, true);
}
- if (!ts.someProperties(existingImportsOrExports)) {
+ if (existingImportsOrExports.size === 0) {
return ts.filter(exportsOfModule, function (e) { return e.name !== "default"; });
}
- return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports[e.name]; });
+ return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports.get(e.name); });
}
/**
* Filters out completion suggestions for named imports or exports.
@@ -68466,12 +73586,12 @@ var ts;
for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) {
var m = existingMembers_1[_i];
// Ignore omitted expressions for missing members
- if (m.kind !== 257 /* PropertyAssignment */ &&
- m.kind !== 258 /* ShorthandPropertyAssignment */ &&
- m.kind !== 174 /* BindingElement */ &&
- m.kind !== 149 /* MethodDeclaration */ &&
- m.kind !== 151 /* GetAccessor */ &&
- m.kind !== 152 /* SetAccessor */) {
+ if (m.kind !== 260 /* PropertyAssignment */ &&
+ m.kind !== 261 /* ShorthandPropertyAssignment */ &&
+ m.kind !== 175 /* BindingElement */ &&
+ m.kind !== 150 /* MethodDeclaration */ &&
+ m.kind !== 152 /* GetAccessor */ &&
+ m.kind !== 153 /* SetAccessor */) {
continue;
}
// If this is the current item we are editing right now, do not filter it out
@@ -68479,7 +73599,7 @@ var ts;
continue;
}
var existingName = void 0;
- if (m.kind === 174 /* BindingElement */ && m.propertyName) {
+ if (m.kind === 175 /* BindingElement */ && m.propertyName) {
// include only identifiers in completion list
if (m.propertyName.kind === 70 /* Identifier */) {
existingName = m.propertyName.text;
@@ -68491,9 +73611,9 @@ var ts;
// things like '__proto__' are not filtered out.
existingName = m.name.text;
}
- existingMemberNames[existingName] = true;
+ existingMemberNames.set(existingName, true);
}
- return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames[m.name]; });
+ return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
/**
* Filters out completion suggestions from 'symbols' according to existing JSX attributes.
@@ -68509,11 +73629,11 @@ var ts;
if (attr.getStart() <= position && position <= attr.getEnd()) {
continue;
}
- if (attr.kind === 250 /* JsxAttribute */) {
- seenNames[attr.name.text] = true;
+ if (attr.kind === 252 /* JsxAttribute */) {
+ seenNames.set(attr.name.text, true);
}
}
- return ts.filter(symbols, function (a) { return !seenNames[a.name]; });
+ return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
}
/**
@@ -68559,7 +73679,7 @@ var ts;
}
// A cache of completion entries for keywords, these do not change between sessions
var keywordCompletions = [];
- for (var i = 71 /* FirstKeyword */; i <= 140 /* LastKeyword */; i++) {
+ for (var i = 71 /* FirstKeyword */; i <= 141 /* LastKeyword */; i++) {
keywordCompletions.push({
name: ts.tokenToString(i),
kind: ts.ScriptElementKind.keyword,
@@ -68567,49 +73687,14 @@ var ts;
sortText: "0"
});
}
- /**
- * Matches a triple slash reference directive with an incomplete string literal for its path. Used
- * to determine if the caret is currently within the string literal and capture the literal fragment
- * for completions.
- * For example, this matches
- *
- * /// <reference path="fragment
- *
- * but not
- *
- * /// <reference path="fragment"
- */
- var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
- var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
- function tryGetDirectories(host, directoryName) {
- return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
- }
- function tryReadDirectory(host, path, extensions, exclude, include) {
- return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
- }
- function tryReadFile(host, path) {
- return tryIOAndConsumeErrors(host, host.readFile, path);
- }
- function tryFileExists(host, path) {
- return tryIOAndConsumeErrors(host, host.fileExists, path);
+ function isEqualityExpression(node) {
+ return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
- function tryDirectoryExists(host, path) {
- try {
- return ts.directoryProbablyExists(path, host);
- }
- catch (e) { }
- return undefined;
- }
- function tryIOAndConsumeErrors(host, toApply) {
- var args = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- args[_i - 2] = arguments[_i];
- }
- try {
- return toApply && toApply.apply(host, args);
- }
- catch (e) { }
- return undefined;
+ function isEqualityOperatorKind(kind) {
+ return kind === 31 /* EqualsEqualsToken */ ||
+ kind === 32 /* ExclamationEqualsToken */ ||
+ kind === 33 /* EqualsEqualsEqualsToken */ ||
+ kind === 34 /* ExclamationEqualsEqualsToken */;
}
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
@@ -68620,534 +73705,513 @@ var ts;
(function (DocumentHighlights) {
function getDocumentHighlights(typeChecker, cancellationToken, sourceFile, position, sourceFilesToSearch) {
var node = ts.getTouchingWord(sourceFile, position);
+ return node && (getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile));
+ }
+ DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
+ function getHighlightSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var end = node.getEnd();
+ return {
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(start, end),
+ kind: ts.HighlightSpanKind.none
+ };
+ }
+ function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ return referenceEntries && convertReferencedSymbols(referenceEntries);
+ }
+ function convertReferencedSymbols(referenceEntries) {
+ var fileNameToDocumentHighlights = ts.createMap();
+ for (var _i = 0, referenceEntries_1 = referenceEntries; _i < referenceEntries_1.length; _i++) {
+ var entry = referenceEntries_1[_i];
+ var _a = ts.FindAllReferences.toHighlightSpan(entry), fileName = _a.fileName, span_12 = _a.span;
+ var highlightSpans = fileNameToDocumentHighlights.get(fileName);
+ if (!highlightSpans) {
+ fileNameToDocumentHighlights.set(fileName, highlightSpans = []);
+ }
+ highlightSpans.push(span_12);
+ }
+ return ts.arrayFrom(fileNameToDocumentHighlights.entries(), function (_a) {
+ var fileName = _a[0], highlightSpans = _a[1];
+ return ({ fileName: fileName, highlightSpans: highlightSpans });
+ });
+ }
+ function getSyntacticDocumentHighlights(node, sourceFile) {
+ var highlightSpans = getHighlightSpans(node, sourceFile);
+ if (!highlightSpans || highlightSpans.length === 0) {
+ return undefined;
+ }
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ // returns true if 'node' is defined and has a matching 'kind'.
+ function hasKind(node, kind) {
+ return node !== undefined && node.kind === kind;
+ }
+ // Null-propagating 'parent' function.
+ function parent(node) {
+ return node && node.parent;
+ }
+ function getHighlightSpans(node, sourceFile) {
if (!node) {
return undefined;
}
- return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node);
- function getHighlightSpanForNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- return {
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- kind: ts.HighlightSpanKind.none
- };
+ switch (node.kind) {
+ case 89 /* IfKeyword */:
+ case 81 /* ElseKeyword */:
+ if (hasKind(node.parent, 210 /* IfStatement */)) {
+ return getIfElseOccurrences(node.parent, sourceFile);
+ }
+ break;
+ case 95 /* ReturnKeyword */:
+ if (hasKind(node.parent, 218 /* ReturnStatement */)) {
+ return highlightSpans(getReturnOccurrences(node.parent));
+ }
+ break;
+ case 99 /* ThrowKeyword */:
+ if (hasKind(node.parent, 222 /* ThrowStatement */)) {
+ return highlightSpans(getThrowOccurrences(node.parent));
+ }
+ break;
+ case 101 /* TryKeyword */:
+ case 73 /* CatchKeyword */:
+ case 86 /* FinallyKeyword */:
+ var tryStatement = node.kind === 73 /* CatchKeyword */ ? parent(parent(node)) : parent(node);
+ if (hasKind(tryStatement, 223 /* TryStatement */)) {
+ return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile));
+ }
+ break;
+ case 97 /* SwitchKeyword */:
+ if (hasKind(node.parent, 220 /* SwitchStatement */)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent));
+ }
+ break;
+ case 72 /* CaseKeyword */:
+ case 78 /* DefaultKeyword */:
+ if (hasKind(parent(parent(parent(node))), 220 /* SwitchStatement */)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent));
+ }
+ break;
+ case 71 /* BreakKeyword */:
+ case 76 /* ContinueKeyword */:
+ if (hasKind(node.parent, 217 /* BreakStatement */) || hasKind(node.parent, 216 /* ContinueStatement */)) {
+ return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent));
+ }
+ break;
+ case 87 /* ForKeyword */:
+ if (hasKind(node.parent, 213 /* ForStatement */) ||
+ hasKind(node.parent, 214 /* ForInStatement */) ||
+ hasKind(node.parent, 215 /* ForOfStatement */)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 105 /* WhileKeyword */:
+ case 80 /* DoKeyword */:
+ if (hasKind(node.parent, 212 /* WhileStatement */) || hasKind(node.parent, 211 /* DoStatement */)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 122 /* ConstructorKeyword */:
+ if (hasKind(node.parent, 151 /* Constructor */)) {
+ return highlightSpans(getConstructorOccurrences(node.parent));
+ }
+ break;
+ case 124 /* GetKeyword */:
+ case 134 /* SetKeyword */:
+ if (hasKind(node.parent, 152 /* GetAccessor */) || hasKind(node.parent, 153 /* SetAccessor */)) {
+ return highlightSpans(getGetAndSetOccurrences(node.parent));
+ }
+ break;
+ default:
+ if (ts.isModifierKind(node.kind) && node.parent &&
+ (ts.isDeclaration(node.parent) || node.parent.kind === 207 /* VariableStatement */)) {
+ return highlightSpans(getModifierOccurrences(node.kind, node.parent));
+ }
}
- function getSemanticDocumentHighlights(node) {
- if (node.kind === 70 /* Identifier */ ||
- node.kind === 98 /* ThisKeyword */ ||
- node.kind === 167 /* ThisType */ ||
- node.kind === 96 /* SuperKeyword */ ||
- node.kind === 9 /* StringLiteral */ ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFilesToSearch, /*findInStrings*/ false, /*findInComments*/ false, /*implementations*/ false);
- return convertReferencedSymbols(referencedSymbols);
+ function highlightSpans(nodes) {
+ return nodes && nodes.map(function (node) { return getHighlightSpanForNode(node, sourceFile); });
+ }
+ }
+ /**
+ * Aggregates all throw-statements within this node *without* crossing
+ * into function boundaries and try-blocks with catch-clauses.
+ */
+ function aggregateOwnedThrowStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 222 /* ThrowStatement */) {
+ statementAccumulator.push(node);
}
- return undefined;
- function convertReferencedSymbols(referencedSymbols) {
- if (!referencedSymbols) {
- return undefined;
+ else if (node.kind === 223 /* TryStatement */) {
+ var tryStatement = node;
+ if (tryStatement.catchClause) {
+ aggregate(tryStatement.catchClause);
}
- var fileNameToDocumentHighlights = ts.createMap();
- var result = [];
- for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
- var referencedSymbol = referencedSymbols_1[_i];
- for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
- var referenceEntry = _b[_a];
- var fileName = referenceEntry.fileName;
- var documentHighlights = fileNameToDocumentHighlights[fileName];
- if (!documentHighlights) {
- documentHighlights = { fileName: fileName, highlightSpans: [] };
- fileNameToDocumentHighlights[fileName] = documentHighlights;
- result.push(documentHighlights);
- }
- documentHighlights.highlightSpans.push({
- textSpan: referenceEntry.textSpan,
- kind: referenceEntry.isWriteAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference
- });
- }
+ else {
+ // Exceptions thrown within a try block lacking a catch clause
+ // are "owned" in the current context.
+ aggregate(tryStatement.tryBlock);
+ }
+ if (tryStatement.finallyBlock) {
+ aggregate(tryStatement.finallyBlock);
}
- return result;
+ }
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
}
- function getSyntacticDocumentHighlights(node) {
- var fileName = sourceFile.fileName;
- var highlightSpans = getHighlightSpans(node);
- if (!highlightSpans || highlightSpans.length === 0) {
- return undefined;
+ }
+ /**
+ * For lack of a better name, this function takes a throw statement and returns the
+ * nearest ancestor that is a try-block (whose try statement has a catch clause),
+ * function-block, or source file.
+ */
+ function getThrowStatementOwner(throwStatement) {
+ var child = throwStatement;
+ while (child.parent) {
+ var parent_2 = child.parent;
+ if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264 /* SourceFile */) {
+ return parent_2;
}
- return [{ fileName: fileName, highlightSpans: highlightSpans }];
- // returns true if 'node' is defined and has a matching 'kind'.
- function hasKind(node, kind) {
- return node !== undefined && node.kind === kind;
+ // A throw-statement is only owned by a try-statement if the try-statement has
+ // a catch clause, and if the throw-statement occurs within the try block.
+ if (parent_2.kind === 223 /* TryStatement */) {
+ var tryStatement = parent_2;
+ if (tryStatement.tryBlock === child && tryStatement.catchClause) {
+ return child;
+ }
}
- // Null-propagating 'parent' function.
- function parent(node) {
- return node && node.parent;
+ child = parent_2;
+ }
+ return undefined;
+ }
+ function aggregateAllBreakAndContinueStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 217 /* BreakStatement */ || node.kind === 216 /* ContinueStatement */) {
+ statementAccumulator.push(node);
}
- function getHighlightSpans(node) {
- if (node) {
- switch (node.kind) {
- case 89 /* IfKeyword */:
- case 81 /* ElseKeyword */:
- if (hasKind(node.parent, 208 /* IfStatement */)) {
- return getIfElseOccurrences(node.parent);
- }
- break;
- case 95 /* ReturnKeyword */:
- if (hasKind(node.parent, 216 /* ReturnStatement */)) {
- return getReturnOccurrences(node.parent);
- }
- break;
- case 99 /* ThrowKeyword */:
- if (hasKind(node.parent, 220 /* ThrowStatement */)) {
- return getThrowOccurrences(node.parent);
- }
- break;
- case 73 /* CatchKeyword */:
- if (hasKind(parent(parent(node)), 221 /* TryStatement */)) {
- return getTryCatchFinallyOccurrences(node.parent.parent);
- }
- break;
- case 101 /* TryKeyword */:
- case 86 /* FinallyKeyword */:
- if (hasKind(parent(node), 221 /* TryStatement */)) {
- return getTryCatchFinallyOccurrences(node.parent);
- }
- break;
- case 97 /* SwitchKeyword */:
- if (hasKind(node.parent, 218 /* SwitchStatement */)) {
- return getSwitchCaseDefaultOccurrences(node.parent);
- }
- break;
- case 72 /* CaseKeyword */:
- case 78 /* DefaultKeyword */:
- if (hasKind(parent(parent(parent(node))), 218 /* SwitchStatement */)) {
- return getSwitchCaseDefaultOccurrences(node.parent.parent.parent);
- }
- break;
- case 71 /* BreakKeyword */:
- case 76 /* ContinueKeyword */:
- if (hasKind(node.parent, 215 /* BreakStatement */) || hasKind(node.parent, 214 /* ContinueStatement */)) {
- return getBreakOrContinueStatementOccurrences(node.parent);
- }
- break;
- case 87 /* ForKeyword */:
- if (hasKind(node.parent, 211 /* ForStatement */) ||
- hasKind(node.parent, 212 /* ForInStatement */) ||
- hasKind(node.parent, 213 /* ForOfStatement */)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 105 /* WhileKeyword */:
- case 80 /* DoKeyword */:
- if (hasKind(node.parent, 210 /* WhileStatement */) || hasKind(node.parent, 209 /* DoStatement */)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 122 /* ConstructorKeyword */:
- if (hasKind(node.parent, 150 /* Constructor */)) {
- return getConstructorOccurrences(node.parent);
- }
- break;
- case 124 /* GetKeyword */:
- case 133 /* SetKeyword */:
- if (hasKind(node.parent, 151 /* GetAccessor */) || hasKind(node.parent, 152 /* SetAccessor */)) {
- return getGetAndSetOccurrences(node.parent);
- }
- break;
- default:
- if (ts.isModifierKind(node.kind) && node.parent &&
- (ts.isDeclaration(node.parent) || node.parent.kind === 205 /* VariableStatement */)) {
- return getModifierOccurrences(node.kind, node.parent);
- }
- }
- }
- return undefined;
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
- /**
- * Aggregates all throw-statements within this node *without* crossing
- * into function boundaries and try-blocks with catch-clauses.
- */
- function aggregateOwnedThrowStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 220 /* ThrowStatement */) {
- statementAccumulator.push(node);
- }
- else if (node.kind === 221 /* TryStatement */) {
- var tryStatement = node;
- if (tryStatement.catchClause) {
- aggregate(tryStatement.catchClause);
- }
- else {
- // Exceptions thrown within a try block lacking a catch clause
- // are "owned" in the current context.
- aggregate(tryStatement.tryBlock);
- }
- if (tryStatement.finallyBlock) {
- aggregate(tryStatement.finallyBlock);
- }
+ }
+ }
+ function ownsBreakOrContinueStatement(owner, statement) {
+ var actualOwner = getBreakOrContinueOwner(statement);
+ return actualOwner && actualOwner === owner;
+ }
+ function getBreakOrContinueOwner(statement) {
+ for (var node = statement.parent; node; node = node.parent) {
+ switch (node.kind) {
+ case 220 /* SwitchStatement */:
+ if (statement.kind === 216 /* ContinueStatement */) {
+ continue;
}
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
+ // falls through
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
+ if (!statement.label || isLabeledBy(node, statement.label.text)) {
+ return node;
}
- }
- }
- /**
- * For lack of a better name, this function takes a throw statement and returns the
- * nearest ancestor that is a try-block (whose try statement has a catch clause),
- * function-block, or source file.
- */
- function getThrowStatementOwner(throwStatement) {
- var child = throwStatement;
- while (child.parent) {
- var parent_17 = child.parent;
- if (ts.isFunctionBlock(parent_17) || parent_17.kind === 261 /* SourceFile */) {
- return parent_17;
- }
- // A throw-statement is only owned by a try-statement if the try-statement has
- // a catch clause, and if the throw-statement occurs within the try block.
- if (parent_17.kind === 221 /* TryStatement */) {
- var tryStatement = parent_17;
- if (tryStatement.tryBlock === child && tryStatement.catchClause) {
- return child;
- }
+ break;
+ default:
+ // Don't cross function boundaries.
+ if (ts.isFunctionLike(node)) {
+ return undefined;
}
- child = parent_17;
- }
+ break;
+ }
+ }
+ return undefined;
+ }
+ function getModifierOccurrences(modifier, declaration) {
+ var container = declaration.parent;
+ // Make sure we only highlight the keyword when it makes sense to do so.
+ if (ts.isAccessibilityModifier(modifier)) {
+ if (!(container.kind === 228 /* ClassDeclaration */ ||
+ container.kind === 198 /* ClassExpression */ ||
+ (declaration.kind === 145 /* Parameter */ && hasKind(container, 151 /* Constructor */)))) {
return undefined;
}
- function aggregateAllBreakAndContinueStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 215 /* BreakStatement */ || node.kind === 214 /* ContinueStatement */) {
- statementAccumulator.push(node);
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
- }
- }
+ }
+ else if (modifier === 114 /* StaticKeyword */) {
+ if (!(container.kind === 228 /* ClassDeclaration */ || container.kind === 198 /* ClassExpression */)) {
+ return undefined;
}
- function ownsBreakOrContinueStatement(owner, statement) {
- var actualOwner = getBreakOrContinueOwner(statement);
- return actualOwner && actualOwner === owner;
+ }
+ else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) {
+ if (!(container.kind === 233 /* ModuleBlock */ || container.kind === 264 /* SourceFile */)) {
+ return undefined;
}
- function getBreakOrContinueOwner(statement) {
- for (var node_1 = statement.parent; node_1; node_1 = node_1.parent) {
- switch (node_1.kind) {
- case 218 /* SwitchStatement */:
- if (statement.kind === 214 /* ContinueStatement */) {
- continue;
- }
- // Fall through.
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
- if (!statement.label || isLabeledBy(node_1, statement.label.text)) {
- return node_1;
- }
- break;
- default:
- // Don't cross function boundaries.
- if (ts.isFunctionLike(node_1)) {
- return undefined;
- }
- break;
- }
- }
+ }
+ else if (modifier === 116 /* AbstractKeyword */) {
+ if (!(container.kind === 228 /* ClassDeclaration */ || declaration.kind === 228 /* ClassDeclaration */)) {
return undefined;
}
- function getModifierOccurrences(modifier, declaration) {
- var container = declaration.parent;
- // Make sure we only highlight the keyword when it makes sense to do so.
- if (ts.isAccessibilityModifier(modifier)) {
- if (!(container.kind === 226 /* ClassDeclaration */ ||
- container.kind === 197 /* ClassExpression */ ||
- (declaration.kind === 144 /* Parameter */ && hasKind(container, 150 /* Constructor */)))) {
- return undefined;
- }
- }
- else if (modifier === 114 /* StaticKeyword */) {
- if (!(container.kind === 226 /* ClassDeclaration */ || container.kind === 197 /* ClassExpression */)) {
- return undefined;
- }
- }
- else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) {
- if (!(container.kind === 231 /* ModuleBlock */ || container.kind === 261 /* SourceFile */)) {
- return undefined;
- }
- }
- else if (modifier === 116 /* AbstractKeyword */) {
- if (!(container.kind === 226 /* ClassDeclaration */ || declaration.kind === 226 /* ClassDeclaration */)) {
- return undefined;
- }
+ }
+ else {
+ // unsupported modifier
+ return undefined;
+ }
+ var keywords = [];
+ var modifierFlag = getFlagFromModifier(modifier);
+ var nodes;
+ switch (container.kind) {
+ case 233 /* ModuleBlock */:
+ case 264 /* SourceFile */:
+ // Container is either a class declaration or the declaration is a classDeclaration
+ if (modifierFlag & 128 /* Abstract */) {
+ nodes = declaration.members.concat(declaration);
}
else {
- // unsupported modifier
- return undefined;
- }
- var keywords = [];
- var modifierFlag = getFlagFromModifier(modifier);
- var nodes;
- switch (container.kind) {
- case 231 /* ModuleBlock */:
- case 261 /* SourceFile */:
- // Container is either a class declaration or the declaration is a classDeclaration
- if (modifierFlag & 128 /* Abstract */) {
- nodes = declaration.members.concat(declaration);
- }
- else {
- nodes = container.statements;
- }
- break;
- case 150 /* Constructor */:
- nodes = container.parameters.concat(container.parent.members);
- break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- nodes = container.members;
- // If we're an accessibility modifier, we're in an instance member and should search
- // the constructor's parameter list for instance members as well.
- if (modifierFlag & 28 /* AccessibilityModifier */) {
- var constructor = ts.forEach(container.members, function (member) {
- return member.kind === 150 /* Constructor */ && member;
- });
- if (constructor) {
- nodes = nodes.concat(constructor.parameters);
- }
- }
- else if (modifierFlag & 128 /* Abstract */) {
- nodes = nodes.concat(container);
- }
- break;
- default:
- ts.Debug.fail("Invalid container kind.");
+ nodes = container.statements;
}
- ts.forEach(nodes, function (node) {
- if (ts.getModifierFlags(node) & modifierFlag) {
- ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- function getFlagFromModifier(modifier) {
- switch (modifier) {
- case 113 /* PublicKeyword */:
- return 4 /* Public */;
- case 111 /* PrivateKeyword */:
- return 8 /* Private */;
- case 112 /* ProtectedKeyword */:
- return 16 /* Protected */;
- case 114 /* StaticKeyword */:
- return 32 /* Static */;
- case 83 /* ExportKeyword */:
- return 1 /* Export */;
- case 123 /* DeclareKeyword */:
- return 2 /* Ambient */;
- case 116 /* AbstractKeyword */:
- return 128 /* Abstract */;
- default:
- ts.Debug.fail();
+ break;
+ case 151 /* Constructor */:
+ nodes = container.parameters.concat(container.parent.members);
+ break;
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ nodes = container.members;
+ // If we're an accessibility modifier, we're in an instance member and should search
+ // the constructor's parameter list for instance members as well.
+ if (modifierFlag & 28 /* AccessibilityModifier */) {
+ var constructor = ts.forEach(container.members, function (member) {
+ return member.kind === 151 /* Constructor */ && member;
+ });
+ if (constructor) {
+ nodes = nodes.concat(constructor.parameters);
}
}
- }
- function pushKeywordIf(keywordList, token) {
- var expected = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- expected[_i - 2] = arguments[_i];
+ else if (modifierFlag & 128 /* Abstract */) {
+ nodes = nodes.concat(container);
}
- if (token && ts.contains(expected, token.kind)) {
- keywordList.push(token);
- return true;
- }
- return false;
+ break;
+ default:
+ ts.Debug.fail("Invalid container kind.");
+ }
+ ts.forEach(nodes, function (node) {
+ if (ts.getModifierFlags(node) & modifierFlag) {
+ ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
}
- function getGetAndSetOccurrences(accessorDeclaration) {
- var keywords = [];
- tryPushAccessorKeyword(accessorDeclaration.symbol, 151 /* GetAccessor */);
- tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* SetAccessor */);
- return ts.map(keywords, getHighlightSpanForNode);
- function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
- var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
- if (accessor) {
- ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 133 /* SetKeyword */); });
- }
- }
+ });
+ return keywords;
+ function getFlagFromModifier(modifier) {
+ switch (modifier) {
+ case 113 /* PublicKeyword */:
+ return 4 /* Public */;
+ case 111 /* PrivateKeyword */:
+ return 8 /* Private */;
+ case 112 /* ProtectedKeyword */:
+ return 16 /* Protected */;
+ case 114 /* StaticKeyword */:
+ return 32 /* Static */;
+ case 83 /* ExportKeyword */:
+ return 1 /* Export */;
+ case 123 /* DeclareKeyword */:
+ return 2 /* Ambient */;
+ case 116 /* AbstractKeyword */:
+ return 128 /* Abstract */;
+ default:
+ ts.Debug.fail();
}
- function getConstructorOccurrences(constructorDeclaration) {
- var declarations = constructorDeclaration.symbol.getDeclarations();
- var keywords = [];
- ts.forEach(declarations, function (declaration) {
- ts.forEach(declaration.getChildren(), function (token) {
- return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */);
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getLoopBreakContinueOccurrences(loopNode) {
- var keywords = [];
- if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) {
- // If we succeeded and got a do-while loop, then start looking for a 'while' keyword.
- if (loopNode.kind === 209 /* DoStatement */) {
- var loopTokens = loopNode.getChildren();
- for (var i = loopTokens.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) {
- break;
- }
- }
- }
- }
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(loopNode, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */);
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
- var owner = getBreakOrContinueOwner(breakOrContinueStatement);
- if (owner) {
- switch (owner.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- return getLoopBreakContinueOccurrences(owner);
- case 218 /* SwitchStatement */:
- return getSwitchCaseDefaultOccurrences(owner);
+ }
+ }
+ function pushKeywordIf(keywordList, token) {
+ var expected = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ expected[_i - 2] = arguments[_i];
+ }
+ if (token && ts.contains(expected, token.kind)) {
+ keywordList.push(token);
+ return true;
+ }
+ return false;
+ }
+ function getGetAndSetOccurrences(accessorDeclaration) {
+ var keywords = [];
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* GetAccessor */);
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* SetAccessor */);
+ return keywords;
+ function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
+ var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
+ if (accessor) {
+ ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 134 /* SetKeyword */); });
+ }
+ }
+ }
+ function getConstructorOccurrences(constructorDeclaration) {
+ var declarations = constructorDeclaration.symbol.getDeclarations();
+ var keywords = [];
+ ts.forEach(declarations, function (declaration) {
+ ts.forEach(declaration.getChildren(), function (token) {
+ return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */);
+ });
+ });
+ return keywords;
+ }
+ function getLoopBreakContinueOccurrences(loopNode) {
+ var keywords = [];
+ if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) {
+ // If we succeeded and got a do-while loop, then start looking for a 'while' keyword.
+ if (loopNode.kind === 211 /* DoStatement */) {
+ var loopTokens = loopNode.getChildren();
+ for (var i = loopTokens.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) {
+ break;
}
}
- return undefined;
}
- function getSwitchCaseDefaultOccurrences(switchStatement) {
- var keywords = [];
- pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */);
- // Go through each clause in the switch statement, collecting the 'case'/'default' keywords.
- ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
- pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */);
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(switchStatement, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */);
- }
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
+ }
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(loopNode, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */);
}
- function getTryCatchFinallyOccurrences(tryStatement) {
- var keywords = [];
- pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */);
- if (tryStatement.catchClause) {
- pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */);
- }
- if (tryStatement.finallyBlock) {
- var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile);
- pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */);
- }
- return ts.map(keywords, getHighlightSpanForNode);
+ });
+ return keywords;
+ }
+ function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
+ var owner = getBreakOrContinueOwner(breakOrContinueStatement);
+ if (owner) {
+ switch (owner.kind) {
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return getLoopBreakContinueOccurrences(owner);
+ case 220 /* SwitchStatement */:
+ return getSwitchCaseDefaultOccurrences(owner);
}
- function getThrowOccurrences(throwStatement) {
- var owner = getThrowStatementOwner(throwStatement);
- if (!owner) {
- return undefined;
+ }
+ return undefined;
+ }
+ function getSwitchCaseDefaultOccurrences(switchStatement) {
+ var keywords = [];
+ pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */);
+ // Go through each clause in the switch statement, collecting the 'case'/'default' keywords.
+ ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
+ pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */);
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(switchStatement, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */);
}
- var keywords = [];
- ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
- });
- // If the "owner" is a function, then we equate 'return' and 'throw' statements in their
- // ability to "jump out" of the function, and include occurrences for both.
- if (ts.isFunctionBlock(owner)) {
- ts.forEachReturnStatement(owner, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
- });
+ });
+ });
+ return keywords;
+ }
+ function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {
+ var keywords = [];
+ pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */);
+ if (tryStatement.catchClause) {
+ pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */);
+ }
+ if (tryStatement.finallyBlock) {
+ var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile);
+ pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */);
+ }
+ return keywords;
+ }
+ function getThrowOccurrences(throwStatement) {
+ var owner = getThrowStatementOwner(throwStatement);
+ if (!owner) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
+ });
+ // If the "owner" is a function, then we equate 'return' and 'throw' statements in their
+ // ability to "jump out" of the function, and include occurrences for both.
+ if (ts.isFunctionBlock(owner)) {
+ ts.forEachReturnStatement(owner, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
+ });
+ }
+ return keywords;
+ }
+ function getReturnOccurrences(returnStatement) {
+ var func = ts.getContainingFunction(returnStatement);
+ // If we didn't find a containing function with a block body, bail out.
+ if (!(func && hasKind(func.body, 206 /* Block */))) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEachReturnStatement(func.body, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
+ });
+ // Include 'throw' statements that do not occur within a try block.
+ ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
+ });
+ return keywords;
+ }
+ function getIfElseOccurrences(ifStatement, sourceFile) {
+ var keywords = [];
+ // Traverse upwards through all parent if-statements linked by their else-branches.
+ while (hasKind(ifStatement.parent, 210 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) {
+ ifStatement = ifStatement.parent;
+ }
+ // Now traverse back down through the else branches, aggregating if/else keywords of if-statements.
+ while (ifStatement) {
+ var children = ifStatement.getChildren();
+ pushKeywordIf(keywords, children[0], 89 /* IfKeyword */);
+ // Generally the 'else' keyword is second-to-last, so we traverse backwards.
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) {
+ break;
}
- return ts.map(keywords, getHighlightSpanForNode);
}
- function getReturnOccurrences(returnStatement) {
- var func = ts.getContainingFunction(returnStatement);
- // If we didn't find a containing function with a block body, bail out.
- if (!(func && hasKind(func.body, 204 /* Block */))) {
- return undefined;
- }
- var keywords = [];
- ts.forEachReturnStatement(func.body, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
- });
- // Include 'throw' statements that do not occur within a try block.
- ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getIfElseOccurrences(ifStatement) {
- var keywords = [];
- // Traverse upwards through all parent if-statements linked by their else-branches.
- while (hasKind(ifStatement.parent, 208 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) {
- ifStatement = ifStatement.parent;
- }
- // Now traverse back down through the else branches, aggregating if/else keywords of if-statements.
- while (ifStatement) {
- var children = ifStatement.getChildren();
- pushKeywordIf(keywords, children[0], 89 /* IfKeyword */);
- // Generally the 'else' keyword is second-to-last, so we traverse backwards.
- for (var i = children.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) {
- break;
- }
- }
- if (!hasKind(ifStatement.elseStatement, 208 /* IfStatement */)) {
+ if (!hasKind(ifStatement.elseStatement, 210 /* IfStatement */)) {
+ break;
+ }
+ ifStatement = ifStatement.elseStatement;
+ }
+ var result = [];
+ // We'd like to highlight else/ifs together if they are only separated by whitespace
+ // (i.e. the keywords are separated by no comments, no newlines).
+ for (var i = 0; i < keywords.length; i++) {
+ if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) {
+ var elseKeyword = keywords[i];
+ var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword.
+ var shouldCombindElseAndIf = true;
+ // Avoid recalculating getStart() by iterating backwards.
+ for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
+ if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
+ shouldCombindElseAndIf = false;
break;
}
- ifStatement = ifStatement.elseStatement;
}
- var result = [];
- // We'd like to highlight else/ifs together if they are only separated by whitespace
- // (i.e. the keywords are separated by no comments, no newlines).
- for (var i = 0; i < keywords.length; i++) {
- if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) {
- var elseKeyword = keywords[i];
- var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword.
- var shouldCombindElseAndIf = true;
- // Avoid recalculating getStart() by iterating backwards.
- for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
- if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
- shouldCombindElseAndIf = false;
- break;
- }
- }
- if (shouldCombindElseAndIf) {
- result.push({
- fileName: fileName,
- textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
- kind: ts.HighlightSpanKind.reference
- });
- i++; // skip the next keyword
- continue;
- }
- }
- // Ordinary case: just highlight the keyword.
- result.push(getHighlightSpanForNode(keywords[i]));
+ if (shouldCombindElseAndIf) {
+ result.push({
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
+ kind: ts.HighlightSpanKind.reference
+ });
+ i++; // skip the next keyword
+ continue;
}
- return result;
}
+ // Ordinary case: just highlight the keyword.
+ result.push(getHighlightSpanForNode(keywords[i], sourceFile));
}
+ return result;
}
- DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
/**
* Whether or not a 'node' is preceded by a label of the given string.
* Note: 'node' cannot be a SourceFile.
*/
function isLabeledBy(node, labelName) {
- for (var owner = node.parent; owner.kind === 219 /* LabeledStatement */; owner = owner.parent) {
+ for (var owner = node.parent; owner.kind === 221 /* LabeledStatement */; owner = owner.parent) {
if (owner.label.text === labelName) {
return true;
}
@@ -69168,15 +74232,15 @@ var ts;
return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + "|" + settings.allowJs + "|" + settings.baseUrl + "|" + JSON.stringify(settings.typeRoots) + "|" + JSON.stringify(settings.rootDirs) + "|" + JSON.stringify(settings.paths);
}
function getBucketForCompilationSettings(key, createIfMissing) {
- var bucket = buckets[key];
+ var bucket = buckets.get(key);
if (!bucket && createIfMissing) {
- buckets[key] = bucket = ts.createFileMap();
+ buckets.set(key, bucket = ts.createFileMap());
}
return bucket;
}
function reportStats() {
- var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
- var entries = buckets[name];
+ var bucketInfoArray = ts.arrayFrom(buckets.keys()).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
+ var entries = buckets.get(name);
var sourceFiles = [];
entries.forEachValue(function (key, entry) {
sourceFiles.push({
@@ -69269,41 +74333,764 @@ var ts;
}
ts.createDocumentRegistry = createDocumentRegistry;
})(ts || (ts = {}));
+/* Code for finding imports of an exported symbol. Used only by FindAllReferences. */
/* @internal */
var ts;
(function (ts) {
var FindAllReferences;
(function (FindAllReferences) {
- function findReferencedSymbols(typeChecker, cancellationToken, sourceFiles, sourceFile, position, findInStrings, findInComments) {
- var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
- if (node === sourceFile) {
- return undefined;
+ /** Creates the imports map and returns an ImportTracker that uses it. Call this lazily to avoid calling `getDirectImportsMap` unnecessarily. */
+ function createImportTracker(sourceFiles, checker, cancellationToken) {
+ var allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);
+ return function (exportSymbol, exportInfo, isForRename) {
+ var _a = getImportersForExport(sourceFiles, allDirectImports, exportInfo, checker, cancellationToken), directImports = _a.directImports, indirectUsers = _a.indirectUsers;
+ return __assign({ indirectUsers: indirectUsers }, getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename));
+ };
+ }
+ FindAllReferences.createImportTracker = createImportTracker;
+ var ExportKind;
+ (function (ExportKind) {
+ ExportKind[ExportKind["Named"] = 0] = "Named";
+ ExportKind[ExportKind["Default"] = 1] = "Default";
+ ExportKind[ExportKind["ExportEquals"] = 2] = "ExportEquals";
+ })(ExportKind = FindAllReferences.ExportKind || (FindAllReferences.ExportKind = {}));
+ var ImportExport;
+ (function (ImportExport) {
+ ImportExport[ImportExport["Import"] = 0] = "Import";
+ ImportExport[ImportExport["Export"] = 1] = "Export";
+ })(ImportExport = FindAllReferences.ImportExport || (FindAllReferences.ImportExport = {}));
+ /** Returns import statements that directly reference the exporting module, and a list of files that may access the module through a namespace. */
+ function getImportersForExport(sourceFiles, allDirectImports, _a, checker, cancellationToken) {
+ var exportingModuleSymbol = _a.exportingModuleSymbol, exportKind = _a.exportKind;
+ var markSeenDirectImport = ts.nodeSeenTracker();
+ var markSeenIndirectUser = ts.nodeSeenTracker();
+ var directImports = [];
+ var isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports;
+ var indirectUserDeclarations = isAvailableThroughGlobal ? undefined : [];
+ handleDirectImports(exportingModuleSymbol);
+ return { directImports: directImports, indirectUsers: getIndirectUsers() };
+ function getIndirectUsers() {
+ if (isAvailableThroughGlobal) {
+ // It has `export as namespace`, so anything could potentially use it.
+ return sourceFiles;
+ }
+ // Module augmentations may use this module's exports without importing it.
+ for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (ts.isExternalModuleAugmentation(decl)) {
+ addIndirectUser(decl);
+ }
+ }
+ // This may return duplicates (if there are multiple module declarations in a single source file, all importing the same thing as a namespace), but `State.markSearchedSymbol` will handle that.
+ return indirectUserDeclarations.map(ts.getSourceFileOfNode);
}
- switch (node.kind) {
- case 8 /* NumericLiteral */:
- if (!ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- break;
+ function handleDirectImports(exportingModuleSymbol) {
+ var theseDirectImports = getDirectImports(exportingModuleSymbol);
+ if (theseDirectImports)
+ for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
+ var direct = theseDirectImports_1[_i];
+ if (!markSeenDirectImport(direct)) {
+ continue;
+ }
+ cancellationToken.throwIfCancellationRequested();
+ switch (direct.kind) {
+ case 180 /* CallExpression */:
+ if (!isAvailableThroughGlobal) {
+ var parent = direct.parent;
+ if (exportKind === 2 /* ExportEquals */ && parent.kind === 225 /* VariableDeclaration */) {
+ var name = parent.name;
+ if (name.kind === 70 /* Identifier */) {
+ directImports.push(name);
+ break;
+ }
+ }
+ // Don't support re-exporting 'require()' calls, so just add a single indirect user.
+ addIndirectUser(direct.getSourceFile());
+ }
+ break;
+ case 236 /* ImportEqualsDeclaration */:
+ handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1 /* Export */));
+ break;
+ case 237 /* ImportDeclaration */:
+ var namedBindings = direct.importClause && direct.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
+ handleNamespaceImport(direct, namedBindings.name);
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ case 243 /* ExportDeclaration */:
+ if (!direct.exportClause) {
+ // This is `export * from "foo"`, so imports of this module may import the export too.
+ handleDirectImports(getContainingModuleSymbol(direct, checker));
+ }
+ else {
+ // This is `export { foo } from "foo"` and creates an alias symbol, so recursive search will get handle re-exports.
+ directImports.push(direct);
+ }
+ break;
+ }
+ }
+ }
+ function handleNamespaceImport(importDeclaration, name, isReExport) {
+ if (exportKind === 2 /* ExportEquals */) {
+ // This is a direct import, not import-as-namespace.
+ directImports.push(importDeclaration);
+ }
+ else if (!isAvailableThroughGlobal) {
+ var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration);
+ ts.Debug.assert(sourceFileLike.kind === 264 /* SourceFile */ || sourceFileLike.kind === 232 /* ModuleDeclaration */);
+ if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {
+ addIndirectUsers(sourceFileLike);
+ }
+ else {
+ addIndirectUser(sourceFileLike);
+ }
+ }
+ }
+ function addIndirectUser(sourceFileLike) {
+ ts.Debug.assert(!isAvailableThroughGlobal);
+ var isNew = markSeenIndirectUser(sourceFileLike);
+ if (isNew) {
+ indirectUserDeclarations.push(sourceFileLike);
+ }
+ return isNew;
+ }
+ /** Adds a module and all of its transitive dependencies as possible indirect users. */
+ function addIndirectUsers(sourceFileLike) {
+ if (!addIndirectUser(sourceFileLike)) {
+ return;
+ }
+ var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
+ var directImports = getDirectImports(moduleSymbol);
+ if (directImports)
+ for (var _i = 0, directImports_1 = directImports; _i < directImports_1.length; _i++) {
+ var directImport = directImports_1[_i];
+ addIndirectUsers(getSourceFileLikeForImportDeclaration(directImport));
+ }
+ }
+ function getDirectImports(moduleSymbol) {
+ return allDirectImports.get(ts.getSymbolId(moduleSymbol).toString());
+ }
+ }
+ /**
+ * Given the set of direct imports of a module, we need to find which ones import the particular exported symbol.
+ * The returned `importSearches` will result in the entire source file being searched.
+ * But re-exports will be placed in 'singleReferences' since they cannot be locally referenced.
+ */
+ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) {
+ var exportName = exportSymbol.name;
+ var importSearches = [];
+ var singleReferences = [];
+ function addSearch(location, symbol) {
+ importSearches.push([location, symbol]);
+ }
+ if (directImports)
+ for (var _i = 0, directImports_2 = directImports; _i < directImports_2.length; _i++) {
+ var decl = directImports_2[_i];
+ handleImport(decl);
+ }
+ return { importSearches: importSearches, singleReferences: singleReferences };
+ function handleImport(decl) {
+ if (decl.kind === 236 /* ImportEqualsDeclaration */) {
+ if (isExternalModuleImportEquals(decl)) {
+ handleNamespaceImportLike(decl.name);
+ }
+ return;
+ }
+ if (decl.kind === 70 /* Identifier */) {
+ handleNamespaceImportLike(decl);
+ return;
+ }
+ // Ignore if there's a grammar error
+ if (decl.moduleSpecifier.kind !== 9 /* StringLiteral */) {
+ return;
+ }
+ if (decl.kind === 243 /* ExportDeclaration */) {
+ searchForNamedImport(decl.exportClause);
+ return;
+ }
+ var importClause = decl.importClause;
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
+ handleNamespaceImportLike(namedBindings.name);
+ return;
+ }
+ if (exportKind === 0 /* Named */) {
+ searchForNamedImport(namedBindings);
+ }
+ else {
+ // `export =` might be imported by a default import if `--allowSyntheticDefaultImports` is on, so this handles both ExportKind.Default and ExportKind.ExportEquals
+ var name = importClause.name;
+ // If a default import has the same name as the default export, allow to rename it.
+ // Given `import f` and `export default function f`, we will rename both, but for `import g` we will rename just that.
+ if (name && (!isForRename || name.text === symbolName(exportSymbol))) {
+ var defaultImportAlias = checker.getSymbolAtLocation(name);
+ addSearch(name, defaultImportAlias);
+ }
+ // 'default' might be accessed as a named import `{ default as foo }`.
+ if (!isForRename && exportKind === 1 /* Default */) {
+ ts.Debug.assert(exportName === "default");
+ searchForNamedImport(namedBindings);
+ }
+ }
+ }
+ /**
+ * `import x = require("./x") or `import * as x from "./x"`.
+ * An `export =` may be imported by this syntax, so it may be a direct import.
+ * If it's not a direct import, it will be in `indirectUsers`, so we don't have to do anything here.
+ */
+ function handleNamespaceImportLike(importName) {
+ // Don't rename an import that already has a different name than the export.
+ if (exportKind === 2 /* ExportEquals */ && (!isForRename || importName.text === exportName)) {
+ addSearch(importName, checker.getSymbolAtLocation(importName));
+ }
+ }
+ function searchForNamedImport(namedBindings) {
+ if (namedBindings)
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ var name = element.name, propertyName = element.propertyName;
+ if ((propertyName || name).text !== exportName) {
+ continue;
+ }
+ if (propertyName) {
+ // This is `import { foo as bar } from "./a"` or `export { foo as bar } from "./a"`. `foo` isn't a local in the file, so just add it as a single reference.
+ singleReferences.push(propertyName);
+ if (!isForRename) {
+ // Search locally for `bar`.
+ addSearch(name, checker.getSymbolAtLocation(name));
+ }
+ }
+ else {
+ var localSymbol = element.kind === 245 /* ExportSpecifier */ && element.propertyName
+ ? checker.getExportSpecifierLocalTargetSymbol(element) // For re-exporting under a different name, we want to get the re-exported symbol.
+ : checker.getSymbolAtLocation(name);
+ addSearch(name, localSymbol);
+ }
}
- // Fallthrough
- case 70 /* Identifier */:
- case 98 /* ThisKeyword */:
- // case SyntaxKind.SuperKeyword: TODO:GH#9268
- case 122 /* ConstructorKeyword */:
- case 9 /* StringLiteral */:
- return getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, /*implementations*/ false);
}
- return undefined;
+ }
+ /** Returns 'true' is the namespace 'name' is re-exported from this module, and 'false' if it is only used locally. */
+ function findNamespaceReExports(sourceFileLike, name, checker) {
+ var namespaceImportSymbol = checker.getSymbolAtLocation(name);
+ return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) {
+ if (statement.kind !== 243 /* ExportDeclaration */)
+ return;
+ var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier;
+ if (moduleSpecifier || !exportClause)
+ return;
+ for (var _i = 0, _b = exportClause.elements; _i < _b.length; _i++) {
+ var element = _b[_i];
+ if (checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol) {
+ return true;
+ }
+ }
+ });
+ }
+ /** Returns a map from a module symbol Id to all import statements that directly reference the module. */
+ function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
+ var map = ts.createMap();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var sourceFile = sourceFiles_4[_i];
+ cancellationToken.throwIfCancellationRequested();
+ forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol) {
+ var id = ts.getSymbolId(moduleSymbol).toString();
+ var imports = map.get(id);
+ if (!imports) {
+ map.set(id, imports = []);
+ }
+ imports.push(importDecl);
+ }
+ });
+ }
+ return map;
+ }
+ /** Iterates over all statements at the top level or in module declarations. Returns the first truthy result. */
+ function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
+ return ts.forEach(sourceFileLike.kind === 264 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) {
+ return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action));
+ });
+ }
+ /** Calls `action` for each import, re-export, or require() in a file. */
+ function forEachImport(sourceFile, action) {
+ if (sourceFile.externalModuleIndicator) {
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var moduleSpecifier = _a[_i];
+ action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
+ }
+ }
+ else {
+ forEachPossibleImportOrExportStatement(sourceFile, function (statement) {
+ switch (statement.kind) {
+ case 243 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */: {
+ var decl = statement;
+ if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9 /* StringLiteral */) {
+ action(decl, decl.moduleSpecifier);
+ }
+ break;
+ }
+ case 236 /* ImportEqualsDeclaration */: {
+ var decl = statement;
+ var moduleReference = decl.moduleReference;
+ if (moduleReference.kind === 247 /* ExternalModuleReference */ &&
+ moduleReference.expression.kind === 9 /* StringLiteral */) {
+ action(decl, moduleReference.expression);
+ }
+ break;
+ }
+ }
+ });
+ if (sourceFile.flags & 65536 /* JavaScriptFile */) {
+ // Find all 'require()' calls.
+ sourceFile.forEachChild(function recur(node) {
+ if (ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
+ action(node, node.arguments[0]);
+ }
+ else {
+ node.forEachChild(recur);
+ }
+ });
+ }
+ }
+ }
+ function importerFromModuleSpecifier(moduleSpecifier) {
+ var decl = moduleSpecifier.parent;
+ if (decl.kind === 237 /* ImportDeclaration */ || decl.kind === 243 /* ExportDeclaration */) {
+ return decl;
+ }
+ ts.Debug.assert(decl.kind === 247 /* ExternalModuleReference */);
+ return decl.parent;
+ }
+ /**
+ * Given a local reference, we might notice that it's an import/export and recursively search for references of that.
+ * If at an import, look locally for the symbol it imports.
+ * If an an export, look for all imports of it.
+ * This doesn't handle export specifiers; that is done in `getReferencesAtExportSpecifier`.
+ * @param comingFromExport If we are doing a search for all exports, don't bother looking backwards for the imported symbol, since that's the reason we're here.
+ */
+ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
+ return comingFromExport ? getExport() : getExport() || getImport();
+ function getExport() {
+ var parent = node.parent;
+ if (symbol.flags & 7340032 /* Export */) {
+ if (parent.kind === 178 /* PropertyAccessExpression */) {
+ // When accessing an export of a JS module, there's no alias. The symbol will still be flagged as an export even though we're at the use.
+ // So check that we are at the declaration.
+ return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 /* BinaryExpression */
+ ? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false)
+ : undefined;
+ }
+ else {
+ var exportSymbol = symbol.exportSymbol;
+ ts.Debug.assert(!!exportSymbol);
+ return exportInfo(exportSymbol, getExportKindForDeclaration(parent));
+ }
+ }
+ else {
+ var exportNode = parent.kind === 225 /* VariableDeclaration */ ? ts.getAncestor(parent, 207 /* VariableStatement */) : parent;
+ if (ts.hasModifier(exportNode, 1 /* Export */)) {
+ if (exportNode.kind === 236 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) {
+ // We're at `Y` in `export import X = Y`. This is not the exported symbol, the left-hand-side is. So treat this as an import statement.
+ if (comingFromExport) {
+ return undefined;
+ }
+ var lhsSymbol = checker.getSymbolAtLocation(exportNode.name);
+ return { kind: 0 /* Import */, symbol: lhsSymbol, isNamedImport: false };
+ }
+ else {
+ return exportInfo(symbol, getExportKindForDeclaration(exportNode));
+ }
+ }
+ else if (parent.kind === 242 /* ExportAssignment */) {
+ // Get the symbol for the `export =` node; its parent is the module it's the export of.
+ var exportingModuleSymbol = parent.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } };
+ }
+ else if (parent.kind === 193 /* BinaryExpression */) {
+ return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true);
+ }
+ else if (parent.parent.kind === 193 /* BinaryExpression */) {
+ return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true);
+ }
+ }
+ function getSpecialPropertyExport(node, useLhsSymbol) {
+ var kind;
+ switch (ts.getSpecialPropertyAssignmentKind(node)) {
+ case 1 /* ExportsProperty */:
+ kind = 0 /* Named */;
+ break;
+ case 2 /* ModuleExports */:
+ kind = 2 /* ExportEquals */;
+ break;
+ default:
+ return undefined;
+ }
+ var sym = useLhsSymbol ? checker.getSymbolAtLocation(node.left.name) : symbol;
+ return sym && exportInfo(sym, kind);
+ }
+ }
+ function getImport() {
+ var isImport = isNodeImport(node);
+ if (!isImport)
+ return;
+ // A symbol being imported is always an alias. So get what that aliases to find the local symbol.
+ var importedSymbol = checker.getImmediateAliasedSymbol(symbol);
+ if (importedSymbol) {
+ // Search on the local symbol in the exporting module, not the exported symbol.
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ // Similarly, skip past the symbol for 'export ='
+ if (importedSymbol.name === "export=") {
+ importedSymbol = checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0 /* Import */, symbol: importedSymbol }, isImport);
+ }
+ }
+ }
+ function exportInfo(symbol, kind) {
+ var exportInfo = getExportInfo(symbol, kind, checker);
+ return exportInfo && { kind: 1 /* Export */, symbol: symbol, exportInfo: exportInfo };
+ }
+ // Not meant for use with export specifiers or export assignment.
+ function getExportKindForDeclaration(node) {
+ return ts.hasModifier(node, 512 /* Default */) ? 1 /* Default */ : 0 /* Named */;
+ }
+ }
+ FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function isNodeImport(node) {
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 236 /* ImportEqualsDeclaration */:
+ return parent.name === node && isExternalModuleImportEquals(parent)
+ ? { isNamedImport: false }
+ : undefined;
+ case 241 /* ImportSpecifier */:
+ // For a rename import `{ foo as bar }`, don't search for the imported symbol. Just find local uses of `bar`.
+ return parent.propertyName ? undefined : { isNamedImport: true };
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ ts.Debug.assert(parent.name === node);
+ return { isNamedImport: false };
+ default:
+ return undefined;
+ }
+ }
+ function getExportInfo(exportSymbol, exportKind, checker) {
+ var exportingModuleSymbol = checker.getMergedSymbol(exportSymbol.parent); // Need to get merged symbol in case there's an augmentation.
+ // `export` may appear in a namespace. In that case, just rely on global search.
+ return ts.isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } : undefined;
+ }
+ FindAllReferences.getExportInfo = getExportInfo;
+ function symbolName(symbol) {
+ if (symbol.name !== "default") {
+ return symbol.name;
+ }
+ var name = ts.forEach(symbol.declarations, function (_a) {
+ var name = _a.name;
+ return name && name.kind === 70 /* Identifier */ && name.text;
+ });
+ ts.Debug.assert(!!name);
+ return name;
+ }
+ /** If at an export specifier, go to the symbol it refers to. */
+ function skipExportSpecifierSymbol(symbol, checker) {
+ // For `export { foo } from './bar", there's nothing to skip, because it does not create a new alias. But `export { foo } does.
+ if (symbol.declarations)
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) {
+ return checker.getExportSpecifierLocalTargetSymbol(declaration);
+ }
+ }
+ return symbol;
+ }
+ function getContainingModuleSymbol(importer, checker) {
+ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
+ }
+ function getSourceFileLikeForImportDeclaration(node) {
+ if (node.kind === 180 /* CallExpression */) {
+ return node.getSourceFile();
+ }
+ var parent = node.parent;
+ if (parent.kind === 264 /* SourceFile */) {
+ return parent;
+ }
+ ts.Debug.assert(parent.kind === 233 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent));
+ return parent.parent;
+ }
+ function isAmbientModuleDeclaration(node) {
+ return node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */;
+ }
+ function isExternalModuleImportEquals(_a) {
+ var moduleReference = _a.moduleReference;
+ return moduleReference.kind === 247 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+/// <reference path="./importTracker.ts" />
+/* @internal */
+var ts;
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ function nodeEntry(node, isInString) {
+ return { type: "node", node: node, isInString: isInString };
+ }
+ FindAllReferences.nodeEntry = nodeEntry;
+ function findReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position);
+ if (!referencedSymbols || !referencedSymbols.length) {
+ return undefined;
+ }
+ var out = [];
+ for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
+ var _a = referencedSymbols_1[_i], definition = _a.definition, references = _a.references;
+ // Only include referenced symbols that have a valid definition.
+ if (definition) {
+ out.push({ definition: definitionToReferencedSymbolDefinitionInfo(definition, checker), references: references.map(toReferenceEntry) });
+ }
+ }
+ return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, implementations) {
- if (!implementations) {
+ function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
+ }
+ FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
+ function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ // If invoked directly on a shorthand property assignment, then return
+ // the declaration of the symbol being assigned (not the symbol being assigned to).
+ if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) {
+ var result_4 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
+ return result_4;
+ }
+ else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) {
+ // References to and accesses on the super keyword only have one possible implementation, so no
+ // need to "Find all References"
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
+ }
+ else {
+ // Perform "Find all References" and retrieve only those that are implementations
+ return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ }
+ }
+ function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ return ts.map(x, toReferenceEntry);
+ }
+ FindAllReferences.findReferencedEntries = findReferencedEntries;
+ function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ }
+ FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
+ function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ }
+ function flattenEntries(referenceSymbols) {
+ return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
+ }
+ function definitionToReferencedSymbolDefinitionInfo(def, checker) {
+ var info = (function () {
+ switch (def.type) {
+ case "symbol": {
+ var symbol = def.symbol, node_2 = def.node;
+ var declarations = symbol.declarations;
+ if (!declarations || declarations.length === 0) {
+ return undefined;
+ }
+ var _a = getDefinitionKindAndDisplayParts(symbol, node_2, checker), displayParts_1 = _a.displayParts, kind_1 = _a.kind;
+ var name_3 = displayParts_1.map(function (p) { return p.text; }).join("");
+ return { node: node_2, name: name_3, kind: kind_1, displayParts: displayParts_1 };
+ }
+ case "label": {
+ var node_3 = def.node;
+ return { node: node_3, name: node_3.text, kind: ts.ScriptElementKind.label, displayParts: [ts.displayPart(node_3.text, ts.SymbolDisplayPartKind.text)] };
+ }
+ case "keyword": {
+ var node_4 = def.node;
+ var name_4 = ts.tokenToString(node_4.kind);
+ return { node: node_4, name: name_4, kind: ts.ScriptElementKind.keyword, displayParts: [{ text: name_4, kind: ts.ScriptElementKind.keyword }] };
+ }
+ case "this": {
+ var node_5 = def.node;
+ var symbol = checker.getSymbolAtLocation(node_5);
+ var displayParts_2 = symbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node_5.getSourceFile(), ts.getContainerNode(node_5), node_5).displayParts;
+ return { node: node_5, name: "this", kind: ts.ScriptElementKind.variableElement, displayParts: displayParts_2 };
+ }
+ case "string": {
+ var node_6 = def.node;
+ return { node: node_6, name: node_6.text, kind: ts.ScriptElementKind.variableElement, displayParts: [ts.displayPart(ts.getTextOfNode(node_6), ts.SymbolDisplayPartKind.stringLiteral)] };
+ }
+ }
+ })();
+ if (!info) {
+ return undefined;
+ }
+ var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts;
+ var sourceFile = node.getSourceFile();
+ return {
+ containerKind: "",
+ containerName: "",
+ fileName: sourceFile.fileName,
+ kind: kind,
+ name: name,
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
+ displayParts: displayParts
+ };
+ }
+ function getDefinitionKindAndDisplayParts(symbol, node, checker) {
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node.getSourceFile(), ts.getContainerNode(node), node), displayParts = _a.displayParts, symbolKind = _a.symbolKind;
+ return { displayParts: displayParts, kind: symbolKind };
+ }
+ function toReferenceEntry(entry) {
+ if (entry.type === "span") {
+ return { textSpan: entry.textSpan, fileName: entry.fileName, isWriteAccess: false, isDefinition: false };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ return {
+ fileName: node.getSourceFile().fileName,
+ textSpan: getTextSpan(node),
+ isWriteAccess: isWriteAccess(node),
+ isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isInString: isInString
+ };
+ }
+ function toImplementationLocation(entry, checker) {
+ if (entry.type === "node") {
+ var node = entry.node;
+ return __assign({ textSpan: getTextSpan(node), fileName: node.getSourceFile().fileName }, implementationKindDisplayParts(node, checker));
+ }
+ else {
+ var textSpan = entry.textSpan, fileName = entry.fileName;
+ return { textSpan: textSpan, fileName: fileName, kind: ts.ScriptElementKind.unknown, displayParts: [] };
+ }
+ }
+ function implementationKindDisplayParts(node, checker) {
+ var symbol = checker.getSymbolAtLocation(ts.isDeclaration(node) && node.name ? node.name : node);
+ if (symbol) {
+ return getDefinitionKindAndDisplayParts(symbol, node, checker);
+ }
+ else if (node.kind === 177 /* ObjectLiteralExpression */) {
+ return {
+ kind: ts.ScriptElementKind.interfaceElement,
+ displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(19 /* CloseParenToken */)]
+ };
+ }
+ else if (node.kind === 198 /* ClassExpression */) {
+ return {
+ kind: ts.ScriptElementKind.localClassElement,
+ displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(19 /* CloseParenToken */)]
+ };
+ }
+ else {
+ return { kind: ts.getNodeKind(node), displayParts: [] };
+ }
+ }
+ function toHighlightSpan(entry) {
+ if (entry.type === "span") {
+ var fileName_1 = entry.fileName, textSpan = entry.textSpan;
+ return { fileName: fileName_1, span: { textSpan: textSpan, kind: ts.HighlightSpanKind.reference } };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ var fileName = entry.node.getSourceFile().fileName;
+ var writeAccess = isWriteAccess(node);
+ var span = {
+ textSpan: getTextSpan(node),
+ kind: writeAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference,
+ isInString: isInString
+ };
+ return { fileName: fileName, span: span };
+ }
+ FindAllReferences.toHighlightSpan = toHighlightSpan;
+ function getTextSpan(node) {
+ var start = node.getStart();
+ var end = node.getEnd();
+ if (node.kind === 9 /* StringLiteral */) {
+ start += 1;
+ end -= 1;
+ }
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
+ function isWriteAccess(node) {
+ if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) {
+ return true;
+ }
+ var parent = node.parent;
+ if (parent) {
+ if (parent.kind === 192 /* PostfixUnaryExpression */ || parent.kind === 191 /* PrefixUnaryExpression */) {
+ return true;
+ }
+ else if (parent.kind === 193 /* BinaryExpression */ && parent.left === node) {
+ var operator = parent.operatorToken.kind;
+ return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */;
+ }
+ }
+ return false;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+/** Encapsulates the core find-all-references algorithm. */
+/* @internal */
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ var Core;
+ (function (Core) {
+ /** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */
+ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ if (node.kind === 264 /* SourceFile */) {
+ return undefined;
+ }
+ if (!options.implementations) {
+ var special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken);
+ if (special) {
+ return special;
+ }
+ }
+ var symbol = checker.getSymbolAtLocation(node);
+ // Could not find a symbol e.g. unknown identifier
+ if (!symbol) {
+ // String literal might be a property (and thus have a symbol), so do this here rather than in getReferencedSymbolsSpecial.
+ if (!options.implementations && node.kind === 9 /* StringLiteral */) {
+ return getReferencesForStringLiteral(node, sourceFiles, cancellationToken);
+ }
+ // Can't have references to something that we have no symbol for.
+ return undefined;
+ }
+ // The symbol was an internal symbol and does not have a declaration e.g. undefined symbol
+ if (!symbol.declarations || !symbol.declarations.length) {
+ return undefined;
+ }
+ return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
+ }
+ Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ /** getReferencedSymbols for special node kinds. */
+ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
+ if (ts.isTypeKeyword(node.kind)) {
+ return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
+ }
// Labels
if (ts.isLabelName(node)) {
if (ts.isJumpStatementTarget(node)) {
var labelDefinition = ts.getTargetLabel(node.parent, node.text);
// if we have a label definition, look within its statement for references, if not, then
// the label is undefined and we have no results..
- return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined;
+ return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition);
}
else {
// it is a label definition and not a target, search within the parent labeledStatement
@@ -69311,129 +75098,164 @@ var ts;
}
}
if (ts.isThis(node)) {
- return getReferencesForThisKeyword(node, sourceFiles);
+ return getReferencesForThisKeyword(node, sourceFiles, cancellationToken);
}
if (node.kind === 96 /* SuperKeyword */) {
return getReferencesForSuperKeyword(node);
}
- }
- // `getSymbolAtLocation` normally returns the symbol of the class when given the constructor keyword,
- // so we have to specify that we want the constructor symbol.
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (!implementations && !symbol && node.kind === 9 /* StringLiteral */) {
- return getReferencesForStringLiteral(node, sourceFiles);
- }
- // Could not find a symbol e.g. unknown identifier
- if (!symbol) {
- // Can't have references to something that we have no symbol for.
return undefined;
}
- var declarations = symbol.declarations;
- // The symbol was an internal symbol and does not have a declaration e.g. undefined symbol
- if (!declarations || !declarations.length) {
- return undefined;
- }
- var result;
- // Compute the meaning from the location and the symbol it references
- var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), declarations);
- // Get the text to search for.
- // Note: if this is an external module symbol, the name doesn't include quotes.
- var declaredName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- // Try to get the smallest valid scope that we can limit our search to;
- // otherwise we'll need to search globally (i.e. include each file).
- var scope = getSymbolScope(symbol);
- // Maps from a symbol ID to the ReferencedSymbol entry in 'result'.
- var symbolToIndex = [];
- if (scope) {
- result = [];
- getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
- }
- else {
- var internedName = getInternedName(symbol, node);
- for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
- var sourceFile = sourceFiles_8[_i];
- cancellationToken.throwIfCancellationRequested();
- var nameTable = ts.getNameTable(sourceFile);
- if (nameTable[internedName] !== undefined) {
- result = result || [];
- getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
+ /** Core find-all-references algorithm for a normal symbol. */
+ function getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options) {
+ symbol = skipPastExportOrImportSpecifier(symbol, node, checker);
+ // Compute the meaning from the location and the symbol it references
+ var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), symbol.declarations);
+ var result = [];
+ var state = createState(sourceFiles, node, checker, cancellationToken, searchMeaning, options, result);
+ var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: populateSearchSymbolSet(symbol, node, checker, options.implementations) });
+ // Try to get the smallest valid scope that we can limit our search to;
+ // otherwise we'll need to search globally (i.e. include each file).
+ var scope = getSymbolScope(symbol);
+ if (scope) {
+ getReferencesInContainer(scope, scope.getSourceFile(), search, state);
+ }
+ else {
+ // Global search
+ for (var _i = 0, _a = state.sourceFiles; _i < _a.length; _i++) {
+ var sourceFile = _a[_i];
+ state.cancellationToken.throwIfCancellationRequested();
+ searchForName(sourceFile, search, state);
}
}
+ return result;
}
- return result;
- function getDefinition(symbol) {
- var info = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, node.getSourceFile(), ts.getContainerNode(node), node);
- var name = ts.map(info.displayParts, function (p) { return p.text; }).join("");
- var declarations = symbol.declarations;
- if (!declarations || declarations.length === 0) {
- return undefined;
+ /** Handle a few special cases relating to export/import specifiers. */
+ function skipPastExportOrImportSpecifier(symbol, node, checker) {
+ var parent = node.parent;
+ if (ts.isExportSpecifier(parent)) {
+ return getLocalSymbolForExportSpecifier(node, symbol, parent, checker);
}
- return {
- containerKind: "",
- containerName: "",
- name: name,
- kind: info.symbolKind,
- fileName: declarations[0].getSourceFile().fileName,
- textSpan: ts.createTextSpan(declarations[0].getStart(), 0),
- displayParts: info.displayParts
- };
+ if (ts.isImportSpecifier(parent) && parent.propertyName === node) {
+ // We're at `foo` in `import { foo as bar }`. Probably intended to find all refs on the original, not just on the import.
+ return checker.getImmediateAliasedSymbol(symbol);
+ }
+ return symbol;
}
- function getAliasSymbolForPropertyNameSymbol(symbol, location) {
- if (symbol.flags & 8388608 /* Alias */) {
- // Default import get alias
- var defaultImport = ts.getDeclarationOfKind(symbol, 236 /* ImportClause */);
- if (defaultImport) {
- return typeChecker.getAliasedSymbol(symbol);
- }
- var importOrExportSpecifier = ts.forEach(symbol.declarations, function (declaration) { return (declaration.kind === 239 /* ImportSpecifier */ ||
- declaration.kind === 243 /* ExportSpecifier */) ? declaration : undefined; });
- if (importOrExportSpecifier &&
- // export { a }
- (!importOrExportSpecifier.propertyName ||
- // export {a as class } where a is location
- importOrExportSpecifier.propertyName === location)) {
- // If Import specifier -> get alias
- // else Export specifier -> get local target
- return importOrExportSpecifier.kind === 239 /* ImportSpecifier */ ?
- typeChecker.getAliasedSymbol(symbol) :
- typeChecker.getExportSpecifierLocalTargetSymbol(importOrExportSpecifier);
+ function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
+ var symbolIdToReferences = [];
+ var inheritsFromCache = ts.createMap();
+ // Source file ID → symbol ID → Whether the symbol has been searched for in the source file.
+ var sourceFileToSeenSymbols = [];
+ var isForConstructor = originalLocation.kind === 122 /* ConstructorKeyword */;
+ var importTracker;
+ return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference,
+ markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() });
+ function getImportSearches(exportSymbol, exportInfo) {
+ if (!importTracker)
+ importTracker = FindAllReferences.createImportTracker(sourceFiles, checker, cancellationToken);
+ return importTracker(exportSymbol, exportInfo, options.isForRename);
+ }
+ function createSearch(location, symbol, comingFrom, searchOptions) {
+ if (searchOptions === void 0) { searchOptions = {}; }
+ // Note: if this is an external module symbol, the name doesn't include quotes.
+ var _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(checker, symbol, location)) : _a, _b = searchOptions.allSearchSymbols, allSearchSymbols = _b === void 0 ? undefined : _b;
+ var escapedText = ts.escapeIdentifier(text);
+ var parents = options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, checker);
+ return { location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents, includes: includes };
+ function includes(referenceSymbol) {
+ return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol;
+ }
+ }
+ function referenceAdder(referenceSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(referenceSymbol);
+ var references = symbolIdToReferences[symbolId];
+ if (!references) {
+ references = symbolIdToReferences[symbolId] = [];
+ result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ }
+ return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
+ }
+ function addStringOrCommentReference(fileName, textSpan) {
+ result.push({
+ definition: undefined,
+ references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
+ });
+ }
+ function markSearchedSymbol(sourceFile, symbol) {
+ var sourceId = ts.getNodeId(sourceFile);
+ var symbolId = ts.getSymbolId(symbol);
+ var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
+ }
+ }
+ /** Search for all imports of a given exported symbol using `State.getImportSearches`. */
+ function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
+ var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
+ // For `import { foo as bar }` just add the reference to `foo`, and don't otherwise search in the file.
+ if (singleReferences.length) {
+ var addRef = state.referenceAdder(exportSymbol, exportLocation);
+ for (var _i = 0, singleReferences_1 = singleReferences; _i < singleReferences_1.length; _i++) {
+ var singleRef = singleReferences_1[_i];
+ addRef(singleRef);
+ }
+ }
+ // For each import, find all references to that import in its source file.
+ for (var _b = 0, importSearches_1 = importSearches; _b < importSearches_1.length; _b++) {
+ var _c = importSearches_1[_b], importLocation = _c[0], importSymbol = _c[1];
+ getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1 /* Export */), state);
+ }
+ if (indirectUsers.length) {
+ var indirectSearch = void 0;
+ switch (exportInfo.exportKind) {
+ case 0 /* Named */:
+ indirectSearch = state.createSearch(exportLocation, exportSymbol, 1 /* Export */);
+ break;
+ case 1 /* Default */:
+ // Search for a property access to '.default'. This can't be renamed.
+ indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" });
+ break;
+ case 2 /* ExportEquals */:
+ break;
+ }
+ if (indirectSearch) {
+ for (var _d = 0, indirectUsers_1 = indirectUsers; _d < indirectUsers_1.length; _d++) {
+ var indirectUser = indirectUsers_1[_d];
+ searchForName(indirectUser, indirectSearch, state);
+ }
}
}
- return undefined;
}
- function followAliasIfNecessary(symbol, location) {
- return getAliasSymbolForPropertyNameSymbol(symbol, location) || symbol;
+ // Go to the symbol we imported from and find references for it.
+ function searchForImportedSymbol(symbol, state) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ getReferencesInSourceFile(declaration.getSourceFile(), state.createSearch(declaration, symbol, 0 /* Import */), state);
+ }
+ }
+ /** Search for all occurences of an identifier in a source file (and filter out the ones that match). */
+ function searchForName(sourceFile, search, state) {
+ if (ts.getNameTable(sourceFile).get(search.escapedText) !== undefined) {
+ getReferencesInSourceFile(sourceFile, search, state);
+ }
}
- function getPropertySymbolOfDestructuringAssignment(location) {
+ function getPropertySymbolOfDestructuringAssignment(location, checker) {
return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) &&
- typeChecker.getPropertySymbolOfDestructuringAssignment(location);
+ checker.getPropertySymbolOfDestructuringAssignment(location);
}
function isObjectBindingPatternElementWithoutPropertyName(symbol) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174 /* BindingElement */);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */);
return bindingElement &&
- bindingElement.parent.kind === 172 /* ObjectBindingPattern */ &&
+ bindingElement.parent.kind === 173 /* ObjectBindingPattern */ &&
!bindingElement.propertyName;
}
- function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol) {
+ function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) {
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174 /* BindingElement */);
- var typeOfPattern = typeChecker.getTypeAtLocation(bindingElement.parent);
- return typeOfPattern && typeChecker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */);
+ var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent);
+ return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
}
return undefined;
}
- function getInternedName(symbol, location) {
- // If this is an export or import specifier it could have been renamed using the 'as' syntax.
- // If so we want to search for whatever under the cursor.
- if (ts.isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- // Try to get the local symbol if we're dealing with an 'export default'
- // since that symbol has the "true" name.
- var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- symbol = localExportDefaultSymbol || symbol;
- return ts.stripQuotes(symbol.name);
- }
/**
* Determines the smallest scope in which a symbol may have named references.
* Note that not every construct has been accounted for. This function can
@@ -69445,55 +75267,57 @@ var ts;
function getSymbolScope(symbol) {
// If this is the symbol of a named function expression or named class expression,
// then named references are limited to its own scope.
- var valueDeclaration = symbol.valueDeclaration;
- if (valueDeclaration && (valueDeclaration.kind === 184 /* FunctionExpression */ || valueDeclaration.kind === 197 /* ClassExpression */)) {
+ var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration;
+ if (valueDeclaration && (valueDeclaration.kind === 185 /* FunctionExpression */ || valueDeclaration.kind === 198 /* ClassExpression */)) {
return valueDeclaration;
}
+ if (!declarations) {
+ return undefined;
+ }
// If this is private property or method, the scope is the containing class
- if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) {
- var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (ts.getModifierFlags(d) & 8 /* Private */) ? d : undefined; });
+ if (flags & (4 /* Property */ | 8192 /* Method */)) {
+ var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); });
if (privateDeclaration) {
- return ts.getAncestor(privateDeclaration, 226 /* ClassDeclaration */);
+ return ts.getAncestor(privateDeclaration, 228 /* ClassDeclaration */);
}
}
- // If the symbol is an import we would like to find it if we are looking for what it imports.
- // So consider it visible outside its declaration scope.
- if (symbol.flags & 8388608 /* Alias */) {
- return undefined;
- }
// If symbol is of object binding pattern element without property name we would want to
// look for property too and that could be anywhere
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
}
- // if this symbol is visible from its parent container, e.g. exported, then bail out
- // if symbol correspond to the union property - bail out
- if (symbol.parent || (symbol.flags & 268435456 /* SyntheticProperty */)) {
+ // If the symbol has a parent, it's globally visible.
+ // Unless that parent is an external module, then we should only search in the module (and recurse on the export later).
+ // But if the parent is a module that has `export as namespace`, then the symbol *is* globally visible.
+ if (parent && !((parent.flags & 1536 /* Module */) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
+ return undefined;
+ }
+ // If this is a synthetic property, it's a property and must be searched for globally.
+ if ((flags & 134217728 /* Transient */ && symbol.checkFlags & 6 /* Synthetic */)) {
return undefined;
}
var scope;
- var declarations = symbol.getDeclarations();
- if (declarations) {
- for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
- var declaration = declarations_7[_i];
- var container = ts.getContainerNode(declaration);
- if (!container) {
- return undefined;
- }
- if (scope && scope !== container) {
- // Different declarations have different containers, bail out
- return undefined;
- }
- if (container.kind === 261 /* SourceFile */ && !ts.isExternalModule(container)) {
- // This is a global variable and not an external module, any declaration defined
- // within this scope is visible outside the file
- return undefined;
- }
- // The search scope is the container node
- scope = container;
+ for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
+ var declaration = declarations_10[_i];
+ var container = ts.getContainerNode(declaration);
+ if (scope && scope !== container) {
+ // Different declarations have different containers, bail out
+ return undefined;
+ }
+ if (!container || container.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) {
+ // This is a global variable and not an external module, any declaration defined
+ // within this scope is visible outside the file
+ return undefined;
}
+ // The search scope is the container node
+ scope = container;
}
- return scope;
+ // If symbol.parent, this means we are in an export of an external module. (Otherwise we would have returned `undefined` above.)
+ // For an export of a module, we may be in a declaration file, and it may be accessed elsewhere. E.g.:
+ // declare module "a" { export type T = number; }
+ // declare module "b" { import { T } from "a"; export const x: T; }
+ // So we must search the whole source file. (Because we will mark the source file as seen, we we won't return to it when searching for imports.)
+ return parent ? scope.getSourceFile() : scope;
}
function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
var positions = [];
@@ -69508,7 +75332,6 @@ var ts;
var symbolNameLength = symbolName.length;
var position = text.indexOf(symbolName, start);
while (position >= 0) {
- cancellationToken.throwIfCancellationRequested();
// If we are past the end, stop looking
if (position > end)
break;
@@ -69529,279 +75352,320 @@ var ts;
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
+ var position = possiblePositions_1[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.getWidth() !== labelName.length) {
- return;
+ continue;
}
// Only pick labels that are either the target label, or have a target that is the target label
if (node === targetLabel ||
(ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = {
- containerKind: "",
- containerName: "",
- fileName: targetLabel.getSourceFile().fileName,
- kind: ts.ScriptElementKind.label,
- name: labelName,
- textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()),
- displayParts: [ts.displayPart(labelName, ts.SymbolDisplayPartKind.text)]
- };
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "label", node: targetLabel }, references: references }];
}
function isValidReferencePosition(node, searchSymbolName) {
- if (node) {
- // Compare the length so we filter out strict superstrings of the symbol we are looking for
- switch (node.kind) {
- case 70 /* Identifier */:
- return node.getWidth() === searchSymbolName.length;
- case 9 /* StringLiteral */:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- isNameOfExternalModuleImportOrDeclaration(node)) {
- // For string literals we have two additional chars for the quotes
- return node.getWidth() === searchSymbolName.length + 2;
- }
- break;
- case 8 /* NumericLiteral */:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- return node.getWidth() === searchSymbolName.length;
- }
- break;
+ // Compare the length so we filter out strict superstrings of the symbol we are looking for
+ switch (node && node.kind) {
+ case 70 /* Identifier */:
+ return node.getWidth() === searchSymbolName.length;
+ case 9 /* StringLiteral */:
+ return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
+ // For string literals we have two additional chars for the quotes
+ node.getWidth() === searchSymbolName.length + 2;
+ case 8 /* NumericLiteral */:
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ default:
+ return false;
+ }
+ }
+ function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken) {
+ var references = [];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
+ cancellationToken.throwIfCancellationRequested();
+ addReferencesForKeywordInFile(sourceFile, keywordKind, ts.tokenToString(keywordKind), references);
+ }
+ return references.length ? [{ definition: { type: "keyword", node: references[0].node }, references: references }] : undefined;
+ }
+ function addReferencesForKeywordInFile(sourceFile, kind, searchText, references) {
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile.getStart(), sourceFile.getEnd());
+ for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
+ var position = possiblePositions_2[_i];
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (referenceLocation.kind === kind) {
+ references.push(FindAllReferences.nodeEntry(referenceLocation));
}
}
- return false;
}
- /** Search within node "container" for references for a search value, where the search value is defined as a
- * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning).
- * searchLocation: a node where the search value
- */
- function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) {
- var sourceFile = container.getSourceFile();
- var start = findInComments ? container.getFullStart() : container.getStart();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, start, container.getEnd());
- var parents = getParentSymbolsOfPropertyAccess();
- var inheritsFromCache = ts.createMap();
- if (possiblePositions.length) {
- // Build the set of symbols to search for, initially it has only the current symbol
- var searchSymbols_1 = populateSearchSymbolSet(searchSymbol, searchLocation);
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
- if (!isValidReferencePosition(referenceLocation, searchText)) {
- // This wasn't the start of a token. Check to see if it might be a
- // match in a comment or string if that's what the caller is asking
- // for.
- if (!implementations && ((findInStrings && ts.isInString(sourceFile, position)) ||
- (findInComments && ts.isInNonReferenceComment(sourceFile, position)))) {
- // In the case where we're looking inside comments/strings, we don't have
- // an actual definition. So just use 'undefined' here. Features like
- // 'Rename' won't care (as they ignore the definitions), and features like
- // 'FindReferences' will just filter out these results.
- result.push({
- definition: undefined,
- references: [{
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpan(position, searchText.length),
- isWriteAccess: false,
- isDefinition: false
- }]
- });
- }
- return;
- }
- if (!(ts.getMeaningFromLocation(referenceLocation) & searchMeaning)) {
- return;
- }
- var referenceSymbol = typeChecker.getSymbolAtLocation(referenceLocation);
- if (referenceSymbol) {
- var referenceSymbolDeclaration = referenceSymbol.valueDeclaration;
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration);
- var relatedSymbol = getRelatedSymbol(searchSymbols_1, referenceSymbol, referenceLocation,
- /*searchLocationIsConstructor*/ searchLocation.kind === 122 /* ConstructorKeyword */, parents, inheritsFromCache);
- if (relatedSymbol) {
- addReferenceToRelatedSymbol(referenceLocation, relatedSymbol);
- }
- else if (!(referenceSymbol.flags & 67108864 /* Transient */) && searchSymbols_1.indexOf(shorthandValueSymbol) >= 0) {
- addReferenceToRelatedSymbol(referenceSymbolDeclaration.name, shorthandValueSymbol);
- }
- else if (searchLocation.kind === 122 /* ConstructorKeyword */) {
- findAdditionalConstructorReferences(referenceSymbol, referenceLocation);
- }
- }
- });
+ function getReferencesInSourceFile(sourceFile, search, state) {
+ state.cancellationToken.throwIfCancellationRequested();
+ return getReferencesInContainer(sourceFile, sourceFile, search, state);
+ }
+ /**
+ * Search within node "container" for references for a search value, where the search value is defined as a
+ * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning).
+ * searchLocation: a node where the search value
+ */
+ function getReferencesInContainer(container, sourceFile, search, state) {
+ if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
+ return;
}
- return;
- /* If we are just looking for implementations and this is a property access expression, we need to get the
- * symbol of the local type of the symbol the property is being accessed on. This is because our search
- * symbol may have a different parent symbol if the local type's symbol does not declare the property
- * being accessed (i.e. it is declared in some parent class or interface)
- */
- function getParentSymbolsOfPropertyAccess() {
- if (implementations) {
- var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(searchLocation);
- if (propertyAccessExpression) {
- var localParentType = typeChecker.getTypeAtLocation(propertyAccessExpression.expression);
- if (localParentType) {
- if (localParentType.symbol && localParentType.symbol.flags & (32 /* Class */ | 64 /* Interface */) && localParentType.symbol !== searchSymbol.parent) {
- return [localParentType.symbol];
- }
- else if (localParentType.flags & 196608 /* UnionOrIntersection */) {
- return getSymbolsForClassAndInterfaceComponents(localParentType);
- }
- }
- }
+ var start = state.findInComments ? container.getFullStart() : container.getStart();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, search.text, start, container.getEnd());
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ getReferencesAtLocation(sourceFile, position, search, state);
+ }
+ }
+ function getReferencesAtLocation(sourceFile, position, search, state) {
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (!isValidReferencePosition(referenceLocation, search.text)) {
+ // This wasn't the start of a token. Check to see if it might be a
+ // match in a comment or string if that's what the caller is asking
+ // for.
+ if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ // In the case where we're looking inside comments/strings, we don't have
+ // an actual definition. So just use 'undefined' here. Features like
+ // 'Rename' won't care (as they ignore the definitions), and features like
+ // 'FindReferences' will just filter out these results.
+ state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
+ return;
}
- function getPropertyAccessExpressionFromRightHandSide(node) {
- return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ if (!(ts.getMeaningFromLocation(referenceLocation) & state.searchMeaning)) {
+ return;
}
- /** Adds references when a constructor is used with `new this()` in its own class and `super()` calls in subclasses. */
- function findAdditionalConstructorReferences(referenceSymbol, referenceLocation) {
- ts.Debug.assert(ts.isClassLike(searchSymbol.valueDeclaration));
- var referenceClass = referenceLocation.parent;
- if (referenceSymbol === searchSymbol && ts.isClassLike(referenceClass)) {
- ts.Debug.assert(referenceClass.name === referenceLocation);
- // This is the class declaration containing the constructor.
- addReferences(findOwnConstructorCalls(searchSymbol));
+ var referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation);
+ if (!referenceSymbol) {
+ return;
+ }
+ var parent = referenceLocation.parent;
+ if (ts.isImportSpecifier(parent) && parent.propertyName === referenceLocation) {
+ // This is added through `singleReferences` in ImportsResult. If we happen to see it again, don't add it again.
+ return;
+ }
+ if (ts.isExportSpecifier(parent)) {
+ ts.Debug.assert(referenceLocation.kind === 70 /* Identifier */);
+ getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state);
+ return;
+ }
+ var relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
+ if (!relatedSymbol) {
+ getReferenceForShorthandProperty(referenceSymbol, search, state);
+ return;
+ }
+ if (state.isForConstructor) {
+ findConstructorReferences(referenceLocation, sourceFile, search, state);
+ }
+ else {
+ addReference(referenceLocation, relatedSymbol, search.location, state);
+ }
+ getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
+ }
+ function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ var exportDeclaration = parent.parent;
+ var localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker);
+ if (!search.includes(localSymbol)) {
+ return;
+ }
+ if (!propertyName) {
+ addRef();
+ }
+ else if (referenceLocation === propertyName) {
+ // For `export { foo as bar } from "baz"`, "`foo`" will be added from the singleReferences for import searches of the original export.
+ // For `export { foo as bar };`, where `foo` is a local, so add it now.
+ if (!exportDeclaration.moduleSpecifier) {
+ addRef();
}
- else {
- // If this class appears in `extends C`, then the extending class' "super" calls are references.
- var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
- if (classExtending && ts.isClassLike(classExtending) && followAliasIfNecessary(referenceSymbol, referenceLocation) === searchSymbol) {
- addReferences(superConstructorAccesses(classExtending));
- }
+ if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ addReference(name, referenceSymbol, name, state);
}
}
- function addReferences(references) {
- if (references.length) {
- var referencedSymbol = getReferencedSymbol(searchSymbol);
- ts.addRange(referencedSymbol.references, ts.map(references, getReferenceEntryFromNode));
+ else {
+ if (state.markSeenReExportRHS(referenceLocation)) {
+ addRef();
}
}
- /** `classSymbol` is the class where the constructor was defined.
- * Reference the constructor and all calls to `new this()`.
+ // For `export { foo as bar }`, rename `foo`, but not `bar`.
+ if (!(referenceLocation === propertyName && state.isForRename)) {
+ var exportKind = referenceLocation.originalKeywordKind === 78 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */;
+ var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
+ ts.Debug.assert(!!exportInfo);
+ searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state);
+ }
+ // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`.
+ if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName) {
+ searchForImportedSymbol(state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier), state);
+ }
+ function addRef() {
+ addReference(referenceLocation, localSymbol, search.location, state);
+ }
+ }
+ function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) {
+ return isExportSpecifierAlias(referenceLocation, exportSpecifier) ? checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) : referenceSymbol;
+ }
+ function isExportSpecifierAlias(referenceLocation, exportSpecifier) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ ts.Debug.assert(propertyName === referenceLocation || name === referenceLocation);
+ if (propertyName) {
+ // Given `export { foo as bar } [from "someModule"]`: It's an alias at `foo`, but at `bar` it's a new symbol.
+ return propertyName === referenceLocation;
+ }
+ else {
+ // `export { foo } from "foo"` is a re-export.
+ // `export { foo };` is not a re-export, it creates an alias for the local variable `foo`.
+ return !parent.parent.moduleSpecifier;
+ }
+ }
+ function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) {
+ var importOrExport = FindAllReferences.getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1 /* Export */);
+ if (!importOrExport)
+ return;
+ var symbol = importOrExport.symbol;
+ if (importOrExport.kind === 0 /* Import */) {
+ if (!state.isForRename || importOrExport.isNamedImport) {
+ searchForImportedSymbol(symbol, state);
+ }
+ }
+ else {
+ // We don't check for `state.isForRename`, even for default exports, because importers that previously matched the export name should be updated to continue matching.
+ searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state);
+ }
+ }
+ function getReferenceForShorthandProperty(_a, search, state) {
+ var flags = _a.flags, valueDeclaration = _a.valueDeclaration;
+ var shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration);
+ /*
+ * Because in short-hand property assignment, an identifier which stored as name of the short-hand property assignment
+ * has two meanings: property name and property value. Therefore when we do findAllReference at the position where
+ * an identifier is declared, the language service should return the position of the variable declaration as well as
+ * the position in short-hand property assignment excluding property accessing. However, if we do findAllReference at the
+ * position of property accessing, the referenceEntry of such position will be handled in the first case.
*/
- function findOwnConstructorCalls(classSymbol) {
- var result = [];
- for (var _i = 0, _a = classSymbol.members["__constructor"].declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150 /* Constructor */);
- var ctrKeyword = decl.getChildAt(0);
- ts.Debug.assert(ctrKeyword.kind === 122 /* ConstructorKeyword */);
- result.push(ctrKeyword);
- }
- ts.forEachProperty(classSymbol.exports, function (member) {
- var decl = member.valueDeclaration;
- if (decl && decl.kind === 149 /* MethodDeclaration */) {
- var body = decl.body;
- if (body) {
- forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) {
- if (ts.isNewExpressionTarget(thisKeyword)) {
- result.push(thisKeyword);
- }
- });
- }
- }
- });
- return result;
+ if (!(flags & 134217728 /* Transient */) && search.includes(shorthandValueSymbol)) {
+ addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ }
+ }
+ function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
+ var addRef = state.referenceAdder(relatedSymbol, searchLocation);
+ if (state.implementations) {
+ addImplementationReferences(referenceLocation, addRef, state);
}
- /** Find references to `super` in the constructor of an extending class. */
- function superConstructorAccesses(cls) {
- var symbol = cls.symbol;
- var ctr = symbol.members["__constructor"];
- if (!ctr) {
- return [];
+ else {
+ addRef(referenceLocation);
+ }
+ }
+ /** Adds references when a constructor is used with `new this()` in its own class and `super()` calls in subclasses. */
+ function findConstructorReferences(referenceLocation, sourceFile, search, state) {
+ if (ts.isNewExpressionTarget(referenceLocation)) {
+ addReference(referenceLocation, search.symbol, search.location, state);
+ }
+ var pusher = state.referenceAdder(search.symbol, search.location);
+ if (ts.isClassLike(referenceLocation.parent)) {
+ ts.Debug.assert(referenceLocation.parent.name === referenceLocation);
+ // This is the class declaration containing the constructor.
+ findOwnConstructorReferences(search.symbol, sourceFile, pusher);
+ }
+ else {
+ // If this class appears in `extends C`, then the extending class' "super" calls are references.
+ var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
+ if (classExtending && ts.isClassLike(classExtending)) {
+ findSuperConstructorAccesses(classExtending, pusher);
}
- var result = [];
- for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150 /* Constructor */);
+ }
+ }
+ function getPropertyAccessExpressionFromRightHandSide(node) {
+ return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ }
+ /**
+ * `classSymbol` is the class where the constructor was defined.
+ * Reference the constructor and all calls to `new this()`.
+ */
+ function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
+ for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ var ctrKeyword = ts.findChildOfKind(decl, 122 /* ConstructorKeyword */, sourceFile);
+ ts.Debug.assert(decl.kind === 151 /* Constructor */ && !!ctrKeyword);
+ addNode(ctrKeyword);
+ }
+ classSymbol.exports.forEach(function (member) {
+ var decl = member.valueDeclaration;
+ if (decl && decl.kind === 150 /* MethodDeclaration */) {
var body = decl.body;
if (body) {
- forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) {
- if (ts.isCallExpressionTarget(node)) {
- result.push(node);
+ forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) {
+ if (ts.isNewExpressionTarget(thisKeyword)) {
+ addNode(thisKeyword);
}
});
}
}
- ;
- return result;
+ });
+ }
+ /** Find references to `super` in the constructor of an extending class. */
+ function findSuperConstructorAccesses(cls, addNode) {
+ var symbol = cls.symbol;
+ var ctr = symbol.members.get("__constructor");
+ if (!ctr) {
+ return;
}
- function getReferencedSymbol(symbol) {
- var symbolId = ts.getSymbolId(symbol);
- var index = symbolToIndex[symbolId];
- if (index === undefined) {
- index = result.length;
- symbolToIndex[symbolId] = index;
- result.push({
- definition: getDefinition(symbol),
- references: []
+ for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ ts.Debug.assert(decl.kind === 151 /* Constructor */);
+ var body = decl.body;
+ if (body) {
+ forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) {
+ if (ts.isCallExpressionTarget(node)) {
+ addNode(node);
+ }
});
}
- return result[index];
- }
- function addReferenceToRelatedSymbol(node, relatedSymbol) {
- var references = getReferencedSymbol(relatedSymbol).references;
- if (implementations) {
- getImplementationReferenceEntryForNode(node, references);
- }
- else {
- references.push(getReferenceEntryFromNode(node));
- }
}
}
- function getImplementationReferenceEntryForNode(refNode, result) {
+ function addImplementationReferences(refNode, addReference, state) {
// Check if we found a function/propertyAssignment/method with an implementation or initializer
if (ts.isDeclarationName(refNode) && isImplementation(refNode.parent)) {
- result.push(getReferenceEntryFromNode(refNode.parent));
+ addReference(refNode.parent);
+ return;
}
- else if (refNode.kind === 70 /* Identifier */) {
- if (refNode.parent.kind === 258 /* ShorthandPropertyAssignment */) {
- // Go ahead and dereference the shorthand assignment by going to its definition
- getReferenceEntriesForShorthandPropertyAssignment(refNode, typeChecker, result);
- }
- // Check if the node is within an extends or implements clause
- var containingClass = getContainingClassIfInHeritageClause(refNode);
- if (containingClass) {
- result.push(getReferenceEntryFromNode(containingClass));
- return;
- }
- // If we got a type reference, try and see if the reference applies to any expressions that can implement an interface
- var containingTypeReference = getContainingTypeReference(refNode);
- if (containingTypeReference) {
- var parent_18 = containingTypeReference.parent;
- if (ts.isVariableLike(parent_18) && parent_18.type === containingTypeReference && parent_18.initializer && isImplementationExpression(parent_18.initializer)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.initializer));
- }
- else if (ts.isFunctionLike(parent_18) && parent_18.type === containingTypeReference && parent_18.body) {
- if (parent_18.body.kind === 204 /* Block */) {
- ts.forEachReturnStatement(parent_18.body, function (returnStatement) {
- if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
- maybeAdd(getReferenceEntryFromNode(returnStatement.expression));
- }
- });
- }
- else if (isImplementationExpression(parent_18.body)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.body));
- }
+ if (refNode.kind !== 70 /* Identifier */) {
+ return;
+ }
+ if (refNode.parent.kind === 261 /* ShorthandPropertyAssignment */) {
+ // Go ahead and dereference the shorthand assignment by going to its definition
+ getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference);
+ }
+ // Check if the node is within an extends or implements clause
+ var containingClass = getContainingClassIfInHeritageClause(refNode);
+ if (containingClass) {
+ addReference(containingClass);
+ return;
+ }
+ // If we got a type reference, try and see if the reference applies to any expressions that can implement an interface
+ var containingTypeReference = getContainingTypeReference(refNode);
+ if (containingTypeReference && state.markSeenContainingTypeReference(containingTypeReference)) {
+ var parent = containingTypeReference.parent;
+ if (ts.isVariableLike(parent) && parent.type === containingTypeReference && parent.initializer && isImplementationExpression(parent.initializer)) {
+ addReference(parent.initializer);
+ }
+ else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) {
+ if (parent.body.kind === 206 /* Block */) {
+ ts.forEachReturnStatement(parent.body, function (returnStatement) {
+ if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
+ addReference(returnStatement.expression);
+ }
+ });
}
- else if (ts.isAssertionExpression(parent_18) && isImplementationExpression(parent_18.expression)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.expression));
+ else if (isImplementationExpression(parent.body)) {
+ addReference(parent.body);
}
}
- }
- // Type nodes can contain multiple references to the same type. For example:
- // let x: Foo & (Foo & Bar) = ...
- // Because we are returning the implementation locations and not the identifier locations,
- // duplicate entries would be returned here as each of the type references is part of
- // the same implementation. For that reason, check before we add a new entry
- function maybeAdd(a) {
- if (!ts.forEach(result, function (b) { return a.fileName === b.fileName && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; })) {
- result.push(a);
+ else if (ts.isAssertionExpression(parent) && isImplementationExpression(parent.expression)) {
+ addReference(parent.expression);
}
}
}
@@ -69830,12 +75694,12 @@ var ts;
}
function getContainingClassIfInHeritageClause(node) {
if (node && node.parent) {
- if (node.kind === 199 /* ExpressionWithTypeArguments */
- && node.parent.kind === 255 /* HeritageClause */
+ if (node.kind === 200 /* ExpressionWithTypeArguments */
+ && node.parent.kind === 258 /* HeritageClause */
&& ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
- else if (node.kind === 70 /* Identifier */ || node.kind === 177 /* PropertyAccessExpression */) {
+ else if (node.kind === 70 /* Identifier */ || node.kind === 178 /* PropertyAccessExpression */) {
return getContainingClassIfInHeritageClause(node.parent);
}
}
@@ -69845,15 +75709,18 @@ var ts;
* Returns true if this is an expression that can be considered an implementation
*/
function isImplementationExpression(node) {
- // Unwrap parentheses
- if (node.kind === 183 /* ParenthesizedExpression */) {
- return isImplementationExpression(node.expression);
+ switch (node.kind) {
+ case 184 /* ParenthesizedExpression */:
+ return isImplementationExpression(node.expression);
+ case 186 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 198 /* ClassExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ return true;
+ default:
+ return false;
}
- return node.kind === 185 /* ArrowFunction */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 176 /* ObjectLiteralExpression */ ||
- node.kind === 197 /* ClassExpression */ ||
- node.kind === 175 /* ArrayLiteralExpression */;
}
/**
* Determines if the parent symbol occurs somewhere in the child's ancestry. If the parent symbol
@@ -69874,7 +75741,7 @@ var ts;
* @param parent Another class or interface Symbol
* @param cachedResults A map of symbol id pairs (i.e. "child,parent") to booleans indicating previous results
*/
- function explicitlyInheritsFrom(child, parent, cachedResults) {
+ function explicitlyInheritsFrom(child, parent, cachedResults, checker) {
var parentIsInterface = parent.getFlags() & 64 /* Interface */;
return searchHierarchy(child);
function searchHierarchy(symbol) {
@@ -69882,11 +75749,12 @@ var ts;
return true;
}
var key = ts.getSymbolId(symbol) + "," + ts.getSymbolId(parent);
- if (key in cachedResults) {
- return cachedResults[key];
+ var cached = cachedResults.get(key);
+ if (cached !== undefined) {
+ return cached;
}
// Set the key so that we don't infinitely recurse
- cachedResults[key] = false;
+ cachedResults.set(key, false);
var inherits = ts.forEach(symbol.getDeclarations(), function (declaration) {
if (ts.isClassLike(declaration)) {
if (parentIsInterface) {
@@ -69902,19 +75770,19 @@ var ts;
}
return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
}
- else if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ else if (declaration.kind === 229 /* InterfaceDeclaration */) {
if (parentIsInterface) {
return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference);
}
}
return false;
});
- cachedResults[key] = inherits;
+ cachedResults.set(key, inherits);
return inherits;
}
function searchTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type && type.symbol) {
return searchHierarchy(type.symbol);
}
@@ -69930,13 +75798,13 @@ var ts;
// Whether 'super' occurs in a static context within a class.
var staticFlag = 32 /* Static */;
switch (searchSpaceNode.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class
break;
@@ -69946,49 +75814,48 @@ var ts;
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.kind !== 96 /* SuperKeyword */) {
- return;
+ continue;
}
var container = ts.getSuperContainer(node, /*stopOnFunctions*/ false);
// If we have a 'super' container, we must have an enclosing class.
// Now make sure the owning class is the same as the search-space
// and has the same static qualifier as the original 'super's owner.
if (container && (32 /* Static */ & ts.getModifierFlags(container)) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = getDefinition(searchSpaceNode.symbol);
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "symbol", symbol: searchSpaceNode.symbol, node: superKeyword }, references: references }];
}
- function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) {
+ function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {
var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, /* includeArrowFunctions */ false);
// Whether 'this' occurs in a static context within a class.
var staticFlag = 32 /* Static */;
switch (searchSpaceNode.kind) {
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.isObjectLiteralMethod(searchSpaceNode)) {
break;
}
- // fall through
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (ts.isExternalModule(searchSpaceNode)) {
return undefined;
}
- // Fall through
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ // falls through
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
break;
// Computed properties in classes are not handled here because references to this are illegal,
// so there is no point finding references to them.
@@ -69997,8 +75864,9 @@ var ts;
}
var references = [];
var possiblePositions;
- if (searchSpaceNode.kind === 261 /* SourceFile */) {
+ if (searchSpaceNode.kind === 264 /* SourceFile */) {
ts.forEach(sourceFiles, function (sourceFile) {
+ cancellationToken.throwIfCancellationRequested();
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
@@ -70008,144 +75876,103 @@ var ts;
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
- var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword);
- var displayParts = thisOrSuperSymbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), ts.getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts;
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: "this",
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: displayParts
- },
+ definition: { type: "this", node: thisOrSuperKeyword },
references: references
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
var node = ts.getTouchingWord(sourceFile, position);
if (!node || !ts.isThis(node)) {
return;
}
var container = ts.getThisContainer(node, /* includeArrowFunctions */ false);
switch (searchSpaceNode.kind) {
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
if (searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
// Make sure the container belongs to the same class
// and has the appropriate static modifier from the original container.
if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32 /* Static */) === staticFlag) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 261 /* SourceFile */:
- if (container.kind === 261 /* SourceFile */ && !ts.isExternalModule(container)) {
- result.push(getReferenceEntryFromNode(node));
+ case 264 /* SourceFile */:
+ if (container.kind === 264 /* SourceFile */ && !ts.isExternalModule(container)) {
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
}
});
}
}
- function getReferencesForStringLiteral(node, sourceFiles) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (!type) {
- // nothing to do here. moving on
- return undefined;
- }
+ function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_9 = sourceFiles; _i < sourceFiles_9.length; _i++) {
- var sourceFile = sourceFiles_9[_i];
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, type.text, sourceFile.getStart(), sourceFile.getEnd());
- getReferencesForStringLiteralInFile(sourceFile, type, possiblePositions, references);
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_i];
+ cancellationToken.throwIfCancellationRequested();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: type.text,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: [ts.displayPart(ts.getTextOfNode(node), ts.SymbolDisplayPartKind.stringLiteral)]
- },
+ definition: { type: "string", node: node },
references: references
}];
- function getReferencesForStringLiteralInFile(sourceFile, searchType, possiblePositions, references) {
- for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
- var position = possiblePositions_1[_i];
- cancellationToken.throwIfCancellationRequested();
- var node_2 = ts.getTouchingWord(sourceFile, position);
- if (!node_2 || node_2.kind !== 9 /* StringLiteral */) {
- return;
- }
- var type_2 = ts.getStringLiteralTypeForNode(node_2, typeChecker);
- if (type_2 === searchType) {
- references.push(getReferenceEntryFromNode(node_2));
+ function getReferencesForStringLiteralInFile(sourceFile, searchText, possiblePositions, references) {
+ for (var _i = 0, possiblePositions_5 = possiblePositions; _i < possiblePositions_5.length; _i++) {
+ var position = possiblePositions_5[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position);
+ if (node_7 && node_7.kind === 9 /* StringLiteral */ && node_7.text === searchText) {
+ references.push(FindAllReferences.nodeEntry(node_7, /*isInString*/ true));
}
}
}
}
- function populateSearchSymbolSet(symbol, location) {
+ // For certain symbol kinds, we need to include other symbols in the search set.
+ // This is not needed when searching for re-exports.
+ function populateSearchSymbolSet(symbol, location, checker, implementations) {
// The search set contains at least the current symbol
var result = [symbol];
- // If the location is name of property symbol from object literal destructuring pattern
- // Search the property symbol
- // for ( { property: p2 } of elems) { }
- var containingObjectLiteralElement = getContainingObjectLiteralElement(location);
- if (containingObjectLiteralElement && containingObjectLiteralElement.kind !== 258 /* ShorthandPropertyAssignment */) {
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(location);
- if (propertySymbol) {
- result.push(propertySymbol);
- }
- }
- // If the symbol is an alias, add what it aliases to the list
- // import {a} from "mod";
- // export {a}
- // If the symbol is an alias to default declaration, add what it aliases to the list
- // declare "mod" { export default class B { } }
- // import B from "mod";
- //// For export specifiers, the exported name can be referring to a local symbol, e.g.:
- //// import {a} from "mod";
- //// export {a as somethingElse}
- //// We want the *local* declaration of 'a' as declared in the import,
- //// *not* as declared within "mod" (or farther)
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(symbol, location);
- if (aliasSymbol) {
- result = result.concat(populateSearchSymbolSet(aliasSymbol, location));
- }
- // If the location is in a context sensitive location (i.e. in an object literal) try
- // to get a contextual type for it, and add the property symbol from the contextual
- // type to the search set
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location);
if (containingObjectLiteralElement) {
- ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- ts.addRange(result, typeChecker.getRootSymbols(contextualSymbol));
+ // If the location is name of property symbol from object literal destructuring pattern
+ // Search the property symbol
+ // for ( { property: p2 } of elems) { }
+ if (containingObjectLiteralElement.kind !== 261 /* ShorthandPropertyAssignment */) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker);
+ if (propertySymbol) {
+ result.push(propertySymbol);
+ }
+ }
+ // If the location is in a context sensitive location (i.e. in an object literal) try
+ // to get a contextual type for it, and add the property symbol from the contextual
+ // type to the search set
+ ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker), function (contextualSymbol) {
+ ts.addRange(result, checker.getRootSymbols(contextualSymbol));
});
/* Because in short-hand property assignment, location has two meaning : property name and as value of the property
- * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of
- * property name and variable declaration of the identifier.
- * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service
- * should show both 'name' in 'obj' and 'name' in variable declaration
- * const name = "Foo";
- * const obj = { name };
- * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment
- * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration
- * will be included correctly.
- */
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent);
+ * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of
+ * property name and variable declaration of the identifier.
+ * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service
+ * should show both 'name' in 'obj' and 'name' in variable declaration
+ * const name = "Foo";
+ * const obj = { name };
+ * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment
+ * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration
+ * will be included correctly.
+ */
+ var shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent);
if (shorthandValueSymbol) {
result.push(shorthandValueSymbol);
}
@@ -70154,27 +75981,28 @@ var ts;
// we should include both parameter declaration symbol and property declaration symbol
// Parameter Declaration symbol is only visible within function scope, so the symbol is stored in constructor.locals.
// Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members
- if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 144 /* Parameter */ &&
+ if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 /* Parameter */ &&
ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) {
- result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
+ ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
}
// If this is symbol of binding element without propertyName declaration in Object binding pattern
// Include the property in the search
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol);
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);
if (bindingElementPropertySymbol) {
result.push(bindingElementPropertySymbol);
}
// If this is a union property, add all the symbols from all its source symbols in all unioned types.
// If the symbol is an instantiation from a another symbol (e.g. widened symbol) , add the root the list
- ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
+ for (var _i = 0, _a = checker.getRootSymbols(symbol); _i < _a.length; _i++) {
+ var rootSymbol = _a[_i];
if (rootSymbol !== symbol) {
result.push(rootSymbol);
}
// Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions
if (!implementations && rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) {
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap());
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap(), checker);
}
- });
+ }
return result;
}
/**
@@ -70185,7 +76013,7 @@ var ts;
* @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisiting of the same symbol.
* The value of previousIterationSymbol is undefined when the function is first called.
*/
- function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) {
+ function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache, checker) {
if (!symbol) {
return;
}
@@ -70200,7 +76028,7 @@ var ts;
// the function will add any found symbol of the property-name, then its sub-routine will call
// getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already
// visited symbol, interface "C", the sub-routine will pass the current symbol as previousIterationSymbol.
- if (symbol.name in previousIterationSymbolsCache) {
+ if (previousIterationSymbolsCache.has(symbol.name)) {
return;
}
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
@@ -70209,7 +76037,7 @@ var ts;
getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference);
}
- else if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ else if (declaration.kind === 229 /* InterfaceDeclaration */) {
ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference);
}
});
@@ -70217,37 +76045,30 @@ var ts;
return;
function getPropertySymbolFromTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type) {
- var propertySymbol = typeChecker.getPropertyOfType(type, propertyName);
+ var propertySymbol = checker.getPropertyOfType(type, propertyName);
if (propertySymbol) {
- result.push.apply(result, typeChecker.getRootSymbols(propertySymbol));
+ result.push.apply(result, checker.getRootSymbols(propertySymbol));
}
// Visit the typeReference as well to see if it directly or indirectly use that property
- previousIterationSymbolsCache[symbol.name] = symbol;
- getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache);
+ previousIterationSymbolsCache.set(symbol.name, symbol);
+ getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache, checker);
}
}
}
}
- function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation, searchLocationIsConstructor, parents, cache) {
- if (ts.contains(searchSymbols, referenceSymbol)) {
- // If we are searching for constructor uses, they must be 'new' expressions.
- return (!searchLocationIsConstructor || ts.isNewExpressionTarget(referenceLocation)) && referenceSymbol;
- }
- // If the reference symbol is an alias, check if what it is aliasing is one of the search
- // symbols but by looking up for related symbol of this alias so it can handle multiple level of indirectness.
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(referenceSymbol, referenceLocation);
- if (aliasSymbol) {
- return getRelatedSymbol(searchSymbols, aliasSymbol, referenceLocation, searchLocationIsConstructor, parents, cache);
+ function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {
+ if (search.includes(referenceSymbol)) {
+ return referenceSymbol;
}
// If the reference location is in an object literal, try to get the contextual type for the
// object literal, lookup the property symbol in the contextual type, and use this symbol to
// compare to our searchSymbol
- var containingObjectLiteralElement = getContainingObjectLiteralElement(referenceLocation);
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(referenceLocation);
if (containingObjectLiteralElement) {
- var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, state.checker), function (contextualSymbol) {
+ return ts.find(state.checker.getRootSymbols(contextualSymbol), search.includes);
});
if (contextualSymbol) {
return contextualSymbol;
@@ -70256,23 +76077,23 @@ var ts;
// Get the property symbol from the object literal's type and look if thats the search symbol
// In below eg. get 'property' from type of elems iterating type
// for ( { property: p2 } of elems) { }
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation);
- if (propertySymbol && searchSymbols.indexOf(propertySymbol) >= 0) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation, state.checker);
+ if (propertySymbol && search.includes(propertySymbol)) {
return propertySymbol;
}
}
// If the reference location is the binding element and doesn't have property name
// then include the binding element in the related symbols
// let { a } : { a };
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol);
- if (bindingElementPropertySymbol && searchSymbols.indexOf(bindingElementPropertySymbol) >= 0) {
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol, state.checker);
+ if (bindingElementPropertySymbol && search.includes(bindingElementPropertySymbol)) {
return bindingElementPropertySymbol;
}
// Unwrap symbols to get to the root (e.g. transient symbols as a result of widening)
// Or a union property, use its underlying unioned symbols
- return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) {
+ return ts.forEach(state.checker.getRootSymbols(referenceSymbol), function (rootSymbol) {
// if it is in the list, then we are done
- if (searchSymbols.indexOf(rootSymbol) >= 0) {
+ if (search.includes(rootSymbol)) {
return rootSymbol;
}
// Finally, try all properties with the same name in any type the containing type extended or implemented, and
@@ -70280,20 +76101,18 @@ var ts;
// parent symbol
if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) {
// Parents will only be defined if implementations is true
- if (parents) {
- if (!ts.forEach(parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, cache); })) {
- return undefined;
- }
+ if (search.parents && !ts.some(search.parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, state.checker); })) {
+ return undefined;
}
- var result_4 = [];
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_4, /*previousIterationSymbolsCache*/ ts.createMap());
- return ts.forEach(result_4, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var result = [];
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap(), state.checker);
+ return ts.find(result, search.includes);
}
return undefined;
});
}
function getNameFromObjectLiteralElement(node) {
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = node.name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
@@ -70303,15 +76122,16 @@ var ts;
}
return node.name.text;
}
- function getPropertySymbolsFromContextualType(node) {
+ /** Gets all symbols for one property. Does not get symbols for every property. */
+ function getPropertySymbolsFromContextualType(node, checker) {
var objectLiteral = node.parent;
- var contextualType = typeChecker.getContextualType(objectLiteral);
+ var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
var result_5 = [];
- var symbol_2 = contextualType.getProperty(name);
- if (symbol_2) {
- result_5.push(symbol_2);
+ var symbol = contextualType.getProperty(name);
+ if (symbol) {
+ result_5.push(symbol);
}
if (contextualType.flags & 65536 /* Union */) {
ts.forEach(contextualType.types, function (t) {
@@ -70325,13 +76145,14 @@ var ts;
}
return undefined;
}
- /** Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations
- * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class
- * then we need to widen the search to include type positions as well.
- * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated
- * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module)
- * do not intersect in any of the three spaces.
- */
+ /**
+ * Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations
+ * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class
+ * then we need to widen the search to include type positions as well.
+ * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated
+ * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module)
+ * do not intersect in any of the three spaces.
+ */
function getIntersectingMeaningFromDeclarations(meaning, declarations) {
if (declarations) {
var lastIterationMeaning = void 0;
@@ -70342,8 +76163,8 @@ var ts;
// To achieve that we will keep iterating until the result stabilizes.
// Remember the last meaning
lastIterationMeaning = meaning;
- for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
- var declaration = declarations_8[_i];
+ for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
+ var declaration = declarations_11[_i];
var declarationMeaning = ts.getMeaningFromDeclaration(declaration);
if (declarationMeaning & meaning) {
meaning |= declarationMeaning;
@@ -70353,143 +76174,93 @@ var ts;
}
return meaning;
}
- }
- FindAllReferences.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
- function convertReferences(referenceSymbols) {
- if (!referenceSymbols) {
- return undefined;
- }
- var referenceEntries = [];
- for (var _i = 0, referenceSymbols_1 = referenceSymbols; _i < referenceSymbols_1.length; _i++) {
- var referenceSymbol = referenceSymbols_1[_i];
- ts.addRange(referenceEntries, referenceSymbol.references);
- }
- return referenceEntries;
- }
- FindAllReferences.convertReferences = convertReferences;
- function isImplementation(node) {
- if (!node) {
- return false;
- }
- else if (ts.isVariableLike(node)) {
- if (node.initializer) {
- return true;
- }
- else if (node.kind === 223 /* VariableDeclaration */) {
- var parentStatement = getParentStatementOfVariableDeclaration(node);
- return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */);
+ function isImplementation(node) {
+ if (!node) {
+ return false;
}
- }
- else if (ts.isFunctionLike(node)) {
- return !!node.body || ts.hasModifier(node, 2 /* Ambient */);
- }
- else {
- switch (node.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ else if (ts.isVariableLike(node)) {
+ if (node.initializer) {
return true;
+ }
+ else if (node.kind === 225 /* VariableDeclaration */) {
+ var parentStatement = getParentStatementOfVariableDeclaration(node);
+ return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */);
+ }
}
+ else if (ts.isFunctionLike(node)) {
+ return !!node.body || ts.hasModifier(node, 2 /* Ambient */);
+ }
+ else {
+ switch (node.kind) {
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ return true;
+ }
+ }
+ return false;
}
- return false;
- }
- function getParentStatementOfVariableDeclaration(node) {
- if (node.parent && node.parent.parent && node.parent.parent.kind === 205 /* VariableStatement */) {
- ts.Debug.assert(node.parent.kind === 224 /* VariableDeclarationList */);
- return node.parent.parent;
+ function getParentStatementOfVariableDeclaration(node) {
+ if (node.parent && node.parent.parent && node.parent.parent.kind === 207 /* VariableStatement */) {
+ ts.Debug.assert(node.parent.kind === 226 /* VariableDeclarationList */);
+ return node.parent.parent;
+ }
}
- }
- function getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result) {
- var refSymbol = typeChecker.getSymbolAtLocation(node);
- var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
- if (shorthandSymbol) {
- for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (ts.getMeaningFromDeclaration(declaration) & 1 /* Value */) {
- result.push(getReferenceEntryFromNode(declaration));
+ function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference) {
+ var refSymbol = checker.getSymbolAtLocation(node);
+ var shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
+ if (shorthandSymbol) {
+ for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.getMeaningFromDeclaration(declaration) & 1 /* Value */) {
+ addReference(declaration);
+ }
}
}
}
- }
- FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
- function getReferenceEntryFromNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- if (node.kind === 9 /* StringLiteral */) {
- start += 1;
- end -= 1;
+ Core.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
+ function forEachDescendantOfKind(node, kind, action) {
+ ts.forEachChild(node, function (child) {
+ if (child.kind === kind) {
+ action(child);
+ }
+ forEachDescendantOfKind(child, kind, action);
+ });
}
- return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node)
- };
- }
- FindAllReferences.getReferenceEntryFromNode = getReferenceEntryFromNode;
- /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
- function isWriteAccess(node) {
- if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) {
- return true;
+ /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
+ function tryGetClassByExtendingIdentifier(node) {
+ return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
}
- var parent = node.parent;
- if (parent) {
- if (parent.kind === 191 /* PostfixUnaryExpression */ || parent.kind === 190 /* PrefixUnaryExpression */) {
- return true;
- }
- else if (parent.kind === 192 /* BinaryExpression */ && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */;
+ function isNameOfExternalModuleImportOrDeclaration(node) {
+ if (node.kind === 9 /* StringLiteral */) {
+ return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
+ return false;
}
- return false;
- }
- function forEachDescendantOfKind(node, kind, action) {
- ts.forEachChild(node, function (child) {
- if (child.kind === kind) {
- action(child);
+ /**
+ * If we are just looking for implementations and this is a property access expression, we need to get the
+ * symbol of the local type of the symbol the property is being accessed on. This is because our search
+ * symbol may have a different parent symbol if the local type's symbol does not declare the property
+ * being accessed (i.e. it is declared in some parent class or interface)
+ */
+ function getParentSymbolsOfPropertyAccess(location, symbol, checker) {
+ var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(location);
+ if (!propertyAccessExpression) {
+ return undefined;
+ }
+ var localParentType = checker.getTypeAtLocation(propertyAccessExpression.expression);
+ if (!localParentType) {
+ return undefined;
+ }
+ if (localParentType.symbol && localParentType.symbol.flags & (32 /* Class */ | 64 /* Interface */) && localParentType.symbol !== symbol.parent) {
+ return [localParentType.symbol];
+ }
+ else if (localParentType.flags & 196608 /* UnionOrIntersection */) {
+ return getSymbolsForClassAndInterfaceComponents(localParentType);
}
- forEachDescendantOfKind(child, kind, action);
- });
- }
- /**
- * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 }
- */
- function getContainingObjectLiteralElement(node) {
- switch (node.kind) {
- case 9 /* StringLiteral */:
- case 8 /* NumericLiteral */:
- if (node.parent.kind === 142 /* ComputedPropertyName */) {
- return isObjectLiteralPropertyDeclaration(node.parent.parent) ? node.parent.parent : undefined;
- }
- // intential fall through
- case 70 /* Identifier */:
- return isObjectLiteralPropertyDeclaration(node.parent) && node.parent.name === node ? node.parent : undefined;
- }
- return undefined;
- }
- function isObjectLiteralPropertyDeclaration(node) {
- switch (node.kind) {
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return true;
- }
- return false;
- }
- /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
- function tryGetClassByExtendingIdentifier(node) {
- return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
- }
- function isNameOfExternalModuleImportOrDeclaration(node) {
- if (node.kind === 9 /* StringLiteral */) {
- return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
- return false;
- }
+ })(Core = FindAllReferences.Core || (FindAllReferences.Core = {}));
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
/* @internal */
@@ -70510,11 +76281,9 @@ var ts;
// Type reference directives
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
- var referenceFile = program.getResolvedTypeReferenceDirectives()[typeReferenceDirective.fileName];
- if (referenceFile && referenceFile.resolvedFileName) {
- return [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
- }
- return undefined;
+ var referenceFile = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName);
+ return referenceFile && referenceFile.resolvedFileName &&
+ [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
var node = ts.getTouchingPropertyName(sourceFile, position);
if (node === sourceFile) {
@@ -70524,7 +76293,7 @@ var ts;
if (ts.isJumpStatementTarget(node)) {
var labelName = node.text;
var label = ts.getTargetLabel(node.parent, node.text);
- return label ? [createDefinitionInfo(label, ts.ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined;
+ return label ? [createDefinitionInfoFromName(label, ts.ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined;
}
var typeChecker = program.getTypeChecker();
var calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
@@ -70550,7 +76319,7 @@ var ts;
//
if (node.kind === 70 /* Identifier */ &&
(node.parent === declaration ||
- (declaration.kind === 239 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 238 /* NamedImports */))) {
+ (declaration.kind === 241 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 240 /* NamedImports */))) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
}
@@ -70559,7 +76328,7 @@ var ts;
// go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition
// is performed at the location of property access, we would like to go to definition of the property in the short-hand
// assignment. This case and others are handled by the following code.
- if (node.parent.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) {
var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);
if (!shorthandSymbol) {
return [];
@@ -70570,6 +76339,37 @@ var ts;
var shorthandContainerName_1 = typeChecker.symbolToString(symbol.parent, node);
return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind_1, shorthandSymbolName_1, shorthandContainerName_1); });
}
+ if (ts.isJsxOpeningLikeElement(node.parent)) {
+ // If there are errors when trying to figure out stateless component function, just return the first declaration
+ // For example:
+ // declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element;
+ // declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element;
+ // declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element;
+ // let opt = <Main/*firstTarget*/Button />; // Error - We get undefined for resolved signature indicating an error, then just return the first declaration
+ var _a = getSymbolInfo(typeChecker, symbol, node), symbolName = _a.symbolName, symbolKind = _a.symbolKind, containerName = _a.containerName;
+ return [createDefinitionInfo(symbol.valueDeclaration, symbolKind, symbolName, containerName)];
+ }
+ // If the current location we want to find its definition is in an object literal, try to get the contextual type for the
+ // object literal, lookup the property symbol in the contextual type, and use this for goto-definition.
+ // For example
+ // interface Props{
+ // /*first*/prop1: number
+ // prop2: boolean
+ // }
+ // function Foo(arg: Props) {}
+ // Foo( { pr/*1*/op1: 10, prop2: true })
+ var element = ts.getContainingObjectLiteralElement(node);
+ if (element) {
+ if (typeChecker.getContextualType(element.parent)) {
+ var result = [];
+ var propertySymbols = ts.getPropertySymbolsFromContextualType(typeChecker, element);
+ for (var _i = 0, propertySymbols_1 = propertySymbols; _i < propertySymbols_1.length; _i++) {
+ var propertySymbol = propertySymbols_1[_i];
+ result.push.apply(result, getDefinitionFromSymbol(typeChecker, propertySymbol, node));
+ }
+ return result;
+ }
+ }
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
@@ -70639,31 +76439,47 @@ var ts;
return false;
}
function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) {
+ if (!signatureDeclarations) {
+ return false;
+ }
var declarations = [];
var definition;
- ts.forEach(signatureDeclarations, function (d) {
- if ((selectConstructors && d.kind === 150 /* Constructor */) ||
- (!selectConstructors && (d.kind === 225 /* FunctionDeclaration */ || d.kind === 149 /* MethodDeclaration */ || d.kind === 148 /* MethodSignature */))) {
+ for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) {
+ var d = signatureDeclarations_1[_i];
+ if (selectConstructors ? d.kind === 151 /* Constructor */ : isSignatureDeclaration(d)) {
declarations.push(d);
if (d.body)
definition = d;
}
- });
- if (definition) {
- result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName));
- return true;
}
- else if (declarations.length) {
- result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
+ if (declarations.length) {
+ result.push(createDefinitionInfo(definition || ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
return true;
}
return false;
}
}
+ function isSignatureDeclaration(node) {
+ switch (node.kind) {
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ return true;
+ default:
+ return false;
+ }
+ }
+ /** Creates a DefinitionInfo from a Declaration, using the declaration's name if possible. */
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
+ return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ }
+ /** Creates a DefinitionInfo directly from the name of a declaration. */
+ function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
+ var sourceFile = name.getSourceFile();
return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromNode(name, sourceFile),
kind: symbolKind,
name: symbolName,
containerKind: undefined,
@@ -70711,43 +76527,17 @@ var ts;
}
function tryGetSignatureDeclaration(typeChecker, node) {
var callLike = getAncestorCallLikeExpression(node);
- return callLike && typeChecker.getResolvedSignature(callLike).declaration;
- }
- })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
-})(ts || (ts = {}));
-/* @internal */
-var ts;
-(function (ts) {
- var GoToImplementation;
- (function (GoToImplementation) {
- function getImplementationAtPosition(typeChecker, cancellationToken, sourceFiles, node) {
- // If invoked directly on a shorthand property assignment, then return
- // the declaration of the symbol being assigned (not the symbol being assigned to).
- if (node.parent.kind === 258 /* ShorthandPropertyAssignment */) {
- var result = [];
- ts.FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result);
- return result.length > 0 ? result : undefined;
- }
- else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) {
- // References to and accesses on the super keyword only have one possible implementation, so no
- // need to "Find all References"
- var symbol = typeChecker.getSymbolAtLocation(node);
- return symbol.valueDeclaration && [ts.FindAllReferences.getReferenceEntryFromNode(symbol.valueDeclaration)];
- }
- else {
- // Perform "Find all References" and retrieve only those that are implementations
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, /*findInStrings*/ false, /*findInComments*/ false, /*implementations*/ true);
- var result = ts.flatMap(referencedSymbols, function (symbol) {
- return ts.map(symbol.references, function (_a) {
- var textSpan = _a.textSpan, fileName = _a.fileName;
- return ({ textSpan: textSpan, fileName: fileName });
- });
- });
- return result && result.length > 0 ? result : undefined;
+ var signature = callLike && typeChecker.getResolvedSignature(callLike);
+ if (signature) {
+ var decl = signature.declaration;
+ if (decl && isSignatureDeclaration(decl)) {
+ return decl;
+ }
}
+ // Don't go to a function type, go to the value having that type.
+ return undefined;
}
- GoToImplementation.getImplementationAtPosition = getImplementationAtPosition;
- })(GoToImplementation = ts.GoToImplementation || (ts.GoToImplementation = {}));
+ })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
@@ -70777,6 +76567,7 @@ var ts;
"lends",
"link",
"memberOf",
+ "method",
"name",
"namespace",
"param",
@@ -70795,7 +76586,8 @@ var ts;
"prop",
"version"
];
- var jsDocCompletionEntries;
+ var jsDocTagNameCompletionEntries;
+ var jsDocTagCompletionEntries;
function getJsDocCommentsFromDeclarations(declarations) {
// Only collect doc comments from duplicate declarations once:
// In case of a union property there might be same declaration multiple times
@@ -70822,6 +76614,30 @@ var ts;
return documentationComment;
}
JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations;
+ function getJsDocTagsFromDeclarations(declarations) {
+ // Only collect doc comments from duplicate declarations once.
+ var tags = [];
+ forEachUnique(declarations, function (declaration) {
+ var jsDocs = ts.getJSDocs(declaration);
+ if (!jsDocs) {
+ return;
+ }
+ for (var _i = 0, jsDocs_1 = jsDocs; _i < jsDocs_1.length; _i++) {
+ var doc = jsDocs_1[_i];
+ var tagsForDoc = doc.tags;
+ if (tagsForDoc) {
+ tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283 /* JSDocTag */; }).map(function (jsDocTag) {
+ return {
+ name: jsDocTag.tagName.text,
+ text: jsDocTag.comment
+ };
+ }));
+ }
+ }
+ });
+ return tags;
+ }
+ JsDoc.getJsDocTagsFromDeclarations = getJsDocTagsFromDeclarations;
/**
* Iterates through 'array' by index and performs the callback on each element of array until the callback
* returns a truthy value, then returns that value.
@@ -70829,7 +76645,7 @@ var ts;
*/
function forEachUnique(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (ts.indexOf(array, array[i]) === i) {
var result = callback(array[i], i);
if (result) {
@@ -70840,8 +76656,8 @@ var ts;
}
return undefined;
}
- function getAllJsDocCompletionEntries() {
- return jsDocCompletionEntries || (jsDocCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ function getJSDocTagNameCompletions() {
+ return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
return {
name: tagName,
kind: ts.ScriptElementKind.keyword,
@@ -70850,7 +76666,18 @@ var ts;
};
}));
}
- JsDoc.getAllJsDocCompletionEntries = getAllJsDocCompletionEntries;
+ JsDoc.getJSDocTagNameCompletions = getJSDocTagNameCompletions;
+ function getJSDocTagCompletions() {
+ return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ return {
+ name: "@" + tagName,
+ kind: ts.ScriptElementKind.keyword,
+ kindModifiers: "",
+ sortText: "0"
+ };
+ }));
+ }
+ JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
/**
* Checks if position points to a valid position to add JSDoc comments, and if so,
* returns the appropriate template. Otherwise returns an empty string.
@@ -70889,19 +76716,19 @@ var ts;
var commentOwner;
findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) {
switch (commentOwner.kind) {
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 150 /* Constructor */:
- case 226 /* ClassDeclaration */:
- case 205 /* VariableStatement */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 151 /* Constructor */:
+ case 228 /* ClassDeclaration */:
+ case 207 /* VariableStatement */:
break findOwner;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return undefined;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// If in walking up the tree, we hit a a nested namespace declaration,
// then we must be somewhere within a dotted namespace name; however we don't
// want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'.
- if (commentOwner.parent.kind === 230 /* ModuleDeclaration */) {
+ if (commentOwner.parent.kind === 232 /* ModuleDeclaration */) {
return undefined;
}
break findOwner;
@@ -70913,14 +76740,21 @@ var ts;
var parameters = getParametersForJsDocOwningNode(commentOwner);
var posLineAndChar = sourceFile.getLineAndCharacterOfPosition(position);
var lineStart = sourceFile.getLineStarts()[posLineAndChar.line];
- var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character);
+ // replace non-whitespace characters in prefix with spaces.
+ var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character).replace(/\S/i, function () { return " "; });
+ var isJavaScriptFile = ts.hasJavaScriptFileExtension(sourceFile.fileName);
var docParams = "";
- for (var i = 0, numParams = parameters.length; i < numParams; i++) {
+ for (var i = 0; i < parameters.length; i++) {
var currentName = parameters[i].name;
var paramName = currentName.kind === 70 /* Identifier */ ?
currentName.text :
"param" + i;
- docParams += indentationStr + " * @param " + paramName + newLine;
+ if (isJavaScriptFile) {
+ docParams += indentationStr + " * @param {any} " + paramName + newLine;
+ }
+ else {
+ docParams += indentationStr + " * @param " + paramName + newLine;
+ }
}
// A doc comment consists of the following
// * The opening comment line
@@ -70942,7 +76776,7 @@ var ts;
if (ts.isFunctionLike(commentOwner)) {
return commentOwner.parameters;
}
- if (commentOwner.kind === 205 /* VariableStatement */) {
+ if (commentOwner.kind === 207 /* VariableStatement */) {
var varStatement = commentOwner;
var varDeclarations = varStatement.declarationList.declarations;
if (varDeclarations.length === 1 && varDeclarations[0].initializer) {
@@ -70960,17 +76794,17 @@ var ts;
* @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'.
*/
function getParametersFromRightHandSideOfAssignment(rightHandSide) {
- while (rightHandSide.kind === 183 /* ParenthesizedExpression */) {
+ while (rightHandSide.kind === 184 /* ParenthesizedExpression */) {
rightHandSide = rightHandSide.expression;
}
switch (rightHandSide.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return rightHandSide.parameters;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150 /* Constructor */) {
+ if (member.kind === 151 /* Constructor */) {
return member.parameters;
}
}
@@ -70990,8 +76824,6 @@ var ts;
(function (ts) {
var JsTyping;
(function (JsTyping) {
- ;
- ;
// A map of loose file names to library names
// that we are confident require typings
var safeList;
@@ -71028,7 +76860,7 @@ var ts;
});
if (!safeList) {
var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
- safeList = result.config ? ts.createMap(result.config) : EmptySafeList;
+ safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
}
var filesToWatch = [];
// Directories to search for package.json, bower.json and other typing information
@@ -71047,41 +76879,43 @@ var ts;
getTypingNamesFromJson(packageJsonPath, filesToWatch);
var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
getTypingNamesFromJson(bowerJsonPath, filesToWatch);
+ var bowerComponentsPath = ts.combinePaths(searchDir, "bower_components");
+ getTypingNamesFromPackagesFolder(bowerComponentsPath);
var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
- getTypingNamesFromNodeModuleFolder(nodeModulesPath);
+ getTypingNamesFromPackagesFolder(nodeModulesPath);
}
getTypingNamesFromSourceFileNames(fileNames);
// add typings for unresolved imports
if (unresolvedImports) {
for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
var moduleId = unresolvedImports_1[_a];
- var typingName = moduleId in nodeCoreModules ? "node" : moduleId;
- if (!(typingName in inferredTypings)) {
- inferredTypings[typingName] = undefined;
+ var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
+ if (!inferredTypings.has(typingName)) {
+ inferredTypings.set(typingName, undefined);
}
}
}
// Add the cached typing locations for inferred typings that are already installed
- for (var name_45 in packageNameToTypingLocation) {
- if (name_45 in inferredTypings && !inferredTypings[name_45]) {
- inferredTypings[name_45] = packageNameToTypingLocation[name_45];
+ packageNameToTypingLocation.forEach(function (typingLocation, name) {
+ if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
+ inferredTypings.set(name, typingLocation);
}
- }
+ });
// Remove typings that the user has added to the exclude list
for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
var excludeTypingName = exclude_1[_b];
- delete inferredTypings[excludeTypingName];
+ inferredTypings.delete(excludeTypingName);
}
var newTypingNames = [];
var cachedTypingPaths = [];
- for (var typing in inferredTypings) {
- if (inferredTypings[typing] !== undefined) {
- cachedTypingPaths.push(inferredTypings[typing]);
+ inferredTypings.forEach(function (inferred, typing) {
+ if (inferred !== undefined) {
+ cachedTypingPaths.push(inferred);
}
else {
newTypingNames.push(typing);
}
- }
+ });
return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
/**
* Merge a given list of typingNames to the inferredTypings map
@@ -71092,8 +76926,8 @@ var ts;
}
for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
var typing = typingNames_1[_i];
- if (!(typing in inferredTypings)) {
- inferredTypings[typing] = undefined;
+ if (!inferredTypings.has(typing)) {
+ inferredTypings.set(typing, undefined);
}
}
}
@@ -71132,7 +76966,7 @@ var ts;
var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
if (safeList !== EmptySafeList) {
- mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; }));
+ mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2 /* JSX */; });
if (hasJsxFile) {
@@ -71140,20 +76974,22 @@ var ts;
}
}
/**
- * Infer typing names from node_module folder
- * @param nodeModulesPath is the path to the "node_modules" folder
+ * Infer typing names from packages folder (ex: node_module, bower_components)
+ * @param packagesFolderPath is the path to the packages folder
*/
- function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
+ function getTypingNamesFromPackagesFolder(packagesFolderPath) {
+ filesToWatch.push(packagesFolderPath);
// Todo: add support for ModuleResolutionHost too
- if (!host.directoryExists(nodeModulesPath)) {
+ if (!host.directoryExists(packagesFolderPath)) {
return;
}
var typingNames = [];
- var fileNames = host.readDirectory(nodeModulesPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
+ var fileNames = host.readDirectory(packagesFolderPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
var fileName = fileNames_2[_i];
var normalizedFileName = ts.normalizePath(fileName);
- if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
+ var baseFileName = ts.getBaseFileName(normalizedFileName);
+ if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
continue;
}
var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
@@ -71164,7 +77000,7 @@ var ts;
// npm 3's package.json contains a "_requiredBy" field
// we should include all the top level module names for npm 2, and only module names whose
// "_requiredBy" field starts with "#" or equals "/" for npm 3.
- if (packageJson._requiredBy &&
+ if (baseFileName === "package.json" && packageJson._requiredBy &&
ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
continue;
}
@@ -71175,7 +77011,7 @@ var ts;
}
if (packageJson.typings) {
var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
- inferredTypings[packageJson.name] = absolutePath;
+ inferredTypings.set(packageJson.name, absolutePath);
}
else {
typingNames.push(packageJson.name);
@@ -71195,47 +77031,49 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
- ts.forEach(sourceFiles, function (sourceFile) {
+ var _loop_4 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
- return;
+ return "continue";
}
- var nameToDeclarations = sourceFile.getNamedDeclarations();
- for (var name_46 in nameToDeclarations) {
- var declarations = nameToDeclarations[name_46];
+ ts.forEachEntry(sourceFile.getNamedDeclarations(), function (declarations, name) {
if (declarations) {
// First do a quick check to see if the name of the declaration matches the
// last portion of the (possibly) dotted name they're searching for.
- var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_46);
+ var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name);
if (!matches) {
- continue;
+ return; // continue to next named declarations
}
- for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
- var declaration = declarations_9[_i];
+ for (var _i = 0, declarations_12 = declarations; _i < declarations_12.length; _i++) {
+ var declaration = declarations_12[_i];
// It was a match! If the pattern has dots in it, then also see if the
// declaration container matches as well.
if (patternMatcher.patternContainsDots) {
var containers = getContainers(declaration);
if (!containers) {
- return undefined;
+ return true; // Break out of named declarations and go to the next source file.
}
- matches = patternMatcher.getMatches(containers, name_46);
+ matches = patternMatcher.getMatches(containers, name);
if (!matches) {
- continue;
+ return; // continue to next named declarations
}
}
var fileName = sourceFile.fileName;
var matchKind = bestMatchKind(matches);
- rawItems.push({ name: name_46, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
+ rawItems.push({ name: name, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
}
}
- }
- });
+ });
+ };
+ // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
+ _loop_4(sourceFile);
+ }
// Remove imports when the imported declaration is already in the list and has the same name.
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
- if (decl.kind === 236 /* ImportClause */ || decl.kind === 239 /* ImportSpecifier */ || decl.kind === 234 /* ImportEqualsDeclaration */) {
+ if (decl.kind === 238 /* ImportClause */ || decl.kind === 241 /* ImportSpecifier */ || decl.kind === 236 /* ImportEqualsDeclaration */) {
var importer = checker.getSymbolAtLocation(decl.name);
var imported = checker.getAliasedSymbol(importer);
return importer.name !== imported.name;
@@ -71277,7 +77115,7 @@ var ts;
if (text !== undefined) {
containers.unshift(text);
}
- else if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ else if (declaration.name.kind === 143 /* ComputedPropertyName */) {
return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true);
}
else {
@@ -71298,7 +77136,7 @@ var ts;
}
return true;
}
- if (expression.kind === 177 /* PropertyAccessExpression */) {
+ if (expression.kind === 178 /* PropertyAccessExpression */) {
var propertyAccess = expression;
if (includeLastPortion) {
containers.unshift(propertyAccess.name.text);
@@ -71311,7 +77149,7 @@ var ts;
var containers = [];
// First, if we started with a computed property name, then add all but the last
// portion into the container array.
- if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ if (declaration.name.kind === 143 /* ComputedPropertyName */) {
if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) {
return undefined;
}
@@ -71357,7 +77195,7 @@ var ts;
matchKind: ts.PatternMatchKind[rawItem.matchKind],
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
- textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()),
+ textSpan: ts.createTextSpanFromNode(declaration),
// TODO(jfreeman): What should be the containerName when the container has a computed name?
containerName: container && container.name ? container.name.text : "",
containerKind: container && container.name ? ts.getNodeKind(container) : ""
@@ -71373,22 +77211,61 @@ var ts;
(function (ts) {
var NavigationBar;
(function (NavigationBar) {
- function getNavigationBarItems(sourceFile) {
+ /**
+ * Matches all whitespace characters in a string. Eg:
+ *
+ * "app.
+ *
+ * onactivated"
+ *
+ * matches because of the newline, whereas
+ *
+ * "app.onactivated"
+ *
+ * does not match.
+ */
+ var whiteSpaceRegex = /\s+/g;
+ // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`.
+ var curCancellationToken;
+ var curSourceFile;
+ /**
+ * For performance, we keep navigation bar parents on a stack rather than passing them through each recursion.
+ * `parent` is the current parent and is *not* stored in parentsStack.
+ * `startNode` sets a new parent and `endNode` returns to the previous parent.
+ */
+ var parentsStack = [];
+ var parent;
+ // NavigationBarItem requires an array, but will not mutate it, so just give it this for performance.
+ var emptyChildItemArray = [];
+ function getNavigationBarItems(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
- curSourceFile = undefined;
- return result;
+ try {
+ return ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationBarItems = getNavigationBarItems;
- function getNavigationTree(sourceFile) {
+ function getNavigationTree(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = convertToTree(rootNavigationBarNode(sourceFile));
- curSourceFile = undefined;
- return result;
+ try {
+ return convertToTree(rootNavigationBarNode(sourceFile));
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationTree = getNavigationTree;
- // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`.
- var curSourceFile;
+ function reset() {
+ curSourceFile = undefined;
+ curCancellationToken = undefined;
+ parentsStack = [];
+ parent = undefined;
+ emptyChildItemArray = [];
+ }
function nodeText(node) {
return node.getText(curSourceFile);
}
@@ -71403,13 +77280,6 @@ var ts;
parent.children = [child];
}
}
- /*
- For performance, we keep navigation bar parents on a stack rather than passing them through each recursion.
- `parent` is the current parent and is *not* stored in parentsStack.
- `startNode` sets a new parent and `endNode` returns to the previous parent.
- */
- var parentsStack = [];
- var parent;
function rootNavigationBarNode(sourceFile) {
ts.Debug.assert(!parentsStack.length);
var root = { node: sourceFile, additionalNodes: undefined, parent: undefined, children: undefined, indent: 0 };
@@ -71460,11 +77330,12 @@ var ts;
}
/** Look for navigation bar items in node's subtree, adding them to the current `parent`. */
function addChildrenRecursively(node) {
+ curCancellationToken.throwIfCancellationRequested();
if (!node || ts.isToken(node)) {
return;
}
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// Get parameter properties, and treat them as being on the *same* level as the constructor, not under it.
var ctr = node;
addNodeWithRecursiveChild(ctr, ctr.body);
@@ -71476,21 +77347,21 @@ var ts;
}
}
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 149 /* MethodSignature */:
if (!ts.hasDynamicName(node)) {
addNodeWithRecursiveChild(node, node.body);
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
if (!ts.hasDynamicName(node)) {
addLeafNode(node);
}
break;
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
var importClause = node;
// Handle default import case e.g.:
// import d from "mod";
@@ -71502,7 +77373,7 @@ var ts;
// import {a, b as B} from "mod";
var namedBindings = importClause.namedBindings;
if (namedBindings) {
- if (namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings.kind === 239 /* NamespaceImport */) {
addLeafNode(namedBindings);
}
else {
@@ -71513,12 +77384,12 @@ var ts;
}
}
break;
- case 174 /* BindingElement */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
var decl = node;
- var name_47 = decl.name;
- if (ts.isBindingPattern(name_47)) {
- addChildrenRecursively(name_47);
+ var name = decl.name;
+ if (ts.isBindingPattern(name)) {
+ addChildrenRecursively(name);
}
else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) {
// For `const x = function() {}`, just use the function node, not the const.
@@ -71528,12 +77399,12 @@ var ts;
addNodeWithRecursiveChild(decl, decl.initializer);
}
break;
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
addNodeWithRecursiveChild(node, node.body);
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
startNode(node);
for (var _d = 0, _e = node.members; _d < _e.length; _d++) {
var member = _e[_d];
@@ -71543,9 +77414,9 @@ var ts;
}
endNode();
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
startNode(node);
for (var _f = 0, _g = node.members; _f < _g.length; _f++) {
var member = _g[_f];
@@ -71553,21 +77424,21 @@ var ts;
}
endNode();
break;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
addNodeWithRecursiveChild(node, getInteriorModule(node).body);
break;
- case 243 /* ExportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 155 /* IndexSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 228 /* TypeAliasDeclaration */:
+ case 245 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 156 /* IndexSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 230 /* TypeAliasDeclaration */:
addLeafNode(node);
break;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 285 /* JSDocTypedefTag */) {
+ if (tag.kind === 289 /* JSDocTypedefTag */) {
addLeafNode(tag);
}
});
@@ -71585,9 +77456,9 @@ var ts;
// Anonymous items are never merged.
return true;
}
- var itemsWithSameName = nameToItems[name];
+ var itemsWithSameName = nameToItems.get(name);
if (!itemsWithSameName) {
- nameToItems[name] = child;
+ nameToItems.set(name, child);
return true;
}
if (itemsWithSameName instanceof Array) {
@@ -71605,7 +77476,7 @@ var ts;
if (tryMerge(itemWithSameName, child)) {
return false;
}
- nameToItems[name] = [itemWithSameName, child];
+ nameToItems.set(name, [itemWithSameName, child]);
return true;
}
function tryMerge(a, b) {
@@ -71618,14 +77489,14 @@ var ts;
});
/** a and b have the same name, but they may not be mergeable. */
function shouldReallyMerge(a, b) {
- return a.kind === b.kind && (a.kind !== 230 /* ModuleDeclaration */ || areSameModule(a, b));
+ return a.kind === b.kind && (a.kind !== 232 /* ModuleDeclaration */ || areSameModule(a, b));
// We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes.
// Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'!
function areSameModule(a, b) {
if (a.body.kind !== b.body.kind) {
return false;
}
- if (a.body.kind !== 230 /* ModuleDeclaration */) {
+ if (a.body.kind !== 232 /* ModuleDeclaration */) {
return true;
}
return areSameModule(a.body, b.body);
@@ -71653,39 +77524,20 @@ var ts;
function compareChildren(child1, child2) {
var name1 = tryGetName(child1.node), name2 = tryGetName(child2.node);
if (name1 && name2) {
- var cmp = localeCompareFix(name1, name2);
+ var cmp = ts.compareStringsCaseInsensitive(name1, name2);
return cmp !== 0 ? cmp : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
else {
return name1 ? 1 : name2 ? -1 : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
}
- // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B".
- var localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
- var localeCompareFix = localeCompareIsCorrect ? ts.collator.compare : function (a, b) {
- // This isn't perfect, but it passes all of our tests.
- for (var i = 0; i < Math.min(a.length, b.length); i++) {
- var chA = a.charAt(i), chB = b.charAt(i);
- if (chA === "\"" && chB === "'") {
- return 1;
- }
- if (chA === "'" && chB === "\"") {
- return -1;
- }
- var cmp = ts.compareStrings(chA.toLocaleLowerCase(), chB.toLocaleLowerCase());
- if (cmp !== 0) {
- return cmp;
- }
- }
- return a.length - b.length;
- };
/**
* This differs from getItemName because this is just used for sorting.
* We only sort nodes by name that have a more-or-less "direct" name, as opposed to `new()` and the like.
* So `new()` can still come before an `aardvark` method.
*/
function tryGetName(node) {
- if (node.kind === 230 /* ModuleDeclaration */) {
+ if (node.kind === 232 /* ModuleDeclaration */) {
return getModuleName(node);
}
var decl = node;
@@ -71693,18 +77545,18 @@ var ts;
return ts.getPropertyNameForPropertyNameNode(decl.name);
}
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 197 /* ClassExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 198 /* ClassExpression */:
return getFunctionOrClassName(node);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return undefined;
}
}
function getItemName(node) {
- if (node.kind === 230 /* ModuleDeclaration */) {
+ if (node.kind === 232 /* ModuleDeclaration */) {
return getModuleName(node);
}
var name = node.name;
@@ -71715,16 +77567,16 @@ var ts;
}
}
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
var sourceFile = node;
return ts.isExternalModule(sourceFile)
? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\""
: "<global>";
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
if (ts.getModifierFlags(node) & 512 /* Default */) {
return "default";
}
@@ -71732,15 +77584,15 @@ var ts;
// (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the
// navigation bar.
return getFunctionOrClassName(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return "constructor";
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
return "new()";
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
return "()";
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return "[]";
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -71752,7 +77604,7 @@ var ts;
}
else {
var parentNode = node.parent && node.parent.parent;
- if (parentNode && parentNode.kind === 205 /* VariableStatement */) {
+ if (parentNode && parentNode.kind === 207 /* VariableStatement */) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70 /* Identifier */) {
@@ -71781,24 +77633,24 @@ var ts;
return topLevel;
function isTopLevel(item) {
switch (navigationBarNodeKind(item)) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 229 /* EnumDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 261 /* SourceFile */:
- case 228 /* TypeAliasDeclaration */:
- case 285 /* JSDocTypedefTag */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 231 /* EnumDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 230 /* TypeAliasDeclaration */:
+ case 289 /* JSDocTypedefTag */:
return true;
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 223 /* VariableDeclaration */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 225 /* VariableDeclaration */:
return hasSomeImportantChild(item);
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return isTopLevelFunctionDeclaration(item);
default:
return false;
@@ -71808,10 +77660,10 @@ var ts;
return false;
}
switch (navigationBarNodeKind(item.parent)) {
- case 231 /* ModuleBlock */:
- case 261 /* SourceFile */:
- case 149 /* MethodDeclaration */:
- case 150 /* Constructor */:
+ case 233 /* ModuleBlock */:
+ case 264 /* SourceFile */:
+ case 150 /* MethodDeclaration */:
+ case 151 /* Constructor */:
return true;
default:
return hasSomeImportantChild(item);
@@ -71820,18 +77672,16 @@ var ts;
function hasSomeImportantChild(item) {
return ts.forEach(item.children, function (child) {
var childKind = navigationBarNodeKind(child);
- return childKind !== 223 /* VariableDeclaration */ && childKind !== 174 /* BindingElement */;
+ return childKind !== 225 /* VariableDeclaration */ && childKind !== 175 /* BindingElement */;
});
}
}
}
- // NavigationBarItem requires an array, but will not mutate it, so just give it this for performance.
- var emptyChildItemArray = [];
function convertToTree(n) {
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToTree)
};
@@ -71840,7 +77690,7 @@ var ts;
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToChildItem) || emptyChildItemArray,
indent: n.indent,
@@ -71878,7 +77728,7 @@ var ts;
// Otherwise, we need to aggregate each identifier to build up the qualified name.
var result = [];
result.push(moduleDeclaration.name.text);
- while (moduleDeclaration.body && moduleDeclaration.body.kind === 230 /* ModuleDeclaration */) {
+ while (moduleDeclaration.body && moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) {
moduleDeclaration = moduleDeclaration.body;
result.push(moduleDeclaration.name.text);
}
@@ -71889,28 +77739,34 @@ var ts;
* We store 'A' as associated with a NavNode, and use getModuleName to traverse down again.
*/
function getInteriorModule(decl) {
- return decl.body.kind === 230 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl;
+ return decl.body.kind === 232 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl;
}
function isComputedProperty(member) {
- return !member.name || member.name.kind === 142 /* ComputedPropertyName */;
+ return !member.name || member.name.kind === 143 /* ComputedPropertyName */;
}
function getNodeSpan(node) {
- return node.kind === 261 /* SourceFile */
+ return node.kind === 264 /* SourceFile */
? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd())
- : ts.createTextSpanFromBounds(node.getStart(curSourceFile), node.getEnd());
+ : ts.createTextSpanFromNode(node, curSourceFile);
+ }
+ function getModifiers(node) {
+ if (node.parent && node.parent.kind === 225 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ return ts.getNodeModifiers(node);
}
function getFunctionOrClassName(node) {
if (node.name && ts.getFullWidth(node.name) > 0) {
return ts.declarationNameToString(node.name);
}
- else if (node.parent.kind === 223 /* VariableDeclaration */) {
+ else if (node.parent.kind === 225 /* VariableDeclaration */) {
return ts.declarationNameToString(node.parent.name);
}
- else if (node.parent.kind === 192 /* BinaryExpression */ &&
+ else if (node.parent.kind === 193 /* BinaryExpression */ &&
node.parent.operatorToken.kind === 57 /* EqualsToken */) {
return nodeText(node.parent.left).replace(whiteSpaceRegex, "");
}
- else if (node.parent.kind === 257 /* PropertyAssignment */ && node.parent.name) {
+ else if (node.parent.kind === 260 /* PropertyAssignment */ && node.parent.name) {
return nodeText(node.parent.name);
}
else if (ts.getModifierFlags(node) & 512 /* Default */) {
@@ -71921,22 +77777,8 @@ var ts;
}
}
function isFunctionOrClassExpression(node) {
- return node.kind === 184 /* FunctionExpression */ || node.kind === 185 /* ArrowFunction */ || node.kind === 197 /* ClassExpression */;
+ return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */ || node.kind === 198 /* ClassExpression */;
}
- /**
- * Matches all whitespace characters in a string. Eg:
- *
- * "app.
- *
- * onactivated"
- *
- * matches because of the newline, whereas
- *
- * "app.onactivated"
- *
- * does not match.
- */
- var whiteSpaceRegex = /\s+/g;
})(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {}));
})(ts || (ts = {}));
/* @internal */
@@ -71944,29 +77786,29 @@ var ts;
(function (ts) {
var OutliningElementsCollector;
(function (OutliningElementsCollector) {
- function collectElements(sourceFile) {
+ function collectElements(sourceFile, cancellationToken) {
var elements = [];
var collapseText = "...";
function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) {
if (hintSpanNode && startElement && endElement) {
- var span_12 = {
+ var span_13 = {
textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end),
- hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
+ hintSpan: ts.createTextSpanFromNode(hintSpanNode, sourceFile),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_12);
+ elements.push(span_13);
}
}
function addOutliningSpanComments(commentSpan, autoCollapse) {
if (commentSpan) {
- var span_13 = {
+ var span_14 = {
textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_13);
+ elements.push(span_14);
}
}
function addOutliningForLeadingCommentsForNode(n) {
@@ -71978,6 +77820,7 @@ var ts;
var singleLineCommentCount = 0;
for (var _i = 0, comments_4 = comments; _i < comments_4.length; _i++) {
var currentComment = comments_4[_i];
+ cancellationToken.throwIfCancellationRequested();
// For single line comments, combine consecutive ones (2 or more) into
// a single span from the start of the first till the end of the last
if (currentComment.kind === 2 /* SingleLineCommentTrivia */) {
@@ -72003,19 +77846,20 @@ var ts;
// Only outline spans of two or more consecutive single line comments
if (count > 1) {
var multipleSingleLineComments = {
+ kind: 2 /* SingleLineCommentTrivia */,
pos: start,
end: end,
- kind: 2 /* SingleLineCommentTrivia */
};
addOutliningSpanComments(multipleSingleLineComments, /*autoCollapse*/ false);
}
}
function autoCollapse(node) {
- return ts.isFunctionBlock(node) && node.parent.kind !== 185 /* ArrowFunction */;
+ return ts.isFunctionBlock(node) && node.parent.kind !== 186 /* ArrowFunction */;
}
var depth = 0;
var maxDepth = 20;
function walk(n) {
+ cancellationToken.throwIfCancellationRequested();
if (depth > maxDepth) {
return;
}
@@ -72023,30 +77867,30 @@ var ts;
addOutliningForLeadingCommentsForNode(n);
}
switch (n.kind) {
- case 204 /* Block */:
+ case 206 /* Block */:
if (!ts.isFunctionBlock(n)) {
- var parent_19 = n.parent;
+ var parent = n.parent;
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
// Check if the block is standalone, or 'attached' to some parent statement.
// If the latter, we want to collapse the block, but consider its hint span
// to be the entire span of the parent.
- if (parent_19.kind === 209 /* DoStatement */ ||
- parent_19.kind === 212 /* ForInStatement */ ||
- parent_19.kind === 213 /* ForOfStatement */ ||
- parent_19.kind === 211 /* ForStatement */ ||
- parent_19.kind === 208 /* IfStatement */ ||
- parent_19.kind === 210 /* WhileStatement */ ||
- parent_19.kind === 217 /* WithStatement */ ||
- parent_19.kind === 256 /* CatchClause */) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ if (parent.kind === 211 /* DoStatement */ ||
+ parent.kind === 214 /* ForInStatement */ ||
+ parent.kind === 215 /* ForOfStatement */ ||
+ parent.kind === 213 /* ForStatement */ ||
+ parent.kind === 210 /* IfStatement */ ||
+ parent.kind === 212 /* WhileStatement */ ||
+ parent.kind === 219 /* WithStatement */ ||
+ parent.kind === 259 /* CatchClause */) {
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- if (parent_19.kind === 221 /* TryStatement */) {
+ if (parent.kind === 223 /* TryStatement */) {
// Could be the try-block, or the finally-block.
- var tryStatement = parent_19;
+ var tryStatement = parent;
if (tryStatement.tryBlock === n) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
else if (tryStatement.finallyBlock === n) {
@@ -72056,36 +77900,37 @@ var ts;
break;
}
}
+ // fall through.
}
// Block was a standalone block. In this case we want to only collapse
// the span of the block, independent of any parent span.
- var span_14 = ts.createTextSpanFromBounds(n.getStart(), n.end);
+ var span_15 = ts.createTextSpanFromNode(n);
elements.push({
- textSpan: span_14,
- hintSpan: span_14,
+ textSpan: span_15,
+ hintSpan: span_15,
bannerText: collapseText,
autoCollapse: autoCollapse(n)
});
break;
}
- // Fallthrough.
- case 231 /* ModuleBlock */: {
+ // falls through
+ case 233 /* ModuleBlock */: {
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 232 /* CaseBlock */: {
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 234 /* CaseBlock */: {
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
var openBracket = ts.findChildOfKind(n, 20 /* OpenBracketToken */, sourceFile);
var closeBracket = ts.findChildOfKind(n, 21 /* CloseBracketToken */, sourceFile);
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
@@ -72181,10 +78026,11 @@ var ts;
return totalMatch;
}
function getWordSpans(word) {
- if (!(word in stringToWordSpans)) {
- stringToWordSpans[word] = breakIntoWordSpans(word);
+ var spans = stringToWordSpans.get(word);
+ if (!spans) {
+ stringToWordSpans.set(word, spans = breakIntoWordSpans(word));
}
- return stringToWordSpans[word];
+ return spans;
}
function matchTextChunk(candidate, chunk, punctuationStripped) {
var index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
@@ -72212,10 +78058,10 @@ var ts;
// But we would match 'FooAttribute' (since 'Attribute' starts with 'a').
var wordSpans = getWordSpans(candidate);
for (var _i = 0, wordSpans_1 = wordSpans; _i < wordSpans_1.length; _i++) {
- var span_15 = wordSpans_1[_i];
- if (partStartsWith(candidate, span_15, chunk.text, /*ignoreCase:*/ true)) {
+ var span_16 = wordSpans_1[_i];
+ if (partStartsWith(candidate, span_16, chunk.text, /*ignoreCase:*/ true)) {
return createPatternMatch(PatternMatchKind.substring, punctuationStripped,
- /*isCaseSensitive:*/ partStartsWith(candidate, span_15, chunk.text, /*ignoreCase:*/ false));
+ /*isCaseSensitive:*/ partStartsWith(candidate, span_16, chunk.text, /*ignoreCase:*/ false));
}
}
}
@@ -72465,7 +78311,8 @@ var ts;
}
// Assumes 'value' is already lowercase.
function indexOfIgnoringCase(string, value) {
- for (var i = 0, n = string.length - value.length; i <= n; i++) {
+ var n = string.length - value.length;
+ for (var i = 0; i <= n; i++) {
if (startsWithIgnoringCase(string, value, i)) {
return i;
}
@@ -72474,7 +78321,7 @@ var ts;
}
// Assumes 'value' is already lowercase.
function startsWithIgnoringCase(string, value, start) {
- for (var i = 0, n = value.length; i < n; i++) {
+ for (var i = 0; i < value.length; i++) {
var ch1 = toLowerCase(string.charCodeAt(i + start));
var ch2 = value.charCodeAt(i);
if (ch1 !== ch2) {
@@ -72546,7 +78393,7 @@ var ts;
function breakIntoSpans(identifier, word) {
var result = [];
var wordStart = 0;
- for (var i = 1, n = identifier.length; i < n; i++) {
+ for (var i = 1; i < identifier.length; i++) {
var lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
var currentIsDigit = isDigit(identifier.charCodeAt(i));
var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
@@ -72758,7 +78605,7 @@ var ts;
else {
if (token === 70 /* Identifier */ || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import d from "mod";
@@ -72789,7 +78636,7 @@ var ts;
}
if (token === 17 /* CloseBraceToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import {a as A} from "mod";
@@ -72805,7 +78652,7 @@ var ts;
token = nextToken();
if (token === 70 /* Identifier */ || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import * as NS from "mod"
@@ -72835,7 +78682,7 @@ var ts;
}
if (token === 17 /* CloseBraceToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// export {a as A} from "mod";
@@ -72847,7 +78694,7 @@ var ts;
}
else if (token === 38 /* AsteriskToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// export * from "mod"
@@ -72999,93 +78846,89 @@ var ts;
var Rename;
(function (Rename) {
function getRenameInfo(typeChecker, defaultLibFileName, getCanonicalFileName, sourceFile, position) {
- var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName));
+ var getCanonicalDefaultLibName = ts.memoize(function () { return getCanonicalFileName(ts.normalizePath(defaultLibFileName)); });
var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true);
- if (node) {
- if (node.kind === 70 /* Identifier */ ||
- node.kind === 9 /* StringLiteral */ ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- ts.isThis(node)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- // Only allow a symbol to be renamed if it actually has at least one declaration.
- if (symbol) {
- var declarations = symbol.getDeclarations();
- if (declarations && declarations.length > 0) {
- // Disallow rename for elements that are defined in the standard TypeScript library.
- if (ts.forEach(declarations, isDefinedInLibraryFile)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
- if (kind) {
- return {
- canRename: true,
- kind: kind,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: typeChecker.getFullyQualifiedName(symbol),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
- else if (node.kind === 9 /* StringLiteral */) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (type) {
- if (isDefinedInLibraryFile(node)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- else {
- var displayName = ts.stripQuotes(type.text);
- return {
- canRename: true,
- kind: ts.ScriptElementKind.variableElement,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: displayName,
- kindModifiers: ts.ScriptElementKindModifier.none,
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
+ var renameInfo = node && nodeIsEligibleForRename(node)
+ ? getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile)
+ : undefined;
+ return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element);
+ function isDefinedInLibraryFile(declaration) {
+ if (!defaultLibFileName) {
+ return false;
}
+ var sourceFile = declaration.getSourceFile();
+ var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile.fileName));
+ return canonicalName === getCanonicalDefaultLibName();
}
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element));
- function getRenameInfoError(localizedErrorMessage) {
- return {
- canRename: false,
- localizedErrorMessage: localizedErrorMessage,
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- };
- }
- function isDefinedInLibraryFile(declaration) {
- if (defaultLibFileName) {
- var sourceFile_1 = declaration.getSourceFile();
- var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_1.fileName));
- if (canonicalName === canonicalDefaultLibName) {
- return true;
+ }
+ Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ // Only allow a symbol to be renamed if it actually has at least one declaration.
+ if (symbol) {
+ var declarations = symbol.getDeclarations();
+ if (declarations && declarations.length > 0) {
+ // Disallow rename for elements that are defined in the standard TypeScript library.
+ if (ts.some(declarations, isDefinedInLibraryFile)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
+ }
+ // Cannot rename `default` as in `import { default as foo } from "./someModule";
+ if (node.kind === 70 /* Identifier */ &&
+ node.originalKeywordKind === 78 /* DefaultKeyword */ &&
+ symbol.parent.flags & 1536 /* Module */) {
+ return undefined;
}
+ var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
+ var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
+ return kind ? getRenameInfoSuccess(displayName, typeChecker.getFullyQualifiedName(symbol), kind, ts.SymbolDisplay.getSymbolModifiers(symbol), node, sourceFile) : undefined;
}
- return false;
}
- function createTriggerSpanForNode(node, sourceFile) {
- var start = node.getStart(sourceFile);
- var width = node.getWidth(sourceFile);
- if (node.kind === 9 /* StringLiteral */) {
- // Exclude the quotes
- start += 1;
- width -= 2;
+ else if (node.kind === 9 /* StringLiteral */) {
+ if (isDefinedInLibraryFile(node)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
- return ts.createTextSpan(start, width);
+ var displayName = ts.stripQuotes(node.text);
+ return getRenameInfoSuccess(displayName, displayName, ts.ScriptElementKind.variableElement, ts.ScriptElementKindModifier.none, node, sourceFile);
}
}
- Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) {
+ return {
+ canRename: true,
+ kind: kind,
+ displayName: displayName,
+ localizedErrorMessage: undefined,
+ fullDisplayName: fullDisplayName,
+ kindModifiers: kindModifiers,
+ triggerSpan: createTriggerSpanForNode(node, sourceFile)
+ };
+ }
+ function getRenameInfoError(diagnostic) {
+ return {
+ canRename: false,
+ localizedErrorMessage: ts.getLocaleSpecificMessage(diagnostic),
+ displayName: undefined,
+ fullDisplayName: undefined,
+ kind: undefined,
+ kindModifiers: undefined,
+ triggerSpan: undefined
+ };
+ }
+ function createTriggerSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var width = node.getWidth(sourceFile);
+ if (node.kind === 9 /* StringLiteral */) {
+ // Exclude the quotes
+ start += 1;
+ width -= 2;
+ }
+ return ts.createTextSpan(start, width);
+ }
+ function nodeIsEligibleForRename(node) {
+ return node.kind === 70 /* Identifier */ ||
+ node.kind === 9 /* StringLiteral */ ||
+ ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
+ ts.isThis(node);
+ }
})(Rename = ts.Rename || (ts.Rename = {}));
})(ts || (ts = {}));
///<reference path='services.ts' />
@@ -73140,7 +78983,7 @@ var ts;
// stack++;
// break;
// case TypeScript.SyntaxKind.CommaToken:
- // if (stack == 0) {
+ // if (stack === 0) {
// argumentIndex++;
// }
// break;
@@ -73232,6 +79075,7 @@ var ts;
ArgumentListKind[ArgumentListKind["TypeArguments"] = 0] = "TypeArguments";
ArgumentListKind[ArgumentListKind["CallArguments"] = 1] = "CallArguments";
ArgumentListKind[ArgumentListKind["TaggedTemplateArguments"] = 2] = "TaggedTemplateArguments";
+ ArgumentListKind[ArgumentListKind["JSXAttributesArguments"] = 3] = "JSXAttributesArguments";
})(ArgumentListKind = SignatureHelp.ArgumentListKind || (SignatureHelp.ArgumentListKind = {}));
function getSignatureHelpItems(program, sourceFile, position, cancellationToken) {
var typeChecker = program.getTypeChecker();
@@ -73263,7 +79107,7 @@ var ts;
}
SignatureHelp.getSignatureHelpItems = getSignatureHelpItems;
function createJavaScriptSignatureHelpItems(argumentInfo, program) {
- if (argumentInfo.invocation.kind !== 179 /* CallExpression */) {
+ if (argumentInfo.invocation.kind !== 180 /* CallExpression */) {
return undefined;
}
// See if we can find some symbol with the call expression name that has call signatures.
@@ -73271,7 +79115,7 @@ var ts;
var expression = callExpression.expression;
var name = expression.kind === 70 /* Identifier */
? expression
- : expression.kind === 177 /* PropertyAccessExpression */
+ : expression.kind === 178 /* PropertyAccessExpression */
? expression.name
: undefined;
if (!name || !name.text) {
@@ -73281,10 +79125,10 @@ var ts;
for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) {
var sourceFile = _a[_i];
var nameToDeclarations = sourceFile.getNamedDeclarations();
- var declarations = nameToDeclarations[name.text];
+ var declarations = nameToDeclarations.get(name.text);
if (declarations) {
- for (var _b = 0, declarations_10 = declarations; _b < declarations_10.length; _b++) {
- var declaration = declarations_10[_b];
+ for (var _b = 0, declarations_13 = declarations; _b < declarations_13.length; _b++) {
+ var declaration = declarations_13[_b];
var symbol = declaration.symbol;
if (symbol) {
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
@@ -73304,21 +79148,21 @@ var ts;
* in the argument of an invocation; returns undefined otherwise.
*/
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 179 /* CallExpression */ || node.parent.kind === 180 /* NewExpression */) {
+ if (node.parent.kind === 180 /* CallExpression */ || node.parent.kind === 181 /* NewExpression */) {
var callExpression = node.parent;
// There are 3 cases to handle:
- // 1. The token introduces a list, and should begin a sig help session
+ // 1. The token introduces a list, and should begin a signature help session
// 2. The token is either not associated with a list, or ends a list, so the session should end
- // 3. The token is buried inside a list, and should give sig help
+ // 3. The token is buried inside a list, and should give signature help
//
// The following are examples of each:
//
// Case 1:
- // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a sig help session
+ // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a signature help session
// Case 2:
// fo#o<T, U>#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end
// Case 3:
- // foo<T#, U#>(a#, #b#) -> The token is buried inside a list, and should give sig help
+ // foo<T#, U#>(a#, #b#) -> The token is buried inside a list, and should give signature help
// Find out if 'node' is an argument, a type argument, or neither
if (node.kind === 26 /* LessThanToken */ ||
node.kind === 18 /* OpenParenToken */) {
@@ -73337,7 +79181,7 @@ var ts;
}
// findListItemInfo can return undefined if we are not in parent's argument list
// or type argument list. This includes cases where the cursor is:
- // - To the right of the closing paren, non-substitution template, or template tail.
+ // - To the right of the closing parenthesis, non-substitution template, or template tail.
// - Between the type arguments and the arguments (greater than token)
// - On the target of the call (parent.func)
// - On the 'new' keyword in a 'new' expression
@@ -73358,25 +79202,25 @@ var ts;
}
return undefined;
}
- else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 182 /* TaggedTemplateExpression */) {
// Check if we're actually inside the template;
// otherwise we'll fall out and return undefined.
if (ts.isInsideTemplateLiteral(node, position)) {
return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0, sourceFile);
}
}
- else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 182 /* TaggedTemplateExpression */) {
var templateExpression = node.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194 /* TemplateExpression */);
+ ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */);
var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1;
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
- else if (node.parent.kind === 202 /* TemplateSpan */ && node.parent.parent.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.parent.kind === 204 /* TemplateSpan */ && node.parent.parent.parent.kind === 182 /* TaggedTemplateExpression */) {
var templateSpan = node.parent;
var templateExpression = templateSpan.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194 /* TemplateExpression */);
+ ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */);
// If we're just after a template tail, don't show signature help.
if (node.kind === 15 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) {
return undefined;
@@ -73385,8 +79229,25 @@ var ts;
var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position);
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
+ else if (node.parent && ts.isJsxOpeningLikeElement(node.parent)) {
+ // Provide a signature help for JSX opening element or JSX self-closing element.
+ // This is not guarantee that JSX tag-name is resolved into stateless function component. (that is done in "getSignatureHelpItems")
+ // i.e
+ // export function MainButton(props: ButtonProps, context: any): JSX.Element { ... }
+ // <MainButton /*signatureHelp*/
+ var attributeSpanStart = node.parent.attributes.getFullStart();
+ var attributeSpanEnd = ts.skipTrivia(sourceFile.text, node.parent.attributes.getEnd(), /*stopAfterLineBreak*/ false);
+ return {
+ kind: 3 /* JSXAttributesArguments */,
+ invocation: node.parent,
+ argumentsSpan: ts.createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),
+ argumentIndex: 0,
+ argumentCount: 1
+ };
+ }
return undefined;
}
+ SignatureHelp.getImmediatelyContainingArgumentInfo = getImmediatelyContainingArgumentInfo;
function getArgumentIndex(argumentsList, node) {
// The list we got back can include commas. In the presence of errors it may
// also just have nodes without commas. For example "Foo(a b c)" will have 3
@@ -73422,7 +79283,7 @@ var ts;
//
// Note: this subtlety only applies to the last comma. If you had "Foo(a,," then
// we'll have: 'a' '<comma>' '<missing>'
- // That will give us 2 non-commas. We then add one for the last comma, givin us an
+ // That will give us 2 non-commas. We then add one for the last comma, giving us an
// arg count of 3.
var listChildren = argumentsList.getChildren();
var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25 /* CommaToken */; });
@@ -73494,7 +79355,7 @@ var ts;
//
// This is because a Missing node has no width. However, what we actually want is to include trivia
// leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail.
- if (template.kind === 194 /* TemplateExpression */) {
+ if (template.kind === 195 /* TemplateExpression */) {
var lastSpan = ts.lastOrUndefined(template.templateSpans);
if (lastSpan.literal.getFullWidth() === 0) {
applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false);
@@ -73503,7 +79364,7 @@ var ts;
return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);
}
function getContainingArgumentInfo(node, position, sourceFile) {
- for (var n = node; n.kind !== 261 /* SourceFile */; n = n.parent) {
+ for (var n = node; n.kind !== 264 /* SourceFile */; n = n.parent) {
if (ts.isFunctionBlock(n)) {
return undefined;
}
@@ -73516,6 +79377,7 @@ var ts;
if (argumentInfo) {
return argumentInfo;
}
+ // TODO: Handle generic call with incomplete syntax
}
return undefined;
}
@@ -73596,7 +79458,8 @@ var ts;
suffixDisplayParts: suffixDisplayParts,
separatorDisplayParts: [ts.punctuationPart(25 /* CommaToken */), ts.spacePart()],
parameters: signatureHelpParameters,
- documentation: candidateSignature.getDocumentationComment()
+ documentation: candidateSignature.getDocumentationComment(),
+ tags: candidateSignature.getJsDocTags()
};
});
var argumentIndex = argumentListInfo.argumentIndex;
@@ -73646,9 +79509,9 @@ var ts;
(function (SymbolDisplay) {
// TODO(drosen): use contextual SemanticMeaning.
function getSymbolKind(typeChecker, symbol, location) {
- var flags = symbol.getFlags();
+ var flags = symbol.flags;
if (flags & 32 /* Class */)
- return ts.getDeclarationOfKind(symbol, 197 /* ClassExpression */) ?
+ return ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
if (flags & 384 /* Enum */)
return ts.ScriptElementKind.enumElement;
@@ -73658,12 +79521,12 @@ var ts;
return ts.ScriptElementKind.interfaceElement;
if (flags & 262144 /* TypeParameter */)
return ts.ScriptElementKind.typeParameterElement;
- var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location);
+ var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
if (result === ts.ScriptElementKind.unknown) {
if (flags & 262144 /* TypeParameter */)
return ts.ScriptElementKind.typeParameterElement;
if (flags & 8 /* EnumMember */)
- return ts.ScriptElementKind.variableElement;
+ return ts.ScriptElementKind.enumMemberElement;
if (flags & 8388608 /* Alias */)
return ts.ScriptElementKind.alias;
if (flags & 1536 /* Module */)
@@ -73672,7 +79535,7 @@ var ts;
return result;
}
SymbolDisplay.getSymbolKind = getSymbolKind;
- function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location) {
+ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) {
if (typeChecker.isUndefinedSymbol(symbol)) {
return ts.ScriptElementKind.variableElement;
}
@@ -73682,6 +79545,7 @@ var ts;
if (location.kind === 98 /* ThisKeyword */ && ts.isExpression(location)) {
return ts.ScriptElementKind.parameterElement;
}
+ var flags = symbol.flags;
if (flags & 3 /* Variable */) {
if (ts.isFirstDeclarationOfSymbolParameter(symbol)) {
return ts.ScriptElementKind.parameterElement;
@@ -73705,7 +79569,7 @@ var ts;
if (flags & 16384 /* Constructor */)
return ts.ScriptElementKind.constructorImplementationElement;
if (flags & 4 /* Property */) {
- if (flags & 268435456 /* SyntheticProperty */) {
+ if (flags & 134217728 /* Transient */ && symbol.checkFlags & 6 /* Synthetic */) {
// If union property is result of union of non method (property/accessors/variables), it is labeled as property
var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
var rootSymbolFlags = rootSymbol.getFlags();
@@ -73725,6 +79589,9 @@ var ts;
}
return unionPropertyKind;
}
+ if (location.parent && ts.isJsxAttribute(location.parent)) {
+ return ts.ScriptElementKind.jsxAttribute;
+ }
return ts.ScriptElementKind.memberVariableElement;
}
return ts.ScriptElementKind.unknown;
@@ -73740,8 +79607,9 @@ var ts;
if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); }
var displayParts = [];
var documentation;
+ var tags;
var symbolFlags = symbol.flags;
- var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, symbolFlags, location);
+ var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
var hasAddedSymbolInfo;
var isThisExpression = location.kind === 98 /* ThisKeyword */ && ts.isExpression(location);
var type;
@@ -73754,7 +79622,7 @@ var ts;
var signature = void 0;
type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location);
if (type) {
- if (location.parent && location.parent.kind === 177 /* PropertyAccessExpression */) {
+ if (location.parent && location.parent.kind === 178 /* PropertyAccessExpression */) {
var right = location.parent.name;
// Either the location is on the right of a property access, or on the left and the right is missing
if (right === location || (right && right.getFullWidth() === 0)) {
@@ -73762,21 +79630,24 @@ var ts;
}
}
// try get the call/construct signature from the type if it matches
- var callExpression = void 0;
- if (location.kind === 179 /* CallExpression */ || location.kind === 180 /* NewExpression */) {
- callExpression = location;
+ var callExpressionLike = void 0;
+ if (location.kind === 180 /* CallExpression */ || location.kind === 181 /* NewExpression */) {
+ callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
- callExpression = location.parent;
+ callExpressionLike = location.parent;
+ }
+ else if (location.parent && ts.isJsxOpeningLikeElement(location.parent) && ts.isFunctionLike(symbol.valueDeclaration)) {
+ callExpressionLike = location.parent;
}
- if (callExpression) {
+ if (callExpressionLike) {
var candidateSignatures = [];
- signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures);
+ signature = typeChecker.getResolvedSignature(callExpressionLike, candidateSignatures);
if (!signature && candidateSignatures.length) {
// Use the first candidate:
signature = candidateSignatures[0];
}
- var useConstructSignatures = callExpression.kind === 180 /* NewExpression */ || callExpression.expression.kind === 96 /* SuperKeyword */;
+ var useConstructSignatures = callExpressionLike.kind === 181 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96 /* SuperKeyword */);
var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) {
// Get the first signature if there is one -- allSignatures may contain
@@ -73803,6 +79674,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
switch (symbolKind) {
+ case ts.ScriptElementKind.jsxAttribute:
case ts.ScriptElementKind.memberVariableElement:
case ts.ScriptElementKind.variableElement:
case ts.ScriptElementKind.constElement:
@@ -73829,24 +79701,24 @@ var ts;
}
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) ||
- (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 150 /* Constructor */)) {
+ (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 151 /* Constructor */)) {
// get the signature from the declaration and write it
var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 150 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ var allSignatures = functionDeclaration.kind === 151 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
}
else {
signature = allSignatures[0];
}
- if (functionDeclaration.kind === 150 /* Constructor */) {
+ if (functionDeclaration.kind === 151 /* Constructor */) {
// show (constructor) Type(...) signature
symbolKind = ts.ScriptElementKind.constructorImplementationElement;
addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
}
else {
// (function/method) symbol(..signature)
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 153 /* CallSignature */ &&
+ addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 /* CallSignature */ &&
!(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
}
addSignatureDisplayParts(signature, allSignatures);
@@ -73855,7 +79727,7 @@ var ts;
}
}
if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) {
- if (ts.getDeclarationOfKind(symbol, 197 /* ClassExpression */)) {
+ if (ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */)) {
// Special case for class expressions because we would like to indicate that
// the class name is local to the class body (similar to function expression)
// (local class) class <className>
@@ -73878,7 +79750,7 @@ var ts;
}
if (symbolFlags & 524288 /* TypeAlias */) {
addNewLineIfDisplayPartsExist();
- displayParts.push(ts.keywordPart(136 /* TypeKeyword */));
+ displayParts.push(ts.keywordPart(137 /* TypeKeyword */));
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
writeTypeParametersOfSymbol(symbol, sourceFile);
@@ -73899,7 +79771,7 @@ var ts;
}
if (symbolFlags & 1536 /* Module */) {
addNewLineIfDisplayPartsExist();
- var declaration = ts.getDeclarationOfKind(symbol, 230 /* ModuleDeclaration */);
+ var declaration = ts.getDeclarationOfKind(symbol, 232 /* ModuleDeclaration */);
var isNamespace = declaration && declaration.name && declaration.name.kind === 70 /* Identifier */;
displayParts.push(ts.keywordPart(isNamespace ? 128 /* NamespaceKeyword */ : 127 /* ModuleKeyword */));
displayParts.push(ts.spacePart());
@@ -73920,28 +79792,28 @@ var ts;
}
else {
// Method/function type parameter
- var declaration = ts.getDeclarationOfKind(symbol, 143 /* TypeParameter */);
+ var declaration = ts.getDeclarationOfKind(symbol, 144 /* TypeParameter */);
ts.Debug.assert(declaration !== undefined);
declaration = declaration.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
var signature = typeChecker.getSignatureFromDeclaration(declaration);
- if (declaration.kind === 154 /* ConstructSignature */) {
+ if (declaration.kind === 155 /* ConstructSignature */) {
displayParts.push(ts.keywordPart(93 /* NewKeyword */));
displayParts.push(ts.spacePart());
}
- else if (declaration.kind !== 153 /* CallSignature */ && declaration.name) {
+ else if (declaration.kind !== 154 /* CallSignature */ && declaration.name) {
addFullSymbolName(declaration.symbol);
}
ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */));
}
- else if (declaration.kind === 228 /* TypeAliasDeclaration */) {
+ else if (declaration.kind === 230 /* TypeAliasDeclaration */) {
// Type alias type parameter
// For example
// type list<T> = T[]; // Both T will go through same code path
addInPrefix();
- displayParts.push(ts.keywordPart(136 /* TypeKeyword */));
+ displayParts.push(ts.keywordPart(137 /* TypeKeyword */));
displayParts.push(ts.spacePart());
addFullSymbolName(declaration.symbol);
writeTypeParametersOfSymbol(declaration.symbol, sourceFile);
@@ -73950,9 +79822,10 @@ var ts;
}
}
if (symbolFlags & 8 /* EnumMember */) {
+ symbolKind = ts.ScriptElementKind.enumMemberElement;
addPrefixForAnyFunctionOrVar(symbol, "enum member");
var declaration = symbol.declarations[0];
- if (declaration.kind === 260 /* EnumMember */) {
+ if (declaration.kind === 263 /* EnumMember */) {
var constantValue = typeChecker.getConstantValue(declaration);
if (constantValue !== undefined) {
displayParts.push(ts.spacePart());
@@ -73964,7 +79837,7 @@ var ts;
}
if (symbolFlags & 8388608 /* Alias */) {
addNewLineIfDisplayPartsExist();
- if (symbol.declarations[0].kind === 233 /* NamespaceExportDeclaration */) {
+ if (symbol.declarations[0].kind === 235 /* NamespaceExportDeclaration */) {
displayParts.push(ts.keywordPart(83 /* ExportKeyword */));
displayParts.push(ts.spacePart());
displayParts.push(ts.keywordPart(128 /* NamespaceKeyword */));
@@ -73975,7 +79848,7 @@ var ts;
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 234 /* ImportEqualsDeclaration */) {
+ if (declaration.kind === 236 /* ImportEqualsDeclaration */) {
var importEqualsDeclaration = declaration;
if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) {
displayParts.push(ts.spacePart());
@@ -74011,6 +79884,7 @@ var ts;
}
// For properties, variables and local vars: show the type
if (symbolKind === ts.ScriptElementKind.memberVariableElement ||
+ symbolKind === ts.ScriptElementKind.jsxAttribute ||
symbolFlags & 3 /* Variable */ ||
symbolKind === ts.ScriptElementKind.localVariableElement ||
isThisExpression) {
@@ -74044,14 +79918,15 @@ var ts;
}
if (!documentation) {
documentation = symbol.getDocumentationComment();
+ tags = symbol.getJsDocTags();
if (documentation.length === 0 && symbol.flags & 4 /* Property */) {
- // For some special property access expressions like `experts.foo = foo` or `module.exports.foo = foo`
+ // For some special property access expressions like `exports.foo = foo` or `module.exports.foo = foo`
// there documentation comments might be attached to the right hand side symbol of their declarations.
// The pattern of such special property access is that the parent symbol is the symbol of the file.
- if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 261 /* SourceFile */; })) {
+ if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264 /* SourceFile */; })) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (!declaration.parent || declaration.parent.kind !== 192 /* BinaryExpression */) {
+ if (!declaration.parent || declaration.parent.kind !== 193 /* BinaryExpression */) {
continue;
}
var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right);
@@ -74059,6 +79934,7 @@ var ts;
continue;
}
documentation = rhsSymbol.getDocumentationComment();
+ tags = rhsSymbol.getJsDocTags();
if (documentation.length > 0) {
break;
}
@@ -74066,7 +79942,7 @@ var ts;
}
}
}
- return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind };
+ return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind, tags: tags };
function addNewLineIfDisplayPartsExist() {
if (displayParts.length) {
displayParts.push(ts.lineBreakPart());
@@ -74117,6 +79993,7 @@ var ts;
displayParts.push(ts.punctuationPart(19 /* CloseParenToken */));
}
documentation = signature.getDocumentationComment();
+ tags = signature.getJsDocTags();
}
function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) {
var typeParameterParts = ts.mapToDisplayParts(function (writer) {
@@ -74132,16 +80009,16 @@ var ts;
}
return ts.forEach(symbol.declarations, function (declaration) {
// Function expressions are local
- if (declaration.kind === 184 /* FunctionExpression */) {
+ if (declaration.kind === 185 /* FunctionExpression */) {
return true;
}
- if (declaration.kind !== 223 /* VariableDeclaration */ && declaration.kind !== 225 /* FunctionDeclaration */) {
+ if (declaration.kind !== 225 /* VariableDeclaration */ && declaration.kind !== 227 /* FunctionDeclaration */) {
return false;
}
// If the parent is not sourceFile or module block it is local variable
- for (var parent_20 = declaration.parent; !ts.isFunctionBlock(parent_20); parent_20 = parent_20.parent) {
+ for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) {
// Reached source file or module block
- if (parent_20.kind === 261 /* SourceFile */ || parent_20.kind === 231 /* ModuleBlock */) {
+ if (parent.kind === 264 /* SourceFile */ || parent.kind === 233 /* ModuleBlock */) {
return false;
}
}
@@ -74194,7 +80071,7 @@ var ts;
sourceFile.moduleName = transpileOptions.moduleName;
}
if (transpileOptions.renamedDependencies) {
- sourceFile.renamedDependencies = ts.createMap(transpileOptions.renamedDependencies);
+ sourceFile.renamedDependencies = ts.createMapFromTemplate(transpileOptions.renamedDependencies);
}
var newLine = ts.getNewLineCharacter(options);
// Output
@@ -74246,13 +80123,14 @@ var ts;
ts.transpile = transpile;
var commandLineOptionsStringToEnum;
/** JS users may pass in string values for enum compiler options (such as ModuleKind), so convert. */
+ /*@internal*/
function fixupCompilerOptions(options, diagnostics) {
// Lazily create this value to fix module loading errors.
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || ts.filter(ts.optionDeclarations, function (o) {
- return typeof o.type === "object" && !ts.forEachProperty(o.type, function (v) { return typeof v !== "number"; });
+ return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_4 = function (opt) {
+ var _loop_5 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -74263,7 +80141,7 @@ var ts;
options[opt.name] = ts.parseCustomTypeOption(opt, value, diagnostics);
}
else {
- if (!ts.forEachProperty(opt.type, function (v) { return v === value; })) {
+ if (!ts.forEachEntry(opt.type, function (v) { return v === value; })) {
// Supplied value isn't a valid enum value.
diagnostics.push(ts.createCompilerDiagnosticForInvalidCustomType(opt));
}
@@ -74271,10 +80149,11 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_4(opt);
+ _loop_5(opt);
}
return options;
}
+ ts.fixupCompilerOptions = fixupCompilerOptions;
})(ts || (ts = {}));
/// <reference path="formatting.ts"/>
/// <reference path="..\..\compiler\scanner.ts"/>
@@ -74298,10 +80177,10 @@ var ts;
ScanAction[ScanAction["RescanJsxIdentifier"] = 4] = "RescanJsxIdentifier";
ScanAction[ScanAction["RescanJsxText"] = 5] = "RescanJsxText";
})(ScanAction || (ScanAction = {}));
- function getFormattingScanner(sourceFile, startPos, endPos) {
+ function getFormattingScanner(text, languageVariant, startPos, endPos) {
ts.Debug.assert(scanner === undefined, "Scanner should be undefined");
- scanner = sourceFile.languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner;
- scanner.setText(sourceFile.text);
+ scanner = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner;
+ scanner.setText(text);
scanner.setTextPos(startPos);
var wasNewLine = true;
var leadingTrivia;
@@ -74379,10 +80258,10 @@ var ts;
function shouldRescanJsxIdentifier(node) {
if (node.parent) {
switch (node.parent.kind) {
- case 250 /* JsxAttribute */:
- case 248 /* JsxOpeningElement */:
- case 249 /* JsxClosingElement */:
- case 247 /* JsxSelfClosingElement */:
+ case 252 /* JsxAttribute */:
+ case 250 /* JsxOpeningElement */:
+ case 251 /* JsxClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return node.kind === 70 /* Identifier */;
}
}
@@ -74503,8 +80382,8 @@ var ts;
}
function isOnToken() {
ts.Debug.assert(scanner !== undefined);
- var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
- var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
+ var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
+ var startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos();
return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
}
// when containing node in the tree is token
@@ -74794,11 +80673,11 @@ var ts;
this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// Space after }.
- this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */));
+ this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 141 /* LastToken */, [19 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */));
// Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied
this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 81 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 105 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// No space for dot
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
@@ -74815,10 +80694,10 @@ var ts;
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 80 /* DoKeyword */, 101 /* TryKeyword */, 86 /* FinallyKeyword */, 81 /* ElseKeyword */]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */);
// Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */));
- this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8 /* Delete */));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */));
// Insert new line after { and before } in multi-line contexts.
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */));
@@ -74848,6 +80727,7 @@ var ts;
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109 /* LetKeyword */, 75 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */));
this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */));
this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95 /* ReturnKeyword */, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
@@ -74858,18 +80738,19 @@ var ts;
this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101 /* TryKeyword */, 86 /* FinallyKeyword */]), 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// get x() {}
// set x(val) {}
- this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 133 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 134 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
// Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options.
this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
// TypeScript-specific higher priority rules
// Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Use of module as a function call. e.g.: import m2 = module("m2");
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127 /* ModuleKeyword */, 131 /* RequireKeyword */]), 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space around certain TypeScript keywords
- this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 133 /* SetKeyword */, 114 /* StaticKeyword */, 136 /* TypeKeyword */, 138 /* FromKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 138 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 130 /* ReadonlyKeyword */, 134 /* SetKeyword */, 114 /* StaticKeyword */, 137 /* TypeKeyword */, 139 /* FromKeyword */, 126 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 139 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" {
this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */));
// Lambda expressions
@@ -74889,7 +80770,7 @@ var ts;
// decorators
this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 133 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */));
+ this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 134 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */));
this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */));
this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */));
this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115 /* YieldKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */));
@@ -74905,6 +80786,8 @@ var ts;
this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40 /* SlashToken */, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // No space before non-null assertion operator
+ this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */));
// These rules are higher in priority than user-configurable rules.
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
@@ -74935,7 +80818,7 @@ var ts;
this.SpaceBeforeJsxAttribute, this.SpaceBeforeSlashInJsxOpeningElement, this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement,
this.NoSpaceBeforeEqualInJsxAttribute, this.NoSpaceAfterEqualInJsxAttribute,
// TypeScript-specific rules
- this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
+ this.NoSpaceAfterModuleImport,
this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords,
this.SpaceAfterModuleName,
this.SpaceBeforeArrow, this.SpaceAfterArrow,
@@ -74950,6 +80833,7 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
+ this.NoSpaceBeforeNonNullAssertionOperator
];
// These rules are lower in priority than user-configurable rules.
this.LowPriorityCommonRules = [
@@ -74959,7 +80843,6 @@ var ts;
this.NoSpaceBeforeOpenBracket,
this.NoSpaceAfterCloseBracket,
this.SpaceAfterSemicolon,
- this.NoSpaceBeforeOpenParenInFuncDecl,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
///
@@ -75017,9 +80900,9 @@ var ts;
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
- for (var name_48 in o) {
- if (o[name_48] === rule) {
- return name_48;
+ for (var name in o) {
+ if (o[name] === rule) {
+ return name;
}
}
throw new Error("Unknown rule");
@@ -75028,42 +80911,44 @@ var ts;
/// Contexts
///
Rules.IsForContext = function (context) {
- return context.contextNode.kind === 211 /* ForStatement */;
+ return context.contextNode.kind === 213 /* ForStatement */;
};
Rules.IsNotForContext = function (context) {
return !Rules.IsForContext(context);
};
Rules.IsBinaryOpContext = function (context) {
switch (context.contextNode.kind) {
- case 192 /* BinaryExpression */:
- case 193 /* ConditionalExpression */:
- case 200 /* AsExpression */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
- case 156 /* TypePredicate */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 193 /* BinaryExpression */:
+ case 194 /* ConditionalExpression */:
+ case 201 /* AsExpression */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 157 /* TypePredicate */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return true;
// equals in binding elements: function foo([[x, y] = [1, 2]])
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
// equals in type X = ...
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
// equal in import a = module('a');
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// equal in let a = 0;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
// equal in p = 0;
- case 144 /* Parameter */:
- case 260 /* EnumMember */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 263 /* EnumMember */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return context.currentTokenSpan.kind === 57 /* EqualsToken */ || context.nextTokenSpan.kind === 57 /* EqualsToken */;
// "in" keyword in for (let x in []) { }
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
+ // "in" keyword in [P in keyof T]: T[P]
+ case 144 /* TypeParameter */:
return context.currentTokenSpan.kind === 91 /* InKeyword */ || context.nextTokenSpan.kind === 91 /* InKeyword */;
// Technically, "of" is not a binary operator, but format it the same way as "in"
- case 213 /* ForOfStatement */:
- return context.currentTokenSpan.kind === 140 /* OfKeyword */ || context.nextTokenSpan.kind === 140 /* OfKeyword */;
+ case 215 /* ForOfStatement */:
+ return context.currentTokenSpan.kind === 141 /* OfKeyword */ || context.nextTokenSpan.kind === 141 /* OfKeyword */;
}
return false;
};
@@ -75071,7 +80956,7 @@ var ts;
return !Rules.IsBinaryOpContext(context);
};
Rules.IsConditionalOperatorContext = function (context) {
- return context.contextNode.kind === 193 /* ConditionalExpression */;
+ return context.contextNode.kind === 194 /* ConditionalExpression */;
};
Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) {
//// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction.
@@ -75092,6 +80977,9 @@ var ts;
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we format.
return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context);
};
+ Rules.IsBraceWrappedContext = function (context) {
+ return context.contextNode.kind === 173 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context);
+ };
// This check is done before an open brace in a control construct, a function, or a typescript block declaration
Rules.IsBeforeMultilineBlockContext = function (context) {
return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine());
@@ -75115,97 +81003,103 @@ var ts;
return true;
}
switch (node.kind) {
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 176 /* ObjectLiteralExpression */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 177 /* ObjectLiteralExpression */:
+ case 233 /* ModuleBlock */:
return true;
}
return false;
};
Rules.IsFunctionDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
// case SyntaxKind.MemberFunctionDeclaration:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
// case SyntaxKind.MethodSignature:
- case 153 /* CallSignature */:
- case 184 /* FunctionExpression */:
- case 150 /* Constructor */:
- case 185 /* ArrowFunction */:
+ case 154 /* CallSignature */:
+ case 185 /* FunctionExpression */:
+ case 151 /* Constructor */:
+ case 186 /* ArrowFunction */:
// case SyntaxKind.ConstructorDeclaration:
// case SyntaxKind.SimpleArrowFunctionExpression:
// case SyntaxKind.ParenthesizedArrowFunctionExpression:
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return true;
}
return false;
};
Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) {
- return context.contextNode.kind === 225 /* FunctionDeclaration */ || context.contextNode.kind === 184 /* FunctionExpression */;
+ return context.contextNode.kind === 227 /* FunctionDeclaration */ || context.contextNode.kind === 185 /* FunctionExpression */;
};
Rules.IsTypeScriptDeclWithBlockContext = function (context) {
return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode);
};
Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 161 /* TypeLiteral */:
- case 230 /* ModuleDeclaration */:
- case 241 /* ExportDeclaration */:
- case 242 /* NamedExports */:
- case 235 /* ImportDeclaration */:
- case 238 /* NamedImports */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 162 /* TypeLiteral */:
+ case 232 /* ModuleDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 244 /* NamedExports */:
+ case 237 /* ImportDeclaration */:
+ case 240 /* NamedImports */:
return true;
}
return false;
};
Rules.IsAfterCodeBlockContext = function (context) {
switch (context.currentTokenParent.kind) {
- case 226 /* ClassDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
- case 204 /* Block */:
- case 256 /* CatchClause */:
- case 231 /* ModuleBlock */:
- case 218 /* SwitchStatement */:
+ case 228 /* ClassDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 259 /* CatchClause */:
+ case 233 /* ModuleBlock */:
+ case 220 /* SwitchStatement */:
return true;
+ case 206 /* Block */: {
+ var blockParent = context.currentTokenParent.parent;
+ if (blockParent.kind !== 186 /* ArrowFunction */ &&
+ blockParent.kind !== 185 /* FunctionExpression */) {
+ return true;
+ }
+ }
}
return false;
};
Rules.IsControlDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 208 /* IfStatement */:
- case 218 /* SwitchStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
- case 221 /* TryStatement */:
- case 209 /* DoStatement */:
- case 217 /* WithStatement */:
+ case 210 /* IfStatement */:
+ case 220 /* SwitchStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
+ case 223 /* TryStatement */:
+ case 211 /* DoStatement */:
+ case 219 /* WithStatement */:
// TODO
// case SyntaxKind.ElseClause:
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return true;
default:
return false;
}
};
Rules.IsObjectContext = function (context) {
- return context.contextNode.kind === 176 /* ObjectLiteralExpression */;
+ return context.contextNode.kind === 177 /* ObjectLiteralExpression */;
};
Rules.IsFunctionCallContext = function (context) {
- return context.contextNode.kind === 179 /* CallExpression */;
+ return context.contextNode.kind === 180 /* CallExpression */;
};
Rules.IsNewContext = function (context) {
- return context.contextNode.kind === 180 /* NewExpression */;
+ return context.contextNode.kind === 181 /* NewExpression */;
};
Rules.IsFunctionCallOrNewContext = function (context) {
return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context);
@@ -75217,25 +81111,25 @@ var ts;
return context.nextTokenSpan.kind !== 21 /* CloseBracketToken */;
};
Rules.IsArrowFunctionContext = function (context) {
- return context.contextNode.kind === 185 /* ArrowFunction */;
+ return context.contextNode.kind === 186 /* ArrowFunction */;
};
Rules.IsNonJsxSameLineTokenContext = function (context) {
return context.TokensAreOnSameLine() && context.contextNode.kind !== 10 /* JsxText */;
};
Rules.IsNonJsxElementContext = function (context) {
- return context.contextNode.kind !== 246 /* JsxElement */;
+ return context.contextNode.kind !== 248 /* JsxElement */;
};
Rules.IsJsxExpressionContext = function (context) {
- return context.contextNode.kind === 252 /* JsxExpression */;
+ return context.contextNode.kind === 255 /* JsxExpression */;
};
Rules.IsNextTokenParentJsxAttribute = function (context) {
- return context.nextTokenParent.kind === 250 /* JsxAttribute */;
+ return context.nextTokenParent.kind === 252 /* JsxAttribute */;
};
Rules.IsJsxAttributeContext = function (context) {
- return context.contextNode.kind === 250 /* JsxAttribute */;
+ return context.contextNode.kind === 252 /* JsxAttribute */;
};
Rules.IsJsxSelfClosingElementContext = function (context) {
- return context.contextNode.kind === 247 /* JsxSelfClosingElement */;
+ return context.contextNode.kind === 249 /* JsxSelfClosingElement */;
};
Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) {
return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context);
@@ -75250,41 +81144,42 @@ var ts;
while (ts.isPartOfExpression(node)) {
node = node.parent;
}
- return node.kind === 145 /* Decorator */;
+ return node.kind === 146 /* Decorator */;
};
Rules.IsStartOfVariableDeclarationList = function (context) {
- return context.currentTokenParent.kind === 224 /* VariableDeclarationList */ &&
+ return context.currentTokenParent.kind === 226 /* VariableDeclarationList */ &&
context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;
};
Rules.IsNotFormatOnEnter = function (context) {
return context.formattingRequestKind !== 2 /* FormatOnEnter */;
};
Rules.IsModuleDeclContext = function (context) {
- return context.contextNode.kind === 230 /* ModuleDeclaration */;
+ return context.contextNode.kind === 232 /* ModuleDeclaration */;
};
Rules.IsObjectTypeContext = function (context) {
- return context.contextNode.kind === 161 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
+ return context.contextNode.kind === 162 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
};
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 26 /* LessThanToken */ && token.kind !== 28 /* GreaterThanToken */) {
return false;
}
switch (parent.kind) {
- case 157 /* TypeReference */:
- case 182 /* TypeAssertionExpression */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 199 /* ExpressionWithTypeArguments */:
+ case 158 /* TypeReference */:
+ case 183 /* TypeAssertionExpression */:
+ case 230 /* TypeAliasDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 200 /* ExpressionWithTypeArguments */:
return true;
default:
return false;
@@ -75295,13 +81190,16 @@ var ts;
Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent);
};
Rules.IsTypeAssertionContext = function (context) {
- return context.contextNode.kind === 182 /* TypeAssertionExpression */;
+ return context.contextNode.kind === 183 /* TypeAssertionExpression */;
};
Rules.IsVoidOpContext = function (context) {
- return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 188 /* VoidExpression */;
+ return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 189 /* VoidExpression */;
};
Rules.IsYieldOrYieldStarWithOperand = function (context) {
- return context.contextNode.kind === 195 /* YieldExpression */ && context.contextNode.expression !== undefined;
+ return context.contextNode.kind === 196 /* YieldExpression */ && context.contextNode.expression !== undefined;
+ };
+ Rules.IsNonNullAssertionContext = function (context) {
+ return context.contextNode.kind === 202 /* NonNullExpression */;
};
return Rules;
}());
@@ -75325,7 +81223,7 @@ var ts;
return result;
};
RulesMap.prototype.Initialize = function (rules) {
- this.mapRowLength = 140 /* LastToken */ + 1;
+ this.mapRowLength = 141 /* LastToken */ + 1;
this.map = new Array(this.mapRowLength * this.mapRowLength); // new Array<RulesBucket>(this.mapRowLength * this.mapRowLength);
// This array is used only during construction of the rulesbucket in the map
var rulesBucketConstructionStateList = new Array(this.map.length); // new Array<RulesBucketConstructionState>(this.map.length);
@@ -75339,7 +81237,7 @@ var ts;
});
};
RulesMap.prototype.GetRuleBucketIndex = function (row, column) {
- ts.Debug.assert(row <= 140 /* LastKeyword */ && column <= 140 /* LastKeyword */, "Must compute formatting context from tokens");
+ ts.Debug.assert(row <= 141 /* LastKeyword */ && column <= 141 /* LastKeyword */, "Must compute formatting context from tokens");
var rulesBucketIndex = (row * this.mapRowLength) + column;
return rulesBucketIndex;
};
@@ -75520,7 +81418,7 @@ var ts;
}
TokenAllAccess.prototype.GetTokens = function () {
var result = [];
- for (var token = 0 /* FirstToken */; token <= 140 /* LastToken */; token++) {
+ for (var token = 0 /* FirstToken */; token <= 141 /* LastToken */; token++) {
result.push(token);
}
return result;
@@ -75564,9 +81462,9 @@ var ts;
}());
TokenRange.Any = TokenRange.AllTokens();
TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */]));
- TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 140 /* LastKeyword */);
+ TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 141 /* LastKeyword */);
TokenRange.BinaryOperators = TokenRange.FromRange(26 /* FirstBinaryOperator */, 69 /* LastBinaryOperator */);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 140 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 141 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]);
TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42 /* PlusPlusToken */, 43 /* MinusMinusToken */, 51 /* TildeToken */, 50 /* ExclamationToken */]);
TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 70 /* Identifier */, 18 /* OpenParenToken */, 20 /* OpenBracketToken */, 16 /* OpenBraceToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
@@ -75574,7 +81472,7 @@ var ts;
TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]);
TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
- TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 134 /* StringKeyword */, 121 /* BooleanKeyword */, 135 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]);
+ TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 135 /* StringKeyword */, 121 /* BooleanKeyword */, 136 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]);
Shared.TokenRange = TokenRange;
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
@@ -75610,6 +81508,9 @@ var ts;
RulesProvider.prototype.getRulesMap = function () {
return this.rulesMap;
};
+ RulesProvider.prototype.getFormatOptions = function () {
+ return this.options;
+ };
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
var activeRules = this.createActiveRules(options);
@@ -75621,6 +81522,12 @@ var ts;
};
RulesProvider.prototype.createActiveRules = function (options) {
var rules = this.globalRules.HighPriorityCommonRules.slice(0);
+ if (options.insertSpaceAfterConstructor) {
+ rules.push(this.globalRules.SpaceAfterConstructor);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceAfterConstructor);
+ }
if (options.insertSpaceAfterCommaDelimiter) {
rules.push(this.globalRules.SpaceAfterComma);
}
@@ -75701,6 +81608,12 @@ var ts;
rules.push(this.globalRules.NoSpaceBeforeBinaryOperator);
rules.push(this.globalRules.NoSpaceAfterBinaryOperator);
}
+ if (options.insertSpaceBeforeFunctionParenthesis) {
+ rules.push(this.globalRules.SpaceBeforeOpenParenInFuncDecl);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceBeforeOpenParenInFuncDecl);
+ }
if (options.placeOpenBraceOnNewLineForControlBlocks) {
rules.push(this.globalRules.NewLineBeforeOpenBraceInControl);
}
@@ -75833,17 +81746,17 @@ var ts;
// i.e. parent is class declaration with the list of members and node is one of members.
function isListElement(parent, node) {
switch (parent.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return ts.rangeContainsRange(parent.members, node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
var body = parent.body;
- return body && body.kind === 231 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node);
- case 261 /* SourceFile */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ return body && body.kind === 233 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node);
+ case 264 /* SourceFile */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return ts.rangeContainsRange(parent.statements, node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return ts.rangeContainsRange(parent.block.statements, node);
}
return false;
@@ -75863,9 +81776,9 @@ var ts;
}
}
/** formatting is not applied to ranges that contain parse errors.
- * This function will return a predicate that for a given text range will tell
- * if there are any parse errors that overlap with the range.
- */
+ * This function will return a predicate that for a given text range will tell
+ * if there are any parse errors that overlap with the range.
+ */
function prepareRangeContainsErrorFunction(errors, originalRange) {
if (!errors.length) {
return rangeHasNoErrors;
@@ -75903,10 +81816,10 @@ var ts;
}
}
/**
- * Start of the original range might fall inside the comment - scanner will not yield appropriate results
- * This function will look for token that is located before the start of target range
- * and return its end as start position for the scanner.
- */
+ * Start of the original range might fall inside the comment - scanner will not yield appropriate results
+ * This function will look for token that is located before the start of target range
+ * and return its end as start position for the scanner.
+ */
function getScanStartPosition(enclosingNode, originalRange, sourceFile) {
var start = enclosingNode.getStart(sourceFile);
if (start === originalRange.pos && enclosingNode.end === originalRange.end) {
@@ -75956,14 +81869,21 @@ var ts;
}
return 0;
}
+ /* @internal */
+ function formatNode(node, sourceFileLike, languageVariant, initialIndentation, delta, rulesProvider) {
+ var range = { pos: 0, end: sourceFileLike.text.length };
+ return formatSpanWorker(range, node, initialIndentation, delta, formatting.getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end), rulesProvider.getFormatOptions(), rulesProvider, 1 /* FormatSelection */, function (_) { return false; }, // assume that node does not have any errors
+ sourceFileLike);
+ }
+ formatting.formatNode = formatNode;
function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) {
- var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange);
- // formatting context is used by rules provider
- var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
// find the smallest node that fully wraps the range and compute the initial indentation for the node
var enclosingNode = findEnclosingNode(originalRange, sourceFile);
- var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end);
- var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options);
+ return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options), getOwnOrInheritedDelta(enclosingNode, options, sourceFile), formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end), options, rulesProvider, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile);
+ }
+ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, options, rulesProvider, requestKind, rangeContainsError, sourceFile) {
+ // formatting context is used by rules provider
+ var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -75978,13 +81898,12 @@ var ts;
if (enclosingNode.decorators) {
undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line;
}
- var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile);
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
}
if (!formattingScanner.isOnToken()) {
var leadingTrivia = formattingScanner.getCurrentLeadingTrivia();
if (leadingTrivia) {
- processTrivia(leadingTrivia, enclosingNode, enclosingNode, undefined);
+ processTrivia(leadingTrivia, enclosingNode, enclosingNode, /*dynamicIndentation*/ undefined);
trimTrailingWhitespacesForRemainingRange();
}
}
@@ -75992,12 +81911,12 @@ var ts;
return edits;
// local functions
/** Tries to compute the indentation for a list element.
- * If list element is not in range then
- * function will pick its actual indentation
- * so it can be pushed downstream as inherited indentation.
- * If list element is in the range - its indentation will be equal
- * to inherited indentation from its predecessors.
- */
+ * If list element is not in range then
+ * function will pick its actual indentation
+ * so it can be pushed downstream as inherited indentation.
+ * If list element is in the range - its indentation will be equal
+ * to inherited indentation from its predecessors.
+ */
function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) {
if (ts.rangeOverlapsWithStartEnd(range, startPos, endPos) ||
ts.rangeContainsStartEnd(range, startPos, endPos) /* Not to miss zero-range nodes e.g. JsxText */) {
@@ -76048,20 +81967,19 @@ var ts;
return node.modifiers[0].kind;
}
switch (node.kind) {
- case 226 /* ClassDeclaration */: return 74 /* ClassKeyword */;
- case 227 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */;
- case 225 /* FunctionDeclaration */: return 88 /* FunctionKeyword */;
- case 229 /* EnumDeclaration */: return 229 /* EnumDeclaration */;
- case 151 /* GetAccessor */: return 124 /* GetKeyword */;
- case 152 /* SetAccessor */: return 133 /* SetKeyword */;
- case 149 /* MethodDeclaration */:
+ case 228 /* ClassDeclaration */: return 74 /* ClassKeyword */;
+ case 229 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */;
+ case 227 /* FunctionDeclaration */: return 88 /* FunctionKeyword */;
+ case 231 /* EnumDeclaration */: return 231 /* EnumDeclaration */;
+ case 152 /* GetAccessor */: return 124 /* GetKeyword */;
+ case 153 /* SetAccessor */: return 134 /* SetKeyword */;
+ case 150 /* MethodDeclaration */:
if (node.asteriskToken) {
return 38 /* AsteriskToken */;
- } /*
- fall-through
- */
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
+ }
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
return node.name.kind;
}
}
@@ -76091,18 +82009,31 @@ var ts;
// open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent
case 16 /* OpenBraceToken */:
case 17 /* CloseBraceToken */:
- case 20 /* OpenBracketToken */:
- case 21 /* CloseBracketToken */:
case 18 /* OpenParenToken */:
case 19 /* CloseParenToken */:
case 81 /* ElseKeyword */:
case 105 /* WhileKeyword */:
case 56 /* AtToken */:
return indentation;
- default:
- // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
- return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
+ case 40 /* SlashToken */:
+ case 28 /* GreaterThanToken */: {
+ if (container.kind === 250 /* JsxOpeningElement */ ||
+ container.kind === 251 /* JsxClosingElement */ ||
+ container.kind === 249 /* JsxSelfClosingElement */) {
+ return indentation;
+ }
+ break;
+ }
+ case 20 /* OpenBracketToken */:
+ case 21 /* CloseBracketToken */: {
+ if (container.kind !== 171 /* MappedType */) {
+ return indentation;
+ }
+ break;
+ }
}
+ // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
+ return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
},
getIndentation: function () { return indentation; },
getDelta: function (child) { return getEffectiveDelta(delta, child); },
@@ -76125,7 +82056,7 @@ var ts;
};
function getEffectiveDelta(delta, child) {
// Delta value should be zero when the node explicitly prevents indentation of the child node
- return formatting.SmartIndenter.nodeWillIndentChild(node, child, true) ? delta : 0;
+ return formatting.SmartIndenter.nodeWillIndentChild(node, child, /*indentByDefault*/ true) ? delta : 0;
}
}
function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta) {
@@ -76158,7 +82089,7 @@ var ts;
if (tokenInfo.token.end > node.end) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
}
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
var childStartPos = child.getStart(sourceFile);
@@ -76192,7 +82123,7 @@ var ts;
// stop when formatting scanner advances past the beginning of the child
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
}
if (!formattingScanner.isOnToken()) {
return inheritedIndentation;
@@ -76205,11 +82136,11 @@ var ts;
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
return inheritedIndentation;
}
- var effectiveParentStartLine = child.kind === 145 /* Decorator */ ? childStartLine : undecoratedParentStartLine;
+ var effectiveParentStartLine = child.kind === 146 /* Decorator */ ? childStartLine : undecoratedParentStartLine;
var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine);
processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);
childContextNode = node;
- if (isFirstListItem && parent.kind === 175 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) {
+ if (isFirstListItem && parent.kind === 176 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) {
inheritedIndentation = childIndentation.indentation;
}
return inheritedIndentation;
@@ -76232,11 +82163,11 @@ var ts;
startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1 /* Unknown */, parent, parentDynamicIndentation, parentStartLine);
listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta);
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
else {
// consume any tokens that precede the list as child elements of 'node' using its indentation scope
- consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent);
}
}
}
@@ -76254,7 +82185,7 @@ var ts;
// without this check close paren will be interpreted as list end token for function expression which is wrong
if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) {
// consume list end token
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
}
}
@@ -76461,7 +82392,7 @@ var ts;
}
// shift all parts on the delta size
var delta = indentation - nonWhitespaceColumnInFirstPart.column;
- for (var i = startIndex, len = parts.length; i < len; i++, startLine++) {
+ for (var i = startIndex; i < parts.length; i++, startLine++) {
var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile);
var nonWhitespaceCharacterAndColumn = i === 0
? nonWhitespaceColumnInFirstPart
@@ -76566,12 +82497,12 @@ var ts;
}
function getOpenTokenForList(node, list) {
switch (node.kind) {
- case 150 /* Constructor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 185 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 186 /* ArrowFunction */:
if (node.typeParameters === list) {
return 26 /* LessThanToken */;
}
@@ -76579,8 +82510,8 @@ var ts;
return 18 /* OpenParenToken */;
}
break;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
if (node.typeArguments === list) {
return 26 /* LessThanToken */;
}
@@ -76588,7 +82519,7 @@ var ts;
return 18 /* OpenParenToken */;
}
break;
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
if (node.typeArguments === list) {
return 26 /* LessThanToken */;
}
@@ -76668,7 +82599,20 @@ var ts;
(function (Value) {
Value[Value["Unknown"] = -1] = "Unknown";
})(Value || (Value = {}));
- function getIndentation(position, sourceFile, options) {
+ /**
+ * Computed indentation for a given position in source file
+ * @param position - position in file
+ * @param sourceFile - target source file
+ * @param options - set of editor options that control indentation
+ * @param assumeNewLineBeforeCloseBrace - false when getIndentation is called on the text from the real source file.
+ * true - when we need to assume that position is on the newline. This is usefult for codefixes, i.e.
+ * function f() {
+ * |}
+ * when inserting some text after open brace we would like to get the value of indentation as if newline was already there.
+ * However by default indentation at position | will be 0 so 'assumeNewLineBeforeCloseBrace' allows to override this behavior,
+ */
+ function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace) {
+ if (assumeNewLineBeforeCloseBrace === void 0) { assumeNewLineBeforeCloseBrace = false; }
if (position > sourceFile.text.length) {
return getBaseIndentation(options); // past EOF
}
@@ -76704,7 +82648,7 @@ var ts;
var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile);
return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options);
}
- if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 192 /* BinaryExpression */) {
+ if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 193 /* BinaryExpression */) {
// previous token is comma that separates items in list - find the previous item and try to derive indentation from it
var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options);
if (actualIndentation !== -1 /* Unknown */) {
@@ -76720,8 +82664,10 @@ var ts;
while (current) {
if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) {
currentStart = getStartLineAndCharacterForNode(current, sourceFile);
- if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) {
- indentationDelta = 0;
+ var nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile);
+ if (nextTokenKind !== 0 /* Unknown */) {
+ // handle cases when codefix is about to be inserted before the close brace
+ indentationDelta = assumeNewLineBeforeCloseBrace && nextTokenKind === 2 /* CloseBrace */ ? options.indentSize : 0;
}
else {
indentationDelta = lineAtPosition !== currentStart.line ? options.indentSize : 0;
@@ -76827,20 +82773,26 @@ var ts;
// - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually
// - parent and child are not on the same line
var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) &&
- (parent.kind === 261 /* SourceFile */ || !parentAndChildShareLine);
+ (parent.kind === 264 /* SourceFile */ || !parentAndChildShareLine);
if (!useActualIndentation) {
return -1 /* Unknown */;
}
return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options);
}
+ var NextTokenKind;
+ (function (NextTokenKind) {
+ NextTokenKind[NextTokenKind["Unknown"] = 0] = "Unknown";
+ NextTokenKind[NextTokenKind["OpenBrace"] = 1] = "OpenBrace";
+ NextTokenKind[NextTokenKind["CloseBrace"] = 2] = "CloseBrace";
+ })(NextTokenKind || (NextTokenKind = {}));
function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) {
var nextToken = ts.findNextToken(precedingToken, current);
if (!nextToken) {
- return false;
+ return 0 /* Unknown */;
}
if (nextToken.kind === 16 /* OpenBraceToken */) {
// open braces are always indented at the parent level
- return true;
+ return 1 /* OpenBrace */;
}
else if (nextToken.kind === 17 /* CloseBraceToken */) {
// close braces are indented at the parent level if they are located on the same line with cursor
@@ -76852,15 +82804,15 @@ var ts;
// class A {
// $}
var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line;
- return lineAtPosition === nextTokenStartLine;
+ return lineAtPosition === nextTokenStartLine ? 2 /* CloseBrace */ : 0 /* Unknown */;
}
- return false;
+ return 0 /* Unknown */;
}
function getStartLineAndCharacterForNode(n, sourceFile) {
return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));
}
function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) {
- if (parent.kind === 208 /* IfStatement */ && parent.elseStatement === child) {
+ if (parent.kind === 210 /* IfStatement */ && parent.elseStatement === child) {
var elseKeyword = ts.findChildOfKind(parent, 81 /* ElseKeyword */, sourceFile);
ts.Debug.assert(elseKeyword !== undefined);
var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line;
@@ -76869,53 +82821,49 @@ var ts;
return false;
}
SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement;
+ function getListIfStartEndIsInListRange(list, start, end) {
+ return list && ts.rangeContainsStartEnd(list, start, end) ? list : undefined;
+ }
function getContainingList(node, sourceFile) {
if (node.parent) {
switch (node.parent.kind) {
- case 157 /* TypeReference */:
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) {
- return node.parent.typeArguments;
- }
- break;
- case 176 /* ObjectLiteralExpression */:
+ case 158 /* TypeReference */:
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd());
+ case 177 /* ObjectLiteralExpression */:
return node.parent.properties;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return node.parent.elements;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */: {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 151 /* Constructor */:
+ case 160 /* ConstructorType */:
+ case 155 /* ConstructSignature */: {
var start = node.getStart(sourceFile);
- if (node.parent.typeParameters &&
- ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) {
- return node.parent.typeParameters;
- }
- if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) {
- return node.parent.parameters;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd());
}
- case 180 /* NewExpression */:
- case 179 /* CallExpression */: {
+ case 228 /* ClassDeclaration */:
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd());
+ case 181 /* NewExpression */:
+ case 180 /* CallExpression */: {
var start = node.getStart(sourceFile);
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) {
- return node.parent.typeArguments;
- }
- if (node.parent.arguments &&
- ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) {
- return node.parent.arguments;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd());
}
+ case 226 /* VariableDeclarationList */:
+ return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd());
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
+ return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd());
}
}
return undefined;
}
+ SmartIndenter.getContainingList = getContainingList;
function getActualIndentationForListItem(node, sourceFile, options) {
var containingList = getContainingList(node, sourceFile);
return containingList ? getActualIndentationFromList(containingList) : -1 /* Unknown */;
@@ -76930,8 +82878,8 @@ var ts;
if (node.kind === 19 /* CloseParenToken */) {
return -1 /* Unknown */;
}
- if (node.parent && (node.parent.kind === 179 /* CallExpression */ ||
- node.parent.kind === 180 /* NewExpression */) &&
+ if (node.parent && (node.parent.kind === 180 /* CallExpression */ ||
+ node.parent.kind === 181 /* NewExpression */) &&
node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
@@ -76949,10 +82897,10 @@ var ts;
function getStartingExpression(node) {
while (true) {
switch (node.kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
node = node.expression;
break;
default:
@@ -77016,48 +82964,49 @@ var ts;
SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn;
function nodeContentIsAlwaysIndented(kind) {
switch (kind) {
- case 207 /* ExpressionStatement */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 175 /* ArrayLiteralExpression */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
- case 176 /* ObjectLiteralExpression */:
- case 161 /* TypeLiteral */:
- case 163 /* TupleType */:
- case 232 /* CaseBlock */:
- case 254 /* DefaultClause */:
- case 253 /* CaseClause */:
- case 183 /* ParenthesizedExpression */:
- case 177 /* PropertyAccessExpression */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 205 /* VariableStatement */:
- case 223 /* VariableDeclaration */:
- case 240 /* ExportAssignment */:
- case 216 /* ReturnStatement */:
- case 193 /* ConditionalExpression */:
- case 173 /* ArrayBindingPattern */:
- case 172 /* ObjectBindingPattern */:
- case 248 /* JsxOpeningElement */:
- case 247 /* JsxSelfClosingElement */:
- case 252 /* JsxExpression */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 144 /* Parameter */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 166 /* ParenthesizedType */:
- case 181 /* TaggedTemplateExpression */:
- case 189 /* AwaitExpression */:
- case 242 /* NamedExports */:
- case 238 /* NamedImports */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
+ case 209 /* ExpressionStatement */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 176 /* ArrayLiteralExpression */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
+ case 177 /* ObjectLiteralExpression */:
+ case 162 /* TypeLiteral */:
+ case 171 /* MappedType */:
+ case 164 /* TupleType */:
+ case 234 /* CaseBlock */:
+ case 257 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 184 /* ParenthesizedExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 207 /* VariableStatement */:
+ case 225 /* VariableDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 218 /* ReturnStatement */:
+ case 194 /* ConditionalExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 255 /* JsxExpression */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 145 /* Parameter */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 167 /* ParenthesizedType */:
+ case 182 /* TaggedTemplateExpression */:
+ case 190 /* AwaitExpression */:
+ case 244 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
return true;
}
return false;
@@ -77066,27 +83015,27 @@ var ts;
function nodeWillIndentChild(parent, child, indentByDefault) {
var childKind = child ? child.kind : 0 /* Unknown */;
switch (parent.kind) {
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 211 /* ForStatement */:
- case 208 /* IfStatement */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 185 /* ArrowFunction */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return childKind !== 204 /* Block */;
- case 241 /* ExportDeclaration */:
- return childKind !== 242 /* NamedExports */;
- case 235 /* ImportDeclaration */:
- return childKind !== 236 /* ImportClause */ ||
- (child.namedBindings && child.namedBindings.kind !== 238 /* NamedImports */);
- case 246 /* JsxElement */:
- return childKind !== 249 /* JsxClosingElement */;
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 210 /* IfStatement */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return childKind !== 206 /* Block */;
+ case 243 /* ExportDeclaration */:
+ return childKind !== 244 /* NamedExports */;
+ case 237 /* ImportDeclaration */:
+ return childKind !== 238 /* ImportClause */ ||
+ (child.namedBindings && child.namedBindings.kind !== 240 /* NamedImports */);
+ case 248 /* JsxElement */:
+ return childKind !== 251 /* JsxClosingElement */;
}
// No explicit rule for given nodes so the result will follow the default value argument
return indentByDefault;
@@ -77105,9 +83054,588 @@ var ts;
/* @internal */
var ts;
(function (ts) {
+ var textChanges;
+ (function (textChanges) {
+ /**
+ * Currently for simplicity we store recovered positions on the node itself.
+ * It can be changed to side-table later if we decide that current design is too invasive.
+ */
+ function getPos(n) {
+ return n["__pos"];
+ }
+ function setPos(n, pos) {
+ n["__pos"] = pos;
+ }
+ function getEnd(n) {
+ return n["__end"];
+ }
+ function setEnd(n, end) {
+ n["__end"] = end;
+ }
+ var Position;
+ (function (Position) {
+ Position[Position["FullStart"] = 0] = "FullStart";
+ Position[Position["Start"] = 1] = "Start";
+ })(Position = textChanges.Position || (textChanges.Position = {}));
+ function skipWhitespacesAndLineBreaks(text, start) {
+ return ts.skipTrivia(text, start, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ }
+ function hasCommentsBeforeLineBreak(text, start) {
+ var i = start;
+ while (i < text.length) {
+ var ch = text.charCodeAt(i);
+ if (ts.isWhiteSpaceSingleLine(ch)) {
+ i++;
+ continue;
+ }
+ return ch === 47 /* slash */;
+ }
+ return false;
+ }
+ function getSeparatorCharacter(separator) {
+ return ts.tokenToString(separator.kind);
+ }
+ textChanges.getSeparatorCharacter = getSeparatorCharacter;
+ function getAdjustedStartPosition(sourceFile, node, options, position) {
+ if (options.useNonAdjustedStartPosition) {
+ return node.getFullStart();
+ }
+ var fullStart = node.getFullStart();
+ var start = node.getStart(sourceFile);
+ if (fullStart === start) {
+ return start;
+ }
+ var fullStartLine = ts.getLineStartPositionForPosition(fullStart, sourceFile);
+ var startLine = ts.getLineStartPositionForPosition(start, sourceFile);
+ if (startLine === fullStartLine) {
+ // full start and start of the node are on the same line
+ // a, b;
+ // ^ ^
+ // | start
+ // fullstart
+ // when b is replaced - we usually want to keep the leading trvia
+ // when b is deleted - we delete it
+ return position === Position.Start ? start : fullStart;
+ }
+ // get start position of the line following the line that contains fullstart position
+ var adjustedStartPosition = ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, fullStartLine) + 1, sourceFile);
+ // skip whitespaces/newlines
+ adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition);
+ return ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile);
+ }
+ textChanges.getAdjustedStartPosition = getAdjustedStartPosition;
+ function getAdjustedEndPosition(sourceFile, node, options) {
+ if (options.useNonAdjustedEndPosition) {
+ return node.getEnd();
+ }
+ var end = node.getEnd();
+ var newEnd = ts.skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true);
+ // check if last character before newPos is linebreak
+ // if yes - considered all skipped trivia to be trailing trivia of the node
+ return newEnd !== end && ts.isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))
+ ? newEnd
+ : end;
+ }
+ textChanges.getAdjustedEndPosition = getAdjustedEndPosition;
+ /**
+ * Checks if 'candidate' argument is a legal separator in the list that contains 'node' as an element
+ */
+ function isSeparator(node, candidate) {
+ return candidate && node.parent && (candidate.kind === 25 /* CommaToken */ || (candidate.kind === 24 /* SemicolonToken */ && node.parent.kind === 177 /* ObjectLiteralExpression */));
+ }
+ function spaces(count) {
+ var s = "";
+ for (var i = 0; i < count; i++) {
+ s += " ";
+ }
+ return s;
+ }
+ var ChangeTracker = (function () {
+ function ChangeTracker(newLine, rulesProvider, validator) {
+ this.newLine = newLine;
+ this.rulesProvider = rulesProvider;
+ this.validator = validator;
+ this.changes = [];
+ this.newLineCharacter = ts.getNewLineCharacter({ newLine: newLine });
+ }
+ ChangeTracker.fromCodeFixContext = function (context) {
+ return new ChangeTracker(context.newLineCharacter === "\n" ? 1 /* LineFeed */ : 0 /* CarriageReturnLineFeed */, context.rulesProvider);
+ };
+ ChangeTracker.prototype.deleteNode = function (sourceFile, node, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, node, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, node, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteRange = function (sourceFile, range) {
+ this.changes.push({ sourceFile: sourceFile, range: range });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeRange = function (sourceFile, startNode, endNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeInList = function (sourceFile, node) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(node, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(node);
+ if (index < 0) {
+ return this;
+ }
+ if (containingList.length === 1) {
+ this.deleteNode(sourceFile, node);
+ return this;
+ }
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ if (nextToken && isSeparator(node, nextToken)) {
+ // find first non-whitespace position in the leading trivia of the node
+ var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ var nextElement = containingList[index + 1];
+ /// find first non-whitespace position in the leading trivia of the next node
+ var endPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, nextElement, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ // shift next node so its first non-whitespace position will be moved to the first non-whitespace position of the deleted node
+ this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });
+ }
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ if (previousToken && isSeparator(node, previousToken)) {
+ this.deleteNodeRange(sourceFile, previousToken, node);
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.replaceRange = function (sourceFile, range, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, range: range, options: options, node: newNode });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNode = function (sourceFile, oldNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, oldNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, oldNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNodeRange = function (sourceFile, startNode, endNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAt = function (sourceFile, pos, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, options: options, node: newNode, range: { pos: pos, end: pos } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeBefore = function (sourceFile, before, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, before, options, Position.Start);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: startPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) {
+ if (options === void 0) { options = {}; }
+ if ((ts.isStatementButNotDeclaration(after)) ||
+ after.kind === 148 /* PropertyDeclaration */ ||
+ after.kind === 147 /* PropertySignature */ ||
+ after.kind === 149 /* MethodSignature */) {
+ // check if previous statement ends with semicolon
+ // if not - insert semicolon to preserve the code from changing the meaning due to ASI
+ if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ options: {},
+ range: { pos: after.end, end: after.end },
+ node: ts.createToken(24 /* SemicolonToken */)
+ });
+ }
+ }
+ var endPosition = getAdjustedEndPosition(sourceFile, after, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: endPosition, end: endPosition } });
+ return this;
+ };
+ /**
+ * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range,
+ * i.e. arguments in arguments lists, parameters in parameter lists etc.
+ * Note that separators are part of the node in statements and class elements.
+ */
+ ChangeTracker.prototype.insertNodeInListAfter = function (sourceFile, after, newNode) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(after, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(after);
+ if (index < 0) {
+ return this;
+ }
+ var end = after.getEnd();
+ if (index !== containingList.length - 1) {
+ // any element except the last one
+ // use next sibling as an anchor
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ if (nextToken && isSeparator(after, nextToken)) {
+ // for list
+ // a, b, c
+ // create change for adding 'e' after 'a' as
+ // - find start of next element after a (it is b)
+ // - use this start as start and end position in final change
+ // - build text of change by formatting the text of node + separator + whitespace trivia of b
+ // in multiline case it will work as
+ // a,
+ // b,
+ // c,
+ // result - '*' denotes leading trivia that will be inserted after new text (displayed as '#')
+ // a,*
+ // ***insertedtext<separator>#
+ // ###b,
+ // c,
+ // find line and character of the next element
+ var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
+ // find line and character of the token that precedes next element (usually it is separator)
+ var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
+ var prefix = void 0;
+ var startPos = void 0;
+ if (lineAndCharOfNextToken.line === lineAndCharOfNextElement.line) {
+ // next element is located on the same line with separator:
+ // a,$$$$b
+ // ^ ^
+ // | |-next element
+ // |-separator
+ // where $$$ is some leading trivia
+ // for a newly inserted node we'll maintain the same relative position comparing to separator and replace leading trivia with spaces
+ // a, x,$$$$b
+ // ^ ^ ^
+ // | | |-next element
+ // | |-new inserted node padded with spaces
+ // |-separator
+ startPos = nextToken.end;
+ prefix = spaces(lineAndCharOfNextElement.character - lineAndCharOfNextToken.character);
+ }
+ else {
+ // next element is located on different line that separator
+ // let insert position be the beginning of the line that contains next element
+ startPos = ts.getStartPositionOfLine(lineAndCharOfNextElement.line, sourceFile);
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: startPos, end: containingList[index + 1].getStart(sourceFile) },
+ node: newNode,
+ useIndentationFromFile: true,
+ options: {
+ prefix: prefix,
+ // write separator and leading trivia of the next element as suffix
+ suffix: "" + ts.tokenToString(nextToken.kind) + sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))
+ }
+ });
+ }
+ }
+ else {
+ var afterStart = after.getStart(sourceFile);
+ var afterStartLinePosition = ts.getLineStartPositionForPosition(afterStart, sourceFile);
+ var separator = void 0;
+ var multilineList = false;
+ // insert element after the last element in the list that has more than one item
+ // pick the element preceding the after element to:
+ // - pick the separator
+ // - determine if list is a multiline
+ if (containingList.length === 1) {
+ // if list has only one element then we'll format is as multiline if node has comment in trailing trivia, or as singleline otherwise
+ // i.e. var x = 1 // this is x
+ // | new element will be inserted at this position
+ separator = 25 /* CommaToken */;
+ }
+ else {
+ // element has more than one element, pick separator from the list
+ var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile);
+ separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25 /* CommaToken */;
+ // determine if list is multiline by checking lines of after element and element that precedes it.
+ var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile);
+ multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;
+ }
+ if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) {
+ // in this case we'll always treat containing list as multiline
+ multilineList = true;
+ }
+ if (multilineList) {
+ // insert separator immediately following the 'after' node to preserve comments in trailing trivia
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: ts.createToken(separator),
+ options: {}
+ });
+ // use the same indentation as 'after' item
+ var indentation = ts.formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.rulesProvider.getFormatOptions());
+ // insert element before the line break on the line that contains 'after' element
+ var insertPos = ts.skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true, /*stopAtComments*/ false);
+ if (insertPos !== end && ts.isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) {
+ insertPos--;
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: insertPos, end: insertPos },
+ node: newNode,
+ options: { indentation: indentation, prefix: this.newLineCharacter }
+ });
+ }
+ else {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: newNode,
+ options: { prefix: ts.tokenToString(separator) + " " }
+ });
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.getChanges = function () {
+ var _this = this;
+ var changesPerFile = ts.createFileMap();
+ // group changes per file
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var c = _a[_i];
+ var changesInFile = changesPerFile.get(c.sourceFile.path);
+ if (!changesInFile) {
+ changesPerFile.set(c.sourceFile.path, changesInFile = []);
+ }
+ changesInFile.push(c);
+ }
+ // convert changes
+ var fileChangesList = [];
+ changesPerFile.forEachValue(function (path) {
+ var changesInFile = changesPerFile.get(path);
+ var sourceFile = changesInFile[0].sourceFile;
+ var fileTextChanges = { fileName: sourceFile.fileName, textChanges: [] };
+ for (var _i = 0, _a = ChangeTracker.normalize(changesInFile); _i < _a.length; _i++) {
+ var c = _a[_i];
+ fileTextChanges.textChanges.push({
+ span: _this.computeSpan(c, sourceFile),
+ newText: _this.computeNewText(c, sourceFile)
+ });
+ }
+ fileChangesList.push(fileTextChanges);
+ });
+ return fileChangesList;
+ };
+ ChangeTracker.prototype.computeSpan = function (change, _sourceFile) {
+ return ts.createTextSpanFromBounds(change.range.pos, change.range.end);
+ };
+ ChangeTracker.prototype.computeNewText = function (change, sourceFile) {
+ if (!change.node) {
+ // deletion case
+ return "";
+ }
+ var options = change.options || {};
+ var nonFormattedText = getNonformattedText(change.node, sourceFile, this.newLine);
+ if (this.validator) {
+ this.validator(nonFormattedText);
+ }
+ var formatOptions = this.rulesProvider.getFormatOptions();
+ var pos = change.range.pos;
+ var posStartsLine = ts.getLineStartPositionForPosition(pos, sourceFile) === pos;
+ var initialIndentation = change.options.indentation !== undefined
+ ? change.options.indentation
+ : change.useIndentationFromFile
+ ? ts.formatting.SmartIndenter.getIndentation(change.range.pos, sourceFile, formatOptions, posStartsLine || (change.options.prefix === this.newLineCharacter))
+ : 0;
+ var delta = change.options.delta !== undefined
+ ? change.options.delta
+ : ts.formatting.SmartIndenter.shouldIndentChildNode(change.node)
+ ? formatOptions.indentSize
+ : 0;
+ var text = applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, this.rulesProvider);
+ // strip initial indentation (spaces or tabs) if text will be inserted in the middle of the line
+ // however keep indentation if it is was forced
+ text = posStartsLine || change.options.indentation !== undefined ? text : text.replace(/^\s+/, "");
+ return (options.prefix || "") + text + (options.suffix || "");
+ };
+ ChangeTracker.normalize = function (changes) {
+ // order changes by start position
+ var normalized = ts.stableSort(changes, function (a, b) { return a.range.pos - b.range.pos; });
+ // verify that change intervals do not overlap, except possibly at end points.
+ for (var i = 0; i < normalized.length - 2; i++) {
+ ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos);
+ }
+ return normalized;
+ };
+ return ChangeTracker;
+ }());
+ textChanges.ChangeTracker = ChangeTracker;
+ function getNonformattedText(node, sourceFile, newLine) {
+ var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var writer = new Writer(ts.getNewLineCharacter(options));
+ var printer = ts.createPrinter(options, writer);
+ printer.writeNode(3 /* Unspecified */, node, sourceFile, writer);
+ return { text: writer.getText(), node: assignPositionsToNode(node) };
+ }
+ textChanges.getNonformattedText = getNonformattedText;
+ function applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, rulesProvider) {
+ var lineMap = ts.computeLineStarts(nonFormattedText.text);
+ var file = {
+ text: nonFormattedText.text,
+ lineMap: lineMap,
+ getLineAndCharacterOfPosition: function (pos) { return ts.computeLineAndCharacterOfPosition(lineMap, pos); }
+ };
+ var changes = ts.formatting.formatNode(nonFormattedText.node, file, sourceFile.languageVariant, initialIndentation, delta, rulesProvider);
+ return applyChanges(nonFormattedText.text, changes);
+ }
+ textChanges.applyFormatting = applyFormatting;
+ function applyChanges(text, changes) {
+ for (var i = changes.length - 1; i >= 0; i--) {
+ var change = changes[i];
+ text = "" + text.substring(0, change.span.start) + change.newText + text.substring(ts.textSpanEnd(change.span));
+ }
+ return text;
+ }
+ textChanges.applyChanges = applyChanges;
+ function isTrivia(s) {
+ return ts.skipTrivia(s, 0) === s.length;
+ }
+ var nullTransformationContext = {
+ enableEmitNotification: ts.noop,
+ enableSubstitution: ts.noop,
+ endLexicalEnvironment: function () { return undefined; },
+ getCompilerOptions: ts.notImplemented,
+ getEmitHost: ts.notImplemented,
+ getEmitResolver: ts.notImplemented,
+ hoistFunctionDeclaration: ts.noop,
+ hoistVariableDeclaration: ts.noop,
+ isEmitNotificationEnabled: ts.notImplemented,
+ isSubstitutionEnabled: ts.notImplemented,
+ onEmitNode: ts.noop,
+ onSubstituteNode: ts.notImplemented,
+ readEmitHelpers: ts.notImplemented,
+ requestEmitHelper: ts.noop,
+ resumeLexicalEnvironment: ts.noop,
+ startLexicalEnvironment: ts.noop,
+ suspendLexicalEnvironment: ts.noop
+ };
+ function assignPositionsToNode(node) {
+ var visited = ts.visitEachChild(node, assignPositionsToNode, nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
+ // create proxy node for non synthesized nodes
+ var newNode = ts.nodeIsSynthesized(visited)
+ ? visited
+ : (Proxy.prototype = visited, new Proxy());
+ newNode.pos = getPos(node);
+ newNode.end = getEnd(node);
+ return newNode;
+ function Proxy() { }
+ }
+ function assignPositionsToNodeArray(nodes, visitor, test, start, count) {
+ var visited = ts.visitNodes(nodes, visitor, test, start, count);
+ if (!visited) {
+ return visited;
+ }
+ // clone nodearray if necessary
+ var nodeArray = visited === nodes ? ts.createNodeArray(visited.slice(0)) : visited;
+ nodeArray.pos = getPos(nodes);
+ nodeArray.end = getEnd(nodes);
+ return nodeArray;
+ }
+ var Writer = (function () {
+ function Writer(newLine) {
+ var _this = this;
+ this.lastNonTriviaPosition = 0;
+ this.writer = ts.createTextWriter(newLine);
+ this.onEmitNode = function (hint, node, printCallback) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ printCallback(hint, node);
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onBeforeEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setPos(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setEnd(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ }
+ Writer.prototype.setLastNonTriviaPosition = function (s, force) {
+ if (force || !isTrivia(s)) {
+ this.lastNonTriviaPosition = this.writer.getTextPos();
+ var i = 0;
+ while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) {
+ i++;
+ }
+ // trim trailing whitespaces
+ this.lastNonTriviaPosition -= i;
+ }
+ };
+ Writer.prototype.write = function (s) {
+ this.writer.write(s);
+ this.setLastNonTriviaPosition(s, /*force*/ false);
+ };
+ Writer.prototype.writeTextOfNode = function (text, node) {
+ this.writer.writeTextOfNode(text, node);
+ };
+ Writer.prototype.writeLine = function () {
+ this.writer.writeLine();
+ };
+ Writer.prototype.increaseIndent = function () {
+ this.writer.increaseIndent();
+ };
+ Writer.prototype.decreaseIndent = function () {
+ this.writer.decreaseIndent();
+ };
+ Writer.prototype.getText = function () {
+ return this.writer.getText();
+ };
+ Writer.prototype.rawWrite = function (s) {
+ this.writer.rawWrite(s);
+ this.setLastNonTriviaPosition(s, /*force*/ false);
+ };
+ Writer.prototype.writeLiteral = function (s) {
+ this.writer.writeLiteral(s);
+ this.setLastNonTriviaPosition(s, /*force*/ true);
+ };
+ Writer.prototype.getTextPos = function () {
+ return this.writer.getTextPos();
+ };
+ Writer.prototype.getLine = function () {
+ return this.writer.getLine();
+ };
+ Writer.prototype.getColumn = function () {
+ return this.writer.getColumn();
+ };
+ Writer.prototype.getIndent = function () {
+ return this.writer.getIndent();
+ };
+ Writer.prototype.isAtStartOfLine = function () {
+ return this.writer.isAtStartOfLine();
+ };
+ Writer.prototype.reset = function () {
+ this.writer.reset();
+ this.lastNonTriviaPosition = 0;
+ };
+ return Writer;
+ }());
+ })(textChanges = ts.textChanges || (ts.textChanges = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
- var codeFixes = ts.createMap();
+ var codeFixes = [];
function registerCodeFix(action) {
ts.forEach(action.errorCodes, function (error) {
var fixes = codeFixes[error];
@@ -77142,25 +83670,226 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
- function getOpenBraceEnd(constructor, sourceFile) {
- // First token is the open curly, this is where we want to put the 'super' call.
- return constructor.body.getFirstToken(sourceFile).getEnd();
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Class_0_incorrectly_implements_interface_1.code],
+ getCodeActions: getActionForClassLikeIncorrectImplementsInterface
+ });
+ function getActionForClassLikeIncorrectImplementsInterface(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ var classDeclaration = ts.getContainingClass(token);
+ if (!classDeclaration) {
+ return undefined;
+ }
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var classType = checker.getTypeAtLocation(classDeclaration);
+ var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(classDeclaration);
+ var hasNumericIndexSignature = !!checker.getIndexTypeOfType(classType, 1 /* Number */);
+ var hasStringIndexSignature = !!checker.getIndexTypeOfType(classType, 0 /* String */);
+ var result = [];
+ for (var _i = 0, implementedTypeNodes_2 = implementedTypeNodes; _i < implementedTypeNodes_2.length; _i++) {
+ var implementedTypeNode = implementedTypeNodes_2[_i];
+ // Note that this is ultimately derived from a map indexed by symbol names,
+ // so duplicates cannot occur.
+ var implementedType = checker.getTypeAtLocation(implementedTypeNode);
+ var implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
+ var nonPrivateMembers = implementedTypeSymbols.filter(function (symbol) { return !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); });
+ var newNodes = [];
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 1 /* Number */, hasNumericIndexSignature, newNodes);
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 0 /* String */, hasStringIndexSignature, newNodes);
+ newNodes = newNodes.concat(codefix.createMissingMemberNodes(classDeclaration, nonPrivateMembers, checker));
+ var message = ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_interface_0), [implementedTypeNode.getText()]);
+ if (newNodes.length > 0) {
+ pushAction(result, newNodes, message);
+ }
+ }
+ return result;
+ function createAndAddMissingIndexSignatureDeclaration(type, kind, hasIndexSigOfKind, newNodes) {
+ if (hasIndexSigOfKind) {
+ return;
+ }
+ var indexInfoOfKind = checker.getIndexInfoOfType(type, kind);
+ if (!indexInfoOfKind) {
+ return;
+ }
+ var newIndexSignatureDeclaration = checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration);
+ newNodes.push(newIndexSignatureDeclaration);
+ }
+ function pushAction(result, newNodes, description) {
+ var newAction = {
+ description: description,
+ changes: codefix.newNodesToChanges(newNodes, openBrace, context)
+ };
+ result.push(newAction);
+ }
}
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- if (token.kind !== 122 /* ConstructorKeyword */) {
- return undefined;
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ getCodeActions: getActionsForAddMissingMember
+ });
+ function getActionsForAddMissingMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ // This is the identifier of the missing property. eg:
+ // this.missing = 1;
+ // ^^^^^^^
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind !== 70 /* Identifier */) {
+ return undefined;
+ }
+ if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98 /* ThisKeyword */) {
+ return undefined;
+ }
+ var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
+ if (!ts.isClassElement(classMemberDeclaration)) {
+ return undefined;
+ }
+ var classDeclaration = classMemberDeclaration.parent;
+ if (!classDeclaration || !ts.isClassLike(classDeclaration)) {
+ return undefined;
+ }
+ var isStatic = ts.hasModifier(classMemberDeclaration, 32 /* Static */);
+ return ts.isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
+ function getActionsForAddMissingMemberInJavaScriptFile() {
+ var memberName = token.getText();
+ if (isStatic) {
+ if (classDeclaration.kind === 198 /* ClassExpression */) {
+ return undefined;
+ }
+ var className = classDeclaration.name.getText();
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classDeclaration.getEnd(), length: 0 },
+ newText: "" + context.newLineCharacter + className + "." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
}
- var newPosition = getOpenBraceEnd(token.parent, sourceFile);
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
- changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "super();", span: { start: newPosition, length: 0 } }] }]
+ else {
+ var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
+ if (!classConstructor) {
+ return undefined;
+ }
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classConstructor.body.getEnd() - 1, length: 0 },
+ newText: "this." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
+ }
+ }
+ function getActionsForAddMissingMemberInTypeScriptFile() {
+ var typeNode;
+ if (token.parent.parent.kind === 193 /* BinaryExpression */) {
+ var binaryExpression = token.parent.parent;
+ var checker = context.program.getTypeChecker();
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
+ }
+ typeNode = typeNode || ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var property = ts.createProperty(
+ /*decorators*/ undefined,
+ /*modifiers*/ isStatic ? [ts.createToken(114 /* StaticKeyword */)] : undefined, token.getText(sourceFile),
+ /*questionToken*/ undefined, typeNode,
+ /*initializer*/ undefined);
+ var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter });
+ var actions = [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_declaration_for_missing_property_0), [token.getText()]),
+ changes: propertyChangeTracker.getChanges()
}];
+ if (!isStatic) {
+ var stringTypeNode = ts.createKeywordTypeNode(135 /* StringKeyword */);
+ var indexingParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, "x",
+ /*questionToken*/ undefined, stringTypeNode,
+ /*initializer*/ undefined);
+ var indexSignature = ts.createIndexSignatureDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, [indexingParameter], typeNode);
+ var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ actions.push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ changes: indexSignatureChangeTracker.getChanges()
+ });
+ }
+ return actions;
}
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
+ });
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
});
+ function getActionForClassLikeMissingAbstractMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ // This is the identifier in the case of a class declaration
+ // or the class keyword token in the case of a class expression.
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ if (ts.isClassLike(token.parent)) {
+ var classDeclaration = token.parent;
+ var extendsNode = ts.getClassExtendsHeritageClauseElement(classDeclaration);
+ var instantiatedExtendsType = checker.getTypeAtLocation(extendsNode);
+ // Note that this is ultimately derived from a map indexed by symbol names,
+ // so duplicates cannot occur.
+ var extendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType);
+ var abstractAndNonPrivateExtendsSymbols = extendsSymbols.filter(symbolPointsToNonPrivateAndAbstractMember);
+ var newNodes = codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, checker);
+ var changes = codefix.newNodesToChanges(newNodes, ts.getOpenBraceOfClassLike(classDeclaration, sourceFile), context);
+ if (changes && changes.length > 0) {
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_inherited_abstract_class),
+ changes: changes
+ }];
+ }
+ }
+ return undefined;
+ }
+ function symbolPointsToNonPrivateAndAbstractMember(symbol) {
+ var decls = symbol.getDeclarations();
+ ts.Debug.assert(!!(decls && decls.length > 0));
+ var flags = ts.getModifierFlags(decls[0]);
+ return !(flags & 8 /* Private */) && !!(flags & 128 /* Abstract */);
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
errorCodes: [ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code],
getCodeActions: function (context) {
@@ -77174,9 +83903,9 @@ var ts;
if (!superCall) {
return undefined;
}
- // figure out if the this access is actuall inside the supercall
+ // figure out if the `this` access is actually inside the supercall
// i.e. super(this.a), since in that case we won't suggest a fix
- if (superCall.expression && superCall.expression.kind == 179 /* CallExpression */) {
+ if (superCall.expression && superCall.expression.kind === 180 /* CallExpression */) {
var arguments_1 = superCall.expression.arguments;
for (var i = 0; i < arguments_1.length; i++) {
if (arguments_1[i].expression === token) {
@@ -77184,23 +83913,15 @@ var ts;
}
}
}
- var newPosition = getOpenBraceEnd(constructor, sourceFile);
- var changes = [{
- fileName: sourceFile.fileName, textChanges: [{
- newText: superCall.getText(sourceFile),
- span: { start: newPosition, length: 0 }
- },
- {
- newText: "",
- span: { start: superCall.getStart(sourceFile), length: superCall.getWidth(sourceFile) }
- }]
- }];
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(constructor, sourceFile), superCall, { suffix: context.newLineCharacter });
+ changeTracker.deleteNode(sourceFile, superCall);
return [{
description: ts.getLocaleSpecificMessage(ts.Diagnostics.Make_super_call_the_first_statement_in_the_constructor),
- changes: changes
+ changes: changeTracker.getChanges()
}];
function findSuperCall(n) {
- if (n.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) {
+ if (n.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) {
return n;
}
if (ts.isFunctionLike(n)) {
@@ -77217,6 +83938,265 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 122 /* ConstructorKeyword */) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var superCall = ts.createStatement(ts.createCall(ts.createSuper(), /*typeArguments*/ undefined, /*argumentsArray*/ ts.emptyArray));
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(token.parent, sourceFile), superCall, { suffix: context.newLineCharacter });
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var classDeclNode = ts.getContainingClass(token);
+ if (!(token.kind === 70 /* Identifier */ && ts.isClassLike(classDeclNode))) {
+ return undefined;
+ }
+ var heritageClauses = classDeclNode.heritageClauses;
+ if (!(heritageClauses && heritageClauses.length > 0)) {
+ return undefined;
+ }
+ var extendsToken = heritageClauses[0].getFirstToken();
+ if (!(extendsToken && extendsToken.kind === 84 /* ExtendsKeyword */)) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107 /* ImplementsKeyword */));
+ // We replace existing keywords with commas.
+ for (var i = 1; i < heritageClauses.length; i++) {
+ var keywordToken = heritageClauses[i].getFirstToken();
+ if (keywordToken) {
+ changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25 /* CommaToken */));
+ }
+ }
+ var result = [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Change_extends_to_implements),
+ changes: changeTracker.getChanges()
+ }];
+ return result;
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 70 /* Identifier */) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createThis(), token));
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_this_to_unresolved_variable),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics._0_is_declared_but_never_used.code,
+ ts.Diagnostics.Property_0_is_declared_but_never_used.code
+ ],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ // this handles var ["computed"] = 12;
+ if (token.kind === 20 /* OpenBracketToken */) {
+ token = ts.getTokenAtPosition(sourceFile, start + 1);
+ }
+ switch (token.kind) {
+ case 70 /* Identifier */:
+ switch (token.parent.kind) {
+ case 225 /* VariableDeclaration */:
+ switch (token.parent.parent.parent.kind) {
+ case 213 /* ForStatement */:
+ var forStatement = token.parent.parent.parent;
+ var forInitializer = forStatement.initializer;
+ if (forInitializer.declarations.length === 1) {
+ return deleteNode(forInitializer);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 215 /* ForOfStatement */:
+ var forOfStatement = token.parent.parent.parent;
+ if (forOfStatement.initializer.kind === 226 /* VariableDeclarationList */) {
+ var forOfInitializer = forOfStatement.initializer;
+ return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
+ }
+ break;
+ case 214 /* ForInStatement */:
+ // There is no valid fix in the case of:
+ // for .. in
+ return undefined;
+ case 259 /* CatchClause */:
+ var catchClause = token.parent.parent;
+ var parameter = catchClause.variableDeclaration.getChildren()[0];
+ return deleteNode(parameter);
+ default:
+ var variableStatement = token.parent.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return deleteNode(variableStatement);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ }
+ // TODO: #14885
+ // falls through
+ case 144 /* TypeParameter */:
+ var typeParameters = token.parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
+ if (!previousToken || previousToken.kind !== 26 /* LessThanToken */) {
+ return deleteRange(typeParameters);
+ }
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
+ if (!nextToken || nextToken.kind !== 28 /* GreaterThanToken */) {
+ return deleteRange(typeParameters);
+ }
+ return deleteNodeRange(previousToken, nextToken);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 145 /* Parameter */:
+ var functionDeclaration = token.parent.parent;
+ if (functionDeclaration.parameters.length === 1) {
+ return deleteNode(token.parent);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ // handle case where 'import a = A;'
+ case 236 /* ImportEqualsDeclaration */:
+ var importEquals = ts.getAncestor(token, 236 /* ImportEqualsDeclaration */);
+ return deleteNode(importEquals);
+ case 241 /* ImportSpecifier */:
+ var namedImports = token.parent.parent;
+ if (namedImports.elements.length === 1) {
+ // Only 1 import and it is unused. So the entire declaration should be removed.
+ var importSpec = ts.getAncestor(token, 237 /* ImportDeclaration */);
+ return deleteNode(importSpec);
+ }
+ else {
+ // delete import specifier
+ return deleteNodeInList(token.parent);
+ }
+ // handle case where "import d, * as ns from './file'"
+ // or "'import {a, b as ns} from './file'"
+ case 238 /* ImportClause */:
+ var importClause = token.parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 237 /* ImportDeclaration */);
+ return deleteNode(importDecl);
+ }
+ else {
+ // import |d,| * as ns from './file'
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
+ if (nextToken && nextToken.kind === 25 /* CommaToken */) {
+ // shift first non-whitespace position after comma to the start position of the node
+ return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) });
+ }
+ else {
+ return deleteNode(importClause.name);
+ }
+ }
+ case 239 /* NamespaceImport */:
+ var namespaceImport = token.parent;
+ if (namespaceImport.name === token && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 237 /* ImportDeclaration */);
+ return deleteNode(importDecl);
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
+ if (previousToken && previousToken.kind === 25 /* CommaToken */) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return deleteRange({ pos: startPosition, end: namespaceImport.end });
+ }
+ return deleteRange(namespaceImport);
+ }
+ }
+ break;
+ case 148 /* PropertyDeclaration */:
+ case 239 /* NamespaceImport */:
+ return deleteNode(token.parent);
+ }
+ if (ts.isDeclarationName(token)) {
+ return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
+ function deleteNode(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
+ }
+ function deleteRange(range) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteRange(sourceFile, range));
+ }
+ function deleteNodeInList(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeInList(sourceFile, n));
+ }
+ function deleteNodeRange(start, end) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeRange(sourceFile, start, end));
+ }
+ function replaceNode(n, newNode) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).replaceNode(sourceFile, n, newNode));
+ }
+ function makeChange(changeTracker) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -77225,18 +84205,19 @@ var ts;
})(ModuleSpecifierComparison || (ModuleSpecifierComparison = {}));
var ImportCodeActionMap = (function () {
function ImportCodeActionMap() {
- this.symbolIdToActionMap = ts.createMap();
+ this.symbolIdToActionMap = [];
}
ImportCodeActionMap.prototype.addAction = function (symbolId, newAction) {
if (!newAction) {
return;
}
- if (!this.symbolIdToActionMap[symbolId]) {
+ var actions = this.symbolIdToActionMap[symbolId];
+ if (!actions) {
this.symbolIdToActionMap[symbolId] = [newAction];
return;
}
if (newAction.kind === "CodeChange") {
- this.symbolIdToActionMap[symbolId].push(newAction);
+ actions.push(newAction);
return;
}
var updatedNewImports = [];
@@ -77249,12 +84230,13 @@ var ts;
}
switch (this.compareModuleSpecifiers(existingAction.moduleSpecifier, newAction.moduleSpecifier)) {
case ModuleSpecifierComparison.Better:
- // the new one is not worth considering if it is a new improt.
+ // the new one is not worth considering if it is a new import.
// However if it is instead a insertion into existing import, the user might want to use
// the module specifier even it is worse by our standards. So keep it.
if (newAction.kind === "NewImport") {
return;
}
+ // falls through
case ModuleSpecifierComparison.Equal:
// the current one is safe. But it is still possible that the new one is worse
// than another existing one. For example, you may have new imports from "./foo/bar"
@@ -77280,8 +84262,8 @@ var ts;
};
ImportCodeActionMap.prototype.getAllActions = function () {
var result = [];
- for (var symbolId in this.symbolIdToActionMap) {
- result = ts.concatenate(result, this.symbolIdToActionMap[symbolId]);
+ for (var key in this.symbolIdToActionMap) {
+ result = ts.concatenate(result, this.symbolIdToActionMap[key]);
}
return result;
};
@@ -77313,7 +84295,11 @@ var ts;
return ImportCodeActionMap;
}());
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Cannot_find_name_0.code],
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_namespace_0.code,
+ ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
+ ],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var checker = context.program.getTypeChecker();
@@ -77323,18 +84309,22 @@ var ts;
var name = token.getText();
var symbolIdActionMap = new ImportCodeActionMap();
// this is a module id -> module import declaration map
- var cachedImportDeclarations = ts.createMap();
- var cachedNewImportInsertPosition;
- var allPotentialModules = checker.getAmbientModules();
+ var cachedImportDeclarations = [];
+ var lastImportDeclaration;
+ var currentTokenMeaning = ts.getMeaningFromLocation(token);
+ if (context.errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
+ var symbol = checker.getAliasedSymbol(checker.getSymbolAtLocation(token));
+ return getCodeActionForImport(symbol, /*isDefault*/ false, /*isNamespaceImport*/ true);
+ }
+ var candidateModules = checker.getAmbientModules();
for (var _i = 0, allSourceFiles_1 = allSourceFiles; _i < allSourceFiles_1.length; _i++) {
var otherSourceFile = allSourceFiles_1[_i];
if (otherSourceFile !== sourceFile && ts.isExternalOrCommonJsModule(otherSourceFile)) {
- allPotentialModules.push(otherSourceFile.symbol);
+ candidateModules.push(otherSourceFile.symbol);
}
}
- var currentTokenMeaning = ts.getMeaningFromLocation(token);
- for (var _a = 0, allPotentialModules_1 = allPotentialModules; _a < allPotentialModules_1.length; _a++) {
- var moduleSymbol = allPotentialModules_1[_a];
+ for (var _a = 0, candidateModules_1 = candidateModules; _a < candidateModules_1.length; _a++) {
+ var moduleSymbol = candidateModules_1[_a];
context.cancellationToken.throwIfCancellationRequested();
// check the default export
var defaultExport = checker.tryGetMemberInModuleExports("default", moduleSymbol);
@@ -77356,8 +84346,9 @@ var ts;
return symbolIdActionMap.getAllActions();
function getImportDeclarations(moduleSymbol) {
var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- if (cachedImportDeclarations[moduleSymbolId]) {
- return cachedImportDeclarations[moduleSymbolId];
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
}
var existingDeclarations = [];
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
@@ -77372,10 +84363,10 @@ var ts;
function getImportDeclaration(moduleSpecifier) {
var node = moduleSpecifier;
while (node) {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
return node;
}
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
node = node.parent;
@@ -77393,7 +84384,7 @@ var ts;
var declarations = symbol.getDeclarations();
return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
}
- function getCodeActionForImport(moduleSymbol, isDefault) {
+ function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
var existingDeclarations = getImportDeclarations(moduleSymbol);
if (existingDeclarations.length > 0) {
// With an existing import statement, there are more than one actions the user can do.
@@ -77419,11 +84410,11 @@ var ts;
var namespaceImportDeclaration;
var namedImportDeclaration;
var existingModuleSpecifier;
- for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
- var declaration = declarations_11[_i];
- if (declaration.kind === 235 /* ImportDeclaration */) {
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 237 /* ImportDeclaration */) {
var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
// case:
// import * as ns from "foo"
namespaceImportDeclaration = declaration;
@@ -77447,15 +84438,15 @@ var ts;
if (namespaceImportDeclaration) {
actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
}
- if (namedImportDeclaration && namedImportDeclaration.importClause &&
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
(namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
/**
* If the existing import declaration already has a named import list, just
* insert the identifier into that list.
*/
- var textChange = getTextChangeForImportClause(namedImportDeclaration.importClause);
+ var fileTextChanges = getTextChangeForImportClause(namedImportDeclaration.importClause);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(namedImportDeclaration.moduleSpecifier.getText());
- actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], textChange.newText, textChange.span, sourceFile.fileName, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
}
else {
// we need to create a new import statement, but the existing module specifier can be reused.
@@ -77463,55 +84454,35 @@ var ts;
}
return actions;
function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 247 /* ExternalModuleReference */) {
return declaration.moduleReference.expression.getText();
}
return declaration.moduleReference.getText();
}
function getTextChangeForImportClause(importClause) {
- var newImportText = isDefault ? "default as " + name : name;
var importList = importClause.namedBindings;
+ var newImportSpecifier = ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(name));
// case 1:
// original text: import default from "module"
// change to: import default, { name } from "module"
- if (!importList && importClause.name) {
- var start = importClause.name.getEnd();
- return {
- newText: ", { " + newImportText + " }",
- span: { start: start, length: 0 }
- };
- }
// case 2:
// original text: import {} from "module"
// change to: import { name } from "module"
- if (importList.elements.length === 0) {
- var start = importList.getStart();
- return {
- newText: "{ " + newImportText + " }",
- span: { start: start, length: importList.getEnd() - start }
- };
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
}
- // case 3:
- // original text: import { foo, bar } from "module"
- // change to: import { foo, bar, name } from "module"
- var insertPoint = importList.elements[importList.elements.length - 1].getEnd();
/**
* If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
* import {
* foo
* } from "./module";
*/
- var startLine = ts.getLineOfLocalPosition(sourceFile, importList.getStart());
- var endLine = ts.getLineOfLocalPosition(sourceFile, importList.getEnd());
- var oneImportPerLine = endLine - startLine > importList.elements.length;
- return {
- newText: "," + (oneImportPerLine ? context.newLineCharacter : " ") + newImportText,
- span: { start: insertPoint, length: 0 }
- };
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
}
function getCodeActionForNamespaceImport(declaration) {
var namespacePrefix;
- if (declaration.kind === 235 /* ImportDeclaration */) {
+ if (declaration.kind === 237 /* ImportDeclaration */) {
namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
@@ -77528,47 +84499,52 @@ var ts;
* namespace instead of altering the import declaration. For example, "foo" would
* become "ns.foo"
*/
- return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], namespacePrefix + ".", { start: token.getStart(), length: 0 }, sourceFile.fileName, "CodeChange");
+ return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
}
}
function getCodeActionForNewImport(moduleSpecifier) {
- if (!cachedNewImportInsertPosition) {
+ if (!lastImportDeclaration) {
// insert after any existing imports
- var lastModuleSpecifierEnd = -1;
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var moduleSpecifier_1 = _a[_i];
- var end = moduleSpecifier_1.getEnd();
- if (!lastModuleSpecifierEnd || end > lastModuleSpecifierEnd) {
- lastModuleSpecifierEnd = end;
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 236 /* ImportEqualsDeclaration */ || statement.kind === 237 /* ImportDeclaration */) {
+ lastImportDeclaration = statement;
+ break;
}
}
- cachedNewImportInsertPosition = lastModuleSpecifierEnd > 0 ? sourceFile.getLineEndOfPosition(lastModuleSpecifierEnd) : sourceFile.getStart();
}
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- var importStatementText = isDefault
- ? "import " + name + " from \"" + moduleSpecifierWithoutQuotes + "\""
- : "import { " + name + " } from \"" + moduleSpecifierWithoutQuotes + "\"";
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(name), /*namedBindings*/ undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(name)))
+ : ts.createImportClause(/*name*/ undefined, ts.createNamedImports([ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(name))]));
+ var importDecl = ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, importClause, ts.createLiteral(moduleSpecifierWithoutQuotes));
+ if (!lastImportDeclaration) {
+ changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: "" + context.newLineCharacter + context.newLineCharacter });
+ }
+ else {
+ changeTracker.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl, { suffix: context.newLineCharacter });
+ }
// if this file doesn't have any import statements, insert an import statement and then insert a new line
// between the only import statement and user code. Otherwise just insert the statement because chances
// are there are already a new line seperating code and import statements.
- var newText = cachedNewImportInsertPosition === sourceFile.getStart()
- ? importStatementText + ";" + context.newLineCharacter + context.newLineCharacter
- : "" + context.newLineCharacter + importStatementText + ";";
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], newText, { start: cachedNewImportInsertPosition, length: 0 }, sourceFile.fileName, "NewImport", moduleSpecifierWithoutQuotes);
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.path;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().path;
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
var sourceDirectory = ts.getDirectoryPath(fileName);
var options = context.program.getCompilerOptions();
return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
tryGetModuleNameFromTypeRoots() ||
tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 261 /* SourceFile */) {
+ if (moduleSymbol.valueDeclaration.kind !== 264 /* SourceFile */) {
return moduleSymbol.name;
}
}
@@ -77576,11 +84552,11 @@ var ts;
if (!options.baseUrl) {
return undefined;
}
- var normalizedBaseUrl = ts.toPath(options.baseUrl, ts.getDirectoryPath(options.baseUrl), getCanonicalFileName);
- var relativeName = tryRemoveParentDirectoryName(moduleFileName, normalizedBaseUrl);
+ var relativeName = getRelativePathIfInDirectory(moduleFileName, options.baseUrl);
if (!relativeName) {
return undefined;
}
+ var relativeNameWithIndex = ts.removeFileExtension(relativeName);
relativeName = removeExtensionAndIndexPostFix(relativeName);
if (options.paths) {
for (var key in options.paths) {
@@ -77600,7 +84576,7 @@ var ts;
return key.replace("\*", matchedStar);
}
}
- else if (pattern === relativeName) {
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
return key;
}
}
@@ -77610,9 +84586,8 @@ var ts;
}
function tryGetModuleNameFromRootDirs() {
if (options.rootDirs) {
- var normalizedRootDirs = ts.map(options.rootDirs, function (rootDir) { return ts.toPath(rootDir, /*basePath*/ undefined, getCanonicalFileName); });
- var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, normalizedRootDirs);
- var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, normalizedRootDirs);
+ var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, options.rootDirs);
+ var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, options.rootDirs);
if (normalizedTargetPath !== undefined) {
var relativePath = normalizedSourcePath !== undefined ? getRelativePath(normalizedTargetPath, normalizedSourcePath) : normalizedTargetPath;
return ts.removeFileExtension(relativePath);
@@ -77676,7 +84651,7 @@ var ts;
function getPathRelativeToRootDirs(path, rootDirs) {
for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
var rootDir = rootDirs_2[_i];
- var relativeName = tryRemoveParentDirectoryName(path, rootDir);
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
if (relativeName !== undefined) {
return relativeName;
}
@@ -77690,25 +84665,23 @@ var ts;
}
return fileName;
}
+ function getRelativePathIfInDirectory(path, directoryPath) {
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
+ return ts.isRootedDiskPath(relativePath) || ts.startsWith(relativePath, "..") ? undefined : relativePath;
+ }
function getRelativePath(path, directoryPath) {
- var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- function tryRemoveParentDirectoryName(path, parentDirectory) {
- var index = path.indexOf(parentDirectory);
- if (index === 0) {
- return ts.endsWith(parentDirectory, ts.directorySeparator)
- ? path.substring(parentDirectory.length)
- : path.substring(parentDirectory.length + 1);
- }
- return undefined;
- }
}
}
- function createCodeAction(description, diagnosticArgs, newText, span, fileName, kind, moduleSpecifier) {
+ function createChangeTracker() {
+ return ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ }
+ function createCodeAction(description, diagnosticArgs, changes, kind, moduleSpecifier) {
return {
description: ts.formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)),
- changes: [{ fileName: fileName, textChanges: [{ newText: newText, span: span }] }],
+ changes: changes,
kind: kind,
moduleSpecifier: moduleSpecifier
};
@@ -77723,155 +84696,275 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [
- ts.Diagnostics._0_is_declared_but_never_used.code,
- ts.Diagnostics.Property_0_is_declared_but_never_used.code
- ],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
- // this handles var ["computed"] = 12;
- if (token.kind === 20 /* OpenBracketToken */) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
- }
- switch (token.kind) {
- case 70 /* Identifier */:
- switch (token.parent.kind) {
- case 223 /* VariableDeclaration */:
- switch (token.parent.parent.parent.kind) {
- case 211 /* ForStatement */:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return createCodeFix("", forInitializer.pos, forInitializer.end - forInitializer.pos);
- }
- else {
- return removeSingleItem(forInitializer.declarations, token);
- }
- case 213 /* ForOfStatement */:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 224 /* VariableDeclarationList */) {
- var forOfInitializer = forOfStatement.initializer;
- return createCodeFix("{}", forOfInitializer.declarations[0].pos, forOfInitializer.declarations[0].end - forOfInitializer.declarations[0].pos);
- }
- break;
- case 212 /* ForInStatement */:
- // There is no valid fix in the case of:
- // for .. in
- return undefined;
- case 256 /* CatchClause */:
- var catchClause = token.parent.parent;
- var parameter = catchClause.variableDeclaration.getChildren()[0];
- return createCodeFix("", parameter.pos, parameter.end - parameter.pos);
- default:
- var variableStatement = token.parent.parent.parent;
- if (variableStatement.declarationList.declarations.length === 1) {
- return createCodeFix("", variableStatement.pos, variableStatement.end - variableStatement.pos);
- }
- else {
- var declarations = variableStatement.declarationList.declarations;
- return removeSingleItem(declarations, token);
- }
- }
- case 143 /* TypeParameter */:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 2);
- }
- else {
- return removeSingleItem(typeParameters, token);
- }
- case 144 /* Parameter */:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else {
- return removeSingleItem(functionDeclaration.parameters, token);
- }
- // handle case where 'import a = A;'
- case 234 /* ImportEqualsDeclaration */:
- var importEquals = findImportDeclaration(token);
- return createCodeFix("", importEquals.pos, importEquals.end - importEquals.pos);
- case 239 /* ImportSpecifier */:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- // Only 1 import and it is unused. So the entire declaration should be removed.
- var importSpec = findImportDeclaration(token);
- return createCodeFix("", importSpec.pos, importSpec.end - importSpec.pos);
- }
- else {
- return removeSingleItem(namedImports.elements, token);
- }
- // handle case where "import d, * as ns from './file'"
- // or "'import {a, b as ns} from './file'"
- case 236 /* ImportClause */:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = findImportDeclaration(importClause);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- return createCodeFix("", importClause.name.pos, importClause.namedBindings.pos - importClause.name.pos);
- }
- case 237 /* NamespaceImport */:
- var namespaceImport = token.parent;
- if (namespaceImport.name == token && !namespaceImport.parent.name) {
- var importDecl = findImportDeclaration(namespaceImport);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- var start_4 = namespaceImport.parent.name.end;
- return createCodeFix("", start_4, namespaceImport.parent.namedBindings.end - start_4);
- }
- }
- break;
- case 147 /* PropertyDeclaration */:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- case 237 /* NamespaceImport */:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- if (ts.isDeclarationName(token)) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return createCodeFix("", token.parent.parent.pos, token.parent.parent.end - token.parent.parent.pos);
- }
- else {
- return undefined;
- }
- function findImportDeclaration(token) {
- var importDecl = token;
- while (importDecl.kind != 235 /* ImportDeclaration */ && importDecl.parent) {
- importDecl = importDecl.parent;
- }
- return importDecl;
+ errorCodes: getApplicableDiagnosticCodes(),
+ getCodeActions: getDisableJsDiagnosticsCodeActions
+ });
+ function getApplicableDiagnosticCodes() {
+ var allDiagnostcs = ts.Diagnostics;
+ return Object.keys(allDiagnostcs)
+ .filter(function (d) { return allDiagnostcs[d] && allDiagnostcs[d].category === ts.DiagnosticCategory.Error; })
+ .map(function (d) { return allDiagnostcs[d].code; });
+ }
+ function getIgnoreCommentLocationForLocation(sourceFile, position, newLineCharacter) {
+ var line = ts.getLineAndCharacterOfPosition(sourceFile, position).line;
+ var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile);
+ var startPosition = ts.getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
+ // First try to see if we can put the '// @ts-ignore' on the previous line.
+ // We need to make sure that we are not in the middle of a string literal or a comment.
+ // We also want to check if the previous line holds a comment for a node on the next line
+ // if so, we do not want to separate the node from its comment if we can.
+ if (!ts.isInComment(sourceFile, startPosition) && !ts.isInString(sourceFile, startPosition) && !ts.isInTemplateString(sourceFile, startPosition)) {
+ var token = ts.getTouchingToken(sourceFile, startPosition);
+ var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
+ if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
+ return {
+ span: { start: startPosition, length: 0 },
+ newText: "// @ts-ignore" + newLineCharacter
+ };
}
- function createCodeFix(newText, start, length) {
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_unused_identifiers),
- changes: [{
- fileName: sourceFile.fileName,
- textChanges: [{ newText: newText, span: { start: start, length: length } }]
+ }
+ // If all fails, add an extra new line immediatlly before the error span.
+ return {
+ span: { start: position, length: 0 },
+ newText: (position === startPosition ? "" : newLineCharacter) + "// @ts-ignore" + newLineCharacter
+ };
+ }
+ function getDisableJsDiagnosticsCodeActions(context) {
+ var sourceFile = context.sourceFile, program = context.program, newLineCharacter = context.newLineCharacter, span = context.span;
+ if (!ts.isInJavaScriptFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
+ return undefined;
+ }
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Ignore_this_error_message),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [getIgnoreCommentLocationForLocation(sourceFile, span.start, newLineCharacter)]
+ }]
+ },
+ {
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Disable_checking_for_this_file),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: {
+ start: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.pos : 0,
+ length: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.end - sourceFile.checkJsDirective.pos : 0
+ },
+ newText: "// @ts-nocheck" + newLineCharacter
}]
- }];
+ }]
+ }];
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ function newNodesToChanges(newNodes, insertAfter, context) {
+ var sourceFile = context.sourceFile;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ for (var _i = 0, newNodes_1 = newNodes; _i < newNodes_1.length; _i++) {
+ var newNode = newNodes_1[_i];
+ changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: context.newLineCharacter });
+ }
+ var changes = changeTracker.getChanges();
+ if (!ts.some(changes)) {
+ return changes;
+ }
+ ts.Debug.assert(changes.length === 1);
+ var consolidatedChanges = [{
+ fileName: changes[0].fileName,
+ textChanges: [{
+ span: changes[0].textChanges[0].span,
+ newText: changes[0].textChanges.reduce(function (prev, cur) { return prev + cur.newText; }, "")
+ }]
+ }];
+ return consolidatedChanges;
+ }
+ codefix.newNodesToChanges = newNodesToChanges;
+ /**
+ * Finds members of the resolved type that are missing in the class pointed to by class decl
+ * and generates source code for the missing members.
+ * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for.
+ * @returns Empty string iff there are no member insertions.
+ */
+ function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, checker) {
+ var classMembers = classDeclaration.symbol.members;
+ var missingMembers = possiblyMissingSymbols.filter(function (symbol) { return !classMembers.has(symbol.getName()); });
+ var newNodes = [];
+ for (var _i = 0, missingMembers_1 = missingMembers; _i < missingMembers_1.length; _i++) {
+ var symbol = missingMembers_1[_i];
+ var newNode = createNewNodeForMemberSymbol(symbol, classDeclaration, checker);
+ if (newNode) {
+ if (Array.isArray(newNode)) {
+ newNodes = newNodes.concat(newNode);
+ }
+ else {
+ newNodes.push(newNode);
+ }
}
- function removeSingleItem(elements, token) {
- if (elements[0] === token.parent) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos + 1);
+ }
+ return newNodes;
+ }
+ codefix.createMissingMemberNodes = createMissingMemberNodes;
+ /**
+ * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`.
+ */
+ function createNewNodeForMemberSymbol(symbol, enclosingDeclaration, checker) {
+ var declarations = symbol.getDeclarations();
+ if (!(declarations && declarations.length)) {
+ return undefined;
+ }
+ var declaration = declarations[0];
+ // Clone name to remove leading trivia.
+ var name = ts.getSynthesizedClone(declaration.name);
+ var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
+ var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
+ var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
+ var optional = !!(symbol.flags & 67108864 /* Optional */);
+ switch (declaration.kind) {
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 147 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ var typeNode = checker.typeToTypeNode(type, enclosingDeclaration);
+ var property = ts.createProperty(
+ /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeNode,
+ /*initializer*/ undefined);
+ return property;
+ case 149 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ // The signature for the implementation appears as an entry in `signatures` iff
+ // there is only one signature.
+ // If there are overloads and an implementation signature, it appears as an
+ // extra declaration that isn't a signature for `type`.
+ // If there is more than one overload but no implementation signature
+ // (eg: an abstract method or interface declaration), there is a 1-1
+ // correspondence of declarations and signatures.
+ var signatures = checker.getSignaturesOfType(type, 0 /* Call */);
+ if (!ts.some(signatures)) {
+ return undefined;
+ }
+ if (declarations.length === 1) {
+ ts.Debug.assert(signatures.length === 1);
+ var signature = signatures[0];
+ return signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ }
+ var signatureDeclarations = [];
+ for (var i = 0; i < signatures.length; i++) {
+ var signature = signatures[i];
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration);
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
+ }
+ if (declarations.length > signatures.length) {
+ var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]);
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
}
else {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 1);
+ ts.Debug.assert(declarations.length === signatures.length);
+ var methodImplementingSignatures = createMethodImplementingSignatures(signatures, name, optional, modifiers);
+ signatureDeclarations.push(methodImplementingSignatures);
}
+ return signatureDeclarations;
+ default:
+ return undefined;
+ }
+ function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150 /* MethodDeclaration */, enclosingDeclaration);
+ if (signatureDeclaration) {
+ signatureDeclaration.decorators = undefined;
+ signatureDeclaration.modifiers = modifiers;
+ signatureDeclaration.name = name;
+ signatureDeclaration.questionToken = optional ? ts.createToken(54 /* QuestionToken */) : undefined;
+ signatureDeclaration.body = body;
}
+ return signatureDeclaration;
}
- });
+ }
+ function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
+ /** This is *a* signature with the maximal number of arguments,
+ * such that if there is a "maximal" signature without rest arguments,
+ * this is one of them.
+ */
+ var maxArgsSignature = signatures[0];
+ var minArgumentCount = signatures[0].minArgumentCount;
+ var someSigHasRestParameter = false;
+ for (var i = 0; i < signatures.length; i++) {
+ var sig = signatures[i];
+ minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount);
+ if (sig.hasRestParameter) {
+ someSigHasRestParameter = true;
+ }
+ if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) {
+ maxArgsSignature = sig;
+ }
+ }
+ var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0);
+ var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); });
+ var parameters = [];
+ for (var i = 0; i < maxNonRestArgs; i++) {
+ var anyType = ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ var newParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i],
+ /*questionToken*/ i >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyType,
+ /*initializer*/ undefined);
+ parameters.push(newParameter);
+ }
+ if (someSigHasRestParameter) {
+ var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118 /* AnyKeyword */));
+ var restParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createToken(23 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest",
+ /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyArrayType,
+ /*initializer*/ undefined);
+ parameters.push(restParameter);
+ }
+ return createStubbedMethod(modifiers, name, optional,
+ /*typeParameters*/ undefined, parameters,
+ /*returnType*/ undefined);
+ }
+ function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
+ return ts.createMethodDeclaration(
+ /*decorators*/ undefined, modifiers,
+ /*asteriskToken*/ undefined, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ }
+ codefix.createStubbedMethod = createStubbedMethod;
+ function createStubbedMethodBody() {
+ return ts.createBlock([ts.createThrow(ts.createNew(ts.createIdentifier("Error"),
+ /*typeArguments*/ undefined, [ts.createLiteral("Method not implemented.")]))],
+ /*multiline*/ true);
+ }
+ function createVisibilityModifier(flags) {
+ if (flags & 4 /* Public */) {
+ return ts.createToken(113 /* PublicKeyword */);
+ }
+ else if (flags & 16 /* Protected */) {
+ return ts.createToken(112 /* ProtectedKeyword */);
+ }
+ return undefined;
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
-///<reference path='superFixes.ts' />
-///<reference path='importFixes.ts' />
-///<reference path='unusedIdentifierFixes.ts' />
+/// <reference path="fixClassIncorrectlyImplementsInterface.ts" />
+/// <reference path="fixAddMissingMember.ts" />
+/// <reference path="fixClassDoesntImplementInheritedAbstractMember.ts" />
+/// <reference path="fixClassSuperMustPrecedeThisAccess.ts" />
+/// <reference path="fixConstructorForDerivedNeedSuperCall.ts" />
+/// <reference path="fixExtendsInterfaceBecomesImplements.ts" />
+/// <reference path="fixForgottenThisPropertyAccess.ts" />
+/// <reference path='unusedIdentifierFixes.ts' />
+/// <reference path='importFixes.ts' />
+/// <reference path='disableJsDiagnostics.ts' />
+/// <reference path='helpers.ts' />
/// <reference path="..\compiler\program.ts"/>
/// <reference path="..\compiler\commandLineParser.ts"/>
/// <reference path='types.ts' />
@@ -77883,7 +84976,6 @@ var ts;
/// <reference path='documentRegistry.ts' />
/// <reference path='findAllReferences.ts' />
/// <reference path='goToDefinition.ts' />
-/// <reference path='goToImplementation.ts' />
/// <reference path='jsDoc.ts' />
/// <reference path='jsTyping.ts' />
/// <reference path='navigateTo.ts' />
@@ -77897,14 +84989,15 @@ var ts;
/// <reference path='transpile.ts' />
/// <reference path='formatting\formatting.ts' />
/// <reference path='formatting\smartIndenter.ts' />
-/// <reference path='codefixes\codeFixProvider.ts' />
+/// <reference path='textChanges.ts' />
+/// <reference path='codeFixProvider.ts' />
/// <reference path='codefixes\fixes.ts' />
var ts;
(function (ts) {
/** The version of the language service API */
ts.servicesVersion = "0.5";
function createNode(kind, pos, end, parent) {
- var node = kind >= 141 /* FirstNode */ ? new NodeObject(kind, pos, end) :
+ var node = kind >= 142 /* FirstNode */ ? new NodeObject(kind, pos, end) :
kind === 70 /* Identifier */ ? new IdentifierObject(70 /* Identifier */, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -77962,11 +85055,11 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(292 /* SyntaxList */, nodes.pos, nodes.end, this);
+ var list = createNode(293 /* SyntaxList */, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
- for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
- var node = nodes_7[_i];
+ for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
+ var node = nodes_9[_i];
if (pos < node.pos) {
pos = this.addSyntheticNodes(list._children, pos, node.pos);
}
@@ -77981,11 +85074,11 @@ var ts;
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
var children;
- if (this.kind >= 141 /* FirstNode */) {
+ if (this.kind >= 142 /* FirstNode */) {
ts.scanner.setText((sourceFile || this.getSourceFile()).text);
children = [];
var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 278 /* FirstJSDocTagNode */ && this.kind <= 291 /* LastJSDocTagNode */;
+ var useJSDocScanner_1 = this.kind >= 282 /* FirstJSDocTagNode */ && this.kind <= 292 /* LastJSDocTagNode */;
var processNode = function (node) {
var isJSDocTagNode = ts.isJSDocTag(node);
if (!isJSDocTagNode && pos_3 < node.pos) {
@@ -78042,8 +85135,10 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = children[0];
- return child.kind < 141 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
+ var child = ts.find(children, function (kid) { return kid.kind < 266 /* FirstJSDocNode */ || kid.kind > 292 /* LastJSDocNode */; });
+ return child.kind < 142 /* FirstNode */ ?
+ child :
+ child.getFirstToken(sourceFile);
};
NodeObject.prototype.getLastToken = function (sourceFile) {
var children = this.getChildren(sourceFile);
@@ -78051,7 +85146,10 @@ var ts;
if (!child) {
return undefined;
}
- return child.kind < 141 /* FirstNode */ ? child : child.getLastToken(sourceFile);
+ return child.kind < 142 /* FirstNode */ ? child : child.getLastToken(sourceFile);
+ };
+ NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) {
+ return ts.forEachChild(this, cbNode, cbNodeArray);
};
return NodeObject;
}());
@@ -78105,6 +85203,9 @@ var ts;
TokenOrIdentifierObject.prototype.getLastToken = function () {
return undefined;
};
+ TokenOrIdentifierObject.prototype.forEachChild = function () {
+ return undefined;
+ };
return TokenOrIdentifierObject;
}());
var SymbolObject = (function () {
@@ -78127,6 +85228,12 @@ var ts;
}
return this.documentationComment;
};
+ SymbolObject.prototype.getJsDocTags = function () {
+ if (this.tags === undefined) {
+ this.tags = ts.JsDoc.getJsDocTagsFromDeclarations(this.declarations);
+ }
+ return this.tags;
+ };
return SymbolObject;
}());
var TokenObject = (function (_super) {
@@ -78210,6 +85317,12 @@ var ts;
}
return this.documentationComment;
};
+ SignatureObject.prototype.getJsDocTags = function () {
+ if (this.jsDocTags === undefined) {
+ this.jsDocTags = this.declaration ? ts.JsDoc.getJsDocTagsFromDeclarations([this.declaration]) : [];
+ }
+ return this.jsDocTags;
+ };
return SignatureObject;
}());
var SourceFileObject = (function (_super) {
@@ -78250,17 +85363,21 @@ var ts;
return this.namedDeclarations;
};
SourceFileObject.prototype.computeNamedDeclarations = function () {
- var result = ts.createMap();
+ var result = ts.createMultiMap();
ts.forEachChild(this, visit);
return result;
function addDeclaration(declaration) {
var name = getDeclarationName(declaration);
if (name) {
- ts.multiMapAdd(result, name, declaration);
+ result.add(name, declaration);
}
}
function getDeclarations(name) {
- return result[name] || (result[name] = []);
+ var declarations = result.get(name);
+ if (!declarations) {
+ result.set(name, declarations = []);
+ }
+ return declarations;
}
function getDeclarationName(declaration) {
if (declaration.name) {
@@ -78268,9 +85385,9 @@ var ts;
if (result_7 !== undefined) {
return result_7;
}
- if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ if (declaration.name.kind === 143 /* ComputedPropertyName */) {
var expr = declaration.name.expression;
- if (expr.kind === 177 /* PropertyAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */) {
return expr.name.text;
}
return getTextOfIdentifierOrLiteral(expr);
@@ -78290,10 +85407,10 @@ var ts;
}
function visit(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
var functionDeclaration = node;
var declarationName = getDeclarationName(functionDeclaration);
if (declarationName) {
@@ -78310,35 +85427,35 @@ var ts;
else {
declarations.push(functionDeclaration);
}
- ts.forEachChild(node, visit);
}
+ ts.forEachChild(node, visit);
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 161 /* TypeLiteral */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 162 /* TypeLiteral */:
addDeclaration(node);
ts.forEachChild(node, visit);
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Only consider parameter properties
if (!ts.hasModifier(node, 92 /* ParameterPropertyModifier */)) {
break;
}
- // fall through
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */: {
+ // falls through
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */: {
var decl = node;
if (ts.isBindingPattern(decl.name)) {
ts.forEachChild(decl.name, visit);
@@ -78347,19 +85464,20 @@ var ts;
if (decl.initializer)
visit(decl.initializer);
}
- case 260 /* EnumMember */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ // falls through
+ case 263 /* EnumMember */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
addDeclaration(node);
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// Handle named exports case e.g.:
// export {a, b as B} from "mod";
if (node.exportClause) {
ts.forEach(node.exportClause.elements, visit);
}
break;
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
var importClause = node.importClause;
if (importClause) {
// Handle default import case e.g.:
@@ -78371,7 +85489,7 @@ var ts;
// import * as NS from "mod";
// import {a, b as B} from "mod";
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause.namedBindings.kind === 239 /* NamespaceImport */) {
addDeclaration(importClause.namedBindings);
}
else {
@@ -78620,6 +85738,36 @@ var ts;
};
return CancellationTokenObject;
}());
+ /* @internal */
+ /** A cancellation that throttles calls to the host */
+ var ThrottledCancellationToken = (function () {
+ function ThrottledCancellationToken(hostCancellationToken, throttleWaitMilliseconds) {
+ if (throttleWaitMilliseconds === void 0) { throttleWaitMilliseconds = 20; }
+ this.hostCancellationToken = hostCancellationToken;
+ this.throttleWaitMilliseconds = throttleWaitMilliseconds;
+ // Store when we last tried to cancel. Checking cancellation can be expensive (as we have
+ // to marshall over to the host layer). So we only bother actually checking once enough
+ // time has passed.
+ this.lastCancellationCheckTime = 0;
+ }
+ ThrottledCancellationToken.prototype.isCancellationRequested = function () {
+ var time = ts.timestamp();
+ var duration = Math.abs(time - this.lastCancellationCheckTime);
+ if (duration >= this.throttleWaitMilliseconds) {
+ // Check no more than once every throttle wait milliseconds
+ this.lastCancellationCheckTime = time;
+ return this.hostCancellationToken.isCancellationRequested();
+ }
+ return false;
+ };
+ ThrottledCancellationToken.prototype.throwIfCancellationRequested = function () {
+ if (this.isCancellationRequested()) {
+ throw new ts.OperationCanceledException();
+ }
+ };
+ return ThrottledCancellationToken;
+ }());
+ ts.ThrottledCancellationToken = ThrottledCancellationToken;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
@@ -78801,6 +85949,7 @@ var ts;
ts.Debug.assert(hostFileInformation.scriptKind === oldSourceFile.scriptKind, "Registered script kind (" + oldSourceFile.scriptKind + ") should match new script kind (" + hostFileInformation.scriptKind + ") for file: " + path);
return documentRegistry.updateDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
}
+ // We didn't already have the file. Fall through and acquire it from the registry.
}
// Could not find this file in the old program, create a new SourceFile for it.
return documentRegistry.acquireDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
@@ -78901,10 +86050,10 @@ var ts;
// Try getting just type at this position and show
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
case 98 /* ThisKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
case 96 /* SuperKeyword */:
// For the identifiers/this/super etc get the type at position
var type = typeChecker.getTypeAtLocation(node);
@@ -78914,7 +86063,8 @@ var ts;
kindModifiers: ts.ScriptElementKindModifier.none,
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: ts.typeToDisplayParts(typeChecker, type, ts.getContainerNode(node)),
- documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined
+ documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined,
+ tags: type.symbol ? type.symbol.getJsDocTags() : undefined
};
}
}
@@ -78926,7 +86076,8 @@ var ts;
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: displayPartsDocumentationsAndKind.displayParts,
- documentation: displayPartsDocumentationsAndKind.documentation
+ documentation: displayPartsDocumentationsAndKind.documentation,
+ tags: displayPartsDocumentationsAndKind.tags
};
}
/// Goto definition
@@ -78934,22 +86085,23 @@ var ts;
synchronizeHostData();
return ts.GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position);
}
- /// Goto implementation
- function getImplementationAtPosition(fileName, position) {
- synchronizeHostData();
- return ts.GoToImplementation.getImplementationAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), ts.getTouchingPropertyName(getValidSourceFile(fileName), position));
- }
function getTypeDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position);
}
+ /// Goto implementation
+ function getImplementationAtPosition(fileName, position) {
+ synchronizeHostData();
+ return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ }
+ /// References and Occurrences
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
if (results) {
- var sourceFile_2 = getCanonicalFileName(ts.normalizeSlashes(fileName));
+ var sourceFile_1 = getCanonicalFileName(ts.normalizeSlashes(fileName));
// Get occurrences only supports reporting occurrences for the file queried. So
// filter down to that list.
- results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_2; });
+ results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_1; });
}
return results;
}
@@ -78959,9 +86111,7 @@ var ts;
var sourceFile = getValidSourceFile(fileName);
return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
}
- /// References and Occurrences
function getOccurrencesAtPositionCore(fileName, position) {
- synchronizeHostData();
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
function convertDocumentHighlights(documentHighlights) {
if (!documentHighlights) {
@@ -78976,7 +86126,8 @@ var ts;
fileName: entry.fileName,
textSpan: highlightSpan.textSpan,
isWriteAccess: highlightSpan.kind === ts.HighlightSpanKind.writtenReference,
- isDefinition: false
+ isDefinition: false,
+ isInString: highlightSpan.isInString,
});
}
}
@@ -78984,21 +86135,18 @@ var ts;
}
}
function findRenameLocations(fileName, position, findInStrings, findInComments) {
- var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position, { findInStrings: findInStrings, findInComments: findInComments, isForRename: true });
}
function getReferencesAtPosition(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, /*findInStrings*/ false, /*findInComments*/ false);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position);
}
- function findReferences(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, /*findInStrings*/ false, /*findInComments*/ false);
- // Only include referenced symbols that have a valid definition.
- return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; });
+ function getReferences(fileName, position, options) {
+ synchronizeHostData();
+ return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
- function findReferencedSymbols(fileName, position, findInStrings, findInComments) {
+ function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, findInStrings, findInComments);
+ return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// NavigateTo
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
@@ -79017,7 +86165,8 @@ var ts;
text: data
});
}
- var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles);
+ var customTransformers = host.getCustomTransformers && host.getCustomTransformers();
+ var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers);
return {
outputFiles: outputFiles,
emitSkipped: emitOutput.emitSkipped
@@ -79047,15 +86196,15 @@ var ts;
return;
}
switch (node.kind) {
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
case 9 /* StringLiteral */:
case 85 /* FalseKeyword */:
case 100 /* TrueKeyword */:
case 94 /* NullKeyword */:
case 96 /* SuperKeyword */:
case 98 /* ThisKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
case 70 /* Identifier */:
break;
// Cant create the text span
@@ -79072,7 +86221,7 @@ var ts;
// If this is name of a module declarations, check if this is right side of dotted module name
// If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of
// Then this name is name from dotted module
- if (nodeForStartPos.parent.parent.kind === 230 /* ModuleDeclaration */ &&
+ if (nodeForStartPos.parent.parent.kind === 232 /* ModuleDeclaration */ &&
nodeForStartPos.parent.parent.body === nodeForStartPos.parent) {
// Use parent module declarations name for start pos
nodeForStartPos = nodeForStartPos.parent.parent.name;
@@ -79095,10 +86244,10 @@ var ts;
return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position);
}
function getNavigationBarItems(fileName) {
- return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function getNavigationTree(fileName) {
- return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function isTsOrTsxFile(fileName) {
var kind = ts.getScriptKind(fileName, host);
@@ -79131,7 +86280,7 @@ var ts;
function getOutliningSpans(fileName) {
// doesn't use compiler - no need to synchronize with host
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- return ts.OutliningElementsCollector.collectElements(sourceFile);
+ return ts.OutliningElementsCollector.collectElements(sourceFile, cancellationToken);
}
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
@@ -79209,13 +86358,13 @@ var ts;
}
return [];
}
- function getCodeFixesAtPosition(fileName, start, end, errorCodes) {
+ function getCodeFixesAtPosition(fileName, start, end, errorCodes, formatOptions) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
var span = { start: start, length: end - start };
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
var allFixes = [];
- ts.forEach(errorCodes, function (error) {
+ ts.forEach(ts.deduplicate(errorCodes), function (error) {
cancellationToken.throwIfCancellationRequested();
var context = {
errorCode: error,
@@ -79224,7 +86373,8 @@ var ts;
program: program,
newLineCharacter: newLineChar,
host: host,
- cancellationToken: cancellationToken
+ cancellationToken: cancellationToken,
+ rulesProvider: getRuleProvider(formatOptions)
};
var fixes = ts.codefix.getFixes(context);
if (fixes) {
@@ -79248,7 +86398,7 @@ var ts;
}
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
// Check if in a context where we don't want to perform any insertion
- if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position)) {
+ if (ts.isInString(sourceFile, position)) {
return false;
}
if (ts.isInsideJsxElementOrAttribute(sourceFile, position)) {
@@ -79304,7 +86454,7 @@ var ts;
continue;
}
var descriptor = undefined;
- for (var i = 0, n = descriptors.length; i < n; i++) {
+ for (var i = 0; i < descriptors.length; i++) {
if (matchArray[i + firstDescriptorCaptureIndex]) {
descriptor = descriptors[i];
}
@@ -79435,6 +86585,7 @@ var ts;
}
ts.createLanguageService = createLanguageService;
/* @internal */
+ /** Names in the name table are escaped, so an identifier `__foo` will have a name table entry `___foo`. */
function getNameTable(sourceFile) {
if (!sourceFile.nameTable) {
initializeNameTable(sourceFile);
@@ -79449,7 +86600,7 @@ var ts;
function walk(node) {
switch (node.kind) {
case 70 /* Identifier */:
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
break;
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -79458,10 +86609,10 @@ var ts;
// then we want 'something' to be in the name table. Similarly, if we have
// "a['propname']" then we want to store "propname" in the name table.
if (ts.isDeclarationName(node) ||
- node.parent.kind === 245 /* ExternalModuleReference */ ||
+ node.parent.kind === 247 /* ExternalModuleReference */ ||
isArgumentOfElementAccessExpression(node) ||
ts.isLiteralComputedPropertyDeclarationName(node)) {
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
}
break;
default:
@@ -79474,18 +86625,79 @@ var ts;
}
}
}
+ function setNameTable(text, node) {
+ nameTable.set(text, nameTable.get(text) === undefined ? node.pos : -1);
+ }
+ }
+ function isObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return true;
+ }
+ return false;
+ }
+ /**
+ * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 }
+ */
+ /* @internal */
+ function getContainingObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ if (node.parent.kind === 143 /* ComputedPropertyName */) {
+ return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined;
+ }
+ // falls through
+ case 70 /* Identifier */:
+ return isObjectLiteralElement(node.parent) &&
+ (node.parent.parent.kind === 177 /* ObjectLiteralExpression */ || node.parent.parent.kind === 253 /* JsxAttributes */) &&
+ node.parent.name === node ? node.parent : undefined;
+ }
+ return undefined;
+ }
+ ts.getContainingObjectLiteralElement = getContainingObjectLiteralElement;
+ /* @internal */
+ function getPropertySymbolsFromContextualType(typeChecker, node) {
+ var objectLiteral = node.parent;
+ var contextualType = typeChecker.getContextualType(objectLiteral);
+ var name = ts.getTextOfPropertyName(node.name);
+ if (name && contextualType) {
+ var result_8 = [];
+ var symbol = contextualType.getProperty(name);
+ if (contextualType.flags & 65536 /* Union */) {
+ ts.forEach(contextualType.types, function (t) {
+ var symbol = t.getProperty(name);
+ if (symbol) {
+ result_8.push(symbol);
+ }
+ });
+ return result_8;
+ }
+ if (symbol) {
+ result_8.push(symbol);
+ return result_8;
+ }
+ }
+ return undefined;
}
+ ts.getPropertySymbolsFromContextualType = getPropertySymbolsFromContextualType;
function isArgumentOfElementAccessExpression(node) {
return node &&
node.parent &&
- node.parent.kind === 178 /* ElementAccessExpression */ &&
+ node.parent.kind === 179 /* ElementAccessExpression */ &&
node.parent.argumentExpression === node;
}
/**
- * Get the path of the default library files (lib.d.ts) as distributed with the typescript
- * node package.
- * The functionality is not supported if the ts module is consumed outside of a node module.
- */
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
function getDefaultLibFilePath(options) {
// Check __dirname is defined and that we are on a node.js system.
if (typeof __dirname !== "undefined") {
@@ -79494,10 +86706,7 @@ var ts;
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
}
ts.getDefaultLibFilePath = getDefaultLibFilePath;
- function initializeServices() {
- ts.objectAllocator = getServicesObjectAllocator();
- }
- initializeServices();
+ ts.objectAllocator = getServicesObjectAllocator();
})(ts || (ts = {}));
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.
@@ -79562,113 +86771,114 @@ var ts;
function spanInNode(node) {
if (node) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// Span on first variable declaration
return spanInVariableDeclaration(node.declarationList.declarations[0]);
- case 223 /* VariableDeclaration */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 225 /* VariableDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return spanInVariableDeclaration(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return spanInParameterDeclaration(node);
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return spanInFunctionDeclaration(node);
- case 204 /* Block */:
+ case 206 /* Block */:
if (ts.isFunctionBlock(node)) {
return spanInFunctionBlock(node);
}
- // Fall through
- case 231 /* ModuleBlock */:
+ // falls through
+ case 233 /* ModuleBlock */:
return spanInBlock(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return spanInBlock(node.block);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
// span on the expression
return textSpan(node.expression);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
// span on return keyword and expression if present
return textSpan(node.getChildAt(0), node.expression);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
// Span on while(...)
return textSpanEndingAtNextToken(node, node.expression);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// span in statement of the do statement
return spanInNode(node.statement);
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
// span on debugger keyword
return textSpan(node.getChildAt(0));
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
// set on if(..) span
return textSpanEndingAtNextToken(node, node.expression);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
// span in statement
return spanInNode(node.statement);
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
// On break or continue keyword and label if present
return textSpan(node.getChildAt(0), node.label);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return spanInForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
// span of for (a in ...)
return textSpanEndingAtNextToken(node, node.expression);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
// span in initializer
return spanInInitializerOfForLike(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
// span on switch(...)
return textSpanEndingAtNextToken(node, node.expression);
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
// span in first statement of the clause
return spanInNode(node.statements[0]);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
// span in try block
return spanInBlock(node.tryBlock);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
// span in throw ...
return textSpan(node, node.expression);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
// span on export = id
return textSpan(node, node.expression);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleReference);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleSpecifier);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleSpecifier);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// span on complete module if it is instantiated
if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return undefined;
}
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 174 /* BindingElement */:
+ // falls through
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 175 /* BindingElement */:
// span on complete node
return textSpan(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
// span in statement
return spanInNode(node.statement);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return spanInNodeArray(node.parent.decorators);
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return spanInBindingPattern(node);
// No breakpoint in interface, type alias
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return undefined;
// Tokens:
case 24 /* SemicolonToken */:
@@ -79698,7 +86908,7 @@ var ts;
case 73 /* CatchKeyword */:
case 86 /* FinallyKeyword */:
return spanInNextNode(node);
- case 140 /* OfKeyword */:
+ case 141 /* OfKeyword */:
return spanInOfKeyword(node);
default:
// Destructuring pattern in destructuring assignment
@@ -79711,13 +86921,13 @@ var ts;
// a or ...c or d: x from
// [a, b, ...c] or { a, b } or { d: x } from destructuring pattern
if ((node.kind === 70 /* Identifier */ ||
- node.kind == 196 /* SpreadElement */ ||
- node.kind === 257 /* PropertyAssignment */ ||
- node.kind === 258 /* ShorthandPropertyAssignment */) &&
+ node.kind === 197 /* SpreadElement */ ||
+ node.kind === 260 /* PropertyAssignment */ ||
+ node.kind === 261 /* ShorthandPropertyAssignment */) &&
ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
return textSpan(node);
}
- if (node.kind === 192 /* BinaryExpression */) {
+ if (node.kind === 193 /* BinaryExpression */) {
var binaryExpression = node;
// Set breakpoint in destructuring pattern if its destructuring assignment
// [a, b, c] or {a, b, c} of
@@ -79740,22 +86950,22 @@ var ts;
}
if (ts.isPartOfExpression(node)) {
switch (node.parent.kind) {
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// Set span as if on while keyword
return spanInPreviousNode(node);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Set breakpoint on the decorator emit
return spanInNode(node.parent);
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
return textSpan(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
if (node.parent.operatorToken.kind === 25 /* CommaToken */) {
// If this is a comma expression, the breakpoint is possible in this expression
return textSpan(node);
}
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
if (node.parent.body === node) {
// If this is body of arrow function, it is allowed to have the breakpoint
return textSpan(node);
@@ -79764,13 +86974,13 @@ var ts;
}
}
// If this is name of property assignment, set breakpoint in the initializer
- if (node.parent.kind === 257 /* PropertyAssignment */ &&
+ if (node.parent.kind === 260 /* PropertyAssignment */ &&
node.parent.name === node &&
!ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {
return spanInNode(node.parent.initializer);
}
// Breakpoint in type assertion goes to its operand
- if (node.parent.kind === 182 /* TypeAssertionExpression */ && node.parent.type === node) {
+ if (node.parent.kind === 183 /* TypeAssertionExpression */ && node.parent.type === node) {
return spanInNextNode(node.parent.type);
}
// return type of function go to previous token
@@ -79778,8 +86988,8 @@ var ts;
return spanInPreviousNode(node);
}
// initializer of variable/parameter declaration go to previous node
- if ((node.parent.kind === 223 /* VariableDeclaration */ ||
- node.parent.kind === 144 /* Parameter */)) {
+ if ((node.parent.kind === 225 /* VariableDeclaration */ ||
+ node.parent.kind === 145 /* Parameter */)) {
var paramOrVarDecl = node.parent;
if (paramOrVarDecl.initializer === node ||
paramOrVarDecl.type === node ||
@@ -79787,7 +86997,7 @@ var ts;
return spanInPreviousNode(node);
}
}
- if (node.parent.kind === 192 /* BinaryExpression */) {
+ if (node.parent.kind === 193 /* BinaryExpression */) {
var binaryExpression = node.parent;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) &&
(binaryExpression.right === node ||
@@ -79801,8 +87011,8 @@ var ts;
}
}
function textSpanFromVariableDeclaration(variableDeclaration) {
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] === variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ &&
+ variableDeclaration.parent.declarations[0] === variableDeclaration) {
// First declaration - include let keyword
return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
}
@@ -79813,7 +87023,7 @@ var ts;
}
function spanInVariableDeclaration(variableDeclaration) {
// If declaration of for in statement, just set the span in parent
- if (variableDeclaration.parent.parent.kind === 212 /* ForInStatement */) {
+ if (variableDeclaration.parent.parent.kind === 214 /* ForInStatement */) {
return spanInNode(variableDeclaration.parent.parent);
}
// If this is a destructuring pattern, set breakpoint in binding pattern
@@ -79824,11 +87034,11 @@ var ts;
// or its declaration from 'for of'
if (variableDeclaration.initializer ||
ts.hasModifier(variableDeclaration, 1 /* Export */) ||
- variableDeclaration.parent.parent.kind === 213 /* ForOfStatement */) {
+ variableDeclaration.parent.parent.kind === 215 /* ForOfStatement */) {
return textSpanFromVariableDeclaration(variableDeclaration);
}
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] !== variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ &&
+ variableDeclaration.parent.declarations[0] !== variableDeclaration) {
// If we cannot set breakpoint on this declaration, set it on previous one
// Because the variable declaration may be binding pattern and
// we would like to set breakpoint in last binding element if that's the case,
@@ -79864,7 +87074,7 @@ var ts;
}
function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) {
return ts.hasModifier(functionDeclaration, 1 /* Export */) ||
- (functionDeclaration.parent.kind === 226 /* ClassDeclaration */ && functionDeclaration.kind !== 150 /* Constructor */);
+ (functionDeclaration.parent.kind === 228 /* ClassDeclaration */ && functionDeclaration.kind !== 151 /* Constructor */);
}
function spanInFunctionDeclaration(functionDeclaration) {
// No breakpoints in the function signature
@@ -79887,25 +87097,26 @@ var ts;
}
function spanInBlock(block) {
switch (block.parent.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) {
return undefined;
}
+ // falls through
// Set on parent if on same line otherwise on first statement
- case 210 /* WhileStatement */:
- case 208 /* IfStatement */:
- case 212 /* ForInStatement */:
+ case 212 /* WhileStatement */:
+ case 210 /* IfStatement */:
+ case 214 /* ForInStatement */:
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
// Set span on previous token if it starts on same line otherwise on the first statement of the block
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
}
// Default action is to set on first statement
return spanInNode(block.statements[0]);
}
function spanInInitializerOfForLike(forLikeStatement) {
- if (forLikeStatement.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (forLikeStatement.initializer.kind === 226 /* VariableDeclarationList */) {
// Declaration list - set breakpoint in first declaration
var variableDeclarationList = forLikeStatement.initializer;
if (variableDeclarationList.declarations.length > 0) {
@@ -79930,23 +87141,23 @@ var ts;
}
function spanInBindingPattern(bindingPattern) {
// Set breakpoint in first binding element
- var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 198 /* OmittedExpression */ ? element : undefined; });
+ var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
// Empty binding pattern of binding element, set breakpoint on binding element
- if (bindingPattern.parent.kind === 174 /* BindingElement */) {
+ if (bindingPattern.parent.kind === 175 /* BindingElement */) {
return textSpan(bindingPattern.parent);
}
// Variable declaration is used as the span
return textSpanFromVariableDeclaration(bindingPattern.parent);
}
function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- ts.Debug.assert(node.kind !== 173 /* ArrayBindingPattern */ && node.kind !== 172 /* ObjectBindingPattern */);
- var elements = node.kind === 175 /* ArrayLiteralExpression */ ?
+ ts.Debug.assert(node.kind !== 174 /* ArrayBindingPattern */ && node.kind !== 173 /* ObjectBindingPattern */);
+ var elements = node.kind === 176 /* ArrayLiteralExpression */ ?
node.elements :
node.properties;
- var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 198 /* OmittedExpression */ ? element : undefined; });
+ var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
@@ -79954,18 +87165,18 @@ var ts;
// just nested element in another destructuring assignment
// set breakpoint on assignment when parent is destructuring assignment
// Otherwise set breakpoint for this element
- return textSpan(node.parent.kind === 192 /* BinaryExpression */ ? node.parent : node);
+ return textSpan(node.parent.kind === 193 /* BinaryExpression */ ? node.parent : node);
}
// Tokens:
function spanInOpenBraceToken(node) {
switch (node.parent.kind) {
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
var enumDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile));
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var classDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile));
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]);
}
// Default to parent node
@@ -79973,24 +87184,25 @@ var ts;
}
function spanInCloseBraceToken(node) {
switch (node.parent.kind) {
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
// If this is not an instantiated module block, no bp span
if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) {
return undefined;
}
- case 229 /* EnumDeclaration */:
- case 226 /* ClassDeclaration */:
+ // falls through
+ case 231 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
// Span on close brace token
return textSpan(node);
- case 204 /* Block */:
+ case 206 /* Block */:
if (ts.isFunctionBlock(node.parent)) {
// Span on close brace token
return textSpan(node);
}
- // fall through
- case 256 /* CatchClause */:
+ // falls through
+ case 259 /* CatchClause */:
return spanInNode(ts.lastOrUndefined(node.parent.statements));
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
// breakpoint in last statement of the last clause
var caseBlock = node.parent;
var lastClause = ts.lastOrUndefined(caseBlock.clauses);
@@ -79998,7 +87210,7 @@ var ts;
return spanInNode(ts.lastOrUndefined(lastClause.statements));
}
return undefined;
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
// Breakpoint in last binding element or binding pattern if it contains no elements
var bindingPattern = node.parent;
return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
@@ -80014,7 +87226,7 @@ var ts;
}
function spanInCloseBracketToken(node) {
switch (node.parent.kind) {
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
// Breakpoint in last binding element or binding pattern if it contains no elements
var bindingPattern = node.parent;
return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
@@ -80029,12 +87241,12 @@ var ts;
}
}
function spanInOpenParenToken(node) {
- if (node.parent.kind === 209 /* DoStatement */ ||
- node.parent.kind === 179 /* CallExpression */ ||
- node.parent.kind === 180 /* NewExpression */) {
+ if (node.parent.kind === 211 /* DoStatement */ ||
+ node.parent.kind === 180 /* CallExpression */ ||
+ node.parent.kind === 181 /* NewExpression */) {
return spanInPreviousNode(node);
}
- if (node.parent.kind === 183 /* ParenthesizedExpression */) {
+ if (node.parent.kind === 184 /* ParenthesizedExpression */) {
return spanInNextNode(node);
}
// Default to parent node
@@ -80043,21 +87255,21 @@ var ts;
function spanInCloseParenToken(node) {
// Is this close paren token of parameter list, set span in previous token
switch (node.parent.kind) {
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 183 /* ParenthesizedExpression */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 184 /* ParenthesizedExpression */:
return spanInPreviousNode(node);
// Default to parent node
default:
@@ -80067,20 +87279,20 @@ var ts;
function spanInColonToken(node) {
// Is this : specifying return annotation of the function declaration
if (ts.isFunctionLike(node.parent) ||
- node.parent.kind === 257 /* PropertyAssignment */ ||
- node.parent.kind === 144 /* Parameter */) {
+ node.parent.kind === 260 /* PropertyAssignment */ ||
+ node.parent.kind === 145 /* Parameter */) {
return spanInPreviousNode(node);
}
return spanInNode(node.parent);
}
function spanInGreaterThanOrLessThanToken(node) {
- if (node.parent.kind === 182 /* TypeAssertionExpression */) {
+ if (node.parent.kind === 183 /* TypeAssertionExpression */) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInWhileKeyword(node) {
- if (node.parent.kind === 209 /* DoStatement */) {
+ if (node.parent.kind === 211 /* DoStatement */) {
// Set span on while expression
return textSpanEndingAtNextToken(node, node.parent.expression);
}
@@ -80088,7 +87300,7 @@ var ts;
return spanInNode(node.parent);
}
function spanInOfKeyword(node) {
- if (node.parent.kind === 213 /* ForOfStatement */) {
+ if (node.parent.kind === 215 /* ForOfStatement */) {
// Set using next token
return spanInNextNode(node);
}
@@ -80100,6 +87312,26 @@ var ts;
BreakpointResolver.spanInSourceFileAtLocation = spanInSourceFileAtLocation;
})(BreakpointResolver = ts.BreakpointResolver || (ts.BreakpointResolver = {}));
})(ts || (ts = {}));
+/// <reference path="..\compiler\transformer.ts"/>
+/// <reference path="transpile.ts"/>
+var ts;
+(function (ts) {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform(source, transformers, compilerOptions) {
+ var diagnostics = [];
+ compilerOptions = ts.fixupCompilerOptions(compilerOptions, diagnostics);
+ var nodes = ts.isArray(source) ? source : [source];
+ var result = ts.transformNodes(/*resolver*/ undefined, /*emitHost*/ undefined, compilerOptions, nodes, transformers, /*allowDtsFiles*/ true);
+ result.diagnostics = ts.concatenate(result.diagnostics, diagnostics);
+ return result;
+ }
+ ts.transform = transform;
+})(ts || (ts = {}));
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
@@ -80141,8 +87373,7 @@ var ts;
ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) {
var oldSnapshotShim = oldSnapshot;
var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
- // TODO: should this be '==='?
- if (encoded == null) {
+ if (encoded === null) {
return null;
}
var decoded = JSON.parse(encoded);
@@ -80215,11 +87446,13 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () {
var settingsJson = this.shimHost.getCompilationSettings();
- // TODO: should this be '==='?
- if (settingsJson == null || settingsJson == "") {
+ if (settingsJson === null || settingsJson === "") {
throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
}
- return JSON.parse(settingsJson);
+ var compilerOptions = JSON.parse(settingsJson);
+ // permit language service to handle all files (filtering should be performed on the host side)
+ compilerOptions.allowNonTsExtensions = true;
+ return compilerOptions;
};
LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () {
var encoded = this.shimHost.getScriptFileNames();
@@ -80242,7 +87475,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () {
var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
- if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") {
+ if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") {
return null;
}
try {
@@ -80255,7 +87488,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () {
var hostCancellationToken = this.shimHost.getCancellationToken();
- return new ThrottledCancellationToken(hostCancellationToken);
+ return new ts.ThrottledCancellationToken(hostCancellationToken);
};
LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () {
return this.shimHost.getCurrentDirectory();
@@ -80279,27 +87512,6 @@ var ts;
return LanguageServiceShimHostAdapter;
}());
ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter;
- /** A cancellation that throttles calls to the host */
- var ThrottledCancellationToken = (function () {
- function ThrottledCancellationToken(hostCancellationToken) {
- this.hostCancellationToken = hostCancellationToken;
- // Store when we last tried to cancel. Checking cancellation can be expensive (as we have
- // to marshall over to the host layer). So we only bother actually checking once enough
- // time has passed.
- this.lastCancellationCheckTime = 0;
- }
- ThrottledCancellationToken.prototype.isCancellationRequested = function () {
- var time = ts.timestamp();
- var duration = Math.abs(time - this.lastCancellationCheckTime);
- if (duration > 10) {
- // Check no more than once every 10 ms.
- this.lastCancellationCheckTime = time;
- return this.hostCancellationToken.isCancellationRequested();
- }
- return false;
- };
- return ThrottledCancellationToken;
- }());
var CoreServicesShimHostAdapter = (function () {
function CoreServicesShimHostAdapter(shimHost) {
var _this = this;
@@ -80727,12 +87939,6 @@ var ts;
var compilerOptions = JSON.parse(compilerOptionsJson);
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
- if (resolvedFileName && !compilerOptions.allowJs && ts.fileExtensionIs(resolvedFileName, ".js")) {
- return {
- resolvedFileName: undefined,
- failedLookupLocations: []
- };
- }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -80877,7 +88083,7 @@ var ts;
this._shims.push(shim);
};
TypeScriptServicesFactory.prototype.unregisterShim = function (shim) {
- for (var i = 0, n = this._shims.length; i < n; i++) {
+ for (var i = 0; i < this._shims.length; i++) {
if (this._shims[i] === shim) {
delete this._shims[i];
return;
@@ -80906,4 +88112,4 @@ var TypeScript;
// 'toolsVersion' gets consumed by the managed side, so it's not unused.
// TODO: it should be moved into a namespace though.
/* @internal */
-var toolsVersion = "2.2";
+var toolsVersion = "2.3";
diff --git a/node_modules/typescript/lib/typescriptServices.d.ts b/node_modules/typescript/lib/typescriptServices.d.ts
index ecd018623..e47dfbe31 100644
--- a/node_modules/typescript/lib/typescriptServices.d.ts
+++ b/node_modules/typescript/lib/typescriptServices.d.ts
@@ -14,11 +14,36 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
interface MapLike<T> {
[index: string]: T;
}
- interface Map<T> extends MapLike<T> {
- __mapBrand: any;
+ /** ES6 Map interface. */
+ interface Map<T> {
+ get(key: string): T;
+ has(key: string): boolean;
+ set(key: string, value: T): this;
+ delete(key: string): boolean;
+ clear(): void;
+ forEach(action: (value: T, key: string) => void): void;
+ readonly size: number;
+ keys(): Iterator<string>;
+ values(): Iterator<T>;
+ entries(): Iterator<[string, T]>;
+ }
+ /** ES6 Iterator type. */
+ interface Iterator<T> {
+ next(): {
+ value: T;
+ done: false;
+ } | {
+ value: never;
+ done: true;
+ };
}
type Path = string & {
__pathBrand: any;
@@ -170,171 +195,171 @@ declare namespace ts {
ReadonlyKeyword = 130,
RequireKeyword = 131,
NumberKeyword = 132,
- SetKeyword = 133,
- StringKeyword = 134,
- SymbolKeyword = 135,
- TypeKeyword = 136,
- UndefinedKeyword = 137,
- FromKeyword = 138,
- GlobalKeyword = 139,
- OfKeyword = 140,
- QualifiedName = 141,
- ComputedPropertyName = 142,
- TypeParameter = 143,
- Parameter = 144,
- Decorator = 145,
- PropertySignature = 146,
- PropertyDeclaration = 147,
- MethodSignature = 148,
- MethodDeclaration = 149,
- Constructor = 150,
- GetAccessor = 151,
- SetAccessor = 152,
- CallSignature = 153,
- ConstructSignature = 154,
- IndexSignature = 155,
- TypePredicate = 156,
- TypeReference = 157,
- FunctionType = 158,
- ConstructorType = 159,
- TypeQuery = 160,
- TypeLiteral = 161,
- ArrayType = 162,
- TupleType = 163,
- UnionType = 164,
- IntersectionType = 165,
- ParenthesizedType = 166,
- ThisType = 167,
- TypeOperator = 168,
- IndexedAccessType = 169,
- MappedType = 170,
- LiteralType = 171,
- ObjectBindingPattern = 172,
- ArrayBindingPattern = 173,
- BindingElement = 174,
- ArrayLiteralExpression = 175,
- ObjectLiteralExpression = 176,
- PropertyAccessExpression = 177,
- ElementAccessExpression = 178,
- CallExpression = 179,
- NewExpression = 180,
- TaggedTemplateExpression = 181,
- TypeAssertionExpression = 182,
- ParenthesizedExpression = 183,
- FunctionExpression = 184,
- ArrowFunction = 185,
- DeleteExpression = 186,
- TypeOfExpression = 187,
- VoidExpression = 188,
- AwaitExpression = 189,
- PrefixUnaryExpression = 190,
- PostfixUnaryExpression = 191,
- BinaryExpression = 192,
- ConditionalExpression = 193,
- TemplateExpression = 194,
- YieldExpression = 195,
- SpreadElement = 196,
- ClassExpression = 197,
- OmittedExpression = 198,
- ExpressionWithTypeArguments = 199,
- AsExpression = 200,
- NonNullExpression = 201,
- TemplateSpan = 202,
- SemicolonClassElement = 203,
- Block = 204,
- VariableStatement = 205,
- EmptyStatement = 206,
- ExpressionStatement = 207,
- IfStatement = 208,
- DoStatement = 209,
- WhileStatement = 210,
- ForStatement = 211,
- ForInStatement = 212,
- ForOfStatement = 213,
- ContinueStatement = 214,
- BreakStatement = 215,
- ReturnStatement = 216,
- WithStatement = 217,
- SwitchStatement = 218,
- LabeledStatement = 219,
- ThrowStatement = 220,
- TryStatement = 221,
- DebuggerStatement = 222,
- VariableDeclaration = 223,
- VariableDeclarationList = 224,
- FunctionDeclaration = 225,
- ClassDeclaration = 226,
- InterfaceDeclaration = 227,
- TypeAliasDeclaration = 228,
- EnumDeclaration = 229,
- ModuleDeclaration = 230,
- ModuleBlock = 231,
- CaseBlock = 232,
- NamespaceExportDeclaration = 233,
- ImportEqualsDeclaration = 234,
- ImportDeclaration = 235,
- ImportClause = 236,
- NamespaceImport = 237,
- NamedImports = 238,
- ImportSpecifier = 239,
- ExportAssignment = 240,
- ExportDeclaration = 241,
- NamedExports = 242,
- ExportSpecifier = 243,
- MissingDeclaration = 244,
- ExternalModuleReference = 245,
- JsxElement = 246,
- JsxSelfClosingElement = 247,
- JsxOpeningElement = 248,
- JsxClosingElement = 249,
- JsxAttribute = 250,
- JsxSpreadAttribute = 251,
- JsxExpression = 252,
- CaseClause = 253,
- DefaultClause = 254,
- HeritageClause = 255,
- CatchClause = 256,
- PropertyAssignment = 257,
- ShorthandPropertyAssignment = 258,
- SpreadAssignment = 259,
- EnumMember = 260,
- SourceFile = 261,
- JSDocTypeExpression = 262,
- JSDocAllType = 263,
- JSDocUnknownType = 264,
- JSDocArrayType = 265,
- JSDocUnionType = 266,
- JSDocTupleType = 267,
- JSDocNullableType = 268,
- JSDocNonNullableType = 269,
- JSDocRecordType = 270,
- JSDocRecordMember = 271,
- JSDocTypeReference = 272,
- JSDocOptionalType = 273,
- JSDocFunctionType = 274,
- JSDocVariadicType = 275,
- JSDocConstructorType = 276,
- JSDocThisType = 277,
- JSDocComment = 278,
- JSDocTag = 279,
- JSDocAugmentsTag = 280,
- JSDocParameterTag = 281,
- JSDocReturnTag = 282,
- JSDocTypeTag = 283,
- JSDocTemplateTag = 284,
- JSDocTypedefTag = 285,
- JSDocPropertyTag = 286,
- JSDocTypeLiteral = 287,
- JSDocLiteralType = 288,
- JSDocNullKeyword = 289,
- JSDocUndefinedKeyword = 290,
- JSDocNeverKeyword = 291,
- SyntaxList = 292,
- NotEmittedStatement = 293,
- PartiallyEmittedExpression = 294,
- MergeDeclarationMarker = 295,
- EndOfDeclarationMarker = 296,
- RawExpression = 297,
+ ObjectKeyword = 133,
+ SetKeyword = 134,
+ StringKeyword = 135,
+ SymbolKeyword = 136,
+ TypeKeyword = 137,
+ UndefinedKeyword = 138,
+ FromKeyword = 139,
+ GlobalKeyword = 140,
+ OfKeyword = 141,
+ QualifiedName = 142,
+ ComputedPropertyName = 143,
+ TypeParameter = 144,
+ Parameter = 145,
+ Decorator = 146,
+ PropertySignature = 147,
+ PropertyDeclaration = 148,
+ MethodSignature = 149,
+ MethodDeclaration = 150,
+ Constructor = 151,
+ GetAccessor = 152,
+ SetAccessor = 153,
+ CallSignature = 154,
+ ConstructSignature = 155,
+ IndexSignature = 156,
+ TypePredicate = 157,
+ TypeReference = 158,
+ FunctionType = 159,
+ ConstructorType = 160,
+ TypeQuery = 161,
+ TypeLiteral = 162,
+ ArrayType = 163,
+ TupleType = 164,
+ UnionType = 165,
+ IntersectionType = 166,
+ ParenthesizedType = 167,
+ ThisType = 168,
+ TypeOperator = 169,
+ IndexedAccessType = 170,
+ MappedType = 171,
+ LiteralType = 172,
+ ObjectBindingPattern = 173,
+ ArrayBindingPattern = 174,
+ BindingElement = 175,
+ ArrayLiteralExpression = 176,
+ ObjectLiteralExpression = 177,
+ PropertyAccessExpression = 178,
+ ElementAccessExpression = 179,
+ CallExpression = 180,
+ NewExpression = 181,
+ TaggedTemplateExpression = 182,
+ TypeAssertionExpression = 183,
+ ParenthesizedExpression = 184,
+ FunctionExpression = 185,
+ ArrowFunction = 186,
+ DeleteExpression = 187,
+ TypeOfExpression = 188,
+ VoidExpression = 189,
+ AwaitExpression = 190,
+ PrefixUnaryExpression = 191,
+ PostfixUnaryExpression = 192,
+ BinaryExpression = 193,
+ ConditionalExpression = 194,
+ TemplateExpression = 195,
+ YieldExpression = 196,
+ SpreadElement = 197,
+ ClassExpression = 198,
+ OmittedExpression = 199,
+ ExpressionWithTypeArguments = 200,
+ AsExpression = 201,
+ NonNullExpression = 202,
+ MetaProperty = 203,
+ TemplateSpan = 204,
+ SemicolonClassElement = 205,
+ Block = 206,
+ VariableStatement = 207,
+ EmptyStatement = 208,
+ ExpressionStatement = 209,
+ IfStatement = 210,
+ DoStatement = 211,
+ WhileStatement = 212,
+ ForStatement = 213,
+ ForInStatement = 214,
+ ForOfStatement = 215,
+ ContinueStatement = 216,
+ BreakStatement = 217,
+ ReturnStatement = 218,
+ WithStatement = 219,
+ SwitchStatement = 220,
+ LabeledStatement = 221,
+ ThrowStatement = 222,
+ TryStatement = 223,
+ DebuggerStatement = 224,
+ VariableDeclaration = 225,
+ VariableDeclarationList = 226,
+ FunctionDeclaration = 227,
+ ClassDeclaration = 228,
+ InterfaceDeclaration = 229,
+ TypeAliasDeclaration = 230,
+ EnumDeclaration = 231,
+ ModuleDeclaration = 232,
+ ModuleBlock = 233,
+ CaseBlock = 234,
+ NamespaceExportDeclaration = 235,
+ ImportEqualsDeclaration = 236,
+ ImportDeclaration = 237,
+ ImportClause = 238,
+ NamespaceImport = 239,
+ NamedImports = 240,
+ ImportSpecifier = 241,
+ ExportAssignment = 242,
+ ExportDeclaration = 243,
+ NamedExports = 244,
+ ExportSpecifier = 245,
+ MissingDeclaration = 246,
+ ExternalModuleReference = 247,
+ JsxElement = 248,
+ JsxSelfClosingElement = 249,
+ JsxOpeningElement = 250,
+ JsxClosingElement = 251,
+ JsxAttribute = 252,
+ JsxAttributes = 253,
+ JsxSpreadAttribute = 254,
+ JsxExpression = 255,
+ CaseClause = 256,
+ DefaultClause = 257,
+ HeritageClause = 258,
+ CatchClause = 259,
+ PropertyAssignment = 260,
+ ShorthandPropertyAssignment = 261,
+ SpreadAssignment = 262,
+ EnumMember = 263,
+ SourceFile = 264,
+ Bundle = 265,
+ JSDocTypeExpression = 266,
+ JSDocAllType = 267,
+ JSDocUnknownType = 268,
+ JSDocArrayType = 269,
+ JSDocUnionType = 270,
+ JSDocTupleType = 271,
+ JSDocNullableType = 272,
+ JSDocNonNullableType = 273,
+ JSDocRecordType = 274,
+ JSDocRecordMember = 275,
+ JSDocTypeReference = 276,
+ JSDocOptionalType = 277,
+ JSDocFunctionType = 278,
+ JSDocVariadicType = 279,
+ JSDocConstructorType = 280,
+ JSDocThisType = 281,
+ JSDocComment = 282,
+ JSDocTag = 283,
+ JSDocAugmentsTag = 284,
+ JSDocParameterTag = 285,
+ JSDocReturnTag = 286,
+ JSDocTypeTag = 287,
+ JSDocTemplateTag = 288,
+ JSDocTypedefTag = 289,
+ JSDocPropertyTag = 290,
+ JSDocTypeLiteral = 291,
+ JSDocLiteralType = 292,
+ SyntaxList = 293,
+ NotEmittedStatement = 294,
+ PartiallyEmittedExpression = 295,
+ MergeDeclarationMarker = 296,
+ EndOfDeclarationMarker = 297,
Count = 298,
FirstAssignment = 57,
LastAssignment = 69,
@@ -343,15 +368,15 @@ declare namespace ts {
FirstReservedWord = 71,
LastReservedWord = 106,
FirstKeyword = 71,
- LastKeyword = 140,
+ LastKeyword = 141,
FirstFutureReservedWord = 107,
LastFutureReservedWord = 115,
- FirstTypeNode = 156,
- LastTypeNode = 171,
+ FirstTypeNode = 157,
+ LastTypeNode = 172,
FirstPunctuation = 16,
LastPunctuation = 69,
FirstToken = 0,
- LastToken = 140,
+ LastToken = 141,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
@@ -360,11 +385,11 @@ declare namespace ts {
LastTemplateToken = 15,
FirstBinaryOperator = 26,
LastBinaryOperator = 69,
- FirstNode = 141,
- FirstJSDocNode = 262,
- LastJSDocNode = 288,
- FirstJSDocTagNode = 278,
- LastJSDocTagNode = 291,
+ FirstNode = 142,
+ FirstJSDocNode = 266,
+ LastJSDocNode = 292,
+ FirstJSDocTagNode = 282,
+ LastJSDocTagNode = 292,
}
enum NodeFlags {
None = 0,
@@ -378,26 +403,20 @@ declare namespace ts {
HasImplicitReturn = 128,
HasExplicitReturn = 256,
GlobalAugmentation = 512,
- HasClassExtends = 1024,
- HasDecorators = 2048,
- HasParamDecorators = 4096,
- HasAsyncFunctions = 8192,
- HasSpreadAttribute = 16384,
- HasRestAttribute = 32768,
- DisallowInContext = 65536,
- YieldContext = 131072,
- DecoratorContext = 262144,
- AwaitContext = 524288,
- ThisNodeHasError = 1048576,
- JavaScriptFile = 2097152,
- ThisNodeOrAnySubNodesHasError = 4194304,
- HasAggregatedChildData = 8388608,
+ HasAsyncFunctions = 1024,
+ DisallowInContext = 2048,
+ YieldContext = 4096,
+ DecoratorContext = 8192,
+ AwaitContext = 16384,
+ ThisNodeHasError = 32768,
+ JavaScriptFile = 65536,
+ ThisNodeOrAnySubNodesHasError = 131072,
+ HasAggregatedChildData = 262144,
BlockScoped = 3,
ReachabilityCheckFlags = 384,
- EmitHelperFlags = 64512,
- ReachabilityAndEmitFlags = 64896,
- ContextFlags = 3080192,
- TypeExcludesFlags = 655360,
+ ReachabilityAndEmitFlags = 1408,
+ ContextFlags = 96256,
+ TypeExcludesFlags = 20480,
}
enum ModifierFlags {
None = 0,
@@ -449,6 +468,7 @@ declare namespace ts {
type EndOfFileToken = Token<SyntaxKind.EndOfFileToken>;
type AtToken = Token<SyntaxKind.AtToken>;
type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
+ type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
type ModifiersArray = NodeArray<Modifier>;
interface Identifier extends PrimaryExpression {
@@ -485,8 +505,10 @@ declare namespace ts {
}
interface TypeParameterDeclaration extends Declaration {
kind: SyntaxKind.TypeParameter;
+ parent?: DeclarationWithTypeParameters;
name: Identifier;
constraint?: TypeNode;
+ default?: TypeNode;
expression?: Expression;
}
interface SignatureDeclaration extends Declaration {
@@ -504,17 +526,19 @@ declare namespace ts {
type BindingName = Identifier | BindingPattern;
interface VariableDeclaration extends Declaration {
kind: SyntaxKind.VariableDeclaration;
- parent?: VariableDeclarationList;
+ parent?: VariableDeclarationList | CatchClause;
name: BindingName;
type?: TypeNode;
initializer?: Expression;
}
interface VariableDeclarationList extends Node {
kind: SyntaxKind.VariableDeclarationList;
+ parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
interface ParameterDeclaration extends Declaration {
kind: SyntaxKind.Parameter;
+ parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
questionToken?: QuestionToken;
@@ -523,6 +547,7 @@ declare namespace ts {
}
interface BindingElement extends Declaration {
kind: SyntaxKind.BindingElement;
+ parent?: BindingPattern;
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
@@ -546,7 +571,7 @@ declare namespace ts {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
- type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration | AccessorDeclaration | SpreadAssignment;
+ type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
interface PropertyAssignment extends ObjectLiteralElement {
kind: SyntaxKind.PropertyAssignment;
name: PropertyName;
@@ -577,10 +602,12 @@ declare namespace ts {
}
interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<BindingElement>;
}
interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
+ parent?: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<ArrayBindingElement>;
}
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
@@ -615,41 +642,45 @@ declare namespace ts {
}
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
kind: SyntaxKind.Constructor;
+ parent?: ClassDeclaration | ClassExpression;
body?: FunctionBody;
}
+ /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
interface SemicolonClassElement extends ClassElement {
kind: SyntaxKind.SemicolonClassElement;
+ parent?: ClassDeclaration | ClassExpression;
}
interface GetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.GetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
interface SetAccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
kind: SyntaxKind.SetAccessor;
+ parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
name: PropertyName;
body: FunctionBody;
}
type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
+ parent?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode;
}
interface TypeNode extends Node {
_typeNodeBrand: any;
}
interface KeywordTypeNode extends TypeNode {
- kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.VoidKeyword;
+ kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
- interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
- kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
- }
- interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
+ type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
+ interface FunctionTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.FunctionType;
}
- interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
+ interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
interface TypeReferenceNode extends TypeNode {
@@ -678,15 +709,14 @@ declare namespace ts {
kind: SyntaxKind.TupleType;
elementTypes: NodeArray<TypeNode>;
}
- interface UnionOrIntersectionTypeNode extends TypeNode {
- kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType;
- types: NodeArray<TypeNode>;
- }
- interface UnionTypeNode extends UnionOrIntersectionTypeNode {
+ type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+ interface UnionTypeNode extends TypeNode {
kind: SyntaxKind.UnionType;
+ types: NodeArray<TypeNode>;
}
- interface IntersectionTypeNode extends UnionOrIntersectionTypeNode {
+ interface IntersectionTypeNode extends TypeNode {
kind: SyntaxKind.IntersectionType;
+ types: NodeArray<TypeNode>;
}
interface ParenthesizedTypeNode extends TypeNode {
kind: SyntaxKind.ParenthesizedType;
@@ -704,6 +734,7 @@ declare namespace ts {
}
interface MappedTypeNode extends TypeNode, Declaration {
kind: SyntaxKind.MappedType;
+ parent?: TypeAliasDeclaration;
readonlyToken?: ReadonlyToken;
typeParameter: TypeParameterDeclaration;
questionToken?: QuestionToken;
@@ -718,11 +749,14 @@ declare namespace ts {
}
interface Expression extends Node {
_expressionBrand: any;
- contextualType?: Type;
}
interface OmittedExpression extends Expression {
kind: SyntaxKind.OmittedExpression;
}
+ interface PartiallyEmittedExpression extends LeftHandSideExpression {
+ kind: SyntaxKind.PartiallyEmittedExpression;
+ expression: Expression;
+ }
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
@@ -750,13 +784,13 @@ declare namespace ts {
interface PrimaryExpression extends MemberExpression {
_primaryExpressionBrand: any;
}
- interface NullLiteral extends PrimaryExpression {
+ interface NullLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.NullKeyword;
}
- interface BooleanLiteral extends PrimaryExpression {
+ interface BooleanLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
}
- interface ThisExpression extends PrimaryExpression {
+ interface ThisExpression extends PrimaryExpression, KeywordTypeNode {
kind: SyntaxKind.ThisKeyword;
}
interface SuperExpression extends PrimaryExpression {
@@ -864,16 +898,18 @@ declare namespace ts {
}
interface NumericLiteral extends LiteralExpression {
kind: SyntaxKind.NumericLiteral;
- trailingComment?: string;
}
interface TemplateHead extends LiteralLikeNode {
kind: SyntaxKind.TemplateHead;
+ parent?: TemplateExpression;
}
interface TemplateMiddle extends LiteralLikeNode {
kind: SyntaxKind.TemplateMiddle;
+ parent?: TemplateSpan;
}
interface TemplateTail extends LiteralLikeNode {
kind: SyntaxKind.TemplateTail;
+ parent?: TemplateSpan;
}
type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
interface TemplateExpression extends PrimaryExpression {
@@ -883,6 +919,7 @@ declare namespace ts {
}
interface TemplateSpan extends Node {
kind: SyntaxKind.TemplateSpan;
+ parent?: TemplateExpression;
expression: Expression;
literal: TemplateMiddle | TemplateTail;
}
@@ -899,18 +936,18 @@ declare namespace ts {
expression: Expression;
}
/**
- * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
- * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
- * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
- * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
- **/
+ * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
+ * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
+ * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
+ * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
+ */
interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
properties: NodeArray<T>;
}
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
kind: SyntaxKind.ObjectLiteralExpression;
}
- type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+ type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
interface PropertyAccessExpression extends MemberExpression, Declaration {
kind: SyntaxKind.PropertyAccessExpression;
@@ -945,6 +982,7 @@ declare namespace ts {
}
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
+ parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
@@ -952,14 +990,14 @@ declare namespace ts {
kind: SyntaxKind.NewExpression;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
- arguments: NodeArray<Expression>;
+ arguments?: NodeArray<Expression>;
}
interface TaggedTemplateExpression extends MemberExpression {
kind: SyntaxKind.TaggedTemplateExpression;
tag: LeftHandSideExpression;
template: TemplateLiteral;
}
- type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
+ type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
interface AsExpression extends Expression {
kind: SyntaxKind.AsExpression;
expression: Expression;
@@ -975,49 +1013,67 @@ declare namespace ts {
kind: SyntaxKind.NonNullExpression;
expression: Expression;
}
+ interface MetaProperty extends PrimaryExpression {
+ kind: SyntaxKind.MetaProperty;
+ keywordToken: SyntaxKind;
+ name: Identifier;
+ }
interface JsxElement extends PrimaryExpression {
kind: SyntaxKind.JsxElement;
openingElement: JsxOpeningElement;
children: NodeArray<JsxChild>;
closingElement: JsxClosingElement;
}
+ type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
+ type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
type JsxTagNameExpression = PrimaryExpression | PropertyAccessExpression;
+ interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
+ parent?: JsxOpeningLikeElement;
+ }
interface JsxOpeningElement extends Expression {
kind: SyntaxKind.JsxOpeningElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
interface JsxSelfClosingElement extends PrimaryExpression {
kind: SyntaxKind.JsxSelfClosingElement;
tagName: JsxTagNameExpression;
- attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
+ attributes: JsxAttributes;
}
- type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
- type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
- interface JsxAttribute extends Node {
+ interface JsxAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxAttribute;
+ parent?: JsxAttributes;
name: Identifier;
initializer?: StringLiteral | JsxExpression;
}
- interface JsxSpreadAttribute extends Node {
+ interface JsxSpreadAttribute extends ObjectLiteralElement {
kind: SyntaxKind.JsxSpreadAttribute;
+ parent?: JsxAttributes;
expression: Expression;
}
interface JsxClosingElement extends Node {
kind: SyntaxKind.JsxClosingElement;
+ parent?: JsxElement;
tagName: JsxTagNameExpression;
}
interface JsxExpression extends Expression {
kind: SyntaxKind.JsxExpression;
+ parent?: JsxElement | JsxAttributeLike;
+ dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
expression?: Expression;
}
interface JsxText extends Node {
kind: SyntaxKind.JsxText;
+ parent?: JsxElement;
}
type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
interface Statement extends Node {
_statementBrand: any;
}
+ interface NotEmittedStatement extends Statement {
+ kind: SyntaxKind.NotEmittedStatement;
+ }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1028,7 +1084,7 @@ declare namespace ts {
kind: SyntaxKind.MissingDeclaration;
name?: Identifier;
}
- type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
+ type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
interface Block extends Statement {
kind: SyntaxKind.Block;
statements: NodeArray<Statement>;
@@ -1072,6 +1128,7 @@ declare namespace ts {
}
interface ForOfStatement extends IterationStatement {
kind: SyntaxKind.ForOfStatement;
+ awaitModifier?: AwaitKeywordToken;
initializer: ForInitializer;
expression: Expression;
}
@@ -1101,15 +1158,18 @@ declare namespace ts {
}
interface CaseBlock extends Node {
kind: SyntaxKind.CaseBlock;
+ parent?: SwitchStatement;
clauses: NodeArray<CaseOrDefaultClause>;
}
interface CaseClause extends Node {
kind: SyntaxKind.CaseClause;
+ parent?: CaseBlock;
expression: Expression;
statements: NodeArray<Statement>;
}
interface DefaultClause extends Node {
kind: SyntaxKind.DefaultClause;
+ parent?: CaseBlock;
statements: NodeArray<Statement>;
}
type CaseOrDefaultClause = CaseClause | DefaultClause;
@@ -1130,6 +1190,7 @@ declare namespace ts {
}
interface CatchClause extends Node {
kind: SyntaxKind.CatchClause;
+ parent?: TryStatement;
variableDeclaration: VariableDeclaration;
block: Block;
}
@@ -1165,8 +1226,9 @@ declare namespace ts {
}
interface HeritageClause extends Node {
kind: SyntaxKind.HeritageClause;
- token: SyntaxKind;
- types?: NodeArray<ExpressionWithTypeArguments>;
+ parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression;
+ token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+ types: NodeArray<ExpressionWithTypeArguments>;
}
interface TypeAliasDeclaration extends DeclarationStatement {
kind: SyntaxKind.TypeAliasDeclaration;
@@ -1176,6 +1238,7 @@ declare namespace ts {
}
interface EnumMember extends Declaration {
kind: SyntaxKind.EnumMember;
+ parent?: EnumDeclaration;
name: PropertyName;
initializer?: Expression;
}
@@ -1184,91 +1247,121 @@ declare namespace ts {
name: Identifier;
members: NodeArray<EnumMember>;
}
- type ModuleBody = ModuleBlock | ModuleDeclaration;
type ModuleName = Identifier | StringLiteral;
+ type ModuleBody = NamespaceBody | JSDocNamespaceBody;
interface ModuleDeclaration extends DeclarationStatement {
kind: SyntaxKind.ModuleDeclaration;
- name: Identifier | StringLiteral;
- body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
+ parent?: ModuleBody | SourceFile;
+ name: ModuleName;
+ body?: ModuleBody | JSDocNamespaceDeclaration;
}
+ type NamespaceBody = ModuleBlock | NamespaceDeclaration;
interface NamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: ModuleBlock | NamespaceDeclaration;
+ body: NamespaceBody;
}
+ type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
interface JSDocNamespaceDeclaration extends ModuleDeclaration {
name: Identifier;
- body: JSDocNamespaceDeclaration | Identifier;
+ body: JSDocNamespaceBody;
}
interface ModuleBlock extends Node, Statement {
kind: SyntaxKind.ModuleBlock;
+ parent?: ModuleDeclaration;
statements: NodeArray<Statement>;
}
type ModuleReference = EntityName | ExternalModuleReference;
+ /**
+ * One of:
+ * - import x = require("mod");
+ * - import x = M.x;
+ */
interface ImportEqualsDeclaration extends DeclarationStatement {
kind: SyntaxKind.ImportEqualsDeclaration;
+ parent?: SourceFile | ModuleBlock;
name: Identifier;
moduleReference: ModuleReference;
}
interface ExternalModuleReference extends Node {
kind: SyntaxKind.ExternalModuleReference;
+ parent?: ImportEqualsDeclaration;
expression?: Expression;
}
interface ImportDeclaration extends Statement {
kind: SyntaxKind.ImportDeclaration;
+ parent?: SourceFile | ModuleBlock;
importClause?: ImportClause;
+ /** If this is not a StringLiteral it will be a grammar error. */
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
interface ImportClause extends Declaration {
kind: SyntaxKind.ImportClause;
+ parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
interface NamespaceImport extends Declaration {
kind: SyntaxKind.NamespaceImport;
+ parent?: ImportClause;
name: Identifier;
}
interface NamespaceExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.NamespaceExportDeclaration;
name: Identifier;
- moduleReference: LiteralLikeNode;
}
interface ExportDeclaration extends DeclarationStatement {
kind: SyntaxKind.ExportDeclaration;
+ parent?: SourceFile | ModuleBlock;
exportClause?: NamedExports;
+ /** If this is not a StringLiteral it will be a grammar error. */
moduleSpecifier?: Expression;
}
interface NamedImports extends Node {
kind: SyntaxKind.NamedImports;
+ parent?: ImportClause;
elements: NodeArray<ImportSpecifier>;
}
interface NamedExports extends Node {
kind: SyntaxKind.NamedExports;
+ parent?: ExportDeclaration;
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
interface ImportSpecifier extends Declaration {
kind: SyntaxKind.ImportSpecifier;
+ parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
interface ExportSpecifier extends Declaration {
kind: SyntaxKind.ExportSpecifier;
+ parent?: NamedExports;
propertyName?: Identifier;
name: Identifier;
}
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
interface ExportAssignment extends DeclarationStatement {
kind: SyntaxKind.ExportAssignment;
+ parent?: SourceFile;
isExportEquals?: boolean;
expression: Expression;
}
interface FileReference extends TextRange {
fileName: string;
}
+ interface CheckJsDirective extends TextRange {
+ enabled: boolean;
+ }
+ type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
interface CommentRange extends TextRange {
hasTrailingNewLine?: boolean;
- kind: SyntaxKind;
+ kind: CommentKind;
+ }
+ interface SynthesizedComment extends CommentRange {
+ text: string;
+ pos: -1;
+ end: -1;
}
interface JSDocTypeExpression extends Node {
kind: SyntaxKind.JSDocTypeExpression;
@@ -1412,9 +1505,21 @@ declare namespace ts {
ArrayMutation = 256,
Referenced = 512,
Shared = 1024,
+ PreFinally = 2048,
+ AfterFinally = 4096,
Label = 12,
Condition = 96,
}
+ interface FlowLock {
+ locked?: boolean;
+ }
+ interface AfterFinallyFlow extends FlowNode, FlowLock {
+ antecedent: FlowNode;
+ }
+ interface PreFinallyFlow extends FlowNode {
+ antecedent: FlowNode;
+ lock: FlowLock;
+ }
interface FlowNode {
flags: FlowFlags;
id?: number;
@@ -1457,7 +1562,6 @@ declare namespace ts {
statements: NodeArray<Statement>;
endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
fileName: string;
- path: Path;
text: string;
amdDependencies: AmdDependency[];
moduleName: string;
@@ -1476,6 +1580,10 @@ declare namespace ts {
hasNoDefaultLib: boolean;
languageVersion: ScriptTarget;
}
+ interface Bundle extends Node {
+ kind: SyntaxKind.Bundle;
+ sourceFiles: SourceFile[];
+ }
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
getSourceFile(fileName: string): SourceFile;
@@ -1486,9 +1594,9 @@ declare namespace ts {
useCaseSensitiveFileNames: boolean;
readDirectory(rootDir: string, extensions: string[], excludes: string[], includes: string[]): string[];
/**
- * Gets a value indicating whether the specified path exists and is a file.
- * @param path The path to test.
- */
+ * Gets a value indicating whether the specified path exists and is a file.
+ * @param path The path to test.
+ */
fileExists(path: string): boolean;
readFile(path: string): string;
}
@@ -1521,7 +1629,7 @@ declare namespace ts {
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files.
*/
- emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean): EmitResult;
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
@@ -1532,6 +1640,12 @@ declare namespace ts {
*/
getTypeChecker(): TypeChecker;
}
+ interface CustomTransformers {
+ /** Custom transformers to evaluate before built-in transformations. */
+ before?: TransformerFactory<SourceFile>[];
+ /** Custom transformers to evaluate after built-in transformations. */
+ after?: TransformerFactory<SourceFile>[];
+ }
interface SourceMapSpan {
/** Line number in the .js file. */
emittedLine: number;
@@ -1575,11 +1689,20 @@ declare namespace ts {
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
getPropertiesOfType(type: Type): Symbol[];
getPropertyOfType(type: Type, propertyName: string): Symbol;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
- getBaseTypes(type: InterfaceType): ObjectType[];
+ getBaseTypes(type: InterfaceType): BaseType[];
+ getBaseTypeOfLiteralType(type: Type): Type;
+ getWidenedType(type: Type): Type;
getReturnTypeOfSignature(signature: Signature): Type;
getNonNullableType(type: Type): Type;
+ /** Note that the resulting nodes cannot be checked. */
+ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode;
+ /** Note that the resulting nodes cannot be checked. */
+ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration;
+ /** Note that the resulting nodes cannot be checked. */
+ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
@@ -1587,6 +1710,8 @@ declare namespace ts {
getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
getTypeAtLocation(node: Node): Type;
+ getTypeFromTypeNode(node: TypeNode): Type;
+ signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string;
getSymbolDisplayBuilder(): SymbolDisplayBuilder;
@@ -1602,18 +1727,30 @@ declare namespace ts {
isUnknownSymbol(symbol: Symbol): boolean;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
+ /** Follow all aliases to get the original symbol. */
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
+ getApparentType(type: Type): Type;
+ }
+ enum NodeBuilderFlags {
+ None = 0,
+ allowThisInObjectLiteral = 1,
+ allowQualifedNameInPlaceOfIdentifier = 2,
+ allowTypeParameterInQualifiedName = 4,
+ allowAnonymousIdentifier = 8,
+ allowEmptyUnionOrIntersection = 16,
+ allowEmptyTuple = 32,
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
+ buildIndexSignatureDisplay(info: IndexInfo, writer: SymbolWriter, kind: IndexKind, enclosingDeclaration?: Node, globalFlags?: TypeFormatFlags, symbolStack?: Symbol[]): void;
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@@ -1629,6 +1766,7 @@ declare namespace ts {
writeSpace(text: string): void;
writeStringLiteral(text: string): void;
writeParameter(text: string): void;
+ writeProperty(text: string): void;
writeSymbol(text: string, symbol: Symbol): void;
writeLine(): void;
increaseIndent(): void;
@@ -1636,6 +1774,7 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
+ reportIllegalExtends(): void;
}
enum TypeFormatFlags {
None = 0,
@@ -1650,6 +1789,8 @@ declare namespace ts {
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
+ SuppressAnyReturnType = 2048,
+ AddUndefined = 4096,
}
enum SymbolFormatFlags {
None = 0,
@@ -1699,13 +1840,10 @@ declare namespace ts {
ExportType = 2097152,
ExportNamespace = 4194304,
Alias = 8388608,
- Instantiated = 16777216,
- Merged = 33554432,
- Transient = 67108864,
- Prototype = 134217728,
- SyntheticProperty = 268435456,
- Optional = 536870912,
- ExportStar = 1073741824,
+ Prototype = 16777216,
+ ExportStar = 33554432,
+ Optional = 67108864,
+ Transient = 134217728,
Enum = 384,
Variable = 3,
Value = 107455,
@@ -1771,6 +1909,7 @@ declare namespace ts {
Intersection = 131072,
Index = 262144,
IndexedAccess = 524288,
+ NonPrimitive = 16777216,
Literal = 480,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
@@ -1780,9 +1919,10 @@ declare namespace ts {
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
- StructuredOrTypeParameter = 507904,
- Narrowable = 1033215,
- NotUnionOrUnit = 33281,
+ StructuredOrTypeVariable = 1032192,
+ TypeVariable = 540672,
+ Narrowable = 17810431,
+ NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
@@ -1798,7 +1938,7 @@ declare namespace ts {
regularType?: LiteralType;
}
interface EnumType extends Type {
- memberTypes: Map<EnumLiteralType>;
+ memberTypes: EnumLiteralType[];
}
interface EnumLiteralType extends LiteralType {
baseType: EnumType & UnionType;
@@ -1819,12 +1959,14 @@ declare namespace ts {
interface ObjectType extends Type {
objectFlags: ObjectFlags;
}
+ /** Class and interface types (TypeFlags.Class and TypeFlags.Interface). */
interface InterfaceType extends ObjectType {
typeParameters: TypeParameter[];
outerTypeParameters: TypeParameter[];
localTypeParameters: TypeParameter[];
thisType: TypeParameter;
}
+ type BaseType = ObjectType | IntersectionType;
interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
@@ -1832,6 +1974,16 @@ declare namespace ts {
declaredStringIndexInfo: IndexInfo;
declaredNumberIndexInfo: IndexInfo;
}
+ /**
+ * Type references (TypeFlags.Reference). When a class or interface has type parameters or
+ * a "this" type, references to the class or interface are made using type references. The
+ * typeArguments property specifies the types to substitute for the type parameters of the
+ * class or interface and optionally includes an extra element that specifies the type to
+ * substitute for "this" in the resulting instantiation. When no extra argument is present,
+ * the type reference itself is substituted for "this". The typeArguments property is undefined
+ * if the class or interface has no type parameters and the reference isn't specifying an
+ * explicit "this" argument.
+ */
interface TypeReference extends ObjectType {
target: GenericType;
typeArguments: Type[];
@@ -1850,15 +2002,19 @@ declare namespace ts {
elementType: Type;
finalArrayType?: Type;
}
- interface TypeParameter extends Type {
- constraint: Type;
+ interface TypeVariable extends Type {
}
- interface IndexType extends Type {
- type: TypeParameter;
+ interface TypeParameter extends TypeVariable {
+ constraint: Type;
+ default?: Type;
}
- interface IndexedAccessType extends Type {
+ interface IndexedAccessType extends TypeVariable {
objectType: Type;
indexType: Type;
+ constraint?: Type;
+ }
+ interface IndexType extends Type {
+ type: TypeVariable | UnionOrIntersectionType;
}
enum SignatureKind {
Call = 0,
@@ -1878,6 +2034,10 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
+ interface JsFileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ }
interface DiagnosticMessage {
key: string;
category: DiagnosticCategory;
@@ -1913,7 +2073,10 @@ declare namespace ts {
Classic = 1,
NodeJs = 2,
}
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]>;
+ interface PluginImport {
+ name: string;
+ }
+ type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[];
interface CompilerOptions {
allowJs?: boolean;
allowSyntheticDefaultImports?: boolean;
@@ -1922,9 +2085,11 @@ declare namespace ts {
alwaysStrict?: boolean;
baseUrl?: string;
charset?: string;
+ checkJs?: boolean;
declaration?: boolean;
declarationDir?: string;
disableSizeLimit?: boolean;
+ downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
experimentalDecorators?: boolean;
@@ -1969,6 +2134,7 @@ declare namespace ts {
skipDefaultLibCheck?: boolean;
sourceMap?: boolean;
sourceRoot?: string;
+ strict?: boolean;
strictNullChecks?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
@@ -2007,6 +2173,7 @@ declare namespace ts {
None = 0,
Preserve = 1,
React = 2,
+ ReactNative = 3,
}
enum NewLineKind {
CarriageReturnLineFeed = 0,
@@ -2022,6 +2189,7 @@ declare namespace ts {
JSX = 2,
TS = 3,
TSX = 4,
+ External = 5,
}
enum ScriptTarget {
ES3 = 0,
@@ -2102,7 +2270,6 @@ declare namespace ts {
}
interface ResolvedModuleWithFailedLookupLocations {
resolvedModule: ResolvedModuleFull | undefined;
- failedLookupLocations: string[];
}
interface ResolvedTypeReferenceDirective {
primary: boolean;
@@ -2131,6 +2298,206 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
+ enum EmitFlags {
+ SingleLine = 1,
+ AdviseOnEmitNode = 2,
+ NoSubstitution = 4,
+ CapturesThis = 8,
+ NoLeadingSourceMap = 16,
+ NoTrailingSourceMap = 32,
+ NoSourceMap = 48,
+ NoNestedSourceMaps = 64,
+ NoTokenLeadingSourceMaps = 128,
+ NoTokenTrailingSourceMaps = 256,
+ NoTokenSourceMaps = 384,
+ NoLeadingComments = 512,
+ NoTrailingComments = 1024,
+ NoComments = 1536,
+ NoNestedComments = 2048,
+ HelperName = 4096,
+ ExportName = 8192,
+ LocalName = 16384,
+ Indented = 32768,
+ NoIndentation = 65536,
+ AsyncFunctionBody = 131072,
+ ReuseTempVariableScope = 262144,
+ CustomPrologue = 524288,
+ NoHoisting = 1048576,
+ HasEndOfDeclarationMarker = 2097152,
+ Iterator = 4194304,
+ }
+ interface EmitHelper {
+ readonly name: string;
+ readonly scoped: boolean;
+ readonly text: string;
+ readonly priority?: number;
+ }
+ enum EmitHint {
+ SourceFile = 0,
+ Expression = 1,
+ IdentifierName = 2,
+ Unspecified = 3,
+ }
+ interface TransformationContext {
+ /** Gets the compiler options supplied to the transformer. */
+ getCompilerOptions(): CompilerOptions;
+ /** Starts a new lexical environment. */
+ startLexicalEnvironment(): void;
+ /** Suspends the current lexical environment, usually after visiting a parameter list. */
+ suspendLexicalEnvironment(): void;
+ /** Resumes a suspended lexical environment, usually before visiting a function body. */
+ resumeLexicalEnvironment(): void;
+ /** Ends a lexical environment, returning any declarations. */
+ endLexicalEnvironment(): Statement[];
+ /** Hoists a function declaration to the containing scope. */
+ hoistFunctionDeclaration(node: FunctionDeclaration): void;
+ /** Hoists a variable declaration to the containing scope. */
+ hoistVariableDeclaration(node: Identifier): void;
+ /** Records a request for a non-scoped emit helper in the current context. */
+ requestEmitHelper(helper: EmitHelper): void;
+ /** Gets and resets the requested non-scoped emit helpers. */
+ readEmitHelpers(): EmitHelper[] | undefined;
+ /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
+ enableSubstitution(kind: SyntaxKind): void;
+ /** Determines whether expression substitutions are enabled for the provided node. */
+ isSubstitutionEnabled(node: Node): boolean;
+ /**
+ * Hook used by transformers to substitute expressions just before they
+ * are emitted by the pretty printer.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onSubstituteNode: (hint: EmitHint, node: Node) => Node;
+ /**
+ * Enables before/after emit notifications in the pretty printer for the provided
+ * SyntaxKind.
+ */
+ enableEmitNotification(kind: SyntaxKind): void;
+ /**
+ * Determines whether before/after emit notifications should be raised in the pretty
+ * printer when it emits a node.
+ */
+ isEmitNotificationEnabled(node: Node): boolean;
+ /**
+ * Hook used to allow transformers to capture state before or after
+ * the printer emits a node.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
+ }
+ interface TransformationResult<T extends Node> {
+ /** Gets the transformed source files. */
+ transformed: T[];
+ /** Gets diagnostics for the transformation. */
+ diagnostics?: Diagnostic[];
+ /**
+ * Gets a substitute for a node, if one is available; otherwise, returns the original node.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ substituteNode(hint: EmitHint, node: Node): Node;
+ /**
+ * Emits a node with possible notification.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * Clean up EmitNode entries on any parse-tree nodes.
+ */
+ dispose(): void;
+ }
+ /**
+ * A function that is used to initialize and return a `Transformer` callback, which in turn
+ * will be used to transform one or more nodes.
+ */
+ type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
+ /**
+ * A function that transforms a node.
+ */
+ type Transformer<T extends Node> = (node: T) => T;
+ /**
+ * A function that accepts and possibly transforms a node.
+ */
+ type Visitor = (node: Node) => VisitResult<Node>;
+ type VisitResult<T extends Node> = T | T[];
+ interface Printer {
+ /**
+ * Print a node and its subtree as-is, without any emit transformations.
+ * @param hint A value indicating the purpose of a node. This is primarily used to
+ * distinguish between an `Identifier` used in an expression position, versus an
+ * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
+ * should just pass `Unspecified`.
+ * @param node The node to print. The node and its subtree are printed as-is, without any
+ * emit transformations.
+ * @param sourceFile A source file that provides context for the node. The source text of
+ * the file is used to emit the original source content for literals and identifiers, while
+ * the identifiers of the source file are used when generating unique names to avoid
+ * collisions.
+ */
+ printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
+ /**
+ * Prints a source file as-is, without any emit transformations.
+ */
+ printFile(sourceFile: SourceFile): string;
+ /**
+ * Prints a bundle of source files as-is, without any emit transformations.
+ */
+ printBundle(bundle: Bundle): string;
+ }
+ interface PrintHandlers {
+ /**
+ * A hook used by the Printer when generating unique names to avoid collisions with
+ * globally defined names that exist outside of the current source file.
+ */
+ hasGlobalName?(name: string): boolean;
+ /**
+ * A hook used by the Printer to provide notifications prior to emitting a node. A
+ * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
+ * `node` values.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback that, when invoked, will emit the node.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * onEmitNode(hint, node, emitCallback) {
+ * // set up or track state prior to emitting the node...
+ * emitCallback(hint, node);
+ * // restore state after emitting the node...
+ * }
+ * });
+ * ```
+ */
+ onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * A hook used by the Printer to perform just-in-time substitution of a node. This is
+ * primarily used by node transformations that need to substitute one node for another,
+ * such as replacing `myExportedVar` with `exports.myExportedVar`.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * substituteNode(hint, node) {
+ * // perform substitution if necessary...
+ * return node;
+ * }
+ * });
+ * ```
+ */
+ substituteNode?(hint: EmitHint, node: Node): Node;
+ }
+ interface PrinterOptions {
+ removeComments?: boolean;
+ newLine?: NewLineKind;
+ }
interface TextSpan {
start: number;
length: number;
@@ -2145,8 +2512,10 @@ declare namespace ts {
}
declare namespace ts {
/** The version of the TypeScript compiler release */
- const version = "2.2.0-dev.20161127";
+ const version = "2.3.0-dev.20170419";
}
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
+declare function clearTimeout(handle: any): void;
declare namespace ts {
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
type DirectoryWatcherCallback = (fileName: string) => void;
@@ -2192,6 +2561,7 @@ declare namespace ts {
directoryName: string;
referenceCount: number;
}
+ function getNodeMajorVersion(): number;
let sys: System;
}
declare namespace ts {
@@ -2237,12 +2607,12 @@ declare namespace ts {
function isWhiteSpaceSingleLine(ch: number): boolean;
function isLineBreak(ch: number): boolean;
function couldStartTrivia(text: string, pos: number): boolean;
- function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
- function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: SyntaxKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
- function getLeadingCommentRanges(text: string, pos: number): CommentRange[];
- function getTrailingCommentRanges(text: string, pos: number): CommentRange[];
+ function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U;
+ function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U;
+ function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
/** Optionally, get the shebang */
function getShebang(text: string): string;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
@@ -2282,15 +2652,414 @@ declare namespace ts {
function getCombinedModifierFlags(node: Node): ModifierFlags;
function getCombinedNodeFlags(node: Node): NodeFlags;
/**
- * Checks to see if the locale is in the appropriate format,
- * and if it is, attempts to set the appropriate language.
- */
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
function validateLocaleAndSetLanguage(locale: string, sys: {
getExecutingFilePath(): string;
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}, errors?: Diagnostic[]): void;
+ function getOriginalNode(node: Node): Node;
+ function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node: Node): boolean;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode(node: Node): Node;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode<T extends Node>(node: Node, nodeTest?: (node: Node) => node is T): T;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeIdentifier(identifier: string): string;
+}
+declare namespace ts {
+ /**
+ * Make `elements` into a `NodeArray<T>`. If `elements` is `undefined`, returns an empty `NodeArray<T>`.
+ */
+ function createNodeArray<T extends Node>(elements?: T[], hasTrailingComma?: boolean): NodeArray<T>;
+ function createLiteral(value: string): StringLiteral;
+ function createLiteral(value: number): NumericLiteral;
+ function createLiteral(value: boolean): BooleanLiteral;
+ /** Create a string literal whose source text is read from a source node during emit. */
+ function createLiteral(sourceNode: StringLiteral | NumericLiteral | Identifier): StringLiteral;
+ function createLiteral(value: string | number | boolean): PrimaryExpression;
+ function createNumericLiteral(value: string): NumericLiteral;
+ function createIdentifier(text: string): Identifier;
+ /** Create a unique temporary variable. */
+ function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
+ /** Create a unique temporary variable for use in a loop. */
+ function createLoopVariable(): Identifier;
+ /** Create a unique name based on the supplied text. */
+ function createUniqueName(text: string): Identifier;
+ /** Create a unique name generated for a node. */
+ function getGeneratedNameForNode(node: Node): Identifier;
+ function createToken<TKind extends SyntaxKind>(token: TKind): Token<TKind>;
+ function createSuper(): SuperExpression;
+ function createThis(): ThisExpression & Token<SyntaxKind.ThisKeyword>;
+ function createNull(): NullLiteral & Token<SyntaxKind.NullKeyword>;
+ function createTrue(): BooleanLiteral & Token<SyntaxKind.TrueKeyword>;
+ function createFalse(): BooleanLiteral & Token<SyntaxKind.FalseKeyword>;
+ function createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
+ function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+ function createComputedPropertyName(expression: Expression): ComputedPropertyName;
+ function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
+ function createSignatureDeclaration(kind: SyntaxKind, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): SignatureDeclaration;
+ function createFunctionTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): FunctionTypeNode;
+ function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): FunctionTypeNode;
+ function createConstructorTypeNode(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructorTypeNode;
+ function updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function createKeywordTypeNode(kind: KeywordTypeNode["kind"]): KeywordTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
+ function createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
+ function createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ function createTypePredicateNode(parameterName: Identifier | ThisTypeNode | string, type: TypeNode): TypePredicateNode;
+ function updateTypePredicateNode(node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode): TypePredicateNode;
+ function createTypeQueryNode(exprName: EntityName): TypeQueryNode;
+ function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
+ function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType, types: TypeNode[]): UnionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.IntersectionType, types: TypeNode[]): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node: UnionOrIntersectionTypeNode, types: NodeArray<TypeNode>): UnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members: TypeElement[]): TypeLiteralNode;
+ function updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
+ function createTupleTypeNode(elementTypes: TypeNode[]): TupleTypeNode;
+ function updateTypleTypeNode(node: TupleTypeNode, elementTypes: TypeNode[]): TupleTypeNode;
+ function createMappedTypeNode(readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
+ function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function createTypeParameterDeclaration(name: string | Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function createPropertySignature(name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createIndexSignatureDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function createParameter(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ function updateParameter(node: ParameterDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ function createDecorator(expression: Expression): Decorator;
+ function updateDecorator(node: Decorator, expression: Expression): Decorator;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
+ function createMethodDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function updateMethod(node: MethodDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function createConstructor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function updateConstructor(node: ConstructorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function createGetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function updateGetAccessor(node: GetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function createSetAccessor(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function updateSetAccessor(node: SetAccessorDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, parameters: ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
+ function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
+ function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
+ function updateArrayBindingPattern(node: ArrayBindingPattern, elements: ArrayBindingElement[]): ArrayBindingPattern;
+ function createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
+ function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
+ function createArrayLiteral(elements?: Expression[], multiLine?: boolean): ArrayLiteralExpression;
+ function updateArrayLiteral(node: ArrayLiteralExpression, elements: Expression[]): ArrayLiteralExpression;
+ function createObjectLiteral(properties?: ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
+ function updateObjectLiteral(node: ObjectLiteralExpression, properties: ObjectLiteralElementLike[]): ObjectLiteralExpression;
+ function createPropertyAccess(expression: Expression, name: string | Identifier): PropertyAccessExpression;
+ function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier): PropertyAccessExpression;
+ function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression;
+ function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
+ function createCall(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function updateCall(node: CallExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[]): CallExpression;
+ function createNew(expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function updateNew(node: NewExpression, expression: Expression, typeArguments: TypeNode[] | undefined, argumentsArray: Expression[] | undefined): NewExpression;
+ function createTaggedTemplate(tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+ function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+ function createParen(expression: Expression): ParenthesizedExpression;
+ function updateParen(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
+ function createFunctionExpression(modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function updateFunctionExpression(node: FunctionExpression, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function createArrowFunction(modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ function updateArrowFunction(node: ArrowFunction, modifiers: Modifier[] | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
+ function createDelete(expression: Expression): DeleteExpression;
+ function updateDelete(node: DeleteExpression, expression: Expression): DeleteExpression;
+ function createTypeOf(expression: Expression): TypeOfExpression;
+ function updateTypeOf(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+ function createVoid(expression: Expression): VoidExpression;
+ function updateVoid(node: VoidExpression, expression: Expression): VoidExpression;
+ function createAwait(expression: Expression): AwaitExpression;
+ function updateAwait(node: AwaitExpression, expression: Expression): AwaitExpression;
+ function createPrefix(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
+ function updatePrefix(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
+ function createPostfix(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
+ function updatePostfix(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
+ function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
+ function updateBinary(node: BinaryExpression, left: Expression, right: Expression): BinaryExpression;
+ function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+ function updateConditional(node: ConditionalExpression, condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createTemplateExpression(head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
+ function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: TemplateSpan[]): TemplateExpression;
+ function createYield(expression?: Expression): YieldExpression;
+ function createYield(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
+ function updateYield(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ function createSpread(expression: Expression): SpreadElement;
+ function updateSpread(node: SpreadElement, expression: Expression): SpreadElement;
+ function createClassExpression(modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function updateClassExpression(node: ClassExpression, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassExpression;
+ function createOmittedExpression(): OmittedExpression;
+ function createExpressionWithTypeArguments(typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
+ function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, typeArguments: TypeNode[], expression: Expression): ExpressionWithTypeArguments;
+ function createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+ function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+ function createNonNullExpression(expression: Expression): NonNullExpression;
+ function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createBlock(statements: Statement[], multiLine?: boolean): Block;
+ function updateBlock(node: Block, statements: Statement[]): Block;
+ function createVariableStatement(modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList | VariableDeclaration[]): VariableStatement;
+ function updateVariableStatement(node: VariableStatement, modifiers: Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createEmptyStatement(): EmptyStatement;
+ function createStatement(expression: Expression): ExpressionStatement;
+ function updateStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
+ function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+ function updateIf(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
+ function createDo(statement: Statement, expression: Expression): DoStatement;
+ function updateDo(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
+ function createWhile(expression: Expression, statement: Statement): WhileStatement;
+ function updateWhile(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
+ function createFor(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function updateFor(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function createForIn(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function updateForIn(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function createForOf(awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function updateForOf(node: ForOfStatement, awaitModifier: AwaitKeywordToken, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function createContinue(label?: string | Identifier): ContinueStatement;
+ function updateContinue(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
+ function createBreak(label?: string | Identifier): BreakStatement;
+ function updateBreak(node: BreakStatement, label: Identifier | undefined): BreakStatement;
+ function createReturn(expression?: Expression): ReturnStatement;
+ function updateReturn(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
+ function createWith(expression: Expression, statement: Statement): WithStatement;
+ function updateWith(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
+ function createSwitch(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function updateSwitch(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function createLabel(label: string | Identifier, statement: Statement): LabeledStatement;
+ function updateLabel(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
+ function createThrow(expression: Expression): ThrowStatement;
+ function updateThrow(node: ThrowStatement, expression: Expression): ThrowStatement;
+ function createTry(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function updateTry(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function createFunctionDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function updateFunctionDeclaration(node: FunctionDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function createClassDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function updateClassDeclaration(node: ClassDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[], members: ClassElement[]): ClassDeclaration;
+ function createEnumDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, members: EnumMember[]): EnumDeclaration;
+ function updateEnumDeclaration(node: EnumDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, members: EnumMember[]): EnumDeclaration;
+ function createModuleDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ function updateModuleDeclaration(node: ModuleDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ function createModuleBlock(statements: Statement[]): ModuleBlock;
+ function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
+ function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
+ function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
+ function createImportEqualsDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function createImportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier?: Expression): ImportDeclaration;
+ function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression | undefined): ImportDeclaration;
+ function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings): ImportClause;
+ function createNamespaceImport(name: Identifier): NamespaceImport;
+ function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
+ function createNamedImports(elements: ImportSpecifier[]): NamedImports;
+ function updateNamedImports(node: NamedImports, elements: ImportSpecifier[]): NamedImports;
+ function createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function createExportAssignment(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, isExportEquals: boolean, expression: Expression): ExportAssignment;
+ function updateExportAssignment(node: ExportAssignment, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, expression: Expression): ExportAssignment;
+ function createExportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier?: Expression): ExportDeclaration;
+ function updateExportDeclaration(node: ExportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, exportClause: NamedExports | undefined, moduleSpecifier: Expression | undefined): ExportDeclaration;
+ function createNamedExports(elements: ExportSpecifier[]): NamedExports;
+ function updateNamedExports(node: NamedExports, elements: ExportSpecifier[]): NamedExports;
+ function createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
+ function updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
+ function createExternalModuleReference(expression: Expression): ExternalModuleReference;
+ function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+ function createJsxElement(openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function createJsxSelfClosingElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxSelfClosingElement;
+ function createJsxOpeningElement(tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, attributes: JsxAttributes): JsxOpeningElement;
+ function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
+ function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
+ function createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(jsxAttributes: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
+ function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+ function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
+ function createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
+ function updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
+ function createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
+ function createCaseClause(expression: Expression, statements: Statement[]): CaseClause;
+ function updateCaseClause(node: CaseClause, expression: Expression, statements: Statement[]): CaseClause;
+ function createDefaultClause(statements: Statement[]): DefaultClause;
+ function updateDefaultClause(node: DefaultClause, statements: Statement[]): DefaultClause;
+ function createCatchClause(variableDeclaration: string | VariableDeclaration, block: Block): CatchClause;
+ function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration, block: Block): CatchClause;
+ function createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
+ function updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
+ function createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+ function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
+ function createSpreadAssignment(expression: Expression): SpreadAssignment;
+ function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+ function createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
+ function updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
+ function updateSourceFileNode(node: SourceFile, statements: Statement[]): SourceFile;
+ /**
+ * Creates a shallow, memberwise clone of a node for mutation.
+ */
+ function getMutableClone<T extends Node>(node: T): T;
+ /**
+ * Creates a synthetic statement to act as a placeholder for a not-emitted statement in
+ * order to preserve comments.
+ *
+ * @param original The original statement.
+ */
+ function createNotEmittedStatement(original: Node): NotEmittedStatement;
+ /**
+ * Creates a synthetic expression to act as a placeholder for a not-emitted expression in
+ * order to preserve comments or sourcemap positions.
+ *
+ * @param expression The inner expression to emit.
+ * @param original The original outer expression.
+ * @param location The location for the expression. Defaults to the positions from "original" if provided.
+ */
+ function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
+ function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createBundle(sourceFiles: SourceFile[]): Bundle;
+ function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
+ function createComma(left: Expression, right: Expression): Expression;
+ function createLessThan(left: Expression, right: Expression): Expression;
+ function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
+ function createAssignment(left: Expression, right: Expression): BinaryExpression;
+ function createStrictEquality(left: Expression, right: Expression): BinaryExpression;
+ function createStrictInequality(left: Expression, right: Expression): BinaryExpression;
+ function createAdd(left: Expression, right: Expression): BinaryExpression;
+ function createSubtract(left: Expression, right: Expression): BinaryExpression;
+ function createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
+ function createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalOr(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalNot(operand: Expression): PrefixUnaryExpression;
+ function createVoidZero(): VoidExpression;
+ function createExportDefault(expression: Expression): ExportAssignment;
+ function createExternalModuleExport(exportName: Identifier): ExportDeclaration;
+ /**
+ * Clears any EmitNode entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile: SourceFile): void;
+ function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
+ /**
+ * Gets flags that control emit behavior of a node.
+ */
+ function getEmitFlags(node: Node): EmitFlags | undefined;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange<T extends Node>(node: T, range: TextRange | undefined): T;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange | undefined): T;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange<T extends Node>(node: T, range: TextRange): T;
+ function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[]): T;
+ function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ /**
+ * Gets the constant value to emit for an expression.
+ */
+ function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node: Node): EmitHelper[] | undefined;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
+ function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@@ -2301,6 +3070,10 @@ declare namespace ts {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare namespace ts {
+ /** Array that is only intended to be pushed to, never read. */
+ interface Push<T> {
+ push(value: T): void;
+ }
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
@@ -2313,17 +3086,120 @@ declare namespace ts {
*/
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
/**
- * Given a set of options, returns the set of type directive names
- * that should be included for this program automatically.
- * This list could either come from the config file,
- * or from enumerating the types root + initial secondary types lookup location.
- * More type directives might appear in the program later as a result of loading actual source files;
- * this list is only the set of defaults that are implicitly included.
- */
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
- function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
- function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
+ /**
+ * Cached module resolutions per containing directory.
+ * This assumes that any module id will have the same resolution for sibling files located in the same folder.
+ */
+ interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForDirectory(directoryName: string): Map<ResolvedModuleWithFailedLookupLocations>;
+ }
+ /**
+ * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
+ * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
+ */
+ interface NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string): PerModuleNameCache;
+ }
+ interface PerModuleNameCache {
+ get(directory: string): ResolvedModuleWithFailedLookupLocations;
+ set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
+ }
+ function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string): ModuleResolutionCache;
+ function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations;
+ function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache): ResolvedModuleWithFailedLookupLocations;
+}
+declare namespace ts {
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): NodeArray<ParameterDeclaration>;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a concise body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
+}
+declare namespace ts {
+ function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
}
declare namespace ts {
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
@@ -2340,31 +3216,32 @@ declare namespace ts {
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
+ function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine;
/**
- * Read tsconfig.json file
- * @param fileName The path to the config file
- */
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
function readConfigFile(fileName: string, readFile: (path: string) => string): {
config?: any;
error?: Diagnostic;
};
/**
- * Parse the text of the tsconfig.json file
- * @param fileName The path to the config file
- * @param jsonText The text of the config file
- */
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
function parseConfigFileTextToJson(fileName: string, jsonText: string, stripComments?: boolean): {
config?: any;
error?: Diagnostic;
};
/**
- * Parse the contents of a config file (tsconfig.json).
- * @param json The contents of the config file to parse
- * @param host Instance of ParseConfigHost used to enumerate files in folder.
- * @param basePath A root directory to resolve relative path entries in the config
- * file to. e.g. outDir
- */
- function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[]): ParsedCommandLine;
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: JsFileExtensionInfo[]): ParsedCommandLine;
function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
@@ -2391,12 +3268,14 @@ declare namespace ts {
getText(sourceFile?: SourceFile): string;
getFirstToken(sourceFile?: SourceFile): Node;
getLastToken(sourceFile?: SourceFile): Node;
+ forEachChild<T>(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
@@ -2408,15 +3287,16 @@ declare namespace ts {
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
- getBaseTypes(): ObjectType[];
+ getBaseTypes(): BaseType[];
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): Type[];
+ getTypeParameters(): TypeParameter[];
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
}
interface SourceFile {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
@@ -2425,6 +3305,9 @@ declare namespace ts {
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
}
+ interface SourceFileLike {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
/**
* Represents an immutable snapshot of a script at a specified time.Once acquired, the
* snapshot is observably immutable. i.e. the same calls with the same parameters will return
@@ -2483,6 +3366,10 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
directoryExists?(directoryName: string): boolean;
getDirectories?(directoryName: string): string[];
+ /**
+ * Gets a set of custom transformers to use during emit.
+ */
+ getCustomTransformers?(): CustomTransformers | undefined;
}
interface LanguageService {
cleanupSemanticCache(): void;
@@ -2528,7 +3415,7 @@ declare namespace ts {
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
- getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[]): CodeAction[];
+ getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
dispose(): void;
@@ -2604,19 +3491,20 @@ declare namespace ts {
/** The position in newText the caret should point to after the insertion. */
caretOffset: number;
}
- interface RenameLocation {
+ interface DocumentSpan {
textSpan: TextSpan;
fileName: string;
}
- interface ReferenceEntry {
- textSpan: TextSpan;
- fileName: string;
+ interface RenameLocation extends DocumentSpan {
+ }
+ interface ReferenceEntry extends DocumentSpan {
isWriteAccess: boolean;
isDefinition: boolean;
+ isInString?: true;
}
- interface ImplementationLocation {
- textSpan: TextSpan;
- fileName: string;
+ interface ImplementationLocation extends DocumentSpan {
+ kind: string;
+ displayParts: SymbolDisplayPart[];
}
interface DocumentHighlights {
fileName: string;
@@ -2630,6 +3518,7 @@ declare namespace ts {
}
interface HighlightSpan {
fileName?: string;
+ isInString?: true;
textSpan: TextSpan;
kind: string;
}
@@ -2669,6 +3558,7 @@ declare namespace ts {
InsertSpaceAfterCommaDelimiter: boolean;
InsertSpaceAfterSemicolonInForStatements: boolean;
InsertSpaceBeforeAndAfterBinaryOperators: boolean;
+ InsertSpaceAfterConstructor?: boolean;
InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
@@ -2677,6 +3567,7 @@ declare namespace ts {
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
InsertSpaceAfterTypeAssertion?: boolean;
+ InsertSpaceBeforeFunctionParenthesis?: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
}
@@ -2684,6 +3575,7 @@ declare namespace ts {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
@@ -2692,6 +3584,7 @@ declare namespace ts {
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
insertSpaceAfterTypeAssertion?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
@@ -2738,12 +3631,17 @@ declare namespace ts {
text: string;
kind: string;
}
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
interface QuickInfo {
kind: string;
kindModifiers: string;
textSpan: TextSpan;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface RenameInfo {
canRename: boolean;
@@ -2774,6 +3672,7 @@ declare namespace ts {
separatorDisplayParts: SymbolDisplayPart[];
parameters: SignatureHelpParameter[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
/**
* Represents a set of signature help items, and the preferred item that should be selected.
@@ -2800,10 +3699,10 @@ declare namespace ts {
kindModifiers: string;
sortText: string;
/**
- * An optional span that indicates the text to be replaced by this completion item. It will be
- * set if the required span differs from the one generated by the default replacement behavior and should
- * be used in that case
- */
+ * An optional span that indicates the text to be replaced by this completion item. It will be
+ * set if the required span differs from the one generated by the default replacement behavior and should
+ * be used in that case
+ */
replacementSpan?: TextSpan;
}
interface CompletionEntryDetails {
@@ -2812,6 +3711,7 @@ declare namespace ts {
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
}
interface OutliningSpan {
/** The span of the document to actually collapse. */
@@ -2821,9 +3721,9 @@ declare namespace ts {
/** The text to display in the editor for the collapsed region. */
bannerText: string;
/**
- * Whether or not this region should be automatically collapsed when
- * the 'Collapse to Definitions' command is invoked.
- */
+ * Whether or not this region should be automatically collapsed when
+ * the 'Collapse to Definitions' command is invoked.
+ */
autoCollapse: boolean;
}
interface EmitOutput {
@@ -2911,7 +3811,7 @@ declare namespace ts {
const typeElement = "type";
/** enum E */
const enumElement = "enum";
- const enumMemberElement = "const";
+ const enumMemberElement = "enum member";
/**
* Inside module and script only
* const v = ..
@@ -2954,6 +3854,10 @@ declare namespace ts {
const letElement = "let";
const directory = "directory";
const externalModuleName = "external module name";
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ */
+ const jsxAttribute = "JSX attribute";
}
namespace ScriptElementKindModifier {
const none = "";
@@ -3022,61 +3926,61 @@ declare namespace ts {
}
declare namespace ts {
/**
- * The document registry represents a store of SourceFile objects that can be shared between
- * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
- * of files in the context.
- * SourceFile objects account for most of the memory usage by the language service. Sharing
- * the same DocumentRegistry instance between different instances of LanguageService allow
- * for more efficient memory utilization since all projects will share at least the library
- * file (lib.d.ts).
- *
- * A more advanced use of the document registry is to serialize sourceFile objects to disk
- * and re-hydrate them when needed.
- *
- * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
- * to all subsequent createLanguageService calls.
- */
+ * The document registry represents a store of SourceFile objects that can be shared between
+ * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
+ * of files in the context.
+ * SourceFile objects account for most of the memory usage by the language service. Sharing
+ * the same DocumentRegistry instance between different instances of LanguageService allow
+ * for more efficient memory utilization since all projects will share at least the library
+ * file (lib.d.ts).
+ *
+ * A more advanced use of the document registry is to serialize sourceFile objects to disk
+ * and re-hydrate them when needed.
+ *
+ * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
+ * to all subsequent createLanguageService calls.
+ */
interface DocumentRegistry {
/**
- * Request a stored SourceFile with a given fileName and compilationSettings.
- * The first call to acquire will call createLanguageServiceSourceFile to generate
- * the SourceFile if was not found in the registry.
- *
- * @param fileName The name of the file requested
- * @param compilationSettings Some compilation settings like target affects the
- * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
- * multiple copies of the same file for different compilation settings.
- * @parm scriptSnapshot Text of the file. Only used if the file was not found
- * in the registry and a new one was created.
- * @parm version Current version of the file. Only used if the file was not found
- * in the registry and a new one was created.
- */
+ * Request a stored SourceFile with a given fileName and compilationSettings.
+ * The first call to acquire will call createLanguageServiceSourceFile to generate
+ * the SourceFile if was not found in the registry.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @parm scriptSnapshot Text of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ * @parm version Current version of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ */
acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
/**
- * Request an updated version of an already existing SourceFile with a given fileName
- * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
- * to get an updated SourceFile.
- *
- * @param fileName The name of the file requested
- * @param compilationSettings Some compilation settings like target affects the
- * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
- * multiple copies of the same file for different compilation settings.
- * @param scriptSnapshot Text of the file.
- * @param version Current version of the file.
- */
+ * Request an updated version of an already existing SourceFile with a given fileName
+ * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
+ * to get an updated SourceFile.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @param scriptSnapshot Text of the file.
+ * @param version Current version of the file.
+ */
updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
/**
- * Informs the DocumentRegistry that a file is not needed any longer.
- *
- * Note: It is not allowed to call release on a SourceFile that was not acquired from
- * this registry originally.
- *
- * @param fileName The name of the file to be released
- * @param compilationSettings The compilation settings used to acquire the file
- */
+ * Informs the DocumentRegistry that a file is not needed any longer.
+ *
+ * Note: It is not allowed to call release on a SourceFile that was not acquired from
+ * this registry originally.
+ *
+ * @param fileName The name of the file to be released
+ * @param compilationSettings The compilation settings used to acquire the file
+ */
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
reportStats(): string;
@@ -3120,9 +4024,18 @@ declare namespace ts {
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
/**
- * Get the path of the default library files (lib.d.ts) as distributed with the typescript
- * node package.
- * The functionality is not supported if the ts module is consumed outside of a node module.
- */
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
function getDefaultLibFilePath(options: CompilerOptions): string;
}
+declare namespace ts {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
+}
diff --git a/node_modules/typescript/lib/typescriptServices.js b/node_modules/typescript/lib/typescriptServices.js
index d4ad545cf..ad7cbabef 100644
--- a/node_modules/typescript/lib/typescriptServices.js
+++ b/node_modules/typescript/lib/typescriptServices.js
@@ -13,11 +13,24 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+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;
};
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
var ts;
(function (ts) {
// token > SyntaxKind.Identifer => token is a keyword
@@ -168,191 +181,191 @@ var ts;
SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword";
SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword";
SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword";
- SyntaxKind[SyntaxKind["SetKeyword"] = 133] = "SetKeyword";
- SyntaxKind[SyntaxKind["StringKeyword"] = 134] = "StringKeyword";
- SyntaxKind[SyntaxKind["SymbolKeyword"] = 135] = "SymbolKeyword";
- SyntaxKind[SyntaxKind["TypeKeyword"] = 136] = "TypeKeyword";
- SyntaxKind[SyntaxKind["UndefinedKeyword"] = 137] = "UndefinedKeyword";
- SyntaxKind[SyntaxKind["FromKeyword"] = 138] = "FromKeyword";
- SyntaxKind[SyntaxKind["GlobalKeyword"] = 139] = "GlobalKeyword";
- SyntaxKind[SyntaxKind["OfKeyword"] = 140] = "OfKeyword";
+ SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword";
+ SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword";
+ SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword";
+ SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword";
+ SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword";
+ SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword";
+ SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword";
+ SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword";
+ SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword";
// Parse tree nodes
// Names
- SyntaxKind[SyntaxKind["QualifiedName"] = 141] = "QualifiedName";
- SyntaxKind[SyntaxKind["ComputedPropertyName"] = 142] = "ComputedPropertyName";
+ SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName";
+ SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName";
// Signature elements
- SyntaxKind[SyntaxKind["TypeParameter"] = 143] = "TypeParameter";
- SyntaxKind[SyntaxKind["Parameter"] = 144] = "Parameter";
- SyntaxKind[SyntaxKind["Decorator"] = 145] = "Decorator";
+ SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter";
+ SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter";
+ SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator";
// TypeMember
- SyntaxKind[SyntaxKind["PropertySignature"] = 146] = "PropertySignature";
- SyntaxKind[SyntaxKind["PropertyDeclaration"] = 147] = "PropertyDeclaration";
- SyntaxKind[SyntaxKind["MethodSignature"] = 148] = "MethodSignature";
- SyntaxKind[SyntaxKind["MethodDeclaration"] = 149] = "MethodDeclaration";
- SyntaxKind[SyntaxKind["Constructor"] = 150] = "Constructor";
- SyntaxKind[SyntaxKind["GetAccessor"] = 151] = "GetAccessor";
- SyntaxKind[SyntaxKind["SetAccessor"] = 152] = "SetAccessor";
- SyntaxKind[SyntaxKind["CallSignature"] = 153] = "CallSignature";
- SyntaxKind[SyntaxKind["ConstructSignature"] = 154] = "ConstructSignature";
- SyntaxKind[SyntaxKind["IndexSignature"] = 155] = "IndexSignature";
+ SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature";
+ SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration";
+ SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature";
+ SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration";
+ SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor";
+ SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor";
+ SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor";
+ SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature";
+ SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature";
+ SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature";
// Type
- SyntaxKind[SyntaxKind["TypePredicate"] = 156] = "TypePredicate";
- SyntaxKind[SyntaxKind["TypeReference"] = 157] = "TypeReference";
- SyntaxKind[SyntaxKind["FunctionType"] = 158] = "FunctionType";
- SyntaxKind[SyntaxKind["ConstructorType"] = 159] = "ConstructorType";
- SyntaxKind[SyntaxKind["TypeQuery"] = 160] = "TypeQuery";
- SyntaxKind[SyntaxKind["TypeLiteral"] = 161] = "TypeLiteral";
- SyntaxKind[SyntaxKind["ArrayType"] = 162] = "ArrayType";
- SyntaxKind[SyntaxKind["TupleType"] = 163] = "TupleType";
- SyntaxKind[SyntaxKind["UnionType"] = 164] = "UnionType";
- SyntaxKind[SyntaxKind["IntersectionType"] = 165] = "IntersectionType";
- SyntaxKind[SyntaxKind["ParenthesizedType"] = 166] = "ParenthesizedType";
- SyntaxKind[SyntaxKind["ThisType"] = 167] = "ThisType";
- SyntaxKind[SyntaxKind["TypeOperator"] = 168] = "TypeOperator";
- SyntaxKind[SyntaxKind["IndexedAccessType"] = 169] = "IndexedAccessType";
- SyntaxKind[SyntaxKind["MappedType"] = 170] = "MappedType";
- SyntaxKind[SyntaxKind["LiteralType"] = 171] = "LiteralType";
+ SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate";
+ SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference";
+ SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType";
+ SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType";
+ SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery";
+ SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral";
+ SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType";
+ SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType";
+ SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType";
+ SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType";
+ SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType";
+ SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType";
+ SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator";
+ SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType";
+ SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType";
+ SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType";
// Binding patterns
- SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 172] = "ObjectBindingPattern";
- SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 173] = "ArrayBindingPattern";
- SyntaxKind[SyntaxKind["BindingElement"] = 174] = "BindingElement";
+ SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern";
+ SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern";
+ SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement";
// Expression
- SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 175] = "ArrayLiteralExpression";
- SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 176] = "ObjectLiteralExpression";
- SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 177] = "PropertyAccessExpression";
- SyntaxKind[SyntaxKind["ElementAccessExpression"] = 178] = "ElementAccessExpression";
- SyntaxKind[SyntaxKind["CallExpression"] = 179] = "CallExpression";
- SyntaxKind[SyntaxKind["NewExpression"] = 180] = "NewExpression";
- SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 181] = "TaggedTemplateExpression";
- SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 182] = "TypeAssertionExpression";
- SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 183] = "ParenthesizedExpression";
- SyntaxKind[SyntaxKind["FunctionExpression"] = 184] = "FunctionExpression";
- SyntaxKind[SyntaxKind["ArrowFunction"] = 185] = "ArrowFunction";
- SyntaxKind[SyntaxKind["DeleteExpression"] = 186] = "DeleteExpression";
- SyntaxKind[SyntaxKind["TypeOfExpression"] = 187] = "TypeOfExpression";
- SyntaxKind[SyntaxKind["VoidExpression"] = 188] = "VoidExpression";
- SyntaxKind[SyntaxKind["AwaitExpression"] = 189] = "AwaitExpression";
- SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 190] = "PrefixUnaryExpression";
- SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 191] = "PostfixUnaryExpression";
- SyntaxKind[SyntaxKind["BinaryExpression"] = 192] = "BinaryExpression";
- SyntaxKind[SyntaxKind["ConditionalExpression"] = 193] = "ConditionalExpression";
- SyntaxKind[SyntaxKind["TemplateExpression"] = 194] = "TemplateExpression";
- SyntaxKind[SyntaxKind["YieldExpression"] = 195] = "YieldExpression";
- SyntaxKind[SyntaxKind["SpreadElement"] = 196] = "SpreadElement";
- SyntaxKind[SyntaxKind["ClassExpression"] = 197] = "ClassExpression";
- SyntaxKind[SyntaxKind["OmittedExpression"] = 198] = "OmittedExpression";
- SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 199] = "ExpressionWithTypeArguments";
- SyntaxKind[SyntaxKind["AsExpression"] = 200] = "AsExpression";
- SyntaxKind[SyntaxKind["NonNullExpression"] = 201] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression";
+ SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression";
+ SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression";
+ SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression";
+ SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression";
+ SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression";
+ SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression";
+ SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression";
+ SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression";
+ SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression";
+ SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction";
+ SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression";
+ SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression";
+ SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression";
+ SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression";
+ SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression";
+ SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression";
+ SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression";
+ SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression";
+ SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression";
+ SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression";
+ SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement";
+ SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression";
+ SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression";
+ SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments";
+ SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression";
+ SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression";
+ SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty";
// Misc
- SyntaxKind[SyntaxKind["TemplateSpan"] = 202] = "TemplateSpan";
- SyntaxKind[SyntaxKind["SemicolonClassElement"] = 203] = "SemicolonClassElement";
+ SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan";
+ SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement";
// Element
- SyntaxKind[SyntaxKind["Block"] = 204] = "Block";
- SyntaxKind[SyntaxKind["VariableStatement"] = 205] = "VariableStatement";
- SyntaxKind[SyntaxKind["EmptyStatement"] = 206] = "EmptyStatement";
- SyntaxKind[SyntaxKind["ExpressionStatement"] = 207] = "ExpressionStatement";
- SyntaxKind[SyntaxKind["IfStatement"] = 208] = "IfStatement";
- SyntaxKind[SyntaxKind["DoStatement"] = 209] = "DoStatement";
- SyntaxKind[SyntaxKind["WhileStatement"] = 210] = "WhileStatement";
- SyntaxKind[SyntaxKind["ForStatement"] = 211] = "ForStatement";
- SyntaxKind[SyntaxKind["ForInStatement"] = 212] = "ForInStatement";
- SyntaxKind[SyntaxKind["ForOfStatement"] = 213] = "ForOfStatement";
- SyntaxKind[SyntaxKind["ContinueStatement"] = 214] = "ContinueStatement";
- SyntaxKind[SyntaxKind["BreakStatement"] = 215] = "BreakStatement";
- SyntaxKind[SyntaxKind["ReturnStatement"] = 216] = "ReturnStatement";
- SyntaxKind[SyntaxKind["WithStatement"] = 217] = "WithStatement";
- SyntaxKind[SyntaxKind["SwitchStatement"] = 218] = "SwitchStatement";
- SyntaxKind[SyntaxKind["LabeledStatement"] = 219] = "LabeledStatement";
- SyntaxKind[SyntaxKind["ThrowStatement"] = 220] = "ThrowStatement";
- SyntaxKind[SyntaxKind["TryStatement"] = 221] = "TryStatement";
- SyntaxKind[SyntaxKind["DebuggerStatement"] = 222] = "DebuggerStatement";
- SyntaxKind[SyntaxKind["VariableDeclaration"] = 223] = "VariableDeclaration";
- SyntaxKind[SyntaxKind["VariableDeclarationList"] = 224] = "VariableDeclarationList";
- SyntaxKind[SyntaxKind["FunctionDeclaration"] = 225] = "FunctionDeclaration";
- SyntaxKind[SyntaxKind["ClassDeclaration"] = 226] = "ClassDeclaration";
- SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 227] = "InterfaceDeclaration";
- SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 228] = "TypeAliasDeclaration";
- SyntaxKind[SyntaxKind["EnumDeclaration"] = 229] = "EnumDeclaration";
- SyntaxKind[SyntaxKind["ModuleDeclaration"] = 230] = "ModuleDeclaration";
- SyntaxKind[SyntaxKind["ModuleBlock"] = 231] = "ModuleBlock";
- SyntaxKind[SyntaxKind["CaseBlock"] = 232] = "CaseBlock";
- SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 233] = "NamespaceExportDeclaration";
- SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 234] = "ImportEqualsDeclaration";
- SyntaxKind[SyntaxKind["ImportDeclaration"] = 235] = "ImportDeclaration";
- SyntaxKind[SyntaxKind["ImportClause"] = 236] = "ImportClause";
- SyntaxKind[SyntaxKind["NamespaceImport"] = 237] = "NamespaceImport";
- SyntaxKind[SyntaxKind["NamedImports"] = 238] = "NamedImports";
- SyntaxKind[SyntaxKind["ImportSpecifier"] = 239] = "ImportSpecifier";
- SyntaxKind[SyntaxKind["ExportAssignment"] = 240] = "ExportAssignment";
- SyntaxKind[SyntaxKind["ExportDeclaration"] = 241] = "ExportDeclaration";
- SyntaxKind[SyntaxKind["NamedExports"] = 242] = "NamedExports";
- SyntaxKind[SyntaxKind["ExportSpecifier"] = 243] = "ExportSpecifier";
- SyntaxKind[SyntaxKind["MissingDeclaration"] = 244] = "MissingDeclaration";
+ SyntaxKind[SyntaxKind["Block"] = 206] = "Block";
+ SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement";
+ SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement";
+ SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement";
+ SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement";
+ SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement";
+ SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement";
+ SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement";
+ SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement";
+ SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement";
+ SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement";
+ SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement";
+ SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement";
+ SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement";
+ SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement";
+ SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement";
+ SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement";
+ SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement";
+ SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement";
+ SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration";
+ SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList";
+ SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration";
+ SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration";
+ SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration";
+ SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration";
+ SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration";
+ SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration";
+ SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock";
+ SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock";
+ SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration";
+ SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration";
+ SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration";
+ SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause";
+ SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport";
+ SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports";
+ SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier";
+ SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment";
+ SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration";
+ SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports";
+ SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier";
+ SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration";
// Module references
- SyntaxKind[SyntaxKind["ExternalModuleReference"] = 245] = "ExternalModuleReference";
+ SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference";
// JSX
- SyntaxKind[SyntaxKind["JsxElement"] = 246] = "JsxElement";
- SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 247] = "JsxSelfClosingElement";
- SyntaxKind[SyntaxKind["JsxOpeningElement"] = 248] = "JsxOpeningElement";
- SyntaxKind[SyntaxKind["JsxClosingElement"] = 249] = "JsxClosingElement";
- SyntaxKind[SyntaxKind["JsxAttribute"] = 250] = "JsxAttribute";
- SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 251] = "JsxSpreadAttribute";
- SyntaxKind[SyntaxKind["JsxExpression"] = 252] = "JsxExpression";
+ SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement";
+ SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement";
+ SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement";
+ SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement";
+ SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute";
+ SyntaxKind[SyntaxKind["JsxAttributes"] = 253] = "JsxAttributes";
+ SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 254] = "JsxSpreadAttribute";
+ SyntaxKind[SyntaxKind["JsxExpression"] = 255] = "JsxExpression";
// Clauses
- SyntaxKind[SyntaxKind["CaseClause"] = 253] = "CaseClause";
- SyntaxKind[SyntaxKind["DefaultClause"] = 254] = "DefaultClause";
- SyntaxKind[SyntaxKind["HeritageClause"] = 255] = "HeritageClause";
- SyntaxKind[SyntaxKind["CatchClause"] = 256] = "CatchClause";
+ SyntaxKind[SyntaxKind["CaseClause"] = 256] = "CaseClause";
+ SyntaxKind[SyntaxKind["DefaultClause"] = 257] = "DefaultClause";
+ SyntaxKind[SyntaxKind["HeritageClause"] = 258] = "HeritageClause";
+ SyntaxKind[SyntaxKind["CatchClause"] = 259] = "CatchClause";
// Property assignments
- SyntaxKind[SyntaxKind["PropertyAssignment"] = 257] = "PropertyAssignment";
- SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 258] = "ShorthandPropertyAssignment";
- SyntaxKind[SyntaxKind["SpreadAssignment"] = 259] = "SpreadAssignment";
+ SyntaxKind[SyntaxKind["PropertyAssignment"] = 260] = "PropertyAssignment";
+ SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 261] = "ShorthandPropertyAssignment";
+ SyntaxKind[SyntaxKind["SpreadAssignment"] = 262] = "SpreadAssignment";
// Enum
- SyntaxKind[SyntaxKind["EnumMember"] = 260] = "EnumMember";
+ SyntaxKind[SyntaxKind["EnumMember"] = 263] = "EnumMember";
// Top-level nodes
- SyntaxKind[SyntaxKind["SourceFile"] = 261] = "SourceFile";
+ SyntaxKind[SyntaxKind["SourceFile"] = 264] = "SourceFile";
+ SyntaxKind[SyntaxKind["Bundle"] = 265] = "Bundle";
// JSDoc nodes
- SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 262] = "JSDocTypeExpression";
+ SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 266] = "JSDocTypeExpression";
// The * type
- SyntaxKind[SyntaxKind["JSDocAllType"] = 263] = "JSDocAllType";
+ SyntaxKind[SyntaxKind["JSDocAllType"] = 267] = "JSDocAllType";
// The ? type
- SyntaxKind[SyntaxKind["JSDocUnknownType"] = 264] = "JSDocUnknownType";
- SyntaxKind[SyntaxKind["JSDocArrayType"] = 265] = "JSDocArrayType";
- SyntaxKind[SyntaxKind["JSDocUnionType"] = 266] = "JSDocUnionType";
- SyntaxKind[SyntaxKind["JSDocTupleType"] = 267] = "JSDocTupleType";
- SyntaxKind[SyntaxKind["JSDocNullableType"] = 268] = "JSDocNullableType";
- SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 269] = "JSDocNonNullableType";
- SyntaxKind[SyntaxKind["JSDocRecordType"] = 270] = "JSDocRecordType";
- SyntaxKind[SyntaxKind["JSDocRecordMember"] = 271] = "JSDocRecordMember";
- SyntaxKind[SyntaxKind["JSDocTypeReference"] = 272] = "JSDocTypeReference";
- SyntaxKind[SyntaxKind["JSDocOptionalType"] = 273] = "JSDocOptionalType";
- SyntaxKind[SyntaxKind["JSDocFunctionType"] = 274] = "JSDocFunctionType";
- SyntaxKind[SyntaxKind["JSDocVariadicType"] = 275] = "JSDocVariadicType";
- SyntaxKind[SyntaxKind["JSDocConstructorType"] = 276] = "JSDocConstructorType";
- SyntaxKind[SyntaxKind["JSDocThisType"] = 277] = "JSDocThisType";
- SyntaxKind[SyntaxKind["JSDocComment"] = 278] = "JSDocComment";
- SyntaxKind[SyntaxKind["JSDocTag"] = 279] = "JSDocTag";
- SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 280] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 281] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 282] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 283] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 284] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 285] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 286] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 287] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 288] = "JSDocLiteralType";
- SyntaxKind[SyntaxKind["JSDocNullKeyword"] = 289] = "JSDocNullKeyword";
- SyntaxKind[SyntaxKind["JSDocUndefinedKeyword"] = 290] = "JSDocUndefinedKeyword";
- SyntaxKind[SyntaxKind["JSDocNeverKeyword"] = 291] = "JSDocNeverKeyword";
+ SyntaxKind[SyntaxKind["JSDocUnknownType"] = 268] = "JSDocUnknownType";
+ SyntaxKind[SyntaxKind["JSDocArrayType"] = 269] = "JSDocArrayType";
+ SyntaxKind[SyntaxKind["JSDocUnionType"] = 270] = "JSDocUnionType";
+ SyntaxKind[SyntaxKind["JSDocTupleType"] = 271] = "JSDocTupleType";
+ SyntaxKind[SyntaxKind["JSDocNullableType"] = 272] = "JSDocNullableType";
+ SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 273] = "JSDocNonNullableType";
+ SyntaxKind[SyntaxKind["JSDocRecordType"] = 274] = "JSDocRecordType";
+ SyntaxKind[SyntaxKind["JSDocRecordMember"] = 275] = "JSDocRecordMember";
+ SyntaxKind[SyntaxKind["JSDocTypeReference"] = 276] = "JSDocTypeReference";
+ SyntaxKind[SyntaxKind["JSDocOptionalType"] = 277] = "JSDocOptionalType";
+ SyntaxKind[SyntaxKind["JSDocFunctionType"] = 278] = "JSDocFunctionType";
+ SyntaxKind[SyntaxKind["JSDocVariadicType"] = 279] = "JSDocVariadicType";
+ SyntaxKind[SyntaxKind["JSDocConstructorType"] = 280] = "JSDocConstructorType";
+ SyntaxKind[SyntaxKind["JSDocThisType"] = 281] = "JSDocThisType";
+ SyntaxKind[SyntaxKind["JSDocComment"] = 282] = "JSDocComment";
+ SyntaxKind[SyntaxKind["JSDocTag"] = 283] = "JSDocTag";
+ SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 284] = "JSDocAugmentsTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 285] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 286] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 287] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 288] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 289] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 290] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 291] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 292] = "JSDocLiteralType";
// Synthesized list
- SyntaxKind[SyntaxKind["SyntaxList"] = 292] = "SyntaxList";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 293] = "SyntaxList";
// Transformation nodes
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 293] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 294] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 295] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 296] = "EndOfDeclarationMarker";
- SyntaxKind[SyntaxKind["RawExpression"] = 297] = "RawExpression";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 294] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 295] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 296] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 297] = "EndOfDeclarationMarker";
// Enum value count
SyntaxKind[SyntaxKind["Count"] = 298] = "Count";
// Markers
@@ -363,15 +376,15 @@ var ts;
SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord";
SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord";
SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword";
- SyntaxKind[SyntaxKind["LastKeyword"] = 140] = "LastKeyword";
+ SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword";
SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord";
SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord";
- SyntaxKind[SyntaxKind["FirstTypeNode"] = 156] = "FirstTypeNode";
- SyntaxKind[SyntaxKind["LastTypeNode"] = 171] = "LastTypeNode";
+ SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode";
+ SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode";
SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation";
SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation";
SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
- SyntaxKind[SyntaxKind["LastToken"] = 140] = "LastToken";
+ SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken";
SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken";
SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
@@ -380,11 +393,11 @@ var ts;
SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken";
SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator";
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator";
- SyntaxKind[SyntaxKind["FirstNode"] = 141] = "FirstNode";
- SyntaxKind[SyntaxKind["FirstJSDocNode"] = 262] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 288] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 278] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 291] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode";
+ SyntaxKind[SyntaxKind["FirstJSDocNode"] = 266] = "FirstJSDocNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 292] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 282] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 292] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -399,28 +412,22 @@ var ts;
NodeFlags[NodeFlags["HasImplicitReturn"] = 128] = "HasImplicitReturn";
NodeFlags[NodeFlags["HasExplicitReturn"] = 256] = "HasExplicitReturn";
NodeFlags[NodeFlags["GlobalAugmentation"] = 512] = "GlobalAugmentation";
- NodeFlags[NodeFlags["HasClassExtends"] = 1024] = "HasClassExtends";
- NodeFlags[NodeFlags["HasDecorators"] = 2048] = "HasDecorators";
- NodeFlags[NodeFlags["HasParamDecorators"] = 4096] = "HasParamDecorators";
- NodeFlags[NodeFlags["HasAsyncFunctions"] = 8192] = "HasAsyncFunctions";
- NodeFlags[NodeFlags["HasSpreadAttribute"] = 16384] = "HasSpreadAttribute";
- NodeFlags[NodeFlags["HasRestAttribute"] = 32768] = "HasRestAttribute";
- NodeFlags[NodeFlags["DisallowInContext"] = 65536] = "DisallowInContext";
- NodeFlags[NodeFlags["YieldContext"] = 131072] = "YieldContext";
- NodeFlags[NodeFlags["DecoratorContext"] = 262144] = "DecoratorContext";
- NodeFlags[NodeFlags["AwaitContext"] = 524288] = "AwaitContext";
- NodeFlags[NodeFlags["ThisNodeHasError"] = 1048576] = "ThisNodeHasError";
- NodeFlags[NodeFlags["JavaScriptFile"] = 2097152] = "JavaScriptFile";
- NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 4194304] = "ThisNodeOrAnySubNodesHasError";
- NodeFlags[NodeFlags["HasAggregatedChildData"] = 8388608] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["HasAsyncFunctions"] = 1024] = "HasAsyncFunctions";
+ NodeFlags[NodeFlags["DisallowInContext"] = 2048] = "DisallowInContext";
+ NodeFlags[NodeFlags["YieldContext"] = 4096] = "YieldContext";
+ NodeFlags[NodeFlags["DecoratorContext"] = 8192] = "DecoratorContext";
+ NodeFlags[NodeFlags["AwaitContext"] = 16384] = "AwaitContext";
+ NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+ NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+ NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+ NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
- NodeFlags[NodeFlags["EmitHelperFlags"] = 64512] = "EmitHelperFlags";
- NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 64896] = "ReachabilityAndEmitFlags";
+ NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
// Parsing context flags
- NodeFlags[NodeFlags["ContextFlags"] = 3080192] = "ContextFlags";
+ NodeFlags[NodeFlags["ContextFlags"] = 96256] = "ContextFlags";
// Exclude these flags when parsing a Type
- NodeFlags[NodeFlags["TypeExcludesFlags"] = 655360] = "TypeExcludesFlags";
+ NodeFlags[NodeFlags["TypeExcludesFlags"] = 20480] = "TypeExcludesFlags";
})(NodeFlags = ts.NodeFlags || (ts.NodeFlags = {}));
var ModifierFlags;
(function (ModifierFlags) {
@@ -469,6 +476,17 @@ var ts;
GeneratedIdentifierKind[GeneratedIdentifierKind["Unique"] = 3] = "Unique";
GeneratedIdentifierKind[GeneratedIdentifierKind["Node"] = 4] = "Node";
})(GeneratedIdentifierKind = ts.GeneratedIdentifierKind || (ts.GeneratedIdentifierKind = {}));
+ /* @internal */
+ var NumericLiteralFlags;
+ (function (NumericLiteralFlags) {
+ NumericLiteralFlags[NumericLiteralFlags["None"] = 0] = "None";
+ NumericLiteralFlags[NumericLiteralFlags["Scientific"] = 2] = "Scientific";
+ NumericLiteralFlags[NumericLiteralFlags["Octal"] = 4] = "Octal";
+ NumericLiteralFlags[NumericLiteralFlags["HexSpecifier"] = 8] = "HexSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinarySpecifier"] = 16] = "BinarySpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["OctalSpecifier"] = 32] = "OctalSpecifier";
+ NumericLiteralFlags[NumericLiteralFlags["BinaryOrOctalSpecifier"] = 48] = "BinaryOrOctalSpecifier";
+ })(NumericLiteralFlags = ts.NumericLiteralFlags || (ts.NumericLiteralFlags = {}));
var FlowFlags;
(function (FlowFlags) {
FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable";
@@ -482,6 +500,8 @@ var ts;
FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation";
FlowFlags[FlowFlags["Referenced"] = 512] = "Referenced";
FlowFlags[FlowFlags["Shared"] = 1024] = "Shared";
+ FlowFlags[FlowFlags["PreFinally"] = 2048] = "PreFinally";
+ FlowFlags[FlowFlags["AfterFinally"] = 4096] = "AfterFinally";
FlowFlags[FlowFlags["Label"] = 12] = "Label";
FlowFlags[FlowFlags["Condition"] = 96] = "Condition";
})(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {}));
@@ -503,6 +523,16 @@ var ts;
// Diagnostics were produced and outputs were generated in spite of them.
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeFormatFlags;
(function (TypeFormatFlags) {
TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None";
@@ -517,6 +547,8 @@ var ts;
TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 2048] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 4096] = "AddUndefined";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -549,8 +581,7 @@ var ts;
TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
})(TypePredicateKind = ts.TypePredicateKind || (ts.TypePredicateKind = {}));
- /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator
- * metadata */
+ /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator metadata */
/* @internal */
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
@@ -598,13 +629,10 @@ var ts;
SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType";
SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace";
SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias";
- SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated";
- SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged";
- SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient";
- SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype";
- SymbolFlags[SymbolFlags["SyntheticProperty"] = 268435456] = "SyntheticProperty";
- SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional";
- SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar";
+ SymbolFlags[SymbolFlags["Prototype"] = 16777216] = "Prototype";
+ SymbolFlags[SymbolFlags["ExportStar"] = 33554432] = "ExportStar";
+ SymbolFlags[SymbolFlags["Optional"] = 67108864] = "Optional";
+ SymbolFlags[SymbolFlags["Transient"] = 134217728] = "Transient";
SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
SymbolFlags[SymbolFlags["Value"] = 107455] = "Value";
@@ -648,11 +676,27 @@ var ts;
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
/* @internal */
+ var CheckFlags;
+ (function (CheckFlags) {
+ CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
+ CheckFlags[CheckFlags["SyntheticProperty"] = 2] = "SyntheticProperty";
+ CheckFlags[CheckFlags["SyntheticMethod"] = 4] = "SyntheticMethod";
+ CheckFlags[CheckFlags["Readonly"] = 8] = "Readonly";
+ CheckFlags[CheckFlags["Partial"] = 16] = "Partial";
+ CheckFlags[CheckFlags["HasNonUniformType"] = 32] = "HasNonUniformType";
+ CheckFlags[CheckFlags["ContainsPublic"] = 64] = "ContainsPublic";
+ CheckFlags[CheckFlags["ContainsProtected"] = 128] = "ContainsProtected";
+ CheckFlags[CheckFlags["ContainsPrivate"] = 256] = "ContainsPrivate";
+ CheckFlags[CheckFlags["ContainsStatic"] = 512] = "ContainsStatic";
+ CheckFlags[CheckFlags["Synthetic"] = 6] = "Synthetic";
+ })(CheckFlags = ts.CheckFlags || (ts.CheckFlags = {}));
+ /* @internal */
var NodeCheckFlags;
(function (NodeCheckFlags) {
NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked";
NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis";
NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis";
+ NodeCheckFlags[NodeCheckFlags["CaptureNewTarget"] = 8] = "CaptureNewTarget";
NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance";
NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic";
NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked";
@@ -701,6 +745,9 @@ var ts;
TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral";
/* @internal */
TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType";
+ TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
+ /* @internal */
+ TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
/* @internal */
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
@@ -709,7 +756,7 @@ var ts;
TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy";
/* @internal */
- TypeFlags[TypeFlags["Intrinsic"] = 16015] = "Intrinsic";
+ TypeFlags[TypeFlags["Intrinsic"] = 16793231] = "Intrinsic";
/* @internal */
TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
@@ -718,11 +765,12 @@ var ts;
TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
TypeFlags[TypeFlags["StructuredType"] = 229376] = "StructuredType";
- TypeFlags[TypeFlags["StructuredOrTypeParameter"] = 507904] = "StructuredOrTypeParameter";
+ TypeFlags[TypeFlags["StructuredOrTypeVariable"] = 1032192] = "StructuredOrTypeVariable";
+ TypeFlags[TypeFlags["TypeVariable"] = 540672] = "TypeVariable";
// 'Narrowable' types are types where narrowing actually narrows.
// This *should* be every type other than null, undefined, void, and never
- TypeFlags[TypeFlags["Narrowable"] = 1033215] = "Narrowable";
- TypeFlags[TypeFlags["NotUnionOrUnit"] = 33281] = "NotUnionOrUnit";
+ TypeFlags[TypeFlags["Narrowable"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
/* @internal */
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
/* @internal */
@@ -764,6 +812,8 @@ var ts;
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["PrototypeProperty"] = 3] = "PrototypeProperty";
/// this.name = expr
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ThisProperty"] = 4] = "ThisProperty";
+ // F.name = expr
+ SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["Property"] = 5] = "Property";
})(SpecialPropertyAssignmentKind = ts.SpecialPropertyAssignmentKind || (ts.SpecialPropertyAssignmentKind = {}));
var DiagnosticCategory;
(function (DiagnosticCategory) {
@@ -790,6 +840,7 @@ var ts;
JsxEmit[JsxEmit["None"] = 0] = "None";
JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
JsxEmit[JsxEmit["React"] = 2] = "React";
+ JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
})(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {}));
var NewLineKind;
(function (NewLineKind) {
@@ -803,6 +854,7 @@ var ts;
ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
ScriptKind[ScriptKind["TS"] = 3] = "TS";
ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+ ScriptKind[ScriptKind["External"] = 5] = "External";
})(ScriptKind = ts.ScriptKind || (ts.ScriptKind = {}));
var ScriptTarget;
(function (ScriptTarget) {
@@ -1037,7 +1089,6 @@ var ts;
TransformFlags[TransformFlags["TypeScriptClassSyntaxMask"] = 274432] = "TypeScriptClassSyntaxMask";
TransformFlags[TransformFlags["ES2015FunctionSyntaxMask"] = 163840] = "ES2015FunctionSyntaxMask";
})(TransformFlags = ts.TransformFlags || (ts.TransformFlags = {}));
- /* @internal */
var EmitFlags;
(function (EmitFlags) {
EmitFlags[EmitFlags["SingleLine"] = 1] = "SingleLine";
@@ -1065,15 +1116,45 @@ var ts;
EmitFlags[EmitFlags["CustomPrologue"] = 524288] = "CustomPrologue";
EmitFlags[EmitFlags["NoHoisting"] = 1048576] = "NoHoisting";
EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 2097152] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 4194304] = "Iterator";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
+ /**
+ * Used by the checker, this enum keeps track of external emit helpers that should be type
+ * checked.
+ */
/* @internal */
- var EmitContext;
- (function (EmitContext) {
- EmitContext[EmitContext["SourceFile"] = 0] = "SourceFile";
- EmitContext[EmitContext["Expression"] = 1] = "Expression";
- EmitContext[EmitContext["IdentifierName"] = 2] = "IdentifierName";
- EmitContext[EmitContext["Unspecified"] = 3] = "Unspecified";
- })(EmitContext = ts.EmitContext || (ts.EmitContext = {}));
+ var ExternalEmitHelpers;
+ (function (ExternalEmitHelpers) {
+ ExternalEmitHelpers[ExternalEmitHelpers["Extends"] = 1] = "Extends";
+ ExternalEmitHelpers[ExternalEmitHelpers["Assign"] = 2] = "Assign";
+ ExternalEmitHelpers[ExternalEmitHelpers["Rest"] = 4] = "Rest";
+ ExternalEmitHelpers[ExternalEmitHelpers["Decorate"] = 8] = "Decorate";
+ ExternalEmitHelpers[ExternalEmitHelpers["Metadata"] = 16] = "Metadata";
+ ExternalEmitHelpers[ExternalEmitHelpers["Param"] = 32] = "Param";
+ ExternalEmitHelpers[ExternalEmitHelpers["Awaiter"] = 64] = "Awaiter";
+ ExternalEmitHelpers[ExternalEmitHelpers["Generator"] = 128] = "Generator";
+ ExternalEmitHelpers[ExternalEmitHelpers["Values"] = 256] = "Values";
+ ExternalEmitHelpers[ExternalEmitHelpers["Read"] = 512] = "Read";
+ ExternalEmitHelpers[ExternalEmitHelpers["Spread"] = 1024] = "Spread";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 2048] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 4096] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 8192] = "AsyncValues";
+ // Helpers included by ES2015 for..of
+ ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
+ // Helpers included by ES2017 for..await..of
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ // Helpers included by ES2015 spread
+ ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
+ var EmitHint;
+ (function (EmitHint) {
+ EmitHint[EmitHint["SourceFile"] = 0] = "SourceFile";
+ EmitHint[EmitHint["Expression"] = 1] = "Expression";
+ EmitHint[EmitHint["IdentifierName"] = 2] = "IdentifierName";
+ EmitHint[EmitHint["Unspecified"] = 3] = "Unspecified";
+ })(EmitHint = ts.EmitHint || (ts.EmitHint = {}));
})(ts || (ts = {}));
/*@internal*/
var ts;
@@ -1101,8 +1182,8 @@ var ts;
*/
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
@@ -1118,9 +1199,9 @@ var ts;
*/
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
@@ -1130,7 +1211,7 @@ var ts;
* @param markName The name of the mark.
*/
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
/**
@@ -1139,7 +1220,7 @@ var ts;
* @param measureName The name of the measure whose durations should be accumulated.
*/
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
/**
@@ -1148,9 +1229,9 @@ var ts;
* @param cb The action to perform for each measure
*/
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
/** Enables (and resets) performance measurements for the compiler. */
@@ -1174,7 +1255,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
/* @internal */
(function (ts) {
@@ -1193,25 +1274,106 @@ var ts;
Ternary[Ternary["Maybe"] = 1] = "Maybe";
Ternary[Ternary["True"] = -1] = "True";
})(Ternary = ts.Ternary || (ts.Ternary = {}));
- var createObject = Object.create;
// More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times.
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null); // tslint:disable-line:no-null-keyword
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(/*locales*/ undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B".
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ /** Create a MapLike with good performance. */
+ function createDictionaryObject() {
+ var map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword
// Using 'delete' on an object causes V8 to put the object in dictionary mode.
// This disables creation of hidden classes, which are expensive when an object is
// constantly changing shape.
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ /** Create a new map. If a template object is provided, the map will copy entries from it. */
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
// Copies keys/values from template. Note that for..in will not throw if
// template is undefined, and instead will just exit the loop.
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ // Internet Explorer's Map doesn't support iteration, so don't use it.
+ // tslint:disable-next-line:no-in-operator
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ // Keep the class inside a function so it doesn't get compiled if it's not used.
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ // tslint:disable-next-line:no-in-operator
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -1224,33 +1386,28 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
// path should already be well-formed so it does not need to be normalized
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -1270,6 +1427,10 @@ var ts;
Comparison[Comparison["EqualTo"] = 0] = "EqualTo";
Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan";
})(Comparison = ts.Comparison || (ts.Comparison = {}));
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
/**
* Iterates through 'array' by index and performs the callback on each element of array until the callback
* returns a truthy value, then returns that value.
@@ -1277,7 +1438,7 @@ var ts;
*/
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -1287,6 +1448,26 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ /**
+ * Iterates through the parent chain of a node and performs the callback on each parent until the callback
+ * returns a truthy value, then returns that value.
+ * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit"
+ * At that point findAncestor returns undefined.
+ */
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -1301,7 +1482,7 @@ var ts;
*/
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -1312,7 +1493,7 @@ var ts;
ts.every = every;
/** Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. */
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -1321,12 +1502,22 @@ var ts;
return undefined;
}
ts.find = find;
+ /** Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. */
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
/**
* Returns the first truthy result of `callback`, or else fails.
* This is like `forEach`, but never returns undefined.
*/
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -1349,7 +1540,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -1359,7 +1550,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -1569,21 +1760,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -1901,9 +2089,6 @@ var ts;
/**
* Indicates whether a map-like contains an own property with the specified key.
*
- * NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
- * the 'in' operator.
- *
* @param map A map-like.
* @param key A property key.
*/
@@ -1914,9 +2099,6 @@ var ts;
/**
* Gets the value of an owned property in a map-like.
*
- * NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
- * an indexer.
- *
* @param map A map-like.
* @param key A property key.
*/
@@ -1941,56 +2123,61 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- /**
- * Enumerates the properties of a Map<T>, invoking a callback and returning the first truthy result.
- *
- * @param map A map for which properties should be enumerated.
- * @param callback A callback to invoke for each property.
- */
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- /**
- * Returns true if a Map<T> has some matching property.
- *
- * @param map A map whose properties should be tested.
- * @param predicate An optional callback used to test each property.
- */
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
- return false;
+ return result;
+ var _b;
}
- ts.someProperties = someProperties;
+ ts.convertToArray = convertToArray;
/**
- * Performs a shallow copy of the properties from a source Map<T> to a target MapLike<T>
- *
- * @param source A map from which properties should be copied.
- * @param target A map to which properties should be copied.
+ * Calls `callback` for each entry in the map, returning the first truthy result.
+ * Use `map.forEach` instead for normal iteration.
*/
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachEntry = forEachEntry;
+ /** `forEachEntry` for just keys. */
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ var _b;
}
- ts.appendProperty = appendProperty;
+ ts.forEachKey = forEachKey;
+ /** Copy entries from `source` to `target`. */
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
+ }
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -1998,52 +2185,15 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
/**
- * Reduce the properties of a map.
- *
- * NOTE: This is intended for use with Map<T> objects. For MapLike<T> objects, use
- * reduceOwnProperties instead as it offers better runtime safety.
- *
- * @param map The map to reduce
- * @param callback An aggregation function that is called for each entry in the map
- * @param initial The initial value for the reduction.
- */
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- /**
- * Reduce the properties defined on a map-like (but not from its prototype chain).
- *
- * NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
- * reduceProperties instead as it offers better performance.
- *
- * @param map The map-like to reduce
- * @param callback An aggregation function that is called for each entry in the map
- * @param initial The initial value for the reduction.
- */
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
- /**
* Performs a shallow equality comparison of the contents of two map-likes.
*
* @param left A map-like whose properties should be compared.
@@ -2073,23 +2223,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -2116,36 +2257,32 @@ var ts;
return result;
}
ts.extend = extend;
- /**
- * Adds the value to an array of values associated with the key, and returns the array.
- * Creates the array if it does not already exist.
- */
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- /**
- * Removes a value from an array of values associated with the key.
- * Does not preserve the order of those values.
- * Does nothing if `key` is not in `map`, or `value` is not in `map[key]`.
- */
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
/**
* Tests whether a value is an array.
*/
@@ -2226,6 +2363,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -2328,9 +2466,12 @@ var ts;
if (b === undefined)
return 1 /* GreaterThan */;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- // accent means a ≠ b, a ≠ á, a = A
- var result = a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" });
+ // Checking if "collator exists indicates that Intl is available.
+ // We still have to check if "collator.compare" is correct. If it is not, use "String.localeComapre"
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" }); // accent means a ≠ b, a ≠ á, a = A
return result < 0 ? -1 /* LessThan */ : result > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
}
a = a.toUpperCase();
@@ -2403,7 +2544,7 @@ var ts;
ts.normalizeSlashes = normalizeSlashes;
/**
* Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files")
- */
+ */
function getRootLength(path) {
if (path.charCodeAt(0) === 47 /* slash */) {
if (path.charCodeAt(1) !== 47 /* slash */)
@@ -2775,6 +2916,17 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
@@ -2785,31 +2937,10 @@ var ts;
* files or directories, does not match subdirectories that start with a . character
*/
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
/**
* An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension,
* and does not contain any glob characters itself.
@@ -2888,6 +3019,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -2900,34 +3032,50 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ // Associate an array of results with each include regex. This keeps results in order of the "include" order.
+ // If there are no "includes", then just put everything in results[0].
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
+ }
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
}
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -2952,7 +3100,7 @@ var ts;
}
// Sort the offsets array using either the literal or canonical path representations.
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
@@ -2961,7 +3109,7 @@ var ts;
// subpath of an existing base path
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -3010,8 +3158,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -3022,11 +3181,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -3044,14 +3203,13 @@ var ts;
(function (ExtensionPriority) {
ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles";
ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles";
- ExtensionPriority[ExtensionPriority["Limit"] = 5] = "Limit";
ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest";
ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest";
})(ExtensionPriority = ts.ExtensionPriority || (ts.ExtensionPriority = {}));
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
// If its not in the list of supported extensions, this is likely a
@@ -3062,27 +3220,27 @@ var ts;
/**
* Adjusts an extension priority to be the highest priority within the same range.
*/
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
return 0 /* TypeScriptFiles */;
}
- else if (extensionPriority < 5 /* Limit */) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2 /* DeclarationAndJavaScriptFiles */;
}
else {
- return 5 /* Limit */;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
/**
* Gets the next lowest extension priority for a given priority.
*/
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
return 2 /* DeclarationAndJavaScriptFiles */;
}
else {
- return 5 /* Limit */;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -3329,144 +3487,30 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2 /*text*/;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1 /*binary*/;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- // Load file and read the first two bytes into a string with no interpretation
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- // Position must be at 0 before encoding can be changed
- fileStream.Position = 0;
- // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- // ReadText method always strips byte order mark from resulting string
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- // Write characters in UTF-8 encoding
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM).
- // If not, start from position 0, as the BOM will be added automatically when charset==utf8.
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2 /*overwrite*/);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, /*useCaseSensitiveFileNames*/ false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
}
+ var version = process.version;
+ if (!version) {
+ return undefined;
+ }
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
+ }
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -3476,32 +3520,32 @@ var ts;
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
// One file can have multiple watchers
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -3513,7 +3557,7 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
// When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
@@ -3521,18 +3565,20 @@ var ts;
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
// Some applications save a working file via rename operations
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
// win32\win64 are case insensitive platforms
if (platform === "win32" || platform === "win64") {
@@ -3553,7 +3599,7 @@ var ts;
if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
// Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js,
// flip all byte pairs and treat as little endian.
- len &= ~1;
+ len &= ~1; // Round down to a multiple of 2
for (var i = 0; i < len; i += 2) {
var temp = buffer[i];
buffer[i] = buffer[i + 1];
@@ -3580,7 +3626,7 @@ var ts;
var fd;
try {
fd = _fs.openSync(fileName, "w");
- _fs.writeSync(fd, data, undefined, "utf8");
+ _fs.writeSync(fd, data, /*position*/ undefined, "utf8");
}
finally {
if (fd !== undefined) {
@@ -3600,10 +3646,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -3685,9 +3731,10 @@ var ts;
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
var options;
if (!directoryExists(directoryName)) {
+ // do nothing if target folder does not exist
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -3701,7 +3748,6 @@ var ts;
// When deleting a file, the passed baseFileName is null
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -3765,6 +3811,7 @@ var ts;
require("source-map-support").install();
}
catch (e) {
+ // Could not enable source maps.
}
},
setTimeout: setTimeout,
@@ -3820,9 +3867,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
// process and process.nextTick checks if current environment is node-like
// process.browser check excludes webpack and browserify
@@ -3897,11 +3941,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -3910,7 +3954,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -3926,6 +3970,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -3933,7 +3978,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -3965,9 +4010,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -4016,11 +4061,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -4066,6 +4112,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -4109,6 +4160,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -4119,19 +4171,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -4171,12 +4224,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -4185,19 +4238,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -4206,18 +4259,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -4238,13 +4293,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -4256,6 +4311,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -4270,6 +4326,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -4293,23 +4350,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -4341,7 +4408,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -4350,9 +4416,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -4363,8 +4437,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -4425,16 +4499,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -4443,12 +4519,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -4466,11 +4542,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -4485,11 +4561,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -4511,17 +4588,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -4532,23 +4610,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -4558,32 +4636,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -4601,7 +4714,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -4625,7 +4738,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -4633,28 +4746,40 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
})(ts || (ts = {}));
/// <reference path="core.ts"/>
@@ -4666,7 +4791,7 @@ var ts;
return token >= 70 /* Identifier */;
}
ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
+ var textToToken = ts.createMapFromTemplate({
"abstract": 116 /* AbstractKeyword */,
"any": 118 /* AnyKeyword */,
"as": 117 /* AsKeyword */,
@@ -4690,7 +4815,7 @@ var ts;
"false": 85 /* FalseKeyword */,
"finally": 86 /* FinallyKeyword */,
"for": 87 /* ForKeyword */,
- "from": 138 /* FromKeyword */,
+ "from": 139 /* FromKeyword */,
"function": 88 /* FunctionKeyword */,
"get": 124 /* GetKeyword */,
"if": 89 /* IfKeyword */,
@@ -4708,27 +4833,28 @@ var ts;
"new": 93 /* NewKeyword */,
"null": 94 /* NullKeyword */,
"number": 132 /* NumberKeyword */,
+ "object": 133 /* ObjectKeyword */,
"package": 110 /* PackageKeyword */,
"private": 111 /* PrivateKeyword */,
"protected": 112 /* ProtectedKeyword */,
"public": 113 /* PublicKeyword */,
"readonly": 130 /* ReadonlyKeyword */,
"require": 131 /* RequireKeyword */,
- "global": 139 /* GlobalKeyword */,
+ "global": 140 /* GlobalKeyword */,
"return": 95 /* ReturnKeyword */,
- "set": 133 /* SetKeyword */,
+ "set": 134 /* SetKeyword */,
"static": 114 /* StaticKeyword */,
- "string": 134 /* StringKeyword */,
+ "string": 135 /* StringKeyword */,
"super": 96 /* SuperKeyword */,
"switch": 97 /* SwitchKeyword */,
- "symbol": 135 /* SymbolKeyword */,
+ "symbol": 136 /* SymbolKeyword */,
"this": 98 /* ThisKeyword */,
"throw": 99 /* ThrowKeyword */,
"true": 100 /* TrueKeyword */,
"try": 101 /* TryKeyword */,
- "type": 136 /* TypeKeyword */,
+ "type": 137 /* TypeKeyword */,
"typeof": 102 /* TypeOfKeyword */,
- "undefined": 137 /* UndefinedKeyword */,
+ "undefined": 138 /* UndefinedKeyword */,
"var": 103 /* VarKeyword */,
"void": 104 /* VoidKeyword */,
"while": 105 /* WhileKeyword */,
@@ -4736,7 +4862,7 @@ var ts;
"yield": 115 /* YieldKeyword */,
"async": 119 /* AsyncKeyword */,
"await": 120 /* AwaitKeyword */,
- "of": 140 /* OfKeyword */,
+ "of": 141 /* OfKeyword */,
"{": 16 /* OpenBraceToken */,
"}": 17 /* CloseBraceToken */,
"(": 18 /* OpenParenToken */,
@@ -4876,9 +5002,9 @@ var ts;
}
function makeReverseMap(source) {
var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
return result;
}
var tokenStrings = makeReverseMap(textToToken);
@@ -4888,7 +5014,7 @@ var ts;
ts.tokenToString = tokenToString;
/* @internal */
function stringToToken(s) {
- return textToToken[s];
+ return textToToken.get(s);
}
ts.stringToToken = stringToToken;
/* @internal */
@@ -4904,6 +5030,7 @@ var ts;
if (text.charCodeAt(pos) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
result.push(lineStart);
lineStart = pos;
@@ -4962,7 +5089,6 @@ var ts;
return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
}
ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
function isWhiteSpace(ch) {
return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
}
@@ -5049,6 +5175,7 @@ var ts;
if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
pos++;
if (stopAfterLineBreak) {
@@ -5121,7 +5248,7 @@ var ts;
if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
var ch = text.charCodeAt(pos);
if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
if (text.charCodeAt(pos + i) !== ch) {
return false;
}
@@ -5203,6 +5330,7 @@ var ts;
if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
pos++;
}
+ // falls through
case 10 /* lineFeed */:
pos++;
if (trailing) {
@@ -5298,15 +5426,15 @@ var ts;
if (!comments) {
comments = [];
}
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
return comments;
}
function getLeadingCommentRanges(text, pos) {
- return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ return reduceEachLeadingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
}
ts.getLeadingCommentRanges = getLeadingCommentRanges;
function getTrailingCommentRanges(text, pos) {
- return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
+ return reduceEachTrailingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
/** Optionally, get the shebang */
@@ -5333,7 +5461,7 @@ var ts;
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
return false;
}
- for (var i = 1, n = name.length; i < n; i++) {
+ for (var i = 1; i < name.length; i++) {
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
return false;
}
@@ -5357,6 +5485,7 @@ var ts;
var precedingLineBreak;
var hasExtendedUnicodeEscape;
var tokenIsUnterminated;
+ var numericLiteralFlags;
setText(text, start, length);
return {
getStartPos: function () { return startPos; },
@@ -5370,6 +5499,7 @@ var ts;
isIdentifier: function () { return token === 70 /* Identifier */ || token > 106 /* LastReservedWord */; },
isReservedWord: function () { return token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */; },
isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
@@ -5406,6 +5536,7 @@ var ts;
var end = pos;
if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) {
pos++;
+ numericLiteralFlags = 2 /* Scientific */;
if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */)
pos++;
if (isDigit(text.charCodeAt(pos))) {
@@ -5604,7 +5735,7 @@ var ts;
if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) {
pos++;
}
- // fall through
+ // falls through
case 10 /* lineFeed */:
case 8232 /* lineSeparator */:
case 8233 /* paragraphSeparator */:
@@ -5705,8 +5836,11 @@ var ts;
var len = tokenValue.length;
if (len >= 2 && len <= 11) {
var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
+ if (ch >= 97 /* a */ && ch <= 122 /* z */) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
}
}
return token = 70 /* Identifier */;
@@ -5738,6 +5872,7 @@ var ts;
hasExtendedUnicodeEscape = false;
precedingLineBreak = false;
tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
while (true) {
tokenPos = pos;
if (pos >= end) {
@@ -5923,6 +6058,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 8 /* HexSpecifier */;
return token = 8 /* NumericLiteral */;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) {
@@ -5933,6 +6069,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 16 /* BinarySpecifier */;
return token = 8 /* NumericLiteral */;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) {
@@ -5943,16 +6080,19 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 32 /* OctalSpecifier */;
return token = 8 /* NumericLiteral */;
}
// Try to parse as an octal
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4 /* Octal */;
return token = 8 /* NumericLiteral */;
}
// This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero
// can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being
// permissive and allowing decimal digits of the form 08* and 09* (which many browsers also do).
+ // falls through
case 49 /* _1 */:
case 50 /* _2 */:
case 51 /* _3 */:
@@ -6206,7 +6346,14 @@ var ts;
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
- if ((char === 123 /* openBrace */) || (char === 60 /* lessThan */)) {
+ if (char === 123 /* openBrace */) {
+ break;
+ }
+ if (char === 60 /* lessThan */) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7 /* ConflictMarkerTrivia */;
+ }
break;
}
}
@@ -6399,6 +6546,19 @@ var ts;
return undefined;
}
ts.getDeclarationOfKind = getDeclarationOfKind;
+ function findDeclaration(symbol, predicate) {
+ var declarations = symbol.declarations;
+ if (declarations) {
+ for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
+ var declaration = declarations_2[_i];
+ if (predicate(declaration)) {
+ return declaration;
+ }
+ }
+ }
+ return undefined;
+ }
+ ts.findDeclaration = findDeclaration;
// Pool writers to avoid needing to allocate them for every symbol we write.
var stringWriters = [];
function getSingleLineStringWriter() {
@@ -6413,6 +6573,7 @@ var ts;
writeSpace: writeText,
writeStringLiteral: writeText,
writeParameter: writeText,
+ writeProperty: writeText,
writeSymbol: writeText,
// Completely ignore indentation for string writers. And map newlines to
// a single space.
@@ -6421,7 +6582,8 @@ var ts;
decreaseIndent: ts.noop,
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
}
return stringWriters.pop();
@@ -6437,25 +6599,25 @@ var ts;
}
ts.getFullWidth = getFullWidth;
function hasResolvedModule(sourceFile, moduleNameText) {
- return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]);
+ return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText));
}
ts.hasResolvedModule = hasResolvedModule;
function getResolvedModule(sourceFile, moduleNameText) {
- return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined;
+ return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules.get(moduleNameText) : undefined;
}
ts.getResolvedModule = getResolvedModule;
function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
if (!sourceFile.resolvedModules) {
sourceFile.resolvedModules = ts.createMap();
}
- sourceFile.resolvedModules[moduleNameText] = resolvedModule;
+ sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
}
ts.setResolvedModule = setResolvedModule;
function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap();
}
- sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective;
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
}
ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
/* @internal */
@@ -6477,7 +6639,7 @@ var ts;
}
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
- var oldResolution = oldResolutions && oldResolutions[names[i]];
+ var oldResolution = oldResolutions && oldResolutions.get(names[i]);
var changed = oldResolution
? !newResolution || !comparer(oldResolution, newResolution)
: newResolution;
@@ -6491,28 +6653,28 @@ var ts;
// Returns true if this node contains a parse error anywhere underneath it.
function containsParseError(node) {
aggregateChildData(node);
- return (node.flags & 4194304 /* ThisNodeOrAnySubNodesHasError */) !== 0;
+ return (node.flags & 131072 /* ThisNodeOrAnySubNodesHasError */) !== 0;
}
ts.containsParseError = containsParseError;
function aggregateChildData(node) {
- if (!(node.flags & 8388608 /* HasAggregatedChildData */)) {
+ if (!(node.flags & 262144 /* HasAggregatedChildData */)) {
// A node is considered to contain a parse error if:
// a) the parser explicitly marked that it had an error
// b) any of it's children reported that it had an error.
- var thisNodeOrAnySubNodesHasError = ((node.flags & 1048576 /* ThisNodeHasError */) !== 0) ||
+ var thisNodeOrAnySubNodesHasError = ((node.flags & 32768 /* ThisNodeHasError */) !== 0) ||
ts.forEachChild(node, containsParseError);
// If so, mark ourselves accordingly.
if (thisNodeOrAnySubNodesHasError) {
- node.flags |= 4194304 /* ThisNodeOrAnySubNodesHasError */;
+ node.flags |= 131072 /* ThisNodeOrAnySubNodesHasError */;
}
// Also mark that we've propagated the child information to this node. This way we can
// always consult the bit directly on this node without needing to check its children
// again.
- node.flags |= 8388608 /* HasAggregatedChildData */;
+ node.flags |= 262144 /* HasAggregatedChildData */;
}
}
function getSourceFileOfNode(node) {
- while (node && node.kind !== 261 /* SourceFile */) {
+ while (node && node.kind !== 264 /* SourceFile */) {
node = node.parent;
}
return node;
@@ -6520,11 +6682,11 @@ var ts;
ts.getSourceFileOfNode = getSourceFileOfNode;
function isStatementWithLocals(node) {
switch (node.kind) {
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return true;
}
return false;
@@ -6599,6 +6761,10 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
+ function isToken(n) {
+ return n.kind >= 0 /* FirstToken */ && n.kind <= 141 /* LastToken */;
+ }
+ ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
// With nodes that have no width (i.e. 'Missing' nodes), we actually *don't*
// want to skip trivia because this will launch us forward to the next token.
@@ -6615,18 +6781,18 @@ var ts;
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
// trivia for the list, we may have skipped the JSDocComment as well. So we should process its
// first child to determine the actual position of its first token.
- if (node.kind === 292 /* SyntaxList */ && node._children.length > 0) {
+ if (node.kind === 293 /* SyntaxList */ && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
}
ts.getTokenPosOfNode = getTokenPosOfNode;
function isJSDocNode(node) {
- return node.kind >= 262 /* FirstJSDocNode */ && node.kind <= 288 /* LastJSDocNode */;
+ return node.kind >= 266 /* FirstJSDocNode */ && node.kind <= 292 /* LastJSDocNode */;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocTag(node) {
- return node.kind >= 278 /* FirstJSDocTagNode */ && node.kind <= 291 /* LastJSDocTagNode */;
+ return node.kind >= 282 /* FirstJSDocTagNode */ && node.kind <= 292 /* LastJSDocTagNode */;
}
ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -6657,20 +6823,11 @@ var ts;
return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);
}
ts.getTextOfNode = getTextOfNode;
- function getLiteralText(node, sourceFile, languageVersion) {
- // Any template literal or string literal with an extended escape
- // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal.
- if (languageVersion < 2 /* ES2015 */ && (isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
- return getQuotedEscapedLiteralText('"', node.text, '"');
- }
+ function getLiteralText(node, sourceFile) {
// If we don't need to downlevel and we can reach the original source text using
// the node's parent reference, then simply get the text as it was originally written.
if (!nodeIsSynthesized(node) && node.parent) {
- var text = getSourceTextOfNodeFromSourceFile(sourceFile, node);
- if (languageVersion < 2 /* ES2015 */ && isBinaryOrOctalIntegerLiteral(node, text)) {
- return node.text;
- }
- return text;
+ return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
// If we can't reach the original source text, use the canonical form if it's a number,
// or an escaped quoted form of the original text if it's string-like.
@@ -6691,19 +6848,6 @@ var ts;
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function isBinaryOrOctalIntegerLiteral(node, text) {
- if (node.kind === 8 /* NumericLiteral */ && text.length > 1) {
- switch (text.charCodeAt(1)) {
- case 98 /* b */:
- case 66 /* B */:
- case 111 /* o */:
- case 79 /* O */:
- return true;
- }
- }
- return false;
- }
- ts.isBinaryOrOctalIntegerLiteral = isBinaryOrOctalIntegerLiteral;
function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
}
@@ -6712,11 +6856,6 @@ var ts;
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier;
}
ts.escapeIdentifier = escapeIdentifier;
- // Remove extra underscore from escaped identifier
- function unescapeIdentifier(identifier) {
- return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier;
- }
- ts.unescapeIdentifier = unescapeIdentifier;
// Make an identifier from an external module name by extracting the string after the last "/" and replacing
// all non-alphanumeric characters with underscores
function makeIdentifierFromModuleName(moduleName) {
@@ -6730,26 +6869,26 @@ var ts;
ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
var node = getRootDeclaration(declaration);
- return node.kind === 223 /* VariableDeclaration */ && node.parent.kind === 256 /* CatchClause */;
+ return node.kind === 225 /* VariableDeclaration */ && node.parent.kind === 259 /* CatchClause */;
}
ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
function isAmbientModule(node) {
- return node && node.kind === 230 /* ModuleDeclaration */ &&
+ return node && node.kind === 232 /* ModuleDeclaration */ &&
(node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node));
}
ts.isAmbientModule = isAmbientModule;
- /** Given a symbol for a module, checks that it is either an untyped import or a shorthand ambient module. */
+ /** Given a symbol for a module, checks that it is a shorthand ambient module. */
function isShorthandAmbientModuleSymbol(moduleSymbol) {
return isShorthandAmbientModule(moduleSymbol.valueDeclaration);
}
ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
function isShorthandAmbientModule(node) {
// The only kind of module that can be missing a body is a shorthand ambient module.
- return node.kind === 230 /* ModuleDeclaration */ && (!node.body);
+ return node && node.kind === 232 /* ModuleDeclaration */ && (!node.body);
}
function isBlockScopedContainerTopLevel(node) {
- return node.kind === 261 /* SourceFile */ ||
- node.kind === 230 /* ModuleDeclaration */ ||
+ return node.kind === 264 /* SourceFile */ ||
+ node.kind === 232 /* ModuleDeclaration */ ||
isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
@@ -6765,32 +6904,36 @@ var ts;
return false;
}
switch (node.parent.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return ts.isExternalModule(node.parent);
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
}
return false;
}
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
+ function isEffectiveExternalModule(node, compilerOptions) {
+ return ts.isExternalModule(node) || compilerOptions.isolatedModules;
+ }
+ ts.isEffectiveExternalModule = isEffectiveExternalModule;
function isBlockScope(node, parentNode) {
switch (node.kind) {
- case 261 /* SourceFile */:
- case 232 /* CaseBlock */:
- case 256 /* CatchClause */:
- case 230 /* ModuleDeclaration */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 264 /* SourceFile */:
+ case 234 /* CaseBlock */:
+ case 259 /* CatchClause */:
+ case 232 /* ModuleDeclaration */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return true;
- case 204 /* Block */:
+ case 206 /* Block */:
// function block is not considered block-scope container
// see comment in binder.ts: bind(...), case for SyntaxKind.Block
return parentNode && !isFunctionLike(parentNode);
@@ -6817,6 +6960,10 @@ var ts;
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
}
ts.declarationNameToString = declarationNameToString;
+ function getNameFromIndexInfo(info) {
+ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
+ }
+ ts.getNameFromIndexInfo = getNameFromIndexInfo;
function getTextOfPropertyName(name) {
switch (name.kind) {
case 70 /* Identifier */:
@@ -6824,7 +6971,7 @@ var ts;
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
return name.text;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
if (isStringOrNumericLiteral(name.expression)) {
return name.expression.text;
}
@@ -6835,10 +6982,10 @@ var ts;
function entityNameToString(name) {
switch (name.kind) {
case 70 /* Identifier */:
- return getFullWidth(name) === 0 ? unescapeIdentifier(name.text) : getTextOfNode(name);
- case 141 /* QualifiedName */:
+ return getFullWidth(name) === 0 ? ts.unescapeIdentifier(name.text) : getTextOfNode(name);
+ case 142 /* QualifiedName */:
return entityNameToString(name.left) + "." + entityNameToString(name.right);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return entityNameToString(name.expression) + "." + entityNameToString(name.name);
}
}
@@ -6875,7 +7022,7 @@ var ts;
ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
function getErrorSpanForArrowFunction(sourceFile, node) {
var pos = ts.skipTrivia(sourceFile.text, node.pos);
- if (node.body && node.body.kind === 204 /* Block */) {
+ if (node.body && node.body.kind === 206 /* Block */) {
var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
if (startLine < endLine) {
@@ -6889,7 +7036,7 @@ var ts;
function getErrorSpanForNode(sourceFile, node) {
var errorNode = node;
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false);
if (pos_1 === sourceFile.text.length) {
// file is empty - return span for the beginning of the file
@@ -6898,23 +7045,23 @@ var ts;
return getSpanOfTokenAtPosition(sourceFile, pos_1);
// This list is a work in progress. Add missing node kinds to improve their error
// spans.
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 228 /* TypeAliasDeclaration */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 230 /* TypeAliasDeclaration */:
errorNode = node.name;
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return getErrorSpanForArrowFunction(sourceFile, node);
}
if (errorNode === undefined) {
@@ -6937,7 +7084,7 @@ var ts;
}
ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
- return node.kind === 229 /* EnumDeclaration */ && isConst(node);
+ return node.kind === 231 /* EnumDeclaration */ && isConst(node);
}
ts.isConstEnumDeclaration = isConstEnumDeclaration;
function isConst(node) {
@@ -6950,11 +7097,11 @@ var ts;
}
ts.isLet = isLet;
function isSuperCall(n) {
- return n.kind === 179 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */;
+ return n.kind === 180 /* CallExpression */ && n.expression.kind === 96 /* SuperKeyword */;
}
ts.isSuperCall = isSuperCall;
function isPrologueDirective(node) {
- return node.kind === 207 /* ExpressionStatement */
+ return node.kind === 209 /* ExpressionStatement */
&& node.expression.kind === 9 /* StringLiteral */;
}
ts.isPrologueDirective = isPrologueDirective;
@@ -6967,10 +7114,10 @@ var ts;
}
ts.getLeadingCommentRangesOfNodeFromText = getLeadingCommentRangesOfNodeFromText;
function getJSDocCommentRanges(node, text) {
- var commentRanges = (node.kind === 144 /* Parameter */ ||
- node.kind === 143 /* TypeParameter */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 185 /* ArrowFunction */) ?
+ var commentRanges = (node.kind === 145 /* Parameter */ ||
+ node.kind === 144 /* TypeParameter */ ||
+ node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 186 /* ArrowFunction */) ?
ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRangesOfNodeFromText(node, text);
// True if the comment starts with '/**' but not if it is '/**/'
@@ -6985,79 +7132,80 @@ var ts;
ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
function isPartOfTypeNode(node) {
- if (156 /* FirstTypeNode */ <= node.kind && node.kind <= 171 /* LastTypeNode */) {
+ if (157 /* FirstTypeNode */ <= node.kind && node.kind <= 172 /* LastTypeNode */) {
return true;
}
switch (node.kind) {
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
return true;
case 104 /* VoidKeyword */:
- return node.parent.kind !== 188 /* VoidExpression */;
- case 199 /* ExpressionWithTypeArguments */:
+ return node.parent.kind !== 189 /* VoidExpression */;
+ case 200 /* ExpressionWithTypeArguments */:
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
// Identifiers and qualified names may be type nodes, depending on their context. Climb
// above them to find the lowest container
case 70 /* Identifier */:
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
- if (node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node) {
+ if (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) {
node = node.parent;
}
- else if (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node) {
+ else if (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node) {
node = node.parent;
}
// At this point, node is either a qualified name or an identifier
- ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */ || node.kind === 177 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
- case 141 /* QualifiedName */:
- case 177 /* PropertyAccessExpression */:
+ ts.Debug.assert(node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+ // falls through
+ case 142 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
case 98 /* ThisKeyword */:
- var parent_1 = node.parent;
- if (parent_1.kind === 160 /* TypeQuery */) {
+ var parent = node.parent;
+ if (parent.kind === 161 /* TypeQuery */) {
return false;
}
// Do not recursively call isPartOfTypeNode on the parent. In the example:
//
// let a: A.B.C;
//
- // Calling isPartOfTypeNode would consider the qualified name A.B a type node. Only C or
- // A.B.C is a type node.
- if (156 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 171 /* LastTypeNode */) {
+ // Calling isPartOfTypeNode would consider the qualified name A.B a type node.
+ // Only C and A.B.C are type nodes.
+ if (157 /* FirstTypeNode */ <= parent.kind && parent.kind <= 172 /* LastTypeNode */) {
return true;
}
- switch (parent_1.kind) {
- case 199 /* ExpressionWithTypeArguments */:
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1);
- case 143 /* TypeParameter */:
- return node === parent_1.constraint;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 144 /* Parameter */:
- case 223 /* VariableDeclaration */:
- return node === parent_1.type;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return node === parent_1.type;
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- return node === parent_1.type;
- case 182 /* TypeAssertionExpression */:
- return node === parent_1.type;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0;
- case 181 /* TaggedTemplateExpression */:
+ switch (parent.kind) {
+ case 200 /* ExpressionWithTypeArguments */:
+ return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
+ case 144 /* TypeParameter */:
+ return node === parent.constraint;
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 225 /* VariableDeclaration */:
+ return node === parent.type;
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return node === parent.type;
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ return node === parent.type;
+ case 183 /* TypeAssertionExpression */:
+ return node === parent.type;
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0;
+ case 182 /* TaggedTemplateExpression */:
// TODO (drosen): TaggedTemplateExpressions may eventually support type arguments.
return false;
}
@@ -7065,29 +7213,43 @@ var ts;
return false;
}
ts.isPartOfTypeNode = isPartOfTypeNode;
+ function isChildOfNodeWithKind(node, kind) {
+ while (node) {
+ if (node.kind === kind) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
+ ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 191 /* PrefixUnaryExpression */;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
// Warning: This has the same semantics as the forEach family of functions,
// in that traversal terminates in the event that 'visitor' supplies a truthy value.
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitor(node);
- case 232 /* CaseBlock */:
- case 204 /* Block */:
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 217 /* WithStatement */:
- case 218 /* SwitchStatement */:
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
- case 219 /* LabeledStatement */:
- case 221 /* TryStatement */:
- case 256 /* CatchClause */:
+ case 234 /* CaseBlock */:
+ case 206 /* Block */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 219 /* WithStatement */:
+ case 220 /* SwitchStatement */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
+ case 221 /* LabeledStatement */:
+ case 223 /* TryStatement */:
+ case 259 /* CatchClause */:
return ts.forEachChild(node, traverse);
}
}
@@ -7097,29 +7259,30 @@ var ts;
return traverse(body);
function traverse(node) {
switch (node.kind) {
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
visitor(node);
var operand = node.expression;
if (operand) {
traverse(operand);
}
- case 229 /* EnumDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ return;
+ case 231 /* EnumDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
// These are not allowed inside a generator now, but eventually they may be allowed
// as local types. Regardless, any yield statements contained within them should be
// skipped in this traversal.
return;
default:
if (isFunctionLike(node)) {
- var name_5 = node.name;
- if (name_5 && name_5.kind === 142 /* ComputedPropertyName */) {
+ var name = node.name;
+ if (name && name.kind === 143 /* ComputedPropertyName */) {
// Note that we will not include methods/accessors of a class because they would require
// first descending into the class. This is by design.
- traverse(name_5.expression);
+ traverse(name.expression);
return;
}
}
@@ -7132,17 +7295,35 @@ var ts;
}
}
ts.forEachYieldExpression = forEachYieldExpression;
+ /**
+ * Gets the most likely element type for a TypeNode. This is not an exhaustive test
+ * as it assumes a rest argument can only be an array type (either T[], or Array<T>).
+ *
+ * @param node The type node.
+ */
+ function getRestParameterElementType(node) {
+ if (node && node.kind === 163 /* ArrayType */) {
+ return node.elementType;
+ }
+ else if (node && node.kind === 158 /* TypeReference */) {
+ return ts.singleOrUndefined(node.typeArguments);
+ }
+ else {
+ return undefined;
+ }
+ }
+ ts.getRestParameterElementType = getRestParameterElementType;
function isVariableLike(node) {
if (node) {
switch (node.kind) {
- case 174 /* BindingElement */:
- case 260 /* EnumMember */:
- case 144 /* Parameter */:
- case 257 /* PropertyAssignment */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 258 /* ShorthandPropertyAssignment */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 263 /* EnumMember */:
+ case 145 /* Parameter */:
+ case 260 /* PropertyAssignment */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 225 /* VariableDeclaration */:
return true;
}
}
@@ -7150,11 +7331,11 @@ var ts;
}
ts.isVariableLike = isVariableLike;
function isAccessor(node) {
- return node && (node.kind === 151 /* GetAccessor */ || node.kind === 152 /* SetAccessor */);
+ return node && (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */);
}
ts.isAccessor = isAccessor;
function isClassLike(node) {
- return node && (node.kind === 226 /* ClassDeclaration */ || node.kind === 197 /* ClassExpression */);
+ return node && (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */);
}
ts.isClassLike = isClassLike;
function isFunctionLike(node) {
@@ -7163,19 +7344,19 @@ var ts;
ts.isFunctionLike = isFunctionLike;
function isFunctionLikeKind(kind) {
switch (kind) {
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return true;
}
return false;
@@ -7183,13 +7364,13 @@ var ts;
ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return true;
}
return false;
@@ -7197,30 +7378,42 @@ var ts;
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
function isIterationStatement(node, lookInLabeledStatements) {
switch (node.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
return true;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
}
return false;
}
ts.isIterationStatement = isIterationStatement;
+ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
+ while (true) {
+ if (beforeUnwrapLabelCallback) {
+ beforeUnwrapLabelCallback(node);
+ }
+ if (node.statement.kind !== 221 /* LabeledStatement */) {
+ return node.statement;
+ }
+ node = node.statement;
+ }
+ }
+ ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 204 /* Block */ && isFunctionLike(node.parent);
+ return node && node.kind === 206 /* Block */ && isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
- return node && node.kind === 149 /* MethodDeclaration */ && node.parent.kind === 176 /* ObjectLiteralExpression */;
+ return node && node.kind === 150 /* MethodDeclaration */ && node.parent.kind === 177 /* ObjectLiteralExpression */;
}
ts.isObjectLiteralMethod = isObjectLiteralMethod;
function isObjectLiteralOrClassExpressionMethod(node) {
- return node.kind === 149 /* MethodDeclaration */ &&
- (node.parent.kind === 176 /* ObjectLiteralExpression */ ||
- node.parent.kind === 197 /* ClassExpression */);
+ return node.kind === 150 /* MethodDeclaration */ &&
+ (node.parent.kind === 177 /* ObjectLiteralExpression */ ||
+ node.parent.kind === 198 /* ClassExpression */);
}
ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
function isIdentifierTypePredicate(predicate) {
@@ -7256,7 +7449,7 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
// If the grandparent node is an object literal (as opposed to a class),
// then the computed property is not a 'this' container.
// A computed property name in a class needs to be a this container
@@ -7271,9 +7464,9 @@ var ts;
// the *body* of the container.
node = node.parent;
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 144 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) {
// If the decorator's parent is a Parameter, we resolve the this container from
// the grandparent class declaration.
node = node.parent.parent;
@@ -7284,39 +7477,52 @@ var ts;
node = node.parent;
}
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
if (!includeArrowFunctions) {
continue;
}
- // Fall through
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 230 /* ModuleDeclaration */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 229 /* EnumDeclaration */:
- case 261 /* SourceFile */:
+ // falls through
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 232 /* ModuleDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 231 /* EnumDeclaration */:
+ case 264 /* SourceFile */:
return node;
}
}
}
ts.getThisContainer = getThisContainer;
+ function getNewTargetContainer(node) {
+ var container = getThisContainer(node, /*includeArrowFunctions*/ false);
+ if (container) {
+ switch (container.kind) {
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ return container;
+ }
+ }
+ return undefined;
+ }
+ ts.getNewTargetContainer = getNewTargetContainer;
/**
- * Given an super call/property node, returns the closest node where
- * - a super call/property access is legal in the node and not legal in the parent node the node.
- * i.e. super call is legal in constructor but not legal in the class body.
- * - the container is an arrow function (so caller might need to call getSuperContainer again in case it needs to climb higher)
- * - a super call/property is definitely illegal in the container (but might be legal in some subnode)
- * i.e. super property access is illegal in function declaration but can be legal in the statement list
- */
+ * Given an super call/property node, returns the closest node where
+ * - a super call/property access is legal in the node and not legal in the parent node the node.
+ * i.e. super call is legal in constructor but not legal in the class body.
+ * - the container is an arrow function (so caller might need to call getSuperContainer again in case it needs to climb higher)
+ * - a super call/property is definitely illegal in the container (but might be legal in some subnode)
+ * i.e. super property access is illegal in function declaration but can be legal in the statement list
+ */
function getSuperContainer(node, stopOnFunctions) {
while (true) {
node = node.parent;
@@ -7324,26 +7530,27 @@ var ts;
return node;
}
switch (node.kind) {
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
node = node.parent;
break;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
if (!stopOnFunctions) {
continue;
}
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return node;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 144 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 145 /* Parameter */ && isClassElement(node.parent.parent)) {
// If the decorator's parent is a Parameter, we resolve the this container from
// the grandparent class declaration.
node = node.parent.parent;
@@ -7359,15 +7566,15 @@ var ts;
}
ts.getSuperContainer = getSuperContainer;
function getImmediatelyInvokedFunctionExpression(func) {
- if (func.kind === 184 /* FunctionExpression */ || func.kind === 185 /* ArrowFunction */) {
+ if (func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */) {
var prev = func;
- var parent_2 = func.parent;
- while (parent_2.kind === 183 /* ParenthesizedExpression */) {
- prev = parent_2;
- parent_2 = parent_2.parent;
+ var parent = func.parent;
+ while (parent.kind === 184 /* ParenthesizedExpression */) {
+ prev = parent;
+ parent = parent.parent;
}
- if (parent_2.kind === 179 /* CallExpression */ && parent_2.expression === prev) {
- return parent_2;
+ if (parent.kind === 180 /* CallExpression */ && parent.expression === prev) {
+ return parent;
}
}
}
@@ -7377,21 +7584,21 @@ var ts;
*/
function isSuperProperty(node) {
var kind = node.kind;
- return (kind === 177 /* PropertyAccessExpression */ || kind === 178 /* ElementAccessExpression */)
+ return (kind === 178 /* PropertyAccessExpression */ || kind === 179 /* ElementAccessExpression */)
&& node.expression.kind === 96 /* SuperKeyword */;
}
ts.isSuperProperty = isSuperProperty;
function getEntityNameFromTypeNode(node) {
switch (node.kind) {
- case 157 /* TypeReference */:
- case 272 /* JSDocTypeReference */:
+ case 158 /* TypeReference */:
+ case 276 /* JSDocTypeReference */:
return node.typeName;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return isEntityNameExpression(node.expression)
? node.expression
: undefined;
case 70 /* Identifier */:
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return node;
}
return undefined;
@@ -7399,10 +7606,12 @@ var ts;
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
function isCallLikeExpression(node) {
switch (node.kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 145 /* Decorator */:
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 146 /* Decorator */:
return true;
default:
return false;
@@ -7410,34 +7619,37 @@ var ts;
}
ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
return node.tag;
}
+ else if (isJsxOpeningLikeElement(node)) {
+ return node.tagName;
+ }
// Will either be a CallExpression, NewExpression, or Decorator.
return node.expression;
}
ts.getInvokedExpression = getInvokedExpression;
function nodeCanBeDecorated(node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
// classes are valid targets
return true;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// property declarations are valid if their parent is a class declaration.
- return node.parent.kind === 226 /* ClassDeclaration */;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
+ return node.parent.kind === 228 /* ClassDeclaration */;
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
// if this method has a body and its parent is a class declaration, this is a valid target.
return node.body !== undefined
- && node.parent.kind === 226 /* ClassDeclaration */;
- case 144 /* Parameter */:
+ && node.parent.kind === 228 /* ClassDeclaration */;
+ case 145 /* Parameter */:
// if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target;
return node.parent.body !== undefined
- && (node.parent.kind === 150 /* Constructor */
- || node.parent.kind === 149 /* MethodDeclaration */
- || node.parent.kind === 152 /* SetAccessor */)
- && node.parent.parent.kind === 226 /* ClassDeclaration */;
+ && (node.parent.kind === 151 /* Constructor */
+ || node.parent.kind === 150 /* MethodDeclaration */
+ || node.parent.kind === 153 /* SetAccessor */)
+ && node.parent.parent.kind === 228 /* ClassDeclaration */;
}
return false;
}
@@ -7453,19 +7665,19 @@ var ts;
ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
function childIsDecorated(node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return ts.forEach(node.members, nodeOrChildIsDecorated);
- case 149 /* MethodDeclaration */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 153 /* SetAccessor */:
return ts.forEach(node.parameters, nodeIsDecorated);
}
}
ts.childIsDecorated = childIsDecorated;
function isJSXTagName(node) {
var parent = node.parent;
- if (parent.kind === 248 /* JsxOpeningElement */ ||
- parent.kind === 247 /* JsxSelfClosingElement */ ||
- parent.kind === 249 /* JsxClosingElement */) {
+ if (parent.kind === 250 /* JsxOpeningElement */ ||
+ parent.kind === 249 /* JsxSelfClosingElement */ ||
+ parent.kind === 251 /* JsxClosingElement */) {
return parent.tagName === node;
}
return false;
@@ -7479,96 +7691,97 @@ var ts;
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
case 11 /* RegularExpressionLiteral */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 200 /* AsExpression */:
- case 182 /* TypeAssertionExpression */:
- case 201 /* NonNullExpression */:
- case 183 /* ParenthesizedExpression */:
- case 184 /* FunctionExpression */:
- case 197 /* ClassExpression */:
- case 185 /* ArrowFunction */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 187 /* TypeOfExpression */:
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
- case 192 /* BinaryExpression */:
- case 193 /* ConditionalExpression */:
- case 196 /* SpreadElement */:
- case 194 /* TemplateExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 201 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 202 /* NonNullExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 185 /* FunctionExpression */:
+ case 198 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 188 /* TypeOfExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
+ case 193 /* BinaryExpression */:
+ case 194 /* ConditionalExpression */:
+ case 197 /* SpreadElement */:
+ case 195 /* TemplateExpression */:
case 12 /* NoSubstitutionTemplateLiteral */:
- case 198 /* OmittedExpression */:
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
- case 195 /* YieldExpression */:
- case 189 /* AwaitExpression */:
+ case 199 /* OmittedExpression */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 196 /* YieldExpression */:
+ case 190 /* AwaitExpression */:
+ case 203 /* MetaProperty */:
return true;
- case 141 /* QualifiedName */:
- while (node.parent.kind === 141 /* QualifiedName */) {
+ case 142 /* QualifiedName */:
+ while (node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
- return node.parent.kind === 160 /* TypeQuery */ || isJSXTagName(node);
+ return node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node);
case 70 /* Identifier */:
- if (node.parent.kind === 160 /* TypeQuery */ || isJSXTagName(node)) {
+ if (node.parent.kind === 161 /* TypeQuery */ || isJSXTagName(node)) {
return true;
}
- // fall through
+ // falls through
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
case 98 /* ThisKeyword */:
- var parent_3 = node.parent;
- switch (parent_3.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 260 /* EnumMember */:
- case 257 /* PropertyAssignment */:
- case 174 /* BindingElement */:
- return parent_3.initializer === node;
- case 207 /* ExpressionStatement */:
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 216 /* ReturnStatement */:
- case 217 /* WithStatement */:
- case 218 /* SwitchStatement */:
- case 253 /* CaseClause */:
- case 220 /* ThrowStatement */:
- case 218 /* SwitchStatement */:
- return parent_3.expression === node;
- case 211 /* ForStatement */:
- var forStatement = parent_3;
- return (forStatement.initializer === node && forStatement.initializer.kind !== 224 /* VariableDeclarationList */) ||
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 263 /* EnumMember */:
+ case 260 /* PropertyAssignment */:
+ case 175 /* BindingElement */:
+ return parent.initializer === node;
+ case 209 /* ExpressionStatement */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 218 /* ReturnStatement */:
+ case 219 /* WithStatement */:
+ case 220 /* SwitchStatement */:
+ case 256 /* CaseClause */:
+ case 222 /* ThrowStatement */:
+ case 220 /* SwitchStatement */:
+ return parent.expression === node;
+ case 213 /* ForStatement */:
+ var forStatement = parent;
+ return (forStatement.initializer === node && forStatement.initializer.kind !== 226 /* VariableDeclarationList */) ||
forStatement.condition === node ||
forStatement.incrementor === node;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- var forInStatement = parent_3;
- return (forInStatement.initializer === node && forInStatement.initializer.kind !== 224 /* VariableDeclarationList */) ||
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ var forInStatement = parent;
+ return (forInStatement.initializer === node && forInStatement.initializer.kind !== 226 /* VariableDeclarationList */) ||
forInStatement.expression === node;
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
- return node === parent_3.expression;
- case 202 /* TemplateSpan */:
- return node === parent_3.expression;
- case 142 /* ComputedPropertyName */:
- return node === parent_3.expression;
- case 145 /* Decorator */:
- case 252 /* JsxExpression */:
- case 251 /* JsxSpreadAttribute */:
- case 259 /* SpreadAssignment */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
+ return node === parent.expression;
+ case 204 /* TemplateSpan */:
+ return node === parent.expression;
+ case 143 /* ComputedPropertyName */:
+ return node === parent.expression;
+ case 146 /* Decorator */:
+ case 255 /* JsxExpression */:
+ case 254 /* JsxSpreadAttribute */:
+ case 262 /* SpreadAssignment */:
return true;
- case 199 /* ExpressionWithTypeArguments */:
- return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3);
+ case 200 /* ExpressionWithTypeArguments */:
+ return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
default:
- if (isPartOfExpression(parent_3)) {
+ if (isPartOfExpression(parent)) {
return true;
}
}
@@ -7583,7 +7796,7 @@ var ts;
}
ts.isInstantiatedModule = isInstantiatedModule;
function isExternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 245 /* ExternalModuleReference */;
+ return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */;
}
ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -7592,7 +7805,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function isInternalModuleImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 245 /* ExternalModuleReference */;
+ return node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 247 /* ExternalModuleReference */;
}
ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
function isSourceFileJavaScript(file) {
@@ -7600,21 +7813,27 @@ var ts;
}
ts.isSourceFileJavaScript = isSourceFileJavaScript;
function isInJavaScriptFile(node) {
- return node && !!(node.flags & 2097152 /* JavaScriptFile */);
+ return node && !!(node.flags & 65536 /* JavaScriptFile */);
}
ts.isInJavaScriptFile = isInJavaScriptFile;
/**
* Returns true if the node is a CallExpression to the identifier 'require' with
- * exactly one argument.
+ * exactly one argument (of the form 'require("name")').
* This function does not test if the node is in a JavaScript file or not.
- */
- function isRequireCall(expression, checkArgumentIsStringLiteral) {
- // of the form 'require("name")'
- var isRequire = expression.kind === 179 /* CallExpression */ &&
- expression.expression.kind === 70 /* Identifier */ &&
- expression.expression.text === "require" &&
- expression.arguments.length === 1;
- return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9 /* StringLiteral */);
+ */
+ function isRequireCall(callExpression, checkArgumentIsStringLiteral) {
+ if (callExpression.kind !== 180 /* CallExpression */) {
+ return false;
+ }
+ var _a = callExpression, expression = _a.expression, args = _a.arguments;
+ if (expression.kind !== 70 /* Identifier */ || expression.text !== "require") {
+ return false;
+ }
+ if (args.length !== 1) {
+ return false;
+ }
+ var arg = args[0];
+ return !checkArgumentIsStringLiteral || arg.kind === 9 /* StringLiteral */ || arg.kind === 12 /* NoSubstitutionTemplateLiteral */;
}
ts.isRequireCall = isRequireCall;
function isSingleOrDoubleQuote(charCode) {
@@ -7625,25 +7844,37 @@ var ts;
* Returns true if the node is a variable declaration whose initializer is a function expression.
* This function does not test if the node is in a JavaScript file or not.
*/
- function isDeclarationOfFunctionExpression(s) {
- if (s.valueDeclaration && s.valueDeclaration.kind === 223 /* VariableDeclaration */) {
+ function isDeclarationOfFunctionOrClassExpression(s) {
+ if (s.valueDeclaration && s.valueDeclaration.kind === 225 /* VariableDeclaration */) {
var declaration = s.valueDeclaration;
- return declaration.initializer && declaration.initializer.kind === 184 /* FunctionExpression */;
+ return declaration.initializer && (declaration.initializer.kind === 185 /* FunctionExpression */ || declaration.initializer.kind === 198 /* ClassExpression */);
}
return false;
}
- ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression;
+ ts.isDeclarationOfFunctionOrClassExpression = isDeclarationOfFunctionOrClassExpression;
+ function getRightMostAssignedExpression(node) {
+ while (isAssignmentExpression(node, /*excludeCompoundAssignements*/ true)) {
+ node = node.right;
+ }
+ return node;
+ }
+ ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
+ function isExportsIdentifier(node) {
+ return isIdentifier(node) && node.text === "exports";
+ }
+ ts.isExportsIdentifier = isExportsIdentifier;
+ function isModuleExportsPropertyAccessExpression(node) {
+ return isPropertyAccessExpression(node) && isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
+ }
+ ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
/// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property
/// assignments we treat as special in the binder
function getSpecialPropertyAssignmentKind(expression) {
if (!isInJavaScriptFile(expression)) {
return 0 /* None */;
}
- if (expression.kind !== 192 /* BinaryExpression */) {
- return 0 /* None */;
- }
var expr = expression;
- if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 177 /* PropertyAccessExpression */) {
+ if (expr.operatorToken.kind !== 57 /* EqualsToken */ || expr.left.kind !== 178 /* PropertyAccessExpression */) {
return 0 /* None */;
}
var lhs = expr.left;
@@ -7657,11 +7888,15 @@ var ts;
// module.exports = expr
return 2 /* ModuleExports */;
}
+ else {
+ // F.x = expr
+ return 5 /* Property */;
+ }
}
else if (lhs.expression.kind === 98 /* ThisKeyword */) {
return 4 /* ThisProperty */;
}
- else if (lhs.expression.kind === 177 /* PropertyAccessExpression */) {
+ else if (lhs.expression.kind === 178 /* PropertyAccessExpression */) {
// chained dot, e.g. x.y.z = expr; this var is the 'x.y' part
var innerPropertyAccess = lhs.expression;
if (innerPropertyAccess.expression.kind === 70 /* Identifier */) {
@@ -7679,35 +7914,35 @@ var ts;
}
ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind;
function getExternalModuleName(node) {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
return node.moduleSpecifier;
}
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
var reference = node.moduleReference;
- if (reference.kind === 245 /* ExternalModuleReference */) {
+ if (reference.kind === 247 /* ExternalModuleReference */) {
return reference.expression;
}
}
- if (node.kind === 241 /* ExportDeclaration */) {
+ if (node.kind === 243 /* ExportDeclaration */) {
return node.moduleSpecifier;
}
- if (node.kind === 230 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) {
return node.name;
}
}
ts.getExternalModuleName = getExternalModuleName;
function getNamespaceDeclarationNode(node) {
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
var importClause = node.importClause;
- if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 239 /* NamespaceImport */) {
return importClause.namedBindings;
}
}
ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
function isDefaultImport(node) {
- return node.kind === 235 /* ImportDeclaration */
+ return node.kind === 237 /* ImportDeclaration */
&& node.importClause
&& !!node.importClause.name;
}
@@ -7715,13 +7950,13 @@ var ts;
function hasQuestionToken(node) {
if (node) {
switch (node.kind) {
- case 144 /* Parameter */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 258 /* ShorthandPropertyAssignment */:
- case 257 /* PropertyAssignment */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return node.questionToken !== undefined;
}
}
@@ -7729,28 +7964,36 @@ var ts;
}
ts.hasQuestionToken = hasQuestionToken;
function isJSDocConstructSignature(node) {
- return node.kind === 274 /* JSDocFunctionType */ &&
+ return node.kind === 278 /* JSDocFunctionType */ &&
node.parameters.length > 0 &&
- node.parameters[0].type.kind === 276 /* JSDocConstructorType */;
+ node.parameters[0].type.kind === 280 /* JSDocConstructorType */;
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function getCommentsFromJSDoc(node) {
return ts.map(getJSDocs(node), function (doc) { return doc.comment; });
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
+ function hasJSDocParameterTags(node) {
+ var parameterTags = getJSDocTags(node, 285 /* JSDocParameterTag */);
+ return parameterTags && parameterTags.length > 0;
+ }
+ ts.hasJSDocParameterTags = hasJSDocParameterTags;
function getJSDocTags(node, kind) {
var docs = getJSDocs(node);
if (docs) {
var result = [];
for (var _i = 0, docs_1 = docs; _i < docs_1.length; _i++) {
var doc = docs_1[_i];
- if (doc.kind === 281 /* JSDocParameterTag */) {
+ if (doc.kind === 285 /* JSDocParameterTag */) {
if (doc.kind === kind) {
result.push(doc);
}
}
else {
- result.push.apply(result, ts.filter(doc.tags, function (tag) { return tag.kind === kind; }));
+ var tags = doc.tags;
+ if (tags) {
+ result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
+ }
}
}
return result;
@@ -7776,9 +8019,9 @@ var ts;
// var x = function(name) { return name.length; }
var isInitializerOfVariableDeclarationInStatement = isVariableLike(parent) &&
parent.initializer === node &&
- parent.parent.parent.kind === 205 /* VariableStatement */;
+ parent.parent.parent.kind === 207 /* VariableStatement */;
var isVariableOfVariableDeclarationStatement = isVariableLike(node) &&
- parent.parent.kind === 205 /* VariableStatement */;
+ parent.parent.kind === 207 /* VariableStatement */;
var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? parent.parent.parent :
isVariableOfVariableDeclarationStatement ? parent.parent :
undefined;
@@ -7787,20 +8030,20 @@ var ts;
}
// Also recognize when the node is the RHS of an assignment expression
var isSourceOfAssignmentExpressionStatement = parent && parent.parent &&
- parent.kind === 192 /* BinaryExpression */ &&
+ parent.kind === 193 /* BinaryExpression */ &&
parent.operatorToken.kind === 57 /* EqualsToken */ &&
- parent.parent.kind === 207 /* ExpressionStatement */;
+ parent.parent.kind === 209 /* ExpressionStatement */;
if (isSourceOfAssignmentExpressionStatement) {
getJSDocsWorker(parent.parent);
}
- var isModuleDeclaration = node.kind === 230 /* ModuleDeclaration */ &&
- parent && parent.kind === 230 /* ModuleDeclaration */;
- var isPropertyAssignmentExpression = parent && parent.kind === 257 /* PropertyAssignment */;
+ var isModuleDeclaration = node.kind === 232 /* ModuleDeclaration */ &&
+ parent && parent.kind === 232 /* ModuleDeclaration */;
+ var isPropertyAssignmentExpression = parent && parent.kind === 260 /* PropertyAssignment */;
if (isModuleDeclaration || isPropertyAssignmentExpression) {
getJSDocsWorker(parent);
}
// Pull parameter comments from declaring function as well
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
cache = ts.concatenate(cache, getJSDocParameterTags(node));
}
if (isVariableLike(node) && node.initializer) {
@@ -7809,23 +8052,24 @@ var ts;
cache = ts.concatenate(cache, node.jsDoc);
}
}
+ ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
if (!isParameter(param)) {
return undefined;
}
var func = param.parent;
- var tags = getJSDocTags(func, 281 /* JSDocParameterTag */);
+ var tags = getJSDocTags(func, 285 /* JSDocParameterTag */);
if (!param.name) {
// this is an anonymous jsdoc param from a `function(type1, type2): type3` specification
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 281 /* JSDocParameterTag */; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 70 /* Identifier */) {
- var name_6 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 281 /* JSDocParameterTag */ && tag.parameterName.text === name_6; });
+ var name_1 = param.name.text;
+ return ts.filter(tags, function (tag) { return tag.kind === 285 /* JSDocParameterTag */ && tag.parameterName.text === name_1; });
}
else {
// TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines
@@ -7835,8 +8079,8 @@ var ts;
}
ts.getJSDocParameterTags = getJSDocParameterTags;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 283 /* JSDocTypeTag */);
- if (!tag && node.kind === 144 /* Parameter */) {
+ var tag = getFirstJSDocTag(node, 287 /* JSDocTypeTag */);
+ if (!tag && node.kind === 145 /* Parameter */) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
tag = ts.find(paramTags, function (tag) { return !!tag.typeExpression; });
@@ -7846,15 +8090,15 @@ var ts;
}
ts.getJSDocType = getJSDocType;
function getJSDocAugmentsTag(node) {
- return getFirstJSDocTag(node, 280 /* JSDocAugmentsTag */);
+ return getFirstJSDocTag(node, 284 /* JSDocAugmentsTag */);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 282 /* JSDocReturnTag */);
+ return getFirstJSDocTag(node, 286 /* JSDocReturnTag */);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 284 /* JSDocTemplateTag */);
+ return getFirstJSDocTag(node, 288 /* JSDocTemplateTag */);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -7866,9 +8110,9 @@ var ts;
}
ts.hasDeclaredRestParameter = hasDeclaredRestParameter;
function isRestParameter(node) {
- if (node && (node.flags & 2097152 /* JavaScriptFile */)) {
- if (node.type && node.type.kind === 275 /* JSDocVariadicType */ ||
- ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 275 /* JSDocVariadicType */; })) {
+ if (node && (node.flags & 65536 /* JavaScriptFile */)) {
+ if (node.type && node.type.kind === 279 /* JSDocVariadicType */ ||
+ ts.forEach(getJSDocParameterTags(node), function (t) { return t.typeExpression && t.typeExpression.type.kind === 279 /* JSDocVariadicType */; })) {
return true;
}
}
@@ -7889,29 +8133,33 @@ var ts;
var parent = node.parent;
while (true) {
switch (parent.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
var binaryOperator = parent.operatorToken.kind;
return isAssignmentOperator(binaryOperator) && parent.left === node ?
binaryOperator === 57 /* EqualsToken */ ? 1 /* Definite */ : 2 /* Compound */ :
0 /* None */;
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
var unaryOperator = parent.operator;
return unaryOperator === 42 /* PlusPlusToken */ || unaryOperator === 43 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return parent.initializer === node ? 1 /* Definite */ : 0 /* None */;
- case 183 /* ParenthesizedExpression */:
- case 175 /* ArrayLiteralExpression */:
- case 196 /* SpreadElement */:
+ case 184 /* ParenthesizedExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 197 /* SpreadElement */:
node = parent;
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
if (parent.name !== node) {
return 0 /* None */;
}
- // Fall through
- case 257 /* PropertyAssignment */:
+ node = parent.parent;
+ break;
+ case 260 /* PropertyAssignment */:
+ if (parent.name === node) {
+ return 0 /* None */;
+ }
node = parent.parent;
break;
default:
@@ -7923,11 +8171,24 @@ var ts;
ts.getAssignmentTargetKind = getAssignmentTargetKind;
// A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property
// assignment in an object literal that is an assignment target, or if it is parented by an array literal that is
- // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'.
+ // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ a }] = xxx'.
+ // (Note that `p` is not a target in the above examples, only `a`.)
function isAssignmentTarget(node) {
return getAssignmentTargetKind(node) !== 0 /* None */;
}
ts.isAssignmentTarget = isAssignmentTarget;
+ // a node is delete target iff. it is PropertyAccessExpression/ElementAccessExpression with parentheses skipped
+ function isDeleteTarget(node) {
+ if (node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) {
+ return false;
+ }
+ node = node.parent;
+ while (node && node.kind === 184 /* ParenthesizedExpression */) {
+ node = node.parent;
+ }
+ return node && node.kind === 187 /* DeleteExpression */;
+ }
+ ts.isDeleteTarget = isDeleteTarget;
function isNodeDescendantOf(node, ancestor) {
while (node) {
if (node === ancestor)
@@ -7939,7 +8200,7 @@ var ts;
ts.isNodeDescendantOf = isNodeDescendantOf;
function isInAmbientContext(node) {
while (node) {
- if (hasModifier(node, 2 /* Ambient */) || (node.kind === 261 /* SourceFile */ && node.isDeclarationFile)) {
+ if (hasModifier(node, 2 /* Ambient */) || (node.kind === 264 /* SourceFile */ && node.isDeclarationFile)) {
return true;
}
node = node.parent;
@@ -7953,7 +8214,7 @@ var ts;
return false;
}
var parent = name.parent;
- if (parent.kind === 239 /* ImportSpecifier */ || parent.kind === 243 /* ExportSpecifier */) {
+ if (parent.kind === 241 /* ImportSpecifier */ || parent.kind === 245 /* ExportSpecifier */) {
if (parent.propertyName) {
return true;
}
@@ -7966,7 +8227,7 @@ var ts;
ts.isDeclarationName = isDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) &&
- node.parent.kind === 142 /* ComputedPropertyName */ &&
+ node.parent.kind === 143 /* ComputedPropertyName */ &&
isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
@@ -7974,31 +8235,31 @@ var ts;
function isIdentifierName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 260 /* EnumMember */:
- case 257 /* PropertyAssignment */:
- case 177 /* PropertyAccessExpression */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 263 /* EnumMember */:
+ case 260 /* PropertyAssignment */:
+ case 178 /* PropertyAccessExpression */:
// Name in member declaration or property name in property access
return parent.name === node;
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
// Name on right hand side of dot in a type query
if (parent.right === node) {
- while (parent.kind === 141 /* QualifiedName */) {
+ while (parent.kind === 142 /* QualifiedName */) {
parent = parent.parent;
}
- return parent.kind === 160 /* TypeQuery */;
+ return parent.kind === 161 /* TypeQuery */;
}
return false;
- case 174 /* BindingElement */:
- case 239 /* ImportSpecifier */:
+ case 175 /* BindingElement */:
+ case 241 /* ImportSpecifier */:
// Property name in binding element or import specifier
return parent.propertyName === node;
- case 243 /* ExportSpecifier */:
+ case 245 /* ExportSpecifier */:
// Any name in an export specifier
return true;
}
@@ -8014,13 +8275,13 @@ var ts;
// export = <EntityNameExpression>
// export default <EntityNameExpression>
function isAliasSymbolDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */ ||
- node.kind === 233 /* NamespaceExportDeclaration */ ||
- node.kind === 236 /* ImportClause */ && !!node.name ||
- node.kind === 237 /* NamespaceImport */ ||
- node.kind === 239 /* ImportSpecifier */ ||
- node.kind === 243 /* ExportSpecifier */ ||
- node.kind === 240 /* ExportAssignment */ && exportAssignmentIsAlias(node);
+ return node.kind === 236 /* ImportEqualsDeclaration */ ||
+ node.kind === 235 /* NamespaceExportDeclaration */ ||
+ node.kind === 238 /* ImportClause */ && !!node.name ||
+ node.kind === 239 /* NamespaceImport */ ||
+ node.kind === 241 /* ImportSpecifier */ ||
+ node.kind === 245 /* ExportSpecifier */ ||
+ node.kind === 242 /* ExportAssignment */ && exportAssignmentIsAlias(node);
}
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
function exportAssignmentIsAlias(node) {
@@ -8106,17 +8367,62 @@ var ts;
}
ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
function isKeyword(token) {
- return 71 /* FirstKeyword */ <= token && token <= 140 /* LastKeyword */;
+ return 71 /* FirstKeyword */ <= token && token <= 141 /* LastKeyword */;
}
ts.isKeyword = isKeyword;
function isTrivia(token) {
return 2 /* FirstTriviaToken */ <= token && token <= 7 /* LastTriviaToken */;
}
ts.isTrivia = isTrivia;
- function isAsyncFunctionLike(node) {
- return isFunctionLike(node) && hasModifier(node, 256 /* Async */) && !isAccessor(node);
+ var FunctionFlags;
+ (function (FunctionFlags) {
+ FunctionFlags[FunctionFlags["Normal"] = 0] = "Normal";
+ FunctionFlags[FunctionFlags["Generator"] = 1] = "Generator";
+ FunctionFlags[FunctionFlags["Async"] = 2] = "Async";
+ FunctionFlags[FunctionFlags["AsyncOrAsyncGenerator"] = 3] = "AsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["Invalid"] = 4] = "Invalid";
+ FunctionFlags[FunctionFlags["InvalidAsyncOrAsyncGenerator"] = 7] = "InvalidAsyncOrAsyncGenerator";
+ FunctionFlags[FunctionFlags["InvalidGenerator"] = 5] = "InvalidGenerator";
+ })(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
+ function getFunctionFlags(node) {
+ var flags = 0 /* Normal */;
+ switch (node.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ if (node.asteriskToken) {
+ flags |= 1 /* Generator */;
+ }
+ // falls through
+ case 186 /* ArrowFunction */:
+ if (hasModifier(node, 256 /* Async */)) {
+ flags |= 2 /* Async */;
+ }
+ break;
+ }
+ if (!node.body) {
+ flags |= 4 /* Invalid */;
+ }
+ return flags;
+ }
+ ts.getFunctionFlags = getFunctionFlags;
+ function isAsyncFunction(node) {
+ switch (node.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ return node.body !== undefined
+ && node.asteriskToken === undefined
+ && hasModifier(node, 256 /* Async */);
+ }
+ return false;
+ }
+ ts.isAsyncFunction = isAsyncFunction;
+ function isNumericLiteral(node) {
+ return node.kind === 8 /* NumericLiteral */;
}
- ts.isAsyncFunctionLike = isAsyncFunctionLike;
+ ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -8135,7 +8441,7 @@ var ts;
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
- return name.kind === 142 /* ComputedPropertyName */ &&
+ return name.kind === 143 /* ComputedPropertyName */ &&
!isStringOrNumericLiteral(name.expression) &&
!isWellKnownSymbolSyntactically(name.expression);
}
@@ -8150,10 +8456,10 @@ var ts;
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
- if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 144 /* Parameter */) {
+ if (name.kind === 70 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 145 /* Parameter */) {
return name.text;
}
- if (name.kind === 142 /* ComputedPropertyName */) {
+ if (name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = name.expression;
if (isWellKnownSymbolSyntactically(nameExpression)) {
var rightHandSideName = nameExpression.name.text;
@@ -8201,11 +8507,11 @@ var ts;
ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
- return root.kind === 144 /* Parameter */;
+ return root.kind === 145 /* Parameter */;
}
ts.isParameterDeclaration = isParameterDeclaration;
function getRootDeclaration(node) {
- while (node.kind === 174 /* BindingElement */) {
+ while (node.kind === 175 /* BindingElement */) {
node = node.parent.parent;
}
return node;
@@ -8213,15 +8519,15 @@ var ts;
ts.getRootDeclaration = getRootDeclaration;
function nodeStartsNewLexicalEnvironment(node) {
var kind = node.kind;
- return kind === 150 /* Constructor */
- || kind === 184 /* FunctionExpression */
- || kind === 225 /* FunctionDeclaration */
- || kind === 185 /* ArrowFunction */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 230 /* ModuleDeclaration */
- || kind === 261 /* SourceFile */;
+ return kind === 151 /* Constructor */
+ || kind === 185 /* FunctionExpression */
+ || kind === 227 /* FunctionDeclaration */
+ || kind === 186 /* ArrowFunction */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 264 /* SourceFile */;
}
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
function nodeIsSynthesized(node) {
@@ -8229,49 +8535,22 @@ var ts;
|| ts.positionIsSynthesized(node.end);
}
ts.nodeIsSynthesized = nodeIsSynthesized;
- function getOriginalNode(node, nodeTest) {
- if (node) {
- while (node.original !== undefined) {
- node = node.original;
- }
+ function getOriginalSourceFileOrBundle(sourceFileOrBundle) {
+ if (sourceFileOrBundle.kind === 265 /* Bundle */) {
+ return ts.updateBundle(sourceFileOrBundle, ts.sameMap(sourceFileOrBundle.sourceFiles, getOriginalSourceFile));
}
- return !nodeTest || nodeTest(node) ? node : undefined;
- }
- ts.getOriginalNode = getOriginalNode;
- /**
- * Gets a value indicating whether a node originated in the parse tree.
- *
- * @param node The node to test.
- */
- function isParseTreeNode(node) {
- return (node.flags & 8 /* Synthesized */) === 0;
+ return getOriginalSourceFile(sourceFileOrBundle);
}
- ts.isParseTreeNode = isParseTreeNode;
- function getParseTreeNode(node, nodeTest) {
- if (isParseTreeNode(node)) {
- return node;
- }
- node = getOriginalNode(node);
- if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
- return node;
- }
- return undefined;
+ ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
+ function getOriginalSourceFile(sourceFile) {
+ return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
}
- ts.getParseTreeNode = getParseTreeNode;
function getOriginalSourceFiles(sourceFiles) {
- var originalSourceFiles = [];
- for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
- var sourceFile = sourceFiles_1[_i];
- var originalSourceFile = getParseTreeNode(sourceFile, isSourceFile);
- if (originalSourceFile) {
- originalSourceFiles.push(originalSourceFile);
- }
- }
- return originalSourceFiles;
+ return ts.sameMap(sourceFiles, getOriginalSourceFile);
}
ts.getOriginalSourceFiles = getOriginalSourceFiles;
function getOriginalNodeId(node) {
- node = getOriginalNode(node);
+ node = ts.getOriginalNode(node);
return node ? ts.getNodeId(node) : 0;
}
ts.getOriginalNodeId = getOriginalNodeId;
@@ -8282,23 +8561,23 @@ var ts;
})(Associativity = ts.Associativity || (ts.Associativity = {}));
function getExpressionAssociativity(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 /* NewExpression */ && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined;
return getOperatorAssociativity(expression.kind, operator, hasArguments);
}
ts.getExpressionAssociativity = getExpressionAssociativity;
function getOperatorAssociativity(kind, operator, hasArguments) {
switch (kind) {
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return hasArguments ? 0 /* Left */ : 1 /* Right */;
- case 190 /* PrefixUnaryExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 189 /* AwaitExpression */:
- case 193 /* ConditionalExpression */:
- case 195 /* YieldExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 190 /* AwaitExpression */:
+ case 194 /* ConditionalExpression */:
+ case 196 /* YieldExpression */:
return 1 /* Right */;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (operator) {
case 39 /* AsteriskAsteriskToken */:
case 57 /* EqualsToken */:
@@ -8322,15 +8601,15 @@ var ts;
ts.getOperatorAssociativity = getOperatorAssociativity;
function getExpressionPrecedence(expression) {
var operator = getOperator(expression);
- var hasArguments = expression.kind === 180 /* NewExpression */ && expression.arguments !== undefined;
+ var hasArguments = expression.kind === 181 /* NewExpression */ && expression.arguments !== undefined;
return getOperatorPrecedence(expression.kind, operator, hasArguments);
}
ts.getExpressionPrecedence = getExpressionPrecedence;
function getOperator(expression) {
- if (expression.kind === 192 /* BinaryExpression */) {
+ if (expression.kind === 193 /* BinaryExpression */) {
return expression.operatorToken.kind;
}
- else if (expression.kind === 190 /* PrefixUnaryExpression */ || expression.kind === 191 /* PostfixUnaryExpression */) {
+ else if (expression.kind === 191 /* PrefixUnaryExpression */ || expression.kind === 192 /* PostfixUnaryExpression */) {
return expression.operator;
}
else {
@@ -8348,37 +8627,36 @@ var ts;
case 85 /* FalseKeyword */:
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 197 /* ClassExpression */:
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 198 /* ClassExpression */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
case 11 /* RegularExpressionLiteral */:
case 12 /* NoSubstitutionTemplateLiteral */:
- case 194 /* TemplateExpression */:
- case 183 /* ParenthesizedExpression */:
- case 198 /* OmittedExpression */:
- case 297 /* RawExpression */:
+ case 195 /* TemplateExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 199 /* OmittedExpression */:
return 19;
- case 181 /* TaggedTemplateExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return 18;
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return hasArguments ? 18 : 17;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return 17;
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return 16;
- case 190 /* PrefixUnaryExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 186 /* DeleteExpression */:
- case 189 /* AwaitExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 187 /* DeleteExpression */:
+ case 190 /* AwaitExpression */:
return 15;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (operatorKind) {
case 50 /* ExclamationToken */:
case 51 /* TildeToken */:
@@ -8436,11 +8714,11 @@ var ts;
default:
return -1;
}
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return 4;
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return 2;
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return 1;
default:
return -1;
@@ -8463,21 +8741,15 @@ var ts;
return modificationCount;
}
function reattachFileDiagnostics(newFile) {
- if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) {
- return;
- }
- for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) {
- var diagnostic = _a[_i];
- diagnostic.file = newFile;
- }
+ ts.forEach(fileDiagnostics.get(newFile.fileName), function (diagnostic) { return diagnostic.file = newFile; });
}
function add(diagnostic) {
var diagnostics;
if (diagnostic.file) {
- diagnostics = fileDiagnostics[diagnostic.file.fileName];
+ diagnostics = fileDiagnostics.get(diagnostic.file.fileName);
if (!diagnostics) {
diagnostics = [];
- fileDiagnostics[diagnostic.file.fileName] = diagnostics;
+ fileDiagnostics.set(diagnostic.file.fileName, diagnostics);
}
}
else {
@@ -8494,16 +8766,16 @@ var ts;
function getDiagnostics(fileName) {
sortAndDeduplicate();
if (fileName) {
- return fileDiagnostics[fileName] || [];
+ return fileDiagnostics.get(fileName) || [];
}
var allDiagnostics = [];
function pushDiagnostic(d) {
allDiagnostics.push(d);
}
ts.forEach(nonFileDiagnostics, pushDiagnostic);
- for (var key in fileDiagnostics) {
- ts.forEach(fileDiagnostics[key], pushDiagnostic);
- }
+ fileDiagnostics.forEach(function (diagnostics) {
+ ts.forEach(diagnostics, pushDiagnostic);
+ });
return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
}
function sortAndDeduplicate() {
@@ -8512,9 +8784,9 @@ var ts;
}
diagnosticsModified = false;
nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
- for (var key in fileDiagnostics) {
- fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
- }
+ fileDiagnostics.forEach(function (diagnostics, key) {
+ fileDiagnostics.set(key, ts.sortAndDeduplicateDiagnostics(diagnostics));
+ });
}
}
ts.createDiagnosticCollection = createDiagnosticCollection;
@@ -8524,7 +8796,7 @@ var ts;
// the map below must be updated. Note that this regexp *does not* include the 'delete' character.
// There is no reason for this other than that JSON.stringify does not handle it either.
var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
- var escapedCharsMap = ts.createMap({
+ var escapedCharsMap = ts.createMapFromTemplate({
"\0": "\\0",
"\t": "\\t",
"\v": "\\v",
@@ -8544,13 +8816,12 @@ var ts;
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s) {
- s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
- return s;
- function getReplacement(c) {
- return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
- }
+ return s.replace(escapedCharsRegExp, getReplacement);
}
ts.escapeString = escapeString;
+ function getReplacement(c) {
+ return escapedCharsMap.get(c) || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
+ }
function isIntrinsicJsxName(name) {
var ch = name.substr(0, 1);
return ch.toLowerCase() === ch;
@@ -8707,168 +8978,77 @@ var ts;
*/
function getSourceFilesToEmit(host, targetSourceFile) {
var options = host.getCompilerOptions();
+ var isSourceFileFromExternalLibrary = function (file) { return host.isSourceFileFromExternalLibrary(file); };
if (options.outFile || options.out) {
var moduleKind = ts.getEmitModuleKind(options);
- var moduleEmitEnabled = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
- var sourceFiles = getAllEmittableSourceFiles();
+ var moduleEmitEnabled_1 = moduleKind === ts.ModuleKind.AMD || moduleKind === ts.ModuleKind.System;
// Can emit only sources that are not declaration file and are either non module code or module with --module or --target es6 specified
- return ts.filter(sourceFiles, moduleEmitEnabled ? isNonDeclarationFile : isBundleEmitNonExternalModule);
+ return ts.filter(host.getSourceFiles(), function (sourceFile) {
+ return (moduleEmitEnabled_1 || !ts.isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary);
+ });
}
else {
- var sourceFiles = targetSourceFile === undefined ? getAllEmittableSourceFiles() : [targetSourceFile];
- return filterSourceFilesInDirectory(sourceFiles, function (file) { return host.isSourceFileFromExternalLibrary(file); });
- }
- function getAllEmittableSourceFiles() {
- return options.noEmitForJsFiles ? ts.filter(host.getSourceFiles(), function (sourceFile) { return !isSourceFileJavaScript(sourceFile); }) : host.getSourceFiles();
+ var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
+ return ts.filter(sourceFiles, function (sourceFile) { return sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary); });
}
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
- /** Don't call this for `--outFile`, just for `--outDir` or plain emit. */
- function filterSourceFilesInDirectory(sourceFiles, isSourceFileFromExternalLibrary) {
- return ts.filter(sourceFiles, function (file) { return shouldEmitInDirectory(file, isSourceFileFromExternalLibrary); });
- }
- ts.filterSourceFilesInDirectory = filterSourceFilesInDirectory;
- function isNonDeclarationFile(sourceFile) {
- return !isDeclarationFile(sourceFile);
- }
- /**
- * Whether a file should be emitted in a non-`--outFile` case.
- * Don't emit if source file is a declaration file, or was located under node_modules
- */
- function shouldEmitInDirectory(sourceFile, isSourceFileFromExternalLibrary) {
- return isNonDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
- }
- function isBundleEmitNonExternalModule(sourceFile) {
- return isNonDeclarationFile(sourceFile) && !ts.isExternalModule(sourceFile);
+ /** Don't call this for `--outFile`, just for `--outDir` or plain emit. `--outFile` needs additional checks. */
+ function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
}
+ ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
/**
- * Iterates over each source file to emit. The source files are expected to have been
- * transformed for use by the pretty printer.
- *
- * Originally part of `forEachExpectedEmitFile`, this functionality was extracted to support
- * transformations.
+ * Iterates over the source files that are expected to have an emit output.
*
* @param host An EmitHost.
- * @param sourceFiles The transformed source files to emit.
* @param action The action to execute.
+ * @param sourceFilesOrTargetSourceFile
+ * If an array, the full list of source files to emit.
+ * Else, calls `getSourceFilesToEmit` with the (optional) target source file to determine the list of source files to emit.
*/
- function forEachTransformedEmitFile(host, sourceFiles, action, emitOnlyDtsFiles) {
+ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
+ var sourceFiles = ts.isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile);
var options = host.getCompilerOptions();
- // Emit on each source file
if (options.outFile || options.out) {
- onBundledEmit(sourceFiles);
- }
- else {
- for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
- var sourceFile = sourceFiles_2[_i];
- // Don't emit if source file is a declaration file, or was located under node_modules
- if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
- onSingleFileEmit(host, sourceFile);
- }
- }
- }
- function onSingleFileEmit(host, sourceFile) {
- // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
- // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
- // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
- var extension = ".js";
- if (options.jsx === 1 /* Preserve */) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1 /* JSX */) {
- // TypeScript source file preserving JSX syntax
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (options.declaration || emitOnlyDtsFiles) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, [sourceFile], /*isBundledEmit*/ false);
- }
- function onBundledEmit(sourceFiles) {
if (sourceFiles.length) {
var jsFilePath = options.outFile || options.out;
var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
- var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined;
- action(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, /*isBundledEmit*/ true);
+ var declarationFilePath = options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : "";
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, ts.createBundle(sourceFiles), emitOnlyDtsFiles);
+ }
+ }
+ else {
+ for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
+ var sourceFile = sourceFiles_1[_i];
+ var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, getOutputExtension(sourceFile, options));
+ var sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
+ var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
+ action({ jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath }, sourceFile, emitOnlyDtsFiles);
}
}
}
- ts.forEachTransformedEmitFile = forEachTransformedEmitFile;
+ ts.forEachEmittedFile = forEachEmittedFile;
function getSourceMapFilePath(jsFilePath, options) {
return options.sourceMap ? jsFilePath + ".map" : undefined;
}
- /**
- * Iterates over the source files that are expected to have an emit output. This function
- * is used by the legacy emitter and the declaration emitter and should not be used by
- * the tree transforming emitter.
- *
- * @param host An EmitHost.
- * @param action The action to execute.
- * @param targetSourceFile An optional target source file to emit.
- */
- function forEachExpectedEmitFile(host, action, targetSourceFile, emitOnlyDtsFiles) {
- var options = host.getCompilerOptions();
- // Emit on each source file
- if (options.outFile || options.out) {
- onBundledEmit(host);
- }
- else {
- var sourceFiles = targetSourceFile === undefined ? getSourceFilesToEmit(host) : [targetSourceFile];
- for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
- var sourceFile = sourceFiles_3[_i];
- if (shouldEmitInDirectory(sourceFile, function (file) { return host.isSourceFileFromExternalLibrary(file); })) {
- onSingleFileEmit(host, sourceFile);
+ // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
+ // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
+ // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
+ function getOutputExtension(sourceFile, options) {
+ if (options.jsx === 1 /* Preserve */) {
+ if (isSourceFileJavaScript(sourceFile)) {
+ if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
+ return ".jsx";
}
}
- }
- function onSingleFileEmit(host, sourceFile) {
- // JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
- // So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
- // For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
- var extension = ".js";
- if (options.jsx === 1 /* Preserve */) {
- if (isSourceFileJavaScript(sourceFile)) {
- if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
- extension = ".jsx";
- }
- }
- else if (sourceFile.languageVariant === 1 /* JSX */) {
- // TypeScript source file preserving JSX syntax
- extension = ".jsx";
- }
- }
- var jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, extension);
- var declarationFilePath = !isSourceFileJavaScript(sourceFile) && (emitOnlyDtsFiles || options.declaration) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: declarationFilePath
- };
- action(emitFileNames, [sourceFile], /*isBundledEmit*/ false, emitOnlyDtsFiles);
- }
- function onBundledEmit(host) {
- // Can emit only sources that are not declaration file and are either non module code or module with
- // --module or --target es6 specified. Files included by searching under node_modules are also not emitted.
- var bundledSources = ts.filter(getSourceFilesToEmit(host), function (sourceFile) { return !isDeclarationFile(sourceFile) &&
- !host.isSourceFileFromExternalLibrary(sourceFile) &&
- (!ts.isExternalModule(sourceFile) ||
- !!ts.getEmitModuleKind(options)); });
- if (bundledSources.length) {
- var jsFilePath = options.outFile || options.out;
- var emitFileNames = {
- jsFilePath: jsFilePath,
- sourceMapFilePath: getSourceMapFilePath(jsFilePath, options),
- declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined
- };
- action(emitFileNames, bundledSources, /*isBundledEmit*/ true, emitOnlyDtsFiles);
+ else if (sourceFile.languageVariant === 1 /* JSX */) {
+ // TypeScript source file preserving JSX syntax
+ return ".jsx";
}
}
+ return ".js";
}
- ts.forEachExpectedEmitFile = forEachExpectedEmitFile;
function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
var commonSourceDirectory = host.getCommonSourceDirectory();
@@ -8893,7 +9073,7 @@ var ts;
ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap;
function getFirstConstructorWithBody(node) {
return ts.forEach(node.members, function (member) {
- if (member.kind === 150 /* Constructor */ && nodeIsPresent(member.body)) {
+ if (member.kind === 151 /* Constructor */ && nodeIsPresent(member.body)) {
return member;
}
});
@@ -8935,10 +9115,10 @@ var ts;
var setAccessor;
if (hasDynamicName(accessor)) {
firstAccessor = accessor;
- if (accessor.kind === 151 /* GetAccessor */) {
+ if (accessor.kind === 152 /* GetAccessor */) {
getAccessor = accessor;
}
- else if (accessor.kind === 152 /* SetAccessor */) {
+ else if (accessor.kind === 153 /* SetAccessor */) {
setAccessor = accessor;
}
else {
@@ -8947,7 +9127,7 @@ var ts;
}
else {
ts.forEach(declarations, function (member) {
- if ((member.kind === 151 /* GetAccessor */ || member.kind === 152 /* SetAccessor */)
+ if ((member.kind === 152 /* GetAccessor */ || member.kind === 153 /* SetAccessor */)
&& hasModifier(member, 32 /* Static */) === hasModifier(accessor, 32 /* Static */)) {
var memberName = getPropertyNameForPropertyNameNode(member.name);
var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
@@ -8958,10 +9138,10 @@ var ts;
else if (!secondAccessor) {
secondAccessor = member;
}
- if (member.kind === 151 /* GetAccessor */ && !getAccessor) {
+ if (member.kind === 152 /* GetAccessor */ && !getAccessor) {
getAccessor = member;
}
- if (member.kind === 152 /* SetAccessor */ && !setAccessor) {
+ if (member.kind === 153 /* SetAccessor */ && !setAccessor) {
setAccessor = member;
}
}
@@ -9224,7 +9404,7 @@ var ts;
ts.isAssignmentOperator = isAssignmentOperator;
/** Get `C` given `N` if `N` is in the position `class C extends N` where `N` is an ExpressionWithTypeArguments. */
function tryGetClassExtendingExpressionWithTypeArguments(node) {
- if (node.kind === 199 /* ExpressionWithTypeArguments */ &&
+ if (node.kind === 200 /* ExpressionWithTypeArguments */ &&
node.parent.token === 84 /* ExtendsKeyword */ &&
isClassLike(node.parent.parent)) {
return node.parent.parent;
@@ -9242,8 +9422,8 @@ var ts;
function isDestructuringAssignment(node) {
if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
var kind = node.left.kind;
- return kind === 176 /* ObjectLiteralExpression */
- || kind === 175 /* ArrayLiteralExpression */;
+ return kind === 177 /* ObjectLiteralExpression */
+ || kind === 176 /* ArrayLiteralExpression */;
}
return false;
}
@@ -9269,31 +9449,42 @@ var ts;
return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined;
}
ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
+ function isExpressionWithTypeArgumentsInClassImplementsClause(node) {
+ return node.kind === 200 /* ExpressionWithTypeArguments */
+ && isEntityNameExpression(node.expression)
+ && node.parent
+ && node.parent.token === 107 /* ImplementsKeyword */
+ && node.parent.parent
+ && isClassLike(node.parent.parent);
+ }
+ ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
return node.kind === 70 /* Identifier */ ||
- node.kind === 177 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression);
+ node.kind === 178 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression);
}
ts.isEntityNameExpression = isEntityNameExpression;
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
- return (node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node) ||
- (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node);
+ return (node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node) ||
+ (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node);
}
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
- function isEmptyObjectLiteralOrArrayLiteral(expression) {
- var kind = expression.kind;
- if (kind === 176 /* ObjectLiteralExpression */) {
- return expression.properties.length === 0;
- }
- if (kind === 175 /* ArrayLiteralExpression */) {
- return expression.elements.length === 0;
- }
- return false;
+ function isEmptyObjectLiteral(expression) {
+ return expression.kind === 177 /* ObjectLiteralExpression */ &&
+ expression.properties.length === 0;
+ }
+ ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
+ function isEmptyArrayLiteral(expression) {
+ return expression.kind === 176 /* ArrayLiteralExpression */ &&
+ expression.elements.length === 0;
}
- ts.isEmptyObjectLiteralOrArrayLiteral = isEmptyObjectLiteralOrArrayLiteral;
+ ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
+ function isExportDefaultSymbol(symbol) {
+ return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */);
+ }
/** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
@@ -9333,47 +9524,6 @@ var ts;
}
return output;
}
- /**
- * Serialize an object graph into a JSON string. This is intended only for use on an acyclic graph
- * as the fallback implementation does not check for circular references by default.
- */
- ts.stringify = typeof JSON !== "undefined" && JSON.stringify
- ? JSON.stringify
- : stringifyFallback;
- /**
- * Serialize an object graph into a JSON string.
- */
- function stringifyFallback(value) {
- // JSON.stringify returns `undefined` here, instead of the string "undefined".
- return value === undefined ? undefined : stringifyValue(value);
- }
- function stringifyValue(value) {
- return typeof value === "string" ? "\"" + escapeString(value) + "\""
- : typeof value === "number" ? isFinite(value) ? String(value) : "null"
- : typeof value === "boolean" ? value ? "true" : "false"
- : typeof value === "object" && value ? ts.isArray(value) ? cycleCheck(stringifyArray, value) : cycleCheck(stringifyObject, value)
- : "null";
- }
- function cycleCheck(cb, value) {
- ts.Debug.assert(!value.hasOwnProperty("__cycle"), "Converting circular structure to JSON");
- value.__cycle = true;
- var result = cb(value);
- delete value.__cycle;
- return result;
- }
- function stringifyArray(value) {
- return "[" + ts.reduceLeft(value, stringifyElement, "") + "]";
- }
- function stringifyElement(memo, value) {
- return (memo ? memo + "," : memo) + stringifyValue(value);
- }
- function stringifyObject(value) {
- return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}";
- }
- function stringifyProperty(memo, value, key) {
- return value === undefined || typeof value === "function" || key === "__cycle" ? memo
- : (memo ? memo + "," : memo) + ("\"" + escapeString(key) + "\":" + stringifyValue(value));
- }
var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
/**
* Converts a string to a base-64 encoded ASCII string.
@@ -9446,39 +9596,39 @@ var ts;
|| kind === 94 /* NullKeyword */) {
return true;
}
- else if (kind === 177 /* PropertyAccessExpression */) {
+ else if (kind === 178 /* PropertyAccessExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 178 /* ElementAccessExpression */) {
+ else if (kind === 179 /* ElementAccessExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1)
&& isSimpleExpressionWorker(node.argumentExpression, depth + 1);
}
- else if (kind === 190 /* PrefixUnaryExpression */
- || kind === 191 /* PostfixUnaryExpression */) {
+ else if (kind === 191 /* PrefixUnaryExpression */
+ || kind === 192 /* PostfixUnaryExpression */) {
return isSimpleExpressionWorker(node.operand, depth + 1);
}
- else if (kind === 192 /* BinaryExpression */) {
+ else if (kind === 193 /* BinaryExpression */) {
return node.operatorToken.kind !== 39 /* AsteriskAsteriskToken */
&& isSimpleExpressionWorker(node.left, depth + 1)
&& isSimpleExpressionWorker(node.right, depth + 1);
}
- else if (kind === 193 /* ConditionalExpression */) {
+ else if (kind === 194 /* ConditionalExpression */) {
return isSimpleExpressionWorker(node.condition, depth + 1)
&& isSimpleExpressionWorker(node.whenTrue, depth + 1)
&& isSimpleExpressionWorker(node.whenFalse, depth + 1);
}
- else if (kind === 188 /* VoidExpression */
- || kind === 187 /* TypeOfExpression */
- || kind === 186 /* DeleteExpression */) {
+ else if (kind === 189 /* VoidExpression */
+ || kind === 188 /* TypeOfExpression */
+ || kind === 187 /* DeleteExpression */) {
return isSimpleExpressionWorker(node.expression, depth + 1);
}
- else if (kind === 175 /* ArrayLiteralExpression */) {
+ else if (kind === 176 /* ArrayLiteralExpression */) {
return node.elements.length === 0;
}
- else if (kind === 176 /* ObjectLiteralExpression */) {
+ else if (kind === 177 /* ObjectLiteralExpression */) {
return node.properties.length === 0;
}
- else if (kind === 179 /* CallExpression */) {
+ else if (kind === 180 /* CallExpression */) {
if (!isSimpleExpressionWorker(node.expression, depth + 1)) {
return false;
}
@@ -9493,16 +9643,19 @@ var ts;
}
return false;
}
- var syntaxKindCache = ts.createMap();
+ var syntaxKindCache = [];
function formatSyntaxKind(kind) {
var syntaxKindEnum = ts.SyntaxKind;
if (syntaxKindEnum) {
- if (syntaxKindCache[kind]) {
- return syntaxKindCache[kind];
+ var cached = syntaxKindCache[kind];
+ if (cached !== undefined) {
+ return cached;
}
- for (var name_7 in syntaxKindEnum) {
- if (syntaxKindEnum[name_7] === kind) {
- return syntaxKindCache[kind] = kind.toString() + " (" + name_7 + ")";
+ for (var name in syntaxKindEnum) {
+ if (syntaxKindEnum[name] === kind) {
+ var result = kind + " (" + name + ")";
+ syntaxKindCache[kind] = result;
+ return result;
}
}
}
@@ -9511,6 +9664,14 @@ var ts;
}
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function getRangePos(range) {
+ return range ? range.pos : -1;
+ }
+ ts.getRangePos = getRangePos;
+ function getRangeEnd(range) {
+ return range ? range.end : -1;
+ }
+ ts.getRangeEnd = getRangeEnd;
/**
* Increases (or decreases) a position by the provided amount.
*
@@ -9642,11 +9803,11 @@ var ts;
* declaration.
*/
function isDeclarationNameOfEnumOrNamespace(node) {
- var parseNode = getParseTreeNode(node);
+ var parseNode = ts.getParseTreeNode(node);
if (parseNode) {
switch (parseNode.parent.kind) {
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
return parseNode === parseNode.parent.name;
}
}
@@ -9667,7 +9828,7 @@ var ts;
if (node.symbol) {
for (var _i = 0, _a = node.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 226 /* ClassDeclaration */ && declaration !== node) {
+ if (declaration.kind === 228 /* ClassDeclaration */ && declaration !== node) {
return true;
}
}
@@ -9732,6 +9893,10 @@ var ts;
return node.kind === 70 /* Identifier */;
}
ts.isIdentifier = isIdentifier;
+ function isVoidExpression(node) {
+ return node.kind === 189 /* VoidExpression */;
+ }
+ ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
// Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`.
return isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
@@ -9744,16 +9909,16 @@ var ts;
ts.isModifier = isModifier;
// Names
function isQualifiedName(node) {
- return node.kind === 141 /* QualifiedName */;
+ return node.kind === 142 /* QualifiedName */;
}
ts.isQualifiedName = isQualifiedName;
function isComputedPropertyName(node) {
- return node.kind === 142 /* ComputedPropertyName */;
+ return node.kind === 143 /* ComputedPropertyName */;
}
ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
- return kind === 141 /* QualifiedName */
+ return kind === 142 /* QualifiedName */
|| kind === 70 /* Identifier */;
}
ts.isEntityName = isEntityName;
@@ -9762,7 +9927,7 @@ var ts;
return kind === 70 /* Identifier */
|| kind === 9 /* StringLiteral */
|| kind === 8 /* NumericLiteral */
- || kind === 142 /* ComputedPropertyName */;
+ || kind === 143 /* ComputedPropertyName */;
}
ts.isPropertyName = isPropertyName;
function isModuleName(node) {
@@ -9774,61 +9939,65 @@ var ts;
function isBindingName(node) {
var kind = node.kind;
return kind === 70 /* Identifier */
- || kind === 172 /* ObjectBindingPattern */
- || kind === 173 /* ArrayBindingPattern */;
+ || kind === 173 /* ObjectBindingPattern */
+ || kind === 174 /* ArrayBindingPattern */;
}
ts.isBindingName = isBindingName;
// Signature elements
function isTypeParameter(node) {
- return node.kind === 143 /* TypeParameter */;
+ return node.kind === 144 /* TypeParameter */;
}
ts.isTypeParameter = isTypeParameter;
function isParameter(node) {
- return node.kind === 144 /* Parameter */;
+ return node.kind === 145 /* Parameter */;
}
ts.isParameter = isParameter;
function isDecorator(node) {
- return node.kind === 145 /* Decorator */;
+ return node.kind === 146 /* Decorator */;
}
ts.isDecorator = isDecorator;
// Type members
function isMethodDeclaration(node) {
- return node.kind === 149 /* MethodDeclaration */;
+ return node.kind === 150 /* MethodDeclaration */;
}
ts.isMethodDeclaration = isMethodDeclaration;
function isClassElement(node) {
var kind = node.kind;
- return kind === 150 /* Constructor */
- || kind === 147 /* PropertyDeclaration */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 155 /* IndexSignature */
- || kind === 203 /* SemicolonClassElement */;
+ return kind === 151 /* Constructor */
+ || kind === 148 /* PropertyDeclaration */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 156 /* IndexSignature */
+ || kind === 205 /* SemicolonClassElement */;
}
ts.isClassElement = isClassElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
- return kind === 257 /* PropertyAssignment */
- || kind === 258 /* ShorthandPropertyAssignment */
- || kind === 259 /* SpreadAssignment */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 244 /* MissingDeclaration */;
+ return kind === 260 /* PropertyAssignment */
+ || kind === 261 /* ShorthandPropertyAssignment */
+ || kind === 262 /* SpreadAssignment */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 246 /* MissingDeclaration */;
}
ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
// Type
function isTypeNodeKind(kind) {
- return (kind >= 156 /* FirstTypeNode */ && kind <= 171 /* LastTypeNode */)
+ return (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */)
|| kind === 118 /* AnyKeyword */
|| kind === 132 /* NumberKeyword */
+ || kind === 133 /* ObjectKeyword */
|| kind === 121 /* BooleanKeyword */
- || kind === 134 /* StringKeyword */
- || kind === 135 /* SymbolKeyword */
+ || kind === 135 /* StringKeyword */
+ || kind === 136 /* SymbolKeyword */
+ || kind === 98 /* ThisKeyword */
|| kind === 104 /* VoidKeyword */
+ || kind === 138 /* UndefinedKeyword */
+ || kind === 94 /* NullKeyword */
|| kind === 129 /* NeverKeyword */
- || kind === 199 /* ExpressionWithTypeArguments */;
+ || kind === 200 /* ExpressionWithTypeArguments */;
}
/**
* Node test that determines whether a node is a valid type node.
@@ -9841,36 +10010,36 @@ var ts;
ts.isTypeNode = isTypeNode;
// Binding patterns
function isArrayBindingPattern(node) {
- return node.kind === 173 /* ArrayBindingPattern */;
+ return node.kind === 174 /* ArrayBindingPattern */;
}
ts.isArrayBindingPattern = isArrayBindingPattern;
function isObjectBindingPattern(node) {
- return node.kind === 172 /* ObjectBindingPattern */;
+ return node.kind === 173 /* ObjectBindingPattern */;
}
ts.isObjectBindingPattern = isObjectBindingPattern;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
- return kind === 173 /* ArrayBindingPattern */
- || kind === 172 /* ObjectBindingPattern */;
+ return kind === 174 /* ArrayBindingPattern */
+ || kind === 173 /* ObjectBindingPattern */;
}
return false;
}
ts.isBindingPattern = isBindingPattern;
function isAssignmentPattern(node) {
var kind = node.kind;
- return kind === 175 /* ArrayLiteralExpression */
- || kind === 176 /* ObjectLiteralExpression */;
+ return kind === 176 /* ArrayLiteralExpression */
+ || kind === 177 /* ObjectLiteralExpression */;
}
ts.isAssignmentPattern = isAssignmentPattern;
function isBindingElement(node) {
- return node.kind === 174 /* BindingElement */;
+ return node.kind === 175 /* BindingElement */;
}
ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
- return kind === 174 /* BindingElement */
- || kind === 198 /* OmittedExpression */;
+ return kind === 175 /* BindingElement */
+ || kind === 199 /* OmittedExpression */;
}
ts.isArrayBindingElement = isArrayBindingElement;
/**
@@ -9878,9 +10047,9 @@ var ts;
*/
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 174 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 175 /* BindingElement */:
return true;
}
return false;
@@ -9899,8 +10068,8 @@ var ts;
*/
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 172 /* ObjectBindingPattern */:
- case 176 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 177 /* ObjectLiteralExpression */:
return true;
}
return false;
@@ -9911,8 +10080,8 @@ var ts;
*/
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
return true;
}
return false;
@@ -9920,86 +10089,92 @@ var ts;
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
// Expression
function isArrayLiteralExpression(node) {
- return node.kind === 175 /* ArrayLiteralExpression */;
+ return node.kind === 176 /* ArrayLiteralExpression */;
}
ts.isArrayLiteralExpression = isArrayLiteralExpression;
function isObjectLiteralExpression(node) {
- return node.kind === 176 /* ObjectLiteralExpression */;
+ return node.kind === 177 /* ObjectLiteralExpression */;
}
ts.isObjectLiteralExpression = isObjectLiteralExpression;
function isPropertyAccessExpression(node) {
- return node.kind === 177 /* PropertyAccessExpression */;
+ return node.kind === 178 /* PropertyAccessExpression */;
}
ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isPropertyAccessOrQualifiedName(node) {
+ var kind = node.kind;
+ return kind === 178 /* PropertyAccessExpression */
+ || kind === 142 /* QualifiedName */;
+ }
+ ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
function isElementAccessExpression(node) {
- return node.kind === 178 /* ElementAccessExpression */;
+ return node.kind === 179 /* ElementAccessExpression */;
}
ts.isElementAccessExpression = isElementAccessExpression;
function isBinaryExpression(node) {
- return node.kind === 192 /* BinaryExpression */;
+ return node.kind === 193 /* BinaryExpression */;
}
ts.isBinaryExpression = isBinaryExpression;
function isConditionalExpression(node) {
- return node.kind === 193 /* ConditionalExpression */;
+ return node.kind === 194 /* ConditionalExpression */;
}
ts.isConditionalExpression = isConditionalExpression;
function isCallExpression(node) {
- return node.kind === 179 /* CallExpression */;
+ return node.kind === 180 /* CallExpression */;
}
ts.isCallExpression = isCallExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
- return kind === 194 /* TemplateExpression */
+ return kind === 195 /* TemplateExpression */
|| kind === 12 /* NoSubstitutionTemplateLiteral */;
}
ts.isTemplateLiteral = isTemplateLiteral;
function isSpreadExpression(node) {
- return node.kind === 196 /* SpreadElement */;
+ return node.kind === 197 /* SpreadElement */;
}
ts.isSpreadExpression = isSpreadExpression;
function isExpressionWithTypeArguments(node) {
- return node.kind === 199 /* ExpressionWithTypeArguments */;
+ return node.kind === 200 /* ExpressionWithTypeArguments */;
}
ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
- return kind === 177 /* PropertyAccessExpression */
- || kind === 178 /* ElementAccessExpression */
- || kind === 180 /* NewExpression */
- || kind === 179 /* CallExpression */
- || kind === 246 /* JsxElement */
- || kind === 247 /* JsxSelfClosingElement */
- || kind === 181 /* TaggedTemplateExpression */
- || kind === 175 /* ArrayLiteralExpression */
- || kind === 183 /* ParenthesizedExpression */
- || kind === 176 /* ObjectLiteralExpression */
- || kind === 197 /* ClassExpression */
- || kind === 184 /* FunctionExpression */
+ return kind === 178 /* PropertyAccessExpression */
+ || kind === 179 /* ElementAccessExpression */
+ || kind === 181 /* NewExpression */
+ || kind === 180 /* CallExpression */
+ || kind === 248 /* JsxElement */
+ || kind === 249 /* JsxSelfClosingElement */
+ || kind === 182 /* TaggedTemplateExpression */
+ || kind === 176 /* ArrayLiteralExpression */
+ || kind === 184 /* ParenthesizedExpression */
+ || kind === 177 /* ObjectLiteralExpression */
+ || kind === 198 /* ClassExpression */
+ || kind === 185 /* FunctionExpression */
|| kind === 70 /* Identifier */
|| kind === 11 /* RegularExpressionLiteral */
|| kind === 8 /* NumericLiteral */
|| kind === 9 /* StringLiteral */
|| kind === 12 /* NoSubstitutionTemplateLiteral */
- || kind === 194 /* TemplateExpression */
+ || kind === 195 /* TemplateExpression */
|| kind === 85 /* FalseKeyword */
|| kind === 94 /* NullKeyword */
|| kind === 98 /* ThisKeyword */
|| kind === 100 /* TrueKeyword */
|| kind === 96 /* SuperKeyword */
- || kind === 201 /* NonNullExpression */
- || kind === 297 /* RawExpression */;
+ || kind === 202 /* NonNullExpression */
+ || kind === 203 /* MetaProperty */;
}
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
ts.isLeftHandSideExpression = isLeftHandSideExpression;
function isUnaryExpressionKind(kind) {
- return kind === 190 /* PrefixUnaryExpression */
- || kind === 191 /* PostfixUnaryExpression */
- || kind === 186 /* DeleteExpression */
- || kind === 187 /* TypeOfExpression */
- || kind === 188 /* VoidExpression */
- || kind === 189 /* AwaitExpression */
- || kind === 182 /* TypeAssertionExpression */
+ return kind === 191 /* PrefixUnaryExpression */
+ || kind === 192 /* PostfixUnaryExpression */
+ || kind === 187 /* DeleteExpression */
+ || kind === 188 /* TypeOfExpression */
+ || kind === 189 /* VoidExpression */
+ || kind === 190 /* AwaitExpression */
+ || kind === 183 /* TypeAssertionExpression */
|| isLeftHandSideExpressionKind(kind);
}
function isUnaryExpression(node) {
@@ -10007,14 +10182,13 @@ var ts;
}
ts.isUnaryExpression = isUnaryExpression;
function isExpressionKind(kind) {
- return kind === 193 /* ConditionalExpression */
- || kind === 195 /* YieldExpression */
- || kind === 185 /* ArrowFunction */
- || kind === 192 /* BinaryExpression */
- || kind === 196 /* SpreadElement */
- || kind === 200 /* AsExpression */
- || kind === 198 /* OmittedExpression */
- || kind === 297 /* RawExpression */
+ return kind === 194 /* ConditionalExpression */
+ || kind === 196 /* YieldExpression */
+ || kind === 186 /* ArrowFunction */
+ || kind === 193 /* BinaryExpression */
+ || kind === 197 /* SpreadElement */
+ || kind === 201 /* AsExpression */
+ || kind === 199 /* OmittedExpression */
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -10023,16 +10197,16 @@ var ts;
ts.isExpression = isExpression;
function isAssertionExpression(node) {
var kind = node.kind;
- return kind === 182 /* TypeAssertionExpression */
- || kind === 200 /* AsExpression */;
+ return kind === 183 /* TypeAssertionExpression */
+ || kind === 201 /* AsExpression */;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 294 /* PartiallyEmittedExpression */;
+ return node.kind === 295 /* PartiallyEmittedExpression */;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 293 /* NotEmittedStatement */;
+ return node.kind === 294 /* NotEmittedStatement */;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -10041,17 +10215,17 @@ var ts;
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
function isOmittedExpression(node) {
- return node.kind === 198 /* OmittedExpression */;
+ return node.kind === 199 /* OmittedExpression */;
}
ts.isOmittedExpression = isOmittedExpression;
// Misc
function isTemplateSpan(node) {
- return node.kind === 202 /* TemplateSpan */;
+ return node.kind === 204 /* TemplateSpan */;
}
ts.isTemplateSpan = isTemplateSpan;
// Element
function isBlock(node) {
- return node.kind === 204 /* Block */;
+ return node.kind === 206 /* Block */;
}
ts.isBlock = isBlock;
function isConciseBody(node) {
@@ -10069,121 +10243,135 @@ var ts;
}
ts.isForInitializer = isForInitializer;
function isVariableDeclaration(node) {
- return node.kind === 223 /* VariableDeclaration */;
+ return node.kind === 225 /* VariableDeclaration */;
}
ts.isVariableDeclaration = isVariableDeclaration;
function isVariableDeclarationList(node) {
- return node.kind === 224 /* VariableDeclarationList */;
+ return node.kind === 226 /* VariableDeclarationList */;
}
ts.isVariableDeclarationList = isVariableDeclarationList;
function isCaseBlock(node) {
- return node.kind === 232 /* CaseBlock */;
+ return node.kind === 234 /* CaseBlock */;
}
ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
- return kind === 231 /* ModuleBlock */
- || kind === 230 /* ModuleDeclaration */;
+ return kind === 233 /* ModuleBlock */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 70 /* Identifier */;
}
ts.isModuleBody = isModuleBody;
+ function isNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 233 /* ModuleBlock */
+ || kind === 232 /* ModuleDeclaration */;
+ }
+ ts.isNamespaceBody = isNamespaceBody;
+ function isJSDocNamespaceBody(node) {
+ var kind = node.kind;
+ return kind === 70 /* Identifier */
+ || kind === 232 /* ModuleDeclaration */;
+ }
+ ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
function isImportEqualsDeclaration(node) {
- return node.kind === 234 /* ImportEqualsDeclaration */;
+ return node.kind === 236 /* ImportEqualsDeclaration */;
}
ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportClause(node) {
- return node.kind === 236 /* ImportClause */;
+ return node.kind === 238 /* ImportClause */;
}
ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
- return kind === 238 /* NamedImports */
- || kind === 237 /* NamespaceImport */;
+ return kind === 240 /* NamedImports */
+ || kind === 239 /* NamespaceImport */;
}
ts.isNamedImportBindings = isNamedImportBindings;
function isImportSpecifier(node) {
- return node.kind === 239 /* ImportSpecifier */;
+ return node.kind === 241 /* ImportSpecifier */;
}
ts.isImportSpecifier = isImportSpecifier;
function isNamedExports(node) {
- return node.kind === 242 /* NamedExports */;
+ return node.kind === 244 /* NamedExports */;
}
ts.isNamedExports = isNamedExports;
function isExportSpecifier(node) {
- return node.kind === 243 /* ExportSpecifier */;
+ return node.kind === 245 /* ExportSpecifier */;
}
ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
- return node.kind === 230 /* ModuleDeclaration */ || node.kind === 229 /* EnumDeclaration */;
+ return node.kind === 232 /* ModuleDeclaration */ || node.kind === 231 /* EnumDeclaration */;
}
ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
function isDeclarationKind(kind) {
- return kind === 185 /* ArrowFunction */
- || kind === 174 /* BindingElement */
- || kind === 226 /* ClassDeclaration */
- || kind === 197 /* ClassExpression */
- || kind === 150 /* Constructor */
- || kind === 229 /* EnumDeclaration */
- || kind === 260 /* EnumMember */
- || kind === 243 /* ExportSpecifier */
- || kind === 225 /* FunctionDeclaration */
- || kind === 184 /* FunctionExpression */
- || kind === 151 /* GetAccessor */
- || kind === 236 /* ImportClause */
- || kind === 234 /* ImportEqualsDeclaration */
- || kind === 239 /* ImportSpecifier */
- || kind === 227 /* InterfaceDeclaration */
- || kind === 149 /* MethodDeclaration */
- || kind === 148 /* MethodSignature */
- || kind === 230 /* ModuleDeclaration */
- || kind === 233 /* NamespaceExportDeclaration */
- || kind === 237 /* NamespaceImport */
- || kind === 144 /* Parameter */
- || kind === 257 /* PropertyAssignment */
- || kind === 147 /* PropertyDeclaration */
- || kind === 146 /* PropertySignature */
- || kind === 152 /* SetAccessor */
- || kind === 258 /* ShorthandPropertyAssignment */
- || kind === 228 /* TypeAliasDeclaration */
- || kind === 143 /* TypeParameter */
- || kind === 223 /* VariableDeclaration */
- || kind === 285 /* JSDocTypedefTag */;
+ return kind === 186 /* ArrowFunction */
+ || kind === 175 /* BindingElement */
+ || kind === 228 /* ClassDeclaration */
+ || kind === 198 /* ClassExpression */
+ || kind === 151 /* Constructor */
+ || kind === 231 /* EnumDeclaration */
+ || kind === 263 /* EnumMember */
+ || kind === 245 /* ExportSpecifier */
+ || kind === 227 /* FunctionDeclaration */
+ || kind === 185 /* FunctionExpression */
+ || kind === 152 /* GetAccessor */
+ || kind === 238 /* ImportClause */
+ || kind === 236 /* ImportEqualsDeclaration */
+ || kind === 241 /* ImportSpecifier */
+ || kind === 229 /* InterfaceDeclaration */
+ || kind === 252 /* JsxAttribute */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 149 /* MethodSignature */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 235 /* NamespaceExportDeclaration */
+ || kind === 239 /* NamespaceImport */
+ || kind === 145 /* Parameter */
+ || kind === 260 /* PropertyAssignment */
+ || kind === 148 /* PropertyDeclaration */
+ || kind === 147 /* PropertySignature */
+ || kind === 153 /* SetAccessor */
+ || kind === 261 /* ShorthandPropertyAssignment */
+ || kind === 230 /* TypeAliasDeclaration */
+ || kind === 144 /* TypeParameter */
+ || kind === 225 /* VariableDeclaration */
+ || kind === 289 /* JSDocTypedefTag */;
}
function isDeclarationStatementKind(kind) {
- return kind === 225 /* FunctionDeclaration */
- || kind === 244 /* MissingDeclaration */
- || kind === 226 /* ClassDeclaration */
- || kind === 227 /* InterfaceDeclaration */
- || kind === 228 /* TypeAliasDeclaration */
- || kind === 229 /* EnumDeclaration */
- || kind === 230 /* ModuleDeclaration */
- || kind === 235 /* ImportDeclaration */
- || kind === 234 /* ImportEqualsDeclaration */
- || kind === 241 /* ExportDeclaration */
- || kind === 240 /* ExportAssignment */
- || kind === 233 /* NamespaceExportDeclaration */;
+ return kind === 227 /* FunctionDeclaration */
+ || kind === 246 /* MissingDeclaration */
+ || kind === 228 /* ClassDeclaration */
+ || kind === 229 /* InterfaceDeclaration */
+ || kind === 230 /* TypeAliasDeclaration */
+ || kind === 231 /* EnumDeclaration */
+ || kind === 232 /* ModuleDeclaration */
+ || kind === 237 /* ImportDeclaration */
+ || kind === 236 /* ImportEqualsDeclaration */
+ || kind === 243 /* ExportDeclaration */
+ || kind === 242 /* ExportAssignment */
+ || kind === 235 /* NamespaceExportDeclaration */;
}
function isStatementKindButNotDeclarationKind(kind) {
- return kind === 215 /* BreakStatement */
- || kind === 214 /* ContinueStatement */
- || kind === 222 /* DebuggerStatement */
- || kind === 209 /* DoStatement */
- || kind === 207 /* ExpressionStatement */
- || kind === 206 /* EmptyStatement */
- || kind === 212 /* ForInStatement */
- || kind === 213 /* ForOfStatement */
- || kind === 211 /* ForStatement */
- || kind === 208 /* IfStatement */
- || kind === 219 /* LabeledStatement */
- || kind === 216 /* ReturnStatement */
- || kind === 218 /* SwitchStatement */
- || kind === 220 /* ThrowStatement */
- || kind === 221 /* TryStatement */
- || kind === 205 /* VariableStatement */
- || kind === 210 /* WhileStatement */
- || kind === 217 /* WithStatement */
- || kind === 293 /* NotEmittedStatement */
- || kind === 296 /* EndOfDeclarationMarker */
- || kind === 295 /* MergeDeclarationMarker */;
+ return kind === 217 /* BreakStatement */
+ || kind === 216 /* ContinueStatement */
+ || kind === 224 /* DebuggerStatement */
+ || kind === 211 /* DoStatement */
+ || kind === 209 /* ExpressionStatement */
+ || kind === 208 /* EmptyStatement */
+ || kind === 214 /* ForInStatement */
+ || kind === 215 /* ForOfStatement */
+ || kind === 213 /* ForStatement */
+ || kind === 210 /* IfStatement */
+ || kind === 221 /* LabeledStatement */
+ || kind === 218 /* ReturnStatement */
+ || kind === 220 /* SwitchStatement */
+ || kind === 222 /* ThrowStatement */
+ || kind === 223 /* TryStatement */
+ || kind === 207 /* VariableStatement */
+ || kind === 212 /* WhileStatement */
+ || kind === 219 /* WithStatement */
+ || kind === 294 /* NotEmittedStatement */
+ || kind === 297 /* EndOfDeclarationMarker */
+ || kind === 296 /* MergeDeclarationMarker */;
}
function isDeclaration(node) {
return isDeclarationKind(node.kind);
@@ -10204,93 +10392,104 @@ var ts;
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
|| isDeclarationStatementKind(kind)
- || kind === 204 /* Block */;
+ || kind === 206 /* Block */;
}
ts.isStatement = isStatement;
// Module references
function isModuleReference(node) {
var kind = node.kind;
- return kind === 245 /* ExternalModuleReference */
- || kind === 141 /* QualifiedName */
+ return kind === 247 /* ExternalModuleReference */
+ || kind === 142 /* QualifiedName */
|| kind === 70 /* Identifier */;
}
ts.isModuleReference = isModuleReference;
// JSX
function isJsxOpeningElement(node) {
- return node.kind === 248 /* JsxOpeningElement */;
+ return node.kind === 250 /* JsxOpeningElement */;
}
ts.isJsxOpeningElement = isJsxOpeningElement;
function isJsxClosingElement(node) {
- return node.kind === 249 /* JsxClosingElement */;
+ return node.kind === 251 /* JsxClosingElement */;
}
ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 98 /* ThisKeyword */
|| kind === 70 /* Identifier */
- || kind === 177 /* PropertyAccessExpression */;
+ || kind === 178 /* PropertyAccessExpression */;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
function isJsxChild(node) {
var kind = node.kind;
- return kind === 246 /* JsxElement */
- || kind === 252 /* JsxExpression */
- || kind === 247 /* JsxSelfClosingElement */
+ return kind === 248 /* JsxElement */
+ || kind === 255 /* JsxExpression */
+ || kind === 249 /* JsxSelfClosingElement */
|| kind === 10 /* JsxText */;
}
ts.isJsxChild = isJsxChild;
+ function isJsxAttributes(node) {
+ var kind = node.kind;
+ return kind === 253 /* JsxAttributes */;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
- return kind === 250 /* JsxAttribute */
- || kind === 251 /* JsxSpreadAttribute */;
+ return kind === 252 /* JsxAttribute */
+ || kind === 254 /* JsxSpreadAttribute */;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
function isJsxSpreadAttribute(node) {
- return node.kind === 251 /* JsxSpreadAttribute */;
+ return node.kind === 254 /* JsxSpreadAttribute */;
}
ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxAttribute(node) {
- return node.kind === 250 /* JsxAttribute */;
+ return node.kind === 252 /* JsxAttribute */;
}
ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
- || kind === 252 /* JsxExpression */;
+ || kind === 255 /* JsxExpression */;
}
ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
+ function isJsxOpeningLikeElement(node) {
+ var kind = node.kind;
+ return kind === 250 /* JsxOpeningElement */
+ || kind === 249 /* JsxSelfClosingElement */;
+ }
+ ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
// Clauses
function isCaseOrDefaultClause(node) {
var kind = node.kind;
- return kind === 253 /* CaseClause */
- || kind === 254 /* DefaultClause */;
+ return kind === 256 /* CaseClause */
+ || kind === 257 /* DefaultClause */;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isHeritageClause(node) {
- return node.kind === 255 /* HeritageClause */;
+ return node.kind === 258 /* HeritageClause */;
}
ts.isHeritageClause = isHeritageClause;
function isCatchClause(node) {
- return node.kind === 256 /* CatchClause */;
+ return node.kind === 259 /* CatchClause */;
}
ts.isCatchClause = isCatchClause;
// Property assignments
function isPropertyAssignment(node) {
- return node.kind === 257 /* PropertyAssignment */;
+ return node.kind === 260 /* PropertyAssignment */;
}
ts.isPropertyAssignment = isPropertyAssignment;
function isShorthandPropertyAssignment(node) {
- return node.kind === 258 /* ShorthandPropertyAssignment */;
+ return node.kind === 261 /* ShorthandPropertyAssignment */;
}
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
// Enum
function isEnumMember(node) {
- return node.kind === 260 /* EnumMember */;
+ return node.kind === 263 /* EnumMember */;
}
ts.isEnumMember = isEnumMember;
// Top-level nodes
function isSourceFile(node) {
- return node.kind === 261 /* SourceFile */;
+ return node.kind === 264 /* SourceFile */;
}
ts.isSourceFile = isSourceFile;
function isWatchSet(options) {
@@ -10303,12 +10502,13 @@ var ts;
function getDefaultLibFileName(options) {
switch (options.target) {
case 5 /* ESNext */:
+ return "lib.esnext.full.d.ts";
case 4 /* ES2017 */:
- return "lib.es2017.d.ts";
+ return "lib.es2017.full.d.ts";
case 3 /* ES2016 */:
- return "lib.es2016.d.ts";
+ return "lib.es2016.full.d.ts";
case 2 /* ES2015 */:
- return "lib.es6.d.ts";
+ return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
default:
return "lib.d.ts";
}
@@ -10516,13 +10716,13 @@ var ts;
oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
}
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength:*/ newEndN - oldStartN);
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
}
ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
function getTypeParameterOwner(d) {
- if (d && d.kind === 143 /* TypeParameter */) {
+ if (d && d.kind === 144 /* TypeParameter */) {
for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 229 /* InterfaceDeclaration */) {
return current;
}
}
@@ -10530,11 +10730,11 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 150 /* Constructor */ && ts.isClassLike(node.parent.parent);
+ return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 151 /* Constructor */ && ts.isClassLike(node.parent.parent);
}
ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 174 /* BindingElement */ || ts.isBindingPattern(node))) {
+ while (node && (node.kind === 175 /* BindingElement */ || ts.isBindingPattern(node))) {
node = node.parent;
}
return node;
@@ -10542,14 +10742,14 @@ var ts;
function getCombinedModifierFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = ts.getModifierFlags(node);
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
node = node.parent;
}
- if (node && node.kind === 224 /* VariableDeclarationList */) {
+ if (node && node.kind === 226 /* VariableDeclarationList */) {
flags |= ts.getModifierFlags(node);
node = node.parent;
}
- if (node && node.kind === 205 /* VariableStatement */) {
+ if (node && node.kind === 207 /* VariableStatement */) {
flags |= ts.getModifierFlags(node);
}
return flags;
@@ -10565,23 +10765,23 @@ var ts;
function getCombinedNodeFlags(node) {
node = walkUpBindingElementsAndPatterns(node);
var flags = node.flags;
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
node = node.parent;
}
- if (node && node.kind === 224 /* VariableDeclarationList */) {
+ if (node && node.kind === 226 /* VariableDeclarationList */) {
flags |= node.flags;
node = node.parent;
}
- if (node && node.kind === 205 /* VariableStatement */) {
+ if (node && node.kind === 207 /* VariableStatement */) {
flags |= node.flags;
}
return flags;
}
ts.getCombinedNodeFlags = getCombinedNodeFlags;
/**
- * Checks to see if the locale is in the appropriate format,
- * and if it is, attempts to set the appropriate language.
- */
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
function validateLocaleAndSetLanguage(locale, sys, errors) {
var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
if (!matchResult) {
@@ -10632,27 +10832,60 @@ var ts;
}
}
ts.validateLocaleAndSetLanguage = validateLocaleAndSetLanguage;
+ function getOriginalNode(node, nodeTest) {
+ if (node) {
+ while (node.original !== undefined) {
+ node = node.original;
+ }
+ }
+ return !nodeTest || nodeTest(node) ? node : undefined;
+ }
+ ts.getOriginalNode = getOriginalNode;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node) {
+ return (node.flags & 8 /* Synthesized */) === 0;
+ }
+ ts.isParseTreeNode = isParseTreeNode;
+ function getParseTreeNode(node, nodeTest) {
+ if (node === undefined || isParseTreeNode(node)) {
+ return node;
+ }
+ node = getOriginalNode(node);
+ if (isParseTreeNode(node) && (!nodeTest || nodeTest(node))) {
+ return node;
+ }
+ return undefined;
+ }
+ ts.getParseTreeNode = getParseTreeNode;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeIdentifier(identifier) {
+ return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier;
+ }
+ ts.unescapeIdentifier = unescapeIdentifier;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
/// <reference path="utilities.ts"/>
-/* @internal */
var ts;
(function (ts) {
- var NodeConstructor;
- var SourceFileConstructor;
- function createNode(kind, location, flags) {
- var ConstructorForKind = kind === 261 /* SourceFile */
- ? (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))
- : (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()));
- var node = location
- ? new ConstructorForKind(kind, location.pos, location.end)
- : new ConstructorForKind(kind, /*pos*/ -1, /*end*/ -1);
- node.flags = flags | 8 /* Synthesized */;
+ function createSynthesizedNode(kind) {
+ var node = ts.createNode(kind, -1, -1);
+ node.flags |= 8 /* Synthesized */;
return node;
}
+ /* @internal */
function updateNode(updated, original) {
if (updated !== original) {
setOriginalNode(updated, original);
+ setTextRange(updated, original);
if (original.startsOnNewLine) {
updated.startsOnNewLine = true;
}
@@ -10661,7 +10894,10 @@ var ts;
return updated;
}
ts.updateNode = updateNode;
- function createNodeArray(elements, location, hasTrailingComma) {
+ /**
+ * Make `elements` into a `NodeArray<T>`. If `elements` is `undefined`, returns an empty `NodeArray<T>`.
+ */
+ function createNodeArray(elements, hasTrailingComma) {
if (elements) {
if (ts.isNodeArray(elements)) {
return elements;
@@ -10671,38 +10907,22 @@ var ts;
elements = [];
}
var array = elements;
- if (location) {
- array.pos = location.pos;
- array.end = location.end;
- }
- else {
- array.pos = -1;
- array.end = -1;
- }
- if (hasTrailingComma) {
- array.hasTrailingComma = true;
- }
+ array.pos = -1;
+ array.end = -1;
+ array.hasTrailingComma = hasTrailingComma;
return array;
}
ts.createNodeArray = createNodeArray;
- function createSynthesizedNode(kind, startsOnNewLine) {
- var node = createNode(kind, /*location*/ undefined);
- node.startsOnNewLine = startsOnNewLine;
- return node;
- }
- ts.createSynthesizedNode = createSynthesizedNode;
- function createSynthesizedNodeArray(elements) {
- return createNodeArray(elements, /*location*/ undefined);
- }
- ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
/**
* Creates a shallow, memberwise clone of a node with no source map location.
*/
+ /* @internal */
function getSynthesizedClone(node) {
// We don't use "clone" from core.ts here, as we need to preserve the prototype chain of
// the original node. We also need to exclude specific properties and only include own-
// properties (to skip members already defined on the shared prototype).
- var clone = createNode(node.kind, /*location*/ undefined, node.flags);
+ var clone = createSynthesizedNode(node.kind);
+ clone.flags |= node.flags;
setOriginalNode(clone, node);
for (var key in node) {
if (clone.hasOwnProperty(key) || !node.hasOwnProperty(key)) {
@@ -10713,54 +10933,50 @@ var ts;
return clone;
}
ts.getSynthesizedClone = getSynthesizedClone;
- /**
- * Creates a shallow, memberwise clone of a node for mutation.
- */
- function getMutableClone(node) {
- var clone = getSynthesizedClone(node);
- clone.pos = node.pos;
- clone.end = node.end;
- clone.parent = node.parent;
- return clone;
- }
- ts.getMutableClone = getMutableClone;
- function createLiteral(value, location) {
+ function createLiteral(value) {
if (typeof value === "number") {
- var node = createNode(8 /* NumericLiteral */, location, /*flags*/ undefined);
- node.text = value.toString();
- return node;
+ return createNumericLiteral(value + "");
}
- else if (typeof value === "boolean") {
- return createNode(value ? 100 /* TrueKeyword */ : 85 /* FalseKeyword */, location, /*flags*/ undefined);
+ if (typeof value === "boolean") {
+ return value ? createTrue() : createFalse();
}
- else if (typeof value === "string") {
- var node = createNode(9 /* StringLiteral */, location, /*flags*/ undefined);
- node.text = value;
- return node;
- }
- else if (value) {
- var node = createNode(9 /* StringLiteral */, location, /*flags*/ undefined);
- node.textSourceNode = value;
- node.text = value.text;
- return node;
+ if (typeof value === "string") {
+ return createStringLiteral(value);
}
+ return createLiteralFromNode(value);
}
ts.createLiteral = createLiteral;
+ function createNumericLiteral(value) {
+ var node = createSynthesizedNode(8 /* NumericLiteral */);
+ node.text = value;
+ node.numericLiteralFlags = 0;
+ return node;
+ }
+ ts.createNumericLiteral = createNumericLiteral;
+ function createStringLiteral(text) {
+ var node = createSynthesizedNode(9 /* StringLiteral */);
+ node.text = text;
+ return node;
+ }
+ function createLiteralFromNode(sourceNode) {
+ var node = createStringLiteral(sourceNode.text);
+ node.textSourceNode = sourceNode;
+ return node;
+ }
// Identifiers
- var nextAutoGenerateId = 0;
- function createIdentifier(text, location) {
- var node = createNode(70 /* Identifier */, location);
+ function createIdentifier(text) {
+ var node = createSynthesizedNode(70 /* Identifier */);
node.text = ts.escapeIdentifier(text);
- node.originalKeywordKind = ts.stringToToken(text);
+ node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */;
node.autoGenerateKind = 0 /* None */;
node.autoGenerateId = 0;
return node;
}
ts.createIdentifier = createIdentifier;
- function createTempVariable(recordTempVariable, location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ var nextAutoGenerateId = 0;
+ /** Create a unique temporary variable. */
+ function createTempVariable(recordTempVariable) {
+ var name = createIdentifier("");
name.autoGenerateKind = 1 /* Auto */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
@@ -10770,98 +10986,399 @@ var ts;
return name;
}
ts.createTempVariable = createTempVariable;
- function createLoopVariable(location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique temporary variable for use in a loop. */
+ function createLoopVariable() {
+ var name = createIdentifier("");
name.autoGenerateKind = 2 /* Loop */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createLoopVariable = createLoopVariable;
- function createUniqueName(text, location) {
- var name = createNode(70 /* Identifier */, location);
- name.text = text;
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique name based on the supplied text. */
+ function createUniqueName(text) {
+ var name = createIdentifier(text);
name.autoGenerateKind = 3 /* Unique */;
name.autoGenerateId = nextAutoGenerateId;
nextAutoGenerateId++;
return name;
}
ts.createUniqueName = createUniqueName;
- function getGeneratedNameForNode(node, location) {
- var name = createNode(70 /* Identifier */, location);
- name.original = node;
- name.text = "";
- name.originalKeywordKind = 0 /* Unknown */;
+ /** Create a unique name generated for a node. */
+ function getGeneratedNameForNode(node) {
+ var name = createIdentifier("");
name.autoGenerateKind = 4 /* Node */;
name.autoGenerateId = nextAutoGenerateId;
+ name.original = node;
nextAutoGenerateId++;
return name;
}
ts.getGeneratedNameForNode = getGeneratedNameForNode;
// Punctuation
function createToken(token) {
- return createNode(token);
+ return createSynthesizedNode(token);
}
ts.createToken = createToken;
// Reserved words
function createSuper() {
- var node = createNode(96 /* SuperKeyword */);
- return node;
+ return createSynthesizedNode(96 /* SuperKeyword */);
}
ts.createSuper = createSuper;
- function createThis(location) {
- var node = createNode(98 /* ThisKeyword */, location);
- return node;
+ function createThis() {
+ return createSynthesizedNode(98 /* ThisKeyword */);
}
ts.createThis = createThis;
function createNull() {
- var node = createNode(94 /* NullKeyword */);
- return node;
+ return createSynthesizedNode(94 /* NullKeyword */);
}
ts.createNull = createNull;
+ function createTrue() {
+ return createSynthesizedNode(100 /* TrueKeyword */);
+ }
+ ts.createTrue = createTrue;
+ function createFalse() {
+ return createSynthesizedNode(85 /* FalseKeyword */);
+ }
+ ts.createFalse = createFalse;
// Names
- function createComputedPropertyName(expression, location) {
- var node = createNode(142 /* ComputedPropertyName */, location);
+ function createQualifiedName(left, right) {
+ var node = createSynthesizedNode(142 /* QualifiedName */);
+ node.left = left;
+ node.right = asName(right);
+ return node;
+ }
+ ts.createQualifiedName = createQualifiedName;
+ function updateQualifiedName(node, left, right) {
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createQualifiedName(left, right), node)
+ : node;
+ }
+ ts.updateQualifiedName = updateQualifiedName;
+ function createComputedPropertyName(expression) {
+ var node = createSynthesizedNode(143 /* ComputedPropertyName */);
node.expression = expression;
return node;
}
ts.createComputedPropertyName = createComputedPropertyName;
function updateComputedPropertyName(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createComputedPropertyName(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createComputedPropertyName(expression), node)
+ : node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
+ // Type Elements
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var signatureDeclaration = createSynthesizedNode(kind);
+ signatureDeclaration.typeParameters = asNodeArray(typeParameters);
+ signatureDeclaration.parameters = asNodeArray(parameters);
+ signatureDeclaration.type = type;
+ return signatureDeclaration;
+ }
+ ts.createSignatureDeclaration = createSignatureDeclaration;
+ function updateSignatureDeclaration(node, typeParameters, parameters, type) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ ? updateNode(createSignatureDeclaration(node.kind, typeParameters, parameters, type), node)
+ : node;
+ }
+ function createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(159 /* FunctionType */, typeParameters, parameters, type);
+ }
+ ts.createFunctionTypeNode = createFunctionTypeNode;
+ function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateFunctionTypeNode = updateFunctionTypeNode;
+ function createConstructorTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160 /* ConstructorType */, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createCallSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(154 /* CallSignature */, typeParameters, parameters, type);
+ }
+ ts.createCallSignatureDeclaration = createCallSignatureDeclaration;
+ function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignatureDeclaration = updateCallSignatureDeclaration;
+ function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155 /* ConstructSignature */, typeParameters, parameters, type);
+ }
+ ts.createConstructSignatureDeclaration = createConstructSignatureDeclaration;
+ function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignatureDeclaration = updateConstructSignatureDeclaration;
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var methodSignature = createSignatureDeclaration(149 /* MethodSignature */, typeParameters, parameters, type);
+ methodSignature.name = asName(name);
+ methodSignature.questionToken = questionToken;
+ return methodSignature;
+ }
+ ts.createMethodSignature = createMethodSignature;
+ function updateMethodSignature(node, typeParameters, parameters, type, name, questionToken) {
+ return node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.name !== name
+ || node.questionToken !== questionToken
+ ? updateNode(createMethodSignature(typeParameters, parameters, type, name, questionToken), node)
+ : node;
+ }
+ ts.updateMethodSignature = updateMethodSignature;
+ // Types
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createThisTypeNode() {
+ return createSynthesizedNode(168 /* ThisType */);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createLiteralTypeNode(literal) {
+ var literalTypeNode = createSynthesizedNode(172 /* LiteralType */);
+ literalTypeNode.literal = literal;
+ return literalTypeNode;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
+ function createTypeReferenceNode(typeName, typeArguments) {
+ var typeReference = createSynthesizedNode(158 /* TypeReference */);
+ typeReference.typeName = asName(typeName);
+ typeReference.typeArguments = asNodeArray(typeArguments);
+ return typeReference;
+ }
+ ts.createTypeReferenceNode = createTypeReferenceNode;
+ function updateTypeReferenceNode(node, typeName, typeArguments) {
+ return node.typeName !== typeName
+ || node.typeArguments !== typeArguments
+ ? updateNode(createTypeReferenceNode(typeName, typeArguments), node)
+ : node;
+ }
+ ts.updateTypeReferenceNode = updateTypeReferenceNode;
+ function createTypePredicateNode(parameterName, type) {
+ var typePredicateNode = createSynthesizedNode(157 /* TypePredicate */);
+ typePredicateNode.parameterName = asName(parameterName);
+ typePredicateNode.type = type;
+ return typePredicateNode;
+ }
+ ts.createTypePredicateNode = createTypePredicateNode;
+ function updateTypePredicateNode(node, parameterName, type) {
+ return node.parameterName !== parameterName
+ || node.type !== type
+ ? updateNode(createTypePredicateNode(parameterName, type), node)
+ : node;
+ }
+ ts.updateTypePredicateNode = updateTypePredicateNode;
+ function createTypeQueryNode(exprName) {
+ var typeQueryNode = createSynthesizedNode(161 /* TypeQuery */);
+ typeQueryNode.exprName = exprName;
+ return typeQueryNode;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName ? updateNode(createTypeQueryNode(exprName), node) : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createArrayTypeNode(elementType) {
+ var arrayTypeNode = createSynthesizedNode(163 /* ArrayType */);
+ arrayTypeNode.elementType = elementType;
+ return arrayTypeNode;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var unionTypeNode = createSynthesizedNode(kind);
+ unionTypeNode.types = createNodeArray(types);
+ return unionTypeNode;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ ts.updateUnionOrIntersectionTypeNode = updateUnionOrIntersectionTypeNode;
+ function createTypeLiteralNode(members) {
+ var typeLiteralNode = createSynthesizedNode(162 /* TypeLiteral */);
+ typeLiteralNode.members = createNodeArray(members);
+ return typeLiteralNode;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createTupleTypeNode(elementTypes) {
+ var tupleTypeNode = createSynthesizedNode(164 /* TupleType */);
+ tupleTypeNode.elementTypes = createNodeArray(elementTypes);
+ return tupleTypeNode;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var mappedTypeNode = createSynthesizedNode(171 /* MappedType */);
+ mappedTypeNode.readonlyToken = readonlyToken;
+ mappedTypeNode.typeParameter = typeParameter;
+ mappedTypeNode.questionToken = questionToken;
+ mappedTypeNode.type = type;
+ return mappedTypeNode;
+ }
+ ts.createMappedTypeNode = createMappedTypeNode;
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, questionToken, type) {
+ return node.readonlyToken !== readonlyToken
+ || node.typeParameter !== typeParameter
+ || node.questionToken !== questionToken
+ || node.type !== type
+ ? updateNode(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node)
+ : node;
+ }
+ ts.updateMappedTypeNode = updateMappedTypeNode;
+ function createTypeOperatorNode(type) {
+ var typeOperatorNode = createSynthesizedNode(169 /* TypeOperator */);
+ typeOperatorNode.operator = 126 /* KeyOfKeyword */;
+ typeOperatorNode.type = type;
+ return typeOperatorNode;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var indexedAccessTypeNode = createSynthesizedNode(170 /* IndexedAccessType */);
+ indexedAccessTypeNode.objectType = objectType;
+ indexedAccessTypeNode.indexType = indexType;
+ return indexedAccessTypeNode;
+ }
+ ts.createIndexedAccessTypeNode = createIndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node, objectType, indexType) {
+ return node.objectType !== objectType
+ || node.indexType !== indexType
+ ? updateNode(createIndexedAccessTypeNode(objectType, indexType), node)
+ : node;
+ }
+ ts.updateIndexedAccessTypeNode = updateIndexedAccessTypeNode;
+ // Type Declarations
+ function createTypeParameterDeclaration(name, constraint, defaultType) {
+ var typeParameter = createSynthesizedNode(144 /* TypeParameter */);
+ typeParameter.name = asName(name);
+ typeParameter.constraint = constraint;
+ typeParameter.default = defaultType;
+ return typeParameter;
+ }
+ ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
+ return node.name !== name
+ || node.constraint !== constraint
+ || node.default !== defaultType
+ ? updateNode(createTypeParameterDeclaration(name, constraint, defaultType), node)
+ : node;
+ }
+ ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
+ // Signature elements
+ function createPropertySignature(name, questionToken, type, initializer) {
+ var propertySignature = createSynthesizedNode(147 /* PropertySignature */);
+ propertySignature.name = asName(name);
+ propertySignature.questionToken = questionToken;
+ propertySignature.type = type;
+ propertySignature.initializer = initializer;
+ return propertySignature;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, name, questionToken, type, initializer) {
+ return node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
+ function createIndexSignatureDeclaration(decorators, modifiers, parameters, type) {
+ var indexSignature = createSynthesizedNode(156 /* IndexSignature */);
+ indexSignature.decorators = asNodeArray(decorators);
+ indexSignature.modifiers = asNodeArray(modifiers);
+ indexSignature.parameters = createNodeArray(parameters);
+ indexSignature.type = type;
+ return indexSignature;
+ }
+ ts.createIndexSignatureDeclaration = createIndexSignatureDeclaration;
+ function updateIndexSignatureDeclaration(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignatureDeclaration(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignatureDeclaration = updateIndexSignatureDeclaration;
// Signature elements
- function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer, location, flags) {
- var node = createNode(144 /* Parameter */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createParameter(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(145 /* Parameter */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
- node.initializer = initializer ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createParameter = createParameter;
- function updateParameter(node, decorators, modifiers, dotDotDotToken, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node);
- }
- return node;
+ function updateParameter(node, decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createParameter(decorators, modifiers, dotDotDotToken, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateParameter = updateParameter;
+ function createDecorator(expression) {
+ var node = createSynthesizedNode(146 /* Decorator */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createDecorator = createDecorator;
+ function updateDecorator(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createDecorator(expression), node)
+ : node;
+ }
+ ts.updateDecorator = updateDecorator;
// Type members
- function createProperty(decorators, modifiers, name, questionToken, type, initializer, location) {
- var node = createNode(147 /* PropertyDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148 /* PropertyDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.questionToken = questionToken;
node.type = type;
node.initializer = initializer;
@@ -10869,36 +11386,46 @@ var ts;
}
ts.createProperty = createProperty;
function updateProperty(node, decorators, modifiers, name, type, initializer) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createProperty(decorators, modifiers, name, node.questionToken, type, initializer), node)
+ : node;
}
ts.updateProperty = updateProperty;
- function createMethod(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(149 /* MethodDeclaration */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(150 /* MethodDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
- ts.createMethod = createMethod;
- function updateMethod(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createMethod(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ ts.createMethodDeclaration = createMethodDeclaration;
+ function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateMethod = updateMethod;
- function createConstructor(decorators, modifiers, parameters, body, location, flags) {
- var node = createNode(150 /* Constructor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createConstructor(decorators, modifiers, parameters, body) {
+ var node = createSynthesizedNode(151 /* Constructor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = undefined;
@@ -10907,17 +11434,19 @@ var ts;
}
ts.createConstructor = createConstructor;
function updateConstructor(node, decorators, modifiers, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body) {
- return updateNode(createConstructor(decorators, modifiers, parameters, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createConstructor(decorators, modifiers, parameters, body), node)
+ : node;
}
ts.updateConstructor = updateConstructor;
- function createGetAccessor(decorators, modifiers, name, parameters, type, body, location, flags) {
- var node = createNode(151 /* GetAccessor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createGetAccessor(decorators, modifiers, name, parameters, type, body) {
+ var node = createSynthesizedNode(152 /* GetAccessor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.type = type;
@@ -10926,17 +11455,21 @@ var ts;
}
ts.createGetAccessor = createGetAccessor;
function updateGetAccessor(node, decorators, modifiers, name, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createGetAccessor(decorators, modifiers, name, parameters, type, body), node)
+ : node;
}
ts.updateGetAccessor = updateGetAccessor;
- function createSetAccessor(decorators, modifiers, name, parameters, body, location, flags) {
- var node = createNode(152 /* SetAccessor */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createSetAccessor(decorators, modifiers, name, parameters, body) {
+ var node = createSynthesizedNode(153 /* SetAccessor */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
node.typeParameters = undefined;
node.parameters = createNodeArray(parameters);
node.body = body;
@@ -10944,59 +11477,62 @@ var ts;
}
ts.createSetAccessor = createSetAccessor;
function updateSetAccessor(node, decorators, modifiers, name, parameters, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body) {
- return updateNode(createSetAccessor(decorators, modifiers, name, parameters, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.parameters !== parameters
+ || node.body !== body
+ ? updateNode(createSetAccessor(decorators, modifiers, name, parameters, body), node)
+ : node;
}
ts.updateSetAccessor = updateSetAccessor;
// Binding Patterns
- function createObjectBindingPattern(elements, location) {
- var node = createNode(172 /* ObjectBindingPattern */, location);
+ function createObjectBindingPattern(elements) {
+ var node = createSynthesizedNode(173 /* ObjectBindingPattern */);
node.elements = createNodeArray(elements);
return node;
}
ts.createObjectBindingPattern = createObjectBindingPattern;
function updateObjectBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createObjectBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createObjectBindingPattern(elements), node)
+ : node;
}
ts.updateObjectBindingPattern = updateObjectBindingPattern;
- function createArrayBindingPattern(elements, location) {
- var node = createNode(173 /* ArrayBindingPattern */, location);
+ function createArrayBindingPattern(elements) {
+ var node = createSynthesizedNode(174 /* ArrayBindingPattern */);
node.elements = createNodeArray(elements);
return node;
}
ts.createArrayBindingPattern = createArrayBindingPattern;
function updateArrayBindingPattern(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayBindingPattern(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayBindingPattern(elements), node)
+ : node;
}
ts.updateArrayBindingPattern = updateArrayBindingPattern;
- function createBindingElement(propertyName, dotDotDotToken, name, initializer, location) {
- var node = createNode(174 /* BindingElement */, location);
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+ var node = createSynthesizedNode(175 /* BindingElement */);
node.dotDotDotToken = dotDotDotToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
node.initializer = initializer;
return node;
}
ts.createBindingElement = createBindingElement;
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
- if (node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer) {
- return updateNode(createBindingElement(propertyName, dotDotDotToken, name, initializer, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.dotDotDotToken !== dotDotDotToken
+ || node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createBindingElement(dotDotDotToken, propertyName, name, initializer), node)
+ : node;
}
ts.updateBindingElement = updateBindingElement;
// Expression
- function createArrayLiteral(elements, location, multiLine) {
- var node = createNode(175 /* ArrayLiteralExpression */, location);
- node.elements = parenthesizeListElements(createNodeArray(elements));
+ function createArrayLiteral(elements, multiLine) {
+ var node = createSynthesizedNode(176 /* ArrayLiteralExpression */);
+ node.elements = ts.parenthesizeListElements(createNodeArray(elements));
if (multiLine) {
node.multiLine = true;
}
@@ -11004,14 +11540,13 @@ var ts;
}
ts.createArrayLiteral = createArrayLiteral;
function updateArrayLiteral(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createArrayLiteral(elements, node, node.multiLine), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createArrayLiteral(elements, node.multiLine), node)
+ : node;
}
ts.updateArrayLiteral = updateArrayLiteral;
- function createObjectLiteral(properties, location, multiLine) {
- var node = createNode(176 /* ObjectLiteralExpression */, location);
+ function createObjectLiteral(properties, multiLine) {
+ var node = createSynthesizedNode(177 /* ObjectLiteralExpression */);
node.properties = createNodeArray(properties);
if (multiLine) {
node.multiLine = true;
@@ -11020,436 +11555,465 @@ var ts;
}
ts.createObjectLiteral = createObjectLiteral;
function updateObjectLiteral(node, properties) {
- if (node.properties !== properties) {
- return updateNode(createObjectLiteral(properties, node, node.multiLine), node);
- }
- return node;
+ return node.properties !== properties
+ ? updateNode(createObjectLiteral(properties, node.multiLine), node)
+ : node;
}
ts.updateObjectLiteral = updateObjectLiteral;
- function createPropertyAccess(expression, name, location, flags) {
- var node = createNode(177 /* PropertyAccessExpression */, location, flags);
- node.expression = parenthesizeForAccess(expression);
- (node.emitNode || (node.emitNode = {})).flags |= 65536 /* NoIndentation */;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAccess(expression, name) {
+ var node = createSynthesizedNode(178 /* PropertyAccessExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.name = asName(name);
+ setEmitFlags(node, 65536 /* NoIndentation */);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
function updatePropertyAccess(node, expression, name) {
- if (node.expression !== expression || node.name !== name) {
- var propertyAccess = createPropertyAccess(expression, name, /*location*/ node, node.flags);
- // Because we are updating existed propertyAccess we want to inherit its emitFlags instead of using default from createPropertyAccess
- (propertyAccess.emitNode || (propertyAccess.emitNode = {})).flags = getEmitFlags(node);
- return updateNode(propertyAccess, node);
- }
- return node;
+ // Because we are updating existed propertyAccess we want to inherit its emitFlags
+ // instead of using the default from createPropertyAccess
+ return node.expression !== expression
+ || node.name !== name
+ ? updateNode(setEmitFlags(createPropertyAccess(expression, name), getEmitFlags(node)), node)
+ : node;
}
ts.updatePropertyAccess = updatePropertyAccess;
- function createElementAccess(expression, index, location) {
- var node = createNode(178 /* ElementAccessExpression */, location);
- node.expression = parenthesizeForAccess(expression);
- node.argumentExpression = typeof index === "number" ? createLiteral(index) : index;
+ function createElementAccess(expression, index) {
+ var node = createSynthesizedNode(179 /* ElementAccessExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.argumentExpression = asExpression(index);
return node;
}
ts.createElementAccess = createElementAccess;
function updateElementAccess(node, expression, argumentExpression) {
- if (node.expression !== expression || node.argumentExpression !== argumentExpression) {
- return updateNode(createElementAccess(expression, argumentExpression, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.argumentExpression !== argumentExpression
+ ? updateNode(createElementAccess(expression, argumentExpression), node)
+ : node;
}
ts.updateElementAccess = updateElementAccess;
- function createCall(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(179 /* CallExpression */, location, flags);
- node.expression = parenthesizeForAccess(expression);
- if (typeArguments) {
- node.typeArguments = createNodeArray(typeArguments);
- }
- node.arguments = parenthesizeListElements(createNodeArray(argumentsArray));
+ function createCall(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(180 /* CallExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = ts.parenthesizeListElements(createNodeArray(argumentsArray));
return node;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- if (expression !== node.expression || typeArguments !== node.typeArguments || argumentsArray !== node.arguments) {
- return updateNode(createCall(expression, typeArguments, argumentsArray, /*location*/ node, node.flags), node);
- }
- return node;
+ return expression !== node.expression
+ || typeArguments !== node.typeArguments
+ || argumentsArray !== node.arguments
+ ? updateNode(createCall(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateCall = updateCall;
- function createNew(expression, typeArguments, argumentsArray, location, flags) {
- var node = createNode(180 /* NewExpression */, location, flags);
- node.expression = parenthesizeForNew(expression);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.arguments = argumentsArray ? parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
+ function createNew(expression, typeArguments, argumentsArray) {
+ var node = createSynthesizedNode(181 /* NewExpression */);
+ node.expression = ts.parenthesizeForNew(expression);
+ node.typeArguments = asNodeArray(typeArguments);
+ node.arguments = argumentsArray ? ts.parenthesizeListElements(createNodeArray(argumentsArray)) : undefined;
return node;
}
ts.createNew = createNew;
function updateNew(node, expression, typeArguments, argumentsArray) {
- if (node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray) {
- return updateNode(createNew(expression, typeArguments, argumentsArray, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
+ ? updateNode(createNew(expression, typeArguments, argumentsArray), node)
+ : node;
}
ts.updateNew = updateNew;
- function createTaggedTemplate(tag, template, location) {
- var node = createNode(181 /* TaggedTemplateExpression */, location);
- node.tag = parenthesizeForAccess(tag);
+ function createTaggedTemplate(tag, template) {
+ var node = createSynthesizedNode(182 /* TaggedTemplateExpression */);
+ node.tag = ts.parenthesizeForAccess(tag);
node.template = template;
return node;
}
ts.createTaggedTemplate = createTaggedTemplate;
function updateTaggedTemplate(node, tag, template) {
- if (node.tag !== tag || node.template !== template) {
- return updateNode(createTaggedTemplate(tag, template, node), node);
- }
- return node;
+ return node.tag !== tag
+ || node.template !== template
+ ? updateNode(createTaggedTemplate(tag, template), node)
+ : node;
}
ts.updateTaggedTemplate = updateTaggedTemplate;
- function createParen(expression, location) {
- var node = createNode(183 /* ParenthesizedExpression */, location);
+ function createTypeAssertion(type, expression) {
+ var node = createSynthesizedNode(183 /* TypeAssertionExpression */);
+ node.type = type;
+ node.expression = ts.parenthesizePrefixOperand(expression);
+ return node;
+ }
+ ts.createTypeAssertion = createTypeAssertion;
+ function updateTypeAssertion(node, type, expression) {
+ return node.type !== type
+ || node.expression !== expression
+ ? updateNode(createTypeAssertion(type, expression), node)
+ : node;
+ }
+ ts.updateTypeAssertion = updateTypeAssertion;
+ function createParen(expression) {
+ var node = createSynthesizedNode(184 /* ParenthesizedExpression */);
node.expression = expression;
return node;
}
ts.createParen = createParen;
function updateParen(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createParen(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createParen(expression), node)
+ : node;
}
ts.updateParen = updateParen;
- function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(184 /* FunctionExpression */, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(185 /* FunctionExpression */);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionExpression = createFunctionExpression;
- function updateFunctionExpression(node, modifiers, name, typeParameters, parameters, type, body) {
- if (node.name !== name || node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionExpression(modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.name !== name
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionExpression = updateFunctionExpression;
- function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body, location, flags) {
- var node = createNode(185 /* ArrowFunction */, location, flags);
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+ var node = createSynthesizedNode(186 /* ArrowFunction */);
+ node.modifiers = asNodeArray(modifiers);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.equalsGreaterThanToken = equalsGreaterThanToken || createToken(35 /* EqualsGreaterThanToken */);
- node.body = parenthesizeConciseBody(body);
+ node.body = ts.parenthesizeConciseBody(body);
return node;
}
ts.createArrowFunction = createArrowFunction;
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, body) {
- if (node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createArrowFunction(modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, body), node)
+ : node;
}
ts.updateArrowFunction = updateArrowFunction;
- function createDelete(expression, location) {
- var node = createNode(186 /* DeleteExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createDelete(expression) {
+ var node = createSynthesizedNode(187 /* DeleteExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createDelete = createDelete;
function updateDelete(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createDelete(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createDelete(expression), node)
+ : node;
}
ts.updateDelete = updateDelete;
- function createTypeOf(expression, location) {
- var node = createNode(187 /* TypeOfExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createTypeOf(expression) {
+ var node = createSynthesizedNode(188 /* TypeOfExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createTypeOf = createTypeOf;
function updateTypeOf(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createTypeOf(expression, node), expression);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createTypeOf(expression), node)
+ : node;
}
ts.updateTypeOf = updateTypeOf;
- function createVoid(expression, location) {
- var node = createNode(188 /* VoidExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createVoid(expression) {
+ var node = createSynthesizedNode(189 /* VoidExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createVoid = createVoid;
function updateVoid(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createVoid(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createVoid(expression), node)
+ : node;
}
ts.updateVoid = updateVoid;
- function createAwait(expression, location) {
- var node = createNode(189 /* AwaitExpression */, location);
- node.expression = parenthesizePrefixOperand(expression);
+ function createAwait(expression) {
+ var node = createSynthesizedNode(190 /* AwaitExpression */);
+ node.expression = ts.parenthesizePrefixOperand(expression);
return node;
}
ts.createAwait = createAwait;
function updateAwait(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createAwait(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createAwait(expression), node)
+ : node;
}
ts.updateAwait = updateAwait;
- function createPrefix(operator, operand, location) {
- var node = createNode(190 /* PrefixUnaryExpression */, location);
+ function createPrefix(operator, operand) {
+ var node = createSynthesizedNode(191 /* PrefixUnaryExpression */);
node.operator = operator;
- node.operand = parenthesizePrefixOperand(operand);
+ node.operand = ts.parenthesizePrefixOperand(operand);
return node;
}
ts.createPrefix = createPrefix;
function updatePrefix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPrefix(node.operator, operand, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPrefix(node.operator, operand), node)
+ : node;
}
ts.updatePrefix = updatePrefix;
- function createPostfix(operand, operator, location) {
- var node = createNode(191 /* PostfixUnaryExpression */, location);
- node.operand = parenthesizePostfixOperand(operand);
+ function createPostfix(operand, operator) {
+ var node = createSynthesizedNode(192 /* PostfixUnaryExpression */);
+ node.operand = ts.parenthesizePostfixOperand(operand);
node.operator = operator;
return node;
}
ts.createPostfix = createPostfix;
function updatePostfix(node, operand) {
- if (node.operand !== operand) {
- return updateNode(createPostfix(operand, node.operator, node), node);
- }
- return node;
+ return node.operand !== operand
+ ? updateNode(createPostfix(operand, node.operator), node)
+ : node;
}
ts.updatePostfix = updatePostfix;
- function createBinary(left, operator, right, location) {
- var operatorToken = typeof operator === "number" ? createToken(operator) : operator;
+ function createBinary(left, operator, right) {
+ var node = createSynthesizedNode(193 /* BinaryExpression */);
+ var operatorToken = asToken(operator);
var operatorKind = operatorToken.kind;
- var node = createNode(192 /* BinaryExpression */, location);
- node.left = parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined);
+ node.left = ts.parenthesizeBinaryOperand(operatorKind, left, /*isLeftSideOfBinary*/ true, /*leftOperand*/ undefined);
node.operatorToken = operatorToken;
- node.right = parenthesizeBinaryOperand(operatorKind, right, /*isLeftSideOfBinary*/ false, node.left);
+ node.right = ts.parenthesizeBinaryOperand(operatorKind, right, /*isLeftSideOfBinary*/ false, node.left);
return node;
}
ts.createBinary = createBinary;
function updateBinary(node, left, right) {
- if (node.left !== left || node.right !== right) {
- return updateNode(createBinary(left, node.operatorToken, right, /*location*/ node), node);
- }
- return node;
+ return node.left !== left
+ || node.right !== right
+ ? updateNode(createBinary(left, node.operatorToken, right), node)
+ : node;
}
ts.updateBinary = updateBinary;
- function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonTokenOrLocation, whenFalse, location) {
- var node = createNode(193 /* ConditionalExpression */, whenFalse ? location : colonTokenOrLocation);
- node.condition = parenthesizeForConditionalHead(condition);
- if (whenFalse) {
- // second overload
- node.questionToken = questionTokenOrWhenTrue;
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- node.colonToken = colonTokenOrLocation;
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenFalse);
- }
- else {
- // first overload
- node.questionToken = createToken(54 /* QuestionToken */);
- node.whenTrue = parenthesizeSubexpressionOfConditionalExpression(questionTokenOrWhenTrue);
- node.colonToken = createToken(55 /* ColonToken */);
- node.whenFalse = parenthesizeSubexpressionOfConditionalExpression(whenTrueOrWhenFalse);
- }
+ function createConditional(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
+ var node = createSynthesizedNode(194 /* ConditionalExpression */);
+ node.condition = ts.parenthesizeForConditionalHead(condition);
+ node.questionToken = whenFalse ? questionTokenOrWhenTrue : createToken(54 /* QuestionToken */);
+ node.whenTrue = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenTrueOrWhenFalse : questionTokenOrWhenTrue);
+ node.colonToken = whenFalse ? colonToken : createToken(55 /* ColonToken */);
+ node.whenFalse = ts.parenthesizeSubexpressionOfConditionalExpression(whenFalse ? whenFalse : whenTrueOrWhenFalse);
return node;
}
ts.createConditional = createConditional;
function updateConditional(node, condition, whenTrue, whenFalse) {
- if (node.condition !== condition || node.whenTrue !== whenTrue || node.whenFalse !== whenFalse) {
- return updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse, node), node);
- }
- return node;
+ return node.condition !== condition
+ || node.whenTrue !== whenTrue
+ || node.whenFalse !== whenFalse
+ ? updateNode(createConditional(condition, node.questionToken, whenTrue, node.colonToken, whenFalse), node)
+ : node;
}
ts.updateConditional = updateConditional;
- function createTemplateExpression(head, templateSpans, location) {
- var node = createNode(194 /* TemplateExpression */, location);
+ function createTemplateExpression(head, templateSpans) {
+ var node = createSynthesizedNode(195 /* TemplateExpression */);
node.head = head;
node.templateSpans = createNodeArray(templateSpans);
return node;
}
ts.createTemplateExpression = createTemplateExpression;
function updateTemplateExpression(node, head, templateSpans) {
- if (node.head !== head || node.templateSpans !== templateSpans) {
- return updateNode(createTemplateExpression(head, templateSpans, node), node);
- }
- return node;
+ return node.head !== head
+ || node.templateSpans !== templateSpans
+ ? updateNode(createTemplateExpression(head, templateSpans), node)
+ : node;
}
ts.updateTemplateExpression = updateTemplateExpression;
- function createYield(asteriskToken, expression, location) {
- var node = createNode(195 /* YieldExpression */, location);
- node.asteriskToken = asteriskToken;
- node.expression = expression;
+ function createYield(asteriskTokenOrExpression, expression) {
+ var node = createSynthesizedNode(196 /* YieldExpression */);
+ node.asteriskToken = asteriskTokenOrExpression && asteriskTokenOrExpression.kind === 38 /* AsteriskToken */ ? asteriskTokenOrExpression : undefined;
+ node.expression = asteriskTokenOrExpression && asteriskTokenOrExpression.kind !== 38 /* AsteriskToken */ ? asteriskTokenOrExpression : expression;
return node;
}
ts.createYield = createYield;
- function updateYield(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createYield(node.asteriskToken, expression, node), node);
- }
- return node;
+ function updateYield(node, asteriskToken, expression) {
+ return node.expression !== expression
+ || node.asteriskToken !== asteriskToken
+ ? updateNode(createYield(asteriskToken, expression), node)
+ : node;
}
ts.updateYield = updateYield;
- function createSpread(expression, location) {
- var node = createNode(196 /* SpreadElement */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSpread(expression) {
+ var node = createSynthesizedNode(197 /* SpreadElement */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
return node;
}
ts.createSpread = createSpread;
function updateSpread(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpread(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpread(expression), node)
+ : node;
}
ts.updateSpread = updateSpread;
- function createClassExpression(modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(197 /* ClassExpression */, location);
+ function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(198 /* ClassExpression */);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassExpression = createClassExpression;
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassExpression = updateClassExpression;
- function createOmittedExpression(location) {
- var node = createNode(198 /* OmittedExpression */, location);
- return node;
+ function createOmittedExpression() {
+ return createSynthesizedNode(199 /* OmittedExpression */);
}
ts.createOmittedExpression = createOmittedExpression;
- function createExpressionWithTypeArguments(typeArguments, expression, location) {
- var node = createNode(199 /* ExpressionWithTypeArguments */, location);
- node.typeArguments = typeArguments ? createNodeArray(typeArguments) : undefined;
- node.expression = parenthesizeForAccess(expression);
+ function createExpressionWithTypeArguments(typeArguments, expression) {
+ var node = createSynthesizedNode(200 /* ExpressionWithTypeArguments */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ node.typeArguments = asNodeArray(typeArguments);
return node;
}
ts.createExpressionWithTypeArguments = createExpressionWithTypeArguments;
function updateExpressionWithTypeArguments(node, typeArguments, expression) {
- if (node.typeArguments !== typeArguments || node.expression !== expression) {
- return updateNode(createExpressionWithTypeArguments(typeArguments, expression, node), node);
- }
- return node;
+ return node.typeArguments !== typeArguments
+ || node.expression !== expression
+ ? updateNode(createExpressionWithTypeArguments(typeArguments, expression), node)
+ : node;
}
ts.updateExpressionWithTypeArguments = updateExpressionWithTypeArguments;
+ function createAsExpression(expression, type) {
+ var node = createSynthesizedNode(201 /* AsExpression */);
+ node.expression = expression;
+ node.type = type;
+ return node;
+ }
+ ts.createAsExpression = createAsExpression;
+ function updateAsExpression(node, expression, type) {
+ return node.expression !== expression
+ || node.type !== type
+ ? updateNode(createAsExpression(expression, type), node)
+ : node;
+ }
+ ts.updateAsExpression = updateAsExpression;
+ function createNonNullExpression(expression) {
+ var node = createSynthesizedNode(202 /* NonNullExpression */);
+ node.expression = ts.parenthesizeForAccess(expression);
+ return node;
+ }
+ ts.createNonNullExpression = createNonNullExpression;
+ function updateNonNullExpression(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createNonNullExpression(expression), node)
+ : node;
+ }
+ ts.updateNonNullExpression = updateNonNullExpression;
// Misc
- function createTemplateSpan(expression, literal, location) {
- var node = createNode(202 /* TemplateSpan */, location);
+ function createTemplateSpan(expression, literal) {
+ var node = createSynthesizedNode(204 /* TemplateSpan */);
node.expression = expression;
node.literal = literal;
return node;
}
ts.createTemplateSpan = createTemplateSpan;
function updateTemplateSpan(node, expression, literal) {
- if (node.expression !== expression || node.literal !== literal) {
- return updateNode(createTemplateSpan(expression, literal, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.literal !== literal
+ ? updateNode(createTemplateSpan(expression, literal), node)
+ : node;
}
ts.updateTemplateSpan = updateTemplateSpan;
// Element
- function createBlock(statements, location, multiLine, flags) {
- var block = createNode(204 /* Block */, location, flags);
+ function createBlock(statements, multiLine) {
+ var block = createSynthesizedNode(206 /* Block */);
block.statements = createNodeArray(statements);
- if (multiLine) {
- block.multiLine = true;
- }
+ if (multiLine)
+ block.multiLine = multiLine;
return block;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- if (statements !== node.statements) {
- return updateNode(createBlock(statements, /*location*/ node, node.multiLine, node.flags), node);
- }
- return node;
+ return statements !== node.statements
+ ? updateNode(createBlock(statements, node.multiLine), node)
+ : node;
}
ts.updateBlock = updateBlock;
- function createVariableStatement(modifiers, declarationList, location, flags) {
- var node = createNode(205 /* VariableStatement */, location, flags);
+ function createVariableStatement(modifiers, declarationList) {
+ var node = createSynthesizedNode(207 /* VariableStatement */);
node.decorators = undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ node.modifiers = asNodeArray(modifiers);
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
return node;
}
ts.createVariableStatement = createVariableStatement;
function updateVariableStatement(node, modifiers, declarationList) {
- if (node.modifiers !== modifiers || node.declarationList !== declarationList) {
- return updateNode(createVariableStatement(modifiers, declarationList, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.modifiers !== modifiers
+ || node.declarationList !== declarationList
+ ? updateNode(createVariableStatement(modifiers, declarationList), node)
+ : node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, location, flags) {
- var node = createNode(224 /* VariableDeclarationList */, location, flags);
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(226 /* VariableDeclarationList */);
+ node.flags |= flags;
node.declarations = createNodeArray(declarations);
return node;
}
ts.createVariableDeclarationList = createVariableDeclarationList;
function updateVariableDeclarationList(node, declarations) {
- if (node.declarations !== declarations) {
- return updateNode(createVariableDeclarationList(declarations, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
}
ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer, location, flags) {
- var node = createNode(223 /* VariableDeclaration */, location, flags);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(225 /* VariableDeclaration */);
+ node.name = asName(name);
node.type = type;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createVariableDeclaration = createVariableDeclaration;
function updateVariableDeclaration(node, name, type, initializer) {
- if (node.name !== name || node.type !== type || node.initializer !== initializer) {
- return updateNode(createVariableDeclaration(name, type, initializer, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
}
ts.updateVariableDeclaration = updateVariableDeclaration;
- function createEmptyStatement(location) {
- return createNode(206 /* EmptyStatement */, location);
+ function createEmptyStatement() {
+ return createSynthesizedNode(208 /* EmptyStatement */);
}
ts.createEmptyStatement = createEmptyStatement;
- function createStatement(expression, location, flags) {
- var node = createNode(207 /* ExpressionStatement */, location, flags);
- node.expression = parenthesizeExpressionForExpressionStatement(expression);
+ function createStatement(expression) {
+ var node = createSynthesizedNode(209 /* ExpressionStatement */);
+ node.expression = ts.parenthesizeExpressionForExpressionStatement(expression);
return node;
}
ts.createStatement = createStatement;
function updateStatement(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createStatement(expression, /*location*/ node, node.flags), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createStatement(expression), node)
+ : node;
}
ts.updateStatement = updateStatement;
- function createIf(expression, thenStatement, elseStatement, location) {
- var node = createNode(208 /* IfStatement */, location);
+ function createIf(expression, thenStatement, elseStatement) {
+ var node = createSynthesizedNode(210 /* IfStatement */);
node.expression = expression;
node.thenStatement = thenStatement;
node.elseStatement = elseStatement;
@@ -11457,42 +12021,43 @@ var ts;
}
ts.createIf = createIf;
function updateIf(node, expression, thenStatement, elseStatement) {
- if (node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement) {
- return updateNode(createIf(expression, thenStatement, elseStatement, /*location*/ node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.thenStatement !== thenStatement
+ || node.elseStatement !== elseStatement
+ ? updateNode(createIf(expression, thenStatement, elseStatement), node)
+ : node;
}
ts.updateIf = updateIf;
- function createDo(statement, expression, location) {
- var node = createNode(209 /* DoStatement */, location);
+ function createDo(statement, expression) {
+ var node = createSynthesizedNode(211 /* DoStatement */);
node.statement = statement;
node.expression = expression;
return node;
}
ts.createDo = createDo;
function updateDo(node, statement, expression) {
- if (node.statement !== statement || node.expression !== expression) {
- return updateNode(createDo(statement, expression, node), node);
- }
- return node;
+ return node.statement !== statement
+ || node.expression !== expression
+ ? updateNode(createDo(statement, expression), node)
+ : node;
}
ts.updateDo = updateDo;
- function createWhile(expression, statement, location) {
- var node = createNode(210 /* WhileStatement */, location);
+ function createWhile(expression, statement) {
+ var node = createSynthesizedNode(212 /* WhileStatement */);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWhile = createWhile;
function updateWhile(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWhile(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWhile(expression, statement), node)
+ : node;
}
ts.updateWhile = updateWhile;
- function createFor(initializer, condition, incrementor, statement, location) {
- var node = createNode(211 /* ForStatement */, location, /*flags*/ undefined);
+ function createFor(initializer, condition, incrementor, statement) {
+ var node = createSynthesizedNode(213 /* ForStatement */);
node.initializer = initializer;
node.condition = condition;
node.incrementor = incrementor;
@@ -11501,14 +12066,16 @@ var ts;
}
ts.createFor = createFor;
function updateFor(node, initializer, condition, incrementor, statement) {
- if (node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement) {
- return updateNode(createFor(initializer, condition, incrementor, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.condition !== condition
+ || node.incrementor !== incrementor
+ || node.statement !== statement
+ ? updateNode(createFor(initializer, condition, incrementor, statement), node)
+ : node;
}
ts.updateFor = updateFor;
- function createForIn(initializer, expression, statement, location) {
- var node = createNode(212 /* ForInStatement */, location);
+ function createForIn(initializer, expression, statement) {
+ var node = createSynthesizedNode(214 /* ForInStatement */);
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
@@ -11516,127 +12083,123 @@ var ts;
}
ts.createForIn = createForIn;
function updateForIn(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForIn(initializer, expression, statement, node), node);
- }
- return node;
+ return node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForIn(initializer, expression, statement), node)
+ : node;
}
ts.updateForIn = updateForIn;
- function createForOf(initializer, expression, statement, location) {
- var node = createNode(213 /* ForOfStatement */, location);
+ function createForOf(awaitModifier, initializer, expression, statement) {
+ var node = createSynthesizedNode(215 /* ForOfStatement */);
+ node.awaitModifier = awaitModifier;
node.initializer = initializer;
node.expression = expression;
node.statement = statement;
return node;
}
ts.createForOf = createForOf;
- function updateForOf(node, initializer, expression, statement) {
- if (node.initializer !== initializer || node.expression !== expression || node.statement !== statement) {
- return updateNode(createForOf(initializer, expression, statement, node), node);
- }
- return node;
+ function updateForOf(node, awaitModifier, initializer, expression, statement) {
+ return node.awaitModifier !== awaitModifier
+ || node.initializer !== initializer
+ || node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createForOf(awaitModifier, initializer, expression, statement), node)
+ : node;
}
ts.updateForOf = updateForOf;
- function createContinue(label, location) {
- var node = createNode(214 /* ContinueStatement */, location);
- if (label) {
- node.label = label;
- }
+ function createContinue(label) {
+ var node = createSynthesizedNode(216 /* ContinueStatement */);
+ node.label = asName(label);
return node;
}
ts.createContinue = createContinue;
function updateContinue(node, label) {
- if (node.label !== label) {
- return updateNode(createContinue(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createContinue(label), node)
+ : node;
}
ts.updateContinue = updateContinue;
- function createBreak(label, location) {
- var node = createNode(215 /* BreakStatement */, location);
- if (label) {
- node.label = label;
- }
+ function createBreak(label) {
+ var node = createSynthesizedNode(217 /* BreakStatement */);
+ node.label = asName(label);
return node;
}
ts.createBreak = createBreak;
function updateBreak(node, label) {
- if (node.label !== label) {
- return updateNode(createBreak(label, node), node);
- }
- return node;
+ return node.label !== label
+ ? updateNode(createBreak(label), node)
+ : node;
}
ts.updateBreak = updateBreak;
- function createReturn(expression, location) {
- var node = createNode(216 /* ReturnStatement */, location);
+ function createReturn(expression) {
+ var node = createSynthesizedNode(218 /* ReturnStatement */);
node.expression = expression;
return node;
}
ts.createReturn = createReturn;
function updateReturn(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createReturn(expression, /*location*/ node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createReturn(expression), node)
+ : node;
}
ts.updateReturn = updateReturn;
- function createWith(expression, statement, location) {
- var node = createNode(217 /* WithStatement */, location);
+ function createWith(expression, statement) {
+ var node = createSynthesizedNode(219 /* WithStatement */);
node.expression = expression;
node.statement = statement;
return node;
}
ts.createWith = createWith;
function updateWith(node, expression, statement) {
- if (node.expression !== expression || node.statement !== statement) {
- return updateNode(createWith(expression, statement, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statement !== statement
+ ? updateNode(createWith(expression, statement), node)
+ : node;
}
ts.updateWith = updateWith;
- function createSwitch(expression, caseBlock, location) {
- var node = createNode(218 /* SwitchStatement */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createSwitch(expression, caseBlock) {
+ var node = createSynthesizedNode(220 /* SwitchStatement */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.caseBlock = caseBlock;
return node;
}
ts.createSwitch = createSwitch;
function updateSwitch(node, expression, caseBlock) {
- if (node.expression !== expression || node.caseBlock !== caseBlock) {
- return updateNode(createSwitch(expression, caseBlock, node), node);
- }
- return node;
+ return node.expression !== expression
+ || node.caseBlock !== caseBlock
+ ? updateNode(createSwitch(expression, caseBlock), node)
+ : node;
}
ts.updateSwitch = updateSwitch;
- function createLabel(label, statement, location) {
- var node = createNode(219 /* LabeledStatement */, location);
- node.label = typeof label === "string" ? createIdentifier(label) : label;
+ function createLabel(label, statement) {
+ var node = createSynthesizedNode(221 /* LabeledStatement */);
+ node.label = asName(label);
node.statement = statement;
return node;
}
ts.createLabel = createLabel;
function updateLabel(node, label, statement) {
- if (node.label !== label || node.statement !== statement) {
- return updateNode(createLabel(label, statement, node), node);
- }
- return node;
+ return node.label !== label
+ || node.statement !== statement
+ ? updateNode(createLabel(label, statement), node)
+ : node;
}
ts.updateLabel = updateLabel;
- function createThrow(expression, location) {
- var node = createNode(220 /* ThrowStatement */, location);
+ function createThrow(expression) {
+ var node = createSynthesizedNode(222 /* ThrowStatement */);
node.expression = expression;
return node;
}
ts.createThrow = createThrow;
function updateThrow(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createThrow(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createThrow(expression), node)
+ : node;
}
ts.updateThrow = updateThrow;
- function createTry(tryBlock, catchClause, finallyBlock, location) {
- var node = createNode(221 /* TryStatement */, location);
+ function createTry(tryBlock, catchClause, finallyBlock) {
+ var node = createSynthesizedNode(223 /* TryStatement */);
node.tryBlock = tryBlock;
node.catchClause = catchClause;
node.finallyBlock = finallyBlock;
@@ -11644,195 +12207,286 @@ var ts;
}
ts.createTry = createTry;
function updateTry(node, tryBlock, catchClause, finallyBlock) {
- if (node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock) {
- return updateNode(createTry(tryBlock, catchClause, finallyBlock, node), node);
- }
- return node;
+ return node.tryBlock !== tryBlock
+ || node.catchClause !== catchClause
+ || node.finallyBlock !== finallyBlock
+ ? updateNode(createTry(tryBlock, catchClause, finallyBlock), node)
+ : node;
}
ts.updateTry = updateTry;
- function createCaseBlock(clauses, location) {
- var node = createNode(232 /* CaseBlock */, location);
- node.clauses = createNodeArray(clauses);
- return node;
- }
- ts.createCaseBlock = createCaseBlock;
- function updateCaseBlock(node, clauses) {
- if (node.clauses !== clauses) {
- return updateNode(createCaseBlock(clauses, node), node);
- }
- return node;
- }
- ts.updateCaseBlock = updateCaseBlock;
- function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body, location, flags) {
- var node = createNode(225 /* FunctionDeclaration */, location, flags);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ var node = createSynthesizedNode(227 /* FunctionDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.asteriskToken = asteriskToken;
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
node.parameters = createNodeArray(parameters);
node.type = type;
node.body = body;
return node;
}
ts.createFunctionDeclaration = createFunctionDeclaration;
- function updateFunctionDeclaration(node, decorators, modifiers, name, typeParameters, parameters, type, body) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body) {
- return updateNode(createFunctionDeclaration(decorators, modifiers, node.asteriskToken, name, typeParameters, parameters, type, body, /*location*/ node, node.flags), node);
- }
- return node;
+ function updateFunctionDeclaration(node, decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.asteriskToken !== asteriskToken
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.parameters !== parameters
+ || node.type !== type
+ || node.body !== body
+ ? updateNode(createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
+ : node;
}
ts.updateFunctionDeclaration = updateFunctionDeclaration;
- function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, location) {
- var node = createNode(226 /* ClassDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
- node.name = name;
- node.typeParameters = typeParameters ? createNodeArray(typeParameters) : undefined;
- node.heritageClauses = createNodeArray(heritageClauses);
+ function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(228 /* ClassDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.heritageClauses = asNodeArray(heritageClauses);
node.members = createNodeArray(members);
return node;
}
ts.createClassDeclaration = createClassDeclaration;
function updateClassDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members) {
- return updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
}
ts.updateClassDeclaration = updateClassDeclaration;
- function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, location) {
- var node = createNode(235 /* ImportDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createEnumDeclaration(decorators, modifiers, name, members) {
+ var node = createSynthesizedNode(231 /* EnumDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createEnumDeclaration = createEnumDeclaration;
+ function updateEnumDeclaration(node, decorators, modifiers, name, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.members !== members
+ ? updateNode(createEnumDeclaration(decorators, modifiers, name, members), node)
+ : node;
+ }
+ ts.updateEnumDeclaration = updateEnumDeclaration;
+ function createModuleDeclaration(decorators, modifiers, name, body, flags) {
+ var node = createSynthesizedNode(232 /* ModuleDeclaration */);
+ node.flags |= flags;
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = name;
+ node.body = body;
+ return node;
+ }
+ ts.createModuleDeclaration = createModuleDeclaration;
+ function updateModuleDeclaration(node, decorators, modifiers, name, body) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.body !== body
+ ? updateNode(createModuleDeclaration(decorators, modifiers, name, body, node.flags), node)
+ : node;
+ }
+ ts.updateModuleDeclaration = updateModuleDeclaration;
+ function createModuleBlock(statements) {
+ var node = createSynthesizedNode(233 /* ModuleBlock */);
+ node.statements = createNodeArray(statements);
+ return node;
+ }
+ ts.createModuleBlock = createModuleBlock;
+ function updateModuleBlock(node, statements) {
+ return node.statements !== statements
+ ? updateNode(createModuleBlock(statements), node)
+ : node;
+ }
+ ts.updateModuleBlock = updateModuleBlock;
+ function createCaseBlock(clauses) {
+ var node = createSynthesizedNode(234 /* CaseBlock */);
+ node.clauses = createNodeArray(clauses);
+ return node;
+ }
+ ts.createCaseBlock = createCaseBlock;
+ function updateCaseBlock(node, clauses) {
+ return node.clauses !== clauses
+ ? updateNode(createCaseBlock(clauses), node)
+ : node;
+ }
+ ts.updateCaseBlock = updateCaseBlock;
+ function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
+ var node = createSynthesizedNode(236 /* ImportEqualsDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.moduleReference = moduleReference;
+ return node;
+ }
+ ts.createImportEqualsDeclaration = createImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node, decorators, modifiers, name, moduleReference) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.moduleReference !== moduleReference
+ ? updateNode(createImportEqualsDeclaration(decorators, modifiers, name, moduleReference), node)
+ : node;
+ }
+ ts.updateImportEqualsDeclaration = updateImportEqualsDeclaration;
+ function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
+ var node = createSynthesizedNode(237 /* ImportDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createImportDeclaration = createImportDeclaration;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+ : node;
}
ts.updateImportDeclaration = updateImportDeclaration;
- function createImportClause(name, namedBindings, location) {
- var node = createNode(236 /* ImportClause */, location);
+ function createImportClause(name, namedBindings) {
+ var node = createSynthesizedNode(238 /* ImportClause */);
node.name = name;
node.namedBindings = namedBindings;
return node;
}
ts.createImportClause = createImportClause;
function updateImportClause(node, name, namedBindings) {
- if (node.name !== name || node.namedBindings !== namedBindings) {
- return updateNode(createImportClause(name, namedBindings, node), node);
- }
- return node;
+ return node.name !== name
+ || node.namedBindings !== namedBindings
+ ? updateNode(createImportClause(name, namedBindings), node)
+ : node;
}
ts.updateImportClause = updateImportClause;
- function createNamespaceImport(name, location) {
- var node = createNode(237 /* NamespaceImport */, location);
+ function createNamespaceImport(name) {
+ var node = createSynthesizedNode(239 /* NamespaceImport */);
node.name = name;
return node;
}
ts.createNamespaceImport = createNamespaceImport;
function updateNamespaceImport(node, name) {
- if (node.name !== name) {
- return updateNode(createNamespaceImport(name, node), node);
- }
- return node;
+ return node.name !== name
+ ? updateNode(createNamespaceImport(name), node)
+ : node;
}
ts.updateNamespaceImport = updateNamespaceImport;
- function createNamedImports(elements, location) {
- var node = createNode(238 /* NamedImports */, location);
+ function createNamedImports(elements) {
+ var node = createSynthesizedNode(240 /* NamedImports */);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedImports = createNamedImports;
function updateNamedImports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedImports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedImports(elements), node)
+ : node;
}
ts.updateNamedImports = updateNamedImports;
- function createImportSpecifier(propertyName, name, location) {
- var node = createNode(239 /* ImportSpecifier */, location);
+ function createImportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(241 /* ImportSpecifier */);
node.propertyName = propertyName;
node.name = name;
return node;
}
ts.createImportSpecifier = createImportSpecifier;
function updateImportSpecifier(node, propertyName, name) {
- if (node.propertyName !== propertyName || node.name !== name) {
- return updateNode(createImportSpecifier(propertyName, name, node), node);
- }
- return node;
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createImportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateImportSpecifier = updateImportSpecifier;
- function createExportAssignment(decorators, modifiers, isExportEquals, expression, location) {
- var node = createNode(240 /* ExportAssignment */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
+ var node = createSynthesizedNode(242 /* ExportAssignment */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.isExportEquals = isExportEquals;
node.expression = expression;
return node;
}
ts.createExportAssignment = createExportAssignment;
function updateExportAssignment(node, decorators, modifiers, expression) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.expression !== expression) {
- return updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.expression !== expression
+ ? updateNode(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
+ : node;
}
ts.updateExportAssignment = updateExportAssignment;
- function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, location) {
- var node = createNode(241 /* ExportDeclaration */, location);
- node.decorators = decorators ? createNodeArray(decorators) : undefined;
- node.modifiers = modifiers ? createNodeArray(modifiers) : undefined;
+ function createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier) {
+ var node = createSynthesizedNode(243 /* ExportDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
node.exportClause = exportClause;
node.moduleSpecifier = moduleSpecifier;
return node;
}
ts.createExportDeclaration = createExportDeclaration;
function updateExportDeclaration(node, decorators, modifiers, exportClause, moduleSpecifier) {
- if (node.decorators !== decorators || node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier) {
- return updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier, node), node);
- }
- return node;
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.exportClause !== exportClause
+ || node.moduleSpecifier !== moduleSpecifier
+ ? updateNode(createExportDeclaration(decorators, modifiers, exportClause, moduleSpecifier), node)
+ : node;
}
ts.updateExportDeclaration = updateExportDeclaration;
- function createNamedExports(elements, location) {
- var node = createNode(242 /* NamedExports */, location);
+ function createNamedExports(elements) {
+ var node = createSynthesizedNode(244 /* NamedExports */);
node.elements = createNodeArray(elements);
return node;
}
ts.createNamedExports = createNamedExports;
function updateNamedExports(node, elements) {
- if (node.elements !== elements) {
- return updateNode(createNamedExports(elements, node), node);
- }
- return node;
+ return node.elements !== elements
+ ? updateNode(createNamedExports(elements), node)
+ : node;
}
ts.updateNamedExports = updateNamedExports;
- function createExportSpecifier(name, propertyName, location) {
- var node = createNode(243 /* ExportSpecifier */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.propertyName = typeof propertyName === "string" ? createIdentifier(propertyName) : propertyName;
+ function createExportSpecifier(propertyName, name) {
+ var node = createSynthesizedNode(245 /* ExportSpecifier */);
+ node.propertyName = asName(propertyName);
+ node.name = asName(name);
return node;
}
ts.createExportSpecifier = createExportSpecifier;
- function updateExportSpecifier(node, name, propertyName) {
- if (node.name !== name || node.propertyName !== propertyName) {
- return updateNode(createExportSpecifier(name, propertyName, node), node);
- }
- return node;
+ function updateExportSpecifier(node, propertyName, name) {
+ return node.propertyName !== propertyName
+ || node.name !== name
+ ? updateNode(createExportSpecifier(propertyName, name), node)
+ : node;
}
ts.updateExportSpecifier = updateExportSpecifier;
+ // Module references
+ function createExternalModuleReference(expression) {
+ var node = createSynthesizedNode(247 /* ExternalModuleReference */);
+ node.expression = expression;
+ return node;
+ }
+ ts.createExternalModuleReference = createExternalModuleReference;
+ function updateExternalModuleReference(node, expression) {
+ return node.expression !== expression
+ ? updateNode(createExternalModuleReference(expression), node)
+ : node;
+ }
+ ts.updateExternalModuleReference = updateExternalModuleReference;
// JSX
- function createJsxElement(openingElement, children, closingElement, location) {
- var node = createNode(246 /* JsxElement */, location);
+ function createJsxElement(openingElement, children, closingElement) {
+ var node = createSynthesizedNode(248 /* JsxElement */);
node.openingElement = openingElement;
node.children = createNodeArray(children);
node.closingElement = closingElement;
@@ -11840,96 +12494,108 @@ var ts;
}
ts.createJsxElement = createJsxElement;
function updateJsxElement(node, openingElement, children, closingElement) {
- if (node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement) {
- return updateNode(createJsxElement(openingElement, children, closingElement, node), node);
- }
- return node;
+ return node.openingElement !== openingElement
+ || node.children !== children
+ || node.closingElement !== closingElement
+ ? updateNode(createJsxElement(openingElement, children, closingElement), node)
+ : node;
}
ts.updateJsxElement = updateJsxElement;
- function createJsxSelfClosingElement(tagName, attributes, location) {
- var node = createNode(247 /* JsxSelfClosingElement */, location);
+ function createJsxSelfClosingElement(tagName, attributes) {
+ var node = createSynthesizedNode(249 /* JsxSelfClosingElement */);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxSelfClosingElement = createJsxSelfClosingElement;
function updateJsxSelfClosingElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxSelfClosingElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxSelfClosingElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxSelfClosingElement = updateJsxSelfClosingElement;
- function createJsxOpeningElement(tagName, attributes, location) {
- var node = createNode(248 /* JsxOpeningElement */, location);
+ function createJsxOpeningElement(tagName, attributes) {
+ var node = createSynthesizedNode(250 /* JsxOpeningElement */);
node.tagName = tagName;
- node.attributes = createNodeArray(attributes);
+ node.attributes = attributes;
return node;
}
ts.createJsxOpeningElement = createJsxOpeningElement;
function updateJsxOpeningElement(node, tagName, attributes) {
- if (node.tagName !== tagName || node.attributes !== attributes) {
- return updateNode(createJsxOpeningElement(tagName, attributes, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ || node.attributes !== attributes
+ ? updateNode(createJsxOpeningElement(tagName, attributes), node)
+ : node;
}
ts.updateJsxOpeningElement = updateJsxOpeningElement;
- function createJsxClosingElement(tagName, location) {
- var node = createNode(249 /* JsxClosingElement */, location);
+ function createJsxClosingElement(tagName) {
+ var node = createSynthesizedNode(251 /* JsxClosingElement */);
node.tagName = tagName;
return node;
}
ts.createJsxClosingElement = createJsxClosingElement;
function updateJsxClosingElement(node, tagName) {
- if (node.tagName !== tagName) {
- return updateNode(createJsxClosingElement(tagName, node), node);
- }
- return node;
+ return node.tagName !== tagName
+ ? updateNode(createJsxClosingElement(tagName), node)
+ : node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttribute(name, initializer, location) {
- var node = createNode(250 /* JsxAttribute */, location);
+ function createJsxAttributes(properties) {
+ var jsxAttributes = createSynthesizedNode(253 /* JsxAttributes */);
+ jsxAttributes.properties = createNodeArray(properties);
+ return jsxAttributes;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(jsxAttributes, properties) {
+ if (jsxAttributes.properties !== properties) {
+ return updateNode(createJsxAttributes(properties), jsxAttributes);
+ }
+ return jsxAttributes;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
+ function createJsxAttribute(name, initializer) {
+ var node = createSynthesizedNode(252 /* JsxAttribute */);
node.name = name;
node.initializer = initializer;
return node;
}
ts.createJsxAttribute = createJsxAttribute;
function updateJsxAttribute(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createJsxAttribute(name, initializer, node), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createJsxAttribute(name, initializer), node)
+ : node;
}
ts.updateJsxAttribute = updateJsxAttribute;
- function createJsxSpreadAttribute(expression, location) {
- var node = createNode(251 /* JsxSpreadAttribute */, location);
+ function createJsxSpreadAttribute(expression) {
+ var node = createSynthesizedNode(254 /* JsxSpreadAttribute */);
node.expression = expression;
return node;
}
ts.createJsxSpreadAttribute = createJsxSpreadAttribute;
function updateJsxSpreadAttribute(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxSpreadAttribute(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxSpreadAttribute(expression), node)
+ : node;
}
ts.updateJsxSpreadAttribute = updateJsxSpreadAttribute;
- function createJsxExpression(expression, location) {
- var node = createNode(252 /* JsxExpression */, location);
+ function createJsxExpression(dotDotDotToken, expression) {
+ var node = createSynthesizedNode(255 /* JsxExpression */);
+ node.dotDotDotToken = dotDotDotToken;
node.expression = expression;
return node;
}
ts.createJsxExpression = createJsxExpression;
function updateJsxExpression(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createJsxExpression(expression, node), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createJsxExpression(node.dotDotDotToken, expression), node)
+ : node;
}
ts.updateJsxExpression = updateJsxExpression;
// Clauses
- function createHeritageClause(token, types, location) {
- var node = createNode(255 /* HeritageClause */, location);
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(258 /* HeritageClause */);
node.token = token;
node.types = createNodeArray(types);
return node;
@@ -11937,40 +12603,40 @@ var ts;
ts.createHeritageClause = createHeritageClause;
function updateHeritageClause(node, types) {
if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types, node), node);
+ return updateNode(createHeritageClause(node.token, types), node);
}
return node;
}
ts.updateHeritageClause = updateHeritageClause;
- function createCaseClause(expression, statements, location) {
- var node = createNode(253 /* CaseClause */, location);
- node.expression = parenthesizeExpressionForList(expression);
+ function createCaseClause(expression, statements) {
+ var node = createSynthesizedNode(256 /* CaseClause */);
+ node.expression = ts.parenthesizeExpressionForList(expression);
node.statements = createNodeArray(statements);
return node;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements, node), node);
+ return updateNode(createCaseClause(expression, statements), node);
}
return node;
}
ts.updateCaseClause = updateCaseClause;
- function createDefaultClause(statements, location) {
- var node = createNode(254 /* DefaultClause */, location);
+ function createDefaultClause(statements) {
+ var node = createSynthesizedNode(257 /* DefaultClause */);
node.statements = createNodeArray(statements);
return node;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements, node), node);
+ return updateNode(createDefaultClause(statements), node);
}
return node;
}
ts.updateDefaultClause = updateDefaultClause;
- function createCatchClause(variableDeclaration, block, location) {
- var node = createNode(256 /* CatchClause */, location);
+ function createCatchClause(variableDeclaration, block) {
+ var node = createSynthesizedNode(259 /* CatchClause */);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
node.block = block;
return node;
@@ -11978,58 +12644,74 @@ var ts;
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block, node), node);
+ return updateNode(createCatchClause(variableDeclaration, block), node);
}
return node;
}
ts.updateCatchClause = updateCatchClause;
// Property assignments
- function createPropertyAssignment(name, initializer, location) {
- var node = createNode(257 /* PropertyAssignment */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
+ function createPropertyAssignment(name, initializer) {
+ var node = createSynthesizedNode(260 /* PropertyAssignment */);
+ node.name = asName(name);
node.questionToken = undefined;
- node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
return node;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer, node), node);
+ return updateNode(createPropertyAssignment(name, initializer), node);
}
return node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
- function createShorthandPropertyAssignment(name, objectAssignmentInitializer, location) {
- var node = createNode(258 /* ShorthandPropertyAssignment */, location);
- node.name = typeof name === "string" ? createIdentifier(name) : name;
- node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
+ function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
+ var node = createSynthesizedNode(261 /* ShorthandPropertyAssignment */);
+ node.name = asName(name);
+ node.objectAssignmentInitializer = objectAssignmentInitializer !== undefined ? ts.parenthesizeExpressionForList(objectAssignmentInitializer) : undefined;
return node;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
- function createSpreadAssignment(expression, location) {
- var node = createNode(259 /* SpreadAssignment */, location);
- node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined;
- return node;
- }
- ts.createSpreadAssignment = createSpreadAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer, node), node);
+ return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
}
return node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
+ function createSpreadAssignment(expression) {
+ var node = createSynthesizedNode(262 /* SpreadAssignment */);
+ node.expression = expression !== undefined ? ts.parenthesizeExpressionForList(expression) : undefined;
+ return node;
+ }
+ ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression, node), node);
+ return updateNode(createSpreadAssignment(expression), node);
}
return node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
+ // Enum
+ function createEnumMember(name, initializer) {
+ var node = createSynthesizedNode(263 /* EnumMember */);
+ node.name = asName(name);
+ node.initializer = initializer && ts.parenthesizeExpressionForList(initializer);
+ return node;
+ }
+ ts.createEnumMember = createEnumMember;
+ function updateEnumMember(node, name, initializer) {
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createEnumMember(name, initializer), node)
+ : node;
+ }
+ ts.updateEnumMember = updateEnumMember;
// Top-level nodes
function updateSourceFileNode(node, statements) {
if (node.statements !== statements) {
- var updated = createNode(261 /* SourceFile */, /*location*/ node, node.flags);
+ var updated = createSynthesizedNode(264 /* SourceFile */);
+ updated.flags |= node.flags;
updated.statements = createNodeArray(statements);
updated.endOfFileToken = node.endOfFileToken;
updated.fileName = node.fileName;
@@ -12088,6 +12770,17 @@ var ts;
return node;
}
ts.updateSourceFileNode = updateSourceFileNode;
+ /**
+ * Creates a shallow, memberwise clone of a node for mutation.
+ */
+ function getMutableClone(node) {
+ var clone = getSynthesizedClone(node);
+ clone.pos = node.pos;
+ clone.end = node.end;
+ clone.parent = node.parent;
+ return clone;
+ }
+ ts.getMutableClone = getMutableClone;
// Transformation nodes
/**
* Creates a synthetic statement to act as a placeholder for a not-emitted statement in
@@ -12096,8 +12789,9 @@ var ts;
* @param original The original statement.
*/
function createNotEmittedStatement(original) {
- var node = createNode(293 /* NotEmittedStatement */, /*location*/ original);
+ var node = createSynthesizedNode(294 /* NotEmittedStatement */);
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
@@ -12105,8 +12799,9 @@ var ts;
* Creates a synthetic element to act as a placeholder for the end of an emitted declaration in
* order to properly emit exports.
*/
+ /* @internal */
function createEndOfDeclarationMarker(original) {
- var node = createNode(296 /* EndOfDeclarationMarker */);
+ var node = createSynthesizedNode(297 /* EndOfDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12116,8 +12811,9 @@ var ts;
* Creates a synthetic element to act as a placeholder for the beginning of a merged declaration in
* order to properly emit exports.
*/
+ /* @internal */
function createMergeDeclarationMarker(original) {
- var node = createNode(295 /* MergeDeclarationMarker */);
+ var node = createSynthesizedNode(296 /* MergeDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12131,44 +12827,45 @@ var ts;
* @param original The original outer expression.
* @param location The location for the expression. Defaults to the positions from "original" if provided.
*/
- function createPartiallyEmittedExpression(expression, original, location) {
- var node = createNode(294 /* PartiallyEmittedExpression */, /*location*/ location || original);
+ function createPartiallyEmittedExpression(expression, original) {
+ var node = createSynthesizedNode(295 /* PartiallyEmittedExpression */);
node.expression = expression;
node.original = original;
+ setTextRange(node, original);
return node;
}
ts.createPartiallyEmittedExpression = createPartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node, expression) {
if (node.expression !== expression) {
- return updateNode(createPartiallyEmittedExpression(expression, node.original, node), node);
+ return updateNode(createPartiallyEmittedExpression(expression, node.original), node);
}
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
- /**
- * Creates a node that emits a string of raw text in an expression position. Raw text is never
- * transformed, should be ES3 compliant, and should have the same precedence as
- * PrimaryExpression.
- *
- * @param text The raw text of the node.
- */
- function createRawExpression(text) {
- var node = createNode(297 /* RawExpression */);
- node.text = text;
+ function createBundle(sourceFiles) {
+ var node = ts.createNode(265 /* Bundle */);
+ node.sourceFiles = sourceFiles;
+ return node;
+ }
+ ts.createBundle = createBundle;
+ function updateBundle(node, sourceFiles) {
+ if (node.sourceFiles !== sourceFiles) {
+ return createBundle(sourceFiles);
+ }
return node;
}
- ts.createRawExpression = createRawExpression;
+ ts.updateBundle = updateBundle;
// Compound nodes
function createComma(left, right) {
return createBinary(left, 25 /* CommaToken */, right);
}
ts.createComma = createComma;
- function createLessThan(left, right, location) {
- return createBinary(left, 26 /* LessThanToken */, right, location);
+ function createLessThan(left, right) {
+ return createBinary(left, 26 /* LessThanToken */, right);
}
ts.createLessThan = createLessThan;
- function createAssignment(left, right, location) {
- return createBinary(left, 57 /* EqualsToken */, right, location);
+ function createAssignment(left, right) {
+ return createBinary(left, 57 /* EqualsToken */, right);
}
ts.createAssignment = createAssignment;
function createStrictEquality(left, right) {
@@ -12187,8 +12884,8 @@ var ts;
return createBinary(left, 37 /* MinusToken */, right);
}
ts.createSubtract = createSubtract;
- function createPostfixIncrement(operand, location) {
- return createPostfix(operand, 42 /* PlusPlusToken */, location);
+ function createPostfixIncrement(operand) {
+ return createPostfix(operand, 42 /* PlusPlusToken */);
}
ts.createPostfixIncrement = createPostfixIncrement;
function createLogicalAnd(left, right) {
@@ -12207,61 +12904,378 @@ var ts;
return createVoid(createLiteral(0));
}
ts.createVoidZero = createVoidZero;
+ function createExportDefault(expression) {
+ return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression);
+ }
+ ts.createExportDefault = createExportDefault;
+ function createExternalModuleExport(exportName) {
+ return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(/*propertyName*/ undefined, exportName)]));
+ }
+ ts.createExternalModuleExport = createExternalModuleExport;
+ function asName(name) {
+ return typeof name === "string" ? createIdentifier(name) : name;
+ }
+ function asExpression(value) {
+ return typeof value === "string" || typeof value === "number" ? createLiteral(value) : value;
+ }
+ function asNodeArray(array) {
+ return array ? createNodeArray(array) : undefined;
+ }
+ function asToken(value) {
+ return typeof value === "number" ? createToken(value) : value;
+ }
+ /**
+ * Clears any EmitNode entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile) {
+ // During transformation we may need to annotate a parse tree node with transient
+ // transformation properties. As parse tree nodes live longer than transformation
+ // nodes, we need to make sure we reclaim any memory allocated for custom ranges
+ // from these nodes to ensure we do not hold onto entire subtrees just for position
+ // information. We also need to reset these nodes to a pre-transformation state
+ // for incremental parsing scenarios so that we do not impact later emit.
+ sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
+ var emitNode = sourceFile && sourceFile.emitNode;
+ var annotatedNodes = emitNode && emitNode.annotatedNodes;
+ if (annotatedNodes) {
+ for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
+ var node = annotatedNodes_1[_i];
+ node.emitNode = undefined;
+ }
+ }
+ }
+ ts.disposeEmitNodes = disposeEmitNodes;
+ /**
+ * Associates a node with the current transformation, initializing
+ * various transient transformation properties.
+ */
+ /* @internal */
+ function getOrCreateEmitNode(node) {
+ if (!node.emitNode) {
+ if (ts.isParseTreeNode(node)) {
+ // To avoid holding onto transformation artifacts, we keep track of any
+ // parse tree node we are annotating. This allows us to clean them up after
+ // all transformations have completed.
+ if (node.kind === 264 /* SourceFile */) {
+ return node.emitNode = { annotatedNodes: [node] };
+ }
+ var sourceFile = ts.getSourceFileOfNode(node);
+ getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
+ }
+ node.emitNode = {};
+ }
+ return node.emitNode;
+ }
+ ts.getOrCreateEmitNode = getOrCreateEmitNode;
+ function setTextRange(range, location) {
+ if (location) {
+ range.pos = location.pos;
+ range.end = location.end;
+ }
+ return range;
+ }
+ ts.setTextRange = setTextRange;
+ /**
+ * Gets flags that control emit behavior of a node.
+ */
+ function getEmitFlags(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.flags;
+ }
+ ts.getEmitFlags = getEmitFlags;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags(node, emitFlags) {
+ getOrCreateEmitNode(node).flags = emitFlags;
+ return node;
+ }
+ ts.setEmitFlags = setEmitFlags;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.sourceMapRange) || node;
+ }
+ ts.getSourceMapRange = getSourceMapRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange(node, range) {
+ getOrCreateEmitNode(node).sourceMapRange = range;
+ return node;
+ }
+ ts.setSourceMapRange = setSourceMapRange;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node, token) {
+ var emitNode = node.emitNode;
+ var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
+ return tokenSourceMapRanges && tokenSourceMapRanges[token];
+ }
+ ts.getTokenSourceMapRange = getTokenSourceMapRange;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange(node, token, range) {
+ var emitNode = getOrCreateEmitNode(node);
+ var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = []);
+ tokenSourceMapRanges[token] = range;
+ return node;
+ }
+ ts.setTokenSourceMapRange = setTokenSourceMapRange;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node) {
+ var emitNode = node.emitNode;
+ return (emitNode && emitNode.commentRange) || node;
+ }
+ ts.getCommentRange = getCommentRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange(node, range) {
+ getOrCreateEmitNode(node).commentRange = range;
+ return node;
+ }
+ ts.setCommentRange = setCommentRange;
+ function getSyntheticLeadingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.leadingComments;
+ }
+ ts.getSyntheticLeadingComments = getSyntheticLeadingComments;
+ function setSyntheticLeadingComments(node, comments) {
+ getOrCreateEmitNode(node).leadingComments = comments;
+ return node;
+ }
+ ts.setSyntheticLeadingComments = setSyntheticLeadingComments;
+ function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticLeadingComments(node, ts.append(getSyntheticLeadingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticLeadingComment = addSyntheticLeadingComment;
+ function getSyntheticTrailingComments(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.trailingComments;
+ }
+ ts.getSyntheticTrailingComments = getSyntheticTrailingComments;
+ function setSyntheticTrailingComments(node, comments) {
+ getOrCreateEmitNode(node).trailingComments = comments;
+ return node;
+ }
+ ts.setSyntheticTrailingComments = setSyntheticTrailingComments;
+ function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {
+ return setSyntheticTrailingComments(node, ts.append(getSyntheticTrailingComments(node), { kind: kind, pos: -1, end: -1, hasTrailingNewLine: hasTrailingNewLine, text: text }));
+ }
+ ts.addSyntheticTrailingComment = addSyntheticTrailingComment;
+ /**
+ * Gets the constant value to emit for an expression.
+ */
+ function getConstantValue(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.constantValue;
+ }
+ ts.getConstantValue = getConstantValue;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node, value) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.constantValue = value;
+ return node;
+ }
+ ts.setConstantValue = setConstantValue;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper(node, helper) {
+ var emitNode = getOrCreateEmitNode(node);
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ return node;
+ }
+ ts.addEmitHelper = addEmitHelper;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers(node, helpers) {
+ if (ts.some(helpers)) {
+ var emitNode = getOrCreateEmitNode(node);
+ for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
+ var helper = helpers_1[_i];
+ if (!ts.contains(emitNode.helpers, helper)) {
+ emitNode.helpers = ts.append(emitNode.helpers, helper);
+ }
+ }
+ }
+ return node;
+ }
+ ts.addEmitHelpers = addEmitHelpers;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node, helper) {
+ var emitNode = node.emitNode;
+ if (emitNode) {
+ var helpers = emitNode.helpers;
+ if (helpers) {
+ return ts.orderedRemoveItem(helpers, helper);
+ }
+ }
+ return false;
+ }
+ ts.removeEmitHelper = removeEmitHelper;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node) {
+ var emitNode = node.emitNode;
+ return emitNode && emitNode.helpers;
+ }
+ ts.getEmitHelpers = getEmitHelpers;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source, target, predicate) {
+ var sourceEmitNode = source.emitNode;
+ var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
+ if (!ts.some(sourceEmitHelpers))
+ return;
+ var targetEmitNode = getOrCreateEmitNode(target);
+ var helpersRemoved = 0;
+ for (var i = 0; i < sourceEmitHelpers.length; i++) {
+ var helper = sourceEmitHelpers[i];
+ if (predicate(helper)) {
+ helpersRemoved++;
+ if (!ts.contains(targetEmitNode.helpers, helper)) {
+ targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
+ }
+ }
+ else if (helpersRemoved > 0) {
+ sourceEmitHelpers[i - helpersRemoved] = helper;
+ }
+ }
+ if (helpersRemoved > 0) {
+ sourceEmitHelpers.length -= helpersRemoved;
+ }
+ }
+ ts.moveEmitHelpers = moveEmitHelpers;
+ /* @internal */
+ function compareEmitHelpers(x, y) {
+ if (x === y)
+ return 0 /* EqualTo */;
+ if (x.priority === y.priority)
+ return 0 /* EqualTo */;
+ if (x.priority === undefined)
+ return 1 /* GreaterThan */;
+ if (y.priority === undefined)
+ return -1 /* LessThan */;
+ return ts.compareValues(x.priority, y.priority);
+ }
+ ts.compareEmitHelpers = compareEmitHelpers;
+ function setOriginalNode(node, original) {
+ node.original = original;
+ if (original) {
+ var emitNode = original.emitNode;
+ if (emitNode)
+ node.emitNode = mergeEmitNode(emitNode, node.emitNode);
+ }
+ return node;
+ }
+ ts.setOriginalNode = setOriginalNode;
+ function mergeEmitNode(sourceEmitNode, destEmitNode) {
+ var flags = sourceEmitNode.flags, leadingComments = sourceEmitNode.leadingComments, trailingComments = sourceEmitNode.trailingComments, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
+ if (!destEmitNode)
+ destEmitNode = {};
+ if (leadingComments)
+ destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
+ if (trailingComments)
+ destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
+ if (flags)
+ destEmitNode.flags = flags;
+ if (commentRange)
+ destEmitNode.commentRange = commentRange;
+ if (sourceMapRange)
+ destEmitNode.sourceMapRange = sourceMapRange;
+ if (tokenSourceMapRanges)
+ destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
+ if (constantValue !== undefined)
+ destEmitNode.constantValue = constantValue;
+ if (helpers)
+ destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
+ return destEmitNode;
+ }
+ function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
+ if (!destRanges)
+ destRanges = [];
+ for (var key in sourceRanges) {
+ destRanges[key] = sourceRanges[key];
+ }
+ return destRanges;
+ }
+})(ts || (ts = {}));
+/* @internal */
+(function (ts) {
+ // Compound nodes
function createTypeCheck(value, tag) {
return tag === "undefined"
- ? createStrictEquality(value, createVoidZero())
- : createStrictEquality(createTypeOf(value), createLiteral(tag));
+ ? ts.createStrictEquality(value, ts.createVoidZero())
+ : ts.createStrictEquality(ts.createTypeOf(value), ts.createLiteral(tag));
}
ts.createTypeCheck = createTypeCheck;
function createMemberAccessForPropertyName(target, memberName, location) {
if (ts.isComputedPropertyName(memberName)) {
- return createElementAccess(target, memberName.expression, location);
+ return ts.setTextRange(ts.createElementAccess(target, memberName.expression), location);
}
else {
- var expression = ts.isIdentifier(memberName) ? createPropertyAccess(target, memberName, location) : createElementAccess(target, memberName, location);
- (expression.emitNode || (expression.emitNode = {})).flags |= 64 /* NoNestedSourceMaps */;
+ var expression = ts.setTextRange(ts.isIdentifier(memberName)
+ ? ts.createPropertyAccess(target, memberName)
+ : ts.createElementAccess(target, memberName), memberName);
+ ts.getOrCreateEmitNode(expression).flags |= 64 /* NoNestedSourceMaps */;
return expression;
}
}
ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName;
function createFunctionCall(func, thisArg, argumentsList, location) {
- return createCall(createPropertyAccess(func, "call"),
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"),
/*typeArguments*/ undefined, [
thisArg
- ].concat(argumentsList), location);
+ ].concat(argumentsList)), location);
}
ts.createFunctionCall = createFunctionCall;
function createFunctionApply(func, thisArg, argumentsExpression, location) {
- return createCall(createPropertyAccess(func, "apply"),
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "apply"),
/*typeArguments*/ undefined, [
thisArg,
argumentsExpression
- ], location);
+ ]), location);
}
ts.createFunctionApply = createFunctionApply;
function createArraySlice(array, start) {
var argumentsList = [];
if (start !== undefined) {
- argumentsList.push(typeof start === "number" ? createLiteral(start) : start);
+ argumentsList.push(typeof start === "number" ? ts.createLiteral(start) : start);
}
- return createCall(createPropertyAccess(array, "slice"), /*typeArguments*/ undefined, argumentsList);
+ return ts.createCall(ts.createPropertyAccess(array, "slice"), /*typeArguments*/ undefined, argumentsList);
}
ts.createArraySlice = createArraySlice;
function createArrayConcat(array, values) {
- return createCall(createPropertyAccess(array, "concat"),
+ return ts.createCall(ts.createPropertyAccess(array, "concat"),
/*typeArguments*/ undefined, values);
}
ts.createArrayConcat = createArrayConcat;
function createMathPow(left, right, location) {
- return createCall(createPropertyAccess(createIdentifier("Math"), "pow"),
- /*typeArguments*/ undefined, [left, right], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Math"), "pow"),
+ /*typeArguments*/ undefined, [left, right]), location);
}
ts.createMathPow = createMathPow;
function createReactNamespace(reactNamespace, parent) {
// To ensure the emit resolver can properly resolve the namespace, we need to
// treat this identifier as if it were a source tree node by clearing the `Synthesized`
// flag and setting a parent node.
- var react = createIdentifier(reactNamespace || "React");
+ var react = ts.createIdentifier(reactNamespace || "React");
react.flags &= ~8 /* Synthesized */;
// Set the parent that is in parse tree
// this makes sure that parent chain is intact for checker to traverse complete scope tree
@@ -12271,9 +13285,9 @@ var ts;
function createJsxFactoryExpressionFromEntityName(jsxFactory, parent) {
if (ts.isQualifiedName(jsxFactory)) {
var left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
- var right = createSynthesizedNode(70 /* Identifier */);
+ var right = ts.createIdentifier(jsxFactory.right.text);
right.text = jsxFactory.right.text;
- return createPropertyAccess(left, right);
+ return ts.createPropertyAccess(left, right);
}
else {
return createReactNamespace(jsxFactory.text, parent);
@@ -12282,7 +13296,7 @@ var ts;
function createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parent) {
return jsxFactoryEntity ?
createJsxFactoryExpressionFromEntityName(jsxFactoryEntity, parent) :
- createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
+ ts.createPropertyAccess(createReactNamespace(reactNamespace, parent), "createElement");
}
function createExpressionForJsxElement(jsxFactoryEntity, reactNamespace, tagName, props, children, parentElement, location) {
var argumentsList = [tagName];
@@ -12291,7 +13305,7 @@ var ts;
}
if (children && children.length > 0) {
if (!props) {
- argumentsList.push(createNull());
+ argumentsList.push(ts.createNull());
}
if (children.length > 1) {
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
@@ -12304,35 +13318,89 @@ var ts;
argumentsList.push(children[0]);
}
}
- return createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement),
- /*typeArguments*/ undefined, argumentsList, location);
+ return ts.setTextRange(ts.createCall(createJsxFactoryExpression(jsxFactoryEntity, reactNamespace, parentElement),
+ /*typeArguments*/ undefined, argumentsList), location);
}
ts.createExpressionForJsxElement = createExpressionForJsxElement;
- function createExportDefault(expression) {
- return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression);
- }
- ts.createExportDefault = createExportDefault;
- function createExternalModuleExport(exportName) {
- return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(exportName)]));
- }
- ts.createExternalModuleExport = createExternalModuleExport;
- function createLetStatement(name, initializer, location) {
- return createVariableStatement(/*modifiers*/ undefined, createLetDeclarationList([createVariableDeclaration(name, /*type*/ undefined, initializer)]), location);
- }
- ts.createLetStatement = createLetStatement;
- function createLetDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 1 /* Let */);
- }
- ts.createLetDeclarationList = createLetDeclarationList;
- function createConstDeclarationList(declarations, location) {
- return createVariableDeclarationList(declarations, location, 2 /* Const */);
- }
- ts.createConstDeclarationList = createConstDeclarationList;
// Helpers
function getHelperName(name) {
- return setEmitFlags(createIdentifier(name), 4096 /* HelperName */ | 2 /* AdviseOnEmitNode */);
+ return ts.setEmitFlags(ts.createIdentifier(name), 4096 /* HelperName */ | 2 /* AdviseOnEmitNode */);
}
ts.getHelperName = getHelperName;
+ var valuesHelper = {
+ name: "typescript:values",
+ scoped: false,
+ text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };\n "
+ };
+ function createValuesHelper(context, expression, location) {
+ context.requestEmitHelper(valuesHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__values"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
+ ts.createValuesHelper = createValuesHelper;
+ var readHelper = {
+ name: "typescript:read",
+ scoped: false,
+ text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };\n "
+ };
+ function createReadHelper(context, iteratorRecord, count, location) {
+ context.requestEmitHelper(readHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__read"),
+ /*typeArguments*/ undefined, count !== undefined
+ ? [iteratorRecord, ts.createLiteral(count)]
+ : [iteratorRecord]), location);
+ }
+ ts.createReadHelper = createReadHelper;
+ var spreadHelper = {
+ name: "typescript:spread",
+ scoped: false,
+ text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"
+ };
+ function createSpreadHelper(context, argumentList, location) {
+ context.requestEmitHelper(readHelper);
+ context.requestEmitHelper(spreadHelper);
+ return ts.setTextRange(ts.createCall(getHelperName("__spread"),
+ /*typeArguments*/ undefined, argumentList), location);
+ }
+ ts.createSpreadHelper = createSpreadHelper;
+ // Utilities
+ function createForOfBindingStatement(node, boundValue) {
+ if (ts.isVariableDeclarationList(node)) {
+ var firstDeclaration = ts.firstOrUndefined(node.declarations);
+ var updatedDeclaration = ts.updateVariableDeclaration(firstDeclaration, firstDeclaration.name,
+ /*typeNode*/ undefined, boundValue);
+ return ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.updateVariableDeclarationList(node, [updatedDeclaration])),
+ /*location*/ node);
+ }
+ else {
+ var updatedExpression = ts.setTextRange(ts.createAssignment(node, boundValue), /*location*/ node);
+ return ts.setTextRange(ts.createStatement(updatedExpression), /*location*/ node);
+ }
+ }
+ ts.createForOfBindingStatement = createForOfBindingStatement;
+ function insertLeadingStatement(dest, source) {
+ if (ts.isBlock(dest)) {
+ return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements));
+ }
+ else {
+ return ts.createBlock(ts.createNodeArray([dest, source]), /*multiLine*/ true);
+ }
+ }
+ ts.insertLeadingStatement = insertLeadingStatement;
+ function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {
+ if (!outermostLabeledStatement) {
+ return node;
+ }
+ var updated = ts.updateLabel(outermostLabeledStatement, outermostLabeledStatement.label, outermostLabeledStatement.statement.kind === 221 /* LabeledStatement */
+ ? restoreEnclosingLabel(node, outermostLabeledStatement.statement)
+ : node);
+ if (afterRestoreLabelCallback) {
+ afterRestoreLabelCallback(outermostLabeledStatement);
+ }
+ return updated;
+ }
+ ts.restoreEnclosingLabel = restoreEnclosingLabel;
function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
var target = skipParentheses(node);
switch (target.kind) {
@@ -12342,13 +13410,13 @@ var ts;
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
return false;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
var elements = target.elements;
if (elements.length === 0) {
return false;
}
return true;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return target.properties.length > 0;
default:
return true;
@@ -12359,22 +13427,27 @@ var ts;
var thisArg;
var target;
if (ts.isSuperProperty(callee)) {
- thisArg = createThis();
+ thisArg = ts.createThis();
target = callee;
}
else if (callee.kind === 96 /* SuperKeyword */) {
- thisArg = createThis();
- target = languageVersion < 2 /* ES2015 */ ? createIdentifier("_super", /*location*/ callee) : callee;
+ thisArg = ts.createThis();
+ target = languageVersion < 2 /* ES2015 */
+ ? ts.setTextRange(ts.createIdentifier("_super"), callee)
+ : callee;
+ }
+ else if (ts.getEmitFlags(callee) & 4096 /* HelperName */) {
+ thisArg = ts.createVoidZero();
+ target = parenthesizeForAccess(callee);
}
else {
switch (callee.kind) {
- case 177 /* PropertyAccessExpression */: {
+ case 178 /* PropertyAccessExpression */: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
// for `a.b()` target is `(_a = a).b` and thisArg is `_a`
- thisArg = createTempVariable(recordTempVariable);
- target = createPropertyAccess(createAssignment(thisArg, callee.expression,
- /*location*/ callee.expression), callee.name,
- /*location*/ callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.name);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12382,13 +13455,12 @@ var ts;
}
break;
}
- case 178 /* ElementAccessExpression */: {
+ case 179 /* ElementAccessExpression */: {
if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {
// for `a[b]()` target is `(_a = a)[b]` and thisArg is `_a`
- thisArg = createTempVariable(recordTempVariable);
- target = createElementAccess(createAssignment(thisArg, callee.expression,
- /*location*/ callee.expression), callee.argumentExpression,
- /*location*/ callee);
+ thisArg = ts.createTempVariable(recordTempVariable);
+ target = ts.createElementAccess(ts.setTextRange(ts.createAssignment(thisArg, callee.expression), callee.expression), callee.argumentExpression);
+ ts.setTextRange(target, callee);
}
else {
thisArg = callee.expression;
@@ -12398,7 +13470,7 @@ var ts;
}
default: {
// for `a()` target is `a` and thisArg is `void 0`
- thisArg = createVoidZero();
+ thisArg = ts.createVoidZero();
target = parenthesizeForAccess(expression);
break;
}
@@ -12408,42 +13480,42 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, createComma);
+ return ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
if (ts.isQualifiedName(node)) {
var left = createExpressionFromEntityName(node.left);
- var right = getMutableClone(node.right);
- return createPropertyAccess(left, right, /*location*/ node);
+ var right = ts.getMutableClone(node.right);
+ return ts.setTextRange(ts.createPropertyAccess(left, right), node);
}
else {
- return getMutableClone(node);
+ return ts.getMutableClone(node);
}
}
ts.createExpressionFromEntityName = createExpressionFromEntityName;
function createExpressionForPropertyName(memberName) {
if (ts.isIdentifier(memberName)) {
- return createLiteral(memberName, /*location*/ undefined);
+ return ts.createLiteral(memberName);
}
else if (ts.isComputedPropertyName(memberName)) {
- return getMutableClone(memberName.expression);
+ return ts.getMutableClone(memberName.expression);
}
else {
- return getMutableClone(memberName);
+ return ts.getMutableClone(memberName);
}
}
ts.createExpressionForPropertyName = createExpressionForPropertyName;
function createExpressionForObjectLiteralElementLike(node, property, receiver) {
switch (property.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return createExpressionForAccessorDeclaration(node.properties, property, receiver, node.multiLine);
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return createExpressionForPropertyAssignment(property, receiver);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return createExpressionForShorthandPropertyAssignment(property, receiver);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return createExpressionForMethodDeclaration(property, receiver);
}
}
@@ -12453,57 +13525,55 @@ var ts;
if (property === firstAccessor) {
var properties_1 = [];
if (getAccessor) {
- var getterFunction = createFunctionExpression(getAccessor.modifiers,
+ var getterFunction = ts.createFunctionExpression(getAccessor.modifiers,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, getAccessor.parameters,
- /*type*/ undefined, getAccessor.body,
- /*location*/ getAccessor);
- setOriginalNode(getterFunction, getAccessor);
- var getter = createPropertyAssignment("get", getterFunction);
+ /*type*/ undefined, getAccessor.body);
+ ts.setTextRange(getterFunction, getAccessor);
+ ts.setOriginalNode(getterFunction, getAccessor);
+ var getter = ts.createPropertyAssignment("get", getterFunction);
properties_1.push(getter);
}
if (setAccessor) {
- var setterFunction = createFunctionExpression(setAccessor.modifiers,
+ var setterFunction = ts.createFunctionExpression(setAccessor.modifiers,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, setAccessor.parameters,
- /*type*/ undefined, setAccessor.body,
- /*location*/ setAccessor);
- setOriginalNode(setterFunction, setAccessor);
- var setter = createPropertyAssignment("set", setterFunction);
+ /*type*/ undefined, setAccessor.body);
+ ts.setTextRange(setterFunction, setAccessor);
+ ts.setOriginalNode(setterFunction, setAccessor);
+ var setter = ts.createPropertyAssignment("set", setterFunction);
properties_1.push(setter);
}
- properties_1.push(createPropertyAssignment("enumerable", createLiteral(true)));
- properties_1.push(createPropertyAssignment("configurable", createLiteral(true)));
- var expression = createCall(createPropertyAccess(createIdentifier("Object"), "defineProperty"),
+ properties_1.push(ts.createPropertyAssignment("enumerable", ts.createTrue()));
+ properties_1.push(ts.createPropertyAssignment("configurable", ts.createTrue()));
+ var expression = ts.setTextRange(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
receiver,
createExpressionForPropertyName(property.name),
- createObjectLiteral(properties_1, /*location*/ undefined, multiLine)
- ],
+ ts.createObjectLiteral(properties_1, multiLine)
+ ]),
/*location*/ firstAccessor);
return ts.aggregateTransformFlags(expression);
}
return undefined;
}
function createExpressionForPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), property.initializer,
- /*location*/ property),
- /*original*/ property));
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), property.initializer), property), property));
}
function createExpressionForShorthandPropertyAssignment(property, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), getSynthesizedClone(property.name),
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, property.name, /*location*/ property.name), ts.getSynthesizedClone(property.name)),
/*location*/ property),
/*original*/ property));
}
function createExpressionForMethodDeclaration(method, receiver) {
- return ts.aggregateTransformFlags(setOriginalNode(createAssignment(createMemberAccessForPropertyName(receiver, method.name, /*location*/ method.name), setOriginalNode(createFunctionExpression(method.modifiers, method.asteriskToken,
+ return ts.aggregateTransformFlags(ts.setOriginalNode(ts.setTextRange(ts.createAssignment(createMemberAccessForPropertyName(receiver, method.name, /*location*/ method.name), ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(method.modifiers, method.asteriskToken,
/*name*/ undefined,
/*typeParameters*/ undefined, method.parameters,
- /*type*/ undefined, method.body,
+ /*type*/ undefined, method.body),
/*location*/ method),
- /*original*/ method),
+ /*original*/ method)),
/*location*/ method),
/*original*/ method));
}
@@ -12525,7 +13595,7 @@ var ts;
* Gets whether an identifier should only be referred to by its local name.
*/
function isLocalName(node) {
- return (getEmitFlags(node) & 16384 /* LocalName */) !== 0;
+ return (ts.getEmitFlags(node) & 16384 /* LocalName */) !== 0;
}
ts.isLocalName = isLocalName;
/**
@@ -12547,7 +13617,7 @@ var ts;
* name points to an exported symbol.
*/
function isExportName(node) {
- return (getEmitFlags(node) & 8192 /* ExportName */) !== 0;
+ return (ts.getEmitFlags(node) & 8192 /* ExportName */) !== 0;
}
ts.isExportName = isExportName;
/**
@@ -12563,17 +13633,17 @@ var ts;
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name_8 = getMutableClone(node.name);
- emitFlags |= getEmitFlags(node.name);
+ var name = ts.getMutableClone(node.name);
+ emitFlags |= ts.getEmitFlags(node.name);
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
emitFlags |= 1536 /* NoComments */;
if (emitFlags)
- setEmitFlags(name_8, emitFlags);
- return name_8;
+ ts.setEmitFlags(name, emitFlags);
+ return name;
}
- return getGeneratedNameForNode(node);
+ return ts.getGeneratedNameForNode(node);
}
/**
* Gets the exported name of a declaration for use in expressions.
@@ -12602,19 +13672,20 @@ var ts;
* @param allowSourceMaps A value indicating whether source maps may be emitted for the name.
*/
function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {
- var qualifiedName = createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : getSynthesizedClone(name), /*location*/ name);
+ var qualifiedName = ts.createPropertyAccess(ns, ts.nodeIsSynthesized(name) ? name : ts.getSynthesizedClone(name));
+ ts.setTextRange(qualifiedName, name);
var emitFlags;
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
emitFlags |= 1536 /* NoComments */;
if (emitFlags)
- setEmitFlags(qualifiedName, emitFlags);
+ ts.setEmitFlags(qualifiedName, emitFlags);
return qualifiedName;
}
ts.getNamespaceMemberName = getNamespaceMemberName;
function convertToFunctionBody(node, multiLine) {
- return ts.isBlock(node) ? node : createBlock([createReturn(node, /*location*/ node)], /*location*/ node, multiLine);
+ return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
function isUseStrictPrologue(node) {
@@ -12631,7 +13702,18 @@ var ts;
* @param ensureUseStrict: boolean determining whether the function need to add prologue-directives
* @param visitor: Optional callback used to visit any custom prologue directives.
*/
- function addPrologueDirectives(target, source, ensureUseStrict, visitor) {
+ function addPrologue(target, source, ensureUseStrict, visitor) {
+ var offset = addStandardPrologue(target, source, ensureUseStrict);
+ return addCustomPrologue(target, source, offset, visitor);
+ }
+ ts.addPrologue = addPrologue;
+ /**
+ * Add just the standard (string-expression) prologue-directives into target statement-array.
+ * The function needs to be called during each transformation step.
+ * This function needs to be called whenever we transform the statement
+ * list of a source file, namespace, or function-like body.
+ */
+ function addStandardPrologue(target, source, ensureUseStrict) {
ts.Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array");
var foundUseStrict = false;
var statementOffset = 0;
@@ -12650,11 +13732,22 @@ var ts;
statementOffset++;
}
if (ensureUseStrict && !foundUseStrict) {
- target.push(startOnNewLine(createStatement(createLiteral("use strict"))));
+ target.push(startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))));
}
+ return statementOffset;
+ }
+ ts.addStandardPrologue = addStandardPrologue;
+ /**
+ * Add just the custom prologue-directives into target statement-array.
+ * The function needs to be called during each transformation step.
+ * This function needs to be called whenever we transform the statement
+ * list of a source file, namespace, or function-like body.
+ */
+ function addCustomPrologue(target, source, statementOffset, visitor) {
+ var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (getEmitFlags(statement) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(statement) & 524288 /* CustomPrologue */) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -12664,7 +13757,7 @@ var ts;
}
return statementOffset;
}
- ts.addPrologueDirectives = addPrologueDirectives;
+ ts.addCustomPrologue = addCustomPrologue;
function startsWithUseStrict(statements) {
var firstStatement = ts.firstOrUndefined(statements);
return firstStatement !== undefined
@@ -12692,13 +13785,23 @@ var ts;
}
}
if (!foundUseStrict) {
- return createNodeArray([
- startOnNewLine(createStatement(createLiteral("use strict")))
- ].concat(statements), statements);
+ return ts.setTextRange(ts.createNodeArray([
+ startOnNewLine(ts.createStatement(ts.createLiteral("use strict")))
+ ].concat(statements)), statements);
}
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
+ function parenthesizeConditionalHead(condition) {
+ var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */);
+ var emittedCondition = skipPartiallyEmittedExpressions(condition);
+ var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
+ if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) {
+ return ts.createParen(condition);
+ }
+ return condition;
+ }
+ ts.parenthesizeConditionalHead = parenthesizeConditionalHead;
/**
* Wraps the operand to a BinaryExpression in parentheses if they are needed to preserve the intended
* order of operations.
@@ -12711,11 +13814,11 @@ var ts;
function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
var skipped = skipPartiallyEmittedExpressions(operand);
// If the resulting expression is already parenthesized, we do not need to do any further processing.
- if (skipped.kind === 183 /* ParenthesizedExpression */) {
+ if (skipped.kind === 184 /* ParenthesizedExpression */) {
return operand;
}
return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
- ? createParen(operand)
+ ? ts.createParen(operand)
: operand;
}
ts.parenthesizeBinaryOperand = parenthesizeBinaryOperand;
@@ -12745,8 +13848,8 @@ var ts;
//
// If `a ** d` is on the left of operator `**`, we need to parenthesize to preserve
// the intended order of operations: `(a ** b) ** c`
- var binaryOperatorPrecedence = ts.getOperatorPrecedence(192 /* BinaryExpression */, binaryOperator);
- var binaryOperatorAssociativity = ts.getOperatorAssociativity(192 /* BinaryExpression */, binaryOperator);
+ var binaryOperatorPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, binaryOperator);
+ var binaryOperatorAssociativity = ts.getOperatorAssociativity(193 /* BinaryExpression */, binaryOperator);
var emittedOperand = skipPartiallyEmittedExpressions(operand);
var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
switch (ts.compareValues(operandPrecedence, binaryOperatorPrecedence)) {
@@ -12755,7 +13858,7 @@ var ts;
// and is a yield expression, then we do not need parentheses.
if (!isLeftSideOfBinary
&& binaryOperatorAssociativity === 1 /* Right */
- && operand.kind === 195 /* YieldExpression */) {
+ && operand.kind === 196 /* YieldExpression */) {
return false;
}
return true;
@@ -12843,7 +13946,7 @@ var ts;
if (ts.isLiteralKind(node.kind)) {
return node.kind;
}
- if (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) {
+ if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 36 /* PlusToken */) {
if (node.cachedLiteralKind !== undefined) {
return node.cachedLiteralKind;
}
@@ -12858,11 +13961,11 @@ var ts;
return 0 /* Unknown */;
}
function parenthesizeForConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(193 /* ConditionalExpression */, 54 /* QuestionToken */);
+ var conditionalPrecedence = ts.getOperatorPrecedence(194 /* ConditionalExpression */, 54 /* QuestionToken */);
var emittedCondition = skipPartiallyEmittedExpressions(condition);
var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) {
- return createParen(condition);
+ return ts.createParen(condition);
}
return condition;
}
@@ -12871,10 +13974,11 @@ var ts;
// per ES grammar both 'whenTrue' and 'whenFalse' parts of conditional expression are assignment expressions
// so in case when comma expression is introduced as a part of previous transformations
// if should be wrapped in parens since comma operator has the lowest precedence
- return e.kind === 192 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */
- ? createParen(e)
+ return e.kind === 193 /* BinaryExpression */ && e.operatorToken.kind === 25 /* CommaToken */
+ ? ts.createParen(e)
: e;
}
+ ts.parenthesizeSubexpressionOfConditionalExpression = parenthesizeSubexpressionOfConditionalExpression;
/**
* Wraps an expression in parentheses if it is needed in order to use the expression
* as the expression of a NewExpression node.
@@ -12884,12 +13988,12 @@ var ts;
function parenthesizeForNew(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
switch (emittedExpression.kind) {
- case 179 /* CallExpression */:
- return createParen(expression);
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ return ts.createParen(expression);
+ case 181 /* NewExpression */:
return emittedExpression.arguments
? expression
- : createParen(expression);
+ : ts.createParen(expression);
}
return parenthesizeForAccess(expression);
}
@@ -12902,32 +14006,29 @@ var ts;
*/
function parenthesizeForAccess(expression) {
// isLeftHandSideExpression is almost the correct criterion for when it is not necessary
- // to parenthesize the expression before a dot. The known exceptions are:
+ // to parenthesize the expression before a dot. The known exception is:
//
// NewExpression:
// new C.x -> not the same as (new C).x
- // NumericLiteral
- // 1.x -> not the same as (1).x
//
var emittedExpression = skipPartiallyEmittedExpressions(expression);
if (ts.isLeftHandSideExpression(emittedExpression)
- && (emittedExpression.kind !== 180 /* NewExpression */ || emittedExpression.arguments)
- && emittedExpression.kind !== 8 /* NumericLiteral */) {
+ && (emittedExpression.kind !== 181 /* NewExpression */ || emittedExpression.arguments)) {
return expression;
}
- return createParen(expression, /*location*/ expression);
+ return ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeForAccess = parenthesizeForAccess;
function parenthesizePostfixOperand(operand) {
return ts.isLeftHandSideExpression(operand)
? operand
- : createParen(operand, /*location*/ operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePostfixOperand = parenthesizePostfixOperand;
function parenthesizePrefixOperand(operand) {
return ts.isUnaryExpression(operand)
? operand
- : createParen(operand, /*location*/ operand);
+ : ts.setTextRange(ts.createParen(operand), operand);
}
ts.parenthesizePrefixOperand = parenthesizePrefixOperand;
function parenthesizeListElements(elements) {
@@ -12942,17 +14043,18 @@ var ts;
}
}
if (result !== undefined) {
- return createNodeArray(result, elements, elements.hasTrailingComma);
+ return ts.setTextRange(ts.createNodeArray(result, elements.hasTrailingComma), elements);
}
return elements;
}
+ ts.parenthesizeListElements = parenthesizeListElements;
function parenthesizeExpressionForList(expression) {
var emittedExpression = skipPartiallyEmittedExpressions(expression);
var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
- var commaPrecedence = ts.getOperatorPrecedence(192 /* BinaryExpression */, 25 /* CommaToken */);
+ var commaPrecedence = ts.getOperatorPrecedence(193 /* BinaryExpression */, 25 /* CommaToken */);
return expressionPrecedence > commaPrecedence
? expression
- : createParen(expression, /*location*/ expression);
+ : ts.setTextRange(ts.createParen(expression), expression);
}
ts.parenthesizeExpressionForList = parenthesizeExpressionForList;
function parenthesizeExpressionForExpressionStatement(expression) {
@@ -12960,16 +14062,16 @@ var ts;
if (ts.isCallExpression(emittedExpression)) {
var callee = emittedExpression.expression;
var kind = skipPartiallyEmittedExpressions(callee).kind;
- if (kind === 184 /* FunctionExpression */ || kind === 185 /* ArrowFunction */) {
- var mutableCall = getMutableClone(emittedExpression);
- mutableCall.expression = createParen(callee, /*location*/ callee);
+ if (kind === 185 /* FunctionExpression */ || kind === 186 /* ArrowFunction */) {
+ var mutableCall = ts.getMutableClone(emittedExpression);
+ mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
return recreatePartiallyEmittedExpressions(expression, mutableCall);
}
}
else {
var leftmostExpressionKind = getLeftmostExpression(emittedExpression).kind;
- if (leftmostExpressionKind === 176 /* ObjectLiteralExpression */ || leftmostExpressionKind === 184 /* FunctionExpression */) {
- return createParen(expression, /*location*/ expression);
+ if (leftmostExpressionKind === 177 /* ObjectLiteralExpression */ || leftmostExpressionKind === 185 /* FunctionExpression */) {
+ return ts.setTextRange(ts.createParen(expression), expression);
}
}
return expression;
@@ -12983,7 +14085,7 @@ var ts;
*/
function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = getMutableClone(originalOuterExpression);
+ var clone_1 = ts.getMutableClone(originalOuterExpression);
clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
return clone_1;
}
@@ -12992,21 +14094,21 @@ var ts;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
node = node.operand;
continue;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
node = node.left;
continue;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
node = node.condition;
continue;
- case 179 /* CallExpression */:
- case 178 /* ElementAccessExpression */:
- case 177 /* PropertyAccessExpression */:
+ case 180 /* CallExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
node = node.expression;
continue;
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
node = node.expression;
continue;
}
@@ -13014,9 +14116,8 @@ var ts;
}
}
function parenthesizeConciseBody(body) {
- var emittedBody = skipPartiallyEmittedExpressions(body);
- if (emittedBody.kind === 176 /* ObjectLiteralExpression */) {
- return createParen(body, /*location*/ body);
+ if (!ts.isBlock(body) && getLeftmostExpression(body).kind === 177 /* ObjectLiteralExpression */) {
+ return ts.setTextRange(ts.createParen(body), body);
}
return body;
}
@@ -13047,7 +14148,7 @@ var ts;
}
ts.skipOuterExpressions = skipOuterExpressions;
function skipParentheses(node) {
- while (node.kind === 183 /* ParenthesizedExpression */) {
+ while (node.kind === 184 /* ParenthesizedExpression */) {
node = node.expression;
}
return node;
@@ -13061,7 +14162,7 @@ var ts;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 294 /* PartiallyEmittedExpression */) {
+ while (node.kind === 295 /* PartiallyEmittedExpression */) {
node = node.expression;
}
return node;
@@ -13072,188 +14173,6 @@ var ts;
return node;
}
ts.startOnNewLine = startOnNewLine;
- function setOriginalNode(node, original) {
- node.original = original;
- if (original) {
- var emitNode = original.emitNode;
- if (emitNode)
- node.emitNode = mergeEmitNode(emitNode, node.emitNode);
- }
- return node;
- }
- ts.setOriginalNode = setOriginalNode;
- function mergeEmitNode(sourceEmitNode, destEmitNode) {
- var flags = sourceEmitNode.flags, commentRange = sourceEmitNode.commentRange, sourceMapRange = sourceEmitNode.sourceMapRange, tokenSourceMapRanges = sourceEmitNode.tokenSourceMapRanges, constantValue = sourceEmitNode.constantValue, helpers = sourceEmitNode.helpers;
- if (!destEmitNode)
- destEmitNode = {};
- if (flags)
- destEmitNode.flags = flags;
- if (commentRange)
- destEmitNode.commentRange = commentRange;
- if (sourceMapRange)
- destEmitNode.sourceMapRange = sourceMapRange;
- if (tokenSourceMapRanges)
- destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);
- if (constantValue !== undefined)
- destEmitNode.constantValue = constantValue;
- if (helpers)
- destEmitNode.helpers = ts.addRange(destEmitNode.helpers, helpers);
- return destEmitNode;
- }
- function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
- if (!destRanges)
- destRanges = ts.createMap();
- ts.copyProperties(sourceRanges, destRanges);
- return destRanges;
- }
- /**
- * Clears any EmitNode entries from parse-tree nodes.
- * @param sourceFile A source file.
- */
- function disposeEmitNodes(sourceFile) {
- // During transformation we may need to annotate a parse tree node with transient
- // transformation properties. As parse tree nodes live longer than transformation
- // nodes, we need to make sure we reclaim any memory allocated for custom ranges
- // from these nodes to ensure we do not hold onto entire subtrees just for position
- // information. We also need to reset these nodes to a pre-transformation state
- // for incremental parsing scenarios so that we do not impact later emit.
- sourceFile = ts.getSourceFileOfNode(ts.getParseTreeNode(sourceFile));
- var emitNode = sourceFile && sourceFile.emitNode;
- var annotatedNodes = emitNode && emitNode.annotatedNodes;
- if (annotatedNodes) {
- for (var _i = 0, annotatedNodes_1 = annotatedNodes; _i < annotatedNodes_1.length; _i++) {
- var node = annotatedNodes_1[_i];
- node.emitNode = undefined;
- }
- }
- }
- ts.disposeEmitNodes = disposeEmitNodes;
- /**
- * Associates a node with the current transformation, initializing
- * various transient transformation properties.
- *
- * @param node The node.
- */
- function getOrCreateEmitNode(node) {
- if (!node.emitNode) {
- if (ts.isParseTreeNode(node)) {
- // To avoid holding onto transformation artifacts, we keep track of any
- // parse tree node we are annotating. This allows us to clean them up after
- // all transformations have completed.
- if (node.kind === 261 /* SourceFile */) {
- return node.emitNode = { annotatedNodes: [node] };
- }
- var sourceFile = ts.getSourceFileOfNode(node);
- getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);
- }
- node.emitNode = {};
- }
- return node.emitNode;
- }
- ts.getOrCreateEmitNode = getOrCreateEmitNode;
- /**
- * Gets flags that control emit behavior of a node.
- *
- * @param node The node.
- */
- function getEmitFlags(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.flags;
- }
- ts.getEmitFlags = getEmitFlags;
- /**
- * Sets flags that control emit behavior of a node.
- *
- * @param node The node.
- * @param emitFlags The NodeEmitFlags for the node.
- */
- function setEmitFlags(node, emitFlags) {
- getOrCreateEmitNode(node).flags = emitFlags;
- return node;
- }
- ts.setEmitFlags = setEmitFlags;
- /**
- * Gets a custom text range to use when emitting source maps.
- *
- * @param node The node.
- */
- function getSourceMapRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.sourceMapRange) || node;
- }
- ts.getSourceMapRange = getSourceMapRange;
- /**
- * Sets a custom text range to use when emitting source maps.
- *
- * @param node The node.
- * @param range The text range.
- */
- function setSourceMapRange(node, range) {
- getOrCreateEmitNode(node).sourceMapRange = range;
- return node;
- }
- ts.setSourceMapRange = setSourceMapRange;
- /**
- * Gets the TextRange to use for source maps for a token of a node.
- *
- * @param node The node.
- * @param token The token.
- */
- function getTokenSourceMapRange(node, token) {
- var emitNode = node.emitNode;
- var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
- return tokenSourceMapRanges && tokenSourceMapRanges[token];
- }
- ts.getTokenSourceMapRange = getTokenSourceMapRange;
- /**
- * Sets the TextRange to use for source maps for a token of a node.
- *
- * @param node The node.
- * @param token The token.
- * @param range The text range.
- */
- function setTokenSourceMapRange(node, token, range) {
- var emitNode = getOrCreateEmitNode(node);
- var tokenSourceMapRanges = emitNode.tokenSourceMapRanges || (emitNode.tokenSourceMapRanges = ts.createMap());
- tokenSourceMapRanges[token] = range;
- return node;
- }
- ts.setTokenSourceMapRange = setTokenSourceMapRange;
- /**
- * Gets a custom text range to use when emitting comments.
- *
- * @param node The node.
- */
- function getCommentRange(node) {
- var emitNode = node.emitNode;
- return (emitNode && emitNode.commentRange) || node;
- }
- ts.getCommentRange = getCommentRange;
- /**
- * Sets a custom text range to use when emitting comments.
- */
- function setCommentRange(node, range) {
- getOrCreateEmitNode(node).commentRange = range;
- return node;
- }
- ts.setCommentRange = setCommentRange;
- /**
- * Gets the constant value to emit for an expression.
- */
- function getConstantValue(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.constantValue;
- }
- ts.getConstantValue = getConstantValue;
- /**
- * Sets the constant value to emit for an expression.
- */
- function setConstantValue(node, value) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.constantValue = value;
- return node;
- }
- ts.setConstantValue = setConstantValue;
function getExternalHelpersModuleName(node) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
var emitNode = parseNode && parseNode.emitNode;
@@ -13266,14 +14185,14 @@ var ts;
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = getEmitHelpers(node);
+ var helpers = ts.getEmitHelpers(node);
if (helpers) {
- for (var _i = 0, helpers_1 = helpers; _i < helpers_1.length; _i++) {
- var helper = helpers_1[_i];
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
if (!helper.scoped) {
var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
- var emitNode = getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = createUniqueName(ts.externalHelpersModuleNameText));
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
}
}
}
@@ -13281,128 +14200,19 @@ var ts;
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
/**
- * Adds an EmitHelper to a node.
- */
- function addEmitHelper(node, helper) {
- var emitNode = getOrCreateEmitNode(node);
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- return node;
- }
- ts.addEmitHelper = addEmitHelper;
- /**
- * Adds an EmitHelper to a node.
- */
- function addEmitHelpers(node, helpers) {
- if (ts.some(helpers)) {
- var emitNode = getOrCreateEmitNode(node);
- for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
- var helper = helpers_2[_i];
- if (!ts.contains(emitNode.helpers, helper)) {
- emitNode.helpers = ts.append(emitNode.helpers, helper);
- }
- }
- }
- return node;
- }
- ts.addEmitHelpers = addEmitHelpers;
- /**
- * Removes an EmitHelper from a node.
- */
- function removeEmitHelper(node, helper) {
- var emitNode = node.emitNode;
- if (emitNode) {
- var helpers = emitNode.helpers;
- if (helpers) {
- return ts.orderedRemoveItem(helpers, helper);
- }
- }
- return false;
- }
- ts.removeEmitHelper = removeEmitHelper;
- /**
- * Gets the EmitHelpers of a node.
- */
- function getEmitHelpers(node) {
- var emitNode = node.emitNode;
- return emitNode && emitNode.helpers;
- }
- ts.getEmitHelpers = getEmitHelpers;
- /**
- * Moves matching emit helpers from a source node to a target node.
- */
- function moveEmitHelpers(source, target, predicate) {
- var sourceEmitNode = source.emitNode;
- var sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;
- if (!ts.some(sourceEmitHelpers))
- return;
- var targetEmitNode = getOrCreateEmitNode(target);
- var helpersRemoved = 0;
- for (var i = 0; i < sourceEmitHelpers.length; i++) {
- var helper = sourceEmitHelpers[i];
- if (predicate(helper)) {
- helpersRemoved++;
- if (!ts.contains(targetEmitNode.helpers, helper)) {
- targetEmitNode.helpers = ts.append(targetEmitNode.helpers, helper);
- }
- }
- else if (helpersRemoved > 0) {
- sourceEmitHelpers[i - helpersRemoved] = helper;
- }
- }
- if (helpersRemoved > 0) {
- sourceEmitHelpers.length -= helpersRemoved;
- }
- }
- ts.moveEmitHelpers = moveEmitHelpers;
- function compareEmitHelpers(x, y) {
- if (x === y)
- return 0 /* EqualTo */;
- if (x.priority === y.priority)
- return 0 /* EqualTo */;
- if (x.priority === undefined)
- return 1 /* GreaterThan */;
- if (y.priority === undefined)
- return -1 /* LessThan */;
- return ts.compareValues(x.priority, y.priority);
- }
- ts.compareEmitHelpers = compareEmitHelpers;
- function setTextRange(node, location) {
- if (location) {
- node.pos = location.pos;
- node.end = location.end;
- }
- return node;
- }
- ts.setTextRange = setTextRange;
- function setNodeFlags(node, flags) {
- node.flags = flags;
- return node;
- }
- ts.setNodeFlags = setNodeFlags;
- function setMultiLine(node, multiLine) {
- node.multiLine = multiLine;
- return node;
- }
- ts.setMultiLine = setMultiLine;
- function setHasTrailingComma(nodes, hasTrailingComma) {
- nodes.hasTrailingComma = hasTrailingComma;
- return nodes;
- }
- ts.setHasTrailingComma = setHasTrailingComma;
- /**
* Get the name of that target module from an import or export declaration
*/
function getLocalNameForExternalImport(node, sourceFile) {
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- var name_9 = namespaceDeclaration.name;
- return ts.isGeneratedIdentifier(name_9) ? name_9 : createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
+ var name = namespaceDeclaration.name;
+ return ts.isGeneratedIdentifier(name) ? name : ts.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, namespaceDeclaration.name));
}
- if (node.kind === 235 /* ImportDeclaration */ && node.importClause) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 237 /* ImportDeclaration */ && node.importClause) {
+ return ts.getGeneratedNameForNode(node);
}
- if (node.kind === 241 /* ExportDeclaration */ && node.moduleSpecifier) {
- return getGeneratedNameForNode(node);
+ if (node.kind === 243 /* ExportDeclaration */ && node.moduleSpecifier) {
+ return ts.getGeneratedNameForNode(node);
}
return undefined;
}
@@ -13420,7 +14230,7 @@ var ts;
if (moduleName.kind === 9 /* StringLiteral */) {
return tryGetModuleNameFromDeclaration(importNode, host, resolver, compilerOptions)
|| tryRenameExternalModule(moduleName, sourceFile)
- || getSynthesizedClone(moduleName);
+ || ts.getSynthesizedClone(moduleName);
}
return undefined;
}
@@ -13430,10 +14240,8 @@ var ts;
* Here we check if alternative name was provided for a given moduleName and return it if possible.
*/
function tryRenameExternalModule(moduleName, sourceFile) {
- if (sourceFile.renamedDependencies && ts.hasProperty(sourceFile.renamedDependencies, moduleName.text)) {
- return createLiteral(sourceFile.renamedDependencies[moduleName.text]);
- }
- return undefined;
+ var rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
+ return rename && ts.createLiteral(rename);
}
/**
* Get the name of a module as should be written in the emitted output.
@@ -13447,10 +14255,10 @@ var ts;
return undefined;
}
if (file.moduleName) {
- return createLiteral(file.moduleName);
+ return ts.createLiteral(file.moduleName);
}
if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
- return createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
+ return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
}
@@ -13521,7 +14329,7 @@ var ts;
}
if (ts.isObjectLiteralElementLike(bindingElement)) {
switch (bindingElement.kind) {
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
// `b` in `({ a: b } = ...)`
// `b` in `({ a: b = 1 } = ...)`
// `{b}` in `({ a: {b} } = ...)`
@@ -13533,11 +14341,11 @@ var ts;
// `b[0]` in `({ a: b[0] } = ...)`
// `b[0]` in `({ a: b[0] = 1 } = ...)`
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
// `a` in `({ a } = ...)`
// `a` in `({ a = 1 } = ...)`
return bindingElement.name;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
// `a` in `({ ...a } = ...)`
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -13569,12 +14377,12 @@ var ts;
*/
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 144 /* Parameter */:
- case 174 /* BindingElement */:
+ case 145 /* Parameter */:
+ case 175 /* BindingElement */:
// `...` in `let [...a] = ...`
return bindingElement.dotDotDotToken;
- case 196 /* SpreadElement */:
- case 259 /* SpreadAssignment */:
+ case 197 /* SpreadElement */:
+ case 262 /* SpreadAssignment */:
// `...` in `[...a] = ...`
return bindingElement;
}
@@ -13586,7 +14394,7 @@ var ts;
*/
function getPropertyNameOfBindingOrAssignmentElement(bindingElement) {
switch (bindingElement.kind) {
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
// `a` in `let { a: b } = ...`
// `[a]` in `let { [a]: b } = ...`
// `"a"` in `let { "a": b } = ...`
@@ -13598,7 +14406,7 @@ var ts;
: propertyName;
}
break;
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
// `a` in `({ a: b } = ...)`
// `[a]` in `({ [a]: b } = ...)`
// `"a"` in `({ "a": b } = ...)`
@@ -13610,7 +14418,7 @@ var ts;
: propertyName;
}
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
// `a` in `({ ...a } = ...)`
return bindingElement.name;
}
@@ -13628,13 +14436,13 @@ var ts;
*/
function getElementsOfBindingOrAssignmentPattern(name) {
switch (name.kind) {
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
// `a` in `{a}`
// `a` in `[a]`
return name.elements;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
// `a` in `{a}`
return name.properties;
}
@@ -13644,10 +14452,12 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpread(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpread(element.name), element), element);
}
var expression = convertToAssignmentElementTarget(element.name);
- return element.initializer ? setOriginalNode(createAssignment(expression, element.initializer, element), element) : expression;
+ return element.initializer
+ ? ts.setOriginalNode(ts.setTextRange(ts.createAssignment(expression, element.initializer), element), element)
+ : expression;
}
ts.Debug.assertNode(element, ts.isExpression);
return element;
@@ -13657,14 +14467,14 @@ var ts;
if (ts.isBindingElement(element)) {
if (element.dotDotDotToken) {
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createSpreadAssignment(element.name, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createSpreadAssignment(element.name), element), element);
}
if (element.propertyName) {
var expression = convertToAssignmentElementTarget(element.name);
- return setOriginalNode(createPropertyAssignment(element.propertyName, element.initializer ? createAssignment(expression, element.initializer) : expression, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(element.propertyName, element.initializer ? ts.createAssignment(expression, element.initializer) : expression), element), element);
}
ts.Debug.assertNode(element.name, ts.isIdentifier);
- return setOriginalNode(createShorthandPropertyAssignment(element.name, element.initializer, element), element);
+ return ts.setOriginalNode(ts.setTextRange(ts.createShorthandPropertyAssignment(element.name, element.initializer), element), element);
}
ts.Debug.assertNode(element, ts.isObjectLiteralElementLike);
return element;
@@ -13672,18 +14482,18 @@ var ts;
ts.convertToObjectAssignmentElement = convertToObjectAssignmentElement;
function convertToAssignmentPattern(node) {
switch (node.kind) {
- case 173 /* ArrayBindingPattern */:
- case 175 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 176 /* ArrayLiteralExpression */:
return convertToArrayAssignmentPattern(node);
- case 172 /* ObjectBindingPattern */:
- case 176 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 177 /* ObjectLiteralExpression */:
return convertToObjectAssignmentPattern(node);
}
}
ts.convertToAssignmentPattern = convertToAssignmentPattern;
function convertToObjectAssignmentPattern(node) {
if (ts.isObjectBindingPattern(node)) {
- return setOriginalNode(createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createObjectLiteral(ts.map(node.elements, convertToObjectAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isObjectLiteralExpression);
return node;
@@ -13691,7 +14501,7 @@ var ts;
ts.convertToObjectAssignmentPattern = convertToObjectAssignmentPattern;
function convertToArrayAssignmentPattern(node) {
if (ts.isArrayBindingPattern(node)) {
- return setOriginalNode(createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement), node), node);
+ return ts.setOriginalNode(ts.setTextRange(ts.createArrayLiteral(ts.map(node.elements, convertToArrayAssignmentElement)), node), node);
}
ts.Debug.assertNode(node, ts.isArrayLiteralExpression);
return node;
@@ -13707,37 +14517,37 @@ var ts;
ts.convertToAssignmentElementTarget = convertToAssignmentElementTarget;
function collectExternalModuleInfo(sourceFile, resolver, compilerOptions) {
var externalImports = [];
- var exportSpecifiers = ts.createMap();
- var exportedBindings = ts.createMap();
+ var exportSpecifiers = ts.createMultiMap();
+ var exportedBindings = [];
var uniqueExports = ts.createMap();
var exportedNames;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && createImportDeclaration(
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
/*decorators*/ undefined,
- /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)), createLiteral(ts.externalHelpersModuleNameText));
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
if (externalHelpersImportDeclaration) {
externalImports.push(externalHelpersImportDeclaration);
}
for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
var node = _a[_i];
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// import "mod"
// import x from "mod"
// import * as x from "mod"
// import { x, y } from "mod"
externalImports.push(node);
break;
- case 234 /* ImportEqualsDeclaration */:
- if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ case 236 /* ImportEqualsDeclaration */:
+ if (node.moduleReference.kind === 247 /* ExternalModuleReference */) {
// import x = require("mod")
externalImports.push(node);
}
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
if (node.moduleSpecifier) {
if (!node.exportClause) {
// export * from "mod"
@@ -13753,27 +14563,27 @@ var ts;
// export { x, y }
for (var _b = 0, _c = node.exportClause.elements; _b < _c.length; _b++) {
var specifier = _c[_b];
- if (!uniqueExports[specifier.name.text]) {
- var name_10 = specifier.propertyName || specifier.name;
- ts.multiMapAdd(exportSpecifiers, name_10.text, specifier);
- var decl = resolver.getReferencedImportDeclaration(name_10)
- || resolver.getReferencedValueDeclaration(name_10);
+ if (!uniqueExports.get(specifier.name.text)) {
+ var name = specifier.propertyName || specifier.name;
+ exportSpecifiers.add(name.text, specifier);
+ var decl = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
if (decl) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(decl), specifier.name);
}
- uniqueExports[specifier.name.text] = true;
+ uniqueExports.set(specifier.name.text, true);
exportedNames = ts.append(exportedNames, specifier.name);
}
}
}
break;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
if (node.isExportEquals && !exportEquals) {
// export = x
exportEquals = node;
}
break;
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
if (ts.hasModifier(node, 1 /* Export */)) {
for (var _d = 0, _e = node.declarationList.declarations; _d < _e.length; _d++) {
var decl = _e[_d];
@@ -13781,42 +14591,42 @@ var ts;
}
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
if (ts.hasModifier(node, 1 /* Export */)) {
if (ts.hasModifier(node, 512 /* Default */)) {
// export default function() { }
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
// export function x() { }
- var name_11 = node.name;
- if (!uniqueExports[name_11.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_11);
- uniqueExports[name_11.text] = true;
- exportedNames = ts.append(exportedNames, name_11);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
break;
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
if (ts.hasModifier(node, 1 /* Export */)) {
if (ts.hasModifier(node, 512 /* Default */)) {
// export default class { }
if (!hasExportDefault) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), getDeclarationName(node));
hasExportDefault = true;
}
}
else {
// export class x { }
- var name_12 = node.name;
- if (!uniqueExports[name_12.text]) {
- ts.multiMapAdd(exportedBindings, ts.getOriginalNodeId(node), name_12);
- uniqueExports[name_12.text] = true;
- exportedNames = ts.append(exportedNames, name_12);
+ var name = node.name;
+ if (!uniqueExports.get(name.text)) {
+ multiMapSparseArrayAdd(exportedBindings, ts.getOriginalNodeId(node), name);
+ uniqueExports.set(name.text, true);
+ exportedNames = ts.append(exportedNames, name);
}
}
}
@@ -13836,13 +14646,24 @@ var ts;
}
}
else if (!ts.isGeneratedIdentifier(decl.name)) {
- if (!uniqueExports[decl.name.text]) {
- uniqueExports[decl.name.text] = true;
+ if (!uniqueExports.get(decl.name.text)) {
+ uniqueExports.set(decl.name.text, true);
exportedNames = ts.append(exportedNames, decl.name);
}
}
return exportedNames;
}
+ /** Use a sparse array as a multi-map. */
+ function multiMapSparseArrayAdd(map, key, value) {
+ var values = map[key];
+ if (values) {
+ values.push(value);
+ }
+ else {
+ map[key] = values = [value];
+ }
+ return values;
+ }
})(ts || (ts = {}));
/// <reference path="utilities.ts"/>
/// <reference path="scanner.ts"/>
@@ -13854,13 +14675,13 @@ var ts;
var IdentifierConstructor;
var SourceFileConstructor;
function createNode(kind, pos, end) {
- if (kind === 261 /* SourceFile */) {
+ if (kind === 264 /* SourceFile */) {
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end);
}
else if (kind === 70 /* Identifier */) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 141 /* FirstNode */) {
+ else if (kind < 142 /* FirstNode */) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -13903,28 +14724,29 @@ var ts;
var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
var cbNodes = cbNodeArray || cbNode;
switch (node.kind) {
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.right);
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.constraint) ||
+ visitNode(cbNode, node.default) ||
visitNode(cbNode, node.expression);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.equalsToken) ||
visitNode(cbNode, node.objectAssignmentInitializer);
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
return visitNode(cbNode, node.expression);
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.propertyName) ||
@@ -13933,24 +14755,24 @@ var ts;
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.initializer);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.asteriskToken) ||
@@ -13961,320 +14783,326 @@ var ts;
visitNode(cbNode, node.type) ||
visitNode(cbNode, node.equalsGreaterThanToken) ||
visitNode(cbNode, node.body);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return visitNode(cbNode, node.typeName) ||
visitNodes(cbNodes, node.typeArguments);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return visitNode(cbNode, node.parameterName) ||
visitNode(cbNode, node.type);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return visitNode(cbNode, node.exprName);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return visitNodes(cbNodes, node.members);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return visitNode(cbNode, node.elementType);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return visitNodes(cbNodes, node.elementTypes);
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return visitNodes(cbNodes, node.types);
- case 166 /* ParenthesizedType */:
- case 168 /* TypeOperator */:
+ case 167 /* ParenthesizedType */:
+ case 169 /* TypeOperator */:
return visitNode(cbNode, node.type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return visitNode(cbNode, node.objectType) ||
visitNode(cbNode, node.indexType);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return visitNode(cbNode, node.readonlyToken) ||
visitNode(cbNode, node.typeParameter) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.type);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return visitNode(cbNode, node.literal);
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return visitNodes(cbNodes, node.elements);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return visitNodes(cbNodes, node.elements);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitNodes(cbNodes, node.properties);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.name);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.argumentExpression);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments) ||
visitNodes(cbNodes, node.arguments);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return visitNode(cbNode, node.tag) ||
visitNode(cbNode, node.template);
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
return visitNode(cbNode, node.type) ||
visitNode(cbNode, node.expression);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitNode(cbNode, node.expression);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return visitNode(cbNode, node.expression);
- case 187 /* TypeOfExpression */:
+ case 188 /* TypeOfExpression */:
return visitNode(cbNode, node.expression);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return visitNode(cbNode, node.expression);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return visitNode(cbNode, node.operand);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitNode(cbNode, node.asteriskToken) ||
visitNode(cbNode, node.expression);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return visitNode(cbNode, node.expression);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return visitNode(cbNode, node.operand);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitNode(cbNode, node.left) ||
visitNode(cbNode, node.operatorToken) ||
visitNode(cbNode, node.right);
- case 200 /* AsExpression */:
+ case 201 /* AsExpression */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.type);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return visitNode(cbNode, node.expression);
- case 193 /* ConditionalExpression */:
+ case 203 /* MetaProperty */:
+ return visitNode(cbNode, node.name);
+ case 194 /* ConditionalExpression */:
return visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.questionToken) ||
visitNode(cbNode, node.whenTrue) ||
visitNode(cbNode, node.colonToken) ||
visitNode(cbNode, node.whenFalse);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return visitNode(cbNode, node.expression);
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return visitNodes(cbNodes, node.statements);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return visitNodes(cbNodes, node.statements) ||
visitNode(cbNode, node.endOfFileToken);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.declarationList);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return visitNodes(cbNodes, node.declarations);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return visitNode(cbNode, node.expression);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.thenStatement) ||
visitNode(cbNode, node.elseStatement);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitNode(cbNode, node.statement) ||
visitNode(cbNode, node.expression);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.condition) ||
visitNode(cbNode, node.incrementor) ||
visitNode(cbNode, node.statement);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 213 /* ForOfStatement */:
- return visitNode(cbNode, node.initializer) ||
+ case 215 /* ForOfStatement */:
+ return visitNode(cbNode, node.awaitModifier) ||
+ visitNode(cbNode, node.initializer) ||
visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
return visitNode(cbNode, node.label);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitNode(cbNode, node.expression);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.statement);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitNode(cbNode, node.expression) ||
visitNode(cbNode, node.caseBlock);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return visitNodes(cbNodes, node.clauses);
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.statements);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return visitNodes(cbNodes, node.statements);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitNode(cbNode, node.label) ||
visitNode(cbNode, node.statement);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return visitNode(cbNode, node.expression);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return visitNode(cbNode, node.tryBlock) ||
visitNode(cbNode, node.catchClause) ||
visitNode(cbNode, node.finallyBlock);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitNode(cbNode, node.variableDeclaration) ||
visitNode(cbNode, node.block);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return visitNode(cbNode, node.expression);
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNodes(cbNodes, node.heritageClauses) ||
visitNodes(cbNodes, node.members);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeParameters) ||
visitNode(cbNode, node.type);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.members);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.body);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.moduleReference);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.importClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.namedBindings);
- case 233 /* NamespaceExportDeclaration */:
+ case 235 /* NamespaceExportDeclaration */:
return visitNode(cbNode, node.name);
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
return visitNode(cbNode, node.name);
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return visitNodes(cbNodes, node.elements);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.exportClause) ||
visitNode(cbNode, node.moduleSpecifier);
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return visitNode(cbNode, node.propertyName) ||
visitNode(cbNode, node.name);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitNodes(cbNodes, node.decorators) ||
visitNodes(cbNodes, node.modifiers) ||
visitNode(cbNode, node.expression);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return visitNode(cbNode, node.expression);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return visitNodes(cbNodes, node.types);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return visitNode(cbNode, node.expression) ||
visitNodes(cbNodes, node.typeArguments);
- case 245 /* ExternalModuleReference */:
+ case 247 /* ExternalModuleReference */:
return visitNode(cbNode, node.expression);
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return visitNodes(cbNodes, node.decorators);
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
visitNode(cbNode, node.closingElement);
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
return visitNode(cbNode, node.tagName) ||
- visitNodes(cbNodes, node.attributes);
- case 250 /* JsxAttribute */:
+ visitNode(cbNode, node.attributes);
+ case 253 /* JsxAttributes */:
+ return visitNodes(cbNodes, node.properties);
+ case 252 /* JsxAttribute */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.initializer);
- case 251 /* JsxSpreadAttribute */:
- return visitNode(cbNode, node.expression);
- case 252 /* JsxExpression */:
+ case 254 /* JsxSpreadAttribute */:
return visitNode(cbNode, node.expression);
- case 249 /* JsxClosingElement */:
+ case 255 /* JsxExpression */:
+ return visitNode(cbNode, node.dotDotDotToken) ||
+ visitNode(cbNode, node.expression);
+ case 251 /* JsxClosingElement */:
return visitNode(cbNode, node.tagName);
- case 262 /* JSDocTypeExpression */:
+ case 266 /* JSDocTypeExpression */:
return visitNode(cbNode, node.type);
- case 266 /* JSDocUnionType */:
+ case 270 /* JSDocUnionType */:
return visitNodes(cbNodes, node.types);
- case 267 /* JSDocTupleType */:
+ case 271 /* JSDocTupleType */:
return visitNodes(cbNodes, node.types);
- case 265 /* JSDocArrayType */:
+ case 269 /* JSDocArrayType */:
return visitNode(cbNode, node.elementType);
- case 269 /* JSDocNonNullableType */:
+ case 273 /* JSDocNonNullableType */:
return visitNode(cbNode, node.type);
- case 268 /* JSDocNullableType */:
+ case 272 /* JSDocNullableType */:
return visitNode(cbNode, node.type);
- case 270 /* JSDocRecordType */:
+ case 274 /* JSDocRecordType */:
return visitNode(cbNode, node.literal);
- case 272 /* JSDocTypeReference */:
+ case 276 /* JSDocTypeReference */:
return visitNode(cbNode, node.name) ||
visitNodes(cbNodes, node.typeArguments);
- case 273 /* JSDocOptionalType */:
+ case 277 /* JSDocOptionalType */:
return visitNode(cbNode, node.type);
- case 274 /* JSDocFunctionType */:
+ case 278 /* JSDocFunctionType */:
return visitNodes(cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
- case 275 /* JSDocVariadicType */:
+ case 279 /* JSDocVariadicType */:
return visitNode(cbNode, node.type);
- case 276 /* JSDocConstructorType */:
+ case 280 /* JSDocConstructorType */:
return visitNode(cbNode, node.type);
- case 277 /* JSDocThisType */:
+ case 281 /* JSDocThisType */:
return visitNode(cbNode, node.type);
- case 271 /* JSDocRecordMember */:
+ case 275 /* JSDocRecordMember */:
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.type);
- case 278 /* JSDocComment */:
+ case 282 /* JSDocComment */:
return visitNodes(cbNodes, node.tags);
- case 281 /* JSDocParameterTag */:
+ case 285 /* JSDocParameterTag */:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 282 /* JSDocReturnTag */:
+ case 286 /* JSDocReturnTag */:
return visitNode(cbNode, node.typeExpression);
- case 283 /* JSDocTypeTag */:
+ case 287 /* JSDocTypeTag */:
return visitNode(cbNode, node.typeExpression);
- case 280 /* JSDocAugmentsTag */:
+ case 284 /* JSDocAugmentsTag */:
return visitNode(cbNode, node.typeExpression);
- case 284 /* JSDocTemplateTag */:
+ case 288 /* JSDocTemplateTag */:
return visitNodes(cbNodes, node.typeParameters);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 287 /* JSDocTypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 286 /* JSDocPropertyTag */:
+ case 290 /* JSDocPropertyTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
return visitNode(cbNode, node.expression);
- case 288 /* JSDocLiteralType */:
+ case 292 /* JSDocLiteralType */:
return visitNode(cbNode, node.literal);
}
}
@@ -14292,6 +15120,7 @@ var ts;
return Parser.parseIsolatedEntityName(text, languageVersion);
}
ts.parseIsolatedEntityName = parseIsolatedEntityName;
+ // See also `isExternalOrCommonJsModule` in utilities.ts
function isExternalModule(file) {
return file.externalModuleIndicator !== undefined;
}
@@ -14334,7 +15163,7 @@ var ts;
// Share a single scanner across all calls to parse a source file. This helps speed things
// up by avoiding the cost of creating/compiling scanners over and over again.
var scanner = ts.createScanner(5 /* Latest */, /*skipTrivia*/ true);
- var disallowInAndDecoratorContext = 65536 /* DisallowInContext */ | 262144 /* DecoratorContext */;
+ var disallowInAndDecoratorContext = 2048 /* DisallowInContext */ | 8192 /* DecoratorContext */;
// capture constructors in 'initializeState' to avoid null checks
var NodeConstructor;
var TokenConstructor;
@@ -14458,7 +15287,7 @@ var ts;
identifiers = ts.createMap();
identifierCount = 0;
nodeCount = 0;
- contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 2097152 /* JavaScriptFile */ : 0 /* None */;
+ contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 65536 /* JavaScriptFile */ : 0 /* None */;
parseErrorBeforeNextFinishedNode = false;
// Initialize and prime the scanner before parsing the source elements.
scanner.setText(sourceText);
@@ -14546,7 +15375,7 @@ var ts;
function createSourceFile(fileName, languageVersion, scriptKind) {
// code from createNode is inlined here so createNode won't have to deal with special case of creating source files
// this is quite rare comparing to other nodes and createNode should be as fast as possible
- var sourceFile = new SourceFileConstructor(261 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length);
+ var sourceFile = new SourceFileConstructor(264 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length);
nodeCount++;
sourceFile.text = sourceText;
sourceFile.bindDiagnostics = [];
@@ -14566,16 +15395,16 @@ var ts;
}
}
function setDisallowInContext(val) {
- setContextFlag(val, 65536 /* DisallowInContext */);
+ setContextFlag(val, 2048 /* DisallowInContext */);
}
function setYieldContext(val) {
- setContextFlag(val, 131072 /* YieldContext */);
+ setContextFlag(val, 4096 /* YieldContext */);
}
function setDecoratorContext(val) {
- setContextFlag(val, 262144 /* DecoratorContext */);
+ setContextFlag(val, 8192 /* DecoratorContext */);
}
function setAwaitContext(val) {
- setContextFlag(val, 524288 /* AwaitContext */);
+ setContextFlag(val, 16384 /* AwaitContext */);
}
function doOutsideOfContext(context, func) {
// contextFlagsToClear will contain only the context flags that are
@@ -14616,40 +15445,40 @@ var ts;
return func();
}
function allowInAnd(func) {
- return doOutsideOfContext(65536 /* DisallowInContext */, func);
+ return doOutsideOfContext(2048 /* DisallowInContext */, func);
}
function disallowInAnd(func) {
- return doInsideOfContext(65536 /* DisallowInContext */, func);
+ return doInsideOfContext(2048 /* DisallowInContext */, func);
}
function doInYieldContext(func) {
- return doInsideOfContext(131072 /* YieldContext */, func);
+ return doInsideOfContext(4096 /* YieldContext */, func);
}
function doInDecoratorContext(func) {
- return doInsideOfContext(262144 /* DecoratorContext */, func);
+ return doInsideOfContext(8192 /* DecoratorContext */, func);
}
function doInAwaitContext(func) {
- return doInsideOfContext(524288 /* AwaitContext */, func);
+ return doInsideOfContext(16384 /* AwaitContext */, func);
}
function doOutsideOfAwaitContext(func) {
- return doOutsideOfContext(524288 /* AwaitContext */, func);
+ return doOutsideOfContext(16384 /* AwaitContext */, func);
}
function doInYieldAndAwaitContext(func) {
- return doInsideOfContext(131072 /* YieldContext */ | 524288 /* AwaitContext */, func);
+ return doInsideOfContext(4096 /* YieldContext */ | 16384 /* AwaitContext */, func);
}
function inContext(flags) {
return (contextFlags & flags) !== 0;
}
function inYieldContext() {
- return inContext(131072 /* YieldContext */);
+ return inContext(4096 /* YieldContext */);
}
function inDisallowInContext() {
- return inContext(65536 /* DisallowInContext */);
+ return inContext(2048 /* DisallowInContext */);
}
function inDecoratorContext() {
- return inContext(262144 /* DecoratorContext */);
+ return inContext(8192 /* DecoratorContext */);
}
function inAwaitContext() {
- return inContext(524288 /* AwaitContext */);
+ return inContext(16384 /* AwaitContext */);
}
function parseErrorAtCurrentToken(message, arg0) {
var start = scanner.getTokenPos();
@@ -14830,7 +15659,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 141 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
+ return kind >= 142 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
kind === 70 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -14853,7 +15682,7 @@ var ts;
// flag so that we don't mark any subsequent nodes.
if (parseErrorBeforeNextFinishedNode) {
parseErrorBeforeNextFinishedNode = false;
- node.flags |= 1048576 /* ThisNodeHasError */;
+ node.flags |= 32768 /* ThisNodeHasError */;
}
return node;
}
@@ -14870,7 +15699,11 @@ var ts;
}
function internIdentifier(text) {
text = ts.escapeIdentifier(text);
- return identifiers[text] || (identifiers[text] = text);
+ var identifier = identifiers.get(text);
+ if (identifier === undefined) {
+ identifiers.set(text, identifier = text);
+ }
+ return identifier;
}
// An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues
// with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for
@@ -14922,7 +15755,7 @@ var ts;
// PropertyName [Yield]:
// LiteralPropertyName
// ComputedPropertyName[?Yield]
- var node = createNode(142 /* ComputedPropertyName */);
+ var node = createNode(143 /* ComputedPropertyName */);
parseExpected(20 /* OpenBracketToken */);
// We parse any expression (including a comma expression). But the grammar
// says that only an assignment expression is allowed, so the grammar checker
@@ -14975,6 +15808,7 @@ var ts;
function nextTokenIsClassOrFunctionOrAsync() {
nextToken();
return token() === 74 /* ClassKeyword */ || token() === 88 /* FunctionKeyword */ ||
+ (token() === 116 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 119 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
// True if positioned at the start of a list element
@@ -15015,7 +15849,7 @@ var ts;
case 9 /* ObjectBindingElements */:
return token() === 20 /* OpenBracketToken */ || token() === 23 /* DotDotDotToken */ || isLiteralPropertyName();
case 7 /* HeritageClauseElement */:
- // If we see { } then only consume it as an expression if it is followed by , or {
+ // If we see `{ ... }` then only consume it as an expression if it is followed by `,` or `{`
// That way we won't consume the body of a class in its heritage clause.
if (token() === 16 /* OpenBraceToken */) {
return lookAhead(isValidHeritageClauseObjectLiteral);
@@ -15247,7 +16081,7 @@ var ts;
// differently depending on what mode it is in.
//
// This also applies to all our other context flags as well.
- var nodeContextFlags = node.flags & 3080192 /* ContextFlags */;
+ var nodeContextFlags = node.flags & 96256 /* ContextFlags */;
if (nodeContextFlags !== contextFlags) {
return undefined;
}
@@ -15329,14 +16163,14 @@ var ts;
function isReusableClassMember(node) {
if (node) {
switch (node.kind) {
- case 150 /* Constructor */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 147 /* PropertyDeclaration */:
- case 203 /* SemicolonClassElement */:
+ case 151 /* Constructor */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 205 /* SemicolonClassElement */:
return true;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
// Method declarations are not necessarily reusable. An object-literal
// may have a method calls "constructor(...)" and we must reparse that
// into an actual .ConstructorDeclaration.
@@ -15351,8 +16185,8 @@ var ts;
function isReusableSwitchClause(node) {
if (node) {
switch (node.kind) {
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
return true;
}
}
@@ -15361,58 +16195,58 @@ var ts;
function isReusableStatement(node) {
if (node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 205 /* VariableStatement */:
- case 204 /* Block */:
- case 208 /* IfStatement */:
- case 207 /* ExpressionStatement */:
- case 220 /* ThrowStatement */:
- case 216 /* ReturnStatement */:
- case 218 /* SwitchStatement */:
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 211 /* ForStatement */:
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
- case 206 /* EmptyStatement */:
- case 221 /* TryStatement */:
- case 219 /* LabeledStatement */:
- case 209 /* DoStatement */:
- case 222 /* DebuggerStatement */:
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
- case 240 /* ExportAssignment */:
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 207 /* VariableStatement */:
+ case 206 /* Block */:
+ case 210 /* IfStatement */:
+ case 209 /* ExpressionStatement */:
+ case 222 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 220 /* SwitchStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
+ case 208 /* EmptyStatement */:
+ case 223 /* TryStatement */:
+ case 221 /* LabeledStatement */:
+ case 211 /* DoStatement */:
+ case 224 /* DebuggerStatement */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return true;
}
}
return false;
}
function isReusableEnumMember(node) {
- return node.kind === 260 /* EnumMember */;
+ return node.kind === 263 /* EnumMember */;
}
function isReusableTypeMember(node) {
if (node) {
switch (node.kind) {
- case 154 /* ConstructSignature */:
- case 148 /* MethodSignature */:
- case 155 /* IndexSignature */:
- case 146 /* PropertySignature */:
- case 153 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 149 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ case 147 /* PropertySignature */:
+ case 154 /* CallSignature */:
return true;
}
}
return false;
}
function isReusableVariableDeclaration(node) {
- if (node.kind !== 223 /* VariableDeclaration */) {
+ if (node.kind !== 225 /* VariableDeclaration */) {
return false;
}
// Very subtle incremental parsing bug. Consider the following code:
@@ -15433,7 +16267,7 @@ var ts;
return variableDeclarator.initializer === undefined;
}
function isReusableParameter(node) {
- if (node.kind !== 144 /* Parameter */) {
+ if (node.kind !== 145 /* Parameter */) {
return false;
}
// See the comment in isReusableVariableDeclaration for why we do this.
@@ -15480,7 +16314,6 @@ var ts;
case 25 /* JSDocRecordMembers */: return ts.Diagnostics.Property_assignment_expected;
}
}
- ;
// Parses a comma-delimited list of elements
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {
var saveParsingContext = parsingContext;
@@ -15546,7 +16379,7 @@ var ts;
function parseEntityName(allowReservedWords, diagnosticMessage) {
var entity = parseIdentifier(diagnosticMessage);
while (parseOptional(22 /* DotToken */)) {
- var node = createNode(141 /* QualifiedName */, entity.pos); // !!!
+ var node = createNode(142 /* QualifiedName */, entity.pos); // !!!
node.left = entity;
node.right = parseRightSideOfDot(allowReservedWords);
entity = finishNode(node);
@@ -15585,7 +16418,7 @@ var ts;
return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
}
function parseTemplateExpression() {
- var template = createNode(194 /* TemplateExpression */);
+ var template = createNode(195 /* TemplateExpression */);
template.head = parseTemplateHead();
ts.Debug.assert(template.head.kind === 13 /* TemplateHead */, "Template head has wrong token kind");
var templateSpans = createNodeArray();
@@ -15597,7 +16430,7 @@ var ts;
return finishNode(template);
}
function parseTemplateSpan() {
- var span = createNode(202 /* TemplateSpan */);
+ var span = createNode(204 /* TemplateSpan */);
span.expression = allowInAnd(parseExpression);
var literal;
if (token() === 17 /* CloseBraceToken */) {
@@ -15633,27 +16466,23 @@ var ts;
if (scanner.isUnterminated()) {
node.isUnterminated = true;
}
- var tokenPos = scanner.getTokenPos();
- nextToken();
- finishNode(node);
// Octal literals are not allowed in strict mode or ES5
// Note that theoretically the following condition would hold true literals like 009,
// which is not octal.But because of how the scanner separates the tokens, we would
// never get a token like this. Instead, we would get 00 and 9 as two separate tokens.
// We also do not need to check for negatives because any prefix operator would be part of a
// parent unary expression.
- if (node.kind === 8 /* NumericLiteral */
- && sourceText.charCodeAt(tokenPos) === 48 /* _0 */
- && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
- node.isOctalLiteral = true;
+ if (node.kind === 8 /* NumericLiteral */) {
+ node.numericLiteralFlags = scanner.getNumericLiteralFlags();
}
+ nextToken();
+ finishNode(node);
return node;
}
// TYPES
function parseTypeReference() {
- var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
- var node = createNode(157 /* TypeReference */, typeName.pos);
- node.typeName = typeName;
+ var node = createNode(158 /* TypeReference */);
+ node.typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
if (!scanner.hasPrecedingLineBreak() && token() === 26 /* LessThanToken */) {
node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */);
}
@@ -15661,24 +16490,24 @@ var ts;
}
function parseThisTypePredicate(lhs) {
nextToken();
- var node = createNode(156 /* TypePredicate */, lhs.pos);
+ var node = createNode(157 /* TypePredicate */, lhs.pos);
node.parameterName = lhs;
node.type = parseType();
return finishNode(node);
}
function parseThisTypeNode() {
- var node = createNode(167 /* ThisType */);
+ var node = createNode(168 /* ThisType */);
nextToken();
return finishNode(node);
}
function parseTypeQuery() {
- var node = createNode(160 /* TypeQuery */);
+ var node = createNode(161 /* TypeQuery */);
parseExpected(102 /* TypeOfKeyword */);
node.exprName = parseEntityName(/*allowReservedWords*/ true);
return finishNode(node);
}
function parseTypeParameter() {
- var node = createNode(143 /* TypeParameter */);
+ var node = createNode(144 /* TypeParameter */);
node.name = parseIdentifier();
if (parseOptional(84 /* ExtendsKeyword */)) {
// It's not uncommon for people to write improper constraints to a generic. If the
@@ -15699,6 +16528,9 @@ var ts;
node.expression = parseUnaryExpressionOrHigher();
}
}
+ if (parseOptional(57 /* EqualsToken */)) {
+ node.default = parseType();
+ }
return finishNode(node);
}
function parseTypeParameters() {
@@ -15716,9 +16548,9 @@ var ts;
return token() === 23 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 56 /* AtToken */ || token() === 98 /* ThisKeyword */;
}
function parseParameter() {
- var node = createNode(144 /* Parameter */);
+ var node = createNode(145 /* Parameter */);
if (token() === 98 /* ThisKeyword */) {
- node.name = createIdentifier(/*isIdentifier*/ true, undefined);
+ node.name = createIdentifier(/*isIdentifier*/ true);
node.type = parseParameterType();
return finishNode(node);
}
@@ -15815,7 +16647,7 @@ var ts;
}
function parseSignatureMember(kind) {
var node = createNode(kind);
- if (kind === 154 /* ConstructSignature */) {
+ if (kind === 155 /* ConstructSignature */) {
parseExpected(93 /* NewKeyword */);
}
fillSignature(55 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node);
@@ -15879,7 +16711,7 @@ var ts;
return token() === 55 /* ColonToken */ || token() === 25 /* CommaToken */ || token() === 21 /* CloseBracketToken */;
}
function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(155 /* IndexSignature */, fullStart);
+ var node = createNode(156 /* IndexSignature */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */);
@@ -15891,7 +16723,7 @@ var ts;
var name = parsePropertyName();
var questionToken = parseOptionalToken(54 /* QuestionToken */);
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
- var method = createNode(148 /* MethodSignature */, fullStart);
+ var method = createNode(149 /* MethodSignature */, fullStart);
method.modifiers = modifiers;
method.name = name;
method.questionToken = questionToken;
@@ -15902,7 +16734,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
else {
- var property = createNode(146 /* PropertySignature */, fullStart);
+ var property = createNode(147 /* PropertySignature */, fullStart);
property.modifiers = modifiers;
property.name = name;
property.questionToken = questionToken;
@@ -15918,14 +16750,14 @@ var ts;
}
}
function isTypeMemberStart() {
- var idToken;
// Return true if we have the start of a signature member
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
return true;
}
+ var idToken;
// Eat up all modifiers, but hold on to the last one in case it is actually an identifier
while (ts.isModifierKind(token())) {
- idToken = token();
+ idToken = true;
nextToken();
}
// Index signatures and computed property names are type members
@@ -15934,7 +16766,7 @@ var ts;
}
// Try to get the first property-like token following all modifiers
if (isLiteralPropertyName()) {
- idToken = token();
+ idToken = true;
nextToken();
}
// If we were able to get any potential identifier, check that it is
@@ -15951,10 +16783,10 @@ var ts;
}
function parseTypeMember() {
if (token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */) {
- return parseSignatureMember(153 /* CallSignature */);
+ return parseSignatureMember(154 /* CallSignature */);
}
if (token() === 93 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) {
- return parseSignatureMember(154 /* ConstructSignature */);
+ return parseSignatureMember(155 /* ConstructSignature */);
}
var fullStart = getNodePos();
var modifiers = parseModifiers();
@@ -15968,7 +16800,7 @@ var ts;
return token() === 18 /* OpenParenToken */ || token() === 26 /* LessThanToken */;
}
function parseTypeLiteral() {
- var node = createNode(161 /* TypeLiteral */);
+ var node = createNode(162 /* TypeLiteral */);
node.members = parseObjectTypeMembers();
return finishNode(node);
}
@@ -15991,14 +16823,14 @@ var ts;
return token() === 20 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 91 /* InKeyword */;
}
function parseMappedTypeParameter() {
- var node = createNode(143 /* TypeParameter */);
+ var node = createNode(144 /* TypeParameter */);
node.name = parseIdentifier();
parseExpected(91 /* InKeyword */);
node.constraint = parseType();
return finishNode(node);
}
function parseMappedType() {
- var node = createNode(170 /* MappedType */);
+ var node = createNode(171 /* MappedType */);
parseExpected(16 /* OpenBraceToken */);
node.readonlyToken = parseOptionalToken(130 /* ReadonlyKeyword */);
parseExpected(20 /* OpenBracketToken */);
@@ -16011,12 +16843,12 @@ var ts;
return finishNode(node);
}
function parseTupleType() {
- var node = createNode(163 /* TupleType */);
+ var node = createNode(164 /* TupleType */);
node.elementTypes = parseBracketedList(20 /* TupleElementTypes */, parseType, 20 /* OpenBracketToken */, 21 /* CloseBracketToken */);
return finishNode(node);
}
function parseParenthesizedType() {
- var node = createNode(166 /* ParenthesizedType */);
+ var node = createNode(167 /* ParenthesizedType */);
parseExpected(18 /* OpenParenToken */);
node.type = parseType();
parseExpected(19 /* CloseParenToken */);
@@ -16024,7 +16856,7 @@ var ts;
}
function parseFunctionOrConstructorType(kind) {
var node = createNode(kind);
- if (kind === 159 /* ConstructorType */) {
+ if (kind === 160 /* ConstructorType */) {
parseExpected(93 /* NewKeyword */);
}
fillSignature(35 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node);
@@ -16035,7 +16867,7 @@ var ts;
return token() === 22 /* DotToken */ ? undefined : node;
}
function parseLiteralTypeNode() {
- var node = createNode(171 /* LiteralType */);
+ var node = createNode(172 /* LiteralType */);
node.literal = parseSimpleUnaryExpression();
finishNode(node);
return node;
@@ -16046,12 +16878,13 @@ var ts;
function parseNonArrayType() {
switch (token()) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
+ case 133 /* ObjectKeyword */:
// If these are followed by a dot, then parse these out as a dotted type reference instead.
var node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReference();
@@ -16089,12 +16922,12 @@ var ts;
function isStartOfType() {
switch (token()) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 98 /* ThisKeyword */:
case 102 /* TypeOfKeyword */:
@@ -16102,11 +16935,14 @@ var ts;
case 16 /* OpenBraceToken */:
case 20 /* OpenBracketToken */:
case 26 /* LessThanToken */:
+ case 48 /* BarToken */:
+ case 47 /* AmpersandToken */:
case 93 /* NewKeyword */:
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
+ case 133 /* ObjectKeyword */:
return true;
case 37 /* MinusToken */:
return lookAhead(nextTokenIsNumericLiteral);
@@ -16126,14 +16962,14 @@ var ts;
var type = parseNonArrayType();
while (!scanner.hasPrecedingLineBreak() && parseOptional(20 /* OpenBracketToken */)) {
if (isStartOfType()) {
- var node = createNode(169 /* IndexedAccessType */, type.pos);
+ var node = createNode(170 /* IndexedAccessType */, type.pos);
node.objectType = type;
node.indexType = parseType();
parseExpected(21 /* CloseBracketToken */);
type = finishNode(node);
}
else {
- var node = createNode(162 /* ArrayType */, type.pos);
+ var node = createNode(163 /* ArrayType */, type.pos);
node.elementType = type;
parseExpected(21 /* CloseBracketToken */);
type = finishNode(node);
@@ -16142,7 +16978,7 @@ var ts;
return type;
}
function parseTypeOperator(operator) {
- var node = createNode(168 /* TypeOperator */);
+ var node = createNode(169 /* TypeOperator */);
parseExpected(operator);
node.operator = operator;
node.type = parseTypeOperatorOrHigher();
@@ -16156,6 +16992,7 @@ var ts;
return parseArrayTypeOrHigher();
}
function parseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ parseOptional(operator);
var type = parseConstituentType();
if (token() === operator) {
var types = createNodeArray([type], type.pos);
@@ -16170,10 +17007,10 @@ var ts;
return type;
}
function parseIntersectionTypeOrHigher() {
- return parseUnionOrIntersectionType(165 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */);
+ return parseUnionOrIntersectionType(166 /* IntersectionType */, parseTypeOperatorOrHigher, 47 /* AmpersandToken */);
}
function parseUnionTypeOrHigher() {
- return parseUnionOrIntersectionType(164 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */);
+ return parseUnionOrIntersectionType(165 /* UnionType */, parseIntersectionTypeOrHigher, 48 /* BarToken */);
}
function isStartOfFunctionType() {
if (token() === 26 /* LessThanToken */) {
@@ -16230,7 +17067,7 @@ var ts;
var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
var type = parseType();
if (typePredicateVariable) {
- var node = createNode(156 /* TypePredicate */, typePredicateVariable.pos);
+ var node = createNode(157 /* TypePredicate */, typePredicateVariable.pos);
node.parameterName = typePredicateVariable;
node.type = type;
return finishNode(node);
@@ -16249,14 +17086,14 @@ var ts;
function parseType() {
// The rules about 'yield' only apply to actual code/expression contexts. They don't
// apply to 'type' contexts. So we disable these parameters here before moving on.
- return doOutsideOfContext(655360 /* TypeExcludesFlags */, parseTypeWorker);
+ return doOutsideOfContext(20480 /* TypeExcludesFlags */, parseTypeWorker);
}
function parseTypeWorker() {
if (isStartOfFunctionType()) {
- return parseFunctionOrConstructorType(158 /* FunctionType */);
+ return parseFunctionOrConstructorType(159 /* FunctionType */);
}
if (token() === 93 /* NewKeyword */) {
- return parseFunctionOrConstructorType(159 /* ConstructorType */);
+ return parseFunctionOrConstructorType(160 /* ConstructorType */);
}
return parseUnionTypeOrHigher();
}
@@ -16457,7 +17294,7 @@ var ts;
return !scanner.hasPrecedingLineBreak() && isIdentifier();
}
function parseYieldExpression() {
- var node = createNode(195 /* YieldExpression */);
+ var node = createNode(196 /* YieldExpression */);
// YieldExpression[In] :
// yield
// yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield]
@@ -16479,13 +17316,13 @@ var ts;
ts.Debug.assert(token() === 35 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
var node;
if (asyncModifier) {
- node = createNode(185 /* ArrowFunction */, asyncModifier.pos);
+ node = createNode(186 /* ArrowFunction */, asyncModifier.pos);
node.modifiers = asyncModifier;
}
else {
- node = createNode(185 /* ArrowFunction */, identifier.pos);
+ node = createNode(186 /* ArrowFunction */, identifier.pos);
}
- var parameter = createNode(144 /* Parameter */, identifier.pos);
+ var parameter = createNode(145 /* Parameter */, identifier.pos);
parameter.name = identifier;
finishNode(parameter);
node.parameters = createNodeArray([parameter], parameter.pos);
@@ -16667,7 +17504,7 @@ var ts;
return 0 /* False */;
}
function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
- var node = createNode(185 /* ArrowFunction */);
+ var node = createNode(186 /* ArrowFunction */);
node.modifiers = parseModifiersForArrowFunction();
var isAsync = !!(ts.getModifierFlags(node) & 256 /* Async */);
// Arrow functions are never generators.
@@ -16733,7 +17570,7 @@ var ts;
}
// Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and
// we do not that for the 'whenFalse' part.
- var node = createNode(193 /* ConditionalExpression */, leftOperand.pos);
+ var node = createNode(194 /* ConditionalExpression */, leftOperand.pos);
node.condition = leftOperand;
node.questionToken = questionToken;
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
@@ -16746,7 +17583,7 @@ var ts;
return parseBinaryExpressionRest(precedence, leftOperand);
}
function isInOrOfKeyword(t) {
- return t === 91 /* InKeyword */ || t === 140 /* OfKeyword */;
+ return t === 91 /* InKeyword */ || t === 141 /* OfKeyword */;
}
function parseBinaryExpressionRest(precedence, leftOperand) {
while (true) {
@@ -16854,39 +17691,39 @@ var ts;
return -1;
}
function makeBinaryExpression(left, operatorToken, right) {
- var node = createNode(192 /* BinaryExpression */, left.pos);
+ var node = createNode(193 /* BinaryExpression */, left.pos);
node.left = left;
node.operatorToken = operatorToken;
node.right = right;
return finishNode(node);
}
function makeAsExpression(left, right) {
- var node = createNode(200 /* AsExpression */, left.pos);
+ var node = createNode(201 /* AsExpression */, left.pos);
node.expression = left;
node.type = right;
return finishNode(node);
}
function parsePrefixUnaryExpression() {
- var node = createNode(190 /* PrefixUnaryExpression */);
+ var node = createNode(191 /* PrefixUnaryExpression */);
node.operator = token();
nextToken();
node.operand = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseDeleteExpression() {
- var node = createNode(186 /* DeleteExpression */);
+ var node = createNode(187 /* DeleteExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseTypeOfExpression() {
- var node = createNode(187 /* TypeOfExpression */);
+ var node = createNode(188 /* TypeOfExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
}
function parseVoidExpression() {
- var node = createNode(188 /* VoidExpression */);
+ var node = createNode(189 /* VoidExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -16902,7 +17739,7 @@ var ts;
return false;
}
function parseAwaitExpression() {
- var node = createNode(189 /* AwaitExpression */);
+ var node = createNode(190 /* AwaitExpression */);
nextToken();
node.expression = parseSimpleUnaryExpression();
return finishNode(node);
@@ -16945,7 +17782,7 @@ var ts;
var simpleUnaryExpression = parseSimpleUnaryExpression();
if (token() === 39 /* AsteriskAsteriskToken */) {
var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
- if (simpleUnaryExpression.kind === 182 /* TypeAssertionExpression */) {
+ if (simpleUnaryExpression.kind === 183 /* TypeAssertionExpression */) {
parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
}
else {
@@ -16990,6 +17827,7 @@ var ts;
if (isAwaitExpression()) {
return parseAwaitExpression();
}
+ // falls through
default:
return parseIncrementExpression();
}
@@ -17023,7 +17861,7 @@ var ts;
return false;
}
// We are in JSX context and the token is part of JSXElement.
- // Fall through
+ // falls through
default:
return true;
}
@@ -17041,7 +17879,7 @@ var ts;
*/
function parseIncrementExpression() {
if (token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) {
- var node = createNode(190 /* PrefixUnaryExpression */);
+ var node = createNode(191 /* PrefixUnaryExpression */);
node.operator = token();
nextToken();
node.operand = parseLeftHandSideExpressionOrHigher();
@@ -17054,7 +17892,7 @@ var ts;
var expression = parseLeftHandSideExpressionOrHigher();
ts.Debug.assert(ts.isLeftHandSideExpression(expression));
if ((token() === 42 /* PlusPlusToken */ || token() === 43 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) {
- var node = createNode(191 /* PostfixUnaryExpression */, expression.pos);
+ var node = createNode(192 /* PostfixUnaryExpression */, expression.pos);
node.operand = expression;
node.operator = token();
nextToken();
@@ -17158,7 +17996,7 @@ var ts;
}
// If we have seen "super" it must be followed by '(' or '.'.
// If it wasn't then just try to parse out a '.' and report an error.
- var node = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var node = createNode(178 /* PropertyAccessExpression */, expression.pos);
node.expression = expression;
parseExpectedToken(22 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
@@ -17183,8 +18021,8 @@ var ts;
function parseJsxElementOrSelfClosingElement(inExpressionContext) {
var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
var result;
- if (opening.kind === 248 /* JsxOpeningElement */) {
- var node = createNode(246 /* JsxElement */, opening.pos);
+ if (opening.kind === 250 /* JsxOpeningElement */) {
+ var node = createNode(248 /* JsxElement */, opening.pos);
node.openingElement = opening;
node.children = parseJsxChildren(node.openingElement.tagName);
node.closingElement = parseJsxClosingElement(inExpressionContext);
@@ -17194,7 +18032,7 @@ var ts;
result = finishNode(node);
}
else {
- ts.Debug.assert(opening.kind === 247 /* JsxSelfClosingElement */);
+ ts.Debug.assert(opening.kind === 249 /* JsxSelfClosingElement */);
// Nothing else to do for self-closing elements
result = opening;
}
@@ -17209,7 +18047,7 @@ var ts;
var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); });
if (invalidElement) {
parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element);
- var badNode = createNode(192 /* BinaryExpression */, result.pos);
+ var badNode = createNode(193 /* BinaryExpression */, result.pos);
badNode.end = invalidElement.end;
badNode.left = result;
badNode.right = invalidElement;
@@ -17252,23 +18090,31 @@ var ts;
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName));
break;
}
+ else if (token() === 7 /* ConflictMarkerTrivia */) {
+ break;
+ }
result.push(parseJsxChild());
}
result.end = scanner.getTokenPos();
parsingContext = saveParsingContext;
return result;
}
+ function parseJsxAttributes() {
+ var jsxAttributes = createNode(253 /* JsxAttributes */);
+ jsxAttributes.properties = parseList(13 /* JsxAttributes */, parseJsxAttribute);
+ return finishNode(jsxAttributes);
+ }
function parseJsxOpeningOrSelfClosingElement(inExpressionContext) {
var fullStart = scanner.getStartPos();
parseExpected(26 /* LessThanToken */);
var tagName = parseJsxElementName();
- var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute);
+ var attributes = parseJsxAttributes();
var node;
if (token() === 28 /* GreaterThanToken */) {
// Closing tag, so scan the immediately-following text with the JSX scanning instead
// of regular scanning to avoid treating illegal characters (e.g. '#') as immediate
// scanning errors
- node = createNode(248 /* JsxOpeningElement */, fullStart);
+ node = createNode(250 /* JsxOpeningElement */, fullStart);
scanJsxText();
}
else {
@@ -17280,7 +18126,7 @@ var ts;
parseExpected(28 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false);
scanJsxText();
}
- node = createNode(247 /* JsxSelfClosingElement */, fullStart);
+ node = createNode(249 /* JsxSelfClosingElement */, fullStart);
}
node.tagName = tagName;
node.attributes = attributes;
@@ -17296,7 +18142,7 @@ var ts;
var expression = token() === 98 /* ThisKeyword */ ?
parseTokenNode() : parseIdentifierName();
while (parseOptional(22 /* DotToken */)) {
- var propertyAccess = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
expression = finishNode(propertyAccess);
@@ -17304,9 +18150,10 @@ var ts;
return expression;
}
function parseJsxExpression(inExpressionContext) {
- var node = createNode(252 /* JsxExpression */);
+ var node = createNode(255 /* JsxExpression */);
parseExpected(16 /* OpenBraceToken */);
if (token() !== 17 /* CloseBraceToken */) {
+ node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
node.expression = parseAssignmentExpressionOrHigher();
}
if (inExpressionContext) {
@@ -17323,7 +18170,7 @@ var ts;
return parseJsxSpreadAttribute();
}
scanJsxIdentifier();
- var node = createNode(250 /* JsxAttribute */);
+ var node = createNode(252 /* JsxAttribute */);
node.name = parseIdentifierName();
if (token() === 57 /* EqualsToken */) {
switch (scanJsxAttributeValue()) {
@@ -17338,7 +18185,7 @@ var ts;
return finishNode(node);
}
function parseJsxSpreadAttribute() {
- var node = createNode(251 /* JsxSpreadAttribute */);
+ var node = createNode(254 /* JsxSpreadAttribute */);
parseExpected(16 /* OpenBraceToken */);
parseExpected(23 /* DotDotDotToken */);
node.expression = parseExpression();
@@ -17346,7 +18193,7 @@ var ts;
return finishNode(node);
}
function parseJsxClosingElement(inExpressionContext) {
- var node = createNode(249 /* JsxClosingElement */);
+ var node = createNode(251 /* JsxClosingElement */);
parseExpected(27 /* LessThanSlashToken */);
node.tagName = parseJsxElementName();
if (inExpressionContext) {
@@ -17359,7 +18206,7 @@ var ts;
return finishNode(node);
}
function parseTypeAssertion() {
- var node = createNode(182 /* TypeAssertionExpression */);
+ var node = createNode(183 /* TypeAssertionExpression */);
parseExpected(26 /* LessThanToken */);
node.type = parseType();
parseExpected(28 /* GreaterThanToken */);
@@ -17370,7 +18217,7 @@ var ts;
while (true) {
var dotToken = parseOptionalToken(22 /* DotToken */);
if (dotToken) {
- var propertyAccess = createNode(177 /* PropertyAccessExpression */, expression.pos);
+ var propertyAccess = createNode(178 /* PropertyAccessExpression */, expression.pos);
propertyAccess.expression = expression;
propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true);
expression = finishNode(propertyAccess);
@@ -17378,14 +18225,14 @@ var ts;
}
if (token() === 50 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) {
nextToken();
- var nonNullExpression = createNode(201 /* NonNullExpression */, expression.pos);
+ var nonNullExpression = createNode(202 /* NonNullExpression */, expression.pos);
nonNullExpression.expression = expression;
expression = finishNode(nonNullExpression);
continue;
}
// when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName
if (!inDecoratorContext() && parseOptional(20 /* OpenBracketToken */)) {
- var indexedAccess = createNode(178 /* ElementAccessExpression */, expression.pos);
+ var indexedAccess = createNode(179 /* ElementAccessExpression */, expression.pos);
indexedAccess.expression = expression;
// It's not uncommon for a user to write: "new Type[]".
// Check for that common pattern and report a better error message.
@@ -17401,7 +18248,7 @@ var ts;
continue;
}
if (token() === 12 /* NoSubstitutionTemplateLiteral */ || token() === 13 /* TemplateHead */) {
- var tagExpression = createNode(181 /* TaggedTemplateExpression */, expression.pos);
+ var tagExpression = createNode(182 /* TaggedTemplateExpression */, expression.pos);
tagExpression.tag = expression;
tagExpression.template = token() === 12 /* NoSubstitutionTemplateLiteral */
? parseLiteralNode()
@@ -17424,7 +18271,7 @@ var ts;
if (!typeArguments) {
return expression;
}
- var callExpr = createNode(179 /* CallExpression */, expression.pos);
+ var callExpr = createNode(180 /* CallExpression */, expression.pos);
callExpr.expression = expression;
callExpr.typeArguments = typeArguments;
callExpr.arguments = parseArgumentList();
@@ -17432,7 +18279,7 @@ var ts;
continue;
}
else if (token() === 18 /* OpenParenToken */) {
- var callExpr = createNode(179 /* CallExpression */, expression.pos);
+ var callExpr = createNode(180 /* CallExpression */, expression.pos);
callExpr.expression = expression;
callExpr.arguments = parseArgumentList();
expression = finishNode(callExpr);
@@ -17542,28 +18389,28 @@ var ts;
return parseIdentifier(ts.Diagnostics.Expression_expected);
}
function parseParenthesizedExpression() {
- var node = createNode(183 /* ParenthesizedExpression */);
+ var node = createNode(184 /* ParenthesizedExpression */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
parseExpected(19 /* CloseParenToken */);
return finishNode(node);
}
function parseSpreadElement() {
- var node = createNode(196 /* SpreadElement */);
+ var node = createNode(197 /* SpreadElement */);
parseExpected(23 /* DotDotDotToken */);
node.expression = parseAssignmentExpressionOrHigher();
return finishNode(node);
}
function parseArgumentOrArrayLiteralElement() {
return token() === 23 /* DotDotDotToken */ ? parseSpreadElement() :
- token() === 25 /* CommaToken */ ? createNode(198 /* OmittedExpression */) :
+ token() === 25 /* CommaToken */ ? createNode(199 /* OmittedExpression */) :
parseAssignmentExpressionOrHigher();
}
function parseArgumentExpression() {
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
}
function parseArrayLiteralExpression() {
- var node = createNode(175 /* ArrayLiteralExpression */);
+ var node = createNode(176 /* ArrayLiteralExpression */);
parseExpected(20 /* OpenBracketToken */);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17574,10 +18421,10 @@ var ts;
}
function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
if (parseContextualModifier(124 /* GetKeyword */)) {
- return parseAccessorDeclaration(151 /* GetAccessor */, fullStart, decorators, modifiers);
+ return parseAccessorDeclaration(152 /* GetAccessor */, fullStart, decorators, modifiers);
}
- else if (parseContextualModifier(133 /* SetKeyword */)) {
- return parseAccessorDeclaration(152 /* SetAccessor */, fullStart, decorators, modifiers);
+ else if (parseContextualModifier(134 /* SetKeyword */)) {
+ return parseAccessorDeclaration(153 /* SetAccessor */, fullStart, decorators, modifiers);
}
return undefined;
}
@@ -17585,7 +18432,7 @@ var ts;
var fullStart = scanner.getStartPos();
var dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
if (dotDotDotToken) {
- var spreadElement = createNode(259 /* SpreadAssignment */, fullStart);
+ var spreadElement = createNode(262 /* SpreadAssignment */, fullStart);
spreadElement.expression = parseAssignmentExpressionOrHigher();
return addJSDocComment(finishNode(spreadElement));
}
@@ -17610,7 +18457,7 @@ var ts;
// this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 25 /* CommaToken */ || token() === 17 /* CloseBraceToken */ || token() === 57 /* EqualsToken */);
if (isShorthandPropertyAssignment) {
- var shorthandDeclaration = createNode(258 /* ShorthandPropertyAssignment */, fullStart);
+ var shorthandDeclaration = createNode(261 /* ShorthandPropertyAssignment */, fullStart);
shorthandDeclaration.name = propertyName;
shorthandDeclaration.questionToken = questionToken;
var equalsToken = parseOptionalToken(57 /* EqualsToken */);
@@ -17621,7 +18468,7 @@ var ts;
return addJSDocComment(finishNode(shorthandDeclaration));
}
else {
- var propertyAssignment = createNode(257 /* PropertyAssignment */, fullStart);
+ var propertyAssignment = createNode(260 /* PropertyAssignment */, fullStart);
propertyAssignment.modifiers = modifiers;
propertyAssignment.name = propertyName;
propertyAssignment.questionToken = questionToken;
@@ -17631,7 +18478,7 @@ var ts;
}
}
function parseObjectLiteralExpression() {
- var node = createNode(176 /* ObjectLiteralExpression */);
+ var node = createNode(177 /* ObjectLiteralExpression */);
parseExpected(16 /* OpenBraceToken */);
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17650,7 +18497,7 @@ var ts;
if (saveDecoratorContext) {
setDecoratorContext(/*val*/ false);
}
- var node = createNode(184 /* FunctionExpression */);
+ var node = createNode(185 /* FunctionExpression */);
node.modifiers = parseModifiers();
parseExpected(88 /* FunctionKeyword */);
node.asteriskToken = parseOptionalToken(38 /* AsteriskToken */);
@@ -17672,8 +18519,15 @@ var ts;
return isIdentifier() ? parseIdentifier() : undefined;
}
function parseNewExpression() {
- var node = createNode(180 /* NewExpression */);
+ var fullStart = scanner.getStartPos();
parseExpected(93 /* NewKeyword */);
+ if (parseOptional(22 /* DotToken */)) {
+ var node_1 = createNode(203 /* MetaProperty */, fullStart);
+ node_1.keywordToken = 93 /* NewKeyword */;
+ node_1.name = parseIdentifierName();
+ return finishNode(node_1);
+ }
+ var node = createNode(181 /* NewExpression */, fullStart);
node.expression = parseMemberExpressionOrHigher();
node.typeArguments = tryParse(parseTypeArgumentsInExpression);
if (node.typeArguments || token() === 18 /* OpenParenToken */) {
@@ -17683,7 +18537,7 @@ var ts;
}
// STATEMENTS
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
- var node = createNode(204 /* Block */);
+ var node = createNode(206 /* Block */);
if (parseExpected(16 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) {
if (scanner.hasPrecedingLineBreak()) {
node.multiLine = true;
@@ -17716,12 +18570,12 @@ var ts;
return block;
}
function parseEmptyStatement() {
- var node = createNode(206 /* EmptyStatement */);
+ var node = createNode(208 /* EmptyStatement */);
parseExpected(24 /* SemicolonToken */);
return finishNode(node);
}
function parseIfStatement() {
- var node = createNode(208 /* IfStatement */);
+ var node = createNode(210 /* IfStatement */);
parseExpected(89 /* IfKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17731,7 +18585,7 @@ var ts;
return finishNode(node);
}
function parseDoStatement() {
- var node = createNode(209 /* DoStatement */);
+ var node = createNode(211 /* DoStatement */);
parseExpected(80 /* DoKeyword */);
node.statement = parseStatement();
parseExpected(105 /* WhileKeyword */);
@@ -17746,7 +18600,7 @@ var ts;
return finishNode(node);
}
function parseWhileStatement() {
- var node = createNode(210 /* WhileStatement */);
+ var node = createNode(212 /* WhileStatement */);
parseExpected(105 /* WhileKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17757,6 +18611,7 @@ var ts;
function parseForOrForInOrForOfStatement() {
var pos = getNodePos();
parseExpected(87 /* ForKeyword */);
+ var awaitToken = parseOptionalToken(120 /* AwaitKeyword */);
parseExpected(18 /* OpenParenToken */);
var initializer = undefined;
if (token() !== 24 /* SemicolonToken */) {
@@ -17768,22 +18623,23 @@ var ts;
}
}
var forOrForInOrForOfStatement;
- if (parseOptional(91 /* InKeyword */)) {
- var forInStatement = createNode(212 /* ForInStatement */, pos);
- forInStatement.initializer = initializer;
- forInStatement.expression = allowInAnd(parseExpression);
- parseExpected(19 /* CloseParenToken */);
- forOrForInOrForOfStatement = forInStatement;
- }
- else if (parseOptional(140 /* OfKeyword */)) {
- var forOfStatement = createNode(213 /* ForOfStatement */, pos);
+ if (awaitToken ? parseExpected(141 /* OfKeyword */) : parseOptional(141 /* OfKeyword */)) {
+ var forOfStatement = createNode(215 /* ForOfStatement */, pos);
+ forOfStatement.awaitModifier = awaitToken;
forOfStatement.initializer = initializer;
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
parseExpected(19 /* CloseParenToken */);
forOrForInOrForOfStatement = forOfStatement;
}
+ else if (parseOptional(91 /* InKeyword */)) {
+ var forInStatement = createNode(214 /* ForInStatement */, pos);
+ forInStatement.initializer = initializer;
+ forInStatement.expression = allowInAnd(parseExpression);
+ parseExpected(19 /* CloseParenToken */);
+ forOrForInOrForOfStatement = forInStatement;
+ }
else {
- var forStatement = createNode(211 /* ForStatement */, pos);
+ var forStatement = createNode(213 /* ForStatement */, pos);
forStatement.initializer = initializer;
parseExpected(24 /* SemicolonToken */);
if (token() !== 24 /* SemicolonToken */ && token() !== 19 /* CloseParenToken */) {
@@ -17801,7 +18657,7 @@ var ts;
}
function parseBreakOrContinueStatement(kind) {
var node = createNode(kind);
- parseExpected(kind === 215 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */);
+ parseExpected(kind === 217 /* BreakStatement */ ? 71 /* BreakKeyword */ : 76 /* ContinueKeyword */);
if (!canParseSemicolon()) {
node.label = parseIdentifier();
}
@@ -17809,7 +18665,7 @@ var ts;
return finishNode(node);
}
function parseReturnStatement() {
- var node = createNode(216 /* ReturnStatement */);
+ var node = createNode(218 /* ReturnStatement */);
parseExpected(95 /* ReturnKeyword */);
if (!canParseSemicolon()) {
node.expression = allowInAnd(parseExpression);
@@ -17818,7 +18674,7 @@ var ts;
return finishNode(node);
}
function parseWithStatement() {
- var node = createNode(217 /* WithStatement */);
+ var node = createNode(219 /* WithStatement */);
parseExpected(106 /* WithKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
@@ -17827,7 +18683,7 @@ var ts;
return finishNode(node);
}
function parseCaseClause() {
- var node = createNode(253 /* CaseClause */);
+ var node = createNode(256 /* CaseClause */);
parseExpected(72 /* CaseKeyword */);
node.expression = allowInAnd(parseExpression);
parseExpected(55 /* ColonToken */);
@@ -17835,7 +18691,7 @@ var ts;
return finishNode(node);
}
function parseDefaultClause() {
- var node = createNode(254 /* DefaultClause */);
+ var node = createNode(257 /* DefaultClause */);
parseExpected(78 /* DefaultKeyword */);
parseExpected(55 /* ColonToken */);
node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement);
@@ -17845,12 +18701,12 @@ var ts;
return token() === 72 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause();
}
function parseSwitchStatement() {
- var node = createNode(218 /* SwitchStatement */);
+ var node = createNode(220 /* SwitchStatement */);
parseExpected(97 /* SwitchKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = allowInAnd(parseExpression);
parseExpected(19 /* CloseParenToken */);
- var caseBlock = createNode(232 /* CaseBlock */, scanner.getStartPos());
+ var caseBlock = createNode(234 /* CaseBlock */, scanner.getStartPos());
parseExpected(16 /* OpenBraceToken */);
caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause);
parseExpected(17 /* CloseBraceToken */);
@@ -17865,7 +18721,7 @@ var ts;
// directly as that might consume an expression on the following line.
// We just return 'undefined' in that case. The actual error will be reported in the
// grammar walker.
- var node = createNode(220 /* ThrowStatement */);
+ var node = createNode(222 /* ThrowStatement */);
parseExpected(99 /* ThrowKeyword */);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
parseSemicolon();
@@ -17873,7 +18729,7 @@ var ts;
}
// TODO: Review for error recovery
function parseTryStatement() {
- var node = createNode(221 /* TryStatement */);
+ var node = createNode(223 /* TryStatement */);
parseExpected(101 /* TryKeyword */);
node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false);
node.catchClause = token() === 73 /* CatchKeyword */ ? parseCatchClause() : undefined;
@@ -17886,7 +18742,7 @@ var ts;
return finishNode(node);
}
function parseCatchClause() {
- var result = createNode(256 /* CatchClause */);
+ var result = createNode(259 /* CatchClause */);
parseExpected(73 /* CatchKeyword */);
if (parseExpected(18 /* OpenParenToken */)) {
result.variableDeclaration = parseVariableDeclaration();
@@ -17896,7 +18752,7 @@ var ts;
return finishNode(result);
}
function parseDebuggerStatement() {
- var node = createNode(222 /* DebuggerStatement */);
+ var node = createNode(224 /* DebuggerStatement */);
parseExpected(77 /* DebuggerKeyword */);
parseSemicolon();
return finishNode(node);
@@ -17908,13 +18764,13 @@ var ts;
var fullStart = scanner.getStartPos();
var expression = allowInAnd(parseExpression);
if (expression.kind === 70 /* Identifier */ && parseOptional(55 /* ColonToken */)) {
- var labeledStatement = createNode(219 /* LabeledStatement */, fullStart);
+ var labeledStatement = createNode(221 /* LabeledStatement */, fullStart);
labeledStatement.label = expression;
labeledStatement.statement = parseStatement();
return addJSDocComment(finishNode(labeledStatement));
}
else {
- var expressionStatement = createNode(207 /* ExpressionStatement */, fullStart);
+ var expressionStatement = createNode(209 /* ExpressionStatement */, fullStart);
expressionStatement.expression = expression;
parseSemicolon();
return addJSDocComment(finishNode(expressionStatement));
@@ -17924,6 +18780,10 @@ var ts;
nextToken();
return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak();
}
+ function nextTokenIsClassKeywordOnSameLine() {
+ nextToken();
+ return token() === 74 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak();
+ }
function nextTokenIsFunctionKeywordOnSameLine() {
nextToken();
return token() === 88 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak();
@@ -17964,7 +18824,7 @@ var ts;
//
// could be legal, it would add complexity for very little gain.
case 108 /* InterfaceKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return nextTokenIsIdentifierOnSameLine();
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
@@ -17982,7 +18842,7 @@ var ts;
return false;
}
continue;
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
nextToken();
return token() === 16 /* OpenBraceToken */ || token() === 70 /* Identifier */ || token() === 83 /* ExportKeyword */;
case 90 /* ImportKeyword */:
@@ -18044,8 +18904,8 @@ var ts;
case 108 /* InterfaceKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
- case 136 /* TypeKeyword */:
- case 139 /* GlobalKeyword */:
+ case 137 /* TypeKeyword */:
+ case 140 /* GlobalKeyword */:
// When these don't start a declaration, they're an identifier in an expression statement
return true;
case 113 /* PublicKeyword */:
@@ -18095,9 +18955,9 @@ var ts;
case 87 /* ForKeyword */:
return parseForOrForInOrForOfStatement();
case 76 /* ContinueKeyword */:
- return parseBreakOrContinueStatement(214 /* ContinueStatement */);
+ return parseBreakOrContinueStatement(216 /* ContinueStatement */);
case 71 /* BreakKeyword */:
- return parseBreakOrContinueStatement(215 /* BreakStatement */);
+ return parseBreakOrContinueStatement(217 /* BreakStatement */);
case 95 /* ReturnKeyword */:
return parseReturnStatement();
case 106 /* WithKeyword */:
@@ -18117,7 +18977,7 @@ var ts;
return parseDeclaration();
case 119 /* AsyncKeyword */:
case 108 /* InterfaceKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
case 123 /* DeclareKeyword */:
@@ -18131,7 +18991,7 @@ var ts;
case 116 /* AbstractKeyword */:
case 114 /* StaticKeyword */:
case 130 /* ReadonlyKeyword */:
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
if (isStartOfDeclaration()) {
return parseDeclaration();
}
@@ -18154,11 +19014,11 @@ var ts;
return parseClassDeclaration(fullStart, decorators, modifiers);
case 108 /* InterfaceKeyword */:
return parseInterfaceDeclaration(fullStart, decorators, modifiers);
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
case 82 /* EnumKeyword */:
return parseEnumDeclaration(fullStart, decorators, modifiers);
- case 139 /* GlobalKeyword */:
+ case 140 /* GlobalKeyword */:
case 127 /* ModuleKeyword */:
case 128 /* NamespaceKeyword */:
return parseModuleDeclaration(fullStart, decorators, modifiers);
@@ -18179,7 +19039,7 @@ var ts;
if (decorators || modifiers) {
// We reached this point because we encountered decorators and/or modifiers and assumed a declaration
// would follow. For recovery and error reporting purposes, return an incomplete declaration.
- var node = createMissingNode(244 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
+ var node = createMissingNode(246 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
node.pos = fullStart;
node.decorators = decorators;
node.modifiers = modifiers;
@@ -18201,16 +19061,16 @@ var ts;
// DECLARATIONS
function parseArrayBindingElement() {
if (token() === 25 /* CommaToken */) {
- return createNode(198 /* OmittedExpression */);
+ return createNode(199 /* OmittedExpression */);
}
- var node = createNode(174 /* BindingElement */);
+ var node = createNode(175 /* BindingElement */);
node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
node.name = parseIdentifierOrPattern();
node.initializer = parseBindingElementInitializer(/*inParameter*/ false);
return finishNode(node);
}
function parseObjectBindingElement() {
- var node = createNode(174 /* BindingElement */);
+ var node = createNode(175 /* BindingElement */);
node.dotDotDotToken = parseOptionalToken(23 /* DotDotDotToken */);
var tokenIsIdentifier = isIdentifier();
var propertyName = parsePropertyName();
@@ -18226,14 +19086,14 @@ var ts;
return finishNode(node);
}
function parseObjectBindingPattern() {
- var node = createNode(172 /* ObjectBindingPattern */);
+ var node = createNode(173 /* ObjectBindingPattern */);
parseExpected(16 /* OpenBraceToken */);
node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement);
parseExpected(17 /* CloseBraceToken */);
return finishNode(node);
}
function parseArrayBindingPattern() {
- var node = createNode(173 /* ArrayBindingPattern */);
+ var node = createNode(174 /* ArrayBindingPattern */);
parseExpected(20 /* OpenBracketToken */);
node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement);
parseExpected(21 /* CloseBracketToken */);
@@ -18252,7 +19112,7 @@ var ts;
return parseIdentifier();
}
function parseVariableDeclaration() {
- var node = createNode(223 /* VariableDeclaration */);
+ var node = createNode(225 /* VariableDeclaration */);
node.name = parseIdentifierOrPattern();
node.type = parseTypeAnnotation();
if (!isInOrOfKeyword(token())) {
@@ -18261,7 +19121,7 @@ var ts;
return finishNode(node);
}
function parseVariableDeclarationList(inForStatementInitializer) {
- var node = createNode(224 /* VariableDeclarationList */);
+ var node = createNode(226 /* VariableDeclarationList */);
switch (token()) {
case 103 /* VarKeyword */:
break;
@@ -18284,7 +19144,7 @@ var ts;
// So we need to look ahead to determine if 'of' should be treated as a keyword in
// this context.
// The checker will then give an error that there is an empty declaration list.
- if (token() === 140 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) {
+ if (token() === 141 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) {
node.declarations = createMissingList();
}
else {
@@ -18299,7 +19159,7 @@ var ts;
return nextTokenIsIdentifier() && nextToken() === 19 /* CloseParenToken */;
}
function parseVariableStatement(fullStart, decorators, modifiers) {
- var node = createNode(205 /* VariableStatement */, fullStart);
+ var node = createNode(207 /* VariableStatement */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false);
@@ -18307,7 +19167,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseFunctionDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(225 /* FunctionDeclaration */, fullStart);
+ var node = createNode(227 /* FunctionDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(88 /* FunctionKeyword */);
@@ -18320,7 +19180,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseConstructorDeclaration(pos, decorators, modifiers) {
- var node = createNode(150 /* Constructor */, pos);
+ var node = createNode(151 /* Constructor */, pos);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(122 /* ConstructorKeyword */);
@@ -18329,7 +19189,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
- var method = createNode(149 /* MethodDeclaration */, fullStart);
+ var method = createNode(150 /* MethodDeclaration */, fullStart);
method.decorators = decorators;
method.modifiers = modifiers;
method.asteriskToken = asteriskToken;
@@ -18342,7 +19202,7 @@ var ts;
return addJSDocComment(finishNode(method));
}
function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
- var property = createNode(147 /* PropertyDeclaration */, fullStart);
+ var property = createNode(148 /* PropertyDeclaration */, fullStart);
property.decorators = decorators;
property.modifiers = modifiers;
property.name = name;
@@ -18359,7 +19219,7 @@ var ts;
// The checker may still error in the static case to explicitly disallow the yield expression.
property.initializer = ts.hasModifier(property, 32 /* Static */)
? allowInAnd(parseNonParameterInitializer)
- : doOutsideOfContext(131072 /* YieldContext */ | 65536 /* DisallowInContext */, parseNonParameterInitializer);
+ : doOutsideOfContext(4096 /* YieldContext */ | 2048 /* DisallowInContext */, parseNonParameterInitializer);
parseSemicolon();
return addJSDocComment(finishNode(property));
}
@@ -18435,7 +19295,7 @@ var ts;
// If we were able to get any potential identifier...
if (idToken !== undefined) {
// If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse.
- if (!ts.isKeyword(idToken) || idToken === 133 /* SetKeyword */ || idToken === 124 /* GetKeyword */) {
+ if (!ts.isKeyword(idToken) || idToken === 134 /* SetKeyword */ || idToken === 124 /* GetKeyword */) {
return true;
}
// If it *is* a keyword, but not an accessor, check a little farther along
@@ -18465,7 +19325,7 @@ var ts;
if (!parseOptional(56 /* AtToken */)) {
break;
}
- var decorator = createNode(145 /* Decorator */, decoratorStart);
+ var decorator = createNode(146 /* Decorator */, decoratorStart);
decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
finishNode(decorator);
if (!decorators) {
@@ -18531,7 +19391,7 @@ var ts;
}
function parseClassElement() {
if (token() === 24 /* SemicolonToken */) {
- var result = createNode(203 /* SemicolonClassElement */);
+ var result = createNode(205 /* SemicolonClassElement */);
nextToken();
return finishNode(result);
}
@@ -18559,8 +19419,8 @@ var ts;
}
if (decorators || modifiers) {
// treat this as a property declaration with a missing name.
- var name_13 = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
- return parsePropertyDeclaration(fullStart, decorators, modifiers, name_13, /*questionToken*/ undefined);
+ var name = createMissingNode(70 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
+ return parsePropertyDeclaration(fullStart, decorators, modifiers, name, /*questionToken*/ undefined);
}
// 'isClassMemberStart' should have hinted not to attempt parsing.
ts.Debug.fail("Should not have attempted to parse class member declaration.");
@@ -18569,10 +19429,10 @@ var ts;
return parseClassDeclarationOrExpression(
/*fullStart*/ scanner.getStartPos(),
/*decorators*/ undefined,
- /*modifiers*/ undefined, 197 /* ClassExpression */);
+ /*modifiers*/ undefined, 198 /* ClassExpression */);
}
function parseClassDeclaration(fullStart, decorators, modifiers) {
- return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 226 /* ClassDeclaration */);
+ return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 228 /* ClassDeclaration */);
}
function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
var node = createNode(kind, fullStart);
@@ -18615,9 +19475,10 @@ var ts;
return undefined;
}
function parseHeritageClause() {
- if (token() === 84 /* ExtendsKeyword */ || token() === 107 /* ImplementsKeyword */) {
- var node = createNode(255 /* HeritageClause */);
- node.token = token();
+ var tok = token();
+ if (tok === 84 /* ExtendsKeyword */ || tok === 107 /* ImplementsKeyword */) {
+ var node = createNode(258 /* HeritageClause */);
+ node.token = tok;
nextToken();
node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments);
return finishNode(node);
@@ -18625,7 +19486,7 @@ var ts;
return undefined;
}
function parseExpressionWithTypeArguments() {
- var node = createNode(199 /* ExpressionWithTypeArguments */);
+ var node = createNode(200 /* ExpressionWithTypeArguments */);
node.expression = parseLeftHandSideExpressionOrHigher();
if (token() === 26 /* LessThanToken */) {
node.typeArguments = parseBracketedList(19 /* TypeArguments */, parseType, 26 /* LessThanToken */, 28 /* GreaterThanToken */);
@@ -18639,7 +19500,7 @@ var ts;
return parseList(5 /* ClassMembers */, parseClassElement);
}
function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(227 /* InterfaceDeclaration */, fullStart);
+ var node = createNode(229 /* InterfaceDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(108 /* InterfaceKeyword */);
@@ -18650,10 +19511,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(228 /* TypeAliasDeclaration */, fullStart);
+ var node = createNode(230 /* TypeAliasDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- parseExpected(136 /* TypeKeyword */);
+ parseExpected(137 /* TypeKeyword */);
node.name = parseIdentifier();
node.typeParameters = parseTypeParameters();
parseExpected(57 /* EqualsToken */);
@@ -18666,13 +19527,13 @@ var ts;
// ConstantEnumMemberSection, which starts at the beginning of an enum declaration
// or any time an integer literal initializer is encountered.
function parseEnumMember() {
- var node = createNode(260 /* EnumMember */, scanner.getStartPos());
+ var node = createNode(263 /* EnumMember */, scanner.getStartPos());
node.name = parsePropertyName();
node.initializer = allowInAnd(parseNonParameterInitializer);
return addJSDocComment(finishNode(node));
}
function parseEnumDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(229 /* EnumDeclaration */, fullStart);
+ var node = createNode(231 /* EnumDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
parseExpected(82 /* EnumKeyword */);
@@ -18687,7 +19548,7 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseModuleBlock() {
- var node = createNode(231 /* ModuleBlock */, scanner.getStartPos());
+ var node = createNode(233 /* ModuleBlock */, scanner.getStartPos());
if (parseExpected(16 /* OpenBraceToken */)) {
node.statements = parseList(1 /* BlockStatements */, parseStatement);
parseExpected(17 /* CloseBraceToken */);
@@ -18698,7 +19559,7 @@ var ts;
return finishNode(node);
}
function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
- var node = createNode(230 /* ModuleDeclaration */, fullStart);
+ var node = createNode(232 /* ModuleDeclaration */, fullStart);
// If we are parsing a dotted namespace name, we want to
// propagate the 'Namespace' flag across the names if set.
var namespaceFlag = flags & 16 /* Namespace */;
@@ -18712,10 +19573,10 @@ var ts;
return addJSDocComment(finishNode(node));
}
function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(230 /* ModuleDeclaration */, fullStart);
+ var node = createNode(232 /* ModuleDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
- if (token() === 139 /* GlobalKeyword */) {
+ if (token() === 140 /* GlobalKeyword */) {
// parse 'global' as name of global scope augmentation
node.name = parseIdentifier();
node.flags |= 512 /* GlobalAugmentation */;
@@ -18733,7 +19594,7 @@ var ts;
}
function parseModuleDeclaration(fullStart, decorators, modifiers) {
var flags = 0;
- if (token() === 139 /* GlobalKeyword */) {
+ if (token() === 140 /* GlobalKeyword */) {
// global augmentation
return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
}
@@ -18759,7 +19620,7 @@ var ts;
return nextToken() === 40 /* SlashToken */;
}
function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) {
- var exportDeclaration = createNode(233 /* NamespaceExportDeclaration */, fullStart);
+ var exportDeclaration = createNode(235 /* NamespaceExportDeclaration */, fullStart);
exportDeclaration.decorators = decorators;
exportDeclaration.modifiers = modifiers;
parseExpected(117 /* AsKeyword */);
@@ -18774,22 +19635,12 @@ var ts;
var identifier;
if (isIdentifier()) {
identifier = parseIdentifier();
- if (token() !== 25 /* CommaToken */ && token() !== 138 /* FromKeyword */) {
- // ImportEquals declaration of type:
- // import x = require("mod"); or
- // import x = M.x;
- var importEqualsDeclaration = createNode(234 /* ImportEqualsDeclaration */, fullStart);
- importEqualsDeclaration.decorators = decorators;
- importEqualsDeclaration.modifiers = modifiers;
- importEqualsDeclaration.name = identifier;
- parseExpected(57 /* EqualsToken */);
- importEqualsDeclaration.moduleReference = parseModuleReference();
- parseSemicolon();
- return addJSDocComment(finishNode(importEqualsDeclaration));
+ if (token() !== 25 /* CommaToken */ && token() !== 139 /* FromKeyword */) {
+ return parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier);
}
}
// Import statement
- var importDeclaration = createNode(235 /* ImportDeclaration */, fullStart);
+ var importDeclaration = createNode(237 /* ImportDeclaration */, fullStart);
importDeclaration.decorators = decorators;
importDeclaration.modifiers = modifiers;
// ImportDeclaration:
@@ -18799,12 +19650,22 @@ var ts;
token() === 38 /* AsteriskToken */ ||
token() === 16 /* OpenBraceToken */) {
importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
- parseExpected(138 /* FromKeyword */);
+ parseExpected(139 /* FromKeyword */);
}
importDeclaration.moduleSpecifier = parseModuleSpecifier();
parseSemicolon();
return finishNode(importDeclaration);
}
+ function parseImportEqualsDeclaration(fullStart, decorators, modifiers, identifier) {
+ var importEqualsDeclaration = createNode(236 /* ImportEqualsDeclaration */, fullStart);
+ importEqualsDeclaration.decorators = decorators;
+ importEqualsDeclaration.modifiers = modifiers;
+ importEqualsDeclaration.name = identifier;
+ parseExpected(57 /* EqualsToken */);
+ importEqualsDeclaration.moduleReference = parseModuleReference();
+ parseSemicolon();
+ return addJSDocComment(finishNode(importEqualsDeclaration));
+ }
function parseImportClause(identifier, fullStart) {
// ImportClause:
// ImportedDefaultBinding
@@ -18812,7 +19673,7 @@ var ts;
// NamedImports
// ImportedDefaultBinding, NameSpaceImport
// ImportedDefaultBinding, NamedImports
- var importClause = createNode(236 /* ImportClause */, fullStart);
+ var importClause = createNode(238 /* ImportClause */, fullStart);
if (identifier) {
// ImportedDefaultBinding:
// ImportedBinding
@@ -18822,7 +19683,7 @@ var ts;
// parse namespace or named imports
if (!importClause.name ||
parseOptional(25 /* CommaToken */)) {
- importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(238 /* NamedImports */);
+ importClause.namedBindings = token() === 38 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(240 /* NamedImports */);
}
return finishNode(importClause);
}
@@ -18832,7 +19693,7 @@ var ts;
: parseEntityName(/*allowReservedWords*/ false);
}
function parseExternalModuleReference() {
- var node = createNode(245 /* ExternalModuleReference */);
+ var node = createNode(247 /* ExternalModuleReference */);
parseExpected(131 /* RequireKeyword */);
parseExpected(18 /* OpenParenToken */);
node.expression = parseModuleSpecifier();
@@ -18855,7 +19716,7 @@ var ts;
function parseNamespaceImport() {
// NameSpaceImport:
// * as ImportedBinding
- var namespaceImport = createNode(237 /* NamespaceImport */);
+ var namespaceImport = createNode(239 /* NamespaceImport */);
parseExpected(38 /* AsteriskToken */);
parseExpected(117 /* AsKeyword */);
namespaceImport.name = parseIdentifier();
@@ -18870,14 +19731,14 @@ var ts;
// ImportsList:
// ImportSpecifier
// ImportsList, ImportSpecifier
- node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 238 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */);
+ node.elements = parseBracketedList(22 /* ImportOrExportSpecifiers */, kind === 240 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 16 /* OpenBraceToken */, 17 /* CloseBraceToken */);
return finishNode(node);
}
function parseExportSpecifier() {
- return parseImportOrExportSpecifier(243 /* ExportSpecifier */);
+ return parseImportOrExportSpecifier(245 /* ExportSpecifier */);
}
function parseImportSpecifier() {
- return parseImportOrExportSpecifier(239 /* ImportSpecifier */);
+ return parseImportOrExportSpecifier(241 /* ImportSpecifier */);
}
function parseImportOrExportSpecifier(kind) {
var node = createNode(kind);
@@ -18902,27 +19763,27 @@ var ts;
else {
node.name = identifierName;
}
- if (kind === 239 /* ImportSpecifier */ && checkIdentifierIsKeyword) {
+ if (kind === 241 /* ImportSpecifier */ && checkIdentifierIsKeyword) {
// Report error identifier expected
parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
}
return finishNode(node);
}
function parseExportDeclaration(fullStart, decorators, modifiers) {
- var node = createNode(241 /* ExportDeclaration */, fullStart);
+ var node = createNode(243 /* ExportDeclaration */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(38 /* AsteriskToken */)) {
- parseExpected(138 /* FromKeyword */);
+ parseExpected(139 /* FromKeyword */);
node.moduleSpecifier = parseModuleSpecifier();
}
else {
- node.exportClause = parseNamedImportsOrExports(242 /* NamedExports */);
+ node.exportClause = parseNamedImportsOrExports(244 /* NamedExports */);
// It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios,
// the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`)
// If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect.
- if (token() === 138 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) {
- parseExpected(138 /* FromKeyword */);
+ if (token() === 139 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) {
+ parseExpected(139 /* FromKeyword */);
node.moduleSpecifier = parseModuleSpecifier();
}
}
@@ -18930,7 +19791,7 @@ var ts;
return finishNode(node);
}
function parseExportAssignment(fullStart, decorators, modifiers) {
- var node = createNode(240 /* ExportAssignment */, fullStart);
+ var node = createNode(242 /* ExportAssignment */, fullStart);
node.decorators = decorators;
node.modifiers = modifiers;
if (parseOptional(57 /* EqualsToken */)) {
@@ -18949,6 +19810,7 @@ var ts;
var typeReferenceDirectives = [];
var amdDependencies = [];
var amdModuleName;
+ var checkJsDirective = undefined;
// Keep scanning all the leading trivia in the file until we get to something that
// isn't trivia. Any single line comment will be analyzed to see if it is a
// reference comment.
@@ -18962,7 +19824,11 @@ var ts;
break;
}
}
- var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
+ var range = {
+ kind: triviaScanner.getToken(),
+ pos: triviaScanner.getTokenPos(),
+ end: triviaScanner.getTextPos(),
+ };
var comment = sourceText.substring(range.pos, range.end);
var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
if (referencePathMatchResult) {
@@ -19002,20 +19868,30 @@ var ts;
amdDependencies.push(amdDependency);
}
}
+ var checkJsDirectiveRegEx = /^\/\/\/?\s*(@ts-check|@ts-nocheck)\s*$/gim;
+ var checkJsDirectiveMatchResult = checkJsDirectiveRegEx.exec(comment);
+ if (checkJsDirectiveMatchResult) {
+ checkJsDirective = {
+ enabled: ts.compareStrings(checkJsDirectiveMatchResult[1], "@ts-check", /*ignoreCase*/ true) === 0 /* EqualTo */,
+ end: range.end,
+ pos: range.pos
+ };
+ }
}
}
sourceFile.referencedFiles = referencedFiles;
sourceFile.typeReferenceDirectives = typeReferenceDirectives;
sourceFile.amdDependencies = amdDependencies;
sourceFile.moduleName = amdModuleName;
+ sourceFile.checkJsDirective = checkJsDirective;
}
function setExternalModuleIndicator(sourceFile) {
sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
return ts.hasModifier(node, 1 /* Export */)
- || node.kind === 234 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 245 /* ExternalModuleReference */
- || node.kind === 235 /* ImportDeclaration */
- || node.kind === 240 /* ExportAssignment */
- || node.kind === 241 /* ExportDeclaration */
+ || node.kind === 236 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 247 /* ExternalModuleReference */
+ || node.kind === 237 /* ImportDeclaration */
+ || node.kind === 242 /* ExportAssignment */
+ || node.kind === 243 /* ExportDeclaration */
? node
: undefined;
});
@@ -19090,7 +19966,7 @@ var ts;
// Parses out a JSDoc type expression.
/* @internal */
function parseJSDocTypeExpression() {
- var result = createNode(262 /* JSDocTypeExpression */, scanner.getTokenPos());
+ var result = createNode(266 /* JSDocTypeExpression */, scanner.getTokenPos());
parseExpected(16 /* OpenBraceToken */);
result.type = parseJSDocTopLevelType();
parseExpected(17 /* CloseBraceToken */);
@@ -19101,12 +19977,12 @@ var ts;
function parseJSDocTopLevelType() {
var type = parseJSDocType();
if (token() === 48 /* BarToken */) {
- var unionType = createNode(266 /* JSDocUnionType */, type.pos);
+ var unionType = createNode(270 /* JSDocUnionType */, type.pos);
unionType.types = parseJSDocTypeList(type);
type = finishNode(unionType);
}
if (token() === 57 /* EqualsToken */) {
- var optionalType = createNode(273 /* JSDocOptionalType */, type.pos);
+ var optionalType = createNode(277 /* JSDocOptionalType */, type.pos);
nextToken();
optionalType.type = type;
type = finishNode(optionalType);
@@ -19117,20 +19993,20 @@ var ts;
var type = parseBasicTypeExpression();
while (true) {
if (token() === 20 /* OpenBracketToken */) {
- var arrayType = createNode(265 /* JSDocArrayType */, type.pos);
+ var arrayType = createNode(269 /* JSDocArrayType */, type.pos);
arrayType.elementType = type;
nextToken();
parseExpected(21 /* CloseBracketToken */);
type = finishNode(arrayType);
}
else if (token() === 54 /* QuestionToken */) {
- var nullableType = createNode(268 /* JSDocNullableType */, type.pos);
+ var nullableType = createNode(272 /* JSDocNullableType */, type.pos);
nullableType.type = type;
nextToken();
type = finishNode(nullableType);
}
else if (token() === 50 /* ExclamationToken */) {
- var nonNullableType = createNode(269 /* JSDocNonNullableType */, type.pos);
+ var nonNullableType = createNode(273 /* JSDocNonNullableType */, type.pos);
nonNullableType.type = type;
nextToken();
type = finishNode(nonNullableType);
@@ -19164,14 +20040,15 @@ var ts;
case 98 /* ThisKeyword */:
return parseJSDocThisType();
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
case 94 /* NullKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 129 /* NeverKeyword */:
+ case 133 /* ObjectKeyword */:
return parseTokenNode();
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -19182,27 +20059,27 @@ var ts;
return parseJSDocTypeReference();
}
function parseJSDocThisType() {
- var result = createNode(277 /* JSDocThisType */);
+ var result = createNode(281 /* JSDocThisType */);
nextToken();
parseExpected(55 /* ColonToken */);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocConstructorType() {
- var result = createNode(276 /* JSDocConstructorType */);
+ var result = createNode(280 /* JSDocConstructorType */);
nextToken();
parseExpected(55 /* ColonToken */);
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocVariadicType() {
- var result = createNode(275 /* JSDocVariadicType */);
+ var result = createNode(279 /* JSDocVariadicType */);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocFunctionType() {
- var result = createNode(274 /* JSDocFunctionType */);
+ var result = createNode(278 /* JSDocFunctionType */);
nextToken();
parseExpected(18 /* OpenParenToken */);
result.parameters = parseDelimitedList(23 /* JSDocFunctionParameters */, parseJSDocParameter);
@@ -19215,7 +20092,7 @@ var ts;
return finishNode(result);
}
function parseJSDocParameter() {
- var parameter = createNode(144 /* Parameter */);
+ var parameter = createNode(145 /* Parameter */);
parameter.type = parseJSDocType();
if (parseOptional(57 /* EqualsToken */)) {
// TODO(rbuckton): Can this be changed to SyntaxKind.QuestionToken?
@@ -19224,7 +20101,7 @@ var ts;
return finishNode(parameter);
}
function parseJSDocTypeReference() {
- var result = createNode(272 /* JSDocTypeReference */);
+ var result = createNode(276 /* JSDocTypeReference */);
result.name = parseSimplePropertyName();
if (token() === 26 /* LessThanToken */) {
result.typeArguments = parseTypeArguments();
@@ -19259,24 +20136,24 @@ var ts;
}
}
function parseQualifiedName(left) {
- var result = createNode(141 /* QualifiedName */, left.pos);
+ var result = createNode(142 /* QualifiedName */, left.pos);
result.left = left;
result.right = parseIdentifierName();
return finishNode(result);
}
function parseJSDocRecordType() {
- var result = createNode(270 /* JSDocRecordType */);
+ var result = createNode(274 /* JSDocRecordType */);
result.literal = parseTypeLiteral();
return finishNode(result);
}
function parseJSDocNonNullableType() {
- var result = createNode(269 /* JSDocNonNullableType */);
+ var result = createNode(273 /* JSDocNonNullableType */);
nextToken();
result.type = parseJSDocType();
return finishNode(result);
}
function parseJSDocTupleType() {
- var result = createNode(267 /* JSDocTupleType */);
+ var result = createNode(271 /* JSDocTupleType */);
nextToken();
result.types = parseDelimitedList(26 /* JSDocTupleTypes */, parseJSDocType);
checkForTrailingComma(result.types);
@@ -19290,7 +20167,7 @@ var ts;
}
}
function parseJSDocUnionType() {
- var result = createNode(266 /* JSDocUnionType */);
+ var result = createNode(270 /* JSDocUnionType */);
nextToken();
result.types = parseJSDocTypeList(parseJSDocType());
parseExpected(19 /* CloseParenToken */);
@@ -19306,12 +20183,12 @@ var ts;
return types;
}
function parseJSDocAllType() {
- var result = createNode(263 /* JSDocAllType */);
+ var result = createNode(267 /* JSDocAllType */);
nextToken();
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(288 /* JSDocLiteralType */);
+ var result = createNode(292 /* JSDocLiteralType */);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -19334,11 +20211,11 @@ var ts;
token() === 28 /* GreaterThanToken */ ||
token() === 57 /* EqualsToken */ ||
token() === 48 /* BarToken */) {
- var result = createNode(264 /* JSDocUnknownType */, pos);
+ var result = createNode(268 /* JSDocUnknownType */, pos);
return finishNode(result);
}
else {
- var result = createNode(268 /* JSDocNullableType */, pos);
+ var result = createNode(272 /* JSDocNullableType */, pos);
result.type = parseJSDocType();
return finishNode(result);
}
@@ -19437,7 +20314,7 @@ var ts;
break;
case 38 /* AsteriskToken */:
var asterisk = scanner.getTokenText();
- if (state === 1 /* SawAsterisk */) {
+ if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) {
// If we've already seen an asterisk, then we can no longer parse a tag on this line
state = 2 /* SavingComments */;
pushComment(asterisk);
@@ -19458,7 +20335,10 @@ var ts;
case 5 /* WhitespaceTrivia */:
// only collect whitespace if we're already saving comments or have just crossed the comment indent margin
var whitespace = scanner.getTokenText();
- if (state === 2 /* SavingComments */ || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === 2 /* SavingComments */) {
+ comments.push(whitespace);
+ }
+ else if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent - 1));
}
indent += whitespace.length;
@@ -19466,6 +20346,8 @@ var ts;
case 1 /* EndOfFileToken */:
break;
default:
+ // anything other than whitespace or asterisk at the beginning of the line starts the comment text
+ state = 2 /* SavingComments */;
pushComment(scanner.getTokenText());
break;
}
@@ -19498,7 +20380,7 @@ var ts;
content.charCodeAt(start + 3) !== 42 /* asterisk */;
}
function createJSDocComment() {
- var result = createNode(278 /* JSDocComment */, start);
+ var result = createNode(282 /* JSDocComment */, start);
result.tags = tags;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
@@ -19556,7 +20438,7 @@ var ts;
}
function parseTagComments(indent) {
var comments = [];
- var state = 1 /* SawAsterisk */;
+ var state = 0 /* BeginningOfLine */;
var margin;
function pushComment(text) {
if (!margin) {
@@ -19597,7 +20479,8 @@ var ts;
indent += scanner.getTokenText().length;
break;
}
- // FALLTHROUGH otherwise to record the * as a comment
+ // record the * as a comment
+ // falls through
default:
state = 2 /* SavingComments */; // leading identifiers start recording as well
pushComment(scanner.getTokenText());
@@ -19614,7 +20497,7 @@ var ts;
return comments;
}
function parseUnknownTag(atToken, tagName) {
- var result = createNode(279 /* JSDocTag */, atToken.pos);
+ var result = createNode(283 /* JSDocTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
@@ -19671,7 +20554,7 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(281 /* JSDocParameterTag */, atToken.pos);
+ var result = createNode(285 /* JSDocParameterTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
@@ -19682,20 +20565,20 @@ var ts;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 282 /* JSDocReturnTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 286 /* JSDocReturnTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(282 /* JSDocReturnTag */, atToken.pos);
+ var result = createNode(286 /* JSDocReturnTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 283 /* JSDocTypeTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocTypeTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(283 /* JSDocTypeTag */, atToken.pos);
+ var result = createNode(287 /* JSDocTypeTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
@@ -19710,7 +20593,7 @@ var ts;
parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var result = createNode(286 /* JSDocPropertyTag */, atToken.pos);
+ var result = createNode(290 /* JSDocPropertyTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.name = name;
@@ -19719,7 +20602,7 @@ var ts;
}
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
- var result = createNode(280 /* JSDocAugmentsTag */, atToken.pos);
+ var result = createNode(284 /* JSDocAugmentsTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = typeExpression;
@@ -19728,25 +20611,30 @@ var ts;
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(285 /* JSDocTypedefTag */, atToken.pos);
+ var typedefTag = createNode(289 /* JSDocTypedefTag */, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
- while (rightNode.kind !== 70 /* Identifier */) {
+ while (true) {
+ if (rightNode.kind === 70 /* Identifier */ || !rightNode.body) {
+ // if node is identifier - use it as name
+ // otherwise use name of the rightmost part that we were able to parse
+ typedefTag.name = rightNode.kind === 70 /* Identifier */ ? rightNode : rightNode.name;
+ break;
+ }
rightNode = rightNode.body;
}
- typedefTag.name = rightNode;
}
typedefTag.typeExpression = typeExpression;
skipWhitespace();
if (typeExpression) {
- if (typeExpression.type.kind === 272 /* JSDocTypeReference */) {
+ if (typeExpression.type.kind === 276 /* JSDocTypeReference */) {
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 70 /* Identifier */) {
- var name_14 = jsDocTypeReference.name;
- if (name_14.text === "Object") {
+ var name = jsDocTypeReference.name;
+ if (name.text === "Object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -19760,7 +20648,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(287 /* JSDocTypeLiteral */, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(291 /* JSDocTypeLiteral */, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -19790,6 +20678,7 @@ var ts;
break;
case 70 /* Identifier */:
canParseTag = false;
+ break;
case 1 /* EndOfFileToken */:
break;
}
@@ -19801,7 +20690,7 @@ var ts;
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(22 /* DotToken */)) {
- var jsDocNamespaceNode = createNode(230 /* ModuleDeclaration */, pos);
+ var jsDocNamespaceNode = createNode(232 /* ModuleDeclaration */, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */);
@@ -19847,20 +20736,20 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 284 /* JSDocTemplateTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocTemplateTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
// Type parameter list looks like '@template T,U,V'
var typeParameters = createNodeArray();
while (true) {
- var name_15 = parseJSDocIdentifierName();
+ var name = parseJSDocIdentifierName();
skipWhitespace();
- if (!name_15) {
+ if (!name) {
parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
return undefined;
}
- var typeParameter = createNode(143 /* TypeParameter */, name_15.pos);
- typeParameter.name = name_15;
+ var typeParameter = createNode(144 /* TypeParameter */, name.pos);
+ typeParameter.name = name;
finishNode(typeParameter);
typeParameters.push(typeParameter);
if (token() === 25 /* CommaToken */) {
@@ -19871,7 +20760,7 @@ var ts;
break;
}
}
- var result = createNode(284 /* JSDocTemplateTag */, atToken.pos);
+ var result = createNode(288 /* JSDocTemplateTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -20345,7 +21234,7 @@ var ts;
if (position >= array.pos && position < array.end) {
// position was in this array. Search through this array to see if we find a
// viable element.
- for (var i = 0, n = array.length; i < n; i++) {
+ for (var i = 0; i < array.length; i++) {
var child = array[i];
if (child) {
if (child.pos === position) {
@@ -20391,16 +21280,16 @@ var ts;
function getModuleInstanceState(node) {
// A module is uninstantiated if it contains only
// 1. interface declarations, type alias declarations
- if (node.kind === 227 /* InterfaceDeclaration */ || node.kind === 228 /* TypeAliasDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 230 /* TypeAliasDeclaration */) {
return 0 /* NonInstantiated */;
}
else if (ts.isConstEnumDeclaration(node)) {
return 2 /* ConstEnumOnly */;
}
- else if ((node.kind === 235 /* ImportDeclaration */ || node.kind === 234 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) {
+ else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && !(ts.hasModifier(node, 1 /* Export */))) {
return 0 /* NonInstantiated */;
}
- else if (node.kind === 231 /* ModuleBlock */) {
+ else if (node.kind === 233 /* ModuleBlock */) {
var state_1 = 0 /* NonInstantiated */;
ts.forEachChild(node, function (n) {
switch (getModuleInstanceState(n)) {
@@ -20419,7 +21308,7 @@ var ts;
});
return state_1;
}
- else if (node.kind === 230 /* ModuleDeclaration */) {
+ else if (node.kind === 232 /* ModuleDeclaration */) {
var body = node.body;
return body ? getModuleInstanceState(body) : 1 /* Instantiated */;
}
@@ -20532,7 +21421,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if (opts.alwaysStrict && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
// bind in strict mode source files with alwaysStrict option
return true;
}
@@ -20560,7 +21449,7 @@ var ts;
if (symbolFlags & 107455 /* Value */) {
var valueDeclaration = symbol.valueDeclaration;
if (!valueDeclaration ||
- (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 230 /* ModuleDeclaration */)) {
+ (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 232 /* ModuleDeclaration */)) {
// other kinds of value declarations take precedence over modules
symbol.valueDeclaration = node;
}
@@ -20573,7 +21462,7 @@ var ts;
if (ts.isAmbientModule(node)) {
return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
}
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = node.name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
@@ -20585,27 +21474,28 @@ var ts;
return node.name.text;
}
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return "__constructor";
- case 158 /* FunctionType */:
- case 153 /* CallSignature */:
+ case 159 /* FunctionType */:
+ case 154 /* CallSignature */:
return "__call";
- case 159 /* ConstructorType */:
- case 154 /* ConstructSignature */:
+ case 160 /* ConstructorType */:
+ case 155 /* ConstructSignature */:
return "__new";
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return "__index";
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return "__export";
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return node.isExportEquals ? "export=" : "default";
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (ts.getSpecialPropertyAssignmentKind(node)) {
case 2 /* ModuleExports */:
// module.exports = ...
return "export=";
case 1 /* ExportsProperty */:
case 4 /* ThisProperty */:
+ case 5 /* Property */:
// exports.x = ... or this.y = ...
return node.left.name.text;
case 3 /* PrototypeProperty */:
@@ -20614,22 +21504,22 @@ var ts;
}
ts.Debug.fail("Unknown binary declaration kind");
break;
- case 225 /* FunctionDeclaration */:
- case 226 /* ClassDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
return ts.hasModifier(node, 512 /* Default */) ? "default" : undefined;
- case 274 /* JSDocFunctionType */:
+ case 278 /* JSDocFunctionType */:
return ts.isJSDocConstructSignature(node) ? "__new" : "__call";
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Parameters with names are handled at the top of this function. Parameters
// without names can only come from JSDocFunctionTypes.
- ts.Debug.assert(node.parent.kind === 274 /* JSDocFunctionType */);
+ ts.Debug.assert(node.parent.kind === 278 /* JSDocFunctionType */);
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
- if (parentNode && parentNode.kind === 205 /* VariableStatement */) {
+ if (parentNode && parentNode.kind === 207 /* VariableStatement */) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70 /* Identifier */) {
@@ -20684,15 +21574,18 @@ var ts;
// Otherwise, we'll be merging into a compatible existing symbol (for example when
// you have multiple 'vars' with the same name in the same container). In this case
// just add this node into the declarations list of the symbol.
- symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0 /* None */, name));
+ symbol = symbolTable.get(name);
+ if (!symbol) {
+ symbolTable.set(name, symbol = createSymbol(0 /* None */, name));
+ }
if (name && (includes & 788448 /* Classifiable */)) {
- classifiableNames[name] = name;
+ classifiableNames.set(name, name);
}
if (symbol.flags & excludes) {
if (symbol.isReplaceableByMethod) {
// Javascript constructor-declared symbols can be discarded in favor of
// prototype symbols like methods.
- symbol = symbolTable[name] = createSymbol(0 /* None */, name);
+ symbolTable.set(name, symbol = createSymbol(0 /* None */, name));
}
else {
if (node.name) {
@@ -20716,7 +21609,7 @@ var ts;
// 1. multiple export default of class declaration or function declaration by checking NodeFlags.Default
// 2. multiple export default of export assignment. This one doesn't have NodeFlags.Default on (as export default doesn't considered as modifiers)
if (symbol.declarations && symbol.declarations.length &&
- (isDefaultExport || (node.kind === 240 /* ExportAssignment */ && !node.isExportEquals))) {
+ (isDefaultExport || (node.kind === 242 /* ExportAssignment */ && !node.isExportEquals))) {
message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
}
}
@@ -20736,11 +21629,11 @@ var ts;
function declareModuleMember(node, symbolFlags, symbolExcludes) {
var hasExportModifier = ts.getCombinedModifierFlags(node) & 1 /* Export */;
if (symbolFlags & 8388608 /* Alias */) {
- if (node.kind === 243 /* ExportSpecifier */ || (node.kind === 234 /* ImportEqualsDeclaration */ && hasExportModifier)) {
+ if (node.kind === 245 /* ExportSpecifier */ || (node.kind === 236 /* ImportEqualsDeclaration */ && hasExportModifier)) {
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
}
else {
- return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
+ return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
else {
@@ -20759,7 +21652,7 @@ var ts;
// during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation
// and this case is specially handled. Module augmentations should only be merged with original module definition
// and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed.
- var isJSDocTypedefInJSDocNamespace = node.kind === 285 /* JSDocTypedefTag */ &&
+ var isJSDocTypedefInJSDocNamespace = node.kind === 289 /* JSDocTypedefTag */ &&
node.name &&
node.name.kind === 70 /* Identifier */ &&
node.name.isInJSDocNamespace;
@@ -20767,13 +21660,13 @@ var ts;
var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) |
(symbolFlags & 793064 /* Type */ ? 2097152 /* ExportType */ : 0) |
(symbolFlags & 1920 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0);
- var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes);
+ var local = declareSymbol(container.locals, /*parent*/ undefined, node, exportKind, symbolExcludes);
local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
node.localSymbol = local;
return local;
}
else {
- return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
+ return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
}
@@ -20840,14 +21733,13 @@ var ts;
hasExplicitReturn = false;
bindChildren(node);
// Reset all reachability check related flags on node (for incremental scenarios)
- // Reset all emit helper flags on node (for incremental scenarios)
- node.flags &= ~64896 /* ReachabilityAndEmitFlags */;
+ node.flags &= ~1408 /* ReachabilityAndEmitFlags */;
if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && ts.nodeIsPresent(node.body)) {
node.flags |= 128 /* HasImplicitReturn */;
if (hasExplicitReturn)
node.flags |= 256 /* HasExplicitReturn */;
}
- if (node.kind === 261 /* SourceFile */) {
+ if (node.kind === 264 /* SourceFile */) {
node.flags |= emitFlags;
}
if (isIIFE) {
@@ -20926,66 +21818,72 @@ var ts;
return;
}
switch (node.kind) {
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
bindWhileStatement(node);
break;
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
bindDoStatement(node);
break;
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
bindForStatement(node);
break;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
bindForInOrForOfStatement(node);
break;
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
bindIfStatement(node);
break;
- case 216 /* ReturnStatement */:
- case 220 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 222 /* ThrowStatement */:
bindReturnOrThrow(node);
break;
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
bindBreakOrContinueStatement(node);
break;
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
bindTryStatement(node);
break;
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
bindSwitchStatement(node);
break;
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
bindCaseBlock(node);
break;
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
bindCaseClause(node);
break;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
bindLabeledStatement(node);
break;
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
bindPrefixUnaryExpressionFlow(node);
break;
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
bindPostfixUnaryExpressionFlow(node);
break;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
bindBinaryExpressionFlow(node);
break;
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
bindDeleteExpressionFlow(node);
break;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
bindConditionalExpressionFlow(node);
break;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
bindVariableDeclarationFlow(node);
break;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
bindCallExpressionFlow(node);
break;
+ case 282 /* JSDocComment */:
+ bindJSDocComment(node);
+ break;
+ case 289 /* JSDocTypedefTag */:
+ bindJSDocTypedefTag(node);
+ break;
default:
bindEachChild(node);
break;
@@ -20995,15 +21893,15 @@ var ts;
switch (expr.kind) {
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return isNarrowableReference(expr);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return hasNarrowableArgument(expr);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isNarrowingExpression(expr.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return isNarrowingBinaryExpression(expr);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return expr.operator === 50 /* ExclamationToken */ && isNarrowingExpression(expr.operand);
}
return false;
@@ -21011,7 +21909,8 @@ var ts;
function isNarrowableReference(expr) {
return expr.kind === 70 /* Identifier */ ||
expr.kind === 98 /* ThisKeyword */ ||
- expr.kind === 177 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression);
+ expr.kind === 96 /* SuperKeyword */ ||
+ expr.kind === 178 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression);
}
function hasNarrowableArgument(expr) {
if (expr.arguments) {
@@ -21022,14 +21921,14 @@ var ts;
}
}
}
- if (expr.expression.kind === 177 /* PropertyAccessExpression */ &&
+ if (expr.expression.kind === 178 /* PropertyAccessExpression */ &&
isNarrowableReference(expr.expression.expression)) {
return true;
}
return false;
}
function isNarrowingTypeofOperands(expr1, expr2) {
- return expr1.kind === 187 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */;
+ return expr1.kind === 188 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */;
}
function isNarrowingBinaryExpression(expr) {
switch (expr.operatorToken.kind) {
@@ -21050,9 +21949,9 @@ var ts;
}
function isNarrowableOperand(expr) {
switch (expr.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isNarrowableOperand(expr.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (expr.operatorToken.kind) {
case 57 /* EqualsToken */:
return isNarrowableOperand(expr.left);
@@ -21147,33 +22046,33 @@ var ts;
function isStatementCondition(node) {
var parent = node.parent;
switch (parent.kind) {
- case 208 /* IfStatement */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
+ case 210 /* IfStatement */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
return parent.expression === node;
- case 211 /* ForStatement */:
- case 193 /* ConditionalExpression */:
+ case 213 /* ForStatement */:
+ case 194 /* ConditionalExpression */:
return parent.condition === node;
}
return false;
}
function isLogicalExpression(node) {
while (true) {
- if (node.kind === 183 /* ParenthesizedExpression */) {
+ if (node.kind === 184 /* ParenthesizedExpression */) {
node = node.expression;
}
- else if (node.kind === 190 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) {
+ else if (node.kind === 191 /* PrefixUnaryExpression */ && node.operator === 50 /* ExclamationToken */) {
node = node.operand;
}
else {
- return node.kind === 192 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ ||
+ return node.kind === 193 /* BinaryExpression */ && (node.operatorToken.kind === 52 /* AmpersandAmpersandToken */ ||
node.operatorToken.kind === 53 /* BarBarToken */);
}
}
}
function isTopLevelLogicalExpression(node) {
- while (node.parent.kind === 183 /* ParenthesizedExpression */ ||
- node.parent.kind === 190 /* PrefixUnaryExpression */ &&
+ while (node.parent.kind === 184 /* ParenthesizedExpression */ ||
+ node.parent.kind === 191 /* PrefixUnaryExpression */ &&
node.parent.operator === 50 /* ExclamationToken */) {
node = node.parent;
}
@@ -21215,7 +22114,7 @@ var ts;
}
function bindDoStatement(node) {
var preDoLabel = createLoopLabel();
- var enclosingLabeledStatement = node.parent.kind === 219 /* LabeledStatement */
+ var enclosingLabeledStatement = node.parent.kind === 221 /* LabeledStatement */
? ts.lastOrUndefined(activeLabels)
: undefined;
// if do statement is wrapped in labeled statement then target labels for break/continue with or without
@@ -21249,10 +22148,13 @@ var ts;
var postLoopLabel = createBranchLabel();
addAntecedent(preLoopLabel, currentFlow);
currentFlow = preLoopLabel;
+ if (node.kind === 215 /* ForOfStatement */) {
+ bind(node.awaitModifier);
+ }
bind(node.expression);
addAntecedent(postLoopLabel, currentFlow);
bind(node.initializer);
- if (node.initializer.kind !== 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind !== 226 /* VariableDeclarationList */) {
bindAssignmentTargetFlow(node.initializer);
}
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -21274,7 +22176,7 @@ var ts;
}
function bindReturnOrThrow(node) {
bind(node.expression);
- if (node.kind === 216 /* ReturnStatement */) {
+ if (node.kind === 218 /* ReturnStatement */) {
hasExplicitReturn = true;
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
@@ -21294,7 +22196,7 @@ var ts;
return undefined;
}
function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
- var flowLabel = node.kind === 215 /* BreakStatement */ ? breakTarget : continueTarget;
+ var flowLabel = node.kind === 217 /* BreakStatement */ ? breakTarget : continueTarget;
if (flowLabel) {
addAntecedent(flowLabel, currentFlow);
currentFlow = unreachableFlow;
@@ -21330,7 +22232,32 @@ var ts;
if (node.finallyBlock) {
// in finally flow is combined from pre-try/flow from try/flow from catch
// pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable
- addAntecedent(preFinallyLabel, preTryFlow);
+ // also for finally blocks we inject two extra edges into the flow graph.
+ // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it
+ // second -> edge that represents post-finally flow.
+ // these edges are used in following scenario:
+ // let a; (1)
+ // try { a = someOperation(); (2)}
+ // finally { (3) console.log(a) } (4)
+ // (5) a
+ // flow graph for this case looks roughly like this (arrows show ):
+ // (1-pre-try-flow) <--.. <-- (2-post-try-flow)
+ // ^ ^
+ // |*****(3-pre-finally-label) -----|
+ // ^
+ // |-- ... <-- (4-post-finally-label) <--- (5)
+ // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account
+ // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5)
+ // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable
+ // Simply speaking code inside finally block is treated as reachable as pre-try-flow
+ // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally.
+ // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from
+ // final flows of these blocks without taking pre-try flow into account.
+ //
+ // extra edges that we inject allows to control this behavior
+ // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped.
+ var preFinallyFlow = { flags: 2048 /* PreFinally */, antecedent: preTryFlow, lock: {} };
+ addAntecedent(preFinallyLabel, preFinallyFlow);
currentFlow = finishFlowLabel(preFinallyLabel);
bind(node.finallyBlock);
// if flow after finally is unreachable - keep it
@@ -21346,6 +22273,11 @@ var ts;
: unreachableFlow;
}
}
+ if (!(currentFlow.flags & 1 /* Unreachable */)) {
+ var afterFinallyFlow = { flags: 4096 /* AfterFinally */, antecedent: currentFlow };
+ preFinallyFlow.lock = afterFinallyFlow;
+ currentFlow = afterFinallyFlow;
+ }
}
else {
currentFlow = finishFlowLabel(preFinallyLabel);
@@ -21360,7 +22292,7 @@ var ts;
preSwitchCaseFlow = currentFlow;
bind(node.caseBlock);
addAntecedent(postSwitchLabel, currentFlow);
- var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 254 /* DefaultClause */; });
+ var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 257 /* DefaultClause */; });
// We mark a switch statement as possibly exhaustive if it has no default clause and if all
// case clauses have unreachable end points (e.g. they all return).
node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
@@ -21427,14 +22359,14 @@ var ts;
if (!activeLabel.referenced && !options.allowUnusedLabels) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label));
}
- if (!node.statement || node.statement.kind !== 209 /* DoStatement */) {
+ if (!node.statement || node.statement.kind !== 211 /* DoStatement */) {
// do statement sets current flow inside bindDoStatement
addAntecedent(postStatementLabel, currentFlow);
currentFlow = finishFlowLabel(postStatementLabel);
}
}
function bindDestructuringTargetFlow(node) {
- if (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) {
+ if (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */) {
bindAssignmentTargetFlow(node.left);
}
else {
@@ -21445,10 +22377,10 @@ var ts;
if (isNarrowableReference(node)) {
currentFlow = createFlowAssignment(currentFlow, node);
}
- else if (node.kind === 175 /* ArrayLiteralExpression */) {
+ else if (node.kind === 176 /* ArrayLiteralExpression */) {
for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
var e = _a[_i];
- if (e.kind === 196 /* SpreadElement */) {
+ if (e.kind === 197 /* SpreadElement */) {
bindAssignmentTargetFlow(e.expression);
}
else {
@@ -21456,16 +22388,16 @@ var ts;
}
}
}
- else if (node.kind === 176 /* ObjectLiteralExpression */) {
+ else if (node.kind === 177 /* ObjectLiteralExpression */) {
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
var p = _c[_b];
- if (p.kind === 257 /* PropertyAssignment */) {
+ if (p.kind === 260 /* PropertyAssignment */) {
bindDestructuringTargetFlow(p.initializer);
}
- else if (p.kind === 258 /* ShorthandPropertyAssignment */) {
+ else if (p.kind === 261 /* ShorthandPropertyAssignment */) {
bindAssignmentTargetFlow(p.name);
}
- else if (p.kind === 259 /* SpreadAssignment */) {
+ else if (p.kind === 262 /* SpreadAssignment */) {
bindAssignmentTargetFlow(p.expression);
}
}
@@ -21521,7 +22453,7 @@ var ts;
bindEachChild(node);
if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
bindAssignmentTargetFlow(node.left);
- if (operator === 57 /* EqualsToken */ && node.left.kind === 178 /* ElementAccessExpression */) {
+ if (operator === 57 /* EqualsToken */ && node.left.kind === 179 /* ElementAccessExpression */) {
var elementAccess = node.left;
if (isNarrowableOperand(elementAccess.expression)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -21532,7 +22464,7 @@ var ts;
}
function bindDeleteExpressionFlow(node) {
bindEachChild(node);
- if (node.expression.kind === 177 /* PropertyAccessExpression */) {
+ if (node.expression.kind === 178 /* PropertyAccessExpression */) {
bindAssignmentTargetFlow(node.expression);
}
}
@@ -21565,19 +22497,37 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 212 /* ForInStatement */ || node.parent.parent.kind === 213 /* ForOfStatement */) {
+ if (node.initializer || node.parent.parent.kind === 214 /* ForInStatement */ || node.parent.parent.kind === 215 /* ForOfStatement */) {
bindInitializedVariableFlow(node);
}
}
+ function bindJSDocComment(node) {
+ ts.forEachChild(node, function (n) {
+ if (n.kind !== 289 /* JSDocTypedefTag */) {
+ bind(n);
+ }
+ });
+ }
+ function bindJSDocTypedefTag(node) {
+ ts.forEachChild(node, function (n) {
+ // if the node has a fullName "A.B.C", that means symbol "C" was already bound
+ // when we visit "fullName"; so when we visit the name "C" as the next child of
+ // the jsDocTypedefTag, we should skip binding it.
+ if (node.fullName && n === node.name && node.fullName.kind !== 70 /* Identifier */) {
+ return;
+ }
+ bind(n);
+ });
+ }
function bindCallExpressionFlow(node) {
// If the target of the call expression is a function expression or arrow function we have
// an immediately invoked function expression (IIFE). Initialize the flowNode property to
// the current control flow (which includes evaluation of the IIFE arguments).
var expr = node.expression;
- while (expr.kind === 183 /* ParenthesizedExpression */) {
+ while (expr.kind === 184 /* ParenthesizedExpression */) {
expr = expr.expression;
}
- if (expr.kind === 184 /* FunctionExpression */ || expr.kind === 185 /* ArrowFunction */) {
+ if (expr.kind === 185 /* FunctionExpression */ || expr.kind === 186 /* ArrowFunction */) {
bindEach(node.typeArguments);
bindEach(node.arguments);
bind(node.expression);
@@ -21585,7 +22535,7 @@ var ts;
else {
bindEachChild(node);
}
- if (node.expression.kind === 177 /* PropertyAccessExpression */) {
+ if (node.expression.kind === 178 /* PropertyAccessExpression */) {
var propertyAccess = node.expression;
if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
currentFlow = createFlowArrayMutation(currentFlow, node);
@@ -21594,52 +22544,54 @@ var ts;
}
function getContainerFlags(node) {
switch (node.kind) {
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 161 /* TypeLiteral */:
- case 287 /* JSDocTypeLiteral */:
- case 270 /* JSDocRecordType */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 162 /* TypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
+ case 274 /* JSDocRecordType */:
+ case 253 /* JsxAttributes */:
return 1 /* IsContainer */;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return 1 /* IsContainer */ | 64 /* IsInterface */;
- case 274 /* JSDocFunctionType */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 170 /* MappedType */:
+ case 278 /* JSDocFunctionType */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 171 /* MappedType */:
return 1 /* IsContainer */ | 32 /* HasLocals */;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethod */;
}
- case 150 /* Constructor */:
- case 225 /* FunctionDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ // falls through
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return 4 /* IsControlFlowContainer */;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
- case 256 /* CatchClause */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 232 /* CaseBlock */:
+ case 259 /* CatchClause */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 234 /* CaseBlock */:
return 2 /* IsBlockScopedContainer */;
- case 204 /* Block */:
+ case 206 /* Block */:
// do not treat blocks directly inside a function as a block-scoped-container.
// Locals that reside in this block should go to the function locals. Otherwise 'x'
// would not appear to be a redeclaration of a block scoped local in the following
@@ -21676,42 +22628,43 @@ var ts;
// members are declared (for example, a member of a class will go into a specific
// symbol table depending on if it is static or not). We defer to specialized
// handlers to take care of declaring these child members.
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return declareModuleMember(node, symbolFlags, symbolExcludes);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
return declareClassMember(node, symbolFlags, symbolExcludes);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
- case 161 /* TypeLiteral */:
- case 176 /* ObjectLiteralExpression */:
- case 227 /* InterfaceDeclaration */:
- case 270 /* JSDocRecordType */:
- case 287 /* JSDocTypeLiteral */:
+ case 162 /* TypeLiteral */:
+ case 177 /* ObjectLiteralExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 274 /* JSDocRecordType */:
+ case 291 /* JSDocTypeLiteral */:
+ case 253 /* JsxAttributes */:
// Interface/Object-types always have their children added to the 'members' of
// their container. They are only accessible through an instance of their
// container, and are never in scope otherwise (even inside the body of the
// object / type / interface declaring them). An exception is type parameters,
// which are in scope without qualification (similar to 'locals').
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 274 /* JSDocFunctionType */:
- case 228 /* TypeAliasDeclaration */:
- case 170 /* MappedType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 278 /* JSDocFunctionType */:
+ case 230 /* TypeAliasDeclaration */:
+ case 171 /* MappedType */:
// All the children of these container types are never visible through another
// symbol (i.e. through another symbol's 'exports' or 'members'). Instead,
// they're only accessed 'lexically' (i.e. from code that exists underneath
@@ -21729,14 +22682,14 @@ var ts;
function declareSourceFileMember(node, symbolFlags, symbolExcludes) {
return ts.isExternalModule(file)
? declareModuleMember(node, symbolFlags, symbolExcludes)
- : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes);
+ : declareSymbol(file.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
function hasExportDeclarations(node) {
- var body = node.kind === 261 /* SourceFile */ ? node : node.body;
- if (body && (body.kind === 261 /* SourceFile */ || body.kind === 231 /* ModuleBlock */)) {
+ var body = node.kind === 264 /* SourceFile */ ? node : node.body;
+ if (body && (body.kind === 264 /* SourceFile */ || body.kind === 233 /* ModuleBlock */)) {
for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
var stat = _a[_i];
- if (stat.kind === 241 /* ExportDeclaration */ || stat.kind === 240 /* ExportAssignment */) {
+ if (stat.kind === 243 /* ExportDeclaration */ || stat.kind === 242 /* ExportAssignment */) {
return true;
}
}
@@ -21760,7 +22713,7 @@ var ts;
errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
}
if (ts.isExternalModuleAugmentation(node)) {
- declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */);
+ declareModuleSymbol(node);
}
else {
var pattern = void 0;
@@ -21780,12 +22733,8 @@ var ts;
}
}
else {
- var state = getModuleInstanceState(node);
- if (state === 0 /* NonInstantiated */) {
- declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */);
- }
- else {
- declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */);
+ var state = declareModuleSymbol(node);
+ if (state !== 0 /* NonInstantiated */) {
if (node.symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) {
// if module was already merged with some function, class or non-const enum
// treat is a non-const-enum-only
@@ -21805,6 +22754,12 @@ var ts;
}
}
}
+ function declareModuleSymbol(node) {
+ var state = getModuleInstanceState(node);
+ var instantiated = state !== 0 /* NonInstantiated */;
+ declareSymbolAndAddToSymbolTable(node, instantiated ? 512 /* ValueModule */ : 1024 /* NamespaceModule */, instantiated ? 106639 /* ValueModuleExcludes */ : 0 /* NamespaceModuleExcludes */);
+ return state;
+ }
function bindFunctionOrConstructorType(node) {
// For a given function symbol "<...>(...) => T" we want to generate a symbol identical
// to the one we would get for: { <...>(...): T }
@@ -21817,7 +22772,7 @@ var ts;
var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type");
addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */);
typeLiteralSymbol.members = ts.createMap();
- typeLiteralSymbol.members[symbol.name] = symbol;
+ typeLiteralSymbol.members.set(symbol.name, symbol);
}
function bindObjectLiteralExpression(node) {
var ElementKind;
@@ -21829,7 +22784,7 @@ var ts;
var seen = ts.createMap();
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) {
+ if (prop.kind === 262 /* SpreadAssignment */ || prop.name.kind !== 70 /* Identifier */) {
continue;
}
var identifier = prop.name;
@@ -21841,12 +22796,12 @@ var ts;
// c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
// d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
// and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
- var currentKind = prop.kind === 257 /* PropertyAssignment */ || prop.kind === 258 /* ShorthandPropertyAssignment */ || prop.kind === 149 /* MethodDeclaration */
+ var currentKind = prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */ || prop.kind === 150 /* MethodDeclaration */
? 1 /* Property */
: 2 /* Accessor */;
- var existingKind = seen[identifier.text];
+ var existingKind = seen.get(identifier.text);
if (!existingKind) {
- seen[identifier.text] = currentKind;
+ seen.set(identifier.text, currentKind);
continue;
}
if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) {
@@ -21857,27 +22812,33 @@ var ts;
}
return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object");
}
+ function bindJsxAttributes(node) {
+ return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__jsxAttributes");
+ }
+ function bindJsxAttribute(node, symbolFlags, symbolExcludes) {
+ return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
+ }
function bindAnonymousDeclaration(node, symbolFlags, name) {
var symbol = createSymbol(symbolFlags, name);
addDeclarationToSymbol(symbol, node, symbolFlags);
}
function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
switch (blockScopeContainer.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (ts.isExternalModule(container)) {
declareModuleMember(node, symbolFlags, symbolExcludes);
break;
}
- // fall through.
+ // falls through
default:
if (!blockScopeContainer.locals) {
blockScopeContainer.locals = ts.createMap();
addToContainerChain(blockScopeContainer);
}
- declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes);
+ declareSymbol(blockScopeContainer.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
}
}
function bindBlockScopedVariableDeclaration(node) {
@@ -21977,8 +22938,8 @@ var ts;
function checkStrictModeFunctionDeclaration(node) {
if (languageVersion < 2 /* ES2015 */) {
// Report error if function is not top level function declaration
- if (blockScopeContainer.kind !== 261 /* SourceFile */ &&
- blockScopeContainer.kind !== 230 /* ModuleDeclaration */ &&
+ if (blockScopeContainer.kind !== 264 /* SourceFile */ &&
+ blockScopeContainer.kind !== 232 /* ModuleDeclaration */ &&
!ts.isFunctionLike(blockScopeContainer)) {
// We check first if the name is inside class declaration or class expression; if so give explicit message
// otherwise report generic error message.
@@ -21988,7 +22949,7 @@ var ts;
}
}
function checkStrictModeNumericLiteral(node) {
- if (inStrictMode && node.isOctalLiteral) {
+ if (inStrictMode && node.numericLiteralFlags & 4 /* Octal */) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
}
}
@@ -22028,6 +22989,18 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
+ // Even though in the AST the jsdoc @typedef node belongs to the current node,
+ // its symbol might be in the same scope with the current node's symbol. Consider:
+ //
+ // /** @typedef {string | number} MyType */
+ // function foo();
+ //
+ // Here the current node is "foo", which is a container, but the scope of "MyType" should
+ // not be inside "foo". Therefore we always bind @typedef before bind the parent node,
+ // and skip binding this tag later when binding all the other jsdoc tags.
+ if (ts.isInJavaScriptFile(node)) {
+ bindJSDocTypedefTagIfAny(node);
+ }
// First we bind declaration nodes to a symbol if possible. We'll both create a symbol
// and then potentially add the symbol to an appropriate symbol table. Possible
// destination symbol tables are:
@@ -22044,7 +23017,7 @@ var ts;
// the current 'container' node when it changes. This helps us know which symbol table
// a local should go into for example. Since terminal nodes are known not to have
// children, as an optimization we don't process those.
- if (node.kind > 140 /* LastToken */) {
+ if (node.kind > 141 /* LastToken */) {
var saveParent = parent;
parent = node;
var containerFlags = getContainerFlags(node);
@@ -22061,6 +23034,26 @@ var ts;
}
inStrictMode = saveInStrictMode;
}
+ function bindJSDocTypedefTagIfAny(node) {
+ if (!node.jsDoc) {
+ return;
+ }
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var jsDoc = _a[_i];
+ if (!jsDoc.tags) {
+ continue;
+ }
+ for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
+ var tag = _c[_b];
+ if (tag.kind === 289 /* JSDocTypedefTag */) {
+ var savedParent = parent;
+ parent = jsDoc;
+ bind(tag);
+ parent = savedParent;
+ }
+ }
+ }
+ }
function updateStrictModeStatementList(statements) {
if (!inStrictMode) {
for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
@@ -22091,91 +23084,90 @@ var ts;
// current "blockScopeContainer" needs to be set to its immediate namespace parent.
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 285 /* JSDocTypedefTag */) {
+ while (parentNode && parentNode.kind !== 289 /* JSDocTypedefTag */) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
break;
}
+ // falls through
case 98 /* ThisKeyword */:
- if (currentFlow && (ts.isExpression(node) || parent.kind === 258 /* ShorthandPropertyAssignment */)) {
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 261 /* ShorthandPropertyAssignment */)) {
node.flowNode = currentFlow;
}
return checkStrictModeIdentifier(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
if (currentFlow && isNarrowableReference(node)) {
node.flowNode = currentFlow;
}
break;
- case 192 /* BinaryExpression */:
- if (ts.isInJavaScriptFile(node)) {
- var specialKind = ts.getSpecialPropertyAssignmentKind(node);
- switch (specialKind) {
- case 1 /* ExportsProperty */:
- bindExportsPropertyAssignment(node);
- break;
- case 2 /* ModuleExports */:
- bindModuleExportsAssignment(node);
- break;
- case 3 /* PrototypeProperty */:
- bindPrototypePropertyAssignment(node);
- break;
- case 4 /* ThisProperty */:
- bindThisPropertyAssignment(node);
- break;
- case 0 /* None */:
- // Nothing to do
- break;
- default:
- ts.Debug.fail("Unknown special property assignment kind");
- }
+ case 193 /* BinaryExpression */:
+ var specialKind = ts.getSpecialPropertyAssignmentKind(node);
+ switch (specialKind) {
+ case 1 /* ExportsProperty */:
+ bindExportsPropertyAssignment(node);
+ break;
+ case 2 /* ModuleExports */:
+ bindModuleExportsAssignment(node);
+ break;
+ case 3 /* PrototypeProperty */:
+ bindPrototypePropertyAssignment(node);
+ break;
+ case 4 /* ThisProperty */:
+ bindThisPropertyAssignment(node);
+ break;
+ case 5 /* Property */:
+ bindStaticPropertyAssignment(node);
+ break;
+ case 0 /* None */:
+ // Nothing to do
+ break;
+ default:
+ ts.Debug.fail("Unknown special property assignment kind");
}
return checkStrictModeBinaryExpression(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return checkStrictModeCatchClause(node);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return checkStrictModeDeleteExpression(node);
case 8 /* NumericLiteral */:
return checkStrictModeNumericLiteral(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return checkStrictModePostfixUnaryExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return checkStrictModePrefixUnaryExpression(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return checkStrictModeWithStatement(node);
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
seenThisKeyword = true;
return;
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return checkTypePredicate(node);
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530920 /* TypeParameterExcludes */);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return bindParameter(node);
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- if (node.dotDotDotToken && node.parent.kind === 172 /* ObjectBindingPattern */) {
- emitFlags |= 32768 /* HasRestAttribute */;
- }
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
return bindVariableDeclarationOrBindingElement(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 271 /* JSDocRecordMember */:
- return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
- case 286 /* JSDocPropertyTag */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 275 /* JSDocRecordMember */:
+ return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ case 290 /* JSDocPropertyTag */:
return bindJSDocProperty(node);
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */);
- case 259 /* SpreadAssignment */:
- case 251 /* JsxSpreadAttribute */:
+ case 262 /* SpreadAssignment */:
+ case 254 /* JsxSpreadAttribute */:
var root = container;
var hasRest = false;
while (root.parent) {
- if (root.kind === 176 /* ObjectLiteralExpression */ &&
- root.parent.kind === 192 /* BinaryExpression */ &&
+ if (root.kind === 177 /* ObjectLiteralExpression */ &&
+ root.parent.kind === 193 /* BinaryExpression */ &&
root.parent.operatorToken.kind === 57 /* EqualsToken */ &&
root.parent.left === root) {
hasRest = true;
@@ -22183,88 +23175,92 @@ var ts;
}
root = root.parent;
}
- emitFlags |= hasRest ? 32768 /* HasRestAttribute */ : 16384 /* HasSpreadAttribute */;
return;
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
// If this is an ObjectLiteralExpression method, then it sits in the same space
// as other properties in the object literal. So we use SymbolFlags.PropertyExcludes
// so that it will conflict with any other object literal members with the same
// name.
- return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */);
- case 225 /* FunctionDeclaration */:
+ return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */);
+ case 227 /* FunctionDeclaration */:
return bindFunctionDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 278 /* JSDocFunctionType */:
return bindFunctionOrConstructorType(node);
- case 161 /* TypeLiteral */:
- case 170 /* MappedType */:
- case 287 /* JSDocTypeLiteral */:
- case 270 /* JSDocRecordType */:
+ case 162 /* TypeLiteral */:
+ case 171 /* MappedType */:
+ case 291 /* JSDocTypeLiteral */:
+ case 274 /* JSDocRecordType */:
return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return bindObjectLiteralExpression(node);
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return bindFunctionExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
if (ts.isInJavaScriptFile(node)) {
bindCallExpression(node);
}
break;
// Members of classes, interfaces, and modules
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
// All classes are automatically in strict mode in ES6.
inStrictMode = true;
return bindClassLikeDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
if (!node.fullName || node.fullName.kind === 70 /* Identifier */) {
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
}
break;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return bindEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return bindModuleDeclaration(node);
+ // Jsx-attributes
+ case 253 /* JsxAttributes */:
+ return bindJsxAttributes(node);
+ case 252 /* JsxAttribute */:
+ return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */);
// Imports and exports
- case 234 /* ImportEqualsDeclaration */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */);
- case 233 /* NamespaceExportDeclaration */:
+ case 235 /* NamespaceExportDeclaration */:
return bindNamespaceExportDeclaration(node);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return bindImportClause(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return bindExportDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return bindExportAssignment(node);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
updateStrictModeStatementList(node.statements);
return bindSourceFileIfExternalModule();
- case 204 /* Block */:
+ case 206 /* Block */:
if (!ts.isFunctionLike(node.parent)) {
return;
}
- // Fall through
- case 231 /* ModuleBlock */:
+ // falls through
+ case 233 /* ModuleBlock */:
return updateStrictModeStatementList(node.statements);
}
}
@@ -22273,7 +23269,7 @@ var ts;
if (parameterName && parameterName.kind === 70 /* Identifier */) {
checkStrictModeIdentifier(parameterName);
}
- if (parameterName && parameterName.kind === 167 /* ThisType */) {
+ if (parameterName && parameterName.kind === 168 /* ThisType */) {
seenThisKeyword = true;
}
bind(type);
@@ -22296,7 +23292,7 @@ var ts;
// An export default clause with an expression exports a value
// We want to exclude both class and function here, this is necessary to issue an error when there are both
// default export-assignment and default export function and class declaration.
- var flags = node.kind === 240 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node)
+ var flags = node.kind === 242 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node)
? 8388608 /* Alias */
: 4 /* Property */;
declareSymbol(container.symbol.exports, container.symbol, node, flags, 4 /* Property */ | 8388608 /* AliasExcludes */ | 32 /* Class */ | 16 /* Function */);
@@ -22306,17 +23302,17 @@ var ts;
if (node.modifiers && node.modifiers.length) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
}
- if (node.parent.kind !== 261 /* SourceFile */) {
+ if (node.parent.kind !== 264 /* SourceFile */) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level));
return;
}
else {
- var parent_4 = node.parent;
- if (!ts.isExternalModule(parent_4)) {
+ var parent_1 = node.parent;
+ if (!ts.isExternalModule(parent_1)) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}
- if (!parent_4.isDeclarationFile) {
+ if (!parent_1.isDeclarationFile) {
file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files));
return;
}
@@ -22327,11 +23323,11 @@ var ts;
function bindExportDeclaration(node) {
if (!container.symbol || !container.symbol.exports) {
// Export * in some sort of block construct
- bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node));
+ bindAnonymousDeclaration(node, 33554432 /* ExportStar */, getDeclarationName(node));
}
else if (!node.exportClause) {
// All export * declarations are collected in an __export symbol
- declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */);
+ declareSymbol(container.symbol.exports, container.symbol, node, 33554432 /* ExportStar */, 0 /* None */);
}
}
function bindImportClause(node) {
@@ -22353,30 +23349,67 @@ var ts;
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node.left, 4 /* Property */ | 7340032 /* Export */, 0 /* None */);
}
+ function isExportsOrModuleExportsOrAlias(node) {
+ return ts.isExportsIdentifier(node) ||
+ ts.isModuleExportsPropertyAccessExpression(node) ||
+ isNameOfExportsOrModuleExportsAliasDeclaration(node);
+ }
+ function isNameOfExportsOrModuleExportsAliasDeclaration(node) {
+ if (node.kind === 70 /* Identifier */) {
+ var symbol = lookupSymbolForName(node.text);
+ if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === 225 /* VariableDeclaration */) {
+ var declaration = symbol.valueDeclaration;
+ if (declaration.initializer) {
+ return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
+ }
+ }
+ }
+ return false;
+ }
+ function isExportsOrModuleExportsOrAliasOrAssignemnt(node) {
+ return isExportsOrModuleExportsOrAlias(node) ||
+ (ts.isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
+ }
function bindModuleExportsAssignment(node) {
+ // A common practice in node modules is to set 'export = module.exports = {}', this ensures that 'exports'
+ // is still pointing to 'module.exports'.
+ // We do not want to consider this as 'export=' since a module can have only one of these.
+ // Similarlly we do not want to treat 'module.exports = exports' as an 'export='.
+ var assignedExpression = ts.getRightMostAssignedExpression(node.right);
+ if (ts.isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
+ // Mark it as a module in case there are no other exports in the file
+ setCommonJsModuleIndicator(node);
+ return;
+ }
// 'module.exports = expr' assignment
setCommonJsModuleIndicator(node);
declareSymbol(file.symbol.exports, file.symbol, node, 4 /* Property */ | 7340032 /* Export */ | 512 /* ValueModule */, 0 /* None */);
}
function bindThisPropertyAssignment(node) {
ts.Debug.assert(ts.isInJavaScriptFile(node));
- // Declare a 'member' if the container is an ES5 class or ES6 constructor
- if (container.kind === 225 /* FunctionDeclaration */ || container.kind === 184 /* FunctionExpression */) {
- container.symbol.members = container.symbol.members || ts.createMap();
- // It's acceptable for multiple 'this' assignments of the same identifier to occur
- declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */);
- }
- else if (container.kind === 150 /* Constructor */) {
- // this.foo assignment in a JavaScript class
- // Bind this property to the containing class
- var saveContainer = container;
- container = container.parent;
- var symbol = bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* None */);
- if (symbol) {
- // constructor-declared symbols can be overwritten by subsequent method declarations
- symbol.isReplaceableByMethod = true;
- }
- container = saveContainer;
+ var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
+ switch (container.kind) {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ // Declare a 'member' if the container is an ES5 class or ES6 constructor
+ container.symbol.members = container.symbol.members || ts.createMap();
+ // It's acceptable for multiple 'this' assignments of the same identifier to occur
+ declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */);
+ break;
+ case 151 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ // this.foo assignment in a JavaScript class
+ // Bind this property to the containing class
+ var containingClass = container.parent;
+ var symbol = declareSymbol(ts.hasModifier(container, 32 /* Static */) ? containingClass.symbol.exports : containingClass.symbol.members, containingClass.symbol, node, 4 /* Property */, 0 /* None */);
+ if (symbol) {
+ // symbols declared through 'this' property assignements can be overwritten by subsequent method declarations
+ symbol.isReplaceableByMethod = true;
+ }
+ break;
}
}
function bindPrototypePropertyAssignment(node) {
@@ -22390,16 +23423,44 @@ var ts;
leftSideOfAssignment.parent = node;
constructorFunction.parent = classPrototype;
classPrototype.parent = leftSideOfAssignment;
- var funcSymbol = container.locals[constructorFunction.text];
- if (!funcSymbol || !(funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ bindPropertyAssignment(constructorFunction.text, leftSideOfAssignment, /*isPrototypeProperty*/ true);
+ }
+ function bindStaticPropertyAssignment(node) {
+ // We saw a node of the form 'x.y = z'. Declare a 'member' y on x if x was a function.
+ // Look up the function in the local scope, since prototype assignments should
+ // follow the function declaration
+ var leftSideOfAssignment = node.left;
+ var target = leftSideOfAssignment.expression;
+ // Fix up parent pointers since we're going to use these nodes before we bind into them
+ leftSideOfAssignment.parent = node;
+ target.parent = leftSideOfAssignment;
+ if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
+ // This can be an alias for the 'exports' or 'module.exports' names, e.g.
+ // var util = module.exports;
+ // util.property = function ...
+ bindExportsPropertyAssignment(node);
+ }
+ else {
+ bindPropertyAssignment(target.text, leftSideOfAssignment, /*isPrototypeProperty*/ false);
+ }
+ }
+ function lookupSymbolForName(name) {
+ return (container.symbol && container.symbol.exports && container.symbol.exports.get(name)) || (container.locals && container.locals.get(name));
+ }
+ function bindPropertyAssignment(functionName, propertyAccessExpression, isPrototypeProperty) {
+ var targetSymbol = lookupSymbolForName(functionName);
+ if (targetSymbol && ts.isDeclarationOfFunctionOrClassExpression(targetSymbol)) {
+ targetSymbol = targetSymbol.valueDeclaration.initializer.symbol;
+ }
+ if (!targetSymbol || !(targetSymbol.flags & (16 /* Function */ | 32 /* Class */))) {
return;
}
// Set up the members collection if it doesn't exist already
- if (!funcSymbol.members) {
- funcSymbol.members = ts.createMap();
- }
+ var symbolTable = isPrototypeProperty ?
+ (targetSymbol.members || (targetSymbol.members = ts.createMap())) :
+ (targetSymbol.exports || (targetSymbol.exports = ts.createMap()));
// Declare the method/property
- declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4 /* Property */, 0 /* PropertyExcludes */);
+ declareSymbol(symbolTable, targetSymbol, propertyAccessExpression, 4 /* Property */, 0 /* PropertyExcludes */);
}
function bindCallExpression(node) {
// We're only inspecting call expressions to detect CommonJS modules, so we can skip
@@ -22409,15 +23470,7 @@ var ts;
}
}
function bindClassLikeDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) {
- emitFlags |= 1024 /* HasClassExtends */;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048 /* HasDecorators */;
- }
- }
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */);
}
else {
@@ -22425,7 +23478,7 @@ var ts;
bindAnonymousDeclaration(node, 32 /* Class */, bindingName);
// Add name of class expression into the map for semantic classifier
if (node.name) {
- classifiableNames[node.name.text] = node.name.text;
+ classifiableNames.set(node.name.text, node.name.text);
}
}
var symbol = node.symbol;
@@ -22438,14 +23491,15 @@ var ts;
// Note: we check for this here because this class may be merging into a module. The
// module might have an exported variable called 'prototype'. We can't allow that as
// that would clash with the built-in 'prototype' for the class.
- var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype");
- if (symbol.exports[prototypeSymbol.name]) {
+ var prototypeSymbol = createSymbol(4 /* Property */ | 16777216 /* Prototype */, "prototype");
+ var symbolExport = symbol.exports.get(prototypeSymbol.name);
+ if (symbolExport) {
if (node.name) {
node.name.parent = node;
}
- file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
}
- symbol.exports[prototypeSymbol.name] = prototypeSymbol;
+ symbol.exports.set(prototypeSymbol.name, prototypeSymbol);
prototypeSymbol.parent = symbol;
}
function bindEnumDeclaration(node) {
@@ -22479,11 +23533,6 @@ var ts;
}
}
function bindParameter(node) {
- if (!ts.isDeclarationFile(file) &&
- !ts.isInAmbientContext(node) &&
- ts.nodeIsDecorated(node)) {
- emitFlags |= (2048 /* HasDecorators */ | 4096 /* HasParamDecorators */);
- }
if (inStrictMode) {
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
// strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
@@ -22499,13 +23548,13 @@ var ts;
// containing class.
if (ts.isParameterPropertyDeclaration(node)) {
var classDeclaration = node.parent.parent;
- declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
}
}
function bindFunctionDeclaration(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
checkStrictModeFunctionName(node);
@@ -22519,8 +23568,8 @@ var ts;
}
function bindFunctionExpression(node) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
if (currentFlow) {
@@ -22532,11 +23581,8 @@ var ts;
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunctionLike(node)) {
- emitFlags |= 8192 /* HasAsyncFunctions */;
- }
- if (ts.nodeIsDecorated(node)) {
- emitFlags |= 2048 /* HasDecorators */;
+ if (ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
@@ -22561,13 +23607,13 @@ var ts;
if (currentFlow === unreachableFlow) {
var reportError =
// report error on all statements except empty ones
- (ts.isStatementButNotDeclaration(node) && node.kind !== 206 /* EmptyStatement */) ||
+ (ts.isStatementButNotDeclaration(node) && node.kind !== 208 /* EmptyStatement */) ||
// report error on class declarations
- node.kind === 226 /* ClassDeclaration */ ||
+ node.kind === 228 /* ClassDeclaration */ ||
// report error on instantiated modules or const-enums only modules if preserveConstEnums is set
- (node.kind === 230 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) ||
+ (node.kind === 232 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) ||
// report error on regular enums and const enums if preserveConstEnums is set
- (node.kind === 229 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
+ (node.kind === 231 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums));
if (reportError) {
currentFlow = reportedUnreachableFlow;
// unreachable code is reported if
@@ -22581,7 +23627,7 @@ var ts;
// On the other side we do want to report errors on non-initialized 'lets' because of TDZ
var reportUnreachableCode = !options.allowUnreachableCode &&
!ts.isInAmbientContext(node) &&
- (node.kind !== 205 /* VariableStatement */ ||
+ (node.kind !== 207 /* VariableStatement */ ||
ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */ ||
ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; }));
if (reportUnreachableCode) {
@@ -22601,56 +23647,56 @@ var ts;
function computeTransformFlagsForNode(node, subtreeFlags) {
var kind = node.kind;
switch (kind) {
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return computeCallExpression(node, subtreeFlags);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return computeNewExpression(node, subtreeFlags);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return computeModuleDeclaration(node, subtreeFlags);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return computeParenthesizedExpression(node, subtreeFlags);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return computeBinaryExpression(node, subtreeFlags);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return computeExpressionStatement(node, subtreeFlags);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return computeParameter(node, subtreeFlags);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return computeArrowFunction(node, subtreeFlags);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return computeFunctionExpression(node, subtreeFlags);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return computeFunctionDeclaration(node, subtreeFlags);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return computeVariableDeclaration(node, subtreeFlags);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return computeVariableDeclarationList(node, subtreeFlags);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return computeVariableStatement(node, subtreeFlags);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return computeLabeledStatement(node, subtreeFlags);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return computeClassDeclaration(node, subtreeFlags);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return computeClassExpression(node, subtreeFlags);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return computeHeritageClause(node, subtreeFlags);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return computeCatchClause(node, subtreeFlags);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return computeExpressionWithTypeArguments(node, subtreeFlags);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return computeConstructor(node, subtreeFlags);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return computePropertyDeclaration(node, subtreeFlags);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return computeMethod(node, subtreeFlags);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return computeAccessor(node, subtreeFlags);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return computeImportEquals(node, subtreeFlags);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return computePropertyAccess(node, subtreeFlags);
default:
return computeOther(node, kind, subtreeFlags);
@@ -22677,8 +23723,8 @@ var ts;
switch (kind) {
case 96 /* SuperKeyword */:
return true;
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
var expression = node.expression;
var expressionKind = expression.kind;
return expressionKind === 96 /* SuperKeyword */;
@@ -22702,12 +23748,12 @@ var ts;
var transformFlags = subtreeFlags;
var operatorTokenKind = node.operatorToken.kind;
var leftKind = node.left.kind;
- if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ObjectLiteralExpression */) {
+ if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 177 /* ObjectLiteralExpression */) {
// Destructuring object assignments with are ES2015 syntax
// and possibly ESNext if they contain rest
transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */;
}
- else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 175 /* ArrayLiteralExpression */) {
+ else if (operatorTokenKind === 57 /* EqualsToken */ && leftKind === 176 /* ArrayLiteralExpression */) {
// Destructuring assignments are ES2015 syntax.
transformFlags |= 192 /* AssertES2015 */ | 3072 /* AssertDestructuringAssignment */;
}
@@ -22757,8 +23803,8 @@ var ts;
// If the node is synthesized, it means the emitter put the parentheses there,
// not the user. If we didn't want them, the emitter would not have put them
// there.
- if (expressionKind === 200 /* AsExpression */
- || expressionKind === 182 /* TypeAssertionExpression */) {
+ if (expressionKind === 201 /* AsExpression */
+ || expressionKind === 183 /* TypeAssertionExpression */) {
transformFlags |= 3 /* AssertTypeScript */;
}
// If the expression of a ParenthesizedExpression is a destructuring assignment,
@@ -22883,10 +23929,9 @@ var ts;
}
// An async method declaration is ES2017 syntax.
if (ts.hasModifier(node, 256 /* Async */)) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
- // Currently, we only support generators that were originally async function bodies.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
@@ -22940,7 +23985,7 @@ var ts;
}
// An async function declaration is ES2017 syntax.
if (modifierFlags & 256 /* Async */) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
// function declarations with object rest destructuring are ES Next syntax
if (subtreeFlags & 1048576 /* ContainsObjectRest */) {
@@ -22957,7 +24002,7 @@ var ts;
// down-level generator.
// Currently we do not support transforming any other generator fucntions
// down level.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
}
@@ -22975,7 +24020,7 @@ var ts;
}
// An async function expression is ES2017 syntax.
if (ts.hasModifier(node, 256 /* Async */)) {
- transformFlags |= 16 /* AssertES2017 */;
+ transformFlags |= node.asteriskToken ? 8 /* AssertESNext */ : 16 /* AssertES2017 */;
}
// function expressions with object rest destructuring are ES Next syntax
if (subtreeFlags & 1048576 /* ContainsObjectRest */) {
@@ -22990,9 +24035,7 @@ var ts;
// If a FunctionExpression is generator function and is the body of a
// transformed async function, then this node can be transformed to a
// down-level generator.
- // Currently we do not support transforming any other generator fucntions
- // down level.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
+ if (node.asteriskToken) {
transformFlags |= 768 /* AssertGenerator */;
}
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
@@ -23123,9 +24166,9 @@ var ts;
var excludeFlags = 536872257 /* NodeExcludes */;
switch (kind) {
case 119 /* AsyncKeyword */:
- case 189 /* AwaitExpression */:
- // async/await is ES2017 syntax
- transformFlags |= 16 /* AssertES2017 */;
+ case 190 /* AwaitExpression */:
+ // async/await is ES2017 syntax, but may be ESNext syntax (for async generators)
+ transformFlags |= 8 /* AssertESNext */ | 16 /* AssertES2017 */;
break;
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
@@ -23133,81 +24176,98 @@ var ts;
case 116 /* AbstractKeyword */:
case 123 /* DeclareKeyword */:
case 75 /* ConstKeyword */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
- case 201 /* NonNullExpression */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
+ case 202 /* NonNullExpression */:
case 130 /* ReadonlyKeyword */:
// These nodes are TypeScript syntax.
transformFlags |= 3 /* AssertTypeScript */;
break;
- case 246 /* JsxElement */:
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 248 /* JsxElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
case 10 /* JsxText */:
- case 249 /* JsxClosingElement */:
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
- case 252 /* JsxExpression */:
+ case 251 /* JsxClosingElement */:
+ case 252 /* JsxAttribute */:
+ case 253 /* JsxAttributes */:
+ case 254 /* JsxSpreadAttribute */:
+ case 255 /* JsxExpression */:
// These nodes are Jsx syntax.
transformFlags |= 4 /* AssertJsx */;
break;
- case 213 /* ForOfStatement */:
- // for-of might be ESNext if it has a rest destructuring
- transformFlags |= 8 /* AssertESNext */;
- // FALLTHROUGH
case 12 /* NoSubstitutionTemplateLiteral */:
case 13 /* TemplateHead */:
case 14 /* TemplateMiddle */:
case 15 /* TemplateTail */:
- case 194 /* TemplateExpression */:
- case 181 /* TaggedTemplateExpression */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 195 /* TemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 261 /* ShorthandPropertyAssignment */:
case 114 /* StaticKeyword */:
+ case 203 /* MetaProperty */:
// These nodes are ES6 syntax.
transformFlags |= 192 /* AssertES2015 */;
break;
- case 195 /* YieldExpression */:
- // This node is ES6 syntax.
- transformFlags |= 192 /* AssertES2015 */ | 16777216 /* ContainsYield */;
+ case 9 /* StringLiteral */:
+ if (node.hasExtendedUnicodeEscape) {
+ transformFlags |= 192 /* AssertES2015 */;
+ }
+ break;
+ case 8 /* NumericLiteral */:
+ if (node.numericLiteralFlags & 48 /* BinaryOrOctalSpecifier */) {
+ transformFlags |= 192 /* AssertES2015 */;
+ }
+ break;
+ case 215 /* ForOfStatement */:
+ // This node is either ES2015 syntax or ES2017 syntax (if it is a for-await-of).
+ if (node.awaitModifier) {
+ transformFlags |= 8 /* AssertESNext */;
+ }
+ transformFlags |= 192 /* AssertES2015 */;
+ break;
+ case 196 /* YieldExpression */:
+ // This node is either ES2015 syntax (in a generator) or ES2017 syntax (in an async
+ // generator).
+ transformFlags |= 8 /* AssertESNext */ | 192 /* AssertES2015 */ | 16777216 /* ContainsYield */;
break;
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
- case 134 /* StringKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 135 /* StringKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 143 /* TypeParameter */:
- case 146 /* PropertySignature */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 156 /* TypePredicate */:
- case 157 /* TypeReference */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 160 /* TypeQuery */:
- case 161 /* TypeLiteral */:
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 167 /* ThisType */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 171 /* LiteralType */:
+ case 144 /* TypeParameter */:
+ case 147 /* PropertySignature */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 157 /* TypePredicate */:
+ case 158 /* TypeReference */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 161 /* TypeQuery */:
+ case 162 /* TypeLiteral */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 168 /* ThisType */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 172 /* LiteralType */:
// Types and signatures are TypeScript syntax, and exclude all other facts.
transformFlags = 3 /* AssertTypeScript */;
excludeFlags = -3 /* TypeExcludes */;
break;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
// Even though computed property names are ES6, we don't treat them as such.
// This is so that they can flow through PropertyName transforms unaffected.
// Instead, we mark the container as ES6, so that it can properly handle the transform.
@@ -23224,10 +24284,10 @@ var ts;
transformFlags |= 65536 /* ContainsLexicalThisInComputedPropertyName */;
}
break;
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
transformFlags |= 192 /* AssertES2015 */ | 524288 /* ContainsSpread */;
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectSpread */;
break;
case 96 /* SuperKeyword */:
@@ -23238,28 +24298,28 @@ var ts;
// Mark this node and its ancestors as containing a lexical `this` keyword.
transformFlags |= 16384 /* ContainsLexicalThis */;
break;
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */;
if (subtreeFlags & 524288 /* ContainsRest */) {
transformFlags |= 8 /* AssertESNext */ | 1048576 /* ContainsObjectRest */;
}
excludeFlags = 537396545 /* BindingPatternExcludes */;
break;
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
transformFlags |= 192 /* AssertES2015 */ | 8388608 /* ContainsBindingPattern */;
excludeFlags = 537396545 /* BindingPatternExcludes */;
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
transformFlags |= 192 /* AssertES2015 */;
if (node.dotDotDotToken) {
transformFlags |= 524288 /* ContainsRest */;
}
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// This node is TypeScript syntax, and marks its container as also being TypeScript syntax.
transformFlags |= 3 /* AssertTypeScript */ | 4096 /* ContainsDecorators */;
break;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
excludeFlags = 540087617 /* ObjectLiteralExcludes */;
if (subtreeFlags & 2097152 /* ContainsComputedPropertyName */) {
// If an ObjectLiteralExpression contains a ComputedPropertyName, then it
@@ -23277,8 +24337,8 @@ var ts;
transformFlags |= 8 /* AssertESNext */;
}
break;
- case 175 /* ArrayLiteralExpression */:
- case 180 /* NewExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ case 181 /* NewExpression */:
excludeFlags = 537396545 /* ArrayLiteralOrCallOrNewExcludes */;
if (subtreeFlags & 524288 /* ContainsSpread */) {
// If the this node contains a SpreadExpression, then it is an ES6
@@ -23286,23 +24346,23 @@ var ts;
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
// A loop containing a block scoped binding *may* need to be transformed from ES6.
if (subtreeFlags & 4194304 /* ContainsBlockScopedBinding */) {
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (subtreeFlags & 32768 /* ContainsCapturedLexicalThis */) {
transformFlags |= 192 /* AssertES2015 */;
}
break;
- case 216 /* ReturnStatement */:
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 218 /* ReturnStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
transformFlags |= 33554432 /* ContainsHoistedDeclarationOrCompletion */;
break;
}
@@ -23318,56 +24378,57 @@ var ts;
*/
/* @internal */
function getTransformFlagsSubtreeExclusions(kind) {
- if (kind >= 156 /* FirstTypeNode */ && kind <= 171 /* LastTypeNode */) {
+ if (kind >= 157 /* FirstTypeNode */ && kind <= 172 /* LastTypeNode */) {
return -3 /* TypeExcludes */;
}
switch (kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 175 /* ArrayLiteralExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 176 /* ArrayLiteralExpression */:
return 537396545 /* ArrayLiteralOrCallOrNewExcludes */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return 574674241 /* ModuleExcludes */;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return 536872257 /* ParameterExcludes */;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return 601249089 /* ArrowFunctionExcludes */;
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
return 601281857 /* FunctionExcludes */;
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return 546309441 /* VariableDeclarationListExcludes */;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return 539358529 /* ClassExcludes */;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return 601015617 /* ConstructorExcludes */;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return 601015617 /* MethodOrAccessorExcludes */;
case 118 /* AnyKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
+ case 133 /* ObjectKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 143 /* TypeParameter */:
- case 146 /* PropertySignature */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 144 /* TypeParameter */:
+ case 147 /* PropertySignature */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return -3 /* TypeExcludes */;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return 540087617 /* ObjectLiteralExcludes */;
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return 537920833 /* CatchClauseExcludes */;
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return 537396545 /* BindingPatternExcludes */;
default:
return 536872257 /* NodeExcludes */;
@@ -23406,10 +24467,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- /** Create Resolved from a file with unknown extension. */
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
/** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
@@ -23422,37 +24479,29 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ /** Reads from "main" or "types"/"typings" depending on `extensions`. */
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2 /* DtsOnly */:
- case 0 /* TypeScript */:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1 /* JavaScript */:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
+ }
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
}
+ return path;
}
}
function readJson(path, host) {
@@ -23488,13 +24537,15 @@ var ts;
function getDefaultTypeRoots(currentDirectory, host) {
if (!host.directoryExists) {
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
+ // And if it doesn't exist, tough.
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -23555,7 +24606,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2 /* DtsOnly */, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -23572,7 +24627,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2 /* DtsOnly */, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*cache*/ undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -23587,13 +24643,13 @@ var ts;
}
ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
/**
- * Given a set of options, returns the set of type directive names
- * that should be included for this program automatically.
- * This list could either come from the config file,
- * or from enumerating the types root + initial secondary types lookup location.
- * More type directives might appear in the program later as a result of loading actual source files;
- * this list is only the set of defaults that are implicitly included.
- */
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
function getAutomaticTypeDirectiveNames(options, host) {
// Use explicit type list from tsconfig.json
if (options.types) {
@@ -23625,31 +24681,135 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ /**
+ * At first this function add entry directory -> module resolution result to the table.
+ * Then it computes the set of parent folders for 'directory' that should have the same module resolution result
+ * and for every parent folder in set it adds entry: parent -> module resolution. .
+ * Lets say we first directory name: /a/b/c/d/e and resolution result is: /a/b/bar.ts.
+ * Set of parent folders that should have the same result will be:
+ * [
+ * /a/b/c/d, /a/b/c, /a/b
+ * ]
+ * this means that request for module resolution from file in any of these folder will be immediately found in cache.
+ */
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ // if entry is already in cache do nothing
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ // find common prefix between directory and resolved file name
+ // this common prefix should be the shorted path that has the same resolution
+ // directory: /a/b/c/d/e
+ // resolvedFileName: /a/b/foo.d.ts
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ // find first position where directory and resolution differs
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ // find last directory separator before position i
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ // put result in per-module name cache
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -23842,38 +25002,45 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, /*jsOnly*/ false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ /* @internal */
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0 /* TypeScript */) || tryResolve(1 /* JavaScript */);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state, /*considerPackageJson*/ true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -23884,12 +25051,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
+ }
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
/* @internal */
function directoryProbablyExists(directoryName, host) {
@@ -23928,11 +25118,11 @@ var ts;
}
}
switch (extensions) {
- case 2 /* DtsOnly */:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0 /* TypeScript */:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1 /* JavaScript */:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -23942,120 +25132,191 @@ var ts;
}
/** Return the file if it exists. */
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- // A package.json "typings" may specify an exact filename, or may choose to omit an extension.
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- // Note: this would allow a package.json to specify a ".js" file as typings. Maybe that should be forbidden.
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0 /* TypeScript */, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ // Even if extensions is DtsOnly, we can still look up a .ts file as a result of package.json "types"
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ // Don't do package.json lookup recursively, because Node.js' package lookup doesn't.
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ false);
+ }
+ /** Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension. */
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ /** True if `extension` is one of the supported `extensions`. */
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
// Extensions parameter here doesn't actually matter, because typesOnly ensures we're just doing @types lookup, which is always DtsOnly.
- return loadModuleFromNodeModulesWorker(2 /* DtsOnly */, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ true, /*cache*/ undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
/** Load a module from a single node_modules directory, but not from any ancestors' node_modules directories. */
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1 /* JavaScript */) {
- return loadModuleFromNodeModulesFolder(2 /* DtsOnly */, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
+ }
+ }
+ /** For a scoped package, we must look in `@types/foo__bar` instead of `@types/@foo/bar`. */
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1); // Take off the "@"
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0 /* TypeScript */) || tryResolve(1 /* JavaScript */);
- return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
// Climb up parent directories looking for a module.
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0 /* TypeScript */) {
+ if (extensions === Extensions.TypeScript) {
// If we didn't find the file normally, look it up in @types.
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state));
}
}
}
@@ -24072,10 +25333,17 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2 /* DtsOnly */, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ /**
+ * Wraps value to SearchResult.
+ * @returns undefined if value is undefined or { value } otherwise
+ */
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
/** Calls `callback` on `directory` and every ancestor directory it has, returning the first defined result. */
function forEachAncestorDirectory(directory, callback) {
while (true) {
@@ -24128,23 +25396,34 @@ var ts;
// is because diagnostics can be quite expensive, and we want to allow hosts to bail out if
// they no longer need the information (for example, if the user started editing again).
var cancellationToken;
+ var requestedExternalEmitHelpers;
+ var externalHelpersModule;
var Symbol = ts.objectAllocator.getSymbolConstructor();
var Type = ts.objectAllocator.getTypeConstructor();
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
var compilerOptions = host.getCompilerOptions();
- var languageVersion = compilerOptions.target || 0 /* ES3 */;
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var modulekind = ts.getEmitModuleKind(compilerOptions);
var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters;
var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System;
- var strictNullChecks = compilerOptions.strictNullChecks;
+ var strictNullChecks = compilerOptions.strictNullChecks === undefined ? compilerOptions.strict : compilerOptions.strictNullChecks;
+ var noImplicitAny = compilerOptions.noImplicitAny === undefined ? compilerOptions.strict : compilerOptions.noImplicitAny;
+ var noImplicitThis = compilerOptions.noImplicitThis === undefined ? compilerOptions.strict : compilerOptions.noImplicitThis;
var emitResolver = createResolver();
- var undefinedSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "undefined");
+ var nodeBuilder = createNodeBuilder();
+ var undefinedSymbol = createSymbol(4 /* Property */, "undefined");
undefinedSymbol.declarations = [];
- var argumentsSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "arguments");
+ var argumentsSymbol = createSymbol(4 /* Property */, "arguments");
+ // for public members that accept a Node or one of its subtypes, we must guard against
+ // synthetic nodes created during transformations by calling `getParseTreeNode`.
+ // for most of these, we perform the guard only on `checker` to avoid any possible
+ // extra cost of calling `getParseTreeNode` when calling these functions from inside the
+ // checker.
var checker = {
getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
@@ -24153,49 +25432,129 @@ var ts;
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; },
+ getMergedSymbol: getMergedSymbol,
getDiagnostics: getDiagnostics,
getGlobalDiagnostics: getGlobalDiagnostics,
- getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
- getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration,
+ getTypeOfSymbolAtLocation: function (symbol, location) {
+ location = ts.getParseTreeNode(location);
+ return location ? getTypeOfSymbolAtLocation(symbol, location) : unknownType;
+ },
+ getSymbolsOfParameterPropertyDeclaration: function (parameter, parameterName) {
+ parameter = ts.getParseTreeNode(parameter, ts.isParameter);
+ ts.Debug.assert(parameter !== undefined, "Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.");
+ return getSymbolsOfParameterPropertyDeclaration(parameter, parameterName);
+ },
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
getPropertiesOfType: getPropertiesOfType,
getPropertyOfType: getPropertyOfType,
+ getIndexInfoOfType: getIndexInfoOfType,
getSignaturesOfType: getSignaturesOfType,
getIndexTypeOfType: getIndexTypeOfType,
getBaseTypes: getBaseTypes,
+ getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
+ getWidenedType: getWidenedType,
+ getTypeFromTypeNode: function (node) {
+ node = ts.getParseTreeNode(node, ts.isTypeNode);
+ return node ? getTypeFromTypeNode(node) : unknownType;
+ },
+ getParameterType: getTypeAtPosition,
getReturnTypeOfSignature: getReturnTypeOfSignature,
getNonNullableType: getNonNullableType,
- getSymbolsInScope: getSymbolsInScope,
- getSymbolAtLocation: getSymbolAtLocation,
- getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
- getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol,
- getTypeAtLocation: getTypeOfNode,
- getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment,
- typeToString: typeToString,
+ typeToTypeNode: nodeBuilder.typeToTypeNode,
+ indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
+ signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
+ getSymbolsInScope: function (location, meaning) {
+ location = ts.getParseTreeNode(location);
+ return location ? getSymbolsInScope(location, meaning) : [];
+ },
+ getSymbolAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getSymbolAtLocation(node) : undefined;
+ },
+ getShorthandAssignmentValueSymbol: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getShorthandAssignmentValueSymbol(node) : undefined;
+ },
+ getExportSpecifierLocalTargetSymbol: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExportSpecifier);
+ return node ? getExportSpecifierLocalTargetSymbol(node) : undefined;
+ },
+ getTypeAtLocation: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getTypeOfNode(node) : unknownType;
+ },
+ getPropertySymbolOfDestructuringAssignment: function (location) {
+ location = ts.getParseTreeNode(location, ts.isIdentifier);
+ return location ? getPropertySymbolOfDestructuringAssignment(location) : undefined;
+ },
+ signatureToString: function (signature, enclosingDeclaration, flags, kind) {
+ return signatureToString(signature, ts.getParseTreeNode(enclosingDeclaration), flags, kind);
+ },
+ typeToString: function (type, enclosingDeclaration, flags) {
+ return typeToString(type, ts.getParseTreeNode(enclosingDeclaration), flags);
+ },
getSymbolDisplayBuilder: getSymbolDisplayBuilder,
- symbolToString: symbolToString,
+ symbolToString: function (symbol, enclosingDeclaration, meaning) {
+ return symbolToString(symbol, ts.getParseTreeNode(enclosingDeclaration), meaning);
+ },
getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
getRootSymbols: getRootSymbols,
- getContextualType: getContextualType,
+ getContextualType: function (node) {
+ node = ts.getParseTreeNode(node, ts.isExpression);
+ return node ? getContextualType(node) : undefined;
+ },
getFullyQualifiedName: getFullyQualifiedName,
- getResolvedSignature: getResolvedSignature,
- getConstantValue: getConstantValue,
- isValidPropertyAccess: isValidPropertyAccess,
- getSignatureFromDeclaration: getSignatureFromDeclaration,
- isImplementationOfOverload: isImplementationOfOverload,
+ getResolvedSignature: function (node, candidatesOutArray) {
+ node = ts.getParseTreeNode(node, ts.isCallLikeExpression);
+ return node ? getResolvedSignature(node, candidatesOutArray) : undefined;
+ },
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
+ isValidPropertyAccess: function (node, propertyName) {
+ node = ts.getParseTreeNode(node, ts.isPropertyAccessOrQualifiedName);
+ return node ? isValidPropertyAccess(node, propertyName) : false;
+ },
+ getSignatureFromDeclaration: function (declaration) {
+ declaration = ts.getParseTreeNode(declaration, ts.isFunctionLike);
+ return declaration ? getSignatureFromDeclaration(declaration) : undefined;
+ },
+ isImplementationOfOverload: function (node) {
+ node = ts.getParseTreeNode(node, ts.isFunctionLike);
+ return node ? isImplementationOfOverload(node) : undefined;
+ },
+ getImmediateAliasedSymbol: function (symbol) {
+ ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here.");
+ var links = getSymbolLinks(symbol);
+ if (!links.immediateTarget) {
+ var node = getDeclarationOfAliasSymbol(symbol);
+ ts.Debug.assert(!!node);
+ links.immediateTarget = getTargetOfAliasDeclaration(node, /*dontRecursivelyResolve*/ true);
+ }
+ return links.immediateTarget;
+ },
getAliasedSymbol: resolveAlias,
getEmitResolver: getEmitResolver,
getExportsOfModule: getExportsOfModuleAsArray,
+ getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
getAmbientModules: getAmbientModules,
- getJsxElementAttributesType: getJsxElementAttributesType,
+ getAllAttributesTypeFromJsxOpeningLikeElement: function (node) {
+ node = ts.getParseTreeNode(node, ts.isJsxOpeningLikeElement);
+ return node ? getAllAttributesTypeFromJsxOpeningLikeElement(node) : undefined;
+ },
getJsxIntrinsicTagNames: getJsxIntrinsicTagNames,
- isOptionalParameter: isOptionalParameter,
+ isOptionalParameter: function (node) {
+ node = ts.getParseTreeNode(node, ts.isParameter);
+ return node ? isOptionalParameter(node) : false;
+ },
tryGetMemberInModuleExports: tryGetMemberInModuleExports,
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
// we deliberately exclude augmentations
// since we are only interested in declarations of the module itself
return tryFindAmbientModule(moduleName, /*withAugmentations*/ false);
- }
+ },
+ getApparentType: getApparentType
};
var tupleTypes = [];
var unionTypes = ts.createMap();
@@ -24204,8 +25563,8 @@ var ts;
var numericLiteralTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
- var unknownSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "unknown");
- var resolvingSymbol = createSymbol(67108864 /* Transient */, "__resolving__");
+ var unknownSymbol = createSymbol(4 /* Property */, "unknown");
+ var resolvingSymbol = createSymbol(0, "__resolving__");
var anyType = createIntrinsicType(1 /* Any */, "any");
var autoType = createIntrinsicType(1 /* Any */, "any");
var unknownType = createIntrinsicType(1 /* Any */, "unknown");
@@ -24222,8 +25581,9 @@ var ts;
var voidType = createIntrinsicType(1024 /* Void */, "void");
var neverType = createIntrinsicType(8192 /* Never */, "never");
var silentNeverType = createIntrinsicType(8192 /* Never */, "never");
+ var nonPrimitiveType = createIntrinsicType(16777216 /* NonPrimitive */, "object");
var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
- var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */ | 67108864 /* Transient */, "__type");
+ var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type");
emptyTypeLiteralSymbol.members = ts.createMap();
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -24233,21 +25593,20 @@ var ts;
// in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes.
anyFunctionType.flags |= 8388608 /* ContainsAnyFunctionType */;
var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
+ var circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var silentNeverSignature = createSignature(undefined, undefined, undefined, emptyArray, silentNeverType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true);
+ var jsObjectLiteralIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
var globals = ts.createMap();
/**
* List of every ambient module with a "*" wildcard.
* Unlike other ambient modules, these can't be stored in `globals` because symbol tables only deal with exact matches.
* This is only used if there is no exact match.
- */
+ */
var patternAmbientModules;
- var getGlobalESSymbolConstructorSymbol;
- var getGlobalPromiseConstructorSymbol;
- var tryGetGlobalPromiseConstructorSymbol;
var globalObjectType;
var globalFunctionType;
var globalArrayType;
@@ -24256,29 +25615,29 @@ var ts;
var globalNumberType;
var globalBooleanType;
var globalRegExpType;
+ var globalThisType;
var anyArrayType;
var autoArrayType;
var anyReadonlyArrayType;
// The library files are only loaded when the feature is used.
// This allows users to just specify library files they want to used through --lib
// and they will not get an error from not having unrelated library files
- var getGlobalTemplateStringsArrayType;
- var getGlobalESSymbolType;
- var getGlobalIterableType;
- var getGlobalIteratorType;
- var getGlobalIterableIteratorType;
- var getGlobalClassDecoratorType;
- var getGlobalParameterDecoratorType;
- var getGlobalPropertyDecoratorType;
- var getGlobalMethodDecoratorType;
- var getGlobalTypedPropertyDescriptorType;
- var getGlobalPromiseType;
- var tryGetGlobalPromiseType;
- var getGlobalPromiseLikeType;
- var getInstantiatedGlobalPromiseLikeType;
- var getGlobalPromiseConstructorLikeType;
- var getGlobalThenableType;
- var jsxElementClassType;
+ var deferredGlobalESSymbolConstructorSymbol;
+ var deferredGlobalESSymbolType;
+ var deferredGlobalTypedPropertyDescriptorType;
+ var deferredGlobalPromiseType;
+ var deferredGlobalPromiseConstructorSymbol;
+ var deferredGlobalPromiseConstructorLikeType;
+ var deferredGlobalIterableType;
+ var deferredGlobalIteratorType;
+ var deferredGlobalIterableIteratorType;
+ var deferredGlobalAsyncIterableType;
+ var deferredGlobalAsyncIteratorType;
+ var deferredGlobalAsyncIterableIteratorType;
+ var deferredGlobalTemplateStringsArrayType;
+ var deferredJsxElementClassType;
+ var deferredJsxElementType;
+ var deferredJsxStatelessElementType;
var deferredNodes;
var deferredUnusedIdentifierNodes;
var flowLoopStart = 0;
@@ -24299,6 +25658,7 @@ var ts;
var visitedFlowNodes = [];
var visitedFlowTypes = [];
var potentialThisCollisions = [];
+ var potentialNewTargetCollisions = [];
var awaitedTypeStack = [];
var diagnostics = ts.createDiagnosticCollection();
var TypeFacts;
@@ -24364,7 +25724,7 @@ var ts;
TypeFacts[TypeFacts["UndefinedFacts"] = 2457472] = "UndefinedFacts";
TypeFacts[TypeFacts["NullFacts"] = 2340752] = "NullFacts";
})(TypeFacts || (TypeFacts = {}));
- var typeofEQFacts = ts.createMap({
+ var typeofEQFacts = ts.createMapFromTemplate({
"string": 1 /* TypeofEQString */,
"number": 2 /* TypeofEQNumber */,
"boolean": 4 /* TypeofEQBoolean */,
@@ -24373,7 +25733,7 @@ var ts;
"object": 16 /* TypeofEQObject */,
"function": 32 /* TypeofEQFunction */
});
- var typeofNEFacts = ts.createMap({
+ var typeofNEFacts = ts.createMapFromTemplate({
"string": 128 /* TypeofNEString */,
"number": 256 /* TypeofNENumber */,
"boolean": 512 /* TypeofNEBoolean */,
@@ -24382,14 +25742,14 @@ var ts;
"object": 2048 /* TypeofNEObject */,
"function": 4096 /* TypeofNEFunction */
});
- var typeofTypesByName = ts.createMap({
+ var typeofTypesByName = ts.createMapFromTemplate({
"string": stringType,
"number": numberType,
"boolean": booleanType,
"symbol": esSymbolType,
"undefined": undefinedType
});
- var jsxElementType;
+ var typeofType = createTypeofType();
var _jsxNamespace;
var _jsxFactoryEntity;
/** Things we lazy load from the JSX namespace */
@@ -24417,8 +25777,14 @@ var ts;
TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType";
TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType";
})(TypeSystemPropertyName || (TypeSystemPropertyName = {}));
+ var CheckMode;
+ (function (CheckMode) {
+ CheckMode[CheckMode["Normal"] = 0] = "Normal";
+ CheckMode[CheckMode["SkipContextSensitive"] = 1] = "SkipContextSensitive";
+ CheckMode[CheckMode["Inferential"] = 2] = "Inferential";
+ })(CheckMode || (CheckMode = {}));
var builtinGlobals = ts.createMap();
- builtinGlobals[undefinedSymbol.name] = undefinedSymbol;
+ builtinGlobals.set(undefinedSymbol.name, undefinedSymbol);
initializeTypeChecker();
return checker;
function getJsxNamespace() {
@@ -24450,7 +25816,12 @@ var ts;
}
function createSymbol(flags, name) {
symbolCount++;
- return new Symbol(flags, name);
+ var symbol = (new Symbol(flags | 134217728 /* Transient */, name));
+ symbol.checkFlags = 0;
+ return symbol;
+ }
+ function isTransientSymbol(symbol) {
+ return (symbol.flags & 134217728 /* Transient */) !== 0;
}
function getExcludedSymbolFlags(flags) {
var result = 0;
@@ -24496,7 +25867,7 @@ var ts;
mergedSymbols[source.mergeId] = target;
}
function cloneSymbol(symbol) {
- var result = createSymbol(symbol.flags | 33554432 /* Merged */, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
result.declarations = symbol.declarations.slice(0);
result.parent = symbol.parent;
if (symbol.valueDeclaration)
@@ -24519,13 +25890,11 @@ var ts;
target.flags |= source.flags;
if (source.valueDeclaration &&
(!target.valueDeclaration ||
- (target.valueDeclaration.kind === 230 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 230 /* ModuleDeclaration */))) {
+ (target.valueDeclaration.kind === 232 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 232 /* ModuleDeclaration */))) {
// other kinds of value declarations take precedence over modules
target.valueDeclaration = source.valueDeclaration;
}
- ts.forEach(source.declarations, function (node) {
- target.declarations.push(node);
- });
+ ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@@ -24538,6 +25907,9 @@ var ts;
}
recordMergedSymbol(target, source);
}
+ else if (target.flags & 1024 /* NamespaceModule */) {
+ error(source.valueDeclaration.name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ }
else {
var message_2 = target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
@@ -24550,18 +25922,19 @@ var ts;
}
}
function mergeSymbolTable(target, source) {
- for (var id in source) {
- var targetSymbol = target[id];
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
if (!targetSymbol) {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
else {
- if (!(targetSymbol.flags & 33554432 /* Merged */)) {
- target[id] = targetSymbol = cloneSymbol(targetSymbol);
+ if (!(targetSymbol.flags & 134217728 /* Transient */)) {
+ targetSymbol = cloneSymbol(targetSymbol);
+ target.set(id, targetSymbol);
}
- mergeSymbol(targetSymbol, source[id]);
+ mergeSymbol(targetSymbol, sourceSymbol);
}
- }
+ });
}
function mergeModuleAugmentation(moduleName) {
var moduleAugmentation = moduleName.parent;
@@ -24590,7 +25963,7 @@ var ts;
if (mainModule.flags & 1920 /* Namespace */) {
// if module symbol has already been merged - it is safe to use it.
// otherwise clone it
- mainModule = mainModule.flags & 33554432 /* Merged */ ? mainModule : cloneSymbol(mainModule);
+ mainModule = mainModule.flags & 134217728 /* Transient */ ? mainModule : cloneSymbol(mainModule);
mergeSymbol(mainModule, moduleAugmentation.symbol);
}
else {
@@ -24599,21 +25972,22 @@ var ts;
}
}
function addToSymbolTable(target, source, message) {
- for (var id in source) {
- if (target[id]) {
+ source.forEach(function (sourceSymbol, id) {
+ var targetSymbol = target.get(id);
+ if (targetSymbol) {
// Error on redeclarations
- ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message));
+ ts.forEach(targetSymbol.declarations, addDeclarationDiagnostic(id, message));
}
else {
- target[id] = source[id];
+ target.set(id, sourceSymbol);
}
- }
+ });
function addDeclarationDiagnostic(id, message) {
return function (declaration) { return diagnostics.add(ts.createDiagnosticForNode(declaration, message, id)); };
}
}
function getSymbolLinks(symbol) {
- if (symbol.flags & 67108864 /* Transient */)
+ if (symbol.flags & 134217728 /* Transient */)
return symbol;
var id = getSymbolId(symbol);
return symbolLinks[id] || (symbolLinks[id] = {});
@@ -24625,14 +25999,17 @@ var ts;
function getObjectFlags(type) {
return type.flags & 32768 /* Object */ ? type.objectFlags : 0;
}
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0;
+ }
function isGlobalSourceFile(node) {
- return node.kind === 261 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
+ return node.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
}
function getSymbol(symbols, name, meaning) {
if (meaning) {
- var symbol = symbols[name];
+ var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -24669,12 +26046,12 @@ var ts;
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
(!compilerOptions.outFile && !compilerOptions.out)) {
- // nodes are in different files and order cannot be determines
+ // nodes are in different files and order cannot be determined
return true;
}
// declaration is after usage
// can be legal if usage is deferred (i.e. inside function or in initializer of instance property)
- if (isUsedInFunctionOrNonStaticProperty(usage)) {
+ if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
return true;
}
var sourceFiles = host.getSourceFiles();
@@ -24682,20 +26059,41 @@ var ts;
}
if (declaration.pos <= usage.pos) {
// declaration is before usage
- // still might be illegal if usage is in the initializer of the variable declaration
- return declaration.kind !== 223 /* VariableDeclaration */ ||
- !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ if (declaration.kind === 175 /* BindingElement */) {
+ // still might be illegal if declaration and usage are both binding elements (eg var [a = b, b = b] = [1, 2])
+ var errorBindingElement = ts.getAncestor(usage, 175 /* BindingElement */);
+ if (errorBindingElement) {
+ return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
+ declaration.pos < errorBindingElement.pos;
+ }
+ // or it might be illegal if usage happens before parent variable is declared (eg var [a] = a)
+ return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 225 /* VariableDeclaration */), usage);
+ }
+ else if (declaration.kind === 225 /* VariableDeclaration */) {
+ // still might be illegal if usage is in the initializer of the variable declaration (eg var a = a)
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
+ }
+ return true;
+ }
+ // declaration is after usage, but it can still be legal if usage is deferred:
+ // 1. inside an export specifier
+ // 2. inside a function
+ // 3. inside an instance property initializer, a reference to a non-instance property
+ // 4. inside a static property initializer, a reference to a static method in the same class
+ // or if usage is in a type context:
+ // 1. inside a type query (typeof in type position)
+ if (usage.parent.kind === 245 /* ExportSpecifier */) {
+ // export specifiers do not use the variable, they only make it available for use
+ return true;
}
- // declaration is after usage
- // can be legal if usage is deferred (i.e. inside function or in initializer of instance property)
var container = ts.getEnclosingBlockScopeContainer(declaration);
- return isUsedInFunctionOrNonStaticProperty(usage, container);
+ return isInTypeQuery(usage) || isUsedInFunctionOrInstanceProperty(usage, declaration, container);
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
var container = ts.getEnclosingBlockScopeContainer(declaration);
switch (declaration.parent.parent.kind) {
- case 205 /* VariableStatement */:
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 207 /* VariableStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
// variable statement/for/for-of statement case,
// use site should not be inside variable declaration (initializer of declaration or binding element)
if (isSameScopeDescendentOf(usage, declaration, container)) {
@@ -24704,8 +26102,8 @@ var ts;
break;
}
switch (declaration.parent.parent.kind) {
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
// ForIn/ForOf case - use site should not be used in expression part
if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
return true;
@@ -24713,25 +26111,31 @@ var ts;
}
return false;
}
- function isUsedInFunctionOrNonStaticProperty(usage, container) {
- var current = usage;
- while (current) {
+ function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
+ return !!ts.findAncestor(usage, function (current) {
if (current === container) {
- return false;
+ return "quit";
}
if (ts.isFunctionLike(current)) {
return true;
}
- var initializerOfNonStaticProperty = current.parent &&
- current.parent.kind === 147 /* PropertyDeclaration */ &&
- (ts.getModifierFlags(current.parent) & 32 /* Static */) === 0 &&
+ var initializerOfProperty = current.parent &&
+ current.parent.kind === 148 /* PropertyDeclaration */ &&
current.parent.initializer === current;
- if (initializerOfNonStaticProperty) {
- return true;
+ if (initializerOfProperty) {
+ if (ts.getModifierFlags(current.parent) & 32 /* Static */) {
+ if (declaration.kind === 150 /* MethodDeclaration */) {
+ return true;
+ }
+ }
+ else {
+ var isDeclarationInstanceProperty = declaration.kind === 148 /* PropertyDeclaration */ && !(ts.getModifierFlags(declaration) & 32 /* Static */);
+ if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+ return true;
+ }
+ }
}
- current = current.parent;
- }
- return false;
+ });
}
}
// Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and
@@ -24756,11 +26160,11 @@ var ts;
// - parameters are only in the scope of function body
// This restriction does not apply to JSDoc comment types because they are parented
// at a higher level than type parameters would normally be
- if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 278 /* JSDocComment */) {
+ if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 282 /* JSDocComment */) {
useResult = result.flags & 262144 /* TypeParameter */
? lastLocation === location.type ||
- lastLocation.kind === 144 /* Parameter */ ||
- lastLocation.kind === 143 /* TypeParameter */
+ lastLocation.kind === 145 /* Parameter */ ||
+ lastLocation.kind === 144 /* TypeParameter */
: false;
}
if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) {
@@ -24769,9 +26173,9 @@ var ts;
// however it is detected separately when checking initializers of parameters
// to make sure that they reference no variables declared after them.
useResult =
- lastLocation.kind === 144 /* Parameter */ ||
+ lastLocation.kind === 145 /* Parameter */ ||
(lastLocation === location.type &&
- result.valueDeclaration.kind === 144 /* Parameter */);
+ result.valueDeclaration.kind === 145 /* Parameter */);
}
}
if (useResult) {
@@ -24783,16 +26187,17 @@ var ts;
}
}
switch (location.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (!ts.isExternalOrCommonJsModule(location))
break;
isInExternalModule = true;
- case 230 /* ModuleDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
var moduleExports = getSymbolOfNode(location).exports;
- if (location.kind === 261 /* SourceFile */ || ts.isAmbientModule(location)) {
+ if (location.kind === 264 /* SourceFile */ || ts.isAmbientModule(location)) {
// It's an external module. First see if the module has an export default and if the local
// name of that export default matches.
- if (result = moduleExports["default"]) {
+ if (result = moduleExports.get("default")) {
var localSymbol = ts.getLocalSymbolForExportDefault(result);
if (localSymbol && (result.flags & meaning) && localSymbol.name === name) {
break loop;
@@ -24810,9 +26215,10 @@ var ts;
// 2. We check === SymbolFlags.Alias in order to check that the symbol is *purely*
// an alias. If we used &, we'd be throwing out symbols that have non alias aspects,
// which is not the desired behavior.
- if (moduleExports[name] &&
- moduleExports[name].flags === 8388608 /* Alias */ &&
- ts.getDeclarationOfKind(moduleExports[name], 243 /* ExportSpecifier */)) {
+ var moduleExport = moduleExports.get(name);
+ if (moduleExport &&
+ moduleExport.flags === 8388608 /* Alias */ &&
+ ts.getDeclarationOfKind(moduleExport, 245 /* ExportSpecifier */)) {
break;
}
}
@@ -24820,13 +26226,13 @@ var ts;
break loop;
}
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
break loop;
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
// TypeScript 1.0 spec (April 2014): 8.4.1
// Initializer expressions for instance member variables are evaluated in the scope
// of the class constructor body but are not permitted to reference parameters or
@@ -24843,10 +26249,15 @@ var ts;
}
}
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
+ if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
+ // ignore type parameters not declared in this container
+ result = undefined;
+ break;
+ }
if (lastLocation && ts.getModifierFlags(lastLocation) & 32 /* Static */) {
// TypeScript 1.0 spec (April 2014): 3.4.1
// The scope of a type parameter extends over the entire declaration with which the type
@@ -24856,7 +26267,7 @@ var ts;
}
break loop;
}
- if (location.kind === 197 /* ClassExpression */ && meaning & 32 /* Class */) {
+ if (location.kind === 198 /* ClassExpression */ && meaning & 32 /* Class */) {
var className = location.name;
if (className && name === className.text) {
result = location.symbol;
@@ -24872,9 +26283,9 @@ var ts;
// [foo<T>()]() { } // <-- Reference to T from class's own computed property
// }
//
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
grandparent = location.parent.parent;
- if (ts.isClassLike(grandparent) || grandparent.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isClassLike(grandparent) || grandparent.kind === 229 /* InterfaceDeclaration */) {
// A reference to this grandparent's type parameters would be an error
if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
@@ -24882,19 +26293,19 @@ var ts;
}
}
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
if (meaning & 3 /* Variable */ && name === "arguments") {
result = argumentsSymbol;
break loop;
}
break;
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
if (meaning & 3 /* Variable */ && name === "arguments") {
result = argumentsSymbol;
break loop;
@@ -24907,7 +26318,7 @@ var ts;
}
}
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Decorators are resolved at the class declaration. Resolving at the parameter
// or member would result in looking up locals in the method.
//
@@ -24916,7 +26327,7 @@ var ts;
// method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
// }
//
- if (location.parent && location.parent.kind === 144 /* Parameter */) {
+ if (location.parent && location.parent.kind === 145 /* Parameter */) {
location = location.parent;
}
//
@@ -24945,7 +26356,8 @@ var ts;
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
!checkAndReportErrorForExtendingInterface(errorLocation) &&
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
- !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning)) {
+ !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
+ !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
}
}
@@ -24967,31 +26379,41 @@ var ts;
// interface bar {}
// }
// const foo/*1*/: foo/*2*/.bar;
- // The foo at /*1*/ and /*2*/ will share same symbol with two meaning
- // block - scope variable and namespace module. However, only when we
+ // The foo at /*1*/ and /*2*/ will share same symbol with two meanings:
+ // block-scoped variable and namespace module. However, only when we
// try to resolve name in /*1*/ which is used in variable position,
- // we want to check for block- scoped
- if (meaning & 2 /* BlockScopedVariable */) {
+ // we want to check for block-scoped
+ if (meaning & 2 /* BlockScopedVariable */ ||
+ ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */)) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
- if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */) {
+ if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
}
}
// If we're in an external module, we can't reference value symbols created from UMD export declarations
if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) {
var decls = result.declarations;
- if (decls && decls.length === 1 && decls[0].kind === 233 /* NamespaceExportDeclaration */) {
+ if (decls && decls.length === 1 && decls[0].kind === 235 /* NamespaceExportDeclaration */) {
error(errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, name);
}
}
}
return result;
}
+ function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (decl.kind === 144 /* TypeParameter */ && decl.parent === container) {
+ return true;
+ }
+ }
+ return false;
+ }
function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {
if ((errorLocation.kind === 70 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) {
return false;
}
- var container = ts.getThisContainer(errorLocation, /* includeArrowFunctions */ true);
+ var container = ts.getThisContainer(errorLocation, /*includeArrowFunctions*/ true);
var location = container;
while (location) {
if (ts.isClassLike(location.parent)) {
@@ -25034,9 +26456,9 @@ var ts;
function getEntityNameForExtendingInterface(node) {
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
ts.Debug.assert(ts.isEntityNameExpression(node.expression));
return node.expression;
default:
@@ -25063,13 +26485,38 @@ var ts;
}
return false;
}
+ function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) {
+ if (meaning & (107455 /* Value */ & ~1024 /* NamespaceModule */ & ~793064 /* Type */)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~107455 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, name);
+ return true;
+ }
+ }
+ else if (meaning & (793064 /* Type */ & ~1024 /* NamespaceModule */ & ~107455 /* Value */)) {
+ var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~793064 /* Type */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
+ if (symbol) {
+ error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, name);
+ return true;
+ }
+ }
+ return false;
+ }
function checkResolvedBlockScopedVariable(result, errorLocation) {
- ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0);
+ ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
// Block-scoped variables cannot be used before their definition
- var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
- ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
- if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 223 /* VariableDeclaration */), errorLocation)) {
- error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 231 /* EnumDeclaration */) ? d : undefined; });
+ ts.Debug.assert(declaration !== undefined, "Declaration to checkResolvedBlockScopedVariable is undefined");
+ if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
+ if (result.flags & 2 /* BlockScopedVariable */) {
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 32 /* Class */) {
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
+ else if (result.flags & 384 /* Enum */) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ }
}
}
/* Starting from 'initial' node walk up the parent chain until 'stopAt' node is reached.
@@ -25077,56 +26524,50 @@ var ts;
* Return false if 'stopAt' node is reached or isFunctionLike(current) === true.
*/
function isSameScopeDescendentOf(initial, parent, stopAt) {
- if (!parent) {
- return false;
- }
- for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
- if (current === parent) {
- return true;
- }
- }
- return false;
+ return parent && !!ts.findAncestor(initial, function (n) { return n === stopAt || ts.isFunctionLike(n) ? "quit" : n === parent; });
}
function getAnyImportSyntax(node) {
if (ts.isAliasSymbolDeclaration(node)) {
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
- while (node && node.kind !== 235 /* ImportDeclaration */) {
- node = node.parent;
- }
- return node;
+ return ts.findAncestor(node, function (n) { return n.kind === 237 /* ImportDeclaration */; });
}
}
function getDeclarationOfAliasSymbol(symbol) {
- return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
+ return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
- function getTargetOfImportEqualsDeclaration(node) {
- if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {
+ if (node.moduleReference.kind === 247 /* ExternalModuleReference */) {
return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
}
- return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference);
+ return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);
}
- function getTargetOfImportClause(node) {
+ function getTargetOfImportClause(node, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
if (moduleSymbol) {
- var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ?
- moduleSymbol :
- moduleSymbol.exports["export="] ?
- getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
- resolveSymbol(moduleSymbol.exports["default"]);
+ var exportDefaultSymbol = void 0;
+ if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
+ exportDefaultSymbol = moduleSymbol;
+ }
+ else {
+ var exportValue = moduleSymbol.exports.get("export=");
+ exportDefaultSymbol = exportValue
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), "default")
+ : resolveSymbol(moduleSymbol.exports.get("default"), dontResolveAlias);
+ }
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
}
else if (!exportDefaultSymbol && allowSyntheticDefaultImports) {
- return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ return resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
return exportDefaultSymbol;
}
}
- function getTargetOfNamespaceImport(node) {
+ function getTargetOfNamespaceImport(node, dontResolveAlias) {
var moduleSpecifier = node.parent.parent.moduleSpecifier;
- return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
+ return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
// This function creates a synthetic symbol that combines the value side of one symbol with the
// type/namespace side of another symbol. Consider this example:
@@ -25161,12 +26602,9 @@ var ts;
result.exports = valueSymbol.exports;
return result;
}
- function getExportOfModule(symbol, name) {
+ function getExportOfModule(symbol, name, dontResolveAlias) {
if (symbol.flags & 1536 /* Module */) {
- var exportedSymbol = getExportsOfSymbol(symbol)[name];
- if (exportedSymbol) {
- return resolveSymbol(exportedSymbol);
- }
+ return resolveSymbol(getExportsOfSymbol(symbol).get(name), dontResolveAlias);
}
}
function getPropertyOfVariable(symbol, name) {
@@ -25177,74 +26615,75 @@ var ts;
}
}
}
- function getExternalModuleMember(node, specifier) {
+ function getExternalModuleMember(node, specifier, dontResolveAlias) {
var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
- var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
+ var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier, dontResolveAlias);
if (targetSymbol) {
- var name_16 = specifier.propertyName || specifier.name;
- if (name_16.text) {
+ var name = specifier.propertyName || specifier.name;
+ if (name.text) {
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
return moduleSymbol;
}
var symbolFromVariable = void 0;
// First check if module was specified with "export=". If so, get the member from the resolved type
- if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) {
- symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_16.text);
+ if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=")) {
+ symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name.text);
}
else {
- symbolFromVariable = getPropertyOfVariable(targetSymbol, name_16.text);
+ symbolFromVariable = getPropertyOfVariable(targetSymbol, name.text);
}
// if symbolFromVariable is export - get its final target
- symbolFromVariable = resolveSymbol(symbolFromVariable);
- var symbolFromModule = getExportOfModule(targetSymbol, name_16.text);
+ symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
+ var symbolFromModule = getExportOfModule(targetSymbol, name.text, dontResolveAlias);
// If the export member we're looking for is default, and there is no real default but allowSyntheticDefaultImports is on, return the entire module as the default
- if (!symbolFromModule && allowSyntheticDefaultImports && name_16.text === "default") {
- symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol);
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.text === "default") {
+ symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
}
var symbol = symbolFromModule && symbolFromVariable ?
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
symbolFromModule || symbolFromVariable;
if (!symbol) {
- error(name_16, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_16));
+ error(name, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name));
}
return symbol;
}
}
}
- function getTargetOfImportSpecifier(node) {
- return getExternalModuleMember(node.parent.parent.parent, node);
+ function getTargetOfImportSpecifier(node, dontResolveAlias) {
+ return getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias);
}
- function getTargetOfNamespaceExportDeclaration(node) {
- return resolveExternalModuleSymbol(node.parent.symbol);
+ function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
+ return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node) {
+ function getTargetOfExportSpecifier(node, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
- getExternalModuleMember(node.parent.parent, node) :
- resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */);
+ getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
+ resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
- function getTargetOfExportAssignment(node) {
- return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */);
+ function getTargetOfExportAssignment(node, dontResolveAlias) {
+ return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
- function getTargetOfAliasDeclaration(node) {
+ function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- return getTargetOfImportEqualsDeclaration(node);
- case 236 /* ImportClause */:
- return getTargetOfImportClause(node);
- case 237 /* NamespaceImport */:
- return getTargetOfNamespaceImport(node);
- case 239 /* ImportSpecifier */:
- return getTargetOfImportSpecifier(node);
- case 243 /* ExportSpecifier */:
- return getTargetOfExportSpecifier(node);
- case 240 /* ExportAssignment */:
- return getTargetOfExportAssignment(node);
- case 233 /* NamespaceExportDeclaration */:
- return getTargetOfNamespaceExportDeclaration(node);
- }
- }
- function resolveSymbol(symbol) {
- return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */)) ? resolveAlias(symbol) : symbol;
+ case 236 /* ImportEqualsDeclaration */:
+ return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
+ case 238 /* ImportClause */:
+ return getTargetOfImportClause(node, dontRecursivelyResolve);
+ case 239 /* NamespaceImport */:
+ return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
+ case 241 /* ImportSpecifier */:
+ return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
+ case 245 /* ExportSpecifier */:
+ return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ case 242 /* ExportAssignment */:
+ return getTargetOfExportAssignment(node, dontRecursivelyResolve);
+ case 235 /* NamespaceExportDeclaration */:
+ return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
+ }
+ }
+ function resolveSymbol(symbol, dontResolveAlias) {
+ var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */));
+ return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here.");
@@ -25286,11 +26725,11 @@ var ts;
links.referenced = true;
var node = getDeclarationOfAliasSymbol(symbol);
ts.Debug.assert(!!node);
- if (node.kind === 240 /* ExportAssignment */) {
+ if (node.kind === 242 /* ExportAssignment */) {
// export default <symbol>
checkExpressionCached(node.expression);
}
- else if (node.kind === 243 /* ExportSpecifier */) {
+ else if (node.kind === 245 /* ExportSpecifier */) {
// export { <symbol> } or export { <symbol> as foo }
checkExpressionCached(node.propertyName || node.name);
}
@@ -25312,20 +26751,22 @@ var ts;
entityName = entityName.parent;
}
// Check for case 1 and 3 in the above example
- if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 141 /* QualifiedName */) {
+ if (entityName.kind === 70 /* Identifier */ || entityName.parent.kind === 142 /* QualifiedName */) {
return resolveEntityName(entityName, 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
else {
// Case 2 in above example
// entityName.kind could be a QualifiedName or a Missing identifier
- ts.Debug.assert(entityName.parent.kind === 234 /* ImportEqualsDeclaration */);
+ ts.Debug.assert(entityName.parent.kind === 236 /* ImportEqualsDeclaration */);
return resolveEntityName(entityName, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
}
}
function getFullyQualifiedName(symbol) {
return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol);
}
- // Resolves a qualified name and any involved aliases
+ /**
+ * Resolves a qualified name and any involved aliases.
+ */
function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias, location) {
if (ts.nodeIsMissing(name)) {
return undefined;
@@ -25338,9 +26779,23 @@ var ts;
return undefined;
}
}
- else if (name.kind === 141 /* QualifiedName */ || name.kind === 177 /* PropertyAccessExpression */) {
- var left = name.kind === 141 /* QualifiedName */ ? name.left : name.expression;
- var right = name.kind === 141 /* QualifiedName */ ? name.right : name.name;
+ else if (name.kind === 142 /* QualifiedName */ || name.kind === 178 /* PropertyAccessExpression */) {
+ var left = void 0;
+ if (name.kind === 142 /* QualifiedName */) {
+ left = name.left;
+ }
+ else if (name.kind === 178 /* PropertyAccessExpression */ &&
+ (name.expression.kind === 184 /* ParenthesizedExpression */ || ts.isEntityNameExpression(name.expression))) {
+ left = name.expression;
+ }
+ else {
+ // If the expression in property-access expression is not entity-name or parenthsizedExpression (e.g. it is a call expression), it won't be able to successfully resolve the name.
+ // This is the case when we are trying to do any language service operation in heritage clauses. By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression
+ // will attempt to checkPropertyAccessExpression to resolve symbol.
+ // i.e class C extends foo()./*do language service operation here*/B {}
+ return undefined;
+ }
+ var right = name.kind === 142 /* QualifiedName */ ? name.right : name.name;
var namespace = resolveEntityName(left, 1920 /* Namespace */, ignoreErrors, /*dontResolveAlias*/ false, location);
if (!namespace || ts.nodeIsMissing(right)) {
return undefined;
@@ -25356,10 +26811,19 @@ var ts;
return undefined;
}
}
+ else if (name.kind === 184 /* ParenthesizedExpression */) {
+ // If the expression in parenthesizedExpression is not an entity-name (e.g. it is a call expression), it won't be able to successfully resolve the name.
+ // This is the case when we are trying to do any language service operation in heritage clauses.
+ // By return undefined, the getSymbolOfEntityNameOrPropertyAccessExpression will attempt to checkPropertyAccessExpression to resolve symbol.
+ // i.e class C extends foo()./*do language service operation here*/B {}
+ return ts.isEntityNameExpression(name.expression) ?
+ resolveEntityName(name.expression, meaning, ignoreErrors, dontResolveAlias, location) :
+ undefined;
+ }
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -25367,7 +26831,7 @@ var ts;
}
function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation) {
if (isForAugmentation === void 0) { isForAugmentation = false; }
- if (moduleReferenceExpression.kind !== 9 /* StringLiteral */) {
+ if (moduleReferenceExpression.kind !== 9 /* StringLiteral */ && moduleReferenceExpression.kind !== 12 /* NoSubstitutionTemplateLiteral */) {
return;
}
var moduleReferenceLiteral = moduleReferenceExpression;
@@ -25409,11 +26873,10 @@ var ts;
// May be an untyped module. If so, ignore resolutionDiagnostic.
if (!isRelative && resolvedModule && !ts.extensionIsTypeScript(resolvedModule.extension)) {
if (isForAugmentation) {
- ts.Debug.assert(!!moduleNotFoundError);
var diag = ts.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;
- error(errorNode, diag, moduleName, resolvedModule.resolvedFileName);
+ error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
- else if (compilerOptions.noImplicitAny && moduleNotFoundError) {
+ else if (noImplicitAny && moduleNotFoundError) {
error(errorNode, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
}
// Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first.
@@ -25439,30 +26902,38 @@ var ts;
}
// An external module with an 'export =' declaration resolves to the target of the 'export =' declaration,
// and an external module with no 'export =' declaration resolves to the module itself.
- function resolveExternalModuleSymbol(moduleSymbol) {
- return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol;
+ function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
+ return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports.get("export="), dontResolveAlias)) || moduleSymbol;
}
// An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export ='
// references a symbol that is at least declared as a module or a variable. The target of the 'export =' may
// combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable).
- function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
- var symbol = resolveExternalModuleSymbol(moduleSymbol);
- if (symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) {
+ function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression, dontResolveAlias) {
+ var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
+ if (!dontResolveAlias && symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) {
error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
symbol = undefined;
}
return symbol;
}
function hasExportAssignmentSymbol(moduleSymbol) {
- return moduleSymbol.exports["export="] !== undefined;
+ return moduleSymbol.exports.get("export=") !== undefined;
}
function getExportsOfModuleAsArray(moduleSymbol) {
return symbolsToArray(getExportsOfModule(moduleSymbol));
}
+ function getExportsAndPropertiesOfModule(moduleSymbol) {
+ var exports = getExportsOfModuleAsArray(moduleSymbol);
+ var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+ if (exportEquals !== moduleSymbol) {
+ ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+ }
+ return exports;
+ }
function tryGetMemberInModuleExports(memberName, moduleSymbol) {
var symbolTable = getExportsOfModule(moduleSymbol);
if (symbolTable) {
- return symbolTable[memberName];
+ return symbolTable.get(memberName);
}
}
function getExportsOfSymbol(symbol) {
@@ -25477,24 +26948,28 @@ var ts;
* Not passing `lookupTable` and `exportNode` disables this collection, and just extends the tables
*/
function extendExportSymbols(target, source, lookupTable, exportNode) {
- for (var id in source) {
- if (id !== "default" && !target[id]) {
- target[id] = source[id];
+ source && source.forEach(function (sourceSymbol, id) {
+ if (id === "default")
+ return;
+ var targetSymbol = target.get(id);
+ if (!targetSymbol) {
+ target.set(id, sourceSymbol);
if (lookupTable && exportNode) {
- lookupTable[id] = {
+ lookupTable.set(id, {
specifierText: ts.getTextOfNode(exportNode.moduleSpecifier)
- };
+ });
}
}
- else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
- if (!lookupTable[id].exportsWithDuplicate) {
- lookupTable[id].exportsWithDuplicate = [exportNode];
+ else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
+ var collisionTracker = lookupTable.get(id);
+ if (!collisionTracker.exportsWithDuplicate) {
+ collisionTracker.exportsWithDuplicate = [exportNode];
}
else {
- lookupTable[id].exportsWithDuplicate.push(exportNode);
+ collisionTracker.exportsWithDuplicate.push(exportNode);
}
}
- }
+ });
}
function getExportsForModule(moduleSymbol) {
var visitedSymbols = [];
@@ -25510,27 +26985,27 @@ var ts;
visitedSymbols.push(symbol);
var symbols = ts.cloneMap(symbol.exports);
// All export * declarations are collected in an __export symbol by the binder
- var exportStars = symbol.exports["__export"];
+ var exportStars = symbol.exports.get("__export");
if (exportStars) {
var nestedSymbols = ts.createMap();
- var lookupTable = ts.createMap();
+ var lookupTable_1 = ts.createMap();
for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
var node = _a[_i];
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
var exportedSymbols = visit(resolvedModule);
- extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node);
+ extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
}
- for (var id in lookupTable) {
- var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate;
+ lookupTable_1.forEach(function (_a, id) {
+ var exportsWithDuplicate = _a.exportsWithDuplicate;
// It's not an error if the file with multiple `export *`s with duplicate names exports a member with that name itself
- if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) {
- continue;
+ if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
+ return;
}
- for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) {
- var node = exportsWithDuplicate_1[_b];
- diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable[id].specifierText, id));
+ for (var _i = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _i < exportsWithDuplicate_1.length; _i++) {
+ var node = exportsWithDuplicate_1[_i];
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, lookupTable_1.get(id).specifierText, id));
}
- }
+ });
extendExportSymbols(symbols, nestedSymbols);
}
return symbols;
@@ -25552,26 +27027,13 @@ var ts;
: symbol;
}
function symbolIsValue(symbol) {
- // If it is an instantiated symbol, then it is a value if the symbol it is an
- // instantiation of is a value.
- if (symbol.flags & 16777216 /* Instantiated */) {
- return symbolIsValue(getSymbolLinks(symbol).target);
- }
- // If the symbol has the value flag, it is trivially a value.
- if (symbol.flags & 107455 /* Value */) {
- return true;
- }
- // If it is an alias, then it is a value if the symbol it resolves to is a value.
- if (symbol.flags & 8388608 /* Alias */) {
- return (resolveAlias(symbol).flags & 107455 /* Value */) !== 0;
- }
- return false;
+ return !!(symbol.flags & 107455 /* Value */ || symbol.flags & 8388608 /* Alias */ && resolveAlias(symbol).flags & 107455 /* Value */);
}
function findConstructorDeclaration(node) {
var members = node.members;
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
var member = members_1[_i];
- if (member.kind === 150 /* Constructor */ && ts.nodeIsPresent(member.body)) {
+ if (member.kind === 151 /* Constructor */ && ts.nodeIsPresent(member.body)) {
return member;
}
}
@@ -25599,6 +27061,9 @@ var ts;
type.symbol = symbol;
return type;
}
+ function createTypeofType() {
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32 /* StringLiteral */, s); }));
+ }
// A reserved member name starts with two underscores, but the third character cannot be an underscore
// or the @ symbol. A third underscore indicates an escaped form of an identifer that started
// with at least two underscores. The @ character indicates that the name is denoted by a well known ES
@@ -25611,16 +27076,15 @@ var ts;
}
function getNamedMembers(members) {
var result;
- for (var id in members) {
+ members.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
if (!result)
result = [];
- var symbol = members[id];
if (symbolIsValue(symbol)) {
result.push(symbol);
}
}
- }
+ });
return result || emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
@@ -25639,20 +27103,21 @@ var ts;
}
function forEachSymbolTableInScope(enclosingDeclaration, callback) {
var result;
- for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
+ for (var location = enclosingDeclaration; location; location = location.parent) {
// Locals of a source file are not in scope (because they get merged into the global symbol table)
- if (location_1.locals && !isGlobalSourceFile(location_1)) {
- if (result = callback(location_1.locals)) {
+ if (location.locals && !isGlobalSourceFile(location)) {
+ if (result = callback(location.locals)) {
return result;
}
}
- switch (location_1.kind) {
- case 261 /* SourceFile */:
- if (!ts.isExternalOrCommonJsModule(location_1)) {
+ switch (location.kind) {
+ case 264 /* SourceFile */:
+ if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230 /* ModuleDeclaration */:
- if (result = callback(getSymbolOfNode(location_1).exports)) {
+ // falls through
+ case 232 /* ModuleDeclaration */:
+ if (result = callback(getSymbolOfNode(location).exports)) {
return result;
}
break;
@@ -25666,6 +27131,16 @@ var ts;
}
function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
function getAccessibleSymbolChainFromSymbolTable(symbols) {
+ return getAccessibleSymbolChainFromSymbolTableWorker(symbols, []);
+ }
+ function getAccessibleSymbolChainFromSymbolTableWorker(symbols, visitedSymbolTables) {
+ if (ts.contains(visitedSymbolTables, symbols)) {
+ return undefined;
+ }
+ visitedSymbolTables.push(symbols);
+ var result = trySymbolTable(symbols);
+ visitedSymbolTables.pop();
+ return result;
function canQualifySymbol(symbolFromSymbolTable, meaning) {
// If the symbol is equivalent and doesn't need further qualification, this symbol is accessible
if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
@@ -25684,31 +27159,33 @@ var ts;
canQualifySymbol(symbolFromSymbolTable, meaning);
}
}
- // If symbol is directly available by its name in the symbol table
- if (isAccessible(symbols[symbol.name])) {
- return [symbol];
- }
- // Check if symbol is any of the alias
- return ts.forEachProperty(symbols, function (symbolFromSymbolTable) {
- if (symbolFromSymbolTable.flags & 8388608 /* Alias */
- && symbolFromSymbolTable.name !== "export="
- && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243 /* ExportSpecifier */)) {
- if (!useOnlyExternalAliasing ||
- // Is this external alias, then use it to name
- ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
- var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
- return [symbolFromSymbolTable];
- }
- // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
- // but only if the symbolFromSymbolTable can be qualified
- var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
- if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
- return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ function trySymbolTable(symbols) {
+ // If symbol is directly available by its name in the symbol table
+ if (isAccessible(symbols.get(symbol.name))) {
+ return [symbol];
+ }
+ // Check if symbol is any of the alias
+ return ts.forEachEntry(symbols, function (symbolFromSymbolTable) {
+ if (symbolFromSymbolTable.flags & 8388608 /* Alias */
+ && symbolFromSymbolTable.name !== "export="
+ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) {
+ if (!useOnlyExternalAliasing ||
+ // Is this external alias, then use it to name
+ ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
+ var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
+ if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ return [symbolFromSymbolTable];
+ }
+ // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
+ // but only if the symbolFromSymbolTable can be qualified
+ var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
+ if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
+ return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
+ }
}
}
- }
- });
+ });
+ }
}
if (symbol) {
if (!(isPropertyOrMethodDeclarationSymbol(symbol))) {
@@ -25720,7 +27197,7 @@ var ts;
var qualify = false;
forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
// If symbol of this name is not available in the symbol table we are ok
- var symbolFromSymbolTable = symbolTable[symbol.name];
+ var symbolFromSymbolTable = symbolTable.get(symbol.name);
if (!symbolFromSymbolTable) {
// Continue to the next symbol table
return false;
@@ -25731,7 +27208,7 @@ var ts;
return true;
}
// Qualify if the symbol from symbol table has same meaning as expected
- symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 243 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+ symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 245 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
if (symbolFromSymbolTable.flags & meaning) {
qualify = true;
return true;
@@ -25746,10 +27223,10 @@ var ts;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
continue;
default:
return false;
@@ -25822,15 +27299,12 @@ var ts;
}
return { accessibility: 0 /* Accessible */ };
function getExternalModuleContainer(declaration) {
- for (; declaration; declaration = declaration.parent) {
- if (hasExternalModuleSymbol(declaration)) {
- return getSymbolOfNode(declaration);
- }
- }
+ var node = ts.findAncestor(declaration, hasExternalModuleSymbol);
+ return node && getSymbolOfNode(node);
}
}
function hasExternalModuleSymbol(declaration) {
- return ts.isAmbientModule(declaration) || (declaration.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
+ return ts.isAmbientModule(declaration) || (declaration.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
}
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
var aliasesToMakeVisible;
@@ -25871,12 +27345,12 @@ var ts;
function isEntityNameVisible(entityName, enclosingDeclaration) {
// get symbol of the first identifier of the entityName
var meaning;
- if (entityName.parent.kind === 160 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
+ if (entityName.parent.kind === 161 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
// Typeof value
meaning = 107455 /* Value */ | 1048576 /* ExportValue */;
}
- else if (entityName.kind === 141 /* QualifiedName */ || entityName.kind === 177 /* PropertyAccessExpression */ ||
- entityName.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ else if (entityName.kind === 142 /* QualifiedName */ || entityName.kind === 178 /* PropertyAccessExpression */ ||
+ entityName.parent.kind === 236 /* ImportEqualsDeclaration */) {
// Left identifier from type reference or TypeAlias
// Entity name of the import declaration
meaning = 1920 /* Namespace */;
@@ -25928,6 +27402,516 @@ var ts;
}
return result;
}
+ function createNodeBuilder() {
+ var context;
+ return {
+ typeToTypeNode: function (type, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ },
+ signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
+ context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var result = context.encounteredError ? undefined : resultingNode;
+ return result;
+ }
+ };
+ function createNodeBuilderContext(enclosingDeclaration, flags) {
+ return {
+ enclosingDeclaration: enclosingDeclaration,
+ flags: flags,
+ encounteredError: false,
+ inObjectTypeLiteral: false,
+ checkAlias: true,
+ symbolStack: undefined
+ };
+ }
+ function typeToTypeNodeHelper(type) {
+ if (!type) {
+ context.encounteredError = true;
+ // TODO(aozgaa): should we return implict any (undefined) or explicit any (keywordtypenode)?
+ return undefined;
+ }
+ if (type.flags & 1 /* Any */) {
+ return ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ }
+ if (type.flags & 2 /* String */) {
+ return ts.createKeywordTypeNode(135 /* StringKeyword */);
+ }
+ if (type.flags & 4 /* Number */) {
+ return ts.createKeywordTypeNode(132 /* NumberKeyword */);
+ }
+ if (type.flags & 8 /* Boolean */) {
+ return ts.createKeywordTypeNode(121 /* BooleanKeyword */);
+ }
+ if (type.flags & 16 /* Enum */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & (32 /* StringLiteral */)) {
+ return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ }
+ if (type.flags & (64 /* NumberLiteral */)) {
+ return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ }
+ if (type.flags & 128 /* BooleanLiteral */) {
+ return type.intrinsicName === "true" ? ts.createTrue() : ts.createFalse();
+ }
+ if (type.flags & 256 /* EnumLiteral */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 1024 /* Void */) {
+ return ts.createKeywordTypeNode(104 /* VoidKeyword */);
+ }
+ if (type.flags & 2048 /* Undefined */) {
+ return ts.createKeywordTypeNode(138 /* UndefinedKeyword */);
+ }
+ if (type.flags & 4096 /* Null */) {
+ return ts.createKeywordTypeNode(94 /* NullKeyword */);
+ }
+ if (type.flags & 8192 /* Never */) {
+ return ts.createKeywordTypeNode(129 /* NeverKeyword */);
+ }
+ if (type.flags & 512 /* ESSymbol */) {
+ return ts.createKeywordTypeNode(136 /* SymbolKeyword */);
+ }
+ if (type.flags & 16777216 /* NonPrimitive */) {
+ return ts.createKeywordTypeNode(133 /* ObjectKeyword */);
+ }
+ if (type.flags & 16384 /* TypeParameter */ && type.isThisType) {
+ if (context.inObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ context.encounteredError = true;
+ }
+ }
+ return ts.createThis();
+ }
+ var objectFlags = getObjectFlags(type);
+ if (objectFlags & 4 /* Reference */) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ return typeReferenceToTypeNode(type);
+ }
+ if (objectFlags & 3 /* ClassOrInterface */) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ // TODO(aozgaa): handle type arguments.
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 16384 /* TypeParameter */) {
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter.
+ return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
+ }
+ if (context.checkAlias && type.aliasSymbol) {
+ var name = symbolToName(type.aliasSymbol, /*expectsIdentifier*/ false);
+ var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ return ts.createTypeReferenceNode(name, typeArgumentNodes);
+ }
+ context.checkAlias = false;
+ if (type.flags & 65536 /* Union */) {
+ var formattedUnionTypes = formatUnionTypes(type.types);
+ var unionTypeNodes = formattedUnionTypes && mapToTypeNodeArray(formattedUnionTypes);
+ if (unionTypeNodes && unionTypeNodes.length > 0) {
+ return ts.createUnionOrIntersectionTypeNode(165 /* UnionType */, unionTypeNodes);
+ }
+ else {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ }
+ if (type.flags & 131072 /* Intersection */) {
+ return ts.createUnionOrIntersectionTypeNode(166 /* IntersectionType */, mapToTypeNodeArray(type.types));
+ }
+ if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ // The type is an object literal type.
+ return createAnonymousTypeNode(type);
+ }
+ if (type.flags & 262144 /* Index */) {
+ var indexedType = type.type;
+ var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ return ts.createTypeOperatorNode(indexTypeNode);
+ }
+ if (type.flags & 524288 /* IndexedAccess */) {
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ return ts.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
+ }
+ ts.Debug.fail("Should be unreachable.");
+ function mapToTypeNodeArray(types) {
+ var result = [];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type_1 = types_1[_i];
+ var typeNode = typeToTypeNodeHelper(type_1);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ function createMappedTypeNodeFromType(type) {
+ ts.Debug.assert(!!(type.flags & 32768 /* Object */));
+ var typeParameter = getTypeParameterFromMappedType(type);
+ var typeParameterNode = typeParameterToDeclaration(typeParameter);
+ var templateType = getTemplateTypeFromMappedType(type);
+ var templateTypeNode = typeToTypeNodeHelper(templateType);
+ var readonlyToken = type.declaration && type.declaration.readonlyToken ? ts.createToken(130 /* ReadonlyKeyword */) : undefined;
+ var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(54 /* QuestionToken */) : undefined;
+ return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ }
+ function createAnonymousTypeNode(type) {
+ var symbol = type.symbol;
+ if (symbol) {
+ // Always use 'typeof T' for type of class, enum, and module objects
+ if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) ||
+ shouldWriteTypeOfFunctionSymbol()) {
+ return createTypeQueryNodeFromSymbol(symbol);
+ }
+ else if (ts.contains(context.symbolStack, symbol)) {
+ // If type is an anonymous type literal in a type alias declaration, use type alias name
+ var typeAlias = getTypeAliasForTypeLiteral(type);
+ if (typeAlias) {
+ // The specified symbol flags need to be reinterpreted as type flags
+ var entityName = symbolToName(typeAlias, /*expectsIdentifier*/ false);
+ return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
+ }
+ else {
+ return ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ }
+ }
+ else {
+ // Since instantiations of the same anonymous type have the same symbol, tracking symbols instead
+ // of types allows us to catch circular references to instantiations of the same anonymous type
+ if (!context.symbolStack) {
+ context.symbolStack = [];
+ }
+ context.symbolStack.push(symbol);
+ var result = createTypeNodeFromObjectType(type);
+ context.symbolStack.pop();
+ return result;
+ }
+ }
+ else {
+ // Anonymous types without a symbol are never circular.
+ return createTypeNodeFromObjectType(type);
+ }
+ function shouldWriteTypeOfFunctionSymbol() {
+ var isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */ &&
+ ts.forEach(symbol.declarations, function (declaration) { return ts.getModifierFlags(declaration) & 32 /* Static */; }));
+ var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) &&
+ (symbol.parent ||
+ ts.forEach(symbol.declarations, function (declaration) {
+ return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */;
+ }));
+ if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
+ // typeof is allowed only for static/non local functions
+ return ts.contains(context.symbolStack, symbol); // it is type of the symbol uses itself recursively
+ }
+ }
+ }
+ function createTypeNodeFromObjectType(type) {
+ if (type.objectFlags & 32 /* Mapped */) {
+ if (getConstraintTypeFromMappedType(type).flags & (16384 /* TypeParameter */ | 262144 /* Index */)) {
+ return createMappedTypeNodeFromType(type);
+ }
+ }
+ var resolved = resolveStructuredTypeMembers(type);
+ if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+ if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
+ return ts.createTypeLiteralNode(/*members*/ undefined);
+ }
+ if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
+ var signature = resolved.callSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 159 /* FunctionType */);
+ }
+ if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
+ var signature = resolved.constructSignatures[0];
+ return signatureToSignatureDeclarationHelper(signature, 160 /* ConstructorType */);
+ }
+ }
+ var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
+ context.inObjectTypeLiteral = true;
+ var members = createTypeNodesFromResolvedType(resolved);
+ context.inObjectTypeLiteral = saveInObjectTypeLiteral;
+ return ts.createTypeLiteralNode(members);
+ }
+ function createTypeQueryNodeFromSymbol(symbol) {
+ var entityName = symbolToName(symbol, /*expectsIdentifier*/ false);
+ return ts.createTypeQueryNode(entityName);
+ }
+ function typeReferenceToTypeNode(type) {
+ var typeArguments = type.typeArguments || emptyArray;
+ if (type.target === globalArrayType) {
+ var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ return ts.createArrayTypeNode(elementType);
+ }
+ else if (type.target.objectFlags & 8 /* Tuple */) {
+ if (typeArguments.length > 0) {
+ var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
+ return ts.createTupleTypeNode(tupleConstituentNodes);
+ }
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ context.encounteredError = true;
+ }
+ return undefined;
+ }
+ else {
+ var outerTypeParameters = type.target.outerTypeParameters;
+ var i = 0;
+ var qualifiedName = undefined;
+ if (outerTypeParameters) {
+ var length_1 = outerTypeParameters.length;
+ while (i < length_1) {
+ // Find group of type arguments for type parameters with the same declaring container.
+ var start = i;
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ do {
+ i++;
+ } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
+ // When type parameters are their own type arguments for the whole group (i.e. we have
+ // the default outer type arguments), we don't show the group.
+ if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
+ var qualifiedNamePart = symbolToName(parent, /*expectsIdentifier*/ true);
+ if (!qualifiedName) {
+ qualifiedName = ts.createQualifiedName(qualifiedNamePart, /*right*/ undefined);
+ }
+ else {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = qualifiedNamePart;
+ qualifiedName = ts.createQualifiedName(qualifiedName, /*right*/ undefined);
+ }
+ }
+ }
+ }
+ var entityName = undefined;
+ var nameIdentifier = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ if (qualifiedName) {
+ ts.Debug.assert(!qualifiedName.right);
+ qualifiedName.right = nameIdentifier;
+ entityName = qualifiedName;
+ }
+ else {
+ entityName = nameIdentifier;
+ }
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ var typeArgumentNodes = ts.some(typeArguments) ? mapToTypeNodeArray(typeArguments.slice(i, typeParameterCount - i)) : undefined;
+ return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
+ }
+ }
+ function createTypeNodesFromResolvedType(resolvedType) {
+ var typeElements = [];
+ for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
+ var signature = _a[_i];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 154 /* CallSignature */));
+ }
+ for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
+ var signature = _c[_b];
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* ConstructSignature */));
+ }
+ if (resolvedType.stringIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */));
+ }
+ if (resolvedType.numberIndexInfo) {
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */));
+ }
+ var properties = resolvedType.properties;
+ if (!properties) {
+ return typeElements;
+ }
+ for (var _d = 0, properties_2 = properties; _d < properties_2.length; _d++) {
+ var propertySymbol = properties_2[_d];
+ var propertyType = getTypeOfSymbol(propertySymbol);
+ var oldDeclaration = propertySymbol.declarations && propertySymbol.declarations[0];
+ if (!oldDeclaration) {
+ return;
+ }
+ var propertyName = oldDeclaration.name;
+ var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(54 /* QuestionToken */) : undefined;
+ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length) {
+ var signatures = getSignaturesOfType(propertyType, 0 /* Call */);
+ for (var _e = 0, signatures_1 = signatures; _e < signatures_1.length; _e++) {
+ var signature = signatures_1[_e];
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 149 /* MethodSignature */);
+ methodDeclaration.name = propertyName;
+ methodDeclaration.questionToken = optionalToken;
+ typeElements.push(methodDeclaration);
+ }
+ }
+ else {
+ // TODO(aozgaa): should we create a node with explicit or implict any?
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode,
+ /*initializer*/ undefined));
+ }
+ }
+ return typeElements.length ? typeElements : undefined;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 135 /* StringKeyword */ : 132 /* NumberKeyword */);
+ var name = ts.getNameFromIndexInfo(indexInfo);
+ var indexingParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, name,
+ /*questionToken*/ undefined, indexerTypeNode,
+ /*initializer*/ undefined);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type);
+ return ts.createIndexSignatureDeclaration(
+ /*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(130 /* ReadonlyKeyword */)] : undefined, [indexingParameter], typeNode);
+ }
+ function signatureToSignatureDeclarationHelper(signature, kind) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter); });
+ var returnTypeNode;
+ if (signature.typePredicate) {
+ var typePredicate = signature.typePredicate;
+ var parameterName = typePredicate.kind === 1 /* Identifier */ ? ts.createIdentifier(typePredicate.parameterName) : ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type);
+ returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
+ }
+ else {
+ var returnType = getReturnTypeOfSignature(signature);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ }
+ var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 118 /* AnyKeyword */ ? returnTypeNode : undefined;
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ }
+ function typeParameterToDeclaration(type) {
+ var constraint = getConstraintFromTypeParameter(type);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var defaultParameter = getDefaultFromTypeParameter(type);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
+ var name = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
+ }
+ function symbolToParameterDeclaration(parameterSymbol) {
+ var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 145 /* Parameter */);
+ var parameterType = getTypeOfSymbol(parameterSymbol);
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType);
+ // TODO(aozgaa): In the future, check initializer accessibility.
+ var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(23 /* DotDotDotToken */),
+ // Clone name to remove trivia.
+ ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(54 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer);
+ return parameterNode;
+ }
+ function symbolToName(symbol, expectsIdentifier) {
+ // Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration.
+ var chain;
+ var isTypeParameter = symbol.flags & 262144 /* TypeParameter */;
+ if (!isTypeParameter && context.enclosingDeclaration) {
+ chain = getSymbolChain(symbol, 0 /* None */, /*endOfChain*/ true);
+ ts.Debug.assert(chain && chain.length > 0);
+ }
+ else {
+ chain = [symbol];
+ }
+ if (expectsIdentifier && chain.length !== 1
+ && !context.encounteredError
+ && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ context.encounteredError = true;
+ }
+ return createEntityNameFromSymbolChain(chain, chain.length - 1);
+ function createEntityNameFromSymbolChain(chain, index) {
+ ts.Debug.assert(chain && 0 <= index && index < chain.length);
+ // const parentIndex = index - 1;
+ var symbol = chain[index];
+ var typeParameterString = "";
+ if (index > 0) {
+ var parentSymbol = chain[index - 1];
+ var typeParameters = void 0;
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
+ }
+ else {
+ var targetSymbol = getTargetSymbol(parentSymbol);
+ if (targetSymbol.flags & (32 /* Class */ | 64 /* Interface */ | 524288 /* TypeAlias */)) {
+ typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
+ }
+ }
+ if (typeParameters && typeParameters.length > 0) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowTypeParameterInQualifiedName)) {
+ context.encounteredError = true;
+ }
+ var writer = ts.getSingleLineStringWriter();
+ var displayBuilder = getSymbolDisplayBuilder();
+ displayBuilder.buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, context.enclosingDeclaration, 0);
+ typeParameterString = writer.string();
+ ts.releaseStringWriter(writer);
+ }
+ }
+ var symbolName = getNameOfSymbol(symbol);
+ var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
+ var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
+ }
+ /** @param endOfChain Set to false for recursive calls; non-recursive calls should always output something. */
+ function getSymbolChain(symbol, meaning, endOfChain) {
+ var accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, /*useOnlyExternalAliasing*/ false);
+ var parentSymbol;
+ if (!accessibleSymbolChain ||
+ needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
+ // Go up and add our parent.
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ var parentChain = getSymbolChain(parent, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
+ if (parentChain) {
+ parentSymbol = parent;
+ accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [symbol]);
+ }
+ }
+ }
+ if (accessibleSymbolChain) {
+ return accessibleSymbolChain;
+ }
+ if (
+ // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols.
+ endOfChain ||
+ // If a parent symbol is an external module, don't write it. (We prefer just `x` vs `"foo/bar".x`.)
+ !(!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) &&
+ // If a parent symbol is an anonymous type, don't write it.
+ !(symbol.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */))) {
+ return [symbol];
+ }
+ }
+ function getNameOfSymbol(symbol) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 198 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return "(Anonymous function)";
+ }
+ }
+ return symbol.name;
+ }
+ }
+ }
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
var writer = ts.getSingleLineStringWriter();
getSymbolDisplayBuilder().buildTypePredicateDisplay(typePredicate, writer, enclosingDeclaration, flags);
@@ -25971,11 +27955,8 @@ var ts;
}
function getTypeAliasForTypeLiteral(type) {
if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) {
- var node = type.symbol.declarations[0].parent;
- while (node.kind === 166 /* ParenthesizedType */) {
- node = node.parent;
- }
- if (node.kind === 228 /* TypeAliasDeclaration */) {
+ var node = ts.findAncestor(type.symbol.declarations[0].parent, function (n) { return n.kind !== 167 /* ParenthesizedType */; });
+ if (node.kind === 230 /* TypeAliasDeclaration */) {
return getSymbolOfNode(node);
}
}
@@ -25983,29 +27964,32 @@ var ts;
}
function isTopLevelInExternalModuleAugmentation(node) {
return node && node.parent &&
- node.parent.kind === 231 /* ModuleBlock */ &&
+ node.parent.kind === 233 /* ModuleBlock */ &&
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
}
- function getSymbolDisplayBuilder() {
- function getNameOfSymbol(symbol) {
- if (symbol.declarations && symbol.declarations.length) {
- var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
- }
- switch (declaration.kind) {
- case 197 /* ClassExpression */:
- return "(Anonymous class)";
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- return "(Anonymous function)";
- }
+ function getNameOfSymbol(symbol) {
+ if (symbol.declarations && symbol.declarations.length) {
+ var declaration = symbol.declarations[0];
+ if (declaration.name) {
+ return ts.declarationNameToString(declaration.name);
+ }
+ if (declaration.parent && declaration.parent.kind === 225 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ switch (declaration.kind) {
+ case 198 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
+ }
+ function getSymbolDisplayBuilder() {
/**
* Writes only the name of the symbol out to the writer. Uses the original source text
* for the name of the symbol if it is available to match how the user wrote the name.
@@ -26047,7 +28031,7 @@ var ts;
if (parentSymbol) {
// Write type arguments of instantiated class/interface here
if (flags & 1 /* WriteTypeParametersOrArguments */) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
}
else {
@@ -26075,9 +28059,9 @@ var ts;
if (!accessibleSymbolChain ||
needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
// Go up and add our parent.
- var parent_5 = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
- if (parent_5) {
- walkSymbol(parent_5, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
+ var parent = getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol);
+ if (parent) {
+ walkSymbol(parent, getQualifiedLeftMeaning(meaning), /*endOfChain*/ false);
}
}
if (accessibleSymbolChain) {
@@ -26115,7 +28099,7 @@ var ts;
function writeType(type, flags) {
var nextFlags = flags & ~512 /* InTypeAlias */;
// Write undefined/null type as any
- if (type.flags & 16015 /* Intrinsic */) {
+ if (type.flags & 16793231 /* Intrinsic */) {
// Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving
writer.writeKeyword(!(globalFlags & 16 /* WriteOwnNameForAnyLike */) && isTypeAny(type)
? "any"
@@ -26142,7 +28126,7 @@ var ts;
else if (!(flags & 512 /* InTypeAlias */) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
var typeArguments = type.aliasTypeArguments;
- writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags);
+ writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
}
else if (type.flags & 196608 /* UnionOrIntersection */) {
writeUnionOrIntersectionType(type, nextFlags);
@@ -26223,18 +28207,18 @@ var ts;
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
if (outerTypeParameters) {
- var length_1 = outerTypeParameters.length;
- while (i < length_1) {
+ var length_2 = outerTypeParameters.length;
+ while (i < length_2) {
// Find group of type arguments for type parameters with the same declaring container.
var start = i;
- var parent_6 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
+ var parent = getParentSymbolOfTypeParameter(outerTypeParameters[i]);
do {
i++;
- } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_6);
+ } while (i < length_2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent);
// When type parameters are their own type arguments for the whole group (i.e. we have
// the default outer type arguments), we don't show the group.
if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) {
- writeSymbolTypeReference(parent_6, typeArguments, start, i, flags);
+ writeSymbolTypeReference(parent, typeArguments, start, i, flags);
writePunctuation(writer, 22 /* DotToken */);
}
}
@@ -26261,7 +28245,8 @@ var ts;
var symbol = type.symbol;
if (symbol) {
// Always use 'typeof T' for type of class, enum, and module objects
- if (symbol.flags & (32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {
+ if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
+ symbol.flags & (384 /* Enum */ | 512 /* ValueModule */)) {
writeTypeOfSymbol(type, flags);
}
else if (shouldWriteTypeOfFunctionSymbol()) {
@@ -26300,7 +28285,7 @@ var ts;
var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) &&
(symbol.parent ||
ts.forEach(symbol.declarations, function (declaration) {
- return declaration.parent.kind === 261 /* SourceFile */ || declaration.parent.kind === 231 /* ModuleBlock */;
+ return declaration.parent.kind === 264 /* SourceFile */ || declaration.parent.kind === 233 /* ModuleBlock */;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
// typeof is allowed only for static/non local functions
@@ -26314,32 +28299,13 @@ var ts;
writeSpace(writer);
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags);
}
- function writeIndexSignature(info, keyword) {
- if (info) {
- if (info.isReadonly) {
- writeKeyword(writer, 130 /* ReadonlyKeyword */);
- writeSpace(writer);
- }
- writePunctuation(writer, 20 /* OpenBracketToken */);
- writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
- writePunctuation(writer, 55 /* ColonToken */);
- writeSpace(writer);
- writeKeyword(writer, keyword);
- writePunctuation(writer, 21 /* CloseBracketToken */);
- writePunctuation(writer, 55 /* ColonToken */);
- writeSpace(writer);
- writeType(info.type, 0 /* None */);
- writePunctuation(writer, 24 /* SemicolonToken */);
- writer.writeLine();
- }
- }
function writePropertyWithModifiers(prop) {
if (isReadonlySymbol(prop)) {
writeKeyword(writer, 130 /* ReadonlyKeyword */);
writeSpace(writer);
}
buildSymbolDisplay(prop, writer);
- if (prop.flags & 536870912 /* Optional */) {
+ if (prop.flags & 67108864 /* Optional */) {
writePunctuation(writer, 54 /* QuestionToken */);
}
}
@@ -26416,15 +28382,15 @@ var ts;
writePunctuation(writer, 24 /* SemicolonToken */);
writer.writeLine();
}
- writeIndexSignature(resolved.stringIndexInfo, 134 /* StringKeyword */);
- writeIndexSignature(resolved.numberIndexInfo, 132 /* NumberKeyword */);
+ buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, 0 /* String */, enclosingDeclaration, globalFlags, symbolStack);
+ buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1 /* Number */, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
var t = getTypeOfSymbol(p);
if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0 /* Call */);
- for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) {
- var signature = signatures_1[_f];
+ for (var _f = 0, signatures_2 = signatures; _f < signatures_2.length; _f++) {
+ var signature = signatures_2[_f];
writePropertyWithModifiers(p);
buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack);
writePunctuation(writer, 24 /* SemicolonToken */);
@@ -26483,33 +28449,44 @@ var ts;
writeSpace(writer);
buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack);
}
+ var defaultType = getDefaultFromTypeParameter(tp);
+ if (defaultType) {
+ writeSpace(writer);
+ writePunctuation(writer, 57 /* EqualsToken */);
+ writeSpace(writer);
+ buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack);
+ }
}
function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) {
var parameterNode = p.valueDeclaration;
- if (ts.isRestParameter(parameterNode)) {
+ if (parameterNode ? ts.isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) {
writePunctuation(writer, 23 /* DotDotDotToken */);
}
- if (ts.isBindingPattern(parameterNode.name)) {
+ if (parameterNode && ts.isBindingPattern(parameterNode.name)) {
buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack);
}
else {
appendSymbolNameOnly(p, writer);
}
- if (isOptionalParameter(parameterNode)) {
+ if (parameterNode && isOptionalParameter(parameterNode)) {
writePunctuation(writer, 54 /* QuestionToken */);
}
writePunctuation(writer, 55 /* ColonToken */);
writeSpace(writer);
- buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack);
+ var type = getTypeOfSymbol(p);
+ if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
+ type = includeFalsyTypes(type, 2048 /* Undefined */);
+ }
+ buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) {
// We have to explicitly emit square bracket and bracket because these tokens are not stored inside the node.
- if (bindingPattern.kind === 172 /* ObjectBindingPattern */) {
+ if (bindingPattern.kind === 173 /* ObjectBindingPattern */) {
writePunctuation(writer, 16 /* OpenBraceToken */);
buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
writePunctuation(writer, 17 /* CloseBraceToken */);
}
- else if (bindingPattern.kind === 173 /* ArrayBindingPattern */) {
+ else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) {
writePunctuation(writer, 20 /* OpenBracketToken */);
var elements = bindingPattern.elements;
buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); });
@@ -26523,9 +28500,9 @@ var ts;
if (ts.isOmittedExpression(bindingElement)) {
return;
}
- ts.Debug.assert(bindingElement.kind === 174 /* BindingElement */);
+ ts.Debug.assert(bindingElement.kind === 175 /* BindingElement */);
if (bindingElement.propertyName) {
- writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol);
+ writer.writeProperty(ts.getTextOfNode(bindingElement.propertyName));
writePunctuation(writer, 55 /* ColonToken */);
writeSpace(writer);
}
@@ -26597,6 +28574,10 @@ var ts;
buildTypeDisplay(predicate.type, writer, enclosingDeclaration, flags, symbolStack);
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
+ var returnType = getReturnTypeOfSignature(signature);
+ if (flags & 2048 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
+ return;
+ }
if (flags & 8 /* WriteArrowStyleSignature */) {
writeSpace(writer);
writePunctuation(writer, 35 /* EqualsGreaterThanToken */);
@@ -26609,7 +28590,6 @@ var ts;
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
}
else {
- var returnType = getReturnTypeOfSignature(signature);
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
}
}
@@ -26629,6 +28609,32 @@ var ts;
buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack);
buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack);
}
+ function buildIndexSignatureDisplay(info, writer, kind, enclosingDeclaration, globalFlags, symbolStack) {
+ if (info) {
+ if (info.isReadonly) {
+ writeKeyword(writer, 130 /* ReadonlyKeyword */);
+ writeSpace(writer);
+ }
+ writePunctuation(writer, 20 /* OpenBracketToken */);
+ writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x");
+ writePunctuation(writer, 55 /* ColonToken */);
+ writeSpace(writer);
+ switch (kind) {
+ case 1 /* Number */:
+ writeKeyword(writer, 132 /* NumberKeyword */);
+ break;
+ case 0 /* String */:
+ writeKeyword(writer, 135 /* StringKeyword */);
+ break;
+ }
+ writePunctuation(writer, 21 /* CloseBracketToken */);
+ writePunctuation(writer, 55 /* ColonToken */);
+ writeSpace(writer);
+ buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
+ writePunctuation(writer, 24 /* SemicolonToken */);
+ writer.writeLine();
+ }
+ }
return _displayBuilder || (_displayBuilder = {
buildSymbolDisplay: buildSymbolDisplay,
buildTypeDisplay: buildTypeDisplay,
@@ -26639,6 +28645,7 @@ var ts;
buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
buildSignatureDisplay: buildSignatureDisplay,
+ buildIndexSignatureDisplay: buildIndexSignatureDisplay,
buildReturnTypeDisplay: buildReturnTypeDisplay
});
}
@@ -26653,75 +28660,76 @@ var ts;
return false;
function determineIfDeclarationIsVisible() {
switch (node.kind) {
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return isDeclarationVisible(node.parent.parent);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
if (ts.isBindingPattern(node.name) &&
!node.name.elements.length) {
// If the binding pattern is empty, this variable declaration is not visible
return false;
}
- // Otherwise fall through
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 229 /* EnumDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// external module augmentation is always visible
if (ts.isExternalModuleAugmentation(node)) {
return true;
}
- var parent_7 = getDeclarationContainer(node);
+ var parent = getDeclarationContainer(node);
// If the node is not exported or it is not ambient module element (except import declaration)
if (!(ts.getCombinedModifierFlags(node) & 1 /* Export */) &&
- !(node.kind !== 234 /* ImportEqualsDeclaration */ && parent_7.kind !== 261 /* SourceFile */ && ts.isInAmbientContext(parent_7))) {
- return isGlobalSourceFile(parent_7);
+ !(node.kind !== 236 /* ImportEqualsDeclaration */ && parent.kind !== 264 /* SourceFile */ && ts.isInAmbientContext(parent))) {
+ return isGlobalSourceFile(parent);
}
// Exported members/ambient module elements (exception import declaration) are visible if parent is visible
- return isDeclarationVisible(parent_7);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ return isDeclarationVisible(parent);
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.getModifierFlags(node) & (8 /* Private */ | 16 /* Protected */)) {
// Private/protected properties/methods are not visible
return false;
}
- // Public properties/methods are visible if its parents are visible, so const it fall into next case statement
- case 150 /* Constructor */:
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 155 /* IndexSignature */:
- case 144 /* Parameter */:
- case 231 /* ModuleBlock */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 161 /* TypeLiteral */:
- case 157 /* TypeReference */:
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
+ // Public properties/methods are visible if its parents are visible, so:
+ // falls through
+ case 151 /* Constructor */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 156 /* IndexSignature */:
+ case 145 /* Parameter */:
+ case 233 /* ModuleBlock */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 162 /* TypeLiteral */:
+ case 158 /* TypeReference */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
return isDeclarationVisible(node.parent);
// Default binding, import specifier and namespace import is visible
// only on demand so by default it is not visible
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
return false;
// Type parameters are always visible
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
// Source file and namespace export are always visible
- case 261 /* SourceFile */:
- case 233 /* NamespaceExportDeclaration */:
+ case 264 /* SourceFile */:
+ case 235 /* NamespaceExportDeclaration */:
return true;
// Export assignments do not create name bindings outside the module
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return false;
default:
return false;
@@ -26730,10 +28738,10 @@ var ts;
}
function collectLinkedAliases(node) {
var exportSymbol;
- if (node.parent && node.parent.kind === 240 /* ExportAssignment */) {
+ if (node.parent && node.parent.kind === 242 /* ExportAssignment */) {
exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node);
}
- else if (node.parent.kind === 243 /* ExportSpecifier */) {
+ else if (node.parent.kind === 245 /* ExportSpecifier */) {
var exportSpecifier = node.parent;
exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
@@ -26778,8 +28786,8 @@ var ts;
var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);
if (resolutionCycleStartIndex >= 0) {
// A cycle was found
- var length_2 = resolutionTargets.length;
- for (var i = resolutionCycleStartIndex; i < length_2; i++) {
+ var length_3 = resolutionTargets.length;
+ for (var i = resolutionCycleStartIndex; i < length_3; i++) {
resolutionResults[i] = false;
}
return false;
@@ -26823,21 +28831,20 @@ var ts;
return resolutionResults.pop();
}
function getDeclarationContainer(node) {
- node = ts.getRootDeclaration(node);
- while (node) {
+ node = ts.findAncestor(ts.getRootDeclaration(node), function (node) {
switch (node.kind) {
- case 223 /* VariableDeclaration */:
- case 224 /* VariableDeclarationList */:
- case 239 /* ImportSpecifier */:
- case 238 /* NamedImports */:
- case 237 /* NamespaceImport */:
- case 236 /* ImportClause */:
- node = node.parent;
- break;
+ case 225 /* VariableDeclaration */:
+ case 226 /* VariableDeclarationList */:
+ case 241 /* ImportSpecifier */:
+ case 240 /* NamedImports */:
+ case 239 /* NamespaceImport */:
+ case 238 /* ImportClause */:
+ return false;
default:
- return node.parent;
+ return true;
}
- }
+ });
+ return node && node.parent;
}
function getTypeOfPrototypeProperty(prototype) {
// TypeScript 1.0 spec (April 2014): 8.4
@@ -26855,9 +28862,6 @@ var ts;
function isTypeAny(type) {
return type && (type.flags & 1 /* Any */) !== 0;
}
- function isTypeNever(type) {
- return type && (type.flags & 8192 /* Never */) !== 0;
- }
// Return the type of a binding element parent. We check SymbolLinks first to see if a type has been
// assigned by contextual typing.
function getTypeForBindingElementParent(node) {
@@ -26865,24 +28869,29 @@ var ts;
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false);
}
function isComputedNonLiteralName(name) {
- return name.kind === 142 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression);
+ return name.kind === 143 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression);
}
function getRestType(source, properties, symbol) {
- ts.Debug.assert(!!(source.flags & 32768 /* Object */), "Rest types only support object types right now.");
+ source = filterType(source, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (source.flags & 8192 /* Never */) {
+ return emptyObjectType;
+ }
+ if (source.flags & 65536 /* Union */) {
+ return mapType(source, function (t) { return getRestType(t, properties, symbol); });
+ }
var members = ts.createMap();
var names = ts.createMap();
- for (var _i = 0, properties_2 = properties; _i < properties_2.length; _i++) {
- var name_17 = properties_2[_i];
- names[ts.getTextOfPropertyName(name_17)] = true;
+ for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
+ var name = properties_3[_i];
+ names.set(ts.getTextOfPropertyName(name), true);
}
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
- var inNamesToRemove = prop.name in names;
+ var inNamesToRemove = names.has(prop.name);
var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
- var isMethod = prop.flags & 8192 /* Method */;
var isSetOnlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
- if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
- members[prop.name] = prop;
+ if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
+ members.set(prop.name, prop);
}
}
var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */);
@@ -26907,9 +28916,9 @@ var ts;
return parentType;
}
var type;
- if (pattern.kind === 172 /* ObjectBindingPattern */) {
+ if (pattern.kind === 173 /* ObjectBindingPattern */) {
if (declaration.dotDotDotToken) {
- if (!(parentType.flags & 32768 /* Object */)) {
+ if (!isValidSpreadType(parentType)) {
error(declaration, ts.Diagnostics.Rest_types_may_only_be_created_from_object_types);
return unknownType;
}
@@ -26924,8 +28933,8 @@ var ts;
}
else {
// Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form)
- var name_18 = declaration.propertyName || declaration.name;
- if (isComputedNonLiteralName(name_18)) {
+ var name = declaration.propertyName || declaration.name;
+ if (isComputedNonLiteralName(name)) {
// computed properties with non-literal names are treated as 'any'
return anyType;
}
@@ -26934,12 +28943,12 @@ var ts;
}
// Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature,
// or otherwise the type of the string index signature.
- var text = ts.getTextOfPropertyName(name_18);
+ var text = ts.getTextOfPropertyName(name);
type = getTypeOfPropertyOfType(parentType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1 /* Number */) ||
getIndexTypeOfType(parentType, 0 /* String */);
if (!type) {
- error(name_18, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_18));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name));
return unknownType;
}
}
@@ -26948,7 +28957,7 @@ var ts;
// This elementType will be used if the specific property corresponding to this index is not
// present (aka the tuple element property). This call also checks that the parentType is in
// fact an iterable or array (depending on target language).
- var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
if (declaration.dotDotDotToken) {
// Rest element has an array type with the same element type as the parent type
type = createArrayType(elementType);
@@ -26979,7 +28988,7 @@ var ts;
getUnionType([type, checkExpressionCached(declaration.initializer)], /*subtypeReduction*/ true) :
type;
}
- function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) {
+ function getTypeForDeclarationFromJSDocComment(declaration) {
var jsdocType = ts.getJSDocType(declaration);
if (jsdocType) {
return getTypeFromTypeNode(jsdocType);
@@ -26992,44 +29001,46 @@ var ts;
}
function isEmptyArrayLiteral(node) {
var expr = ts.skipParentheses(node);
- return expr.kind === 175 /* ArrayLiteralExpression */ && expr.elements.length === 0;
+ return expr.kind === 176 /* ArrayLiteralExpression */ && expr.elements.length === 0;
}
function addOptionality(type, optional) {
return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
}
// Return the inferred type for a variable, parameter, or property declaration
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
// If this is a variable in a JavaScript file, then use the JSDoc type (if it has
// one as its type), otherwise fallback to the below standard TS codepaths to
// try to figure it out.
- var type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration);
+ var type = getTypeForDeclarationFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
}
}
// A variable declared in a for..in statement is of type string, or of type keyof T when the
// right hand expression is of a type parameter type.
- if (declaration.parent.parent.kind === 212 /* ForInStatement */) {
+ if (declaration.parent.parent.kind === 214 /* ForInStatement */) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 /* TypeParameter */ | 262144 /* Index */) ? indexType : stringType;
}
- if (declaration.parent.parent.kind === 213 /* ForOfStatement */) {
+ if (declaration.parent.parent.kind === 215 /* ForOfStatement */) {
// checkRightHandSideOfForOf will return undefined if the for-of expression type was
// missing properties/signatures required to get its iteratedType (like
// [Symbol.iterator] or next). This may be because we accessed properties from anyType,
// or it may have led to an error inside getElementTypeOfIterable.
- return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
+ var forOfStatement = declaration.parent.parent;
+ return checkRightHandSideOfForOf(forOfStatement.expression, forOfStatement.awaitModifier) || anyType;
}
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
// Use type from type annotation if one is present
if (declaration.type) {
- return addOptionality(getTypeFromTypeNode(declaration.type), /*optional*/ declaration.questionToken && includeOptionality);
+ var declaredType = getTypeFromTypeNode(declaration.type);
+ return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality);
}
- if ((compilerOptions.noImplicitAny || declaration.flags & 2097152 /* JavaScriptFile */) &&
- declaration.kind === 223 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) &&
+ if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) &&
+ declaration.kind === 225 /* VariableDeclaration */ && !ts.isBindingPattern(declaration.name) &&
!(ts.getCombinedModifierFlags(declaration) & 1 /* Export */) && !ts.isInAmbientContext(declaration)) {
// If --noImplicitAny is on or the declaration is in a Javascript file,
// use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no
@@ -27043,11 +29054,11 @@ var ts;
return autoArrayType;
}
}
- if (declaration.kind === 144 /* Parameter */) {
+ if (declaration.kind === 145 /* Parameter */) {
var func = declaration.parent;
// For a parameter of a set accessor, use the type of the get accessor if one is present
- if (func.kind === 152 /* SetAccessor */ && !ts.hasDynamicName(func)) {
- var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 151 /* GetAccessor */);
+ if (func.kind === 153 /* SetAccessor */ && !ts.hasDynamicName(func)) {
+ var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 152 /* GetAccessor */);
if (getter) {
var getterSignature = getSignatureFromDeclaration(getter);
var thisParameter = getAccessorThisParameter(func);
@@ -27076,8 +29087,13 @@ var ts;
var type = checkDeclarationInitializer(declaration);
return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality);
}
+ if (ts.isJsxAttribute(declaration)) {
+ // if JSX attribute doesn't have initializer, by default the attribute will have boolean value of true.
+ // I.e <Elem attr /> is sugar for <Elem attr={true} />
+ return trueType;
+ }
// If it is a short-hand property assignment, use the type of the identifier
- if (declaration.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (declaration.kind === 261 /* ShorthandPropertyAssignment */) {
return checkIdentifier(declaration.name);
}
// If the declaration specifies a binding pattern, use the type implied by the binding pattern
@@ -27087,6 +29103,38 @@ var ts;
// No type specified and nothing can be inferred
return undefined;
}
+ function getWidenedTypeFromJSSpecialPropertyDeclarations(symbol) {
+ var types = [];
+ var definedInConstructor = false;
+ var definedInMethod = false;
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ var expression = declaration.kind === 193 /* BinaryExpression */ ? declaration :
+ declaration.kind === 178 /* PropertyAccessExpression */ ? ts.getAncestor(declaration, 193 /* BinaryExpression */) :
+ undefined;
+ if (!expression) {
+ return unknownType;
+ }
+ if (ts.isPropertyAccessExpression(expression.left) && expression.left.expression.kind === 98 /* ThisKeyword */) {
+ if (ts.getThisContainer(expression, /*includeArrowFunctions*/ false).kind === 151 /* Constructor */) {
+ definedInConstructor = true;
+ }
+ else {
+ definedInMethod = true;
+ }
+ }
+ if (expression.flags & 65536 /* JavaScriptFile */) {
+ // If there is a JSDoc type, use it
+ var type = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type && type !== unknownType) {
+ types.push(getWidenedType(type));
+ continue;
+ }
+ }
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
+ return getWidenedType(addOptionality(getUnionType(types, /*subtypeReduction*/ true), definedInMethod && !definedInConstructor));
+ }
// Return the type implied by a binding pattern element. This is the type of the initializer of the element if
// one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding
// pattern. Otherwise, it is the type any.
@@ -27097,7 +29145,7 @@ var ts;
if (ts.isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
}
- if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
+ if (reportErrors && noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) {
reportImplicitAnyError(element, anyType);
}
return anyType;
@@ -27105,22 +29153,27 @@ var ts;
// Return the type implied by an object binding pattern
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
var members = ts.createMap();
+ var stringIndexInfo;
var hasComputedProperties = false;
ts.forEach(pattern.elements, function (e) {
var name = e.propertyName || e.name;
- if (isComputedNonLiteralName(name) || e.dotDotDotToken) {
- // do not include computed properties or rests in the implied type
+ if (isComputedNonLiteralName(name)) {
+ // do not include computed properties in the implied type
hasComputedProperties = true;
return;
}
+ if (e.dotDotDotToken) {
+ stringIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
+ return;
+ }
var text = ts.getTextOfPropertyName(name);
- var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0);
+ var flags = 4 /* Property */ | (e.initializer ? 67108864 /* Optional */ : 0);
var symbol = createSymbol(flags, text);
symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
symbol.bindingElement = e;
- members[symbol.name] = symbol;
+ members.set(symbol.name, symbol);
});
- var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
+ var result = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, undefined);
if (includePatternInType) {
result.pattern = pattern;
}
@@ -27153,7 +29206,7 @@ var ts;
// parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of
// the parameter.
function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
- return pattern.kind === 172 /* ObjectBindingPattern */
+ return pattern.kind === 173 /* ObjectBindingPattern */
? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
}
@@ -27175,7 +29228,7 @@ var ts;
// During a normal type check we'll never get to here with a property assignment (the check of the containing
// object literal uses a different path). We exclude widening only so that language services and type verification
// tools see the actual type.
- if (declaration.kind === 257 /* PropertyAssignment */) {
+ if (declaration.kind === 260 /* PropertyAssignment */) {
return type;
}
return getWidenedType(type);
@@ -27183,7 +29236,7 @@ var ts;
// Rest parameters default to type any[], other parameters default to type any
type = declaration.dotDotDotToken ? anyArrayType : anyType;
// Report implicit any errors unless this is a private property within an ambient declaration
- if (reportErrors && compilerOptions.noImplicitAny) {
+ if (reportErrors && noImplicitAny) {
if (!declarationBelongsToPrivateAmbientMember(declaration)) {
reportImplicitAnyError(declaration, type);
}
@@ -27192,14 +29245,14 @@ var ts;
}
function declarationBelongsToPrivateAmbientMember(declaration) {
var root = ts.getRootDeclaration(declaration);
- var memberDeclaration = root.kind === 144 /* Parameter */ ? root.parent : root;
+ var memberDeclaration = root.kind === 145 /* Parameter */ ? root.parent : root;
return isPrivateWithinAmbient(memberDeclaration);
}
function getTypeOfVariableOrParameterOrProperty(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
// Handle prototype property
- if (symbol.flags & 134217728 /* Prototype */) {
+ if (symbol.flags & 16777216 /* Prototype */) {
return links.type = getTypeOfPrototypeProperty(symbol);
}
// Handle catch clause variables
@@ -27208,10 +29261,10 @@ var ts;
return links.type = anyType;
}
// Handle export default expressions
- if (declaration.kind === 240 /* ExportAssignment */) {
+ if (declaration.kind === 242 /* ExportAssignment */) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 2097152 /* JavaScriptFile */ && declaration.kind === 286 /* JSDocPropertyTag */ && declaration.typeExpression) {
+ if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 290 /* JSDocPropertyTag */ && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
// Handle variable, parameter or property
@@ -27224,36 +29277,15 @@ var ts;
// * exports.p = expr
// * this.p = expr
// * className.prototype.method = expr
- if (declaration.kind === 192 /* BinaryExpression */ ||
- declaration.kind === 177 /* PropertyAccessExpression */ && declaration.parent.kind === 192 /* BinaryExpression */) {
- // Use JS Doc type if present on parent expression statement
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
- var jsdocType = ts.getJSDocType(declaration.parent);
- if (jsdocType) {
- return links.type = getTypeFromTypeNode(jsdocType);
- }
- }
- var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 192 /* BinaryExpression */ ?
- checkExpressionCached(decl.right) :
- checkExpressionCached(decl.parent.right); });
- type = getUnionType(declaredTypes, /*subtypeReduction*/ true);
+ if (declaration.kind === 193 /* BinaryExpression */ ||
+ declaration.kind === 178 /* PropertyAccessExpression */ && declaration.parent.kind === 193 /* BinaryExpression */) {
+ type = getWidenedTypeFromJSSpecialPropertyDeclarations(symbol);
}
else {
type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true);
}
if (!popTypeResolution()) {
- if (symbol.valueDeclaration.type) {
- // Variable has type annotation that circularly references the variable itself
- type = unknownType;
- error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
- }
- else {
- // Variable has initializer that circularly references the variable itself
- type = anyType;
- if (compilerOptions.noImplicitAny) {
- error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
- }
- }
+ type = reportCircularityError(symbol);
}
links.type = type;
}
@@ -27261,7 +29293,7 @@ var ts;
}
function getAnnotatedAccessorType(accessor) {
if (accessor) {
- if (accessor.kind === 151 /* GetAccessor */) {
+ if (accessor.kind === 152 /* GetAccessor */) {
return accessor.type && getTypeFromTypeNode(accessor.type);
}
else {
@@ -27281,10 +29313,10 @@ var ts;
function getTypeOfAccessors(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- var getter = ts.getDeclarationOfKind(symbol, 151 /* GetAccessor */);
- var setter = ts.getDeclarationOfKind(symbol, 152 /* SetAccessor */);
- if (getter && getter.flags & 2097152 /* JavaScriptFile */) {
- var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
+ var getter = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */);
+ var setter = ts.getDeclarationOfKind(symbol, 153 /* SetAccessor */);
+ if (getter && getter.flags & 65536 /* JavaScriptFile */) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
if (jsDocType) {
return links.type = jsDocType;
}
@@ -27310,7 +29342,7 @@ var ts;
type = getReturnTypeFromBody(getter);
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
if (setter) {
error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
@@ -27325,8 +29357,8 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
- var getter_1 = ts.getDeclarationOfKind(symbol, 151 /* GetAccessor */);
+ if (noImplicitAny) {
+ var getter_1 = ts.getDeclarationOfKind(symbol, 152 /* GetAccessor */);
error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
}
}
@@ -27334,6 +29366,10 @@ var ts;
}
return links.type;
}
+ function getBaseTypeVariableOfClass(symbol) {
+ var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
+ return baseConstructorType.flags & 540672 /* TypeVariable */ ? baseConstructorType : undefined;
+ }
function getTypeOfFuncClassEnumModule(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
@@ -27342,8 +29378,13 @@ var ts;
}
else {
var type = createObjectType(16 /* Anonymous */, symbol);
- links.type = strictNullChecks && symbol.flags & 536870912 /* Optional */ ?
- includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ if (symbol.flags & 32 /* Class */) {
+ var baseTypeVariable = getBaseTypeVariableOfClass(symbol);
+ links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
+ }
+ else {
+ links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ }
}
}
return links.type;
@@ -27373,12 +29414,39 @@ var ts;
function getTypeOfInstantiatedSymbol(symbol) {
var links = getSymbolLinks(symbol);
if (!links.type) {
- links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ if (symbolInstantiationDepth === 100) {
+ error(symbol.valueDeclaration, ts.Diagnostics.Generic_type_instantiation_is_excessively_deep_and_possibly_infinite);
+ links.type = unknownType;
+ }
+ else {
+ if (!pushTypeResolution(symbol, 0 /* Type */)) {
+ return unknownType;
+ }
+ symbolInstantiationDepth++;
+ var type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
+ symbolInstantiationDepth--;
+ if (!popTypeResolution()) {
+ type = reportCircularityError(symbol);
+ }
+ links.type = type;
+ }
}
return links.type;
}
+ function reportCircularityError(symbol) {
+ // Check if variable has type annotation that circularly references the variable itself
+ if (symbol.valueDeclaration.type) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
+ return unknownType;
+ }
+ // Otherwise variable has initializer that circularly references the variable itself
+ if (noImplicitAny) {
+ error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
+ }
+ return anyType;
+ }
function getTypeOfSymbol(symbol) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
@@ -27398,22 +29466,33 @@ var ts;
}
return unknownType;
}
+ function isReferenceToType(type, target) {
+ return type !== undefined
+ && target !== undefined
+ && (getObjectFlags(type) & 4 /* Reference */) !== 0
+ && type.target === target;
+ }
function getTargetType(type) {
return getObjectFlags(type) & 4 /* Reference */ ? type.target : type;
}
function hasBaseType(type, checkBase) {
return check(type);
function check(type) {
- var target = getTargetType(type);
- return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ if (getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */)) {
+ var target = getTargetType(type);
+ return target === checkBase || ts.forEach(getBaseTypes(target), check);
+ }
+ else if (type.flags & 131072 /* Intersection */) {
+ return ts.forEach(type.types, check);
+ }
}
}
// Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set.
// The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set
// in-place and returns the same array.
function appendTypeParameters(typeParameters, declarations) {
- for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) {
- var declaration = declarations_2[_i];
+ for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+ var declaration = declarations_3[_i];
var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration));
if (!typeParameters) {
typeParameters = [tp];
@@ -27433,9 +29512,9 @@ var ts;
if (!node) {
return typeParameters;
}
- if (node.kind === 226 /* ClassDeclaration */ || node.kind === 197 /* ClassExpression */ ||
- node.kind === 225 /* FunctionDeclaration */ || node.kind === 184 /* FunctionExpression */ ||
- node.kind === 149 /* MethodDeclaration */ || node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 228 /* ClassDeclaration */ || node.kind === 198 /* ClassExpression */ ||
+ node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 150 /* MethodDeclaration */ || node.kind === 186 /* ArrowFunction */) {
var declarations = node.typeParameters;
if (declarations) {
return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations);
@@ -27445,8 +29524,8 @@ var ts;
}
// The outer type parameters are those defined by enclosing generic classes, methods, or functions.
function getOuterTypeParametersOfClassOrInterface(symbol) {
- var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 227 /* InterfaceDeclaration */);
- return appendOuterTypeParameters(undefined, declaration);
+ var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */);
+ return appendOuterTypeParameters(/*typeParameters*/ undefined, declaration);
}
// The local type parameters are the combined set of type parameters from all declarations of the class,
// interface, or type alias.
@@ -27454,8 +29533,8 @@ var ts;
var result;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var node = _a[_i];
- if (node.kind === 227 /* InterfaceDeclaration */ || node.kind === 226 /* ClassDeclaration */ ||
- node.kind === 197 /* ClassExpression */ || node.kind === 228 /* TypeAliasDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */ || node.kind === 228 /* ClassDeclaration */ ||
+ node.kind === 198 /* ClassExpression */ || node.kind === 230 /* TypeAliasDeclaration */) {
var declaration = node;
if (declaration.typeParameters) {
result = appendTypeParameters(result, declaration.typeParameters);
@@ -27469,29 +29548,50 @@ var ts;
function getTypeParametersOfClassOrInterface(symbol) {
return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));
}
+ // A type is a mixin constructor if it has a single construct signature taking no type parameters and a single
+ // rest parameter of type any[].
+ function isMixinConstructorType(type) {
+ var signatures = getSignaturesOfType(type, 1 /* Construct */);
+ if (signatures.length === 1) {
+ var s = signatures[0];
+ return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType;
+ }
+ return false;
+ }
function isConstructorType(type) {
- return type.flags & 32768 /* Object */ && getSignaturesOfType(type, 1 /* Construct */).length > 0;
+ if (isValidBaseType(type) && getSignaturesOfType(type, 1 /* Construct */).length > 0) {
+ return true;
+ }
+ if (type.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(type);
+ return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint);
+ }
+ return false;
}
function getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
}
- function getConstructorsForTypeArguments(type, typeArgumentNodes) {
- var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
- return ts.filter(getSignaturesOfType(type, 1 /* Construct */), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; });
+ function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var typeArgCount = ts.length(typeArgumentNodes);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ return ts.filter(getSignaturesOfType(type, 1 /* Construct */), function (sig) { return (isJavaScript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= ts.length(sig.typeParameters); });
}
- function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
- var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
+ function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
+ var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
if (typeArgumentNodes) {
var typeArguments_1 = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.map(signatures, function (sig) { return getSignatureInstantiation(sig, typeArguments_1); });
}
return signatures;
}
- // The base constructor of a class can resolve to
- // undefinedType if the class has no extends clause,
- // unknownType if an error occurred during resolution of the extends expression,
- // nullType if the extends expression is the null value, or
- // an object type with at least one construct signature.
+ /**
+ * The base constructor of a class can resolve to
+ * * undefinedType if the class has no extends clause,
+ * * unknownType if an error occurred during resolution of the extends expression,
+ * * nullType if the extends expression is the null value,
+ * * anyType if the extends expression has type any, or
+ * * an object type with at least one construct signature.
+ */
function getBaseConstructorTypeOfClass(type) {
if (!type.resolvedBaseConstructorType) {
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -27502,7 +29602,7 @@ var ts;
return unknownType;
}
var baseConstructorType = checkExpression(baseTypeNode.expression);
- if (baseConstructorType.flags & 32768 /* Object */) {
+ if (baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */)) {
// Resolving the members of a class requires us to resolve the base class of that class.
// We force resolution here such that we catch circularities now.
resolveStructuredTypeMembers(baseConstructorType);
@@ -27511,7 +29611,7 @@ var ts;
error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
return type.resolvedBaseConstructorType = unknownType;
}
- if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
+ if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
return type.resolvedBaseConstructorType = unknownType;
}
@@ -27540,8 +29640,8 @@ var ts;
}
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
- var baseConstructorType = getBaseConstructorTypeOfClass(type);
- if (!(baseConstructorType.flags & 32768 /* Object */)) {
+ var baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));
+ if (!(baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */ | 1 /* Any */))) {
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
@@ -27554,11 +29654,14 @@ var ts;
// type arguments in the same manner as a type reference to get the same error reporting experience.
baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
}
+ else if (baseConstructorType.flags & 1 /* Any */) {
+ baseType = baseConstructorType;
+ }
else {
// The class derives from a "class-like" constructor function, check that we have at least one construct signature
// with a matching number of type parameters and use the return type of the first instantiated signature. Elsewhere
// we check that all instantiated signatures return the same type.
- var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);
if (!constructors.length) {
error(baseTypeNode.expression, ts.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);
return;
@@ -27576,7 +29679,7 @@ var ts;
if (baseType === unknownType) {
return;
}
- if (!(getObjectFlags(getTargetType(baseType)) & 3 /* ClassOrInterface */)) {
+ if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
return;
}
@@ -27602,16 +29705,22 @@ var ts;
}
return true;
}
+ // A valid base type is `any`, any non-generic object type or intersection of non-generic
+ // object types.
+ function isValidBaseType(type) {
+ return type.flags & (32768 /* Object */ | 16777216 /* NonPrimitive */ | 1 /* Any */) && !isGenericMappedType(type) ||
+ type.flags & 131072 /* Intersection */ && !ts.forEach(type.types, function (t) { return !isValidBaseType(t); });
+ }
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) {
+ if (declaration.kind === 229 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) {
for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
var node = _c[_b];
var baseType = getTypeFromTypeNode(node);
if (baseType !== unknownType) {
- if (getObjectFlags(getTargetType(baseType)) & 3 /* ClassOrInterface */) {
+ if (isValidBaseType(baseType)) {
if (type !== baseType && !hasBaseType(baseType, type)) {
if (type.resolvedBaseTypes === emptyArray) {
type.resolvedBaseTypes = [baseType];
@@ -27638,7 +29747,7 @@ var ts;
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ if (declaration.kind === 229 /* InterfaceDeclaration */) {
if (declaration.flags & 64 /* ContainsThis */) {
return false;
}
@@ -27676,7 +29785,7 @@ var ts;
type.outerTypeParameters = outerTypeParameters;
type.localTypeParameters = localTypeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384 /* TypeParameter */);
@@ -27695,7 +29804,7 @@ var ts;
if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 285 /* JSDocTypedefTag */);
+ var declaration = ts.getDeclarationOfKind(symbol, 289 /* JSDocTypedefTag */);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -27706,7 +29815,7 @@ var ts;
}
}
else {
- declaration = ts.getDeclarationOfKind(symbol, 228 /* TypeAliasDeclaration */);
+ declaration = ts.getDeclarationOfKind(symbol, 230 /* TypeAliasDeclaration */);
type = getTypeFromTypeNode(declaration.type);
}
if (popTypeResolution()) {
@@ -27716,7 +29825,7 @@ var ts;
// an instantiation of the type alias with the type parameters supplied as type arguments.
links.typeParameters = typeParameters;
links.instantiations = ts.createMap();
- links.instantiations[getTypeListId(typeParameters)] = type;
+ links.instantiations.set(getTypeListId(typeParameters), type);
}
}
else {
@@ -27733,14 +29842,14 @@ var ts;
return !ts.isInAmbientContext(member);
}
return expr.kind === 8 /* NumericLiteral */ ||
- expr.kind === 190 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
+ expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */ ||
- expr.kind === 70 /* Identifier */ && !!symbol.exports[expr.text];
+ expr.kind === 70 /* Identifier */ && !!symbol.exports.get(expr.text);
}
function enumHasLiteralMembers(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229 /* EnumDeclaration */) {
+ if (declaration.kind === 231 /* EnumDeclaration */) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
if (!isLiteralEnumMember(symbol, member)) {
@@ -27765,10 +29874,10 @@ var ts;
enumType.symbol = symbol;
if (enumHasLiteralMembers(symbol)) {
var memberTypeList = [];
- var memberTypes = ts.createMap();
+ var memberTypes = [];
for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (declaration.kind === 229 /* EnumDeclaration */) {
+ if (declaration.kind === 231 /* EnumDeclaration */) {
computeEnumMemberValues(declaration);
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
@@ -27785,7 +29894,7 @@ var ts;
if (memberTypeList.length > 1) {
enumType.flags |= 65536 /* Union */;
enumType.types = memberTypeList;
- unionTypes[getTypeListId(memberTypeList)] = enumType;
+ unionTypes.set(getTypeListId(memberTypeList), enumType);
}
}
}
@@ -27806,9 +29915,6 @@ var ts;
if (!links.declaredType) {
var type = createType(16384 /* TypeParameter */);
type.symbol = symbol;
- if (!ts.getDeclarationOfKind(symbol, 143 /* TypeParameter */).constraint) {
- type.constraint = noConstraintType;
- }
links.declaredType = type;
}
return links.declaredType;
@@ -27821,7 +29927,6 @@ var ts;
return links.declaredType;
}
function getDeclaredTypeOfSymbol(symbol) {
- ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0);
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
@@ -27860,19 +29965,20 @@ var ts;
function isIndependentType(node) {
switch (node.kind) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 133 /* ObjectKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 129 /* NeverKeyword */:
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return true;
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return isIndependentType(node.elementType);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return isIndependentTypeReference(node);
}
return false;
@@ -27885,7 +29991,7 @@ var ts;
// A function-like declaration is considered independent (free of this references) if it has a return type
// annotation that is considered independent and if each parameter is considered independent.
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 150 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
+ if (node.kind !== 151 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
return false;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
@@ -27906,12 +30012,12 @@ var ts;
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return isIndependentVariableLikeDeclaration(declaration);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
return isIndependentFunctionLikeDeclaration(declaration);
}
}
@@ -27922,7 +30028,7 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
- result[symbol.name] = symbol;
+ result.set(symbol.name, symbol);
}
return result;
}
@@ -27932,15 +30038,15 @@ var ts;
var result = ts.createMap();
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
- result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper);
+ result.set(symbol.name, mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper));
}
return result;
}
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
- if (!symbols[s.name]) {
- symbols[s.name] = s;
+ if (!symbols.has(s.name)) {
+ symbols.set(s.name, s);
}
}
}
@@ -27948,8 +30054,8 @@ var ts;
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
- type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
- type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
+ type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members.get("__call"));
+ type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members.get("__new"));
type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */);
type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */);
}
@@ -27957,7 +30063,14 @@ var ts;
}
function getTypeWithThisArgument(type, thisArgument) {
if (getObjectFlags(type) & 4 /* Reference */) {
- return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
+ var target = type.target;
+ var typeArguments = type.typeArguments;
+ if (ts.length(target.typeParameters) === ts.length(typeArguments)) {
+ return createTypeReference(target, ts.concatenate(typeArguments, [thisArgument || target.thisType]));
+ }
+ }
+ else if (type.flags & 131072 /* Intersection */) {
+ return getIntersectionType(ts.map(type.types, function (t) { return getTypeWithThisArgument(t, thisArgument); }));
}
return type;
}
@@ -27993,10 +30106,14 @@ var ts;
for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
var baseType = baseTypes_1[_i];
var instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;
- addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
+ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */));
constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */));
- stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0 /* String */);
+ if (!stringIndexInfo) {
+ stringIndexInfo = instantiatedBaseType === anyType ?
+ createIndexInfo(anyType, /*isReadonly*/ false) :
+ getIndexInfoOfType(instantiatedBaseType, 0 /* String */);
+ }
numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1 /* Number */);
}
}
@@ -28035,14 +30152,16 @@ var ts;
return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)];
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
+ var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
- var typeArgCount = typeArguments ? typeArguments.length : 0;
+ var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var baseSig = baseSignatures_1[_i];
- var typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0;
- if (typeParamCount === typeArgCount) {
- var sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig);
+ var minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);
+ var typeParamCount = ts.length(baseSig.typeParameters);
+ if ((isJavaScript || typeArgCount >= minTypeArgumentCount) && typeArgCount <= typeParamCount) {
+ var sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, baseTypeNode)) : cloneSignature(baseSig);
sig.typeParameters = classType.localTypeParameters;
sig.resolvedReturnType = classType;
result.push(sig);
@@ -28105,7 +30224,7 @@ var ts;
s = cloneSignature(signature);
if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) {
var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), /*subtypeReduction*/ true);
- s.thisParameter = createTransientSymbol(signature.thisParameter, thisType);
+ s.thisParameter = createSymbolWithType(signature.thisParameter, thisType);
}
// Clear resolved return type we possibly got from cloneSignature
s.resolvedReturnType = undefined;
@@ -28121,8 +30240,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
- var type = types_1[_i];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type = types_2[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -28150,22 +30269,57 @@ var ts;
function unionSpreadIndexInfos(info1, info2) {
return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
}
+ function includeMixinType(type, types, index) {
+ var mixedTypes = [];
+ for (var i = 0; i < types.length; i++) {
+ if (i === index) {
+ mixedTypes.push(type);
+ }
+ else if (isMixinConstructorType(types[i])) {
+ mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1 /* Construct */)[0]));
+ }
+ }
+ return getIntersectionType(mixedTypes);
+ }
function resolveIntersectionTypeMembers(type) {
// The members and properties collections are empty for intersection types. To get all properties of an
// intersection type use getPropertiesOfType (only the language service uses this).
var callSignatures = emptyArray;
var constructSignatures = emptyArray;
- var stringIndexInfo = undefined;
- var numberIndexInfo = undefined;
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var t = _a[_i];
+ var stringIndexInfo;
+ var numberIndexInfo;
+ var types = type.types;
+ var mixinCount = ts.countWhere(types, isMixinConstructorType);
+ var _loop_3 = function (i) {
+ var t = type.types[i];
+ // When an intersection type contains mixin constructor types, the construct signatures from
+ // those types are discarded and their return types are mixed into the return types of all
+ // other construct signatures in the intersection type. For example, the intersection type
+ // '{ new(...args: any[]) => A } & { new(s: string) => B }' has a single construct signature
+ // 'new(s: string) => A & B'.
+ if (mixinCount === 0 || mixinCount === types.length && i === 0 || !isMixinConstructorType(t)) {
+ var signatures = getSignaturesOfType(t, 1 /* Construct */);
+ if (signatures.length && mixinCount > 0) {
+ signatures = ts.map(signatures, function (s) {
+ var clone = cloneSignature(s);
+ clone.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, i);
+ return clone;
+ });
+ }
+ constructSignatures = ts.concatenate(constructSignatures, signatures);
+ }
callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0 /* Call */));
- constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1 /* Construct */));
stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0 /* String */));
numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1 /* Number */));
+ };
+ for (var i = 0; i < types.length; i++) {
+ _loop_3(i);
}
setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
}
+ /**
+ * Converts an AnonymousType to a ResolvedType.
+ */
function resolveAnonymousTypeMembers(type) {
var symbol = type.symbol;
if (type.target) {
@@ -28178,8 +30332,8 @@ var ts;
}
else if (symbol.flags & 2048 /* TypeLiteral */) {
var members = symbol.members;
- var callSignatures = getSignaturesOfSymbol(members["__call"]);
- var constructSignatures = getSignaturesOfSymbol(members["__new"]);
+ var callSignatures = getSignaturesOfSymbol(members.get("__call"));
+ var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */);
var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */);
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
@@ -28188,23 +30342,27 @@ var ts;
// Combinations of function, class, enum and module
var members = emptySymbols;
var constructSignatures = emptyArray;
- if (symbol.flags & 1952 /* HasExports */) {
+ var stringIndexInfo = undefined;
+ if (symbol.exports) {
members = getExportsOfSymbol(symbol);
}
if (symbol.flags & 32 /* Class */) {
var classType = getDeclaredTypeOfClassOrInterface(symbol);
- constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
+ constructSignatures = getSignaturesOfSymbol(symbol.members.get("__constructor"));
if (!constructSignatures.length) {
constructSignatures = getDefaultConstructSignatures(classType);
}
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
- if (baseConstructorType.flags & 32768 /* Object */) {
+ if (baseConstructorType.flags & (32768 /* Object */ | 131072 /* Intersection */ | 540672 /* TypeVariable */)) {
members = createSymbolTable(getNamedMembers(members));
- addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType));
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
+ }
+ else if (baseConstructorType === anyType) {
+ stringIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false);
}
}
var numberIndexInfo = symbol.flags & 384 /* Enum */ ? enumNumberIndexInfo : undefined;
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo);
+ setStructuredTypeMembers(type, members, emptyArray, constructSignatures, stringIndexInfo, numberIndexInfo);
// We resolve the members before computing the signatures because a signature may use
// typeof with a qualified name expression that circularly references the type we are
// in the process of resolving (see issue #6072). The temporarily empty signature list
@@ -28218,7 +30376,6 @@ var ts;
function resolveMappedTypeMembers(type) {
var members = ts.createMap();
var stringIndexInfo;
- var numberIndexInfo;
// Resolve upfront such that recursive references see an empty object type.
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
// In { [P in K]: T }, we refer to P as the type parameter type, K as the constraint type,
@@ -28226,43 +30383,53 @@ var ts;
var typeParameter = getTypeParameterFromMappedType(type);
var constraintType = getConstraintTypeFromMappedType(type);
var templateType = getTemplateTypeFromMappedType(type);
- var isReadonly = !!type.declaration.readonlyToken;
- var isOptional = !!type.declaration.questionToken;
- // First, if the constraint type is a type parameter, obtain the base constraint. Then,
- // if the key type is a 'keyof X', obtain 'keyof C' where C is the base constraint of X.
- // Finally, iterate over the constituents of the resulting iteration type.
- var keyType = constraintType.flags & 16384 /* TypeParameter */ ? getApparentType(constraintType) : constraintType;
- var iterationType = keyType.flags & 262144 /* Index */ ? getIndexType(getApparentType(keyType.type)) : keyType;
- forEachType(iterationType, function (t) {
+ var modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); // The 'T' in 'keyof T'
+ var templateReadonly = !!type.declaration.readonlyToken;
+ var templateOptional = !!type.declaration.questionToken;
+ if (type.declaration.typeParameter.constraint.kind === 169 /* TypeOperator */) {
+ // We have a { [P in keyof T]: X }
+ for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
+ var propertySymbol = _a[_i];
+ addMemberForKeyType(getLiteralTypeFromPropertyName(propertySymbol), propertySymbol);
+ }
+ if (getIndexInfoOfType(modifiersType, 0 /* String */)) {
+ addMemberForKeyType(stringType);
+ }
+ }
+ else {
+ // First, if the constraint type is a type parameter, obtain the base constraint. Then,
+ // if the key type is a 'keyof X', obtain 'keyof C' where C is the base constraint of X.
+ // Finally, iterate over the constituents of the resulting iteration type.
+ var keyType = constraintType.flags & 540672 /* TypeVariable */ ? getApparentType(constraintType) : constraintType;
+ var iterationType = keyType.flags & 262144 /* Index */ ? getIndexType(getApparentType(keyType.type)) : keyType;
+ forEachType(iterationType, addMemberForKeyType);
+ }
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
+ function addMemberForKeyType(t, propertySymbol) {
// Create a mapper from T to the current iteration type constituent. Then, if the
// mapped type is itself an instantiated type, combine the iteration mapper with the
// instantiation mapper.
- var iterationMapper = createUnaryTypeMapper(typeParameter, t);
+ var iterationMapper = createTypeMapper([typeParameter], [t]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
- // If the current iteration type constituent is a literal type, create a property.
- // Otherwise, for type string create a string index signature and for type number
- // create a numeric index signature.
- if (t.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */)) {
+ // If the current iteration type constituent is a string literal type, create a property.
+ // Otherwise, for type string create a string index signature.
+ if (t.flags & 32 /* StringLiteral */) {
var propName = t.text;
- var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | (isOptional ? 536870912 /* Optional */ : 0), propName);
- prop.type = addOptionality(propType, isOptional);
- prop.isReadonly = isReadonly;
- members[propName] = prop;
+ var modifiersProp = getPropertyOfType(modifiersType, propName);
+ var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864 /* Optional */);
+ var prop = createSymbol(4 /* Property */ | (isOptional ? 67108864 /* Optional */ : 0), propName);
+ prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? 8 /* Readonly */ : 0;
+ prop.type = propType;
+ if (propertySymbol) {
+ prop.syntheticOrigin = propertySymbol;
+ }
+ members.set(propName, prop);
}
else if (t.flags & 2 /* String */) {
- stringIndexInfo = createIndexInfo(propType, isReadonly);
- }
- else if (t.flags & 4 /* Number */) {
- numberIndexInfo = createIndexInfo(propType, isReadonly);
+ stringIndexInfo = createIndexInfo(propType, templateReadonly);
}
- });
- // If we created both a string and a numeric string index signature, and if the two index
- // signatures have identical types, discard the redundant numeric index signature.
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
- numberIndexInfo = undefined;
}
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
function getTypeParameterFromMappedType(type) {
return type.typeParameter ||
@@ -28275,16 +30442,34 @@ var ts;
function getTemplateTypeFromMappedType(type) {
return type.templateType ||
(type.templateType = type.declaration.type ?
- instantiateType(getTypeFromTypeNode(type.declaration.type), type.mapper || identityMapper) :
+ instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!type.declaration.questionToken), type.mapper || identityMapper) :
unknownType);
}
- function getErasedTemplateTypeFromMappedType(type) {
- return instantiateType(getTemplateTypeFromMappedType(type), createUnaryTypeMapper(getTypeParameterFromMappedType(type), anyType));
+ function getModifiersTypeFromMappedType(type) {
+ if (!type.modifiersType) {
+ var constraintDeclaration = type.declaration.typeParameter.constraint;
+ if (constraintDeclaration.kind === 169 /* TypeOperator */) {
+ // If the constraint declaration is a 'keyof T' node, the modifiers type is T. We check
+ // AST nodes here because, when T is a non-generic type, the logic below eagerly resolves
+ // 'keyof T' to a literal union type and we can't recover T from that type.
+ type.modifiersType = instantiateType(getTypeFromTypeNode(constraintDeclaration.type), type.mapper || identityMapper);
+ }
+ else {
+ // Otherwise, get the declared constraint type, and if the constraint type is a type parameter,
+ // get the constraint of that type parameter. If the resulting type is an indexed type 'keyof T',
+ // the modifiers type is T. Otherwise, the modifiers type is {}.
+ var declaredType = getTypeFromMappedTypeNode(type.declaration);
+ var constraint = getConstraintTypeFromMappedType(declaredType);
+ var extendedConstraint = constraint && constraint.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(constraint) : constraint;
+ type.modifiersType = extendedConstraint && extendedConstraint.flags & 262144 /* Index */ ? instantiateType(extendedConstraint.type, type.mapper || identityMapper) : emptyObjectType;
+ }
+ }
+ return type.modifiersType;
}
function isGenericMappedType(type) {
if (getObjectFlags(type) & 32 /* Mapped */) {
var constraintType = getConstraintTypeFromMappedType(type);
- return !!(constraintType.flags & (16384 /* TypeParameter */ | 262144 /* Index */));
+ return maybeTypeOfKind(constraintType, 540672 /* TypeVariable */ | 262144 /* Index */);
}
return false;
}
@@ -28321,42 +30506,40 @@ var ts;
return emptyArray;
}
/** If the given type is an object type and that type has a property by the given name,
- * return the symbol for that property. Otherwise return undefined. */
+ * return the symbol for that property. Otherwise return undefined.
+ */
function getPropertyOfObjectType(type, name) {
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
}
}
function getPropertiesOfUnionOrIntersectionType(type) {
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var current = _a[_i];
- for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
- var prop = _c[_b];
- getUnionOrIntersectionProperty(type, prop.name);
- }
- // The properties of a union type are those that are present in all constituent types, so
- // we only need to check the properties of the first type
- if (type.flags & 65536 /* Union */) {
- break;
- }
- }
- var props = type.resolvedProperties;
- if (props) {
- var result = [];
- for (var key in props) {
- var prop = props[key];
- // We need to filter out partial properties in union types
- if (!(prop.flags & 268435456 /* SyntheticProperty */ && prop.isPartial)) {
- result.push(prop);
+ if (!type.resolvedProperties) {
+ var members = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var current = _a[_i];
+ for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
+ var prop = _c[_b];
+ if (!members.has(prop.name)) {
+ var combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.name);
+ if (combinedProp) {
+ members.set(prop.name, combinedProp);
+ }
+ }
+ }
+ // The properties of a union type are those that are present in all constituent types, so
+ // we only need to check the properties of the first type
+ if (type.flags & 65536 /* Union */) {
+ break;
}
}
- return result;
+ type.resolvedProperties = getNamedMembers(members);
}
- return emptyArray;
+ return type.resolvedProperties;
}
function getPropertiesOfType(type) {
type = getApparentType(type);
@@ -28364,25 +30547,114 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getConstraintOfType(type) {
+ return type.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(type) :
+ type.flags & 524288 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) :
+ getBaseConstraintOfType(type);
+ }
+ function getConstraintOfTypeParameter(typeParameter) {
+ return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined;
+ }
+ function getConstraintOfIndexedAccess(type) {
+ var baseObjectType = getBaseConstraintOfType(type.objectType);
+ var baseIndexType = getBaseConstraintOfType(type.indexType);
+ return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined;
+ }
+ function getBaseConstraintOfType(type) {
+ if (type.flags & (540672 /* TypeVariable */ | 196608 /* UnionOrIntersection */)) {
+ var constraint = getResolvedBaseConstraint(type);
+ if (constraint !== noConstraintType && constraint !== circularConstraintType) {
+ return constraint;
+ }
+ }
+ else if (type.flags & 262144 /* Index */) {
+ return stringType;
+ }
+ return undefined;
+ }
+ function hasNonCircularBaseConstraint(type) {
+ return getResolvedBaseConstraint(type) !== circularConstraintType;
+ }
/**
- * The apparent type of a type parameter is the base constraint instantiated with the type parameter
- * as the type argument for the 'this' type.
+ * Return the resolved base constraint of a type variable. The noConstraintType singleton is returned if the
+ * type variable has no constraint, and the circularConstraintType singleton is returned if the constraint
+ * circularly references the type variable.
*/
- function getApparentTypeOfTypeParameter(type) {
- if (!type.resolvedApparentType) {
- var constraintType = getConstraintOfTypeParameter(type);
- while (constraintType && constraintType.flags & 16384 /* TypeParameter */) {
- constraintType = getConstraintOfTypeParameter(constraintType);
+ function getResolvedBaseConstraint(type) {
+ var typeStack;
+ var circular;
+ if (!type.resolvedBaseConstraint) {
+ typeStack = [];
+ var constraint = getBaseConstraint(type);
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType, type);
+ }
+ return type.resolvedBaseConstraint;
+ function getBaseConstraint(t) {
+ if (ts.contains(typeStack, t)) {
+ circular = true;
+ return undefined;
+ }
+ typeStack.push(t);
+ var result = computeBaseConstraint(t);
+ typeStack.pop();
+ return result;
+ }
+ function computeBaseConstraint(t) {
+ if (t.flags & 16384 /* TypeParameter */) {
+ var constraint = getConstraintFromTypeParameter(t);
+ return t.isThisType ? constraint :
+ constraint ? getBaseConstraint(constraint) : undefined;
+ }
+ if (t.flags & 196608 /* UnionOrIntersection */) {
+ var types = t.types;
+ var baseTypes = [];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var type_2 = types_3[_i];
+ var baseType = getBaseConstraint(type_2);
+ if (baseType) {
+ baseTypes.push(baseType);
+ }
+ }
+ return t.flags & 65536 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) :
+ t.flags & 131072 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) :
+ undefined;
}
- type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
+ if (t.flags & 262144 /* Index */) {
+ return stringType;
+ }
+ if (t.flags & 524288 /* IndexedAccess */) {
+ var baseObjectType = getBaseConstraint(t.objectType);
+ var baseIndexType = getBaseConstraint(t.indexType);
+ var baseIndexedAccess = baseObjectType && baseIndexType ? getIndexedAccessType(baseObjectType, baseIndexType) : undefined;
+ return baseIndexedAccess && baseIndexedAccess !== unknownType ? getBaseConstraint(baseIndexedAccess) : undefined;
+ }
+ return t;
}
- return type.resolvedApparentType;
+ }
+ function getApparentTypeOfIntersectionType(type) {
+ return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type));
}
/**
- * The apparent type of an indexed access T[K] is the type of T's string index signature, if any.
+ * Gets the default type for a type parameter.
+ *
+ * If the type parameter is the result of an instantiation, this gets the instantiated
+ * default type of its target. If the type parameter has no default type, `undefined`
+ * is returned.
+ *
+ * This function *does not* perform a circularity check.
*/
- function getApparentTypeOfIndexedAccess(type) {
- return getIndexTypeOfType(getApparentType(type.objectType), 0 /* String */) || type;
+ function getDefaultFromTypeParameter(typeParameter) {
+ if (!typeParameter.default) {
+ if (typeParameter.target) {
+ var targetDefault = getDefaultFromTypeParameter(typeParameter.target);
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;
+ }
+ else {
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameter(decl) && decl.default; });
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
+ }
+ }
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
}
/**
* For a type parameter, return the base constraint of the type parameter. For the string, number,
@@ -28390,28 +30662,31 @@ var ts;
* type itself. Note that the apparent type of a union type is the union type itself.
*/
function getApparentType(type) {
- var t = type.flags & 16384 /* TypeParameter */ ? getApparentTypeOfTypeParameter(type) :
- type.flags & 524288 /* IndexedAccess */ ? getApparentTypeOfIndexedAccess(type) :
- type;
- return t.flags & 262178 /* StringLike */ ? globalStringType :
- t.flags & 340 /* NumberLike */ ? globalNumberType :
- t.flags & 136 /* BooleanLike */ ? globalBooleanType :
- t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType() :
- t;
+ var t = type.flags & 540672 /* TypeVariable */ ? getBaseConstraintOfType(type) || emptyObjectType : type;
+ return t.flags & 131072 /* Intersection */ ? getApparentTypeOfIntersectionType(t) :
+ t.flags & 262178 /* StringLike */ ? globalStringType :
+ t.flags & 340 /* NumberLike */ ? globalNumberType :
+ t.flags & 136 /* BooleanLike */ ? globalBooleanType :
+ t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) :
+ t.flags & 16777216 /* NonPrimitive */ ? emptyObjectType :
+ t;
}
function createUnionOrIntersectionProperty(containingType, name) {
- var types = containingType.types;
var props;
+ var types = containingType.types;
+ var isUnion = containingType.flags & 65536 /* Union */;
+ var excludeModifiers = isUnion ? 24 /* NonPublicAccessibilityModifier */ : 0;
// Flags we want to propagate to the result if they exist in all source symbols
- var commonFlags = (containingType.flags & 131072 /* Intersection */) ? 536870912 /* Optional */ : 0 /* None */;
- var isReadonly = false;
- var isPartial = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var current = types_2[_i];
+ var commonFlags = isUnion ? 0 /* None */ : 67108864 /* Optional */;
+ var syntheticFlag = 4 /* SyntheticMethod */;
+ var checkFlags = 0;
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var current = types_4[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- if (prop && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */))) {
+ var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
props = [prop];
@@ -28419,25 +30694,29 @@ var ts;
else if (!ts.contains(props, prop)) {
props.push(prop);
}
- if (isReadonlySymbol(prop)) {
- isReadonly = true;
+ checkFlags |= (isReadonlySymbol(prop) ? 8 /* Readonly */ : 0) |
+ (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 64 /* ContainsPublic */ : 0) |
+ (modifiers & 16 /* Protected */ ? 128 /* ContainsProtected */ : 0) |
+ (modifiers & 8 /* Private */ ? 256 /* ContainsPrivate */ : 0) |
+ (modifiers & 32 /* Static */ ? 512 /* ContainsStatic */ : 0);
+ if (!isMethodLike(prop)) {
+ syntheticFlag = 2 /* SyntheticProperty */;
}
}
- else if (containingType.flags & 65536 /* Union */) {
- isPartial = true;
+ else if (isUnion) {
+ checkFlags |= 16 /* Partial */;
}
}
}
if (!props) {
return undefined;
}
- if (props.length === 1 && !isPartial) {
+ if (props.length === 1 && !(checkFlags & 16 /* Partial */)) {
return props[0];
}
var propTypes = [];
var declarations = [];
var commonType = undefined;
- var hasNonUniformType = false;
for (var _a = 0, props_1 = props; _a < props_1.length; _a++) {
var prop = props_1[_a];
if (prop.declarations) {
@@ -28448,17 +30727,15 @@ var ts;
commonType = type;
}
else if (type !== commonType) {
- hasNonUniformType = true;
+ checkFlags |= 32 /* HasNonUniformType */;
}
propTypes.push(type);
}
- var result = createSymbol(4 /* Property */ | 67108864 /* Transient */ | 268435456 /* SyntheticProperty */ | commonFlags, name);
+ var result = createSymbol(4 /* Property */ | commonFlags, name);
+ result.checkFlags = syntheticFlag | checkFlags;
result.containingType = containingType;
- result.hasNonUniformType = hasNonUniformType;
- result.isPartial = isPartial;
result.declarations = declarations;
- result.isReadonly = isReadonly;
- result.type = containingType.flags & 65536 /* Union */ ? getUnionType(propTypes) : getIntersectionType(propTypes);
+ result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
return result;
}
// Return the symbol for a given property in a union or intersection type, or undefined if the property
@@ -28467,12 +30744,12 @@ var ts;
// these partial properties when identifying discriminant properties, but otherwise they are filtered out
// and do not appear to be present in the union type.
function getUnionOrIntersectionProperty(type, name) {
- var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap());
- var property = properties[name];
+ var properties = type.propertyCache || (type.propertyCache = ts.createMap());
+ var property = properties.get(name);
if (!property) {
property = createUnionOrIntersectionProperty(type, name);
if (property) {
- properties[name] = property;
+ properties.set(name, property);
}
}
return property;
@@ -28480,7 +30757,7 @@ var ts;
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
// We need to filter out partial properties in union types
- return property && !(property.flags & 268435456 /* SyntheticProperty */ && property.isPartial) ? property : undefined;
+ return property && !(getCheckFlags(property) & 16 /* Partial */) ? property : undefined;
}
/**
* Return the symbol for the property with the given name in the given type. Creates synthetic union properties when
@@ -28494,7 +30771,7 @@ var ts;
type = getApparentType(type);
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- var symbol = resolved.members[name];
+ var symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
return symbol;
}
@@ -28561,7 +30838,7 @@ var ts;
return undefined;
}
function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
var templateTag = ts.getJSDocTemplateTag(declaration);
if (templateTag) {
return getTypeParametersFromDeclaration(templateTag.typeParameters);
@@ -28583,16 +30860,16 @@ var ts;
}
function symbolsToArray(symbols) {
var result = [];
- for (var id in symbols) {
+ symbols.forEach(function (symbol, id) {
if (!isReservedMemberName(id)) {
- result.push(symbols[id]);
+ result.push(symbol);
}
- }
+ });
return result;
}
function isJSDocOptionalParameter(node) {
- if (node.flags & 2097152 /* JavaScriptFile */) {
- if (node.type && node.type.kind === 273 /* JSDocOptionalType */) {
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ if (node.type && node.type.kind === 277 /* JSDocOptionalType */) {
return true;
}
var paramTags = ts.getJSDocParameterTags(node);
@@ -28603,7 +30880,7 @@ var ts;
return true;
}
if (paramTag.typeExpression) {
- return paramTag.typeExpression.type.kind === 273 /* JSDocOptionalType */;
+ return paramTag.typeExpression.type.kind === 277 /* JSDocOptionalType */;
}
}
}
@@ -28628,6 +30905,12 @@ var ts;
ts.Debug.assert(parameterIndex >= 0);
return parameterIndex >= signature.minArgumentCount;
}
+ var iife = ts.getImmediatelyInvokedFunctionExpression(node.parent);
+ if (iife) {
+ return !node.type &&
+ !node.dotDotDotToken &&
+ ts.indexOf(node.parent.parameters, node) >= iife.arguments.length;
+ }
return false;
}
function createTypePredicateFromTypePredicateNode(node) {
@@ -28647,19 +30930,68 @@ var ts;
};
}
}
+ /**
+ * Gets the minimum number of type arguments needed to satisfy all non-optional type
+ * parameters.
+ */
+ function getMinTypeArgumentCount(typeParameters) {
+ var minTypeArgumentCount = 0;
+ if (typeParameters) {
+ for (var i = 0; i < typeParameters.length; i++) {
+ if (!getDefaultFromTypeParameter(typeParameters[i])) {
+ minTypeArgumentCount = i + 1;
+ }
+ }
+ }
+ return minTypeArgumentCount;
+ }
+ /**
+ * Fill in default types for unsupplied type arguments. If `typeArguments` is undefined
+ * when a default type is supplied, a new array will be created and returned.
+ *
+ * @param typeArguments The supplied type arguments.
+ * @param typeParameters The requested type parameters.
+ * @param minTypeArgumentCount The minimum number of required type arguments.
+ */
+ function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, location) {
+ var numTypeParameters = ts.length(typeParameters);
+ if (numTypeParameters) {
+ var numTypeArguments = ts.length(typeArguments);
+ var isJavaScript = ts.isInJavaScriptFile(location);
+ if ((isJavaScript || numTypeArguments >= minTypeArgumentCount) && numTypeArguments <= numTypeParameters) {
+ if (!typeArguments) {
+ typeArguments = [];
+ }
+ // Map an unsatisfied type parameter with a default type.
+ // If a type parameter does not have a default type, or if the default type
+ // is a forward reference, the empty object type is used.
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ typeArguments[i] = isJavaScript ? anyType : emptyObjectType;
+ }
+ for (var i = numTypeArguments; i < numTypeParameters; i++) {
+ var mapper = createTypeMapper(typeParameters, typeArguments);
+ var defaultType = getDefaultFromTypeParameter(typeParameters[i]);
+ typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : isJavaScript ? anyType : emptyObjectType;
+ }
+ }
+ }
+ return typeArguments;
+ }
function getSignatureFromDeclaration(declaration) {
var links = getNodeLinks(declaration);
if (!links.resolvedSignature) {
var parameters = [];
var hasLiteralTypes = false;
- var minArgumentCount = -1;
+ var minArgumentCount = 0;
var thisParameter = undefined;
var hasThisParameter = void 0;
+ var iife = ts.getImmediatelyInvokedFunctionExpression(declaration);
var isJSConstructSignature = ts.isJSDocConstructSignature(declaration);
+ var isUntypedSignatureInJSFile = !iife && !isJSConstructSignature && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration);
// If this is a JSDoc construct signature, then skip the first parameter in the
// parameter list. The first parameter represents the return type of the construct
// signature.
- for (var i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) {
+ for (var i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
var param = declaration.parameters[i];
var paramSymbol = param.symbol;
// Include parameter symbol instead of property symbol in the signature
@@ -28674,43 +31006,36 @@ var ts;
else {
parameters.push(paramSymbol);
}
- if (param.type && param.type.kind === 171 /* LiteralType */) {
+ if (param.type && param.type.kind === 172 /* LiteralType */) {
hasLiteralTypes = true;
}
- if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {
- if (minArgumentCount < 0) {
- minArgumentCount = i - (hasThisParameter ? 1 : 0);
- }
- }
- else {
- // If we see any required parameters, it means the prior ones were not in fact optional.
- minArgumentCount = -1;
+ // Record a new minimum argument count if this is not an optional parameter
+ var isOptionalParameter_1 = param.initializer || param.questionToken || param.dotDotDotToken ||
+ iife && parameters.length > iife.arguments.length && !param.type ||
+ isJSDocOptionalParameter(param) ||
+ isUntypedSignatureInJSFile;
+ if (!isOptionalParameter_1) {
+ minArgumentCount = parameters.length;
}
}
// If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation
- if ((declaration.kind === 151 /* GetAccessor */ || declaration.kind === 152 /* SetAccessor */) &&
+ if ((declaration.kind === 152 /* GetAccessor */ || declaration.kind === 153 /* SetAccessor */) &&
!ts.hasDynamicName(declaration) &&
(!hasThisParameter || !thisParameter)) {
- var otherKind = declaration.kind === 151 /* GetAccessor */ ? 152 /* SetAccessor */ : 151 /* GetAccessor */;
+ var otherKind = declaration.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */;
var other = ts.getDeclarationOfKind(declaration.symbol, otherKind);
if (other) {
thisParameter = getAnnotatedAccessorThisParameter(other);
}
}
- if (minArgumentCount < 0) {
- minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0);
- }
- if (isJSConstructSignature) {
- minArgumentCount--;
- }
- var classType = declaration.kind === 150 /* Constructor */ ?
+ var classType = declaration.kind === 151 /* Constructor */ ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
var typeParameters = classType ? classType.localTypeParameters :
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
getTypeParametersFromJSDocTemplate(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
- var typePredicate = declaration.type && declaration.type.kind === 156 /* TypePredicate */ ?
+ var typePredicate = declaration.type && declaration.type.kind === 157 /* TypePredicate */ ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
@@ -28727,7 +31052,7 @@ var ts;
else if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.flags & 2097152 /* JavaScriptFile */) {
+ if (declaration.flags & 65536 /* JavaScriptFile */) {
var type = getReturnTypeFromJSDocComment(declaration);
if (type && type !== unknownType) {
return type;
@@ -28735,35 +31060,63 @@ var ts;
}
// TypeScript 1.0 spec (April 2014):
// If only one accessor includes a type annotation, the other behaves as if it had the same type annotation.
- if (declaration.kind === 151 /* GetAccessor */ && !ts.hasDynamicName(declaration)) {
- var setter = ts.getDeclarationOfKind(declaration.symbol, 152 /* SetAccessor */);
+ if (declaration.kind === 152 /* GetAccessor */ && !ts.hasDynamicName(declaration)) {
+ var setter = ts.getDeclarationOfKind(declaration.symbol, 153 /* SetAccessor */);
return getAnnotatedAccessorType(setter);
}
if (ts.nodeIsMissing(declaration.body)) {
return anyType;
}
}
+ function containsArgumentsReference(declaration) {
+ var links = getNodeLinks(declaration);
+ if (links.containsArgumentsReference === undefined) {
+ if (links.flags & 8192 /* CaptureArguments */) {
+ links.containsArgumentsReference = true;
+ }
+ else {
+ links.containsArgumentsReference = traverse(declaration.body);
+ }
+ }
+ return links.containsArgumentsReference;
+ function traverse(node) {
+ if (!node)
+ return false;
+ switch (node.kind) {
+ case 70 /* Identifier */:
+ return node.text === "arguments" && ts.isPartOfExpression(node);
+ case 148 /* PropertyDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return node.name.kind === 143 /* ComputedPropertyName */
+ && traverse(node.name);
+ default:
+ return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && ts.forEachChild(node, traverse);
+ }
+ }
+ }
function getSignaturesOfSymbol(symbol) {
if (!symbol)
return emptyArray;
var result = [];
- for (var i = 0, len = symbol.declarations.length; i < len; i++) {
+ for (var i = 0; i < symbol.declarations.length; i++) {
var node = symbol.declarations[i];
switch (node.kind) {
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 278 /* JSDocFunctionType */:
// Don't include signature if node is the implementation of an overloaded function. A node is considered
// an implementation node if it has a body and the previous node is of the same kind and immediately
// precedes the implementation node (i.e. has the same parent and ends where the implementation starts).
@@ -28810,7 +31163,7 @@ var ts;
}
if (!popTypeResolution()) {
type = anyType;
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
var declaration = signature.declaration;
if (declaration.name) {
error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
@@ -28834,9 +31187,14 @@ var ts;
return anyType;
}
function getSignatureInstantiation(signature, typeArguments) {
+ typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters));
var instantiations = signature.instantiations || (signature.instantiations = ts.createMap());
var id = getTypeListId(typeArguments);
- return instantiations[id] || (instantiations[id] = createSignatureInstantiation(signature, typeArguments));
+ var instantiation = instantiations.get(id);
+ if (!instantiation) {
+ instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
+ }
+ return instantiation;
}
function createSignatureInstantiation(signature, typeArguments) {
return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), /*eraseTypeParameters*/ true);
@@ -28855,7 +31213,7 @@ var ts;
// object type literal or interface (using the new keyword). Each way of declaring a constructor
// will result in a different declaration kind.
if (!signature.isolatedSignatureType) {
- var isConstructor = signature.declaration.kind === 150 /* Constructor */ || signature.declaration.kind === 154 /* ConstructSignature */;
+ var isConstructor = signature.declaration.kind === 151 /* Constructor */ || signature.declaration.kind === 155 /* ConstructSignature */;
var type = createObjectType(16 /* Anonymous */);
type.members = emptySymbols;
type.properties = emptyArray;
@@ -28866,10 +31224,10 @@ var ts;
return signature.isolatedSignatureType;
}
function getIndexSymbol(symbol) {
- return symbol.members["__index"];
+ return symbol.members.get("__index");
}
function getIndexDeclarationOfSymbol(symbol, kind) {
- var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 134 /* StringKeyword */;
+ var syntaxKind = kind === 1 /* Number */ ? 132 /* NumberKeyword */ : 135 /* StringKeyword */;
var indexSymbol = getIndexSymbol(symbol);
if (indexSymbol) {
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
@@ -28896,21 +31254,9 @@ var ts;
return undefined;
}
function getConstraintDeclaration(type) {
- return ts.getDeclarationOfKind(type.symbol, 143 /* TypeParameter */).constraint;
+ return ts.getDeclarationOfKind(type.symbol, 144 /* TypeParameter */).constraint;
}
- function hasConstraintReferenceTo(type, target) {
- var checked;
- while (type && type.flags & 16384 /* TypeParameter */ && !(type.isThisType) && !ts.contains(checked, type)) {
- if (type === target) {
- return true;
- }
- (checked || (checked = [])).push(type);
- var constraintDeclaration = getConstraintDeclaration(type);
- type = constraintDeclaration && getTypeFromTypeNode(constraintDeclaration);
- }
- return false;
- }
- function getConstraintOfTypeParameter(typeParameter) {
+ function getConstraintFromTypeParameter(typeParameter) {
if (!typeParameter.constraint) {
if (typeParameter.target) {
var targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
@@ -28918,28 +31264,23 @@ var ts;
}
else {
var constraintDeclaration = getConstraintDeclaration(typeParameter);
- var constraint = getTypeFromTypeNode(constraintDeclaration);
- if (hasConstraintReferenceTo(constraint, typeParameter)) {
- error(constraintDeclaration, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
- constraint = unknownType;
- }
- typeParameter.constraint = constraint;
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType;
}
}
return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
}
function getParentSymbolOfTypeParameter(typeParameter) {
- return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 143 /* TypeParameter */).parent);
+ return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 144 /* TypeParameter */).parent);
}
function getTypeListId(types) {
var result = "";
if (types) {
- var length_3 = types.length;
+ var length_4 = types.length;
var i = 0;
- while (i < length_3) {
+ while (i < length_4) {
var startId = types[i].id;
var count = 1;
- while (i + count < length_3 && types[i + count].id === startId + count) {
+ while (i + count < length_4 && types[i + count].id === startId + count) {
count++;
}
if (result.length) {
@@ -28960,8 +31301,8 @@ var ts;
// that care about the presence of such types at arbitrary depth in a containing type.
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
- var type = types_3[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -28970,9 +31311,10 @@ var ts;
}
function createTypeReference(target, typeArguments) {
var id = getTypeListId(typeArguments);
- var type = target.instantiations[id];
+ var type = target.instantiations.get(id);
if (!type) {
- type = target.instantiations[id] = createObjectType(4 /* Reference */, target.symbol);
+ type = createObjectType(4 /* Reference */, target.symbol);
+ target.instantiations.set(id, type);
type.flags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, /*excludeKinds*/ 0) : 0;
type.target = target;
type.typeArguments = typeArguments;
@@ -28988,21 +31330,26 @@ var ts;
return type;
}
function getTypeReferenceArity(type) {
- return type.target.typeParameters ? type.target.typeParameters.length : 0;
+ return ts.length(type.target.typeParameters);
}
// Get type from reference to class or interface
function getTypeFromClassOrInterfaceReference(node, symbol) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (!ts.isInJavaScriptFile(node) && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
// In a type reference, the outer type parameters of the referenced class or interface are automatically
// supplied as type arguments and the type reference only specifies arguments for the local type parameters
// of the class or interface.
- return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode)));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
@@ -29015,7 +31362,11 @@ var ts;
var links = getSymbolLinks(symbol);
var typeParameters = links.typeParameters;
var id = getTypeListId(typeArguments);
- return links.instantiations[id] || (links.instantiations[id] = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments)));
+ var instantiation = links.instantiations.get(id);
+ if (!instantiation) {
+ links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters)))));
+ }
+ return instantiation;
}
// Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include
// references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the
@@ -29024,8 +31375,12 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
- if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) {
- error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length);
+ var numTypeArguments = ts.length(node.typeArguments);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {
+ error(node, minTypeArgumentCount === typeParameters.length
+ ? ts.Diagnostics.Generic_type_0_requires_1_type_argument_s
+ : ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode);
@@ -29047,11 +31402,11 @@ var ts;
}
function getTypeReferenceName(node) {
switch (node.kind) {
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return node.typeName;
- case 272 /* JSDocTypeReference */:
+ case 276 /* JSDocTypeReference */:
return node.name;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
// We only support expressions that are simple qualified names. For other
// expressions this produces undefined.
var expr = node.expression;
@@ -29077,7 +31432,7 @@ var ts;
if (symbol.flags & 524288 /* TypeAlias */) {
return getTypeFromTypeAliasReference(node, symbol);
}
- if (symbol.flags & 107455 /* Value */ && node.kind === 272 /* JSDocTypeReference */) {
+ if (symbol.flags & 107455 /* Value */ && node.kind === 276 /* JSDocTypeReference */) {
// A JSDocTypeReference may have resolved to a value (as opposed to a type). In
// that case, the type of this reference is just the type of the value we resolved
// to.
@@ -29085,19 +31440,54 @@ var ts;
}
return getTypeFromNonGenericTypeReference(node, symbol);
}
+ function getPrimitiveTypeFromJSDocTypeReference(node) {
+ if (ts.isIdentifier(node.name)) {
+ switch (node.name.text) {
+ case "String":
+ return stringType;
+ case "Number":
+ return numberType;
+ case "Boolean":
+ return booleanType;
+ case "Void":
+ return voidType;
+ case "Undefined":
+ return undefinedType;
+ case "Null":
+ return nullType;
+ case "Object":
+ return anyType;
+ case "Function":
+ return anyFunctionType;
+ case "Array":
+ case "array":
+ return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
+ case "Promise":
+ case "promise":
+ return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
+ }
+ }
+ }
+ function getTypeFromJSDocNullableTypeNode(node) {
+ var type = getTypeFromTypeNode(node.type);
+ return strictNullChecks ? getUnionType([type, nullType]) : type;
+ }
function getTypeFromTypeReference(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
- if (node.kind === 272 /* JSDocTypeReference */) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
+ if (node.kind === 276 /* JSDocTypeReference */) {
+ type = getPrimitiveTypeFromJSDocTypeReference(node);
+ if (!type) {
+ var typeReferenceName = getTypeReferenceName(node);
+ symbol = resolveTypeReferenceName(typeReferenceName);
+ type = getTypeReferenceType(node, symbol);
+ }
}
else {
// We only support expressions that are simple qualified names. For other expressions this produces undefined.
- var typeNameOrExpression = node.kind === 157 /* TypeReference */
+ var typeNameOrExpression = node.kind === 158 /* TypeReference */
? node.typeName
: ts.isEntityNameExpression(node.expression)
? node.expression
@@ -29129,12 +31519,12 @@ var ts;
function getTypeOfGlobalSymbol(symbol, arity) {
function getTypeDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
- var declaration = declarations_3[_i];
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+ var declaration = declarations_4[_i];
switch (declaration.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
return declaration;
}
}
@@ -29147,24 +31537,68 @@ var ts;
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
return arity ? emptyGenericType : emptyObjectType;
}
- if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
+ if (ts.length(type.typeParameters) !== arity) {
error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
return arity ? emptyGenericType : emptyObjectType;
}
return type;
}
- function getGlobalValueSymbol(name) {
- return getGlobalSymbol(name, 107455 /* Value */, ts.Diagnostics.Cannot_find_global_value_0);
+ function getGlobalValueSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 107455 /* Value */, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined);
}
- function getGlobalTypeSymbol(name) {
- return getGlobalSymbol(name, 793064 /* Type */, ts.Diagnostics.Cannot_find_global_type_0);
+ function getGlobalTypeSymbol(name, reportErrors) {
+ return getGlobalSymbol(name, 793064 /* Type */, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
}
function getGlobalSymbol(name, meaning, diagnostic) {
return resolveName(undefined, name, meaning, diagnostic, name);
}
- function getGlobalType(name, arity) {
+ function getGlobalType(name, arity, reportErrors) {
+ var symbol = getGlobalTypeSymbol(name, reportErrors);
+ return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
+ }
+ function getGlobalTypedPropertyDescriptorType() {
+ return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", /*arity*/ 1, /*reportErrors*/ true)) || emptyGenericType;
+ }
+ function getGlobalTemplateStringsArrayType() {
+ return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", /*arity*/ 0, /*reportErrors*/ true)) || emptyObjectType;
+ }
+ function getGlobalESSymbolConstructorSymbol(reportErrors) {
+ return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
+ }
+ function getGlobalESSymbolType(reportErrors) {
+ return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalPromiseType(reportErrors) {
+ return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalPromiseConstructorSymbol(reportErrors) {
+ return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
+ }
+ function getGlobalPromiseConstructorLikeType(reportErrors) {
+ return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", /*arity*/ 0, reportErrors)) || emptyObjectType;
+ }
+ function getGlobalAsyncIterableType(reportErrors) {
+ return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIteratorType(reportErrors) {
+ return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalAsyncIterableIteratorType(reportErrors) {
+ return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableType(reportErrors) {
+ return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIteratorType(reportErrors) {
+ return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalIterableIteratorType(reportErrors) {
+ return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType;
+ }
+ function getGlobalTypeOrUndefined(name, arity) {
if (arity === void 0) { arity = 0; }
- return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
+ var symbol = getGlobalSymbol(name, 793064 /* Type */, /*diagnostic*/ undefined);
+ return symbol && getTypeOfGlobalSymbol(symbol, arity);
}
/**
* Returns a type that is inside a namespace at the global scope, e.g.
@@ -29176,25 +31610,25 @@ var ts;
return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol);
}
/**
- * Creates a TypeReference for a generic `TypedPropertyDescriptor<T>`.
- */
- function createTypedPropertyDescriptorType(propertyType) {
- var globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
- return globalTypedPropertyDescriptorType !== emptyGenericType
- ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType])
- : emptyObjectType;
- }
- /**
* Instantiates a global type that is generic with some element type, and returns that instantiation.
*/
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
}
- function createIterableType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]);
+ function createTypedPropertyDescriptorType(propertyType) {
+ return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);
+ }
+ function createAsyncIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(/*reportErrors*/ true), [iteratedType]);
+ }
+ function createAsyncIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(/*reportErrors*/ true), [iteratedType]);
}
- function createIterableIteratorType(elementType) {
- return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]);
+ function createIterableType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableType(/*reportErrors*/ true), [iteratedType]);
+ }
+ function createIterableIteratorType(iteratedType) {
+ return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(/*reportErrors*/ true), [iteratedType]);
}
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
@@ -29219,7 +31653,7 @@ var ts;
for (var i = 0; i < arity; i++) {
var typeParameter = createType(16384 /* TypeParameter */);
typeParameters.push(typeParameter);
- var property = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i);
+ var property = createSymbol(4 /* Property */, "" + i);
property.type = typeParameter;
properties.push(property);
}
@@ -29228,7 +31662,7 @@ var ts;
type.outerTypeParameters = undefined;
type.localTypeParameters = typeParameters;
type.instantiations = ts.createMap();
- type.instantiations[getTypeListId(type.typeParameters)] = type;
+ type.instantiations.set(getTypeListId(type.typeParameters), type);
type.target = type;
type.typeArguments = type.typeParameters;
type.thisType = createType(16384 /* TypeParameter */);
@@ -29312,14 +31746,14 @@ var ts;
// Add the given types to the given type set. Order is preserved, duplicates are removed,
// and nested types of the given kind are flattened into the set.
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
- var type = types_4[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var type = types_6[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var t = types_5[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var t = types_7[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -29327,8 +31761,9 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var i = 0, len = types.length; i < len; i++) {
- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
+ if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
}
@@ -29414,10 +31849,11 @@ var ts;
return types[0];
}
var id = getTypeListId(types);
- var type = unionTypes[id];
+ var type = unionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(types, /*excludeKinds*/ 6144 /* Nullable */);
- type = unionTypes[id] = createType(65536 /* Union */ | propagatedFlags);
+ type = createType(65536 /* Union */ | propagatedFlags);
+ unionTypes.set(id, type);
type.types = types;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -29438,15 +31874,27 @@ var ts;
else if (type.flags & 1 /* Any */) {
typeSet.containsAny = true;
}
+ else if (getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type)) {
+ typeSet.containsEmptyObject = true;
+ }
else if (!(type.flags & 8192 /* Never */) && (strictNullChecks || !(type.flags & 6144 /* Nullable */)) && !ts.contains(typeSet, type)) {
- typeSet.push(type);
+ if (type.flags & 32768 /* Object */) {
+ typeSet.containsObjectType = true;
+ }
+ if (type.flags & 65536 /* Union */ && typeSet.unionIndex === undefined) {
+ typeSet.unionIndex = typeSet.length;
+ }
+ if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */ &&
+ type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */) && containsIdenticalType(typeSet, type))) {
+ typeSet.push(type);
+ }
}
}
// Add the given types to the given type set. Order is preserved, duplicates are removed,
// and nested types of the given kind are flattened into the set.
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var type = types_9[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -29464,31 +31912,31 @@ var ts;
if (types.length === 0) {
return emptyObjectType;
}
- var _loop_2 = function (i) {
- var type_1 = types[i];
- if (type_1.flags & 65536 /* Union */) {
- return { value: getUnionType(ts.map(type_1.types, function (t) { return getIntersectionType(ts.replaceElement(types, i, t)); }),
- /*subtypeReduction*/ false, aliasSymbol, aliasTypeArguments) };
- }
- };
- for (var i = 0; i < types.length; i++) {
- var state_2 = _loop_2(i);
- if (typeof state_2 === "object")
- return state_2.value;
- }
var typeSet = [];
addTypesToIntersection(typeSet, types);
if (typeSet.containsAny) {
return anyType;
}
+ if (typeSet.containsEmptyObject && !typeSet.containsObjectType) {
+ typeSet.push(emptyObjectType);
+ }
if (typeSet.length === 1) {
return typeSet[0];
}
+ var unionIndex = typeSet.unionIndex;
+ if (unionIndex !== undefined) {
+ // We are attempting to construct a type of the form X & (A | B) & Y. Transform this into a type of
+ // the form X & A & Y | X & B & Y and recursively reduce until no union type constituents remain.
+ var unionType = typeSet[unionIndex];
+ return getUnionType(ts.map(unionType.types, function (t) { return getIntersectionType(ts.replaceElement(typeSet, unionIndex, t)); }),
+ /*subtypeReduction*/ false, aliasSymbol, aliasTypeArguments);
+ }
var id = getTypeListId(typeSet);
- var type = intersectionTypes[id];
+ var type = intersectionTypes.get(id);
if (!type) {
var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, /*excludeKinds*/ 6144 /* Nullable */);
- type = intersectionTypes[id] = createType(131072 /* Intersection */ | propagatedFlags);
+ type = createType(131072 /* Intersection */ | propagatedFlags);
+ intersectionTypes.set(id, type);
type.types = typeSet;
type.aliasSymbol = aliasSymbol;
type.aliasTypeArguments = aliasTypeArguments;
@@ -29502,7 +31950,7 @@ var ts;
}
return links.resolvedType;
}
- function getIndexTypeForTypeParameter(type) {
+ function getIndexTypeForGenericType(type) {
if (!type.resolvedIndexType) {
type.resolvedIndexType = createType(262144 /* Index */);
type.resolvedIndexType.type = type;
@@ -29518,7 +31966,7 @@ var ts;
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
}
function getIndexType(type) {
- return type.flags & 16384 /* TypeParameter */ ? getIndexTypeForTypeParameter(type) :
+ return maybeTypeOfKind(type, 540672 /* TypeVariable */) ? getIndexTypeForGenericType(type) :
getObjectFlags(type) & 32 /* Mapped */ ? getConstraintTypeFromMappedType(type) :
type.flags & 1 /* Any */ || getIndexInfoOfType(type, 0 /* String */) ? stringType :
getLiteralTypeFromPropertyNames(type);
@@ -29541,7 +31989,7 @@ var ts;
return type;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
- var accessExpression = accessNode && accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined;
var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ?
indexType.text :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
@@ -29570,14 +32018,14 @@ var ts;
getIndexInfoOfType(objectType, 0 /* String */) ||
undefined;
if (indexInfo) {
- if (accessExpression && ts.isAssignmentTarget(accessExpression) && indexInfo.isReadonly) {
+ if (accessExpression && indexInfo.isReadonly && (ts.isAssignmentTarget(accessExpression) || ts.isDeleteTarget(accessExpression))) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
return unknownType;
}
return indexInfo.type;
}
if (accessExpression && !isConstEnumObjectType(objectType)) {
- if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
+ if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors) {
if (getIndexTypeOfType(objectType, 1 /* Number */)) {
error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
}
@@ -29589,7 +32037,7 @@ var ts;
}
}
if (accessNode) {
- var indexNode = accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType;
+ var indexNode = accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.indexType;
if (indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */)) {
error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, indexType.text, typeToString(objectType));
}
@@ -29599,32 +32047,32 @@ var ts;
else {
error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
}
+ return unknownType;
}
- return unknownType;
+ return anyType;
}
function getIndexedAccessForMappedType(type, indexType, accessNode) {
- var accessExpression = accessNode && accessNode.kind === 178 /* ElementAccessExpression */ ? accessNode : undefined;
+ var accessExpression = accessNode && accessNode.kind === 179 /* ElementAccessExpression */ ? accessNode : undefined;
if (accessExpression && ts.isAssignmentTarget(accessExpression) && type.declaration.readonlyToken) {
error(accessExpression, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(type));
return unknownType;
}
- var mapper = createUnaryTypeMapper(getTypeParameterFromMappedType(type), indexType);
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(type)], [indexType]);
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, mapper) : mapper;
- return addOptionality(instantiateType(getTemplateTypeFromMappedType(type), templateMapper), !!type.declaration.questionToken);
+ return instantiateType(getTemplateTypeFromMappedType(type), templateMapper);
}
function getIndexedAccessType(objectType, indexType, accessNode) {
- if (indexType.flags & 16384 /* TypeParameter */ ||
- objectType.flags & 16384 /* TypeParameter */ && indexType.flags & 262144 /* Index */ ||
+ // If the index type is generic, if the object type is generic and doesn't originate in an expression,
+ // or if the object type is a mapped type with a generic constraint, we are performing a higher-order
+ // index access where we cannot meaningfully access the properties of the object type. Note that for a
+ // generic T and a non-generic K, we eagerly resolve T[K] if it originates in an expression. This is to
+ // preserve backwards compatibility. For example, an element access 'this["foo"]' has always been resolved
+ // eagerly using the constraint type of 'this' at the given location.
+ if (maybeTypeOfKind(indexType, 540672 /* TypeVariable */ | 262144 /* Index */) ||
+ maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && !(accessNode && accessNode.kind === 179 /* ElementAccessExpression */) ||
isGenericMappedType(objectType)) {
- // If either the object type or the index type are type parameters, or if the object type is a mapped
- // type with a generic constraint, we are performing a higher-order index access where we cannot
- // meaningfully access the properties of the object type. In those cases, we first check that the
- // index type is assignable to 'keyof T' for the object type.
- if (accessNode) {
- if (!isTypeAssignableTo(indexType, getIndexType(objectType))) {
- error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
- return unknownType;
- }
+ if (objectType.flags & 1 /* Any */) {
+ return objectType;
}
// If the object type is a mapped type { [P in K]: E }, we instantiate E using a mapper that substitutes
// the index type for P. For example, for an index access { [P in K]: Box<T[P]> }[X], we construct the
@@ -29634,8 +32082,13 @@ var ts;
}
// Otherwise we defer the operation by creating an indexed access type.
var id = objectType.id + "," + indexType.id;
- return indexedAccessTypes[id] || (indexedAccessTypes[id] = createIndexedAccessType(objectType, indexType));
+ var type = indexedAccessTypes.get(id);
+ if (!type) {
+ indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType));
+ }
+ return type;
}
+ // In the following we resolve T[K] to the type of the property in T selected by K.
var apparentObjectType = getApparentType(objectType);
if (indexType.flags & 65536 /* Union */ && !(indexType.flags & 8190 /* Primitive */)) {
var propTypes = [];
@@ -29677,7 +32130,7 @@ var ts;
if (!links.resolvedType) {
// Deferred resolution of members is handled by resolveObjectTypeMembers
var aliasSymbol = getAliasSymbolForTypeNode(node);
- if (ts.isEmpty(node.symbol.members) && !aliasSymbol) {
+ if (node.symbol.members.size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {
@@ -29690,7 +32143,7 @@ var ts;
return links.resolvedType;
}
function getAliasSymbolForTypeNode(node) {
- return node.parent.kind === 228 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined;
+ return node.parent.kind === 230 /* TypeAliasDeclaration */ ? getSymbolOfNode(node.parent) : undefined;
}
function getAliasTypeArgumentsForTypeNode(node) {
var symbol = getAliasSymbolForTypeNode(node);
@@ -29701,11 +32154,27 @@ var ts;
* this function should be called in a left folding style, with left = previous result of getSpreadType
* and right = the new element to be spread.
*/
- function getSpreadType(left, right, isFromObjectLiteral) {
- ts.Debug.assert(!!(left.flags & (32768 /* Object */ | 1 /* Any */)) && !!(right.flags & (32768 /* Object */ | 1 /* Any */)), "Only object types may be spread.");
+ function getSpreadType(left, right) {
if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) {
return anyType;
}
+ left = filterType(left, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (left.flags & 8192 /* Never */) {
+ return right;
+ }
+ right = filterType(right, function (t) { return !(t.flags & 6144 /* Nullable */); });
+ if (right.flags & 8192 /* Never */) {
+ return left;
+ }
+ if (left.flags & 65536 /* Union */) {
+ return mapType(left, function (t) { return getSpreadType(t, right); });
+ }
+ if (right.flags & 65536 /* Union */) {
+ return mapType(right, function (t) { return getSpreadType(left, t); });
+ }
+ if (right.flags & 16777216 /* NonPrimitive */) {
+ return emptyObjectType;
+ }
var members = ts.createMap();
var skippedPrivateMembers = ts.createMap();
var stringIndexInfo;
@@ -29722,42 +32191,55 @@ var ts;
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
// we approximate own properties as non-methods plus methods that are inside the object literal
- var isOwnProperty = !(rightProp.flags & 8192 /* Method */) || isFromObjectLiteral;
var isSetterWithoutGetter = rightProp.flags & 65536 /* SetAccessor */ && !(rightProp.flags & 32768 /* GetAccessor */);
if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
- skippedPrivateMembers[rightProp.name] = true;
+ skippedPrivateMembers.set(rightProp.name, true);
}
- else if (isOwnProperty && !isSetterWithoutGetter) {
- members[rightProp.name] = rightProp;
+ else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
+ members.set(rightProp.name, getNonReadonlySymbol(rightProp));
}
}
for (var _b = 0, _c = getPropertiesOfType(left); _b < _c.length; _b++) {
var leftProp = _c[_b];
if (leftProp.flags & 65536 /* SetAccessor */ && !(leftProp.flags & 32768 /* GetAccessor */)
- || leftProp.name in skippedPrivateMembers) {
+ || skippedPrivateMembers.has(leftProp.name)
+ || isClassMethod(leftProp)) {
continue;
}
- if (leftProp.name in members) {
- var rightProp = members[leftProp.name];
+ if (members.has(leftProp.name)) {
+ var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 536870912 /* Optional */) {
+ if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 67108864 /* Optional */) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
- var flags = 4 /* Property */ | 67108864 /* Transient */ | (leftProp.flags & 536870912 /* Optional */);
+ var flags = 4 /* Property */ | (leftProp.flags & 67108864 /* Optional */);
var result = createSymbol(flags, leftProp.name);
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 131072 /* NEUndefined */)]);
result.leftSpread = leftProp;
result.rightSpread = rightProp;
result.declarations = declarations;
- result.isReadonly = isReadonlySymbol(leftProp) || isReadonlySymbol(rightProp);
- members[leftProp.name] = result;
+ members.set(leftProp.name, result);
}
}
else {
- members[leftProp.name] = leftProp;
+ members.set(leftProp.name, getNonReadonlySymbol(leftProp));
}
}
return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
}
+ function getNonReadonlySymbol(prop) {
+ if (!isReadonlySymbol(prop)) {
+ return prop;
+ }
+ var flags = 4 /* Property */ | (prop.flags & 67108864 /* Optional */);
+ var result = createSymbol(flags, prop.name);
+ result.type = getTypeOfSymbol(prop);
+ result.declarations = prop.declarations;
+ result.syntheticOrigin = prop;
+ return result;
+ }
+ function isClassMethod(prop) {
+ return prop.flags & 8192 /* Method */ && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
+ }
function createLiteralType(flags, text) {
var type = createType(flags);
type.text = text;
@@ -29779,7 +32261,11 @@ var ts;
}
function getLiteralTypeForText(flags, text) {
var map = flags & 32 /* StringLiteral */ ? stringLiteralTypes : numericLiteralTypes;
- return map[text] || (map[text] = createLiteralType(flags, text));
+ var type = map.get(text);
+ if (!type) {
+ map.set(text, type = createLiteralType(flags, text));
+ }
+ return type;
}
function getTypeFromLiteralTypeNode(node) {
var links = getNodeLinks(node);
@@ -29807,9 +32293,9 @@ var ts;
function getThisType(node) {
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
var parent = container && container.parent;
- if (parent && (ts.isClassLike(parent) || parent.kind === 227 /* InterfaceDeclaration */)) {
+ if (parent && (ts.isClassLike(parent) || parent.kind === 229 /* InterfaceDeclaration */)) {
if (!(ts.getModifierFlags(container) & 32 /* Static */) &&
- (container.kind !== 150 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) {
+ (container.kind !== 151 /* Constructor */ || ts.isNodeDescendantOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@@ -29826,87 +32312,84 @@ var ts;
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 118 /* AnyKeyword */:
- case 263 /* JSDocAllType */:
- case 264 /* JSDocUnknownType */:
+ case 267 /* JSDocAllType */:
+ case 268 /* JSDocUnknownType */:
return anyType;
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
return stringType;
case 132 /* NumberKeyword */:
return numberType;
case 121 /* BooleanKeyword */:
return booleanType;
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
return esSymbolType;
case 104 /* VoidKeyword */:
return voidType;
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
return undefinedType;
case 94 /* NullKeyword */:
return nullType;
case 129 /* NeverKeyword */:
return neverType;
- case 289 /* JSDocNullKeyword */:
- return nullType;
- case 290 /* JSDocUndefinedKeyword */:
- return undefinedType;
- case 291 /* JSDocNeverKeyword */:
- return neverType;
- case 167 /* ThisType */:
+ case 133 /* ObjectKeyword */:
+ return nonPrimitiveType;
+ case 168 /* ThisType */:
case 98 /* ThisKeyword */:
return getTypeFromThisTypeNode(node);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return getTypeFromLiteralTypeNode(node);
- case 288 /* JSDocLiteralType */:
+ case 292 /* JSDocLiteralType */:
return getTypeFromLiteralTypeNode(node.literal);
- case 157 /* TypeReference */:
- case 272 /* JSDocTypeReference */:
+ case 158 /* TypeReference */:
+ case 276 /* JSDocTypeReference */:
return getTypeFromTypeReference(node);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return booleanType;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return getTypeFromTypeReference(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return getTypeFromTypeQueryNode(node);
- case 162 /* ArrayType */:
- case 265 /* JSDocArrayType */:
+ case 163 /* ArrayType */:
+ case 269 /* JSDocArrayType */:
return getTypeFromArrayTypeNode(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return getTypeFromTupleTypeNode(node);
- case 164 /* UnionType */:
- case 266 /* JSDocUnionType */:
+ case 165 /* UnionType */:
+ case 270 /* JSDocUnionType */:
return getTypeFromUnionTypeNode(node);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return getTypeFromIntersectionTypeNode(node);
- case 166 /* ParenthesizedType */:
- case 268 /* JSDocNullableType */:
- case 269 /* JSDocNonNullableType */:
- case 276 /* JSDocConstructorType */:
- case 277 /* JSDocThisType */:
- case 273 /* JSDocOptionalType */:
+ case 272 /* JSDocNullableType */:
+ return getTypeFromJSDocNullableTypeNode(node);
+ case 167 /* ParenthesizedType */:
+ case 273 /* JSDocNonNullableType */:
+ case 280 /* JSDocConstructorType */:
+ case 281 /* JSDocThisType */:
+ case 277 /* JSDocOptionalType */:
return getTypeFromTypeNode(node.type);
- case 270 /* JSDocRecordType */:
+ case 274 /* JSDocRecordType */:
return getTypeFromTypeNode(node.literal);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 161 /* TypeLiteral */:
- case 287 /* JSDocTypeLiteral */:
- case 274 /* JSDocFunctionType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 162 /* TypeLiteral */:
+ case 291 /* JSDocTypeLiteral */:
+ case 278 /* JSDocFunctionType */:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return getTypeFromTypeOperatorNode(node);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return getTypeFromIndexedAccessTypeNode(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return getTypeFromMappedTypeNode(node);
// This function assumes that an identifier or qualified name is a type expression
// Callers should first ensure this by calling isTypeNode
case 70 /* Identifier */:
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
var symbol = getSymbolAtLocation(node);
return symbol && getDeclaredTypeOfSymbol(symbol);
- case 267 /* JSDocTupleType */:
+ case 271 /* JSDocTupleType */:
return getTypeFromJSDocTupleType(node);
- case 275 /* JSDocVariadicType */:
+ case 279 /* JSDocVariadicType */:
return getTypeFromJSDocVariadicType(node);
default:
return unknownType;
@@ -29933,13 +32416,13 @@ var ts;
var instantiations = mapper.instantiations || (mapper.instantiations = []);
return instantiations[type.id] || (instantiations[type.id] = instantiator(type, mapper));
}
- function createUnaryTypeMapper(source, target) {
+ function makeUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
}
- function createBinaryTypeMapper(source1, target1, source2, target2) {
+ function makeBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
}
- function createArrayTypeMapper(sources, targets) {
+ function makeArrayTypeMapper(sources, targets) {
return function (t) {
for (var i = 0; i < sources.length; i++) {
if (t === sources[i]) {
@@ -29950,15 +32433,23 @@ var ts;
};
}
function createTypeMapper(sources, targets) {
- var count = sources.length;
- var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
- count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
- createArrayTypeMapper(sources, targets);
+ var mapper = sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) :
+ sources.length === 2 ? makeBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) :
+ makeArrayTypeMapper(sources, targets);
mapper.mappedTypes = sources;
return mapper;
}
function createTypeEraser(sources) {
- return createTypeMapper(sources, undefined);
+ return createTypeMapper(sources, /*targets*/ undefined);
+ }
+ /**
+ * Maps forward-references to later types parameters to the empty object type.
+ * This is used during inference when instantiating type parameter defaults.
+ */
+ function createBackreferenceMapper(typeParameters, index) {
+ var mapper = function (t) { return ts.indexOf(typeParameters, t) >= index ? emptyObjectType : t; };
+ mapper.mappedTypes = typeParameters;
+ return mapper;
}
function getInferenceMapper(context) {
if (!context.mapper) {
@@ -29983,7 +32474,12 @@ var ts;
}
function combineTypeMappers(mapper1, mapper2) {
var mapper = function (t) { return instantiateType(mapper1(t), mapper2); };
- mapper.mappedTypes = mapper1.mappedTypes;
+ mapper.mappedTypes = ts.concatenate(mapper1.mappedTypes, mapper2.mappedTypes);
+ return mapper;
+ }
+ function createReplacementMapper(source, target, baseMapper) {
+ var mapper = function (t) { return t === source ? target : baseMapper(t); };
+ mapper.mappedTypes = baseMapper.mappedTypes;
return mapper;
}
function cloneTypeParameter(typeParameter) {
@@ -30031,7 +32527,7 @@ var ts;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (symbol.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(symbol) & 1 /* Instantiated */) {
var links = getSymbolLinks(symbol);
// If symbol being instantiated is itself a instantiation, fetch the original target and combine the
// type mappers. This ensures that original type identities are properly preserved and that aliases
@@ -30041,7 +32537,8 @@ var ts;
}
// Keep the flags from the symbol we're instantiating. Mark that is instantiated, and
// also transient so that we can just store data on it directly.
- var result = createSymbol(16777216 /* Instantiated */ | 67108864 /* Transient */ | symbol.flags, symbol.name);
+ var result = createSymbol(symbol.flags, symbol.name);
+ result.checkFlags = 1 /* Instantiated */;
result.declarations = symbol.declarations;
result.parent = symbol.parent;
result.target = symbol;
@@ -30060,25 +32557,24 @@ var ts;
return result;
}
function instantiateMappedType(type, mapper) {
- // Check if we have an isomorphic mapped type, i.e. a type of the form { [P in keyof T]: X } for some
- // type parameter T. If so, the mapped type is distributive over a union type and when T is instantiated
+ // Check if we have a homomorphic mapped type, i.e. a type of the form { [P in keyof T]: X } for some
+ // type variable T. If so, the mapped type is distributive over a union type and when T is instantiated
// to a union type A | B, we produce { [P in keyof A]: X } | { [P in keyof B]: X }. Furthermore, for
- // isomorphic mapped types we leave primitive types alone. For example, when T is instantiated to a
+ // homomorphic mapped types we leave primitive types alone. For example, when T is instantiated to a
// union type A | undefined, we produce { [P in keyof A]: X } | undefined.
var constraintType = getConstraintTypeFromMappedType(type);
if (constraintType.flags & 262144 /* Index */) {
- var typeParameter_1 = constraintType.type;
- var mappedTypeParameter = mapper(typeParameter_1);
- if (typeParameter_1 !== mappedTypeParameter) {
- return mapType(mappedTypeParameter, function (t) {
- if (isMappableType(t)) {
- var replacementMapper = createUnaryTypeMapper(typeParameter_1, t);
- var combinedMapper = mapper.mappedTypes && mapper.mappedTypes.length === 1 ? replacementMapper : combineTypeMappers(replacementMapper, mapper);
- combinedMapper.mappedTypes = mapper.mappedTypes;
- return instantiateMappedObjectType(type, combinedMapper);
- }
- return t;
- });
+ var typeVariable_1 = constraintType.type;
+ if (typeVariable_1.flags & 16384 /* TypeParameter */) {
+ var mappedTypeVariable = instantiateType(typeVariable_1, mapper);
+ if (typeVariable_1 !== mappedTypeVariable) {
+ return mapType(mappedTypeVariable, function (t) {
+ if (isMappableType(t)) {
+ return instantiateMappedObjectType(type, createReplacementMapper(typeVariable_1, t, mapper));
+ }
+ return t;
+ });
+ }
}
}
return instantiateMappedObjectType(type, mapper);
@@ -30102,26 +32598,28 @@ var ts;
// Starting with the parent of the symbol's declaration, check if the mapper maps any of
// the type parameters introduced by enclosing declarations. We just pick the first
// declaration since multiple declarations will all have the same parent anyway.
- var node = symbol.declarations[0].parent;
- while (node) {
+ return !!ts.findAncestor(symbol.declarations[0], function (node) {
+ if (node.kind === 232 /* ModuleDeclaration */ || node.kind === 264 /* SourceFile */) {
+ return "quit";
+ }
switch (node.kind) {
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
var declaration = node;
if (declaration.typeParameters) {
for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
@@ -30131,25 +32629,34 @@ var ts;
}
}
}
- if (ts.isClassLike(node) || node.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isClassLike(node) || node.kind === 229 /* InterfaceDeclaration */) {
var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
if (thisType && ts.contains(mappedTypes, thisType)) {
return true;
}
}
break;
- case 230 /* ModuleDeclaration */:
- case 261 /* SourceFile */:
- return false;
+ case 171 /* MappedType */:
+ if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)))) {
+ return true;
+ }
+ break;
+ case 278 /* JSDocFunctionType */:
+ var func = node;
+ for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
+ var p = _c[_b];
+ if (ts.contains(mappedTypes, getTypeOfNode(p))) {
+ return true;
+ }
+ }
+ break;
}
- node = node.parent;
- }
- return false;
+ });
}
function isTopLevelTypeAlias(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var parentKind = symbol.declarations[0].parent.kind;
- return parentKind === 261 /* SourceFile */ || parentKind === 231 /* ModuleBlock */;
+ return parentKind === 264 /* SourceFile */ || parentKind === 233 /* ModuleBlock */;
}
return false;
}
@@ -30226,28 +32733,36 @@ var ts;
// Returns true if the given expression contains (at any level of nesting) a function or arrow expression
// that is subject to contextual typing.
function isContextSensitive(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return ts.forEach(node.properties, isContextSensitive);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return ts.forEach(node.elements, isContextSensitive);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isContextSensitive(node.whenTrue) ||
isContextSensitive(node.whenFalse);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return node.operatorToken.kind === 53 /* BarBarToken */ &&
(isContextSensitive(node.left) || isContextSensitive(node.right));
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return isContextSensitive(node.initializer);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return isContextSensitiveFunctionLikeDeclaration(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return isContextSensitive(node.expression);
+ case 253 /* JsxAttributes */:
+ return ts.forEach(node.properties, isContextSensitive);
+ case 252 /* JsxAttribute */:
+ // If there is no initializer, JSX attribute has a boolean value of true which is not context sensitive.
+ return node.initializer && isContextSensitive(node.initializer);
+ case 255 /* JsxExpression */:
+ // It is possible to that node.expression is undefined (e.g <div x={} />)
+ return node.expression && isContextSensitive(node.expression);
}
return false;
}
@@ -30261,7 +32776,7 @@ var ts;
return true;
}
// For arrow functions we now know we're not context sensitive.
- if (node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 186 /* ArrowFunction */) {
return false;
}
// If the first parameter is not an explicit 'this' parameter, then the function has
@@ -30283,9 +32798,12 @@ var ts;
result.properties = resolved.properties;
result.callSignatures = emptyArray;
result.constructSignatures = emptyArray;
- type = result;
+ return result;
}
}
+ else if (type.flags & 131072 /* Intersection */) {
+ return getIntersectionType(ts.map(type.types, getTypeWithoutSignatures));
+ }
return type;
}
// TYPE CHECKING
@@ -30308,7 +32826,7 @@ var ts;
// subtype of T but not structurally identical to T. This specifically means that two distinct but
// structurally identical types (such as two classes) are not considered instances of each other.
function isTypeInstanceOf(source, target) {
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
}
/**
* This is *not* a bi-directional relationship.
@@ -30334,12 +32852,13 @@ var ts;
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
}
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
- return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */;
+ return compareSignaturesRelated(source, target, /*checkAsCallback*/ false, ignoreReturnTypes, /*reportErrors*/ false,
+ /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */;
}
/**
* See signatureRelatedTo, compareSignaturesIdentical
*/
- function compareSignaturesRelated(source, target, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
+ function compareSignaturesRelated(source, target, checkAsCallback, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) {
// TODO (drosen): De-duplicate code between related functions.
if (source === target) {
return -1 /* True */;
@@ -30374,9 +32893,23 @@ var ts;
var sourceParams = source.parameters;
var targetParams = target.parameters;
for (var i = 0; i < checkCount; i++) {
- var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
- var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
- var related = compareTypes(s, t, /*reportErrors*/ false) || compareTypes(t, s, reportErrors);
+ var sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source);
+ var targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target);
+ var sourceSig = getSingleCallSignature(getNonNullableType(sourceType));
+ var targetSig = getSingleCallSignature(getNonNullableType(targetType));
+ // In order to ensure that any generic type Foo<T> is at least co-variant with respect to T no matter
+ // how Foo uses T, we need to relate parameters bi-variantly (given that parameters are input positions,
+ // they naturally relate only contra-variantly). However, if the source and target parameters both have
+ // function types with a single call signature, we known we are relating two callback parameters. In
+ // that case it is sufficient to only relate the parameters of the signatures co-variantly because,
+ // similar to return values, callback parameters are output positions. This means that a Promise<T>,
+ // where T is used only in callback parameter positions, will be co-variant (as opposed to bi-variant)
+ // with respect to T.
+ var callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate &&
+ (getFalsyFlags(sourceType) & 6144 /* Nullable */) === (getFalsyFlags(targetType) & 6144 /* Nullable */);
+ var related = callbacks ?
+ compareSignaturesRelated(targetSig, sourceSig, /*checkAsCallback*/ true, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, compareTypes) :
+ !checkAsCallback && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors);
if (!related) {
if (reportErrors) {
errorReporter(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, sourceParams[i < sourceMax ? i : sourceMax].name, targetParams[i < targetMax ? i : targetMax].name);
@@ -30404,7 +32937,11 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ // When relating callback signatures, we still need to relate return types bi-variantly as otherwise
+ // the containing type wouldn't be co-variant. For example, interface Foo<T> { add(cb: () => T): void }
+ // wouldn't be co-variant for T without this rule.
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, /*reportErrors*/ false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -30471,18 +33008,33 @@ var ts;
sourceNonRestParamCount;
}
}
+ function isEmptyResolvedType(t) {
+ return t.properties.length === 0 &&
+ t.callSignatures.length === 0 &&
+ t.constructSignatures.length === 0 &&
+ !t.stringIndexInfo &&
+ !t.numberIndexInfo;
+ }
+ function isEmptyObjectType(type) {
+ return type.flags & 32768 /* Object */ ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
+ type.flags & 65536 /* Union */ ? ts.forEach(type.types, isEmptyObjectType) :
+ type.flags & 131072 /* Intersection */ ? !ts.forEach(type.types, function (t) { return !isEmptyObjectType(t); }) :
+ false;
+ }
function isEnumTypeRelatedTo(source, target, errorReporter) {
if (source === target) {
return true;
}
var id = source.id + "," + target.id;
- if (enumRelation[id] !== undefined) {
- return enumRelation[id];
+ var relation = enumRelation.get(id);
+ if (relation !== undefined) {
+ return relation;
}
if (source.symbol.name !== target.symbol.name ||
!(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */) ||
(source.flags & 65536 /* Union */) !== (target.flags & 65536 /* Union */)) {
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
var targetEnumType = getTypeOfSymbol(target.symbol);
for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
@@ -30493,11 +33045,13 @@ var ts;
if (errorReporter) {
errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
}
- return enumRelation[id] = false;
+ enumRelation.set(id, false);
+ return false;
}
}
}
- return enumRelation[id] = true;
+ enumRelation.set(id, true);
+ return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
if (target.flags & 8192 /* Never */)
@@ -30518,6 +33072,8 @@ var ts;
return true;
if (source.flags & 4096 /* Null */ && (!strictNullChecks || target.flags & 4096 /* Null */))
return true;
+ if (source.flags & 32768 /* Object */ && target.flags & 16777216 /* NonPrimitive */)
+ return true;
if (relation === assignableRelation || relation === comparableRelation) {
if (source.flags & 1 /* Any */)
return true;
@@ -30549,13 +33105,13 @@ var ts;
}
if (source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */) {
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
return related === 1 /* Succeeded */;
}
}
- if (source.flags & 507904 /* StructuredOrTypeParameter */ || target.flags & 507904 /* StructuredOrTypeParameter */) {
- return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined);
+ if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ return checkTypeRelatedTo(source, target, relation, /*errorNode*/ undefined);
}
return false;
}
@@ -30619,14 +33175,35 @@ var ts;
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
- (getGlobalESSymbolType() === source && esSymbolType === target)) {
+ (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) {
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
- // Compare two types and return
- // Ternary.True if they are related with no assumptions,
- // Ternary.Maybe if they are related with assumptions of other relationships, or
- // Ternary.False if they are not related.
+ function isUnionOrIntersectionTypeWithoutNullableConstituents(type) {
+ if (!(type.flags & 196608 /* UnionOrIntersection */)) {
+ return false;
+ }
+ // at this point we know that this is union or intersection type possibly with nullable constituents.
+ // check if we still will have compound type if we ignore nullable components.
+ var seenNonNullable = false;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (t.flags & 6144 /* Nullable */) {
+ continue;
+ }
+ if (seenNonNullable) {
+ return true;
+ }
+ seenNonNullable = true;
+ }
+ return false;
+ }
+ /**
+ * Compare two types and return
+ * * Ternary.True if they are related with no assumptions,
+ * * Ternary.Maybe if they are related with assumptions of other relationships, or
+ * * Ternary.False if they are not related.
+ */
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
if (source.flags & 96 /* StringOrNumberLiteral */ && source.flags & 1048576 /* FreshLiteral */) {
@@ -30654,7 +33231,7 @@ var ts;
// and intersection types are further deconstructed on the target side, we don't want to
// make the check again (as it might fail for a partial target type). Therefore we obtain
// the regular source type and proceed with that.
- if (target.flags & 196608 /* UnionOrIntersection */) {
+ if (isUnionOrIntersectionTypeWithoutNullableConstituents(target)) {
source = getRegularTypeOfObjectLiteral(source);
}
}
@@ -30673,122 +33250,37 @@ var ts;
return result;
}
}
- else if (target.flags & 65536 /* Union */) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
- return result;
- }
- }
- else if (target.flags & 131072 /* Intersection */) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
- }
- else if (source.flags & 131072 /* Intersection */) {
- // Check to see if any constituents of the intersection are immediately related to the target.
- //
- // Don't report errors though. Checking whether a constituent is related to the source is not actually
- // useful and leads to some confusing error messages. Instead it is better to let the below checks
- // take care of this, or to not elaborate at all. For instance,
- //
- // - For an object type (such as 'C = A & B'), users are usually more interested in structural errors.
- //
- // - For a union type (such as '(A | B) = (C & D)'), it's better to hold onto the whole intersection
- // than to report that 'D' is not assignable to 'A' or 'B'.
- //
- // - For a primitive type or type parameter (such as 'number = A & B') there is no point in
- // breaking the intersection apart.
- if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) {
- return result;
- }
- }
- if (target.flags & 16384 /* TypeParameter */) {
- // A source type { [P in keyof T]: X } is related to a target type T if X is related to T[P].
- if (getObjectFlags(source) & 32 /* Mapped */ && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
- if (!source.declaration.questionToken) {
- var templateType = getTemplateTypeFromMappedType(source);
- var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
- if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
- return result;
- }
- }
- }
- else {
- // Given a type parameter K with a constraint keyof T, a type S is
- // assignable to K if S is assignable to keyof T.
- var constraint = getConstraintOfTypeParameter(target);
- if (constraint && constraint.flags & 262144 /* Index */) {
- if (result = isRelatedTo(source, constraint, reportErrors)) {
- return result;
- }
- }
- }
- }
- else if (target.flags & 262144 /* Index */) {
- // A keyof S is related to a keyof T if T is related to S.
- if (source.flags & 262144 /* Index */) {
- if (result = isRelatedTo(target.type, source.type, /*reportErrors*/ false)) {
- return result;
- }
- }
- // Given a type parameter T with a constraint C, a type S is assignable to
- // keyof T if S is assignable to keyof C.
- var constraint = getConstraintOfTypeParameter(target.type);
- if (constraint) {
- if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
- return result;
- }
- }
- }
- else if (target.flags & 524288 /* IndexedAccess */) {
- // if we have indexed access types with identical index types, see if relationship holds for
- // the two object types.
- if (source.flags & 524288 /* IndexedAccess */ && source.indexType === target.indexType) {
- if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
- return result;
- }
- }
- }
- if (source.flags & 16384 /* TypeParameter */) {
- // A source type T is related to a target type { [P in keyof T]: X } if T[P] is related to X.
- if (getObjectFlags(target) & 32 /* Mapped */ && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
- var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
- var templateType = getTemplateTypeFromMappedType(target);
- if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ else {
+ if (target.flags & 65536 /* Union */) {
+ if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
return result;
}
}
- else {
- var constraint = getConstraintOfTypeParameter(source);
- if (!constraint || constraint.flags & 1 /* Any */) {
- constraint = emptyObjectType;
- }
- // The constraint may need to be further instantiated with its 'this' type.
- constraint = getTypeWithThisArgument(constraint, source);
- // Report constraint errors only if the constraint is not the empty object type
- var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
- if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
- errorInfo = saveErrorInfo;
+ else if (target.flags & 131072 /* Intersection */) {
+ if (result = typeRelatedToEachType(source, target, reportErrors)) {
return result;
}
}
- }
- else {
- if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
- // We have type references to same target type, see if relationship holds for all type arguments
- if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ else if (source.flags & 131072 /* Intersection */) {
+ // Check to see if any constituents of the intersection are immediately related to the target.
+ //
+ // Don't report errors though. Checking whether a constituent is related to the source is not actually
+ // useful and leads to some confusing error messages. Instead it is better to let the below checks
+ // take care of this, or to not elaborate at all. For instance,
+ //
+ // - For an object type (such as 'C = A & B'), users are usually more interested in structural errors.
+ //
+ // - For a union type (such as '(A | B) = (C & D)'), it's better to hold onto the whole intersection
+ // than to report that 'D' is not assignable to 'A' or 'B'.
+ //
+ // - For a primitive type or type parameter (such as 'number = A & B') there is no point in
+ // breaking the intersection apart.
+ if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) {
return result;
}
}
- // Even if relationship doesn't hold for unions, intersections, or generic type references,
- // it may hold in a structural comparison.
- var apparentSource = getApparentType(source);
- // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates
- // to X. Failing both of those we want to check if the aggregation of A and B's members structurally
- // relates to X. Thus, we include intersection types on the source side here.
- if (apparentSource.flags & (32768 /* Object */ | 131072 /* Intersection */) && target.flags & 32768 /* Object */) {
- // Report structural errors only if we haven't reported any errors yet
- var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190 /* Primitive */);
- if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) {
+ if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
return result;
}
@@ -30808,13 +33300,7 @@ var ts;
function isIdenticalTo(source, target) {
var result;
if (source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */) {
- if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
- // We have type references to same target type, see if all type arguments are identical
- if (result = typeArgumentsRelatedTo(source, target, /*reportErrors*/ false)) {
- return result;
- }
- }
- return objectTypeRelatedTo(source, source, target, /*reportErrors*/ false);
+ return recursiveTypeRelatedTo(source, target, /*reportErrors*/ false);
}
if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ ||
source.flags & 131072 /* Intersection */ && target.flags & 131072 /* Intersection */) {
@@ -30830,45 +33316,49 @@ var ts;
// is considered known if the object type is empty and the check is for assignability, if the object type has
// index signatures, or if the property is actually declared in the object type. In a union or intersection
// type, a property is considered known if it is known in any constituent type.
- function isKnownProperty(type, name) {
+ function isKnownProperty(type, name, isComparingJsxAttributes) {
if (type.flags & 32768 /* Object */) {
var resolved = resolveStructuredTypeMembers(type);
- if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
- resolved.stringIndexInfo ||
- (resolved.numberIndexInfo && isNumericLiteralName(name)) ||
- getPropertyOfType(type, name)) {
+ if (resolved.stringIndexInfo || resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfType(type, name) || isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ // For JSXAttributes, if the attribute has a hyphenated name, consider that the attribute to be known.
return true;
}
}
else if (type.flags & 196608 /* UnionOrIntersection */) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- if (isKnownProperty(t, name)) {
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
return true;
}
}
}
return false;
}
- function isEmptyObjectType(t) {
- return t.properties.length === 0 &&
- t.callSignatures.length === 0 &&
- t.constructSignatures.length === 0 &&
- !t.stringIndexInfo &&
- !t.numberIndexInfo;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768 /* Object */) && !(getObjectFlags(target) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
+ if ((relation === assignableRelation || relation === comparableRelation) &&
+ (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
+ return false;
+ }
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!isKnownProperty(target, prop.name)) {
+ if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
// We know *exactly* where things went wrong when comparing the types.
// Use this property as the error node as this will be more helpful in
// reasoning about what went wrong.
ts.Debug.assert(!!errorNode);
- errorNode = prop.valueDeclaration;
- reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ if (ts.isJsxAttributes(errorNode)) {
+ // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal.
+ // However, using an object-literal error message will be very confusing to the users so we give different a message.
+ reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
+ }
+ else {
+ errorNode = prop.valueDeclaration;
+ reportError(ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
+ }
}
return true;
}
@@ -30894,20 +33384,42 @@ var ts;
if (target.flags & 65536 /* Union */ && containsType(targetTypes, source)) {
return -1 /* True */;
}
- var len = targetTypes.length;
- for (var i = 0; i < len; i++) {
- var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
+ for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
+ var type = targetTypes_1[_i];
+ var related = isRelatedTo(source, type, /*reportErrors*/ false);
if (related) {
return related;
}
}
+ if (reportErrors) {
+ var discriminantType = findMatchingDiscriminantType(source, target);
+ isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], /*reportErrors*/ true);
+ }
return 0 /* False */;
}
+ function findMatchingDiscriminantType(source, target) {
+ var sourceProperties = getPropertiesOfObjectType(source);
+ if (sourceProperties) {
+ for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
+ var sourceProperty = sourceProperties_1[_i];
+ if (isDiscriminantProperty(target, sourceProperty.name)) {
+ var sourceType = getTypeOfSymbol(sourceProperty);
+ for (var _a = 0, _b = target.types; _a < _b.length; _a++) {
+ var type = _b[_a];
+ var targetType = getTypeOfPropertyOfType(type, sourceProperty.name);
+ if (targetType && isRelatedTo(sourceType, targetType)) {
+ return type;
+ }
+ }
+ }
+ }
+ }
+ }
function typeRelatedToEachType(source, target, reportErrors) {
var result = -1 /* True */;
var targetTypes = target.types;
- for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
- var targetType = targetTypes_1[_i];
+ for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
+ var targetType = targetTypes_2[_i];
var related = isRelatedTo(source, targetType, reportErrors);
if (!related) {
return 0 /* False */;
@@ -30960,22 +33472,22 @@ var ts;
}
return result;
}
- // Determine if two object types are related by structure. First, check if the result is already available in the global cache.
+ // Determine if possibly recursive types are related. First, check if the result is already available in the global cache.
// Second, check if we have already started a comparison of the given two types in which case we assume the result to be true.
// Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
// and issue an error. Otherwise, actually compare the structure of the two types.
- function objectTypeRelatedTo(source, originalSource, target, reportErrors) {
+ function recursiveTypeRelatedTo(source, target, reportErrors) {
if (overflow) {
return 0 /* False */;
}
var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
- var related = relation[id];
+ var related = relation.get(id);
if (related !== undefined) {
if (reportErrors && related === 2 /* Failed */) {
// We are elaborating errors and the cached result is an unreported failure. Record the result as a reported
// failure and continue computing the relation such that errors get reported.
- relation[id] = 3 /* FailedAndReported */;
+ relation.set(id, 3 /* FailedAndReported */);
}
else {
return related === 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
@@ -30984,7 +33496,7 @@ var ts;
if (depth > 0) {
for (var i = 0; i < depth; i++) {
// If source and target are already being compared, consider them related with assumptions
- if (maybeStack[i][id]) {
+ if (maybeStack[i].get(id)) {
return 1 /* Maybe */;
}
}
@@ -31002,75 +33514,192 @@ var ts;
sourceStack[depth] = source;
targetStack[depth] = target;
maybeStack[depth] = ts.createMap();
- maybeStack[depth][id] = 1 /* Succeeded */;
+ maybeStack[depth].set(id, 1 /* Succeeded */);
depth++;
var saveExpandingFlags = expandingFlags;
- if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth))
+ if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
expandingFlags |= 1;
- if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth))
+ if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
expandingFlags |= 2;
- var result;
- if (expandingFlags === 3) {
- result = 1 /* Maybe */;
- }
- else if (isGenericMappedType(source) || isGenericMappedType(target)) {
- result = mappedTypeRelatedTo(source, target, reportErrors);
- }
- else {
- result = propertiesRelatedTo(source, target, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 0 /* Call */, reportErrors);
- if (result) {
- result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportErrors);
- if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 0 /* String */, reportErrors);
- if (result) {
- result &= indexTypesRelatedTo(source, originalSource, target, 1 /* Number */, reportErrors);
- }
- }
- }
- }
- }
+ var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors) : 1 /* Maybe */;
expandingFlags = saveExpandingFlags;
depth--;
if (result) {
var maybeCache = maybeStack[depth];
// If result is definitely true, copy assumptions to global cache, else copy to next level up
var destinationCache = (result === -1 /* True */ || depth === 0) ? relation : maybeStack[depth - 1];
- ts.copyProperties(maybeCache, destinationCache);
+ ts.copyEntries(maybeCache, destinationCache);
}
else {
// A false result goes straight into global cache (when something is false under assumptions it
// will also be false without assumptions)
- relation[id] = reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */;
+ relation.set(id, reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */);
}
return result;
}
- // A type [P in S]: X is related to a type [P in T]: Y if T is related to S and X is related to Y.
- function mappedTypeRelatedTo(source, target, reportErrors) {
- if (isGenericMappedType(target)) {
- if (isGenericMappedType(source)) {
- var result_2;
- if (relation === identityRelation) {
- var readonlyMatches = !source.declaration.readonlyToken === !target.declaration.readonlyToken;
- var optionalMatches = !source.declaration.questionToken === !target.declaration.questionToken;
- if (readonlyMatches && optionalMatches) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getErasedTemplateTypeFromMappedType(source), getErasedTemplateTypeFromMappedType(target), reportErrors);
- }
+ function structuredTypeRelatedTo(source, target, reportErrors) {
+ var result;
+ var saveErrorInfo = errorInfo;
+ if (target.flags & 16384 /* TypeParameter */) {
+ // A source type { [P in keyof T]: X } is related to a target type T if X is related to T[P].
+ if (getObjectFlags(source) & 32 /* Mapped */ && getConstraintTypeFromMappedType(source) === getIndexType(target)) {
+ if (!source.declaration.questionToken) {
+ var templateType = getTemplateTypeFromMappedType(source);
+ var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
+ if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+ return result;
}
}
+ }
+ }
+ else if (target.flags & 262144 /* Index */) {
+ // A keyof S is related to a keyof T if T is related to S.
+ if (source.flags & 262144 /* Index */) {
+ if (result = isRelatedTo(target.type, source.type, /*reportErrors*/ false)) {
+ return result;
+ }
+ }
+ // A type S is assignable to keyof T if S is assignable to keyof C, where C is the
+ // constraint of T.
+ var constraint = getConstraintOfType(target.type);
+ if (constraint) {
+ if (result = isRelatedTo(source, getIndexType(constraint), reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else if (target.flags & 524288 /* IndexedAccess */) {
+ // A type S is related to a type T[K] if S is related to A[K], where K is string-like and
+ // A is the apparent type of S.
+ var constraint = getConstraintOfType(target);
+ if (constraint) {
+ if (result = isRelatedTo(source, constraint, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ if (source.flags & 16384 /* TypeParameter */) {
+ // A source type T is related to a target type { [P in keyof T]: X } if T[P] is related to X.
+ if (getObjectFlags(target) & 32 /* Mapped */ && getConstraintTypeFromMappedType(target) === getIndexType(source)) {
+ var indexedAccessType = getIndexedAccessType(source, getTypeParameterFromMappedType(target));
+ var templateType = getTemplateTypeFromMappedType(target);
+ if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else {
+ var constraint = getConstraintOfTypeParameter(source);
+ // A type parameter with no constraint is not related to the non-primitive object type.
+ if (constraint || !(target.flags & 16777216 /* NonPrimitive */)) {
+ if (!constraint || constraint.flags & 1 /* Any */) {
+ constraint = emptyObjectType;
+ }
+ // The constraint may need to be further instantiated with its 'this' type.
+ constraint = getTypeWithThisArgument(constraint, source);
+ // Report constraint errors only if the constraint is not the empty object type
+ var reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
+ if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ }
+ }
+ else if (source.flags & 524288 /* IndexedAccess */) {
+ // A type S[K] is related to a type T if A[K] is related to T, where K is string-like and
+ // A is the apparent type of S.
+ var constraint = getConstraintOfType(source);
+ if (constraint) {
+ if (result = isRelatedTo(constraint, target, reportErrors)) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
+ }
+ else if (target.flags & 524288 /* IndexedAccess */ && source.indexType === target.indexType) {
+ // if we have indexed access types with identical index types, see if relationship holds for
+ // the two object types.
+ if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
+ return result;
+ }
+ }
+ }
+ else {
+ if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
+ // We have type references to same target type, see if relationship holds for all type arguments
+ if (result = typeArgumentsRelatedTo(source, target, reportErrors)) {
+ return result;
+ }
+ }
+ // Even if relationship doesn't hold for unions, intersections, or generic type references,
+ // it may hold in a structural comparison.
+ var sourceIsPrimitive = !!(source.flags & 8190 /* Primitive */);
+ if (relation !== identityRelation) {
+ source = getApparentType(source);
+ }
+ // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates
+ // to X. Failing both of those we want to check if the aggregation of A and B's members structurally
+ // relates to X. Thus, we include intersection types on the source side here.
+ if (source.flags & (32768 /* Object */ | 131072 /* Intersection */) && target.flags & 32768 /* Object */) {
+ // Report structural errors only if we haven't reported any errors yet
+ var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive;
+ if (isGenericMappedType(source) || isGenericMappedType(target)) {
+ result = mappedTypeRelatedTo(source, target, reportStructuralErrors);
+ }
else {
- if (relation === comparableRelation || !source.declaration.questionToken || target.declaration.questionToken) {
- if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
- return result_2 & isRelatedTo(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target), reportErrors);
+ result = propertiesRelatedTo(source, target, reportStructuralErrors);
+ if (result) {
+ result &= signaturesRelatedTo(source, target, 0 /* Call */, reportStructuralErrors);
+ if (result) {
+ result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 0 /* String */, sourceIsPrimitive, reportStructuralErrors);
+ if (result) {
+ result &= indexTypesRelatedTo(source, target, 1 /* Number */, sourceIsPrimitive, reportStructuralErrors);
+ }
+ }
}
}
}
+ if (result) {
+ errorInfo = saveErrorInfo;
+ return result;
+ }
}
}
- else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(target))) {
- return -1 /* True */;
+ return 0 /* False */;
+ }
+ // A type [P in S]: X is related to a type [Q in T]: Y if T is related to S and X' is
+ // related to Y, where X' is an instantiation of X in which P is replaced with Q. Notice
+ // that S and T are contra-variant whereas X and Y are co-variant.
+ function mappedTypeRelatedTo(source, target, reportErrors) {
+ if (isGenericMappedType(target)) {
+ if (isGenericMappedType(source)) {
+ var sourceReadonly = !!source.declaration.readonlyToken;
+ var sourceOptional = !!source.declaration.questionToken;
+ var targetReadonly = !!target.declaration.readonlyToken;
+ var targetOptional = !!target.declaration.questionToken;
+ var modifiersRelated = relation === identityRelation ?
+ sourceReadonly === targetReadonly && sourceOptional === targetOptional :
+ relation === comparableRelation || !sourceOptional || targetOptional;
+ if (modifiersRelated) {
+ var result_2;
+ if (result_2 = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) {
+ var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
+ return result_2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
+ }
+ }
+ }
+ else if (target.declaration.questionToken && isEmptyObjectType(source)) {
+ return -1 /* True */;
+ }
+ }
+ else if (relation !== identityRelation) {
+ var resolved = resolveStructuredTypeMembers(target);
+ if (isEmptyResolvedType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & 1 /* Any */) {
+ return -1 /* True */;
+ }
}
return 0 /* False */;
}
@@ -31081,22 +33710,28 @@ var ts;
var result = -1 /* True */;
var properties = getPropertiesOfObjectType(target);
var requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & 128 /* ObjectLiteral */);
- for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) {
- var targetProp = properties_3[_i];
+ for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
+ var targetProp = properties_4[_i];
var sourceProp = getPropertyOfType(source, targetProp.name);
if (sourceProp !== targetProp) {
if (!sourceProp) {
- if (!(targetProp.flags & 536870912 /* Optional */) || requireOptionalProperties) {
+ if (!(targetProp.flags & 67108864 /* Optional */) || requireOptionalProperties) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
}
return 0 /* False */;
}
}
- else if (!(targetProp.flags & 134217728 /* Prototype */)) {
+ else if (!(targetProp.flags & 16777216 /* Prototype */)) {
var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) {
+ if (getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
+ }
+ return 0 /* False */;
+ }
if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
if (reportErrors) {
if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) {
@@ -31110,12 +33745,9 @@ var ts;
}
}
else if (targetPropFlags & 16 /* Protected */) {
- var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32 /* Class */;
- var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined;
- var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp));
- if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
+ if (!isValidOverrideOf(sourceProp, targetProp)) {
if (reportErrors) {
- reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
+ reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source), typeToString(getDeclaringClass(targetProp) || target));
}
return 0 /* False */;
}
@@ -31135,7 +33767,7 @@ var ts;
}
result &= related;
// When checking for comparability, be more lenient with optional properties.
- if (relation !== comparableRelation && sourceProp.flags & 536870912 /* Optional */ && !(targetProp.flags & 536870912 /* Optional */)) {
+ if (relation !== comparableRelation && sourceProp.flags & 67108864 /* Optional */ && !(targetProp.flags & 67108864 /* Optional */)) {
// TypeScript 1.0 spec (April 2014): 3.8.3
// S is a subtype of a type T, and T is a supertype of S if ...
// S' and T are object types and, for each member M in T..
@@ -31163,8 +33795,8 @@ var ts;
return 0 /* False */;
}
var result = -1 /* True */;
- for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
- var sourceProp = sourceProperties_1[_i];
+ for (var _i = 0, sourceProperties_2 = sourceProperties; _i < sourceProperties_2.length; _i++) {
+ var sourceProp = sourceProperties_2[_i];
var targetProp = getPropertyOfObjectType(target, sourceProp.name);
if (!targetProp) {
return 0 /* False */;
@@ -31228,7 +33860,7 @@ var ts;
* See signatureAssignableTo, compareSignaturesIdentical
*/
function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
+ return compareSignaturesRelated(source, target, /*checkAsCallback*/ false, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -31237,7 +33869,7 @@ var ts;
return 0 /* False */;
}
var result = -1 /* True */;
- for (var i = 0, len = sourceSignatures.length; i < len; i++) {
+ for (var i = 0; i < sourceSignatures.length; i++) {
var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, isRelatedTo);
if (!related) {
return 0 /* False */;
@@ -31270,12 +33902,12 @@ var ts;
}
return related;
}
- function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) {
+ function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors) {
if (relation === identityRelation) {
return indexTypesIdenticalTo(source, target, kind);
}
var targetInfo = getIndexInfoOfType(target, kind);
- if (!targetInfo || ((targetInfo.type.flags & 1 /* Any */) && !(originalSource.flags & 8190 /* Primitive */))) {
+ if (!targetInfo || targetInfo.type.flags & 1 /* Any */ && !sourceIsPrimitive) {
// Index signature of type any permits assignment from everything but primitives
return -1 /* True */;
}
@@ -31337,6 +33969,45 @@ var ts;
return false;
}
}
+ // Invoke the callback for each underlying property symbol of the given symbol and return the first
+ // value that isn't undefined.
+ function forEachProperty(prop, callback) {
+ if (getCheckFlags(prop) & 6 /* Synthetic */) {
+ for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ var p = getPropertyOfType(t, prop.name);
+ var result = p && forEachProperty(p, callback);
+ if (result) {
+ return result;
+ }
+ }
+ return undefined;
+ }
+ return callback(prop);
+ }
+ // Return the declaring class type of a property or undefined if property not declared in class
+ function getDeclaringClass(prop) {
+ return prop.parent && prop.parent.flags & 32 /* Class */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;
+ }
+ // Return true if some underlying source property is declared in a class that derives
+ // from the given base class.
+ function isPropertyInClassDerivedFrom(prop, baseClass) {
+ return forEachProperty(prop, function (sp) {
+ var sourceClass = getDeclaringClass(sp);
+ return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
+ });
+ }
+ // Return true if source property is a valid override of protected parts of target property.
+ function isValidOverrideOf(sourceProp, targetProp) {
+ return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ?
+ !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
+ }
+ // Return true if the given class derives from each of the declaring classes of the protected
+ // constituents of the given property.
+ function isClassDerivedFromDeclaringClasses(checkClass, prop) {
+ return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 /* Protected */ ?
+ !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
+ }
// Return true if the given type is the constructor type for an abstract class
function isAbstractConstructorType(type) {
if (getObjectFlags(type) & 16 /* Anonymous */) {
@@ -31350,22 +34021,24 @@ var ts;
}
return false;
}
- // Return true if the given type is part of a deeply nested chain of generic instantiations. We consider this to be the case
- // when structural type comparisons have been started for 10 or more instantiations of the same generic type. It is possible,
- // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely expanding.
- // Effectively, we will generate a false positive when two types are structurally equal to at least 10 levels, but unequal at
- // some level beyond that.
- function isDeeplyNestedGeneric(type, stack, depth) {
- // We track type references (created by createTypeReference) and instantiated types (created by instantiateType)
- if (getObjectFlags(type) & (4 /* Reference */ | 64 /* Instantiated */) && depth >= 5) {
+ // Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
+ // for 5 or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
+ // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
+ // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least 5
+ // levels, but unequal at some level beyond that.
+ function isDeeplyNestedType(type, stack, depth) {
+ // We track all object types that have an associated symbol (representing the origin of the type)
+ if (depth >= 5 && type.flags & 32768 /* Object */) {
var symbol = type.symbol;
- var count = 0;
- for (var i = 0; i < depth; i++) {
- var t = stack[i];
- if (getObjectFlags(t) & (4 /* Reference */ | 64 /* Instantiated */) && t.symbol === symbol) {
- count++;
- if (count >= 5)
- return true;
+ if (symbol) {
+ var count = 0;
+ for (var i = 0; i < depth; i++) {
+ var t = stack[i];
+ if (t.flags & 32768 /* Object */ && t.symbol === symbol) {
+ count++;
+ if (count >= 5)
+ return true;
+ }
}
}
}
@@ -31392,7 +34065,7 @@ var ts;
}
}
else {
- if ((sourceProp.flags & 536870912 /* Optional */) !== (targetProp.flags & 536870912 /* Optional */)) {
+ if ((sourceProp.flags & 67108864 /* Optional */) !== (targetProp.flags & 67108864 /* Optional */)) {
return 0 /* False */;
}
}
@@ -31436,7 +34109,7 @@ var ts;
// the constraints with a common set of type arguments to get relatable entities in places where
// type parameters occur in the constraints. The complexity of doing that doesn't seem worthwhile,
// particularly as we're comparing erased versions of the signatures below.
- if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
+ if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) {
return 0 /* False */;
}
// Spec 1.0 Section 3.8.3 & 3.8.4:
@@ -31476,8 +34149,8 @@ var ts;
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
function isSupertypeOfEach(candidate, types) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
if (candidate !== t && !isTypeSubtypeOf(t, candidate))
return false;
}
@@ -31485,8 +34158,8 @@ var ts;
}
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var t = types_8[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -31592,8 +34265,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var t = types_9[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -31625,7 +34298,7 @@ var ts;
types.push(undefinedType);
if (flags & 4096 /* Null */)
types.push(nullType);
- return getUnionType(types, /*subtypeReduction*/ true);
+ return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 /* DefinitelyFalsy */ ?
@@ -31644,8 +34317,8 @@ var ts;
getSignaturesOfType(type, 0 /* Call */).length === 0 &&
getSignaturesOfType(type, 1 /* Construct */).length === 0;
}
- function createTransientSymbol(source, type) {
- var symbol = createSymbol(source.flags | 67108864 /* Transient */, source.name);
+ function createSymbolWithType(source, type) {
+ var symbol = createSymbol(source.flags, source.name);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;
@@ -31661,9 +34334,8 @@ var ts;
var property = _a[_i];
var original = getTypeOfSymbol(property);
var updated = f(original);
- members[property.name] = updated === original ? property : createTransientSymbol(property, updated);
+ members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
}
- ;
return members;
}
/**
@@ -31687,11 +34359,19 @@ var ts;
type.regularType = regularNew;
return regularNew;
}
+ function getWidenedProperty(prop) {
+ var original = getTypeOfSymbol(prop);
+ var widened = getWidenedType(original);
+ return widened === original ? prop : createSymbolWithType(prop, widened);
+ }
function getWidenedTypeOfObjectLiteral(type) {
- var members = transformTypeOfMembers(type, function (prop) {
- var widened = getWidenedType(prop);
- return prop === widened ? prop : widened;
- });
+ var members = ts.createMap();
+ for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ // Since get accessors already widen their return value there is no need to
+ // widen accessor based properties here.
+ members.set(prop.name, prop.flags & 4 /* Property */ ? getWidenedProperty(prop) : prop);
+ }
var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */);
var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */);
return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
@@ -31763,25 +34443,25 @@ var ts;
var typeAsString = typeToString(getWidenedType(type));
var diagnostic;
switch (declaration.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
diagnostic = declaration.dotDotDotToken ?
ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
break;
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
if (!declaration.name) {
error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
return;
@@ -31794,7 +34474,7 @@ var ts;
error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
- if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
+ if (produceDiagnostics && noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
// Report implicit any error within type if possible, otherwise report error on declaration
if (!reportWideningErrorsInType(type)) {
reportImplicitAnyError(declaration, type);
@@ -31821,13 +34501,14 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes) {
+ function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
return {
signature: signature,
inferUnionTypes: inferUnionTypes,
inferences: inferences,
inferredTypes: new Array(signature.typeParameters.length),
+ useAnyForNoInferences: useAnyForNoInferences
};
}
function createTypeInferencesObject() {
@@ -31841,25 +34522,73 @@ var ts;
// Return true if the given type could possibly reference a type parameter for which
// we perform type inference (i.e. a type parameter of a generic function). We cache
// results for union and intersection types for performance reasons.
- function couldContainTypeParameters(type) {
+ function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
- return !!(type.flags & 16384 /* TypeParameter */ ||
- objectFlags & 4 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
+ return !!(type.flags & 540672 /* TypeVariable */ ||
+ objectFlags & 4 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) ||
objectFlags & 32 /* Mapped */ ||
- type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeParameters(type));
+ type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeVariables(type));
}
- function couldUnionOrIntersectionContainTypeParameters(type) {
- if (type.couldContainTypeParameters === undefined) {
- type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters);
+ function couldUnionOrIntersectionContainTypeVariables(type) {
+ if (type.couldContainTypeVariables === undefined) {
+ type.couldContainTypeVariables = ts.forEach(type.types, couldContainTypeVariables);
}
- return type.couldContainTypeParameters;
+ return type.couldContainTypeVariables;
}
function isTypeParameterAtTopLevel(type, typeParameter) {
return type === typeParameter || type.flags & 196608 /* UnionOrIntersection */ && ts.forEach(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); });
}
- function inferTypes(context, originalSource, originalTarget) {
- var typeParameters = context.signature.typeParameters;
+ // Infer a suitable input type for a homomorphic mapped type { [P in keyof T]: X }. We construct
+ // an object type with the same set of properties as the source type, where the type of each
+ // property is computed by inferring from the source property type to X for the type
+ // variable T[P] (i.e. we treat the type T[P] as the type variable we're inferring for).
+ function inferTypeForHomomorphicMappedType(source, target) {
+ var properties = getPropertiesOfType(source);
+ var indexInfo = getIndexInfoOfType(source, 0 /* String */);
+ if (properties.length === 0 && !indexInfo) {
+ return undefined;
+ }
+ var typeVariable = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var typeVariableArray = [typeVariable];
+ var typeInferences = createTypeInferencesObject();
+ var typeInferencesArray = [typeInferences];
+ var templateType = getTemplateTypeFromMappedType(target);
+ var readonlyMask = target.declaration.readonlyToken ? false : true;
+ var optionalMask = target.declaration.questionToken ? 0 : 67108864 /* Optional */;
+ var members = createSymbolTable(properties);
+ for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
+ var prop = properties_5[_i];
+ var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
+ if (!inferredPropType) {
+ return undefined;
+ }
+ var inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.name);
+ inferredProp.checkFlags = readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0;
+ inferredProp.declarations = prop.declarations;
+ inferredProp.type = inferredPropType;
+ members.set(prop.name, inferredProp);
+ }
+ if (indexInfo) {
+ var inferredIndexType = inferTargetType(indexInfo.type);
+ if (!inferredIndexType) {
+ return undefined;
+ }
+ indexInfo = createIndexInfo(inferredIndexType, readonlyMask && indexInfo.isReadonly);
+ }
+ return createAnonymousType(undefined, members, emptyArray, emptyArray, indexInfo, undefined);
+ function inferTargetType(sourceType) {
+ typeInferences.primary = undefined;
+ typeInferences.secondary = undefined;
+ inferTypes(typeVariableArray, typeInferencesArray, sourceType, templateType);
+ var inferences = typeInferences.primary || typeInferences.secondary;
+ return inferences && getUnionType(inferences, /*subtypeReduction*/ true);
+ }
+ }
+ function inferTypesWithContext(context, originalSource, originalTarget) {
+ inferTypes(context.signature.typeParameters, context.inferences, originalSource, originalTarget);
+ }
+ function inferTypes(typeVariables, typeInferences, originalSource, originalTarget) {
var sourceStack;
var targetStack;
var depth = 0;
@@ -31875,7 +34604,7 @@ var ts;
return false;
}
function inferFromTypes(source, target) {
- if (!couldContainTypeParameters(target)) {
+ if (!couldContainTypeVariables(target)) {
return;
}
if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
@@ -31927,7 +34656,7 @@ var ts;
target = removeTypesFromUnionOrIntersection(target, matchingTypes);
}
}
- if (target.flags & 16384 /* TypeParameter */) {
+ if (target.flags & 540672 /* TypeVariable */) {
// If target is a type parameter, make an inference, unless the source type contains
// the anyFunctionType (the wildcard type that's used to avoid contextually typing functions).
// Because the anyFunctionType is internal, it should not be exposed to the user by adding
@@ -31937,9 +34666,9 @@ var ts;
if (source.flags & 8388608 /* ContainsAnyFunctionType */) {
return;
}
- for (var i = 0; i < typeParameters.length; i++) {
- if (target === typeParameters[i]) {
- var inferences = context.inferences[i];
+ for (var i = 0; i < typeVariables.length; i++) {
+ if (target === typeVariables[i]) {
+ var inferences = typeInferences[i];
if (!inferences.isFixed) {
// Any inferences that are made to a type parameter in a union type are inferior
// to inferences made to a flat (non-union) type. This is because if we infer to
@@ -31953,7 +34682,7 @@ var ts;
if (!ts.contains(candidates, source)) {
candidates.push(source);
}
- if (!isTypeParameterAtTopLevel(originalTarget, target)) {
+ if (target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
inferences.topLevel = false;
}
}
@@ -31972,25 +34701,25 @@ var ts;
}
else if (target.flags & 196608 /* UnionOrIntersection */) {
var targetTypes = target.types;
- var typeParameterCount = 0;
- var typeParameter = void 0;
- // First infer to each type in union or intersection that isn't a type parameter
- for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) {
- var t = targetTypes_2[_d];
- if (t.flags & 16384 /* TypeParameter */ && ts.contains(typeParameters, t)) {
- typeParameter = t;
- typeParameterCount++;
+ var typeVariableCount = 0;
+ var typeVariable = void 0;
+ // First infer to each type in union or intersection that isn't a type variable
+ for (var _d = 0, targetTypes_3 = targetTypes; _d < targetTypes_3.length; _d++) {
+ var t = targetTypes_3[_d];
+ if (t.flags & 540672 /* TypeVariable */ && ts.contains(typeVariables, t)) {
+ typeVariable = t;
+ typeVariableCount++;
}
else {
inferFromTypes(source, t);
}
}
- // Next, if target containings a single naked type parameter, make a secondary inference to that type
- // parameter. This gives meaningful results for union types in co-variant positions and intersection
+ // Next, if target containings a single naked type variable, make a secondary inference to that type
+ // variable. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
- if (typeParameterCount === 1) {
+ if (typeVariableCount === 1) {
inferiority++;
- inferFromTypes(source, typeParameter);
+ inferFromTypes(source, typeVariable);
inferiority--;
}
}
@@ -32008,14 +34737,14 @@ var ts;
if (isInProcess(source, target)) {
return;
}
- if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) {
+ if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
return;
}
var key = source.id + "," + target.id;
- if (visited[key]) {
+ if (visited.get(key)) {
return;
}
- visited[key] = true;
+ visited.set(key, true);
if (depth === 0) {
sourceStack = [];
targetStack = [];
@@ -32031,12 +34760,25 @@ var ts;
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32 /* Mapped */) {
var constraintType = getConstraintTypeFromMappedType(target);
- if (getObjectFlags(source) & 32 /* Mapped */) {
- inferFromTypes(getConstraintTypeFromMappedType(source), constraintType);
- inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));
+ if (constraintType.flags & 262144 /* Index */) {
+ // We're inferring from some source type S to a homomorphic mapped type { [P in keyof T]: X },
+ // where T is a type variable. Use inferTypeForHomomorphicMappedType to infer a suitable source
+ // type and then make a secondary inference from that type to T. We make a secondary inference
+ // such that direct inferences to T get priority over inferences to Partial<T>, for example.
+ var index = ts.indexOf(typeVariables, constraintType.type);
+ if (index >= 0 && !typeInferences[index].isFixed) {
+ var inferredType = inferTypeForHomomorphicMappedType(source, target);
+ if (inferredType) {
+ inferiority++;
+ inferFromTypes(inferredType, typeVariables[index]);
+ inferiority--;
+ }
+ }
return;
}
if (constraintType.flags & 16384 /* TypeParameter */) {
+ // We're inferring from some source type S to a mapped type { [P in T]: X }, where T is a type
+ // parameter. Infer from 'keyof S' to T and infer from a union of each property type in S to X.
inferFromTypes(getIndexType(source), constraintType);
inferFromTypes(getUnionType(ts.map(getPropertiesOfType(source), getTypeOfSymbol)), getTemplateTypeFromMappedType(target));
return;
@@ -32049,8 +34791,8 @@ var ts;
}
function inferFromProperties(source, target) {
var properties = getPropertiesOfObjectType(target);
- for (var _i = 0, properties_4 = properties; _i < properties_4.length; _i++) {
- var targetProp = properties_4[_i];
+ for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) {
+ var targetProp = properties_6[_i];
var sourceProp = getPropertyOfObjectType(source, targetProp.name);
if (sourceProp) {
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
@@ -32100,8 +34842,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
- var t = types_10[_i];
+ for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+ var t = types_13[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -32151,11 +34893,20 @@ var ts;
inferenceSucceeded = !!unionOrSuperType;
}
else {
- // Infer the empty object type when no inferences were made. It is important to remember that
- // in this case, inference still succeeds, meaning there is no error for not having inference
- // candidates. An inference error only occurs when there are *conflicting* candidates, i.e.
+ // Infer either the default or the empty object type when no inferences were
+ // made. It is important to remember that in this case, inference still
+ // succeeds, meaning there is no error for not having inference candidates. An
+ // inference error only occurs when there are *conflicting* candidates, i.e.
// candidates with no common supertype.
- inferredType = emptyObjectType;
+ var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ if (defaultType) {
+ // Instantiate the default type. Any forward reference to a type
+ // parameter should be instantiated to the empty object type.
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ }
+ else {
+ inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ }
inferenceSucceeded = true;
}
context.inferredTypes[index] = inferredType;
@@ -32196,19 +34947,7 @@ var ts;
// TypeScript 1.0 spec (April 2014): 3.6.3
// A type query consists of the keyword typeof followed by an expression.
// The expression is restricted to a single identifier or a sequence of identifiers separated by periods
- while (node) {
- switch (node.kind) {
- case 160 /* TypeQuery */:
- return true;
- case 70 /* Identifier */:
- case 141 /* QualifiedName */:
- node = node.parent;
- continue;
- default:
- return false;
- }
- }
- ts.Debug.fail("should not get here");
+ return !!ts.findAncestor(node, function (n) { return n.kind === 161 /* TypeQuery */ ? true : n.kind === 70 /* Identifier */ || n.kind === 142 /* QualifiedName */ ? false : "quit"; });
}
// Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers
// separated by dots). The key consists of the id of the symbol referenced by the
@@ -32222,7 +34961,7 @@ var ts;
if (node.kind === 98 /* ThisKeyword */) {
return "0";
}
- if (node.kind === 177 /* PropertyAccessExpression */) {
+ if (node.kind === 178 /* PropertyAccessExpression */) {
var key = getFlowCacheKey(node.expression);
return key && key + "." + node.name.text;
}
@@ -32233,7 +34972,7 @@ var ts;
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
return node;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return getLeftmostIdentifierOrThis(node.expression);
}
return undefined;
@@ -32242,19 +34981,21 @@ var ts;
switch (source.kind) {
case 70 /* Identifier */:
return target.kind === 70 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) ||
- (target.kind === 223 /* VariableDeclaration */ || target.kind === 174 /* BindingElement */) &&
+ (target.kind === 225 /* VariableDeclaration */ || target.kind === 175 /* BindingElement */) &&
getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
case 98 /* ThisKeyword */:
return target.kind === 98 /* ThisKeyword */;
- case 177 /* PropertyAccessExpression */:
- return target.kind === 177 /* PropertyAccessExpression */ &&
+ case 96 /* SuperKeyword */:
+ return target.kind === 96 /* SuperKeyword */;
+ case 178 /* PropertyAccessExpression */:
+ return target.kind === 178 /* PropertyAccessExpression */ &&
source.name.text === target.name.text &&
isMatchingReference(source.expression, target.expression);
}
return false;
}
function containsMatchingReference(source, target) {
- while (source.kind === 177 /* PropertyAccessExpression */) {
+ while (source.kind === 178 /* PropertyAccessExpression */) {
source = source.expression;
if (isMatchingReference(source, target)) {
return true;
@@ -32267,7 +35008,7 @@ var ts;
// a possible discriminant if its type differs in the constituents of containing union type, and if every
// choice is a unit type or a union of unit types.
function containsMatchingReferenceDiscriminant(source, target) {
- return target.kind === 177 /* PropertyAccessExpression */ &&
+ return target.kind === 178 /* PropertyAccessExpression */ &&
containsMatchingReference(source, target.expression) &&
isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
}
@@ -32275,7 +35016,7 @@ var ts;
if (expr.kind === 70 /* Identifier */) {
return getTypeOfSymbol(getResolvedSymbol(expr));
}
- if (expr.kind === 177 /* PropertyAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */) {
var type = getDeclaredTypeOfReference(expr.expression);
return type && getTypeOfPropertyOfType(type, expr.name.text);
}
@@ -32284,9 +35025,9 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536 /* Union */) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && prop.flags & 268435456 /* SyntheticProperty */) {
+ if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
if (prop.isDiscriminantProperty === undefined) {
- prop.isDiscriminantProperty = prop.hasNonUniformType && isLiteralType(getTypeOfSymbol(prop));
+ prop.isDiscriminantProperty = prop.checkFlags & 32 /* HasNonUniformType */ && isLiteralType(getTypeOfSymbol(prop));
}
return prop.isDiscriminantProperty;
}
@@ -32305,7 +35046,7 @@ var ts;
}
}
}
- if (callExpression.expression.kind === 177 /* PropertyAccessExpression */ &&
+ if (callExpression.expression.kind === 178 /* PropertyAccessExpression */ &&
isOrContainsMatchingReference(reference, callExpression.expression.expression)) {
return true;
}
@@ -32347,8 +35088,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0 /* None */;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
result |= getTypeFacts(t);
}
return result;
@@ -32358,7 +35099,7 @@ var ts;
// check. This gives us a quicker out in the common case where an object type is not a function.
var resolved = resolveStructuredTypeMembers(type);
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
- resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType));
+ resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
}
function getTypeFacts(type) {
var flags = type.flags;
@@ -32401,9 +35142,11 @@ var ts;
if (flags & 512 /* ESSymbol */) {
return strictNullChecks ? 1981320 /* SymbolStrictFacts */ : 4193160 /* SymbolFacts */;
}
- if (flags & 16384 /* TypeParameter */) {
- var constraint = getConstraintOfTypeParameter(type);
- return getTypeFacts(constraint || emptyObjectType);
+ if (flags & 16777216 /* NonPrimitive */) {
+ return strictNullChecks ? 6166480 /* ObjectStrictFacts */ : 8378320 /* ObjectFacts */;
+ }
+ if (flags & 540672 /* TypeVariable */) {
+ return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
}
if (flags & 196608 /* UnionOrIntersection */) {
return getTypeFactsOfTypes(type.types);
@@ -32429,17 +35172,23 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) ||
+ checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
- return node.parent.kind === 175 /* ArrayLiteralExpression */ || node.parent.kind === 257 /* PropertyAssignment */ ?
+ var isDestructuringDefaultAssignment = node.parent.kind === 176 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) ||
+ node.parent.kind === 260 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent);
+ return isDestructuringDefaultAssignment ?
getTypeWithDefault(getAssignedType(node), node.right) :
getTypeOfExpression(node.right);
}
+ function isDestructuringAssignmentTarget(parent) {
+ return parent.parent.kind === 193 /* BinaryExpression */ && parent.parent.left === parent ||
+ parent.parent.kind === 215 /* ForOfStatement */ && parent.parent.initializer === parent;
+ }
function getAssignedTypeOfArrayLiteralElement(node, element) {
return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element));
}
@@ -32455,21 +35204,21 @@ var ts;
function getAssignedType(node) {
var parent = node.parent;
switch (parent.kind) {
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return stringType;
- case 213 /* ForOfStatement */:
- return checkRightHandSideOfForOf(parent.expression) || unknownType;
- case 192 /* BinaryExpression */:
+ case 215 /* ForOfStatement */:
+ return checkRightHandSideOfForOf(parent.expression, parent.awaitModifier) || unknownType;
+ case 193 /* BinaryExpression */:
return getAssignedTypeOfBinaryExpression(parent);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return undefinedType;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return getAssignedTypeOfArrayLiteralElement(parent, node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return getAssignedTypeOfSpreadExpression(parent);
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return getAssignedTypeOfPropertyAssignment(parent);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return getAssignedTypeOfShorthandPropertyAssignment(parent);
}
return unknownType;
@@ -32477,7 +35226,7 @@ var ts;
function getInitialTypeOfBindingElement(node) {
var pattern = node.parent;
var parentType = getInitialType(pattern.parent);
- var type = pattern.kind === 172 /* ObjectBindingPattern */ ?
+ var type = pattern.kind === 173 /* ObjectBindingPattern */ ?
getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
!node.dotDotDotToken ?
getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) :
@@ -32495,35 +35244,35 @@ var ts;
if (node.initializer) {
return getTypeOfInitializer(node.initializer);
}
- if (node.parent.parent.kind === 212 /* ForInStatement */) {
+ if (node.parent.parent.kind === 214 /* ForInStatement */) {
return stringType;
}
- if (node.parent.parent.kind === 213 /* ForOfStatement */) {
- return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType;
+ if (node.parent.parent.kind === 215 /* ForOfStatement */) {
+ return checkRightHandSideOfForOf(node.parent.parent.expression, node.parent.parent.awaitModifier) || unknownType;
}
return unknownType;
}
function getInitialType(node) {
- return node.kind === 223 /* VariableDeclaration */ ?
+ return node.kind === 225 /* VariableDeclaration */ ?
getInitialTypeOfVariableDeclaration(node) :
getInitialTypeOfBindingElement(node);
}
function getInitialOrAssignedType(node) {
- return node.kind === 223 /* VariableDeclaration */ || node.kind === 174 /* BindingElement */ ?
+ return node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */ ?
getInitialType(node) :
getAssignedType(node);
}
function isEmptyArrayAssignment(node) {
- return node.kind === 223 /* VariableDeclaration */ && node.initializer &&
+ return node.kind === 225 /* VariableDeclaration */ && node.initializer &&
isEmptyArrayLiteral(node.initializer) ||
- node.kind !== 174 /* BindingElement */ && node.parent.kind === 192 /* BinaryExpression */ &&
+ node.kind !== 175 /* BindingElement */ && node.parent.kind === 193 /* BinaryExpression */ &&
isEmptyArrayLiteral(node.parent.right);
}
function getReferenceCandidate(node) {
switch (node.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return getReferenceCandidate(node.expression);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
switch (node.operatorToken.kind) {
case 57 /* EqualsToken */:
return getReferenceCandidate(node.left);
@@ -32535,13 +35284,13 @@ var ts;
}
function getReferenceRoot(node) {
var parent = node.parent;
- return parent.kind === 183 /* ParenthesizedExpression */ ||
- parent.kind === 192 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node ||
- parent.kind === 192 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ?
+ return parent.kind === 184 /* ParenthesizedExpression */ ||
+ parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 57 /* EqualsToken */ && parent.left === node ||
+ parent.kind === 193 /* BinaryExpression */ && parent.operatorToken.kind === 25 /* CommaToken */ && parent.right === node ?
getReferenceRoot(parent) : node;
}
function getTypeOfSwitchClause(clause) {
- if (clause.kind === 253 /* CaseClause */) {
+ if (clause.kind === 256 /* CaseClause */) {
var caseType = getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
return isUnitType(caseType) ? caseType : undefined;
}
@@ -32589,8 +35338,32 @@ var ts;
}
return f(type) ? type : neverType;
}
- function mapType(type, f) {
- return type.flags & 65536 /* Union */ ? getUnionType(ts.map(type.types, f)) : f(type);
+ // Apply a mapping function to a type and return the resulting type. If the source type
+ // is a union type, the mapping function is applied to each constituent type and a union
+ // of the resulting types is returned.
+ function mapType(type, mapper) {
+ if (!(type.flags & 65536 /* Union */)) {
+ return mapper(type);
+ }
+ var types = type.types;
+ var mappedType;
+ var mappedTypes;
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var t = mapper(current);
+ if (t) {
+ if (!mappedType) {
+ mappedType = t;
+ }
+ else if (!mappedTypes) {
+ mappedTypes = [mappedType, t];
+ }
+ else {
+ mappedTypes.push(t);
+ }
+ }
+ }
+ return mappedTypes ? getUnionType(mappedTypes) : mappedType;
}
function extractTypesOfKind(type, kind) {
return filterType(type, function (t) { return (t.flags & kind) !== 0; });
@@ -32634,7 +35407,7 @@ var ts;
// we defer subtype reduction until the evolving array type is finalized into a manifest
// array type.
function addEvolvingArrayElementType(evolvingArrayType, node) {
- var elementType = getBaseTypeOfLiteralType(getTypeOfExpression(node));
+ var elementType = getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node));
return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));
}
function createFinalArrayType(elementType) {
@@ -32656,8 +35429,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var t = types_16[_i];
if (!(t.flags & 8192 /* Never */)) {
if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {
return false;
@@ -32680,11 +35453,11 @@ var ts;
function isEvolvingArrayOperationTarget(node) {
var root = getReferenceRoot(node);
var parent = root.parent;
- var isLengthPushOrUnshift = parent.kind === 177 /* PropertyAccessExpression */ && (parent.name.text === "length" ||
- parent.parent.kind === 179 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name));
- var isElementAssignment = parent.kind === 178 /* ElementAccessExpression */ &&
+ var isLengthPushOrUnshift = parent.kind === 178 /* PropertyAccessExpression */ && (parent.name.text === "length" ||
+ parent.parent.kind === 180 /* CallExpression */ && ts.isPushOrUnshiftIdentifier(parent.name));
+ var isElementAssignment = parent.kind === 179 /* ElementAccessExpression */ &&
parent.expression === root &&
- parent.parent.kind === 192 /* BinaryExpression */ &&
+ parent.parent.kind === 193 /* BinaryExpression */ &&
parent.parent.operatorToken.kind === 57 /* EqualsToken */ &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
@@ -32711,14 +35484,12 @@ var ts;
}
return false;
}
- function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) {
+ function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+ if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 1033215 /* Narrowable */)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431 /* Narrowable */)) {
return declaredType;
}
- var initialType = assumeInitialized ? declaredType :
- declaredType === autoType || declaredType === autoArrayType ? undefinedType :
- includeFalsyTypes(declaredType, 2048 /* Undefined */);
var visitedFlowStart = visitedFlowCount;
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
visitedFlowCount = visitedFlowStart;
@@ -32727,7 +35498,7 @@ var ts;
// on empty arrays are possible without implicit any errors and new element types can be inferred without
// type mismatch errors.
var resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? anyArrayType : finalizeEvolvingArrayType(evolvedType);
- if (reference.parent.kind === 201 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) {
+ if (reference.parent.kind === 202 /* NonNullExpression */ && getTypeWithFacts(resultType, 524288 /* NEUndefinedOrNull */).flags & 8192 /* Never */) {
return declaredType;
}
return resultType;
@@ -32744,7 +35515,19 @@ var ts;
}
}
var type = void 0;
- if (flow.flags & 16 /* Assignment */) {
+ if (flow.flags & 4096 /* AfterFinally */) {
+ // block flow edge: finally -> pre-try (for larger explanation check comment in binder.ts - bindTryStatement
+ flow.locked = true;
+ type = getTypeAtFlowNode(flow.antecedent);
+ flow.locked = false;
+ }
+ else if (flow.flags & 2048 /* PreFinally */) {
+ // locked pre-finally flows are filtered out in getTypeAtFlowBranchLabel
+ // so here just redirect to antecedent
+ flow = flow.antecedent;
+ continue;
+ }
+ else if (flow.flags & 16 /* Assignment */) {
type = getTypeAtFlowAssignment(flow);
if (!type) {
flow = flow.antecedent;
@@ -32776,7 +35559,7 @@ var ts;
else if (flow.flags & 2 /* Start */) {
// Check if we should continue with the control flow of the containing function.
var container = flow.container;
- if (container && container !== flowContainer && reference.kind !== 177 /* PropertyAccessExpression */) {
+ if (container && container !== flowContainer && reference.kind !== 178 /* PropertyAccessExpression */ && reference.kind !== 98 /* ThisKeyword */) {
flow = container.flowNode;
continue;
}
@@ -32830,7 +35613,7 @@ var ts;
}
function getTypeAtFlowArrayMutation(flow) {
var node = flow.node;
- var expr = node.kind === 179 /* CallExpression */ ?
+ var expr = node.kind === 180 /* CallExpression */ ?
node.expression.expression :
node.left.expression;
if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -32838,7 +35621,7 @@ var ts;
var type = getTypeFromFlowType(flowType);
if (getObjectFlags(type) & 256 /* EvolvingArray */) {
var evolvedType_1 = type;
- if (node.kind === 179 /* CallExpression */) {
+ if (node.kind === 180 /* CallExpression */) {
for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
var arg = _a[_i];
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -32897,6 +35680,12 @@ var ts;
var seenIncomplete = false;
for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) {
var antecedent = _a[_i];
+ if (antecedent.flags & 2048 /* PreFinally */ && antecedent.lock.locked) {
+ // if flow correspond to branch from pre-try to finally and this branch is locked - this means that
+ // we initially have started following the flow outside the finally block.
+ // in this case we should ignore this branch.
+ continue;
+ }
var flowType = getTypeAtFlowNode(antecedent);
var type = getTypeFromFlowType(flowType);
// If the type at a particular antecedent path is the declared type and the
@@ -32929,8 +35718,9 @@ var ts;
if (!key) {
key = getFlowCacheKey(reference);
}
- if (cache[key]) {
- return cache[key];
+ var cached = cache.get(key);
+ if (cached) {
+ return cached;
}
// If this flow loop junction and reference are already being processed, return
// the union of the types computed for each branch so far, marked as incomplete.
@@ -32965,8 +35755,9 @@ var ts;
// If we see a value appear in the cache it is a sign that control flow analysis
// was restarted and completed by checkExpressionCached. We can simply pick up
// the resulting type and bail out.
- if (cache[key]) {
- return cache[key];
+ var cached_1 = cache.get(key);
+ if (cached_1) {
+ return cached_1;
}
if (!ts.contains(antecedentTypes, type)) {
antecedentTypes.push(type);
@@ -32990,10 +35781,11 @@ var ts;
if (isIncomplete(firstAntecedentType)) {
return createFlowType(result, /*incomplete*/ true);
}
- return cache[key] = result;
+ cache.set(key, result);
+ return result;
}
function isMatchingReferenceDiscriminant(expr) {
- return expr.kind === 177 /* PropertyAccessExpression */ &&
+ return expr.kind === 178 /* PropertyAccessExpression */ &&
declaredType.flags & 65536 /* Union */ &&
isMatchingReference(reference, expr.expression) &&
isDiscriminantProperty(declaredType, expr.name.text);
@@ -33027,10 +35819,10 @@ var ts;
var operator_1 = expr.operatorToken.kind;
var left_1 = getReferenceCandidate(expr.left);
var right_1 = getReferenceCandidate(expr.right);
- if (left_1.kind === 187 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) {
+ if (left_1.kind === 188 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) {
return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
}
- if (right_1.kind === 187 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) {
+ if (right_1.kind === 188 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) {
return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
}
if (isMatchingReference(reference, left_1)) {
@@ -33076,7 +35868,7 @@ var ts;
assumeTrue ? 16384 /* EQUndefined */ : 131072 /* NEUndefined */;
return getTypeWithFacts(type, facts);
}
- if (type.flags & 33281 /* NotUnionOrUnit */) {
+ if (type.flags & 16810497 /* NotUnionOrUnit */) {
return type;
}
if (assumeTrue) {
@@ -33107,14 +35899,22 @@ var ts;
// We narrow a non-union type to an exact primitive type if the non-union type
// is a supertype of that primitive type. For example, type 'any' can be narrowed
// to one of the primitive types.
- var targetType = typeofTypesByName[literal.text];
- if (targetType && isTypeSubtypeOf(targetType, type)) {
- return targetType;
+ var targetType = typeofTypesByName.get(literal.text);
+ if (targetType) {
+ if (isTypeSubtypeOf(targetType, type)) {
+ return targetType;
+ }
+ if (type.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(type) || anyType;
+ if (isTypeSubtypeOf(targetType, constraint)) {
+ return getIntersectionType([type, targetType]);
+ }
+ }
}
}
var facts = assumeTrue ?
- typeofEQFacts[literal.text] || 64 /* TypeofEQHostObject */ :
- typeofNEFacts[literal.text] || 8192 /* TypeofNEHostObject */;
+ typeofEQFacts.get(literal.text) || 64 /* TypeofEQHostObject */ :
+ typeofNEFacts.get(literal.text) || 8192 /* TypeofNEHostObject */;
return getTypeWithFacts(type, facts);
}
function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) {
@@ -33197,10 +35997,9 @@ var ts;
// Otherwise, if the candidate type is assignable to the target type, narrow to the candidate
// type. Otherwise, the types are completely unrelated, so narrow to an intersection of the
// two types.
- var targetType = type.flags & 16384 /* TypeParameter */ ? getApparentType(type) : type;
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
- isTypeAssignableTo(candidate, targetType) ? candidate :
+ isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
}
function narrowTypeByTypePredicate(type, callExpression, assumeTrue) {
@@ -33229,7 +36028,7 @@ var ts;
}
else {
var invokedExpression = ts.skipParentheses(callExpression.expression);
- if (invokedExpression.kind === 178 /* ElementAccessExpression */ || invokedExpression.kind === 177 /* PropertyAccessExpression */) {
+ if (invokedExpression.kind === 179 /* ElementAccessExpression */ || invokedExpression.kind === 178 /* PropertyAccessExpression */) {
var accessExpression = invokedExpression;
var possibleReference = ts.skipParentheses(accessExpression.expression);
if (isMatchingReference(reference, possibleReference)) {
@@ -33248,15 +36047,16 @@ var ts;
switch (expr.kind) {
case 70 /* Identifier */:
case 98 /* ThisKeyword */:
- case 177 /* PropertyAccessExpression */:
+ case 96 /* SuperKeyword */:
+ case 178 /* PropertyAccessExpression */:
return narrowTypeByTruthiness(type, expr, assumeTrue);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return narrowTypeByTypePredicate(type, expr, assumeTrue);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return narrowType(type, expr.expression, assumeTrue);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
if (expr.operator === 50 /* ExclamationToken */) {
return narrowType(type, expr.operand, !assumeTrue);
}
@@ -33289,15 +36089,12 @@ var ts;
return getTypeOfSymbol(symbol);
}
function getControlFlowContainer(node) {
- while (true) {
- node = node.parent;
- if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
- node.kind === 231 /* ModuleBlock */ ||
- node.kind === 261 /* SourceFile */ ||
- node.kind === 147 /* PropertyDeclaration */) {
- return node;
- }
- }
+ return ts.findAncestor(node.parent, function (node) {
+ return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
+ node.kind === 233 /* ModuleBlock */ ||
+ node.kind === 264 /* SourceFile */ ||
+ node.kind === 148 /* PropertyDeclaration */;
+ });
}
// Check if a parameter is assigned anywhere within its declaring function.
function isParameterAssigned(symbol) {
@@ -33312,21 +36109,13 @@ var ts;
return symbol.isAssigned || false;
}
function hasParentWithAssignmentsMarked(node) {
- while (true) {
- node = node.parent;
- if (!node) {
- return false;
- }
- if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */) {
- return true;
- }
- }
+ return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */); });
}
function markParameterAssignments(node) {
if (node.kind === 70 /* Identifier */) {
if (ts.isAssignmentTarget(node)) {
var symbol = getResolvedSymbol(node);
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 144 /* Parameter */) {
+ if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 145 /* Parameter */) {
symbol.isAssigned = true;
}
}
@@ -33338,6 +36127,15 @@ var ts;
function isConstVariable(symbol) {
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
}
+ /** remove undefined from the annotated type of a parameter when there is an initializer (that doesn't include undefined) */
+ function removeOptionalityFromDeclaredType(declaredType, declaration) {
+ var annotationIncludesUndefined = strictNullChecks &&
+ declaration.kind === 145 /* Parameter */ &&
+ declaration.initializer &&
+ getFalsyFlags(declaredType) & 2048 /* Undefined */ &&
+ !(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */);
+ return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072 /* NEUndefined */) : declaredType;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -33352,16 +36150,14 @@ var ts;
if (symbol === argumentsSymbol) {
var container = ts.getContainingFunction(node);
if (languageVersion < 2 /* ES2015 */) {
- if (container.kind === 185 /* ArrowFunction */) {
+ if (container.kind === 186 /* ArrowFunction */) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
}
else if (ts.hasModifier(container, 256 /* Async */)) {
error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
}
}
- if (node.flags & 524288 /* AwaitContext */) {
- getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
- }
+ getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
return getTypeOfSymbol(symbol);
}
if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
@@ -33373,7 +36169,7 @@ var ts;
// Due to the emit for class decorators, any reference to the class from inside of the class body
// must instead be rewritten to point to a temporary variable to avoid issues with the double-bind
// behavior of class names in ES6.
- if (declaration_1.kind === 226 /* ClassDeclaration */
+ if (declaration_1.kind === 228 /* ClassDeclaration */
&& ts.nodeIsDecorated(declaration_1)) {
var container = ts.getContainingClass(node);
while (container !== undefined) {
@@ -33385,14 +36181,14 @@ var ts;
container = ts.getContainingClass(container);
}
}
- else if (declaration_1.kind === 197 /* ClassExpression */) {
+ else if (declaration_1.kind === 198 /* ClassExpression */) {
// When we emit a class expression with static members that contain a reference
// to the constructor in the initializer, we will need to substitute that
// binding with an alias as the class name is not in scope.
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
while (container !== undefined) {
if (container.parent === declaration_1) {
- if (container.kind === 147 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) {
+ if (container.kind === 148 /* PropertyDeclaration */ && ts.hasModifier(container, 32 /* Static */)) {
getNodeLinks(declaration_1).flags |= 8388608 /* ClassWithConstructorReference */;
getNodeLinks(node).flags |= 16777216 /* ConstructorReferenceInClass */;
}
@@ -33404,6 +36200,7 @@ var ts;
}
checkCollisionWithCapturedSuperVariable(node, node);
checkCollisionWithCapturedThisVariable(node, node);
+ checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
var type = getTypeOfSymbol(localOrExportSymbol);
var declaration = localOrExportSymbol.valueDeclaration;
@@ -33426,15 +36223,15 @@ var ts;
// The declaration container is the innermost function that encloses the declaration of the variable
// or parameter. The flow container is the innermost function starting with which we analyze the control
// flow graph to determine the control flow based type.
- var isParameter = ts.getRootDeclaration(declaration).kind === 144 /* Parameter */;
+ var isParameter = ts.getRootDeclaration(declaration).kind === 145 /* Parameter */;
var declarationContainer = getControlFlowContainer(declaration);
var flowContainer = getControlFlowContainer(node);
var isOuterVariable = flowContainer !== declarationContainer;
// When the control flow originates in a function expression or arrow function and we are referencing
// a const variable or parameter from an outer function, we extend the origin of the control flow
// analysis to include the immediately enclosing function.
- while (flowContainer !== declarationContainer && (flowContainer.kind === 184 /* FunctionExpression */ ||
- flowContainer.kind === 185 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
+ while (flowContainer !== declarationContainer && (flowContainer.kind === 185 /* FunctionExpression */ ||
+ flowContainer.kind === 186 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
(isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
flowContainer = getControlFlowContainer(flowContainer);
}
@@ -33442,15 +36239,18 @@ var ts;
// the entire control flow graph from the variable's declaration (i.e. when the flow container and
// declaration container are the same).
var assumeInitialized = isParameter || isOuterVariable ||
- type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0) ||
+ type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node)) ||
ts.isInAmbientContext(declaration);
- var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
+ var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
+ type === autoType || type === autoArrayType ? undefinedType :
+ includeFalsyTypes(type, 2048 /* Undefined */);
+ var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
// A variable is considered uninitialized when it is possible to analyze the entire control flow graph
// from declaration to use, and when the variable's declared type doesn't include undefined but the
// control flow based type does include undefined.
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(declaration.name, ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));
error(node, ts.Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
}
@@ -33465,19 +36265,12 @@ var ts;
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isInsideFunction(node, threshold) {
- var current = node;
- while (current && current !== threshold) {
- if (ts.isFunctionLike(current)) {
- return true;
- }
- current = current.parent;
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
}
function checkNestedBlockScopedBinding(node, symbol) {
if (languageVersion >= 2 /* ES2015 */ ||
(symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 ||
- symbol.valueDeclaration.parent.kind === 256 /* CatchClause */) {
+ symbol.valueDeclaration.parent.kind === 259 /* CatchClause */) {
return;
}
// 1. walk from the use site up to the declaration and check
@@ -33502,8 +36295,8 @@ var ts;
}
// mark variables that are declared in loop initializer and reassigned inside the body of ForStatement.
// if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back.
- if (container.kind === 211 /* ForStatement */ &&
- ts.getAncestor(symbol.valueDeclaration, 224 /* VariableDeclarationList */).parent === container &&
+ if (container.kind === 213 /* ForStatement */ &&
+ ts.getAncestor(symbol.valueDeclaration, 226 /* VariableDeclarationList */).parent === container &&
isAssignedInBodyOfForStatement(node, container)) {
getNodeLinks(symbol.valueDeclaration).flags |= 2097152 /* NeedsLoopOutParameter */;
}
@@ -33515,9 +36308,9 @@ var ts;
}
}
function isAssignedInBodyOfForStatement(node, container) {
- var current = node;
// skip parenthesized nodes
- while (current.parent.kind === 183 /* ParenthesizedExpression */) {
+ var current = node;
+ while (current.parent.kind === 184 /* ParenthesizedExpression */) {
current = current.parent;
}
// check if node is used as LHS in some assignment expression
@@ -33525,7 +36318,7 @@ var ts;
if (ts.isAssignmentTarget(current)) {
isAssigned = true;
}
- else if ((current.parent.kind === 190 /* PrefixUnaryExpression */ || current.parent.kind === 191 /* PostfixUnaryExpression */)) {
+ else if ((current.parent.kind === 191 /* PrefixUnaryExpression */ || current.parent.kind === 192 /* PostfixUnaryExpression */)) {
var expr = current.parent;
isAssigned = expr.operator === 42 /* PlusPlusToken */ || expr.operator === 43 /* MinusMinusToken */;
}
@@ -33534,19 +36327,11 @@ var ts;
}
// at this point we know that node is the target of assignment
// now check that modification happens inside the statement part of the ForStatement
- while (current !== container) {
- if (current === container.statement) {
- return true;
- }
- else {
- current = current.parent;
- }
- }
- return false;
+ return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
}
function captureLexicalThis(node, container) {
getNodeLinks(node).flags |= 2 /* LexicalThis */;
- if (container.kind === 147 /* PropertyDeclaration */ || container.kind === 150 /* Constructor */) {
+ if (container.kind === 148 /* PropertyDeclaration */ || container.kind === 151 /* Constructor */) {
var classNode = container.parent;
getNodeLinks(classNode).flags |= 4 /* CaptureThis */;
}
@@ -33589,58 +36374,63 @@ var ts;
var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
return baseConstructorType === nullWideningType;
}
+ function checkThisBeforeSuper(node, container, diagnosticMessage) {
+ var containingClassDecl = container.parent;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
+ // If a containing class does not have extends clause or the class extends null
+ // skip checking whether super statement is called before "this" accessing.
+ if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
+ var superCall = getSuperCallInConstructor(container);
+ // We should give an error in the following cases:
+ // - No super-call
+ // - "this" is accessing before super-call.
+ // i.e super(this)
+ // this.x; super();
+ // We want to make sure that super-call is done before accessing "this" so that
+ // "this" is not accessed as a parameter of the super-call.
+ if (!superCall || superCall.end > node.pos) {
+ // In ES6, super inside constructor of class-declaration has to precede "this" accessing
+ error(node, diagnosticMessage);
+ }
+ }
+ }
function checkThisExpression(node) {
// Stop at the first arrow function so that we can
// tell whether 'this' needs to be captured.
var container = ts.getThisContainer(node, /* includeArrowFunctions */ true);
var needToCaptureLexicalThis = false;
- if (container.kind === 150 /* Constructor */) {
- var containingClassDecl = container.parent;
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl);
- // If a containing class does not have extends clause or the class extends null
- // skip checking whether super statement is called before "this" accessing.
- if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {
- var superCall = getSuperCallInConstructor(container);
- // We should give an error in the following cases:
- // - No super-call
- // - "this" is accessing before super-call.
- // i.e super(this)
- // this.x; super();
- // We want to make sure that super-call is done before accessing "this" so that
- // "this" is not accessed as a parameter of the super-call.
- if (!superCall || superCall.end > node.pos) {
- // In ES6, super inside constructor of class-declaration has to precede "this" accessing
- error(node, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
- }
- }
+ if (container.kind === 151 /* Constructor */) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
}
// Now skip arrow functions to get the "real" owner of 'this'.
- if (container.kind === 185 /* ArrowFunction */) {
+ if (container.kind === 186 /* ArrowFunction */) {
container = ts.getThisContainer(container, /* includeArrowFunctions */ false);
// When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code
needToCaptureLexicalThis = (languageVersion < 2 /* ES2015 */);
}
switch (container.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
// do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
// do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
if (isInConstructorArgumentInitializer(node, container)) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
+ // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
if (ts.getModifierFlags(container) & 32 /* Static */) {
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
+ // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks
}
break;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
break;
}
@@ -33652,8 +36442,8 @@ var ts;
// Note: a parameter initializer should refer to class-this unless function-this is explicitly annotated.
// If this is a function in a JS file, it might be a class method. Check if it's the RHS
// of a x.prototype.y = function [name]() { .... }
- if (container.kind === 184 /* FunctionExpression */ &&
- ts.isInJavaScriptFile(container.parent) &&
+ if (container.kind === 185 /* FunctionExpression */ &&
+ container.parent.kind === 193 /* BinaryExpression */ &&
ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) {
// Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container')
var className = container.parent // x.prototype.y = f
@@ -33673,7 +36463,7 @@ var ts;
if (ts.isClassLike(container.parent)) {
var symbol = getSymbolOfNode(container.parent);
var type = ts.hasModifier(container, 32 /* Static */) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
- return getFlowTypeOfReference(node, type, /*assumeInitialized*/ true, /*flowContainer*/ undefined);
+ return getFlowTypeOfReference(node, type);
}
if (ts.isInJavaScriptFile(node)) {
var type = getTypeForThisExpressionFromJSDoc(container);
@@ -33681,7 +36471,7 @@ var ts;
return type;
}
}
- if (compilerOptions.noImplicitThis) {
+ if (noImplicitThis) {
// With noImplicitThis, functions may not reference 'this' if it has type 'any'
error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
}
@@ -33689,28 +36479,23 @@ var ts;
}
function getTypeForThisExpressionFromJSDoc(node) {
var jsdocType = ts.getJSDocType(node);
- if (jsdocType && jsdocType.kind === 274 /* JSDocFunctionType */) {
+ if (jsdocType && jsdocType.kind === 278 /* JSDocFunctionType */) {
var jsDocFunctionType = jsdocType;
- if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 277 /* JSDocThisType */) {
+ if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 281 /* JSDocThisType */) {
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
}
}
}
function isInConstructorArgumentInitializer(node, constructorDecl) {
- for (var n = node; n && n !== constructorDecl; n = n.parent) {
- if (n.kind === 144 /* Parameter */) {
- return true;
- }
- }
- return false;
+ return !!ts.findAncestor(node, function (n) { return n === constructorDecl ? "quit" : n.kind === 145 /* Parameter */; });
}
function checkSuperExpression(node) {
- var isCallExpression = node.parent.kind === 179 /* CallExpression */ && node.parent.expression === node;
+ var isCallExpression = node.parent.kind === 180 /* CallExpression */ && node.parent.expression === node;
var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true);
var needToCaptureLexicalThis = false;
// adjust the container reference in case if super is used inside arrow functions with arbitrarily deep nesting
if (!isCallExpression) {
- while (container && container.kind === 185 /* ArrowFunction */) {
+ while (container && container.kind === 186 /* ArrowFunction */) {
container = ts.getSuperContainer(container, /*stopOnFunctions*/ true);
needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */;
}
@@ -33723,17 +36508,14 @@ var ts;
// class B {
// [super.foo()]() {}
// }
- var current = node;
- while (current && current !== container && current.kind !== 142 /* ComputedPropertyName */) {
- current = current.parent;
- }
- if (current && current.kind === 142 /* ComputedPropertyName */) {
+ var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 143 /* ComputedPropertyName */; });
+ if (current && current.kind === 143 /* ComputedPropertyName */) {
error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
}
else if (isCallExpression) {
error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
}
- else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 176 /* ObjectLiteralExpression */)) {
+ else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */)) {
error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
}
else {
@@ -33741,6 +36523,9 @@ var ts;
}
return unknownType;
}
+ if (!isCallExpression && container.kind === 151 /* Constructor */) {
+ checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
+ }
if ((ts.getModifierFlags(container) & 32 /* Static */) || isCallExpression) {
nodeCheckFlag = 512 /* SuperStatic */;
}
@@ -33804,7 +36589,7 @@ var ts;
// This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set.
// This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment
// while a property access can.
- if (container.kind === 149 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) {
+ if (container.kind === 150 /* MethodDeclaration */ && ts.getModifierFlags(container) & 256 /* Async */) {
if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
getNodeLinks(container).flags |= 4096 /* AsyncMethodWithSuperBinding */;
}
@@ -33818,7 +36603,7 @@ var ts;
// in this case they should also use correct lexical this
captureLexicalThis(node.parent, container);
}
- if (container.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (container.parent.kind === 177 /* ObjectLiteralExpression */) {
if (languageVersion < 2 /* ES2015 */) {
error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
return unknownType;
@@ -33838,7 +36623,7 @@ var ts;
}
return unknownType;
}
- if (container.kind === 150 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) {
+ if (container.kind === 151 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) {
// issue custom error message for super property access in constructor arguments (to be aligned with old compiler)
error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
return unknownType;
@@ -33853,7 +36638,7 @@ var ts;
if (isCallExpression) {
// TS 1.0 SPEC (April 2014): 4.8.1
// Super calls are only permitted in constructors of derived classes
- return container.kind === 150 /* Constructor */;
+ return container.kind === 151 /* Constructor */;
}
else {
// TS 1.0 SPEC (April 2014)
@@ -33861,29 +36646,47 @@ var ts;
// - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance
// - In a static member function or static member accessor
// topmost container must be something that is directly nested in the class declaration\object literal expression
- if (ts.isClassLike(container.parent) || container.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (ts.isClassLike(container.parent) || container.parent.kind === 177 /* ObjectLiteralExpression */) {
if (ts.getModifierFlags(container) & 32 /* Static */) {
- return container.kind === 149 /* MethodDeclaration */ ||
- container.kind === 148 /* MethodSignature */ ||
- container.kind === 151 /* GetAccessor */ ||
- container.kind === 152 /* SetAccessor */;
+ return container.kind === 150 /* MethodDeclaration */ ||
+ container.kind === 149 /* MethodSignature */ ||
+ container.kind === 152 /* GetAccessor */ ||
+ container.kind === 153 /* SetAccessor */;
}
else {
- return container.kind === 149 /* MethodDeclaration */ ||
- container.kind === 148 /* MethodSignature */ ||
- container.kind === 151 /* GetAccessor */ ||
- container.kind === 152 /* SetAccessor */ ||
- container.kind === 147 /* PropertyDeclaration */ ||
- container.kind === 146 /* PropertySignature */ ||
- container.kind === 150 /* Constructor */;
+ return container.kind === 150 /* MethodDeclaration */ ||
+ container.kind === 149 /* MethodSignature */ ||
+ container.kind === 152 /* GetAccessor */ ||
+ container.kind === 153 /* SetAccessor */ ||
+ container.kind === 148 /* PropertyDeclaration */ ||
+ container.kind === 147 /* PropertySignature */ ||
+ container.kind === 151 /* Constructor */;
}
}
}
return false;
}
}
+ function getContainingObjectLiteral(func) {
+ return (func.kind === 150 /* MethodDeclaration */ ||
+ func.kind === 152 /* GetAccessor */ ||
+ func.kind === 153 /* SetAccessor */) && func.parent.kind === 177 /* ObjectLiteralExpression */ ? func.parent :
+ func.kind === 185 /* FunctionExpression */ && func.parent.kind === 260 /* PropertyAssignment */ ? func.parent.parent :
+ undefined;
+ }
+ function getThisTypeArgument(type) {
+ return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? type.typeArguments[0] : undefined;
+ }
+ function getThisTypeFromContextualType(type) {
+ return mapType(type, function (t) {
+ return t.flags & 131072 /* Intersection */ ? ts.forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);
+ });
+ }
function getContextualThisParameterType(func) {
- if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 185 /* ArrowFunction */) {
+ if (func.kind === 186 /* ArrowFunction */) {
+ return undefined;
+ }
+ if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
var thisParameter = contextualSignature.thisParameter;
@@ -33892,6 +36695,40 @@ var ts;
}
}
}
+ if (noImplicitThis) {
+ var containingLiteral = getContainingObjectLiteral(func);
+ if (containingLiteral) {
+ // We have an object literal method. Check if the containing object literal has a contextual type
+ // that includes a ThisType<T>. If so, T is the contextual type for 'this'. We continue looking in
+ // any directly enclosing object literals.
+ var contextualType = getApparentTypeOfContextualType(containingLiteral);
+ var literal = containingLiteral;
+ var type = contextualType;
+ while (type) {
+ var thisType = getThisTypeFromContextualType(type);
+ if (thisType) {
+ return instantiateType(thisType, getContextualMapper(containingLiteral));
+ }
+ if (literal.parent.kind !== 260 /* PropertyAssignment */) {
+ break;
+ }
+ literal = literal.parent.parent;
+ type = getApparentTypeOfContextualType(literal);
+ }
+ // There was no contextual ThisType<T> for the containing object literal, so the contextual type
+ // for 'this' is the non-null form of the contextual type for the containing object literal or
+ // the type of the object literal itself.
+ return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral);
+ }
+ // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the
+ // contextual type for 'this' is 'obj'.
+ if (func.parent.kind === 193 /* BinaryExpression */ && func.parent.operatorToken.kind === 57 /* EqualsToken */) {
+ var target = func.parent.left;
+ if (target.kind === 178 /* PropertyAccessExpression */ || target.kind === 179 /* ElementAccessExpression */) {
+ return checkExpressionCached(target.expression);
+ }
+ }
+ }
return undefined;
}
// Return contextual type of parameter or undefined if no contextual type is available
@@ -33899,23 +36736,23 @@ var ts;
var func = parameter.parent;
if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
var iife = ts.getImmediatelyInvokedFunctionExpression(func);
- if (iife) {
+ if (iife && iife.arguments) {
var indexOfParameter = ts.indexOf(func.parameters, parameter);
- if (iife.arguments && indexOfParameter < iife.arguments.length) {
- if (parameter.dotDotDotToken) {
- var restTypes = [];
- for (var i = indexOfParameter; i < iife.arguments.length; i++) {
- restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
- }
- return createArrayType(getUnionType(restTypes));
- }
- var links = getNodeLinks(iife);
- var cached = links.resolvedSignature;
- links.resolvedSignature = anySignature;
- var type = getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter]));
- links.resolvedSignature = cached;
- return type;
- }
+ if (parameter.dotDotDotToken) {
+ var restTypes = [];
+ for (var i = indexOfParameter; i < iife.arguments.length; i++) {
+ restTypes.push(getWidenedLiteralType(checkExpression(iife.arguments[i])));
+ }
+ return restTypes.length ? createArrayType(getUnionType(restTypes)) : undefined;
+ }
+ var links = getNodeLinks(iife);
+ var cached = links.resolvedSignature;
+ links.resolvedSignature = anySignature;
+ var type = indexOfParameter < iife.arguments.length ?
+ getWidenedLiteralType(checkExpression(iife.arguments[indexOfParameter])) :
+ parameter.initializer ? undefined : undefinedWideningType;
+ links.resolvedSignature = cached;
+ return type;
}
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -33949,7 +36786,7 @@ var ts;
if (declaration.type) {
return getTypeFromTypeNode(declaration.type);
}
- if (declaration.kind === 144 /* Parameter */) {
+ if (declaration.kind === 145 /* Parameter */) {
var type = getContextuallyTypedParameterType(declaration);
if (type) {
return type;
@@ -33960,11 +36797,11 @@ var ts;
}
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
- var name_19 = declaration.propertyName || declaration.name;
- if (ts.isVariableLike(parentDeclaration) &&
+ var name = declaration.propertyName || declaration.name;
+ if (parentDeclaration.kind !== 175 /* BindingElement */ &&
parentDeclaration.type &&
- !ts.isBindingPattern(name_19)) {
- var text = ts.getTextOfPropertyName(name_19);
+ !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
if (text) {
return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
}
@@ -33975,33 +36812,34 @@ var ts;
}
function getContextualTypeForReturnExpression(node) {
var func = ts.getContainingFunction(node);
- if (ts.isAsyncFunctionLike(func)) {
- var contextualReturnType = getContextualReturnType(func);
- if (contextualReturnType) {
- return getPromisedType(contextualReturnType);
+ if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1 /* Generator */) {
+ return undefined;
}
- return undefined;
- }
- if (func && !func.asteriskToken) {
- return getContextualReturnType(func);
+ var contextualReturnType = getContextualReturnType(func);
+ return functionFlags & 2 /* Async */
+ ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType) // Async function
+ : contextualReturnType; // Regular function
}
return undefined;
}
function getContextualTypeForYieldOperand(node) {
var func = ts.getContainingFunction(node);
if (func) {
+ var functionFlags = ts.getFunctionFlags(func);
var contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return node.asteriskToken
? contextualReturnType
- : getElementTypeOfIterableIterator(contextualReturnType);
+ : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2 /* Async */) !== 0);
}
}
return undefined;
}
function isInParameterInitializerBeforeContainingFunction(node) {
while (node.parent && !ts.isFunctionLike(node.parent)) {
- if (node.parent.kind === 144 /* Parameter */ && node.parent.initializer === node) {
+ if (node.parent.kind === 145 /* Parameter */ && node.parent.initializer === node) {
return true;
}
node = node.parent;
@@ -34012,8 +36850,8 @@ var ts;
// If the containing function has a return type annotation, is a constructor, or is a get accessor whose
// corresponding set accessor has a type annotation, return statements in the function are contextually typed
if (functionDecl.type ||
- functionDecl.kind === 150 /* Constructor */ ||
- functionDecl.kind === 151 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 152 /* SetAccessor */))) {
+ functionDecl.kind === 151 /* Constructor */ ||
+ functionDecl.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 153 /* SetAccessor */))) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
// Otherwise, if the containing function is contextually typed by a function type with exactly one call signature
@@ -34035,7 +36873,7 @@ var ts;
return undefined;
}
function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
- if (template.parent.kind === 181 /* TaggedTemplateExpression */) {
+ if (template.parent.kind === 182 /* TaggedTemplateExpression */) {
return getContextualTypeForArgument(template.parent, substitutionExpression);
}
return undefined;
@@ -34069,41 +36907,14 @@ var ts;
}
return undefined;
}
- // Apply a mapping function to a contextual type and return the resulting type. If the contextual type
- // is a union type, the mapping function is applied to each constituent type and a union of the resulting
- // types is returned.
- function applyToContextualType(type, mapper) {
- if (!(type.flags & 65536 /* Union */)) {
- return mapper(type);
- }
- var types = type.types;
- var mappedType;
- var mappedTypes;
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var current = types_13[_i];
- var t = mapper(current);
- if (t) {
- if (!mappedType) {
- mappedType = t;
- }
- else if (!mappedTypes) {
- mappedTypes = [mappedType, t];
- }
- else {
- mappedTypes.push(t);
- }
- }
- }
- return mappedTypes ? getUnionType(mappedTypes) : mappedType;
- }
function getTypeOfPropertyOfContextualType(type, name) {
- return applyToContextualType(type, function (t) {
+ return mapType(type, function (t) {
var prop = t.flags & 229376 /* StructuredType */ ? getPropertyOfType(t, name) : undefined;
return prop ? getTypeOfSymbol(prop) : undefined;
});
}
function getIndexTypeOfContextualType(type, kind) {
- return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
+ return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); });
}
// Return true if the given contextual type is a tuple-like type
function contextualTypeIsTupleLikeType(type) {
@@ -34150,7 +36961,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1 /* Number */)
- || (languageVersion >= 2 /* ES2015 */ ? getElementTypeOfIterable(type, /*errorNode*/ undefined) : undefined);
+ || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
}
return undefined;
}
@@ -34160,19 +36971,19 @@ var ts;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
}
function getContextualTypeForJsxAttribute(attribute) {
- var kind = attribute.kind;
- var jsxElement = attribute.parent;
- var attrsType = getJsxElementAttributesType(jsxElement);
- if (attribute.kind === 250 /* JsxAttribute */) {
- if (!attrsType || isTypeAny(attrsType)) {
+ // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
+ // which is a type of the parameter of the signature we are trying out.
+ // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
+ var attributesType = getContextualType(attribute.parent);
+ if (ts.isJsxAttribute(attribute)) {
+ if (!attributesType || isTypeAny(attributesType)) {
return undefined;
}
- return getTypeOfPropertyOfType(attrsType, attribute.name.text);
+ return getTypeOfPropertyOfType(attributesType, attribute.name.text);
}
- else if (attribute.kind === 251 /* JsxSpreadAttribute */) {
- return attrsType;
+ else {
+ return attributesType;
}
- ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]");
}
// Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily
// be "pushed" onto a node using the contextualType property.
@@ -34207,45 +37018,52 @@ var ts;
}
var parent = node.parent;
switch (parent.kind) {
- case 223 /* VariableDeclaration */:
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 174 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 175 /* BindingElement */:
return getContextualTypeForInitializerExpression(node);
- case 185 /* ArrowFunction */:
- case 216 /* ReturnStatement */:
+ case 186 /* ArrowFunction */:
+ case 218 /* ReturnStatement */:
return getContextualTypeForReturnExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return getContextualTypeForYieldOperand(parent);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return getContextualTypeForArgument(parent, node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
return getTypeFromTypeNode(parent.type);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return getContextualTypeForBinaryOperand(node);
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return getContextualTypeForObjectLiteralElement(parent);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return getContextualTypeForElementExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return getContextualTypeForConditionalOperand(node);
- case 202 /* TemplateSpan */:
- ts.Debug.assert(parent.parent.kind === 194 /* TemplateExpression */);
+ case 204 /* TemplateSpan */:
+ ts.Debug.assert(parent.parent.kind === 195 /* TemplateExpression */);
return getContextualTypeForSubstitutionExpression(parent.parent, node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return getContextualType(parent);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return getContextualType(parent);
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
return getContextualTypeForJsxAttribute(parent);
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ return getAttributesTypeFromJsxOpeningLikeElement(parent);
}
return undefined;
}
+ function getContextualMapper(node) {
+ node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
+ return node ? node.contextualMapper : identityMapper;
+ }
// If the given type is an object or union type, if that type has a single signature, and if
// that signature is non-generic, return the signature. Otherwise return undefined.
function getNonGenericSignature(type, node) {
@@ -34273,7 +37091,7 @@ var ts;
return sourceLength < targetParameterCount;
}
function isFunctionExpressionOrArrowFunction(node) {
- return node.kind === 184 /* FunctionExpression */ || node.kind === 185 /* ArrowFunction */;
+ return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */;
}
function getContextualSignatureForFunctionLikeDeclaration(node) {
// Only function expressions, arrow functions, and object literal methods are contextually typed.
@@ -34292,7 +37110,7 @@ var ts;
// all identical ignoring their return type, the result is same signature but with return type as
// union type of return types from these signatures
function getContextualSignature(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
var type = getContextualTypeForFunctionLikeDeclaration(node);
if (!type) {
return undefined;
@@ -34302,8 +37120,8 @@ var ts;
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var current = types_14[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var current = types_17[_i];
var signature = getNonGenericSignature(current, node);
if (signature) {
if (!signatureList) {
@@ -34330,46 +37148,25 @@ var ts;
}
return result;
}
- /**
- * Detect if the mapper implies an inference context. Specifically, there are 4 possible values
- * for a mapper. Let's go through each one of them:
- *
- * 1. undefined - this means we are not doing inferential typing, but we may do contextual typing,
- * which could cause us to assign a parameter a type
- * 2. identityMapper - means we want to avoid assigning a parameter a type, whether or not we are in
- * inferential typing (context is undefined for the identityMapper)
- * 3. a mapper created by createInferenceMapper - we are doing inferential typing, we want to assign
- * types to parameters and fix type parameters (context is defined)
- * 4. an instantiation mapper created by createTypeMapper or createTypeEraser - this should never be
- * passed as the contextual mapper when checking an expression (context is undefined for these)
- *
- * isInferentialContext is detecting if we are in case 3
- */
- function isInferentialContext(mapper) {
- return mapper && mapper.context;
- }
- function checkSpreadExpression(node, contextualMapper) {
- // It is usually not safe to call checkExpressionCached if we can be contextually typing.
- // You can tell that we are contextually typing because of the contextualMapper parameter.
- // While it is true that a spread element can have a contextual type, it does not do anything
- // with this type. It is neither affected by it, nor does it propagate it to its operand.
- // So the fact that contextualMapper is passed is not important, because the operand of a spread
- // element is not contextually typed.
- var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false);
+ function checkSpreadExpression(node, checkMode) {
+ if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 1536 /* SpreadIncludes */);
+ }
+ var arrayOrIterableType = checkExpression(node.expression, checkMode);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
}
function hasDefaultValue(node) {
- return (node.kind === 174 /* BindingElement */ && !!node.initializer) ||
- (node.kind === 192 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */);
+ return (node.kind === 175 /* BindingElement */ && !!node.initializer) ||
+ (node.kind === 193 /* BinaryExpression */ && node.operatorToken.kind === 57 /* EqualsToken */);
}
- function checkArrayLiteral(node, contextualMapper) {
+ function checkArrayLiteral(node, checkMode) {
var elements = node.elements;
var hasSpreadElement = false;
var elementTypes = [];
var inDestructuringPattern = ts.isAssignmentTarget(node);
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var e = elements_1[_i];
- if (inDestructuringPattern && e.kind === 196 /* SpreadElement */) {
+ if (inDestructuringPattern && e.kind === 197 /* SpreadElement */) {
// Given the following situation:
// var c: {};
// [...c] = ["", 0];
@@ -34382,18 +37179,18 @@ var ts;
// get the contextual element type from it. So we do something similar to
// getContextualTypeForElementExpression, which will crucially not error
// if there is no index type / iterated type.
- var restArrayType = checkExpression(e.expression, contextualMapper);
+ var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) ||
- (languageVersion >= 2 /* ES2015 */ ? getElementTypeOfIterable(restArrayType, /*errorNode*/ undefined) : undefined);
+ getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
if (restElementType) {
elementTypes.push(restElementType);
}
}
else {
- var type = checkExpressionForMutableLocation(e, contextualMapper);
+ var type = checkExpressionForMutableLocation(e, checkMode);
elementTypes.push(type);
}
- hasSpreadElement = hasSpreadElement || e.kind === 196 /* SpreadElement */;
+ hasSpreadElement = hasSpreadElement || e.kind === 197 /* SpreadElement */;
}
if (!hasSpreadElement) {
// If array literal is actually a destructuring pattern, mark it as an implied type. We do this such
@@ -34408,7 +37205,7 @@ var ts;
var pattern = contextualType.pattern;
// If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting
// tuple type with the corresponding binding or assignment element types to make the lengths equal.
- if (pattern && (pattern.kind === 173 /* ArrayBindingPattern */ || pattern.kind === 175 /* ArrayLiteralExpression */)) {
+ if (pattern && (pattern.kind === 174 /* ArrayBindingPattern */ || pattern.kind === 176 /* ArrayLiteralExpression */)) {
var patternElements = pattern.elements;
for (var i = elementTypes.length; i < patternElements.length; i++) {
var patternElement = patternElements[i];
@@ -34416,7 +37213,7 @@ var ts;
elementTypes.push(contextualType.typeArguments[i]);
}
else {
- if (patternElement.kind !== 198 /* OmittedExpression */) {
+ if (patternElement.kind !== 199 /* OmittedExpression */) {
error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
elementTypes.push(unknownType);
@@ -34433,7 +37230,7 @@ var ts;
strictNullChecks ? neverType : undefinedWideningType);
}
function isNumericName(name) {
- return name.kind === 142 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text);
+ return name.kind === 143 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
// It seems odd to consider an expression of type Any to result in a numeric name,
@@ -34495,7 +37292,7 @@ var ts;
var unionType = propTypes.length ? getUnionType(propTypes, /*subtypeReduction*/ true) : undefinedType;
return createIndexInfo(unionType, /*isReadonly*/ false);
}
- function checkObjectLiteral(node, contextualMapper) {
+ function checkObjectLiteral(node, checkMode) {
var inDestructuringPattern = ts.isAssignmentTarget(node);
// Grammar checking
checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
@@ -34505,7 +37302,8 @@ var ts;
var propagatedFlags = 0;
var contextualType = getApparentTypeOfContextualType(node);
var contextualTypeHasPattern = contextualType && contextualType.pattern &&
- (contextualType.pattern.kind === 172 /* ObjectBindingPattern */ || contextualType.pattern.kind === 176 /* ObjectLiteralExpression */);
+ (contextualType.pattern.kind === 173 /* ObjectBindingPattern */ || contextualType.pattern.kind === 177 /* ObjectLiteralExpression */);
+ var isJSObjectLiteral = !contextualType && ts.isInJavaScriptFile(node);
var typeFlags = 0;
var patternWithComputedProperties = false;
var hasComputedStringProperty = false;
@@ -34514,29 +37312,29 @@ var ts;
for (var i = 0; i < node.properties.length; i++) {
var memberDecl = node.properties[i];
var member = memberDecl.symbol;
- if (memberDecl.kind === 257 /* PropertyAssignment */ ||
- memberDecl.kind === 258 /* ShorthandPropertyAssignment */ ||
+ if (memberDecl.kind === 260 /* PropertyAssignment */ ||
+ memberDecl.kind === 261 /* ShorthandPropertyAssignment */ ||
ts.isObjectLiteralMethod(memberDecl)) {
var type = void 0;
- if (memberDecl.kind === 257 /* PropertyAssignment */) {
- type = checkPropertyAssignment(memberDecl, contextualMapper);
+ if (memberDecl.kind === 260 /* PropertyAssignment */) {
+ type = checkPropertyAssignment(memberDecl, checkMode);
}
- else if (memberDecl.kind === 149 /* MethodDeclaration */) {
- type = checkObjectLiteralMethod(memberDecl, contextualMapper);
+ else if (memberDecl.kind === 150 /* MethodDeclaration */) {
+ type = checkObjectLiteralMethod(memberDecl, checkMode);
}
else {
- ts.Debug.assert(memberDecl.kind === 258 /* ShorthandPropertyAssignment */);
- type = checkExpressionForMutableLocation(memberDecl.name, contextualMapper);
+ ts.Debug.assert(memberDecl.kind === 261 /* ShorthandPropertyAssignment */);
+ type = checkExpressionForMutableLocation(memberDecl.name, checkMode);
}
typeFlags |= type.flags;
- var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | member.flags, member.name);
+ var prop = createSymbol(4 /* Property */ | member.flags, member.name);
if (inDestructuringPattern) {
// If object literal is an assignment pattern and if the assignment pattern specifies a default value
// for the property, make the property optional.
- var isOptional = (memberDecl.kind === 257 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
- (memberDecl.kind === 258 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
+ var isOptional = (memberDecl.kind === 260 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
+ (memberDecl.kind === 261 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
if (isOptional) {
- prop.flags |= 536870912 /* Optional */;
+ prop.flags |= 67108864 /* Optional */;
}
if (ts.hasDynamicName(memberDecl)) {
patternWithComputedProperties = true;
@@ -34547,9 +37345,9 @@ var ts;
// binding pattern specifies a default value for the property, make the property optional.
var impliedProp = getPropertyOfType(contextualType, member.name);
if (impliedProp) {
- prop.flags |= impliedProp.flags & 536870912 /* Optional */;
+ prop.flags |= impliedProp.flags & 67108864 /* Optional */;
}
- else if (!compilerOptions.suppressExcessPropertyErrors) {
+ else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0 /* String */)) {
error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
}
}
@@ -34562,9 +37360,12 @@ var ts;
prop.target = member;
member = prop;
}
- else if (memberDecl.kind === 259 /* SpreadAssignment */) {
+ else if (memberDecl.kind === 262 /* SpreadAssignment */) {
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(memberDecl, 2 /* Assign */);
+ }
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), /*isFromObjectLiteral*/ true);
+ spread = getSpreadType(spread, createObjectLiteralType());
propertiesArray = [];
propertiesTable = ts.createMap();
hasComputedStringProperty = false;
@@ -34572,11 +37373,11 @@ var ts;
typeFlags = 0;
}
var type = checkExpression(memberDecl.expression);
- if (!(type.flags & (32768 /* Object */ | 1 /* Any */))) {
+ if (!isValidSpreadType(type)) {
error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
return unknownType;
}
- spread = getSpreadType(spread, type, /*isFromObjectLiteral*/ false);
+ spread = getSpreadType(spread, type);
offset = i + 1;
continue;
}
@@ -34586,8 +37387,8 @@ var ts;
// an ordinary function declaration(section 6.1) with no parameters.
// A set accessor declaration is processed in the same manner
// as an ordinary function declaration with a single parameter and a Void return type.
- ts.Debug.assert(memberDecl.kind === 151 /* GetAccessor */ || memberDecl.kind === 152 /* SetAccessor */);
- checkAccessorDeclaration(memberDecl);
+ ts.Debug.assert(memberDecl.kind === 152 /* GetAccessor */ || memberDecl.kind === 153 /* SetAccessor */);
+ checkNodeDeferred(memberDecl);
}
if (ts.hasDynamicName(memberDecl)) {
if (isNumericName(memberDecl.name)) {
@@ -34598,7 +37399,7 @@ var ts;
}
}
else {
- propertiesTable[member.name] = member;
+ propertiesTable.set(member.name, member);
}
propertiesArray.push(member);
}
@@ -34607,27 +37408,30 @@ var ts;
if (contextualTypeHasPattern) {
for (var _i = 0, _a = getPropertiesOfType(contextualType); _i < _a.length; _i++) {
var prop = _a[_i];
- if (!propertiesTable[prop.name]) {
- if (!(prop.flags & 536870912 /* Optional */)) {
+ if (!propertiesTable.get(prop.name)) {
+ if (!(prop.flags & 67108864 /* Optional */)) {
error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
}
- propertiesTable[prop.name] = prop;
+ propertiesTable.set(prop.name, prop);
propertiesArray.push(prop);
}
}
}
if (spread !== emptyObjectType) {
if (propertiesArray.length > 0) {
- spread = getSpreadType(spread, createObjectLiteralType(), /*isFromObjectLiteral*/ true);
+ spread = getSpreadType(spread, createObjectLiteralType());
+ }
+ if (spread.flags & 32768 /* Object */) {
+ // only set the symbol and flags if this is a (fresh) object type
+ spread.flags |= propagatedFlags;
+ spread.symbol = node.symbol;
}
- spread.flags |= propagatedFlags;
- spread.symbol = node.symbol;
return spread;
}
return createObjectLiteralType();
function createObjectLiteralType() {
- var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0 /* String */) : undefined;
- var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1 /* Number */) : undefined;
+ var stringIndexInfo = isJSObjectLiteral ? jsObjectLiteralIndexInfo : hasComputedStringProperty ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 0 /* String */) : undefined;
+ var numberIndexInfo = hasComputedNumberProperty && !isJSObjectLiteral ? getObjectLiteralIndexInfo(node.properties, offset, propertiesArray, 1 /* Number */) : undefined;
var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshLiteral */;
result.flags |= 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */);
@@ -34644,9 +37448,14 @@ var ts;
return result;
}
}
+ function isValidSpreadType(type) {
+ return !!(type.flags & (1 /* Any */ | 4096 /* Null */ | 2048 /* Undefined */ | 16777216 /* NonPrimitive */) ||
+ type.flags & 32768 /* Object */ && !isGenericMappedType(type) ||
+ type.flags & 196608 /* UnionOrIntersection */ && !ts.forEach(type.types, function (t) { return !isValidSpreadType(t); }));
+ }
function checkJsxSelfClosingElement(node) {
checkJsxOpeningLikeElement(node);
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
function checkJsxElement(node) {
// Check attributes
@@ -34662,18 +37471,18 @@ var ts;
for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
var child = _a[_i];
switch (child.kind) {
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
checkJsxExpression(child);
break;
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
checkJsxElement(child);
break;
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
checkJsxSelfClosingElement(child);
break;
}
}
- return jsxElementType || anyType;
+ return getJsxGlobalElementType() || anyType;
}
/**
* Returns true iff the JSX element name would be a valid JS identifier, ignoring restrictions about keywords not being identifiers
@@ -34687,81 +37496,114 @@ var ts;
*/
function isJsxIntrinsicIdentifier(tagName) {
// TODO (yuisu): comment
- if (tagName.kind === 177 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) {
+ if (tagName.kind === 178 /* PropertyAccessExpression */ || tagName.kind === 98 /* ThisKeyword */) {
return false;
}
else {
return ts.isIntrinsicJsxName(tagName.text);
}
}
- function checkJsxAttribute(node, elementAttributesType, nameTable) {
- var correspondingPropType = undefined;
- // Look up the corresponding property for this attribute
- if (elementAttributesType === emptyObjectType && isUnhyphenatedJsxName(node.name.text)) {
- // If there is no 'props' property, you may not have non-"data-" attributes
- error(node.parent, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
- }
- else if (elementAttributesType && !isTypeAny(elementAttributesType)) {
- var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text);
- correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol);
- if (isUnhyphenatedJsxName(node.name.text)) {
- var attributeType = getTypeOfPropertyOfType(elementAttributesType, ts.getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0 /* String */);
- if (attributeType) {
- correspondingPropType = attributeType;
+ /**
+ * Get attributes type of the JSX opening-like element. The result is from resolving "attributes" property of the opening-like element.
+ *
+ * @param openingLikeElement a JSX opening-like element
+ * @param filter a function to remove attributes that will not participate in checking whether attributes are assignable
+ * @return an anonymous type (similar to the one returned by checkObjectLiteral) in which its properties are attributes property.
+ * @remarks Because this function calls getSpreadType, it needs to use the same checks as checkObjectLiteral,
+ * which also calls getSpreadType.
+ */
+ function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, filter, checkMode) {
+ var attributes = openingLikeElement.attributes;
+ var attributesTable = ts.createMap();
+ var spread = emptyObjectType;
+ var attributesArray = [];
+ for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
+ var attributeDecl = _a[_i];
+ var member = attributeDecl.symbol;
+ if (ts.isJsxAttribute(attributeDecl)) {
+ var exprType = attributeDecl.initializer ?
+ checkExpression(attributeDecl.initializer, checkMode) :
+ trueType; // <Elem attr /> is sugar for <Elem attr={true} />
+ var attributeSymbol = createSymbol(4 /* Property */ | 134217728 /* Transient */ | member.flags, member.name);
+ attributeSymbol.declarations = member.declarations;
+ attributeSymbol.parent = member.parent;
+ if (member.valueDeclaration) {
+ attributeSymbol.valueDeclaration = member.valueDeclaration;
}
- else {
- // If there's no corresponding property with this name, error
- if (!correspondingPropType) {
- error(node.name, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.name.text, typeToString(elementAttributesType));
- return unknownType;
- }
+ attributeSymbol.type = exprType;
+ attributeSymbol.target = member;
+ attributesTable.set(attributeSymbol.name, attributeSymbol);
+ attributesArray.push(attributeSymbol);
+ }
+ else {
+ ts.Debug.assert(attributeDecl.kind === 254 /* JsxSpreadAttribute */);
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ var exprType = checkExpression(attributeDecl.expression);
+ if (!isValidSpreadType(exprType)) {
+ error(attributeDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+ return anyType;
+ }
+ if (isTypeAny(exprType)) {
+ return anyType;
}
+ spread = getSpreadType(spread, exprType);
}
}
- var exprType;
- if (node.initializer) {
- exprType = checkExpression(node.initializer);
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ attributesArray = [];
+ attributesTable = ts.createMap();
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- else {
- // <Elem attr /> is sugar for <Elem attr={true} />
- exprType = booleanType;
+ attributesTable = ts.createMap();
+ if (attributesArray) {
+ ts.forEach(attributesArray, function (attr) {
+ if (!filter || filter(attr)) {
+ attributesTable.set(attr.name, attr);
+ }
+ });
}
- if (correspondingPropType) {
- checkTypeAssignableTo(exprType, correspondingPropType, node);
+ return createJsxAttributesType(attributes.symbol, attributesTable);
+ /**
+ * Create anonymous type from given attributes symbol table.
+ * @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable
+ * @param attributesTable a symbol table of attributes property
+ */
+ function createJsxAttributesType(symbol, attributesTable) {
+ var result = createAnonymousType(symbol, attributesTable, emptyArray, emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined);
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshLiteral */;
+ result.flags |= 33554432 /* JsxAttributes */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag;
+ result.objectFlags |= 128 /* ObjectLiteral */;
+ return result;
}
- nameTable[node.name.text] = true;
- return exprType;
}
- function checkJsxSpreadAttribute(node, elementAttributesType, nameTable) {
- var type = checkExpression(node.expression);
- var props = getPropertiesOfType(type);
- for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
- var prop = props_2[_i];
- // Is there a corresponding property in the element attributes type? Skip checking of properties
- // that have already been assigned to, as these are not actually pushed into the resulting type
- if (!nameTable[prop.name]) {
- var targetPropSym = getPropertyOfType(elementAttributesType, prop.name);
- if (targetPropSym) {
- var msg = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property, prop.name);
- checkTypeAssignableTo(getTypeOfSymbol(prop), getTypeOfSymbol(targetPropSym), node, undefined, msg);
- }
- nameTable[prop.name] = true;
- }
- }
- return type;
+ /**
+ * Check attributes property of opening-like element. This function is called during chooseOverload to get call signature of a JSX opening-like element.
+ * (See "checkApplicableSignatureForJsxOpeningLikeElement" for how the function is used)
+ * @param node a JSXAttributes to be resolved of its type
+ */
+ function checkJsxAttributes(node, checkMode) {
+ return createJsxAttributesTypeFromAttributesProperty(node.parent, /*filter*/ undefined, checkMode);
}
function getJsxType(name) {
- if (jsxTypes[name] === undefined) {
- return jsxTypes[name] = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType;
+ var jsxType = jsxTypes.get(name);
+ if (jsxType === undefined) {
+ jsxTypes.set(name, jsxType = getExportedTypeFromNamespace(JsxNames.JSX, name) || unknownType);
}
- return jsxTypes[name];
+ return jsxType;
}
/**
- * Looks up an intrinsic tag name and returns a symbol that either points to an intrinsic
- * property (in which case nodeLinks.jsxFlags will be IntrinsicNamedElement) or an intrinsic
- * string index signature (in which case nodeLinks.jsxFlags will be IntrinsicIndexedElement).
- * May also return unknownSymbol if both of these lookups fail.
- */
+ * Looks up an intrinsic tag name and returns a symbol that either points to an intrinsic
+ * property (in which case nodeLinks.jsxFlags will be IntrinsicNamedElement) or an intrinsic
+ * string index signature (in which case nodeLinks.jsxFlags will be IntrinsicIndexedElement).
+ * May also return unknownSymbol if both of these lookups fail.
+ */
function getIntrinsicTagSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
@@ -34784,7 +37626,7 @@ var ts;
return links.resolvedSymbol = unknownSymbol;
}
else {
- if (compilerOptions.noImplicitAny) {
+ if (noImplicitAny) {
error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
}
return links.resolvedSymbol = unknownSymbol;
@@ -34849,28 +37691,133 @@ var ts;
}
}
/**
- * Given React element instance type and the class type, resolve the Jsx type
- * Pass elemType to handle individual type in the union typed element type.
- */
- function getResolvedJsxType(node, elemType, elemClassType) {
- if (!elemType) {
- elemType = checkExpression(node.tagName);
+ * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
+ * Return only attributes type of successfully resolved call signature.
+ * This function assumes that the caller handled other possible element type of the JSX element (e.g. stateful component)
+ * Unlike tryGetAllJsxStatelessFunctionAttributesType, this function is a default behavior of type-checkers.
+ * @param openingLikeElement a JSX opening-like element to find attributes type
+ * @param elementType a type of the opening-like element. This elementType can't be an union type
+ * @param elemInstanceType an element instance type (the result of newing or invoking this tag)
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global
+ */
+ function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ // We don't call getResolvedSignature here because we have already resolve the type of JSX Element.
+ var callSignature = getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, /*candidatesOutArray*/ undefined);
+ if (callSignature !== unknownSignature) {
+ var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
+ var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ // Intersect in JSX.IntrinsicAttributes if it exists
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ paramType = intersectTypes(intrinsicAttributes, paramType);
+ }
+ return paramType;
+ }
+ }
+ }
}
- if (elemType.flags & 65536 /* Union */) {
- var types = elemType.types;
- return getUnionType(ts.map(types, function (type) {
- return getResolvedJsxType(node, type, elemClassType);
+ return undefined;
+ }
+ /**
+ * Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
+ * Return all attributes type of resolved call signature including candidate signatures.
+ * This function assumes that the caller handled other possible element type of the JSX element.
+ * This function is a behavior used by language service when looking up completion in JSX element.
+ * @param openingLikeElement a JSX opening-like element to find attributes type
+ * @param elementType a type of the opening-like element. This elementType can't be an union type
+ * @param elemInstanceType an element instance type (the result of newing or invoking this tag)
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global
+ */
+ function tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
+ // Is this is a stateless function component? See if its single signature's return type is assignable to the JSX Element Type
+ var jsxStatelessElementType = getJsxGlobalStatelessElementType();
+ if (jsxStatelessElementType) {
+ // We don't call getResolvedSignature because here we have already resolve the type of JSX Element.
+ var candidatesOutArray = [];
+ getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray);
+ var result = void 0;
+ var allMatchingAttributesType = void 0;
+ for (var _i = 0, candidatesOutArray_1 = candidatesOutArray; _i < candidatesOutArray_1.length; _i++) {
+ var candidate = candidatesOutArray_1[_i];
+ var callReturnType = getReturnTypeOfSignature(candidate);
+ var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
+ var shouldBeCandidate = true;
+ for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
+ var attribute = _b[_a];
+ if (ts.isJsxAttribute(attribute) &&
+ isUnhyphenatedJsxName(attribute.name.text) &&
+ !getPropertyOfType(paramType, attribute.name.text)) {
+ shouldBeCandidate = false;
+ break;
+ }
+ }
+ if (shouldBeCandidate) {
+ result = intersectTypes(result, paramType);
+ }
+ allMatchingAttributesType = intersectTypes(allMatchingAttributesType, paramType);
+ }
+ }
+ // If we can't find any matching, just return everything.
+ if (!result) {
+ result = allMatchingAttributesType;
+ }
+ // Intersect in JSX.IntrinsicAttributes if it exists
+ var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
+ if (intrinsicAttributes !== unknownType) {
+ result = intersectTypes(intrinsicAttributes, result);
+ }
+ return result;
+ }
+ }
+ return undefined;
+ }
+ /**
+ * Resolve attributes type of the given opening-like element. The attributes type is a type of attributes associated with the given elementType.
+ * For instance:
+ * declare function Foo(attr: { p1: string}): JSX.Element;
+ * <Foo p1={10} />; // This function will try resolve "Foo" and return an attributes type of "Foo" which is "{ p1: string }"
+ *
+ * The function is intended to initially be called from getAttributesTypeFromJsxOpeningLikeElement which already handle JSX-intrinsic-element..
+ * This function will try to resolve custom JSX attributes type in following order: string literal, stateless function, and stateful component
+ *
+ * @param openingLikeElement a non-intrinsic JSXOPeningLikeElement
+ * @param shouldIncludeAllStatelessAttributesType a boolean indicating whether to include all attributes types from all stateless function signature
+ * @param elementType an instance type of the given opening-like element. If undefined, the function will check type openinglikeElement's tagname.
+ * @param elementClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global (imported from react.d.ts)
+ * @return attributes type if able to resolve the type of node
+ * anyType if there is no type ElementAttributesProperty or there is an error
+ * emptyObjectType if there is no "prop" in the element instance type
+ */
+ function resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, elementType, elementClassType) {
+ if (!elementType) {
+ elementType = checkExpression(openingLikeElement.tagName);
+ }
+ if (elementType.flags & 65536 /* Union */) {
+ var types = elementType.types;
+ return getUnionType(types.map(function (type) {
+ return resolveCustomJsxElementAttributesType(openingLikeElement, shouldIncludeAllStatelessAttributesType, type, elementClassType);
}), /*subtypeReduction*/ true);
}
// If the elemType is a string type, we have to return anyType to prevent an error downstream as we will try to find construct or call signature of the type
- if (elemType.flags & 2 /* String */) {
+ if (elementType.flags & 2 /* String */) {
return anyType;
}
- else if (elemType.flags & 32 /* StringLiteral */) {
+ else if (elementType.flags & 32 /* StringLiteral */) {
// If the elemType is a stringLiteral type, we can then provide a check to make sure that the string literal type is one of the Jsx intrinsic element type
+ // For example:
+ // var CustomTag: "h1" = "h1";
+ // <CustomTag> Hello World </CustomTag>
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elemType.text;
+ var stringLiteralTypeName = elementType.text;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -34879,34 +37826,24 @@ var ts;
if (indexSignatureType) {
return indexSignatureType;
}
- error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
+ error(openingLikeElement, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
// If we need to report an error, we already done so here. So just return any to prevent any more error downstream
return anyType;
}
// Get the element instance type (the result of newing or invoking this tag)
- var elemInstanceType = getJsxElementInstanceType(node, elemType);
- if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) {
- // Is this is a stateless function component? See if its single signature's return type is
- // assignable to the JSX Element Type
- if (jsxElementType) {
- var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */);
- var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0];
- var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
- var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
- if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) {
- // Intersect in JSX.IntrinsicAttributes if it exists
- var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
- if (intrinsicAttributes !== unknownType) {
- paramType = intersectTypes(intrinsicAttributes, paramType);
- }
- return paramType;
- }
- }
+ var elemInstanceType = getJsxElementInstanceType(openingLikeElement, elementType);
+ // If we should include all stateless attributes type, then get all attributes type from all stateless function signature.
+ // Otherwise get only attributes type from the signature picked by choose-overload logic.
+ var statelessAttributesType = shouldIncludeAllStatelessAttributesType ?
+ tryGetAllJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) :
+ defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType);
+ if (statelessAttributesType) {
+ return statelessAttributesType;
}
// Issue an error if this return type isn't assignable to JSX.ElementClass
- if (elemClassType) {
- checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
+ if (elementClassType) {
+ checkTypeRelatedTo(elemInstanceType, elementClassType, assignableRelation, openingLikeElement, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);
}
if (isTypeAny(elemInstanceType)) {
return elemInstanceType;
@@ -34930,11 +37867,6 @@ var ts;
// Props is of type 'any' or unknown
return attributesType;
}
- else if (attributesType.flags & 65536 /* Union */) {
- // Props cannot be a union type
- error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType));
- return anyType;
- }
else {
// Normal case -- add in IntrinsicClassElements<T> and IntrinsicElements
var apparentAttributesType = attributesType;
@@ -34959,30 +37891,68 @@ var ts;
}
}
/**
- * Given an opening/self-closing element, get the 'element attributes type', i.e. the type that tells
- * us which attributes are valid on a given element.
+ * Get attributes type of the given intrinsic opening-like Jsx element by resolving the tag name.
+ * The function is intended to be called from a function which has checked that the opening element is an intrinsic element.
+ * @param node an intrinsic JSX opening-like element
*/
- function getJsxElementAttributesType(node) {
+ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
+ ts.Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
var links = getNodeLinks(node);
- if (!links.resolvedJsxType) {
- if (isJsxIntrinsicIdentifier(node.tagName)) {
- var symbol = getIntrinsicTagSymbol(node);
- if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {
- return links.resolvedJsxType = getTypeOfSymbol(symbol);
- }
- else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
- return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0 /* String */).type;
- }
- else {
- return links.resolvedJsxType = unknownType;
- }
+ if (!links.resolvedJsxElementAttributesType) {
+ var symbol = getIntrinsicTagSymbol(node);
+ if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {
+ return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+ }
+ else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
+ return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, 0 /* String */).type;
}
else {
- var elemClassType = getJsxGlobalElementClassType();
- return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType);
+ return links.resolvedJsxElementAttributesType = unknownType;
}
}
- return links.resolvedJsxType;
+ return links.resolvedJsxElementAttributesType;
+ }
+ /**
+ * Get attributes type of the given custom opening-like JSX element.
+ * This function is intended to be called from a caller that handles intrinsic JSX element already.
+ * @param node a custom JSX opening-like element
+ * @param shouldIncludeAllStatelessAttributesType a boolean value used by language service to get all possible attributes type from an overload stateless function component
+ */
+ function getCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType) {
+ var links = getNodeLinks(node);
+ if (!links.resolvedJsxElementAttributesType) {
+ var elemClassType = getJsxGlobalElementClassType();
+ return links.resolvedJsxElementAttributesType = resolveCustomJsxElementAttributesType(node, shouldIncludeAllStatelessAttributesType, /*elementType*/ undefined, elemClassType);
+ }
+ return links.resolvedJsxElementAttributesType;
+ }
+ /**
+ * Get all possible attributes type, especially from an overload stateless function component, of the given JSX opening-like element.
+ * This function is called by language service (see: completions-tryGetGlobalSymbols).
+ * @param node a JSX opening-like element to get attributes type for
+ */
+ function getAllAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ // Because in language service, the given JSX opening-like element may be incomplete and therefore,
+ // we can't resolve to exact signature if the element is a stateless function component so the best thing to do is return all attributes type from all overloads.
+ return getCustomJsxElementAttributesType(node, /*shouldIncludeAllStatelessAttributesType*/ true);
+ }
+ }
+ /**
+ * Get the attributes type, which indicates the attributes that are valid on the given JSXOpeningLikeElement.
+ * @param node a JSXOpeningLikeElement node
+ * @return an attributes type of the given node
+ */
+ function getAttributesTypeFromJsxOpeningLikeElement(node) {
+ if (isJsxIntrinsicIdentifier(node.tagName)) {
+ return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
+ }
+ else {
+ return getCustomJsxElementAttributesType(node, /*shouldIncludeAllStatelessAttributesType*/ false);
+ }
}
/**
* Given a JSX attribute, returns the symbol for the corresponds property
@@ -34990,17 +37960,34 @@ var ts;
* that have no matching element attributes type property.
*/
function getJsxAttributePropertySymbol(attrib) {
- var attributesType = getJsxElementAttributesType(attrib.parent);
+ var attributesType = getAttributesTypeFromJsxOpeningLikeElement(attrib.parent.parent);
var prop = getPropertyOfType(attributesType, attrib.name.text);
return prop || unknownSymbol;
}
function getJsxGlobalElementClassType() {
- if (!jsxElementClassType) {
- jsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
+ if (!deferredJsxElementClassType) {
+ deferredJsxElementClassType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.ElementClass);
}
- return jsxElementClassType;
+ return deferredJsxElementClassType;
}
- /// Returns all the properties of the Jsx.IntrinsicElements interface
+ function getJsxGlobalElementType() {
+ if (!deferredJsxElementType) {
+ deferredJsxElementType = getExportedTypeFromNamespace(JsxNames.JSX, JsxNames.Element);
+ }
+ return deferredJsxElementType;
+ }
+ function getJsxGlobalStatelessElementType() {
+ if (!deferredJsxStatelessElementType) {
+ var jsxElementType = getJsxGlobalElementType();
+ if (jsxElementType) {
+ deferredJsxStatelessElementType = getUnionType([jsxElementType, nullType]);
+ }
+ }
+ return deferredJsxStatelessElementType;
+ }
+ /**
+ * Returns all the properties of the Jsx.IntrinsicElements interface
+ */
function getJsxIntrinsicTagNames() {
var intrinsics = getJsxType(JsxNames.IntrinsicElements);
return intrinsics ? getPropertiesOfType(intrinsics) : emptyArray;
@@ -35010,8 +37997,8 @@ var ts;
if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) {
error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
}
- if (jsxElementType === undefined) {
- if (compilerOptions.noImplicitAny) {
+ if (getJsxGlobalElementType() === undefined) {
+ if (noImplicitAny) {
error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
}
}
@@ -35033,39 +38020,46 @@ var ts;
markAliasSymbolAsReferenced(reactSym);
}
}
- var targetAttributesType = getJsxElementAttributesType(node);
- var nameTable = ts.createMap();
- // Process this array in right-to-left order so we know which
- // attributes (mostly from spreads) are being overwritten and
- // thus should have their types ignored
- var sawSpreadedAny = false;
- for (var i = node.attributes.length - 1; i >= 0; i--) {
- if (node.attributes[i].kind === 250 /* JsxAttribute */) {
- checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable);
- }
- else {
- ts.Debug.assert(node.attributes[i].kind === 251 /* JsxSpreadAttribute */);
- var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable);
- if (isTypeAny(spreadType)) {
- sawSpreadedAny = true;
- }
- }
+ checkJsxAttributesAssignableToTagNameAttributes(node);
+ }
+ /**
+ * Check whether the given attributes of JSX opening-like element is assignable to the tagName attributes.
+ * Get the attributes type of the opening-like element through resolving the tagName, "target attributes"
+ * Check assignablity between given attributes property, "source attributes", and the "target attributes"
+ * @param openingLikeElement an opening-like JSX element to check its JSXAttributes
+ */
+ function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
+ // The function involves following steps:
+ // 1. Figure out expected attributes type by resolving tagName of the JSX opening-like element, targetAttributesType.
+ // During these steps, we will try to resolve the tagName as intrinsic name, stateless function, stateful component (in the order)
+ // 2. Solved JSX attributes type given by users, sourceAttributesType, which is by resolving "attributes" property of the JSX opening-like element.
+ // 3. Check if the two are assignable to each other
+ // targetAttributesType is a type of an attributes from resolving tagName of an opening-like JSX element.
+ var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
+ getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
+ getCustomJsxElementAttributesType(openingLikeElement, /*shouldIncludeAllStatelessAttributesType*/ false);
+ // sourceAttributesType is a type of an attributes properties.
+ // i.e <div attr1={10} attr2="string" />
+ // attr1 and attr2 are treated as JSXAttributes attached in the JsxOpeningLikeElement as "attributes".
+ var sourceAttributesType = createJsxAttributesTypeFromAttributesProperty(openingLikeElement, function (attribute) {
+ return isUnhyphenatedJsxName(attribute.name) || !!(getPropertyOfType(targetAttributesType, attribute.name));
+ });
+ // If the targetAttributesType is an emptyObjectType, indicating that there is no property named 'props' on this instance type.
+ // but there exists a sourceAttributesType, we need to explicitly give an error as normal assignability check allow excess properties and will pass.
+ if (targetAttributesType === emptyObjectType && (isTypeAny(sourceAttributesType) || sourceAttributesType.properties.length > 0)) {
+ error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
- // Check that all required properties have been provided. If an 'any'
- // was spreaded in, though, assume that it provided all required properties
- if (targetAttributesType && !sawSpreadedAny) {
- var targetProperties = getPropertiesOfType(targetAttributesType);
- for (var i = 0; i < targetProperties.length; i++) {
- if (!(targetProperties[i].flags & 536870912 /* Optional */) &&
- !nameTable[targetProperties[i].name]) {
- error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType));
- }
- }
+ else {
+ checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
}
}
- function checkJsxExpression(node) {
+ function checkJsxExpression(node, checkMode) {
if (node.expression) {
- return checkExpression(node.expression);
+ var type = checkExpression(node.expression, checkMode);
+ if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
+ error(node, ts.Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
+ }
+ return type;
}
else {
return unknownType;
@@ -35074,14 +38068,32 @@ var ts;
// If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized
// '.prototype' property as well as synthesized tuple index properties.
function getDeclarationKindFromSymbol(s) {
- return s.valueDeclaration ? s.valueDeclaration.kind : 147 /* PropertyDeclaration */;
+ return s.valueDeclaration ? s.valueDeclaration.kind : 148 /* PropertyDeclaration */;
}
function getDeclarationModifierFlagsFromSymbol(s) {
- return s.valueDeclaration ? ts.getCombinedModifierFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 4 /* Public */ | 32 /* Static */ : 0;
+ if (s.valueDeclaration) {
+ var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+ return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */;
+ }
+ if (getCheckFlags(s) & 6 /* Synthetic */) {
+ var checkFlags = s.checkFlags;
+ var accessModifier = checkFlags & 256 /* ContainsPrivate */ ? 8 /* Private */ :
+ checkFlags & 64 /* ContainsPublic */ ? 4 /* Public */ :
+ 16 /* Protected */;
+ var staticModifier = checkFlags & 512 /* ContainsStatic */ ? 32 /* Static */ : 0;
+ return accessModifier | staticModifier;
+ }
+ if (s.flags & 16777216 /* Prototype */) {
+ return 4 /* Public */ | 32 /* Static */;
+ }
+ return 0;
}
function getDeclarationNodeFlagsFromSymbol(s) {
return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : 0;
}
+ function isMethodLike(symbol) {
+ return !!(symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */);
+ }
/**
* Check whether the requested property access is valid.
* Returns true if node is a valid property access, and false otherwise.
@@ -35090,12 +38102,16 @@ var ts;
* @param type The type of left.
* @param prop The symbol for the right hand side of the property access.
*/
- function checkClassPropertyAccess(node, left, type, prop) {
+ function checkPropertyAccessibility(node, left, type, prop) {
var flags = getDeclarationModifierFlagsFromSymbol(prop);
- var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop));
- var errorNode = node.kind === 177 /* PropertyAccessExpression */ || node.kind === 223 /* VariableDeclaration */ ?
+ var errorNode = node.kind === 178 /* PropertyAccessExpression */ || node.kind === 225 /* VariableDeclaration */ ?
node.name :
node.right;
+ if (getCheckFlags(prop) & 256 /* ContainsPrivate */) {
+ // Synthetic property with private constituent property
+ error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
+ return false;
+ }
if (left.kind === 96 /* SuperKeyword */) {
// TS 1.0 spec (April 2014): 4.8.2
// - In a constructor, instance member function, instance member accessor, or
@@ -35104,18 +38120,22 @@ var ts;
// - In a static member function or static member accessor
// where this references the constructor function object of a derived class,
// a super property access is permitted and must specify a public static member function of the base class.
- if (languageVersion < 2 /* ES2015 */ && getDeclarationKindFromSymbol(prop) !== 149 /* MethodDeclaration */) {
- // `prop` refers to a *property* declared in the super class
- // rather than a *method*, so it does not satisfy the above criteria.
- error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
- return false;
+ if (languageVersion < 2 /* ES2015 */) {
+ var hasNonMethodDeclaration = forEachProperty(prop, function (p) {
+ var propKind = getDeclarationKindFromSymbol(p);
+ return propKind !== 150 /* MethodDeclaration */ && propKind !== 149 /* MethodSignature */;
+ });
+ if (hasNonMethodDeclaration) {
+ error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+ return false;
+ }
}
if (flags & 128 /* Abstract */) {
// A method cannot be accessed in a super property access if the method is abstract.
// This error could mask a private property access error. But, a member
// cannot simultaneously be private and abstract, so this will trigger an
// additional error elsewhere.
- error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
}
@@ -35128,7 +38148,7 @@ var ts;
if (flags & 8 /* Private */) {
var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
- error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
return false;
}
return true;
@@ -35138,14 +38158,15 @@ var ts;
if (left.kind === 96 /* SuperKeyword */) {
return true;
}
- // Get the enclosing class that has the declaring class as its base type
+ // Find the first enclosing class that has the declaring classes of the protected constituents
+ // of the property as base classes
var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
- return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined;
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
});
// A protected property is accessible if the property is within the declaring class or classes derived from it
if (!enclosingClass) {
- error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
+ error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
return false;
}
// No further restrictions for static properties
@@ -35157,7 +38178,6 @@ var ts;
// get the original type -- represented as the type constraint of the 'this' type
type = getConstraintOfTypeParameter(type);
}
- // TODO: why is the first part of this check here?
if (!(getObjectFlags(getTargetType(type)) & 3 /* ClassOrInterface */ && hasBaseType(type, enclosingClass))) {
error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass));
return false;
@@ -35165,16 +38185,17 @@ var ts;
return true;
}
function checkNonNullExpression(node) {
- var type = checkExpression(node);
- if (strictNullChecks) {
- var kind = getFalsyFlags(type) & 6144 /* Nullable */;
- if (kind) {
- error(node, kind & 2048 /* Undefined */ ? kind & 4096 /* Null */ ?
- ts.Diagnostics.Object_is_possibly_null_or_undefined :
- ts.Diagnostics.Object_is_possibly_undefined :
- ts.Diagnostics.Object_is_possibly_null);
- }
- return getNonNullableType(type);
+ return checkNonNullType(checkExpression(node), node);
+ }
+ function checkNonNullType(type, errorNode) {
+ var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 6144 /* Nullable */;
+ if (kind) {
+ error(errorNode, kind & 2048 /* Undefined */ ? kind & 4096 /* Null */ ?
+ ts.Diagnostics.Object_is_possibly_null_or_undefined :
+ ts.Diagnostics.Object_is_possibly_undefined :
+ ts.Diagnostics.Object_is_possibly_null);
+ var t = getNonNullableType(type);
+ return t.flags & (6144 /* Nullable */ | 8192 /* Never */) ? unknownType : t;
}
return type;
}
@@ -35203,7 +38224,7 @@ var ts;
noUnusedIdentifiers &&
(prop.flags & 106500 /* ClassMember */) &&
prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
- if (prop.flags & 16777216 /* Instantiated */) {
+ if (getCheckFlags(prop) & 1 /* Instantiated */) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
@@ -35211,6 +38232,15 @@ var ts;
}
}
}
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 148 /* PropertyDeclaration */ && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
var type = checkNonNullExpression(left);
if (isTypeAny(type) || type === silentNeverType) {
@@ -35223,16 +38253,30 @@ var ts;
}
var prop = getPropertyOfType(apparentType, right.text);
if (!prop) {
+ var stringIndexType = getIndexTypeOfType(apparentType, 0 /* String */);
+ if (stringIndexType) {
+ return stringIndexType;
+ }
if (right.text && !checkAndReportErrorForExtendingInterface(node)) {
reportNonexistentProperty(right, type.flags & 16384 /* TypeParameter */ && type.isThisType ? apparentType : type);
}
return unknownType;
}
+ if (prop.valueDeclaration) {
+ if (isInPropertyInitializer(node) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, right.text);
+ }
+ if (prop.valueDeclaration.kind === 228 /* ClassDeclaration */ &&
+ node.parent && node.parent.kind !== 158 /* TypeReference */ &&
+ !ts.isInAmbientContext(prop.valueDeclaration) &&
+ !isBlockScopedNameDeclaredBeforeUse(prop.valueDeclaration, right)) {
+ error(right, ts.Diagnostics.Class_0_used_before_its_declaration, right.text);
+ }
+ }
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
- if (prop.parent && prop.parent.flags & 32 /* Class */) {
- checkClassPropertyAccess(node, left, apparentType, prop);
- }
+ checkPropertyAccessibility(node, left, apparentType, prop);
var propType = getTypeOfSymbol(prop);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -35244,23 +38288,23 @@ var ts;
// Only compute control flow type if this is a property access expression that isn't an
// assignment target, and the referenced property was declared as a variable, property,
// accessor, or optional method.
- if (node.kind !== 177 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ ||
+ if (node.kind !== 178 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ ||
!(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) &&
!(prop.flags & 8192 /* Method */ && propType.flags & 65536 /* Union */)) {
return propType;
}
- var flowType = getFlowTypeOfReference(node, propType, /*assumeInitialized*/ true, /*flowContainer*/ undefined);
+ var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
function isValidPropertyAccess(node, propertyName) {
- var left = node.kind === 177 /* PropertyAccessExpression */
+ var left = node.kind === 178 /* PropertyAccessExpression */
? node.expression
: node.left;
var type = checkExpression(left);
if (type !== unknownType && !isTypeAny(type)) {
var prop = getPropertyOfType(getWidenedType(type), propertyName);
- if (prop && prop.parent && prop.parent.flags & 32 /* Class */) {
- return checkClassPropertyAccess(node, left, type, prop);
+ if (prop) {
+ return checkPropertyAccessibility(node, left, type, prop);
}
}
return true;
@@ -35270,7 +38314,7 @@ var ts;
*/
function getForInVariableSymbol(node) {
var initializer = node.initializer;
- if (initializer.kind === 224 /* VariableDeclarationList */) {
+ if (initializer.kind === 226 /* VariableDeclarationList */) {
var variable = initializer.declarations[0];
if (variable && !ts.isBindingPattern(variable.name)) {
return getSymbolOfNode(variable);
@@ -35299,7 +38343,7 @@ var ts;
var child = expr;
var node = expr.parent;
while (node) {
- if (node.kind === 212 /* ForInStatement */ &&
+ if (node.kind === 214 /* ForInStatement */ &&
child === node.statement &&
getForInVariableSymbol(node) === symbol &&
hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -35317,7 +38361,7 @@ var ts;
var indexExpression = node.argumentExpression;
if (!indexExpression) {
var sourceFile = ts.getSourceFileOfNode(node);
- if (node.parent.kind === 180 /* NewExpression */ && node.parent.expression === node) {
+ if (node.parent.kind === 181 /* NewExpression */ && node.parent.expression === node) {
var start = ts.skipTrivia(sourceFile.text, node.expression.end);
var end = node.end;
grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
@@ -35337,7 +38381,7 @@ var ts;
error(indexExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
return unknownType;
}
- return getIndexedAccessType(objectType, indexType, node);
+ return checkIndexedAccessIndexType(getIndexedAccessType(objectType, indexType, node), node);
}
function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
if (expressionType === unknownType) {
@@ -35361,7 +38405,7 @@ var ts;
if (!leftHandSideSymbol) {
return false;
}
- var globalESSymbol = getGlobalESSymbolConstructorSymbol();
+ var globalESSymbol = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ true);
if (!globalESSymbol) {
// Already errored when we tried to look up the symbol
return false;
@@ -35375,10 +38419,10 @@ var ts;
return true;
}
function resolveUntypedCall(node) {
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
checkExpression(node.template);
}
- else if (node.kind !== 145 /* Decorator */) {
+ else if (node.kind !== 146 /* Decorator */) {
ts.forEach(node.arguments, function (argument) {
checkExpression(argument);
});
@@ -35405,16 +38449,16 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
- var signature = signatures_2[_i];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
- var parent_8 = signature.declaration && signature.declaration.parent;
+ var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
- if (lastParent && parent_8 === lastParent) {
+ if (lastParent && parent === lastParent) {
index++;
}
else {
- lastParent = parent_8;
+ lastParent = parent;
index = cutoffIndex;
}
}
@@ -35422,7 +38466,7 @@ var ts;
// current declaration belongs to a different symbol
// set cutoffIndex so re-orderings in the future won't change result set from 0 to cutoffIndex
index = cutoffIndex = result.length;
- lastParent = parent_8;
+ lastParent = parent;
}
lastSymbol = symbol;
// specialized signatures always need to be placed before non-specialized signatures regardless
@@ -35444,7 +38488,7 @@ var ts;
function getSpreadArgumentIndex(args) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
- if (arg && arg.kind === 196 /* SpreadElement */) {
+ if (arg && arg.kind === 197 /* SpreadElement */) {
return i;
}
}
@@ -35457,13 +38501,17 @@ var ts;
var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments
var isDecorator;
var spreadArgIndex = -1;
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ // The arity check will be done in "checkApplicableSignatureForJsxOpeningLikeElement".
+ return true;
+ }
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
var tagExpression = node;
// Even if the call is incomplete, we'll have a missing expression as our last argument,
// so we can say the count is just the arg list length
argCount = args.length;
typeArguments = undefined;
- if (tagExpression.template.kind === 194 /* TemplateExpression */) {
+ if (tagExpression.template.kind === 195 /* TemplateExpression */) {
// If a tagged template expression lacks a tail literal, the call is incomplete.
// Specifically, a template only can end in a TemplateTail or a Missing literal.
var templateExpression = tagExpression.template;
@@ -35480,7 +38528,7 @@ var ts;
callIsIncomplete = !!templateLiteral.isUnterminated;
}
}
- else if (node.kind === 145 /* Decorator */) {
+ else if (node.kind === 146 /* Decorator */) {
isDecorator = true;
typeArguments = undefined;
argCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature);
@@ -35489,19 +38537,21 @@ var ts;
var callExpression = node;
if (!callExpression.arguments) {
// This only happens when we have something of the form: 'new C'
- ts.Debug.assert(callExpression.kind === 180 /* NewExpression */);
+ ts.Debug.assert(callExpression.kind === 181 /* NewExpression */);
return signature.minArgumentCount === 0;
}
argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;
- // If we are missing the close paren, the call is incomplete.
+ // If we are missing the close parenthesis, the call is incomplete.
callIsIncomplete = callExpression.arguments.end === callExpression.end;
typeArguments = callExpression.typeArguments;
spreadArgIndex = getSpreadArgumentIndex(args);
}
// If the user supplied type arguments, but the number of type arguments does not match
// the declared number of type parameters, the call has an incorrect arity.
+ var numTypeParameters = ts.length(signature.typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);
var hasRightNumberOfTypeArgs = !typeArguments ||
- (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
+ (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters);
if (!hasRightNumberOfTypeArgs) {
return false;
}
@@ -35531,10 +38581,10 @@ var ts;
}
// Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec)
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, /*inferUnionTypes*/ true);
+ var context = createInferenceContext(signature, /*inferUnionTypes*/ true, /*useAnyForNoInferences*/ false);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
// Type parameters from outer context referenced by source type are fixed by instantiation of the source type
- inferTypes(context, instantiateType(source, contextualMapper), target);
+ inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
});
return getSignatureInstantiation(signature, getInferredTypes(context));
}
@@ -35565,7 +38615,7 @@ var ts;
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypes(context, thisArgumentType, thisType);
+ inferTypesWithContext(context, thisArgumentType, thisType);
}
// We perform two passes over the arguments. In the first pass we infer from all arguments, but use
// wildcards for all context sensitive function expressions.
@@ -35573,7 +38623,7 @@ var ts;
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
// If the effective argument is 'undefined', then it is an argument that is present but is synthetic.
- if (arg === undefined || arg.kind !== 198 /* OmittedExpression */) {
+ if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) {
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
// If the effective argument type is 'undefined', there is no synthetic type
@@ -35584,7 +38634,7 @@ var ts;
var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypes(context, argType, paramType);
+ inferTypesWithContext(context, argType, paramType);
}
}
// In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this
@@ -35598,7 +38648,7 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
}
}
}
@@ -35608,7 +38658,7 @@ var ts;
var typeParameters = signature.typeParameters;
var typeArgumentsAreAssignable = true;
var mapper;
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < typeArgumentNodes.length; i++) {
if (typeArgumentsAreAssignable /* so far */) {
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
@@ -35628,9 +38678,44 @@ var ts;
}
return typeArgumentsAreAssignable;
}
+ /**
+ * Check if the given signature can possibly be a signature called by the JSX opening-like element.
+ * @param node a JSX opening-like element we are trying to figure its call signature
+ * @param signature a candidate signature we are trying whether it is a call signature
+ * @param relation a relationship to check parameter and argument type
+ * @param excludeArgument
+ */
+ function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation) {
+ // JSX opening-like element has correct arity for stateless-function component if the one of the following condition is true:
+ // 1. callIsIncomplete
+ // 2. attributes property has same number of properties as the parameter object type.
+ // We can figure that out by resolving attributes property and check number of properties in the resolved type
+ // If the call has correct arity, we will then check if the argument type and parameter type is assignable
+ var callIsIncomplete = node.attributes.end === node.end; // If we are missing the close "/>", the call is incomplete
+ if (callIsIncomplete) {
+ return true;
+ }
+ var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;
+ // Stateless function components can have maximum of three arguments: "props", "context", and "updater".
+ // However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props,
+ // can be specified by users through attributes property.
+ var paramType = getTypeAtPosition(signature, 0);
+ var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*contextualMapper*/ undefined);
+ var argProperties = getPropertiesOfType(attributesType);
+ for (var _i = 0, argProperties_1 = argProperties; _i < argProperties_1.length; _i++) {
+ var arg = argProperties_1[_i];
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
+ return false;
+ }
+ }
+ return checkTypeRelatedTo(attributesType, paramType, relation, /*errorNode*/ undefined, headMessage);
+ }
function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
+ if (ts.isJsxOpeningLikeElement(node)) {
+ return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation);
+ }
var thisType = getThisTypeOfSignature(signature);
- if (thisType && thisType !== voidType && node.kind !== 180 /* NewExpression */) {
+ if (thisType && thisType !== voidType && node.kind !== 181 /* NewExpression */) {
// If the called expression is not of the form `x.f` or `x["f"]`, then sourceType = voidType
// If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible.
// If the expression is a new expression, then the check is skipped.
@@ -35647,7 +38732,7 @@ var ts;
for (var i = 0; i < argCount; i++) {
var arg = getEffectiveArgument(node, args, i);
// If the effective argument is 'undefined', then it is an argument that is present but is synthetic.
- if (arg === undefined || arg.kind !== 198 /* OmittedExpression */) {
+ if (arg === undefined || arg.kind !== 199 /* OmittedExpression */) {
// Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter)
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
@@ -35669,12 +38754,12 @@ var ts;
* Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise.
*/
function getThisArgumentOfCall(node) {
- if (node.kind === 179 /* CallExpression */) {
+ if (node.kind === 180 /* CallExpression */) {
var callee = node.expression;
- if (callee.kind === 177 /* PropertyAccessExpression */) {
+ if (callee.kind === 178 /* PropertyAccessExpression */) {
return callee.expression;
}
- else if (callee.kind === 178 /* ElementAccessExpression */) {
+ else if (callee.kind === 179 /* ElementAccessExpression */) {
return callee.expression;
}
}
@@ -35690,53 +38775,56 @@ var ts;
*/
function getEffectiveCallArguments(node) {
var args;
- if (node.kind === 181 /* TaggedTemplateExpression */) {
+ if (node.kind === 182 /* TaggedTemplateExpression */) {
var template = node.template;
args = [undefined];
- if (template.kind === 194 /* TemplateExpression */) {
+ if (template.kind === 195 /* TemplateExpression */) {
ts.forEach(template.templateSpans, function (span) {
args.push(span.expression);
});
}
}
- else if (node.kind === 145 /* Decorator */) {
+ else if (node.kind === 146 /* Decorator */) {
// For a decorator, we return undefined as we will determine
// the number and types of arguments for a decorator using
// `getEffectiveArgumentCount` and `getEffectiveArgumentType` below.
return undefined;
}
+ else if (ts.isJsxOpeningLikeElement(node)) {
+ args = node.attributes.properties.length > 0 ? [node.attributes] : emptyArray;
+ }
else {
args = node.arguments || emptyArray;
}
return args;
}
/**
- * Returns the effective argument count for a node that works like a function invocation.
- * If 'node' is a Decorator, the number of arguments is derived from the decoration
- * target and the signature:
- * If 'node.target' is a class declaration or class expression, the effective argument
- * count is 1.
- * If 'node.target' is a parameter declaration, the effective argument count is 3.
- * If 'node.target' is a property declaration, the effective argument count is 2.
- * If 'node.target' is a method or accessor declaration, the effective argument count
- * is 3, although it can be 2 if the signature only accepts two arguments, allowing
- * us to match a property decorator.
- * Otherwise, the argument count is the length of the 'args' array.
- */
+ * Returns the effective argument count for a node that works like a function invocation.
+ * If 'node' is a Decorator, the number of arguments is derived from the decoration
+ * target and the signature:
+ * If 'node.target' is a class declaration or class expression, the effective argument
+ * count is 1.
+ * If 'node.target' is a parameter declaration, the effective argument count is 3.
+ * If 'node.target' is a property declaration, the effective argument count is 2.
+ * If 'node.target' is a method or accessor declaration, the effective argument count
+ * is 3, although it can be 2 if the signature only accepts two arguments, allowing
+ * us to match a property decorator.
+ * Otherwise, the argument count is the length of the 'args' array.
+ */
function getEffectiveArgumentCount(node, args, signature) {
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
// A class decorator will have one argument (see `ClassDecorator` in core.d.ts)
return 1;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// A property declaration decorator will have two arguments (see
// `PropertyDecorator` in core.d.ts)
return 2;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
// A method or accessor declaration decorator will have two or three arguments (see
// `PropertyDecorator` and `MethodDecorator` in core.d.ts)
// If we are emitting decorators for ES3, we will only pass two arguments.
@@ -35746,7 +38834,7 @@ var ts;
// If the method decorator signature only accepts a target and a key, we will only
// type check those arguments.
return signature.parameters.length >= 3 ? 3 : 2;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// A parameter declaration decorator will have three arguments (see
// `ParameterDecorator` in core.d.ts)
return 3;
@@ -35757,38 +38845,38 @@ var ts;
}
}
/**
- * Returns the effective type of the first argument to a decorator.
- * If 'node' is a class declaration or class expression, the effective argument type
- * is the type of the static side of the class.
- * If 'node' is a parameter declaration, the effective argument type is either the type
- * of the static or instance side of the class for the parameter's parent method,
- * depending on whether the method is declared static.
- * For a constructor, the type is always the type of the static side of the class.
- * If 'node' is a property, method, or accessor declaration, the effective argument
- * type is the type of the static or instance side of the parent class for class
- * element, depending on whether the element is declared static.
- */
+ * Returns the effective type of the first argument to a decorator.
+ * If 'node' is a class declaration or class expression, the effective argument type
+ * is the type of the static side of the class.
+ * If 'node' is a parameter declaration, the effective argument type is either the type
+ * of the static or instance side of the class for the parameter's parent method,
+ * depending on whether the method is declared static.
+ * For a constructor, the type is always the type of the static side of the class.
+ * If 'node' is a property, method, or accessor declaration, the effective argument
+ * type is the type of the static or instance side of the parent class for class
+ * element, depending on whether the element is declared static.
+ */
function getEffectiveDecoratorFirstArgumentType(node) {
// The first argument to a decorator is its `target`.
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
// For a class decorator, the `target` is the type of the class (e.g. the
// "static" or "constructor" side of the class)
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
// For a parameter decorator, the `target` is the parent type of the
// parameter's containing method.
node = node.parent;
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
var classSymbol = getSymbolOfNode(node);
return getTypeOfSymbol(classSymbol);
}
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// For a property or method decorator, the `target` is the
// "static"-side type of the parent of the member if the member is
// declared "static"; otherwise, it is the "instance"-side type of the
@@ -35799,37 +38887,39 @@ var ts;
return unknownType;
}
/**
- * Returns the effective type for the second argument to a decorator.
- * If 'node' is a parameter, its effective argument type is one of the following:
- * If 'node.parent' is a constructor, the effective argument type is 'any', as we
- * will emit `undefined`.
- * If 'node.parent' is a member with an identifier, numeric, or string literal name,
- * the effective argument type will be a string literal type for the member name.
- * If 'node.parent' is a computed property name, the effective argument type will
- * either be a symbol type or the string type.
- * If 'node' is a member with an identifier, numeric, or string literal name, the
- * effective argument type will be a string literal type for the member name.
- * If 'node' is a computed property name, the effective argument type will either
- * be a symbol type or the string type.
- * A class decorator does not have a second argument type.
- */
+ * Returns the effective type for the second argument to a decorator.
+ * If 'node' is a parameter, its effective argument type is one of the following:
+ * If 'node.parent' is a constructor, the effective argument type is 'any', as we
+ * will emit `undefined`.
+ * If 'node.parent' is a member with an identifier, numeric, or string literal name,
+ * the effective argument type will be a string literal type for the member name.
+ * If 'node.parent' is a computed property name, the effective argument type will
+ * either be a symbol type or the string type.
+ * If 'node' is a member with an identifier, numeric, or string literal name, the
+ * effective argument type will be a string literal type for the member name.
+ * If 'node' is a computed property name, the effective argument type will either
+ * be a symbol type or the string type.
+ * A class decorator does not have a second argument type.
+ */
function getEffectiveDecoratorSecondArgumentType(node) {
// The second argument to a decorator is its `propertyKey`
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
ts.Debug.fail("Class decorators should not have a second synthetic argument.");
return unknownType;
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
node = node.parent;
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
// For a constructor parameter decorator, the `propertyKey` will be `undefined`.
return anyType;
}
+ // For a non-constructor parameter decorator, the `propertyKey` will be either
+ // a string or a symbol, based on the name of the parameter's containing method.
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// The `propertyKey` for a property or method decorator will be a
// string literal type if the member name is an identifier, number, or string;
// otherwise, if the member name is a computed property name it will
@@ -35840,7 +38930,7 @@ var ts;
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
return getLiteralTypeForText(32 /* StringLiteral */, element.name.text);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512 /* ESSymbol */)) {
return nameType;
@@ -35857,30 +38947,30 @@ var ts;
return unknownType;
}
/**
- * Returns the effective argument type for the third argument to a decorator.
- * If 'node' is a parameter, the effective argument type is the number type.
- * If 'node' is a method or accessor, the effective argument type is a
- * `TypedPropertyDescriptor<T>` instantiated with the type of the member.
- * Class and property decorators do not have a third effective argument.
- */
+ * Returns the effective argument type for the third argument to a decorator.
+ * If 'node' is a parameter, the effective argument type is the number type.
+ * If 'node' is a method or accessor, the effective argument type is a
+ * `TypedPropertyDescriptor<T>` instantiated with the type of the member.
+ * Class and property decorators do not have a third effective argument.
+ */
function getEffectiveDecoratorThirdArgumentType(node) {
// The third argument to a decorator is either its `descriptor` for a method decorator
// or its `parameterIndex` for a parameter decorator
- if (node.kind === 226 /* ClassDeclaration */) {
+ if (node.kind === 228 /* ClassDeclaration */) {
ts.Debug.fail("Class decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 144 /* Parameter */) {
+ if (node.kind === 145 /* Parameter */) {
// The `parameterIndex` for a parameter decorator is always a number
return numberType;
}
- if (node.kind === 147 /* PropertyDeclaration */) {
+ if (node.kind === 148 /* PropertyDeclaration */) {
ts.Debug.fail("Property decorators should not have a third synthetic argument.");
return unknownType;
}
- if (node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// The `descriptor` for a method decorator will be a `TypedPropertyDescriptor<T>`
// for the type of the member.
var propertyType = getTypeOfNode(node);
@@ -35890,8 +38980,8 @@ var ts;
return unknownType;
}
/**
- * Returns the effective argument type for the provided argument to a decorator.
- */
+ * Returns the effective argument type for the provided argument to a decorator.
+ */
function getEffectiveDecoratorArgumentType(node, argIndex) {
if (argIndex === 0) {
return getEffectiveDecoratorFirstArgumentType(node.parent);
@@ -35906,16 +38996,16 @@ var ts;
return unknownType;
}
/**
- * Gets the effective argument type for an argument in a call expression.
- */
+ * Gets the effective argument type for an argument in a call expression.
+ */
function getEffectiveArgumentType(node, argIndex) {
// Decorators provide special arguments, a tagged template expression provides
// a special first argument, and string literals get string literal types
// unless we're reporting errors
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
return getEffectiveDecoratorArgumentType(node, argIndex);
}
- else if (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */) {
+ else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) {
return getGlobalTemplateStringsArrayType();
}
// This is not a synthetic argument, so we return 'undefined'
@@ -35923,25 +39013,25 @@ var ts;
return undefined;
}
/**
- * Gets the effective argument expression for an argument in a call expression.
- */
+ * Gets the effective argument expression for an argument in a call expression.
+ */
function getEffectiveArgument(node, args, argIndex) {
// For a decorator or the first argument of a tagged template expression we return undefined.
- if (node.kind === 145 /* Decorator */ ||
- (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */)) {
+ if (node.kind === 146 /* Decorator */ ||
+ (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */)) {
return undefined;
}
return args[argIndex];
}
/**
- * Gets the error node to use when reporting errors for an effective argument.
- */
+ * Gets the error node to use when reporting errors for an effective argument.
+ */
function getEffectiveArgumentErrorNode(node, argIndex, arg) {
- if (node.kind === 145 /* Decorator */) {
+ if (node.kind === 146 /* Decorator */) {
// For a decorator, we use the expression of the decorator for error reporting.
return node.expression;
}
- else if (argIndex === 0 && node.kind === 181 /* TaggedTemplateExpression */) {
+ else if (argIndex === 0 && node.kind === 182 /* TaggedTemplateExpression */) {
// For a the first argument of a tagged template expression, we use the template of the tag for error reporting.
return node.template;
}
@@ -35950,16 +39040,31 @@ var ts;
}
}
function resolveCall(node, signatures, candidatesOutArray, headMessage) {
- var isTaggedTemplate = node.kind === 181 /* TaggedTemplateExpression */;
- var isDecorator = node.kind === 145 /* Decorator */;
+ var isTaggedTemplate = node.kind === 182 /* TaggedTemplateExpression */;
+ var isDecorator = node.kind === 146 /* Decorator */;
+ var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
var typeArguments;
- if (!isTaggedTemplate && !isDecorator) {
+ if (!isTaggedTemplate && !isDecorator && !isJsxOpeningOrSelfClosingElement) {
typeArguments = node.typeArguments;
// We already perform checking on the type arguments on the class declaration itself.
if (node.expression.kind !== 96 /* SuperKeyword */) {
ts.forEach(typeArguments, checkSourceElement);
}
}
+ if (signatures.length === 1) {
+ var declaration = signatures[0].declaration;
+ if (declaration && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration)) {
+ if (containsArgumentsReference(declaration)) {
+ var signatureWithRest = cloneSignature(signatures[0]);
+ var syntheticArgsSymbol = createSymbol(3 /* Variable */, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ signatureWithRest.parameters = ts.concatenate(signatureWithRest.parameters, [syntheticArgsSymbol]);
+ signatureWithRest.hasRestParameter = true;
+ signatures = [signatureWithRest];
+ }
+ }
+ }
var candidates = candidatesOutArray || [];
// reorderCandidates fills up the candidates array directly
reorderCandidates(signatures, candidates);
@@ -36022,7 +39127,7 @@ var ts;
var result;
// If we are in signature help, a trailing comma indicates that we intend to provide another argument,
// so we will only accept overloads with arity at least 1 higher than the current number of provided arguments.
- var signatureHelpTrailingComma = candidatesOutArray && node.kind === 179 /* CallExpression */ && node.arguments.hasTrailingComma;
+ var signatureHelpTrailingComma = candidatesOutArray && node.kind === 180 /* CallExpression */ && node.arguments.hasTrailingComma;
// Section 4.12.1:
// if the candidate list contains one or more signatures for which the type of each argument
// expression is a subtype of each corresponding parameter type, the return type of the first
@@ -36051,6 +39156,10 @@ var ts;
// If candidate is undefined, it means that no candidates had a suitable arity. In that case,
// skip the checkApplicableSignature check.
if (candidateForArgumentError) {
+ if (isJsxOpeningOrSelfClosingElement) {
+ // We do not report any error here because any error will be handled in "resolveCustomJsxElementAttributesType".
+ return candidateForArgumentError;
+ }
// excludeArgument is undefined, in this case also equivalent to [undefined, undefined, ...]
// The importance of excludeArgument is to prevent us from typing function expression parameters
// in arguments too early. If possible, we'd like to only type them once we know the correct
@@ -36072,7 +39181,7 @@ var ts;
if (headMessage) {
diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
}
- reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
+ reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
}
}
else {
@@ -36113,20 +39222,20 @@ var ts;
var candidate = void 0;
var typeArgumentsAreValid = void 0;
var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false)
+ ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false, /*useAnyForNoInferences*/ ts.isInJavaScriptFile(node))
: undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
- typeArgumentTypes = ts.map(typeArguments, getTypeFromTypeNode);
+ typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false);
}
else {
inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
typeArgumentTypes = inferenceContext.inferredTypes;
+ typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
}
if (!typeArgumentsAreValid) {
break;
@@ -36136,7 +39245,7 @@ var ts;
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) {
break;
}
- var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
+ var index = excludeArgument ? ts.indexOf(excludeArgument, /*value*/ true) : -1;
if (index < 0) {
return candidate;
}
@@ -36175,7 +39284,7 @@ var ts;
// with the type arguments specified in the extends clause.
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node));
if (baseTypeNode) {
- var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
+ var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
return resolveCall(node, baseConstructors, candidatesOutArray);
}
}
@@ -36329,12 +39438,13 @@ var ts;
if (containingClass) {
var containingType = getTypeOfNode(containingClass);
var baseTypes = getBaseTypes(containingType);
- if (baseTypes.length) {
+ while (baseTypes.length) {
var baseType = baseTypes[0];
if (modifiers & 16 /* Protected */ &&
baseType.symbol === declaration.parent.symbol) {
return true;
}
+ baseTypes = getBaseTypes(baseType);
}
}
if (modifiers & 8 /* Private */) {
@@ -36366,26 +39476,26 @@ var ts;
return resolveCall(node, callSignatures, candidatesOutArray);
}
/**
- * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression.
- */
+ * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression.
+ */
function getDiagnosticHeadMessageForDecoratorResolution(node) {
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
}
}
/**
- * Resolves a decorator as if it were a call expression.
- */
+ * Resolves a decorator as if it were a call expression.
+ */
function resolveDecorator(node, candidatesOutArray) {
var funcType = checkExpression(node.expression);
var apparentType = getApparentType(funcType);
@@ -36407,21 +39517,73 @@ var ts;
}
return resolveCall(node, callSignatures, candidatesOutArray, headMessage);
}
+ /**
+ * This function is similar to getResolvedSignature but is exclusively for trying to resolve JSX stateless-function component.
+ * The main reason we have to use this function instead of getResolvedSignature because, the caller of this function will already check the type of openingLikeElement's tagName
+ * and pass the type as elementType. The elementType can not be a union (as such case should be handled by the caller of this function)
+ * Note: at this point, we are still not sure whether the opening-like element is a stateless function component or not.
+ * @param openingLikeElement an opening-like JSX element to try to resolve as JSX stateless function
+ * @param elementType an element type of the opneing-like element by checking opening-like element's tagname.
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ */
+ function getResolvedJsxStatelessFunctionSignature(openingLikeElement, elementType, candidatesOutArray) {
+ ts.Debug.assert(!(elementType.flags & 65536 /* Union */));
+ var callSignature = resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray);
+ return callSignature;
+ }
+ /**
+ * Try treating a given opening-like element as stateless function component and resolve a tagName to a function signature.
+ * @param openingLikeElement an JSX opening-like element we want to try resolve its stateless function if possible
+ * @param elementType a type of the opening-like JSX element, a result of resolving tagName in opening-like element.
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ * @return a resolved signature if we can find function matching function signature through resolve call or a first signature in the list of functions.
+ * otherwise return undefined if tag-name of the opening-like element doesn't have call signatures
+ */
+ function resolveStatelessJsxOpeningLikeElement(openingLikeElement, elementType, candidatesOutArray) {
+ // If this function is called from language service, elementType can be a union type. This is not possible if the function is called from compiler (see: resolveCustomJsxElementAttributesType)
+ if (elementType.flags & 65536 /* Union */) {
+ var types = elementType.types;
+ var result = void 0;
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var type = types_18[_i];
+ result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
+ }
+ return result;
+ }
+ var callSignatures = elementType && getSignaturesOfType(elementType, 0 /* Call */);
+ if (callSignatures && callSignatures.length > 0) {
+ var callSignature = void 0;
+ callSignature = resolveCall(openingLikeElement, callSignatures, candidatesOutArray);
+ return callSignature;
+ }
+ return undefined;
+ }
function resolveSignature(node, candidatesOutArray) {
switch (node.kind) {
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return resolveCallExpression(node, candidatesOutArray);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return resolveNewExpression(node, candidatesOutArray);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return resolveTaggedTemplateExpression(node, candidatesOutArray);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return resolveDecorator(node, candidatesOutArray);
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ // This code-path is called by language service
+ return resolveStatelessJsxOpeningLikeElement(node, checkExpression(node.tagName), candidatesOutArray);
}
ts.Debug.fail("Branch in 'resolveSignature' should be unreachable.");
}
- // candidatesOutArray is passed by signature help in the language service, and collectCandidates
- // must fill it up with the appropriate candidate signatures
+ /**
+ * Resolve a signature of a given call-like expression.
+ * @param node a call-like expression to try resolve a signature for
+ * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service;
+ * the function will fill it up with appropriate candidate signatures
+ * @return a signature of the call-like expression or undefined if one can't be found
+ */
function getResolvedSignature(node, candidatesOutArray) {
var links = getNodeLinks(node);
// If getResolvedSignature has already been called, we will have cached the resolvedSignature.
@@ -36464,12 +39626,12 @@ var ts;
if (node.expression.kind === 96 /* SuperKeyword */) {
return voidType;
}
- if (node.kind === 180 /* NewExpression */) {
+ if (node.kind === 181 /* NewExpression */) {
var declaration = signature.declaration;
if (declaration &&
- declaration.kind !== 150 /* Constructor */ &&
- declaration.kind !== 154 /* ConstructSignature */ &&
- declaration.kind !== 159 /* ConstructorType */ &&
+ declaration.kind !== 151 /* Constructor */ &&
+ declaration.kind !== 155 /* ConstructSignature */ &&
+ declaration.kind !== 160 /* ConstructorType */ &&
!ts.isJSDocConstructSignature(declaration)) {
// When resolved signature is a call signature (and not a construct signature) the result type is any, unless
// the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations
@@ -36479,10 +39641,13 @@ var ts;
var funcSymbol = node.expression.kind === 70 /* Identifier */ ?
getResolvedSymbol(node.expression) :
checkExpression(node.expression).symbol;
- if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) {
+ if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
+ funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
+ }
+ if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16 /* Function */) {
return getInferredClassType(funcSymbol);
}
- else if (compilerOptions.noImplicitAny) {
+ else if (noImplicitAny) {
error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
}
return anyType;
@@ -36509,9 +39674,9 @@ var ts;
return false;
}
var targetDeclarationKind = resolvedRequire.flags & 16 /* Function */
- ? 225 /* FunctionDeclaration */
+ ? 227 /* FunctionDeclaration */
: resolvedRequire.flags & 3 /* Variable */
- ? 223 /* VariableDeclaration */
+ ? 225 /* VariableDeclaration */
: 0 /* Unknown */;
if (targetDeclarationKind !== 0 /* Unknown */) {
var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -36538,6 +39703,22 @@ var ts;
function checkNonNullAssertion(node) {
return getNonNullableType(checkExpression(node.expression));
}
+ function checkMetaProperty(node) {
+ checkGrammarMetaProperty(node);
+ var container = ts.getNewTargetContainer(node);
+ if (!container) {
+ error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
+ return unknownType;
+ }
+ else if (container.kind === 151 /* Constructor */) {
+ var symbol = getSymbolOfNode(container.parent);
+ return getTypeOfSymbol(symbol);
+ }
+ else {
+ var symbol = getSymbolOfNode(container);
+ return getTypeOfSymbol(symbol);
+ }
+ }
function getTypeOfParameter(symbol) {
var type = getTypeOfSymbol(symbol);
if (strictNullChecks) {
@@ -36553,13 +39734,16 @@ var ts;
pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType;
}
- function assignContextualParameterTypes(signature, context, mapper) {
+ function getTypeOfFirstParameterOfSignature(signature) {
+ return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ }
+ function assignContextualParameterTypes(signature, context, mapper, checkMode) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (isInferentialContext(mapper)) {
+ if (checkMode === 2 /* Inferential */) {
for (var i = 0; i < len; i++) {
var declaration = signature.parameters[i].valueDeclaration;
if (declaration.type) {
- inferTypes(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
}
}
}
@@ -36567,23 +39751,23 @@ var ts;
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
- signature.thisParameter = createTransientSymbol(context.thisParameter, undefined);
+ signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
}
}
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
if (!parameter.valueDeclaration.type) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
}
}
}
@@ -36602,19 +39786,19 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
var links = getSymbolLinks(parameter);
if (!links.type) {
links.type = instantiateType(contextualType, mapper);
// if inference didn't come up with anything but {}, fall back to the binding pattern if present.
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 172 /* ObjectBindingPattern */ ||
- parameter.valueDeclaration.name.kind === 173 /* ArrayBindingPattern */)) {
+ (parameter.valueDeclaration.name.kind === 173 /* ObjectBindingPattern */ ||
+ parameter.valueDeclaration.name.kind === 174 /* ArrayBindingPattern */)) {
links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (isInferentialContext(mapper)) {
+ else if (checkMode === 2 /* Inferential */) {
// Even if the parameter already has a type, it might be because it was given a type while
// processing the function as an argument to a prior signature during overload resolution.
// If this was the case, it may have caused some type parameters to be fixed. So here,
@@ -36644,7 +39828,7 @@ var ts;
// T in the second overload so that we do not infer Base as a candidate for T
// (inferring Base would make type argument inference inconsistent between the two
// overloads).
- inferTypes(mapper.context, links.type, instantiateType(contextualType, mapper));
+ inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
}
}
function getReturnTypeFromJSDocComment(func) {
@@ -36656,10 +39840,10 @@ var ts;
}
function createPromiseType(promisedType) {
// creates a `Promise<T>` type where `T` is the promisedType argument
- var globalPromiseType = getGlobalPromiseType();
+ var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true);
if (globalPromiseType !== emptyGenericType) {
// if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type
- promisedType = getAwaitedType(promisedType);
+ promisedType = getAwaitedType(promisedType) || emptyObjectType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
@@ -36670,53 +39854,63 @@ var ts;
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
return unknownType;
}
+ else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) {
+ error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
return promiseType;
}
- function getReturnTypeFromBody(func, contextualMapper) {
+ function getReturnTypeFromBody(func, checkMode) {
var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
if (!func.body) {
return unknownType;
}
- var isAsync = ts.isAsyncFunctionLike(func);
+ var functionFlags = ts.getFunctionFlags(func);
var type;
- if (func.body.kind !== 204 /* Block */) {
- type = checkExpressionCached(func.body, contextualMapper);
- if (isAsync) {
+ if (func.body.kind !== 206 /* Block */) {
+ type = checkExpressionCached(func.body, checkMode);
+ if (functionFlags & 2 /* Async */) {
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body should be unwrapped to its awaited type, which we will wrap in
// the native Promise<T> type later in this function.
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ type = checkAwaitedType(type, /*errorNode*/ func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
}
else {
var types = void 0;
- var funcIsGenerator = !!func.asteriskToken;
- if (funcIsGenerator) {
- types = checkAndAggregateYieldOperandTypes(func, contextualMapper);
- if (types.length === 0) {
- var iterableIteratorAny = createIterableIteratorType(anyType);
- if (compilerOptions.noImplicitAny) {
+ if (functionFlags & 1 /* Generator */) {
+ types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), checkAndAggregateReturnExpressionTypes(func, checkMode));
+ if (!types || types.length === 0) {
+ var iterableIteratorAny = functionFlags & 2 /* Async */
+ ? createAsyncIterableIteratorType(anyType) // AsyncGenerator function
+ : createIterableIteratorType(anyType); // Generator function
+ if (noImplicitAny) {
error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny));
}
return iterableIteratorAny;
}
}
else {
- types = checkAndAggregateReturnExpressionTypes(func, contextualMapper);
+ types = checkAndAggregateReturnExpressionTypes(func, checkMode);
if (!types) {
// For an async function, the return type will not be never, but rather a Promise for never.
- return isAsync ? createPromiseReturnType(func, neverType) : neverType;
+ return functionFlags & 2 /* Async */
+ ? createPromiseReturnType(func, neverType) // Async function
+ : neverType; // Normal function
}
if (types.length === 0) {
// For an async function, the return type will not be void, but rather a Promise for void.
- return isAsync ? createPromiseReturnType(func, voidType) : voidType;
+ return functionFlags & 2 /* Async */
+ ? createPromiseReturnType(func, voidType) // Async function
+ : voidType; // Normal function
}
}
// Return a union of the return expression types.
type = getUnionType(types, /*subtypeReduction*/ true);
- if (funcIsGenerator) {
- type = createIterableIteratorType(type);
+ if (functionFlags & 1 /* Generator */) {
+ type = functionFlags & 2 /* Async */
+ ? createAsyncIterableIteratorType(type) // AsyncGenerator function
+ : createIterableIteratorType(type); // Generator function
}
}
if (!contextualSignature) {
@@ -36731,17 +39925,25 @@ var ts;
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body is awaited type of the body, wrapped in a native Promise<T> type.
- return isAsync ? createPromiseReturnType(func, widenedType) : widenedType;
+ return (functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ ? createPromiseReturnType(func, widenedType) // Async function
+ : widenedType; // Generator function, AsyncGenerator function, or normal function
}
- function checkAndAggregateYieldOperandTypes(func, contextualMapper) {
+ function checkAndAggregateYieldOperandTypes(func, checkMode) {
var aggregatedTypes = [];
+ var functionFlags = ts.getFunctionFlags(func);
ts.forEachYieldExpression(func.body, function (yieldExpression) {
var expr = yieldExpression.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
+ var type = checkExpressionCached(expr, checkMode);
if (yieldExpression.asteriskToken) {
// A yield* expression effectively yields everything that its operand yields
- type = checkElementTypeOfIterable(type, yieldExpression.expression);
+ type = checkIteratedTypeOrElementType(type, yieldExpression.expression, /*allowStringInput*/ false, (functionFlags & 2 /* Async */) !== 0);
+ }
+ if (functionFlags & 2 /* Async */) {
+ type = checkAwaitedType(type, expr, yieldExpression.asteriskToken
+ ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
+ : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (!ts.contains(aggregatedTypes, type)) {
aggregatedTypes.push(type);
@@ -36762,33 +39964,33 @@ var ts;
if (!switchTypes.length) {
return false;
}
- return eachTypeContainedIn(type, switchTypes);
+ return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}
function functionHasImplicitReturn(func) {
if (!(func.flags & 128 /* HasImplicitReturn */)) {
return false;
}
var lastStatement = ts.lastOrUndefined(func.body.statements);
- if (lastStatement && lastStatement.kind === 218 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) {
+ if (lastStatement && lastStatement.kind === 220 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) {
return false;
}
return true;
}
- function checkAndAggregateReturnExpressionTypes(func, contextualMapper) {
- var isAsync = ts.isAsyncFunctionLike(func);
+ function checkAndAggregateReturnExpressionTypes(func, checkMode) {
+ var functionFlags = ts.getFunctionFlags(func);
var aggregatedTypes = [];
var hasReturnWithNoExpression = functionHasImplicitReturn(func);
var hasReturnOfTypeNever = false;
ts.forEachReturnStatement(func.body, function (returnStatement) {
var expr = returnStatement.expression;
if (expr) {
- var type = checkExpressionCached(expr, contextualMapper);
- if (isAsync) {
+ var type = checkExpressionCached(expr, checkMode);
+ if (functionFlags & 2 /* Async */) {
// From within an async function you can return either a non-promise value or a promise. Any
// Promise/A+ compatible implementation will always assimilate any foreign promise, so the
// return type of the body should be unwrapped to its awaited type, which should be wrapped in
// the native Promise<T> type by the caller.
- type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
if (type.flags & 8192 /* Never */) {
hasReturnOfTypeNever = true;
@@ -36802,7 +40004,7 @@ var ts;
}
});
if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever ||
- func.kind === 184 /* FunctionExpression */ || func.kind === 185 /* ArrowFunction */)) {
+ func.kind === 185 /* FunctionExpression */ || func.kind === 186 /* ArrowFunction */)) {
return undefined;
}
if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) {
@@ -36831,7 +40033,7 @@ var ts;
}
// If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check.
// also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw
- if (ts.nodeIsMissing(func.body) || func.body.kind !== 204 /* Block */ || !functionHasImplicitReturn(func)) {
+ if (ts.nodeIsMissing(func.body) || func.body.kind !== 206 /* Block */ || !functionHasImplicitReturn(func)) {
return;
}
var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */;
@@ -36863,22 +40065,22 @@ var ts;
error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
- function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
// Grammar checking
var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
- if (!hasGrammarError && node.kind === 184 /* FunctionExpression */) {
+ if (!hasGrammarError && node.kind === 185 /* FunctionExpression */) {
checkGrammarForGenerator(node);
}
// The identityMapper object is used to indicate that function expressions are wildcards
- if (contextualMapper === identityMapper && isContextSensitive(node)) {
+ if (checkMode === 1 /* SkipContextSensitive */ && isContextSensitive(node)) {
checkNodeDeferred(node);
return anyFunctionType;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && isInferentialContext(contextualMapper);
+ var mightFixTypeParameters = contextSensitive && checkMode === 2 /* Inferential */;
// Check if function expression is contextually typed and assign parameter types if so.
// See the comment in assignTypeToParameterAndFixTypeParameters to understand why we need to
// check mightFixTypeParameters.
@@ -36893,10 +40095,10 @@ var ts;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0 /* Call */)[0];
if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
+ assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
}
if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
- var returnType = getReturnTypeFromBody(node, contextualMapper);
+ var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
@@ -36908,17 +40110,21 @@ var ts;
}
}
}
- if (produceDiagnostics && node.kind !== 149 /* MethodDeclaration */) {
+ if (produceDiagnostics && node.kind !== 150 /* MethodDeclaration */) {
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
}
return type;
}
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
- ts.Debug.assert(node.kind !== 149 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
- var isAsync = ts.isAsyncFunctionLike(node);
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
- if (!node.asteriskToken) {
+ ts.Debug.assert(node.kind !== 150 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
+ var functionFlags = ts.getFunctionFlags(node);
+ var returnOrPromisedType = node.type &&
+ ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ?
+ checkAsyncFunctionReturnType(node) :
+ getTypeFromTypeNode(node.type)); // AsyncGenerator function, Generator function, or normal function
+ if ((functionFlags & 1 /* Generator */) === 0) {
// return is not necessary in the body of generators
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
@@ -36931,7 +40137,7 @@ var ts;
// checkFunctionExpressionBodies). So it must be done now.
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
- if (node.body.kind === 204 /* Block */) {
+ if (node.body.kind === 206 /* Block */) {
checkSourceElement(node.body);
}
else {
@@ -36942,8 +40148,8 @@ var ts;
// its return type annotation.
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if (isAsync) {
- var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);
+ if ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
checkTypeAssignableTo(awaitedType, returnOrPromisedType, node.body);
}
else {
@@ -36968,21 +40174,21 @@ var ts;
// Get accessors without matching set accessors
// Enum members
// Unions and intersections of the above (unions and intersections eagerly set isReadonly on creation)
- return symbol.isReadonly ||
- symbol.flags & 4 /* Property */ && (getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */) !== 0 ||
- symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0 ||
+ return !!(getCheckFlags(symbol) & 8 /* Readonly */ ||
+ symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
+ symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ ||
symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) ||
- (symbol.flags & 8 /* EnumMember */) !== 0;
+ symbol.flags & 8 /* EnumMember */);
}
function isReferenceToReadonlyEntity(expr, symbol) {
if (isReadonlySymbol(symbol)) {
// Allow assignments to readonly properties within constructors of the same class declaration.
if (symbol.flags & 4 /* Property */ &&
- (expr.kind === 177 /* PropertyAccessExpression */ || expr.kind === 178 /* ElementAccessExpression */) &&
+ (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) &&
expr.expression.kind === 98 /* ThisKeyword */) {
// Look for if this is the constructor for the class that `symbol` is a property of.
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 150 /* Constructor */))
+ if (!(func && func.kind === 151 /* Constructor */))
return true;
// If func.parent is a class and symbol is a (readonly) property of that class, or
// if func is a constructor and symbol is a (readonly) parameter property declared in it,
@@ -36994,13 +40200,13 @@ var ts;
return false;
}
function isReferenceThroughNamespaceImport(expr) {
- if (expr.kind === 177 /* PropertyAccessExpression */ || expr.kind === 178 /* ElementAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */ || expr.kind === 179 /* ElementAccessExpression */) {
var node = ts.skipParentheses(expr.expression);
if (node.kind === 70 /* Identifier */) {
var symbol = getNodeLinks(node).resolvedSymbol;
if (symbol.flags & 8388608 /* Alias */) {
var declaration = getDeclarationOfAliasSymbol(symbol);
- return declaration && declaration.kind === 237 /* NamespaceImport */;
+ return declaration && declaration.kind === 239 /* NamespaceImport */;
}
}
}
@@ -37009,7 +40215,7 @@ var ts;
function checkReferenceExpression(expr, invalidReferenceMessage) {
// References are combinations of identifiers, parentheses, and property accesses.
var node = ts.skipParentheses(expr);
- if (node.kind !== 70 /* Identifier */ && node.kind !== 177 /* PropertyAccessExpression */ && node.kind !== 178 /* ElementAccessExpression */) {
+ if (node.kind !== 70 /* Identifier */ && node.kind !== 178 /* PropertyAccessExpression */ && node.kind !== 179 /* ElementAccessExpression */) {
error(expr, invalidReferenceMessage);
return false;
}
@@ -37017,11 +40223,21 @@ var ts;
}
function checkDeleteExpression(node) {
checkExpression(node.expression);
+ var expr = ts.skipParentheses(node.expression);
+ if (expr.kind !== 178 /* PropertyAccessExpression */ && expr.kind !== 179 /* ElementAccessExpression */) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
+ return booleanType;
+ }
+ var links = getNodeLinks(expr);
+ var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);
+ if (symbol && isReadonlySymbol(symbol)) {
+ error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
+ }
return booleanType;
}
function checkTypeOfExpression(node) {
checkExpression(node.expression);
- return stringType;
+ return typeofType;
}
function checkVoidExpression(node) {
checkExpression(node.expression);
@@ -37030,7 +40246,7 @@ var ts;
function checkAwaitExpression(node) {
// Grammar checking
if (produceDiagnostics) {
- if (!(node.flags & 524288 /* AwaitContext */)) {
+ if (!(node.flags & 16384 /* AwaitContext */)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -37038,7 +40254,7 @@ var ts;
}
}
var operandType = checkExpression(node.expression);
- return checkAwaitedType(operandType, node);
+ return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
function checkPrefixUnaryExpression(node) {
var operandType = checkExpression(node.operand);
@@ -37052,6 +40268,7 @@ var ts;
case 36 /* PlusToken */:
case 37 /* MinusToken */:
case 51 /* TildeToken */:
+ checkNonNullType(operandType, node.operand);
if (maybeTypeOfKind(operandType, 512 /* ESSymbol */)) {
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
}
@@ -37063,7 +40280,7 @@ var ts;
booleanType;
case 42 /* PlusPlusToken */:
case 43 /* MinusMinusToken */:
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
// run check only if former checks succeeded to avoid reporting cascading errors
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
@@ -37077,7 +40294,7 @@ var ts;
if (operandType === silentNeverType) {
return silentNeverType;
}
- var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
+ var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
if (ok) {
// run check only if former checks succeeded to avoid reporting cascading errors
checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access);
@@ -37092,8 +40309,8 @@ var ts;
}
if (type.flags & 196608 /* UnionOrIntersection */) {
var types = type.types;
- for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
- var t = types_15[_i];
+ for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+ var t = types_19[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -37110,8 +40327,8 @@ var ts;
}
if (type.flags & 65536 /* Union */) {
var types = type.types;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+ var t = types_20[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -37120,8 +40337,8 @@ var ts;
}
if (type.flags & 131072 /* Intersection */) {
var types = type.types;
- for (var _a = 0, types_17 = types; _a < types_17.length; _a++) {
- var t = types_17[_a];
+ for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
+ var t = types_21[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -37141,14 +40358,17 @@ var ts;
}
// TypeScript 1.0 spec (April 2014): 4.15.4
// The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type,
- // and the right operand to be of type Any or a subtype of the 'Function' interface type.
+ // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature.
// The result is always of the Boolean primitive type.
// NOTE: do not raise error if leftType is unknown as related error was already reported
if (isTypeOfKind(leftType, 8190 /* Primitive */)) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
// NOTE: do not raise error if right is unknown as related error was already reported
- if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
+ if (!(isTypeAny(rightType) ||
+ getSignaturesOfType(rightType, 0 /* Call */).length ||
+ getSignaturesOfType(rightType, 1 /* Construct */).length ||
+ isTypeSubtypeOf(rightType, globalFunctionType))) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
}
return booleanType;
@@ -37157,6 +40377,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
// TypeScript 1.0 spec (April 2014): 4.15.5
// The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type,
// and the right operand to be of type Any, an object type, or a type parameter type.
@@ -37164,37 +40386,37 @@ var ts;
if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 /* NumberLike */ | 512 /* ESSymbol */))) {
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
}
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 16384 /* TypeParameter */ | 524288 /* IndexedAccess */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
return booleanType;
}
function checkObjectLiteralAssignment(node, sourceType) {
var properties = node.properties;
- for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
- var p = properties_5[_i];
+ for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
+ var p = properties_7[_i];
checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, properties);
}
return sourceType;
}
/** Note: If property cannot be a SpreadAssignment, then allProperties does not need to be provided */
function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, allProperties) {
- if (property.kind === 257 /* PropertyAssignment */ || property.kind === 258 /* ShorthandPropertyAssignment */) {
- var name_20 = property.name;
- if (name_20.kind === 142 /* ComputedPropertyName */) {
- checkComputedPropertyName(name_20);
+ if (property.kind === 260 /* PropertyAssignment */ || property.kind === 261 /* ShorthandPropertyAssignment */) {
+ var name = property.name;
+ if (name.kind === 143 /* ComputedPropertyName */) {
+ checkComputedPropertyName(name);
}
- if (isComputedNonLiteralName(name_20)) {
+ if (isComputedNonLiteralName(name)) {
return undefined;
}
- var text = ts.getTextOfPropertyName(name_20);
+ var text = ts.getTextOfPropertyName(name);
var type = isTypeAny(objectLiteralType)
? objectLiteralType
: getTypeOfPropertyOfType(objectLiteralType, text) ||
isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1 /* Number */) ||
getIndexTypeOfType(objectLiteralType, 0 /* String */);
if (type) {
- if (property.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (property.kind === 261 /* ShorthandPropertyAssignment */) {
return checkDestructuringAssignment(property, type);
}
else {
@@ -37203,10 +40425,13 @@ var ts;
}
}
else {
- error(name_20, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_20));
+ error(name, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name));
}
}
- else if (property.kind === 259 /* SpreadAssignment */) {
+ else if (property.kind === 262 /* SpreadAssignment */) {
+ if (languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(property, 4 /* Rest */);
+ }
var nonRestNames = [];
if (allProperties) {
for (var i = 0; i < allProperties.length - 1; i++) {
@@ -37220,22 +40445,25 @@ var ts;
error(property, ts.Diagnostics.Property_assignment_expected);
}
}
- function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
+ function checkArrayLiteralAssignment(node, sourceType, checkMode) {
+ if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512 /* Read */);
+ }
// This elementType will be used if the specific property corresponding to this index is not
// present (aka the tuple element property). This call also checks that the parentType is in
// fact an iterable or array (depending on target language).
- var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
- checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper);
+ checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
}
return sourceType;
}
- function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) {
+ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
var elements = node.elements;
var element = elements[elementIndex];
- if (element.kind !== 198 /* OmittedExpression */) {
- if (element.kind !== 196 /* SpreadElement */) {
+ if (element.kind !== 199 /* OmittedExpression */) {
+ if (element.kind !== 197 /* SpreadElement */) {
var propName = "" + elementIndex;
var type = isTypeAny(sourceType)
? sourceType
@@ -37243,7 +40471,7 @@ var ts;
? getTypeOfPropertyOfType(sourceType, propName)
: elementType;
if (type) {
- return checkDestructuringAssignment(element, type, contextualMapper);
+ return checkDestructuringAssignment(element, type, checkMode);
}
else {
// We still need to check element expression here because we may need to set appropriate flag on the expression
@@ -37263,20 +40491,20 @@ var ts;
}
else {
var restExpression = element.expression;
- if (restExpression.kind === 192 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) {
+ if (restExpression.kind === 193 /* BinaryExpression */ && restExpression.operatorToken.kind === 57 /* EqualsToken */) {
error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
}
else {
- return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
+ return checkDestructuringAssignment(restExpression, createArrayType(elementType), checkMode);
}
}
}
}
return undefined;
}
- function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) {
+ function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode) {
var target;
- if (exprOrAssignment.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (exprOrAssignment.kind === 261 /* ShorthandPropertyAssignment */) {
var prop = exprOrAssignment;
if (prop.objectAssignmentInitializer) {
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
@@ -37285,28 +40513,28 @@ var ts;
!(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048 /* Undefined */)) {
sourceType = getTypeWithFacts(sourceType, 131072 /* NEUndefined */);
}
- checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);
+ checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
}
target = exprOrAssignment.name;
}
else {
target = exprOrAssignment;
}
- if (target.kind === 192 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) {
- checkBinaryExpression(target, contextualMapper);
+ if (target.kind === 193 /* BinaryExpression */ && target.operatorToken.kind === 57 /* EqualsToken */) {
+ checkBinaryExpression(target, checkMode);
target = target.left;
}
- if (target.kind === 176 /* ObjectLiteralExpression */) {
+ if (target.kind === 177 /* ObjectLiteralExpression */) {
return checkObjectLiteralAssignment(target, sourceType);
}
- if (target.kind === 175 /* ArrayLiteralExpression */) {
- return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
+ if (target.kind === 176 /* ArrayLiteralExpression */) {
+ return checkArrayLiteralAssignment(target, sourceType, checkMode);
}
- return checkReferenceAssignment(target, sourceType, contextualMapper);
+ return checkReferenceAssignment(target, sourceType, checkMode);
}
- function checkReferenceAssignment(target, sourceType, contextualMapper) {
- var targetType = checkExpression(target, contextualMapper);
- var error = target.parent.kind === 259 /* SpreadAssignment */ ?
+ function checkReferenceAssignment(target, sourceType, checkMode) {
+ var targetType = checkExpression(target, checkMode);
+ var error = target.parent.kind === 262 /* SpreadAssignment */ ?
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
if (checkReferenceExpression(target, error)) {
@@ -37328,35 +40556,35 @@ var ts;
case 70 /* Identifier */:
case 9 /* StringLiteral */:
case 11 /* RegularExpressionLiteral */:
- case 181 /* TaggedTemplateExpression */:
- case 194 /* TemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
+ case 195 /* TemplateExpression */:
case 12 /* NoSubstitutionTemplateLiteral */:
case 8 /* NumericLiteral */:
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
case 94 /* NullKeyword */:
- case 137 /* UndefinedKeyword */:
- case 184 /* FunctionExpression */:
- case 197 /* ClassExpression */:
- case 185 /* ArrowFunction */:
- case 175 /* ArrayLiteralExpression */:
- case 176 /* ObjectLiteralExpression */:
- case 187 /* TypeOfExpression */:
- case 201 /* NonNullExpression */:
- case 247 /* JsxSelfClosingElement */:
- case 246 /* JsxElement */:
+ case 138 /* UndefinedKeyword */:
+ case 185 /* FunctionExpression */:
+ case 198 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 176 /* ArrayLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 188 /* TypeOfExpression */:
+ case 202 /* NonNullExpression */:
+ case 249 /* JsxSelfClosingElement */:
+ case 248 /* JsxElement */:
return true;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isSideEffectFree(node.whenTrue) &&
isSideEffectFree(node.whenFalse);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
if (ts.isAssignmentOperator(node.operatorToken.kind)) {
return false;
}
return isSideEffectFree(node.left) &&
isSideEffectFree(node.right);
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
// Unary operators ~, !, +, and - have no side effects.
// The rest do.
switch (node.operator) {
@@ -37368,9 +40596,9 @@ var ts;
}
return false;
// Some forms listed here for clarity
- case 188 /* VoidExpression */: // Explicit opt-out
- case 182 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings
- case 200 /* AsExpression */: // Not SEF, but can produce useful type warnings
+ case 189 /* VoidExpression */: // Explicit opt-out
+ case 183 /* TypeAssertionExpression */: // Not SEF, but can produce useful type warnings
+ case 201 /* AsExpression */: // Not SEF, but can produce useful type warnings
default:
return false;
}
@@ -37385,16 +40613,16 @@ var ts;
firstAssignableToSecond && !secondAssignableToFirst ? type2 :
getUnionType([type1, type2], /*subtypeReduction*/ true);
}
- function checkBinaryExpression(node, contextualMapper) {
- return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node);
+ function checkBinaryExpression(node, checkMode) {
+ return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, checkMode, node);
}
- function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) {
+ function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
var operator = operatorToken.kind;
- if (operator === 57 /* EqualsToken */ && (left.kind === 176 /* ObjectLiteralExpression */ || left.kind === 175 /* ArrayLiteralExpression */)) {
- return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper);
+ if (operator === 57 /* EqualsToken */ && (left.kind === 177 /* ObjectLiteralExpression */ || left.kind === 176 /* ArrayLiteralExpression */)) {
+ return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode);
}
- var leftType = checkExpression(left, contextualMapper);
- var rightType = checkExpression(right, contextualMapper);
+ var leftType = checkExpression(left, checkMode);
+ var rightType = checkExpression(right, checkMode);
switch (operator) {
case 38 /* AsteriskToken */:
case 39 /* AsteriskAsteriskToken */:
@@ -37421,18 +40649,8 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- // TypeScript 1.0 spec (April 2014): 4.19.1
- // These operators require their operands to be of type Any, the Number primitive type,
- // or an enum type. Operands of an enum type are treated
- // as having the primitive type Number. If one operand is the null or undefined value,
- // it is treated as having the type of the other operand.
- // The result is always of the Number primitive type.
- if (leftType.flags & 6144 /* Nullable */)
- leftType = rightType;
- if (rightType.flags & 6144 /* Nullable */)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
var suggestedOperator = void 0;
// if a user tries to apply a bitwise operator to 2 boolean operands
// try and return them a helpful suggestion
@@ -37455,16 +40673,10 @@ var ts;
if (leftType === silentNeverType || rightType === silentNeverType) {
return silentNeverType;
}
- // TypeScript 1.0 spec (April 2014): 4.19.2
- // The binary + operator requires both operands to be of the Number primitive type or an enum type,
- // or at least one of the operands to be of type Any or the String primitive type.
- // If one operand is the null or undefined value, it is treated as having the type of the other operand.
- if (leftType.flags & 6144 /* Nullable */)
- leftType = rightType;
- if (rightType.flags & 6144 /* Nullable */)
- rightType = leftType;
- leftType = getNonNullableType(leftType);
- rightType = getNonNullableType(rightType);
+ if (!isTypeOfKind(leftType, 1 /* Any */ | 262178 /* StringLike */) && !isTypeOfKind(rightType, 1 /* Any */ | 262178 /* StringLike */)) {
+ leftType = checkNonNullType(leftType, left);
+ rightType = checkNonNullType(rightType, right);
+ }
var resultType = void 0;
if (isTypeOfKind(leftType, 340 /* NumberLike */) && isTypeOfKind(rightType, 340 /* NumberLike */)) {
// Operands of an enum type are treated as having the primitive type Number.
@@ -37499,8 +40711,8 @@ var ts;
case 29 /* LessThanEqualsToken */:
case 30 /* GreaterThanEqualsToken */:
if (checkForDisallowedESSymbolOperand(operator)) {
- leftType = getBaseTypeOfLiteralType(leftType);
- rightType = getBaseTypeOfLiteralType(rightType);
+ leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
+ rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -37536,11 +40748,14 @@ var ts;
checkAssignmentOperator(rightType);
return getRegularTypeOfObjectLiteral(rightType);
case 25 /* CommaToken */:
- if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) {
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
error(left, ts.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
}
return rightType;
}
+ function isEvalNode(node) {
+ return node.kind === 70 /* Identifier */ && node.text === "eval";
+ }
// Return true if there was no error, false if there was an error.
function checkForDisallowedESSymbolOperand(operator) {
var offendingSymbolOperand = maybeTypeOfKind(leftType, 512 /* ESSymbol */) ? left :
@@ -37603,7 +40818,7 @@ var ts;
function checkYieldExpression(node) {
// Grammar checking
if (produceDiagnostics) {
- if (!(node.flags & 131072 /* YieldContext */) || isYieldExpressionInClass(node)) {
+ if (!(node.flags & 4096 /* YieldContext */) || isYieldExpressionInClass(node)) {
grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
}
if (isInParameterInitializerBeforeContainingFunction(node)) {
@@ -37614,23 +40829,40 @@ var ts;
var func = ts.getContainingFunction(node);
// If the user's code is syntactically correct, the func should always have a star. After all,
// we are in a yield context.
- if (func && func.asteriskToken) {
+ var functionFlags = func && ts.getFunctionFlags(func);
+ if (node.asteriskToken) {
+ if (functionFlags & 2 /* Async */) {
+ if (languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 4096 /* AsyncDelegator */);
+ }
+ }
+ else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256 /* Values */);
+ }
+ }
+ if (functionFlags & 1 /* Generator */) {
var expressionType = checkExpressionCached(node.expression, /*contextualMapper*/ undefined);
var expressionElementType = void 0;
var nodeIsYieldStar = !!node.asteriskToken;
if (nodeIsYieldStar) {
- expressionElementType = checkElementTypeOfIterable(expressionType, node.expression);
+ expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, /*allowStringInput*/ false, (functionFlags & 2 /* Async */) !== 0);
}
// There is no point in doing an assignability check if the function
// has no explicit return type because the return type is directly computed
// from the yield expressions.
if (func.type) {
- var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType;
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2 /* Async */) !== 0) || anyType;
if (nodeIsYieldStar) {
- checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, /*headMessage*/ undefined);
+ checkTypeAssignableTo(functionFlags & 2 /* Async */
+ ? getAwaitedType(expressionElementType, node.expression, ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionElementType, signatureElementType, node.expression,
+ /*headMessage*/ undefined);
}
else {
- checkTypeAssignableTo(expressionType, signatureElementType, node.expression, /*headMessage*/ undefined);
+ checkTypeAssignableTo(functionFlags & 2 /* Async */
+ ? getAwaitedType(expressionType, node.expression, ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+ : expressionType, signatureElementType, node.expression,
+ /*headMessage*/ undefined);
}
}
}
@@ -37638,10 +40870,10 @@ var ts;
// Both yield and yield* expressions have type 'any'
return anyType;
}
- function checkConditionalExpression(node, contextualMapper) {
+ function checkConditionalExpression(node, checkMode) {
checkExpression(node.condition);
- var type1 = checkExpression(node.whenTrue, contextualMapper);
- var type2 = checkExpression(node.whenFalse, contextualMapper);
+ var type1 = checkExpression(node.whenTrue, checkMode);
+ var type2 = checkExpression(node.whenFalse, checkMode);
return getBestChoiceType(type1, type2);
}
function checkLiteralExpression(node) {
@@ -37672,12 +40904,17 @@ var ts;
}
function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
var saveContextualType = node.contextualType;
+ var saveContextualMapper = node.contextualMapper;
node.contextualType = contextualType;
- var result = checkExpression(node, contextualMapper);
+ node.contextualMapper = contextualMapper;
+ var checkMode = contextualMapper === identityMapper ? 1 /* SkipContextSensitive */ :
+ contextualMapper ? 2 /* Inferential */ : 0 /* Normal */;
+ var result = checkExpression(node, checkMode);
node.contextualType = saveContextualType;
+ node.contextualMapper = saveContextualMapper;
return result;
}
- function checkExpressionCached(node, contextualMapper) {
+ function checkExpressionCached(node, checkMode) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
// When computing a type that we're going to cache, we need to ignore any ongoing control flow
@@ -37685,83 +40922,87 @@ var ts;
// to the top of the stack ensures all transient types are computed from a known point.
var saveFlowLoopStart = flowLoopStart;
flowLoopStart = flowLoopCount;
- links.resolvedType = checkExpression(node, contextualMapper);
+ links.resolvedType = checkExpression(node, checkMode);
flowLoopStart = saveFlowLoopStart;
}
return links.resolvedType;
}
function isTypeAssertion(node) {
node = ts.skipParentheses(node);
- return node.kind === 182 /* TypeAssertionExpression */ || node.kind === 200 /* AsExpression */;
+ return node.kind === 183 /* TypeAssertionExpression */ || node.kind === 201 /* AsExpression */;
}
function checkDeclarationInitializer(declaration) {
- var type = checkExpressionCached(declaration.initializer);
+ var type = getTypeOfExpression(declaration.initializer, /*cache*/ true);
return ts.getCombinedNodeFlags(declaration) & 2 /* Const */ ||
ts.getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !ts.isParameterPropertyDeclaration(declaration) ||
isTypeAssertion(declaration.initializer) ? type : getWidenedLiteralType(type);
}
function isLiteralContextualType(contextualType) {
if (contextualType) {
- if (contextualType.flags & 16384 /* TypeParameter */) {
- var apparentType = getApparentTypeOfTypeParameter(contextualType);
+ if (contextualType.flags & 540672 /* TypeVariable */) {
+ var constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
// If the type parameter is constrained to the base primitive type we're checking for,
// consider this a literal context. For example, given a type parameter 'T extends string',
// this causes us to infer string literal types for T.
- if (apparentType.flags & (2 /* String */ | 4 /* Number */ | 8 /* Boolean */ | 16 /* Enum */)) {
+ if (constraint.flags & (2 /* String */ | 4 /* Number */ | 8 /* Boolean */ | 16 /* Enum */)) {
return true;
}
- contextualType = apparentType;
+ contextualType = constraint;
}
return maybeTypeOfKind(contextualType, (480 /* Literal */ | 262144 /* Index */));
}
return false;
}
- function checkExpressionForMutableLocation(node, contextualMapper) {
- var type = checkExpression(node, contextualMapper);
+ function checkExpressionForMutableLocation(node, checkMode) {
+ var type = checkExpression(node, checkMode);
return isTypeAssertion(node) || isLiteralContextualType(getContextualType(node)) ? type : getWidenedLiteralType(type);
}
- function checkPropertyAssignment(node, contextualMapper) {
+ function checkPropertyAssignment(node, checkMode) {
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
- return checkExpressionForMutableLocation(node.initializer, contextualMapper);
+ return checkExpressionForMutableLocation(node.initializer, checkMode);
}
- function checkObjectLiteralMethod(node, contextualMapper) {
+ function checkObjectLiteralMethod(node, checkMode) {
// Grammar checking
checkGrammarMethod(node);
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
- var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
- function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
- if (isInferentialContext(contextualMapper)) {
+ function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {
+ if (checkMode === 2 /* Inferential */) {
var signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
var contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
- return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
+ return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
}
}
}
return type;
}
- // Returns the type of an expression. Unlike checkExpression, this function is simply concerned
- // with computing the type and may not fully check all contained sub-expressions for errors.
- function getTypeOfExpression(node) {
+ /**
+ * Returns the type of an expression. Unlike checkExpression, this function is simply concerned
+ * with computing the type and may not fully check all contained sub-expressions for errors.
+ * A cache argument of true indicates that if the function performs a full type check, it is ok
+ * to cache the result.
+ */
+ function getTypeOfExpression(node, cache) {
// Optimize for the common case of a call to a function with a single non-generic call
// signature where we can just fetch the return type without checking the arguments.
- if (node.kind === 179 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */) {
+ if (node.kind === 180 /* CallExpression */ && node.expression.kind !== 96 /* SuperKeyword */ && !ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
var funcType = checkNonNullExpression(node.expression);
var signature = getSingleCallSignature(funcType);
if (signature && !signature.typeParameters) {
@@ -37771,7 +41012,21 @@ var ts;
// Otherwise simply call checkExpression. Ideally, the entire family of checkXXX functions
// should have a parameter that indicates whether full error checking is required such that
// we can perform the optimizations locally.
- return checkExpression(node);
+ return cache ? checkExpressionCached(node) : checkExpression(node);
+ }
+ /**
+ * Returns the type of an expression. Unlike checkExpression, this function is simply concerned
+ * with computing the type and may not fully check all contained sub-expressions for errors.
+ * It is intended for uses where you know there is no contextual type,
+ * and requesting the contextual type might cause a circularity or other bad behaviour.
+ * It sets the contextual type of the node to any before calling getTypeOfExpression.
+ */
+ function getContextFreeTypeOfExpression(node) {
+ var saveContextualType = node.contextualType;
+ node.contextualType = anyType;
+ var type = getTypeOfExpression(node);
+ node.contextualType = saveContextualType;
+ return type;
}
// Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When
// contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the
@@ -37780,30 +41035,30 @@ var ts;
// object, it serves as an indicator that all contained function and arrow expressions should be considered to
// have the wildcard function type; this form of type check is used during overload resolution to exclude
// contextually typed function and arrow expressions in the initial phase.
- function checkExpression(node, contextualMapper) {
+ function checkExpression(node, checkMode) {
var type;
- if (node.kind === 141 /* QualifiedName */) {
+ if (node.kind === 142 /* QualifiedName */) {
type = checkQualifiedName(node);
}
else {
- var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
- type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
+ var uninstantiatedType = checkExpressionWorker(node, checkMode);
+ type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
}
if (isConstEnumObjectType(type)) {
// enum object type for const enums are only permitted in:
// - 'left' in property access
// - 'object' in indexed access
// - target in rhs of import statement
- var ok = (node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.expression === node) ||
- (node.parent.kind === 178 /* ElementAccessExpression */ && node.parent.expression === node) ||
- ((node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));
+ var ok = (node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.expression === node) ||
+ (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.expression === node) ||
+ ((node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));
if (!ok) {
error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
}
}
return type;
}
- function checkExpressionWorker(node, contextualMapper) {
+ function checkExpressionWorker(node, checkMode) {
switch (node.kind) {
case 70 /* Identifier */:
return checkIdentifier(node);
@@ -37818,66 +41073,70 @@ var ts;
case 100 /* TrueKeyword */:
case 85 /* FalseKeyword */:
return checkLiteralExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return checkTemplateExpression(node);
case 12 /* NoSubstitutionTemplateLiteral */:
return stringType;
case 11 /* RegularExpressionLiteral */:
return globalRegExpType;
- case 175 /* ArrayLiteralExpression */:
- return checkArrayLiteral(node, contextualMapper);
- case 176 /* ObjectLiteralExpression */:
- return checkObjectLiteral(node, contextualMapper);
- case 177 /* PropertyAccessExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ return checkArrayLiteral(node, checkMode);
+ case 177 /* ObjectLiteralExpression */:
+ return checkObjectLiteral(node, checkMode);
+ case 178 /* PropertyAccessExpression */:
return checkPropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return checkIndexedAccess(node);
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
return checkCallExpression(node);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return checkTaggedTemplateExpression(node);
- case 183 /* ParenthesizedExpression */:
- return checkExpression(node.expression, contextualMapper);
- case 197 /* ClassExpression */:
+ case 184 /* ParenthesizedExpression */:
+ return checkExpression(node.expression, checkMode);
+ case 198 /* ClassExpression */:
return checkClassExpression(node);
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
- case 187 /* TypeOfExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
+ case 188 /* TypeOfExpression */:
return checkTypeOfExpression(node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
return checkAssertion(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return checkNonNullAssertion(node);
- case 186 /* DeleteExpression */:
+ case 203 /* MetaProperty */:
+ return checkMetaProperty(node);
+ case 187 /* DeleteExpression */:
return checkDeleteExpression(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return checkVoidExpression(node);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return checkAwaitExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return checkPrefixUnaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return checkPostfixUnaryExpression(node);
- case 192 /* BinaryExpression */:
- return checkBinaryExpression(node, contextualMapper);
- case 193 /* ConditionalExpression */:
- return checkConditionalExpression(node, contextualMapper);
- case 196 /* SpreadElement */:
- return checkSpreadExpression(node, contextualMapper);
- case 198 /* OmittedExpression */:
+ case 193 /* BinaryExpression */:
+ return checkBinaryExpression(node, checkMode);
+ case 194 /* ConditionalExpression */:
+ return checkConditionalExpression(node, checkMode);
+ case 197 /* SpreadElement */:
+ return checkSpreadExpression(node, checkMode);
+ case 199 /* OmittedExpression */:
return undefinedWideningType;
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return checkYieldExpression(node);
- case 252 /* JsxExpression */:
- return checkJsxExpression(node);
- case 246 /* JsxElement */:
+ case 255 /* JsxExpression */:
+ return checkJsxExpression(node, checkMode);
+ case 248 /* JsxElement */:
return checkJsxElement(node);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return checkJsxSelfClosingElement(node);
- case 248 /* JsxOpeningElement */:
+ case 253 /* JsxAttributes */:
+ return checkJsxAttributes(node, checkMode);
+ case 250 /* JsxOpeningElement */:
ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
}
return unknownType;
@@ -37889,7 +41148,16 @@ var ts;
grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
}
checkSourceElement(node.constraint);
- getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)));
+ checkSourceElement(node.default);
+ var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
+ if (!hasNonCircularBaseConstraint(typeParameter)) {
+ error(node.constraint, ts.Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter));
+ }
+ var constraintType = getConstraintOfTypeParameter(typeParameter);
+ var defaultType = getDefaultFromTypeParameter(typeParameter);
+ if (constraintType && defaultType) {
+ checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
+ }
if (produceDiagnostics) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
}
@@ -37905,7 +41173,7 @@ var ts;
var func = ts.getContainingFunction(node);
if (ts.getModifierFlags(node) & 92 /* ParameterPropertyModifier */) {
func = ts.getContainingFunction(node);
- if (!(func.kind === 150 /* Constructor */ && ts.nodeIsPresent(func.body))) {
+ if (!(func.kind === 151 /* Constructor */ && ts.nodeIsPresent(func.body))) {
error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
}
}
@@ -37916,7 +41184,7 @@ var ts;
if (ts.indexOf(func.parameters, node) !== 0) {
error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter);
}
- if (func.kind === 150 /* Constructor */ || func.kind === 154 /* ConstructSignature */ || func.kind === 159 /* ConstructorType */) {
+ if (func.kind === 151 /* Constructor */ || func.kind === 155 /* ConstructSignature */ || func.kind === 160 /* ConstructorType */) {
error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
}
}
@@ -37926,14 +41194,6 @@ var ts;
error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
- function isSyntacticallyValidGenerator(node) {
- if (!node.asteriskToken || !node.body) {
- return false;
- }
- return node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 225 /* FunctionDeclaration */ ||
- node.kind === 184 /* FunctionExpression */;
- }
function getTypePredicateParameterIndex(parameterList, parameter) {
if (parameterList) {
for (var i = 0; i < parameterList.length; i++) {
@@ -37967,7 +41227,7 @@ var ts;
error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);
}
else {
- var leadingError = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);
+ var leadingError = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);
checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type,
/*headMessage*/ undefined, leadingError);
}
@@ -37975,9 +41235,9 @@ var ts;
else if (parameterName) {
var hasReportedError = false;
for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) {
- var name_21 = _a[_i].name;
- if (ts.isBindingPattern(name_21) &&
- checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_21, parameterName, typePredicate.parameterName)) {
+ var name = _a[_i].name;
+ if (ts.isBindingPattern(name) &&
+ checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {
hasReportedError = true;
break;
}
@@ -37990,16 +41250,16 @@ var ts;
}
function getTypePredicateParent(node) {
switch (node.parent.kind) {
- case 185 /* ArrowFunction */:
- case 153 /* CallSignature */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 158 /* FunctionType */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- var parent_9 = node.parent;
- if (node === parent_9.type) {
- return parent_9;
+ case 186 /* ArrowFunction */:
+ case 154 /* CallSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 159 /* FunctionType */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ var parent = node.parent;
+ if (node === parent.type) {
+ return parent;
}
}
}
@@ -38009,15 +41269,15 @@ var ts;
if (ts.isOmittedExpression(element)) {
continue;
}
- var name_22 = element.name;
- if (name_22.kind === 70 /* Identifier */ &&
- name_22.text === predicateVariableName) {
+ var name = element.name;
+ if (name.kind === 70 /* Identifier */ &&
+ name.text === predicateVariableName) {
error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
return true;
}
- else if (name_22.kind === 173 /* ArrayBindingPattern */ ||
- name_22.kind === 172 /* ObjectBindingPattern */) {
- if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_22, predicateVariableNode, predicateVariableName)) {
+ else if (name.kind === 174 /* ArrayBindingPattern */ ||
+ name.kind === 173 /* ObjectBindingPattern */) {
+ if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
return true;
}
}
@@ -38025,14 +41285,29 @@ var ts;
}
function checkSignatureDeclaration(node) {
// Grammar checking
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
checkGrammarIndexSignature(node);
}
- else if (node.kind === 158 /* FunctionType */ || node.kind === 225 /* FunctionDeclaration */ || node.kind === 159 /* ConstructorType */ ||
- node.kind === 153 /* CallSignature */ || node.kind === 150 /* Constructor */ ||
- node.kind === 154 /* ConstructSignature */) {
+ else if (node.kind === 159 /* FunctionType */ || node.kind === 227 /* FunctionDeclaration */ || node.kind === 160 /* ConstructorType */ ||
+ node.kind === 154 /* CallSignature */ || node.kind === 151 /* Constructor */ ||
+ node.kind === 155 /* ConstructSignature */) {
checkGrammarFunctionLikeDeclaration(node);
}
+ var functionFlags = ts.getFunctionFlags(node);
+ if ((functionFlags & 7 /* InvalidAsyncOrAsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 64 /* Awaiter */);
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(node, 128 /* Generator */);
+ }
+ }
+ if ((functionFlags & 5 /* InvalidGenerator */) === 1 /* Generator */) {
+ if (functionFlags & 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 2048 /* AsyncGenerator */);
+ }
+ else if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(node, 128 /* Generator */);
+ }
+ }
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
if (node.type) {
@@ -38040,25 +41315,28 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (compilerOptions.noImplicitAny && !node.type) {
+ if (noImplicitAny && !node.type) {
switch (node.kind) {
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
break;
}
}
if (node.type) {
- if (languageVersion >= 2 /* ES2015 */ && isSyntacticallyValidGenerator(node)) {
+ var functionFlags_1 = ts.getFunctionFlags(node);
+ if ((functionFlags_1 & 5 /* InvalidGenerator */) === 1 /* Generator */) {
var returnType = getTypeFromTypeNode(node.type);
if (returnType === voidType) {
error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
- var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType;
- var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType);
+ var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType;
+ var iterableIteratorInstantiation = functionFlags_1 & 2 /* Async */
+ ? createAsyncIterableIteratorType(generatorElementType) // AsyncGenerator function
+ : createIterableIteratorType(generatorElementType); // Generator function
// Naively, one could check that IterableIterator<any> is assignable to the return type annotation.
// However, that would not catch the error in the following case.
//
@@ -38068,7 +41346,7 @@ var ts;
checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
}
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if ((functionFlags_1 & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
checkAsyncFunctionReturnType(node);
}
}
@@ -38078,17 +41356,18 @@ var ts;
}
}
function checkClassForDuplicateDeclarations(node) {
- var Accessor;
- (function (Accessor) {
- Accessor[Accessor["Getter"] = 1] = "Getter";
- Accessor[Accessor["Setter"] = 2] = "Setter";
- Accessor[Accessor["Property"] = 3] = "Property";
- })(Accessor || (Accessor = {}));
+ var Declaration;
+ (function (Declaration) {
+ Declaration[Declaration["Getter"] = 1] = "Getter";
+ Declaration[Declaration["Setter"] = 2] = "Setter";
+ Declaration[Declaration["Method"] = 4] = "Method";
+ Declaration[Declaration["Property"] = 3] = "Property";
+ })(Declaration || (Declaration = {}));
var instanceNames = ts.createMap();
var staticNames = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150 /* Constructor */) {
+ if (member.kind === 151 /* Constructor */) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var param = _c[_b];
if (ts.isParameterPropertyDeclaration(param)) {
@@ -38097,36 +41376,76 @@ var ts;
}
}
else {
- var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 114 /* StaticKeyword */; });
+ var isStatic = ts.getModifierFlags(member) & 32 /* Static */;
var names = isStatic ? staticNames : instanceNames;
var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name);
if (memberName) {
switch (member.kind) {
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
addName(names, member.name, memberName, 1 /* Getter */);
break;
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
addName(names, member.name, memberName, 2 /* Setter */);
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
addName(names, member.name, memberName, 3 /* Property */);
break;
+ case 150 /* MethodDeclaration */:
+ addName(names, member.name, memberName, 4 /* Method */);
+ break;
}
}
}
}
function addName(names, location, name, meaning) {
- var prev = names[name];
+ var prev = names.get(name);
if (prev) {
- if (prev & meaning) {
+ if (prev & 4 /* Method */) {
+ if (meaning !== 4 /* Method */) {
+ error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+ }
+ }
+ else if (prev & meaning) {
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
}
else {
- names[name] = prev | meaning;
+ names.set(name, prev | meaning);
}
}
else {
- names[name] = meaning;
+ names.set(name, meaning);
+ }
+ }
+ }
+ /**
+ * Static members being set on a constructor function may conflict with built-in properties
+ * of Function. Esp. in ECMAScript 5 there are non-configurable and non-writable
+ * built-in properties. This check issues a transpile error when a class has a static
+ * member with the same name as a non-writable built-in property.
+ *
+ * @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.3
+ * @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-the-function-constructor
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-function-instances
+ */
+ function checkClassForStaticPropertyNameConflicts(node) {
+ for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+ var member = _a[_i];
+ var memberNameNode = member.name;
+ var isStatic = ts.getModifierFlags(member) & 32 /* Static */;
+ if (isStatic && memberNameNode) {
+ var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
+ switch (memberName) {
+ case "name":
+ case "length":
+ case "caller":
+ case "arguments":
+ case "prototype":
+ var message = ts.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
+ var className = getNameOfSymbol(getSymbolOfNode(node));
+ error(memberNameNode, message, memberName, className);
+ break;
+ }
}
}
}
@@ -38134,7 +41453,7 @@ var ts;
var names = ts.createMap();
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind == 146 /* PropertySignature */) {
+ if (member.kind === 147 /* PropertySignature */) {
var memberName = void 0;
switch (member.name.kind) {
case 9 /* StringLiteral */:
@@ -38145,18 +41464,18 @@ var ts;
default:
continue;
}
- if (names[memberName]) {
+ if (names.get(memberName)) {
error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
- names[memberName] = true;
+ names.set(memberName, true);
}
}
}
}
function checkTypeForDuplicateIndexSignatures(node) {
- if (node.kind === 227 /* InterfaceDeclaration */) {
+ if (node.kind === 229 /* InterfaceDeclaration */) {
var nodeSymbol = getSymbolOfNode(node);
// in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration
// to prevent this run check only for the first declaration of a given kind
@@ -38176,7 +41495,7 @@ var ts;
var declaration = decl;
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
switch (declaration.parameters[0].type.kind) {
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
if (!seenStringIndexer) {
seenStringIndexer = true;
}
@@ -38252,12 +41571,12 @@ var ts;
if (n.kind === 98 /* ThisKeyword */) {
error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
}
- else if (n.kind !== 184 /* FunctionExpression */ && n.kind !== 225 /* FunctionDeclaration */) {
+ else if (n.kind !== 185 /* FunctionExpression */ && n.kind !== 227 /* FunctionDeclaration */) {
ts.forEachChild(n, markThisReferencesAsErrors);
}
}
function isInstancePropertyWithInitializer(n) {
- return n.kind === 147 /* PropertyDeclaration */ &&
+ return n.kind === 148 /* PropertyDeclaration */ &&
!(ts.getModifierFlags(n) & 32 /* Static */) &&
!!n.initializer;
}
@@ -38287,7 +41606,7 @@ var ts;
var superCallStatement = void 0;
for (var _i = 0, statements_3 = statements; _i < statements_3.length; _i++) {
var statement = statements_3[_i];
- if (statement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
superCallStatement = statement;
break;
}
@@ -38311,7 +41630,7 @@ var ts;
checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
checkDecorators(node);
checkSignatureDeclaration(node);
- if (node.kind === 151 /* GetAccessor */) {
+ if (node.kind === 152 /* GetAccessor */) {
if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 128 /* HasImplicitReturn */)) {
if (!(node.flags & 256 /* HasExplicitReturn */)) {
error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
@@ -38321,13 +41640,13 @@ var ts;
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
}
if (!ts.hasDynamicName(node)) {
// TypeScript 1.0 spec (April 2014): 8.4.3
// Accessors for the same member name must specify the same accessibility.
- var otherKind = node.kind === 151 /* GetAccessor */ ? 152 /* SetAccessor */ : 151 /* GetAccessor */;
+ var otherKind = node.kind === 152 /* GetAccessor */ ? 153 /* SetAccessor */ : 152 /* GetAccessor */;
var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
if ((ts.getModifierFlags(node) & 28 /* AccessibilityModifier */) !== (ts.getModifierFlags(otherAccessor) & 28 /* AccessibilityModifier */)) {
@@ -38343,17 +41662,12 @@ var ts;
}
}
var returnType = getTypeOfAccessors(getSymbolOfNode(node));
- if (node.kind === 151 /* GetAccessor */) {
+ if (node.kind === 152 /* GetAccessor */) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
}
}
- if (node.parent.kind !== 176 /* ObjectLiteralExpression */) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
- else {
- checkNodeDeferred(node);
- }
+ checkSourceElement(node.body);
+ registerForUnusedIdentifiersCheck(node);
}
function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
var firstType = getAnnotatedType(first);
@@ -38362,14 +41676,11 @@ var ts;
error(first, message);
}
}
- function checkAccessorDeferred(node) {
- checkSourceElement(node.body);
- registerForUnusedIdentifiersCheck(node);
- }
function checkMissingDeclaration(node) {
checkDecorators(node);
}
function checkTypeArgumentConstraints(typeParameters, typeArgumentNodes) {
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
var typeArguments;
var mapper;
var result = true;
@@ -38377,7 +41688,7 @@ var ts;
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (constraint) {
if (!typeArguments) {
- typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ typeArguments = fillMissingTypeArguments(ts.map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount);
mapper = createTypeMapper(typeParameters, typeArguments);
}
var typeArgument = typeArguments[i];
@@ -38430,16 +41741,36 @@ var ts;
function checkUnionOrIntersectionType(node) {
ts.forEach(node.types, checkSourceElement);
}
+ function checkIndexedAccessIndexType(type, accessNode) {
+ if (!(type.flags & 524288 /* IndexedAccess */)) {
+ return type;
+ }
+ // Check if the index type is assignable to 'keyof T' for the object type.
+ var objectType = type.objectType;
+ var indexType = type.indexType;
+ if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
+ return type;
+ }
+ // Check if we're indexing with a numeric type and the object type is a generic
+ // type with a constraint that has a numeric index signature.
+ if (maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && isTypeOfKind(indexType, 340 /* NumberLike */)) {
+ var constraint = getBaseConstraintOfType(objectType);
+ if (constraint && getIndexInfoOfType(constraint, 1 /* Number */)) {
+ return type;
+ }
+ }
+ error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));
+ return type;
+ }
function checkIndexedAccessType(node) {
- getTypeFromIndexedAccessTypeNode(node);
+ checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
}
function checkMappedType(node) {
checkSourceElement(node.typeParameter);
checkSourceElement(node.type);
var type = getTypeFromMappedTypeNode(node);
var constraintType = getConstraintTypeFromMappedType(type);
- var keyType = constraintType.flags & 16384 /* TypeParameter */ ? getApparentTypeOfTypeParameter(constraintType) : constraintType;
- checkTypeAssignableTo(keyType, stringType, node.typeParameter.constraint);
+ checkTypeAssignableTo(constraintType, stringType, node.typeParameter.constraint);
}
function isPrivateWithinAmbient(node) {
return (ts.getModifierFlags(node) & 8 /* Private */) && ts.isInAmbientContext(node);
@@ -38448,9 +41779,9 @@ var ts;
var flags = ts.getCombinedModifierFlags(n);
// children of classes (even ambient classes) should not be marked as ambient or export
// because those flags have no useful semantics there.
- if (n.parent.kind !== 227 /* InterfaceDeclaration */ &&
- n.parent.kind !== 226 /* ClassDeclaration */ &&
- n.parent.kind !== 197 /* ClassExpression */ &&
+ if (n.parent.kind !== 229 /* InterfaceDeclaration */ &&
+ n.parent.kind !== 228 /* ClassDeclaration */ &&
+ n.parent.kind !== 198 /* ClassExpression */ &&
ts.isInAmbientContext(n)) {
if (!(flags & 2 /* Ambient */)) {
// It is nested in an ambient context, which means it is automatically exported
@@ -38538,7 +41869,7 @@ var ts;
var errorNode_1 = subsequentNode.name || subsequentNode;
// TODO(jfreeman): These are methods, so handle computed name case
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
- var reportError = (node.kind === 149 /* MethodDeclaration */ || node.kind === 148 /* MethodSignature */) &&
+ var reportError = (node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */) &&
(ts.getModifierFlags(node) & 32 /* Static */) !== (ts.getModifierFlags(subsequentNode) & 32 /* Static */);
// we can get here in two cases
// 1. mixed static and instance class members
@@ -38573,11 +41904,11 @@ var ts;
}
var duplicateFunctionDeclaration = false;
var multipleConstructorImplementation = false;
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
- var current = declarations_4[_i];
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
+ var current = declarations_5[_i];
var node = current;
var inAmbientContext = ts.isInAmbientContext(node);
- var inAmbientContextOrInterface = node.parent.kind === 227 /* InterfaceDeclaration */ || node.parent.kind === 161 /* TypeLiteral */ || inAmbientContext;
+ var inAmbientContextOrInterface = node.parent.kind === 229 /* InterfaceDeclaration */ || node.parent.kind === 162 /* TypeLiteral */ || inAmbientContext;
if (inAmbientContextOrInterface) {
// check if declarations are consecutive only if they are non-ambient
// 1. ambient declarations can be interleaved
@@ -38588,7 +41919,7 @@ var ts;
// 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one
previousDeclaration = undefined;
}
- if (node.kind === 225 /* FunctionDeclaration */ || node.kind === 149 /* MethodDeclaration */ || node.kind === 148 /* MethodSignature */ || node.kind === 150 /* Constructor */) {
+ if (node.kind === 227 /* FunctionDeclaration */ || node.kind === 150 /* MethodDeclaration */ || node.kind === 149 /* MethodSignature */ || node.kind === 151 /* Constructor */) {
var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
someNodeFlags |= currentNodeFlags;
allNodeFlags &= currentNodeFlags;
@@ -38640,8 +41971,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) {
- var signature = signatures_3[_a];
+ for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
+ var signature = signatures_4[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -38710,16 +42041,16 @@ var ts;
}
function getDeclarationSpaces(d) {
switch (d.kind) {
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return 2097152 /* ExportType */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */
? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */
: 4194304 /* ExportNamespace */;
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
return 2097152 /* ExportType */ | 1048576 /* ExportValue */;
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
var result_3 = 0;
var target = resolveAlias(getSymbolOfNode(d));
ts.forEach(target.declarations, function (d) { result_3 |= getDeclarationSpaces(d); });
@@ -38729,25 +42060,16 @@ var ts;
}
}
}
- function checkNonThenableType(type, location, message) {
- type = getWidenedType(type);
- if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) {
- if (location) {
- if (!message) {
- message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member;
- }
- error(location, message);
- }
- return unknownType;
- }
- return type;
+ function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) {
+ var promisedType = getPromisedTypeOfPromise(type, errorNode);
+ return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage);
}
/**
- * Gets the "promised type" of a promise.
- * @param type The type of the promise.
- * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
- */
- function getPromisedType(promise) {
+ * Gets the "promised type" of a promise.
+ * @param type The type of the promise.
+ * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
+ */
+ function getPromisedTypeOfPromise(promise, errorNode) {
//
// { // promise
// then( // thenFunction
@@ -38760,127 +42082,140 @@ var ts;
if (isTypeAny(promise)) {
return undefined;
}
- if (getObjectFlags(promise) & 4 /* Reference */) {
- if (promise.target === tryGetGlobalPromiseType()
- || promise.target === getGlobalPromiseLikeType()) {
- return promise.typeArguments[0];
- }
+ var typeAsPromise = promise;
+ if (typeAsPromise.promisedTypeOfPromise) {
+ return typeAsPromise.promisedTypeOfPromise;
}
- var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
- if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
- return undefined;
+ if (isReferenceToType(promise, getGlobalPromiseType(/*reportErrors*/ false))) {
+ return typeAsPromise.promisedTypeOfPromise = promise.typeArguments[0];
}
var thenFunction = getTypeOfPropertyOfType(promise, "then");
- if (!thenFunction || isTypeAny(thenFunction)) {
+ if (isTypeAny(thenFunction)) {
return undefined;
}
- var thenSignatures = getSignaturesOfType(thenFunction, 0 /* Call */);
+ var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray;
if (thenSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.A_promise_must_have_a_then_method);
+ }
return undefined;
}
- var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072 /* NEUndefined */);
+ var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 524288 /* NEUndefinedOrNull */);
if (isTypeAny(onfulfilledParameterType)) {
return undefined;
}
var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */);
if (onfulfilledParameterSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);
+ }
return undefined;
}
- return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true);
- }
- function getTypeOfFirstParameterOfSignature(signature) {
- return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
+ return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true);
}
/**
- * Gets the "awaited type" of a type.
- * @param type The type to await.
- * @remarks The "awaited type" of an expression is its "promised type" if the expression is a
- * Promise-like type; otherwise, it is the type of the expression. This is used to reflect
- * The runtime behavior of the `await` keyword.
- */
- function getAwaitedType(type) {
- return checkAwaitedType(type, /*location*/ undefined, /*message*/ undefined);
+ * Gets the "awaited type" of a type.
+ * @param type The type to await.
+ * @remarks The "awaited type" of an expression is its "promised type" if the expression is a
+ * Promise-like type; otherwise, it is the type of the expression. This is used to reflect
+ * The runtime behavior of the `await` keyword.
+ */
+ function checkAwaitedType(type, errorNode, diagnosticMessage) {
+ return getAwaitedType(type, errorNode, diagnosticMessage) || unknownType;
}
- function checkAwaitedType(type, location, message) {
- return checkAwaitedTypeWorker(type);
- function checkAwaitedTypeWorker(type) {
- if (type.flags & 65536 /* Union */) {
- var types = [];
- for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
- var constituentType = _a[_i];
- types.push(checkAwaitedTypeWorker(constituentType));
- }
- return getUnionType(types, /*subtypeReduction*/ true);
+ function getAwaitedType(type, errorNode, diagnosticMessage) {
+ var typeAsAwaitable = type;
+ if (typeAsAwaitable.awaitedTypeOfType) {
+ return typeAsAwaitable.awaitedTypeOfType;
+ }
+ if (isTypeAny(type)) {
+ return typeAsAwaitable.awaitedTypeOfType = type;
+ }
+ if (type.flags & 65536 /* Union */) {
+ var types = void 0;
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var constituentType = _a[_i];
+ types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage));
}
- else {
- var promisedType = getPromisedType(type);
- if (promisedType === undefined) {
- // The type was not a PromiseLike, so it could not be unwrapped any further.
- // As long as the type does not have a callable "then" property, it is
- // safe to return the type; otherwise, an error will have been reported in
- // the call to checkNonThenableType and we will return unknownType.
- //
- // An example of a non-promise "thenable" might be:
- //
- // await { then(): void {} }
- //
- // The "thenable" does not match the minimal definition for a PromiseLike. When
- // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise
- // will never settle. We treat this as an error to help flag an early indicator
- // of a runtime problem. If the user wants to return this value from an async
- // function, they would need to wrap it in some other value. If they want it to
- // be treated as a promise, they can cast to <any>.
- return checkNonThenableType(type, location, message);
- }
- else {
- if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
- // We have a bad actor in the form of a promise whose promised type is
- // the same promise type, or a mutually recursive promise. Return the
- // unknown type as we cannot guess the shape. If this were the actual
- // case in the JavaScript, this Promise would never resolve.
- //
- // An example of a bad actor with a singly-recursive promise type might
- // be:
- //
- // interface BadPromise {
- // then(
- // onfulfilled: (value: BadPromise) => any,
- // onrejected: (error: any) => any): BadPromise;
- // }
- //
- // The above interface will pass the PromiseLike check, and return a
- // promised type of `BadPromise`. Since this is a self reference, we
- // don't want to keep recursing ad infinitum.
- //
- // An example of a bad actor in the form of a mutually-recursive
- // promise type might be:
- //
- // interface BadPromiseA {
- // then(
- // onfulfilled: (value: BadPromiseB) => any,
- // onrejected: (error: any) => any): BadPromiseB;
- // }
- //
- // interface BadPromiseB {
- // then(
- // onfulfilled: (value: BadPromiseA) => any,
- // onrejected: (error: any) => any): BadPromiseA;
- // }
- //
- if (location) {
- error(location, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol));
- }
- return unknownType;
- }
- // Keep track of the type we're about to unwrap to avoid bad recursive promise types.
- // See the comments above for more information.
- awaitedTypeStack.push(type.id);
- var awaitedType = checkAwaitedTypeWorker(promisedType);
- awaitedTypeStack.pop();
- return awaitedType;
+ if (!types) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, /*subtypeReduction*/ true);
+ }
+ var promisedType = getPromisedTypeOfPromise(type);
+ if (promisedType) {
+ if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) {
+ // Verify that we don't have a bad actor in the form of a promise whose
+ // promised type is the same as the promise type, or a mutually recursive
+ // promise. If so, we return undefined as we cannot guess the shape. If this
+ // were the actual case in the JavaScript, this Promise would never resolve.
+ //
+ // An example of a bad actor with a singly-recursive promise type might
+ // be:
+ //
+ // interface BadPromise {
+ // then(
+ // onfulfilled: (value: BadPromise) => any,
+ // onrejected: (error: any) => any): BadPromise;
+ // }
+ // The above interface will pass the PromiseLike check, and return a
+ // promised type of `BadPromise`. Since this is a self reference, we
+ // don't want to keep recursing ad infinitum.
+ //
+ // An example of a bad actor in the form of a mutually-recursive
+ // promise type might be:
+ //
+ // interface BadPromiseA {
+ // then(
+ // onfulfilled: (value: BadPromiseB) => any,
+ // onrejected: (error: any) => any): BadPromiseB;
+ // }
+ //
+ // interface BadPromiseB {
+ // then(
+ // onfulfilled: (value: BadPromiseA) => any,
+ // onrejected: (error: any) => any): BadPromiseA;
+ // }
+ //
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);
}
+ return undefined;
+ }
+ // Keep track of the type we're about to unwrap to avoid bad recursive promise types.
+ // See the comments above for more information.
+ awaitedTypeStack.push(type.id);
+ var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage);
+ awaitedTypeStack.pop();
+ if (!awaitedType) {
+ return undefined;
+ }
+ return typeAsAwaitable.awaitedTypeOfType = awaitedType;
+ }
+ // The type was not a promise, so it could not be unwrapped any further.
+ // As long as the type does not have a callable "then" property, it is
+ // safe to return the type; otherwise, an error will be reported in
+ // the call to getNonThenableType and we will return undefined.
+ //
+ // An example of a non-promise "thenable" might be:
+ //
+ // await { then(): void {} }
+ //
+ // The "thenable" does not match the minimal definition for a promise. When
+ // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise
+ // will never settle. We treat this as an error to help flag an early indicator
+ // of a runtime problem. If the user wants to return this value from an async
+ // function, they would need to wrap it in some other value. If they want it to
+ // be treated as a promise, they can cast to <any>.
+ var thenFunction = getTypeOfPropertyOfType(type, "then");
+ if (thenFunction && getSignaturesOfType(thenFunction, 0 /* Call */).length > 0) {
+ if (errorNode) {
+ ts.Debug.assert(!!diagnosticMessage);
+ error(errorNode, diagnosticMessage);
}
+ return undefined;
}
+ return typeAsAwaitable.awaitedTypeOfType = type;
}
/**
* Checks the return type of an async function to ensure it is a compatible
@@ -38925,8 +42260,8 @@ var ts;
if (returnType === unknownType) {
return unknownType;
}
- var globalPromiseType = getGlobalPromiseType();
- if (globalPromiseType !== emptyGenericType && globalPromiseType !== getTargetType(returnType)) {
+ var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true);
+ if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
// The promise type was not a valid type reference to the global promise type, so we
// report an error and return the unknown type.
error(node.type, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
@@ -38947,10 +42282,15 @@ var ts;
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
- error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) {
+ error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
+ }
+ else {
+ error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
+ }
return unknownType;
}
- var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
+ var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(/*reportErrors*/ true);
if (globalPromiseConstructorLikeType === emptyObjectType) {
// If we couldn't resolve the global PromiseConstructorLike type we cannot verify
// compatibility with __awaiter.
@@ -38969,7 +42309,7 @@ var ts;
}
}
// Get and return the awaited type of the return type.
- return checkAwaitedType(returnType, node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type);
+ return checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
}
/** Check a decorator */
function checkDecorator(node) {
@@ -38982,22 +42322,22 @@ var ts;
var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
var errorInfo;
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var classSymbol = getSymbolOfNode(node.parent);
var classConstructorType = getTypeOfSymbol(classSymbol);
expectedReturnType = getUnionType([classConstructorType, voidType]);
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
expectedReturnType = voidType;
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var methodType = getTypeOfNode(node.parent);
var descriptorType = createTypedPropertyDescriptorType(methodType);
expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -39020,6 +42360,9 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function getParameterTypeNodeForDecoratorCheck(node) {
+ return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ }
/** Check the decorators of a node */
function checkDecorators(node) {
if (!node.decorators) {
@@ -39033,29 +42376,37 @@ var ts;
if (!compilerOptions.experimentalDecorators) {
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
}
+ var firstDecorator = node.decorators[0];
+ checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */);
+ if (node.kind === 145 /* Parameter */) {
+ checkExternalEmitHelpers(firstDecorator, 32 /* Param */);
+ }
if (compilerOptions.emitDecoratorMetadata) {
+ checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */);
// we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator.
switch (node.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var constructor = ts.getFirstConstructorWithBody(node);
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(parameter.type);
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
markTypeNodeAsReferenced(node.type);
break;
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
+ markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ break;
+ case 145 /* Parameter */:
markTypeNodeAsReferenced(node.type);
break;
}
@@ -39067,6 +42418,7 @@ var ts;
checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -39074,11 +42426,11 @@ var ts;
function checkFunctionOrMethodDeclaration(node) {
checkDecorators(node);
checkSignatureDeclaration(node);
- var isAsync = ts.isAsyncFunctionLike(node);
+ var functionFlags = ts.getFunctionFlags(node);
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name && node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name && node.name.kind === 143 /* ComputedPropertyName */) {
// This check will account for methods in class/interface declarations,
// as well as accessors in classes/object literals
checkComputedPropertyName(node.name);
@@ -39109,17 +42461,19 @@ var ts;
}
}
checkSourceElement(node.body);
- if (!node.asteriskToken) {
- var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type));
+ if ((functionFlags & 1 /* Generator */) === 0) {
+ var returnOrPromisedType = node.type && (functionFlags & 2 /* Async */
+ ? checkAsyncFunctionReturnType(node) // Async function
+ : getTypeFromTypeNode(node.type)); // normal function
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (produceDiagnostics && !node.type) {
// Report an implicit any error if there is no body, no explicit return type, and node is not a private method
// in an ambient context
- if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
+ if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
- if (node.asteriskToken && ts.nodeIsPresent(node.body)) {
+ if (functionFlags & 1 /* Generator */ && ts.nodeIsPresent(node.body)) {
// A generator with a body and no type annotation can still cause errors. It can error if the
// yielded values have no common supertype, or it can give an implicit any error if it has no
// yielded values. The only way to trigger these errors is to try checking its return type.
@@ -39138,56 +42492,54 @@ var ts;
for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) {
var node = deferredUnusedIdentifierNodes_1[_i];
switch (node.kind) {
- case 261 /* SourceFile */:
- case 230 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 232 /* ModuleDeclaration */:
checkUnusedModuleMembers(node);
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
checkUnusedClassMembers(node);
checkUnusedTypeParameters(node);
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
checkUnusedTypeParameters(node);
break;
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
checkUnusedLocalsAndParameters(node);
break;
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
if (node.body) {
checkUnusedLocalsAndParameters(node);
}
checkUnusedTypeParameters(node);
break;
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 156 /* IndexSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
checkUnusedTypeParameters(node);
break;
}
- ;
}
}
}
function checkUnusedLocalsAndParameters(node) {
- if (node.parent.kind !== 227 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
- var _loop_3 = function (key) {
- var local = node.locals[key];
+ if (node.parent.kind !== 229 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) {
+ node.locals.forEach(function (local) {
if (!local.isReferenced) {
- if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 144 /* Parameter */) {
+ if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 145 /* Parameter */) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
@@ -39200,22 +42552,28 @@ var ts;
ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
}
}
- };
- for (var key in node.locals) {
- _loop_3(key);
- }
+ });
+ }
+ }
+ function isRemovedPropertyFromObjectSpread(node) {
+ if (ts.isBindingElement(node) && ts.isObjectBindingPattern(node.parent)) {
+ var lastElement = ts.lastOrUndefined(node.parent.elements);
+ return lastElement !== node && !!lastElement.dotDotDotToken;
}
+ return false;
}
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 223 /* VariableDeclaration */ &&
- (declaration.parent.parent.kind === 212 /* ForInStatement */ ||
- declaration.parent.parent.kind === 213 /* ForOfStatement */)) {
+ if (declaration.kind === 225 /* VariableDeclaration */ &&
+ (declaration.parent.parent.kind === 214 /* ForInStatement */ ||
+ declaration.parent.parent.kind === 215 /* ForOfStatement */)) {
return;
}
}
- error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ if (!isRemovedPropertyFromObjectSpread(node.kind === 70 /* Identifier */ ? node.parent : node)) {
+ error(node, ts.Diagnostics._0_is_declared_but_never_used, name);
+ }
}
function parameterNameStartsWithUnderscore(parameterName) {
return parameterName && isIdentifierThatStartsWithUnderScore(parameterName);
@@ -39228,12 +42586,12 @@ var ts;
if (node.members) {
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 149 /* MethodDeclaration */ || member.kind === 147 /* PropertyDeclaration */) {
+ if (member.kind === 150 /* MethodDeclaration */ || member.kind === 148 /* PropertyDeclaration */) {
if (!member.symbol.isReferenced && ts.getModifierFlags(member) & 8 /* Private */) {
error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name);
}
}
- else if (member.kind === 150 /* Constructor */) {
+ else if (member.kind === 151 /* Constructor */) {
for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
if (!parameter.symbol.isReferenced && ts.getModifierFlags(parameter) & 8 /* Private */) {
@@ -39266,22 +42624,21 @@ var ts;
}
function checkUnusedModuleMembers(node) {
if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) {
- for (var key in node.locals) {
- var local = node.locals[key];
+ node.locals.forEach(function (local) {
if (!local.isReferenced && !local.exportSymbol) {
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ errorUnusedLocal(declaration.name, local.name);
}
}
}
- }
+ });
}
}
function checkBlock(node) {
// Grammar checking for SyntaxKind.Block
- if (node.kind === 204 /* Block */) {
+ if (node.kind === 206 /* Block */) {
checkGrammarStatementInAmbientContext(node);
}
ts.forEach(node.statements, checkSourceElement);
@@ -39304,12 +42661,12 @@ var ts;
if (!(identifier && identifier.text === name)) {
return false;
}
- if (node.kind === 147 /* PropertyDeclaration */ ||
- node.kind === 146 /* PropertySignature */ ||
- node.kind === 149 /* MethodDeclaration */ ||
- node.kind === 148 /* MethodSignature */ ||
- node.kind === 151 /* GetAccessor */ ||
- node.kind === 152 /* SetAccessor */) {
+ if (node.kind === 148 /* PropertyDeclaration */ ||
+ node.kind === 147 /* PropertySignature */ ||
+ node.kind === 150 /* MethodDeclaration */ ||
+ node.kind === 149 /* MethodSignature */ ||
+ node.kind === 152 /* GetAccessor */ ||
+ node.kind === 153 /* SetAccessor */) {
// it is ok to have member named '_super' or '_this' - member access is always qualified
return false;
}
@@ -39318,7 +42675,7 @@ var ts;
return false;
}
var root = ts.getRootDeclaration(node);
- if (root.kind === 144 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) {
+ if (root.kind === 145 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) {
// just an overload - no codegen impact
return false;
}
@@ -39329,10 +42686,14 @@ var ts;
potentialThisCollisions.push(node);
}
}
+ function checkCollisionWithCapturedNewTargetVariable(node, name) {
+ if (needCollisionCheckForIdentifier(node, name, "_newTarget")) {
+ potentialNewTargetCollisions.push(node);
+ }
+ }
// this function will run after checking the source file so 'CaptureThis' is correct for all nodes
function checkIfThisIsCapturedInEnclosingScope(node) {
- var current = node;
- while (current) {
+ ts.findAncestor(node, function (current) {
if (getNodeCheckFlags(current) & 4 /* CaptureThis */) {
var isDeclaration_1 = node.kind !== 70 /* Identifier */;
if (isDeclaration_1) {
@@ -39341,10 +42702,23 @@ var ts;
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
}
- return;
+ return true;
}
- current = current.parent;
- }
+ });
+ }
+ function checkIfNewTargetIsCapturedInEnclosingScope(node) {
+ ts.findAncestor(node, function (current) {
+ if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) {
+ var isDeclaration_2 = node.kind !== 70 /* Identifier */;
+ if (isDeclaration_2) {
+ error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ }
+ else {
+ error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);
+ }
+ return true;
+ }
+ });
}
function checkCollisionWithCapturedSuperVariable(node, name) {
if (!needCollisionCheckForIdentifier(node, name, "_super")) {
@@ -39357,8 +42731,8 @@ var ts;
return;
}
if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
- var isDeclaration_2 = node.kind !== 70 /* Identifier */;
- if (isDeclaration_2) {
+ var isDeclaration_3 = node.kind !== 70 /* Identifier */;
+ if (isDeclaration_3) {
error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
}
else {
@@ -39375,27 +42749,27 @@ var ts;
return;
}
// Uninstantiated modules shouldnt do this check
- if (node.kind === 230 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return;
}
// In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
+ if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
// If the declaration happens to be in external module, report error that require and exports are reserved keywords
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
}
function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
- if (!needCollisionCheckForIdentifier(node, name, "Promise")) {
+ if (languageVersion >= 4 /* ES2017 */ || !needCollisionCheckForIdentifier(node, name, "Promise")) {
return;
}
// Uninstantiated modules shouldnt do this check
- if (node.kind === 230 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
+ if (node.kind === 232 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return;
}
// In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
var parent = getDeclarationContainer(node);
- if (parent.kind === 261 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 8192 /* HasAsyncFunctions */) {
+ if (parent.kind === 264 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 1024 /* HasAsyncFunctions */) {
// If the declaration happens to be in external module, report error that Promise is a reserved identifier.
error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
}
@@ -39430,7 +42804,7 @@ var ts;
// skip variable declarations that don't have initializers
// NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern
// so we'll always treat binding elements as initialized
- if (node.kind === 223 /* VariableDeclaration */ && !node.initializer) {
+ if (node.kind === 225 /* VariableDeclaration */ && !node.initializer) {
return;
}
var symbol = getSymbolOfNode(node);
@@ -39440,24 +42814,24 @@ var ts;
localDeclarationSymbol !== symbol &&
localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) {
if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) {
- var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 224 /* VariableDeclarationList */);
- var container = varDeclList.parent.kind === 205 /* VariableStatement */ && varDeclList.parent.parent
+ var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 226 /* VariableDeclarationList */);
+ var container = varDeclList.parent.kind === 207 /* VariableStatement */ && varDeclList.parent.parent
? varDeclList.parent.parent
: undefined;
// names of block-scoped and function scoped variables can collide only
// if block scoped variable is defined in the function\module\source file scope (because of variable hoisting)
var namesShareScope = container &&
- (container.kind === 204 /* Block */ && ts.isFunctionLike(container.parent) ||
- container.kind === 231 /* ModuleBlock */ ||
- container.kind === 230 /* ModuleDeclaration */ ||
- container.kind === 261 /* SourceFile */);
+ (container.kind === 206 /* Block */ && ts.isFunctionLike(container.parent) ||
+ container.kind === 233 /* ModuleBlock */ ||
+ container.kind === 232 /* ModuleDeclaration */ ||
+ container.kind === 264 /* SourceFile */);
// here we know that function scoped variable is shadowed by block scoped one
// if they are defined in the same scope - binder has already reported redeclaration error
// otherwise if variable has an initializer - show error that initialization will fail
// since LHS will be block scoped name instead of function scoped
if (!namesShareScope) {
- var name_23 = symbolToString(localDeclarationSymbol);
- error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_23, name_23);
+ var name = symbolToString(localDeclarationSymbol);
+ error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
}
}
}
@@ -39465,7 +42839,7 @@ var ts;
}
// Check that a parameter initializer contains no references to parameters declared to the right of itself
function checkParameterInitializer(node) {
- if (ts.getRootDeclaration(node).kind !== 144 /* Parameter */) {
+ if (ts.getRootDeclaration(node).kind !== 145 /* Parameter */) {
return;
}
var func = ts.getContainingFunction(node);
@@ -39476,7 +42850,7 @@ var ts;
// skip declaration names (i.e. in object literal expressions)
return;
}
- if (n.kind === 177 /* PropertyAccessExpression */) {
+ if (n.kind === 178 /* PropertyAccessExpression */) {
// skip property names in property access expression
return visit(n.expression);
}
@@ -39495,27 +42869,28 @@ var ts;
// so we need to do a bit of extra work to check if reference is legal
var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
if (enclosingContainer === func) {
- if (symbol.valueDeclaration.kind === 144 /* Parameter */) {
+ if (symbol.valueDeclaration.kind === 145 /* Parameter */ ||
+ symbol.valueDeclaration.kind === 175 /* BindingElement */) {
// it is ok to reference parameter in initializer if either
// - parameter is located strictly on the left of current parameter declaration
if (symbol.valueDeclaration.pos < node.pos) {
return;
}
// - parameter is wrapped in function-like entity
- var current = n;
- while (current !== node.initializer) {
- if (ts.isFunctionLike(current.parent)) {
- return;
+ if (ts.findAncestor(n, function (current) {
+ if (current === node.initializer) {
+ return "quit";
}
- // computed property names/initializers in instance property declaration of class like entities
- // are executed in constructor and thus deferred
- if (current.parent.kind === 147 /* PropertyDeclaration */ &&
- !(ts.hasModifier(current.parent, 32 /* Static */)) &&
- ts.isClassLike(current.parent.parent)) {
- return;
- }
- current = current.parent;
+ return ts.isFunctionLike(current.parent) ||
+ // computed property names/initializers in instance property declaration of class like entities
+ // are executed in constructor and thus deferred
+ (current.parent.kind === 148 /* PropertyDeclaration */ &&
+ !(ts.hasModifier(current.parent, 32 /* Static */)) &&
+ ts.isClassLike(current.parent.parent));
+ })) {
+ return;
}
+ // fall through to report error
}
error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
}
@@ -39536,40 +42911,46 @@ var ts;
// Do not use hasDynamicName here, because that returns false for well known symbols.
// We want to perform checkComputedPropertyName for all computed properties, including
// well known symbols.
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.name);
if (node.initializer) {
checkExpressionCached(node.initializer);
}
}
- if (node.kind === 174 /* BindingElement */) {
+ if (node.kind === 175 /* BindingElement */) {
+ if (node.parent.kind === 173 /* ObjectBindingPattern */ && languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 4 /* Rest */);
+ }
// check computed properties inside property names of binding elements
- if (node.propertyName && node.propertyName.kind === 142 /* ComputedPropertyName */) {
+ if (node.propertyName && node.propertyName.kind === 143 /* ComputedPropertyName */) {
checkComputedPropertyName(node.propertyName);
}
// check private/protected variable access
- var parent_10 = node.parent.parent;
- var parentType = getTypeForBindingElementParent(parent_10);
- var name_24 = node.propertyName || node.name;
- var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name_24));
+ var parent = node.parent.parent;
+ var parentType = getTypeForBindingElementParent(parent);
+ var name = node.propertyName || node.name;
+ var property = getPropertyOfType(parentType, ts.getTextOfPropertyName(name));
markPropertyAsReferenced(property);
- if (parent_10.initializer && property && getParentOfSymbol(property)) {
- checkClassPropertyAccess(parent_10, parent_10.initializer, parentType, property);
+ if (parent.initializer && property) {
+ checkPropertyAccessibility(parent, parent.initializer, parentType, property);
}
}
// For a binding pattern, check contained binding elements
if (ts.isBindingPattern(node.name)) {
+ if (node.name.kind === 174 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 512 /* Read */);
+ }
ts.forEach(node.name.elements, checkSourceElement);
}
// For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body
- if (node.initializer && ts.getRootDeclaration(node).kind === 144 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
+ if (node.initializer && ts.getRootDeclaration(node).kind === 145 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
return;
}
// For a binding pattern, validate the initializer and exit
if (ts.isBindingPattern(node.name)) {
// Don't validate for-in initializer as it is already an error
- if (node.initializer && node.parent.parent.kind !== 212 /* ForInStatement */) {
+ if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined);
checkParameterInitializer(node);
}
@@ -39580,7 +42961,7 @@ var ts;
if (node === symbol.valueDeclaration) {
// Node is the primary declaration of the symbol, just validate the initializer
// Don't validate for-in initializer as it is already an error
- if (node.initializer && node.parent.parent.kind !== 212 /* ForInStatement */) {
+ if (node.initializer && node.parent.parent.kind !== 214 /* ForInStatement */) {
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined);
checkParameterInitializer(node);
}
@@ -39600,21 +42981,22 @@ var ts;
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
- if (node.kind !== 147 /* PropertyDeclaration */ && node.kind !== 146 /* PropertySignature */) {
+ if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */) {
// We know we don't have a binding pattern or computed name here
checkExportsOnMergedDeclarations(node);
- if (node.kind === 223 /* VariableDeclaration */ || node.kind === 174 /* BindingElement */) {
+ if (node.kind === 225 /* VariableDeclaration */ || node.kind === 175 /* BindingElement */) {
checkVarDeclaredNamesNotShadowed(node);
}
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
}
function areDeclarationFlagsIdentical(left, right) {
- if ((left.kind === 144 /* Parameter */ && right.kind === 223 /* VariableDeclaration */) ||
- (left.kind === 223 /* VariableDeclaration */ && right.kind === 144 /* Parameter */)) {
+ if ((left.kind === 145 /* Parameter */ && right.kind === 225 /* VariableDeclaration */) ||
+ (left.kind === 225 /* VariableDeclaration */ && right.kind === 145 /* Parameter */)) {
// Differences in optionality between parameters and variables are allowed.
return true;
}
@@ -39644,8 +43026,8 @@ var ts;
}
function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) {
// We only disallow modifier on a method declaration if it is a property of object-literal-expression
- if (node.modifiers && node.parent.kind === 176 /* ObjectLiteralExpression */) {
- if (ts.isAsyncFunctionLike(node)) {
+ if (node.modifiers && node.parent.kind === 177 /* ObjectLiteralExpression */) {
+ if (ts.getFunctionFlags(node) & 2 /* Async */) {
if (node.modifiers.length > 1) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
}
@@ -39665,7 +43047,7 @@ var ts;
checkGrammarStatementInAmbientContext(node);
checkExpression(node.expression);
checkSourceElement(node.thenStatement);
- if (node.thenStatement.kind === 206 /* EmptyStatement */) {
+ if (node.thenStatement.kind === 208 /* EmptyStatement */) {
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
}
checkSourceElement(node.elseStatement);
@@ -39685,12 +43067,12 @@ var ts;
function checkForStatement(node) {
// Grammar checking
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.initializer && node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer && node.initializer.kind === 226 /* VariableDeclarationList */) {
checkGrammarVariableDeclarationList(node.initializer);
}
}
if (node.initializer) {
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
ts.forEach(node.initializer.declarations, checkVariableDeclaration);
}
else {
@@ -39708,19 +43090,29 @@ var ts;
}
function checkForOfStatement(node) {
checkGrammarForInOrForOfStatement(node);
+ if (node.kind === 215 /* ForOfStatement */) {
+ if (node.awaitModifier) {
+ if (languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */);
+ }
+ }
+ else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ checkExternalEmitHelpers(node, 256 /* ForOfIncludes */);
+ }
+ }
// Check the LHS and RHS
// If the LHS is a declaration, just check it as a variable declaration, which will in turn check the RHS
// via checkRightHandSideOfForOf.
// If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference.
// Then check that the RHS is assignable to it.
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
checkForInOrForOfVariableDeclaration(node);
}
else {
var varExpr = node.initializer;
- var iteratedType = checkRightHandSideOfForOf(node.expression);
+ var iteratedType = checkRightHandSideOfForOf(node.expression, node.awaitModifier);
// There may be a destructuring assignment on the left side
- if (varExpr.kind === 175 /* ArrayLiteralExpression */ || varExpr.kind === 176 /* ObjectLiteralExpression */) {
+ if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) {
// iteratedType may be undefined. In this case, we still want to check the structure of
// varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like
// to short circuit the type relation checking as much as possible, so we pass the unknownType.
@@ -39752,7 +43144,7 @@ var ts;
// for (let VarDecl in Expr) Statement
// VarDecl must be a variable declaration without a type annotation that declares a variable of type Any,
// and Expr must be an expression of type Any, an object type, or a type parameter type.
- if (node.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (node.initializer.kind === 226 /* VariableDeclarationList */) {
var variable = node.initializer.declarations[0];
if (variable && ts.isBindingPattern(variable.name)) {
error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -39766,7 +43158,7 @@ var ts;
// and Expr must be an expression of type Any, an object type, or a type parameter type.
var varExpr = node.initializer;
var leftType = checkExpression(varExpr);
- if (varExpr.kind === 175 /* ArrayLiteralExpression */ || varExpr.kind === 176 /* ObjectLiteralExpression */) {
+ if (varExpr.kind === 176 /* ArrayLiteralExpression */ || varExpr.kind === 177 /* ObjectLiteralExpression */) {
error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
}
else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -39779,7 +43171,7 @@ var ts;
}
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
// in this case error about missing name is already reported - do not report extra one
- if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 16384 /* TypeParameter */ | 524288 /* IndexedAccess */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 32768 /* Object */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
}
checkSourceElement(node.statement);
@@ -39795,52 +43187,113 @@ var ts;
checkVariableDeclaration(decl);
}
}
- function checkRightHandSideOfForOf(rhsExpression) {
+ function checkRightHandSideOfForOf(rhsExpression, awaitModifier) {
var expressionType = checkNonNullExpression(rhsExpression);
- return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true);
+ return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
if (isTypeAny(inputType)) {
return inputType;
}
- if (languageVersion >= 2 /* ES2015 */) {
- return checkElementTypeOfIterable(inputType, errorNode);
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, /*checkAssignability*/ true) || anyType;
+ }
+ /**
+ * When consuming an iterable type in a for..of, spread, or iterator destructuring assignment
+ * we want to get the iterated type of an iterable for ES2015 or later, or the iterated type
+ * of a iterable (if defined globally) or element type of an array like for ES2015 or earlier.
+ */
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ var uplevelIteration = languageVersion >= 2 /* ES2015 */;
+ var downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
+ // Get the iterated type of an `Iterable<T>` or `IterableIterator<T>` only in ES2015
+ // or higher, when inside of an async generator or for-await-if, or when
+ // downlevelIteration is requested.
+ if (uplevelIteration || downlevelIteration || allowAsyncIterable) {
+ // We only report errors for an invalid iterable type in ES2015 or higher.
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ if (iteratedType || uplevelIteration) {
+ return iteratedType;
+ }
}
+ var arrayType = inputType;
+ var reportedError = false;
+ var hasStringConstituent = false;
+ // If strings are permitted, remove any string-like constituents from the array type.
+ // This allows us to find other non-string element types from an array unioned with
+ // a string.
if (allowStringInput) {
- return checkElementTypeOfArrayOrString(inputType, errorNode);
- }
- if (isArrayLikeType(inputType)) {
- var indexType = getIndexTypeOfType(inputType, 1 /* Number */);
- if (indexType) {
- return indexType;
+ if (arrayType.flags & 65536 /* Union */) {
+ // After we remove all types that are StringLike, we will know if there was a string constituent
+ // based on whether the result of filter is a new array.
+ var arrayTypes = inputType.types;
+ var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178 /* StringLike */); });
+ if (filteredTypes !== arrayTypes) {
+ arrayType = getUnionType(filteredTypes, /*subtypeReduction*/ true);
+ }
+ }
+ else if (arrayType.flags & 262178 /* StringLike */) {
+ arrayType = neverType;
+ }
+ hasStringConstituent = arrayType !== inputType;
+ if (hasStringConstituent) {
+ if (languageVersion < 1 /* ES5 */) {
+ if (errorNode) {
+ error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
+ reportedError = true;
+ }
+ }
+ // Now that we've removed all the StringLike types, if no constituents remain, then the entire
+ // arrayOrStringType was a string.
+ if (arrayType.flags & 8192 /* Never */) {
+ return stringType;
+ }
}
}
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
+ if (!isArrayLikeType(arrayType)) {
+ if (errorNode && !reportedError) {
+ // Which error we report depends on whether we allow strings or if there was a
+ // string constituent. For example, if the input type is number | string, we
+ // want to say that number is not an array type. But if the input was just
+ // number and string input is allowed, we want to say that number is not an
+ // array type or a string type.
+ var diagnostic = !allowStringInput || hasStringConstituent
+ ? downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type
+ : downlevelIteration
+ ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
+ : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
+ error(errorNode, diagnostic, typeToString(arrayType));
+ }
+ return hasStringConstituent ? stringType : undefined;
}
- return unknownType;
- }
- /**
- * When errorNode is undefined, it means we should not report any errors.
- */
- function checkElementTypeOfIterable(iterable, errorNode) {
- var elementType = getElementTypeOfIterable(iterable, errorNode);
- // Now even though we have extracted the iteratedType, we will have to validate that the type
- // passed in is actually an Iterable.
- if (errorNode && elementType) {
- checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode);
+ var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */);
+ if (hasStringConstituent && arrayElementType) {
+ // This is just an optimization for the case where arrayOrStringType is string | string[]
+ if (arrayElementType.flags & 262178 /* StringLike */) {
+ return stringType;
+ }
+ return getUnionType([arrayElementType, stringType], /*subtypeReduction*/ true);
}
- return elementType || anyType;
+ return arrayElementType;
}
/**
* We want to treat type as an iterable, and get the type it is an iterable of. The iterable
* must have the following structure (annotated with the names of the variables below):
*
- * { // iterable
- * [Symbol.iterator]: { // iteratorFunction
- * (): Iterator<T>
+ * { // iterable
+ * [Symbol.iterator]: { // iteratorMethod
+ * (): Iterator<T>
+ * }
+ * }
+ *
+ * For an async iterable, we expect the following structure:
+ *
+ * { // iterable
+ * [Symbol.asyncIterator]: { // iteratorMethod
+ * (): AsyncIterator<T>
+ * }
* }
- * }
*
* T is the type we are after. At every level that involves analyzing return types
* of signatures, we union the return types of all the signatures.
@@ -39852,166 +43305,170 @@ var ts;
* caller requested it. Then the caller can decide what to do in the case where there is no iterated
* type. This is different from returning anyType, because that would signify that we have matched the
* whole pattern and that T (above) is 'any'.
+ *
+ * For a **for-of** statement, `yield*` (in a normal generator), spread, array
+ * destructuring, or normal generator we will only ever look for a `[Symbol.iterator]()`
+ * method.
+ *
+ * For an async generator we will only ever look at the `[Symbol.asyncIterator]()` method.
+ *
+ * For a **for-await-of** statement or a `yield*` in an async generator we will look for
+ * the `[Symbol.asyncIterator]()` method first, and then the `[Symbol.iterator]()` method.
*/
- function getElementTypeOfIterable(type, errorNode) {
+ function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterable = type;
- if (!typeAsIterable.iterableElementType) {
- // As an optimization, if the type is instantiated directly using the globalIterableType (Iterable<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIterableType()) {
- typeAsIterable.iterableElementType = type.typeArguments[0];
+ if (isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable) {
+ return isAsyncIterable ? typeAsIterable.iteratedTypeOfAsyncIterable : typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isAsyncIterable) {
+ // As an optimization, if the type is an instantiation of the global `AsyncIterable<T>`
+ // or the global `AsyncIterableIterator<T>` then just grab its type argument.
+ if (isReferenceToType(type, getGlobalAsyncIterableType(/*reportErrors*/ false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(/*reportErrors*/ false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
+ }
+ }
+ if (!isAsyncIterable || allowNonAsyncIterables) {
+ // As an optimization, if the type is an instantiation of the global `Iterable<T>` or
+ // `IterableIterator<T>` then just grab its type argument.
+ if (isReferenceToType(type, getGlobalIterableType(/*reportErrors*/ false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(/*reportErrors*/ false))) {
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
+ : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
+ }
+ var iteratorMethodSignatures;
+ var mayBeIterable = false;
+ if (isAsyncIterable) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
- else {
- var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorFunction)) {
- return undefined;
- }
- var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0 /* Call */) : emptyArray;
- if (iteratorFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
- }
- return undefined;
- }
- typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true), errorNode);
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
+ }
+ if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
+ var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
+ if (isTypeAny(iteratorMethod)) {
+ return undefined;
}
+ iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
+ mayBeIterable = true;
+ }
+ if (ts.some(iteratorMethodSignatures)) {
+ var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, /*isAsyncIterator*/ false);
+ if (checkAssignability && errorNode && iteratedType) {
+ // If `checkAssignability` was specified, we were called from
+ // `checkIteratedTypeOrElementType`. As such, we need to validate that
+ // the type passed in is actually an Iterable.
+ checkTypeAssignableTo(type, mayBeIterable
+ ? createIterableType(iteratedType)
+ : createAsyncIterableType(iteratedType), errorNode);
+ }
+ return isAsyncIterable
+ ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType
+ : typeAsIterable.iteratedTypeOfIterable = iteratedType;
+ }
+ if (errorNode) {
+ error(errorNode, isAsyncIterable
+ ? ts.Diagnostics.Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
+ : ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
}
- return typeAsIterable.iterableElementType;
+ return undefined;
}
/**
- * This function has very similar logic as getElementTypeOfIterable, except that it operates on
+ * This function has very similar logic as getIteratedTypeOfIterable, except that it operates on
* Iterators instead of Iterables. Here is the structure:
*
* { // iterator
- * next: { // iteratorNextFunction
- * (): { // iteratorNextResult
- * value: T // iteratorNextValue
+ * next: { // nextMethod
+ * (): { // nextResult
+ * value: T // nextValue
* }
* }
* }
*
+ * For an async iterator, we expect the following structure:
+ *
+ * { // iterator
+ * next: { // nextMethod
+ * (): PromiseLike<{ // nextResult
+ * value: T // nextValue
+ * }>
+ * }
+ * }
*/
- function getElementTypeOfIterator(type, errorNode) {
+ function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
return undefined;
}
var typeAsIterator = type;
- if (!typeAsIterator.iteratorElementType) {
- // As an optimization, if the type is instantiated directly using the globalIteratorType (Iterator<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIteratorType()) {
- typeAsIterator.iteratorElementType = type.typeArguments[0];
- }
- else {
- var iteratorNextFunction = getTypeOfPropertyOfType(type, "next");
- if (isTypeAny(iteratorNextFunction)) {
- return undefined;
- }
- var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0 /* Call */) : emptyArray;
- if (iteratorNextFunctionSignatures.length === 0) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
- }
- return undefined;
- }
- var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
- if (isTypeAny(iteratorNextResult)) {
- return undefined;
- }
- var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
- if (!iteratorNextValue) {
- if (errorNode) {
- error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
- }
- return undefined;
- }
- typeAsIterator.iteratorElementType = iteratorNextValue;
- }
+ if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) {
+ return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator;
+ }
+ // As an optimization, if the type is an instantiation of the global `Iterator<T>` (for
+ // a non-async iterator) or the global `AsyncIterator<T>` (for an async-iterator) then
+ // just grab its type argument.
+ var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType;
+ if (isReferenceToType(type, getIteratorType(/*reportErrors*/ false))) {
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0]
+ : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0];
+ }
+ // Both async and non-async iterators must have a `next` method.
+ var nextMethod = getTypeOfPropertyOfType(type, "next");
+ if (isTypeAny(nextMethod)) {
+ return undefined;
}
- return typeAsIterator.iteratorElementType;
- }
- function getElementTypeOfIterableIterator(type) {
- if (isTypeAny(type)) {
+ var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0 /* Call */) : emptyArray;
+ if (nextMethodSignatures.length === 0) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.An_async_iterator_must_have_a_next_method
+ : ts.Diagnostics.An_iterator_must_have_a_next_method);
+ }
return undefined;
}
- // As an optimization, if the type is instantiated directly using the globalIterableIteratorType (IterableIterator<number>),
- // then just grab its type argument.
- if ((getObjectFlags(type) & 4 /* Reference */) && type.target === getGlobalIterableIteratorType()) {
- return type.typeArguments[0];
+ var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
- return getElementTypeOfIterable(type, /*errorNode*/ undefined) ||
- getElementTypeOfIterator(type, /*errorNode*/ undefined);
- }
- /**
- * This function does the following steps:
- * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents.
- * 2. Take the element types of the array constituents.
- * 3. Return the union of the element types, and string if there was a string constituent.
- *
- * For example:
- * string -> string
- * number[] -> number
- * string[] | number[] -> string | number
- * string | number[] -> string | number
- * string | string[] | number[] -> string | number
- *
- * It also errors if:
- * 1. Some constituent is neither a string nor an array.
- * 2. Some constituent is a string and target is less than ES5 (because in ES3 string is not indexable).
- */
- function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
- ts.Debug.assert(languageVersion < 2 /* ES2015 */);
- var arrayType = arrayOrStringType;
- if (arrayOrStringType.flags & 65536 /* Union */) {
- // After we remove all types that are StringLike, we will know if there was a string constituent
- // based on whether the result of filter is a new array.
- var arrayTypes = arrayOrStringType.types;
- var filteredTypes = ts.filter(arrayTypes, function (t) { return !(t.flags & 262178 /* StringLike */); });
- if (filteredTypes !== arrayTypes) {
- arrayType = getUnionType(filteredTypes, /*subtypeReduction*/ true);
- }
- }
- else if (arrayOrStringType.flags & 262178 /* StringLike */) {
- arrayType = neverType;
- }
- var hasStringConstituent = arrayOrStringType !== arrayType;
- var reportedError = false;
- if (hasStringConstituent) {
- if (languageVersion < 1 /* ES5 */) {
- error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
- reportedError = true;
- }
- // Now that we've removed all the StringLike types, if no constituents remain, then the entire
- // arrayOrStringType was a string.
- if (arrayType.flags & 8192 /* Never */) {
- return stringType;
+ // For an async iterator, we must get the awaited type of the return type.
+ if (isAsyncIterator) {
+ nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property);
+ if (isTypeAny(nextResult)) {
+ return undefined;
}
}
- if (!isArrayLikeType(arrayType)) {
- if (!reportedError) {
- // Which error we report depends on whether there was a string constituent. For example,
- // if the input type is number | string, we want to say that number is not an array type.
- // But if the input was just number, we want to say that number is not an array type
- // or a string type.
- var diagnostic = hasStringConstituent
- ? ts.Diagnostics.Type_0_is_not_an_array_type
- : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
- error(errorNode, diagnostic, typeToString(arrayType));
+ var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value");
+ if (!nextValue) {
+ if (errorNode) {
+ error(errorNode, isAsyncIterator
+ ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property
+ : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
}
- return hasStringConstituent ? stringType : unknownType;
+ return undefined;
}
- var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */) || unknownType;
- if (hasStringConstituent) {
- // This is just an optimization for the case where arrayOrStringType is string | string[]
- if (arrayElementType.flags & 262178 /* StringLike */) {
- return stringType;
- }
- return getUnionType([arrayElementType, stringType], /*subtypeReduction*/ true);
+ return isAsyncIterator
+ ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue
+ : typeAsIterator.iteratedTypeOfIterator = nextValue;
+ }
+ /**
+ * A generator may have a return type of `Iterator<T>`, `Iterable<T>`, or
+ * `IterableIterator<T>`. An async generator may have a return type of `AsyncIterator<T>`,
+ * `AsyncIterable<T>`, or `AsyncIterableIterator<T>`. This function can be used to extract
+ * the iterated type from this return type for contextual typing and verifying signatures.
+ */
+ function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) {
+ if (isTypeAny(returnType)) {
+ return undefined;
}
- return arrayElementType;
+ return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, isAsyncGenerator, /*allowNonAsyncIterables*/ false, /*checkAssignability*/ false)
+ || getIteratedTypeOfIterator(returnType, /*errorNode*/ undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
// Grammar checking
@@ -40019,10 +43476,12 @@ var ts;
// TODO: Check that target label is valid
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 151 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 152 /* SetAccessor */)));
+ return !!(node.kind === 152 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 153 /* SetAccessor */)));
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType;
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ ? getPromisedTypeOfPromise(returnType) // Async function
+ : returnType; // AsyncGenerator function, Generator function, or normal function
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 /* Void */ | 1 /* Any */);
}
function checkReturnStatement(node) {
@@ -40039,40 +43498,41 @@ var ts;
var returnType = getReturnTypeOfSignature(signature);
if (strictNullChecks || node.expression || returnType.flags & 8192 /* Never */) {
var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
- if (func.asteriskToken) {
+ var functionFlags = ts.getFunctionFlags(func);
+ if (functionFlags & 1 /* Generator */) {
// A generator does not need its return expressions checked against its return type.
// Instead, the yield expressions are checked against the element type.
// TODO: Check return expressions of generators when return type tracking is added
// for generators.
return;
}
- if (func.kind === 152 /* SetAccessor */) {
+ if (func.kind === 153 /* SetAccessor */) {
if (node.expression) {
- error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
+ error(node, ts.Diagnostics.Setters_cannot_return_a_value);
}
}
- else if (func.kind === 150 /* Constructor */) {
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) {
- error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
+ else if (func.kind === 151 /* Constructor */) {
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
+ error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
}
}
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
- if (ts.isAsyncFunctionLike(func)) {
- var promisedType = getPromisedType(returnType);
- var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
+ if (functionFlags & 2 /* Async */) {
+ var promisedType = getPromisedTypeOfPromise(returnType);
+ var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
if (promisedType) {
// If the function has a return type, but promisedType is
// undefined, an error will be reported in checkAsyncFunctionReturnType
// so we don't need to report one here.
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node);
+ checkTypeAssignableTo(awaitedType, promisedType, node);
}
}
else {
- checkTypeAssignableTo(exprType, returnType, node.expression || node);
+ checkTypeAssignableTo(exprType, returnType, node);
}
}
}
- else if (func.kind !== 150 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+ else if (func.kind !== 151 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
// The function has a return type, but the return statement doesn't have an expression.
error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
@@ -40081,7 +43541,7 @@ var ts;
function checkWithStatement(node) {
// Grammar checking for withStatement
if (!checkGrammarStatementInAmbientContext(node)) {
- if (node.flags & 524288 /* AwaitContext */) {
+ if (node.flags & 16384 /* AwaitContext */) {
grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);
}
}
@@ -40102,7 +43562,7 @@ var ts;
var expressionIsLiteral = isLiteralType(expressionType);
ts.forEach(node.caseBlock.clauses, function (clause) {
// Grammar check for duplicate default clauses, skip if we already report duplicate default clause
- if (clause.kind === 254 /* DefaultClause */ && !hasDuplicateDefaultClause) {
+ if (clause.kind === 257 /* DefaultClause */ && !hasDuplicateDefaultClause) {
if (firstDefaultClause === undefined) {
firstDefaultClause = clause;
}
@@ -40114,7 +43574,7 @@ var ts;
hasDuplicateDefaultClause = true;
}
}
- if (produceDiagnostics && clause.kind === 253 /* CaseClause */) {
+ if (produceDiagnostics && clause.kind === 256 /* CaseClause */) {
var caseClause = clause;
// TypeScript 1.0 spec (April 2014): 5.9
// In a 'switch' statement, each 'case' expression must be of a type that is comparable
@@ -40140,18 +43600,16 @@ var ts;
function checkLabeledStatement(node) {
// Grammar checking
if (!checkGrammarStatementInAmbientContext(node)) {
- var current = node.parent;
- while (current) {
+ ts.findAncestor(node.parent, function (current) {
if (ts.isFunctionLike(current)) {
- break;
+ return "quit";
}
- if (current.kind === 219 /* LabeledStatement */ && current.label.text === node.label.text) {
+ if (current.kind === 221 /* LabeledStatement */ && current.label.text === node.label.text) {
var sourceFile = ts.getSourceFileOfNode(node);
grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
- break;
+ return true;
}
- current = current.parent;
- }
+ });
}
// ensure that label is unique
checkSourceElement(node.statement);
@@ -40182,14 +43640,14 @@ var ts;
grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
}
else {
- var blockLocals = catchClause.block.locals;
- if (blockLocals) {
- for (var caughtName in catchClause.locals) {
- var blockLocal = blockLocals[caughtName];
+ var blockLocals_1 = catchClause.block.locals;
+ if (blockLocals_1) {
+ ts.forEachKey(catchClause.locals, function (caughtName) {
+ var blockLocal = blockLocals_1.get(caughtName);
if (blockLocal && (blockLocal.flags & 2 /* BlockScopedVariable */) !== 0) {
grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
}
- }
+ });
}
}
}
@@ -40241,15 +43699,16 @@ var ts;
if (!indexType) {
return;
}
+ var propDeclaration = prop.valueDeclaration;
// index is numeric and property name is not valid numeric literal
- if (indexKind === 1 /* Number */ && !isNumericName(prop.valueDeclaration.name)) {
+ if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
return;
}
// perform property check if property or indexer is declared in 'type'
// this allows to rule out cases when both property and indexer are inherited from the base class
var errorNode;
- if (prop.valueDeclaration.name.kind === 142 /* ComputedPropertyName */ || prop.parent === containingType.symbol) {
- errorNode = prop.valueDeclaration;
+ if (propDeclaration && (propDeclaration.name.kind === 143 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) {
+ errorNode = propDeclaration;
}
else if (indexDeclaration) {
errorNode = indexDeclaration;
@@ -40279,16 +43738,26 @@ var ts;
case "string":
case "symbol":
case "void":
+ case "object":
error(name, message, name.text);
}
}
- /** Check each type parameter and check that type parameters have no duplicate type parameter declarations */
+ /**
+ * Check each type parameter and check that type parameters have no duplicate type parameter declarations
+ */
function checkTypeParameters(typeParameterDeclarations) {
if (typeParameterDeclarations) {
- for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
+ var seenDefault = false;
+ for (var i = 0; i < typeParameterDeclarations.length; i++) {
var node = typeParameterDeclarations[i];
checkTypeParameter(node);
if (produceDiagnostics) {
+ if (node.default) {
+ seenDefault = true;
+ }
+ else if (seenDefault) {
+ error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
+ }
for (var j = 0; j < i; j++) {
if (typeParameterDeclarations[j].symbol === node.symbol) {
error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
@@ -40299,22 +43768,64 @@ var ts;
}
}
/** Check that type parameter lists are identical across multiple declarations */
- function checkTypeParameterListsIdentical(node, symbol) {
+ function checkTypeParameterListsIdentical(symbol) {
if (symbol.declarations.length === 1) {
return;
}
- var firstDecl;
- for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 226 /* ClassDeclaration */ || declaration.kind === 227 /* InterfaceDeclaration */) {
- if (!firstDecl) {
- firstDecl = declaration;
+ var links = getSymbolLinks(symbol);
+ if (!links.typeParametersChecked) {
+ links.typeParametersChecked = true;
+ var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
+ if (declarations.length <= 1) {
+ return;
+ }
+ var type = getDeclaredTypeOfSymbol(symbol);
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
+ // Report an error on every conflicting declaration.
+ var name = symbolToString(symbol);
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
+ var declaration = declarations_6[_i];
+ error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
+ }
+ }
+ }
+ }
+ function areTypeParametersIdentical(declarations, typeParameters) {
+ var maxTypeArgumentCount = ts.length(typeParameters);
+ var minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
+ var declaration = declarations_7[_i];
+ // If this declaration has too few or too many type parameters, we report an error
+ var numTypeParameters = ts.length(declaration.typeParameters);
+ if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
+ return false;
+ }
+ for (var i = 0; i < numTypeParameters; i++) {
+ var source = declaration.typeParameters[i];
+ var target = typeParameters[i];
+ // If the type parameter node does not have the same as the resolved type
+ // parameter at this position, we report an error.
+ if (source.name.text !== target.symbol.name) {
+ return false;
}
- else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) {
- error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text);
+ // If the type parameter node does not have an identical constraint as the resolved
+ // type parameter at this position, we report an error.
+ var sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint);
+ var targetConstraint = getConstraintFromTypeParameter(target);
+ if ((sourceConstraint || targetConstraint) &&
+ (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) {
+ return false;
+ }
+ // If the type parameter node has a default and it is not identical to the default
+ // for the type parameter at this position, we report an error.
+ var sourceDefault = source.default && getTypeFromTypeNode(source.default);
+ var targetDefault = getDefaultFromTypeParameter(target);
+ if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {
+ return false;
}
}
}
+ return true;
}
function checkClassExpression(node) {
checkClassLikeDeclaration(node);
@@ -40334,11 +43845,12 @@ var ts;
registerForUnusedIdentifiersCheck(node);
}
function checkClassLikeDeclaration(node) {
- checkGrammarClassDeclarationHeritageClauses(node);
+ checkGrammarClassLikeDeclaration(node);
checkDecorators(node);
if (node.name) {
checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
}
@@ -40348,19 +43860,27 @@ var ts;
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
var staticType = getTypeOfSymbol(symbol);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
checkClassForDuplicateDeclarations(node);
+ // Only check for reserved static identifiers on non-ambient context.
+ if (!ts.isInAmbientContext(node)) {
+ checkClassForStaticPropertyNameConflicts(node);
+ }
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
+ if (languageVersion < 2 /* ES2015 */) {
+ checkExternalEmitHelpers(baseTypeNode.parent, 1 /* Extends */);
+ }
var baseTypes = getBaseTypes(type);
if (baseTypes.length && produceDiagnostics) {
var baseType_1 = baseTypes[0];
- var staticBaseType = getBaseConstructorTypeOfClass(type);
+ var baseConstructorType = getBaseConstructorTypeOfClass(type);
+ var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
if (baseTypeNode.typeArguments) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
- for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
if (!checkTypeArgumentConstraints(constructor.typeParameters, baseTypeNode.typeArguments)) {
break;
@@ -40369,19 +43889,15 @@ var ts;
}
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
- if (baseType_1.symbol.valueDeclaration &&
- !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration) &&
- baseType_1.symbol.valueDeclaration.kind === 226 /* ClassDeclaration */) {
- if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) {
- error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class);
- }
+ if (baseConstructorType.flags & 540672 /* TypeVariable */ && !isMixinConstructorType(staticType)) {
+ error(node.name || node, ts.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
}
- if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */)) {
+ if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 540672 /* TypeVariable */)) {
// When the static base type is a "class-like" constructor function (but not actually a class), we verify
// that all instantiated base constructor signatures return the same type. We can simply compare the type
// references (as opposed to checking the structure of the types) because elsewhere we have already checked
// that the base type is a class or interface type (and not, for example, an anonymous object type).
- var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
+ var constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);
if (ts.forEach(constructors, function (sig) { return getReturnTypeOfSignature(sig) !== baseType_1; })) {
error(baseTypeNode.expression, ts.Diagnostics.Base_constructors_must_all_have_the_same_return_type);
}
@@ -40400,8 +43916,7 @@ var ts;
if (produceDiagnostics) {
var t = getTypeFromTypeNode(typeRefNode);
if (t !== unknownType) {
- var declaredType = getObjectFlags(t) & 4 /* Reference */ ? t.target : t;
- if (getObjectFlags(declaredType) & 3 /* ClassOrInterface */) {
+ if (isValidBaseType(t)) {
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
}
else {
@@ -40431,11 +43946,16 @@ var ts;
function getTargetSymbol(s) {
// if symbol is instantiated its flags are not copied from the 'target'
// so we'll need to get back original 'target' symbol to work with correct set of flags
- return s.flags & 16777216 /* Instantiated */ ? getSymbolLinks(s).target : s;
+ return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
+ function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
+ return ts.filter(symbol.declarations, function (d) {
+ return d.kind === 228 /* ClassDeclaration */ || d.kind === 229 /* InterfaceDeclaration */;
+ });
+ }
function checkKindsOfPropertyMemberOverrides(type, baseType) {
// TypeScript 1.0 spec (April 2014): 8.2.3
// A derived class inherits all members from its base class it doesn't override.
@@ -40451,11 +43971,11 @@ var ts;
// Base class instance member variables and accessors can be overridden by
// derived class instance member variables and accessors, but not by other kinds of members.
// NOTE: assignability is checked in checkClassDeclaration
- var baseProperties = getPropertiesOfObjectType(baseType);
+ var baseProperties = getPropertiesOfType(baseType);
for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
var baseProperty = baseProperties_1[_i];
var base = getTargetSymbol(baseProperty);
- if (base.flags & 134217728 /* Prototype */) {
+ if (base.flags & 16777216 /* Prototype */) {
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
@@ -40472,7 +43992,7 @@ var ts;
// If there is no declaration for the derived class (as in the case of class expressions),
// then the class cannot be declared abstract.
if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(ts.getModifierFlags(derivedClassDecl) & 128 /* Abstract */))) {
- if (derivedClassDecl.kind === 197 /* ClassExpression */) {
+ if (derivedClassDecl.kind === 198 /* ClassExpression */) {
error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
}
else {
@@ -40483,7 +44003,7 @@ var ts;
else {
// derived overrides base.
var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
- if ((baseDeclarationFlags & 8 /* Private */) || (derivedDeclarationFlags & 8 /* Private */)) {
+ if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) {
// either base or derived property is private - not override, skip it
continue;
}
@@ -40491,64 +44011,32 @@ var ts;
// value of 'static' is not the same for properties - not override, skip it
continue;
}
- if ((base.flags & derived.flags & 8192 /* Method */) || ((base.flags & 98308 /* PropertyOrAccessor */) && (derived.flags & 98308 /* PropertyOrAccessor */))) {
+ if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 /* PropertyOrAccessor */ && derived.flags & 98308 /* PropertyOrAccessor */) {
// method is overridden with method or property/accessor is overridden with property/accessor - correct case
continue;
}
var errorMessage = void 0;
- if (base.flags & 8192 /* Method */) {
+ if (isMethodLike(base)) {
if (derived.flags & 98304 /* Accessor */) {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
}
else {
- ts.Debug.assert((derived.flags & 4 /* Property */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
}
}
else if (base.flags & 4 /* Property */) {
- ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
}
else {
- ts.Debug.assert((base.flags & 98304 /* Accessor */) !== 0);
- ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0);
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
function isAccessor(kind) {
- return kind === 151 /* GetAccessor */ || kind === 152 /* SetAccessor */;
- }
- function areTypeParametersIdentical(list1, list2) {
- if (!list1 && !list2) {
- return true;
- }
- if (!list1 || !list2 || list1.length !== list2.length) {
- return false;
- }
- // TypeScript 1.0 spec (April 2014):
- // When a generic interface has multiple declarations, all declarations must have identical type parameter
- // lists, i.e. identical type parameter names with identical constraints in identical order.
- for (var i = 0, len = list1.length; i < len; i++) {
- var tp1 = list1[i];
- var tp2 = list2[i];
- if (tp1.name.text !== tp2.name.text) {
- return false;
- }
- if (!tp1.constraint && !tp2.constraint) {
- continue;
- }
- if (!tp1.constraint || !tp2.constraint) {
- return false;
- }
- if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
- return false;
- }
- }
- return true;
+ return kind === 152 /* GetAccessor */ || kind === 153 /* SetAccessor */;
}
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
@@ -40556,16 +44044,16 @@ var ts;
return true;
}
var seen = ts.createMap();
- ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
+ ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.name, { prop: p, containingType: type }); });
var ok = true;
for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
var base = baseTypes_2[_i];
- var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType));
- for (var _a = 0, properties_6 = properties; _a < properties_6.length; _a++) {
- var prop = properties_6[_a];
- var existing = seen[prop.name];
+ var properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
+ for (var _a = 0, properties_8 = properties; _a < properties_8.length; _a++) {
+ var prop = properties_8[_a];
+ var existing = seen.get(prop.name);
if (!existing) {
- seen[prop.name] = { prop: prop, containingType: base };
+ seen.set(prop.name, { prop: prop, containingType: base });
}
else {
var isInheritedProperty = existing.containingType !== type;
@@ -40573,7 +44061,7 @@ var ts;
ok = false;
var typeName1 = typeToString(existing.containingType);
var typeName2 = typeToString(base);
- var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2);
+ var errorInfo = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2);
errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);
diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(typeNode, errorInfo));
}
@@ -40590,9 +44078,9 @@ var ts;
checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
checkExportsOnMergedDeclarations(node);
var symbol = getSymbolOfNode(node);
- checkTypeParameterListsIdentical(node, symbol);
+ checkTypeParameterListsIdentical(symbol);
// Only check this symbol once
- var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 227 /* InterfaceDeclaration */);
+ var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 229 /* InterfaceDeclaration */);
if (node === firstInterfaceDecl) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeWithThis = getTypeWithThisArgument(type);
@@ -40699,7 +44187,7 @@ var ts;
return value;
function evalConstant(e) {
switch (e.kind) {
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
var value_1 = evalConstant(e.operand);
if (value_1 === undefined) {
return undefined;
@@ -40710,7 +44198,7 @@ var ts;
case 51 /* TildeToken */: return ~value_1;
}
return undefined;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
var left = evalConstant(e.left);
if (left === undefined) {
return undefined;
@@ -40734,12 +44222,13 @@ var ts;
}
return undefined;
case 8 /* NumericLiteral */:
+ checkGrammarNumericLiteral(e);
return +e.text;
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return evalConstant(e.expression);
case 70 /* Identifier */:
- case 178 /* ElementAccessExpression */:
- case 177 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
var member = initializer.parent;
var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
var enumType_1;
@@ -40752,7 +44241,7 @@ var ts;
}
else {
var expression = void 0;
- if (e.kind === 178 /* ElementAccessExpression */) {
+ if (e.kind === 179 /* ElementAccessExpression */) {
if (e.argumentExpression === undefined ||
e.argumentExpression.kind !== 9 /* StringLiteral */) {
return undefined;
@@ -40770,7 +44259,7 @@ var ts;
if (current.kind === 70 /* Identifier */) {
break;
}
- else if (current.kind === 177 /* PropertyAccessExpression */) {
+ else if (current.kind === 178 /* PropertyAccessExpression */) {
current = current.expression;
}
else {
@@ -40814,6 +44303,7 @@ var ts;
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
checkCollisionWithCapturedThisVariable(node, node.name);
+ checkCollisionWithCapturedNewTargetVariable(node, node.name);
checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
checkExportsOnMergedDeclarations(node);
@@ -40842,7 +44332,7 @@ var ts;
var seenEnumMissingInitialInitializer_1 = false;
ts.forEach(enumSymbol.declarations, function (declaration) {
// return true if we hit a violation of the rule, false otherwise
- if (declaration.kind !== 229 /* EnumDeclaration */) {
+ if (declaration.kind !== 231 /* EnumDeclaration */) {
return false;
}
var enumDeclaration = declaration;
@@ -40863,10 +44353,10 @@ var ts;
}
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
var declarations = symbol.declarations;
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
- var declaration = declarations_5[_i];
- if ((declaration.kind === 226 /* ClassDeclaration */ ||
- (declaration.kind === 225 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) &&
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+ var declaration = declarations_8[_i];
+ if ((declaration.kind === 228 /* ClassDeclaration */ ||
+ (declaration.kind === 227 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) &&
!ts.isInAmbientContext(declaration)) {
return declaration;
}
@@ -40930,7 +44420,7 @@ var ts;
}
// if the module merges with a class declaration in the same lexical scope,
// we need to track this to ensure the correct emit.
- var mergedClass = ts.getDeclarationOfKind(symbol, 226 /* ClassDeclaration */);
+ var mergedClass = ts.getDeclarationOfKind(symbol, 228 /* ClassDeclaration */);
if (mergedClass &&
inSameLexicalScope(node, mergedClass)) {
getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */;
@@ -40943,7 +44433,7 @@ var ts;
// We can detect if augmentation was applied using following rules:
// - augmentation for a global scope is always applied
// - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module).
- var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432 /* Merged */);
+ var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 134217728 /* Transient */);
if (checkBody && node.body) {
// body of ambient external module is always a module block
for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) {
@@ -40981,39 +44471,39 @@ var ts;
}
function checkModuleAugmentationElement(node, isGlobalAugmentation) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// error each individual name in variable statement instead of marking the entire variable statement
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
var decl = _a[_i];
checkModuleAugmentationElement(decl, isGlobalAugmentation);
}
break;
- case 240 /* ExportAssignment */:
- case 241 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 243 /* ExportDeclaration */:
grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
break;
- case 234 /* ImportEqualsDeclaration */:
- case 235 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 237 /* ImportDeclaration */:
grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
break;
- case 174 /* BindingElement */:
- case 223 /* VariableDeclaration */:
- var name_25 = node.name;
- if (ts.isBindingPattern(name_25)) {
- for (var _b = 0, _c = name_25.elements; _b < _c.length; _b++) {
+ case 175 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
+ var name = node.name;
+ if (ts.isBindingPattern(name)) {
+ for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
var el = _c[_b];
// mark individual names in binding pattern
checkModuleAugmentationElement(el, isGlobalAugmentation);
}
break;
}
- // fallthrough
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ // falls through
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
if (isGlobalAugmentation) {
return;
}
@@ -41023,7 +44513,7 @@ var ts;
// this is done it two steps
// 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error
// 2. main check - report error if value declaration of the parent symbol is module augmentation)
- var reportError = !(symbol.flags & 33554432 /* Merged */);
+ var reportError = !(symbol.flags & 134217728 /* Transient */);
if (!reportError) {
// symbol should not originate in augmentation
reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
@@ -41036,12 +44526,12 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return node;
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
do {
node = node.left;
} while (node.kind !== 70 /* Identifier */);
return node;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
do {
node = node.expression;
} while (node.kind !== 70 /* Identifier */);
@@ -41054,9 +44544,9 @@ var ts;
error(moduleName, ts.Diagnostics.String_literal_expected);
return false;
}
- var inAmbientExternalModule = node.parent.kind === 231 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 /* SourceFile */ && !inAmbientExternalModule) {
- error(moduleName, node.kind === 241 /* ExportDeclaration */ ?
+ var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
+ if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule) {
+ error(moduleName, node.kind === 243 /* ExportDeclaration */ ?
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
return false;
@@ -41089,7 +44579,7 @@ var ts;
(symbol.flags & 793064 /* Type */ ? 793064 /* Type */ : 0) |
(symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);
if (target.flags & excludedMeanings) {
- var message = node.kind === 243 /* ExportSpecifier */ ?
+ var message = node.kind === 245 /* ExportSpecifier */ ?
ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
@@ -41117,7 +44607,7 @@ var ts;
checkImportBinding(importClause);
}
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause.namedBindings.kind === 239 /* NamespaceImport */) {
checkImportBinding(importClause.namedBindings);
}
else {
@@ -41174,8 +44664,10 @@ var ts;
// export { x, y }
// export { x, y } from "foo"
ts.forEach(node.exportClause.elements, checkExportSpecifier);
- var inAmbientExternalModule = node.parent.kind === 231 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
- if (node.parent.kind !== 261 /* SourceFile */ && !inAmbientExternalModule) {
+ var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
+ var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ &&
+ !node.moduleSpecifier && ts.isInAmbientContext(node);
+ if (node.parent.kind !== 264 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
}
}
@@ -41189,7 +44681,7 @@ var ts;
}
}
function checkGrammarModuleElementContext(node, errorMessage) {
- var isInAppropriateContext = node.parent.kind === 261 /* SourceFile */ || node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 230 /* ModuleDeclaration */;
+ var isInAppropriateContext = node.parent.kind === 264 /* SourceFile */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 232 /* ModuleDeclaration */;
if (!isInAppropriateContext) {
grammarErrorOnFirstToken(node, errorMessage);
}
@@ -41215,9 +44707,14 @@ var ts;
// If we hit an export assignment in an illegal context, just bail out to avoid cascading errors.
return;
}
- var container = node.parent.kind === 261 /* SourceFile */ ? node.parent : node.parent.parent;
- if (container.kind === 230 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
- error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ var container = node.parent.kind === 264 /* SourceFile */ ? node.parent : node.parent.parent;
+ if (container.kind === 232 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
+ if (node.isExportEquals) {
+ error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
+ }
+ else {
+ error(node, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
+ }
return;
}
// Grammar checking
@@ -41243,18 +44740,13 @@ var ts;
}
}
function hasExportedMembers(moduleSymbol) {
- for (var id in moduleSymbol.exports) {
- if (id !== "export=") {
- return true;
- }
- }
- return false;
+ return ts.forEachEntry(moduleSymbol.exports, function (_, id) { return id !== "export="; });
}
function checkExternalModuleExports(node) {
var moduleSymbol = getSymbolOfNode(node);
var links = getSymbolLinks(moduleSymbol);
if (!links.exportsChecked) {
- var exportEqualsSymbol = moduleSymbol.exports["export="];
+ var exportEqualsSymbol = moduleSymbol.exports.get("export=");
if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
if (!isTopLevelInExternalModuleAugmentation(declaration)) {
@@ -41263,35 +44755,35 @@ var ts;
}
// Checks for export * conflicts
var exports = getExportsOfModule(moduleSymbol);
- for (var id in exports) {
+ exports && exports.forEach(function (_a, id) {
+ var declarations = _a.declarations, flags = _a.flags;
if (id === "__export") {
- continue;
+ return;
}
- var _a = exports[id], declarations = _a.declarations, flags = _a.flags;
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
// (TS Exceptions: namespaces, function overloads, enums, and interfaces)
if (flags & (1920 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) {
- continue;
+ return;
}
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload);
if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) {
// it is legal to merge type alias with other values
// so count should be either 1 (just type alias) or 2 (type alias + merged value)
- continue;
+ return;
}
if (exportedDeclarationsCount > 1) {
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
- var declaration = declarations_6[_i];
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+ var declaration = declarations_9[_i];
if (isNotOverload(declaration)) {
diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id));
}
}
}
- }
+ });
links.exportsChecked = true;
}
function isNotOverload(declaration) {
- return (declaration.kind !== 225 /* FunctionDeclaration */ && declaration.kind !== 149 /* MethodDeclaration */) ||
+ return (declaration.kind !== 227 /* FunctionDeclaration */ && declaration.kind !== 150 /* MethodDeclaration */) ||
!!declaration.body;
}
}
@@ -41304,123 +44796,123 @@ var ts;
// Only bother checking on a few construct kinds. We don't want to be excessively
// hitting the cancellation token on every node we check.
switch (kind) {
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
cancellationToken.throwIfCancellationRequested();
}
}
switch (kind) {
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return checkTypeParameter(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return checkParameter(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return checkPropertyDeclaration(node);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
return checkSignatureDeclaration(node);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return checkSignatureDeclaration(node);
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return checkMethodDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return checkConstructorDeclaration(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return checkAccessorDeclaration(node);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return checkTypeReferenceNode(node);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return checkTypePredicate(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return checkTypeQuery(node);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return checkTypeLiteral(node);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return checkArrayType(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return checkTupleType(node);
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return checkUnionOrIntersectionType(node);
- case 166 /* ParenthesizedType */:
- case 168 /* TypeOperator */:
+ case 167 /* ParenthesizedType */:
+ case 169 /* TypeOperator */:
return checkSourceElement(node.type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return checkIndexedAccessType(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return checkMappedType(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return checkFunctionDeclaration(node);
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return checkBlock(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return checkVariableStatement(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return checkExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return checkIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return checkDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return checkWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return checkForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return checkForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return checkForOfStatement(node);
- case 214 /* ContinueStatement */:
- case 215 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
return checkBreakOrContinueStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return checkReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return checkWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return checkSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return checkLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return checkThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return checkTryStatement(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return checkVariableDeclaration(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return checkBindingElement(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return checkClassDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return checkInterfaceDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return checkTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return checkEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return checkModuleDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return checkImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return checkImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return checkExportDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return checkExportAssignment(node);
- case 206 /* EmptyStatement */:
+ case 208 /* EmptyStatement */:
checkGrammarStatementInAmbientContext(node);
return;
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
checkGrammarStatementInAmbientContext(node);
return;
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return checkMissingDeclaration(node);
}
}
@@ -41442,17 +44934,17 @@ var ts;
for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) {
var node = deferredNodes_1[_i];
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
break;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- checkAccessorDeferred(node);
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ checkAccessorDeclaration(node);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
checkClassExpressionDeferred(node);
break;
}
@@ -41477,6 +44969,7 @@ var ts;
// Grammar checking
checkGrammarSourceFile(node);
potentialThisCollisions.length = 0;
+ potentialNewTargetCollisions.length = 0;
deferredNodes = [];
deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined;
ts.forEach(node.statements, checkSourceElement);
@@ -41496,6 +44989,10 @@ var ts;
ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
potentialThisCollisions.length = 0;
}
+ if (potentialNewTargetCollisions.length) {
+ ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
+ potentialNewTargetCollisions.length = 0;
+ }
links.flags |= 1 /* TypeChecked */;
}
}
@@ -41553,7 +45050,7 @@ var ts;
function isInsideWithStatementBody(node) {
if (node) {
while (node.parent) {
- if (node.parent.kind === 217 /* WithStatement */ && node.parent.statement === node) {
+ if (node.parent.kind === 219 /* WithStatement */ && node.parent.statement === node) {
return true;
}
node = node.parent;
@@ -41562,12 +45059,12 @@ var ts;
return false;
}
function getSymbolsInScope(location, meaning) {
- var symbols = ts.createMap();
- var memberFlags = 0 /* None */;
if (isInsideWithStatementBody(location)) {
// We cannot answer semantic questions within a with block, do not proceed any further
return [];
}
+ var symbols = ts.createMap();
+ var memberFlags = 0 /* None */;
populateSymbols();
return symbolsToArray(symbols);
function populateSymbols() {
@@ -41576,25 +45073,27 @@ var ts;
copySymbols(location.locals, meaning);
}
switch (location.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (!ts.isExternalOrCommonJsModule(location)) {
break;
}
- case 230 /* ModuleDeclaration */:
+ // falls through
+ case 232 /* ModuleDeclaration */:
copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */);
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
var className = location.name;
if (className) {
copySymbol(location.symbol, meaning);
}
- // fall through; this fall-through is necessary because we would like to handle
+ // falls through
+ // this fall-through is necessary because we would like to handle
// type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
// If we didn't come from static member of class or interface,
// add the type parameters into the symbol table
// (type parameters of classDeclaration/classExpression and interface are in member property of the symbol.
@@ -41603,7 +45102,7 @@ var ts;
copySymbols(getSymbolOfNode(location).members, meaning & 793064 /* Type */);
}
break;
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
var funcName = location.name;
if (funcName) {
copySymbol(location.symbol, meaning);
@@ -41631,17 +45130,16 @@ var ts;
// We will copy all symbol regardless of its reserved name because
// symbolsToArray will check whether the key is a reserved name and
// it will not copy symbol with reserved name to the array
- if (!symbols[id]) {
- symbols[id] = symbol;
+ if (!symbols.has(id)) {
+ symbols.set(id, symbol);
}
}
}
function copySymbols(source, meaning) {
if (meaning) {
- for (var id in source) {
- var symbol = source[id];
+ source.forEach(function (symbol) {
copySymbol(symbol, meaning);
- }
+ });
}
}
}
@@ -41652,28 +45150,28 @@ var ts;
}
function isTypeDeclaration(node) {
switch (node.kind) {
- case 143 /* TypeParameter */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 144 /* TypeParameter */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
return true;
}
}
// True if the given identifier is part of a type reference
function isTypeReferenceIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 141 /* QualifiedName */) {
+ while (node.parent && node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
- return node.parent && (node.parent.kind === 157 /* TypeReference */ || node.parent.kind === 272 /* JSDocTypeReference */);
+ return node.parent && (node.parent.kind === 158 /* TypeReference */ || node.parent.kind === 276 /* JSDocTypeReference */);
}
function isHeritageClauseElementIdentifier(entityName) {
var node = entityName;
- while (node.parent && node.parent.kind === 177 /* PropertyAccessExpression */) {
+ while (node.parent && node.parent.kind === 178 /* PropertyAccessExpression */) {
node = node.parent;
}
- return node.parent && node.parent.kind === 199 /* ExpressionWithTypeArguments */;
+ return node.parent && node.parent.kind === 200 /* ExpressionWithTypeArguments */;
}
function forEachEnclosingClass(node, callback) {
var result;
@@ -41690,13 +45188,13 @@ var ts;
return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
}
function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
- while (nodeOnRightSide.parent.kind === 141 /* QualifiedName */) {
+ while (nodeOnRightSide.parent.kind === 142 /* QualifiedName */) {
nodeOnRightSide = nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ if (nodeOnRightSide.parent.kind === 236 /* ImportEqualsDeclaration */) {
return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
}
- if (nodeOnRightSide.parent.kind === 240 /* ExportAssignment */) {
+ if (nodeOnRightSide.parent.kind === 242 /* ExportAssignment */) {
return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
}
return undefined;
@@ -41704,29 +45202,38 @@ var ts;
function isInRightSideOfImportOrExportAssignment(node) {
return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
}
+ function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {
+ var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
+ switch (specialPropertyAssignmentKind) {
+ case 1 /* ExportsProperty */:
+ case 3 /* PrototypeProperty */:
+ return getSymbolOfNode(entityName.parent);
+ case 4 /* ThisProperty */:
+ case 2 /* ModuleExports */:
+ case 5 /* Property */:
+ return getSymbolOfNode(entityName.parent.parent);
+ }
+ }
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
if (ts.isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
}
- if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 177 /* PropertyAccessExpression */) {
- var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent);
- switch (specialPropertyAssignmentKind) {
- case 1 /* ExportsProperty */:
- case 3 /* PrototypeProperty */:
- return getSymbolOfNode(entityName.parent);
- case 4 /* ThisProperty */:
- case 2 /* ModuleExports */:
- return getSymbolOfNode(entityName.parent.parent);
- default:
+ if (ts.isInJavaScriptFile(entityName) &&
+ entityName.parent.kind === 178 /* PropertyAccessExpression */ &&
+ entityName.parent === entityName.parent.parent.left) {
+ // Check if this is a special property assignment
+ var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
+ if (specialPropertyAssignmentSymbol) {
+ return specialPropertyAssignmentSymbol;
}
}
- if (entityName.parent.kind === 240 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) {
+ if (entityName.parent.kind === 242 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) {
return resolveEntityName(entityName,
/*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
}
- if (entityName.kind !== 177 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) {
+ if (entityName.kind !== 178 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) {
// Since we already checked for ExportAssignment, this really could only be an Import
- var importEqualsDeclaration = ts.getAncestor(entityName, 234 /* ImportEqualsDeclaration */);
+ var importEqualsDeclaration = ts.getAncestor(entityName, 236 /* ImportEqualsDeclaration */);
ts.Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, /*dontResolveAlias*/ true);
}
@@ -41736,7 +45243,7 @@ var ts;
if (isHeritageClauseElementIdentifier(entityName)) {
var meaning = 0 /* None */;
// In an interface or class, we're definitely interested in a type.
- if (entityName.parent.kind === 199 /* ExpressionWithTypeArguments */) {
+ if (entityName.parent.kind === 200 /* ExpressionWithTypeArguments */) {
meaning = 793064 /* Type */;
// In a class 'extends' clause we are also looking for a value.
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) {
@@ -41747,9 +45254,12 @@ var ts;
meaning = 1920 /* Namespace */;
}
meaning |= 8388608 /* Alias */;
- return resolveEntityName(entityName, meaning);
+ var entityNameSymbol = resolveEntityName(entityName, meaning);
+ if (entityNameSymbol) {
+ return entityNameSymbol;
+ }
}
- else if (ts.isPartOfExpression(entityName)) {
+ if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
// Missing entity name.
return undefined;
@@ -41760,14 +45270,14 @@ var ts;
}
return resolveEntityName(entityName, 107455 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true);
}
- else if (entityName.kind === 177 /* PropertyAccessExpression */) {
+ else if (entityName.kind === 178 /* PropertyAccessExpression */) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkPropertyAccessExpression(entityName);
}
return getNodeLinks(entityName).resolvedSymbol;
}
- else if (entityName.kind === 141 /* QualifiedName */) {
+ else if (entityName.kind === 142 /* QualifiedName */) {
var symbol = getNodeLinks(entityName).resolvedSymbol;
if (!symbol) {
checkQualifiedName(entityName);
@@ -41776,20 +45286,20 @@ var ts;
}
}
else if (isTypeReferenceIdentifier(entityName)) {
- var meaning = (entityName.parent.kind === 157 /* TypeReference */ || entityName.parent.kind === 272 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */;
+ var meaning = (entityName.parent.kind === 158 /* TypeReference */ || entityName.parent.kind === 276 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */;
return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true);
}
- else if (entityName.parent.kind === 250 /* JsxAttribute */) {
+ else if (entityName.parent.kind === 252 /* JsxAttribute */) {
return getJsxAttributePropertySymbol(entityName.parent);
}
- if (entityName.parent.kind === 156 /* TypePredicate */) {
+ if (entityName.parent.kind === 157 /* TypePredicate */) {
return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */);
}
// Do we want to return undefined here?
return undefined;
}
function getSymbolAtLocation(node) {
- if (node.kind === 261 /* SourceFile */) {
+ if (node.kind === 264 /* SourceFile */) {
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
}
if (isInsideWithStatementBody(node)) {
@@ -41807,8 +45317,8 @@ var ts;
if (isInRightSideOfImportOrExportAssignment(node)) {
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
}
- else if (node.parent.kind === 174 /* BindingElement */ &&
- node.parent.parent.kind === 172 /* ObjectBindingPattern */ &&
+ else if (node.parent.kind === 175 /* BindingElement */ &&
+ node.parent.parent.kind === 173 /* ObjectBindingPattern */ &&
node === node.parent.propertyName) {
var typeOfPattern = getTypeOfNode(node.parent.parent);
var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text);
@@ -41819,8 +45329,8 @@ var ts;
}
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
return getSymbolOfEntityNameOrPropertyAccessExpression(node);
case 98 /* ThisKeyword */:
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
@@ -41830,16 +45340,16 @@ var ts;
return sig.thisParameter;
}
}
- // fallthrough
+ // falls through
case 96 /* SuperKeyword */:
var type = ts.isPartOfExpression(node) ? getTypeOfExpression(node) : getTypeFromTypeNode(node);
return type.symbol;
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
return getTypeFromTypeNode(node).symbol;
case 122 /* ConstructorKeyword */:
// constructor keyword for an overload, should take us to the definition if it exist
var constructorDeclaration = node.parent;
- if (constructorDeclaration && constructorDeclaration.kind === 150 /* Constructor */) {
+ if (constructorDeclaration && constructorDeclaration.kind === 151 /* Constructor */) {
return constructorDeclaration.parent.symbol;
}
return undefined;
@@ -41847,17 +45357,17 @@ var ts;
// External module name in an import declaration
if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 235 /* ImportDeclaration */ || node.parent.kind === 241 /* ExportDeclaration */) &&
+ ((node.parent.kind === 237 /* ImportDeclaration */ || node.parent.kind === 243 /* ExportDeclaration */) &&
node.parent.moduleSpecifier === node)) {
return resolveExternalModuleName(node, node);
}
if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
return resolveExternalModuleName(node, node);
}
- // Fall through
+ // falls through
case 8 /* NumericLiteral */:
// index access
- if (node.parent.kind === 178 /* ElementAccessExpression */ && node.parent.argumentExpression === node) {
+ if (node.parent.kind === 179 /* ElementAccessExpression */ && node.parent.argumentExpression === node) {
var objectType = getTypeOfExpression(node.parent.expression);
if (objectType === unknownType)
return undefined;
@@ -41874,7 +45384,7 @@ var ts;
// The function returns a value symbol of an identifier in the short-hand property assignment.
// This is necessary as an identifier in short-hand property assignment can contains two meaning:
// property name and property value.
- if (location && location.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (location && location.kind === 261 /* ShorthandPropertyAssignment */) {
return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */);
}
return undefined;
@@ -41891,7 +45401,13 @@ var ts;
return unknownType;
}
if (ts.isPartOfTypeNode(node)) {
- return getTypeFromTypeNode(node);
+ var typeFromTypeNode = getTypeFromTypeNode(node);
+ if (typeFromTypeNode && ts.isExpressionWithTypeArgumentsInClassImplementsClause(node)) {
+ var containingClass = ts.getContainingClass(node);
+ var classType = getTypeOfNode(containingClass);
+ typeFromTypeNode = getTypeWithThisArgument(typeFromTypeNode, classType.thisType);
+ }
+ return typeFromTypeNode;
}
if (ts.isPartOfExpression(node)) {
return getRegularTypeOfExpression(node);
@@ -41899,7 +45415,10 @@ var ts;
if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(node)) {
// A SyntaxKind.ExpressionWithTypeArguments is considered a type node, except when it occurs in the
// extends clause of a class. We handle that case here.
- return getBaseTypes(getDeclaredTypeOfSymbol(getSymbolOfNode(node.parent.parent)))[0];
+ var classNode = ts.getContainingClass(node);
+ var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(classNode));
+ var baseType = getBaseTypes(classType)[0];
+ return baseType && getTypeWithThisArgument(baseType, classType.thisType);
}
if (isTypeDeclaration(node)) {
// In this case, we call getSymbolOfNode instead of getSymbolAtLocation because it is a declaration
@@ -41936,31 +45455,31 @@ var ts;
// [ a ] from
// [a] = [ some array ...]
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) {
- ts.Debug.assert(expr.kind === 176 /* ObjectLiteralExpression */ || expr.kind === 175 /* ArrayLiteralExpression */);
+ ts.Debug.assert(expr.kind === 177 /* ObjectLiteralExpression */ || expr.kind === 176 /* ArrayLiteralExpression */);
// If this is from "for of"
// for ( { a } of elems) {
// }
- if (expr.parent.kind === 213 /* ForOfStatement */) {
- var iteratedType = checkRightHandSideOfForOf(expr.parent.expression);
+ if (expr.parent.kind === 215 /* ForOfStatement */) {
+ var iteratedType = checkRightHandSideOfForOf(expr.parent.expression, expr.parent.awaitModifier);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
// If this is from "for" initializer
// for ({a } = elems[0];.....) { }
- if (expr.parent.kind === 192 /* BinaryExpression */) {
+ if (expr.parent.kind === 193 /* BinaryExpression */) {
var iteratedType = getTypeOfExpression(expr.parent.right);
return checkDestructuringAssignment(expr, iteratedType || unknownType);
}
// If this is from nested object binding pattern
// for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) {
- if (expr.parent.kind === 257 /* PropertyAssignment */) {
+ if (expr.parent.kind === 260 /* PropertyAssignment */) {
var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent);
return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent);
}
// Array literal assignment - array destructuring pattern
- ts.Debug.assert(expr.parent.kind === 175 /* ArrayLiteralExpression */);
+ ts.Debug.assert(expr.parent.kind === 176 /* ArrayLiteralExpression */);
// [{ property1: p1, property2 }] = elems;
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType);
}
// Gets the property symbol corresponding to the property in destructuring assignment
@@ -41981,9 +45500,9 @@ var ts;
return getRegularTypeOfLiteralType(getTypeOfExpression(expr));
}
/**
- * Gets either the static or instance type of a class element, based on
- * whether the element is declared as "static".
- */
+ * Gets either the static or instance type of a class element, based on
+ * whether the element is declared as "static".
+ */
function getParentTypeOfClassElement(node) {
var classSymbol = getSymbolOfNode(node.parent);
return ts.getModifierFlags(node) & 32 /* Static */
@@ -41997,29 +45516,32 @@ var ts;
var propsByName = createSymbolTable(getPropertiesOfType(type));
if (getSignaturesOfType(type, 0 /* Call */).length || getSignaturesOfType(type, 1 /* Construct */).length) {
ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
- if (!propsByName[p.name]) {
- propsByName[p.name] = p;
+ if (!propsByName.has(p.name)) {
+ propsByName.set(p.name, p);
}
});
}
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (symbol.flags & 268435456 /* SyntheticProperty */) {
+ if (getCheckFlags(symbol) & 6 /* Synthetic */) {
var symbols_3 = [];
- var name_26 = symbol.name;
+ var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
- var symbol = getPropertyOfType(t, name_26);
+ var symbol = getPropertyOfType(t, name_2);
if (symbol) {
symbols_3.push(symbol);
}
});
return symbols_3;
}
- else if (symbol.flags & 67108864 /* Transient */) {
+ else if (symbol.flags & 134217728 /* Transient */) {
if (symbol.leftSpread) {
var links = symbol;
- return [links.leftSpread, links.rightSpread];
+ return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ }
+ if (symbol.syntheticOrigin) {
+ return getRootSymbols(symbol.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -42037,7 +45559,8 @@ var ts;
if (!ts.isGeneratedIdentifier(node)) {
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
- return getReferencedValueSymbol(node) === argumentsSymbol;
+ var isPropertyName_1 = node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node;
+ return !isPropertyName_1 && getReferencedValueSymbol(node) === argumentsSymbol;
}
}
return false;
@@ -42058,7 +45581,7 @@ var ts;
// otherwise - check if at least one export is value
symbolLinks.exportsSomeValue = hasExportAssignment
? !!(moduleSymbol.flags & 107455 /* Value */)
- : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue);
+ : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue);
}
return symbolLinks.exportsSomeValue;
function isValue(s) {
@@ -42091,20 +45614,16 @@ var ts;
}
symbol = exportSymbol;
}
- var parentSymbol = getParentOfSymbol(symbol);
- if (parentSymbol) {
- if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 261 /* SourceFile */) {
- var symbolFile = parentSymbol.valueDeclaration;
+ var parentSymbol_1 = getParentOfSymbol(symbol);
+ if (parentSymbol_1) {
+ if (parentSymbol_1.flags & 512 /* ValueModule */ && parentSymbol_1.valueDeclaration.kind === 264 /* SourceFile */) {
+ var symbolFile = parentSymbol_1.valueDeclaration;
var referenceFile = ts.getSourceFileOfNode(node);
// If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined.
var symbolIsUmdExport = symbolFile !== referenceFile;
return symbolIsUmdExport ? undefined : symbolFile;
}
- for (var n = node.parent; n; n = n.parent) {
- if (ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol) {
- return n;
- }
- }
+ return ts.findAncestor(node.parent, function (n) { return ts.isModuleOrEnumDeclaration(n) && getSymbolOfNode(n) === parentSymbol_1; });
}
}
}
@@ -42150,7 +45669,7 @@ var ts;
// they will not collide with anything
var isDeclaredInLoop = nodeLinks_1.flags & 262144 /* BlockScopedBindingInLoop */;
var inLoopInitializer = ts.isIterationStatement(container, /*lookInLabeledStatements*/ false);
- var inLoopBodyBlock = container.kind === 204 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false);
+ var inLoopBodyBlock = container.kind === 206 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false);
links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
}
else {
@@ -42190,22 +45709,17 @@ var ts;
return false;
}
function isValueAliasDeclaration(node) {
- node = ts.getParseTreeNode(node);
- if (node === undefined) {
- // A synthesized node comes from an emit transformation and is always a value.
- return true;
- }
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
var exportClause = node.exportClause;
return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return node.expression
&& node.expression.kind === 70 /* Identifier */
? isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol)
@@ -42215,7 +45729,7 @@ var ts;
}
function isTopLevelValueImportEqualsWithEntityName(node) {
node = ts.getParseTreeNode(node, ts.isImportEqualsDeclaration);
- if (node === undefined || node.parent.kind !== 261 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+ if (node === undefined || node.parent.kind !== 264 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
// parent is not source file or it is not reference to internal module
return false;
}
@@ -42236,11 +45750,6 @@ var ts;
return isConstEnumSymbol(s) || s.constEnumOnlyModule;
}
function isReferencedAliasDeclaration(node, checkChildren) {
- node = ts.getParseTreeNode(node);
- // Purely synthesized nodes are always emitted.
- if (node === undefined) {
- return true;
- }
if (ts.isAliasSymbolDeclaration(node)) {
var symbol = getSymbolOfNode(node);
if (symbol && getSymbolLinks(symbol).referenced) {
@@ -42272,16 +45781,30 @@ var ts;
}
return false;
}
+ function isRequiredInitializedParameter(parameter) {
+ return strictNullChecks &&
+ !isOptionalParameter(parameter) &&
+ parameter.initializer &&
+ !(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
+ }
function getNodeCheckFlags(node) {
- node = ts.getParseTreeNode(node);
- return node ? getNodeLinks(node).flags : undefined;
+ return getNodeLinks(node).flags;
}
function getEnumMemberValue(node) {
computeEnumMemberValues(node.parent);
return getNodeLinks(node).enumMemberValue;
}
+ function canHaveConstantValue(node) {
+ switch (node.kind) {
+ case 263 /* EnumMember */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
+ return true;
+ }
+ return false;
+ }
function getConstantValue(node) {
- if (node.kind === 260 /* EnumMember */) {
+ if (node.kind === 263 /* EnumMember */) {
return getEnumMemberValue(node);
}
var symbol = getNodeLinks(node).resolvedSymbol;
@@ -42299,16 +45822,18 @@ var ts;
function getTypeReferenceSerializationKind(typeName, location) {
// Resolve the symbol as a value to ensure the type can be reached at runtime during emit.
var valueSymbol = resolveEntityName(typeName, 107455 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location);
- var globalPromiseSymbol = tryGetGlobalPromiseConstructorSymbol();
- if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
- return ts.TypeReferenceSerializationKind.Promise;
- }
- var constructorType = valueSymbol ? getTypeOfSymbol(valueSymbol) : undefined;
- if (constructorType && isConstructorType(constructorType)) {
- return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
- }
// Resolve the symbol as a type so that we can provide a more useful hint for the type serializer.
var typeSymbol = resolveEntityName(typeName, 793064 /* Type */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location);
+ if (valueSymbol && valueSymbol === typeSymbol) {
+ var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(/*reportErrors*/ false);
+ if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) {
+ return ts.TypeReferenceSerializationKind.Promise;
+ }
+ var constructorType = getTypeOfSymbol(valueSymbol);
+ if (constructorType && isConstructorType(constructorType)) {
+ return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;
+ }
+ }
// We might not be able to resolve type symbol so use unknown type in that case (eg error case)
if (!typeSymbol) {
return ts.TypeReferenceSerializationKind.ObjectType;
@@ -42354,6 +45879,9 @@ var ts;
var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
+ if (flags & 4096 /* AddUndefined */) {
+ type = includeFalsyTypes(type, 2048 /* Undefined */);
+ }
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
@@ -42368,10 +45896,13 @@ var ts;
var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node));
resolveBaseTypesOfClass(classType);
var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType;
+ if (!baseType.symbol) {
+ writer.reportIllegalExtends();
+ }
getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags);
}
function hasGlobalName(name) {
- return !!globals[name];
+ return globals.has(name);
}
function getReferencedValueSymbol(reference, startInDeclarationContainer) {
var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
@@ -42382,9 +45913,9 @@ var ts;
if (startInDeclarationContainer) {
// When resolving the name of a declaration as a value, we need to start resolution
// at a point outside of the declaration.
- var parent_11 = reference.parent;
- if (ts.isDeclaration(parent_11) && reference === parent_11.name) {
- location = getDeclarationContainer(parent_11);
+ var parent = reference.parent;
+ if (ts.isDeclaration(parent) && reference === parent.name) {
+ location = getDeclarationContainer(parent);
}
}
return resolveName(location, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined);
@@ -42420,34 +45951,48 @@ var ts;
if (resolvedTypeReferenceDirectives) {
// populate reverse mapping: file path -> type reference directive that was resolved to this file
fileToDirective = ts.createFileMap();
- for (var key in resolvedTypeReferenceDirectives) {
- var resolvedDirective = resolvedTypeReferenceDirectives[key];
+ resolvedTypeReferenceDirectives.forEach(function (resolvedDirective, key) {
if (!resolvedDirective) {
- continue;
+ return;
}
var file = host.getSourceFile(resolvedDirective.resolvedFileName);
fileToDirective.set(file.path, key);
- }
+ });
}
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedDeclarationWithCollidingName: getReferencedDeclarationWithCollidingName,
isDeclarationWithCollidingName: isDeclarationWithCollidingName,
- isValueAliasDeclaration: isValueAliasDeclaration,
+ isValueAliasDeclaration: function (node) {
+ node = ts.getParseTreeNode(node);
+ // Synthesized nodes are always treated like values.
+ return node ? isValueAliasDeclaration(node) : true;
+ },
hasGlobalName: hasGlobalName,
- isReferencedAliasDeclaration: isReferencedAliasDeclaration,
- getNodeCheckFlags: getNodeCheckFlags,
+ isReferencedAliasDeclaration: function (node, checkChildren) {
+ node = ts.getParseTreeNode(node);
+ // Synthesized nodes are always treated as referenced.
+ return node ? isReferencedAliasDeclaration(node, checkChildren) : true;
+ },
+ getNodeCheckFlags: function (node) {
+ node = ts.getParseTreeNode(node);
+ return node ? getNodeCheckFlags(node) : undefined;
+ },
isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
+ isRequiredInitializedParameter: isRequiredInitializedParameter,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
- getConstantValue: getConstantValue,
+ getConstantValue: function (node) {
+ node = ts.getParseTreeNode(node, canHaveConstantValue);
+ return node ? getConstantValue(node) : undefined;
+ },
collectLinkedAliases: collectLinkedAliases,
getReferencedValueDeclaration: getReferencedValueDeclaration,
getTypeReferenceSerializationKind: getTypeReferenceSerializationKind,
@@ -42470,7 +46015,7 @@ var ts;
// property access can only be used as values
// qualified names can only be used as types\namespaces
// identifiers are treated as values only if they appear in type queries
- var meaning = (node.kind === 177 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node))
+ var meaning = (node.kind === 178 /* PropertyAccessExpression */) || (node.kind === 70 /* Identifier */ && isInTypeQuery(node))
? 107455 /* Value */ | 1048576 /* ExportValue */
: 793064 /* Type */ | 1920 /* Namespace */;
var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true);
@@ -42513,15 +46058,15 @@ var ts;
// external modules cannot define or contribute to type declaration files
var current = symbol;
while (true) {
- var parent_12 = getParentOfSymbol(current);
- if (parent_12) {
- current = parent_12;
+ var parent = getParentOfSymbol(current);
+ if (parent) {
+ current = parent;
}
else {
break;
}
}
- if (current.valueDeclaration && current.valueDeclaration.kind === 261 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
+ if (current.valueDeclaration && current.valueDeclaration.kind === 264 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
return false;
}
// check that at least one declaration of top level symbol originates from type declaration file
@@ -42541,7 +46086,7 @@ var ts;
if (!moduleSymbol) {
return undefined;
}
- return ts.getDeclarationOfKind(moduleSymbol, 261 /* SourceFile */);
+ return ts.getDeclarationOfKind(moduleSymbol, 264 /* SourceFile */);
}
function initializeTypeChecker() {
// Bind all source files and propagate errors
@@ -42551,8 +46096,6 @@ var ts;
}
// Initialize global symbol table
var augmentations;
- var requestedExternalEmitHelpers = 0;
- var firstFileRequestingExternalHelpers;
for (var _b = 0, _c = host.getSourceFiles(); _b < _c.length; _b++) {
var file = _c[_b];
if (!ts.isExternalOrCommonJsModule(file)) {
@@ -42567,20 +46110,11 @@ var ts;
if (file.symbol && file.symbol.globalExports) {
// Merge in UMD exports with first-in-wins semantics (see #9771)
var source = file.symbol.globalExports;
- for (var id in source) {
- if (!(id in globals)) {
- globals[id] = source[id];
- }
- }
- }
- if ((compilerOptions.isolatedModules || ts.isExternalModule(file)) && !file.isDeclarationFile) {
- var fileRequestedExternalEmitHelpers = file.flags & 64512 /* EmitHelperFlags */;
- if (fileRequestedExternalEmitHelpers) {
- requestedExternalEmitHelpers |= fileRequestedExternalEmitHelpers;
- if (firstFileRequestingExternalHelpers === undefined) {
- firstFileRequestingExternalHelpers = file;
+ source.forEach(function (sourceSymbol, id) {
+ if (!globals.has(id)) {
+ globals.set(id, sourceSymbol);
}
- }
+ });
}
}
if (augmentations) {
@@ -42597,110 +46131,67 @@ var ts;
// Setup global builtins
addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
- getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
+ getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments", /*arity*/ 0, /*reportErrors*/ true);
getSymbolLinks(unknownSymbol).type = unknownType;
// Initialize special types
- globalArrayType = getGlobalType("Array", /*arity*/ 1);
- globalObjectType = getGlobalType("Object");
- globalFunctionType = getGlobalType("Function");
- globalStringType = getGlobalType("String");
- globalNumberType = getGlobalType("Number");
- globalBooleanType = getGlobalType("Boolean");
- globalRegExpType = getGlobalType("RegExp");
- jsxElementType = getExportedTypeFromNamespace("JSX", JsxNames.Element);
- getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
- getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
- getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
- getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
- getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", /*arity*/ 1); });
- getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); });
- getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", /*arity*/ 1); });
- tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064 /* Type */, /*diagnostic*/ undefined) && getGlobalPromiseType(); });
- getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", /*arity*/ 1); });
- getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType);
- getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); });
- tryGetGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalSymbol("Promise", 107455 /* Value */, /*diagnostic*/ undefined) && getGlobalPromiseConstructorSymbol(); });
- getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); });
- getGlobalThenableType = ts.memoize(createThenableType);
- getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); });
- if (languageVersion >= 2 /* ES2015 */) {
- getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); });
- getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", /*arity*/ 1); });
- getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", /*arity*/ 1); });
- getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", /*arity*/ 1); });
- }
- else {
- getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; });
- getGlobalIterableType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; });
- getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; });
- }
+ globalArrayType = getGlobalType("Array", /*arity*/ 1, /*reportErrors*/ true);
+ globalObjectType = getGlobalType("Object", /*arity*/ 0, /*reportErrors*/ true);
+ globalFunctionType = getGlobalType("Function", /*arity*/ 0, /*reportErrors*/ true);
+ globalStringType = getGlobalType("String", /*arity*/ 0, /*reportErrors*/ true);
+ globalNumberType = getGlobalType("Number", /*arity*/ 0, /*reportErrors*/ true);
+ globalBooleanType = getGlobalType("Boolean", /*arity*/ 0, /*reportErrors*/ true);
+ globalRegExpType = getGlobalType("RegExp", /*arity*/ 0, /*reportErrors*/ true);
anyArrayType = createArrayType(anyType);
autoArrayType = createArrayType(autoType);
- var symbol = getGlobalSymbol("ReadonlyArray", 793064 /* Type */, /*diagnostic*/ undefined);
- globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, /*arity*/ 1);
+ globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", /*arity*/ 1);
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
- // If we have specified that we are importing helpers, we should report global
- // errors if we cannot resolve the helpers external module, or if it does not have
- // the necessary helpers exported.
- if (compilerOptions.importHelpers && firstFileRequestingExternalHelpers) {
- // Find the first reference to the helpers module.
- var helpersModule = resolveExternalModule(firstFileRequestingExternalHelpers, ts.externalHelpersModuleNameText, ts.Diagnostics.Cannot_find_module_0,
- /*errorNode*/ undefined);
- // If we found the module, report errors if it does not have the necessary exports.
- if (helpersModule) {
- var exports = helpersModule.exports;
- if (requestedExternalEmitHelpers & 1024 /* HasClassExtends */ && languageVersion < 2 /* ES2015 */) {
- verifyHelperSymbol(exports, "__extends", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 16384 /* HasSpreadAttribute */ &&
- (languageVersion < 5 /* ESNext */ || compilerOptions.jsx === 2 /* React */)) {
- verifyHelperSymbol(exports, "__assign", 107455 /* Value */);
- }
- if (languageVersion < 5 /* ESNext */ && requestedExternalEmitHelpers & 32768 /* HasRestAttribute */) {
- verifyHelperSymbol(exports, "__rest", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 2048 /* HasDecorators */) {
- verifyHelperSymbol(exports, "__decorate", 107455 /* Value */);
- if (compilerOptions.emitDecoratorMetadata) {
- verifyHelperSymbol(exports, "__metadata", 107455 /* Value */);
- }
- }
- if (requestedExternalEmitHelpers & 4096 /* HasParamDecorators */) {
- verifyHelperSymbol(exports, "__param", 107455 /* Value */);
- }
- if (requestedExternalEmitHelpers & 8192 /* HasAsyncFunctions */) {
- verifyHelperSymbol(exports, "__awaiter", 107455 /* Value */);
- if (languageVersion < 2 /* ES2015 */) {
- verifyHelperSymbol(exports, "__generator", 107455 /* Value */);
+ globalThisType = getGlobalTypeOrUndefined("ThisType", /*arity*/ 1);
+ }
+ function checkExternalEmitHelpers(location, helpers) {
+ if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) {
+ var sourceFile = ts.getSourceFileOfNode(location);
+ if (ts.isEffectiveExternalModule(sourceFile, compilerOptions) && !ts.isInAmbientContext(location)) {
+ var helpersModule = resolveHelpersModule(sourceFile, location);
+ if (helpersModule !== unknownSymbol) {
+ var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
+ for (var helper = 1 /* FirstEmitHelper */; helper <= 8192 /* LastEmitHelper */; helper <<= 1) {
+ if (uncheckedHelpers & helper) {
+ var name = getHelperName(helper);
+ var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455 /* Value */);
+ if (!symbol) {
+ error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ }
+ }
}
}
+ requestedExternalEmitHelpers |= helpers;
}
}
}
- function verifyHelperSymbol(symbols, name, meaning) {
- var symbol = getSymbol(symbols, ts.escapeIdentifier(name), meaning);
- if (!symbol) {
- error(/*location*/ undefined, ts.Diagnostics.Module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name);
+ function getHelperName(helper) {
+ switch (helper) {
+ case 1 /* Extends */: return "__extends";
+ case 2 /* Assign */: return "__assign";
+ case 4 /* Rest */: return "__rest";
+ case 8 /* Decorate */: return "__decorate";
+ case 16 /* Metadata */: return "__metadata";
+ case 32 /* Param */: return "__param";
+ case 64 /* Awaiter */: return "__awaiter";
+ case 128 /* Generator */: return "__generator";
+ case 256 /* Values */: return "__values";
+ case 512 /* Read */: return "__read";
+ case 1024 /* Spread */: return "__spread";
+ case 2048 /* AsyncGenerator */: return "__asyncGenerator";
+ case 4096 /* AsyncDelegator */: return "__asyncDelegator";
+ case 8192 /* AsyncValues */: return "__asyncValues";
+ default: ts.Debug.fail("Unrecognized helper.");
}
}
- function createInstantiatedPromiseLikeType() {
- var promiseLikeType = getGlobalPromiseLikeType();
- if (promiseLikeType !== emptyGenericType) {
- return createTypeReference(promiseLikeType, [anyType]);
+ function resolveHelpersModule(node, errorNode) {
+ if (!externalHelpersModule) {
+ externalHelpersModule = resolveExternalModule(node, ts.externalHelpersModuleNameText, ts.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;
}
- return emptyObjectType;
- }
- function createThenableType() {
- // build the thenable type that is used to verify against a non-promise "thenable" operand to `await`.
- var thenPropertySymbol = createSymbol(67108864 /* Transient */ | 4 /* Property */, "then");
- getSymbolLinks(thenPropertySymbol).type = globalFunctionType;
- var thenableType = createObjectType(16 /* Anonymous */);
- thenableType.properties = [thenPropertySymbol];
- thenableType.members = createSymbolTable(thenableType.properties);
- thenableType.callSignatures = [];
- thenableType.constructSignatures = [];
- return thenableType;
+ return externalHelpersModule;
}
// GRAMMAR CHECKING
function checkGrammarDecorators(node) {
@@ -42708,14 +46199,14 @@ var ts;
return false;
}
if (!ts.nodeCanBeDecorated(node)) {
- if (node.kind === 149 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) {
+ if (node.kind === 150 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
}
else {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
}
}
- else if (node.kind === 151 /* GetAccessor */ || node.kind === 152 /* SetAccessor */) {
+ else if (node.kind === 152 /* GetAccessor */ || node.kind === 153 /* SetAccessor */) {
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -42733,16 +46224,16 @@ var ts;
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
var modifier = _a[_i];
if (modifier.kind !== 130 /* ReadonlyKeyword */) {
- if (node.kind === 146 /* PropertySignature */ || node.kind === 148 /* MethodSignature */) {
+ if (node.kind === 147 /* PropertySignature */ || node.kind === 149 /* MethodSignature */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
}
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
}
}
switch (modifier.kind) {
case 75 /* ConstKeyword */:
- if (node.kind !== 229 /* EnumDeclaration */ && node.parent.kind === 226 /* ClassDeclaration */) {
+ if (node.kind !== 231 /* EnumDeclaration */ && node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(75 /* ConstKeyword */));
}
break;
@@ -42768,7 +46259,7 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
}
- else if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
}
else if (flags & 128 /* Abstract */) {
@@ -42791,10 +46282,10 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
}
- else if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ else if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
}
else if (flags & 128 /* Abstract */) {
@@ -42807,7 +46298,7 @@ var ts;
if (flags & 64 /* Readonly */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
}
- else if (node.kind !== 147 /* PropertyDeclaration */ && node.kind !== 146 /* PropertySignature */ && node.kind !== 155 /* IndexSignature */ && node.kind !== 144 /* Parameter */) {
+ else if (node.kind !== 148 /* PropertyDeclaration */ && node.kind !== 147 /* PropertySignature */ && node.kind !== 156 /* IndexSignature */ && node.kind !== 145 /* Parameter */) {
// If node.kind === SyntaxKind.Parameter, checkParameter report an error if it's not a parameter property.
return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
@@ -42827,10 +46318,10 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
}
flags |= 1 /* Export */;
@@ -42842,13 +46333,13 @@ var ts;
else if (flags & 256 /* Async */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
}
- else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 231 /* ModuleBlock */) {
+ else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 233 /* ModuleBlock */) {
return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
}
flags |= 2 /* Ambient */;
@@ -42858,14 +46349,14 @@ var ts;
if (flags & 128 /* Abstract */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
}
- if (node.kind !== 226 /* ClassDeclaration */) {
- if (node.kind !== 149 /* MethodDeclaration */ &&
- node.kind !== 147 /* PropertyDeclaration */ &&
- node.kind !== 151 /* GetAccessor */ &&
- node.kind !== 152 /* SetAccessor */) {
+ if (node.kind !== 228 /* ClassDeclaration */) {
+ if (node.kind !== 150 /* MethodDeclaration */ &&
+ node.kind !== 148 /* PropertyDeclaration */ &&
+ node.kind !== 152 /* GetAccessor */ &&
+ node.kind !== 153 /* SetAccessor */) {
return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
}
- if (!(node.parent.kind === 226 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) {
+ if (!(node.parent.kind === 228 /* ClassDeclaration */ && ts.getModifierFlags(node.parent) & 128 /* Abstract */)) {
return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
}
if (flags & 32 /* Static */) {
@@ -42884,7 +46375,7 @@ var ts;
else if (flags & 2 /* Ambient */ || ts.isInAmbientContext(node.parent)) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
}
- else if (node.kind === 144 /* Parameter */) {
+ else if (node.kind === 145 /* Parameter */) {
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
}
flags |= 256 /* Async */;
@@ -42892,7 +46383,7 @@ var ts;
break;
}
}
- if (node.kind === 150 /* Constructor */) {
+ if (node.kind === 151 /* Constructor */) {
if (flags & 32 /* Static */) {
return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
@@ -42907,13 +46398,13 @@ var ts;
}
return;
}
- else if ((node.kind === 235 /* ImportDeclaration */ || node.kind === 234 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
+ else if ((node.kind === 237 /* ImportDeclaration */ || node.kind === 236 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
}
- else if (node.kind === 144 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) {
+ else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
}
- else if (node.kind === 144 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) {
+ else if (node.kind === 145 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) {
return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
}
if (flags & 256 /* Async */) {
@@ -42933,37 +46424,37 @@ var ts;
}
function shouldReportBadModifier(node) {
switch (node.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 155 /* IndexSignature */:
- case 230 /* ModuleDeclaration */:
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
- case 240 /* ExportAssignment */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 144 /* Parameter */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ case 232 /* ModuleDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 145 /* Parameter */:
return false;
default:
- if (node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
return false;
}
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return nodeHasAnyModifiersExcept(node, 119 /* AsyncKeyword */);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return nodeHasAnyModifiersExcept(node, 116 /* AbstractKeyword */);
- case 227 /* InterfaceDeclaration */:
- case 205 /* VariableStatement */:
- case 228 /* TypeAliasDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 207 /* VariableStatement */:
+ case 230 /* TypeAliasDeclaration */:
return true;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return nodeHasAnyModifiersExcept(node, 75 /* ConstKeyword */);
default:
ts.Debug.fail();
@@ -42976,14 +46467,11 @@ var ts;
}
function checkGrammarAsyncModifier(node, asyncModifier) {
switch (node.kind) {
- case 149 /* MethodDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- if (!node.asteriskToken) {
- return false;
- }
- break;
+ case 150 /* MethodDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ return false;
}
return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
}
@@ -43041,8 +46529,12 @@ var ts;
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) ||
checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
}
+ function checkGrammarClassLikeDeclaration(node) {
+ var file = ts.getSourceFileOfNode(node);
+ return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);
+ }
function checkGrammarArrowFunction(node, file) {
- if (node.kind === 185 /* ArrowFunction */) {
+ if (node.kind === 186 /* ArrowFunction */) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
@@ -43077,7 +46569,7 @@ var ts;
if (!parameter.type) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
}
- if (parameter.type.kind !== 134 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) {
+ if (parameter.type.kind !== 135 /* StringKeyword */ && parameter.type.kind !== 132 /* NumberKeyword */) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
}
if (!node.type) {
@@ -43105,7 +46597,7 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
var arg = args_4[_i];
- if (arg.kind === 198 /* OmittedExpression */) {
+ if (arg.kind === 199 /* OmittedExpression */) {
return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
}
}
@@ -43178,28 +46670,25 @@ var ts;
}
function checkGrammarComputedPropertyName(node) {
// If node is not a computedPropertyName, just skip the grammar checking
- if (node.kind !== 142 /* ComputedPropertyName */) {
+ if (node.kind !== 143 /* ComputedPropertyName */) {
return false;
}
var computedPropertyName = node;
- if (computedPropertyName.expression.kind === 192 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) {
+ if (computedPropertyName.expression.kind === 193 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 25 /* CommaToken */) {
return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
}
}
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
- ts.Debug.assert(node.kind === 225 /* FunctionDeclaration */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 149 /* MethodDeclaration */);
+ ts.Debug.assert(node.kind === 227 /* FunctionDeclaration */ ||
+ node.kind === 185 /* FunctionExpression */ ||
+ node.kind === 150 /* MethodDeclaration */);
if (ts.isInAmbientContext(node)) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
}
if (!node.body) {
return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
}
- if (languageVersion < 2 /* ES2015 */) {
- return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher);
- }
}
}
function checkGrammarForInvalidQuestionMark(questionToken, message) {
@@ -43215,15 +46704,15 @@ var ts;
var GetOrSetAccessor = GetAccessor | SetAccessor;
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
var prop = _a[_i];
- if (prop.kind === 259 /* SpreadAssignment */) {
+ if (prop.kind === 262 /* SpreadAssignment */) {
continue;
}
- var name_27 = prop.name;
- if (name_27.kind === 142 /* ComputedPropertyName */) {
+ var name = prop.name;
+ if (name.kind === 143 /* ComputedPropertyName */) {
// If the name is not a ComputedPropertyName, the grammar checking will skip it
- checkGrammarComputedPropertyName(name_27);
+ checkGrammarComputedPropertyName(name);
}
- if (prop.kind === 258 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
+ if (prop.kind === 261 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
// having objectAssignmentInitializer is only valid in ObjectAssignmentPattern
// outside of destructuring it is a syntax error
return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);
@@ -43232,7 +46721,7 @@ var ts;
if (prop.modifiers) {
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
var mod = _c[_b];
- if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 149 /* MethodDeclaration */) {
+ if (mod.kind !== 119 /* AsyncKeyword */ || prop.kind !== 150 /* MethodDeclaration */) {
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
}
}
@@ -43246,69 +46735,69 @@ var ts;
// d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
// and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
var currentKind = void 0;
- if (prop.kind === 257 /* PropertyAssignment */ || prop.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (prop.kind === 260 /* PropertyAssignment */ || prop.kind === 261 /* ShorthandPropertyAssignment */) {
// Grammar checking for computedPropertyName and shorthandPropertyAssignment
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
- if (name_27.kind === 8 /* NumericLiteral */) {
- checkGrammarNumericLiteral(name_27);
+ if (name.kind === 8 /* NumericLiteral */) {
+ checkGrammarNumericLiteral(name);
}
currentKind = Property;
}
- else if (prop.kind === 149 /* MethodDeclaration */) {
+ else if (prop.kind === 150 /* MethodDeclaration */) {
currentKind = Property;
}
- else if (prop.kind === 151 /* GetAccessor */) {
+ else if (prop.kind === 152 /* GetAccessor */) {
currentKind = GetAccessor;
}
- else if (prop.kind === 152 /* SetAccessor */) {
+ else if (prop.kind === 153 /* SetAccessor */) {
currentKind = SetAccessor;
}
else {
ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
}
- var effectiveName = ts.getPropertyNameForPropertyNameNode(name_27);
+ var effectiveName = ts.getPropertyNameForPropertyNameNode(name);
if (effectiveName === undefined) {
continue;
}
- if (!seen[effectiveName]) {
- seen[effectiveName] = currentKind;
+ var existingKind = seen.get(effectiveName);
+ if (!existingKind) {
+ seen.set(effectiveName, currentKind);
}
else {
- var existingKind = seen[effectiveName];
if (currentKind === Property && existingKind === Property) {
- grammarErrorOnNode(name_27, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_27));
+ grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
}
else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
- seen[effectiveName] = currentKind | existingKind;
+ seen.set(effectiveName, currentKind | existingKind);
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
}
}
else {
- return grammarErrorOnNode(name_27, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
}
}
}
}
function checkGrammarJsxElement(node) {
var seen = ts.createMap();
- for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
+ for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
var attr = _a[_i];
- if (attr.kind === 251 /* JsxSpreadAttribute */) {
+ if (attr.kind === 254 /* JsxSpreadAttribute */) {
continue;
}
var jsxAttr = attr;
- var name_28 = jsxAttr.name;
- if (!seen[name_28.text]) {
- seen[name_28.text] = true;
+ var name = jsxAttr.name;
+ if (!seen.get(name.text)) {
+ seen.set(name.text, true);
}
else {
- return grammarErrorOnNode(name_28, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
+ return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
}
var initializer = jsxAttr.initializer;
- if (initializer && initializer.kind === 252 /* JsxExpression */ && !initializer.expression) {
+ if (initializer && initializer.kind === 255 /* JsxExpression */ && !initializer.expression) {
return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
}
}
@@ -43317,7 +46806,12 @@ var ts;
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
- if (forInOrOfStatement.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (forInOrOfStatement.kind === 215 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
+ if ((forInOrOfStatement.flags & 16384 /* AwaitContext */) === 0 /* None */) {
+ return grammarErrorOnNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);
+ }
+ }
+ if (forInOrOfStatement.initializer.kind === 226 /* VariableDeclarationList */) {
var variableList = forInOrOfStatement.initializer;
if (!checkGrammarVariableDeclarationList(variableList)) {
var declarations = variableList.declarations;
@@ -43332,20 +46826,20 @@ var ts;
return false;
}
if (declarations.length > 1) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
: ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
}
var firstDeclaration = declarations[0];
if (firstDeclaration.initializer) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
: ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
}
if (firstDeclaration.type) {
- var diagnostic = forInOrOfStatement.kind === 212 /* ForInStatement */
+ var diagnostic = forInOrOfStatement.kind === 214 /* ForInStatement */
? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
: ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -43365,15 +46859,18 @@ var ts;
else if (accessor.body === undefined && !(ts.getModifierFlags(accessor) & 128 /* Abstract */)) {
return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
}
+ else if (accessor.body && ts.getModifierFlags(accessor) & 128 /* Abstract */) {
+ return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+ }
else if (accessor.typeParameters) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
}
else if (!doesAccessorHaveCorrectParameterCount(accessor)) {
- return grammarErrorOnNode(accessor.name, kind === 151 /* GetAccessor */ ?
+ return grammarErrorOnNode(accessor.name, kind === 152 /* GetAccessor */ ?
ts.Diagnostics.A_get_accessor_cannot_have_parameters :
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
}
- else if (kind === 152 /* SetAccessor */) {
+ else if (kind === 153 /* SetAccessor */) {
if (accessor.type) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
}
@@ -43392,14 +46889,14 @@ var ts;
}
}
/** Does the accessor have the right number of parameters?
-
- A get accessor has no parameters or a single `this` parameter.
- A set accessor has one parameter or a `this` parameter and one more parameter */
+ * A get accessor has no parameters or a single `this` parameter.
+ * A set accessor has one parameter or a `this` parameter and one more parameter.
+ */
function doesAccessorHaveCorrectParameterCount(accessor) {
- return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 151 /* GetAccessor */ ? 0 : 1);
+ return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 0 : 1);
}
function getAccessorThisParameter(accessor) {
- if (accessor.parameters.length === (accessor.kind === 151 /* GetAccessor */ ? 1 : 2)) {
+ if (accessor.parameters.length === (accessor.kind === 152 /* GetAccessor */ ? 1 : 2)) {
return ts.getThisParameter(accessor);
}
}
@@ -43414,7 +46911,7 @@ var ts;
checkGrammarForGenerator(node)) {
return true;
}
- if (node.parent.kind === 176 /* ObjectLiteralExpression */) {
+ if (node.parent.kind === 177 /* ObjectLiteralExpression */) {
if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
return true;
}
@@ -43435,10 +46932,10 @@ var ts;
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
- else if (node.parent.kind === 227 /* InterfaceDeclaration */) {
+ else if (node.parent.kind === 229 /* InterfaceDeclaration */) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
- else if (node.parent.kind === 161 /* TypeLiteral */) {
+ else if (node.parent.kind === 162 /* TypeLiteral */) {
return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -43449,11 +46946,11 @@ var ts;
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (current.kind) {
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
if (node.label && current.label.text === node.label.text) {
// found matching label - verify that label usage is correct
// continue can only target labels that are on iteration statements
- var isMisplacedContinueLabel = node.kind === 214 /* ContinueStatement */
+ var isMisplacedContinueLabel = node.kind === 216 /* ContinueStatement */
&& !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true);
if (isMisplacedContinueLabel) {
return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -43461,8 +46958,8 @@ var ts;
return false;
}
break;
- case 218 /* SwitchStatement */:
- if (node.kind === 215 /* BreakStatement */ && !node.label) {
+ case 220 /* SwitchStatement */:
+ if (node.kind === 217 /* BreakStatement */ && !node.label) {
// unlabeled break within switch statement - ok
return false;
}
@@ -43477,13 +46974,13 @@ var ts;
current = current.parent;
}
if (node.label) {
- var message = node.kind === 215 /* BreakStatement */
+ var message = node.kind === 217 /* BreakStatement */
? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
: ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
}
else {
- var message = node.kind === 215 /* BreakStatement */
+ var message = node.kind === 217 /* BreakStatement */
? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
: ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
return grammarErrorOnNode(node, message);
@@ -43495,7 +46992,7 @@ var ts;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
}
- if (node.name.kind === 173 /* ArrayBindingPattern */ || node.name.kind === 172 /* ObjectBindingPattern */) {
+ if (node.name.kind === 174 /* ArrayBindingPattern */ || node.name.kind === 173 /* ObjectBindingPattern */) {
return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
}
if (node.initializer) {
@@ -43506,11 +47003,11 @@ var ts;
}
function isStringOrNumberLiteralExpression(expr) {
return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ ||
- expr.kind === 190 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
+ expr.kind === 191 /* PrefixUnaryExpression */ && expr.operator === 37 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */;
}
function checkGrammarVariableDeclaration(node) {
- if (node.parent.parent.kind !== 212 /* ForInStatement */ && node.parent.parent.kind !== 213 /* ForOfStatement */) {
+ if (node.parent.parent.kind !== 214 /* ForInStatement */ && node.parent.parent.kind !== 215 /* ForOfStatement */) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
if (ts.isConst(node) && !node.type) {
@@ -43539,6 +47036,10 @@ var ts;
}
}
}
+ if (compilerOptions.module !== ts.ModuleKind.ES2015 && compilerOptions.module !== ts.ModuleKind.System && !compilerOptions.noEmit &&
+ !ts.isInAmbientContext(node.parent.parent) && ts.hasModifier(node.parent.parent, 1 /* Export */)) {
+ checkESModuleMarker(node.name);
+ }
var checkLetConstNames = (ts.isLet(node) || ts.isConst(node));
// 1. LexicalDeclaration : LetOrConst BindingList ;
// It is a Syntax Error if the BoundNames of BindingList contains "let".
@@ -43548,6 +47049,22 @@ var ts;
// and its Identifier is eval or arguments
return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
}
+ function checkESModuleMarker(name) {
+ if (name.kind === 70 /* Identifier */) {
+ if (ts.unescapeIdentifier(name.text) === "__esModule") {
+ return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
+ }
+ }
+ else {
+ var elements = name.elements;
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var element = elements_2[_i];
+ if (!ts.isOmittedExpression(element)) {
+ return checkESModuleMarker(element.name);
+ }
+ }
+ }
+ }
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 70 /* Identifier */) {
if (name.originalKeywordKind === 109 /* LetKeyword */) {
@@ -43556,8 +47073,8 @@ var ts;
}
else {
var elements = name.elements;
- for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
- var element = elements_2[_i];
+ for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
+ var element = elements_3[_i];
if (!ts.isOmittedExpression(element)) {
checkGrammarNameInLetOrConstDeclarations(element.name);
}
@@ -43575,15 +47092,15 @@ var ts;
}
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
- case 208 /* IfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 210 /* IfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
return false;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return allowLetAndConstDeclarations(parent.parent);
}
return true;
@@ -43598,6 +47115,13 @@ var ts;
}
}
}
+ function checkGrammarMetaProperty(node) {
+ if (node.keywordToken === 93 /* NewKeyword */) {
+ if (node.name.text !== "target") {
+ return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, ts.tokenToString(node.keywordToken), "target");
+ }
+ }
+ }
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
}
@@ -43638,7 +47162,7 @@ var ts;
return true;
}
}
- else if (node.parent.kind === 227 /* InterfaceDeclaration */) {
+ else if (node.parent.kind === 229 /* InterfaceDeclaration */) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -43646,7 +47170,7 @@ var ts;
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
}
}
- else if (node.parent.kind === 161 /* TypeLiteral */) {
+ else if (node.parent.kind === 162 /* TypeLiteral */) {
if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
@@ -43671,13 +47195,13 @@ var ts;
// export_opt AmbientDeclaration
//
// TODO: The spec needs to be amended to reflect this grammar.
- if (node.kind === 227 /* InterfaceDeclaration */ ||
- node.kind === 228 /* TypeAliasDeclaration */ ||
- node.kind === 235 /* ImportDeclaration */ ||
- node.kind === 234 /* ImportEqualsDeclaration */ ||
- node.kind === 241 /* ExportDeclaration */ ||
- node.kind === 240 /* ExportAssignment */ ||
- node.kind === 233 /* NamespaceExportDeclaration */ ||
+ if (node.kind === 229 /* InterfaceDeclaration */ ||
+ node.kind === 230 /* TypeAliasDeclaration */ ||
+ node.kind === 237 /* ImportDeclaration */ ||
+ node.kind === 236 /* ImportEqualsDeclaration */ ||
+ node.kind === 243 /* ExportDeclaration */ ||
+ node.kind === 242 /* ExportAssignment */ ||
+ node.kind === 235 /* NamespaceExportDeclaration */ ||
ts.getModifierFlags(node) & (2 /* Ambient */ | 1 /* Export */ | 512 /* Default */)) {
return false;
}
@@ -43686,7 +47210,7 @@ var ts;
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
- if (ts.isDeclaration(decl) || decl.kind === 205 /* VariableStatement */) {
+ if (ts.isDeclaration(decl) || decl.kind === 207 /* VariableStatement */) {
if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
return true;
}
@@ -43712,7 +47236,7 @@ var ts;
// to prevent noisiness. So use a bit on the block to indicate if
// this has already been reported, and don't report if it has.
//
- if (node.parent.kind === 204 /* Block */ || node.parent.kind === 231 /* ModuleBlock */ || node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 206 /* Block */ || node.parent.kind === 233 /* ModuleBlock */ || node.parent.kind === 264 /* SourceFile */) {
var links_1 = getNodeLinks(node.parent);
// Check if the containing block ever report this error
if (!links_1.hasReportedStatementInAmbientContext) {
@@ -43720,13 +47244,30 @@ var ts;
}
}
else {
+ // We must be parented by a statement. If so, there's no need
+ // to report the error as our parent will have already done it.
+ // Debug.assert(isStatement(node.parent));
}
}
}
function checkGrammarNumericLiteral(node) {
// Grammar checking
- if (node.isOctalLiteral && languageVersion >= 1 /* ES5 */) {
- return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
+ if (node.numericLiteralFlags & 4 /* Octal */) {
+ var diagnosticMessage = void 0;
+ if (languageVersion >= 1 /* ES5 */) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 172 /* LiteralType */)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
+ }
+ else if (ts.isChildOfNodeWithKind(node, 263 /* EnumMember */)) {
+ diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
+ }
+ if (diagnosticMessage) {
+ var withMinus = ts.isPrefixUnaryExpression(node.parent) && node.parent.operator === 37 /* MinusToken */;
+ var literal = (withMinus ? "-" : "") + "0o" + node.text;
+ return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
+ }
}
}
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
@@ -43739,11 +47280,11 @@ var ts;
}
function getAmbientModules() {
var result = [];
- for (var sym in globals) {
+ globals.forEach(function (global, sym) {
if (ambientModuleSymbolRegex.test(sym)) {
- result.push(globals[sym]);
+ result.push(global);
}
- }
+ });
return result;
}
}
@@ -43752,73 +47293,408 @@ var ts;
/// <reference path="checker.ts" />
/// <reference path="factory.ts" />
/// <reference path="utilities.ts" />
-/* @internal */
var ts;
(function (ts) {
- ;
+ function visitNode(node, visitor, test, lift) {
+ if (node === undefined || visitor === undefined) {
+ return node;
+ }
+ ts.aggregateTransformFlags(node);
+ var visited = visitor(node);
+ if (visited === node) {
+ return node;
+ }
+ var visitedNode;
+ if (visited === undefined) {
+ return undefined;
+ }
+ else if (ts.isArray(visited)) {
+ visitedNode = (lift || extractSingleNode)(visited);
+ }
+ else {
+ visitedNode = visited;
+ }
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ return visitedNode;
+ }
+ ts.visitNode = visitNode;
/**
- * This map contains information about the shape of each Node in "types.ts" pertaining to how
- * each node should be traversed during a transformation.
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
*
- * Each edge corresponds to a property in a Node subtype that should be traversed when visiting
- * each child. The properties are assigned in the order in which traversal should occur.
- *
- * We only add entries for nodes that do not have a create/update pair defined in factory.ts
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes(nodes, visitor, test, start, count) {
+ if (nodes === undefined || visitor === undefined) {
+ return nodes;
+ }
+ var updated;
+ // Ensure start and count have valid values
+ var length = nodes.length;
+ if (start === undefined || start < 0) {
+ start = 0;
+ }
+ if (count === undefined || count > length - start) {
+ count = length - start;
+ }
+ if (start > 0 || count < length) {
+ // If we are not visiting all of the original nodes, we must always create a new array.
+ // Since this is a fragment of a node array, we do not copy over the previous location
+ // and will only copy over `hasTrailingComma` if we are including the last element.
+ updated = ts.createNodeArray([], /*hasTrailingComma*/ nodes.hasTrailingComma && start + count === length);
+ }
+ // Visit each original node.
+ for (var i = 0; i < count; i++) {
+ var node = nodes[i + start];
+ ts.aggregateTransformFlags(node);
+ var visited = node !== undefined ? visitor(node) : undefined;
+ if (updated !== undefined || visited === undefined || visited !== node) {
+ if (updated === undefined) {
+ // Ensure we have a copy of `nodes`, up to the current index.
+ updated = ts.createNodeArray(nodes.slice(0, i), nodes.hasTrailingComma);
+ ts.setTextRange(updated, nodes);
+ }
+ if (visited) {
+ if (ts.isArray(visited)) {
+ for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
+ var visitedNode = visited_1[_i];
+ ts.Debug.assertNode(visitedNode, test);
+ ts.aggregateTransformFlags(visitedNode);
+ updated.push(visitedNode);
+ }
+ }
+ else {
+ ts.Debug.assertNode(visited, test);
+ ts.aggregateTransformFlags(visited);
+ updated.push(visited);
+ }
+ }
+ }
+ }
+ return updated || nodes;
+ }
+ ts.visitNodes = visitNodes;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
+ context.startLexicalEnvironment();
+ statements = visitNodes(statements, visitor, ts.isStatement, start);
+ if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
+ statements = ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements)), statements);
+ }
+ var declarations = context.endLexicalEnvironment();
+ return ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements);
+ }
+ ts.visitLexicalEnvironment = visitLexicalEnvironment;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes, visitor, context, nodesVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ context.startLexicalEnvironment();
+ var updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
+ context.suspendLexicalEnvironment();
+ return updated;
+ }
+ ts.visitParameterList = visitParameterList;
+ function visitFunctionBody(node, visitor, context) {
+ context.resumeLexicalEnvironment();
+ var updated = visitNode(node, visitor, ts.isConciseBody);
+ var declarations = context.endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(updated);
+ var statements = ts.mergeLexicalEnvironment(block.statements, declarations);
+ return ts.updateBlock(block, statements);
+ }
+ return updated;
+ }
+ ts.visitFunctionBody = visitFunctionBody;
+ function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor) {
+ if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
+ if (node === undefined) {
+ return undefined;
+ }
+ var kind = node.kind;
+ // No need to visit nodes with no children.
+ if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */) || kind === 168 /* ThisType */) {
+ return node;
+ }
+ switch (node.kind) {
+ case 205 /* SemicolonClassElement */:
+ case 208 /* EmptyStatement */:
+ case 199 /* OmittedExpression */:
+ case 224 /* DebuggerStatement */:
+ case 297 /* EndOfDeclarationMarker */:
+ case 246 /* MissingDeclaration */:
+ // No need to visit nodes with no children.
+ return node;
+ // Names
+ case 142 /* QualifiedName */:
+ return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
+ case 143 /* ComputedPropertyName */:
+ return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Signatures and Signature Elements
+ case 159 /* FunctionType */:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 160 /* ConstructorType */:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 154 /* CallSignature */:
+ return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 155 /* ConstructSignature */:
+ return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 149 /* MethodSignature */:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 156 /* IndexSignature */:
+ return ts.updateIndexSignatureDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 145 /* Parameter */:
+ return ts.updateParameter(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 146 /* Decorator */:
+ return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Types
+ case 158 /* TypeReference */:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 157 /* TypePredicate */:
+ return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161 /* TypeQuery */:
+ return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
+ case 162 /* TypeLiteral */:
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ case 163 /* ArrayType */:
+ return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
+ case 164 /* TupleType */:
+ return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ case 167 /* ParenthesizedType */:
+ throw ts.Debug.fail("not implemented.");
+ case 169 /* TypeOperator */:
+ return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
+ case 170 /* IndexedAccessType */:
+ return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
+ case 171 /* MappedType */:
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameter), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
+ case 172 /* LiteralType */:
+ return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
+ // Type Declarations
+ case 144 /* TypeParameter */:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
+ // Type members
+ case 147 /* PropertySignature */:
+ return ts.updatePropertySignature(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 148 /* PropertyDeclaration */:
+ return ts.updateProperty(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 150 /* MethodDeclaration */:
+ return ts.updateMethod(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 151 /* Constructor */:
+ return ts.updateConstructor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ case 152 /* GetAccessor */:
+ return ts.updateGetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 153 /* SetAccessor */:
+ return ts.updateSetAccessor(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context));
+ // Binding patterns
+ case 173 /* ObjectBindingPattern */:
+ return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
+ case 174 /* ArrayBindingPattern */:
+ return ts.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
+ case 175 /* BindingElement */:
+ return ts.updateBindingElement(node, visitNode(node.dotDotDotToken, tokenVisitor, ts.isToken), visitNode(node.propertyName, visitor, ts.isPropertyName), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression));
+ // Expression
+ case 176 /* ArrayLiteralExpression */:
+ return ts.updateArrayLiteral(node, nodesVisitor(node.elements, visitor, ts.isExpression));
+ case 177 /* ObjectLiteralExpression */:
+ return ts.updateObjectLiteral(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
+ case 178 /* PropertyAccessExpression */:
+ return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
+ case 179 /* ElementAccessExpression */:
+ return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
+ case 180 /* CallExpression */:
+ return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 181 /* NewExpression */:
+ return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+ case 182 /* TaggedTemplateExpression */:
+ return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
+ case 183 /* TypeAssertionExpression */:
+ return ts.updateTypeAssertion(node, visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 184 /* ParenthesizedExpression */:
+ return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 185 /* FunctionExpression */:
+ return ts.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 186 /* ArrowFunction */:
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 187 /* DeleteExpression */:
+ return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 188 /* TypeOfExpression */:
+ return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 189 /* VoidExpression */:
+ return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 190 /* AwaitExpression */:
+ return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 193 /* BinaryExpression */:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
+ case 191 /* PrefixUnaryExpression */:
+ return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 192 /* PostfixUnaryExpression */:
+ return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194 /* ConditionalExpression */:
+ return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
+ case 195 /* TemplateExpression */:
+ return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+ case 196 /* YieldExpression */:
+ return ts.updateYield(node, visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.expression, visitor, ts.isExpression));
+ case 197 /* SpreadElement */:
+ return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 198 /* ClassExpression */:
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 200 /* ExpressionWithTypeArguments */:
+ return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
+ case 201 /* AsExpression */:
+ return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
+ case 202 /* NonNullExpression */:
+ return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Misc
+ case 204 /* TemplateSpan */:
+ return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
+ // Element
+ case 206 /* Block */:
+ return ts.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 207 /* VariableStatement */:
+ return ts.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
+ case 209 /* ExpressionStatement */:
+ return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 210 /* IfStatement */:
+ return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, ts.liftToBlock));
+ case 211 /* DoStatement */:
+ return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
+ case 212 /* WhileStatement */:
+ return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 213 /* ForStatement */:
+ return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 214 /* ForInStatement */:
+ return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 215 /* ForOfStatement */:
+ return ts.updateForOf(node, node.awaitModifier, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 216 /* ContinueStatement */:
+ return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 217 /* BreakStatement */:
+ return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier));
+ case 218 /* ReturnStatement */:
+ return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 219 /* WithStatement */:
+ return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 220 /* SwitchStatement */:
+ return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
+ case 221 /* LabeledStatement */:
+ return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
+ case 222 /* ThrowStatement */:
+ return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 223 /* TryStatement */:
+ return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause), visitNode(node.finallyBlock, visitor, ts.isBlock));
+ case 225 /* VariableDeclaration */:
+ return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.initializer, visitor, ts.isExpression));
+ case 226 /* VariableDeclarationList */:
+ return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+ case 227 /* FunctionDeclaration */:
+ return ts.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.asteriskToken, tokenVisitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 228 /* ClassDeclaration */:
+ return ts.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 231 /* EnumDeclaration */:
+ return ts.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+ case 232 /* ModuleDeclaration */:
+ return ts.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.body, visitor, ts.isModuleBody));
+ case 233 /* ModuleBlock */:
+ return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 234 /* CaseBlock */:
+ return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236 /* ImportEqualsDeclaration */:
+ return ts.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.moduleReference, visitor, ts.isModuleReference));
+ case 237 /* ImportDeclaration */:
+ return ts.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 238 /* ImportClause */:
+ return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings));
+ case 239 /* NamespaceImport */:
+ return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
+ case 240 /* NamedImports */:
+ return ts.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+ case 241 /* ImportSpecifier */:
+ return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ case 242 /* ExportAssignment */:
+ return ts.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
+ case 243 /* ExportDeclaration */:
+ return ts.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
+ case 244 /* NamedExports */:
+ return ts.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+ case 245 /* ExportSpecifier */:
+ return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier), visitNode(node.name, visitor, ts.isIdentifier));
+ // Module references
+ case 247 /* ExternalModuleReference */:
+ return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
+ // JSX
+ case 248 /* JsxElement */:
+ return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
+ case 253 /* JsxAttributes */:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
+ case 249 /* JsxSelfClosingElement */:
+ return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 250 /* JsxOpeningElement */:
+ return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
+ case 251 /* JsxClosingElement */:
+ return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
+ case 252 /* JsxAttribute */:
+ return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254 /* JsxSpreadAttribute */:
+ return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 255 /* JsxExpression */:
+ return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Clauses
+ case 256 /* CaseClause */:
+ return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 257 /* DefaultClause */:
+ return ts.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+ case 258 /* HeritageClause */:
+ return ts.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
+ case 259 /* CatchClause */:
+ return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
+ // Property assignments
+ case 260 /* PropertyAssignment */:
+ return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ case 261 /* ShorthandPropertyAssignment */:
+ return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
+ case 262 /* SpreadAssignment */:
+ return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Enum
+ case 263 /* EnumMember */:
+ return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
+ // Top-level nodes
+ case 264 /* SourceFile */:
+ return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
+ // Transformation nodes
+ case 295 /* PartiallyEmittedExpression */:
+ return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ default:
+ return node;
+ }
+ }
+ ts.visitEachChild = visitEachChild;
+ /**
+ * Extracts the single node from a NodeArray.
*
- * NOTE: This needs to be kept up to date with changes to nodes in "types.ts". Currently, this
- * map is not comprehensive. Only node edges relevant to tree transformation are
- * currently defined. We may extend this to be more comprehensive, and eventually
- * supplant the existing `forEachChild` implementation if performance is not
- * significantly impacted.
+ * @param nodes The NodeArray.
*/
- var nodeEdgeTraversalMap = ts.createMap((_a = {},
- _a[141 /* QualifiedName */] = [
- { name: "left", test: ts.isEntityName },
- { name: "right", test: ts.isIdentifier }
- ],
- _a[145 /* Decorator */] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[182 /* TypeAssertionExpression */] = [
- { name: "type", test: ts.isTypeNode },
- { name: "expression", test: ts.isUnaryExpression }
- ],
- _a[200 /* AsExpression */] = [
- { name: "expression", test: ts.isExpression },
- { name: "type", test: ts.isTypeNode }
- ],
- _a[201 /* NonNullExpression */] = [
- { name: "expression", test: ts.isLeftHandSideExpression }
- ],
- _a[229 /* EnumDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "members", test: ts.isEnumMember }
- ],
- _a[230 /* ModuleDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isModuleName },
- { name: "body", test: ts.isModuleBody }
- ],
- _a[231 /* ModuleBlock */] = [
- { name: "statements", test: ts.isStatement }
- ],
- _a[234 /* ImportEqualsDeclaration */] = [
- { name: "decorators", test: ts.isDecorator },
- { name: "modifiers", test: ts.isModifier },
- { name: "name", test: ts.isIdentifier },
- { name: "moduleReference", test: ts.isModuleReference }
- ],
- _a[245 /* ExternalModuleReference */] = [
- { name: "expression", test: ts.isExpression, optional: true }
- ],
- _a[260 /* EnumMember */] = [
- { name: "name", test: ts.isPropertyName },
- { name: "initializer", test: ts.isExpression, optional: true, parenthesize: ts.parenthesizeExpressionForList }
- ],
- _a));
+ function extractSingleNode(nodes) {
+ ts.Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
+ return ts.singleOrUndefined(nodes);
+ }
+})(ts || (ts = {}));
+/* @internal */
+(function (ts) {
function reduceNode(node, f, initial) {
return node ? f(initial, node) : initial;
}
@@ -43827,8 +47703,7 @@ var ts;
}
/**
* Similar to `reduceLeft`, performs a reduction against each child of a node.
- * NOTE: Unlike `forEachChild`, this does *not* visit every node. Only nodes added to the
- * `nodeEdgeTraversalMap` above will be visited.
+ * NOTE: Unlike `forEachChild`, this does *not* visit every node.
*
* @param node The node containing the children to reduce.
* @param initial The initial value to supply to the reduction.
@@ -43842,47 +47717,51 @@ var ts;
var cbNodes = cbNodeArray || cbNode;
var kind = node.kind;
// No need to visit nodes with no children.
- if ((kind > 0 /* FirstToken */ && kind <= 140 /* LastToken */)) {
+ if ((kind > 0 /* FirstToken */ && kind <= 141 /* LastToken */)) {
return initial;
}
// We do not yet support types.
- if ((kind >= 156 /* TypePredicate */ && kind <= 171 /* LiteralType */)) {
+ if ((kind >= 157 /* TypePredicate */ && kind <= 172 /* LiteralType */)) {
return initial;
}
var result = initial;
switch (node.kind) {
// Leaf nodes
- case 203 /* SemicolonClassElement */:
- case 206 /* EmptyStatement */:
- case 198 /* OmittedExpression */:
- case 222 /* DebuggerStatement */:
- case 293 /* NotEmittedStatement */:
+ case 205 /* SemicolonClassElement */:
+ case 208 /* EmptyStatement */:
+ case 199 /* OmittedExpression */:
+ case 224 /* DebuggerStatement */:
+ case 294 /* NotEmittedStatement */:
// No need to visit nodes with no children.
break;
// Names
- case 142 /* ComputedPropertyName */:
+ case 142 /* QualifiedName */:
+ result = reduceNode(node.left, cbNode, result);
+ result = reduceNode(node.right, cbNode, result);
+ break;
+ case 143 /* ComputedPropertyName */:
result = reduceNode(node.expression, cbNode, result);
break;
// Signature elements
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
result = reduceNode(node.expression, cbNode, result);
break;
// Type member
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43891,12 +47770,12 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43904,7 +47783,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -43912,45 +47791,49 @@ var ts;
result = reduceNode(node.body, cbNode, result);
break;
// Binding patterns
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
// Expression
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
result = reduceNodes(node.properties, cbNodes, result);
break;
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.argumentExpression, cbNode, result);
break;
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
result = reduceNodes(node.arguments, cbNodes, result);
break;
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
result = reduceNode(node.tag, cbNode, result);
result = reduceNode(node.template, cbNode, result);
break;
- case 184 /* FunctionExpression */:
+ case 183 /* TypeAssertionExpression */:
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.expression, cbNode, result);
+ break;
+ case 185 /* FunctionExpression */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
@@ -43958,119 +47841,126 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.parameters, cbNodes, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 183 /* ParenthesizedExpression */:
- case 186 /* DeleteExpression */:
- case 187 /* TypeOfExpression */:
- case 188 /* VoidExpression */:
- case 189 /* AwaitExpression */:
- case 195 /* YieldExpression */:
- case 196 /* SpreadElement */:
- case 201 /* NonNullExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 187 /* DeleteExpression */:
+ case 188 /* TypeOfExpression */:
+ case 189 /* VoidExpression */:
+ case 190 /* AwaitExpression */:
+ case 196 /* YieldExpression */:
+ case 197 /* SpreadElement */:
+ case 202 /* NonNullExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
result = reduceNode(node.operand, cbNode, result);
break;
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
result = reduceNode(node.left, cbNode, result);
result = reduceNode(node.right, cbNode, result);
break;
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.whenTrue, cbNode, result);
result = reduceNode(node.whenFalse, cbNode, result);
break;
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
result = reduceNode(node.head, cbNode, result);
result = reduceNodes(node.templateSpans, cbNodes, result);
break;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
result = reduceNodes(node.typeParameters, cbNodes, result);
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNodes(node.typeArguments, cbNodes, result);
break;
+ case 201 /* AsExpression */:
+ result = reduceNode(node.expression, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ break;
+ case 202 /* NonNullExpression */:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
// Misc
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.literal, cbNode, result);
break;
// Element
- case 204 /* Block */:
+ case 206 /* Block */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.declarationList, cbNode, result);
break;
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.thenStatement, cbNode, result);
result = reduceNode(node.elseStatement, cbNode, result);
break;
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
result = reduceNode(node.statement, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 210 /* WhileStatement */:
- case 217 /* WithStatement */:
+ case 212 /* WhileStatement */:
+ case 219 /* WithStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.condition, cbNode, result);
result = reduceNode(node.incrementor, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
result = reduceNode(node.initializer, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 216 /* ReturnStatement */:
- case 220 /* ThrowStatement */:
+ case 218 /* ReturnStatement */:
+ case 222 /* ThrowStatement */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
result = reduceNode(node.expression, cbNode, result);
result = reduceNode(node.caseBlock, cbNode, result);
break;
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
result = reduceNode(node.label, cbNode, result);
result = reduceNode(node.statement, cbNode, result);
break;
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
result = reduceNode(node.tryBlock, cbNode, result);
result = reduceNode(node.catchClause, cbNode, result);
result = reduceNode(node.finallyBlock, cbNode, result);
break;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
result = reduceNodes(node.declarations, cbNodes, result);
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -44079,7 +47969,7 @@ var ts;
result = reduceNode(node.type, cbNode, result);
result = reduceNode(node.body, cbNode, result);
break;
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.name, cbNode, result);
@@ -44087,484 +47977,148 @@ var ts;
result = reduceNodes(node.heritageClauses, cbNodes, result);
result = reduceNodes(node.members, cbNodes, result);
break;
- case 232 /* CaseBlock */:
+ case 231 /* EnumDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNodes(node.members, cbNodes, result);
+ break;
+ case 232 /* ModuleDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.body, cbNode, result);
+ break;
+ case 233 /* ModuleBlock */:
+ result = reduceNodes(node.statements, cbNodes, result);
+ break;
+ case 234 /* CaseBlock */:
result = reduceNodes(node.clauses, cbNodes, result);
break;
- case 235 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ result = reduceNodes(node.decorators, cbNodes, result);
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.moduleReference, cbNode, result);
+ break;
+ case 237 /* ImportDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
result = reduceNode(node.importClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.namedBindings, cbNode, result);
break;
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
result = reduceNode(node.name, cbNode, result);
break;
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
result = reduceNodes(node.elements, cbNodes, result);
break;
- case 239 /* ImportSpecifier */:
- case 243 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 245 /* ExportSpecifier */:
result = reduceNode(node.propertyName, cbNode, result);
result = reduceNode(node.name, cbNode, result);
break;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.expression, cbNode, result);
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
result = ts.reduceLeft(node.decorators, cbNode, result);
result = ts.reduceLeft(node.modifiers, cbNode, result);
result = reduceNode(node.exportClause, cbNode, result);
result = reduceNode(node.moduleSpecifier, cbNode, result);
break;
+ // Module references
+ case 247 /* ExternalModuleReference */:
+ result = reduceNode(node.expression, cbNode, result);
+ break;
// JSX
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
result = reduceNode(node.openingElement, cbNode, result);
result = ts.reduceLeft(node.children, cbNode, result);
result = reduceNode(node.closingElement, cbNode, result);
break;
- case 247 /* JsxSelfClosingElement */:
- case 248 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 250 /* JsxOpeningElement */:
result = reduceNode(node.tagName, cbNode, result);
- result = reduceNodes(node.attributes, cbNodes, result);
+ result = reduceNode(node.attributes, cbNode, result);
+ break;
+ case 253 /* JsxAttributes */:
+ result = reduceNodes(node.properties, cbNodes, result);
break;
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
result = reduceNode(node.tagName, cbNode, result);
break;
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 251 /* JsxSpreadAttribute */:
+ case 254 /* JsxSpreadAttribute */:
result = reduceNode(node.expression, cbNode, result);
break;
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
// Clauses
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
result = reduceNode(node.expression, cbNode, result);
- // fall-through
- case 254 /* DefaultClause */:
+ // falls through
+ case 257 /* DefaultClause */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
result = reduceNodes(node.types, cbNodes, result);
break;
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
result = reduceNode(node.variableDeclaration, cbNode, result);
result = reduceNode(node.block, cbNode, result);
break;
// Property assignments
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.initializer, cbNode, result);
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
result = reduceNode(node.name, cbNode, result);
result = reduceNode(node.objectAssignmentInitializer, cbNode, result);
break;
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
result = reduceNode(node.expression, cbNode, result);
break;
+ // Enum
+ case 263 /* EnumMember */:
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
// Top-level nodes
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 294 /* PartiallyEmittedExpression */:
+ // Transformation nodes
+ case 295 /* PartiallyEmittedExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
default:
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_1 = edgeTraversalPath; _i < edgeTraversalPath_1.length; _i++) {
- var edge = edgeTraversalPath_1[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- result = ts.isArray(value)
- ? reduceNodes(value, cbNodes, result)
- : cbNode(result, value);
- }
- }
- }
break;
}
return result;
}
ts.reduceEachChild = reduceEachChild;
- function visitNode(node, visitor, test, optional, lift, parenthesize, parentNode) {
- if (node === undefined || visitor === undefined) {
- return node;
- }
- aggregateTransformFlags(node);
- var visited = visitor(node);
- if (visited === node) {
- return node;
- }
- var visitedNode;
- if (visited === undefined) {
- if (!optional) {
- Debug.failNotOptional();
- }
- return undefined;
- }
- else if (ts.isArray(visited)) {
- visitedNode = (lift || extractSingleNode)(visited);
- }
- else {
- visitedNode = visited;
- }
- if (parenthesize !== undefined) {
- visitedNode = parenthesize(visitedNode, parentNode);
- }
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- return visitedNode;
- }
- ts.visitNode = visitNode;
- function visitNodes(nodes, visitor, test, start, count, parenthesize, parentNode) {
- if (nodes === undefined) {
- return undefined;
- }
- var updated;
- // Ensure start and count have valid values
- var length = nodes.length;
- if (start === undefined || start < 0) {
- start = 0;
- }
- if (count === undefined || count > length - start) {
- count = length - start;
- }
- if (start > 0 || count < length) {
- // If we are not visiting all of the original nodes, we must always create a new array.
- // Since this is a fragment of a node array, we do not copy over the previous location
- // and will only copy over `hasTrailingComma` if we are including the last element.
- updated = ts.createNodeArray([], /*location*/ undefined,
- /*hasTrailingComma*/ nodes.hasTrailingComma && start + count === length);
- }
- // Visit each original node.
- for (var i = 0; i < count; i++) {
- var node = nodes[i + start];
- aggregateTransformFlags(node);
- var visited = node !== undefined ? visitor(node) : undefined;
- if (updated !== undefined || visited === undefined || visited !== node) {
- if (updated === undefined) {
- // Ensure we have a copy of `nodes`, up to the current index.
- updated = ts.createNodeArray(nodes.slice(0, i), /*location*/ nodes, nodes.hasTrailingComma);
- }
- if (visited) {
- if (ts.isArray(visited)) {
- for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
- var visitedNode = visited_1[_i];
- visitedNode = parenthesize
- ? parenthesize(visitedNode, parentNode)
- : visitedNode;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- else {
- var visitedNode = parenthesize
- ? parenthesize(visited, parentNode)
- : visited;
- Debug.assertNode(visitedNode, test);
- aggregateTransformFlags(visitedNode);
- updated.push(visitedNode);
- }
- }
- }
- }
- return updated || nodes;
- }
- ts.visitNodes = visitNodes;
- /**
- * Starts a new lexical environment and visits a statement list, ending the lexical environment
- * and merging hoisted declarations upon completion.
- */
- function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) {
- context.startLexicalEnvironment();
- statements = visitNodes(statements, visitor, ts.isStatement, start);
- if (ensureUseStrict && !ts.startsWithUseStrict(statements)) {
- statements = ts.createNodeArray([ts.createStatement(ts.createLiteral("use strict"))].concat(statements), statements);
- }
- var declarations = context.endLexicalEnvironment();
- return ts.createNodeArray(ts.concatenate(statements, declarations), statements);
- }
- ts.visitLexicalEnvironment = visitLexicalEnvironment;
- /**
- * Starts a new lexical environment and visits a parameter list, suspending the lexical
- * environment upon completion.
- */
- function visitParameterList(nodes, visitor, context) {
- context.startLexicalEnvironment();
- var updated = visitNodes(nodes, visitor, ts.isParameterDeclaration);
- context.suspendLexicalEnvironment();
- return updated;
- }
- ts.visitParameterList = visitParameterList;
- function visitFunctionBody(node, visitor, context) {
- context.resumeLexicalEnvironment();
- var updated = visitNode(node, visitor, ts.isConciseBody);
- var declarations = context.endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(updated);
- var statements = mergeLexicalEnvironment(block.statements, declarations);
- return ts.updateBlock(block, statements);
- }
- return updated;
- }
- ts.visitFunctionBody = visitFunctionBody;
- function visitEachChild(node, visitor, context) {
- if (node === undefined) {
- return undefined;
- }
- var kind = node.kind;
- // No need to visit nodes with no children.
- if ((kind > 0 /* FirstToken */ && kind <= 140 /* LastToken */)) {
- return node;
- }
- // We do not yet support types.
- if ((kind >= 156 /* TypePredicate */ && kind <= 171 /* LiteralType */)) {
- return node;
- }
- switch (node.kind) {
- case 203 /* SemicolonClassElement */:
- case 206 /* EmptyStatement */:
- case 198 /* OmittedExpression */:
- case 222 /* DebuggerStatement */:
- // No need to visit nodes with no children.
- return node;
- // Names
- case 142 /* ComputedPropertyName */:
- return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- // Signature elements
- case 144 /* Parameter */:
- return ts.updateParameter(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), node.dotDotDotToken, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- // Type member
- case 147 /* PropertyDeclaration */:
- return ts.updateProperty(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- case 149 /* MethodDeclaration */:
- return ts.updateMethod(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 150 /* Constructor */:
- return ts.updateConstructor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- case 151 /* GetAccessor */:
- return ts.updateGetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 152 /* SetAccessor */:
- return ts.updateSetAccessor(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context), visitFunctionBody(node.body, visitor, context));
- // Binding patterns
- case 172 /* ObjectBindingPattern */:
- return ts.updateObjectBindingPattern(node, visitNodes(node.elements, visitor, ts.isBindingElement));
- case 173 /* ArrayBindingPattern */:
- return ts.updateArrayBindingPattern(node, visitNodes(node.elements, visitor, ts.isArrayBindingElement));
- case 174 /* BindingElement */:
- return ts.updateBindingElement(node, node.dotDotDotToken, visitNode(node.propertyName, visitor, ts.isPropertyName, /*optional*/ true), visitNode(node.name, visitor, ts.isBindingName), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- // Expression
- case 175 /* ArrayLiteralExpression */:
- return ts.updateArrayLiteral(node, visitNodes(node.elements, visitor, ts.isExpression));
- case 176 /* ObjectLiteralExpression */:
- return ts.updateObjectLiteral(node, visitNodes(node.properties, visitor, ts.isObjectLiteralElementLike));
- case 177 /* PropertyAccessExpression */:
- return ts.updatePropertyAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.name, visitor, ts.isIdentifier));
- case 178 /* ElementAccessExpression */:
- return ts.updateElementAccess(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.argumentExpression, visitor, ts.isExpression));
- case 179 /* CallExpression */:
- return ts.updateCall(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 180 /* NewExpression */:
- return ts.updateNew(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNodes(node.arguments, visitor, ts.isExpression));
- case 181 /* TaggedTemplateExpression */:
- return ts.updateTaggedTemplate(node, visitNode(node.tag, visitor, ts.isExpression), visitNode(node.template, visitor, ts.isTemplateLiteral));
- case 183 /* ParenthesizedExpression */:
- return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
- case 184 /* FunctionExpression */:
- return ts.updateFunctionExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 185 /* ArrowFunction */:
- return ts.updateArrowFunction(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 186 /* DeleteExpression */:
- return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
- case 187 /* TypeOfExpression */:
- return ts.updateTypeOf(node, visitNode(node.expression, visitor, ts.isExpression));
- case 188 /* VoidExpression */:
- return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
- case 189 /* AwaitExpression */:
- return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 192 /* BinaryExpression */:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
- case 190 /* PrefixUnaryExpression */:
- return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 191 /* PostfixUnaryExpression */:
- return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
- case 193 /* ConditionalExpression */:
- return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
- case 194 /* TemplateExpression */:
- return ts.updateTemplateExpression(node, visitNode(node.head, visitor, ts.isTemplateHead), visitNodes(node.templateSpans, visitor, ts.isTemplateSpan));
- case 195 /* YieldExpression */:
- return ts.updateYield(node, visitNode(node.expression, visitor, ts.isExpression));
- case 196 /* SpreadElement */:
- return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
- case 197 /* ClassExpression */:
- return ts.updateClassExpression(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 199 /* ExpressionWithTypeArguments */:
- return ts.updateExpressionWithTypeArguments(node, visitNodes(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
- // Misc
- case 202 /* TemplateSpan */:
- return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
- // Element
- case 204 /* Block */:
- return ts.updateBlock(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 205 /* VariableStatement */:
- return ts.updateVariableStatement(node, visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.declarationList, visitor, ts.isVariableDeclarationList));
- case 207 /* ExpressionStatement */:
- return ts.updateStatement(node, visitNode(node.expression, visitor, ts.isExpression));
- case 208 /* IfStatement */:
- return ts.updateIf(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.thenStatement, visitor, ts.isStatement, /*optional*/ false, liftToBlock), visitNode(node.elseStatement, visitor, ts.isStatement, /*optional*/ true, liftToBlock));
- case 209 /* DoStatement */:
- return ts.updateDo(node, visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock), visitNode(node.expression, visitor, ts.isExpression));
- case 210 /* WhileStatement */:
- return ts.updateWhile(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 211 /* ForStatement */:
- return ts.updateFor(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.condition, visitor, ts.isExpression), visitNode(node.incrementor, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 212 /* ForInStatement */:
- return ts.updateForIn(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 213 /* ForOfStatement */:
- return ts.updateForOf(node, visitNode(node.initializer, visitor, ts.isForInitializer), visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 214 /* ContinueStatement */:
- return ts.updateContinue(node, visitNode(node.label, visitor, ts.isIdentifier, /*optional*/ true));
- case 215 /* BreakStatement */:
- return ts.updateBreak(node, visitNode(node.label, visitor, ts.isIdentifier, /*optional*/ true));
- case 216 /* ReturnStatement */:
- return ts.updateReturn(node, visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true));
- case 217 /* WithStatement */:
- return ts.updateWith(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 218 /* SwitchStatement */:
- return ts.updateSwitch(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.caseBlock, visitor, ts.isCaseBlock));
- case 219 /* LabeledStatement */:
- return ts.updateLabel(node, visitNode(node.label, visitor, ts.isIdentifier), visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, liftToBlock));
- case 220 /* ThrowStatement */:
- return ts.updateThrow(node, visitNode(node.expression, visitor, ts.isExpression));
- case 221 /* TryStatement */:
- return ts.updateTry(node, visitNode(node.tryBlock, visitor, ts.isBlock), visitNode(node.catchClause, visitor, ts.isCatchClause, /*optional*/ true), visitNode(node.finallyBlock, visitor, ts.isBlock, /*optional*/ true));
- case 223 /* VariableDeclaration */:
- return ts.updateVariableDeclaration(node, visitNode(node.name, visitor, ts.isBindingName), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitNode(node.initializer, visitor, ts.isExpression, /*optional*/ true));
- case 224 /* VariableDeclarationList */:
- return ts.updateVariableDeclarationList(node, visitNodes(node.declarations, visitor, ts.isVariableDeclaration));
- case 225 /* FunctionDeclaration */:
- return ts.updateFunctionDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isPropertyName), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context), visitNode(node.type, visitor, ts.isTypeNode, /*optional*/ true), visitFunctionBody(node.body, visitor, context));
- case 226 /* ClassDeclaration */:
- return ts.updateClassDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNodes(node.typeParameters, visitor, ts.isTypeParameter), visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), visitNodes(node.members, visitor, ts.isClassElement));
- case 232 /* CaseBlock */:
- return ts.updateCaseBlock(node, visitNodes(node.clauses, visitor, ts.isCaseOrDefaultClause));
- case 235 /* ImportDeclaration */:
- return ts.updateImportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.importClause, visitor, ts.isImportClause, /*optional*/ true), visitNode(node.moduleSpecifier, visitor, ts.isExpression));
- case 236 /* ImportClause */:
- return ts.updateImportClause(node, visitNode(node.name, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.namedBindings, visitor, ts.isNamedImportBindings, /*optional*/ true));
- case 237 /* NamespaceImport */:
- return ts.updateNamespaceImport(node, visitNode(node.name, visitor, ts.isIdentifier));
- case 238 /* NamedImports */:
- return ts.updateNamedImports(node, visitNodes(node.elements, visitor, ts.isImportSpecifier));
- case 239 /* ImportSpecifier */:
- return ts.updateImportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.name, visitor, ts.isIdentifier));
- case 240 /* ExportAssignment */:
- return ts.updateExportAssignment(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.expression, visitor, ts.isExpression));
- case 241 /* ExportDeclaration */:
- return ts.updateExportDeclaration(node, visitNodes(node.decorators, visitor, ts.isDecorator), visitNodes(node.modifiers, visitor, ts.isModifier), visitNode(node.exportClause, visitor, ts.isNamedExports, /*optional*/ true), visitNode(node.moduleSpecifier, visitor, ts.isExpression, /*optional*/ true));
- case 242 /* NamedExports */:
- return ts.updateNamedExports(node, visitNodes(node.elements, visitor, ts.isExportSpecifier));
- case 243 /* ExportSpecifier */:
- return ts.updateExportSpecifier(node, visitNode(node.propertyName, visitor, ts.isIdentifier, /*optional*/ true), visitNode(node.name, visitor, ts.isIdentifier));
- // JSX
- case 246 /* JsxElement */:
- return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), visitNodes(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 247 /* JsxSelfClosingElement */:
- return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 248 /* JsxOpeningElement */:
- return ts.updateJsxOpeningElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNodes(node.attributes, visitor, ts.isJsxAttributeLike));
- case 249 /* JsxClosingElement */:
- return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
- case 250 /* JsxAttribute */:
- return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
- case 251 /* JsxSpreadAttribute */:
- return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
- case 252 /* JsxExpression */:
- return ts.updateJsxExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- // Clauses
- case 253 /* CaseClause */:
- return ts.updateCaseClause(node, visitNode(node.expression, visitor, ts.isExpression), visitNodes(node.statements, visitor, ts.isStatement));
- case 254 /* DefaultClause */:
- return ts.updateDefaultClause(node, visitNodes(node.statements, visitor, ts.isStatement));
- case 255 /* HeritageClause */:
- return ts.updateHeritageClause(node, visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments));
- case 256 /* CatchClause */:
- return ts.updateCatchClause(node, visitNode(node.variableDeclaration, visitor, ts.isVariableDeclaration), visitNode(node.block, visitor, ts.isBlock));
- // Property assignments
- case 257 /* PropertyAssignment */:
- return ts.updatePropertyAssignment(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
- case 258 /* ShorthandPropertyAssignment */:
- return ts.updateShorthandPropertyAssignment(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.objectAssignmentInitializer, visitor, ts.isExpression));
- case 259 /* SpreadAssignment */:
- return ts.updateSpreadAssignment(node, visitNode(node.expression, visitor, ts.isExpression));
- // Top-level nodes
- case 261 /* SourceFile */:
- return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- // Transformation nodes
- case 294 /* PartiallyEmittedExpression */:
- return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
- default:
- var updated = void 0;
- var edgeTraversalPath = nodeEdgeTraversalMap[kind];
- if (edgeTraversalPath) {
- for (var _i = 0, edgeTraversalPath_2 = edgeTraversalPath; _i < edgeTraversalPath_2.length; _i++) {
- var edge = edgeTraversalPath_2[_i];
- var value = node[edge.name];
- if (value !== undefined) {
- var visited = ts.isArray(value)
- ? visitNodes(value, visitor, edge.test, 0, value.length, edge.parenthesize, node)
- : visitNode(value, visitor, edge.test, edge.optional, edge.lift, edge.parenthesize, node);
- if (updated !== undefined || visited !== value) {
- if (updated === undefined) {
- updated = ts.getMutableClone(node);
- }
- if (visited !== value) {
- updated[edge.name] = visited;
- }
- }
- }
- }
- }
- return updated ? ts.updateNode(updated, node) : node;
- }
- // return node;
- }
- ts.visitEachChild = visitEachChild;
function mergeLexicalEnvironment(statements, declarations) {
if (!ts.some(declarations)) {
return statements;
}
return ts.isNodeArray(statements)
- ? ts.createNodeArray(ts.concatenate(statements, declarations), statements)
+ ? ts.setTextRange(ts.createNodeArray(ts.concatenate(statements, declarations)), statements)
: ts.addRange(statements, declarations);
}
ts.mergeLexicalEnvironment = mergeLexicalEnvironment;
- function mergeFunctionBodyLexicalEnvironment(body, declarations) {
- if (body && declarations !== undefined && declarations.length > 0) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.createNodeArray(ts.concatenate(body.statements, declarations), body.statements));
- }
- else {
- return ts.createBlock(ts.createNodeArray([ts.createReturn(body, /*location*/ body)].concat(declarations), body),
- /*location*/ body,
- /*multiLine*/ true);
- }
- }
- return body;
- }
- ts.mergeFunctionBodyLexicalEnvironment = mergeFunctionBodyLexicalEnvironment;
/**
* Lifts a NodeArray containing only Statement nodes to a block.
*
@@ -44576,15 +48130,6 @@ var ts;
}
ts.liftToBlock = liftToBlock;
/**
- * Extracts the single node from a NodeArray.
- *
- * @param nodes The NodeArray.
- */
- function extractSingleNode(nodes) {
- Debug.assert(nodes.length <= 1, "Too many nodes written to output.");
- return ts.singleOrUndefined(nodes);
- }
- /**
* Aggregates the TransformFlags for a Node and its subtree.
*/
function aggregateTransformFlags(node) {
@@ -44629,7 +48174,7 @@ var ts;
function aggregateTransformFlagsForSubtree(node) {
// We do not transform ambient declarations or types, so there is no need to
// recursively aggregate transform flags.
- if (ts.hasModifier(node, 2 /* Ambient */) || ts.isTypeNode(node)) {
+ if (ts.hasModifier(node, 2 /* Ambient */) || (ts.isTypeNode(node) && node.kind !== 200 /* ExpressionWithTypeArguments */)) {
return 0 /* None */;
}
// Aggregate the transform flags of each child.
@@ -44647,9 +48192,6 @@ var ts;
}
var Debug;
(function (Debug) {
- Debug.failNotOptional = Debug.shouldAssert(1 /* Normal */)
- ? function (message) { return Debug.assert(false, message || "Node not optional."); }
- : ts.noop;
Debug.failBadSyntaxKind = Debug.shouldAssert(1 /* Normal */)
? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
: ts.noop;
@@ -44682,7 +48224,6 @@ var ts;
}
}
})(Debug = ts.Debug || (ts.Debug = {}));
- var _a;
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
@@ -44710,7 +48251,7 @@ var ts;
var value;
if (ts.isDestructuringAssignment(node)) {
value = node.right;
- while (ts.isEmptyObjectLiteralOrArrayLiteral(node.left)) {
+ while (ts.isEmptyArrayLiteral(node.left) || ts.isEmptyObjectLiteral(node.left)) {
if (ts.isDestructuringAssignment(value)) {
location = node = value;
value = node.right;
@@ -44724,6 +48265,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: true,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -44772,7 +48314,7 @@ var ts;
ts.Debug.assertNode(target, createAssignmentCallback ? ts.isIdentifier : ts.isExpression);
var expression = createAssignmentCallback
? createAssignmentCallback(target, value, location)
- : ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value, location);
+ : ts.setTextRange(ts.createAssignment(ts.visitNode(target, visitor, ts.isExpression), value), location);
expression.original = original;
emitExpression(expression);
}
@@ -44796,6 +48338,7 @@ var ts;
var flattenContext = {
context: context,
level: level,
+ downlevelIteration: context.getCompilerOptions().downlevelIteration,
hoistTempVariables: hoistTempVariables,
emitExpression: emitExpression,
emitBindingOrAssignment: emitBindingOrAssignment,
@@ -44821,11 +48364,12 @@ var ts;
}
}
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
- var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name_29 = _a.name, value = _a.value, location_2 = _a.location, original = _a.original;
- var variable = ts.createVariableDeclaration(name_29,
- /*type*/ undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value, location_2);
+ var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
+ var variable = ts.createVariableDeclaration(name,
+ /*type*/ undefined, pendingExpressions_1 ? ts.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
variable.original = original;
- if (ts.isIdentifier(name_29)) {
+ ts.setTextRange(variable, location);
+ if (ts.isIdentifier(name)) {
ts.setEmitFlags(variable, 64 /* NoNestedSourceMaps */);
}
ts.aggregateTransformFlags(variable);
@@ -44947,7 +48491,14 @@ var ts;
function flattenArrayBindingOrAssignmentPattern(flattenContext, parent, pattern, value, location) {
var elements = ts.getElementsOfBindingOrAssignmentPattern(pattern);
var numElements = elements.length;
- if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0)) {
+ if (flattenContext.level < 1 /* ObjectRest */ && flattenContext.downlevelIteration) {
+ // Read the elements of the iterable into an array
+ value = ensureIdentifier(flattenContext, ts.createReadHelper(flattenContext.context, value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
+ ? undefined
+ : numElements, location),
+ /*reuseIdentifierExpressions*/ false, location);
+ }
+ else if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0)) {
// For anything other than a single-element destructuring we need to generate a temporary
// to ensure value is evaluated exactly once. Additionally, if we have zero elements
// we need to emit *something* to ensure that in case a 'var' keyword was already emitted,
@@ -45029,8 +48580,8 @@ var ts;
return ts.createElementAccess(value, argumentExpression);
}
else {
- var name_30 = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
- return ts.createPropertyAccess(value, name_30);
+ var name = ts.createIdentifier(ts.unescapeIdentifier(propertyName.text));
+ return ts.createPropertyAccess(value, name);
}
}
/**
@@ -45052,7 +48603,7 @@ var ts;
var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
if (flattenContext.hoistTempVariables) {
flattenContext.context.hoistVariableDeclaration(temp);
- flattenContext.emitExpression(ts.createAssignment(temp, value, location));
+ flattenContext.emitExpression(ts.setTextRange(ts.createAssignment(temp, value), location));
}
else {
flattenContext.emitBindingOrAssignment(temp, value, location, /*original*/ undefined);
@@ -45075,7 +48626,7 @@ var ts;
return ts.createObjectLiteral(ts.map(elements, ts.convertToObjectAssignmentElement));
}
function makeBindingElement(name) {
- return ts.createBindingElement(/*propertyName*/ undefined, /*dotDotDotToken*/ undefined, name);
+ return ts.createBindingElement(/*dotDotDotToken*/ undefined, /*propertyName*/ undefined, name);
}
function makeAssignmentElement(name) {
return name;
@@ -45083,10 +48634,11 @@ var ts;
var restHelper = {
name: "typescript:rest",
scoped: false,
- text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
+ text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };"
};
/** Given value: o, propName: p, pattern: { a, b, ...p } from the original statement
- * `{ a, b, ...p } = o`, create `p = __rest(o, ["a", "b"]);`*/
+ * `{ a, b, ...p } = o`, create `p = __rest(o, ["a", "b"]);`
+ */
function createRestCall(context, value, elements, computedTempVariables, location) {
context.requestEmitHelper(restHelper);
var propertyNames = [];
@@ -45105,7 +48657,11 @@ var ts;
}
}
}
- return ts.createCall(ts.getHelperName("__rest"), undefined, [value, ts.createArrayLiteral(propertyNames, location)]);
+ return ts.createCall(ts.getHelperName("__rest"),
+ /*typeArguments*/ undefined, [
+ value,
+ ts.setTextRange(ts.createArrayLiteral(propertyNames), location)
+ ]);
}
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
@@ -45140,8 +48696,8 @@ var ts;
context.onEmitNode = onEmitNode;
context.onSubstituteNode = onSubstituteNode;
// Enable substitution for property/element access to emit const enum values.
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(178 /* ElementAccessExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
// These variables contain state that changes as we descend into the tree.
var currentSourceFile;
var currentNamespace;
@@ -45205,15 +48761,15 @@ var ts;
*/
function onBeforeVisitNode(node) {
switch (node.kind) {
- case 261 /* SourceFile */:
- case 232 /* CaseBlock */:
- case 231 /* ModuleBlock */:
- case 204 /* Block */:
+ case 264 /* SourceFile */:
+ case 234 /* CaseBlock */:
+ case 233 /* ModuleBlock */:
+ case 206 /* Block */:
currentScope = node;
currentScopeFirstDeclarationsOfName = undefined;
break;
- case 226 /* ClassDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 227 /* FunctionDeclaration */:
if (ts.hasModifier(node, 2 /* Ambient */)) {
break;
}
@@ -45260,13 +48816,13 @@ var ts;
*/
function sourceElementVisitorWorker(node) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitImportEqualsDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitExportAssignment(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return visitExportDeclaration(node);
default:
return visitorWorker(node);
@@ -45286,11 +48842,11 @@ var ts;
* @param node The node to visit.
*/
function namespaceElementVisitorWorker(node) {
- if (node.kind === 241 /* ExportDeclaration */ ||
- node.kind === 235 /* ImportDeclaration */ ||
- node.kind === 236 /* ImportClause */ ||
- (node.kind === 234 /* ImportEqualsDeclaration */ &&
- node.moduleReference.kind === 245 /* ExternalModuleReference */)) {
+ if (node.kind === 243 /* ExportDeclaration */ ||
+ node.kind === 237 /* ImportDeclaration */ ||
+ node.kind === 238 /* ImportClause */ ||
+ (node.kind === 236 /* ImportEqualsDeclaration */ &&
+ node.moduleReference.kind === 247 /* ExternalModuleReference */)) {
// do not emit ES6 imports and exports since they are illegal inside a namespace
return undefined;
}
@@ -45320,19 +48876,19 @@ var ts;
*/
function classElementVisitorWorker(node) {
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// TypeScript constructors are transformed in `visitClassDeclaration`.
// We elide them here as `visitorWorker` checks transform flags, which could
// erronously include an ES6 constructor without TypeScript syntax.
return undefined;
- case 147 /* PropertyDeclaration */:
- case 155 /* IndexSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 149 /* MethodDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 156 /* IndexSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 150 /* MethodDeclaration */:
// Fallback to the default visit behavior.
return visitorWorker(node);
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
return node;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -45372,46 +48928,47 @@ var ts;
case 123 /* DeclareKeyword */:
case 130 /* ReadonlyKeyword */:
// TypeScript accessibility and readonly modifiers are elided.
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
- case 161 /* TypeLiteral */:
- case 156 /* TypePredicate */:
- case 143 /* TypeParameter */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
+ case 162 /* TypeLiteral */:
+ case 157 /* TypePredicate */:
+ case 144 /* TypeParameter */:
case 118 /* AnyKeyword */:
case 121 /* BooleanKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 129 /* NeverKeyword */:
case 104 /* VoidKeyword */:
- case 135 /* SymbolKeyword */:
- case 159 /* ConstructorType */:
- case 158 /* FunctionType */:
- case 160 /* TypeQuery */:
- case 157 /* TypeReference */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
- case 166 /* ParenthesizedType */:
- case 167 /* ThisType */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 171 /* LiteralType */:
+ case 136 /* SymbolKeyword */:
+ case 160 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 161 /* TypeQuery */:
+ case 158 /* TypeReference */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
+ case 167 /* ParenthesizedType */:
+ case 168 /* ThisType */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 172 /* LiteralType */:
// TypeScript type nodes are elided.
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
// TypeScript index signatures are elided.
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// TypeScript decorators are elided. They will be emitted as part of visitClassDeclaration.
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
// TypeScript type-only declarations are elided.
- case 147 /* PropertyDeclaration */:
- // TypeScript property declarations are elided.
- case 150 /* Constructor */:
+ case 148 /* PropertyDeclaration */:
+ // TypeScript property declarations are elided.
+ return undefined;
+ case 151 /* Constructor */:
return visitConstructor(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
// TypeScript interfaces are elided, but some comments may be preserved.
// See the implementation of `getLeadingComments` in comments.ts for more details.
return ts.createNotEmittedStatement(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
// This is a class declaration with TypeScript syntax extensions.
//
// TypeScript class syntax extensions include:
@@ -45422,7 +48979,7 @@ var ts;
// - index signatures
// - method overload signatures
return visitClassDeclaration(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
// This is a class expression with TypeScript syntax extensions.
//
// TypeScript class syntax extensions include:
@@ -45433,35 +48990,35 @@ var ts;
// - index signatures
// - method overload signatures
return visitClassExpression(node);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
// This is a heritage clause with TypeScript syntax extensions.
//
// TypeScript heritage clause extensions include:
// - `implements` clause
return visitHeritageClause(node);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
// TypeScript supports type arguments on an expression in an `extends` heritage clause.
return visitExpressionWithTypeArguments(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
// TypeScript method declarations may have decorators, modifiers
// or type annotations.
return visitMethodDeclaration(node);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
// Get Accessors can have TypeScript modifiers, decorators, and type annotations.
return visitGetAccessor(node);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
// Set Accessors can have TypeScript modifiers and type annotations.
return visitSetAccessor(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
// Typescript function declarations can have modifiers, decorators, and type annotations.
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
// TypeScript function expressions can have modifiers and type annotations.
return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
// TypeScript arrow functions can have modifiers and type annotations.
return visitArrowFunction(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// This is a parameter declaration with TypeScript syntax extensions.
//
// TypeScript parameter declaration syntax extensions include:
@@ -45471,33 +49028,33 @@ var ts;
// - type annotations
// - this parameters
return visitParameter(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
// ParenthesizedExpressions are TypeScript if their expression is a
// TypeAssertion or AsExpression
return visitParenthesizedExpression(node);
- case 182 /* TypeAssertionExpression */:
- case 200 /* AsExpression */:
+ case 183 /* TypeAssertionExpression */:
+ case 201 /* AsExpression */:
// TypeScript type assertions are removed, but their subtrees are preserved.
return visitAssertionExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
// TypeScript non-null expressions are removed, but their subtrees are preserved.
return visitNonNullExpression(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
// TypeScript enum declarations do not exist in ES6 and must be rewritten.
return visitEnumDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// TypeScript namespace exports for variable statements must be transformed.
return visitVariableStatement(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// TypeScript namespace declarations must be transformed.
return visitModuleDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// TypeScript namespace or external module import.
return visitImportEqualsDeclaration(node);
default:
@@ -45506,7 +49063,8 @@ var ts;
}
}
function visitSourceFile(node) {
- var alwaysStrict = compilerOptions.alwaysStrict && !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
+ var alwaysStrict = (compilerOptions.alwaysStrict === undefined ? compilerOptions.strict : compilerOptions.alwaysStrict) &&
+ !(ts.isExternalModule(node) && moduleKind === ts.ModuleKind.ES2015);
return ts.updateSourceFileNode(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, /*start*/ 0, alwaysStrict));
}
/**
@@ -45602,13 +49160,14 @@ var ts;
// }
var classDeclaration = ts.createClassDeclaration(
/*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name,
- /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause), node);
- var emitFlags = ts.getEmitFlags(node);
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, hasExtendsClause));
// To better align with the old emitter, we should not emit a trailing source map
// entry if the class has static properties.
+ var emitFlags = ts.getEmitFlags(node);
if (hasStaticProperties) {
emitFlags |= 32 /* NoTrailingSourceMap */;
}
+ ts.setTextRange(classDeclaration, node);
ts.setOriginalNode(classDeclaration, node);
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
@@ -45716,12 +49275,18 @@ var ts;
// }
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, hasExtendsClause);
- var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members, location);
+ var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, location);
// let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference
// or decoratedClassAlias if the class contain self-reference.
- var statement = ts.createLetStatement(declName, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression, location);
+ var statement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(declName,
+ /*type*/ undefined, classAlias ? ts.createAssignment(classAlias, classExpression) : classExpression)
+ ], 1 /* Let */));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, location);
ts.setCommentRange(statement, node);
return statement;
}
@@ -45738,10 +49303,11 @@ var ts;
var staticProperties = getInitializedProperties(node, /*isStatic*/ true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 84 /* ExtendsKeyword */; }));
- var classExpression = ts.setOriginalNode(ts.createClassExpression(
+ var classExpression = ts.createClassExpression(
/*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, heritageClauses, members,
- /*location*/ node), node);
+ /*typeParameters*/ undefined, heritageClauses, members);
+ ts.setOriginalNode(classExpression, node);
+ ts.setTextRange(classExpression, node);
if (staticProperties.length > 0) {
var expressions = [];
var temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -45773,7 +49339,7 @@ var ts;
members.push(constructor);
}
ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
- return ts.createNodeArray(members, /*location*/ node.members);
+ return ts.setTextRange(ts.createNodeArray(members), /*location*/ node.members);
}
/**
* Transforms (or creates) a constructor for a class.
@@ -45798,10 +49364,9 @@ var ts;
// constructor(${parameters}) {
// ${body}
// }
- return ts.startOnNewLine(ts.setOriginalNode(ts.createConstructor(
+ return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor(
/*decorators*/ undefined,
- /*modifiers*/ undefined, parameters, body,
- /*location*/ constructor || node), constructor));
+ /*modifiers*/ undefined, parameters, body), constructor || node), constructor));
}
/**
* Transforms (or creates) the parameters for the constructor of a class with
@@ -45883,11 +49448,11 @@ var ts;
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
}
// End the lexical environment.
- ts.addRange(statements, endLexicalEnvironment());
- return ts.createBlock(ts.createNodeArray(statements,
+ statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+ return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ constructor ? constructor.body.statements : node.members),
- /*location*/ constructor ? constructor.body : undefined,
- /*multiLine*/ true);
+ /*multiLine*/ true),
+ /*location*/ constructor ? constructor.body : undefined);
}
/**
* Adds super call and preceding prologue directives into the list of statements.
@@ -45899,13 +49464,13 @@ var ts;
if (ctor.body) {
var statements = ctor.body.statements;
// add prologue directives to the list (if any)
- var index = ts.addPrologueDirectives(result, statements, /*ensureUseStrict*/ false, visitor);
+ var index = ts.addPrologue(result, statements, /*ensureUseStrict*/ false, visitor);
if (index === statements.length) {
// list contains nothing but prologue directives (or empty) - exit
return index;
}
var statement = statements[index];
- if (statement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
+ if (statement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) {
result.push(ts.visitNode(statement, visitor, ts.isStatement));
return index + 1;
}
@@ -45942,9 +49507,7 @@ var ts;
ts.setEmitFlags(propertyName, 1536 /* NoComments */ | 48 /* NoSourceMap */);
var localName = ts.getMutableClone(name);
ts.setEmitFlags(localName, 1536 /* NoComments */);
- return ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), propertyName,
- /*location*/ node.name), localName),
- /*location*/ ts.moveRangePos(node, -1)));
+ return ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)));
}
/**
* Gets all property declarations with initializers on either the static or instance side of a class.
@@ -45978,7 +49541,7 @@ var ts;
* @param isStatic A value indicating whether the member should be a static or instance member.
*/
function isInitializedProperty(member, isStatic) {
- return member.kind === 147 /* PropertyDeclaration */
+ return member.kind === 148 /* PropertyDeclaration */
&& isStatic === ts.hasModifier(member, 32 /* Static */)
&& member.initializer !== undefined;
}
@@ -45989,8 +49552,8 @@ var ts;
* @param receiver The receiver on which each property should be assigned.
*/
function addInitializedPropertyStatements(statements, properties, receiver) {
- for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
- var property = properties_7[_i];
+ for (var _i = 0, properties_9 = properties; _i < properties_9.length; _i++) {
+ var property = properties_9[_i];
var statement = ts.createStatement(transformInitializedProperty(property, receiver));
ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property));
ts.setCommentRange(statement, property);
@@ -46005,8 +49568,8 @@ var ts;
*/
function generateInitializedPropertyExpressions(properties, receiver) {
var expressions = [];
- for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
- var property = properties_8[_i];
+ for (var _i = 0, properties_10 = properties; _i < properties_10.length; _i++) {
+ var property = properties_10[_i];
var expression = transformInitializedProperty(property, receiver);
expression.startsOnNewLine = true;
ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property));
@@ -46113,12 +49676,12 @@ var ts;
*/
function getAllDecoratorsOfClassElement(node, member) {
switch (member.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return getAllDecoratorsOfAccessors(node, member);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return getAllDecoratorsOfMethod(member);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return getAllDecoratorsOfProperty(member);
default:
return undefined;
@@ -46135,10 +49698,11 @@ var ts;
return undefined;
}
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
- if (accessor !== firstAccessor) {
+ var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
+ if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
return undefined;
}
- var decorators = firstAccessor.decorators || (secondAccessor && secondAccessor.decorators);
+ var decorators = firstAccessorWithDecorators.decorators;
var parameters = getDecoratorsOfParameters(setAccessor);
if (!decorators && !parameters) {
return undefined;
@@ -46179,14 +49743,14 @@ var ts;
* @param node The declaration node.
* @param allDecorators An object containing all of the decorators for the declaration.
*/
- function transformAllDecoratorsOfDeclaration(node, allDecorators) {
+ function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
if (!allDecorators) {
return undefined;
}
var decoratorExpressions = [];
ts.addRange(decoratorExpressions, ts.map(allDecorators.decorators, transformDecorator));
ts.addRange(decoratorExpressions, ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
- addTypeMetadata(node, decoratorExpressions);
+ addTypeMetadata(node, container, decoratorExpressions);
return decoratorExpressions;
}
/**
@@ -46233,7 +49797,7 @@ var ts;
*/
function generateClassElementDecorationExpression(node, member) {
var allDecorators = getAllDecoratorsOfClassElement(node, member);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(member, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -46270,7 +49834,7 @@ var ts;
var prefix = getClassMemberPrefix(node, member);
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true);
var descriptor = languageVersion > 0 /* ES3 */
- ? member.kind === 147 /* PropertyDeclaration */
+ ? member.kind === 148 /* PropertyDeclaration */
? ts.createVoidZero()
: ts.createNull()
: undefined;
@@ -46296,7 +49860,7 @@ var ts;
*/
function generateConstructorDecorationExpression(node) {
var allDecorators = getAllDecoratorsOfConstructor(node);
- var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators);
+ var decoratorExpressions = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
if (!decoratorExpressions) {
return undefined;
}
@@ -46342,41 +49906,41 @@ var ts;
* @param node The declaration node.
* @param decoratorExpressions The destination array to which to add new decorator expressions.
*/
- function addTypeMetadata(node, decoratorExpressions) {
+ function addTypeMetadata(node, container, decoratorExpressions) {
if (USE_NEW_TYPE_METADATA_FORMAT) {
- addNewTypeMetadata(node, decoratorExpressions);
+ addNewTypeMetadata(node, container, decoratorExpressions);
}
else {
- addOldTypeMetadata(node, decoratorExpressions);
+ addOldTypeMetadata(node, container, decoratorExpressions);
}
}
- function addOldTypeMetadata(node, decoratorExpressions) {
+ function addOldTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
if (shouldAddTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:type", serializeTypeOfNode(node)));
}
if (shouldAddParamTypesMetadata(node)) {
- decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:paramtypes", serializeParameterTypesOfNode(node, container)));
}
if (shouldAddReturnTypeMetadata(node)) {
decoratorExpressions.push(createMetadataHelper(context, "design:returntype", serializeReturnTypeOfNode(node)));
}
}
}
- function addNewTypeMetadata(node, decoratorExpressions) {
+ function addNewTypeMetadata(node, container, decoratorExpressions) {
if (compilerOptions.emitDecoratorMetadata) {
var properties = void 0;
if (shouldAddTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("type", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeTypeOfNode(node))));
}
if (shouldAddParamTypesMetadata(node)) {
- (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node))));
+ (properties || (properties = [])).push(ts.createPropertyAssignment("paramTypes", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeParameterTypesOfNode(node, container))));
}
if (shouldAddReturnTypeMetadata(node)) {
(properties || (properties = [])).push(ts.createPropertyAssignment("returnType", ts.createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, ts.createToken(35 /* EqualsGreaterThanToken */), serializeReturnTypeOfNode(node))));
}
if (properties) {
- decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true)));
+ decoratorExpressions.push(createMetadataHelper(context, "design:typeinfo", ts.createObjectLiteral(properties, /*multiLine*/ true)));
}
}
}
@@ -46389,10 +49953,10 @@ var ts;
*/
function shouldAddTypeMetadata(node) {
var kind = node.kind;
- return kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */
- || kind === 147 /* PropertyDeclaration */;
+ return kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */
+ || kind === 148 /* PropertyDeclaration */;
}
/**
* Determines whether to emit the "design:returntype" metadata based on the node's kind.
@@ -46402,7 +49966,7 @@ var ts;
* @param node The node to test.
*/
function shouldAddReturnTypeMetadata(node) {
- return node.kind === 149 /* MethodDeclaration */;
+ return node.kind === 150 /* MethodDeclaration */;
}
/**
* Determines whether to emit the "design:paramtypes" metadata based on the node's kind.
@@ -46412,12 +49976,16 @@ var ts;
* @param node The node to test.
*/
function shouldAddParamTypesMetadata(node) {
- var kind = node.kind;
- return kind === 226 /* ClassDeclaration */
- || kind === 197 /* ClassExpression */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */;
+ switch (node.kind) {
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ return ts.getFirstConstructorWithBody(node) !== undefined;
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return true;
+ }
+ return false;
}
/**
* Serializes the type of a node for use with decorator type metadata.
@@ -46426,43 +49994,26 @@ var ts;
*/
function serializeTypeOfNode(node) {
switch (node.kind) {
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
- case 151 /* GetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
+ case 152 /* GetAccessor */:
return serializeTypeNode(node.type);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return serializeTypeNode(ts.getSetAccessorTypeAnnotationNode(node));
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 149 /* MethodDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 150 /* MethodDeclaration */:
return ts.createIdentifier("Function");
default:
return ts.createVoidZero();
}
}
/**
- * Gets the most likely element type for a TypeNode. This is not an exhaustive test
- * as it assumes a rest argument can only be an array type (either T[], or Array<T>).
- *
- * @param node The type node.
- */
- function getRestParameterElementType(node) {
- if (node && node.kind === 162 /* ArrayType */) {
- return node.elementType;
- }
- else if (node && node.kind === 157 /* TypeReference */) {
- return ts.singleOrUndefined(node.typeArguments);
- }
- else {
- return undefined;
- }
- }
- /**
* Serializes the types of the parameters of a node for use with decorator type metadata.
*
* @param node The node that should have its parameter types serialized.
*/
- function serializeParameterTypesOfNode(node) {
+ function serializeParameterTypesOfNode(node, container) {
var valueDeclaration = ts.isClassLike(node)
? ts.getFirstConstructorWithBody(node)
: ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)
@@ -46470,7 +50021,7 @@ var ts;
: undefined;
var expressions = [];
if (valueDeclaration) {
- var parameters = valueDeclaration.parameters;
+ var parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);
var numParameters = parameters.length;
for (var i = 0; i < numParameters; i++) {
var parameter = parameters[i];
@@ -46478,7 +50029,7 @@ var ts;
continue;
}
if (parameter.dotDotDotToken) {
- expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));
+ expressions.push(serializeTypeNode(ts.getRestParameterElementType(parameter.type)));
}
else {
expressions.push(serializeTypeOfNode(parameter));
@@ -46487,6 +50038,15 @@ var ts;
}
return ts.createArrayLiteral(expressions);
}
+ function getParametersOfDecoratedDeclaration(node, container) {
+ if (container && node.kind === 152 /* GetAccessor */) {
+ var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
+ if (setAccessor) {
+ return setAccessor.parameters;
+ }
+ }
+ return node.parameters;
+ }
/**
* Serializes the return type of a node for use with decorator type metadata.
*
@@ -46496,7 +50056,7 @@ var ts;
if (ts.isFunctionLike(node) && node.type) {
return serializeTypeNode(node.type);
}
- else if (ts.isAsyncFunctionLike(node)) {
+ else if (ts.isAsyncFunction(node)) {
return ts.createIdentifier("Promise");
}
return ts.createVoidZero();
@@ -46525,21 +50085,26 @@ var ts;
}
switch (node.kind) {
case 104 /* VoidKeyword */:
+ case 138 /* UndefinedKeyword */:
+ case 94 /* NullKeyword */:
+ case 129 /* NeverKeyword */:
return ts.createVoidZero();
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return serializeTypeNode(node.type);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return ts.createIdentifier("Function");
- case 162 /* ArrayType */:
- case 163 /* TupleType */:
+ case 163 /* ArrayType */:
+ case 164 /* TupleType */:
return ts.createIdentifier("Array");
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
case 121 /* BooleanKeyword */:
return ts.createIdentifier("Boolean");
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
return ts.createIdentifier("String");
- case 171 /* LiteralType */:
+ case 133 /* ObjectKeyword */:
+ return ts.createIdentifier("Object");
+ case 172 /* LiteralType */:
switch (node.literal.kind) {
case 9 /* StringLiteral */:
return ts.createIdentifier("String");
@@ -46555,49 +50120,22 @@ var ts;
break;
case 132 /* NumberKeyword */:
return ts.createIdentifier("Number");
- case 135 /* SymbolKeyword */:
+ case 136 /* SymbolKeyword */:
return languageVersion < 2 /* ES2015 */
? getGlobalSymbolNameWithFallback()
: ts.createIdentifier("Symbol");
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return serializeTypeReferenceNode(node);
- case 165 /* IntersectionType */:
- case 164 /* UnionType */:
- {
- var unionOrIntersection = node;
- var serializedUnion = void 0;
- for (var _i = 0, _a = unionOrIntersection.types; _i < _a.length; _i++) {
- var typeNode = _a[_i];
- var serializedIndividual = serializeTypeNode(typeNode);
- // Non identifier
- if (serializedIndividual.kind !== 70 /* Identifier */) {
- serializedUnion = undefined;
- break;
- }
- // One of the individual is global object, return immediately
- if (serializedIndividual.text === "Object") {
- return serializedIndividual;
- }
- // Different types
- if (serializedUnion && serializedUnion.text !== serializedIndividual.text) {
- serializedUnion = undefined;
- break;
- }
- serializedUnion = serializedIndividual;
- }
- // If we were able to find common type
- if (serializedUnion) {
- return serializedUnion;
- }
- }
- // Fallthrough
- case 160 /* TypeQuery */:
- case 168 /* TypeOperator */:
- case 169 /* IndexedAccessType */:
- case 170 /* MappedType */:
- case 161 /* TypeLiteral */:
+ case 166 /* IntersectionType */:
+ case 165 /* UnionType */:
+ return serializeUnionOrIntersectionType(node);
+ case 161 /* TypeQuery */:
+ case 169 /* TypeOperator */:
+ case 170 /* IndexedAccessType */:
+ case 171 /* MappedType */:
+ case 162 /* TypeLiteral */:
case 118 /* AnyKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
break;
default:
ts.Debug.failBadSyntaxKind(node);
@@ -46605,6 +50143,37 @@ var ts;
}
return ts.createIdentifier("Object");
}
+ function serializeUnionOrIntersectionType(node) {
+ var serializedUnion;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var serializedIndividual = serializeTypeNode(typeNode);
+ if (ts.isVoidExpression(serializedIndividual)) {
+ // If we dont have any other type already set, set the initial type
+ if (!serializedUnion) {
+ serializedUnion = serializedIndividual;
+ }
+ }
+ else if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
+ // One of the individual is global object, return immediately
+ return serializedIndividual;
+ }
+ else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ // Different types
+ if (!ts.isIdentifier(serializedUnion) ||
+ !ts.isIdentifier(serializedIndividual) ||
+ serializedUnion.text !== serializedIndividual.text) {
+ return ts.createIdentifier("Object");
+ }
+ }
+ else {
+ // Initialize the union type
+ serializedUnion = serializedIndividual;
+ }
+ }
+ // If we were able to find common type, use it
+ return serializedUnion;
+ }
/**
* Serializes a TypeReferenceNode to an appropriate JS constructor value for use with
* decorator type metadata.
@@ -46654,15 +50223,15 @@ var ts;
case 70 /* Identifier */:
// Create a clone of the name with a new parent, and treat it as if it were
// a source tree node for the purposes of the checker.
- var name_31 = ts.getMutableClone(node);
- name_31.flags &= ~8 /* Synthesized */;
- name_31.original = undefined;
- name_31.parent = currentScope;
+ var name = ts.getMutableClone(node);
+ name.flags &= ~8 /* Synthesized */;
+ name.original = undefined;
+ name.parent = currentScope;
if (useFallback) {
- return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name_31), ts.createLiteral("undefined")), name_31);
+ return ts.createLogicalAnd(ts.createStrictInequality(ts.createTypeOf(name), ts.createLiteral("undefined")), name);
}
- return name_31;
- case 141 /* QualifiedName */:
+ return name;
+ case 142 /* QualifiedName */:
return serializeQualifiedNameAsExpression(node, useFallback);
}
}
@@ -46708,7 +50277,7 @@ var ts;
: name.expression;
}
else if (ts.isIdentifier(name)) {
- return ts.createLiteral(name.text);
+ return ts.createLiteral(ts.unescapeIdentifier(name.text));
}
else {
return ts.getSynthesizedClone(name);
@@ -46730,7 +50299,7 @@ var ts;
hoistVariableDeclaration(generatedName);
expression = ts.createAssignment(generatedName, expression);
}
- return ts.setOriginalNode(ts.createComputedPropertyName(expression, /*location*/ name), name);
+ return ts.updateComputedPropertyName(name, expression);
}
else {
return name;
@@ -46748,7 +50317,7 @@ var ts;
function visitHeritageClause(node) {
if (node.token === 84 /* ExtendsKeyword */) {
var types = ts.visitNodes(node.types, visitor, ts.isExpressionWithTypeArguments, 0, 1);
- return ts.createHeritageClause(84 /* ExtendsKeyword */, types, node);
+ return ts.setTextRange(ts.createHeritageClause(84 /* ExtendsKeyword */, types), node);
}
return undefined;
}
@@ -46761,9 +50330,8 @@ var ts;
* @param node The ExpressionWithTypeArguments to transform.
*/
function visitExpressionWithTypeArguments(node) {
- var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
- return ts.createExpressionWithTypeArguments(
- /*typeArguments*/ undefined, expression, node);
+ return ts.updateExpressionWithTypeArguments(node,
+ /*typeArguments*/ undefined, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
}
/**
* Determines whether to emit a function-like declaration. We should not emit the
@@ -46778,7 +50346,7 @@ var ts;
if (!shouldEmitFunctionLikeDeclaration(node)) {
return undefined;
}
- return ts.visitEachChild(node, visitor, context);
+ return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context));
}
/**
* Visits a method declaration of a class.
@@ -46795,7 +50363,8 @@ var ts;
return undefined;
}
var updated = ts.updateMethod(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), visitPropertyNameOfClassElement(node),
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node),
+ /*questionToken*/ undefined,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
if (updated !== node) {
@@ -46877,7 +50446,7 @@ var ts;
return ts.createNotEmittedStatement(node);
}
var updated = ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
if (isNamespaceExport(node)) {
@@ -46896,12 +50465,12 @@ var ts;
* @param node The function expression node.
*/
function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
+ if (!shouldEmitFunctionLikeDeclaration(node)) {
return ts.createOmittedExpression();
}
- var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
+ var updated = ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
+ /*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || ts.createBlock([]));
return updated;
}
/**
@@ -46933,11 +50502,11 @@ var ts;
/*decorators*/ undefined,
/*modifiers*/ undefined, node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
/*questionToken*/ undefined,
- /*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression),
- /*location*/ ts.moveRangePastModifiers(node));
+ /*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
// While we emit the source map for the node after skipping decorators and modifiers,
// we need to emit the comments for the original range.
ts.setOriginalNode(parameter, node);
+ ts.setTextRange(parameter, ts.moveRangePastModifiers(node));
ts.setCommentRange(parameter, node);
ts.setSourceMapRange(parameter, ts.moveRangePastModifiers(node));
ts.setEmitFlags(parameter.name, 32 /* NoTrailingSourceMap */);
@@ -46956,8 +50525,7 @@ var ts;
// elide statement if there are no initialized variables.
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)),
- /*location*/ node);
+ return ts.setTextRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
else {
return ts.visitEachChild(node, visitor, context);
@@ -46970,7 +50538,7 @@ var ts;
/*needsValue*/ false, createNamespaceExportExpression);
}
else {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression),
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)),
/*location*/ node);
}
}
@@ -46996,13 +50564,13 @@ var ts;
// code if the casted expression has a lower precedence than the rest of the
// expression.
//
+ // To preserve comments, we return a "PartiallyEmittedExpression" here which will
+ // preserve the position information of the original expression.
+ //
// Due to the auto-parenthesization rules used by the visitor and factory functions
// we can safely elide the parentheses here, as a new synthetic
// ParenthesizedExpression will be inserted if we remove parentheses too
// aggressively.
- //
- // To preserve comments, we return a "PartiallyEmittedExpression" here which will
- // preserve the position information of the original expression.
return ts.createPartiallyEmittedExpression(expression, node);
}
return ts.visitEachChild(node, visitor, context);
@@ -47084,9 +50652,9 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
/*type*/ undefined, transformEnumBody(node, containerName)),
- /*typeArguments*/ undefined, [moduleArg]),
- /*location*/ node);
+ /*typeArguments*/ undefined, [moduleArg]));
ts.setOriginalNode(enumStatement, node);
+ ts.setTextRange(enumStatement, node);
ts.setEmitFlags(enumStatement, emitFlags);
statements.push(enumStatement);
// Add a DeclarationMarker for the enum to preserve trailing comments and mark
@@ -47107,8 +50675,7 @@ var ts;
ts.addRange(statements, ts.map(node.members, transformEnumMember));
ts.addRange(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
- return ts.createBlock(ts.createNodeArray(statements, /*location*/ node.members),
- /*location*/ undefined,
+ return ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), /*location*/ node.members),
/*multiLine*/ true);
}
/**
@@ -47121,9 +50688,7 @@ var ts;
// we pass false as 'generateNameForComputedPropertyName' for a backward compatibility purposes
// old emitter always generate 'expression' part of the name as-is.
var name = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ false);
- return ts.createStatement(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name,
- /*location*/ member),
- /*location*/ member);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
}
/**
* Transforms the value of an enum member.
@@ -47176,8 +50741,8 @@ var ts;
if (!currentScopeFirstDeclarationsOfName) {
currentScopeFirstDeclarationsOfName = ts.createMap();
}
- if (!(name in currentScopeFirstDeclarationsOfName)) {
- currentScopeFirstDeclarationsOfName[name] = node;
+ if (!currentScopeFirstDeclarationsOfName.has(name)) {
+ currentScopeFirstDeclarationsOfName.set(name, node);
}
}
}
@@ -47187,9 +50752,9 @@ var ts;
*/
function isFirstEmittedDeclarationInScope(node) {
if (currentScopeFirstDeclarationsOfName) {
- var name_32 = node.symbol && node.symbol.name;
- if (name_32) {
- return currentScopeFirstDeclarationsOfName[name_32] === node;
+ var name = node.symbol && node.symbol.name;
+ if (name) {
+ return currentScopeFirstDeclarationsOfName.get(name) === node;
}
}
return false;
@@ -47206,7 +50771,7 @@ var ts;
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
// Adjust the source map emit to match the old emitter.
- if (node.kind === 229 /* EnumDeclaration */) {
+ if (node.kind === 231 /* EnumDeclaration */) {
ts.setSourceMapRange(statement.declarationList, node);
}
else {
@@ -47298,9 +50863,9 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
/*type*/ undefined, transformModuleBody(node, containerName)),
- /*typeArguments*/ undefined, [moduleArg]),
- /*location*/ node);
+ /*typeArguments*/ undefined, [moduleArg]));
ts.setOriginalNode(moduleStatement, node);
+ ts.setTextRange(moduleStatement, node);
ts.setEmitFlags(moduleStatement, emitFlags);
statements.push(moduleStatement);
// Add a DeclarationMarker for the namespace to preserve trailing comments and mark
@@ -47325,8 +50890,8 @@ var ts;
var statementsLocation;
var blockLocation;
var body = node.body;
- if (body.kind === 231 /* ModuleBlock */) {
- ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement));
+ if (body.kind === 233 /* ModuleBlock */) {
+ saveStateAndInvoke(body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
statementsLocation = body.statements;
blockLocation = body;
}
@@ -47347,10 +50912,10 @@ var ts;
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
- var block = ts.createBlock(ts.createNodeArray(statements,
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ statementsLocation),
- /*location*/ blockLocation,
/*multiLine*/ true);
+ ts.setTextRange(block, blockLocation);
// namespace hello.hi.world {
// function foo() {}
//
@@ -47371,13 +50936,13 @@ var ts;
// })(hi = hello.hi || (hello.hi = {}));
// })(hello || (hello = {}));
// We only want to emit comment on the namespace which contains block body itself, not the containing namespaces.
- if (body.kind !== 231 /* ModuleBlock */) {
+ if (body.kind !== 233 /* ModuleBlock */) {
ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536 /* NoComments */);
}
return block;
}
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
- if (moduleDeclaration.body.kind === 230 /* ModuleDeclaration */) {
+ if (moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerModule || moduleDeclaration.body;
}
@@ -47394,7 +50959,7 @@ var ts;
return node;
}
// Elide the declaration if the import clause was elided.
- var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause, /*optional*/ true);
+ var importClause = ts.visitNode(node.importClause, visitImportClause, ts.isImportClause);
return importClause
? ts.updateImportDeclaration(node,
/*decorators*/ undefined,
@@ -47409,7 +50974,7 @@ var ts;
function visitImportClause(node) {
// Elide the import clause if we elide both its name and its named bindings.
var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
- var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings, /*optional*/ true);
+ var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
return (name || namedBindings) ? ts.updateImportClause(node, name, namedBindings) : undefined;
}
/**
@@ -47418,7 +50983,7 @@ var ts;
* @param node The named import bindings node.
*/
function visitNamedImportBindings(node) {
- if (node.kind === 237 /* NamespaceImport */) {
+ if (node.kind === 239 /* NamespaceImport */) {
// Elide a namespace import if it is not referenced.
return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
}
@@ -47465,7 +51030,7 @@ var ts;
return undefined;
}
// Elide the export declaration if all of its named exports are elided.
- var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports, /*optional*/ true);
+ var exportClause = ts.visitNode(node.exportClause, visitNamedExports, ts.isNamedExports);
return exportClause
? ts.updateExportDeclaration(node,
/*decorators*/ undefined,
@@ -47525,10 +51090,10 @@ var ts;
if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
// export var ${name} = ${moduleReference};
// var ${name} = ${moduleReference};
- return ts.setOriginalNode(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
+ return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.setOriginalNode(ts.createVariableDeclaration(node.name,
/*type*/ undefined, moduleReference), node)
- ]), node), node);
+ ])), node), node);
}
else {
// exports.${name} = ${moduleReference};
@@ -47573,7 +51138,7 @@ var ts;
* Creates a statement for the provided expression. This is used in calls to `map`.
*/
function expressionToStatement(expression) {
- return ts.createStatement(expression, /*location*/ undefined);
+ return ts.createStatement(expression);
}
function addExportMemberAssignment(statements, node) {
var expression = ts.createAssignment(ts.getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true), ts.getLocalName(node));
@@ -47583,10 +51148,10 @@ var ts;
statements.push(statement);
}
function createNamespaceExport(exportName, exportValue, location) {
- return ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue), location);
+ return ts.setTextRange(ts.createStatement(ts.createAssignment(ts.getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue)), location);
}
function createNamespaceExportExpression(exportName, exportValue, location) {
- return ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location);
+ return ts.setTextRange(ts.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);
}
function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {
return ts.getNamespaceMemberName(currentNamespaceContainerName, name, /*allowComments*/ false, /*allowSourceMaps*/ true);
@@ -47614,7 +51179,7 @@ var ts;
function getClassAliasIfNeeded(node) {
if (resolver.getNodeCheckFlags(node) & 8388608 /* ClassWithConstructorReference */) {
enableSubstitutionForClassAliases();
- var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? node.name.text : "default");
+ var classAlias = ts.createUniqueName(node.name && !ts.isGeneratedIdentifier(node.name) ? ts.unescapeIdentifier(node.name.text) : "default");
classAliases[ts.getOriginalNodeId(node)] = classAlias;
hoistVariableDeclaration(classAlias);
return classAlias;
@@ -47641,7 +51206,7 @@ var ts;
// substitute class names inside of a class declaration.
context.enableSubstitution(70 /* Identifier */);
// Keep track of class aliases.
- classAliases = ts.createMap();
+ classAliases = [];
}
}
function enableSubstitutionForNamespaceExports() {
@@ -47650,44 +51215,49 @@ var ts;
// We need to enable substitutions for identifiers and shorthand property assignments. This allows us to
// substitute the names of exported members of a namespace.
context.enableSubstitution(70 /* Identifier */);
- context.enableSubstitution(258 /* ShorthandPropertyAssignment */);
+ context.enableSubstitution(261 /* ShorthandPropertyAssignment */);
// We need to be notified when entering and exiting namespaces.
- context.enableEmitNotification(230 /* ModuleDeclaration */);
+ context.enableEmitNotification(232 /* ModuleDeclaration */);
}
}
function isTransformedModuleDeclaration(node) {
- return ts.getOriginalNode(node).kind === 230 /* ModuleDeclaration */;
+ return ts.getOriginalNode(node).kind === 232 /* ModuleDeclaration */;
}
function isTransformedEnumDeclaration(node) {
- return ts.getOriginalNode(node).kind === 229 /* EnumDeclaration */;
+ return ts.getOriginalNode(node).kind === 231 /* EnumDeclaration */;
}
/**
* Hook for node emit.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
+ function onEmitNode(hint, node, emitCallback) {
var savedApplicableSubstitutions = applicableSubstitutions;
+ var savedCurrentSourceFile = currentSourceFile;
+ if (ts.isSourceFile(node)) {
+ currentSourceFile = node;
+ }
if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {
applicableSubstitutions |= 2 /* NamespaceExports */;
}
if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {
applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
applicableSubstitutions = savedApplicableSubstitutions;
+ currentSourceFile = savedCurrentSourceFile;
}
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
else if (ts.isShorthandPropertyAssignment(node)) {
@@ -47697,16 +51267,16 @@ var ts;
}
function substituteShorthandPropertyAssignment(node) {
if (enabledSubstitutions & 2 /* NamespaceExports */) {
- var name_33 = node.name;
- var exportedName = trySubstituteNamespaceExportedName(name_33);
+ var name = node.name;
+ var exportedName = trySubstituteNamespaceExportedName(name);
if (exportedName) {
// A shorthand property with an assignment initializer is probably part of a
// destructuring assignment
if (node.objectAssignmentInitializer) {
var initializer = ts.createAssignment(exportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name_33, initializer, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
}
- return ts.createPropertyAssignment(name_33, exportedName, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedName), node);
}
}
return node;
@@ -47715,9 +51285,9 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return substituteExpressionIdentifier(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return substitutePropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return substituteElementAccessExpression(node);
}
return node;
@@ -47755,11 +51325,12 @@ var ts;
// If we are nested within a namespace declaration, we may need to qualifiy
// an identifier that is exported from a merged namespace.
var container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false);
- if (container && container.kind !== 261 /* SourceFile */) {
- var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 230 /* ModuleDeclaration */) ||
- (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 229 /* EnumDeclaration */);
+ if (container && container.kind !== 264 /* SourceFile */) {
+ var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 232 /* ModuleDeclaration */) ||
+ (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 231 /* EnumDeclaration */);
if (substitute) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node, /*location*/ node);
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(container), node),
+ /*location*/ node);
}
}
}
@@ -47774,16 +51345,15 @@ var ts;
function substituteConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
+ // track the constant value on the node for the printer in needsDotDotForPropertyAccess
+ ts.setConstantValue(node, constantValue);
var substitute = ts.createLiteral(constantValue);
- ts.setSourceMapRange(substitute, node);
- ts.setCommentRange(substitute, node);
if (!compilerOptions.removeComments) {
var propertyName = ts.isPropertyAccessExpression(node)
? ts.declarationNameToString(node.name)
: ts.getTextOfNode(node.argumentExpression);
- substitute.trailingComment = " " + propertyName + " ";
+ ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + propertyName + " ");
}
- ts.setConstantValue(node, constantValue);
return substitute;
}
return node;
@@ -47798,19 +51368,33 @@ var ts;
}
}
ts.transformTypeScript = transformTypeScript;
- var paramHelper = {
- name: "typescript:param",
+ function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
+ var argumentsArray = [];
+ argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, /*multiLine*/ true));
+ argumentsArray.push(target);
+ if (memberName) {
+ argumentsArray.push(memberName);
+ if (descriptor) {
+ argumentsArray.push(descriptor);
+ }
+ }
+ context.requestEmitHelper(decorateHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"),
+ /*typeArguments*/ undefined, argumentsArray), location);
+ }
+ var decorateHelper = {
+ name: "typescript:decorate",
scoped: false,
- priority: 4,
- text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
+ priority: 2,
+ text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
};
- function createParamHelper(context, expression, parameterOffset, location) {
- context.requestEmitHelper(paramHelper);
- return ts.createCall(ts.getHelperName("__param"),
+ function createMetadataHelper(context, metadataKey, metadataValue) {
+ context.requestEmitHelper(metadataHelper);
+ return ts.createCall(ts.getHelperName("__metadata"),
/*typeArguments*/ undefined, [
- ts.createLiteral(parameterOffset),
- expression
- ], location);
+ ts.createLiteral(metadataKey),
+ metadataValue
+ ]);
}
var metadataHelper = {
name: "typescript:metadata",
@@ -47818,41 +51402,391 @@ var ts;
priority: 3,
text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };"
};
- function createMetadataHelper(context, metadataKey, metadataValue) {
- context.requestEmitHelper(metadataHelper);
- return ts.createCall(ts.getHelperName("__metadata"),
+ function createParamHelper(context, expression, parameterOffset, location) {
+ context.requestEmitHelper(paramHelper);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__param"),
/*typeArguments*/ undefined, [
- ts.createLiteral(metadataKey),
- metadataValue
- ]);
+ ts.createLiteral(parameterOffset),
+ expression
+ ]), location);
}
- var decorateHelper = {
- name: "typescript:decorate",
+ var paramHelper = {
+ name: "typescript:param",
scoped: false,
- priority: 2,
- text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };"
+ priority: 4,
+ text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"
};
- function createDecorateHelper(context, decoratorExpressions, target, memberName, descriptor, location) {
- context.requestEmitHelper(decorateHelper);
- var argumentsArray = [];
- argumentsArray.push(ts.createArrayLiteral(decoratorExpressions, /*location*/ undefined, /*multiLine*/ true));
- argumentsArray.push(target);
- if (memberName) {
- argumentsArray.push(memberName);
- if (descriptor) {
- argumentsArray.push(descriptor);
+})(ts || (ts = {}));
+/// <reference path="../factory.ts" />
+/// <reference path="../visitor.ts" />
+/*@internal*/
+var ts;
+(function (ts) {
+ var ES2017SubstitutionFlags;
+ (function (ES2017SubstitutionFlags) {
+ /** Enables substitutions for async methods with `super` calls. */
+ ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
+ function transformES2017(context) {
+ var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ // These variables contain state that changes as we descend into the tree.
+ var currentSourceFile;
+ /**
+ * Keeps track of whether expression substitution has been enabled for specific edge cases.
+ * They are persisted between each SourceFile transformation and should not be reset.
+ */
+ var enabledSubstitutions;
+ /**
+ * This keeps track of containers where `super` is valid, for use with
+ * just-in-time substitution for `super` expressions inside of async methods.
+ */
+ var enclosingSuperContainerFlags = 0;
+ // Save the previous transformation hooks.
+ var previousOnEmitNode = context.onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ // Set new transformation hooks.
+ context.onEmitNode = onEmitNode;
+ context.onSubstituteNode = onSubstituteNode;
+ return transformSourceFile;
+ function transformSourceFile(node) {
+ if (ts.isDeclarationFile(node)) {
+ return node;
+ }
+ currentSourceFile = node;
+ var visited = ts.visitEachChild(node, visitor, context);
+ ts.addEmitHelpers(visited, context.readEmitHelpers());
+ currentSourceFile = undefined;
+ return visited;
+ }
+ function visitor(node) {
+ if ((node.transformFlags & 16 /* ContainsES2017 */) === 0) {
+ return node;
+ }
+ switch (node.kind) {
+ case 119 /* AsyncKeyword */:
+ // ES2017 async modifier should be elided for targets < ES2017
+ return undefined;
+ case 190 /* AwaitExpression */:
+ return visitAwaitExpression(node);
+ case 150 /* MethodDeclaration */:
+ return visitMethodDeclaration(node);
+ case 227 /* FunctionDeclaration */:
+ return visitFunctionDeclaration(node);
+ case 185 /* FunctionExpression */:
+ return visitFunctionExpression(node);
+ case 186 /* ArrowFunction */:
+ return visitArrowFunction(node);
+ default:
+ return ts.visitEachChild(node, visitor, context);
}
}
- return ts.createCall(ts.getHelperName("__decorate"), /*typeArguments*/ undefined, argumentsArray, location);
+ /**
+ * Visits an AwaitExpression node.
+ *
+ * This function will be called any time a ES2017 await expression is encountered.
+ *
+ * @param node The node to visit.
+ */
+ function visitAwaitExpression(node) {
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(
+ /*asteriskToken*/ undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
+ }
+ /**
+ * Visits a MethodDeclaration node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked as async
+ *
+ * @param node The node to visit.
+ */
+ function visitMethodDeclaration(node) {
+ return ts.updateMethod(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits a FunctionDeclaration node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionDeclaration(node) {
+ return ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits a FunctionExpression node.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionExpression(node) {
+ return ts.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, node.name,
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ /**
+ * Visits an ArrowFunction.
+ *
+ * This function will be called when one of the following conditions are met:
+ * - The node is marked async
+ *
+ * @param node The node to visit.
+ */
+ function visitArrowFunction(node) {
+ return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier),
+ /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
+ /*type*/ undefined, ts.getFunctionFlags(node) & 2 /* Async */
+ ? transformAsyncFunctionBody(node)
+ : ts.visitFunctionBody(node.body, visitor, context));
+ }
+ function transformAsyncFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var original = ts.getOriginalNode(node, ts.isFunctionLike);
+ var nodeType = original.type;
+ var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined;
+ var isArrowFunction = node.kind === 186 /* ArrowFunction */;
+ var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0;
+ // An async function is emit as an outer function that calls an inner
+ // generator function. To preserve lexical bindings, we pass the current
+ // `this` and `arguments` objects to `__awaiter`. The generator function
+ // passed to `__awaiter` is executed inside of the callback to the
+ // promise constructor.
+ if (!isArrowFunction) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
+ statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.createBlock(statements, /*multiLine*/ true);
+ ts.setTextRange(block, node.body);
+ // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
+ // This step isn't needed if we eventually transform this to ES5.
+ if (languageVersion >= 2 /* ES2015 */) {
+ if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
+ }
+ else {
+ var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
+ var declarations = endLexicalEnvironment();
+ if (ts.some(declarations)) {
+ var block = ts.convertToFunctionBody(expression);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(ts.concatenate(block.statements, declarations)), block.statements));
+ }
+ return expression;
+ }
+ }
+ function transformFunctionBodyWorker(body, start) {
+ if (ts.isBlock(body)) {
+ return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
+ }
+ else {
+ startLexicalEnvironment();
+ var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
+ var declarations = endLexicalEnvironment();
+ return ts.updateBlock(visited, ts.setTextRange(ts.createNodeArray(ts.concatenate(visited.statements, declarations)), visited.statements));
+ }
+ }
+ function getPromiseConstructor(type) {
+ var typeName = type && ts.getEntityNameFromTypeNode(type);
+ if (typeName && ts.isEntityName(typeName)) {
+ var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
+ if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
+ || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
+ return typeName;
+ }
+ }
+ return undefined;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
+ enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
+ // We need to enable substitutions for call, property access, and element access
+ // if we need to rewrite super calls.
+ context.enableSubstitution(180 /* CallExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
+ // We need to be notified when entering and exiting declarations that bind super.
+ context.enableEmitNotification(228 /* ClassDeclaration */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(151 /* Constructor */);
+ }
+ }
+ /**
+ * Hook for node emit.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emit A callback used to emit the node in the printer.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ // If we need to support substitutions for `super` in an async method,
+ // we should track it here.
+ if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178 /* PropertyAccessExpression */:
+ return substitutePropertyAccessExpression(node);
+ case 179 /* ElementAccessExpression */:
+ return substituteElementAccessExpression(node);
+ case 180 /* CallExpression */:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
+ /*typeArguments*/ undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228 /* ClassDeclaration */
+ || kind === 151 /* Constructor */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), location);
+ }
+ }
+ }
+ ts.transformES2017 = transformES2017;
+ var awaiterHelper = {
+ name: "typescript:awaiter",
+ scoped: false,
+ priority: 5,
+ text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };"
+ };
+ function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
+ context.requestEmitHelper(awaiterHelper);
+ var generatorFunc = ts.createFunctionExpression(
+ /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */),
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ [],
+ /*type*/ undefined, body);
+ // Mark this node as originally an async function
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ return ts.createCall(ts.getHelperName("__awaiter"),
+ /*typeArguments*/ undefined, [
+ ts.createThis(),
+ hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
+ promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
+ generatorFunc
+ ]);
}
+ ts.asyncSuperHelper = {
+ name: "typescript:async-super",
+ scoped: true,
+ text: "\n const _super = name => super[name];\n "
+ };
+ ts.advancedAsyncSuperHelper = {
+ name: "typescript:advanced-async-super",
+ scoped: true,
+ text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);\n "
+ };
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/// <reference path="es2017.ts" />
/*@internal*/
var ts;
(function (ts) {
+ var ESNextSubstitutionFlags;
+ (function (ESNextSubstitutionFlags) {
+ /** Enables substitutions for async methods with `super` calls. */
+ ESNextSubstitutionFlags[ESNextSubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
+ })(ESNextSubstitutionFlags || (ESNextSubstitutionFlags = {}));
function transformESNext(context) {
- var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var resolver = context.getEmitResolver();
+ var compilerOptions = context.getCompilerOptions();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ var enabledSubstitutions;
+ var enclosingFunctionFlags;
+ var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
if (ts.isDeclarationFile(node)) {
@@ -47868,53 +51802,95 @@ var ts;
function visitorNoDestructuringValue(node) {
return visitorWorker(node, /*noDestructuringValue*/ true);
}
+ function visitorNoAsyncModifier(node) {
+ if (node.kind === 119 /* AsyncKeyword */) {
+ return undefined;
+ }
+ return node;
+ }
function visitorWorker(node, noDestructuringValue) {
if ((node.transformFlags & 8 /* ContainsESNext */) === 0) {
return node;
}
switch (node.kind) {
- case 176 /* ObjectLiteralExpression */:
+ case 190 /* AwaitExpression */:
+ return visitAwaitExpression(node);
+ case 196 /* YieldExpression */:
+ return visitYieldExpression(node);
+ case 221 /* LabeledStatement */:
+ return visitLabeledStatement(node);
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node, noDestructuringValue);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
- case 213 /* ForOfStatement */:
- return visitForOfStatement(node);
- case 211 /* ForStatement */:
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return visitVoidExpression(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return visitConstructorDeclaration(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return visitMethodDeclaration(node);
- case 151 /* GetAccessor */:
+ case 152 /* GetAccessor */:
return visitGetAccessorDeclaration(node);
- case 152 /* SetAccessor */:
+ case 153 /* SetAccessor */:
return visitSetAccessorDeclaration(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return visitArrowFunction(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return visitParameter(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return visitExpressionStatement(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitParenthesizedExpression(node, noDestructuringValue);
default:
return ts.visitEachChild(node, visitor, context);
}
}
+ function visitAwaitExpression(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(
+ /*asteriskToken*/ undefined, ts.createArrayLiteral([ts.createLiteral("await"), expression])),
+ /*location*/ node), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitYieldExpression(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ return ts.updateYield(node, node.asteriskToken, node.asteriskToken
+ ? createAsyncDelegatorHelper(context, expression, expression)
+ : ts.createArrayLiteral(expression
+ ? [ts.createLiteral("yield"), expression]
+ : [ts.createLiteral("yield")]));
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitLabeledStatement(node) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ var statement = ts.unwrapInnermostStatementOfLabel(node);
+ if (statement.kind === 215 /* ForOfStatement */ && statement.awaitModifier) {
+ return visitForOfStatement(statement, node);
+ }
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), node);
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
function chunkObjectLiteralElements(elements) {
var chunkObject;
var objects = [];
- for (var _i = 0, elements_3 = elements; _i < elements_3.length; _i++) {
- var e = elements_3[_i];
- if (e.kind === 259 /* SpreadAssignment */) {
+ for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
+ var e = elements_4[_i];
+ if (e.kind === 262 /* SpreadAssignment */) {
if (chunkObject) {
objects.push(ts.createObjectLiteral(chunkObject));
chunkObject = undefined;
@@ -47926,7 +51902,7 @@ var ts;
if (!chunkObject) {
chunkObject = [];
}
- if (e.kind === 257 /* PropertyAssignment */) {
+ if (e.kind === 260 /* PropertyAssignment */) {
var p = e;
chunkObject.push(ts.createPropertyAssignment(p.name, ts.visitNode(p.initializer, visitor, ts.isExpression)));
}
@@ -47948,7 +51924,7 @@ var ts;
// If the first element is a spread element, then the first argument to __assign is {}:
// { ...o, a, b, ...o2 } => __assign({}, o, {a, b}, o2)
var objects = chunkObjectLiteralElements(node.properties);
- if (objects.length && objects[0].kind !== 176 /* ObjectLiteralExpression */) {
+ if (objects.length && objects[0].kind !== 177 /* ObjectLiteralExpression */) {
objects.unshift(ts.createObjectLiteral());
}
return createAssignHelper(context, objects);
@@ -47998,41 +51974,101 @@ var ts;
*
* @param node A ForOfStatement.
*/
- function visitForOfStatement(node) {
- var leadingStatements;
- var temp;
- var initializer = ts.skipParentheses(node.initializer);
- if (initializer.transformFlags & 1048576 /* ContainsObjectRest */) {
- if (ts.isVariableDeclarationList(initializer)) {
- temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
- var firstDeclaration = ts.firstOrUndefined(initializer.declarations);
- var declarations = ts.flattenDestructuringBinding(firstDeclaration, visitor, context, 1 /* ObjectRest */, temp,
- /*doNotRecordTempVariablesInLine*/ false,
- /*skipInitializer*/ true);
- if (ts.some(declarations)) {
- var statement = ts.createVariableStatement(
- /*modifiers*/ undefined, ts.updateVariableDeclarationList(initializer, declarations),
- /*location*/ initializer);
- leadingStatements = ts.append(leadingStatements, statement);
- }
- }
- else if (ts.isAssignmentPattern(initializer)) {
- temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
- var expression = ts.flattenDestructuringAssignment(ts.aggregateTransformFlags(ts.createAssignment(initializer, temp, /*location*/ node.initializer)), visitor, context, 1 /* ObjectRest */);
- leadingStatements = ts.append(leadingStatements, ts.createStatement(expression, /*location*/ node.initializer));
- }
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ if (node.initializer.transformFlags & 1048576 /* ContainsObjectRest */) {
+ node = transformForOfStatementWithObjectRest(node);
}
- if (temp) {
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
- var block = ts.isBlock(statement)
- ? ts.updateBlock(statement, ts.createNodeArray(ts.concatenate(leadingStatements, statement.statements), statement.statements))
- : ts.createBlock(ts.append(leadingStatements, statement), statement, /*multiLine*/ true);
- return ts.updateForOf(node, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(temp, /*type*/ undefined, /*initializer*/ undefined, node.initializer)
- ], node.initializer, 1 /* Let */), expression, block);
+ if (node.awaitModifier) {
+ return transformForAwaitOfStatement(node, outermostLabeledStatement);
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ return ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement);
+ }
+ }
+ function transformForOfStatementWithObjectRest(node) {
+ var initializerWithoutParens = ts.skipParentheses(node.initializer);
+ if (ts.isVariableDeclarationList(initializerWithoutParens) || ts.isAssignmentPattern(initializerWithoutParens)) {
+ var bodyLocation = void 0;
+ var statementsLocation = void 0;
+ var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var statements = [ts.createForOfBindingStatement(initializerWithoutParens, temp)];
+ if (ts.isBlock(node.statement)) {
+ ts.addRange(statements, node.statement.statements);
+ bodyLocation = node.statement;
+ statementsLocation = node.statement.statements;
+ }
+ return ts.updateForOf(node, node.awaitModifier, ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(temp), node.initializer)
+ ], 1 /* Let */), node.initializer), node.expression, ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation));
+ }
+ return node;
+ }
+ function convertForOfStatementHead(node, boundValue) {
+ var binding = ts.createForOfBindingStatement(node.initializer, boundValue);
+ var bodyLocation;
+ var statementsLocation;
+ var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ if (ts.isBlock(statement)) {
+ ts.addRange(statements, statement.statements);
+ bodyLocation = statement;
+ statementsLocation = statement.statements;
+ }
+ else {
+ statements.push(statement);
+ }
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
+ }
+ function transformForAwaitOfStatement(node, outermostLabeledStatement) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var values = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
+ var next = ts.createYield(
+ /*asteriskToken*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, [])
+ ])
+ : ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []));
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, values), node.expression),
+ ts.createVariableDeclaration(result, /*type*/ undefined, next)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
+ /*incrementor*/ ts.createAssignment(result, next),
+ /*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"))),
+ /*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1 /* SingleLine */)), ts.createBlock([
+ ts.createTry(
+ /*tryBlock*/ ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createYield(
+ /*asteriskToken*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createArrayLiteral([
+ ts.createLiteral("await"),
+ ts.createFunctionCall(returnMethod, iterator, [])
+ ])
+ : ts.createFunctionCall(returnMethod, iterator, [])))), 1 /* SingleLine */)
+ ]),
+ /*catchClause*/ undefined,
+ /*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1 /* SingleLine */)
+ ]), 1 /* SingleLine */))
+ ]));
}
function visitParameter(node) {
if (node.transformFlags & 1048576 /* ContainsObjectRest */) {
@@ -48041,48 +52077,137 @@ var ts;
return ts.updateParameter(node,
/*decorators*/ undefined,
/*modifiers*/ undefined, node.dotDotDotToken, ts.getGeneratedNameForNode(node),
+ /*questionToken*/ undefined,
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
}
return ts.visitEachChild(node, visitor, context);
}
function visitConstructorDeclaration(node) {
- return ts.updateConstructor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateConstructor(node,
/*decorators*/ undefined, node.modifiers, ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitGetAccessorDeclaration(node) {
- return ts.updateGetAccessor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateGetAccessor(node,
/*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitSetAccessorDeclaration(node) {
- return ts.updateSetAccessor(node,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = 0 /* Normal */;
+ var updated = ts.updateSetAccessor(node,
/*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, visitor, context), transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitMethodDeclaration(node) {
- return ts.updateMethod(node,
- /*decorators*/ undefined, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName),
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateMethod(node,
+ /*decorators*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.isToken),
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, node.modifiers, node.name,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, node.modifiers,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateArrowFunction(node, node.modifiers,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
/*type*/ undefined, transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
}
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node, node.modifiers, node.name,
+ var savedEnclosingFunctionFlags = enclosingFunctionFlags;
+ enclosingFunctionFlags = ts.getFunctionFlags(node);
+ var updated = ts.updateFunctionExpression(node, enclosingFunctionFlags & 1 /* Generator */
+ ? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
+ : node.modifiers, enclosingFunctionFlags & 2 /* Async */
+ ? undefined
+ : node.asteriskToken, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node));
+ /*type*/ undefined, enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */
+ ? transformAsyncGeneratorFunctionBody(node)
+ : transformFunctionBody(node));
+ enclosingFunctionFlags = savedEnclosingFunctionFlags;
+ return updated;
+ }
+ function transformAsyncGeneratorFunctionBody(node) {
+ resumeLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
+ appendObjectRestAssignmentsIfNeeded(statements, node);
+ statements.push(ts.createReturn(createAsyncGeneratorHelper(context, ts.createFunctionExpression(
+ /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name),
+ /*typeParameters*/ undefined,
+ /*parameters*/ [],
+ /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))));
+ ts.addRange(statements, endLexicalEnvironment());
+ var block = ts.updateBlock(node.body, statements);
+ // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
+ // This step isn't needed if we eventually transform this to ES5.
+ if (languageVersion >= 2 /* ES2015 */) {
+ if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.advancedAsyncSuperHelper);
+ }
+ else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
+ enableSubstitutionForAsyncMethodsWithSuper();
+ ts.addEmitHelper(block, ts.asyncSuperHelper);
+ }
+ }
+ return block;
}
function transformFunctionBody(node) {
resumeLexicalEnvironment();
- var leadingStatements;
+ var statementOffset = 0;
+ var statements = [];
+ var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
+ if (ts.isBlock(body)) {
+ statementOffset = ts.addPrologue(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ }
+ ts.addRange(statements, appendObjectRestAssignmentsIfNeeded(/*statements*/ undefined, node));
+ var trailingStatements = endLexicalEnvironment();
+ if (statementOffset > 0 || ts.some(statements) || ts.some(trailingStatements)) {
+ var block = ts.convertToFunctionBody(body, /*multiLine*/ true);
+ ts.addRange(statements, block.statements.slice(statementOffset));
+ ts.addRange(statements, trailingStatements);
+ return ts.updateBlock(block, ts.setTextRange(ts.createNodeArray(statements), block.statements));
+ }
+ return body;
+ }
+ function appendObjectRestAssignmentsIfNeeded(statements, node) {
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
if (parameter.transformFlags & 1048576 /* ContainsObjectRest */) {
@@ -48094,17 +52219,116 @@ var ts;
var statement = ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList(declarations));
ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
- leadingStatements = ts.append(leadingStatements, statement);
+ statements = ts.append(statements, statement);
}
}
}
- var body = ts.visitNode(node.body, visitor, ts.isConciseBody);
- var trailingStatements = endLexicalEnvironment();
- if (ts.some(leadingStatements) || ts.some(trailingStatements)) {
- var block = ts.convertToFunctionBody(body, /*multiLine*/ true);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(ts.concatenate(leadingStatements, block.statements), trailingStatements), block.statements));
+ return statements;
+ }
+ function enableSubstitutionForAsyncMethodsWithSuper() {
+ if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
+ enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
+ // We need to enable substitutions for call, property access, and element access
+ // if we need to rewrite super calls.
+ context.enableSubstitution(180 /* CallExpression */);
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(179 /* ElementAccessExpression */);
+ // We need to be notified when entering and exiting declarations that bind super.
+ context.enableEmitNotification(228 /* ClassDeclaration */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(151 /* Constructor */);
+ }
+ }
+ /**
+ * Called by the printer just before a node is printed.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to be printed.
+ * @param emitCallback The callback used to emit the node.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ // If we need to support substitutions for `super` in an async method,
+ // we should track it here.
+ if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
+ var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
+ if (superContainerFlags !== enclosingSuperContainerFlags) {
+ var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
+ enclosingSuperContainerFlags = superContainerFlags;
+ previousOnEmitNode(hint, node, emitCallback);
+ enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;
+ return;
+ }
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint The context for the emitter.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {
+ return substituteExpression(node);
+ }
+ return node;
+ }
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 178 /* PropertyAccessExpression */:
+ return substitutePropertyAccessExpression(node);
+ case 179 /* ElementAccessExpression */:
+ return substituteElementAccessExpression(node);
+ case 180 /* CallExpression */:
+ return substituteCallExpression(node);
+ }
+ return node;
+ }
+ function substitutePropertyAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), node);
+ }
+ return node;
+ }
+ function substituteElementAccessExpression(node) {
+ if (node.expression.kind === 96 /* SuperKeyword */) {
+ return createSuperAccessInAsyncMethod(node.argumentExpression, node);
+ }
+ return node;
+ }
+ function substituteCallExpression(node) {
+ var expression = node.expression;
+ if (ts.isSuperProperty(expression)) {
+ var argumentExpression = ts.isPropertyAccessExpression(expression)
+ ? substitutePropertyAccessExpression(expression)
+ : substituteElementAccessExpression(expression);
+ return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
+ /*typeArguments*/ undefined, [
+ ts.createThis()
+ ].concat(node.arguments));
+ }
+ return node;
+ }
+ function isSuperContainer(node) {
+ var kind = node.kind;
+ return kind === 228 /* ClassDeclaration */
+ || kind === 151 /* Constructor */
+ || kind === 150 /* MethodDeclaration */
+ || kind === 152 /* GetAccessor */
+ || kind === 153 /* SetAccessor */;
+ }
+ function createSuperAccessInAsyncMethod(argumentExpression, location) {
+ if (enclosingSuperContainerFlags & 4096 /* AsyncMethodWithSuperBinding */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), "value"), location);
+ }
+ else {
+ return ts.setTextRange(ts.createCall(ts.createIdentifier("_super"),
+ /*typeArguments*/ undefined, [argumentExpression]), location);
}
- return body;
}
}
ts.transformESNext = transformESNext;
@@ -48115,11 +52339,51 @@ var ts;
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
};
function createAssignHelper(context, attributesSegments) {
+ if (context.getCompilerOptions().target >= 2 /* ES2015 */) {
+ return ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "assign"),
+ /*typeArguments*/ undefined, attributesSegments);
+ }
context.requestEmitHelper(assignHelper);
return ts.createCall(ts.getHelperName("__assign"),
/*typeArguments*/ undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var asyncGeneratorHelper = {
+ name: "typescript:asyncGenerator",
+ scoped: false,
+ text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), q = [], c, i;\n return i = { next: verb(\"next\"), \"throw\": verb(\"throw\"), \"return\": verb(\"return\") }, i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { return function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]), next(); }); }; }\n function next() { if (!c && q.length) resume((c = q.shift())[0], c[1]); }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(c[3], e); } }\n function step(r) { r.done ? settle(c[2], r) : Promise.resolve(r.value[1]).then(r.value[0] === \"yield\" ? _yield : r.value[0] === \"delegate\" ? delegate : fulfill, reject); }\n function _yield(value) { settle(c[2], { value: value, done: false }); }\n function delegate(r) { step(r.done ? r : { value: [\"yield\", r.value], done: false }); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { c = void 0, f(v), next(); }\n };\n "
+ };
+ function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(asyncGeneratorHelper);
+ // Mark this node as originally an async function
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ return ts.createCall(ts.getHelperName("__asyncGenerator"),
+ /*typeArguments*/ undefined, [
+ ts.createThis(),
+ ts.createIdentifier("arguments"),
+ generatorFunc
+ ]);
+ }
+ var asyncDelegator = {
+ name: "typescript:asyncDelegator",
+ scoped: false,
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i = { next: verb(\"next\"), \"throw\": verb(\"throw\", function (e) { throw e; }), \"return\": verb(\"return\", function (v) { return { value: v, done: true }; }) };\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return { value: [\"delegate\", (o[n] || f).call(o, v)], done: false }; }; }\n };\n "
+ };
+ function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(asyncDelegator);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
+ var asyncValues = {
+ name: "typescript:asyncValues",
+ scoped: false,
+ text: "\n var __asyncValues = (this && this.__asyncIterator) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator];\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\n };\n "
+ };
+ function createAsyncValuesHelper(context, expression, location) {
+ context.requestEmitHelper(asyncValues);
+ return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"),
+ /*typeArguments*/ undefined, [expression]), location);
+ }
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
@@ -48129,7 +52393,6 @@ var ts;
(function (ts) {
function transformJsx(context) {
var compilerOptions = context.getCompilerOptions();
- var currentSourceFile;
return transformSourceFile;
/**
* Transform JSX-specific syntax in a SourceFile.
@@ -48140,10 +52403,8 @@ var ts;
if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
var visited = ts.visitEachChild(node, visitor, context);
ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
return visited;
}
function visitor(node) {
@@ -48156,11 +52417,11 @@ var ts;
}
function visitorWorker(node) {
switch (node.kind) {
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitJsxElement(node, /*isChild*/ false);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return visitJsxSelfClosingElement(node, /*isChild*/ false);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return visitJsxExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -48170,11 +52431,11 @@ var ts;
switch (node.kind) {
case 10 /* JsxText */:
return visitJsxText(node);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return visitJsxExpression(node);
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return visitJsxElement(node, /*isChild*/ true);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return visitJsxSelfClosingElement(node, /*isChild*/ true);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -48190,7 +52451,7 @@ var ts;
function visitJsxOpeningLikeElement(node, children, isChild, location) {
var tagName = getTagName(node);
var objectProperties;
- var attrs = node.attributes;
+ var attrs = node.attributes.properties;
if (attrs.length === 0) {
// When there are no attributes, React wants "null"
objectProperties = ts.createNull();
@@ -48229,13 +52490,16 @@ var ts;
}
function transformJsxAttributeInitializer(node) {
if (node === undefined) {
- return ts.createLiteral(true);
+ return ts.createTrue();
}
else if (node.kind === 9 /* StringLiteral */) {
var decoded = tryDecodeEntities(node.text);
- return decoded ? ts.createLiteral(decoded, /*location*/ node) : node;
+ return decoded ? ts.setTextRange(ts.createLiteral(decoded), node) : node;
}
- else if (node.kind === 252 /* JsxExpression */) {
+ else if (node.kind === 255 /* JsxExpression */) {
+ if (node.expression === undefined) {
+ return ts.createTrue();
+ }
return visitJsxExpression(node);
}
else {
@@ -48243,54 +52507,61 @@ var ts;
}
}
function visitJsxText(node) {
- var text = ts.getTextOfNode(node, /*includeTrivia*/ true);
- var parts;
+ var fixed = fixupWhitespaceAndDecodeEntities(ts.getTextOfNode(node, /*includeTrivia*/ true));
+ return fixed === undefined ? undefined : ts.createLiteral(fixed);
+ }
+ /**
+ * JSX trims whitespace at the end and beginning of lines, except that the
+ * start/end of a tag is considered a start/end of a line only if that line is
+ * on the same line as the closing tag. See examples in
+ * tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx
+ * See also https://www.w3.org/TR/html4/struct/text.html#h-9.1 and https://www.w3.org/TR/CSS2/text.html#white-space-model
+ *
+ * An equivalent algorithm would be:
+ * - If there is only one line, return it.
+ * - If there is only whitespace (but multiple lines), return `undefined`.
+ * - Split the text into lines.
+ * - 'trimRight' the first line, 'trimLeft' the last line, 'trim' middle lines.
+ * - Decode entities on each line (individually).
+ * - Remove empty lines and join the rest with " ".
+ */
+ function fixupWhitespaceAndDecodeEntities(text) {
+ var acc;
+ // First non-whitespace character on this line.
var firstNonWhitespace = 0;
+ // Last non-whitespace character on this line.
var lastNonWhitespace = -1;
- // JSX trims whitespace at the end and beginning of lines, except that the
- // start/end of a tag is considered a start/end of a line only if that line is
- // on the same line as the closing tag. See examples in
- // tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx
+ // These initial values are special because the first line is:
+ // firstNonWhitespace = 0 to indicate that we want leading whitsepace,
+ // but lastNonWhitespace = -1 as a special flag to indicate that we *don't* include the line if it's all whitespace.
for (var i = 0; i < text.length; i++) {
var c = text.charCodeAt(i);
if (ts.isLineBreak(c)) {
- if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) {
- var part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1);
- if (!parts) {
- parts = [];
- }
- // We do not escape the string here as that is handled by the printer
- // when it emits the literal. We do, however, need to decode JSX entities.
- parts.push(ts.createLiteral(decodeEntities(part)));
+ // If we've seen any non-whitespace characters on this line, add the 'trim' of the line.
+ // (lastNonWhitespace === -1 is a special flag to detect whether the first line is all whitespace.)
+ if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {
+ acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));
}
+ // Reset firstNonWhitespace for the next line.
+ // Don't bother to reset lastNonWhitespace because we ignore it if firstNonWhitespace = -1.
firstNonWhitespace = -1;
}
- else if (!ts.isWhiteSpace(c)) {
+ else if (!ts.isWhiteSpaceSingleLine(c)) {
lastNonWhitespace = i;
if (firstNonWhitespace === -1) {
firstNonWhitespace = i;
}
}
}
- if (firstNonWhitespace !== -1) {
- var part = text.substr(firstNonWhitespace);
- if (!parts) {
- parts = [];
- }
- // We do not escape the string here as that is handled by the printer
- // when it emits the literal. We do, however, need to decode JSX entities.
- parts.push(ts.createLiteral(decodeEntities(part)));
- }
- if (parts) {
- return ts.reduceLeft(parts, aggregateJsxTextParts);
- }
- return undefined;
+ return firstNonWhitespace !== -1
+ ? addLineOfJsxText(acc, text.substr(firstNonWhitespace))
+ : acc;
}
- /**
- * Aggregates two expressions by interpolating them with a whitespace literal.
- */
- function aggregateJsxTextParts(left, right) {
- return ts.createAdd(ts.createAdd(left, ts.createLiteral(" ")), right);
+ function addLineOfJsxText(acc, trimmedLine) {
+ // We do not escape the string here as that is handled by the printer
+ // when it emits the literal. We do, however, need to decode JSX entities.
+ var decoded = decodeEntities(trimmedLine);
+ return acc === undefined ? decoded : acc + " " + decoded;
}
/**
* Replace entities like "&nbsp;", "&#123;", and "&#xDEADBEEF;" with the characters they encode.
@@ -48305,7 +52576,7 @@ var ts;
return String.fromCharCode(parseInt(hex, 16));
}
else {
- var ch = entities[word];
+ var ch = entities.get(word);
// If this is not a valid entity, then just use `match` (replace it with itself, i.e. don't replace)
return ch ? String.fromCharCode(ch) : match;
}
@@ -48317,16 +52588,16 @@ var ts;
return decoded === text ? undefined : decoded;
}
function getTagName(node) {
- if (node.kind === 246 /* JsxElement */) {
+ if (node.kind === 248 /* JsxElement */) {
return getTagName(node.openingElement);
}
else {
- var name_34 = node.tagName;
- if (ts.isIdentifier(name_34) && ts.isIntrinsicJsxName(name_34.text)) {
- return ts.createLiteral(name_34.text);
+ var name = node.tagName;
+ if (ts.isIdentifier(name) && ts.isIntrinsicJsxName(name.text)) {
+ return ts.createLiteral(name.text);
}
else {
- return ts.createExpressionFromEntityName(name_34);
+ return ts.createExpressionFromEntityName(name);
}
}
}
@@ -48349,7 +52620,7 @@ var ts;
}
}
ts.transformJsx = transformJsx;
- var entities = ts.createMap({
+ var entities = ts.createMapFromTemplate({
"quot": 0x0022,
"amp": 0x0026,
"apos": 0x0027,
@@ -48610,375 +52881,6 @@ var ts;
/*@internal*/
var ts;
(function (ts) {
- var ES2017SubstitutionFlags;
- (function (ES2017SubstitutionFlags) {
- /** Enables substitutions for async methods with `super` calls. */
- ES2017SubstitutionFlags[ES2017SubstitutionFlags["AsyncMethodsWithSuper"] = 1] = "AsyncMethodsWithSuper";
- })(ES2017SubstitutionFlags || (ES2017SubstitutionFlags = {}));
- function transformES2017(context) {
- var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
- var resolver = context.getEmitResolver();
- var compilerOptions = context.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- // These variables contain state that changes as we descend into the tree.
- var currentSourceFile;
- /**
- * Keeps track of whether expression substitution has been enabled for specific edge cases.
- * They are persisted between each SourceFile transformation and should not be reset.
- */
- var enabledSubstitutions;
- /**
- * This keeps track of containers where `super` is valid, for use with
- * just-in-time substitution for `super` expressions inside of async methods.
- */
- var currentSuperContainer;
- // Save the previous transformation hooks.
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- // Set new transformation hooks.
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
- }
- currentSourceFile = node;
- var visited = ts.visitEachChild(node, visitor, context);
- ts.addEmitHelpers(visited, context.readEmitHelpers());
- currentSourceFile = undefined;
- return visited;
- }
- function visitor(node) {
- if ((node.transformFlags & 16 /* ContainsES2017 */) === 0) {
- return node;
- }
- switch (node.kind) {
- case 119 /* AsyncKeyword */:
- // ES2017 async modifier should be elided for targets < ES2017
- return undefined;
- case 189 /* AwaitExpression */:
- // ES2017 'await' expressions must be transformed for targets < ES2017.
- return visitAwaitExpression(node);
- case 149 /* MethodDeclaration */:
- // ES2017 method declarations may be 'async'
- return visitMethodDeclaration(node);
- case 225 /* FunctionDeclaration */:
- // ES2017 function declarations may be 'async'
- return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
- // ES2017 function expressions may be 'async'
- return visitFunctionExpression(node);
- case 185 /* ArrowFunction */:
- // ES2017 arrow functions may be 'async'
- return visitArrowFunction(node);
- default:
- return ts.visitEachChild(node, visitor, context);
- }
- }
- /**
- * Visits an AwaitExpression node.
- *
- * This function will be called any time a ES2017 await expression is encountered.
- *
- * @param node The node to visit.
- */
- function visitAwaitExpression(node) {
- return ts.setOriginalNode(ts.createYield(
- /*asteriskToken*/ undefined, ts.visitNode(node.expression, visitor, ts.isExpression),
- /*location*/ node), node);
- }
- /**
- * Visits a MethodDeclaration node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked as async
- *
- * @param node The node to visit.
- */
- function visitMethodDeclaration(node) {
- return ts.updateMethod(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits a FunctionDeclaration node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits a FunctionExpression node.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitFunctionExpression(node) {
- if (ts.nodeIsMissing(node.body)) {
- return ts.createOmittedExpression();
- }
- return ts.updateFunctionExpression(node,
- /*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- /**
- * Visits an ArrowFunction.
- *
- * This function will be called when one of the following conditions are met:
- * - The node is marked async
- *
- * @param node The node to visit.
- */
- function visitArrowFunction(node) {
- return ts.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier),
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, ts.isAsyncFunctionLike(node)
- ? transformAsyncFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
- }
- function transformAsyncFunctionBody(node) {
- resumeLexicalEnvironment();
- var original = ts.getOriginalNode(node, ts.isFunctionLike);
- var nodeType = original.type;
- var promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : undefined;
- var isArrowFunction = node.kind === 185 /* ArrowFunction */;
- var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0;
- // An async function is emit as an outer function that calls an inner
- // generator function. To preserve lexical bindings, we pass the current
- // `this` and `arguments` objects to `__awaiter`. The generator function
- // passed to `__awaiter` is executed inside of the callback to the
- // promise constructor.
- if (!isArrowFunction) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.body.statements, /*ensureUseStrict*/ false, visitor);
- statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body, statementOffset))));
- ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(statements, /*location*/ node.body, /*multiLine*/ true);
- // Minor optimization, emit `_super` helper to capture `super` access in an arrow.
- // This step isn't needed if we eventually transform this to ES5.
- if (languageVersion >= 2 /* ES2015 */) {
- if (resolver.getNodeCheckFlags(node) & 4096 /* AsyncMethodWithSuperBinding */) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, advancedAsyncSuperHelper);
- }
- else if (resolver.getNodeCheckFlags(node) & 2048 /* AsyncMethodWithSuper */) {
- enableSubstitutionForAsyncMethodsWithSuper();
- ts.addEmitHelper(block, asyncSuperHelper);
- }
- }
- return block;
- }
- else {
- var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformFunctionBodyWorker(node.body));
- var declarations = endLexicalEnvironment();
- if (ts.some(declarations)) {
- var block = ts.convertToFunctionBody(expression);
- return ts.updateBlock(block, ts.createNodeArray(ts.concatenate(block.statements, declarations), block.statements));
- }
- return expression;
- }
- }
- function transformFunctionBodyWorker(body, start) {
- if (ts.isBlock(body)) {
- return ts.updateBlock(body, ts.visitLexicalEnvironment(body.statements, visitor, context, start));
- }
- else {
- startLexicalEnvironment();
- var visited = ts.convertToFunctionBody(ts.visitNode(body, visitor, ts.isConciseBody));
- var declarations = endLexicalEnvironment();
- return ts.updateBlock(visited, ts.createNodeArray(ts.concatenate(visited.statements, declarations), visited.statements));
- }
- }
- function getPromiseConstructor(type) {
- var typeName = type && ts.getEntityNameFromTypeNode(type);
- if (typeName && ts.isEntityName(typeName)) {
- var serializationKind = resolver.getTypeReferenceSerializationKind(typeName);
- if (serializationKind === ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue
- || serializationKind === ts.TypeReferenceSerializationKind.Unknown) {
- return typeName;
- }
- }
- return undefined;
- }
- function enableSubstitutionForAsyncMethodsWithSuper() {
- if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {
- enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;
- // We need to enable substitutions for call, property access, and element access
- // if we need to rewrite super calls.
- context.enableSubstitution(179 /* CallExpression */);
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(178 /* ElementAccessExpression */);
- // We need to be notified when entering and exiting declarations that bind super.
- context.enableEmitNotification(226 /* ClassDeclaration */);
- context.enableEmitNotification(149 /* MethodDeclaration */);
- context.enableEmitNotification(151 /* GetAccessor */);
- context.enableEmitNotification(152 /* SetAccessor */);
- context.enableEmitNotification(150 /* Constructor */);
- }
- }
- function substituteExpression(node) {
- switch (node.kind) {
- case 177 /* PropertyAccessExpression */:
- return substitutePropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
- return substituteElementAccessExpression(node);
- case 179 /* CallExpression */:
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) {
- return substituteCallExpression(node);
- }
- break;
- }
- return node;
- }
- function substitutePropertyAccessExpression(node) {
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && node.expression.kind === 96 /* SuperKeyword */) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(ts.createLiteral(node.name.text), flags, node);
- }
- }
- return node;
- }
- function substituteElementAccessExpression(node) {
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && node.expression.kind === 96 /* SuperKeyword */) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- return createSuperAccessInAsyncMethod(node.argumentExpression, flags, node);
- }
- }
- return node;
- }
- function substituteCallExpression(node) {
- var expression = node.expression;
- if (ts.isSuperProperty(expression)) {
- var flags = getSuperContainerAsyncMethodFlags();
- if (flags) {
- var argumentExpression = ts.isPropertyAccessExpression(expression)
- ? substitutePropertyAccessExpression(expression)
- : substituteElementAccessExpression(expression);
- return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"),
- /*typeArguments*/ undefined, [
- ts.createThis()
- ].concat(node.arguments));
- }
- }
- return node;
- }
- function isSuperContainer(node) {
- var kind = node.kind;
- return kind === 226 /* ClassDeclaration */
- || kind === 150 /* Constructor */
- || kind === 149 /* MethodDeclaration */
- || kind === 151 /* GetAccessor */
- || kind === 152 /* SetAccessor */;
- }
- /**
- * Hook for node emit.
- *
- * @param node The node to emit.
- * @param emit A callback used to emit the node in the printer.
- */
- function onEmitNode(emitContext, node, emitCallback) {
- // If we need to support substitutions for `super` in an async method,
- // we should track it here.
- if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
- var savedCurrentSuperContainer = currentSuperContainer;
- currentSuperContainer = node;
- previousOnEmitNode(emitContext, node, emitCallback);
- currentSuperContainer = savedCurrentSuperContainer;
- }
- else {
- previousOnEmitNode(emitContext, node, emitCallback);
- }
- }
- /**
- * Hooks node substitutions.
- *
- * @param node The node to substitute.
- * @param isExpression A value indicating whether the node is to be used in an expression
- * position.
- */
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
- return substituteExpression(node);
- }
- return node;
- }
- function createSuperAccessInAsyncMethod(argumentExpression, flags, location) {
- if (flags & 4096 /* AsyncMethodWithSuperBinding */) {
- return ts.createPropertyAccess(ts.createCall(ts.createIdentifier("_super"),
- /*typeArguments*/ undefined, [argumentExpression]), "value", location);
- }
- else {
- return ts.createCall(ts.createIdentifier("_super"),
- /*typeArguments*/ undefined, [argumentExpression], location);
- }
- }
- function getSuperContainerAsyncMethodFlags() {
- return currentSuperContainer !== undefined
- && resolver.getNodeCheckFlags(currentSuperContainer) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);
- }
- }
- ts.transformES2017 = transformES2017;
- function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
- context.requestEmitHelper(awaiterHelper);
- var generatorFunc = ts.createFunctionExpression(
- /*modifiers*/ undefined, ts.createToken(38 /* AsteriskToken */),
- /*name*/ undefined,
- /*typeParameters*/ undefined,
- /*parameters*/ [],
- /*type*/ undefined, body);
- // Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
- return ts.createCall(ts.getHelperName("__awaiter"),
- /*typeArguments*/ undefined, [
- ts.createThis(),
- hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
- promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(),
- generatorFunc
- ]);
- }
- var awaiterHelper = {
- name: "typescript:awaiter",
- scoped: false,
- priority: 5,
- text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments)).next());\n });\n };"
- };
- var asyncSuperHelper = {
- name: "typescript:async-super",
- scoped: true,
- text: "\n const _super = name => super[name];"
- };
- var advancedAsyncSuperHelper = {
- name: "typescript:advanced-async-super",
- scoped: true,
- text: "\n const _super = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"
- };
-})(ts || (ts = {}));
-/// <reference path="../factory.ts" />
-/// <reference path="../visitor.ts" />
-/*@internal*/
-var ts;
-(function (ts) {
function transformES2016(context) {
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
@@ -48993,7 +52895,7 @@ var ts;
return node;
}
switch (node.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -49018,25 +52920,21 @@ var ts;
// Transforms `a[x] **= b` into `(_a = a)[_x = x] = Math.pow(_a[_x], b)`
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
var argumentExpressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createElementAccess(ts.createAssignment(expressionTemp, left.expression, /*location*/ left.expression), ts.createAssignment(argumentExpressionTemp, left.argumentExpression, /*location*/ left.argumentExpression),
- /*location*/ left);
- value = ts.createElementAccess(expressionTemp, argumentExpressionTemp,
- /*location*/ left);
+ target = ts.setTextRange(ts.createElementAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), ts.setTextRange(ts.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)), left);
+ value = ts.setTextRange(ts.createElementAccess(expressionTemp, argumentExpressionTemp), left);
}
else if (ts.isPropertyAccessExpression(left)) {
// Transforms `a.x **= b` into `(_a = a).x = Math.pow(_a.x, b)`
var expressionTemp = ts.createTempVariable(hoistVariableDeclaration);
- target = ts.createPropertyAccess(ts.createAssignment(expressionTemp, left.expression, /*location*/ left.expression), left.name,
- /*location*/ left);
- value = ts.createPropertyAccess(expressionTemp, left.name,
- /*location*/ left);
+ target = ts.setTextRange(ts.createPropertyAccess(ts.setTextRange(ts.createAssignment(expressionTemp, left.expression), left.expression), left.name), left);
+ value = ts.setTextRange(ts.createPropertyAccess(expressionTemp, left.name), left);
}
else {
// Transforms `a **= b` into `a = Math.pow(a, b)`
target = left;
value = left;
}
- return ts.createAssignment(target, ts.createMathPow(value, right, /*location*/ node), /*location*/ node);
+ return ts.setTextRange(ts.createAssignment(target, ts.createMathPow(value, right, /*location*/ node)), node);
}
function visitExponentiationExpression(node) {
// Transforms `a ** b` into `Math.pow(a, b)`
@@ -49049,6 +52947,7 @@ var ts;
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/// <reference path="./destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
@@ -49094,8 +52993,85 @@ var ts;
*/
SuperCaptureResult[SuperCaptureResult["ReplaceWithReturn"] = 2] = "ReplaceWithReturn";
})(SuperCaptureResult || (SuperCaptureResult = {}));
+ // Facts we track as we traverse the tree
+ var HierarchyFacts;
+ (function (HierarchyFacts) {
+ HierarchyFacts[HierarchyFacts["None"] = 0] = "None";
+ //
+ // Ancestor facts
+ //
+ HierarchyFacts[HierarchyFacts["Function"] = 1] = "Function";
+ HierarchyFacts[HierarchyFacts["ArrowFunction"] = 2] = "ArrowFunction";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBody"] = 4] = "AsyncFunctionBody";
+ HierarchyFacts[HierarchyFacts["NonStaticClassElement"] = 8] = "NonStaticClassElement";
+ HierarchyFacts[HierarchyFacts["CapturesThis"] = 16] = "CapturesThis";
+ HierarchyFacts[HierarchyFacts["ExportedVariableStatement"] = 32] = "ExportedVariableStatement";
+ HierarchyFacts[HierarchyFacts["TopLevel"] = 64] = "TopLevel";
+ HierarchyFacts[HierarchyFacts["Block"] = 128] = "Block";
+ HierarchyFacts[HierarchyFacts["IterationStatement"] = 256] = "IterationStatement";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlock"] = 512] = "IterationStatementBlock";
+ HierarchyFacts[HierarchyFacts["ForStatement"] = 1024] = "ForStatement";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement";
+ HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName";
+ // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below.
+ //
+ // Ancestor masks
+ //
+ HierarchyFacts[HierarchyFacts["AncestorFactsMask"] = 16383] = "AncestorFactsMask";
+ // We are always in *some* kind of block scope, but only specific block-scope containers are
+ // top-level or Blocks.
+ HierarchyFacts[HierarchyFacts["BlockScopeIncludes"] = 0] = "BlockScopeIncludes";
+ HierarchyFacts[HierarchyFacts["BlockScopeExcludes"] = 4032] = "BlockScopeExcludes";
+ // A source file is a top-level block scope.
+ HierarchyFacts[HierarchyFacts["SourceFileIncludes"] = 64] = "SourceFileIncludes";
+ HierarchyFacts[HierarchyFacts["SourceFileExcludes"] = 3968] = "SourceFileExcludes";
+ // Functions, methods, and accessors are both new lexical scopes and new block scopes.
+ HierarchyFacts[HierarchyFacts["FunctionIncludes"] = 65] = "FunctionIncludes";
+ HierarchyFacts[HierarchyFacts["FunctionExcludes"] = 16286] = "FunctionExcludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyIncludes"] = 69] = "AsyncFunctionBodyIncludes";
+ HierarchyFacts[HierarchyFacts["AsyncFunctionBodyExcludes"] = 16278] = "AsyncFunctionBodyExcludes";
+ // Arrow functions are lexically scoped to their container, but are new block scopes.
+ HierarchyFacts[HierarchyFacts["ArrowFunctionIncludes"] = 66] = "ArrowFunctionIncludes";
+ HierarchyFacts[HierarchyFacts["ArrowFunctionExcludes"] = 16256] = "ArrowFunctionExcludes";
+ // Constructors are both new lexical scopes and new block scopes. Constructors are also
+ // always considered non-static members of a class.
+ HierarchyFacts[HierarchyFacts["ConstructorIncludes"] = 73] = "ConstructorIncludes";
+ HierarchyFacts[HierarchyFacts["ConstructorExcludes"] = 16278] = "ConstructorExcludes";
+ // 'do' and 'while' statements are not block scopes. We track that the subtree is contained
+ // within an IterationStatement to indicate whether the embedded statement is an
+ // IterationStatementBlock.
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementIncludes"] = 256] = "DoOrWhileStatementIncludes";
+ HierarchyFacts[HierarchyFacts["DoOrWhileStatementExcludes"] = 0] = "DoOrWhileStatementExcludes";
+ // 'for' statements are new block scopes and have special handling for 'let' declarations.
+ HierarchyFacts[HierarchyFacts["ForStatementIncludes"] = 1280] = "ForStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForStatementExcludes"] = 3008] = "ForStatementExcludes";
+ // 'for-in' and 'for-of' statements are new block scopes and have special handling for
+ // 'let' declarations.
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementIncludes"] = 2304] = "ForInOrForOfStatementIncludes";
+ HierarchyFacts[HierarchyFacts["ForInOrForOfStatementExcludes"] = 1984] = "ForInOrForOfStatementExcludes";
+ // Blocks (other than function bodies) are new block scopes.
+ HierarchyFacts[HierarchyFacts["BlockIncludes"] = 128] = "BlockIncludes";
+ HierarchyFacts[HierarchyFacts["BlockExcludes"] = 3904] = "BlockExcludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockIncludes"] = 512] = "IterationStatementBlockIncludes";
+ HierarchyFacts[HierarchyFacts["IterationStatementBlockExcludes"] = 4032] = "IterationStatementBlockExcludes";
+ // Computed property names track subtree flags differently than their containing members.
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameIncludes"] = 8192] = "ComputedPropertyNameIncludes";
+ HierarchyFacts[HierarchyFacts["ComputedPropertyNameExcludes"] = 0] = "ComputedPropertyNameExcludes";
+ //
+ // Subtree facts
+ //
+ HierarchyFacts[HierarchyFacts["NewTarget"] = 16384] = "NewTarget";
+ HierarchyFacts[HierarchyFacts["NewTargetInComputedPropertyName"] = 32768] = "NewTargetInComputedPropertyName";
+ //
+ // Subtree masks
+ //
+ HierarchyFacts[HierarchyFacts["SubtreeFactsMask"] = -16384] = "SubtreeFactsMask";
+ HierarchyFacts[HierarchyFacts["PropagateNewTargetMask"] = 49152] = "PropagateNewTargetMask";
+ })(HierarchyFacts || (HierarchyFacts = {}));
function transformES2015(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
+ var compilerOptions = context.getCompilerOptions();
var resolver = context.getEmitResolver();
var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
@@ -49103,15 +53079,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
var currentSourceFile;
var currentText;
- var currentParent;
- var currentNode;
- var enclosingVariableStatement;
- var enclosingBlockScopeContainer;
- var enclosingBlockScopeContainerParent;
- var enclosingFunction;
- var enclosingNonArrowFunction;
- var enclosingNonAsyncFunctionBody;
- var isInConstructorWithCapturedSuper;
+ var hierarchyFacts;
/**
* Used to track if we are emitting body of the converted loop
*/
@@ -49129,257 +53097,221 @@ var ts;
}
currentSourceFile = node;
currentText = node.text;
- var visited = saveStateAndInvoke(node, visitSourceFile);
+ var visited = visitSourceFile(node);
ts.addEmitHelpers(visited, context.readEmitHelpers());
currentSourceFile = undefined;
currentText = undefined;
+ hierarchyFacts = 0 /* None */;
return visited;
}
- function visitor(node) {
- return saveStateAndInvoke(node, dispatcher);
- }
- function dispatcher(node) {
- return convertedLoopState
- ? visitorForConvertedLoopWorker(node)
- : visitorWorker(node);
- }
- function saveStateAndInvoke(node, f) {
- var savedEnclosingFunction = enclosingFunction;
- var savedEnclosingNonArrowFunction = enclosingNonArrowFunction;
- var savedEnclosingNonAsyncFunctionBody = enclosingNonAsyncFunctionBody;
- var savedEnclosingBlockScopeContainer = enclosingBlockScopeContainer;
- var savedEnclosingBlockScopeContainerParent = enclosingBlockScopeContainerParent;
- var savedEnclosingVariableStatement = enclosingVariableStatement;
- var savedCurrentParent = currentParent;
- var savedCurrentNode = currentNode;
- var savedConvertedLoopState = convertedLoopState;
- var savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper;
- if (ts.nodeStartsNewLexicalEnvironment(node)) {
- // don't treat content of nodes that start new lexical environment as part of converted loop copy or constructor body
- isInConstructorWithCapturedSuper = false;
- convertedLoopState = undefined;
- }
- onBeforeVisitNode(node);
- var visited = f(node);
- isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper;
- convertedLoopState = savedConvertedLoopState;
- enclosingFunction = savedEnclosingFunction;
- enclosingNonArrowFunction = savedEnclosingNonArrowFunction;
- enclosingNonAsyncFunctionBody = savedEnclosingNonAsyncFunctionBody;
- enclosingBlockScopeContainer = savedEnclosingBlockScopeContainer;
- enclosingBlockScopeContainerParent = savedEnclosingBlockScopeContainerParent;
- enclosingVariableStatement = savedEnclosingVariableStatement;
- currentParent = savedCurrentParent;
- currentNode = savedCurrentNode;
- return visited;
- }
- function onBeforeVisitNode(node) {
- if (currentNode) {
- if (ts.isBlockScope(currentNode, currentParent)) {
- enclosingBlockScopeContainer = currentNode;
- enclosingBlockScopeContainerParent = currentParent;
- }
- if (ts.isFunctionLike(currentNode)) {
- enclosingFunction = currentNode;
- if (currentNode.kind !== 185 /* ArrowFunction */) {
- enclosingNonArrowFunction = currentNode;
- if (!(ts.getEmitFlags(currentNode) & 131072 /* AsyncFunctionBody */)) {
- enclosingNonAsyncFunctionBody = currentNode;
- }
- }
- }
- // keep track of the enclosing variable statement when in the context of
- // variable statements, variable declarations, binding elements, and binding
- // patterns.
- switch (currentNode.kind) {
- case 205 /* VariableStatement */:
- enclosingVariableStatement = currentNode;
- break;
- case 224 /* VariableDeclarationList */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
- break;
- default:
- enclosingVariableStatement = undefined;
- }
- }
- currentParent = currentNode;
- currentNode = node;
+ /**
+ * Sets the `HierarchyFacts` for this node prior to visiting this node's subtree, returning the facts set prior to modification.
+ * @param excludeFacts The existing `HierarchyFacts` to reset before visiting the subtree.
+ * @param includeFacts The new `HierarchyFacts` to set before visiting the subtree.
+ */
+ function enterSubtree(excludeFacts, includeFacts) {
+ var ancestorFacts = hierarchyFacts;
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383 /* AncestorFactsMask */;
+ return ancestorFacts;
}
- function returnCapturedThis(node) {
- return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
+ /**
+ * Restores the `HierarchyFacts` for this node's ancestor after visiting this node's
+ * subtree, propagating specific facts from the subtree.
+ * @param ancestorFacts The `HierarchyFacts` of the ancestor to restore after visiting the subtree.
+ * @param excludeFacts The existing `HierarchyFacts` of the subtree that should not be propagated.
+ * @param includeFacts The new `HierarchyFacts` of the subtree that should be propagated.
+ */
+ function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
+ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 /* SubtreeFactsMask */ | ancestorFacts;
}
function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
- return isInConstructorWithCapturedSuper && node.kind === 216 /* ReturnStatement */ && !node.expression;
+ return hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */
+ && node.kind === 218 /* ReturnStatement */
+ && !node.expression;
}
- function shouldCheckNode(node) {
- return (node.transformFlags & 64 /* ES2015 */) !== 0 ||
- node.kind === 219 /* LabeledStatement */ ||
- (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
+ function shouldVisitNode(node) {
+ return (node.transformFlags & 128 /* ContainsES2015 */) !== 0
+ || convertedLoopState !== undefined
+ || (hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ && ts.isStatement(node))
+ || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
}
- function visitorWorker(node) {
- if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
- return returnCapturedThis(node);
- }
- else if (shouldCheckNode(node)) {
+ function visitor(node) {
+ if (shouldVisitNode(node)) {
return visitJavaScript(node);
}
- else if (node.transformFlags & 128 /* ContainsES2015 */ || (isInConstructorWithCapturedSuper && !ts.isExpression(node))) {
- // we want to dive in this branch either if node has children with ES2015 specific syntax
- // or we are inside constructor that captures result of the super call so all returns without expression should be
- // rewritten. Note: we skip expressions since returns should never appear there
- return ts.visitEachChild(node, visitor, context);
- }
else {
return node;
}
}
- function visitorForConvertedLoopWorker(node) {
- var result;
- if (shouldCheckNode(node)) {
- result = visitJavaScript(node);
- }
- else {
- result = visitNodesInConvertedLoop(node);
+ function functionBodyVisitor(node) {
+ if (shouldVisitNode(node)) {
+ return visitBlock(node, /*isFunctionBody*/ true);
}
- return result;
+ return node;
}
- function visitNodesInConvertedLoop(node) {
- switch (node.kind) {
- case 216 /* ReturnStatement */:
- node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node;
- return visitReturnStatement(node);
- case 205 /* VariableStatement */:
- return visitVariableStatement(node);
- case 218 /* SwitchStatement */:
- return visitSwitchStatement(node);
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
- return visitBreakOrContinueStatement(node);
- case 98 /* ThisKeyword */:
- return visitThisKeyword(node);
- case 70 /* Identifier */:
- return visitIdentifier(node);
- default:
- return ts.visitEachChild(node, visitor, context);
+ function callExpressionVisitor(node) {
+ if (node.kind === 96 /* SuperKeyword */) {
+ return visitSuperKeyword(/*isExpressionOfCall*/ true);
}
+ return visitor(node);
}
function visitJavaScript(node) {
switch (node.kind) {
case 114 /* StaticKeyword */:
return undefined; // elide static keyword
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return visitClassExpression(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return visitParameter(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return visitArrowFunction(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return visitVariableDeclaration(node);
case 70 /* Identifier */:
return visitIdentifier(node);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return visitVariableDeclarationList(node);
- case 219 /* LabeledStatement */:
+ case 220 /* SwitchStatement */:
+ return visitSwitchStatement(node);
+ case 234 /* CaseBlock */:
+ return visitCaseBlock(node);
+ case 206 /* Block */:
+ return visitBlock(node, /*isFunctionBody*/ false);
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
+ return visitBreakOrContinueStatement(node);
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
- case 209 /* DoStatement */:
- return visitDoStatement(node);
- case 210 /* WhileStatement */:
- return visitWhileStatement(node);
- case 211 /* ForStatement */:
- return visitForStatement(node);
- case 212 /* ForInStatement */:
- return visitForInStatement(node);
- case 213 /* ForOfStatement */:
- return visitForOfStatement(node);
- case 207 /* ExpressionStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return visitDoOrWhileStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 213 /* ForStatement */:
+ return visitForStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 214 /* ForInStatement */:
+ return visitForInStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, /*outermostLabeledStatement*/ undefined);
+ case 209 /* ExpressionStatement */:
return visitExpressionStatement(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitCatchClause(node);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return visitShorthandPropertyAssignment(node);
- case 175 /* ArrayLiteralExpression */:
+ case 143 /* ComputedPropertyName */:
+ return visitComputedPropertyName(node);
+ case 176 /* ArrayLiteralExpression */:
return visitArrayLiteralExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return visitParenthesizedExpression(node, /*needsDestructuringValue*/ true);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node, /*needsDestructuringValue*/ true);
case 12 /* NoSubstitutionTemplateLiteral */:
case 13 /* TemplateHead */:
case 14 /* TemplateMiddle */:
case 15 /* TemplateTail */:
return visitTemplateLiteral(node);
- case 181 /* TaggedTemplateExpression */:
+ case 9 /* StringLiteral */:
+ return visitStringLiteral(node);
+ case 8 /* NumericLiteral */:
+ return visitNumericLiteral(node);
+ case 182 /* TaggedTemplateExpression */:
return visitTaggedTemplateExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return visitTemplateExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitYieldExpression(node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return visitSpreadElement(node);
case 96 /* SuperKeyword */:
- return visitSuperKeyword();
- case 195 /* YieldExpression */:
- // `yield` will be handled by a generators transform.
- return ts.visitEachChild(node, visitor, context);
- case 149 /* MethodDeclaration */:
+ return visitSuperKeyword(/*isExpressionOfCall*/ false);
+ case 98 /* ThisKeyword */:
+ return visitThisKeyword(node);
+ case 203 /* MetaProperty */:
+ return visitMetaProperty(node);
+ case 150 /* MethodDeclaration */:
return visitMethodDeclaration(node);
- case 205 /* VariableStatement */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return visitAccessorDeclaration(node);
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
+ case 218 /* ReturnStatement */:
+ return visitReturnStatement(node);
default:
- ts.Debug.failBadSyntaxKind(node);
return ts.visitEachChild(node, visitor, context);
}
}
function visitSourceFile(node) {
+ var ancestorFacts = enterSubtree(3968 /* SourceFileExcludes */, 64 /* SourceFileIncludes */);
var statements = [];
startLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ false, visitor);
+ var statementOffset = ts.addStandardPrologue(statements, node.statements, /*ensureUseStrict*/ false);
addCaptureThisForNodeIfNeeded(statements, node);
+ statementOffset = ts.addCustomPrologue(statements, node.statements, statementOffset, visitor);
ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
ts.addRange(statements, endLexicalEnvironment());
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
function visitSwitchStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
- // for switch statement allow only non-labeled break
- convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */;
- var result = ts.visitEachChild(node, visitor, context);
- convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
- return result;
+ if (convertedLoopState !== undefined) {
+ var savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
+ // for switch statement allow only non-labeled break
+ convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */;
+ var result = ts.visitEachChild(node, visitor, context);
+ convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;
+ return result;
+ }
+ return ts.visitEachChild(node, visitor, context);
+ }
+ function visitCaseBlock(node) {
+ var ancestorFacts = enterSubtree(4032 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
+ function returnCapturedThis(node) {
+ return ts.setOriginalNode(ts.createReturn(ts.createIdentifier("_this")), node);
}
function visitReturnStatement(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- convertedLoopState.nonLocalJumps |= 8 /* Return */;
- return ts.createReturn(ts.createObjectLiteral([
- ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
- ? ts.visitNode(node.expression, visitor, ts.isExpression)
- : ts.createVoidZero())
- ]));
+ if (convertedLoopState) {
+ convertedLoopState.nonLocalJumps |= 8 /* Return */;
+ if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ node = returnCapturedThis(node);
+ }
+ return ts.createReturn(ts.createObjectLiteral([
+ ts.createPropertyAssignment(ts.createIdentifier("value"), node.expression
+ ? ts.visitNode(node.expression, visitor, ts.isExpression)
+ : ts.createVoidZero())
+ ]));
+ }
+ else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {
+ return returnCapturedThis(node);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function visitThisKeyword(node) {
- ts.Debug.assert(convertedLoopState !== undefined);
- if (enclosingFunction && enclosingFunction.kind === 185 /* ArrowFunction */) {
- // if the enclosing function is an ArrowFunction is then we use the captured 'this' keyword.
- convertedLoopState.containsLexicalThis = true;
- return node;
+ if (convertedLoopState) {
+ if (hierarchyFacts & 2 /* ArrowFunction */) {
+ // if the enclosing function is an ArrowFunction then we use the captured 'this' keyword.
+ convertedLoopState.containsLexicalThis = true;
+ return node;
+ }
+ return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
}
- return convertedLoopState.thisName || (convertedLoopState.thisName = ts.createUniqueName("this"));
+ return node;
}
function visitIdentifier(node) {
if (!convertedLoopState) {
@@ -49388,7 +53320,7 @@ var ts;
if (ts.isGeneratedIdentifier(node)) {
return node;
}
- if (node.text !== "arguments" && !resolver.isArgumentsLocalBinding(node)) {
+ if (node.text !== "arguments" || !resolver.isArgumentsLocalBinding(node)) {
return node;
}
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = ts.createUniqueName("arguments"));
@@ -49399,13 +53331,13 @@ var ts;
// it is possible if either
// - break/continue is labeled and label is located inside the converted loop
// - break/continue is non-labeled and located in non-converted loop/switch statement
- var jump = node.kind === 215 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */;
- var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||
+ var jump = node.kind === 217 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */;
+ var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(node.label.text)) ||
(!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
if (!canUseBreakOrContinue) {
var labelMarker = void 0;
if (!node.label) {
- if (node.kind === 215 /* BreakStatement */) {
+ if (node.kind === 217 /* BreakStatement */) {
convertedLoopState.nonLocalJumps |= 2 /* Break */;
labelMarker = "break";
}
@@ -49416,7 +53348,7 @@ var ts;
}
}
else {
- if (node.kind === 215 /* BreakStatement */) {
+ if (node.kind === 217 /* BreakStatement */) {
labelMarker = "break-" + node.label.text;
setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker);
}
@@ -49464,8 +53396,9 @@ var ts;
/*type*/ undefined, transformClassLikeDeclarationToExpression(node));
ts.setOriginalNode(variable, node);
var statements = [];
- var statement = ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([variable]), /*location*/ node);
+ var statement = ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([variable]));
ts.setOriginalNode(statement, node);
+ ts.setTextRange(statement, node);
ts.startOnNewLine(statement);
statements.push(statement);
// Add an `export default` statement for default exports (for `--target es5 --module es6`)
@@ -49583,7 +53516,7 @@ var ts;
ts.setEmitFlags(statement, 1536 /* NoComments */ | 384 /* NoTokenSourceMaps */);
statements.push(statement);
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements, /*location*/ node.members), /*location*/ undefined, /*multiLine*/ true);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), /*location*/ node.members), /*multiLine*/ true);
ts.setEmitFlags(block, 1536 /* NoComments */);
return block;
}
@@ -49596,7 +53529,7 @@ var ts;
*/
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
if (extendsClauseElement) {
- statements.push(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node)),
+ statements.push(ts.setTextRange(ts.createStatement(createExtendsHelper(context, ts.getLocalName(node))),
/*location*/ extendsClauseElement));
}
}
@@ -49608,6 +53541,9 @@ var ts;
* @param extendsClauseElement The expression for the class `extends` clause.
*/
function addConstructor(statements, node, extendsClauseElement) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16278 /* ConstructorExcludes */, 73 /* ConstructorIncludes */);
var constructor = ts.getFirstConstructorWithBody(node);
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
var constructorFunction = ts.createFunctionDeclaration(
@@ -49615,12 +53551,14 @@ var ts;
/*modifiers*/ undefined,
/*asteriskToken*/ undefined, ts.getDeclarationName(node),
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
- /*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper),
- /*location*/ constructor || node);
+ /*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
+ ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8 /* CapturesThis */);
}
statements.push(constructorFunction);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
}
/**
* Transforms the parameters of the constructor declaration of a class.
@@ -49658,38 +53596,46 @@ var ts;
statementOffset = 0;
}
else if (constructor) {
- // Otherwise, try to emit all potential prologue directives first.
- statementOffset = ts.addPrologueDirectives(statements, constructor.body.statements, /*ensureUseStrict*/ false, visitor);
+ statementOffset = ts.addStandardPrologue(statements, constructor.body.statements, /*ensureUseStrict*/ false);
}
if (constructor) {
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
+ if (!hasSynthesizedSuper) {
+ // If no super call has been synthesized, emit custom prologue directives.
+ statementOffset = ts.addCustomPrologue(statements, constructor.body.statements, statementOffset, visitor);
+ }
ts.Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
}
- var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ // determine whether the class is known syntactically to be a derived class (e.g. a
+ // class that extends a value that is not syntactically known to be `null`).
+ var isDerivedClass = extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 94 /* NullKeyword */;
+ var superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
// The last statement expression was replaced. Skip it.
if (superCaptureStatus === 1 /* ReplaceSuperCapture */ || superCaptureStatus === 2 /* ReplaceWithReturn */) {
statementOffset++;
}
if (constructor) {
- var body = saveStateAndInvoke(constructor, function (constructor) {
- isInConstructorWithCapturedSuper = superCaptureStatus === 1 /* ReplaceSuperCapture */;
- return ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, /*start*/ statementOffset);
- });
- ts.addRange(statements, body);
+ if (superCaptureStatus === 1 /* ReplaceSuperCapture */) {
+ hierarchyFacts |= 4096 /* ConstructorWithCapturedSuper */;
+ }
+ ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, /*start*/ statementOffset));
}
// Return `_this` unless we're sure enough that it would be pointless to add a return statement.
// If there's a constructor that we can tell returns in enough places, then we *do not* want to add a return.
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== 2 /* ReplaceWithReturn */
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(ts.createReturn(ts.createIdentifier("_this")));
}
ts.addRange(statements, endLexicalEnvironment());
- var block = ts.createBlock(ts.createNodeArray(statements,
+ if (constructor) {
+ prependCaptureNewTargetIfNeeded(statements, constructor, /*copyOnWrite*/ false);
+ }
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements),
/*location*/ constructor ? constructor.body.statements : node.members),
- /*location*/ constructor ? constructor.body : node,
/*multiLine*/ true);
+ ts.setTextRange(block, constructor ? constructor.body : node);
if (!constructor) {
ts.setEmitFlags(block, 1536 /* NoComments */);
}
@@ -49702,17 +53648,17 @@ var ts;
*/
function isSufficientlyCoveredByReturnStatements(statement) {
// A return statement is considered covered.
- if (statement.kind === 216 /* ReturnStatement */) {
+ if (statement.kind === 218 /* ReturnStatement */) {
return true;
}
- else if (statement.kind === 208 /* IfStatement */) {
+ else if (statement.kind === 210 /* IfStatement */) {
var ifStatement = statement;
if (ifStatement.elseStatement) {
return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
}
}
- else if (statement.kind === 204 /* Block */) {
+ else if (statement.kind === 206 /* Block */) {
var lastStatement = ts.lastOrUndefined(statement.statements);
if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
return true;
@@ -49725,9 +53671,9 @@ var ts;
*
* @returns The new statement offset into the `statements` array.
*/
- function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, hasExtendsClause, hasSynthesizedSuper, statementOffset) {
+ function declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, ctor, isDerivedClass, hasSynthesizedSuper, statementOffset) {
// If this isn't a derived class, just capture 'this' for arrow functions if necessary.
- if (!hasExtendsClause) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -49770,16 +53716,18 @@ var ts;
var ctorStatements = ctor.body.statements;
if (statementOffset < ctorStatements.length) {
firstStatement = ctorStatements[statementOffset];
- if (firstStatement.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) {
- var superCall = firstStatement.expression;
- superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
+ if (firstStatement.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(firstStatement.expression)) {
+ superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression);
}
}
- // Return the result if we have an immediate super() call on the last statement.
- if (superCallExpression && statementOffset === ctorStatements.length - 1) {
+ // Return the result if we have an immediate super() call on the last statement,
+ // but only if the constructor itself doesn't use 'this' elsewhere.
+ if (superCallExpression
+ && statementOffset === ctorStatements.length - 1
+ && !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) {
var returnStatement = ts.createReturn(superCallExpression);
- if (superCallExpression.kind !== 192 /* BinaryExpression */
- || superCallExpression.left.kind !== 179 /* CallExpression */) {
+ if (superCallExpression.kind !== 193 /* BinaryExpression */
+ || superCallExpression.left.kind !== 180 /* CallExpression */) {
ts.Debug.fail("Assumed generated super call would have form 'super.call(...) || this'.");
}
// Shift comments from the original super call to the return statement.
@@ -49788,18 +53736,18 @@ var ts;
return 2 /* ReplaceWithReturn */;
}
// Perform the capture.
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
// If we're actually replacing the original statement, we need to signal this to the caller.
if (superCallExpression) {
return 1 /* ReplaceSuperCapture */;
}
return 0 /* NoReplacement */;
}
+ function createActualThis() {
+ return ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */);
+ }
function createDefaultSuperCallOrThis() {
- var actualThis = ts.createThis();
- ts.setEmitFlags(actualThis, 4 /* NoSubstitution */);
- var superCall = ts.createFunctionApply(ts.createIdentifier("_super"), actualThis, ts.createIdentifier("arguments"));
- return ts.createLogicalOr(superCall, actualThis);
+ return ts.createLogicalOr(ts.createLogicalAnd(ts.createStrictInequality(ts.createIdentifier("_super"), ts.createNull()), ts.createFunctionApply(ts.createIdentifier("_super"), createActualThis(), ts.createIdentifier("arguments"))), createActualThis());
}
/**
* Visits a parameter declaration.
@@ -49814,25 +53762,25 @@ var ts;
else if (ts.isBindingPattern(node.name)) {
// Binding patterns are converted into a generated name and are
// evaluated inside the function body.
- return ts.setOriginalNode(ts.createParameter(
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(
/*decorators*/ undefined,
/*modifiers*/ undefined,
/*dotDotDotToken*/ undefined, ts.getGeneratedNameForNode(node),
/*questionToken*/ undefined,
/*type*/ undefined,
- /*initializer*/ undefined,
+ /*initializer*/ undefined),
/*location*/ node),
/*original*/ node);
}
else if (node.initializer) {
// Initializers are elided
- return ts.setOriginalNode(ts.createParameter(
+ return ts.setOriginalNode(ts.setTextRange(ts.createParameter(
/*decorators*/ undefined,
/*modifiers*/ undefined,
/*dotDotDotToken*/ undefined, node.name,
/*questionToken*/ undefined,
/*type*/ undefined,
- /*initializer*/ undefined,
+ /*initializer*/ undefined),
/*location*/ node),
/*original*/ node);
}
@@ -49862,17 +53810,17 @@ var ts;
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- var name_35 = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
+ var name = parameter.name, initializer = parameter.initializer, dotDotDotToken = parameter.dotDotDotToken;
// A rest parameter cannot have a binding pattern or an initializer,
// so let's just ignore it.
if (dotDotDotToken) {
continue;
}
- if (ts.isBindingPattern(name_35)) {
- addDefaultValueAssignmentForBindingPattern(statements, parameter, name_35, initializer);
+ if (ts.isBindingPattern(name)) {
+ addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer);
}
else if (initializer) {
- addDefaultValueAssignmentForInitializer(statements, parameter, name_35, initializer);
+ addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);
}
}
}
@@ -49907,13 +53855,11 @@ var ts;
*/
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
initializer = ts.visitNode(initializer, visitor, ts.isExpression);
- var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.createBlock([
- ts.createStatement(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48 /* NoSourceMap */), ts.setEmitFlags(initializer, 48 /* NoSourceMap */ | ts.getEmitFlags(initializer)),
- /*location*/ parameter))
- ], /*location*/ parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */),
- /*elseStatement*/ undefined,
- /*location*/ parameter);
+ var statement = ts.createIf(ts.createTypeCheck(ts.getSynthesizedClone(name), "undefined"), ts.setEmitFlags(ts.setTextRange(ts.createBlock([
+ ts.createStatement(ts.setTextRange(ts.createAssignment(ts.setEmitFlags(ts.getMutableClone(name), 48 /* NoSourceMap */), ts.setEmitFlags(initializer, 48 /* NoSourceMap */ | ts.getEmitFlags(initializer))), parameter))
+ ]), parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */));
statement.startsOnNewLine = true;
+ ts.setTextRange(statement, parameter);
ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 524288 /* CustomPrologue */);
statements.push(statement);
}
@@ -49950,22 +53896,21 @@ var ts;
var restIndex = node.parameters.length - 1;
var temp = ts.createLoopVariable();
// var param = [];
- statements.push(ts.setEmitFlags(ts.createVariableStatement(
+ statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName,
/*type*/ undefined, ts.createArrayLiteral([]))
- ]),
+ ])),
/*location*/ parameter), 524288 /* CustomPrologue */));
// for (var _i = restIndex; _i < arguments.length; _i++) {
// param[_i - restIndex] = arguments[_i];
// }
- var forStatement = ts.createFor(ts.createVariableDeclarationList([
+ var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, /*type*/ undefined, ts.createLiteral(restIndex))
- ], /*location*/ parameter), ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length"),
- /*location*/ parameter), ts.createPostfixIncrement(temp, /*location*/ parameter), ts.createBlock([
- ts.startOnNewLine(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
+ ]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
+ ts.startOnNewLine(ts.setTextRange(ts.createStatement(ts.createAssignment(ts.createElementAccess(expressionName, restIndex === 0
? temp
- : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp)),
+ : ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))),
/*location*/ parameter))
]));
ts.setEmitFlags(forStatement, 524288 /* CustomPrologue */);
@@ -49979,7 +53924,7 @@ var ts;
* @param node A node.
*/
function addCaptureThisForNodeIfNeeded(statements, node) {
- if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 185 /* ArrowFunction */) {
+ if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */ && node.kind !== 186 /* ArrowFunction */) {
captureThisForNode(statements, node, ts.createThis());
}
}
@@ -49989,11 +53934,52 @@ var ts;
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this",
/*type*/ undefined, initializer)
- ]), originalStatement);
+ ]));
ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 524288 /* CustomPrologue */);
+ ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
}
+ function prependCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
+ if (hierarchyFacts & 16384 /* NewTarget */) {
+ var newTarget = void 0;
+ switch (node.kind) {
+ case 186 /* ArrowFunction */:
+ return statements;
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ // Methods and accessors cannot be constructors, so 'new.target' will
+ // always return 'undefined'.
+ newTarget = ts.createVoidZero();
+ break;
+ case 151 /* Constructor */:
+ // Class constructors can only be called with `new`, so `this.constructor`
+ // should be relatively safe to use.
+ newTarget = ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor");
+ break;
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ // Functions can be called or constructed, and may have a `this` due to
+ // being a member or when calling an imported function via `other_1.f()`.
+ newTarget = ts.createConditional(ts.createLogicalAnd(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), ts.createBinary(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), 92 /* InstanceOfKeyword */, ts.getLocalName(node))), ts.createPropertyAccess(ts.setEmitFlags(ts.createThis(), 4 /* NoSubstitution */), "constructor"), ts.createVoidZero());
+ break;
+ default:
+ ts.Debug.failBadSyntaxKind(node);
+ break;
+ }
+ var captureNewTargetStatement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration("_newTarget",
+ /*type*/ undefined, newTarget)
+ ]));
+ if (copyOnWrite) {
+ return [captureNewTargetStatement].concat(statements);
+ }
+ statements.unshift(captureNewTargetStatement);
+ }
+ return statements;
+ }
/**
* Adds statements to the class body function for a class to define the members of the
* class.
@@ -50005,20 +53991,20 @@ var ts;
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
switch (member.kind) {
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
statements.push(transformSemicolonClassElementToStatement(member));
break;
- case 149 /* MethodDeclaration */:
- statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member));
+ case 150 /* MethodDeclaration */:
+ statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
break;
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var accessors = ts.getAllAccessorDeclarations(node.members, member);
if (member === accessors.firstAccessor) {
- statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors));
+ statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
}
break;
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// Constructors are handled in visitClassExpression/visitClassDeclaration
break;
default:
@@ -50033,7 +54019,7 @@ var ts;
* @param member The SemicolonClassElement node.
*/
function transformSemicolonClassElementToStatement(member) {
- return ts.createEmptyStatement(/*location*/ member);
+ return ts.setTextRange(ts.createEmptyStatement(), member);
}
/**
* Transforms a MethodDeclaration into a statement for a class body function.
@@ -50041,14 +54027,15 @@ var ts;
* @param receiver The receiver for the member.
* @param member The MethodDeclaration node.
*/
- function transformClassMethodDeclarationToStatement(receiver, member) {
+ function transformClassMethodDeclarationToStatement(receiver, member, container) {
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
var commentRange = ts.getCommentRange(member);
var sourceMapRange = ts.getSourceMapRange(member);
var memberName = ts.createMemberAccessForPropertyName(receiver, ts.visitNode(member.name, visitor, ts.isPropertyName), /*location*/ member.name);
- var memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined);
+ var memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined, container);
ts.setEmitFlags(memberFunction, 1536 /* NoComments */);
ts.setSourceMapRange(memberFunction, sourceMapRange);
- var statement = ts.createStatement(ts.createAssignment(memberName, memberFunction),
+ var statement = ts.setTextRange(ts.createStatement(ts.createAssignment(memberName, memberFunction)),
/*location*/ member);
ts.setOriginalNode(statement, member);
ts.setCommentRange(statement, commentRange);
@@ -50056,6 +54043,7 @@ var ts;
// No source map should be emitted for this statement to align with the
// old emitter.
ts.setEmitFlags(statement, 48 /* NoSourceMap */);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return statement;
}
/**
@@ -50064,13 +54052,13 @@ var ts;
* @param receiver The receiver for the member.
* @param accessors The set of related get/set accessors.
*/
- function transformAccessorsToStatement(receiver, accessors) {
- var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, /*startsOnNewLine*/ false),
- /*location*/ ts.getSourceMapRange(accessors.firstAccessor));
+ function transformAccessorsToStatement(receiver, accessors, container) {
+ var statement = ts.createStatement(transformAccessorsToExpression(receiver, accessors, container, /*startsOnNewLine*/ false));
// The location for the statement is used to emit source maps only.
// No comments should be emitted for this statement to align with the
// old emitter.
ts.setEmitFlags(statement, 1536 /* NoComments */);
+ ts.setSourceMapRange(statement, ts.getSourceMapRange(accessors.firstAccessor));
return statement;
}
/**
@@ -50079,8 +54067,9 @@ var ts;
*
* @param receiver The receiver for the member.
*/
- function transformAccessorsToExpression(receiver, _a, startsOnNewLine) {
+ function transformAccessorsToExpression(receiver, _a, container, startsOnNewLine) {
var firstAccessor = _a.firstAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
// To align with source maps in the old emitter, the receiver and property name
// arguments are both mapped contiguously to the accessor name.
var target = ts.getMutableClone(receiver);
@@ -50091,7 +54080,7 @@ var ts;
ts.setSourceMapRange(propertyName, firstAccessor.name);
var properties = [];
if (getAccessor) {
- var getterFunction = transformFunctionLikeToExpression(getAccessor, /*location*/ undefined, /*name*/ undefined);
+ var getterFunction = transformFunctionLikeToExpression(getAccessor, /*location*/ undefined, /*name*/ undefined, container);
ts.setSourceMapRange(getterFunction, ts.getSourceMapRange(getAccessor));
ts.setEmitFlags(getterFunction, 512 /* NoLeadingComments */);
var getter = ts.createPropertyAssignment("get", getterFunction);
@@ -50099,23 +54088,24 @@ var ts;
properties.push(getter);
}
if (setAccessor) {
- var setterFunction = transformFunctionLikeToExpression(setAccessor, /*location*/ undefined, /*name*/ undefined);
+ var setterFunction = transformFunctionLikeToExpression(setAccessor, /*location*/ undefined, /*name*/ undefined, container);
ts.setSourceMapRange(setterFunction, ts.getSourceMapRange(setAccessor));
ts.setEmitFlags(setterFunction, 512 /* NoLeadingComments */);
var setter = ts.createPropertyAssignment("set", setterFunction);
ts.setCommentRange(setter, ts.getCommentRange(setAccessor));
properties.push(setter);
}
- properties.push(ts.createPropertyAssignment("enumerable", ts.createLiteral(true)), ts.createPropertyAssignment("configurable", ts.createLiteral(true)));
+ properties.push(ts.createPropertyAssignment("enumerable", ts.createTrue()), ts.createPropertyAssignment("configurable", ts.createTrue()));
var call = ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
/*typeArguments*/ undefined, [
target,
propertyName,
- ts.createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true)
+ ts.createObjectLiteral(properties, /*multiLine*/ true)
]);
if (startsOnNewLine) {
call.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return call;
}
/**
@@ -50127,14 +54117,20 @@ var ts;
if (node.transformFlags & 16384 /* ContainsLexicalThis */) {
enableSubstitutionsForCapturedThis();
}
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16256 /* ArrowFunctionExcludes */, 66 /* ArrowFunctionIncludes */);
var func = ts.createFunctionExpression(
/*modifiers*/ undefined,
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformFunctionBody(node), node);
+ /*type*/ undefined, transformFunctionBody(node));
+ ts.setTextRange(func, node);
ts.setOriginalNode(func, node);
ts.setEmitFlags(func, 8 /* CapturesThis */);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
return func;
}
/**
@@ -50143,12 +54139,24 @@ var ts;
* @param node a FunctionExpression node.
*/
function visitFunctionExpression(node) {
- return ts.updateFunctionExpression(node,
- /*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, node.transformFlags & 64 /* ES2015 */
+ var ancestorFacts = ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */
+ ? enterSubtree(16278 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */)
+ : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64 /* ES2015 */
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384 /* NewTarget */
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionExpression(node,
+ /*modifiers*/ undefined, node.asteriskToken, name,
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body);
}
/**
* Visits a FunctionDeclaration node.
@@ -50156,12 +54164,22 @@ var ts;
* @param node a FunctionDeclaration node.
*/
function visitFunctionDeclaration(node) {
- return ts.updateFunctionDeclaration(node,
- /*decorators*/ undefined, node.modifiers, node.name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, node.transformFlags & 64 /* ES2015 */
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = node.transformFlags & 64 /* ES2015 */
? transformFunctionBody(node)
- : ts.visitFunctionBody(node.body, visitor, context));
+ : visitFunctionBodyDownLevel(node);
+ var name = hierarchyFacts & 16384 /* NewTarget */
+ ? ts.getLocalName(node)
+ : node.name;
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.updateFunctionDeclaration(node,
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name,
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body);
}
/**
* Transforms a function-like node into a FunctionExpression.
@@ -50170,18 +54188,24 @@ var ts;
* @param location The source-map location for the new FunctionExpression.
* @param name The name of the new FunctionExpression.
*/
- function transformFunctionLikeToExpression(node, location, name) {
- var savedContainingNonArrowFunction = enclosingNonArrowFunction;
- if (node.kind !== 185 /* ArrowFunction */) {
- enclosingNonArrowFunction = node;
+ function transformFunctionLikeToExpression(node, location, name, container) {
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = container && ts.isClassLike(container) && !ts.hasModifier(node, 32 /* Static */)
+ ? enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */)
+ : enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (hierarchyFacts & 16384 /* NewTarget */ && !name && (node.kind === 227 /* FunctionDeclaration */ || node.kind === 185 /* FunctionExpression */)) {
+ name = ts.getGeneratedNameForNode(node);
}
- var expression = ts.setOriginalNode(ts.createFunctionExpression(
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(
/*modifiers*/ undefined, node.asteriskToken, name,
- /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, saveStateAndInvoke(node, transformFunctionBody), location),
+ /*typeParameters*/ undefined, parameters,
+ /*type*/ undefined, body), location),
/*original*/ node);
- enclosingNonArrowFunction = savedContainingNonArrowFunction;
- return expression;
}
/**
* Transforms the body of a function-like node.
@@ -50199,8 +54223,8 @@ var ts;
resumeLexicalEnvironment();
if (ts.isBlock(body)) {
// ensureUseStrict is false because no new prologue-directive should be added.
- // addPrologueDirectives will simply put already-existing directives at the beginning of the target statement-array
- statementOffset = ts.addPrologueDirectives(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ // addStandardPrologue will put already-existing directives at the beginning of the target statement-array
+ statementOffset = ts.addStandardPrologue(statements, body.statements, /*ensureUseStrict*/ false);
}
addCaptureThisForNodeIfNeeded(statements, node);
addDefaultValueAssignmentsIfNeeded(statements, node);
@@ -50210,6 +54234,8 @@ var ts;
multiLine = true;
}
if (ts.isBlock(body)) {
+ // addCustomPrologue puts already-existing directives at the beginning of the target statement-array
+ statementOffset = ts.addCustomPrologue(statements, body.statements, statementOffset, visitor);
statementsLocation = body.statements;
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, statementOffset));
// If the original body was a multi-line block, this must be a multi-line block.
@@ -50218,7 +54244,7 @@ var ts;
}
}
else {
- ts.Debug.assert(node.kind === 185 /* ArrowFunction */);
+ ts.Debug.assert(node.kind === 186 /* ArrowFunction */);
// To align with the old emitter, we use a synthetic end position on the location
// for the statement list we synthesize when we down-level an arrow function with
// an expression function body. This prevents both comments and source maps from
@@ -50234,7 +54260,8 @@ var ts;
}
}
var expression = ts.visitNode(body, visitor, ts.isExpression);
- var returnStatement = ts.createReturn(expression, /*location*/ body);
+ var returnStatement = ts.createReturn(expression);
+ ts.setTextRange(returnStatement, body);
ts.setEmitFlags(returnStatement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 1024 /* NoTrailingComments */);
statements.push(returnStatement);
// To align with the source map emit for the old emitter, we set a custom
@@ -50243,11 +54270,13 @@ var ts;
}
var lexicalEnvironment = context.endLexicalEnvironment();
ts.addRange(statements, lexicalEnvironment);
+ prependCaptureNewTargetIfNeeded(statements, node, /*copyOnWrite*/ false);
// If we added any final generated statements, this must be a multi-line block
if (!multiLine && lexicalEnvironment && lexicalEnvironment.length) {
multiLine = true;
}
- var block = ts.createBlock(ts.createNodeArray(statements, statementsLocation), node.body, multiLine);
+ var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), multiLine);
+ ts.setTextRange(block, node.body);
if (!multiLine && singleLine) {
ts.setEmitFlags(block, 1 /* SingleLine */);
}
@@ -50257,6 +54286,23 @@ var ts;
ts.setOriginalNode(block, node.body);
return block;
}
+ function visitFunctionBodyDownLevel(node) {
+ var updated = ts.visitFunctionBody(node.body, functionBodyVisitor, context);
+ return ts.updateBlock(updated, ts.setTextRange(ts.createNodeArray(prependCaptureNewTargetIfNeeded(updated.statements, node, /*copyOnWrite*/ true)),
+ /*location*/ updated.statements));
+ }
+ function visitBlock(node, isFunctionBody) {
+ if (isFunctionBody) {
+ // A function body is not a block scope.
+ return ts.visitEachChild(node, visitor, context);
+ }
+ var ancestorFacts = hierarchyFacts & 256 /* IterationStatement */
+ ? enterSubtree(4032 /* IterationStatementBlockExcludes */, 512 /* IterationStatementBlockIncludes */)
+ : enterSubtree(3904 /* BlockExcludes */, 128 /* BlockIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
/**
* Visits an ExpressionStatement that contains a destructuring assignment.
*
@@ -50265,9 +54311,9 @@ var ts;
function visitExpressionStatement(node) {
// If we are here it is most likely because our expression is a destructuring assignment.
switch (node.expression.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return ts.updateStatement(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false));
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return ts.updateStatement(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false));
}
return ts.visitEachChild(node, visitor, context);
@@ -50282,10 +54328,13 @@ var ts;
function visitParenthesizedExpression(node, needsDestructuringValue) {
// If we are here it is most likely because our expression is a destructuring assignment.
if (!needsDestructuringValue) {
+ // By default we always emit the RHS at the end of a flattened destructuring
+ // expression. If we are in a state where we do not need the destructuring value,
+ // we pass that information along to the children that care about it.
switch (node.expression.kind) {
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return ts.updateParen(node, visitParenthesizedExpression(node.expression, /*needsDestructuringValue*/ false));
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return ts.updateParen(node, visitBinaryExpression(node.expression, /*needsDestructuringValue*/ false));
}
}
@@ -50303,9 +54352,12 @@ var ts;
if (ts.isDestructuringAssignment(node)) {
return ts.flattenDestructuringAssignment(node, visitor, context, 0 /* All */, needsDestructuringValue);
}
+ return ts.visitEachChild(node, visitor, context);
}
function visitVariableStatement(node) {
- if (convertedLoopState && (ts.getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) == 0) {
+ var ancestorFacts = enterSubtree(0 /* None */, ts.hasModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */);
+ var updated;
+ if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0) {
// we are inside a converted loop - hoist variable declarations
var assignments = void 0;
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -50319,18 +54371,22 @@ var ts;
else {
assignment = ts.createBinary(decl.name, 57 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression));
}
- (assignments || (assignments = [])).push(assignment);
+ assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- return ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); }), node);
+ updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 25 /* CommaToken */, acc); })), node);
}
else {
// none of declarations has initializer - the entire variable statement can be deleted
- return undefined;
+ updated = undefined;
}
}
- return ts.visitEachChild(node, visitor, context);
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
/**
* Visits a VariableDeclarationList that is block scoped (e.g. `let` or `const`).
@@ -50338,25 +54394,29 @@ var ts;
* @param node A VariableDeclarationList node.
*/
function visitVariableDeclarationList(node) {
- if (node.flags & 3 /* BlockScoped */) {
- enableSubstitutionsForBlockScopedBindings();
- }
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
- ? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
- var declarationList = ts.createVariableDeclarationList(declarations, /*location*/ node);
- ts.setOriginalNode(declarationList, node);
- ts.setCommentRange(declarationList, node);
- if (node.transformFlags & 8388608 /* ContainsBindingPattern */
- && (ts.isBindingPattern(node.declarations[0].name)
- || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
- // If the first or last declaration is a binding pattern, we need to modify
- // the source map range for the declaration list.
- var firstDeclaration = ts.firstOrUndefined(declarations);
- var lastDeclaration = ts.lastOrUndefined(declarations);
- ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ if (node.transformFlags & 64 /* ES2015 */) {
+ if (node.flags & 3 /* BlockScoped */) {
+ enableSubstitutionsForBlockScopedBindings();
+ }
+ var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
+ ? visitVariableDeclarationInLetDeclarationList
+ : visitVariableDeclaration));
+ var declarationList = ts.createVariableDeclarationList(declarations);
+ ts.setOriginalNode(declarationList, node);
+ ts.setTextRange(declarationList, node);
+ ts.setCommentRange(declarationList, node);
+ if (node.transformFlags & 8388608 /* ContainsBindingPattern */
+ && (ts.isBindingPattern(node.declarations[0].name)
+ || ts.isBindingPattern(ts.lastOrUndefined(node.declarations).name))) {
+ // If the first or last declaration is a binding pattern, we need to modify
+ // the source map range for the declaration list.
+ var firstDeclaration = ts.firstOrUndefined(declarations);
+ var lastDeclaration = ts.lastOrUndefined(declarations);
+ ts.setSourceMapRange(declarationList, ts.createRange(firstDeclaration.pos, lastDeclaration.end));
+ }
+ return declarationList;
}
- return declarationList;
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Gets a value indicating whether we should emit an explicit initializer for a variable
@@ -50407,18 +54467,16 @@ var ts;
var flags = resolver.getNodeCheckFlags(node);
var isCapturedInFunction = flags & 131072 /* CapturedBlockScopedBinding */;
var isDeclaredInLoop = flags & 262144 /* BlockScopedBindingInLoop */;
- var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(enclosingBlockScopeContainer)
+ var emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0
|| (isCapturedInFunction
&& isDeclaredInLoop
- && ts.isBlock(enclosingBlockScopeContainer)
- && ts.isIterationStatement(enclosingBlockScopeContainerParent, /*lookInLabeledStatements*/ false));
+ && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0);
var emitExplicitInitializer = !emittedAsTopLevel
- && enclosingBlockScopeContainer.kind !== 212 /* ForInStatement */
- && enclosingBlockScopeContainer.kind !== 213 /* ForOfStatement */
+ && (hierarchyFacts & 2048 /* ForInOrForOfStatement */) === 0
&& (!resolver.isDeclarationWithCollidingName(node)
|| (isDeclaredInLoop
&& !isCapturedInFunction
- && !ts.isIterationStatement(enclosingBlockScopeContainer, /*lookInLabeledStatements*/ false)));
+ && (hierarchyFacts & (1024 /* ForStatement */ | 2048 /* ForInOrForOfStatement */)) === 0));
return emitExplicitInitializer;
}
/**
@@ -50447,101 +54505,77 @@ var ts;
* @param node A VariableDeclaration node.
*/
function visitVariableDeclaration(node) {
- // If we are here it is because the name contains a binding pattern.
+ var ancestorFacts = enterSubtree(32 /* ExportedVariableStatement */, 0 /* None */);
+ var updated;
if (ts.isBindingPattern(node.name)) {
- var hoistTempVariables = enclosingVariableStatement
- && ts.hasModifier(enclosingVariableStatement, 1 /* Export */);
- return ts.flattenDestructuringBinding(node, visitor, context, 0 /* All */,
- /*value*/ undefined, hoistTempVariables);
- }
- return ts.visitEachChild(node, visitor, context);
- }
- function visitLabeledStatement(node) {
- if (convertedLoopState) {
- if (!convertedLoopState.labels) {
- convertedLoopState.labels = ts.createMap();
- }
- convertedLoopState.labels[node.label.text] = node.label.text;
- }
- var result;
- if (ts.isIterationStatement(node.statement, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node.statement)) {
- result = ts.visitNodes(ts.createNodeArray([node.statement]), visitor, ts.isStatement);
+ updated = ts.flattenDestructuringBinding(node, visitor, context, 0 /* All */,
+ /*value*/ undefined, (ancestorFacts & 32 /* ExportedVariableStatement */) !== 0);
}
else {
- result = ts.visitEachChild(node, visitor, context);
+ updated = ts.visitEachChild(node, visitor, context);
}
- if (convertedLoopState) {
- convertedLoopState.labels[node.label.text] = undefined;
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
+ }
+ function recordLabel(node) {
+ convertedLoopState.labels.set(node.label.text, node.label.text);
+ }
+ function resetLabel(node) {
+ convertedLoopState.labels.set(node.label.text, undefined);
+ }
+ function visitLabeledStatement(node) {
+ if (convertedLoopState && !convertedLoopState.labels) {
+ convertedLoopState.labels = ts.createMap();
}
- return result;
+ var statement = ts.unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);
+ return ts.isIterationStatement(statement, /*lookInLabeledStatements*/ false)
+ ? visitIterationStatement(statement, /*outermostLabeledStatement*/ node)
+ : ts.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement), node, convertedLoopState && resetLabel);
}
- function visitDoStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitIterationStatement(node, outermostLabeledStatement) {
+ switch (node.kind) {
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return visitDoOrWhileStatement(node, outermostLabeledStatement);
+ case 213 /* ForStatement */:
+ return visitForStatement(node, outermostLabeledStatement);
+ case 214 /* ForInStatement */:
+ return visitForInStatement(node, outermostLabeledStatement);
+ case 215 /* ForOfStatement */:
+ return visitForOfStatement(node, outermostLabeledStatement);
+ }
+ }
+ function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {
+ var ancestorFacts = enterSubtree(excludeFacts, includeFacts);
+ var updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
- function visitWhileStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitDoOrWhileStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(0 /* DoOrWhileStatementExcludes */, 256 /* DoOrWhileStatementIncludes */, node, outermostLabeledStatement);
}
- function visitForStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(3008 /* ForStatementExcludes */, 1280 /* ForStatementIncludes */, node, outermostLabeledStatement);
}
- function visitForInStatement(node) {
- return convertIterationStatementBodyIfNecessary(node);
+ function visitForInStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984 /* ForInOrForOfStatementExcludes */, 2304 /* ForInOrForOfStatementIncludes */, node, outermostLabeledStatement);
}
- /**
- * Visits a ForOfStatement and converts it into a compatible ForStatement.
- *
- * @param node A ForOfStatement.
- */
- function visitForOfStatement(node) {
- return convertIterationStatementBodyIfNecessary(node, convertForOfToFor);
+ function visitForOfStatement(node, outermostLabeledStatement) {
+ return visitIterationStatementWithFacts(1984 /* ForInOrForOfStatementExcludes */, 2304 /* ForInOrForOfStatementIncludes */, node, outermostLabeledStatement, compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray);
}
- function convertForOfToFor(node, convertedLoopBodyStatements) {
- // The following ES6 code:
- //
- // for (let v of expr) { }
- //
- // should be emitted as
- //
- // for (var _i = 0, _a = expr; _i < _a.length; _i++) {
- // var v = _a[_i];
- // }
- //
- // where _a and _i are temps emitted to capture the RHS and the counter,
- // respectively.
- // When the left hand side is an expression instead of a let declaration,
- // the "let v" is not emitted.
- // When the left hand side is a let/const, the v is renamed if there is
- // another v in scope.
- // Note that all assignments to the LHS are emitted in the body, including
- // all destructuring.
- // Note also that because an extra statement is needed to assign to the LHS,
- // for-of bodies are always emitted as blocks.
- var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
- var initializer = node.initializer;
+ function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {
var statements = [];
- // In the case where the user wrote an identifier as the RHS, like this:
- //
- // for (let v of arr) { }
- //
- // we don't want to emit a temporary variable for the RHS, just use it directly.
- var counter = ts.createLoopVariable();
- var rhsReference = expression.kind === 70 /* Identifier */
- ? ts.createUniqueName(expression.text)
- : ts.createTempVariable(/*recordTempVariable*/ undefined);
- var elementAccess = ts.createElementAccess(rhsReference, counter);
- // Initialize LHS
- // var v = _a[_i];
- if (ts.isVariableDeclarationList(initializer)) {
- if (initializer.flags & 3 /* BlockScoped */) {
+ if (ts.isVariableDeclarationList(node.initializer)) {
+ if (node.initializer.flags & 3 /* BlockScoped */) {
enableSubstitutionsForBlockScopedBindings();
}
- var firstOriginalDeclaration = ts.firstOrUndefined(initializer.declarations);
+ var firstOriginalDeclaration = ts.firstOrUndefined(node.initializer.declarations);
if (firstOriginalDeclaration && ts.isBindingPattern(firstOriginalDeclaration.name)) {
// This works whether the declaration is a var, let, or const.
// It will use rhsIterationValue _a[_i] as the initializer.
- var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0 /* All */, elementAccess);
- var declarationList = ts.createVariableDeclarationList(declarations, /*location*/ initializer);
- ts.setOriginalNode(declarationList, initializer);
+ var declarations = ts.flattenDestructuringBinding(firstOriginalDeclaration, visitor, context, 0 /* All */, boundValue);
+ var declarationList = ts.setTextRange(ts.createVariableDeclarationList(declarations), node.initializer);
+ ts.setOriginalNode(declarationList, node.initializer);
// Adjust the source map range for the first declaration to align with the old
// emitter.
var firstDeclaration = declarations[0];
@@ -50553,27 +54587,24 @@ var ts;
else {
// The following call does not include the initializer, so we have
// to emit it separately.
- statements.push(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.setOriginalNode(ts.createVariableDeclarationList([
+ statements.push(ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.setOriginalNode(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : ts.createTempVariable(/*recordTempVariable*/ undefined),
- /*type*/ undefined, ts.createElementAccess(rhsReference, counter))
- ], /*location*/ ts.moveRangePos(initializer, -1)), initializer),
- /*location*/ ts.moveRangeEnd(initializer, -1)));
+ /*type*/ undefined, boundValue)
+ ]), ts.moveRangePos(node.initializer, -1)), node.initializer)), ts.moveRangeEnd(node.initializer, -1)));
}
}
else {
// Initializer is an expression. Emit the expression in the body, so that it's
// evaluated on every iteration.
- var assignment = ts.createAssignment(initializer, elementAccess);
+ var assignment = ts.createAssignment(node.initializer, boundValue);
if (ts.isDestructuringAssignment(assignment)) {
- // This is a destructuring pattern, so we flatten the destructuring instead.
- statements.push(ts.createStatement(ts.flattenDestructuringAssignment(assignment, visitor, context, 0 /* All */)));
+ ts.aggregateTransformFlags(assignment);
+ statements.push(ts.createStatement(visitBinaryExpression(assignment, /*needsDestructuringValue*/ false)));
}
else {
- // Currently there is not way to check that assignment is binary expression of destructing assignment
- // so we have to cast never type to binaryExpression
- assignment.end = initializer.end;
- statements.push(ts.createStatement(assignment, /*location*/ ts.moveRangeEnd(initializer, -1)));
+ assignment.end = node.initializer.end;
+ statements.push(ts.setTextRange(ts.createStatement(ts.visitNode(assignment, visitor, ts.isExpression)), ts.moveRangeEnd(node.initializer, -1)));
}
}
var bodyLocation;
@@ -50582,7 +54613,7 @@ var ts;
ts.addRange(statements, convertedLoopBodyStatements);
}
else {
- var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+ var statement = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
if (ts.isBlock(statement)) {
ts.addRange(statements, statement.statements);
bodyLocation = statement;
@@ -50592,22 +54623,92 @@ var ts;
statements.push(statement);
}
}
- // The old emitter does not emit source maps for the expression
- ts.setEmitFlags(expression, 48 /* NoSourceMap */ | ts.getEmitFlags(expression));
// The old emitter does not emit source maps for the block.
// We add the location to preserve comments.
- var body = ts.createBlock(ts.createNodeArray(statements, /*location*/ statementsLocation),
- /*location*/ bodyLocation);
- ts.setEmitFlags(body, 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
- var forStatement = ts.createFor(ts.setEmitFlags(ts.createVariableDeclarationList([
- ts.createVariableDeclaration(counter, /*type*/ undefined, ts.createLiteral(0), /*location*/ ts.moveRangePos(node.expression, -1)),
- ts.createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression)
- ], /*location*/ node.expression), 1048576 /* NoHoisting */), ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length"),
- /*location*/ node.expression), ts.createPostfixIncrement(counter, /*location*/ node.expression), body,
+ return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
+ /*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
+ }
+ function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ // The following ES6 code:
+ //
+ // for (let v of expr) { }
+ //
+ // should be emitted as
+ //
+ // for (var _i = 0, _a = expr; _i < _a.length; _i++) {
+ // var v = _a[_i];
+ // }
+ //
+ // where _a and _i are temps emitted to capture the RHS and the counter,
+ // respectively.
+ // When the left hand side is an expression instead of a let declaration,
+ // the "let v" is not emitted.
+ // When the left hand side is a let/const, the v is renamed if there is
+ // another v in scope.
+ // Note that all assignments to the LHS are emitted in the body, including
+ // all destructuring.
+ // Note also that because an extra statement is needed to assign to the LHS,
+ // for-of bodies are always emitted as blocks.
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ // In the case where the user wrote an identifier as the RHS, like this:
+ //
+ // for (let v of arr) { }
+ //
+ // we don't want to emit a temporary variable for the RHS, just use it directly.
+ var counter = ts.createLoopVariable();
+ var rhsReference = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ // The old emitter does not emit source maps for the expression
+ ts.setEmitFlags(expression, 48 /* NoSourceMap */ | ts.getEmitFlags(expression));
+ var forStatement = ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(counter, /*type*/ undefined, ts.createLiteral(0)), ts.moveRangePos(node.expression, -1)),
+ ts.setTextRange(ts.createVariableDeclaration(rhsReference, /*type*/ undefined, expression), node.expression)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.setTextRange(ts.createLessThan(counter, ts.createPropertyAccess(rhsReference, "length")), node.expression),
+ /*incrementor*/ ts.setTextRange(ts.createPostfixIncrement(counter), node.expression),
+ /*statement*/ convertForOfStatementHead(node, ts.createElementAccess(rhsReference, counter), convertedLoopBodyStatements)),
/*location*/ node);
// Disable trailing source maps for the OpenParenToken to align source map emit with the old emitter.
ts.setEmitFlags(forStatement, 256 /* NoTokenTrailingSourceMaps */);
- return forStatement;
+ ts.setTextRange(forStatement, node);
+ return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
+ }
+ function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements) {
+ var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+ var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var result = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(iterator) : ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var errorRecord = ts.createUniqueName("e");
+ var catchVariable = ts.getGeneratedNameForNode(errorRecord);
+ var returnMethod = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var values = ts.createValuesHelper(context, expression, node.expression);
+ var next = ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
+ hoistVariableDeclaration(errorRecord);
+ hoistVariableDeclaration(returnMethod);
+ var forStatement = ts.setEmitFlags(ts.setTextRange(ts.createFor(
+ /*initializer*/ ts.setEmitFlags(ts.setTextRange(ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, values), node.expression),
+ ts.createVariableDeclaration(result, /*type*/ undefined, next)
+ ]), node.expression), 1048576 /* NoHoisting */),
+ /*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
+ /*incrementor*/ ts.createAssignment(result, next),
+ /*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)),
+ /*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
+ return ts.createTry(ts.createBlock([
+ ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
+ ]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
+ ts.createStatement(ts.createAssignment(errorRecord, ts.createObjectLiteral([
+ ts.createPropertyAssignment("error", catchVariable)
+ ])))
+ ]), 1 /* SingleLine */)), ts.createBlock([
+ ts.createTry(
+ /*tryBlock*/ ts.createBlock([
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(ts.createPropertyAccess(result, "done"))), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(ts.createFunctionCall(returnMethod, iterator, []))), 1 /* SingleLine */),
+ ]),
+ /*catchClause*/ undefined,
+ /*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
+ ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1 /* SingleLine */)
+ ]), 1 /* SingleLine */))
+ ]));
}
/**
* Visits an ObjectLiteralExpression with computed propety names.
@@ -50621,31 +54722,39 @@ var ts;
// Find the first computed property.
// Everything until that point can be emitted as part of the initial object literal.
var numInitialProperties = numProperties;
+ var numInitialPropertiesWithoutYield = numProperties;
for (var i = 0; i < numProperties; i++) {
var property = properties[i];
- if (property.transformFlags & 16777216 /* ContainsYield */
- || property.name.kind === 142 /* ComputedPropertyName */) {
+ if ((property.transformFlags & 16777216 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */)
+ && i < numInitialPropertiesWithoutYield) {
+ numInitialPropertiesWithoutYield = i;
+ }
+ if (property.name.kind === 143 /* ComputedPropertyName */) {
numInitialProperties = i;
break;
}
}
- ts.Debug.assert(numInitialProperties !== numProperties);
- // For computed properties, we need to create a unique handle to the object
- // literal so we can modify it without risking internal assignments tainting the object.
- var temp = ts.createTempVariable(hoistVariableDeclaration);
- // Write out the first non-computed properties, then emit the rest through indexing on the temp variable.
- var expressions = [];
- var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties),
- /*location*/ undefined, node.multiLine), 32768 /* Indented */));
- if (node.multiLine) {
- assignment.startsOnNewLine = true;
- }
- expressions.push(assignment);
- addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
- // We need to clone the temporary identifier so that we can write it on a
- // new line
- expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
- return ts.inlineExpressions(expressions);
+ if (numInitialProperties !== numProperties) {
+ if (numInitialPropertiesWithoutYield < numInitialProperties) {
+ numInitialProperties = numInitialPropertiesWithoutYield;
+ }
+ // For computed properties, we need to create a unique handle to the object
+ // literal so we can modify it without risking internal assignments tainting the object.
+ var temp = ts.createTempVariable(hoistVariableDeclaration);
+ // Write out the first non-computed properties, then emit the rest through indexing on the temp variable.
+ var expressions = [];
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 32768 /* Indented */));
+ if (node.multiLine) {
+ assignment.startsOnNewLine = true;
+ }
+ expressions.push(assignment);
+ addObjectLiteralMembers(expressions, node, temp, numInitialProperties);
+ // We need to clone the temporary identifier so that we can write it on a
+ // new line
+ expressions.push(node.multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
+ return ts.inlineExpressions(expressions);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
function shouldConvertIterationStatementBody(node) {
return (resolver.getNodeCheckFlags(node) & 65536 /* LoopWithCapturedBlockScopedBinding */) !== 0;
@@ -50672,7 +54781,7 @@ var ts;
}
}
}
- function convertIterationStatementBodyIfNecessary(node, convert) {
+ function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, convert) {
if (!shouldConvertIterationStatementBody(node)) {
var saveAllowedNonLabeledJumps = void 0;
if (convertedLoopState) {
@@ -50681,7 +54790,9 @@ var ts;
saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;
convertedLoopState.allowedNonLabeledJumps = 2 /* Break */ | 4 /* Continue */;
}
- var result = convert ? convert(node, /*convertedLoopBodyStatements*/ undefined) : ts.visitEachChild(node, visitor, context);
+ var result = convert
+ ? convert(node, outermostLabeledStatement, /*convertedLoopBodyStatements*/ undefined)
+ : ts.restoreEnclosingLabel(ts.visitEachChild(node, visitor, context), outermostLabeledStatement, convertedLoopState && resetLabel);
if (convertedLoopState) {
convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;
}
@@ -50690,11 +54801,11 @@ var ts;
var functionName = ts.createUniqueName("_loop");
var loopInitializer;
switch (node.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
var initializer = node.initializer;
- if (initializer && initializer.kind === 224 /* VariableDeclarationList */) {
+ if (initializer && initializer.kind === 226 /* VariableDeclarationList */) {
loopInitializer = initializer;
}
break;
@@ -50730,19 +54841,26 @@ var ts;
convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables;
}
}
- var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement);
+ startLexicalEnvironment();
+ var loopBody = ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock);
+ var lexicalEnvironment = endLexicalEnvironment();
var currentState = convertedLoopState;
convertedLoopState = outerConvertedLoopState;
- if (loopOutParameters.length) {
+ if (loopOutParameters.length || lexicalEnvironment) {
var statements_4 = ts.isBlock(loopBody) ? loopBody.statements.slice() : [loopBody];
- copyOutParameters(loopOutParameters, 1 /* ToOutParameter */, statements_4);
- loopBody = ts.createBlock(statements_4, /*location*/ undefined, /*multiline*/ true);
+ if (loopOutParameters.length) {
+ copyOutParameters(loopOutParameters, 1 /* ToOutParameter */, statements_4);
+ }
+ ts.addRange(statements_4, lexicalEnvironment);
+ loopBody = ts.createBlock(statements_4, /*multiline*/ true);
}
- if (!ts.isBlock(loopBody)) {
- loopBody = ts.createBlock([loopBody], /*location*/ undefined, /*multiline*/ true);
+ if (ts.isBlock(loopBody)) {
+ loopBody.multiLine = true;
}
- var isAsyncBlockContainingAwait = enclosingNonArrowFunction
- && (ts.getEmitFlags(enclosingNonArrowFunction) & 131072 /* AsyncFunctionBody */) !== 0
+ else {
+ loopBody = ts.createBlock([loopBody], /*multiline*/ true);
+ }
+ var isAsyncBlockContainingAwait = hierarchyFacts & 4 /* AsyncFunctionBody */
&& (node.statement.transformFlags & 16777216 /* ContainsYield */) !== 0;
var loopBodyFlags = 0;
if (currentState.containsLexicalThis) {
@@ -50825,25 +54943,22 @@ var ts;
var convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, isAsyncBlockContainingAwait);
var loop;
if (convert) {
- loop = convert(node, convertedLoopBodyStatements);
+ loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- loop = ts.getMutableClone(node);
+ var clone_4 = ts.getMutableClone(node);
// clean statement part
- loop.statement = undefined;
+ clone_4.statement = undefined;
// visit childnodes to transform initializer/condition/incrementor parts
- loop = ts.visitEachChild(loop, visitor, context);
+ clone_4 = ts.visitEachChild(clone_4, visitor, context);
// set loop statement
- loop.statement = ts.createBlock(convertedLoopBodyStatements,
- /*location*/ undefined,
- /*multiline*/ true);
+ clone_4.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
// reset and re-aggregate the transform flags
- loop.transformFlags = 0;
- ts.aggregateTransformFlags(loop);
+ clone_4.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_4);
+ loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
}
- statements.push(currentParent.kind === 219 /* LabeledStatement */
- ? ts.createLabel(currentParent.label, loop)
- : loop);
+ statements.push(loop);
return statements;
}
function copyOutParameter(outParam, copyDirection) {
@@ -50867,7 +54982,9 @@ var ts;
!state.labeledNonLocalBreaks &&
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; }));
- var callResult = isAsyncBlockContainingAwait ? ts.createYield(ts.createToken(38 /* AsteriskToken */), call) : call;
+ var callResult = isAsyncBlockContainingAwait
+ ? ts.createYield(ts.createToken(38 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */))
+ : call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
copyOutParameters(state.loopOutParameters, 0 /* ToOriginal */, statements);
@@ -50906,26 +55023,25 @@ var ts;
if (!state.labeledNonLocalBreaks) {
state.labeledNonLocalBreaks = ts.createMap();
}
- state.labeledNonLocalBreaks[labelText] = labelMarker;
+ state.labeledNonLocalBreaks.set(labelText, labelMarker);
}
else {
if (!state.labeledNonLocalContinues) {
state.labeledNonLocalContinues = ts.createMap();
}
- state.labeledNonLocalContinues[labelText] = labelMarker;
+ state.labeledNonLocalContinues.set(labelText, labelMarker);
}
}
function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {
if (!table) {
return;
}
- for (var labelText in table) {
- var labelMarker = table[labelText];
+ table.forEach(function (labelMarker, labelText) {
var statements = [];
// if there are no outer converted loop or outer label in question is located inside outer converted loop
// then emit labeled break\continue
// otherwise propagate pair 'label -> marker' to outer converted loop and emit 'return labelMarker' so outer loop can later decide what to do
- if (!outerLoop || (outerLoop.labels && outerLoop.labels[labelText])) {
+ if (!outerLoop || (outerLoop.labels && outerLoop.labels.get(labelText))) {
var label = ts.createIdentifier(labelText);
statements.push(isBreak ? ts.createBreak(label) : ts.createContinue(label));
}
@@ -50934,7 +55050,7 @@ var ts;
statements.push(ts.createReturn(loopResultName));
}
caseClauses.push(ts.createCaseClause(ts.createLiteral(labelMarker), statements));
- }
+ });
}
function processLoopVariableDeclaration(decl, loopParameters, loopOutParameters) {
var name = decl.name;
@@ -50949,7 +55065,7 @@ var ts;
else {
loopParameters.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name));
if (resolver.getNodeCheckFlags(decl) & 2097152 /* NeedsLoopOutParameter */) {
- var outParamName = ts.createUniqueName("out_" + name.text);
+ var outParamName = ts.createUniqueName("out_" + ts.unescapeIdentifier(name.text));
loopOutParameters.push({ originalName: name, outParamName: outParamName });
}
}
@@ -50969,22 +55085,22 @@ var ts;
for (var i = start; i < numProperties; i++) {
var property = properties[i];
switch (property.kind) {
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
var accessors = ts.getAllAccessorDeclarations(node.properties, property);
if (property === accessors.firstAccessor) {
- expressions.push(transformAccessorsToExpression(receiver, accessors, node.multiLine));
+ expressions.push(transformAccessorsToExpression(receiver, accessors, node, node.multiLine));
}
break;
- case 257 /* PropertyAssignment */:
+ case 150 /* MethodDeclaration */:
+ expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
+ break;
+ case 260 /* PropertyAssignment */:
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
break;
- case 149 /* MethodDeclaration */:
- expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node.multiLine));
- break;
default:
ts.Debug.failBadSyntaxKind(node);
break;
@@ -50999,8 +55115,8 @@ var ts;
* @param receiver The receiver for the assignment.
*/
function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression),
- /*location*/ property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.visitNode(property.initializer, visitor, ts.isExpression));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
@@ -51014,8 +55130,8 @@ var ts;
* @param receiver The receiver for the assignment.
*/
function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name),
- /*location*/ property);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(property.name, visitor, ts.isPropertyName)), ts.getSynthesizedClone(property.name));
+ ts.setTextRange(expression, property);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
@@ -51028,22 +55144,34 @@ var ts;
* @param method The MethodDeclaration node.
* @param receiver The receiver for the assignment.
*/
- function transformObjectLiteralMethodDeclarationToExpression(method, receiver, startsOnNewLine) {
- var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, /*location*/ method, /*name*/ undefined),
- /*location*/ method);
+ function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {
+ var ancestorFacts = enterSubtree(0 /* None */, 0 /* None */);
+ var expression = ts.createAssignment(ts.createMemberAccessForPropertyName(receiver, ts.visitNode(method.name, visitor, ts.isPropertyName)), transformFunctionLikeToExpression(method, /*location*/ method, /*name*/ undefined, container));
+ ts.setTextRange(expression, method);
if (startsOnNewLine) {
expression.startsOnNewLine = true;
}
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 16384 /* NewTarget */ : 0 /* None */);
return expression;
}
function visitCatchClause(node) {
- ts.Debug.assert(ts.isBindingPattern(node.variableDeclaration.name));
- var temp = ts.createTempVariable(undefined);
- var newVariableDeclaration = ts.createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration);
- var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0 /* All */, temp);
- var list = ts.createVariableDeclarationList(vars, /*location*/ node.variableDeclaration, /*flags*/ node.variableDeclaration.flags);
- var destructure = ts.createVariableStatement(undefined, list);
- return ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ var ancestorFacts = enterSubtree(4032 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);
+ var updated;
+ if (ts.isBindingPattern(node.variableDeclaration.name)) {
+ var temp = ts.createTempVariable(/*recordTempVariable*/ undefined);
+ var newVariableDeclaration = ts.createVariableDeclaration(temp);
+ ts.setTextRange(newVariableDeclaration, node.variableDeclaration);
+ var vars = ts.flattenDestructuringBinding(node.variableDeclaration, visitor, context, 0 /* All */, temp);
+ var list = ts.createVariableDeclarationList(vars);
+ ts.setTextRange(list, node.variableDeclaration);
+ var destructure = ts.createVariableStatement(/*modifiers*/ undefined, list);
+ updated = ts.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return updated;
}
function addStatementToStartOfBlock(block, statement) {
var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
@@ -51060,20 +55188,41 @@ var ts;
// Methods on classes are handled in visitClassDeclaration/visitClassExpression.
// Methods with computed property names are handled in visitObjectLiteralExpression.
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
- var functionExpression = transformFunctionLikeToExpression(node, /*location*/ ts.moveRangePos(node, -1), /*name*/ undefined);
+ var functionExpression = transformFunctionLikeToExpression(node, /*location*/ ts.moveRangePos(node, -1), /*name*/ undefined, /*container*/ undefined);
ts.setEmitFlags(functionExpression, 512 /* NoLeadingComments */ | ts.getEmitFlags(functionExpression));
- return ts.createPropertyAssignment(node.name, functionExpression,
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, functionExpression),
/*location*/ node);
}
/**
+ * Visits an AccessorDeclaration of an ObjectLiteralExpression.
+ *
+ * @param node An AccessorDeclaration node.
+ */
+ function visitAccessorDeclaration(node) {
+ ts.Debug.assert(!ts.isComputedPropertyName(node.name));
+ var savedConvertedLoopState = convertedLoopState;
+ convertedLoopState = undefined;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
+ convertedLoopState = savedConvertedLoopState;
+ return updated;
+ }
+ /**
* Visits a ShorthandPropertyAssignment and transforms it into a PropertyAssignment.
*
* @param node A ShorthandPropertyAssignment node.
*/
function visitShorthandPropertyAssignment(node) {
- return ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name),
+ return ts.setTextRange(ts.createPropertyAssignment(node.name, ts.getSynthesizedClone(node.name)),
/*location*/ node);
}
+ function visitComputedPropertyName(node) {
+ var ancestorFacts = enterSubtree(0 /* ComputedPropertyNameExcludes */, 8192 /* ComputedPropertyNameIncludes */);
+ var updated = ts.visitEachChild(node, visitor, context);
+ exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, hierarchyFacts & 49152 /* PropagateNewTargetMask */ ? 32768 /* NewTargetInComputedPropertyName */ : 0 /* None */);
+ return updated;
+ }
/**
* Visits a YieldExpression node.
*
@@ -51089,8 +55238,11 @@ var ts;
* @param node An ArrayLiteralExpression node.
*/
function visitArrayLiteralExpression(node) {
- // We are here because we contain a SpreadElementExpression.
- return transformAndSpreadElements(node.elements, /*needsUniqueCopy*/ true, node.multiLine, /*hasTrailingComma*/ node.elements.hasTrailingComma);
+ if (node.transformFlags & 64 /* ES2015 */) {
+ // We are here because we contain a SpreadElementExpression.
+ return transformAndSpreadElements(node.elements, /*needsUniqueCopy*/ true, node.multiLine, /*hasTrailingComma*/ node.elements.hasTrailingComma);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Visits a CallExpression that contains either a spread element or `super`.
@@ -51098,7 +55250,11 @@ var ts;
* @param node a CallExpression.
*/
function visitCallExpression(node) {
- return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true);
+ if (node.transformFlags & 64 /* ES2015 */) {
+ return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true);
+ }
+ return ts.updateCall(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression),
+ /*typeArguments*/ undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
}
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ false);
@@ -51125,7 +55281,7 @@ var ts;
// _super.apply(this, a.concat([b]))
// _super.m.apply(this, a.concat([b]))
// _super.prototype.m.apply(this, a.concat([b]))
- resultingCall = ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false));
+ resultingCall = ts.createFunctionApply(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false));
}
else {
// [source]
@@ -51137,18 +55293,18 @@ var ts;
// _super.call(this, a)
// _super.m.call(this, a)
// _super.prototype.m.call(this, a)
- resultingCall = ts.createFunctionCall(ts.visitNode(target, visitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression),
+ resultingCall = ts.createFunctionCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression),
/*location*/ node);
}
if (node.expression.kind === 96 /* SuperKeyword */) {
var actualThis = ts.createThis();
ts.setEmitFlags(actualThis, 4 /* NoSubstitution */);
var initializer = ts.createLogicalOr(resultingCall, actualThis);
- return assignToCapturedThis
+ resultingCall = assignToCapturedThis
? ts.createAssignment(ts.createIdentifier("_this"), initializer)
: initializer;
}
- return resultingCall;
+ return ts.setOriginalNode(resultingCall, node);
}
/**
* Visits a NewExpression that contains a spread element.
@@ -51156,16 +55312,18 @@ var ts;
* @param node A NewExpression node.
*/
function visitNewExpression(node) {
- // We are here because we contain a SpreadElementExpression.
- ts.Debug.assert((node.transformFlags & 524288 /* ContainsSpread */) !== 0);
- // [source]
- // new C(...a)
- //
- // [output]
- // new ((_a = C).bind.apply(_a, [void 0].concat(a)))()
- var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)),
- /*typeArguments*/ undefined, []);
+ if (node.transformFlags & 524288 /* ContainsSpread */) {
+ // We are here because we contain a SpreadElementExpression.
+ // [source]
+ // new C(...a)
+ //
+ // [output]
+ // new ((_a = C).bind.apply(_a, [void 0].concat(a)))()
+ var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
+ return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)),
+ /*typeArguments*/ undefined, []);
+ }
+ return ts.visitEachChild(node, visitor, context);
}
/**
* Transforms an array of Expression nodes that contains a SpreadExpression.
@@ -51186,14 +55344,28 @@ var ts;
var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
}));
- if (segments.length === 1) {
- var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 175 /* ArrayLiteralExpression */
- ? ts.createArraySlice(segments[0])
- : segments[0];
+ if (compilerOptions.downlevelIteration) {
+ if (segments.length === 1) {
+ var firstSegment = segments[0];
+ if (ts.isCallExpression(firstSegment)
+ && ts.isIdentifier(firstSegment.expression)
+ && (ts.getEmitFlags(firstSegment.expression) & 4096 /* HelperName */)
+ && firstSegment.expression.text === "___spread") {
+ return segments[0];
+ }
+ }
+ return ts.createSpreadHelper(context, segments);
+ }
+ else {
+ if (segments.length === 1) {
+ var firstElement = elements[0];
+ return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 176 /* ArrayLiteralExpression */
+ ? ts.createArraySlice(segments[0])
+ : segments[0];
+ }
+ // Rewrite using the pattern <segment0>.concat(<segment1>, <segment2>, ...)
+ return ts.createArrayConcat(segments.shift(), segments);
}
- // Rewrite using the pattern <segment0>.concat(<segment1>, <segment2>, ...)
- return ts.createArrayConcat(segments.shift(), segments);
}
function partitionSpread(node) {
return ts.isSpreadExpression(node)
@@ -51204,8 +55376,7 @@ var ts;
return ts.map(chunk, visitExpressionOfSpread);
}
function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
- return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, /*location*/ undefined, hasTrailingComma), visitor, ts.isExpression),
- /*location*/ undefined, multiLine);
+ return ts.createArrayLiteral(ts.visitNodes(ts.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
}
function visitSpreadElement(node) {
return ts.visitNode(node.expression, visitor, ts.isExpression);
@@ -51224,7 +55395,29 @@ var ts;
* @param node A template literal.
*/
function visitTemplateLiteral(node) {
- return ts.createLiteral(node.text, /*location*/ node);
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ /**
+ * Visits a string literal with an extended unicode escape.
+ *
+ * @param node A string literal.
+ */
+ function visitStringLiteral(node) {
+ if (node.hasExtendedUnicodeEscape) {
+ return ts.setTextRange(ts.createLiteral(node.text), node);
+ }
+ return node;
+ }
+ /**
+ * Visits a binary or octal (ES6) numeric literal.
+ *
+ * @param node A string literal.
+ */
+ function visitNumericLiteral(node) {
+ if (node.numericLiteralFlags & 48 /* BinaryOrOctalSpecifier */) {
+ return ts.setTextRange(ts.createNumericLiteral(node.text), node);
+ }
+ return node;
}
/**
* Visits a TaggedTemplateExpression node.
@@ -51284,7 +55477,7 @@ var ts;
// ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's
// <CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for both TV and TRV.
text = text.replace(/\r\n?/g, "\n");
- return ts.createLiteral(text, /*location*/ node);
+ return ts.setTextRange(ts.createLiteral(text), node);
}
/**
* Visits a TemplateExpression node.
@@ -51306,7 +55499,8 @@ var ts;
// "abc" + (1 << 2) + ""
var expression = ts.reduceLeft(expressions, ts.createAdd);
if (ts.nodeIsSynthesized(expression)) {
- ts.setTextRange(expression, node);
+ expression.pos = node.pos;
+ expression.end = node.end;
}
return expression;
}
@@ -51368,27 +55562,42 @@ var ts;
/**
* Visits the `super` keyword
*/
- function visitSuperKeyword() {
- return enclosingNonAsyncFunctionBody
- && ts.isClassElement(enclosingNonAsyncFunctionBody)
- && !ts.hasModifier(enclosingNonAsyncFunctionBody, 32 /* Static */)
- && currentParent.kind !== 179 /* CallExpression */
+ function visitSuperKeyword(isExpressionOfCall) {
+ return hierarchyFacts & 8 /* NonStaticClassElement */
+ && !isExpressionOfCall
? ts.createPropertyAccess(ts.createIdentifier("_super"), "prototype")
: ts.createIdentifier("_super");
}
+ function visitMetaProperty(node) {
+ if (node.keywordToken === 93 /* NewKeyword */ && node.name.text === "target") {
+ if (hierarchyFacts & 8192 /* ComputedPropertyName */) {
+ hierarchyFacts |= 32768 /* NewTargetInComputedPropertyName */;
+ }
+ else {
+ hierarchyFacts |= 16384 /* NewTarget */;
+ }
+ return ts.createIdentifier("_newTarget");
+ }
+ return node;
+ }
/**
* Called by the printer just before a node is printed.
*
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to be printed.
+ * @param emitCallback The callback used to emit the node.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- var savedEnclosingFunction = enclosingFunction;
+ function onEmitNode(hint, node, emitCallback) {
if (enabledSubstitutions & 1 /* CapturedThis */ && ts.isFunctionLike(node)) {
// If we are tracking a captured `this`, keep track of the enclosing function.
- enclosingFunction = node;
+ var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, ts.getEmitFlags(node) & 8 /* CapturesThis */
+ ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */
+ : 65 /* FunctionIncludes */);
+ previousOnEmitNode(hint, node, emitCallback);
+ exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);
+ return;
}
- previousOnEmitNode(emitContext, node, emitCallback);
- enclosingFunction = savedEnclosingFunction;
+ previousOnEmitNode(hint, node, emitCallback);
}
/**
* Enables a more costly code path for substitutions when we determine a source file
@@ -51408,24 +55617,24 @@ var ts;
if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) {
enabledSubstitutions |= 1 /* CapturedThis */;
context.enableSubstitution(98 /* ThisKeyword */);
- context.enableEmitNotification(150 /* Constructor */);
- context.enableEmitNotification(149 /* MethodDeclaration */);
- context.enableEmitNotification(151 /* GetAccessor */);
- context.enableEmitNotification(152 /* SetAccessor */);
- context.enableEmitNotification(185 /* ArrowFunction */);
- context.enableEmitNotification(184 /* FunctionExpression */);
- context.enableEmitNotification(225 /* FunctionDeclaration */);
+ context.enableEmitNotification(151 /* Constructor */);
+ context.enableEmitNotification(150 /* MethodDeclaration */);
+ context.enableEmitNotification(152 /* GetAccessor */);
+ context.enableEmitNotification(153 /* SetAccessor */);
+ context.enableEmitNotification(186 /* ArrowFunction */);
+ context.enableEmitNotification(185 /* FunctionExpression */);
+ context.enableEmitNotification(227 /* FunctionDeclaration */);
}
}
/**
* Hooks node substitutions.
*
- * @param emitContext The context for the emitter.
+ * @param hint The context for the emitter.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
if (ts.isIdentifier(node)) {
@@ -51442,7 +55651,7 @@ var ts;
if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
- return ts.getGeneratedNameForNode(original);
+ return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
}
}
return node;
@@ -51456,10 +55665,10 @@ var ts;
function isNameOfDeclarationWithCollidingName(node) {
var parent = node.parent;
switch (parent.kind) {
- case 174 /* BindingElement */:
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 225 /* VariableDeclaration */:
return parent.name === node
&& resolver.isDeclarationWithCollidingName(parent);
}
@@ -51488,7 +55697,7 @@ var ts;
if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
if (declaration) {
- return ts.getGeneratedNameForNode(declaration.name);
+ return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
}
}
return node;
@@ -51500,9 +55709,8 @@ var ts;
*/
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1 /* CapturedThis */
- && enclosingFunction
- && ts.getEmitFlags(enclosingFunction) & 8 /* CapturesThis */) {
- return ts.createIdentifier("_this", /*location*/ node);
+ && hierarchyFacts & 16 /* CapturesThis */) {
+ return ts.setTextRange(ts.createIdentifier("_this"), node);
}
return node;
}
@@ -51518,11 +55726,11 @@ var ts;
return false;
}
var statement = ts.firstOrUndefined(constructor.body.statements);
- if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 207 /* ExpressionStatement */) {
+ if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 209 /* ExpressionStatement */) {
return false;
}
var statementExpression = statement.expression;
- if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 179 /* CallExpression */) {
+ if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 180 /* CallExpression */) {
return false;
}
var callTarget = statementExpression.expression;
@@ -51530,7 +55738,7 @@ var ts;
return false;
}
var callArgument = ts.singleOrUndefined(statementExpression.arguments);
- if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 196 /* SpreadElement */) {
+ if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 197 /* SpreadElement */) {
return false;
}
var expression = callArgument.expression;
@@ -51550,11 +55758,123 @@ var ts;
name: "typescript:extends",
scoped: false,
priority: 0,
- text: "\n var __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };"
+ text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
};
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
+/*@internal*/
+var ts;
+(function (ts) {
+ /**
+ * Transforms ES5 syntax into ES3 syntax.
+ *
+ * @param context Context and state information for the transformation.
+ */
+ function transformES5(context) {
+ var compilerOptions = context.getCompilerOptions();
+ // enable emit notification only if using --jsx preserve or react-native
+ var previousOnEmitNode;
+ var noSubstitution;
+ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) {
+ previousOnEmitNode = context.onEmitNode;
+ context.onEmitNode = onEmitNode;
+ context.enableEmitNotification(250 /* JsxOpeningElement */);
+ context.enableEmitNotification(251 /* JsxClosingElement */);
+ context.enableEmitNotification(249 /* JsxSelfClosingElement */);
+ noSubstitution = [];
+ }
+ var previousOnSubstituteNode = context.onSubstituteNode;
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableSubstitution(178 /* PropertyAccessExpression */);
+ context.enableSubstitution(260 /* PropertyAssignment */);
+ return transformSourceFile;
+ /**
+ * Transforms an ES5 source file to ES3.
+ *
+ * @param node A SourceFile
+ */
+ function transformSourceFile(node) {
+ return node;
+ }
+ /**
+ * Called by the printer just before a node is printed.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ function onEmitNode(hint, node, emitCallback) {
+ switch (node.kind) {
+ case 250 /* JsxOpeningElement */:
+ case 251 /* JsxClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
+ var tagName = node.tagName;
+ noSubstitution[ts.getOriginalNodeId(tagName)] = true;
+ break;
+ }
+ previousOnEmitNode(hint, node, emitCallback);
+ }
+ /**
+ * Hooks node substitutions.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ function onSubstituteNode(hint, node) {
+ if (node.id && noSubstitution && noSubstitution[node.id]) {
+ return previousOnSubstituteNode(hint, node);
+ }
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isPropertyAccessExpression(node)) {
+ return substitutePropertyAccessExpression(node);
+ }
+ else if (ts.isPropertyAssignment(node)) {
+ return substitutePropertyAssignment(node);
+ }
+ return node;
+ }
+ /**
+ * Substitutes a PropertyAccessExpression whose name is a reserved word.
+ *
+ * @param node A PropertyAccessExpression
+ */
+ function substitutePropertyAccessExpression(node) {
+ var literalName = trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.setTextRange(ts.createElementAccess(node.expression, literalName), node);
+ }
+ return node;
+ }
+ /**
+ * Substitutes a PropertyAssignment whose name is a reserved word.
+ *
+ * @param node A PropertyAssignment
+ */
+ function substitutePropertyAssignment(node) {
+ var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
+ if (literalName) {
+ return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ }
+ return node;
+ }
+ /**
+ * If an identifier name is a reserved word, returns a string literal for the name.
+ *
+ * @param name An Identifier
+ */
+ function trySubstituteReservedName(name) {
+ var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
+ if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) {
+ return ts.setTextRange(ts.createLiteral(name), name);
+ }
+ return undefined;
+ }
+ }
+ ts.transformES5 = transformES5;
+})(ts || (ts = {}));
+/// <reference path="../factory.ts" />
+/// <reference path="../visitor.ts" />
// Transforms generator functions into a compatible ES5 representation with similar runtime
// semantics. This is accomplished by first transforming the body of each generator
// function into an intermediate representation that is the compiled into a JavaScript
@@ -51725,13 +56045,15 @@ var ts;
Instruction[Instruction["Catch"] = 6] = "Catch";
Instruction[Instruction["Endfinally"] = 7] = "Endfinally";
})(Instruction || (Instruction = {}));
- var instructionNames = ts.createMap((_a = {},
- _a[2 /* Return */] = "return",
- _a[3 /* Break */] = "break",
- _a[4 /* Yield */] = "yield",
- _a[5 /* YieldStar */] = "yield*",
- _a[7 /* Endfinally */] = "endfinally",
- _a));
+ function getInstructionName(instruction) {
+ switch (instruction) {
+ case 2 /* Return */: return "return";
+ case 3 /* Break */: return "break";
+ case 4 /* Yield */: return "yield";
+ case 5 /* YieldStar */: return "yield*";
+ case 7 /* Endfinally */: return "endfinally";
+ }
+ }
function transformGenerators(context) {
var resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistFunctionDeclaration = context.hoistFunctionDeclaration, hoistVariableDeclaration = context.hoistVariableDeclaration;
var compilerOptions = context.getCompilerOptions();
@@ -51823,13 +56145,13 @@ var ts;
*/
function visitJavaScriptInStatementContainingYield(node) {
switch (node.kind) {
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitWhileStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
default:
return visitJavaScriptInGeneratorFunctionBody(node);
@@ -51842,24 +56164,24 @@ var ts;
*/
function visitJavaScriptInGeneratorFunctionBody(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return visitAccessorDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitForInStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return visitBreakStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return visitContinueStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return visitReturnStatement(node);
default:
if (node.transformFlags & 16777216 /* ContainsYield */) {
@@ -51880,21 +56202,21 @@ var ts;
*/
function visitJavaScriptContainingYield(node) {
switch (node.kind) {
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return visitBinaryExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return visitConditionalExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return visitYieldExpression(node);
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return visitArrayLiteralExpression(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return visitObjectLiteralExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return visitElementAccessExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return visitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return visitNewExpression(node);
default:
return ts.visitEachChild(node, visitor, context);
@@ -51907,9 +56229,9 @@ var ts;
*/
function visitGenerator(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return visitFunctionExpression(node);
default:
ts.Debug.failBadSyntaxKind(node);
@@ -51927,12 +56249,12 @@ var ts;
*/
function visitFunctionDeclaration(node) {
// Currently, we only support generators that were originally async functions.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
- node = ts.setOriginalNode(ts.createFunctionDeclaration(
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(
/*decorators*/ undefined, node.modifiers,
/*asteriskToken*/ undefined, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformGeneratorFunctionBody(node.body),
+ /*type*/ undefined, transformGeneratorFunctionBody(node.body)),
/*location*/ node), node);
}
else {
@@ -51965,12 +56287,12 @@ var ts;
*/
function visitFunctionExpression(node) {
// Currently, we only support generators that were originally async functions.
- if (node.asteriskToken && ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */) {
- node = ts.setOriginalNode(ts.createFunctionExpression(
+ if (node.asteriskToken) {
+ node = ts.setOriginalNode(ts.setTextRange(ts.createFunctionExpression(
/*modifiers*/ undefined,
/*asteriskToken*/ undefined, node.name,
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
- /*type*/ undefined, transformGeneratorFunctionBody(node.body),
+ /*type*/ undefined, transformGeneratorFunctionBody(node.body)),
/*location*/ node), node);
}
else {
@@ -52039,7 +56361,7 @@ var ts;
state = ts.createTempVariable(/*recordTempVariable*/ undefined);
// Build the generator
resumeLexicalEnvironment();
- var statementOffset = ts.addPrologueDirectives(statements, body.statements, /*ensureUseStrict*/ false, visitor);
+ var statementOffset = ts.addPrologue(statements, body.statements, /*ensureUseStrict*/ false, visitor);
transformAndEmitStatements(body.statements, statementOffset);
var buildResult = build();
ts.addRange(statements, endLexicalEnvironment());
@@ -52058,7 +56380,7 @@ var ts;
operationArguments = savedOperationArguments;
operationLocations = savedOperationLocations;
state = savedState;
- return ts.createBlock(statements, /*location*/ body, body.multiLine);
+ return ts.setTextRange(ts.createBlock(statements, body.multiLine), body);
}
/**
* Visits a variable statement.
@@ -52137,7 +56459,7 @@ var ts;
if (containsYield(right)) {
var target = void 0;
switch (left.kind) {
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
// [source]
// a.b = yield;
//
@@ -52149,7 +56471,7 @@ var ts;
// _a.b = %sent%;
target = ts.updatePropertyAccess(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
break;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
// [source]
// a[b] = yield;
//
@@ -52168,7 +56490,7 @@ var ts;
}
var operator = node.operatorToken.kind;
if (isCompoundAssignment(operator)) {
- return ts.createBinary(target, 57 /* EqualsToken */, ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression), node), node);
+ return ts.setTextRange(ts.createAssignment(target, ts.setTextRange(ts.createBinary(cacheExpression(target), getOperatorForCompoundAssignment(operator), ts.visitNode(right, visitor, ts.isExpression)), node)), node);
}
else {
return ts.updateBinary(node, target, ts.visitNode(right, visitor, ts.isExpression));
@@ -52192,10 +56514,10 @@ var ts;
// _a = a();
// .yield resumeLabel
// _a + %sent% + c()
- var clone_4 = ts.getMutableClone(node);
- clone_4.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
- clone_4.right = ts.visitNode(node.right, visitor, ts.isExpression);
- return clone_4;
+ var clone_5 = ts.getMutableClone(node);
+ clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression));
+ clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression);
+ return clone_5;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52330,17 +56652,19 @@ var ts;
// .yield resumeLabel, (a())
// .mark resumeLabel
// x = %sent%;
- // NOTE: we are explicitly not handling YieldStar at this time.
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- emitYieldStar(expression, /*location*/ node);
+ var iterator = (ts.getEmitFlags(node.expression) & 4194304 /* Iterator */) === 0
+ ? ts.createValuesHelper(context, expression, /*location*/ node)
+ : expression;
+ emitYieldStar(iterator, /*location*/ node);
}
else {
emitYield(expression, /*location*/ node);
}
markLabel(resumeLabel);
- return createGeneratorResume();
+ return createGeneratorResume(/*location*/ node);
}
/**
* Visits an ArrayLiteralExpression that contains a YieldExpression.
@@ -52368,26 +56692,27 @@ var ts;
// .mark resumeLabel
// ar = _a.concat([%sent%, 2]);
var numInitialElements = countInitialNodesWithoutYield(elements);
- var temp = declareLocal();
- var hasAssignedTemp = false;
+ var temp;
if (numInitialElements > 0) {
+ temp = declareLocal();
var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
emitAssignment(temp, ts.createArrayLiteral(leadingElement
? [leadingElement].concat(initialElements) : initialElements));
leadingElement = undefined;
- hasAssignedTemp = true;
}
var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
- return hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, /*location*/ undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, location, multiLine);
+ return temp
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location);
function reduceElement(expressions, element) {
if (containsYield(element) && expressions.length > 0) {
+ var hasAssignedTemp = temp !== undefined;
+ if (!temp) {
+ temp = declareLocal();
+ }
emitAssignment(temp, hasAssignedTemp
- ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, /*location*/ undefined, multiLine)])
- : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions,
- /*location*/ undefined, multiLine));
- hasAssignedTemp = true;
+ ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)])
+ : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine));
leadingElement = undefined;
expressions = [];
}
@@ -52417,8 +56742,7 @@ var ts;
var multiLine = node.multiLine;
var numInitialProperties = countInitialNodesWithoutYield(properties);
var temp = declareLocal();
- emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties),
- /*location*/ undefined, multiLine));
+ emitAssignment(temp, ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), multiLine));
var expressions = ts.reduceLeft(properties, reduceProperty, [], numInitialProperties);
expressions.push(multiLine ? ts.startOnNewLine(ts.getMutableClone(temp)) : temp);
return ts.inlineExpressions(expressions);
@@ -52454,10 +56778,10 @@ var ts;
// .yield resumeLabel
// .mark resumeLabel
// a = _a[%sent%]
- var clone_5 = ts.getMutableClone(node);
- clone_5.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
- clone_5.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
- return clone_5;
+ var clone_6 = ts.getMutableClone(node);
+ clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression));
+ clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression);
+ return clone_6;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52492,10 +56816,9 @@ var ts;
// .mark resumeLabel
// new (_b.apply(_a, _c.concat([%sent%, 2])));
var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
- return ts.setOriginalNode(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
+ return ts.setOriginalNode(ts.setTextRange(ts.createNew(ts.createFunctionApply(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
/*leadingElement*/ ts.createVoidZero())),
- /*typeArguments*/ undefined, [],
- /*location*/ node), node);
+ /*typeArguments*/ undefined, []), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52524,38 +56847,38 @@ var ts;
}
function transformAndEmitStatementWorker(node) {
switch (node.kind) {
- case 204 /* Block */:
+ case 206 /* Block */:
return transformAndEmitBlock(node);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return transformAndEmitExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return transformAndEmitIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return transformAndEmitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return transformAndEmitWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return transformAndEmitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return transformAndEmitForInStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return transformAndEmitContinueStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return transformAndEmitBreakStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return transformAndEmitReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return transformAndEmitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return transformAndEmitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return transformAndEmitLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return transformAndEmitThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return transformAndEmitTryStatement(node);
default:
- return emitStatement(ts.visitNode(node, visitor, ts.isStatement, /*optional*/ true));
+ return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
}
}
function transformAndEmitBlock(node) {
@@ -52572,7 +56895,9 @@ var ts;
function transformAndEmitVariableDeclarationList(node) {
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
- hoistVariableDeclaration(variable.name);
+ var name = ts.getSynthesizedClone(variable.name);
+ ts.setCommentRange(name, variable.name);
+ hoistVariableDeclaration(name);
}
var variables = ts.getInitializedVariables(node);
var numVariables = variables.length;
@@ -52615,7 +56940,7 @@ var ts;
if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {
var endLabel = defineLabel();
var elseLabel = node.elseStatement ? defineLabel() : undefined;
- emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression));
+ emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, ts.visitNode(node.expression, visitor, ts.isExpression), /*location*/ node.expression);
transformAndEmitEmbeddedStatement(node.thenStatement);
if (node.elseStatement) {
emitBreak(endLabel);
@@ -52738,8 +57063,7 @@ var ts;
transformAndEmitVariableDeclarationList(initializer);
}
else {
- emitStatement(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression),
- /*location*/ initializer));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(initializer, visitor, ts.isExpression)), initializer));
}
}
markLabel(conditionLabel);
@@ -52749,8 +57073,7 @@ var ts;
transformAndEmitEmbeddedStatement(node.statement);
markLabel(incrementLabel);
if (node.incrementor) {
- emitStatement(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression),
- /*location*/ node.incrementor));
+ emitStatement(ts.setTextRange(ts.createStatement(ts.visitNode(node.incrementor, visitor, ts.isExpression)), node.incrementor));
}
emitBreak(conditionLabel);
endLoopBlock();
@@ -52764,7 +57087,7 @@ var ts;
beginScriptLoopBlock();
}
var initializer = node.initializer;
- if (ts.isVariableDeclarationList(initializer)) {
+ if (initializer && ts.isVariableDeclarationList(initializer)) {
for (var _i = 0, _a = initializer.declarations; _i < _a.length; _i++) {
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
@@ -52772,7 +57095,7 @@ var ts;
var variables = ts.getInitializedVariables(initializer);
node = ts.updateFor(node, variables.length > 0
? ts.inlineExpressions(ts.map(variables, transformInitializedVariable))
- : undefined, ts.visitNode(node.condition, visitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.incrementor, visitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -52864,7 +57187,7 @@ var ts;
var variable = _a[_i];
hoistVariableDeclaration(variable.name);
}
- node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForIn(node, initializer.declarations[0].name, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock));
}
else {
node = ts.visitEachChild(node, visitor, context);
@@ -52903,11 +57226,11 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function transformAndEmitReturnStatement(node) {
- emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true),
+ emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
/*location*/ node);
}
function visitReturnStatement(node) {
- return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression, /*optional*/ true),
+ return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
/*location*/ node);
}
function transformAndEmitWithStatement(node) {
@@ -52972,7 +57295,7 @@ var ts;
for (var i = 0; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
clauseLabels.push(defineLabel());
- if (clause.kind === 254 /* DefaultClause */ && defaultClauseIndex === -1) {
+ if (clause.kind === 257 /* DefaultClause */ && defaultClauseIndex === -1) {
defaultClauseIndex = i;
}
}
@@ -52985,7 +57308,7 @@ var ts;
var defaultClausesSkipped = 0;
for (var i = clausesWritten; i < numClauses; i++) {
var clause = caseBlock.clauses[i];
- if (clause.kind === 253 /* CaseClause */) {
+ if (clause.kind === 256 /* CaseClause */) {
var caseClause = clause;
if (containsYield(caseClause.expression) && pendingClauses.length > 0) {
break;
@@ -53127,9 +57450,9 @@ var ts;
}
return -1;
}
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (emitContext === 1 /* Expression */) {
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
return node;
@@ -53141,17 +57464,17 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (renamedCatchVariables && ts.hasProperty(renamedCatchVariables, node.text)) {
+ if (!ts.isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) {
var original = ts.getOriginalNode(node);
if (ts.isIdentifier(original) && original.parent) {
var declaration = resolver.getReferencedValueDeclaration(original);
if (declaration) {
- var name_36 = ts.getProperty(renamedCatchVariableDeclarations, String(ts.getOriginalNodeId(declaration)));
- if (name_36) {
- var clone_6 = ts.getMutableClone(name_36);
- ts.setSourceMapRange(clone_6, node);
- ts.setCommentRange(clone_6, node);
- return clone_6;
+ var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
+ if (name) {
+ var clone_7 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_7, node);
+ ts.setCommentRange(clone_7, node);
+ return clone_7;
}
}
}
@@ -53160,7 +57483,7 @@ var ts;
}
function cacheExpression(node) {
var temp;
- if (ts.isGeneratedIdentifier(node)) {
+ if (ts.isGeneratedIdentifier(node) || ts.getEmitFlags(node) & 4096 /* HelperName */) {
return node;
}
temp = ts.createTempVariable(hoistVariableDeclaration);
@@ -53288,15 +57611,23 @@ var ts;
*/
function beginCatchBlock(variable) {
ts.Debug.assert(peekBlockKind() === 0 /* Exception */);
- var text = variable.name.text;
- var name = declareLocal(text);
- if (!renamedCatchVariables) {
- renamedCatchVariables = ts.createMap();
- renamedCatchVariableDeclarations = ts.createMap();
- context.enableSubstitution(70 /* Identifier */);
+ // generated identifiers should already be unique within a file
+ var name;
+ if (ts.isGeneratedIdentifier(variable.name)) {
+ name = variable.name;
+ hoistVariableDeclaration(variable.name);
+ }
+ else {
+ var text = variable.name.text;
+ name = declareLocal(text);
+ if (!renamedCatchVariables) {
+ renamedCatchVariables = ts.createMap();
+ renamedCatchVariableDeclarations = [];
+ context.enableSubstitution(70 /* Identifier */);
+ }
+ renamedCatchVariables.set(text, true);
+ renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
}
- renamedCatchVariables[text] = true;
- renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
var exception = peekBlock();
ts.Debug.assert(exception.state < 1 /* Catch */);
var endLabel = exception.endLabel;
@@ -53566,7 +57897,7 @@ var ts;
*/
function createInstruction(instruction) {
var literal = ts.createLiteral(instruction);
- literal.trailingComment = instructionNames[instruction];
+ ts.addSyntheticTrailingComment(literal, 3 /* MultiLineCommentTrivia */, getInstructionName(instruction));
return literal;
}
/**
@@ -53577,10 +57908,10 @@ var ts;
*/
function createInlineBreak(label, location) {
ts.Debug.assert(label > 0, "Invalid label: " + label);
- return ts.createReturn(ts.createArrayLiteral([
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), location);
+ ])), location);
}
/**
* Creates a statement that can be used indicate a Return operation.
@@ -53589,15 +57920,16 @@ var ts;
* @param location An optional source map location for the statement.
*/
function createInlineReturn(expression, location) {
- return ts.createReturn(ts.createArrayLiteral(expression
+ return ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2 /* Return */), expression]
- : [createInstruction(2 /* Return */)]), location);
+ : [createInstruction(2 /* Return */)])), location);
}
/**
* Creates an expression that can be used to resume from a Yield operation.
*/
function createGeneratorResume(location) {
- return ts.createCall(ts.createPropertyAccess(state, "sent"), /*typeArguments*/ undefined, [], location);
+ return ts.setTextRange(ts.createCall(ts.createPropertyAccess(state, "sent"),
+ /*typeArguments*/ undefined, []), location);
}
/**
* Emits an empty instruction.
@@ -53743,7 +58075,6 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
/*type*/ undefined, ts.createBlock(buildResult,
- /*location*/ undefined,
/*multiLine*/ buildResult.length > 0)), 262144 /* ReuseTempVariableScope */));
}
/**
@@ -54014,7 +58345,7 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeAssign(left, right, operationLocation) {
- writeStatement(ts.createStatement(ts.createAssignment(left, right), operationLocation));
+ writeStatement(ts.setTextRange(ts.createStatement(ts.createAssignment(left, right)), operationLocation));
}
/**
* Writes a Throw operation to the current label's statement list.
@@ -54025,7 +58356,7 @@ var ts;
function writeThrow(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createThrow(expression, operationLocation));
+ writeStatement(ts.setTextRange(ts.createThrow(expression), operationLocation));
}
/**
* Writes a Return operation to the current label's statement list.
@@ -54036,9 +58367,9 @@ var ts;
function writeReturn(expression, operationLocation) {
lastOperationWasAbrupt = true;
lastOperationWasCompletion = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(2 /* Return */), expression]
- : [createInstruction(2 /* Return */)]), operationLocation));
+ : [createInstruction(2 /* Return */)])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a Break operation to the current label's statement list.
@@ -54048,10 +58379,10 @@ var ts;
*/
function writeBreak(label, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a BreakWhenTrue operation to the current label's statement list.
@@ -54061,10 +58392,10 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeBreakWhenTrue(label, condition, operationLocation) {
- writeStatement(ts.createIf(condition, ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(condition, ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */)), 1 /* SingleLine */));
}
/**
* Writes a BreakWhenFalse operation to the current label's statement list.
@@ -54074,10 +58405,10 @@ var ts;
* @param operationLocation The source map location for the operation.
*/
function writeBreakWhenFalse(label, condition, operationLocation) {
- writeStatement(ts.createIf(ts.createLogicalNot(condition), ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.createIf(ts.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(3 /* Break */),
createLabel(label)
- ]), operationLocation)));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */)), 1 /* SingleLine */));
}
/**
* Writes a Yield operation to the current label's statement list.
@@ -54087,9 +58418,9 @@ var ts;
*/
function writeYield(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral(expression
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral(expression
? [createInstruction(4 /* Yield */), expression]
- : [createInstruction(4 /* Yield */)]), operationLocation));
+ : [createInstruction(4 /* Yield */)])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes a YieldStar instruction to the current label's statement list.
@@ -54099,10 +58430,10 @@ var ts;
*/
function writeYieldStar(expression, operationLocation) {
lastOperationWasAbrupt = true;
- writeStatement(ts.createReturn(ts.createArrayLiteral([
+ writeStatement(ts.setEmitFlags(ts.setTextRange(ts.createReturn(ts.createArrayLiteral([
createInstruction(5 /* YieldStar */),
expression
- ]), operationLocation));
+ ])), operationLocation), 384 /* NoTokenSourceMaps */));
}
/**
* Writes an Endfinally instruction to the current label's statement list.
@@ -54183,157 +58514,918 @@ var ts;
name: "typescript:generator",
scoped: false,
priority: 6,
- text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;\n return { next: verb(0), \"throw\": verb(1), \"return\": verb(2) };\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
+ text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };"
};
- var _a;
})(ts || (ts = {}));
-/// <reference path="../factory.ts" />
-/// <reference path="../visitor.ts" />
+/// <reference path="../../factory.ts" />
+/// <reference path="../../visitor.ts" />
+/// <reference path="../destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
- /**
- * Transforms ES5 syntax into ES3 syntax.
- *
- * @param context Context and state information for the transformation.
- */
- function transformES5(context) {
+ function transformModule(context) {
+ function getTransformModuleDelegate(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.AMD: return transformAMDModule;
+ case ts.ModuleKind.UMD: return transformUMDModule;
+ default: return transformCommonJSModule;
+ }
+ }
+ var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ var compilerOptions = context.getCompilerOptions();
+ var resolver = context.getEmitResolver();
+ var host = context.getEmitHost();
+ var languageVersion = ts.getEmitScriptTarget(compilerOptions);
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
var previousOnSubstituteNode = context.onSubstituteNode;
+ var previousOnEmitNode = context.onEmitNode;
context.onSubstituteNode = onSubstituteNode;
- context.enableSubstitution(177 /* PropertyAccessExpression */);
- context.enableSubstitution(257 /* PropertyAssignment */);
+ context.onEmitNode = onEmitNode;
+ context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols.
+ context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols.
+ context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(261 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
+ context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file.
+ var moduleInfoMap = []; // The ExternalModuleInfo for each file.
+ var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
+ var currentSourceFile; // The current file.
+ var currentModuleInfo; // The ExternalModuleInfo for the current file.
+ var noSubstitution; // Set of nodes for which substitution rules should be ignored.
return transformSourceFile;
/**
- * Transforms an ES5 source file to ES3.
+ * Transforms the module aspects of a SourceFile.
*
- * @param node A SourceFile
+ * @param node The SourceFile node.
*/
function transformSourceFile(node) {
- return node;
+ if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ return node;
+ }
+ currentSourceFile = node;
+ currentModuleInfo = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
+ moduleInfoMap[ts.getOriginalNodeId(node)] = currentModuleInfo;
+ // Perform the transformation.
+ var transformModule = getTransformModuleDelegate(moduleKind);
+ var updated = transformModule(node);
+ currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ return ts.aggregateTransformFlags(updated);
+ }
+ function shouldEmitUnderscoreUnderscoreESModule() {
+ if (!currentModuleInfo.exportEquals && ts.isExternalModule(currentSourceFile)) {
+ return true;
+ }
+ return false;
}
/**
- * Hooks node substitutions.
+ * Transforms a SourceFile into a CommonJS module.
*
- * @param emitContext The context for the emitter.
- * @param node The node to substitute.
+ * @param node The SourceFile node.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isPropertyAccessExpression(node)) {
- return substitutePropertyAccessExpression(node);
+ function transformCommonJSModule(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- else if (ts.isPropertyAssignment(node)) {
- return substitutePropertyAssignment(node);
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
+ ts.addRange(statements, endLexicalEnvironment());
+ var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ // If we have any `export * from ...` declarations
+ // we need to inform the emitter to add the __export helper.
+ ts.addEmitHelper(updated, exportStarHelper);
}
- return node;
+ return updated;
}
/**
- * Substitutes a PropertyAccessExpression whose name is a reserved word.
+ * Transforms a SourceFile into an AMD module.
*
- * @param node A PropertyAccessExpression
+ * @param node The SourceFile node.
*/
- function substitutePropertyAccessExpression(node) {
- var literalName = trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.createElementAccess(node.expression, literalName, /*location*/ node);
+ function transformAMDModule(node) {
+ var define = ts.createIdentifier("define");
+ var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
+ // An AMD define function has the following shape:
+ //
+ // define(id?, dependencies?, factory);
+ //
+ // This has the shape of the following:
+ //
+ // define(name, ["module1", "module2"], function (module1Alias) { ... }
+ //
+ // The location of the alias in the parameter list in the factory function needs to
+ // match the position of the module name in the dependency list.
+ //
+ // To ensure this is true in cases of modules with no aliases, e.g.:
+ //
+ // import "module"
+ //
+ // or
+ //
+ // /// <amd-dependency path= "a.css" />
+ //
+ // we need to add modules without alias names to the end of the dependencies list
+ var _a = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ // Create an updated SourceFile:
+ //
+ // define(moduleName?, ["module1", "module2"], function ...
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(define,
+ /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([
+ // Add the dependency array argument:
+ //
+ // ["require", "exports", module1", "module2", ...]
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ // Add the module body function argument:
+ //
+ // function (require, exports, module1, module2) ...
+ ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
+ ].concat(importAliasNames),
+ /*type*/ undefined, transformAsynchronousModuleBody(node))
+ ])))
+ ]),
+ /*location*/ node.statements));
+ }
+ /**
+ * Transforms a SourceFile into a UMD module.
+ *
+ * @param node The SourceFile node.
+ */
+ function transformUMDModule(node) {
+ var _a = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
+ var umdHeader = ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "factory")],
+ /*type*/ undefined, ts.setTextRange(ts.createBlock([
+ ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("module"), "object"), ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), "object")), ts.createBlock([
+ ts.createVariableStatement(
+ /*modifiers*/ undefined, [
+ ts.createVariableDeclaration("v",
+ /*type*/ undefined, ts.createCall(ts.createIdentifier("factory"),
+ /*typeArguments*/ undefined, [
+ ts.createIdentifier("require"),
+ ts.createIdentifier("exports")
+ ]))
+ ]),
+ ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1 /* SingleLine */)
+ ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([
+ ts.createStatement(ts.createCall(ts.createIdentifier("define"),
+ /*typeArguments*/ undefined, [
+ ts.createArrayLiteral([
+ ts.createLiteral("require"),
+ ts.createLiteral("exports")
+ ].concat(aliasedModuleNames, unaliasedModuleNames)),
+ ts.createIdentifier("factory")
+ ]))
+ ])))
+ ],
+ /*multiLine*/ true),
+ /*location*/ undefined));
+ // Create an updated SourceFile:
+ //
+ // (function (factory) {
+ // if (typeof module === "object" && typeof module.exports === "object") {
+ // var v = factory(require, exports);
+ // if (v !== undefined) module.exports = v;
+ // }
+ // else if (typeof define === 'function' && define.amd) {
+ // define(["require", "exports"], factory);
+ // }
+ // })(function ...)
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
+ ts.createStatement(ts.createCall(umdHeader,
+ /*typeArguments*/ undefined, [
+ // Add the module body function argument:
+ //
+ // function (require, exports) ...
+ ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
+ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
+ ].concat(importAliasNames),
+ /*type*/ undefined, transformAsynchronousModuleBody(node))
+ ]))
+ ]),
+ /*location*/ node.statements));
+ }
+ /**
+ * Collect the additional asynchronous dependencies for the module.
+ *
+ * @param node The source file.
+ * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies.
+ */
+ function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
+ // names of modules with corresponding parameter in the factory function
+ var aliasedModuleNames = [];
+ // names of modules with no corresponding parameters in factory function
+ var unaliasedModuleNames = [];
+ // names of the parameters in the factory function; these
+ // parameters need to match the indexes of the corresponding
+ // module names in aliasedModuleNames.
+ var importAliasNames = [];
+ // Fill in amd-dependency tags
+ for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
+ var amdDependency = _a[_i];
+ if (amdDependency.name) {
+ aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name));
+ }
+ else {
+ unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
+ }
}
- return node;
+ for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
+ var importNode = _c[_b];
+ // Find the name of the external module
+ var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ // Find the name of the module alias, if there is one
+ var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
+ // It is possible that externalModuleName is undefined if it is not string literal.
+ // This can happen in the invalid import syntax.
+ // E.g : "import * from alias from 'someLib';"
+ if (externalModuleName) {
+ if (includeNonAmdDependencies && importAliasName) {
+ // Set emitFlags on the name of the classDeclaration
+ // This is so that when printer will not substitute the identifier
+ ts.setEmitFlags(importAliasName, 4 /* NoSubstitution */);
+ aliasedModuleNames.push(externalModuleName);
+ importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName));
+ }
+ else {
+ unaliasedModuleNames.push(externalModuleName);
+ }
+ }
+ }
+ return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
}
/**
- * Substitutes a PropertyAssignment whose name is a reserved word.
+ * Transforms a SourceFile into an AMD or UMD module body.
*
- * @param node A PropertyAssignment
+ * @param node The SourceFile node.
*/
- function substitutePropertyAssignment(node) {
- var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
- if (literalName) {
- return ts.updatePropertyAssignment(node, literalName, node.initializer);
+ function transformAsynchronousModuleBody(node) {
+ startLexicalEnvironment();
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ if (shouldEmitUnderscoreUnderscoreESModule()) {
+ ts.append(statements, createUnderscoreUnderscoreESModule());
}
- return node;
+ // Visit each statement of the module body.
+ ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+ ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+ // Append the 'export =' statement if provided.
+ addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true);
+ // End the lexical environment for the module body
+ // and merge any new lexical declarations.
+ ts.addRange(statements, endLexicalEnvironment());
+ var body = ts.createBlock(statements, /*multiLine*/ true);
+ if (currentModuleInfo.hasExportStarsToExportValues) {
+ // If we have any `export * from ...` declarations
+ // we need to inform the emitter to add the __export helper.
+ ts.addEmitHelper(body, exportStarHelper);
+ }
+ return body;
}
/**
- * If an identifier name is a reserved word, returns a string literal for the name.
+ * Adds the down-level representation of `export=` to the statement list if one exists
+ * in the source file.
*
- * @param name An Identifier
+ * @param statements The Statement list to modify.
+ * @param emitAsReturn A value indicating whether to emit the `export=` statement as a
+ * return statement.
*/
- function trySubstituteReservedName(name) {
- var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(name.text) : undefined);
- if (token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */) {
- return ts.createLiteral(name, /*location*/ name);
+ function addExportEqualsIfNeeded(statements, emitAsReturn) {
+ if (currentModuleInfo.exportEquals) {
+ if (emitAsReturn) {
+ var statement = ts.createReturn(currentModuleInfo.exportEquals.expression);
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 1536 /* NoComments */);
+ statements.push(statement);
+ }
+ else {
+ var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression));
+ ts.setTextRange(statement, currentModuleInfo.exportEquals);
+ ts.setEmitFlags(statement, 1536 /* NoComments */);
+ statements.push(statement);
+ }
}
- return undefined;
}
- }
- ts.transformES5 = transformES5;
-})(ts || (ts = {}));
-/// <reference path="../../factory.ts" />
-/// <reference path="../../visitor.ts" />
-/*@internal*/
-var ts;
-(function (ts) {
- function transformES2015Module(context) {
- var compilerOptions = context.getCompilerOptions();
- var previousOnEmitNode = context.onEmitNode;
- var previousOnSubstituteNode = context.onSubstituteNode;
- context.onEmitNode = onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
- context.enableEmitNotification(261 /* SourceFile */);
- context.enableSubstitution(70 /* Identifier */);
- var currentSourceFile;
- return transformSourceFile;
- function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
- return node;
+ //
+ // Top-Level Source Element Visitors
+ //
+ /**
+ * Visits a node at the top level of the source file.
+ *
+ * @param node The node to visit.
+ */
+ function sourceElementVisitor(node) {
+ switch (node.kind) {
+ case 237 /* ImportDeclaration */:
+ return visitImportDeclaration(node);
+ case 236 /* ImportEqualsDeclaration */:
+ return visitImportEqualsDeclaration(node);
+ case 243 /* ExportDeclaration */:
+ return visitExportDeclaration(node);
+ case 242 /* ExportAssignment */:
+ return visitExportAssignment(node);
+ case 207 /* VariableStatement */:
+ return visitVariableStatement(node);
+ case 227 /* FunctionDeclaration */:
+ return visitFunctionDeclaration(node);
+ case 228 /* ClassDeclaration */:
+ return visitClassDeclaration(node);
+ case 296 /* MergeDeclarationMarker */:
+ return visitMergeDeclarationMarker(node);
+ case 297 /* EndOfDeclarationMarker */:
+ return visitEndOfDeclarationMarker(node);
+ default:
+ // This visitor does not descend into the tree, as export/import statements
+ // are only transformed at the top level of a file.
+ return node;
}
- if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
- var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
- if (externalHelpersModuleName) {
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements);
- ts.append(statements, ts.createImportDeclaration(
- /*decorators*/ undefined,
- /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
- ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
- return ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
+ }
+ /**
+ * Visits an ImportDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitImportDeclaration(node) {
+ var statements;
+ var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (!node.importClause) {
+ // import "mod";
+ return ts.setTextRange(ts.createStatement(createRequireCall(node)), node);
}
else {
- return ts.visitEachChild(node, visitor, context);
+ var variables = [];
+ if (namespaceDeclaration && !ts.isDefaultImport(node)) {
+ // import * as n from "mod";
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, createRequireCall(node)));
+ }
+ else {
+ // import d from "mod";
+ // import { x, y } from "mod";
+ // import d, { x, y } from "mod";
+ // import d, * as n from "mod";
+ variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node),
+ /*type*/ undefined, createRequireCall(node)));
+ if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, ts.getGeneratedNameForNode(node)));
+ }
+ }
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList(variables, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)),
+ /*location*/ node));
}
}
+ else if (namespaceDeclaration && ts.isDefaultImport(node)) {
+ // import d, * as n from "mod";
+ statements = ts.append(statements, ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.setTextRange(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
+ /*type*/ undefined, ts.getGeneratedNameForNode(node)),
+ /*location*/ node)
+ ], languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)));
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Creates a `require()` call to import an external module.
+ *
+ * @param importNode The declararation to import.
+ */
+ function createRequireCall(importNode) {
+ var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
+ var args = [];
+ if (moduleName) {
+ args.push(moduleName);
+ }
+ return ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, args);
+ }
+ /**
+ * Visits an ImportEqualsDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitImportEqualsDeclaration(node) {
+ ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
+ var statements;
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(node.name, createRequireCall(node))), node));
+ }
+ else {
+ statements = ts.append(statements, ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getSynthesizedClone(node.name),
+ /*type*/ undefined, createRequireCall(node))
+ ],
+ /*flags*/ languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)), node));
+ }
+ }
+ else {
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node))), node));
+ }
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfImportEqualsDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits an ExportDeclaration node.
+ *
+ * @param The node to visit.
+ */
+ function visitExportDeclaration(node) {
+ if (!node.moduleSpecifier) {
+ // Elide export declarations with no module specifier as they are handled
+ // elsewhere.
+ return undefined;
+ }
+ var generatedName = ts.getGeneratedNameForNode(node);
+ if (node.exportClause) {
+ var statements = [];
+ // export { x, y } from "mod";
+ if (moduleKind !== ts.ModuleKind.AMD) {
+ statements.push(ts.setTextRange(ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(generatedName,
+ /*type*/ undefined, createRequireCall(node))
+ ])),
+ /*location*/ node));
+ }
+ for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
+ var specifier = _a[_i];
+ var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
+ statements.push(ts.setTextRange(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue)), specifier));
+ }
+ return ts.singleOrMany(statements);
+ }
+ else {
+ // export * from "mod";
+ return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
+ /*typeArguments*/ undefined, [
+ moduleKind !== ts.ModuleKind.AMD
+ ? createRequireCall(node)
+ : generatedName
+ ])), node);
+ }
+ }
+ /**
+ * Visits an ExportAssignment node.
+ *
+ * @param node The node to visit.
+ */
+ function visitExportAssignment(node) {
+ if (node.isExportEquals) {
+ return undefined;
+ }
+ var statements;
+ var original = node.original;
+ if (original && hasAssociatedEndOfDeclarationMarker(original)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
+ }
+ else {
+ statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a FunctionDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitFunctionDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createFunctionDeclaration(
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ /*typeParameters*/ undefined, node.parameters,
+ /*type*/ undefined, node.body),
+ /*location*/ node),
+ /*original*/ node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a ClassDeclaration node.
+ *
+ * @param node The node to visit.
+ */
+ function visitClassDeclaration(node) {
+ var statements;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(
+ /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ /*typeParameters*/ undefined, node.heritageClauses, node.members), node), node));
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfHoistedDeclaration(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Visits a VariableStatement node.
+ *
+ * @param node The node to visit.
+ */
+ function visitVariableStatement(node) {
+ var statements;
+ var variables;
+ var expressions;
+ if (ts.hasModifier(node, 1 /* Export */)) {
+ var modifiers = void 0;
+ // If we're exporting these variables, then these just become assignments to 'exports.x'.
+ // We only want to emit assignments for variables with initializers.
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var variable = _a[_i];
+ if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
+ if (!modifiers) {
+ modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
+ }
+ variables = ts.append(variables, variable);
+ }
+ else if (variable.initializer) {
+ expressions = ts.append(expressions, transformInitializedVariable(variable));
+ }
+ }
+ if (variables) {
+ statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
+ }
+ if (expressions) {
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
+ }
+ }
+ else {
+ statements = ts.append(statements, node);
+ }
+ if (hasAssociatedEndOfDeclarationMarker(node)) {
+ // Defer exports until we encounter an EndOfDeclarationMarker node
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
+ }
+ else {
+ statements = appendExportsOfVariableStatement(statements, node);
+ }
+ return ts.singleOrMany(statements);
+ }
+ /**
+ * Transforms an exported variable with an initializer into an expression.
+ *
+ * @param node The node to transform.
+ */
+ function transformInitializedVariable(node) {
+ if (ts.isBindingPattern(node.name)) {
+ return ts.flattenDestructuringAssignment(node,
+ /*visitor*/ undefined, context, 0 /* All */,
+ /*needsValue*/ false, createExportExpression);
+ }
+ else {
+ return ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name),
+ /*location*/ node.name), node.initializer);
+ }
+ }
+ /**
+ * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
+ * and transformed declaration.
+ *
+ * @param node The node to visit.
+ */
+ function visitMergeDeclarationMarker(node) {
+ // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding
+ // declaration we do not emit a leading variable declaration. To preserve the
+ // begin/end semantics of the declararation and to properly handle exports
+ // we wrapped the leading variable declaration in a `MergeDeclarationMarker`.
+ //
+ // To balance the declaration, add the exports of the elided variable
+ // statement.
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) {
+ var id = ts.getOriginalNodeId(node);
+ deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
+ }
return node;
}
- function visitor(node) {
+ /**
+ * Determines whether a node has an associated EndOfDeclarationMarker.
+ *
+ * @param node The node to test.
+ */
+ function hasAssociatedEndOfDeclarationMarker(node) {
+ return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ }
+ /**
+ * Visits a DeclarationMarker used as a placeholder for the end of a transformed
+ * declaration.
+ *
+ * @param node The node to visit.
+ */
+ function visitEndOfDeclarationMarker(node) {
+ // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual
+ // end of the transformed declaration. We use this marker to emit any deferred exports
+ // of the declaration.
+ var id = ts.getOriginalNodeId(node);
+ var statements = deferredExports[id];
+ if (statements) {
+ delete deferredExports[id];
+ return ts.append(statements, node);
+ }
+ return node;
+ }
+ /**
+ * Appends the exports of an ImportDeclaration to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfImportDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ var importClause = decl.importClause;
+ if (!importClause) {
+ return statements;
+ }
+ if (importClause.name) {
+ statements = appendExportsOfDeclaration(statements, importClause);
+ }
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings) {
+ switch (namedBindings.kind) {
+ case 239 /* NamespaceImport */:
+ statements = appendExportsOfDeclaration(statements, namedBindings);
+ break;
+ case 240 /* NamedImports */:
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var importBinding = _a[_i];
+ statements = appendExportsOfDeclaration(statements, importBinding);
+ }
+ break;
+ }
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfImportEqualsDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ return appendExportsOfDeclaration(statements, decl);
+ }
+ /**
+ * Appends the exports of a VariableStatement to a statement list, returning the statement
+ * list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param node The VariableStatement whose exports are to be recorded.
+ */
+ function appendExportsOfVariableStatement(statements, node) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ statements = appendExportsOfBindingElement(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a VariableDeclaration or BindingElement to a statement list,
+ * returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfBindingElement(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.isBindingPattern(decl.name)) {
+ for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ if (!ts.isOmittedExpression(element)) {
+ statements = appendExportsOfBindingElement(statements, element);
+ }
+ }
+ }
+ else if (!ts.isGeneratedIdentifier(decl.name)) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list,
+ * returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration whose exports are to be recorded.
+ */
+ function appendExportsOfHoistedDeclaration(statements, decl) {
+ if (currentModuleInfo.exportEquals) {
+ return statements;
+ }
+ if (ts.hasModifier(decl, 1 /* Export */)) {
+ var exportName = ts.hasModifier(decl, 512 /* Default */) ? ts.createIdentifier("default") : decl.name;
+ statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), /*location*/ decl);
+ }
+ if (decl.name) {
+ statements = appendExportsOfDeclaration(statements, decl);
+ }
+ return statements;
+ }
+ /**
+ * Appends the exports of a declaration to a statement list, returning the statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param decl The declaration to export.
+ */
+ function appendExportsOfDeclaration(statements, decl) {
+ var name = ts.getDeclarationName(decl);
+ var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name.text);
+ if (exportSpecifiers) {
+ for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
+ var exportSpecifier = exportSpecifiers_1[_i];
+ statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name);
+ }
+ }
+ return statements;
+ }
+ /**
+ * Appends the down-level representation of an export to a statement list, returning the
+ * statement list.
+ *
+ * @param statements A statement list to which the down-level export statements are to be
+ * appended. If `statements` is `undefined`, a new array is allocated if statements are
+ * appended.
+ * @param exportName The name of the export.
+ * @param expression The expression to export.
+ * @param location The location to use for source maps and comments for the export.
+ * @param allowComments Whether to allow comments on the export.
+ */
+ function appendExportStatement(statements, exportName, expression, location, allowComments) {
+ statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
+ return statements;
+ }
+ function createUnderscoreUnderscoreESModule() {
+ var statement;
+ if (languageVersion === 0 /* ES3 */) {
+ statement = ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(/*value*/ true)));
+ }
+ else {
+ statement = ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
+ /*typeArguments*/ undefined, [
+ ts.createIdentifier("exports"),
+ ts.createLiteral("__esModule"),
+ ts.createObjectLiteral([
+ ts.createPropertyAssignment("value", ts.createLiteral(/*value*/ true))
+ ])
+ ]));
+ }
+ ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ return statement;
+ }
+ /**
+ * Creates a call to the current file's export function to export a value.
+ *
+ * @param name The bound name of the export.
+ * @param value The exported value.
+ * @param location The location to use for source maps and comments for the export.
+ * @param allowComments An optional value indicating whether to emit comments for the statement.
+ */
+ function createExportStatement(name, value, location, allowComments) {
+ var statement = ts.setTextRange(ts.createStatement(createExportExpression(name, value)), location);
+ ts.startOnNewLine(statement);
+ if (!allowComments) {
+ ts.setEmitFlags(statement, 1536 /* NoComments */);
+ }
+ return statement;
+ }
+ /**
+ * Creates a call to the current file's export function to export a value.
+ *
+ * @param name The bound name of the export.
+ * @param value The exported value.
+ * @param location The location to use for source maps and comments for the export.
+ */
+ function createExportExpression(name, value, location) {
+ return ts.setTextRange(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value), location);
+ }
+ //
+ // Modifier Visitors
+ //
+ /**
+ * Visit nodes to elide module-specific modifiers.
+ *
+ * @param node The node to visit.
+ */
+ function modifierVisitor(node) {
+ // Elide module-specific modifiers.
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
- // Elide `import=` as it is not legal with --module ES6
+ case 83 /* ExportKeyword */:
+ case 78 /* DefaultKeyword */:
return undefined;
- case 240 /* ExportAssignment */:
- return visitExportAssignment(node);
}
return node;
}
- function visitExportAssignment(node) {
- // Elide `export=` as it is not legal with --module ES6
- return node.isExportEquals ? undefined : node;
- }
//
// Emit Notification
//
/**
- * Hook for node emit.
+ * Hook for node emit notifications.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (ts.isSourceFile(node)) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264 /* SourceFile */) {
currentSourceFile = node;
- previousOnEmitNode(emitContext, node, emitCallback);
+ currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
+ noSubstitution = [];
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
+ currentModuleInfo = undefined;
+ noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -54342,30 +59434,192 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (ts.isIdentifier(node) && emitContext === 1 /* Expression */) {
- return substituteExpressionIdentifier(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (node.id && noSubstitution[node.id]) {
+ return node;
+ }
+ if (hint === 1 /* Expression */) {
+ return substituteExpression(node);
+ }
+ else if (ts.isShorthandPropertyAssignment(node)) {
+ return substituteShorthandPropertyAssignment(node);
+ }
+ return node;
+ }
+ /**
+ * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported
+ * or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteShorthandPropertyAssignment(node) {
+ var name = node.name;
+ var exportedOrImportedName = substituteExpressionIdentifier(name);
+ if (exportedOrImportedName !== name) {
+ // A shorthand property with an assignment initializer is probably part of a
+ // destructuring assignment
+ if (node.objectAssignmentInitializer) {
+ var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
+ return ts.setTextRange(ts.createPropertyAssignment(name, initializer), node);
+ }
+ return ts.setTextRange(ts.createPropertyAssignment(name, exportedOrImportedName), node);
+ }
+ return node;
+ }
+ /**
+ * Substitution for an Expression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteExpression(node) {
+ switch (node.kind) {
+ case 70 /* Identifier */:
+ return substituteExpressionIdentifier(node);
+ case 193 /* BinaryExpression */:
+ return substituteBinaryExpression(node);
+ case 192 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ return substituteUnaryExpression(node);
}
return node;
}
+ /**
+ * Substitution for an Identifier expression that may contain an imported or exported
+ * symbol.
+ *
+ * @param node The node to substitute.
+ */
function substituteExpressionIdentifier(node) {
if (ts.getEmitFlags(node) & 4096 /* HelperName */) {
var externalHelpersModuleName = ts.getExternalHelpersModuleName(currentSourceFile);
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
+ return node;
+ }
+ if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
+ var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
+ if (exportContainer && exportContainer.kind === 264 /* SourceFile */) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node)),
+ /*location*/ node);
+ }
+ var importDeclaration = resolver.getReferencedImportDeclaration(node);
+ if (importDeclaration) {
+ if (ts.isImportClause(importDeclaration)) {
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")),
+ /*location*/ node);
+ }
+ else if (ts.isImportSpecifier(importDeclaration)) {
+ var name = importDeclaration.propertyName || importDeclaration.name;
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name)),
+ /*location*/ node);
+ }
+ }
}
return node;
}
+ /**
+ * Substitution for a BinaryExpression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteBinaryExpression(node) {
+ // When we see an assignment expression whose left-hand side is an exported symbol,
+ // we should ensure all exports of that symbol are updated with the correct value.
+ //
+ // - We do not substitute generated identifiers for any reason.
+ // - We do not substitute identifiers tagged with the LocalName flag.
+ // - We do not substitute identifiers that were originally the name of an enum or
+ // namespace due to how they are transformed in TypeScript.
+ // - We only substitute identifiers that are exported at the top level.
+ if (ts.isAssignmentOperator(node.operatorToken.kind)
+ && ts.isIdentifier(node.left)
+ && !ts.isGeneratedIdentifier(node.left)
+ && !ts.isLocalName(node.left)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
+ var exportedNames = getExports(node.left);
+ if (exportedNames) {
+ // For each additional export of the declaration, apply an export assignment.
+ var expression = node;
+ for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
+ var exportName = exportedNames_1[_i];
+ // Mark the node to prevent triggering this rule again.
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression, /*location*/ node);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ /**
+ * Substitution for a UnaryExpression that may contain an imported or exported symbol.
+ *
+ * @param node The node to substitute.
+ */
+ function substituteUnaryExpression(node) {
+ // When we see a prefix or postfix increment expression whose operand is an exported
+ // symbol, we should ensure all exports of that symbol are updated with the correct
+ // value.
+ //
+ // - We do not substitute generated identifiers for any reason.
+ // - We do not substitute identifiers tagged with the LocalName flag.
+ // - We do not substitute identifiers that were originally the name of an enum or
+ // namespace due to how they are transformed in TypeScript.
+ // - We only substitute identifiers that are exported at the top level.
+ if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */)
+ && ts.isIdentifier(node.operand)
+ && !ts.isGeneratedIdentifier(node.operand)
+ && !ts.isLocalName(node.operand)
+ && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
+ var exportedNames = getExports(node.operand);
+ if (exportedNames) {
+ var expression = node.kind === 192 /* PostfixUnaryExpression */
+ ? ts.setTextRange(ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1)),
+ /*location*/ node)
+ : node;
+ for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
+ var exportName = exportedNames_2[_i];
+ // Mark the node to prevent triggering this rule again.
+ noSubstitution[ts.getNodeId(expression)] = true;
+ expression = createExportExpression(exportName, expression);
+ }
+ return expression;
+ }
+ }
+ return node;
+ }
+ /**
+ * Gets the additional exports of a name.
+ *
+ * @param name The name.
+ */
+ function getExports(name) {
+ if (!ts.isGeneratedIdentifier(name)) {
+ var valueDeclaration = resolver.getReferencedImportDeclaration(name)
+ || resolver.getReferencedValueDeclaration(name);
+ if (valueDeclaration) {
+ return currentModuleInfo
+ && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
+ }
+ }
+ }
}
- ts.transformES2015Module = transformES2015Module;
+ ts.transformModule = transformModule;
+ // emit output for the __export helper function
+ var exportStarHelper = {
+ name: "typescript:export-star",
+ scoped: true,
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
+ };
})(ts || (ts = {}));
/// <reference path="../../factory.ts" />
/// <reference path="../../visitor.ts" />
+/// <reference path="../destructuring.ts" />
/*@internal*/
var ts;
(function (ts) {
@@ -54379,14 +59633,14 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
context.onEmitNode = onEmitNode;
context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers for imported symbols.
- context.enableSubstitution(192 /* BinaryExpression */); // Substitutes assignments to exported symbols.
- context.enableSubstitution(190 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(191 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableEmitNotification(261 /* SourceFile */); // Restore state when substituting nodes in a file.
- var moduleInfoMap = ts.createMap(); // The ExternalModuleInfo for each file.
- var deferredExports = ts.createMap(); // Exports to defer until an EndOfDeclarationMarker is found.
- var exportFunctionsMap = ts.createMap(); // The export function associated with a source file.
- var noSubstitutionMap = ts.createMap(); // Set of nodes for which substitution rules should be ignored for each file.
+ context.enableSubstitution(193 /* BinaryExpression */); // Substitutes assignments to exported symbols.
+ context.enableSubstitution(191 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableSubstitution(192 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
+ context.enableEmitNotification(264 /* SourceFile */); // Restore state when substituting nodes in a file.
+ var moduleInfoMap = []; // The ExternalModuleInfo for each file.
+ var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
+ var exportFunctionsMap = []; // The export function associated with a source file.
+ var noSubstitutionMap = []; // Set of nodes for which substitution rules should be ignored for each file.
var currentSourceFile; // The current file.
var moduleInfo; // ExternalModuleInfo for the current file.
var exportFunction; // The export function for the current file.
@@ -54425,7 +59679,8 @@ var ts;
moduleInfo = moduleInfoMap[id] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
// Make sure that the name of the 'exports' function does not conflict with
// existing identifiers.
- exportFunction = exportFunctionsMap[id] = ts.createUniqueName("exports");
+ exportFunction = ts.createUniqueName("exports");
+ exportFunctionsMap[id] = exportFunction;
contextObject = ts.createUniqueName("context");
// Add the body of the module.
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
@@ -54444,12 +59699,12 @@ var ts;
// So the helper will be emit at the correct position instead of at the top of the source-file
var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
var dependencies = ts.createArrayLiteral(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray([
+ var updated = ts.setEmitFlags(ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([
ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("System"), "register"),
/*typeArguments*/ undefined, moduleName
? [moduleName, dependencies, moduleBodyFunction]
: [dependencies, moduleBodyFunction]))
- ], node.statements));
+ ]), node.statements)), 1024 /* NoTrailingComments */);
if (!(compilerOptions.outFile || compilerOptions.out)) {
ts.moveEmitHelpers(updated, moduleBodyBlock, function (helper) { return !helper.scoped; });
}
@@ -54476,18 +59731,20 @@ var ts;
for (var i = 0; i < externalImports.length; i++) {
var externalImport = externalImports[i];
var externalModuleName = ts.getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions);
- var text = externalModuleName.text;
- if (ts.hasProperty(groupIndices, text)) {
- // deduplicate/group entries in dependency list by the dependency name
- var groupIndex = groupIndices[text];
- dependencyGroups[groupIndex].externalImports.push(externalImport);
- }
- else {
- groupIndices[text] = dependencyGroups.length;
- dependencyGroups.push({
- name: externalModuleName,
- externalImports: [externalImport]
- });
+ if (externalModuleName) {
+ var text = externalModuleName.text;
+ var groupIndex = groupIndices.get(text);
+ if (groupIndex !== undefined) {
+ // deduplicate/group entries in dependency list by the dependency name
+ dependencyGroups[groupIndex].externalImports.push(externalImport);
+ }
+ else {
+ groupIndices.set(text, dependencyGroups.length);
+ dependencyGroups.push({
+ name: externalModuleName,
+ externalImports: [externalImport]
+ });
+ }
}
}
return dependencyGroups;
@@ -54545,7 +59802,8 @@ var ts;
// only in the outer module body and not in the inner one.
startLexicalEnvironment();
// Add any prologue directives.
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+ var ensureUseStrict = compilerOptions.alwaysStrict || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
+ var statementOffset = ts.addPrologue(statements, node.statements, ensureUseStrict, sourceElementVisitor);
// var __moduleName = context_1 && context_1.id;
statements.push(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
@@ -54553,7 +59811,7 @@ var ts;
/*type*/ undefined, ts.createLogicalAnd(contextObject, ts.createPropertyAccess(contextObject, "id")))
])));
// Visit the synthetic external helpers import declaration if present
- ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true);
+ ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
// Visit the statements of the source file, emitting any transformations into
// the `executeStatements` array. We do this *before* we fill the `setters` array
// as we both emit transformations as well as aggregate some data used when creating
@@ -54567,7 +59825,7 @@ var ts;
// - Temporary variables will appear at the top rather than at the bottom of the file
ts.addRange(statements, endLexicalEnvironment());
var exportStarFunction = addExportStarIfNeeded(statements);
- statements.push(ts.createReturn(ts.setMultiLine(ts.createObjectLiteral([
+ var moduleObject = ts.createObjectLiteral([
ts.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
ts.createPropertyAssignment("execute", ts.createFunctionExpression(
/*modifiers*/ undefined,
@@ -54575,12 +59833,11 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined,
/*parameters*/ [],
- /*type*/ undefined, ts.createBlock(executeStatements,
- /*location*/ undefined,
- /*multiLine*/ true)))
- ]),
- /*multiLine*/ true)));
- return ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true);
+ /*type*/ undefined, ts.createBlock(executeStatements, /*multiLine*/ true)))
+ ]);
+ moduleObject.multiLine = true;
+ statements.push(ts.createReturn(moduleObject));
+ return ts.createBlock(statements, /*multiLine*/ true);
}
/**
* Adds an exportStar function to a statement list if it is needed for the file.
@@ -54596,13 +59853,13 @@ var ts;
// to support this we store names of local/indirect exported entries in a set.
// this set is used to filter names brought by star expors.
// local names set should only be added if we have anything exported
- if (!moduleInfo.exportedNames && ts.isEmpty(moduleInfo.exportSpecifiers)) {
+ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) {
// no exported declarations (export var ...) or export specifiers (export {x})
// check if we have any non star export declarations.
var hasExportDeclarationWithExportClause = false;
for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
var externalImport = _a[_i];
- if (externalImport.kind === 241 /* ExportDeclaration */ && externalImport.exportClause) {
+ if (externalImport.kind === 243 /* ExportDeclaration */ && externalImport.exportClause) {
hasExportDeclarationWithExportClause = true;
break;
}
@@ -54622,12 +59879,12 @@ var ts;
continue;
}
// write name of exported declaration, i.e 'export var x...'
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral(exportedLocalName), ts.createTrue()));
}
}
for (var _d = 0, _e = moduleInfo.externalImports; _d < _e.length; _d++) {
var externalImport = _e[_d];
- if (externalImport.kind !== 241 /* ExportDeclaration */) {
+ if (externalImport.kind !== 243 /* ExportDeclaration */) {
continue;
}
var exportDecl = externalImport;
@@ -54638,14 +59895,14 @@ var ts;
for (var _f = 0, _g = exportDecl.exportClause.elements; _f < _g.length; _f++) {
var element = _g[_f];
// write name of indirectly exported entry, i.e. 'export {x} from ...'
- exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createLiteral(true)));
+ exportedNames.push(ts.createPropertyAssignment(ts.createLiteral((element.name || element.propertyName).text), ts.createTrue()));
}
}
var exportedNamesStorageRef = ts.createUniqueName("exportedNames");
statements.push(ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(exportedNamesStorageRef,
- /*type*/ undefined, ts.createObjectLiteral(exportedNames, /*location*/ undefined, /*multiline*/ true))
+ /*type*/ undefined, ts.createObjectLiteral(exportedNames, /*multiline*/ true))
])));
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
statements.push(exportStarFunction);
@@ -54686,9 +59943,7 @@ var ts;
])),
ts.createStatement(ts.createCall(exportFunction,
/*typeArguments*/ undefined, [exports]))
- ],
- /*location*/ undefined,
- /*multiline*/ true));
+ ], /*multiline*/ true));
}
/**
* Creates an array setter callbacks for each dependency group.
@@ -54708,19 +59963,19 @@ var ts;
var entry = _b[_a];
var importVariableName = ts.getLocalNameForExternalImport(entry, currentSourceFile);
switch (entry.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
if (!entry.importClause) {
// 'import "..."' case
// module is imported only for side-effects, no emit required
break;
}
- // fall-through
- case 234 /* ImportEqualsDeclaration */:
+ // falls through
+ case 236 /* ImportEqualsDeclaration */:
ts.Debug.assert(importVariableName !== undefined);
// save import into the local
statements.push(ts.createStatement(ts.createAssignment(importVariableName, parameterName)));
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
ts.Debug.assert(importVariableName !== undefined);
if (entry.exportClause) {
// export {a, b as c} from 'foo'
@@ -54737,7 +59992,7 @@ var ts;
properties.push(ts.createPropertyAssignment(ts.createLiteral(e.name.text), ts.createElementAccess(parameterName, ts.createLiteral((e.propertyName || e.name).text))));
}
statements.push(ts.createStatement(ts.createCall(exportFunction,
- /*typeArguments*/ undefined, [ts.createObjectLiteral(properties, /*location*/ undefined, /*multiline*/ true)])));
+ /*typeArguments*/ undefined, [ts.createObjectLiteral(properties, /*multiline*/ true)])));
}
else {
// export * from 'foo'
@@ -54756,9 +60011,9 @@ var ts;
/*asteriskToken*/ undefined,
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
- /*type*/ undefined, ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true)));
+ /*type*/ undefined, ts.createBlock(statements, /*multiLine*/ true)));
}
- return ts.createArrayLiteral(setters, /*location*/ undefined, /*multiLine*/ true);
+ return ts.createArrayLiteral(setters, /*multiLine*/ true);
}
//
// Top-level Source Element Visitors
@@ -54770,15 +60025,15 @@ var ts;
*/
function sourceElementVisitor(node) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return visitImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// ExportDeclarations are elided as they are handled via
// `appendExportsOfDeclaration`.
return undefined;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return visitExportAssignment(node);
default:
return nestedElementVisitor(node);
@@ -54851,7 +60106,7 @@ var ts;
*/
function visitFunctionDeclaration(node) {
if (ts.hasModifier(node, 1 /* Export */)) {
- hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
+ hoistedStatements = ts.append(hoistedStatements, ts.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, destructuringVisitor, ts.isParameterDeclaration),
/*type*/ undefined, ts.visitNode(node.body, destructuringVisitor, ts.isBlock)));
}
@@ -54879,11 +60134,9 @@ var ts;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
// Rewrite the class declaration into an assignment of a class expression.
- statements = ts.append(statements, ts.createStatement(ts.createAssignment(name, ts.createClassExpression(
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(
/*modifiers*/ undefined, node.name,
- /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement),
- /*location*/ node)),
- /*location*/ node));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
var id = ts.getOriginalNodeId(node);
@@ -54918,7 +60171,7 @@ var ts;
}
var statements;
if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), /*location*/ node));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.inlineExpressions(expressions)), node));
}
if (isMarkedDeclaration) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -54956,7 +60209,7 @@ var ts;
function shouldHoistVariableDeclarationList(node) {
// hoist only non-block scoped declarations or block scoped declarations parented by source file
return (ts.getEmitFlags(node) & 1048576 /* NoHoisting */) === 0
- && (enclosingBlockScopedContainer.kind === 261 /* SourceFile */
+ && (enclosingBlockScopedContainer.kind === 264 /* SourceFile */
|| (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0);
}
/**
@@ -55003,8 +60256,8 @@ var ts;
function createVariableAssignment(name, value, location, isExportedDeclaration) {
hoistVariableDeclaration(ts.getSynthesizedClone(name));
return isExportedDeclaration
- ? createExportExpression(name, preventSubstitution(ts.createAssignment(name, value, location)))
- : preventSubstitution(ts.createAssignment(name, value, location));
+ ? createExportExpression(name, preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location)))
+ : preventSubstitution(ts.setTextRange(ts.createAssignment(name, value), location));
}
/**
* Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
@@ -55020,7 +60273,7 @@ var ts;
//
// To balance the declaration, we defer the exports of the elided variable
// statement until we visit this declaration's `EndOfDeclarationMarker`.
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205 /* VariableStatement */) {
+ if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 207 /* VariableStatement */) {
var id = ts.getOriginalNodeId(node);
var isExportedDeclaration = ts.hasModifier(node.original, 1 /* Export */);
deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -55076,10 +60329,10 @@ var ts;
var namedBindings = importClause.namedBindings;
if (namedBindings) {
switch (namedBindings.kind) {
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
statements = appendExportsOfDeclaration(statements, namedBindings);
break;
- case 238 /* NamedImports */:
+ case 240 /* NamedImports */:
for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
var importBinding = _a[_i];
statements = appendExportsOfDeclaration(statements, importBinding);
@@ -55197,10 +60450,10 @@ var ts;
return statements;
}
var name = ts.getDeclarationName(decl);
- var exportSpecifiers = moduleInfo.exportSpecifiers[name.text];
+ var exportSpecifiers = moduleInfo.exportSpecifiers.get(name.text);
if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
- var exportSpecifier = exportSpecifiers_1[_i];
+ for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
+ var exportSpecifier = exportSpecifiers_2[_i];
if (exportSpecifier.name.text !== excludeName) {
statements = appendExportStatement(statements, exportSpecifier.name, name);
}
@@ -55258,43 +60511,43 @@ var ts;
*/
function nestedElementVisitor(node) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return visitVariableStatement(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return visitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return visitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return visitForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return visitForOfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return visitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return visitWhileStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return visitLabeledStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return visitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return visitSwitchStatement(node);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return visitCaseBlock(node);
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return visitCaseClause(node);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return visitDefaultClause(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return visitTryStatement(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return visitCatchClause(node);
- case 204 /* Block */:
+ case 206 /* Block */:
return visitBlock(node);
- case 295 /* MergeDeclarationMarker */:
+ case 296 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 296 /* EndOfDeclarationMarker */:
+ case 297 /* EndOfDeclarationMarker */:
return visitEndOfDeclarationMarker(node);
default:
return destructuringVisitor(node);
@@ -55308,7 +60561,7 @@ var ts;
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression, /*optional*/ true), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55320,7 +60573,7 @@ var ts;
function visitForInStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55332,7 +60585,7 @@ var ts;
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- node = ts.updateForOf(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -55352,6 +60605,9 @@ var ts;
* @param node The node to visit.
*/
function visitForInitializer(node) {
+ if (!node) {
+ return node;
+ }
if (shouldHoistForInitializer(node)) {
var expressions = void 0;
for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) {
@@ -55370,7 +60626,7 @@ var ts;
* @param node The node to visit.
*/
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
+ return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression));
}
/**
* Visits the body of a WhileStatement to hoist declarations.
@@ -55378,7 +60634,7 @@ var ts;
* @param node The node to visit.
*/
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a LabeledStatement to hoist declarations.
@@ -55386,7 +60642,7 @@ var ts;
* @param node The node to visit.
*/
function visitLabeledStatement(node) {
- return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateLabel(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a WithStatement to hoist declarations.
@@ -55394,7 +60650,7 @@ var ts;
* @param node The node to visit.
*/
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, /*optional*/ false, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a SwitchStatement to hoist declarations.
@@ -55474,7 +60730,7 @@ var ts;
*/
function destructuringVisitor(node) {
if (node.transformFlags & 1024 /* DestructuringAssignment */
- && node.kind === 192 /* BinaryExpression */) {
+ && node.kind === 193 /* BinaryExpression */) {
return visitDestructuringAssignment(node);
}
else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) {
@@ -55502,7 +60758,7 @@ var ts;
* @param node The destructuring target.
*/
function hasExportedReferenceInDestructuringTarget(node) {
- if (ts.isAssignmentExpression(node)) {
+ if (ts.isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
else if (ts.isSpreadExpression(node)) {
@@ -55522,7 +60778,7 @@ var ts;
}
else if (ts.isIdentifier(node)) {
var container = resolver.getReferencedExportContainer(node);
- return container !== undefined && container.kind === 261 /* SourceFile */;
+ return container !== undefined && container.kind === 264 /* SourceFile */;
}
else {
return false;
@@ -55550,12 +60806,12 @@ var ts;
/**
* Hook for node emit notifications.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
- * @param emit A callback used to emit the node in the printer.
+ * @param emitCallback A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261 /* SourceFile */) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (node.kind === 264 /* SourceFile */) {
var id = ts.getOriginalNodeId(node);
currentSourceFile = node;
moduleInfo = moduleInfoMap[id];
@@ -55564,14 +60820,14 @@ var ts;
if (noSubstitution) {
delete noSubstitutionMap[id];
}
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
moduleInfo = undefined;
exportFunction = undefined;
noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -55580,15 +60836,15 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
if (isSubstitutionPrevented(node)) {
return node;
}
- if (emitContext === 1 /* Expression */) {
+ if (hint === 1 /* Expression */) {
return substituteExpression(node);
}
return node;
@@ -55602,10 +60858,10 @@ var ts;
switch (node.kind) {
case 70 /* Identifier */:
return substituteExpressionIdentifier(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return substituteBinaryExpression(node);
- case 190 /* PrefixUnaryExpression */:
- case 191 /* PostfixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return substituteUnaryExpression(node);
}
return node;
@@ -55633,11 +60889,11 @@ var ts;
var importDeclaration = resolver.getReferencedImportDeclaration(node);
if (importDeclaration) {
if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"),
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default")),
/*location*/ node);
}
else if (ts.isImportSpecifier(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name),
+ return ts.setTextRange(ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name)),
/*location*/ node);
}
}
@@ -55667,8 +60923,8 @@ var ts;
if (exportedNames) {
// For each additional export of the declaration, apply an export assignment.
var expression = node;
- for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
- var exportName = exportedNames_1[_i];
+ for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
+ var exportName = exportedNames_3[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
return expression;
@@ -55698,15 +60954,14 @@ var ts;
&& !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
var exportedNames = getExports(node.operand);
if (exportedNames) {
- var expression = node.kind === 191 /* PostfixUnaryExpression */
- ? ts.createPrefix(node.operator, node.operand,
- /*location*/ node)
+ var expression = node.kind === 192 /* PostfixUnaryExpression */
+ ? ts.setTextRange(ts.createPrefix(node.operator, node.operand), node)
: node;
- for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
- var exportName = exportedNames_2[_i];
+ for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
+ var exportName = exportedNames_4[_i];
expression = createExportExpression(exportName, preventSubstitution(expression));
}
- if (node.kind === 191 /* PostfixUnaryExpression */) {
+ if (node.kind === 192 /* PostfixUnaryExpression */) {
expression = node.operator === 42 /* PlusPlusToken */
? ts.createSubtract(preventSubstitution(expression), ts.createLiteral(1))
: ts.createAdd(preventSubstitution(expression), ts.createLiteral(1));
@@ -55728,7 +60983,7 @@ var ts;
|| resolver.getReferencedValueDeclaration(name);
if (valueDeclaration) {
var exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false);
- if (exportContainer && exportContainer.kind === 261 /* SourceFile */) {
+ if (exportContainer && exportContainer.kind === 264 /* SourceFile */) {
exportedNames = ts.append(exportedNames, ts.getDeclarationName(valueDeclaration));
}
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -55743,7 +60998,7 @@ var ts;
*/
function preventSubstitution(node) {
if (noSubstitution === undefined)
- noSubstitution = ts.createMap();
+ noSubstitution = [];
noSubstitution[ts.getNodeId(node)] = true;
return node;
}
@@ -55763,852 +61018,69 @@ var ts;
/*@internal*/
var ts;
(function (ts) {
- function transformModule(context) {
- var transformModuleDelegates = ts.createMap((_a = {},
- _a[ts.ModuleKind.None] = transformCommonJSModule,
- _a[ts.ModuleKind.CommonJS] = transformCommonJSModule,
- _a[ts.ModuleKind.AMD] = transformAMDModule,
- _a[ts.ModuleKind.UMD] = transformUMDModule,
- _a));
- var startLexicalEnvironment = context.startLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment;
+ function transformES2015Module(context) {
var compilerOptions = context.getCompilerOptions();
- var resolver = context.getEmitResolver();
- var host = context.getEmitHost();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
- var moduleKind = ts.getEmitModuleKind(compilerOptions);
- var previousOnSubstituteNode = context.onSubstituteNode;
var previousOnEmitNode = context.onEmitNode;
- context.onSubstituteNode = onSubstituteNode;
+ var previousOnSubstituteNode = context.onSubstituteNode;
context.onEmitNode = onEmitNode;
- context.enableSubstitution(70 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols.
- context.enableSubstitution(192 /* BinaryExpression */); // Substitutes assignments to exported symbols.
- context.enableSubstitution(190 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(191 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols.
- context.enableSubstitution(258 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
- context.enableEmitNotification(261 /* SourceFile */); // Restore state when substituting nodes in a file.
- var moduleInfoMap = ts.createMap(); // The ExternalModuleInfo for each file.
- var deferredExports = ts.createMap(); // Exports to defer until an EndOfDeclarationMarker is found.
- var currentSourceFile; // The current file.
- var currentModuleInfo; // The ExternalModuleInfo for the current file.
- var noSubstitution; // Set of nodes for which substitution rules should be ignored.
+ context.onSubstituteNode = onSubstituteNode;
+ context.enableEmitNotification(264 /* SourceFile */);
+ context.enableSubstitution(70 /* Identifier */);
+ var currentSourceFile;
return transformSourceFile;
- /**
- * Transforms the module aspects of a SourceFile.
- *
- * @param node The SourceFile node.
- */
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (ts.isDeclarationFile(node)) {
return node;
}
- currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(node)] = ts.collectExternalModuleInfo(node, resolver, compilerOptions);
- // Perform the transformation.
- var transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ts.ModuleKind.None];
- var updated = transformModule(node);
- currentSourceFile = undefined;
- currentModuleInfo = undefined;
- return ts.aggregateTransformFlags(updated);
- }
- /**
- * Transforms a SourceFile into a CommonJS module.
- *
- * @param node The SourceFile node.
- */
- function transformCommonJSModule(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- ts.addRange(statements, endLexicalEnvironment());
- addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
- var updated = ts.updateSourceFileNode(node, ts.createNodeArray(statements, node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
- ts.addEmitHelper(updated, exportStarHelper);
- }
- return updated;
- }
- /**
- * Transforms a SourceFile into an AMD module.
- *
- * @param node The SourceFile node.
- */
- function transformAMDModule(node) {
- var define = ts.createIdentifier("define");
- var moduleName = ts.tryGetModuleNameFromFile(node, host, compilerOptions);
- return transformAsynchronousModule(node, define, moduleName, /*includeNonAmdDependencies*/ true);
- }
- /**
- * Transforms a SourceFile into a UMD module.
- *
- * @param node The SourceFile node.
- */
- function transformUMDModule(node) {
- var define = ts.createRawExpression(umdHelper);
- return transformAsynchronousModule(node, define, /*moduleName*/ undefined, /*includeNonAmdDependencies*/ false);
- }
- /**
- * Transforms a SourceFile into an AMD or UMD module.
- *
- * @param node The SourceFile node.
- * @param define The expression used to define the module.
- * @param moduleName An expression for the module name, if available.
- * @param includeNonAmdDependencies A value indicating whether to incldue any non-AMD dependencies.
- */
- function transformAsynchronousModule(node, define, moduleName, includeNonAmdDependencies) {
- // An AMD define function has the following shape:
- //
- // define(id?, dependencies?, factory);
- //
- // This has the shape of the following:
- //
- // define(name, ["module1", "module2"], function (module1Alias) { ... }
- //
- // The location of the alias in the parameter list in the factory function needs to
- // match the position of the module name in the dependency list.
- //
- // To ensure this is true in cases of modules with no aliases, e.g.:
- //
- // import "module"
- //
- // or
- //
- // /// <amd-dependency path= "a.css" />
- //
- // we need to add modules without alias names to the end of the dependencies list
- var _a = collectAsynchronousDependencies(node, includeNonAmdDependencies), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
- // Create an updated SourceFile:
- //
- // define(moduleName?, ["module1", "module2"], function ...
- return ts.updateSourceFileNode(node, ts.createNodeArray([
- ts.createStatement(ts.createCall(define,
- /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([
- // Add the dependency array argument:
- //
- // ["require", "exports", module1", "module2", ...]
- ts.createArrayLiteral([
- ts.createLiteral("require"),
- ts.createLiteral("exports")
- ].concat(aliasedModuleNames, unaliasedModuleNames)),
- // Add the module body function argument:
- //
- // function (require, exports, module1, module2) ...
- ts.createFunctionExpression(
- /*modifiers*/ undefined,
- /*asteriskToken*/ undefined,
- /*name*/ undefined,
- /*typeParameters*/ undefined, [
- ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
- ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
- ].concat(importAliasNames),
- /*type*/ undefined, transformAsynchronousModuleBody(node))
- ])))
- ],
- /*location*/ node.statements));
- }
- /**
- * Collect the additional asynchronous dependencies for the module.
- *
- * @param node The source file.
- * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies.
- */
- function collectAsynchronousDependencies(node, includeNonAmdDependencies) {
- // names of modules with corresponding parameter in the factory function
- var aliasedModuleNames = [];
- // names of modules with no corresponding parameters in factory function
- var unaliasedModuleNames = [];
- // names of the parameters in the factory function; these
- // parameters need to match the indexes of the corresponding
- // module names in aliasedModuleNames.
- var importAliasNames = [];
- // Fill in amd-dependency tags
- for (var _i = 0, _a = node.amdDependencies; _i < _a.length; _i++) {
- var amdDependency = _a[_i];
- if (amdDependency.name) {
- aliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name));
- }
- else {
- unaliasedModuleNames.push(ts.createLiteral(amdDependency.path));
- }
- }
- for (var _b = 0, _c = currentModuleInfo.externalImports; _b < _c.length; _b++) {
- var importNode = _c[_b];
- // Find the name of the external module
- var externalModuleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- // Find the name of the module alias, if there is one
- var importAliasName = ts.getLocalNameForExternalImport(importNode, currentSourceFile);
- if (includeNonAmdDependencies && importAliasName) {
- // Set emitFlags on the name of the classDeclaration
- // This is so that when printer will not substitute the identifier
- ts.setEmitFlags(importAliasName, 4 /* NoSubstitution */);
- aliasedModuleNames.push(externalModuleName);
- importAliasNames.push(ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName));
- }
- else {
- unaliasedModuleNames.push(externalModuleName);
- }
- }
- return { aliasedModuleNames: aliasedModuleNames, unaliasedModuleNames: unaliasedModuleNames, importAliasNames: importAliasNames };
- }
- /**
- * Transforms a SourceFile into an AMD or UMD module body.
- *
- * @param node The SourceFile node.
- */
- function transformAsynchronousModuleBody(node) {
- startLexicalEnvironment();
- var statements = [];
- var statementOffset = ts.addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
- // Visit each statement of the module body.
- ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement, /*optional*/ true));
- ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
- // End the lexical environment for the module body
- // and merge any new lexical declarations.
- ts.addRange(statements, endLexicalEnvironment());
- // Append the 'export =' statement if provided.
- addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true);
- var body = ts.createBlock(statements, /*location*/ undefined, /*multiLine*/ true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
- // If we have any `export * from ...` declarations
- // we need to inform the emitter to add the __export helper.
- ts.addEmitHelper(body, exportStarHelper);
- }
- return body;
- }
- /**
- * Adds the down-level representation of `export=` to the statement list if one exists
- * in the source file.
- *
- * @param statements The Statement list to modify.
- * @param emitAsReturn A value indicating whether to emit the `export=` statement as a
- * return statement.
- */
- function addExportEqualsIfNeeded(statements, emitAsReturn) {
- if (currentModuleInfo.exportEquals) {
- if (emitAsReturn) {
- var statement = ts.createReturn(currentModuleInfo.exportEquals.expression,
- /*location*/ currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 1536 /* NoComments */);
- statements.push(statement);
- }
- else {
- var statement = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), currentModuleInfo.exportEquals.expression),
- /*location*/ currentModuleInfo.exportEquals);
- ts.setEmitFlags(statement, 1536 /* NoComments */);
- statements.push(statement);
- }
- }
- }
- //
- // Top-Level Source Element Visitors
- //
- /**
- * Visits a node at the top level of the source file.
- *
- * @param node The node to visit.
- */
- function sourceElementVisitor(node) {
- switch (node.kind) {
- case 235 /* ImportDeclaration */:
- return visitImportDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
- return visitImportEqualsDeclaration(node);
- case 241 /* ExportDeclaration */:
- return visitExportDeclaration(node);
- case 240 /* ExportAssignment */:
- return visitExportAssignment(node);
- case 205 /* VariableStatement */:
- return visitVariableStatement(node);
- case 225 /* FunctionDeclaration */:
- return visitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
- return visitClassDeclaration(node);
- case 295 /* MergeDeclarationMarker */:
- return visitMergeDeclarationMarker(node);
- case 296 /* EndOfDeclarationMarker */:
- return visitEndOfDeclarationMarker(node);
- default:
- // This visitor does not descend into the tree, as export/import statements
- // are only transformed at the top level of a file.
- return node;
- }
- }
- /**
- * Visits an ImportDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitImportDeclaration(node) {
- var statements;
- var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (!node.importClause) {
- // import "mod";
- return ts.createStatement(createRequireCall(node), /*location*/ node);
- }
- else {
- var variables = [];
- if (namespaceDeclaration && !ts.isDefaultImport(node)) {
- // import * as n from "mod";
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, createRequireCall(node)));
- }
- else {
- // import d from "mod";
- // import { x, y } from "mod";
- // import d, { x, y } from "mod";
- // import d, * as n from "mod";
- variables.push(ts.createVariableDeclaration(ts.getGeneratedNameForNode(node),
- /*type*/ undefined, createRequireCall(node)));
- if (namespaceDeclaration && ts.isDefaultImport(node)) {
- variables.push(ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, ts.getGeneratedNameForNode(node)));
- }
- }
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList(variables,
- /*location*/ undefined, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */),
- /*location*/ node));
- }
- }
- else if (namespaceDeclaration && ts.isDefaultImport(node)) {
- // import d, * as n from "mod";
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(namespaceDeclaration.name),
- /*type*/ undefined, ts.getGeneratedNameForNode(node),
- /*location*/ node)
- ],
- /*location*/ undefined, languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */)));
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Creates a `require()` call to import an external module.
- *
- * @param importNode The declararation to import.
- */
- function createRequireCall(importNode) {
- var moduleName = ts.getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions);
- var args = [];
- if (moduleName) {
- args.push(moduleName);
- }
- return ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, args);
- }
- /**
- * Visits an ImportEqualsDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitImportEqualsDeclaration(node) {
- ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
- var statements;
- if (moduleKind !== ts.ModuleKind.AMD) {
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(node.name, createRequireCall(node)),
- /*location*/ node));
+ if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
+ var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions);
+ if (externalHelpersModuleName) {
+ var statements = [];
+ var statementOffset = ts.addPrologue(statements, node.statements);
+ ts.append(statements, ts.createImportDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)));
+ ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset));
+ return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
}
else {
- statements = ts.append(statements, ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(ts.getSynthesizedClone(node.name),
- /*type*/ undefined, createRequireCall(node))
- ],
- /*location*/ undefined,
- /*flags*/ languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */),
- /*location*/ node));
- }
- }
- else {
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.getExportName(node), ts.getLocalName(node)),
- /*location*/ node));
- }
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfImportEqualsDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits an ExportDeclaration node.
- *
- * @param The node to visit.
- */
- function visitExportDeclaration(node) {
- if (!node.moduleSpecifier) {
- // Elide export declarations with no module specifier as they are handled
- // elsewhere.
- return undefined;
- }
- var generatedName = ts.getGeneratedNameForNode(node);
- if (node.exportClause) {
- var statements = [];
- // export { x, y } from "mod";
- if (moduleKind !== ts.ModuleKind.AMD) {
- statements.push(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList([
- ts.createVariableDeclaration(generatedName,
- /*type*/ undefined, createRequireCall(node))
- ]),
- /*location*/ node));
- }
- for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
- var specifier = _a[_i];
- var exportedValue = ts.createPropertyAccess(generatedName, specifier.propertyName || specifier.name);
- statements.push(ts.createStatement(createExportExpression(ts.getExportName(specifier), exportedValue),
- /*location*/ specifier));
- }
- return ts.singleOrMany(statements);
- }
- else {
- // export * from "mod";
- return ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
- /*typeArguments*/ undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ]),
- /*location*/ node);
- }
- }
- /**
- * Visits an ExportAssignment node.
- *
- * @param node The node to visit.
- */
- function visitExportAssignment(node) {
- if (node.isExportEquals) {
- return undefined;
- }
- var statements;
- var original = node.original;
- if (original && hasAssociatedEndOfDeclarationMarker(original)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportStatement(deferredExports[id], ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
- }
- else {
- statements = appendExportStatement(statements, ts.createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a FunctionDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitFunctionDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createFunctionDeclaration(
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
- /*typeParameters*/ undefined, node.parameters,
- /*type*/ undefined, node.body,
- /*location*/ node),
- /*original*/ node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a ClassDeclaration node.
- *
- * @param node The node to visit.
- */
- function visitClassDeclaration(node) {
- var statements;
- if (ts.hasModifier(node, 1 /* Export */)) {
- statements = ts.append(statements, ts.setOriginalNode(ts.createClassDeclaration(
- /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
- /*typeParameters*/ undefined, node.heritageClauses, node.members,
- /*location*/ node),
- /*original*/ node));
- }
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfHoistedDeclaration(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Visits a VariableStatement node.
- *
- * @param node The node to visit.
- */
- function visitVariableStatement(node) {
- var statements;
- var variables;
- var expressions;
- if (ts.hasModifier(node, 1 /* Export */)) {
- var modifiers = void 0;
- // If we're exporting these variables, then these just become assignments to 'exports.x'.
- // We only want to emit assignments for variables with initializers.
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var variable = _a[_i];
- if (ts.isIdentifier(variable.name) && ts.isLocalName(variable.name)) {
- if (!modifiers) {
- modifiers = ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier);
- }
- variables = ts.append(variables, variable);
- }
- else if (variable.initializer) {
- expressions = ts.append(expressions, transformInitializedVariable(variable));
- }
- }
- if (variables) {
- statements = ts.append(statements, ts.updateVariableStatement(node, modifiers, ts.updateVariableDeclarationList(node.declarationList, variables)));
- }
- if (expressions) {
- statements = ts.append(statements, ts.createStatement(ts.inlineExpressions(expressions), /*location*/ node));
+ return ts.visitEachChild(node, visitor, context);
}
}
- else {
- statements = ts.append(statements, node);
- }
- if (hasAssociatedEndOfDeclarationMarker(node)) {
- // Defer exports until we encounter an EndOfDeclarationMarker node
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node);
- }
- else {
- statements = appendExportsOfVariableStatement(statements, node);
- }
- return ts.singleOrMany(statements);
- }
- /**
- * Transforms an exported variable with an initializer into an expression.
- *
- * @param node The node to transform.
- */
- function transformInitializedVariable(node) {
- if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node,
- /*visitor*/ undefined, context, 0 /* All */,
- /*needsValue*/ false, createExportExpression);
- }
- else {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), node.name,
- /*location*/ node.name), node.initializer);
- }
- }
- /**
- * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
- * and transformed declaration.
- *
- * @param node The node to visit.
- */
- function visitMergeDeclarationMarker(node) {
- // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding
- // declaration we do not emit a leading variable declaration. To preserve the
- // begin/end semantics of the declararation and to properly handle exports
- // we wrapped the leading variable declaration in a `MergeDeclarationMarker`.
- //
- // To balance the declaration, add the exports of the elided variable
- // statement.
- if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 205 /* VariableStatement */) {
- var id = ts.getOriginalNodeId(node);
- deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
- }
return node;
}
- /**
- * Determines whether a node has an associated EndOfDeclarationMarker.
- *
- * @param node The node to test.
- */
- function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
- }
- /**
- * Visits a DeclarationMarker used as a placeholder for the end of a transformed
- * declaration.
- *
- * @param node The node to visit.
- */
- function visitEndOfDeclarationMarker(node) {
- // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual
- // end of the transformed declaration. We use this marker to emit any deferred exports
- // of the declaration.
- var id = ts.getOriginalNodeId(node);
- var statements = deferredExports[id];
- if (statements) {
- delete deferredExports[id];
- return ts.append(statements, node);
- }
- return node;
- }
- /**
- * Appends the exports of an ImportDeclaration to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfImportDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- var importClause = decl.importClause;
- if (!importClause) {
- return statements;
- }
- if (importClause.name) {
- statements = appendExportsOfDeclaration(statements, importClause);
- }
- var namedBindings = importClause.namedBindings;
- if (namedBindings) {
- switch (namedBindings.kind) {
- case 237 /* NamespaceImport */:
- statements = appendExportsOfDeclaration(statements, namedBindings);
- break;
- case 238 /* NamedImports */:
- for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
- var importBinding = _a[_i];
- statements = appendExportsOfDeclaration(statements, importBinding);
- }
- break;
- }
- }
- return statements;
- }
- /**
- * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfImportEqualsDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- return appendExportsOfDeclaration(statements, decl);
- }
- /**
- * Appends the exports of a VariableStatement to a statement list, returning the statement
- * list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param node The VariableStatement whose exports are to be recorded.
- */
- function appendExportsOfVariableStatement(statements, node) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- statements = appendExportsOfBindingElement(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a VariableDeclaration or BindingElement to a statement list,
- * returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfBindingElement(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.isBindingPattern(decl.name)) {
- for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) {
- var element = _a[_i];
- if (!ts.isOmittedExpression(element)) {
- statements = appendExportsOfBindingElement(statements, element);
- }
- }
- }
- else if (!ts.isGeneratedIdentifier(decl.name)) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list,
- * returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration whose exports are to be recorded.
- */
- function appendExportsOfHoistedDeclaration(statements, decl) {
- if (currentModuleInfo.exportEquals) {
- return statements;
- }
- if (ts.hasModifier(decl, 1 /* Export */)) {
- var exportName = ts.hasModifier(decl, 512 /* Default */) ? ts.createIdentifier("default") : decl.name;
- statements = appendExportStatement(statements, exportName, ts.getLocalName(decl), /*location*/ decl);
- }
- if (decl.name) {
- statements = appendExportsOfDeclaration(statements, decl);
- }
- return statements;
- }
- /**
- * Appends the exports of a declaration to a statement list, returning the statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param decl The declaration to export.
- */
- function appendExportsOfDeclaration(statements, decl) {
- var name = ts.getDeclarationName(decl);
- var exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text];
- if (exportSpecifiers) {
- for (var _i = 0, exportSpecifiers_2 = exportSpecifiers; _i < exportSpecifiers_2.length; _i++) {
- var exportSpecifier = exportSpecifiers_2[_i];
- statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name);
- }
- }
- return statements;
- }
- /**
- * Appends the down-level representation of an export to a statement list, returning the
- * statement list.
- *
- * @param statements A statement list to which the down-level export statements are to be
- * appended. If `statements` is `undefined`, a new array is allocated if statements are
- * appended.
- * @param exportName The name of the export.
- * @param expression The expression to export.
- * @param location The location to use for source maps and comments for the export.
- * @param allowComments Whether to allow comments on the export.
- */
- function appendExportStatement(statements, exportName, expression, location, allowComments) {
- if (exportName.text === "default") {
- var sourceFile = ts.getOriginalNode(currentSourceFile, ts.isSourceFile);
- if (sourceFile && !sourceFile.symbol.exports["___esModule"]) {
- if (languageVersion === 0 /* ES3 */) {
- statements = ts.append(statements, ts.createStatement(createExportExpression(ts.createIdentifier("__esModule"), ts.createLiteral(true))));
- }
- else {
- statements = ts.append(statements, ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Object"), "defineProperty"),
- /*typeArguments*/ undefined, [
- ts.createIdentifier("exports"),
- ts.createLiteral("__esModule"),
- ts.createObjectLiteral([
- ts.createPropertyAssignment("value", ts.createLiteral(true))
- ])
- ])));
- }
- }
- }
- statements = ts.append(statements, createExportStatement(exportName, expression, location, allowComments));
- return statements;
- }
- /**
- * Creates a call to the current file's export function to export a value.
- *
- * @param name The bound name of the export.
- * @param value The exported value.
- * @param location The location to use for source maps and comments for the export.
- * @param allowComments An optional value indicating whether to emit comments for the statement.
- */
- function createExportStatement(name, value, location, allowComments) {
- var statement = ts.createStatement(createExportExpression(name, value), location);
- ts.startOnNewLine(statement);
- if (!allowComments) {
- ts.setEmitFlags(statement, 1536 /* NoComments */);
- }
- return statement;
- }
- /**
- * Creates a call to the current file's export function to export a value.
- *
- * @param name The bound name of the export.
- * @param value The exported value.
- * @param location The location to use for source maps and comments for the export.
- */
- function createExportExpression(name, value, location) {
- return ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(name)), value, location);
- }
- //
- // Modifier Visitors
- //
- /**
- * Visit nodes to elide module-specific modifiers.
- *
- * @param node The node to visit.
- */
- function modifierVisitor(node) {
- // Elide module-specific modifiers.
+ function visitor(node) {
switch (node.kind) {
- case 83 /* ExportKeyword */:
- case 78 /* DefaultKeyword */:
+ case 236 /* ImportEqualsDeclaration */:
+ // Elide `import=` as it is not legal with --module ES6
return undefined;
+ case 242 /* ExportAssignment */:
+ return visitExportAssignment(node);
}
return node;
}
+ function visitExportAssignment(node) {
+ // Elide `export=` as it is not legal with --module ES6
+ return node.isExportEquals ? undefined : node;
+ }
//
// Emit Notification
//
/**
- * Hook for node emit notifications.
+ * Hook for node emit.
*
- * @param emitContext A context hint for the emitter.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emit A callback used to emit the node in the printer.
*/
- function onEmitNode(emitContext, node, emitCallback) {
- if (node.kind === 261 /* SourceFile */) {
+ function onEmitNode(hint, node, emitCallback) {
+ if (ts.isSourceFile(node)) {
currentSourceFile = node;
- currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
- noSubstitution = ts.createMap();
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
currentSourceFile = undefined;
- currentModuleInfo = undefined;
- noSubstitution = undefined;
}
else {
- previousOnEmitNode(emitContext, node, emitCallback);
+ previousOnEmitNode(hint, node, emitCallback);
}
}
//
@@ -56617,191 +61089,27 @@ var ts;
/**
* Hooks node substitutions.
*
- * @param emitContext A context hint for the emitter.
- * @param node The node to substitute.
- */
- function onSubstituteNode(emitContext, node) {
- node = previousOnSubstituteNode(emitContext, node);
- if (node.id && noSubstitution[node.id]) {
- return node;
- }
- if (emitContext === 1 /* Expression */) {
- return substituteExpression(node);
- }
- else if (ts.isShorthandPropertyAssignment(node)) {
- return substituteShorthandPropertyAssignment(node);
- }
- return node;
- }
- /**
- * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported
- * or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteShorthandPropertyAssignment(node) {
- var name = node.name;
- var exportedOrImportedName = substituteExpressionIdentifier(name);
- if (exportedOrImportedName !== name) {
- // A shorthand property with an assignment initializer is probably part of a
- // destructuring assignment
- if (node.objectAssignmentInitializer) {
- var initializer = ts.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);
- return ts.createPropertyAssignment(name, initializer, /*location*/ node);
- }
- return ts.createPropertyAssignment(name, exportedOrImportedName, /*location*/ node);
- }
- return node;
- }
- /**
- * Substitution for an Expression that may contain an imported or exported symbol.
- *
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to substitute.
*/
- function substituteExpression(node) {
- switch (node.kind) {
- case 70 /* Identifier */:
- return substituteExpressionIdentifier(node);
- case 192 /* BinaryExpression */:
- return substituteBinaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
- case 190 /* PrefixUnaryExpression */:
- return substituteUnaryExpression(node);
+ function onSubstituteNode(hint, node) {
+ node = previousOnSubstituteNode(hint, node);
+ if (ts.isIdentifier(node) && hint === 1 /* Expression */) {
+ return substituteExpressionIdentifier(node);
}
return node;
}
- /**
- * Substitution for an Identifier expression that may contain an imported or exported
- * symbol.
- *
- * @param node The node to substitute.
- */
function substituteExpressionIdentifier(node) {
if (ts.getEmitFlags(node) & 4096 /* HelperName */) {
var externalHelpersModuleName = ts.getExternalHelpersModuleName(currentSourceFile);
if (externalHelpersModuleName) {
return ts.createPropertyAccess(externalHelpersModuleName, node);
}
- return node;
- }
- if (!ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
- var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
- if (exportContainer && exportContainer.kind === 261 /* SourceFile */) {
- return ts.createPropertyAccess(ts.createIdentifier("exports"), ts.getSynthesizedClone(node),
- /*location*/ node);
- }
- var importDeclaration = resolver.getReferencedImportDeclaration(node);
- if (importDeclaration) {
- if (ts.isImportClause(importDeclaration)) {
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent), ts.createIdentifier("default"),
- /*location*/ node);
- }
- else if (ts.isImportSpecifier(importDeclaration)) {
- var name_37 = importDeclaration.propertyName || importDeclaration.name;
- return ts.createPropertyAccess(ts.getGeneratedNameForNode(importDeclaration.parent.parent.parent), ts.getSynthesizedClone(name_37),
- /*location*/ node);
- }
- }
- }
- return node;
- }
- /**
- * Substitution for a BinaryExpression that may contain an imported or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteBinaryExpression(node) {
- // When we see an assignment expression whose left-hand side is an exported symbol,
- // we should ensure all exports of that symbol are updated with the correct value.
- //
- // - We do not substitute generated identifiers for any reason.
- // - We do not substitute identifiers tagged with the LocalName flag.
- // - We do not substitute identifiers that were originally the name of an enum or
- // namespace due to how they are transformed in TypeScript.
- // - We only substitute identifiers that are exported at the top level.
- if (ts.isAssignmentOperator(node.operatorToken.kind)
- && ts.isIdentifier(node.left)
- && !ts.isGeneratedIdentifier(node.left)
- && !ts.isLocalName(node.left)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.left)) {
- var exportedNames = getExports(node.left);
- if (exportedNames) {
- // For each additional export of the declaration, apply an export assignment.
- var expression = node;
- for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
- var exportName = exportedNames_3[_i];
- // Mark the node to prevent triggering this rule again.
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression, /*location*/ node);
- }
- return expression;
- }
- }
- return node;
- }
- /**
- * Substitution for a UnaryExpression that may contain an imported or exported symbol.
- *
- * @param node The node to substitute.
- */
- function substituteUnaryExpression(node) {
- // When we see a prefix or postfix increment expression whose operand is an exported
- // symbol, we should ensure all exports of that symbol are updated with the correct
- // value.
- //
- // - We do not substitute generated identifiers for any reason.
- // - We do not substitute identifiers tagged with the LocalName flag.
- // - We do not substitute identifiers that were originally the name of an enum or
- // namespace due to how they are transformed in TypeScript.
- // - We only substitute identifiers that are exported at the top level.
- if ((node.operator === 42 /* PlusPlusToken */ || node.operator === 43 /* MinusMinusToken */)
- && ts.isIdentifier(node.operand)
- && !ts.isGeneratedIdentifier(node.operand)
- && !ts.isLocalName(node.operand)
- && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
- var exportedNames = getExports(node.operand);
- if (exportedNames) {
- var expression = node.kind === 191 /* PostfixUnaryExpression */
- ? ts.createBinary(node.operand, ts.createToken(node.operator === 42 /* PlusPlusToken */ ? 58 /* PlusEqualsToken */ : 59 /* MinusEqualsToken */), ts.createLiteral(1),
- /*location*/ node)
- : node;
- for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
- var exportName = exportedNames_4[_i];
- // Mark the node to prevent triggering this rule again.
- noSubstitution[ts.getNodeId(expression)] = true;
- expression = createExportExpression(exportName, expression);
- }
- return expression;
- }
}
return node;
}
- /**
- * Gets the additional exports of a name.
- *
- * @param name The name.
- */
- function getExports(name) {
- if (!ts.isGeneratedIdentifier(name)) {
- var valueDeclaration = resolver.getReferencedImportDeclaration(name)
- || resolver.getReferencedValueDeclaration(name);
- if (valueDeclaration) {
- return currentModuleInfo
- && currentModuleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)];
- }
- }
- }
- var _a;
}
- ts.transformModule = transformModule;
- // emit output for the __export helper function
- var exportStarHelper = {
- name: "typescript:export-star",
- scoped: true,
- text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"
- };
- // emit output for the UMD helper function.
- var umdHelper = "\n (function (dependencies, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(dependencies, factory);\n }\n })";
+ ts.transformES2015Module = transformES2015Module;
})(ts || (ts = {}));
/// <reference path="visitor.ts" />
/// <reference path="transformers/ts.ts" />
@@ -56818,24 +61126,34 @@ var ts;
/* @internal */
var ts;
(function (ts) {
- var moduleTransformerMap = ts.createMap((_a = {},
- _a[ts.ModuleKind.ES2015] = ts.transformES2015Module,
- _a[ts.ModuleKind.System] = ts.transformSystemModule,
- _a[ts.ModuleKind.AMD] = ts.transformModule,
- _a[ts.ModuleKind.CommonJS] = ts.transformModule,
- _a[ts.ModuleKind.UMD] = ts.transformModule,
- _a[ts.ModuleKind.None] = ts.transformModule,
- _a));
+ function getModuleTransformer(moduleKind) {
+ switch (moduleKind) {
+ case ts.ModuleKind.ES2015:
+ return ts.transformES2015Module;
+ case ts.ModuleKind.System:
+ return ts.transformSystemModule;
+ default:
+ return ts.transformModule;
+ }
+ }
+ var TransformationState;
+ (function (TransformationState) {
+ TransformationState[TransformationState["Uninitialized"] = 0] = "Uninitialized";
+ TransformationState[TransformationState["Initialized"] = 1] = "Initialized";
+ TransformationState[TransformationState["Completed"] = 2] = "Completed";
+ TransformationState[TransformationState["Disposed"] = 3] = "Disposed";
+ })(TransformationState || (TransformationState = {}));
var SyntaxKindFeatureFlags;
(function (SyntaxKindFeatureFlags) {
SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["Substitution"] = 1] = "Substitution";
SyntaxKindFeatureFlags[SyntaxKindFeatureFlags["EmitNotifications"] = 2] = "EmitNotifications";
})(SyntaxKindFeatureFlags || (SyntaxKindFeatureFlags = {}));
- function getTransformers(compilerOptions) {
+ function getTransformers(compilerOptions, customTransformers) {
var jsx = compilerOptions.jsx;
var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var transformers = [];
+ ts.addRange(transformers, customTransformers && customTransformers.before);
transformers.push(ts.transformTypeScript);
if (jsx === 2 /* React */) {
transformers.push(ts.transformJsx);
@@ -56853,12 +61171,13 @@ var ts;
transformers.push(ts.transformES2015);
transformers.push(ts.transformGenerators);
}
- transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ts.ModuleKind.None]);
+ transformers.push(getModuleTransformer(moduleKind));
// The ES5 transformer is last so that it can substitute expressions like `exports.default`
// for ES3.
if (languageVersion < 1 /* ES5 */) {
transformers.push(ts.transformES5);
}
+ ts.addRange(transformers, customTransformers && customTransformers.after);
return transformers;
}
ts.getTransformers = getTransformers;
@@ -56866,13 +61185,14 @@ var ts;
* Transforms an array of SourceFiles by passing them through each transformer.
*
* @param resolver The emit resolver provided by the checker.
- * @param host The emit host.
- * @param sourceFiles An array of source files
- * @param transforms An array of Transformers.
+ * @param host The emit host object used to interact with the file system.
+ * @param options Compiler options to surface in the `TransformationContext`.
+ * @param nodes An array of nodes to transform.
+ * @param transforms An array of `TransformerFactory` callbacks.
+ * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files.
*/
- function transformFiles(resolver, host, sourceFiles, transformers) {
+ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
var enabledSyntaxKindFeatures = new Array(298 /* Count */);
- var lexicalEnvironmentDisabled = false;
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -56880,10 +61200,13 @@ var ts;
var lexicalEnvironmentStackOffset = 0;
var lexicalEnvironmentSuspended = false;
var emitHelpers;
+ var onSubstituteNode = function (_, node) { return node; };
+ var onEmitNode = function (hint, node, callback) { return callback(hint, node); };
+ var state = 0 /* Uninitialized */;
// The transformation context is provided to each transformer as part of transformer
// initialization.
var context = {
- getCompilerOptions: function () { return host.getCompilerOptions(); },
+ getCompilerOptions: function () { return options; },
getEmitResolver: function () { return resolver; },
getEmitHost: function () { return host; },
startLexicalEnvironment: startLexicalEnvironment,
@@ -56894,39 +61217,53 @@ var ts;
hoistFunctionDeclaration: hoistFunctionDeclaration,
requestEmitHelper: requestEmitHelper,
readEmitHelpers: readEmitHelpers,
- onSubstituteNode: function (_emitContext, node) { return node; },
enableSubstitution: enableSubstitution,
- isSubstitutionEnabled: isSubstitutionEnabled,
- onEmitNode: function (node, emitContext, emitCallback) { return emitCallback(node, emitContext); },
enableEmitNotification: enableEmitNotification,
- isEmitNotificationEnabled: isEmitNotificationEnabled
+ isSubstitutionEnabled: isSubstitutionEnabled,
+ isEmitNotificationEnabled: isEmitNotificationEnabled,
+ get onSubstituteNode() { return onSubstituteNode; },
+ set onSubstituteNode(value) {
+ ts.Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onSubstituteNode = value;
+ },
+ get onEmitNode() { return onEmitNode; },
+ set onEmitNode(value) {
+ ts.Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed.");
+ ts.Debug.assert(value !== undefined, "Value must not be 'undefined'");
+ onEmitNode = value;
+ }
};
+ // Ensure the parse tree is clean before applying transformations
+ for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
+ var node = nodes_4[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ ts.performance.mark("beforeTransform");
// Chain together and initialize each transformer.
var transformation = ts.chain.apply(void 0, transformers)(context);
- // Transform each source file.
- var transformed = ts.map(sourceFiles, transformSourceFile);
- // Disable modification of the lexical environment.
- lexicalEnvironmentDisabled = true;
+ // prevent modification of transformation hooks.
+ state = 1 /* Initialized */;
+ // Transform each node.
+ var transformed = ts.map(nodes, allowDtsFiles ? transformation : transformRoot);
+ // prevent modification of the lexical environment.
+ state = 2 /* Completed */;
+ ts.performance.mark("afterTransform");
+ ts.performance.measure("transformTime", "beforeTransform", "afterTransform");
return {
transformed: transformed,
- emitNodeWithSubstitution: emitNodeWithSubstitution,
- emitNodeWithNotification: emitNodeWithNotification
+ substituteNode: substituteNode,
+ emitNodeWithNotification: emitNodeWithNotification,
+ dispose: dispose
};
- /**
- * Transforms a source file.
- *
- * @param sourceFile The source file to transform.
- */
- function transformSourceFile(sourceFile) {
- if (ts.isDeclarationFile(sourceFile)) {
- return sourceFile;
- }
- return transformation(sourceFile);
+ function transformRoot(node) {
+ return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
}
/**
* Enables expression substitutions in the pretty printer for the provided SyntaxKind.
*/
function enableSubstitution(kind) {
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 1 /* Substitution */;
}
/**
@@ -56939,26 +61276,19 @@ var ts;
/**
* Emits a node with possible substitution.
*
- * @param emitContext The current emit context.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node or its substitute.
*/
- function emitNodeWithSubstitution(emitContext, node, emitCallback) {
- if (node) {
- if (isSubstitutionEnabled(node)) {
- var substitute = context.onSubstituteNode(emitContext, node);
- if (substitute && substitute !== node) {
- emitCallback(emitContext, substitute);
- return;
- }
- }
- emitCallback(emitContext, node);
- }
+ function substituteNode(hint, node) {
+ ts.Debug.assert(state < 3 /* Disposed */, "Cannot substitute a node after the result is disposed.");
+ return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
}
/**
* Enables before/after emit notifications in the pretty printer for the provided SyntaxKind.
*/
function enableEmitNotification(kind) {
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;
}
/**
@@ -56972,17 +61302,18 @@ var ts;
/**
* Emits a node with possible emit notification.
*
- * @param emitContext The current emit context.
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node.
*/
- function emitNodeWithNotification(emitContext, node, emitCallback) {
+ function emitNodeWithNotification(hint, node, emitCallback) {
+ ts.Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed.");
if (node) {
if (isEmitNotificationEnabled(node)) {
- context.onEmitNode(emitContext, node, emitCallback);
+ onEmitNode(hint, node, emitCallback);
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
}
}
@@ -56990,7 +61321,8 @@ var ts;
* Records a hoisted variable declaration for the provided name within a lexical environment.
*/
function hoistVariableDeclaration(name) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
var decl = ts.createVariableDeclaration(name);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
@@ -57003,7 +61335,8 @@ var ts;
* Records a hoisted function declaration within a lexical environment.
*/
function hoistFunctionDeclaration(func) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -57016,7 +61349,8 @@ var ts;
* are pushed onto a stack, and the related storage variables are reset.
*/
function startLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot start a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
// Save the current lexical environment. Rather than resizing the array we adjust the
// stack size variable. This allows us to reuse existing array slots we've
@@ -57030,13 +61364,15 @@ var ts;
}
/** Suspends the current lexical environment, usually after visiting a parameter list. */
function suspendLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot suspend a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended.");
lexicalEnvironmentSuspended = true;
}
/** Resumes a suspended lexical environment, usually before visiting a function body. */
function resumeLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot resume a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended.");
lexicalEnvironmentSuspended = false;
}
@@ -57045,7 +61381,8 @@ var ts;
* any hoisted declarations added in this environment are returned.
*/
function endLexicalEnvironment() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot end a lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed.");
ts.Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
var statements;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
@@ -57074,19 +61411,39 @@ var ts;
return statements;
}
function requestEmitHelper(helper) {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
ts.Debug.assert(!helper.scoped, "Cannot request a scoped emit helper.");
emitHelpers = ts.append(emitHelpers, helper);
}
function readEmitHelpers() {
- ts.Debug.assert(!lexicalEnvironmentDisabled, "Cannot modify the lexical environment during the print phase.");
+ ts.Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization.");
+ ts.Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed.");
var helpers = emitHelpers;
emitHelpers = undefined;
return helpers;
}
- }
- ts.transformFiles = transformFiles;
- var _a;
+ function dispose() {
+ if (state < 3 /* Disposed */) {
+ // Clean up emit nodes on parse tree
+ for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
+ var node = nodes_5[_i];
+ ts.disposeEmitNodes(ts.getSourceFileOfNode(ts.getParseTreeNode(node)));
+ }
+ // Release references to external entries for GC purposes.
+ lexicalEnvironmentVariableDeclarations = undefined;
+ lexicalEnvironmentVariableDeclarationsStack = undefined;
+ lexicalEnvironmentFunctionDeclarations = undefined;
+ lexicalEnvironmentFunctionDeclarationsStack = undefined;
+ onSubstituteNode = undefined;
+ onEmitNode = undefined;
+ emitHelpers = undefined;
+ // Prevent further use of the transformation result.
+ state = 3 /* Disposed */;
+ }
+ }
+ }
+ ts.transformNodes = transformNodes;
})(ts || (ts = {}));
/// <reference path="checker.ts"/>
/* @internal */
@@ -57131,10 +61488,9 @@ var ts;
*
* @param filePath The path to the generated output file.
* @param sourceMapFilePath The path to the output source map file.
- * @param sourceFiles The input source files for the program.
- * @param isBundledEmit A value indicating whether the generated output file is a bundle.
+ * @param sourceFileOrBundle The input source file or bundle for the program.
*/
- function initialize(filePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
+ function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
}
@@ -57170,11 +61526,10 @@ var ts;
}
if (compilerOptions.mapRoot) {
sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
- if (!isBundledEmit) {
- ts.Debug.assert(sourceFiles.length === 1);
+ if (sourceFileOrBundle.kind === 264 /* SourceFile */) {
// For modules or multiple emit files the mapRoot will have directory structure like the sources
// So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map
- sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFiles[0], host, sourceMapDir));
+ sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(sourceFileOrBundle, host, sourceMapDir));
}
if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
// The relative paths are relative to the common directory
@@ -57297,31 +61652,32 @@ var ts;
/**
* Emits a node with possible leading and trailing source maps.
*
+ * @param hint A hint as to the intended usage of the node.
* @param node The node to emit.
* @param emitCallback The callback used to emit the node.
*/
- function emitNodeWithSourceMap(emitContext, node, emitCallback) {
+ function emitNodeWithSourceMap(hint, node, emitCallback) {
if (disabled) {
- return emitCallback(emitContext, node);
+ return emitCallback(hint, node);
}
if (node) {
var emitNode = node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var _a = emitNode && emitNode.sourceMapRange || node, pos = _a.pos, end = _a.end;
- if (node.kind !== 293 /* NotEmittedStatement */
+ if (node.kind !== 294 /* NotEmittedStatement */
&& (emitFlags & 16 /* NoLeadingSourceMap */) === 0
&& pos >= 0) {
emitPos(ts.skipTrivia(currentSourceText, pos));
}
if (emitFlags & 64 /* NoNestedSourceMaps */) {
disabled = true;
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
disabled = false;
}
else {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
}
- if (node.kind !== 293 /* NotEmittedStatement */
+ if (node.kind !== 294 /* NotEmittedStatement */
&& (emitFlags & 32 /* NoTrailingSourceMap */) === 0
&& end >= 0) {
emitPos(end);
@@ -57391,7 +61747,7 @@ var ts;
return;
}
encodeLastRecordedSourceMapSpan();
- return ts.stringify({
+ return JSON.stringify({
version: 3,
file: sourceMapData.sourceMapFile,
sourceRoot: sourceMapData.sourceMapSourceRoot,
@@ -57456,11 +61812,10 @@ var ts;
/* @internal */
var ts;
(function (ts) {
- function createCommentWriter(host, writer, sourceMap) {
- var compilerOptions = host.getCompilerOptions();
- var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var newLine = host.getNewLine();
- var emitPos = sourceMap.emitPos;
+ function createCommentWriter(printerOptions, emitPos) {
+ var extendedDiagnostics = printerOptions.extendedDiagnostics;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var writer;
var containerPos = -1;
var containerEnd = -1;
var declarationListContainerEnd = -1;
@@ -57469,38 +61824,35 @@ var ts;
var currentLineMap;
var detachedCommentsInfo;
var hasWrittenComment = false;
- var disabled = compilerOptions.removeComments;
+ var disabled = printerOptions.removeComments;
return {
reset: reset,
+ setWriter: setWriter,
setSourceFile: setSourceFile,
emitNodeWithComments: emitNodeWithComments,
emitBodyWithDetachedComments: emitBodyWithDetachedComments,
emitTrailingCommentsOfPosition: emitTrailingCommentsOfPosition,
+ emitLeadingCommentsOfPosition: emitLeadingCommentsOfPosition,
};
- function emitNodeWithComments(emitContext, node, emitCallback) {
+ function emitNodeWithComments(hint, node, emitCallback) {
if (disabled) {
- emitCallback(emitContext, node);
+ emitCallback(hint, node);
return;
}
if (node) {
- var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
- var emitFlags = ts.getEmitFlags(node);
+ hasWrittenComment = false;
+ var emitNode = node.emitNode;
+ var emitFlags = emitNode && emitNode.flags;
+ var _a = emitNode && emitNode.commentRange || node, pos = _a.pos, end = _a.end;
if ((pos < 0 && end < 0) || (pos === end)) {
// Both pos and end are synthesized, so just emit the node without comments.
- if (emitFlags & 2048 /* NoNestedComments */) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
}
else {
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 293 /* NotEmittedStatement */;
+ var isEmittedNode = node.kind !== 294 /* NotEmittedStatement */;
var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0;
var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0;
// Emit leading comments if the position is not synthesized and the node
@@ -57519,23 +61871,16 @@ var ts;
containerEnd = end;
// To avoid invalid comment emit in a down-level binding pattern, we
// keep track of the last declaration list container's end
- if (node.kind === 224 /* VariableDeclarationList */) {
+ if (node.kind === 226 /* VariableDeclarationList */) {
declarationListContainerEnd = end;
}
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "preEmitNodeWithComment");
}
- if (emitFlags & 2048 /* NoNestedComments */) {
- disabled = true;
- emitCallback(emitContext, node);
- disabled = false;
- }
- else {
- emitCallback(emitContext, node);
- }
+ emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback);
if (extendedDiagnostics) {
- ts.performance.mark("beginEmitNodeWithComment");
+ ts.performance.mark("postEmitNodeWithComment");
}
// Restore previous container state.
containerPos = savedContainerPos;
@@ -57547,11 +61892,75 @@ var ts;
emitTrailingComments(end);
}
if (extendedDiagnostics) {
- ts.performance.measure("commentTime", "beginEmitNodeWithComment");
+ ts.performance.measure("commentTime", "postEmitNodeWithComment");
}
}
}
}
+ function emitNodeWithSynthesizedComments(hint, node, emitNode, emitFlags, emitCallback) {
+ var leadingComments = emitNode && emitNode.leadingComments;
+ if (ts.some(leadingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("preEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(leadingComments, emitLeadingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "preEmitNodeWithSynthesizedComments");
+ }
+ }
+ emitNodeWithNestedComments(hint, node, emitFlags, emitCallback);
+ var trailingComments = emitNode && emitNode.trailingComments;
+ if (ts.some(trailingComments)) {
+ if (extendedDiagnostics) {
+ ts.performance.mark("postEmitNodeWithSynthesizedComments");
+ }
+ ts.forEach(trailingComments, emitTrailingSynthesizedComment);
+ if (extendedDiagnostics) {
+ ts.performance.measure("commentTime", "postEmitNodeWithSynthesizedComments");
+ }
+ }
+ }
+ function emitLeadingSynthesizedComment(comment) {
+ if (comment.kind === 2 /* SingleLineCommentTrivia */) {
+ writer.writeLine();
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine || comment.kind === 2 /* SingleLineCommentTrivia */) {
+ writer.writeLine();
+ }
+ else {
+ writer.write(" ");
+ }
+ }
+ function emitTrailingSynthesizedComment(comment) {
+ if (!writer.isAtStartOfLine()) {
+ writer.write(" ");
+ }
+ writeSynthesizedComment(comment);
+ if (comment.hasTrailingNewLine) {
+ writer.writeLine();
+ }
+ }
+ function writeSynthesizedComment(comment) {
+ var text = formatSynthesizedComment(comment);
+ var lineMap = comment.kind === 3 /* MultiLineCommentTrivia */ ? ts.computeLineStarts(text) : undefined;
+ ts.writeCommentRange(text, lineMap, writer, 0, text.length, newLine);
+ }
+ function formatSynthesizedComment(comment) {
+ return comment.kind === 3 /* MultiLineCommentTrivia */
+ ? "/*" + comment.text + "*/"
+ : "//" + comment.text;
+ }
+ function emitNodeWithNestedComments(hint, node, emitFlags, emitCallback) {
+ if (emitFlags & 2048 /* NoNestedComments */) {
+ disabled = true;
+ emitCallback(hint, node);
+ disabled = false;
+ }
+ else {
+ emitCallback(hint, node);
+ }
+ }
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
if (extendedDiagnostics) {
ts.performance.mark("preEmitBodyWithDetachedComments");
@@ -57579,6 +61988,9 @@ var ts;
}
if (!skipTrailingComments) {
emitLeadingComments(detachedRange.end, /*isEmittedNode*/ true);
+ if (hasWrittenComment && !writer.isAtStartOfLine()) {
+ writer.writeLine();
+ }
}
if (extendedDiagnostics) {
ts.performance.measure("commentTime", "beginEmitBodyWithDetachedCommetns");
@@ -57612,9 +62024,11 @@ var ts;
hasWrittenComment = true;
}
// Leading comments are emitted at /*leading comment1 */space/*leading comment*/space
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57622,6 +62036,12 @@ var ts;
writer.write(" ");
}
}
+ function emitLeadingCommentsOfPosition(pos) {
+ if (disabled || pos === -1) {
+ return;
+ }
+ emitLeadingComments(pos, /*isEmittedNode*/ true);
+ }
function emitTrailingComments(pos) {
forEachTrailingCommentToEmit(pos, emitTrailingComment);
}
@@ -57630,9 +62050,11 @@ var ts;
if (!writer.isAtStartOfLine()) {
writer.write(" ");
}
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57651,9 +62073,11 @@ var ts;
}
function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
// trailing comments of a position are emitted at /*trailing comment1 */space/*trailing comment*/space
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(currentText, currentLineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
if (hasTrailingNewLine) {
writer.writeLine();
}
@@ -57684,6 +62108,9 @@ var ts;
currentLineMap = undefined;
detachedCommentsInfo = undefined;
}
+ function setWriter(output) {
+ writer = output;
+ }
function setSourceFile(sourceFile) {
currentSourceFile = sourceFile;
currentText = currentSourceFile.text;
@@ -57716,15 +62143,17 @@ var ts;
}
}
function writeComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
- emitPos(commentPos);
+ if (emitPos)
+ emitPos(commentPos);
ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
- emitPos(commentEnd);
+ if (emitPos)
+ emitPos(commentEnd);
}
/**
* Determine if the given comment is a triple-slash
*
* @return true if the comment is a triple-slash comment else false
- **/
+ */
function isTripleSlashComment(commentPos, commentEnd) {
// Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text
// so that we don't end up computing comment string and doing match for all // comments
@@ -57747,15 +62176,17 @@ var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var declarationDiagnostics = ts.createDiagnosticCollection();
- ts.forEachExpectedEmitFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
+ ts.forEachEmittedFile(host, getDeclarationDiagnosticsFromFile, targetSourceFile);
return declarationDiagnostics.getDiagnostics(targetSourceFile ? targetSourceFile.fileName : undefined);
- function getDeclarationDiagnosticsFromFile(_a, sources, isBundledEmit) {
+ function getDeclarationDiagnosticsFromFile(_a, sourceFileOrBundle) {
var declarationFilePath = _a.declarationFilePath;
- emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sources, isBundledEmit, /*emitOnlyDtsFiles*/ false);
+ emitDeclarations(host, resolver, declarationDiagnostics, declarationFilePath, sourceFileOrBundle, /*emitOnlyDtsFiles*/ false);
}
}
ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
- function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles) {
+ function emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
+ var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */;
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
@@ -57829,7 +62260,7 @@ var ts;
var oldWriter = writer;
ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
- ts.Debug.assert(aliasEmitInfo.node.kind === 235 /* ImportDeclaration */);
+ ts.Debug.assert(aliasEmitInfo.node.kind === 237 /* ImportDeclaration */);
createAndSetNewTextWriterWithSymbolWriter();
ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit));
for (var i = 0; i < aliasEmitInfo.indent; i++) {
@@ -57855,9 +62286,9 @@ var ts;
}
});
if (usedTypeDirectiveReferences) {
- for (var directive in usedTypeDirectiveReferences) {
+ ts.forEachKey(usedTypeDirectiveReferences, function (directive) {
referencesOutput += "/// <reference types=\"" + directive + "\" />" + newLine;
- }
+ });
}
return {
reportedDeclarationError: reportedDeclarationError,
@@ -57882,12 +62313,14 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
+ writer.reportIllegalExtends = reportIllegalExtends;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
writer.writeSpace = writer.write;
writer.writeStringLiteral = writer.writeLiteral;
writer.writeParameter = writer.write;
+ writer.writeProperty = writer.write;
writer.writeSymbol = writer.write;
setWriter(writer);
}
@@ -57903,10 +62336,10 @@ var ts;
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
- if (declaration.kind === 223 /* VariableDeclaration */) {
+ if (declaration.kind === 225 /* VariableDeclaration */) {
nodeToCheck = declaration.parent.parent;
}
- else if (declaration.kind === 238 /* NamedImports */ || declaration.kind === 239 /* ImportSpecifier */ || declaration.kind === 236 /* ImportClause */) {
+ else if (declaration.kind === 240 /* NamedImports */ || declaration.kind === 241 /* ImportSpecifier */ || declaration.kind === 238 /* ImportClause */) {
ts.Debug.fail("We should be getting ImportDeclaration instead to write");
}
else {
@@ -57924,7 +62357,7 @@ var ts;
// Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing,
// we would write alias foo declaration when we visit it since it would now be marked as visible
if (moduleElementEmitInfo) {
- if (moduleElementEmitInfo.node.kind === 235 /* ImportDeclaration */) {
+ if (moduleElementEmitInfo.node.kind === 237 /* ImportDeclaration */) {
// we have to create asynchronous output only after we have collected complete information
// because it is possible to enable multiple bindings as asynchronously visible
moduleElementEmitInfo.isVisible = true;
@@ -57934,12 +62367,12 @@ var ts;
for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
increaseIndent();
}
- if (nodeToCheck.kind === 230 /* ModuleDeclaration */) {
+ if (nodeToCheck.kind === 232 /* ModuleDeclaration */) {
ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
asynchronousSubModuleDeclarationEmitInfo = [];
}
writeModuleElement(nodeToCheck);
- if (nodeToCheck.kind === 230 /* ModuleDeclaration */) {
+ if (nodeToCheck.kind === 232 /* ModuleDeclaration */) {
moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
asynchronousSubModuleDeclarationEmitInfo = undefined;
}
@@ -57958,8 +62391,8 @@ var ts;
}
for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) {
var directive = typeReferenceDirectives_1[_i];
- if (!(directive in usedTypeDirectiveReferences)) {
- usedTypeDirectiveReferences[directive] = directive;
+ if (!usedTypeDirectiveReferences.has(directive)) {
+ usedTypeDirectiveReferences.set(directive, directive);
}
}
}
@@ -57988,6 +62421,12 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
+ function reportIllegalExtends() {
+ if (errorNameNode) {
+ reportedDeclarationError = true;
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, ts.declarationNameToString(errorNameNode)));
+ }
+ }
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
@@ -57997,13 +62436,19 @@ var ts;
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
- if (type) {
+ // use the checker's type, not the declared type,
+ // for non-optional initialized parameters that aren't a parameter property
+ var shouldUseResolverType = declaration.kind === 145 /* Parameter */ &&
+ resolver.isRequiredInitializedParameter(declaration);
+ if (type && !shouldUseResolverType) {
// Write the type
emitType(type);
}
else {
errorNameNode = declaration.name;
- resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ var format = 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */ |
+ (shouldUseResolverType ? 4096 /* AddUndefined */ : 0);
+ resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
}
@@ -58021,15 +62466,15 @@ var ts;
}
}
function emitLines(nodes) {
- for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) {
- var node = nodes_4[_i];
+ for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) {
+ var node = nodes_6[_i];
emit(node);
}
}
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
- for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) {
- var node = nodes_5[_i];
+ for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
+ var node = nodes_7[_i];
if (!canEmitFn || canEmitFn(node)) {
if (currentWriterPos !== writer.getTextPos()) {
write(separator);
@@ -58057,49 +62502,50 @@ var ts;
function emitType(type) {
switch (type.kind) {
case 118 /* AnyKeyword */:
- case 134 /* StringKeyword */:
+ case 135 /* StringKeyword */:
case 132 /* NumberKeyword */:
case 121 /* BooleanKeyword */:
- case 135 /* SymbolKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 136 /* SymbolKeyword */:
case 104 /* VoidKeyword */:
- case 137 /* UndefinedKeyword */:
+ case 138 /* UndefinedKeyword */:
case 94 /* NullKeyword */:
case 129 /* NeverKeyword */:
- case 167 /* ThisType */:
- case 171 /* LiteralType */:
+ case 168 /* ThisType */:
+ case 172 /* LiteralType */:
return writeTextOfNode(currentText, type);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return emitExpressionWithTypeArguments(type);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return emitTypeReference(type);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return emitTypeQuery(type);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return emitArrayType(type);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return emitTupleType(type);
- case 164 /* UnionType */:
+ case 165 /* UnionType */:
return emitUnionType(type);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return emitIntersectionType(type);
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return emitParenType(type);
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return emitTypeOperator(type);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return emitIndexedAccessType(type);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return emitMappedType(type);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return emitSignatureDeclarationWithJsDocComments(type);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return emitTypeLiteral(type);
case 70 /* Identifier */:
return emitEntityName(type);
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return emitEntityName(type);
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return emitTypePredicate(type);
}
function writeEntityName(entityName) {
@@ -58107,8 +62553,8 @@ var ts;
writeTextOfNode(currentText, entityName);
}
else {
- var left = entityName.kind === 141 /* QualifiedName */ ? entityName.left : entityName.expression;
- var right = entityName.kind === 141 /* QualifiedName */ ? entityName.right : entityName.name;
+ var left = entityName.kind === 142 /* QualifiedName */ ? entityName.left : entityName.expression;
+ var right = entityName.kind === 142 /* QualifiedName */ ? entityName.right : entityName.name;
writeEntityName(left);
write(".");
writeTextOfNode(currentText, right);
@@ -58117,14 +62563,14 @@ var ts;
function emitEntityName(entityName) {
var visibilityResult = resolver.isEntityNameVisible(entityName,
// Aliases can be written asynchronously so use correct enclosing declaration
- entityName.parent.kind === 234 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration);
+ entityName.parent.kind === 236 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeEntityName(entityName);
}
function emitExpressionWithTypeArguments(node) {
if (ts.isEntityNameExpression(node.expression)) {
- ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 177 /* PropertyAccessExpression */);
+ ts.Debug.assert(node.expression.kind === 70 /* Identifier */ || node.expression.kind === 178 /* PropertyAccessExpression */);
emitEntityName(node.expression);
if (node.typeArguments) {
write("<");
@@ -58224,7 +62670,7 @@ var ts;
currentIdentifiers = node.identifiers;
isCurrentFileExternalModule = ts.isExternalModule(node);
enclosingDeclaration = node;
- ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true /* remove comments */);
+ ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComents*/ true);
emitLines(node.statements);
}
// Return a temp variable name to be used in `export default` statements.
@@ -58233,15 +62679,15 @@ var ts;
// do not need to keep track of created temp names.
function getExportDefaultTempVariableName() {
var baseName = "_default";
- if (!(baseName in currentIdentifiers)) {
+ if (!currentIdentifiers.has(baseName)) {
return baseName;
}
var count = 0;
while (true) {
count++;
- var name_38 = baseName + "_" + count;
- if (!(name_38 in currentIdentifiers)) {
- return name_38;
+ var name = baseName + "_" + count;
+ if (!currentIdentifiers.has(name)) {
+ return name;
}
}
}
@@ -58288,10 +62734,10 @@ var ts;
if (isModuleElementVisible) {
writeModuleElement(node);
}
- else if (node.kind === 234 /* ImportEqualsDeclaration */ ||
- (node.parent.kind === 261 /* SourceFile */ && isCurrentFileExternalModule)) {
+ else if (node.kind === 236 /* ImportEqualsDeclaration */ ||
+ (node.parent.kind === 264 /* SourceFile */ && isCurrentFileExternalModule)) {
var isVisible = void 0;
- if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 261 /* SourceFile */) {
+ if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 264 /* SourceFile */) {
// Import declaration of another module that is visited async so lets put it in right spot
asynchronousSubModuleDeclarationEmitInfo.push({
node: node,
@@ -58301,7 +62747,7 @@ var ts;
});
}
else {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
var importDeclaration = node;
if (importDeclaration.importClause) {
isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
@@ -58319,23 +62765,23 @@ var ts;
}
function writeModuleElement(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return writeFunctionDeclaration(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return writeVariableStatement(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return writeInterfaceDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return writeClassDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return writeTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return writeEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return writeModuleDeclaration(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return writeImportEqualsDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return writeImportDeclaration(node);
default:
ts.Debug.fail("Unknown symbol kind");
@@ -58343,7 +62789,7 @@ var ts;
}
function emitModuleElementDeclarationFlags(node) {
// If the node is parented in the current source file we need to emit export declare or just export
- if (node.parent.kind === 261 /* SourceFile */) {
+ if (node.parent.kind === 264 /* SourceFile */) {
var modifiers = ts.getModifierFlags(node);
// If the node is exported
if (modifiers & 1 /* Export */) {
@@ -58352,7 +62798,7 @@ var ts;
if (modifiers & 512 /* Default */) {
write("default ");
}
- else if (node.kind !== 227 /* InterfaceDeclaration */ && !noDeclare) {
+ else if (node.kind !== 229 /* InterfaceDeclaration */ && !noDeclare) {
write("declare ");
}
}
@@ -58404,7 +62850,7 @@ var ts;
}
function isVisibleNamedBinding(namedBindings) {
if (namedBindings) {
- if (namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings.kind === 239 /* NamespaceImport */) {
return resolver.isDeclarationVisible(namedBindings);
}
else {
@@ -58428,7 +62874,7 @@ var ts;
// If the default binding was emitted, write the separated
write(", ");
}
- if (node.importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (node.importClause.namedBindings.kind === 239 /* NamespaceImport */) {
write("* as ");
writeTextOfNode(currentText, node.importClause.namedBindings.name);
}
@@ -58449,13 +62895,13 @@ var ts;
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
// external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}'
// so compiler will treat them as external modules.
- resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 230 /* ModuleDeclaration */;
+ resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 232 /* ModuleDeclaration */;
var moduleSpecifier;
- if (parent.kind === 234 /* ImportEqualsDeclaration */) {
+ if (parent.kind === 236 /* ImportEqualsDeclaration */) {
var node = parent;
moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node);
}
- else if (parent.kind === 230 /* ModuleDeclaration */) {
+ else if (parent.kind === 232 /* ModuleDeclaration */) {
moduleSpecifier = parent.name;
}
else {
@@ -58525,7 +62971,7 @@ var ts;
writeTextOfNode(currentText, node.name);
}
}
- while (node.body && node.body.kind !== 231 /* ModuleBlock */) {
+ while (node.body && node.body.kind !== 233 /* ModuleBlock */) {
node = node.body;
write(".");
writeTextOfNode(currentText, node.name);
@@ -58595,7 +63041,7 @@ var ts;
writeLine();
}
function isPrivateMethodTypeParameter(node) {
- return node.parent.kind === 149 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */);
+ return node.parent.kind === 150 /* MethodDeclaration */ && ts.hasModifier(node.parent, 8 /* Private */);
}
function emitTypeParameters(typeParameters) {
function emitTypeParameter(node) {
@@ -58606,53 +63052,70 @@ var ts;
// If there is constraint present and this is not a type parameter of the private method emit the constraint
if (node.constraint && !isPrivateMethodTypeParameter(node)) {
write(" extends ");
- if (node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- (node.parent.parent && node.parent.parent.kind === 161 /* TypeLiteral */)) {
- ts.Debug.assert(node.parent.kind === 149 /* MethodDeclaration */ ||
- node.parent.kind === 148 /* MethodSignature */ ||
- node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- node.parent.kind === 153 /* CallSignature */ ||
- node.parent.kind === 154 /* ConstructSignature */);
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) {
+ ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ ||
+ node.parent.kind === 149 /* MethodSignature */ ||
+ node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.kind === 154 /* CallSignature */ ||
+ node.parent.kind === 155 /* ConstructSignature */);
emitType(node.constraint);
}
else {
emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
}
}
+ if (node.default && !isPrivateMethodTypeParameter(node)) {
+ write(" = ");
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ (node.parent.parent && node.parent.parent.kind === 162 /* TypeLiteral */)) {
+ ts.Debug.assert(node.parent.kind === 150 /* MethodDeclaration */ ||
+ node.parent.kind === 149 /* MethodSignature */ ||
+ node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.kind === 154 /* CallSignature */ ||
+ node.parent.kind === 155 /* ConstructSignature */);
+ emitType(node.default);
+ }
+ else {
+ emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError);
+ }
+ }
function getTypeParameterConstraintVisibilityError() {
// Type parameter constraints are named by user so we should always be able to name it
var diagnosticMessage;
switch (node.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node.parent, 32 /* Static */)) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
}
else {
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;
default:
@@ -58671,7 +63134,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(typeReferences, isImplementsList) {
+ function emitHeritageClause(className, typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -58685,20 +63148,22 @@ var ts;
}
else {
writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
+ errorNameNode = className;
resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ errorNameNode = undefined;
}
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
// Heritage clause is written by user so it can always be named
- if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
// Class or Interface implemented/extended is inaccessible
diagnosticMessage = isImplementsList ?
ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
- ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
+ ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
}
else {
// interface is inaccessible
- diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
+ diagnosticMessage = ts.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
}
return {
diagnosticMessage: diagnosticMessage,
@@ -58730,9 +63195,10 @@ var ts;
emitTypeParameters(node.typeParameters);
var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- emitHeritageClause([baseTypeNode], /*isImplementsList*/ false);
+ node.name;
+ emitHeritageClause(node.name, [baseTypeNode], /*isImplementsList*/ false);
}
- emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
+ emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
write(" {");
writeLine();
increaseIndent();
@@ -58753,7 +63219,7 @@ var ts;
emitTypeParameters(node.typeParameters);
var interfaceExtendsTypes = ts.filter(ts.getInterfaceBaseTypeNodes(node), function (base) { return ts.isEntityNameExpression(base.expression); });
if (interfaceExtendsTypes && interfaceExtendsTypes.length) {
- emitHeritageClause(interfaceExtendsTypes, /*isImplementsList*/ false);
+ emitHeritageClause(node.name, interfaceExtendsTypes, /*isImplementsList*/ false);
}
write(" {");
writeLine();
@@ -58777,7 +63243,7 @@ var ts;
function emitVariableDeclaration(node) {
// If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted
// so there is no check needed to see if declaration is visible
- if (node.kind !== 223 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) {
+ if (node.kind !== 225 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) {
if (ts.isBindingPattern(node.name)) {
emitBindingPattern(node.name);
}
@@ -58788,11 +63254,11 @@ var ts;
writeTextOfNode(currentText, node.name);
// If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor
// we don't want to emit property declaration with "?"
- if ((node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */ ||
- (node.kind === 144 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
+ if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */ ||
+ (node.kind === 145 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) {
write("?");
}
- if ((node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */) && node.parent.kind === 161 /* TypeLiteral */) {
+ if ((node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) && node.parent.kind === 162 /* TypeLiteral */) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (resolver.isLiteralConstDeclaration(node)) {
@@ -58805,14 +63271,14 @@ var ts;
}
}
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
- if (node.kind === 223 /* VariableDeclaration */) {
+ if (node.kind === 225 /* VariableDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
}
- else if (node.kind === 147 /* PropertyDeclaration */ || node.kind === 146 /* PropertySignature */) {
+ else if (node.kind === 148 /* PropertyDeclaration */ || node.kind === 147 /* PropertySignature */) {
// TODO(jfreeman): Deal with computed properties in error reporting.
if (ts.hasModifier(node, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
@@ -58821,7 +63287,7 @@ var ts;
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -58853,7 +63319,7 @@ var ts;
var elements = [];
for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
var element = _a[_i];
- if (element.kind !== 198 /* OmittedExpression */) {
+ if (element.kind !== 199 /* OmittedExpression */) {
elements.push(element);
}
}
@@ -58923,7 +63389,7 @@ var ts;
var type = getTypeAnnotationFromAccessor(node);
if (!type) {
// couldn't get type for the first accessor, try the another one
- var anotherAccessor = node.kind === 151 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor;
+ var anotherAccessor = node.kind === 152 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor;
type = getTypeAnnotationFromAccessor(anotherAccessor);
if (type) {
accessorWithTypeAnnotation = anotherAccessor;
@@ -58936,7 +63402,7 @@ var ts;
}
function getTypeAnnotationFromAccessor(accessor) {
if (accessor) {
- return accessor.kind === 151 /* GetAccessor */
+ return accessor.kind === 152 /* GetAccessor */
? accessor.type // Getter - return type
: accessor.parameters.length > 0
? accessor.parameters[0].type // Setter parameter type
@@ -58945,7 +63411,7 @@ var ts;
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
- if (accessorWithTypeAnnotation.kind === 152 /* SetAccessor */) {
+ if (accessorWithTypeAnnotation.kind === 153 /* SetAccessor */) {
// Setters have to have type named and cannot infer it so, the type should always be named
if (ts.hasModifier(accessorWithTypeAnnotation.parent, 32 /* Static */)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
@@ -58995,17 +63461,17 @@ var ts;
// so no need to verify if the declaration is visible
if (!resolver.isImplementationOfOverload(node)) {
emitJsDocComments(node);
- if (node.kind === 225 /* FunctionDeclaration */) {
+ if (node.kind === 227 /* FunctionDeclaration */) {
emitModuleElementDeclarationFlags(node);
}
- else if (node.kind === 149 /* MethodDeclaration */ || node.kind === 150 /* Constructor */) {
+ else if (node.kind === 150 /* MethodDeclaration */ || node.kind === 151 /* Constructor */) {
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
}
- if (node.kind === 225 /* FunctionDeclaration */) {
+ if (node.kind === 227 /* FunctionDeclaration */) {
write("function ");
writeTextOfNode(currentText, node.name);
}
- else if (node.kind === 150 /* Constructor */) {
+ else if (node.kind === 151 /* Constructor */) {
write("constructor");
}
else {
@@ -59025,17 +63491,17 @@ var ts;
var prevEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = node;
var closeParenthesizedFunctionType = false;
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
// Index signature can have readonly modifier
emitClassMemberDeclarationFlags(ts.getModifierFlags(node));
write("[");
}
else {
// Construct signature or constructor type write new Signature
- if (node.kind === 154 /* ConstructSignature */ || node.kind === 159 /* ConstructorType */) {
+ if (node.kind === 155 /* ConstructSignature */ || node.kind === 160 /* ConstructorType */) {
write("new ");
}
- else if (node.kind === 158 /* FunctionType */) {
+ else if (node.kind === 159 /* FunctionType */) {
var currentOutput = writer.getText();
// Do not generate incorrect type when function type with type parameters is type argument
// This could happen if user used space between two '<' making it error free
@@ -59050,22 +63516,22 @@ var ts;
}
// Parameters
emitCommaList(node.parameters, emitParameterDeclaration);
- if (node.kind === 155 /* IndexSignature */) {
+ if (node.kind === 156 /* IndexSignature */) {
write("]");
}
else {
write(")");
}
// If this is not a constructor and is not private, emit the return type
- var isFunctionTypeOrConstructorType = node.kind === 158 /* FunctionType */ || node.kind === 159 /* ConstructorType */;
- if (isFunctionTypeOrConstructorType || node.parent.kind === 161 /* TypeLiteral */) {
+ var isFunctionTypeOrConstructorType = node.kind === 159 /* FunctionType */ || node.kind === 160 /* ConstructorType */;
+ if (isFunctionTypeOrConstructorType || node.parent.kind === 162 /* TypeLiteral */) {
// Emit type literal signature return type only if specified
if (node.type) {
write(isFunctionTypeOrConstructorType ? " => " : ": ");
emitType(node.type);
}
}
- else if (node.kind !== 150 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) {
+ else if (node.kind !== 151 /* Constructor */ && !ts.hasModifier(node, 8 /* Private */)) {
writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
}
enclosingDeclaration = prevEnclosingDeclaration;
@@ -59079,26 +63545,26 @@ var ts;
function getReturnTypeVisibilityError(symbolAccessibilityResult) {
var diagnosticMessage;
switch (node.kind) {
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
// Interfaces cannot have return types that cannot be named
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node, 32 /* Static */)) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
@@ -59106,7 +63572,7 @@ var ts;
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
}
- else if (node.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.kind === 228 /* ClassDeclaration */) {
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -59120,7 +63586,7 @@ var ts;
ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
}
break;
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -59155,9 +63621,9 @@ var ts;
write("?");
}
decreaseIndent();
- if (node.parent.kind === 158 /* FunctionType */ ||
- node.parent.kind === 159 /* ConstructorType */ ||
- node.parent.parent.kind === 161 /* TypeLiteral */) {
+ if (node.parent.kind === 159 /* FunctionType */ ||
+ node.parent.kind === 160 /* ConstructorType */ ||
+ node.parent.parent.kind === 162 /* TypeLiteral */) {
emitTypeOfVariableDeclarationFromTypeLiteral(node);
}
else if (!ts.hasModifier(node.parent, 8 /* Private */)) {
@@ -59173,24 +63639,29 @@ var ts;
}
function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
switch (node.parent.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
// Interfaces cannot have parameter types that cannot be named
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
// Interfaces cannot have parameter types that cannot be named
return symbolAccessibilityResult.errorModuleName ?
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 156 /* IndexSignature */:
+ // Interfaces cannot have parameter types that cannot be named
+ return symbolAccessibilityResult.errorModuleName ?
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
+ ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.hasModifier(node.parent, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
@@ -59198,7 +63669,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
}
- else if (node.parent.parent.kind === 226 /* ClassDeclaration */) {
+ else if (node.parent.parent.kind === 228 /* ClassDeclaration */) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -59211,7 +63682,7 @@ var ts;
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
}
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ?
ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -59223,12 +63694,12 @@ var ts;
}
function emitBindingPattern(bindingPattern) {
// We have to explicitly emit square bracket and bracket because these tokens are not store inside the node.
- if (bindingPattern.kind === 172 /* ObjectBindingPattern */) {
+ if (bindingPattern.kind === 173 /* ObjectBindingPattern */) {
write("{");
emitCommaList(bindingPattern.elements, emitBindingElement);
write("}");
}
- else if (bindingPattern.kind === 173 /* ArrayBindingPattern */) {
+ else if (bindingPattern.kind === 174 /* ArrayBindingPattern */) {
write("[");
var elements = bindingPattern.elements;
emitCommaList(elements, emitBindingElement);
@@ -59239,7 +63710,7 @@ var ts;
}
}
function emitBindingElement(bindingElement) {
- if (bindingElement.kind === 198 /* OmittedExpression */) {
+ if (bindingElement.kind === 199 /* OmittedExpression */) {
// If bindingElement is an omittedExpression (i.e. containing elision),
// we will emit blank space (although this may differ from users' original code,
// it allows emitSeparatedList to write separator appropriately)
@@ -59248,7 +63719,7 @@ var ts;
// emit : function foo([ , x, , ]) {}
write(" ");
}
- else if (bindingElement.kind === 174 /* BindingElement */) {
+ else if (bindingElement.kind === 175 /* BindingElement */) {
if (bindingElement.propertyName) {
// bindingElement has propertyName property in the following case:
// { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y"
@@ -59287,40 +63758,40 @@ var ts;
}
function emitNode(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 226 /* ClassDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
return emitModuleElement(node, isModuleElementVisible(node));
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return emitModuleElement(node, isVariableStatementVisible(node));
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// Import declaration without import clause is visible, otherwise it is not visible
return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return emitExportDeclaration(node);
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return writeFunctionDeclaration(node);
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 155 /* IndexSignature */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 156 /* IndexSignature */:
return emitSignatureDeclarationWithJsDocComments(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return emitAccessorDeclaration(node);
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return emitPropertyDeclaration(node);
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return emitEnumMemberDeclaration(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return emitExportAssignment(node);
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return emitSourceFile(node);
}
}
@@ -59338,7 +63809,7 @@ var ts;
}
else {
// Get the declaration file path
- ts.forEachExpectedEmitFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, getDeclFileName, referencedFile, emitOnlyDtsFiles);
}
if (declFileName) {
declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
@@ -59346,8 +63817,9 @@ var ts;
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
}
return addedBundledEmitReference;
- function getDeclFileName(emitFileNames, _sourceFiles, isBundledEmit) {
+ function getDeclFileName(emitFileNames, sourceFileOrBundle) {
// Dont add reference path to this file if it is a bundled emit and caller asked not emit bundled file path
+ var isBundledEmit = sourceFileOrBundle.kind === 265 /* Bundle */;
if (isBundledEmit && !addBundledFileReference) {
return;
}
@@ -59358,10 +63830,11 @@ var ts;
}
}
/* @internal */
- function writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
- var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit, emitOnlyDtsFiles);
+ function writeDeclarationFile(declarationFilePath, sourceFileOrBundle, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) {
+ var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFileOrBundle, emitOnlyDtsFiles);
var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit;
if (!emitSkipped) {
+ var sourceFiles = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle.sourceFiles : [sourceFileOrBundle];
var declarationOutput = emitDeclarationResult.referencesOutput
+ getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles);
@@ -59384,83 +63857,73 @@ var ts;
}
ts.writeDeclarationFile = writeDeclarationFile;
})(ts || (ts = {}));
-/// <reference path="checker.ts"/>
+/// <reference path="checker.ts" />
/// <reference path="transformer.ts" />
-/// <reference path="declarationEmitter.ts"/>
-/// <reference path="sourcemap.ts"/>
+/// <reference path="declarationEmitter.ts" />
+/// <reference path="sourcemap.ts" />
/// <reference path="comments.ts" />
-/* @internal */
var ts;
(function (ts) {
- // Flags enum to track count of temp variables and a few dedicated names
- var TempFlags;
- (function (TempFlags) {
- TempFlags[TempFlags["Auto"] = 0] = "Auto";
- TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
- TempFlags[TempFlags["_i"] = 268435456] = "_i";
- })(TempFlags || (TempFlags = {}));
- var id = function (s) { return s; };
- var nullTransformers = [function (_) { return id; }];
+ var delimiters = createDelimiterMap();
+ var brackets = createBracketsMap();
+ /*@internal*/
// targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
- function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) {
- var delimiters = createDelimiterMap();
- var brackets = createBracketsMap();
+ function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles, transformers) {
var compilerOptions = host.getCompilerOptions();
- var languageVersion = ts.getEmitScriptTarget(compilerOptions);
var moduleKind = ts.getEmitModuleKind(compilerOptions);
var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined;
var emitterDiagnostics = ts.createDiagnosticCollection();
var newLine = host.getNewLine();
- var transformers = emitOnlyDtsFiles ? nullTransformers : ts.getTransformers(compilerOptions);
var writer = ts.createTextWriter(newLine);
- var write = writer.write, writeLine = writer.writeLine, increaseIndent = writer.increaseIndent, decreaseIndent = writer.decreaseIndent;
var sourceMap = ts.createSourceMapWriter(host, writer);
- var emitNodeWithSourceMap = sourceMap.emitNodeWithSourceMap, emitTokenWithSourceMap = sourceMap.emitTokenWithSourceMap;
- var comments = ts.createCommentWriter(host, writer, sourceMap);
- var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition;
- var nodeIdToGeneratedName;
- var autoGeneratedIdToGeneratedName;
- var generatedNameSet;
- var tempFlags;
var currentSourceFile;
- var currentText;
- var currentFileIdentifiers;
var bundledHelpers;
var isOwnFileEmit;
var emitSkipped = false;
var sourceFiles = ts.getSourceFilesToEmit(host, targetSourceFile);
// Transform the source files
- ts.performance.mark("beforeTransform");
- var _a = ts.transformFiles(resolver, host, sourceFiles, transformers), transformed = _a.transformed, emitNodeWithSubstitution = _a.emitNodeWithSubstitution, emitNodeWithNotification = _a.emitNodeWithNotification;
- ts.performance.measure("transformTime", "beforeTransform");
+ var transform = ts.transformNodes(resolver, host, compilerOptions, sourceFiles, transformers, /*allowDtsFiles*/ false);
+ // Create a printer to print the nodes
+ var printer = createPrinter(compilerOptions, {
+ // resolver hooks
+ hasGlobalName: resolver.hasGlobalName,
+ // transform hooks
+ onEmitNode: transform.emitNodeWithNotification,
+ substituteNode: transform.substituteNode,
+ // sourcemap hooks
+ onEmitSourceMapOfNode: sourceMap.emitNodeWithSourceMap,
+ onEmitSourceMapOfToken: sourceMap.emitTokenWithSourceMap,
+ onEmitSourceMapOfPosition: sourceMap.emitPos,
+ // emitter hooks
+ onEmitHelpers: emitHelpers,
+ onSetSourceFile: setSourceFile,
+ });
// Emit each output file
ts.performance.mark("beforePrint");
- ts.forEachTransformedEmitFile(host, transformed, emitFile, emitOnlyDtsFiles);
+ ts.forEachEmittedFile(host, emitSourceFileOrBundle, transform.transformed, emitOnlyDtsFiles);
ts.performance.measure("printTime", "beforePrint");
// Clean up emit nodes on parse tree
- for (var _b = 0, sourceFiles_4 = sourceFiles; _b < sourceFiles_4.length; _b++) {
- var sourceFile = sourceFiles_4[_b];
- ts.disposeEmitNodes(sourceFile);
- }
+ transform.dispose();
return {
emitSkipped: emitSkipped,
diagnostics: emitterDiagnostics.getDiagnostics(),
emittedFiles: emittedFilesList,
sourceMaps: sourceMapDataList
};
- function emitFile(jsFilePath, sourceMapFilePath, declarationFilePath, sourceFiles, isBundledEmit) {
+ function emitSourceFileOrBundle(_a, sourceFileOrBundle) {
+ var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath;
// Make sure not to write js file and source map file if any of them cannot be written
if (!host.isEmitBlocked(jsFilePath) && !compilerOptions.noEmit) {
if (!emitOnlyDtsFiles) {
- printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
+ printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
}
}
else {
emitSkipped = true;
}
if (declarationFilePath) {
- emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFiles(sourceFiles), isBundledEmit, host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
+ emitSkipped = ts.writeDeclarationFile(declarationFilePath, ts.getOriginalSourceFileOrBundle(sourceFileOrBundle), host, resolver, emitterDiagnostics, emitOnlyDtsFiles) || emitSkipped;
}
if (!emitSkipped && emittedFilesList) {
if (!emitOnlyDtsFiles) {
@@ -59474,26 +63937,24 @@ var ts;
}
}
}
- function printFile(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) {
- sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit);
- nodeIdToGeneratedName = [];
- autoGeneratedIdToGeneratedName = [];
- generatedNameSet = ts.createMap();
- bundledHelpers = isBundledEmit ? ts.createMap() : undefined;
- isOwnFileEmit = !isBundledEmit;
- // Emit helpers from all the files
- if (isBundledEmit && moduleKind) {
- for (var _a = 0, sourceFiles_5 = sourceFiles; _a < sourceFiles_5.length; _a++) {
- var sourceFile = sourceFiles_5[_a];
- emitHelpers(sourceFile, /*isBundle*/ true);
- }
- }
- // Print each transformed source file.
- ts.forEach(sourceFiles, printSourceFile);
- writeLine();
+ function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle) {
+ var bundle = sourceFileOrBundle.kind === 265 /* Bundle */ ? sourceFileOrBundle : undefined;
+ var sourceFile = sourceFileOrBundle.kind === 264 /* SourceFile */ ? sourceFileOrBundle : undefined;
+ var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
+ sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFileOrBundle);
+ if (bundle) {
+ bundledHelpers = ts.createMap();
+ isOwnFileEmit = false;
+ printer.writeBundle(bundle, writer);
+ }
+ else {
+ isOwnFileEmit = true;
+ printer.writeFile(sourceFile, writer);
+ }
+ writer.writeLine();
var sourceMappingURL = sourceMap.getSourceMappingURL();
if (sourceMappingURL) {
- write("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Sometimes tools can sometimes see this line as a source mapping url comment
+ writer.write("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Sometimes tools can sometimes see this line as a source mapping url comment
}
// Write the source map
if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) {
@@ -59507,138 +63968,232 @@ var ts;
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), compilerOptions.emitBOM, sourceFiles);
// Reset state
sourceMap.reset();
- comments.reset();
writer.reset();
- tempFlags = 0 /* Auto */;
currentSourceFile = undefined;
- currentText = undefined;
+ bundledHelpers = undefined;
isOwnFileEmit = false;
}
- function printSourceFile(node) {
+ function setSourceFile(node) {
currentSourceFile = node;
- currentText = node.text;
- currentFileIdentifiers = node.identifiers;
sourceMap.setSourceFile(node);
- comments.setSourceFile(node);
- pipelineEmitWithNotification(0 /* SourceFile */, node);
}
- /**
- * Emits a node.
- */
+ function emitHelpers(node, writeLines) {
+ var helpersEmitted = false;
+ var bundle = node.kind === 265 /* Bundle */ ? node : undefined;
+ if (bundle && moduleKind === ts.ModuleKind.None) {
+ return;
+ }
+ var numNodes = bundle ? bundle.sourceFiles.length : 1;
+ for (var i = 0; i < numNodes; i++) {
+ var currentNode = bundle ? bundle.sourceFiles[i] : node;
+ var sourceFile = ts.isSourceFile(currentNode) ? currentNode : currentSourceFile;
+ var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
+ var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
+ var helpers = ts.getEmitHelpers(currentNode);
+ if (helpers) {
+ for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
+ var helper = _b[_a];
+ if (!helper.scoped) {
+ // Skip the helper if it can be skipped and the noEmitHelpers compiler
+ // option is set, or if it can be imported and the importHelpers compiler
+ // option is set.
+ if (shouldSkip)
+ continue;
+ // Skip the helper if it can be bundled but hasn't already been emitted and we
+ // are emitting a bundled module.
+ if (shouldBundle) {
+ if (bundledHelpers.get(helper.name)) {
+ continue;
+ }
+ bundledHelpers.set(helper.name, true);
+ }
+ }
+ else if (bundle) {
+ // Skip the helper if it is scoped and we are emitting bundled helpers
+ continue;
+ }
+ writeLines(helper.text);
+ helpersEmitted = true;
+ }
+ }
+ }
+ return helpersEmitted;
+ }
+ }
+ ts.emitFiles = emitFiles;
+ function createPrinter(printerOptions, handlers) {
+ if (printerOptions === void 0) { printerOptions = {}; }
+ if (handlers === void 0) { handlers = {}; }
+ var hasGlobalName = handlers.hasGlobalName, onEmitSourceMapOfNode = handlers.onEmitSourceMapOfNode, onEmitSourceMapOfToken = handlers.onEmitSourceMapOfToken, onEmitSourceMapOfPosition = handlers.onEmitSourceMapOfPosition, onEmitNode = handlers.onEmitNode, onEmitHelpers = handlers.onEmitHelpers, onSetSourceFile = handlers.onSetSourceFile, substituteNode = handlers.substituteNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray;
+ var newLine = ts.getNewLineCharacter(printerOptions);
+ var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
+ var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
+ var currentSourceFile;
+ var nodeIdToGeneratedName; // Map of generated names for specific nodes.
+ var autoGeneratedIdToGeneratedName; // Map of generated names for temp and loop variables.
+ var generatedNames; // Set of names generated by the NameGenerator.
+ var tempFlagsStack; // Stack of enclosing name generation scopes.
+ var tempFlags; // TempFlags for the current name generation scope.
+ var writer;
+ var ownWriter;
+ reset();
+ return {
+ // public API
+ printNode: printNode,
+ printFile: printFile,
+ printBundle: printBundle,
+ // internal API
+ writeNode: writeNode,
+ writeFile: writeFile,
+ writeBundle: writeBundle
+ };
+ function printNode(hint, node, sourceFile) {
+ switch (hint) {
+ case 0 /* SourceFile */:
+ ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
+ break;
+ case 2 /* IdentifierName */:
+ ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
+ break;
+ case 1 /* Expression */:
+ ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
+ break;
+ }
+ switch (node.kind) {
+ case 264 /* SourceFile */: return printFile(node);
+ case 265 /* Bundle */: return printBundle(node);
+ }
+ writeNode(hint, node, sourceFile, beginPrint());
+ return endPrint();
+ }
+ function printBundle(bundle) {
+ writeBundle(bundle, beginPrint());
+ return endPrint();
+ }
+ function printFile(sourceFile) {
+ writeFile(sourceFile, beginPrint());
+ return endPrint();
+ }
+ function writeNode(hint, node, sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ print(hint, node, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function writeBundle(bundle, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(bundle);
+ emitPrologueDirectivesIfNeeded(bundle);
+ emitHelpersIndirect(bundle);
+ for (var _a = 0, _b = bundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ print(0 /* SourceFile */, sourceFile, sourceFile);
+ }
+ reset();
+ writer = previousWriter;
+ }
+ function writeFile(sourceFile, output) {
+ var previousWriter = writer;
+ setWriter(output);
+ emitShebangIfNeeded(sourceFile);
+ emitPrologueDirectivesIfNeeded(sourceFile);
+ print(0 /* SourceFile */, sourceFile, sourceFile);
+ reset();
+ writer = previousWriter;
+ }
+ function beginPrint() {
+ return ownWriter || (ownWriter = ts.createTextWriter(newLine));
+ }
+ function endPrint() {
+ var text = ownWriter.getText();
+ ownWriter.reset();
+ return text;
+ }
+ function print(hint, node, sourceFile) {
+ setSourceFile(sourceFile);
+ pipelineEmitWithNotification(hint, node);
+ }
+ function setSourceFile(sourceFile) {
+ currentSourceFile = sourceFile;
+ comments.setSourceFile(sourceFile);
+ if (onSetSourceFile) {
+ onSetSourceFile(sourceFile);
+ }
+ }
+ function setWriter(output) {
+ writer = output;
+ comments.setWriter(output);
+ }
+ function reset() {
+ nodeIdToGeneratedName = [];
+ autoGeneratedIdToGeneratedName = [];
+ generatedNames = ts.createMap();
+ tempFlagsStack = [];
+ tempFlags = 0 /* Auto */;
+ comments.reset();
+ setWriter(/*output*/ undefined);
+ }
function emit(node) {
pipelineEmitWithNotification(3 /* Unspecified */, node);
}
- /**
- * Emits an IdentifierName.
- */
function emitIdentifierName(node) {
pipelineEmitWithNotification(2 /* IdentifierName */, node);
}
- /**
- * Emits an expression node.
- */
function emitExpression(node) {
pipelineEmitWithNotification(1 /* Expression */, node);
}
- /**
- * Emits a node with possible notification.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called from printSourceFile, emit, emitExpression, or
- * emitIdentifierName.
- */
- function pipelineEmitWithNotification(emitContext, node) {
- emitNodeWithNotification(emitContext, node, pipelineEmitWithComments);
- }
- /**
- * Emits a node with comments.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithNotification.
- */
- function pipelineEmitWithComments(emitContext, node) {
- // Do not emit comments for SourceFile
- if (emitContext === 0 /* SourceFile */) {
- pipelineEmitWithSourceMap(emitContext, node);
- return;
+ function pipelineEmitWithNotification(hint, node) {
+ if (onEmitNode) {
+ onEmitNode(hint, node, pipelineEmitWithComments);
}
- emitNodeWithComments(emitContext, node, pipelineEmitWithSourceMap);
- }
- /**
- * Emits a node with source maps.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithComments.
- */
- function pipelineEmitWithSourceMap(emitContext, node) {
- // Do not emit source mappings for SourceFile or IdentifierName
- if (emitContext === 0 /* SourceFile */
- || emitContext === 2 /* IdentifierName */) {
- pipelineEmitWithSubstitution(emitContext, node);
- return;
+ else {
+ pipelineEmitWithComments(hint, node);
}
- emitNodeWithSourceMap(emitContext, node, pipelineEmitWithSubstitution);
- }
- /**
- * Emits a node with possible substitution.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithSourceMap or
- * pipelineEmitInUnspecifiedContext (when picking a more specific context).
- */
- function pipelineEmitWithSubstitution(emitContext, node) {
- emitNodeWithSubstitution(emitContext, node, pipelineEmitForContext);
}
- /**
- * Emits a node.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitWithSubstitution.
- */
- function pipelineEmitForContext(emitContext, node) {
- switch (emitContext) {
- case 0 /* SourceFile */: return pipelineEmitInSourceFileContext(node);
- case 2 /* IdentifierName */: return pipelineEmitInIdentifierNameContext(node);
- case 3 /* Unspecified */: return pipelineEmitInUnspecifiedContext(node);
- case 1 /* Expression */: return pipelineEmitInExpressionContext(node);
+ function pipelineEmitWithComments(hint, node) {
+ node = trySubstituteNode(hint, node);
+ if (emitNodeWithComments && hint !== 0 /* SourceFile */) {
+ emitNodeWithComments(hint, node, pipelineEmitWithSourceMap);
+ }
+ else {
+ pipelineEmitWithSourceMap(hint, node);
}
}
- /**
- * Emits a node in the SourceFile EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInSourceFileContext(node) {
- var kind = node.kind;
- switch (kind) {
- // Top-level nodes
- case 261 /* SourceFile */:
- return emitSourceFile(node);
+ function pipelineEmitWithSourceMap(hint, node) {
+ if (onEmitSourceMapOfNode && hint !== 0 /* SourceFile */ && hint !== 2 /* IdentifierName */) {
+ onEmitSourceMapOfNode(hint, node, pipelineEmitWithHint);
+ }
+ else {
+ pipelineEmitWithHint(hint, node);
}
}
- /**
- * Emits a node in the IdentifierName EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInIdentifierNameContext(node) {
- var kind = node.kind;
- switch (kind) {
- // Identifiers
- case 70 /* Identifier */:
- return emitIdentifier(node);
+ function pipelineEmitWithHint(hint, node) {
+ switch (hint) {
+ case 0 /* SourceFile */: return pipelineEmitSourceFile(node);
+ case 2 /* IdentifierName */: return pipelineEmitIdentifierName(node);
+ case 1 /* Expression */: return pipelineEmitExpression(node);
+ case 3 /* Unspecified */: return pipelineEmitUnspecified(node);
}
}
- /**
- * Emits a node in the Unspecified EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInUnspecifiedContext(node) {
+ function pipelineEmitSourceFile(node) {
+ ts.Debug.assertNode(node, ts.isSourceFile);
+ emitSourceFile(node);
+ }
+ function pipelineEmitIdentifierName(node) {
+ ts.Debug.assertNode(node, ts.isIdentifier);
+ emitIdentifier(node);
+ }
+ function pipelineEmitUnspecified(node) {
var kind = node.kind;
+ // Reserved words
+ // Strict mode reserved words
+ // Contextual keywords
+ if (ts.isKeyword(kind)) {
+ writeTokenText(kind);
+ return;
+ }
switch (kind) {
// Pseudo-literals
case 13 /* TemplateHead */:
@@ -59648,254 +64203,217 @@ var ts;
// Identifiers
case 70 /* Identifier */:
return emitIdentifier(node);
- // Reserved words
- case 75 /* ConstKeyword */:
- case 78 /* DefaultKeyword */:
- case 83 /* ExportKeyword */:
- case 104 /* VoidKeyword */:
- // Strict mode reserved words
- case 111 /* PrivateKeyword */:
- case 112 /* ProtectedKeyword */:
- case 113 /* PublicKeyword */:
- case 114 /* StaticKeyword */:
- // Contextual keywords
- case 116 /* AbstractKeyword */:
- case 117 /* AsKeyword */:
- case 118 /* AnyKeyword */:
- case 119 /* AsyncKeyword */:
- case 120 /* AwaitKeyword */:
- case 121 /* BooleanKeyword */:
- case 122 /* ConstructorKeyword */:
- case 123 /* DeclareKeyword */:
- case 124 /* GetKeyword */:
- case 125 /* IsKeyword */:
- case 127 /* ModuleKeyword */:
- case 128 /* NamespaceKeyword */:
- case 129 /* NeverKeyword */:
- case 130 /* ReadonlyKeyword */:
- case 131 /* RequireKeyword */:
- case 132 /* NumberKeyword */:
- case 133 /* SetKeyword */:
- case 134 /* StringKeyword */:
- case 135 /* SymbolKeyword */:
- case 136 /* TypeKeyword */:
- case 137 /* UndefinedKeyword */:
- case 138 /* FromKeyword */:
- case 139 /* GlobalKeyword */:
- case 140 /* OfKeyword */:
- writeTokenText(kind);
- return;
// Parse tree nodes
// Names
- case 141 /* QualifiedName */:
+ case 142 /* QualifiedName */:
return emitQualifiedName(node);
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return emitComputedPropertyName(node);
// Signature elements
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
return emitTypeParameter(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return emitParameter(node);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return emitDecorator(node);
// Type members
- case 146 /* PropertySignature */:
+ case 147 /* PropertySignature */:
return emitPropertySignature(node);
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
return emitPropertyDeclaration(node);
- case 148 /* MethodSignature */:
+ case 149 /* MethodSignature */:
return emitMethodSignature(node);
- case 149 /* MethodDeclaration */:
+ case 150 /* MethodDeclaration */:
return emitMethodDeclaration(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return emitConstructor(node);
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
return emitAccessorDeclaration(node);
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
return emitCallSignature(node);
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
return emitConstructSignature(node);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return emitIndexSignature(node);
// Types
- case 156 /* TypePredicate */:
+ case 157 /* TypePredicate */:
return emitTypePredicate(node);
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
return emitTypeReference(node);
- case 158 /* FunctionType */:
+ case 159 /* FunctionType */:
return emitFunctionType(node);
- case 159 /* ConstructorType */:
+ case 160 /* ConstructorType */:
return emitConstructorType(node);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return emitTypeQuery(node);
- case 161 /* TypeLiteral */:
+ case 162 /* TypeLiteral */:
return emitTypeLiteral(node);
- case 162 /* ArrayType */:
+ case 163 /* ArrayType */:
return emitArrayType(node);
- case 163 /* TupleType */:
+ case 164 /* TupleType */:
return emitTupleType(node);
- case 164 /* UnionType */:
+ case 165 /* UnionType */:
return emitUnionType(node);
- case 165 /* IntersectionType */:
+ case 166 /* IntersectionType */:
return emitIntersectionType(node);
- case 166 /* ParenthesizedType */:
+ case 167 /* ParenthesizedType */:
return emitParenthesizedType(node);
- case 199 /* ExpressionWithTypeArguments */:
+ case 200 /* ExpressionWithTypeArguments */:
return emitExpressionWithTypeArguments(node);
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
return emitThisType();
- case 168 /* TypeOperator */:
+ case 169 /* TypeOperator */:
return emitTypeOperator(node);
- case 169 /* IndexedAccessType */:
+ case 170 /* IndexedAccessType */:
return emitIndexedAccessType(node);
- case 170 /* MappedType */:
+ case 171 /* MappedType */:
return emitMappedType(node);
- case 171 /* LiteralType */:
+ case 172 /* LiteralType */:
return emitLiteralType(node);
// Binding patterns
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
return emitObjectBindingPattern(node);
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return emitArrayBindingPattern(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return emitBindingElement(node);
// Misc
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return emitTemplateSpan(node);
- case 203 /* SemicolonClassElement */:
+ case 205 /* SemicolonClassElement */:
return emitSemicolonClassElement();
// Statements
- case 204 /* Block */:
+ case 206 /* Block */:
return emitBlock(node);
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
return emitVariableStatement(node);
- case 206 /* EmptyStatement */:
+ case 208 /* EmptyStatement */:
return emitEmptyStatement();
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return emitExpressionStatement(node);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
return emitIfStatement(node);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
return emitDoStatement(node);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
return emitWhileStatement(node);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return emitForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
return emitForInStatement(node);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
return emitForOfStatement(node);
- case 214 /* ContinueStatement */:
+ case 216 /* ContinueStatement */:
return emitContinueStatement(node);
- case 215 /* BreakStatement */:
+ case 217 /* BreakStatement */:
return emitBreakStatement(node);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
return emitReturnStatement(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
return emitWithStatement(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
return emitSwitchStatement(node);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
return emitLabeledStatement(node);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
return emitThrowStatement(node);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
return emitTryStatement(node);
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
return emitDebuggerStatement(node);
// Declarations
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
return emitVariableDeclaration(node);
- case 224 /* VariableDeclarationList */:
+ case 226 /* VariableDeclarationList */:
return emitVariableDeclarationList(node);
- case 225 /* FunctionDeclaration */:
+ case 227 /* FunctionDeclaration */:
return emitFunctionDeclaration(node);
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
return emitClassDeclaration(node);
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return emitInterfaceDeclaration(node);
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return emitTypeAliasDeclaration(node);
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
return emitEnumDeclaration(node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return emitModuleDeclaration(node);
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
return emitModuleBlock(node);
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return emitCaseBlock(node);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
return emitImportEqualsDeclaration(node);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
return emitImportDeclaration(node);
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
return emitImportClause(node);
- case 237 /* NamespaceImport */:
+ case 239 /* NamespaceImport */:
return emitNamespaceImport(node);
- case 238 /* NamedImports */:
+ case 240 /* NamedImports */:
return emitNamedImports(node);
- case 239 /* ImportSpecifier */:
+ case 241 /* ImportSpecifier */:
return emitImportSpecifier(node);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
return emitExportAssignment(node);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
return emitExportDeclaration(node);
- case 242 /* NamedExports */:
+ case 244 /* NamedExports */:
return emitNamedExports(node);
- case 243 /* ExportSpecifier */:
+ case 245 /* ExportSpecifier */:
return emitExportSpecifier(node);
- case 244 /* MissingDeclaration */:
+ case 246 /* MissingDeclaration */:
return;
// Module references
- case 245 /* ExternalModuleReference */:
+ case 247 /* ExternalModuleReference */:
return emitExternalModuleReference(node);
// JSX (non-expression)
case 10 /* JsxText */:
return emitJsxText(node);
- case 248 /* JsxOpeningElement */:
+ case 250 /* JsxOpeningElement */:
return emitJsxOpeningElement(node);
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
return emitJsxClosingElement(node);
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
return emitJsxAttribute(node);
- case 251 /* JsxSpreadAttribute */:
+ case 253 /* JsxAttributes */:
+ return emitJsxAttributes(node);
+ case 254 /* JsxSpreadAttribute */:
return emitJsxSpreadAttribute(node);
- case 252 /* JsxExpression */:
+ case 255 /* JsxExpression */:
return emitJsxExpression(node);
// Clauses
- case 253 /* CaseClause */:
+ case 256 /* CaseClause */:
return emitCaseClause(node);
- case 254 /* DefaultClause */:
+ case 257 /* DefaultClause */:
return emitDefaultClause(node);
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
return emitHeritageClause(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return emitCatchClause(node);
// Property assignments
- case 257 /* PropertyAssignment */:
+ case 260 /* PropertyAssignment */:
return emitPropertyAssignment(node);
- case 258 /* ShorthandPropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
return emitShorthandPropertyAssignment(node);
- case 259 /* SpreadAssignment */:
+ case 262 /* SpreadAssignment */:
return emitSpreadAssignment(node);
// Enum
- case 260 /* EnumMember */:
+ case 263 /* EnumMember */:
return emitEnumMember(node);
}
// If the node is an expression, try to emit it as an expression with
// substitution.
if (ts.isExpression(node)) {
- return pipelineEmitWithSubstitution(1 /* Expression */, node);
+ return pipelineEmitExpression(trySubstituteNode(1 /* Expression */, node));
+ }
+ if (ts.isToken(node)) {
+ writeTokenText(kind);
+ return;
}
}
- /**
- * Emits a node in the Expression EmitContext.
- *
- * NOTE: Do not call this method directly. It is part of the emit pipeline
- * and should only be called indirectly from pipelineEmitForContext.
- */
- function pipelineEmitInExpressionContext(node) {
+ function pipelineEmitExpression(node) {
var kind = node.kind;
switch (kind) {
// Literals
@@ -59917,68 +64435,76 @@ var ts;
writeTokenText(kind);
return;
// Expressions
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return emitArrayLiteralExpression(node);
- case 176 /* ObjectLiteralExpression */:
+ case 177 /* ObjectLiteralExpression */:
return emitObjectLiteralExpression(node);
- case 177 /* PropertyAccessExpression */:
+ case 178 /* PropertyAccessExpression */:
return emitPropertyAccessExpression(node);
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return emitElementAccessExpression(node);
- case 179 /* CallExpression */:
+ case 180 /* CallExpression */:
return emitCallExpression(node);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
return emitNewExpression(node);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return emitTaggedTemplateExpression(node);
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
return emitTypeAssertionExpression(node);
- case 183 /* ParenthesizedExpression */:
+ case 184 /* ParenthesizedExpression */:
return emitParenthesizedExpression(node);
- case 184 /* FunctionExpression */:
+ case 185 /* FunctionExpression */:
return emitFunctionExpression(node);
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
return emitArrowFunction(node);
- case 186 /* DeleteExpression */:
+ case 187 /* DeleteExpression */:
return emitDeleteExpression(node);
- case 187 /* TypeOfExpression */:
+ case 188 /* TypeOfExpression */:
return emitTypeOfExpression(node);
- case 188 /* VoidExpression */:
+ case 189 /* VoidExpression */:
return emitVoidExpression(node);
- case 189 /* AwaitExpression */:
+ case 190 /* AwaitExpression */:
return emitAwaitExpression(node);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return emitPrefixUnaryExpression(node);
- case 191 /* PostfixUnaryExpression */:
+ case 192 /* PostfixUnaryExpression */:
return emitPostfixUnaryExpression(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return emitBinaryExpression(node);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return emitConditionalExpression(node);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
return emitTemplateExpression(node);
- case 195 /* YieldExpression */:
+ case 196 /* YieldExpression */:
return emitYieldExpression(node);
- case 196 /* SpreadElement */:
+ case 197 /* SpreadElement */:
return emitSpreadExpression(node);
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return emitClassExpression(node);
- case 198 /* OmittedExpression */:
+ case 199 /* OmittedExpression */:
return;
- case 200 /* AsExpression */:
+ case 201 /* AsExpression */:
return emitAsExpression(node);
- case 201 /* NonNullExpression */:
+ case 202 /* NonNullExpression */:
return emitNonNullExpression(node);
+ case 203 /* MetaProperty */:
+ return emitMetaProperty(node);
// JSX
- case 246 /* JsxElement */:
+ case 248 /* JsxElement */:
return emitJsxElement(node);
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return emitJsxSelfClosingElement(node);
// Transformation nodes
- case 294 /* PartiallyEmittedExpression */:
+ case 295 /* PartiallyEmittedExpression */:
return emitPartiallyEmittedExpression(node);
- case 297 /* RawExpression */:
- return writeLines(node.text);
+ }
+ }
+ function trySubstituteNode(hint, node) {
+ return node && substituteNode && substituteNode(hint, node) || node;
+ }
+ function emitHelpersIndirect(node) {
+ if (onEmitHelpers) {
+ onEmitHelpers(node, writeLines);
}
}
//
@@ -59987,9 +64513,6 @@ var ts;
// SyntaxKind.NumericLiteral
function emitNumericLiteral(node) {
emitLiteral(node);
- if (node.trailingComment) {
- write(" /*" + node.trailingComment + "*/");
- }
}
// SyntaxKind.StringLiteral
// SyntaxKind.RegularExpressionLiteral
@@ -59999,7 +64522,7 @@ var ts;
// SyntaxKind.TemplateTail
function emitLiteral(node) {
var text = getLiteralTextOfNode(node);
- if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap)
+ if ((printerOptions.sourceMap || printerOptions.inlineSourceMap)
&& (node.kind === 9 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
@@ -60047,8 +64570,8 @@ var ts;
writeIfPresent(node.dotDotDotToken, "...");
emit(node.name);
writeIfPresent(node.questionToken, "?");
- emitExpressionWithPrefix(" = ", node.initializer);
emitWithPrefix(": ", node.type);
+ emitExpressionWithPrefix(" = ", node.initializer);
}
function emitDecorator(decorator) {
write("@");
@@ -60098,7 +64621,7 @@ var ts;
function emitAccessorDeclaration(node) {
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
- write(node.kind === 151 /* GetAccessor */ ? "get " : "set ");
+ write(node.kind === 152 /* GetAccessor */ ? "get " : "set ");
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
@@ -60201,17 +64724,13 @@ var ts;
write("{");
writeLine();
increaseIndent();
- if (node.readonlyToken) {
- write("readonly ");
- }
+ writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
write(" in ");
emit(node.typeParameter.constraint);
write("]");
- if (node.questionToken) {
- write("?");
- }
+ writeIfPresent(node.questionToken, "?");
write(": ");
emit(node.type);
write(";");
@@ -60277,7 +64796,7 @@ var ts;
increaseIndent();
}
var preferNewLine = node.multiLine ? 32768 /* PreferNewLine */ : 0 /* None */;
- var allowTrailingComma = languageVersion >= 1 /* ES5 */ ? 32 /* AllowTrailingComma */ : 0 /* None */;
+ var allowTrailingComma = currentSourceFile.languageVersion >= 1 /* ES5 */ ? 32 /* AllowTrailingComma */ : 0 /* None */;
emitList(node, properties, 978 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine);
if (indentedFlag) {
decreaseIndent();
@@ -60289,7 +64808,7 @@ var ts;
var indentAfterDot = false;
if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) {
var dotRangeStart = node.expression.end;
- var dotRangeEnd = ts.skipTrivia(currentText, node.expression.end) + 1;
+ var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 22 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd };
indentBeforeDot = needsIndentation(node, node.expression, dotToken);
indentAfterDot = needsIndentation(node, dotToken, node.name);
@@ -60305,10 +64824,12 @@ var ts;
// 1..toString is a valid property access, emit a dot after the literal
// Also emit a dot if expression is a integer const enum value - it will appear in generated code as numeric literal
function needsDotDotForPropertyAccess(expression) {
- if (expression.kind === 8 /* NumericLiteral */) {
- // check if numeric literal was originally written with a dot
+ expression = ts.skipPartiallyEmittedExpressions(expression);
+ if (ts.isNumericLiteral(expression)) {
+ // check if numeric literal is a decimal literal that was originally written with a dot
var text = getLiteralTextOfNode(expression);
- return text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0;
+ return !expression.numericLiteralFlags
+ && text.indexOf(ts.tokenToString(22 /* DotToken */)) < 0;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
// check if constant enum value is integer
@@ -60316,7 +64837,7 @@ var ts;
// isFinite handles cases when constantValue is undefined
return isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
- && compilerOptions.removeComments;
+ && printerOptions.removeComments;
}
}
function emitElementAccessExpression(node) {
@@ -60342,11 +64863,9 @@ var ts;
emitExpression(node.template);
}
function emitTypeAssertionExpression(node) {
- if (node.type) {
- write("<");
- emit(node.type);
- write(">");
- }
+ write("<");
+ emit(node.type);
+ write(">");
emitExpression(node.expression);
}
function emitParenthesizedExpression(node) {
@@ -60405,7 +64924,7 @@ var ts;
// expression a prefix increment whose operand is a plus expression - (++(+x))
// The same is true of minus of course.
var operand = node.operand;
- return operand.kind === 190 /* PrefixUnaryExpression */
+ return operand.kind === 191 /* PrefixUnaryExpression */
&& ((node.operator === 36 /* PlusToken */ && (operand.operator === 36 /* PlusToken */ || operand.operator === 42 /* PlusPlusToken */))
|| (node.operator === 37 /* MinusToken */ && (operand.operator === 37 /* MinusToken */ || operand.operator === 43 /* MinusMinusToken */)));
}
@@ -60471,6 +64990,11 @@ var ts;
emitExpression(node.expression);
write("!");
}
+ function emitMetaProperty(node) {
+ writeToken(node.keywordToken, node.pos);
+ write(".");
+ emit(node.name);
+ }
//
// Misc
//
@@ -60490,6 +65014,10 @@ var ts;
else {
writeToken(16 /* OpenBraceToken */, node.pos, /*contextNode*/ node);
emitBlockStatements(node);
+ // We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted
+ increaseIndent();
+ emitLeadingCommentsOfPosition(node.statements.end);
+ decreaseIndent();
writeToken(17 /* CloseBraceToken */, node.statements.end, /*contextNode*/ node);
}
}
@@ -60519,27 +65047,27 @@ var ts;
writeToken(18 /* OpenParenToken */, openParenPos, node);
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end, node);
- emitEmbeddedStatement(node.thenStatement);
+ emitEmbeddedStatement(node, node.thenStatement);
if (node.elseStatement) {
- writeLine();
+ writeLineOrSpace(node);
writeToken(81 /* ElseKeyword */, node.thenStatement.end, node);
- if (node.elseStatement.kind === 208 /* IfStatement */) {
+ if (node.elseStatement.kind === 210 /* IfStatement */) {
write(" ");
emit(node.elseStatement);
}
else {
- emitEmbeddedStatement(node.elseStatement);
+ emitEmbeddedStatement(node, node.elseStatement);
}
}
}
function emitDoStatement(node) {
write("do");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
if (ts.isBlock(node.statement)) {
write(" ");
}
else {
- writeLine();
+ writeLineOrSpace(node);
}
write("while (");
emitExpression(node.expression);
@@ -60549,7 +65077,7 @@ var ts;
write("while (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
@@ -60561,7 +65089,7 @@ var ts;
write(";");
emitExpressionWithPrefix(" ", node.incrementor);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForInStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
@@ -60571,21 +65099,22 @@ var ts;
write(" in ");
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForOfStatement(node) {
var openParenPos = writeToken(87 /* ForKeyword */, node.pos);
write(" ");
+ emitWithSuffix(node.awaitModifier, " ");
writeToken(18 /* OpenParenToken */, openParenPos);
emitForBinding(node.initializer);
write(" of ");
emitExpression(node.expression);
writeToken(19 /* CloseParenToken */, node.expression.end);
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitForBinding(node) {
if (node !== undefined) {
- if (node.kind === 224 /* VariableDeclarationList */) {
+ if (node.kind === 226 /* VariableDeclarationList */) {
emit(node);
}
else {
@@ -60612,7 +65141,7 @@ var ts;
write("with (");
emitExpression(node.expression);
write(")");
- emitEmbeddedStatement(node.statement);
+ emitEmbeddedStatement(node, node.statement);
}
function emitSwitchStatement(node) {
var openParenPos = writeToken(97 /* SwitchKeyword */, node.pos);
@@ -60636,9 +65165,12 @@ var ts;
function emitTryStatement(node) {
write("try ");
emit(node.tryBlock);
- emit(node.catchClause);
+ if (node.catchClause) {
+ writeLineOrSpace(node);
+ emit(node.catchClause);
+ }
if (node.finallyBlock) {
- writeLine();
+ writeLineOrSpace(node);
write("finally ");
emit(node.finallyBlock);
}
@@ -60669,6 +65201,9 @@ var ts;
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
}
+ function emitBlockCallback(_hint, body) {
+ emitBlockFunctionBody(body);
+ }
function emitSignatureAndBody(node, emitSignatureHead) {
var body = node.body;
if (body) {
@@ -60679,14 +65214,23 @@ var ts;
}
if (ts.getEmitFlags(node) & 262144 /* ReuseTempVariableScope */) {
emitSignatureHead(node);
- emitBlockFunctionBody(body);
+ if (onEmitNode) {
+ onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
emitSignatureHead(node);
- emitBlockFunctionBody(body);
- tempFlags = savedTempFlags;
+ if (onEmitNode) {
+ onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
+ popNameGenerationScope();
}
if (indentedFlag) {
decreaseIndent();
@@ -60741,9 +65285,15 @@ var ts;
function emitBlockFunctionBody(body) {
write(" {");
increaseIndent();
- emitBodyWithDetachedComments(body, body.statements, shouldEmitBlockFunctionBodyOnSingleLine(body)
+ var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
? emitBlockFunctionBodyOnSingleLine
- : emitBlockFunctionBodyWorker);
+ : emitBlockFunctionBodyWorker;
+ if (emitBodyWithDetachedComments) {
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
+ }
+ else {
+ emitBlockFunctionBody(body);
+ }
decreaseIndent();
writeToken(17 /* CloseBraceToken */, body.statements.end, body);
}
@@ -60753,8 +65303,9 @@ var ts;
function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine) {
// Emit all the prologue directives (like "use strict").
var statementOffset = emitPrologueDirectives(body.statements, /*startWithNewLine*/ true);
- var helpersEmitted = emitHelpers(body);
- if (statementOffset === 0 && !helpersEmitted && emitBlockFunctionBodyOnSingleLine) {
+ var pos = writer.getTextPos();
+ emitHelpersIndirect(body);
+ if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine) {
decreaseIndent();
emitList(body, body.statements, 384 /* SingleLineFunctionBodyStatements */);
increaseIndent();
@@ -60777,15 +65328,14 @@ var ts;
}
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, 256 /* ClassHeritageClauses */);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 65 /* ClassMembers */);
write("}");
+ popNameGenerationScope();
if (indentedFlag) {
decreaseIndent();
}
- tempFlags = savedTempFlags;
}
function emitInterfaceDeclaration(node) {
emitDecorators(node, node.decorators);
@@ -60812,19 +65362,18 @@ var ts;
emitModifiers(node, node.modifiers);
write("enum ");
emit(node.name);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write(" {");
emitList(node, node.members, 81 /* EnumMembers */);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
function emitModuleDeclaration(node) {
emitModifiers(node, node.modifiers);
write(node.flags & 16 /* Namespace */ ? "namespace " : "module ");
emit(node.name);
var body = node.body;
- while (body.kind === 230 /* ModuleDeclaration */) {
+ while (body.kind === 232 /* ModuleDeclaration */) {
write(".");
emit(body.name);
body = body.body;
@@ -60837,13 +65386,11 @@ var ts;
write("{ }");
}
else {
- var savedTempFlags = tempFlags;
- tempFlags = 0;
+ pushNameGenerationScope();
write("{");
- increaseIndent();
emitBlockStatements(node);
write("}");
- tempFlags = savedTempFlags;
+ popNameGenerationScope();
}
}
function emitCaseBlock(node) {
@@ -60951,14 +65498,20 @@ var ts;
write("<");
emitJsxTagName(node.tagName);
write(" ");
- emitList(node, node.attributes, 131328 /* JsxElementAttributes */);
+ // We are checking here so we won't re-enter the emiting pipeline and emit extra sourcemap
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write("/>");
}
function emitJsxOpeningElement(node) {
write("<");
emitJsxTagName(node.tagName);
- writeIfAny(node.attributes, " ");
- emitList(node, node.attributes, 131328 /* JsxElementAttributes */);
+ writeIfAny(node.attributes.properties, " ");
+ // We are checking here so we won't re-enter the emitting pipeline and emit extra sourcemap
+ if (node.attributes.properties && node.attributes.properties.length > 0) {
+ emit(node.attributes);
+ }
write(">");
}
function emitJsxText(node) {
@@ -60969,6 +65522,9 @@ var ts;
emitJsxTagName(node.tagName);
write(">");
}
+ function emitJsxAttributes(node) {
+ emitList(node, node.properties, 131328 /* JsxElementAttributes */);
+ }
function emitJsxAttribute(node) {
emit(node.name);
emitWithPrefix("=", node.initializer);
@@ -60981,6 +65537,9 @@ var ts;
function emitJsxExpression(node) {
if (node.expression) {
write("{");
+ if (node.dotDotDotToken) {
+ write("...");
+ }
emitExpression(node.expression);
write("}");
}
@@ -61028,7 +65587,6 @@ var ts;
emitList(node, node.types, 272 /* HeritageClauseTypes */);
}
function emitCatchClause(node) {
- writeLine();
var openParenPos = writeToken(73 /* CatchKeyword */, node.pos);
write(" ");
writeToken(18 /* OpenParenToken */, openParenPos);
@@ -61051,7 +65609,7 @@ var ts;
// "comment1" is not considered to be leading comment for node.initializer
// but rather a trailing comment on the previous node.
var initializer = node.initializer;
- if ((ts.getEmitFlags(initializer) & 512 /* NoLeadingComments */) === 0) {
+ if (emitTrailingCommentsOfPosition && (ts.getEmitFlags(initializer) & 512 /* NoLeadingComments */) === 0) {
var commentRange = ts.getCommentRange(initializer);
emitTrailingCommentsOfPosition(commentRange.pos);
}
@@ -61082,17 +65640,27 @@ var ts;
//
function emitSourceFile(node) {
writeLine();
- emitShebang();
- emitBodyWithDetachedComments(node, node.statements, emitSourceFileWorker);
+ var statements = node.statements;
+ if (emitBodyWithDetachedComments) {
+ // Emit detached comment if there are no prologue directives or if the first node is synthesized.
+ // The synthesized node will have no leading comment so some comments may be missed.
+ var shouldEmitDetachedComment = statements.length === 0 ||
+ !ts.isPrologueDirective(statements[0]) ||
+ ts.nodeIsSynthesized(statements[0]);
+ if (shouldEmitDetachedComment) {
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
+ return;
+ }
+ }
+ emitSourceFileWorker(node);
}
function emitSourceFileWorker(node) {
var statements = node.statements;
- var statementOffset = emitPrologueDirectives(statements);
- var savedTempFlags = tempFlags;
- tempFlags = 0;
- emitHelpers(node);
- emitList(node, statements, 1 /* MultiLine */, statementOffset);
- tempFlags = savedTempFlags;
+ pushNameGenerationScope();
+ emitHelpersIndirect(node);
+ var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
+ emitList(node, statements, 1 /* MultiLine */, index === -1 ? statements.length : index);
+ popNameGenerationScope();
}
// Transformation nodes
function emitPartiallyEmittedExpression(node) {
@@ -61102,13 +65670,20 @@ var ts;
* Emits any prologue directives at the start of a Statement list, returning the
* number of prologue directives written to the output.
*/
- function emitPrologueDirectives(statements, startWithNewLine) {
+ function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
- if (ts.isPrologueDirective(statements[i])) {
- if (startWithNewLine || i > 0) {
- writeLine();
+ var statement = statements[i];
+ if (ts.isPrologueDirective(statement)) {
+ var shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;
+ if (shouldEmitPrologueDirective) {
+ if (startWithNewLine || i > 0) {
+ writeLine();
+ }
+ emit(statement);
+ if (seenPrologueDirectives) {
+ seenPrologueDirectives.set(statement.expression.text, statement.expression.text);
+ }
}
- emit(statements[i]);
}
else {
// return index of the first non prologue directive
@@ -61117,81 +65692,42 @@ var ts;
}
return statements.length;
}
- function emitHelpers(node, isBundle) {
- var sourceFile = ts.isSourceFile(node) ? node : currentSourceFile;
- var shouldSkip = compilerOptions.noEmitHelpers || (sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined);
- var shouldBundle = ts.isSourceFile(node) && !isOwnFileEmit;
- var helpersEmitted = false;
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- for (var _a = 0, _b = ts.stableSort(helpers, ts.compareEmitHelpers); _a < _b.length; _a++) {
- var helper = _b[_a];
- if (!helper.scoped) {
- // Skip the helper if it can be skipped and the noEmitHelpers compiler
- // option is set, or if it can be imported and the importHelpers compiler
- // option is set.
- if (shouldSkip)
- continue;
- // Skip the helper if it can be bundled but hasn't already been emitted and we
- // are emitting a bundled module.
- if (shouldBundle) {
- if (bundledHelpers[helper.name]) {
- continue;
- }
- bundledHelpers[helper.name] = true;
- }
- }
- else if (isBundle) {
- // Skip the helper if it is scoped and we are emitting bundled helpers
- continue;
- }
- writeLines(helper.text);
- helpersEmitted = true;
- }
+ function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ setSourceFile(sourceFileOrBundle);
+ emitPrologueDirectives(sourceFileOrBundle.statements);
}
- if (helpersEmitted) {
- writeLine();
+ else {
+ var seenPrologueDirectives = ts.createMap();
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ setSourceFile(sourceFile);
+ emitPrologueDirectives(sourceFile.statements, /*startWithNewLine*/ true, seenPrologueDirectives);
+ }
}
- return helpersEmitted;
}
- function writeLines(text) {
- var lines = text.split(/\r\n?|\n/g);
- var indentation = guessIndentation(lines);
- for (var i = 0; i < lines.length; i++) {
- var line = indentation ? lines[i].slice(indentation) : lines[i];
- if (line.length) {
- if (i > 0) {
- writeLine();
- }
- write(line);
+ function emitShebangIfNeeded(sourceFileOrBundle) {
+ if (ts.isSourceFile(sourceFileOrBundle)) {
+ var shebang = ts.getShebang(sourceFileOrBundle.text);
+ if (shebang) {
+ write(shebang);
+ writeLine();
+ return true;
}
}
- }
- function guessIndentation(lines) {
- var indentation;
- for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
- var line = lines_1[_a];
- for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
- if (!ts.isWhiteSpace(line.charCodeAt(i))) {
- if (indentation === undefined || i < indentation) {
- indentation = i;
- break;
- }
+ else {
+ for (var _a = 0, _b = sourceFileOrBundle.sourceFiles; _a < _b.length; _a++) {
+ var sourceFile = _b[_a];
+ // Emit only the first encountered shebang
+ if (emitShebangIfNeeded(sourceFile)) {
+ break;
}
}
}
- return indentation;
}
//
// Helpers
//
- function emitShebang() {
- var shebang = ts.getShebang(currentText);
- if (shebang) {
- write(shebang);
- writeLine();
- }
- }
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
emitList(node, modifiers, 256 /* Modifiers */);
@@ -61216,8 +65752,8 @@ var ts;
write(suffix);
}
}
- function emitEmbeddedStatement(node) {
- if (ts.isBlock(node)) {
+ function emitEmbeddedStatement(parent, node) {
+ if (ts.isBlock(node) || ts.getEmitFlags(parent) & 1 /* SingleLine */) {
write(" ");
emit(node);
}
@@ -61274,6 +65810,9 @@ var ts;
if (format & 7680 /* BracketsMask */) {
write(getOpeningBracket(format));
}
+ if (onBeforeEmitNodeArray) {
+ onBeforeEmitNodeArray(children);
+ }
if (isEmpty) {
// Write a line terminator if the parent node was multi-line
if (format & 1 /* MultiLine */) {
@@ -61306,6 +65845,15 @@ var ts;
var child = children[start + i];
// Write the delimiter if this is not the first node.
if (previousSibling) {
+ // i.e
+ // function commentedParameters(
+ // /* Parameter a */
+ // a
+ // /* End of parameter a */ -> this comment isn't considered to be trailing comment of parameter "a" due to newline
+ // ,
+ if (delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
write(delimiter);
// Write either a line terminator or whitespace to separate the elements.
if (shouldWriteSeparatingLineTerminator(previousSibling, child, format)) {
@@ -61322,14 +65870,16 @@ var ts;
write(" ");
}
}
+ // Emit this child.
if (shouldEmitInterveningComments) {
- var commentRange = ts.getCommentRange(child);
- emitTrailingCommentsOfPosition(commentRange.pos);
+ if (emitTrailingCommentsOfPosition) {
+ var commentRange = ts.getCommentRange(child);
+ emitTrailingCommentsOfPosition(commentRange.pos);
+ }
}
else {
shouldEmitInterveningComments = mayEmitInterveningComments;
}
- // Emit this child.
emit(child);
if (shouldDecreaseIndentAfterEmit) {
decreaseIndent();
@@ -61342,6 +65892,15 @@ var ts;
if (format & 16 /* CommaDelimited */ && hasTrailingComma) {
write(",");
}
+ // Emit any trailing comment of the last element in the list
+ // i.e
+ // var array = [...
+ // 2
+ // /* end of element 2 */
+ // ];
+ if (previousSibling && delimiter && previousSibling.end !== parentNode.end) {
+ emitLeadingCommentsOfPosition(previousSibling.end);
+ }
// Decrease the indent, if requested.
if (format & 64 /* Indented */) {
decreaseIndent();
@@ -61354,28 +65913,80 @@ var ts;
write(" ");
}
}
+ if (onAfterEmitNodeArray) {
+ onAfterEmitNodeArray(children);
+ }
if (format & 7680 /* BracketsMask */) {
write(getClosingBracket(format));
}
}
+ function write(s) {
+ writer.write(s);
+ }
+ function writeLine() {
+ writer.writeLine();
+ }
+ function increaseIndent() {
+ writer.increaseIndent();
+ }
+ function decreaseIndent() {
+ writer.decreaseIndent();
+ }
function writeIfAny(nodes, text) {
- if (nodes && nodes.length > 0) {
+ if (ts.some(nodes)) {
write(text);
}
}
function writeIfPresent(node, text) {
- if (node !== undefined) {
+ if (node) {
write(text);
}
}
function writeToken(token, pos, contextNode) {
- return emitTokenWithSourceMap(contextNode, token, pos, writeTokenText);
+ return onEmitSourceMapOfToken
+ ? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
+ : writeTokenText(token, pos);
}
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
return pos < 0 ? pos : pos + tokenString.length;
}
+ function writeLineOrSpace(node) {
+ if (ts.getEmitFlags(node) & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ }
+ }
+ function writeLines(text) {
+ var lines = text.split(/\r\n?|\n/g);
+ var indentation = guessIndentation(lines);
+ for (var i = 0; i < lines.length; i++) {
+ var line = indentation ? lines[i].slice(indentation) : lines[i];
+ if (line.length) {
+ writeLine();
+ write(line);
+ writeLine();
+ }
+ }
+ }
+ function guessIndentation(lines) {
+ var indentation;
+ for (var _a = 0, lines_1 = lines; _a < lines_1.length; _a++) {
+ var line = lines_1[_a];
+ for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) {
+ if (!ts.isWhiteSpace(line.charCodeAt(i))) {
+ if (indentation === undefined || i < indentation) {
+ indentation = i;
+ break;
+ }
+ }
+ }
+ }
+ return indentation;
+ }
function increaseIndentIf(value, valueToWriteWhenNotIndenting) {
if (value) {
increaseIndent();
@@ -61485,15 +66096,23 @@ var ts;
&& !ts.nodeIsSynthesized(node2)
&& !ts.rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile);
}
+ function isSingleLineEmptyBlock(block) {
+ return !block.multiLine
+ && isEmptyBlock(block);
+ }
+ function isEmptyBlock(block) {
+ return block.statements.length === 0
+ && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ }
function skipSynthesizedParentheses(node) {
- while (node.kind === 183 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) {
+ while (node.kind === 184 /* ParenthesizedExpression */ && ts.nodeIsSynthesized(node)) {
node = node.expression;
}
return node;
}
function getTextOfNode(node, includeTrivia) {
if (ts.isGeneratedIdentifier(node)) {
- return getGeneratedIdentifier(node);
+ return generateName(node);
}
else if (ts.isIdentifier(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
return ts.unescapeIdentifier(node.text);
@@ -61516,26 +66135,60 @@ var ts;
return getLiteralTextOfNode(textSourceNode);
}
}
- return ts.getLiteralText(node, currentSourceFile, languageVersion);
+ return ts.getLiteralText(node, currentSourceFile);
}
- function isSingleLineEmptyBlock(block) {
- return !block.multiLine
- && isEmptyBlock(block);
+ /**
+ * Push a new name generation scope.
+ */
+ function pushNameGenerationScope() {
+ tempFlagsStack.push(tempFlags);
+ tempFlags = 0;
}
- function isEmptyBlock(block) {
- return block.statements.length === 0
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
+ /**
+ * Pop the current name generation scope.
+ */
+ function popNameGenerationScope() {
+ tempFlags = tempFlagsStack.pop();
+ }
+ /**
+ * Generate the text for a generated identifier.
+ */
+ function generateName(name) {
+ if (name.autoGenerateKind === 4 /* Node */) {
+ // Node names generate unique names based on their original node
+ // and are cached based on that node's id.
+ var node = getNodeForGeneratedName(name);
+ return generateNameCached(node);
+ }
+ else {
+ // Auto, Loop, and Unique names are cached based on their unique
+ // autoGenerateId.
+ var autoGenerateId = name.autoGenerateId;
+ return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(makeName(name)));
+ }
}
+ function generateNameCached(node) {
+ var nodeId = ts.getNodeId(node);
+ return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
+ }
+ /**
+ * Returns a value indicating whether a name is unique globally, within the current file,
+ * or within the NameGenerator.
+ */
function isUniqueName(name) {
- return !resolver.hasGlobalName(name) &&
- !ts.hasProperty(currentFileIdentifiers, name) &&
- !ts.hasProperty(generatedNameSet, name);
+ return !(hasGlobalName && hasGlobalName(name))
+ && !currentSourceFile.identifiers.has(name)
+ && !generatedNames.has(name);
}
+ /**
+ * Returns a value indicating whether a name is unique within a container.
+ */
function isUniqueLocalName(name, container) {
for (var node = container; ts.isNodeDescendantOf(node, container); node = node.nextContainer) {
- if (node.locals && ts.hasProperty(node.locals, name)) {
+ if (node.locals) {
+ var local = node.locals.get(name);
// We conservatively include alias symbols to cover cases where they're emitted as locals
- if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {
+ if (local && local.flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {
return false;
}
}
@@ -61543,16 +66196,16 @@ var ts;
return true;
}
/**
- * Return the next available name in the pattern _a ... _z, _0, _1, ...
- * TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name.
- * Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
- */
+ * Return the next available name in the pattern _a ... _z, _0, _1, ...
+ * TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name.
+ * Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
+ */
function makeTempVariableName(flags) {
if (flags && !(tempFlags & flags)) {
- var name_39 = flags === 268435456 /* _i */ ? "_i" : "_n";
- if (isUniqueName(name_39)) {
+ var name = flags === 268435456 /* _i */ ? "_i" : "_n";
+ if (isUniqueName(name)) {
tempFlags |= flags;
- return name_39;
+ return name;
}
}
while (true) {
@@ -61560,19 +66213,21 @@ var ts;
tempFlags++;
// Skip over 'i' and 'n'
if (count !== 8 && count !== 13) {
- var name_40 = count < 26
+ var name = count < 26
? "_" + String.fromCharCode(97 /* a */ + count)
: "_" + (count - 26);
- if (isUniqueName(name_40)) {
- return name_40;
+ if (isUniqueName(name)) {
+ return name;
}
}
}
}
- // Generate a name that is unique within the current file and doesn't conflict with any names
- // in global scope. The name is formed by adding an '_n' suffix to the specified base name,
- // where n is a positive integer. Note that names generated by makeTempVariableName and
- // makeUniqueName are guaranteed to never conflict.
+ /**
+ * Generate a name that is unique within the current file and doesn't conflict with any names
+ * in global scope. The name is formed by adding an '_n' suffix to the specified base name,
+ * where n is a positive integer. Note that names generated by makeTempVariableName and
+ * makeUniqueName are guaranteed to never conflict.
+ */
function makeUniqueName(baseName) {
// Find the first unique 'name_n', where n is a positive number
if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) {
@@ -61582,73 +66237,90 @@ var ts;
while (true) {
var generatedName = baseName + i;
if (isUniqueName(generatedName)) {
- return generatedNameSet[generatedName] = generatedName;
+ generatedNames.set(generatedName, generatedName);
+ return generatedName;
}
i++;
}
}
+ /**
+ * Generates a unique name for a ModuleDeclaration or EnumDeclaration.
+ */
function generateNameForModuleOrEnum(node) {
var name = getTextOfNode(node.name);
// Use module/enum name itself if it is unique, otherwise make a unique variation
return isUniqueLocalName(name, node) ? name : makeUniqueName(name);
}
+ /**
+ * Generates a unique name for an ImportDeclaration or ExportDeclaration.
+ */
function generateNameForImportOrExportDeclaration(node) {
var expr = ts.getExternalModuleName(node);
var baseName = expr.kind === 9 /* StringLiteral */ ?
ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module";
return makeUniqueName(baseName);
}
+ /**
+ * Generates a unique name for a default export.
+ */
function generateNameForExportDefault() {
return makeUniqueName("default");
}
+ /**
+ * Generates a unique name for a class expression.
+ */
function generateNameForClassExpression() {
return makeUniqueName("class");
}
+ function generateNameForMethodOrAccessor(node) {
+ if (ts.isIdentifier(node.name)) {
+ return generateNameCached(node.name);
+ }
+ return makeTempVariableName(0 /* Auto */);
+ }
/**
* Generates a unique name from a node.
- *
- * @param node A node.
*/
function generateNameForNode(node) {
switch (node.kind) {
case 70 /* Identifier */:
return makeUniqueName(getTextOfNode(node));
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
return generateNameForModuleOrEnum(node);
- case 235 /* ImportDeclaration */:
- case 241 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 243 /* ExportDeclaration */:
return generateNameForImportOrExportDeclaration(node);
- case 225 /* FunctionDeclaration */:
- case 226 /* ClassDeclaration */:
- case 240 /* ExportAssignment */:
+ case 227 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 242 /* ExportAssignment */:
return generateNameForExportDefault();
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
return generateNameForClassExpression();
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return generateNameForMethodOrAccessor(node);
default:
return makeTempVariableName(0 /* Auto */);
}
}
/**
* Generates a unique identifier for a node.
- *
- * @param name A generated name.
*/
- function generateName(name) {
+ function makeName(name) {
switch (name.autoGenerateKind) {
case 1 /* Auto */:
return makeTempVariableName(0 /* Auto */);
case 2 /* Loop */:
return makeTempVariableName(268435456 /* _i */);
case 3 /* Unique */:
- return makeUniqueName(name.text);
+ return makeUniqueName(ts.unescapeIdentifier(name.text));
}
ts.Debug.fail("Unsupported GeneratedIdentifierKind.");
}
/**
* Gets the node from which a name should be generated.
- *
- * @param name A generated name wrapper.
*/
function getNodeForGeneratedName(name) {
var autoGenerateId = name.autoGenerateId;
@@ -61668,53 +66340,40 @@ var ts;
// otherwise, return the original node for the source;
return node;
}
- /**
- * Gets the generated identifier text from a generated identifier.
- *
- * @param name The generated identifier.
- */
- function getGeneratedIdentifier(name) {
- if (name.autoGenerateKind === 4 /* Node */) {
- // Generated names generate unique names based on their original node
- // and are cached based on that node's id
- var node = getNodeForGeneratedName(name);
- var nodeId = ts.getNodeId(node);
- return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = ts.unescapeIdentifier(generateNameForNode(node)));
- }
- else {
- // Auto, Loop, and Unique names are cached based on their unique
- // autoGenerateId.
- var autoGenerateId = name.autoGenerateId;
- return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = ts.unescapeIdentifier(generateName(name)));
- }
- }
- function createDelimiterMap() {
- var delimiters = [];
- delimiters[0 /* None */] = "";
- delimiters[16 /* CommaDelimited */] = ",";
- delimiters[4 /* BarDelimited */] = " |";
- delimiters[8 /* AmpersandDelimited */] = " &";
- return delimiters;
- }
- function getDelimiter(format) {
- return delimiters[format & 28 /* DelimitersMask */];
- }
- function createBracketsMap() {
- var brackets = [];
- brackets[512 /* Braces */] = ["{", "}"];
- brackets[1024 /* Parenthesis */] = ["(", ")"];
- brackets[2048 /* AngleBrackets */] = ["<", ">"];
- brackets[4096 /* SquareBrackets */] = ["[", "]"];
- return brackets;
- }
- function getOpeningBracket(format) {
- return brackets[format & 7680 /* BracketsMask */][0];
- }
- function getClosingBracket(format) {
- return brackets[format & 7680 /* BracketsMask */][1];
- }
}
- ts.emitFiles = emitFiles;
+ ts.createPrinter = createPrinter;
+ function createDelimiterMap() {
+ var delimiters = [];
+ delimiters[0 /* None */] = "";
+ delimiters[16 /* CommaDelimited */] = ",";
+ delimiters[4 /* BarDelimited */] = " |";
+ delimiters[8 /* AmpersandDelimited */] = " &";
+ return delimiters;
+ }
+ function getDelimiter(format) {
+ return delimiters[format & 28 /* DelimitersMask */];
+ }
+ function createBracketsMap() {
+ var brackets = [];
+ brackets[512 /* Braces */] = ["{", "}"];
+ brackets[1024 /* Parenthesis */] = ["(", ")"];
+ brackets[2048 /* AngleBrackets */] = ["<", ">"];
+ brackets[4096 /* SquareBrackets */] = ["[", "]"];
+ return brackets;
+ }
+ function getOpeningBracket(format) {
+ return brackets[format & 7680 /* BracketsMask */][0];
+ }
+ function getClosingBracket(format) {
+ return brackets[format & 7680 /* BracketsMask */][1];
+ }
+ // Flags enum to track count of temp variables and a few dedicated names
+ var TempFlags;
+ (function (TempFlags) {
+ TempFlags[TempFlags["Auto"] = 0] = "Auto";
+ TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask";
+ TempFlags[TempFlags["_i"] = 268435456] = "_i";
+ })(TempFlags || (TempFlags = {}));
var ListFormat;
(function (ListFormat) {
ListFormat[ListFormat["None"] = 0] = "None";
@@ -61790,6 +66449,7 @@ var ts;
var ts;
(function (ts) {
var emptyArray = [];
+ var ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
function findConfigFile(searchPath, fileExists, configName) {
if (configName === void 0) { configName = "tsconfig.json"; }
while (true) {
@@ -61824,7 +66484,8 @@ var ts;
commonPathComponents = sourcePathComponents;
return;
}
- for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
+ var n = Math.min(commonPathComponents.length, sourcePathComponents.length);
+ for (var i = 0; i < n; i++) {
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
if (i === 0) {
// Failed to find any common path component
@@ -61857,8 +66518,6 @@ var ts;
// otherwise use toLowerCase as a canonical form.
return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
}
- // returned by CScript sys environment
- var unsupportedFileEncodingErrorCode = -2147024809;
function getSourceFile(fileName, languageVersion, onError) {
var text;
try {
@@ -61869,20 +66528,18 @@ var ts;
}
catch (e) {
if (onError) {
- onError(e.number === unsupportedFileEncodingErrorCode
- ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
- : e.message);
+ onError(e.message);
}
text = "";
}
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath) {
- if (directoryPath in existingDirectories) {
+ if (existingDirectories.has(directoryPath)) {
return true;
}
if (ts.sys.directoryExists(directoryPath)) {
- existingDirectories[directoryPath] = true;
+ existingDirectories.set(directoryPath, true);
return true;
}
return false;
@@ -61901,10 +66558,11 @@ var ts;
}
var hash = ts.sys.createHash(data);
var mtimeBefore = ts.sys.getModifiedTime(fileName);
- if (mtimeBefore && fileName in outputFingerprints) {
- var fingerprint = outputFingerprints[fileName];
+ if (mtimeBefore) {
+ var fingerprint = outputFingerprints.get(fileName);
// If output has not been changed, and the file has no external modification
- if (fingerprint.byteOrderMark === writeByteOrderMark &&
+ if (fingerprint &&
+ fingerprint.byteOrderMark === writeByteOrderMark &&
fingerprint.hash === hash &&
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
return;
@@ -61912,11 +66570,11 @@ var ts;
}
ts.sys.writeFile(fileName, data, writeByteOrderMark);
var mtimeAfter = ts.sys.getModifiedTime(fileName);
- outputFingerprints[fileName] = {
+ outputFingerprints.set(fileName, {
hash: hash,
byteOrderMark: writeByteOrderMark,
mtime: mtimeAfter
- };
+ });
}
function writeFile(fileName, data, writeByteOrderMark, onError) {
try {
@@ -62015,10 +66673,14 @@ var ts;
var resolutions = [];
var cache = ts.createMap();
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
- var name_41 = names_1[_i];
- var result = name_41 in cache
- ? cache[name_41]
- : cache[name_41] = loader(name_41, containingFile);
+ var name = names_1[_i];
+ var result = void 0;
+ if (cache.has(name)) {
+ result = cache.get(name);
+ }
+ else {
+ cache.set(name, result = loader(name, containingFile));
+ }
resolutions.push(result);
}
return resolutions;
@@ -62030,6 +66692,8 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var cachedSemanticDiagnosticsForFile = {};
+ var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
var fileProcessingDiagnostics = ts.createDiagnosticCollection();
// The below settings are to track if a .js file should be add to the program if loaded via searching under node_modules.
@@ -62054,6 +66718,7 @@ var ts;
var supportedExtensions = ts.getSupportedExtensions(options);
// Map storing if there is emit blocking diagnostics for given input
var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName);
+ var moduleResolutionCache;
var resolveModuleNamesWorker;
if (host.resolveModuleNames) {
resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile).map(function (resolved) {
@@ -62067,7 +66732,8 @@ var ts;
}); };
}
else {
- var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host).resolvedModule; };
+ moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); });
+ var loader_1 = function (moduleName, containingFile) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache).resolvedModule; };
resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); };
}
var resolveTypeReferenceDirectiveNamesWorker;
@@ -62113,6 +66779,8 @@ var ts;
}
}
}
+ // unconditionally set moduleResolutionCache to undefined to avoid unnecessary leaks
+ moduleResolutionCache = undefined;
// unconditionally set oldProgram to undefined to prevent it from being captured in closure
oldProgram = undefined;
program = {
@@ -62147,7 +66815,7 @@ var ts;
return program;
function getCommonSourceDirectory() {
if (commonSourceDirectory === undefined) {
- var emittedFiles = ts.filterSourceFilesInDirectory(files, isSourceFileFromExternalLibrary);
+ var emittedFiles = ts.filter(files, function (file) { return ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary); });
if (options.rootDir && checkSourceFilesBelongToPath(emittedFiles, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, currentDirectory);
@@ -62171,7 +66839,7 @@ var ts;
classifiableNames = ts.createMap();
for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
var sourceFile = files_2[_i];
- ts.copyProperties(sourceFile.classifiableNames, classifiableNames);
+ ts.copyEntries(sourceFile.classifiableNames, classifiableNames);
}
}
return classifiableNames;
@@ -62245,7 +66913,7 @@ var ts;
// combine results of resolutions and predicted results
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] == predictedToResolveToAmbientModuleMarker) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
result[i] = undefined;
}
else {
@@ -62378,7 +67046,7 @@ var ts;
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
// update fileName -> file mapping
- for (var i = 0, len = newSourceFiles.length; i < len; i++) {
+ for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
}
files = newSourceFiles;
@@ -62407,7 +67075,7 @@ var ts;
};
}
function isSourceFileFromExternalLibrary(file) {
- return sourceFilesFoundSearchingNodeModules[file.path];
+ return sourceFilesFoundSearchingNodeModules.get(file.path);
}
function getDiagnosticsProducingTypeChecker() {
return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ true));
@@ -62418,13 +67086,13 @@ var ts;
function getTypeChecker() {
return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ false));
}
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
- return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles); });
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers) {
+ return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers); });
}
function isEmitBlocked(emitFileName) {
return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName));
}
- function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles) {
+ function emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers) {
var declarationDiagnostics = [];
if (options.noEmit) {
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
@@ -62456,7 +67124,8 @@ var ts;
// checked is to not pass the file to getEmitResolver.
var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile);
ts.performance.mark("beforeEmit");
- var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles);
+ var transformers = emitOnlyDtsFiles ? [] : ts.getTransformers(options, customTransformers);
+ var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, emitOnlyDtsFiles, transformers);
ts.performance.mark("afterEmit");
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
return emitResult;
@@ -62529,19 +67198,48 @@ var ts;
}
}
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedSemanticDiagnosticsForFile, getSemanticDiagnosticsForFileNoCache);
+ }
+ function getSemanticDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
var bindDiagnostics = sourceFile.bindDiagnostics;
- // For JavaScript files, we don't want to report semantic errors.
- // Instead, we'll report errors for using TypeScript-only constructs from within a
- // JavaScript file when we get syntactic diagnostics for the file.
- var checkDiagnostics = ts.isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
+ // For JavaScript files, we don't want to report semantic errors unless explicitly requested.
+ var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
- return bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
+ return ts.isSourceFileJavaScript(sourceFile)
+ ? ts.filter(diagnostics, shouldReportDiagnostic)
+ : diagnostics;
});
}
+ /**
+ * Skip errors if previous line start with '// @ts-ignore' comment, not counting non-empty non-comment lines
+ */
+ function shouldReportDiagnostic(diagnostic) {
+ var file = diagnostic.file, start = diagnostic.start;
+ if (file) {
+ var lineStarts = ts.getLineStarts(file);
+ var line = ts.computeLineAndCharacterOfPosition(lineStarts, start).line;
+ while (line > 0) {
+ var previousLineText = file.text.slice(lineStarts[line - 1], lineStarts[line]);
+ var result = ignoreDiagnosticCommentRegEx.exec(previousLineText);
+ if (!result) {
+ // non-empty line
+ return true;
+ }
+ if (result[3]) {
+ // @ts-ignore
+ return false;
+ }
+ line--;
+ }
+ }
+ return true;
+ }
function getJavaScriptSyntacticDiagnosticsForFile(sourceFile) {
return runWithCancellationToken(function () {
var diagnostics = [];
@@ -62552,23 +67250,23 @@ var ts;
// Return directly from the case if the given node doesnt want to visit each child
// Otherwise break to visit each child
switch (parent.kind) {
- case 144 /* Parameter */:
- case 147 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
+ case 148 /* PropertyDeclaration */:
if (parent.questionToken === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
return;
}
- // Pass through
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 223 /* VariableDeclaration */:
+ // falls through
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 225 /* VariableDeclaration */:
// type annotation
if (parent.type === node) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.types_can_only_be_used_in_a_ts_file));
@@ -62576,35 +67274,35 @@ var ts;
}
}
switch (node.kind) {
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file));
return;
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
if (node.isExportEquals) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 255 /* HeritageClause */:
+ case 258 /* HeritageClause */:
var heritageClause = node;
if (heritageClause.token === 107 /* ImplementsKeyword */) {
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));
return;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));
return;
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));
return;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));
return;
- case 182 /* TypeAssertionExpression */:
+ case 183 /* TypeAssertionExpression */:
var typeAssertionExpression = node;
diagnostics.push(createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));
return;
@@ -62619,29 +67317,29 @@ var ts;
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
}
switch (parent.kind) {
- case 226 /* ClassDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
// Check type parameters
if (nodes === parent.typeParameters) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));
return;
}
- // pass through
- case 205 /* VariableStatement */:
+ // falls through
+ case 207 /* VariableStatement */:
// Check modifiers
if (nodes === parent.modifiers) {
- return checkModifiers(nodes, parent.kind === 205 /* VariableStatement */);
+ return checkModifiers(nodes, parent.kind === 207 /* VariableStatement */);
}
break;
- case 147 /* PropertyDeclaration */:
+ case 148 /* PropertyDeclaration */:
// Check modifiers of property declaration
if (nodes === parent.modifiers) {
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
@@ -62653,16 +67351,16 @@ var ts;
return;
}
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Check modifiers of parameter declaration
if (nodes === parent.modifiers) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));
return;
}
break;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 199 /* ExpressionWithTypeArguments */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 200 /* ExpressionWithTypeArguments */:
// Check type arguments
if (nodes === parent.typeArguments) {
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file));
@@ -62670,8 +67368,8 @@ var ts;
}
break;
}
- for (var _b = 0, nodes_6 = nodes; _b < nodes_6.length; _b++) {
- var node = nodes_6[_b];
+ for (var _b = 0, nodes_8 = nodes; _b < nodes_8.length; _b++) {
+ var node = nodes_8[_b];
walk(node);
}
}
@@ -62683,7 +67381,8 @@ var ts;
if (isConstValid) {
continue;
}
- // Fallthrough to report error
+ // to report error,
+ // falls through
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
@@ -62711,12 +67410,34 @@ var ts;
});
}
function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
+ return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
+ }
+ function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
return runWithCancellationToken(function () {
var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken);
// Don't actually write any files since we're just getting diagnostics.
return ts.getDeclarationDiagnostics(getEmitHost(ts.noop), resolver, sourceFile);
});
}
+ function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics) {
+ var cachedResult = sourceFile
+ ? cache.perFile && cache.perFile.get(sourceFile.path)
+ : cache.allDiagnostics;
+ if (cachedResult) {
+ return cachedResult;
+ }
+ var result = getDiagnostics(sourceFile, cancellationToken) || emptyArray;
+ if (sourceFile) {
+ if (!cache.perFile) {
+ cache.perFile = ts.createFileMap();
+ }
+ cache.perFile.set(sourceFile.path, result);
+ }
+ else {
+ cache.allDiagnostics = result;
+ }
+ return result;
+ }
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
@@ -62759,11 +67480,10 @@ var ts;
&& (options.isolatedModules || isExternalModuleFile)
&& !file.isDeclarationFile) {
// synthesize 'import "tslib"' declaration
- var externalHelpersModuleReference = ts.createSynthesizedNode(9 /* StringLiteral */);
- externalHelpersModuleReference.text = ts.externalHelpersModuleNameText;
- var importDecl = ts.createSynthesizedNode(235 /* ImportDeclaration */);
- importDecl.parent = file;
+ var externalHelpersModuleReference = ts.createLiteral(ts.externalHelpersModuleNameText);
+ var importDecl = ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, /*importClause*/ undefined);
externalHelpersModuleReference.parent = importDecl;
+ importDecl.parent = file;
imports = [externalHelpersModuleReference];
}
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
@@ -62779,9 +67499,9 @@ var ts;
return;
function collectModuleReferences(node, inAmbientModule) {
switch (node.kind) {
- case 235 /* ImportDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 241 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 243 /* ExportDeclaration */:
var moduleNameExpr = ts.getExternalModuleName(node);
if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) {
break;
@@ -62796,7 +67516,7 @@ var ts;
(imports || (imports = [])).push(moduleNameExpr);
}
break;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) {
var moduleName = node.name;
// Ambient module declarations can be interpreted as augmentations for some existing external modules.
@@ -62896,18 +67616,18 @@ var ts;
}
// If the file was previously found via a node_modules search, but is now being processed as a root file,
// then everything it sucks in may also be marked incorrectly, and needs to be checked again.
- if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
- sourceFilesFoundSearchingNodeModules[file_1.path] = false;
+ if (file_1 && sourceFilesFoundSearchingNodeModules.get(file_1.path) && currentNodeModulesDepth === 0) {
+ sourceFilesFoundSearchingNodeModules.set(file_1.path, false);
if (!options.noResolve) {
processReferencedFiles(file_1, isDefaultLib);
processTypeReferenceDirectives(file_1);
}
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
- else if (file_1 && modulesWithElidedImports[file_1.path]) {
+ else if (file_1 && modulesWithElidedImports.get(file_1.path)) {
if (currentNodeModulesDepth < maxNodeModuleJsDepth) {
- modulesWithElidedImports[file_1.path] = false;
+ modulesWithElidedImports.set(file_1.path, false);
processImportedModules(file_1);
}
}
@@ -62924,7 +67644,7 @@ var ts;
});
filesByName.set(path, file);
if (file) {
- sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
+ sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
file.path = path;
if (host.useCaseSensitiveFileNames()) {
// for case-sensitive file systems check if we've already seen some file with similar filename ignoring case
@@ -62973,7 +67693,7 @@ var ts;
}
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) {
// If we already found this library as a primary reference - nothing to do
- var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective];
+ var previousResolution = resolvedTypeReferenceDirectives.get(typeReferenceDirective);
if (previousResolution && previousResolution.primary) {
return;
}
@@ -63007,7 +67727,7 @@ var ts;
fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective));
}
if (saveResolution) {
- resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective;
+ resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
}
}
function createDiagnostic(refFile, refPos, refEnd, message) {
@@ -63056,7 +67776,7 @@ var ts;
// This may still end up being an untyped module -- the file won't be included but imports will be allowed.
var shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport;
if (elideImport) {
- modulesWithElidedImports[file.path] = true;
+ modulesWithElidedImports.set(file.path, true);
}
else if (shouldAddFile) {
var path = ts.toPath(resolvedFileName, currentDirectory, getCanonicalFileName);
@@ -63075,8 +67795,8 @@ var ts;
}
function computeCommonSourceDirectory(sourceFiles) {
var fileNames = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var file = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) {
+ var file = sourceFiles_2[_i];
if (!file.isDeclarationFile) {
fileNames.push(file.fileName);
}
@@ -63087,8 +67807,8 @@ var ts;
var allFilesBelongToPath = true;
if (sourceFiles) {
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
+ for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
+ var sourceFile = sourceFiles_3[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
@@ -63182,7 +67902,7 @@ var ts;
if (options.lib && options.noLib) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"));
}
- if (options.noImplicitUseStrict && options.alwaysStrict) {
+ if (options.noImplicitUseStrict && (options.alwaysStrict === undefined ? options.strict : options.alwaysStrict)) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"));
}
var languageVersion = options.target || 0 /* ES3 */;
@@ -63228,6 +67948,9 @@ var ts;
if (!options.noEmit && options.allowJs && options.declaration) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
}
+ if (options.checkJs && !options.allowJs) {
+ programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"));
+ }
if (options.emitDecoratorMetadata &&
!options.experimentalDecorators) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
@@ -63247,7 +67970,7 @@ var ts;
if (!options.noEmit && !options.suppressOutputPathCheck) {
var emitHost = getEmitHost();
var emitFilesSeen_1 = ts.createFileMap(!host.useCaseSensitiveFileNames() ? function (key) { return key.toLocaleLowerCase(); } : undefined);
- ts.forEachExpectedEmitFile(emitHost, function (emitFileNames) {
+ ts.forEachEmittedFile(emitHost, function (emitFileNames) {
verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen_1);
verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen_1);
});
@@ -63323,40 +68046,13 @@ var ts;
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
/* @internal */
ts.optionDeclarations = [
- {
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
+ // CommandLine only options
{
name: "help",
shortName: "h",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
description: ts.Diagnostics.Print_this_message,
},
{
@@ -63365,56 +68061,74 @@ var ts;
type: "boolean"
},
{
- name: "init",
+ name: "all",
type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
},
{
- name: "inlineSourceMap",
+ name: "version",
+ shortName: "v",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
},
{
- name: "inlineSources",
+ name: "init",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
},
{
- name: "jsx",
- type: ts.createMap({
- "preserve": 1 /* Preserve */,
- "react": 2 /* React */
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
+ name: "project",
+ shortName: "p",
type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
},
{
- name: "listFiles",
+ name: "pretty",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
- name: "locale",
- type: "string",
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
},
+ // Basic
{
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0 /* ES3 */,
+ "es5": 1 /* ES5 */,
+ "es6": 2 /* ES2015 */,
+ "es2015": 2 /* ES2015 */,
+ "es2016": 3 /* ES2016 */,
+ "es2017": 4 /* ES2017 */,
+ "esnext": 5 /* ESNext */,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
},
{
name: "module",
shortName: "m",
- type: ts.createMap({
+ type: ts.createMapFromTemplate({
"none": ts.ModuleKind.None,
"commonjs": ts.ModuleKind.CommonJS,
"amd": ts.ModuleKind.AMD,
@@ -63423,233 +68137,230 @@ var ts;
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
}),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
},
{
- name: "newLine",
- type: ts.createMap({
- "crlf": 0 /* CarriageReturnLineFeed */,
- "lf": 1 /* LineFeed */
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ // JavaScript only
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ // Host only
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ // ES2015 Or ESNext By-feature options
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
},
{
- name: "noUnusedParameters",
+ name: "allowJs",
type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
},
{
- name: "noLib",
+ name: "checkJs",
type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
},
{
- name: "noResolve",
- type: "boolean",
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1 /* Preserve */,
+ "react-native": 3 /* ReactNative */,
+ "react": 2 /* React */
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
},
{
- name: "skipDefaultLibCheck",
+ name: "declaration",
+ shortName: "d",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
},
{
- name: "skipLibCheck",
+ name: "sourceMap",
type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- // for correct behaviour, please use outFile
- paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
},
{
name: "outFile",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
},
{
name: "outDir",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
- name: "isolatedModules",
+ name: "removeComments",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
},
{
- name: "sourceMap",
+ name: "noEmit",
type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
},
{
- name: "suppressExcessPropertyErrors",
+ name: "importHelpers",
type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
},
{
- name: "suppressImplicitAnyIndexErrors",
+ name: "downlevelIteration",
type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
},
{
- name: "stripInternal",
+ name: "isolatedModules",
type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
},
+ // Strict Type Checks
{
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0 /* ES3 */,
- "es5": 1 /* ES5 */,
- "es6": 2 /* ES2015 */,
- "es2015": 2 /* ES2015 */,
- "es2016": 3 /* ES2016 */,
- "es2017": 4 /* ES2017 */,
- "esnext": 5 /* ESNext */,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
},
{
- name: "version",
- shortName: "v",
+ name: "noImplicitAny",
type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
},
{
- name: "watch",
- shortName: "w",
+ name: "strictNullChecks",
type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
},
{
- name: "experimentalDecorators",
+ name: "noImplicitThis",
type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
},
{
- name: "emitDecoratorMetadata",
+ name: "alwaysStrict",
type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
},
+ // Additional Checks
{
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
},
{
- name: "allowUnusedLabels",
+ name: "noUnusedParameters",
type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
},
{
name: "noImplicitReturns",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
},
{
name: "noFallthroughCasesInSwitch",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
},
+ // Module Resolution
{
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "baseUrl",
type: "string",
isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
},
{
@@ -63657,7 +68368,9 @@ var ts;
// use type = object to copy the value as-is
name: "paths",
type: "object",
- isTSConfigOnly: true
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
},
{
// this option can only be specified in tsconfig.json
@@ -63669,7 +68382,9 @@ var ts;
name: "rootDirs",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
},
{
name: "typeRoots",
@@ -63678,7 +68393,9 @@ var ts;
name: "typeRoots",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
},
{
name: "types",
@@ -63687,91 +68404,258 @@ var ts;
name: "types",
type: "string"
},
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
},
{
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ // Source Maps
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ // Experimental
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ // Advanced
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
name: "traceResolution",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
},
{
- name: "allowJs",
+ name: "listFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
},
{
- name: "allowSyntheticDefaultImports",
+ name: "listEmittedFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ // for correct behaviour, please use outFile
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0 /* CarriageReturnLineFeed */,
+ "lf": 1 /* LineFeed */
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
},
{
name: "noImplicitUseStrict",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
},
{
- name: "listEmittedFiles",
- type: "boolean"
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
},
{
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- // JavaScript only
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- // Host only
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- // ES2015 Or ESNext By-feature options
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
},
{
- name: "disableSizeLimit",
- type: "boolean"
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
},
{
- name: "strictNullChecks",
+ name: "skipLibCheck",
type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
},
{
- name: "importHelpers",
+ name: "allowUnusedLabels",
type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
},
{
- name: "alwaysStrict",
+ name: "allowUnreachableCode",
type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ // A list of plugins to load in the language service
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
}
];
/* @internal */
@@ -63808,8 +68692,7 @@ var ts;
ts.defaultInitCompilerOptions = {
module: ts.ModuleKind.CommonJS,
target: 1 /* ES5 */,
- noImplicitAny: false,
- sourceMap: false,
+ strict: true
};
var optionNameMapCache;
/* @internal */
@@ -63834,9 +68717,9 @@ var ts;
var optionNameMap = ts.createMap();
var shortOptionNames = ts.createMap();
ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
+ optionNameMap.set(option.name.toLowerCase(), option);
if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
+ shortOptionNames.set(option.shortName, option.name);
}
});
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
@@ -63845,20 +68728,13 @@ var ts;
ts.getOptionNameMap = getOptionNameMap;
/* @internal */
function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
}
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
/* @internal */
function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
}
ts.parseCustomTypeOption = parseCustomTypeOption;
/* @internal */
@@ -63882,7 +68758,6 @@ var ts;
}
}
ts.parseListTypeOption = parseListTypeOption;
- /* @internal */
function parseCommandLine(commandLine, readFile) {
var options = {};
var fileNames = [];
@@ -63905,11 +68780,12 @@ var ts;
else if (s.charCodeAt(0) === 45 /* minus */) {
s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase();
// Try to translate short option names to their full equivalents.
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
}
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
+ var opt = optionNameMap.get(s);
+ if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
}
@@ -63997,9 +68873,9 @@ var ts;
}
ts.parseCommandLine = parseCommandLine;
/**
- * Read tsconfig.json file
- * @param fileName The path to the config file
- */
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -64012,10 +68888,10 @@ var ts;
}
ts.readConfigFile = readConfigFile;
/**
- * Parse the text of the tsconfig.json file
- * @param fileName The path to the config file
- * @param jsonText The text of the config file
- */
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
function parseConfigFileTextToJson(fileName, jsonText, stripComments) {
if (stripComments === void 0) { stripComments = true; }
try {
@@ -64033,7 +68909,7 @@ var ts;
* @param fileNames array of filenames to be generated into tsconfig.json
*/
/* @internal */
- function generateTSConfig(options, fileNames) {
+ function generateTSConfig(options, fileNames, newLine) {
var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
var configurations = {
compilerOptions: serializeCompilerOptions(compilerOptions)
@@ -64042,7 +68918,7 @@ var ts;
// only set the files property if we have at least one file
configurations.files = fileNames;
}
- return configurations;
+ return writeConfigurations();
function getCustomTypeMapOfCommandLineOption(optionDefinition) {
if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
// this is of a type CommandLineOptionOfPrimitiveType
@@ -64057,58 +68933,130 @@ var ts;
}
function getNameOfCompilerOptionValue(value, customTypeMap) {
// There is a typeMap associated with this command-line option so use it to map value back to its name
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
return key;
}
- }
- return undefined;
+ });
}
function serializeCompilerOptions(options) {
- var result = ts.createMap();
+ var result = {};
var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_42 in options) {
- if (ts.hasProperty(options, name_42)) {
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
// tsconfig only options cannot be specified via command line,
// so we can assume that only types that can appear here string | number | boolean
- switch (name_42) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_42];
- var optionDefinition = optionsNameMap[name_42.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- // There is no map associated with this compiler option then use the value as-is
- // This is the case if the value is expect to be string, number, boolean or list of string
- result[name_42] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_42] = convertedValue;
- }
- else {
- // There is a typeMap associated with this command-line option so use it to map value back to its name
- result[name_42] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ // There is no map associated with this compiler option then use the value as-is
+ // This is the case if the value is expect to be string, number, boolean or list of string
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
}
+ result[name] = convertedValue;
}
- break;
+ else {
+ // There is a typeMap associated with this command-line option so use it to map value back to its name
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
}
}
}
return result;
}
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ // Filter applicable options to place in the file
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ // Serialize all options and thier descriptions
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ // Write the output
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ // Print out each row, aligning all the descriptions on the same column.
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
}
ts.generateTSConfig = generateTSConfig;
/**
@@ -64136,16 +69084,18 @@ var ts;
return output;
}
/**
- * Parse the contents of a config file (tsconfig.json).
- * @param json The contents of the config file to parse
- * @param host Instance of ParseConfigHost used to enumerate files in folder.
- * @param basePath A root directory to resolve relative path entries in the config
- * file to. e.g. outDir
- */
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
if (existingOptions === void 0) { existingOptions = {}; }
if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
if (resolutionStack.indexOf(resolvedPath) >= 0) {
@@ -64272,7 +69222,7 @@ var ts;
if (fileNames === undefined && includeSpecs === undefined) {
includeSpecs = ["**/*"];
}
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
}
@@ -64323,8 +69273,8 @@ var ts;
}
var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
+ var opt = optionNameMap.get(id);
+ if (opt) {
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
@@ -64358,8 +69308,9 @@ var ts;
}
function convertJsonOptionOfCustomType(opt, value, errors) {
var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
@@ -64449,7 +69400,7 @@ var ts;
* @param host The host used to resolve files and directories.
* @param errors An array for diagnostic reporting.
*/
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
basePath = ts.normalizePath(basePath);
// The exclude spec list is converted into a regular expression, which allows us to quickly
// test whether a file or directory should be excluded before recursively traversing the
@@ -64476,14 +69427,14 @@ var ts;
var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
// Rather than requery this for each file and filespec, we query the supported extensions
// once and store it on the expansion context.
- var supportedExtensions = ts.getSupportedExtensions(options);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
// Literal files are always included verbatim. An "include" or "exclude" specification cannot
// remove a literal file.
if (fileNames) {
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
var fileName = fileNames_1[_i];
var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
+ literalFileMap.set(keyMapper(file), file);
}
}
if (include && include.length > 0) {
@@ -64504,14 +69455,13 @@ var ts;
// same directory, we should remove it.
removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
}
}
}
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
return {
fileNames: literalFiles.concat(wildcardFiles),
wildcardDirectories: wildcardDirectories
@@ -64519,8 +69469,8 @@ var ts;
}
function validateSpecs(specs, errors, allowTrailingRecursion) {
var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
}
@@ -64554,7 +69504,7 @@ var ts;
// /a/b/a?z - Watch /a/b directly to catch any new file matching a?z
var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
+ var wildcardDirectories = {};
if (include !== undefined) {
var recursiveKeys = [];
for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
@@ -64576,14 +69526,15 @@ var ts;
}
}
// Remove any subpaths under an existing recursively watched directory.
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
}
}
- }
}
return wildcardDirectories;
}
@@ -64610,11 +69561,11 @@ var ts;
*/
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
for (var i = 0 /* Highest */; i < adjustedExtensionPriority; i++) {
var higherPriorityExtension = extensions[i];
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
return true;
}
}
@@ -64630,24 +69581,14 @@ var ts;
*/
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
for (var i = nextExtensionPriority; i < extensions.length; i++) {
var lowerPriorityExtension = extensions[i];
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
+ wildcardFiles.delete(lowerPriorityPath);
}
}
/**
- * Adds a file to an array of files.
- *
- * @param output The output array.
- * @param file The file path.
- */
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
- /**
* Gets a case sensitive key.
*
* @param key The original key.
@@ -64673,7 +69614,9 @@ var ts;
this.text = text;
}
StringScriptSnapshot.prototype.getText = function (start, end) {
- return this.text.substring(start, end);
+ return start === 0 && end === this.text.length
+ ? this.text
+ : this.text.substring(start, end);
};
StringScriptSnapshot.prototype.getLength = function () {
return this.text.length;
@@ -64783,8 +69726,7 @@ var ts;
ScriptElementKind.typeElement = "type";
/** enum E */
ScriptElementKind.enumElement = "enum";
- // TODO: GH#9983
- ScriptElementKind.enumMemberElement = "const";
+ ScriptElementKind.enumMemberElement = "enum member";
/**
* Inside module and script only
* const v = ..
@@ -64827,6 +69769,10 @@ var ts;
ScriptElementKind.letElement = "let";
ScriptElementKind.directory = "directory";
ScriptElementKind.externalModuleName = "external module name";
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ */
+ ScriptElementKind.jsxAttribute = "JSX attribute";
})(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {}));
var ScriptElementKindModifier;
(function (ScriptElementKindModifier) {
@@ -64912,33 +69858,34 @@ var ts;
})(SemanticMeaning = ts.SemanticMeaning || (ts.SemanticMeaning = {}));
function getMeaningFromDeclaration(node) {
switch (node.kind) {
- case 144 /* Parameter */:
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
- case 260 /* EnumMember */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 256 /* CatchClause */:
+ case 145 /* Parameter */:
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 263 /* EnumMember */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 259 /* CatchClause */:
+ case 252 /* JsxAttribute */:
return 1 /* Value */;
- case 143 /* TypeParameter */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 161 /* TypeLiteral */:
+ case 144 /* TypeParameter */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 162 /* TypeLiteral */:
return 2 /* Type */;
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
return 1 /* Value */ | 2 /* Type */;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.isAmbientModule(node)) {
return 4 /* Namespace */ | 1 /* Value */;
}
@@ -64948,22 +69895,25 @@ var ts;
else {
return 4 /* Namespace */;
}
- case 238 /* NamedImports */:
- case 239 /* ImportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 235 /* ImportDeclaration */:
- case 240 /* ExportAssignment */:
- case 241 /* ExportDeclaration */:
+ case 240 /* NamedImports */:
+ case 241 /* ImportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 237 /* ImportDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 243 /* ExportDeclaration */:
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
// An external module can be a Value
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return 4 /* Namespace */ | 1 /* Value */;
}
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
- if (node.parent.kind === 240 /* ExportAssignment */) {
+ if (node.kind === 264 /* SourceFile */) {
+ return 1 /* Value */;
+ }
+ else if (node.parent.kind === 242 /* ExportAssignment */) {
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
else if (isInRightSideOfImport(node)) {
@@ -64988,15 +69938,15 @@ var ts;
// import a = |b|; // Namespace
// import a = |b.c|; // Value, type, namespace
// import a = |b.c|.d; // Namespace
- if (node.parent.kind === 141 /* QualifiedName */ &&
+ if (node.parent.kind === 142 /* QualifiedName */ &&
node.parent.right === node &&
- node.parent.parent.kind === 234 /* ImportEqualsDeclaration */) {
+ node.parent.parent.kind === 236 /* ImportEqualsDeclaration */) {
return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
}
return 4 /* Namespace */;
}
function isInRightSideOfImport(node) {
- while (node.parent.kind === 141 /* QualifiedName */) {
+ while (node.parent.kind === 142 /* QualifiedName */) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
@@ -65007,27 +69957,27 @@ var ts;
function isQualifiedNameNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 141 /* QualifiedName */) {
- while (root.parent && root.parent.kind === 141 /* QualifiedName */) {
+ if (root.parent.kind === 142 /* QualifiedName */) {
+ while (root.parent && root.parent.kind === 142 /* QualifiedName */) {
root = root.parent;
}
isLastClause = root.right === node;
}
- return root.parent.kind === 157 /* TypeReference */ && !isLastClause;
+ return root.parent.kind === 158 /* TypeReference */ && !isLastClause;
}
function isPropertyAccessNamespaceReference(node) {
var root = node;
var isLastClause = true;
- if (root.parent.kind === 177 /* PropertyAccessExpression */) {
- while (root.parent && root.parent.kind === 177 /* PropertyAccessExpression */) {
+ if (root.parent.kind === 178 /* PropertyAccessExpression */) {
+ while (root.parent && root.parent.kind === 178 /* PropertyAccessExpression */) {
root = root.parent;
}
isLastClause = root.name === node;
}
- if (!isLastClause && root.parent.kind === 199 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 255 /* HeritageClause */) {
+ if (!isLastClause && root.parent.kind === 200 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 258 /* HeritageClause */) {
var decl = root.parent.parent.parent;
- return (decl.kind === 226 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) ||
- (decl.kind === 227 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */);
+ return (decl.kind === 228 /* ClassDeclaration */ && root.parent.parent.token === 107 /* ImplementsKeyword */) ||
+ (decl.kind === 229 /* InterfaceDeclaration */ && root.parent.parent.token === 84 /* ExtendsKeyword */);
}
return false;
}
@@ -65035,17 +69985,17 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 157 /* TypeReference */ ||
- (node.parent.kind === 199 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
+ return node.parent.kind === 158 /* TypeReference */ ||
+ (node.parent.kind === 200 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
(node.kind === 98 /* ThisKeyword */ && !ts.isPartOfExpression(node)) ||
- node.kind === 167 /* ThisType */;
+ node.kind === 168 /* ThisType */;
}
function isCallExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 179 /* CallExpression */);
+ return isCallOrNewExpressionTarget(node, 180 /* CallExpression */);
}
ts.isCallExpressionTarget = isCallExpressionTarget;
function isNewExpressionTarget(node) {
- return isCallOrNewExpressionTarget(node, 180 /* NewExpression */);
+ return isCallOrNewExpressionTarget(node, 181 /* NewExpression */);
}
ts.isNewExpressionTarget = isNewExpressionTarget;
function isCallOrNewExpressionTarget(node, kind) {
@@ -65058,7 +70008,7 @@ var ts;
ts.climbPastPropertyAccess = climbPastPropertyAccess;
function getTargetLabel(referenceNode, labelName) {
while (referenceNode) {
- if (referenceNode.kind === 219 /* LabeledStatement */ && referenceNode.label.text === labelName) {
+ if (referenceNode.kind === 221 /* LabeledStatement */ && referenceNode.label.text === labelName) {
return referenceNode.label;
}
referenceNode = referenceNode.parent;
@@ -65068,13 +70018,13 @@ var ts;
ts.getTargetLabel = getTargetLabel;
function isJumpStatementTarget(node) {
return node.kind === 70 /* Identifier */ &&
- (node.parent.kind === 215 /* BreakStatement */ || node.parent.kind === 214 /* ContinueStatement */) &&
+ (node.parent.kind === 217 /* BreakStatement */ || node.parent.kind === 216 /* ContinueStatement */) &&
node.parent.label === node;
}
ts.isJumpStatementTarget = isJumpStatementTarget;
function isLabelOfLabeledStatement(node) {
return node.kind === 70 /* Identifier */ &&
- node.parent.kind === 219 /* LabeledStatement */ &&
+ node.parent.kind === 221 /* LabeledStatement */ &&
node.parent.label === node;
}
function isLabelName(node) {
@@ -65082,15 +70032,15 @@ var ts;
}
ts.isLabelName = isLabelName;
function isRightSideOfQualifiedName(node) {
- return node.parent.kind === 141 /* QualifiedName */ && node.parent.right === node;
+ return node.parent.kind === 142 /* QualifiedName */ && node.parent.right === node;
}
ts.isRightSideOfQualifiedName = isRightSideOfQualifiedName;
function isRightSideOfPropertyAccess(node) {
- return node && node.parent && node.parent.kind === 177 /* PropertyAccessExpression */ && node.parent.name === node;
+ return node && node.parent && node.parent.kind === 178 /* PropertyAccessExpression */ && node.parent.name === node;
}
ts.isRightSideOfPropertyAccess = isRightSideOfPropertyAccess;
function isNameOfModuleDeclaration(node) {
- return node.parent.kind === 230 /* ModuleDeclaration */ && node.parent.name === node;
+ return node.parent.kind === 232 /* ModuleDeclaration */ && node.parent.name === node;
}
ts.isNameOfModuleDeclaration = isNameOfModuleDeclaration;
function isNameOfFunctionDeclaration(node) {
@@ -65101,19 +70051,19 @@ var ts;
function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) {
if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) {
switch (node.parent.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 257 /* PropertyAssignment */:
- case 260 /* EnumMember */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 230 /* ModuleDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 260 /* PropertyAssignment */:
+ case 263 /* EnumMember */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 232 /* ModuleDeclaration */:
return node.parent.name === node;
- case 178 /* ElementAccessExpression */:
+ case 179 /* ElementAccessExpression */:
return node.parent.argumentExpression === node;
- case 142 /* ComputedPropertyName */:
+ case 143 /* ComputedPropertyName */:
return true;
}
}
@@ -65162,17 +70112,17 @@ var ts;
return undefined;
}
switch (node.kind) {
- case 261 /* SourceFile */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
return node;
}
}
@@ -65180,46 +70130,46 @@ var ts;
ts.getContainerNode = getContainerNode;
function getNodeKind(node) {
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return ts.isExternalModule(node) ? ts.ScriptElementKind.moduleElement : ts.ScriptElementKind.scriptElement;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return ts.ScriptElementKind.moduleElement;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
return ts.ScriptElementKind.classElement;
- case 227 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement;
- case 228 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement;
- case 229 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement;
- case 223 /* VariableDeclaration */:
+ case 229 /* InterfaceDeclaration */: return ts.ScriptElementKind.interfaceElement;
+ case 230 /* TypeAliasDeclaration */: return ts.ScriptElementKind.typeElement;
+ case 231 /* EnumDeclaration */: return ts.ScriptElementKind.enumElement;
+ case 225 /* VariableDeclaration */:
return getKindOfVariableDeclaration(node);
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
return getKindOfVariableDeclaration(ts.getRootDeclaration(node));
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return ts.ScriptElementKind.functionElement;
- case 151 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement;
- case 152 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 152 /* GetAccessor */: return ts.ScriptElementKind.memberGetAccessorElement;
+ case 153 /* SetAccessor */: return ts.ScriptElementKind.memberSetAccessorElement;
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
return ts.ScriptElementKind.memberFunctionElement;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return ts.ScriptElementKind.memberVariableElement;
- case 155 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement;
- case 154 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement;
- case 153 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement;
- case 150 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement;
- case 143 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement;
- case 260 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement;
- case 144 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
- case 234 /* ImportEqualsDeclaration */:
- case 239 /* ImportSpecifier */:
- case 236 /* ImportClause */:
- case 243 /* ExportSpecifier */:
- case 237 /* NamespaceImport */:
+ case 156 /* IndexSignature */: return ts.ScriptElementKind.indexSignatureElement;
+ case 155 /* ConstructSignature */: return ts.ScriptElementKind.constructSignatureElement;
+ case 154 /* CallSignature */: return ts.ScriptElementKind.callSignatureElement;
+ case 151 /* Constructor */: return ts.ScriptElementKind.constructorImplementationElement;
+ case 144 /* TypeParameter */: return ts.ScriptElementKind.typeParameterElement;
+ case 263 /* EnumMember */: return ts.ScriptElementKind.enumMemberElement;
+ case 145 /* Parameter */: return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) ? ts.ScriptElementKind.memberVariableElement : ts.ScriptElementKind.parameterElement;
+ case 236 /* ImportEqualsDeclaration */:
+ case 241 /* ImportSpecifier */:
+ case 238 /* ImportClause */:
+ case 245 /* ExportSpecifier */:
+ case 239 /* NamespaceImport */:
return ts.ScriptElementKind.alias;
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -65233,15 +70183,6 @@ var ts;
}
}
ts.getNodeKind = getNodeKind;
- function getStringLiteralTypeForNode(node, typeChecker) {
- var searchNode = node.parent.kind === 171 /* LiteralType */ ? node.parent : node;
- var type = typeChecker.getTypeAtLocation(searchNode);
- if (type && type.flags & 32 /* StringLiteral */) {
- return type;
- }
- return undefined;
- }
- ts.getStringLiteralTypeForNode = getStringLiteralTypeForNode;
function isThis(node) {
switch (node.kind) {
case 98 /* ThisKeyword */:
@@ -65249,7 +70190,7 @@ var ts;
return true;
case 70 /* Identifier */:
// 'this' as a parameter
- return ts.identifierIsThisKeyword(node) && node.parent.kind === 144 /* Parameter */;
+ return ts.identifierIsThisKeyword(node) && node.parent.kind === 145 /* Parameter */;
default:
return false;
}
@@ -65258,7 +70199,7 @@ var ts;
// Matches the beginning of a triple slash directive
var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*</;
function getLineStartPositionForPosition(position, sourceFile) {
- var lineStarts = sourceFile.getLineStarts();
+ var lineStarts = ts.getLineStarts(sourceFile);
var line = sourceFile.getLineAndCharacterOfPosition(position).line;
return lineStarts[line];
}
@@ -65294,42 +70235,42 @@ var ts;
return false;
}
switch (n.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 172 /* ObjectBindingPattern */:
- case 161 /* TypeLiteral */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
- case 232 /* CaseBlock */:
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 173 /* ObjectBindingPattern */:
+ case 162 /* TypeLiteral */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
+ case 234 /* CaseBlock */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return nodeEndsWith(n, 17 /* CloseBraceToken */, sourceFile);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return isCompletedNode(n.block, sourceFile);
- case 180 /* NewExpression */:
+ case 181 /* NewExpression */:
if (!n.arguments) {
return true;
}
- // fall through
- case 179 /* CallExpression */:
- case 183 /* ParenthesizedExpression */:
- case 166 /* ParenthesizedType */:
+ // falls through
+ case 180 /* CallExpression */:
+ case 184 /* ParenthesizedExpression */:
+ case 167 /* ParenthesizedType */:
return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile);
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
return isCompletedNode(n.type, sourceFile);
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 154 /* ConstructSignature */:
- case 153 /* CallSignature */:
- case 185 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 155 /* ConstructSignature */:
+ case 154 /* CallSignature */:
+ case 186 /* ArrowFunction */:
if (n.body) {
return isCompletedNode(n.body, sourceFile);
}
@@ -65339,67 +70280,67 @@ var ts;
// Even though type parameters can be unclosed, we can get away with
// having at least a closing paren.
return hasChildOfKind(n, 19 /* CloseParenToken */, sourceFile);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
return n.body && isCompletedNode(n.body, sourceFile);
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
if (n.elseStatement) {
return isCompletedNode(n.elseStatement, sourceFile);
}
return isCompletedNode(n.thenStatement, sourceFile);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
return isCompletedNode(n.expression, sourceFile) ||
hasChildOfKind(n, 24 /* SemicolonToken */);
- case 175 /* ArrayLiteralExpression */:
- case 173 /* ArrayBindingPattern */:
- case 178 /* ElementAccessExpression */:
- case 142 /* ComputedPropertyName */:
- case 163 /* TupleType */:
+ case 176 /* ArrayLiteralExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 179 /* ElementAccessExpression */:
+ case 143 /* ComputedPropertyName */:
+ case 164 /* TupleType */:
return nodeEndsWith(n, 21 /* CloseBracketToken */, sourceFile);
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
if (n.type) {
return isCompletedNode(n.type, sourceFile);
}
return hasChildOfKind(n, 21 /* CloseBracketToken */, sourceFile);
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
// there is no such thing as terminator token for CaseClause/DefaultClause so for simplicity always consider them non-completed
return false;
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
return isCompletedNode(n.statement, sourceFile);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')';
var hasWhileKeyword = findChildOfKind(n, 105 /* WhileKeyword */, sourceFile);
if (hasWhileKeyword) {
return nodeEndsWith(n, 19 /* CloseParenToken */, sourceFile);
}
return isCompletedNode(n.statement, sourceFile);
- case 160 /* TypeQuery */:
+ case 161 /* TypeQuery */:
return isCompletedNode(n.exprName, sourceFile);
- case 187 /* TypeOfExpression */:
- case 186 /* DeleteExpression */:
- case 188 /* VoidExpression */:
- case 195 /* YieldExpression */:
- case 196 /* SpreadElement */:
+ case 188 /* TypeOfExpression */:
+ case 187 /* DeleteExpression */:
+ case 189 /* VoidExpression */:
+ case 196 /* YieldExpression */:
+ case 197 /* SpreadElement */:
var unaryWordExpression = n;
return isCompletedNode(unaryWordExpression.expression, sourceFile);
- case 181 /* TaggedTemplateExpression */:
+ case 182 /* TaggedTemplateExpression */:
return isCompletedNode(n.template, sourceFile);
- case 194 /* TemplateExpression */:
+ case 195 /* TemplateExpression */:
var lastSpan = ts.lastOrUndefined(n.templateSpans);
return isCompletedNode(lastSpan, sourceFile);
- case 202 /* TemplateSpan */:
+ case 204 /* TemplateSpan */:
return ts.nodeIsPresent(n.literal);
- case 241 /* ExportDeclaration */:
- case 235 /* ImportDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */:
return ts.nodeIsPresent(n.moduleSpecifier);
- case 190 /* PrefixUnaryExpression */:
+ case 191 /* PrefixUnaryExpression */:
return isCompletedNode(n.operand, sourceFile);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
return isCompletedNode(n.right, sourceFile);
- case 193 /* ConditionalExpression */:
+ case 194 /* ConditionalExpression */:
return isCompletedNode(n.whenFalse, sourceFile);
default:
return true;
@@ -65455,7 +70396,7 @@ var ts;
// for the position of the relevant node (or comma).
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
// find syntax list that covers the span of the node
- if (c.kind === 292 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 293 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -65497,7 +70438,7 @@ var ts;
if (includeJsDocComment === void 0) { includeJsDocComment = false; }
var current = sourceFile;
outer: while (true) {
- if (isToken(current)) {
+ if (ts.isToken(current)) {
// exit early
return current;
}
@@ -65522,8 +70463,8 @@ var ts;
}
}
// find the child that contains 'position'
- for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) {
- var child = current.getChildAt(i);
+ for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
+ var child = _b[_a];
// all jsDocComment nodes were already visited
if (ts.isJSDocNode(child)) {
continue;
@@ -65547,18 +70488,18 @@ var ts;
}
}
/**
- * The token on the left of the position is the token that strictly includes the position
- * or sits to the left of the cursor if it is on a boundary. For example
- *
- * fo|o -> will return foo
- * foo <comment> |bar -> will return foo
- *
- */
+ * The token on the left of the position is the token that strictly includes the position
+ * or sits to the left of the cursor if it is on a boundary. For example
+ *
+ * fo|o -> will return foo
+ * foo <comment> |bar -> will return foo
+ *
+ */
function findTokenOnLeftOfPosition(file, position) {
// Ideally, getTokenAtPosition should return a token. However, it is currently
// broken, so we do a check to make sure the result was indeed a token.
var tokenAtPosition = getTokenAtPosition(file, position);
- if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
+ if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
return findPrecedingToken(position, file);
@@ -65567,7 +70508,7 @@ var ts;
function findNextToken(previousToken, parent) {
return find(parent);
function find(n) {
- if (isToken(n) && n.pos === previousToken.end) {
+ if (ts.isToken(n) && n.pos === previousToken.end) {
// this is token that starts at the end of previous token - return it
return n;
}
@@ -65590,7 +70531,7 @@ var ts;
function findPrecedingToken(position, sourceFile, startNode) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
@@ -65598,11 +70539,11 @@ var ts;
return candidate && findRightmostToken(candidate);
}
function find(n) {
- if (isToken(n)) {
+ if (ts.isToken(n)) {
return n;
}
var children = n.getChildren();
- for (var i = 0, len = children.length; i < len; i++) {
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
// condition 'position < child.end' checks if child node end after the position
// in the example below this condition will be false for 'aaaa' and 'bbbb' and true for 'ccc'
@@ -65627,7 +70568,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 261 /* SourceFile */);
+ ts.Debug.assert(startNode !== undefined || n.kind === 264 /* SourceFile */);
// Here we know that none of child token nodes embrace the position,
// the only known case is when position is at the end of the file.
// Try to find the rightmost token in the file without filtering.
@@ -65686,17 +70627,17 @@ var ts;
return true;
}
// <div> { | </div> or <div a={| </div>
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 252 /* JsxExpression */) {
+ if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 255 /* JsxExpression */) {
return true;
}
// <div> {
// |
// } < /div>
- if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 252 /* JsxExpression */) {
+ if (token && token.kind === 17 /* CloseBraceToken */ && token.parent.kind === 255 /* JsxExpression */) {
return true;
}
// <div>|</div>
- if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 249 /* JsxClosingElement */) {
+ if (token.kind === 26 /* LessThanToken */ && token.parent.kind === 251 /* JsxClosingElement */) {
return true;
}
return false;
@@ -65727,10 +70668,10 @@ var ts;
// Internally, we represent the end of the comment at the newline and closing '/', respectively.
return predicate ?
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end) &&
+ (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end) &&
predicate(c); }) :
ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind == 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
+ (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
}
return false;
}
@@ -65751,7 +70692,7 @@ var ts;
*/
function getJsDocTagAtPosition(sourceFile, position) {
var node = ts.getTokenAtPosition(sourceFile, position);
- if (isToken(node)) {
+ if (ts.isToken(node)) {
switch (node.kind) {
case 103 /* VarKeyword */:
case 109 /* LetKeyword */:
@@ -65808,19 +70749,15 @@ var ts;
}
ts.getNodeModifiers = getNodeModifiers;
function getTypeArgumentOrTypeParameterList(node) {
- if (node.kind === 157 /* TypeReference */ || node.kind === 179 /* CallExpression */) {
+ if (node.kind === 158 /* TypeReference */ || node.kind === 180 /* CallExpression */) {
return node.typeArguments;
}
- if (ts.isFunctionLike(node) || node.kind === 226 /* ClassDeclaration */ || node.kind === 227 /* InterfaceDeclaration */) {
+ if (ts.isFunctionLike(node) || node.kind === 228 /* ClassDeclaration */ || node.kind === 229 /* InterfaceDeclaration */) {
return node.typeParameters;
}
return undefined;
}
ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList;
- function isToken(n) {
- return n.kind >= 0 /* FirstToken */ && n.kind <= 140 /* LastToken */;
- }
- ts.isToken = isToken;
function isWord(kind) {
return kind === 70 /* Identifier */ || ts.isKeyword(kind);
}
@@ -65877,18 +70814,18 @@ var ts;
}
ts.compareDataObjects = compareDataObjects;
function isArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- if (node.kind === 175 /* ArrayLiteralExpression */ ||
- node.kind === 176 /* ObjectLiteralExpression */) {
+ if (node.kind === 176 /* ArrayLiteralExpression */ ||
+ node.kind === 177 /* ObjectLiteralExpression */) {
// [a,b,c] from:
// [a, b, c] = someExpression;
- if (node.parent.kind === 192 /* BinaryExpression */ &&
+ if (node.parent.kind === 193 /* BinaryExpression */ &&
node.parent.left === node &&
node.parent.operatorToken.kind === 57 /* EqualsToken */) {
return true;
}
// [a, b, c] from:
// for([a, b, c] of expression)
- if (node.parent.kind === 213 /* ForOfStatement */ &&
+ if (node.parent.kind === 215 /* ForOfStatement */ &&
node.parent.initializer === node) {
return true;
}
@@ -65896,7 +70833,7 @@ var ts;
// [x, [a, b, c] ] = someExpression
// or
// {x, a: {a, b, c} } = someExpression
- if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 257 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {
+ if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 260 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {
return true;
}
}
@@ -65924,12 +70861,47 @@ var ts;
}
}
ts.isInNonReferenceComment = isInNonReferenceComment;
+ function createTextSpanFromNode(node, sourceFile) {
+ return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
+ }
+ ts.createTextSpanFromNode = createTextSpanFromNode;
+ function isTypeKeyword(kind) {
+ switch (kind) {
+ case 118 /* AnyKeyword */:
+ case 121 /* BooleanKeyword */:
+ case 129 /* NeverKeyword */:
+ case 132 /* NumberKeyword */:
+ case 133 /* ObjectKeyword */:
+ case 135 /* StringKeyword */:
+ case 136 /* SymbolKeyword */:
+ case 104 /* VoidKeyword */:
+ return true;
+ default:
+ return false;
+ }
+ }
+ ts.isTypeKeyword = isTypeKeyword;
+ /** True if the symbol is for an external module, as opposed to a namespace. */
+ function isExternalModuleSymbol(moduleSymbol) {
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
+ return moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */;
+ }
+ ts.isExternalModuleSymbol = isExternalModuleSymbol;
+ /** Returns `true` the first time it encounters a node and `false` afterwards. */
+ function nodeSeenTracker() {
+ var seen = [];
+ return function (node) {
+ var id = ts.getNodeId(node);
+ return !seen[id] && (seen[id] = true);
+ };
+ }
+ ts.nodeSeenTracker = nodeSeenTracker;
})(ts || (ts = {}));
// Display-part writer helpers
/* @internal */
(function (ts) {
function isFirstDeclarationOfSymbolParameter(symbol) {
- return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 144 /* Parameter */;
+ return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 145 /* Parameter */;
}
ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter;
var displayPartWriter = getDisplayPartWriter();
@@ -65946,13 +70918,15 @@ var ts;
writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); },
writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); },
writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); },
+ writeProperty: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.propertyName); },
writeSymbol: writeSymbol,
writeLine: writeLine,
increaseIndent: function () { indent++; },
decreaseIndent: function () { indent--; },
clear: resetWriter,
trackSymbol: ts.noop,
- reportInaccessibleThisError: ts.noop
+ reportInaccessibleThisError: ts.noop,
+ reportIllegalExtends: ts.noop
};
function writeIndent() {
if (lineStart) {
@@ -66105,23 +71079,18 @@ var ts;
function getDeclaredName(typeChecker, symbol, location) {
// If this is an export or import specifier it could have been renamed using the 'as' syntax.
// If so we want to search for whatever is under the cursor.
- if (isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- else if (ts.isStringOrNumericLiteral(location) &&
- location.parent.kind === 142 /* ComputedPropertyName */) {
+ if (isImportOrExportSpecifierName(location) || ts.isStringOrNumericLiteral(location) && location.parent.kind === 143 /* ComputedPropertyName */) {
return location.text;
}
// Try to get the local symbol if we're dealing with an 'export default'
// since that symbol has the "true" name.
var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- var name = typeChecker.symbolToString(localExportDefaultSymbol || symbol);
- return name;
+ return typeChecker.symbolToString(localExportDefaultSymbol || symbol);
}
ts.getDeclaredName = getDeclaredName;
function isImportOrExportSpecifierName(location) {
return location.parent &&
- (location.parent.kind === 239 /* ImportSpecifier */ || location.parent.kind === 243 /* ExportSpecifier */) &&
+ (location.parent.kind === 241 /* ImportSpecifier */ || location.parent.kind === 245 /* ExportSpecifier */) &&
location.parent.propertyName === location;
}
ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName;
@@ -66137,7 +71106,6 @@ var ts;
(name.charCodeAt(0) === 34 /* doubleQuote */ || name.charCodeAt(0) === 39 /* singleQuote */)) {
return name.substring(1, length - 1);
}
- ;
return name;
}
ts.stripQuotes = stripQuotes;
@@ -66188,6 +71156,22 @@ var ts;
};
}
ts.sanitizeConfigFile = sanitizeConfigFile;
+ function getFirstNonSpaceCharacterPosition(text, position) {
+ while (ts.isWhiteSpace(text.charCodeAt(position))) {
+ position += 1;
+ }
+ return position;
+ }
+ ts.getFirstNonSpaceCharacterPosition = getFirstNonSpaceCharacterPosition;
+ function getOpenBrace(constructor, sourceFile) {
+ // First token is the open curly, this is where we want to put the 'super' call.
+ return constructor.body.getFirstToken(sourceFile);
+ }
+ ts.getOpenBrace = getOpenBrace;
+ function getOpenBraceOfClassLike(declaration, sourceFile) {
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ }
+ ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -66236,7 +71220,7 @@ var ts;
function canFollow(keyword1, keyword2) {
if (ts.isAccessibilityModifier(keyword1)) {
if (keyword2 === 124 /* GetKeyword */ ||
- keyword2 === 133 /* SetKeyword */ ||
+ keyword2 === 134 /* SetKeyword */ ||
keyword2 === 122 /* ConstructorKeyword */ ||
keyword2 === 114 /* StaticKeyword */) {
// Allow things like "public get", "public constructor" and "public static".
@@ -66255,9 +71239,9 @@ var ts;
var entries = [];
var dense = classifications.spans;
var lastEnd = 0;
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_4 = dense[i + 1];
+ var length_5 = dense[i + 1];
var type = dense[i + 2];
// Make a whitespace entry between the last item and this one.
if (lastEnd >= 0) {
@@ -66266,8 +71250,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_4, classification: convertClassification(type) });
- lastEnd = start + length_4;
+ entries.push({ length: length_5, classification: convertClassification(type) });
+ lastEnd = start + length_5;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -66335,7 +71319,7 @@ var ts;
case 5 /* InTemplateMiddleOrTail */:
text = "}\n" + text;
offset = 2;
- // fallthrough
+ // falls through
case 6 /* InTemplateSubstitutionPosition */:
templateStack.push(13 /* TemplateHead */);
break;
@@ -66395,10 +71379,10 @@ var ts;
angleBracketStack--;
}
else if (token === 118 /* AnyKeyword */ ||
- token === 134 /* StringKeyword */ ||
+ token === 135 /* StringKeyword */ ||
token === 132 /* NumberKeyword */ ||
token === 121 /* BooleanKeyword */ ||
- token === 135 /* SymbolKeyword */) {
+ token === 136 /* SymbolKeyword */) {
if (angleBracketStack > 0 && !syntacticClassifierAbsent) {
// If it looks like we're could be in something generic, don't classify this
// as a keyword. We may just get overwritten by the syntactic classifier,
@@ -66570,7 +71554,7 @@ var ts;
}
}
function isKeyword(token) {
- return token >= 71 /* FirstKeyword */ && token <= 140 /* LastKeyword */;
+ return token >= 71 /* FirstKeyword */ && token <= 141 /* LastKeyword */;
}
function classFromKind(token) {
if (isKeyword(token)) {
@@ -66627,10 +71611,10 @@ var ts;
// That means we're calling back into the host around every 1.2k of the file we process.
// Lib.d.ts has similar numbers.
switch (kind) {
- case 230 /* ModuleDeclaration */:
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
cancellationToken.throwIfCancellationRequested();
}
}
@@ -66681,7 +71665,7 @@ var ts;
*/
function hasValueSideModule(symbol) {
return ts.forEach(symbol.declarations, function (declaration) {
- return declaration.kind === 230 /* ModuleDeclaration */ &&
+ return declaration.kind === 232 /* ModuleDeclaration */ &&
ts.getModuleInstanceState(declaration) === 1 /* Instantiated */;
});
}
@@ -66696,7 +71680,7 @@ var ts;
// Only bother calling into the typechecker if this is an identifier that
// could possibly resolve to a type name. This makes classification run
// in a third of the time it would normally take.
- if (classifiableNames[identifier.text]) {
+ if (classifiableNames.get(identifier.text)) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
var type = classifySymbol(symbol, ts.getMeaningFromLocation(node));
@@ -66742,7 +71726,7 @@ var ts;
ts.Debug.assert(classifications.spans.length % 3 === 0);
var dense = classifications.spans;
var result = [];
- for (var i = 0, n = dense.length; i < n; i += 3) {
+ for (var i = 0; i < dense.length; i += 3) {
result.push({
textSpan: ts.createTextSpan(dense[i], dense[i + 1]),
classificationType: getClassificationTypeName(dense[i + 2])
@@ -66845,16 +71829,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */);
pos = tag.tagName.end;
switch (tag.kind) {
- case 281 /* JSDocParameterTag */:
+ case 285 /* JSDocParameterTag */:
processJSDocParameterTag(tag);
break;
- case 284 /* JSDocTemplateTag */:
+ case 288 /* JSDocTemplateTag */:
processJSDocTemplateTag(tag);
break;
- case 283 /* JSDocTypeTag */:
+ case 287 /* JSDocTypeTag */:
processElement(tag.typeExpression);
break;
- case 282 /* JSDocReturnTag */:
+ case 286 /* JSDocReturnTag */:
processElement(tag.typeExpression);
break;
}
@@ -66941,22 +71925,22 @@ var ts;
}
function tryClassifyJsxElementName(token) {
switch (token.parent && token.parent.kind) {
- case 248 /* JsxOpeningElement */:
+ case 250 /* JsxOpeningElement */:
if (token.parent.tagName === token) {
return 19 /* jsxOpenTagName */;
}
break;
- case 249 /* JsxClosingElement */:
+ case 251 /* JsxClosingElement */:
if (token.parent.tagName === token) {
return 20 /* jsxCloseTagName */;
}
break;
- case 247 /* JsxSelfClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
if (token.parent.tagName === token) {
return 21 /* jsxSelfClosingTagName */;
}
break;
- case 250 /* JsxAttribute */:
+ case 252 /* JsxAttribute */:
if (token.parent.name === token) {
return 22 /* jsxAttribute */;
}
@@ -66984,17 +71968,17 @@ var ts;
if (token) {
if (tokenKind === 57 /* EqualsToken */) {
// the '=' in a variable declaration is special cased here.
- if (token.parent.kind === 223 /* VariableDeclaration */ ||
- token.parent.kind === 147 /* PropertyDeclaration */ ||
- token.parent.kind === 144 /* Parameter */ ||
- token.parent.kind === 250 /* JsxAttribute */) {
+ if (token.parent.kind === 225 /* VariableDeclaration */ ||
+ token.parent.kind === 148 /* PropertyDeclaration */ ||
+ token.parent.kind === 145 /* Parameter */ ||
+ token.parent.kind === 252 /* JsxAttribute */) {
return 5 /* operator */;
}
}
- if (token.parent.kind === 192 /* BinaryExpression */ ||
- token.parent.kind === 190 /* PrefixUnaryExpression */ ||
- token.parent.kind === 191 /* PostfixUnaryExpression */ ||
- token.parent.kind === 193 /* ConditionalExpression */) {
+ if (token.parent.kind === 193 /* BinaryExpression */ ||
+ token.parent.kind === 191 /* PrefixUnaryExpression */ ||
+ token.parent.kind === 192 /* PostfixUnaryExpression */ ||
+ token.parent.kind === 194 /* ConditionalExpression */) {
return 5 /* operator */;
}
}
@@ -67004,7 +71988,7 @@ var ts;
return 4 /* numericLiteral */;
}
else if (tokenKind === 9 /* StringLiteral */) {
- return token.parent.kind === 250 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */;
+ return token.parent.kind === 252 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */;
}
else if (tokenKind === 11 /* RegularExpressionLiteral */) {
// TODO: we should get another classification type for these literals.
@@ -67020,32 +72004,32 @@ var ts;
else if (tokenKind === 70 /* Identifier */) {
if (token) {
switch (token.parent.kind) {
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
if (token.parent.name === token) {
return 11 /* className */;
}
return;
- case 143 /* TypeParameter */:
+ case 144 /* TypeParameter */:
if (token.parent.name === token) {
return 15 /* typeParameterName */;
}
return;
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
if (token.parent.name === token) {
return 13 /* interfaceName */;
}
return;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
if (token.parent.name === token) {
return 12 /* enumName */;
}
return;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (token.parent.name === token) {
return 14 /* moduleName */;
}
return;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
if (token.parent.name === token) {
return ts.isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */;
}
@@ -67062,9 +72046,8 @@ var ts;
// Ignore nodes that don't intersect the original span to classify.
if (ts.decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) {
checkForClassificationCancellation(cancellationToken, element.kind);
- var children = element.getChildren(sourceFile);
- for (var i = 0, n = children.length; i < n; i++) {
- var child = children[i];
+ for (var _i = 0, _a = element.getChildren(sourceFile); _i < _a.length; _i++) {
+ var child = _a[_i];
if (!tryClassifyNode(child)) {
// Recurse into our child nodes.
processElement(child);
@@ -67075,259 +72058,31 @@ var ts;
}
ts.getEncodedSyntacticClassifications = getEncodedSyntacticClassifications;
})(ts || (ts = {}));
-/// <reference path='../compiler/utilities.ts' />
/* @internal */
var ts;
(function (ts) {
var Completions;
(function (Completions) {
- function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
- if (ts.isInReferenceComment(sourceFile, position)) {
- return getTripleSlashReferenceCompletion(sourceFile, position);
- }
- if (ts.isInString(sourceFile, position)) {
- return getStringLiteralCompletionEntries(sourceFile, position);
- }
- var completionData = getCompletionData(typeChecker, log, sourceFile, position);
- if (!completionData) {
- return undefined;
- }
- var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isJsDocTagName = completionData.isJsDocTagName;
- if (isJsDocTagName) {
- // If the current position is a jsDoc tag name, only tag names should be provided for completion
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getAllJsDocCompletionEntries() };
- }
- var entries = [];
- if (ts.isSourceFileJavaScript(sourceFile)) {
- var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true);
- ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames));
- }
- else {
- if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 /* JSX */ &&
- location.parent && location.parent.kind === 249 /* JsxClosingElement */) {
- // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
- // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
- // For example:
- // var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
- return undefined;
- }
- }
- getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true);
- }
- // Add keywords if this is not a member completion list
- if (!isMemberCompletion && !isJsDocTagName) {
- ts.addRange(entries, keywordCompletions);
- }
- return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
- function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames) {
- var entries = [];
- var nameTable = ts.getNameTable(sourceFile);
- for (var name_43 in nameTable) {
- // Skip identifiers produced only from the current location
- if (nameTable[name_43] === position) {
- continue;
- }
- if (!uniqueNames[name_43]) {
- uniqueNames[name_43] = name_43;
- var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name_43), compilerOptions.target, /*performCharacterChecks*/ true);
- if (displayName) {
- var entry = {
- name: displayName,
- kind: ts.ScriptElementKind.warning,
- kindModifiers: "",
- sortText: "1"
- };
- entries.push(entry);
- }
- }
- }
- return entries;
- }
- function createCompletionEntry(symbol, location, performCharacterChecks) {
- // Try to get a valid display name for this symbol, if we could not find one, then ignore it.
- // We would like to only show things that can be added after a dot, so for instance numeric properties can
- // not be accessed with a dot (a.1 <- invalid)
- var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, compilerOptions.target, performCharacterChecks, location);
- if (!displayName) {
- return undefined;
- }
- // TODO(drosen): Right now we just permit *all* semantic meanings when calling
- // 'getSymbolKind' which is permissible given that it is backwards compatible; but
- // really we should consider passing the meaning for the node so that we don't report
- // that a suggestion for a value is an interface. We COULD also just do what
- // 'getSymbolModifiers' does, which is to use the first declaration.
- // Use a 'sortText' of 0' so that all symbol completion entries come before any other
- // entries (like JavaScript identifier entries).
- return {
- name: displayName,
- kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- sortText: "0",
- };
- }
- function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks) {
- var start = ts.timestamp();
- var uniqueNames = ts.createMap();
- if (symbols) {
- for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
- var symbol = symbols_4[_i];
- var entry = createCompletionEntry(symbol, location, performCharacterChecks);
- if (entry) {
- var id = ts.escapeIdentifier(entry.name);
- if (!uniqueNames[id]) {
- entries.push(entry);
- uniqueNames[id] = id;
- }
- }
- }
- }
- log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
- return uniqueNames;
- }
- function getStringLiteralCompletionEntries(sourceFile, position) {
- var node = ts.findPrecedingToken(position, sourceFile);
- if (!node || node.kind !== 9 /* StringLiteral */) {
- return undefined;
- }
- if (node.parent.kind === 257 /* PropertyAssignment */ &&
- node.parent.parent.kind === 176 /* ObjectLiteralExpression */ &&
- node.parent.name === node) {
- // Get quoted name of properties of the object literal expression
- // i.e. interface ConfigFiles {
- // 'jspm:dev': string
- // }
- // let files: ConfigFiles = {
- // '/*completion position*/'
- // }
- //
- // function foo(c: ConfigFiles) {}
- // foo({
- // '/*completion position*/'
- // });
- return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent);
- }
- else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
- // Get all names of properties on the expression
- // i.e. interface A {
- // 'prop1': string
- // }
- // let a: A;
- // a['/*completion position*/']
- return getStringLiteralCompletionEntriesFromElementAccess(node.parent);
- }
- else if (node.parent.kind === 235 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, false)) {
- // Get all known external module names or complete a path to a module
- // i.e. import * as ns from "/*completion position*/";
- // import x = require("/*completion position*/");
- // var y = require("/*completion position*/");
- return getStringLiteralCompletionEntriesFromModuleNames(node);
- }
- else {
- var argumentInfo = ts.SignatureHelp.getContainingArgumentInfo(node, position, sourceFile);
- if (argumentInfo) {
- // Get string literal completions from specialized signatures of the target
- // i.e. declare function f(a: 'A');
- // f("/*completion position*/")
- return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo);
- }
- // Get completion for string literal from string literal type
- // i.e. var x: "hi" | "hello" = "/*completion position*/"
- return getStringLiteralCompletionEntriesFromContextualType(node);
- }
- }
- function getStringLiteralCompletionEntriesFromPropertyAssignment(element) {
- var type = typeChecker.getContextualType(element.parent);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, /*performCharacterChecks*/ false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- }
- function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo) {
- var candidates = [];
- var entries = [];
- typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
- for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
- var candidate = candidates_3[_i];
- if (candidate.parameters.length > argumentInfo.argumentIndex) {
- var parameter = candidate.parameters[argumentInfo.argumentIndex];
- addStringLiteralCompletionsFromType(typeChecker.getTypeAtLocation(parameter.valueDeclaration), entries);
- }
- }
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromElementAccess(node) {
- var type = typeChecker.getTypeAtLocation(node.expression);
- var entries = [];
- if (type) {
- getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, /*performCharacterChecks*/ false);
- if (entries.length) {
- return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
- }
- }
- return undefined;
- }
- function getStringLiteralCompletionEntriesFromContextualType(node) {
- var type = typeChecker.getContextualType(node);
- if (type) {
- var entries_2 = [];
- addStringLiteralCompletionsFromType(type, entries_2);
- if (entries_2.length) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
- }
- }
- return undefined;
- }
- function addStringLiteralCompletionsFromType(type, result) {
- if (!type) {
- return;
- }
- if (type.flags & 65536 /* Union */) {
- ts.forEach(type.types, function (t) { return addStringLiteralCompletionsFromType(t, result); });
- }
- else {
- if (type.flags & 32 /* StringLiteral */) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
- }
- }
- }
- function getStringLiteralCompletionEntriesFromModuleNames(node) {
+ var PathCompletions;
+ (function (PathCompletions) {
+ function getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker) {
var literalValue = ts.normalizeSlashes(node.text);
var scriptPath = node.getSourceFile().path;
var scriptDirectory = ts.getDirectoryPath(scriptPath);
var span = getDirectoryFragmentTextSpan(node.text, node.getStart() + 1);
var entries;
if (isPathRelativeToScript(literalValue) || ts.isRootedDiskPath(literalValue)) {
+ var extensions = ts.getSupportedExtensions(compilerOptions);
if (compilerOptions.rootDirs) {
- entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragmentWithRootDirs(compilerOptions.rootDirs, literalValue, scriptDirectory, extensions, /*includeExtensions*/ false, span, compilerOptions, host, scriptPath);
}
else {
- entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ false, span, scriptPath);
+ entries = getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensions, /*includeExtensions*/ false, span, host, scriptPath);
}
}
else {
// Check for node modules
- entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span);
+ entries = getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, span, compilerOptions, host, typeChecker);
}
return {
isGlobalCompletion: false,
@@ -67336,6 +72091,7 @@ var ts;
entries: entries
};
}
+ PathCompletions.getStringLiteralCompletionEntriesFromModuleNames = getStringLiteralCompletionEntriesFromModuleNames;
/**
* Takes a script path and returns paths for all potential folders that could be merged with its
* containing folder via the "rootDirs" compiler option
@@ -67355,21 +72111,21 @@ var ts;
// Now find a path for each potential directory that is to be merged with the one containing the script
return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
}
- function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, exclude) {
+ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptPath, extensions, includeExtensions, span, compilerOptions, host, exclude) {
var basePath = compilerOptions.project || host.getCurrentDirectory();
var ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
var baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase);
var result = [];
for (var _i = 0, baseDirectories_1 = baseDirectories; _i < baseDirectories_1.length; _i++) {
var baseDirectory = baseDirectories_1[_i];
- getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, exclude, result);
+ getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensions, includeExtensions, span, host, exclude, result);
}
return result;
}
/**
* Given a path ending at a directory, gets the completions for the path, and filters for those entries containing the basename.
*/
- function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, exclude, result) {
+ function getCompletionEntriesForDirectoryFragment(fragment, scriptPath, extensions, includeExtensions, span, host, exclude, result) {
if (result === void 0) { result = []; }
if (fragment === undefined) {
fragment = "";
@@ -67405,13 +72161,13 @@ var ts;
continue;
}
var foundFileName = includeExtensions ? ts.getBaseFileName(filePath) : ts.removeFileExtension(ts.getBaseFileName(filePath));
- if (!foundFiles[foundFileName]) {
- foundFiles[foundFileName] = true;
+ if (!foundFiles.get(foundFileName)) {
+ foundFiles.set(foundFileName, true);
}
}
- for (var foundFile in foundFiles) {
+ ts.forEachKey(foundFiles, function (foundFile) {
result.push(createCompletionEntryForModule(foundFile, ts.ScriptElementKind.scriptElement, span));
- }
+ });
}
// If possible, get folder completion as well
var directories = tryGetDirectories(host, baseDirectory);
@@ -67432,14 +72188,14 @@ var ts;
* Modules from node_modules (i.e. those listed in package.json)
* This includes all files that are found in node_modules/moduleName/ with acceptable file extensions
*/
- function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span) {
+ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, span, compilerOptions, host, typeChecker) {
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths;
var result;
if (baseUrl) {
var fileExtensions = ts.getSupportedExtensions(compilerOptions);
var projectDir = compilerOptions.project || host.getCurrentDirectory();
var absolute = ts.isRootedDiskPath(baseUrl) ? baseUrl : ts.combinePaths(projectDir, baseUrl);
- result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, /*includeExtensions*/ false, span);
+ result = getCompletionEntriesForDirectoryFragment(fragment, ts.normalizePath(absolute), fileExtensions, /*includeExtensions*/ false, span, host);
if (paths) {
for (var path in paths) {
if (paths.hasOwnProperty(path)) {
@@ -67447,7 +72203,7 @@ var ts;
if (paths[path]) {
for (var _i = 0, _a = paths[path]; _i < _a.length; _i++) {
var pattern = _a[_i];
- for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions); _b < _c.length; _b++) {
+ for (var _b = 0, _c = getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host); _b < _c.length; _b++) {
var match = _c[_b];
result.push(createCompletionEntryForModule(match, ts.ScriptElementKind.externalModuleName, span));
}
@@ -67468,13 +72224,13 @@ var ts;
result = [];
}
getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, span, result);
- for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions); _d < _e.length; _d++) {
+ for (var _d = 0, _e = enumeratePotentialNonRelativeModules(fragment, scriptPath, compilerOptions, typeChecker, host); _d < _e.length; _d++) {
var moduleName = _e[_d];
result.push(createCompletionEntryForModule(moduleName, ts.ScriptElementKind.externalModuleName, span));
}
return result;
}
- function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions) {
+ function getModulesForPathsPattern(fragment, baseUrl, pattern, fileExtensions, host) {
if (host.readDirectory) {
var parsed = ts.hasZeroOrOneAsteriskCharacter(pattern) ? ts.tryParsePattern(pattern) : undefined;
if (parsed) {
@@ -67493,7 +72249,7 @@ var ts;
// that encodes the suffix, but we would have to escape the character "?" which readDirectory
// doesn't support. For now, this is safer but slower
var includeGlob = normalizedSuffix ? "**/*" : "./*";
- var matches = tryReadDirectory(host, baseDirectory, fileExtensions, undefined, [includeGlob]);
+ var matches = tryReadDirectory(host, baseDirectory, fileExtensions, /*exclude*/ undefined, [includeGlob]);
if (matches) {
var result = [];
// Trim away prefix and suffix
@@ -67504,8 +72260,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_5 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_5)));
+ var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
}
return result;
}
@@ -67513,7 +72269,7 @@ var ts;
}
return undefined;
}
- function enumeratePotentialNonRelativeModules(fragment, scriptPath, options) {
+ function enumeratePotentialNonRelativeModules(fragment, scriptPath, options, typeChecker, host) {
// Check If this is a nested module
var isNestedModule = fragment.indexOf(ts.directorySeparator) !== -1;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
@@ -67553,7 +72309,7 @@ var ts;
}
return ts.deduplicate(nonRelativeModules);
}
- function getTripleSlashReferenceCompletion(sourceFile, position) {
+ function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
var token = ts.getTokenAtPosition(sourceFile, position);
if (!token) {
return undefined;
@@ -67589,7 +72345,7 @@ var ts;
if (kind === "path") {
// Give completions for a relative path
var span_10 = getDirectoryFragmentTextSpan(toComplete, range.pos + prefix.length);
- completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ true, span_10, sourceFile.path);
+ completionInfo.entries = getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, ts.getSupportedExtensions(compilerOptions), /*includeExtensions*/ true, span_10, host, sourceFile.path);
}
else {
// Give completions based on the typings available
@@ -67599,6 +72355,7 @@ var ts;
}
return completionInfo;
}
+ PathCompletions.getTripleSlashReferenceCompletion = getTripleSlashReferenceCompletion;
function getCompletionEntriesFromTypings(host, options, scriptPath, span, result) {
if (result === void 0) { result = []; }
// Check for typings specified in compiler options
@@ -67624,7 +72381,7 @@ var ts;
}
if (host.getDirectories) {
// Also get all @types typings installed in visible node_modules directories
- for (var _c = 0, _d = findPackageJsons(scriptPath); _c < _d.length; _c++) {
+ for (var _c = 0, _d = findPackageJsons(scriptPath, host); _c < _d.length; _c++) {
var packageJson = _d[_c];
var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types");
getCompletionEntriesFromDirectories(host, typesDir, span, result);
@@ -67644,7 +72401,7 @@ var ts;
}
}
}
- function findPackageJsons(currentDir) {
+ function findPackageJsons(currentDir, host) {
var paths = [];
var currentConfigPath;
while (true) {
@@ -67652,11 +72409,11 @@ var ts;
if (currentConfigPath) {
paths.push(currentConfigPath);
currentDir = ts.getDirectoryPath(currentConfigPath);
- var parent_13 = ts.getDirectoryPath(currentDir);
- if (currentDir === parent_13) {
+ var parent = ts.getDirectoryPath(currentDir);
+ if (currentDir === parent) {
break;
}
- currentDir = parent_13;
+ currentDir = parent;
}
else {
break;
@@ -67667,7 +72424,7 @@ var ts;
function enumerateNodeModulesVisibleToScript(host, scriptPath) {
var result = [];
if (host.readFile && host.fileExists) {
- for (var _i = 0, _a = findPackageJsons(scriptPath); _i < _a.length; _i++) {
+ for (var _i = 0, _a = findPackageJsons(scriptPath, host); _i < _a.length; _i++) {
var packageJson = _a[_i];
var contents = tryReadingPackageJson(packageJson);
if (!contents) {
@@ -67731,26 +72488,326 @@ var ts;
function normalizeAndPreserveTrailingSlash(path) {
return ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(ts.normalizePath(path)) : ts.normalizePath(path);
}
+ /**
+ * Matches a triple slash reference directive with an incomplete string literal for its path. Used
+ * to determine if the caret is currently within the string literal and capture the literal fragment
+ * for completions.
+ * For example, this matches
+ *
+ * /// <reference path="fragment
+ *
+ * but not
+ *
+ * /// <reference path="fragment"
+ */
+ var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
+ var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
+ function tryGetDirectories(host, directoryName) {
+ return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
+ }
+ function tryReadDirectory(host, path, extensions, exclude, include) {
+ return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
+ }
+ function tryReadFile(host, path) {
+ return tryIOAndConsumeErrors(host, host.readFile, path);
+ }
+ function tryFileExists(host, path) {
+ return tryIOAndConsumeErrors(host, host.fileExists, path);
+ }
+ function tryDirectoryExists(host, path) {
+ try {
+ return ts.directoryProbablyExists(path, host);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ function tryIOAndConsumeErrors(host, toApply) {
+ var args = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ args[_i - 2] = arguments[_i];
+ }
+ try {
+ return toApply && toApply.apply(host, args);
+ }
+ catch (e) { }
+ return undefined;
+ }
+ })(PathCompletions = Completions.PathCompletions || (Completions.PathCompletions = {}));
+ })(Completions = ts.Completions || (ts.Completions = {}));
+})(ts || (ts = {}));
+/// <reference path="./pathCompletions.ts" />
+/* @internal */
+var ts;
+(function (ts) {
+ var Completions;
+ (function (Completions) {
+ function getCompletionsAtPosition(host, typeChecker, log, compilerOptions, sourceFile, position) {
+ if (ts.isInReferenceComment(sourceFile, position)) {
+ return Completions.PathCompletions.getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host);
+ }
+ if (ts.isInString(sourceFile, position)) {
+ return getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log);
+ }
+ var completionData = getCompletionData(typeChecker, log, sourceFile, position);
+ if (!completionData) {
+ return undefined;
+ }
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, requestJsDocTagName = completionData.requestJsDocTagName, requestJsDocTag = completionData.requestJsDocTag;
+ if (requestJsDocTagName) {
+ // If the current position is a jsDoc tag name, only tag names should be provided for completion
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagNameCompletions() };
+ }
+ if (requestJsDocTag) {
+ // If the current position is a jsDoc tag, only tags should be provided for completion
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ }
+ var entries = [];
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log);
+ ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames, compilerOptions.target));
+ }
+ else {
+ if (!symbols || symbols.length === 0) {
+ if (sourceFile.languageVariant === 1 /* JSX */ &&
+ location.parent && location.parent.kind === 251 /* JsxClosingElement */) {
+ // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
+ // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
+ // For example:
+ // var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
+ var tagName = location.parent.parent.openingElement.tagName;
+ entries.push({
+ name: tagName.text,
+ kind: undefined,
+ kindModifiers: undefined,
+ sortText: "0",
+ });
+ }
+ else {
+ return undefined;
+ }
+ }
+ getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log);
+ }
+ // Add keywords if this is not a member completion list
+ if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ ts.addRange(entries, keywordCompletions);
+ }
+ return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
}
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
+ function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames, target) {
+ var entries = [];
+ var nameTable = ts.getNameTable(sourceFile);
+ nameTable.forEach(function (pos, name) {
+ // Skip identifiers produced only from the current location
+ if (pos === position) {
+ return;
+ }
+ if (!uniqueNames.get(name)) {
+ uniqueNames.set(name, name);
+ var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name), target, /*performCharacterChecks*/ true);
+ if (displayName) {
+ var entry = {
+ name: displayName,
+ kind: ts.ScriptElementKind.warning,
+ kindModifiers: "",
+ sortText: "1"
+ };
+ entries.push(entry);
+ }
+ }
+ });
+ return entries;
+ }
+ function createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target) {
+ // Try to get a valid display name for this symbol, if we could not find one, then ignore it.
+ // We would like to only show things that can be added after a dot, so for instance numeric properties can
+ // not be accessed with a dot (a.1 <- invalid)
+ var displayName = getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location);
+ if (!displayName) {
+ return undefined;
+ }
+ // TODO(drosen): Right now we just permit *all* semantic meanings when calling
+ // 'getSymbolKind' which is permissible given that it is backwards compatible; but
+ // really we should consider passing the meaning for the node so that we don't report
+ // that a suggestion for a value is an interface. We COULD also just do what
+ // 'getSymbolModifiers' does, which is to use the first declaration.
+ // Use a 'sortText' of 0' so that all symbol completion entries come before any other
+ // entries (like JavaScript identifier entries).
+ return {
+ name: displayName,
+ kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
+ kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
+ sortText: "0",
+ };
+ }
+ function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks, typeChecker, target, log) {
+ var start = ts.timestamp();
+ var uniqueNames = ts.createMap();
+ if (symbols) {
+ for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) {
+ var symbol = symbols_4[_i];
+ var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
+ if (entry) {
+ var id = ts.escapeIdentifier(entry.name);
+ if (!uniqueNames.get(id)) {
+ entries.push(entry);
+ uniqueNames.set(id, id);
+ }
+ }
+ }
+ }
+ log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
+ return uniqueNames;
+ }
+ function getStringLiteralCompletionEntries(sourceFile, position, typeChecker, compilerOptions, host, log) {
+ var node = ts.findPrecedingToken(position, sourceFile);
+ if (!node || node.kind !== 9 /* StringLiteral */) {
+ return undefined;
+ }
+ if (node.parent.kind === 260 /* PropertyAssignment */ &&
+ node.parent.parent.kind === 177 /* ObjectLiteralExpression */ &&
+ node.parent.name === node) {
+ // Get quoted name of properties of the object literal expression
+ // i.e. interface ConfigFiles {
+ // 'jspm:dev': string
+ // }
+ // let files: ConfigFiles = {
+ // '/*completion position*/'
+ // }
+ //
+ // function foo(c: ConfigFiles) {}
+ // foo({
+ // '/*completion position*/'
+ // });
+ return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) {
+ // Get all names of properties on the expression
+ // i.e. interface A {
+ // 'prop1': string
+ // }
+ // let a: A;
+ // a['/*completion position*/']
+ return getStringLiteralCompletionEntriesFromElementAccess(node.parent, typeChecker, compilerOptions.target, log);
+ }
+ else if (node.parent.kind === 237 /* ImportDeclaration */ || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node) || ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
+ // Get all known external module names or complete a path to a module
+ // i.e. import * as ns from "/*completion position*/";
+ // import x = require("/*completion position*/");
+ // var y = require("/*completion position*/");
+ return Completions.PathCompletions.getStringLiteralCompletionEntriesFromModuleNames(node, compilerOptions, host, typeChecker);
+ }
+ else if (isEqualityExpression(node.parent)) {
+ // Get completions from the type of the other operand
+ // i.e. switch (a) {
+ // case '/*completion position*/'
+ // }
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.left === node ? node.parent.right : node.parent.left), typeChecker);
+ }
+ else if (ts.isCaseOrDefaultClause(node.parent)) {
+ // Get completions from the type of the switch expression
+ // i.e. x === '/*completion position'
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getTypeAtLocation(node.parent.parent.parent.expression), typeChecker);
+ }
+ else {
+ var argumentInfo = ts.SignatureHelp.getImmediatelyContainingArgumentInfo(node, position, sourceFile);
+ if (argumentInfo) {
+ // Get string literal completions from specialized signatures of the target
+ // i.e. declare function f(a: 'A');
+ // f("/*completion position*/")
+ return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker);
+ }
+ // Get completion for string literal from string literal type
+ // i.e. var x: "hi" | "hello" = "/*completion position*/"
+ return getStringLiteralCompletionEntriesFromType(typeChecker.getContextualType(node), typeChecker);
+ }
+ }
+ function getStringLiteralCompletionEntriesFromPropertyAssignment(element, typeChecker, target, log) {
+ var type = typeChecker.getContextualType(element.parent);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, /*performCharacterChecks*/ false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ }
+ function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
+ var candidates = [];
+ var entries = [];
+ typeChecker.getResolvedSignature(argumentInfo.invocation, candidates);
+ for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) {
+ var candidate = candidates_3[_i];
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker);
+ }
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromElementAccess(node, typeChecker, target, log) {
+ var type = typeChecker.getTypeAtLocation(node.expression);
+ var entries = [];
+ if (type) {
+ getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, /*performCharacterChecks*/ false, typeChecker, target, log);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function getStringLiteralCompletionEntriesFromType(type, typeChecker) {
+ if (type) {
+ var entries = [];
+ addStringLiteralCompletionsFromType(type, entries, typeChecker);
+ if (entries.length) {
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries };
+ }
+ }
+ return undefined;
+ }
+ function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ if (type && type.flags & 16384 /* TypeParameter */) {
+ type = typeChecker.getApparentType(type);
+ }
+ if (!type) {
+ return;
+ }
+ if (type.flags & 65536 /* Union */) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ addStringLiteralCompletionsFromType(t, result, typeChecker);
+ }
+ }
+ else if (type.flags & 32 /* StringLiteral */) {
+ result.push({
+ name: type.text,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
+ }
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
// Compute all the completion symbols again.
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_3 = completionData.location;
+ var symbols = completionData.symbols, location_1 = completionData.location;
// Find the symbol with the matching entry name.
// We don't need to perform character checks here because we're only comparing the
// name against 'entryName' (which is known to be good), not building a new
// completion entry.
- var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_3) === entryName ? s : undefined; });
+ var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_1) === entryName ? s : undefined; });
if (symbol) {
- var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_3, location_3, 7 /* All */), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind;
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, location_1, location_1, 7 /* All */), displayParts = _a.displayParts, documentation = _a.documentation, symbolKind = _a.symbolKind, tags = _a.tags;
return {
name: entryName,
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
kind: symbolKind,
displayParts: displayParts,
- documentation: documentation
+ documentation: documentation,
+ tags: tags
};
}
}
@@ -67762,7 +72819,8 @@ var ts;
kind: ts.ScriptElementKind.keyword,
kindModifiers: ts.ScriptElementKindModifier.none,
displayParts: [ts.displayPart(entryName, ts.SymbolDisplayPartKind.keyword)],
- documentation: undefined
+ documentation: undefined,
+ tags: undefined
};
}
return undefined;
@@ -67772,19 +72830,22 @@ var ts;
// Compute all the completion symbols again.
var completionData = getCompletionData(typeChecker, log, sourceFile, position);
if (completionData) {
- var symbols = completionData.symbols, location_4 = completionData.location;
+ var symbols = completionData.symbols, location_2 = completionData.location;
// Find the symbol with the matching entry name.
// We don't need to perform character checks here because we're only comparing the
// name against 'entryName' (which is known to be good), not building a new
// completion entry.
- return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_4) === entryName ? s : undefined; });
+ return ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(typeChecker, s, compilerOptions.target, /*performCharacterChecks*/ false, location_2) === entryName ? s : undefined; });
}
return undefined;
}
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var isJsDocTagName = false;
+ // JsDoc tag-name is just the name of the JSDoc tagname (exclude "@")
+ var requestJsDocTagName = false;
+ // JsDoc tag includes both "@" and tag-name
+ var requestJsDocTag = false;
var start = ts.timestamp();
var currentToken = ts.getTokenAtPosition(sourceFile, position);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
@@ -67793,10 +72854,32 @@ var ts;
var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
if (insideComment) {
- // The current position is next to the '@' sign, when no tag name being provided yet.
- // Provide a full list of tag names
- if (ts.hasDocComment(sourceFile, position) && sourceFile.text.charCodeAt(position - 1) === 64 /* at */) {
- isJsDocTagName = true;
+ if (ts.hasDocComment(sourceFile, position)) {
+ // The current position is next to the '@' sign, when no tag name being provided yet.
+ // Provide a full list of tag names
+ if (sourceFile.text.charCodeAt(position - 1) === 64 /* at */) {
+ requestJsDocTagName = true;
+ }
+ else {
+ // When completion is requested without "@", we will have check to make sure that
+ // there are no comments prefix the request position. We will only allow "*" and space.
+ // e.g
+ // /** |c| /*
+ //
+ // /**
+ // |c|
+ // */
+ //
+ // /**
+ // * |c|
+ // */
+ //
+ // /**
+ // * |c|
+ // */
+ var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
+ requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ }
}
// Completion should work inside certain JsDoc tags. For example:
// /** @type {number | string} */
@@ -67805,12 +72888,12 @@ var ts;
var tag = ts.getJsDocTagAtPosition(sourceFile, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- isJsDocTagName = true;
+ requestJsDocTagName = true;
}
switch (tag.kind) {
- case 283 /* JSDocTypeTag */:
- case 281 /* JSDocParameterTag */:
- case 282 /* JSDocReturnTag */:
+ case 287 /* JSDocTypeTag */:
+ case 285 /* JSDocParameterTag */:
+ case 286 /* JSDocReturnTag */:
var tagWithExpression = tag;
if (tagWithExpression.typeExpression) {
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
@@ -67818,8 +72901,8 @@ var ts;
break;
}
}
- if (isJsDocTagName) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, isJsDocTagName: isJsDocTagName };
+ if (requestJsDocTagName || requestJsDocTag) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
}
if (!insideJsDocTagExpression) {
// Proceed if the current position is in jsDoc tag expression; otherwise it is a normal
@@ -67855,13 +72938,13 @@ var ts;
log("Returning an empty list because completion was requested in an invalid position.");
return undefined;
}
- var parent_14 = contextToken.parent, kind = contextToken.kind;
- if (kind === 22 /* DotToken */) {
- if (parent_14.kind === 177 /* PropertyAccessExpression */) {
+ var parent = contextToken.parent;
+ if (contextToken.kind === 22 /* DotToken */) {
+ if (parent.kind === 178 /* PropertyAccessExpression */) {
node = contextToken.parent.expression;
isRightOfDot = true;
}
- else if (parent_14.kind === 141 /* QualifiedName */) {
+ else if (parent.kind === 142 /* QualifiedName */) {
node = contextToken.parent.left;
isRightOfDot = true;
}
@@ -67872,13 +72955,34 @@ var ts;
}
}
else if (sourceFile.languageVariant === 1 /* JSX */) {
- if (kind === 26 /* LessThanToken */) {
- isRightOfOpenTag = true;
- location = contextToken;
+ // <UI.Test /* completion position */ />
+ // If the tagname is a property access expression, we will then walk up to the top most of property access expression.
+ // Then, try to get a JSX container and its associated attributes type.
+ if (parent && parent.kind === 178 /* PropertyAccessExpression */) {
+ contextToken = parent;
+ parent = parent.parent;
}
- else if (kind === 40 /* SlashToken */ && contextToken.parent.kind === 249 /* JsxClosingElement */) {
- isStartingCloseTag = true;
- location = contextToken;
+ switch (parent.kind) {
+ case 251 /* JsxClosingElement */:
+ if (contextToken.kind === 40 /* SlashToken */) {
+ isStartingCloseTag = true;
+ location = contextToken;
+ }
+ break;
+ case 193 /* BinaryExpression */:
+ if (!(parent.left.flags & 32768 /* ThisNodeHasError */)) {
+ // It has a left-hand side, so we're not in an opening JSX tag.
+ break;
+ }
+ // falls through
+ case 249 /* JsxSelfClosingElement */:
+ case 248 /* JsxElement */:
+ case 250 /* JsxOpeningElement */:
+ if (contextToken.kind === 26 /* LessThanToken */) {
+ isRightOfOpenTag = true;
+ location = contextToken;
+ }
+ break;
}
}
}
@@ -67919,13 +73023,13 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), isJsDocTagName: isJsDocTagName };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
function getTypeScriptMemberSymbols() {
// Right of dot member completion list
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
- if (node.kind === 70 /* Identifier */ || node.kind === 141 /* QualifiedName */ || node.kind === 177 /* PropertyAccessExpression */) {
+ if (node.kind === 70 /* Identifier */ || node.kind === 142 /* QualifiedName */ || node.kind === 178 /* PropertyAccessExpression */) {
var symbol = typeChecker.getSymbolAtLocation(node);
// This is an alias, follow what it aliases
if (symbol && symbol.flags & 8388608 /* Alias */) {
@@ -67981,11 +73085,11 @@ var ts;
}
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
- if ((jsxContainer.kind === 247 /* JsxSelfClosingElement */) || (jsxContainer.kind === 248 /* JsxOpeningElement */)) {
+ if ((jsxContainer.kind === 249 /* JsxSelfClosingElement */) || (jsxContainer.kind === 250 /* JsxOpeningElement */)) {
// Cursor is inside a JSX self-closing element or opening element
- attrsType = typeChecker.getJsxElementAttributesType(jsxContainer);
+ attrsType = typeChecker.getAllAttributesTypeFromJsxOpeningLikeElement(jsxContainer);
if (attrsType) {
- symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes);
+ symbols = filterJsxAttributes(typeChecker.getPropertiesOfType(attrsType), jsxContainer.attributes.properties);
isMemberCompletion = true;
isNewIdentifierLocation = false;
return true;
@@ -68029,9 +73133,9 @@ var ts;
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
if (scopeNode) {
isGlobalCompletion =
- scopeNode.kind === 261 /* SourceFile */ ||
- scopeNode.kind === 194 /* TemplateExpression */ ||
- scopeNode.kind === 252 /* JsxExpression */ ||
+ scopeNode.kind === 264 /* SourceFile */ ||
+ scopeNode.kind === 195 /* TemplateExpression */ ||
+ scopeNode.kind === 255 /* JsxExpression */ ||
ts.isStatement(scopeNode);
}
/// TODO filter meaning based on the current context
@@ -68064,11 +73168,11 @@ var ts;
return true;
}
if (contextToken.kind === 28 /* GreaterThanToken */ && contextToken.parent) {
- if (contextToken.parent.kind === 248 /* JsxOpeningElement */) {
+ if (contextToken.parent.kind === 250 /* JsxOpeningElement */) {
return true;
}
- if (contextToken.parent.kind === 249 /* JsxClosingElement */ || contextToken.parent.kind === 247 /* JsxSelfClosingElement */) {
- return contextToken.parent.parent && contextToken.parent.parent.kind === 246 /* JsxElement */;
+ if (contextToken.parent.kind === 251 /* JsxClosingElement */ || contextToken.parent.kind === 249 /* JsxSelfClosingElement */) {
+ return contextToken.parent.parent && contextToken.parent.parent.kind === 248 /* JsxElement */;
}
}
return false;
@@ -68078,40 +73182,40 @@ var ts;
var containingNodeKind = previousToken.parent.kind;
switch (previousToken.kind) {
case 25 /* CommaToken */:
- return containingNodeKind === 179 /* CallExpression */ // func( a, |
- || containingNodeKind === 150 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
- || containingNodeKind === 180 /* NewExpression */ // new C(a, |
- || containingNodeKind === 175 /* ArrayLiteralExpression */ // [a, |
- || containingNodeKind === 192 /* BinaryExpression */ // const x = (a, |
- || containingNodeKind === 158 /* FunctionType */; // var x: (s: string, list|
+ return containingNodeKind === 180 /* CallExpression */ // func( a, |
+ || containingNodeKind === 151 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
+ || containingNodeKind === 181 /* NewExpression */ // new C(a, |
+ || containingNodeKind === 176 /* ArrayLiteralExpression */ // [a, |
+ || containingNodeKind === 193 /* BinaryExpression */ // const x = (a, |
+ || containingNodeKind === 159 /* FunctionType */; // var x: (s: string, list|
case 18 /* OpenParenToken */:
- return containingNodeKind === 179 /* CallExpression */ // func( |
- || containingNodeKind === 150 /* Constructor */ // constructor( |
- || containingNodeKind === 180 /* NewExpression */ // new C(a|
- || containingNodeKind === 183 /* ParenthesizedExpression */ // const x = (a|
- || containingNodeKind === 166 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
+ return containingNodeKind === 180 /* CallExpression */ // func( |
+ || containingNodeKind === 151 /* Constructor */ // constructor( |
+ || containingNodeKind === 181 /* NewExpression */ // new C(a|
+ || containingNodeKind === 184 /* ParenthesizedExpression */ // const x = (a|
+ || containingNodeKind === 167 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
case 20 /* OpenBracketToken */:
- return containingNodeKind === 175 /* ArrayLiteralExpression */ // [ |
- || containingNodeKind === 155 /* IndexSignature */ // [ | : string ]
- || containingNodeKind === 142 /* ComputedPropertyName */; // [ | /* this can become an index signature */
+ return containingNodeKind === 176 /* ArrayLiteralExpression */ // [ |
+ || containingNodeKind === 156 /* IndexSignature */ // [ | : string ]
+ || containingNodeKind === 143 /* ComputedPropertyName */; // [ | /* this can become an index signature */
case 127 /* ModuleKeyword */: // module |
case 128 /* NamespaceKeyword */:
return true;
case 22 /* DotToken */:
- return containingNodeKind === 230 /* ModuleDeclaration */; // module A.|
+ return containingNodeKind === 232 /* ModuleDeclaration */; // module A.|
case 16 /* OpenBraceToken */:
- return containingNodeKind === 226 /* ClassDeclaration */; // class A{ |
+ return containingNodeKind === 228 /* ClassDeclaration */; // class A{ |
case 57 /* EqualsToken */:
- return containingNodeKind === 223 /* VariableDeclaration */ // const x = a|
- || containingNodeKind === 192 /* BinaryExpression */; // x = a|
+ return containingNodeKind === 225 /* VariableDeclaration */ // const x = a|
+ || containingNodeKind === 193 /* BinaryExpression */; // x = a|
case 13 /* TemplateHead */:
- return containingNodeKind === 194 /* TemplateExpression */; // `aa ${|
+ return containingNodeKind === 195 /* TemplateExpression */; // `aa ${|
case 14 /* TemplateMiddle */:
- return containingNodeKind === 202 /* TemplateSpan */; // `aa ${10} dd ${|
+ return containingNodeKind === 204 /* TemplateSpan */; // `aa ${10} dd ${|
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
- return containingNodeKind === 147 /* PropertyDeclaration */; // class A{ public |
+ return containingNodeKind === 148 /* PropertyDeclaration */; // class A{ public |
}
// Previous token may have been a keyword that was converted to an identifier.
switch (previousToken.getText()) {
@@ -68154,7 +73258,7 @@ var ts;
isMemberCompletion = true;
var typeForObject;
var existingMembers;
- if (objectLikeContainer.kind === 176 /* ObjectLiteralExpression */) {
+ if (objectLikeContainer.kind === 177 /* ObjectLiteralExpression */) {
// We are completing on contextual types, but may also include properties
// other than those within the declared type.
isNewIdentifierLocation = true;
@@ -68164,7 +73268,7 @@ var ts;
typeForObject = typeForObject && typeForObject.getNonNullableType();
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 172 /* ObjectBindingPattern */) {
+ else if (objectLikeContainer.kind === 173 /* ObjectBindingPattern */) {
// We are *only* completing on properties from the type being destructured.
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
@@ -68175,11 +73279,11 @@ var ts;
// Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed -
// type of parameter will flow in from the contextual type of the function
var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 144 /* Parameter */) {
+ if (!canGetType && rootDeclaration.kind === 145 /* Parameter */) {
if (ts.isExpression(rootDeclaration.parent)) {
canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- else if (rootDeclaration.parent.kind === 149 /* MethodDeclaration */ || rootDeclaration.parent.kind === 152 /* SetAccessor */) {
+ else if (rootDeclaration.parent.kind === 150 /* MethodDeclaration */ || rootDeclaration.parent.kind === 153 /* SetAccessor */) {
canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
@@ -68221,9 +73325,9 @@ var ts;
* @returns true if 'symbols' was successfully populated; false otherwise.
*/
function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) {
- var declarationKind = namedImportsOrExports.kind === 238 /* NamedImports */ ?
- 235 /* ImportDeclaration */ :
- 241 /* ExportDeclaration */;
+ var declarationKind = namedImportsOrExports.kind === 240 /* NamedImports */ ?
+ 237 /* ImportDeclaration */ :
+ 243 /* ExportDeclaration */;
var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind);
var moduleSpecifier = importOrExportDeclaration.moduleSpecifier;
if (!moduleSpecifier) {
@@ -68231,12 +73335,13 @@ var ts;
}
isMemberCompletion = true;
isNewIdentifierLocation = false;
- var exports;
- var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importOrExportDeclaration.moduleSpecifier);
- if (moduleSpecifierSymbol) {
- exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol);
+ var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);
+ if (!moduleSpecifierSymbol) {
+ symbols = ts.emptyArray;
+ return true;
}
- symbols = exports ? filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements) : ts.emptyArray;
+ var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
+ symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
/**
@@ -68248,9 +73353,9 @@ var ts;
switch (contextToken.kind) {
case 16 /* OpenBraceToken */: // const x = { |
case 25 /* CommaToken */:
- var parent_15 = contextToken.parent;
- if (parent_15 && (parent_15.kind === 176 /* ObjectLiteralExpression */ || parent_15.kind === 172 /* ObjectBindingPattern */)) {
- return parent_15;
+ var parent = contextToken.parent;
+ if (parent && (parent.kind === 177 /* ObjectLiteralExpression */ || parent.kind === 173 /* ObjectBindingPattern */)) {
+ return parent;
}
break;
}
@@ -68267,8 +73372,8 @@ var ts;
case 16 /* OpenBraceToken */: // import { |
case 25 /* CommaToken */:
switch (contextToken.parent.kind) {
- case 238 /* NamedImports */:
- case 242 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
return contextToken.parent;
}
}
@@ -68277,37 +73382,55 @@ var ts;
}
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
- var parent_16 = contextToken.parent;
+ var parent = contextToken.parent;
switch (contextToken.kind) {
case 27 /* LessThanSlashToken */:
case 40 /* SlashToken */:
case 70 /* Identifier */:
- case 250 /* JsxAttribute */:
- case 251 /* JsxSpreadAttribute */:
- if (parent_16 && (parent_16.kind === 247 /* JsxSelfClosingElement */ || parent_16.kind === 248 /* JsxOpeningElement */)) {
- return parent_16;
+ case 178 /* PropertyAccessExpression */:
+ case 253 /* JsxAttributes */:
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
+ if (parent && (parent.kind === 249 /* JsxSelfClosingElement */ || parent.kind === 250 /* JsxOpeningElement */)) {
+ return parent;
}
- else if (parent_16.kind === 250 /* JsxAttribute */) {
- return parent_16.parent;
+ else if (parent.kind === 252 /* JsxAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
// The context token is the closing } or " of an attribute, which means
// its parent is a JsxExpression, whose parent is a JsxAttribute,
// whose parent is a JsxOpeningLikeElement
case 9 /* StringLiteral */:
- if (parent_16 && ((parent_16.kind === 250 /* JsxAttribute */) || (parent_16.kind === 251 /* JsxSpreadAttribute */))) {
- return parent_16.parent;
+ if (parent && ((parent.kind === 252 /* JsxAttribute */) || (parent.kind === 254 /* JsxSpreadAttribute */))) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
case 17 /* CloseBraceToken */:
- if (parent_16 &&
- parent_16.kind === 252 /* JsxExpression */ &&
- parent_16.parent &&
- (parent_16.parent.kind === 250 /* JsxAttribute */)) {
- return parent_16.parent.parent;
+ if (parent &&
+ parent.kind === 255 /* JsxExpression */ &&
+ parent.parent && parent.parent.kind === 252 /* JsxAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ // each JsxAttribute can have initializer as JsxExpression
+ return parent.parent.parent.parent;
}
- if (parent_16 && parent_16.kind === 251 /* JsxSpreadAttribute */) {
- return parent_16.parent;
+ if (parent && parent.kind === 254 /* JsxSpreadAttribute */) {
+ // Currently we parse JsxOpeningLikeElement as:
+ // JsxOpeningLikeElement
+ // attributes: JsxAttributes
+ // properties: NodeArray<JsxAttributeLike>
+ return parent.parent.parent;
}
break;
}
@@ -68315,20 +73438,17 @@ var ts;
return undefined;
}
function isFunction(kind) {
+ if (!ts.isFunctionLikeKind(kind)) {
+ return false;
+ }
switch (kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 155 /* IndexSignature */:
+ case 151 /* Constructor */:
+ case 160 /* ConstructorType */:
+ case 159 /* FunctionType */:
+ return false;
+ default:
return true;
}
- return false;
}
/**
* @returns true if we are certain that the currently edited location must define a new location; false otherwise.
@@ -68337,66 +73457,66 @@ var ts;
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
case 25 /* CommaToken */:
- return containingNodeKind === 223 /* VariableDeclaration */ ||
- containingNodeKind === 224 /* VariableDeclarationList */ ||
- containingNodeKind === 205 /* VariableStatement */ ||
- containingNodeKind === 229 /* EnumDeclaration */ ||
+ return containingNodeKind === 225 /* VariableDeclaration */ ||
+ containingNodeKind === 226 /* VariableDeclarationList */ ||
+ containingNodeKind === 207 /* VariableStatement */ ||
+ containingNodeKind === 231 /* EnumDeclaration */ ||
isFunction(containingNodeKind) ||
- containingNodeKind === 226 /* ClassDeclaration */ ||
- containingNodeKind === 197 /* ClassExpression */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 173 /* ArrayBindingPattern */ ||
- containingNodeKind === 228 /* TypeAliasDeclaration */; // type Map, K, |
+ containingNodeKind === 228 /* ClassDeclaration */ ||
+ containingNodeKind === 198 /* ClassExpression */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 174 /* ArrayBindingPattern */ ||
+ containingNodeKind === 230 /* TypeAliasDeclaration */; // type Map, K, |
case 22 /* DotToken */:
- return containingNodeKind === 173 /* ArrayBindingPattern */; // var [.|
+ return containingNodeKind === 174 /* ArrayBindingPattern */; // var [.|
case 55 /* ColonToken */:
- return containingNodeKind === 174 /* BindingElement */; // var {x :html|
+ return containingNodeKind === 175 /* BindingElement */; // var {x :html|
case 20 /* OpenBracketToken */:
- return containingNodeKind === 173 /* ArrayBindingPattern */; // var [x|
+ return containingNodeKind === 174 /* ArrayBindingPattern */; // var [x|
case 18 /* OpenParenToken */:
- return containingNodeKind === 256 /* CatchClause */ ||
+ return containingNodeKind === 259 /* CatchClause */ ||
isFunction(containingNodeKind);
case 16 /* OpenBraceToken */:
- return containingNodeKind === 229 /* EnumDeclaration */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 161 /* TypeLiteral */; // const x : { |
+ return containingNodeKind === 231 /* EnumDeclaration */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 162 /* TypeLiteral */; // const x : { |
case 24 /* SemicolonToken */:
- return containingNodeKind === 146 /* PropertySignature */ &&
+ return containingNodeKind === 147 /* PropertySignature */ &&
contextToken.parent && contextToken.parent.parent &&
- (contextToken.parent.parent.kind === 227 /* InterfaceDeclaration */ ||
- contextToken.parent.parent.kind === 161 /* TypeLiteral */); // const x : { a; |
+ (contextToken.parent.parent.kind === 229 /* InterfaceDeclaration */ ||
+ contextToken.parent.parent.kind === 162 /* TypeLiteral */); // const x : { a; |
case 26 /* LessThanToken */:
- return containingNodeKind === 226 /* ClassDeclaration */ ||
- containingNodeKind === 197 /* ClassExpression */ ||
- containingNodeKind === 227 /* InterfaceDeclaration */ ||
- containingNodeKind === 228 /* TypeAliasDeclaration */ ||
+ return containingNodeKind === 228 /* ClassDeclaration */ ||
+ containingNodeKind === 198 /* ClassExpression */ ||
+ containingNodeKind === 229 /* InterfaceDeclaration */ ||
+ containingNodeKind === 230 /* TypeAliasDeclaration */ ||
isFunction(containingNodeKind);
case 114 /* StaticKeyword */:
- return containingNodeKind === 147 /* PropertyDeclaration */;
+ return containingNodeKind === 148 /* PropertyDeclaration */;
case 23 /* DotDotDotToken */:
- return containingNodeKind === 144 /* Parameter */ ||
+ return containingNodeKind === 145 /* Parameter */ ||
(contextToken.parent && contextToken.parent.parent &&
- contextToken.parent.parent.kind === 173 /* ArrayBindingPattern */); // var [...z|
+ contextToken.parent.parent.kind === 174 /* ArrayBindingPattern */); // var [...z|
case 113 /* PublicKeyword */:
case 111 /* PrivateKeyword */:
case 112 /* ProtectedKeyword */:
- return containingNodeKind === 144 /* Parameter */;
+ return containingNodeKind === 145 /* Parameter */;
case 117 /* AsKeyword */:
- return containingNodeKind === 239 /* ImportSpecifier */ ||
- containingNodeKind === 243 /* ExportSpecifier */ ||
- containingNodeKind === 237 /* NamespaceImport */;
+ return containingNodeKind === 241 /* ImportSpecifier */ ||
+ containingNodeKind === 245 /* ExportSpecifier */ ||
+ containingNodeKind === 239 /* NamespaceImport */;
case 74 /* ClassKeyword */:
case 82 /* EnumKeyword */:
case 108 /* InterfaceKeyword */:
case 88 /* FunctionKeyword */:
case 103 /* VarKeyword */:
case 124 /* GetKeyword */:
- case 133 /* SetKeyword */:
+ case 134 /* SetKeyword */:
case 90 /* ImportKeyword */:
case 109 /* LetKeyword */:
case 75 /* ConstKeyword */:
case 115 /* YieldKeyword */:
- case 136 /* TypeKeyword */:
+ case 137 /* TypeKeyword */:
return true;
}
// Previous token may have been a keyword that was converted to an identifier.
@@ -68444,13 +73564,13 @@ var ts;
if (element.getStart() <= position && position <= element.getEnd()) {
continue;
}
- var name_44 = element.propertyName || element.name;
- existingImportsOrExports[name_44.text] = true;
+ var name = element.propertyName || element.name;
+ existingImportsOrExports.set(name.text, true);
}
- if (!ts.someProperties(existingImportsOrExports)) {
+ if (existingImportsOrExports.size === 0) {
return ts.filter(exportsOfModule, function (e) { return e.name !== "default"; });
}
- return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports[e.name]; });
+ return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports.get(e.name); });
}
/**
* Filters out completion suggestions for named imports or exports.
@@ -68466,12 +73586,12 @@ var ts;
for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) {
var m = existingMembers_1[_i];
// Ignore omitted expressions for missing members
- if (m.kind !== 257 /* PropertyAssignment */ &&
- m.kind !== 258 /* ShorthandPropertyAssignment */ &&
- m.kind !== 174 /* BindingElement */ &&
- m.kind !== 149 /* MethodDeclaration */ &&
- m.kind !== 151 /* GetAccessor */ &&
- m.kind !== 152 /* SetAccessor */) {
+ if (m.kind !== 260 /* PropertyAssignment */ &&
+ m.kind !== 261 /* ShorthandPropertyAssignment */ &&
+ m.kind !== 175 /* BindingElement */ &&
+ m.kind !== 150 /* MethodDeclaration */ &&
+ m.kind !== 152 /* GetAccessor */ &&
+ m.kind !== 153 /* SetAccessor */) {
continue;
}
// If this is the current item we are editing right now, do not filter it out
@@ -68479,7 +73599,7 @@ var ts;
continue;
}
var existingName = void 0;
- if (m.kind === 174 /* BindingElement */ && m.propertyName) {
+ if (m.kind === 175 /* BindingElement */ && m.propertyName) {
// include only identifiers in completion list
if (m.propertyName.kind === 70 /* Identifier */) {
existingName = m.propertyName.text;
@@ -68491,9 +73611,9 @@ var ts;
// things like '__proto__' are not filtered out.
existingName = m.name.text;
}
- existingMemberNames[existingName] = true;
+ existingMemberNames.set(existingName, true);
}
- return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames[m.name]; });
+ return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
/**
* Filters out completion suggestions from 'symbols' according to existing JSX attributes.
@@ -68509,11 +73629,11 @@ var ts;
if (attr.getStart() <= position && position <= attr.getEnd()) {
continue;
}
- if (attr.kind === 250 /* JsxAttribute */) {
- seenNames[attr.name.text] = true;
+ if (attr.kind === 252 /* JsxAttribute */) {
+ seenNames.set(attr.name.text, true);
}
}
- return ts.filter(symbols, function (a) { return !seenNames[a.name]; });
+ return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
}
/**
@@ -68559,7 +73679,7 @@ var ts;
}
// A cache of completion entries for keywords, these do not change between sessions
var keywordCompletions = [];
- for (var i = 71 /* FirstKeyword */; i <= 140 /* LastKeyword */; i++) {
+ for (var i = 71 /* FirstKeyword */; i <= 141 /* LastKeyword */; i++) {
keywordCompletions.push({
name: ts.tokenToString(i),
kind: ts.ScriptElementKind.keyword,
@@ -68567,49 +73687,14 @@ var ts;
sortText: "0"
});
}
- /**
- * Matches a triple slash reference directive with an incomplete string literal for its path. Used
- * to determine if the caret is currently within the string literal and capture the literal fragment
- * for completions.
- * For example, this matches
- *
- * /// <reference path="fragment
- *
- * but not
- *
- * /// <reference path="fragment"
- */
- var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
- var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
- function tryGetDirectories(host, directoryName) {
- return tryIOAndConsumeErrors(host, host.getDirectories, directoryName);
- }
- function tryReadDirectory(host, path, extensions, exclude, include) {
- return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include);
- }
- function tryReadFile(host, path) {
- return tryIOAndConsumeErrors(host, host.readFile, path);
- }
- function tryFileExists(host, path) {
- return tryIOAndConsumeErrors(host, host.fileExists, path);
+ function isEqualityExpression(node) {
+ return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
- function tryDirectoryExists(host, path) {
- try {
- return ts.directoryProbablyExists(path, host);
- }
- catch (e) { }
- return undefined;
- }
- function tryIOAndConsumeErrors(host, toApply) {
- var args = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- args[_i - 2] = arguments[_i];
- }
- try {
- return toApply && toApply.apply(host, args);
- }
- catch (e) { }
- return undefined;
+ function isEqualityOperatorKind(kind) {
+ return kind === 31 /* EqualsEqualsToken */ ||
+ kind === 32 /* ExclamationEqualsToken */ ||
+ kind === 33 /* EqualsEqualsEqualsToken */ ||
+ kind === 34 /* ExclamationEqualsEqualsToken */;
}
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
@@ -68620,534 +73705,513 @@ var ts;
(function (DocumentHighlights) {
function getDocumentHighlights(typeChecker, cancellationToken, sourceFile, position, sourceFilesToSearch) {
var node = ts.getTouchingWord(sourceFile, position);
+ return node && (getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile));
+ }
+ DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
+ function getHighlightSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var end = node.getEnd();
+ return {
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(start, end),
+ kind: ts.HighlightSpanKind.none
+ };
+ }
+ function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ return referenceEntries && convertReferencedSymbols(referenceEntries);
+ }
+ function convertReferencedSymbols(referenceEntries) {
+ var fileNameToDocumentHighlights = ts.createMap();
+ for (var _i = 0, referenceEntries_1 = referenceEntries; _i < referenceEntries_1.length; _i++) {
+ var entry = referenceEntries_1[_i];
+ var _a = ts.FindAllReferences.toHighlightSpan(entry), fileName = _a.fileName, span_12 = _a.span;
+ var highlightSpans = fileNameToDocumentHighlights.get(fileName);
+ if (!highlightSpans) {
+ fileNameToDocumentHighlights.set(fileName, highlightSpans = []);
+ }
+ highlightSpans.push(span_12);
+ }
+ return ts.arrayFrom(fileNameToDocumentHighlights.entries(), function (_a) {
+ var fileName = _a[0], highlightSpans = _a[1];
+ return ({ fileName: fileName, highlightSpans: highlightSpans });
+ });
+ }
+ function getSyntacticDocumentHighlights(node, sourceFile) {
+ var highlightSpans = getHighlightSpans(node, sourceFile);
+ if (!highlightSpans || highlightSpans.length === 0) {
+ return undefined;
+ }
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ // returns true if 'node' is defined and has a matching 'kind'.
+ function hasKind(node, kind) {
+ return node !== undefined && node.kind === kind;
+ }
+ // Null-propagating 'parent' function.
+ function parent(node) {
+ return node && node.parent;
+ }
+ function getHighlightSpans(node, sourceFile) {
if (!node) {
return undefined;
}
- return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node);
- function getHighlightSpanForNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- return {
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- kind: ts.HighlightSpanKind.none
- };
+ switch (node.kind) {
+ case 89 /* IfKeyword */:
+ case 81 /* ElseKeyword */:
+ if (hasKind(node.parent, 210 /* IfStatement */)) {
+ return getIfElseOccurrences(node.parent, sourceFile);
+ }
+ break;
+ case 95 /* ReturnKeyword */:
+ if (hasKind(node.parent, 218 /* ReturnStatement */)) {
+ return highlightSpans(getReturnOccurrences(node.parent));
+ }
+ break;
+ case 99 /* ThrowKeyword */:
+ if (hasKind(node.parent, 222 /* ThrowStatement */)) {
+ return highlightSpans(getThrowOccurrences(node.parent));
+ }
+ break;
+ case 101 /* TryKeyword */:
+ case 73 /* CatchKeyword */:
+ case 86 /* FinallyKeyword */:
+ var tryStatement = node.kind === 73 /* CatchKeyword */ ? parent(parent(node)) : parent(node);
+ if (hasKind(tryStatement, 223 /* TryStatement */)) {
+ return highlightSpans(getTryCatchFinallyOccurrences(tryStatement, sourceFile));
+ }
+ break;
+ case 97 /* SwitchKeyword */:
+ if (hasKind(node.parent, 220 /* SwitchStatement */)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent));
+ }
+ break;
+ case 72 /* CaseKeyword */:
+ case 78 /* DefaultKeyword */:
+ if (hasKind(parent(parent(parent(node))), 220 /* SwitchStatement */)) {
+ return highlightSpans(getSwitchCaseDefaultOccurrences(node.parent.parent.parent));
+ }
+ break;
+ case 71 /* BreakKeyword */:
+ case 76 /* ContinueKeyword */:
+ if (hasKind(node.parent, 217 /* BreakStatement */) || hasKind(node.parent, 216 /* ContinueStatement */)) {
+ return highlightSpans(getBreakOrContinueStatementOccurrences(node.parent));
+ }
+ break;
+ case 87 /* ForKeyword */:
+ if (hasKind(node.parent, 213 /* ForStatement */) ||
+ hasKind(node.parent, 214 /* ForInStatement */) ||
+ hasKind(node.parent, 215 /* ForOfStatement */)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 105 /* WhileKeyword */:
+ case 80 /* DoKeyword */:
+ if (hasKind(node.parent, 212 /* WhileStatement */) || hasKind(node.parent, 211 /* DoStatement */)) {
+ return highlightSpans(getLoopBreakContinueOccurrences(node.parent));
+ }
+ break;
+ case 122 /* ConstructorKeyword */:
+ if (hasKind(node.parent, 151 /* Constructor */)) {
+ return highlightSpans(getConstructorOccurrences(node.parent));
+ }
+ break;
+ case 124 /* GetKeyword */:
+ case 134 /* SetKeyword */:
+ if (hasKind(node.parent, 152 /* GetAccessor */) || hasKind(node.parent, 153 /* SetAccessor */)) {
+ return highlightSpans(getGetAndSetOccurrences(node.parent));
+ }
+ break;
+ default:
+ if (ts.isModifierKind(node.kind) && node.parent &&
+ (ts.isDeclaration(node.parent) || node.parent.kind === 207 /* VariableStatement */)) {
+ return highlightSpans(getModifierOccurrences(node.kind, node.parent));
+ }
}
- function getSemanticDocumentHighlights(node) {
- if (node.kind === 70 /* Identifier */ ||
- node.kind === 98 /* ThisKeyword */ ||
- node.kind === 167 /* ThisType */ ||
- node.kind === 96 /* SuperKeyword */ ||
- node.kind === 9 /* StringLiteral */ ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFilesToSearch, /*findInStrings*/ false, /*findInComments*/ false, /*implementations*/ false);
- return convertReferencedSymbols(referencedSymbols);
+ function highlightSpans(nodes) {
+ return nodes && nodes.map(function (node) { return getHighlightSpanForNode(node, sourceFile); });
+ }
+ }
+ /**
+ * Aggregates all throw-statements within this node *without* crossing
+ * into function boundaries and try-blocks with catch-clauses.
+ */
+ function aggregateOwnedThrowStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 222 /* ThrowStatement */) {
+ statementAccumulator.push(node);
}
- return undefined;
- function convertReferencedSymbols(referencedSymbols) {
- if (!referencedSymbols) {
- return undefined;
+ else if (node.kind === 223 /* TryStatement */) {
+ var tryStatement = node;
+ if (tryStatement.catchClause) {
+ aggregate(tryStatement.catchClause);
}
- var fileNameToDocumentHighlights = ts.createMap();
- var result = [];
- for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
- var referencedSymbol = referencedSymbols_1[_i];
- for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
- var referenceEntry = _b[_a];
- var fileName = referenceEntry.fileName;
- var documentHighlights = fileNameToDocumentHighlights[fileName];
- if (!documentHighlights) {
- documentHighlights = { fileName: fileName, highlightSpans: [] };
- fileNameToDocumentHighlights[fileName] = documentHighlights;
- result.push(documentHighlights);
- }
- documentHighlights.highlightSpans.push({
- textSpan: referenceEntry.textSpan,
- kind: referenceEntry.isWriteAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference
- });
- }
+ else {
+ // Exceptions thrown within a try block lacking a catch clause
+ // are "owned" in the current context.
+ aggregate(tryStatement.tryBlock);
+ }
+ if (tryStatement.finallyBlock) {
+ aggregate(tryStatement.finallyBlock);
}
- return result;
+ }
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
}
- function getSyntacticDocumentHighlights(node) {
- var fileName = sourceFile.fileName;
- var highlightSpans = getHighlightSpans(node);
- if (!highlightSpans || highlightSpans.length === 0) {
- return undefined;
+ }
+ /**
+ * For lack of a better name, this function takes a throw statement and returns the
+ * nearest ancestor that is a try-block (whose try statement has a catch clause),
+ * function-block, or source file.
+ */
+ function getThrowStatementOwner(throwStatement) {
+ var child = throwStatement;
+ while (child.parent) {
+ var parent_2 = child.parent;
+ if (ts.isFunctionBlock(parent_2) || parent_2.kind === 264 /* SourceFile */) {
+ return parent_2;
}
- return [{ fileName: fileName, highlightSpans: highlightSpans }];
- // returns true if 'node' is defined and has a matching 'kind'.
- function hasKind(node, kind) {
- return node !== undefined && node.kind === kind;
+ // A throw-statement is only owned by a try-statement if the try-statement has
+ // a catch clause, and if the throw-statement occurs within the try block.
+ if (parent_2.kind === 223 /* TryStatement */) {
+ var tryStatement = parent_2;
+ if (tryStatement.tryBlock === child && tryStatement.catchClause) {
+ return child;
+ }
}
- // Null-propagating 'parent' function.
- function parent(node) {
- return node && node.parent;
+ child = parent_2;
+ }
+ return undefined;
+ }
+ function aggregateAllBreakAndContinueStatements(node) {
+ var statementAccumulator = [];
+ aggregate(node);
+ return statementAccumulator;
+ function aggregate(node) {
+ if (node.kind === 217 /* BreakStatement */ || node.kind === 216 /* ContinueStatement */) {
+ statementAccumulator.push(node);
}
- function getHighlightSpans(node) {
- if (node) {
- switch (node.kind) {
- case 89 /* IfKeyword */:
- case 81 /* ElseKeyword */:
- if (hasKind(node.parent, 208 /* IfStatement */)) {
- return getIfElseOccurrences(node.parent);
- }
- break;
- case 95 /* ReturnKeyword */:
- if (hasKind(node.parent, 216 /* ReturnStatement */)) {
- return getReturnOccurrences(node.parent);
- }
- break;
- case 99 /* ThrowKeyword */:
- if (hasKind(node.parent, 220 /* ThrowStatement */)) {
- return getThrowOccurrences(node.parent);
- }
- break;
- case 73 /* CatchKeyword */:
- if (hasKind(parent(parent(node)), 221 /* TryStatement */)) {
- return getTryCatchFinallyOccurrences(node.parent.parent);
- }
- break;
- case 101 /* TryKeyword */:
- case 86 /* FinallyKeyword */:
- if (hasKind(parent(node), 221 /* TryStatement */)) {
- return getTryCatchFinallyOccurrences(node.parent);
- }
- break;
- case 97 /* SwitchKeyword */:
- if (hasKind(node.parent, 218 /* SwitchStatement */)) {
- return getSwitchCaseDefaultOccurrences(node.parent);
- }
- break;
- case 72 /* CaseKeyword */:
- case 78 /* DefaultKeyword */:
- if (hasKind(parent(parent(parent(node))), 218 /* SwitchStatement */)) {
- return getSwitchCaseDefaultOccurrences(node.parent.parent.parent);
- }
- break;
- case 71 /* BreakKeyword */:
- case 76 /* ContinueKeyword */:
- if (hasKind(node.parent, 215 /* BreakStatement */) || hasKind(node.parent, 214 /* ContinueStatement */)) {
- return getBreakOrContinueStatementOccurrences(node.parent);
- }
- break;
- case 87 /* ForKeyword */:
- if (hasKind(node.parent, 211 /* ForStatement */) ||
- hasKind(node.parent, 212 /* ForInStatement */) ||
- hasKind(node.parent, 213 /* ForOfStatement */)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 105 /* WhileKeyword */:
- case 80 /* DoKeyword */:
- if (hasKind(node.parent, 210 /* WhileStatement */) || hasKind(node.parent, 209 /* DoStatement */)) {
- return getLoopBreakContinueOccurrences(node.parent);
- }
- break;
- case 122 /* ConstructorKeyword */:
- if (hasKind(node.parent, 150 /* Constructor */)) {
- return getConstructorOccurrences(node.parent);
- }
- break;
- case 124 /* GetKeyword */:
- case 133 /* SetKeyword */:
- if (hasKind(node.parent, 151 /* GetAccessor */) || hasKind(node.parent, 152 /* SetAccessor */)) {
- return getGetAndSetOccurrences(node.parent);
- }
- break;
- default:
- if (ts.isModifierKind(node.kind) && node.parent &&
- (ts.isDeclaration(node.parent) || node.parent.kind === 205 /* VariableStatement */)) {
- return getModifierOccurrences(node.kind, node.parent);
- }
- }
- }
- return undefined;
+ else if (!ts.isFunctionLike(node)) {
+ ts.forEachChild(node, aggregate);
}
- /**
- * Aggregates all throw-statements within this node *without* crossing
- * into function boundaries and try-blocks with catch-clauses.
- */
- function aggregateOwnedThrowStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 220 /* ThrowStatement */) {
- statementAccumulator.push(node);
- }
- else if (node.kind === 221 /* TryStatement */) {
- var tryStatement = node;
- if (tryStatement.catchClause) {
- aggregate(tryStatement.catchClause);
- }
- else {
- // Exceptions thrown within a try block lacking a catch clause
- // are "owned" in the current context.
- aggregate(tryStatement.tryBlock);
- }
- if (tryStatement.finallyBlock) {
- aggregate(tryStatement.finallyBlock);
- }
+ }
+ }
+ function ownsBreakOrContinueStatement(owner, statement) {
+ var actualOwner = getBreakOrContinueOwner(statement);
+ return actualOwner && actualOwner === owner;
+ }
+ function getBreakOrContinueOwner(statement) {
+ for (var node = statement.parent; node; node = node.parent) {
+ switch (node.kind) {
+ case 220 /* SwitchStatement */:
+ if (statement.kind === 216 /* ContinueStatement */) {
+ continue;
}
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
+ // falls through
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
+ if (!statement.label || isLabeledBy(node, statement.label.text)) {
+ return node;
}
- }
- }
- /**
- * For lack of a better name, this function takes a throw statement and returns the
- * nearest ancestor that is a try-block (whose try statement has a catch clause),
- * function-block, or source file.
- */
- function getThrowStatementOwner(throwStatement) {
- var child = throwStatement;
- while (child.parent) {
- var parent_17 = child.parent;
- if (ts.isFunctionBlock(parent_17) || parent_17.kind === 261 /* SourceFile */) {
- return parent_17;
- }
- // A throw-statement is only owned by a try-statement if the try-statement has
- // a catch clause, and if the throw-statement occurs within the try block.
- if (parent_17.kind === 221 /* TryStatement */) {
- var tryStatement = parent_17;
- if (tryStatement.tryBlock === child && tryStatement.catchClause) {
- return child;
- }
+ break;
+ default:
+ // Don't cross function boundaries.
+ if (ts.isFunctionLike(node)) {
+ return undefined;
}
- child = parent_17;
- }
+ break;
+ }
+ }
+ return undefined;
+ }
+ function getModifierOccurrences(modifier, declaration) {
+ var container = declaration.parent;
+ // Make sure we only highlight the keyword when it makes sense to do so.
+ if (ts.isAccessibilityModifier(modifier)) {
+ if (!(container.kind === 228 /* ClassDeclaration */ ||
+ container.kind === 198 /* ClassExpression */ ||
+ (declaration.kind === 145 /* Parameter */ && hasKind(container, 151 /* Constructor */)))) {
return undefined;
}
- function aggregateAllBreakAndContinueStatements(node) {
- var statementAccumulator = [];
- aggregate(node);
- return statementAccumulator;
- function aggregate(node) {
- if (node.kind === 215 /* BreakStatement */ || node.kind === 214 /* ContinueStatement */) {
- statementAccumulator.push(node);
- }
- else if (!ts.isFunctionLike(node)) {
- ts.forEachChild(node, aggregate);
- }
- }
+ }
+ else if (modifier === 114 /* StaticKeyword */) {
+ if (!(container.kind === 228 /* ClassDeclaration */ || container.kind === 198 /* ClassExpression */)) {
+ return undefined;
}
- function ownsBreakOrContinueStatement(owner, statement) {
- var actualOwner = getBreakOrContinueOwner(statement);
- return actualOwner && actualOwner === owner;
+ }
+ else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) {
+ if (!(container.kind === 233 /* ModuleBlock */ || container.kind === 264 /* SourceFile */)) {
+ return undefined;
}
- function getBreakOrContinueOwner(statement) {
- for (var node_1 = statement.parent; node_1; node_1 = node_1.parent) {
- switch (node_1.kind) {
- case 218 /* SwitchStatement */:
- if (statement.kind === 214 /* ContinueStatement */) {
- continue;
- }
- // Fall through.
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
- if (!statement.label || isLabeledBy(node_1, statement.label.text)) {
- return node_1;
- }
- break;
- default:
- // Don't cross function boundaries.
- if (ts.isFunctionLike(node_1)) {
- return undefined;
- }
- break;
- }
- }
+ }
+ else if (modifier === 116 /* AbstractKeyword */) {
+ if (!(container.kind === 228 /* ClassDeclaration */ || declaration.kind === 228 /* ClassDeclaration */)) {
return undefined;
}
- function getModifierOccurrences(modifier, declaration) {
- var container = declaration.parent;
- // Make sure we only highlight the keyword when it makes sense to do so.
- if (ts.isAccessibilityModifier(modifier)) {
- if (!(container.kind === 226 /* ClassDeclaration */ ||
- container.kind === 197 /* ClassExpression */ ||
- (declaration.kind === 144 /* Parameter */ && hasKind(container, 150 /* Constructor */)))) {
- return undefined;
- }
- }
- else if (modifier === 114 /* StaticKeyword */) {
- if (!(container.kind === 226 /* ClassDeclaration */ || container.kind === 197 /* ClassExpression */)) {
- return undefined;
- }
- }
- else if (modifier === 83 /* ExportKeyword */ || modifier === 123 /* DeclareKeyword */) {
- if (!(container.kind === 231 /* ModuleBlock */ || container.kind === 261 /* SourceFile */)) {
- return undefined;
- }
- }
- else if (modifier === 116 /* AbstractKeyword */) {
- if (!(container.kind === 226 /* ClassDeclaration */ || declaration.kind === 226 /* ClassDeclaration */)) {
- return undefined;
- }
+ }
+ else {
+ // unsupported modifier
+ return undefined;
+ }
+ var keywords = [];
+ var modifierFlag = getFlagFromModifier(modifier);
+ var nodes;
+ switch (container.kind) {
+ case 233 /* ModuleBlock */:
+ case 264 /* SourceFile */:
+ // Container is either a class declaration or the declaration is a classDeclaration
+ if (modifierFlag & 128 /* Abstract */) {
+ nodes = declaration.members.concat(declaration);
}
else {
- // unsupported modifier
- return undefined;
- }
- var keywords = [];
- var modifierFlag = getFlagFromModifier(modifier);
- var nodes;
- switch (container.kind) {
- case 231 /* ModuleBlock */:
- case 261 /* SourceFile */:
- // Container is either a class declaration or the declaration is a classDeclaration
- if (modifierFlag & 128 /* Abstract */) {
- nodes = declaration.members.concat(declaration);
- }
- else {
- nodes = container.statements;
- }
- break;
- case 150 /* Constructor */:
- nodes = container.parameters.concat(container.parent.members);
- break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- nodes = container.members;
- // If we're an accessibility modifier, we're in an instance member and should search
- // the constructor's parameter list for instance members as well.
- if (modifierFlag & 28 /* AccessibilityModifier */) {
- var constructor = ts.forEach(container.members, function (member) {
- return member.kind === 150 /* Constructor */ && member;
- });
- if (constructor) {
- nodes = nodes.concat(constructor.parameters);
- }
- }
- else if (modifierFlag & 128 /* Abstract */) {
- nodes = nodes.concat(container);
- }
- break;
- default:
- ts.Debug.fail("Invalid container kind.");
+ nodes = container.statements;
}
- ts.forEach(nodes, function (node) {
- if (ts.getModifierFlags(node) & modifierFlag) {
- ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- function getFlagFromModifier(modifier) {
- switch (modifier) {
- case 113 /* PublicKeyword */:
- return 4 /* Public */;
- case 111 /* PrivateKeyword */:
- return 8 /* Private */;
- case 112 /* ProtectedKeyword */:
- return 16 /* Protected */;
- case 114 /* StaticKeyword */:
- return 32 /* Static */;
- case 83 /* ExportKeyword */:
- return 1 /* Export */;
- case 123 /* DeclareKeyword */:
- return 2 /* Ambient */;
- case 116 /* AbstractKeyword */:
- return 128 /* Abstract */;
- default:
- ts.Debug.fail();
+ break;
+ case 151 /* Constructor */:
+ nodes = container.parameters.concat(container.parent.members);
+ break;
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ nodes = container.members;
+ // If we're an accessibility modifier, we're in an instance member and should search
+ // the constructor's parameter list for instance members as well.
+ if (modifierFlag & 28 /* AccessibilityModifier */) {
+ var constructor = ts.forEach(container.members, function (member) {
+ return member.kind === 151 /* Constructor */ && member;
+ });
+ if (constructor) {
+ nodes = nodes.concat(constructor.parameters);
}
}
- }
- function pushKeywordIf(keywordList, token) {
- var expected = [];
- for (var _i = 2; _i < arguments.length; _i++) {
- expected[_i - 2] = arguments[_i];
+ else if (modifierFlag & 128 /* Abstract */) {
+ nodes = nodes.concat(container);
}
- if (token && ts.contains(expected, token.kind)) {
- keywordList.push(token);
- return true;
- }
- return false;
+ break;
+ default:
+ ts.Debug.fail("Invalid container kind.");
+ }
+ ts.forEach(nodes, function (node) {
+ if (ts.getModifierFlags(node) & modifierFlag) {
+ ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); });
}
- function getGetAndSetOccurrences(accessorDeclaration) {
- var keywords = [];
- tryPushAccessorKeyword(accessorDeclaration.symbol, 151 /* GetAccessor */);
- tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* SetAccessor */);
- return ts.map(keywords, getHighlightSpanForNode);
- function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
- var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
- if (accessor) {
- ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 133 /* SetKeyword */); });
- }
- }
+ });
+ return keywords;
+ function getFlagFromModifier(modifier) {
+ switch (modifier) {
+ case 113 /* PublicKeyword */:
+ return 4 /* Public */;
+ case 111 /* PrivateKeyword */:
+ return 8 /* Private */;
+ case 112 /* ProtectedKeyword */:
+ return 16 /* Protected */;
+ case 114 /* StaticKeyword */:
+ return 32 /* Static */;
+ case 83 /* ExportKeyword */:
+ return 1 /* Export */;
+ case 123 /* DeclareKeyword */:
+ return 2 /* Ambient */;
+ case 116 /* AbstractKeyword */:
+ return 128 /* Abstract */;
+ default:
+ ts.Debug.fail();
}
- function getConstructorOccurrences(constructorDeclaration) {
- var declarations = constructorDeclaration.symbol.getDeclarations();
- var keywords = [];
- ts.forEach(declarations, function (declaration) {
- ts.forEach(declaration.getChildren(), function (token) {
- return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */);
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getLoopBreakContinueOccurrences(loopNode) {
- var keywords = [];
- if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) {
- // If we succeeded and got a do-while loop, then start looking for a 'while' keyword.
- if (loopNode.kind === 209 /* DoStatement */) {
- var loopTokens = loopNode.getChildren();
- for (var i = loopTokens.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) {
- break;
- }
- }
- }
- }
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(loopNode, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */);
- }
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
- var owner = getBreakOrContinueOwner(breakOrContinueStatement);
- if (owner) {
- switch (owner.kind) {
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- return getLoopBreakContinueOccurrences(owner);
- case 218 /* SwitchStatement */:
- return getSwitchCaseDefaultOccurrences(owner);
+ }
+ }
+ function pushKeywordIf(keywordList, token) {
+ var expected = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ expected[_i - 2] = arguments[_i];
+ }
+ if (token && ts.contains(expected, token.kind)) {
+ keywordList.push(token);
+ return true;
+ }
+ return false;
+ }
+ function getGetAndSetOccurrences(accessorDeclaration) {
+ var keywords = [];
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 152 /* GetAccessor */);
+ tryPushAccessorKeyword(accessorDeclaration.symbol, 153 /* SetAccessor */);
+ return keywords;
+ function tryPushAccessorKeyword(accessorSymbol, accessorKind) {
+ var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind);
+ if (accessor) {
+ ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 124 /* GetKeyword */, 134 /* SetKeyword */); });
+ }
+ }
+ }
+ function getConstructorOccurrences(constructorDeclaration) {
+ var declarations = constructorDeclaration.symbol.getDeclarations();
+ var keywords = [];
+ ts.forEach(declarations, function (declaration) {
+ ts.forEach(declaration.getChildren(), function (token) {
+ return pushKeywordIf(keywords, token, 122 /* ConstructorKeyword */);
+ });
+ });
+ return keywords;
+ }
+ function getLoopBreakContinueOccurrences(loopNode) {
+ var keywords = [];
+ if (pushKeywordIf(keywords, loopNode.getFirstToken(), 87 /* ForKeyword */, 105 /* WhileKeyword */, 80 /* DoKeyword */)) {
+ // If we succeeded and got a do-while loop, then start looking for a 'while' keyword.
+ if (loopNode.kind === 211 /* DoStatement */) {
+ var loopTokens = loopNode.getChildren();
+ for (var i = loopTokens.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, loopTokens[i], 105 /* WhileKeyword */)) {
+ break;
}
}
- return undefined;
}
- function getSwitchCaseDefaultOccurrences(switchStatement) {
- var keywords = [];
- pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */);
- // Go through each clause in the switch statement, collecting the 'case'/'default' keywords.
- ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
- pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */);
- var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
- ts.forEach(breaksAndContinues, function (statement) {
- if (ownsBreakOrContinueStatement(switchStatement, statement)) {
- pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */);
- }
- });
- });
- return ts.map(keywords, getHighlightSpanForNode);
+ }
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(loopNode, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */, 76 /* ContinueKeyword */);
}
- function getTryCatchFinallyOccurrences(tryStatement) {
- var keywords = [];
- pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */);
- if (tryStatement.catchClause) {
- pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */);
- }
- if (tryStatement.finallyBlock) {
- var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile);
- pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */);
- }
- return ts.map(keywords, getHighlightSpanForNode);
+ });
+ return keywords;
+ }
+ function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
+ var owner = getBreakOrContinueOwner(breakOrContinueStatement);
+ if (owner) {
+ switch (owner.kind) {
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ return getLoopBreakContinueOccurrences(owner);
+ case 220 /* SwitchStatement */:
+ return getSwitchCaseDefaultOccurrences(owner);
}
- function getThrowOccurrences(throwStatement) {
- var owner = getThrowStatementOwner(throwStatement);
- if (!owner) {
- return undefined;
+ }
+ return undefined;
+ }
+ function getSwitchCaseDefaultOccurrences(switchStatement) {
+ var keywords = [];
+ pushKeywordIf(keywords, switchStatement.getFirstToken(), 97 /* SwitchKeyword */);
+ // Go through each clause in the switch statement, collecting the 'case'/'default' keywords.
+ ts.forEach(switchStatement.caseBlock.clauses, function (clause) {
+ pushKeywordIf(keywords, clause.getFirstToken(), 72 /* CaseKeyword */, 78 /* DefaultKeyword */);
+ var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause);
+ ts.forEach(breaksAndContinues, function (statement) {
+ if (ownsBreakOrContinueStatement(switchStatement, statement)) {
+ pushKeywordIf(keywords, statement.getFirstToken(), 71 /* BreakKeyword */);
}
- var keywords = [];
- ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
- });
- // If the "owner" is a function, then we equate 'return' and 'throw' statements in their
- // ability to "jump out" of the function, and include occurrences for both.
- if (ts.isFunctionBlock(owner)) {
- ts.forEachReturnStatement(owner, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
- });
+ });
+ });
+ return keywords;
+ }
+ function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {
+ var keywords = [];
+ pushKeywordIf(keywords, tryStatement.getFirstToken(), 101 /* TryKeyword */);
+ if (tryStatement.catchClause) {
+ pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 73 /* CatchKeyword */);
+ }
+ if (tryStatement.finallyBlock) {
+ var finallyKeyword = ts.findChildOfKind(tryStatement, 86 /* FinallyKeyword */, sourceFile);
+ pushKeywordIf(keywords, finallyKeyword, 86 /* FinallyKeyword */);
+ }
+ return keywords;
+ }
+ function getThrowOccurrences(throwStatement) {
+ var owner = getThrowStatementOwner(throwStatement);
+ if (!owner) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
+ });
+ // If the "owner" is a function, then we equate 'return' and 'throw' statements in their
+ // ability to "jump out" of the function, and include occurrences for both.
+ if (ts.isFunctionBlock(owner)) {
+ ts.forEachReturnStatement(owner, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
+ });
+ }
+ return keywords;
+ }
+ function getReturnOccurrences(returnStatement) {
+ var func = ts.getContainingFunction(returnStatement);
+ // If we didn't find a containing function with a block body, bail out.
+ if (!(func && hasKind(func.body, 206 /* Block */))) {
+ return undefined;
+ }
+ var keywords = [];
+ ts.forEachReturnStatement(func.body, function (returnStatement) {
+ pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
+ });
+ // Include 'throw' statements that do not occur within a try block.
+ ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
+ pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
+ });
+ return keywords;
+ }
+ function getIfElseOccurrences(ifStatement, sourceFile) {
+ var keywords = [];
+ // Traverse upwards through all parent if-statements linked by their else-branches.
+ while (hasKind(ifStatement.parent, 210 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) {
+ ifStatement = ifStatement.parent;
+ }
+ // Now traverse back down through the else branches, aggregating if/else keywords of if-statements.
+ while (ifStatement) {
+ var children = ifStatement.getChildren();
+ pushKeywordIf(keywords, children[0], 89 /* IfKeyword */);
+ // Generally the 'else' keyword is second-to-last, so we traverse backwards.
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) {
+ break;
}
- return ts.map(keywords, getHighlightSpanForNode);
}
- function getReturnOccurrences(returnStatement) {
- var func = ts.getContainingFunction(returnStatement);
- // If we didn't find a containing function with a block body, bail out.
- if (!(func && hasKind(func.body, 204 /* Block */))) {
- return undefined;
- }
- var keywords = [];
- ts.forEachReturnStatement(func.body, function (returnStatement) {
- pushKeywordIf(keywords, returnStatement.getFirstToken(), 95 /* ReturnKeyword */);
- });
- // Include 'throw' statements that do not occur within a try block.
- ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) {
- pushKeywordIf(keywords, throwStatement.getFirstToken(), 99 /* ThrowKeyword */);
- });
- return ts.map(keywords, getHighlightSpanForNode);
- }
- function getIfElseOccurrences(ifStatement) {
- var keywords = [];
- // Traverse upwards through all parent if-statements linked by their else-branches.
- while (hasKind(ifStatement.parent, 208 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) {
- ifStatement = ifStatement.parent;
- }
- // Now traverse back down through the else branches, aggregating if/else keywords of if-statements.
- while (ifStatement) {
- var children = ifStatement.getChildren();
- pushKeywordIf(keywords, children[0], 89 /* IfKeyword */);
- // Generally the 'else' keyword is second-to-last, so we traverse backwards.
- for (var i = children.length - 1; i >= 0; i--) {
- if (pushKeywordIf(keywords, children[i], 81 /* ElseKeyword */)) {
- break;
- }
- }
- if (!hasKind(ifStatement.elseStatement, 208 /* IfStatement */)) {
+ if (!hasKind(ifStatement.elseStatement, 210 /* IfStatement */)) {
+ break;
+ }
+ ifStatement = ifStatement.elseStatement;
+ }
+ var result = [];
+ // We'd like to highlight else/ifs together if they are only separated by whitespace
+ // (i.e. the keywords are separated by no comments, no newlines).
+ for (var i = 0; i < keywords.length; i++) {
+ if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) {
+ var elseKeyword = keywords[i];
+ var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword.
+ var shouldCombindElseAndIf = true;
+ // Avoid recalculating getStart() by iterating backwards.
+ for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
+ if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
+ shouldCombindElseAndIf = false;
break;
}
- ifStatement = ifStatement.elseStatement;
}
- var result = [];
- // We'd like to highlight else/ifs together if they are only separated by whitespace
- // (i.e. the keywords are separated by no comments, no newlines).
- for (var i = 0; i < keywords.length; i++) {
- if (keywords[i].kind === 81 /* ElseKeyword */ && i < keywords.length - 1) {
- var elseKeyword = keywords[i];
- var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword.
- var shouldCombindElseAndIf = true;
- // Avoid recalculating getStart() by iterating backwards.
- for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) {
- if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {
- shouldCombindElseAndIf = false;
- break;
- }
- }
- if (shouldCombindElseAndIf) {
- result.push({
- fileName: fileName,
- textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
- kind: ts.HighlightSpanKind.reference
- });
- i++; // skip the next keyword
- continue;
- }
- }
- // Ordinary case: just highlight the keyword.
- result.push(getHighlightSpanForNode(keywords[i]));
+ if (shouldCombindElseAndIf) {
+ result.push({
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),
+ kind: ts.HighlightSpanKind.reference
+ });
+ i++; // skip the next keyword
+ continue;
}
- return result;
}
+ // Ordinary case: just highlight the keyword.
+ result.push(getHighlightSpanForNode(keywords[i], sourceFile));
}
+ return result;
}
- DocumentHighlights.getDocumentHighlights = getDocumentHighlights;
/**
* Whether or not a 'node' is preceded by a label of the given string.
* Note: 'node' cannot be a SourceFile.
*/
function isLabeledBy(node, labelName) {
- for (var owner = node.parent; owner.kind === 219 /* LabeledStatement */; owner = owner.parent) {
+ for (var owner = node.parent; owner.kind === 221 /* LabeledStatement */; owner = owner.parent) {
if (owner.label.text === labelName) {
return true;
}
@@ -69168,15 +74232,15 @@ var ts;
return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + "|" + settings.allowJs + "|" + settings.baseUrl + "|" + JSON.stringify(settings.typeRoots) + "|" + JSON.stringify(settings.rootDirs) + "|" + JSON.stringify(settings.paths);
}
function getBucketForCompilationSettings(key, createIfMissing) {
- var bucket = buckets[key];
+ var bucket = buckets.get(key);
if (!bucket && createIfMissing) {
- buckets[key] = bucket = ts.createFileMap();
+ buckets.set(key, bucket = ts.createFileMap());
}
return bucket;
}
function reportStats() {
- var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
- var entries = buckets[name];
+ var bucketInfoArray = ts.arrayFrom(buckets.keys()).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) {
+ var entries = buckets.get(name);
var sourceFiles = [];
entries.forEachValue(function (key, entry) {
sourceFiles.push({
@@ -69269,41 +74333,764 @@ var ts;
}
ts.createDocumentRegistry = createDocumentRegistry;
})(ts || (ts = {}));
+/* Code for finding imports of an exported symbol. Used only by FindAllReferences. */
/* @internal */
var ts;
(function (ts) {
var FindAllReferences;
(function (FindAllReferences) {
- function findReferencedSymbols(typeChecker, cancellationToken, sourceFiles, sourceFile, position, findInStrings, findInComments) {
- var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
- if (node === sourceFile) {
- return undefined;
+ /** Creates the imports map and returns an ImportTracker that uses it. Call this lazily to avoid calling `getDirectImportsMap` unnecessarily. */
+ function createImportTracker(sourceFiles, checker, cancellationToken) {
+ var allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);
+ return function (exportSymbol, exportInfo, isForRename) {
+ var _a = getImportersForExport(sourceFiles, allDirectImports, exportInfo, checker, cancellationToken), directImports = _a.directImports, indirectUsers = _a.indirectUsers;
+ return __assign({ indirectUsers: indirectUsers }, getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename));
+ };
+ }
+ FindAllReferences.createImportTracker = createImportTracker;
+ var ExportKind;
+ (function (ExportKind) {
+ ExportKind[ExportKind["Named"] = 0] = "Named";
+ ExportKind[ExportKind["Default"] = 1] = "Default";
+ ExportKind[ExportKind["ExportEquals"] = 2] = "ExportEquals";
+ })(ExportKind = FindAllReferences.ExportKind || (FindAllReferences.ExportKind = {}));
+ var ImportExport;
+ (function (ImportExport) {
+ ImportExport[ImportExport["Import"] = 0] = "Import";
+ ImportExport[ImportExport["Export"] = 1] = "Export";
+ })(ImportExport = FindAllReferences.ImportExport || (FindAllReferences.ImportExport = {}));
+ /** Returns import statements that directly reference the exporting module, and a list of files that may access the module through a namespace. */
+ function getImportersForExport(sourceFiles, allDirectImports, _a, checker, cancellationToken) {
+ var exportingModuleSymbol = _a.exportingModuleSymbol, exportKind = _a.exportKind;
+ var markSeenDirectImport = ts.nodeSeenTracker();
+ var markSeenIndirectUser = ts.nodeSeenTracker();
+ var directImports = [];
+ var isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports;
+ var indirectUserDeclarations = isAvailableThroughGlobal ? undefined : [];
+ handleDirectImports(exportingModuleSymbol);
+ return { directImports: directImports, indirectUsers: getIndirectUsers() };
+ function getIndirectUsers() {
+ if (isAvailableThroughGlobal) {
+ // It has `export as namespace`, so anything could potentially use it.
+ return sourceFiles;
+ }
+ // Module augmentations may use this module's exports without importing it.
+ for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ if (ts.isExternalModuleAugmentation(decl)) {
+ addIndirectUser(decl);
+ }
+ }
+ // This may return duplicates (if there are multiple module declarations in a single source file, all importing the same thing as a namespace), but `State.markSearchedSymbol` will handle that.
+ return indirectUserDeclarations.map(ts.getSourceFileOfNode);
}
- switch (node.kind) {
- case 8 /* NumericLiteral */:
- if (!ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- break;
+ function handleDirectImports(exportingModuleSymbol) {
+ var theseDirectImports = getDirectImports(exportingModuleSymbol);
+ if (theseDirectImports)
+ for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
+ var direct = theseDirectImports_1[_i];
+ if (!markSeenDirectImport(direct)) {
+ continue;
+ }
+ cancellationToken.throwIfCancellationRequested();
+ switch (direct.kind) {
+ case 180 /* CallExpression */:
+ if (!isAvailableThroughGlobal) {
+ var parent = direct.parent;
+ if (exportKind === 2 /* ExportEquals */ && parent.kind === 225 /* VariableDeclaration */) {
+ var name = parent.name;
+ if (name.kind === 70 /* Identifier */) {
+ directImports.push(name);
+ break;
+ }
+ }
+ // Don't support re-exporting 'require()' calls, so just add a single indirect user.
+ addIndirectUser(direct.getSourceFile());
+ }
+ break;
+ case 236 /* ImportEqualsDeclaration */:
+ handleNamespaceImport(direct, direct.name, ts.hasModifier(direct, 1 /* Export */));
+ break;
+ case 237 /* ImportDeclaration */:
+ var namedBindings = direct.importClause && direct.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
+ handleNamespaceImport(direct, namedBindings.name);
+ }
+ else {
+ directImports.push(direct);
+ }
+ break;
+ case 243 /* ExportDeclaration */:
+ if (!direct.exportClause) {
+ // This is `export * from "foo"`, so imports of this module may import the export too.
+ handleDirectImports(getContainingModuleSymbol(direct, checker));
+ }
+ else {
+ // This is `export { foo } from "foo"` and creates an alias symbol, so recursive search will get handle re-exports.
+ directImports.push(direct);
+ }
+ break;
+ }
+ }
+ }
+ function handleNamespaceImport(importDeclaration, name, isReExport) {
+ if (exportKind === 2 /* ExportEquals */) {
+ // This is a direct import, not import-as-namespace.
+ directImports.push(importDeclaration);
+ }
+ else if (!isAvailableThroughGlobal) {
+ var sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration);
+ ts.Debug.assert(sourceFileLike.kind === 264 /* SourceFile */ || sourceFileLike.kind === 232 /* ModuleDeclaration */);
+ if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {
+ addIndirectUsers(sourceFileLike);
+ }
+ else {
+ addIndirectUser(sourceFileLike);
+ }
+ }
+ }
+ function addIndirectUser(sourceFileLike) {
+ ts.Debug.assert(!isAvailableThroughGlobal);
+ var isNew = markSeenIndirectUser(sourceFileLike);
+ if (isNew) {
+ indirectUserDeclarations.push(sourceFileLike);
+ }
+ return isNew;
+ }
+ /** Adds a module and all of its transitive dependencies as possible indirect users. */
+ function addIndirectUsers(sourceFileLike) {
+ if (!addIndirectUser(sourceFileLike)) {
+ return;
+ }
+ var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
+ ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
+ var directImports = getDirectImports(moduleSymbol);
+ if (directImports)
+ for (var _i = 0, directImports_1 = directImports; _i < directImports_1.length; _i++) {
+ var directImport = directImports_1[_i];
+ addIndirectUsers(getSourceFileLikeForImportDeclaration(directImport));
+ }
+ }
+ function getDirectImports(moduleSymbol) {
+ return allDirectImports.get(ts.getSymbolId(moduleSymbol).toString());
+ }
+ }
+ /**
+ * Given the set of direct imports of a module, we need to find which ones import the particular exported symbol.
+ * The returned `importSearches` will result in the entire source file being searched.
+ * But re-exports will be placed in 'singleReferences' since they cannot be locally referenced.
+ */
+ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) {
+ var exportName = exportSymbol.name;
+ var importSearches = [];
+ var singleReferences = [];
+ function addSearch(location, symbol) {
+ importSearches.push([location, symbol]);
+ }
+ if (directImports)
+ for (var _i = 0, directImports_2 = directImports; _i < directImports_2.length; _i++) {
+ var decl = directImports_2[_i];
+ handleImport(decl);
+ }
+ return { importSearches: importSearches, singleReferences: singleReferences };
+ function handleImport(decl) {
+ if (decl.kind === 236 /* ImportEqualsDeclaration */) {
+ if (isExternalModuleImportEquals(decl)) {
+ handleNamespaceImportLike(decl.name);
+ }
+ return;
+ }
+ if (decl.kind === 70 /* Identifier */) {
+ handleNamespaceImportLike(decl);
+ return;
+ }
+ // Ignore if there's a grammar error
+ if (decl.moduleSpecifier.kind !== 9 /* StringLiteral */) {
+ return;
+ }
+ if (decl.kind === 243 /* ExportDeclaration */) {
+ searchForNamedImport(decl.exportClause);
+ return;
+ }
+ var importClause = decl.importClause;
+ var namedBindings = importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
+ handleNamespaceImportLike(namedBindings.name);
+ return;
+ }
+ if (exportKind === 0 /* Named */) {
+ searchForNamedImport(namedBindings);
+ }
+ else {
+ // `export =` might be imported by a default import if `--allowSyntheticDefaultImports` is on, so this handles both ExportKind.Default and ExportKind.ExportEquals
+ var name = importClause.name;
+ // If a default import has the same name as the default export, allow to rename it.
+ // Given `import f` and `export default function f`, we will rename both, but for `import g` we will rename just that.
+ if (name && (!isForRename || name.text === symbolName(exportSymbol))) {
+ var defaultImportAlias = checker.getSymbolAtLocation(name);
+ addSearch(name, defaultImportAlias);
+ }
+ // 'default' might be accessed as a named import `{ default as foo }`.
+ if (!isForRename && exportKind === 1 /* Default */) {
+ ts.Debug.assert(exportName === "default");
+ searchForNamedImport(namedBindings);
+ }
+ }
+ }
+ /**
+ * `import x = require("./x") or `import * as x from "./x"`.
+ * An `export =` may be imported by this syntax, so it may be a direct import.
+ * If it's not a direct import, it will be in `indirectUsers`, so we don't have to do anything here.
+ */
+ function handleNamespaceImportLike(importName) {
+ // Don't rename an import that already has a different name than the export.
+ if (exportKind === 2 /* ExportEquals */ && (!isForRename || importName.text === exportName)) {
+ addSearch(importName, checker.getSymbolAtLocation(importName));
+ }
+ }
+ function searchForNamedImport(namedBindings) {
+ if (namedBindings)
+ for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
+ var element = _a[_i];
+ var name = element.name, propertyName = element.propertyName;
+ if ((propertyName || name).text !== exportName) {
+ continue;
+ }
+ if (propertyName) {
+ // This is `import { foo as bar } from "./a"` or `export { foo as bar } from "./a"`. `foo` isn't a local in the file, so just add it as a single reference.
+ singleReferences.push(propertyName);
+ if (!isForRename) {
+ // Search locally for `bar`.
+ addSearch(name, checker.getSymbolAtLocation(name));
+ }
+ }
+ else {
+ var localSymbol = element.kind === 245 /* ExportSpecifier */ && element.propertyName
+ ? checker.getExportSpecifierLocalTargetSymbol(element) // For re-exporting under a different name, we want to get the re-exported symbol.
+ : checker.getSymbolAtLocation(name);
+ addSearch(name, localSymbol);
+ }
}
- // Fallthrough
- case 70 /* Identifier */:
- case 98 /* ThisKeyword */:
- // case SyntaxKind.SuperKeyword: TODO:GH#9268
- case 122 /* ConstructorKeyword */:
- case 9 /* StringLiteral */:
- return getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, /*implementations*/ false);
}
- return undefined;
+ }
+ /** Returns 'true' is the namespace 'name' is re-exported from this module, and 'false' if it is only used locally. */
+ function findNamespaceReExports(sourceFileLike, name, checker) {
+ var namespaceImportSymbol = checker.getSymbolAtLocation(name);
+ return forEachPossibleImportOrExportStatement(sourceFileLike, function (statement) {
+ if (statement.kind !== 243 /* ExportDeclaration */)
+ return;
+ var _a = statement, exportClause = _a.exportClause, moduleSpecifier = _a.moduleSpecifier;
+ if (moduleSpecifier || !exportClause)
+ return;
+ for (var _i = 0, _b = exportClause.elements; _i < _b.length; _i++) {
+ var element = _b[_i];
+ if (checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol) {
+ return true;
+ }
+ }
+ });
+ }
+ /** Returns a map from a module symbol Id to all import statements that directly reference the module. */
+ function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
+ var map = ts.createMap();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var sourceFile = sourceFiles_4[_i];
+ cancellationToken.throwIfCancellationRequested();
+ forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol) {
+ var id = ts.getSymbolId(moduleSymbol).toString();
+ var imports = map.get(id);
+ if (!imports) {
+ map.set(id, imports = []);
+ }
+ imports.push(importDecl);
+ }
+ });
+ }
+ return map;
+ }
+ /** Iterates over all statements at the top level or in module declarations. Returns the first truthy result. */
+ function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
+ return ts.forEach(sourceFileLike.kind === 264 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) {
+ return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action));
+ });
+ }
+ /** Calls `action` for each import, re-export, or require() in a file. */
+ function forEachImport(sourceFile, action) {
+ if (sourceFile.externalModuleIndicator) {
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var moduleSpecifier = _a[_i];
+ action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
+ }
+ }
+ else {
+ forEachPossibleImportOrExportStatement(sourceFile, function (statement) {
+ switch (statement.kind) {
+ case 243 /* ExportDeclaration */:
+ case 237 /* ImportDeclaration */: {
+ var decl = statement;
+ if (decl.moduleSpecifier && decl.moduleSpecifier.kind === 9 /* StringLiteral */) {
+ action(decl, decl.moduleSpecifier);
+ }
+ break;
+ }
+ case 236 /* ImportEqualsDeclaration */: {
+ var decl = statement;
+ var moduleReference = decl.moduleReference;
+ if (moduleReference.kind === 247 /* ExternalModuleReference */ &&
+ moduleReference.expression.kind === 9 /* StringLiteral */) {
+ action(decl, moduleReference.expression);
+ }
+ break;
+ }
+ }
+ });
+ if (sourceFile.flags & 65536 /* JavaScriptFile */) {
+ // Find all 'require()' calls.
+ sourceFile.forEachChild(function recur(node) {
+ if (ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
+ action(node, node.arguments[0]);
+ }
+ else {
+ node.forEachChild(recur);
+ }
+ });
+ }
+ }
+ }
+ function importerFromModuleSpecifier(moduleSpecifier) {
+ var decl = moduleSpecifier.parent;
+ if (decl.kind === 237 /* ImportDeclaration */ || decl.kind === 243 /* ExportDeclaration */) {
+ return decl;
+ }
+ ts.Debug.assert(decl.kind === 247 /* ExternalModuleReference */);
+ return decl.parent;
+ }
+ /**
+ * Given a local reference, we might notice that it's an import/export and recursively search for references of that.
+ * If at an import, look locally for the symbol it imports.
+ * If an an export, look for all imports of it.
+ * This doesn't handle export specifiers; that is done in `getReferencesAtExportSpecifier`.
+ * @param comingFromExport If we are doing a search for all exports, don't bother looking backwards for the imported symbol, since that's the reason we're here.
+ */
+ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
+ return comingFromExport ? getExport() : getExport() || getImport();
+ function getExport() {
+ var parent = node.parent;
+ if (symbol.flags & 7340032 /* Export */) {
+ if (parent.kind === 178 /* PropertyAccessExpression */) {
+ // When accessing an export of a JS module, there's no alias. The symbol will still be flagged as an export even though we're at the use.
+ // So check that we are at the declaration.
+ return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 193 /* BinaryExpression */
+ ? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false)
+ : undefined;
+ }
+ else {
+ var exportSymbol = symbol.exportSymbol;
+ ts.Debug.assert(!!exportSymbol);
+ return exportInfo(exportSymbol, getExportKindForDeclaration(parent));
+ }
+ }
+ else {
+ var exportNode = parent.kind === 225 /* VariableDeclaration */ ? ts.getAncestor(parent, 207 /* VariableStatement */) : parent;
+ if (ts.hasModifier(exportNode, 1 /* Export */)) {
+ if (exportNode.kind === 236 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) {
+ // We're at `Y` in `export import X = Y`. This is not the exported symbol, the left-hand-side is. So treat this as an import statement.
+ if (comingFromExport) {
+ return undefined;
+ }
+ var lhsSymbol = checker.getSymbolAtLocation(exportNode.name);
+ return { kind: 0 /* Import */, symbol: lhsSymbol, isNamedImport: false };
+ }
+ else {
+ return exportInfo(symbol, getExportKindForDeclaration(exportNode));
+ }
+ }
+ else if (parent.kind === 242 /* ExportAssignment */) {
+ // Get the symbol for the `export =` node; its parent is the module it's the export of.
+ var exportingModuleSymbol = parent.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } };
+ }
+ else if (parent.kind === 193 /* BinaryExpression */) {
+ return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true);
+ }
+ else if (parent.parent.kind === 193 /* BinaryExpression */) {
+ return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true);
+ }
+ }
+ function getSpecialPropertyExport(node, useLhsSymbol) {
+ var kind;
+ switch (ts.getSpecialPropertyAssignmentKind(node)) {
+ case 1 /* ExportsProperty */:
+ kind = 0 /* Named */;
+ break;
+ case 2 /* ModuleExports */:
+ kind = 2 /* ExportEquals */;
+ break;
+ default:
+ return undefined;
+ }
+ var sym = useLhsSymbol ? checker.getSymbolAtLocation(node.left.name) : symbol;
+ return sym && exportInfo(sym, kind);
+ }
+ }
+ function getImport() {
+ var isImport = isNodeImport(node);
+ if (!isImport)
+ return;
+ // A symbol being imported is always an alias. So get what that aliases to find the local symbol.
+ var importedSymbol = checker.getImmediateAliasedSymbol(symbol);
+ if (importedSymbol) {
+ // Search on the local symbol in the exporting module, not the exported symbol.
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ // Similarly, skip past the symbol for 'export ='
+ if (importedSymbol.name === "export=") {
+ importedSymbol = checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0 /* Import */, symbol: importedSymbol }, isImport);
+ }
+ }
+ }
+ function exportInfo(symbol, kind) {
+ var exportInfo = getExportInfo(symbol, kind, checker);
+ return exportInfo && { kind: 1 /* Export */, symbol: symbol, exportInfo: exportInfo };
+ }
+ // Not meant for use with export specifiers or export assignment.
+ function getExportKindForDeclaration(node) {
+ return ts.hasModifier(node, 512 /* Default */) ? 1 /* Default */ : 0 /* Named */;
+ }
+ }
+ FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function isNodeImport(node) {
+ var parent = node.parent;
+ switch (parent.kind) {
+ case 236 /* ImportEqualsDeclaration */:
+ return parent.name === node && isExternalModuleImportEquals(parent)
+ ? { isNamedImport: false }
+ : undefined;
+ case 241 /* ImportSpecifier */:
+ // For a rename import `{ foo as bar }`, don't search for the imported symbol. Just find local uses of `bar`.
+ return parent.propertyName ? undefined : { isNamedImport: true };
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ ts.Debug.assert(parent.name === node);
+ return { isNamedImport: false };
+ default:
+ return undefined;
+ }
+ }
+ function getExportInfo(exportSymbol, exportKind, checker) {
+ var exportingModuleSymbol = checker.getMergedSymbol(exportSymbol.parent); // Need to get merged symbol in case there's an augmentation.
+ // `export` may appear in a namespace. In that case, just rely on global search.
+ return ts.isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol: exportingModuleSymbol, exportKind: exportKind } : undefined;
+ }
+ FindAllReferences.getExportInfo = getExportInfo;
+ function symbolName(symbol) {
+ if (symbol.name !== "default") {
+ return symbol.name;
+ }
+ var name = ts.forEach(symbol.declarations, function (_a) {
+ var name = _a.name;
+ return name && name.kind === 70 /* Identifier */ && name.text;
+ });
+ ts.Debug.assert(!!name);
+ return name;
+ }
+ /** If at an export specifier, go to the symbol it refers to. */
+ function skipExportSpecifierSymbol(symbol, checker) {
+ // For `export { foo } from './bar", there's nothing to skip, because it does not create a new alias. But `export { foo } does.
+ if (symbol.declarations)
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) {
+ return checker.getExportSpecifierLocalTargetSymbol(declaration);
+ }
+ }
+ return symbol;
+ }
+ function getContainingModuleSymbol(importer, checker) {
+ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
+ }
+ function getSourceFileLikeForImportDeclaration(node) {
+ if (node.kind === 180 /* CallExpression */) {
+ return node.getSourceFile();
+ }
+ var parent = node.parent;
+ if (parent.kind === 264 /* SourceFile */) {
+ return parent;
+ }
+ ts.Debug.assert(parent.kind === 233 /* ModuleBlock */ && isAmbientModuleDeclaration(parent.parent));
+ return parent.parent;
+ }
+ function isAmbientModuleDeclaration(node) {
+ return node.kind === 232 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */;
+ }
+ function isExternalModuleImportEquals(_a) {
+ var moduleReference = _a.moduleReference;
+ return moduleReference.kind === 247 /* ExternalModuleReference */ && moduleReference.expression.kind === 9 /* StringLiteral */;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+/// <reference path="./importTracker.ts" />
+/* @internal */
+var ts;
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ function nodeEntry(node, isInString) {
+ return { type: "node", node: node, isInString: isInString };
+ }
+ FindAllReferences.nodeEntry = nodeEntry;
+ function findReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position);
+ if (!referencedSymbols || !referencedSymbols.length) {
+ return undefined;
+ }
+ var out = [];
+ for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) {
+ var _a = referencedSymbols_1[_i], definition = _a.definition, references = _a.references;
+ // Only include referenced symbols that have a valid definition.
+ if (definition) {
+ out.push({ definition: definitionToReferencedSymbolDefinitionInfo(definition, checker), references: references.map(toReferenceEntry) });
+ }
+ }
+ return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, findInStrings, findInComments, implementations) {
- if (!implementations) {
+ function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
+ }
+ FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
+ function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ // If invoked directly on a shorthand property assignment, then return
+ // the declaration of the symbol being assigned (not the symbol being assigned to).
+ if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) {
+ var result_4 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
+ return result_4;
+ }
+ else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) {
+ // References to and accesses on the super keyword only have one possible implementation, so no
+ // need to "Find all References"
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
+ }
+ else {
+ // Perform "Find all References" and retrieve only those that are implementations
+ return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ }
+ }
+ function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ return ts.map(x, toReferenceEntry);
+ }
+ FindAllReferences.findReferencedEntries = findReferencedEntries;
+ function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ }
+ FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
+ function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ }
+ function flattenEntries(referenceSymbols) {
+ return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
+ }
+ function definitionToReferencedSymbolDefinitionInfo(def, checker) {
+ var info = (function () {
+ switch (def.type) {
+ case "symbol": {
+ var symbol = def.symbol, node_2 = def.node;
+ var declarations = symbol.declarations;
+ if (!declarations || declarations.length === 0) {
+ return undefined;
+ }
+ var _a = getDefinitionKindAndDisplayParts(symbol, node_2, checker), displayParts_1 = _a.displayParts, kind_1 = _a.kind;
+ var name_3 = displayParts_1.map(function (p) { return p.text; }).join("");
+ return { node: node_2, name: name_3, kind: kind_1, displayParts: displayParts_1 };
+ }
+ case "label": {
+ var node_3 = def.node;
+ return { node: node_3, name: node_3.text, kind: ts.ScriptElementKind.label, displayParts: [ts.displayPart(node_3.text, ts.SymbolDisplayPartKind.text)] };
+ }
+ case "keyword": {
+ var node_4 = def.node;
+ var name_4 = ts.tokenToString(node_4.kind);
+ return { node: node_4, name: name_4, kind: ts.ScriptElementKind.keyword, displayParts: [{ text: name_4, kind: ts.ScriptElementKind.keyword }] };
+ }
+ case "this": {
+ var node_5 = def.node;
+ var symbol = checker.getSymbolAtLocation(node_5);
+ var displayParts_2 = symbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node_5.getSourceFile(), ts.getContainerNode(node_5), node_5).displayParts;
+ return { node: node_5, name: "this", kind: ts.ScriptElementKind.variableElement, displayParts: displayParts_2 };
+ }
+ case "string": {
+ var node_6 = def.node;
+ return { node: node_6, name: node_6.text, kind: ts.ScriptElementKind.variableElement, displayParts: [ts.displayPart(ts.getTextOfNode(node_6), ts.SymbolDisplayPartKind.stringLiteral)] };
+ }
+ }
+ })();
+ if (!info) {
+ return undefined;
+ }
+ var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts;
+ var sourceFile = node.getSourceFile();
+ return {
+ containerKind: "",
+ containerName: "",
+ fileName: sourceFile.fileName,
+ kind: kind,
+ name: name,
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
+ displayParts: displayParts
+ };
+ }
+ function getDefinitionKindAndDisplayParts(symbol, node, checker) {
+ var _a = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, node.getSourceFile(), ts.getContainerNode(node), node), displayParts = _a.displayParts, symbolKind = _a.symbolKind;
+ return { displayParts: displayParts, kind: symbolKind };
+ }
+ function toReferenceEntry(entry) {
+ if (entry.type === "span") {
+ return { textSpan: entry.textSpan, fileName: entry.fileName, isWriteAccess: false, isDefinition: false };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ return {
+ fileName: node.getSourceFile().fileName,
+ textSpan: getTextSpan(node),
+ isWriteAccess: isWriteAccess(node),
+ isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isInString: isInString
+ };
+ }
+ function toImplementationLocation(entry, checker) {
+ if (entry.type === "node") {
+ var node = entry.node;
+ return __assign({ textSpan: getTextSpan(node), fileName: node.getSourceFile().fileName }, implementationKindDisplayParts(node, checker));
+ }
+ else {
+ var textSpan = entry.textSpan, fileName = entry.fileName;
+ return { textSpan: textSpan, fileName: fileName, kind: ts.ScriptElementKind.unknown, displayParts: [] };
+ }
+ }
+ function implementationKindDisplayParts(node, checker) {
+ var symbol = checker.getSymbolAtLocation(ts.isDeclaration(node) && node.name ? node.name : node);
+ if (symbol) {
+ return getDefinitionKindAndDisplayParts(symbol, node, checker);
+ }
+ else if (node.kind === 177 /* ObjectLiteralExpression */) {
+ return {
+ kind: ts.ScriptElementKind.interfaceElement,
+ displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(19 /* CloseParenToken */)]
+ };
+ }
+ else if (node.kind === 198 /* ClassExpression */) {
+ return {
+ kind: ts.ScriptElementKind.localClassElement,
+ displayParts: [ts.punctuationPart(18 /* OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(19 /* CloseParenToken */)]
+ };
+ }
+ else {
+ return { kind: ts.getNodeKind(node), displayParts: [] };
+ }
+ }
+ function toHighlightSpan(entry) {
+ if (entry.type === "span") {
+ var fileName_1 = entry.fileName, textSpan = entry.textSpan;
+ return { fileName: fileName_1, span: { textSpan: textSpan, kind: ts.HighlightSpanKind.reference } };
+ }
+ var node = entry.node, isInString = entry.isInString;
+ var fileName = entry.node.getSourceFile().fileName;
+ var writeAccess = isWriteAccess(node);
+ var span = {
+ textSpan: getTextSpan(node),
+ kind: writeAccess ? ts.HighlightSpanKind.writtenReference : ts.HighlightSpanKind.reference,
+ isInString: isInString
+ };
+ return { fileName: fileName, span: span };
+ }
+ FindAllReferences.toHighlightSpan = toHighlightSpan;
+ function getTextSpan(node) {
+ var start = node.getStart();
+ var end = node.getEnd();
+ if (node.kind === 9 /* StringLiteral */) {
+ start += 1;
+ end -= 1;
+ }
+ return ts.createTextSpanFromBounds(start, end);
+ }
+ /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
+ function isWriteAccess(node) {
+ if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) {
+ return true;
+ }
+ var parent = node.parent;
+ if (parent) {
+ if (parent.kind === 192 /* PostfixUnaryExpression */ || parent.kind === 191 /* PrefixUnaryExpression */) {
+ return true;
+ }
+ else if (parent.kind === 193 /* BinaryExpression */ && parent.left === node) {
+ var operator = parent.operatorToken.kind;
+ return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */;
+ }
+ }
+ return false;
+ }
+ })(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
+})(ts || (ts = {}));
+/** Encapsulates the core find-all-references algorithm. */
+/* @internal */
+(function (ts) {
+ var FindAllReferences;
+ (function (FindAllReferences) {
+ var Core;
+ (function (Core) {
+ /** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */
+ function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ if (options === void 0) { options = {}; }
+ if (node.kind === 264 /* SourceFile */) {
+ return undefined;
+ }
+ if (!options.implementations) {
+ var special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken);
+ if (special) {
+ return special;
+ }
+ }
+ var symbol = checker.getSymbolAtLocation(node);
+ // Could not find a symbol e.g. unknown identifier
+ if (!symbol) {
+ // String literal might be a property (and thus have a symbol), so do this here rather than in getReferencedSymbolsSpecial.
+ if (!options.implementations && node.kind === 9 /* StringLiteral */) {
+ return getReferencesForStringLiteral(node, sourceFiles, cancellationToken);
+ }
+ // Can't have references to something that we have no symbol for.
+ return undefined;
+ }
+ // The symbol was an internal symbol and does not have a declaration e.g. undefined symbol
+ if (!symbol.declarations || !symbol.declarations.length) {
+ return undefined;
+ }
+ return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
+ }
+ Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ /** getReferencedSymbols for special node kinds. */
+ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
+ if (ts.isTypeKeyword(node.kind)) {
+ return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
+ }
// Labels
if (ts.isLabelName(node)) {
if (ts.isJumpStatementTarget(node)) {
var labelDefinition = ts.getTargetLabel(node.parent, node.text);
// if we have a label definition, look within its statement for references, if not, then
// the label is undefined and we have no results..
- return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined;
+ return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition);
}
else {
// it is a label definition and not a target, search within the parent labeledStatement
@@ -69311,129 +75098,164 @@ var ts;
}
}
if (ts.isThis(node)) {
- return getReferencesForThisKeyword(node, sourceFiles);
+ return getReferencesForThisKeyword(node, sourceFiles, cancellationToken);
}
if (node.kind === 96 /* SuperKeyword */) {
return getReferencesForSuperKeyword(node);
}
- }
- // `getSymbolAtLocation` normally returns the symbol of the class when given the constructor keyword,
- // so we have to specify that we want the constructor symbol.
- var symbol = typeChecker.getSymbolAtLocation(node);
- if (!implementations && !symbol && node.kind === 9 /* StringLiteral */) {
- return getReferencesForStringLiteral(node, sourceFiles);
- }
- // Could not find a symbol e.g. unknown identifier
- if (!symbol) {
- // Can't have references to something that we have no symbol for.
return undefined;
}
- var declarations = symbol.declarations;
- // The symbol was an internal symbol and does not have a declaration e.g. undefined symbol
- if (!declarations || !declarations.length) {
- return undefined;
- }
- var result;
- // Compute the meaning from the location and the symbol it references
- var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), declarations);
- // Get the text to search for.
- // Note: if this is an external module symbol, the name doesn't include quotes.
- var declaredName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- // Try to get the smallest valid scope that we can limit our search to;
- // otherwise we'll need to search globally (i.e. include each file).
- var scope = getSymbolScope(symbol);
- // Maps from a symbol ID to the ReferencedSymbol entry in 'result'.
- var symbolToIndex = [];
- if (scope) {
- result = [];
- getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
- }
- else {
- var internedName = getInternedName(symbol, node);
- for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
- var sourceFile = sourceFiles_8[_i];
- cancellationToken.throwIfCancellationRequested();
- var nameTable = ts.getNameTable(sourceFile);
- if (nameTable[internedName] !== undefined) {
- result = result || [];
- getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex);
+ /** Core find-all-references algorithm for a normal symbol. */
+ function getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options) {
+ symbol = skipPastExportOrImportSpecifier(symbol, node, checker);
+ // Compute the meaning from the location and the symbol it references
+ var searchMeaning = getIntersectingMeaningFromDeclarations(ts.getMeaningFromLocation(node), symbol.declarations);
+ var result = [];
+ var state = createState(sourceFiles, node, checker, cancellationToken, searchMeaning, options, result);
+ var search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: populateSearchSymbolSet(symbol, node, checker, options.implementations) });
+ // Try to get the smallest valid scope that we can limit our search to;
+ // otherwise we'll need to search globally (i.e. include each file).
+ var scope = getSymbolScope(symbol);
+ if (scope) {
+ getReferencesInContainer(scope, scope.getSourceFile(), search, state);
+ }
+ else {
+ // Global search
+ for (var _i = 0, _a = state.sourceFiles; _i < _a.length; _i++) {
+ var sourceFile = _a[_i];
+ state.cancellationToken.throwIfCancellationRequested();
+ searchForName(sourceFile, search, state);
}
}
+ return result;
}
- return result;
- function getDefinition(symbol) {
- var info = ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, node.getSourceFile(), ts.getContainerNode(node), node);
- var name = ts.map(info.displayParts, function (p) { return p.text; }).join("");
- var declarations = symbol.declarations;
- if (!declarations || declarations.length === 0) {
- return undefined;
+ /** Handle a few special cases relating to export/import specifiers. */
+ function skipPastExportOrImportSpecifier(symbol, node, checker) {
+ var parent = node.parent;
+ if (ts.isExportSpecifier(parent)) {
+ return getLocalSymbolForExportSpecifier(node, symbol, parent, checker);
}
- return {
- containerKind: "",
- containerName: "",
- name: name,
- kind: info.symbolKind,
- fileName: declarations[0].getSourceFile().fileName,
- textSpan: ts.createTextSpan(declarations[0].getStart(), 0),
- displayParts: info.displayParts
- };
+ if (ts.isImportSpecifier(parent) && parent.propertyName === node) {
+ // We're at `foo` in `import { foo as bar }`. Probably intended to find all refs on the original, not just on the import.
+ return checker.getImmediateAliasedSymbol(symbol);
+ }
+ return symbol;
}
- function getAliasSymbolForPropertyNameSymbol(symbol, location) {
- if (symbol.flags & 8388608 /* Alias */) {
- // Default import get alias
- var defaultImport = ts.getDeclarationOfKind(symbol, 236 /* ImportClause */);
- if (defaultImport) {
- return typeChecker.getAliasedSymbol(symbol);
- }
- var importOrExportSpecifier = ts.forEach(symbol.declarations, function (declaration) { return (declaration.kind === 239 /* ImportSpecifier */ ||
- declaration.kind === 243 /* ExportSpecifier */) ? declaration : undefined; });
- if (importOrExportSpecifier &&
- // export { a }
- (!importOrExportSpecifier.propertyName ||
- // export {a as class } where a is location
- importOrExportSpecifier.propertyName === location)) {
- // If Import specifier -> get alias
- // else Export specifier -> get local target
- return importOrExportSpecifier.kind === 239 /* ImportSpecifier */ ?
- typeChecker.getAliasedSymbol(symbol) :
- typeChecker.getExportSpecifierLocalTargetSymbol(importOrExportSpecifier);
+ function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
+ var symbolIdToReferences = [];
+ var inheritsFromCache = ts.createMap();
+ // Source file ID → symbol ID → Whether the symbol has been searched for in the source file.
+ var sourceFileToSeenSymbols = [];
+ var isForConstructor = originalLocation.kind === 122 /* ConstructorKeyword */;
+ var importTracker;
+ return __assign({}, options, { sourceFiles: sourceFiles, isForConstructor: isForConstructor, checker: checker, cancellationToken: cancellationToken, searchMeaning: searchMeaning, inheritsFromCache: inheritsFromCache, getImportSearches: getImportSearches, createSearch: createSearch, referenceAdder: referenceAdder, addStringOrCommentReference: addStringOrCommentReference,
+ markSearchedSymbol: markSearchedSymbol, markSeenContainingTypeReference: ts.nodeSeenTracker(), markSeenReExportRHS: ts.nodeSeenTracker() });
+ function getImportSearches(exportSymbol, exportInfo) {
+ if (!importTracker)
+ importTracker = FindAllReferences.createImportTracker(sourceFiles, checker, cancellationToken);
+ return importTracker(exportSymbol, exportInfo, options.isForRename);
+ }
+ function createSearch(location, symbol, comingFrom, searchOptions) {
+ if (searchOptions === void 0) { searchOptions = {}; }
+ // Note: if this is an external module symbol, the name doesn't include quotes.
+ var _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(checker, symbol, location)) : _a, _b = searchOptions.allSearchSymbols, allSearchSymbols = _b === void 0 ? undefined : _b;
+ var escapedText = ts.escapeIdentifier(text);
+ var parents = options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, checker);
+ return { location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents, includes: includes };
+ function includes(referenceSymbol) {
+ return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol;
+ }
+ }
+ function referenceAdder(referenceSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(referenceSymbol);
+ var references = symbolIdToReferences[symbolId];
+ if (!references) {
+ references = symbolIdToReferences[symbolId] = [];
+ result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ }
+ return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
+ }
+ function addStringOrCommentReference(fileName, textSpan) {
+ result.push({
+ definition: undefined,
+ references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
+ });
+ }
+ function markSearchedSymbol(sourceFile, symbol) {
+ var sourceId = ts.getNodeId(sourceFile);
+ var symbolId = ts.getSymbolId(symbol);
+ var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
+ }
+ }
+ /** Search for all imports of a given exported symbol using `State.getImportSearches`. */
+ function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
+ var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
+ // For `import { foo as bar }` just add the reference to `foo`, and don't otherwise search in the file.
+ if (singleReferences.length) {
+ var addRef = state.referenceAdder(exportSymbol, exportLocation);
+ for (var _i = 0, singleReferences_1 = singleReferences; _i < singleReferences_1.length; _i++) {
+ var singleRef = singleReferences_1[_i];
+ addRef(singleRef);
+ }
+ }
+ // For each import, find all references to that import in its source file.
+ for (var _b = 0, importSearches_1 = importSearches; _b < importSearches_1.length; _b++) {
+ var _c = importSearches_1[_b], importLocation = _c[0], importSymbol = _c[1];
+ getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1 /* Export */), state);
+ }
+ if (indirectUsers.length) {
+ var indirectSearch = void 0;
+ switch (exportInfo.exportKind) {
+ case 0 /* Named */:
+ indirectSearch = state.createSearch(exportLocation, exportSymbol, 1 /* Export */);
+ break;
+ case 1 /* Default */:
+ // Search for a property access to '.default'. This can't be renamed.
+ indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" });
+ break;
+ case 2 /* ExportEquals */:
+ break;
+ }
+ if (indirectSearch) {
+ for (var _d = 0, indirectUsers_1 = indirectUsers; _d < indirectUsers_1.length; _d++) {
+ var indirectUser = indirectUsers_1[_d];
+ searchForName(indirectUser, indirectSearch, state);
+ }
}
}
- return undefined;
}
- function followAliasIfNecessary(symbol, location) {
- return getAliasSymbolForPropertyNameSymbol(symbol, location) || symbol;
+ // Go to the symbol we imported from and find references for it.
+ function searchForImportedSymbol(symbol, state) {
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ getReferencesInSourceFile(declaration.getSourceFile(), state.createSearch(declaration, symbol, 0 /* Import */), state);
+ }
+ }
+ /** Search for all occurences of an identifier in a source file (and filter out the ones that match). */
+ function searchForName(sourceFile, search, state) {
+ if (ts.getNameTable(sourceFile).get(search.escapedText) !== undefined) {
+ getReferencesInSourceFile(sourceFile, search, state);
+ }
}
- function getPropertySymbolOfDestructuringAssignment(location) {
+ function getPropertySymbolOfDestructuringAssignment(location, checker) {
return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) &&
- typeChecker.getPropertySymbolOfDestructuringAssignment(location);
+ checker.getPropertySymbolOfDestructuringAssignment(location);
}
function isObjectBindingPatternElementWithoutPropertyName(symbol) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174 /* BindingElement */);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */);
return bindingElement &&
- bindingElement.parent.kind === 172 /* ObjectBindingPattern */ &&
+ bindingElement.parent.kind === 173 /* ObjectBindingPattern */ &&
!bindingElement.propertyName;
}
- function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol) {
+ function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) {
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
- var bindingElement = ts.getDeclarationOfKind(symbol, 174 /* BindingElement */);
- var typeOfPattern = typeChecker.getTypeAtLocation(bindingElement.parent);
- return typeOfPattern && typeChecker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
+ var bindingElement = ts.getDeclarationOfKind(symbol, 175 /* BindingElement */);
+ var typeOfPattern = checker.getTypeAtLocation(bindingElement.parent);
+ return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text);
}
return undefined;
}
- function getInternedName(symbol, location) {
- // If this is an export or import specifier it could have been renamed using the 'as' syntax.
- // If so we want to search for whatever under the cursor.
- if (ts.isImportOrExportSpecifierName(location)) {
- return location.getText();
- }
- // Try to get the local symbol if we're dealing with an 'export default'
- // since that symbol has the "true" name.
- var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol);
- symbol = localExportDefaultSymbol || symbol;
- return ts.stripQuotes(symbol.name);
- }
/**
* Determines the smallest scope in which a symbol may have named references.
* Note that not every construct has been accounted for. This function can
@@ -69445,55 +75267,57 @@ var ts;
function getSymbolScope(symbol) {
// If this is the symbol of a named function expression or named class expression,
// then named references are limited to its own scope.
- var valueDeclaration = symbol.valueDeclaration;
- if (valueDeclaration && (valueDeclaration.kind === 184 /* FunctionExpression */ || valueDeclaration.kind === 197 /* ClassExpression */)) {
+ var declarations = symbol.declarations, flags = symbol.flags, parent = symbol.parent, valueDeclaration = symbol.valueDeclaration;
+ if (valueDeclaration && (valueDeclaration.kind === 185 /* FunctionExpression */ || valueDeclaration.kind === 198 /* ClassExpression */)) {
return valueDeclaration;
}
+ if (!declarations) {
+ return undefined;
+ }
// If this is private property or method, the scope is the containing class
- if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) {
- var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (ts.getModifierFlags(d) & 8 /* Private */) ? d : undefined; });
+ if (flags & (4 /* Property */ | 8192 /* Method */)) {
+ var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); });
if (privateDeclaration) {
- return ts.getAncestor(privateDeclaration, 226 /* ClassDeclaration */);
+ return ts.getAncestor(privateDeclaration, 228 /* ClassDeclaration */);
}
}
- // If the symbol is an import we would like to find it if we are looking for what it imports.
- // So consider it visible outside its declaration scope.
- if (symbol.flags & 8388608 /* Alias */) {
- return undefined;
- }
// If symbol is of object binding pattern element without property name we would want to
// look for property too and that could be anywhere
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
}
- // if this symbol is visible from its parent container, e.g. exported, then bail out
- // if symbol correspond to the union property - bail out
- if (symbol.parent || (symbol.flags & 268435456 /* SyntheticProperty */)) {
+ // If the symbol has a parent, it's globally visible.
+ // Unless that parent is an external module, then we should only search in the module (and recurse on the export later).
+ // But if the parent is a module that has `export as namespace`, then the symbol *is* globally visible.
+ if (parent && !((parent.flags & 1536 /* Module */) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
+ return undefined;
+ }
+ // If this is a synthetic property, it's a property and must be searched for globally.
+ if ((flags & 134217728 /* Transient */ && symbol.checkFlags & 6 /* Synthetic */)) {
return undefined;
}
var scope;
- var declarations = symbol.getDeclarations();
- if (declarations) {
- for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
- var declaration = declarations_7[_i];
- var container = ts.getContainerNode(declaration);
- if (!container) {
- return undefined;
- }
- if (scope && scope !== container) {
- // Different declarations have different containers, bail out
- return undefined;
- }
- if (container.kind === 261 /* SourceFile */ && !ts.isExternalModule(container)) {
- // This is a global variable and not an external module, any declaration defined
- // within this scope is visible outside the file
- return undefined;
- }
- // The search scope is the container node
- scope = container;
+ for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
+ var declaration = declarations_10[_i];
+ var container = ts.getContainerNode(declaration);
+ if (scope && scope !== container) {
+ // Different declarations have different containers, bail out
+ return undefined;
+ }
+ if (!container || container.kind === 264 /* SourceFile */ && !ts.isExternalOrCommonJsModule(container)) {
+ // This is a global variable and not an external module, any declaration defined
+ // within this scope is visible outside the file
+ return undefined;
}
+ // The search scope is the container node
+ scope = container;
}
- return scope;
+ // If symbol.parent, this means we are in an export of an external module. (Otherwise we would have returned `undefined` above.)
+ // For an export of a module, we may be in a declaration file, and it may be accessed elsewhere. E.g.:
+ // declare module "a" { export type T = number; }
+ // declare module "b" { import { T } from "a"; export const x: T; }
+ // So we must search the whole source file. (Because we will mark the source file as seen, we we won't return to it when searching for imports.)
+ return parent ? scope.getSourceFile() : scope;
}
function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
var positions = [];
@@ -69508,7 +75332,6 @@ var ts;
var symbolNameLength = symbolName.length;
var position = text.indexOf(symbolName, start);
while (position >= 0) {
- cancellationToken.throwIfCancellationRequested();
// If we are past the end, stop looking
if (position > end)
break;
@@ -69529,279 +75352,320 @@ var ts;
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
+ var position = possiblePositions_1[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.getWidth() !== labelName.length) {
- return;
+ continue;
}
// Only pick labels that are either the target label, or have a target that is the target label
if (node === targetLabel ||
(ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = {
- containerKind: "",
- containerName: "",
- fileName: targetLabel.getSourceFile().fileName,
- kind: ts.ScriptElementKind.label,
- name: labelName,
- textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()),
- displayParts: [ts.displayPart(labelName, ts.SymbolDisplayPartKind.text)]
- };
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "label", node: targetLabel }, references: references }];
}
function isValidReferencePosition(node, searchSymbolName) {
- if (node) {
- // Compare the length so we filter out strict superstrings of the symbol we are looking for
- switch (node.kind) {
- case 70 /* Identifier */:
- return node.getWidth() === searchSymbolName.length;
- case 9 /* StringLiteral */:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- isNameOfExternalModuleImportOrDeclaration(node)) {
- // For string literals we have two additional chars for the quotes
- return node.getWidth() === searchSymbolName.length + 2;
- }
- break;
- case 8 /* NumericLiteral */:
- if (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
- return node.getWidth() === searchSymbolName.length;
- }
- break;
+ // Compare the length so we filter out strict superstrings of the symbol we are looking for
+ switch (node && node.kind) {
+ case 70 /* Identifier */:
+ return node.getWidth() === searchSymbolName.length;
+ case 9 /* StringLiteral */:
+ return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
+ // For string literals we have two additional chars for the quotes
+ node.getWidth() === searchSymbolName.length + 2;
+ case 8 /* NumericLiteral */:
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ default:
+ return false;
+ }
+ }
+ function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken) {
+ var references = [];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
+ cancellationToken.throwIfCancellationRequested();
+ addReferencesForKeywordInFile(sourceFile, keywordKind, ts.tokenToString(keywordKind), references);
+ }
+ return references.length ? [{ definition: { type: "keyword", node: references[0].node }, references: references }] : undefined;
+ }
+ function addReferencesForKeywordInFile(sourceFile, kind, searchText, references) {
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile.getStart(), sourceFile.getEnd());
+ for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
+ var position = possiblePositions_2[_i];
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (referenceLocation.kind === kind) {
+ references.push(FindAllReferences.nodeEntry(referenceLocation));
}
}
- return false;
}
- /** Search within node "container" for references for a search value, where the search value is defined as a
- * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning).
- * searchLocation: a node where the search value
- */
- function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) {
- var sourceFile = container.getSourceFile();
- var start = findInComments ? container.getFullStart() : container.getStart();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, start, container.getEnd());
- var parents = getParentSymbolsOfPropertyAccess();
- var inheritsFromCache = ts.createMap();
- if (possiblePositions.length) {
- // Build the set of symbols to search for, initially it has only the current symbol
- var searchSymbols_1 = populateSearchSymbolSet(searchSymbol, searchLocation);
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
- if (!isValidReferencePosition(referenceLocation, searchText)) {
- // This wasn't the start of a token. Check to see if it might be a
- // match in a comment or string if that's what the caller is asking
- // for.
- if (!implementations && ((findInStrings && ts.isInString(sourceFile, position)) ||
- (findInComments && ts.isInNonReferenceComment(sourceFile, position)))) {
- // In the case where we're looking inside comments/strings, we don't have
- // an actual definition. So just use 'undefined' here. Features like
- // 'Rename' won't care (as they ignore the definitions), and features like
- // 'FindReferences' will just filter out these results.
- result.push({
- definition: undefined,
- references: [{
- fileName: sourceFile.fileName,
- textSpan: ts.createTextSpan(position, searchText.length),
- isWriteAccess: false,
- isDefinition: false
- }]
- });
- }
- return;
- }
- if (!(ts.getMeaningFromLocation(referenceLocation) & searchMeaning)) {
- return;
- }
- var referenceSymbol = typeChecker.getSymbolAtLocation(referenceLocation);
- if (referenceSymbol) {
- var referenceSymbolDeclaration = referenceSymbol.valueDeclaration;
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(referenceSymbolDeclaration);
- var relatedSymbol = getRelatedSymbol(searchSymbols_1, referenceSymbol, referenceLocation,
- /*searchLocationIsConstructor*/ searchLocation.kind === 122 /* ConstructorKeyword */, parents, inheritsFromCache);
- if (relatedSymbol) {
- addReferenceToRelatedSymbol(referenceLocation, relatedSymbol);
- }
- else if (!(referenceSymbol.flags & 67108864 /* Transient */) && searchSymbols_1.indexOf(shorthandValueSymbol) >= 0) {
- addReferenceToRelatedSymbol(referenceSymbolDeclaration.name, shorthandValueSymbol);
- }
- else if (searchLocation.kind === 122 /* ConstructorKeyword */) {
- findAdditionalConstructorReferences(referenceSymbol, referenceLocation);
- }
- }
- });
+ function getReferencesInSourceFile(sourceFile, search, state) {
+ state.cancellationToken.throwIfCancellationRequested();
+ return getReferencesInContainer(sourceFile, sourceFile, search, state);
+ }
+ /**
+ * Search within node "container" for references for a search value, where the search value is defined as a
+ * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning).
+ * searchLocation: a node where the search value
+ */
+ function getReferencesInContainer(container, sourceFile, search, state) {
+ if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
+ return;
}
- return;
- /* If we are just looking for implementations and this is a property access expression, we need to get the
- * symbol of the local type of the symbol the property is being accessed on. This is because our search
- * symbol may have a different parent symbol if the local type's symbol does not declare the property
- * being accessed (i.e. it is declared in some parent class or interface)
- */
- function getParentSymbolsOfPropertyAccess() {
- if (implementations) {
- var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(searchLocation);
- if (propertyAccessExpression) {
- var localParentType = typeChecker.getTypeAtLocation(propertyAccessExpression.expression);
- if (localParentType) {
- if (localParentType.symbol && localParentType.symbol.flags & (32 /* Class */ | 64 /* Interface */) && localParentType.symbol !== searchSymbol.parent) {
- return [localParentType.symbol];
- }
- else if (localParentType.flags & 196608 /* UnionOrIntersection */) {
- return getSymbolsForClassAndInterfaceComponents(localParentType);
- }
- }
- }
+ var start = state.findInComments ? container.getFullStart() : container.getStart();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, search.text, start, container.getEnd());
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ getReferencesAtLocation(sourceFile, position, search, state);
+ }
+ }
+ function getReferencesAtLocation(sourceFile, position, search, state) {
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ if (!isValidReferencePosition(referenceLocation, search.text)) {
+ // This wasn't the start of a token. Check to see if it might be a
+ // match in a comment or string if that's what the caller is asking
+ // for.
+ if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ // In the case where we're looking inside comments/strings, we don't have
+ // an actual definition. So just use 'undefined' here. Features like
+ // 'Rename' won't care (as they ignore the definitions), and features like
+ // 'FindReferences' will just filter out these results.
+ state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
+ return;
}
- function getPropertyAccessExpressionFromRightHandSide(node) {
- return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ if (!(ts.getMeaningFromLocation(referenceLocation) & state.searchMeaning)) {
+ return;
}
- /** Adds references when a constructor is used with `new this()` in its own class and `super()` calls in subclasses. */
- function findAdditionalConstructorReferences(referenceSymbol, referenceLocation) {
- ts.Debug.assert(ts.isClassLike(searchSymbol.valueDeclaration));
- var referenceClass = referenceLocation.parent;
- if (referenceSymbol === searchSymbol && ts.isClassLike(referenceClass)) {
- ts.Debug.assert(referenceClass.name === referenceLocation);
- // This is the class declaration containing the constructor.
- addReferences(findOwnConstructorCalls(searchSymbol));
+ var referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation);
+ if (!referenceSymbol) {
+ return;
+ }
+ var parent = referenceLocation.parent;
+ if (ts.isImportSpecifier(parent) && parent.propertyName === referenceLocation) {
+ // This is added through `singleReferences` in ImportsResult. If we happen to see it again, don't add it again.
+ return;
+ }
+ if (ts.isExportSpecifier(parent)) {
+ ts.Debug.assert(referenceLocation.kind === 70 /* Identifier */);
+ getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent, search, state);
+ return;
+ }
+ var relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
+ if (!relatedSymbol) {
+ getReferenceForShorthandProperty(referenceSymbol, search, state);
+ return;
+ }
+ if (state.isForConstructor) {
+ findConstructorReferences(referenceLocation, sourceFile, search, state);
+ }
+ else {
+ addReference(referenceLocation, relatedSymbol, search.location, state);
+ }
+ getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
+ }
+ function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ var exportDeclaration = parent.parent;
+ var localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker);
+ if (!search.includes(localSymbol)) {
+ return;
+ }
+ if (!propertyName) {
+ addRef();
+ }
+ else if (referenceLocation === propertyName) {
+ // For `export { foo as bar } from "baz"`, "`foo`" will be added from the singleReferences for import searches of the original export.
+ // For `export { foo as bar };`, where `foo` is a local, so add it now.
+ if (!exportDeclaration.moduleSpecifier) {
+ addRef();
}
- else {
- // If this class appears in `extends C`, then the extending class' "super" calls are references.
- var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
- if (classExtending && ts.isClassLike(classExtending) && followAliasIfNecessary(referenceSymbol, referenceLocation) === searchSymbol) {
- addReferences(superConstructorAccesses(classExtending));
- }
+ if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ addReference(name, referenceSymbol, name, state);
}
}
- function addReferences(references) {
- if (references.length) {
- var referencedSymbol = getReferencedSymbol(searchSymbol);
- ts.addRange(referencedSymbol.references, ts.map(references, getReferenceEntryFromNode));
+ else {
+ if (state.markSeenReExportRHS(referenceLocation)) {
+ addRef();
}
}
- /** `classSymbol` is the class where the constructor was defined.
- * Reference the constructor and all calls to `new this()`.
+ // For `export { foo as bar }`, rename `foo`, but not `bar`.
+ if (!(referenceLocation === propertyName && state.isForRename)) {
+ var exportKind = referenceLocation.originalKeywordKind === 78 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */;
+ var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
+ ts.Debug.assert(!!exportInfo);
+ searchForImportsOfExport(referenceLocation, referenceSymbol, exportInfo, state);
+ }
+ // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`.
+ if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName) {
+ searchForImportedSymbol(state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier), state);
+ }
+ function addRef() {
+ addReference(referenceLocation, localSymbol, search.location, state);
+ }
+ }
+ function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) {
+ return isExportSpecifierAlias(referenceLocation, exportSpecifier) ? checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) : referenceSymbol;
+ }
+ function isExportSpecifierAlias(referenceLocation, exportSpecifier) {
+ var parent = exportSpecifier.parent, propertyName = exportSpecifier.propertyName, name = exportSpecifier.name;
+ ts.Debug.assert(propertyName === referenceLocation || name === referenceLocation);
+ if (propertyName) {
+ // Given `export { foo as bar } [from "someModule"]`: It's an alias at `foo`, but at `bar` it's a new symbol.
+ return propertyName === referenceLocation;
+ }
+ else {
+ // `export { foo } from "foo"` is a re-export.
+ // `export { foo };` is not a re-export, it creates an alias for the local variable `foo`.
+ return !parent.parent.moduleSpecifier;
+ }
+ }
+ function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) {
+ var importOrExport = FindAllReferences.getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1 /* Export */);
+ if (!importOrExport)
+ return;
+ var symbol = importOrExport.symbol;
+ if (importOrExport.kind === 0 /* Import */) {
+ if (!state.isForRename || importOrExport.isNamedImport) {
+ searchForImportedSymbol(symbol, state);
+ }
+ }
+ else {
+ // We don't check for `state.isForRename`, even for default exports, because importers that previously matched the export name should be updated to continue matching.
+ searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state);
+ }
+ }
+ function getReferenceForShorthandProperty(_a, search, state) {
+ var flags = _a.flags, valueDeclaration = _a.valueDeclaration;
+ var shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration);
+ /*
+ * Because in short-hand property assignment, an identifier which stored as name of the short-hand property assignment
+ * has two meanings: property name and property value. Therefore when we do findAllReference at the position where
+ * an identifier is declared, the language service should return the position of the variable declaration as well as
+ * the position in short-hand property assignment excluding property accessing. However, if we do findAllReference at the
+ * position of property accessing, the referenceEntry of such position will be handled in the first case.
*/
- function findOwnConstructorCalls(classSymbol) {
- var result = [];
- for (var _i = 0, _a = classSymbol.members["__constructor"].declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150 /* Constructor */);
- var ctrKeyword = decl.getChildAt(0);
- ts.Debug.assert(ctrKeyword.kind === 122 /* ConstructorKeyword */);
- result.push(ctrKeyword);
- }
- ts.forEachProperty(classSymbol.exports, function (member) {
- var decl = member.valueDeclaration;
- if (decl && decl.kind === 149 /* MethodDeclaration */) {
- var body = decl.body;
- if (body) {
- forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) {
- if (ts.isNewExpressionTarget(thisKeyword)) {
- result.push(thisKeyword);
- }
- });
- }
- }
- });
- return result;
+ if (!(flags & 134217728 /* Transient */) && search.includes(shorthandValueSymbol)) {
+ addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ }
+ }
+ function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
+ var addRef = state.referenceAdder(relatedSymbol, searchLocation);
+ if (state.implementations) {
+ addImplementationReferences(referenceLocation, addRef, state);
}
- /** Find references to `super` in the constructor of an extending class. */
- function superConstructorAccesses(cls) {
- var symbol = cls.symbol;
- var ctr = symbol.members["__constructor"];
- if (!ctr) {
- return [];
+ else {
+ addRef(referenceLocation);
+ }
+ }
+ /** Adds references when a constructor is used with `new this()` in its own class and `super()` calls in subclasses. */
+ function findConstructorReferences(referenceLocation, sourceFile, search, state) {
+ if (ts.isNewExpressionTarget(referenceLocation)) {
+ addReference(referenceLocation, search.symbol, search.location, state);
+ }
+ var pusher = state.referenceAdder(search.symbol, search.location);
+ if (ts.isClassLike(referenceLocation.parent)) {
+ ts.Debug.assert(referenceLocation.parent.name === referenceLocation);
+ // This is the class declaration containing the constructor.
+ findOwnConstructorReferences(search.symbol, sourceFile, pusher);
+ }
+ else {
+ // If this class appears in `extends C`, then the extending class' "super" calls are references.
+ var classExtending = tryGetClassByExtendingIdentifier(referenceLocation);
+ if (classExtending && ts.isClassLike(classExtending)) {
+ findSuperConstructorAccesses(classExtending, pusher);
}
- var result = [];
- for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
- var decl = _a[_i];
- ts.Debug.assert(decl.kind === 150 /* Constructor */);
+ }
+ }
+ function getPropertyAccessExpressionFromRightHandSide(node) {
+ return ts.isRightSideOfPropertyAccess(node) && node.parent;
+ }
+ /**
+ * `classSymbol` is the class where the constructor was defined.
+ * Reference the constructor and all calls to `new this()`.
+ */
+ function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {
+ for (var _i = 0, _a = classSymbol.members.get("__constructor").declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ var ctrKeyword = ts.findChildOfKind(decl, 122 /* ConstructorKeyword */, sourceFile);
+ ts.Debug.assert(decl.kind === 151 /* Constructor */ && !!ctrKeyword);
+ addNode(ctrKeyword);
+ }
+ classSymbol.exports.forEach(function (member) {
+ var decl = member.valueDeclaration;
+ if (decl && decl.kind === 150 /* MethodDeclaration */) {
var body = decl.body;
if (body) {
- forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) {
- if (ts.isCallExpressionTarget(node)) {
- result.push(node);
+ forEachDescendantOfKind(body, 98 /* ThisKeyword */, function (thisKeyword) {
+ if (ts.isNewExpressionTarget(thisKeyword)) {
+ addNode(thisKeyword);
}
});
}
}
- ;
- return result;
+ });
+ }
+ /** Find references to `super` in the constructor of an extending class. */
+ function findSuperConstructorAccesses(cls, addNode) {
+ var symbol = cls.symbol;
+ var ctr = symbol.members.get("__constructor");
+ if (!ctr) {
+ return;
}
- function getReferencedSymbol(symbol) {
- var symbolId = ts.getSymbolId(symbol);
- var index = symbolToIndex[symbolId];
- if (index === undefined) {
- index = result.length;
- symbolToIndex[symbolId] = index;
- result.push({
- definition: getDefinition(symbol),
- references: []
+ for (var _i = 0, _a = ctr.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ ts.Debug.assert(decl.kind === 151 /* Constructor */);
+ var body = decl.body;
+ if (body) {
+ forEachDescendantOfKind(body, 96 /* SuperKeyword */, function (node) {
+ if (ts.isCallExpressionTarget(node)) {
+ addNode(node);
+ }
});
}
- return result[index];
- }
- function addReferenceToRelatedSymbol(node, relatedSymbol) {
- var references = getReferencedSymbol(relatedSymbol).references;
- if (implementations) {
- getImplementationReferenceEntryForNode(node, references);
- }
- else {
- references.push(getReferenceEntryFromNode(node));
- }
}
}
- function getImplementationReferenceEntryForNode(refNode, result) {
+ function addImplementationReferences(refNode, addReference, state) {
// Check if we found a function/propertyAssignment/method with an implementation or initializer
if (ts.isDeclarationName(refNode) && isImplementation(refNode.parent)) {
- result.push(getReferenceEntryFromNode(refNode.parent));
+ addReference(refNode.parent);
+ return;
}
- else if (refNode.kind === 70 /* Identifier */) {
- if (refNode.parent.kind === 258 /* ShorthandPropertyAssignment */) {
- // Go ahead and dereference the shorthand assignment by going to its definition
- getReferenceEntriesForShorthandPropertyAssignment(refNode, typeChecker, result);
- }
- // Check if the node is within an extends or implements clause
- var containingClass = getContainingClassIfInHeritageClause(refNode);
- if (containingClass) {
- result.push(getReferenceEntryFromNode(containingClass));
- return;
- }
- // If we got a type reference, try and see if the reference applies to any expressions that can implement an interface
- var containingTypeReference = getContainingTypeReference(refNode);
- if (containingTypeReference) {
- var parent_18 = containingTypeReference.parent;
- if (ts.isVariableLike(parent_18) && parent_18.type === containingTypeReference && parent_18.initializer && isImplementationExpression(parent_18.initializer)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.initializer));
- }
- else if (ts.isFunctionLike(parent_18) && parent_18.type === containingTypeReference && parent_18.body) {
- if (parent_18.body.kind === 204 /* Block */) {
- ts.forEachReturnStatement(parent_18.body, function (returnStatement) {
- if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
- maybeAdd(getReferenceEntryFromNode(returnStatement.expression));
- }
- });
- }
- else if (isImplementationExpression(parent_18.body)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.body));
- }
+ if (refNode.kind !== 70 /* Identifier */) {
+ return;
+ }
+ if (refNode.parent.kind === 261 /* ShorthandPropertyAssignment */) {
+ // Go ahead and dereference the shorthand assignment by going to its definition
+ getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference);
+ }
+ // Check if the node is within an extends or implements clause
+ var containingClass = getContainingClassIfInHeritageClause(refNode);
+ if (containingClass) {
+ addReference(containingClass);
+ return;
+ }
+ // If we got a type reference, try and see if the reference applies to any expressions that can implement an interface
+ var containingTypeReference = getContainingTypeReference(refNode);
+ if (containingTypeReference && state.markSeenContainingTypeReference(containingTypeReference)) {
+ var parent = containingTypeReference.parent;
+ if (ts.isVariableLike(parent) && parent.type === containingTypeReference && parent.initializer && isImplementationExpression(parent.initializer)) {
+ addReference(parent.initializer);
+ }
+ else if (ts.isFunctionLike(parent) && parent.type === containingTypeReference && parent.body) {
+ if (parent.body.kind === 206 /* Block */) {
+ ts.forEachReturnStatement(parent.body, function (returnStatement) {
+ if (returnStatement.expression && isImplementationExpression(returnStatement.expression)) {
+ addReference(returnStatement.expression);
+ }
+ });
}
- else if (ts.isAssertionExpression(parent_18) && isImplementationExpression(parent_18.expression)) {
- maybeAdd(getReferenceEntryFromNode(parent_18.expression));
+ else if (isImplementationExpression(parent.body)) {
+ addReference(parent.body);
}
}
- }
- // Type nodes can contain multiple references to the same type. For example:
- // let x: Foo & (Foo & Bar) = ...
- // Because we are returning the implementation locations and not the identifier locations,
- // duplicate entries would be returned here as each of the type references is part of
- // the same implementation. For that reason, check before we add a new entry
- function maybeAdd(a) {
- if (!ts.forEach(result, function (b) { return a.fileName === b.fileName && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; })) {
- result.push(a);
+ else if (ts.isAssertionExpression(parent) && isImplementationExpression(parent.expression)) {
+ addReference(parent.expression);
}
}
}
@@ -69830,12 +75694,12 @@ var ts;
}
function getContainingClassIfInHeritageClause(node) {
if (node && node.parent) {
- if (node.kind === 199 /* ExpressionWithTypeArguments */
- && node.parent.kind === 255 /* HeritageClause */
+ if (node.kind === 200 /* ExpressionWithTypeArguments */
+ && node.parent.kind === 258 /* HeritageClause */
&& ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
- else if (node.kind === 70 /* Identifier */ || node.kind === 177 /* PropertyAccessExpression */) {
+ else if (node.kind === 70 /* Identifier */ || node.kind === 178 /* PropertyAccessExpression */) {
return getContainingClassIfInHeritageClause(node.parent);
}
}
@@ -69845,15 +75709,18 @@ var ts;
* Returns true if this is an expression that can be considered an implementation
*/
function isImplementationExpression(node) {
- // Unwrap parentheses
- if (node.kind === 183 /* ParenthesizedExpression */) {
- return isImplementationExpression(node.expression);
+ switch (node.kind) {
+ case 184 /* ParenthesizedExpression */:
+ return isImplementationExpression(node.expression);
+ case 186 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 177 /* ObjectLiteralExpression */:
+ case 198 /* ClassExpression */:
+ case 176 /* ArrayLiteralExpression */:
+ return true;
+ default:
+ return false;
}
- return node.kind === 185 /* ArrowFunction */ ||
- node.kind === 184 /* FunctionExpression */ ||
- node.kind === 176 /* ObjectLiteralExpression */ ||
- node.kind === 197 /* ClassExpression */ ||
- node.kind === 175 /* ArrayLiteralExpression */;
}
/**
* Determines if the parent symbol occurs somewhere in the child's ancestry. If the parent symbol
@@ -69874,7 +75741,7 @@ var ts;
* @param parent Another class or interface Symbol
* @param cachedResults A map of symbol id pairs (i.e. "child,parent") to booleans indicating previous results
*/
- function explicitlyInheritsFrom(child, parent, cachedResults) {
+ function explicitlyInheritsFrom(child, parent, cachedResults, checker) {
var parentIsInterface = parent.getFlags() & 64 /* Interface */;
return searchHierarchy(child);
function searchHierarchy(symbol) {
@@ -69882,11 +75749,12 @@ var ts;
return true;
}
var key = ts.getSymbolId(symbol) + "," + ts.getSymbolId(parent);
- if (key in cachedResults) {
- return cachedResults[key];
+ var cached = cachedResults.get(key);
+ if (cached !== undefined) {
+ return cached;
}
// Set the key so that we don't infinitely recurse
- cachedResults[key] = false;
+ cachedResults.set(key, false);
var inherits = ts.forEach(symbol.getDeclarations(), function (declaration) {
if (ts.isClassLike(declaration)) {
if (parentIsInterface) {
@@ -69902,19 +75770,19 @@ var ts;
}
return searchTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
}
- else if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ else if (declaration.kind === 229 /* InterfaceDeclaration */) {
if (parentIsInterface) {
return ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), searchTypeReference);
}
}
return false;
});
- cachedResults[key] = inherits;
+ cachedResults.set(key, inherits);
return inherits;
}
function searchTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type && type.symbol) {
return searchHierarchy(type.symbol);
}
@@ -69930,13 +75798,13 @@ var ts;
// Whether 'super' occurs in a static context within a class.
var staticFlag = 32 /* Static */;
switch (searchSpaceNode.kind) {
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class
break;
@@ -69946,49 +75814,48 @@ var ts;
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
var node = ts.getTouchingWord(sourceFile, position);
if (!node || node.kind !== 96 /* SuperKeyword */) {
- return;
+ continue;
}
var container = ts.getSuperContainer(node, /*stopOnFunctions*/ false);
// If we have a 'super' container, we must have an enclosing class.
// Now make sure the owning class is the same as the search-space
// and has the same static qualifier as the original 'super's owner.
if (container && (32 /* Static */ & ts.getModifierFlags(container)) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) {
- references.push(getReferenceEntryFromNode(node));
+ references.push(FindAllReferences.nodeEntry(node));
}
- });
- var definition = getDefinition(searchSpaceNode.symbol);
- return [{ definition: definition, references: references }];
+ }
+ return [{ definition: { type: "symbol", symbol: searchSpaceNode.symbol, node: superKeyword }, references: references }];
}
- function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) {
+ function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {
var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, /* includeArrowFunctions */ false);
// Whether 'this' occurs in a static context within a class.
var staticFlag = 32 /* Static */;
switch (searchSpaceNode.kind) {
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.isObjectLiteralMethod(searchSpaceNode)) {
break;
}
- // fall through
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
staticFlag &= ts.getModifierFlags(searchSpaceNode);
searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class
break;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
if (ts.isExternalModule(searchSpaceNode)) {
return undefined;
}
- // Fall through
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ // falls through
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
break;
// Computed properties in classes are not handled here because references to this are illegal,
// so there is no point finding references to them.
@@ -69997,8 +75864,9 @@ var ts;
}
var references = [];
var possiblePositions;
- if (searchSpaceNode.kind === 261 /* SourceFile */) {
+ if (searchSpaceNode.kind === 264 /* SourceFile */) {
ts.forEach(sourceFiles, function (sourceFile) {
+ cancellationToken.throwIfCancellationRequested();
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
@@ -70008,144 +75876,103 @@ var ts;
possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
- var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword);
- var displayParts = thisOrSuperSymbol && ts.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), ts.getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts;
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: "this",
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: displayParts
- },
+ definition: { type: "this", node: thisOrSuperKeyword },
references: references
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- cancellationToken.throwIfCancellationRequested();
var node = ts.getTouchingWord(sourceFile, position);
if (!node || !ts.isThis(node)) {
return;
}
var container = ts.getThisContainer(node, /* includeArrowFunctions */ false);
switch (searchSpaceNode.kind) {
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
if (searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 197 /* ClassExpression */:
- case 226 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 228 /* ClassDeclaration */:
// Make sure the container belongs to the same class
// and has the appropriate static modifier from the original container.
if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (ts.getModifierFlags(container) & 32 /* Static */) === staticFlag) {
- result.push(getReferenceEntryFromNode(node));
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
- case 261 /* SourceFile */:
- if (container.kind === 261 /* SourceFile */ && !ts.isExternalModule(container)) {
- result.push(getReferenceEntryFromNode(node));
+ case 264 /* SourceFile */:
+ if (container.kind === 264 /* SourceFile */ && !ts.isExternalModule(container)) {
+ result.push(FindAllReferences.nodeEntry(node));
}
break;
}
});
}
}
- function getReferencesForStringLiteral(node, sourceFiles) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (!type) {
- // nothing to do here. moving on
- return undefined;
- }
+ function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_9 = sourceFiles; _i < sourceFiles_9.length; _i++) {
- var sourceFile = sourceFiles_9[_i];
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, type.text, sourceFile.getStart(), sourceFile.getEnd());
- getReferencesForStringLiteralInFile(sourceFile, type, possiblePositions, references);
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_i];
+ cancellationToken.throwIfCancellationRequested();
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
- definition: {
- containerKind: "",
- containerName: "",
- fileName: node.getSourceFile().fileName,
- kind: ts.ScriptElementKind.variableElement,
- name: type.text,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
- displayParts: [ts.displayPart(ts.getTextOfNode(node), ts.SymbolDisplayPartKind.stringLiteral)]
- },
+ definition: { type: "string", node: node },
references: references
}];
- function getReferencesForStringLiteralInFile(sourceFile, searchType, possiblePositions, references) {
- for (var _i = 0, possiblePositions_1 = possiblePositions; _i < possiblePositions_1.length; _i++) {
- var position = possiblePositions_1[_i];
- cancellationToken.throwIfCancellationRequested();
- var node_2 = ts.getTouchingWord(sourceFile, position);
- if (!node_2 || node_2.kind !== 9 /* StringLiteral */) {
- return;
- }
- var type_2 = ts.getStringLiteralTypeForNode(node_2, typeChecker);
- if (type_2 === searchType) {
- references.push(getReferenceEntryFromNode(node_2));
+ function getReferencesForStringLiteralInFile(sourceFile, searchText, possiblePositions, references) {
+ for (var _i = 0, possiblePositions_5 = possiblePositions; _i < possiblePositions_5.length; _i++) {
+ var position = possiblePositions_5[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position);
+ if (node_7 && node_7.kind === 9 /* StringLiteral */ && node_7.text === searchText) {
+ references.push(FindAllReferences.nodeEntry(node_7, /*isInString*/ true));
}
}
}
}
- function populateSearchSymbolSet(symbol, location) {
+ // For certain symbol kinds, we need to include other symbols in the search set.
+ // This is not needed when searching for re-exports.
+ function populateSearchSymbolSet(symbol, location, checker, implementations) {
// The search set contains at least the current symbol
var result = [symbol];
- // If the location is name of property symbol from object literal destructuring pattern
- // Search the property symbol
- // for ( { property: p2 } of elems) { }
- var containingObjectLiteralElement = getContainingObjectLiteralElement(location);
- if (containingObjectLiteralElement && containingObjectLiteralElement.kind !== 258 /* ShorthandPropertyAssignment */) {
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(location);
- if (propertySymbol) {
- result.push(propertySymbol);
- }
- }
- // If the symbol is an alias, add what it aliases to the list
- // import {a} from "mod";
- // export {a}
- // If the symbol is an alias to default declaration, add what it aliases to the list
- // declare "mod" { export default class B { } }
- // import B from "mod";
- //// For export specifiers, the exported name can be referring to a local symbol, e.g.:
- //// import {a} from "mod";
- //// export {a as somethingElse}
- //// We want the *local* declaration of 'a' as declared in the import,
- //// *not* as declared within "mod" (or farther)
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(symbol, location);
- if (aliasSymbol) {
- result = result.concat(populateSearchSymbolSet(aliasSymbol, location));
- }
- // If the location is in a context sensitive location (i.e. in an object literal) try
- // to get a contextual type for it, and add the property symbol from the contextual
- // type to the search set
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(location);
if (containingObjectLiteralElement) {
- ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- ts.addRange(result, typeChecker.getRootSymbols(contextualSymbol));
+ // If the location is name of property symbol from object literal destructuring pattern
+ // Search the property symbol
+ // for ( { property: p2 } of elems) { }
+ if (containingObjectLiteralElement.kind !== 261 /* ShorthandPropertyAssignment */) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker);
+ if (propertySymbol) {
+ result.push(propertySymbol);
+ }
+ }
+ // If the location is in a context sensitive location (i.e. in an object literal) try
+ // to get a contextual type for it, and add the property symbol from the contextual
+ // type to the search set
+ ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker), function (contextualSymbol) {
+ ts.addRange(result, checker.getRootSymbols(contextualSymbol));
});
/* Because in short-hand property assignment, location has two meaning : property name and as value of the property
- * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of
- * property name and variable declaration of the identifier.
- * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service
- * should show both 'name' in 'obj' and 'name' in variable declaration
- * const name = "Foo";
- * const obj = { name };
- * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment
- * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration
- * will be included correctly.
- */
- var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent);
+ * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of
+ * property name and variable declaration of the identifier.
+ * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service
+ * should show both 'name' in 'obj' and 'name' in variable declaration
+ * const name = "Foo";
+ * const obj = { name };
+ * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment
+ * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration
+ * will be included correctly.
+ */
+ var shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent);
if (shorthandValueSymbol) {
result.push(shorthandValueSymbol);
}
@@ -70154,27 +75981,28 @@ var ts;
// we should include both parameter declaration symbol and property declaration symbol
// Parameter Declaration symbol is only visible within function scope, so the symbol is stored in constructor.locals.
// Property Declaration symbol is a member of the class, so the symbol is stored in its class Declaration.symbol.members
- if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 144 /* Parameter */ &&
+ if (symbol.valueDeclaration && symbol.valueDeclaration.kind === 145 /* Parameter */ &&
ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) {
- result = result.concat(typeChecker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
+ ts.addRange(result, checker.getSymbolsOfParameterPropertyDeclaration(symbol.valueDeclaration, symbol.name));
}
// If this is symbol of binding element without propertyName declaration in Object binding pattern
// Include the property in the search
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol);
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);
if (bindingElementPropertySymbol) {
result.push(bindingElementPropertySymbol);
}
// If this is a union property, add all the symbols from all its source symbols in all unioned types.
// If the symbol is an instantiation from a another symbol (e.g. widened symbol) , add the root the list
- ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
+ for (var _i = 0, _a = checker.getRootSymbols(symbol); _i < _a.length; _i++) {
+ var rootSymbol = _a[_i];
if (rootSymbol !== symbol) {
result.push(rootSymbol);
}
// Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions
if (!implementations && rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) {
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap());
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap(), checker);
}
- });
+ }
return result;
}
/**
@@ -70185,7 +76013,7 @@ var ts;
* @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisiting of the same symbol.
* The value of previousIterationSymbol is undefined when the function is first called.
*/
- function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache) {
+ function getPropertySymbolsFromBaseTypes(symbol, propertyName, result, previousIterationSymbolsCache, checker) {
if (!symbol) {
return;
}
@@ -70200,7 +76028,7 @@ var ts;
// the function will add any found symbol of the property-name, then its sub-routine will call
// getPropertySymbolsFromBaseTypes again to walk up any base types to prevent revisiting already
// visited symbol, interface "C", the sub-routine will pass the current symbol as previousIterationSymbol.
- if (symbol.name in previousIterationSymbolsCache) {
+ if (previousIterationSymbolsCache.has(symbol.name)) {
return;
}
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
@@ -70209,7 +76037,7 @@ var ts;
getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration));
ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference);
}
- else if (declaration.kind === 227 /* InterfaceDeclaration */) {
+ else if (declaration.kind === 229 /* InterfaceDeclaration */) {
ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference);
}
});
@@ -70217,37 +76045,30 @@ var ts;
return;
function getPropertySymbolFromTypeReference(typeReference) {
if (typeReference) {
- var type = typeChecker.getTypeAtLocation(typeReference);
+ var type = checker.getTypeAtLocation(typeReference);
if (type) {
- var propertySymbol = typeChecker.getPropertyOfType(type, propertyName);
+ var propertySymbol = checker.getPropertyOfType(type, propertyName);
if (propertySymbol) {
- result.push.apply(result, typeChecker.getRootSymbols(propertySymbol));
+ result.push.apply(result, checker.getRootSymbols(propertySymbol));
}
// Visit the typeReference as well to see if it directly or indirectly use that property
- previousIterationSymbolsCache[symbol.name] = symbol;
- getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache);
+ previousIterationSymbolsCache.set(symbol.name, symbol);
+ getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result, previousIterationSymbolsCache, checker);
}
}
}
}
- function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation, searchLocationIsConstructor, parents, cache) {
- if (ts.contains(searchSymbols, referenceSymbol)) {
- // If we are searching for constructor uses, they must be 'new' expressions.
- return (!searchLocationIsConstructor || ts.isNewExpressionTarget(referenceLocation)) && referenceSymbol;
- }
- // If the reference symbol is an alias, check if what it is aliasing is one of the search
- // symbols but by looking up for related symbol of this alias so it can handle multiple level of indirectness.
- var aliasSymbol = getAliasSymbolForPropertyNameSymbol(referenceSymbol, referenceLocation);
- if (aliasSymbol) {
- return getRelatedSymbol(searchSymbols, aliasSymbol, referenceLocation, searchLocationIsConstructor, parents, cache);
+ function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {
+ if (search.includes(referenceSymbol)) {
+ return referenceSymbol;
}
// If the reference location is in an object literal, try to get the contextual type for the
// object literal, lookup the property symbol in the contextual type, and use this symbol to
// compare to our searchSymbol
- var containingObjectLiteralElement = getContainingObjectLiteralElement(referenceLocation);
+ var containingObjectLiteralElement = ts.getContainingObjectLiteralElement(referenceLocation);
if (containingObjectLiteralElement) {
- var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) {
- return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement, state.checker), function (contextualSymbol) {
+ return ts.find(state.checker.getRootSymbols(contextualSymbol), search.includes);
});
if (contextualSymbol) {
return contextualSymbol;
@@ -70256,23 +76077,23 @@ var ts;
// Get the property symbol from the object literal's type and look if thats the search symbol
// In below eg. get 'property' from type of elems iterating type
// for ( { property: p2 } of elems) { }
- var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation);
- if (propertySymbol && searchSymbols.indexOf(propertySymbol) >= 0) {
+ var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation, state.checker);
+ if (propertySymbol && search.includes(propertySymbol)) {
return propertySymbol;
}
}
// If the reference location is the binding element and doesn't have property name
// then include the binding element in the related symbols
// let { a } : { a };
- var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol);
- if (bindingElementPropertySymbol && searchSymbols.indexOf(bindingElementPropertySymbol) >= 0) {
+ var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol, state.checker);
+ if (bindingElementPropertySymbol && search.includes(bindingElementPropertySymbol)) {
return bindingElementPropertySymbol;
}
// Unwrap symbols to get to the root (e.g. transient symbols as a result of widening)
// Or a union property, use its underlying unioned symbols
- return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) {
+ return ts.forEach(state.checker.getRootSymbols(referenceSymbol), function (rootSymbol) {
// if it is in the list, then we are done
- if (searchSymbols.indexOf(rootSymbol) >= 0) {
+ if (search.includes(rootSymbol)) {
return rootSymbol;
}
// Finally, try all properties with the same name in any type the containing type extended or implemented, and
@@ -70280,20 +76101,18 @@ var ts;
// parent symbol
if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) {
// Parents will only be defined if implementations is true
- if (parents) {
- if (!ts.forEach(parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, cache); })) {
- return undefined;
- }
+ if (search.parents && !ts.some(search.parents, function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, state.checker); })) {
+ return undefined;
}
- var result_4 = [];
- getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_4, /*previousIterationSymbolsCache*/ ts.createMap());
- return ts.forEach(result_4, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; });
+ var result = [];
+ getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result, /*previousIterationSymbolsCache*/ ts.createMap(), state.checker);
+ return ts.find(result, search.includes);
}
return undefined;
});
}
function getNameFromObjectLiteralElement(node) {
- if (node.name.kind === 142 /* ComputedPropertyName */) {
+ if (node.name.kind === 143 /* ComputedPropertyName */) {
var nameExpression = node.name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
@@ -70303,15 +76122,16 @@ var ts;
}
return node.name.text;
}
- function getPropertySymbolsFromContextualType(node) {
+ /** Gets all symbols for one property. Does not get symbols for every property. */
+ function getPropertySymbolsFromContextualType(node, checker) {
var objectLiteral = node.parent;
- var contextualType = typeChecker.getContextualType(objectLiteral);
+ var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
var result_5 = [];
- var symbol_2 = contextualType.getProperty(name);
- if (symbol_2) {
- result_5.push(symbol_2);
+ var symbol = contextualType.getProperty(name);
+ if (symbol) {
+ result_5.push(symbol);
}
if (contextualType.flags & 65536 /* Union */) {
ts.forEach(contextualType.types, function (t) {
@@ -70325,13 +76145,14 @@ var ts;
}
return undefined;
}
- /** Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations
- * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class
- * then we need to widen the search to include type positions as well.
- * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated
- * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module)
- * do not intersect in any of the three spaces.
- */
+ /**
+ * Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations
+ * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class
+ * then we need to widen the search to include type positions as well.
+ * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated
+ * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module)
+ * do not intersect in any of the three spaces.
+ */
function getIntersectingMeaningFromDeclarations(meaning, declarations) {
if (declarations) {
var lastIterationMeaning = void 0;
@@ -70342,8 +76163,8 @@ var ts;
// To achieve that we will keep iterating until the result stabilizes.
// Remember the last meaning
lastIterationMeaning = meaning;
- for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
- var declaration = declarations_8[_i];
+ for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
+ var declaration = declarations_11[_i];
var declarationMeaning = ts.getMeaningFromDeclaration(declaration);
if (declarationMeaning & meaning) {
meaning |= declarationMeaning;
@@ -70353,143 +76174,93 @@ var ts;
}
return meaning;
}
- }
- FindAllReferences.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
- function convertReferences(referenceSymbols) {
- if (!referenceSymbols) {
- return undefined;
- }
- var referenceEntries = [];
- for (var _i = 0, referenceSymbols_1 = referenceSymbols; _i < referenceSymbols_1.length; _i++) {
- var referenceSymbol = referenceSymbols_1[_i];
- ts.addRange(referenceEntries, referenceSymbol.references);
- }
- return referenceEntries;
- }
- FindAllReferences.convertReferences = convertReferences;
- function isImplementation(node) {
- if (!node) {
- return false;
- }
- else if (ts.isVariableLike(node)) {
- if (node.initializer) {
- return true;
- }
- else if (node.kind === 223 /* VariableDeclaration */) {
- var parentStatement = getParentStatementOfVariableDeclaration(node);
- return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */);
+ function isImplementation(node) {
+ if (!node) {
+ return false;
}
- }
- else if (ts.isFunctionLike(node)) {
- return !!node.body || ts.hasModifier(node, 2 /* Ambient */);
- }
- else {
- switch (node.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
+ else if (ts.isVariableLike(node)) {
+ if (node.initializer) {
return true;
+ }
+ else if (node.kind === 225 /* VariableDeclaration */) {
+ var parentStatement = getParentStatementOfVariableDeclaration(node);
+ return parentStatement && ts.hasModifier(parentStatement, 2 /* Ambient */);
+ }
}
+ else if (ts.isFunctionLike(node)) {
+ return !!node.body || ts.hasModifier(node, 2 /* Ambient */);
+ }
+ else {
+ switch (node.kind) {
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ return true;
+ }
+ }
+ return false;
}
- return false;
- }
- function getParentStatementOfVariableDeclaration(node) {
- if (node.parent && node.parent.parent && node.parent.parent.kind === 205 /* VariableStatement */) {
- ts.Debug.assert(node.parent.kind === 224 /* VariableDeclarationList */);
- return node.parent.parent;
+ function getParentStatementOfVariableDeclaration(node) {
+ if (node.parent && node.parent.parent && node.parent.parent.kind === 207 /* VariableStatement */) {
+ ts.Debug.assert(node.parent.kind === 226 /* VariableDeclarationList */);
+ return node.parent.parent;
+ }
}
- }
- function getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result) {
- var refSymbol = typeChecker.getSymbolAtLocation(node);
- var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
- if (shorthandSymbol) {
- for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (ts.getMeaningFromDeclaration(declaration) & 1 /* Value */) {
- result.push(getReferenceEntryFromNode(declaration));
+ function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference) {
+ var refSymbol = checker.getSymbolAtLocation(node);
+ var shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);
+ if (shorthandSymbol) {
+ for (var _i = 0, _a = shorthandSymbol.getDeclarations(); _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (ts.getMeaningFromDeclaration(declaration) & 1 /* Value */) {
+ addReference(declaration);
+ }
}
}
}
- }
- FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
- function getReferenceEntryFromNode(node) {
- var start = node.getStart();
- var end = node.getEnd();
- if (node.kind === 9 /* StringLiteral */) {
- start += 1;
- end -= 1;
+ Core.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
+ function forEachDescendantOfKind(node, kind, action) {
+ ts.forEachChild(node, function (child) {
+ if (child.kind === kind) {
+ action(child);
+ }
+ forEachDescendantOfKind(child, kind, action);
+ });
}
- return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(start, end),
- isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node)
- };
- }
- FindAllReferences.getReferenceEntryFromNode = getReferenceEntryFromNode;
- /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
- function isWriteAccess(node) {
- if (node.kind === 70 /* Identifier */ && ts.isDeclarationName(node)) {
- return true;
+ /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
+ function tryGetClassByExtendingIdentifier(node) {
+ return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
}
- var parent = node.parent;
- if (parent) {
- if (parent.kind === 191 /* PostfixUnaryExpression */ || parent.kind === 190 /* PrefixUnaryExpression */) {
- return true;
- }
- else if (parent.kind === 192 /* BinaryExpression */ && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 57 /* FirstAssignment */ <= operator && operator <= 69 /* LastAssignment */;
+ function isNameOfExternalModuleImportOrDeclaration(node) {
+ if (node.kind === 9 /* StringLiteral */) {
+ return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
+ return false;
}
- return false;
- }
- function forEachDescendantOfKind(node, kind, action) {
- ts.forEachChild(node, function (child) {
- if (child.kind === kind) {
- action(child);
+ /**
+ * If we are just looking for implementations and this is a property access expression, we need to get the
+ * symbol of the local type of the symbol the property is being accessed on. This is because our search
+ * symbol may have a different parent symbol if the local type's symbol does not declare the property
+ * being accessed (i.e. it is declared in some parent class or interface)
+ */
+ function getParentSymbolsOfPropertyAccess(location, symbol, checker) {
+ var propertyAccessExpression = getPropertyAccessExpressionFromRightHandSide(location);
+ if (!propertyAccessExpression) {
+ return undefined;
+ }
+ var localParentType = checker.getTypeAtLocation(propertyAccessExpression.expression);
+ if (!localParentType) {
+ return undefined;
+ }
+ if (localParentType.symbol && localParentType.symbol.flags & (32 /* Class */ | 64 /* Interface */) && localParentType.symbol !== symbol.parent) {
+ return [localParentType.symbol];
+ }
+ else if (localParentType.flags & 196608 /* UnionOrIntersection */) {
+ return getSymbolsForClassAndInterfaceComponents(localParentType);
}
- forEachDescendantOfKind(child, kind, action);
- });
- }
- /**
- * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 }
- */
- function getContainingObjectLiteralElement(node) {
- switch (node.kind) {
- case 9 /* StringLiteral */:
- case 8 /* NumericLiteral */:
- if (node.parent.kind === 142 /* ComputedPropertyName */) {
- return isObjectLiteralPropertyDeclaration(node.parent.parent) ? node.parent.parent : undefined;
- }
- // intential fall through
- case 70 /* Identifier */:
- return isObjectLiteralPropertyDeclaration(node.parent) && node.parent.name === node ? node.parent : undefined;
- }
- return undefined;
- }
- function isObjectLiteralPropertyDeclaration(node) {
- switch (node.kind) {
- case 257 /* PropertyAssignment */:
- case 258 /* ShorthandPropertyAssignment */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return true;
- }
- return false;
- }
- /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
- function tryGetClassByExtendingIdentifier(node) {
- return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);
- }
- function isNameOfExternalModuleImportOrDeclaration(node) {
- if (node.kind === 9 /* StringLiteral */) {
- return ts.isNameOfModuleDeclaration(node) || ts.isExpressionOfExternalModuleImportEqualsDeclaration(node);
}
- return false;
- }
+ })(Core = FindAllReferences.Core || (FindAllReferences.Core = {}));
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
/* @internal */
@@ -70510,11 +76281,9 @@ var ts;
// Type reference directives
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
- var referenceFile = program.getResolvedTypeReferenceDirectives()[typeReferenceDirective.fileName];
- if (referenceFile && referenceFile.resolvedFileName) {
- return [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
- }
- return undefined;
+ var referenceFile = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName);
+ return referenceFile && referenceFile.resolvedFileName &&
+ [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
var node = ts.getTouchingPropertyName(sourceFile, position);
if (node === sourceFile) {
@@ -70524,7 +76293,7 @@ var ts;
if (ts.isJumpStatementTarget(node)) {
var labelName = node.text;
var label = ts.getTargetLabel(node.parent, node.text);
- return label ? [createDefinitionInfo(label, ts.ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined;
+ return label ? [createDefinitionInfoFromName(label, ts.ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined;
}
var typeChecker = program.getTypeChecker();
var calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
@@ -70550,7 +76319,7 @@ var ts;
//
if (node.kind === 70 /* Identifier */ &&
(node.parent === declaration ||
- (declaration.kind === 239 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 238 /* NamedImports */))) {
+ (declaration.kind === 241 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 240 /* NamedImports */))) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
}
@@ -70559,7 +76328,7 @@ var ts;
// go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition
// is performed at the location of property access, we would like to go to definition of the property in the short-hand
// assignment. This case and others are handled by the following code.
- if (node.parent.kind === 258 /* ShorthandPropertyAssignment */) {
+ if (node.parent.kind === 261 /* ShorthandPropertyAssignment */) {
var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);
if (!shorthandSymbol) {
return [];
@@ -70570,6 +76339,37 @@ var ts;
var shorthandContainerName_1 = typeChecker.symbolToString(symbol.parent, node);
return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind_1, shorthandSymbolName_1, shorthandContainerName_1); });
}
+ if (ts.isJsxOpeningLikeElement(node.parent)) {
+ // If there are errors when trying to figure out stateless component function, just return the first declaration
+ // For example:
+ // declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element;
+ // declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element;
+ // declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element;
+ // let opt = <Main/*firstTarget*/Button />; // Error - We get undefined for resolved signature indicating an error, then just return the first declaration
+ var _a = getSymbolInfo(typeChecker, symbol, node), symbolName = _a.symbolName, symbolKind = _a.symbolKind, containerName = _a.containerName;
+ return [createDefinitionInfo(symbol.valueDeclaration, symbolKind, symbolName, containerName)];
+ }
+ // If the current location we want to find its definition is in an object literal, try to get the contextual type for the
+ // object literal, lookup the property symbol in the contextual type, and use this for goto-definition.
+ // For example
+ // interface Props{
+ // /*first*/prop1: number
+ // prop2: boolean
+ // }
+ // function Foo(arg: Props) {}
+ // Foo( { pr/*1*/op1: 10, prop2: true })
+ var element = ts.getContainingObjectLiteralElement(node);
+ if (element) {
+ if (typeChecker.getContextualType(element.parent)) {
+ var result = [];
+ var propertySymbols = ts.getPropertySymbolsFromContextualType(typeChecker, element);
+ for (var _i = 0, propertySymbols_1 = propertySymbols; _i < propertySymbols_1.length; _i++) {
+ var propertySymbol = propertySymbols_1[_i];
+ result.push.apply(result, getDefinitionFromSymbol(typeChecker, propertySymbol, node));
+ }
+ return result;
+ }
+ }
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
@@ -70639,31 +76439,47 @@ var ts;
return false;
}
function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) {
+ if (!signatureDeclarations) {
+ return false;
+ }
var declarations = [];
var definition;
- ts.forEach(signatureDeclarations, function (d) {
- if ((selectConstructors && d.kind === 150 /* Constructor */) ||
- (!selectConstructors && (d.kind === 225 /* FunctionDeclaration */ || d.kind === 149 /* MethodDeclaration */ || d.kind === 148 /* MethodSignature */))) {
+ for (var _i = 0, signatureDeclarations_1 = signatureDeclarations; _i < signatureDeclarations_1.length; _i++) {
+ var d = signatureDeclarations_1[_i];
+ if (selectConstructors ? d.kind === 151 /* Constructor */ : isSignatureDeclaration(d)) {
declarations.push(d);
if (d.body)
definition = d;
}
- });
- if (definition) {
- result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName));
- return true;
}
- else if (declarations.length) {
- result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
+ if (declarations.length) {
+ result.push(createDefinitionInfo(definition || ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName));
return true;
}
return false;
}
}
+ function isSignatureDeclaration(node) {
+ switch (node.kind) {
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ return true;
+ default:
+ return false;
+ }
+ }
+ /** Creates a DefinitionInfo from a Declaration, using the declaration's name if possible. */
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
+ return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ }
+ /** Creates a DefinitionInfo directly from the name of a declaration. */
+ function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
+ var sourceFile = name.getSourceFile();
return {
- fileName: node.getSourceFile().fileName,
- textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()),
+ fileName: sourceFile.fileName,
+ textSpan: ts.createTextSpanFromNode(name, sourceFile),
kind: symbolKind,
name: symbolName,
containerKind: undefined,
@@ -70711,43 +76527,17 @@ var ts;
}
function tryGetSignatureDeclaration(typeChecker, node) {
var callLike = getAncestorCallLikeExpression(node);
- return callLike && typeChecker.getResolvedSignature(callLike).declaration;
- }
- })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
-})(ts || (ts = {}));
-/* @internal */
-var ts;
-(function (ts) {
- var GoToImplementation;
- (function (GoToImplementation) {
- function getImplementationAtPosition(typeChecker, cancellationToken, sourceFiles, node) {
- // If invoked directly on a shorthand property assignment, then return
- // the declaration of the symbol being assigned (not the symbol being assigned to).
- if (node.parent.kind === 258 /* ShorthandPropertyAssignment */) {
- var result = [];
- ts.FindAllReferences.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, result);
- return result.length > 0 ? result : undefined;
- }
- else if (node.kind === 96 /* SuperKeyword */ || ts.isSuperProperty(node.parent)) {
- // References to and accesses on the super keyword only have one possible implementation, so no
- // need to "Find all References"
- var symbol = typeChecker.getSymbolAtLocation(node);
- return symbol.valueDeclaration && [ts.FindAllReferences.getReferenceEntryFromNode(symbol.valueDeclaration)];
- }
- else {
- // Perform "Find all References" and retrieve only those that are implementations
- var referencedSymbols = ts.FindAllReferences.getReferencedSymbolsForNode(typeChecker, cancellationToken, node, sourceFiles, /*findInStrings*/ false, /*findInComments*/ false, /*implementations*/ true);
- var result = ts.flatMap(referencedSymbols, function (symbol) {
- return ts.map(symbol.references, function (_a) {
- var textSpan = _a.textSpan, fileName = _a.fileName;
- return ({ textSpan: textSpan, fileName: fileName });
- });
- });
- return result && result.length > 0 ? result : undefined;
+ var signature = callLike && typeChecker.getResolvedSignature(callLike);
+ if (signature) {
+ var decl = signature.declaration;
+ if (decl && isSignatureDeclaration(decl)) {
+ return decl;
+ }
}
+ // Don't go to a function type, go to the value having that type.
+ return undefined;
}
- GoToImplementation.getImplementationAtPosition = getImplementationAtPosition;
- })(GoToImplementation = ts.GoToImplementation || (ts.GoToImplementation = {}));
+ })(GoToDefinition = ts.GoToDefinition || (ts.GoToDefinition = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
@@ -70777,6 +76567,7 @@ var ts;
"lends",
"link",
"memberOf",
+ "method",
"name",
"namespace",
"param",
@@ -70795,7 +76586,8 @@ var ts;
"prop",
"version"
];
- var jsDocCompletionEntries;
+ var jsDocTagNameCompletionEntries;
+ var jsDocTagCompletionEntries;
function getJsDocCommentsFromDeclarations(declarations) {
// Only collect doc comments from duplicate declarations once:
// In case of a union property there might be same declaration multiple times
@@ -70822,6 +76614,30 @@ var ts;
return documentationComment;
}
JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations;
+ function getJsDocTagsFromDeclarations(declarations) {
+ // Only collect doc comments from duplicate declarations once.
+ var tags = [];
+ forEachUnique(declarations, function (declaration) {
+ var jsDocs = ts.getJSDocs(declaration);
+ if (!jsDocs) {
+ return;
+ }
+ for (var _i = 0, jsDocs_1 = jsDocs; _i < jsDocs_1.length; _i++) {
+ var doc = jsDocs_1[_i];
+ var tagsForDoc = doc.tags;
+ if (tagsForDoc) {
+ tags.push.apply(tags, tagsForDoc.filter(function (tag) { return tag.kind === 283 /* JSDocTag */; }).map(function (jsDocTag) {
+ return {
+ name: jsDocTag.tagName.text,
+ text: jsDocTag.comment
+ };
+ }));
+ }
+ }
+ });
+ return tags;
+ }
+ JsDoc.getJsDocTagsFromDeclarations = getJsDocTagsFromDeclarations;
/**
* Iterates through 'array' by index and performs the callback on each element of array until the callback
* returns a truthy value, then returns that value.
@@ -70829,7 +76645,7 @@ var ts;
*/
function forEachUnique(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (ts.indexOf(array, array[i]) === i) {
var result = callback(array[i], i);
if (result) {
@@ -70840,8 +76656,8 @@ var ts;
}
return undefined;
}
- function getAllJsDocCompletionEntries() {
- return jsDocCompletionEntries || (jsDocCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ function getJSDocTagNameCompletions() {
+ return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
return {
name: tagName,
kind: ts.ScriptElementKind.keyword,
@@ -70850,7 +76666,18 @@ var ts;
};
}));
}
- JsDoc.getAllJsDocCompletionEntries = getAllJsDocCompletionEntries;
+ JsDoc.getJSDocTagNameCompletions = getJSDocTagNameCompletions;
+ function getJSDocTagCompletions() {
+ return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
+ return {
+ name: "@" + tagName,
+ kind: ts.ScriptElementKind.keyword,
+ kindModifiers: "",
+ sortText: "0"
+ };
+ }));
+ }
+ JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
/**
* Checks if position points to a valid position to add JSDoc comments, and if so,
* returns the appropriate template. Otherwise returns an empty string.
@@ -70889,19 +76716,19 @@ var ts;
var commentOwner;
findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) {
switch (commentOwner.kind) {
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 150 /* Constructor */:
- case 226 /* ClassDeclaration */:
- case 205 /* VariableStatement */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 151 /* Constructor */:
+ case 228 /* ClassDeclaration */:
+ case 207 /* VariableStatement */:
break findOwner;
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
return undefined;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// If in walking up the tree, we hit a a nested namespace declaration,
// then we must be somewhere within a dotted namespace name; however we don't
// want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'.
- if (commentOwner.parent.kind === 230 /* ModuleDeclaration */) {
+ if (commentOwner.parent.kind === 232 /* ModuleDeclaration */) {
return undefined;
}
break findOwner;
@@ -70913,14 +76740,21 @@ var ts;
var parameters = getParametersForJsDocOwningNode(commentOwner);
var posLineAndChar = sourceFile.getLineAndCharacterOfPosition(position);
var lineStart = sourceFile.getLineStarts()[posLineAndChar.line];
- var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character);
+ // replace non-whitespace characters in prefix with spaces.
+ var indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character).replace(/\S/i, function () { return " "; });
+ var isJavaScriptFile = ts.hasJavaScriptFileExtension(sourceFile.fileName);
var docParams = "";
- for (var i = 0, numParams = parameters.length; i < numParams; i++) {
+ for (var i = 0; i < parameters.length; i++) {
var currentName = parameters[i].name;
var paramName = currentName.kind === 70 /* Identifier */ ?
currentName.text :
"param" + i;
- docParams += indentationStr + " * @param " + paramName + newLine;
+ if (isJavaScriptFile) {
+ docParams += indentationStr + " * @param {any} " + paramName + newLine;
+ }
+ else {
+ docParams += indentationStr + " * @param " + paramName + newLine;
+ }
}
// A doc comment consists of the following
// * The opening comment line
@@ -70942,7 +76776,7 @@ var ts;
if (ts.isFunctionLike(commentOwner)) {
return commentOwner.parameters;
}
- if (commentOwner.kind === 205 /* VariableStatement */) {
+ if (commentOwner.kind === 207 /* VariableStatement */) {
var varStatement = commentOwner;
var varDeclarations = varStatement.declarationList.declarations;
if (varDeclarations.length === 1 && varDeclarations[0].initializer) {
@@ -70960,17 +76794,17 @@ var ts;
* @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'.
*/
function getParametersFromRightHandSideOfAssignment(rightHandSide) {
- while (rightHandSide.kind === 183 /* ParenthesizedExpression */) {
+ while (rightHandSide.kind === 184 /* ParenthesizedExpression */) {
rightHandSide = rightHandSide.expression;
}
switch (rightHandSide.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return rightHandSide.parameters;
- case 197 /* ClassExpression */:
+ case 198 /* ClassExpression */:
for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (member.kind === 150 /* Constructor */) {
+ if (member.kind === 151 /* Constructor */) {
return member.parameters;
}
}
@@ -70990,8 +76824,6 @@ var ts;
(function (ts) {
var JsTyping;
(function (JsTyping) {
- ;
- ;
// A map of loose file names to library names
// that we are confident require typings
var safeList;
@@ -71028,7 +76860,7 @@ var ts;
});
if (!safeList) {
var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
- safeList = result.config ? ts.createMap(result.config) : EmptySafeList;
+ safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
}
var filesToWatch = [];
// Directories to search for package.json, bower.json and other typing information
@@ -71047,41 +76879,43 @@ var ts;
getTypingNamesFromJson(packageJsonPath, filesToWatch);
var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
getTypingNamesFromJson(bowerJsonPath, filesToWatch);
+ var bowerComponentsPath = ts.combinePaths(searchDir, "bower_components");
+ getTypingNamesFromPackagesFolder(bowerComponentsPath);
var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
- getTypingNamesFromNodeModuleFolder(nodeModulesPath);
+ getTypingNamesFromPackagesFolder(nodeModulesPath);
}
getTypingNamesFromSourceFileNames(fileNames);
// add typings for unresolved imports
if (unresolvedImports) {
for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
var moduleId = unresolvedImports_1[_a];
- var typingName = moduleId in nodeCoreModules ? "node" : moduleId;
- if (!(typingName in inferredTypings)) {
- inferredTypings[typingName] = undefined;
+ var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
+ if (!inferredTypings.has(typingName)) {
+ inferredTypings.set(typingName, undefined);
}
}
}
// Add the cached typing locations for inferred typings that are already installed
- for (var name_45 in packageNameToTypingLocation) {
- if (name_45 in inferredTypings && !inferredTypings[name_45]) {
- inferredTypings[name_45] = packageNameToTypingLocation[name_45];
+ packageNameToTypingLocation.forEach(function (typingLocation, name) {
+ if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
+ inferredTypings.set(name, typingLocation);
}
- }
+ });
// Remove typings that the user has added to the exclude list
for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
var excludeTypingName = exclude_1[_b];
- delete inferredTypings[excludeTypingName];
+ inferredTypings.delete(excludeTypingName);
}
var newTypingNames = [];
var cachedTypingPaths = [];
- for (var typing in inferredTypings) {
- if (inferredTypings[typing] !== undefined) {
- cachedTypingPaths.push(inferredTypings[typing]);
+ inferredTypings.forEach(function (inferred, typing) {
+ if (inferred !== undefined) {
+ cachedTypingPaths.push(inferred);
}
else {
newTypingNames.push(typing);
}
- }
+ });
return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
/**
* Merge a given list of typingNames to the inferredTypings map
@@ -71092,8 +76926,8 @@ var ts;
}
for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
var typing = typingNames_1[_i];
- if (!(typing in inferredTypings)) {
- inferredTypings[typing] = undefined;
+ if (!inferredTypings.has(typing)) {
+ inferredTypings.set(typing, undefined);
}
}
}
@@ -71132,7 +76966,7 @@ var ts;
var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
if (safeList !== EmptySafeList) {
- mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; }));
+ mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2 /* JSX */; });
if (hasJsxFile) {
@@ -71140,20 +76974,22 @@ var ts;
}
}
/**
- * Infer typing names from node_module folder
- * @param nodeModulesPath is the path to the "node_modules" folder
+ * Infer typing names from packages folder (ex: node_module, bower_components)
+ * @param packagesFolderPath is the path to the packages folder
*/
- function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
+ function getTypingNamesFromPackagesFolder(packagesFolderPath) {
+ filesToWatch.push(packagesFolderPath);
// Todo: add support for ModuleResolutionHost too
- if (!host.directoryExists(nodeModulesPath)) {
+ if (!host.directoryExists(packagesFolderPath)) {
return;
}
var typingNames = [];
- var fileNames = host.readDirectory(nodeModulesPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
+ var fileNames = host.readDirectory(packagesFolderPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
var fileName = fileNames_2[_i];
var normalizedFileName = ts.normalizePath(fileName);
- if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
+ var baseFileName = ts.getBaseFileName(normalizedFileName);
+ if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
continue;
}
var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
@@ -71164,7 +77000,7 @@ var ts;
// npm 3's package.json contains a "_requiredBy" field
// we should include all the top level module names for npm 2, and only module names whose
// "_requiredBy" field starts with "#" or equals "/" for npm 3.
- if (packageJson._requiredBy &&
+ if (baseFileName === "package.json" && packageJson._requiredBy &&
ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
continue;
}
@@ -71175,7 +77011,7 @@ var ts;
}
if (packageJson.typings) {
var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
- inferredTypings[packageJson.name] = absolutePath;
+ inferredTypings.set(packageJson.name, absolutePath);
}
else {
typingNames.push(packageJson.name);
@@ -71195,47 +77031,49 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
- ts.forEach(sourceFiles, function (sourceFile) {
+ var _loop_4 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
- return;
+ return "continue";
}
- var nameToDeclarations = sourceFile.getNamedDeclarations();
- for (var name_46 in nameToDeclarations) {
- var declarations = nameToDeclarations[name_46];
+ ts.forEachEntry(sourceFile.getNamedDeclarations(), function (declarations, name) {
if (declarations) {
// First do a quick check to see if the name of the declaration matches the
// last portion of the (possibly) dotted name they're searching for.
- var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_46);
+ var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name);
if (!matches) {
- continue;
+ return; // continue to next named declarations
}
- for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
- var declaration = declarations_9[_i];
+ for (var _i = 0, declarations_12 = declarations; _i < declarations_12.length; _i++) {
+ var declaration = declarations_12[_i];
// It was a match! If the pattern has dots in it, then also see if the
// declaration container matches as well.
if (patternMatcher.patternContainsDots) {
var containers = getContainers(declaration);
if (!containers) {
- return undefined;
+ return true; // Break out of named declarations and go to the next source file.
}
- matches = patternMatcher.getMatches(containers, name_46);
+ matches = patternMatcher.getMatches(containers, name);
if (!matches) {
- continue;
+ return; // continue to next named declarations
}
}
var fileName = sourceFile.fileName;
var matchKind = bestMatchKind(matches);
- rawItems.push({ name: name_46, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
+ rawItems.push({ name: name, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration });
}
}
- }
- });
+ });
+ };
+ // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
+ _loop_4(sourceFile);
+ }
// Remove imports when the imported declaration is already in the list and has the same name.
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
- if (decl.kind === 236 /* ImportClause */ || decl.kind === 239 /* ImportSpecifier */ || decl.kind === 234 /* ImportEqualsDeclaration */) {
+ if (decl.kind === 238 /* ImportClause */ || decl.kind === 241 /* ImportSpecifier */ || decl.kind === 236 /* ImportEqualsDeclaration */) {
var importer = checker.getSymbolAtLocation(decl.name);
var imported = checker.getAliasedSymbol(importer);
return importer.name !== imported.name;
@@ -71277,7 +77115,7 @@ var ts;
if (text !== undefined) {
containers.unshift(text);
}
- else if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ else if (declaration.name.kind === 143 /* ComputedPropertyName */) {
return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true);
}
else {
@@ -71298,7 +77136,7 @@ var ts;
}
return true;
}
- if (expression.kind === 177 /* PropertyAccessExpression */) {
+ if (expression.kind === 178 /* PropertyAccessExpression */) {
var propertyAccess = expression;
if (includeLastPortion) {
containers.unshift(propertyAccess.name.text);
@@ -71311,7 +77149,7 @@ var ts;
var containers = [];
// First, if we started with a computed property name, then add all but the last
// portion into the container array.
- if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ if (declaration.name.kind === 143 /* ComputedPropertyName */) {
if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) {
return undefined;
}
@@ -71357,7 +77195,7 @@ var ts;
matchKind: ts.PatternMatchKind[rawItem.matchKind],
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
- textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()),
+ textSpan: ts.createTextSpanFromNode(declaration),
// TODO(jfreeman): What should be the containerName when the container has a computed name?
containerName: container && container.name ? container.name.text : "",
containerKind: container && container.name ? ts.getNodeKind(container) : ""
@@ -71373,22 +77211,61 @@ var ts;
(function (ts) {
var NavigationBar;
(function (NavigationBar) {
- function getNavigationBarItems(sourceFile) {
+ /**
+ * Matches all whitespace characters in a string. Eg:
+ *
+ * "app.
+ *
+ * onactivated"
+ *
+ * matches because of the newline, whereas
+ *
+ * "app.onactivated"
+ *
+ * does not match.
+ */
+ var whiteSpaceRegex = /\s+/g;
+ // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`.
+ var curCancellationToken;
+ var curSourceFile;
+ /**
+ * For performance, we keep navigation bar parents on a stack rather than passing them through each recursion.
+ * `parent` is the current parent and is *not* stored in parentsStack.
+ * `startNode` sets a new parent and `endNode` returns to the previous parent.
+ */
+ var parentsStack = [];
+ var parent;
+ // NavigationBarItem requires an array, but will not mutate it, so just give it this for performance.
+ var emptyChildItemArray = [];
+ function getNavigationBarItems(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
- curSourceFile = undefined;
- return result;
+ try {
+ return ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem);
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationBarItems = getNavigationBarItems;
- function getNavigationTree(sourceFile) {
+ function getNavigationTree(sourceFile, cancellationToken) {
+ curCancellationToken = cancellationToken;
curSourceFile = sourceFile;
- var result = convertToTree(rootNavigationBarNode(sourceFile));
- curSourceFile = undefined;
- return result;
+ try {
+ return convertToTree(rootNavigationBarNode(sourceFile));
+ }
+ finally {
+ reset();
+ }
}
NavigationBar.getNavigationTree = getNavigationTree;
- // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`.
- var curSourceFile;
+ function reset() {
+ curSourceFile = undefined;
+ curCancellationToken = undefined;
+ parentsStack = [];
+ parent = undefined;
+ emptyChildItemArray = [];
+ }
function nodeText(node) {
return node.getText(curSourceFile);
}
@@ -71403,13 +77280,6 @@ var ts;
parent.children = [child];
}
}
- /*
- For performance, we keep navigation bar parents on a stack rather than passing them through each recursion.
- `parent` is the current parent and is *not* stored in parentsStack.
- `startNode` sets a new parent and `endNode` returns to the previous parent.
- */
- var parentsStack = [];
- var parent;
function rootNavigationBarNode(sourceFile) {
ts.Debug.assert(!parentsStack.length);
var root = { node: sourceFile, additionalNodes: undefined, parent: undefined, children: undefined, indent: 0 };
@@ -71460,11 +77330,12 @@ var ts;
}
/** Look for navigation bar items in node's subtree, adding them to the current `parent`. */
function addChildrenRecursively(node) {
+ curCancellationToken.throwIfCancellationRequested();
if (!node || ts.isToken(node)) {
return;
}
switch (node.kind) {
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
// Get parameter properties, and treat them as being on the *same* level as the constructor, not under it.
var ctr = node;
addNodeWithRecursiveChild(ctr, ctr.body);
@@ -71476,21 +77347,21 @@ var ts;
}
}
break;
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 148 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 149 /* MethodSignature */:
if (!ts.hasDynamicName(node)) {
addNodeWithRecursiveChild(node, node.body);
}
break;
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
if (!ts.hasDynamicName(node)) {
addLeafNode(node);
}
break;
- case 236 /* ImportClause */:
+ case 238 /* ImportClause */:
var importClause = node;
// Handle default import case e.g.:
// import d from "mod";
@@ -71502,7 +77373,7 @@ var ts;
// import {a, b as B} from "mod";
var namedBindings = importClause.namedBindings;
if (namedBindings) {
- if (namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings.kind === 239 /* NamespaceImport */) {
addLeafNode(namedBindings);
}
else {
@@ -71513,12 +77384,12 @@ var ts;
}
}
break;
- case 174 /* BindingElement */:
- case 223 /* VariableDeclaration */:
+ case 175 /* BindingElement */:
+ case 225 /* VariableDeclaration */:
var decl = node;
- var name_47 = decl.name;
- if (ts.isBindingPattern(name_47)) {
- addChildrenRecursively(name_47);
+ var name = decl.name;
+ if (ts.isBindingPattern(name)) {
+ addChildrenRecursively(name);
}
else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) {
// For `const x = function() {}`, just use the function node, not the const.
@@ -71528,12 +77399,12 @@ var ts;
addNodeWithRecursiveChild(decl, decl.initializer);
}
break;
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
addNodeWithRecursiveChild(node, node.body);
break;
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
startNode(node);
for (var _d = 0, _e = node.members; _d < _e.length; _d++) {
var member = _e[_d];
@@ -71543,9 +77414,9 @@ var ts;
}
endNode();
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
startNode(node);
for (var _f = 0, _g = node.members; _f < _g.length; _f++) {
var member = _g[_f];
@@ -71553,21 +77424,21 @@ var ts;
}
endNode();
break;
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
addNodeWithRecursiveChild(node, getInteriorModule(node).body);
break;
- case 243 /* ExportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 155 /* IndexSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 228 /* TypeAliasDeclaration */:
+ case 245 /* ExportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 156 /* IndexSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 230 /* TypeAliasDeclaration */:
addLeafNode(node);
break;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 285 /* JSDocTypedefTag */) {
+ if (tag.kind === 289 /* JSDocTypedefTag */) {
addLeafNode(tag);
}
});
@@ -71585,9 +77456,9 @@ var ts;
// Anonymous items are never merged.
return true;
}
- var itemsWithSameName = nameToItems[name];
+ var itemsWithSameName = nameToItems.get(name);
if (!itemsWithSameName) {
- nameToItems[name] = child;
+ nameToItems.set(name, child);
return true;
}
if (itemsWithSameName instanceof Array) {
@@ -71605,7 +77476,7 @@ var ts;
if (tryMerge(itemWithSameName, child)) {
return false;
}
- nameToItems[name] = [itemWithSameName, child];
+ nameToItems.set(name, [itemWithSameName, child]);
return true;
}
function tryMerge(a, b) {
@@ -71618,14 +77489,14 @@ var ts;
});
/** a and b have the same name, but they may not be mergeable. */
function shouldReallyMerge(a, b) {
- return a.kind === b.kind && (a.kind !== 230 /* ModuleDeclaration */ || areSameModule(a, b));
+ return a.kind === b.kind && (a.kind !== 232 /* ModuleDeclaration */ || areSameModule(a, b));
// We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes.
// Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'!
function areSameModule(a, b) {
if (a.body.kind !== b.body.kind) {
return false;
}
- if (a.body.kind !== 230 /* ModuleDeclaration */) {
+ if (a.body.kind !== 232 /* ModuleDeclaration */) {
return true;
}
return areSameModule(a.body, b.body);
@@ -71653,39 +77524,20 @@ var ts;
function compareChildren(child1, child2) {
var name1 = tryGetName(child1.node), name2 = tryGetName(child2.node);
if (name1 && name2) {
- var cmp = localeCompareFix(name1, name2);
+ var cmp = ts.compareStringsCaseInsensitive(name1, name2);
return cmp !== 0 ? cmp : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
else {
return name1 ? 1 : name2 ? -1 : navigationBarNodeKind(child1) - navigationBarNodeKind(child2);
}
}
- // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B".
- var localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
- var localeCompareFix = localeCompareIsCorrect ? ts.collator.compare : function (a, b) {
- // This isn't perfect, but it passes all of our tests.
- for (var i = 0; i < Math.min(a.length, b.length); i++) {
- var chA = a.charAt(i), chB = b.charAt(i);
- if (chA === "\"" && chB === "'") {
- return 1;
- }
- if (chA === "'" && chB === "\"") {
- return -1;
- }
- var cmp = ts.compareStrings(chA.toLocaleLowerCase(), chB.toLocaleLowerCase());
- if (cmp !== 0) {
- return cmp;
- }
- }
- return a.length - b.length;
- };
/**
* This differs from getItemName because this is just used for sorting.
* We only sort nodes by name that have a more-or-less "direct" name, as opposed to `new()` and the like.
* So `new()` can still come before an `aardvark` method.
*/
function tryGetName(node) {
- if (node.kind === 230 /* ModuleDeclaration */) {
+ if (node.kind === 232 /* ModuleDeclaration */) {
return getModuleName(node);
}
var decl = node;
@@ -71693,18 +77545,18 @@ var ts;
return ts.getPropertyNameForPropertyNameNode(decl.name);
}
switch (node.kind) {
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 197 /* ClassExpression */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 198 /* ClassExpression */:
return getFunctionOrClassName(node);
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return undefined;
}
}
function getItemName(node) {
- if (node.kind === 230 /* ModuleDeclaration */) {
+ if (node.kind === 232 /* ModuleDeclaration */) {
return getModuleName(node);
}
var name = node.name;
@@ -71715,16 +77567,16 @@ var ts;
}
}
switch (node.kind) {
- case 261 /* SourceFile */:
+ case 264 /* SourceFile */:
var sourceFile = node;
return ts.isExternalModule(sourceFile)
? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\""
: "<global>";
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
if (ts.getModifierFlags(node) & 512 /* Default */) {
return "default";
}
@@ -71732,15 +77584,15 @@ var ts;
// (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the
// navigation bar.
return getFunctionOrClassName(node);
- case 150 /* Constructor */:
+ case 151 /* Constructor */:
return "constructor";
- case 154 /* ConstructSignature */:
+ case 155 /* ConstructSignature */:
return "new()";
- case 153 /* CallSignature */:
+ case 154 /* CallSignature */:
return "()";
- case 155 /* IndexSignature */:
+ case 156 /* IndexSignature */:
return "[]";
- case 285 /* JSDocTypedefTag */:
+ case 289 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -71752,7 +77604,7 @@ var ts;
}
else {
var parentNode = node.parent && node.parent.parent;
- if (parentNode && parentNode.kind === 205 /* VariableStatement */) {
+ if (parentNode && parentNode.kind === 207 /* VariableStatement */) {
if (parentNode.declarationList.declarations.length > 0) {
var nameIdentifier = parentNode.declarationList.declarations[0].name;
if (nameIdentifier.kind === 70 /* Identifier */) {
@@ -71781,24 +77633,24 @@ var ts;
return topLevel;
function isTopLevel(item) {
switch (navigationBarNodeKind(item)) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 229 /* EnumDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 261 /* SourceFile */:
- case 228 /* TypeAliasDeclaration */:
- case 285 /* JSDocTypedefTag */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 231 /* EnumDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 264 /* SourceFile */:
+ case 230 /* TypeAliasDeclaration */:
+ case 289 /* JSDocTypedefTag */:
return true;
- case 150 /* Constructor */:
- case 149 /* MethodDeclaration */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 223 /* VariableDeclaration */:
+ case 151 /* Constructor */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 225 /* VariableDeclaration */:
return hasSomeImportantChild(item);
- case 185 /* ArrowFunction */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
return isTopLevelFunctionDeclaration(item);
default:
return false;
@@ -71808,10 +77660,10 @@ var ts;
return false;
}
switch (navigationBarNodeKind(item.parent)) {
- case 231 /* ModuleBlock */:
- case 261 /* SourceFile */:
- case 149 /* MethodDeclaration */:
- case 150 /* Constructor */:
+ case 233 /* ModuleBlock */:
+ case 264 /* SourceFile */:
+ case 150 /* MethodDeclaration */:
+ case 151 /* Constructor */:
return true;
default:
return hasSomeImportantChild(item);
@@ -71820,18 +77672,16 @@ var ts;
function hasSomeImportantChild(item) {
return ts.forEach(item.children, function (child) {
var childKind = navigationBarNodeKind(child);
- return childKind !== 223 /* VariableDeclaration */ && childKind !== 174 /* BindingElement */;
+ return childKind !== 225 /* VariableDeclaration */ && childKind !== 175 /* BindingElement */;
});
}
}
}
- // NavigationBarItem requires an array, but will not mutate it, so just give it this for performance.
- var emptyChildItemArray = [];
function convertToTree(n) {
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToTree)
};
@@ -71840,7 +77690,7 @@ var ts;
return {
text: getItemName(n.node),
kind: ts.getNodeKind(n.node),
- kindModifiers: ts.getNodeModifiers(n.node),
+ kindModifiers: getModifiers(n.node),
spans: getSpans(n),
childItems: ts.map(n.children, convertToChildItem) || emptyChildItemArray,
indent: n.indent,
@@ -71878,7 +77728,7 @@ var ts;
// Otherwise, we need to aggregate each identifier to build up the qualified name.
var result = [];
result.push(moduleDeclaration.name.text);
- while (moduleDeclaration.body && moduleDeclaration.body.kind === 230 /* ModuleDeclaration */) {
+ while (moduleDeclaration.body && moduleDeclaration.body.kind === 232 /* ModuleDeclaration */) {
moduleDeclaration = moduleDeclaration.body;
result.push(moduleDeclaration.name.text);
}
@@ -71889,28 +77739,34 @@ var ts;
* We store 'A' as associated with a NavNode, and use getModuleName to traverse down again.
*/
function getInteriorModule(decl) {
- return decl.body.kind === 230 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl;
+ return decl.body.kind === 232 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl;
}
function isComputedProperty(member) {
- return !member.name || member.name.kind === 142 /* ComputedPropertyName */;
+ return !member.name || member.name.kind === 143 /* ComputedPropertyName */;
}
function getNodeSpan(node) {
- return node.kind === 261 /* SourceFile */
+ return node.kind === 264 /* SourceFile */
? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd())
- : ts.createTextSpanFromBounds(node.getStart(curSourceFile), node.getEnd());
+ : ts.createTextSpanFromNode(node, curSourceFile);
+ }
+ function getModifiers(node) {
+ if (node.parent && node.parent.kind === 225 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ return ts.getNodeModifiers(node);
}
function getFunctionOrClassName(node) {
if (node.name && ts.getFullWidth(node.name) > 0) {
return ts.declarationNameToString(node.name);
}
- else if (node.parent.kind === 223 /* VariableDeclaration */) {
+ else if (node.parent.kind === 225 /* VariableDeclaration */) {
return ts.declarationNameToString(node.parent.name);
}
- else if (node.parent.kind === 192 /* BinaryExpression */ &&
+ else if (node.parent.kind === 193 /* BinaryExpression */ &&
node.parent.operatorToken.kind === 57 /* EqualsToken */) {
return nodeText(node.parent.left).replace(whiteSpaceRegex, "");
}
- else if (node.parent.kind === 257 /* PropertyAssignment */ && node.parent.name) {
+ else if (node.parent.kind === 260 /* PropertyAssignment */ && node.parent.name) {
return nodeText(node.parent.name);
}
else if (ts.getModifierFlags(node) & 512 /* Default */) {
@@ -71921,22 +77777,8 @@ var ts;
}
}
function isFunctionOrClassExpression(node) {
- return node.kind === 184 /* FunctionExpression */ || node.kind === 185 /* ArrowFunction */ || node.kind === 197 /* ClassExpression */;
+ return node.kind === 185 /* FunctionExpression */ || node.kind === 186 /* ArrowFunction */ || node.kind === 198 /* ClassExpression */;
}
- /**
- * Matches all whitespace characters in a string. Eg:
- *
- * "app.
- *
- * onactivated"
- *
- * matches because of the newline, whereas
- *
- * "app.onactivated"
- *
- * does not match.
- */
- var whiteSpaceRegex = /\s+/g;
})(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {}));
})(ts || (ts = {}));
/* @internal */
@@ -71944,29 +77786,29 @@ var ts;
(function (ts) {
var OutliningElementsCollector;
(function (OutliningElementsCollector) {
- function collectElements(sourceFile) {
+ function collectElements(sourceFile, cancellationToken) {
var elements = [];
var collapseText = "...";
function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) {
if (hintSpanNode && startElement && endElement) {
- var span_12 = {
+ var span_13 = {
textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end),
- hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
+ hintSpan: ts.createTextSpanFromNode(hintSpanNode, sourceFile),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_12);
+ elements.push(span_13);
}
}
function addOutliningSpanComments(commentSpan, autoCollapse) {
if (commentSpan) {
- var span_13 = {
+ var span_14 = {
textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
bannerText: collapseText,
autoCollapse: autoCollapse
};
- elements.push(span_13);
+ elements.push(span_14);
}
}
function addOutliningForLeadingCommentsForNode(n) {
@@ -71978,6 +77820,7 @@ var ts;
var singleLineCommentCount = 0;
for (var _i = 0, comments_4 = comments; _i < comments_4.length; _i++) {
var currentComment = comments_4[_i];
+ cancellationToken.throwIfCancellationRequested();
// For single line comments, combine consecutive ones (2 or more) into
// a single span from the start of the first till the end of the last
if (currentComment.kind === 2 /* SingleLineCommentTrivia */) {
@@ -72003,19 +77846,20 @@ var ts;
// Only outline spans of two or more consecutive single line comments
if (count > 1) {
var multipleSingleLineComments = {
+ kind: 2 /* SingleLineCommentTrivia */,
pos: start,
end: end,
- kind: 2 /* SingleLineCommentTrivia */
};
addOutliningSpanComments(multipleSingleLineComments, /*autoCollapse*/ false);
}
}
function autoCollapse(node) {
- return ts.isFunctionBlock(node) && node.parent.kind !== 185 /* ArrowFunction */;
+ return ts.isFunctionBlock(node) && node.parent.kind !== 186 /* ArrowFunction */;
}
var depth = 0;
var maxDepth = 20;
function walk(n) {
+ cancellationToken.throwIfCancellationRequested();
if (depth > maxDepth) {
return;
}
@@ -72023,30 +77867,30 @@ var ts;
addOutliningForLeadingCommentsForNode(n);
}
switch (n.kind) {
- case 204 /* Block */:
+ case 206 /* Block */:
if (!ts.isFunctionBlock(n)) {
- var parent_19 = n.parent;
+ var parent = n.parent;
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
// Check if the block is standalone, or 'attached' to some parent statement.
// If the latter, we want to collapse the block, but consider its hint span
// to be the entire span of the parent.
- if (parent_19.kind === 209 /* DoStatement */ ||
- parent_19.kind === 212 /* ForInStatement */ ||
- parent_19.kind === 213 /* ForOfStatement */ ||
- parent_19.kind === 211 /* ForStatement */ ||
- parent_19.kind === 208 /* IfStatement */ ||
- parent_19.kind === 210 /* WhileStatement */ ||
- parent_19.kind === 217 /* WithStatement */ ||
- parent_19.kind === 256 /* CatchClause */) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ if (parent.kind === 211 /* DoStatement */ ||
+ parent.kind === 214 /* ForInStatement */ ||
+ parent.kind === 215 /* ForOfStatement */ ||
+ parent.kind === 213 /* ForStatement */ ||
+ parent.kind === 210 /* IfStatement */ ||
+ parent.kind === 212 /* WhileStatement */ ||
+ parent.kind === 219 /* WithStatement */ ||
+ parent.kind === 259 /* CatchClause */) {
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- if (parent_19.kind === 221 /* TryStatement */) {
+ if (parent.kind === 223 /* TryStatement */) {
// Could be the try-block, or the finally-block.
- var tryStatement = parent_19;
+ var tryStatement = parent;
if (tryStatement.tryBlock === n) {
- addOutliningSpan(parent_19, openBrace, closeBrace, autoCollapse(n));
+ addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
break;
}
else if (tryStatement.finallyBlock === n) {
@@ -72056,36 +77900,37 @@ var ts;
break;
}
}
+ // fall through.
}
// Block was a standalone block. In this case we want to only collapse
// the span of the block, independent of any parent span.
- var span_14 = ts.createTextSpanFromBounds(n.getStart(), n.end);
+ var span_15 = ts.createTextSpanFromNode(n);
elements.push({
- textSpan: span_14,
- hintSpan: span_14,
+ textSpan: span_15,
+ hintSpan: span_15,
bannerText: collapseText,
autoCollapse: autoCollapse(n)
});
break;
}
- // Fallthrough.
- case 231 /* ModuleBlock */: {
+ // falls through
+ case 233 /* ModuleBlock */: {
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 176 /* ObjectLiteralExpression */:
- case 232 /* CaseBlock */: {
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 177 /* ObjectLiteralExpression */:
+ case 234 /* CaseBlock */: {
var openBrace = ts.findChildOfKind(n, 16 /* OpenBraceToken */, sourceFile);
var closeBrace = ts.findChildOfKind(n, 17 /* CloseBraceToken */, sourceFile);
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
break;
}
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
var openBracket = ts.findChildOfKind(n, 20 /* OpenBracketToken */, sourceFile);
var closeBracket = ts.findChildOfKind(n, 21 /* CloseBracketToken */, sourceFile);
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
@@ -72181,10 +78026,11 @@ var ts;
return totalMatch;
}
function getWordSpans(word) {
- if (!(word in stringToWordSpans)) {
- stringToWordSpans[word] = breakIntoWordSpans(word);
+ var spans = stringToWordSpans.get(word);
+ if (!spans) {
+ stringToWordSpans.set(word, spans = breakIntoWordSpans(word));
}
- return stringToWordSpans[word];
+ return spans;
}
function matchTextChunk(candidate, chunk, punctuationStripped) {
var index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
@@ -72212,10 +78058,10 @@ var ts;
// But we would match 'FooAttribute' (since 'Attribute' starts with 'a').
var wordSpans = getWordSpans(candidate);
for (var _i = 0, wordSpans_1 = wordSpans; _i < wordSpans_1.length; _i++) {
- var span_15 = wordSpans_1[_i];
- if (partStartsWith(candidate, span_15, chunk.text, /*ignoreCase:*/ true)) {
+ var span_16 = wordSpans_1[_i];
+ if (partStartsWith(candidate, span_16, chunk.text, /*ignoreCase:*/ true)) {
return createPatternMatch(PatternMatchKind.substring, punctuationStripped,
- /*isCaseSensitive:*/ partStartsWith(candidate, span_15, chunk.text, /*ignoreCase:*/ false));
+ /*isCaseSensitive:*/ partStartsWith(candidate, span_16, chunk.text, /*ignoreCase:*/ false));
}
}
}
@@ -72465,7 +78311,8 @@ var ts;
}
// Assumes 'value' is already lowercase.
function indexOfIgnoringCase(string, value) {
- for (var i = 0, n = string.length - value.length; i <= n; i++) {
+ var n = string.length - value.length;
+ for (var i = 0; i <= n; i++) {
if (startsWithIgnoringCase(string, value, i)) {
return i;
}
@@ -72474,7 +78321,7 @@ var ts;
}
// Assumes 'value' is already lowercase.
function startsWithIgnoringCase(string, value, start) {
- for (var i = 0, n = value.length; i < n; i++) {
+ for (var i = 0; i < value.length; i++) {
var ch1 = toLowerCase(string.charCodeAt(i + start));
var ch2 = value.charCodeAt(i);
if (ch1 !== ch2) {
@@ -72546,7 +78393,7 @@ var ts;
function breakIntoSpans(identifier, word) {
var result = [];
var wordStart = 0;
- for (var i = 1, n = identifier.length; i < n; i++) {
+ for (var i = 1; i < identifier.length; i++) {
var lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
var currentIsDigit = isDigit(identifier.charCodeAt(i));
var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
@@ -72758,7 +78605,7 @@ var ts;
else {
if (token === 70 /* Identifier */ || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import d from "mod";
@@ -72789,7 +78636,7 @@ var ts;
}
if (token === 17 /* CloseBraceToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import {a as A} from "mod";
@@ -72805,7 +78652,7 @@ var ts;
token = nextToken();
if (token === 70 /* Identifier */ || ts.isKeyword(token)) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// import * as NS from "mod"
@@ -72835,7 +78682,7 @@ var ts;
}
if (token === 17 /* CloseBraceToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// export {a as A} from "mod";
@@ -72847,7 +78694,7 @@ var ts;
}
else if (token === 38 /* AsteriskToken */) {
token = nextToken();
- if (token === 138 /* FromKeyword */) {
+ if (token === 139 /* FromKeyword */) {
token = nextToken();
if (token === 9 /* StringLiteral */) {
// export * from "mod"
@@ -72999,93 +78846,89 @@ var ts;
var Rename;
(function (Rename) {
function getRenameInfo(typeChecker, defaultLibFileName, getCanonicalFileName, sourceFile, position) {
- var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName));
+ var getCanonicalDefaultLibName = ts.memoize(function () { return getCanonicalFileName(ts.normalizePath(defaultLibFileName)); });
var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true);
- if (node) {
- if (node.kind === 70 /* Identifier */ ||
- node.kind === 9 /* StringLiteral */ ||
- ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
- ts.isThis(node)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
- // Only allow a symbol to be renamed if it actually has at least one declaration.
- if (symbol) {
- var declarations = symbol.getDeclarations();
- if (declarations && declarations.length > 0) {
- // Disallow rename for elements that are defined in the standard TypeScript library.
- if (ts.forEach(declarations, isDefinedInLibraryFile)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
- var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
- if (kind) {
- return {
- canRename: true,
- kind: kind,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: typeChecker.getFullyQualifiedName(symbol),
- kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
- else if (node.kind === 9 /* StringLiteral */) {
- var type = ts.getStringLiteralTypeForNode(node, typeChecker);
- if (type) {
- if (isDefinedInLibraryFile(node)) {
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library));
- }
- else {
- var displayName = ts.stripQuotes(type.text);
- return {
- canRename: true,
- kind: ts.ScriptElementKind.variableElement,
- displayName: displayName,
- localizedErrorMessage: undefined,
- fullDisplayName: displayName,
- kindModifiers: ts.ScriptElementKindModifier.none,
- triggerSpan: createTriggerSpanForNode(node, sourceFile)
- };
- }
- }
- }
+ var renameInfo = node && nodeIsEligibleForRename(node)
+ ? getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile)
+ : undefined;
+ return renameInfo || getRenameInfoError(ts.Diagnostics.You_cannot_rename_this_element);
+ function isDefinedInLibraryFile(declaration) {
+ if (!defaultLibFileName) {
+ return false;
}
+ var sourceFile = declaration.getSourceFile();
+ var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile.fileName));
+ return canonicalName === getCanonicalDefaultLibName();
}
- return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element));
- function getRenameInfoError(localizedErrorMessage) {
- return {
- canRename: false,
- localizedErrorMessage: localizedErrorMessage,
- displayName: undefined,
- fullDisplayName: undefined,
- kind: undefined,
- kindModifiers: undefined,
- triggerSpan: undefined
- };
- }
- function isDefinedInLibraryFile(declaration) {
- if (defaultLibFileName) {
- var sourceFile_1 = declaration.getSourceFile();
- var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_1.fileName));
- if (canonicalName === canonicalDefaultLibName) {
- return true;
+ }
+ Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile) {
+ var symbol = typeChecker.getSymbolAtLocation(node);
+ // Only allow a symbol to be renamed if it actually has at least one declaration.
+ if (symbol) {
+ var declarations = symbol.getDeclarations();
+ if (declarations && declarations.length > 0) {
+ // Disallow rename for elements that are defined in the standard TypeScript library.
+ if (ts.some(declarations, isDefinedInLibraryFile)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
+ }
+ // Cannot rename `default` as in `import { default as foo } from "./someModule";
+ if (node.kind === 70 /* Identifier */ &&
+ node.originalKeywordKind === 78 /* DefaultKeyword */ &&
+ symbol.parent.flags & 1536 /* Module */) {
+ return undefined;
}
+ var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node));
+ var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
+ return kind ? getRenameInfoSuccess(displayName, typeChecker.getFullyQualifiedName(symbol), kind, ts.SymbolDisplay.getSymbolModifiers(symbol), node, sourceFile) : undefined;
}
- return false;
}
- function createTriggerSpanForNode(node, sourceFile) {
- var start = node.getStart(sourceFile);
- var width = node.getWidth(sourceFile);
- if (node.kind === 9 /* StringLiteral */) {
- // Exclude the quotes
- start += 1;
- width -= 2;
+ else if (node.kind === 9 /* StringLiteral */) {
+ if (isDefinedInLibraryFile(node)) {
+ return getRenameInfoError(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
}
- return ts.createTextSpan(start, width);
+ var displayName = ts.stripQuotes(node.text);
+ return getRenameInfoSuccess(displayName, displayName, ts.ScriptElementKind.variableElement, ts.ScriptElementKindModifier.none, node, sourceFile);
}
}
- Rename.getRenameInfo = getRenameInfo;
+ function getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) {
+ return {
+ canRename: true,
+ kind: kind,
+ displayName: displayName,
+ localizedErrorMessage: undefined,
+ fullDisplayName: fullDisplayName,
+ kindModifiers: kindModifiers,
+ triggerSpan: createTriggerSpanForNode(node, sourceFile)
+ };
+ }
+ function getRenameInfoError(diagnostic) {
+ return {
+ canRename: false,
+ localizedErrorMessage: ts.getLocaleSpecificMessage(diagnostic),
+ displayName: undefined,
+ fullDisplayName: undefined,
+ kind: undefined,
+ kindModifiers: undefined,
+ triggerSpan: undefined
+ };
+ }
+ function createTriggerSpanForNode(node, sourceFile) {
+ var start = node.getStart(sourceFile);
+ var width = node.getWidth(sourceFile);
+ if (node.kind === 9 /* StringLiteral */) {
+ // Exclude the quotes
+ start += 1;
+ width -= 2;
+ }
+ return ts.createTextSpan(start, width);
+ }
+ function nodeIsEligibleForRename(node) {
+ return node.kind === 70 /* Identifier */ ||
+ node.kind === 9 /* StringLiteral */ ||
+ ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) ||
+ ts.isThis(node);
+ }
})(Rename = ts.Rename || (ts.Rename = {}));
})(ts || (ts = {}));
///<reference path='services.ts' />
@@ -73140,7 +78983,7 @@ var ts;
// stack++;
// break;
// case TypeScript.SyntaxKind.CommaToken:
- // if (stack == 0) {
+ // if (stack === 0) {
// argumentIndex++;
// }
// break;
@@ -73232,6 +79075,7 @@ var ts;
ArgumentListKind[ArgumentListKind["TypeArguments"] = 0] = "TypeArguments";
ArgumentListKind[ArgumentListKind["CallArguments"] = 1] = "CallArguments";
ArgumentListKind[ArgumentListKind["TaggedTemplateArguments"] = 2] = "TaggedTemplateArguments";
+ ArgumentListKind[ArgumentListKind["JSXAttributesArguments"] = 3] = "JSXAttributesArguments";
})(ArgumentListKind = SignatureHelp.ArgumentListKind || (SignatureHelp.ArgumentListKind = {}));
function getSignatureHelpItems(program, sourceFile, position, cancellationToken) {
var typeChecker = program.getTypeChecker();
@@ -73263,7 +79107,7 @@ var ts;
}
SignatureHelp.getSignatureHelpItems = getSignatureHelpItems;
function createJavaScriptSignatureHelpItems(argumentInfo, program) {
- if (argumentInfo.invocation.kind !== 179 /* CallExpression */) {
+ if (argumentInfo.invocation.kind !== 180 /* CallExpression */) {
return undefined;
}
// See if we can find some symbol with the call expression name that has call signatures.
@@ -73271,7 +79115,7 @@ var ts;
var expression = callExpression.expression;
var name = expression.kind === 70 /* Identifier */
? expression
- : expression.kind === 177 /* PropertyAccessExpression */
+ : expression.kind === 178 /* PropertyAccessExpression */
? expression.name
: undefined;
if (!name || !name.text) {
@@ -73281,10 +79125,10 @@ var ts;
for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) {
var sourceFile = _a[_i];
var nameToDeclarations = sourceFile.getNamedDeclarations();
- var declarations = nameToDeclarations[name.text];
+ var declarations = nameToDeclarations.get(name.text);
if (declarations) {
- for (var _b = 0, declarations_10 = declarations; _b < declarations_10.length; _b++) {
- var declaration = declarations_10[_b];
+ for (var _b = 0, declarations_13 = declarations; _b < declarations_13.length; _b++) {
+ var declaration = declarations_13[_b];
var symbol = declaration.symbol;
if (symbol) {
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
@@ -73304,21 +79148,21 @@ var ts;
* in the argument of an invocation; returns undefined otherwise.
*/
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 179 /* CallExpression */ || node.parent.kind === 180 /* NewExpression */) {
+ if (node.parent.kind === 180 /* CallExpression */ || node.parent.kind === 181 /* NewExpression */) {
var callExpression = node.parent;
// There are 3 cases to handle:
- // 1. The token introduces a list, and should begin a sig help session
+ // 1. The token introduces a list, and should begin a signature help session
// 2. The token is either not associated with a list, or ends a list, so the session should end
- // 3. The token is buried inside a list, and should give sig help
+ // 3. The token is buried inside a list, and should give signature help
//
// The following are examples of each:
//
// Case 1:
- // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a sig help session
+ // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a signature help session
// Case 2:
// fo#o<T, U>#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end
// Case 3:
- // foo<T#, U#>(a#, #b#) -> The token is buried inside a list, and should give sig help
+ // foo<T#, U#>(a#, #b#) -> The token is buried inside a list, and should give signature help
// Find out if 'node' is an argument, a type argument, or neither
if (node.kind === 26 /* LessThanToken */ ||
node.kind === 18 /* OpenParenToken */) {
@@ -73337,7 +79181,7 @@ var ts;
}
// findListItemInfo can return undefined if we are not in parent's argument list
// or type argument list. This includes cases where the cursor is:
- // - To the right of the closing paren, non-substitution template, or template tail.
+ // - To the right of the closing parenthesis, non-substitution template, or template tail.
// - Between the type arguments and the arguments (greater than token)
// - On the target of the call (parent.func)
// - On the 'new' keyword in a 'new' expression
@@ -73358,25 +79202,25 @@ var ts;
}
return undefined;
}
- else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.kind === 12 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 182 /* TaggedTemplateExpression */) {
// Check if we're actually inside the template;
// otherwise we'll fall out and return undefined.
if (ts.isInsideTemplateLiteral(node, position)) {
return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0, sourceFile);
}
}
- else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.kind === 13 /* TemplateHead */ && node.parent.parent.kind === 182 /* TaggedTemplateExpression */) {
var templateExpression = node.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194 /* TemplateExpression */);
+ ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */);
var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1;
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
- else if (node.parent.kind === 202 /* TemplateSpan */ && node.parent.parent.parent.kind === 181 /* TaggedTemplateExpression */) {
+ else if (node.parent.kind === 204 /* TemplateSpan */ && node.parent.parent.parent.kind === 182 /* TaggedTemplateExpression */) {
var templateSpan = node.parent;
var templateExpression = templateSpan.parent;
var tagExpression = templateExpression.parent;
- ts.Debug.assert(templateExpression.kind === 194 /* TemplateExpression */);
+ ts.Debug.assert(templateExpression.kind === 195 /* TemplateExpression */);
// If we're just after a template tail, don't show signature help.
if (node.kind === 15 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) {
return undefined;
@@ -73385,8 +79229,25 @@ var ts;
var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position);
return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);
}
+ else if (node.parent && ts.isJsxOpeningLikeElement(node.parent)) {
+ // Provide a signature help for JSX opening element or JSX self-closing element.
+ // This is not guarantee that JSX tag-name is resolved into stateless function component. (that is done in "getSignatureHelpItems")
+ // i.e
+ // export function MainButton(props: ButtonProps, context: any): JSX.Element { ... }
+ // <MainButton /*signatureHelp*/
+ var attributeSpanStart = node.parent.attributes.getFullStart();
+ var attributeSpanEnd = ts.skipTrivia(sourceFile.text, node.parent.attributes.getEnd(), /*stopAfterLineBreak*/ false);
+ return {
+ kind: 3 /* JSXAttributesArguments */,
+ invocation: node.parent,
+ argumentsSpan: ts.createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),
+ argumentIndex: 0,
+ argumentCount: 1
+ };
+ }
return undefined;
}
+ SignatureHelp.getImmediatelyContainingArgumentInfo = getImmediatelyContainingArgumentInfo;
function getArgumentIndex(argumentsList, node) {
// The list we got back can include commas. In the presence of errors it may
// also just have nodes without commas. For example "Foo(a b c)" will have 3
@@ -73422,7 +79283,7 @@ var ts;
//
// Note: this subtlety only applies to the last comma. If you had "Foo(a,," then
// we'll have: 'a' '<comma>' '<missing>'
- // That will give us 2 non-commas. We then add one for the last comma, givin us an
+ // That will give us 2 non-commas. We then add one for the last comma, giving us an
// arg count of 3.
var listChildren = argumentsList.getChildren();
var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 25 /* CommaToken */; });
@@ -73494,7 +79355,7 @@ var ts;
//
// This is because a Missing node has no width. However, what we actually want is to include trivia
// leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail.
- if (template.kind === 194 /* TemplateExpression */) {
+ if (template.kind === 195 /* TemplateExpression */) {
var lastSpan = ts.lastOrUndefined(template.templateSpans);
if (lastSpan.literal.getFullWidth() === 0) {
applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false);
@@ -73503,7 +79364,7 @@ var ts;
return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);
}
function getContainingArgumentInfo(node, position, sourceFile) {
- for (var n = node; n.kind !== 261 /* SourceFile */; n = n.parent) {
+ for (var n = node; n.kind !== 264 /* SourceFile */; n = n.parent) {
if (ts.isFunctionBlock(n)) {
return undefined;
}
@@ -73516,6 +79377,7 @@ var ts;
if (argumentInfo) {
return argumentInfo;
}
+ // TODO: Handle generic call with incomplete syntax
}
return undefined;
}
@@ -73596,7 +79458,8 @@ var ts;
suffixDisplayParts: suffixDisplayParts,
separatorDisplayParts: [ts.punctuationPart(25 /* CommaToken */), ts.spacePart()],
parameters: signatureHelpParameters,
- documentation: candidateSignature.getDocumentationComment()
+ documentation: candidateSignature.getDocumentationComment(),
+ tags: candidateSignature.getJsDocTags()
};
});
var argumentIndex = argumentListInfo.argumentIndex;
@@ -73646,9 +79509,9 @@ var ts;
(function (SymbolDisplay) {
// TODO(drosen): use contextual SemanticMeaning.
function getSymbolKind(typeChecker, symbol, location) {
- var flags = symbol.getFlags();
+ var flags = symbol.flags;
if (flags & 32 /* Class */)
- return ts.getDeclarationOfKind(symbol, 197 /* ClassExpression */) ?
+ return ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
if (flags & 384 /* Enum */)
return ts.ScriptElementKind.enumElement;
@@ -73658,12 +79521,12 @@ var ts;
return ts.ScriptElementKind.interfaceElement;
if (flags & 262144 /* TypeParameter */)
return ts.ScriptElementKind.typeParameterElement;
- var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location);
+ var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
if (result === ts.ScriptElementKind.unknown) {
if (flags & 262144 /* TypeParameter */)
return ts.ScriptElementKind.typeParameterElement;
if (flags & 8 /* EnumMember */)
- return ts.ScriptElementKind.variableElement;
+ return ts.ScriptElementKind.enumMemberElement;
if (flags & 8388608 /* Alias */)
return ts.ScriptElementKind.alias;
if (flags & 1536 /* Module */)
@@ -73672,7 +79535,7 @@ var ts;
return result;
}
SymbolDisplay.getSymbolKind = getSymbolKind;
- function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, flags, location) {
+ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) {
if (typeChecker.isUndefinedSymbol(symbol)) {
return ts.ScriptElementKind.variableElement;
}
@@ -73682,6 +79545,7 @@ var ts;
if (location.kind === 98 /* ThisKeyword */ && ts.isExpression(location)) {
return ts.ScriptElementKind.parameterElement;
}
+ var flags = symbol.flags;
if (flags & 3 /* Variable */) {
if (ts.isFirstDeclarationOfSymbolParameter(symbol)) {
return ts.ScriptElementKind.parameterElement;
@@ -73705,7 +79569,7 @@ var ts;
if (flags & 16384 /* Constructor */)
return ts.ScriptElementKind.constructorImplementationElement;
if (flags & 4 /* Property */) {
- if (flags & 268435456 /* SyntheticProperty */) {
+ if (flags & 134217728 /* Transient */ && symbol.checkFlags & 6 /* Synthetic */) {
// If union property is result of union of non method (property/accessors/variables), it is labeled as property
var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) {
var rootSymbolFlags = rootSymbol.getFlags();
@@ -73725,6 +79589,9 @@ var ts;
}
return unionPropertyKind;
}
+ if (location.parent && ts.isJsxAttribute(location.parent)) {
+ return ts.ScriptElementKind.jsxAttribute;
+ }
return ts.ScriptElementKind.memberVariableElement;
}
return ts.ScriptElementKind.unknown;
@@ -73740,8 +79607,9 @@ var ts;
if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); }
var displayParts = [];
var documentation;
+ var tags;
var symbolFlags = symbol.flags;
- var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, symbolFlags, location);
+ var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);
var hasAddedSymbolInfo;
var isThisExpression = location.kind === 98 /* ThisKeyword */ && ts.isExpression(location);
var type;
@@ -73754,7 +79622,7 @@ var ts;
var signature = void 0;
type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location);
if (type) {
- if (location.parent && location.parent.kind === 177 /* PropertyAccessExpression */) {
+ if (location.parent && location.parent.kind === 178 /* PropertyAccessExpression */) {
var right = location.parent.name;
// Either the location is on the right of a property access, or on the left and the right is missing
if (right === location || (right && right.getFullWidth() === 0)) {
@@ -73762,21 +79630,24 @@ var ts;
}
}
// try get the call/construct signature from the type if it matches
- var callExpression = void 0;
- if (location.kind === 179 /* CallExpression */ || location.kind === 180 /* NewExpression */) {
- callExpression = location;
+ var callExpressionLike = void 0;
+ if (location.kind === 180 /* CallExpression */ || location.kind === 181 /* NewExpression */) {
+ callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
- callExpression = location.parent;
+ callExpressionLike = location.parent;
+ }
+ else if (location.parent && ts.isJsxOpeningLikeElement(location.parent) && ts.isFunctionLike(symbol.valueDeclaration)) {
+ callExpressionLike = location.parent;
}
- if (callExpression) {
+ if (callExpressionLike) {
var candidateSignatures = [];
- signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures);
+ signature = typeChecker.getResolvedSignature(callExpressionLike, candidateSignatures);
if (!signature && candidateSignatures.length) {
// Use the first candidate:
signature = candidateSignatures[0];
}
- var useConstructSignatures = callExpression.kind === 180 /* NewExpression */ || callExpression.expression.kind === 96 /* SuperKeyword */;
+ var useConstructSignatures = callExpressionLike.kind === 181 /* NewExpression */ || (ts.isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 96 /* SuperKeyword */);
var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) {
// Get the first signature if there is one -- allSignatures may contain
@@ -73803,6 +79674,7 @@ var ts;
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
}
switch (symbolKind) {
+ case ts.ScriptElementKind.jsxAttribute:
case ts.ScriptElementKind.memberVariableElement:
case ts.ScriptElementKind.variableElement:
case ts.ScriptElementKind.constElement:
@@ -73829,24 +79701,24 @@ var ts;
}
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) ||
- (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 150 /* Constructor */)) {
+ (location.kind === 122 /* ConstructorKeyword */ && location.parent.kind === 151 /* Constructor */)) {
// get the signature from the declaration and write it
var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 150 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ var allSignatures = functionDeclaration.kind === 151 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
}
else {
signature = allSignatures[0];
}
- if (functionDeclaration.kind === 150 /* Constructor */) {
+ if (functionDeclaration.kind === 151 /* Constructor */) {
// show (constructor) Type(...) signature
symbolKind = ts.ScriptElementKind.constructorImplementationElement;
addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
}
else {
// (function/method) symbol(..signature)
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 153 /* CallSignature */ &&
+ addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 154 /* CallSignature */ &&
!(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
}
addSignatureDisplayParts(signature, allSignatures);
@@ -73855,7 +79727,7 @@ var ts;
}
}
if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) {
- if (ts.getDeclarationOfKind(symbol, 197 /* ClassExpression */)) {
+ if (ts.getDeclarationOfKind(symbol, 198 /* ClassExpression */)) {
// Special case for class expressions because we would like to indicate that
// the class name is local to the class body (similar to function expression)
// (local class) class <className>
@@ -73878,7 +79750,7 @@ var ts;
}
if (symbolFlags & 524288 /* TypeAlias */) {
addNewLineIfDisplayPartsExist();
- displayParts.push(ts.keywordPart(136 /* TypeKeyword */));
+ displayParts.push(ts.keywordPart(137 /* TypeKeyword */));
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
writeTypeParametersOfSymbol(symbol, sourceFile);
@@ -73899,7 +79771,7 @@ var ts;
}
if (symbolFlags & 1536 /* Module */) {
addNewLineIfDisplayPartsExist();
- var declaration = ts.getDeclarationOfKind(symbol, 230 /* ModuleDeclaration */);
+ var declaration = ts.getDeclarationOfKind(symbol, 232 /* ModuleDeclaration */);
var isNamespace = declaration && declaration.name && declaration.name.kind === 70 /* Identifier */;
displayParts.push(ts.keywordPart(isNamespace ? 128 /* NamespaceKeyword */ : 127 /* ModuleKeyword */));
displayParts.push(ts.spacePart());
@@ -73920,28 +79792,28 @@ var ts;
}
else {
// Method/function type parameter
- var declaration = ts.getDeclarationOfKind(symbol, 143 /* TypeParameter */);
+ var declaration = ts.getDeclarationOfKind(symbol, 144 /* TypeParameter */);
ts.Debug.assert(declaration !== undefined);
declaration = declaration.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
var signature = typeChecker.getSignatureFromDeclaration(declaration);
- if (declaration.kind === 154 /* ConstructSignature */) {
+ if (declaration.kind === 155 /* ConstructSignature */) {
displayParts.push(ts.keywordPart(93 /* NewKeyword */));
displayParts.push(ts.spacePart());
}
- else if (declaration.kind !== 153 /* CallSignature */ && declaration.name) {
+ else if (declaration.kind !== 154 /* CallSignature */ && declaration.name) {
addFullSymbolName(declaration.symbol);
}
ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */));
}
- else if (declaration.kind === 228 /* TypeAliasDeclaration */) {
+ else if (declaration.kind === 230 /* TypeAliasDeclaration */) {
// Type alias type parameter
// For example
// type list<T> = T[]; // Both T will go through same code path
addInPrefix();
- displayParts.push(ts.keywordPart(136 /* TypeKeyword */));
+ displayParts.push(ts.keywordPart(137 /* TypeKeyword */));
displayParts.push(ts.spacePart());
addFullSymbolName(declaration.symbol);
writeTypeParametersOfSymbol(declaration.symbol, sourceFile);
@@ -73950,9 +79822,10 @@ var ts;
}
}
if (symbolFlags & 8 /* EnumMember */) {
+ symbolKind = ts.ScriptElementKind.enumMemberElement;
addPrefixForAnyFunctionOrVar(symbol, "enum member");
var declaration = symbol.declarations[0];
- if (declaration.kind === 260 /* EnumMember */) {
+ if (declaration.kind === 263 /* EnumMember */) {
var constantValue = typeChecker.getConstantValue(declaration);
if (constantValue !== undefined) {
displayParts.push(ts.spacePart());
@@ -73964,7 +79837,7 @@ var ts;
}
if (symbolFlags & 8388608 /* Alias */) {
addNewLineIfDisplayPartsExist();
- if (symbol.declarations[0].kind === 233 /* NamespaceExportDeclaration */) {
+ if (symbol.declarations[0].kind === 235 /* NamespaceExportDeclaration */) {
displayParts.push(ts.keywordPart(83 /* ExportKeyword */));
displayParts.push(ts.spacePart());
displayParts.push(ts.keywordPart(128 /* NamespaceKeyword */));
@@ -73975,7 +79848,7 @@ var ts;
displayParts.push(ts.spacePart());
addFullSymbolName(symbol);
ts.forEach(symbol.declarations, function (declaration) {
- if (declaration.kind === 234 /* ImportEqualsDeclaration */) {
+ if (declaration.kind === 236 /* ImportEqualsDeclaration */) {
var importEqualsDeclaration = declaration;
if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) {
displayParts.push(ts.spacePart());
@@ -74011,6 +79884,7 @@ var ts;
}
// For properties, variables and local vars: show the type
if (symbolKind === ts.ScriptElementKind.memberVariableElement ||
+ symbolKind === ts.ScriptElementKind.jsxAttribute ||
symbolFlags & 3 /* Variable */ ||
symbolKind === ts.ScriptElementKind.localVariableElement ||
isThisExpression) {
@@ -74044,14 +79918,15 @@ var ts;
}
if (!documentation) {
documentation = symbol.getDocumentationComment();
+ tags = symbol.getJsDocTags();
if (documentation.length === 0 && symbol.flags & 4 /* Property */) {
- // For some special property access expressions like `experts.foo = foo` or `module.exports.foo = foo`
+ // For some special property access expressions like `exports.foo = foo` or `module.exports.foo = foo`
// there documentation comments might be attached to the right hand side symbol of their declarations.
// The pattern of such special property access is that the parent symbol is the symbol of the file.
- if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 261 /* SourceFile */; })) {
+ if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 264 /* SourceFile */; })) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
- if (!declaration.parent || declaration.parent.kind !== 192 /* BinaryExpression */) {
+ if (!declaration.parent || declaration.parent.kind !== 193 /* BinaryExpression */) {
continue;
}
var rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right);
@@ -74059,6 +79934,7 @@ var ts;
continue;
}
documentation = rhsSymbol.getDocumentationComment();
+ tags = rhsSymbol.getJsDocTags();
if (documentation.length > 0) {
break;
}
@@ -74066,7 +79942,7 @@ var ts;
}
}
}
- return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind };
+ return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind, tags: tags };
function addNewLineIfDisplayPartsExist() {
if (displayParts.length) {
displayParts.push(ts.lineBreakPart());
@@ -74117,6 +79993,7 @@ var ts;
displayParts.push(ts.punctuationPart(19 /* CloseParenToken */));
}
documentation = signature.getDocumentationComment();
+ tags = signature.getJsDocTags();
}
function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) {
var typeParameterParts = ts.mapToDisplayParts(function (writer) {
@@ -74132,16 +80009,16 @@ var ts;
}
return ts.forEach(symbol.declarations, function (declaration) {
// Function expressions are local
- if (declaration.kind === 184 /* FunctionExpression */) {
+ if (declaration.kind === 185 /* FunctionExpression */) {
return true;
}
- if (declaration.kind !== 223 /* VariableDeclaration */ && declaration.kind !== 225 /* FunctionDeclaration */) {
+ if (declaration.kind !== 225 /* VariableDeclaration */ && declaration.kind !== 227 /* FunctionDeclaration */) {
return false;
}
// If the parent is not sourceFile or module block it is local variable
- for (var parent_20 = declaration.parent; !ts.isFunctionBlock(parent_20); parent_20 = parent_20.parent) {
+ for (var parent = declaration.parent; !ts.isFunctionBlock(parent); parent = parent.parent) {
// Reached source file or module block
- if (parent_20.kind === 261 /* SourceFile */ || parent_20.kind === 231 /* ModuleBlock */) {
+ if (parent.kind === 264 /* SourceFile */ || parent.kind === 233 /* ModuleBlock */) {
return false;
}
}
@@ -74194,7 +80071,7 @@ var ts;
sourceFile.moduleName = transpileOptions.moduleName;
}
if (transpileOptions.renamedDependencies) {
- sourceFile.renamedDependencies = ts.createMap(transpileOptions.renamedDependencies);
+ sourceFile.renamedDependencies = ts.createMapFromTemplate(transpileOptions.renamedDependencies);
}
var newLine = ts.getNewLineCharacter(options);
// Output
@@ -74246,13 +80123,14 @@ var ts;
ts.transpile = transpile;
var commandLineOptionsStringToEnum;
/** JS users may pass in string values for enum compiler options (such as ModuleKind), so convert. */
+ /*@internal*/
function fixupCompilerOptions(options, diagnostics) {
// Lazily create this value to fix module loading errors.
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || ts.filter(ts.optionDeclarations, function (o) {
- return typeof o.type === "object" && !ts.forEachProperty(o.type, function (v) { return typeof v !== "number"; });
+ return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_4 = function (opt) {
+ var _loop_5 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -74263,7 +80141,7 @@ var ts;
options[opt.name] = ts.parseCustomTypeOption(opt, value, diagnostics);
}
else {
- if (!ts.forEachProperty(opt.type, function (v) { return v === value; })) {
+ if (!ts.forEachEntry(opt.type, function (v) { return v === value; })) {
// Supplied value isn't a valid enum value.
diagnostics.push(ts.createCompilerDiagnosticForInvalidCustomType(opt));
}
@@ -74271,10 +80149,11 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_4(opt);
+ _loop_5(opt);
}
return options;
}
+ ts.fixupCompilerOptions = fixupCompilerOptions;
})(ts || (ts = {}));
/// <reference path="formatting.ts"/>
/// <reference path="..\..\compiler\scanner.ts"/>
@@ -74298,10 +80177,10 @@ var ts;
ScanAction[ScanAction["RescanJsxIdentifier"] = 4] = "RescanJsxIdentifier";
ScanAction[ScanAction["RescanJsxText"] = 5] = "RescanJsxText";
})(ScanAction || (ScanAction = {}));
- function getFormattingScanner(sourceFile, startPos, endPos) {
+ function getFormattingScanner(text, languageVariant, startPos, endPos) {
ts.Debug.assert(scanner === undefined, "Scanner should be undefined");
- scanner = sourceFile.languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner;
- scanner.setText(sourceFile.text);
+ scanner = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner;
+ scanner.setText(text);
scanner.setTextPos(startPos);
var wasNewLine = true;
var leadingTrivia;
@@ -74379,10 +80258,10 @@ var ts;
function shouldRescanJsxIdentifier(node) {
if (node.parent) {
switch (node.parent.kind) {
- case 250 /* JsxAttribute */:
- case 248 /* JsxOpeningElement */:
- case 249 /* JsxClosingElement */:
- case 247 /* JsxSelfClosingElement */:
+ case 252 /* JsxAttribute */:
+ case 250 /* JsxOpeningElement */:
+ case 251 /* JsxClosingElement */:
+ case 249 /* JsxSelfClosingElement */:
return node.kind === 70 /* Identifier */;
}
}
@@ -74503,8 +80382,8 @@ var ts;
}
function isOnToken() {
ts.Debug.assert(scanner !== undefined);
- var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
- var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
+ var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
+ var startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos();
return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
}
// when containing node in the tree is token
@@ -74794,11 +80673,11 @@ var ts;
this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// Space after }.
- this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */));
+ this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromRange(0 /* FirstToken */, 141 /* LastToken */, [19 /* CloseParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */));
// Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied
this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 81 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseBraceToken */, 105 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([21 /* CloseBracketToken */, 25 /* CommaToken */, 24 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// No space for dot
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
@@ -74815,10 +80694,10 @@ var ts;
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([19 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 80 /* DoKeyword */, 101 /* TryKeyword */, 86 /* FinallyKeyword */, 81 /* ElseKeyword */]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */);
// Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */));
- this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 8 /* Delete */));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenBraceToken */, 17 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */));
// Insert new line after { and before } in multi-line contexts.
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */));
@@ -74848,6 +80727,7 @@ var ts;
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([109 /* LetKeyword */, 75 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */));
this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(88 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */));
this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(104 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(95 /* ReturnKeyword */, 24 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
@@ -74858,18 +80738,19 @@ var ts;
this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([101 /* TryKeyword */, 86 /* FinallyKeyword */]), 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// get x() {}
// set x(val) {}
- this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 133 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([124 /* GetKeyword */, 134 /* SetKeyword */]), 70 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
// Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options.
this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
// TypeScript-specific higher priority rules
// Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(122 /* ConstructorKeyword */, 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Use of module as a function call. e.g.: import m2 = module("m2");
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([127 /* ModuleKeyword */, 131 /* RequireKeyword */]), 18 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space around certain TypeScript keywords
- this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 133 /* SetKeyword */, 114 /* StaticKeyword */, 136 /* TypeKeyword */, 138 /* FromKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 138 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 74 /* ClassKeyword */, 123 /* DeclareKeyword */, 78 /* DefaultKeyword */, 82 /* EnumKeyword */, 83 /* ExportKeyword */, 84 /* ExtendsKeyword */, 124 /* GetKeyword */, 107 /* ImplementsKeyword */, 90 /* ImportKeyword */, 108 /* InterfaceKeyword */, 127 /* ModuleKeyword */, 128 /* NamespaceKeyword */, 111 /* PrivateKeyword */, 113 /* PublicKeyword */, 112 /* ProtectedKeyword */, 130 /* ReadonlyKeyword */, 134 /* SetKeyword */, 114 /* StaticKeyword */, 137 /* TypeKeyword */, 139 /* FromKeyword */, 126 /* KeyOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([84 /* ExtendsKeyword */, 107 /* ImplementsKeyword */, 139 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
// Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" {
this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 16 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */));
// Lambda expressions
@@ -74889,7 +80770,7 @@ var ts;
// decorators
this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 133 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */));
+ this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([116 /* AbstractKeyword */, 70 /* Identifier */, 83 /* ExportKeyword */, 78 /* DefaultKeyword */, 74 /* ClassKeyword */, 114 /* StaticKeyword */, 113 /* PublicKeyword */, 111 /* PrivateKeyword */, 112 /* ProtectedKeyword */, 124 /* GetKeyword */, 134 /* SetKeyword */, 20 /* OpenBracketToken */, 38 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */));
this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(88 /* FunctionKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */));
this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */));
this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(115 /* YieldKeyword */, 38 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */));
@@ -74905,6 +80786,8 @@ var ts;
this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(40 /* SlashToken */, 28 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 57 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(57 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // No space before non-null assertion operator
+ this.NoSpaceBeforeNonNullAssertionOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */));
// These rules are higher in priority than user-configurable rules.
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
@@ -74935,7 +80818,7 @@ var ts;
this.SpaceBeforeJsxAttribute, this.SpaceBeforeSlashInJsxOpeningElement, this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement,
this.NoSpaceBeforeEqualInJsxAttribute, this.NoSpaceAfterEqualInJsxAttribute,
// TypeScript-specific rules
- this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
+ this.NoSpaceAfterModuleImport,
this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords,
this.SpaceAfterModuleName,
this.SpaceBeforeArrow, this.SpaceAfterArrow,
@@ -74950,6 +80833,7 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
+ this.NoSpaceBeforeNonNullAssertionOperator
];
// These rules are lower in priority than user-configurable rules.
this.LowPriorityCommonRules = [
@@ -74959,7 +80843,6 @@ var ts;
this.NoSpaceBeforeOpenBracket,
this.NoSpaceAfterCloseBracket,
this.SpaceAfterSemicolon,
- this.NoSpaceBeforeOpenParenInFuncDecl,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
///
@@ -75017,9 +80900,9 @@ var ts;
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
- for (var name_48 in o) {
- if (o[name_48] === rule) {
- return name_48;
+ for (var name in o) {
+ if (o[name] === rule) {
+ return name;
}
}
throw new Error("Unknown rule");
@@ -75028,42 +80911,44 @@ var ts;
/// Contexts
///
Rules.IsForContext = function (context) {
- return context.contextNode.kind === 211 /* ForStatement */;
+ return context.contextNode.kind === 213 /* ForStatement */;
};
Rules.IsNotForContext = function (context) {
return !Rules.IsForContext(context);
};
Rules.IsBinaryOpContext = function (context) {
switch (context.contextNode.kind) {
- case 192 /* BinaryExpression */:
- case 193 /* ConditionalExpression */:
- case 200 /* AsExpression */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
- case 156 /* TypePredicate */:
- case 164 /* UnionType */:
- case 165 /* IntersectionType */:
+ case 193 /* BinaryExpression */:
+ case 194 /* ConditionalExpression */:
+ case 201 /* AsExpression */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 157 /* TypePredicate */:
+ case 165 /* UnionType */:
+ case 166 /* IntersectionType */:
return true;
// equals in binding elements: function foo([[x, y] = [1, 2]])
- case 174 /* BindingElement */:
+ case 175 /* BindingElement */:
// equals in type X = ...
- case 228 /* TypeAliasDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
// equal in import a = module('a');
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// equal in let a = 0;
- case 223 /* VariableDeclaration */:
+ case 225 /* VariableDeclaration */:
// equal in p = 0;
- case 144 /* Parameter */:
- case 260 /* EnumMember */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 145 /* Parameter */:
+ case 263 /* EnumMember */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return context.currentTokenSpan.kind === 57 /* EqualsToken */ || context.nextTokenSpan.kind === 57 /* EqualsToken */;
// "in" keyword in for (let x in []) { }
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
+ // "in" keyword in [P in keyof T]: T[P]
+ case 144 /* TypeParameter */:
return context.currentTokenSpan.kind === 91 /* InKeyword */ || context.nextTokenSpan.kind === 91 /* InKeyword */;
// Technically, "of" is not a binary operator, but format it the same way as "in"
- case 213 /* ForOfStatement */:
- return context.currentTokenSpan.kind === 140 /* OfKeyword */ || context.nextTokenSpan.kind === 140 /* OfKeyword */;
+ case 215 /* ForOfStatement */:
+ return context.currentTokenSpan.kind === 141 /* OfKeyword */ || context.nextTokenSpan.kind === 141 /* OfKeyword */;
}
return false;
};
@@ -75071,7 +80956,7 @@ var ts;
return !Rules.IsBinaryOpContext(context);
};
Rules.IsConditionalOperatorContext = function (context) {
- return context.contextNode.kind === 193 /* ConditionalExpression */;
+ return context.contextNode.kind === 194 /* ConditionalExpression */;
};
Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) {
//// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction.
@@ -75092,6 +80977,9 @@ var ts;
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we format.
return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context);
};
+ Rules.IsBraceWrappedContext = function (context) {
+ return context.contextNode.kind === 173 /* ObjectBindingPattern */ || Rules.IsSingleLineBlockContext(context);
+ };
// This check is done before an open brace in a control construct, a function, or a typescript block declaration
Rules.IsBeforeMultilineBlockContext = function (context) {
return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine());
@@ -75115,97 +81003,103 @@ var ts;
return true;
}
switch (node.kind) {
- case 204 /* Block */:
- case 232 /* CaseBlock */:
- case 176 /* ObjectLiteralExpression */:
- case 231 /* ModuleBlock */:
+ case 206 /* Block */:
+ case 234 /* CaseBlock */:
+ case 177 /* ObjectLiteralExpression */:
+ case 233 /* ModuleBlock */:
return true;
}
return false;
};
Rules.IsFunctionDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
// case SyntaxKind.MemberFunctionDeclaration:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
// case SyntaxKind.MethodSignature:
- case 153 /* CallSignature */:
- case 184 /* FunctionExpression */:
- case 150 /* Constructor */:
- case 185 /* ArrowFunction */:
+ case 154 /* CallSignature */:
+ case 185 /* FunctionExpression */:
+ case 151 /* Constructor */:
+ case 186 /* ArrowFunction */:
// case SyntaxKind.ConstructorDeclaration:
// case SyntaxKind.SimpleArrowFunctionExpression:
// case SyntaxKind.ParenthesizedArrowFunctionExpression:
- case 227 /* InterfaceDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return true;
}
return false;
};
Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) {
- return context.contextNode.kind === 225 /* FunctionDeclaration */ || context.contextNode.kind === 184 /* FunctionExpression */;
+ return context.contextNode.kind === 227 /* FunctionDeclaration */ || context.contextNode.kind === 185 /* FunctionExpression */;
};
Rules.IsTypeScriptDeclWithBlockContext = function (context) {
return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode);
};
Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) {
switch (node.kind) {
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 161 /* TypeLiteral */:
- case 230 /* ModuleDeclaration */:
- case 241 /* ExportDeclaration */:
- case 242 /* NamedExports */:
- case 235 /* ImportDeclaration */:
- case 238 /* NamedImports */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 162 /* TypeLiteral */:
+ case 232 /* ModuleDeclaration */:
+ case 243 /* ExportDeclaration */:
+ case 244 /* NamedExports */:
+ case 237 /* ImportDeclaration */:
+ case 240 /* NamedImports */:
return true;
}
return false;
};
Rules.IsAfterCodeBlockContext = function (context) {
switch (context.currentTokenParent.kind) {
- case 226 /* ClassDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 229 /* EnumDeclaration */:
- case 204 /* Block */:
- case 256 /* CatchClause */:
- case 231 /* ModuleBlock */:
- case 218 /* SwitchStatement */:
+ case 228 /* ClassDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 259 /* CatchClause */:
+ case 233 /* ModuleBlock */:
+ case 220 /* SwitchStatement */:
return true;
+ case 206 /* Block */: {
+ var blockParent = context.currentTokenParent.parent;
+ if (blockParent.kind !== 186 /* ArrowFunction */ &&
+ blockParent.kind !== 185 /* FunctionExpression */) {
+ return true;
+ }
+ }
}
return false;
};
Rules.IsControlDeclContext = function (context) {
switch (context.contextNode.kind) {
- case 208 /* IfStatement */:
- case 218 /* SwitchStatement */:
- case 211 /* ForStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 210 /* WhileStatement */:
- case 221 /* TryStatement */:
- case 209 /* DoStatement */:
- case 217 /* WithStatement */:
+ case 210 /* IfStatement */:
+ case 220 /* SwitchStatement */:
+ case 213 /* ForStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 212 /* WhileStatement */:
+ case 223 /* TryStatement */:
+ case 211 /* DoStatement */:
+ case 219 /* WithStatement */:
// TODO
// case SyntaxKind.ElseClause:
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return true;
default:
return false;
}
};
Rules.IsObjectContext = function (context) {
- return context.contextNode.kind === 176 /* ObjectLiteralExpression */;
+ return context.contextNode.kind === 177 /* ObjectLiteralExpression */;
};
Rules.IsFunctionCallContext = function (context) {
- return context.contextNode.kind === 179 /* CallExpression */;
+ return context.contextNode.kind === 180 /* CallExpression */;
};
Rules.IsNewContext = function (context) {
- return context.contextNode.kind === 180 /* NewExpression */;
+ return context.contextNode.kind === 181 /* NewExpression */;
};
Rules.IsFunctionCallOrNewContext = function (context) {
return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context);
@@ -75217,25 +81111,25 @@ var ts;
return context.nextTokenSpan.kind !== 21 /* CloseBracketToken */;
};
Rules.IsArrowFunctionContext = function (context) {
- return context.contextNode.kind === 185 /* ArrowFunction */;
+ return context.contextNode.kind === 186 /* ArrowFunction */;
};
Rules.IsNonJsxSameLineTokenContext = function (context) {
return context.TokensAreOnSameLine() && context.contextNode.kind !== 10 /* JsxText */;
};
Rules.IsNonJsxElementContext = function (context) {
- return context.contextNode.kind !== 246 /* JsxElement */;
+ return context.contextNode.kind !== 248 /* JsxElement */;
};
Rules.IsJsxExpressionContext = function (context) {
- return context.contextNode.kind === 252 /* JsxExpression */;
+ return context.contextNode.kind === 255 /* JsxExpression */;
};
Rules.IsNextTokenParentJsxAttribute = function (context) {
- return context.nextTokenParent.kind === 250 /* JsxAttribute */;
+ return context.nextTokenParent.kind === 252 /* JsxAttribute */;
};
Rules.IsJsxAttributeContext = function (context) {
- return context.contextNode.kind === 250 /* JsxAttribute */;
+ return context.contextNode.kind === 252 /* JsxAttribute */;
};
Rules.IsJsxSelfClosingElementContext = function (context) {
- return context.contextNode.kind === 247 /* JsxSelfClosingElement */;
+ return context.contextNode.kind === 249 /* JsxSelfClosingElement */;
};
Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) {
return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context);
@@ -75250,41 +81144,42 @@ var ts;
while (ts.isPartOfExpression(node)) {
node = node.parent;
}
- return node.kind === 145 /* Decorator */;
+ return node.kind === 146 /* Decorator */;
};
Rules.IsStartOfVariableDeclarationList = function (context) {
- return context.currentTokenParent.kind === 224 /* VariableDeclarationList */ &&
+ return context.currentTokenParent.kind === 226 /* VariableDeclarationList */ &&
context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;
};
Rules.IsNotFormatOnEnter = function (context) {
return context.formattingRequestKind !== 2 /* FormatOnEnter */;
};
Rules.IsModuleDeclContext = function (context) {
- return context.contextNode.kind === 230 /* ModuleDeclaration */;
+ return context.contextNode.kind === 232 /* ModuleDeclaration */;
};
Rules.IsObjectTypeContext = function (context) {
- return context.contextNode.kind === 161 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
+ return context.contextNode.kind === 162 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
};
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 26 /* LessThanToken */ && token.kind !== 28 /* GreaterThanToken */) {
return false;
}
switch (parent.kind) {
- case 157 /* TypeReference */:
- case 182 /* TypeAssertionExpression */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 199 /* ExpressionWithTypeArguments */:
+ case 158 /* TypeReference */:
+ case 183 /* TypeAssertionExpression */:
+ case 230 /* TypeAliasDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 200 /* ExpressionWithTypeArguments */:
return true;
default:
return false;
@@ -75295,13 +81190,16 @@ var ts;
Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent);
};
Rules.IsTypeAssertionContext = function (context) {
- return context.contextNode.kind === 182 /* TypeAssertionExpression */;
+ return context.contextNode.kind === 183 /* TypeAssertionExpression */;
};
Rules.IsVoidOpContext = function (context) {
- return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 188 /* VoidExpression */;
+ return context.currentTokenSpan.kind === 104 /* VoidKeyword */ && context.currentTokenParent.kind === 189 /* VoidExpression */;
};
Rules.IsYieldOrYieldStarWithOperand = function (context) {
- return context.contextNode.kind === 195 /* YieldExpression */ && context.contextNode.expression !== undefined;
+ return context.contextNode.kind === 196 /* YieldExpression */ && context.contextNode.expression !== undefined;
+ };
+ Rules.IsNonNullAssertionContext = function (context) {
+ return context.contextNode.kind === 202 /* NonNullExpression */;
};
return Rules;
}());
@@ -75325,7 +81223,7 @@ var ts;
return result;
};
RulesMap.prototype.Initialize = function (rules) {
- this.mapRowLength = 140 /* LastToken */ + 1;
+ this.mapRowLength = 141 /* LastToken */ + 1;
this.map = new Array(this.mapRowLength * this.mapRowLength); // new Array<RulesBucket>(this.mapRowLength * this.mapRowLength);
// This array is used only during construction of the rulesbucket in the map
var rulesBucketConstructionStateList = new Array(this.map.length); // new Array<RulesBucketConstructionState>(this.map.length);
@@ -75339,7 +81237,7 @@ var ts;
});
};
RulesMap.prototype.GetRuleBucketIndex = function (row, column) {
- ts.Debug.assert(row <= 140 /* LastKeyword */ && column <= 140 /* LastKeyword */, "Must compute formatting context from tokens");
+ ts.Debug.assert(row <= 141 /* LastKeyword */ && column <= 141 /* LastKeyword */, "Must compute formatting context from tokens");
var rulesBucketIndex = (row * this.mapRowLength) + column;
return rulesBucketIndex;
};
@@ -75520,7 +81418,7 @@ var ts;
}
TokenAllAccess.prototype.GetTokens = function () {
var result = [];
- for (var token = 0 /* FirstToken */; token <= 140 /* LastToken */; token++) {
+ for (var token = 0 /* FirstToken */; token <= 141 /* LastToken */; token++) {
result.push(token);
}
return result;
@@ -75564,9 +81462,9 @@ var ts;
}());
TokenRange.Any = TokenRange.AllTokens();
TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */]));
- TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 140 /* LastKeyword */);
+ TokenRange.Keywords = TokenRange.FromRange(71 /* FirstKeyword */, 141 /* LastKeyword */);
TokenRange.BinaryOperators = TokenRange.FromRange(26 /* FirstBinaryOperator */, 69 /* LastBinaryOperator */);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 140 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([91 /* InKeyword */, 92 /* InstanceOfKeyword */, 141 /* OfKeyword */, 117 /* AsKeyword */, 125 /* IsKeyword */]);
TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([42 /* PlusPlusToken */, 43 /* MinusMinusToken */, 51 /* TildeToken */, 50 /* ExclamationToken */]);
TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 70 /* Identifier */, 18 /* OpenParenToken */, 20 /* OpenBracketToken */, 16 /* OpenBraceToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
@@ -75574,7 +81472,7 @@ var ts;
TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 18 /* OpenParenToken */, 98 /* ThisKeyword */, 93 /* NewKeyword */]);
TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([70 /* Identifier */, 19 /* CloseParenToken */, 21 /* CloseBracketToken */, 93 /* NewKeyword */]);
TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
- TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 134 /* StringKeyword */, 121 /* BooleanKeyword */, 135 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]);
+ TokenRange.TypeNames = TokenRange.FromTokens([70 /* Identifier */, 132 /* NumberKeyword */, 135 /* StringKeyword */, 121 /* BooleanKeyword */, 136 /* SymbolKeyword */, 104 /* VoidKeyword */, 118 /* AnyKeyword */]);
Shared.TokenRange = TokenRange;
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
@@ -75610,6 +81508,9 @@ var ts;
RulesProvider.prototype.getRulesMap = function () {
return this.rulesMap;
};
+ RulesProvider.prototype.getFormatOptions = function () {
+ return this.options;
+ };
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
var activeRules = this.createActiveRules(options);
@@ -75621,6 +81522,12 @@ var ts;
};
RulesProvider.prototype.createActiveRules = function (options) {
var rules = this.globalRules.HighPriorityCommonRules.slice(0);
+ if (options.insertSpaceAfterConstructor) {
+ rules.push(this.globalRules.SpaceAfterConstructor);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceAfterConstructor);
+ }
if (options.insertSpaceAfterCommaDelimiter) {
rules.push(this.globalRules.SpaceAfterComma);
}
@@ -75701,6 +81608,12 @@ var ts;
rules.push(this.globalRules.NoSpaceBeforeBinaryOperator);
rules.push(this.globalRules.NoSpaceAfterBinaryOperator);
}
+ if (options.insertSpaceBeforeFunctionParenthesis) {
+ rules.push(this.globalRules.SpaceBeforeOpenParenInFuncDecl);
+ }
+ else {
+ rules.push(this.globalRules.NoSpaceBeforeOpenParenInFuncDecl);
+ }
if (options.placeOpenBraceOnNewLineForControlBlocks) {
rules.push(this.globalRules.NewLineBeforeOpenBraceInControl);
}
@@ -75833,17 +81746,17 @@ var ts;
// i.e. parent is class declaration with the list of members and node is one of members.
function isListElement(parent, node) {
switch (parent.kind) {
- case 226 /* ClassDeclaration */:
- case 227 /* InterfaceDeclaration */:
+ case 228 /* ClassDeclaration */:
+ case 229 /* InterfaceDeclaration */:
return ts.rangeContainsRange(parent.members, node);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
var body = parent.body;
- return body && body.kind === 231 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node);
- case 261 /* SourceFile */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
+ return body && body.kind === 233 /* ModuleBlock */ && ts.rangeContainsRange(body.statements, node);
+ case 264 /* SourceFile */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
return ts.rangeContainsRange(parent.statements, node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return ts.rangeContainsRange(parent.block.statements, node);
}
return false;
@@ -75863,9 +81776,9 @@ var ts;
}
}
/** formatting is not applied to ranges that contain parse errors.
- * This function will return a predicate that for a given text range will tell
- * if there are any parse errors that overlap with the range.
- */
+ * This function will return a predicate that for a given text range will tell
+ * if there are any parse errors that overlap with the range.
+ */
function prepareRangeContainsErrorFunction(errors, originalRange) {
if (!errors.length) {
return rangeHasNoErrors;
@@ -75903,10 +81816,10 @@ var ts;
}
}
/**
- * Start of the original range might fall inside the comment - scanner will not yield appropriate results
- * This function will look for token that is located before the start of target range
- * and return its end as start position for the scanner.
- */
+ * Start of the original range might fall inside the comment - scanner will not yield appropriate results
+ * This function will look for token that is located before the start of target range
+ * and return its end as start position for the scanner.
+ */
function getScanStartPosition(enclosingNode, originalRange, sourceFile) {
var start = enclosingNode.getStart(sourceFile);
if (start === originalRange.pos && enclosingNode.end === originalRange.end) {
@@ -75956,14 +81869,21 @@ var ts;
}
return 0;
}
+ /* @internal */
+ function formatNode(node, sourceFileLike, languageVariant, initialIndentation, delta, rulesProvider) {
+ var range = { pos: 0, end: sourceFileLike.text.length };
+ return formatSpanWorker(range, node, initialIndentation, delta, formatting.getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end), rulesProvider.getFormatOptions(), rulesProvider, 1 /* FormatSelection */, function (_) { return false; }, // assume that node does not have any errors
+ sourceFileLike);
+ }
+ formatting.formatNode = formatNode;
function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) {
- var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange);
- // formatting context is used by rules provider
- var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
// find the smallest node that fully wraps the range and compute the initial indentation for the node
var enclosingNode = findEnclosingNode(originalRange, sourceFile);
- var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end);
- var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options);
+ return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options), getOwnOrInheritedDelta(enclosingNode, options, sourceFile), formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end), options, rulesProvider, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile);
+ }
+ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, options, rulesProvider, requestKind, rangeContainsError, sourceFile) {
+ // formatting context is used by rules provider
+ var formattingContext = new formatting.FormattingContext(sourceFile, requestKind);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -75978,13 +81898,12 @@ var ts;
if (enclosingNode.decorators) {
undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line;
}
- var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile);
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
}
if (!formattingScanner.isOnToken()) {
var leadingTrivia = formattingScanner.getCurrentLeadingTrivia();
if (leadingTrivia) {
- processTrivia(leadingTrivia, enclosingNode, enclosingNode, undefined);
+ processTrivia(leadingTrivia, enclosingNode, enclosingNode, /*dynamicIndentation*/ undefined);
trimTrailingWhitespacesForRemainingRange();
}
}
@@ -75992,12 +81911,12 @@ var ts;
return edits;
// local functions
/** Tries to compute the indentation for a list element.
- * If list element is not in range then
- * function will pick its actual indentation
- * so it can be pushed downstream as inherited indentation.
- * If list element is in the range - its indentation will be equal
- * to inherited indentation from its predecessors.
- */
+ * If list element is not in range then
+ * function will pick its actual indentation
+ * so it can be pushed downstream as inherited indentation.
+ * If list element is in the range - its indentation will be equal
+ * to inherited indentation from its predecessors.
+ */
function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) {
if (ts.rangeOverlapsWithStartEnd(range, startPos, endPos) ||
ts.rangeContainsStartEnd(range, startPos, endPos) /* Not to miss zero-range nodes e.g. JsxText */) {
@@ -76048,20 +81967,19 @@ var ts;
return node.modifiers[0].kind;
}
switch (node.kind) {
- case 226 /* ClassDeclaration */: return 74 /* ClassKeyword */;
- case 227 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */;
- case 225 /* FunctionDeclaration */: return 88 /* FunctionKeyword */;
- case 229 /* EnumDeclaration */: return 229 /* EnumDeclaration */;
- case 151 /* GetAccessor */: return 124 /* GetKeyword */;
- case 152 /* SetAccessor */: return 133 /* SetKeyword */;
- case 149 /* MethodDeclaration */:
+ case 228 /* ClassDeclaration */: return 74 /* ClassKeyword */;
+ case 229 /* InterfaceDeclaration */: return 108 /* InterfaceKeyword */;
+ case 227 /* FunctionDeclaration */: return 88 /* FunctionKeyword */;
+ case 231 /* EnumDeclaration */: return 231 /* EnumDeclaration */;
+ case 152 /* GetAccessor */: return 124 /* GetKeyword */;
+ case 153 /* SetAccessor */: return 134 /* SetKeyword */;
+ case 150 /* MethodDeclaration */:
if (node.asteriskToken) {
return 38 /* AsteriskToken */;
- } /*
- fall-through
- */
- case 147 /* PropertyDeclaration */:
- case 144 /* Parameter */:
+ }
+ // falls through
+ case 148 /* PropertyDeclaration */:
+ case 145 /* Parameter */:
return node.name.kind;
}
}
@@ -76091,18 +82009,31 @@ var ts;
// open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent
case 16 /* OpenBraceToken */:
case 17 /* CloseBraceToken */:
- case 20 /* OpenBracketToken */:
- case 21 /* CloseBracketToken */:
case 18 /* OpenParenToken */:
case 19 /* CloseParenToken */:
case 81 /* ElseKeyword */:
case 105 /* WhileKeyword */:
case 56 /* AtToken */:
return indentation;
- default:
- // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
- return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
+ case 40 /* SlashToken */:
+ case 28 /* GreaterThanToken */: {
+ if (container.kind === 250 /* JsxOpeningElement */ ||
+ container.kind === 251 /* JsxClosingElement */ ||
+ container.kind === 249 /* JsxSelfClosingElement */) {
+ return indentation;
+ }
+ break;
+ }
+ case 20 /* OpenBracketToken */:
+ case 21 /* CloseBracketToken */: {
+ if (container.kind !== 171 /* MappedType */) {
+ return indentation;
+ }
+ break;
+ }
}
+ // if token line equals to the line of containing node (this is a first token in the node) - use node indentation
+ return nodeStartLine !== line ? indentation + getEffectiveDelta(delta, container) : indentation;
},
getIndentation: function () { return indentation; },
getDelta: function (child) { return getEffectiveDelta(delta, child); },
@@ -76125,7 +82056,7 @@ var ts;
};
function getEffectiveDelta(delta, child) {
// Delta value should be zero when the node explicitly prevents indentation of the child node
- return formatting.SmartIndenter.nodeWillIndentChild(node, child, true) ? delta : 0;
+ return formatting.SmartIndenter.nodeWillIndentChild(node, child, /*indentByDefault*/ true) ? delta : 0;
}
}
function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta) {
@@ -76158,7 +82089,7 @@ var ts;
if (tokenInfo.token.end > node.end) {
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
}
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
var childStartPos = child.getStart(sourceFile);
@@ -76192,7 +82123,7 @@ var ts;
// stop when formatting scanner advances past the beginning of the child
break;
}
- consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
}
if (!formattingScanner.isOnToken()) {
return inheritedIndentation;
@@ -76205,11 +82136,11 @@ var ts;
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
return inheritedIndentation;
}
- var effectiveParentStartLine = child.kind === 145 /* Decorator */ ? childStartLine : undecoratedParentStartLine;
+ var effectiveParentStartLine = child.kind === 146 /* Decorator */ ? childStartLine : undecoratedParentStartLine;
var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine);
processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);
childContextNode = node;
- if (isFirstListItem && parent.kind === 175 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) {
+ if (isFirstListItem && parent.kind === 176 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) {
inheritedIndentation = childIndentation.indentation;
}
return inheritedIndentation;
@@ -76232,11 +82163,11 @@ var ts;
startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1 /* Unknown */, parent, parentDynamicIndentation, parentStartLine);
listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta);
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
else {
// consume any tokens that precede the list as child elements of 'node' using its indentation scope
- consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent);
}
}
}
@@ -76254,7 +82185,7 @@ var ts;
// without this check close paren will be interpreted as list end token for function expression which is wrong
if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) {
// consume list end token
- consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
+ consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent);
}
}
}
@@ -76461,7 +82392,7 @@ var ts;
}
// shift all parts on the delta size
var delta = indentation - nonWhitespaceColumnInFirstPart.column;
- for (var i = startIndex, len = parts.length; i < len; i++, startLine++) {
+ for (var i = startIndex; i < parts.length; i++, startLine++) {
var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile);
var nonWhitespaceCharacterAndColumn = i === 0
? nonWhitespaceColumnInFirstPart
@@ -76566,12 +82497,12 @@ var ts;
}
function getOpenTokenForList(node, list) {
switch (node.kind) {
- case 150 /* Constructor */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 185 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 186 /* ArrowFunction */:
if (node.typeParameters === list) {
return 26 /* LessThanToken */;
}
@@ -76579,8 +82510,8 @@ var ts;
return 18 /* OpenParenToken */;
}
break;
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
if (node.typeArguments === list) {
return 26 /* LessThanToken */;
}
@@ -76588,7 +82519,7 @@ var ts;
return 18 /* OpenParenToken */;
}
break;
- case 157 /* TypeReference */:
+ case 158 /* TypeReference */:
if (node.typeArguments === list) {
return 26 /* LessThanToken */;
}
@@ -76668,7 +82599,20 @@ var ts;
(function (Value) {
Value[Value["Unknown"] = -1] = "Unknown";
})(Value || (Value = {}));
- function getIndentation(position, sourceFile, options) {
+ /**
+ * Computed indentation for a given position in source file
+ * @param position - position in file
+ * @param sourceFile - target source file
+ * @param options - set of editor options that control indentation
+ * @param assumeNewLineBeforeCloseBrace - false when getIndentation is called on the text from the real source file.
+ * true - when we need to assume that position is on the newline. This is usefult for codefixes, i.e.
+ * function f() {
+ * |}
+ * when inserting some text after open brace we would like to get the value of indentation as if newline was already there.
+ * However by default indentation at position | will be 0 so 'assumeNewLineBeforeCloseBrace' allows to override this behavior,
+ */
+ function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace) {
+ if (assumeNewLineBeforeCloseBrace === void 0) { assumeNewLineBeforeCloseBrace = false; }
if (position > sourceFile.text.length) {
return getBaseIndentation(options); // past EOF
}
@@ -76704,7 +82648,7 @@ var ts;
var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile);
return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options);
}
- if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 192 /* BinaryExpression */) {
+ if (precedingToken.kind === 25 /* CommaToken */ && precedingToken.parent.kind !== 193 /* BinaryExpression */) {
// previous token is comma that separates items in list - find the previous item and try to derive indentation from it
var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options);
if (actualIndentation !== -1 /* Unknown */) {
@@ -76720,8 +82664,10 @@ var ts;
while (current) {
if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) {
currentStart = getStartLineAndCharacterForNode(current, sourceFile);
- if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) {
- indentationDelta = 0;
+ var nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile);
+ if (nextTokenKind !== 0 /* Unknown */) {
+ // handle cases when codefix is about to be inserted before the close brace
+ indentationDelta = assumeNewLineBeforeCloseBrace && nextTokenKind === 2 /* CloseBrace */ ? options.indentSize : 0;
}
else {
indentationDelta = lineAtPosition !== currentStart.line ? options.indentSize : 0;
@@ -76827,20 +82773,26 @@ var ts;
// - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually
// - parent and child are not on the same line
var useActualIndentation = (ts.isDeclaration(current) || ts.isStatementButNotDeclaration(current)) &&
- (parent.kind === 261 /* SourceFile */ || !parentAndChildShareLine);
+ (parent.kind === 264 /* SourceFile */ || !parentAndChildShareLine);
if (!useActualIndentation) {
return -1 /* Unknown */;
}
return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options);
}
+ var NextTokenKind;
+ (function (NextTokenKind) {
+ NextTokenKind[NextTokenKind["Unknown"] = 0] = "Unknown";
+ NextTokenKind[NextTokenKind["OpenBrace"] = 1] = "OpenBrace";
+ NextTokenKind[NextTokenKind["CloseBrace"] = 2] = "CloseBrace";
+ })(NextTokenKind || (NextTokenKind = {}));
function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) {
var nextToken = ts.findNextToken(precedingToken, current);
if (!nextToken) {
- return false;
+ return 0 /* Unknown */;
}
if (nextToken.kind === 16 /* OpenBraceToken */) {
// open braces are always indented at the parent level
- return true;
+ return 1 /* OpenBrace */;
}
else if (nextToken.kind === 17 /* CloseBraceToken */) {
// close braces are indented at the parent level if they are located on the same line with cursor
@@ -76852,15 +82804,15 @@ var ts;
// class A {
// $}
var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line;
- return lineAtPosition === nextTokenStartLine;
+ return lineAtPosition === nextTokenStartLine ? 2 /* CloseBrace */ : 0 /* Unknown */;
}
- return false;
+ return 0 /* Unknown */;
}
function getStartLineAndCharacterForNode(n, sourceFile) {
return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));
}
function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) {
- if (parent.kind === 208 /* IfStatement */ && parent.elseStatement === child) {
+ if (parent.kind === 210 /* IfStatement */ && parent.elseStatement === child) {
var elseKeyword = ts.findChildOfKind(parent, 81 /* ElseKeyword */, sourceFile);
ts.Debug.assert(elseKeyword !== undefined);
var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line;
@@ -76869,53 +82821,49 @@ var ts;
return false;
}
SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement;
+ function getListIfStartEndIsInListRange(list, start, end) {
+ return list && ts.rangeContainsStartEnd(list, start, end) ? list : undefined;
+ }
function getContainingList(node, sourceFile) {
if (node.parent) {
switch (node.parent.kind) {
- case 157 /* TypeReference */:
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) {
- return node.parent.typeArguments;
- }
- break;
- case 176 /* ObjectLiteralExpression */:
+ case 158 /* TypeReference */:
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd());
+ case 177 /* ObjectLiteralExpression */:
return node.parent.properties;
- case 175 /* ArrayLiteralExpression */:
+ case 176 /* ArrayLiteralExpression */:
return node.parent.elements;
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */: {
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 151 /* Constructor */:
+ case 160 /* ConstructorType */:
+ case 155 /* ConstructSignature */: {
var start = node.getStart(sourceFile);
- if (node.parent.typeParameters &&
- ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) {
- return node.parent.typeParameters;
- }
- if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) {
- return node.parent.parameters;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.parameters, start, node.getEnd());
}
- case 180 /* NewExpression */:
- case 179 /* CallExpression */: {
+ case 228 /* ClassDeclaration */:
+ return getListIfStartEndIsInListRange(node.parent.typeParameters, node.getStart(sourceFile), node.getEnd());
+ case 181 /* NewExpression */:
+ case 180 /* CallExpression */: {
var start = node.getStart(sourceFile);
- if (node.parent.typeArguments &&
- ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) {
- return node.parent.typeArguments;
- }
- if (node.parent.arguments &&
- ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) {
- return node.parent.arguments;
- }
- break;
+ return getListIfStartEndIsInListRange(node.parent.typeArguments, start, node.getEnd()) ||
+ getListIfStartEndIsInListRange(node.parent.arguments, start, node.getEnd());
}
+ case 226 /* VariableDeclarationList */:
+ return getListIfStartEndIsInListRange(node.parent.declarations, node.getStart(sourceFile), node.getEnd());
+ case 240 /* NamedImports */:
+ case 244 /* NamedExports */:
+ return getListIfStartEndIsInListRange(node.parent.elements, node.getStart(sourceFile), node.getEnd());
}
}
return undefined;
}
+ SmartIndenter.getContainingList = getContainingList;
function getActualIndentationForListItem(node, sourceFile, options) {
var containingList = getContainingList(node, sourceFile);
return containingList ? getActualIndentationFromList(containingList) : -1 /* Unknown */;
@@ -76930,8 +82878,8 @@ var ts;
if (node.kind === 19 /* CloseParenToken */) {
return -1 /* Unknown */;
}
- if (node.parent && (node.parent.kind === 179 /* CallExpression */ ||
- node.parent.kind === 180 /* NewExpression */) &&
+ if (node.parent && (node.parent.kind === 180 /* CallExpression */ ||
+ node.parent.kind === 181 /* NewExpression */) &&
node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
@@ -76949,10 +82897,10 @@ var ts;
function getStartingExpression(node) {
while (true) {
switch (node.kind) {
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 177 /* PropertyAccessExpression */:
- case 178 /* ElementAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 179 /* ElementAccessExpression */:
node = node.expression;
break;
default:
@@ -77016,48 +82964,49 @@ var ts;
SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn;
function nodeContentIsAlwaysIndented(kind) {
switch (kind) {
- case 207 /* ExpressionStatement */:
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 229 /* EnumDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 175 /* ArrayLiteralExpression */:
- case 204 /* Block */:
- case 231 /* ModuleBlock */:
- case 176 /* ObjectLiteralExpression */:
- case 161 /* TypeLiteral */:
- case 163 /* TupleType */:
- case 232 /* CaseBlock */:
- case 254 /* DefaultClause */:
- case 253 /* CaseClause */:
- case 183 /* ParenthesizedExpression */:
- case 177 /* PropertyAccessExpression */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 205 /* VariableStatement */:
- case 223 /* VariableDeclaration */:
- case 240 /* ExportAssignment */:
- case 216 /* ReturnStatement */:
- case 193 /* ConditionalExpression */:
- case 173 /* ArrayBindingPattern */:
- case 172 /* ObjectBindingPattern */:
- case 248 /* JsxOpeningElement */:
- case 247 /* JsxSelfClosingElement */:
- case 252 /* JsxExpression */:
- case 148 /* MethodSignature */:
- case 153 /* CallSignature */:
- case 154 /* ConstructSignature */:
- case 144 /* Parameter */:
- case 158 /* FunctionType */:
- case 159 /* ConstructorType */:
- case 166 /* ParenthesizedType */:
- case 181 /* TaggedTemplateExpression */:
- case 189 /* AwaitExpression */:
- case 242 /* NamedExports */:
- case 238 /* NamedImports */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
+ case 209 /* ExpressionStatement */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 176 /* ArrayLiteralExpression */:
+ case 206 /* Block */:
+ case 233 /* ModuleBlock */:
+ case 177 /* ObjectLiteralExpression */:
+ case 162 /* TypeLiteral */:
+ case 171 /* MappedType */:
+ case 164 /* TupleType */:
+ case 234 /* CaseBlock */:
+ case 257 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 184 /* ParenthesizedExpression */:
+ case 178 /* PropertyAccessExpression */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 207 /* VariableStatement */:
+ case 225 /* VariableDeclaration */:
+ case 242 /* ExportAssignment */:
+ case 218 /* ReturnStatement */:
+ case 194 /* ConditionalExpression */:
+ case 174 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 250 /* JsxOpeningElement */:
+ case 249 /* JsxSelfClosingElement */:
+ case 255 /* JsxExpression */:
+ case 149 /* MethodSignature */:
+ case 154 /* CallSignature */:
+ case 155 /* ConstructSignature */:
+ case 145 /* Parameter */:
+ case 159 /* FunctionType */:
+ case 160 /* ConstructorType */:
+ case 167 /* ParenthesizedType */:
+ case 182 /* TaggedTemplateExpression */:
+ case 190 /* AwaitExpression */:
+ case 244 /* NamedExports */:
+ case 240 /* NamedImports */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
return true;
}
return false;
@@ -77066,27 +83015,27 @@ var ts;
function nodeWillIndentChild(parent, child, indentByDefault) {
var childKind = child ? child.kind : 0 /* Unknown */;
switch (parent.kind) {
- case 209 /* DoStatement */:
- case 210 /* WhileStatement */:
- case 212 /* ForInStatement */:
- case 213 /* ForOfStatement */:
- case 211 /* ForStatement */:
- case 208 /* IfStatement */:
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 185 /* ArrowFunction */:
- case 150 /* Constructor */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- return childKind !== 204 /* Block */;
- case 241 /* ExportDeclaration */:
- return childKind !== 242 /* NamedExports */;
- case 235 /* ImportDeclaration */:
- return childKind !== 236 /* ImportClause */ ||
- (child.namedBindings && child.namedBindings.kind !== 238 /* NamedImports */);
- case 246 /* JsxElement */:
- return childKind !== 249 /* JsxClosingElement */;
+ case 211 /* DoStatement */:
+ case 212 /* WhileStatement */:
+ case 214 /* ForInStatement */:
+ case 215 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 210 /* IfStatement */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 151 /* Constructor */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return childKind !== 206 /* Block */;
+ case 243 /* ExportDeclaration */:
+ return childKind !== 244 /* NamedExports */;
+ case 237 /* ImportDeclaration */:
+ return childKind !== 238 /* ImportClause */ ||
+ (child.namedBindings && child.namedBindings.kind !== 240 /* NamedImports */);
+ case 248 /* JsxElement */:
+ return childKind !== 251 /* JsxClosingElement */;
}
// No explicit rule for given nodes so the result will follow the default value argument
return indentByDefault;
@@ -77105,9 +83054,588 @@ var ts;
/* @internal */
var ts;
(function (ts) {
+ var textChanges;
+ (function (textChanges) {
+ /**
+ * Currently for simplicity we store recovered positions on the node itself.
+ * It can be changed to side-table later if we decide that current design is too invasive.
+ */
+ function getPos(n) {
+ return n["__pos"];
+ }
+ function setPos(n, pos) {
+ n["__pos"] = pos;
+ }
+ function getEnd(n) {
+ return n["__end"];
+ }
+ function setEnd(n, end) {
+ n["__end"] = end;
+ }
+ var Position;
+ (function (Position) {
+ Position[Position["FullStart"] = 0] = "FullStart";
+ Position[Position["Start"] = 1] = "Start";
+ })(Position = textChanges.Position || (textChanges.Position = {}));
+ function skipWhitespacesAndLineBreaks(text, start) {
+ return ts.skipTrivia(text, start, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ }
+ function hasCommentsBeforeLineBreak(text, start) {
+ var i = start;
+ while (i < text.length) {
+ var ch = text.charCodeAt(i);
+ if (ts.isWhiteSpaceSingleLine(ch)) {
+ i++;
+ continue;
+ }
+ return ch === 47 /* slash */;
+ }
+ return false;
+ }
+ function getSeparatorCharacter(separator) {
+ return ts.tokenToString(separator.kind);
+ }
+ textChanges.getSeparatorCharacter = getSeparatorCharacter;
+ function getAdjustedStartPosition(sourceFile, node, options, position) {
+ if (options.useNonAdjustedStartPosition) {
+ return node.getFullStart();
+ }
+ var fullStart = node.getFullStart();
+ var start = node.getStart(sourceFile);
+ if (fullStart === start) {
+ return start;
+ }
+ var fullStartLine = ts.getLineStartPositionForPosition(fullStart, sourceFile);
+ var startLine = ts.getLineStartPositionForPosition(start, sourceFile);
+ if (startLine === fullStartLine) {
+ // full start and start of the node are on the same line
+ // a, b;
+ // ^ ^
+ // | start
+ // fullstart
+ // when b is replaced - we usually want to keep the leading trvia
+ // when b is deleted - we delete it
+ return position === Position.Start ? start : fullStart;
+ }
+ // get start position of the line following the line that contains fullstart position
+ var adjustedStartPosition = ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, fullStartLine) + 1, sourceFile);
+ // skip whitespaces/newlines
+ adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition);
+ return ts.getStartPositionOfLine(ts.getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile);
+ }
+ textChanges.getAdjustedStartPosition = getAdjustedStartPosition;
+ function getAdjustedEndPosition(sourceFile, node, options) {
+ if (options.useNonAdjustedEndPosition) {
+ return node.getEnd();
+ }
+ var end = node.getEnd();
+ var newEnd = ts.skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true);
+ // check if last character before newPos is linebreak
+ // if yes - considered all skipped trivia to be trailing trivia of the node
+ return newEnd !== end && ts.isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))
+ ? newEnd
+ : end;
+ }
+ textChanges.getAdjustedEndPosition = getAdjustedEndPosition;
+ /**
+ * Checks if 'candidate' argument is a legal separator in the list that contains 'node' as an element
+ */
+ function isSeparator(node, candidate) {
+ return candidate && node.parent && (candidate.kind === 25 /* CommaToken */ || (candidate.kind === 24 /* SemicolonToken */ && node.parent.kind === 177 /* ObjectLiteralExpression */));
+ }
+ function spaces(count) {
+ var s = "";
+ for (var i = 0; i < count; i++) {
+ s += " ";
+ }
+ return s;
+ }
+ var ChangeTracker = (function () {
+ function ChangeTracker(newLine, rulesProvider, validator) {
+ this.newLine = newLine;
+ this.rulesProvider = rulesProvider;
+ this.validator = validator;
+ this.changes = [];
+ this.newLineCharacter = ts.getNewLineCharacter({ newLine: newLine });
+ }
+ ChangeTracker.fromCodeFixContext = function (context) {
+ return new ChangeTracker(context.newLineCharacter === "\n" ? 1 /* LineFeed */ : 0 /* CarriageReturnLineFeed */, context.rulesProvider);
+ };
+ ChangeTracker.prototype.deleteNode = function (sourceFile, node, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, node, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, node, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteRange = function (sourceFile, range) {
+ this.changes.push({ sourceFile: sourceFile, range: range });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeRange = function (sourceFile, startNode, endNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.FullStart);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.deleteNodeInList = function (sourceFile, node) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(node, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(node);
+ if (index < 0) {
+ return this;
+ }
+ if (containingList.length === 1) {
+ this.deleteNode(sourceFile, node);
+ return this;
+ }
+ if (index !== containingList.length - 1) {
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ if (nextToken && isSeparator(node, nextToken)) {
+ // find first non-whitespace position in the leading trivia of the node
+ var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ var nextElement = containingList[index + 1];
+ /// find first non-whitespace position in the leading trivia of the next node
+ var endPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, nextElement, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+ // shift next node so its first non-whitespace position will be moved to the first non-whitespace position of the deleted node
+ this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });
+ }
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ if (previousToken && isSeparator(node, previousToken)) {
+ this.deleteNodeRange(sourceFile, previousToken, node);
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.replaceRange = function (sourceFile, range, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, range: range, options: options, node: newNode });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNode = function (sourceFile, oldNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, oldNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, oldNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.replaceNodeRange = function (sourceFile, startNode, endNode, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.Start);
+ var endPosition = getAdjustedEndPosition(sourceFile, endNode, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAt = function (sourceFile, pos, newNode, options) {
+ if (options === void 0) { options = {}; }
+ this.changes.push({ sourceFile: sourceFile, options: options, node: newNode, range: { pos: pos, end: pos } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeBefore = function (sourceFile, before, newNode, options) {
+ if (options === void 0) { options = {}; }
+ var startPosition = getAdjustedStartPosition(sourceFile, before, options, Position.Start);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: startPosition } });
+ return this;
+ };
+ ChangeTracker.prototype.insertNodeAfter = function (sourceFile, after, newNode, options) {
+ if (options === void 0) { options = {}; }
+ if ((ts.isStatementButNotDeclaration(after)) ||
+ after.kind === 148 /* PropertyDeclaration */ ||
+ after.kind === 147 /* PropertySignature */ ||
+ after.kind === 149 /* MethodSignature */) {
+ // check if previous statement ends with semicolon
+ // if not - insert semicolon to preserve the code from changing the meaning due to ASI
+ if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) {
+ this.changes.push({
+ sourceFile: sourceFile,
+ options: {},
+ range: { pos: after.end, end: after.end },
+ node: ts.createToken(24 /* SemicolonToken */)
+ });
+ }
+ }
+ var endPosition = getAdjustedEndPosition(sourceFile, after, options);
+ this.changes.push({ sourceFile: sourceFile, options: options, useIndentationFromFile: true, node: newNode, range: { pos: endPosition, end: endPosition } });
+ return this;
+ };
+ /**
+ * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range,
+ * i.e. arguments in arguments lists, parameters in parameter lists etc.
+ * Note that separators are part of the node in statements and class elements.
+ */
+ ChangeTracker.prototype.insertNodeInListAfter = function (sourceFile, after, newNode) {
+ var containingList = ts.formatting.SmartIndenter.getContainingList(after, sourceFile);
+ if (!containingList) {
+ ts.Debug.fail("node is not a list element");
+ return this;
+ }
+ var index = containingList.indexOf(after);
+ if (index < 0) {
+ return this;
+ }
+ var end = after.getEnd();
+ if (index !== containingList.length - 1) {
+ // any element except the last one
+ // use next sibling as an anchor
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ if (nextToken && isSeparator(after, nextToken)) {
+ // for list
+ // a, b, c
+ // create change for adding 'e' after 'a' as
+ // - find start of next element after a (it is b)
+ // - use this start as start and end position in final change
+ // - build text of change by formatting the text of node + separator + whitespace trivia of b
+ // in multiline case it will work as
+ // a,
+ // b,
+ // c,
+ // result - '*' denotes leading trivia that will be inserted after new text (displayed as '#')
+ // a,*
+ // ***insertedtext<separator>#
+ // ###b,
+ // c,
+ // find line and character of the next element
+ var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
+ // find line and character of the token that precedes next element (usually it is separator)
+ var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
+ var prefix = void 0;
+ var startPos = void 0;
+ if (lineAndCharOfNextToken.line === lineAndCharOfNextElement.line) {
+ // next element is located on the same line with separator:
+ // a,$$$$b
+ // ^ ^
+ // | |-next element
+ // |-separator
+ // where $$$ is some leading trivia
+ // for a newly inserted node we'll maintain the same relative position comparing to separator and replace leading trivia with spaces
+ // a, x,$$$$b
+ // ^ ^ ^
+ // | | |-next element
+ // | |-new inserted node padded with spaces
+ // |-separator
+ startPos = nextToken.end;
+ prefix = spaces(lineAndCharOfNextElement.character - lineAndCharOfNextToken.character);
+ }
+ else {
+ // next element is located on different line that separator
+ // let insert position be the beginning of the line that contains next element
+ startPos = ts.getStartPositionOfLine(lineAndCharOfNextElement.line, sourceFile);
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: startPos, end: containingList[index + 1].getStart(sourceFile) },
+ node: newNode,
+ useIndentationFromFile: true,
+ options: {
+ prefix: prefix,
+ // write separator and leading trivia of the next element as suffix
+ suffix: "" + ts.tokenToString(nextToken.kind) + sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))
+ }
+ });
+ }
+ }
+ else {
+ var afterStart = after.getStart(sourceFile);
+ var afterStartLinePosition = ts.getLineStartPositionForPosition(afterStart, sourceFile);
+ var separator = void 0;
+ var multilineList = false;
+ // insert element after the last element in the list that has more than one item
+ // pick the element preceding the after element to:
+ // - pick the separator
+ // - determine if list is a multiline
+ if (containingList.length === 1) {
+ // if list has only one element then we'll format is as multiline if node has comment in trailing trivia, or as singleline otherwise
+ // i.e. var x = 1 // this is x
+ // | new element will be inserted at this position
+ separator = 25 /* CommaToken */;
+ }
+ else {
+ // element has more than one element, pick separator from the list
+ var tokenBeforeInsertPosition = ts.findPrecedingToken(after.pos, sourceFile);
+ separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 25 /* CommaToken */;
+ // determine if list is multiline by checking lines of after element and element that precedes it.
+ var afterMinusOneStartLinePosition = ts.getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile);
+ multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;
+ }
+ if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) {
+ // in this case we'll always treat containing list as multiline
+ multilineList = true;
+ }
+ if (multilineList) {
+ // insert separator immediately following the 'after' node to preserve comments in trailing trivia
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: ts.createToken(separator),
+ options: {}
+ });
+ // use the same indentation as 'after' item
+ var indentation = ts.formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.rulesProvider.getFormatOptions());
+ // insert element before the line break on the line that contains 'after' element
+ var insertPos = ts.skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true, /*stopAtComments*/ false);
+ if (insertPos !== end && ts.isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) {
+ insertPos--;
+ }
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: insertPos, end: insertPos },
+ node: newNode,
+ options: { indentation: indentation, prefix: this.newLineCharacter }
+ });
+ }
+ else {
+ this.changes.push({
+ sourceFile: sourceFile,
+ range: { pos: end, end: end },
+ node: newNode,
+ options: { prefix: ts.tokenToString(separator) + " " }
+ });
+ }
+ }
+ return this;
+ };
+ ChangeTracker.prototype.getChanges = function () {
+ var _this = this;
+ var changesPerFile = ts.createFileMap();
+ // group changes per file
+ for (var _i = 0, _a = this.changes; _i < _a.length; _i++) {
+ var c = _a[_i];
+ var changesInFile = changesPerFile.get(c.sourceFile.path);
+ if (!changesInFile) {
+ changesPerFile.set(c.sourceFile.path, changesInFile = []);
+ }
+ changesInFile.push(c);
+ }
+ // convert changes
+ var fileChangesList = [];
+ changesPerFile.forEachValue(function (path) {
+ var changesInFile = changesPerFile.get(path);
+ var sourceFile = changesInFile[0].sourceFile;
+ var fileTextChanges = { fileName: sourceFile.fileName, textChanges: [] };
+ for (var _i = 0, _a = ChangeTracker.normalize(changesInFile); _i < _a.length; _i++) {
+ var c = _a[_i];
+ fileTextChanges.textChanges.push({
+ span: _this.computeSpan(c, sourceFile),
+ newText: _this.computeNewText(c, sourceFile)
+ });
+ }
+ fileChangesList.push(fileTextChanges);
+ });
+ return fileChangesList;
+ };
+ ChangeTracker.prototype.computeSpan = function (change, _sourceFile) {
+ return ts.createTextSpanFromBounds(change.range.pos, change.range.end);
+ };
+ ChangeTracker.prototype.computeNewText = function (change, sourceFile) {
+ if (!change.node) {
+ // deletion case
+ return "";
+ }
+ var options = change.options || {};
+ var nonFormattedText = getNonformattedText(change.node, sourceFile, this.newLine);
+ if (this.validator) {
+ this.validator(nonFormattedText);
+ }
+ var formatOptions = this.rulesProvider.getFormatOptions();
+ var pos = change.range.pos;
+ var posStartsLine = ts.getLineStartPositionForPosition(pos, sourceFile) === pos;
+ var initialIndentation = change.options.indentation !== undefined
+ ? change.options.indentation
+ : change.useIndentationFromFile
+ ? ts.formatting.SmartIndenter.getIndentation(change.range.pos, sourceFile, formatOptions, posStartsLine || (change.options.prefix === this.newLineCharacter))
+ : 0;
+ var delta = change.options.delta !== undefined
+ ? change.options.delta
+ : ts.formatting.SmartIndenter.shouldIndentChildNode(change.node)
+ ? formatOptions.indentSize
+ : 0;
+ var text = applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, this.rulesProvider);
+ // strip initial indentation (spaces or tabs) if text will be inserted in the middle of the line
+ // however keep indentation if it is was forced
+ text = posStartsLine || change.options.indentation !== undefined ? text : text.replace(/^\s+/, "");
+ return (options.prefix || "") + text + (options.suffix || "");
+ };
+ ChangeTracker.normalize = function (changes) {
+ // order changes by start position
+ var normalized = ts.stableSort(changes, function (a, b) { return a.range.pos - b.range.pos; });
+ // verify that change intervals do not overlap, except possibly at end points.
+ for (var i = 0; i < normalized.length - 2; i++) {
+ ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos);
+ }
+ return normalized;
+ };
+ return ChangeTracker;
+ }());
+ textChanges.ChangeTracker = ChangeTracker;
+ function getNonformattedText(node, sourceFile, newLine) {
+ var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var writer = new Writer(ts.getNewLineCharacter(options));
+ var printer = ts.createPrinter(options, writer);
+ printer.writeNode(3 /* Unspecified */, node, sourceFile, writer);
+ return { text: writer.getText(), node: assignPositionsToNode(node) };
+ }
+ textChanges.getNonformattedText = getNonformattedText;
+ function applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, rulesProvider) {
+ var lineMap = ts.computeLineStarts(nonFormattedText.text);
+ var file = {
+ text: nonFormattedText.text,
+ lineMap: lineMap,
+ getLineAndCharacterOfPosition: function (pos) { return ts.computeLineAndCharacterOfPosition(lineMap, pos); }
+ };
+ var changes = ts.formatting.formatNode(nonFormattedText.node, file, sourceFile.languageVariant, initialIndentation, delta, rulesProvider);
+ return applyChanges(nonFormattedText.text, changes);
+ }
+ textChanges.applyFormatting = applyFormatting;
+ function applyChanges(text, changes) {
+ for (var i = changes.length - 1; i >= 0; i--) {
+ var change = changes[i];
+ text = "" + text.substring(0, change.span.start) + change.newText + text.substring(ts.textSpanEnd(change.span));
+ }
+ return text;
+ }
+ textChanges.applyChanges = applyChanges;
+ function isTrivia(s) {
+ return ts.skipTrivia(s, 0) === s.length;
+ }
+ var nullTransformationContext = {
+ enableEmitNotification: ts.noop,
+ enableSubstitution: ts.noop,
+ endLexicalEnvironment: function () { return undefined; },
+ getCompilerOptions: ts.notImplemented,
+ getEmitHost: ts.notImplemented,
+ getEmitResolver: ts.notImplemented,
+ hoistFunctionDeclaration: ts.noop,
+ hoistVariableDeclaration: ts.noop,
+ isEmitNotificationEnabled: ts.notImplemented,
+ isSubstitutionEnabled: ts.notImplemented,
+ onEmitNode: ts.noop,
+ onSubstituteNode: ts.notImplemented,
+ readEmitHelpers: ts.notImplemented,
+ requestEmitHelper: ts.noop,
+ resumeLexicalEnvironment: ts.noop,
+ startLexicalEnvironment: ts.noop,
+ suspendLexicalEnvironment: ts.noop
+ };
+ function assignPositionsToNode(node) {
+ var visited = ts.visitEachChild(node, assignPositionsToNode, nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
+ // create proxy node for non synthesized nodes
+ var newNode = ts.nodeIsSynthesized(visited)
+ ? visited
+ : (Proxy.prototype = visited, new Proxy());
+ newNode.pos = getPos(node);
+ newNode.end = getEnd(node);
+ return newNode;
+ function Proxy() { }
+ }
+ function assignPositionsToNodeArray(nodes, visitor, test, start, count) {
+ var visited = ts.visitNodes(nodes, visitor, test, start, count);
+ if (!visited) {
+ return visited;
+ }
+ // clone nodearray if necessary
+ var nodeArray = visited === nodes ? ts.createNodeArray(visited.slice(0)) : visited;
+ nodeArray.pos = getPos(nodes);
+ nodeArray.end = getEnd(nodes);
+ return nodeArray;
+ }
+ var Writer = (function () {
+ function Writer(newLine) {
+ var _this = this;
+ this.lastNonTriviaPosition = 0;
+ this.writer = ts.createTextWriter(newLine);
+ this.onEmitNode = function (hint, node, printCallback) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ printCallback(hint, node);
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onBeforeEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setPos(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitNodeArray = function (nodes) {
+ if (nodes) {
+ setEnd(nodes, _this.lastNonTriviaPosition);
+ }
+ };
+ }
+ Writer.prototype.setLastNonTriviaPosition = function (s, force) {
+ if (force || !isTrivia(s)) {
+ this.lastNonTriviaPosition = this.writer.getTextPos();
+ var i = 0;
+ while (ts.isWhiteSpace(s.charCodeAt(s.length - i - 1))) {
+ i++;
+ }
+ // trim trailing whitespaces
+ this.lastNonTriviaPosition -= i;
+ }
+ };
+ Writer.prototype.write = function (s) {
+ this.writer.write(s);
+ this.setLastNonTriviaPosition(s, /*force*/ false);
+ };
+ Writer.prototype.writeTextOfNode = function (text, node) {
+ this.writer.writeTextOfNode(text, node);
+ };
+ Writer.prototype.writeLine = function () {
+ this.writer.writeLine();
+ };
+ Writer.prototype.increaseIndent = function () {
+ this.writer.increaseIndent();
+ };
+ Writer.prototype.decreaseIndent = function () {
+ this.writer.decreaseIndent();
+ };
+ Writer.prototype.getText = function () {
+ return this.writer.getText();
+ };
+ Writer.prototype.rawWrite = function (s) {
+ this.writer.rawWrite(s);
+ this.setLastNonTriviaPosition(s, /*force*/ false);
+ };
+ Writer.prototype.writeLiteral = function (s) {
+ this.writer.writeLiteral(s);
+ this.setLastNonTriviaPosition(s, /*force*/ true);
+ };
+ Writer.prototype.getTextPos = function () {
+ return this.writer.getTextPos();
+ };
+ Writer.prototype.getLine = function () {
+ return this.writer.getLine();
+ };
+ Writer.prototype.getColumn = function () {
+ return this.writer.getColumn();
+ };
+ Writer.prototype.getIndent = function () {
+ return this.writer.getIndent();
+ };
+ Writer.prototype.isAtStartOfLine = function () {
+ return this.writer.isAtStartOfLine();
+ };
+ Writer.prototype.reset = function () {
+ this.writer.reset();
+ this.lastNonTriviaPosition = 0;
+ };
+ return Writer;
+ }());
+ })(textChanges = ts.textChanges || (ts.textChanges = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
- var codeFixes = ts.createMap();
+ var codeFixes = [];
function registerCodeFix(action) {
ts.forEach(action.errorCodes, function (error) {
var fixes = codeFixes[error];
@@ -77142,25 +83670,226 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
- function getOpenBraceEnd(constructor, sourceFile) {
- // First token is the open curly, this is where we want to put the 'super' call.
- return constructor.body.getFirstToken(sourceFile).getEnd();
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Class_0_incorrectly_implements_interface_1.code],
+ getCodeActions: getActionForClassLikeIncorrectImplementsInterface
+ });
+ function getActionForClassLikeIncorrectImplementsInterface(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ var classDeclaration = ts.getContainingClass(token);
+ if (!classDeclaration) {
+ return undefined;
+ }
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var classType = checker.getTypeAtLocation(classDeclaration);
+ var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(classDeclaration);
+ var hasNumericIndexSignature = !!checker.getIndexTypeOfType(classType, 1 /* Number */);
+ var hasStringIndexSignature = !!checker.getIndexTypeOfType(classType, 0 /* String */);
+ var result = [];
+ for (var _i = 0, implementedTypeNodes_2 = implementedTypeNodes; _i < implementedTypeNodes_2.length; _i++) {
+ var implementedTypeNode = implementedTypeNodes_2[_i];
+ // Note that this is ultimately derived from a map indexed by symbol names,
+ // so duplicates cannot occur.
+ var implementedType = checker.getTypeAtLocation(implementedTypeNode);
+ var implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
+ var nonPrivateMembers = implementedTypeSymbols.filter(function (symbol) { return !(ts.getModifierFlags(symbol.valueDeclaration) & 8 /* Private */); });
+ var newNodes = [];
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 1 /* Number */, hasNumericIndexSignature, newNodes);
+ createAndAddMissingIndexSignatureDeclaration(implementedType, 0 /* String */, hasStringIndexSignature, newNodes);
+ newNodes = newNodes.concat(codefix.createMissingMemberNodes(classDeclaration, nonPrivateMembers, checker));
+ var message = ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_interface_0), [implementedTypeNode.getText()]);
+ if (newNodes.length > 0) {
+ pushAction(result, newNodes, message);
+ }
+ }
+ return result;
+ function createAndAddMissingIndexSignatureDeclaration(type, kind, hasIndexSigOfKind, newNodes) {
+ if (hasIndexSigOfKind) {
+ return;
+ }
+ var indexInfoOfKind = checker.getIndexInfoOfType(type, kind);
+ if (!indexInfoOfKind) {
+ return;
+ }
+ var newIndexSignatureDeclaration = checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration);
+ newNodes.push(newIndexSignatureDeclaration);
+ }
+ function pushAction(result, newNodes, description) {
+ var newAction = {
+ description: description,
+ changes: codefix.newNodesToChanges(newNodes, openBrace, context)
+ };
+ result.push(newAction);
+ }
}
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- if (token.kind !== 122 /* ConstructorKeyword */) {
- return undefined;
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ getCodeActions: getActionsForAddMissingMember
+ });
+ function getActionsForAddMissingMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ // This is the identifier of the missing property. eg:
+ // this.missing = 1;
+ // ^^^^^^^
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ if (token.kind !== 70 /* Identifier */) {
+ return undefined;
+ }
+ if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 98 /* ThisKeyword */) {
+ return undefined;
+ }
+ var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
+ if (!ts.isClassElement(classMemberDeclaration)) {
+ return undefined;
+ }
+ var classDeclaration = classMemberDeclaration.parent;
+ if (!classDeclaration || !ts.isClassLike(classDeclaration)) {
+ return undefined;
+ }
+ var isStatic = ts.hasModifier(classMemberDeclaration, 32 /* Static */);
+ return ts.isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
+ function getActionsForAddMissingMemberInJavaScriptFile() {
+ var memberName = token.getText();
+ if (isStatic) {
+ if (classDeclaration.kind === 198 /* ClassExpression */) {
+ return undefined;
+ }
+ var className = classDeclaration.name.getText();
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classDeclaration.getEnd(), length: 0 },
+ newText: "" + context.newLineCharacter + className + "." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
}
- var newPosition = getOpenBraceEnd(token.parent, sourceFile);
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
- changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "super();", span: { start: newPosition, length: 0 } }] }]
+ else {
+ var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
+ if (!classConstructor) {
+ return undefined;
+ }
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [memberName]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: classConstructor.body.getEnd() - 1, length: 0 },
+ newText: "this." + memberName + " = undefined;" + context.newLineCharacter
+ }]
+ }]
+ }];
+ }
+ }
+ function getActionsForAddMissingMemberInTypeScriptFile() {
+ var typeNode;
+ if (token.parent.parent.kind === 193 /* BinaryExpression */) {
+ var binaryExpression = token.parent.parent;
+ var checker = context.program.getTypeChecker();
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
+ }
+ typeNode = typeNode || ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
+ var property = ts.createProperty(
+ /*decorators*/ undefined,
+ /*modifiers*/ isStatic ? [ts.createToken(114 /* StaticKeyword */)] : undefined, token.getText(sourceFile),
+ /*questionToken*/ undefined, typeNode,
+ /*initializer*/ undefined);
+ var propertyChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyChangeTracker.insertNodeAfter(sourceFile, openBrace, property, { suffix: context.newLineCharacter });
+ var actions = [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_declaration_for_missing_property_0), [token.getText()]),
+ changes: propertyChangeTracker.getChanges()
}];
+ if (!isStatic) {
+ var stringTypeNode = ts.createKeywordTypeNode(135 /* StringKeyword */);
+ var indexingParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, "x",
+ /*questionToken*/ undefined, stringTypeNode,
+ /*initializer*/ undefined);
+ var indexSignature = ts.createIndexSignatureDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, [indexingParameter], typeNode);
+ var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ actions.push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ changes: indexSignatureChangeTracker.getChanges()
+ });
+ }
+ return actions;
}
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
+ });
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],
+ getCodeActions: getActionForClassLikeMissingAbstractMember
});
+ function getActionForClassLikeMissingAbstractMember(context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ // This is the identifier in the case of a class declaration
+ // or the class keyword token in the case of a class expression.
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var checker = context.program.getTypeChecker();
+ if (ts.isClassLike(token.parent)) {
+ var classDeclaration = token.parent;
+ var extendsNode = ts.getClassExtendsHeritageClauseElement(classDeclaration);
+ var instantiatedExtendsType = checker.getTypeAtLocation(extendsNode);
+ // Note that this is ultimately derived from a map indexed by symbol names,
+ // so duplicates cannot occur.
+ var extendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType);
+ var abstractAndNonPrivateExtendsSymbols = extendsSymbols.filter(symbolPointsToNonPrivateAndAbstractMember);
+ var newNodes = codefix.createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, checker);
+ var changes = codefix.newNodesToChanges(newNodes, ts.getOpenBraceOfClassLike(classDeclaration, sourceFile), context);
+ if (changes && changes.length > 0) {
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Implement_inherited_abstract_class),
+ changes: changes
+ }];
+ }
+ }
+ return undefined;
+ }
+ function symbolPointsToNonPrivateAndAbstractMember(symbol) {
+ var decls = symbol.getDeclarations();
+ ts.Debug.assert(!!(decls && decls.length > 0));
+ var flags = ts.getModifierFlags(decls[0]);
+ return !(flags & 8 /* Private */) && !!(flags & 128 /* Abstract */);
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
codefix.registerCodeFix({
errorCodes: [ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code],
getCodeActions: function (context) {
@@ -77174,9 +83903,9 @@ var ts;
if (!superCall) {
return undefined;
}
- // figure out if the this access is actuall inside the supercall
+ // figure out if the `this` access is actually inside the supercall
// i.e. super(this.a), since in that case we won't suggest a fix
- if (superCall.expression && superCall.expression.kind == 179 /* CallExpression */) {
+ if (superCall.expression && superCall.expression.kind === 180 /* CallExpression */) {
var arguments_1 = superCall.expression.arguments;
for (var i = 0; i < arguments_1.length; i++) {
if (arguments_1[i].expression === token) {
@@ -77184,23 +83913,15 @@ var ts;
}
}
}
- var newPosition = getOpenBraceEnd(constructor, sourceFile);
- var changes = [{
- fileName: sourceFile.fileName, textChanges: [{
- newText: superCall.getText(sourceFile),
- span: { start: newPosition, length: 0 }
- },
- {
- newText: "",
- span: { start: superCall.getStart(sourceFile), length: superCall.getWidth(sourceFile) }
- }]
- }];
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(constructor, sourceFile), superCall, { suffix: context.newLineCharacter });
+ changeTracker.deleteNode(sourceFile, superCall);
return [{
description: ts.getLocaleSpecificMessage(ts.Diagnostics.Make_super_call_the_first_statement_in_the_constructor),
- changes: changes
+ changes: changeTracker.getChanges()
}];
function findSuperCall(n) {
- if (n.kind === 207 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) {
+ if (n.kind === 209 /* ExpressionStatement */ && ts.isSuperCall(n.expression)) {
return n;
}
if (ts.isFunctionLike(n)) {
@@ -77217,6 +83938,265 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 122 /* ConstructorKeyword */) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var superCall = ts.createStatement(ts.createCall(ts.createSuper(), /*typeArguments*/ undefined, /*argumentsArray*/ ts.emptyArray));
+ changeTracker.insertNodeAfter(sourceFile, ts.getOpenBrace(token.parent, sourceFile), superCall, { suffix: context.newLineCharacter });
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_missing_super_call),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ var classDeclNode = ts.getContainingClass(token);
+ if (!(token.kind === 70 /* Identifier */ && ts.isClassLike(classDeclNode))) {
+ return undefined;
+ }
+ var heritageClauses = classDeclNode.heritageClauses;
+ if (!(heritageClauses && heritageClauses.length > 0)) {
+ return undefined;
+ }
+ var extendsToken = heritageClauses[0].getFirstToken();
+ if (!(extendsToken && extendsToken.kind === 84 /* ExtendsKeyword */)) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, extendsToken, ts.createToken(107 /* ImplementsKeyword */));
+ // We replace existing keywords with commas.
+ for (var i = 1; i < heritageClauses.length; i++) {
+ var keywordToken = heritageClauses[i].getFirstToken();
+ if (keywordToken) {
+ changeTracker.replaceNode(sourceFile, keywordToken, ts.createToken(25 /* CommaToken */));
+ }
+ }
+ var result = [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Change_extends_to_implements),
+ changes: changeTracker.getChanges()
+ }];
+ return result;
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ if (token.kind !== 70 /* Identifier */) {
+ return undefined;
+ }
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ changeTracker.replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createThis(), token));
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Add_this_to_unresolved_variable),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics._0_is_declared_but_never_used.code,
+ ts.Diagnostics.Property_0_is_declared_but_never_used.code
+ ],
+ getCodeActions: function (context) {
+ var sourceFile = context.sourceFile;
+ var start = context.span.start;
+ var token = ts.getTokenAtPosition(sourceFile, start);
+ // this handles var ["computed"] = 12;
+ if (token.kind === 20 /* OpenBracketToken */) {
+ token = ts.getTokenAtPosition(sourceFile, start + 1);
+ }
+ switch (token.kind) {
+ case 70 /* Identifier */:
+ switch (token.parent.kind) {
+ case 225 /* VariableDeclaration */:
+ switch (token.parent.parent.parent.kind) {
+ case 213 /* ForStatement */:
+ var forStatement = token.parent.parent.parent;
+ var forInitializer = forStatement.initializer;
+ if (forInitializer.declarations.length === 1) {
+ return deleteNode(forInitializer);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 215 /* ForOfStatement */:
+ var forOfStatement = token.parent.parent.parent;
+ if (forOfStatement.initializer.kind === 226 /* VariableDeclarationList */) {
+ var forOfInitializer = forOfStatement.initializer;
+ return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
+ }
+ break;
+ case 214 /* ForInStatement */:
+ // There is no valid fix in the case of:
+ // for .. in
+ return undefined;
+ case 259 /* CatchClause */:
+ var catchClause = token.parent.parent;
+ var parameter = catchClause.variableDeclaration.getChildren()[0];
+ return deleteNode(parameter);
+ default:
+ var variableStatement = token.parent.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return deleteNode(variableStatement);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ }
+ // TODO: #14885
+ // falls through
+ case 144 /* TypeParameter */:
+ var typeParameters = token.parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
+ if (!previousToken || previousToken.kind !== 26 /* LessThanToken */) {
+ return deleteRange(typeParameters);
+ }
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
+ if (!nextToken || nextToken.kind !== 28 /* GreaterThanToken */) {
+ return deleteRange(typeParameters);
+ }
+ return deleteNodeRange(previousToken, nextToken);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ case 145 /* Parameter */:
+ var functionDeclaration = token.parent.parent;
+ if (functionDeclaration.parameters.length === 1) {
+ return deleteNode(token.parent);
+ }
+ else {
+ return deleteNodeInList(token.parent);
+ }
+ // handle case where 'import a = A;'
+ case 236 /* ImportEqualsDeclaration */:
+ var importEquals = ts.getAncestor(token, 236 /* ImportEqualsDeclaration */);
+ return deleteNode(importEquals);
+ case 241 /* ImportSpecifier */:
+ var namedImports = token.parent.parent;
+ if (namedImports.elements.length === 1) {
+ // Only 1 import and it is unused. So the entire declaration should be removed.
+ var importSpec = ts.getAncestor(token, 237 /* ImportDeclaration */);
+ return deleteNode(importSpec);
+ }
+ else {
+ // delete import specifier
+ return deleteNodeInList(token.parent);
+ }
+ // handle case where "import d, * as ns from './file'"
+ // or "'import {a, b as ns} from './file'"
+ case 238 /* ImportClause */:
+ var importClause = token.parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 237 /* ImportDeclaration */);
+ return deleteNode(importDecl);
+ }
+ else {
+ // import |d,| * as ns from './file'
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
+ if (nextToken && nextToken.kind === 25 /* CommaToken */) {
+ // shift first non-whitespace position after comma to the start position of the node
+ return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) });
+ }
+ else {
+ return deleteNode(importClause.name);
+ }
+ }
+ case 239 /* NamespaceImport */:
+ var namespaceImport = token.parent;
+ if (namespaceImport.name === token && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 237 /* ImportDeclaration */);
+ return deleteNode(importDecl);
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
+ if (previousToken && previousToken.kind === 25 /* CommaToken */) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return deleteRange({ pos: startPosition, end: namespaceImport.end });
+ }
+ return deleteRange(namespaceImport);
+ }
+ }
+ break;
+ case 148 /* PropertyDeclaration */:
+ case 239 /* NamespaceImport */:
+ return deleteNode(token.parent);
+ }
+ if (ts.isDeclarationName(token)) {
+ return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
+ function deleteNode(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
+ }
+ function deleteRange(range) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteRange(sourceFile, range));
+ }
+ function deleteNodeInList(n) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeInList(sourceFile, n));
+ }
+ function deleteNodeRange(start, end) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeRange(sourceFile, start, end));
+ }
+ function replaceNode(n, newNode) {
+ return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).replaceNode(sourceFile, n, newNode));
+ }
+ function makeChange(changeTracker) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ }];
+ }
+ }
+ });
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -77225,18 +84205,19 @@ var ts;
})(ModuleSpecifierComparison || (ModuleSpecifierComparison = {}));
var ImportCodeActionMap = (function () {
function ImportCodeActionMap() {
- this.symbolIdToActionMap = ts.createMap();
+ this.symbolIdToActionMap = [];
}
ImportCodeActionMap.prototype.addAction = function (symbolId, newAction) {
if (!newAction) {
return;
}
- if (!this.symbolIdToActionMap[symbolId]) {
+ var actions = this.symbolIdToActionMap[symbolId];
+ if (!actions) {
this.symbolIdToActionMap[symbolId] = [newAction];
return;
}
if (newAction.kind === "CodeChange") {
- this.symbolIdToActionMap[symbolId].push(newAction);
+ actions.push(newAction);
return;
}
var updatedNewImports = [];
@@ -77249,12 +84230,13 @@ var ts;
}
switch (this.compareModuleSpecifiers(existingAction.moduleSpecifier, newAction.moduleSpecifier)) {
case ModuleSpecifierComparison.Better:
- // the new one is not worth considering if it is a new improt.
+ // the new one is not worth considering if it is a new import.
// However if it is instead a insertion into existing import, the user might want to use
// the module specifier even it is worse by our standards. So keep it.
if (newAction.kind === "NewImport") {
return;
}
+ // falls through
case ModuleSpecifierComparison.Equal:
// the current one is safe. But it is still possible that the new one is worse
// than another existing one. For example, you may have new imports from "./foo/bar"
@@ -77280,8 +84262,8 @@ var ts;
};
ImportCodeActionMap.prototype.getAllActions = function () {
var result = [];
- for (var symbolId in this.symbolIdToActionMap) {
- result = ts.concatenate(result, this.symbolIdToActionMap[symbolId]);
+ for (var key in this.symbolIdToActionMap) {
+ result = ts.concatenate(result, this.symbolIdToActionMap[key]);
}
return result;
};
@@ -77313,7 +84295,11 @@ var ts;
return ImportCodeActionMap;
}());
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Cannot_find_name_0.code],
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_namespace_0.code,
+ ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
+ ],
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var checker = context.program.getTypeChecker();
@@ -77323,18 +84309,22 @@ var ts;
var name = token.getText();
var symbolIdActionMap = new ImportCodeActionMap();
// this is a module id -> module import declaration map
- var cachedImportDeclarations = ts.createMap();
- var cachedNewImportInsertPosition;
- var allPotentialModules = checker.getAmbientModules();
+ var cachedImportDeclarations = [];
+ var lastImportDeclaration;
+ var currentTokenMeaning = ts.getMeaningFromLocation(token);
+ if (context.errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
+ var symbol = checker.getAliasedSymbol(checker.getSymbolAtLocation(token));
+ return getCodeActionForImport(symbol, /*isDefault*/ false, /*isNamespaceImport*/ true);
+ }
+ var candidateModules = checker.getAmbientModules();
for (var _i = 0, allSourceFiles_1 = allSourceFiles; _i < allSourceFiles_1.length; _i++) {
var otherSourceFile = allSourceFiles_1[_i];
if (otherSourceFile !== sourceFile && ts.isExternalOrCommonJsModule(otherSourceFile)) {
- allPotentialModules.push(otherSourceFile.symbol);
+ candidateModules.push(otherSourceFile.symbol);
}
}
- var currentTokenMeaning = ts.getMeaningFromLocation(token);
- for (var _a = 0, allPotentialModules_1 = allPotentialModules; _a < allPotentialModules_1.length; _a++) {
- var moduleSymbol = allPotentialModules_1[_a];
+ for (var _a = 0, candidateModules_1 = candidateModules; _a < candidateModules_1.length; _a++) {
+ var moduleSymbol = candidateModules_1[_a];
context.cancellationToken.throwIfCancellationRequested();
// check the default export
var defaultExport = checker.tryGetMemberInModuleExports("default", moduleSymbol);
@@ -77356,8 +84346,9 @@ var ts;
return symbolIdActionMap.getAllActions();
function getImportDeclarations(moduleSymbol) {
var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- if (cachedImportDeclarations[moduleSymbolId]) {
- return cachedImportDeclarations[moduleSymbolId];
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
}
var existingDeclarations = [];
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
@@ -77372,10 +84363,10 @@ var ts;
function getImportDeclaration(moduleSpecifier) {
var node = moduleSpecifier;
while (node) {
- if (node.kind === 235 /* ImportDeclaration */) {
+ if (node.kind === 237 /* ImportDeclaration */) {
return node;
}
- if (node.kind === 234 /* ImportEqualsDeclaration */) {
+ if (node.kind === 236 /* ImportEqualsDeclaration */) {
return node;
}
node = node.parent;
@@ -77393,7 +84384,7 @@ var ts;
var declarations = symbol.getDeclarations();
return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
}
- function getCodeActionForImport(moduleSymbol, isDefault) {
+ function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
var existingDeclarations = getImportDeclarations(moduleSymbol);
if (existingDeclarations.length > 0) {
// With an existing import statement, there are more than one actions the user can do.
@@ -77419,11 +84410,11 @@ var ts;
var namespaceImportDeclaration;
var namedImportDeclaration;
var existingModuleSpecifier;
- for (var _i = 0, declarations_11 = declarations; _i < declarations_11.length; _i++) {
- var declaration = declarations_11[_i];
- if (declaration.kind === 235 /* ImportDeclaration */) {
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 237 /* ImportDeclaration */) {
var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 237 /* NamespaceImport */) {
+ if (namedBindings && namedBindings.kind === 239 /* NamespaceImport */) {
// case:
// import * as ns from "foo"
namespaceImportDeclaration = declaration;
@@ -77447,15 +84438,15 @@ var ts;
if (namespaceImportDeclaration) {
actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
}
- if (namedImportDeclaration && namedImportDeclaration.importClause &&
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
(namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
/**
* If the existing import declaration already has a named import list, just
* insert the identifier into that list.
*/
- var textChange = getTextChangeForImportClause(namedImportDeclaration.importClause);
+ var fileTextChanges = getTextChangeForImportClause(namedImportDeclaration.importClause);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(namedImportDeclaration.moduleSpecifier.getText());
- actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], textChange.newText, textChange.span, sourceFile.fileName, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ actions.push(createCodeAction(ts.Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
}
else {
// we need to create a new import statement, but the existing module specifier can be reused.
@@ -77463,55 +84454,35 @@ var ts;
}
return actions;
function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 245 /* ExternalModuleReference */) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 247 /* ExternalModuleReference */) {
return declaration.moduleReference.expression.getText();
}
return declaration.moduleReference.getText();
}
function getTextChangeForImportClause(importClause) {
- var newImportText = isDefault ? "default as " + name : name;
var importList = importClause.namedBindings;
+ var newImportSpecifier = ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(name));
// case 1:
// original text: import default from "module"
// change to: import default, { name } from "module"
- if (!importList && importClause.name) {
- var start = importClause.name.getEnd();
- return {
- newText: ", { " + newImportText + " }",
- span: { start: start, length: 0 }
- };
- }
// case 2:
// original text: import {} from "module"
// change to: import { name } from "module"
- if (importList.elements.length === 0) {
- var start = importList.getStart();
- return {
- newText: "{ " + newImportText + " }",
- span: { start: start, length: importList.getEnd() - start }
- };
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
}
- // case 3:
- // original text: import { foo, bar } from "module"
- // change to: import { foo, bar, name } from "module"
- var insertPoint = importList.elements[importList.elements.length - 1].getEnd();
/**
* If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
* import {
* foo
* } from "./module";
*/
- var startLine = ts.getLineOfLocalPosition(sourceFile, importList.getStart());
- var endLine = ts.getLineOfLocalPosition(sourceFile, importList.getEnd());
- var oneImportPerLine = endLine - startLine > importList.elements.length;
- return {
- newText: "," + (oneImportPerLine ? context.newLineCharacter : " ") + newImportText,
- span: { start: insertPoint, length: 0 }
- };
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
}
function getCodeActionForNamespaceImport(declaration) {
var namespacePrefix;
- if (declaration.kind === 235 /* ImportDeclaration */) {
+ if (declaration.kind === 237 /* ImportDeclaration */) {
namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
@@ -77528,47 +84499,52 @@ var ts;
* namespace instead of altering the import declaration. For example, "foo" would
* become "ns.foo"
*/
- return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], namespacePrefix + ".", { start: token.getStart(), length: 0 }, sourceFile.fileName, "CodeChange");
+ return createCodeAction(ts.Diagnostics.Change_0_to_1, [name, namespacePrefix + "." + name], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
}
}
function getCodeActionForNewImport(moduleSpecifier) {
- if (!cachedNewImportInsertPosition) {
+ if (!lastImportDeclaration) {
// insert after any existing imports
- var lastModuleSpecifierEnd = -1;
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var moduleSpecifier_1 = _a[_i];
- var end = moduleSpecifier_1.getEnd();
- if (!lastModuleSpecifierEnd || end > lastModuleSpecifierEnd) {
- lastModuleSpecifierEnd = end;
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 236 /* ImportEqualsDeclaration */ || statement.kind === 237 /* ImportDeclaration */) {
+ lastImportDeclaration = statement;
+ break;
}
}
- cachedNewImportInsertPosition = lastModuleSpecifierEnd > 0 ? sourceFile.getLineEndOfPosition(lastModuleSpecifierEnd) : sourceFile.getStart();
}
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- var importStatementText = isDefault
- ? "import " + name + " from \"" + moduleSpecifierWithoutQuotes + "\""
- : "import { " + name + " } from \"" + moduleSpecifierWithoutQuotes + "\"";
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(name), /*namedBindings*/ undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(name)))
+ : ts.createImportClause(/*name*/ undefined, ts.createNamedImports([ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(name))]));
+ var importDecl = ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, importClause, ts.createLiteral(moduleSpecifierWithoutQuotes));
+ if (!lastImportDeclaration) {
+ changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: "" + context.newLineCharacter + context.newLineCharacter });
+ }
+ else {
+ changeTracker.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl, { suffix: context.newLineCharacter });
+ }
// if this file doesn't have any import statements, insert an import statement and then insert a new line
// between the only import statement and user code. Otherwise just insert the statement because chances
// are there are already a new line seperating code and import statements.
- var newText = cachedNewImportInsertPosition === sourceFile.getStart()
- ? importStatementText + ";" + context.newLineCharacter + context.newLineCharacter
- : "" + context.newLineCharacter + importStatementText + ";";
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], newText, { start: cachedNewImportInsertPosition, length: 0 }, sourceFile.fileName, "NewImport", moduleSpecifierWithoutQuotes);
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.path;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().path;
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
var sourceDirectory = ts.getDirectoryPath(fileName);
var options = context.program.getCompilerOptions();
return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
tryGetModuleNameFromTypeRoots() ||
tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 261 /* SourceFile */) {
+ if (moduleSymbol.valueDeclaration.kind !== 264 /* SourceFile */) {
return moduleSymbol.name;
}
}
@@ -77576,11 +84552,11 @@ var ts;
if (!options.baseUrl) {
return undefined;
}
- var normalizedBaseUrl = ts.toPath(options.baseUrl, ts.getDirectoryPath(options.baseUrl), getCanonicalFileName);
- var relativeName = tryRemoveParentDirectoryName(moduleFileName, normalizedBaseUrl);
+ var relativeName = getRelativePathIfInDirectory(moduleFileName, options.baseUrl);
if (!relativeName) {
return undefined;
}
+ var relativeNameWithIndex = ts.removeFileExtension(relativeName);
relativeName = removeExtensionAndIndexPostFix(relativeName);
if (options.paths) {
for (var key in options.paths) {
@@ -77600,7 +84576,7 @@ var ts;
return key.replace("\*", matchedStar);
}
}
- else if (pattern === relativeName) {
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
return key;
}
}
@@ -77610,9 +84586,8 @@ var ts;
}
function tryGetModuleNameFromRootDirs() {
if (options.rootDirs) {
- var normalizedRootDirs = ts.map(options.rootDirs, function (rootDir) { return ts.toPath(rootDir, /*basePath*/ undefined, getCanonicalFileName); });
- var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, normalizedRootDirs);
- var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, normalizedRootDirs);
+ var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, options.rootDirs);
+ var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, options.rootDirs);
if (normalizedTargetPath !== undefined) {
var relativePath = normalizedSourcePath !== undefined ? getRelativePath(normalizedTargetPath, normalizedSourcePath) : normalizedTargetPath;
return ts.removeFileExtension(relativePath);
@@ -77676,7 +84651,7 @@ var ts;
function getPathRelativeToRootDirs(path, rootDirs) {
for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
var rootDir = rootDirs_2[_i];
- var relativeName = tryRemoveParentDirectoryName(path, rootDir);
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
if (relativeName !== undefined) {
return relativeName;
}
@@ -77690,25 +84665,23 @@ var ts;
}
return fileName;
}
+ function getRelativePathIfInDirectory(path, directoryPath) {
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
+ return ts.isRootedDiskPath(relativePath) || ts.startsWith(relativePath, "..") ? undefined : relativePath;
+ }
function getRelativePath(path, directoryPath) {
- var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
+ var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- function tryRemoveParentDirectoryName(path, parentDirectory) {
- var index = path.indexOf(parentDirectory);
- if (index === 0) {
- return ts.endsWith(parentDirectory, ts.directorySeparator)
- ? path.substring(parentDirectory.length)
- : path.substring(parentDirectory.length + 1);
- }
- return undefined;
- }
}
}
- function createCodeAction(description, diagnosticArgs, newText, span, fileName, kind, moduleSpecifier) {
+ function createChangeTracker() {
+ return ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ }
+ function createCodeAction(description, diagnosticArgs, changes, kind, moduleSpecifier) {
return {
description: ts.formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)),
- changes: [{ fileName: fileName, textChanges: [{ newText: newText, span: span }] }],
+ changes: changes,
kind: kind,
moduleSpecifier: moduleSpecifier
};
@@ -77723,155 +84696,275 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [
- ts.Diagnostics._0_is_declared_but_never_used.code,
- ts.Diagnostics.Property_0_is_declared_but_never_used.code
- ],
- getCodeActions: function (context) {
- var sourceFile = context.sourceFile;
- var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
- // this handles var ["computed"] = 12;
- if (token.kind === 20 /* OpenBracketToken */) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
- }
- switch (token.kind) {
- case 70 /* Identifier */:
- switch (token.parent.kind) {
- case 223 /* VariableDeclaration */:
- switch (token.parent.parent.parent.kind) {
- case 211 /* ForStatement */:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return createCodeFix("", forInitializer.pos, forInitializer.end - forInitializer.pos);
- }
- else {
- return removeSingleItem(forInitializer.declarations, token);
- }
- case 213 /* ForOfStatement */:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 224 /* VariableDeclarationList */) {
- var forOfInitializer = forOfStatement.initializer;
- return createCodeFix("{}", forOfInitializer.declarations[0].pos, forOfInitializer.declarations[0].end - forOfInitializer.declarations[0].pos);
- }
- break;
- case 212 /* ForInStatement */:
- // There is no valid fix in the case of:
- // for .. in
- return undefined;
- case 256 /* CatchClause */:
- var catchClause = token.parent.parent;
- var parameter = catchClause.variableDeclaration.getChildren()[0];
- return createCodeFix("", parameter.pos, parameter.end - parameter.pos);
- default:
- var variableStatement = token.parent.parent.parent;
- if (variableStatement.declarationList.declarations.length === 1) {
- return createCodeFix("", variableStatement.pos, variableStatement.end - variableStatement.pos);
- }
- else {
- var declarations = variableStatement.declarationList.declarations;
- return removeSingleItem(declarations, token);
- }
- }
- case 143 /* TypeParameter */:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 2);
- }
- else {
- return removeSingleItem(typeParameters, token);
- }
- case 144 /* Parameter */:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else {
- return removeSingleItem(functionDeclaration.parameters, token);
- }
- // handle case where 'import a = A;'
- case 234 /* ImportEqualsDeclaration */:
- var importEquals = findImportDeclaration(token);
- return createCodeFix("", importEquals.pos, importEquals.end - importEquals.pos);
- case 239 /* ImportSpecifier */:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- // Only 1 import and it is unused. So the entire declaration should be removed.
- var importSpec = findImportDeclaration(token);
- return createCodeFix("", importSpec.pos, importSpec.end - importSpec.pos);
- }
- else {
- return removeSingleItem(namedImports.elements, token);
- }
- // handle case where "import d, * as ns from './file'"
- // or "'import {a, b as ns} from './file'"
- case 236 /* ImportClause */:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = findImportDeclaration(importClause);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- return createCodeFix("", importClause.name.pos, importClause.namedBindings.pos - importClause.name.pos);
- }
- case 237 /* NamespaceImport */:
- var namespaceImport = token.parent;
- if (namespaceImport.name == token && !namespaceImport.parent.name) {
- var importDecl = findImportDeclaration(namespaceImport);
- return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos);
- }
- else {
- var start_4 = namespaceImport.parent.name.end;
- return createCodeFix("", start_4, namespaceImport.parent.namedBindings.end - start_4);
- }
- }
- break;
- case 147 /* PropertyDeclaration */:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- case 237 /* NamespaceImport */:
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- if (ts.isDeclarationName(token)) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos);
- }
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return createCodeFix("", token.parent.parent.pos, token.parent.parent.end - token.parent.parent.pos);
- }
- else {
- return undefined;
- }
- function findImportDeclaration(token) {
- var importDecl = token;
- while (importDecl.kind != 235 /* ImportDeclaration */ && importDecl.parent) {
- importDecl = importDecl.parent;
- }
- return importDecl;
+ errorCodes: getApplicableDiagnosticCodes(),
+ getCodeActions: getDisableJsDiagnosticsCodeActions
+ });
+ function getApplicableDiagnosticCodes() {
+ var allDiagnostcs = ts.Diagnostics;
+ return Object.keys(allDiagnostcs)
+ .filter(function (d) { return allDiagnostcs[d] && allDiagnostcs[d].category === ts.DiagnosticCategory.Error; })
+ .map(function (d) { return allDiagnostcs[d].code; });
+ }
+ function getIgnoreCommentLocationForLocation(sourceFile, position, newLineCharacter) {
+ var line = ts.getLineAndCharacterOfPosition(sourceFile, position).line;
+ var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile);
+ var startPosition = ts.getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
+ // First try to see if we can put the '// @ts-ignore' on the previous line.
+ // We need to make sure that we are not in the middle of a string literal or a comment.
+ // We also want to check if the previous line holds a comment for a node on the next line
+ // if so, we do not want to separate the node from its comment if we can.
+ if (!ts.isInComment(sourceFile, startPosition) && !ts.isInString(sourceFile, startPosition) && !ts.isInTemplateString(sourceFile, startPosition)) {
+ var token = ts.getTouchingToken(sourceFile, startPosition);
+ var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
+ if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
+ return {
+ span: { start: startPosition, length: 0 },
+ newText: "// @ts-ignore" + newLineCharacter
+ };
}
- function createCodeFix(newText, start, length) {
- return [{
- description: ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_unused_identifiers),
- changes: [{
- fileName: sourceFile.fileName,
- textChanges: [{ newText: newText, span: { start: start, length: length } }]
+ }
+ // If all fails, add an extra new line immediatlly before the error span.
+ return {
+ span: { start: position, length: 0 },
+ newText: (position === startPosition ? "" : newLineCharacter) + "// @ts-ignore" + newLineCharacter
+ };
+ }
+ function getDisableJsDiagnosticsCodeActions(context) {
+ var sourceFile = context.sourceFile, program = context.program, newLineCharacter = context.newLineCharacter, span = context.span;
+ if (!ts.isInJavaScriptFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
+ return undefined;
+ }
+ return [{
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Ignore_this_error_message),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [getIgnoreCommentLocationForLocation(sourceFile, span.start, newLineCharacter)]
+ }]
+ },
+ {
+ description: ts.getLocaleSpecificMessage(ts.Diagnostics.Disable_checking_for_this_file),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: {
+ start: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.pos : 0,
+ length: sourceFile.checkJsDirective ? sourceFile.checkJsDirective.end - sourceFile.checkJsDirective.pos : 0
+ },
+ newText: "// @ts-nocheck" + newLineCharacter
}]
- }];
+ }]
+ }];
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ function newNodesToChanges(newNodes, insertAfter, context) {
+ var sourceFile = context.sourceFile;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ for (var _i = 0, newNodes_1 = newNodes; _i < newNodes_1.length; _i++) {
+ var newNode = newNodes_1[_i];
+ changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: context.newLineCharacter });
+ }
+ var changes = changeTracker.getChanges();
+ if (!ts.some(changes)) {
+ return changes;
+ }
+ ts.Debug.assert(changes.length === 1);
+ var consolidatedChanges = [{
+ fileName: changes[0].fileName,
+ textChanges: [{
+ span: changes[0].textChanges[0].span,
+ newText: changes[0].textChanges.reduce(function (prev, cur) { return prev + cur.newText; }, "")
+ }]
+ }];
+ return consolidatedChanges;
+ }
+ codefix.newNodesToChanges = newNodesToChanges;
+ /**
+ * Finds members of the resolved type that are missing in the class pointed to by class decl
+ * and generates source code for the missing members.
+ * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for.
+ * @returns Empty string iff there are no member insertions.
+ */
+ function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, checker) {
+ var classMembers = classDeclaration.symbol.members;
+ var missingMembers = possiblyMissingSymbols.filter(function (symbol) { return !classMembers.has(symbol.getName()); });
+ var newNodes = [];
+ for (var _i = 0, missingMembers_1 = missingMembers; _i < missingMembers_1.length; _i++) {
+ var symbol = missingMembers_1[_i];
+ var newNode = createNewNodeForMemberSymbol(symbol, classDeclaration, checker);
+ if (newNode) {
+ if (Array.isArray(newNode)) {
+ newNodes = newNodes.concat(newNode);
+ }
+ else {
+ newNodes.push(newNode);
+ }
}
- function removeSingleItem(elements, token) {
- if (elements[0] === token.parent) {
- return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos + 1);
+ }
+ return newNodes;
+ }
+ codefix.createMissingMemberNodes = createMissingMemberNodes;
+ /**
+ * @returns Empty string iff there we can't figure out a representation for `symbol` in `enclosingDeclaration`.
+ */
+ function createNewNodeForMemberSymbol(symbol, enclosingDeclaration, checker) {
+ var declarations = symbol.getDeclarations();
+ if (!(declarations && declarations.length)) {
+ return undefined;
+ }
+ var declaration = declarations[0];
+ // Clone name to remove leading trivia.
+ var name = ts.getSynthesizedClone(declaration.name);
+ var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
+ var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
+ var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
+ var optional = !!(symbol.flags & 67108864 /* Optional */);
+ switch (declaration.kind) {
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 147 /* PropertySignature */:
+ case 148 /* PropertyDeclaration */:
+ var typeNode = checker.typeToTypeNode(type, enclosingDeclaration);
+ var property = ts.createProperty(
+ /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeNode,
+ /*initializer*/ undefined);
+ return property;
+ case 149 /* MethodSignature */:
+ case 150 /* MethodDeclaration */:
+ // The signature for the implementation appears as an entry in `signatures` iff
+ // there is only one signature.
+ // If there are overloads and an implementation signature, it appears as an
+ // extra declaration that isn't a signature for `type`.
+ // If there is more than one overload but no implementation signature
+ // (eg: an abstract method or interface declaration), there is a 1-1
+ // correspondence of declarations and signatures.
+ var signatures = checker.getSignaturesOfType(type, 0 /* Call */);
+ if (!ts.some(signatures)) {
+ return undefined;
+ }
+ if (declarations.length === 1) {
+ ts.Debug.assert(signatures.length === 1);
+ var signature = signatures[0];
+ return signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ }
+ var signatureDeclarations = [];
+ for (var i = 0; i < signatures.length; i++) {
+ var signature = signatures[i];
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration);
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
+ }
+ if (declarations.length > signatures.length) {
+ var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]);
+ var methodDeclaration = signatureToMethodDeclaration(signature, enclosingDeclaration, createStubbedMethodBody());
+ if (methodDeclaration) {
+ signatureDeclarations.push(methodDeclaration);
+ }
}
else {
- return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 1);
+ ts.Debug.assert(declarations.length === signatures.length);
+ var methodImplementingSignatures = createMethodImplementingSignatures(signatures, name, optional, modifiers);
+ signatureDeclarations.push(methodImplementingSignatures);
}
+ return signatureDeclarations;
+ default:
+ return undefined;
+ }
+ function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 150 /* MethodDeclaration */, enclosingDeclaration);
+ if (signatureDeclaration) {
+ signatureDeclaration.decorators = undefined;
+ signatureDeclaration.modifiers = modifiers;
+ signatureDeclaration.name = name;
+ signatureDeclaration.questionToken = optional ? ts.createToken(54 /* QuestionToken */) : undefined;
+ signatureDeclaration.body = body;
}
+ return signatureDeclaration;
}
- });
+ }
+ function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
+ /** This is *a* signature with the maximal number of arguments,
+ * such that if there is a "maximal" signature without rest arguments,
+ * this is one of them.
+ */
+ var maxArgsSignature = signatures[0];
+ var minArgumentCount = signatures[0].minArgumentCount;
+ var someSigHasRestParameter = false;
+ for (var i = 0; i < signatures.length; i++) {
+ var sig = signatures[i];
+ minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount);
+ if (sig.hasRestParameter) {
+ someSigHasRestParameter = true;
+ }
+ if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) {
+ maxArgsSignature = sig;
+ }
+ }
+ var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0);
+ var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.getName(); });
+ var parameters = [];
+ for (var i = 0; i < maxNonRestArgs; i++) {
+ var anyType = ts.createKeywordTypeNode(118 /* AnyKeyword */);
+ var newParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i],
+ /*questionToken*/ i >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyType,
+ /*initializer*/ undefined);
+ parameters.push(newParameter);
+ }
+ if (someSigHasRestParameter) {
+ var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(118 /* AnyKeyword */));
+ var restParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createToken(23 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest",
+ /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.createToken(54 /* QuestionToken */) : undefined, anyArrayType,
+ /*initializer*/ undefined);
+ parameters.push(restParameter);
+ }
+ return createStubbedMethod(modifiers, name, optional,
+ /*typeParameters*/ undefined, parameters,
+ /*returnType*/ undefined);
+ }
+ function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
+ return ts.createMethodDeclaration(
+ /*decorators*/ undefined, modifiers,
+ /*asteriskToken*/ undefined, name, optional ? ts.createToken(54 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ }
+ codefix.createStubbedMethod = createStubbedMethod;
+ function createStubbedMethodBody() {
+ return ts.createBlock([ts.createThrow(ts.createNew(ts.createIdentifier("Error"),
+ /*typeArguments*/ undefined, [ts.createLiteral("Method not implemented.")]))],
+ /*multiline*/ true);
+ }
+ function createVisibilityModifier(flags) {
+ if (flags & 4 /* Public */) {
+ return ts.createToken(113 /* PublicKeyword */);
+ }
+ else if (flags & 16 /* Protected */) {
+ return ts.createToken(112 /* ProtectedKeyword */);
+ }
+ return undefined;
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
-///<reference path='superFixes.ts' />
-///<reference path='importFixes.ts' />
-///<reference path='unusedIdentifierFixes.ts' />
+/// <reference path="fixClassIncorrectlyImplementsInterface.ts" />
+/// <reference path="fixAddMissingMember.ts" />
+/// <reference path="fixClassDoesntImplementInheritedAbstractMember.ts" />
+/// <reference path="fixClassSuperMustPrecedeThisAccess.ts" />
+/// <reference path="fixConstructorForDerivedNeedSuperCall.ts" />
+/// <reference path="fixExtendsInterfaceBecomesImplements.ts" />
+/// <reference path="fixForgottenThisPropertyAccess.ts" />
+/// <reference path='unusedIdentifierFixes.ts' />
+/// <reference path='importFixes.ts' />
+/// <reference path='disableJsDiagnostics.ts' />
+/// <reference path='helpers.ts' />
/// <reference path="..\compiler\program.ts"/>
/// <reference path="..\compiler\commandLineParser.ts"/>
/// <reference path='types.ts' />
@@ -77883,7 +84976,6 @@ var ts;
/// <reference path='documentRegistry.ts' />
/// <reference path='findAllReferences.ts' />
/// <reference path='goToDefinition.ts' />
-/// <reference path='goToImplementation.ts' />
/// <reference path='jsDoc.ts' />
/// <reference path='jsTyping.ts' />
/// <reference path='navigateTo.ts' />
@@ -77897,14 +84989,15 @@ var ts;
/// <reference path='transpile.ts' />
/// <reference path='formatting\formatting.ts' />
/// <reference path='formatting\smartIndenter.ts' />
-/// <reference path='codefixes\codeFixProvider.ts' />
+/// <reference path='textChanges.ts' />
+/// <reference path='codeFixProvider.ts' />
/// <reference path='codefixes\fixes.ts' />
var ts;
(function (ts) {
/** The version of the language service API */
ts.servicesVersion = "0.5";
function createNode(kind, pos, end, parent) {
- var node = kind >= 141 /* FirstNode */ ? new NodeObject(kind, pos, end) :
+ var node = kind >= 142 /* FirstNode */ ? new NodeObject(kind, pos, end) :
kind === 70 /* Identifier */ ? new IdentifierObject(70 /* Identifier */, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -77962,11 +85055,11 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(292 /* SyntaxList */, nodes.pos, nodes.end, this);
+ var list = createNode(293 /* SyntaxList */, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
- for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) {
- var node = nodes_7[_i];
+ for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
+ var node = nodes_9[_i];
if (pos < node.pos) {
pos = this.addSyntheticNodes(list._children, pos, node.pos);
}
@@ -77981,11 +85074,11 @@ var ts;
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
var children;
- if (this.kind >= 141 /* FirstNode */) {
+ if (this.kind >= 142 /* FirstNode */) {
ts.scanner.setText((sourceFile || this.getSourceFile()).text);
children = [];
var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 278 /* FirstJSDocTagNode */ && this.kind <= 291 /* LastJSDocTagNode */;
+ var useJSDocScanner_1 = this.kind >= 282 /* FirstJSDocTagNode */ && this.kind <= 292 /* LastJSDocTagNode */;
var processNode = function (node) {
var isJSDocTagNode = ts.isJSDocTag(node);
if (!isJSDocTagNode && pos_3 < node.pos) {
@@ -78042,8 +85135,10 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = children[0];
- return child.kind < 141 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
+ var child = ts.find(children, function (kid) { return kid.kind < 266 /* FirstJSDocNode */ || kid.kind > 292 /* LastJSDocNode */; });
+ return child.kind < 142 /* FirstNode */ ?
+ child :
+ child.getFirstToken(sourceFile);
};
NodeObject.prototype.getLastToken = function (sourceFile) {
var children = this.getChildren(sourceFile);
@@ -78051,7 +85146,10 @@ var ts;
if (!child) {
return undefined;
}
- return child.kind < 141 /* FirstNode */ ? child : child.getLastToken(sourceFile);
+ return child.kind < 142 /* FirstNode */ ? child : child.getLastToken(sourceFile);
+ };
+ NodeObject.prototype.forEachChild = function (cbNode, cbNodeArray) {
+ return ts.forEachChild(this, cbNode, cbNodeArray);
};
return NodeObject;
}());
@@ -78105,6 +85203,9 @@ var ts;
TokenOrIdentifierObject.prototype.getLastToken = function () {
return undefined;
};
+ TokenOrIdentifierObject.prototype.forEachChild = function () {
+ return undefined;
+ };
return TokenOrIdentifierObject;
}());
var SymbolObject = (function () {
@@ -78127,6 +85228,12 @@ var ts;
}
return this.documentationComment;
};
+ SymbolObject.prototype.getJsDocTags = function () {
+ if (this.tags === undefined) {
+ this.tags = ts.JsDoc.getJsDocTagsFromDeclarations(this.declarations);
+ }
+ return this.tags;
+ };
return SymbolObject;
}());
var TokenObject = (function (_super) {
@@ -78210,6 +85317,12 @@ var ts;
}
return this.documentationComment;
};
+ SignatureObject.prototype.getJsDocTags = function () {
+ if (this.jsDocTags === undefined) {
+ this.jsDocTags = this.declaration ? ts.JsDoc.getJsDocTagsFromDeclarations([this.declaration]) : [];
+ }
+ return this.jsDocTags;
+ };
return SignatureObject;
}());
var SourceFileObject = (function (_super) {
@@ -78250,17 +85363,21 @@ var ts;
return this.namedDeclarations;
};
SourceFileObject.prototype.computeNamedDeclarations = function () {
- var result = ts.createMap();
+ var result = ts.createMultiMap();
ts.forEachChild(this, visit);
return result;
function addDeclaration(declaration) {
var name = getDeclarationName(declaration);
if (name) {
- ts.multiMapAdd(result, name, declaration);
+ result.add(name, declaration);
}
}
function getDeclarations(name) {
- return result[name] || (result[name] = []);
+ var declarations = result.get(name);
+ if (!declarations) {
+ result.set(name, declarations = []);
+ }
+ return declarations;
}
function getDeclarationName(declaration) {
if (declaration.name) {
@@ -78268,9 +85385,9 @@ var ts;
if (result_7 !== undefined) {
return result_7;
}
- if (declaration.name.kind === 142 /* ComputedPropertyName */) {
+ if (declaration.name.kind === 143 /* ComputedPropertyName */) {
var expr = declaration.name.expression;
- if (expr.kind === 177 /* PropertyAccessExpression */) {
+ if (expr.kind === 178 /* PropertyAccessExpression */) {
return expr.name.text;
}
return getTextOfIdentifierOrLiteral(expr);
@@ -78290,10 +85407,10 @@ var ts;
}
function visit(node) {
switch (node.kind) {
- case 225 /* FunctionDeclaration */:
- case 184 /* FunctionExpression */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
+ case 227 /* FunctionDeclaration */:
+ case 185 /* FunctionExpression */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
var functionDeclaration = node;
var declarationName = getDeclarationName(functionDeclaration);
if (declarationName) {
@@ -78310,35 +85427,35 @@ var ts;
else {
declarations.push(functionDeclaration);
}
- ts.forEachChild(node, visit);
}
+ ts.forEachChild(node, visit);
break;
- case 226 /* ClassDeclaration */:
- case 197 /* ClassExpression */:
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
- case 229 /* EnumDeclaration */:
- case 230 /* ModuleDeclaration */:
- case 234 /* ImportEqualsDeclaration */:
- case 243 /* ExportSpecifier */:
- case 239 /* ImportSpecifier */:
- case 234 /* ImportEqualsDeclaration */:
- case 236 /* ImportClause */:
- case 237 /* NamespaceImport */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 161 /* TypeLiteral */:
+ case 228 /* ClassDeclaration */:
+ case 198 /* ClassExpression */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 232 /* ModuleDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 245 /* ExportSpecifier */:
+ case 241 /* ImportSpecifier */:
+ case 236 /* ImportEqualsDeclaration */:
+ case 238 /* ImportClause */:
+ case 239 /* NamespaceImport */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 162 /* TypeLiteral */:
addDeclaration(node);
ts.forEachChild(node, visit);
break;
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
// Only consider parameter properties
if (!ts.hasModifier(node, 92 /* ParameterPropertyModifier */)) {
break;
}
- // fall through
- case 223 /* VariableDeclaration */:
- case 174 /* BindingElement */: {
+ // falls through
+ case 225 /* VariableDeclaration */:
+ case 175 /* BindingElement */: {
var decl = node;
if (ts.isBindingPattern(decl.name)) {
ts.forEachChild(decl.name, visit);
@@ -78347,19 +85464,20 @@ var ts;
if (decl.initializer)
visit(decl.initializer);
}
- case 260 /* EnumMember */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ // falls through
+ case 263 /* EnumMember */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
addDeclaration(node);
break;
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// Handle named exports case e.g.:
// export {a, b as B} from "mod";
if (node.exportClause) {
ts.forEach(node.exportClause.elements, visit);
}
break;
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
var importClause = node.importClause;
if (importClause) {
// Handle default import case e.g.:
@@ -78371,7 +85489,7 @@ var ts;
// import * as NS from "mod";
// import {a, b as B} from "mod";
if (importClause.namedBindings) {
- if (importClause.namedBindings.kind === 237 /* NamespaceImport */) {
+ if (importClause.namedBindings.kind === 239 /* NamespaceImport */) {
addDeclaration(importClause.namedBindings);
}
else {
@@ -78620,6 +85738,36 @@ var ts;
};
return CancellationTokenObject;
}());
+ /* @internal */
+ /** A cancellation that throttles calls to the host */
+ var ThrottledCancellationToken = (function () {
+ function ThrottledCancellationToken(hostCancellationToken, throttleWaitMilliseconds) {
+ if (throttleWaitMilliseconds === void 0) { throttleWaitMilliseconds = 20; }
+ this.hostCancellationToken = hostCancellationToken;
+ this.throttleWaitMilliseconds = throttleWaitMilliseconds;
+ // Store when we last tried to cancel. Checking cancellation can be expensive (as we have
+ // to marshall over to the host layer). So we only bother actually checking once enough
+ // time has passed.
+ this.lastCancellationCheckTime = 0;
+ }
+ ThrottledCancellationToken.prototype.isCancellationRequested = function () {
+ var time = ts.timestamp();
+ var duration = Math.abs(time - this.lastCancellationCheckTime);
+ if (duration >= this.throttleWaitMilliseconds) {
+ // Check no more than once every throttle wait milliseconds
+ this.lastCancellationCheckTime = time;
+ return this.hostCancellationToken.isCancellationRequested();
+ }
+ return false;
+ };
+ ThrottledCancellationToken.prototype.throwIfCancellationRequested = function () {
+ if (this.isCancellationRequested()) {
+ throw new ts.OperationCanceledException();
+ }
+ };
+ return ThrottledCancellationToken;
+ }());
+ ts.ThrottledCancellationToken = ThrottledCancellationToken;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
@@ -78801,6 +85949,7 @@ var ts;
ts.Debug.assert(hostFileInformation.scriptKind === oldSourceFile.scriptKind, "Registered script kind (" + oldSourceFile.scriptKind + ") should match new script kind (" + hostFileInformation.scriptKind + ") for file: " + path);
return documentRegistry.updateDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
}
+ // We didn't already have the file. Fall through and acquire it from the registry.
}
// Could not find this file in the old program, create a new SourceFile for it.
return documentRegistry.acquireDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
@@ -78901,10 +86050,10 @@ var ts;
// Try getting just type at this position and show
switch (node.kind) {
case 70 /* Identifier */:
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
case 98 /* ThisKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
case 96 /* SuperKeyword */:
// For the identifiers/this/super etc get the type at position
var type = typeChecker.getTypeAtLocation(node);
@@ -78914,7 +86063,8 @@ var ts;
kindModifiers: ts.ScriptElementKindModifier.none,
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: ts.typeToDisplayParts(typeChecker, type, ts.getContainerNode(node)),
- documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined
+ documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined,
+ tags: type.symbol ? type.symbol.getJsDocTags() : undefined
};
}
}
@@ -78926,7 +86076,8 @@ var ts;
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(symbol),
textSpan: ts.createTextSpan(node.getStart(), node.getWidth()),
displayParts: displayPartsDocumentationsAndKind.displayParts,
- documentation: displayPartsDocumentationsAndKind.documentation
+ documentation: displayPartsDocumentationsAndKind.documentation,
+ tags: displayPartsDocumentationsAndKind.tags
};
}
/// Goto definition
@@ -78934,22 +86085,23 @@ var ts;
synchronizeHostData();
return ts.GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position);
}
- /// Goto implementation
- function getImplementationAtPosition(fileName, position) {
- synchronizeHostData();
- return ts.GoToImplementation.getImplementationAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), ts.getTouchingPropertyName(getValidSourceFile(fileName), position));
- }
function getTypeDefinitionAtPosition(fileName, position) {
synchronizeHostData();
return ts.GoToDefinition.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position);
}
+ /// Goto implementation
+ function getImplementationAtPosition(fileName, position) {
+ synchronizeHostData();
+ return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ }
+ /// References and Occurrences
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
if (results) {
- var sourceFile_2 = getCanonicalFileName(ts.normalizeSlashes(fileName));
+ var sourceFile_1 = getCanonicalFileName(ts.normalizeSlashes(fileName));
// Get occurrences only supports reporting occurrences for the file queried. So
// filter down to that list.
- results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_2; });
+ results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_1; });
}
return results;
}
@@ -78959,9 +86111,7 @@ var ts;
var sourceFile = getValidSourceFile(fileName);
return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
}
- /// References and Occurrences
function getOccurrencesAtPositionCore(fileName, position) {
- synchronizeHostData();
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
function convertDocumentHighlights(documentHighlights) {
if (!documentHighlights) {
@@ -78976,7 +86126,8 @@ var ts;
fileName: entry.fileName,
textSpan: highlightSpan.textSpan,
isWriteAccess: highlightSpan.kind === ts.HighlightSpanKind.writtenReference,
- isDefinition: false
+ isDefinition: false,
+ isInString: highlightSpan.isInString,
});
}
}
@@ -78984,21 +86135,18 @@ var ts;
}
}
function findRenameLocations(fileName, position, findInStrings, findInComments) {
- var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position, { findInStrings: findInStrings, findInComments: findInComments, isForRename: true });
}
function getReferencesAtPosition(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, /*findInStrings*/ false, /*findInComments*/ false);
- return ts.FindAllReferences.convertReferences(referencedSymbols);
+ return getReferences(fileName, position);
}
- function findReferences(fileName, position) {
- var referencedSymbols = findReferencedSymbols(fileName, position, /*findInStrings*/ false, /*findInComments*/ false);
- // Only include referenced symbols that have a valid definition.
- return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; });
+ function getReferences(fileName, position, options) {
+ synchronizeHostData();
+ return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
- function findReferencedSymbols(fileName, position, findInStrings, findInComments) {
+ function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, findInStrings, findInComments);
+ return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// NavigateTo
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
@@ -79017,7 +86165,8 @@ var ts;
text: data
});
}
- var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles);
+ var customTransformers = host.getCustomTransformers && host.getCustomTransformers();
+ var emitOutput = program.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers);
return {
outputFiles: outputFiles,
emitSkipped: emitOutput.emitSkipped
@@ -79047,15 +86196,15 @@ var ts;
return;
}
switch (node.kind) {
- case 177 /* PropertyAccessExpression */:
- case 141 /* QualifiedName */:
+ case 178 /* PropertyAccessExpression */:
+ case 142 /* QualifiedName */:
case 9 /* StringLiteral */:
case 85 /* FalseKeyword */:
case 100 /* TrueKeyword */:
case 94 /* NullKeyword */:
case 96 /* SuperKeyword */:
case 98 /* ThisKeyword */:
- case 167 /* ThisType */:
+ case 168 /* ThisType */:
case 70 /* Identifier */:
break;
// Cant create the text span
@@ -79072,7 +86221,7 @@ var ts;
// If this is name of a module declarations, check if this is right side of dotted module name
// If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of
// Then this name is name from dotted module
- if (nodeForStartPos.parent.parent.kind === 230 /* ModuleDeclaration */ &&
+ if (nodeForStartPos.parent.parent.kind === 232 /* ModuleDeclaration */ &&
nodeForStartPos.parent.parent.body === nodeForStartPos.parent) {
// Use parent module declarations name for start pos
nodeForStartPos = nodeForStartPos.parent.parent.name;
@@ -79095,10 +86244,10 @@ var ts;
return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position);
}
function getNavigationBarItems(fileName) {
- return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function getNavigationTree(fileName) {
- return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName));
+ return ts.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);
}
function isTsOrTsxFile(fileName) {
var kind = ts.getScriptKind(fileName, host);
@@ -79131,7 +86280,7 @@ var ts;
function getOutliningSpans(fileName) {
// doesn't use compiler - no need to synchronize with host
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- return ts.OutliningElementsCollector.collectElements(sourceFile);
+ return ts.OutliningElementsCollector.collectElements(sourceFile, cancellationToken);
}
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
@@ -79209,13 +86358,13 @@ var ts;
}
return [];
}
- function getCodeFixesAtPosition(fileName, start, end, errorCodes) {
+ function getCodeFixesAtPosition(fileName, start, end, errorCodes, formatOptions) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
var span = { start: start, length: end - start };
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
var allFixes = [];
- ts.forEach(errorCodes, function (error) {
+ ts.forEach(ts.deduplicate(errorCodes), function (error) {
cancellationToken.throwIfCancellationRequested();
var context = {
errorCode: error,
@@ -79224,7 +86373,8 @@ var ts;
program: program,
newLineCharacter: newLineChar,
host: host,
- cancellationToken: cancellationToken
+ cancellationToken: cancellationToken,
+ rulesProvider: getRuleProvider(formatOptions)
};
var fixes = ts.codefix.getFixes(context);
if (fixes) {
@@ -79248,7 +86398,7 @@ var ts;
}
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
// Check if in a context where we don't want to perform any insertion
- if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position)) {
+ if (ts.isInString(sourceFile, position)) {
return false;
}
if (ts.isInsideJsxElementOrAttribute(sourceFile, position)) {
@@ -79304,7 +86454,7 @@ var ts;
continue;
}
var descriptor = undefined;
- for (var i = 0, n = descriptors.length; i < n; i++) {
+ for (var i = 0; i < descriptors.length; i++) {
if (matchArray[i + firstDescriptorCaptureIndex]) {
descriptor = descriptors[i];
}
@@ -79435,6 +86585,7 @@ var ts;
}
ts.createLanguageService = createLanguageService;
/* @internal */
+ /** Names in the name table are escaped, so an identifier `__foo` will have a name table entry `___foo`. */
function getNameTable(sourceFile) {
if (!sourceFile.nameTable) {
initializeNameTable(sourceFile);
@@ -79449,7 +86600,7 @@ var ts;
function walk(node) {
switch (node.kind) {
case 70 /* Identifier */:
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
break;
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -79458,10 +86609,10 @@ var ts;
// then we want 'something' to be in the name table. Similarly, if we have
// "a['propname']" then we want to store "propname" in the name table.
if (ts.isDeclarationName(node) ||
- node.parent.kind === 245 /* ExternalModuleReference */ ||
+ node.parent.kind === 247 /* ExternalModuleReference */ ||
isArgumentOfElementAccessExpression(node) ||
ts.isLiteralComputedPropertyDeclarationName(node)) {
- nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1;
+ setNameTable(node.text, node);
}
break;
default:
@@ -79474,18 +86625,79 @@ var ts;
}
}
}
+ function setNameTable(text, node) {
+ nameTable.set(text, nameTable.get(text) === undefined ? node.pos : -1);
+ }
+ }
+ function isObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 252 /* JsxAttribute */:
+ case 254 /* JsxSpreadAttribute */:
+ case 260 /* PropertyAssignment */:
+ case 261 /* ShorthandPropertyAssignment */:
+ case 150 /* MethodDeclaration */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ return true;
+ }
+ return false;
+ }
+ /**
+ * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 }
+ */
+ /* @internal */
+ function getContainingObjectLiteralElement(node) {
+ switch (node.kind) {
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ if (node.parent.kind === 143 /* ComputedPropertyName */) {
+ return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : undefined;
+ }
+ // falls through
+ case 70 /* Identifier */:
+ return isObjectLiteralElement(node.parent) &&
+ (node.parent.parent.kind === 177 /* ObjectLiteralExpression */ || node.parent.parent.kind === 253 /* JsxAttributes */) &&
+ node.parent.name === node ? node.parent : undefined;
+ }
+ return undefined;
+ }
+ ts.getContainingObjectLiteralElement = getContainingObjectLiteralElement;
+ /* @internal */
+ function getPropertySymbolsFromContextualType(typeChecker, node) {
+ var objectLiteral = node.parent;
+ var contextualType = typeChecker.getContextualType(objectLiteral);
+ var name = ts.getTextOfPropertyName(node.name);
+ if (name && contextualType) {
+ var result_8 = [];
+ var symbol = contextualType.getProperty(name);
+ if (contextualType.flags & 65536 /* Union */) {
+ ts.forEach(contextualType.types, function (t) {
+ var symbol = t.getProperty(name);
+ if (symbol) {
+ result_8.push(symbol);
+ }
+ });
+ return result_8;
+ }
+ if (symbol) {
+ result_8.push(symbol);
+ return result_8;
+ }
+ }
+ return undefined;
}
+ ts.getPropertySymbolsFromContextualType = getPropertySymbolsFromContextualType;
function isArgumentOfElementAccessExpression(node) {
return node &&
node.parent &&
- node.parent.kind === 178 /* ElementAccessExpression */ &&
+ node.parent.kind === 179 /* ElementAccessExpression */ &&
node.parent.argumentExpression === node;
}
/**
- * Get the path of the default library files (lib.d.ts) as distributed with the typescript
- * node package.
- * The functionality is not supported if the ts module is consumed outside of a node module.
- */
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
function getDefaultLibFilePath(options) {
// Check __dirname is defined and that we are on a node.js system.
if (typeof __dirname !== "undefined") {
@@ -79494,10 +86706,7 @@ var ts;
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
}
ts.getDefaultLibFilePath = getDefaultLibFilePath;
- function initializeServices() {
- ts.objectAllocator = getServicesObjectAllocator();
- }
- initializeServices();
+ ts.objectAllocator = getServicesObjectAllocator();
})(ts || (ts = {}));
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.
@@ -79562,113 +86771,114 @@ var ts;
function spanInNode(node) {
if (node) {
switch (node.kind) {
- case 205 /* VariableStatement */:
+ case 207 /* VariableStatement */:
// Span on first variable declaration
return spanInVariableDeclaration(node.declarationList.declarations[0]);
- case 223 /* VariableDeclaration */:
- case 147 /* PropertyDeclaration */:
- case 146 /* PropertySignature */:
+ case 225 /* VariableDeclaration */:
+ case 148 /* PropertyDeclaration */:
+ case 147 /* PropertySignature */:
return spanInVariableDeclaration(node);
- case 144 /* Parameter */:
+ case 145 /* Parameter */:
return spanInParameterDeclaration(node);
- case 225 /* FunctionDeclaration */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 184 /* FunctionExpression */:
- case 185 /* ArrowFunction */:
+ case 227 /* FunctionDeclaration */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 185 /* FunctionExpression */:
+ case 186 /* ArrowFunction */:
return spanInFunctionDeclaration(node);
- case 204 /* Block */:
+ case 206 /* Block */:
if (ts.isFunctionBlock(node)) {
return spanInFunctionBlock(node);
}
- // Fall through
- case 231 /* ModuleBlock */:
+ // falls through
+ case 233 /* ModuleBlock */:
return spanInBlock(node);
- case 256 /* CatchClause */:
+ case 259 /* CatchClause */:
return spanInBlock(node.block);
- case 207 /* ExpressionStatement */:
+ case 209 /* ExpressionStatement */:
// span on the expression
return textSpan(node.expression);
- case 216 /* ReturnStatement */:
+ case 218 /* ReturnStatement */:
// span on return keyword and expression if present
return textSpan(node.getChildAt(0), node.expression);
- case 210 /* WhileStatement */:
+ case 212 /* WhileStatement */:
// Span on while(...)
return textSpanEndingAtNextToken(node, node.expression);
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// span in statement of the do statement
return spanInNode(node.statement);
- case 222 /* DebuggerStatement */:
+ case 224 /* DebuggerStatement */:
// span on debugger keyword
return textSpan(node.getChildAt(0));
- case 208 /* IfStatement */:
+ case 210 /* IfStatement */:
// set on if(..) span
return textSpanEndingAtNextToken(node, node.expression);
- case 219 /* LabeledStatement */:
+ case 221 /* LabeledStatement */:
// span in statement
return spanInNode(node.statement);
- case 215 /* BreakStatement */:
- case 214 /* ContinueStatement */:
+ case 217 /* BreakStatement */:
+ case 216 /* ContinueStatement */:
// On break or continue keyword and label if present
return textSpan(node.getChildAt(0), node.label);
- case 211 /* ForStatement */:
+ case 213 /* ForStatement */:
return spanInForStatement(node);
- case 212 /* ForInStatement */:
+ case 214 /* ForInStatement */:
// span of for (a in ...)
return textSpanEndingAtNextToken(node, node.expression);
- case 213 /* ForOfStatement */:
+ case 215 /* ForOfStatement */:
// span in initializer
return spanInInitializerOfForLike(node);
- case 218 /* SwitchStatement */:
+ case 220 /* SwitchStatement */:
// span on switch(...)
return textSpanEndingAtNextToken(node, node.expression);
- case 253 /* CaseClause */:
- case 254 /* DefaultClause */:
+ case 256 /* CaseClause */:
+ case 257 /* DefaultClause */:
// span in first statement of the clause
return spanInNode(node.statements[0]);
- case 221 /* TryStatement */:
+ case 223 /* TryStatement */:
// span in try block
return spanInBlock(node.tryBlock);
- case 220 /* ThrowStatement */:
+ case 222 /* ThrowStatement */:
// span in throw ...
return textSpan(node, node.expression);
- case 240 /* ExportAssignment */:
+ case 242 /* ExportAssignment */:
// span on export = id
return textSpan(node, node.expression);
- case 234 /* ImportEqualsDeclaration */:
+ case 236 /* ImportEqualsDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleReference);
- case 235 /* ImportDeclaration */:
+ case 237 /* ImportDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleSpecifier);
- case 241 /* ExportDeclaration */:
+ case 243 /* ExportDeclaration */:
// import statement without including semicolon
return textSpan(node, node.moduleSpecifier);
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
// span on complete module if it is instantiated
if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) {
return undefined;
}
- case 226 /* ClassDeclaration */:
- case 229 /* EnumDeclaration */:
- case 260 /* EnumMember */:
- case 174 /* BindingElement */:
+ // falls through
+ case 228 /* ClassDeclaration */:
+ case 231 /* EnumDeclaration */:
+ case 263 /* EnumMember */:
+ case 175 /* BindingElement */:
// span on complete node
return textSpan(node);
- case 217 /* WithStatement */:
+ case 219 /* WithStatement */:
// span in statement
return spanInNode(node.statement);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
return spanInNodeArray(node.parent.decorators);
- case 172 /* ObjectBindingPattern */:
- case 173 /* ArrayBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
return spanInBindingPattern(node);
// No breakpoint in interface, type alias
- case 227 /* InterfaceDeclaration */:
- case 228 /* TypeAliasDeclaration */:
+ case 229 /* InterfaceDeclaration */:
+ case 230 /* TypeAliasDeclaration */:
return undefined;
// Tokens:
case 24 /* SemicolonToken */:
@@ -79698,7 +86908,7 @@ var ts;
case 73 /* CatchKeyword */:
case 86 /* FinallyKeyword */:
return spanInNextNode(node);
- case 140 /* OfKeyword */:
+ case 141 /* OfKeyword */:
return spanInOfKeyword(node);
default:
// Destructuring pattern in destructuring assignment
@@ -79711,13 +86921,13 @@ var ts;
// a or ...c or d: x from
// [a, b, ...c] or { a, b } or { d: x } from destructuring pattern
if ((node.kind === 70 /* Identifier */ ||
- node.kind == 196 /* SpreadElement */ ||
- node.kind === 257 /* PropertyAssignment */ ||
- node.kind === 258 /* ShorthandPropertyAssignment */) &&
+ node.kind === 197 /* SpreadElement */ ||
+ node.kind === 260 /* PropertyAssignment */ ||
+ node.kind === 261 /* ShorthandPropertyAssignment */) &&
ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
return textSpan(node);
}
- if (node.kind === 192 /* BinaryExpression */) {
+ if (node.kind === 193 /* BinaryExpression */) {
var binaryExpression = node;
// Set breakpoint in destructuring pattern if its destructuring assignment
// [a, b, c] or {a, b, c} of
@@ -79740,22 +86950,22 @@ var ts;
}
if (ts.isPartOfExpression(node)) {
switch (node.parent.kind) {
- case 209 /* DoStatement */:
+ case 211 /* DoStatement */:
// Set span as if on while keyword
return spanInPreviousNode(node);
- case 145 /* Decorator */:
+ case 146 /* Decorator */:
// Set breakpoint on the decorator emit
return spanInNode(node.parent);
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
return textSpan(node);
- case 192 /* BinaryExpression */:
+ case 193 /* BinaryExpression */:
if (node.parent.operatorToken.kind === 25 /* CommaToken */) {
// If this is a comma expression, the breakpoint is possible in this expression
return textSpan(node);
}
break;
- case 185 /* ArrowFunction */:
+ case 186 /* ArrowFunction */:
if (node.parent.body === node) {
// If this is body of arrow function, it is allowed to have the breakpoint
return textSpan(node);
@@ -79764,13 +86974,13 @@ var ts;
}
}
// If this is name of property assignment, set breakpoint in the initializer
- if (node.parent.kind === 257 /* PropertyAssignment */ &&
+ if (node.parent.kind === 260 /* PropertyAssignment */ &&
node.parent.name === node &&
!ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {
return spanInNode(node.parent.initializer);
}
// Breakpoint in type assertion goes to its operand
- if (node.parent.kind === 182 /* TypeAssertionExpression */ && node.parent.type === node) {
+ if (node.parent.kind === 183 /* TypeAssertionExpression */ && node.parent.type === node) {
return spanInNextNode(node.parent.type);
}
// return type of function go to previous token
@@ -79778,8 +86988,8 @@ var ts;
return spanInPreviousNode(node);
}
// initializer of variable/parameter declaration go to previous node
- if ((node.parent.kind === 223 /* VariableDeclaration */ ||
- node.parent.kind === 144 /* Parameter */)) {
+ if ((node.parent.kind === 225 /* VariableDeclaration */ ||
+ node.parent.kind === 145 /* Parameter */)) {
var paramOrVarDecl = node.parent;
if (paramOrVarDecl.initializer === node ||
paramOrVarDecl.type === node ||
@@ -79787,7 +86997,7 @@ var ts;
return spanInPreviousNode(node);
}
}
- if (node.parent.kind === 192 /* BinaryExpression */) {
+ if (node.parent.kind === 193 /* BinaryExpression */) {
var binaryExpression = node.parent;
if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) &&
(binaryExpression.right === node ||
@@ -79801,8 +87011,8 @@ var ts;
}
}
function textSpanFromVariableDeclaration(variableDeclaration) {
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] === variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ &&
+ variableDeclaration.parent.declarations[0] === variableDeclaration) {
// First declaration - include let keyword
return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
}
@@ -79813,7 +87023,7 @@ var ts;
}
function spanInVariableDeclaration(variableDeclaration) {
// If declaration of for in statement, just set the span in parent
- if (variableDeclaration.parent.parent.kind === 212 /* ForInStatement */) {
+ if (variableDeclaration.parent.parent.kind === 214 /* ForInStatement */) {
return spanInNode(variableDeclaration.parent.parent);
}
// If this is a destructuring pattern, set breakpoint in binding pattern
@@ -79824,11 +87034,11 @@ var ts;
// or its declaration from 'for of'
if (variableDeclaration.initializer ||
ts.hasModifier(variableDeclaration, 1 /* Export */) ||
- variableDeclaration.parent.parent.kind === 213 /* ForOfStatement */) {
+ variableDeclaration.parent.parent.kind === 215 /* ForOfStatement */) {
return textSpanFromVariableDeclaration(variableDeclaration);
}
- var declarations = variableDeclaration.parent.declarations;
- if (declarations && declarations[0] !== variableDeclaration) {
+ if (variableDeclaration.parent.kind === 226 /* VariableDeclarationList */ &&
+ variableDeclaration.parent.declarations[0] !== variableDeclaration) {
// If we cannot set breakpoint on this declaration, set it on previous one
// Because the variable declaration may be binding pattern and
// we would like to set breakpoint in last binding element if that's the case,
@@ -79864,7 +87074,7 @@ var ts;
}
function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) {
return ts.hasModifier(functionDeclaration, 1 /* Export */) ||
- (functionDeclaration.parent.kind === 226 /* ClassDeclaration */ && functionDeclaration.kind !== 150 /* Constructor */);
+ (functionDeclaration.parent.kind === 228 /* ClassDeclaration */ && functionDeclaration.kind !== 151 /* Constructor */);
}
function spanInFunctionDeclaration(functionDeclaration) {
// No breakpoints in the function signature
@@ -79887,25 +87097,26 @@ var ts;
}
function spanInBlock(block) {
switch (block.parent.kind) {
- case 230 /* ModuleDeclaration */:
+ case 232 /* ModuleDeclaration */:
if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) {
return undefined;
}
+ // falls through
// Set on parent if on same line otherwise on first statement
- case 210 /* WhileStatement */:
- case 208 /* IfStatement */:
- case 212 /* ForInStatement */:
+ case 212 /* WhileStatement */:
+ case 210 /* IfStatement */:
+ case 214 /* ForInStatement */:
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
// Set span on previous token if it starts on same line otherwise on the first statement of the block
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
}
// Default action is to set on first statement
return spanInNode(block.statements[0]);
}
function spanInInitializerOfForLike(forLikeStatement) {
- if (forLikeStatement.initializer.kind === 224 /* VariableDeclarationList */) {
+ if (forLikeStatement.initializer.kind === 226 /* VariableDeclarationList */) {
// Declaration list - set breakpoint in first declaration
var variableDeclarationList = forLikeStatement.initializer;
if (variableDeclarationList.declarations.length > 0) {
@@ -79930,23 +87141,23 @@ var ts;
}
function spanInBindingPattern(bindingPattern) {
// Set breakpoint in first binding element
- var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 198 /* OmittedExpression */ ? element : undefined; });
+ var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
// Empty binding pattern of binding element, set breakpoint on binding element
- if (bindingPattern.parent.kind === 174 /* BindingElement */) {
+ if (bindingPattern.parent.kind === 175 /* BindingElement */) {
return textSpan(bindingPattern.parent);
}
// Variable declaration is used as the span
return textSpanFromVariableDeclaration(bindingPattern.parent);
}
function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) {
- ts.Debug.assert(node.kind !== 173 /* ArrayBindingPattern */ && node.kind !== 172 /* ObjectBindingPattern */);
- var elements = node.kind === 175 /* ArrayLiteralExpression */ ?
+ ts.Debug.assert(node.kind !== 174 /* ArrayBindingPattern */ && node.kind !== 173 /* ObjectBindingPattern */);
+ var elements = node.kind === 176 /* ArrayLiteralExpression */ ?
node.elements :
node.properties;
- var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 198 /* OmittedExpression */ ? element : undefined; });
+ var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 199 /* OmittedExpression */ ? element : undefined; });
if (firstBindingElement) {
return spanInNode(firstBindingElement);
}
@@ -79954,18 +87165,18 @@ var ts;
// just nested element in another destructuring assignment
// set breakpoint on assignment when parent is destructuring assignment
// Otherwise set breakpoint for this element
- return textSpan(node.parent.kind === 192 /* BinaryExpression */ ? node.parent : node);
+ return textSpan(node.parent.kind === 193 /* BinaryExpression */ ? node.parent : node);
}
// Tokens:
function spanInOpenBraceToken(node) {
switch (node.parent.kind) {
- case 229 /* EnumDeclaration */:
+ case 231 /* EnumDeclaration */:
var enumDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile));
- case 226 /* ClassDeclaration */:
+ case 228 /* ClassDeclaration */:
var classDeclaration = node.parent;
return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile));
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]);
}
// Default to parent node
@@ -79973,24 +87184,25 @@ var ts;
}
function spanInCloseBraceToken(node) {
switch (node.parent.kind) {
- case 231 /* ModuleBlock */:
+ case 233 /* ModuleBlock */:
// If this is not an instantiated module block, no bp span
if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) {
return undefined;
}
- case 229 /* EnumDeclaration */:
- case 226 /* ClassDeclaration */:
+ // falls through
+ case 231 /* EnumDeclaration */:
+ case 228 /* ClassDeclaration */:
// Span on close brace token
return textSpan(node);
- case 204 /* Block */:
+ case 206 /* Block */:
if (ts.isFunctionBlock(node.parent)) {
// Span on close brace token
return textSpan(node);
}
- // fall through
- case 256 /* CatchClause */:
+ // falls through
+ case 259 /* CatchClause */:
return spanInNode(ts.lastOrUndefined(node.parent.statements));
- case 232 /* CaseBlock */:
+ case 234 /* CaseBlock */:
// breakpoint in last statement of the last clause
var caseBlock = node.parent;
var lastClause = ts.lastOrUndefined(caseBlock.clauses);
@@ -79998,7 +87210,7 @@ var ts;
return spanInNode(ts.lastOrUndefined(lastClause.statements));
}
return undefined;
- case 172 /* ObjectBindingPattern */:
+ case 173 /* ObjectBindingPattern */:
// Breakpoint in last binding element or binding pattern if it contains no elements
var bindingPattern = node.parent;
return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
@@ -80014,7 +87226,7 @@ var ts;
}
function spanInCloseBracketToken(node) {
switch (node.parent.kind) {
- case 173 /* ArrayBindingPattern */:
+ case 174 /* ArrayBindingPattern */:
// Breakpoint in last binding element or binding pattern if it contains no elements
var bindingPattern = node.parent;
return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern);
@@ -80029,12 +87241,12 @@ var ts;
}
}
function spanInOpenParenToken(node) {
- if (node.parent.kind === 209 /* DoStatement */ ||
- node.parent.kind === 179 /* CallExpression */ ||
- node.parent.kind === 180 /* NewExpression */) {
+ if (node.parent.kind === 211 /* DoStatement */ ||
+ node.parent.kind === 180 /* CallExpression */ ||
+ node.parent.kind === 181 /* NewExpression */) {
return spanInPreviousNode(node);
}
- if (node.parent.kind === 183 /* ParenthesizedExpression */) {
+ if (node.parent.kind === 184 /* ParenthesizedExpression */) {
return spanInNextNode(node);
}
// Default to parent node
@@ -80043,21 +87255,21 @@ var ts;
function spanInCloseParenToken(node) {
// Is this close paren token of parameter list, set span in previous token
switch (node.parent.kind) {
- case 184 /* FunctionExpression */:
- case 225 /* FunctionDeclaration */:
- case 185 /* ArrowFunction */:
- case 149 /* MethodDeclaration */:
- case 148 /* MethodSignature */:
- case 151 /* GetAccessor */:
- case 152 /* SetAccessor */:
- case 150 /* Constructor */:
- case 210 /* WhileStatement */:
- case 209 /* DoStatement */:
- case 211 /* ForStatement */:
- case 213 /* ForOfStatement */:
- case 179 /* CallExpression */:
- case 180 /* NewExpression */:
- case 183 /* ParenthesizedExpression */:
+ case 185 /* FunctionExpression */:
+ case 227 /* FunctionDeclaration */:
+ case 186 /* ArrowFunction */:
+ case 150 /* MethodDeclaration */:
+ case 149 /* MethodSignature */:
+ case 152 /* GetAccessor */:
+ case 153 /* SetAccessor */:
+ case 151 /* Constructor */:
+ case 212 /* WhileStatement */:
+ case 211 /* DoStatement */:
+ case 213 /* ForStatement */:
+ case 215 /* ForOfStatement */:
+ case 180 /* CallExpression */:
+ case 181 /* NewExpression */:
+ case 184 /* ParenthesizedExpression */:
return spanInPreviousNode(node);
// Default to parent node
default:
@@ -80067,20 +87279,20 @@ var ts;
function spanInColonToken(node) {
// Is this : specifying return annotation of the function declaration
if (ts.isFunctionLike(node.parent) ||
- node.parent.kind === 257 /* PropertyAssignment */ ||
- node.parent.kind === 144 /* Parameter */) {
+ node.parent.kind === 260 /* PropertyAssignment */ ||
+ node.parent.kind === 145 /* Parameter */) {
return spanInPreviousNode(node);
}
return spanInNode(node.parent);
}
function spanInGreaterThanOrLessThanToken(node) {
- if (node.parent.kind === 182 /* TypeAssertionExpression */) {
+ if (node.parent.kind === 183 /* TypeAssertionExpression */) {
return spanInNextNode(node);
}
return spanInNode(node.parent);
}
function spanInWhileKeyword(node) {
- if (node.parent.kind === 209 /* DoStatement */) {
+ if (node.parent.kind === 211 /* DoStatement */) {
// Set span on while expression
return textSpanEndingAtNextToken(node, node.parent.expression);
}
@@ -80088,7 +87300,7 @@ var ts;
return spanInNode(node.parent);
}
function spanInOfKeyword(node) {
- if (node.parent.kind === 213 /* ForOfStatement */) {
+ if (node.parent.kind === 215 /* ForOfStatement */) {
// Set using next token
return spanInNextNode(node);
}
@@ -80100,6 +87312,26 @@ var ts;
BreakpointResolver.spanInSourceFileAtLocation = spanInSourceFileAtLocation;
})(BreakpointResolver = ts.BreakpointResolver || (ts.BreakpointResolver = {}));
})(ts || (ts = {}));
+/// <reference path="..\compiler\transformer.ts"/>
+/// <reference path="transpile.ts"/>
+var ts;
+(function (ts) {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform(source, transformers, compilerOptions) {
+ var diagnostics = [];
+ compilerOptions = ts.fixupCompilerOptions(compilerOptions, diagnostics);
+ var nodes = ts.isArray(source) ? source : [source];
+ var result = ts.transformNodes(/*resolver*/ undefined, /*emitHost*/ undefined, compilerOptions, nodes, transformers, /*allowDtsFiles*/ true);
+ result.diagnostics = ts.concatenate(result.diagnostics, diagnostics);
+ return result;
+ }
+ ts.transform = transform;
+})(ts || (ts = {}));
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
@@ -80141,8 +87373,7 @@ var ts;
ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) {
var oldSnapshotShim = oldSnapshot;
var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
- // TODO: should this be '==='?
- if (encoded == null) {
+ if (encoded === null) {
return null;
}
var decoded = JSON.parse(encoded);
@@ -80215,11 +87446,13 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () {
var settingsJson = this.shimHost.getCompilationSettings();
- // TODO: should this be '==='?
- if (settingsJson == null || settingsJson == "") {
+ if (settingsJson === null || settingsJson === "") {
throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
}
- return JSON.parse(settingsJson);
+ var compilerOptions = JSON.parse(settingsJson);
+ // permit language service to handle all files (filtering should be performed on the host side)
+ compilerOptions.allowNonTsExtensions = true;
+ return compilerOptions;
};
LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () {
var encoded = this.shimHost.getScriptFileNames();
@@ -80242,7 +87475,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () {
var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
- if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") {
+ if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") {
return null;
}
try {
@@ -80255,7 +87488,7 @@ var ts;
};
LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () {
var hostCancellationToken = this.shimHost.getCancellationToken();
- return new ThrottledCancellationToken(hostCancellationToken);
+ return new ts.ThrottledCancellationToken(hostCancellationToken);
};
LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () {
return this.shimHost.getCurrentDirectory();
@@ -80279,27 +87512,6 @@ var ts;
return LanguageServiceShimHostAdapter;
}());
ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter;
- /** A cancellation that throttles calls to the host */
- var ThrottledCancellationToken = (function () {
- function ThrottledCancellationToken(hostCancellationToken) {
- this.hostCancellationToken = hostCancellationToken;
- // Store when we last tried to cancel. Checking cancellation can be expensive (as we have
- // to marshall over to the host layer). So we only bother actually checking once enough
- // time has passed.
- this.lastCancellationCheckTime = 0;
- }
- ThrottledCancellationToken.prototype.isCancellationRequested = function () {
- var time = ts.timestamp();
- var duration = Math.abs(time - this.lastCancellationCheckTime);
- if (duration > 10) {
- // Check no more than once every 10 ms.
- this.lastCancellationCheckTime = time;
- return this.hostCancellationToken.isCancellationRequested();
- }
- return false;
- };
- return ThrottledCancellationToken;
- }());
var CoreServicesShimHostAdapter = (function () {
function CoreServicesShimHostAdapter(shimHost) {
var _this = this;
@@ -80727,12 +87939,6 @@ var ts;
var compilerOptions = JSON.parse(compilerOptionsJson);
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
- if (resolvedFileName && !compilerOptions.allowJs && ts.fileExtensionIs(resolvedFileName, ".js")) {
- return {
- resolvedFileName: undefined,
- failedLookupLocations: []
- };
- }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -80877,7 +88083,7 @@ var ts;
this._shims.push(shim);
};
TypeScriptServicesFactory.prototype.unregisterShim = function (shim) {
- for (var i = 0, n = this._shims.length; i < n; i++) {
+ for (var i = 0; i < this._shims.length; i++) {
if (this._shims[i] === shim) {
delete this._shims[i];
return;
@@ -80906,4 +88112,4 @@ var TypeScript;
// 'toolsVersion' gets consumed by the managed side, so it's not unused.
// TODO: it should be moved into a namespace though.
/* @internal */
-var toolsVersion = "2.2";
+var toolsVersion = "2.3";
diff --git a/node_modules/typescript/lib/typingsInstaller.js b/node_modules/typescript/lib/typingsInstaller.js
index 904f1444d..3e48c048f 100644
--- a/node_modules/typescript/lib/typingsInstaller.js
+++ b/node_modules/typescript/lib/typingsInstaller.js
@@ -13,11 +13,16 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-};
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
var ts;
(function (ts) {
var OperationCanceledException = (function () {
@@ -32,6 +37,16 @@ var ts;
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
})(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
+ var NodeBuilderFlags;
+ (function (NodeBuilderFlags) {
+ NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+ NodeBuilderFlags[NodeBuilderFlags["allowThisInObjectLiteral"] = 1] = "allowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["allowQualifedNameInPlaceOfIdentifier"] = 2] = "allowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowTypeParameterInQualifiedName"] = 4] = "allowTypeParameterInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["allowAnonymousIdentifier"] = 8] = "allowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyUnionOrIntersection"] = 16] = "allowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["allowEmptyTuple"] = 32] = "allowEmptyTuple";
+ })(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
TypeReferenceSerializationKind[TypeReferenceSerializationKind["Unknown"] = 0] = "Unknown";
@@ -93,32 +108,32 @@ var ts;
var measures;
function mark(markName) {
if (enabled) {
- marks[markName] = ts.timestamp();
- counts[markName] = (counts[markName] || 0) + 1;
+ marks.set(markName, ts.timestamp());
+ counts.set(markName, (counts.get(markName) || 0) + 1);
profilerEvent(markName);
}
}
performance.mark = mark;
function measure(measureName, startMarkName, endMarkName) {
if (enabled) {
- var end = endMarkName && marks[endMarkName] || ts.timestamp();
- var start = startMarkName && marks[startMarkName] || profilerStart;
- measures[measureName] = (measures[measureName] || 0) + (end - start);
+ var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
+ var start = startMarkName && marks.get(startMarkName) || profilerStart;
+ measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
}
}
performance.measure = measure;
function getCount(markName) {
- return counts && counts[markName] || 0;
+ return counts && counts.get(markName) || 0;
}
performance.getCount = getCount;
function getDuration(measureName) {
- return measures && measures[measureName] || 0;
+ return measures && measures.get(measureName) || 0;
}
performance.getDuration = getDuration;
function forEachMeasure(cb) {
- for (var key in measures) {
- cb(key, measures[key]);
- }
+ measures.forEach(function (measure, key) {
+ cb(key, measure);
+ });
}
performance.forEachMeasure = forEachMeasure;
function enable() {
@@ -137,22 +152,96 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.2.0-dev.20161127";
+ ts.version = "2.3.0-dev.20170419";
})(ts || (ts = {}));
(function (ts) {
- var createObject = Object.create;
- ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
- function createMap(template) {
- var map = createObject(null);
+ ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
+ ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
+ function createDictionaryObject() {
+ var map = Object.create(null);
map["__"] = undefined;
delete map["__"];
+ return map;
+ }
+ function createMap() {
+ return new MapCtr();
+ }
+ ts.createMap = createMap;
+ function createMapFromTemplate(template) {
+ var map = new MapCtr();
for (var key in template)
if (hasOwnProperty.call(template, key)) {
- map[key] = template[key];
+ map.set(key, template[key]);
}
return map;
}
- ts.createMap = createMap;
+ ts.createMapFromTemplate = createMapFromTemplate;
+ var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
+ function shimMap() {
+ var MapIterator = (function () {
+ function MapIterator(data, selector) {
+ this.index = 0;
+ this.data = data;
+ this.selector = selector;
+ this.keys = Object.keys(data);
+ }
+ MapIterator.prototype.next = function () {
+ var index = this.index;
+ if (index < this.keys.length) {
+ this.index++;
+ return { value: this.selector(this.data, this.keys[index]), done: false };
+ }
+ return { value: undefined, done: true };
+ };
+ return MapIterator;
+ }());
+ return (function () {
+ function class_1() {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ }
+ class_1.prototype.get = function (key) {
+ return this.data[key];
+ };
+ class_1.prototype.set = function (key, value) {
+ if (!this.has(key)) {
+ this.size++;
+ }
+ this.data[key] = value;
+ return this;
+ };
+ class_1.prototype.has = function (key) {
+ return key in this.data;
+ };
+ class_1.prototype.delete = function (key) {
+ if (this.has(key)) {
+ this.size--;
+ delete this.data[key];
+ return true;
+ }
+ return false;
+ };
+ class_1.prototype.clear = function () {
+ this.data = createDictionaryObject();
+ this.size = 0;
+ };
+ class_1.prototype.keys = function () {
+ return new MapIterator(this.data, function (_data, key) { return key; });
+ };
+ class_1.prototype.values = function () {
+ return new MapIterator(this.data, function (data, key) { return data[key]; });
+ };
+ class_1.prototype.entries = function () {
+ return new MapIterator(this.data, function (data, key) { return [key, data[key]]; });
+ };
+ class_1.prototype.forEach = function (action) {
+ for (var key in this.data) {
+ action(this.data[key], key);
+ }
+ };
+ return class_1;
+ }());
+ }
function createFileMap(keyMapper) {
var files = createMap();
return {
@@ -165,32 +254,27 @@ var ts;
clear: clear,
};
function forEachValueInMap(f) {
- for (var key in files) {
- f(key, files[key]);
- }
+ files.forEach(function (file, key) {
+ f(key, file);
+ });
}
function getKeys() {
- var keys = [];
- for (var key in files) {
- keys.push(key);
- }
- return keys;
+ return arrayFrom(files.keys());
}
function get(path) {
- return files[toKey(path)];
+ return files.get(toKey(path));
}
function set(path, value) {
- files[toKey(path)] = value;
+ files.set(toKey(path), value);
}
function contains(path) {
- return toKey(path) in files;
+ return files.has(toKey(path));
}
function remove(path) {
- var key = toKey(path);
- delete files[key];
+ files.delete(toKey(path));
}
function clear() {
- files = createMap();
+ files.clear();
}
function toKey(path) {
return keyMapper ? keyMapper(path) : path;
@@ -204,9 +288,13 @@ var ts;
return getCanonicalFileName(nonCanonicalizedPath);
}
ts.toPath = toPath;
+ function length(array) {
+ return array ? array.length : 0;
+ }
+ ts.length = length;
function forEach(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -216,6 +304,20 @@ var ts;
return undefined;
}
ts.forEach = forEach;
+ function findAncestor(node, callback) {
+ while (node) {
+ var result = callback(node);
+ if (result === "quit") {
+ return undefined;
+ }
+ else if (result) {
+ return node;
+ }
+ node = node.parent;
+ }
+ return undefined;
+ }
+ ts.findAncestor = findAncestor;
function zipWith(arrayA, arrayB, callback) {
Debug.assert(arrayA.length === arrayB.length);
for (var i = 0; i < arrayA.length; i++) {
@@ -225,7 +327,7 @@ var ts;
ts.zipWith = zipWith;
function every(array, callback) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (!callback(array[i], i)) {
return false;
}
@@ -235,7 +337,7 @@ var ts;
}
ts.every = every;
function find(array, predicate) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var value = array[i];
if (predicate(value, i)) {
return value;
@@ -244,8 +346,17 @@ var ts;
return undefined;
}
ts.find = find;
+ function findIndex(array, predicate) {
+ for (var i = 0; i < array.length; i++) {
+ if (predicate(array[i], i)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ ts.findIndex = findIndex;
function findMap(array, callback) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
if (result) {
return result;
@@ -268,7 +379,7 @@ var ts;
ts.contains = contains;
function indexOf(array, value) {
if (array) {
- for (var i = 0, len = array.length; i < len; i++) {
+ for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
return i;
}
@@ -278,7 +389,7 @@ var ts;
}
ts.indexOf = indexOf;
function indexOfAnyCharCode(text, charCodes, start) {
- for (var i = start || 0, len = text.length; i < len; i++) {
+ for (var i = start || 0; i < text.length; i++) {
if (contains(charCodes, text.charCodeAt(i))) {
return i;
}
@@ -465,21 +576,18 @@ var ts;
return result;
}
ts.spanMap = spanMap;
- function mapObject(object, f) {
- var result;
- if (object) {
- result = {};
- for (var _i = 0, _a = getOwnKeys(object); _i < _a.length; _i++) {
- var v = _a[_i];
- var _b = f(v, object[v]) || [undefined, undefined], key = _b[0], value = _b[1];
- if (key !== undefined) {
- result[key] = value;
- }
- }
+ function mapEntries(map, f) {
+ if (!map) {
+ return undefined;
}
+ var result = createMap();
+ map.forEach(function (value, key) {
+ var _a = f(key, value), newKey = _a[0], newValue = _a[1];
+ result.set(newKey, newValue);
+ });
return result;
}
- ts.mapObject = mapObject;
+ ts.mapEntries = mapEntries;
function some(array, predicate) {
if (array) {
if (predicate) {
@@ -763,38 +871,55 @@ var ts;
return keys;
}
ts.getOwnKeys = getOwnKeys;
- function forEachProperty(map, callback) {
- var result;
- for (var key in map) {
- if (result = callback(map[key], key))
- break;
+ function arrayFrom(iterator, map) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(map ? map(value) : value);
+ }
+ return result;
+ var _b;
+ }
+ ts.arrayFrom = arrayFrom;
+ function convertToArray(iterator, f) {
+ var result = [];
+ for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
+ result.push(f(value));
}
return result;
+ var _b;
}
- ts.forEachProperty = forEachProperty;
- function someProperties(map, predicate) {
- for (var key in map) {
- if (!predicate || predicate(map[key], key))
- return true;
+ ts.convertToArray = convertToArray;
+ function forEachEntry(map, callback) {
+ var iterator = map.entries();
+ for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
+ var key = pair[0], value = pair[1];
+ var result = callback(value, key);
+ if (result) {
+ return result;
+ }
}
- return false;
+ return undefined;
+ var _b;
}
- ts.someProperties = someProperties;
- function copyProperties(source, target) {
- for (var key in source) {
- target[key] = source[key];
+ ts.forEachEntry = forEachEntry;
+ function forEachKey(map, callback) {
+ var iterator = map.keys();
+ for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
+ var result = callback(key);
+ if (result) {
+ return result;
+ }
}
+ return undefined;
+ var _b;
}
- ts.copyProperties = copyProperties;
- function appendProperty(map, key, value) {
- if (key === undefined || value === undefined)
- return map;
- if (map === undefined)
- map = createMap();
- map[key] = value;
- return map;
+ ts.forEachKey = forEachKey;
+ function copyEntries(source, target) {
+ source.forEach(function (value, key) {
+ target.set(key, value);
+ });
}
- ts.appendProperty = appendProperty;
+ ts.copyEntries = copyEntries;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@@ -802,31 +927,14 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
- var p = _c[_b];
- t[p] = arg[p];
- }
+ for (var p in arg)
+ if (hasProperty(arg, p)) {
+ t[p] = arg[p];
+ }
}
return t;
}
ts.assign = assign;
- function reduceProperties(map, callback, initial) {
- var result = initial;
- for (var key in map) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceProperties = reduceProperties;
- function reduceOwnProperties(map, callback, initial) {
- var result = initial;
- for (var key in map)
- if (hasOwnProperty.call(map, key)) {
- result = callback(result, map[key], String(key));
- }
- return result;
- }
- ts.reduceOwnProperties = reduceOwnProperties;
function equalOwnProperties(left, right, equalityComparer) {
if (left === right)
return true;
@@ -851,23 +959,14 @@ var ts;
var result = createMap();
for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
var value = array_8[_i];
- result[makeKey(value)] = makeValue ? makeValue(value) : value;
+ result.set(makeKey(value), makeValue ? makeValue(value) : value);
}
return result;
}
ts.arrayToMap = arrayToMap;
- function isEmpty(map) {
- for (var id in map) {
- if (hasProperty(map, id)) {
- return false;
- }
- }
- return true;
- }
- ts.isEmpty = isEmpty;
function cloneMap(map) {
var clone = createMap();
- copyProperties(map, clone);
+ copyEntries(map, clone);
return clone;
}
ts.cloneMap = cloneMap;
@@ -894,27 +993,32 @@ var ts;
return result;
}
ts.extend = extend;
- function multiMapAdd(map, key, value) {
- var values = map[key];
+ function createMultiMap() {
+ var map = createMap();
+ map.add = multiMapAdd;
+ map.remove = multiMapRemove;
+ return map;
+ }
+ ts.createMultiMap = createMultiMap;
+ function multiMapAdd(key, value) {
+ var values = this.get(key);
if (values) {
values.push(value);
- return values;
}
else {
- return map[key] = [value];
+ this.set(key, values = [value]);
}
+ return values;
}
- ts.multiMapAdd = multiMapAdd;
- function multiMapRemove(map, key, value) {
- var values = map[key];
+ function multiMapRemove(key, value) {
+ var values = this.get(key);
if (values) {
unorderedRemoveItem(values, value);
if (!values.length) {
- delete map[key];
+ this.delete(key);
}
}
}
- ts.multiMapRemove = multiMapRemove;
function isArray(value) {
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
@@ -990,6 +1094,7 @@ var ts;
baseIndex = baseIndex || 0;
return text.replace(/{(\d+)}/g, function (_match, index) { return args[+index + baseIndex]; });
}
+ ts.formatStringFromArgs = formatStringFromArgs;
ts.localizedDiagnosticMessages = undefined;
function getLocaleSpecificMessage(message) {
return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
@@ -1091,8 +1196,10 @@ var ts;
if (b === undefined)
return 1;
if (ignoreCase) {
- if (ts.collator && String.prototype.localeCompare) {
- var result = a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
+ if (ts.collator) {
+ var result = ts.localeCompareIsCorrect ?
+ ts.collator.compare(a, b) :
+ a.localeCompare(b, undefined, { usage: "sort", sensitivity: "accent" });
return result < 0 ? -1 : result > 0 ? 1 : 0;
}
a = a.toUpperCase();
@@ -1474,36 +1581,26 @@ var ts;
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
var singleAsteriskRegexFragmentOther = "[^/]*";
function getRegularExpressionForWildcard(specs, basePath, usage) {
+ var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
+ if (!patterns || !patterns.length) {
+ return undefined;
+ }
+ var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+ var terminator = usage === "exclude" ? "($|/)" : "$";
+ return "^(" + pattern + ")" + terminator;
+ }
+ ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
+ function getRegularExpressionsForWildcards(specs, basePath, usage) {
if (specs === undefined || specs.length === 0) {
return undefined;
}
var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther;
var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther;
var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
- var pattern = "";
- var hasWrittenSubpattern = false;
- for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
- var spec = specs_1[_i];
- if (!spec) {
- continue;
- }
- var subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
- if (subPattern === undefined) {
- continue;
- }
- if (hasWrittenSubpattern) {
- pattern += "|";
- }
- pattern += "(" + subPattern + ")";
- hasWrittenSubpattern = true;
- }
- if (!pattern) {
- return undefined;
- }
- var terminator = usage === "exclude" ? "($|/)" : "$";
- return "^(" + pattern + ")" + terminator;
+ return flatMap(specs, function (spec) {
+ return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
+ });
}
- ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
function isImplicitGlob(lastPathComponent) {
return !/[.*?]/.test(lastPathComponent);
}
@@ -1573,6 +1670,7 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var absolutePath = combinePaths(currentDirectory, path);
return {
+ includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -1585,34 +1683,48 @@ var ts;
currentDirectory = normalizePath(currentDirectory);
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
var regexFlag = useCaseSensitiveFileNames ? "" : "i";
- var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag);
+ var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
- var result = [];
+ var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
+ var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
var basePath = _a[_i];
visitDirectory(basePath, combinePaths(currentDirectory, basePath));
}
- return result;
+ return flatten(results);
function visitDirectory(path, absolutePath) {
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
- for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
- var current = files_1[_i];
- var name_1 = combinePaths(path, current);
+ files = files.slice().sort(comparer);
+ directories = directories.slice().sort(comparer);
+ var _loop_1 = function (current) {
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if ((!extensions || fileExtensionIsAny(name_1, extensions)) &&
- (!includeFileRegex || includeFileRegex.test(absoluteName)) &&
- (!excludeRegex || !excludeRegex.test(absoluteName))) {
- result.push(name_1);
+ if (extensions && !fileExtensionIsAny(name, extensions))
+ return "continue";
+ if (excludeRegex && excludeRegex.test(absoluteName))
+ return "continue";
+ if (!includeFileRegexes) {
+ results[0].push(name);
}
+ else {
+ var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
+ if (includeIndex !== -1) {
+ results[includeIndex].push(name);
+ }
+ }
+ };
+ for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+ var current = files_1[_i];
+ _loop_1(current);
}
for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
var current = directories_1[_b];
- var name_2 = combinePaths(path, current);
+ var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
(!excludeRegex || !excludeRegex.test(absoluteName))) {
- visitDirectory(name_2, absoluteName);
+ visitDirectory(name, absoluteName);
}
}
}
@@ -1628,14 +1740,14 @@ var ts;
includeBasePaths.push(getIncludeBasePath(absolute));
}
includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
- var _loop_1 = function (includeBasePath) {
+ var _loop_2 = function (includeBasePath) {
if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
basePaths.push(includeBasePath);
}
};
for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
var includeBasePath = includeBasePaths_1[_a];
- _loop_1(includeBasePath);
+ _loop_2(includeBasePath);
}
}
return basePaths;
@@ -1673,8 +1785,19 @@ var ts;
ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
ts.supportedJavascriptExtensions = [".js", ".jsx"];
var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
- function getSupportedExtensions(options) {
- return options && options.allowJs ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ function getSupportedExtensions(options, extraFileExtensions) {
+ var needAllExtensions = options && options.allowJs;
+ if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
+ return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
+ }
+ var extensions = allSupportedExtensions.slice(0);
+ for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
+ var extInfo = extraFileExtensions_1[_i];
+ if (extensions.indexOf(extInfo.extension) === -1) {
+ extensions.push(extInfo.extension);
+ }
+ }
+ return extensions;
}
ts.getSupportedExtensions = getSupportedExtensions;
function hasJavaScriptFileExtension(fileName) {
@@ -1685,11 +1808,11 @@ var ts;
return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
}
ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
- function isSupportedSourceFileName(fileName, compilerOptions) {
+ function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
if (!fileName) {
return false;
}
- for (var _i = 0, _a = getSupportedExtensions(compilerOptions); _i < _a.length; _i++) {
+ for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
var extension = _a[_i];
if (fileExtensionIs(fileName, extension)) {
return true;
@@ -1701,30 +1824,30 @@ var ts;
function getExtensionPriority(path, supportedExtensions) {
for (var i = supportedExtensions.length - 1; i >= 0; i--) {
if (fileExtensionIs(path, supportedExtensions[i])) {
- return adjustExtensionPriority(i);
+ return adjustExtensionPriority(i, supportedExtensions);
}
}
return 0;
}
ts.getExtensionPriority = getExtensionPriority;
- function adjustExtensionPriority(extensionPriority) {
+ function adjustExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 0;
}
- else if (extensionPriority < 5) {
+ else if (extensionPriority < supportedExtensions.length) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.adjustExtensionPriority = adjustExtensionPriority;
- function getNextLowestExtensionPriority(extensionPriority) {
+ function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
if (extensionPriority < 2) {
return 2;
}
else {
- return 5;
+ return supportedExtensions.length;
}
}
ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
@@ -1933,136 +2056,29 @@ var ts;
}
}
ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
+ function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
+ return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
+ }
+ ts.isCheckJsEnabledForFile = isCheckJsEnabledForFile;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.sys = (function () {
- function getWScriptSystem() {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var shell = new ActiveXObject("WScript.Shell");
- var fileStream = new ActiveXObject("ADODB.Stream");
- fileStream.Type = 2;
- var binaryStream = new ActiveXObject("ADODB.Stream");
- binaryStream.Type = 1;
- var args = [];
- for (var i = 0; i < WScript.Arguments.length; i++) {
- args[i] = WScript.Arguments.Item(i);
- }
- function readFile(fileName, encoding) {
- if (!fso.FileExists(fileName)) {
- return undefined;
- }
- fileStream.Open();
- try {
- if (encoding) {
- fileStream.Charset = encoding;
- fileStream.LoadFromFile(fileName);
- }
- else {
- fileStream.Charset = "x-ansi";
- fileStream.LoadFromFile(fileName);
- var bom = fileStream.ReadText(2) || "";
- fileStream.Position = 0;
- fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
- }
- return fileStream.ReadText();
- }
- catch (e) {
- throw e;
- }
- finally {
- fileStream.Close();
- }
- }
- function writeFile(fileName, data, writeByteOrderMark) {
- fileStream.Open();
- binaryStream.Open();
- try {
- fileStream.Charset = "utf-8";
- fileStream.WriteText(data);
- if (writeByteOrderMark) {
- fileStream.Position = 0;
- }
- else {
- fileStream.Position = 3;
- }
- fileStream.CopyTo(binaryStream);
- binaryStream.SaveToFile(fileName, 2);
- }
- finally {
- binaryStream.Close();
- fileStream.Close();
- }
- }
- function getNames(collection) {
- var result = [];
- for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
- result.push(e.item().Name);
- }
- return result.sort();
- }
- function getDirectories(path) {
- var folder = fso.GetFolder(path);
- return getNames(folder.subfolders);
- }
- function getAccessibleFileSystemEntries(path) {
- try {
- var folder = fso.GetFolder(path || ".");
- var files = getNames(folder.files);
- var directories = getNames(folder.subfolders);
- return { files: files, directories: directories };
- }
- catch (e) {
- return { files: [], directories: [] };
- }
- }
- function readDirectory(path, extensions, excludes, includes) {
- return ts.matchFiles(path, extensions, excludes, includes, false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
- }
- var wscriptSystem = {
- args: args,
- newLine: "\r\n",
- useCaseSensitiveFileNames: false,
- write: function (s) {
- WScript.StdOut.Write(s);
- },
- readFile: readFile,
- writeFile: writeFile,
- resolvePath: function (path) {
- return fso.GetAbsolutePathName(path);
- },
- fileExists: function (path) {
- return fso.FileExists(path);
- },
- directoryExists: function (path) {
- return fso.FolderExists(path);
- },
- createDirectory: function (directoryName) {
- if (!wscriptSystem.directoryExists(directoryName)) {
- fso.CreateFolder(directoryName);
- }
- },
- getExecutingFilePath: function () {
- return WScript.ScriptFullName;
- },
- getCurrentDirectory: function () {
- return shell.CurrentDirectory;
- },
- getDirectories: getDirectories,
- getEnvironmentVariable: function (name) {
- return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
- },
- readDirectory: readDirectory,
- exit: function (exitCode) {
- try {
- WScript.Quit(exitCode);
- }
- catch (e) {
- }
- }
- };
- return wscriptSystem;
+ function getNodeMajorVersion() {
+ if (typeof process === "undefined") {
+ return undefined;
+ }
+ var version = process.version;
+ if (!version) {
+ return undefined;
}
+ var dot = version.indexOf(".");
+ if (dot === -1) {
+ return undefined;
+ }
+ return parseInt(version.substring(1, dot));
+ }
+ ts.getNodeMajorVersion = getNodeMajorVersion;
+ ts.sys = (function () {
function getNodeSystem() {
var _fs = require("fs");
var _path = require("path");
@@ -2071,32 +2087,32 @@ var ts;
var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"];
function createWatchedFileSet() {
var dirWatchers = ts.createMap();
- var fileWatcherCallbacks = ts.createMap();
+ var fileWatcherCallbacks = ts.createMultiMap();
return { addFile: addFile, removeFile: removeFile };
function reduceDirWatcherRefCountForFile(fileName) {
var dirName = ts.getDirectoryPath(fileName);
- var watcher = dirWatchers[dirName];
+ var watcher = dirWatchers.get(dirName);
if (watcher) {
watcher.referenceCount -= 1;
if (watcher.referenceCount <= 0) {
watcher.close();
- delete dirWatchers[dirName];
+ dirWatchers.delete(dirName);
}
}
}
function addDirWatcher(dirPath) {
- var watcher = dirWatchers[dirPath];
+ var watcher = dirWatchers.get(dirPath);
if (watcher) {
watcher.referenceCount += 1;
return;
}
watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
watcher.referenceCount = 1;
- dirWatchers[dirPath] = watcher;
+ dirWatchers.set(dirPath, watcher);
return;
}
function addFileWatcherCallback(filePath, callback) {
- ts.multiMapAdd(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.add(filePath, callback);
}
function addFile(fileName, callback) {
addFileWatcherCallback(fileName, callback);
@@ -2108,24 +2124,26 @@ var ts;
reduceDirWatcherRefCountForFile(watchedFile.fileName);
}
function removeFileWatcherCallback(filePath, callback) {
- ts.multiMapRemove(fileWatcherCallbacks, filePath, callback);
+ fileWatcherCallbacks.remove(filePath, callback);
}
function fileEventHandler(eventName, relativeFileName, baseDirPath) {
var fileName = typeof relativeFileName !== "string"
? undefined
: ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
- if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) {
- for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) {
- var fileCallback = _a[_i];
- fileCallback(fileName);
+ if ((eventName === "change" || eventName === "rename")) {
+ var callbacks = fileWatcherCallbacks.get(fileName);
+ if (callbacks) {
+ for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
+ var fileCallback = callbacks_1[_i];
+ fileCallback(fileName);
+ }
}
}
}
}
var watchedFileSet = createWatchedFileSet();
- function isNode4OrLater() {
- return parseInt(process.version.charAt(1)) >= 4;
- }
+ var nodeVersion = getNodeMajorVersion();
+ var isNode4OrLater = nodeVersion >= 4;
function isFileSystemCaseSensitive() {
if (platform === "win32" || platform === "win64") {
return false;
@@ -2182,10 +2200,10 @@ var ts;
if (entry === "." || entry === "..") {
continue;
}
- var name_3 = ts.combinePaths(path, entry);
+ var name = ts.combinePaths(path, entry);
var stat = void 0;
try {
- stat = _fs.statSync(name_3);
+ stat = _fs.statSync(name);
}
catch (e) {
continue;
@@ -2262,7 +2280,7 @@ var ts;
if (!directoryExists(directoryName)) {
return noOpFileWatcher;
}
- if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
+ if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
options = { persistent: true, recursive: !!recursive };
}
else {
@@ -2272,7 +2290,6 @@ var ts;
if (eventName === "rename") {
callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
}
- ;
});
},
resolvePath: function (path) {
@@ -2389,9 +2406,6 @@ var ts;
if (typeof ChakraHost !== "undefined") {
sys = getChakraSystem();
}
- else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
- sys = getWScriptSystem();
- }
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
sys = getNodeSystem();
}
@@ -2460,11 +2474,11 @@ var ts;
Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
- Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
- Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
- Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
+ The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", message: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member." },
+ A_promise_must_have_a_then_method: { code: 1059, category: ts.DiagnosticCategory.Error, key: "A_promise_must_have_a_then_method_1059", message: "A promise must have a 'then' method." },
+ The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: { code: 1060, category: ts.DiagnosticCategory.Error, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", message: "The first parameter of the 'then' method of a promise must be a callback." },
Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
- _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
+ Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
@@ -2473,7 +2487,7 @@ var ts;
_0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
- Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." },
+ Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
_0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
@@ -2489,6 +2503,7 @@ var ts;
Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
+ A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: { code: 1103, category: ts.DiagnosticCategory.Error, key: "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", message: "A 'for-await-of' statement is only allowed within an async function or async generator." },
A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
@@ -2496,7 +2511,7 @@ var ts;
Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
- Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
+ Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'." },
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
@@ -2528,9 +2543,9 @@ var ts;
Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
- File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
+ File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing." },
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
- const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
+ const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized." },
const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
@@ -2579,11 +2594,12 @@ var ts;
Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
- A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
- Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
+ A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name." },
+ Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
+ Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
@@ -2629,6 +2645,11 @@ var ts;
Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
+ An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
+ A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
+ Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1320, category: ts.DiagnosticCategory.Error, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", message: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1321, category: ts.DiagnosticCategory.Error, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", message: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member." },
+ Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: { code: 1322, category: ts.DiagnosticCategory.Error, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", message: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member." },
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
@@ -2672,6 +2693,7 @@ var ts;
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
+ This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
@@ -2682,19 +2704,20 @@ var ts;
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
+ This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
- The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
+ The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter." },
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
- Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
+ Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'." },
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
@@ -2734,12 +2757,12 @@ var ts;
The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
- Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
+ Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class." },
The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
- Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
+ Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'." },
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
@@ -2748,19 +2771,19 @@ var ts;
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
- Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
+ Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'." },
All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
- Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
+ Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'." },
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
- A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
- A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
+ A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged." },
+ A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged." },
Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
- Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
- Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
+ Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name." },
+ Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'." },
Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
- Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
+ Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'." },
Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
@@ -2769,18 +2792,20 @@ var ts;
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
+ Class_0_used_before_its_declaration: { code: 2449, category: ts.DiagnosticCategory.Error, key: "Class_0_used_before_its_declaration_2449", message: "Class '{0}' used before its declaration." },
+ Enum_0_used_before_its_declaration: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Enum_0_used_before_its_declaration_2450", message: "Enum '{0}' used before its declaration." },
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
- Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
+ Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'." },
An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
- A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
+ A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern." },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
@@ -2801,13 +2826,13 @@ var ts;
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
- Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
+ Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'." },
The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
- Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
+ Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause." },
Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
@@ -2819,6 +2844,7 @@ var ts;
A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
+ Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: { code: 2504, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", message: "Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator." },
A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
@@ -2833,6 +2859,7 @@ var ts;
All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
+ An_async_iterator_must_have_a_next_method: { code: 2519, category: ts.DiagnosticCategory.Error, key: "An_async_iterator_must_have_a_next_method_2519", message: "An async iterator must have a 'next()' method." },
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
@@ -2856,23 +2883,33 @@ var ts;
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
+ Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
+ Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
+ A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
+ Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
+ The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: { code: 2547, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", message: "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property." },
+ Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2548, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", message: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2549, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", message: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator." },
+ Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: { code: 2550, category: ts.DiagnosticCategory.Error, key: "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", message: "Generic type instantiation is excessively deep and possibly infinite." },
JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
- Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
+ Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'." },
JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
- JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
- The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
- Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
+ JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property." },
+ The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property." },
+ JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
+ Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
+ Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React." },
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
- JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
- Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
+ JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element." },
+ Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'." },
super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
@@ -2904,7 +2941,6 @@ var ts;
All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
- A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
_0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
@@ -2913,9 +2949,17 @@ var ts;
The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
+ Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
+ The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference." },
+ The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property." },
+ An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
+ Required_type_parameters_may_not_follow_optional_type_parameters: { code: 2706, category: ts.DiagnosticCategory.Error, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", message: "Required type parameters may not follow optional type parameters." },
+ Generic_type_0_requires_between_1_and_2_type_arguments: { code: 2707, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", message: "Generic type '{0}' requires between {1} and {2} type arguments." },
+ Cannot_use_namespace_0_as_a_value: { code: 2708, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_value_2708", message: "Cannot use namespace '{0}' as a value." },
+ Cannot_use_namespace_0_as_a_type: { code: 2709, category: ts.DiagnosticCategory.Error, key: "Cannot_use_namespace_0_as_a_type_2709", message: "Cannot use namespace '{0}' as a type." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@@ -2926,8 +2970,8 @@ var ts;
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
- Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
+ extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
@@ -2988,16 +3032,18 @@ var ts;
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
+ Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
+ extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
- Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
- Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
+ Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}." },
Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
- Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
+ Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}." },
Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
@@ -3006,12 +3052,12 @@ var ts;
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
- Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
- The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
+ Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'." },
+ The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'." },
Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
- Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
- Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
+ Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character." },
+ Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character." },
Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
@@ -3029,11 +3075,11 @@ var ts;
Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
- Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" },
- Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
+ Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'." },
Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
- Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_in_the_given_directory_6020", message: "Compile the project in the given directory." },
+ Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'." },
Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
@@ -3048,11 +3094,12 @@ var ts;
LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
+ FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
- Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
+ Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}." },
Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
@@ -3074,17 +3121,18 @@ var ts;
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
- Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
+ Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context (experimental)." },
Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
- Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" },
+ Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'." },
+ File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
- Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
+ Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", message: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit" },
Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
@@ -3095,23 +3143,23 @@ var ts;
Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
- Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." },
+ Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
- Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." },
+ Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
- package_json_does_not_have_a_types_or_main_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_types_or_main_field_6100", message: "'package.json' does not have a 'types' or 'main' field." },
+ package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
- baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
- rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
- Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
- Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
- Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
- Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
+ baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'." },
+ rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'." },
+ Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'." },
+ Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'." },
+ Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'." },
+ Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed." },
Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
@@ -3121,32 +3169,67 @@ var ts;
Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
- Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
+ Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'." },
Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
- Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
+ Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'." },
Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
- Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
+ Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'." },
Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
- File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
+ File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it." },
_0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
- The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
- No_types_specified_in_package_json_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json', so returning 'main' value of '{0}'" },
+ The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files." },
Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
- Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
+ Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file." },
Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
+ Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
+ Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
+ Show_diagnostic_information: { code: 6149, category: ts.DiagnosticCategory.Message, key: "Show_diagnostic_information_6149", message: "Show diagnostic information." },
+ Show_verbose_diagnostic_information: { code: 6150, category: ts.DiagnosticCategory.Message, key: "Show_verbose_diagnostic_information_6150", message: "Show verbose diagnostic information." },
+ Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: { code: 6151, category: ts.DiagnosticCategory.Message, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", message: "Emit a single file with source maps instead of having a separate file." },
+ Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: { code: 6152, category: ts.DiagnosticCategory.Message, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", message: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set." },
+ Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: { code: 6153, category: ts.DiagnosticCategory.Message, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", message: "Transpile each file as a separate module (similar to 'ts.transpileModule')." },
+ Print_names_of_generated_files_part_of_the_compilation: { code: 6154, category: ts.DiagnosticCategory.Message, key: "Print_names_of_generated_files_part_of_the_compilation_6154", message: "Print names of generated files part of the compilation." },
+ Print_names_of_files_part_of_the_compilation: { code: 6155, category: ts.DiagnosticCategory.Message, key: "Print_names_of_files_part_of_the_compilation_6155", message: "Print names of files part of the compilation." },
+ The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: { code: 6156, category: ts.DiagnosticCategory.Message, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", message: "The locale used when displaying messages to the user (e.g. 'en-us')" },
+ Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: { code: 6157, category: ts.DiagnosticCategory.Message, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", message: "Do not generate custom helper functions like '__extends' in compiled output." },
+ Do_not_include_the_default_library_file_lib_d_ts: { code: 6158, category: ts.DiagnosticCategory.Message, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", message: "Do not include the default library file (lib.d.ts)." },
+ Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: { code: 6159, category: ts.DiagnosticCategory.Message, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", message: "Do not add triple-slash references or imported modules to the list of compiled files." },
+ Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: { code: 6160, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", message: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files." },
+ List_of_folders_to_include_type_definitions_from: { code: 6161, category: ts.DiagnosticCategory.Message, key: "List_of_folders_to_include_type_definitions_from_6161", message: "List of folders to include type definitions from." },
+ Disable_size_limitations_on_JavaScript_projects: { code: 6162, category: ts.DiagnosticCategory.Message, key: "Disable_size_limitations_on_JavaScript_projects_6162", message: "Disable size limitations on JavaScript projects." },
+ The_character_set_of_the_input_files: { code: 6163, category: ts.DiagnosticCategory.Message, key: "The_character_set_of_the_input_files_6163", message: "The character set of the input files." },
+ Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: { code: 6164, category: ts.DiagnosticCategory.Message, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", message: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files." },
+ Do_not_truncate_error_messages: { code: 6165, category: ts.DiagnosticCategory.Message, key: "Do_not_truncate_error_messages_6165", message: "Do not truncate error messages." },
+ Output_directory_for_generated_declaration_files: { code: 6166, category: ts.DiagnosticCategory.Message, key: "Output_directory_for_generated_declaration_files_6166", message: "Output directory for generated declaration files." },
+ A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: { code: 6167, category: ts.DiagnosticCategory.Message, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", message: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'." },
+ List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: { code: 6168, category: ts.DiagnosticCategory.Message, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", message: "List of root folders whose combined content represents the structure of the project at runtime." },
+ Show_all_compiler_options: { code: 6169, category: ts.DiagnosticCategory.Message, key: "Show_all_compiler_options_6169", message: "Show all compiler options." },
+ Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: { code: 6170, category: ts.DiagnosticCategory.Message, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", message: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file" },
+ Command_line_Options: { code: 6171, category: ts.DiagnosticCategory.Message, key: "Command_line_Options_6171", message: "Command-line Options" },
+ Basic_Options: { code: 6172, category: ts.DiagnosticCategory.Message, key: "Basic_Options_6172", message: "Basic Options" },
+ Strict_Type_Checking_Options: { code: 6173, category: ts.DiagnosticCategory.Message, key: "Strict_Type_Checking_Options_6173", message: "Strict Type-Checking Options" },
+ Module_Resolution_Options: { code: 6174, category: ts.DiagnosticCategory.Message, key: "Module_Resolution_Options_6174", message: "Module Resolution Options" },
+ Source_Map_Options: { code: 6175, category: ts.DiagnosticCategory.Message, key: "Source_Map_Options_6175", message: "Source Map Options" },
+ Additional_Checks: { code: 6176, category: ts.DiagnosticCategory.Message, key: "Additional_Checks_6176", message: "Additional Checks" },
+ Experimental_Options: { code: 6177, category: ts.DiagnosticCategory.Message, key: "Experimental_Options_6177", message: "Experimental Options" },
+ Advanced_Options: { code: 6178, category: ts.DiagnosticCategory.Message, key: "Advanced_Options_6178", message: "Advanced Options" },
+ Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: { code: 6179, category: ts.DiagnosticCategory.Message, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", message: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'." },
+ Enable_all_strict_type_checking_options: { code: 6180, category: ts.DiagnosticCategory.Message, key: "Enable_all_strict_type_checking_options_6180", message: "Enable all strict type-checking options." },
+ List_of_language_service_plugins: { code: 6181, category: ts.DiagnosticCategory.Message, key: "List_of_language_service_plugins_6181", message: "List of language service plugins." },
+ Scoped_package_detected_looking_in_0: { code: 6182, category: ts.DiagnosticCategory.Message, key: "Scoped_package_detected_looking_in_0_6182", message: "Scoped package detected, looking in '{0}'" },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
@@ -3164,7 +3247,7 @@ var ts;
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
- JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
+ JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists." },
Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
@@ -3188,7 +3271,7 @@ var ts;
parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
- Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
+ Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
@@ -3196,28 +3279,40 @@ var ts;
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
- A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
+ A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'." },
An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
+ super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
+ _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" },
+ Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
- Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'" },
- Remove_unused_identifiers: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_unused_identifiers_90004", message: "Remove unused identifiers" },
- Implement_interface_on_reference: { code: 90005, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_reference_90005", message: "Implement interface on reference" },
- Implement_interface_on_class: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_on_class_90006", message: "Implement interface on class" },
- Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
- Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
+ Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
+ Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: '{0}'." },
+ Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
+ Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
+ Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
+ Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig." },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
- Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
- Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
- Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
+ Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}." },
+ Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}." },
+ Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
+ Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
+ Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'." },
+ Disable_checking_for_this_file: { code: 90018, category: ts.DiagnosticCategory.Message, key: "Disable_checking_for_this_file_90018", message: "Disable checking for this file." },
+ Ignore_this_error_message: { code: 90019, category: ts.DiagnosticCategory.Message, key: "Ignore_this_error_message_90019", message: "Ignore this error message." },
+ Initialize_property_0_in_the_constructor: { code: 90020, category: ts.DiagnosticCategory.Message, key: "Initialize_property_0_in_the_constructor_90020", message: "Initialize property '{0}' in the constructor." },
+ Initialize_static_property_0: { code: 90021, category: ts.DiagnosticCategory.Message, key: "Initialize_static_property_0_90021", message: "Initialize static property '{0}'." },
+ Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
+ Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
+ Report_errors_in_js_files: { code: 8019, category: ts.DiagnosticCategory.Message, key: "Report_errors_in_js_files_8019", message: "Report errors in .js files." },
};
})(ts || (ts = {}));
var ts;
@@ -3226,7 +3321,7 @@ var ts;
return token >= 70;
}
ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
- var textToToken = ts.createMap({
+ var textToToken = ts.createMapFromTemplate({
"abstract": 116,
"any": 118,
"as": 117,
@@ -3250,7 +3345,7 @@ var ts;
"false": 85,
"finally": 86,
"for": 87,
- "from": 138,
+ "from": 139,
"function": 88,
"get": 124,
"if": 89,
@@ -3268,27 +3363,28 @@ var ts;
"new": 93,
"null": 94,
"number": 132,
+ "object": 133,
"package": 110,
"private": 111,
"protected": 112,
"public": 113,
"readonly": 130,
"require": 131,
- "global": 139,
+ "global": 140,
"return": 95,
- "set": 133,
+ "set": 134,
"static": 114,
- "string": 134,
+ "string": 135,
"super": 96,
"switch": 97,
- "symbol": 135,
+ "symbol": 136,
"this": 98,
"throw": 99,
"true": 100,
"try": 101,
- "type": 136,
+ "type": 137,
"typeof": 102,
- "undefined": 137,
+ "undefined": 138,
"var": 103,
"void": 104,
"while": 105,
@@ -3296,7 +3392,7 @@ var ts;
"yield": 115,
"async": 119,
"await": 120,
- "of": 140,
+ "of": 141,
"{": 16,
"}": 17,
"(": 18,
@@ -3391,9 +3487,9 @@ var ts;
}
function makeReverseMap(source) {
var result = [];
- for (var name_4 in source) {
- result[source[name_4]] = name_4;
- }
+ source.forEach(function (value, name) {
+ result[value] = name;
+ });
return result;
}
var tokenStrings = makeReverseMap(textToToken);
@@ -3402,7 +3498,7 @@ var ts;
}
ts.tokenToString = tokenToString;
function stringToToken(s) {
- return textToToken[s];
+ return textToToken.get(s);
}
ts.stringToToken = stringToToken;
function computeLineStarts(text) {
@@ -3462,7 +3558,6 @@ var ts;
return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
}
ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
function isWhiteSpace(ch) {
return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
}
@@ -3598,7 +3693,7 @@ var ts;
if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
var ch = text.charCodeAt(pos);
if ((pos + mergeConflictMarkerLength) < text.length) {
- for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
+ for (var i = 0; i < mergeConflictMarkerLength; i++) {
if (text.charCodeAt(pos + i) !== ch) {
return false;
}
@@ -3751,7 +3846,7 @@ var ts;
if (!comments) {
comments = [];
}
- comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
+ comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
return comments;
}
function getLeadingCommentRanges(text, pos) {
@@ -3784,7 +3879,7 @@ var ts;
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
return false;
}
- for (var i = 1, n = name.length; i < n; i++) {
+ for (var i = 1; i < name.length; i++) {
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
return false;
}
@@ -3803,6 +3898,7 @@ var ts;
var precedingLineBreak;
var hasExtendedUnicodeEscape;
var tokenIsUnterminated;
+ var numericLiteralFlags;
setText(text, start, length);
return {
getStartPos: function () { return startPos; },
@@ -3816,6 +3912,7 @@ var ts;
isIdentifier: function () { return token === 70 || token > 106; },
isReservedWord: function () { return token >= 71 && token <= 106; },
isUnterminated: function () { return tokenIsUnterminated; },
+ getNumericLiteralFlags: function () { return numericLiteralFlags; },
reScanGreaterToken: reScanGreaterToken,
reScanSlashToken: reScanSlashToken,
reScanTemplateToken: reScanTemplateToken,
@@ -3852,6 +3949,7 @@ var ts;
var end = pos;
if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
pos++;
+ numericLiteralFlags = 2;
if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
pos++;
if (isDigit(text.charCodeAt(pos))) {
@@ -4121,8 +4219,11 @@ var ts;
var len = tokenValue.length;
if (len >= 2 && len <= 11) {
var ch = tokenValue.charCodeAt(0);
- if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) {
- return token = textToToken[tokenValue];
+ if (ch >= 97 && ch <= 122) {
+ token = textToToken.get(tokenValue);
+ if (token !== undefined) {
+ return token;
+ }
}
}
return token = 70;
@@ -4151,6 +4252,7 @@ var ts;
hasExtendedUnicodeEscape = false;
precedingLineBreak = false;
tokenIsUnterminated = false;
+ numericLiteralFlags = 0;
while (true) {
tokenPos = pos;
if (pos >= end) {
@@ -4332,6 +4434,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 8;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
@@ -4342,6 +4445,7 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 16;
return token = 8;
}
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
@@ -4352,10 +4456,12 @@ var ts;
value = 0;
}
tokenValue = "" + value;
+ numericLiteralFlags = 32;
return token = 8;
}
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
+ numericLiteralFlags = 4;
return token = 8;
}
case 49:
@@ -4602,7 +4708,14 @@ var ts;
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
- if ((char === 123) || (char === 60)) {
+ if (char === 123) {
+ break;
+ }
+ if (char === 60) {
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ return token = 7;
+ }
break;
}
}
@@ -4777,39 +4890,11 @@ var ts;
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
ts.optionDeclarations = [
{
- name: "charset",
- type: "string",
- },
- ts.compileOnSaveCommandLineOption,
- {
- name: "declaration",
- shortName: "d",
- type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_d_ts_file,
- },
- {
- name: "declarationDir",
- type: "string",
- isFilePath: true,
- paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "diagnostics",
- type: "boolean",
- },
- {
- name: "extendedDiagnostics",
- type: "boolean",
- experimental: true
- },
- {
- name: "emitBOM",
- type: "boolean"
- },
- {
name: "help",
shortName: "h",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
description: ts.Diagnostics.Print_this_message,
},
{
@@ -4818,56 +4903,73 @@ var ts;
type: "boolean"
},
{
- name: "init",
+ name: "all",
type: "boolean",
- description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Show_all_compiler_options,
},
{
- name: "inlineSourceMap",
+ name: "version",
+ shortName: "v",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Print_the_compiler_s_version,
},
{
- name: "inlineSources",
+ name: "init",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
},
{
- name: "jsx",
- type: ts.createMap({
- "preserve": 1,
- "react": 2
- }),
- paramType: ts.Diagnostics.KIND,
- description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
- },
- {
- name: "reactNamespace",
- type: "string",
- description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
- },
- {
- name: "jsxFactory",
+ name: "project",
+ shortName: "p",
type: "string",
- description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ isFilePath: true,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
+ description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
},
{
- name: "listFiles",
+ name: "pretty",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
- name: "locale",
- type: "string",
+ name: "watch",
+ shortName: "w",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Command_line_Options,
+ description: ts.Diagnostics.Watch_input_files,
},
{
- name: "mapRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
- paramType: ts.Diagnostics.LOCATION,
+ name: "target",
+ shortName: "t",
+ type: ts.createMapFromTemplate({
+ "es3": 0,
+ "es5": 1,
+ "es6": 2,
+ "es2015": 2,
+ "es2016": 3,
+ "es2017": 4,
+ "esnext": 5,
+ }),
+ paramType: ts.Diagnostics.VERSION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
},
{
name: "module",
shortName: "m",
- type: ts.createMap({
+ type: ts.createMapFromTemplate({
"none": ts.ModuleKind.None,
"commonjs": ts.ModuleKind.CommonJS,
"amd": ts.ModuleKind.AMD,
@@ -4876,238 +4978,232 @@ var ts;
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
}),
- description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
},
{
- name: "newLine",
- type: ts.createMap({
- "crlf": 0,
- "lf": 1
- }),
- description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
- paramType: ts.Diagnostics.NEWLINE,
- },
- {
- name: "noEmit",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs,
- },
- {
- name: "noEmitHelpers",
- type: "boolean"
- },
- {
- name: "noEmitOnError",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
- },
- {
- name: "noErrorTruncation",
- type: "boolean"
- },
- {
- name: "noImplicitAny",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
- },
- {
- name: "noImplicitThis",
- type: "boolean",
- description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
- },
- {
- name: "noUnusedLocals",
- type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_locals,
+ name: "lib",
+ type: "list",
+ element: {
+ name: "lib",
+ type: ts.createMapFromTemplate({
+ "es5": "lib.es5.d.ts",
+ "es6": "lib.es2015.d.ts",
+ "es2015": "lib.es2015.d.ts",
+ "es7": "lib.es2016.d.ts",
+ "es2016": "lib.es2016.d.ts",
+ "es2017": "lib.es2017.d.ts",
+ "esnext": "lib.esnext.d.ts",
+ "dom": "lib.dom.d.ts",
+ "dom.iterable": "lib.dom.iterable.d.ts",
+ "webworker": "lib.webworker.d.ts",
+ "scripthost": "lib.scripthost.d.ts",
+ "es2015.core": "lib.es2015.core.d.ts",
+ "es2015.collection": "lib.es2015.collection.d.ts",
+ "es2015.generator": "lib.es2015.generator.d.ts",
+ "es2015.iterable": "lib.es2015.iterable.d.ts",
+ "es2015.promise": "lib.es2015.promise.d.ts",
+ "es2015.proxy": "lib.es2015.proxy.d.ts",
+ "es2015.reflect": "lib.es2015.reflect.d.ts",
+ "es2015.symbol": "lib.es2015.symbol.d.ts",
+ "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
+ "es2016.array.include": "lib.es2016.array.include.d.ts",
+ "es2017.object": "lib.es2017.object.d.ts",
+ "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
+ "es2017.string": "lib.es2017.string.d.ts",
+ "esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
+ }),
+ },
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
},
{
- name: "noUnusedParameters",
+ name: "allowJs",
type: "boolean",
- description: ts.Diagnostics.Report_errors_on_unused_parameters,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
},
{
- name: "noLib",
+ name: "checkJs",
type: "boolean",
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Report_errors_in_js_files
},
{
- name: "noResolve",
- type: "boolean",
+ name: "jsx",
+ type: ts.createMapFromTemplate({
+ "preserve": 1,
+ "react-native": 3,
+ "react": 2
+ }),
+ paramType: ts.Diagnostics.KIND,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
},
{
- name: "skipDefaultLibCheck",
+ name: "declaration",
+ shortName: "d",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_d_ts_file,
},
{
- name: "skipLibCheck",
+ name: "sourceMap",
type: "boolean",
- description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
- },
- {
- name: "out",
- type: "string",
- isFilePath: false,
- paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Generates_corresponding_map_file,
},
{
name: "outFile",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
paramType: ts.Diagnostics.FILE,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
},
{
name: "outDir",
type: "string",
isFilePath: true,
- description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
paramType: ts.Diagnostics.DIRECTORY,
- },
- {
- name: "preserveConstEnums",
- type: "boolean",
- description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
- },
- {
- name: "pretty",
- description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
- type: "boolean"
- },
- {
- name: "project",
- shortName: "p",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
- paramType: ts.Diagnostics.DIRECTORY
- },
- {
- name: "removeComments",
- type: "boolean",
- description: ts.Diagnostics.Do_not_emit_comments_to_output,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Basic_Options,
description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
},
{
- name: "isolatedModules",
+ name: "removeComments",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_comments_to_output,
},
{
- name: "sourceMap",
+ name: "noEmit",
type: "boolean",
- description: ts.Diagnostics.Generates_corresponding_map_file,
- },
- {
- name: "sourceRoot",
- type: "string",
- isFilePath: true,
- description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
- paramType: ts.Diagnostics.LOCATION,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs,
},
{
- name: "suppressExcessPropertyErrors",
+ name: "importHelpers",
type: "boolean",
- description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Import_emit_helpers_from_tslib
},
{
- name: "suppressImplicitAnyIndexErrors",
+ name: "downlevelIteration",
type: "boolean",
- description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
},
{
- name: "stripInternal",
+ name: "isolatedModules",
type: "boolean",
- description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
- experimental: true
+ category: ts.Diagnostics.Basic_Options,
+ description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
},
{
- name: "target",
- shortName: "t",
- type: ts.createMap({
- "es3": 0,
- "es5": 1,
- "es6": 2,
- "es2015": 2,
- "es2016": 3,
- "es2017": 4,
- "esnext": 5,
- }),
- description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015,
- paramType: ts.Diagnostics.VERSION,
+ name: "strict",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_all_strict_type_checking_options
},
{
- name: "version",
- shortName: "v",
+ name: "noImplicitAny",
type: "boolean",
- description: ts.Diagnostics.Print_the_compiler_s_version,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
},
{
- name: "watch",
- shortName: "w",
+ name: "strictNullChecks",
type: "boolean",
- description: ts.Diagnostics.Watch_input_files,
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Enable_strict_null_checks
},
{
- name: "experimentalDecorators",
+ name: "noImplicitThis",
type: "boolean",
- description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
},
{
- name: "emitDecoratorMetadata",
+ name: "alwaysStrict",
type: "boolean",
- experimental: true,
- description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Strict_Type_Checking_Options,
+ description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
},
{
- name: "moduleResolution",
- type: ts.createMap({
- "node": ts.ModuleResolutionKind.NodeJs,
- "classic": ts.ModuleResolutionKind.Classic,
- }),
- description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
- paramType: ts.Diagnostics.STRATEGY,
+ name: "noUnusedLocals",
+ type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_locals,
},
{
- name: "allowUnusedLabels",
+ name: "noUnusedParameters",
type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
+ description: ts.Diagnostics.Report_errors_on_unused_parameters,
},
{
name: "noImplicitReturns",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
},
{
name: "noFallthroughCasesInSwitch",
type: "boolean",
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Additional_Checks,
description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
},
{
- name: "allowUnreachableCode",
- type: "boolean",
- description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
- },
- {
- name: "forceConsistentCasingInFileNames",
- type: "boolean",
- description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ name: "moduleResolution",
+ type: ts.createMapFromTemplate({
+ "node": ts.ModuleResolutionKind.NodeJs,
+ "classic": ts.ModuleResolutionKind.Classic,
+ }),
+ paramType: ts.Diagnostics.STRATEGY,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
},
{
name: "baseUrl",
type: "string",
isFilePath: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
},
{
name: "paths",
type: "object",
- isTSConfigOnly: true
+ isTSConfigOnly: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
},
{
name: "rootDirs",
@@ -5117,7 +5213,9 @@ var ts;
name: "rootDirs",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
},
{
name: "typeRoots",
@@ -5126,7 +5224,9 @@ var ts;
name: "typeRoots",
type: "string",
isFilePath: true
- }
+ },
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
},
{
name: "types",
@@ -5135,88 +5235,253 @@ var ts;
name: "types",
type: "string"
},
+ showInSimplifiedHelpView: true,
+ category: ts.Diagnostics.Module_Resolution_Options,
description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
},
{
+ name: "allowSyntheticDefaultImports",
+ type: "boolean",
+ category: ts.Diagnostics.Module_Resolution_Options,
+ description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ },
+ {
+ name: "sourceRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+ },
+ {
+ name: "mapRoot",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.LOCATION,
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
+ },
+ {
+ name: "inlineSourceMap",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+ },
+ {
+ name: "inlineSources",
+ type: "boolean",
+ category: ts.Diagnostics.Source_Map_Options,
+ description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+ },
+ {
+ name: "experimentalDecorators",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+ },
+ {
+ name: "emitDecoratorMetadata",
+ type: "boolean",
+ category: ts.Diagnostics.Experimental_Options,
+ description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+ },
+ {
+ name: "jsxFactory",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+ },
+ {
+ name: "diagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_diagnostic_information
+ },
+ {
+ name: "extendedDiagnostics",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Show_verbose_diagnostic_information
+ },
+ {
name: "traceResolution",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
},
{
- name: "allowJs",
+ name: "listFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
},
{
- name: "allowSyntheticDefaultImports",
+ name: "listEmittedFiles",
type: "boolean",
- description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+ },
+ {
+ name: "out",
+ type: "string",
+ isFilePath: false,
+ category: ts.Diagnostics.Advanced_Options,
+ paramType: ts.Diagnostics.FILE,
+ description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
+ },
+ {
+ name: "reactNamespace",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+ },
+ {
+ name: "skipDefaultLibCheck",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+ },
+ {
+ name: "charset",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_character_set_of_the_input_files
+ },
+ {
+ name: "emitBOM",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+ },
+ {
+ name: "locale",
+ type: "string",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+ },
+ {
+ name: "newLine",
+ type: ts.createMapFromTemplate({
+ "crlf": 0,
+ "lf": 1
+ }),
+ paramType: ts.Diagnostics.NEWLINE,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+ },
+ {
+ name: "noErrorTruncation",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_truncate_error_messages
+ },
+ {
+ name: "noLib",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts
+ },
+ {
+ name: "noResolve",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
+ },
+ {
+ name: "stripInternal",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+ },
+ {
+ name: "disableSizeLimit",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
},
{
name: "noImplicitUseStrict",
type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
},
{
- name: "maxNodeModuleJsDepth",
- type: "number",
- description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ name: "noEmitHelpers",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
},
{
- name: "listEmittedFiles",
- type: "boolean"
+ name: "noEmitOnError",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
},
{
- name: "lib",
- type: "list",
- element: {
- name: "lib",
- type: ts.createMap({
- "es5": "lib.es5.d.ts",
- "es6": "lib.es2015.d.ts",
- "es2015": "lib.es2015.d.ts",
- "es7": "lib.es2016.d.ts",
- "es2016": "lib.es2016.d.ts",
- "es2017": "lib.es2017.d.ts",
- "dom": "lib.dom.d.ts",
- "dom.iterable": "lib.dom.iterable.d.ts",
- "webworker": "lib.webworker.d.ts",
- "scripthost": "lib.scripthost.d.ts",
- "es2015.core": "lib.es2015.core.d.ts",
- "es2015.collection": "lib.es2015.collection.d.ts",
- "es2015.generator": "lib.es2015.generator.d.ts",
- "es2015.iterable": "lib.es2015.iterable.d.ts",
- "es2015.promise": "lib.es2015.promise.d.ts",
- "es2015.proxy": "lib.es2015.proxy.d.ts",
- "es2015.reflect": "lib.es2015.reflect.d.ts",
- "es2015.symbol": "lib.es2015.symbol.d.ts",
- "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
- "es2016.array.include": "lib.es2016.array.include.d.ts",
- "es2017.object": "lib.es2017.object.d.ts",
- "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
- "es2017.string": "lib.es2017.string.d.ts",
- }),
- },
- description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
+ name: "preserveConstEnums",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
},
{
- name: "disableSizeLimit",
- type: "boolean"
+ name: "declarationDir",
+ type: "string",
+ isFilePath: true,
+ paramType: ts.Diagnostics.DIRECTORY,
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Output_directory_for_generated_declaration_files
},
{
- name: "strictNullChecks",
+ name: "skipLibCheck",
type: "boolean",
- description: ts.Diagnostics.Enable_strict_null_checks
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
},
{
- name: "importHelpers",
+ name: "allowUnusedLabels",
type: "boolean",
- description: ts.Diagnostics.Import_emit_helpers_from_tslib
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
},
{
- name: "alwaysStrict",
+ name: "allowUnreachableCode",
type: "boolean",
- description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+ },
+ {
+ name: "suppressExcessPropertyErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+ },
+ {
+ name: "suppressImplicitAnyIndexErrors",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+ },
+ {
+ name: "forceConsistentCasingInFileNames",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+ },
+ {
+ name: "maxNodeModuleJsDepth",
+ type: "number",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+ },
+ {
+ name: "plugins",
+ type: "list",
+ isTSConfigOnly: true,
+ element: {
+ name: "plugin",
+ type: "object"
+ },
+ description: ts.Diagnostics.List_of_language_service_plugins
}
];
ts.typeAcquisitionDeclarations = [
@@ -5248,8 +5513,7 @@ var ts;
ts.defaultInitCompilerOptions = {
module: ts.ModuleKind.CommonJS,
target: 1,
- noImplicitAny: false,
- sourceMap: false,
+ strict: true
};
var optionNameMapCache;
function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
@@ -5271,9 +5535,9 @@ var ts;
var optionNameMap = ts.createMap();
var shortOptionNames = ts.createMap();
ts.forEach(ts.optionDeclarations, function (option) {
- optionNameMap[option.name.toLowerCase()] = option;
+ optionNameMap.set(option.name.toLowerCase(), option);
if (option.shortName) {
- shortOptionNames[option.shortName] = option.name;
+ shortOptionNames.set(option.shortName, option.name);
}
});
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
@@ -5281,19 +5545,12 @@ var ts;
}
ts.getOptionNameMap = getOptionNameMap;
function createCompilerDiagnosticForInvalidCustomType(opt) {
- var namesOfType = Object.keys(opt.type).map(function (key) { return "'" + key + "'"; }).join(", ");
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
}
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
function parseCustomTypeOption(opt, value, errors) {
- var key = trimString((value || "")).toLowerCase();
- var map = opt.type;
- if (key in map) {
- return map[key];
- }
- else {
- errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
- }
+ return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
}
ts.parseCustomTypeOption = parseCustomTypeOption;
function parseListTypeOption(opt, value, errors) {
@@ -5337,11 +5594,12 @@ var ts;
}
else if (s.charCodeAt(0) === 45) {
s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
- if (s in shortOptionNames) {
- s = shortOptionNames[s];
+ var short = shortOptionNames.get(s);
+ if (short !== undefined) {
+ s = short;
}
- if (s in optionNameMap) {
- var opt = optionNameMap[s];
+ var opt = optionNameMap.get(s);
+ if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
}
@@ -5446,7 +5704,7 @@ var ts;
}
}
ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
- function generateTSConfig(options, fileNames) {
+ function generateTSConfig(options, fileNames, newLine) {
var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
var configurations = {
compilerOptions: serializeCompilerOptions(compilerOptions)
@@ -5454,7 +5712,7 @@ var ts;
if (fileNames && fileNames.length) {
configurations.files = fileNames;
}
- return configurations;
+ return writeConfigurations();
function getCustomTypeMapOfCommandLineOption(optionDefinition) {
if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
return undefined;
@@ -5467,53 +5725,121 @@ var ts;
}
}
function getNameOfCompilerOptionValue(value, customTypeMap) {
- for (var key in customTypeMap) {
- if (customTypeMap[key] === value) {
+ return ts.forEachEntry(customTypeMap, function (mapValue, key) {
+ if (mapValue === value) {
return key;
}
- }
- return undefined;
+ });
}
function serializeCompilerOptions(options) {
- var result = ts.createMap();
+ var result = {};
var optionsNameMap = getOptionNameMap().optionNameMap;
- for (var name_5 in options) {
- if (ts.hasProperty(options, name_5)) {
- switch (name_5) {
- case "init":
- case "watch":
- case "version":
- case "help":
- case "project":
- break;
- default:
- var value = options[name_5];
- var optionDefinition = optionsNameMap[name_5.toLowerCase()];
- if (optionDefinition) {
- var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
- if (!customTypeMap) {
- result[name_5] = value;
- }
- else {
- if (optionDefinition.type === "list") {
- var convertedValue = [];
- for (var _i = 0, _a = value; _i < _a.length; _i++) {
- var element = _a[_i];
- convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
- }
- result[name_5] = convertedValue;
- }
- else {
- result[name_5] = getNameOfCompilerOptionValue(value, customTypeMap);
- }
+ for (var name in options) {
+ if (ts.hasProperty(options, name)) {
+ if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+ continue;
+ }
+ var value = options[name];
+ var optionDefinition = optionsNameMap.get(name.toLowerCase());
+ if (optionDefinition) {
+ var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
+ if (!customTypeMap) {
+ result[name] = value;
+ }
+ else {
+ if (optionDefinition.type === "list") {
+ var convertedValue = [];
+ for (var _i = 0, _a = value; _i < _a.length; _i++) {
+ var element = _a[_i];
+ convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
}
+ result[name] = convertedValue;
}
- break;
+ else {
+ result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
+ }
+ }
}
}
}
return result;
}
+ function getDefaultValueForOption(option) {
+ switch (option.type) {
+ case "number":
+ return 1;
+ case "boolean":
+ return true;
+ case "string":
+ return option.isFilePath ? "./" : "";
+ case "list":
+ return [];
+ case "object":
+ return {};
+ default:
+ return ts.arrayFrom(option.type.keys())[0];
+ }
+ }
+ function makePadding(paddingLength) {
+ return Array(paddingLength + 1).join(" ");
+ }
+ function writeConfigurations() {
+ var categorizedOptions = ts.reduceLeft(ts.filter(ts.optionDeclarations, function (o) { return o.category !== ts.Diagnostics.Command_line_Options && o.category !== ts.Diagnostics.Advanced_Options; }), function (memo, value) {
+ if (value.category) {
+ var name = ts.getLocaleSpecificMessage(value.category);
+ (memo[name] || (memo[name] = [])).push(value);
+ }
+ return memo;
+ }, {});
+ var marginLength = 0;
+ var seenKnownKeys = 0;
+ var nameColumn = [];
+ var descriptionColumn = [];
+ var knownKeysCount = ts.getOwnKeys(configurations.compilerOptions).length;
+ for (var category in categorizedOptions) {
+ if (nameColumn.length !== 0) {
+ nameColumn.push("");
+ descriptionColumn.push("");
+ }
+ nameColumn.push("/* " + category + " */");
+ descriptionColumn.push("");
+ for (var _i = 0, _a = categorizedOptions[category]; _i < _a.length; _i++) {
+ var option = _a[_i];
+ var optionName = void 0;
+ if (ts.hasProperty(configurations.compilerOptions, option.name)) {
+ optionName = "\"" + option.name + "\": " + JSON.stringify(configurations.compilerOptions[option.name]) + ((seenKnownKeys += 1) === knownKeysCount ? "" : ",");
+ }
+ else {
+ optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+ }
+ nameColumn.push(optionName);
+ descriptionColumn.push("/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */");
+ marginLength = Math.max(optionName.length, marginLength);
+ }
+ }
+ var tab = makePadding(2);
+ var result = [];
+ result.push("{");
+ result.push(tab + "\"compilerOptions\": {");
+ for (var i = 0; i < nameColumn.length; i++) {
+ var optionName = nameColumn[i];
+ var description = descriptionColumn[i];
+ result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description);
+ }
+ if (configurations.files && configurations.files.length) {
+ result.push(tab + "},");
+ result.push(tab + "\"files\": [");
+ for (var i = 0; i < configurations.files.length; i++) {
+ result.push("" + tab + tab + JSON.stringify(configurations.files[i]) + (i === configurations.files.length - 1 ? "" : ","));
+ }
+ result.push(tab + "]");
+ }
+ else {
+ result.push(tab + "}");
+ }
+ result.push("}");
+ return result.join(newLine);
+ }
}
ts.generateTSConfig = generateTSConfig;
function removeComments(jsonText) {
@@ -5533,10 +5859,12 @@ var ts;
}
return output;
}
- function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack) {
+ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
if (existingOptions === void 0) { existingOptions = {}; }
if (resolutionStack === void 0) { resolutionStack = []; }
+ if (extraFileExtensions === void 0) { extraFileExtensions = []; }
var errors = [];
+ basePath = ts.normalizeSlashes(basePath);
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
if (resolutionStack.indexOf(resolvedPath) >= 0) {
@@ -5658,7 +5986,7 @@ var ts;
if (fileNames === undefined && includeSpecs === undefined) {
includeSpecs = ["**/*"];
}
- var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors);
+ var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
}
@@ -5709,8 +6037,8 @@ var ts;
}
var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
for (var id in jsonOptions) {
- if (id in optionNameMap) {
- var opt = optionNameMap[id];
+ var opt = optionNameMap.get(id);
+ if (opt) {
defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
}
else {
@@ -5744,8 +6072,9 @@ var ts;
}
function convertJsonOptionOfCustomType(opt, value, errors) {
var key = value.toLowerCase();
- if (key in opt.type) {
- return opt.type[key];
+ var val = opt.type.get(key);
+ if (val !== undefined) {
+ return val;
}
else {
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
@@ -5762,7 +6091,7 @@ var ts;
var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
- function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) {
+ function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
basePath = ts.normalizePath(basePath);
var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
var literalFileMap = ts.createMap();
@@ -5774,12 +6103,12 @@ var ts;
exclude = validateSpecs(exclude, errors, true);
}
var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
- var supportedExtensions = ts.getSupportedExtensions(options);
+ var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
if (fileNames) {
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
var fileName = fileNames_1[_i];
var file = ts.combinePaths(basePath, fileName);
- literalFileMap[keyMapper(file)] = file;
+ literalFileMap.set(keyMapper(file), file);
}
}
if (include && include.length > 0) {
@@ -5790,14 +6119,13 @@ var ts;
}
removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
var key = keyMapper(file);
- if (!(key in literalFileMap) && !(key in wildcardFileMap)) {
- wildcardFileMap[key] = file;
+ if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
+ wildcardFileMap.set(key, file);
}
}
}
- var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []);
- var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []);
- wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive);
+ var literalFiles = ts.arrayFrom(literalFileMap.values());
+ var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
return {
fileNames: literalFiles.concat(wildcardFiles),
wildcardDirectories: wildcardDirectories
@@ -5805,8 +6133,8 @@ var ts;
}
function validateSpecs(specs, errors, allowTrailingRecursion) {
var validSpecs = [];
- for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) {
- var spec = specs_2[_i];
+ for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
+ var spec = specs_1[_i];
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
}
@@ -5825,7 +6153,7 @@ var ts;
function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
- var wildcardDirectories = ts.createMap();
+ var wildcardDirectories = {};
if (include !== undefined) {
var recursiveKeys = [];
for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
@@ -5846,14 +6174,15 @@ var ts;
}
}
}
- for (var key in wildcardDirectories) {
- for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
- var recursiveKey = recursiveKeys_1[_a];
- if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
- delete wildcardDirectories[key];
+ for (var key in wildcardDirectories)
+ if (ts.hasProperty(wildcardDirectories, key)) {
+ for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
+ var recursiveKey = recursiveKeys_1[_a];
+ if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
+ delete wildcardDirectories[key];
+ }
}
}
- }
}
return wildcardDirectories;
}
@@ -5872,11 +6201,11 @@ var ts;
}
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority);
+ var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
for (var i = 0; i < adjustedExtensionPriority; i++) {
var higherPriorityExtension = extensions[i];
var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
- if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) {
+ if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
return true;
}
}
@@ -5884,17 +6213,13 @@ var ts;
}
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
var extensionPriority = ts.getExtensionPriority(file, extensions);
- var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority);
+ var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
for (var i = nextExtensionPriority; i < extensions.length; i++) {
var lowerPriorityExtension = extensions[i];
var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
- delete wildcardFiles[lowerPriorityPath];
+ wildcardFiles.delete(lowerPriorityPath);
}
}
- function addFileToOutput(output, file) {
- output.push(file);
- return output;
- }
function caseSensitiveKeyMapper(key) {
return key;
}
@@ -5906,8 +6231,6 @@ var ts;
(function (ts) {
var JsTyping;
(function (JsTyping) {
- ;
- ;
var safeList;
var EmptySafeList = ts.createMap();
JsTyping.nodeCoreModuleList = [
@@ -5930,7 +6253,7 @@ var ts;
});
if (!safeList) {
var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
- safeList = result.config ? ts.createMap(result.config) : EmptySafeList;
+ safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
}
var filesToWatch = [];
var searchDirs = [];
@@ -5948,38 +6271,40 @@ var ts;
getTypingNamesFromJson(packageJsonPath, filesToWatch);
var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
getTypingNamesFromJson(bowerJsonPath, filesToWatch);
+ var bowerComponentsPath = ts.combinePaths(searchDir, "bower_components");
+ getTypingNamesFromPackagesFolder(bowerComponentsPath);
var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
- getTypingNamesFromNodeModuleFolder(nodeModulesPath);
+ getTypingNamesFromPackagesFolder(nodeModulesPath);
}
getTypingNamesFromSourceFileNames(fileNames);
if (unresolvedImports) {
for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
var moduleId = unresolvedImports_1[_a];
- var typingName = moduleId in nodeCoreModules ? "node" : moduleId;
- if (!(typingName in inferredTypings)) {
- inferredTypings[typingName] = undefined;
+ var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
+ if (!inferredTypings.has(typingName)) {
+ inferredTypings.set(typingName, undefined);
}
}
}
- for (var name_6 in packageNameToTypingLocation) {
- if (name_6 in inferredTypings && !inferredTypings[name_6]) {
- inferredTypings[name_6] = packageNameToTypingLocation[name_6];
+ packageNameToTypingLocation.forEach(function (typingLocation, name) {
+ if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
+ inferredTypings.set(name, typingLocation);
}
- }
+ });
for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
var excludeTypingName = exclude_1[_b];
- delete inferredTypings[excludeTypingName];
+ inferredTypings.delete(excludeTypingName);
}
var newTypingNames = [];
var cachedTypingPaths = [];
- for (var typing in inferredTypings) {
- if (inferredTypings[typing] !== undefined) {
- cachedTypingPaths.push(inferredTypings[typing]);
+ inferredTypings.forEach(function (inferred, typing) {
+ if (inferred !== undefined) {
+ cachedTypingPaths.push(inferred);
}
else {
newTypingNames.push(typing);
}
- }
+ });
return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
function mergeTypings(typingNames) {
if (!typingNames) {
@@ -5987,8 +6312,8 @@ var ts;
}
for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
var typing = typingNames_1[_i];
- if (!(typing in inferredTypings)) {
- inferredTypings[typing] = undefined;
+ if (!inferredTypings.has(typing)) {
+ inferredTypings.set(typing, undefined);
}
}
}
@@ -6018,23 +6343,25 @@ var ts;
var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
if (safeList !== EmptySafeList) {
- mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; }));
+ mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
if (hasJsxFile) {
mergeTypings(["react"]);
}
}
- function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
- if (!host.directoryExists(nodeModulesPath)) {
+ function getTypingNamesFromPackagesFolder(packagesFolderPath) {
+ filesToWatch.push(packagesFolderPath);
+ if (!host.directoryExists(packagesFolderPath)) {
return;
}
var typingNames = [];
- var fileNames = host.readDirectory(nodeModulesPath, [".json"], undefined, undefined, 2);
+ var fileNames = host.readDirectory(packagesFolderPath, [".json"], undefined, undefined, 2);
for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
var fileName = fileNames_2[_i];
var normalizedFileName = ts.normalizePath(fileName);
- if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
+ var baseFileName = ts.getBaseFileName(normalizedFileName);
+ if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
continue;
}
var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
@@ -6042,7 +6369,7 @@ var ts;
continue;
}
var packageJson = result.config;
- if (packageJson._requiredBy &&
+ if (baseFileName === "package.json" && packageJson._requiredBy &&
ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
continue;
}
@@ -6051,7 +6378,7 @@ var ts;
}
if (packageJson.typings) {
var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
- inferredTypings[packageJson.name] = absolutePath;
+ inferredTypings.set(packageJson.name, absolutePath);
}
else {
typingNames.push(packageJson.name);
@@ -6069,12 +6396,15 @@ var ts;
(function (server) {
server.ActionSet = "action::set";
server.ActionInvalidate = "action::invalidate";
- server.EventInstall = "event::install";
+ server.EventBeginInstallTypes = "event::beginInstallTypes";
+ server.EventEndInstallTypes = "event::endInstallTypes";
+ server.EventInitializationFailed = "event::initializationFailed";
var Arguments;
(function (Arguments) {
Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
Arguments.LogFile = "--logFile";
Arguments.EnableTelemetry = "--enableTelemetry";
+ Arguments.TypingSafeListLocation = "--typingSafeListLocation";
})(Arguments = server.Arguments || (server.Arguments = {}));
function hasArgument(argumentName) {
return ts.sys.args.indexOf(argumentName) >= 0;
@@ -6099,6 +6429,12 @@ var ts;
return compilerOptions.traceResolution && host.trace !== undefined;
}
ts.isTraceEnabled = isTraceEnabled;
+ var Extensions;
+ (function (Extensions) {
+ Extensions[Extensions["TypeScript"] = 0] = "TypeScript";
+ Extensions[Extensions["JavaScript"] = 1] = "JavaScript";
+ Extensions[Extensions["DtsOnly"] = 2] = "DtsOnly";
+ })(Extensions || (Extensions = {}));
function resolvedTypeScriptOnly(resolved) {
if (!resolved) {
return undefined;
@@ -6106,9 +6442,6 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedFromAnyFile(path) {
- return { path: path, extension: ts.extensionFromPath(path) };
- }
function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
var path = _a.path, extension = _a.extension;
return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
@@ -6120,37 +6453,28 @@ var ts;
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
- function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
+ function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
- switch (extensions) {
- case 2:
- case 0:
- return tryReadFromField("typings") || tryReadFromField("types");
- case 1:
- if (typeof jsonContent.main === "string") {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main);
- }
- return ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main));
- }
- return undefined;
- }
+ return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
function tryReadFromField(fieldName) {
- if (ts.hasProperty(jsonContent, fieldName)) {
- var typesFile = jsonContent[fieldName];
- if (typeof typesFile === "string") {
- var typesFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile));
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath);
- }
- return typesFilePath;
+ if (!ts.hasProperty(jsonContent, fieldName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
}
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile);
- }
+ return;
+ }
+ var fileName = jsonContent[fieldName];
+ if (typeof fileName !== "string") {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
}
+ return;
}
+ var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
+ }
+ return path;
}
}
function readJson(path, host) {
@@ -6183,11 +6507,12 @@ var ts;
return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
}
var typeRoots;
- forEachAncestorDirectory(currentDirectory, function (directory) {
+ forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) {
var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
if (host.directoryExists(atTypes)) {
(typeRoots || (typeRoots = [])).push(atTypes);
}
+ return undefined;
});
return typeRoots;
}
@@ -6242,7 +6567,11 @@ var ts;
return ts.forEach(typeRoots, function (typeRoot) {
var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
var candidateDirectory = ts.getDirectoryPath(candidate);
- return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(2, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState));
+ var directoryExists = directoryProbablyExists(candidateDirectory, host);
+ if (!directoryExists && traceEnabled) {
+ trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
+ }
+ return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
});
}
else {
@@ -6258,7 +6587,8 @@ var ts;
if (traceEnabled) {
trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
}
- resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(2, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState));
+ var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, undefined);
+ resolvedFile = resolvedTypeScriptOnly(result && result.value);
if (!resolvedFile && traceEnabled) {
trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
}
@@ -6299,31 +6629,116 @@ var ts;
return result;
}
ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
- function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
+ function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
+ var directoryToModuleNameMap = ts.createFileMap();
+ var moduleNameToDirectoryMap = ts.createMap();
+ return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
+ function getOrCreateCacheForDirectory(directoryName) {
+ var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
+ var perFolderCache = directoryToModuleNameMap.get(path);
+ if (!perFolderCache) {
+ perFolderCache = ts.createMap();
+ directoryToModuleNameMap.set(path, perFolderCache);
+ }
+ return perFolderCache;
+ }
+ function getOrCreateCacheForModuleName(nonRelativeModuleName) {
+ if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
+ return undefined;
+ }
+ var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
+ if (!perModuleNameCache) {
+ perModuleNameCache = createPerModuleNameCache();
+ moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
+ }
+ return perModuleNameCache;
+ }
+ function createPerModuleNameCache() {
+ var directoryPathMap = ts.createFileMap();
+ return { get: get, set: set };
+ function get(directory) {
+ return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
+ }
+ function set(directory, result) {
+ var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
+ if (directoryPathMap.contains(path)) {
+ return;
+ }
+ directoryPathMap.set(path, result);
+ var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
+ var commonPrefix = getCommonPrefix(path, resolvedFileName);
+ var current = path;
+ while (true) {
+ var parent = ts.getDirectoryPath(current);
+ if (parent === current || directoryPathMap.contains(parent)) {
+ break;
+ }
+ directoryPathMap.set(parent, result);
+ current = parent;
+ if (current === commonPrefix) {
+ break;
+ }
+ }
+ }
+ function getCommonPrefix(directory, resolution) {
+ if (resolution === undefined) {
+ return undefined;
+ }
+ var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
+ var i = 0;
+ while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
+ i++;
+ }
+ var sep = directory.lastIndexOf(ts.directorySeparator, i);
+ if (sep < 0) {
+ return undefined;
+ }
+ return directory.substr(0, sep);
+ }
+ }
+ }
+ ts.createModuleResolutionCache = createModuleResolutionCache;
+ function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
if (traceEnabled) {
trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
}
- var moduleResolution = compilerOptions.moduleResolution;
- if (moduleResolution === undefined) {
- moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ var containingDirectory = ts.getDirectoryPath(containingFile);
+ var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
+ var result = perFolderCache && perFolderCache.get(moduleName);
+ if (result) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
}
}
else {
- if (traceEnabled) {
- trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ var moduleResolution = compilerOptions.moduleResolution;
+ if (moduleResolution === undefined) {
+ moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ else {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
+ }
+ }
+ switch (moduleResolution) {
+ case ts.ModuleResolutionKind.NodeJs:
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ case ts.ModuleResolutionKind.Classic:
+ result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
+ break;
+ }
+ if (perFolderCache) {
+ perFolderCache.set(moduleName, result);
+ var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
+ if (perModuleNameCache) {
+ perModuleNameCache.set(containingDirectory, result);
+ }
}
- }
- var result;
- switch (moduleResolution) {
- case ts.ModuleResolutionKind.NodeJs:
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
- case ts.ModuleResolutionKind.Classic:
- result = classicNameResolver(moduleName, containingFile, compilerOptions, host);
- break;
}
if (traceEnabled) {
if (result.resolvedModule) {
@@ -6448,37 +6863,43 @@ var ts;
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
}
}
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
+ return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ }
+ ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
+ if (jsOnly === void 0) { jsOnly = false; }
var containingDirectory = ts.getDirectoryPath(containingFile);
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
- var result = tryResolve(0) || tryResolve(1);
- if (result) {
- var resolved = result.resolved, isExternalLibraryImport = result.isExternalLibraryImport;
+ var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
+ if (result && result.value) {
+ var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
}
return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
function tryResolve(extensions) {
- var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state);
+ var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, true); };
+ var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
if (resolved) {
- return { resolved: resolved, isExternalLibraryImport: false };
+ return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
}
if (moduleHasNonRelativeName(moduleName)) {
if (traceEnabled) {
- trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName);
+ trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
}
- var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state);
- return resolved_1 && { resolved: { path: realpath(resolved_1.path, host, traceEnabled), extension: resolved_1.extension }, isExternalLibraryImport: true };
+ var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
+ return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state);
- return resolved_2 && { resolved: resolved_2, isExternalLibraryImport: false };
+ var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, false, state, true);
+ return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
}
}
}
- ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -6489,12 +6910,35 @@ var ts;
}
return real;
}
- function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
+ function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate);
+ trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
}
- var resolvedFromFile = !ts.pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
- return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (!ts.pathEndsWithDirectorySeparator(candidate)) {
+ if (!onlyRecordFailures) {
+ var parentOfCandidate = ts.getDirectoryPath(candidate);
+ if (!directoryProbablyExists(parentOfCandidate, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
+ if (resolvedFromFile) {
+ return resolvedFromFile;
+ }
+ }
+ if (!onlyRecordFailures) {
+ var candidateExists = directoryProbablyExists(candidate, state.host);
+ if (!candidateExists) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
+ }
+ onlyRecordFailures = true;
+ }
+ }
+ return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
}
function directoryProbablyExists(directoryName, host) {
return !host.directoryExists || host.directoryExists(directoryName);
@@ -6522,11 +6966,11 @@ var ts;
}
}
switch (extensions) {
- case 2:
+ case Extensions.DtsOnly:
return tryExtension(".d.ts", ts.Extension.Dts);
- case 0:
+ case Extensions.TypeScript:
return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
- case 1:
+ case Extensions.JavaScript:
return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
}
function tryExtension(ext, extension) {
@@ -6535,113 +6979,181 @@ var ts;
}
}
function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
- if (!onlyRecordFailures && state.host.fileExists(fileName)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ if (!onlyRecordFailures) {
+ if (state.host.fileExists(fileName)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
+ }
+ return fileName;
}
- return fileName;
- }
- else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ else {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
+ }
}
- failedLookupLocations.push(fileName);
- return undefined;
}
+ failedLookupLocations.push(fileName);
+ return undefined;
}
- function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
- var packageJsonPath = pathToPackageJson(candidate);
+ function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
+ if (considerPackageJson === void 0) { considerPackageJson = true; }
var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
- if (directoryExists && state.host.fileExists(packageJsonPath)) {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
- }
- var typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state);
- if (typesFile) {
- var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host);
- var fromFile = tryFile(typesFile, failedLookupLocations, onlyRecordFailures_1, state);
- if (fromFile) {
- return resolvedFromAnyFile(fromFile);
- }
- var x = tryAddingExtensions(typesFile, 0, failedLookupLocations, onlyRecordFailures_1, state);
- if (x) {
- return x;
+ if (considerPackageJson) {
+ var packageJsonPath = pathToPackageJson(candidate);
+ if (directoryExists && state.host.fileExists(packageJsonPath)) {
+ var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
+ if (fromPackageJson) {
+ return fromPackageJson;
}
}
else {
- if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.package_json_does_not_have_a_types_or_main_field);
+ if (directoryExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
}
+ failedLookupLocations.push(packageJsonPath);
}
}
- else {
+ return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ }
+ function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
+ }
+ var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
+ if (!file) {
+ return undefined;
+ }
+ var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
+ var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
+ if (fromFile) {
+ var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
+ if (resolved) {
+ return resolved;
+ }
if (state.traceEnabled) {
- trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
+ trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
}
- failedLookupLocations.push(packageJsonPath);
}
- return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
+ var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
+ return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, false);
+ }
+ function resolvedIfExtensionMatches(extensions, path) {
+ var extension = ts.tryGetExtensionFromPath(path);
+ return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
+ }
+ function extensionIsOk(extensions, extension) {
+ switch (extensions) {
+ case Extensions.JavaScript:
+ return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
+ case Extensions.TypeScript:
+ return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
+ case Extensions.DtsOnly:
+ return extension === ts.Extension.Dts;
+ }
}
function pathToPackageJson(directory) {
return ts.combinePaths(directory, "package.json");
}
- function loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state) {
- var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
- var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
}
- function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false);
+ function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
+ return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, false, cache);
}
function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
- return loadModuleFromNodeModulesWorker(2, moduleName, directory, failedLookupLocations, state, true);
+ return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, true, undefined);
}
- function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
+ function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
- return loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly);
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
+ return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
}
});
}
function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
if (typesOnly === void 0) { typesOnly = false; }
- var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state);
+ var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
+ var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
+ if (!nodeModulesFolderExists && state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
+ }
+ var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
if (packageResult) {
return packageResult;
}
- if (extensions !== 1) {
- return loadModuleFromNodeModulesFolder(2, ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state);
+ if (extensions !== Extensions.JavaScript) {
+ var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
+ var nodeModulesAtTypesExists = nodeModulesFolderExists;
+ if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
+ }
+ nodeModulesAtTypesExists = false;
+ }
+ return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
+ }
+ }
+ function mangleScopedPackage(moduleName, state) {
+ if (ts.startsWith(moduleName, "@")) {
+ var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ if (replaceSlash !== moduleName) {
+ var mangled = replaceSlash.slice(1);
+ if (state.traceEnabled) {
+ trace(state.host, ts.Diagnostics.Scoped_package_detected_looking_in_0, mangled);
+ }
+ return mangled;
+ }
+ }
+ return moduleName;
+ }
+ function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
+ var result = cache && cache.get(containingDirectory);
+ if (result) {
+ if (traceEnabled) {
+ trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
+ }
+ return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
}
}
- function classicNameResolver(moduleName, containingFile, compilerOptions, host) {
+ function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
var containingDirectory = ts.getDirectoryPath(containingFile);
- var resolved = tryResolve(0) || tryResolve(1);
- return createResolvedModuleWithFailedLookupLocations(resolved, false, failedLookupLocations);
+ var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
+ return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations);
function tryResolve(extensions) {
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
if (resolvedUsingSettings) {
- return resolvedUsingSettings;
+ return { value: resolvedUsingSettings };
}
+ var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
if (moduleHasNonRelativeName(moduleName)) {
var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
+ var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
+ if (resolutionFromCache) {
+ return resolutionFromCache;
+ }
var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
- return loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, false, state));
});
if (resolved_3) {
return resolved_3;
}
- if (extensions === 0) {
+ if (extensions === Extensions.TypeScript) {
return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
}
}
else {
var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
- return loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state);
+ return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, false, state));
}
}
}
@@ -6653,10 +7165,13 @@ var ts;
}
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
var failedLookupLocations = [];
- var resolved = loadModuleFromNodeModulesOneLevel(2, moduleName, globalCache, failedLookupLocations, state);
+ var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations);
}
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
+ function toSearchResult(value) {
+ return value !== undefined ? { value: value } : undefined;
+ }
function forEachAncestorDirectory(directory, callback) {
while (true) {
var result = callback(directory);
@@ -6727,13 +7242,12 @@ var ts;
}
typingsInstaller.validatePackageName = validatePackageName;
var TypingsInstaller = (function () {
- function TypingsInstaller(installTypingHost, globalCachePath, safeListPath, throttleLimit, telemetryEnabled, log) {
+ function TypingsInstaller(installTypingHost, globalCachePath, safeListPath, throttleLimit, log) {
if (log === void 0) { log = nullLog; }
this.installTypingHost = installTypingHost;
this.globalCachePath = globalCachePath;
this.safeListPath = safeListPath;
this.throttleLimit = throttleLimit;
- this.telemetryEnabled = telemetryEnabled;
this.log = log;
this.packageNameToTypingLocation = ts.createMap();
this.missingTypingsSet = ts.createMap();
@@ -6754,7 +7268,7 @@ var ts;
if (this.log.isEnabled()) {
this.log.writeLine("Closing file watchers for project '" + projectName + "'");
}
- var watchers = this.projectWatchers[projectName];
+ var watchers = this.projectWatchers.get(projectName);
if (!watchers) {
if (this.log.isEnabled()) {
this.log.writeLine("No watchers are registered for project '" + projectName + "'");
@@ -6765,7 +7279,7 @@ var ts;
var w = watchers_1[_i];
w.close();
}
- delete this.projectWatchers[projectName];
+ this.projectWatchers.delete(projectName);
if (this.log.isEnabled()) {
this.log.writeLine("Closing file watchers for project '" + projectName + "' - done.");
}
@@ -6799,7 +7313,7 @@ var ts;
if (this.log.isEnabled()) {
this.log.writeLine("Processing cache location '" + cacheLocation + "'");
}
- if (this.knownCachesSet[cacheLocation]) {
+ if (this.knownCachesSet.get(cacheLocation)) {
if (this.log.isEnabled()) {
this.log.writeLine("Cache location was already processed...");
}
@@ -6822,10 +7336,10 @@ var ts;
}
var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log);
if (!typingFile) {
- this.missingTypingsSet[packageName] = true;
+ this.missingTypingsSet.set(packageName, true);
continue;
}
- var existingTypingFile = this.packageNameToTypingLocation[packageName];
+ var existingTypingFile = this.packageNameToTypingLocation.get(packageName);
if (existingTypingFile === typingFile) {
continue;
}
@@ -6837,14 +7351,14 @@ var ts;
if (this.log.isEnabled()) {
this.log.writeLine("Adding entry into typings cache: '" + packageName + "' => '" + typingFile + "'");
}
- this.packageNameToTypingLocation[packageName] = typingFile;
+ this.packageNameToTypingLocation.set(packageName, typingFile);
}
}
}
if (this.log.isEnabled()) {
this.log.writeLine("Finished processing cache location '" + cacheLocation + "'");
}
- this.knownCachesSet[cacheLocation] = true;
+ this.knownCachesSet.set(cacheLocation, true);
};
TypingsInstaller.prototype.filterTypings = function (typingsToInstall) {
if (typingsToInstall.length === 0) {
@@ -6853,12 +7367,12 @@ var ts;
var result = [];
for (var _i = 0, typingsToInstall_1 = typingsToInstall; _i < typingsToInstall_1.length; _i++) {
var typing = typingsToInstall_1[_i];
- if (this.missingTypingsSet[typing] || this.packageNameToTypingLocation[typing]) {
+ if (this.missingTypingsSet.get(typing) || this.packageNameToTypingLocation.get(typing)) {
continue;
}
var validationResult = validatePackageName(typing);
if (validationResult === PackageNameValidationResult.Ok) {
- if (typing in this.typesRegistry) {
+ if (this.typesRegistry.has(typing)) {
result.push(typing);
}
else {
@@ -6868,7 +7382,7 @@ var ts;
}
}
else {
- this.missingTypingsSet[typing] = true;
+ this.missingTypingsSet.set(typing, true);
if (this.log.isEnabled()) {
switch (validationResult) {
case PackageNameValidationResult.EmptyName:
@@ -6914,8 +7428,7 @@ var ts;
this.log.writeLine("Installing typings " + JSON.stringify(typingsToInstall));
}
var filteredTypings = this.filterTypings(typingsToInstall);
- var scopedTypings = filteredTypings.map(function (x) { return "@types/" + x; });
- if (scopedTypings.length === 0) {
+ if (filteredTypings.length === 0) {
if (this.log.isEnabled()) {
this.log.writeLine("All typings are known to be missing or invalid - no need to go any further");
}
@@ -6924,45 +7437,56 @@ var ts;
this.ensurePackageDirectoryExists(cachePath);
var requestId = this.installRunCount;
this.installRunCount++;
+ this.sendResponse({
+ kind: server.EventBeginInstallTypes,
+ eventId: requestId,
+ typingsInstallerVersion: ts.version,
+ projectName: req.projectName
+ });
+ var scopedTypings = filteredTypings.map(typingsName);
this.installTypingsAsync(requestId, scopedTypings, cachePath, function (ok) {
- if (_this.telemetryEnabled) {
- _this.sendResponse({
- kind: server.EventInstall,
- packagesToInstall: scopedTypings,
- installSuccess: ok,
- typingsInstallerVersion: ts.version
- });
- }
- if (!ok) {
- if (_this.log.isEnabled()) {
- _this.log.writeLine("install request failed, marking packages as missing to prevent repeated requests: " + JSON.stringify(filteredTypings));
+ try {
+ if (!ok) {
+ if (_this.log.isEnabled()) {
+ _this.log.writeLine("install request failed, marking packages as missing to prevent repeated requests: " + JSON.stringify(filteredTypings));
+ }
+ for (var _i = 0, filteredTypings_1 = filteredTypings; _i < filteredTypings_1.length; _i++) {
+ var typing = filteredTypings_1[_i];
+ _this.missingTypingsSet.set(typing, true);
+ }
+ return;
}
- for (var _i = 0, filteredTypings_1 = filteredTypings; _i < filteredTypings_1.length; _i++) {
- var typing = filteredTypings_1[_i];
- _this.missingTypingsSet[typing] = true;
+ if (_this.log.isEnabled()) {
+ _this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
}
- return;
- }
- if (_this.log.isEnabled()) {
- _this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
- }
- var installedTypingFiles = [];
- for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
- var packageName = filteredTypings_2[_a];
- var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost, _this.log);
- if (!typingFile) {
- _this.missingTypingsSet[packageName] = true;
- continue;
+ var installedTypingFiles = [];
+ for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
+ var packageName = filteredTypings_2[_a];
+ var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost, _this.log);
+ if (!typingFile) {
+ _this.missingTypingsSet.set(packageName, true);
+ continue;
+ }
+ if (!_this.packageNameToTypingLocation.has(packageName)) {
+ _this.packageNameToTypingLocation.set(packageName, typingFile);
+ }
+ installedTypingFiles.push(typingFile);
}
- if (!_this.packageNameToTypingLocation[packageName]) {
- _this.packageNameToTypingLocation[packageName] = typingFile;
+ if (_this.log.isEnabled()) {
+ _this.log.writeLine("Installed typing files " + JSON.stringify(installedTypingFiles));
}
- installedTypingFiles.push(typingFile);
+ _this.sendResponse(_this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles)));
}
- if (_this.log.isEnabled()) {
- _this.log.writeLine("Installed typing files " + JSON.stringify(installedTypingFiles));
+ finally {
+ _this.sendResponse({
+ kind: server.EventEndInstallTypes,
+ eventId: requestId,
+ projectName: req.projectName,
+ packagesToInstall: scopedTypings,
+ installSuccess: ok,
+ typingsInstallerVersion: ts.version
+ });
}
- _this.sendResponse(_this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles)));
});
};
TypingsInstaller.prototype.ensureDirectoryExists = function (directory, host) {
@@ -6995,7 +7519,7 @@ var ts;
}, 2000);
watchers.push(w);
}
- this.projectWatchers[projectName] = watchers;
+ this.projectWatchers.set(projectName, watchers);
};
TypingsInstaller.prototype.createSetTypings = function (request, typings) {
return {
@@ -7013,7 +7537,7 @@ var ts;
};
TypingsInstaller.prototype.executeWithThrottling = function () {
var _this = this;
- var _loop_2 = function () {
+ var _loop_3 = function () {
this_1.inFlightRequestCount++;
var request = this_1.pendingRunRequests.pop();
this_1.installWorker(request.requestId, request.args, request.cwd, function (ok) {
@@ -7024,12 +7548,17 @@ var ts;
};
var this_1 = this;
while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) {
- _loop_2();
+ _loop_3();
}
};
return TypingsInstaller;
}());
typingsInstaller.TypingsInstaller = TypingsInstaller;
+ function typingsName(packageName) {
+ return "@types/" + packageName + "@ts" + versionMajorMinor;
+ }
+ typingsInstaller.typingsName = typingsName;
+ var versionMajorMinor = ts.version.split(".").slice(0, 2).join(".");
})(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
@@ -7044,17 +7573,23 @@ var ts;
var FileLog = (function () {
function FileLog(logFile) {
this.logFile = logFile;
+ this.logEnabled = true;
}
FileLog.prototype.isEnabled = function () {
- return this.logFile !== undefined;
+ return this.logEnabled && this.logFile !== undefined;
};
FileLog.prototype.writeLine = function (text) {
- fs.appendFileSync(this.logFile, text + ts.sys.newLine);
+ try {
+ fs.appendFileSync(this.logFile, text + ts.sys.newLine);
+ }
+ catch (e) {
+ this.logEnabled = false;
+ }
};
return FileLog;
}());
function getNPMLocation(processName) {
- if (path.basename(processName).indexOf("node") == 0) {
+ if (path.basename(processName).indexOf("node") === 0) {
return "\"" + path.join(path.dirname(process.argv[0]), "npm") + "\"";
}
else {
@@ -7070,7 +7605,7 @@ var ts;
}
try {
var content = JSON.parse(host.readFile(typesRegistryFilePath));
- return ts.createMap(content.entries);
+ return ts.createMapFromTemplate(content.entries);
}
catch (e) {
if (log.isEnabled()) {
@@ -7085,8 +7620,8 @@ var ts;
}
var NodeTypingsInstaller = (function (_super) {
__extends(NodeTypingsInstaller, _super);
- function NodeTypingsInstaller(globalTypingsCacheLocation, throttleLimit, telemetryEnabled, log) {
- var _this = _super.call(this, ts.sys, globalTypingsCacheLocation, ts.toPath("typingSafeList.json", __dirname, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), throttleLimit, telemetryEnabled, log) || this;
+ function NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, throttleLimit, log) {
+ var _this = _super.call(this, ts.sys, globalTypingsCacheLocation, typingSafeListLocation ? ts.toPath(typingSafeListLocation, "", ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)) : ts.toPath("typingSafeList.json", __dirname, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), throttleLimit, log) || this;
if (_this.log.isEnabled()) {
_this.log.writeLine("Process id: " + process.pid);
}
@@ -7103,6 +7638,10 @@ var ts;
if (_this.log.isEnabled()) {
_this.log.writeLine("Error updating " + TypesRegistryPackageName + " package: " + e.message);
}
+ _this.delayedInitializationError = {
+ kind: "event::initializationFailed",
+ message: e.message
+ };
}
_this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation), _this.installTypingHost, _this.log);
return _this;
@@ -7110,6 +7649,10 @@ var ts;
NodeTypingsInstaller.prototype.listen = function () {
var _this = this;
process.on("message", function (req) {
+ if (_this.delayedInitializationError) {
+ _this.sendResponse(_this.delayedInitializationError);
+ _this.delayedInitializationError = undefined;
+ }
switch (req.kind) {
case "discover":
_this.install(req);
@@ -7155,7 +7698,7 @@ var ts;
typingsInstaller.NodeTypingsInstaller = NodeTypingsInstaller;
var logFilePath = server.findArgument(server.Arguments.LogFile);
var globalTypingsCacheLocation = server.findArgument(server.Arguments.GlobalCacheLocation);
- var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
+ var typingSafeListLocation = server.findArgument(server.Arguments.TypingSafeListLocation);
var log = new FileLog(logFilePath);
if (log.isEnabled()) {
process.on("uncaughtException", function (e) {
@@ -7168,7 +7711,7 @@ var ts;
}
process.exit(0);
});
- var installer = new NodeTypingsInstaller(globalTypingsCacheLocation, 5, telemetryEnabled, log);
+ var installer = new NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, 5, log);
installer.listen();
})(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
})(server = ts.server || (ts.server = {}));
diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json
index cd55aa06f..b39c4e759 100644
--- a/node_modules/typescript/package.json
+++ b/node_modules/typescript/package.json
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "http://typescriptlang.org/",
- "version": "2.2.0-dev.20161127",
+ "version": "2.3.0-dev.20170419",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
@@ -26,7 +26,7 @@
"tsserver": "./bin/tsserver"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">=4.2.0"
},
"devDependencies": {
"@types/browserify": "latest",
@@ -60,7 +60,7 @@
"gulp-insert": "latest",
"gulp-newer": "latest",
"gulp-sourcemaps": "latest",
- "gulp-typescript": "latest",
+ "gulp-typescript": "3.1.5",
"into-stream": "latest",
"istanbul": "latest",
"jake": "latest",
diff --git a/node_modules/v8flags/README.md b/node_modules/v8flags/README.md
index 7cc6bbc13..ca6065b22 100644
--- a/node_modules/v8flags/README.md
+++ b/node_modules/v8flags/README.md
@@ -23,6 +23,8 @@ v8flags(function (err, results) {
## Release History
+* 2017-04-18 - v2.1.0 - hash username to support invalid path characters
+* 2017-03-31 - v2.0.12 - don't pollute global namespace
* 2015-12-07 - v2.0.11 - cache to temp directory if home is present but unwritable
* 2015-07-28 - v2.0.10 - don't throw for electron runtime, just call back with empty array
* 2015-06-25 - v2.0.9 - call back with flags even if cache file can't be written
diff --git a/node_modules/v8flags/index.js b/node_modules/v8flags/index.js
index a368b5ced..40404d005 100644
--- a/node_modules/v8flags/index.js
+++ b/node_modules/v8flags/index.js
@@ -5,12 +5,14 @@
const os = require('os');
const fs = require('fs');
const path = require('path');
+const crypto = require('crypto');
const execFile = require('child_process').execFile;
const env = process.env;
-const user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
-const configfile = '.v8flags.'+process.versions.v8+'.'+user+'.json';
+const user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME || '';
const exclusions = ['--help'];
+const configfile = '.v8flags.'+process.versions.v8+'.'+crypto.createHash('md5').update(user).digest('hex')+'.json';
+
const failureMessage = [
'Unable to cache a config file for v8flags to a your home directory',
'or a temporary folder. To fix this problem, please correct your',
@@ -42,7 +44,7 @@ function tryOpenConfig (configpath, cb) {
// if the config file is valid, it should be json and therefore
// node should be able to require it directly. if this doesn't
// throw, we're done!
- content = require(configpath);
+ var content = require(configpath);
process.nextTick(function () {
cb(null, content);
});
diff --git a/node_modules/v8flags/package.json b/node_modules/v8flags/package.json
index 68001b170..b711a7282 100644
--- a/node_modules/v8flags/package.json
+++ b/node_modules/v8flags/package.json
@@ -1,7 +1,7 @@
{
"name": "v8flags",
"description": "Get available v8 flags.",
- "version": "2.0.11",
+ "version": "2.1.1",
"homepage": "https://github.com/tkellen/node-v8flags",
"author": {
"name": "Tyler Kellen",
diff --git a/node_modules/vinyl-fs/node_modules/clone-stats/LICENSE.md b/node_modules/vinyl-fs/node_modules/clone-stats/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/vinyl-fs/node_modules/clone-stats/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/vinyl-fs/node_modules/clone-stats/README.md b/node_modules/vinyl-fs/node_modules/clone-stats/README.md
deleted file mode 100644
index 8b12b6fa5..000000000
--- a/node_modules/vinyl-fs/node_modules/clone-stats/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-Safely clone node's
-[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
-losing their class methods, i.e. `stat.isDirectory()` and co.
-
-## Usage ##
-
-[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)
-
-### `copy = require('clone-stats')(stat)` ###
-
-Returns a clone of the original `fs.Stats` instance (`stat`).
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
diff --git a/node_modules/vinyl-fs/node_modules/clone-stats/index.js b/node_modules/vinyl-fs/node_modules/clone-stats/index.js
deleted file mode 100644
index e797cfe6e..000000000
--- a/node_modules/vinyl-fs/node_modules/clone-stats/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Stat = require('fs').Stats
-
-module.exports = cloneStats
-
-function cloneStats(stats) {
- var replacement = new Stat
-
- Object.keys(stats).forEach(function(key) {
- replacement[key] = stats[key]
- })
-
- return replacement
-}
diff --git a/node_modules/vinyl-fs/node_modules/clone-stats/package.json b/node_modules/vinyl-fs/node_modules/clone-stats/package.json
deleted file mode 100644
index 2880625c1..000000000
--- a/node_modules/vinyl-fs/node_modules/clone-stats/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "clone-stats",
- "description": "Safely clone node's fs.Stats instances without losing their class methods",
- "version": "0.0.1",
- "main": "index.js",
- "browser": "index.js",
- "dependencies": {},
- "devDependencies": {
- "tape": "~2.3.2"
- },
- "scripts": {
- "test": "node test"
- },
- "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/clone-stats"
- },
- "bugs": {
- "url": "https://github.com/hughsk/clone-stats/issues"
- },
- "homepage": "https://github.com/hughsk/clone-stats",
- "keywords": [
- "stats",
- "fs",
- "clone",
- "copy",
- "prototype"
- ]
-}
diff --git a/node_modules/vinyl-fs/node_modules/clone-stats/test.js b/node_modules/vinyl-fs/node_modules/clone-stats/test.js
deleted file mode 100644
index e4bb2814d..000000000
--- a/node_modules/vinyl-fs/node_modules/clone-stats/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var test = require('tape')
-var clone = require('./')
-var fs = require('fs')
-
-test('file', function(t) {
- compare(t, fs.statSync(__filename))
- t.end()
-})
-
-test('directory', function(t) {
- compare(t, fs.statSync(__dirname))
- t.end()
-})
-
-function compare(t, stat) {
- var copy = clone(stat)
-
- t.deepEqual(stat, copy, 'clone has equal properties')
- t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
- t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
-
- ;['isDirectory'
- , 'isFile'
- , 'isBlockDevice'
- , 'isCharacterDevice'
- , 'isSymbolicLink'
- , 'isFIFO'
- , 'isSocket'
- ].forEach(function(method) {
- t.equal(
- stat[method].call(stat)
- , copy[method].call(copy)
- , 'equal value for stat.' + method + '()'
- )
- })
-}
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/.npmignore b/node_modules/vinyl-fs/node_modules/replace-ext/.npmignore
deleted file mode 100644
index b5ef13a3c..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-*.log
-node_modules
-build
-*.node
-components \ No newline at end of file
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/.travis.yml b/node_modules/vinyl-fs/node_modules/replace-ext/.travis.yml
deleted file mode 100644
index 8101b9fe7..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.7"
- - "0.8"
- - "0.9"
- - "0.10"
-after_script:
- - npm run coveralls \ No newline at end of file
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/LICENSE b/node_modules/vinyl-fs/node_modules/replace-ext/LICENSE
deleted file mode 100755
index 7cbe012c6..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Fractal <contact@wearefractal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/README.md b/node_modules/vinyl-fs/node_modules/replace-ext/README.md
deleted file mode 100644
index 05b5d21fd..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
-
-
-## Information
-
-<table>
-<tr>
-<td>Package</td><td>replace-ext</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>Replaces a file extension with another one</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.4</td>
-</tr>
-</table>
-
-## Usage
-
-```javascript
-var replaceExt = require('replace-ext');
-
-var path = '/some/dir/file.js';
-var npath = replaceExt(path, '.coffee');
-
-console.log(npath); // /some/dir/file.coffee
-```
-
-[npm-url]: https://npmjs.org/package/replace-ext
-[npm-image]: https://badge.fury.io/js/replace-ext.png
-
-[travis-url]: https://travis-ci.org/wearefractal/replace-ext
-[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
-
-[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
-[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
-
-[depstat-url]: https://david-dm.org/wearefractal/replace-ext
-[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
-
-[david-url]: https://david-dm.org/wearefractal/replace-ext
-[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/index.js b/node_modules/vinyl-fs/node_modules/replace-ext/index.js
deleted file mode 100644
index 3f76938e4..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var path = require('path');
-
-module.exports = function(npath, ext) {
- if (typeof npath !== 'string') return npath;
- if (npath.length === 0) return npath;
-
- var nFileName = path.basename(npath, path.extname(npath))+ext;
- return path.join(path.dirname(npath), nFileName);
-}; \ No newline at end of file
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/package.json b/node_modules/vinyl-fs/node_modules/replace-ext/package.json
deleted file mode 100644
index 307d99b78..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name":"replace-ext",
- "description":"Replaces a file extension with another one",
- "version":"0.0.1",
- "homepage":"http://github.com/wearefractal/replace-ext",
- "repository":"git://github.com/wearefractal/replace-ext.git",
- "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
- "main":"./index.js",
-
- "dependencies":{
-
- },
- "devDependencies": {
- "mocha": "~1.17.0",
- "should": "~3.1.0",
- "mocha-lcov-reporter": "~0.0.1",
- "coveralls": "~2.6.1",
- "istanbul": "~0.2.3",
- "rimraf": "~2.2.5",
- "jshint": "~2.4.1"
- },
- "scripts": {
- "test": "mocha --reporter spec && jshint",
- "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "licenses":[
- {
- "type":"MIT",
- "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/vinyl-fs/node_modules/replace-ext/test/main.js b/node_modules/vinyl-fs/node_modules/replace-ext/test/main.js
deleted file mode 100644
index 51377021b..000000000
--- a/node_modules/vinyl-fs/node_modules/replace-ext/test/main.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var replaceExt = require('../');
-var path = require('path');
-var should = require('should');
-require('mocha');
-
-describe('replace-ext', function() {
- it('should return a valid replaced extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid replaced extension on flat', function(done) {
- var fname = 'test.coffee';
- var expected = 'test.js';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should not return a valid replaced extension on empty string', function(done) {
- var fname = '';
- var expected = '';
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid removed extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test.coffee');
- var expected = path.join(__dirname, './fixtures/test');
- var nu = replaceExt(fname, '');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-
- it('should return a valid added extension on nested', function(done) {
- var fname = path.join(__dirname, './fixtures/test');
- var expected = path.join(__dirname, './fixtures/test.js');
- var nu = replaceExt(fname, '.js');
- should.exist(nu);
- nu.should.equal(expected);
- done();
- });
-});
diff --git a/node_modules/vinyl/index.js b/node_modules/vinyl/index.js
index af91a1273..db5dc2a64 100644
--- a/node_modules/vinyl/index.js
+++ b/node_modules/vinyl/index.js
@@ -214,6 +214,8 @@ Object.defineProperty(File.prototype, 'base', {
base = removeTrailingSep(normalize(base));
if (base !== this._cwd) {
this._base = base;
+ } else {
+ delete this._base;
}
},
});
diff --git a/node_modules/vinyl/package.json b/node_modules/vinyl/package.json
index 3f407f18c..dc94e7685 100644
--- a/node_modules/vinyl/package.json
+++ b/node_modules/vinyl/package.json
@@ -1,6 +1,6 @@
{
"name": "vinyl",
- "version": "2.0.0",
+ "version": "2.0.2",
"description": "Virtual file format.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
@@ -29,7 +29,7 @@
"clone": "^1.0.0",
"clone-buffer": "^1.0.0",
"clone-stats": "^1.0.0",
- "cloneable-readable": "^0.5.0",
+ "cloneable-readable": "^1.0.0",
"is-stream": "^1.1.0",
"remove-trailing-separator": "^1.0.1",
"replace-ext": "^1.0.0"
diff --git a/node_modules/when/dist/browser/when.debug.js b/node_modules/when/dist/browser/when.debug.js
index 8b1b356a2..4f0097946 100644
--- a/node_modules/when/dist/browser/when.debug.js
+++ b/node_modules/when/dist/browser/when.debug.js
@@ -1092,13 +1092,23 @@ define(function(require) {
}
function settleOne(p) {
- var h = Promise._handler(p);
- if(h.state() === 0) {
+ // Optimize the case where we get an already-resolved when.js promise
+ // by extracting its state:
+ var handler;
+ if (p instanceof Promise) {
+ // This is our own Promise type and we can reach its handler internals:
+ handler = p._handler.join();
+ }
+ if((handler && handler.state() === 0) || !handler) {
+ // Either still pending, or not a Promise at all:
return toPromise(p).then(state.fulfilled, state.rejected);
}
- h._unreport();
- return state.inspect(h);
+ // The promise is our own, but it is already resolved. Take a shortcut.
+ // Since we're not actually handling the resolution, we need to disable
+ // rejection reporting.
+ handler._unreport();
+ return state.inspect(handler);
}
/**
@@ -1705,8 +1715,8 @@ define(function(require) {
}
function hasMutationObserver () {
- return (typeof MutationObserver === 'function' && MutationObserver) ||
- (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
+ return (typeof MutationObserver !== 'undefined' && MutationObserver) ||
+ (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);
}
function initMutationObserver(MutationObserver) {
@@ -2703,6 +2713,28 @@ define(function() {
function noop() {}
+ function hasCustomEvent() {
+ if(typeof CustomEvent === 'function') {
+ try {
+ var ev = new CustomEvent('unhandledRejection');
+ return ev instanceof CustomEvent;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
+ function hasInternetExplorerCustomEvent() {
+ if(typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ try {
+ // Try to create one event to make sure it's supported
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent('eventType', false, true, {});
+ return true;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
function initEmitRejection() {
/*global process, self, CustomEvent*/
if(typeof process !== 'undefined' && process !== null
@@ -2716,15 +2748,9 @@ define(function() {
? process.emit(type, rejection.value, rejection)
: process.emit(type, rejection);
};
- } else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {
- return (function(noop, self, CustomEvent) {
- var hasCustomEvent = false;
- try {
- var ev = new CustomEvent('unhandledRejection');
- hasCustomEvent = ev instanceof CustomEvent;
- } catch (e) {}
-
- return !hasCustomEvent ? noop : function(type, rejection) {
+ } else if(typeof self !== 'undefined' && hasCustomEvent()) {
+ return (function (self, CustomEvent) {
+ return function (type, rejection) {
var ev = new CustomEvent(type, {
detail: {
reason: rejection.value,
@@ -2736,7 +2762,19 @@ define(function() {
return !self.dispatchEvent(ev);
};
- }(noop, self, CustomEvent));
+ }(self, CustomEvent));
+ } else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {
+ return (function(self, document) {
+ return function(type, rejection) {
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent(type, false, true, {
+ reason: rejection.value,
+ key: rejection
+ });
+
+ return !self.dispatchEvent(ev);
+ };
+ }(self, document));
}
return noop;
diff --git a/node_modules/when/dist/browser/when.debug.js.map b/node_modules/when/dist/browser/when.debug.js.map
index f8fb33227..8f46e36d0 100644
--- a/node_modules/when/dist/browser/when.debug.js.map
+++ b/node_modules/when/dist/browser/when.debug.js.map
@@ -42,7 +42,7 @@
"when.js"
],
"names": [],
- "mappings": ";AAAA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
+ "mappings": ";AAAA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC37BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
"sourcesContent": [
"require('../monitor/console');\nmodule.exports = require('./when.browserify.js');\n\n",
"var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n",
@@ -56,7 +56,7 @@
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\tvar h = Promise._handler(p);\n\t\t\tif(h.state() === 0) {\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\th._unreport();\n\t\t\treturn state.inspect(h);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\t// Optimize the case where we get an already-resolved when.js promise\n\t\t\t// by extracting its state:\n\t\t\tvar handler;\n\t\t\tif (p instanceof Promise) {\n\t\t\t\t// This is our own Promise type and we can reach its handler internals:\n\t\t\t\thandler = p._handler.join();\n\t\t\t}\n\t\t\tif((handler && handler.state() === 0) || !handler) {\n\t\t\t\t// Either still pending, or not a Promise at all:\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\t// The promise is our own, but it is already resolved. Take a shortcut.\n\t\t\t// Since we're not actually handling the resolution, we need to disable\n\t\t\t// rejection reporting.\n\t\t\thandler._unreport();\n\t\t\treturn state.inspect(handler);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
@@ -65,10 +65,10 @@
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar PromiseMonitor = require('./monitor/PromiseMonitor');\n\tvar ConsoleReporter = require('./monitor/ConsoleReporter');\n\n\tvar promiseMonitor = new PromiseMonitor(new ConsoleReporter());\n\n\treturn function(Promise) {\n\t\treturn promiseMonitor.monitor(Promise);\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar error = require('./error');\n\tvar unhandledRejectionsMsg = '[promises] Unhandled rejections: ';\n\tvar allHandledMsg = '[promises] All previously unhandled rejections have now been handled';\n\n\tfunction ConsoleReporter() {\n\t\tthis._previouslyReported = false;\n\t}\n\n\tConsoleReporter.prototype = initDefaultLogging();\n\n\tConsoleReporter.prototype.log = function(traces) {\n\t\tif(traces.length === 0) {\n\t\t\tif(this._previouslyReported) {\n\t\t\t\tthis._previouslyReported = false;\n\t\t\t\tthis.msg(allHandledMsg);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._previouslyReported = true;\n\t\tthis.groupStart(unhandledRejectionsMsg + traces.length);\n\t\ttry {\n\t\t\tthis._log(traces);\n\t\t} finally {\n\t\t\tthis.groupEnd();\n\t\t}\n\t};\n\n\tConsoleReporter.prototype._log = function(traces) {\n\t\tfor(var i=0; i<traces.length; ++i) {\n\t\t\tthis.warn(error.format(traces[i]));\n\t\t}\n\t};\n\n\tfunction initDefaultLogging() {\n\t\t/*jshint maxcomplexity:7*/\n\t\tvar log, warn, groupStart, groupEnd;\n\n\t\tif(typeof console === 'undefined') {\n\t\t\tlog = warn = consoleNotAvailable;\n\t\t} else {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tvar localConsole = console;\n\t\t\tif(typeof localConsole.error === 'function'\n\t\t\t\t&& typeof localConsole.dir === 'function') {\n\t\t\t\twarn = function(s) {\n\t\t\t\t\tlocalConsole.error(s);\n\t\t\t\t};\n\n\t\t\t\tlog = function(s) {\n\t\t\t\t\tlocalConsole.log(s);\n\t\t\t\t};\n\n\t\t\t\tif(typeof localConsole.groupCollapsed === 'function') {\n\t\t\t\t\tgroupStart = function(s) {\n\t\t\t\t\t\tlocalConsole.groupCollapsed(s);\n\t\t\t\t\t};\n\t\t\t\t\tgroupEnd = function() {\n\t\t\t\t\t\tlocalConsole.groupEnd();\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// IE8 has console.log and JSON, so we can make a\n\t\t\t\t// reasonably useful warn() from those.\n\t\t\t\t// Credit to webpro (https://github.com/webpro) for this idea\n\t\t\t\t// typeof localConsole.log will return 'object' in IE8, so can't test it with === 'function'\n\t\t\t\t// Since this is more of a corner case for IE8, I'm ok to check it with !== 'undefined' to reduce complexity\n\t\t\t\tif (typeof localConsole.log !== 'undefined' && typeof JSON !== 'undefined') {\n\t\t\t\t\tlog = warn = function(x) {\n\t\t\t\t\t\tif (typeof x !== 'string') {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tx = JSON.stringify(x);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlocalConsole.log(x);\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tlog = warn = consoleNotAvailable;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmsg: log,\n\t\t\twarn: warn,\n\t\t\tgroupStart: groupStart || warn,\n\t\t\tgroupEnd: groupEnd || consoleNotAvailable\n\t\t};\n\t}\n\n\tfunction consoleNotAvailable() {}\n\n\treturn ConsoleReporter;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
@@ -83,5 +83,5 @@
"/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n"
],
- "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83"
+ "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08"
} \ No newline at end of file
diff --git a/node_modules/when/dist/browser/when.js b/node_modules/when/dist/browser/when.js
index a043da5a4..19990d370 100644
--- a/node_modules/when/dist/browser/when.js
+++ b/node_modules/when/dist/browser/when.js
@@ -1087,13 +1087,23 @@ define(function(require) {
}
function settleOne(p) {
- var h = Promise._handler(p);
- if(h.state() === 0) {
+ // Optimize the case where we get an already-resolved when.js promise
+ // by extracting its state:
+ var handler;
+ if (p instanceof Promise) {
+ // This is our own Promise type and we can reach its handler internals:
+ handler = p._handler.join();
+ }
+ if((handler && handler.state() === 0) || !handler) {
+ // Either still pending, or not a Promise at all:
return toPromise(p).then(state.fulfilled, state.rejected);
}
- h._unreport();
- return state.inspect(h);
+ // The promise is our own, but it is already resolved. Take a shortcut.
+ // Since we're not actually handling the resolution, we need to disable
+ // rejection reporting.
+ handler._unreport();
+ return state.inspect(handler);
}
/**
@@ -1700,8 +1710,8 @@ define(function(require) {
}
function hasMutationObserver () {
- return (typeof MutationObserver === 'function' && MutationObserver) ||
- (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
+ return (typeof MutationObserver !== 'undefined' && MutationObserver) ||
+ (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);
}
function initMutationObserver(MutationObserver) {
@@ -2698,6 +2708,28 @@ define(function() {
function noop() {}
+ function hasCustomEvent() {
+ if(typeof CustomEvent === 'function') {
+ try {
+ var ev = new CustomEvent('unhandledRejection');
+ return ev instanceof CustomEvent;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
+ function hasInternetExplorerCustomEvent() {
+ if(typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ try {
+ // Try to create one event to make sure it's supported
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent('eventType', false, true, {});
+ return true;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
function initEmitRejection() {
/*global process, self, CustomEvent*/
if(typeof process !== 'undefined' && process !== null
@@ -2711,15 +2743,9 @@ define(function() {
? process.emit(type, rejection.value, rejection)
: process.emit(type, rejection);
};
- } else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {
- return (function(noop, self, CustomEvent) {
- var hasCustomEvent = false;
- try {
- var ev = new CustomEvent('unhandledRejection');
- hasCustomEvent = ev instanceof CustomEvent;
- } catch (e) {}
-
- return !hasCustomEvent ? noop : function(type, rejection) {
+ } else if(typeof self !== 'undefined' && hasCustomEvent()) {
+ return (function (self, CustomEvent) {
+ return function (type, rejection) {
var ev = new CustomEvent(type, {
detail: {
reason: rejection.value,
@@ -2731,7 +2757,19 @@ define(function() {
return !self.dispatchEvent(ev);
};
- }(noop, self, CustomEvent));
+ }(self, CustomEvent));
+ } else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {
+ return (function(self, document) {
+ return function(type, rejection) {
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent(type, false, true, {
+ reason: rejection.value,
+ key: rejection
+ });
+
+ return !self.dispatchEvent(ev);
+ };
+ }(self, document));
}
return noop;
diff --git a/node_modules/when/dist/browser/when.js.map b/node_modules/when/dist/browser/when.js.map
index 715207b8b..3cc3631ec 100644
--- a/node_modules/when/dist/browser/when.js.map
+++ b/node_modules/when/dist/browser/when.js.map
@@ -36,7 +36,7 @@
"when.js"
],
"names": [],
- "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
+ "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC37BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
"sourcesContent": [
"var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n",
"/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for interacting with 'traditional',\n * callback-taking functions using a promise interface.\n *\n * @author Renato Zannon\n * @contributor Brian Cavalier\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar _liftAll = require('./lib/liftAll');\n\tvar slice = Array.prototype.slice;\n\n\tvar makeApply = require('./lib/apply');\n\tvar _apply = makeApply(Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tpromisify: promisify\n\t};\n\n\t/**\n\t * Takes a `traditional` callback-taking function and returns a promise for its\n\t * result, accepting an optional array of arguments (that might be values or\n\t * promises). It assumes that the function takes its callback and errback as\n\t * the last two arguments. The resolution of the promise depends on whether the\n\t * function will call its callback or its errback.\n\t *\n\t * @example\n\t * var domIsLoaded = callbacks.apply($);\n\t * domIsLoaded.then(function() {\n\t *\t\tdoMyDomStuff();\n\t *\t});\n\t *\n\t * @example\n\t * function existingAjaxyFunction(url, callback, errback) {\n\t *\t\t// Complex logic you'd rather not change\n\t *\t}\n\t *\n\t * var promise = callbacks.apply(existingAjaxyFunction, [\"/movies.json\"]);\n\t *\n\t * promise.then(function(movies) {\n\t *\t\t// Work with movies\n\t *\t}, function(reason) {\n\t *\t\t// Handle error\n\t *\t});\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction apply(asyncFunction, extraAsyncArgs) {\n\t\treturn _apply(asyncFunction, this, extraAsyncArgs || []);\n\t}\n\n\t/**\n\t * Apply helper that allows specifying thisArg\n\t * @private\n\t */\n\tfunction dispatch(f, thisArg, args, h) {\n\t\targs.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h));\n\t\ttryCatchResolve(f, thisArg, args, h);\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tf.apply(thisArg, args);\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Works as `callbacks.apply` does, with the difference that the arguments to\n\t * the function are passed individually, instead of as an array.\n\t *\n\t * @example\n\t * function sumInFiveSeconds(a, b, callback) {\n\t *\t\tsetTimeout(function() {\n\t *\t\t\tcallback(a + b);\n\t *\t\t}, 5000);\n\t *\t}\n\t *\n\t * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10);\n\t *\n\t * // Logs '15' 5 seconds later\n\t * sumPromise.then(console.log);\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {...*} args arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction call(asyncFunction/*, arg1, arg2...*/) {\n\t\treturn _apply(asyncFunction, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a 'traditional' callback/errback-taking function and returns a function\n\t * that returns a promise instead. The resolution/rejection of the promise\n\t * depends on whether the original function will call its callback or its\n\t * errback.\n\t *\n\t * If additional arguments are passed to the `lift` call, they will be prepended\n\t * on the calls to the original function, much like `Function.prototype.bind`.\n\t *\n\t * The resulting function is also \"promise-aware\", in the sense that, if given\n\t * promises as arguments, it will wait for their resolution before executing.\n\t *\n\t * @example\n\t * function traditionalAjax(method, url, callback, errback) {\n\t *\t\tvar xhr = new XMLHttpRequest();\n\t *\t\txhr.open(method, url);\n\t *\n\t *\t\txhr.onload = callback;\n\t *\t\txhr.onerror = errback;\n\t *\n\t *\t\txhr.send();\n\t *\t}\n\t *\n\t * var promiseAjax = callbacks.lift(traditionalAjax);\n\t * promiseAjax(\"GET\", \"/movies.json\").then(console.log, console.error);\n\t *\n\t * var promiseAjaxGet = callbacks.lift(traditionalAjax, \"GET\");\n\t * promiseAjaxGet(\"/movies.json\").then(console.log, console.error);\n\t *\n\t * @param {Function} f traditional async function to be decorated\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f/*, args...*/) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * `promisify` is a version of `lift` that allows fine-grained control over the\n\t * arguments that passed to the underlying function. It is intended to handle\n\t * functions that don't follow the common callback and errback positions.\n\t *\n\t * The control is done by passing an object whose 'callback' and/or 'errback'\n\t * keys, whose values are the corresponding 0-based indexes of the arguments on\n\t * the function. Negative values are interpreted as being relative to the end\n\t * of the arguments array.\n\t *\n\t * If arguments are given on the call to the 'promisified' function, they are\n\t * intermingled with the callback and errback. If a promise is given among them,\n\t * the execution of the function will only occur after its resolution.\n\t *\n\t * @example\n\t * var delay = callbacks.promisify(setTimeout, {\n\t *\t\tcallback: 0\n\t *\t});\n\t *\n\t * delay(100).then(function() {\n\t *\t\tconsole.log(\"This happens 100ms afterwards\");\n\t *\t});\n\t *\n\t * @example\n\t * function callbackAsLast(errback, followsStandards, callback) {\n\t *\t\tif(followsStandards) {\n\t *\t\t\tcallback(\"well done!\");\n\t *\t\t} else {\n\t *\t\t\terrback(\"some programmers just want to watch the world burn\");\n\t *\t\t}\n\t *\t}\n\t *\n\t * var promisified = callbacks.promisify(callbackAsLast, {\n\t *\t\tcallback: -1,\n\t *\t\terrback: 0,\n\t *\t});\n\t *\n\t * promisified(true).then(console.log, console.error);\n\t * promisified(false).then(console.log, console.error);\n\t *\n\t * @param {Function} asyncFunction traditional function to be decorated\n\t * @param {object} positions\n\t * @param {number} [positions.callback] index at which asyncFunction expects to\n\t * receive a success callback\n\t * @param {number} [positions.errback] index at which asyncFunction expects to\n\t * receive an error callback\n\t * @returns {function} promisified function that accepts\n\t *\n\t * @deprecated\n\t */\n\tfunction promisify(asyncFunction, positions) {\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\treturn Promise.all(arguments).then(function(args) {\n\t\t\t\tvar p = Promise._defer();\n\n\t\t\t\tvar callbackPos, errbackPos;\n\n\t\t\t\tif(typeof positions.callback === 'number') {\n\t\t\t\t\tcallbackPos = normalizePosition(args, positions.callback);\n\t\t\t\t}\n\n\t\t\t\tif(typeof positions.errback === 'number') {\n\t\t\t\t\terrbackPos = normalizePosition(args, positions.errback);\n\t\t\t\t}\n\n\t\t\t\tif(errbackPos < callbackPos) {\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t} else {\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t}\n\n\t\t\t\tasyncFunction.apply(thisArg, args);\n\n\t\t\t\treturn p;\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction normalizePosition(args, pos) {\n\t\treturn pos < 0 ? (args.length + pos + 2) : pos;\n\t}\n\n\tfunction insertCallback(args, pos, callback, thisArg) {\n\t\tif(typeof pos === 'number') {\n\t\t\targs.splice(pos, 0, alwaysUnary(callback, thisArg));\n\t\t}\n\t}\n\n\tfunction alwaysUnary(fn, thisArg) {\n\t\treturn function() {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfn.call(thisArg, slice.call(arguments));\n\t\t\t} else {\n\t\t\t\tfn.apply(thisArg, arguments);\n\t\t\t}\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n",
@@ -49,7 +49,7 @@
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\tvar h = Promise._handler(p);\n\t\t\tif(h.state() === 0) {\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\th._unreport();\n\t\t\treturn state.inspect(h);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\t// Optimize the case where we get an already-resolved when.js promise\n\t\t\t// by extracting its state:\n\t\t\tvar handler;\n\t\t\tif (p instanceof Promise) {\n\t\t\t\t// This is our own Promise type and we can reach its handler internals:\n\t\t\t\thandler = p._handler.join();\n\t\t\t}\n\t\t\tif((handler && handler.state() === 0) || !handler) {\n\t\t\t\t// Either still pending, or not a Promise at all:\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\t// The promise is our own, but it is already resolved. Take a shortcut.\n\t\t\t// Since we're not actually handling the resolution, we need to disable\n\t\t\t// rejection reporting.\n\t\t\thandler._unreport();\n\t\t\treturn state.inspect(handler);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
@@ -58,10 +58,10 @@
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2013 original author or authors */\n\n/**\n * Collection of helpers for interfacing with node-style asynchronous functions\n * using promises.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar _liftAll = require('./lib/liftAll');\n\tvar setTimer = require('./lib/env').setTimer;\n\tvar slice = Array.prototype.slice;\n\n\tvar _apply = require('./lib/apply')(when.Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tcreateCallback: createCallback,\n\t\tbindCallback: bindCallback,\n\t\tliftCallback: liftCallback\n\t};\n\n\t/**\n\t * Takes a node-style async function and calls it immediately (with an optional\n\t * array of arguments or promises for arguments). It returns a promise whose\n\t * resolution depends on whether the async functions calls its callback with the\n\t * conventional error argument or not.\n\t *\n\t * With this it becomes possible to leverage existing APIs while still reaping\n\t * the benefits of promises.\n\t *\n\t * @example\n\t * function onlySmallNumbers(n, callback) {\n\t *\t\tif(n < 10) {\n\t *\t\t\tcallback(null, n + 10);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * var nodefn = require(\"when/node/function\");\n\t *\n\t * // Logs '15'\n\t * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction apply(f, args) {\n\t\treturn _apply(f, this, args || []);\n\t}\n\n\tfunction dispatch(f, thisArg, args, h) {\n\t\tvar cb = createCallback(h);\n\t\ttry {\n\t\t\tswitch(args.length) {\n\t\t\t\tcase 2: f.call(thisArg, args[0], args[1], cb); break;\n\t\t\t\tcase 1: f.call(thisArg, args[0], cb); break;\n\t\t\t\tcase 0: f.call(thisArg, cb); break;\n\t\t\t\tdefault:\n\t\t\t\t\targs.push(cb);\n\t\t\t\t\tf.apply(thisArg, args);\n\t\t\t}\n\t\t} catch(e) {\n\t\t\th.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Has the same behavior that {@link apply} has, with the difference that the\n\t * arguments to the function are provided individually, while {@link apply} accepts\n\t * a single array.\n\t *\n\t * @example\n\t * function sumSmallNumbers(x, y, callback) {\n\t *\t\tvar result = x + y;\n\t *\t\tif(result < 10) {\n\t *\t\t\tcallback(null, result);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * // Logs '5'\n\t * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {...*} [args] arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction call(f /*, args... */) {\n\t\treturn _apply(f, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a node-style function and returns new function that wraps the\n\t * original and, instead of taking a callback, returns a promise. Also, it\n\t * knows how to handle promises given as arguments, waiting for their\n\t * resolution before executing.\n\t *\n\t * Upon execution, the orginal function is executed as well. If it passes\n\t * a truthy value as the first argument to the callback, it will be\n\t * interpreted as an error condition, and the promise will be rejected\n\t * with it. Otherwise, the call is considered a resolution, and the promise\n\t * is resolved with the callback's second argument.\n\t *\n\t * @example\n\t * var fs = require(\"fs\"), nodefn = require(\"when/node/function\");\n\t *\n\t * var promiseRead = nodefn.lift(fs.readFile);\n\t *\n\t * // The promise is resolved with the contents of the file if everything\n\t * // goes ok\n\t * promiseRead('exists.txt').then(console.log, console.error);\n\t *\n\t * // And will be rejected if something doesn't work out\n\t * // (e.g. the files does not exist)\n\t * promiseRead('doesnt_exist.txt').then(console.log, console.error);\n\t *\n\t *\n\t * @param {Function} f node-style function to be lifted\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args1 = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\t// TODO: Simplify once partialing has been removed\n\t\t\tvar l = args1.length;\n\t\t\tvar al = arguments.length;\n\t\t\tvar args = new Array(al + l);\n\t\t\tvar i;\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\targs[i] = args1[i];\n\t\t\t}\n\t\t\tfor(i=0; i<al; ++i) {\n\t\t\t\targs[i+l] = arguments[i];\n\t\t\t}\n\t\t\treturn _apply(f, this, args);\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Takes an object that responds to the resolver interface, and returns\n\t * a function that will resolve or reject it depending on how it is called.\n\t *\n\t * @example\n\t *\tfunction callbackTakingFunction(callback) {\n\t *\t\tif(somethingWrongHappened) {\n\t *\t\t\tcallback(error);\n\t *\t\t} else {\n\t *\t\t\tcallback(null, interestingValue);\n\t *\t\t}\n\t *\t}\n\t *\n\t *\tvar when = require('when'), nodefn = require('when/node/function');\n\t *\n\t *\tvar deferred = when.defer();\n\t *\tcallbackTakingFunction(nodefn.createCallback(deferred.resolver));\n\t *\n\t *\tdeferred.promise.then(function(interestingValue) {\n\t *\t\t// Use interestingValue\n\t *\t});\n\t *\n\t * @param {Resolver} resolver that will be 'attached' to the callback\n\t * @returns {Function} a node-style callback function\n\t */\n\tfunction createCallback(resolver) {\n\t\treturn function(err, value) {\n\t\t\tif(err) {\n\t\t\t\tresolver.reject(err);\n\t\t\t} else if(arguments.length > 2) {\n\t\t\t\tresolver.resolve(slice.call(arguments, 1));\n\t\t\t} else {\n\t\t\t\tresolver.resolve(value);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Attaches a node-style callback to a promise, ensuring the callback is\n\t * called for either fulfillment or rejection. Returns a promise with the same\n\t * state as the passed-in promise.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tbindCallback(deferred.promise, callback);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Promise} promise The promise to be attached to.\n\t * @param {Function} callback The node-style callback to attach.\n\t * @returns {Promise} A promise with the same state as the passed-in promise.\n\t */\n\tfunction bindCallback(promise, callback) {\n\t\tpromise = when(promise);\n\n\t\tif (callback) {\n\t\t\tpromise.then(success, wrapped);\n\t\t}\n\n\t\treturn promise;\n\n\t\tfunction success(value) {\n\t\t\twrapped(null, value);\n\t\t}\n\n\t\tfunction wrapped(err, value) {\n\t\t\tsetTimer(function () {\n\t\t\t\tcallback(err, value);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Takes a node-style callback and returns new function that accepts a\n\t * promise, calling the original callback when the promise is either\n\t * fulfilled or rejected with the appropriate arguments.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tvar wrapped = liftCallback(callback);\n\t *\n\t *\t// `wrapped` can now be passed around at will\n\t *\twrapped(deferred.promise);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Function} callback The node-style callback to wrap.\n\t * @returns {Function} The lifted, promise-accepting function.\n\t */\n\tfunction liftCallback(callback) {\n\t\treturn function(promise) {\n\t\t\treturn bindCallback(promise, callback);\n\t\t};\n\t}\n});\n\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n\n",
"/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * parallel.js\n *\n * Run a set of task functions in parallel. All tasks will\n * receive the same args\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in parallel\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for array containing the\n\t * result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function parallel(tasks /*, args... */) {\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.map(tasks, function(task) {\n\t\t\t\treturn task.apply(void 0, args);\n\t\t\t});\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n",
@@ -71,5 +71,5 @@
"/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n"
],
- "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83"
+ "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08"
} \ No newline at end of file
diff --git a/node_modules/when/dist/browser/when.min.js b/node_modules/when/dist/browser/when.min.js
index 26ff0f00b..c6169280e 100644
--- a/node_modules/when/dist/browser/when.min.js
+++ b/node_modules/when/dist/browser/when.min.js
@@ -1,2 +1,2 @@
-!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.when=t():"undefined"!=typeof global?global.when=t():"undefined"!=typeof self&&(self.when=t())}(function(){var t;return function n(t,e,r){function o(u,c){if(!e[u]){if(!t[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var a=e[u]={exports:{}};t[u][0].call(a.exports,function(n){var e=t[u][1][n];return o(e?e:n)},a,a.exports,n,t,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t,n,e){var r=n.exports=t("../when");r.callbacks=t("../callbacks"),r.cancelable=t("../cancelable"),r.delay=t("../delay"),r.fn=t("../function"),r.guard=t("../guard"),r.keys=t("../keys"),r.nodefn=r.node=t("../node"),r.parallel=t("../parallel"),r.pipeline=t("../pipeline"),r.poll=t("../poll"),r.sequence=t("../sequence"),r.timeout=t("../timeout")},{"../callbacks":2,"../cancelable":3,"../delay":4,"../function":5,"../guard":6,"../keys":7,"../node":26,"../parallel":27,"../pipeline":28,"../poll":29,"../sequence":30,"../timeout":31,"../when":32}],2:[function(n,e,r){!function(t){t(function(t){function n(t,n){return v(t,this,n||[])}function e(t,n,e,o){e.push(s(o.resolve,o),s(o.reject,o)),r(t,n,e,o)}function r(t,n,e,r){try{t.apply(n,e)}catch(o){r.reject(o)}}function o(t){return v(t,this,d.call(arguments,1))}function i(t){var n=arguments.length>1?d.call(arguments,1):[];return function(){return v(t,this,n.concat(d.call(arguments)))}}function u(t,n,e){return p(i,n,e,t)}function c(t,n){return function(){var e=this;return h.all(arguments).then(function(r){var o,i,u=h._defer();return"number"==typeof n.callback&&(o=f(r,n.callback)),"number"==typeof n.errback&&(i=f(r,n.errback)),o>i?(a(r,i,u._handler.reject,u._handler),a(r,o,u._handler.resolve,u._handler)):(a(r,o,u._handler.resolve,u._handler),a(r,i,u._handler.reject,u._handler)),t.apply(e,r),u})}}function f(t,n){return 0>n?t.length+n+2:n}function a(t,n,e,r){"number"==typeof n&&t.splice(n,0,s(e,r))}function s(t,n){return function(){arguments.length>1?t.call(n,d.call(arguments)):t.apply(n,arguments)}}var l=t("./when"),h=l.Promise,p=t("./lib/liftAll"),d=Array.prototype.slice,y=t("./lib/apply"),v=y(h,e);return{lift:i,liftAll:u,apply:n,call:o,promisify:c}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/liftAll":23,"./when":32}],3:[function(n,e,r){!function(t){t(function(){return function(t,n){return t.cancel=function(){try{t.reject(n(t))}catch(e){t.reject(e)}return t.promise},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],4:[function(n,e,r){!function(t){t(function(t){var n=t("./when");return function(t,e){return n(e).delay(t)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],5:[function(n,e,r){!function(t){t(function(t){function n(t,n){return f(t,this,null==n?[]:a.call(n))}function e(t){var n=arguments.length>1?a.call(arguments,1):[];return function(){return f(t,this,n.concat(a.call(arguments)))}}function r(t,n,r){return c(e,n,r,t)}function o(t){var n=a.call(arguments,1);return function(){var e=this,r=a.call(arguments),o=u.apply(e,[t].concat(r));return i.reduce(n,function(t,n){return n.call(e,t)},o)}}var i=t("./when"),u=i["try"],c=t("./lib/liftAll"),f=t("./lib/apply")(i.Promise),a=Array.prototype.slice;return{lift:e,liftAll:r,call:u,apply:n,compose:o}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/liftAll":23,"./when":32}],6:[function(n,e,r){!function(t){t(function(t){function n(t,n){return function(){var e=o.call(arguments);return r(t()).withThis(this).then(function(t){return r(n.apply(this,e))["finally"](t)})}}function e(t){function n(){e=Math.max(e-1,0),o.length>0&&o.shift()(n)}var e=0,o=[];return function(){return r.promise(function(r){t>e?r(n):o.push(r),e+=1})}}var r=t("./when"),o=Array.prototype.slice;return n.n=e,n})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],7:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t){function n(t,n,e){this[t]=n,0===--f&&e.resolve(i)}for(var e,r=u._defer(),o=u._handler(r),i={},c=Object.keys(t),f=c.length,a=0;a<c.length;++a)e=c[a],u._handler(t[e]).fold(n,e,i,o);return 0===f&&o.resolve(i),r}function e(t,e){function r(t,n){return e(n,t)}return c(t).then(function(t){return n(Object.keys(t).reduce(function(n,e){return n[e]=c(t[e]).fold(r,e),n},{}))})}function r(t){var n=Object.keys(t),e={};if(0===n.length)return c(e);var r=u._defer(),f=u._handler(r),a=n.map(function(n){return t[n]});return i.settle(a).then(function(t){o(n,t,e,f)}),r}function o(t,n,e,r){for(var o=0;o<t.length;o++)e[t[o]]=n[o];r.resolve(e)}var i=t("./when"),u=i.Promise,c=i.resolve;return{all:i.lift(n),map:e,settle:r}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],8:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("./makePromise"),e=t("./Scheduler"),r=t("./env").asap;return n({scheduler:new e(r)})})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./Scheduler":9,"./env":21,"./makePromise":24}],9:[function(n,e,r){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var n=this;this.drain=function(){n._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],10:[function(n,e,r){!function(t){"use strict";t(function(){function t(n){Error.call(this),this.message=n,this.name=t.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],11:[function(n,e,r){!function(t){"use strict";t(function(){function t(t,e){function r(n,r,i){var u=t._defer(),c=i.length,f=new Array(c);return o({f:n,thisArg:r,args:i,params:f,i:c-1,call:e},u._handler),u}function o(n,r){if(n.i<0)return e(n.f,n.thisArg,n.params,r);var o=t._handler(n.args[n.i]);o.fold(i,n,void 0,r)}function i(t,n,e){t.params[t.i]=n,t.i-=1,o(t,e)}return arguments.length<2&&(e=n),r}function n(t,n,e,r){try{r.resolve(t.apply(n,e))}catch(o){r.reject(o)}}return t.tryCatchResolve=n,t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],12:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("../state"),e=t("../apply");return function(t){function r(n){function e(t){s=null,this.resolve(t)}function r(t){this.resolved||(s.push(t),0===--a&&this.reject(s))}for(var o,i,u=t._defer(),c=u._handler,f=n.length>>>0,a=f,s=[],l=0;f>l;++l)if(i=n[l],void 0!==i||l in n){if(o=t._handler(i),o.state()>0){c.become(o),t._visitRemaining(n,l,o);break}o.visit(c,e,r)}else--a;return 0===a&&c.reject(new RangeError("any(): array must not be empty")),u}function o(n,e){function r(t){this.resolved||(s.push(t),0===--p&&(l=null,this.resolve(s)))}function o(t){this.resolved||(l.push(t),0===--i&&(s=null,this.reject(l)))}var i,u,c,f=t._defer(),a=f._handler,s=[],l=[],h=n.length>>>0,p=0;for(c=0;h>c;++c)u=n[c],(void 0!==u||c in n)&&++p;for(e=Math.max(e,0),i=p-e+1,p=Math.min(e,p),e>p?a.reject(new RangeError("some(): array must contain at least "+e+" item(s), but had "+p)):0===p&&a.resolve(s),c=0;h>c;++c)u=n[c],(void 0!==u||c in n)&&t._handler(u).visit(a,r,o,a.notify);return f}function i(n,e){return t._traverse(e,n)}function u(n,e){var r=b.call(n);return t._traverse(e,r).then(function(t){return c(r,t)})}function c(n,e){for(var r=e.length,o=new Array(r),i=0,u=0;r>i;++i)e[i]&&(o[u++]=t._handler(n[i]).value);return o.length=u,o}function f(t){return y(t.map(a))}function a(e){var r=t._handler(e);return 0===r.state()?d(e).then(n.fulfilled,n.rejected):(r._unreport(),n.inspect(r))}function s(t,n){return arguments.length>2?v.call(t,h(n),arguments[2]):v.call(t,h(n))}function l(t,n){return arguments.length>2?m.call(t,h(n),arguments[2]):m.call(t,h(n))}function h(t){return function(n,e,r){return p(t,void 0,[n,e,r])}}var p=e(t),d=t.resolve,y=t.all,v=Array.prototype.reduce,m=Array.prototype.reduceRight,b=Array.prototype.slice;return t.any=r,t.some=o,t.settle=f,t.map=i,t.filter=u,t.reduce=s,t.reduceRight=l,t.prototype.spread=function(t){return this.then(y).then(function(n){return t.apply(this,n)})},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../apply":11,"../state":25}],13:[function(n,e,r){!function(t){"use strict";t(function(){function t(){throw new TypeError("catch predicate must be a function")}function n(t,n){return e(n)?t instanceof n:n(t)}function e(t){return t===Error||null!=t&&t.prototype instanceof Error}function r(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function o(t){return t}return function(e){function i(t,e){return function(r){return n(r,e)?t.call(this,r):a(r)}}function u(t,n,e,o){var i=t.call(n);return r(i)?c(i,e,o):e(o)}function c(t,n,e){return f(t).then(function(){return n(e)})}var f=e.resolve,a=e.reject,s=e.prototype["catch"];return e.prototype.done=function(t,n){this._handler.visit(this._handler.receiver,t,n)},e.prototype["catch"]=e.prototype.otherwise=function(n){return arguments.length<2?s.call(this,n):"function"!=typeof n?this.ensure(t):s.call(this,i(arguments[1],n))},e.prototype["finally"]=e.prototype.ensure=function(t){return"function"!=typeof t?this:this.then(function(n){return u(t,this,o,n)},function(n){return u(t,this,a,n)})},e.prototype["else"]=e.prototype.orElse=function(t){return this.then(void 0,function(){return t})},e.prototype["yield"]=function(t){return this.then(function(){return t})},e.prototype.tap=function(t){return this.then(t)["yield"](this)},e}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],14:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype.fold=function(n,e){var r=this._beget();return this._handler.fold(function(e,r,o){t._handler(e).fold(function(t,e,r){r.resolve(n.call(this,e,t))},r,this,o)},e,r._handler.receiver,r._handler),r},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],15:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("../state").inspect;return function(t){return t.prototype.inspect=function(){return n(t._handler(this))},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../state":25}],16:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){function n(t,n,r,o){return e(function(n){return[n,t(n)]},n,r,o)}function e(t,n,o,i){function u(i,u){return r(o(i)).then(function(){return e(t,n,o,u)})}return r(i).then(function(e){return r(n(e)).then(function(n){return n?e:r(t(e)).spread(u)})})}var r=t.resolve;return t.iterate=n,t.unfold=e,t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],17:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype.progress=function(t){return this.then(void 0,void 0,t)},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],18:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t,n,r,o){return e.setTimer(function(){t(r,o,n)},n)}var e=t("../env"),r=t("../TimeoutError");return function(t){function o(t,e,r){n(i,t,e,r)}function i(t,n){n.resolve(t)}function u(t,n,e){var o="undefined"==typeof t?new r("timed out after "+e+"ms"):t;n.reject(o)}return t.prototype.delay=function(t){var n=this._beget();return this._handler.fold(o,t,void 0,n._handler),n},t.prototype.timeout=function(t,r){var o=this._beget(),i=o._handler,c=n(u,t,r,o._handler);return this._handler.visit(i,function(t){e.clearTimer(c),this.resolve(t)},function(t){e.clearTimer(c),this.reject(t)},i.notify),o},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../TimeoutError":10,"../env":21}],19:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t){throw t}function e(){}var r=t("../env").setTimer,o=t("../format");return function(t){function i(t){t.handled||(p.push(t),s("Potentially unhandled rejection ["+t.id+"] "+o.formatError(t.value)))}function u(t){var n=p.indexOf(t);n>=0&&(p.splice(n,1),l("Handled previous rejection ["+t.id+"] "+o.formatObject(t.value)))}function c(t,n){h.push(t,n),null===d&&(d=r(f,0))}function f(){for(d=null;h.length>0;)h.shift()(h.shift())}var a,s=e,l=e;"undefined"!=typeof console&&(a=console,s="undefined"!=typeof a.error?function(t){a.error(t)}:function(t){a.log(t)},l="undefined"!=typeof a.info?function(t){a.info(t)}:function(t){a.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(n,t.value)};var h=[],p=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../env":21,"../format":22}],20:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype["with"]=t.prototype.withThis=function(t){var n=this._beget(),e=n._handler;return e.receiver=t,this._handler.chain(e,t),n},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],21:[function(n,e,r){!function(t){"use strict";t(function(t){function n(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function e(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function r(t){function n(){var t=e;e=void 0,t()}var e,r=document.createTextNode(""),o=new t(n);o.observe(r,{characterData:!0});var i=0;return function(t){e=t,r.data=i^=1}}var o,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,n){return setTimeout(t,n)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(n())f=function(t){return process.nextTick(t)};else if(o=e())f=r(o);else if(!i){var a=t,s=a("vertx");u=function(t,n){return s.setTimer(n,t)},c=s.cancelTimer,f=s.runOnLoop||s.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{}],22:[function(n,e,r){!function(t){"use strict";t(function(){function t(t){var e="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:n(t);return t instanceof Error?e:e+" (WARNING: non-Error used)"}function n(t){var n=String(t);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=e(t,n)),n}function e(t,n){try{return JSON.stringify(t)}catch(e){return n}}return{formatError:t,formatObject:n,tryStringify:e}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],23:[function(n,e,r){!function(t){"use strict";t(function(){function t(t,n,e){return t[e]=n,t}function n(t){return"function"==typeof t?t.bind():Object.create(t)}return function(e,r,o,i){return"undefined"==typeof r&&(r=t),Object.keys(i).reduce(function(t,n){var o=i[n];return"function"==typeof o?r(t,e(o),n):t},"undefined"==typeof o?n(i):o)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],24:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){function n(t,n){this._handler=t===g?n:e(t)}function e(t){function n(t){o.resolve(t)}function e(t){o.reject(t)}function r(t){o.notify(t)}var o=new w;try{t(n,e,r)}catch(i){e(i)}return o}function r(t){return L(t)?t:new n(g,new j(v(t)))}function o(t){return new n(g,new j(new A(t)))}function i(){return $}function u(){return new n(g,new w)}function c(t,n){var e=new w(t.receiver,t.join().context);return new n(g,e)}function f(t){return s(K,null,t)}function a(t,n){return s(N,t,n)}function s(t,e,r){function o(n,o,u){u.resolved||l(r,i,n,t(e,o,n),u)}function i(t,n,e){s[t]=n,0===--a&&e.become(new k(s))}for(var u,c="function"==typeof e?o:i,f=new w,a=r.length>>>0,s=new Array(a),h=0;h<r.length&&!f.resolved;++h)u=r[h],void 0!==u||h in r?l(r,c,h,u,f):--a;return 0===a&&f.become(new k(s)),new n(g,f)}function l(t,n,e,r,o){if(S(r)){var i=m(r),u=i.state();0===u?i.fold(n,e,void 0,o):u>0?n(e,i.value,o):(o.become(i),h(t,e+1,i))}else n(e,r,o)}function h(t,n,e){for(var r=n;r<t.length;++r)p(v(t[r]),e)}function p(t,n){if(t!==n){var e=t.state();0===e?t.visit(t,void 0,t._unreport):0>e&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?o(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?r(t[0]):y(t)}function y(t){var e,r,o,i=new w;for(e=0;e<t.length;++e)if(r=t[e],void 0!==r||e in t){if(o=v(r),0!==o.state()){i.become(o),h(t,e+1,o);break}o.visit(i,i.resolve,i.reject)}return new n(g,i)}function v(t){return L(t)?t._handler.join():S(t)?b(t):new k(t)}function m(t){return L(t)?t._handler.join():b(t)}function b(t){try{var n=t.then;return"function"==typeof n?new x(n,t):new k(t)}catch(e){return new A(e)}}function g(){}function _(){}function w(t,e){n.createContext(this,e),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function j(t){this.handler=t}function x(t,n){w.call(this),I.enqueue(new P(t,n,this))}function k(t){n.createContext(this),this.value=t}function A(t){n.createContext(this),this.id=++Y,this.value=t,this.handled=!1,this.reported=!1,this._report()}function T(t,n){this.rejection=t,this.context=n}function E(t){this.rejection=t}function R(){return new A(new TypeError("Promise cycle"))}function q(t,n){this.continuation=t,this.handler=n}function O(t,n){this.handler=n,this.value=t}function P(t,n,e){this._then=t,this.thenable=n,this.resolver=e}function C(t,n,e,r,o){try{t.call(n,e,r,o)}catch(i){r(i)}}function Q(t,n,e,r){this.f=t,this.z=n,this.c=e,this.to=r,this.resolver=X,this.receiver=this}function L(t){return t instanceof n}function S(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function M(t,e,r,o){return"function"!=typeof t?o.become(e):(n.enterContext(e),F(t,e.value,r,o),void n.exitContext())}function U(t,e,r,o,i){return"function"!=typeof t?i.become(r):(n.enterContext(r),W(t,e,r.value,o,i),void n.exitContext())}function H(t,e,r,o,i){return"function"!=typeof t?i.notify(e):(n.enterContext(r),z(t,e,o,i),void n.exitContext())}function N(t,n,e){try{return t(n,e)}catch(r){return o(r)}}function F(t,n,e,r){try{r.become(v(t.call(e,n)))}catch(o){r.become(new A(o))}}function W(t,n,e,r,o){try{t.call(r,n,e,o)}catch(i){o.become(new A(i))}}function z(t,n,e,r){try{r.notify(t.call(e,n))}catch(o){r.notify(o)}}function J(t,n){n.prototype=V(t.prototype),n.prototype.constructor=n}function K(t,n){return n}function D(){}function G(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,n){return"unhandledRejection"===t?process.emit(t,n.value,n):process.emit(t,n)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,n,e){var r=!1;try{var o=new e("unhandledRejection");r=o instanceof e}catch(i){}return r?function(t,r){var o=new e(t,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!n.dispatchEvent(o)}:t}(D,self,CustomEvent):D}var I=t.scheduler,B=G(),V=Object.create||function(t){function n(){}return n.prototype=t,new n};n.resolve=r,n.reject=o,n.never=i,n._defer=u,n._handler=v,n.prototype.then=function(t,n,e){var r=this._handler,o=r.join().state();if("function"!=typeof t&&o>0||"function"!=typeof n&&0>o)return new this.constructor(g,r);var i=this._beget(),u=i._handler;return r.chain(u,r.receiver,t,n,e),i},n.prototype["catch"]=function(t){return this.then(void 0,t)},n.prototype._beget=function(){return c(this._handler,this.constructor)},n.all=f,n.race=d,n._traverse=a,n._visitRemaining=h,g.prototype.when=g.prototype.become=g.prototype.notify=g.prototype.fail=g.prototype._unreport=g.prototype._report=D,g.prototype._state=0,g.prototype.state=function(){return this._state},g.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},g.prototype.chain=function(t,n,e,r,o){this.when({resolver:t,receiver:n,fulfilled:e,rejected:r,progress:o})},g.prototype.visit=function(t,n,e,r){this.chain(X,t,n,e,r)},g.prototype.fold=function(t,n,e,r){this.when(new Q(t,n,e,r))},J(g,_),_.prototype.become=function(t){t.fail()};var X=new _;J(g,w),w.prototype._state=0,w.prototype.resolve=function(t){this.become(v(t))},w.prototype.reject=function(t){this.resolved||this.become(new A(t))},w.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=R();return t},w.prototype.run=function(){var t=this.consumers,n=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var e=0;e<t.length;++e)n.when(t[e])},w.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&I.enqueue(this),void 0!==this.context&&t._report(this.context))},w.prototype.when=function(t){this.resolved?I.enqueue(new q(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},w.prototype.notify=function(t){this.resolved||I.enqueue(new O(t,this))},w.prototype.fail=function(t){var n="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(n)},w.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},w.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},J(g,j),j.prototype.when=function(t){I.enqueue(new q(t,this))},j.prototype._report=function(t){this.join()._report(t)},j.prototype._unreport=function(){this.join()._unreport()},J(w,x),J(g,k),k.prototype._state=1,k.prototype.fold=function(t,n,e,r){U(t,n,this,e,r)},k.prototype.when=function(t){M(t.fulfilled,this,t.receiver,t.resolver)};var Y=0;J(g,A),A.prototype._state=-1,A.prototype.fold=function(t,n,e,r){r.become(this)},A.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),M(t.rejected,this,t.receiver,t.resolver)},A.prototype._report=function(t){I.afterQueue(new T(this,t))},A.prototype._unreport=function(){this.handled||(this.handled=!0,I.afterQueue(new E(this)))},A.prototype.fail=function(t){this.reported=!0,B("unhandledRejection",this),n.onFatalRejection(this,void 0===t?this.context:t)},T.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,B("unhandledRejection",this.rejection)||n.onPotentiallyUnhandledRejection(this.rejection,this.context))},E.prototype.run=function(){this.rejection.reported&&(B("rejectionHandled",this.rejection)||n.onPotentiallyUnhandledRejectionHandled(this.rejection))},n.createContext=n.enterContext=n.exitContext=n.onPotentiallyUnhandledRejection=n.onPotentiallyUnhandledRejectionHandled=n.onFatalRejection=D;var Z=new g,$=new n(g,Z);return q.prototype.run=function(){this.handler.join().when(this.continuation)},O.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var n,e=0;e<t.length;++e)n=t[e],H(n.progress,this.value,this.handler,n.receiver,n.resolver)},P.prototype.run=function(){function t(t){r.resolve(t)}function n(t){r.reject(t)}function e(t){r.notify(t)}var r=this.resolver;C(this._then,this.thenable,t,n,e)},Q.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},Q.prototype.rejected=function(t){this.to.reject(t)},Q.prototype.progress=function(t){this.to.notify(t)},n}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],25:[function(n,e,r){!function(t){"use strict";t(function(){function t(){return{state:"pending"}}function n(t){return{state:"rejected",reason:t}}function e(t){return{state:"fulfilled",value:t}}function r(r){var o=r.state();return 0===o?t():o>0?e(r.value):n(r.value)}return{pending:t,fulfilled:e,rejected:n,inspect:r}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],26:[function(n,e,r){!function(t){t(function(t){function n(t,n){return p(t,this,n||[])}function e(t,n,e,r){var o=u(r);try{switch(e.length){case 2:t.call(n,e[0],e[1],o);break;case 1:t.call(n,e[0],o);break;case 0:t.call(n,o);break;default:e.push(o),t.apply(n,e)}}catch(i){r.reject(i)}}function r(t){return p(t,this,h.call(arguments,1))}function o(t){var n=arguments.length>1?h.call(arguments,1):[];return function(){var e,r=n.length,o=arguments.length,i=new Array(o+r);for(e=0;r>e;++e)i[e]=n[e];for(e=0;o>e;++e)i[e+r]=arguments[e];return p(t,this,i)}}function i(t,n,e){return s(o,n,e,t)}function u(t){return function(n,e){n?t.reject(n):arguments.length>2?t.resolve(h.call(arguments,1)):t.resolve(e)}}function c(t,n){function e(t){r(null,t)}function r(t,e){l(function(){n(t,e)},0)}return t=a(t),n&&t.then(e,r),t}function f(t){return function(n){return c(n,t)}}var a=t("./when"),s=t("./lib/liftAll"),l=t("./lib/env").setTimer,h=Array.prototype.slice,p=t("./lib/apply")(a.Promise,e);return{lift:o,liftAll:i,apply:n,call:r,createCallback:u,bindCallback:c,liftCallback:f}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/env":21,"./lib/liftAll":23,"./when":32}],27:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){return e(r.call(arguments,1)).then(function(e){return n.map(t,function(t){return t.apply(void 0,e)})})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],28:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){var o=function(t,n){return o=function(t,n){return n(t)},n.apply(null,t)};return e(r.call(arguments,1)).then(function(e){return n.reduce(t,function(t,n){return o(t,n)},e)})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],29:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("./when"),e=n["try"],r=t("./cancelable");return function(t,o,i,u){function c(t){s.resolve(t)}function f(t){e(o).then(a,h),void 0!==t&&s.notify(t)}function a(){l||n(t(),function(t){n(i(t),function(n){return n?c(t):f(t)},function(){f(t)})},h)}var s,l,h;return l=!1,s=r(n.defer(),function(){l=!0}),h=s.reject,i=i||function(){return!1},"function"!=typeof o&&(o=function(t){return function(){return n().delay(t)}}(o)),u?f():a(),s.promise=Object.create(s.promise),s.promise.cancel=s.cancel,s.promise}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./cancelable":3,"./when":32}],30:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){function o(t){return i.push(t),i}var i=[];return e(r.call(arguments,1)).then(function(e){return n.reduce(t,function(t,r){return n(r.apply(void 0,e),o)},i)})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],31:[function(n,e,r){!function(t){t(function(t){var n=t("./when");return function(t,e){return n(e).timeout(t)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],32:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t,n,e,r){var o=x.resolve(t);return arguments.length<2?o:o.then(n,e,r)}function e(t){return new x(t)}function r(t){return function(){for(var n=0,e=arguments.length,r=new Array(e);e>n;++n)r[n]=arguments[n];return k(t,this,r)}}function o(t){for(var n=0,e=arguments.length-1,r=new Array(e);e>n;++n)r[n]=arguments[n+1];return k(t,this,r)}function i(){return new u}function u(){function t(t){r._handler.resolve(t)}function n(t){r._handler.reject(t)}function e(t){r._handler.notify(t)}var r=x._defer();this.promise=r,this.resolve=t,this.reject=n,this.notify=e,this.resolver={resolve:t,reject:n,notify:e}}function c(t){return t&&"function"==typeof t.then}function f(){return x.all(arguments)}function a(t){return n(t,x.all)}function s(t){return n(t,x.settle)}function l(t,e){return n(t,function(t){return x.map(t,e)})}function h(t,e){return n(t,function(t){return x.filter(t,e)})}var p=t("./lib/decorators/timed"),d=t("./lib/decorators/array"),y=t("./lib/decorators/flow"),v=t("./lib/decorators/fold"),m=t("./lib/decorators/inspect"),b=t("./lib/decorators/iterate"),g=t("./lib/decorators/progress"),_=t("./lib/decorators/with"),w=t("./lib/decorators/unhandledRejection"),j=t("./lib/TimeoutError"),x=[d,y,v,b,g,m,_,p,w].reduce(function(t,n){return n(t)},t("./lib/Promise")),k=t("./lib/apply")(x);return n.promise=e,n.resolve=x.resolve,n.reject=x.reject,n.lift=r,n["try"]=o,n.attempt=o,n.iterate=x.iterate,n.unfold=x.unfold,n.join=f,n.all=a,n.settle=s,n.any=r(x.any),n.some=r(x.some),n.race=r(x.race),n.map=l,n.filter=h,n.reduce=r(x.reduce),n.reduceRight=r(x.reduceRight),n.isPromiseLike=c,n.Promise=x,n.defer=i,n.TimeoutError=j,n})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/Promise":8,"./lib/TimeoutError":10,"./lib/apply":11,"./lib/decorators/array":12,"./lib/decorators/flow":13,"./lib/decorators/fold":14,"./lib/decorators/inspect":15,"./lib/decorators/iterate":16,"./lib/decorators/progress":17,"./lib/decorators/timed":18,"./lib/decorators/unhandledRejection":19,"./lib/decorators/with":20}]},{},[1])(1)});
-//# sourceMappingURL=when.min.js.map \ No newline at end of file
+!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.when=t():"undefined"!=typeof global?global.when=t():"undefined"!=typeof self&&(self.when=t())}(function(){var t;return function n(t,e,r){function o(u,c){if(!e[u]){if(!t[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var a=e[u]={exports:{}};t[u][0].call(a.exports,function(n){var e=t[u][1][n];return o(e?e:n)},a,a.exports,n,t,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t,n,e){var r=n.exports=t("../when");r.callbacks=t("../callbacks"),r.cancelable=t("../cancelable"),r.delay=t("../delay"),r.fn=t("../function"),r.guard=t("../guard"),r.keys=t("../keys"),r.nodefn=r.node=t("../node"),r.parallel=t("../parallel"),r.pipeline=t("../pipeline"),r.poll=t("../poll"),r.sequence=t("../sequence"),r.timeout=t("../timeout")},{"../callbacks":2,"../cancelable":3,"../delay":4,"../function":5,"../guard":6,"../keys":7,"../node":26,"../parallel":27,"../pipeline":28,"../poll":29,"../sequence":30,"../timeout":31,"../when":32}],2:[function(n,e,r){!function(t){t(function(t){function n(t,n){return v(t,this,n||[])}function e(t,n,e,o){e.push(s(o.resolve,o),s(o.reject,o)),r(t,n,e,o)}function r(t,n,e,r){try{t.apply(n,e)}catch(o){r.reject(o)}}function o(t){return v(t,this,d.call(arguments,1))}function i(t){var n=arguments.length>1?d.call(arguments,1):[];return function(){return v(t,this,n.concat(d.call(arguments)))}}function u(t,n,e){return p(i,n,e,t)}function c(t,n){return function(){var e=this;return h.all(arguments).then(function(r){var o,i,u=h._defer();return"number"==typeof n.callback&&(o=f(r,n.callback)),"number"==typeof n.errback&&(i=f(r,n.errback)),o>i?(a(r,i,u._handler.reject,u._handler),a(r,o,u._handler.resolve,u._handler)):(a(r,o,u._handler.resolve,u._handler),a(r,i,u._handler.reject,u._handler)),t.apply(e,r),u})}}function f(t,n){return 0>n?t.length+n+2:n}function a(t,n,e,r){"number"==typeof n&&t.splice(n,0,s(e,r))}function s(t,n){return function(){arguments.length>1?t.call(n,d.call(arguments)):t.apply(n,arguments)}}var l=t("./when"),h=l.Promise,p=t("./lib/liftAll"),d=Array.prototype.slice,y=t("./lib/apply"),v=y(h,e);return{lift:i,liftAll:u,apply:n,call:o,promisify:c}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/liftAll":23,"./when":32}],3:[function(n,e,r){!function(t){t(function(){return function(t,n){return t.cancel=function(){try{t.reject(n(t))}catch(e){t.reject(e)}return t.promise},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],4:[function(n,e,r){!function(t){t(function(t){var n=t("./when");return function(t,e){return n(e).delay(t)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],5:[function(n,e,r){!function(t){t(function(t){function n(t,n){return f(t,this,null==n?[]:a.call(n))}function e(t){var n=arguments.length>1?a.call(arguments,1):[];return function(){return f(t,this,n.concat(a.call(arguments)))}}function r(t,n,r){return c(e,n,r,t)}function o(t){var n=a.call(arguments,1);return function(){var e=this,r=a.call(arguments),o=u.apply(e,[t].concat(r));return i.reduce(n,function(t,n){return n.call(e,t)},o)}}var i=t("./when"),u=i["try"],c=t("./lib/liftAll"),f=t("./lib/apply")(i.Promise),a=Array.prototype.slice;return{lift:e,liftAll:r,call:u,apply:n,compose:o}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/liftAll":23,"./when":32}],6:[function(n,e,r){!function(t){t(function(t){function n(t,n){return function(){var e=o.call(arguments);return r(t()).withThis(this).then(function(t){return r(n.apply(this,e))["finally"](t)})}}function e(t){function n(){e=Math.max(e-1,0),o.length>0&&o.shift()(n)}var e=0,o=[];return function(){return r.promise(function(r){t>e?r(n):o.push(r),e+=1})}}var r=t("./when"),o=Array.prototype.slice;return n.n=e,n})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],7:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t){function n(t,n,e){this[t]=n,0===--f&&e.resolve(i)}for(var e,r=u._defer(),o=u._handler(r),i={},c=Object.keys(t),f=c.length,a=0;a<c.length;++a)e=c[a],u._handler(t[e]).fold(n,e,i,o);return 0===f&&o.resolve(i),r}function e(t,e){function r(t,n){return e(n,t)}return c(t).then(function(t){return n(Object.keys(t).reduce(function(n,e){return n[e]=c(t[e]).fold(r,e),n},{}))})}function r(t){var n=Object.keys(t),e={};if(0===n.length)return c(e);var r=u._defer(),f=u._handler(r),a=n.map(function(n){return t[n]});return i.settle(a).then(function(t){o(n,t,e,f)}),r}function o(t,n,e,r){for(var o=0;o<t.length;o++)e[t[o]]=n[o];r.resolve(e)}var i=t("./when"),u=i.Promise,c=i.resolve;return{all:i.lift(n),map:e,settle:r}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],8:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("./makePromise"),e=t("./Scheduler"),r=t("./env").asap;return n({scheduler:new e(r)})})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./Scheduler":9,"./env":21,"./makePromise":24}],9:[function(n,e,r){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var n=this;this.drain=function(){n._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],10:[function(n,e,r){!function(t){"use strict";t(function(){function t(n){Error.call(this),this.message=n,this.name=t.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],11:[function(n,e,r){!function(t){"use strict";t(function(){function t(t,e){function r(n,r,i){var u=t._defer(),c=i.length,f=new Array(c);return o({f:n,thisArg:r,args:i,params:f,i:c-1,call:e},u._handler),u}function o(n,r){if(n.i<0)return e(n.f,n.thisArg,n.params,r);var o=t._handler(n.args[n.i]);o.fold(i,n,void 0,r)}function i(t,n,e){t.params[t.i]=n,t.i-=1,o(t,e)}return arguments.length<2&&(e=n),r}function n(t,n,e,r){try{r.resolve(t.apply(n,e))}catch(o){r.reject(o)}}return t.tryCatchResolve=n,t})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],12:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("../state"),e=t("../apply");return function(t){function r(n){function e(t){s=null,this.resolve(t)}function r(t){this.resolved||(s.push(t),0===--a&&this.reject(s))}for(var o,i,u=t._defer(),c=u._handler,f=n.length>>>0,a=f,s=[],l=0;f>l;++l)if(i=n[l],void 0!==i||l in n){if(o=t._handler(i),o.state()>0){c.become(o),t._visitRemaining(n,l,o);break}o.visit(c,e,r)}else--a;return 0===a&&c.reject(new RangeError("any(): array must not be empty")),u}function o(n,e){function r(t){this.resolved||(s.push(t),0===--p&&(l=null,this.resolve(s)))}function o(t){this.resolved||(l.push(t),0===--i&&(s=null,this.reject(l)))}var i,u,c,f=t._defer(),a=f._handler,s=[],l=[],h=n.length>>>0,p=0;for(c=0;h>c;++c)u=n[c],(void 0!==u||c in n)&&++p;for(e=Math.max(e,0),i=p-e+1,p=Math.min(e,p),e>p?a.reject(new RangeError("some(): array must contain at least "+e+" item(s), but had "+p)):0===p&&a.resolve(s),c=0;h>c;++c)u=n[c],(void 0!==u||c in n)&&t._handler(u).visit(a,r,o,a.notify);return f}function i(n,e){return t._traverse(e,n)}function u(n,e){var r=b.call(n);return t._traverse(e,r).then(function(t){return c(r,t)})}function c(n,e){for(var r=e.length,o=new Array(r),i=0,u=0;r>i;++i)e[i]&&(o[u++]=t._handler(n[i]).value);return o.length=u,o}function f(t){return y(t.map(a))}function a(e){var r;return e instanceof t&&(r=e._handler.join()),r&&0===r.state()||!r?d(e).then(n.fulfilled,n.rejected):(r._unreport(),n.inspect(r))}function s(t,n){return arguments.length>2?v.call(t,h(n),arguments[2]):v.call(t,h(n))}function l(t,n){return arguments.length>2?m.call(t,h(n),arguments[2]):m.call(t,h(n))}function h(t){return function(n,e,r){return p(t,void 0,[n,e,r])}}var p=e(t),d=t.resolve,y=t.all,v=Array.prototype.reduce,m=Array.prototype.reduceRight,b=Array.prototype.slice;return t.any=r,t.some=o,t.settle=f,t.map=i,t.filter=u,t.reduce=s,t.reduceRight=l,t.prototype.spread=function(t){return this.then(y).then(function(n){return t.apply(this,n)})},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../apply":11,"../state":25}],13:[function(n,e,r){!function(t){"use strict";t(function(){function t(){throw new TypeError("catch predicate must be a function")}function n(t,n){return e(n)?t instanceof n:n(t)}function e(t){return t===Error||null!=t&&t.prototype instanceof Error}function r(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function o(t){return t}return function(e){function i(t,e){return function(r){return n(r,e)?t.call(this,r):a(r)}}function u(t,n,e,o){var i=t.call(n);return r(i)?c(i,e,o):e(o)}function c(t,n,e){return f(t).then(function(){return n(e)})}var f=e.resolve,a=e.reject,s=e.prototype["catch"];return e.prototype.done=function(t,n){this._handler.visit(this._handler.receiver,t,n)},e.prototype["catch"]=e.prototype.otherwise=function(n){return arguments.length<2?s.call(this,n):"function"!=typeof n?this.ensure(t):s.call(this,i(arguments[1],n))},e.prototype["finally"]=e.prototype.ensure=function(t){return"function"!=typeof t?this:this.then(function(n){return u(t,this,o,n)},function(n){return u(t,this,a,n)})},e.prototype["else"]=e.prototype.orElse=function(t){return this.then(void 0,function(){return t})},e.prototype["yield"]=function(t){return this.then(function(){return t})},e.prototype.tap=function(t){return this.then(t)["yield"](this)},e}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],14:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype.fold=function(n,e){var r=this._beget();return this._handler.fold(function(e,r,o){t._handler(e).fold(function(t,e,r){r.resolve(n.call(this,e,t))},r,this,o)},e,r._handler.receiver,r._handler),r},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],15:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("../state").inspect;return function(t){return t.prototype.inspect=function(){return n(t._handler(this))},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../state":25}],16:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){function n(t,n,r,o){return e(function(n){return[n,t(n)]},n,r,o)}function e(t,n,o,i){function u(i,u){return r(o(i)).then(function(){return e(t,n,o,u)})}return r(i).then(function(e){return r(n(e)).then(function(n){return n?e:r(t(e)).spread(u)})})}var r=t.resolve;return t.iterate=n,t.unfold=e,t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],17:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype.progress=function(t){return this.then(void 0,void 0,t)},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],18:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t,n,r,o){return e.setTimer(function(){t(r,o,n)},n)}var e=t("../env"),r=t("../TimeoutError");return function(t){function o(t,e,r){n(i,t,e,r)}function i(t,n){n.resolve(t)}function u(t,n,e){var o="undefined"==typeof t?new r("timed out after "+e+"ms"):t;n.reject(o)}return t.prototype.delay=function(t){var n=this._beget();return this._handler.fold(o,t,void 0,n._handler),n},t.prototype.timeout=function(t,r){var o=this._beget(),i=o._handler,c=n(u,t,r,o._handler);return this._handler.visit(i,function(t){e.clearTimer(c),this.resolve(t)},function(t){e.clearTimer(c),this.reject(t)},i.notify),o},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../TimeoutError":10,"../env":21}],19:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t){throw t}function e(){}var r=t("../env").setTimer,o=t("../format");return function(t){function i(t){t.handled||(p.push(t),s("Potentially unhandled rejection ["+t.id+"] "+o.formatError(t.value)))}function u(t){var n=p.indexOf(t);n>=0&&(p.splice(n,1),l("Handled previous rejection ["+t.id+"] "+o.formatObject(t.value)))}function c(t,n){h.push(t,n),null===d&&(d=r(f,0))}function f(){for(d=null;h.length>0;)h.shift()(h.shift())}var a,s=e,l=e;"undefined"!=typeof console&&(a=console,s="undefined"!=typeof a.error?function(t){a.error(t)}:function(t){a.log(t)},l="undefined"!=typeof a.info?function(t){a.info(t)}:function(t){a.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(n,t.value)};var h=[],p=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"../env":21,"../format":22}],20:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){return t.prototype["with"]=t.prototype.withThis=function(t){var n=this._beget(),e=n._handler;return e.receiver=t,this._handler.chain(e,t),n},t}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],21:[function(n,e,r){!function(t){"use strict";t(function(t){function n(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function e(){return"undefined"!=typeof MutationObserver&&MutationObserver||"undefined"!=typeof WebKitMutationObserver&&WebKitMutationObserver}function r(t){function n(){var t=e;e=void 0,t()}var e,r=document.createTextNode(""),o=new t(n);o.observe(r,{characterData:!0});var i=0;return function(t){e=t,r.data=i^=1}}var o,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,n){return setTimeout(t,n)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(n())f=function(t){return process.nextTick(t)};else if(o=e())f=r(o);else if(!i){var a=t,s=a("vertx");u=function(t,n){return s.setTimer(n,t)},c=s.cancelTimer,f=s.runOnLoop||s.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{}],22:[function(n,e,r){!function(t){"use strict";t(function(){function t(t){var e="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:n(t);return t instanceof Error?e:e+" (WARNING: non-Error used)"}function n(t){var n=String(t);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=e(t,n)),n}function e(t,n){try{return JSON.stringify(t)}catch(e){return n}}return{formatError:t,formatObject:n,tryStringify:e}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],23:[function(n,e,r){!function(t){"use strict";t(function(){function t(t,n,e){return t[e]=n,t}function n(t){return"function"==typeof t?t.bind():Object.create(t)}return function(e,r,o,i){return"undefined"==typeof r&&(r=t),Object.keys(i).reduce(function(t,n){var o=i[n];return"function"==typeof o?r(t,e(o),n):t},"undefined"==typeof o?n(i):o)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],24:[function(n,e,r){!function(t){"use strict";t(function(){return function(t){function n(t,n){this._handler=t===g?n:e(t)}function e(t){function n(t){o.resolve(t)}function e(t){o.reject(t)}function r(t){o.notify(t)}var o=new w;try{t(n,e,r)}catch(i){e(i)}return o}function r(t){return L(t)?t:new n(g,new j(v(t)))}function o(t){return new n(g,new j(new k(t)))}function i(){return nt}function u(){return new n(g,new w)}function c(t,n){var e=new w(t.receiver,t.join().context);return new n(g,e)}function f(t){return s(K,null,t)}function a(t,n){return s(N,t,n)}function s(t,e,r){function o(n,o,u){u.resolved||l(r,i,n,t(e,o,n),u)}function i(t,n,e){s[t]=n,0===--a&&e.become(new E(s))}for(var u,c="function"==typeof e?o:i,f=new w,a=r.length>>>0,s=new Array(a),h=0;h<r.length&&!f.resolved;++h)u=r[h],void 0!==u||h in r?l(r,c,h,u,f):--a;return 0===a&&f.become(new E(s)),new n(g,f)}function l(t,n,e,r,o){if(S(r)){var i=m(r),u=i.state();0===u?i.fold(n,e,void 0,o):u>0?n(e,i.value,o):(o.become(i),h(t,e+1,i))}else n(e,r,o)}function h(t,n,e){for(var r=n;r<t.length;++r)p(v(t[r]),e)}function p(t,n){if(t!==n){var e=t.state();0===e?t.visit(t,void 0,t._unreport):0>e&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?o(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?r(t[0]):y(t)}function y(t){var e,r,o,i=new w;for(e=0;e<t.length;++e)if(r=t[e],void 0!==r||e in t){if(o=v(r),0!==o.state()){i.become(o),h(t,e+1,o);break}o.visit(i,i.resolve,i.reject)}return new n(g,i)}function v(t){return L(t)?t._handler.join():S(t)?b(t):new E(t)}function m(t){return L(t)?t._handler.join():b(t)}function b(t){try{var n=t.then;return"function"==typeof n?new x(n,t):new E(t)}catch(e){return new k(e)}}function g(){}function _(){}function w(t,e){n.createContext(this,e),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function j(t){this.handler=t}function x(t,n){w.call(this),V.enqueue(new O(t,n,this))}function E(t){n.createContext(this),this.value=t}function k(t){n.createContext(this),this.id=++$,this.value=t,this.handled=!1,this.reported=!1,this._report()}function A(t,n){this.rejection=t,this.context=n}function T(t){this.rejection=t}function C(){return new k(new TypeError("Promise cycle"))}function R(t,n){this.continuation=t,this.handler=n}function q(t,n){this.handler=n,this.value=t}function O(t,n,e){this._then=t,this.thenable=n,this.resolver=e}function P(t,n,e,r,o){try{t.call(n,e,r,o)}catch(i){r(i)}}function Q(t,n,e,r){this.f=t,this.z=n,this.c=e,this.to=r,this.resolver=Z,this.receiver=this}function L(t){return t instanceof n}function S(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function M(t,e,r,o){return"function"!=typeof t?o.become(e):(n.enterContext(e),F(t,e.value,r,o),void n.exitContext())}function U(t,e,r,o,i){return"function"!=typeof t?i.become(r):(n.enterContext(r),W(t,e,r.value,o,i),void n.exitContext())}function H(t,e,r,o,i){return"function"!=typeof t?i.notify(e):(n.enterContext(r),z(t,e,o,i),void n.exitContext())}function N(t,n,e){try{return t(n,e)}catch(r){return o(r)}}function F(t,n,e,r){try{r.become(v(t.call(e,n)))}catch(o){r.become(new k(o))}}function W(t,n,e,r,o){try{t.call(r,n,e,o)}catch(i){o.become(new k(i))}}function z(t,n,e,r){try{r.notify(t.call(e,n))}catch(o){r.notify(o)}}function J(t,n){n.prototype=Y(t.prototype),n.prototype.constructor=n}function K(t,n){return n}function D(){}function G(){if("function"==typeof CustomEvent)try{var t=new CustomEvent("unhandledRejection");return t instanceof CustomEvent}catch(n){}return!1}function I(){if("undefined"!=typeof document&&"function"==typeof document.createEvent)try{var t=document.createEvent("CustomEvent");return t.initCustomEvent("eventType",!1,!0,{}),!0}catch(n){}return!1}function B(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,n){return"unhandledRejection"===t?process.emit(t,n.value,n):process.emit(t,n)}:"undefined"!=typeof self&&G()?function(t,n){return function(e,r){var o=new n(e,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!t.dispatchEvent(o)}}(self,CustomEvent):"undefined"!=typeof self&&I()?function(t,n){return function(e,r){var o=n.createEvent("CustomEvent");return o.initCustomEvent(e,!1,!0,{reason:r.value,key:r}),!t.dispatchEvent(o)}}(self,document):D}var V=t.scheduler,X=B(),Y=Object.create||function(t){function n(){}return n.prototype=t,new n};n.resolve=r,n.reject=o,n.never=i,n._defer=u,n._handler=v,n.prototype.then=function(t,n,e){var r=this._handler,o=r.join().state();if("function"!=typeof t&&o>0||"function"!=typeof n&&0>o)return new this.constructor(g,r);var i=this._beget(),u=i._handler;return r.chain(u,r.receiver,t,n,e),i},n.prototype["catch"]=function(t){return this.then(void 0,t)},n.prototype._beget=function(){return c(this._handler,this.constructor)},n.all=f,n.race=d,n._traverse=a,n._visitRemaining=h,g.prototype.when=g.prototype.become=g.prototype.notify=g.prototype.fail=g.prototype._unreport=g.prototype._report=D,g.prototype._state=0,g.prototype.state=function(){return this._state},g.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},g.prototype.chain=function(t,n,e,r,o){this.when({resolver:t,receiver:n,fulfilled:e,rejected:r,progress:o})},g.prototype.visit=function(t,n,e,r){this.chain(Z,t,n,e,r)},g.prototype.fold=function(t,n,e,r){this.when(new Q(t,n,e,r))},J(g,_),_.prototype.become=function(t){t.fail()};var Z=new _;J(g,w),w.prototype._state=0,w.prototype.resolve=function(t){this.become(v(t))},w.prototype.reject=function(t){this.resolved||this.become(new k(t))},w.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=C();return t},w.prototype.run=function(){var t=this.consumers,n=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var e=0;e<t.length;++e)n.when(t[e])},w.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&V.enqueue(this),void 0!==this.context&&t._report(this.context))},w.prototype.when=function(t){this.resolved?V.enqueue(new R(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},w.prototype.notify=function(t){this.resolved||V.enqueue(new q(t,this))},w.prototype.fail=function(t){var n="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(n)},w.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},w.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},J(g,j),j.prototype.when=function(t){V.enqueue(new R(t,this))},j.prototype._report=function(t){this.join()._report(t)},j.prototype._unreport=function(){this.join()._unreport()},J(w,x),J(g,E),E.prototype._state=1,E.prototype.fold=function(t,n,e,r){U(t,n,this,e,r)},E.prototype.when=function(t){M(t.fulfilled,this,t.receiver,t.resolver)};var $=0;J(g,k),k.prototype._state=-1,k.prototype.fold=function(t,n,e,r){r.become(this)},k.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),M(t.rejected,this,t.receiver,t.resolver)},k.prototype._report=function(t){V.afterQueue(new A(this,t))},k.prototype._unreport=function(){this.handled||(this.handled=!0,V.afterQueue(new T(this)))},k.prototype.fail=function(t){this.reported=!0,X("unhandledRejection",this),n.onFatalRejection(this,void 0===t?this.context:t)},A.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,X("unhandledRejection",this.rejection)||n.onPotentiallyUnhandledRejection(this.rejection,this.context))},T.prototype.run=function(){this.rejection.reported&&(X("rejectionHandled",this.rejection)||n.onPotentiallyUnhandledRejectionHandled(this.rejection))},n.createContext=n.enterContext=n.exitContext=n.onPotentiallyUnhandledRejection=n.onPotentiallyUnhandledRejectionHandled=n.onFatalRejection=D;var tt=new g,nt=new n(g,tt);return R.prototype.run=function(){this.handler.join().when(this.continuation)},q.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var n,e=0;e<t.length;++e)n=t[e],H(n.progress,this.value,this.handler,n.receiver,n.resolver)},O.prototype.run=function(){function t(t){r.resolve(t)}function n(t){r.reject(t)}function e(t){r.notify(t)}var r=this.resolver;P(this._then,this.thenable,t,n,e)},Q.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},Q.prototype.rejected=function(t){this.to.reject(t)},Q.prototype.progress=function(t){this.to.notify(t)},n}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],25:[function(n,e,r){!function(t){"use strict";t(function(){function t(){return{state:"pending"}}function n(t){return{state:"rejected",reason:t}}function e(t){return{state:"fulfilled",value:t}}function r(r){var o=r.state();return 0===o?t():o>0?e(r.value):n(r.value)}return{pending:t,fulfilled:e,rejected:n,inspect:r}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t()})},{}],26:[function(n,e,r){!function(t){t(function(t){function n(t,n){return p(t,this,n||[])}function e(t,n,e,r){var o=u(r);try{switch(e.length){case 2:t.call(n,e[0],e[1],o);break;case 1:t.call(n,e[0],o);break;case 0:t.call(n,o);break;default:e.push(o),t.apply(n,e)}}catch(i){r.reject(i)}}function r(t){return p(t,this,h.call(arguments,1))}function o(t){var n=arguments.length>1?h.call(arguments,1):[];return function(){var e,r=n.length,o=arguments.length,i=new Array(o+r);for(e=0;r>e;++e)i[e]=n[e];for(e=0;o>e;++e)i[e+r]=arguments[e];return p(t,this,i)}}function i(t,n,e){return s(o,n,e,t)}function u(t){return function(n,e){n?t.reject(n):arguments.length>2?t.resolve(h.call(arguments,1)):t.resolve(e)}}function c(t,n){function e(t){r(null,t)}function r(t,e){l(function(){n(t,e)},0)}return t=a(t),n&&t.then(e,r),t}function f(t){return function(n){return c(n,t)}}var a=t("./when"),s=t("./lib/liftAll"),l=t("./lib/env").setTimer,h=Array.prototype.slice,p=t("./lib/apply")(a.Promise,e);return{lift:o,liftAll:i,apply:n,call:r,createCallback:u,bindCallback:c,liftCallback:f}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/apply":11,"./lib/env":21,"./lib/liftAll":23,"./when":32}],27:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){return e(r.call(arguments,1)).then(function(e){return n.map(t,function(t){return t.apply(void 0,e)})})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],28:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){var o=function(t,n){return o=function(t,n){return n(t)},n.apply(null,t)};return e(r.call(arguments,1)).then(function(e){return n.reduce(t,function(t,n){return o(t,n)},e)})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],29:[function(n,e,r){!function(t){"use strict";t(function(t){var n=t("./when"),e=n["try"],r=t("./cancelable");return function(t,o,i,u){function c(t){s.resolve(t)}function f(t){e(o).then(a,h),void 0!==t&&s.notify(t)}function a(){l||n(t(),function(t){n(i(t),function(n){return n?c(t):f(t)},function(){f(t)})},h)}var s,l,h;return l=!1,s=r(n.defer(),function(){l=!0}),h=s.reject,i=i||function(){return!1},"function"!=typeof o&&(o=function(t){return function(){return n().delay(t)}}(o)),u?f():a(),s.promise=Object.create(s.promise),s.promise.cancel=s.cancel,s.promise}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./cancelable":3,"./when":32}],30:[function(n,e,r){!function(t){t(function(t){var n=t("./when"),e=n.Promise.all,r=Array.prototype.slice;return function(t){function o(t){return i.push(t),i}var i=[];return e(r.call(arguments,1)).then(function(e){return n.reduce(t,function(t,r){return n(r.apply(void 0,e),o)},i)})}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],31:[function(n,e,r){!function(t){t(function(t){var n=t("./when");return function(t,e){return n(e).timeout(t)}})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./when":32}],32:[function(n,e,r){!function(t){"use strict";t(function(t){function n(t,n,e,r){var o=x.resolve(t);return arguments.length<2?o:o.then(n,e,r)}function e(t){return new x(t)}function r(t){return function(){for(var n=0,e=arguments.length,r=new Array(e);e>n;++n)r[n]=arguments[n];return E(t,this,r)}}function o(t){for(var n=0,e=arguments.length-1,r=new Array(e);e>n;++n)r[n]=arguments[n+1];return E(t,this,r)}function i(){return new u}function u(){function t(t){r._handler.resolve(t)}function n(t){r._handler.reject(t)}function e(t){r._handler.notify(t)}var r=x._defer();this.promise=r,this.resolve=t,this.reject=n,this.notify=e,this.resolver={resolve:t,reject:n,notify:e}}function c(t){return t&&"function"==typeof t.then}function f(){return x.all(arguments)}function a(t){return n(t,x.all)}function s(t){return n(t,x.settle)}function l(t,e){return n(t,function(t){return x.map(t,e)})}function h(t,e){return n(t,function(t){return x.filter(t,e)})}var p=t("./lib/decorators/timed"),d=t("./lib/decorators/array"),y=t("./lib/decorators/flow"),v=t("./lib/decorators/fold"),m=t("./lib/decorators/inspect"),b=t("./lib/decorators/iterate"),g=t("./lib/decorators/progress"),_=t("./lib/decorators/with"),w=t("./lib/decorators/unhandledRejection"),j=t("./lib/TimeoutError"),x=[d,y,v,b,g,m,_,p,w].reduce(function(t,n){return n(t)},t("./lib/Promise")),E=t("./lib/apply")(x);return n.promise=e,n.resolve=x.resolve,n.reject=x.reject,n.lift=r,n["try"]=o,n.attempt=o,n.iterate=x.iterate,n.unfold=x.unfold,n.join=f,n.all=a,n.settle=s,n.any=r(x.any),n.some=r(x.some),n.race=r(x.race),n.map=l,n.filter=h,n.reduce=r(x.reduce),n.reduceRight=r(x.reduceRight),n.isPromiseLike=c,n.Promise=x,n.defer=i,n.TimeoutError=j,n})}("function"==typeof t&&t.amd?t:function(t){e.exports=t(n)})},{"./lib/Promise":8,"./lib/TimeoutError":10,"./lib/apply":11,"./lib/decorators/array":12,"./lib/decorators/flow":13,"./lib/decorators/fold":14,"./lib/decorators/inspect":15,"./lib/decorators/iterate":16,"./lib/decorators/progress":17,"./lib/decorators/timed":18,"./lib/decorators/unhandledRejection":19,"./lib/decorators/with":20}]},{},[1])(1)});
+//# sourceMappingURL=dist/browser/when.min.js.map \ No newline at end of file
diff --git a/node_modules/when/dist/browser/when.min.js.map b/node_modules/when/dist/browser/when.min.js.map
index 3d25b9dcf..178a1a2ed 100644
--- a/node_modules/when/dist/browser/when.min.js.map
+++ b/node_modules/when/dist/browser/when.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["build/when.browserify.js","callbacks.js","cancelable.js","delay.js","function.js","guard.js","keys.js","lib/Promise.js","lib/Scheduler.js","lib/TimeoutError.js","lib/apply.js","lib/decorators/array.js","lib/decorators/flow.js","lib/decorators/fold.js","lib/decorators/inspect.js","lib/decorators/iterate.js","lib/decorators/progress.js","lib/decorators/timed.js","lib/decorators/unhandledRejection.js","lib/decorators/with.js","lib/env.js","lib/format.js","lib/liftAll.js","lib/makePromise.js","lib/state.js","node.js","parallel.js","pipeline.js","poll.js","sequence.js","timeout.js","when.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/build/when.browserify.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/callbacks.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/cancelable.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/delay.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/function.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/guard.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/keys.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/Promise.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/Scheduler.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/TimeoutError.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/apply.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/array.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/flow.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/fold.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/inspect.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/iterate.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/progress.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/timed.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/unhandledRejection.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/with.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/env.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/format.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/liftAll.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/makePromise.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/state.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/node.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/parallel.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/pipeline.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/poll.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/sequence.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/timeout.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/when.js"],"names":["when","module","exports","require","callbacks","cancelable","delay","fn","guard","keys","nodefn","node","parallel","pipeline","poll","sequence","timeout","define","apply","asyncFunction","extraAsyncArgs","_apply","this","dispatch","f","thisArg","args","h","push","alwaysUnary","resolve","reject","tryCatchResolve","resolver","e","call","slice","arguments","lift","length","concat","liftAll","src","combine","dst","_liftAll","promisify","positions","Promise","all","then","callbackPos","errbackPos","p","_defer","callback","normalizePosition","errback","insertCallback","_handler","pos","splice","Array","prototype","makeApply","amd","factory","deferred","canceler","cancel","promise","msec","value","compose","funcs","firstPromise","attempt","reduce","arg","func","condition","withThis","exit","n","allowed","count","Math","max","waiting","shift","object","settleKey","k","x","pending","results","Object","i","fold","map","mapWithKey","toPromise","o","settle","promises","states","populateResults","makePromise","Scheduler","async","asap","scheduler","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","self","drain","_drain","enqueue","task","run","afterQueue","TimeoutError","message","Error","name","captureStackTrace","create","constructor","l","params","callAndResolve","c","handler","callAndResolveNext","state","applier","any","handleFulfill","errors","handleReject","resolved","become","_visitRemaining","visit","RangeError","some","fulfill","nFulfill","nReject","min","notify","_traverse","filter","predicate","a","keep","filterSync","filtered","j","settleOne","fulfilled","rejected","_unreport","inspect","ar","liftCombine","reduceRight","arr","z","applyFold","spread","onFulfilled","array","rejectInvalidPredicate","TypeError","evaluatePredicate","isError","maybeThenable","identity","createCatchFilter","runSideEffect","propagate","result","propagateValue","origCatch","done","onResult","onError","receiver","otherwise","onRejected","ensure","orElse","defaultValue","tap","onFulfilledSideEffect","_beget","to","iterate","unfold","unspool","next","item","newSeed","seed","progress","onProgress","setTimeout","ms","y","env","setTimer","handleDelay","resolveDelay","onTimeout","reason","t","clearTimer","throwit","noop","format","report","r","handled","reported","logError","id","formatError","unreport","indexOf","logInfo","formatObject","tasks","running","flush","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","child","chain","isNode","process","toString","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","document","createTextNode","observe","characterData","data","MutationObs","capturedSetTimeout","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","s","stack","String","JSON","tryStringify","stringify","defaultCombine","defaultDst","bind","liftOne","key","environment","Handler","init","promiseResolve","promiseReject","promiseNotify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","join","context","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","traverseAt","settleAt","Fulfilled","getHandlerMaybeThenable","visitRemaining","start","markAsHandled","race","runRace","getHandlerUntrusted","untrustedThen","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","failIfRejected","runContinuation1","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","b","inherit","Parent","Child","objectCreate","initEmitRejection","emit","type","CustomEvent","hasCustomEvent","ev","detail","bubbles","dispatchEvent","emitRejection","proto","fail","_state","q","cont","foreverPendingHandler","_resolve","_reject","_notify","toPendingState","toRejectedState","toFulfilledState","cb","createCallback","args1","al","err","bindCallback","success","wrapped","liftCallback","runTask","interval","verifier","delayInitialTask","certify","schedule","vote","canceled","verification","addResult","trigger","Deferred","isPromiseLike","mapFunc","timed","flow","generate","unhandledRejection","feature"],"mappings":"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AAA,EAEAzY,EAAAgD,QAAAA,EACAhD,EAAAwS,MAAAA,EAIAxS,EAAA6H,aAAAA,EAiKA7H,KAEA,kBAAAiB,IAAAA,EAAAgD,IAAAhD,EAAA,SAAAiD,GAAAjE,EAAAC,QAAAgE,EAAA/D;A/DnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83","sourcesContent":["var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for interacting with 'traditional',\n * callback-taking functions using a promise interface.\n *\n * @author Renato Zannon\n * @contributor Brian Cavalier\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar _liftAll = require('./lib/liftAll');\n\tvar slice = Array.prototype.slice;\n\n\tvar makeApply = require('./lib/apply');\n\tvar _apply = makeApply(Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tpromisify: promisify\n\t};\n\n\t/**\n\t * Takes a `traditional` callback-taking function and returns a promise for its\n\t * result, accepting an optional array of arguments (that might be values or\n\t * promises). It assumes that the function takes its callback and errback as\n\t * the last two arguments. The resolution of the promise depends on whether the\n\t * function will call its callback or its errback.\n\t *\n\t * @example\n\t * var domIsLoaded = callbacks.apply($);\n\t * domIsLoaded.then(function() {\n\t *\t\tdoMyDomStuff();\n\t *\t});\n\t *\n\t * @example\n\t * function existingAjaxyFunction(url, callback, errback) {\n\t *\t\t// Complex logic you'd rather not change\n\t *\t}\n\t *\n\t * var promise = callbacks.apply(existingAjaxyFunction, [\"/movies.json\"]);\n\t *\n\t * promise.then(function(movies) {\n\t *\t\t// Work with movies\n\t *\t}, function(reason) {\n\t *\t\t// Handle error\n\t *\t});\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction apply(asyncFunction, extraAsyncArgs) {\n\t\treturn _apply(asyncFunction, this, extraAsyncArgs || []);\n\t}\n\n\t/**\n\t * Apply helper that allows specifying thisArg\n\t * @private\n\t */\n\tfunction dispatch(f, thisArg, args, h) {\n\t\targs.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h));\n\t\ttryCatchResolve(f, thisArg, args, h);\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tf.apply(thisArg, args);\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Works as `callbacks.apply` does, with the difference that the arguments to\n\t * the function are passed individually, instead of as an array.\n\t *\n\t * @example\n\t * function sumInFiveSeconds(a, b, callback) {\n\t *\t\tsetTimeout(function() {\n\t *\t\t\tcallback(a + b);\n\t *\t\t}, 5000);\n\t *\t}\n\t *\n\t * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10);\n\t *\n\t * // Logs '15' 5 seconds later\n\t * sumPromise.then(console.log);\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {...*} args arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction call(asyncFunction/*, arg1, arg2...*/) {\n\t\treturn _apply(asyncFunction, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a 'traditional' callback/errback-taking function and returns a function\n\t * that returns a promise instead. The resolution/rejection of the promise\n\t * depends on whether the original function will call its callback or its\n\t * errback.\n\t *\n\t * If additional arguments are passed to the `lift` call, they will be prepended\n\t * on the calls to the original function, much like `Function.prototype.bind`.\n\t *\n\t * The resulting function is also \"promise-aware\", in the sense that, if given\n\t * promises as arguments, it will wait for their resolution before executing.\n\t *\n\t * @example\n\t * function traditionalAjax(method, url, callback, errback) {\n\t *\t\tvar xhr = new XMLHttpRequest();\n\t *\t\txhr.open(method, url);\n\t *\n\t *\t\txhr.onload = callback;\n\t *\t\txhr.onerror = errback;\n\t *\n\t *\t\txhr.send();\n\t *\t}\n\t *\n\t * var promiseAjax = callbacks.lift(traditionalAjax);\n\t * promiseAjax(\"GET\", \"/movies.json\").then(console.log, console.error);\n\t *\n\t * var promiseAjaxGet = callbacks.lift(traditionalAjax, \"GET\");\n\t * promiseAjaxGet(\"/movies.json\").then(console.log, console.error);\n\t *\n\t * @param {Function} f traditional async function to be decorated\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f/*, args...*/) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * `promisify` is a version of `lift` that allows fine-grained control over the\n\t * arguments that passed to the underlying function. It is intended to handle\n\t * functions that don't follow the common callback and errback positions.\n\t *\n\t * The control is done by passing an object whose 'callback' and/or 'errback'\n\t * keys, whose values are the corresponding 0-based indexes of the arguments on\n\t * the function. Negative values are interpreted as being relative to the end\n\t * of the arguments array.\n\t *\n\t * If arguments are given on the call to the 'promisified' function, they are\n\t * intermingled with the callback and errback. If a promise is given among them,\n\t * the execution of the function will only occur after its resolution.\n\t *\n\t * @example\n\t * var delay = callbacks.promisify(setTimeout, {\n\t *\t\tcallback: 0\n\t *\t});\n\t *\n\t * delay(100).then(function() {\n\t *\t\tconsole.log(\"This happens 100ms afterwards\");\n\t *\t});\n\t *\n\t * @example\n\t * function callbackAsLast(errback, followsStandards, callback) {\n\t *\t\tif(followsStandards) {\n\t *\t\t\tcallback(\"well done!\");\n\t *\t\t} else {\n\t *\t\t\terrback(\"some programmers just want to watch the world burn\");\n\t *\t\t}\n\t *\t}\n\t *\n\t * var promisified = callbacks.promisify(callbackAsLast, {\n\t *\t\tcallback: -1,\n\t *\t\terrback: 0,\n\t *\t});\n\t *\n\t * promisified(true).then(console.log, console.error);\n\t * promisified(false).then(console.log, console.error);\n\t *\n\t * @param {Function} asyncFunction traditional function to be decorated\n\t * @param {object} positions\n\t * @param {number} [positions.callback] index at which asyncFunction expects to\n\t * receive a success callback\n\t * @param {number} [positions.errback] index at which asyncFunction expects to\n\t * receive an error callback\n\t * @returns {function} promisified function that accepts\n\t *\n\t * @deprecated\n\t */\n\tfunction promisify(asyncFunction, positions) {\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\treturn Promise.all(arguments).then(function(args) {\n\t\t\t\tvar p = Promise._defer();\n\n\t\t\t\tvar callbackPos, errbackPos;\n\n\t\t\t\tif(typeof positions.callback === 'number') {\n\t\t\t\t\tcallbackPos = normalizePosition(args, positions.callback);\n\t\t\t\t}\n\n\t\t\t\tif(typeof positions.errback === 'number') {\n\t\t\t\t\terrbackPos = normalizePosition(args, positions.errback);\n\t\t\t\t}\n\n\t\t\t\tif(errbackPos < callbackPos) {\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t} else {\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t}\n\n\t\t\t\tasyncFunction.apply(thisArg, args);\n\n\t\t\t\treturn p;\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction normalizePosition(args, pos) {\n\t\treturn pos < 0 ? (args.length + pos + 2) : pos;\n\t}\n\n\tfunction insertCallback(args, pos, callback, thisArg) {\n\t\tif(typeof pos === 'number') {\n\t\t\targs.splice(pos, 0, alwaysUnary(callback, thisArg));\n\t\t}\n\t}\n\n\tfunction alwaysUnary(fn, thisArg) {\n\t\treturn function() {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfn.call(thisArg, slice.call(arguments));\n\t\t\t} else {\n\t\t\t\tfn.apply(thisArg, arguments);\n\t\t\t}\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright B Cavalier & J Hann */\n\n/**\n * cancelable.js\n * @deprecated\n *\n * Decorator that makes a deferred \"cancelable\". It adds a cancel() method that\n * will call a special cancel handler function and then reject the deferred. The\n * cancel handler can be used to do resource cleanup, or anything else that should\n * be done before any other rejection handlers are executed.\n *\n * Usage:\n *\n * var cancelableDeferred = cancelable(when.defer(), myCancelHandler);\n *\n * @author brian@hovercraftstudios.com\n */\n\n(function(define) {\ndefine(function() {\n\n /**\n * Makes deferred cancelable, adding a cancel() method.\n\t * @deprecated\n *\n * @param deferred {Deferred} the {@link Deferred} to make cancelable\n * @param canceler {Function} cancel handler function to execute when this deferred\n\t * is canceled. This is guaranteed to run before all other rejection handlers.\n\t * The canceler will NOT be executed if the deferred is rejected in the standard\n\t * way, i.e. deferred.reject(). It ONLY executes if the deferred is canceled,\n\t * i.e. deferred.cancel()\n *\n * @returns deferred, with an added cancel() method.\n */\n return function(deferred, canceler) {\n // Add a cancel method to the deferred to reject the delegate\n // with the special canceled indicator.\n deferred.cancel = function() {\n\t\t\ttry {\n\t\t\t\tdeferred.reject(canceler(deferred));\n\t\t\t} catch(e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t}\n\n\t\t\treturn deferred.promise;\n };\n\n return deferred;\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * delay.js\n *\n * Helper that returns a promise that resolves after a delay.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(value).delay(ms)\n */\n return function delay(msec, value) {\n\t\treturn when(value).delay(msec);\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for wrapping and executing 'traditional'\n * synchronous functions in a promise interface.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar _liftAll = require('./lib/liftAll');\n\tvar _apply = require('./lib/apply')(when.Promise);\n\tvar slice = Array.prototype.slice;\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tcall: attempt,\n\t\tapply: apply,\n\t\tcompose: compose\n\t};\n\n\t/**\n\t * Takes a function and an optional array of arguments (that might be promises),\n\t * and calls the function. The return value is a promise whose resolution\n\t * depends on the value returned by the function.\n\t * @param {function} f function to be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the return value of func\n\t */\n\tfunction apply(f, args) {\n\t\t// slice args just in case the caller passed an Arguments instance\n\t\treturn _apply(f, this, args == null ? [] : slice.call(args));\n\t}\n\n\t/**\n\t * Takes a 'regular' function and returns a version of that function that\n\t * returns a promise instead of a plain value, and handles thrown errors by\n\t * returning a rejected promise. Also accepts a list of arguments to be\n\t * prepended to the new function, as does Function.prototype.bind.\n\t *\n\t * The resulting function is promise-aware, in the sense that it accepts\n\t * promise arguments, and waits for their resolution.\n\t * @param {Function} f function to be bound\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Composes multiple functions by piping their return values. It is\n\t * transparent to whether the functions return 'regular' values or promises:\n\t * the piped argument is always a resolved value. If one of the functions\n\t * throws or returns a rejected promise, the composed promise will be also\n\t * rejected.\n\t *\n\t * The arguments (or promises to arguments) given to the returned function (if\n\t * any), are passed directly to the first function on the 'pipeline'.\n\t * @param {Function} f the function to which the arguments will be passed\n\t * @param {...Function} [funcs] functions that will be composed, in order\n\t * @returns {Function} a promise-returning composition of the functions\n\t */\n\tfunction compose(f /*, funcs... */) {\n\t\tvar funcs = slice.call(arguments, 1);\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\tvar args = slice.call(arguments);\n\t\t\tvar firstPromise = attempt.apply(thisArg, [f].concat(args));\n\n\t\t\treturn when.reduce(funcs, function(arg, func) {\n\t\t\t\treturn func.call(thisArg, arg);\n\t\t\t}, firstPromise);\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Generalized promise concurrency guard\n * Adapted from original concept by Sakari Jokinen (Rocket Pack, Ltd.)\n *\n * @author Brian Cavalier\n * @author John Hann\n * @contributor Sakari Jokinen\n */\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar slice = Array.prototype.slice;\n\n\tguard.n = n;\n\n\treturn guard;\n\n\t/**\n\t * Creates a guarded version of f that can only be entered when the supplied\n\t * condition allows.\n\t * @param {function} condition represents a critical section that may only\n\t * be entered when allowed by the condition\n\t * @param {function} f function to guard\n\t * @returns {function} guarded version of f\n\t */\n\tfunction guard(condition, f) {\n\t\treturn function() {\n\t\t\tvar args = slice.call(arguments);\n\n\t\t\treturn when(condition()).withThis(this).then(function(exit) {\n\t\t\t\treturn when(f.apply(this, args))['finally'](exit);\n\t\t\t});\n\t\t};\n\t}\n\n\t/**\n\t * Creates a condition that allows only n simultaneous executions\n\t * of a guarded function\n\t * @param {number} allowed number of allowed simultaneous executions\n\t * @returns {function} condition function which returns a promise that\n\t * fulfills when the critical section may be entered. The fulfillment\n\t * value is a function (\"notifyExit\") that must be called when the critical\n\t * section has been exited.\n\t */\n\tfunction n(allowed) {\n\t\tvar count = 0;\n\t\tvar waiting = [];\n\n\t\treturn function enter() {\n\t\t\treturn when.promise(function(resolve) {\n\t\t\t\tif(count < allowed) {\n\t\t\t\t\tresolve(exit);\n\t\t\t\t} else {\n\t\t\t\t\twaiting.push(resolve);\n\t\t\t\t}\n\t\t\t\tcount += 1;\n\t\t\t});\n\t\t};\n\n\t\tfunction exit() {\n\t\t\tcount = Math.max(count - 1, 0);\n\t\t\tif(waiting.length > 0) {\n\t\t\t\twaiting.shift()(exit);\n\t\t\t}\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Licensed under the MIT License at:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar toPromise = when.resolve;\n\n\treturn {\n\t\tall: when.lift(all),\n\t\tmap: map,\n\t\tsettle: settle\n\t};\n\n\t/**\n\t * Resolve all the key-value pairs in the supplied object or promise\n\t * for an object.\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be resolved\n\t * @returns {Promise} promise for an object with the fully resolved key-value pairs\n\t */\n\tfunction all(object) {\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\n\t\tvar results = {};\n\t\tvar keys = Object.keys(object);\n\t\tvar pending = keys.length;\n\n\t\tfor(var i=0, k; i<keys.length; ++i) {\n\t\t\tk = keys[i];\n\t\t\tPromise._handler(object[k]).fold(settleKey, k, results, resolver);\n\t\t}\n\n\t\tif(pending === 0) {\n\t\t\tresolver.resolve(results);\n\t\t}\n\n\t\treturn p;\n\n\t\tfunction settleKey(k, x, resolver) {\n\t\t\t/*jshint validthis:true*/\n\t\t\tthis[k] = x;\n\t\t\tif(--pending === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Map values in the supplied object's keys\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be reduced\n\t * @param {function(value:*, key:String):*} f mapping function which may\n\t * return either a promise or a value\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * resolved key-value pairs\n\t */\n\tfunction map(object, f) {\n\t\treturn toPromise(object).then(function(object) {\n\t\t\treturn all(Object.keys(object).reduce(function(o, k) {\n\t\t\t\to[k] = toPromise(object[k]).fold(mapWithKey, k);\n\t\t\t\treturn o;\n\t\t\t}, {}));\n\t\t});\n\n\t\tfunction mapWithKey(k, x) {\n\t\t\treturn f(x, k);\n\t\t}\n\t}\n\n\t/**\n\t * Resolve all key-value pairs in the supplied object and return a promise\n\t * that will always fulfill with the outcome states of all input promises.\n\t * @param {object} object whose key-value pairs will be settled\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * settled key-value pairs\n\t */\n\tfunction settle(object) {\n\t\tvar keys = Object.keys(object);\n\t\tvar results = {};\n\n\t\tif(keys.length === 0) {\n\t\t\treturn toPromise(results);\n\t\t}\n\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\t\tvar promises = keys.map(function(k) { return object[k]; });\n\n\t\twhen.settle(promises).then(function(states) {\n\t\t\tpopulateResults(keys, states, results, resolver);\n\t\t});\n\n\t\treturn p;\n\t}\n\n\tfunction populateResults(keys, states, results, resolver) {\n\t\tfor(var i=0; i<keys.length; i++) {\n\t\t\tresults[keys[i]] = states[i];\n\t\t}\n\t\tresolver.resolve(results);\n\t}\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\tvar h = Promise._handler(p);\n\t\t\tif(h.state() === 0) {\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\th._unreport();\n\t\t\treturn state.inspect(h);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function generate(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\n\t\tPromise.iterate = iterate;\n\t\tPromise.unfold = unfold;\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.iterate\n\t\t * Generate a (potentially infinite) stream of promised values:\n\t\t * x, f(x), f(f(x)), etc. until condition(x) returns true\n\t\t * @param {function} f function to generate a new x from the previous x\n\t\t * @param {function} condition function that, given the current x, returns\n\t\t * truthy when the iterate should stop\n\t\t * @param {function} handler function to handle the value produced by f\n\t\t * @param {*|Promise} x starting value, may be a promise\n\t\t * @return {Promise} the result of the last call to f before\n\t\t * condition returns true\n\t\t */\n\t\tfunction iterate(f, condition, handler, x) {\n\t\t\treturn unfold(function(x) {\n\t\t\t\treturn [x, f(x)];\n\t\t\t}, condition, handler, x);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.unfold\n\t\t * Generate a (potentially infinite) stream of promised values\n\t\t * by applying handler(generator(seed)) iteratively until\n\t\t * condition(seed) returns true.\n\t\t * @param {function} unspool function that generates a [value, newSeed]\n\t\t * given a seed.\n\t\t * @param {function} condition function that, given the current seed, returns\n\t\t * truthy when the unfold should stop\n\t\t * @param {function} handler function to handle the value produced by unspool\n\t\t * @param x {*|Promise} starting value, may be a promise\n\t\t * @return {Promise} the result of the last value produced by unspool before\n\t\t * condition returns true\n\t\t */\n\t\tfunction unfold(unspool, condition, handler, x) {\n\t\t\treturn resolve(x).then(function(seed) {\n\t\t\t\treturn resolve(condition(seed)).then(function(done) {\n\t\t\t\t\treturn done ? seed : resolve(unspool(seed)).spread(next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tfunction next(item, newSeed) {\n\t\t\t\treturn resolve(handler(item)).then(function() {\n\t\t\t\t\treturn unfold(unspool, condition, handler, newSeed);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function progress(Promise) {\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Register a progress handler for this promise\n\t\t * @param {function} onProgress\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.progress = function(onProgress) {\n\t\t\treturn this.then(void 0, void 0, onProgress);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2013 original author or authors */\n\n/**\n * Collection of helpers for interfacing with node-style asynchronous functions\n * using promises.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar _liftAll = require('./lib/liftAll');\n\tvar setTimer = require('./lib/env').setTimer;\n\tvar slice = Array.prototype.slice;\n\n\tvar _apply = require('./lib/apply')(when.Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tcreateCallback: createCallback,\n\t\tbindCallback: bindCallback,\n\t\tliftCallback: liftCallback\n\t};\n\n\t/**\n\t * Takes a node-style async function and calls it immediately (with an optional\n\t * array of arguments or promises for arguments). It returns a promise whose\n\t * resolution depends on whether the async functions calls its callback with the\n\t * conventional error argument or not.\n\t *\n\t * With this it becomes possible to leverage existing APIs while still reaping\n\t * the benefits of promises.\n\t *\n\t * @example\n\t * function onlySmallNumbers(n, callback) {\n\t *\t\tif(n < 10) {\n\t *\t\t\tcallback(null, n + 10);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * var nodefn = require(\"when/node/function\");\n\t *\n\t * // Logs '15'\n\t * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction apply(f, args) {\n\t\treturn _apply(f, this, args || []);\n\t}\n\n\tfunction dispatch(f, thisArg, args, h) {\n\t\tvar cb = createCallback(h);\n\t\ttry {\n\t\t\tswitch(args.length) {\n\t\t\t\tcase 2: f.call(thisArg, args[0], args[1], cb); break;\n\t\t\t\tcase 1: f.call(thisArg, args[0], cb); break;\n\t\t\t\tcase 0: f.call(thisArg, cb); break;\n\t\t\t\tdefault:\n\t\t\t\t\targs.push(cb);\n\t\t\t\t\tf.apply(thisArg, args);\n\t\t\t}\n\t\t} catch(e) {\n\t\t\th.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Has the same behavior that {@link apply} has, with the difference that the\n\t * arguments to the function are provided individually, while {@link apply} accepts\n\t * a single array.\n\t *\n\t * @example\n\t * function sumSmallNumbers(x, y, callback) {\n\t *\t\tvar result = x + y;\n\t *\t\tif(result < 10) {\n\t *\t\t\tcallback(null, result);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * // Logs '5'\n\t * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {...*} [args] arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction call(f /*, args... */) {\n\t\treturn _apply(f, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a node-style function and returns new function that wraps the\n\t * original and, instead of taking a callback, returns a promise. Also, it\n\t * knows how to handle promises given as arguments, waiting for their\n\t * resolution before executing.\n\t *\n\t * Upon execution, the orginal function is executed as well. If it passes\n\t * a truthy value as the first argument to the callback, it will be\n\t * interpreted as an error condition, and the promise will be rejected\n\t * with it. Otherwise, the call is considered a resolution, and the promise\n\t * is resolved with the callback's second argument.\n\t *\n\t * @example\n\t * var fs = require(\"fs\"), nodefn = require(\"when/node/function\");\n\t *\n\t * var promiseRead = nodefn.lift(fs.readFile);\n\t *\n\t * // The promise is resolved with the contents of the file if everything\n\t * // goes ok\n\t * promiseRead('exists.txt').then(console.log, console.error);\n\t *\n\t * // And will be rejected if something doesn't work out\n\t * // (e.g. the files does not exist)\n\t * promiseRead('doesnt_exist.txt').then(console.log, console.error);\n\t *\n\t *\n\t * @param {Function} f node-style function to be lifted\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args1 = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\t// TODO: Simplify once partialing has been removed\n\t\t\tvar l = args1.length;\n\t\t\tvar al = arguments.length;\n\t\t\tvar args = new Array(al + l);\n\t\t\tvar i;\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\targs[i] = args1[i];\n\t\t\t}\n\t\t\tfor(i=0; i<al; ++i) {\n\t\t\t\targs[i+l] = arguments[i];\n\t\t\t}\n\t\t\treturn _apply(f, this, args);\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Takes an object that responds to the resolver interface, and returns\n\t * a function that will resolve or reject it depending on how it is called.\n\t *\n\t * @example\n\t *\tfunction callbackTakingFunction(callback) {\n\t *\t\tif(somethingWrongHappened) {\n\t *\t\t\tcallback(error);\n\t *\t\t} else {\n\t *\t\t\tcallback(null, interestingValue);\n\t *\t\t}\n\t *\t}\n\t *\n\t *\tvar when = require('when'), nodefn = require('when/node/function');\n\t *\n\t *\tvar deferred = when.defer();\n\t *\tcallbackTakingFunction(nodefn.createCallback(deferred.resolver));\n\t *\n\t *\tdeferred.promise.then(function(interestingValue) {\n\t *\t\t// Use interestingValue\n\t *\t});\n\t *\n\t * @param {Resolver} resolver that will be 'attached' to the callback\n\t * @returns {Function} a node-style callback function\n\t */\n\tfunction createCallback(resolver) {\n\t\treturn function(err, value) {\n\t\t\tif(err) {\n\t\t\t\tresolver.reject(err);\n\t\t\t} else if(arguments.length > 2) {\n\t\t\t\tresolver.resolve(slice.call(arguments, 1));\n\t\t\t} else {\n\t\t\t\tresolver.resolve(value);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Attaches a node-style callback to a promise, ensuring the callback is\n\t * called for either fulfillment or rejection. Returns a promise with the same\n\t * state as the passed-in promise.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tbindCallback(deferred.promise, callback);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Promise} promise The promise to be attached to.\n\t * @param {Function} callback The node-style callback to attach.\n\t * @returns {Promise} A promise with the same state as the passed-in promise.\n\t */\n\tfunction bindCallback(promise, callback) {\n\t\tpromise = when(promise);\n\n\t\tif (callback) {\n\t\t\tpromise.then(success, wrapped);\n\t\t}\n\n\t\treturn promise;\n\n\t\tfunction success(value) {\n\t\t\twrapped(null, value);\n\t\t}\n\n\t\tfunction wrapped(err, value) {\n\t\t\tsetTimer(function () {\n\t\t\t\tcallback(err, value);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Takes a node-style callback and returns new function that accepts a\n\t * promise, calling the original callback when the promise is either\n\t * fulfilled or rejected with the appropriate arguments.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tvar wrapped = liftCallback(callback);\n\t *\n\t *\t// `wrapped` can now be passed around at will\n\t *\twrapped(deferred.promise);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Function} callback The node-style callback to wrap.\n\t * @returns {Function} The lifted, promise-accepting function.\n\t */\n\tfunction liftCallback(callback) {\n\t\treturn function(promise) {\n\t\t\treturn bindCallback(promise, callback);\n\t\t};\n\t}\n});\n\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * parallel.js\n *\n * Run a set of task functions in parallel. All tasks will\n * receive the same args\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in parallel\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for array containing the\n\t * result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function parallel(tasks /*, args... */) {\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.map(tasks, function(task) {\n\t\t\t\treturn task.apply(void 0, args);\n\t\t\t});\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * pipeline.js\n *\n * Run a set of task functions in sequence, passing the result\n * of the previous as an argument to the next. Like a shell\n * pipeline, e.g. `cat file.txt | grep 'foo' | sed -e 's/foo/bar/g'\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in a pipeline where the next\n\t * tasks receives the result of the previous. The first task\n\t * will receive the initialArgs as its argument list.\n\t * @param tasks {Array|Promise} array or promise for array of task functions\n\t * @param [initialArgs...] {*} arguments to be passed to the first task\n\t * @return {Promise} promise for return value of the final task\n\t */\n\treturn function pipeline(tasks /* initialArgs... */) {\n\t\t// Self-optimizing function to run first task with multiple\n\t\t// args using apply, but subsequence tasks via direct invocation\n\t\tvar runTask = function(args, task) {\n\t\t\trunTask = function(arg, task) {\n\t\t\t\treturn task(arg);\n\t\t\t};\n\n\t\t\treturn task.apply(null, args);\n\t\t};\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(arg, task) {\n\t\t\t\treturn runTask(arg, task);\n\t\t\t}, args);\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2012-2013 original author or authors */\n\n/**\n * poll.js\n *\n * Helper that polls until cancelled or for a condition to become true.\n *\n * @author Scott Andrews\n */\n\n(function (define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar cancelable = require('./cancelable');\n\n\t/**\n\t * Periodically execute the task function on the msec delay. The result of\n\t * the task may be verified by watching for a condition to become true. The\n\t * returned deferred is cancellable if the polling needs to be cancelled\n\t * externally before reaching a resolved state.\n\t *\n\t * The next vote is scheduled after the results of the current vote are\n\t * verified and rejected.\n\t *\n\t * Polling may be terminated by the verifier returning a truthy value,\n\t * invoking cancel() on the returned promise, or the task function returning\n\t * a rejected promise.\n\t *\n\t * Usage:\n\t *\n\t * var count = 0;\n\t * function doSomething() { return count++ }\n\t *\n\t * // poll until cancelled\n\t * var p = poll(doSomething, 1000);\n\t * ...\n\t * p.cancel();\n\t *\n\t * // poll until condition is met\n\t * poll(doSomething, 1000, function(result) { return result > 10 })\n\t * .then(function(result) { assert result == 10 });\n\t *\n\t * // delay first vote\n\t * poll(doSomething, 1000, anyFunc, true);\n\t *\n\t * @param task {Function} function that is executed after every timeout\n\t * @param interval {number|Function} timeout in milliseconds\n\t * @param [verifier] {Function} function to evaluate the result of the vote.\n\t * May return a {Promise} or a {Boolean}. Rejecting the promise or a\n\t * falsey value will schedule the next vote.\n\t * @param [delayInitialTask] {boolean} if truthy, the first vote is scheduled\n\t * instead of immediate\n\t *\n\t * @returns {Promise}\n\t */\n\treturn function poll(task, interval, verifier, delayInitialTask) {\n\t\tvar deferred, canceled, reject;\n\n\t\tcanceled = false;\n\t\tdeferred = cancelable(when.defer(), function () { canceled = true; });\n\t\treject = deferred.reject;\n\n\t\tverifier = verifier || function () { return false; };\n\n\t\tif (typeof interval !== 'function') {\n\t\t\tinterval = (function (interval) {\n\t\t\t\treturn function () { return when().delay(interval); };\n\t\t\t})(interval);\n\t\t}\n\n\t\tfunction certify(result) {\n\t\t\tdeferred.resolve(result);\n\t\t}\n\n\t\tfunction schedule(result) {\n\t\t\tattempt(interval).then(vote, reject);\n\t\t\tif (result !== void 0) {\n\t\t\t\tdeferred.notify(result);\n\t\t\t}\n\t\t}\n\n\t\tfunction vote() {\n\t\t\tif (canceled) { return; }\n\t\t\twhen(task(),\n\t\t\t\tfunction (result) {\n\t\t\t\t\twhen(verifier(result),\n\t\t\t\t\t\tfunction (verification) {\n\t\t\t\t\t\t\treturn verification ? certify(result) : schedule(result);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction () { schedule(result); }\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\n\t\tif (delayInitialTask) {\n\t\t\tschedule();\n\t\t} else {\n\t\t\t// if task() is blocking, vote will also block\n\t\t\tvote();\n\t\t}\n\n\t\t// make the promise cancelable\n\t\tdeferred.promise = Object.create(deferred.promise);\n\t\tdeferred.promise.cancel = deferred.cancel;\n\n\t\treturn deferred.promise;\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * sequence.js\n *\n * Run a set of task functions in sequence. All tasks will\n * receive the same args.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in sequence with no overlap\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for an array containing\n\t * the result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function sequence(tasks /*, args... */) {\n\t\tvar results = [];\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(results, task) {\n\t\t\t\treturn when(task.apply(void 0, args), addResult);\n\t\t\t}, results);\n\t\t});\n\n\t\tfunction addResult(result) {\n\t\t\tresults.push(result);\n\t\t\treturn results;\n\t\t}\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for interacting with 'traditional',\n * callback-taking functions using a promise interface.\n *\n * @author Renato Zannon\n * @contributor Brian Cavalier\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar _liftAll = require('./lib/liftAll');\n\tvar slice = Array.prototype.slice;\n\n\tvar makeApply = require('./lib/apply');\n\tvar _apply = makeApply(Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tpromisify: promisify\n\t};\n\n\t/**\n\t * Takes a `traditional` callback-taking function and returns a promise for its\n\t * result, accepting an optional array of arguments (that might be values or\n\t * promises). It assumes that the function takes its callback and errback as\n\t * the last two arguments. The resolution of the promise depends on whether the\n\t * function will call its callback or its errback.\n\t *\n\t * @example\n\t * var domIsLoaded = callbacks.apply($);\n\t * domIsLoaded.then(function() {\n\t *\t\tdoMyDomStuff();\n\t *\t});\n\t *\n\t * @example\n\t * function existingAjaxyFunction(url, callback, errback) {\n\t *\t\t// Complex logic you'd rather not change\n\t *\t}\n\t *\n\t * var promise = callbacks.apply(existingAjaxyFunction, [\"/movies.json\"]);\n\t *\n\t * promise.then(function(movies) {\n\t *\t\t// Work with movies\n\t *\t}, function(reason) {\n\t *\t\t// Handle error\n\t *\t});\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction apply(asyncFunction, extraAsyncArgs) {\n\t\treturn _apply(asyncFunction, this, extraAsyncArgs || []);\n\t}\n\n\t/**\n\t * Apply helper that allows specifying thisArg\n\t * @private\n\t */\n\tfunction dispatch(f, thisArg, args, h) {\n\t\targs.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h));\n\t\ttryCatchResolve(f, thisArg, args, h);\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tf.apply(thisArg, args);\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Works as `callbacks.apply` does, with the difference that the arguments to\n\t * the function are passed individually, instead of as an array.\n\t *\n\t * @example\n\t * function sumInFiveSeconds(a, b, callback) {\n\t *\t\tsetTimeout(function() {\n\t *\t\t\tcallback(a + b);\n\t *\t\t}, 5000);\n\t *\t}\n\t *\n\t * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10);\n\t *\n\t * // Logs '15' 5 seconds later\n\t * sumPromise.then(console.log);\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {...*} args arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction call(asyncFunction/*, arg1, arg2...*/) {\n\t\treturn _apply(asyncFunction, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a 'traditional' callback/errback-taking function and returns a function\n\t * that returns a promise instead. The resolution/rejection of the promise\n\t * depends on whether the original function will call its callback or its\n\t * errback.\n\t *\n\t * If additional arguments are passed to the `lift` call, they will be prepended\n\t * on the calls to the original function, much like `Function.prototype.bind`.\n\t *\n\t * The resulting function is also \"promise-aware\", in the sense that, if given\n\t * promises as arguments, it will wait for their resolution before executing.\n\t *\n\t * @example\n\t * function traditionalAjax(method, url, callback, errback) {\n\t *\t\tvar xhr = new XMLHttpRequest();\n\t *\t\txhr.open(method, url);\n\t *\n\t *\t\txhr.onload = callback;\n\t *\t\txhr.onerror = errback;\n\t *\n\t *\t\txhr.send();\n\t *\t}\n\t *\n\t * var promiseAjax = callbacks.lift(traditionalAjax);\n\t * promiseAjax(\"GET\", \"/movies.json\").then(console.log, console.error);\n\t *\n\t * var promiseAjaxGet = callbacks.lift(traditionalAjax, \"GET\");\n\t * promiseAjaxGet(\"/movies.json\").then(console.log, console.error);\n\t *\n\t * @param {Function} f traditional async function to be decorated\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f/*, args...*/) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * `promisify` is a version of `lift` that allows fine-grained control over the\n\t * arguments that passed to the underlying function. It is intended to handle\n\t * functions that don't follow the common callback and errback positions.\n\t *\n\t * The control is done by passing an object whose 'callback' and/or 'errback'\n\t * keys, whose values are the corresponding 0-based indexes of the arguments on\n\t * the function. Negative values are interpreted as being relative to the end\n\t * of the arguments array.\n\t *\n\t * If arguments are given on the call to the 'promisified' function, they are\n\t * intermingled with the callback and errback. If a promise is given among them,\n\t * the execution of the function will only occur after its resolution.\n\t *\n\t * @example\n\t * var delay = callbacks.promisify(setTimeout, {\n\t *\t\tcallback: 0\n\t *\t});\n\t *\n\t * delay(100).then(function() {\n\t *\t\tconsole.log(\"This happens 100ms afterwards\");\n\t *\t});\n\t *\n\t * @example\n\t * function callbackAsLast(errback, followsStandards, callback) {\n\t *\t\tif(followsStandards) {\n\t *\t\t\tcallback(\"well done!\");\n\t *\t\t} else {\n\t *\t\t\terrback(\"some programmers just want to watch the world burn\");\n\t *\t\t}\n\t *\t}\n\t *\n\t * var promisified = callbacks.promisify(callbackAsLast, {\n\t *\t\tcallback: -1,\n\t *\t\terrback: 0,\n\t *\t});\n\t *\n\t * promisified(true).then(console.log, console.error);\n\t * promisified(false).then(console.log, console.error);\n\t *\n\t * @param {Function} asyncFunction traditional function to be decorated\n\t * @param {object} positions\n\t * @param {number} [positions.callback] index at which asyncFunction expects to\n\t * receive a success callback\n\t * @param {number} [positions.errback] index at which asyncFunction expects to\n\t * receive an error callback\n\t * @returns {function} promisified function that accepts\n\t *\n\t * @deprecated\n\t */\n\tfunction promisify(asyncFunction, positions) {\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\treturn Promise.all(arguments).then(function(args) {\n\t\t\t\tvar p = Promise._defer();\n\n\t\t\t\tvar callbackPos, errbackPos;\n\n\t\t\t\tif(typeof positions.callback === 'number') {\n\t\t\t\t\tcallbackPos = normalizePosition(args, positions.callback);\n\t\t\t\t}\n\n\t\t\t\tif(typeof positions.errback === 'number') {\n\t\t\t\t\terrbackPos = normalizePosition(args, positions.errback);\n\t\t\t\t}\n\n\t\t\t\tif(errbackPos < callbackPos) {\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t} else {\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t}\n\n\t\t\t\tasyncFunction.apply(thisArg, args);\n\n\t\t\t\treturn p;\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction normalizePosition(args, pos) {\n\t\treturn pos < 0 ? (args.length + pos + 2) : pos;\n\t}\n\n\tfunction insertCallback(args, pos, callback, thisArg) {\n\t\tif(typeof pos === 'number') {\n\t\t\targs.splice(pos, 0, alwaysUnary(callback, thisArg));\n\t\t}\n\t}\n\n\tfunction alwaysUnary(fn, thisArg) {\n\t\treturn function() {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfn.call(thisArg, slice.call(arguments));\n\t\t\t} else {\n\t\t\t\tfn.apply(thisArg, arguments);\n\t\t\t}\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright B Cavalier & J Hann */\n\n/**\n * cancelable.js\n * @deprecated\n *\n * Decorator that makes a deferred \"cancelable\". It adds a cancel() method that\n * will call a special cancel handler function and then reject the deferred. The\n * cancel handler can be used to do resource cleanup, or anything else that should\n * be done before any other rejection handlers are executed.\n *\n * Usage:\n *\n * var cancelableDeferred = cancelable(when.defer(), myCancelHandler);\n *\n * @author brian@hovercraftstudios.com\n */\n\n(function(define) {\ndefine(function() {\n\n /**\n * Makes deferred cancelable, adding a cancel() method.\n\t * @deprecated\n *\n * @param deferred {Deferred} the {@link Deferred} to make cancelable\n * @param canceler {Function} cancel handler function to execute when this deferred\n\t * is canceled. This is guaranteed to run before all other rejection handlers.\n\t * The canceler will NOT be executed if the deferred is rejected in the standard\n\t * way, i.e. deferred.reject(). It ONLY executes if the deferred is canceled,\n\t * i.e. deferred.cancel()\n *\n * @returns deferred, with an added cancel() method.\n */\n return function(deferred, canceler) {\n // Add a cancel method to the deferred to reject the delegate\n // with the special canceled indicator.\n deferred.cancel = function() {\n\t\t\ttry {\n\t\t\t\tdeferred.reject(canceler(deferred));\n\t\t\t} catch(e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t}\n\n\t\t\treturn deferred.promise;\n };\n\n return deferred;\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * delay.js\n *\n * Helper that returns a promise that resolves after a delay.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(value).delay(ms)\n */\n return function delay(msec, value) {\n\t\treturn when(value).delay(msec);\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for wrapping and executing 'traditional'\n * synchronous functions in a promise interface.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar _liftAll = require('./lib/liftAll');\n\tvar _apply = require('./lib/apply')(when.Promise);\n\tvar slice = Array.prototype.slice;\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tcall: attempt,\n\t\tapply: apply,\n\t\tcompose: compose\n\t};\n\n\t/**\n\t * Takes a function and an optional array of arguments (that might be promises),\n\t * and calls the function. The return value is a promise whose resolution\n\t * depends on the value returned by the function.\n\t * @param {function} f function to be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the return value of func\n\t */\n\tfunction apply(f, args) {\n\t\t// slice args just in case the caller passed an Arguments instance\n\t\treturn _apply(f, this, args == null ? [] : slice.call(args));\n\t}\n\n\t/**\n\t * Takes a 'regular' function and returns a version of that function that\n\t * returns a promise instead of a plain value, and handles thrown errors by\n\t * returning a rejected promise. Also accepts a list of arguments to be\n\t * prepended to the new function, as does Function.prototype.bind.\n\t *\n\t * The resulting function is promise-aware, in the sense that it accepts\n\t * promise arguments, and waits for their resolution.\n\t * @param {Function} f function to be bound\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Composes multiple functions by piping their return values. It is\n\t * transparent to whether the functions return 'regular' values or promises:\n\t * the piped argument is always a resolved value. If one of the functions\n\t * throws or returns a rejected promise, the composed promise will be also\n\t * rejected.\n\t *\n\t * The arguments (or promises to arguments) given to the returned function (if\n\t * any), are passed directly to the first function on the 'pipeline'.\n\t * @param {Function} f the function to which the arguments will be passed\n\t * @param {...Function} [funcs] functions that will be composed, in order\n\t * @returns {Function} a promise-returning composition of the functions\n\t */\n\tfunction compose(f /*, funcs... */) {\n\t\tvar funcs = slice.call(arguments, 1);\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\tvar args = slice.call(arguments);\n\t\t\tvar firstPromise = attempt.apply(thisArg, [f].concat(args));\n\n\t\t\treturn when.reduce(funcs, function(arg, func) {\n\t\t\t\treturn func.call(thisArg, arg);\n\t\t\t}, firstPromise);\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Generalized promise concurrency guard\n * Adapted from original concept by Sakari Jokinen (Rocket Pack, Ltd.)\n *\n * @author Brian Cavalier\n * @author John Hann\n * @contributor Sakari Jokinen\n */\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar slice = Array.prototype.slice;\n\n\tguard.n = n;\n\n\treturn guard;\n\n\t/**\n\t * Creates a guarded version of f that can only be entered when the supplied\n\t * condition allows.\n\t * @param {function} condition represents a critical section that may only\n\t * be entered when allowed by the condition\n\t * @param {function} f function to guard\n\t * @returns {function} guarded version of f\n\t */\n\tfunction guard(condition, f) {\n\t\treturn function() {\n\t\t\tvar args = slice.call(arguments);\n\n\t\t\treturn when(condition()).withThis(this).then(function(exit) {\n\t\t\t\treturn when(f.apply(this, args))['finally'](exit);\n\t\t\t});\n\t\t};\n\t}\n\n\t/**\n\t * Creates a condition that allows only n simultaneous executions\n\t * of a guarded function\n\t * @param {number} allowed number of allowed simultaneous executions\n\t * @returns {function} condition function which returns a promise that\n\t * fulfills when the critical section may be entered. The fulfillment\n\t * value is a function (\"notifyExit\") that must be called when the critical\n\t * section has been exited.\n\t */\n\tfunction n(allowed) {\n\t\tvar count = 0;\n\t\tvar waiting = [];\n\n\t\treturn function enter() {\n\t\t\treturn when.promise(function(resolve) {\n\t\t\t\tif(count < allowed) {\n\t\t\t\t\tresolve(exit);\n\t\t\t\t} else {\n\t\t\t\t\twaiting.push(resolve);\n\t\t\t\t}\n\t\t\t\tcount += 1;\n\t\t\t});\n\t\t};\n\n\t\tfunction exit() {\n\t\t\tcount = Math.max(count - 1, 0);\n\t\t\tif(waiting.length > 0) {\n\t\t\t\twaiting.shift()(exit);\n\t\t\t}\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Licensed under the MIT License at:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar toPromise = when.resolve;\n\n\treturn {\n\t\tall: when.lift(all),\n\t\tmap: map,\n\t\tsettle: settle\n\t};\n\n\t/**\n\t * Resolve all the key-value pairs in the supplied object or promise\n\t * for an object.\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be resolved\n\t * @returns {Promise} promise for an object with the fully resolved key-value pairs\n\t */\n\tfunction all(object) {\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\n\t\tvar results = {};\n\t\tvar keys = Object.keys(object);\n\t\tvar pending = keys.length;\n\n\t\tfor(var i=0, k; i<keys.length; ++i) {\n\t\t\tk = keys[i];\n\t\t\tPromise._handler(object[k]).fold(settleKey, k, results, resolver);\n\t\t}\n\n\t\tif(pending === 0) {\n\t\t\tresolver.resolve(results);\n\t\t}\n\n\t\treturn p;\n\n\t\tfunction settleKey(k, x, resolver) {\n\t\t\t/*jshint validthis:true*/\n\t\t\tthis[k] = x;\n\t\t\tif(--pending === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Map values in the supplied object's keys\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be reduced\n\t * @param {function(value:*, key:String):*} f mapping function which may\n\t * return either a promise or a value\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * resolved key-value pairs\n\t */\n\tfunction map(object, f) {\n\t\treturn toPromise(object).then(function(object) {\n\t\t\treturn all(Object.keys(object).reduce(function(o, k) {\n\t\t\t\to[k] = toPromise(object[k]).fold(mapWithKey, k);\n\t\t\t\treturn o;\n\t\t\t}, {}));\n\t\t});\n\n\t\tfunction mapWithKey(k, x) {\n\t\t\treturn f(x, k);\n\t\t}\n\t}\n\n\t/**\n\t * Resolve all key-value pairs in the supplied object and return a promise\n\t * that will always fulfill with the outcome states of all input promises.\n\t * @param {object} object whose key-value pairs will be settled\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * settled key-value pairs\n\t */\n\tfunction settle(object) {\n\t\tvar keys = Object.keys(object);\n\t\tvar results = {};\n\n\t\tif(keys.length === 0) {\n\t\t\treturn toPromise(results);\n\t\t}\n\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\t\tvar promises = keys.map(function(k) { return object[k]; });\n\n\t\twhen.settle(promises).then(function(states) {\n\t\t\tpopulateResults(keys, states, results, resolver);\n\t\t});\n\n\t\treturn p;\n\t}\n\n\tfunction populateResults(keys, states, results, resolver) {\n\t\tfor(var i=0; i<keys.length; i++) {\n\t\t\tresults[keys[i]] = states[i];\n\t\t}\n\t\tresolver.resolve(results);\n\t}\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\tvar h = Promise._handler(p);\n\t\t\tif(h.state() === 0) {\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\th._unreport();\n\t\t\treturn state.inspect(h);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function generate(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\n\t\tPromise.iterate = iterate;\n\t\tPromise.unfold = unfold;\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.iterate\n\t\t * Generate a (potentially infinite) stream of promised values:\n\t\t * x, f(x), f(f(x)), etc. until condition(x) returns true\n\t\t * @param {function} f function to generate a new x from the previous x\n\t\t * @param {function} condition function that, given the current x, returns\n\t\t * truthy when the iterate should stop\n\t\t * @param {function} handler function to handle the value produced by f\n\t\t * @param {*|Promise} x starting value, may be a promise\n\t\t * @return {Promise} the result of the last call to f before\n\t\t * condition returns true\n\t\t */\n\t\tfunction iterate(f, condition, handler, x) {\n\t\t\treturn unfold(function(x) {\n\t\t\t\treturn [x, f(x)];\n\t\t\t}, condition, handler, x);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.unfold\n\t\t * Generate a (potentially infinite) stream of promised values\n\t\t * by applying handler(generator(seed)) iteratively until\n\t\t * condition(seed) returns true.\n\t\t * @param {function} unspool function that generates a [value, newSeed]\n\t\t * given a seed.\n\t\t * @param {function} condition function that, given the current seed, returns\n\t\t * truthy when the unfold should stop\n\t\t * @param {function} handler function to handle the value produced by unspool\n\t\t * @param x {*|Promise} starting value, may be a promise\n\t\t * @return {Promise} the result of the last value produced by unspool before\n\t\t * condition returns true\n\t\t */\n\t\tfunction unfold(unspool, condition, handler, x) {\n\t\t\treturn resolve(x).then(function(seed) {\n\t\t\t\treturn resolve(condition(seed)).then(function(done) {\n\t\t\t\t\treturn done ? seed : resolve(unspool(seed)).spread(next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tfunction next(item, newSeed) {\n\t\t\t\treturn resolve(handler(item)).then(function() {\n\t\t\t\t\treturn unfold(unspool, condition, handler, newSeed);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function progress(Promise) {\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Register a progress handler for this promise\n\t\t * @param {function} onProgress\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.progress = function(onProgress) {\n\t\t\treturn this.then(void 0, void 0, onProgress);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2013 original author or authors */\n\n/**\n * Collection of helpers for interfacing with node-style asynchronous functions\n * using promises.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar _liftAll = require('./lib/liftAll');\n\tvar setTimer = require('./lib/env').setTimer;\n\tvar slice = Array.prototype.slice;\n\n\tvar _apply = require('./lib/apply')(when.Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tcreateCallback: createCallback,\n\t\tbindCallback: bindCallback,\n\t\tliftCallback: liftCallback\n\t};\n\n\t/**\n\t * Takes a node-style async function and calls it immediately (with an optional\n\t * array of arguments or promises for arguments). It returns a promise whose\n\t * resolution depends on whether the async functions calls its callback with the\n\t * conventional error argument or not.\n\t *\n\t * With this it becomes possible to leverage existing APIs while still reaping\n\t * the benefits of promises.\n\t *\n\t * @example\n\t * function onlySmallNumbers(n, callback) {\n\t *\t\tif(n < 10) {\n\t *\t\t\tcallback(null, n + 10);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * var nodefn = require(\"when/node/function\");\n\t *\n\t * // Logs '15'\n\t * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction apply(f, args) {\n\t\treturn _apply(f, this, args || []);\n\t}\n\n\tfunction dispatch(f, thisArg, args, h) {\n\t\tvar cb = createCallback(h);\n\t\ttry {\n\t\t\tswitch(args.length) {\n\t\t\t\tcase 2: f.call(thisArg, args[0], args[1], cb); break;\n\t\t\t\tcase 1: f.call(thisArg, args[0], cb); break;\n\t\t\t\tcase 0: f.call(thisArg, cb); break;\n\t\t\t\tdefault:\n\t\t\t\t\targs.push(cb);\n\t\t\t\t\tf.apply(thisArg, args);\n\t\t\t}\n\t\t} catch(e) {\n\t\t\th.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Has the same behavior that {@link apply} has, with the difference that the\n\t * arguments to the function are provided individually, while {@link apply} accepts\n\t * a single array.\n\t *\n\t * @example\n\t * function sumSmallNumbers(x, y, callback) {\n\t *\t\tvar result = x + y;\n\t *\t\tif(result < 10) {\n\t *\t\t\tcallback(null, result);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * // Logs '5'\n\t * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {...*} [args] arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction call(f /*, args... */) {\n\t\treturn _apply(f, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a node-style function and returns new function that wraps the\n\t * original and, instead of taking a callback, returns a promise. Also, it\n\t * knows how to handle promises given as arguments, waiting for their\n\t * resolution before executing.\n\t *\n\t * Upon execution, the orginal function is executed as well. If it passes\n\t * a truthy value as the first argument to the callback, it will be\n\t * interpreted as an error condition, and the promise will be rejected\n\t * with it. Otherwise, the call is considered a resolution, and the promise\n\t * is resolved with the callback's second argument.\n\t *\n\t * @example\n\t * var fs = require(\"fs\"), nodefn = require(\"when/node/function\");\n\t *\n\t * var promiseRead = nodefn.lift(fs.readFile);\n\t *\n\t * // The promise is resolved with the contents of the file if everything\n\t * // goes ok\n\t * promiseRead('exists.txt').then(console.log, console.error);\n\t *\n\t * // And will be rejected if something doesn't work out\n\t * // (e.g. the files does not exist)\n\t * promiseRead('doesnt_exist.txt').then(console.log, console.error);\n\t *\n\t *\n\t * @param {Function} f node-style function to be lifted\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args1 = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\t// TODO: Simplify once partialing has been removed\n\t\t\tvar l = args1.length;\n\t\t\tvar al = arguments.length;\n\t\t\tvar args = new Array(al + l);\n\t\t\tvar i;\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\targs[i] = args1[i];\n\t\t\t}\n\t\t\tfor(i=0; i<al; ++i) {\n\t\t\t\targs[i+l] = arguments[i];\n\t\t\t}\n\t\t\treturn _apply(f, this, args);\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Takes an object that responds to the resolver interface, and returns\n\t * a function that will resolve or reject it depending on how it is called.\n\t *\n\t * @example\n\t *\tfunction callbackTakingFunction(callback) {\n\t *\t\tif(somethingWrongHappened) {\n\t *\t\t\tcallback(error);\n\t *\t\t} else {\n\t *\t\t\tcallback(null, interestingValue);\n\t *\t\t}\n\t *\t}\n\t *\n\t *\tvar when = require('when'), nodefn = require('when/node/function');\n\t *\n\t *\tvar deferred = when.defer();\n\t *\tcallbackTakingFunction(nodefn.createCallback(deferred.resolver));\n\t *\n\t *\tdeferred.promise.then(function(interestingValue) {\n\t *\t\t// Use interestingValue\n\t *\t});\n\t *\n\t * @param {Resolver} resolver that will be 'attached' to the callback\n\t * @returns {Function} a node-style callback function\n\t */\n\tfunction createCallback(resolver) {\n\t\treturn function(err, value) {\n\t\t\tif(err) {\n\t\t\t\tresolver.reject(err);\n\t\t\t} else if(arguments.length > 2) {\n\t\t\t\tresolver.resolve(slice.call(arguments, 1));\n\t\t\t} else {\n\t\t\t\tresolver.resolve(value);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Attaches a node-style callback to a promise, ensuring the callback is\n\t * called for either fulfillment or rejection. Returns a promise with the same\n\t * state as the passed-in promise.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tbindCallback(deferred.promise, callback);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Promise} promise The promise to be attached to.\n\t * @param {Function} callback The node-style callback to attach.\n\t * @returns {Promise} A promise with the same state as the passed-in promise.\n\t */\n\tfunction bindCallback(promise, callback) {\n\t\tpromise = when(promise);\n\n\t\tif (callback) {\n\t\t\tpromise.then(success, wrapped);\n\t\t}\n\n\t\treturn promise;\n\n\t\tfunction success(value) {\n\t\t\twrapped(null, value);\n\t\t}\n\n\t\tfunction wrapped(err, value) {\n\t\t\tsetTimer(function () {\n\t\t\t\tcallback(err, value);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Takes a node-style callback and returns new function that accepts a\n\t * promise, calling the original callback when the promise is either\n\t * fulfilled or rejected with the appropriate arguments.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tvar wrapped = liftCallback(callback);\n\t *\n\t *\t// `wrapped` can now be passed around at will\n\t *\twrapped(deferred.promise);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Function} callback The node-style callback to wrap.\n\t * @returns {Function} The lifted, promise-accepting function.\n\t */\n\tfunction liftCallback(callback) {\n\t\treturn function(promise) {\n\t\t\treturn bindCallback(promise, callback);\n\t\t};\n\t}\n});\n\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * parallel.js\n *\n * Run a set of task functions in parallel. All tasks will\n * receive the same args\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in parallel\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for array containing the\n\t * result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function parallel(tasks /*, args... */) {\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.map(tasks, function(task) {\n\t\t\t\treturn task.apply(void 0, args);\n\t\t\t});\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * pipeline.js\n *\n * Run a set of task functions in sequence, passing the result\n * of the previous as an argument to the next. Like a shell\n * pipeline, e.g. `cat file.txt | grep 'foo' | sed -e 's/foo/bar/g'\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in a pipeline where the next\n\t * tasks receives the result of the previous. The first task\n\t * will receive the initialArgs as its argument list.\n\t * @param tasks {Array|Promise} array or promise for array of task functions\n\t * @param [initialArgs...] {*} arguments to be passed to the first task\n\t * @return {Promise} promise for return value of the final task\n\t */\n\treturn function pipeline(tasks /* initialArgs... */) {\n\t\t// Self-optimizing function to run first task with multiple\n\t\t// args using apply, but subsequence tasks via direct invocation\n\t\tvar runTask = function(args, task) {\n\t\t\trunTask = function(arg, task) {\n\t\t\t\treturn task(arg);\n\t\t\t};\n\n\t\t\treturn task.apply(null, args);\n\t\t};\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(arg, task) {\n\t\t\t\treturn runTask(arg, task);\n\t\t\t}, args);\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2012-2013 original author or authors */\n\n/**\n * poll.js\n *\n * Helper that polls until cancelled or for a condition to become true.\n *\n * @author Scott Andrews\n */\n\n(function (define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar cancelable = require('./cancelable');\n\n\t/**\n\t * Periodically execute the task function on the msec delay. The result of\n\t * the task may be verified by watching for a condition to become true. The\n\t * returned deferred is cancellable if the polling needs to be cancelled\n\t * externally before reaching a resolved state.\n\t *\n\t * The next vote is scheduled after the results of the current vote are\n\t * verified and rejected.\n\t *\n\t * Polling may be terminated by the verifier returning a truthy value,\n\t * invoking cancel() on the returned promise, or the task function returning\n\t * a rejected promise.\n\t *\n\t * Usage:\n\t *\n\t * var count = 0;\n\t * function doSomething() { return count++ }\n\t *\n\t * // poll until cancelled\n\t * var p = poll(doSomething, 1000);\n\t * ...\n\t * p.cancel();\n\t *\n\t * // poll until condition is met\n\t * poll(doSomething, 1000, function(result) { return result > 10 })\n\t * .then(function(result) { assert result == 10 });\n\t *\n\t * // delay first vote\n\t * poll(doSomething, 1000, anyFunc, true);\n\t *\n\t * @param task {Function} function that is executed after every timeout\n\t * @param interval {number|Function} timeout in milliseconds\n\t * @param [verifier] {Function} function to evaluate the result of the vote.\n\t * May return a {Promise} or a {Boolean}. Rejecting the promise or a\n\t * falsey value will schedule the next vote.\n\t * @param [delayInitialTask] {boolean} if truthy, the first vote is scheduled\n\t * instead of immediate\n\t *\n\t * @returns {Promise}\n\t */\n\treturn function poll(task, interval, verifier, delayInitialTask) {\n\t\tvar deferred, canceled, reject;\n\n\t\tcanceled = false;\n\t\tdeferred = cancelable(when.defer(), function () { canceled = true; });\n\t\treject = deferred.reject;\n\n\t\tverifier = verifier || function () { return false; };\n\n\t\tif (typeof interval !== 'function') {\n\t\t\tinterval = (function (interval) {\n\t\t\t\treturn function () { return when().delay(interval); };\n\t\t\t})(interval);\n\t\t}\n\n\t\tfunction certify(result) {\n\t\t\tdeferred.resolve(result);\n\t\t}\n\n\t\tfunction schedule(result) {\n\t\t\tattempt(interval).then(vote, reject);\n\t\t\tif (result !== void 0) {\n\t\t\t\tdeferred.notify(result);\n\t\t\t}\n\t\t}\n\n\t\tfunction vote() {\n\t\t\tif (canceled) { return; }\n\t\t\twhen(task(),\n\t\t\t\tfunction (result) {\n\t\t\t\t\twhen(verifier(result),\n\t\t\t\t\t\tfunction (verification) {\n\t\t\t\t\t\t\treturn verification ? certify(result) : schedule(result);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction () { schedule(result); }\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\n\t\tif (delayInitialTask) {\n\t\t\tschedule();\n\t\t} else {\n\t\t\t// if task() is blocking, vote will also block\n\t\t\tvote();\n\t\t}\n\n\t\t// make the promise cancelable\n\t\tdeferred.promise = Object.create(deferred.promise);\n\t\tdeferred.promise.cancel = deferred.cancel;\n\n\t\treturn deferred.promise;\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * sequence.js\n *\n * Run a set of task functions in sequence. All tasks will\n * receive the same args.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in sequence with no overlap\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for an array containing\n\t * the result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function sequence(tasks /*, args... */) {\n\t\tvar results = [];\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(results, task) {\n\t\t\t\treturn when(task.apply(void 0, args), addResult);\n\t\t\t}, results);\n\t\t});\n\n\t\tfunction addResult(result) {\n\t\t\tresults.push(result);\n\t\t\treturn results;\n\t\t}\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n"]} \ No newline at end of file
+{"version":3,"sources":["build/when.browserify.js","callbacks.js","cancelable.js","delay.js","function.js","guard.js","keys.js","lib/Promise.js","lib/Scheduler.js","lib/TimeoutError.js","lib/apply.js","lib/decorators/array.js","lib/decorators/flow.js","lib/decorators/fold.js","lib/decorators/inspect.js","lib/decorators/iterate.js","lib/decorators/progress.js","lib/decorators/timed.js","lib/decorators/unhandledRejection.js","lib/decorators/with.js","lib/env.js","lib/format.js","lib/liftAll.js","lib/makePromise.js","lib/state.js","node.js","parallel.js","pipeline.js","poll.js","sequence.js","timeout.js","when.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/build/when.browserify.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/callbacks.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/cancelable.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/delay.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/function.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/guard.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/keys.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/Promise.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/Scheduler.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/TimeoutError.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/apply.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/array.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/flow.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/fold.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/inspect.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/iterate.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/progress.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/timed.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/unhandledRejection.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/with.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/env.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/format.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/liftAll.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/makePromise.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/state.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/node.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/parallel.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/pipeline.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/poll.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/sequence.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/timeout.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/when.js"],"names":["when","module","exports","require","callbacks","cancelable","delay","fn","guard","keys","nodefn","node","parallel","pipeline","poll","sequence","timeout","define","apply","asyncFunction","extraAsyncArgs","_apply","this","dispatch","f","thisArg","args","h","push","alwaysUnary","resolve","reject","tryCatchResolve","resolver","e","call","slice","arguments","lift","length","concat","liftAll","src","combine","dst","_liftAll","promisify","positions","Promise","all","then","callbackPos","errbackPos","p","_defer","callback","normalizePosition","errback","insertCallback","_handler","pos","splice","Array","prototype","makeApply","amd","factory","deferred","canceler","cancel","promise","msec","value","compose","funcs","firstPromise","attempt","reduce","arg","func","condition","withThis","exit","n","allowed","count","Math","max","waiting","shift","object","settleKey","k","x","pending","results","Object","i","fold","map","mapWithKey","toPromise","o","settle","promises","states","populateResults","makePromise","Scheduler","async","asap","scheduler","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","self","drain","_drain","enqueue","task","run","afterQueue","TimeoutError","message","Error","name","captureStackTrace","create","constructor","l","params","callAndResolve","c","handler","callAndResolveNext","state","applier","any","handleFulfill","errors","handleReject","resolved","become","_visitRemaining","visit","RangeError","some","fulfill","nFulfill","nReject","min","notify","_traverse","filter","predicate","a","keep","filterSync","filtered","j","settleOne","join","fulfilled","rejected","_unreport","inspect","ar","liftCombine","reduceRight","arr","z","applyFold","spread","onFulfilled","array","rejectInvalidPredicate","TypeError","evaluatePredicate","isError","maybeThenable","identity","createCatchFilter","runSideEffect","propagate","result","propagateValue","origCatch","done","onResult","onError","receiver","otherwise","onRejected","ensure","orElse","defaultValue","tap","onFulfilledSideEffect","_beget","to","iterate","unfold","unspool","next","item","newSeed","seed","progress","onProgress","setTimeout","ms","y","env","setTimer","handleDelay","resolveDelay","onTimeout","reason","t","clearTimer","throwit","noop","format","report","r","handled","reported","logError","id","formatError","unreport","indexOf","logInfo","formatObject","tasks","running","flush","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","child","chain","isNode","process","toString","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","document","createTextNode","observe","characterData","data","MutationObs","capturedSetTimeout","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","s","stack","String","JSON","tryStringify","stringify","defaultCombine","defaultDst","bind","liftOne","key","environment","Handler","init","promiseResolve","promiseReject","promiseNotify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","context","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","traverseAt","settleAt","Fulfilled","getHandlerMaybeThenable","visitRemaining","start","markAsHandled","race","runRace","getHandlerUntrusted","untrustedThen","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","failIfRejected","runContinuation1","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","b","inherit","Parent","Child","objectCreate","hasCustomEvent","CustomEvent","ev","ignoredException","hasInternetExplorerCustomEvent","createEvent","initCustomEvent","initEmitRejection","emit","type","detail","bubbles","dispatchEvent","emitRejection","proto","fail","_state","q","cont","foreverPendingHandler","_resolve","_reject","_notify","toPendingState","toRejectedState","toFulfilledState","cb","createCallback","args1","al","err","bindCallback","success","wrapped","liftCallback","runTask","interval","verifier","delayInitialTask","certify","schedule","vote","canceled","verification","addResult","trigger","Deferred","isPromiseLike","mapFunc","timed","flow","generate","unhandledRejection","feature"],"mappings":"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ACA5E,EAAA4E,QAAAA,EAEA5E,EAAA2M,QAAA3J,EAAA2J,QACA3M,EAAA4M,OAAA5J,EAAA4J,OAEA5M,EAAAoK,KAAAA,EAEApK,EAAAiD,IAAAA,EACAjD,EAAAuG,OAAAA,EAEAvG,EAAA4I,IAAAtG,EAAAU,EAAA4F,KACA5I,EAAAqJ,KAAA/G,EAAAU,EAAAqG,MACArJ,EAAA0T,KAAApR,EAAAU,EAAA0Q,MAEA1T,EAAAmG,IAAAA,EACAnG,EAAA4J,OAAAA,EACA5J,EAAA6E,OAAAvC,EAAAU,EAAA6B,QACA7E,EAAA2K,YAAArI,EAAAU,EAAA2H,aAEA3K,EAAA6Y,cAAAA,EAEA7Y,EAAAgD,QAAAA,EACAhD,EAAAyS,MAAAA,EAIAzS,EAAA6H,aAAAA,EAiKA7H,KAEA,kBAAAiB,IAAAA,EAAAgD,IAAAhD,EAAA,SAAAiD,GAAAjE,EAAAC,QAAAgE,EAAA/D;A/DnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC37BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08","sourcesContent":["var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for interacting with 'traditional',\n * callback-taking functions using a promise interface.\n *\n * @author Renato Zannon\n * @contributor Brian Cavalier\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar _liftAll = require('./lib/liftAll');\n\tvar slice = Array.prototype.slice;\n\n\tvar makeApply = require('./lib/apply');\n\tvar _apply = makeApply(Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tpromisify: promisify\n\t};\n\n\t/**\n\t * Takes a `traditional` callback-taking function and returns a promise for its\n\t * result, accepting an optional array of arguments (that might be values or\n\t * promises). It assumes that the function takes its callback and errback as\n\t * the last two arguments. The resolution of the promise depends on whether the\n\t * function will call its callback or its errback.\n\t *\n\t * @example\n\t * var domIsLoaded = callbacks.apply($);\n\t * domIsLoaded.then(function() {\n\t *\t\tdoMyDomStuff();\n\t *\t});\n\t *\n\t * @example\n\t * function existingAjaxyFunction(url, callback, errback) {\n\t *\t\t// Complex logic you'd rather not change\n\t *\t}\n\t *\n\t * var promise = callbacks.apply(existingAjaxyFunction, [\"/movies.json\"]);\n\t *\n\t * promise.then(function(movies) {\n\t *\t\t// Work with movies\n\t *\t}, function(reason) {\n\t *\t\t// Handle error\n\t *\t});\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction apply(asyncFunction, extraAsyncArgs) {\n\t\treturn _apply(asyncFunction, this, extraAsyncArgs || []);\n\t}\n\n\t/**\n\t * Apply helper that allows specifying thisArg\n\t * @private\n\t */\n\tfunction dispatch(f, thisArg, args, h) {\n\t\targs.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h));\n\t\ttryCatchResolve(f, thisArg, args, h);\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tf.apply(thisArg, args);\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Works as `callbacks.apply` does, with the difference that the arguments to\n\t * the function are passed individually, instead of as an array.\n\t *\n\t * @example\n\t * function sumInFiveSeconds(a, b, callback) {\n\t *\t\tsetTimeout(function() {\n\t *\t\t\tcallback(a + b);\n\t *\t\t}, 5000);\n\t *\t}\n\t *\n\t * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10);\n\t *\n\t * // Logs '15' 5 seconds later\n\t * sumPromise.then(console.log);\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {...*} args arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction call(asyncFunction/*, arg1, arg2...*/) {\n\t\treturn _apply(asyncFunction, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a 'traditional' callback/errback-taking function and returns a function\n\t * that returns a promise instead. The resolution/rejection of the promise\n\t * depends on whether the original function will call its callback or its\n\t * errback.\n\t *\n\t * If additional arguments are passed to the `lift` call, they will be prepended\n\t * on the calls to the original function, much like `Function.prototype.bind`.\n\t *\n\t * The resulting function is also \"promise-aware\", in the sense that, if given\n\t * promises as arguments, it will wait for their resolution before executing.\n\t *\n\t * @example\n\t * function traditionalAjax(method, url, callback, errback) {\n\t *\t\tvar xhr = new XMLHttpRequest();\n\t *\t\txhr.open(method, url);\n\t *\n\t *\t\txhr.onload = callback;\n\t *\t\txhr.onerror = errback;\n\t *\n\t *\t\txhr.send();\n\t *\t}\n\t *\n\t * var promiseAjax = callbacks.lift(traditionalAjax);\n\t * promiseAjax(\"GET\", \"/movies.json\").then(console.log, console.error);\n\t *\n\t * var promiseAjaxGet = callbacks.lift(traditionalAjax, \"GET\");\n\t * promiseAjaxGet(\"/movies.json\").then(console.log, console.error);\n\t *\n\t * @param {Function} f traditional async function to be decorated\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f/*, args...*/) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * `promisify` is a version of `lift` that allows fine-grained control over the\n\t * arguments that passed to the underlying function. It is intended to handle\n\t * functions that don't follow the common callback and errback positions.\n\t *\n\t * The control is done by passing an object whose 'callback' and/or 'errback'\n\t * keys, whose values are the corresponding 0-based indexes of the arguments on\n\t * the function. Negative values are interpreted as being relative to the end\n\t * of the arguments array.\n\t *\n\t * If arguments are given on the call to the 'promisified' function, they are\n\t * intermingled with the callback and errback. If a promise is given among them,\n\t * the execution of the function will only occur after its resolution.\n\t *\n\t * @example\n\t * var delay = callbacks.promisify(setTimeout, {\n\t *\t\tcallback: 0\n\t *\t});\n\t *\n\t * delay(100).then(function() {\n\t *\t\tconsole.log(\"This happens 100ms afterwards\");\n\t *\t});\n\t *\n\t * @example\n\t * function callbackAsLast(errback, followsStandards, callback) {\n\t *\t\tif(followsStandards) {\n\t *\t\t\tcallback(\"well done!\");\n\t *\t\t} else {\n\t *\t\t\terrback(\"some programmers just want to watch the world burn\");\n\t *\t\t}\n\t *\t}\n\t *\n\t * var promisified = callbacks.promisify(callbackAsLast, {\n\t *\t\tcallback: -1,\n\t *\t\terrback: 0,\n\t *\t});\n\t *\n\t * promisified(true).then(console.log, console.error);\n\t * promisified(false).then(console.log, console.error);\n\t *\n\t * @param {Function} asyncFunction traditional function to be decorated\n\t * @param {object} positions\n\t * @param {number} [positions.callback] index at which asyncFunction expects to\n\t * receive a success callback\n\t * @param {number} [positions.errback] index at which asyncFunction expects to\n\t * receive an error callback\n\t * @returns {function} promisified function that accepts\n\t *\n\t * @deprecated\n\t */\n\tfunction promisify(asyncFunction, positions) {\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\treturn Promise.all(arguments).then(function(args) {\n\t\t\t\tvar p = Promise._defer();\n\n\t\t\t\tvar callbackPos, errbackPos;\n\n\t\t\t\tif(typeof positions.callback === 'number') {\n\t\t\t\t\tcallbackPos = normalizePosition(args, positions.callback);\n\t\t\t\t}\n\n\t\t\t\tif(typeof positions.errback === 'number') {\n\t\t\t\t\terrbackPos = normalizePosition(args, positions.errback);\n\t\t\t\t}\n\n\t\t\t\tif(errbackPos < callbackPos) {\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t} else {\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t}\n\n\t\t\t\tasyncFunction.apply(thisArg, args);\n\n\t\t\t\treturn p;\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction normalizePosition(args, pos) {\n\t\treturn pos < 0 ? (args.length + pos + 2) : pos;\n\t}\n\n\tfunction insertCallback(args, pos, callback, thisArg) {\n\t\tif(typeof pos === 'number') {\n\t\t\targs.splice(pos, 0, alwaysUnary(callback, thisArg));\n\t\t}\n\t}\n\n\tfunction alwaysUnary(fn, thisArg) {\n\t\treturn function() {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfn.call(thisArg, slice.call(arguments));\n\t\t\t} else {\n\t\t\t\tfn.apply(thisArg, arguments);\n\t\t\t}\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright B Cavalier & J Hann */\n\n/**\n * cancelable.js\n * @deprecated\n *\n * Decorator that makes a deferred \"cancelable\". It adds a cancel() method that\n * will call a special cancel handler function and then reject the deferred. The\n * cancel handler can be used to do resource cleanup, or anything else that should\n * be done before any other rejection handlers are executed.\n *\n * Usage:\n *\n * var cancelableDeferred = cancelable(when.defer(), myCancelHandler);\n *\n * @author brian@hovercraftstudios.com\n */\n\n(function(define) {\ndefine(function() {\n\n /**\n * Makes deferred cancelable, adding a cancel() method.\n\t * @deprecated\n *\n * @param deferred {Deferred} the {@link Deferred} to make cancelable\n * @param canceler {Function} cancel handler function to execute when this deferred\n\t * is canceled. This is guaranteed to run before all other rejection handlers.\n\t * The canceler will NOT be executed if the deferred is rejected in the standard\n\t * way, i.e. deferred.reject(). It ONLY executes if the deferred is canceled,\n\t * i.e. deferred.cancel()\n *\n * @returns deferred, with an added cancel() method.\n */\n return function(deferred, canceler) {\n // Add a cancel method to the deferred to reject the delegate\n // with the special canceled indicator.\n deferred.cancel = function() {\n\t\t\ttry {\n\t\t\t\tdeferred.reject(canceler(deferred));\n\t\t\t} catch(e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t}\n\n\t\t\treturn deferred.promise;\n };\n\n return deferred;\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * delay.js\n *\n * Helper that returns a promise that resolves after a delay.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(value).delay(ms)\n */\n return function delay(msec, value) {\n\t\treturn when(value).delay(msec);\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for wrapping and executing 'traditional'\n * synchronous functions in a promise interface.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar _liftAll = require('./lib/liftAll');\n\tvar _apply = require('./lib/apply')(when.Promise);\n\tvar slice = Array.prototype.slice;\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tcall: attempt,\n\t\tapply: apply,\n\t\tcompose: compose\n\t};\n\n\t/**\n\t * Takes a function and an optional array of arguments (that might be promises),\n\t * and calls the function. The return value is a promise whose resolution\n\t * depends on the value returned by the function.\n\t * @param {function} f function to be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the return value of func\n\t */\n\tfunction apply(f, args) {\n\t\t// slice args just in case the caller passed an Arguments instance\n\t\treturn _apply(f, this, args == null ? [] : slice.call(args));\n\t}\n\n\t/**\n\t * Takes a 'regular' function and returns a version of that function that\n\t * returns a promise instead of a plain value, and handles thrown errors by\n\t * returning a rejected promise. Also accepts a list of arguments to be\n\t * prepended to the new function, as does Function.prototype.bind.\n\t *\n\t * The resulting function is promise-aware, in the sense that it accepts\n\t * promise arguments, and waits for their resolution.\n\t * @param {Function} f function to be bound\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Composes multiple functions by piping their return values. It is\n\t * transparent to whether the functions return 'regular' values or promises:\n\t * the piped argument is always a resolved value. If one of the functions\n\t * throws or returns a rejected promise, the composed promise will be also\n\t * rejected.\n\t *\n\t * The arguments (or promises to arguments) given to the returned function (if\n\t * any), are passed directly to the first function on the 'pipeline'.\n\t * @param {Function} f the function to which the arguments will be passed\n\t * @param {...Function} [funcs] functions that will be composed, in order\n\t * @returns {Function} a promise-returning composition of the functions\n\t */\n\tfunction compose(f /*, funcs... */) {\n\t\tvar funcs = slice.call(arguments, 1);\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\tvar args = slice.call(arguments);\n\t\t\tvar firstPromise = attempt.apply(thisArg, [f].concat(args));\n\n\t\t\treturn when.reduce(funcs, function(arg, func) {\n\t\t\t\treturn func.call(thisArg, arg);\n\t\t\t}, firstPromise);\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Generalized promise concurrency guard\n * Adapted from original concept by Sakari Jokinen (Rocket Pack, Ltd.)\n *\n * @author Brian Cavalier\n * @author John Hann\n * @contributor Sakari Jokinen\n */\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar slice = Array.prototype.slice;\n\n\tguard.n = n;\n\n\treturn guard;\n\n\t/**\n\t * Creates a guarded version of f that can only be entered when the supplied\n\t * condition allows.\n\t * @param {function} condition represents a critical section that may only\n\t * be entered when allowed by the condition\n\t * @param {function} f function to guard\n\t * @returns {function} guarded version of f\n\t */\n\tfunction guard(condition, f) {\n\t\treturn function() {\n\t\t\tvar args = slice.call(arguments);\n\n\t\t\treturn when(condition()).withThis(this).then(function(exit) {\n\t\t\t\treturn when(f.apply(this, args))['finally'](exit);\n\t\t\t});\n\t\t};\n\t}\n\n\t/**\n\t * Creates a condition that allows only n simultaneous executions\n\t * of a guarded function\n\t * @param {number} allowed number of allowed simultaneous executions\n\t * @returns {function} condition function which returns a promise that\n\t * fulfills when the critical section may be entered. The fulfillment\n\t * value is a function (\"notifyExit\") that must be called when the critical\n\t * section has been exited.\n\t */\n\tfunction n(allowed) {\n\t\tvar count = 0;\n\t\tvar waiting = [];\n\n\t\treturn function enter() {\n\t\t\treturn when.promise(function(resolve) {\n\t\t\t\tif(count < allowed) {\n\t\t\t\t\tresolve(exit);\n\t\t\t\t} else {\n\t\t\t\t\twaiting.push(resolve);\n\t\t\t\t}\n\t\t\t\tcount += 1;\n\t\t\t});\n\t\t};\n\n\t\tfunction exit() {\n\t\t\tcount = Math.max(count - 1, 0);\n\t\t\tif(waiting.length > 0) {\n\t\t\t\twaiting.shift()(exit);\n\t\t\t}\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Licensed under the MIT License at:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar toPromise = when.resolve;\n\n\treturn {\n\t\tall: when.lift(all),\n\t\tmap: map,\n\t\tsettle: settle\n\t};\n\n\t/**\n\t * Resolve all the key-value pairs in the supplied object or promise\n\t * for an object.\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be resolved\n\t * @returns {Promise} promise for an object with the fully resolved key-value pairs\n\t */\n\tfunction all(object) {\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\n\t\tvar results = {};\n\t\tvar keys = Object.keys(object);\n\t\tvar pending = keys.length;\n\n\t\tfor(var i=0, k; i<keys.length; ++i) {\n\t\t\tk = keys[i];\n\t\t\tPromise._handler(object[k]).fold(settleKey, k, results, resolver);\n\t\t}\n\n\t\tif(pending === 0) {\n\t\t\tresolver.resolve(results);\n\t\t}\n\n\t\treturn p;\n\n\t\tfunction settleKey(k, x, resolver) {\n\t\t\t/*jshint validthis:true*/\n\t\t\tthis[k] = x;\n\t\t\tif(--pending === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Map values in the supplied object's keys\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be reduced\n\t * @param {function(value:*, key:String):*} f mapping function which may\n\t * return either a promise or a value\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * resolved key-value pairs\n\t */\n\tfunction map(object, f) {\n\t\treturn toPromise(object).then(function(object) {\n\t\t\treturn all(Object.keys(object).reduce(function(o, k) {\n\t\t\t\to[k] = toPromise(object[k]).fold(mapWithKey, k);\n\t\t\t\treturn o;\n\t\t\t}, {}));\n\t\t});\n\n\t\tfunction mapWithKey(k, x) {\n\t\t\treturn f(x, k);\n\t\t}\n\t}\n\n\t/**\n\t * Resolve all key-value pairs in the supplied object and return a promise\n\t * that will always fulfill with the outcome states of all input promises.\n\t * @param {object} object whose key-value pairs will be settled\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * settled key-value pairs\n\t */\n\tfunction settle(object) {\n\t\tvar keys = Object.keys(object);\n\t\tvar results = {};\n\n\t\tif(keys.length === 0) {\n\t\t\treturn toPromise(results);\n\t\t}\n\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\t\tvar promises = keys.map(function(k) { return object[k]; });\n\n\t\twhen.settle(promises).then(function(states) {\n\t\t\tpopulateResults(keys, states, results, resolver);\n\t\t});\n\n\t\treturn p;\n\t}\n\n\tfunction populateResults(keys, states, results, resolver) {\n\t\tfor(var i=0; i<keys.length; i++) {\n\t\t\tresults[keys[i]] = states[i];\n\t\t}\n\t\tresolver.resolve(results);\n\t}\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\t// Optimize the case where we get an already-resolved when.js promise\n\t\t\t// by extracting its state:\n\t\t\tvar handler;\n\t\t\tif (p instanceof Promise) {\n\t\t\t\t// This is our own Promise type and we can reach its handler internals:\n\t\t\t\thandler = p._handler.join();\n\t\t\t}\n\t\t\tif((handler && handler.state() === 0) || !handler) {\n\t\t\t\t// Either still pending, or not a Promise at all:\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\t// The promise is our own, but it is already resolved. Take a shortcut.\n\t\t\t// Since we're not actually handling the resolution, we need to disable\n\t\t\t// rejection reporting.\n\t\t\thandler._unreport();\n\t\t\treturn state.inspect(handler);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function generate(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\n\t\tPromise.iterate = iterate;\n\t\tPromise.unfold = unfold;\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.iterate\n\t\t * Generate a (potentially infinite) stream of promised values:\n\t\t * x, f(x), f(f(x)), etc. until condition(x) returns true\n\t\t * @param {function} f function to generate a new x from the previous x\n\t\t * @param {function} condition function that, given the current x, returns\n\t\t * truthy when the iterate should stop\n\t\t * @param {function} handler function to handle the value produced by f\n\t\t * @param {*|Promise} x starting value, may be a promise\n\t\t * @return {Promise} the result of the last call to f before\n\t\t * condition returns true\n\t\t */\n\t\tfunction iterate(f, condition, handler, x) {\n\t\t\treturn unfold(function(x) {\n\t\t\t\treturn [x, f(x)];\n\t\t\t}, condition, handler, x);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.unfold\n\t\t * Generate a (potentially infinite) stream of promised values\n\t\t * by applying handler(generator(seed)) iteratively until\n\t\t * condition(seed) returns true.\n\t\t * @param {function} unspool function that generates a [value, newSeed]\n\t\t * given a seed.\n\t\t * @param {function} condition function that, given the current seed, returns\n\t\t * truthy when the unfold should stop\n\t\t * @param {function} handler function to handle the value produced by unspool\n\t\t * @param x {*|Promise} starting value, may be a promise\n\t\t * @return {Promise} the result of the last value produced by unspool before\n\t\t * condition returns true\n\t\t */\n\t\tfunction unfold(unspool, condition, handler, x) {\n\t\t\treturn resolve(x).then(function(seed) {\n\t\t\t\treturn resolve(condition(seed)).then(function(done) {\n\t\t\t\t\treturn done ? seed : resolve(unspool(seed)).spread(next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tfunction next(item, newSeed) {\n\t\t\t\treturn resolve(handler(item)).then(function() {\n\t\t\t\t\treturn unfold(unspool, condition, handler, newSeed);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function progress(Promise) {\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Register a progress handler for this promise\n\t\t * @param {function} onProgress\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.progress = function(onProgress) {\n\t\t\treturn this.then(void 0, void 0, onProgress);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2013 original author or authors */\n\n/**\n * Collection of helpers for interfacing with node-style asynchronous functions\n * using promises.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar _liftAll = require('./lib/liftAll');\n\tvar setTimer = require('./lib/env').setTimer;\n\tvar slice = Array.prototype.slice;\n\n\tvar _apply = require('./lib/apply')(when.Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tcreateCallback: createCallback,\n\t\tbindCallback: bindCallback,\n\t\tliftCallback: liftCallback\n\t};\n\n\t/**\n\t * Takes a node-style async function and calls it immediately (with an optional\n\t * array of arguments or promises for arguments). It returns a promise whose\n\t * resolution depends on whether the async functions calls its callback with the\n\t * conventional error argument or not.\n\t *\n\t * With this it becomes possible to leverage existing APIs while still reaping\n\t * the benefits of promises.\n\t *\n\t * @example\n\t * function onlySmallNumbers(n, callback) {\n\t *\t\tif(n < 10) {\n\t *\t\t\tcallback(null, n + 10);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * var nodefn = require(\"when/node/function\");\n\t *\n\t * // Logs '15'\n\t * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction apply(f, args) {\n\t\treturn _apply(f, this, args || []);\n\t}\n\n\tfunction dispatch(f, thisArg, args, h) {\n\t\tvar cb = createCallback(h);\n\t\ttry {\n\t\t\tswitch(args.length) {\n\t\t\t\tcase 2: f.call(thisArg, args[0], args[1], cb); break;\n\t\t\t\tcase 1: f.call(thisArg, args[0], cb); break;\n\t\t\t\tcase 0: f.call(thisArg, cb); break;\n\t\t\t\tdefault:\n\t\t\t\t\targs.push(cb);\n\t\t\t\t\tf.apply(thisArg, args);\n\t\t\t}\n\t\t} catch(e) {\n\t\t\th.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Has the same behavior that {@link apply} has, with the difference that the\n\t * arguments to the function are provided individually, while {@link apply} accepts\n\t * a single array.\n\t *\n\t * @example\n\t * function sumSmallNumbers(x, y, callback) {\n\t *\t\tvar result = x + y;\n\t *\t\tif(result < 10) {\n\t *\t\t\tcallback(null, result);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * // Logs '5'\n\t * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {...*} [args] arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction call(f /*, args... */) {\n\t\treturn _apply(f, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a node-style function and returns new function that wraps the\n\t * original and, instead of taking a callback, returns a promise. Also, it\n\t * knows how to handle promises given as arguments, waiting for their\n\t * resolution before executing.\n\t *\n\t * Upon execution, the orginal function is executed as well. If it passes\n\t * a truthy value as the first argument to the callback, it will be\n\t * interpreted as an error condition, and the promise will be rejected\n\t * with it. Otherwise, the call is considered a resolution, and the promise\n\t * is resolved with the callback's second argument.\n\t *\n\t * @example\n\t * var fs = require(\"fs\"), nodefn = require(\"when/node/function\");\n\t *\n\t * var promiseRead = nodefn.lift(fs.readFile);\n\t *\n\t * // The promise is resolved with the contents of the file if everything\n\t * // goes ok\n\t * promiseRead('exists.txt').then(console.log, console.error);\n\t *\n\t * // And will be rejected if something doesn't work out\n\t * // (e.g. the files does not exist)\n\t * promiseRead('doesnt_exist.txt').then(console.log, console.error);\n\t *\n\t *\n\t * @param {Function} f node-style function to be lifted\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args1 = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\t// TODO: Simplify once partialing has been removed\n\t\t\tvar l = args1.length;\n\t\t\tvar al = arguments.length;\n\t\t\tvar args = new Array(al + l);\n\t\t\tvar i;\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\targs[i] = args1[i];\n\t\t\t}\n\t\t\tfor(i=0; i<al; ++i) {\n\t\t\t\targs[i+l] = arguments[i];\n\t\t\t}\n\t\t\treturn _apply(f, this, args);\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Takes an object that responds to the resolver interface, and returns\n\t * a function that will resolve or reject it depending on how it is called.\n\t *\n\t * @example\n\t *\tfunction callbackTakingFunction(callback) {\n\t *\t\tif(somethingWrongHappened) {\n\t *\t\t\tcallback(error);\n\t *\t\t} else {\n\t *\t\t\tcallback(null, interestingValue);\n\t *\t\t}\n\t *\t}\n\t *\n\t *\tvar when = require('when'), nodefn = require('when/node/function');\n\t *\n\t *\tvar deferred = when.defer();\n\t *\tcallbackTakingFunction(nodefn.createCallback(deferred.resolver));\n\t *\n\t *\tdeferred.promise.then(function(interestingValue) {\n\t *\t\t// Use interestingValue\n\t *\t});\n\t *\n\t * @param {Resolver} resolver that will be 'attached' to the callback\n\t * @returns {Function} a node-style callback function\n\t */\n\tfunction createCallback(resolver) {\n\t\treturn function(err, value) {\n\t\t\tif(err) {\n\t\t\t\tresolver.reject(err);\n\t\t\t} else if(arguments.length > 2) {\n\t\t\t\tresolver.resolve(slice.call(arguments, 1));\n\t\t\t} else {\n\t\t\t\tresolver.resolve(value);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Attaches a node-style callback to a promise, ensuring the callback is\n\t * called for either fulfillment or rejection. Returns a promise with the same\n\t * state as the passed-in promise.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tbindCallback(deferred.promise, callback);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Promise} promise The promise to be attached to.\n\t * @param {Function} callback The node-style callback to attach.\n\t * @returns {Promise} A promise with the same state as the passed-in promise.\n\t */\n\tfunction bindCallback(promise, callback) {\n\t\tpromise = when(promise);\n\n\t\tif (callback) {\n\t\t\tpromise.then(success, wrapped);\n\t\t}\n\n\t\treturn promise;\n\n\t\tfunction success(value) {\n\t\t\twrapped(null, value);\n\t\t}\n\n\t\tfunction wrapped(err, value) {\n\t\t\tsetTimer(function () {\n\t\t\t\tcallback(err, value);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Takes a node-style callback and returns new function that accepts a\n\t * promise, calling the original callback when the promise is either\n\t * fulfilled or rejected with the appropriate arguments.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tvar wrapped = liftCallback(callback);\n\t *\n\t *\t// `wrapped` can now be passed around at will\n\t *\twrapped(deferred.promise);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Function} callback The node-style callback to wrap.\n\t * @returns {Function} The lifted, promise-accepting function.\n\t */\n\tfunction liftCallback(callback) {\n\t\treturn function(promise) {\n\t\t\treturn bindCallback(promise, callback);\n\t\t};\n\t}\n});\n\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * parallel.js\n *\n * Run a set of task functions in parallel. All tasks will\n * receive the same args\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in parallel\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for array containing the\n\t * result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function parallel(tasks /*, args... */) {\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.map(tasks, function(task) {\n\t\t\t\treturn task.apply(void 0, args);\n\t\t\t});\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * pipeline.js\n *\n * Run a set of task functions in sequence, passing the result\n * of the previous as an argument to the next. Like a shell\n * pipeline, e.g. `cat file.txt | grep 'foo' | sed -e 's/foo/bar/g'\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in a pipeline where the next\n\t * tasks receives the result of the previous. The first task\n\t * will receive the initialArgs as its argument list.\n\t * @param tasks {Array|Promise} array or promise for array of task functions\n\t * @param [initialArgs...] {*} arguments to be passed to the first task\n\t * @return {Promise} promise for return value of the final task\n\t */\n\treturn function pipeline(tasks /* initialArgs... */) {\n\t\t// Self-optimizing function to run first task with multiple\n\t\t// args using apply, but subsequence tasks via direct invocation\n\t\tvar runTask = function(args, task) {\n\t\t\trunTask = function(arg, task) {\n\t\t\t\treturn task(arg);\n\t\t\t};\n\n\t\t\treturn task.apply(null, args);\n\t\t};\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(arg, task) {\n\t\t\t\treturn runTask(arg, task);\n\t\t\t}, args);\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2012-2013 original author or authors */\n\n/**\n * poll.js\n *\n * Helper that polls until cancelled or for a condition to become true.\n *\n * @author Scott Andrews\n */\n\n(function (define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar cancelable = require('./cancelable');\n\n\t/**\n\t * Periodically execute the task function on the msec delay. The result of\n\t * the task may be verified by watching for a condition to become true. The\n\t * returned deferred is cancellable if the polling needs to be cancelled\n\t * externally before reaching a resolved state.\n\t *\n\t * The next vote is scheduled after the results of the current vote are\n\t * verified and rejected.\n\t *\n\t * Polling may be terminated by the verifier returning a truthy value,\n\t * invoking cancel() on the returned promise, or the task function returning\n\t * a rejected promise.\n\t *\n\t * Usage:\n\t *\n\t * var count = 0;\n\t * function doSomething() { return count++ }\n\t *\n\t * // poll until cancelled\n\t * var p = poll(doSomething, 1000);\n\t * ...\n\t * p.cancel();\n\t *\n\t * // poll until condition is met\n\t * poll(doSomething, 1000, function(result) { return result > 10 })\n\t * .then(function(result) { assert result == 10 });\n\t *\n\t * // delay first vote\n\t * poll(doSomething, 1000, anyFunc, true);\n\t *\n\t * @param task {Function} function that is executed after every timeout\n\t * @param interval {number|Function} timeout in milliseconds\n\t * @param [verifier] {Function} function to evaluate the result of the vote.\n\t * May return a {Promise} or a {Boolean}. Rejecting the promise or a\n\t * falsey value will schedule the next vote.\n\t * @param [delayInitialTask] {boolean} if truthy, the first vote is scheduled\n\t * instead of immediate\n\t *\n\t * @returns {Promise}\n\t */\n\treturn function poll(task, interval, verifier, delayInitialTask) {\n\t\tvar deferred, canceled, reject;\n\n\t\tcanceled = false;\n\t\tdeferred = cancelable(when.defer(), function () { canceled = true; });\n\t\treject = deferred.reject;\n\n\t\tverifier = verifier || function () { return false; };\n\n\t\tif (typeof interval !== 'function') {\n\t\t\tinterval = (function (interval) {\n\t\t\t\treturn function () { return when().delay(interval); };\n\t\t\t})(interval);\n\t\t}\n\n\t\tfunction certify(result) {\n\t\t\tdeferred.resolve(result);\n\t\t}\n\n\t\tfunction schedule(result) {\n\t\t\tattempt(interval).then(vote, reject);\n\t\t\tif (result !== void 0) {\n\t\t\t\tdeferred.notify(result);\n\t\t\t}\n\t\t}\n\n\t\tfunction vote() {\n\t\t\tif (canceled) { return; }\n\t\t\twhen(task(),\n\t\t\t\tfunction (result) {\n\t\t\t\t\twhen(verifier(result),\n\t\t\t\t\t\tfunction (verification) {\n\t\t\t\t\t\t\treturn verification ? certify(result) : schedule(result);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction () { schedule(result); }\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\n\t\tif (delayInitialTask) {\n\t\t\tschedule();\n\t\t} else {\n\t\t\t// if task() is blocking, vote will also block\n\t\t\tvote();\n\t\t}\n\n\t\t// make the promise cancelable\n\t\tdeferred.promise = Object.create(deferred.promise);\n\t\tdeferred.promise.cancel = deferred.cancel;\n\n\t\treturn deferred.promise;\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * sequence.js\n *\n * Run a set of task functions in sequence. All tasks will\n * receive the same args.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in sequence with no overlap\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for an array containing\n\t * the result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function sequence(tasks /*, args... */) {\n\t\tvar results = [];\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(results, task) {\n\t\t\t\treturn when(task.apply(void 0, args), addResult);\n\t\t\t}, results);\n\t\t});\n\n\t\tfunction addResult(result) {\n\t\t\tresults.push(result);\n\t\t\treturn results;\n\t\t}\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","var when = module.exports = require('../when');\n\nwhen.callbacks = require('../callbacks');\nwhen.cancelable = require('../cancelable');\nwhen.delay = require('../delay');\nwhen.fn = require('../function');\nwhen.guard = require('../guard');\nwhen.keys = require('../keys');\nwhen.nodefn = when.node = require('../node');\nwhen.parallel = require('../parallel');\nwhen.pipeline = require('../pipeline');\nwhen.poll = require('../poll');\nwhen.sequence = require('../sequence');\nwhen.timeout = require('../timeout');\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for interacting with 'traditional',\n * callback-taking functions using a promise interface.\n *\n * @author Renato Zannon\n * @contributor Brian Cavalier\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar _liftAll = require('./lib/liftAll');\n\tvar slice = Array.prototype.slice;\n\n\tvar makeApply = require('./lib/apply');\n\tvar _apply = makeApply(Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tpromisify: promisify\n\t};\n\n\t/**\n\t * Takes a `traditional` callback-taking function and returns a promise for its\n\t * result, accepting an optional array of arguments (that might be values or\n\t * promises). It assumes that the function takes its callback and errback as\n\t * the last two arguments. The resolution of the promise depends on whether the\n\t * function will call its callback or its errback.\n\t *\n\t * @example\n\t * var domIsLoaded = callbacks.apply($);\n\t * domIsLoaded.then(function() {\n\t *\t\tdoMyDomStuff();\n\t *\t});\n\t *\n\t * @example\n\t * function existingAjaxyFunction(url, callback, errback) {\n\t *\t\t// Complex logic you'd rather not change\n\t *\t}\n\t *\n\t * var promise = callbacks.apply(existingAjaxyFunction, [\"/movies.json\"]);\n\t *\n\t * promise.then(function(movies) {\n\t *\t\t// Work with movies\n\t *\t}, function(reason) {\n\t *\t\t// Handle error\n\t *\t});\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction apply(asyncFunction, extraAsyncArgs) {\n\t\treturn _apply(asyncFunction, this, extraAsyncArgs || []);\n\t}\n\n\t/**\n\t * Apply helper that allows specifying thisArg\n\t * @private\n\t */\n\tfunction dispatch(f, thisArg, args, h) {\n\t\targs.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h));\n\t\ttryCatchResolve(f, thisArg, args, h);\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tf.apply(thisArg, args);\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Works as `callbacks.apply` does, with the difference that the arguments to\n\t * the function are passed individually, instead of as an array.\n\t *\n\t * @example\n\t * function sumInFiveSeconds(a, b, callback) {\n\t *\t\tsetTimeout(function() {\n\t *\t\t\tcallback(a + b);\n\t *\t\t}, 5000);\n\t *\t}\n\t *\n\t * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10);\n\t *\n\t * // Logs '15' 5 seconds later\n\t * sumPromise.then(console.log);\n\t *\n\t * @param {function} asyncFunction function to be called\n\t * @param {...*} args arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the callback value of asyncFunction\n\t */\n\tfunction call(asyncFunction/*, arg1, arg2...*/) {\n\t\treturn _apply(asyncFunction, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a 'traditional' callback/errback-taking function and returns a function\n\t * that returns a promise instead. The resolution/rejection of the promise\n\t * depends on whether the original function will call its callback or its\n\t * errback.\n\t *\n\t * If additional arguments are passed to the `lift` call, they will be prepended\n\t * on the calls to the original function, much like `Function.prototype.bind`.\n\t *\n\t * The resulting function is also \"promise-aware\", in the sense that, if given\n\t * promises as arguments, it will wait for their resolution before executing.\n\t *\n\t * @example\n\t * function traditionalAjax(method, url, callback, errback) {\n\t *\t\tvar xhr = new XMLHttpRequest();\n\t *\t\txhr.open(method, url);\n\t *\n\t *\t\txhr.onload = callback;\n\t *\t\txhr.onerror = errback;\n\t *\n\t *\t\txhr.send();\n\t *\t}\n\t *\n\t * var promiseAjax = callbacks.lift(traditionalAjax);\n\t * promiseAjax(\"GET\", \"/movies.json\").then(console.log, console.error);\n\t *\n\t * var promiseAjaxGet = callbacks.lift(traditionalAjax, \"GET\");\n\t * promiseAjaxGet(\"/movies.json\").then(console.log, console.error);\n\t *\n\t * @param {Function} f traditional async function to be decorated\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f/*, args...*/) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * `promisify` is a version of `lift` that allows fine-grained control over the\n\t * arguments that passed to the underlying function. It is intended to handle\n\t * functions that don't follow the common callback and errback positions.\n\t *\n\t * The control is done by passing an object whose 'callback' and/or 'errback'\n\t * keys, whose values are the corresponding 0-based indexes of the arguments on\n\t * the function. Negative values are interpreted as being relative to the end\n\t * of the arguments array.\n\t *\n\t * If arguments are given on the call to the 'promisified' function, they are\n\t * intermingled with the callback and errback. If a promise is given among them,\n\t * the execution of the function will only occur after its resolution.\n\t *\n\t * @example\n\t * var delay = callbacks.promisify(setTimeout, {\n\t *\t\tcallback: 0\n\t *\t});\n\t *\n\t * delay(100).then(function() {\n\t *\t\tconsole.log(\"This happens 100ms afterwards\");\n\t *\t});\n\t *\n\t * @example\n\t * function callbackAsLast(errback, followsStandards, callback) {\n\t *\t\tif(followsStandards) {\n\t *\t\t\tcallback(\"well done!\");\n\t *\t\t} else {\n\t *\t\t\terrback(\"some programmers just want to watch the world burn\");\n\t *\t\t}\n\t *\t}\n\t *\n\t * var promisified = callbacks.promisify(callbackAsLast, {\n\t *\t\tcallback: -1,\n\t *\t\terrback: 0,\n\t *\t});\n\t *\n\t * promisified(true).then(console.log, console.error);\n\t * promisified(false).then(console.log, console.error);\n\t *\n\t * @param {Function} asyncFunction traditional function to be decorated\n\t * @param {object} positions\n\t * @param {number} [positions.callback] index at which asyncFunction expects to\n\t * receive a success callback\n\t * @param {number} [positions.errback] index at which asyncFunction expects to\n\t * receive an error callback\n\t * @returns {function} promisified function that accepts\n\t *\n\t * @deprecated\n\t */\n\tfunction promisify(asyncFunction, positions) {\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\treturn Promise.all(arguments).then(function(args) {\n\t\t\t\tvar p = Promise._defer();\n\n\t\t\t\tvar callbackPos, errbackPos;\n\n\t\t\t\tif(typeof positions.callback === 'number') {\n\t\t\t\t\tcallbackPos = normalizePosition(args, positions.callback);\n\t\t\t\t}\n\n\t\t\t\tif(typeof positions.errback === 'number') {\n\t\t\t\t\terrbackPos = normalizePosition(args, positions.errback);\n\t\t\t\t}\n\n\t\t\t\tif(errbackPos < callbackPos) {\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t} else {\n\t\t\t\t\tinsertCallback(args, callbackPos, p._handler.resolve, p._handler);\n\t\t\t\t\tinsertCallback(args, errbackPos, p._handler.reject, p._handler);\n\t\t\t\t}\n\n\t\t\t\tasyncFunction.apply(thisArg, args);\n\n\t\t\t\treturn p;\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction normalizePosition(args, pos) {\n\t\treturn pos < 0 ? (args.length + pos + 2) : pos;\n\t}\n\n\tfunction insertCallback(args, pos, callback, thisArg) {\n\t\tif(typeof pos === 'number') {\n\t\t\targs.splice(pos, 0, alwaysUnary(callback, thisArg));\n\t\t}\n\t}\n\n\tfunction alwaysUnary(fn, thisArg) {\n\t\treturn function() {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfn.call(thisArg, slice.call(arguments));\n\t\t\t} else {\n\t\t\t\tfn.apply(thisArg, arguments);\n\t\t\t}\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright B Cavalier & J Hann */\n\n/**\n * cancelable.js\n * @deprecated\n *\n * Decorator that makes a deferred \"cancelable\". It adds a cancel() method that\n * will call a special cancel handler function and then reject the deferred. The\n * cancel handler can be used to do resource cleanup, or anything else that should\n * be done before any other rejection handlers are executed.\n *\n * Usage:\n *\n * var cancelableDeferred = cancelable(when.defer(), myCancelHandler);\n *\n * @author brian@hovercraftstudios.com\n */\n\n(function(define) {\ndefine(function() {\n\n /**\n * Makes deferred cancelable, adding a cancel() method.\n\t * @deprecated\n *\n * @param deferred {Deferred} the {@link Deferred} to make cancelable\n * @param canceler {Function} cancel handler function to execute when this deferred\n\t * is canceled. This is guaranteed to run before all other rejection handlers.\n\t * The canceler will NOT be executed if the deferred is rejected in the standard\n\t * way, i.e. deferred.reject(). It ONLY executes if the deferred is canceled,\n\t * i.e. deferred.cancel()\n *\n * @returns deferred, with an added cancel() method.\n */\n return function(deferred, canceler) {\n // Add a cancel method to the deferred to reject the delegate\n // with the special canceled indicator.\n deferred.cancel = function() {\n\t\t\ttry {\n\t\t\t\tdeferred.reject(canceler(deferred));\n\t\t\t} catch(e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t}\n\n\t\t\treturn deferred.promise;\n };\n\n return deferred;\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * delay.js\n *\n * Helper that returns a promise that resolves after a delay.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(value).delay(ms)\n */\n return function delay(msec, value) {\n\t\treturn when(value).delay(msec);\n };\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2013-2014 original author or authors */\n\n/**\n * Collection of helper functions for wrapping and executing 'traditional'\n * synchronous functions in a promise interface.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar _liftAll = require('./lib/liftAll');\n\tvar _apply = require('./lib/apply')(when.Promise);\n\tvar slice = Array.prototype.slice;\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tcall: attempt,\n\t\tapply: apply,\n\t\tcompose: compose\n\t};\n\n\t/**\n\t * Takes a function and an optional array of arguments (that might be promises),\n\t * and calls the function. The return value is a promise whose resolution\n\t * depends on the value returned by the function.\n\t * @param {function} f function to be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the return value of func\n\t */\n\tfunction apply(f, args) {\n\t\t// slice args just in case the caller passed an Arguments instance\n\t\treturn _apply(f, this, args == null ? [] : slice.call(args));\n\t}\n\n\t/**\n\t * Takes a 'regular' function and returns a version of that function that\n\t * returns a promise instead of a plain value, and handles thrown errors by\n\t * returning a rejected promise. Also accepts a list of arguments to be\n\t * prepended to the new function, as does Function.prototype.bind.\n\t *\n\t * The resulting function is promise-aware, in the sense that it accepts\n\t * promise arguments, and waits for their resolution.\n\t * @param {Function} f function to be bound\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\treturn _apply(f, this, args.concat(slice.call(arguments)));\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Composes multiple functions by piping their return values. It is\n\t * transparent to whether the functions return 'regular' values or promises:\n\t * the piped argument is always a resolved value. If one of the functions\n\t * throws or returns a rejected promise, the composed promise will be also\n\t * rejected.\n\t *\n\t * The arguments (or promises to arguments) given to the returned function (if\n\t * any), are passed directly to the first function on the 'pipeline'.\n\t * @param {Function} f the function to which the arguments will be passed\n\t * @param {...Function} [funcs] functions that will be composed, in order\n\t * @returns {Function} a promise-returning composition of the functions\n\t */\n\tfunction compose(f /*, funcs... */) {\n\t\tvar funcs = slice.call(arguments, 1);\n\n\t\treturn function() {\n\t\t\tvar thisArg = this;\n\t\t\tvar args = slice.call(arguments);\n\t\t\tvar firstPromise = attempt.apply(thisArg, [f].concat(args));\n\n\t\t\treturn when.reduce(funcs, function(arg, func) {\n\t\t\t\treturn func.call(thisArg, arg);\n\t\t\t}, firstPromise);\n\t\t};\n\t}\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Generalized promise concurrency guard\n * Adapted from original concept by Sakari Jokinen (Rocket Pack, Ltd.)\n *\n * @author Brian Cavalier\n * @author John Hann\n * @contributor Sakari Jokinen\n */\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar slice = Array.prototype.slice;\n\n\tguard.n = n;\n\n\treturn guard;\n\n\t/**\n\t * Creates a guarded version of f that can only be entered when the supplied\n\t * condition allows.\n\t * @param {function} condition represents a critical section that may only\n\t * be entered when allowed by the condition\n\t * @param {function} f function to guard\n\t * @returns {function} guarded version of f\n\t */\n\tfunction guard(condition, f) {\n\t\treturn function() {\n\t\t\tvar args = slice.call(arguments);\n\n\t\t\treturn when(condition()).withThis(this).then(function(exit) {\n\t\t\t\treturn when(f.apply(this, args))['finally'](exit);\n\t\t\t});\n\t\t};\n\t}\n\n\t/**\n\t * Creates a condition that allows only n simultaneous executions\n\t * of a guarded function\n\t * @param {number} allowed number of allowed simultaneous executions\n\t * @returns {function} condition function which returns a promise that\n\t * fulfills when the critical section may be entered. The fulfillment\n\t * value is a function (\"notifyExit\") that must be called when the critical\n\t * section has been exited.\n\t */\n\tfunction n(allowed) {\n\t\tvar count = 0;\n\t\tvar waiting = [];\n\n\t\treturn function enter() {\n\t\t\treturn when.promise(function(resolve) {\n\t\t\t\tif(count < allowed) {\n\t\t\t\t\tresolve(exit);\n\t\t\t\t} else {\n\t\t\t\t\twaiting.push(resolve);\n\t\t\t\t}\n\t\t\t\tcount += 1;\n\t\t\t});\n\t\t};\n\n\t\tfunction exit() {\n\t\t\tcount = Math.max(count - 1, 0);\n\t\t\tif(waiting.length > 0) {\n\t\t\t\twaiting.shift()(exit);\n\t\t\t}\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * Licensed under the MIT License at:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar Promise = when.Promise;\n\tvar toPromise = when.resolve;\n\n\treturn {\n\t\tall: when.lift(all),\n\t\tmap: map,\n\t\tsettle: settle\n\t};\n\n\t/**\n\t * Resolve all the key-value pairs in the supplied object or promise\n\t * for an object.\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be resolved\n\t * @returns {Promise} promise for an object with the fully resolved key-value pairs\n\t */\n\tfunction all(object) {\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\n\t\tvar results = {};\n\t\tvar keys = Object.keys(object);\n\t\tvar pending = keys.length;\n\n\t\tfor(var i=0, k; i<keys.length; ++i) {\n\t\t\tk = keys[i];\n\t\t\tPromise._handler(object[k]).fold(settleKey, k, results, resolver);\n\t\t}\n\n\t\tif(pending === 0) {\n\t\t\tresolver.resolve(results);\n\t\t}\n\n\t\treturn p;\n\n\t\tfunction settleKey(k, x, resolver) {\n\t\t\t/*jshint validthis:true*/\n\t\t\tthis[k] = x;\n\t\t\tif(--pending === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Map values in the supplied object's keys\n\t * @param {Promise|object} object or promise for object whose key-value pairs\n\t * will be reduced\n\t * @param {function(value:*, key:String):*} f mapping function which may\n\t * return either a promise or a value\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * resolved key-value pairs\n\t */\n\tfunction map(object, f) {\n\t\treturn toPromise(object).then(function(object) {\n\t\t\treturn all(Object.keys(object).reduce(function(o, k) {\n\t\t\t\to[k] = toPromise(object[k]).fold(mapWithKey, k);\n\t\t\t\treturn o;\n\t\t\t}, {}));\n\t\t});\n\n\t\tfunction mapWithKey(k, x) {\n\t\t\treturn f(x, k);\n\t\t}\n\t}\n\n\t/**\n\t * Resolve all key-value pairs in the supplied object and return a promise\n\t * that will always fulfill with the outcome states of all input promises.\n\t * @param {object} object whose key-value pairs will be settled\n\t * @returns {Promise} promise for an object with the mapped and fully\n\t * settled key-value pairs\n\t */\n\tfunction settle(object) {\n\t\tvar keys = Object.keys(object);\n\t\tvar results = {};\n\n\t\tif(keys.length === 0) {\n\t\t\treturn toPromise(results);\n\t\t}\n\n\t\tvar p = Promise._defer();\n\t\tvar resolver = Promise._handler(p);\n\t\tvar promises = keys.map(function(k) { return object[k]; });\n\n\t\twhen.settle(promises).then(function(states) {\n\t\t\tpopulateResults(keys, states, results, resolver);\n\t\t});\n\n\t\treturn p;\n\t}\n\n\tfunction populateResults(keys, states, results, resolver) {\n\t\tfor(var i=0; i<keys.length; i++) {\n\t\t\tresults[keys[i]] = states[i];\n\t\t}\n\t\tresolver.resolve(results);\n\t}\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t/**\n\t * Custom error type for promises rejected by promise.timeout\n\t * @param {string} message\n\t * @constructor\n\t */\n\tfunction TimeoutError (message) {\n\t\tError.call(this);\n\t\tthis.message = message;\n\t\tthis.name = TimeoutError.name;\n\t\tif (typeof Error.captureStackTrace === 'function') {\n\t\t\tError.captureStackTrace(this, TimeoutError);\n\t\t}\n\t}\n\n\tTimeoutError.prototype = Object.create(Error.prototype);\n\tTimeoutError.prototype.constructor = TimeoutError;\n\n\treturn TimeoutError;\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\tmakeApply.tryCatchResolve = tryCatchResolve;\n\n\treturn makeApply;\n\n\tfunction makeApply(Promise, call) {\n\t\tif(arguments.length < 2) {\n\t\t\tcall = tryCatchResolve;\n\t\t}\n\n\t\treturn apply;\n\n\t\tfunction apply(f, thisArg, args) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar l = args.length;\n\t\t\tvar params = new Array(l);\n\t\t\tcallAndResolve({ f:f, thisArg:thisArg, args:args, params:params, i:l-1, call:call }, p._handler);\n\n\t\t\treturn p;\n\t\t}\n\n\t\tfunction callAndResolve(c, h) {\n\t\t\tif(c.i < 0) {\n\t\t\t\treturn call(c.f, c.thisArg, c.params, h);\n\t\t\t}\n\n\t\t\tvar handler = Promise._handler(c.args[c.i]);\n\t\t\thandler.fold(callAndResolveNext, c, void 0, h);\n\t\t}\n\n\t\tfunction callAndResolveNext(c, x, h) {\n\t\t\tc.params[c.i] = x;\n\t\t\tc.i -= 1;\n\t\t\tcallAndResolve(c, h);\n\t\t}\n\t}\n\n\tfunction tryCatchResolve(f, thisArg, args, resolver) {\n\t\ttry {\n\t\t\tresolver.resolve(f.apply(thisArg, args));\n\t\t} catch(e) {\n\t\t\tresolver.reject(e);\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar state = require('../state');\n\tvar applier = require('../apply');\n\n\treturn function array(Promise) {\n\n\t\tvar applyFold = applier(Promise);\n\t\tvar toPromise = Promise.resolve;\n\t\tvar all = Promise.all;\n\n\t\tvar ar = Array.prototype.reduce;\n\t\tvar arr = Array.prototype.reduceRight;\n\t\tvar slice = Array.prototype.slice;\n\n\t\t// Additional array combinators\n\n\t\tPromise.any = any;\n\t\tPromise.some = some;\n\t\tPromise.settle = settle;\n\n\t\tPromise.map = map;\n\t\tPromise.filter = filter;\n\t\tPromise.reduce = reduce;\n\t\tPromise.reduceRight = reduceRight;\n\n\t\t/**\n\t\t * When this promise fulfills with an array, do\n\t\t * onFulfilled.apply(void 0, array)\n\t\t * @param {function} onFulfilled function to apply\n\t\t * @returns {Promise} promise for the result of applying onFulfilled\n\t\t */\n\t\tPromise.prototype.spread = function(onFulfilled) {\n\t\t\treturn this.then(all).then(function(array) {\n\t\t\t\treturn onFulfilled.apply(this, array);\n\t\t\t});\n\t\t};\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * One-winner competitive race.\n\t\t * Return a promise that will fulfill when one of the promises\n\t\t * in the input array fulfills, or will reject when all promises\n\t\t * have rejected.\n\t\t * @param {array} promises\n\t\t * @returns {Promise} promise for the first fulfilled value\n\t\t */\n\t\tfunction any(promises) {\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\t\t\tvar l = promises.length>>>0;\n\n\t\t\tvar pending = l;\n\t\t\tvar errors = [];\n\n\t\t\tfor (var h, x, i = 0; i < l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = Promise._handler(x);\n\t\t\t\tif(h.state() > 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tPromise._visitRemaining(promises, i, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, handleFulfill, handleReject);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.reject(new RangeError('any(): array must not be empty'));\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction handleFulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\terrors = null;\n\t\t\t\tthis.resolve(x); // this === resolver\n\t\t\t}\n\n\t\t\tfunction handleReject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * N-winner competitive race\n\t\t * Return a promise that will fulfill when n input promises have\n\t\t * fulfilled, or will reject when it becomes impossible for n\n\t\t * input promises to fulfill (ie when promises.length - n + 1\n\t\t * have rejected)\n\t\t * @param {array} promises\n\t\t * @param {number} n\n\t\t * @returns {Promise} promise for the earliest n fulfillment values\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tfunction some(promises, n) {\n\t\t\t/*jshint maxcomplexity:7*/\n\t\t\tvar p = Promise._defer();\n\t\t\tvar resolver = p._handler;\n\n\t\t\tvar results = [];\n\t\t\tvar errors = [];\n\n\t\t\tvar l = promises.length>>>0;\n\t\t\tvar nFulfill = 0;\n\t\t\tvar nReject;\n\t\t\tvar x, i; // reused in both for() loops\n\n\t\t\t// First pass: count actual array items\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++nFulfill;\n\t\t\t}\n\n\t\t\t// Compute actual goals\n\t\t\tn = Math.max(n, 0);\n\t\t\tnReject = (nFulfill - n + 1);\n\t\t\tnFulfill = Math.min(n, nFulfill);\n\n\t\t\tif(n > nFulfill) {\n\t\t\t\tresolver.reject(new RangeError('some(): array must contain at least '\n\t\t\t\t+ n + ' item(s), but had ' + nFulfill));\n\t\t\t} else if(nFulfill === 0) {\n\t\t\t\tresolver.resolve(results);\n\t\t\t}\n\n\t\t\t// Second pass: observe each array item, make progress toward goals\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif(x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tPromise._handler(x).visit(resolver, fulfill, reject, resolver.notify);\n\t\t\t}\n\n\t\t\treturn p;\n\n\t\t\tfunction fulfill(x) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresults.push(x);\n\t\t\t\tif(--nFulfill === 0) {\n\t\t\t\t\terrors = null;\n\t\t\t\t\tthis.resolve(results);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reject(e) {\n\t\t\t\t/*jshint validthis:true*/\n\t\t\t\tif(this.resolved) { // this === resolver\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrors.push(e);\n\t\t\t\tif(--nReject === 0) {\n\t\t\t\t\tresults = null;\n\t\t\t\t\tthis.reject(errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Apply f to the value of each promise in a list of promises\n\t\t * and return a new list containing the results.\n\t\t * @param {array} promises\n\t\t * @param {function(x:*, index:Number):*} f mapping function\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction map(promises, f) {\n\t\t\treturn Promise._traverse(f, promises);\n\t\t}\n\n\t\t/**\n\t\t * Filter the provided array of promises using the provided predicate. Input may\n\t\t * contain promises and values\n\t\t * @param {Array} promises array of promises and values\n\t\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t\t * Must return truthy (or promise for truthy) for items to retain.\n\t\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t\t * for which predicate returned truthy.\n\t\t */\n\t\tfunction filter(promises, predicate) {\n\t\t\tvar a = slice.call(promises);\n\t\t\treturn Promise._traverse(predicate, a).then(function(keep) {\n\t\t\t\treturn filterSync(a, keep);\n\t\t\t});\n\t\t}\n\n\t\tfunction filterSync(promises, keep) {\n\t\t\t// Safe because we know all promises have fulfilled if we've made it this far\n\t\t\tvar l = keep.length;\n\t\t\tvar filtered = new Array(l);\n\t\t\tfor(var i=0, j=0; i<l; ++i) {\n\t\t\t\tif(keep[i]) {\n\t\t\t\t\tfiltered[j++] = Promise._handler(promises[i]).value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiltered.length = j;\n\t\t\treturn filtered;\n\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that will always fulfill with an array containing\n\t\t * the outcome states of all input promises. The returned promise\n\t\t * will never reject.\n\t\t * @param {Array} promises\n\t\t * @returns {Promise} promise for array of settled state descriptors\n\t\t */\n\t\tfunction settle(promises) {\n\t\t\treturn all(promises.map(settleOne));\n\t\t}\n\n\t\tfunction settleOne(p) {\n\t\t\t// Optimize the case where we get an already-resolved when.js promise\n\t\t\t// by extracting its state:\n\t\t\tvar handler;\n\t\t\tif (p instanceof Promise) {\n\t\t\t\t// This is our own Promise type and we can reach its handler internals:\n\t\t\t\thandler = p._handler.join();\n\t\t\t}\n\t\t\tif((handler && handler.state() === 0) || !handler) {\n\t\t\t\t// Either still pending, or not a Promise at all:\n\t\t\t\treturn toPromise(p).then(state.fulfilled, state.rejected);\n\t\t\t}\n\n\t\t\t// The promise is our own, but it is already resolved. Take a shortcut.\n\t\t\t// Since we're not actually handling the resolution, we need to disable\n\t\t\t// rejection reporting.\n\t\t\thandler._unreport();\n\t\t\treturn state.inspect(handler);\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduce()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduce(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? ar.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: ar.call(promises, liftCombine(f));\n\t\t}\n\n\t\t/**\n\t\t * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but\n\t\t * input may contain promises and/or values, and reduceFunc\n\t\t * may return either a value or a promise, *and* initialValue may\n\t\t * be a promise for the starting value.\n\t\t * @param {Array|Promise} promises array or promise for an array of anything,\n\t\t * may contain a mix of promises and values.\n\t\t * @param {function(accumulated:*, x:*, index:Number):*} f reduce function\n\t\t * @returns {Promise} that will resolve to the final reduced value\n\t\t */\n\t\tfunction reduceRight(promises, f /*, initialValue */) {\n\t\t\treturn arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2])\n\t\t\t\t\t: arr.call(promises, liftCombine(f));\n\t\t}\n\n\t\tfunction liftCombine(f) {\n\t\t\treturn function(z, x, i) {\n\t\t\t\treturn applyFold(f, void 0, [z,x,i]);\n\t\t\t};\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function flow(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\t\tvar reject = Promise.reject;\n\t\tvar origCatch = Promise.prototype['catch'];\n\n\t\t/**\n\t\t * Handle the ultimate fulfillment value or rejection reason, and assume\n\t\t * responsibility for all errors. If an error propagates out of result\n\t\t * or handleFatalError, it will be rethrown to the host, resulting in a\n\t\t * loud stack track on most platforms and a crash on some.\n\t\t * @param {function?} onResult\n\t\t * @param {function?} onError\n\t\t * @returns {undefined}\n\t\t */\n\t\tPromise.prototype.done = function(onResult, onError) {\n\t\t\tthis._handler.visit(this._handler.receiver, onResult, onError);\n\t\t};\n\n\t\t/**\n\t\t * Add Error-type and predicate matching to catch. Examples:\n\t\t * promise.catch(TypeError, handleTypeError)\n\t\t * .catch(predicate, handleMatchedErrors)\n\t\t * .catch(handleRemainingErrors)\n\t\t * @param onRejected\n\t\t * @returns {*}\n\t\t */\n\t\tPromise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) {\n\t\t\tif (arguments.length < 2) {\n\t\t\t\treturn origCatch.call(this, onRejected);\n\t\t\t}\n\n\t\t\tif(typeof onRejected !== 'function') {\n\t\t\t\treturn this.ensure(rejectInvalidPredicate);\n\t\t\t}\n\n\t\t\treturn origCatch.call(this, createCatchFilter(arguments[1], onRejected));\n\t\t};\n\n\t\t/**\n\t\t * Wraps the provided catch handler, so that it will only be called\n\t\t * if the predicate evaluates truthy\n\t\t * @param {?function} handler\n\t\t * @param {function} predicate\n\t\t * @returns {function} conditional catch handler\n\t\t */\n\t\tfunction createCatchFilter(handler, predicate) {\n\t\t\treturn function(e) {\n\t\t\t\treturn evaluatePredicate(e, predicate)\n\t\t\t\t\t? handler.call(this, e)\n\t\t\t\t\t: reject(e);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Ensures that onFulfilledOrRejected will be called regardless of whether\n\t\t * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT\n\t\t * receive the promises' value or reason. Any returned value will be disregarded.\n\t\t * onFulfilledOrRejected may throw or return a rejected promise to signal\n\t\t * an additional error.\n\t\t * @param {function} handler handler to be called regardless of\n\t\t * fulfillment or rejection\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['finally'] = Promise.prototype.ensure = function(handler) {\n\t\t\tif(typeof handler !== 'function') {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.then(function(x) {\n\t\t\t\treturn runSideEffect(handler, this, identity, x);\n\t\t\t}, function(e) {\n\t\t\t\treturn runSideEffect(handler, this, reject, e);\n\t\t\t});\n\t\t};\n\n\t\tfunction runSideEffect (handler, thisArg, propagate, value) {\n\t\t\tvar result = handler.call(thisArg);\n\t\t\treturn maybeThenable(result)\n\t\t\t\t? propagateValue(result, propagate, value)\n\t\t\t\t: propagate(value);\n\t\t}\n\n\t\tfunction propagateValue (result, propagate, x) {\n\t\t\treturn resolve(result).then(function () {\n\t\t\t\treturn propagate(x);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Recover from a failure by returning a defaultValue. If defaultValue\n\t\t * is a promise, it's fulfillment value will be used. If defaultValue is\n\t\t * a promise that rejects, the returned promise will reject with the\n\t\t * same reason.\n\t\t * @param {*} defaultValue\n\t\t * @returns {Promise} new promise\n\t\t */\n\t\tPromise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) {\n\t\t\treturn this.then(void 0, function() {\n\t\t\t\treturn defaultValue;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Shortcut for .then(function() { return value; })\n\t\t * @param {*} value\n\t\t * @return {Promise} a promise that:\n\t\t * - is fulfilled if value is not a promise, or\n\t\t * - if value is a promise, will fulfill with its value, or reject\n\t\t * with its reason.\n\t\t */\n\t\tPromise.prototype['yield'] = function(value) {\n\t\t\treturn this.then(function() {\n\t\t\t\treturn value;\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Runs a side effect when this promise fulfills, without changing the\n\t\t * fulfillment value.\n\t\t * @param {function} onFulfilledSideEffect\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.tap = function(onFulfilledSideEffect) {\n\t\t\treturn this.then(onFulfilledSideEffect)['yield'](this);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n\tfunction rejectInvalidPredicate() {\n\t\tthrow new TypeError('catch predicate must be a function');\n\t}\n\n\tfunction evaluatePredicate(e, predicate) {\n\t\treturn isError(predicate) ? e instanceof predicate : predicate(e);\n\t}\n\n\tfunction isError(predicate) {\n\t\treturn predicate === Error\n\t\t\t|| (predicate != null && predicate.prototype instanceof Error);\n\t}\n\n\tfunction maybeThenable(x) {\n\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t}\n\n\tfunction identity(x) {\n\t\treturn x;\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n/** @author Jeff Escalante */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function fold(Promise) {\n\n\t\tPromise.prototype.fold = function(f, z) {\n\t\t\tvar promise = this._beget();\n\n\t\t\tthis._handler.fold(function(z, x, to) {\n\t\t\t\tPromise._handler(z).fold(function(x, z, to) {\n\t\t\t\t\tto.resolve(f.call(this, z, x));\n\t\t\t\t}, x, this, to);\n\t\t\t}, z, promise._handler.receiver, promise._handler);\n\n\t\t\treturn promise;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar inspect = require('../state').inspect;\n\n\treturn function inspection(Promise) {\n\n\t\tPromise.prototype.inspect = function() {\n\t\t\treturn inspect(Promise._handler(this));\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function generate(Promise) {\n\n\t\tvar resolve = Promise.resolve;\n\n\t\tPromise.iterate = iterate;\n\t\tPromise.unfold = unfold;\n\n\t\treturn Promise;\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.iterate\n\t\t * Generate a (potentially infinite) stream of promised values:\n\t\t * x, f(x), f(f(x)), etc. until condition(x) returns true\n\t\t * @param {function} f function to generate a new x from the previous x\n\t\t * @param {function} condition function that, given the current x, returns\n\t\t * truthy when the iterate should stop\n\t\t * @param {function} handler function to handle the value produced by f\n\t\t * @param {*|Promise} x starting value, may be a promise\n\t\t * @return {Promise} the result of the last call to f before\n\t\t * condition returns true\n\t\t */\n\t\tfunction iterate(f, condition, handler, x) {\n\t\t\treturn unfold(function(x) {\n\t\t\t\treturn [x, f(x)];\n\t\t\t}, condition, handler, x);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated Use github.com/cujojs/most streams and most.unfold\n\t\t * Generate a (potentially infinite) stream of promised values\n\t\t * by applying handler(generator(seed)) iteratively until\n\t\t * condition(seed) returns true.\n\t\t * @param {function} unspool function that generates a [value, newSeed]\n\t\t * given a seed.\n\t\t * @param {function} condition function that, given the current seed, returns\n\t\t * truthy when the unfold should stop\n\t\t * @param {function} handler function to handle the value produced by unspool\n\t\t * @param x {*|Promise} starting value, may be a promise\n\t\t * @return {Promise} the result of the last value produced by unspool before\n\t\t * condition returns true\n\t\t */\n\t\tfunction unfold(unspool, condition, handler, x) {\n\t\t\treturn resolve(x).then(function(seed) {\n\t\t\t\treturn resolve(condition(seed)).then(function(done) {\n\t\t\t\t\treturn done ? seed : resolve(unspool(seed)).spread(next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tfunction next(item, newSeed) {\n\t\t\t\treturn resolve(handler(item)).then(function() {\n\t\t\t\t\treturn unfold(unspool, condition, handler, newSeed);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function progress(Promise) {\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Register a progress handler for this promise\n\t\t * @param {function} onProgress\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.progress = function(onProgress) {\n\t\t\treturn this.then(void 0, void 0, onProgress);\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar env = require('../env');\n\tvar TimeoutError = require('../TimeoutError');\n\n\tfunction setTimeout(f, ms, x, y) {\n\t\treturn env.setTimer(function() {\n\t\t\tf(x, y, ms);\n\t\t}, ms);\n\t}\n\n\treturn function timed(Promise) {\n\t\t/**\n\t\t * Return a new promise whose fulfillment value is revealed only\n\t\t * after ms milliseconds\n\t\t * @param {number} ms milliseconds\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.delay = function(ms) {\n\t\t\tvar p = this._beget();\n\t\t\tthis._handler.fold(handleDelay, ms, void 0, p._handler);\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction handleDelay(ms, x, h) {\n\t\t\tsetTimeout(resolveDelay, ms, x, h);\n\t\t}\n\n\t\tfunction resolveDelay(x, h) {\n\t\t\th.resolve(x);\n\t\t}\n\n\t\t/**\n\t\t * Return a new promise that rejects after ms milliseconds unless\n\t\t * this promise fulfills earlier, in which case the returned promise\n\t\t * fulfills with the same value.\n\t\t * @param {number} ms milliseconds\n\t\t * @param {Error|*=} reason optional rejection reason to use, defaults\n\t\t * to a TimeoutError if not provided\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype.timeout = function(ms, reason) {\n\t\t\tvar p = this._beget();\n\t\t\tvar h = p._handler;\n\n\t\t\tvar t = setTimeout(onTimeout, ms, reason, p._handler);\n\n\t\t\tthis._handler.visit(h,\n\t\t\t\tfunction onFulfill(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.resolve(x); // this = h\n\t\t\t\t},\n\t\t\t\tfunction onReject(x) {\n\t\t\t\t\tenv.clearTimer(t);\n\t\t\t\t\tthis.reject(x); // this = h\n\t\t\t\t},\n\t\t\t\th.notify);\n\n\t\t\treturn p;\n\t\t};\n\n\t\tfunction onTimeout(reason, h, ms) {\n\t\t\tvar e = typeof reason === 'undefined'\n\t\t\t\t? new TimeoutError('timed out after ' + ms + 'ms')\n\t\t\t\t: reason;\n\t\t\th.reject(e);\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function addWith(Promise) {\n\t\t/**\n\t\t * Returns a promise whose handlers will be called with `this` set to\n\t\t * the supplied receiver. Subsequent promises derived from the\n\t\t * returned promise will also have their handlers called with receiver\n\t\t * as `this`. Calling `with` with undefined or no arguments will return\n\t\t * a promise whose handlers will again be called in the usual Promises/A+\n\t\t * way (no `this`) thus safely undoing any previous `with` in the\n\t\t * promise chain.\n\t\t *\n\t\t * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+\n\t\t * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41)\n\t\t *\n\t\t * @param {object} receiver `this` value for all handlers attached to\n\t\t * the returned promise.\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype['with'] = Promise.prototype.withThis = function(receiver) {\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\t\t\tchild.receiver = receiver;\n\t\t\tthis._handler.chain(child, receiver);\n\t\t\treturn p;\n\t\t};\n\n\t\treturn Promise;\n\t};\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function liftAll(liftOne, combine, dst, src) {\n\t\tif(typeof combine === 'undefined') {\n\t\t\tcombine = defaultCombine;\n\t\t}\n\n\t\treturn Object.keys(src).reduce(function(dst, key) {\n\t\t\tvar f = src[key];\n\t\t\treturn typeof f === 'function' ? combine(dst, liftOne(f), key) : dst;\n\t\t}, typeof dst === 'undefined' ? defaultDst(src) : dst);\n\t};\n\n\tfunction defaultCombine(o, f, k) {\n\t\to[k] = f;\n\t\treturn o;\n\t}\n\n\tfunction defaultDst(src) {\n\t\treturn typeof src === 'function' ? src.bind() : Object.create(src);\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tpending: toPendingState,\n\t\tfulfilled: toFulfilledState,\n\t\trejected: toRejectedState,\n\t\tinspect: inspect\n\t};\n\n\tfunction toPendingState() {\n\t\treturn { state: 'pending' };\n\t}\n\n\tfunction toRejectedState(e) {\n\t\treturn { state: 'rejected', reason: e };\n\t}\n\n\tfunction toFulfilledState(x) {\n\t\treturn { state: 'fulfilled', value: x };\n\t}\n\n\tfunction inspect(handler) {\n\t\tvar state = handler.state();\n\t\treturn state === 0 ? toPendingState()\n\t\t\t : state > 0 ? toFulfilledState(handler.value)\n\t\t\t : toRejectedState(handler.value);\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2013 original author or authors */\n\n/**\n * Collection of helpers for interfacing with node-style asynchronous functions\n * using promises.\n *\n * @author Brian Cavalier\n * @contributor Renato Zannon\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar _liftAll = require('./lib/liftAll');\n\tvar setTimer = require('./lib/env').setTimer;\n\tvar slice = Array.prototype.slice;\n\n\tvar _apply = require('./lib/apply')(when.Promise, dispatch);\n\n\treturn {\n\t\tlift: lift,\n\t\tliftAll: liftAll,\n\t\tapply: apply,\n\t\tcall: call,\n\t\tcreateCallback: createCallback,\n\t\tbindCallback: bindCallback,\n\t\tliftCallback: liftCallback\n\t};\n\n\t/**\n\t * Takes a node-style async function and calls it immediately (with an optional\n\t * array of arguments or promises for arguments). It returns a promise whose\n\t * resolution depends on whether the async functions calls its callback with the\n\t * conventional error argument or not.\n\t *\n\t * With this it becomes possible to leverage existing APIs while still reaping\n\t * the benefits of promises.\n\t *\n\t * @example\n\t * function onlySmallNumbers(n, callback) {\n\t *\t\tif(n < 10) {\n\t *\t\t\tcallback(null, n + 10);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * var nodefn = require(\"when/node/function\");\n\t *\n\t * // Logs '15'\n\t * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {Array} [args] array of arguments to func\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction apply(f, args) {\n\t\treturn _apply(f, this, args || []);\n\t}\n\n\tfunction dispatch(f, thisArg, args, h) {\n\t\tvar cb = createCallback(h);\n\t\ttry {\n\t\t\tswitch(args.length) {\n\t\t\t\tcase 2: f.call(thisArg, args[0], args[1], cb); break;\n\t\t\t\tcase 1: f.call(thisArg, args[0], cb); break;\n\t\t\t\tcase 0: f.call(thisArg, cb); break;\n\t\t\t\tdefault:\n\t\t\t\t\targs.push(cb);\n\t\t\t\t\tf.apply(thisArg, args);\n\t\t\t}\n\t\t} catch(e) {\n\t\t\th.reject(e);\n\t\t}\n\t}\n\n\t/**\n\t * Has the same behavior that {@link apply} has, with the difference that the\n\t * arguments to the function are provided individually, while {@link apply} accepts\n\t * a single array.\n\t *\n\t * @example\n\t * function sumSmallNumbers(x, y, callback) {\n\t *\t\tvar result = x + y;\n\t *\t\tif(result < 10) {\n\t *\t\t\tcallback(null, result);\n\t *\t\t} else {\n\t *\t\t\tcallback(new Error(\"Calculation failed\"));\n\t *\t\t}\n\t *\t}\n\t *\n\t * // Logs '5'\n\t * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error);\n\t *\n\t * // Logs 'Calculation failed'\n\t * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error);\n\t *\n\t * @param {function} f node-style function that will be called\n\t * @param {...*} [args] arguments that will be forwarded to the function\n\t * @returns {Promise} promise for the value func passes to its callback\n\t */\n\tfunction call(f /*, args... */) {\n\t\treturn _apply(f, this, slice.call(arguments, 1));\n\t}\n\n\t/**\n\t * Takes a node-style function and returns new function that wraps the\n\t * original and, instead of taking a callback, returns a promise. Also, it\n\t * knows how to handle promises given as arguments, waiting for their\n\t * resolution before executing.\n\t *\n\t * Upon execution, the orginal function is executed as well. If it passes\n\t * a truthy value as the first argument to the callback, it will be\n\t * interpreted as an error condition, and the promise will be rejected\n\t * with it. Otherwise, the call is considered a resolution, and the promise\n\t * is resolved with the callback's second argument.\n\t *\n\t * @example\n\t * var fs = require(\"fs\"), nodefn = require(\"when/node/function\");\n\t *\n\t * var promiseRead = nodefn.lift(fs.readFile);\n\t *\n\t * // The promise is resolved with the contents of the file if everything\n\t * // goes ok\n\t * promiseRead('exists.txt').then(console.log, console.error);\n\t *\n\t * // And will be rejected if something doesn't work out\n\t * // (e.g. the files does not exist)\n\t * promiseRead('doesnt_exist.txt').then(console.log, console.error);\n\t *\n\t *\n\t * @param {Function} f node-style function to be lifted\n\t * @param {...*} [args] arguments to be prepended for the new function @deprecated\n\t * @returns {Function} a promise-returning function\n\t */\n\tfunction lift(f /*, args... */) {\n\t\tvar args1 = arguments.length > 1 ? slice.call(arguments, 1) : [];\n\t\treturn function() {\n\t\t\t// TODO: Simplify once partialing has been removed\n\t\t\tvar l = args1.length;\n\t\t\tvar al = arguments.length;\n\t\t\tvar args = new Array(al + l);\n\t\t\tvar i;\n\t\t\tfor(i=0; i<l; ++i) {\n\t\t\t\targs[i] = args1[i];\n\t\t\t}\n\t\t\tfor(i=0; i<al; ++i) {\n\t\t\t\targs[i+l] = arguments[i];\n\t\t\t}\n\t\t\treturn _apply(f, this, args);\n\t\t};\n\t}\n\n\t/**\n\t * Lift all the functions/methods on src\n\t * @param {object|function} src source whose functions will be lifted\n\t * @param {function?} combine optional function for customizing the lifting\n\t * process. It is passed dst, the lifted function, and the property name of\n\t * the original function on src.\n\t * @param {(object|function)?} dst option destination host onto which to place lifted\n\t * functions. If not provided, liftAll returns a new object.\n\t * @returns {*} If dst is provided, returns dst with lifted functions as\n\t * properties. If dst not provided, returns a new object with lifted functions.\n\t */\n\tfunction liftAll(src, combine, dst) {\n\t\treturn _liftAll(lift, combine, dst, src);\n\t}\n\n\t/**\n\t * Takes an object that responds to the resolver interface, and returns\n\t * a function that will resolve or reject it depending on how it is called.\n\t *\n\t * @example\n\t *\tfunction callbackTakingFunction(callback) {\n\t *\t\tif(somethingWrongHappened) {\n\t *\t\t\tcallback(error);\n\t *\t\t} else {\n\t *\t\t\tcallback(null, interestingValue);\n\t *\t\t}\n\t *\t}\n\t *\n\t *\tvar when = require('when'), nodefn = require('when/node/function');\n\t *\n\t *\tvar deferred = when.defer();\n\t *\tcallbackTakingFunction(nodefn.createCallback(deferred.resolver));\n\t *\n\t *\tdeferred.promise.then(function(interestingValue) {\n\t *\t\t// Use interestingValue\n\t *\t});\n\t *\n\t * @param {Resolver} resolver that will be 'attached' to the callback\n\t * @returns {Function} a node-style callback function\n\t */\n\tfunction createCallback(resolver) {\n\t\treturn function(err, value) {\n\t\t\tif(err) {\n\t\t\t\tresolver.reject(err);\n\t\t\t} else if(arguments.length > 2) {\n\t\t\t\tresolver.resolve(slice.call(arguments, 1));\n\t\t\t} else {\n\t\t\t\tresolver.resolve(value);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Attaches a node-style callback to a promise, ensuring the callback is\n\t * called for either fulfillment or rejection. Returns a promise with the same\n\t * state as the passed-in promise.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tbindCallback(deferred.promise, callback);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Promise} promise The promise to be attached to.\n\t * @param {Function} callback The node-style callback to attach.\n\t * @returns {Promise} A promise with the same state as the passed-in promise.\n\t */\n\tfunction bindCallback(promise, callback) {\n\t\tpromise = when(promise);\n\n\t\tif (callback) {\n\t\t\tpromise.then(success, wrapped);\n\t\t}\n\n\t\treturn promise;\n\n\t\tfunction success(value) {\n\t\t\twrapped(null, value);\n\t\t}\n\n\t\tfunction wrapped(err, value) {\n\t\t\tsetTimer(function () {\n\t\t\t\tcallback(err, value);\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Takes a node-style callback and returns new function that accepts a\n\t * promise, calling the original callback when the promise is either\n\t * fulfilled or rejected with the appropriate arguments.\n\t *\n\t * @example\n\t *\tvar deferred = when.defer();\n\t *\n\t *\tfunction callback(err, value) {\n\t *\t\t// Handle err or use value\n\t *\t}\n\t *\n\t *\tvar wrapped = liftCallback(callback);\n\t *\n\t *\t// `wrapped` can now be passed around at will\n\t *\twrapped(deferred.promise);\n\t *\n\t *\tdeferred.resolve('interesting value');\n\t *\n\t * @param {Function} callback The node-style callback to wrap.\n\t * @returns {Function} The lifted, promise-accepting function.\n\t */\n\tfunction liftCallback(callback) {\n\t\treturn function(promise) {\n\t\t\treturn bindCallback(promise, callback);\n\t\t};\n\t}\n});\n\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * parallel.js\n *\n * Run a set of task functions in parallel. All tasks will\n * receive the same args\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in parallel\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for array containing the\n\t * result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function parallel(tasks /*, args... */) {\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.map(tasks, function(task) {\n\t\t\t\treturn task.apply(void 0, args);\n\t\t\t});\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * pipeline.js\n *\n * Run a set of task functions in sequence, passing the result\n * of the previous as an argument to the next. Like a shell\n * pipeline, e.g. `cat file.txt | grep 'foo' | sed -e 's/foo/bar/g'\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in a pipeline where the next\n\t * tasks receives the result of the previous. The first task\n\t * will receive the initialArgs as its argument list.\n\t * @param tasks {Array|Promise} array or promise for array of task functions\n\t * @param [initialArgs...] {*} arguments to be passed to the first task\n\t * @return {Promise} promise for return value of the final task\n\t */\n\treturn function pipeline(tasks /* initialArgs... */) {\n\t\t// Self-optimizing function to run first task with multiple\n\t\t// args using apply, but subsequence tasks via direct invocation\n\t\tvar runTask = function(args, task) {\n\t\t\trunTask = function(arg, task) {\n\t\t\t\treturn task(arg);\n\t\t\t};\n\n\t\t\treturn task.apply(null, args);\n\t\t};\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(arg, task) {\n\t\t\t\treturn runTask(arg, task);\n\t\t\t}, args);\n\t\t});\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2012-2013 original author or authors */\n\n/**\n * poll.js\n *\n * Helper that polls until cancelled or for a condition to become true.\n *\n * @author Scott Andrews\n */\n\n(function (define) { 'use strict';\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar attempt = when['try'];\n\tvar cancelable = require('./cancelable');\n\n\t/**\n\t * Periodically execute the task function on the msec delay. The result of\n\t * the task may be verified by watching for a condition to become true. The\n\t * returned deferred is cancellable if the polling needs to be cancelled\n\t * externally before reaching a resolved state.\n\t *\n\t * The next vote is scheduled after the results of the current vote are\n\t * verified and rejected.\n\t *\n\t * Polling may be terminated by the verifier returning a truthy value,\n\t * invoking cancel() on the returned promise, or the task function returning\n\t * a rejected promise.\n\t *\n\t * Usage:\n\t *\n\t * var count = 0;\n\t * function doSomething() { return count++ }\n\t *\n\t * // poll until cancelled\n\t * var p = poll(doSomething, 1000);\n\t * ...\n\t * p.cancel();\n\t *\n\t * // poll until condition is met\n\t * poll(doSomething, 1000, function(result) { return result > 10 })\n\t * .then(function(result) { assert result == 10 });\n\t *\n\t * // delay first vote\n\t * poll(doSomething, 1000, anyFunc, true);\n\t *\n\t * @param task {Function} function that is executed after every timeout\n\t * @param interval {number|Function} timeout in milliseconds\n\t * @param [verifier] {Function} function to evaluate the result of the vote.\n\t * May return a {Promise} or a {Boolean}. Rejecting the promise or a\n\t * falsey value will schedule the next vote.\n\t * @param [delayInitialTask] {boolean} if truthy, the first vote is scheduled\n\t * instead of immediate\n\t *\n\t * @returns {Promise}\n\t */\n\treturn function poll(task, interval, verifier, delayInitialTask) {\n\t\tvar deferred, canceled, reject;\n\n\t\tcanceled = false;\n\t\tdeferred = cancelable(when.defer(), function () { canceled = true; });\n\t\treject = deferred.reject;\n\n\t\tverifier = verifier || function () { return false; };\n\n\t\tif (typeof interval !== 'function') {\n\t\t\tinterval = (function (interval) {\n\t\t\t\treturn function () { return when().delay(interval); };\n\t\t\t})(interval);\n\t\t}\n\n\t\tfunction certify(result) {\n\t\t\tdeferred.resolve(result);\n\t\t}\n\n\t\tfunction schedule(result) {\n\t\t\tattempt(interval).then(vote, reject);\n\t\t\tif (result !== void 0) {\n\t\t\t\tdeferred.notify(result);\n\t\t\t}\n\t\t}\n\n\t\tfunction vote() {\n\t\t\tif (canceled) { return; }\n\t\t\twhen(task(),\n\t\t\t\tfunction (result) {\n\t\t\t\t\twhen(verifier(result),\n\t\t\t\t\t\tfunction (verification) {\n\t\t\t\t\t\t\treturn verification ? certify(result) : schedule(result);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction () { schedule(result); }\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\n\t\tif (delayInitialTask) {\n\t\t\tschedule();\n\t\t} else {\n\t\t\t// if task() is blocking, vote will also block\n\t\t\tvote();\n\t\t}\n\n\t\t// make the promise cancelable\n\t\tdeferred.promise = Object.create(deferred.promise);\n\t\tdeferred.promise.cancel = deferred.cancel;\n\n\t\treturn deferred.promise;\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * sequence.js\n *\n * Run a set of task functions in sequence. All tasks will\n * receive the same args.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\tvar all = when.Promise.all;\n\tvar slice = Array.prototype.slice;\n\n\t/**\n\t * Run array of tasks in sequence with no overlap\n\t * @param tasks {Array|Promise} array or promiseForArray of task functions\n\t * @param [args] {*} arguments to be passed to all tasks\n\t * @return {Promise} promise for an array containing\n\t * the result of each task in the array position corresponding\n\t * to position of the task in the tasks array\n\t */\n\treturn function sequence(tasks /*, args... */) {\n\t\tvar results = [];\n\n\t\treturn all(slice.call(arguments, 1)).then(function(args) {\n\t\t\treturn when.reduce(tasks, function(results, task) {\n\t\t\t\treturn when(task.apply(void 0, args), addResult);\n\t\t\t}, results);\n\t\t});\n\n\t\tfunction addResult(result) {\n\t\t\tresults.push(result);\n\t\t\treturn results;\n\t\t}\n\t};\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2011-2013 original author or authors */\n\n/**\n * timeout.js\n *\n * Helper that returns a promise that rejects after a specified timeout,\n * if not explicitly resolved or rejected before that.\n *\n * @author Brian Cavalier\n * @author John Hann\n */\n\n(function(define) {\ndefine(function(require) {\n\n\tvar when = require('./when');\n\n /**\n\t * @deprecated Use when(trigger).timeout(ms)\n */\n return function timeout(msec, trigger) {\n\t\treturn when(trigger).timeout(msec);\n };\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n\n\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n\n/**\n * Promises/A+ and when() implementation\n * when is part of the cujoJS family of libraries (http://cujojs.com/)\n * @author Brian Cavalier\n * @author John Hann\n */\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar timed = require('./lib/decorators/timed');\n\tvar array = require('./lib/decorators/array');\n\tvar flow = require('./lib/decorators/flow');\n\tvar fold = require('./lib/decorators/fold');\n\tvar inspect = require('./lib/decorators/inspect');\n\tvar generate = require('./lib/decorators/iterate');\n\tvar progress = require('./lib/decorators/progress');\n\tvar withThis = require('./lib/decorators/with');\n\tvar unhandledRejection = require('./lib/decorators/unhandledRejection');\n\tvar TimeoutError = require('./lib/TimeoutError');\n\n\tvar Promise = [array, flow, fold, generate, progress,\n\t\tinspect, withThis, timed, unhandledRejection]\n\t\t.reduce(function(Promise, feature) {\n\t\t\treturn feature(Promise);\n\t\t}, require('./lib/Promise'));\n\n\tvar apply = require('./lib/apply')(Promise);\n\n\t// Public API\n\n\twhen.promise = promise; // Create a pending promise\n\twhen.resolve = Promise.resolve; // Create a resolved promise\n\twhen.reject = Promise.reject; // Create a rejected promise\n\n\twhen.lift = lift; // lift a function to return promises\n\twhen['try'] = attempt; // call a function and return a promise\n\twhen.attempt = attempt; // alias for when.try\n\n\twhen.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\twhen.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises\n\n\twhen.join = join; // Join 2 or more promises\n\n\twhen.all = all; // Resolve a list of promises\n\twhen.settle = settle; // Settle a list of promises\n\n\twhen.any = lift(Promise.any); // One-winner race\n\twhen.some = lift(Promise.some); // Multi-winner race\n\twhen.race = lift(Promise.race); // First-to-settle race\n\n\twhen.map = map; // Array.map() for promises\n\twhen.filter = filter; // Array.filter() for promises\n\twhen.reduce = lift(Promise.reduce); // Array.reduce() for promises\n\twhen.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises\n\n\twhen.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable\n\n\twhen.Promise = Promise; // Promise constructor\n\twhen.defer = defer; // Create a {promise, resolve, reject} tuple\n\n\t// Error types\n\n\twhen.TimeoutError = TimeoutError;\n\n\t/**\n\t * Get a trusted promise for x, or by transforming x with onFulfilled\n\t *\n\t * @param {*} x\n\t * @param {function?} onFulfilled callback to be called when x is\n\t * successfully fulfilled. If promiseOrValue is an immediate value, callback\n\t * will be invoked immediately.\n\t * @param {function?} onRejected callback to be called when x is\n\t * rejected.\n\t * @param {function?} onProgress callback to be called when progress updates\n\t * are issued for x. @deprecated\n\t * @returns {Promise} a new promise that will fulfill with the return\n\t * value of callback or errback or the completion value of promiseOrValue if\n\t * callback and/or errback is not supplied.\n\t */\n\tfunction when(x, onFulfilled, onRejected, onProgress) {\n\t\tvar p = Promise.resolve(x);\n\t\tif (arguments.length < 2) {\n\t\t\treturn p;\n\t\t}\n\n\t\treturn p.then(onFulfilled, onRejected, onProgress);\n\t}\n\n\t/**\n\t * Creates a new promise whose fate is determined by resolver.\n\t * @param {function} resolver function(resolve, reject, notify)\n\t * @returns {Promise} promise whose fate is determine by resolver\n\t */\n\tfunction promise(resolver) {\n\t\treturn new Promise(resolver);\n\t}\n\n\t/**\n\t * Lift the supplied function, creating a version of f that returns\n\t * promises, and accepts promises as arguments.\n\t * @param {function} f\n\t * @returns {Function} version of f that returns promises\n\t */\n\tfunction lift(f) {\n\t\treturn function() {\n\t\t\tfor(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {\n\t\t\t\ta[i] = arguments[i];\n\t\t\t}\n\t\t\treturn apply(f, this, a);\n\t\t};\n\t}\n\n\t/**\n\t * Call f in a future turn, with the supplied args, and return a promise\n\t * for the result.\n\t * @param {function} f\n\t * @returns {Promise}\n\t */\n\tfunction attempt(f /*, args... */) {\n\t\t/*jshint validthis:true */\n\t\tfor(var i=0, l=arguments.length-1, a=new Array(l); i<l; ++i) {\n\t\t\ta[i] = arguments[i+1];\n\t\t}\n\t\treturn apply(f, this, a);\n\t}\n\n\t/**\n\t * Creates a {promise, resolver} pair, either or both of which\n\t * may be given out safely to consumers.\n\t * @return {{promise: Promise, resolve: function, reject: function, notify: function}}\n\t */\n\tfunction defer() {\n\t\treturn new Deferred();\n\t}\n\n\tfunction Deferred() {\n\t\tvar p = Promise._defer();\n\n\t\tfunction resolve(x) { p._handler.resolve(x); }\n\t\tfunction reject(x) { p._handler.reject(x); }\n\t\tfunction notify(x) { p._handler.notify(x); }\n\n\t\tthis.promise = p;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t\tthis.notify = notify;\n\t\tthis.resolver = { resolve: resolve, reject: reject, notify: notify };\n\t}\n\n\t/**\n\t * Determines if x is promise-like, i.e. a thenable object\n\t * NOTE: Will return true for *any thenable object*, and isn't truly\n\t * safe, since it may attempt to access the `then` property of x (i.e.\n\t * clever/malicious getters may do weird things)\n\t * @param {*} x anything\n\t * @returns {boolean} true if x is promise-like\n\t */\n\tfunction isPromiseLike(x) {\n\t\treturn x && typeof x.then === 'function';\n\t}\n\n\t/**\n\t * Return a promise that will resolve only once all the supplied arguments\n\t * have resolved. The resolution value of the returned promise will be an array\n\t * containing the resolution values of each of the arguments.\n\t * @param {...*} arguments may be a mix of promises and values\n\t * @returns {Promise}\n\t */\n\tfunction join(/* ...promises */) {\n\t\treturn Promise.all(arguments);\n\t}\n\n\t/**\n\t * Return a promise that will fulfill once all input promises have\n\t * fulfilled, or reject when any one input promise rejects.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise}\n\t */\n\tfunction all(promises) {\n\t\treturn when(promises, Promise.all);\n\t}\n\n\t/**\n\t * Return a promise that will always fulfill with an array containing\n\t * the outcome states of all input promises. The returned promise\n\t * will only reject if `promises` itself is a rejected promise.\n\t * @param {array|Promise} promises array (or promise for an array) of promises\n\t * @returns {Promise} promise for array of settled state descriptors\n\t */\n\tfunction settle(promises) {\n\t\treturn when(promises, Promise.settle);\n\t}\n\n\t/**\n\t * Promise-aware array map function, similar to `Array.prototype.map()`,\n\t * but input array may contain promises or values.\n\t * @param {Array|Promise} promises array of anything, may contain promises and values\n\t * @param {function(x:*, index:Number):*} mapFunc map function which may\n\t * return a promise or value\n\t * @returns {Promise} promise that will fulfill with an array of mapped values\n\t * or reject if any input promise rejects.\n\t */\n\tfunction map(promises, mapFunc) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.map(promises, mapFunc);\n\t\t});\n\t}\n\n\t/**\n\t * Filter the provided array of promises using the provided predicate. Input may\n\t * contain promises and values\n\t * @param {Array|Promise} promises array of promises and values\n\t * @param {function(x:*, index:Number):boolean} predicate filtering predicate.\n\t * Must return truthy (or promise for truthy) for items to retain.\n\t * @returns {Promise} promise that will fulfill with an array containing all items\n\t * for which predicate returned truthy.\n\t */\n\tfunction filter(promises, predicate) {\n\t\treturn when(promises, function(promises) {\n\t\t\treturn Promise.filter(promises, predicate);\n\t\t});\n\t}\n\n\treturn when;\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n"]} \ No newline at end of file
diff --git a/node_modules/when/es6-shim/Promise.js b/node_modules/when/es6-shim/Promise.js
index 4441fde2b..655a3b447 100644
--- a/node_modules/when/es6-shim/Promise.js
+++ b/node_modules/when/es6-shim/Promise.js
@@ -252,8 +252,8 @@ define(function(require) {
}
function hasMutationObserver () {
- return (typeof MutationObserver === 'function' && MutationObserver) ||
- (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
+ return (typeof MutationObserver !== 'undefined' && MutationObserver) ||
+ (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);
}
function initMutationObserver(MutationObserver) {
@@ -1220,6 +1220,28 @@ define(function() {
function noop() {}
+ function hasCustomEvent() {
+ if(typeof CustomEvent === 'function') {
+ try {
+ var ev = new CustomEvent('unhandledRejection');
+ return ev instanceof CustomEvent;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
+ function hasInternetExplorerCustomEvent() {
+ if(typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ try {
+ // Try to create one event to make sure it's supported
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent('eventType', false, true, {});
+ return true;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
function initEmitRejection() {
/*global process, self, CustomEvent*/
if(typeof process !== 'undefined' && process !== null
@@ -1233,15 +1255,9 @@ define(function() {
? process.emit(type, rejection.value, rejection)
: process.emit(type, rejection);
};
- } else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {
- return (function(noop, self, CustomEvent) {
- var hasCustomEvent = false;
- try {
- var ev = new CustomEvent('unhandledRejection');
- hasCustomEvent = ev instanceof CustomEvent;
- } catch (e) {}
-
- return !hasCustomEvent ? noop : function(type, rejection) {
+ } else if(typeof self !== 'undefined' && hasCustomEvent()) {
+ return (function (self, CustomEvent) {
+ return function (type, rejection) {
var ev = new CustomEvent(type, {
detail: {
reason: rejection.value,
@@ -1253,7 +1269,19 @@ define(function() {
return !self.dispatchEvent(ev);
};
- }(noop, self, CustomEvent));
+ }(self, CustomEvent));
+ } else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {
+ return (function(self, document) {
+ return function(type, rejection) {
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent(type, false, true, {
+ reason: rejection.value,
+ key: rejection
+ });
+
+ return !self.dispatchEvent(ev);
+ };
+ }(self, document));
}
return noop;
diff --git a/node_modules/when/es6-shim/Promise.js.map b/node_modules/when/es6-shim/Promise.js.map
index 55b69e66e..03dda7195 100644
--- a/node_modules/when/es6-shim/Promise.js.map
+++ b/node_modules/when/es6-shim/Promise.js.map
@@ -11,15 +11,15 @@
"lib/makePromise.js"
],
"names": [],
- "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
+ "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
"sourcesContent": [
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * ES6 global Promise shim\n */\nvar unhandledRejections = require('../lib/decorators/unhandledRejection');\nvar PromiseConstructor = unhandledRejections(require('../lib/Promise'));\n\nmodule.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)\n\t : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)\n\t : PromiseConstructor;\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n",
"/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n",
- "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n"
+ "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n"
],
- "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83"
+ "sourceRoot": "https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08"
} \ No newline at end of file
diff --git a/node_modules/when/es6-shim/Promise.min.js b/node_modules/when/es6-shim/Promise.min.js
index cb728b54e..b6c19f812 100644
--- a/node_modules/when/es6-shim/Promise.min.js
+++ b/node_modules/when/es6-shim/Promise.min.js
@@ -1,2 +1,2 @@
-!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.Promise=t():"undefined"!=typeof global?global.Promise=t():"undefined"!=typeof self&&(self.Promise=t())}(function(){var t;return function e(t,n,o){function r(u,c){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return r(n?n:e)},s,s.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(t,e,n){var o=t("../lib/decorators/unhandledRejection"),r=o(t("../lib/Promise"));e.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n,o){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),o=t("./env").asap;return e({scheduler:new n(o)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n,o){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var o=t("../env").setTimer,r=t("../format");return function(t){function i(t){t.handled||(l.push(t),a("Potentially unhandled rejection ["+t.id+"] "+r.formatError(t.value)))}function u(t){var e=l.indexOf(t);e>=0&&(l.splice(e,1),h("Handled previous rejection ["+t.id+"] "+r.formatObject(t.value)))}function c(t,e){p.push(t,e),null===d&&(d=o(f,0))}function f(){for(d=null;p.length>0;)p.shift()(p.shift())}var s,a=n,h=n;"undefined"!=typeof console&&(s=console,a="undefined"!=typeof s.error?function(t){s.error(t)}:function(t){s.log(t)},h="undefined"!=typeof s.info?function(t){s.info(t)}:function(t){s.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(e,t.value)};var p=[],l=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n,o){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function o(t){function e(){var t=n;n=void 0,t()}var n,o=document.createTextNode(""),r=new t(e);r.observe(o,{characterData:!0});var i=0;return function(t){n=t,o.data=i^=1}}var r,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,e){return setTimeout(t,e)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(e())f=function(t){return process.nextTick(t)};else if(r=n())f=o(r);else if(!i){var s=t,a=s("vertx");u=function(t,e){return a.setTimer(e,t)},c=a.cancelTimer,f=a.runOnLoop||a.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n,o){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===_?e:n(t)}function n(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}function o(t){r.notify(t)}var r=new b;try{t(e,n,o)}catch(i){n(i)}return r}function o(t){return S(t)?t:new e(_,new x(y(t)))}function r(t){return new e(_,new x(new P(t)))}function i(){return $}function u(){return new e(_,new b)}function c(t,e){var n=new b(t.receiver,t.join().context);return new e(_,n)}function f(t){return a(K,null,t)}function s(t,e){return a(F,t,e)}function a(t,n,o){function r(e,r,u){u.resolved||h(o,i,e,t(n,r,e),u)}function i(t,e,n){a[t]=e,0===--s&&n.become(new q(a))}for(var u,c="function"==typeof n?r:i,f=new b,s=o.length>>>0,a=new Array(s),p=0;p<o.length&&!f.resolved;++p)u=o[p],void 0!==u||p in o?h(o,c,p,u,f):--s;return 0===s&&f.become(new q(a)),new e(_,f)}function h(t,e,n,o,r){if(U(o)){var i=m(o),u=i.state();0===u?i.fold(e,n,void 0,r):u>0?e(n,i.value,r):(r.become(i),p(t,n+1,i))}else e(n,o,r)}function p(t,e,n){for(var o=e;o<t.length;++o)l(y(t[o]),n)}function l(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?r(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?o(t[0]):v(t)}function v(t){var n,o,r,i=new b;for(n=0;n<t.length;++n)if(o=t[n],void 0!==o||n in t){if(r=y(o),0!==r.state()){i.become(r),p(t,n+1,r);break}r.visit(i,i.resolve,i.reject)}return new e(_,i)}function y(t){return S(t)?t._handler.join():U(t)?j(t):new q(t)}function m(t){return S(t)?t._handler.join():j(t)}function j(t){try{var e=t.then;return"function"==typeof e?new g(e,t):new q(t)}catch(n){return new P(n)}}function _(){}function w(){}function b(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function x(t){this.handler=t}function g(t,e){b.call(this),I.enqueue(new E(t,e,this))}function q(t){e.createContext(this),this.value=t}function P(t){e.createContext(this),this.id=++Y,this.value=t,this.handled=!1,this.reported=!1,this._report()}function R(t,e){this.rejection=t,this.context=e}function C(t){this.rejection=t}function O(){return new P(new TypeError("Promise cycle"))}function T(t,e){this.continuation=t,this.handler=e}function Q(t,e){this.handler=e,this.value=t}function E(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function L(t,e,n,o,r){try{t.call(e,n,o,r)}catch(i){o(i)}}function k(t,e,n,o){this.f=t,this.z=e,this.c=n,this.to=o,this.resolver=X,this.receiver=this}function S(t){return t instanceof e}function U(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function H(t,n,o,r){return"function"!=typeof t?r.become(n):(e.enterContext(n),W(t,n.value,o,r),void e.exitContext())}function N(t,n,o,r,i){return"function"!=typeof t?i.become(o):(e.enterContext(o),z(t,n,o.value,r,i),void e.exitContext())}function M(t,n,o,r,i){return"function"!=typeof t?i.notify(n):(e.enterContext(o),A(t,n,r,i),void e.exitContext())}function F(t,e,n){try{return t(e,n)}catch(o){return r(o)}}function W(t,e,n,o){try{o.become(y(t.call(n,e)))}catch(r){o.become(new P(r))}}function z(t,e,n,o,r){try{t.call(o,e,n,r)}catch(i){r.become(new P(i))}}function A(t,e,n,o){try{o.notify(t.call(n,e))}catch(r){o.notify(r)}}function J(t,e){e.prototype=V(t.prototype),e.prototype.constructor=e}function K(t,e){return e}function D(){}function G(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,e){return"unhandledRejection"===t?process.emit(t,e.value,e):process.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var o=!1;try{var r=new n("unhandledRejection");o=r instanceof n}catch(i){}return o?function(t,o){var r=new n(t,{detail:{reason:o.value,key:o},bubbles:!1,cancelable:!0});return!e.dispatchEvent(r)}:t}(D,self,CustomEvent):D}var I=t.scheduler,B=G(),V=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=o,e.reject=r,e.never=i,e._defer=u,e._handler=y,e.prototype.then=function(t,e,n){var o=this._handler,r=o.join().state();if("function"!=typeof t&&r>0||"function"!=typeof e&&0>r)return new this.constructor(_,o);var i=this._beget(),u=i._handler;return o.chain(u,o.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return c(this._handler,this.constructor)},e.all=f,e.race=d,e._traverse=s,e._visitRemaining=p,_.prototype.when=_.prototype.become=_.prototype.notify=_.prototype.fail=_.prototype._unreport=_.prototype._report=D,_.prototype._state=0,_.prototype.state=function(){return this._state},_.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},_.prototype.chain=function(t,e,n,o,r){this.when({resolver:t,receiver:e,fulfilled:n,rejected:o,progress:r})},_.prototype.visit=function(t,e,n,o){this.chain(X,t,e,n,o)},_.prototype.fold=function(t,e,n,o){this.when(new k(t,e,n,o))},J(_,w),w.prototype.become=function(t){t.fail()};var X=new w;J(_,b),b.prototype._state=0,b.prototype.resolve=function(t){this.become(y(t))},b.prototype.reject=function(t){this.resolved||this.become(new P(t))},b.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=O();return t},b.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},b.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&I.enqueue(this),void 0!==this.context&&t._report(this.context))},b.prototype.when=function(t){this.resolved?I.enqueue(new T(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},b.prototype.notify=function(t){this.resolved||I.enqueue(new Q(t,this))},b.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},b.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},b.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},J(_,x),x.prototype.when=function(t){I.enqueue(new T(t,this))},x.prototype._report=function(t){this.join()._report(t)},x.prototype._unreport=function(){this.join()._unreport()},J(b,g),J(_,q),q.prototype._state=1,q.prototype.fold=function(t,e,n,o){N(t,e,this,n,o)},q.prototype.when=function(t){H(t.fulfilled,this,t.receiver,t.resolver)};var Y=0;J(_,P),P.prototype._state=-1,P.prototype.fold=function(t,e,n,o){o.become(this)},P.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),H(t.rejected,this,t.receiver,t.resolver)},P.prototype._report=function(t){I.afterQueue(new R(this,t))},P.prototype._unreport=function(){this.handled||(this.handled=!0,I.afterQueue(new C(this)))},P.prototype.fail=function(t){this.reported=!0,B("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},R.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,B("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},C.prototype.run=function(){this.rejection.reported&&(B("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=D;var Z=new _,$=new e(_,Z);return T.prototype.run=function(){this.handler.join().when(this.continuation)},Q.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],M(e.progress,this.value,this.handler,e.receiver,e.resolver)},E.prototype.run=function(){function t(t){o.resolve(t)}function e(t){o.reject(t)}function n(t){o.notify(t)}var o=this.resolver;L(this._then,this.thenable,t,e,n)},k.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},k.prototype.rejected=function(t){this.to.reject(t)},k.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)});
-//# sourceMappingURL=Promise.min.js.map \ No newline at end of file
+!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.Promise=t():"undefined"!=typeof global?global.Promise=t():"undefined"!=typeof self&&(self.Promise=t())}(function(){var t;return function e(t,n,o){function r(u,c){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};t[u][0].call(s.exports,function(e){var n=t[u][1][e];return r(n?n:e)},s,s.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(t,e,n){var o=t("../lib/decorators/unhandledRejection"),r=o(t("../lib/Promise"));e.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n,o){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),o=t("./env").asap;return e({scheduler:new n(o)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n,o){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var o=t("../env").setTimer,r=t("../format");return function(t){function i(t){t.handled||(l.push(t),a("Potentially unhandled rejection ["+t.id+"] "+r.formatError(t.value)))}function u(t){var e=l.indexOf(t);e>=0&&(l.splice(e,1),h("Handled previous rejection ["+t.id+"] "+r.formatObject(t.value)))}function c(t,e){p.push(t,e),null===d&&(d=o(f,0))}function f(){for(d=null;p.length>0;)p.shift()(p.shift())}var s,a=n,h=n;"undefined"!=typeof console&&(s=console,a="undefined"!=typeof s.error?function(t){s.error(t)}:function(t){s.log(t)},h="undefined"!=typeof s.info?function(t){s.info(t)}:function(t){s.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(e,t.value)};var p=[],l=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n,o){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function n(){return"undefined"!=typeof MutationObserver&&MutationObserver||"undefined"!=typeof WebKitMutationObserver&&WebKitMutationObserver}function o(t){function e(){var t=n;n=void 0,t()}var n,o=document.createTextNode(""),r=new t(e);r.observe(o,{characterData:!0});var i=0;return function(t){n=t,o.data=i^=1}}var r,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,e){return setTimeout(t,e)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(e())f=function(t){return process.nextTick(t)};else if(r=n())f=o(r);else if(!i){var s=t,a=s("vertx");u=function(t,e){return a.setTimer(e,t)},c=a.cancelTimer,f=a.runOnLoop||a.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n,o){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===_?e:n(t)}function n(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}function o(t){r.notify(t)}var r=new b;try{t(e,n,o)}catch(i){n(i)}return r}function o(t){return S(t)?t:new e(_,new x(y(t)))}function r(t){return new e(_,new x(new E(t)))}function i(){return et}function u(){return new e(_,new b)}function c(t,e){var n=new b(t.receiver,t.join().context);return new e(_,n)}function f(t){return a(K,null,t)}function s(t,e){return a(F,t,e)}function a(t,n,o){function r(e,r,u){u.resolved||h(o,i,e,t(n,r,e),u)}function i(t,e,n){a[t]=e,0===--s&&n.become(new C(a))}for(var u,c="function"==typeof n?r:i,f=new b,s=o.length>>>0,a=new Array(s),p=0;p<o.length&&!f.resolved;++p)u=o[p],void 0!==u||p in o?h(o,c,p,u,f):--s;return 0===s&&f.become(new C(a)),new e(_,f)}function h(t,e,n,o,r){if(U(o)){var i=m(o),u=i.state();0===u?i.fold(e,n,void 0,r):u>0?e(n,i.value,r):(r.become(i),p(t,n+1,i))}else e(n,o,r)}function p(t,e,n){for(var o=e;o<t.length;++o)l(y(t[o]),n)}function l(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?r(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?o(t[0]):v(t)}function v(t){var n,o,r,i=new b;for(n=0;n<t.length;++n)if(o=t[n],void 0!==o||n in t){if(r=y(o),0!==r.state()){i.become(r),p(t,n+1,r);break}r.visit(i,i.resolve,i.reject)}return new e(_,i)}function y(t){return S(t)?t._handler.join():U(t)?j(t):new C(t)}function m(t){return S(t)?t._handler.join():j(t)}function j(t){try{var e=t.then;return"function"==typeof e?new g(e,t):new C(t)}catch(n){return new E(n)}}function _(){}function w(){}function b(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function x(t){this.handler=t}function g(t,e){b.call(this),V.enqueue(new Q(t,e,this))}function C(t){e.createContext(this),this.value=t}function E(t){e.createContext(this),this.id=++$,this.value=t,this.handled=!1,this.reported=!1,this._report()}function q(t,e){this.rejection=t,this.context=e}function P(t){this.rejection=t}function R(){return new E(new TypeError("Promise cycle"))}function O(t,e){this.continuation=t,this.handler=e}function T(t,e){this.handler=e,this.value=t}function Q(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function L(t,e,n,o,r){try{t.call(e,n,o,r)}catch(i){o(i)}}function k(t,e,n,o){this.f=t,this.z=e,this.c=n,this.to=o,this.resolver=Z,this.receiver=this}function S(t){return t instanceof e}function U(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function H(t,n,o,r){return"function"!=typeof t?r.become(n):(e.enterContext(n),W(t,n.value,o,r),void e.exitContext())}function N(t,n,o,r,i){return"function"!=typeof t?i.become(o):(e.enterContext(o),z(t,n,o.value,r,i),void e.exitContext())}function M(t,n,o,r,i){return"function"!=typeof t?i.notify(n):(e.enterContext(o),A(t,n,r,i),void e.exitContext())}function F(t,e,n){try{return t(e,n)}catch(o){return r(o)}}function W(t,e,n,o){try{o.become(y(t.call(n,e)))}catch(r){o.become(new E(r))}}function z(t,e,n,o,r){try{t.call(o,e,n,r)}catch(i){r.become(new E(i))}}function A(t,e,n,o){try{o.notify(t.call(n,e))}catch(r){o.notify(r)}}function J(t,e){e.prototype=Y(t.prototype),e.prototype.constructor=e}function K(t,e){return e}function D(){}function G(){if("function"==typeof CustomEvent)try{var t=new CustomEvent("unhandledRejection");return t instanceof CustomEvent}catch(e){}return!1}function I(){if("undefined"!=typeof document&&"function"==typeof document.createEvent)try{var t=document.createEvent("CustomEvent");return t.initCustomEvent("eventType",!1,!0,{}),!0}catch(e){}return!1}function B(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,e){return"unhandledRejection"===t?process.emit(t,e.value,e):process.emit(t,e)}:"undefined"!=typeof self&&G()?function(t,e){return function(n,o){var r=new e(n,{detail:{reason:o.value,key:o},bubbles:!1,cancelable:!0});return!t.dispatchEvent(r)}}(self,CustomEvent):"undefined"!=typeof self&&I()?function(t,e){return function(n,o){var r=e.createEvent("CustomEvent");return r.initCustomEvent(n,!1,!0,{reason:o.value,key:o}),!t.dispatchEvent(r)}}(self,document):D}var V=t.scheduler,X=B(),Y=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=o,e.reject=r,e.never=i,e._defer=u,e._handler=y,e.prototype.then=function(t,e,n){var o=this._handler,r=o.join().state();if("function"!=typeof t&&r>0||"function"!=typeof e&&0>r)return new this.constructor(_,o);var i=this._beget(),u=i._handler;return o.chain(u,o.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return c(this._handler,this.constructor)},e.all=f,e.race=d,e._traverse=s,e._visitRemaining=p,_.prototype.when=_.prototype.become=_.prototype.notify=_.prototype.fail=_.prototype._unreport=_.prototype._report=D,_.prototype._state=0,_.prototype.state=function(){return this._state},_.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},_.prototype.chain=function(t,e,n,o,r){this.when({resolver:t,receiver:e,fulfilled:n,rejected:o,progress:r})},_.prototype.visit=function(t,e,n,o){this.chain(Z,t,e,n,o)},_.prototype.fold=function(t,e,n,o){this.when(new k(t,e,n,o))},J(_,w),w.prototype.become=function(t){t.fail()};var Z=new w;J(_,b),b.prototype._state=0,b.prototype.resolve=function(t){this.become(y(t))},b.prototype.reject=function(t){this.resolved||this.become(new E(t))},b.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=R();return t},b.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},b.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&V.enqueue(this),void 0!==this.context&&t._report(this.context))},b.prototype.when=function(t){this.resolved?V.enqueue(new O(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},b.prototype.notify=function(t){this.resolved||V.enqueue(new T(t,this))},b.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},b.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},b.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},J(_,x),x.prototype.when=function(t){V.enqueue(new O(t,this))},x.prototype._report=function(t){this.join()._report(t)},x.prototype._unreport=function(){this.join()._unreport()},J(b,g),J(_,C),C.prototype._state=1,C.prototype.fold=function(t,e,n,o){N(t,e,this,n,o)},C.prototype.when=function(t){H(t.fulfilled,this,t.receiver,t.resolver)};var $=0;J(_,E),E.prototype._state=-1,E.prototype.fold=function(t,e,n,o){o.become(this)},E.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),H(t.rejected,this,t.receiver,t.resolver)},E.prototype._report=function(t){V.afterQueue(new q(this,t))},E.prototype._unreport=function(){this.handled||(this.handled=!0,V.afterQueue(new P(this)))},E.prototype.fail=function(t){this.reported=!0,X("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},q.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,X("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},P.prototype.run=function(){this.rejection.reported&&(X("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=D;var tt=new _,et=new e(_,tt);return O.prototype.run=function(){this.handler.join().when(this.continuation)},T.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],M(e.progress,this.value,this.handler,e.receiver,e.resolver)},Q.prototype.run=function(){function t(t){o.resolve(t)}function e(t){o.reject(t)}function n(t){o.notify(t)}var o=this.resolver;L(this._then,this.thenable,t,e,n)},k.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},k.prototype.rejected=function(t){this.to.reject(t)},k.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)});
+//# sourceMappingURL=es6-shim/Promise.min.js.map \ No newline at end of file
diff --git a/node_modules/when/es6-shim/Promise.min.js.map b/node_modules/when/es6-shim/Promise.min.js.map
index f3c1bc91f..9e15929fb 100644
--- a/node_modules/when/es6-shim/Promise.min.js.map
+++ b/node_modules/when/es6-shim/Promise.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["es6-shim/Promise.browserify-es6.js","lib/Promise.js","lib/Scheduler.js","lib/decorators/unhandledRejection.js","lib/env.js","lib/format.js","lib/makePromise.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/es6-shim/Promise.browserify-es6.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/Promise.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/Scheduler.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/decorators/unhandledRejection.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/env.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/format.js","https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83/lib/makePromise.js"],"names":["unhandledRejections","require","PromiseConstructor","module","exports","global","Promise","self","define","makePromise","Scheduler","async","asap","scheduler","amd","factory","this","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","drain","_drain","prototype","enqueue","task","run","afterQueue","i","throwit","e","noop","setTimer","format","report","r","handled","reported","push","logError","id","formatError","value","unreport","indexOf","splice","logInfo","formatObject","f","x","tasks","running","flush","length","shift","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","isNode","process","Object","toString","call","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","node","document","createTextNode","o","observe","characterData","data","MutationObs","capturedSetTimeout","setTimeout","ms","clearTimer","t","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","s","stack","message","Error","String","JSON","tryStringify","defaultValue","stringify","environment","resolver","handler","_handler","Handler","init","promiseResolve","resolve","promiseReject","reason","reject","promiseNotify","notify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","child","receiver","join","context","all","promises","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","resolved","traverseAt","settleAt","results","pending","become","Fulfilled","Array","maybeThenable","h","getHandlerMaybeThenable","state","fold","visitRemaining","start","markAsHandled","visit","_unreport","race","TypeError","runRace","getHandlerUntrusted","untrustedThen","then","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","z","c","to","failIfRejected","runContinuation1","next","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","a","b","thisArg","y","inherit","Parent","Child","objectCreate","constructor","initEmitRejection","emit","type","CustomEvent","hasCustomEvent","ev","detail","key","bubbles","cancelable","dispatchEvent","emitRejection","create","proto","_defer","onFulfilled","onRejected","onProgress","p","_beget","chain","_traverse","_visitRemaining","when","fail","_state","fulfilled","rejected","progress","q","cont","foreverPendingHandler","_resolve","_reject","_notify"],"mappings":"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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"https://raw.githubusercontent.com/cujojs/when/1516d791439f28cbb8f1854d16fef15e904a8a83","sourcesContent":["/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * ES6 global Promise shim\n */\nvar unhandledRejections = require('../lib/decorators/unhandledRejection');\nvar PromiseConstructor = unhandledRejections(require('../lib/Promise'));\n\nmodule.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)\n\t : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)\n\t : PromiseConstructor;\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * ES6 global Promise shim\n */\nvar unhandledRejections = require('../lib/decorators/unhandledRejection');\nvar PromiseConstructor = unhandledRejections(require('../lib/Promise'));\n\nmodule.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)\n\t : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)\n\t : PromiseConstructor;\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t\treturn (typeof MutationObserver === 'function' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {\n\t\t\t\treturn (function(noop, self, CustomEvent) {\n\t\t\t\t\tvar hasCustomEvent = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\t\thasCustomEvent = ev instanceof CustomEvent;\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\treturn !hasCustomEvent ? noop : function(type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(noop, self, CustomEvent));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n"]} \ No newline at end of file
+{"version":3,"sources":["es6-shim/Promise.browserify-es6.js","lib/Promise.js","lib/Scheduler.js","lib/decorators/unhandledRejection.js","lib/env.js","lib/format.js","lib/makePromise.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/es6-shim/Promise.browserify-es6.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/Promise.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/Scheduler.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/decorators/unhandledRejection.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/env.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/format.js","https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08/lib/makePromise.js"],"names":["unhandledRejections","require","PromiseConstructor","module","exports","global","Promise","self","define","makePromise","Scheduler","async","asap","scheduler","amd","factory","this","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","drain","_drain","prototype","enqueue","task","run","afterQueue","i","throwit","e","noop","setTimer","format","report","r","handled","reported","push","logError","id","formatError","value","unreport","indexOf","splice","logInfo","formatObject","f","x","tasks","running","flush","length","shift","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","isNode","process","Object","toString","call","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","node","document","createTextNode","o","observe","characterData","data","MutationObs","capturedSetTimeout","setTimeout","ms","clearTimer","t","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","s","stack","message","Error","String","JSON","tryStringify","defaultValue","stringify","environment","resolver","handler","_handler","Handler","init","promiseResolve","resolve","promiseReject","reason","reject","promiseNotify","notify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","child","receiver","join","context","all","promises","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","resolved","traverseAt","settleAt","results","pending","become","Fulfilled","Array","maybeThenable","h","getHandlerMaybeThenable","state","fold","visitRemaining","start","markAsHandled","visit","_unreport","race","TypeError","runRace","getHandlerUntrusted","untrustedThen","then","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","z","c","to","failIfRejected","runContinuation1","next","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","a","b","thisArg","y","inherit","Parent","Child","objectCreate","constructor","hasCustomEvent","CustomEvent","ev","ignoredException","hasInternetExplorerCustomEvent","createEvent","initCustomEvent","initEmitRejection","emit","type","detail","key","bubbles","cancelable","dispatchEvent","emitRejection","create","proto","_defer","onFulfilled","onRejected","onProgress","p","_beget","chain","_traverse","_visitRemaining","when","fail","_state","fulfilled","rejected","progress","q","cont","foreverPendingHandler","_resolve","_reject","_notify"],"mappings":"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CA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"https://raw.githubusercontent.com/cujojs/when/5c0a9ebaaf9bc859e76bd9584a9c9677e1e18f08","sourcesContent":["/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * ES6 global Promise shim\n */\nvar unhandledRejections = require('../lib/decorators/unhandledRejection');\nvar PromiseConstructor = unhandledRejections(require('../lib/Promise'));\n\nmodule.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)\n\t : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)\n\t : PromiseConstructor;\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * ES6 global Promise shim\n */\nvar unhandledRejections = require('../lib/decorators/unhandledRejection');\nvar PromiseConstructor = unhandledRejections(require('../lib/Promise'));\n\nmodule.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)\n\t : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)\n\t : PromiseConstructor;\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function (require) {\n\n\tvar makePromise = require('./makePromise');\n\tvar Scheduler = require('./Scheduler');\n\tvar async = require('./env').asap;\n\n\treturn makePromise({\n\t\tscheduler: new Scheduler(async)\n\t});\n\n});\n})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\t// Credit to Twisol (https://github.com/Twisol) for suggesting\n\t// this type of extensible queue + trampoline approach for next-tick conflation.\n\n\t/**\n\t * Async task scheduler\n\t * @param {function} async function to schedule a single async function\n\t * @constructor\n\t */\n\tfunction Scheduler(async) {\n\t\tthis._async = async;\n\t\tthis._running = false;\n\n\t\tthis._queue = this;\n\t\tthis._queueLen = 0;\n\t\tthis._afterQueue = {};\n\t\tthis._afterQueueLen = 0;\n\n\t\tvar self = this;\n\t\tthis.drain = function() {\n\t\t\tself._drain();\n\t\t};\n\t}\n\n\t/**\n\t * Enqueue a task\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.enqueue = function(task) {\n\t\tthis._queue[this._queueLen++] = task;\n\t\tthis.run();\n\t};\n\n\t/**\n\t * Enqueue a task to run after the main task queue\n\t * @param {{ run:function }} task\n\t */\n\tScheduler.prototype.afterQueue = function(task) {\n\t\tthis._afterQueue[this._afterQueueLen++] = task;\n\t\tthis.run();\n\t};\n\n\tScheduler.prototype.run = function() {\n\t\tif (!this._running) {\n\t\t\tthis._running = true;\n\t\t\tthis._async(this.drain);\n\t\t}\n\t};\n\n\t/**\n\t * Drain the handler queue entirely, and then the after queue\n\t */\n\tScheduler.prototype._drain = function() {\n\t\tvar i = 0;\n\t\tfor (; i < this._queueLen; ++i) {\n\t\t\tthis._queue[i].run();\n\t\t\tthis._queue[i] = void 0;\n\t\t}\n\n\t\tthis._queueLen = 0;\n\t\tthis._running = false;\n\n\t\tfor (i = 0; i < this._afterQueueLen; ++i) {\n\t\t\tthis._afterQueue[i].run();\n\t\t\tthis._afterQueue[i] = void 0;\n\t\t}\n\n\t\tthis._afterQueueLen = 0;\n\t};\n\n\treturn Scheduler;\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function(require) {\n\n\tvar setTimer = require('../env').setTimer;\n\tvar format = require('../format');\n\n\treturn function unhandledRejection(Promise) {\n\n\t\tvar logError = noop;\n\t\tvar logInfo = noop;\n\t\tvar localConsole;\n\n\t\tif(typeof console !== 'undefined') {\n\t\t\t// Alias console to prevent things like uglify's drop_console option from\n\t\t\t// removing console.log/error. Unhandled rejections fall into the same\n\t\t\t// category as uncaught exceptions, and build tools shouldn't silence them.\n\t\t\tlocalConsole = console;\n\t\t\tlogError = typeof localConsole.error !== 'undefined'\n\t\t\t\t? function (e) { localConsole.error(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\n\t\t\tlogInfo = typeof localConsole.info !== 'undefined'\n\t\t\t\t? function (e) { localConsole.info(e); }\n\t\t\t\t: function (e) { localConsole.log(e); };\n\t\t}\n\n\t\tPromise.onPotentiallyUnhandledRejection = function(rejection) {\n\t\t\tenqueue(report, rejection);\n\t\t};\n\n\t\tPromise.onPotentiallyUnhandledRejectionHandled = function(rejection) {\n\t\t\tenqueue(unreport, rejection);\n\t\t};\n\n\t\tPromise.onFatalRejection = function(rejection) {\n\t\t\tenqueue(throwit, rejection.value);\n\t\t};\n\n\t\tvar tasks = [];\n\t\tvar reported = [];\n\t\tvar running = null;\n\n\t\tfunction report(r) {\n\t\t\tif(!r.handled) {\n\t\t\t\treported.push(r);\n\t\t\t\tlogError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction unreport(r) {\n\t\t\tvar i = reported.indexOf(r);\n\t\t\tif(i >= 0) {\n\t\t\t\treported.splice(i, 1);\n\t\t\t\tlogInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));\n\t\t\t}\n\t\t}\n\n\t\tfunction enqueue(f, x) {\n\t\t\ttasks.push(f, x);\n\t\t\tif(running === null) {\n\t\t\t\trunning = setTimer(flush, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction flush() {\n\t\t\trunning = null;\n\t\t\twhile(tasks.length > 0) {\n\t\t\t\ttasks.shift()(tasks.shift());\n\t\t\t}\n\t\t}\n\n\t\treturn Promise;\n\t};\n\n\tfunction throwit(e) {\n\t\tthrow e;\n\t}\n\n\tfunction noop() {}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/\n(function(define) { 'use strict';\ndefine(function(require) {\n\t/*jshint maxcomplexity:6*/\n\n\t// Sniff \"best\" async scheduling option\n\t// Prefer process.nextTick or MutationObserver, then check for\n\t// setTimeout, and finally vertx, since its the only env that doesn't\n\t// have setTimeout\n\n\tvar MutationObs;\n\tvar capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;\n\n\t// Default env\n\tvar setTimer = function(f, ms) { return setTimeout(f, ms); };\n\tvar clearTimer = function(t) { return clearTimeout(t); };\n\tvar asap = function (f) { return capturedSetTimeout(f, 0); };\n\n\t// Detect specific env\n\tif (isNode()) { // Node\n\t\tasap = function (f) { return process.nextTick(f); };\n\n\t} else if (MutationObs = hasMutationObserver()) { // Modern browser\n\t\tasap = initMutationObserver(MutationObs);\n\n\t} else if (!capturedSetTimeout) { // vert.x\n\t\tvar vertxRequire = require;\n\t\tvar vertx = vertxRequire('vertx');\n\t\tsetTimer = function (f, ms) { return vertx.setTimer(ms, f); };\n\t\tclearTimer = vertx.cancelTimer;\n\t\tasap = vertx.runOnLoop || vertx.runOnContext;\n\t}\n\n\treturn {\n\t\tsetTimer: setTimer,\n\t\tclearTimer: clearTimer,\n\t\tasap: asap\n\t};\n\n\tfunction isNode () {\n\t\treturn typeof process !== 'undefined' &&\n\t\t\tObject.prototype.toString.call(process) === '[object process]';\n\t}\n\n\tfunction hasMutationObserver () {\n\t return (typeof MutationObserver !== 'undefined' && MutationObserver) ||\n\t\t\t(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);\n\t}\n\n\tfunction initMutationObserver(MutationObserver) {\n\t\tvar scheduled;\n\t\tvar node = document.createTextNode('');\n\t\tvar o = new MutationObserver(run);\n\t\to.observe(node, { characterData: true });\n\n\t\tfunction run() {\n\t\t\tvar f = scheduled;\n\t\t\tscheduled = void 0;\n\t\t\tf();\n\t\t}\n\n\t\tvar i = 0;\n\t\treturn function (f) {\n\t\t\tscheduled = f;\n\t\t\tnode.data = (i ^= 1);\n\t\t};\n\t}\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn {\n\t\tformatError: formatError,\n\t\tformatObject: formatObject,\n\t\ttryStringify: tryStringify\n\t};\n\n\t/**\n\t * Format an error into a string. If e is an Error and has a stack property,\n\t * it's returned. Otherwise, e is formatted using formatObject, with a\n\t * warning added about e not being a proper Error.\n\t * @param {*} e\n\t * @returns {String} formatted string, suitable for output to developers\n\t */\n\tfunction formatError(e) {\n\t\tvar s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);\n\t\treturn e instanceof Error ? s : s + ' (WARNING: non-Error used)';\n\t}\n\n\t/**\n\t * Format an object, detecting \"plain\" objects and running them through\n\t * JSON.stringify if possible.\n\t * @param {Object} o\n\t * @returns {string}\n\t */\n\tfunction formatObject(o) {\n\t\tvar s = String(o);\n\t\tif(s === '[object Object]' && typeof JSON !== 'undefined') {\n\t\t\ts = tryStringify(o, s);\n\t\t}\n\t\treturn s;\n\t}\n\n\t/**\n\t * Try to return the result of JSON.stringify(x). If that fails, return\n\t * defaultValue\n\t * @param {*} x\n\t * @param {*} defaultValue\n\t * @returns {String|*} JSON.stringify(x) or defaultValue\n\t */\n\tfunction tryStringify(x, defaultValue) {\n\t\ttry {\n\t\t\treturn JSON.stringify(x);\n\t\t} catch(e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n(function(define) { 'use strict';\ndefine(function() {\n\n\treturn function makePromise(environment) {\n\n\t\tvar tasks = environment.scheduler;\n\t\tvar emitRejection = initEmitRejection();\n\n\t\tvar objectCreate = Object.create ||\n\t\t\tfunction(proto) {\n\t\t\t\tfunction Child() {}\n\t\t\t\tChild.prototype = proto;\n\t\t\t\treturn new Child();\n\t\t\t};\n\n\t\t/**\n\t\t * Create a promise whose fate is determined by resolver\n\t\t * @constructor\n\t\t * @returns {Promise} promise\n\t\t * @name Promise\n\t\t */\n\t\tfunction Promise(resolver, handler) {\n\t\t\tthis._handler = resolver === Handler ? handler : init(resolver);\n\t\t}\n\n\t\t/**\n\t\t * Run the supplied resolver\n\t\t * @param resolver\n\t\t * @returns {Pending}\n\t\t */\n\t\tfunction init(resolver) {\n\t\t\tvar handler = new Pending();\n\n\t\t\ttry {\n\t\t\t\tresolver(promiseResolve, promiseReject, promiseNotify);\n\t\t\t} catch (e) {\n\t\t\t\tpromiseReject(e);\n\t\t\t}\n\n\t\t\treturn handler;\n\n\t\t\t/**\n\t\t\t * Transition from pre-resolution state to post-resolution state, notifying\n\t\t\t * all listeners of the ultimate fulfillment or rejection\n\t\t\t * @param {*} x resolution value\n\t\t\t */\n\t\t\tfunction promiseResolve (x) {\n\t\t\t\thandler.resolve(x);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Reject this promise with reason, which will be used verbatim\n\t\t\t * @param {Error|*} reason rejection reason, strongly suggested\n\t\t\t * to be an Error type\n\t\t\t */\n\t\t\tfunction promiseReject (reason) {\n\t\t\t\thandler.reject(reason);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t * Issue a progress event, notifying all progress listeners\n\t\t\t * @param {*} x progress event payload to pass to all listeners\n\t\t\t */\n\t\t\tfunction promiseNotify (x) {\n\t\t\t\thandler.notify(x);\n\t\t\t}\n\t\t}\n\n\t\t// Creation\n\n\t\tPromise.resolve = resolve;\n\t\tPromise.reject = reject;\n\t\tPromise.never = never;\n\n\t\tPromise._defer = defer;\n\t\tPromise._handler = getHandler;\n\n\t\t/**\n\t\t * Returns a trusted promise. If x is already a trusted promise, it is\n\t\t * returned, otherwise returns a new trusted Promise which follows x.\n\t\t * @param {*} x\n\t\t * @return {Promise} promise\n\t\t */\n\t\tfunction resolve(x) {\n\t\t\treturn isPromise(x) ? x\n\t\t\t\t: new Promise(Handler, new Async(getHandler(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a reject promise with x as its reason (x is used verbatim)\n\t\t * @param {*} x\n\t\t * @returns {Promise} rejected promise\n\t\t */\n\t\tfunction reject(x) {\n\t\t\treturn new Promise(Handler, new Async(new Rejected(x)));\n\t\t}\n\n\t\t/**\n\t\t * Return a promise that remains pending forever\n\t\t * @returns {Promise} forever-pending promise.\n\t\t */\n\t\tfunction never() {\n\t\t\treturn foreverPendingPromise; // Should be frozen\n\t\t}\n\n\t\t/**\n\t\t * Creates an internal {promise, resolver} pair\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tfunction defer() {\n\t\t\treturn new Promise(Handler, new Pending());\n\t\t}\n\n\t\t// Transformation and flow control\n\n\t\t/**\n\t\t * Transform this promise's fulfillment value, returning a new Promise\n\t\t * for the transformed result. If the promise cannot be fulfilled, onRejected\n\t\t * is called with the reason. onProgress *may* be called with updates toward\n\t\t * this promise's fulfillment.\n\t\t * @param {function=} onFulfilled fulfillment handler\n\t\t * @param {function=} onRejected rejection handler\n\t\t * @param {function=} onProgress @deprecated progress handler\n\t\t * @return {Promise} new promise\n\t\t */\n\t\tPromise.prototype.then = function(onFulfilled, onRejected, onProgress) {\n\t\t\tvar parent = this._handler;\n\t\t\tvar state = parent.join().state();\n\n\t\t\tif ((typeof onFulfilled !== 'function' && state > 0) ||\n\t\t\t\t(typeof onRejected !== 'function' && state < 0)) {\n\t\t\t\t// Short circuit: value will not change, simply share handler\n\t\t\t\treturn new this.constructor(Handler, parent);\n\t\t\t}\n\n\t\t\tvar p = this._beget();\n\t\t\tvar child = p._handler;\n\n\t\t\tparent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);\n\n\t\t\treturn p;\n\t\t};\n\n\t\t/**\n\t\t * If this promise cannot be fulfilled due to an error, call onRejected to\n\t\t * handle the error. Shortcut for .then(undefined, onRejected)\n\t\t * @param {function?} onRejected\n\t\t * @return {Promise}\n\t\t */\n\t\tPromise.prototype['catch'] = function(onRejected) {\n\t\t\treturn this.then(void 0, onRejected);\n\t\t};\n\n\t\t/**\n\t\t * Creates a new, pending promise of the same type as this promise\n\t\t * @private\n\t\t * @returns {Promise}\n\t\t */\n\t\tPromise.prototype._beget = function() {\n\t\t\treturn begetFrom(this._handler, this.constructor);\n\t\t};\n\n\t\tfunction begetFrom(parent, Promise) {\n\t\t\tvar child = new Pending(parent.receiver, parent.join().context);\n\t\t\treturn new Promise(Handler, child);\n\t\t}\n\n\t\t// Array combinators\n\n\t\tPromise.all = all;\n\t\tPromise.race = race;\n\t\tPromise._traverse = traverse;\n\n\t\t/**\n\t\t * Return a promise that will fulfill when all promises in the\n\t\t * input array have fulfilled, or will reject when one of the\n\t\t * promises rejects.\n\t\t * @param {array} promises array of promises\n\t\t * @returns {Promise} promise for array of fulfillment values\n\t\t */\n\t\tfunction all(promises) {\n\t\t\treturn traverseWith(snd, null, promises);\n\t\t}\n\n\t\t/**\n\t\t * Array<Promise<X>> -> Promise<Array<f(X)>>\n\t\t * @private\n\t\t * @param {function} f function to apply to each promise's value\n\t\t * @param {Array} promises array of promises\n\t\t * @returns {Promise} promise for transformed values\n\t\t */\n\t\tfunction traverse(f, promises) {\n\t\t\treturn traverseWith(tryCatch2, f, promises);\n\t\t}\n\n\t\tfunction traverseWith(tryMap, f, promises) {\n\t\t\tvar handler = typeof f === 'function' ? mapAt : settleAt;\n\n\t\t\tvar resolver = new Pending();\n\t\t\tvar pending = promises.length >>> 0;\n\t\t\tvar results = new Array(pending);\n\n\t\t\tfor (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {\n\t\t\t\tx = promises[i];\n\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\t--pending;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttraverseAt(promises, handler, i, x, resolver);\n\t\t\t}\n\n\t\t\tif(pending === 0) {\n\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t}\n\n\t\t\treturn new Promise(Handler, resolver);\n\n\t\t\tfunction mapAt(i, x, resolver) {\n\t\t\t\tif(!resolver.resolved) {\n\t\t\t\t\ttraverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction settleAt(i, x, resolver) {\n\t\t\t\tresults[i] = x;\n\t\t\t\tif(--pending === 0) {\n\t\t\t\t\tresolver.become(new Fulfilled(results));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction traverseAt(promises, handler, i, x, resolver) {\n\t\t\tif (maybeThenable(x)) {\n\t\t\t\tvar h = getHandlerMaybeThenable(x);\n\t\t\t\tvar s = h.state();\n\n\t\t\t\tif (s === 0) {\n\t\t\t\t\th.fold(handler, i, void 0, resolver);\n\t\t\t\t} else if (s > 0) {\n\t\t\t\t\thandler(i, h.value, resolver);\n\t\t\t\t} else {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler(i, x, resolver);\n\t\t\t}\n\t\t}\n\n\t\tPromise._visitRemaining = visitRemaining;\n\t\tfunction visitRemaining(promises, start, handler) {\n\t\t\tfor(var i=start; i<promises.length; ++i) {\n\t\t\t\tmarkAsHandled(getHandler(promises[i]), handler);\n\t\t\t}\n\t\t}\n\n\t\tfunction markAsHandled(h, handler) {\n\t\t\tif(h === handler) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar s = h.state();\n\t\t\tif(s === 0) {\n\t\t\t\th.visit(h, void 0, h._unreport);\n\t\t\t} else if(s < 0) {\n\t\t\t\th._unreport();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fulfill-reject competitive race. Return a promise that will settle\n\t\t * to the same state as the earliest input promise to settle.\n\t\t *\n\t\t * WARNING: The ES6 Promise spec requires that race()ing an empty array\n\t\t * must return a promise that is pending forever. This implementation\n\t\t * returns a singleton forever-pending promise, the same singleton that is\n\t\t * returned by Promise.never(), thus can be checked with ===\n\t\t *\n\t\t * @param {array} promises array of promises to race\n\t\t * @returns {Promise} if input is non-empty, a promise that will settle\n\t\t * to the same outcome as the earliest input promise to settle. if empty\n\t\t * is empty, returns a promise that will never settle.\n\t\t */\n\t\tfunction race(promises) {\n\t\t\tif(typeof promises !== 'object' || promises === null) {\n\t\t\t\treturn reject(new TypeError('non-iterable passed to race()'));\n\t\t\t}\n\n\t\t\t// Sigh, race([]) is untestable unless we return *something*\n\t\t\t// that is recognizable without calling .then() on it.\n\t\t\treturn promises.length === 0 ? never()\n\t\t\t\t : promises.length === 1 ? resolve(promises[0])\n\t\t\t\t : runRace(promises);\n\t\t}\n\n\t\tfunction runRace(promises) {\n\t\t\tvar resolver = new Pending();\n\t\t\tvar i, x, h;\n\t\t\tfor(i=0; i<promises.length; ++i) {\n\t\t\t\tx = promises[i];\n\t\t\t\tif (x === void 0 && !(i in promises)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\th = getHandler(x);\n\t\t\t\tif(h.state() !== 0) {\n\t\t\t\t\tresolver.become(h);\n\t\t\t\t\tvisitRemaining(promises, i+1, h);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\th.visit(resolver, resolver.resolve, resolver.reject);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Promise(Handler, resolver);\n\t\t}\n\n\t\t// Promise internals\n\t\t// Below this, everything is @private\n\n\t\t/**\n\t\t * Get an appropriate handler for x, without checking for cycles\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandler(x) {\n\t\t\tif(isPromise(x)) {\n\t\t\t\treturn x._handler.join();\n\t\t\t}\n\t\t\treturn maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for thenable x.\n\t\t * NOTE: You must only call this if maybeThenable(x) == true\n\t\t * @param {object|function|Promise} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerMaybeThenable(x) {\n\t\t\treturn isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);\n\t\t}\n\n\t\t/**\n\t\t * Get a handler for potentially untrusted thenable x\n\t\t * @param {*} x\n\t\t * @returns {object} handler\n\t\t */\n\t\tfunction getHandlerUntrusted(x) {\n\t\t\ttry {\n\t\t\t\tvar untrustedThen = x.then;\n\t\t\t\treturn typeof untrustedThen === 'function'\n\t\t\t\t\t? new Thenable(untrustedThen, x)\n\t\t\t\t\t: new Fulfilled(x);\n\t\t\t} catch(e) {\n\t\t\t\treturn new Rejected(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handler for a promise that is pending forever\n\t\t * @constructor\n\t\t */\n\t\tfunction Handler() {}\n\n\t\tHandler.prototype.when\n\t\t\t= Handler.prototype.become\n\t\t\t= Handler.prototype.notify // deprecated\n\t\t\t= Handler.prototype.fail\n\t\t\t= Handler.prototype._unreport\n\t\t\t= Handler.prototype._report\n\t\t\t= noop;\n\n\t\tHandler.prototype._state = 0;\n\n\t\tHandler.prototype.state = function() {\n\t\t\treturn this._state;\n\t\t};\n\n\t\t/**\n\t\t * Recursively collapse handler chain to find the handler\n\t\t * nearest to the fully resolved value.\n\t\t * @returns {object} handler nearest the fully resolved value\n\t\t */\n\t\tHandler.prototype.join = function() {\n\t\t\tvar h = this;\n\t\t\twhile(h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t}\n\t\t\treturn h;\n\t\t};\n\n\t\tHandler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {\n\t\t\tthis.when({\n\t\t\t\tresolver: to,\n\t\t\t\treceiver: receiver,\n\t\t\t\tfulfilled: fulfilled,\n\t\t\t\trejected: rejected,\n\t\t\t\tprogress: progress\n\t\t\t});\n\t\t};\n\n\t\tHandler.prototype.visit = function(receiver, fulfilled, rejected, progress) {\n\t\t\tthis.chain(failIfRejected, receiver, fulfilled, rejected, progress);\n\t\t};\n\n\t\tHandler.prototype.fold = function(f, z, c, to) {\n\t\t\tthis.when(new Fold(f, z, c, to));\n\t\t};\n\n\t\t/**\n\t\t * Handler that invokes fail() on any handler it becomes\n\t\t * @constructor\n\t\t */\n\t\tfunction FailIfRejected() {}\n\n\t\tinherit(Handler, FailIfRejected);\n\n\t\tFailIfRejected.prototype.become = function(h) {\n\t\t\th.fail();\n\t\t};\n\n\t\tvar failIfRejected = new FailIfRejected();\n\n\t\t/**\n\t\t * Handler that manages a queue of consumers waiting on a pending promise\n\t\t * @constructor\n\t\t */\n\t\tfunction Pending(receiver, inheritedContext) {\n\t\t\tPromise.createContext(this, inheritedContext);\n\n\t\t\tthis.consumers = void 0;\n\t\t\tthis.receiver = receiver;\n\t\t\tthis.handler = void 0;\n\t\t\tthis.resolved = false;\n\t\t}\n\n\t\tinherit(Handler, Pending);\n\n\t\tPending.prototype._state = 0;\n\n\t\tPending.prototype.resolve = function(x) {\n\t\t\tthis.become(getHandler(x));\n\t\t};\n\n\t\tPending.prototype.reject = function(x) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.become(new Rejected(x));\n\t\t};\n\n\t\tPending.prototype.join = function() {\n\t\t\tif (!this.resolved) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar h = this;\n\n\t\t\twhile (h.handler !== void 0) {\n\t\t\t\th = h.handler;\n\t\t\t\tif (h === this) {\n\t\t\t\t\treturn this.handler = cycle();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn h;\n\t\t};\n\n\t\tPending.prototype.run = function() {\n\t\t\tvar q = this.consumers;\n\t\t\tvar handler = this.handler;\n\t\t\tthis.handler = this.handler.join();\n\t\t\tthis.consumers = void 0;\n\n\t\t\tfor (var i = 0; i < q.length; ++i) {\n\t\t\t\thandler.when(q[i]);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.become = function(handler) {\n\t\t\tif(this.resolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.resolved = true;\n\t\t\tthis.handler = handler;\n\t\t\tif(this.consumers !== void 0) {\n\t\t\t\ttasks.enqueue(this);\n\t\t\t}\n\n\t\t\tif(this.context !== void 0) {\n\t\t\t\thandler._report(this.context);\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.when = function(continuation) {\n\t\t\tif(this.resolved) {\n\t\t\t\ttasks.enqueue(new ContinuationTask(continuation, this.handler));\n\t\t\t} else {\n\t\t\t\tif(this.consumers === void 0) {\n\t\t\t\t\tthis.consumers = [continuation];\n\t\t\t\t} else {\n\t\t\t\t\tthis.consumers.push(continuation);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tPending.prototype.notify = function(x) {\n\t\t\tif(!this.resolved) {\n\t\t\t\ttasks.enqueue(new ProgressTask(x, this));\n\t\t\t}\n\t\t};\n\n\t\tPending.prototype.fail = function(context) {\n\t\t\tvar c = typeof context === 'undefined' ? this.context : context;\n\t\t\tthis.resolved && this.handler.join().fail(c);\n\t\t};\n\n\t\tPending.prototype._report = function(context) {\n\t\t\tthis.resolved && this.handler.join()._report(context);\n\t\t};\n\n\t\tPending.prototype._unreport = function() {\n\t\t\tthis.resolved && this.handler.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Wrap another handler and force it into a future stack\n\t\t * @param {object} handler\n\t\t * @constructor\n\t\t */\n\t\tfunction Async(handler) {\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tinherit(Handler, Async);\n\n\t\tAsync.prototype.when = function(continuation) {\n\t\t\ttasks.enqueue(new ContinuationTask(continuation, this));\n\t\t};\n\n\t\tAsync.prototype._report = function(context) {\n\t\t\tthis.join()._report(context);\n\t\t};\n\n\t\tAsync.prototype._unreport = function() {\n\t\t\tthis.join()._unreport();\n\t\t};\n\n\t\t/**\n\t\t * Handler that wraps an untrusted thenable and assimilates it in a future stack\n\t\t * @param {function} then\n\t\t * @param {{then: function}} thenable\n\t\t * @constructor\n\t\t */\n\t\tfunction Thenable(then, thenable) {\n\t\t\tPending.call(this);\n\t\t\ttasks.enqueue(new AssimilateTask(then, thenable, this));\n\t\t}\n\n\t\tinherit(Pending, Thenable);\n\n\t\t/**\n\t\t * Handler for a fulfilled promise\n\t\t * @param {*} x fulfillment value\n\t\t * @constructor\n\t\t */\n\t\tfunction Fulfilled(x) {\n\t\t\tPromise.createContext(this);\n\t\t\tthis.value = x;\n\t\t}\n\n\t\tinherit(Handler, Fulfilled);\n\n\t\tFulfilled.prototype._state = 1;\n\n\t\tFulfilled.prototype.fold = function(f, z, c, to) {\n\t\t\trunContinuation3(f, z, this, c, to);\n\t\t};\n\n\t\tFulfilled.prototype.when = function(cont) {\n\t\t\trunContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tvar errorId = 0;\n\n\t\t/**\n\t\t * Handler for a rejected promise\n\t\t * @param {*} x rejection reason\n\t\t * @constructor\n\t\t */\n\t\tfunction Rejected(x) {\n\t\t\tPromise.createContext(this);\n\n\t\t\tthis.id = ++errorId;\n\t\t\tthis.value = x;\n\t\t\tthis.handled = false;\n\t\t\tthis.reported = false;\n\n\t\t\tthis._report();\n\t\t}\n\n\t\tinherit(Handler, Rejected);\n\n\t\tRejected.prototype._state = -1;\n\n\t\tRejected.prototype.fold = function(f, z, c, to) {\n\t\t\tto.become(this);\n\t\t};\n\n\t\tRejected.prototype.when = function(cont) {\n\t\t\tif(typeof cont.rejected === 'function') {\n\t\t\t\tthis._unreport();\n\t\t\t}\n\t\t\trunContinuation1(cont.rejected, this, cont.receiver, cont.resolver);\n\t\t};\n\n\t\tRejected.prototype._report = function(context) {\n\t\t\ttasks.afterQueue(new ReportTask(this, context));\n\t\t};\n\n\t\tRejected.prototype._unreport = function() {\n\t\t\tif(this.handled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.handled = true;\n\t\t\ttasks.afterQueue(new UnreportTask(this));\n\t\t};\n\n\t\tRejected.prototype.fail = function(context) {\n\t\t\tthis.reported = true;\n\t\t\temitRejection('unhandledRejection', this);\n\t\t\tPromise.onFatalRejection(this, context === void 0 ? this.context : context);\n\t\t};\n\n\t\tfunction ReportTask(rejection, context) {\n\t\t\tthis.rejection = rejection;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tReportTask.prototype.run = function() {\n\t\t\tif(!this.rejection.handled && !this.rejection.reported) {\n\t\t\t\tthis.rejection.reported = true;\n\t\t\t\temitRejection('unhandledRejection', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejection(this.rejection, this.context);\n\t\t\t}\n\t\t};\n\n\t\tfunction UnreportTask(rejection) {\n\t\t\tthis.rejection = rejection;\n\t\t}\n\n\t\tUnreportTask.prototype.run = function() {\n\t\t\tif(this.rejection.reported) {\n\t\t\t\temitRejection('rejectionHandled', this.rejection) ||\n\t\t\t\t\tPromise.onPotentiallyUnhandledRejectionHandled(this.rejection);\n\t\t\t}\n\t\t};\n\n\t\t// Unhandled rejection hooks\n\t\t// By default, everything is a noop\n\n\t\tPromise.createContext\n\t\t\t= Promise.enterContext\n\t\t\t= Promise.exitContext\n\t\t\t= Promise.onPotentiallyUnhandledRejection\n\t\t\t= Promise.onPotentiallyUnhandledRejectionHandled\n\t\t\t= Promise.onFatalRejection\n\t\t\t= noop;\n\n\t\t// Errors and singletons\n\n\t\tvar foreverPendingHandler = new Handler();\n\t\tvar foreverPendingPromise = new Promise(Handler, foreverPendingHandler);\n\n\t\tfunction cycle() {\n\t\t\treturn new Rejected(new TypeError('Promise cycle'));\n\t\t}\n\n\t\t// Task runners\n\n\t\t/**\n\t\t * Run a single consumer\n\t\t * @constructor\n\t\t */\n\t\tfunction ContinuationTask(continuation, handler) {\n\t\t\tthis.continuation = continuation;\n\t\t\tthis.handler = handler;\n\t\t}\n\n\t\tContinuationTask.prototype.run = function() {\n\t\t\tthis.handler.join().when(this.continuation);\n\t\t};\n\n\t\t/**\n\t\t * Run a queue of progress handlers\n\t\t * @constructor\n\t\t */\n\t\tfunction ProgressTask(value, handler) {\n\t\t\tthis.handler = handler;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tProgressTask.prototype.run = function() {\n\t\t\tvar q = this.handler.consumers;\n\t\t\tif(q === void 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var c, i = 0; i < q.length; ++i) {\n\t\t\t\tc = q[i];\n\t\t\t\trunNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Assimilate a thenable, sending it's value to resolver\n\t\t * @param {function} then\n\t\t * @param {object|function} thenable\n\t\t * @param {object} resolver\n\t\t * @constructor\n\t\t */\n\t\tfunction AssimilateTask(then, thenable, resolver) {\n\t\t\tthis._then = then;\n\t\t\tthis.thenable = thenable;\n\t\t\tthis.resolver = resolver;\n\t\t}\n\n\t\tAssimilateTask.prototype.run = function() {\n\t\t\tvar h = this.resolver;\n\t\t\ttryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);\n\n\t\t\tfunction _resolve(x) { h.resolve(x); }\n\t\t\tfunction _reject(x) { h.reject(x); }\n\t\t\tfunction _notify(x) { h.notify(x); }\n\t\t};\n\n\t\tfunction tryAssimilate(then, thenable, resolve, reject, notify) {\n\t\t\ttry {\n\t\t\t\tthen.call(thenable, resolve, reject, notify);\n\t\t\t} catch (e) {\n\t\t\t\treject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fold a handler value with z\n\t\t * @constructor\n\t\t */\n\t\tfunction Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}\n\n\t\tFold.prototype.fulfilled = function(x) {\n\t\t\tthis.f.call(this.c, this.z, x, this.to);\n\t\t};\n\n\t\tFold.prototype.rejected = function(x) {\n\t\t\tthis.to.reject(x);\n\t\t};\n\n\t\tFold.prototype.progress = function(x) {\n\t\t\tthis.to.notify(x);\n\t\t};\n\n\t\t// Other helpers\n\n\t\t/**\n\t\t * @param {*} x\n\t\t * @returns {boolean} true iff x is a trusted Promise\n\t\t */\n\t\tfunction isPromise(x) {\n\t\t\treturn x instanceof Promise;\n\t\t}\n\n\t\t/**\n\t\t * Test just enough to rule out primitives, in order to take faster\n\t\t * paths in some code\n\t\t * @param {*} x\n\t\t * @returns {boolean} false iff x is guaranteed *not* to be a thenable\n\t\t */\n\t\tfunction maybeThenable(x) {\n\t\t\treturn (typeof x === 'object' || typeof x === 'function') && x !== null;\n\t\t}\n\n\t\tfunction runContinuation1(f, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject(f, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction runContinuation3(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.become(h);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReject3(f, x, h.value, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t */\n\t\tfunction runNotify(f, x, h, receiver, next) {\n\t\t\tif(typeof f !== 'function') {\n\t\t\t\treturn next.notify(x);\n\t\t\t}\n\n\t\t\tPromise.enterContext(h);\n\t\t\ttryCatchReturn(f, x, receiver, next);\n\t\t\tPromise.exitContext();\n\t\t}\n\n\t\tfunction tryCatch2(f, a, b) {\n\t\t\ttry {\n\t\t\t\treturn f(a, b);\n\t\t\t} catch(e) {\n\t\t\t\treturn reject(e);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return f.call(thisArg, x), or if it throws return a rejected promise for\n\t\t * the thrown exception\n\t\t */\n\t\tfunction tryCatchReject(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.become(getHandler(f.call(thisArg, x)));\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Same as above, but includes the extra argument parameter.\n\t\t */\n\t\tfunction tryCatchReject3(f, x, y, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tf.call(thisArg, x, y, next);\n\t\t\t} catch(e) {\n\t\t\t\tnext.become(new Rejected(e));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @deprecated\n\t\t * Return f.call(thisArg, x), or if it throws, *return* the exception\n\t\t */\n\t\tfunction tryCatchReturn(f, x, thisArg, next) {\n\t\t\ttry {\n\t\t\t\tnext.notify(f.call(thisArg, x));\n\t\t\t} catch(e) {\n\t\t\t\tnext.notify(e);\n\t\t\t}\n\t\t}\n\n\t\tfunction inherit(Parent, Child) {\n\t\t\tChild.prototype = objectCreate(Parent.prototype);\n\t\t\tChild.prototype.constructor = Child;\n\t\t}\n\n\t\tfunction snd(x, y) {\n\t\t\treturn y;\n\t\t}\n\n\t\tfunction noop() {}\n\n\t\tfunction hasCustomEvent() {\n\t\t\tif(typeof CustomEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\tvar ev = new CustomEvent('unhandledRejection');\n\t\t\t\t\treturn ev instanceof CustomEvent;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction hasInternetExplorerCustomEvent() {\n\t\t\tif(typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create one event to make sure it's supported\n\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\tev.initCustomEvent('eventType', false, true, {});\n\t\t\t\t\treturn true;\n\t\t\t\t} catch (ignoredException) {}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction initEmitRejection() {\n\t\t\t/*global process, self, CustomEvent*/\n\t\t\tif(typeof process !== 'undefined' && process !== null\n\t\t\t\t&& typeof process.emit === 'function') {\n\t\t\t\t// Returning falsy here means to call the default\n\t\t\t\t// onPotentiallyUnhandledRejection API. This is safe even in\n\t\t\t\t// browserify since process.emit always returns falsy in browserify:\n\t\t\t\t// https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46\n\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\treturn type === 'unhandledRejection'\n\t\t\t\t\t\t? process.emit(type, rejection.value, rejection)\n\t\t\t\t\t\t: process.emit(type, rejection);\n\t\t\t\t};\n\t\t\t} else if(typeof self !== 'undefined' && hasCustomEvent()) {\n\t\t\t\treturn (function (self, CustomEvent) {\n\t\t\t\t\treturn function (type, rejection) {\n\t\t\t\t\t\tvar ev = new CustomEvent(type, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: false,\n\t\t\t\t\t\t\tcancelable: true\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, CustomEvent));\n\t\t\t} else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {\n\t\t\t\treturn (function(self, document) {\n\t\t\t\t\treturn function(type, rejection) {\n\t\t\t\t\t\tvar ev = document.createEvent('CustomEvent');\n\t\t\t\t\t\tev.initCustomEvent(type, false, true, {\n\t\t\t\t\t\t\treason: rejection.value,\n\t\t\t\t\t\t\tkey: rejection\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn !self.dispatchEvent(ev);\n\t\t\t\t\t};\n\t\t\t\t}(self, document));\n\t\t\t}\n\n\t\t\treturn noop;\n\t\t}\n\n\t\treturn Promise;\n\t};\n});\n}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));\n"]} \ No newline at end of file
diff --git a/node_modules/when/lib/decorators/array.js b/node_modules/when/lib/decorators/array.js
index 2f89c6150..7eea6aaa5 100644
--- a/node_modules/when/lib/decorators/array.js
+++ b/node_modules/when/lib/decorators/array.js
@@ -239,13 +239,23 @@ define(function(require) {
}
function settleOne(p) {
- var h = Promise._handler(p);
- if(h.state() === 0) {
+ // Optimize the case where we get an already-resolved when.js promise
+ // by extracting its state:
+ var handler;
+ if (p instanceof Promise) {
+ // This is our own Promise type and we can reach its handler internals:
+ handler = p._handler.join();
+ }
+ if((handler && handler.state() === 0) || !handler) {
+ // Either still pending, or not a Promise at all:
return toPromise(p).then(state.fulfilled, state.rejected);
}
- h._unreport();
- return state.inspect(h);
+ // The promise is our own, but it is already resolved. Take a shortcut.
+ // Since we're not actually handling the resolution, we need to disable
+ // rejection reporting.
+ handler._unreport();
+ return state.inspect(handler);
}
/**
diff --git a/node_modules/when/lib/env.js b/node_modules/when/lib/env.js
index b5e1af7f8..530307484 100644
--- a/node_modules/when/lib/env.js
+++ b/node_modules/when/lib/env.js
@@ -47,8 +47,8 @@ define(function(require) {
}
function hasMutationObserver () {
- return (typeof MutationObserver === 'function' && MutationObserver) ||
- (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
+ return (typeof MutationObserver !== 'undefined' && MutationObserver) ||
+ (typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);
}
function initMutationObserver(MutationObserver) {
diff --git a/node_modules/when/lib/makePromise.js b/node_modules/when/lib/makePromise.js
index 76f259737..7f91a757c 100644
--- a/node_modules/when/lib/makePromise.js
+++ b/node_modules/when/lib/makePromise.js
@@ -882,6 +882,28 @@ define(function() {
function noop() {}
+ function hasCustomEvent() {
+ if(typeof CustomEvent === 'function') {
+ try {
+ var ev = new CustomEvent('unhandledRejection');
+ return ev instanceof CustomEvent;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
+ function hasInternetExplorerCustomEvent() {
+ if(typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ try {
+ // Try to create one event to make sure it's supported
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent('eventType', false, true, {});
+ return true;
+ } catch (ignoredException) {}
+ }
+ return false;
+ }
+
function initEmitRejection() {
/*global process, self, CustomEvent*/
if(typeof process !== 'undefined' && process !== null
@@ -895,15 +917,9 @@ define(function() {
? process.emit(type, rejection.value, rejection)
: process.emit(type, rejection);
};
- } else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {
- return (function(noop, self, CustomEvent) {
- var hasCustomEvent = false;
- try {
- var ev = new CustomEvent('unhandledRejection');
- hasCustomEvent = ev instanceof CustomEvent;
- } catch (e) {}
-
- return !hasCustomEvent ? noop : function(type, rejection) {
+ } else if(typeof self !== 'undefined' && hasCustomEvent()) {
+ return (function (self, CustomEvent) {
+ return function (type, rejection) {
var ev = new CustomEvent(type, {
detail: {
reason: rejection.value,
@@ -915,7 +931,19 @@ define(function() {
return !self.dispatchEvent(ev);
};
- }(noop, self, CustomEvent));
+ }(self, CustomEvent));
+ } else if(typeof self !== 'undefined' && hasInternetExplorerCustomEvent()) {
+ return (function(self, document) {
+ return function(type, rejection) {
+ var ev = document.createEvent('CustomEvent');
+ ev.initCustomEvent(type, false, true, {
+ reason: rejection.value,
+ key: rejection
+ });
+
+ return !self.dispatchEvent(ev);
+ };
+ }(self, document));
}
return noop;
diff --git a/node_modules/when/package.json b/node_modules/when/package.json
index c5129fcf5..b02702be7 100644
--- a/node_modules/when/package.json
+++ b/node_modules/when/package.json
@@ -1,6 +1,6 @@
{
"name": "when",
- "version": "3.7.7",
+ "version": "3.7.8",
"description": "A lightweight Promises/A+ and when() implementation, plus other async goodies.",
"keywords": [
"cujo",
@@ -50,9 +50,11 @@
"browserify": "~2",
"buster": "~0.7",
"exorcist": "~0.4",
+ "glob": "^7.1.1",
"jshint": "~2",
"json5": "~0.2",
- "microtime": "~0",
+ "microtime": "~2",
+ "mkdirp": "^0.5.1",
"optimist": "~0.6",
"poly": "^0.6.1",
"promises-aplus-tests": "~2",
@@ -81,7 +83,7 @@
},
"scripts": {
"test": "jshint . && buster-test -e node && promises-aplus-tests test/promises-aplus-adapter.js",
- "build-browser-test": "browserify ./node_modules/poly/es5.js -o test/browser/es5.js && browserify ./test/*-test.js ./test/**/*-test.js -o test/browser/tests.js -x buster ",
+ "build-browser-test": "browserify ./node_modules/poly/es5.js -o test/browser/es5.js && node scripts/browserify-tests",
"browser-test": "npm run build-browser-test && buster-static -e browser -p 8080",
"ci": "npm test && node test/sauce.js",
"tunnel": "node test/sauce.js -m",
@@ -90,11 +92,11 @@
"prepublish": "npm run browserify && npm run uglify",
"preversion": "npm run browserify && npm run uglify",
"browserify": "npm run browserify-es6 && npm run browserify-when && npm run browserify-debug",
- "browserify-es6": "browserify -s Promise es6-shim/Promise.browserify-es6.js --no-detect-globals --debug | exorcist -b . -r https://raw.githubusercontent.com/cujojs/when/`git rev-parse HEAD` es6-shim/Promise.js.map >es6-shim/Promise.js",
- "browserify-when": "mkdir -p dist/browser && browserify -s when build/when.browserify.js --no-detect-globals --debug | exorcist -b . -r https://raw.githubusercontent.com/cujojs/when/`git rev-parse HEAD` dist/browser/when.js.map >dist/browser/when.js",
- "browserify-debug": "mkdir -p dist/browser && browserify -s when build/when.browserify-debug.js --no-detect-globals --debug | exorcist -b . -r https://raw.githubusercontent.com/cujojs/when/`git rev-parse HEAD` dist/browser/when.debug.js.map >dist/browser/when.debug.js",
+ "browserify-es6": "node scripts/browserify.js es6",
+ "browserify-when": "node scripts/browserify.js when",
+ "browserify-debug": "node scripts/browserify.js debug",
"uglify": "npm run uglify-es6 && npm run uglify-when",
- "uglify-es6": "cd es6-shim; uglifyjs Promise.js --compress --mangle --in-source-map Promise.js.map --source-map Promise.min.js.map -o Promise.min.js; cd ../..",
- "uglify-when": "cd dist/browser; uglifyjs when.js --compress --mangle --in-source-map when.js.map --source-map when.min.js.map -o when.min.js; cd ../.."
+ "uglify-es6": "uglifyjs es6-shim/Promise.js --compress --mangle --in-source-map es6-shim/Promise.js.map --source-map es6-shim/Promise.min.js.map -o es6-shim/Promise.min.js",
+ "uglify-when": "uglifyjs dist/browser/when.js --compress --mangle --in-source-map dist/browser/when.js.map --source-map dist/browser/when.min.js.map -o dist/browser/when.min.js"
}
}
diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md
index 698e8edb0..c44cfbec5 100644
--- a/node_modules/which/CHANGELOG.md
+++ b/node_modules/which/CHANGELOG.md
@@ -1,6 +1,18 @@
# Changes
+## v1.2.14
+
+* appveyor: drop node 5 and 0.x
+* travis-ci: add node 6, drop 0.x
+
+## v1.2.13
+
+* test: Pass missing option to pass on windows
+* update tap
+* update isexe to 2.0.0
+* neveragain.tech pledge request
+
## v1.2.12
* Removed unused require
diff --git a/node_modules/which/package.json b/node_modules/which/package.json
index 9c7de7d9d..a67870ed1 100644
--- a/node_modules/which/package.json
+++ b/node_modules/which/package.json
@@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "which",
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "version": "1.2.12",
+ "version": "1.2.14",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-which.git"
@@ -11,12 +11,12 @@
"bin": "./bin/which",
"license": "ISC",
"dependencies": {
- "isexe": "^1.1.1"
+ "isexe": "^2.0.0"
},
"devDependencies": {
"mkdirp": "^0.5.0",
"rimraf": "^2.3.3",
- "tap": "^5.1.1"
+ "tap": "^10.3.0"
},
"scripts": {
"test": "tap test/*.js --cov",
diff --git a/node_modules/zip-stream/README.md b/node_modules/zip-stream/README.md
index 7169cdcef..ffc846a1e 100644
--- a/node_modules/zip-stream/README.md
+++ b/node_modules/zip-stream/README.md
@@ -1,4 +1,4 @@
-# zip-stream v1.1.0 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)
+# ZipStream v1.1.1 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)
zip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.
@@ -40,12 +40,6 @@ archive.entry('string contents', { name: 'string.txt' }, function(err, entry) {
});
```
-## Things of Interest
-
-- [Releases](https://github.com/archiverjs/node-zip-stream/releases)
-- [Contributing](https://github.com/archiverjs/node-zip-stream/blob/master/CONTRIBUTING.md)
-- [MIT License](https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE)
-
## Credits
Concept inspired by Antoine van Wel's [zipstream](https://npmjs.org/package/zipstream) module, which is no longer being updated. \ No newline at end of file
diff --git a/node_modules/zip-stream/index.js b/node_modules/zip-stream/index.js
index 71f9fc4e7..0c3248bf8 100644
--- a/node_modules/zip-stream/index.js
+++ b/node_modules/zip-stream/index.js
@@ -38,7 +38,7 @@ var ZipStream = module.exports = function(options) {
delete options.level;
}
- if (options.zlib.level && options.zlib.level === 0) {
+ if (typeof options.zlib.level === 'number' && options.zlib.level === 0) {
options.store = true;
}
diff --git a/node_modules/zip-stream/package.json b/node_modules/zip-stream/package.json
index 1fb2cf6fa..874dd0be5 100644
--- a/node_modules/zip-stream/package.json
+++ b/node_modules/zip-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "zip-stream",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "a streaming zip archive generator.",
"homepage": "https://github.com/archiverjs/node-zip-stream",
"author": {
@@ -24,7 +24,7 @@
},
"scripts": {
"test": "mocha --reporter dot",
- "gendocs": "jsdoc -c jsdoc.json readme.md"
+ "jsdoc": "jsdoc -c jsdoc.json README.md"
},
"dependencies": {
"archiver-utils": "^1.3.0",
@@ -33,10 +33,11 @@
"readable-stream": "^2.0.0"
},
"devDependencies": {
+ "archiver-jsdoc-theme": "^1.0.0",
+ "jsdoc": "~3.4.0",
"chai": "^3.4.0",
- "jsdoc": "^3.4.0",
"minami": "^1.1.0",
- "mocha": "^2.3.3",
+ "mocha": "^3.2.0",
"rimraf": "^2.4.3",
"mkdirp": "^0.5.0"
},